diff --git a/src/adaptors/UBImportVirtualPrinter.h b/src/adaptors/UBImportVirtualPrinter.h deleted file mode 100644 index e1c56eb7..00000000 --- a/src/adaptors/UBImportVirtualPrinter.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * UBImportVirtualPrinter.h - * - * Created on: 18 mars 2009 - * Author: Julien - */ - -#ifndef UBIMPORTVIRTUALPRINTER_H_ -#define UBIMPORTVIRTUALPRINTER_H_ - -#include - -#include "UBImportAdaptor.h" - -#include "document/UBDocumentProxy.h" - -/** - * This class import ini file that are generated by Uniboard Printer. - */ -class UBImportVirtualPrinter: public UBImportAdaptor -{ - Q_OBJECT; - - public: - UBImportVirtualPrinter(QObject *parent = 0); - virtual ~UBImportVirtualPrinter(); - - // this is the name of the default printer that must be reset after importing from virtual printer. - // this allow other import adaptor to backup default printer, then set Uniboard printer as default printer and launch the - // print. Then when uniboard will import the file from virtual printer, it will reset the default printer to this one. - static QString sOriginalDefaultPrintername; - - - /** - * The document expecting to be merged with incoming data - */ - static QPointer pendingDocument; - - virtual QStringList supportedExtentions(); - virtual QString importFileFilter(); - virtual UBDocumentProxy* importFile(const QFile& pFile, const QString& pGroup); - - virtual bool addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile); - - - private: - - QString pdfFileName(const QFile& pFile); - QStringList emfFileNames(const QFile& pFile); - - void cleanUp(const QFile& pFile, const QString& pPdfFileName, QStringList pEmfFilenames); -}; - - -#endif /* UBIMPORTVIRTUALPRINTER_H_ */ diff --git a/src/adaptors/UBPowerPointApplication.h b/src/adaptors/UBPowerPointApplication.h deleted file mode 100644 index fee07ac5..00000000 --- a/src/adaptors/UBPowerPointApplication.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef UBPOWERPOINTAPPLICATION_H_ -#define UBPOWERPOINTAPPLICATION_H_ - -#if defined(Q_OS_WIN) -#include "UBPowerPointApplication_win.h" -#elif defined(Q_OS_MAC) -#include "UBPowerPointApplication_mac.h" -#else -//TODO Linux -#endif - -#endif /* UBPOWERPOINTAPPLICATION_H_ */ diff --git a/src/adaptors/UBPowerPointApplication_mac.h b/src/adaptors/UBPowerPointApplication_mac.h deleted file mode 100644 index 83bace84..00000000 --- a/src/adaptors/UBPowerPointApplication_mac.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef UBPOWERPOINTAPPLICATIONMAC_H_ -#define UBPOWERPOINTAPPLICATIONMAC_H_ - -#include -#include "UBImportAdaptor.h" - -class UBPowerPointApplication : public UBImportAdaptor -{ - Q_OBJECT - - public: - UBPowerPointApplication(QObject* parent = 0); - virtual ~UBPowerPointApplication(); - - virtual QStringList supportedExtentions(); - virtual QString importFileFilter(); - virtual UBDocumentProxy* importFile(const QFile& pFile, const QString& pGroup); - - virtual bool addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile); - - private: - bool generatePdfFromPptFile(const QString& pptFile, const QString& pOutputFile); - - -}; - -#endif /* UBPOWERPOINTAPPLICATIONMAC_H_ */ diff --git a/src/adaptors/UBPowerPointApplication_mac.mm b/src/adaptors/UBPowerPointApplication_mac.mm deleted file mode 100644 index f6e3a793..00000000 --- a/src/adaptors/UBPowerPointApplication_mac.mm +++ /dev/null @@ -1,227 +0,0 @@ - -#include "UBPowerPointApplication_mac.h" - -#include "core/UBApplication.h" -#include "core/UBDocumentManager.h" -#include "frameworks/UBPlatformUtils.h" -#include "frameworks/UBFileSystemUtils.h" - -#import -#import - - - -UBPowerPointApplication::UBPowerPointApplication(QObject* parent) -: UBImportAdaptor(parent) -{ - // NOOP -} - -UBPowerPointApplication::~UBPowerPointApplication() -{ - // NOOP -} - -class AppleScriptThread : public QThread -{ - public: - AppleScriptThread(NSAppleScript *appleScript, QObject *parent = 0) - : QThread(parent) - , mAppleScript(appleScript) - , mError(nil) - { - // NOOP - } - - ~AppleScriptThread() - { - if (mError) - { - [mError release]; - } - } - - void run() - { - NSDictionary *error = nil; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [mAppleScript executeAndReturnError:&error]; - mError = error ? [[NSDictionary alloc] initWithDictionary:error] : nil; - [pool release]; - } - - NSDictionary* error() - { - return mError; - } - - private: - NSAppleScript *mAppleScript; - NSDictionary *mError; -}; - - -NSString* escapePath(const QString &filePath) -{ - QString escapedFilePath(filePath); - escapedFilePath.replace("\"", "\\\""); - QByteArray pathRepresentation = QFile::encodeName(escapedFilePath); - return [[NSFileManager defaultManager] stringWithFileSystemRepresentation:pathRepresentation.constData() length:pathRepresentation.length()]; -} - - -bool UBPowerPointApplication::generatePdfFromPptFile(const QString& pptFile, const QString& pOutputFile) -{ - bool result = true; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - QResource scriptResource(":/PowerPointImport.applescript"); - NSString *script = [[NSString alloc] initWithBytes:scriptResource.data() length:scriptResource.size() encoding:NSUTF8StringEncoding]; - QFileInfo pptFileInfo(pptFile); - NSString *scriptSource = [NSString stringWithFormat:script, escapePath(pptFileInfo.fileName()), escapePath(pptFile), escapePath(pOutputFile)]; - [script release]; - NSAppleScript *pdfExportScript = [[NSAppleScript alloc] initWithSource:scriptSource]; - AppleScriptThread appleScriptThread(pdfExportScript); - appleScriptThread.start(); - while (appleScriptThread.isRunning()) - { - qApp->processEvents(); - } - if (appleScriptThread.error()) - { - const char* errorDescription = [[appleScriptThread.error() description] UTF8String]; - qWarning() << "PowerPoint import error:" << QString::fromUtf8(errorDescription, strlen(errorDescription)); - result = false; - } - [pdfExportScript release]; - [pool drain]; - return result; -} - - -QStringList UBPowerPointApplication::supportedExtentions() -{ - QStringList result; - CFURLRef powerPointURL = NULL; - - if (LSFindApplicationForInfo(kLSUnknownCreator, CFSTR("com.microsoft.Powerpoint"), NULL, NULL, &powerPointURL) == noErr) - { - CFBundleRef powerPointBundle = CFBundleCreate(kCFAllocatorDefault, powerPointURL); - if (powerPointBundle) - { - CFStringRef buildNumber = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(powerPointBundle, CFSTR("MicrosoftBuildNumber")); - if (buildNumber && (CFGetTypeID(buildNumber) == CFStringGetTypeID())) - { - int buildValue = CFStringGetIntValue(buildNumber); - if (buildValue >= 80409) - { - // PowerPoint 2008 - result << "ppt" << "pptx" << "pptm" << "pps" << "ppsx" << "ppsm"; - } - /* - else if (buildValue >= `Office 2004 MicrosoftBuildNumber`) - { - result << "ppt" << "pptm" << "pps" << "ppsm"; - } - */ - else - { - qWarning("Unsupported Microsoft PowerPoint version: %d", buildValue); - } - } - else - { - qWarning("Invalid PowerPoint MicrosoftBuildNumber"); - } - CFRelease(powerPointBundle); - } - else - { - qWarning("Microsoft PowerPoint bundle was not found"); - } - } - else - { - qWarning("Microsoft PowerPoint was not found"); - } - - if (powerPointURL) - { - CFRelease(powerPointURL); - } - - return result; -} - - -QString UBPowerPointApplication::importFileFilter() -{ - QStringList extentions = supportedExtentions(); - if (extentions.count() > 0) - { - QString filter = "PowerPoint ("; - foreach (const QString ext, extentions) - { - filter.append("*."); - filter.append(ext); - filter.append(" "); - } - filter = filter.trimmed(); - filter.append(")"); - return filter; - } - else - { - return 0; - } -} - - -UBDocumentProxy* UBPowerPointApplication::importFile(const QFile& pFile, const QString& pGroup) -{ - UBApplication::showMessage(tr("Converting PowerPoint file ..."), true); - UBDocumentProxy* result = 0; - - QString tempDir = UBFileSystemUtils::createTempDir(); - QFileInfo sourceFileInfo(pFile); - QString tempFile = tempDir + "/" + sourceFileInfo.baseName() + ".pdf"; - - if (generatePdfFromPptFile(pFile.fileName(), tempFile)) - { - UBApplication::showMessage(tr("PowerPoint import successful.")); - QFile tmp(tempFile); - result = UBDocumentManager::documentManager()->importFile(tmp, pGroup); - } - else - { - UBApplication::showMessage(tr("PowerPoint import failed.")); - } - - UBFileSystemUtils::deleteDir(tempDir); - return result; -} - - -bool UBPowerPointApplication::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile) -{ - UBApplication::showMessage(tr("Converting PowerPoint file ..."), true); - bool result = false; - - QString tempDir = UBFileSystemUtils::createTempDir(); - QFileInfo sourceFileInfo(pFile); - QString tempFile = tempDir + "/" + sourceFileInfo.baseName() + ".pdf"; - - if (generatePdfFromPptFile(pFile.fileName(), tempFile)) - { - UBApplication::showMessage(tr("PowerPoint import successful.")); - QFile tmp(tempFile); - result = UBDocumentManager::documentManager()->addFileToDocument(pDocument, tmp); - } - else - { - UBApplication::showMessage(tr("PowerPoint import failed.")); - } - - UBFileSystemUtils::deleteDir(tempDir); - return result; -} - diff --git a/src/adaptors/UBPowerPointApplication_win.cpp b/src/adaptors/UBPowerPointApplication_win.cpp deleted file mode 100644 index 53312e43..00000000 --- a/src/adaptors/UBPowerPointApplication_win.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/* - * UBPowerPointApplication.cpp - * - * Created on: Dec 4, 2008 - * Author: Luc - */ - -#include "UBPowerPointApplication_win.h" - -#include "frameworks/UBFileSystemUtils.h" - -#include "core/UBApplication.h" -#include "core/UBDocumentManager.h" -#include "core/UBPersistenceManager.h" - -#include "UBImportVirtualPrinter.h" -#include "msppt.h" -#include "mso.h" -#include "windows.h" - -UBPowerPointApplication::UBPowerPointApplication(QObject* parent) - : UBImportAdaptor(parent) - , mInit(false) - , mHasException(false) - , mSupportPpt(false) - , mSupportPptX(false) -{ - // NOOP -} - - -UBPowerPointApplication::~UBPowerPointApplication() -{ - // NOOP -} - - -void UBPowerPointApplication::init() -{ - PowerPoint::Application ppt; - qDebug() << "PPT version :" << ppt.Version().toFloat(); - mSupportPpt = !ppt.isNull(); - mSupportPptX = ppt.Version().toFloat() >= 12; - mInit = true; -} - - -bool UBPowerPointApplication::isPowerPointInstalled() -{ - if (!mInit) - { - init(); - } - return mSupportPpt; -} - - -bool UBPowerPointApplication::supportPptx() -{ - if (!mInit) - { - init(); - } - - return mSupportPptX; -} - - -bool UBPowerPointApplication::generatePdfFromPptFile(const QString& pptFile, const QString& outputDir) -{ - Q_UNUSED(pptFile); - Q_UNUSED(outputDir); - return false; -} - - -bool UBPowerPointApplication::generateImagesFromPptFile(const QString& pptFile, const QString& outputDir, const QString& imageFormat, const QSize& imageSize) -{ - mHasException = false; - - PowerPoint::Application ppt; - - connect(&ppt, SIGNAL(exception ( int , const QString & , const QString & , const QString & )) - , this, SLOT(exception ( int , const QString & , const QString & , const QString & ))); - - if (ppt.isNull()) - return false; - - ppt.Activate(); - ppt.SetWindowState(PowerPoint::ppWindowMinimized); - - UBApplication::processEvents(); - - int previouslyOpenPresentations = ppt.Presentations()->Count(); - - PowerPoint::Presentation *presentation = - ppt.Presentations()->Open(QDir::toNativeSeparators(pptFile)); - - int currentOpenPresentations = ppt.Presentations()->Count(); - - if(!presentation) - return false; - - if (ppt.Version().toFloat() >= 12) // PPT 2007 is broken with high res exports : https://trac.assembla.com/uniboard/ticket/297#comment:16 - { - presentation->Export(QDir::toNativeSeparators(outputDir), imageFormat); - } - else - { - presentation->Export(QDir::toNativeSeparators(outputDir), imageFormat, imageSize.width(), imageSize.height()); - } - - if(mHasException) - return false; - - if (currentOpenPresentations != previouslyOpenPresentations) - presentation->Close(); - - if (ppt.Presentations()->Count() == 0) - ppt.Quit(); - - return true; -} - -QStringList UBPowerPointApplication::supportedExtentions() -{ - QStringList result; - if (UBPowerPointApplication::isPowerPointInstalled()) - { - result << QStringList("ppt") << "pps"; - if (UBPowerPointApplication::supportPptx()) - { - result << "pptx" << "pptm" << "ppsx" << "ppsm"; - } - } - - return result; -} - -QString UBPowerPointApplication::importFileFilter() -{ - if (UBPowerPointApplication::isPowerPointInstalled()) - { - if (UBPowerPointApplication::supportPptx()) - { - return "PowerPoint (*.ppt *.pptx *.pptm *.pps *.ppsx *.ppsm)"; - } - else - { - return "PowerPoint (*.ppt *.pps)"; - } - } - else - { - return ""; - } -} - -UBDocumentProxy* UBPowerPointApplication::importFile(const QFile& pFile, const QString& pGroup) -{ - - UBDocumentProxy* document = 0; - // print by changing default printer and use shell execute to print - LPTSTR wDefaultPrinterName = new TCHAR[255]; - LPTSTR virtualPrinter = new TCHAR[255]; - - int i = QString("Uniboard").toWCharArray(virtualPrinter); // TODO UB 4.x make me configurable .... - virtualPrinter[i] = 0; - DWORD bufferSize = 1000; - GetDefaultPrinter(wDefaultPrinterName, &bufferSize); - UBImportVirtualPrinter::sOriginalDefaultPrintername = QString::fromWCharArray(wDefaultPrinterName); - - if (!SetDefaultPrinter(virtualPrinter)) - { - QMessageBox msgBox(0); - msgBox.setText(tr("Uniboard printer is not installed. Import will be done in jpg format.")); - msgBox.setStandardButtons(QMessageBox::Ok); - msgBox.setDefaultButton(QMessageBox::Ok); - msgBox.exec(); - QString tempLocation = UBFileSystemUtils::createTempDir(); - QDir tempDir(tempLocation); - - bool pptSuccess = generateImagesFromPptFile(pFile.fileName(), tempLocation, "jpg", QSize(3000, 2250)); - - if (pptSuccess) - { - document = UBDocumentManager::documentManager()->importDir(tempDir, pGroup); - - if (document) - { - UBFileSystemUtils::deleteDir(tempLocation); - } - } - } - else - { - document = UBPersistenceManager::persistenceManager()->createDocument(pGroup); - - QFileInfo sourceFileInfo(pFile); - - document->setMetaData(UBSettings::documentName, sourceFileInfo.baseName()); - UBPersistenceManager::persistenceManager()->persistDocumentMetadata(document); - - UBImportVirtualPrinter::pendingDocument = document; - - int result = (int)ShellExecute(NULL, QString("print").utf16() , pFile.fileName().utf16(), NULL, NULL, SW_HIDE); - - qDebug() << "PPT shellexec print result" << result; - } - - delete[] wDefaultPrinterName; - delete[] virtualPrinter; - - return document; -} - -bool UBPowerPointApplication::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile) -{ - bool result = false; - // print by changing default printer and use shell execute to print - LPTSTR wDefaultPrinterName = new TCHAR[255]; - LPTSTR virtualPrinter = new TCHAR[255]; - - int i = QString("Uniboard").toWCharArray(virtualPrinter); // TODO UB 4.x make me configurable .... - virtualPrinter[i] = 0; - DWORD bufferSize = 1000; - GetDefaultPrinter(wDefaultPrinterName, &bufferSize); - UBImportVirtualPrinter::sOriginalDefaultPrintername = QString::fromWCharArray(wDefaultPrinterName); - - if (!SetDefaultPrinter(virtualPrinter)) - { - QMessageBox msgBox(0); - msgBox.setText(tr("Uniboard printer is not installed. Import will be done in jpg format.")); - msgBox.setStandardButtons(QMessageBox::Ok); - msgBox.setDefaultButton(QMessageBox::Ok); - msgBox.exec(); - QString tempLocation = UBFileSystemUtils::createTempDir(); - QDir tempDir(tempLocation); - - bool pptSuccess = generateImagesFromPptFile(pFile.fileName(), tempLocation, "jpg", QSize(3000, 2250)); - - if (pptSuccess) - { - if (UBDocumentManager::documentManager()->addImageDirToDocument(tempDir, pDocument)) - { - UBFileSystemUtils::deleteDir(tempLocation); - result = true; - } - } - } - else - { - UBImportVirtualPrinter::pendingDocument = pDocument; - result = ShellExecute(NULL, QString("print").utf16() , pFile.fileName().utf16(), NULL, NULL, SW_HIDE); - } - - delete[] wDefaultPrinterName; - delete[] virtualPrinter; - return result; - -} - -void UBPowerPointApplication::exception ( int code, const QString & source, const QString & desc, const QString & help ) -{ - Q_UNUSED(help); - mHasException = true; - qCritical() << source << desc << code; -} - diff --git a/src/adaptors/UBPowerPointApplication_win.h b/src/adaptors/UBPowerPointApplication_win.h deleted file mode 100644 index 8ea42a76..00000000 --- a/src/adaptors/UBPowerPointApplication_win.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * UBPowerPointApplication.h - * - * Created on: Dec 4, 2008 - * Author: Luc - */ - -#ifndef UBPOWERPOINTAPPLICATIONWIN_H_ -#define UBPOWERPOINTAPPLICATIONWIN_H_ - -#include -#include "UBImportAdaptor.h" - -class UBPowerPointApplication : public UBImportAdaptor { - - Q_OBJECT; - - public: - UBPowerPointApplication(QObject* parent = 0); - virtual ~UBPowerPointApplication(); - - bool isPowerPointInstalled(); - - bool supportPptx(); - - virtual QStringList supportedExtentions(); - virtual QString importFileFilter(); - virtual UBDocumentProxy* importFile(const QFile& pFile, const QString& pGroup); - - virtual bool addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile); - - private: - - bool generateImagesFromPptFile(const QString& pptFile, const QString&outputDir, const QString& imageFormat, const QSize& imageSize); - bool generatePdfFromPptFile(const QString& pptFile, const QString& pOutputFile); - bool catchAndProcessFile(); - - void init(); - bool mInit; - bool mHasException; - bool mSupportPpt; - bool mSupportPptX; - - - private slots: - void exception ( int code, const QString & source, const QString & desc, const QString & help); - -}; - -#endif /* UBPOWERPOINTAPPLICATIONWIN_H_ */ diff --git a/src/adaptors/adaptors.pri b/src/adaptors/adaptors.pri index d6d13e88..8404364d 100644 --- a/src/adaptors/adaptors.pri +++ b/src/adaptors/adaptors.pri @@ -47,22 +47,9 @@ SOURCES += src/adaptors/voting/UBAbstractVotingSystem.cpp win32 { - SOURCES += src/adaptors/UBPowerPointApplication_win.cpp \ - src/adaptors/UBImportVirtualPrinter.cpp \ - src/adaptors/voting/UBReply2005VotingSystem.cpp \ + SOURCES += src/adaptors/voting/UBReply2005VotingSystem.cpp \ src/adaptors/voting/UBReplyWRS970VotingSystem.cpp - HEADERS += src/adaptors/UBPowerPointApplication_win.h \ - src/adaptors/UBImportVirtualPrinter.h \ - src/adaptors/voting/UBReply2005VotingSystem.h \ + HEADERS += src/adaptors/voting/UBReply2005VotingSystem.h \ src/adaptors/voting/UBReplyWRS970VotingSystem.h } - - -macx { - - SOURCES += src/adaptors/UBPowerPointApplication_mac.mm - - HEADERS += src/adaptors/UBPowerPointApplication_mac.h - -} diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 4d4c2e9a..f8631586 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -13,8 +13,6 @@ #include "softwareupdate/UBSoftwareUpdateController.h" #include "softwareupdate/UBSoftwareUpdate.h" -#include "adaptors/UBImportVirtualPrinter.h" - #include "board/UBBoardView.h" #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" @@ -651,32 +649,9 @@ void UBApplicationController::importFile(const QString& pFilePath) bool success = false; -#ifdef Q_WS_WIN - - if (UBImportVirtualPrinter::pendingDocument.isNull()) - { - -#endif - document = UBDocumentManager::documentManager()->importFile(fileToOpen, - UBSettings::defaultDocumentGroupName); - - success = (document != 0); + document = UBDocumentManager::documentManager()->importFile(fileToOpen, UBSettings::defaultDocumentGroupName); -#ifdef Q_WS_WIN - - } - else - { - document = UBImportVirtualPrinter::pendingDocument; - - UBImportVirtualPrinter::pendingDocument = 0; - - success = UBDocumentManager::documentManager()->addFileToDocument(document, fileToOpen); - if (success) - document->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); - } - -#endif + success = (document != 0); if (success && document) { diff --git a/src/core/UBDocumentManager.cpp b/src/core/UBDocumentManager.cpp index 8d5032ae..1f16c977 100644 --- a/src/core/UBDocumentManager.cpp +++ b/src/core/UBDocumentManager.cpp @@ -14,15 +14,10 @@ #include "adaptors/UBExportDocument.h" #include "adaptors/UBExportWeb.h" #include "adaptors/UBWebPublisher.h" -#include "adaptors/UBPowerPointApplication.h" #include "adaptors/UBImportDocument.h" #include "adaptors/UBImportPDF.h" #include "adaptors/UBImportImage.h" -#ifdef Q_OS_WIN - #include "adaptors/UBImportVirtualPrinter.h" -#endif - #include "domain/UBGraphicsScene.h" #include "domain/UBGraphicsSvgItem.h" #include "domain/UBGraphicsPixmapItem.h" @@ -60,27 +55,12 @@ UBDocumentManager::UBDocumentManager(QObject *parent) UBExportDocument* exportDocument = new UBExportDocument(this); mExportAdaptors.append(exportDocument); -// remove the Publish Documents on Uniboard Web entry -// UBWebPublisher* webPublisher = new UBWebPublisher(this); -// mExportAdaptors.append(webPublisher); - - -#if defined(Q_OS_WIN) || defined(Q_OS_MAC) // TODO UB 4.x - Linux implement a wrapper around Open Office - UBPowerPointApplication* pptImport = new UBPowerPointApplication(this); - mImportAdaptors.append(pptImport); -#endif - UBImportDocument* documentImport = new UBImportDocument(this); mImportAdaptors.append(documentImport); UBImportPDF* pdfImport = new UBImportPDF(this); mImportAdaptors.append(pdfImport); UBImportImage* imageImport = new UBImportImage(this); mImportAdaptors.append(imageImport); - -#ifdef Q_OS_WIN - UBImportVirtualPrinter* virtualPrinterImport = new UBImportVirtualPrinter(this); - mImportAdaptors.append(virtualPrinterImport); -#endif } diff --git a/src/core/main.cpp b/src/core/main.cpp index 1994b176..f81d7423 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -11,50 +11,6 @@ #include "UBApplication.h" #include "UBSettings.h" -#ifdef Q_WS_MAC -#include "google_breakpad/client/mac/handler/exception_handler.h" -#elif defined(Q_WS_WIN) -#include "google_breakpad/client/windows/handler/exception_handler.h" -#else -// TODO UB 4.x - Linux -#endif - -#ifdef Q_WS_MAC -bool MacCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { - - Q_UNUSED(context); - Q_UNUSED(success); - std::string path(dump_dir); - path.append(file_name); - path.append(".dmp"); - qDebug() << "minidump has been created " << QString::fromStdString(path); - // Currently we let OS alert the user about the crash. We will return true when - // message to the user will be implemented. But dump is available in {data directory}/log - return false; -} -#elif defined(Q_WS_WIN) -bool WinCallBack(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) { - Q_UNUSED(context); - Q_UNUSED(exinfo); - Q_UNUSED(assertion); - Q_UNUSED(succeeded); - std::wstring path(dump_path); - path.append(L"/"); - path.append(minidump_id); - path.append(L".dmp"); - qDebug() << "minidump has been created " << QString::fromStdWString(path); - // Currently we let OS alert the user about the crash. We will return true when - // message to the user will be implemented. But dump is available in {data directory}/log - return false; -} -#endif - void ub_message_output(QtMsgType type, const char *msg) { // We must temporarily remove the handler to avoid the infinite recursion of // ub_message_output -> qt_message_output -> ub_message_output -> qt_message_output ... @@ -114,12 +70,6 @@ int main(int argc, char *argv[]) { if (!logDir.exists()) logDir.mkdir(dumpPath); -#if defined(Q_WS_MAC) && defined(QT_NO_DEBUG) - google_breakpad::ExceptionHandler breakpadHandler(dumpPath.toStdString(), 0, MacCallback, 0, true); -#elif defined(Q_WS_WIN) - google_breakpad::ExceptionHandler breakpadHandler(dumpPath.toStdWString(), 0, WinCallBack, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); -#endif - QString fileToOpen; if (args.size() > 1) { diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 039d53de..86ad5d6a 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -16,7 +16,6 @@ #include "core/UBSetting.h" #include "adaptors/UBExportPDF.h" -#include "adaptors/UBPowerPointApplication.h" #include "adaptors/UBThumbnailAdaptor.h" #include "adaptors/UBMetadataDcSubsetAdaptor.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/AUTHORS b/thirdparty/google-breakpad/google-breakpad-r786/AUTHORS deleted file mode 100644 index 4858b377..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -opensource@google.com diff --git a/thirdparty/google-breakpad/google-breakpad-r786/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/COPYING deleted file mode 100644 index d15b0c24..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/ChangeLog b/thirdparty/google-breakpad/google-breakpad-r786/ChangeLog deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/DEPS b/thirdparty/google-breakpad/google-breakpad-r786/DEPS deleted file mode 100644 index 33f7b659..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/DEPS +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# We only use this file to ease the steps of generating projects after -# syncing, if we use gclient. All dependencies are svn:externals instead. -# If you're not using gclient, you need to run the gyp python script to -# generate the projects. -# This can be done by the following command (assuming current directory): -# src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp -hooks = [ - { - # A change to a .gyp, .gypi, or to GYP itself should run the generator. - "pattern": ".", - "action": ["python", - "src/src/tools/gyp/gyp", - "src/src/client/windows/breakpad_client.gyp"], - }, -] diff --git a/thirdparty/google-breakpad/google-breakpad-r786/INSTALL b/thirdparty/google-breakpad/google-breakpad-r786/INSTALL deleted file mode 100644 index 5458714e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/INSTALL +++ /dev/null @@ -1,234 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/Makefile.am deleted file mode 100644 index ef964cb6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/Makefile.am +++ /dev/null @@ -1,1029 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -# This allows #includes to be relative to src/ -AM_CPPFLAGS = -I$(top_srcdir)/src - -# Specify include paths for ac macros -ACLOCAL_AMFLAGS = -I m4 - -## Documentation -docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) - -dist_doc_DATA = \ - AUTHORS \ - COPYING \ - ChangeLog \ - INSTALL \ - NEWS \ - README - - -## Libraries -noinst_LIBRARIES = -lib_LIBRARIES = -bin_PROGRAMS = -check_PROGRAMS = - -if !DISABLE_PROCESSOR -lib_LIBRARIES += src/libbreakpad.a -noinst_LIBRARIES += src/third_party/libdisasm/libdisasm.a -endif - -if LINUX_HOST -lib_LIBRARIES += src/client/linux/libbreakpad_client.a - -src_client_linux_libbreakpad_client_a_SOURCES = \ - src/client/linux/crash_generation/crash_generation_client.cc \ - src/client/linux/handler/exception_handler.cc \ - src/client/linux/minidump_writer/linux_dumper.cc \ - src/client/linux/minidump_writer/minidump_writer.cc \ - src/client/minidump_file_writer.cc \ - src/common/convert_UTF.c \ - src/common/md5.c \ - src/common/string_conversion.cc \ - src/common/linux/file_id.cc \ - src/common/linux/guid_creator.cc -endif LINUX_HOST - -if !DISABLE_PROCESSOR -src_libbreakpad_a_SOURCES = \ - src/google_breakpad/common/breakpad_types.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_size.h \ - src/google_breakpad/processor/basic_source_line_resolver.h \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/exploitability.h \ - src/google_breakpad/processor/fast_source_line_resolver.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/minidump.h \ - src/google_breakpad/processor/minidump_processor.h \ - src/google-breakpad/processor/network_source_line_resolver.h \ - src/google_breakpad/processor/process_state.h \ - src/google_breakpad/processor/source_line_resolver_base.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/processor/stack_frame.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stackwalker.h \ - src/google_breakpad/processor/symbol_supplier.h \ - src/google_breakpad/processor/system_info.h \ - src/processor/address_map-inl.h \ - src/processor/address_map.h \ - src/processor/basic_code_module.h \ - src/processor/basic_code_modules.cc \ - src/processor/basic_code_modules.h \ - src/processor/basic_source_line_resolver_types.h \ - src/processor/basic_source_line_resolver.cc \ - src/processor/binarystream.h \ - src/processor/binarystream.cc \ - src/processor/call_stack.cc \ - src/processor/cfi_frame_info.cc \ - src/processor/cfi_frame_info.h \ - src/processor/contained_range_map-inl.h \ - src/processor/contained_range_map.h \ - src/processor/disassembler_x86.h \ - src/processor/disassembler_x86.cc \ - src/processor/exploitability.cc \ - src/processor/exploitability_win.h \ - src/processor/exploitability_win.cc \ - src/processor/fast_source_line_resolver_types.h \ - src/processor/fast_source_line_resolver.cc \ - src/processor/linked_ptr.h \ - src/processor/logging.h \ - src/processor/logging.cc \ - src/processor/map_serializers-inl.h \ - src/processor/map_serializers.h \ - src/processor/minidump.cc \ - src/processor/minidump_processor.cc \ - src/processor/module_comparer.cc \ - src/processor/module_comparer.h \ - src/processor/module_factory.h \ - src/processor/module_serializer.cc \ - src/processor/module_serializer.h \ - src/processor/network_interface.h \ - src/processor/network_source_line_resolver.cc \ - src/processor/network_source_line_server.cc \ - src/processor/network_source_line_server.h \ - src/processor/pathname_stripper.cc \ - src/processor/pathname_stripper.h \ - src/processor/postfix_evaluator-inl.h \ - src/processor/postfix_evaluator.h \ - src/processor/process_state.cc \ - src/processor/range_map-inl.h \ - src/processor/range_map.h \ - src/processor/scoped_ptr.h \ - src/processor/simple_serializer-inl.h \ - src/processor/simple_serializer.h \ - src/processor/simple_symbol_supplier.cc \ - src/processor/simple_symbol_supplier.h \ - src/processor/windows_frame_info.h \ - src/processor/source_line_resolver_base_types.h \ - src/processor/source_line_resolver_base.cc \ - src/processor/stackwalker.cc \ - src/processor/stackwalker_amd64.cc \ - src/processor/stackwalker_amd64.h \ - src/processor/stackwalker_arm.cc \ - src/processor/stackwalker_arm.h \ - src/processor/stackwalker_ppc.cc \ - src/processor/stackwalker_ppc.h \ - src/processor/stackwalker_sparc.cc \ - src/processor/stackwalker_sparc.h \ - src/processor/stackwalker_x86.cc \ - src/processor/stackwalker_x86.h \ - src/processor/static_address_map-inl.h \ - src/processor/static_address_map.h \ - src/processor/static_contained_range_map-inl.h \ - src/processor/static_contained_range_map.h \ - src/processor/static_map_iterator-inl.h \ - src/processor/static_map_iterator.h \ - src/processor/static_map-inl.h \ - src/processor/static_map.h \ - src/processor/static_range_map-inl.h \ - src/processor/static_range_map.h \ - src/processor/tokenize.cc \ - src/processor/tokenize.h \ - src/processor/udp_network.cc \ - src/processor/udp_network.h - -src_libbreakpad_a_LIBADD = src/third_party/libdisasm/libdisasm.a - -src_third_party_libdisasm_libdisasm_a_SOURCES = \ - src/third_party/libdisasm/ia32_implicit.c \ - src/third_party/libdisasm/ia32_implicit.h \ - src/third_party/libdisasm/ia32_insn.c \ - src/third_party/libdisasm/ia32_insn.h \ - src/third_party/libdisasm/ia32_invariant.c \ - src/third_party/libdisasm/ia32_invariant.h \ - src/third_party/libdisasm/ia32_modrm.c \ - src/third_party/libdisasm/ia32_modrm.h \ - src/third_party/libdisasm/ia32_opcode_tables.c \ - src/third_party/libdisasm/ia32_opcode_tables.h \ - src/third_party/libdisasm/ia32_operand.c \ - src/third_party/libdisasm/ia32_operand.h \ - src/third_party/libdisasm/ia32_reg.c \ - src/third_party/libdisasm/ia32_reg.h \ - src/third_party/libdisasm/ia32_settings.c \ - src/third_party/libdisasm/ia32_settings.h \ - src/third_party/libdisasm/libdis.h \ - src/third_party/libdisasm/qword.h \ - src/third_party/libdisasm/x86_disasm.c \ - src/third_party/libdisasm/x86_format.c \ - src/third_party/libdisasm/x86_imm.c \ - src/third_party/libdisasm/x86_imm.h \ - src/third_party/libdisasm/x86_insn.c \ - src/third_party/libdisasm/x86_misc.c \ - src/third_party/libdisasm/x86_operand_list.c \ - src/third_party/libdisasm/x86_operand_list.h - -## Programs -bin_PROGRAMS += \ - src/processor/minidump_dump \ - src/processor/minidump_stackwalk \ - src/processor/source_daemon -endif !DISABLE_PROCESSOR - -if LINUX_HOST -bin_PROGRAMS += \ - src/client/linux/linux_dumper_unittest_helper - -if !DISABLE_TOOLS -bin_PROGRAMS += \ - src/tools/linux/dump_syms/dump_syms \ - src/tools/linux/md2core/minidump-2-core \ - src/tools/linux/symupload/minidump_upload \ - src/tools/linux/symupload/sym_upload -endif -endif LINUX_HOST - - -## Tests -if !DISABLE_PROCESSOR -check_PROGRAMS += \ - src/common/test_assembler_unittest \ - src/processor/address_map_unittest \ - src/processor/binarystream_unittest \ - src/processor/basic_source_line_resolver_unittest \ - src/processor/cfi_frame_info_unittest \ - src/processor/contained_range_map_unittest \ - src/processor/disassembler_x86_unittest \ - src/processor/exploitability_unittest \ - src/processor/fast_source_line_resolver_unittest \ - src/processor/map_serializers_unittest \ - src/processor/minidump_processor_unittest \ - src/processor/minidump_unittest \ - src/processor/network_source_line_resolver_unittest \ - src/processor/network_source_line_resolver_server_unittest \ - src/processor/network_source_line_server_unittest \ - src/processor/static_address_map_unittest \ - src/processor/static_contained_range_map_unittest \ - src/processor/static_map_unittest \ - src/processor/static_range_map_unittest \ - src/processor/pathname_stripper_unittest \ - src/processor/postfix_evaluator_unittest \ - src/processor/range_map_unittest \ - src/processor/stackwalker_amd64_unittest \ - src/processor/stackwalker_arm_unittest \ - src/processor/stackwalker_x86_unittest \ - src/processor/synth_minidump_unittest -endif - -if LINUX_HOST -check_PROGRAMS += \ - src/client/linux/linux_client_unittest - -if !DISABLE_TOOLS -check_PROGRAMS += \ - src/common/dumper_unittest -endif -endif LINUX_HOST - -if !DISABLE_PROCESSOR -if SELFTEST -check_PROGRAMS += \ - src/processor/stackwalker_selftest -endif SELFTEST -endif !DISABLE_PROCESSOR - -if !DISABLE_PROCESSOR -check_SCRIPTS = \ - src/processor/minidump_dump_test \ - src/processor/minidump_stackwalk_test \ - src/processor/minidump_stackwalk_machine_readable_test -endif - -TESTS = $(check_PROGRAMS) $(check_SCRIPTS) -TESTS_ENVIRONMENT = - -if LINUX_HOST -src_client_linux_linux_dumper_unittest_helper_SOURCES = \ - src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -src_client_linux_linux_dumper_unittest_helper_CXXFLAGS=$(PTHREAD_CFLAGS) -src_client_linux_linux_dumper_unittest_helper_LDFLAGS=$(PTHREAD_CFLAGS) -src_client_linux_linux_dumper_unittest_helper_CC=$(PTHREAD_CC) - -src_client_linux_linux_client_unittest_SOURCES = \ - src/client/linux/handler/exception_handler_unittest.cc \ - src/client/linux/minidump_writer/directory_reader_unittest.cc \ - src/client/linux/minidump_writer/line_reader_unittest.cc \ - src/client/linux/minidump_writer/linux_dumper_unittest.cc \ - src/client/linux/minidump_writer/minidump_writer_unittest.cc \ - src/common/memory_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc \ - src/processor/basic_code_modules.cc \ - src/processor/logging.cc \ - src/processor/minidump.cc \ - src/processor/pathname_stripper.cc - -src_client_linux_linux_client_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_client_linux_linux_client_unittest_LDADD = \ - src/client/linux/handler/exception_handler.o \ - src/client/linux/crash_generation/crash_generation_client.o \ - src/client/linux/minidump_writer/linux_dumper.o \ - src/client/linux/minidump_writer/minidump_writer.o \ - src/client/minidump_file_writer.o \ - src/common/convert_UTF.o \ - src/common/md5.o \ - src/common/linux/file_id.o \ - src/common/linux/guid_creator.o \ - src/common/string_conversion.o - -src_client_linux_linux_client_unittest_DEPENDENCIES = src/client/linux/linux_dumper_unittest_helper src/client/linux/libbreakpad_client.a src/libbreakpad.a - -if !DISABLE_TOOLS -src_tools_linux_dump_syms_dump_syms_SOURCES = \ - src/common/dwarf_cfi_to_module.cc \ - src/common/dwarf_cu_to_module.cc \ - src/common/dwarf_line_to_module.cc \ - src/common/language.cc \ - src/common/module.cc \ - src/common/stabs_reader.cc \ - src/common/stabs_to_module.cc \ - src/common/dwarf/bytereader.cc \ - src/common/dwarf/dwarf2diehandler.cc \ - src/common/dwarf/dwarf2reader.cc \ - src/common/linux/dump_symbols.cc \ - src/common/linux/file_id.cc \ - src/tools/linux/dump_syms/dump_syms.cc - -src_tools_linux_md2core_minidump_2_core_SOURCES = \ - src/tools/linux/md2core/minidump-2-core.cc - -src_tools_linux_symupload_minidump_upload_SOURCES = \ - src/common/linux/http_upload.cc \ - src/tools/linux/symupload/minidump_upload.cc -src_tools_linux_symupload_minidump_upload_LDFLAGS = -ldl - -src_tools_linux_symupload_sym_upload_SOURCES = \ - src/common/linux/http_upload.cc \ - src/tools/linux/symupload/sym_upload.cc -src_tools_linux_symupload_sym_upload_LDFLAGS = -ldl - -src_common_dumper_unittest_SOURCES = \ - src/common/byte_cursor_unittest.cc \ - src/common/dwarf_cfi_to_module.cc \ - src/common/dwarf_cfi_to_module_unittest.cc \ - src/common/dwarf_cu_to_module.cc \ - src/common/dwarf_cu_to_module_unittest.cc \ - src/common/dwarf_line_to_module.cc \ - src/common/dwarf_line_to_module_unittest.cc \ - src/common/language.cc \ - src/common/module.cc \ - src/common/module_unittest.cc \ - src/common/stabs_reader.cc \ - src/common/stabs_reader_unittest.cc \ - src/common/stabs_to_module.cc \ - src/common/stabs_to_module_unittest.cc \ - src/common/test_assembler.cc \ - src/common/dwarf/bytereader.cc \ - src/common/dwarf/bytereader_unittest.cc \ - src/common/dwarf/cfi_assembler.cc \ - src/common/dwarf/dwarf2diehandler.cc \ - src/common/dwarf/dwarf2diehandler_unittest.cc \ - src/common/dwarf/dwarf2reader.cc \ - src/common/dwarf/dwarf2reader_cfi_unittest.cc \ - src/common/linux/dump_symbols.cc \ - src/common/linux/file_id.cc \ - src/common/linux/file_id_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_common_dumper_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -endif -endif LINUX_HOST - -if !DISABLE_PROCESSOR -src_processor_address_map_unittest_SOURCES = \ - src/processor/address_map_unittest.cc -src_processor_address_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_binarystream_unittest_SOURCES = \ - src/processor/binarystream_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_binarystream_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_binarystream_unittest_LDADD = \ - src/processor/binarystream.o - -src_processor_basic_source_line_resolver_unittest_SOURCES = \ - src/processor/basic_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_basic_source_line_resolver_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_basic_source_line_resolver_unittest_LDADD = \ - src/processor/basic_source_line_resolver.o \ - src/processor/cfi_frame_info.o \ - src/processor/pathname_stripper.o \ - src/processor/logging.o \ - src/processor/source_line_resolver_base.o \ - src/processor/tokenize.o - -src_processor_cfi_frame_info_unittest_SOURCES = \ - src/processor/cfi_frame_info_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_cfi_frame_info_unittest_LDADD = \ - src/processor/cfi_frame_info.o \ - src/processor/logging.o \ - src/processor/pathname_stripper.o -src_processor_cfi_frame_info_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -src_processor_contained_range_map_unittest_SOURCES = \ - src/processor/contained_range_map_unittest.cc -src_processor_contained_range_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_exploitability_unittest_SOURCES = \ - src/processor/exploitability_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_exploitability_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_exploitability_unittest_LDADD = \ - src/processor/minidump_processor.o \ - src/processor/process_state.o \ - src/processor/disassembler_x86.o \ - src/processor/exploitability.o \ - src/processor/exploitability_win.o \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/call_stack.o \ - src/processor/cfi_frame_info.o \ - src/processor/logging.o \ - src/processor/minidump.o \ - src/processor/pathname_stripper.o \ - src/processor/source_line_resolver_base.o \ - src/processor/stackwalker.o \ - src/processor/stackwalker_amd64.o \ - src/processor/stackwalker_arm.o \ - src/processor/stackwalker_ppc.o \ - src/processor/stackwalker_sparc.o \ - src/processor/stackwalker_x86.o \ - src/processor/tokenize.o \ - src/third_party/libdisasm/libdisasm.a - -src_processor_disassembler_x86_unittest_SOURCES = \ - src/processor/disassembler_x86_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_disassembler_x86_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_disassembler_x86_unittest_LDADD = \ - src/processor/disassembler_x86.o \ - src/third_party/libdisasm/libdisasm.a - -src_processor_fast_source_line_resolver_unittest_SOURCES = \ - src/processor/fast_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_fast_source_line_resolver_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_fast_source_line_resolver_unittest_LDADD = \ - src/processor/fast_source_line_resolver.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/cfi_frame_info.o \ - src/processor/module_comparer.o \ - src/processor/module_serializer.o \ - src/processor/pathname_stripper.o \ - src/processor/logging.o \ - src/processor/source_line_resolver_base.o \ - src/processor/tokenize.o - -src_processor_map_serializers_unittest_SOURCES = \ - src/processor/map_serializers_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_map_serializers_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_map_serializers_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_minidump_processor_unittest_SOURCES = \ - src/processor/minidump_processor_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_minidump_processor_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_minidump_processor_unittest_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/call_stack.o \ - src/processor/cfi_frame_info.o \ - src/processor/disassembler_x86.o \ - src/processor/exploitability.o \ - src/processor/exploitability_win.o \ - src/processor/logging.o \ - src/processor/minidump_processor.o \ - src/processor/minidump.o \ - src/processor/pathname_stripper.o \ - src/processor/process_state.o \ - src/processor/source_line_resolver_base.o \ - src/processor/stackwalker.o \ - src/processor/stackwalker_amd64.o \ - src/processor/stackwalker_arm.o \ - src/processor/stackwalker_ppc.o \ - src/processor/stackwalker_sparc.o \ - src/processor/stackwalker_x86.o \ - src/processor/tokenize.o \ - src/third_party/libdisasm/libdisasm.a - -src_processor_minidump_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/processor/minidump_unittest.cc \ - src/processor/synth_minidump.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_minidump_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_minidump_unittest_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/logging.o \ - src/processor/minidump.o \ - src/processor/pathname_stripper.o - -src_processor_network_source_line_resolver_unittest_SOURCES = \ - src/processor/network_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_network_source_line_resolver_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_network_source_line_resolver_unittest_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/binarystream.o \ - src/processor/cfi_frame_info.o \ - src/processor/logging.o \ - src/processor/network_source_line_resolver.o \ - src/processor/pathname_stripper.o \ - src/processor/tokenize.o \ - src/processor/udp_network.o - -src_processor_network_source_line_resolver_server_unittest_SOURCES = \ - src/processor/network_source_line_resolver_server_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_network_source_line_resolver_server_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_network_source_line_resolver_server_unittest_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/binarystream.o \ - src/processor/call_stack.o \ - src/processor/cfi_frame_info.o \ - src/processor/disassembler_x86.o \ - src/processor/exploitability.o \ - src/processor/exploitability_win.o \ - src/processor/logging.o \ - src/processor/minidump_processor.o \ - src/processor/minidump.o \ - src/processor/network_source_line_resolver.o \ - src/processor/network_source_line_server.o \ - src/processor/pathname_stripper.o \ - src/processor/process_state.o \ - src/processor/simple_symbol_supplier.o \ - src/processor/source_line_resolver_base.o \ - src/processor/stackwalker.o \ - src/processor/stackwalker_amd64.o \ - src/processor/stackwalker_arm.o \ - src/processor/stackwalker_ppc.o \ - src/processor/stackwalker_sparc.o \ - src/processor/stackwalker_x86.o \ - src/processor/tokenize.o \ - src/processor/udp_network.o \ - src/third_party/libdisasm/libdisasm.a - -src_processor_network_source_line_server_unittest_SOURCES = \ - src/processor/network_source_line_server_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_network_source_line_server_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_network_source_line_server_unittest_LDADD = \ - src/processor/binarystream.o \ - src/processor/cfi_frame_info.o \ - src/processor/logging.o \ - src/processor/network_source_line_server.o \ - src/processor/pathname_stripper.o \ - src/processor/udp_network.o - -src_processor_static_address_map_unittest_SOURCES = \ - src/processor/static_address_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_static_address_map_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_static_address_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_static_contained_range_map_unittest_SOURCES = \ - src/processor/static_contained_range_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_static_contained_range_map_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_static_contained_range_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_static_map_unittest_SOURCES = \ - src/processor/static_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_static_map_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_static_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_static_range_map_unittest_SOURCES = \ - src/processor/static_range_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -src_processor_static_range_map_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing -src_processor_static_range_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_pathname_stripper_unittest_SOURCES = \ - src/processor/pathname_stripper_unittest.cc -src_processor_pathname_stripper_unittest_LDADD = \ - src/processor/pathname_stripper.o - -src_processor_postfix_evaluator_unittest_SOURCES = \ - src/processor/postfix_evaluator_unittest.cc -src_processor_postfix_evaluator_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_range_map_unittest_SOURCES = \ - src/processor/range_map_unittest.cc -src_processor_range_map_unittest_LDADD = \ - src/processor/logging.o \ - src/processor/pathname_stripper.o - -src_processor_stackwalker_selftest_SOURCES = \ - src/processor/stackwalker_selftest.cc -src_processor_stackwalker_selftest_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/call_stack.o \ - src/processor/disassembler_x86.o \ - src/processor/exploitability.o \ - src/processor/exploitability_win.o \ - src/processor/logging.o \ - src/processor/minidump.o \ - src/processor/pathname_stripper.o \ - src/processor/source_line_resolver_base.o \ - src/processor/stackwalker.o \ - src/processor/stackwalker_amd64.o \ - src/processor/stackwalker_arm.o \ - src/processor/stackwalker_ppc.o \ - src/processor/stackwalker_sparc.o \ - src/processor/stackwalker_x86.o \ - src/processor/tokenize.o - -src_processor_stackwalker_amd64_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_amd64_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_stackwalker_amd64_unittest_LDADD = \ - src/libbreakpad.a -src_processor_stackwalker_amd64_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -src_processor_stackwalker_arm_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_arm_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_stackwalker_arm_unittest_LDADD = \ - src/libbreakpad.a -src_processor_stackwalker_arm_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -src_processor_stackwalker_x86_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_x86_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_processor_stackwalker_x86_unittest_LDADD = \ - src/libbreakpad.a -src_processor_stackwalker_x86_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -src_processor_synth_minidump_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/common/test_assembler.h \ - src/processor/synth_minidump_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc \ - src/processor/synth_minidump.cc \ - src/processor/synth_minidump.h -src_processor_synth_minidump_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -src_common_test_assembler_unittest_SOURCES = \ - src/common/test_assembler.cc \ - src/common/test_assembler.h \ - src/common/test_assembler_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -src_common_test_assembler_unittest_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/testing/include \ - -I$(top_srcdir)/src/testing/gtest/include \ - -I$(top_srcdir)/src/testing/gtest \ - -I$(top_srcdir)/src/testing - -## Non-installables -noinst_PROGRAMS = -noinst_SCRIPTS = $(check_SCRIPTS) - -src_processor_minidump_dump_SOURCES = \ - src/processor/minidump_dump.cc -src_processor_minidump_dump_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/logging.o \ - src/processor/minidump.o \ - src/processor/pathname_stripper.o - -src_processor_minidump_stackwalk_SOURCES = \ - src/processor/minidump_stackwalk.cc -src_processor_minidump_stackwalk_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/binarystream.o \ - src/processor/call_stack.o \ - src/processor/cfi_frame_info.o \ - src/processor/disassembler_x86.o \ - src/processor/exploitability.o \ - src/processor/exploitability_win.o \ - src/processor/logging.o \ - src/processor/minidump.o \ - src/processor/minidump_processor.o \ - src/processor/pathname_stripper.o \ - src/processor/process_state.o \ - src/processor/network_source_line_resolver.o \ - src/processor/simple_symbol_supplier.o \ - src/processor/source_line_resolver_base.o \ - src/processor/stackwalker.o \ - src/processor/stackwalker_amd64.o \ - src/processor/stackwalker_arm.o \ - src/processor/stackwalker_ppc.o \ - src/processor/stackwalker_sparc.o \ - src/processor/stackwalker_x86.o \ - src/processor/tokenize.o \ - src/processor/udp_network.o \ - src/third_party/libdisasm/libdisasm.a - -src_processor_source_daemon_SOURCES = \ - src/processor/source_daemon.cc -src_processor_source_daemon_LDADD = \ - src/processor/basic_code_modules.o \ - src/processor/basic_source_line_resolver.o \ - src/processor/binarystream.o \ - src/processor/cfi_frame_info.o \ - src/processor/logging.o \ - src/processor/network_source_line_server.o \ - src/processor/pathname_stripper.o \ - src/processor/simple_symbol_supplier.o \ - src/processor/source_line_resolver_base.o \ - src/processor/tokenize.o \ - src/processor/udp_network.o -endif !DISABLE_PROCESSOR - -## Additional files to be included in a source distribution -## -## find src/client src/common src/processor/testdata src/tools \ -## -type f \! -path '*/.svn/*' -print | sort | \ -## sed -e s/'^\(.*\)$'/'\t\1 \\'/ -EXTRA_DIST = \ - $(SCRIPTS) \ - src/processor/stackwalk_selftest_sol.s \ - src/client/linux/handler/Makefile \ - src/client/linux/handler/exception_handler.cc \ - src/client/linux/handler/exception_handler.h \ - src/client/linux/handler/exception_handler_test.cc \ - src/client/linux/handler/linux_thread.cc \ - src/client/linux/handler/linux_thread.h \ - src/client/linux/handler/linux_thread_test.cc \ - src/client/linux/handler/minidump_generator.cc \ - src/client/linux/handler/minidump_generator.h \ - src/client/linux/handler/minidump_test.cc \ - src/client/mac/handler/dynamic_images.cc \ - src/client/mac/handler/dynamic_images.h \ - src/client/mac/handler/exception_handler.cc \ - src/client/mac/handler/exception_handler.h \ - src/client/mac/handler/exception_handler_test.cc \ - src/client/mac/handler/minidump_generator.cc \ - src/client/mac/handler/minidump_generator.h \ - src/client/mac/handler/minidump_generator_test.cc \ - src/client/mac/handler/minidump_test.xcodeproj/project.pbxproj \ - src/client/mac/handler/protected_memory_allocator.cc \ - src/client/mac/handler/protected_memory_allocator.h \ - src/client/minidump_file_writer-inl.h \ - src/client/minidump_file_writer.cc \ - src/client/minidump_file_writer.h \ - src/client/minidump_file_writer_unittest.cc \ - src/client/solaris/handler/Makefile \ - src/client/solaris/handler/exception_handler.cc \ - src/client/solaris/handler/exception_handler.h \ - src/client/solaris/handler/exception_handler_test.cc \ - src/client/solaris/handler/minidump_generator.cc \ - src/client/solaris/handler/minidump_generator.h \ - src/client/solaris/handler/minidump_test.cc \ - src/client/solaris/handler/solaris_lwp.cc \ - src/client/solaris/handler/solaris_lwp.h \ - src/client/windows/breakpad_client.sln \ - src/client/windows/handler/exception_handler.cc \ - src/client/windows/handler/exception_handler.h \ - src/client/windows/handler/exception_handler.vcproj \ - src/client/windows/sender/crash_report_sender.cc \ - src/client/windows/sender/crash_report_sender.h \ - src/client/windows/sender/crash_report_sender.vcproj \ - src/common/convert_UTF.c \ - src/common/convert_UTF.h \ - src/common/linux/dump_symbols.cc \ - src/common/linux/dump_symbols.h \ - src/common/linux/file_id.cc \ - src/common/linux/file_id.h \ - src/common/linux/guid_creator.cc \ - src/common/linux/guid_creator.h \ - src/common/linux/http_upload.cc \ - src/common/linux/http_upload.h \ - src/common/mac/HTTPMultipartUpload.h \ - src/common/mac/HTTPMultipartUpload.m \ - src/common/mac/dump_syms.h \ - src/common/mac/dump_syms.mm \ - src/common/mac/file_id.cc \ - src/common/mac/file_id.h \ - src/common/mac/macho_id.cc \ - src/common/mac/macho_id.h \ - src/common/mac/macho_utilities.cc \ - src/common/mac/macho_utilities.h \ - src/common/mac/macho_walker.cc \ - src/common/mac/macho_walker.h \ - src/common/mac/string_utilities.cc \ - src/common/mac/string_utilities.h \ - src/common/md5.c \ - src/common/md5.h \ - src/common/solaris/dump_symbols.cc \ - src/common/solaris/dump_symbols.h \ - src/common/solaris/file_id.cc \ - src/common/solaris/file_id.h \ - src/common/solaris/guid_creator.cc \ - src/common/solaris/guid_creator.h \ - src/common/solaris/message_output.h \ - src/common/string_conversion.cc \ - src/common/string_conversion.h \ - src/common/windows/guid_string.cc \ - src/common/windows/guid_string.h \ - src/common/windows/http_upload.cc \ - src/common/windows/http_upload.h \ - src/common/windows/pdb_source_line_writer.cc \ - src/common/windows/pdb_source_line_writer.h \ - src/common/windows/string_utils-inl.h \ - src/common/windows/string_utils.cc \ - src/processor/testdata/minidump2.dmp \ - src/processor/testdata/minidump2.dump.out \ - src/processor/testdata/minidump2.stackwalk.machine_readable.out \ - src/processor/testdata/minidump2.stackwalk.out \ - src/processor/testdata/module1.out \ - src/processor/testdata/module2.out \ - src/processor/testdata/module3_bad.out \ - src/processor/testdata/module4_bad.out \ - src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym \ - src/processor/testdata/symbols/test_app.pdb/5A9832E5287241C1838ED98914E9B7FF1/test_app.sym \ - src/processor/testdata/test_app.cc \ - src/tools/linux/dump_syms/Makefile \ - src/tools/linux/dump_syms/dump_syms.cc \ - src/tools/linux/symupload/Makefile \ - src/tools/linux/symupload/minidump_upload.cc \ - src/tools/linux/symupload/sym_upload.cc \ - src/tools/mac/crash_report/crash_report.mm \ - src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj \ - src/tools/mac/crash_report/on_demand_symbol_supplier.h \ - src/tools/mac/crash_report/on_demand_symbol_supplier.mm \ - src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj \ - src/tools/mac/dump_syms/dump_syms_tool.m \ - src/tools/mac/symupload/minidump_upload.m \ - src/tools/mac/symupload/symupload.m \ - src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj \ - src/tools/solaris/dump_syms/Makefile \ - src/tools/solaris/dump_syms/dump_syms.cc \ - src/tools/solaris/dump_syms/run_regtest.sh \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym \ - src/tools/windows/converter/ms_symbol_server_converter.cc \ - src/tools/windows/converter/ms_symbol_server_converter.h \ - src/tools/windows/converter/ms_symbol_server_converter.vcproj \ - src/tools/windows/dump_syms/dump_syms.cc \ - src/tools/windows/dump_syms/dump_syms.vcproj \ - src/tools/windows/dump_syms/run_regtest.sh \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.pdb \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym \ - src/tools/windows/symupload/symupload.cc \ - src/tools/windows/symupload/symupload.vcproj diff --git a/thirdparty/google-breakpad/google-breakpad-r786/Makefile.in b/thirdparty/google-breakpad/google-breakpad-r786/Makefile.in deleted file mode 100644 index 75788807..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/Makefile.in +++ /dev/null @@ -1,5716 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) -check_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ - $(am__EXEEXT_7) -@DISABLE_PROCESSOR_FALSE@am__append_1 = src/libbreakpad.a -@DISABLE_PROCESSOR_FALSE@am__append_2 = src/third_party/libdisasm/libdisasm.a -@LINUX_HOST_TRUE@am__append_3 = src/client/linux/libbreakpad_client.a -@DISABLE_PROCESSOR_FALSE@am__append_4 = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_dump \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_stackwalk \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_daemon - -@LINUX_HOST_TRUE@am__append_5 = \ -@LINUX_HOST_TRUE@ src/client/linux/linux_dumper_unittest_helper - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am__append_6 = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/dump_syms/dump_syms \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/md2core/minidump-2-core \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/minidump_upload \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/sym_upload - -@DISABLE_PROCESSOR_FALSE@am__append_7 = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/address_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/contained_range_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/map_serializers_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_server_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_address_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_contained_range_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_range_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/postfix_evaluator_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/range_map_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86_unittest \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump_unittest - -@LINUX_HOST_TRUE@am__append_8 = \ -@LINUX_HOST_TRUE@ src/client/linux/linux_client_unittest - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am__append_9 = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dumper_unittest - -@DISABLE_PROCESSOR_FALSE@@SELFTEST_TRUE@am__append_10 = \ -@DISABLE_PROCESSOR_FALSE@@SELFTEST_TRUE@ src/processor/stackwalker_selftest - -noinst_PROGRAMS = -subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/configure $(top_srcdir)/src/config.h.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS autotools/compile \ - autotools/config.guess autotools/config.sub autotools/depcomp \ - autotools/install-sh autotools/ltmain.sh autotools/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(docdir)" -LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -src_client_linux_libbreakpad_client_a_AR = $(AR) $(ARFLAGS) -src_client_linux_libbreakpad_client_a_LIBADD = -am__src_client_linux_libbreakpad_client_a_SOURCES_DIST = \ - src/client/linux/crash_generation/crash_generation_client.cc \ - src/client/linux/handler/exception_handler.cc \ - src/client/linux/minidump_writer/linux_dumper.cc \ - src/client/linux/minidump_writer/minidump_writer.cc \ - src/client/minidump_file_writer.cc src/common/convert_UTF.c \ - src/common/md5.c src/common/string_conversion.cc \ - src/common/linux/file_id.cc src/common/linux/guid_creator.cc -am__dirstamp = $(am__leading_dot)dirstamp -@LINUX_HOST_TRUE@am_src_client_linux_libbreakpad_client_a_OBJECTS = src/client/linux/crash_generation/crash_generation_client.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/handler/exception_handler.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/minidump_writer.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/minidump_file_writer.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/convert_UTF.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/md5.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/string_conversion.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/linux/file_id.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/linux/guid_creator.$(OBJEXT) -src_client_linux_libbreakpad_client_a_OBJECTS = \ - $(am_src_client_linux_libbreakpad_client_a_OBJECTS) -src_libbreakpad_a_AR = $(AR) $(ARFLAGS) -@DISABLE_PROCESSOR_FALSE@src_libbreakpad_a_DEPENDENCIES = src/third_party/libdisasm/libdisasm.a -am__src_libbreakpad_a_SOURCES_DIST = \ - src/google_breakpad/common/breakpad_types.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_size.h \ - src/google_breakpad/processor/basic_source_line_resolver.h \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/exploitability.h \ - src/google_breakpad/processor/fast_source_line_resolver.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/minidump.h \ - src/google_breakpad/processor/minidump_processor.h \ - src/google-breakpad/processor/network_source_line_resolver.h \ - src/google_breakpad/processor/process_state.h \ - src/google_breakpad/processor/source_line_resolver_base.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/processor/stack_frame.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stackwalker.h \ - src/google_breakpad/processor/symbol_supplier.h \ - src/google_breakpad/processor/system_info.h \ - src/processor/address_map-inl.h src/processor/address_map.h \ - src/processor/basic_code_module.h \ - src/processor/basic_code_modules.cc \ - src/processor/basic_code_modules.h \ - src/processor/basic_source_line_resolver_types.h \ - src/processor/basic_source_line_resolver.cc \ - src/processor/binarystream.h src/processor/binarystream.cc \ - src/processor/call_stack.cc src/processor/cfi_frame_info.cc \ - src/processor/cfi_frame_info.h \ - src/processor/contained_range_map-inl.h \ - src/processor/contained_range_map.h \ - src/processor/disassembler_x86.h \ - src/processor/disassembler_x86.cc \ - src/processor/exploitability.cc \ - src/processor/exploitability_win.h \ - src/processor/exploitability_win.cc \ - src/processor/fast_source_line_resolver_types.h \ - src/processor/fast_source_line_resolver.cc \ - src/processor/linked_ptr.h src/processor/logging.h \ - src/processor/logging.cc src/processor/map_serializers-inl.h \ - src/processor/map_serializers.h src/processor/minidump.cc \ - src/processor/minidump_processor.cc \ - src/processor/module_comparer.cc \ - src/processor/module_comparer.h src/processor/module_factory.h \ - src/processor/module_serializer.cc \ - src/processor/module_serializer.h \ - src/processor/network_interface.h \ - src/processor/network_source_line_resolver.cc \ - src/processor/network_source_line_server.cc \ - src/processor/network_source_line_server.h \ - src/processor/pathname_stripper.cc \ - src/processor/pathname_stripper.h \ - src/processor/postfix_evaluator-inl.h \ - src/processor/postfix_evaluator.h \ - src/processor/process_state.cc src/processor/range_map-inl.h \ - src/processor/range_map.h src/processor/scoped_ptr.h \ - src/processor/simple_serializer-inl.h \ - src/processor/simple_serializer.h \ - src/processor/simple_symbol_supplier.cc \ - src/processor/simple_symbol_supplier.h \ - src/processor/windows_frame_info.h \ - src/processor/source_line_resolver_base_types.h \ - src/processor/source_line_resolver_base.cc \ - src/processor/stackwalker.cc \ - src/processor/stackwalker_amd64.cc \ - src/processor/stackwalker_amd64.h \ - src/processor/stackwalker_arm.cc \ - src/processor/stackwalker_arm.h \ - src/processor/stackwalker_ppc.cc \ - src/processor/stackwalker_ppc.h \ - src/processor/stackwalker_sparc.cc \ - src/processor/stackwalker_sparc.h \ - src/processor/stackwalker_x86.cc \ - src/processor/stackwalker_x86.h \ - src/processor/static_address_map-inl.h \ - src/processor/static_address_map.h \ - src/processor/static_contained_range_map-inl.h \ - src/processor/static_contained_range_map.h \ - src/processor/static_map_iterator-inl.h \ - src/processor/static_map_iterator.h \ - src/processor/static_map-inl.h src/processor/static_map.h \ - src/processor/static_range_map-inl.h \ - src/processor/static_range_map.h src/processor/tokenize.cc \ - src/processor/tokenize.h src/processor/udp_network.cc \ - src/processor/udp_network.h -@DISABLE_PROCESSOR_FALSE@am_src_libbreakpad_a_OBJECTS = src/processor/basic_code_modules.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_comparer.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_serializer.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.$(OBJEXT) -src_libbreakpad_a_OBJECTS = $(am_src_libbreakpad_a_OBJECTS) -src_third_party_libdisasm_libdisasm_a_AR = $(AR) $(ARFLAGS) -src_third_party_libdisasm_libdisasm_a_LIBADD = -am__src_third_party_libdisasm_libdisasm_a_SOURCES_DIST = \ - src/third_party/libdisasm/ia32_implicit.c \ - src/third_party/libdisasm/ia32_implicit.h \ - src/third_party/libdisasm/ia32_insn.c \ - src/third_party/libdisasm/ia32_insn.h \ - src/third_party/libdisasm/ia32_invariant.c \ - src/third_party/libdisasm/ia32_invariant.h \ - src/third_party/libdisasm/ia32_modrm.c \ - src/third_party/libdisasm/ia32_modrm.h \ - src/third_party/libdisasm/ia32_opcode_tables.c \ - src/third_party/libdisasm/ia32_opcode_tables.h \ - src/third_party/libdisasm/ia32_operand.c \ - src/third_party/libdisasm/ia32_operand.h \ - src/third_party/libdisasm/ia32_reg.c \ - src/third_party/libdisasm/ia32_reg.h \ - src/third_party/libdisasm/ia32_settings.c \ - src/third_party/libdisasm/ia32_settings.h \ - src/third_party/libdisasm/libdis.h \ - src/third_party/libdisasm/qword.h \ - src/third_party/libdisasm/x86_disasm.c \ - src/third_party/libdisasm/x86_format.c \ - src/third_party/libdisasm/x86_imm.c \ - src/third_party/libdisasm/x86_imm.h \ - src/third_party/libdisasm/x86_insn.c \ - src/third_party/libdisasm/x86_misc.c \ - src/third_party/libdisasm/x86_operand_list.c \ - src/third_party/libdisasm/x86_operand_list.h -@DISABLE_PROCESSOR_FALSE@am_src_third_party_libdisasm_libdisasm_a_OBJECTS = src/third_party/libdisasm/ia32_implicit.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_insn.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_invariant.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_modrm.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_opcode_tables.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_operand.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_reg.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_settings.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_disasm.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_format.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_imm.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_insn.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_misc.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_operand_list.$(OBJEXT) -src_third_party_libdisasm_libdisasm_a_OBJECTS = \ - $(am_src_third_party_libdisasm_libdisasm_a_OBJECTS) -@DISABLE_PROCESSOR_FALSE@am__EXEEXT_1 = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_dump$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_stackwalk$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_daemon$(EXEEXT) -@LINUX_HOST_TRUE@am__EXEEXT_2 = src/client/linux/linux_dumper_unittest_helper$(EXEEXT) -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am__EXEEXT_3 = src/tools/linux/dump_syms/dump_syms$(EXEEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/md2core/minidump-2-core$(EXEEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/minidump_upload$(EXEEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/sym_upload$(EXEEXT) -@DISABLE_PROCESSOR_FALSE@am__EXEEXT_4 = src/common/test_assembler_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/address_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/contained_range_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/map_serializers_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_server_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_address_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_contained_range_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_range_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/postfix_evaluator_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/range_map_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86_unittest$(EXEEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump_unittest$(EXEEXT) -@LINUX_HOST_TRUE@am__EXEEXT_5 = src/client/linux/linux_client_unittest$(EXEEXT) -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am__EXEEXT_6 = src/common/dumper_unittest$(EXEEXT) -@DISABLE_PROCESSOR_FALSE@@SELFTEST_TRUE@am__EXEEXT_7 = src/processor/stackwalker_selftest$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -am__src_client_linux_linux_client_unittest_SOURCES_DIST = \ - src/client/linux/handler/exception_handler_unittest.cc \ - src/client/linux/minidump_writer/directory_reader_unittest.cc \ - src/client/linux/minidump_writer/line_reader_unittest.cc \ - src/client/linux/minidump_writer/linux_dumper_unittest.cc \ - src/client/linux/minidump_writer/minidump_writer_unittest.cc \ - src/common/memory_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc \ - src/processor/basic_code_modules.cc src/processor/logging.cc \ - src/processor/minidump.cc src/processor/pathname_stripper.cc -@LINUX_HOST_TRUE@am_src_client_linux_linux_client_unittest_OBJECTS = src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/common/src_client_linux_linux_client_unittest-memory_unittest.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/testing/src/src_client_linux_linux_client_unittest-gmock-all.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/processor/src_client_linux_linux_client_unittest-basic_code_modules.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/processor/src_client_linux_linux_client_unittest-logging.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/processor/src_client_linux_linux_client_unittest-minidump.$(OBJEXT) \ -@LINUX_HOST_TRUE@ src/processor/src_client_linux_linux_client_unittest-pathname_stripper.$(OBJEXT) -src_client_linux_linux_client_unittest_OBJECTS = \ - $(am_src_client_linux_linux_client_unittest_OBJECTS) -am__src_client_linux_linux_dumper_unittest_helper_SOURCES_DIST = src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -@LINUX_HOST_TRUE@am_src_client_linux_linux_dumper_unittest_helper_OBJECTS = src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.$(OBJEXT) -src_client_linux_linux_dumper_unittest_helper_OBJECTS = \ - $(am_src_client_linux_linux_dumper_unittest_helper_OBJECTS) -src_client_linux_linux_dumper_unittest_helper_LDADD = $(LDADD) -src_client_linux_linux_dumper_unittest_helper_LINK = $(CXXLD) \ - $(src_client_linux_linux_dumper_unittest_helper_CXXFLAGS) \ - $(CXXFLAGS) \ - $(src_client_linux_linux_dumper_unittest_helper_LDFLAGS) \ - $(LDFLAGS) -o $@ -am__src_common_dumper_unittest_SOURCES_DIST = \ - src/common/byte_cursor_unittest.cc \ - src/common/dwarf_cfi_to_module.cc \ - src/common/dwarf_cfi_to_module_unittest.cc \ - src/common/dwarf_cu_to_module.cc \ - src/common/dwarf_cu_to_module_unittest.cc \ - src/common/dwarf_line_to_module.cc \ - src/common/dwarf_line_to_module_unittest.cc \ - src/common/language.cc src/common/module.cc \ - src/common/module_unittest.cc src/common/stabs_reader.cc \ - src/common/stabs_reader_unittest.cc \ - src/common/stabs_to_module.cc \ - src/common/stabs_to_module_unittest.cc \ - src/common/test_assembler.cc src/common/dwarf/bytereader.cc \ - src/common/dwarf/bytereader_unittest.cc \ - src/common/dwarf/cfi_assembler.cc \ - src/common/dwarf/dwarf2diehandler.cc \ - src/common/dwarf/dwarf2diehandler_unittest.cc \ - src/common/dwarf/dwarf2reader.cc \ - src/common/dwarf/dwarf2reader_cfi_unittest.cc \ - src/common/linux/dump_symbols.cc src/common/linux/file_id.cc \ - src/common/linux/file_id_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am_src_common_dumper_unittest_OBJECTS = src/common/src_common_dumper_unittest-byte_cursor_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_cfi_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_cu_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_line_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-language.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-module_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-stabs_reader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-stabs_reader_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-stabs_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-stabs_to_module_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/src_common_dumper_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-bytereader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-cfi_assembler.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-dwarf2reader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/src_common_dumper_unittest-dump_symbols.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/src_common_dumper_unittest-file_id.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/src_common_dumper_unittest-file_id_unittest.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/gtest/src/src_common_dumper_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/gtest/src/src_common_dumper_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/src/src_common_dumper_unittest-gmock-all.$(OBJEXT) -src_common_dumper_unittest_OBJECTS = \ - $(am_src_common_dumper_unittest_OBJECTS) -src_common_dumper_unittest_LDADD = $(LDADD) -am__src_common_test_assembler_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc src/common/test_assembler.h \ - src/common/test_assembler_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_common_test_assembler_unittest_OBJECTS = src/common/src_common_test_assembler_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/common/src_common_test_assembler_unittest-test_assembler_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_common_test_assembler_unittest-gmock-all.$(OBJEXT) -src_common_test_assembler_unittest_OBJECTS = \ - $(am_src_common_test_assembler_unittest_OBJECTS) -src_common_test_assembler_unittest_LDADD = $(LDADD) -am__src_processor_address_map_unittest_SOURCES_DIST = \ - src/processor/address_map_unittest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_address_map_unittest_OBJECTS = src/processor/address_map_unittest.$(OBJEXT) -src_processor_address_map_unittest_OBJECTS = \ - $(am_src_processor_address_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_address_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_basic_source_line_resolver_unittest_SOURCES_DIST = \ - src/processor/basic_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_basic_source_line_resolver_unittest_OBJECTS = src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.$(OBJEXT) -src_processor_basic_source_line_resolver_unittest_OBJECTS = $(am_src_processor_basic_source_line_resolver_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_basic_source_line_resolver_unittest_DEPENDENCIES = src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o -am__src_processor_binarystream_unittest_SOURCES_DIST = \ - src/processor/binarystream_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_binarystream_unittest_OBJECTS = src/processor/src_processor_binarystream_unittest-binarystream_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_binarystream_unittest-gmock-all.$(OBJEXT) -src_processor_binarystream_unittest_OBJECTS = \ - $(am_src_processor_binarystream_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_binarystream_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o -am__src_processor_cfi_frame_info_unittest_SOURCES_DIST = \ - src/processor/cfi_frame_info_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_cfi_frame_info_unittest_OBJECTS = src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.$(OBJEXT) -src_processor_cfi_frame_info_unittest_OBJECTS = \ - $(am_src_processor_cfi_frame_info_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_cfi_frame_info_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_contained_range_map_unittest_SOURCES_DIST = \ - src/processor/contained_range_map_unittest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_contained_range_map_unittest_OBJECTS = src/processor/contained_range_map_unittest.$(OBJEXT) -src_processor_contained_range_map_unittest_OBJECTS = \ - $(am_src_processor_contained_range_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_contained_range_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_disassembler_x86_unittest_SOURCES_DIST = \ - src/processor/disassembler_x86_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_disassembler_x86_unittest_OBJECTS = src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.$(OBJEXT) -src_processor_disassembler_x86_unittest_OBJECTS = \ - $(am_src_processor_disassembler_x86_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_disassembler_x86_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a -am__src_processor_exploitability_unittest_SOURCES_DIST = \ - src/processor/exploitability_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_exploitability_unittest_OBJECTS = src/processor/src_processor_exploitability_unittest-exploitability_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_exploitability_unittest-gmock-all.$(OBJEXT) -src_processor_exploitability_unittest_OBJECTS = \ - $(am_src_processor_exploitability_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_exploitability_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a -am__src_processor_fast_source_line_resolver_unittest_SOURCES_DIST = \ - src/processor/fast_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_fast_source_line_resolver_unittest_OBJECTS = src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.$(OBJEXT) -src_processor_fast_source_line_resolver_unittest_OBJECTS = $(am_src_processor_fast_source_line_resolver_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_fast_source_line_resolver_unittest_DEPENDENCIES = src/processor/fast_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_comparer.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_serializer.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o -am__src_processor_map_serializers_unittest_SOURCES_DIST = \ - src/processor/map_serializers_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_map_serializers_unittest_OBJECTS = src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_map_serializers_unittest-gmock-all.$(OBJEXT) -src_processor_map_serializers_unittest_OBJECTS = \ - $(am_src_processor_map_serializers_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_map_serializers_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_minidump_dump_SOURCES_DIST = \ - src/processor/minidump_dump.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_minidump_dump_OBJECTS = src/processor/minidump_dump.$(OBJEXT) -src_processor_minidump_dump_OBJECTS = \ - $(am_src_processor_minidump_dump_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_dump_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_minidump_processor_unittest_SOURCES_DIST = \ - src/processor/minidump_processor_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_minidump_processor_unittest_OBJECTS = src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_minidump_processor_unittest-gmock-all.$(OBJEXT) -src_processor_minidump_processor_unittest_OBJECTS = \ - $(am_src_processor_minidump_processor_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_processor_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a -am__src_processor_minidump_stackwalk_SOURCES_DIST = \ - src/processor/minidump_stackwalk.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_minidump_stackwalk_OBJECTS = src/processor/minidump_stackwalk.$(OBJEXT) -src_processor_minidump_stackwalk_OBJECTS = \ - $(am_src_processor_minidump_stackwalk_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_stackwalk_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a -am__src_processor_minidump_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc \ - src/processor/minidump_unittest.cc \ - src/processor/synth_minidump.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_minidump_unittest_OBJECTS = src/common/src_processor_minidump_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_minidump_unittest-minidump_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_minidump_unittest-synth_minidump.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_minidump_unittest-gmock-all.$(OBJEXT) -src_processor_minidump_unittest_OBJECTS = \ - $(am_src_processor_minidump_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_network_source_line_resolver_server_unittest_SOURCES_DIST = \ - src/processor/network_source_line_resolver_server_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_network_source_line_resolver_server_unittest_OBJECTS = src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.$(OBJEXT) -src_processor_network_source_line_resolver_server_unittest_OBJECTS = $(am_src_processor_network_source_line_resolver_server_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_server_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a -am__src_processor_network_source_line_resolver_unittest_SOURCES_DIST = \ - src/processor/network_source_line_resolver_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_network_source_line_resolver_unittest_OBJECTS = src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.$(OBJEXT) -src_processor_network_source_line_resolver_unittest_OBJECTS = $(am_src_processor_network_source_line_resolver_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o -am__src_processor_network_source_line_server_unittest_SOURCES_DIST = \ - src/processor/network_source_line_server_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_network_source_line_server_unittest_OBJECTS = src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.$(OBJEXT) -src_processor_network_source_line_server_unittest_OBJECTS = $(am_src_processor_network_source_line_server_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_server_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o -am__src_processor_pathname_stripper_unittest_SOURCES_DIST = \ - src/processor/pathname_stripper_unittest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_pathname_stripper_unittest_OBJECTS = src/processor/pathname_stripper_unittest.$(OBJEXT) -src_processor_pathname_stripper_unittest_OBJECTS = \ - $(am_src_processor_pathname_stripper_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_pathname_stripper_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_postfix_evaluator_unittest_SOURCES_DIST = \ - src/processor/postfix_evaluator_unittest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_postfix_evaluator_unittest_OBJECTS = src/processor/postfix_evaluator_unittest.$(OBJEXT) -src_processor_postfix_evaluator_unittest_OBJECTS = \ - $(am_src_processor_postfix_evaluator_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_postfix_evaluator_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_range_map_unittest_SOURCES_DIST = \ - src/processor/range_map_unittest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_range_map_unittest_OBJECTS = src/processor/range_map_unittest.$(OBJEXT) -src_processor_range_map_unittest_OBJECTS = \ - $(am_src_processor_range_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_range_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_source_daemon_SOURCES_DIST = \ - src/processor/source_daemon.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_source_daemon_OBJECTS = src/processor/source_daemon.$(OBJEXT) -src_processor_source_daemon_OBJECTS = \ - $(am_src_processor_source_daemon_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_source_daemon_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o -am__src_processor_stackwalker_amd64_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_amd64_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_stackwalker_amd64_unittest_OBJECTS = src/common/src_processor_stackwalker_amd64_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.$(OBJEXT) -src_processor_stackwalker_amd64_unittest_OBJECTS = \ - $(am_src_processor_stackwalker_amd64_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_amd64_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a -am__src_processor_stackwalker_arm_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_arm_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_stackwalker_arm_unittest_OBJECTS = src/common/src_processor_stackwalker_arm_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.$(OBJEXT) -src_processor_stackwalker_arm_unittest_OBJECTS = \ - $(am_src_processor_stackwalker_arm_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_arm_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a -am__src_processor_stackwalker_selftest_SOURCES_DIST = \ - src/processor/stackwalker_selftest.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_stackwalker_selftest_OBJECTS = src/processor/stackwalker_selftest.$(OBJEXT) -src_processor_stackwalker_selftest_OBJECTS = \ - $(am_src_processor_stackwalker_selftest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_selftest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o -am__src_processor_stackwalker_x86_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc \ - src/processor/stackwalker_x86_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_stackwalker_x86_unittest_OBJECTS = src/common/src_processor_stackwalker_x86_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.$(OBJEXT) -src_processor_stackwalker_x86_unittest_OBJECTS = \ - $(am_src_processor_stackwalker_x86_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_x86_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a -am__src_processor_static_address_map_unittest_SOURCES_DIST = \ - src/processor/static_address_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_static_address_map_unittest_OBJECTS = src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_static_address_map_unittest-gmock-all.$(OBJEXT) -src_processor_static_address_map_unittest_OBJECTS = \ - $(am_src_processor_static_address_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_static_address_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_static_contained_range_map_unittest_SOURCES_DIST = \ - src/processor/static_contained_range_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_static_contained_range_map_unittest_OBJECTS = src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.$(OBJEXT) -src_processor_static_contained_range_map_unittest_OBJECTS = $(am_src_processor_static_contained_range_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_static_contained_range_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_static_map_unittest_SOURCES_DIST = \ - src/processor/static_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_static_map_unittest_OBJECTS = src/processor/src_processor_static_map_unittest-static_map_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_static_map_unittest-gmock-all.$(OBJEXT) -src_processor_static_map_unittest_OBJECTS = \ - $(am_src_processor_static_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_static_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_static_range_map_unittest_SOURCES_DIST = \ - src/processor/static_range_map_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/src/gmock-all.cc -@DISABLE_PROCESSOR_FALSE@am_src_processor_static_range_map_unittest_OBJECTS = src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_static_range_map_unittest-gmock-all.$(OBJEXT) -src_processor_static_range_map_unittest_OBJECTS = \ - $(am_src_processor_static_range_map_unittest_OBJECTS) -@DISABLE_PROCESSOR_FALSE@src_processor_static_range_map_unittest_DEPENDENCIES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o -am__src_processor_synth_minidump_unittest_SOURCES_DIST = \ - src/common/test_assembler.cc src/common/test_assembler.h \ - src/processor/synth_minidump_unittest.cc \ - src/testing/gtest/src/gtest-all.cc \ - src/testing/gtest/src/gtest_main.cc \ - src/testing/src/gmock-all.cc src/processor/synth_minidump.cc \ - src/processor/synth_minidump.h -@DISABLE_PROCESSOR_FALSE@am_src_processor_synth_minidump_unittest_OBJECTS = src/common/src_processor_synth_minidump_unittest-test_assembler.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/src_processor_synth_minidump_unittest-gmock-all.$(OBJEXT) \ -@DISABLE_PROCESSOR_FALSE@ src/processor/src_processor_synth_minidump_unittest-synth_minidump.$(OBJEXT) -src_processor_synth_minidump_unittest_OBJECTS = \ - $(am_src_processor_synth_minidump_unittest_OBJECTS) -src_processor_synth_minidump_unittest_LDADD = $(LDADD) -am__src_tools_linux_dump_syms_dump_syms_SOURCES_DIST = \ - src/common/dwarf_cfi_to_module.cc \ - src/common/dwarf_cu_to_module.cc \ - src/common/dwarf_line_to_module.cc src/common/language.cc \ - src/common/module.cc src/common/stabs_reader.cc \ - src/common/stabs_to_module.cc src/common/dwarf/bytereader.cc \ - src/common/dwarf/dwarf2diehandler.cc \ - src/common/dwarf/dwarf2reader.cc \ - src/common/linux/dump_symbols.cc src/common/linux/file_id.cc \ - src/tools/linux/dump_syms/dump_syms.cc -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am_src_tools_linux_dump_syms_dump_syms_OBJECTS = src/common/dwarf_cfi_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cu_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_line_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/language.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_reader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_to_module.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/bytereader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2diehandler.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2reader.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/dump_symbols.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/file_id.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/dump_syms/dump_syms.$(OBJEXT) -src_tools_linux_dump_syms_dump_syms_OBJECTS = \ - $(am_src_tools_linux_dump_syms_dump_syms_OBJECTS) -src_tools_linux_dump_syms_dump_syms_LDADD = $(LDADD) -am__src_tools_linux_md2core_minidump_2_core_SOURCES_DIST = \ - src/tools/linux/md2core/minidump-2-core.cc -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am_src_tools_linux_md2core_minidump_2_core_OBJECTS = src/tools/linux/md2core/minidump-2-core.$(OBJEXT) -src_tools_linux_md2core_minidump_2_core_OBJECTS = \ - $(am_src_tools_linux_md2core_minidump_2_core_OBJECTS) -src_tools_linux_md2core_minidump_2_core_LDADD = $(LDADD) -am__src_tools_linux_symupload_minidump_upload_SOURCES_DIST = \ - src/common/linux/http_upload.cc \ - src/tools/linux/symupload/minidump_upload.cc -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am_src_tools_linux_symupload_minidump_upload_OBJECTS = src/common/linux/http_upload.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/minidump_upload.$(OBJEXT) -src_tools_linux_symupload_minidump_upload_OBJECTS = \ - $(am_src_tools_linux_symupload_minidump_upload_OBJECTS) -src_tools_linux_symupload_minidump_upload_LDADD = $(LDADD) -src_tools_linux_symupload_minidump_upload_LINK = $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(src_tools_linux_symupload_minidump_upload_LDFLAGS) \ - $(LDFLAGS) -o $@ -am__src_tools_linux_symupload_sym_upload_SOURCES_DIST = \ - src/common/linux/http_upload.cc \ - src/tools/linux/symupload/sym_upload.cc -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@am_src_tools_linux_symupload_sym_upload_OBJECTS = src/common/linux/http_upload.$(OBJEXT) \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/sym_upload.$(OBJEXT) -src_tools_linux_symupload_sym_upload_OBJECTS = \ - $(am_src_tools_linux_symupload_sym_upload_OBJECTS) -src_tools_linux_symupload_sym_upload_LDADD = $(LDADD) -src_tools_linux_symupload_sym_upload_LINK = $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(src_tools_linux_symupload_sym_upload_LDFLAGS) \ - $(LDFLAGS) -o $@ -SCRIPTS = $(noinst_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -SOURCES = $(src_client_linux_libbreakpad_client_a_SOURCES) \ - $(src_libbreakpad_a_SOURCES) \ - $(src_third_party_libdisasm_libdisasm_a_SOURCES) \ - $(src_client_linux_linux_client_unittest_SOURCES) \ - $(src_client_linux_linux_dumper_unittest_helper_SOURCES) \ - $(src_common_dumper_unittest_SOURCES) \ - $(src_common_test_assembler_unittest_SOURCES) \ - $(src_processor_address_map_unittest_SOURCES) \ - $(src_processor_basic_source_line_resolver_unittest_SOURCES) \ - $(src_processor_binarystream_unittest_SOURCES) \ - $(src_processor_cfi_frame_info_unittest_SOURCES) \ - $(src_processor_contained_range_map_unittest_SOURCES) \ - $(src_processor_disassembler_x86_unittest_SOURCES) \ - $(src_processor_exploitability_unittest_SOURCES) \ - $(src_processor_fast_source_line_resolver_unittest_SOURCES) \ - $(src_processor_map_serializers_unittest_SOURCES) \ - $(src_processor_minidump_dump_SOURCES) \ - $(src_processor_minidump_processor_unittest_SOURCES) \ - $(src_processor_minidump_stackwalk_SOURCES) \ - $(src_processor_minidump_unittest_SOURCES) \ - $(src_processor_network_source_line_resolver_server_unittest_SOURCES) \ - $(src_processor_network_source_line_resolver_unittest_SOURCES) \ - $(src_processor_network_source_line_server_unittest_SOURCES) \ - $(src_processor_pathname_stripper_unittest_SOURCES) \ - $(src_processor_postfix_evaluator_unittest_SOURCES) \ - $(src_processor_range_map_unittest_SOURCES) \ - $(src_processor_source_daemon_SOURCES) \ - $(src_processor_stackwalker_amd64_unittest_SOURCES) \ - $(src_processor_stackwalker_arm_unittest_SOURCES) \ - $(src_processor_stackwalker_selftest_SOURCES) \ - $(src_processor_stackwalker_x86_unittest_SOURCES) \ - $(src_processor_static_address_map_unittest_SOURCES) \ - $(src_processor_static_contained_range_map_unittest_SOURCES) \ - $(src_processor_static_map_unittest_SOURCES) \ - $(src_processor_static_range_map_unittest_SOURCES) \ - $(src_processor_synth_minidump_unittest_SOURCES) \ - $(src_tools_linux_dump_syms_dump_syms_SOURCES) \ - $(src_tools_linux_md2core_minidump_2_core_SOURCES) \ - $(src_tools_linux_symupload_minidump_upload_SOURCES) \ - $(src_tools_linux_symupload_sym_upload_SOURCES) -DIST_SOURCES = \ - $(am__src_client_linux_libbreakpad_client_a_SOURCES_DIST) \ - $(am__src_libbreakpad_a_SOURCES_DIST) \ - $(am__src_third_party_libdisasm_libdisasm_a_SOURCES_DIST) \ - $(am__src_client_linux_linux_client_unittest_SOURCES_DIST) \ - $(am__src_client_linux_linux_dumper_unittest_helper_SOURCES_DIST) \ - $(am__src_common_dumper_unittest_SOURCES_DIST) \ - $(am__src_common_test_assembler_unittest_SOURCES_DIST) \ - $(am__src_processor_address_map_unittest_SOURCES_DIST) \ - $(am__src_processor_basic_source_line_resolver_unittest_SOURCES_DIST) \ - $(am__src_processor_binarystream_unittest_SOURCES_DIST) \ - $(am__src_processor_cfi_frame_info_unittest_SOURCES_DIST) \ - $(am__src_processor_contained_range_map_unittest_SOURCES_DIST) \ - $(am__src_processor_disassembler_x86_unittest_SOURCES_DIST) \ - $(am__src_processor_exploitability_unittest_SOURCES_DIST) \ - $(am__src_processor_fast_source_line_resolver_unittest_SOURCES_DIST) \ - $(am__src_processor_map_serializers_unittest_SOURCES_DIST) \ - $(am__src_processor_minidump_dump_SOURCES_DIST) \ - $(am__src_processor_minidump_processor_unittest_SOURCES_DIST) \ - $(am__src_processor_minidump_stackwalk_SOURCES_DIST) \ - $(am__src_processor_minidump_unittest_SOURCES_DIST) \ - $(am__src_processor_network_source_line_resolver_server_unittest_SOURCES_DIST) \ - $(am__src_processor_network_source_line_resolver_unittest_SOURCES_DIST) \ - $(am__src_processor_network_source_line_server_unittest_SOURCES_DIST) \ - $(am__src_processor_pathname_stripper_unittest_SOURCES_DIST) \ - $(am__src_processor_postfix_evaluator_unittest_SOURCES_DIST) \ - $(am__src_processor_range_map_unittest_SOURCES_DIST) \ - $(am__src_processor_source_daemon_SOURCES_DIST) \ - $(am__src_processor_stackwalker_amd64_unittest_SOURCES_DIST) \ - $(am__src_processor_stackwalker_arm_unittest_SOURCES_DIST) \ - $(am__src_processor_stackwalker_selftest_SOURCES_DIST) \ - $(am__src_processor_stackwalker_x86_unittest_SOURCES_DIST) \ - $(am__src_processor_static_address_map_unittest_SOURCES_DIST) \ - $(am__src_processor_static_contained_range_map_unittest_SOURCES_DIST) \ - $(am__src_processor_static_map_unittest_SOURCES_DIST) \ - $(am__src_processor_static_range_map_unittest_SOURCES_DIST) \ - $(am__src_processor_synth_minidump_unittest_SOURCES_DIST) \ - $(am__src_tools_linux_dump_syms_dump_syms_SOURCES_DIST) \ - $(am__src_tools_linux_md2core_minidump_2_core_SOURCES_DIST) \ - $(am__src_tools_linux_symupload_minidump_upload_SOURCES_DIST) \ - $(am__src_tools_linux_symupload_sym_upload_SOURCES_DIST) -DATA = $(dist_doc_DATA) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# This allows #includes to be relative to src/ -AM_CPPFLAGS = -I$(top_srcdir)/src - -# Specify include paths for ac macros -ACLOCAL_AMFLAGS = -I m4 -dist_doc_DATA = \ - AUTHORS \ - COPYING \ - ChangeLog \ - INSTALL \ - NEWS \ - README - -noinst_LIBRARIES = $(am__append_2) -lib_LIBRARIES = $(am__append_1) $(am__append_3) -@LINUX_HOST_TRUE@src_client_linux_libbreakpad_client_a_SOURCES = \ -@LINUX_HOST_TRUE@ src/client/linux/crash_generation/crash_generation_client.cc \ -@LINUX_HOST_TRUE@ src/client/linux/handler/exception_handler.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/minidump_writer.cc \ -@LINUX_HOST_TRUE@ src/client/minidump_file_writer.cc \ -@LINUX_HOST_TRUE@ src/common/convert_UTF.c \ -@LINUX_HOST_TRUE@ src/common/md5.c \ -@LINUX_HOST_TRUE@ src/common/string_conversion.cc \ -@LINUX_HOST_TRUE@ src/common/linux/file_id.cc \ -@LINUX_HOST_TRUE@ src/common/linux/guid_creator.cc - -@DISABLE_PROCESSOR_FALSE@src_libbreakpad_a_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/common/breakpad_types.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/common/minidump_format.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/common/minidump_size.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/basic_source_line_resolver.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/call_stack.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/code_module.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/code_modules.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/exploitability.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/fast_source_line_resolver.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/memory_region.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/minidump.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/minidump_processor.h \ -@DISABLE_PROCESSOR_FALSE@ src/google-breakpad/processor/network_source_line_resolver.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/process_state.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/source_line_resolver_base.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/source_line_resolver_interface.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/stack_frame.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/stack_frame_cpu.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/stackwalker.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/symbol_supplier.h \ -@DISABLE_PROCESSOR_FALSE@ src/google_breakpad/processor/system_info.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/address_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/address_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_module.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver_types.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/contained_range_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/contained_range_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver_types.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/linked_ptr.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/map_serializers-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/map_serializers.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_comparer.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_comparer.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_factory.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_serializer.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_serializer.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_interface.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/postfix_evaluator-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/postfix_evaluator.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/range_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/range_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/scoped_ptr.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_serializer-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_serializer.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/windows_frame_info.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base_types.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_address_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_address_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_contained_range_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_contained_range_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map_iterator-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map_iterator.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_range_map-inl.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_range_map.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.h - -@DISABLE_PROCESSOR_FALSE@src_libbreakpad_a_LIBADD = src/third_party/libdisasm/libdisasm.a -@DISABLE_PROCESSOR_FALSE@src_third_party_libdisasm_libdisasm_a_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_implicit.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_implicit.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_insn.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_insn.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_invariant.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_invariant.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_modrm.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_modrm.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_opcode_tables.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_opcode_tables.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_operand.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_operand.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_reg.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_reg.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_settings.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/ia32_settings.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdis.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/qword.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_disasm.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_format.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_imm.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_imm.h \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_insn.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_misc.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_operand_list.c \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/x86_operand_list.h - -@DISABLE_PROCESSOR_FALSE@check_SCRIPTS = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_dump_test \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_stackwalk_test \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_stackwalk_machine_readable_test - -TESTS = $(check_PROGRAMS) $(check_SCRIPTS) -TESTS_ENVIRONMENT = -@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_SOURCES = \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc - -@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CXXFLAGS = $(PTHREAD_CFLAGS) -@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_LDFLAGS = $(PTHREAD_CFLAGS) -@LINUX_HOST_TRUE@src_client_linux_linux_dumper_unittest_helper_CC = $(PTHREAD_CC) -@LINUX_HOST_TRUE@src_client_linux_linux_client_unittest_SOURCES = \ -@LINUX_HOST_TRUE@ src/client/linux/handler/exception_handler_unittest.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/directory_reader_unittest.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/line_reader_unittest.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper_unittest.cc \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/minidump_writer_unittest.cc \ -@LINUX_HOST_TRUE@ src/common/memory_unittest.cc \ -@LINUX_HOST_TRUE@ src/testing/gtest/src/gtest-all.cc \ -@LINUX_HOST_TRUE@ src/testing/gtest/src/gtest_main.cc \ -@LINUX_HOST_TRUE@ src/testing/src/gmock-all.cc \ -@LINUX_HOST_TRUE@ src/processor/basic_code_modules.cc \ -@LINUX_HOST_TRUE@ src/processor/logging.cc \ -@LINUX_HOST_TRUE@ src/processor/minidump.cc \ -@LINUX_HOST_TRUE@ src/processor/pathname_stripper.cc - -@LINUX_HOST_TRUE@src_client_linux_linux_client_unittest_CPPFLAGS = \ -@LINUX_HOST_TRUE@ -I$(top_srcdir)/src \ -@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/include \ -@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/gtest/include \ -@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/gtest \ -@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing - -@LINUX_HOST_TRUE@src_client_linux_linux_client_unittest_LDADD = \ -@LINUX_HOST_TRUE@ src/client/linux/handler/exception_handler.o \ -@LINUX_HOST_TRUE@ src/client/linux/crash_generation/crash_generation_client.o \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/linux_dumper.o \ -@LINUX_HOST_TRUE@ src/client/linux/minidump_writer/minidump_writer.o \ -@LINUX_HOST_TRUE@ src/client/minidump_file_writer.o \ -@LINUX_HOST_TRUE@ src/common/convert_UTF.o \ -@LINUX_HOST_TRUE@ src/common/md5.o \ -@LINUX_HOST_TRUE@ src/common/linux/file_id.o \ -@LINUX_HOST_TRUE@ src/common/linux/guid_creator.o \ -@LINUX_HOST_TRUE@ src/common/string_conversion.o - -@LINUX_HOST_TRUE@src_client_linux_linux_client_unittest_DEPENDENCIES = src/client/linux/linux_dumper_unittest_helper src/client/linux/libbreakpad_client.a src/libbreakpad.a -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_dump_syms_dump_syms_SOURCES = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cfi_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cu_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_line_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/language.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_reader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/bytereader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2diehandler.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2reader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/dump_symbols.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/file_id.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/dump_syms/dump_syms.cc - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_md2core_minidump_2_core_SOURCES = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/md2core/minidump-2-core.cc - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_symupload_minidump_upload_SOURCES = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/http_upload.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/minidump_upload.cc - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_symupload_minidump_upload_LDFLAGS = -ldl -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_symupload_sym_upload_SOURCES = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/http_upload.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/tools/linux/symupload/sym_upload.cc - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_tools_linux_symupload_sym_upload_LDFLAGS = -ldl -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_common_dumper_unittest_SOURCES = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/byte_cursor_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cfi_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cfi_to_module_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cu_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_cu_to_module_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_line_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf_line_to_module_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/language.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/module_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_reader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_reader_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_to_module.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/stabs_to_module_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/test_assembler.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/bytereader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/bytereader_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/cfi_assembler.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2diehandler.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2diehandler_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2reader.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/dwarf/dwarf2reader_cfi_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/dump_symbols.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/file_id.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/common/linux/file_id_unittest.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ src/testing/src/gmock-all.cc - -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@src_common_dumper_unittest_CPPFLAGS = \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ -I$(top_srcdir)/src \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_TOOLS_FALSE@@LINUX_HOST_TRUE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_address_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/address_map_unittest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_address_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_binarystream_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_binarystream_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_binarystream_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o - -@DISABLE_PROCESSOR_FALSE@src_processor_basic_source_line_resolver_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_basic_source_line_resolver_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_basic_source_line_resolver_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o - -@DISABLE_PROCESSOR_FALSE@src_processor_cfi_frame_info_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_cfi_frame_info_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_cfi_frame_info_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_contained_range_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/contained_range_map_unittest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_contained_range_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_exploitability_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_exploitability_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_exploitability_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a - -@DISABLE_PROCESSOR_FALSE@src_processor_disassembler_x86_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_disassembler_x86_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_disassembler_x86_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a - -@DISABLE_PROCESSOR_FALSE@src_processor_fast_source_line_resolver_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_fast_source_line_resolver_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_fast_source_line_resolver_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/fast_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_comparer.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/module_serializer.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o - -@DISABLE_PROCESSOR_FALSE@src_processor_map_serializers_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/map_serializers_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_map_serializers_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_map_serializers_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_processor_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_processor_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_processor_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_server_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver_server_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_server_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_resolver_server_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_server_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_server_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_network_source_line_server_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o - -@DISABLE_PROCESSOR_FALSE@src_processor_static_address_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_address_map_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_static_address_map_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_static_address_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_static_contained_range_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_contained_range_map_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_static_contained_range_map_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_static_contained_range_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_static_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_map_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_static_map_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_static_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_static_range_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/static_range_map_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_static_range_map_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_static_range_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_pathname_stripper_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper_unittest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_pathname_stripper_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_postfix_evaluator_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/postfix_evaluator_unittest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_postfix_evaluator_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_range_map_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/range_map_unittest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_range_map_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_selftest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_selftest.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_selftest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_amd64_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_amd64_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_amd64_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_arm_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_arm_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_arm_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_x86_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_x86_unittest_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/libbreakpad.a - -@DISABLE_PROCESSOR_FALSE@src_processor_stackwalker_x86_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_processor_synth_minidump_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.h \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump.cc \ -@DISABLE_PROCESSOR_FALSE@ src/processor/synth_minidump.h - -@DISABLE_PROCESSOR_FALSE@src_processor_synth_minidump_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@src_common_test_assembler_unittest_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.cc \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler.h \ -@DISABLE_PROCESSOR_FALSE@ src/common/test_assembler_unittest.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest-all.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/gtest/src/gtest_main.cc \ -@DISABLE_PROCESSOR_FALSE@ src/testing/src/gmock-all.cc - -@DISABLE_PROCESSOR_FALSE@src_common_test_assembler_unittest_CPPFLAGS = \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest/include \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing/gtest \ -@DISABLE_PROCESSOR_FALSE@ -I$(top_srcdir)/src/testing - -@DISABLE_PROCESSOR_FALSE@noinst_SCRIPTS = $(check_SCRIPTS) -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_dump_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_dump.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_dump_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_stackwalk_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_stackwalk.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_minidump_stackwalk_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/call_stack.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/disassembler_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/exploitability_win.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/minidump_processor.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/process_state.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_amd64.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_arm.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_ppc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_sparc.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/stackwalker_x86.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o \ -@DISABLE_PROCESSOR_FALSE@ src/third_party/libdisasm/libdisasm.a - -@DISABLE_PROCESSOR_FALSE@src_processor_source_daemon_SOURCES = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_daemon.cc - -@DISABLE_PROCESSOR_FALSE@src_processor_source_daemon_LDADD = \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_code_modules.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/basic_source_line_resolver.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/binarystream.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/cfi_frame_info.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/logging.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/network_source_line_server.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/pathname_stripper.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/simple_symbol_supplier.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/source_line_resolver_base.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/tokenize.o \ -@DISABLE_PROCESSOR_FALSE@ src/processor/udp_network.o - -EXTRA_DIST = \ - $(SCRIPTS) \ - src/processor/stackwalk_selftest_sol.s \ - src/client/linux/handler/Makefile \ - src/client/linux/handler/exception_handler.cc \ - src/client/linux/handler/exception_handler.h \ - src/client/linux/handler/exception_handler_test.cc \ - src/client/linux/handler/linux_thread.cc \ - src/client/linux/handler/linux_thread.h \ - src/client/linux/handler/linux_thread_test.cc \ - src/client/linux/handler/minidump_generator.cc \ - src/client/linux/handler/minidump_generator.h \ - src/client/linux/handler/minidump_test.cc \ - src/client/mac/handler/dynamic_images.cc \ - src/client/mac/handler/dynamic_images.h \ - src/client/mac/handler/exception_handler.cc \ - src/client/mac/handler/exception_handler.h \ - src/client/mac/handler/exception_handler_test.cc \ - src/client/mac/handler/minidump_generator.cc \ - src/client/mac/handler/minidump_generator.h \ - src/client/mac/handler/minidump_generator_test.cc \ - src/client/mac/handler/minidump_test.xcodeproj/project.pbxproj \ - src/client/mac/handler/protected_memory_allocator.cc \ - src/client/mac/handler/protected_memory_allocator.h \ - src/client/minidump_file_writer-inl.h \ - src/client/minidump_file_writer.cc \ - src/client/minidump_file_writer.h \ - src/client/minidump_file_writer_unittest.cc \ - src/client/solaris/handler/Makefile \ - src/client/solaris/handler/exception_handler.cc \ - src/client/solaris/handler/exception_handler.h \ - src/client/solaris/handler/exception_handler_test.cc \ - src/client/solaris/handler/minidump_generator.cc \ - src/client/solaris/handler/minidump_generator.h \ - src/client/solaris/handler/minidump_test.cc \ - src/client/solaris/handler/solaris_lwp.cc \ - src/client/solaris/handler/solaris_lwp.h \ - src/client/windows/breakpad_client.sln \ - src/client/windows/handler/exception_handler.cc \ - src/client/windows/handler/exception_handler.h \ - src/client/windows/handler/exception_handler.vcproj \ - src/client/windows/sender/crash_report_sender.cc \ - src/client/windows/sender/crash_report_sender.h \ - src/client/windows/sender/crash_report_sender.vcproj \ - src/common/convert_UTF.c \ - src/common/convert_UTF.h \ - src/common/linux/dump_symbols.cc \ - src/common/linux/dump_symbols.h \ - src/common/linux/file_id.cc \ - src/common/linux/file_id.h \ - src/common/linux/guid_creator.cc \ - src/common/linux/guid_creator.h \ - src/common/linux/http_upload.cc \ - src/common/linux/http_upload.h \ - src/common/mac/HTTPMultipartUpload.h \ - src/common/mac/HTTPMultipartUpload.m \ - src/common/mac/dump_syms.h \ - src/common/mac/dump_syms.mm \ - src/common/mac/file_id.cc \ - src/common/mac/file_id.h \ - src/common/mac/macho_id.cc \ - src/common/mac/macho_id.h \ - src/common/mac/macho_utilities.cc \ - src/common/mac/macho_utilities.h \ - src/common/mac/macho_walker.cc \ - src/common/mac/macho_walker.h \ - src/common/mac/string_utilities.cc \ - src/common/mac/string_utilities.h \ - src/common/md5.c \ - src/common/md5.h \ - src/common/solaris/dump_symbols.cc \ - src/common/solaris/dump_symbols.h \ - src/common/solaris/file_id.cc \ - src/common/solaris/file_id.h \ - src/common/solaris/guid_creator.cc \ - src/common/solaris/guid_creator.h \ - src/common/solaris/message_output.h \ - src/common/string_conversion.cc \ - src/common/string_conversion.h \ - src/common/windows/guid_string.cc \ - src/common/windows/guid_string.h \ - src/common/windows/http_upload.cc \ - src/common/windows/http_upload.h \ - src/common/windows/pdb_source_line_writer.cc \ - src/common/windows/pdb_source_line_writer.h \ - src/common/windows/string_utils-inl.h \ - src/common/windows/string_utils.cc \ - src/processor/testdata/minidump2.dmp \ - src/processor/testdata/minidump2.dump.out \ - src/processor/testdata/minidump2.stackwalk.machine_readable.out \ - src/processor/testdata/minidump2.stackwalk.out \ - src/processor/testdata/module1.out \ - src/processor/testdata/module2.out \ - src/processor/testdata/module3_bad.out \ - src/processor/testdata/module4_bad.out \ - src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym \ - src/processor/testdata/symbols/test_app.pdb/5A9832E5287241C1838ED98914E9B7FF1/test_app.sym \ - src/processor/testdata/test_app.cc \ - src/tools/linux/dump_syms/Makefile \ - src/tools/linux/dump_syms/dump_syms.cc \ - src/tools/linux/symupload/Makefile \ - src/tools/linux/symupload/minidump_upload.cc \ - src/tools/linux/symupload/sym_upload.cc \ - src/tools/mac/crash_report/crash_report.mm \ - src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj \ - src/tools/mac/crash_report/on_demand_symbol_supplier.h \ - src/tools/mac/crash_report/on_demand_symbol_supplier.mm \ - src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj \ - src/tools/mac/dump_syms/dump_syms_tool.m \ - src/tools/mac/symupload/minidump_upload.m \ - src/tools/mac/symupload/symupload.m \ - src/tools/mac/symupload/symupload.xcodeproj/project.pbxproj \ - src/tools/solaris/dump_syms/Makefile \ - src/tools/solaris/dump_syms/dump_syms.cc \ - src/tools/solaris/dump_syms/run_regtest.sh \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs \ - src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym \ - src/tools/windows/converter/ms_symbol_server_converter.cc \ - src/tools/windows/converter/ms_symbol_server_converter.h \ - src/tools/windows/converter/ms_symbol_server_converter.vcproj \ - src/tools/windows/dump_syms/dump_syms.cc \ - src/tools/windows/dump_syms/dump_syms.vcproj \ - src/tools/windows/dump_syms/run_regtest.sh \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.pdb \ - src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym \ - src/tools/windows/symupload/symupload.cc \ - src/tools/windows/symupload/symupload.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -src/config.h: src/stamp-h1 - @if test ! -f $@; then \ - rm -f src/stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1; \ - else :; fi - -src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status - @rm -f src/stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status src/config.h -$(top_srcdir)/src/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f src/stamp-h1 - touch $@ - -distclean-hdr: - -rm -f src/config.h src/stamp-h1 -install-libLIBRARIES: $(lib_LIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } - @$(POST_INSTALL) - @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - if test -f $$p; then \ - $(am__strip_dir) \ - echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ - ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ - else :; fi; \ - done - -uninstall-libLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \ - cd "$(DESTDIR)$(libdir)" && rm -f $$files - -clean-libLIBRARIES: - -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -src/client/linux/crash_generation/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/crash_generation - @: > src/client/linux/crash_generation/$(am__dirstamp) -src/client/linux/crash_generation/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/crash_generation/$(DEPDIR) - @: > src/client/linux/crash_generation/$(DEPDIR)/$(am__dirstamp) -src/client/linux/crash_generation/crash_generation_client.$(OBJEXT): \ - src/client/linux/crash_generation/$(am__dirstamp) \ - src/client/linux/crash_generation/$(DEPDIR)/$(am__dirstamp) -src/client/linux/handler/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/handler - @: > src/client/linux/handler/$(am__dirstamp) -src/client/linux/handler/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/handler/$(DEPDIR) - @: > src/client/linux/handler/$(DEPDIR)/$(am__dirstamp) -src/client/linux/handler/exception_handler.$(OBJEXT): \ - src/client/linux/handler/$(am__dirstamp) \ - src/client/linux/handler/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/minidump_writer - @: > src/client/linux/minidump_writer/$(am__dirstamp) -src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/client/linux/minidump_writer/$(DEPDIR) - @: > src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/linux_dumper.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/minidump_writer.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/$(am__dirstamp): - @$(MKDIR_P) src/client - @: > src/client/$(am__dirstamp) -src/client/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/client/$(DEPDIR) - @: > src/client/$(DEPDIR)/$(am__dirstamp) -src/client/minidump_file_writer.$(OBJEXT): src/client/$(am__dirstamp) \ - src/client/$(DEPDIR)/$(am__dirstamp) -src/common/$(am__dirstamp): - @$(MKDIR_P) src/common - @: > src/common/$(am__dirstamp) -src/common/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/common/$(DEPDIR) - @: > src/common/$(DEPDIR)/$(am__dirstamp) -src/common/convert_UTF.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/md5.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/string_conversion.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/linux/$(am__dirstamp): - @$(MKDIR_P) src/common/linux - @: > src/common/linux/$(am__dirstamp) -src/common/linux/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/common/linux/$(DEPDIR) - @: > src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/common/linux/file_id.$(OBJEXT): src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/common/linux/guid_creator.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/client/linux/$(am__dirstamp): - @$(MKDIR_P) src/client/linux - @: > src/client/linux/$(am__dirstamp) -src/client/linux/libbreakpad_client.a: $(src_client_linux_libbreakpad_client_a_OBJECTS) $(src_client_linux_libbreakpad_client_a_DEPENDENCIES) src/client/linux/$(am__dirstamp) - -rm -f src/client/linux/libbreakpad_client.a - $(src_client_linux_libbreakpad_client_a_AR) src/client/linux/libbreakpad_client.a $(src_client_linux_libbreakpad_client_a_OBJECTS) $(src_client_linux_libbreakpad_client_a_LIBADD) - $(RANLIB) src/client/linux/libbreakpad_client.a -src/processor/$(am__dirstamp): - @$(MKDIR_P) src/processor - @: > src/processor/$(am__dirstamp) -src/processor/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/processor/$(DEPDIR) - @: > src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/basic_code_modules.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/basic_source_line_resolver.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/binarystream.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/call_stack.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/cfi_frame_info.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/disassembler_x86.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/exploitability.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/exploitability_win.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/fast_source_line_resolver.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/logging.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump_processor.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/module_comparer.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/module_serializer.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/network_source_line_resolver.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/network_source_line_server.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/pathname_stripper.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/process_state.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/simple_symbol_supplier.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/source_line_resolver_base.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_amd64.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_arm.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_ppc.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_sparc.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_x86.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/tokenize.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/udp_network.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/$(am__dirstamp): - @$(MKDIR_P) src - @: > src/$(am__dirstamp) -src/libbreakpad.a: $(src_libbreakpad_a_OBJECTS) $(src_libbreakpad_a_DEPENDENCIES) src/$(am__dirstamp) - -rm -f src/libbreakpad.a - $(src_libbreakpad_a_AR) src/libbreakpad.a $(src_libbreakpad_a_OBJECTS) $(src_libbreakpad_a_LIBADD) - $(RANLIB) src/libbreakpad.a -src/third_party/libdisasm/$(am__dirstamp): - @$(MKDIR_P) src/third_party/libdisasm - @: > src/third_party/libdisasm/$(am__dirstamp) -src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/third_party/libdisasm/$(DEPDIR) - @: > src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_implicit.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_insn.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_invariant.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_modrm.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_opcode_tables.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_operand.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_reg.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/ia32_settings.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_disasm.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_format.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_imm.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_insn.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_misc.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/x86_operand_list.$(OBJEXT): \ - src/third_party/libdisasm/$(am__dirstamp) \ - src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) -src/third_party/libdisasm/libdisasm.a: $(src_third_party_libdisasm_libdisasm_a_OBJECTS) $(src_third_party_libdisasm_libdisasm_a_DEPENDENCIES) src/third_party/libdisasm/$(am__dirstamp) - -rm -f src/third_party/libdisasm/libdisasm.a - $(src_third_party_libdisasm_libdisasm_a_AR) src/third_party/libdisasm/libdisasm.a $(src_third_party_libdisasm_libdisasm_a_OBJECTS) $(src_third_party_libdisasm_libdisasm_a_LIBADD) - $(RANLIB) src/third_party/libdisasm/libdisasm.a -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - -clean-checkPROGRAMS: - -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) -src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.$(OBJEXT): \ - src/client/linux/handler/$(am__dirstamp) \ - src/client/linux/handler/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/common/src_client_linux_linux_client_unittest-memory_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/$(am__dirstamp): - @$(MKDIR_P) src/testing/gtest/src - @: > src/testing/gtest/src/$(am__dirstamp) -src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/testing/gtest/src/$(DEPDIR) - @: > src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/$(am__dirstamp): - @$(MKDIR_P) src/testing/src - @: > src/testing/src/$(am__dirstamp) -src/testing/src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/testing/src/$(DEPDIR) - @: > src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_client_linux_linux_client_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/src_client_linux_linux_client_unittest-basic_code_modules.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/src_client_linux_linux_client_unittest-logging.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/src_client_linux_linux_client_unittest-minidump.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/src_client_linux_linux_client_unittest-pathname_stripper.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/client/linux/linux_client_unittest$(EXEEXT): $(src_client_linux_linux_client_unittest_OBJECTS) $(src_client_linux_linux_client_unittest_DEPENDENCIES) src/client/linux/$(am__dirstamp) - @rm -f src/client/linux/linux_client_unittest$(EXEEXT) - $(CXXLINK) $(src_client_linux_linux_client_unittest_OBJECTS) $(src_client_linux_linux_client_unittest_LDADD) $(LIBS) -src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.$(OBJEXT): \ - src/client/linux/minidump_writer/$(am__dirstamp) \ - src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) -src/client/linux/linux_dumper_unittest_helper$(EXEEXT): $(src_client_linux_linux_dumper_unittest_helper_OBJECTS) $(src_client_linux_linux_dumper_unittest_helper_DEPENDENCIES) src/client/linux/$(am__dirstamp) - @rm -f src/client/linux/linux_dumper_unittest_helper$(EXEEXT) - $(src_client_linux_linux_dumper_unittest_helper_LINK) $(src_client_linux_linux_dumper_unittest_helper_OBJECTS) $(src_client_linux_linux_dumper_unittest_helper_LDADD) $(LIBS) -src/common/src_common_dumper_unittest-byte_cursor_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_cfi_to_module.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_cu_to_module.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_line_to_module.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-language.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-module.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-module_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-stabs_reader.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-stabs_reader_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-stabs_to_module.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-stabs_to_module_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_dumper_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/$(am__dirstamp): - @$(MKDIR_P) src/common/dwarf - @: > src/common/dwarf/$(am__dirstamp) -src/common/dwarf/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/common/dwarf/$(DEPDIR) - @: > src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-bytereader.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-cfi_assembler.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-dwarf2reader.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/linux/src_common_dumper_unittest-dump_symbols.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/common/linux/src_common_dumper_unittest-file_id.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/common/linux/src_common_dumper_unittest-file_id_unittest.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_common_dumper_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_common_dumper_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_common_dumper_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/common/dumper_unittest$(EXEEXT): $(src_common_dumper_unittest_OBJECTS) $(src_common_dumper_unittest_DEPENDENCIES) src/common/$(am__dirstamp) - @rm -f src/common/dumper_unittest$(EXEEXT) - $(CXXLINK) $(src_common_dumper_unittest_OBJECTS) $(src_common_dumper_unittest_LDADD) $(LIBS) -src/common/src_common_test_assembler_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/src_common_test_assembler_unittest-test_assembler_unittest.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_common_test_assembler_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/common/test_assembler_unittest$(EXEEXT): $(src_common_test_assembler_unittest_OBJECTS) $(src_common_test_assembler_unittest_DEPENDENCIES) src/common/$(am__dirstamp) - @rm -f src/common/test_assembler_unittest$(EXEEXT) - $(CXXLINK) $(src_common_test_assembler_unittest_OBJECTS) $(src_common_test_assembler_unittest_LDADD) $(LIBS) -src/processor/address_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/address_map_unittest$(EXEEXT): $(src_processor_address_map_unittest_OBJECTS) $(src_processor_address_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/address_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_address_map_unittest_OBJECTS) $(src_processor_address_map_unittest_LDADD) $(LIBS) -src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/basic_source_line_resolver_unittest$(EXEEXT): $(src_processor_basic_source_line_resolver_unittest_OBJECTS) $(src_processor_basic_source_line_resolver_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/basic_source_line_resolver_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_basic_source_line_resolver_unittest_OBJECTS) $(src_processor_basic_source_line_resolver_unittest_LDADD) $(LIBS) -src/processor/src_processor_binarystream_unittest-binarystream_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_binarystream_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/binarystream_unittest$(EXEEXT): $(src_processor_binarystream_unittest_OBJECTS) $(src_processor_binarystream_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/binarystream_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_binarystream_unittest_OBJECTS) $(src_processor_binarystream_unittest_LDADD) $(LIBS) -src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/cfi_frame_info_unittest$(EXEEXT): $(src_processor_cfi_frame_info_unittest_OBJECTS) $(src_processor_cfi_frame_info_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/cfi_frame_info_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_cfi_frame_info_unittest_OBJECTS) $(src_processor_cfi_frame_info_unittest_LDADD) $(LIBS) -src/processor/contained_range_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/contained_range_map_unittest$(EXEEXT): $(src_processor_contained_range_map_unittest_OBJECTS) $(src_processor_contained_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/contained_range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_contained_range_map_unittest_OBJECTS) $(src_processor_contained_range_map_unittest_LDADD) $(LIBS) -src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/disassembler_x86_unittest$(EXEEXT): $(src_processor_disassembler_x86_unittest_OBJECTS) $(src_processor_disassembler_x86_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/disassembler_x86_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_disassembler_x86_unittest_OBJECTS) $(src_processor_disassembler_x86_unittest_LDADD) $(LIBS) -src/processor/src_processor_exploitability_unittest-exploitability_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_exploitability_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/exploitability_unittest$(EXEEXT): $(src_processor_exploitability_unittest_OBJECTS) $(src_processor_exploitability_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/exploitability_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_exploitability_unittest_OBJECTS) $(src_processor_exploitability_unittest_LDADD) $(LIBS) -src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/fast_source_line_resolver_unittest$(EXEEXT): $(src_processor_fast_source_line_resolver_unittest_OBJECTS) $(src_processor_fast_source_line_resolver_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/fast_source_line_resolver_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_fast_source_line_resolver_unittest_OBJECTS) $(src_processor_fast_source_line_resolver_unittest_LDADD) $(LIBS) -src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_map_serializers_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/map_serializers_unittest$(EXEEXT): $(src_processor_map_serializers_unittest_OBJECTS) $(src_processor_map_serializers_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/map_serializers_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_map_serializers_unittest_OBJECTS) $(src_processor_map_serializers_unittest_LDADD) $(LIBS) -src/processor/minidump_dump.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump_dump$(EXEEXT): $(src_processor_minidump_dump_OBJECTS) $(src_processor_minidump_dump_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/minidump_dump$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_dump_OBJECTS) $(src_processor_minidump_dump_LDADD) $(LIBS) -src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_minidump_processor_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump_processor_unittest$(EXEEXT): $(src_processor_minidump_processor_unittest_OBJECTS) $(src_processor_minidump_processor_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/minidump_processor_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_processor_unittest_OBJECTS) $(src_processor_minidump_processor_unittest_LDADD) $(LIBS) -src/processor/minidump_stackwalk.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump_stackwalk$(EXEEXT): $(src_processor_minidump_stackwalk_OBJECTS) $(src_processor_minidump_stackwalk_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/minidump_stackwalk$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_stackwalk_OBJECTS) $(src_processor_minidump_stackwalk_LDADD) $(LIBS) -src/common/src_processor_minidump_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_minidump_unittest-minidump_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_minidump_unittest-synth_minidump.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_minidump_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/minidump_unittest$(EXEEXT): $(src_processor_minidump_unittest_OBJECTS) $(src_processor_minidump_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/minidump_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_unittest_OBJECTS) $(src_processor_minidump_unittest_LDADD) $(LIBS) -src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/network_source_line_resolver_server_unittest$(EXEEXT): $(src_processor_network_source_line_resolver_server_unittest_OBJECTS) $(src_processor_network_source_line_resolver_server_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/network_source_line_resolver_server_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_network_source_line_resolver_server_unittest_OBJECTS) $(src_processor_network_source_line_resolver_server_unittest_LDADD) $(LIBS) -src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/network_source_line_resolver_unittest$(EXEEXT): $(src_processor_network_source_line_resolver_unittest_OBJECTS) $(src_processor_network_source_line_resolver_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/network_source_line_resolver_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_network_source_line_resolver_unittest_OBJECTS) $(src_processor_network_source_line_resolver_unittest_LDADD) $(LIBS) -src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/network_source_line_server_unittest$(EXEEXT): $(src_processor_network_source_line_server_unittest_OBJECTS) $(src_processor_network_source_line_server_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/network_source_line_server_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_network_source_line_server_unittest_OBJECTS) $(src_processor_network_source_line_server_unittest_LDADD) $(LIBS) -src/processor/pathname_stripper_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/pathname_stripper_unittest$(EXEEXT): $(src_processor_pathname_stripper_unittest_OBJECTS) $(src_processor_pathname_stripper_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/pathname_stripper_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_pathname_stripper_unittest_OBJECTS) $(src_processor_pathname_stripper_unittest_LDADD) $(LIBS) -src/processor/postfix_evaluator_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/postfix_evaluator_unittest$(EXEEXT): $(src_processor_postfix_evaluator_unittest_OBJECTS) $(src_processor_postfix_evaluator_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/postfix_evaluator_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_postfix_evaluator_unittest_OBJECTS) $(src_processor_postfix_evaluator_unittest_LDADD) $(LIBS) -src/processor/range_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/range_map_unittest$(EXEEXT): $(src_processor_range_map_unittest_OBJECTS) $(src_processor_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_range_map_unittest_OBJECTS) $(src_processor_range_map_unittest_LDADD) $(LIBS) -src/processor/source_daemon.$(OBJEXT): src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/source_daemon$(EXEEXT): $(src_processor_source_daemon_OBJECTS) $(src_processor_source_daemon_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/source_daemon$(EXEEXT) - $(CXXLINK) $(src_processor_source_daemon_OBJECTS) $(src_processor_source_daemon_LDADD) $(LIBS) -src/common/src_processor_stackwalker_amd64_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_amd64_unittest$(EXEEXT): $(src_processor_stackwalker_amd64_unittest_OBJECTS) $(src_processor_stackwalker_amd64_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/stackwalker_amd64_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_stackwalker_amd64_unittest_OBJECTS) $(src_processor_stackwalker_amd64_unittest_LDADD) $(LIBS) -src/common/src_processor_stackwalker_arm_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_arm_unittest$(EXEEXT): $(src_processor_stackwalker_arm_unittest_OBJECTS) $(src_processor_stackwalker_arm_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/stackwalker_arm_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_stackwalker_arm_unittest_OBJECTS) $(src_processor_stackwalker_arm_unittest_LDADD) $(LIBS) -src/processor/stackwalker_selftest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_selftest$(EXEEXT): $(src_processor_stackwalker_selftest_OBJECTS) $(src_processor_stackwalker_selftest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/stackwalker_selftest$(EXEEXT) - $(CXXLINK) $(src_processor_stackwalker_selftest_OBJECTS) $(src_processor_stackwalker_selftest_LDADD) $(LIBS) -src/common/src_processor_stackwalker_x86_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/stackwalker_x86_unittest$(EXEEXT): $(src_processor_stackwalker_x86_unittest_OBJECTS) $(src_processor_stackwalker_x86_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/stackwalker_x86_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_stackwalker_x86_unittest_OBJECTS) $(src_processor_stackwalker_x86_unittest_LDADD) $(LIBS) -src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_static_address_map_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/static_address_map_unittest$(EXEEXT): $(src_processor_static_address_map_unittest_OBJECTS) $(src_processor_static_address_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/static_address_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_static_address_map_unittest_OBJECTS) $(src_processor_static_address_map_unittest_LDADD) $(LIBS) -src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/static_contained_range_map_unittest$(EXEEXT): $(src_processor_static_contained_range_map_unittest_OBJECTS) $(src_processor_static_contained_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/static_contained_range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_static_contained_range_map_unittest_OBJECTS) $(src_processor_static_contained_range_map_unittest_LDADD) $(LIBS) -src/processor/src_processor_static_map_unittest-static_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_static_map_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/static_map_unittest$(EXEEXT): $(src_processor_static_map_unittest_OBJECTS) $(src_processor_static_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/static_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_static_map_unittest_OBJECTS) $(src_processor_static_map_unittest_LDADD) $(LIBS) -src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_static_range_map_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/static_range_map_unittest$(EXEEXT): $(src_processor_static_range_map_unittest_OBJECTS) $(src_processor_static_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/static_range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_static_range_map_unittest_OBJECTS) $(src_processor_static_range_map_unittest_LDADD) $(LIBS) -src/common/src_processor_synth_minidump_unittest-test_assembler.$(OBJEXT): \ - src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.$(OBJEXT): \ - src/testing/gtest/src/$(am__dirstamp) \ - src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) -src/testing/src/src_processor_synth_minidump_unittest-gmock-all.$(OBJEXT): \ - src/testing/src/$(am__dirstamp) \ - src/testing/src/$(DEPDIR)/$(am__dirstamp) -src/processor/src_processor_synth_minidump_unittest-synth_minidump.$(OBJEXT): \ - src/processor/$(am__dirstamp) \ - src/processor/$(DEPDIR)/$(am__dirstamp) -src/processor/synth_minidump_unittest$(EXEEXT): $(src_processor_synth_minidump_unittest_OBJECTS) $(src_processor_synth_minidump_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) - @rm -f src/processor/synth_minidump_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_synth_minidump_unittest_OBJECTS) $(src_processor_synth_minidump_unittest_LDADD) $(LIBS) -src/common/dwarf_cfi_to_module.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf_cu_to_module.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf_line_to_module.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/language.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/module.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/stabs_reader.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/stabs_to_module.$(OBJEXT): src/common/$(am__dirstamp) \ - src/common/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/bytereader.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/dwarf2diehandler.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/dwarf/dwarf2reader.$(OBJEXT): \ - src/common/dwarf/$(am__dirstamp) \ - src/common/dwarf/$(DEPDIR)/$(am__dirstamp) -src/common/linux/dump_symbols.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/dump_syms/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/dump_syms - @: > src/tools/linux/dump_syms/$(am__dirstamp) -src/tools/linux/dump_syms/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/dump_syms/$(DEPDIR) - @: > src/tools/linux/dump_syms/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/dump_syms/dump_syms.$(OBJEXT): \ - src/tools/linux/dump_syms/$(am__dirstamp) \ - src/tools/linux/dump_syms/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/dump_syms/dump_syms$(EXEEXT): $(src_tools_linux_dump_syms_dump_syms_OBJECTS) $(src_tools_linux_dump_syms_dump_syms_DEPENDENCIES) src/tools/linux/dump_syms/$(am__dirstamp) - @rm -f src/tools/linux/dump_syms/dump_syms$(EXEEXT) - $(CXXLINK) $(src_tools_linux_dump_syms_dump_syms_OBJECTS) $(src_tools_linux_dump_syms_dump_syms_LDADD) $(LIBS) -src/tools/linux/md2core/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/md2core - @: > src/tools/linux/md2core/$(am__dirstamp) -src/tools/linux/md2core/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/md2core/$(DEPDIR) - @: > src/tools/linux/md2core/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/md2core/minidump-2-core.$(OBJEXT): \ - src/tools/linux/md2core/$(am__dirstamp) \ - src/tools/linux/md2core/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/md2core/minidump-2-core$(EXEEXT): $(src_tools_linux_md2core_minidump_2_core_OBJECTS) $(src_tools_linux_md2core_minidump_2_core_DEPENDENCIES) src/tools/linux/md2core/$(am__dirstamp) - @rm -f src/tools/linux/md2core/minidump-2-core$(EXEEXT) - $(CXXLINK) $(src_tools_linux_md2core_minidump_2_core_OBJECTS) $(src_tools_linux_md2core_minidump_2_core_LDADD) $(LIBS) -src/common/linux/http_upload.$(OBJEXT): \ - src/common/linux/$(am__dirstamp) \ - src/common/linux/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/symupload/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/symupload - @: > src/tools/linux/symupload/$(am__dirstamp) -src/tools/linux/symupload/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) src/tools/linux/symupload/$(DEPDIR) - @: > src/tools/linux/symupload/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/symupload/minidump_upload.$(OBJEXT): \ - src/tools/linux/symupload/$(am__dirstamp) \ - src/tools/linux/symupload/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/symupload/minidump_upload$(EXEEXT): $(src_tools_linux_symupload_minidump_upload_OBJECTS) $(src_tools_linux_symupload_minidump_upload_DEPENDENCIES) src/tools/linux/symupload/$(am__dirstamp) - @rm -f src/tools/linux/symupload/minidump_upload$(EXEEXT) - $(src_tools_linux_symupload_minidump_upload_LINK) $(src_tools_linux_symupload_minidump_upload_OBJECTS) $(src_tools_linux_symupload_minidump_upload_LDADD) $(LIBS) -src/tools/linux/symupload/sym_upload.$(OBJEXT): \ - src/tools/linux/symupload/$(am__dirstamp) \ - src/tools/linux/symupload/$(DEPDIR)/$(am__dirstamp) -src/tools/linux/symupload/sym_upload$(EXEEXT): $(src_tools_linux_symupload_sym_upload_OBJECTS) $(src_tools_linux_symupload_sym_upload_DEPENDENCIES) src/tools/linux/symupload/$(am__dirstamp) - @rm -f src/tools/linux/symupload/sym_upload$(EXEEXT) - $(src_tools_linux_symupload_sym_upload_LINK) $(src_tools_linux_symupload_sym_upload_OBJECTS) $(src_tools_linux_symupload_sym_upload_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f src/client/linux/crash_generation/crash_generation_client.$(OBJEXT) - -rm -f src/client/linux/handler/exception_handler.$(OBJEXT) - -rm -f src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/linux_dumper.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/minidump_writer.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.$(OBJEXT) - -rm -f src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.$(OBJEXT) - -rm -f src/client/minidump_file_writer.$(OBJEXT) - -rm -f src/common/convert_UTF.$(OBJEXT) - -rm -f src/common/dwarf/bytereader.$(OBJEXT) - -rm -f src/common/dwarf/dwarf2diehandler.$(OBJEXT) - -rm -f src/common/dwarf/dwarf2reader.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-bytereader.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-cfi_assembler.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-dwarf2reader.$(OBJEXT) - -rm -f src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.$(OBJEXT) - -rm -f src/common/dwarf_cfi_to_module.$(OBJEXT) - -rm -f src/common/dwarf_cu_to_module.$(OBJEXT) - -rm -f src/common/dwarf_line_to_module.$(OBJEXT) - -rm -f src/common/language.$(OBJEXT) - -rm -f src/common/linux/dump_symbols.$(OBJEXT) - -rm -f src/common/linux/file_id.$(OBJEXT) - -rm -f src/common/linux/guid_creator.$(OBJEXT) - -rm -f src/common/linux/http_upload.$(OBJEXT) - -rm -f src/common/linux/src_common_dumper_unittest-dump_symbols.$(OBJEXT) - -rm -f src/common/linux/src_common_dumper_unittest-file_id.$(OBJEXT) - -rm -f src/common/linux/src_common_dumper_unittest-file_id_unittest.$(OBJEXT) - -rm -f src/common/md5.$(OBJEXT) - -rm -f src/common/module.$(OBJEXT) - -rm -f src/common/src_client_linux_linux_client_unittest-memory_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-byte_cursor_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_cfi_to_module.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_cu_to_module.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_line_to_module.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-language.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-module.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-module_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-stabs_reader.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-stabs_reader_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-stabs_to_module.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-stabs_to_module_unittest.$(OBJEXT) - -rm -f src/common/src_common_dumper_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_common_test_assembler_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_common_test_assembler_unittest-test_assembler_unittest.$(OBJEXT) - -rm -f src/common/src_processor_minidump_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_processor_stackwalker_amd64_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_processor_stackwalker_arm_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_processor_stackwalker_x86_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/src_processor_synth_minidump_unittest-test_assembler.$(OBJEXT) - -rm -f src/common/stabs_reader.$(OBJEXT) - -rm -f src/common/stabs_to_module.$(OBJEXT) - -rm -f src/common/string_conversion.$(OBJEXT) - -rm -f src/processor/address_map_unittest.$(OBJEXT) - -rm -f src/processor/basic_code_modules.$(OBJEXT) - -rm -f src/processor/basic_source_line_resolver.$(OBJEXT) - -rm -f src/processor/binarystream.$(OBJEXT) - -rm -f src/processor/call_stack.$(OBJEXT) - -rm -f src/processor/cfi_frame_info.$(OBJEXT) - -rm -f src/processor/contained_range_map_unittest.$(OBJEXT) - -rm -f src/processor/disassembler_x86.$(OBJEXT) - -rm -f src/processor/exploitability.$(OBJEXT) - -rm -f src/processor/exploitability_win.$(OBJEXT) - -rm -f src/processor/fast_source_line_resolver.$(OBJEXT) - -rm -f src/processor/logging.$(OBJEXT) - -rm -f src/processor/minidump.$(OBJEXT) - -rm -f src/processor/minidump_dump.$(OBJEXT) - -rm -f src/processor/minidump_processor.$(OBJEXT) - -rm -f src/processor/minidump_stackwalk.$(OBJEXT) - -rm -f src/processor/module_comparer.$(OBJEXT) - -rm -f src/processor/module_serializer.$(OBJEXT) - -rm -f src/processor/network_source_line_resolver.$(OBJEXT) - -rm -f src/processor/network_source_line_server.$(OBJEXT) - -rm -f src/processor/pathname_stripper.$(OBJEXT) - -rm -f src/processor/pathname_stripper_unittest.$(OBJEXT) - -rm -f src/processor/postfix_evaluator_unittest.$(OBJEXT) - -rm -f src/processor/process_state.$(OBJEXT) - -rm -f src/processor/range_map_unittest.$(OBJEXT) - -rm -f src/processor/simple_symbol_supplier.$(OBJEXT) - -rm -f src/processor/source_daemon.$(OBJEXT) - -rm -f src/processor/source_line_resolver_base.$(OBJEXT) - -rm -f src/processor/src_client_linux_linux_client_unittest-basic_code_modules.$(OBJEXT) - -rm -f src/processor/src_client_linux_linux_client_unittest-logging.$(OBJEXT) - -rm -f src/processor/src_client_linux_linux_client_unittest-minidump.$(OBJEXT) - -rm -f src/processor/src_client_linux_linux_client_unittest-pathname_stripper.$(OBJEXT) - -rm -f src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_binarystream_unittest-binarystream_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_exploitability_unittest-exploitability_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_minidump_unittest-minidump_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_minidump_unittest-synth_minidump.$(OBJEXT) - -rm -f src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_static_map_unittest-static_map_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.$(OBJEXT) - -rm -f src/processor/src_processor_synth_minidump_unittest-synth_minidump.$(OBJEXT) - -rm -f src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.$(OBJEXT) - -rm -f src/processor/stackwalker.$(OBJEXT) - -rm -f src/processor/stackwalker_amd64.$(OBJEXT) - -rm -f src/processor/stackwalker_arm.$(OBJEXT) - -rm -f src/processor/stackwalker_ppc.$(OBJEXT) - -rm -f src/processor/stackwalker_selftest.$(OBJEXT) - -rm -f src/processor/stackwalker_sparc.$(OBJEXT) - -rm -f src/processor/stackwalker_x86.$(OBJEXT) - -rm -f src/processor/tokenize.$(OBJEXT) - -rm -f src/processor/udp_network.$(OBJEXT) - -rm -f src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_common_dumper_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_common_dumper_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.$(OBJEXT) - -rm -f src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.$(OBJEXT) - -rm -f src/testing/src/src_client_linux_linux_client_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_common_dumper_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_common_test_assembler_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_binarystream_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_exploitability_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_map_serializers_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_minidump_processor_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_minidump_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_static_address_map_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_static_map_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_static_range_map_unittest-gmock-all.$(OBJEXT) - -rm -f src/testing/src/src_processor_synth_minidump_unittest-gmock-all.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_implicit.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_insn.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_invariant.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_modrm.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_opcode_tables.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_operand.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_reg.$(OBJEXT) - -rm -f src/third_party/libdisasm/ia32_settings.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_disasm.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_format.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_imm.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_insn.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_misc.$(OBJEXT) - -rm -f src/third_party/libdisasm/x86_operand_list.$(OBJEXT) - -rm -f src/tools/linux/dump_syms/dump_syms.$(OBJEXT) - -rm -f src/tools/linux/md2core/minidump-2-core.$(OBJEXT) - -rm -f src/tools/linux/symupload/minidump_upload.$(OBJEXT) - -rm -f src/tools/linux/symupload/sym_upload.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@src/client/$(DEPDIR)/minidump_file_writer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/crash_generation/$(DEPDIR)/crash_generation_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/handler/$(DEPDIR)/exception_handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/linux_dumper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/minidump_writer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/convert_UTF.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/dwarf_cfi_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/dwarf_cu_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/dwarf_line_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/language.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/md5.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-language.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/stabs_reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/stabs_to_module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/$(DEPDIR)/string_conversion.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/bytereader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/dwarf2diehandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/dwarf2reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/dump_symbols.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/file_id.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/guid_creator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/http_upload.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/address_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/basic_code_modules.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/basic_source_line_resolver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/binarystream.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/call_stack.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/cfi_frame_info.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/contained_range_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/disassembler_x86.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/exploitability.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/exploitability_win.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/fast_source_line_resolver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump_dump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump_processor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump_stackwalk.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/module_comparer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/module_serializer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/network_source_line_resolver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/network_source_line_server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/pathname_stripper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/pathname_stripper_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/postfix_evaluator_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/process_state.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/range_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/simple_symbol_supplier.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/source_daemon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/source_line_resolver_base.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_amd64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_arm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_ppc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_selftest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_sparc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_x86.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/tokenize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/udp_network.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_implicit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_insn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_invariant.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_modrm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_opcode_tables.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_operand.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_reg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/ia32_settings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_disasm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_format.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_imm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_insn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_misc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/third_party/libdisasm/$(DEPDIR)/x86_operand_list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/tools/linux/dump_syms/$(DEPDIR)/dump_syms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/tools/linux/md2core/$(DEPDIR)/minidump-2-core.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/tools/linux/symupload/$(DEPDIR)/minidump_upload.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@src/tools/linux/symupload/$(DEPDIR)/sym_upload.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.o: src/client/linux/handler/exception_handler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.o -MD -MP -MF src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Tpo -c -o src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.o `test -f 'src/client/linux/handler/exception_handler_unittest.cc' || echo '$(srcdir)/'`src/client/linux/handler/exception_handler_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Tpo src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/handler/exception_handler_unittest.cc' object='src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.o `test -f 'src/client/linux/handler/exception_handler_unittest.cc' || echo '$(srcdir)/'`src/client/linux/handler/exception_handler_unittest.cc - -src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.obj: src/client/linux/handler/exception_handler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.obj -MD -MP -MF src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Tpo -c -o src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.obj `if test -f 'src/client/linux/handler/exception_handler_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/handler/exception_handler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/handler/exception_handler_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Tpo src/client/linux/handler/$(DEPDIR)/src_client_linux_linux_client_unittest-exception_handler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/handler/exception_handler_unittest.cc' object='src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/handler/src_client_linux_linux_client_unittest-exception_handler_unittest.obj `if test -f 'src/client/linux/handler/exception_handler_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/handler/exception_handler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/handler/exception_handler_unittest.cc'; fi` - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.o: src/client/linux/minidump_writer/directory_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.o -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.o `test -f 'src/client/linux/minidump_writer/directory_reader_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/directory_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/directory_reader_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.o `test -f 'src/client/linux/minidump_writer/directory_reader_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/directory_reader_unittest.cc - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.obj: src/client/linux/minidump_writer/directory_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.obj -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.obj `if test -f 'src/client/linux/minidump_writer/directory_reader_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/directory_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/directory_reader_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-directory_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/directory_reader_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-directory_reader_unittest.obj `if test -f 'src/client/linux/minidump_writer/directory_reader_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/directory_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/directory_reader_unittest.cc'; fi` - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.o: src/client/linux/minidump_writer/line_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.o -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.o `test -f 'src/client/linux/minidump_writer/line_reader_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/line_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/line_reader_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.o `test -f 'src/client/linux/minidump_writer/line_reader_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/line_reader_unittest.cc - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.obj: src/client/linux/minidump_writer/line_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.obj -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.obj `if test -f 'src/client/linux/minidump_writer/line_reader_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/line_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/line_reader_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-line_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/line_reader_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-line_reader_unittest.obj `if test -f 'src/client/linux/minidump_writer/line_reader_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/line_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/line_reader_unittest.cc'; fi` - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.o: src/client/linux/minidump_writer/linux_dumper_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.o -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.o `test -f 'src/client/linux/minidump_writer/linux_dumper_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/linux_dumper_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/linux_dumper_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.o `test -f 'src/client/linux/minidump_writer/linux_dumper_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/linux_dumper_unittest.cc - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.obj: src/client/linux/minidump_writer/linux_dumper_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.obj -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.obj `if test -f 'src/client/linux/minidump_writer/linux_dumper_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/linux_dumper_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/linux_dumper_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-linux_dumper_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/linux_dumper_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-linux_dumper_unittest.obj `if test -f 'src/client/linux/minidump_writer/linux_dumper_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/linux_dumper_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/linux_dumper_unittest.cc'; fi` - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.o: src/client/linux/minidump_writer/minidump_writer_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.o -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.o `test -f 'src/client/linux/minidump_writer/minidump_writer_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/minidump_writer_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/minidump_writer_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.o `test -f 'src/client/linux/minidump_writer/minidump_writer_unittest.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/minidump_writer_unittest.cc - -src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.obj: src/client/linux/minidump_writer/minidump_writer_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.obj -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.obj `if test -f 'src/client/linux/minidump_writer/minidump_writer_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/minidump_writer_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/minidump_writer_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump_writer_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/minidump_writer_unittest.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_client_unittest-minidump_writer_unittest.obj `if test -f 'src/client/linux/minidump_writer/minidump_writer_unittest.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/minidump_writer_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/minidump_writer_unittest.cc'; fi` - -src/common/src_client_linux_linux_client_unittest-memory_unittest.o: src/common/memory_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_client_linux_linux_client_unittest-memory_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Tpo -c -o src/common/src_client_linux_linux_client_unittest-memory_unittest.o `test -f 'src/common/memory_unittest.cc' || echo '$(srcdir)/'`src/common/memory_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Tpo src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/memory_unittest.cc' object='src/common/src_client_linux_linux_client_unittest-memory_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_client_linux_linux_client_unittest-memory_unittest.o `test -f 'src/common/memory_unittest.cc' || echo '$(srcdir)/'`src/common/memory_unittest.cc - -src/common/src_client_linux_linux_client_unittest-memory_unittest.obj: src/common/memory_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_client_linux_linux_client_unittest-memory_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Tpo -c -o src/common/src_client_linux_linux_client_unittest-memory_unittest.obj `if test -f 'src/common/memory_unittest.cc'; then $(CYGPATH_W) 'src/common/memory_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/memory_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Tpo src/common/$(DEPDIR)/src_client_linux_linux_client_unittest-memory_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/memory_unittest.cc' object='src/common/src_client_linux_linux_client_unittest-memory_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_client_linux_linux_client_unittest-memory_unittest.obj `if test -f 'src/common/memory_unittest.cc'; then $(CYGPATH_W) 'src/common/memory_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/memory_unittest.cc'; fi` - -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_client_linux_linux_client_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_client_linux_linux_client_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_client_linux_linux_client_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Tpo -c -o src/testing/src/src_client_linux_linux_client_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_client_linux_linux_client_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_client_linux_linux_client_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_client_linux_linux_client_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_client_linux_linux_client_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Tpo -c -o src/testing/src/src_client_linux_linux_client_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_client_linux_linux_client_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_client_linux_linux_client_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_client_linux_linux_client_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_client_linux_linux_client_unittest-basic_code_modules.o: src/processor/basic_code_modules.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-basic_code_modules.o -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-basic_code_modules.o `test -f 'src/processor/basic_code_modules.cc' || echo '$(srcdir)/'`src/processor/basic_code_modules.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/basic_code_modules.cc' object='src/processor/src_client_linux_linux_client_unittest-basic_code_modules.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-basic_code_modules.o `test -f 'src/processor/basic_code_modules.cc' || echo '$(srcdir)/'`src/processor/basic_code_modules.cc - -src/processor/src_client_linux_linux_client_unittest-basic_code_modules.obj: src/processor/basic_code_modules.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-basic_code_modules.obj -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-basic_code_modules.obj `if test -f 'src/processor/basic_code_modules.cc'; then $(CYGPATH_W) 'src/processor/basic_code_modules.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/basic_code_modules.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-basic_code_modules.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/basic_code_modules.cc' object='src/processor/src_client_linux_linux_client_unittest-basic_code_modules.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-basic_code_modules.obj `if test -f 'src/processor/basic_code_modules.cc'; then $(CYGPATH_W) 'src/processor/basic_code_modules.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/basic_code_modules.cc'; fi` - -src/processor/src_client_linux_linux_client_unittest-logging.o: src/processor/logging.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-logging.o -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-logging.o `test -f 'src/processor/logging.cc' || echo '$(srcdir)/'`src/processor/logging.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/logging.cc' object='src/processor/src_client_linux_linux_client_unittest-logging.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-logging.o `test -f 'src/processor/logging.cc' || echo '$(srcdir)/'`src/processor/logging.cc - -src/processor/src_client_linux_linux_client_unittest-logging.obj: src/processor/logging.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-logging.obj -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-logging.obj `if test -f 'src/processor/logging.cc'; then $(CYGPATH_W) 'src/processor/logging.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/logging.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-logging.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/logging.cc' object='src/processor/src_client_linux_linux_client_unittest-logging.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-logging.obj `if test -f 'src/processor/logging.cc'; then $(CYGPATH_W) 'src/processor/logging.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/logging.cc'; fi` - -src/processor/src_client_linux_linux_client_unittest-minidump.o: src/processor/minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-minidump.o -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-minidump.o `test -f 'src/processor/minidump.cc' || echo '$(srcdir)/'`src/processor/minidump.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump.cc' object='src/processor/src_client_linux_linux_client_unittest-minidump.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-minidump.o `test -f 'src/processor/minidump.cc' || echo '$(srcdir)/'`src/processor/minidump.cc - -src/processor/src_client_linux_linux_client_unittest-minidump.obj: src/processor/minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-minidump.obj -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-minidump.obj `if test -f 'src/processor/minidump.cc'; then $(CYGPATH_W) 'src/processor/minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump.cc' object='src/processor/src_client_linux_linux_client_unittest-minidump.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-minidump.obj `if test -f 'src/processor/minidump.cc'; then $(CYGPATH_W) 'src/processor/minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump.cc'; fi` - -src/processor/src_client_linux_linux_client_unittest-pathname_stripper.o: src/processor/pathname_stripper.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-pathname_stripper.o -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-pathname_stripper.o `test -f 'src/processor/pathname_stripper.cc' || echo '$(srcdir)/'`src/processor/pathname_stripper.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/pathname_stripper.cc' object='src/processor/src_client_linux_linux_client_unittest-pathname_stripper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-pathname_stripper.o `test -f 'src/processor/pathname_stripper.cc' || echo '$(srcdir)/'`src/processor/pathname_stripper.cc - -src/processor/src_client_linux_linux_client_unittest-pathname_stripper.obj: src/processor/pathname_stripper.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_client_linux_linux_client_unittest-pathname_stripper.obj -MD -MP -MF src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Tpo -c -o src/processor/src_client_linux_linux_client_unittest-pathname_stripper.obj `if test -f 'src/processor/pathname_stripper.cc'; then $(CYGPATH_W) 'src/processor/pathname_stripper.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/pathname_stripper.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Tpo src/processor/$(DEPDIR)/src_client_linux_linux_client_unittest-pathname_stripper.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/pathname_stripper.cc' object='src/processor/src_client_linux_linux_client_unittest-pathname_stripper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_client_linux_linux_client_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_client_linux_linux_client_unittest-pathname_stripper.obj `if test -f 'src/processor/pathname_stripper.cc'; then $(CYGPATH_W) 'src/processor/pathname_stripper.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/pathname_stripper.cc'; fi` - -src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o: src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_client_linux_linux_dumper_unittest_helper_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o `test -f 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_client_linux_linux_dumper_unittest_helper_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.o `test -f 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc' || echo '$(srcdir)/'`src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc - -src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.obj: src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_client_linux_linux_dumper_unittest_helper_CXXFLAGS) $(CXXFLAGS) -MT src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.obj -MD -MP -MF src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Tpo -c -o src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.obj `if test -f 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Tpo src/client/linux/minidump_writer/$(DEPDIR)/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc' object='src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_client_linux_linux_dumper_unittest_helper_CXXFLAGS) $(CXXFLAGS) -c -o src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-linux_dumper_unittest_helper.obj `if test -f 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; then $(CYGPATH_W) 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; else $(CYGPATH_W) '$(srcdir)/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc'; fi` - -src/common/src_common_dumper_unittest-byte_cursor_unittest.o: src/common/byte_cursor_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-byte_cursor_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Tpo -c -o src/common/src_common_dumper_unittest-byte_cursor_unittest.o `test -f 'src/common/byte_cursor_unittest.cc' || echo '$(srcdir)/'`src/common/byte_cursor_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/byte_cursor_unittest.cc' object='src/common/src_common_dumper_unittest-byte_cursor_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-byte_cursor_unittest.o `test -f 'src/common/byte_cursor_unittest.cc' || echo '$(srcdir)/'`src/common/byte_cursor_unittest.cc - -src/common/src_common_dumper_unittest-byte_cursor_unittest.obj: src/common/byte_cursor_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-byte_cursor_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Tpo -c -o src/common/src_common_dumper_unittest-byte_cursor_unittest.obj `if test -f 'src/common/byte_cursor_unittest.cc'; then $(CYGPATH_W) 'src/common/byte_cursor_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/byte_cursor_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-byte_cursor_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/byte_cursor_unittest.cc' object='src/common/src_common_dumper_unittest-byte_cursor_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-byte_cursor_unittest.obj `if test -f 'src/common/byte_cursor_unittest.cc'; then $(CYGPATH_W) 'src/common/byte_cursor_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/byte_cursor_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_cfi_to_module.o: src/common/dwarf_cfi_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cfi_to_module.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module.o `test -f 'src/common/dwarf_cfi_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_cfi_to_module.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cfi_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_cfi_to_module.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module.o `test -f 'src/common/dwarf_cfi_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_cfi_to_module.cc - -src/common/src_common_dumper_unittest-dwarf_cfi_to_module.obj: src/common/dwarf_cfi_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cfi_to_module.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module.obj `if test -f 'src/common/dwarf_cfi_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_cfi_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cfi_to_module.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cfi_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_cfi_to_module.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module.obj `if test -f 'src/common/dwarf_cfi_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_cfi_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cfi_to_module.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.o: src/common/dwarf_cfi_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.o `test -f 'src/common/dwarf_cfi_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_cfi_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cfi_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.o `test -f 'src/common/dwarf_cfi_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_cfi_to_module_unittest.cc - -src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.obj: src/common/dwarf_cfi_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.obj `if test -f 'src/common/dwarf_cfi_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_cfi_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cfi_to_module_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cfi_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cfi_to_module_unittest.obj `if test -f 'src/common/dwarf_cfi_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_cfi_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cfi_to_module_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_cu_to_module.o: src/common/dwarf_cu_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cu_to_module.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module.o `test -f 'src/common/dwarf_cu_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_cu_to_module.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cu_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_cu_to_module.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module.o `test -f 'src/common/dwarf_cu_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_cu_to_module.cc - -src/common/src_common_dumper_unittest-dwarf_cu_to_module.obj: src/common/dwarf_cu_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cu_to_module.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module.obj `if test -f 'src/common/dwarf_cu_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_cu_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cu_to_module.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cu_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_cu_to_module.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module.obj `if test -f 'src/common/dwarf_cu_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_cu_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cu_to_module.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.o: src/common/dwarf_cu_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.o `test -f 'src/common/dwarf_cu_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_cu_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cu_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.o `test -f 'src/common/dwarf_cu_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_cu_to_module_unittest.cc - -src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.obj: src/common/dwarf_cu_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.obj `if test -f 'src/common/dwarf_cu_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_cu_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cu_to_module_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_cu_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_cu_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_cu_to_module_unittest.obj `if test -f 'src/common/dwarf_cu_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_cu_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_cu_to_module_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_line_to_module.o: src/common/dwarf_line_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_line_to_module.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module.o `test -f 'src/common/dwarf_line_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_line_to_module.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_line_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_line_to_module.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module.o `test -f 'src/common/dwarf_line_to_module.cc' || echo '$(srcdir)/'`src/common/dwarf_line_to_module.cc - -src/common/src_common_dumper_unittest-dwarf_line_to_module.obj: src/common/dwarf_line_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_line_to_module.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module.obj `if test -f 'src/common/dwarf_line_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_line_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_line_to_module.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_line_to_module.cc' object='src/common/src_common_dumper_unittest-dwarf_line_to_module.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module.obj `if test -f 'src/common/dwarf_line_to_module.cc'; then $(CYGPATH_W) 'src/common/dwarf_line_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_line_to_module.cc'; fi` - -src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.o: src/common/dwarf_line_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.o `test -f 'src/common/dwarf_line_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_line_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_line_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.o `test -f 'src/common/dwarf_line_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf_line_to_module_unittest.cc - -src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.obj: src/common/dwarf_line_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.obj `if test -f 'src/common/dwarf_line_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_line_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_line_to_module_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-dwarf_line_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf_line_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-dwarf_line_to_module_unittest.obj `if test -f 'src/common/dwarf_line_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf_line_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf_line_to_module_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-language.o: src/common/language.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-language.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-language.Tpo -c -o src/common/src_common_dumper_unittest-language.o `test -f 'src/common/language.cc' || echo '$(srcdir)/'`src/common/language.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-language.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-language.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/language.cc' object='src/common/src_common_dumper_unittest-language.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-language.o `test -f 'src/common/language.cc' || echo '$(srcdir)/'`src/common/language.cc - -src/common/src_common_dumper_unittest-language.obj: src/common/language.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-language.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-language.Tpo -c -o src/common/src_common_dumper_unittest-language.obj `if test -f 'src/common/language.cc'; then $(CYGPATH_W) 'src/common/language.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/language.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-language.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-language.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/language.cc' object='src/common/src_common_dumper_unittest-language.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-language.obj `if test -f 'src/common/language.cc'; then $(CYGPATH_W) 'src/common/language.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/language.cc'; fi` - -src/common/src_common_dumper_unittest-module.o: src/common/module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-module.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-module.Tpo -c -o src/common/src_common_dumper_unittest-module.o `test -f 'src/common/module.cc' || echo '$(srcdir)/'`src/common/module.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/module.cc' object='src/common/src_common_dumper_unittest-module.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-module.o `test -f 'src/common/module.cc' || echo '$(srcdir)/'`src/common/module.cc - -src/common/src_common_dumper_unittest-module.obj: src/common/module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-module.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-module.Tpo -c -o src/common/src_common_dumper_unittest-module.obj `if test -f 'src/common/module.cc'; then $(CYGPATH_W) 'src/common/module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/module.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/module.cc' object='src/common/src_common_dumper_unittest-module.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-module.obj `if test -f 'src/common/module.cc'; then $(CYGPATH_W) 'src/common/module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/module.cc'; fi` - -src/common/src_common_dumper_unittest-module_unittest.o: src/common/module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-module_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-module_unittest.o `test -f 'src/common/module_unittest.cc' || echo '$(srcdir)/'`src/common/module_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/module_unittest.cc' object='src/common/src_common_dumper_unittest-module_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-module_unittest.o `test -f 'src/common/module_unittest.cc' || echo '$(srcdir)/'`src/common/module_unittest.cc - -src/common/src_common_dumper_unittest-module_unittest.obj: src/common/module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-module_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-module_unittest.obj `if test -f 'src/common/module_unittest.cc'; then $(CYGPATH_W) 'src/common/module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/module_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/module_unittest.cc' object='src/common/src_common_dumper_unittest-module_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-module_unittest.obj `if test -f 'src/common/module_unittest.cc'; then $(CYGPATH_W) 'src/common/module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/module_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-stabs_reader.o: src/common/stabs_reader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_reader.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Tpo -c -o src/common/src_common_dumper_unittest-stabs_reader.o `test -f 'src/common/stabs_reader.cc' || echo '$(srcdir)/'`src/common/stabs_reader.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_reader.cc' object='src/common/src_common_dumper_unittest-stabs_reader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_reader.o `test -f 'src/common/stabs_reader.cc' || echo '$(srcdir)/'`src/common/stabs_reader.cc - -src/common/src_common_dumper_unittest-stabs_reader.obj: src/common/stabs_reader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_reader.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Tpo -c -o src/common/src_common_dumper_unittest-stabs_reader.obj `if test -f 'src/common/stabs_reader.cc'; then $(CYGPATH_W) 'src/common/stabs_reader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_reader.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_reader.cc' object='src/common/src_common_dumper_unittest-stabs_reader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_reader.obj `if test -f 'src/common/stabs_reader.cc'; then $(CYGPATH_W) 'src/common/stabs_reader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_reader.cc'; fi` - -src/common/src_common_dumper_unittest-stabs_reader_unittest.o: src/common/stabs_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_reader_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Tpo -c -o src/common/src_common_dumper_unittest-stabs_reader_unittest.o `test -f 'src/common/stabs_reader_unittest.cc' || echo '$(srcdir)/'`src/common/stabs_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_reader_unittest.cc' object='src/common/src_common_dumper_unittest-stabs_reader_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_reader_unittest.o `test -f 'src/common/stabs_reader_unittest.cc' || echo '$(srcdir)/'`src/common/stabs_reader_unittest.cc - -src/common/src_common_dumper_unittest-stabs_reader_unittest.obj: src/common/stabs_reader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_reader_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Tpo -c -o src/common/src_common_dumper_unittest-stabs_reader_unittest.obj `if test -f 'src/common/stabs_reader_unittest.cc'; then $(CYGPATH_W) 'src/common/stabs_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_reader_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_reader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_reader_unittest.cc' object='src/common/src_common_dumper_unittest-stabs_reader_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_reader_unittest.obj `if test -f 'src/common/stabs_reader_unittest.cc'; then $(CYGPATH_W) 'src/common/stabs_reader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_reader_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-stabs_to_module.o: src/common/stabs_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_to_module.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Tpo -c -o src/common/src_common_dumper_unittest-stabs_to_module.o `test -f 'src/common/stabs_to_module.cc' || echo '$(srcdir)/'`src/common/stabs_to_module.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_to_module.cc' object='src/common/src_common_dumper_unittest-stabs_to_module.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_to_module.o `test -f 'src/common/stabs_to_module.cc' || echo '$(srcdir)/'`src/common/stabs_to_module.cc - -src/common/src_common_dumper_unittest-stabs_to_module.obj: src/common/stabs_to_module.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_to_module.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Tpo -c -o src/common/src_common_dumper_unittest-stabs_to_module.obj `if test -f 'src/common/stabs_to_module.cc'; then $(CYGPATH_W) 'src/common/stabs_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_to_module.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_to_module.cc' object='src/common/src_common_dumper_unittest-stabs_to_module.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_to_module.obj `if test -f 'src/common/stabs_to_module.cc'; then $(CYGPATH_W) 'src/common/stabs_to_module.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_to_module.cc'; fi` - -src/common/src_common_dumper_unittest-stabs_to_module_unittest.o: src/common/stabs_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_to_module_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-stabs_to_module_unittest.o `test -f 'src/common/stabs_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/stabs_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-stabs_to_module_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_to_module_unittest.o `test -f 'src/common/stabs_to_module_unittest.cc' || echo '$(srcdir)/'`src/common/stabs_to_module_unittest.cc - -src/common/src_common_dumper_unittest-stabs_to_module_unittest.obj: src/common/stabs_to_module_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-stabs_to_module_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Tpo -c -o src/common/src_common_dumper_unittest-stabs_to_module_unittest.obj `if test -f 'src/common/stabs_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/stabs_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_to_module_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-stabs_to_module_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/stabs_to_module_unittest.cc' object='src/common/src_common_dumper_unittest-stabs_to_module_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-stabs_to_module_unittest.obj `if test -f 'src/common/stabs_to_module_unittest.cc'; then $(CYGPATH_W) 'src/common/stabs_to_module_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/stabs_to_module_unittest.cc'; fi` - -src/common/src_common_dumper_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Tpo -c -o src/common/src_common_dumper_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_common_dumper_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_common_dumper_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_dumper_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Tpo -c -o src/common/src_common_dumper_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_common_dumper_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_common_dumper_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_dumper_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-bytereader.o: src/common/dwarf/bytereader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-bytereader.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-bytereader.o `test -f 'src/common/dwarf/bytereader.cc' || echo '$(srcdir)/'`src/common/dwarf/bytereader.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/bytereader.cc' object='src/common/dwarf/src_common_dumper_unittest-bytereader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-bytereader.o `test -f 'src/common/dwarf/bytereader.cc' || echo '$(srcdir)/'`src/common/dwarf/bytereader.cc - -src/common/dwarf/src_common_dumper_unittest-bytereader.obj: src/common/dwarf/bytereader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-bytereader.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-bytereader.obj `if test -f 'src/common/dwarf/bytereader.cc'; then $(CYGPATH_W) 'src/common/dwarf/bytereader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/bytereader.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/bytereader.cc' object='src/common/dwarf/src_common_dumper_unittest-bytereader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-bytereader.obj `if test -f 'src/common/dwarf/bytereader.cc'; then $(CYGPATH_W) 'src/common/dwarf/bytereader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/bytereader.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.o: src/common/dwarf/bytereader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.o `test -f 'src/common/dwarf/bytereader_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/bytereader_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/bytereader_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.o `test -f 'src/common/dwarf/bytereader_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/bytereader_unittest.cc - -src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.obj: src/common/dwarf/bytereader_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.obj `if test -f 'src/common/dwarf/bytereader_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/bytereader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/bytereader_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-bytereader_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/bytereader_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-bytereader_unittest.obj `if test -f 'src/common/dwarf/bytereader_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/bytereader_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/bytereader_unittest.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-cfi_assembler.o: src/common/dwarf/cfi_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-cfi_assembler.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-cfi_assembler.o `test -f 'src/common/dwarf/cfi_assembler.cc' || echo '$(srcdir)/'`src/common/dwarf/cfi_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/cfi_assembler.cc' object='src/common/dwarf/src_common_dumper_unittest-cfi_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-cfi_assembler.o `test -f 'src/common/dwarf/cfi_assembler.cc' || echo '$(srcdir)/'`src/common/dwarf/cfi_assembler.cc - -src/common/dwarf/src_common_dumper_unittest-cfi_assembler.obj: src/common/dwarf/cfi_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-cfi_assembler.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-cfi_assembler.obj `if test -f 'src/common/dwarf/cfi_assembler.cc'; then $(CYGPATH_W) 'src/common/dwarf/cfi_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/cfi_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-cfi_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/cfi_assembler.cc' object='src/common/dwarf/src_common_dumper_unittest-cfi_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-cfi_assembler.obj `if test -f 'src/common/dwarf/cfi_assembler.cc'; then $(CYGPATH_W) 'src/common/dwarf/cfi_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/cfi_assembler.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.o: src/common/dwarf/dwarf2diehandler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.o `test -f 'src/common/dwarf/dwarf2diehandler.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2diehandler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2diehandler.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.o `test -f 'src/common/dwarf/dwarf2diehandler.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2diehandler.cc - -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.obj: src/common/dwarf/dwarf2diehandler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.obj `if test -f 'src/common/dwarf/dwarf2diehandler.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2diehandler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2diehandler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2diehandler.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler.obj `if test -f 'src/common/dwarf/dwarf2diehandler.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2diehandler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2diehandler.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.o: src/common/dwarf/dwarf2diehandler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.o `test -f 'src/common/dwarf/dwarf2diehandler_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2diehandler_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2diehandler_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.o `test -f 'src/common/dwarf/dwarf2diehandler_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2diehandler_unittest.cc - -src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.obj: src/common/dwarf/dwarf2diehandler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.obj `if test -f 'src/common/dwarf/dwarf2diehandler_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2diehandler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2diehandler_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2diehandler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2diehandler_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2diehandler_unittest.obj `if test -f 'src/common/dwarf/dwarf2diehandler_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2diehandler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2diehandler_unittest.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-dwarf2reader.o: src/common/dwarf/dwarf2reader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2reader.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader.o `test -f 'src/common/dwarf/dwarf2reader.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2reader.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2reader.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2reader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader.o `test -f 'src/common/dwarf/dwarf2reader.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2reader.cc - -src/common/dwarf/src_common_dumper_unittest-dwarf2reader.obj: src/common/dwarf/dwarf2reader.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2reader.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader.obj `if test -f 'src/common/dwarf/dwarf2reader.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2reader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2reader.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2reader.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2reader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader.obj `if test -f 'src/common/dwarf/dwarf2reader.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2reader.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2reader.cc'; fi` - -src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.o: src/common/dwarf/dwarf2reader_cfi_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.o -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.o `test -f 'src/common/dwarf/dwarf2reader_cfi_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2reader_cfi_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2reader_cfi_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.o `test -f 'src/common/dwarf/dwarf2reader_cfi_unittest.cc' || echo '$(srcdir)/'`src/common/dwarf/dwarf2reader_cfi_unittest.cc - -src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.obj: src/common/dwarf/dwarf2reader_cfi_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.obj -MD -MP -MF src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Tpo -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.obj `if test -f 'src/common/dwarf/dwarf2reader_cfi_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2reader_cfi_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2reader_cfi_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Tpo src/common/dwarf/$(DEPDIR)/src_common_dumper_unittest-dwarf2reader_cfi_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/dwarf/dwarf2reader_cfi_unittest.cc' object='src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/dwarf/src_common_dumper_unittest-dwarf2reader_cfi_unittest.obj `if test -f 'src/common/dwarf/dwarf2reader_cfi_unittest.cc'; then $(CYGPATH_W) 'src/common/dwarf/dwarf2reader_cfi_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/dwarf/dwarf2reader_cfi_unittest.cc'; fi` - -src/common/linux/src_common_dumper_unittest-dump_symbols.o: src/common/linux/dump_symbols.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-dump_symbols.o -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Tpo -c -o src/common/linux/src_common_dumper_unittest-dump_symbols.o `test -f 'src/common/linux/dump_symbols.cc' || echo '$(srcdir)/'`src/common/linux/dump_symbols.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/dump_symbols.cc' object='src/common/linux/src_common_dumper_unittest-dump_symbols.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-dump_symbols.o `test -f 'src/common/linux/dump_symbols.cc' || echo '$(srcdir)/'`src/common/linux/dump_symbols.cc - -src/common/linux/src_common_dumper_unittest-dump_symbols.obj: src/common/linux/dump_symbols.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-dump_symbols.obj -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Tpo -c -o src/common/linux/src_common_dumper_unittest-dump_symbols.obj `if test -f 'src/common/linux/dump_symbols.cc'; then $(CYGPATH_W) 'src/common/linux/dump_symbols.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/dump_symbols.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-dump_symbols.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/dump_symbols.cc' object='src/common/linux/src_common_dumper_unittest-dump_symbols.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-dump_symbols.obj `if test -f 'src/common/linux/dump_symbols.cc'; then $(CYGPATH_W) 'src/common/linux/dump_symbols.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/dump_symbols.cc'; fi` - -src/common/linux/src_common_dumper_unittest-file_id.o: src/common/linux/file_id.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-file_id.o -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Tpo -c -o src/common/linux/src_common_dumper_unittest-file_id.o `test -f 'src/common/linux/file_id.cc' || echo '$(srcdir)/'`src/common/linux/file_id.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/file_id.cc' object='src/common/linux/src_common_dumper_unittest-file_id.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-file_id.o `test -f 'src/common/linux/file_id.cc' || echo '$(srcdir)/'`src/common/linux/file_id.cc - -src/common/linux/src_common_dumper_unittest-file_id.obj: src/common/linux/file_id.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-file_id.obj -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Tpo -c -o src/common/linux/src_common_dumper_unittest-file_id.obj `if test -f 'src/common/linux/file_id.cc'; then $(CYGPATH_W) 'src/common/linux/file_id.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/file_id.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/file_id.cc' object='src/common/linux/src_common_dumper_unittest-file_id.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-file_id.obj `if test -f 'src/common/linux/file_id.cc'; then $(CYGPATH_W) 'src/common/linux/file_id.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/file_id.cc'; fi` - -src/common/linux/src_common_dumper_unittest-file_id_unittest.o: src/common/linux/file_id_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-file_id_unittest.o -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Tpo -c -o src/common/linux/src_common_dumper_unittest-file_id_unittest.o `test -f 'src/common/linux/file_id_unittest.cc' || echo '$(srcdir)/'`src/common/linux/file_id_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/file_id_unittest.cc' object='src/common/linux/src_common_dumper_unittest-file_id_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-file_id_unittest.o `test -f 'src/common/linux/file_id_unittest.cc' || echo '$(srcdir)/'`src/common/linux/file_id_unittest.cc - -src/common/linux/src_common_dumper_unittest-file_id_unittest.obj: src/common/linux/file_id_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/linux/src_common_dumper_unittest-file_id_unittest.obj -MD -MP -MF src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Tpo -c -o src/common/linux/src_common_dumper_unittest-file_id_unittest.obj `if test -f 'src/common/linux/file_id_unittest.cc'; then $(CYGPATH_W) 'src/common/linux/file_id_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/file_id_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Tpo src/common/linux/$(DEPDIR)/src_common_dumper_unittest-file_id_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/linux/file_id_unittest.cc' object='src/common/linux/src_common_dumper_unittest-file_id_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/linux/src_common_dumper_unittest-file_id_unittest.obj `if test -f 'src/common/linux/file_id_unittest.cc'; then $(CYGPATH_W) 'src/common/linux/file_id_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/linux/file_id_unittest.cc'; fi` - -src/testing/gtest/src/src_common_dumper_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_dumper_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_common_dumper_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_common_dumper_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_dumper_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_common_dumper_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_common_dumper_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_dumper_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_common_dumper_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_common_dumper_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_dumper_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_dumper_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_common_dumper_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_dumper_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_common_dumper_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_common_dumper_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Tpo -c -o src/testing/src/src_common_dumper_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_common_dumper_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_common_dumper_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_common_dumper_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_common_dumper_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Tpo -c -o src/testing/src/src_common_dumper_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_common_dumper_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_common_dumper_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_dumper_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_common_dumper_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_common_test_assembler_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_test_assembler_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Tpo -c -o src/common/src_common_test_assembler_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_common_test_assembler_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_test_assembler_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_common_test_assembler_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_test_assembler_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Tpo -c -o src/common/src_common_test_assembler_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_common_test_assembler_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_test_assembler_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/common/src_common_test_assembler_unittest-test_assembler_unittest.o: src/common/test_assembler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_test_assembler_unittest-test_assembler_unittest.o -MD -MP -MF src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Tpo -c -o src/common/src_common_test_assembler_unittest-test_assembler_unittest.o `test -f 'src/common/test_assembler_unittest.cc' || echo '$(srcdir)/'`src/common/test_assembler_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Tpo src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler_unittest.cc' object='src/common/src_common_test_assembler_unittest-test_assembler_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_test_assembler_unittest-test_assembler_unittest.o `test -f 'src/common/test_assembler_unittest.cc' || echo '$(srcdir)/'`src/common/test_assembler_unittest.cc - -src/common/src_common_test_assembler_unittest-test_assembler_unittest.obj: src/common/test_assembler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_common_test_assembler_unittest-test_assembler_unittest.obj -MD -MP -MF src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Tpo -c -o src/common/src_common_test_assembler_unittest-test_assembler_unittest.obj `if test -f 'src/common/test_assembler_unittest.cc'; then $(CYGPATH_W) 'src/common/test_assembler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Tpo src/common/$(DEPDIR)/src_common_test_assembler_unittest-test_assembler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler_unittest.cc' object='src/common/src_common_test_assembler_unittest-test_assembler_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_common_test_assembler_unittest-test_assembler_unittest.obj `if test -f 'src/common/test_assembler_unittest.cc'; then $(CYGPATH_W) 'src/common/test_assembler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler_unittest.cc'; fi` - -src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_common_test_assembler_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_common_test_assembler_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_common_test_assembler_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_common_test_assembler_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Tpo -c -o src/testing/src/src_common_test_assembler_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_common_test_assembler_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_common_test_assembler_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_common_test_assembler_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_common_test_assembler_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Tpo -c -o src/testing/src/src_common_test_assembler_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_common_test_assembler_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_common_test_assembler_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_common_test_assembler_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_common_test_assembler_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.o: src/processor/basic_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.o `test -f 'src/processor/basic_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/basic_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/basic_source_line_resolver_unittest.cc' object='src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.o `test -f 'src/processor/basic_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/basic_source_line_resolver_unittest.cc - -src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.obj: src/processor/basic_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.obj `if test -f 'src/processor/basic_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/basic_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/basic_source_line_resolver_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/basic_source_line_resolver_unittest.cc' object='src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_basic_source_line_resolver_unittest-basic_source_line_resolver_unittest.obj `if test -f 'src/processor/basic_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/basic_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/basic_source_line_resolver_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_basic_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_basic_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_basic_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_basic_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_binarystream_unittest-binarystream_unittest.o: src/processor/binarystream_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_binarystream_unittest-binarystream_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Tpo -c -o src/processor/src_processor_binarystream_unittest-binarystream_unittest.o `test -f 'src/processor/binarystream_unittest.cc' || echo '$(srcdir)/'`src/processor/binarystream_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Tpo src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/binarystream_unittest.cc' object='src/processor/src_processor_binarystream_unittest-binarystream_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_binarystream_unittest-binarystream_unittest.o `test -f 'src/processor/binarystream_unittest.cc' || echo '$(srcdir)/'`src/processor/binarystream_unittest.cc - -src/processor/src_processor_binarystream_unittest-binarystream_unittest.obj: src/processor/binarystream_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_binarystream_unittest-binarystream_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Tpo -c -o src/processor/src_processor_binarystream_unittest-binarystream_unittest.obj `if test -f 'src/processor/binarystream_unittest.cc'; then $(CYGPATH_W) 'src/processor/binarystream_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/binarystream_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Tpo src/processor/$(DEPDIR)/src_processor_binarystream_unittest-binarystream_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/binarystream_unittest.cc' object='src/processor/src_processor_binarystream_unittest-binarystream_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_binarystream_unittest-binarystream_unittest.obj `if test -f 'src/processor/binarystream_unittest.cc'; then $(CYGPATH_W) 'src/processor/binarystream_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/binarystream_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_binarystream_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_binarystream_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_binarystream_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_binarystream_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_binarystream_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_binarystream_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_binarystream_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_binarystream_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_binarystream_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_binarystream_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_binarystream_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_binarystream_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_binarystream_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_binarystream_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.o: src/processor/cfi_frame_info_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Tpo -c -o src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.o `test -f 'src/processor/cfi_frame_info_unittest.cc' || echo '$(srcdir)/'`src/processor/cfi_frame_info_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Tpo src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/cfi_frame_info_unittest.cc' object='src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.o `test -f 'src/processor/cfi_frame_info_unittest.cc' || echo '$(srcdir)/'`src/processor/cfi_frame_info_unittest.cc - -src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.obj: src/processor/cfi_frame_info_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Tpo -c -o src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.obj `if test -f 'src/processor/cfi_frame_info_unittest.cc'; then $(CYGPATH_W) 'src/processor/cfi_frame_info_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/cfi_frame_info_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Tpo src/processor/$(DEPDIR)/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/cfi_frame_info_unittest.cc' object='src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_cfi_frame_info_unittest-cfi_frame_info_unittest.obj `if test -f 'src/processor/cfi_frame_info_unittest.cc'; then $(CYGPATH_W) 'src/processor/cfi_frame_info_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/cfi_frame_info_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_cfi_frame_info_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_cfi_frame_info_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_cfi_frame_info_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_cfi_frame_info_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.o: src/processor/disassembler_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Tpo -c -o src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.o `test -f 'src/processor/disassembler_x86_unittest.cc' || echo '$(srcdir)/'`src/processor/disassembler_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Tpo src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/disassembler_x86_unittest.cc' object='src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.o `test -f 'src/processor/disassembler_x86_unittest.cc' || echo '$(srcdir)/'`src/processor/disassembler_x86_unittest.cc - -src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.obj: src/processor/disassembler_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Tpo -c -o src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.obj `if test -f 'src/processor/disassembler_x86_unittest.cc'; then $(CYGPATH_W) 'src/processor/disassembler_x86_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/disassembler_x86_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Tpo src/processor/$(DEPDIR)/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/disassembler_x86_unittest.cc' object='src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_disassembler_x86_unittest-disassembler_x86_unittest.obj `if test -f 'src/processor/disassembler_x86_unittest.cc'; then $(CYGPATH_W) 'src/processor/disassembler_x86_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/disassembler_x86_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_disassembler_x86_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_disassembler_x86_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_disassembler_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_disassembler_x86_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_exploitability_unittest-exploitability_unittest.o: src/processor/exploitability_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_exploitability_unittest-exploitability_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Tpo -c -o src/processor/src_processor_exploitability_unittest-exploitability_unittest.o `test -f 'src/processor/exploitability_unittest.cc' || echo '$(srcdir)/'`src/processor/exploitability_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Tpo src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/exploitability_unittest.cc' object='src/processor/src_processor_exploitability_unittest-exploitability_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_exploitability_unittest-exploitability_unittest.o `test -f 'src/processor/exploitability_unittest.cc' || echo '$(srcdir)/'`src/processor/exploitability_unittest.cc - -src/processor/src_processor_exploitability_unittest-exploitability_unittest.obj: src/processor/exploitability_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_exploitability_unittest-exploitability_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Tpo -c -o src/processor/src_processor_exploitability_unittest-exploitability_unittest.obj `if test -f 'src/processor/exploitability_unittest.cc'; then $(CYGPATH_W) 'src/processor/exploitability_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/exploitability_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Tpo src/processor/$(DEPDIR)/src_processor_exploitability_unittest-exploitability_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/exploitability_unittest.cc' object='src/processor/src_processor_exploitability_unittest-exploitability_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_exploitability_unittest-exploitability_unittest.obj `if test -f 'src/processor/exploitability_unittest.cc'; then $(CYGPATH_W) 'src/processor/exploitability_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/exploitability_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_exploitability_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_exploitability_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_exploitability_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_exploitability_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_exploitability_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_exploitability_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_exploitability_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_exploitability_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_exploitability_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_exploitability_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_exploitability_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_exploitability_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_exploitability_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_exploitability_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.o: src/processor/fast_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.o `test -f 'src/processor/fast_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/fast_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/fast_source_line_resolver_unittest.cc' object='src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.o `test -f 'src/processor/fast_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/fast_source_line_resolver_unittest.cc - -src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.obj: src/processor/fast_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.obj `if test -f 'src/processor/fast_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/fast_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/fast_source_line_resolver_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/fast_source_line_resolver_unittest.cc' object='src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_fast_source_line_resolver_unittest-fast_source_line_resolver_unittest.obj `if test -f 'src/processor/fast_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/fast_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/fast_source_line_resolver_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_fast_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_fast_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_fast_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_fast_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.o: src/processor/map_serializers_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Tpo -c -o src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.o `test -f 'src/processor/map_serializers_unittest.cc' || echo '$(srcdir)/'`src/processor/map_serializers_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Tpo src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/map_serializers_unittest.cc' object='src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.o `test -f 'src/processor/map_serializers_unittest.cc' || echo '$(srcdir)/'`src/processor/map_serializers_unittest.cc - -src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.obj: src/processor/map_serializers_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Tpo -c -o src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.obj `if test -f 'src/processor/map_serializers_unittest.cc'; then $(CYGPATH_W) 'src/processor/map_serializers_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/map_serializers_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Tpo src/processor/$(DEPDIR)/src_processor_map_serializers_unittest-map_serializers_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/map_serializers_unittest.cc' object='src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_map_serializers_unittest-map_serializers_unittest.obj `if test -f 'src/processor/map_serializers_unittest.cc'; then $(CYGPATH_W) 'src/processor/map_serializers_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/map_serializers_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_map_serializers_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_map_serializers_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_map_serializers_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_map_serializers_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_map_serializers_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_map_serializers_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_map_serializers_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_map_serializers_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_map_serializers_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_map_serializers_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_map_serializers_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_map_serializers_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_map_serializers_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_map_serializers_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.o: src/processor/minidump_processor_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Tpo -c -o src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.o `test -f 'src/processor/minidump_processor_unittest.cc' || echo '$(srcdir)/'`src/processor/minidump_processor_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Tpo src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump_processor_unittest.cc' object='src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.o `test -f 'src/processor/minidump_processor_unittest.cc' || echo '$(srcdir)/'`src/processor/minidump_processor_unittest.cc - -src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.obj: src/processor/minidump_processor_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Tpo -c -o src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.obj `if test -f 'src/processor/minidump_processor_unittest.cc'; then $(CYGPATH_W) 'src/processor/minidump_processor_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump_processor_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Tpo src/processor/$(DEPDIR)/src_processor_minidump_processor_unittest-minidump_processor_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump_processor_unittest.cc' object='src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_processor_unittest-minidump_processor_unittest.obj `if test -f 'src/processor/minidump_processor_unittest.cc'; then $(CYGPATH_W) 'src/processor/minidump_processor_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump_processor_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_processor_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_minidump_processor_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_minidump_processor_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_minidump_processor_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_minidump_processor_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_minidump_processor_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_minidump_processor_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_minidump_processor_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_minidump_processor_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_minidump_processor_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_minidump_processor_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_processor_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_minidump_processor_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_processor_minidump_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_minidump_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Tpo -c -o src/common/src_processor_minidump_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_minidump_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_minidump_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_processor_minidump_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_minidump_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Tpo -c -o src/common/src_processor_minidump_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_minidump_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_minidump_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_minidump_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/processor/src_processor_minidump_unittest-minidump_unittest.o: src/processor/minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_unittest-minidump_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Tpo -c -o src/processor/src_processor_minidump_unittest-minidump_unittest.o `test -f 'src/processor/minidump_unittest.cc' || echo '$(srcdir)/'`src/processor/minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Tpo src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump_unittest.cc' object='src/processor/src_processor_minidump_unittest-minidump_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_unittest-minidump_unittest.o `test -f 'src/processor/minidump_unittest.cc' || echo '$(srcdir)/'`src/processor/minidump_unittest.cc - -src/processor/src_processor_minidump_unittest-minidump_unittest.obj: src/processor/minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_unittest-minidump_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Tpo -c -o src/processor/src_processor_minidump_unittest-minidump_unittest.obj `if test -f 'src/processor/minidump_unittest.cc'; then $(CYGPATH_W) 'src/processor/minidump_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Tpo src/processor/$(DEPDIR)/src_processor_minidump_unittest-minidump_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/minidump_unittest.cc' object='src/processor/src_processor_minidump_unittest-minidump_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_unittest-minidump_unittest.obj `if test -f 'src/processor/minidump_unittest.cc'; then $(CYGPATH_W) 'src/processor/minidump_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/minidump_unittest.cc'; fi` - -src/processor/src_processor_minidump_unittest-synth_minidump.o: src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_unittest-synth_minidump.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Tpo -c -o src/processor/src_processor_minidump_unittest-synth_minidump.o `test -f 'src/processor/synth_minidump.cc' || echo '$(srcdir)/'`src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Tpo src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump.cc' object='src/processor/src_processor_minidump_unittest-synth_minidump.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_unittest-synth_minidump.o `test -f 'src/processor/synth_minidump.cc' || echo '$(srcdir)/'`src/processor/synth_minidump.cc - -src/processor/src_processor_minidump_unittest-synth_minidump.obj: src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_minidump_unittest-synth_minidump.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Tpo -c -o src/processor/src_processor_minidump_unittest-synth_minidump.obj `if test -f 'src/processor/synth_minidump.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Tpo src/processor/$(DEPDIR)/src_processor_minidump_unittest-synth_minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump.cc' object='src/processor/src_processor_minidump_unittest-synth_minidump.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_minidump_unittest-synth_minidump.obj `if test -f 'src/processor/synth_minidump.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump.cc'; fi` - -src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_minidump_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_minidump_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_minidump_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_minidump_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_minidump_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_minidump_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_minidump_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_minidump_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_minidump_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_minidump_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_minidump_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_minidump_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_minidump_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.o: src/processor/network_source_line_resolver_server_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Tpo -c -o src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.o `test -f 'src/processor/network_source_line_resolver_server_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_resolver_server_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_resolver_server_unittest.cc' object='src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.o `test -f 'src/processor/network_source_line_resolver_server_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_resolver_server_unittest.cc - -src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.obj: src/processor/network_source_line_resolver_server_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Tpo -c -o src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.obj `if test -f 'src/processor/network_source_line_resolver_server_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_resolver_server_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_resolver_server_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_resolver_server_unittest.cc' object='src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_resolver_server_unittest-network_source_line_resolver_server_unittest.obj `if test -f 'src/processor/network_source_line_resolver_server_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_resolver_server_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_resolver_server_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_server_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_server_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_resolver_server_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.o: src/processor/network_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.o `test -f 'src/processor/network_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_resolver_unittest.cc' object='src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.o `test -f 'src/processor/network_source_line_resolver_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_resolver_unittest.cc - -src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.obj: src/processor/network_source_line_resolver_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Tpo -c -o src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.obj `if test -f 'src/processor/network_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_resolver_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_resolver_unittest.cc' object='src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_resolver_unittest-network_source_line_resolver_unittest.obj `if test -f 'src/processor/network_source_line_resolver_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_resolver_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_resolver_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_resolver_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_resolver_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_resolver_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_resolver_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.o: src/processor/network_source_line_server_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Tpo -c -o src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.o `test -f 'src/processor/network_source_line_server_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_server_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_server_unittest.cc' object='src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.o `test -f 'src/processor/network_source_line_server_unittest.cc' || echo '$(srcdir)/'`src/processor/network_source_line_server_unittest.cc - -src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.obj: src/processor/network_source_line_server_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Tpo -c -o src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.obj `if test -f 'src/processor/network_source_line_server_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_server_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_server_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Tpo src/processor/$(DEPDIR)/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/network_source_line_server_unittest.cc' object='src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_network_source_line_server_unittest-network_source_line_server_unittest.obj `if test -f 'src/processor/network_source_line_server_unittest.cc'; then $(CYGPATH_W) 'src/processor/network_source_line_server_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/network_source_line_server_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_network_source_line_server_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_network_source_line_server_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_network_source_line_server_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_network_source_line_server_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_processor_stackwalker_amd64_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_amd64_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_amd64_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_amd64_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_amd64_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_processor_stackwalker_amd64_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_amd64_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_amd64_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_amd64_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_amd64_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.o: src/processor/stackwalker_amd64_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Tpo -c -o src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.o `test -f 'src/processor/stackwalker_amd64_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_amd64_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_amd64_unittest.cc' object='src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.o `test -f 'src/processor/stackwalker_amd64_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_amd64_unittest.cc - -src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.obj: src/processor/stackwalker_amd64_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Tpo -c -o src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.obj `if test -f 'src/processor/stackwalker_amd64_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_amd64_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_amd64_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_amd64_unittest.cc' object='src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_amd64_unittest-stackwalker_amd64_unittest.obj `if test -f 'src/processor/stackwalker_amd64_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_amd64_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_amd64_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_amd64_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_amd64_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_amd64_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_amd64_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_processor_stackwalker_arm_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_arm_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_arm_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_arm_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_arm_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_processor_stackwalker_arm_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_arm_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_arm_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_arm_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_arm_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_arm_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.o: src/processor/stackwalker_arm_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Tpo -c -o src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.o `test -f 'src/processor/stackwalker_arm_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_arm_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_arm_unittest.cc' object='src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.o `test -f 'src/processor/stackwalker_arm_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_arm_unittest.cc - -src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.obj: src/processor/stackwalker_arm_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Tpo -c -o src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.obj `if test -f 'src/processor/stackwalker_arm_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_arm_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_arm_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_arm_unittest.cc' object='src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_arm_unittest-stackwalker_arm_unittest.obj `if test -f 'src/processor/stackwalker_arm_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_arm_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_arm_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_arm_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_arm_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_arm_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_arm_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_processor_stackwalker_x86_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_x86_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_x86_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_x86_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_x86_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_processor_stackwalker_x86_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_stackwalker_x86_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Tpo -c -o src/common/src_processor_stackwalker_x86_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_stackwalker_x86_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_stackwalker_x86_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_stackwalker_x86_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.o: src/processor/stackwalker_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Tpo -c -o src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.o `test -f 'src/processor/stackwalker_x86_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_x86_unittest.cc' object='src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.o `test -f 'src/processor/stackwalker_x86_unittest.cc' || echo '$(srcdir)/'`src/processor/stackwalker_x86_unittest.cc - -src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.obj: src/processor/stackwalker_x86_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Tpo -c -o src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.obj `if test -f 'src/processor/stackwalker_x86_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_x86_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_x86_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Tpo src/processor/$(DEPDIR)/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/stackwalker_x86_unittest.cc' object='src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_stackwalker_x86_unittest-stackwalker_x86_unittest.obj `if test -f 'src/processor/stackwalker_x86_unittest.cc'; then $(CYGPATH_W) 'src/processor/stackwalker_x86_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/stackwalker_x86_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_stackwalker_x86_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_stackwalker_x86_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_stackwalker_x86_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_stackwalker_x86_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.o: src/processor/static_address_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Tpo -c -o src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.o `test -f 'src/processor/static_address_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_address_map_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_address_map_unittest.cc' object='src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.o `test -f 'src/processor/static_address_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_address_map_unittest.cc - -src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.obj: src/processor/static_address_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Tpo -c -o src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.obj `if test -f 'src/processor/static_address_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_address_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_address_map_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_address_map_unittest-static_address_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_address_map_unittest.cc' object='src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_address_map_unittest-static_address_map_unittest.obj `if test -f 'src/processor/static_address_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_address_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_address_map_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_address_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_address_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_static_address_map_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_address_map_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_address_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_address_map_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_address_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_static_address_map_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_address_map_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_address_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_address_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_address_map_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_address_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_address_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.o: src/processor/static_contained_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Tpo -c -o src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.o `test -f 'src/processor/static_contained_range_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_contained_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_contained_range_map_unittest.cc' object='src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.o `test -f 'src/processor/static_contained_range_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_contained_range_map_unittest.cc - -src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.obj: src/processor/static_contained_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Tpo -c -o src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.obj `if test -f 'src/processor/static_contained_range_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_contained_range_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_contained_range_map_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_contained_range_map_unittest.cc' object='src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_contained_range_map_unittest-static_contained_range_map_unittest.obj `if test -f 'src/processor/static_contained_range_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_contained_range_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_contained_range_map_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_contained_range_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_contained_range_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_contained_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_contained_range_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_static_map_unittest-static_map_unittest.o: src/processor/static_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_map_unittest-static_map_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Tpo -c -o src/processor/src_processor_static_map_unittest-static_map_unittest.o `test -f 'src/processor/static_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_map_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_map_unittest.cc' object='src/processor/src_processor_static_map_unittest-static_map_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_map_unittest-static_map_unittest.o `test -f 'src/processor/static_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_map_unittest.cc - -src/processor/src_processor_static_map_unittest-static_map_unittest.obj: src/processor/static_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_map_unittest-static_map_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Tpo -c -o src/processor/src_processor_static_map_unittest-static_map_unittest.obj `if test -f 'src/processor/static_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_map_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_map_unittest-static_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_map_unittest.cc' object='src/processor/src_processor_static_map_unittest-static_map_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_map_unittest-static_map_unittest.obj `if test -f 'src/processor/static_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_map_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_static_map_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_map_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_map_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_static_map_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_map_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_map_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.o: src/processor/static_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Tpo -c -o src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.o `test -f 'src/processor/static_range_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_range_map_unittest.cc' object='src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.o `test -f 'src/processor/static_range_map_unittest.cc' || echo '$(srcdir)/'`src/processor/static_range_map_unittest.cc - -src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.obj: src/processor/static_range_map_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Tpo -c -o src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.obj `if test -f 'src/processor/static_range_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_range_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_range_map_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Tpo src/processor/$(DEPDIR)/src_processor_static_range_map_unittest-static_range_map_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/static_range_map_unittest.cc' object='src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_static_range_map_unittest-static_range_map_unittest.obj `if test -f 'src/processor/static_range_map_unittest.cc'; then $(CYGPATH_W) 'src/processor/static_range_map_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/static_range_map_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_static_range_map_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_static_range_map_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/src/src_processor_static_range_map_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_range_map_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_range_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_range_map_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_range_map_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_static_range_map_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_static_range_map_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_static_range_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_static_range_map_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_static_range_map_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_static_range_map_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_static_range_map_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/common/src_processor_synth_minidump_unittest-test_assembler.o: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_synth_minidump_unittest-test_assembler.o -MD -MP -MF src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Tpo -c -o src/common/src_processor_synth_minidump_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_synth_minidump_unittest-test_assembler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_synth_minidump_unittest-test_assembler.o `test -f 'src/common/test_assembler.cc' || echo '$(srcdir)/'`src/common/test_assembler.cc - -src/common/src_processor_synth_minidump_unittest-test_assembler.obj: src/common/test_assembler.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/common/src_processor_synth_minidump_unittest-test_assembler.obj -MD -MP -MF src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Tpo -c -o src/common/src_processor_synth_minidump_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Tpo src/common/$(DEPDIR)/src_processor_synth_minidump_unittest-test_assembler.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/common/test_assembler.cc' object='src/common/src_processor_synth_minidump_unittest-test_assembler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/common/src_processor_synth_minidump_unittest-test_assembler.obj `if test -f 'src/common/test_assembler.cc'; then $(CYGPATH_W) 'src/common/test_assembler.cc'; else $(CYGPATH_W) '$(srcdir)/src/common/test_assembler.cc'; fi` - -src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.o: src/processor/synth_minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Tpo -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.o `test -f 'src/processor/synth_minidump_unittest.cc' || echo '$(srcdir)/'`src/processor/synth_minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Tpo src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump_unittest.cc' object='src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.o `test -f 'src/processor/synth_minidump_unittest.cc' || echo '$(srcdir)/'`src/processor/synth_minidump_unittest.cc - -src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.obj: src/processor/synth_minidump_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Tpo -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.obj `if test -f 'src/processor/synth_minidump_unittest.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Tpo src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump_unittest.cc' object='src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump_unittest.obj `if test -f 'src/processor/synth_minidump_unittest.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump_unittest.cc'; fi` - -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.o: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.o `test -f 'src/testing/gtest/src/gtest-all.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest-all.cc - -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.obj: src/testing/gtest/src/gtest-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Tpo -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest-all.cc' object='src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest-all.obj `if test -f 'src/testing/gtest/src/gtest-all.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest-all.cc'; fi` - -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.o: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.o -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.o `test -f 'src/testing/gtest/src/gtest_main.cc' || echo '$(srcdir)/'`src/testing/gtest/src/gtest_main.cc - -src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.obj: src/testing/gtest/src/gtest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.obj -MD -MP -MF src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Tpo -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Tpo src/testing/gtest/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gtest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/gtest/src/gtest_main.cc' object='src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/gtest/src/src_processor_synth_minidump_unittest-gtest_main.obj `if test -f 'src/testing/gtest/src/gtest_main.cc'; then $(CYGPATH_W) 'src/testing/gtest/src/gtest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/gtest/src/gtest_main.cc'; fi` - -src/testing/src/src_processor_synth_minidump_unittest-gmock-all.o: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_synth_minidump_unittest-gmock-all.o -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_synth_minidump_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_synth_minidump_unittest-gmock-all.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_synth_minidump_unittest-gmock-all.o `test -f 'src/testing/src/gmock-all.cc' || echo '$(srcdir)/'`src/testing/src/gmock-all.cc - -src/testing/src/src_processor_synth_minidump_unittest-gmock-all.obj: src/testing/src/gmock-all.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/testing/src/src_processor_synth_minidump_unittest-gmock-all.obj -MD -MP -MF src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Tpo -c -o src/testing/src/src_processor_synth_minidump_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Tpo src/testing/src/$(DEPDIR)/src_processor_synth_minidump_unittest-gmock-all.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/testing/src/gmock-all.cc' object='src/testing/src/src_processor_synth_minidump_unittest-gmock-all.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/testing/src/src_processor_synth_minidump_unittest-gmock-all.obj `if test -f 'src/testing/src/gmock-all.cc'; then $(CYGPATH_W) 'src/testing/src/gmock-all.cc'; else $(CYGPATH_W) '$(srcdir)/src/testing/src/gmock-all.cc'; fi` - -src/processor/src_processor_synth_minidump_unittest-synth_minidump.o: src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_synth_minidump_unittest-synth_minidump.o -MD -MP -MF src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Tpo -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump.o `test -f 'src/processor/synth_minidump.cc' || echo '$(srcdir)/'`src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Tpo src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump.cc' object='src/processor/src_processor_synth_minidump_unittest-synth_minidump.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump.o `test -f 'src/processor/synth_minidump.cc' || echo '$(srcdir)/'`src/processor/synth_minidump.cc - -src/processor/src_processor_synth_minidump_unittest-synth_minidump.obj: src/processor/synth_minidump.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/processor/src_processor_synth_minidump_unittest-synth_minidump.obj -MD -MP -MF src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Tpo -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump.obj `if test -f 'src/processor/synth_minidump.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump.cc'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Tpo src/processor/$(DEPDIR)/src_processor_synth_minidump_unittest-synth_minidump.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/processor/synth_minidump.cc' object='src/processor/src_processor_synth_minidump_unittest-synth_minidump.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_processor_synth_minidump_unittest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/processor/src_processor_synth_minidump_unittest-synth_minidump.obj `if test -f 'src/processor/synth_minidump.cc'; then $(CYGPATH_W) 'src/processor/synth_minidump.cc'; else $(CYGPATH_W) '$(srcdir)/src/processor/synth_minidump.cc'; fi` -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(docdir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f src/$(am__dirstamp) - -rm -f src/client/$(DEPDIR)/$(am__dirstamp) - -rm -f src/client/$(am__dirstamp) - -rm -f src/client/linux/$(am__dirstamp) - -rm -f src/client/linux/crash_generation/$(DEPDIR)/$(am__dirstamp) - -rm -f src/client/linux/crash_generation/$(am__dirstamp) - -rm -f src/client/linux/handler/$(DEPDIR)/$(am__dirstamp) - -rm -f src/client/linux/handler/$(am__dirstamp) - -rm -f src/client/linux/minidump_writer/$(DEPDIR)/$(am__dirstamp) - -rm -f src/client/linux/minidump_writer/$(am__dirstamp) - -rm -f src/common/$(DEPDIR)/$(am__dirstamp) - -rm -f src/common/$(am__dirstamp) - -rm -f src/common/dwarf/$(DEPDIR)/$(am__dirstamp) - -rm -f src/common/dwarf/$(am__dirstamp) - -rm -f src/common/linux/$(DEPDIR)/$(am__dirstamp) - -rm -f src/common/linux/$(am__dirstamp) - -rm -f src/processor/$(DEPDIR)/$(am__dirstamp) - -rm -f src/processor/$(am__dirstamp) - -rm -f src/testing/gtest/src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/testing/gtest/src/$(am__dirstamp) - -rm -f src/testing/src/$(DEPDIR)/$(am__dirstamp) - -rm -f src/testing/src/$(am__dirstamp) - -rm -f src/third_party/libdisasm/$(DEPDIR)/$(am__dirstamp) - -rm -f src/third_party/libdisasm/$(am__dirstamp) - -rm -f src/tools/linux/dump_syms/$(DEPDIR)/$(am__dirstamp) - -rm -f src/tools/linux/dump_syms/$(am__dirstamp) - -rm -f src/tools/linux/md2core/$(DEPDIR)/$(am__dirstamp) - -rm -f src/tools/linux/md2core/$(am__dirstamp) - -rm -f src/tools/linux/symupload/$(DEPDIR)/$(am__dirstamp) - -rm -f src/tools/linux/symupload/$(am__dirstamp) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLIBRARIES clean-noinstLIBRARIES clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf src/client/$(DEPDIR) src/client/linux/crash_generation/$(DEPDIR) src/client/linux/handler/$(DEPDIR) src/client/linux/minidump_writer/$(DEPDIR) src/common/$(DEPDIR) src/common/dwarf/$(DEPDIR) src/common/linux/$(DEPDIR) src/processor/$(DEPDIR) src/testing/gtest/src/$(DEPDIR) src/testing/src/$(DEPDIR) src/third_party/libdisasm/$(DEPDIR) src/tools/linux/dump_syms/$(DEPDIR) src/tools/linux/md2core/$(DEPDIR) src/tools/linux/symupload/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_docDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf src/client/$(DEPDIR) src/client/linux/crash_generation/$(DEPDIR) src/client/linux/handler/$(DEPDIR) src/client/linux/minidump_writer/$(DEPDIR) src/common/$(DEPDIR) src/common/dwarf/$(DEPDIR) src/common/linux/$(DEPDIR) src/processor/$(DEPDIR) src/testing/gtest/src/$(DEPDIR) src/testing/src/$(DEPDIR) src/third_party/libdisasm/$(DEPDIR) src/tools/linux/dump_syms/$(DEPDIR) src/tools/linux/md2core/$(DEPDIR) src/tools/linux/symupload/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-libLIBRARIES - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLIBRARIES clean-noinstLIBRARIES clean-noinstPROGRAMS \ - ctags dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-libLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/NEWS b/thirdparty/google-breakpad/google-breakpad-r786/NEWS deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/README b/thirdparty/google-breakpad/google-breakpad-r786/README deleted file mode 100644 index 3bccd4be..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/README +++ /dev/null @@ -1,43 +0,0 @@ -Breakpad is a set of client and server components which implement a -crash-reporting system. - - ------ -Getting started in 32-bit mode (from trunk) -Configure: CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure - Build: make - Test: make check - Install: make install - -If you need to reconfigure your build be sure to run "make distclean" first. - - ------ -To request change review: -0. Get access to a read-write copy of source. - Owners at http://code.google.com/p/google-breakpad/ are able to grant - this access. - -1. Check out a read-write copy of source using instructions at - http://code.google.com/p/google-breakpad/source/checkout - -2. Make changes. Build and test your changes. - For core code like processor use methods above. - For linux/mac/windows, there are test targets in each project file. - -3. Download http://codereview.appspot.com/static/upload.py - -4. Run upload.py from the 'src' directory: - upload.py --server=breakpad.appspot.com - - You will be prompted for credential and a description. - -5. At http://breakpad.appspot.com you'll find your issue listed; click on it, - and select Publish+Mail, and enter in the code reviewer and CC - google-breakpad-dev@googlegroups.com - -6. When applying code review feedback, specify the '-i' option when running - upload.py again and pass the issue number so it updates the existing issue, - rather than creating a new one. - Be sure to rerun upload.py from the same directory as you did for previous - uploads to allow for proper diff calculations. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/aclocal.m4 b/thirdparty/google-breakpad/google-breakpad-r786/aclocal.m4 deleted file mode 100644 index 47616f29..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/aclocal.m4 +++ /dev/null @@ -1,1015 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/compile b/thirdparty/google-breakpad/google-breakpad-r786/autotools/compile deleted file mode 120000 index cf0edba2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/compile +++ /dev/null @@ -1 +0,0 @@ -/usr/share/automake-1.11/compile \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.guess b/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.guess deleted file mode 100755 index 396482d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.sub b/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.sub deleted file mode 100755 index fab0aa35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/depcomp b/thirdparty/google-breakpad/google-breakpad-r786/autotools/depcomp deleted file mode 100755 index ca5ea4e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/depcomp +++ /dev/null @@ -1,584 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2006-10-15.18 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. - -# 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, 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. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/install-sh b/thirdparty/google-breakpad/google-breakpad-r786/autotools/install-sh deleted file mode 100755 index 4fbbae7b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/install-sh +++ /dev/null @@ -1,507 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-10-14.15 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - shift - shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac -done - -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; - esac - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - oIFS=$IFS - IFS=/ - $posix_glob && set -f - set fnord $dstdir - shift - $posix_glob && set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/ltmain.sh b/thirdparty/google-breakpad/google-breakpad-r786/autotools/ltmain.sh deleted file mode 100755 index a72f2fd7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/ltmain.sh +++ /dev/null @@ -1,8406 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2.6b -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/autotools/missing b/thirdparty/google-breakpad/google-breakpad-r786/autotools/missing deleted file mode 100755 index 1c8ff704..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/autotools/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/codereview.settings b/thirdparty/google-breakpad/google-breakpad-r786/codereview.settings deleted file mode 100644 index 022e7a33..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/codereview.settings +++ /dev/null @@ -1,5 +0,0 @@ -# This file is used by gcl to get repository specific information. -CODE_REVIEW_SERVER: breakpad.appspot.com -CC_LIST: google-breakpad-dev@googlegroups.com -TRY_ON_UPLOAD: False -VIEW_VC: http://code.google.com/p/google-breakpad/source/detail?r= diff --git a/thirdparty/google-breakpad/google-breakpad-r786/configure b/thirdparty/google-breakpad/google-breakpad-r786/configure deleted file mode 100755 index b0c84502..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/configure +++ /dev/null @@ -1,6869 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for breakpad 0.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: google-breakpad-dev@googlegroups.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='breakpad' -PACKAGE_TARNAME='breakpad' -PACKAGE_VERSION='0.1' -PACKAGE_STRING='breakpad 0.1' -PACKAGE_BUGREPORT='google-breakpad-dev@googlegroups.com' -PACKAGE_URL='' - -ac_unique_file="README" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -SELFTEST_FALSE -SELFTEST_TRUE -DISABLE_TOOLS_FALSE -DISABLE_TOOLS_TRUE -DISABLE_PROCESSOR_FALSE -DISABLE_PROCESSOR_TRUE -LINUX_HOST_FALSE -LINUX_HOST_TRUE -PTHREAD_CFLAGS -PTHREAD_LIBS -PTHREAD_CC -ax_pthread_config -EGREP -GREP -RANLIB -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -enable_m32 -enable_processor -enable_tools -enable_selftest -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures breakpad 0.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/breakpad] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of breakpad 0.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-m32 Compile/build with -m32 (default is no) - --disable-processor Don't build processor library (default is no) - --disable-tools Don't build tool binaries (default is no) - --enable-selftest Run extra tests with "make check" (may conflict with - optimizations) (default is no) - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -breakpad configure 0.1 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## --------------------------------------------------- ## -## Report this to google-breakpad-dev@googlegroups.com ## -## --------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by breakpad $as_me 0.1, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in autotools "$srcdir"/autotools; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in autotools \"$srcdir\"/autotools" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='breakpad' - VERSION='0.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' -_am_tools=${am_cv_prog_tar_ustar-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -if test "${am_cv_prog_tar_ustar+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - -ac_config_headers="$ac_config_headers src/config.h" - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# -# 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 3 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -# This is what autoupdate's m4 run will expand. It fires -# the warning (with _au_warn_XXX), outputs it into the -# updated configure.ac (with AC_DIAGNOSE), and then outputs -# the replacement expansion. - - -# This is an auxiliary macro that is also run when -# autoupdate runs m4. It simply calls m4_warning, but -# we need a wrapper so that each warning is emitted only -# once. We break the quoting in m4_warning's argument in -# order to expand this macro's arguments, not AU_DEFUN's. - - -# Finally, this is the expansion that is picked up by -# autoconf. It tells the user to run autoupdate, and -# then outputs the replacement expansion. We do not care -# about autoupdate's warning because that contains -# information on what to do *after* running autoupdate. - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - *-darwin*) - acx_pthread_flags="-pthread $acx_pthread_flags" - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - - -*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ax_pthread_config+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ax_pthread_config"; then - ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ax_pthread_config="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" -fi -fi -ax_pthread_config=$ac_cv_prog_ax_pthread_config -if test -n "$ax_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -$as_echo "$ax_pthread_config" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void routine(void* a) {a=0;} - static void* start_routine(void* a) {return a;} -int -main () -{ -pthread_t th; pthread_attr_t attr; - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_create(&th,0,start_routine,0); - pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_pthread_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -$as_echo "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int attr=$attr; return attr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - attr_name=$attr; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 -$as_echo "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 -$as_echo "${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - for ac_prog in xlc_r cc_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" - - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - - : -else - ax_pthread_ok=no - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in a.out.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "a.out.h" "ac_cv_header_a_out_h" "$ac_includes_default" -if test "x$ac_cv_header_a_out_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_A_OUT_H 1 -_ACEOF - -fi - -done - - -# Only build Linux client libs when compiling for Linux -case $host in - *-*-linux* | *-android* ) - LINUX_HOST=true - ;; -esac - if test x$LINUX_HOST = xtrue; then - LINUX_HOST_TRUE= - LINUX_HOST_FALSE='#' -else - LINUX_HOST_TRUE='#' - LINUX_HOST_FALSE= -fi - - -# Check whether --enable-m32 was given. -if test "${enable_m32+set}" = set; then : - enableval=$enable_m32; case "${enableval}" in - yes) - CFLAGS="${CFLAGS} -m32" - CXXFLAGS="${CXXFLAGS} -m32" - usem32=true - ;; - no) - usem32=false - ;; - *) - as_fn_error "bad value ${enableval} for --enable-m32" "$LINENO" 5 - ;; - esac -else - usem32=false -fi - - -# Check whether --enable-processor was given. -if test "${enable_processor+set}" = set; then : - enableval=$enable_processor; case "${enableval}" in - yes) - disable_processor=false - ;; - no) - disable_processor=true - ;; - *) - as_fn_error "bad value ${enableval} for --disable-processor" "$LINENO" 5 - ;; - esac -else - disable_processor=false -fi - - if test x$disable_processor = xtrue; then - DISABLE_PROCESSOR_TRUE= - DISABLE_PROCESSOR_FALSE='#' -else - DISABLE_PROCESSOR_TRUE='#' - DISABLE_PROCESSOR_FALSE= -fi - - -# Check whether --enable-tools was given. -if test "${enable_tools+set}" = set; then : - enableval=$enable_tools; case "${enableval}" in - yes) - disable_tools=false - ;; - no) - disable_tools=true - ;; - *) - as_fn_error "bad value ${enableval} for --disable-tools" "$LINENO" 5 - ;; - esac -else - disable_tools=false -fi - - if test x$disable_tools = xtrue; then - DISABLE_TOOLS_TRUE= - DISABLE_TOOLS_FALSE='#' -else - DISABLE_TOOLS_TRUE='#' - DISABLE_TOOLS_FALSE= -fi - - -if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then - as_fn_error "--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!" "$LINENO" 5 -fi - -ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include -" -if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then : - -$as_echo "#define GET_SA_LEN(X) (((struct sockaddr*)&(X))->sa_len)" >>confdefs.h - -else - -$as_echo "#define GET_SA_LEN(X) (((struct sockaddr*)&(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \\ - ((struct sockaddr*)&(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr))" >>confdefs.h - -fi - - -# Check whether --enable-selftest was given. -if test "${enable_selftest+set}" = set; then : - enableval=$enable_selftest; case "${enableval}" in - yes) - selftest=true - ;; - no) - selftest=false - ;; - *) - as_fn_error "bad value ${enableval} for --enable-selftest" "$LINENO" 5 - ;; - esac -else - selftest=false -fi - - if test x$selftest = xtrue; then - SELFTEST_TRUE= - SELFTEST_FALSE='#' -else - SELFTEST_TRUE='#' - SELFTEST_FALSE= -fi - - -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${LINUX_HOST_TRUE}" && test -z "${LINUX_HOST_FALSE}"; then - as_fn_error "conditional \"LINUX_HOST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DISABLE_PROCESSOR_TRUE}" && test -z "${DISABLE_PROCESSOR_FALSE}"; then - as_fn_error "conditional \"DISABLE_PROCESSOR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DISABLE_TOOLS_TRUE}" && test -z "${DISABLE_TOOLS_FALSE}"; then - as_fn_error "conditional \"DISABLE_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SELFTEST_TRUE}" && test -z "${SELFTEST_FALSE}"; then - as_fn_error "conditional \"SELFTEST\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by breakpad $as_me 0.1, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -breakpad config.status 0.1 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/configure.ac deleted file mode 100644 index 58e417dc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/configure.ac +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -AC_PREREQ(2.57) - -AC_INIT(breakpad, 0.1, google-breakpad-dev@googlegroups.com) -dnl Sanity check: the argument is just a file that should exist. -AC_CONFIG_SRCDIR(README) -AC_CONFIG_AUX_DIR(autotools) -AC_CONFIG_MACRO_DIR([m4]) -AC_CANONICAL_HOST - -AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.11.1) -AM_CONFIG_HEADER(src/config.h) - -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_RANLIB - -AC_HEADER_STDC -m4_include(m4/ax_pthread.m4) -AX_PTHREAD -AC_CHECK_HEADERS([a.out.h]) - -# Only build Linux client libs when compiling for Linux -case $host in - *-*-linux* | *-android* ) - LINUX_HOST=true - ;; -esac -AM_CONDITIONAL(LINUX_HOST, test x$LINUX_HOST = xtrue) - -AC_ARG_ENABLE(m32, - AS_HELP_STRING([--enable-m32], - [Compile/build with -m32] - [(default is no)]), - [case "${enableval}" in - yes) - CFLAGS="${CFLAGS} -m32" - CXXFLAGS="${CXXFLAGS} -m32" - usem32=true - ;; - no) - usem32=false - ;; - *) - AC_MSG_ERROR(bad value ${enableval} for --enable-m32) - ;; - esac], - [usem32=false]) - -AC_ARG_ENABLE(processor, - AS_HELP_STRING([--disable-processor], - [Don't build processor library] - [(default is no)]), - [case "${enableval}" in - yes) - disable_processor=false - ;; - no) - disable_processor=true - ;; - *) - AC_MSG_ERROR(bad value ${enableval} for --disable-processor) - ;; - esac], - [disable_processor=false]) -AM_CONDITIONAL(DISABLE_PROCESSOR, test x$disable_processor = xtrue) - -AC_ARG_ENABLE(tools, - AS_HELP_STRING([--disable-tools], - [Don't build tool binaries] - [(default is no)]), - [case "${enableval}" in - yes) - disable_tools=false - ;; - no) - disable_tools=true - ;; - *) - AC_MSG_ERROR(bad value ${enableval} for --disable-tools) - ;; - esac], - [disable_tools=false]) -AM_CONDITIONAL(DISABLE_TOOLS, test x$disable_tools = xtrue) - -if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then - AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!]) -fi - -AC_CHECK_MEMBER(struct sockaddr.sa_len, - [AC_DEFINE([GET_SA_LEN(X)],[(((struct sockaddr*)&(X))->sa_len)], - [actual length of specific struct sockaddr])], - [AC_DEFINE([GET_SA_LEN(X)], - [(((struct sockaddr*)&(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \ - ((struct sockaddr*)&(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr))], - [actual length of specific struct sockaddr])], - [#include ]) - -AC_ARG_ENABLE(selftest, - AS_HELP_STRING([--enable-selftest], - [Run extra tests with "make check" ] - [(may conflict with optimizations) ] - [(default is no)]), - [case "${enableval}" in - yes) - selftest=true - ;; - no) - selftest=false - ;; - *) - AC_MSG_ERROR(bad value ${enableval} for --enable-selftest) - ;; - esac], - [selftest=false]) -AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/ax_pthread.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/ax_pthread.m4 deleted file mode 100644 index ca164eb2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/ax_pthread.m4 +++ /dev/null @@ -1,283 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# -# 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 3 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, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 6 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) - AC_MSG_RESULT($ax_pthread_ok) - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - *-darwin*) - acx_pthread_flags="-pthread $acx_pthread_flags" - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include - static void routine(void* a) {a=0;} - static void* start_routine(void* a) {return a;}], - [pthread_t th; pthread_attr_t attr; - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_create(&th,0,start_routine,0); - pthread_cleanup_pop(0); ], - [ax_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($ax_pthread_ok) - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl AX_PTHREAD \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/libtool.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/libtool.m4 deleted file mode 100644 index a3fee536..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/libtool.m4 +++ /dev/null @@ -1,7377 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltoptions.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/ltoptions.m4 deleted file mode 100644 index 34151a3b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltsugar.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/ltsugar.m4 deleted file mode 100644 index 9000a057..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltversion.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/ltversion.m4 deleted file mode 100644 index f3c53098..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/m4/lt~obsolete.m4 b/thirdparty/google-breakpad/google-breakpad-r786/m4/lt~obsolete.m4 deleted file mode 100644 index 637bb206..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/breakpad_googletest_includes.h b/thirdparty/google-breakpad/google-breakpad-r786/src/breakpad_googletest_includes.h deleted file mode 100644 index 48a4cc1b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/breakpad_googletest_includes.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef BREAKPAD_GOOGLETEST_INCLUDES_H__ -#define BREAKPAD_GOOGLETEST_INCLUDES_H__ - -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/include/gmock/gmock.h" - -#endif // BREAKPAD_GOOGLETEST_INCLUDES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_link.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_link.h deleted file mode 100644 index 430ac3b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_link.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The Android NDK doesn't have link.h. Fortunately, the only thing -// that Breakpad uses from it is the ElfW macro, so define it here. - -#ifndef GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_LINK_H_ -#define GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_LINK_H_ - -#include - -#ifndef ElfW -#define ElfW(type) _ElfW (Elf, ELFSIZE, type) -#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) -#define _ElfW_1(e,w,t) e##w##t -#endif - -#endif // GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_LINK_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_ucontext.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_ucontext.h deleted file mode 100644 index 30a4e6c2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/android_ucontext.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Android runs a fairly new Linux kernel, so signal info is there, -// but the NDK doesn't have the structs defined, so define -// them here. -// Adapted from platform-linux.cc in V8 - -#ifndef GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_UCONTEXT_H_ -#define GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_UCONTEXT_H_ - -#include - -#if !defined(__GLIBC__) && (defined(__arm__) || defined(__thumb__)) - -struct sigcontext { - uint32_t trap_no; - uint32_t error_code; - uint32_t oldmask; - uint32_t arm_r0; - uint32_t arm_r1; - uint32_t arm_r2; - uint32_t arm_r3; - uint32_t arm_r4; - uint32_t arm_r5; - uint32_t arm_r6; - uint32_t arm_r7; - uint32_t arm_r8; - uint32_t arm_r9; - uint32_t arm_r10; - uint32_t arm_fp; - uint32_t arm_ip; - uint32_t arm_sp; - uint32_t arm_lr; - uint32_t arm_pc; - uint32_t arm_cpsr; - uint32_t fault_address; -}; -typedef uint32_t __sigset_t; -typedef struct sigcontext mcontext_t; -typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; -} ucontext_t; - -#endif - -#endif // GOOGLE_BREAKPAD_CLIENT_LINUX_ANDROID_UCONTEXT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/client_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/client_info.h deleted file mode 100644 index 173b34d8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/client_info.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ -#define CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ - -namespace google_breakpad { - -class CrashGenerationServer; - -struct ClientInfo { - CrashGenerationServer* crash_server_; - pid_t pid_; -}; - -} - -#endif // CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.cc deleted file mode 100644 index 3cc7eb44..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include - -#include "client/linux/crash_generation/crash_generation_client.h" -#include "common/linux/eintr_wrapper.h" -#include "common/linux/linux_libc_support.h" -#include "third_party/lss/linux_syscall_support.h" - -namespace google_breakpad { - -bool -CrashGenerationClient::RequestDump(const void* blob, size_t blob_size) -{ - int fds[2]; - sys_socketpair(AF_UNIX, SOCK_STREAM, 0, fds); - static const unsigned kControlMsgSize = CMSG_SPACE(sizeof(int)); - - struct kernel_msghdr msg; - my_memset(&msg, 0, sizeof(struct kernel_msghdr)); - struct kernel_iovec iov[1]; - iov[0].iov_base = const_cast(blob); - iov[0].iov_len = blob_size; - - msg.msg_iov = iov; - msg.msg_iovlen = sizeof(iov) / sizeof(iov[0]); - char cmsg[kControlMsgSize]; - my_memset(cmsg, 0, kControlMsgSize); - msg.msg_control = cmsg; - msg.msg_controllen = sizeof(cmsg); - - struct cmsghdr* hdr = CMSG_FIRSTHDR(&msg); - hdr->cmsg_level = SOL_SOCKET; - hdr->cmsg_type = SCM_RIGHTS; - hdr->cmsg_len = CMSG_LEN(sizeof(int)); - int* p = reinterpret_cast(CMSG_DATA(hdr)); - *p = fds[1]; - - HANDLE_EINTR(sys_sendmsg(server_fd_, &msg, 0)); - sys_close(fds[1]); - - // wait for an ACK from the server - char b; - HANDLE_EINTR(sys_read(fds[0], &b, 1)); - - return true; -} - -//static -CrashGenerationClient* -CrashGenerationClient::TryCreate(int server_fd) -{ - if (0 > server_fd) - return NULL; - return new CrashGenerationClient(server_fd); -} - -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.h deleted file mode 100644 index 7139dff4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ -#define CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ - -#include - -namespace google_breakpad { - -class CrashGenerationClient { -public: - ~CrashGenerationClient() - { - } - - // Request the crash server to generate a dump. |blob| is a hack, - // see exception_handler.h and minidump_writer.h - // - // Return true if the dump was successful; false otherwise. - bool RequestDump(const void* blob, size_t blob_size); - - // Return a new CrashGenerationClient if |server_fd| is valid and - // connects to a CrashGenerationServer. Otherwise, return NULL. - // The returned CrashGenerationClient* is owned by the caller of - // this function. - static CrashGenerationClient* TryCreate(int server_fd); - -private: - CrashGenerationClient(int server_fd) : server_fd_(server_fd) - { - } - - int server_fd_; - - // prevent copy construction and assignment - CrashGenerationClient(const CrashGenerationClient&); - CrashGenerationClient& operator=(const CrashGenerationClient&); -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.cc deleted file mode 100644 index 2f7edb69..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.cc +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "client/linux/crash_generation/crash_generation_server.h" -#include "client/linux/crash_generation/client_info.h" -#include "client/linux/handler/exception_handler.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/linux/eintr_wrapper.h" -#include "common/linux/guid_creator.h" - -static const char kCommandQuit = 'x'; - -static bool -GetInodeForFileDescriptor(ino_t* inode_out, int fd) -{ - assert(inode_out); - - struct stat buf; - if (fstat(fd, &buf) < 0) - return false; - - if (!S_ISSOCK(buf.st_mode)) - return false; - - *inode_out = buf.st_ino; - return true; -} - -// expected prefix of the target of the /proc/self/fd/%d link for a socket -static const char kSocketLinkPrefix[] = "socket:["; - -// Parse a symlink in /proc/pid/fd/$x and return the inode number of the -// socket. -// inode_out: (output) set to the inode number on success -// path: e.g. /proc/1234/fd/5 (must be a UNIX domain socket descriptor) -static bool -GetInodeForProcPath(ino_t* inode_out, const char* path) -{ - assert(inode_out); - assert(path); - - char buf[256]; - const ssize_t n = readlink(path, buf, sizeof(buf) - 1); - if (n == -1) { - return false; - } - buf[n] = 0; - - if (0 != memcmp(kSocketLinkPrefix, buf, sizeof(kSocketLinkPrefix) - 1)) { - return false; - } - - char* endptr; - const u_int64_t inode_ul = - strtoull(buf + sizeof(kSocketLinkPrefix) - 1, &endptr, 10); - if (*endptr != ']') - return false; - - if (inode_ul == ULLONG_MAX) { - return false; - } - - *inode_out = inode_ul; - return true; -} - -static bool -FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode) -{ - assert(pid_out); - bool already_found = false; - - DIR* proc = opendir("/proc"); - if (!proc) { - return false; - } - - std::vector pids; - - struct dirent* dent; - while ((dent = readdir(proc))) { - char* endptr; - const unsigned long int pid_ul = strtoul(dent->d_name, &endptr, 10); - if (pid_ul == ULONG_MAX || '\0' != *endptr) - continue; - pids.push_back(pid_ul); - } - closedir(proc); - - for (std::vector::const_iterator - i = pids.begin(); i != pids.end(); ++i) { - const pid_t current_pid = *i; - char buf[256]; - snprintf(buf, sizeof(buf), "/proc/%d/fd", current_pid); - DIR* fd = opendir(buf); - if (!fd) - continue; - - while ((dent = readdir(fd))) { - if (snprintf(buf, sizeof(buf), "/proc/%d/fd/%s", current_pid, - dent->d_name) >= static_cast(sizeof(buf))) { - continue; - } - - ino_t fd_inode; - if (GetInodeForProcPath(&fd_inode, buf) - && fd_inode == socket_inode) { - if (already_found) { - closedir(fd); - return false; - } - - already_found = true; - *pid_out = current_pid; - break; - } - } - - closedir(fd); - } - - return already_found; -} - -namespace google_breakpad { - -CrashGenerationServer::CrashGenerationServer( - const int listen_fd, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitingCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::string* dump_path) : - server_fd_(listen_fd), - dump_callback_(dump_callback), - dump_context_(dump_context), - exit_callback_(exit_callback), - exit_context_(exit_context), - generate_dumps_(generate_dumps), - started_(false) -{ - if (dump_path) - dump_dir_ = *dump_path; - else - dump_dir_ = "/tmp"; -} - -CrashGenerationServer::~CrashGenerationServer() -{ - if (started_) - Stop(); -} - -bool -CrashGenerationServer::Start() -{ - if (started_ || 0 > server_fd_) - return false; - - int control_pipe[2]; - if (pipe(control_pipe)) - return false; - - if (fcntl(control_pipe[0], F_SETFD, FD_CLOEXEC)) - return false; - if (fcntl(control_pipe[1], F_SETFD, FD_CLOEXEC)) - return false; - - if (fcntl(control_pipe[0], F_SETFL, O_NONBLOCK)) - return false; - - control_pipe_in_ = control_pipe[0]; - control_pipe_out_ = control_pipe[1]; - - if (pthread_create(&thread_, NULL, - ThreadMain, reinterpret_cast(this))) - return false; - - started_ = true; - return true; -} - -void -CrashGenerationServer::Stop() -{ - assert(pthread_self() != thread_); - - if (!started_) - return; - - HANDLE_EINTR(write(control_pipe_out_, &kCommandQuit, 1)); - - void* dummy; - pthread_join(thread_, &dummy); - - started_ = false; -} - -//static -bool -CrashGenerationServer::CreateReportChannel(int* server_fd, int* client_fd) -{ - int fds[2]; - - if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds)) - return false; - - static const int on = 1; - // Enable passcred on the server end of the socket - if (setsockopt(fds[1], SOL_SOCKET, SO_PASSCRED, &on, sizeof(on))) - return false; - - if (fcntl(fds[1], F_SETFL, O_NONBLOCK)) - return false; - if (fcntl(fds[1], F_SETFD, FD_CLOEXEC)) - return false; - - *client_fd = fds[0]; - *server_fd = fds[1]; - return true; -} - -// The following methods/functions execute on the server thread - -void -CrashGenerationServer::Run() -{ - struct pollfd pollfds[2]; - memset(&pollfds, 0, sizeof(pollfds)); - - pollfds[0].fd = server_fd_; - pollfds[0].events = POLLIN; - - pollfds[1].fd = control_pipe_in_; - pollfds[1].events = POLLIN; - - while (true) { - // infinite timeout - int nevents = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), -1); - if (-1 == nevents) { - if (EINTR == errno) { - continue; - } else { - return; - } - } - - if (pollfds[0].revents && !ClientEvent(pollfds[0].revents)) - return; - - if (pollfds[1].revents && !ControlEvent(pollfds[1].revents)) - return; - } -} - -bool -CrashGenerationServer::ClientEvent(short revents) -{ - if (POLLHUP & revents) - return false; - assert(POLLIN & revents); - - // A process has crashed and has signaled us by writing a datagram - // to the death signal socket. The datagram contains the crash context needed - // for writing the minidump as well as a file descriptor and a credentials - // block so that they can't lie about their pid. - - // The length of the control message: - static const unsigned kControlMsgSize = - CMSG_SPACE(sizeof(int)) + CMSG_SPACE(sizeof(struct ucred)); - // The length of the regular payload: - static const unsigned kCrashContextSize = - sizeof(google_breakpad::ExceptionHandler::CrashContext); - - struct msghdr msg = {0}; - struct iovec iov[1]; - char crash_context[kCrashContextSize]; - char control[kControlMsgSize]; - const ssize_t expected_msg_size = sizeof(crash_context); - - iov[0].iov_base = crash_context; - iov[0].iov_len = sizeof(crash_context); - msg.msg_iov = iov; - msg.msg_iovlen = sizeof(iov)/sizeof(iov[0]); - msg.msg_control = control; - msg.msg_controllen = kControlMsgSize; - - const ssize_t msg_size = HANDLE_EINTR(recvmsg(server_fd_, &msg, 0)); - if (msg_size != expected_msg_size) - return true; - - if (msg.msg_controllen != kControlMsgSize || - msg.msg_flags & ~MSG_TRUNC) - return true; - - // Walk the control payload and extract the file descriptor and validated pid. - pid_t crashing_pid = -1; - int signal_fd = -1; - for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr; - hdr = CMSG_NXTHDR(&msg, hdr)) { - if (hdr->cmsg_level != SOL_SOCKET) - continue; - if (hdr->cmsg_type == SCM_RIGHTS) { - const unsigned len = hdr->cmsg_len - - (((uint8_t*)CMSG_DATA(hdr)) - (uint8_t*)hdr); - assert(len % sizeof(int) == 0u); - const unsigned num_fds = len / sizeof(int); - if (num_fds > 1 || num_fds == 0) { - // A nasty process could try and send us too many descriptors and - // force a leak. - for (unsigned i = 0; i < num_fds; ++i) - HANDLE_EINTR(close(reinterpret_cast(CMSG_DATA(hdr))[i])); - return true; - } else { - signal_fd = reinterpret_cast(CMSG_DATA(hdr))[0]; - } - } else if (hdr->cmsg_type == SCM_CREDENTIALS) { - const struct ucred *cred = - reinterpret_cast(CMSG_DATA(hdr)); - crashing_pid = cred->pid; - } - } - - if (crashing_pid == -1 || signal_fd == -1) { - if (signal_fd) - HANDLE_EINTR(close(signal_fd)); - return true; - } - - // Kernel bug workaround (broken in 2.6.30 at least): - // The kernel doesn't translate PIDs in SCM_CREDENTIALS across PID - // namespaces. Thus |crashing_pid| might be garbage from our point of view. - // In the future we can remove this workaround, but we have to wait a couple - // of years to be sure that it's worked its way out into the world. - - ino_t inode_number; - if (!GetInodeForFileDescriptor(&inode_number, signal_fd)) { - HANDLE_EINTR(close(signal_fd)); - return true; - } - - if (!FindProcessHoldingSocket(&crashing_pid, inode_number - 1)) { - HANDLE_EINTR(close(signal_fd)); - return true; - } - - std::string minidump_filename; - if (!MakeMinidumpFilename(minidump_filename)) - return true; - - if (!google_breakpad::WriteMinidump(minidump_filename.c_str(), - crashing_pid, crash_context, - kCrashContextSize)) { - HANDLE_EINTR(close(signal_fd)); - return true; - } - - if (dump_callback_) { - ClientInfo info; - - info.crash_server_ = this; - info.pid_ = crashing_pid; - - dump_callback_(dump_context_, &info, &minidump_filename); - } - - // Send the done signal to the process: it can exit now. - memset(&msg, 0, sizeof(msg)); - struct iovec done_iov; - done_iov.iov_base = const_cast("\x42"); - done_iov.iov_len = 1; - msg.msg_iov = &done_iov; - msg.msg_iovlen = 1; - - HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL)); - HANDLE_EINTR(close(signal_fd)); - - return true; -} - -bool -CrashGenerationServer::ControlEvent(short revents) -{ - if (POLLHUP & revents) - return false; - assert(POLLIN & revents); - - char command; - if (read(control_pipe_in_, &command, 1)) - return false; - - switch (command) { - case kCommandQuit: - return false; - default: - assert(0); - } - - return true; -} - -bool -CrashGenerationServer::MakeMinidumpFilename(std::string& outFilename) -{ - GUID guid; - char guidString[kGUIDStringLength+1]; - - if (!(CreateGUID(&guid) - && GUIDToString(&guid, guidString, sizeof(guidString)))) - return false; - - char path[PATH_MAX]; - snprintf(path, sizeof(path), "%s/%s.dmp", dump_dir_.c_str(), guidString); - - outFilename = path; - return true; -} - -// static -void* -CrashGenerationServer::ThreadMain(void *arg) -{ - reinterpret_cast(arg)->Run(); - return NULL; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.h deleted file mode 100644 index a9dc1f7f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ -#define CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ - -#include - -#include - -namespace google_breakpad { - -class ClientInfo; - -class CrashGenerationServer { -public: - // WARNING: callbacks may be invoked on a different thread - // than that which creates the CrashGenerationServer. They must - // be thread safe. - typedef void (*OnClientDumpRequestCallback)(void* context, - const ClientInfo* client_info, - const std::string* file_path); - - typedef void (*OnClientExitingCallback)(void* context, - const ClientInfo* client_info); - - // Create an instance with the given parameters. - // - // Parameter listen_fd: The server fd created by CreateReportChannel(). - // Parameter dump_callback: Callback for a client crash dump request. - // Parameter dump_context: Context for client crash dump request callback. - // Parameter exit_callback: Callback for client process exit. - // Parameter exit_context: Context for client exit callback. - // Parameter generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly - // in the crash dump request callback. In that case, false can be - // passed for this parameter. - // Parameter dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const int listen_fd, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitingCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::string* dump_path); - - ~CrashGenerationServer(); - - // Perform initialization steps needed to start listening to clients. - // - // Return true if initialization is successful; false otherwise. - bool Start(); - - // Stop the server. - void Stop(); - - // Create a "channel" that can be used by clients to report crashes - // to a CrashGenerationServer. |*server_fd| should be passed to - // this class's constructor, and |*client_fd| should be passed to - // the ExceptionHandler constructor in the client process. - static bool CreateReportChannel(int* server_fd, int* client_fd); - -private: - // Run the server's event loop - void Run(); - - // Invoked when an child process (client) event occurs - // Returning true => "keep running", false => "exit loop" - bool ClientEvent(short revents); - - // Invoked when the controlling thread (main) event occurs - // Returning true => "keep running", false => "exit loop" - bool ControlEvent(short revents); - - // Return a unique filename at which a minidump can be written - bool MakeMinidumpFilename(std::string& outFilename); - - // Trampoline to |Run()| - static void* ThreadMain(void* arg); - - int server_fd_; - - OnClientDumpRequestCallback dump_callback_; - void* dump_context_; - - OnClientExitingCallback exit_callback_; - void* exit_context_; - - bool generate_dumps_; - - std::string dump_dir_; - - bool started_; - - pthread_t thread_; - int control_pipe_in_; - int control_pipe_out_; - - // disable these - CrashGenerationServer(const CrashGenerationServer&); - CrashGenerationServer& operator=(const CrashGenerationServer&); -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-amd.sym b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-amd.sym deleted file mode 100644 index e042a5ec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-amd.sym +++ /dev/null @@ -1,3 +0,0 @@ -MODULE Linux x86 B8CFDE93002D54DA1900A40AA1BD67690 linux-gate.so -PUBLIC 400 0 __kernel_vsyscall -STACK WIN 4 400 100 1 1 0 0 0 0 0 1 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-intel.sym b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-intel.sym deleted file mode 100644 index c209c237..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/data/linux-gate-intel.sym +++ /dev/null @@ -1,3 +0,0 @@ -MODULE Linux x86 4FBDA58B5A1DF5A379E3CF19A235EA090 linux-gate.so -PUBLIC 400 0 __kernel_vsyscall -STACK WIN 4 400 200 3 3 0 0 0 0 0 1 \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.cc deleted file mode 100644 index 096ec0d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.cc +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The ExceptionHandler object installs signal handlers for a number of -// signals. We rely on the signal handler running on the thread which crashed -// in order to identify it. This is true of the synchronous signals (SEGV etc), -// but not true of ABRT. Thus, if you send ABRT to yourself in a program which -// uses ExceptionHandler, you need to use tgkill to direct it to the current -// thread. -// -// The signal flow looks like this: -// -// SignalHandler (uses a global stack of ExceptionHandler objects to find -// | one to handle the signal. If the first rejects it, try -// | the second etc...) -// V -// HandleSignal ----------------------------| (clones a new process which -// | | shares an address space with -// (wait for cloned | the crashed process. This -// process) | allows us to ptrace the crashed -// | | process) -// V V -// (set signal handler to ThreadEntry (static function to bounce -// SIG_DFL and rethrow, | back into the object) -// killing the crashed | -// process) V -// DoDump (writes minidump) -// | -// V -// sys_exit -// - -// This code is a little fragmented. Different functions of the ExceptionHandler -// class run in a number of different contexts. Some of them run in a normal -// context and are easy to code, others run in a compromised context and the -// restrictions at the top of minidump_writer.cc apply: no libc and use the -// alternative malloc. Each function should have comment above it detailing the -// context which it runs in. - -#include "client/linux/handler/exception_handler.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(__ANDROID__) -#include -#endif -#include -#if !defined(__ANDROID__) -#include -#include -#endif -#include -#if !defined(__ANDROID__) -#include -#endif -#include - -#include -#include -#include - -#include "common/linux/linux_libc_support.h" -#include "common/memory.h" -#include "client/linux/minidump_writer/linux_dumper.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/linux/guid_creator.h" -#include "common/linux/eintr_wrapper.h" -#include "third_party/lss/linux_syscall_support.h" - -#ifndef PR_SET_PTRACER -#define PR_SET_PTRACER 0x59616d61 -#endif - -// A wrapper for the tgkill syscall: send a signal to a specific thread. -static int tgkill(pid_t tgid, pid_t tid, int sig) { - return syscall(__NR_tgkill, tgid, tid, sig); - return 0; -} - -namespace google_breakpad { - -// The list of signals which we consider to be crashes. The default action for -// all these signals must be Core (see man 7 signal) because we rethrow the -// signal after handling it and expect that it'll be fatal. -static const int kExceptionSignals[] = { - SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, -1 -}; - -// We can stack multiple exception handlers. In that case, this is the global -// which holds the stack. -std::vector* ExceptionHandler::handler_stack_ = NULL; -unsigned ExceptionHandler::handler_stack_index_ = 0; -pthread_mutex_t ExceptionHandler::handler_stack_mutex_ = - PTHREAD_MUTEX_INITIALIZER; - -// Runs before crashing: normal context. -ExceptionHandler::ExceptionHandler(const std::string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - handler_installed_(install_handler) -{ - Init(dump_path, -1); -} - -ExceptionHandler::ExceptionHandler(const std::string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - bool install_handler, - const int server_fd) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - handler_installed_(install_handler) -{ - Init(dump_path, server_fd); -} - -// Runs before crashing: normal context. -ExceptionHandler::~ExceptionHandler() { - UninstallHandlers(); -} - -void ExceptionHandler::Init(const std::string &dump_path, - const int server_fd) -{ - crash_handler_ = NULL; - if (0 <= server_fd) - crash_generation_client_ - .reset(CrashGenerationClient::TryCreate(server_fd)); - - if (handler_installed_) - InstallHandlers(); - - if (!IsOutOfProcess()) - set_dump_path(dump_path); - - pthread_mutex_lock(&handler_stack_mutex_); - if (handler_stack_ == NULL) - handler_stack_ = new std::vector; - handler_stack_->push_back(this); - pthread_mutex_unlock(&handler_stack_mutex_); -} - -// Runs before crashing: normal context. -bool ExceptionHandler::InstallHandlers() { - // We run the signal handlers on an alternative stack because we might have - // crashed because of a stack overflow. - - // We use this value rather than SIGSTKSZ because we would end up overrunning - // such a small stack. - static const unsigned kSigStackSize = 8192; - - signal_stack = malloc(kSigStackSize); - stack_t stack; - memset(&stack, 0, sizeof(stack)); - stack.ss_sp = signal_stack; - stack.ss_size = kSigStackSize; - - if (sys_sigaltstack(&stack, NULL) == -1) - return false; - - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sigemptyset(&sa.sa_mask); - - // mask all exception signals when we're handling one of them. - for (unsigned i = 0; kExceptionSignals[i] != -1; ++i) - sigaddset(&sa.sa_mask, kExceptionSignals[i]); - - sa.sa_sigaction = SignalHandler; - sa.sa_flags = SA_ONSTACK | SA_SIGINFO; - - for (unsigned i = 0; kExceptionSignals[i] != -1; ++i) { - struct sigaction* old = new struct sigaction; - if (sigaction(kExceptionSignals[i], &sa, old) == -1) - return false; - old_handlers_.push_back(std::make_pair(kExceptionSignals[i], old)); - } - return true; -} - -// Runs before crashing: normal context. -void ExceptionHandler::UninstallHandlers() { - for (unsigned i = 0; i < old_handlers_.size(); ++i) { - struct sigaction *action = - reinterpret_cast(old_handlers_[i].second); - sigaction(old_handlers_[i].first, action, NULL); - delete action; - } - pthread_mutex_lock(&handler_stack_mutex_); - std::vector::iterator handler = - std::find(handler_stack_->begin(), handler_stack_->end(), this); - handler_stack_->erase(handler); - pthread_mutex_unlock(&handler_stack_mutex_); - old_handlers_.clear(); -} - -// Runs before crashing: normal context. -void ExceptionHandler::UpdateNextID() { - GUID guid; - char guid_str[kGUIDStringLength + 1]; - if (CreateGUID(&guid) && GUIDToString(&guid, guid_str, sizeof(guid_str))) { - next_minidump_id_ = guid_str; - next_minidump_id_c_ = next_minidump_id_.c_str(); - - char minidump_path[PATH_MAX]; - snprintf(minidump_path, sizeof(minidump_path), "%s/%s.dmp", - dump_path_c_, - guid_str); - - next_minidump_path_ = minidump_path; - next_minidump_path_c_ = next_minidump_path_.c_str(); - } -} - -// void ExceptionHandler::set_crash_handler(HandlerCallback callback) { -// crash_handler_ = callback; -// } - -// This function runs in a compromised context: see the top of the file. -// Runs on the crashing thread. -// static -void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { - // All the exception signals are blocked at this point. - pthread_mutex_lock(&handler_stack_mutex_); - - if (!handler_stack_->size()) { - pthread_mutex_unlock(&handler_stack_mutex_); - return; - } - - for (int i = handler_stack_->size() - 1; i >= 0; --i) { - if ((*handler_stack_)[i]->HandleSignal(sig, info, uc)) { - // successfully handled: We are in an invalid state since an exception - // signal has been delivered. We don't call the exit handlers because - // they could end up corrupting on-disk state. - break; - } - } - - pthread_mutex_unlock(&handler_stack_mutex_); - - if (info->si_pid) { - // This signal was triggered by somebody sending us the signal with kill(). - // In order to retrigger it, we have to queue a new signal by calling - // kill() ourselves. - if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) { - // If we failed to kill ourselves (e.g. because a sandbox disallows us - // to do so), we instead resort to terminating our process. This will - // result in an incorrect exit code. - _exit(1); - } - } else { - // This was a synchronous signal triggered by a hard fault (e.g. SIGSEGV). - // No need to reissue the signal. It will automatically trigger again, - // when we return from the signal handler. - } - - // As soon as we return from the signal handler, our signal will become - // unmasked. At that time, we will get terminated with the same signal that - // was triggered originally. This allows our parent to know that we crashed. - // The default action for all the signals which we catch is Core, so - // this is the end of us. - signal(sig, SIG_DFL); -} - -struct ThreadArgument { - pid_t pid; // the crashing process - ExceptionHandler* handler; - const void* context; // a CrashContext structure - size_t context_size; -}; - -// This is the entry function for the cloned process. We are in a compromised -// context here: see the top of the file. -// static -int ExceptionHandler::ThreadEntry(void *arg) { - const ThreadArgument *thread_arg = reinterpret_cast(arg); - - // Block here until the crashing process unblocks us when - // we're allowed to use ptrace - thread_arg->handler->WaitForContinueSignal(); - - return thread_arg->handler->DoDump(thread_arg->pid, thread_arg->context, - thread_arg->context_size) == false; -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the crashing thread. -bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) { - if (filter_ && !filter_(callback_context_)) - return false; - - // Allow ourselves to be dumped if the signal is trusted. - bool signal_trusted = info->si_code > 0; - bool signal_pid_trusted = info->si_code == SI_USER || - info->si_code == SI_TKILL; - if (signal_trusted || (signal_pid_trusted && info->si_pid == getpid())) { - sys_prctl(PR_SET_DUMPABLE, 1); - } - CrashContext context; - memcpy(&context.siginfo, info, sizeof(siginfo_t)); - memcpy(&context.context, uc, sizeof(struct ucontext)); -#if !defined(__ARM_EABI__) - // FP state is not part of user ABI on ARM Linux. - struct ucontext *uc_ptr = (struct ucontext*)uc; - if (uc_ptr->uc_mcontext.fpregs) { - memcpy(&context.float_state, - uc_ptr->uc_mcontext.fpregs, - sizeof(context.float_state)); - } -#endif - context.tid = syscall(__NR_gettid); - if (crash_handler_ != NULL) { - if (crash_handler_(&context, sizeof(context), - callback_context_)) { - return true; - } - } - return GenerateDump(&context); -} - -// This function may run in a compromised context: see the top of the file. -bool ExceptionHandler::GenerateDump(CrashContext *context) { - if (IsOutOfProcess()) - return crash_generation_client_->RequestDump(context, sizeof(*context)); - - static const unsigned kChildStackSize = 8000; - PageAllocator allocator; - uint8_t* stack = (uint8_t*) allocator.Alloc(kChildStackSize); - if (!stack) - return false; - // clone() needs the top-most address. (scrub just to be safe) - stack += kChildStackSize; - my_memset(stack - 16, 0, 16); - - ThreadArgument thread_arg; - thread_arg.handler = this; - thread_arg.pid = getpid(); - thread_arg.context = context; - thread_arg.context_size = sizeof(*context); - - // We need to explicitly enable ptrace of parent processes on some - // kernels, but we need to know the PID of the cloned process before we - // can do this. Create a pipe here which we can use to block the - // cloned process after creating it, until we have explicitly enabled ptrace - if(sys_pipe(fdes) == -1) { - // Creating the pipe failed. We'll log an error but carry on anyway, - // as we'll probably still get a useful crash report. All that will happen - // is the write() and read() calls will fail with EBADF - static const char no_pipe_msg[] = "ExceptionHandler::GenerateDump \ - sys_pipe failed:"; - sys_write(2, no_pipe_msg, sizeof(no_pipe_msg) - 1); - sys_write(2, strerror(errno), strlen(strerror(errno))); - sys_write(2, "\n", 1); - } - - const pid_t child = sys_clone( - ThreadEntry, stack, CLONE_FILES | CLONE_FS | CLONE_UNTRACED, - &thread_arg, NULL, NULL, NULL); - int r, status; - // Allow the child to ptrace us - prctl(PR_SET_PTRACER, child, 0, 0, 0); - SendContinueSignalToChild(); - do { - r = sys_waitpid(child, &status, __WALL); - } while (r == -1 && errno == EINTR); - - sys_close(fdes[0]); - sys_close(fdes[1]); - - if (r == -1) { - static const char msg[] = "ExceptionHandler::GenerateDump waitpid failed:"; - sys_write(2, msg, sizeof(msg) - 1); - sys_write(2, strerror(errno), strlen(strerror(errno))); - sys_write(2, "\n", 1); - } - - bool success = r != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0; - - if (callback_) - success = callback_(dump_path_c_, next_minidump_id_c_, - callback_context_, success); - - return success; -} - -// This function runs in a compromised context: see the top of the file. -void ExceptionHandler::SendContinueSignalToChild() { - static const char okToContinueMessage = 'a'; - int r; - r = HANDLE_EINTR(sys_write(fdes[1], &okToContinueMessage, sizeof(char))); - if(r == -1) { - static const char msg[] = "ExceptionHandler::SendContinueSignalToChild \ - sys_write failed:"; - sys_write(2, msg, sizeof(msg) - 1); - sys_write(2, strerror(errno), strlen(strerror(errno))); - sys_write(2, "\n", 1); - } -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the cloned process. -void ExceptionHandler::WaitForContinueSignal() { - int r; - char receivedMessage; - r = HANDLE_EINTR(sys_read(fdes[0], &receivedMessage, sizeof(char))); - if(r == -1) { - static const char msg[] = "ExceptionHandler::WaitForContinueSignal \ - sys_read failed:"; - sys_write(2, msg, sizeof(msg) - 1); - sys_write(2, strerror(errno), strlen(strerror(errno))); - sys_write(2, "\n", 1); - } -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the cloned process. -bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, - size_t context_size) { - return google_breakpad::WriteMinidump(next_minidump_path_c_, - crashing_process, - context, - context_size, - mapping_list_); -} - -// static -bool ExceptionHandler::WriteMinidump(const std::string &dump_path, - MinidumpCallback callback, - void* callback_context) { - ExceptionHandler eh(dump_path, NULL, callback, callback_context, false); - return eh.WriteMinidump(); -} - -bool ExceptionHandler::WriteMinidump() { -#if !defined(__ARM_EABI__) - // Allow ourselves to be dumped. - sys_prctl(PR_SET_DUMPABLE, 1); - - CrashContext context; - int getcontext_result = getcontext(&context.context); - if (getcontext_result) - return false; - memcpy(&context.float_state, context.context.uc_mcontext.fpregs, - sizeof(context.float_state)); - context.tid = sys_gettid(); - - bool success = GenerateDump(&context); - UpdateNextID(); - return success; -#else - return false; -#endif // !defined(__ARM_EABI__) -} - -void ExceptionHandler::AddMappingInfo(const std::string& name, - const u_int8_t identifier[sizeof(MDGUID)], - uintptr_t start_address, - size_t mapping_size, - size_t file_offset) { - MappingInfo info; - info.start_addr = start_address; - info.size = mapping_size; - info.offset = file_offset; - strncpy(info.name, name.c_str(), std::min(name.size(), sizeof(info))); - - MappingEntry mapping; - mapping.first = info; - memcpy(mapping.second, identifier, sizeof(MDGUID)); - mapping_list_.push_back(mapping); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.h deleted file mode 100644 index e75517ea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler.h +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ -#define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ - -#include -#include - -#include -#include -#include -#include - -#if defined(__ANDROID__) -#include "client/linux/android_ucontext.h" -#endif -#include "client/linux/crash_generation/crash_generation_client.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -struct sigaction; - -namespace google_breakpad { - -class ExceptionHandler; - -// ExceptionHandler -// -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// (NOTE): There should be only be one this kind of exception handler -// object per process. -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// Caller should try to make the callbacks as crash-friendly as possible, -// it should avoid use heap memory allocation as much as possible. -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. succeeded - // indicates whether a minidump file was successfully written. - // - // If an exception occurred and the callback returns true, Breakpad will - // treat the exception as fully-handled, suppressing any other handlers from - // being notified of the exception. If the callback returns false, Breakpad - // will treat the exception as unhandled, and allow another handler to handle - // it. If there are no other handlers, Breakpad will report the exception to - // the system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - typedef bool (*MinidumpCallback)(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded); - - // In certain cases, a user may wish to handle the generation of the minidump - // themselves. In this case, they can install a handler callback which is - // called when a crash has occurred. If this function returns true, no other - // processing of occurs and the process will shortly be crashed. If this - // returns false, the normal processing continues. - typedef bool (*HandlerCallback)(const void* crash_context, - size_t crash_context_size, - void* context); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const std::string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, - bool install_handler); - - // Creates a new ExceptionHandler instance that can attempt to - // perform out-of-process dump generation if server_fd is valid. If - // server_fd is invalid, in-process dump generation will be - // used. See the above ctor for a description of the other - // parameters. - ExceptionHandler(const std::string& dump_path, - FilterCallback filter, MinidumpCallback callback, - void* callback_context, - bool install_handler, - const int server_fd); - - ~ExceptionHandler(); - - // Get and set the minidump path. - std::string dump_path() const { return dump_path_; } - void set_dump_path(const std::string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); - } - - void set_crash_handler(HandlerCallback callback) { - crash_handler_ = callback; - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const std::string &dump_path, - MinidumpCallback callback, - void *callback_context); - - // This structure is passed to minidump_writer.h:WriteMinidump via an opaque - // blob. It shouldn't be needed in any user code. - struct CrashContext { - siginfo_t siginfo; - pid_t tid; // the crashing thread. - struct ucontext context; -#if !defined(__ARM_EABI__) - // #ifdef this out because FP state is not part of user ABI for Linux ARM. - struct _libc_fpstate float_state; -#endif - }; - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { - return crash_generation_client_.get() != NULL; - } - - // Add information about a memory mapping. This can be used if - // a custom library loader is used that maps things in a way - // that the linux dumper can't handle by reading the maps file. - void AddMappingInfo(const std::string& name, - const u_int8_t identifier[sizeof(MDGUID)], - uintptr_t start_address, - size_t mapping_size, - size_t file_offset); - - private: - void Init(const std::string &dump_path, - const int server_fd); - bool InstallHandlers(); - void UninstallHandlers(); - void PreresolveSymbols(); - bool GenerateDump(CrashContext *context); - void SendContinueSignalToChild(); - void WaitForContinueSignal(); - - void UpdateNextID(); - static void SignalHandler(int sig, siginfo_t* info, void* uc); - bool HandleSignal(int sig, siginfo_t* info, void* uc); - static int ThreadEntry(void* arg); - bool DoDump(pid_t crashing_process, const void* context, - size_t context_size); - - const FilterCallback filter_; - const MinidumpCallback callback_; - void* const callback_context_; - - scoped_ptr crash_generation_client_; - - std::string dump_path_; - std::string next_minidump_path_; - std::string next_minidump_id_; - - // Pointers to C-string representations of the above. These are set - // when the above are set so we can avoid calling c_str during - // an exception. - const char* dump_path_c_; - const char* next_minidump_path_c_; - const char* next_minidump_id_c_; - - const bool handler_installed_; - void* signal_stack; // the handler stack. - HandlerCallback crash_handler_; - - // The global exception handler stack. This is need becuase there may exist - // multiple ExceptionHandler instances in a process. Each will have itself - // registered in this stack. - static std::vector *handler_stack_; - // The index of the handler that should handle the next exception. - static unsigned handler_stack_index_; - static pthread_mutex_t handler_stack_mutex_; - - // A vector of the old signal handlers. - std::vector > old_handlers_; - - // We need to explicitly enable ptrace of parent processes on some - // kernels, but we need to know the PID of the cloned process before we - // can do this. We create a pipe which we can use to block the - // cloned process after creating it, until we have explicitly enabled - // ptrace. This is used to store the file descriptors for the pipe - int fdes[2]; - - // Callers can add extra info about mappings for cases where the - // dumper code cannot extract enough information from /proc//maps. - MappingList mapping_list_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler_unittest.cc deleted file mode 100644 index 7186db9f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/handler/exception_handler_unittest.cc +++ /dev/null @@ -1,775 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "breakpad_googletest_includes.h" -#include "client/linux/handler/exception_handler.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/linux/eintr_wrapper.h" -#include "common/linux/file_id.h" -#include "common/linux/linux_libc_support.h" -#include "third_party/lss/linux_syscall_support.h" -#include "google_breakpad/processor/minidump.h" - -using namespace google_breakpad; - -#if !defined(__ANDROID__) -#define TEMPDIR "/tmp" -#else -#define TEMPDIR "/data/local/tmp" -#endif - -// Length of a formatted GUID string = -// sizeof(MDGUID) * 2 + 4 (for dashes) + 1 (null terminator) -const int kGUIDStringSize = 37; - -static void sigchld_handler(int signo) { } - -class ExceptionHandlerTest : public ::testing::Test { - protected: - void SetUp() { - // We need to be able to wait for children, so SIGCHLD cannot be SIG_IGN. - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = sigchld_handler; - ASSERT_NE(sigaction(SIGCHLD, &sa, &old_action), -1); - } - - void TearDown() { - sigaction(SIGCHLD, &old_action, NULL); - } - - struct sigaction old_action; -}; - -TEST(ExceptionHandlerTest, Simple) { - ExceptionHandler handler(TEMPDIR, NULL, NULL, NULL, true); -} - -static bool DoneCallback(const char* dump_path, - const char* minidump_id, - void* context, - bool succeeded) { - if (!succeeded) - return succeeded; - - int fd = (intptr_t) context; - uint32_t len = my_strlen(minidump_id); - HANDLE_EINTR(sys_write(fd, &len, sizeof(len))); - HANDLE_EINTR(sys_write(fd, minidump_id, len)); - sys_close(fd); - - return true; -} - -TEST(ExceptionHandlerTest, ChildCrash) { - int fds[2]; - ASSERT_NE(pipe(fds), -1); - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler(TEMPDIR, NULL, DoneCallback, (void*) fds[1], - true); - *reinterpret_cast(NULL) = 0; - } - close(fds[1]); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGSEGV); - - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); - ASSERT_EQ(r, 1); - ASSERT_TRUE(pfd.revents & POLLIN); - - uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); - ASSERT_LT(len, (uint32_t)2048); - char* filename = reinterpret_cast(malloc(len + 1)); - ASSERT_EQ(read(fds[0], filename, len), len); - filename[len] = 0; - close(fds[0]); - - const std::string minidump_filename = std::string(TEMPDIR) + "/" + filename + - ".dmp"; - - struct stat st; - ASSERT_EQ(stat(minidump_filename.c_str(), &st), 0); - ASSERT_GT(st.st_size, 0u); - unlink(minidump_filename.c_str()); -} - -// Test that memory around the instruction pointer is written -// to the dump as a MinidumpMemoryRegion. -TEST(ExceptionHandlerTest, InstructionPointerMemory) { - int fds[2]; - ASSERT_NE(pipe(fds), -1); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = 256; // bytes - const int kOffset = kMemorySize / 2; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler(TEMPDIR, NULL, DoneCallback, (void*) fds[1], - true); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them in the middle - // of the block of memory, because the minidump should contain 128 - // bytes on either side of the instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - } - close(fds[1]); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGILL); - - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); - ASSERT_EQ(r, 1); - ASSERT_TRUE(pfd.revents & POLLIN); - - uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); - ASSERT_LT(len, (uint32_t)2048); - char* filename = reinterpret_cast(malloc(len + 1)); - ASSERT_EQ(read(fds[0], filename, len), len); - filename[len] = 0; - close(fds[0]); - - const std::string minidump_filename = std::string(TEMPDIR) + "/" + filename + - ".dmp"; - - struct stat st; - ASSERT_EQ(stat(minidump_filename.c_str(), &st), 0); - ASSERT_GT(st.st_size, 0u); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT(0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - EXPECT_EQ(kMemorySize, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kOffset]; - u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); - - unlink(minidump_filename.c_str()); - free(filename); -} - -// Test that the memory region around the instruction pointer is -// bounded correctly on the low end. -TEST(ExceptionHandlerTest, InstructionPointerMemoryMinBound) { - int fds[2]; - ASSERT_NE(pipe(fds), -1); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = 256; // bytes - const int kOffset = 0; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler(TEMPDIR, NULL, DoneCallback, (void*) fds[1], - true); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them in the middle - // of the block of memory, because the minidump should contain 128 - // bytes on either side of the instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - } - close(fds[1]); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGILL); - - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); - ASSERT_EQ(r, 1); - ASSERT_TRUE(pfd.revents & POLLIN); - - uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); - ASSERT_LT(len, (uint32_t)2048); - char* filename = reinterpret_cast(malloc(len + 1)); - ASSERT_EQ(read(fds[0], filename, len), len); - filename[len] = 0; - close(fds[0]); - - const std::string minidump_filename = std::string(TEMPDIR) + "/" + filename + - ".dmp"; - - struct stat st; - ASSERT_EQ(stat(minidump_filename.c_str(), &st), 0); - ASSERT_GT(st.st_size, 0u); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT(0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - EXPECT_EQ(kMemorySize / 2, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)]; - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); - - unlink(minidump_filename.c_str()); - free(filename); -} - -// Test that the memory region around the instruction pointer is -// bounded correctly on the high end. -TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) { - int fds[2]; - ASSERT_NE(pipe(fds), -1); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - // Use 4k here because the OS will hand out a single page even - // if a smaller size is requested, and this test wants to - // test the upper bound of the memory range. - const u_int32_t kMemorySize = 4096; // bytes - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - const int kOffset = kMemorySize - sizeof(instructions); - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler(TEMPDIR, NULL, DoneCallback, (void*) fds[1], - true); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them in the middle - // of the block of memory, because the minidump should contain 128 - // bytes on either side of the instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - } - close(fds[1]); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGILL); - - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); - ASSERT_EQ(r, 1); - ASSERT_TRUE(pfd.revents & POLLIN); - - uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); - ASSERT_LT(len, (uint32_t)2048); - char* filename = reinterpret_cast(malloc(len + 1)); - ASSERT_EQ(read(fds[0], filename, len), len); - filename[len] = 0; - close(fds[0]); - - const std::string minidump_filename = std::string(TEMPDIR) + "/" + filename + - ".dmp"; - - struct stat st; - ASSERT_EQ(stat(minidump_filename.c_str(), &st), 0); - ASSERT_GT(st.st_size, 0u); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT(0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - const size_t kPrefixSize = 128; // bytes - EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kPrefixSize]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kPrefixSize, - instructions, sizeof(instructions)) == 0); - - unlink(minidump_filename.c_str()); - free(filename); -} - -// Ensure that an extra memory block doesn't get added when the -// instruction pointer is not in mapped memory. -TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) { - int fds[2]; - ASSERT_NE(pipe(fds), -1); - - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler(TEMPDIR, NULL, DoneCallback, (void*) fds[1], - true); - // Try calling a NULL pointer. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(NULL); - memory_function(); - } - close(fds[1]); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGSEGV); - - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 0)); - ASSERT_EQ(r, 1); - ASSERT_TRUE(pfd.revents & POLLIN); - - uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); - ASSERT_LT(len, (uint32_t)2048); - char* filename = reinterpret_cast(malloc(len + 1)); - ASSERT_EQ(read(fds[0], filename, len), len); - filename[len] = 0; - close(fds[0]); - - const std::string minidump_filename = std::string(TEMPDIR) + "/" + filename + - ".dmp"; - - struct stat st; - ASSERT_EQ(stat(minidump_filename.c_str(), &st), 0); - ASSERT_GT(st.st_size, 0u); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_EQ((unsigned int)1, memory_list->region_count()); - - unlink(minidump_filename.c_str()); - free(filename); -} - -static bool SimpleCallback(const char* dump_path, - const char* minidump_id, - void* context, - bool succeeded) { - if (!succeeded) - return succeeded; - - string* minidump_file = reinterpret_cast(context); - minidump_file->append(dump_path); - minidump_file->append("/"); - minidump_file->append(minidump_id); - minidump_file->append(".dmp"); - return true; -} - -// Test that anonymous memory maps can be annotated with names and IDs. -TEST(ExceptionHandlerTest, ModuleInfo) { - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = sysconf(_SC_PAGESIZE); - const char* kMemoryName = "a fake module"; - const u_int8_t kModuleGUID[sizeof(MDGUID)] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF - }; - char module_identifier_buffer[kGUIDStringSize]; - FileID::ConvertIdentifierToString(kModuleGUID, - module_identifier_buffer, - sizeof(module_identifier_buffer)); - string module_identifier(module_identifier_buffer); - // Strip out dashes - size_t pos; - while ((pos = module_identifier.find('-')) != string::npos) { - module_identifier.erase(pos, 1); - } - // And append a zero, because module IDs include an "age" field - // which is always zero on Linux. - module_identifier += "0"; - - // Get some memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - const u_int64_t kMemoryAddress = reinterpret_cast(memory); - ASSERT_TRUE(memory); - - string minidump_filename; - ExceptionHandler handler(TEMPDIR, NULL, SimpleCallback, - (void*)&minidump_filename, true); - // Add info about the anonymous memory mapping. - handler.AddMappingInfo(kMemoryName, - kModuleGUID, - kMemoryAddress, - kMemorySize, - 0); - handler.WriteMinidump(); - - // Read the minidump. Load the module list, and ensure that - // the mmap'ed |memory| is listed with the given module name - // and debug ID. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* module = - module_list->GetModuleForAddress(kMemoryAddress); - ASSERT_TRUE(module); - - EXPECT_EQ(kMemoryAddress, module->base_address()); - EXPECT_EQ(kMemorySize, module->size()); - EXPECT_EQ(kMemoryName, module->code_file()); - EXPECT_EQ(module_identifier, module->debug_identifier()); - - unlink(minidump_filename.c_str()); -} - -static const unsigned kControlMsgSize = - CMSG_SPACE(sizeof(int)) + CMSG_SPACE(sizeof(struct ucred)); - -static bool -CrashHandler(const void* crash_context, size_t crash_context_size, - void* context) { - const int fd = (intptr_t) context; - int fds[2]; - pipe(fds); - struct kernel_msghdr msg = {0}; - struct kernel_iovec iov; - iov.iov_base = const_cast(crash_context); - iov.iov_len = crash_context_size; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - char cmsg[kControlMsgSize]; - memset(cmsg, 0, kControlMsgSize); - msg.msg_control = cmsg; - msg.msg_controllen = sizeof(cmsg); - - struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); - hdr->cmsg_level = SOL_SOCKET; - hdr->cmsg_type = SCM_RIGHTS; - hdr->cmsg_len = CMSG_LEN(sizeof(int)); - *((int*) CMSG_DATA(hdr)) = fds[1]; - hdr = CMSG_NXTHDR((struct msghdr*) &msg, hdr); - hdr->cmsg_level = SOL_SOCKET; - hdr->cmsg_type = SCM_CREDENTIALS; - hdr->cmsg_len = CMSG_LEN(sizeof(struct ucred)); - struct ucred *cred = reinterpret_cast(CMSG_DATA(hdr)); - cred->uid = getuid(); - cred->gid = getgid(); - cred->pid = getpid(); - - HANDLE_EINTR(sys_sendmsg(fd, &msg, 0)); - sys_close(fds[1]); - - char b; - HANDLE_EINTR(sys_read(fds[0], &b, 1)); - - return true; -} - -TEST(ExceptionHandlerTest, ExternalDumper) { - int fds[2]; - ASSERT_NE(socketpair(AF_UNIX, SOCK_DGRAM, 0, fds), -1); - static const int on = 1; - setsockopt(fds[0], SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); - setsockopt(fds[1], SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); - - const pid_t child = fork(); - if (child == 0) { - close(fds[0]); - ExceptionHandler handler("/tmp1", NULL, NULL, (void*) fds[1], true); - handler.set_crash_handler(CrashHandler); - *reinterpret_cast(NULL) = 0; - } - close(fds[1]); - struct msghdr msg = {0}; - struct iovec iov; - static const unsigned kCrashContextSize = - sizeof(ExceptionHandler::CrashContext); - char context[kCrashContextSize]; - char control[kControlMsgSize]; - iov.iov_base = context; - iov.iov_len = kCrashContextSize; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = control; - msg.msg_controllen = kControlMsgSize; - - const ssize_t n = HANDLE_EINTR(recvmsg(fds[0], &msg, 0)); - ASSERT_EQ(n, kCrashContextSize); - ASSERT_EQ(msg.msg_controllen, kControlMsgSize); - ASSERT_EQ(msg.msg_flags, 0); - - pid_t crashing_pid = -1; - int signal_fd = -1; - for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr; - hdr = CMSG_NXTHDR(&msg, hdr)) { - if (hdr->cmsg_level != SOL_SOCKET) - continue; - if (hdr->cmsg_type == SCM_RIGHTS) { - const unsigned len = hdr->cmsg_len - - (((uint8_t*)CMSG_DATA(hdr)) - (uint8_t*)hdr); - ASSERT_EQ(len, sizeof(int)); - signal_fd = *((int *) CMSG_DATA(hdr)); - } else if (hdr->cmsg_type == SCM_CREDENTIALS) { - const struct ucred *cred = - reinterpret_cast(CMSG_DATA(hdr)); - crashing_pid = cred->pid; - } - } - - ASSERT_NE(crashing_pid, -1); - ASSERT_NE(signal_fd, -1); - - char templ[] = TEMPDIR "/exception-handler-unittest-XXXXXX"; - mktemp(templ); - ASSERT_TRUE(WriteMinidump(templ, crashing_pid, context, - kCrashContextSize)); - static const char b = 0; - HANDLE_EINTR(write(signal_fd, &b, 1)); - - int status; - ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); - ASSERT_TRUE(WIFSIGNALED(status)); - ASSERT_EQ(WTERMSIG(status), SIGSEGV); - - struct stat st; - ASSERT_EQ(stat(templ, &st), 0); - ASSERT_GT(st.st_size, 0u); - unlink(templ); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader.h deleted file mode 100644 index 13365373..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ -#define CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ - -#include -#include -#include -#include -#include -#include - -#include "third_party/lss/linux_syscall_support.h" - -namespace google_breakpad { - -// A class for enumerating a directory without using diropen/readdir or other -// functions which may allocate memory. -class DirectoryReader { - public: - DirectoryReader(int fd) - : fd_(fd), - buf_used_(0) { - } - - // Return the next entry from the directory - // name: (output) the NUL terminated entry name - // - // Returns true iff successful (false on EOF). - // - // After calling this, one must call |PopEntry| otherwise you'll get the same - // entry over and over. - bool GetNextEntry(const char** name) { - struct kernel_dirent* const dent = - reinterpret_cast(buf_); - - if (buf_used_ == 0) { - // need to read more entries. - const int n = sys_getdents(fd_, dent, sizeof(buf_)); - if (n < 0) { - return false; - } else if (n == 0) { - hit_eof_ = true; - } else { - buf_used_ += n; - } - } - - if (buf_used_ == 0 && hit_eof_) - return false; - - assert(buf_used_ > 0); - - *name = dent->d_name; - return true; - } - - void PopEntry() { - if (!buf_used_) - return; - - const struct kernel_dirent* const dent = - reinterpret_cast(buf_); - - buf_used_ -= dent->d_reclen; - memmove(buf_, buf_ + dent->d_reclen, buf_used_); - } - - private: - const int fd_; - bool hit_eof_; - unsigned buf_used_; - uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1]; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader_unittest.cc deleted file mode 100644 index 3034e619..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/directory_reader_unittest.cc +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include -#include -#include - -#include "client/linux/minidump_writer/directory_reader.h" -#include "breakpad_googletest_includes.h" - -using namespace google_breakpad; - -namespace { -typedef testing::Test DirectoryReaderTest; -} - -TEST(DirectoryReaderTest, CompareResults) { - std::set dent_set; - - DIR *const dir = opendir("/proc/self"); - ASSERT_TRUE(dir != NULL); - - struct dirent* dent; - while ((dent = readdir(dir))) - dent_set.insert(dent->d_name); - - closedir(dir); - - const int fd = open("/proc/self", O_DIRECTORY | O_RDONLY); - ASSERT_GE(fd, 0); - - DirectoryReader dir_reader(fd); - unsigned seen = 0; - - const char* name; - while (dir_reader.GetNextEntry(&name)) { - ASSERT_TRUE(dent_set.find(name) != dent_set.end()); - seen++; - dir_reader.PopEntry(); - } - - ASSERT_TRUE(dent_set.find("status") != dent_set.end()); - ASSERT_TRUE(dent_set.find("stat") != dent_set.end()); - ASSERT_TRUE(dent_set.find("cmdline") != dent_set.end()); - - ASSERT_EQ(dent_set.size(), seen); - close(fd); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader.h deleted file mode 100644 index 2d19c66d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_MINIDUMP_WRITER_LINE_READER_H_ -#define CLIENT_LINUX_MINIDUMP_WRITER_LINE_READER_H_ - -#include -#include -#include - -#include "third_party/lss/linux_syscall_support.h" - -namespace google_breakpad { - -// A class for reading a file, line by line, without using fopen/fgets or other -// functions which may allocate memory. -class LineReader { - public: - LineReader(int fd) - : fd_(fd), - hit_eof_(false), - buf_used_(0) { - } - - // The maximum length of a line. - static const size_t kMaxLineLen = 512; - - // Return the next line from the file. - // line: (output) a pointer to the start of the line. The line is NUL - // terminated. - // len: (output) the length of the line (not inc the NUL byte) - // - // Returns true iff successful (false on EOF). - // - // One must call |PopLine| after this function, otherwise you'll continue to - // get the same line over and over. - bool GetNextLine(const char **line, unsigned *len) { - for (;;) { - if (buf_used_ == 0 && hit_eof_) - return false; - - for (unsigned i = 0; i < buf_used_; ++i) { - if (buf_[i] == '\n' || buf_[i] == 0) { - buf_[i] = 0; - *len = i; - *line = buf_; - return true; - } - } - - if (buf_used_ == sizeof(buf_)) { - // we scanned the whole buffer and didn't find an end-of-line marker. - // This line is too long to process. - return false; - } - - // We didn't find any end-of-line terminators in the buffer. However, if - // this is the last line in the file it might not have one: - if (hit_eof_) { - assert(buf_used_); - // There's room for the NUL because of the buf_used_ == sizeof(buf_) - // check above. - buf_[buf_used_] = 0; - *len = buf_used_; - buf_used_ += 1; // since we appended the NUL. - *line = buf_; - return true; - } - - // Otherwise, we should pull in more data from the file - const ssize_t n = sys_read(fd_, buf_ + buf_used_, - sizeof(buf_) - buf_used_); - if (n < 0) { - return false; - } else if (n == 0) { - hit_eof_ = true; - } else { - buf_used_ += n; - } - - // At this point, we have either set the hit_eof_ flag, or we have more - // data to process... - } - } - - void PopLine(unsigned len) { - // len doesn't include the NUL byte at the end. - - assert(buf_used_ >= len + 1); - buf_used_ -= len + 1; - memmove(buf_, buf_ + len + 1, buf_used_); - } - - private: - const int fd_; - - bool hit_eof_; - unsigned buf_used_; - char buf_[kMaxLineLen]; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_MINIDUMP_WRITER_LINE_READER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader_unittest.cc deleted file mode 100644 index a2ea17f7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/line_reader_unittest.cc +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include "client/linux/minidump_writer/line_reader.h" -#include "breakpad_googletest_includes.h" - -using namespace google_breakpad; - -#if !defined(__ANDROID__) -#define TEMPDIR "/tmp" -#else -#define TEMPDIR "/data/local/tmp" -#endif - -static int TemporaryFile() { - static const char templ[] = TEMPDIR "/line-reader-unittest-XXXXXX"; - char templ_copy[sizeof(templ)]; - memcpy(templ_copy, templ, sizeof(templ)); - const int fd = mkstemp(templ_copy); - if (fd >= 0) - unlink(templ_copy); - - return fd; -} - -namespace { -typedef testing::Test LineReaderTest; -} - -TEST(LineReaderTest, EmptyFile) { - const int fd = TemporaryFile(); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} - -TEST(LineReaderTest, OneLineTerminated) { - const int fd = TemporaryFile(); - write(fd, "a\n", 2); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned int len; - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned int)1); - ASSERT_EQ(line[0], 'a'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} - -TEST(LineReaderTest, OneLine) { - const int fd = TemporaryFile(); - write(fd, "a", 1); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned)1); - ASSERT_EQ(line[0], 'a'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} - -TEST(LineReaderTest, TwoLinesTerminated) { - const int fd = TemporaryFile(); - write(fd, "a\nb\n", 4); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned)1); - ASSERT_EQ(line[0], 'a'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned)1); - ASSERT_EQ(line[0], 'b'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} - -TEST(LineReaderTest, TwoLines) { - const int fd = TemporaryFile(); - write(fd, "a\nb", 3); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned)1); - ASSERT_EQ(line[0], 'a'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, (unsigned)1); - ASSERT_EQ(line[0], 'b'); - ASSERT_EQ(line[1], 0); - reader.PopLine(len); - - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} - -TEST(LineReaderTest, MaxLength) { - const int fd = TemporaryFile(); - char l[LineReader::kMaxLineLen - 1]; - memset(l, 'a', sizeof(l)); - write(fd, l, sizeof(l)); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_TRUE(reader.GetNextLine(&line, &len)); - ASSERT_EQ(len, sizeof(l)); - ASSERT_TRUE(memcmp(l, line, sizeof(l)) == 0); - ASSERT_EQ(line[len], 0); - - close(fd); -} - -TEST(LineReaderTest, TooLong) { - const int fd = TemporaryFile(); - char l[LineReader::kMaxLineLen]; - memset(l, 'a', sizeof(l)); - write(fd, l, sizeof(l)); - lseek(fd, 0, SEEK_SET); - LineReader reader(fd); - - const char *line; - unsigned len; - ASSERT_FALSE(reader.GetNextLine(&line, &len)); - - close(fd); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.cc deleted file mode 100644 index 76dc4db4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.cc +++ /dev/null @@ -1,556 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This code deals with the mechanics of getting information about a crashed -// process. Since this code may run in a compromised address space, the same -// rules apply as detailed at the top of minidump_writer.h: no libc calls and -// use the alternative allocator. - -#include "client/linux/minidump_writer/linux_dumper.h" - -#include -#include -#include -#include -#include -#if !defined(__ANDROID__) -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "client/linux/minidump_writer/directory_reader.h" -#include "client/linux/minidump_writer/line_reader.h" -#include "common/linux/file_id.h" -#include "common/linux/linux_libc_support.h" -#include "third_party/lss/linux_syscall_support.h" - -static const char kMappedFileUnsafePrefix[] = "/dev/"; -static const char kDeletedSuffix[] = " (deleted)"; - -// Suspend a thread by attaching to it. -static bool SuspendThread(pid_t pid) { - // This may fail if the thread has just died or debugged. - errno = 0; - if (sys_ptrace(PTRACE_ATTACH, pid, NULL, NULL) != 0 && - errno != 0) { - return false; - } - while (sys_waitpid(pid, NULL, __WALL) < 0) { - if (errno != EINTR) { - sys_ptrace(PTRACE_DETACH, pid, NULL, NULL); - return false; - } - } -#if defined(__i386) || defined(__x86_64) - // On x86, the stack pointer is NULL or -1, when executing trusted code in - // the seccomp sandbox. Not only does this cause difficulties down the line - // when trying to dump the thread's stack, it also results in the minidumps - // containing information about the trusted threads. This information is - // generally completely meaningless and just pollutes the minidumps. - // We thus test the stack pointer and exclude any threads that are part of - // the seccomp sandbox's trusted code. - user_regs_struct regs; - if (sys_ptrace(PTRACE_GETREGS, pid, NULL, ®s) == -1 || -#if defined(__i386) - !regs.esp -#elif defined(__x86_64) - !regs.rsp -#endif - ) { - sys_ptrace(PTRACE_DETACH, pid, NULL, NULL); - return false; - } -#endif - return true; -} - -// Resume a thread by detaching from it. -static bool ResumeThread(pid_t pid) { - return sys_ptrace(PTRACE_DETACH, pid, NULL, NULL) >= 0; -} - -inline static bool IsMappedFileOpenUnsafe( - const google_breakpad::MappingInfo& mapping) { - // It is unsafe to attempt to open a mapped file that lives under /dev, - // because the semantics of the open may be driver-specific so we'd risk - // hanging the crash dumper. And a file in /dev/ almost certainly has no - // ELF file identifier anyways. - return my_strncmp(mapping.name, - kMappedFileUnsafePrefix, - sizeof(kMappedFileUnsafePrefix) - 1) == 0; -} - -namespace google_breakpad { - -LinuxDumper::LinuxDumper(int pid) - : pid_(pid), - threads_suspended_(false), - threads_(&allocator_, 8), - mappings_(&allocator_) { -} - -bool LinuxDumper::Init() { - return EnumerateThreads(&threads_) && - EnumerateMappings(&mappings_); -} - -bool LinuxDumper::ThreadsSuspend() { - if (threads_suspended_) - return true; - for (size_t i = 0; i < threads_.size(); ++i) { - if (!SuspendThread(threads_[i])) { - // If the thread either disappeared before we could attach to it, or if - // it was part of the seccomp sandbox's trusted code, it is OK to - // silently drop it from the minidump. - memmove(&threads_[i], &threads_[i+1], - (threads_.size() - i - 1) * sizeof(threads_[i])); - threads_.resize(threads_.size() - 1); - --i; - } - } - threads_suspended_ = true; - return threads_.size() > 0; -} - -bool LinuxDumper::ThreadsResume() { - if (!threads_suspended_) - return false; - bool good = true; - for (size_t i = 0; i < threads_.size(); ++i) - good &= ResumeThread(threads_[i]); - threads_suspended_ = false; - return good; -} - -void -LinuxDumper::BuildProcPath(char* path, pid_t pid, const char* node) const { - assert(path); - if (!path) { - return; - } - - path[0] = '\0'; - - const unsigned pid_len = my_int_len(pid); - - assert(node); - if (!node) { - return; - } - - size_t node_len = my_strlen(node); - assert(node_len < NAME_MAX); - if (node_len >= NAME_MAX) { - return; - } - - assert(node_len > 0); - if (node_len == 0) { - return; - } - - assert(pid > 0); - if (pid <= 0) { - return; - } - - const size_t total_length = 6 + pid_len + 1 + node_len; - - assert(total_length < NAME_MAX); - if (total_length >= NAME_MAX) { - return; - } - - memcpy(path, "/proc/", 6); - my_itos(path + 6, pid, pid_len); - memcpy(path + 6 + pid_len, "/", 1); - memcpy(path + 6 + pid_len + 1, node, node_len); - path[total_length] = '\0'; -} - -bool -LinuxDumper::ElfFileIdentifierForMapping(const MappingInfo& mapping, - bool member, - unsigned int mapping_id, - uint8_t identifier[sizeof(MDGUID)]) -{ - assert(!member || mapping_id < mappings_.size()); - my_memset(identifier, 0, sizeof(MDGUID)); - if (IsMappedFileOpenUnsafe(mapping)) - return false; - - char filename[NAME_MAX]; - size_t filename_len = my_strlen(mapping.name); - assert(filename_len < NAME_MAX); - if (filename_len >= NAME_MAX) - return false; - memcpy(filename, mapping.name, filename_len); - filename[filename_len] = '\0'; - bool filename_modified = HandleDeletedFileInMapping(filename); - - int fd = sys_open(filename, O_RDONLY, 0); - if (fd < 0) - return false; - struct kernel_stat st; - if (sys_fstat(fd, &st) != 0) { - sys_close(fd); - return false; - } -#if defined(__x86_64) -#define sys_mmap2 sys_mmap -#endif - void* base = sys_mmap2(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - sys_close(fd); - if (base == MAP_FAILED) - return false; - - bool success = FileID::ElfFileIdentifierFromMappedFile(base, identifier); - sys_munmap(base, st.st_size); - if (success && member && filename_modified) { - mappings_[mapping_id]->name[filename_len - - sizeof(kDeletedSuffix) + 1] = '\0'; - } - - return success; -} - -void* -LinuxDumper::FindBeginningOfLinuxGateSharedLibrary(const pid_t pid) const { - char auxv_path[NAME_MAX]; - BuildProcPath(auxv_path, pid, "auxv"); - - // If BuildProcPath errors out due to invalid input, we'll handle it when - // we try to sys_open the file. - - // Find the AT_SYSINFO_EHDR entry for linux-gate.so - // See http://www.trilithium.com/johan/2005/08/linux-gate/ for more - // information. - int fd = sys_open(auxv_path, O_RDONLY, 0); - if (fd < 0) { - return NULL; - } - - elf_aux_entry one_aux_entry; - while (sys_read(fd, - &one_aux_entry, - sizeof(elf_aux_entry)) == sizeof(elf_aux_entry) && - one_aux_entry.a_type != AT_NULL) { - if (one_aux_entry.a_type == AT_SYSINFO_EHDR) { - close(fd); - return reinterpret_cast(one_aux_entry.a_un.a_val); - } - } - close(fd); - return NULL; -} - -bool -LinuxDumper::EnumerateMappings(wasteful_vector* result) const { - char maps_path[NAME_MAX]; - BuildProcPath(maps_path, pid_, "maps"); - - // linux_gate_loc is the beginning of the kernel's mapping of - // linux-gate.so in the process. It doesn't actually show up in the - // maps list as a filename, so we use the aux vector to find it's - // load location and special case it's entry when creating the list - // of mappings. - const void* linux_gate_loc; - linux_gate_loc = FindBeginningOfLinuxGateSharedLibrary(pid_); - - const int fd = sys_open(maps_path, O_RDONLY, 0); - if (fd < 0) - return false; - LineReader* const line_reader = new(allocator_) LineReader(fd); - - const char* line; - unsigned line_len; - while (line_reader->GetNextLine(&line, &line_len)) { - uintptr_t start_addr, end_addr, offset; - - const char* i1 = my_read_hex_ptr(&start_addr, line); - if (*i1 == '-') { - const char* i2 = my_read_hex_ptr(&end_addr, i1 + 1); - if (*i2 == ' ') { - const char* i3 = my_read_hex_ptr(&offset, i2 + 6 /* skip ' rwxp ' */); - if (*i3 == ' ') { - const char* name = NULL; - // Only copy name if the name is a valid path name, or if - // it's the VDSO image. - if (((name = my_strchr(line, '/')) == NULL) && - linux_gate_loc && - reinterpret_cast(start_addr) == linux_gate_loc) { - name = kLinuxGateLibraryName; - offset = 0; - } - // Merge adjacent mappings with the same name into one module, - // assuming they're a single library mapped by the dynamic linker - if (name && result->size()) { - MappingInfo* module = (*result)[result->size() - 1]; - if ((start_addr == module->start_addr + module->size) && - (my_strlen(name) == my_strlen(module->name)) && - (my_strncmp(name, module->name, my_strlen(name)) == 0)) { - module->size = end_addr - module->start_addr; - line_reader->PopLine(line_len); - continue; - } - } - MappingInfo* const module = new(allocator_) MappingInfo; - memset(module, 0, sizeof(MappingInfo)); - module->start_addr = start_addr; - module->size = end_addr - start_addr; - module->offset = offset; - if (name != NULL) { - const unsigned l = my_strlen(name); - if (l < sizeof(module->name)) - memcpy(module->name, name, l); - } - result->push_back(module); - } - } - } - line_reader->PopLine(line_len); - } - - sys_close(fd); - - return result->size() > 0; -} - -// Parse /proc/$pid/task to list all the threads of the process identified by -// pid. -bool LinuxDumper::EnumerateThreads(wasteful_vector* result) const { - char task_path[NAME_MAX]; - BuildProcPath(task_path, pid_, "task"); - - const int fd = sys_open(task_path, O_RDONLY | O_DIRECTORY, 0); - if (fd < 0) - return false; - DirectoryReader* dir_reader = new(allocator_) DirectoryReader(fd); - - // The directory may contain duplicate entries which we filter by assuming - // that they are consecutive. - int last_tid = -1; - const char* dent_name; - while (dir_reader->GetNextEntry(&dent_name)) { - if (my_strcmp(dent_name, ".") && - my_strcmp(dent_name, "..")) { - int tid = 0; - if (my_strtoui(&tid, dent_name) && - last_tid != tid) { - last_tid = tid; - result->push_back(tid); - } - } - dir_reader->PopEntry(); - } - - sys_close(fd); - return true; -} - -// Read thread info from /proc/$pid/status. -// Fill out the |tgid|, |ppid| and |pid| members of |info|. If unavailable, -// these members are set to -1. Returns true iff all three members are -// available. -bool LinuxDumper::ThreadInfoGet(pid_t tid, ThreadInfo* info) { - assert(info != NULL); - char status_path[NAME_MAX]; - BuildProcPath(status_path, tid, "status"); - - const int fd = open(status_path, O_RDONLY); - if (fd < 0) - return false; - - LineReader* const line_reader = new(allocator_) LineReader(fd); - const char* line; - unsigned line_len; - - info->ppid = info->tgid = -1; - - while (line_reader->GetNextLine(&line, &line_len)) { - if (my_strncmp("Tgid:\t", line, 6) == 0) { - my_strtoui(&info->tgid, line + 6); - } else if (my_strncmp("PPid:\t", line, 6) == 0) { - my_strtoui(&info->ppid, line + 6); - } - - line_reader->PopLine(line_len); - } - - if (info->ppid == -1 || info->tgid == -1) - return false; - - if (sys_ptrace(PTRACE_GETREGS, tid, NULL, &info->regs) == -1) { - return false; - } - -#if !defined(__ANDROID__) - if (sys_ptrace(PTRACE_GETFPREGS, tid, NULL, &info->fpregs) == -1) { - return false; - } -#endif - -#if defined(__i386) - if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1) - return false; -#endif - -#if defined(__i386) || defined(__x86_64) - for (unsigned i = 0; i < ThreadInfo::kNumDebugRegisters; ++i) { - if (sys_ptrace( - PTRACE_PEEKUSER, tid, - reinterpret_cast (offsetof(struct user, - u_debugreg[0]) + i * - sizeof(debugreg_t)), - &info->dregs[i]) == -1) { - return false; - } - } -#endif - - const uint8_t* stack_pointer; -#if defined(__i386) - memcpy(&stack_pointer, &info->regs.esp, sizeof(info->regs.esp)); -#elif defined(__x86_64) - memcpy(&stack_pointer, &info->regs.rsp, sizeof(info->regs.rsp)); -#elif defined(__ARM_EABI__) - memcpy(&stack_pointer, &info->regs.ARM_sp, sizeof(info->regs.ARM_sp)); -#else -#error "This code hasn't been ported to your platform yet." -#endif - - return GetStackInfo(&info->stack, &info->stack_len, - (uintptr_t) stack_pointer); -} - -// Get information about the stack, given the stack pointer. We don't try to -// walk the stack since we might not have all the information needed to do -// unwind. So we just grab, up to, 32k of stack. -bool LinuxDumper::GetStackInfo(const void** stack, size_t* stack_len, - uintptr_t int_stack_pointer) { - // Move the stack pointer to the bottom of the page that it's in. - const uintptr_t page_size = getpagesize(); - - uint8_t* const stack_pointer = - reinterpret_cast(int_stack_pointer & ~(page_size - 1)); - - // The number of bytes of stack which we try to capture. - static const ptrdiff_t kStackToCapture = 32 * 1024; - - const MappingInfo* mapping = FindMapping(stack_pointer); - if (!mapping) - return false; - const ptrdiff_t offset = stack_pointer - (uint8_t*) mapping->start_addr; - const ptrdiff_t distance_to_end = - static_cast(mapping->size) - offset; - *stack_len = distance_to_end > kStackToCapture ? - kStackToCapture : distance_to_end; - *stack = stack_pointer; - return true; -} - -// static -void LinuxDumper::CopyFromProcess(void* dest, pid_t child, const void* src, - size_t length) { - unsigned long tmp = 55; - size_t done = 0; - static const size_t word_size = sizeof(tmp); - uint8_t* const local = (uint8_t*) dest; - uint8_t* const remote = (uint8_t*) src; - - while (done < length) { - const size_t l = length - done > word_size ? word_size : length - done; - if (sys_ptrace(PTRACE_PEEKDATA, child, remote + done, &tmp) == -1) { - tmp = 0; - } - memcpy(local + done, &tmp, l); - done += l; - } -} - -// Find the mapping which the given memory address falls in. -const MappingInfo* LinuxDumper::FindMapping(const void* address) const { - const uintptr_t addr = (uintptr_t) address; - - for (size_t i = 0; i < mappings_.size(); ++i) { - const uintptr_t start = static_cast(mappings_[i]->start_addr); - if (addr >= start && addr - start < mappings_[i]->size) - return mappings_[i]; - } - - return NULL; -} - -bool LinuxDumper::HandleDeletedFileInMapping(char* path) const { - static const size_t kDeletedSuffixLen = sizeof(kDeletedSuffix) - 1; - - // Check for ' (deleted)' in |path|. - // |path| has to be at least as long as "/x (deleted)". - const size_t path_len = my_strlen(path); - if (path_len < kDeletedSuffixLen + 2) - return false; - if (my_strncmp(path + path_len - kDeletedSuffixLen, kDeletedSuffix, - kDeletedSuffixLen) != 0) { - return false; - } - - // Check |path| against the /proc/pid/exe 'symlink'. - char exe_link[NAME_MAX]; - char new_path[NAME_MAX]; - BuildProcPath(exe_link, pid_, "exe"); - ssize_t new_path_len = sys_readlink(exe_link, new_path, NAME_MAX); - if (new_path_len <= 0 || new_path_len == NAME_MAX) - return false; - new_path[new_path_len] = '\0'; - if (my_strcmp(path, new_path) != 0) - return false; - - // Check to see if someone actually named their executable 'foo (deleted)'. - struct kernel_stat exe_stat; - struct kernel_stat new_path_stat; - if (sys_stat(exe_link, &exe_stat) == 0 && - sys_stat(new_path, &new_path_stat) == 0 && - exe_stat.st_dev == new_path_stat.st_dev && - exe_stat.st_ino == new_path_stat.st_ino) { - return false; - } - - memcpy(path, exe_link, NAME_MAX); - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.h deleted file mode 100644 index 15280200..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_MINIDUMP_WRITER_LINUX_DUMPER_H_ -#define CLIENT_LINUX_MINIDUMP_WRITER_LINUX_DUMPER_H_ - -#include -#include -#include -#include -#if !defined(__ANDROID__) -#include -#endif - -#include "common/memory.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -#if defined(__i386) || defined(__x86_64) -typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t; -#endif - -// Typedef for our parsing of the auxv variables in /proc/pid/auxv. -#if defined(__i386) || defined(__ARM_EABI__) -#if !defined(__ANDROID__) -typedef Elf32_auxv_t elf_aux_entry; -#else -// Android is missing this structure definition -typedef struct -{ - uint32_t a_type; /* Entry type */ - union - { - uint32_t a_val; /* Integer value */ - } a_un; -} elf_aux_entry; - -#if !defined(AT_SYSINFO_EHDR) -#define AT_SYSINFO_EHDR 33 -#endif -#endif // __ANDROID__ -#elif defined(__x86_64__) -typedef Elf64_auxv_t elf_aux_entry; -#endif -// When we find the VDSO mapping in the process's address space, this -// is the name we use for it when writing it to the minidump. -// This should always be less than NAME_MAX! -const char kLinuxGateLibraryName[] = "linux-gate.so"; - -// We produce one of these structures for each thread in the crashed process. -struct ThreadInfo { - pid_t tgid; // thread group id - pid_t ppid; // parent process - - // Even on platforms where the stack grows down, the following will point to - // the smallest address in the stack. - const void* stack; // pointer to the stack area - size_t stack_len; // length of the stack to copy - - -#if defined(__i386) || defined(__x86_64) - user_regs_struct regs; - user_fpregs_struct fpregs; - static const unsigned kNumDebugRegisters = 8; - debugreg_t dregs[8]; -#if defined(__i386) - user_fpxregs_struct fpxregs; -#endif // defined(__i386) - -#elif defined(__ARM_EABI__) - // Mimicking how strace does this(see syscall.c, search for GETREGS) -#if defined(__ANDROID__) - struct pt_regs regs; -#else - struct user_regs regs; - struct user_fpregs fpregs; -#endif // __ANDROID__ -#endif -}; - -// One of these is produced for each mapping in the process (i.e. line in -// /proc/$x/maps). -struct MappingInfo { - uintptr_t start_addr; - size_t size; - size_t offset; // offset into the backed file. - char name[NAME_MAX]; -}; - -class LinuxDumper { - public: - explicit LinuxDumper(pid_t pid); - - // Parse the data for |threads| and |mappings|. - bool Init(); - - // Suspend/resume all threads in the given process. - bool ThreadsSuspend(); - bool ThreadsResume(); - - // Read information about the given thread. Returns true on success. One must - // have called |ThreadsSuspend| first. - bool ThreadInfoGet(pid_t tid, ThreadInfo* info); - - // These are only valid after a call to |Init|. - const wasteful_vector &threads() { return threads_; } - const wasteful_vector &mappings() { return mappings_; } - const MappingInfo* FindMapping(const void* address) const; - - // Find a block of memory to take as the stack given the top of stack pointer. - // stack: (output) the lowest address in the memory area - // stack_len: (output) the length of the memory area - // stack_top: the current top of the stack - bool GetStackInfo(const void** stack, size_t* stack_len, uintptr_t stack_top); - - PageAllocator* allocator() { return &allocator_; } - - // memcpy from a remote process. - static void CopyFromProcess(void* dest, pid_t child, const void* src, - size_t length); - - // Builds a proc path for a certain pid for a node. path is a - // character array that is overwritten, and node is the final node - // without any slashes. - void BuildProcPath(char* path, pid_t pid, const char* node) const; - - // Generate a File ID from the .text section of a mapped entry. - // If not a member, mapping_id is ignored. - bool ElfFileIdentifierForMapping(const MappingInfo& mapping, - bool member, - unsigned int mapping_id, - uint8_t identifier[sizeof(MDGUID)]); - - // Utility method to find the location of where the kernel has - // mapped linux-gate.so in memory(shows up in /proc/pid/maps as - // [vdso], but we can't guarantee that it's the only virtual dynamic - // shared object. Parsing the auxilary vector for AT_SYSINFO_EHDR - // is the safest way to go.) - void* FindBeginningOfLinuxGateSharedLibrary(const pid_t pid) const; - private: - bool EnumerateMappings(wasteful_vector* result) const; - bool EnumerateThreads(wasteful_vector* result) const; - - // For the case where a running program has been deleted, it'll show up in - // /proc/pid/maps as "/path/to/program (deleted)". If this is the case, then - // see if '/path/to/program (deleted)' matches /proc/pid/exe and return - // /proc/pid/exe in |path| so ELF identifier generation works correctly. This - // also checks to see if '/path/to/program (deleted)' exists, so it does not - // get fooled by a poorly named binary. - // For programs that don't end with ' (deleted)', this is a no-op. - // This assumes |path| is a buffer with length NAME_MAX. - // Returns true if |path| is modified. - bool HandleDeletedFileInMapping(char* path) const; - - const pid_t pid_; - - mutable PageAllocator allocator_; - - bool threads_suspended_; - wasteful_vector threads_; // the ids of all the threads - wasteful_vector mappings_; // info from /proc//maps -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_LINUX_DUMPER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest.cc deleted file mode 100644 index c537ce93..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest.cc +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "client/linux/minidump_writer/linux_dumper.h" -#include "common/linux/eintr_wrapper.h" -#include "common/linux/file_id.h" -#include "common/memory.h" - -using std::string; -using namespace google_breakpad; - -namespace { -typedef testing::Test LinuxDumperTest; - -string GetHelperBinary() { - // Locate helper binary next to the current binary. - char self_path[PATH_MAX]; - if (readlink("/proc/self/exe", self_path, sizeof(self_path) - 1) == -1) { - return ""; - } - string helper_path(self_path); - size_t pos = helper_path.rfind('/'); - if (pos == string::npos) { - return ""; - } - helper_path.erase(pos + 1); - helper_path += "linux_dumper_unittest_helper"; - - return helper_path; -} - -} - -TEST(LinuxDumperTest, Setup) { - LinuxDumper dumper(getpid()); -} - -TEST(LinuxDumperTest, FindMappings) { - LinuxDumper dumper(getpid()); - ASSERT_TRUE(dumper.Init()); - - ASSERT_TRUE(dumper.FindMapping(reinterpret_cast(getpid))); - ASSERT_TRUE(dumper.FindMapping(reinterpret_cast(printf))); - ASSERT_FALSE(dumper.FindMapping(NULL)); -} - -TEST(LinuxDumperTest, ThreadList) { - LinuxDumper dumper(getpid()); - ASSERT_TRUE(dumper.Init()); - - ASSERT_GE(dumper.threads().size(), (size_t)1); - bool found = false; - for (size_t i = 0; i < dumper.threads().size(); ++i) { - if (dumper.threads()[i] == getpid()) { - found = true; - break; - } - } -} - -// Helper stack class to close a file descriptor and unmap -// a mmap'ed mapping. -class StackHelper { -public: - StackHelper(int fd, char* mapping, size_t size) - : fd_(fd), mapping_(mapping), size_(size) {} - ~StackHelper() { - munmap(mapping_, size_); - close(fd_); - } - -private: - int fd_; - char* mapping_; - size_t size_; -}; - -TEST(LinuxDumperTest, MergedMappings) { - string helper_path(GetHelperBinary()); - if (helper_path.empty()) { - FAIL() << "Couldn't find helper binary"; - exit(1); - } - - // mmap two segments out of the helper binary, one - // enclosed in the other, but with different protections. - const size_t kPageSize = sysconf(_SC_PAGESIZE); - const size_t kMappingSize = 3 * kPageSize; - int fd = open(helper_path.c_str(), O_RDONLY); - ASSERT_NE(-1, fd); - char* mapping = - reinterpret_cast(mmap(NULL, - kMappingSize, - PROT_READ, - MAP_SHARED, - fd, - 0)); - ASSERT_TRUE(mapping); - - const u_int64_t kMappingAddress = reinterpret_cast(mapping); - - // Ensure that things get cleaned up. - StackHelper helper(fd, mapping, kMappingSize); - - // Carve a page out of the first mapping with different permissions. - char* inside_mapping = reinterpret_cast(mmap(mapping + 2 *kPageSize, - kPageSize, - PROT_NONE, - MAP_SHARED | MAP_FIXED, - fd, - // Map a different offset just to - // better test real-world conditions. - kPageSize)); - ASSERT_TRUE(inside_mapping); - - // Now check that LinuxDumper interpreted the mappings properly. - LinuxDumper dumper(getpid()); - ASSERT_TRUE(dumper.Init()); - int mapping_count = 0; - for (unsigned i = 0; i < dumper.mappings().size(); ++i) { - const MappingInfo& mapping = *dumper.mappings()[i]; - if (strcmp(mapping.name, helper_path.c_str()) == 0) { - // This mapping should encompass the entire original mapped - // range. - EXPECT_EQ(kMappingAddress, mapping.start_addr); - EXPECT_EQ(kMappingSize, mapping.size); - EXPECT_EQ(0, mapping.offset); - mapping_count++; - } - } - EXPECT_EQ(1, mapping_count); -} - -TEST(LinuxDumperTest, VerifyStackReadWithMultipleThreads) { - static const int kNumberOfThreadsInHelperProgram = 5; - char kNumberOfThreadsArgument[2]; - sprintf(kNumberOfThreadsArgument, "%d", kNumberOfThreadsInHelperProgram); - - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - pid_t child_pid = fork(); - if (child_pid == 0) { - // In child process. - close(fds[0]); - - string helper_path(GetHelperBinary()); - if (helper_path.empty()) { - FAIL() << "Couldn't find helper binary"; - exit(1); - } - - // Pass the pipe fd and the number of threads as arguments. - char pipe_fd_string[8]; - sprintf(pipe_fd_string, "%d", fds[1]); - execl(helper_path.c_str(), - "linux_dumper_unittest_helper", - pipe_fd_string, - kNumberOfThreadsArgument, - NULL); - // Kill if we get here. - printf("Errno from exec: %d", errno); - FAIL() << "Exec of " << helper_path << " failed: " << strerror(errno); - exit(0); - } - close(fds[1]); - // Wait for the child process to signal that it's ready. - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); - ASSERT_EQ(1, r); - ASSERT_TRUE(pfd.revents & POLLIN); - uint8_t junk; - read(fds[0], &junk, sizeof(junk)); - close(fds[0]); - - // Child is ready now. - LinuxDumper dumper(child_pid); - ASSERT_TRUE(dumper.Init()); - EXPECT_EQ((size_t)kNumberOfThreadsInHelperProgram, dumper.threads().size()); - EXPECT_TRUE(dumper.ThreadsSuspend()); - - ThreadInfo one_thread; - for(size_t i = 0; i < dumper.threads().size(); ++i) { - EXPECT_TRUE(dumper.ThreadInfoGet(dumper.threads()[i], &one_thread)); - // In the helper program, we stored a pointer to the thread id in a - // specific register. Check that we can recover its value. -#if defined(__ARM_EABI__) - pid_t *process_tid_location = (pid_t *)(one_thread.regs.uregs[3]); -#elif defined(__i386) - pid_t *process_tid_location = (pid_t *)(one_thread.regs.ecx); -#elif defined(__x86_64) - pid_t *process_tid_location = (pid_t *)(one_thread.regs.rcx); -#else -#error This test has not been ported to this platform. -#endif - pid_t one_thread_id; - dumper.CopyFromProcess(&one_thread_id, - dumper.threads()[i], - process_tid_location, - 4); - EXPECT_EQ(dumper.threads()[i], one_thread_id); - } - kill(child_pid, SIGKILL); -} - -TEST(LinuxDumperTest, BuildProcPath) { - const pid_t pid = getpid(); - LinuxDumper dumper(pid); - - char maps_path[256] = "dummymappath"; - char maps_path_expected[256]; - snprintf(maps_path_expected, sizeof(maps_path_expected), - "/proc/%d/maps", pid); - dumper.BuildProcPath(maps_path, pid, "maps"); - ASSERT_STREQ(maps_path, maps_path_expected); - - // In release mode, we expect BuildProcPath to handle the invalid - // parameters correctly and fill map_path with an empty - // NULL-terminated string. -#ifdef NDEBUG - snprintf(maps_path, sizeof(maps_path), "dummymappath"); - dumper.BuildProcPath(maps_path, 0, "maps"); - EXPECT_STREQ(maps_path, ""); - - snprintf(maps_path, sizeof(maps_path), "dummymappath"); - dumper.BuildProcPath(maps_path, getpid(), ""); - EXPECT_STREQ(maps_path, ""); - - snprintf(maps_path, sizeof(maps_path), "dummymappath"); - dumper.BuildProcPath(maps_path, getpid(), NULL); - EXPECT_STREQ(maps_path, ""); -#endif -} - -#if !defined(__ARM_EABI__) -TEST(LinuxDumperTest, MappingsIncludeLinuxGate) { - LinuxDumper dumper(getpid()); - ASSERT_TRUE(dumper.Init()); - - void* linux_gate_loc = dumper.FindBeginningOfLinuxGateSharedLibrary(getpid()); - ASSERT_TRUE(linux_gate_loc); - bool found_linux_gate = false; - - const wasteful_vector mappings = dumper.mappings(); - const MappingInfo* mapping; - for (unsigned i = 0; i < mappings.size(); ++i) { - mapping = mappings[i]; - if (!strcmp(mapping->name, kLinuxGateLibraryName)) { - found_linux_gate = true; - break; - } - } - EXPECT_TRUE(found_linux_gate); - EXPECT_EQ(linux_gate_loc, reinterpret_cast(mapping->start_addr)); - EXPECT_EQ(0, memcmp(linux_gate_loc, ELFMAG, SELFMAG)); -} -#endif - -TEST(LinuxDumperTest, FileIDsMatch) { - // Calculate the File ID of our binary using both - // FileID::ElfFileIdentifier and LinuxDumper::ElfFileIdentifierForMapping - // and ensure that we get the same result from both. - char exe_name[PATH_MAX]; - ssize_t len = readlink("/proc/self/exe", exe_name, PATH_MAX - 1); - ASSERT_NE(len, -1); - exe_name[len] = '\0'; - - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - // fork a child so we can ptrace it - const pid_t child = fork(); - if (child == 0) { - close(fds[1]); - // now wait forever for the parent - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - close(fds[0]); - - LinuxDumper dumper(child); - ASSERT_TRUE(dumper.Init()); - const wasteful_vector mappings = dumper.mappings(); - bool found_exe = false; - unsigned i; - for (i = 0; i < mappings.size(); ++i) { - const MappingInfo* mapping = mappings[i]; - if (!strcmp(mapping->name, exe_name)) { - found_exe = true; - break; - } - } - ASSERT_TRUE(found_exe); - - uint8_t identifier1[sizeof(MDGUID)]; - uint8_t identifier2[sizeof(MDGUID)]; - EXPECT_TRUE(dumper.ElfFileIdentifierForMapping(*mappings[i], true, i, - identifier1)); - FileID fileid(exe_name); - EXPECT_TRUE(fileid.ElfFileIdentifier(identifier2)); - char identifier_string1[37]; - char identifier_string2[37]; - FileID::ConvertIdentifierToString(identifier1, identifier_string1, - 37); - FileID::ConvertIdentifierToString(identifier2, identifier_string2, - 37); - EXPECT_STREQ(identifier_string1, identifier_string2); - close(fds[1]); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc deleted file mode 100644 index 27c2e994..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Helper program for the linux_dumper class, which creates a bunch of -// threads. The first word of each thread's stack is set to the thread -// id. - -#include -#include -#include -#include -#include -#include - -#include "third_party/lss/linux_syscall_support.h" - -#if defined(__ARM_EABI__) -#define TID_PTR_REGISTER "r3" -#elif defined(__i386) -#define TID_PTR_REGISTER "ecx" -#elif defined(__x86_64) -#define TID_PTR_REGISTER "rcx" -#else -#error This test has not been ported to this platform. -#endif - -void *thread_function(void *data) { - volatile pid_t thread_id = syscall(__NR_gettid); - register volatile pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = &thread_id; - while (true) - asm volatile ("" : : "r" (thread_id_ptr)); - return NULL; -} - -int main(int argc, char *argv[]) { - if (argc < 2) { - fprintf(stderr, - "usage: linux_dumper_unittest_helper <# of threads\n"); - return 1; - } - int pipefd = atoi(argv[1]); - int num_threads = atoi(argv[2]); - if (num_threads < 1) { - fprintf(stderr, "ERROR: number of threads is 0"); - return 1; - } - pthread_t threads[num_threads]; - pthread_attr_t thread_attributes; - pthread_attr_init(&thread_attributes); - pthread_attr_setdetachstate(&thread_attributes, PTHREAD_CREATE_DETACHED); - for (int i = 1; i < num_threads; i++) { - pthread_create(&threads[i], &thread_attributes, &thread_function, NULL); - } - // Signal parent that this process has started all threads. - uint8_t byte = 1; - write(pipefd, &byte, sizeof(byte)); - thread_function(NULL); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_extension_linux.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_extension_linux.h deleted file mode 100644 index 90acc6a8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_extension_linux.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (c) 2010, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_extension_linux.h: A definition of exception codes for - * Linux - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Adam Langley - * Split into its own file: Markus Gutschke */ - - -#ifndef SRC_CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_EXTENSION_LINUX_H_ -#define SRC_CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_EXTENSION_LINUX_H_ - -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" - -// These are additional minidump stream values which are specific to the linux -// breakpad implementation. -enum { - MD_LINUX_CPU_INFO = 0x47670003, /* /proc/cpuinfo */ - MD_LINUX_PROC_STATUS = 0x47670004, /* /proc/$x/status */ - MD_LINUX_LSB_RELEASE = 0x47670005, /* /etc/lsb-release */ - MD_LINUX_CMD_LINE = 0x47670006, /* /proc/$x/cmdline */ - MD_LINUX_ENVIRON = 0x47670007, /* /proc/$x/environ */ - MD_LINUX_AUXV = 0x47670008, /* /proc/$x/auxv */ - MD_LINUX_MAPS = 0x47670009, /* /proc/$x/maps */ - MD_LINUX_DSO_DEBUG = 0x4767000A /* DSO data */ -}; - -typedef struct { - void* addr; - MDRVA name; - void* ld; -} MDRawLinkMap; - -typedef struct { - u_int32_t version; - MDRVA map; - u_int32_t dso_count; - void* brk; - void* ldbase; - void* dynamic; -} MDRawDebug; - -#endif // SRC_CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_EXTENSION_LINUX_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.cc deleted file mode 100644 index b738beea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.cc +++ /dev/null @@ -1,1309 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This code writes out minidump files: -// http://msdn.microsoft.com/en-us/library/ms680378(VS.85,loband).aspx -// -// Minidumps are a Microsoft format which Breakpad uses for recording crash -// dumps. This code has to run in a compromised environment (the address space -// may have received SIGSEGV), thus the following rules apply: -// * You may not enter the dynamic linker. This means that we cannot call -// any symbols in a shared library (inc libc). Because of this we replace -// libc functions in linux_libc_support.h. -// * You may not call syscalls via the libc wrappers. This rule is a subset -// of the first rule but it bears repeating. We have direct wrappers -// around the system calls in linux_syscall_support.h. -// * You may not malloc. There's an alternative allocator in memory.h and -// a canonical instance in the LinuxDumper object. We use the placement -// new form to allocate objects and we don't delete them. - -#include "client/linux/minidump_writer/minidump_writer.h" -#include "client/minidump_file_writer-inl.h" - -#include -#include -#if !defined(__ANDROID__) -#include -#endif -#include -#include -#if !defined(__ANDROID__) -#include -#include -#endif -#include - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/common/minidump_cpu_amd64.h" -#include "google_breakpad/common/minidump_cpu_x86.h" - -#if defined(__ANDROID__) -#include "client/linux/android_link.h" -#include "client/linux/android_ucontext.h" -#endif -#include "client/linux/handler/exception_handler.h" -#include "client/linux/minidump_writer/line_reader.h" -#include "client/linux/minidump_writer/linux_dumper.h" -#include "client/linux/minidump_writer/minidump_extension_linux.h" -#include "common/linux/linux_libc_support.h" -#include "third_party/lss/linux_syscall_support.h" - -// Minidump defines register structures which are different from the raw -// structures which we get from the kernel. These are platform specific -// functions to juggle the ucontext and user structures into minidump format. -#if defined(__i386) -typedef MDRawContextX86 RawContextCPU; - -// Write a uint16_t to memory -// out: memory location to write to -// v: value to write. -static void U16(void* out, uint16_t v) { - memcpy(out, &v, sizeof(v)); -} - -// Write a uint32_t to memory -// out: memory location to write to -// v: value to write. -static void U32(void* out, uint32_t v) { - memcpy(out, &v, sizeof(v)); -} - -// Juggle an x86 user_(fp|fpx|)regs_struct into minidump format -// out: the minidump structure -// info: the collection of register structures. -static void CPUFillFromThreadInfo(MDRawContextX86 *out, - const google_breakpad::ThreadInfo &info) { - out->context_flags = MD_CONTEXT_X86_ALL; - - out->dr0 = info.dregs[0]; - out->dr1 = info.dregs[1]; - out->dr2 = info.dregs[2]; - out->dr3 = info.dregs[3]; - // 4 and 5 deliberatly omitted because they aren't included in the minidump - // format. - out->dr6 = info.dregs[6]; - out->dr7 = info.dregs[7]; - - out->gs = info.regs.xgs; - out->fs = info.regs.xfs; - out->es = info.regs.xes; - out->ds = info.regs.xds; - - out->edi = info.regs.edi; - out->esi = info.regs.esi; - out->ebx = info.regs.ebx; - out->edx = info.regs.edx; - out->ecx = info.regs.ecx; - out->eax = info.regs.eax; - - out->ebp = info.regs.ebp; - out->eip = info.regs.eip; - out->cs = info.regs.xcs; - out->eflags = info.regs.eflags; - out->esp = info.regs.esp; - out->ss = info.regs.xss; - - out->float_save.control_word = info.fpregs.cwd; - out->float_save.status_word = info.fpregs.swd; - out->float_save.tag_word = info.fpregs.twd; - out->float_save.error_offset = info.fpregs.fip; - out->float_save.error_selector = info.fpregs.fcs; - out->float_save.data_offset = info.fpregs.foo; - out->float_save.data_selector = info.fpregs.fos; - - // 8 registers * 10 bytes per register. - memcpy(out->float_save.register_area, info.fpregs.st_space, 10 * 8); - - // This matches the Intel fpsave format. - U16(out->extended_registers + 0, info.fpregs.cwd); - U16(out->extended_registers + 2, info.fpregs.swd); - U16(out->extended_registers + 4, info.fpregs.twd); - U16(out->extended_registers + 6, info.fpxregs.fop); - U32(out->extended_registers + 8, info.fpxregs.fip); - U16(out->extended_registers + 12, info.fpxregs.fcs); - U32(out->extended_registers + 16, info.fpregs.foo); - U16(out->extended_registers + 20, info.fpregs.fos); - U32(out->extended_registers + 24, info.fpxregs.mxcsr); - - memcpy(out->extended_registers + 32, &info.fpxregs.st_space, 128); - memcpy(out->extended_registers + 160, &info.fpxregs.xmm_space, 128); -} - -// Juggle an x86 ucontext into minidump format -// out: the minidump structure -// info: the collection of register structures. -static void CPUFillFromUContext(MDRawContextX86 *out, const ucontext *uc, - const struct _libc_fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | - MD_CONTEXT_X86_FLOATING_POINT; - - out->gs = regs[REG_GS]; - out->fs = regs[REG_FS]; - out->es = regs[REG_ES]; - out->ds = regs[REG_DS]; - - out->edi = regs[REG_EDI]; - out->esi = regs[REG_ESI]; - out->ebx = regs[REG_EBX]; - out->edx = regs[REG_EDX]; - out->ecx = regs[REG_ECX]; - out->eax = regs[REG_EAX]; - - out->ebp = regs[REG_EBP]; - out->eip = regs[REG_EIP]; - out->cs = regs[REG_CS]; - out->eflags = regs[REG_EFL]; - out->esp = regs[REG_UESP]; - out->ss = regs[REG_SS]; - - out->float_save.control_word = fp->cw; - out->float_save.status_word = fp->sw; - out->float_save.tag_word = fp->tag; - out->float_save.error_offset = fp->ipoff; - out->float_save.error_selector = fp->cssel; - out->float_save.data_offset = fp->dataoff; - out->float_save.data_selector = fp->datasel; - - // 8 registers * 10 bytes per register. - memcpy(out->float_save.register_area, fp->_st, 10 * 8); -} - -#elif defined(__x86_64) -typedef MDRawContextAMD64 RawContextCPU; - -static void CPUFillFromThreadInfo(MDRawContextAMD64 *out, - const google_breakpad::ThreadInfo &info) { - out->context_flags = MD_CONTEXT_AMD64_FULL | - MD_CONTEXT_AMD64_SEGMENTS; - - out->cs = info.regs.cs; - - out->ds = info.regs.ds; - out->es = info.regs.es; - out->fs = info.regs.fs; - out->gs = info.regs.gs; - - out->ss = info.regs.ss; - out->eflags = info.regs.eflags; - - out->dr0 = info.dregs[0]; - out->dr1 = info.dregs[1]; - out->dr2 = info.dregs[2]; - out->dr3 = info.dregs[3]; - // 4 and 5 deliberatly omitted because they aren't included in the minidump - // format. - out->dr6 = info.dregs[6]; - out->dr7 = info.dregs[7]; - - out->rax = info.regs.rax; - out->rcx = info.regs.rcx; - out->rdx = info.regs.rdx; - out->rbx = info.regs.rbx; - - out->rsp = info.regs.rsp; - - out->rbp = info.regs.rbp; - out->rsi = info.regs.rsi; - out->rdi = info.regs.rdi; - out->r8 = info.regs.r8; - out->r9 = info.regs.r9; - out->r10 = info.regs.r10; - out->r11 = info.regs.r11; - out->r12 = info.regs.r12; - out->r13 = info.regs.r13; - out->r14 = info.regs.r14; - out->r15 = info.regs.r15; - - out->rip = info.regs.rip; - - out->flt_save.control_word = info.fpregs.cwd; - out->flt_save.status_word = info.fpregs.swd; - out->flt_save.tag_word = info.fpregs.ftw; - out->flt_save.error_opcode = info.fpregs.fop; - out->flt_save.error_offset = info.fpregs.rip; - out->flt_save.error_selector = 0; // We don't have this. - out->flt_save.data_offset = info.fpregs.rdp; - out->flt_save.data_selector = 0; // We don't have this. - out->flt_save.mx_csr = info.fpregs.mxcsr; - out->flt_save.mx_csr_mask = info.fpregs.mxcr_mask; - memcpy(&out->flt_save.float_registers, &info.fpregs.st_space, 8 * 16); - memcpy(&out->flt_save.xmm_registers, &info.fpregs.xmm_space, 16 * 16); -} - -static void CPUFillFromUContext(MDRawContextAMD64 *out, const ucontext *uc, - const struct _libc_fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; - - out->cs = regs[REG_CSGSFS] & 0xffff; - - out->fs = (regs[REG_CSGSFS] >> 32) & 0xffff; - out->gs = (regs[REG_CSGSFS] >> 16) & 0xffff; - - out->eflags = regs[REG_EFL]; - - out->rax = regs[REG_RAX]; - out->rcx = regs[REG_RCX]; - out->rdx = regs[REG_RDX]; - out->rbx = regs[REG_RBX]; - - out->rsp = regs[REG_RSP]; - out->rbp = regs[REG_RBP]; - out->rsi = regs[REG_RSI]; - out->rdi = regs[REG_RDI]; - out->r8 = regs[REG_R8]; - out->r9 = regs[REG_R9]; - out->r10 = regs[REG_R10]; - out->r11 = regs[REG_R11]; - out->r12 = regs[REG_R12]; - out->r13 = regs[REG_R13]; - out->r14 = regs[REG_R14]; - out->r15 = regs[REG_R15]; - - out->rip = regs[REG_RIP]; - - out->flt_save.control_word = fpregs->cwd; - out->flt_save.status_word = fpregs->swd; - out->flt_save.tag_word = fpregs->ftw; - out->flt_save.error_opcode = fpregs->fop; - out->flt_save.error_offset = fpregs->rip; - out->flt_save.data_offset = fpregs->rdp; - out->flt_save.error_selector = 0; // We don't have this. - out->flt_save.data_selector = 0; // We don't have this. - out->flt_save.mx_csr = fpregs->mxcsr; - out->flt_save.mx_csr_mask = fpregs->mxcr_mask; - memcpy(&out->flt_save.float_registers, &fpregs->_st, 8 * 16); - memcpy(&out->flt_save.xmm_registers, &fpregs->_xmm, 16 * 16); -} - -#elif defined(__ARMEL__) -typedef MDRawContextARM RawContextCPU; - -static void CPUFillFromThreadInfo(MDRawContextARM *out, - const google_breakpad::ThreadInfo &info) { - out->context_flags = MD_CONTEXT_ARM_FULL; - - for (int i = 0; i < MD_CONTEXT_ARM_GPR_COUNT; ++i) - out->iregs[i] = info.regs.uregs[i]; - // No CPSR register in ThreadInfo(it's not accessible via ptrace) - out->cpsr = 0; -#if !defined(__ANDROID__) - out->float_save.fpscr = info.fpregs.fpsr | - (static_cast(info.fpregs.fpcr) << 32); - // TODO: sort this out, actually collect floating point registers - memset(&out->float_save.regs, 0, sizeof(out->float_save.regs)); - memset(&out->float_save.extra, 0, sizeof(out->float_save.extra)); -#endif -} - -static void CPUFillFromUContext(MDRawContextARM *out, const ucontext *uc, - const struct _libc_fpstate* fpregs) { - out->context_flags = MD_CONTEXT_ARM_FULL; - - out->iregs[0] = uc->uc_mcontext.arm_r0; - out->iregs[1] = uc->uc_mcontext.arm_r1; - out->iregs[2] = uc->uc_mcontext.arm_r2; - out->iregs[3] = uc->uc_mcontext.arm_r3; - out->iregs[4] = uc->uc_mcontext.arm_r4; - out->iregs[5] = uc->uc_mcontext.arm_r5; - out->iregs[6] = uc->uc_mcontext.arm_r6; - out->iregs[7] = uc->uc_mcontext.arm_r7; - out->iregs[8] = uc->uc_mcontext.arm_r8; - out->iregs[9] = uc->uc_mcontext.arm_r9; - out->iregs[10] = uc->uc_mcontext.arm_r10; - - out->iregs[11] = uc->uc_mcontext.arm_fp; - out->iregs[12] = uc->uc_mcontext.arm_ip; - out->iregs[13] = uc->uc_mcontext.arm_sp; - out->iregs[14] = uc->uc_mcontext.arm_lr; - out->iregs[15] = uc->uc_mcontext.arm_pc; - - out->cpsr = uc->uc_mcontext.arm_cpsr; - - // TODO: fix this after fixing ExceptionHandler - out->float_save.fpscr = 0; - memset(&out->float_save.regs, 0, sizeof(out->float_save.regs)); - memset(&out->float_save.extra, 0, sizeof(out->float_save.extra)); -} - -#else -#error "This code has not been ported to your platform yet." -#endif - -namespace google_breakpad { - -class MinidumpWriter { - public: - MinidumpWriter(const char* filename, - pid_t crashing_pid, - const ExceptionHandler::CrashContext* context, - const MappingList& mappings) - : filename_(filename), - siginfo_(&context->siginfo), - ucontext_(&context->context), -#if !defined(__ARM_EABI__) - float_state_(&context->float_state), -#else - // TODO: fix this after fixing ExceptionHandler - float_state_(NULL), -#endif - crashing_tid_(context->tid), - dumper_(crashing_pid), - memory_blocks_(dumper_.allocator()), - mapping_list_(mappings) { - } - - bool Init() { - return dumper_.Init() && minidump_writer_.Open(filename_) && - dumper_.ThreadsSuspend(); - } - - ~MinidumpWriter() { - minidump_writer_.Close(); - dumper_.ThreadsResume(); - } - - bool Dump() { - // The dynamic linker makes information available that helps gdb find all - // DSOs loaded into the program. If we can access this information, we dump - // it to a MD_LINUX_DSO_DEBUG stream. - struct r_debug* r_debug = NULL; - uint32_t dynamic_length = 0; -#if !defined(__ANDROID__) - // The Android NDK is missing structure definitions for most of this. - // For now, it's simpler just to skip it. - for (int i = 0;;) { - ElfW(Dyn) dyn; - dynamic_length += sizeof(dyn); - dumper_.CopyFromProcess(&dyn, crashing_tid_, _DYNAMIC+i++, sizeof(dyn)); - if (dyn.d_tag == DT_DEBUG) { - r_debug = (struct r_debug*)dyn.d_un.d_ptr; - continue; - } else if (dyn.d_tag == DT_NULL) { - break; - } - } -#endif - - // A minidump file contains a number of tagged streams. This is the number - // of stream which we write. - unsigned kNumWriters = 12; - if (r_debug) - ++kNumWriters; - - TypedMDRVA header(&minidump_writer_); - TypedMDRVA dir(&minidump_writer_); - if (!header.Allocate()) - return false; - if (!dir.AllocateArray(kNumWriters)) - return false; - memset(header.get(), 0, sizeof(MDRawHeader)); - - header.get()->signature = MD_HEADER_SIGNATURE; - header.get()->version = MD_HEADER_VERSION; - header.get()->time_date_stamp = time(NULL); - header.get()->stream_count = kNumWriters; - header.get()->stream_directory_rva = dir.position(); - - unsigned dir_index = 0; - MDRawDirectory dirent; - - if (!WriteThreadListStream(&dirent)) - return false; - dir.CopyIndex(dir_index++, &dirent); - - if (!WriteMappings(&dirent)) - return false; - dir.CopyIndex(dir_index++, &dirent); - - if (!WriteMemoryListStream(&dirent)) - return false; - dir.CopyIndex(dir_index++, &dirent); - - if (!WriteExceptionStream(&dirent)) - return false; - dir.CopyIndex(dir_index++, &dirent); - - if (!WriteSystemInfoStream(&dirent)) - return false; - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_CPU_INFO; - if (!WriteFile(&dirent.location, "/proc/cpuinfo")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_PROC_STATUS; - if (!WriteProcFile(&dirent.location, crashing_tid_, "status")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_LSB_RELEASE; - if (!WriteFile(&dirent.location, "/etc/lsb-release")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_CMD_LINE; - if (!WriteProcFile(&dirent.location, crashing_tid_, "cmdline")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_ENVIRON; - if (!WriteProcFile(&dirent.location, crashing_tid_, "environ")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_AUXV; - if (!WriteProcFile(&dirent.location, crashing_tid_, "auxv")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - dirent.stream_type = MD_LINUX_MAPS; - if (!WriteProcFile(&dirent.location, crashing_tid_, "maps")) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - - if (r_debug) { - dirent.stream_type = MD_LINUX_DSO_DEBUG; - if (!WriteDSODebugStream(&dirent, r_debug, dynamic_length)) - NullifyDirectoryEntry(&dirent); - dir.CopyIndex(dir_index++, &dirent); - } - - // If you add more directory entries, don't forget to update kNumWriters, - // above. - - dumper_.ThreadsResume(); - return true; - } - - // Check if the top of the stack is part of a system call that has been - // redirected by the seccomp sandbox. If so, try to pop the stack frames - // all the way back to the point where the interception happened. - void PopSeccompStackFrame(RawContextCPU* cpu, const MDRawThread& thread, - uint8_t* stack_copy) { -#if defined(__x86_64) - u_int64_t bp = cpu->rbp; - u_int64_t top = thread.stack.start_of_memory_range; - for (int i = 4; i--; ) { - if (bp < top || - bp + sizeof(bp) > thread.stack.start_of_memory_range + - thread.stack.memory.data_size || - bp & 1) { - break; - } - uint64_t old_top = top; - top = bp; - u_int8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range; - memcpy(&bp, bp_addr, sizeof(bp)); - if (bp == 0xDEADBEEFDEADBEEFull) { - struct { - uint64_t r15; - uint64_t r14; - uint64_t r13; - uint64_t r12; - uint64_t r11; - uint64_t r10; - uint64_t r9; - uint64_t r8; - uint64_t rdi; - uint64_t rsi; - uint64_t rdx; - uint64_t rcx; - uint64_t rbx; - uint64_t deadbeef; - uint64_t rbp; - uint64_t fakeret; - uint64_t ret; - /* char redzone[128]; */ - } seccomp_stackframe; - if (top - offsetof(typeof(seccomp_stackframe), deadbeef) < old_top || - top - offsetof(typeof(seccomp_stackframe), deadbeef) + - sizeof(seccomp_stackframe) > - thread.stack.start_of_memory_range+thread.stack.memory.data_size) { - break; - } - memcpy(&seccomp_stackframe, - bp_addr - offsetof(typeof(seccomp_stackframe), deadbeef), - sizeof(seccomp_stackframe)); - cpu->rbx = seccomp_stackframe.rbx; - cpu->rcx = seccomp_stackframe.rcx; - cpu->rdx = seccomp_stackframe.rdx; - cpu->rsi = seccomp_stackframe.rsi; - cpu->rdi = seccomp_stackframe.rdi; - cpu->rbp = seccomp_stackframe.rbp; - cpu->rsp = top + 4*sizeof(uint64_t) + 128; - cpu->r8 = seccomp_stackframe.r8; - cpu->r9 = seccomp_stackframe.r9; - cpu->r10 = seccomp_stackframe.r10; - cpu->r11 = seccomp_stackframe.r11; - cpu->r12 = seccomp_stackframe.r12; - cpu->r13 = seccomp_stackframe.r13; - cpu->r14 = seccomp_stackframe.r14; - cpu->r15 = seccomp_stackframe.r15; - cpu->rip = seccomp_stackframe.fakeret; - return; - } - } -#elif defined(__i386) - u_int32_t bp = cpu->ebp; - u_int32_t top = thread.stack.start_of_memory_range; - for (int i = 4; i--; ) { - if (bp < top || - bp + sizeof(bp) > thread.stack.start_of_memory_range + - thread.stack.memory.data_size || - bp & 1) { - break; - } - uint32_t old_top = top; - top = bp; - u_int8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range; - memcpy(&bp, bp_addr, sizeof(bp)); - if (bp == 0xDEADBEEFu) { - struct { - uint32_t edi; - uint32_t esi; - uint32_t edx; - uint32_t ecx; - uint32_t ebx; - uint32_t deadbeef; - uint32_t ebp; - uint32_t fakeret; - uint32_t ret; - } seccomp_stackframe; - if (top - offsetof(typeof(seccomp_stackframe), deadbeef) < old_top || - top - offsetof(typeof(seccomp_stackframe), deadbeef) + - sizeof(seccomp_stackframe) > - thread.stack.start_of_memory_range+thread.stack.memory.data_size) { - break; - } - memcpy(&seccomp_stackframe, - bp_addr - offsetof(typeof(seccomp_stackframe), deadbeef), - sizeof(seccomp_stackframe)); - cpu->ebx = seccomp_stackframe.ebx; - cpu->ecx = seccomp_stackframe.ecx; - cpu->edx = seccomp_stackframe.edx; - cpu->esi = seccomp_stackframe.esi; - cpu->edi = seccomp_stackframe.edi; - cpu->ebp = seccomp_stackframe.ebp; - cpu->esp = top + 4*sizeof(void*); - cpu->eip = seccomp_stackframe.fakeret; - return; - } - } -#endif - } - - // Write information about the threads. - bool WriteThreadListStream(MDRawDirectory* dirent) { - const unsigned num_threads = dumper_.threads().size(); - - TypedMDRVA list(&minidump_writer_); - if (!list.AllocateObjectAndArray(num_threads, sizeof(MDRawThread))) - return false; - - dirent->stream_type = MD_THREAD_LIST_STREAM; - dirent->location = list.location(); - - *list.get() = num_threads; - - for (unsigned i = 0; i < num_threads; ++i) { - MDRawThread thread; - my_memset(&thread, 0, sizeof(thread)); - thread.thread_id = dumper_.threads()[i]; - // We have a different source of information for the crashing thread. If - // we used the actual state of the thread we would find it running in the - // signal handler with the alternative stack, which would be deeply - // unhelpful. - if ((pid_t)thread.thread_id == crashing_tid_) { - const void* stack; - size_t stack_len; - if (!dumper_.GetStackInfo(&stack, &stack_len, GetStackPointer())) - return false; - UntypedMDRVA memory(&minidump_writer_); - if (!memory.Allocate(stack_len)) - return false; - uint8_t* stack_copy = (uint8_t*) dumper_.allocator()->Alloc(stack_len); - dumper_.CopyFromProcess(stack_copy, thread.thread_id, stack, stack_len); - memory.Copy(stack_copy, stack_len); - thread.stack.start_of_memory_range = (uintptr_t) (stack); - thread.stack.memory = memory.location(); - memory_blocks_.push_back(thread.stack); - - // Copy 256 bytes around crashing instruction pointer to minidump. - const size_t kIPMemorySize = 256; - u_int64_t ip = GetInstructionPointer(); - // Bound it to the upper and lower bounds of the memory map - // it's contained within. If it's not in mapped memory, - // don't bother trying to write it. - bool ip_is_mapped = false; - MDMemoryDescriptor ip_memory_d; - for (unsigned i = 0; i < dumper_.mappings().size(); ++i) { - const MappingInfo& mapping = *dumper_.mappings()[i]; - if (ip >= mapping.start_addr && - ip < mapping.start_addr + mapping.size) { - ip_is_mapped = true; - // Try to get 128 bytes before and after the IP, but - // settle for whatever's available. - ip_memory_d.start_of_memory_range = - std::max(mapping.start_addr, - uintptr_t(ip - (kIPMemorySize / 2))); - uintptr_t end_of_range = - std::min(uintptr_t(ip + (kIPMemorySize / 2)), - uintptr_t(mapping.start_addr + mapping.size)); - ip_memory_d.memory.data_size = - end_of_range - ip_memory_d.start_of_memory_range; - break; - } - } - - if (ip_is_mapped) { - UntypedMDRVA ip_memory(&minidump_writer_); - if (!ip_memory.Allocate(ip_memory_d.memory.data_size)) - return false; - uint8_t* memory_copy = - (uint8_t*) dumper_.allocator()->Alloc(ip_memory_d.memory.data_size); - dumper_.CopyFromProcess( - memory_copy, - thread.thread_id, - reinterpret_cast(ip_memory_d.start_of_memory_range), - ip_memory_d.memory.data_size); - ip_memory.Copy(memory_copy, ip_memory_d.memory.data_size); - ip_memory_d.memory = ip_memory.location(); - memory_blocks_.push_back(ip_memory_d); - } - - TypedMDRVA cpu(&minidump_writer_); - if (!cpu.Allocate()) - return false; - my_memset(cpu.get(), 0, sizeof(RawContextCPU)); - CPUFillFromUContext(cpu.get(), ucontext_, float_state_); - PopSeccompStackFrame(cpu.get(), thread, stack_copy); - thread.thread_context = cpu.location(); - crashing_thread_context_ = cpu.location(); - } else { - ThreadInfo info; - if (!dumper_.ThreadInfoGet(dumper_.threads()[i], &info)) - return false; - UntypedMDRVA memory(&minidump_writer_); - if (!memory.Allocate(info.stack_len)) - return false; - uint8_t* stack_copy = - (uint8_t*) dumper_.allocator()->Alloc(info.stack_len); - dumper_.CopyFromProcess(stack_copy, thread.thread_id, info.stack, - info.stack_len); - memory.Copy(stack_copy, info.stack_len); - thread.stack.start_of_memory_range = (uintptr_t)(info.stack); - thread.stack.memory = memory.location(); - memory_blocks_.push_back(thread.stack); - - TypedMDRVA cpu(&minidump_writer_); - if (!cpu.Allocate()) - return false; - my_memset(cpu.get(), 0, sizeof(RawContextCPU)); - CPUFillFromThreadInfo(cpu.get(), info); - PopSeccompStackFrame(cpu.get(), thread, stack_copy); - thread.thread_context = cpu.location(); - } - - list.CopyIndexAfterObject(i, &thread, sizeof(thread)); - } - - return true; - } - - static bool ShouldIncludeMapping(const MappingInfo& mapping) { - if (mapping.name[0] == 0 || // only want modules with filenames. - mapping.offset || // only want to include one mapping per shared lib. - mapping.size < 4096) { // too small to get a signature for. - return false; - } - - return true; - } - - // If there is caller-provided information about this mapping - // in the mapping_list_ list, return true. Otherwise, return false. - bool HaveMappingInfo(const MappingInfo& mapping) { - for (MappingList::const_iterator iter = mapping_list_.begin(); - iter != mapping_list_.end(); - ++iter) { - // Ignore any mappings that are wholly contained within - // mappings in the mapping_info_ list. - if (mapping.start_addr >= iter->first.start_addr && - (mapping.start_addr + mapping.size) <= - (iter->first.start_addr + iter->first.size)) { - return true; - } - } - return false; - } - - // Write information about the mappings in effect. Because we are using the - // minidump format, the information about the mappings is pretty limited. - // Because of this, we also include the full, unparsed, /proc/$x/maps file in - // another stream in the file. - bool WriteMappings(MDRawDirectory* dirent) { - const unsigned num_mappings = dumper_.mappings().size(); - unsigned num_output_mappings = mapping_list_.size(); - - for (unsigned i = 0; i < dumper_.mappings().size(); ++i) { - const MappingInfo& mapping = *dumper_.mappings()[i]; - if (ShouldIncludeMapping(mapping) && !HaveMappingInfo(mapping)) - num_output_mappings++; - } - - TypedMDRVA list(&minidump_writer_); - if (!list.AllocateObjectAndArray(num_output_mappings, MD_MODULE_SIZE)) - return false; - - dirent->stream_type = MD_MODULE_LIST_STREAM; - dirent->location = list.location(); - *list.get() = num_output_mappings; - - // First write all the mappings from the dumper - unsigned int j = 0; - for (unsigned i = 0; i < num_mappings; ++i) { - const MappingInfo& mapping = *dumper_.mappings()[i]; - if (!ShouldIncludeMapping(mapping) || HaveMappingInfo(mapping)) - continue; - - MDRawModule mod; - if (!FillRawModule(mapping, true, i, mod, NULL)) - return false; - list.CopyIndexAfterObject(j++, &mod, MD_MODULE_SIZE); - } - // Next write all the mappings provided by the caller - for (MappingList::const_iterator iter = mapping_list_.begin(); - iter != mapping_list_.end(); - ++iter) { - MDRawModule mod; - if (!FillRawModule(iter->first, false, 0, mod, iter->second)) - return false; - list.CopyIndexAfterObject(j++, &mod, MD_MODULE_SIZE); - } - - return true; - } - - // Fill the MDRawModule |mod| with information about the provided - // |mapping|. If |identifier| is non-NULL, use it instead of calculating - // a file ID from the mapping. - bool FillRawModule(const MappingInfo& mapping, - bool member, - unsigned int mapping_id, - MDRawModule& mod, - const u_int8_t* identifier) { - my_memset(&mod, 0, MD_MODULE_SIZE); - - mod.base_of_image = mapping.start_addr; - mod.size_of_image = mapping.size; - const size_t filepath_len = my_strlen(mapping.name); - - // Figure out file name from path - const char* filename_ptr = mapping.name + filepath_len - 1; - while (filename_ptr >= mapping.name) { - if (*filename_ptr == '/') - break; - filename_ptr--; - } - filename_ptr++; - - const size_t filename_len = mapping.name + filepath_len - filename_ptr; - - uint8_t cv_buf[MDCVInfoPDB70_minsize + NAME_MAX]; - uint8_t* cv_ptr = cv_buf; - UntypedMDRVA cv(&minidump_writer_); - if (!cv.Allocate(MDCVInfoPDB70_minsize + filename_len + 1)) - return false; - - const uint32_t cv_signature = MD_CVINFOPDB70_SIGNATURE; - memcpy(cv_ptr, &cv_signature, sizeof(cv_signature)); - cv_ptr += sizeof(cv_signature); - uint8_t* signature = cv_ptr; - cv_ptr += sizeof(MDGUID); - if (identifier) { - // GUID was provided by caller. - memcpy(signature, identifier, sizeof(MDGUID)); - } else { - dumper_.ElfFileIdentifierForMapping(mapping, member, - mapping_id, signature); - } - my_memset(cv_ptr, 0, sizeof(uint32_t)); // Set age to 0 on Linux. - cv_ptr += sizeof(uint32_t); - - // Write pdb_file_name - memcpy(cv_ptr, filename_ptr, filename_len + 1); - cv.Copy(cv_buf, MDCVInfoPDB70_minsize + filename_len + 1); - - mod.cv_record = cv.location(); - - MDLocationDescriptor ld; - if (!minidump_writer_.WriteString(mapping.name, filepath_len, &ld)) - return false; - mod.module_name_rva = ld.rva; - return true; - } - - bool WriteMemoryListStream(MDRawDirectory* dirent) { - TypedMDRVA list(&minidump_writer_); - if (!list.AllocateObjectAndArray(memory_blocks_.size(), - sizeof(MDMemoryDescriptor))) - return false; - - dirent->stream_type = MD_MEMORY_LIST_STREAM; - dirent->location = list.location(); - - *list.get() = memory_blocks_.size(); - - for (size_t i = 0; i < memory_blocks_.size(); ++i) { - list.CopyIndexAfterObject(i, &memory_blocks_[i], - sizeof(MDMemoryDescriptor)); - } - return true; - } - - bool WriteExceptionStream(MDRawDirectory* dirent) { - TypedMDRVA exc(&minidump_writer_); - if (!exc.Allocate()) - return false; - my_memset(exc.get(), 0, sizeof(MDRawExceptionStream)); - - dirent->stream_type = MD_EXCEPTION_STREAM; - dirent->location = exc.location(); - - exc.get()->thread_id = crashing_tid_; - exc.get()->exception_record.exception_code = siginfo_->si_signo; - exc.get()->exception_record.exception_address = - (uintptr_t) siginfo_->si_addr; - exc.get()->thread_context = crashing_thread_context_; - - return true; - } - - bool WriteSystemInfoStream(MDRawDirectory* dirent) { - TypedMDRVA si(&minidump_writer_); - if (!si.Allocate()) - return false; - my_memset(si.get(), 0, sizeof(MDRawSystemInfo)); - - dirent->stream_type = MD_SYSTEM_INFO_STREAM; - dirent->location = si.location(); - - WriteCPUInformation(si.get()); - WriteOSInformation(si.get()); - - return true; - } - - bool WriteDSODebugStream(MDRawDirectory* dirent, struct r_debug* r_debug, - uint32_t dynamic_length) { -#if defined(__ANDROID__) - return false; -#else - // The caller provided us with a pointer to "struct r_debug". We can - // look up the "r_map" field to get a linked list of all loaded DSOs. - // Our list of DSOs potentially is different from the ones in the crashing - // process. So, we have to be careful to never dereference pointers - // directly. Instead, we use CopyFromProcess() everywhere. - // See for a more detailed discussion of the how the dynamic - // loader communicates with debuggers. - - // Count the number of loaded DSOs - int dso_count = 0; - struct r_debug debug_entry; - dumper_.CopyFromProcess(&debug_entry, crashing_tid_, r_debug, - sizeof(debug_entry)); - for (struct link_map* ptr = debug_entry.r_map; ptr; ) { - struct link_map map; - dumper_.CopyFromProcess(&map, crashing_tid_, ptr, sizeof(map)); - ptr = map.l_next; - dso_count++; - } - - MDRVA linkmap_rva = minidump_writer_.kInvalidMDRVA; - if (dso_count > 0) { - // If we have at least one DSO, create an array of MDRawLinkMap - // entries in the minidump file. - TypedMDRVA linkmap(&minidump_writer_); - if (!linkmap.AllocateArray(dso_count)) - return false; - linkmap_rva = linkmap.location().rva; - int idx = 0; - - // Iterate over DSOs and write their information to mini dump - for (struct link_map* ptr = debug_entry.r_map; ptr; ) { - struct link_map map; - dumper_.CopyFromProcess(&map, crashing_tid_, ptr, sizeof(map)); - ptr = map.l_next; - char filename[257] = { 0 }; - if (map.l_name) { - dumper_.CopyFromProcess(filename, crashing_tid_, map.l_name, - sizeof(filename) - 1); - } - MDLocationDescriptor location; - if (!minidump_writer_.WriteString(filename, 0, &location)) - return false; - MDRawLinkMap entry; - entry.name = location.rva; - entry.addr = (void*)map.l_addr; - entry.ld = (void*)map.l_ld; - linkmap.CopyIndex(idx++, &entry); - } - } - - // Write MD_LINUX_DSO_DEBUG record - TypedMDRVA debug(&minidump_writer_); - if (!debug.AllocateObjectAndArray(1, dynamic_length)) - return false; - my_memset(debug.get(), 0, sizeof(MDRawDebug)); - dirent->stream_type = MD_LINUX_DSO_DEBUG; - dirent->location = debug.location(); - - debug.get()->version = debug_entry.r_version; - debug.get()->map = linkmap_rva; - debug.get()->dso_count = dso_count; - debug.get()->brk = (void*)debug_entry.r_brk; - debug.get()->ldbase = (void*)debug_entry.r_ldbase; - debug.get()->dynamic = (void*)&_DYNAMIC; - - char *dso_debug_data = new char[dynamic_length]; - dumper_.CopyFromProcess(dso_debug_data, crashing_tid_, &_DYNAMIC, - dynamic_length); - debug.CopyIndexAfterObject(0, dso_debug_data, dynamic_length); - delete[] dso_debug_data; - - return true; -#endif - } - - private: -#if defined(__i386) - uintptr_t GetStackPointer() { - return ucontext_->uc_mcontext.gregs[REG_ESP]; - } - - uintptr_t GetInstructionPointer() { - return ucontext_->uc_mcontext.gregs[REG_EIP]; - } -#elif defined(__x86_64) - uintptr_t GetStackPointer() { - return ucontext_->uc_mcontext.gregs[REG_RSP]; - } - - uintptr_t GetInstructionPointer() { - return ucontext_->uc_mcontext.gregs[REG_RIP]; - } -#elif defined(__ARM_EABI__) - uintptr_t GetStackPointer() { - return ucontext_->uc_mcontext.arm_sp; - } - - uintptr_t GetInstructionPointer() { - return ucontext_->uc_mcontext.arm_ip; - } -#else -#error "This code has not been ported to your platform yet." -#endif - - void NullifyDirectoryEntry(MDRawDirectory* dirent) { - dirent->stream_type = 0; - dirent->location.data_size = 0; - dirent->location.rva = 0; - } - - bool WriteCPUInformation(MDRawSystemInfo* sys_info) { - char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0}; - static const char vendor_id_name[] = "vendor_id"; - static const size_t vendor_id_name_length = sizeof(vendor_id_name) - 1; - - struct CpuInfoEntry { - const char* info_name; - int value; - bool found; - } cpu_info_table[] = { - { "processor", -1, false }, - { "model", 0, false }, - { "stepping", 0, false }, - { "cpu family", 0, false }, - }; - - // processor_architecture should always be set, do this first - sys_info->processor_architecture = -#if defined(__i386) - MD_CPU_ARCHITECTURE_X86; -#elif defined(__x86_64) - MD_CPU_ARCHITECTURE_AMD64; -#elif defined(__arm__) - MD_CPU_ARCHITECTURE_ARM; -#else -#error "Unknown CPU arch" -#endif - - const int fd = sys_open("/proc/cpuinfo", O_RDONLY, 0); - if (fd < 0) - return false; - - { - PageAllocator allocator; - LineReader* const line_reader = new(allocator) LineReader(fd); - const char* line; - unsigned line_len; - while (line_reader->GetNextLine(&line, &line_len)) { - for (size_t i = 0; - i < sizeof(cpu_info_table) / sizeof(cpu_info_table[0]); - i++) { - CpuInfoEntry* entry = &cpu_info_table[i]; - if (entry->found && i) - continue; - if (!strncmp(line, entry->info_name, strlen(entry->info_name))) { - const char* value = strchr(line, ':'); - if (!value) - continue; - - // the above strncmp only matches the prefix, it might be the wrong - // line. i.e. we matched "model name" instead of "model". - // check and make sure there is only spaces between the prefix and - // the colon. - const char* space_ptr = line + strlen(entry->info_name); - for (; space_ptr < value; space_ptr++) { - if (!isspace(*space_ptr)) { - break; - } - } - if (space_ptr != value) - continue; - - sscanf(++value, " %d", &(entry->value)); - entry->found = true; - } - } - - // special case for vendor_id - if (!strncmp(line, vendor_id_name, vendor_id_name_length)) { - const char* value = strchr(line, ':'); - if (!value) - goto popline; - - // skip ':" and all the spaces that follows - do { - value++; - } while (isspace(*value)); - - if (*value) { - size_t length = strlen(value); - if (length == 0) - goto popline; - // we don't want the trailing newline - if (value[length - 1] == '\n') - length--; - // ensure we have space for the value - if (length < sizeof(vendor_id)) - strncpy(vendor_id, value, length); - } - } - - popline: - line_reader->PopLine(line_len); - } - sys_close(fd); - } - - // make sure we got everything we wanted - for (size_t i = 0; - i < sizeof(cpu_info_table) / sizeof(cpu_info_table[0]); - i++) { - if (!cpu_info_table[i].found) { - return false; - } - } - // /proc/cpuinfo contains cpu id, change it into number by adding one. - cpu_info_table[0].value++; - - sys_info->number_of_processors = cpu_info_table[0].value; - sys_info->processor_level = cpu_info_table[3].value; - sys_info->processor_revision = cpu_info_table[1].value << 8 | - cpu_info_table[2].value; - - if (vendor_id[0] != '\0') { - memcpy(sys_info->cpu.x86_cpu_info.vendor_id, vendor_id, - sizeof(sys_info->cpu.x86_cpu_info.vendor_id)); - } - return true; - } - - bool WriteFile(MDLocationDescriptor* result, const char* filename) { - const int fd = sys_open(filename, O_RDONLY, 0); - if (fd < 0) - return false; - - // We can't stat the files because several of the files that we want to - // read are kernel seqfiles, which always have a length of zero. So we have - // to read as much as we can into a buffer. - static const unsigned kBufSize = 1024 - 2*sizeof(void*); - struct Buffers { - struct Buffers* next; - size_t len; - uint8_t data[kBufSize]; - } *buffers = - (struct Buffers*) dumper_.allocator()->Alloc(sizeof(struct Buffers)); - buffers->next = NULL; - buffers->len = 0; - - size_t total = 0; - for (struct Buffers* bufptr = buffers;;) { - ssize_t r; - do { - r = sys_read(fd, &bufptr->data[bufptr->len], kBufSize - bufptr->len); - } while (r == -1 && errno == EINTR); - - if (r < 1) - break; - - total += r; - bufptr->len += r; - if (bufptr->len == kBufSize) { - bufptr->next = - (struct Buffers*) dumper_.allocator()->Alloc(sizeof(struct Buffers)); - bufptr = bufptr->next; - bufptr->next = NULL; - bufptr->len = 0; - } - } - sys_close(fd); - - if (!total) - return false; - - UntypedMDRVA memory(&minidump_writer_); - if (!memory.Allocate(total)) - return false; - for (MDRVA pos = memory.position(); buffers; buffers = buffers->next) { - memory.Copy(pos, &buffers->data, buffers->len); - pos += buffers->len; - } - *result = memory.location(); - return true; - } - - bool WriteOSInformation(MDRawSystemInfo* sys_info) { - sys_info->platform_id = MD_OS_LINUX; - - struct utsname uts; - if (uname(&uts)) - return false; - - static const size_t buf_len = 512; - char buf[buf_len] = {0}; - size_t space_left = buf_len - 1; - const char* info_table[] = { - uts.sysname, - uts.release, - uts.version, - uts.machine, - NULL - }; - bool first_item = true; - for (const char** cur_info = info_table; *cur_info; cur_info++) { - static const char* separator = " "; - size_t separator_len = strlen(separator); - size_t info_len = strlen(*cur_info); - if (info_len == 0) - continue; - - if (space_left < info_len + (first_item ? 0 : separator_len)) - break; - - if (!first_item) { - strcat(buf, separator); - space_left -= separator_len; - } - - first_item = false; - strcat(buf, *cur_info); - space_left -= info_len; - } - - MDLocationDescriptor location; - if (!minidump_writer_.WriteString(buf, 0, &location)) - return false; - sys_info->csd_version_rva = location.rva; - - return true; - } - - bool WriteProcFile(MDLocationDescriptor* result, pid_t pid, - const char* filename) { - char buf[NAME_MAX]; - dumper_.BuildProcPath(buf, pid, filename); - return WriteFile(result, buf); - } - - const char* const filename_; // output filename - const siginfo_t* const siginfo_; // from the signal handler (see sigaction) - const struct ucontext* const ucontext_; // also from the signal handler - const struct _libc_fpstate* const float_state_; // ditto - const pid_t crashing_tid_; // the process which actually crashed - LinuxDumper dumper_; - MinidumpFileWriter minidump_writer_; - MDLocationDescriptor crashing_thread_context_; - // Blocks of memory written to the dump. These are all currently - // written while writing the thread list stream, but saved here - // so a memory list stream can be written afterwards. - wasteful_vector memory_blocks_; - // Additional information about some mappings provided by the caller. - const MappingList& mapping_list_; -}; - -bool WriteMinidump(const char* filename, pid_t crashing_process, - const void* blob, size_t blob_size) { - MappingList m; - return WriteMinidump(filename, crashing_process, blob, blob_size, m); -} - -bool WriteMinidump(const char* filename, pid_t crashing_process, - const void* blob, size_t blob_size, - const MappingList& mappings) { - if (blob_size != sizeof(ExceptionHandler::CrashContext)) - return false; - const ExceptionHandler::CrashContext* context = - reinterpret_cast(blob); - MinidumpWriter writer(filename, crashing_process, context, mappings); - if (!writer.Init()) - return false; - return writer.Dump(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.h deleted file mode 100644 index 156ca35f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ -#define CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ - -#include -#include - -#include -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// A list of -typedef std::pair MappingEntry; -typedef std::list MappingList; - -// Write a minidump to the filesystem. This function does not malloc nor use -// libc functions which may. Thus, it can be used in contexts where the state -// of the heap may be corrupt. -// filename: the filename to write to. This is opened O_EXCL and fails if -// open fails. -// crashing_process: the pid of the crashing process. This must be trusted. -// blob: a blob of data from the crashing process. See exception_handler.h -// blob_size: the length of |blob|, in bytes -// -// Returns true iff successful. -bool WriteMinidump(const char* filename, pid_t crashing_process, - const void* blob, size_t blob_size); - -// This overload also allows passing a list of known mappings. -bool WriteMinidump(const char* filename, pid_t crashing_process, - const void* blob, size_t blob_size, - const MappingList& mappings); - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer_unittest.cc deleted file mode 100644 index 5f6bb34a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/minidump_writer/minidump_writer_unittest.cc +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright (c) 2011 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include - -#include - -#include "breakpad_googletest_includes.h" -#include "client/linux/handler/exception_handler.h" -#include "client/linux/minidump_writer/linux_dumper.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/linux/eintr_wrapper.h" -#include "common/linux/file_id.h" -#include "google_breakpad/processor/minidump.h" - -using namespace google_breakpad; - -#if !defined(__ANDROID__) -#define TEMPDIR "/tmp" -#else -#define TEMPDIR "/data/local/tmp" -#endif - -// Length of a formatted GUID string = -// sizeof(MDGUID) * 2 + 4 (for dashes) + 1 (null terminator) -const int kGUIDStringSize = 37; - -namespace { -typedef testing::Test MinidumpWriterTest; -} - -TEST(MinidumpWriterTest, Setup) { - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - const pid_t child = fork(); - if (child == 0) { - close(fds[1]); - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - close(fds[0]); - - ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - - char templ[] = TEMPDIR "/minidump-writer-unittest-XXXXXX"; - mktemp(templ); - // Set a non-zero tid to avoid tripping asserts. - context.tid = 1; - ASSERT_TRUE(WriteMinidump(templ, child, &context, sizeof(context))); - struct stat st; - ASSERT_EQ(stat(templ, &st), 0); - ASSERT_GT(st.st_size, 0u); - unlink(templ); - - close(fds[1]); -} - -// Test that mapping info can be specified when writing a minidump, -// and that it ends up in the module list of the minidump. -TEST(MinidumpWriterTest, MappingInfo) { - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = sysconf(_SC_PAGESIZE); - const char* kMemoryName = "a fake module"; - const u_int8_t kModuleGUID[sizeof(MDGUID)] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF - }; - char module_identifier_buffer[kGUIDStringSize]; - FileID::ConvertIdentifierToString(kModuleGUID, - module_identifier_buffer, - sizeof(module_identifier_buffer)); - string module_identifier(module_identifier_buffer); - // Strip out dashes - size_t pos; - while ((pos = module_identifier.find('-')) != string::npos) { - module_identifier.erase(pos, 1); - } - // And append a zero, because module IDs include an "age" field - // which is always zero on Linux. - module_identifier += "0"; - - // Get some memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - const u_int64_t kMemoryAddress = reinterpret_cast(memory); - ASSERT_TRUE(memory); - - const pid_t child = fork(); - if (child == 0) { - close(fds[1]); - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - close(fds[0]); - - ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - context.tid = 1; - - char templ[] = TEMPDIR "/minidump-writer-unittest-XXXXXX"; - mktemp(templ); - - // Add information about the mapped memory. - MappingInfo info; - info.start_addr = kMemoryAddress; - info.size = kMemorySize; - info.offset = 0; - strcpy(info.name, kMemoryName); - - MappingList mappings; - MappingEntry mapping; - mapping.first = info; - memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); - mappings.push_back(mapping); - ASSERT_TRUE(WriteMinidump(templ, child, &context, sizeof(context), mappings)); - - // Read the minidump. Load the module list, and ensure that - // the mmap'ed |memory| is listed with the given module name - // and debug ID. - Minidump minidump(templ); - ASSERT_TRUE(minidump.Read()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* module = - module_list->GetModuleForAddress(kMemoryAddress); - ASSERT_TRUE(module); - - EXPECT_EQ(kMemoryAddress, module->base_address()); - EXPECT_EQ(kMemorySize, module->size()); - EXPECT_EQ(kMemoryName, module->code_file()); - EXPECT_EQ(module_identifier, module->debug_identifier()); - - unlink(templ); - close(fds[1]); -} - -// Test that mapping info can be specified, and that it overrides -// existing mappings that are wholly contained within the specified -// range. -TEST(MinidumpWriterTest, MappingInfoContained) { - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = sysconf(_SC_PAGESIZE); - const char* kMemoryName = "a fake module"; - const u_int8_t kModuleGUID[sizeof(MDGUID)] = { - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF - }; - char module_identifier_buffer[kGUIDStringSize]; - FileID::ConvertIdentifierToString(kModuleGUID, - module_identifier_buffer, - sizeof(module_identifier_buffer)); - string module_identifier(module_identifier_buffer); - // Strip out dashes - size_t pos; - while ((pos = module_identifier.find('-')) != string::npos) { - module_identifier.erase(pos, 1); - } - // And append a zero, because module IDs include an "age" field - // which is always zero on Linux. - module_identifier += "0"; - - // mmap a file - char tempfile[] = TEMPDIR "/minidump-writer-unittest-temp-XXXXXX"; - mktemp(tempfile); - int fd = open(tempfile, O_RDWR | O_CREAT, 0); - ASSERT_NE(-1, fd); - unlink(tempfile); - // fill with zeros - char buffer[kMemorySize]; - memset(buffer, 0, kMemorySize); - ASSERT_EQ(kMemorySize, write(fd, buffer, kMemorySize)); - lseek(fd, 0, SEEK_SET); - - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE, - MAP_PRIVATE, - fd, - 0)); - const u_int64_t kMemoryAddress = reinterpret_cast(memory); - ASSERT_TRUE(memory); - close(fd); - - const pid_t child = fork(); - if (child == 0) { - close(fds[1]); - char b; - HANDLE_EINTR(read(fds[0], &b, sizeof(b))); - close(fds[0]); - syscall(__NR_exit); - } - close(fds[0]); - - ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - context.tid = 1; - - char dumpfile[] = TEMPDIR "/minidump-writer-unittest-XXXXXX"; - mktemp(dumpfile); - - // Add information about the mapped memory. Report it as being larger than - // it actually is. - MappingInfo info; - info.start_addr = kMemoryAddress - kMemorySize; - info.size = kMemorySize * 3; - info.offset = 0; - strcpy(info.name, kMemoryName); - - MappingList mappings; - MappingEntry mapping; - mapping.first = info; - memcpy(mapping.second, kModuleGUID, sizeof(MDGUID)); - mappings.push_back(mapping); - ASSERT_TRUE( - WriteMinidump(dumpfile, child, &context, sizeof(context), mappings)); - - // Read the minidump. Load the module list, and ensure that - // the mmap'ed |memory| is listed with the given module name - // and debug ID. - Minidump minidump(dumpfile); - ASSERT_TRUE(minidump.Read()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* module = - module_list->GetModuleForAddress(kMemoryAddress); - ASSERT_TRUE(module); - - EXPECT_EQ(info.start_addr, module->base_address()); - EXPECT_EQ(info.size, module->size()); - EXPECT_EQ(kMemoryName, module->code_file()); - EXPECT_EQ(module_identifier, module->debug_identifier()); - - unlink(dumpfile); - close(fds[1]); -} - -TEST(MinidumpWriterTest, DeletedBinary) { - static const int kNumberOfThreadsInHelperProgram = 1; - char kNumberOfThreadsArgument[2]; - sprintf(kNumberOfThreadsArgument, "%d", kNumberOfThreadsInHelperProgram); - - // Locate helper binary next to the current binary. - char self_path[PATH_MAX]; - if (readlink("/proc/self/exe", self_path, sizeof(self_path) - 1) == -1) { - FAIL() << "readlink failed: " << strerror(errno); - exit(1); - } - string helper_path(self_path); - size_t pos = helper_path.rfind('/'); - if (pos == string::npos) { - FAIL() << "no trailing slash in path: " << helper_path; - exit(1); - } - helper_path.erase(pos + 1); - helper_path += "linux_dumper_unittest_helper"; - - // Copy binary to a temp file. - char binpath[] = TEMPDIR "/linux-dumper-unittest-helper-XXXXXX"; - mktemp(binpath); - char cmdline[2 * PATH_MAX]; - sprintf(cmdline, "/bin/cp \"%s\" \"%s\"", helper_path.c_str(), binpath); - ASSERT_EQ(0, system(cmdline)); - ASSERT_EQ(0, chmod(binpath, 0755)); - - int fds[2]; - ASSERT_NE(-1, pipe(fds)); - - pid_t child_pid = fork(); - if (child_pid == 0) { - // In child process. - close(fds[0]); - - // Pass the pipe fd and the number of threads as arguments. - char pipe_fd_string[8]; - sprintf(pipe_fd_string, "%d", fds[1]); - execl(binpath, - binpath, - pipe_fd_string, - kNumberOfThreadsArgument, - NULL); - } - close(fds[1]); - // Wait for the child process to signal that it's ready. - struct pollfd pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = fds[0]; - pfd.events = POLLIN | POLLERR; - - const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); - ASSERT_EQ(1, r); - ASSERT_TRUE(pfd.revents & POLLIN); - uint8_t junk; - read(fds[0], &junk, sizeof(junk)); - close(fds[0]); - - // Child is ready now. - // Unlink the test binary. - unlink(binpath); - - ExceptionHandler::CrashContext context; - memset(&context, 0, sizeof(context)); - - char templ[] = TEMPDIR "/minidump-writer-unittest-XXXXXX"; - mktemp(templ); - // Set a non-zero tid to avoid tripping asserts. - context.tid = 1; - ASSERT_TRUE(WriteMinidump(templ, child_pid, &context, sizeof(context))); - kill(child_pid, SIGKILL); - - struct stat st; - ASSERT_EQ(stat(templ, &st), 0); - ASSERT_GT(st.st_size, 0u); - - - - Minidump minidump(templ); - ASSERT_TRUE(minidump.Read()); - - // Check that the main module filename is correct. - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* module = module_list->GetMainModule(); - EXPECT_STREQ(binpath, module->code_file().c_str()); - // Check that the file ID is correct. - FileID fileid(helper_path.c_str()); - uint8_t identifier[sizeof(MDGUID)]; - EXPECT_TRUE(fileid.ElfFileIdentifier(identifier)); - char identifier_string[kGUIDStringSize]; - FileID::ConvertIdentifierToString(identifier, - identifier_string, - kGUIDStringSize); - string module_identifier(identifier_string); - // Strip out dashes - while ((pos = module_identifier.find('-')) != string::npos) { - module_identifier.erase(pos, 1); - } - // And append a zero, because module IDs include an "age" field - // which is always zero on Linux. - module_identifier += "0"; - EXPECT_EQ(module_identifier, module->debug_identifier()); - - unlink(templ); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/sender/google_crash_report_sender.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/sender/google_crash_report_sender.cc deleted file mode 100644 index c1641b4f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/linux/sender/google_crash_report_sender.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/linux/google_crashdump_uploader.h" -#include "third_party/linux/include/gflags/gflags.h" -#include -#include - -using std::string; - -DEFINE_string(crash_server, "http://clients2.google.com/cr", - "The crash server to upload minidumps to."); -DEFINE_string(product_name, "", - "The product name that the minidump corresponds to."); -DEFINE_string(product_version, "", - "The version of the product that produced the minidump."); -DEFINE_string(client_id, "", - "The client GUID"); -DEFINE_string(minidump_path, "", - "The path of the minidump file."); -DEFINE_string(ptime, "", - "The process uptime in milliseconds."); -DEFINE_string(ctime, "", - "The cumulative process uptime in milliseconds."); -DEFINE_string(email, "", - "The user's email address."); -DEFINE_string(comments, "", - "Extra user comments"); -DEFINE_string(proxy_host, "", - "Proxy host"); -DEFINE_string(proxy_userpasswd, "", - "Proxy username/password in user:pass format."); - - -bool CheckForRequiredFlagsOrDie() { - std::string error_text = ""; - if (FLAGS_product_name.empty()) { - error_text.append("\nProduct name must be specified."); - } - - if (FLAGS_product_version.empty()) { - error_text.append("\nProduct version must be specified."); - } - - if (FLAGS_client_id.empty()) { - error_text.append("\nClient ID must be specified."); - } - - if (FLAGS_minidump_path.empty()) { - error_text.append("\nMinidump pathname must be specified."); - } - - if (!error_text.empty()) { - std::cout << error_text; - return false; - } - return true; -} - -int main(int argc, char *argv[]) { - google::InitGoogleLogging(argv[0]); - google::ParseCommandLineFlags(&argc, &argv, true); - if (!CheckForRequiredFlagsOrDie()) { - return 1; - } - google_breakpad::GoogleCrashdumpUploader g(FLAGS_product_name, - FLAGS_product_version, - FLAGS_client_id, - FLAGS_ptime, - FLAGS_ctime, - FLAGS_email, - FLAGS_comments, - FLAGS_minidump_path, - FLAGS_crash_server, - FLAGS_proxy_host, - FLAGS_proxy_userpasswd); - g.Upload(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.h deleted file mode 100644 index fa861431..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.h +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Framework to provide a simple C API to crash reporting for -// applications. By default, if any machine-level exception (e.g., -// EXC_BAD_ACCESS) occurs, it will be handled by the BreakpadRef -// object as follows: -// -// 1. Create a minidump file (see Breakpad for details) -// 2. Prompt the user (using CFUserNotification) -// 3. Invoke a command line reporting tool to send the minidump to a -// server -// -// By specifying parameters to the BreakpadCreate function, you can -// modify the default behavior to suit your needs and wants and -// desires. - -typedef void *BreakpadRef; - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -// Keys for configuration file -#define kReporterMinidumpDirectoryKey "MinidumpDir" -#define kReporterMinidumpIDKey "MinidumpID" - -// Filename for recording uploaded IDs -#define kReporterLogFilename "uploads.log" - -// The default subdirectory of the Library to put crash dumps in -// The subdirectory is -// ~/Library// -#define kDefaultLibrarySubdirectory "Breakpad" - -// Specify some special keys to be used in the configuration file that is -// generated by Breakpad and consumed by the crash_sender. -#define BREAKPAD_PRODUCT "BreakpadProduct" -#define BREAKPAD_PRODUCT_DISPLAY "BreakpadProductDisplay" -#define BREAKPAD_VERSION "BreakpadVersion" -#define BREAKPAD_VENDOR "BreakpadVendor" -#define BREAKPAD_URL "BreakpadURL" -#define BREAKPAD_REPORT_INTERVAL "BreakpadReportInterval" -#define BREAKPAD_SKIP_CONFIRM "BreakpadSkipConfirm" -#define BREAKPAD_CONFIRM_TIMEOUT "BreakpadConfirmTimeout" -#define BREAKPAD_SEND_AND_EXIT "BreakpadSendAndExit" -#define BREAKPAD_DUMP_DIRECTORY "BreakpadMinidumpLocation" -#define BREAKPAD_INSPECTOR_LOCATION "BreakpadInspectorLocation" -#define BREAKPAD_REPORTER_EXE_LOCATION \ - "BreakpadReporterExeLocation" -#define BREAKPAD_LOGFILES "BreakpadLogFiles" -#define BREAKPAD_LOGFILE_UPLOAD_SIZE "BreakpadLogFileTailSize" -#define BREAKPAD_REQUEST_COMMENTS "BreakpadRequestComments" -#define BREAKPAD_COMMENTS "BreakpadComments" -#define BREAKPAD_REQUEST_EMAIL "BreakpadRequestEmail" -#define BREAKPAD_EMAIL "BreakpadEmail" -#define BREAKPAD_SERVER_TYPE "BreakpadServerType" -#define BREAKPAD_SERVER_PARAMETER_DICT "BreakpadServerParameters" - -// The keys below are NOT user supplied, and are used internally. -#define BREAKPAD_PROCESS_START_TIME "BreakpadProcStartTime" -#define BREAKPAD_PROCESS_UP_TIME "BreakpadProcessUpTime" -#define BREAKPAD_PROCESS_CRASH_TIME "BreakpadProcessCrashTime" -#define BREAKPAD_LOGFILE_KEY_PREFIX "BreakpadAppLogFile" -#define BREAKPAD_SERVER_PARAMETER_PREFIX "BreakpadServerParameterPrefix_" -#define BREAKPAD_ON_DEMAND "BreakpadOnDemand" - -// Optional user-defined function to dec to decide if we should handle -// this crash or forward it along. -// Return true if you want Breakpad to handle it. -// Return false if you want Breakpad to skip it -// The exception handler always returns false, as if SEND_AND_EXIT were false -// (which means the next exception handler will take the exception) -typedef bool (*BreakpadFilterCallback)(int exception_type, - int exception_code, - mach_port_t crashing_thread, - void *context); - -// Create a new BreakpadRef object and install it as an exception -// handler. The |parameters| will typically be the contents of your -// bundle's Info.plist. -// -// You can also specify these additional keys for customizable behavior: -// Key: Value: -// BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct") -// This one is used as the key to identify -// the product when uploading. Falls back to -// CFBundleName if not specified. -// REQUIRED -// -// BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty -// name for the product when the crash_sender -// pops up UI for the user. Falls back first to -// CFBundleDisplayName and then to -// BREAKPAD_PRODUCT if not specified. -// -// BREAKPAD_VERSION Product version (e.g., 1.2.3), used -// as metadata for crash report. Falls back to -// CFBundleVersion if not specified. -// REQUIRED -// -// BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has -// been created that you can send to ") -// -// BREAKPAD_URL URL destination for reporting -// REQUIRED -// -// BREAKPAD_REPORT_INTERVAL # of seconds between sending -// reports. If an additional report is -// generated within this time, it will -// be ignored. Default: 3600sec. -// Specify 0 to send all reports. -// -// BREAKPAD_SKIP_CONFIRM If true, the reporter will send the report -// without any user intervention. -// Defaults to NO -// -// BREAKPAD_CONFIRM_TIMEOUT Number of seconds before the upload -// confirmation dialog will be automatically -// dismissed (cancelling the upload). -// Default: 300 seconds (min of 60). -// Specify 0 to prevent timeout. -// -// BREAKPAD_SEND_AND_EXIT If true, the handler will exit after sending. -// This will prevent any other handler (e.g., -// CrashReporter) from getting the crash. -// Defaults TO YES -// -// BREAKPAD_DUMP_DIRECTORY The directory to store crash-dumps -// in. By default, we use -// ~/Library/Breakpad/ -// The path you specify here is tilde-expanded. -// -// BREAKPAD_INSPECTOR_LOCATION The full path to the Inspector executable. -// Defaults to /Inspector -// -// BREAKPAD_REPORTER_EXE_LOCATION The full path to the Reporter/sender -// executable. -// Default: -// /crash_report_sender.app -// -// BREAKPAD_LOGFILES Indicates an array of log file paths that -// should be uploaded at crash time. -// -// BREAKPAD_REQUEST_COMMENTS If true, the message dialog will have a -// text box for the user to enter comments. -// Default: NO -// -// BREAKPAD_REQUEST_EMAIL If true and BREAKPAD_REQUEST_COMMENTS is also -// true, the message dialog will have a text -// box for the user to enter their email address. -// Default: NO -// -// BREAKPAD_SERVER_TYPE A parameter that tells Breakpad how to -// rewrite the upload parameters for a specific -// server type. The currently valid values are -// 'socorro' or 'google'. If you want to add -// other types, see the function in -// crash_report_sender.m that maps parameters to -// URL parameters. Defaults to 'google'. -// -// BREAKPAD_SERVER_PARAMETER_DICT A plist dictionary of static -// parameters that are uploaded to the -// server. The parameters are sent as -// is to the crash server. Their -// content isn't added to the minidump -// but pass as URL parameters when -// uploading theminidump to the crash -// server. -//============================================================================= -// The BREAKPAD_PRODUCT, BREAKPAD_VERSION and BREAKPAD_URL are -// required to have non-NULL values. By default, the BREAKPAD_PRODUCT -// will be the CFBundleName and the BREAKPAD_VERSION will be the -// CFBundleVersion when these keys are present in the bundle's -// Info.plist, which is usually passed in to BreakpadCreate() as an -// NSDictionary (you could also pass in another dictionary that had -// the same keys configured). If the BREAKPAD_PRODUCT or -// BREAKPAD_VERSION are ultimately undefined, BreakpadCreate() will -// fail. You have been warned. -// -// If you are running in a debugger, Breakpad will not install, unless the -// BREAKPAD_IGNORE_DEBUGGER envionment variable is set and/or non-zero. -// -// The BREAKPAD_SKIP_CONFIRM and BREAKPAD_SEND_AND_EXIT default -// values are NO and YES. However, they can be controlled by setting their -// values in a user or global plist. -// -// It's easiest to use Breakpad via the Framework, but if you're compiling the -// code in directly, BREAKPAD_INSPECTOR_LOCATION and -// BREAKPAD_REPORTER_EXE_LOCATION allow you to specify custom paths -// to the helper executables. -// -//============================================================================= -// The following are NOT user-supplied but are documented here for -// completeness. They are calculated by Breakpad during initialization & -// crash-dump generation, or entered in by the user. -// -// BREAKPAD_PROCESS_START_TIME The time the process started. -// -// BREAKPAD_PROCESS_CRASH_TIME The time the process crashed. -// -// BREAKPAD_PROCESS_UP_TIME The total time the process has been -// running. This parameter is not set -// until the crash-dump-generation phase. -// -// BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the -// parameter dictionary correspond to log -// file paths. -// -// BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad -// internally, because Breakpad uses -// the same dictionary internally to -// track both its internal -// configuration parameters and -// parameters meant to be uploaded -// to the server. This string is -// used internally by Breakpad to -// prefix user-supplied parameter -// names so those can be sent to the -// server without leaking Breakpad's -// internal values. -// -// BREAKPAD_ON_DEMAND Used internally to indicate to the -// Reporter that we're sending on-demand, -// not as result of a crash. -// -// BREAKPAD_COMMENTS The text the user provided as comments. -// Only used in crash_report_sender. - -// Returns a new BreakpadRef object on success, NULL otherwise. -BreakpadRef BreakpadCreate(NSDictionary *parameters); - -// Uninstall and release the data associated with |ref|. -void BreakpadRelease(BreakpadRef ref); - -// Clients may set an optional callback which gets called when a crash -// occurs. The callback function should return |true| if we should -// handle the crash, generate a crash report, etc. or |false| if we -// should ignore it and forward the crash (normally to CrashReporter). -// Context is a pointer to arbitrary data to make the callback with. -void BreakpadSetFilterCallback(BreakpadRef ref, - BreakpadFilterCallback callback, - void *context); - -// User defined key and value string storage. Generally this is used -// to configure Breakpad's internal operation, such as whether the -// crash_sender should prompt the user, or the filesystem location for -// the minidump file. See Breakpad.h for some parameters that can be -// set. Anything longer than 255 bytes will be truncated. Note that -// the string is converted to UTF8 before truncation, so any multibyte -// character that straddles the 255(256 - 1 for terminator) byte limit -// will be mangled. -// -// A maximum number of 64 key/value pairs are supported. An assert() -// will fire if more than this number are set. Unfortunately, right -// now, the same dictionary is used for both Breakpad's parameters AND -// the Upload parameters. -// -// TODO (nealsid): Investigate how necessary this is if we don't -// automatically upload parameters to the server anymore. -// TODO (nealsid): separate server parameter dictionary from the -// dictionary used to configure Breakpad, and document limits for each -// independently. -void BreakpadSetKeyValue(BreakpadRef ref, NSString *key, NSString *value); -NSString *BreakpadKeyValue(BreakpadRef ref, NSString *key); -void BreakpadRemoveKeyValue(BreakpadRef ref, NSString *key); - -// You can use this method to specify parameters that will be uploaded -// to the crash server. They will be automatically encoded as -// necessary. Note that as mentioned above there are limits on both -// the number of keys and their length. -void BreakpadAddUploadParameter(BreakpadRef ref, NSString *key, - NSString *value); - -// This method will remove a previously-added parameter from the -// upload parameter set. -void BreakpadRemoveUploadParameter(BreakpadRef ref, NSString *key); - -// Add a log file for Breakpad to read and send upon crash dump -void BreakpadAddLogFile(BreakpadRef ref, NSString *logPathname); - -// Generate a minidump and send -void BreakpadGenerateAndSendReport(BreakpadRef ref); - -#ifdef __cplusplus -} -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.mm deleted file mode 100644 index 12b5f283..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad.mm +++ /dev/null @@ -1,996 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#define VERBOSE 0 - -#if VERBOSE - static bool gDebugLog = true; -#else - static bool gDebugLog = false; -#endif - -#define DEBUGLOG if (gDebugLog) fprintf -#define IGNORE_DEBUGGER "BREAKPAD_IGNORE_DEBUGGER" - -#import "common/mac/MachIPC.h" -#import "common/mac/SimpleStringDictionary.h" - -#import "client/mac/crash_generation/Inspector.h" -#import "client/mac/handler/exception_handler.h" -#import "client/mac/Framework/Breakpad.h" -#import "client/mac/Framework/OnDemandServer.h" -#import "client/mac/handler/protected_memory_allocator.h" - -#import -#import - -#import - - -using google_breakpad::KeyValueEntry; -using google_breakpad::MachPortSender; -using google_breakpad::MachReceiveMessage; -using google_breakpad::MachSendMessage; -using google_breakpad::ReceivePort; -using google_breakpad::SimpleStringDictionary; -using google_breakpad::SimpleStringDictionaryIterator; - -//============================================================================= -// We want any memory allocations which are used by breakpad during the -// exception handling process (after a crash has happened) to be read-only -// to prevent them from being smashed before a crash occurs. Unfortunately -// we cannot protect against smashes to our exception handling thread's -// stack. -// -// NOTE: Any memory allocations which are not used during the exception -// handling process may be allocated in the normal ways. -// -// The ProtectedMemoryAllocator class provides an Allocate() method which -// we'll using in conjunction with placement operator new() to control -// allocation of C++ objects. Note that we don't use operator delete() -// but instead call the objects destructor directly: object->~ClassName(); -// -ProtectedMemoryAllocator *gMasterAllocator = NULL; -ProtectedMemoryAllocator *gKeyValueAllocator = NULL; -ProtectedMemoryAllocator *gBreakpadAllocator = NULL; - -// Mutex for thread-safe access to the key/value dictionary used by breakpad. -// It's a global instead of an instance variable of Breakpad -// since it can't live in a protected memory area. -pthread_mutex_t gDictionaryMutex; - -//============================================================================= -// Stack-based object for thread-safe access to a memory-protected region. -// It's assumed that normally the memory block (allocated by the allocator) -// is protected (read-only). Creating a stack-based instance of -// ProtectedMemoryLocker will unprotect this block after taking the lock. -// Its destructor will first re-protect the memory then release the lock. -class ProtectedMemoryLocker { -public: - // allocator may be NULL, in which case no Protect() or Unprotect() calls - // will be made, but a lock will still be taken - ProtectedMemoryLocker(pthread_mutex_t *mutex, - ProtectedMemoryAllocator *allocator) - : mutex_(mutex), allocator_(allocator) { - // Lock the mutex - assert(pthread_mutex_lock(mutex_) == 0); - - // Unprotect the memory - if (allocator_ ) { - allocator_->Unprotect(); - } - } - - ~ProtectedMemoryLocker() { - // First protect the memory - if (allocator_) { - allocator_->Protect(); - } - - // Then unlock the mutex - assert(pthread_mutex_unlock(mutex_) == 0); - }; - -private: - // Keep anybody from ever creating one of these things not on the stack. - ProtectedMemoryLocker() { } - ProtectedMemoryLocker(const ProtectedMemoryLocker&); - ProtectedMemoryLocker & operator=(ProtectedMemoryLocker&); - - pthread_mutex_t *mutex_; - ProtectedMemoryAllocator *allocator_; -}; - -//============================================================================= -class Breakpad { - public: - // factory method - static Breakpad *Create(NSDictionary *parameters) { - // Allocate from our special allocation pool - Breakpad *breakpad = - new (gBreakpadAllocator->Allocate(sizeof(Breakpad))) - Breakpad(); - - if (!breakpad) - return NULL; - - if (!breakpad->Initialize(parameters)) { - // Don't use operator delete() here since we allocated from special pool - breakpad->~Breakpad(); - return NULL; - } - - return breakpad; - } - - ~Breakpad(); - - void SetKeyValue(NSString *key, NSString *value); - NSString *KeyValue(NSString *key); - void RemoveKeyValue(NSString *key); - - void GenerateAndSendReport(); - - void SetFilterCallback(BreakpadFilterCallback callback, void *context) { - filter_callback_ = callback; - filter_callback_context_ = context; - } - - private: - Breakpad() - : handler_(NULL), - config_params_(NULL), - send_and_exit_(true), - filter_callback_(NULL), - filter_callback_context_(NULL) { - inspector_path_[0] = 0; - } - - bool Initialize(NSDictionary *parameters); - - bool ExtractParameters(NSDictionary *parameters); - - // Dispatches to HandleException() - static bool ExceptionHandlerDirectCallback(void *context, - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread); - - bool HandleException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread); - - // Since ExceptionHandler (w/o namespace) is defined as typedef in OSX's - // MachineExceptions.h, we have to explicitly name the handler. - google_breakpad::ExceptionHandler *handler_; // The actual handler (STRONG) - - char inspector_path_[PATH_MAX]; // Path to inspector tool - - SimpleStringDictionary *config_params_; // Create parameters (STRONG) - - OnDemandServer inspector_; - - bool send_and_exit_; // Exit after sending, if true - - BreakpadFilterCallback filter_callback_; - void *filter_callback_context_; -}; - -#pragma mark - -#pragma mark Helper functions - -//============================================================================= -// Helper functions - -//============================================================================= -static BOOL IsDebuggerActive() { - BOOL result = NO; - NSUserDefaults *stdDefaults = [NSUserDefaults standardUserDefaults]; - - // We check both defaults and the environment variable here - - BOOL ignoreDebugger = [stdDefaults boolForKey:@IGNORE_DEBUGGER]; - - if (!ignoreDebugger) { - char *ignoreDebuggerStr = getenv(IGNORE_DEBUGGER); - ignoreDebugger = (ignoreDebuggerStr ? strtol(ignoreDebuggerStr, NULL, 10) : 0) != 0; - } - - if (!ignoreDebugger) { - pid_t pid = getpid(); - int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; - int mibSize = sizeof(mib) / sizeof(int); - size_t actualSize; - - if (sysctl(mib, mibSize, NULL, &actualSize, NULL, 0) == 0) { - struct kinfo_proc *info = (struct kinfo_proc *)malloc(actualSize); - - if (info) { - // This comes from looking at the Darwin xnu Kernel - if (sysctl(mib, mibSize, info, &actualSize, NULL, 0) == 0) - result = (info->kp_proc.p_flag & P_TRACED) ? YES : NO; - - free(info); - } - } - } - - return result; -} - -//============================================================================= -bool Breakpad::ExceptionHandlerDirectCallback(void *context, - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread) { - Breakpad *breakpad = (Breakpad *)context; - - // If our context is damaged or something, just return false to indicate that - // the handler should continue without us. - if (!breakpad) - return false; - - return breakpad->HandleException( exception_type, - exception_code, - exception_subcode, - crashing_thread); -} - -//============================================================================= -#pragma mark - - -#include - -//============================================================================= -// Returns the pathname to the Resources directory for this version of -// Breakpad which we are now running. -// -// Don't make the function static, since _dyld_lookup_and_bind_fully needs a -// simple non-static C name -// -extern "C" { -NSString * GetResourcePath(); -NSString * GetResourcePath() { - NSString *resourcePath = nil; - - // If there are multiple breakpads installed then calling bundleWithIdentifier - // will not work properly, so only use that as a backup plan. - // We want to find the bundle containing the code where this function lives - // and work from there - // - - // Get the pathname to the code which contains this function - Dl_info info; - if (dladdr((const void*)GetResourcePath, &info) != 0) { - NSFileManager *filemgr = [NSFileManager defaultManager]; - NSString *filePath = - [filemgr stringWithFileSystemRepresentation:info.dli_fname - length:strlen(info.dli_fname)]; - NSString *bundlePath = [filePath stringByDeletingLastPathComponent]; - // The "Resources" directory should be in the same directory as the - // executable code, since that's how the Breakpad framework is built. - resourcePath = [bundlePath stringByAppendingPathComponent:@"Resources/"]; - } else { - DEBUGLOG(stderr, "Could not find GetResourcePath\n"); - // fallback plan - NSBundle *bundle = - [NSBundle bundleWithIdentifier:@"com.Google.BreakpadFramework"]; - resourcePath = [bundle resourcePath]; - } - - return resourcePath; -} -} // extern "C" - -//============================================================================= -bool Breakpad::Initialize(NSDictionary *parameters) { - // Initialize - config_params_ = NULL; - handler_ = NULL; - - // Check for debugger - if (IsDebuggerActive()) { - DEBUGLOG(stderr, "Debugger is active: Not installing handler\n"); - return true; - } - - // Gather any user specified parameters - if (!ExtractParameters(parameters)) { - return false; - } - - // Get path to Inspector executable. - NSString *inspectorPathString = KeyValue(@BREAKPAD_INSPECTOR_LOCATION); - - // Standardize path (resolve symlinkes, etc.) and escape spaces - inspectorPathString = [inspectorPathString stringByStandardizingPath]; - inspectorPathString = [[inspectorPathString componentsSeparatedByString:@" "] - componentsJoinedByString:@"\\ "]; - - // Create an on-demand server object representing the Inspector. - // In case of a crash, we simply need to call the LaunchOnDemand() - // method on it, then send a mach message to its service port. - // It will then launch and perform a process inspection of our crashed state. - // See the HandleException() method for the details. -#define RECEIVE_PORT_NAME "com.Breakpad.Inspector" - - name_t portName; - snprintf(portName, sizeof(name_t), "%s%d", RECEIVE_PORT_NAME, getpid()); - - // Save the location of the Inspector - strlcpy(inspector_path_, [inspectorPathString fileSystemRepresentation], - sizeof(inspector_path_)); - - // Append a single command-line argument to the Inspector path - // representing the bootstrap name of the launch-on-demand receive port. - // When the Inspector is launched, it can use this to lookup the port - // by calling bootstrap_check_in(). - strlcat(inspector_path_, " ", sizeof(inspector_path_)); - strlcat(inspector_path_, portName, sizeof(inspector_path_)); - - kern_return_t kr = inspector_.Initialize(inspector_path_, - portName, - true); // shutdown on exit - - if (kr != KERN_SUCCESS) { - return false; - } - - // Create the handler (allocating it in our special protected pool) - handler_ = - new (gBreakpadAllocator->Allocate( - sizeof(google_breakpad::ExceptionHandler))) - google_breakpad::ExceptionHandler( - Breakpad::ExceptionHandlerDirectCallback, this, true); - return true; -} - -//============================================================================= -Breakpad::~Breakpad() { - // Note that we don't use operator delete() on these pointers, - // since they were allocated by ProtectedMemoryAllocator objects. - // - if (config_params_) { - config_params_->~SimpleStringDictionary(); - } - - if (handler_) - handler_->~ExceptionHandler(); -} - -//============================================================================= -bool Breakpad::ExtractParameters(NSDictionary *parameters) { - NSUserDefaults *stdDefaults = [NSUserDefaults standardUserDefaults]; - NSString *skipConfirm = [stdDefaults stringForKey:@BREAKPAD_SKIP_CONFIRM]; - NSString *sendAndExit = [stdDefaults stringForKey:@BREAKPAD_SEND_AND_EXIT]; - - NSString *serverType = [parameters objectForKey:@BREAKPAD_SERVER_TYPE]; - NSString *display = [parameters objectForKey:@BREAKPAD_PRODUCT_DISPLAY]; - NSString *product = [parameters objectForKey:@BREAKPAD_PRODUCT]; - NSString *version = [parameters objectForKey:@BREAKPAD_VERSION]; - NSString *urlStr = [parameters objectForKey:@BREAKPAD_URL]; - NSString *interval = [parameters objectForKey:@BREAKPAD_REPORT_INTERVAL]; - NSString *inspectorPathString = - [parameters objectForKey:@BREAKPAD_INSPECTOR_LOCATION]; - NSString *reporterPathString = - [parameters objectForKey:@BREAKPAD_REPORTER_EXE_LOCATION]; - NSString *timeout = [parameters objectForKey:@BREAKPAD_CONFIRM_TIMEOUT]; - NSArray *logFilePaths = [parameters objectForKey:@BREAKPAD_LOGFILES]; - NSString *logFileTailSize = - [parameters objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE]; - NSString *requestUserText = - [parameters objectForKey:@BREAKPAD_REQUEST_COMMENTS]; - NSString *requestEmail = [parameters objectForKey:@BREAKPAD_REQUEST_EMAIL]; - NSString *vendor = - [parameters objectForKey:@BREAKPAD_VENDOR]; - NSString *dumpSubdirectory = - [parameters objectForKey:@BREAKPAD_DUMP_DIRECTORY]; - - NSDictionary *serverParameters = - [parameters objectForKey:@BREAKPAD_SERVER_PARAMETER_DICT]; - - // These may have been set above as user prefs, which take priority. - if (!skipConfirm) { - skipConfirm = [parameters objectForKey:@BREAKPAD_SKIP_CONFIRM]; - } - if (!sendAndExit) { - sendAndExit = [parameters objectForKey:@BREAKPAD_SEND_AND_EXIT]; - } - - if (!product) - product = [parameters objectForKey:@"CFBundleName"]; - - if (!display) { - display = [parameters objectForKey:@"CFBundleDisplayName"]; - if (!display) { - display = product; - } - } - - if (!version) - version = [parameters objectForKey:@"CFBundleVersion"]; - - if (!interval) - interval = @"3600"; - - if (!timeout) - timeout = @"300"; - - if (!logFileTailSize) - logFileTailSize = @"200000"; - - if (!vendor) { - vendor = @"Vendor not specified"; - } - - // Normalize the values. - if (skipConfirm) { - skipConfirm = [skipConfirm uppercaseString]; - - if ([skipConfirm isEqualToString:@"YES"] || - [skipConfirm isEqualToString:@"TRUE"] || - [skipConfirm isEqualToString:@"1"]) - skipConfirm = @"YES"; - else - skipConfirm = @"NO"; - } else { - skipConfirm = @"NO"; - } - - send_and_exit_ = true; - if (sendAndExit) { - sendAndExit = [sendAndExit uppercaseString]; - - if ([sendAndExit isEqualToString:@"NO"] || - [sendAndExit isEqualToString:@"FALSE"] || - [sendAndExit isEqualToString:@"0"]) - send_and_exit_ = false; - } - - if (requestUserText) { - requestUserText = [requestUserText uppercaseString]; - - if ([requestUserText isEqualToString:@"YES"] || - [requestUserText isEqualToString:@"TRUE"] || - [requestUserText isEqualToString:@"1"]) - requestUserText = @"YES"; - else - requestUserText = @"NO"; - } else { - requestUserText = @"NO"; - } - - // Find the helper applications if not specified in user config. - NSString *resourcePath = nil; - if (!inspectorPathString || !reporterPathString) { - resourcePath = GetResourcePath(); - if (!resourcePath) { - DEBUGLOG(stderr, "Could not get resource path\n"); - return false; - } - } - - // Find Inspector. - if (!inspectorPathString) { - inspectorPathString = - [resourcePath stringByAppendingPathComponent:@"Inspector"]; - } - - // Verify that there is an Inspector tool. - if (![[NSFileManager defaultManager] fileExistsAtPath:inspectorPathString]) { - DEBUGLOG(stderr, "Cannot find Inspector tool\n"); - return false; - } - - // Find Reporter. - if (!reporterPathString) { - reporterPathString = - [resourcePath - stringByAppendingPathComponent:@"crash_report_sender.app"]; - reporterPathString = - [[NSBundle bundleWithPath:reporterPathString] executablePath]; - } - - // Verify that there is a Reporter application. - if (![[NSFileManager defaultManager] - fileExistsAtPath:reporterPathString]) { - DEBUGLOG(stderr, "Cannot find Reporter tool\n"); - return false; - } - - if (!dumpSubdirectory) { - dumpSubdirectory = @""; - } - - // The product, version, and URL are required values. - if (![product length]) { - DEBUGLOG(stderr, "Missing required product key.\n"); - return false; - } - - if (![version length]) { - DEBUGLOG(stderr, "Missing required version key.\n"); - return false; - } - - if (![urlStr length]) { - DEBUGLOG(stderr, "Missing required URL key.\n"); - return false; - } - - config_params_ = - new (gKeyValueAllocator->Allocate(sizeof(SimpleStringDictionary)) ) - SimpleStringDictionary(); - - SimpleStringDictionary &dictionary = *config_params_; - - dictionary.SetKeyValue(BREAKPAD_SERVER_TYPE, [serverType UTF8String]); - dictionary.SetKeyValue(BREAKPAD_PRODUCT_DISPLAY, [display UTF8String]); - dictionary.SetKeyValue(BREAKPAD_PRODUCT, [product UTF8String]); - dictionary.SetKeyValue(BREAKPAD_VERSION, [version UTF8String]); - dictionary.SetKeyValue(BREAKPAD_URL, [urlStr UTF8String]); - dictionary.SetKeyValue(BREAKPAD_REPORT_INTERVAL, [interval UTF8String]); - dictionary.SetKeyValue(BREAKPAD_SKIP_CONFIRM, [skipConfirm UTF8String]); - dictionary.SetKeyValue(BREAKPAD_CONFIRM_TIMEOUT, [timeout UTF8String]); - dictionary.SetKeyValue(BREAKPAD_INSPECTOR_LOCATION, - [inspectorPathString fileSystemRepresentation]); - dictionary.SetKeyValue(BREAKPAD_REPORTER_EXE_LOCATION, - [reporterPathString fileSystemRepresentation]); - dictionary.SetKeyValue(BREAKPAD_LOGFILE_UPLOAD_SIZE, - [logFileTailSize UTF8String]); - dictionary.SetKeyValue(BREAKPAD_REQUEST_COMMENTS, - [requestUserText UTF8String]); - dictionary.SetKeyValue(BREAKPAD_REQUEST_EMAIL, [requestEmail UTF8String]); - dictionary.SetKeyValue(BREAKPAD_VENDOR, [vendor UTF8String]); - dictionary.SetKeyValue(BREAKPAD_DUMP_DIRECTORY, - [dumpSubdirectory UTF8String]); - - struct timeval tv; - gettimeofday(&tv, NULL); - char timeStartedString[32]; - sprintf(timeStartedString, "%zd", tv.tv_sec); - dictionary.SetKeyValue(BREAKPAD_PROCESS_START_TIME, - timeStartedString); - - if (logFilePaths) { - char logFileKey[255]; - for(unsigned int i = 0; i < [logFilePaths count]; i++) { - sprintf(logFileKey,"%s%d", BREAKPAD_LOGFILE_KEY_PREFIX, i); - dictionary.SetKeyValue(logFileKey, - [[logFilePaths objectAtIndex:i] - fileSystemRepresentation]); - } - } - - if (serverParameters) { - // For each key-value pair, call BreakpadAddUploadParameter() - NSEnumerator *keyEnumerator = [serverParameters keyEnumerator]; - NSString *aParameter; - while ((aParameter = [keyEnumerator nextObject])) { - BreakpadAddUploadParameter(this, aParameter, - [serverParameters objectForKey:aParameter]); - } - } - return true; -} - -//============================================================================= -void Breakpad::SetKeyValue(NSString *key, NSString *value) { - // We allow nil values. This is the same as removing the keyvalue. - if (!config_params_ || !key) - return; - - config_params_->SetKeyValue([key UTF8String], [value UTF8String]); -} - -//============================================================================= -NSString *Breakpad::KeyValue(NSString *key) { - if (!config_params_ || !key) - return nil; - - const char *value = config_params_->GetValueForKey([key UTF8String]); - return value ? [NSString stringWithUTF8String:value] : nil; -} - -//============================================================================= -void Breakpad::RemoveKeyValue(NSString *key) { - if (!config_params_ || !key) return; - - config_params_->RemoveKey([key UTF8String]); -} - -//============================================================================= -void Breakpad::GenerateAndSendReport() { - config_params_->SetKeyValue(BREAKPAD_ON_DEMAND, "YES"); - HandleException(0, 0, 0, mach_thread_self()); - config_params_->SetKeyValue(BREAKPAD_ON_DEMAND, "NO"); -} - -//============================================================================= -bool Breakpad::HandleException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread) { - DEBUGLOG(stderr, "Breakpad: an exception occurred\n"); - - if (filter_callback_) { - bool should_handle = filter_callback_(exception_type, - exception_code, - crashing_thread, - filter_callback_context_); - if (!should_handle) return false; - } - - // We need to reset the memory protections to be read/write, - // since LaunchOnDemand() requires changing state. - gBreakpadAllocator->Unprotect(); - // Configure the server to launch when we message the service port. - // The reason we do this here, rather than at startup, is that we - // can leak a bootstrap service entry if this method is called and - // there never ends up being a crash. - inspector_.LaunchOnDemand(); - gBreakpadAllocator->Protect(); - - // The Inspector should send a message to this port to verify it - // received our information and has finished the inspection. - ReceivePort acknowledge_port; - - // Send initial information to the Inspector. - MachSendMessage message(kMsgType_InspectorInitialInfo); - message.AddDescriptor(mach_task_self()); // our task - message.AddDescriptor(crashing_thread); // crashing thread - message.AddDescriptor(mach_thread_self()); // exception-handling thread - message.AddDescriptor(acknowledge_port.GetPort());// message receive port - - InspectorInfo info; - info.exception_type = exception_type; - info.exception_code = exception_code; - info.exception_subcode = exception_subcode; - info.parameter_count = config_params_->GetCount(); - message.SetData(&info, sizeof(info)); - - MachPortSender sender(inspector_.GetServicePort()); - - kern_return_t result = sender.SendMessage(message, 2000); - - if (result == KERN_SUCCESS) { - // Now, send a series of key-value pairs to the Inspector. - const KeyValueEntry *entry = NULL; - SimpleStringDictionaryIterator iter(*config_params_); - - while ( (entry = iter.Next()) ) { - KeyValueMessageData keyvalue_data(*entry); - - MachSendMessage keyvalue_message(kMsgType_InspectorKeyValuePair); - keyvalue_message.SetData(&keyvalue_data, sizeof(keyvalue_data)); - - result = sender.SendMessage(keyvalue_message, 2000); - - if (result != KERN_SUCCESS) { - break; - } - } - - if (result == KERN_SUCCESS) { - // Wait for acknowledgement that the inspection has finished. - MachReceiveMessage acknowledge_messsage; - result = acknowledge_port.WaitForMessage(&acknowledge_messsage, 5000); - } - } - -#if VERBOSE - PRINT_MACH_RESULT(result, "Breakpad: SendMessage "); - printf("Breakpad: Inspector service port = %#x\n", - inspector_.GetServicePort()); -#endif - - // If we don't want any forwarding, return true here to indicate that we've - // processed things as much as we want. - if (send_and_exit_) return true; - - return false; -} - -//============================================================================= -//============================================================================= - -#pragma mark - -#pragma mark Public API - -//============================================================================= -BreakpadRef BreakpadCreate(NSDictionary *parameters) { - try { - // This is confusing. Our two main allocators for breakpad memory are: - // - gKeyValueAllocator for the key/value memory - // - gBreakpadAllocator for the Breakpad, ExceptionHandler, and other - // breakpad allocations which are accessed at exception handling time. - // - // But in order to avoid these two allocators themselves from being smashed, - // we'll protect them as well by allocating them with gMasterAllocator. - // - // gMasterAllocator itself will NOT be protected, but this doesn't matter, - // since once it does its allocations and locks the memory, smashes to itself - // don't affect anything we care about. - gMasterAllocator = - new ProtectedMemoryAllocator(sizeof(ProtectedMemoryAllocator) * 2); - - gKeyValueAllocator = - new (gMasterAllocator->Allocate(sizeof(ProtectedMemoryAllocator))) - ProtectedMemoryAllocator(sizeof(SimpleStringDictionary)); - - // Create a mutex for use in accessing the SimpleStringDictionary - int mutexResult = pthread_mutex_init(&gDictionaryMutex, NULL); - if (mutexResult == 0) { - - // With the current compiler, gBreakpadAllocator is allocating 1444 bytes. - // Let's round up to the nearest page size. - // - int breakpad_pool_size = 4096; - - /* - sizeof(Breakpad) - + sizeof(google_breakpad::ExceptionHandler) - + sizeof( STUFF ALLOCATED INSIDE ExceptionHandler ) - */ - - gBreakpadAllocator = - new (gMasterAllocator->Allocate(sizeof(ProtectedMemoryAllocator))) - ProtectedMemoryAllocator(breakpad_pool_size); - - // Stack-based autorelease pool for Breakpad::Create() obj-c code. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Breakpad *breakpad = Breakpad::Create(parameters); - - if (breakpad) { - // Make read-only to protect against memory smashers - gMasterAllocator->Protect(); - gKeyValueAllocator->Protect(); - gBreakpadAllocator->Protect(); - // Can uncomment this line to figure out how much space was actually - // allocated using this allocator - // printf("gBreakpadAllocator allocated size = %d\n", - // gBreakpadAllocator->GetAllocatedSize() ); - [pool release]; - return (BreakpadRef)breakpad; - } - - [pool release]; - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadCreate() : error\n"); - } - - if (gKeyValueAllocator) { - gKeyValueAllocator->~ProtectedMemoryAllocator(); - gKeyValueAllocator = NULL; - } - - if (gBreakpadAllocator) { - gBreakpadAllocator->~ProtectedMemoryAllocator(); - gBreakpadAllocator = NULL; - } - - delete gMasterAllocator; - gMasterAllocator = NULL; - - return NULL; -} - -//============================================================================= -void BreakpadRelease(BreakpadRef ref) { - try { - Breakpad *breakpad = (Breakpad *)ref; - - if (gMasterAllocator) { - gMasterAllocator->Unprotect(); - gKeyValueAllocator->Unprotect(); - gBreakpadAllocator->Unprotect(); - - breakpad->~Breakpad(); - - // Unfortunately, it's not possible to deallocate this stuff - // because the exception handling thread is still finishing up - // asynchronously at this point... OK, it could be done with - // locks, etc. But since BreakpadRelease() should usually only - // be called right before the process exits, it's not worth - // deallocating this stuff. -#if 0 - gKeyValueAllocator->~ProtectedMemoryAllocator(); - gBreakpadAllocator->~ProtectedMemoryAllocator(); - delete gMasterAllocator; - - gMasterAllocator = NULL; - gKeyValueAllocator = NULL; - gBreakpadAllocator = NULL; -#endif - - pthread_mutex_destroy(&gDictionaryMutex); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadRelease() : error\n"); - } -} - -//============================================================================= -void BreakpadSetKeyValue(BreakpadRef ref, NSString *key, NSString *value) { - try { - // Not called at exception time - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && key && gKeyValueAllocator) { - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - breakpad->SetKeyValue(key, value); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadSetKeyValue() : error\n"); - } -} - -void BreakpadAddUploadParameter(BreakpadRef ref, - NSString *key, - NSString *value) { - // The only difference, internally, between an upload parameter and - // a key value one that is set with BreakpadSetKeyValue is that we - // prepend the keyname with a special prefix. This informs the - // crash sender that the parameter should be sent along with the - // POST of the crash dump upload. - try { - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && key && gKeyValueAllocator) { - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - NSString *prefixedKey = [@BREAKPAD_SERVER_PARAMETER_PREFIX - stringByAppendingString:key]; - breakpad->SetKeyValue(prefixedKey, value); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadSetKeyValue() : error\n"); - } -} - -void BreakpadRemoveUploadParameter(BreakpadRef ref, - NSString *key) { - try { - // Not called at exception time - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && key && gKeyValueAllocator) { - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - NSString *prefixedKey = [NSString stringWithFormat:@"%@%@", - @BREAKPAD_SERVER_PARAMETER_PREFIX, key]; - breakpad->RemoveKeyValue(prefixedKey); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadRemoveKeyValue() : error\n"); - } -} -//============================================================================= -NSString *BreakpadKeyValue(BreakpadRef ref, NSString *key) { - NSString *value = nil; - - try { - // Not called at exception time - Breakpad *breakpad = (Breakpad *)ref; - - if (!breakpad || !key || !gKeyValueAllocator) - return nil; - - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - value = breakpad->KeyValue(key); - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadKeyValue() : error\n"); - } - - return value; -} - -//============================================================================= -void BreakpadRemoveKeyValue(BreakpadRef ref, NSString *key) { - try { - // Not called at exception time - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && key && gKeyValueAllocator) { - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - breakpad->RemoveKeyValue(key); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadRemoveKeyValue() : error\n"); - } -} - -//============================================================================= -void BreakpadGenerateAndSendReport(BreakpadRef ref) { - try { - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && gKeyValueAllocator) { - ProtectedMemoryLocker locker(&gDictionaryMutex, gKeyValueAllocator); - - gBreakpadAllocator->Unprotect(); - breakpad->GenerateAndSendReport(); - gBreakpadAllocator->Protect(); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadGenerateAndSendReport() : error\n"); - } -} - -//============================================================================= -void BreakpadSetFilterCallback(BreakpadRef ref, - BreakpadFilterCallback callback, - void *context) { - - try { - Breakpad *breakpad = (Breakpad *)ref; - - if (breakpad && gBreakpadAllocator) { - // share the dictionary mutex here (we really don't need a mutex) - ProtectedMemoryLocker locker(&gDictionaryMutex, gBreakpadAllocator); - - breakpad->SetFilterCallback(callback, context); - } - } catch(...) { // don't let exceptions leave this C API - fprintf(stderr, "BreakpadSetFilterCallback() : error\n"); - } -} - -//============================================================================ -void BreakpadAddLogFile(BreakpadRef ref, NSString *logPathname) { - int logFileCounter = 0; - - NSString *logFileKey = [NSString stringWithFormat:@"%@%d", - @BREAKPAD_LOGFILE_KEY_PREFIX, - logFileCounter]; - - NSString *existingLogFilename = nil; - existingLogFilename = BreakpadKeyValue(ref, logFileKey); - // Find the first log file key that we can use by testing for existence - while (existingLogFilename) { - if ([existingLogFilename isEqualToString:logPathname]) { - return; - } - logFileCounter++; - logFileKey = [NSString stringWithFormat:@"%@%d", - @BREAKPAD_LOGFILE_KEY_PREFIX, - logFileCounter]; - existingLogFilename = BreakpadKeyValue(ref, logFileKey); - } - - BreakpadSetKeyValue(ref, logFileKey, logPathname); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad_Prefix.pch b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad_Prefix.pch deleted file mode 100644 index 72986663..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Breakpad_Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'Breakpad' target in the -// 'Breakpad' project. -// - -#ifdef __OBJC__ - #import -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Info.plist deleted file mode 100644 index e43baddc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.googlecode.google-breakpad - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSPrincipalClass - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.h deleted file mode 100644 index 9d8bc961..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.h +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import -#import -#import -#import -#import -#import -#import - -//============================================================================== -// class OnDemandServer : -// A basic on-demand server launcher supporting a single named service port -// -// Example Usage : -// -// kern_return_t result; -// OnDemandServer *server = OnDemandServer::Create("/tmp/myserver", -// "com.MyCompany.MyServiceName", -// true, -// &result); -// -// if (server) { -// server->LaunchOnDemand(); -// mach_port_t service_port = GetServicePort(); -// -// // Send a mach message to service_port and "myserver" will be launched -// } -// -// -// ---- Now in the server code ---- -// -// // "myserver" should get the service port and read the message which -// // launched it: -// mach_port_t service_rcv_port_; -// kern_return_t kr = bootstrap_check_in(bootstrap_port, -// "com.MyCompany.MyServiceName", -// &service_rcv_port_); -// // mach_msg() read service_rcv_port_ .... -// -// .... -// -// // Later "myserver" may want to unregister the service if it doesn't -// // want its bootstrap service to stick around after it exits. -// -// // DO NOT use mach_port_deallocate() here -- it will fail and the -// // following bootstrap_register() will also fail leaving our service -// // name hanging around forever (until reboot) -// kern_return_t kr = mach_port_destroy(mach_task_self(), service_rcv_port_); -// -// kr = bootstrap_register(bootstrap_port, -// "com.MyCompany.MyServiceName", -// MACH_PORT_NULL); - -class OnDemandServer { - public: - // must call Initialize() to be useful - OnDemandServer() - : server_port_(MACH_PORT_NULL), - service_port_(MACH_PORT_NULL), - unregister_on_cleanup_(true) { - } - - // Creates the bootstrap server and service - kern_return_t Initialize(const char *server_command, - const char *service_name, - bool unregister_on_cleanup); - - // Returns an OnDemandServer object if successful, or NULL if there's - // an error. The error result will be returned in out_result. - // - // server_command : the full path name including optional command-line - // arguments to the executable representing the server - // - // service_name : represents service name - // something like "com.company.ServiceName" - // - // unregister_on_cleanup : if true, unregisters the service name - // when the OnDemandServer is deleted -- unregistering will - // ONLY be possible if LaunchOnDemand() has NOT been called. - // If false, then the service will continue to be registered - // even after the current process quits. - // - // out_result : if non-NULL, returns the result - // this value will be KERN_SUCCESS if Create() returns non-NULL - // - static OnDemandServer *Create(const char *server_command, - const char *service_name, - bool unregister_on_cleanup, - kern_return_t *out_result); - - // Cleans up and if LaunchOnDemand() has not yet been called then - // the bootstrap service will be unregistered. - ~OnDemandServer(); - - // This must be called if we intend to commit to launching the server - // by sending a mach message to our service port. Do not call it otherwise - // or it will be difficult (impossible?) to unregister the service name. - void LaunchOnDemand(); - - // This is the port we need to send a mach message to after calling - // LaunchOnDemand(). Sending a message causing an immediate launch - // of the server - mach_port_t GetServicePort() { return service_port_; }; - - private: - // Disallow copy constructor - OnDemandServer(const OnDemandServer&); - - // Cleans up and if LaunchOnDemand() has not yet been called then - // the bootstrap service will be unregistered. - void Unregister(); - - name_t service_name_; - - mach_port_t server_port_; - mach_port_t service_port_; - bool unregister_on_cleanup_; -}; diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.mm deleted file mode 100644 index 38685460..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/Framework/OnDemandServer.mm +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "OnDemandServer.h" - -#if DEBUG - #define PRINT_MACH_RESULT(result_, message_) \ - printf(message_"%s (%d)\n", mach_error_string(result_), result_ ); -#else - #define PRINT_MACH_RESULT(result_, message_) -#endif - -//============================================================================== -OnDemandServer *OnDemandServer::Create(const char *server_command, - const char *service_name, - bool unregister_on_cleanup, - kern_return_t *out_result) { - OnDemandServer *server = new OnDemandServer(); - - if (!server) return NULL; - - kern_return_t result = server->Initialize(server_command, - service_name, - unregister_on_cleanup); - - if (out_result) { - *out_result = result; - } - - if (result == KERN_SUCCESS) { - return server; - } - - delete server; - return NULL; -}; - -//============================================================================== -kern_return_t OnDemandServer::Initialize(const char *server_command, - const char *service_name, - bool unregister_on_cleanup) { - unregister_on_cleanup_ = unregister_on_cleanup; - - kern_return_t kr = - bootstrap_create_server(bootstrap_port, - const_cast(server_command), - geteuid(), // server uid - true, - &server_port_); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, "bootstrap_create_server() : "); - return kr; - } - - strlcpy(service_name_, service_name, sizeof(service_name_)); - - // Create a service called service_name, and return send rights to - // that port in service_port_. - kr = bootstrap_create_service(server_port_, - const_cast(service_name), - &service_port_); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, "bootstrap_create_service() : "); - - // perhaps the service has already been created - try to look it up - kr = bootstrap_look_up(bootstrap_port, (char*)service_name, &service_port_); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, "bootstrap_look_up() : "); - Unregister(); // clean up server port - return kr; - } - } - - return KERN_SUCCESS; -} - -//============================================================================== -OnDemandServer::~OnDemandServer() { - if (unregister_on_cleanup_) { - Unregister(); - } -} - -//============================================================================== -void OnDemandServer::LaunchOnDemand() { - // We need to do this, since the launched server is another process - // and holding on to this port delays launching until the current process - // exits! - mach_port_deallocate(mach_task_self(), server_port_); - server_port_ = MACH_PORT_DEAD; - - // Now, the service is still registered and all we need to do is send - // a mach message to the service port in order to launch the server. -} - -//============================================================================== -void OnDemandServer::Unregister() { - if (service_port_ != MACH_PORT_NULL) { - mach_port_deallocate(mach_task_self(), service_port_); - service_port_ = MACH_PORT_NULL; - } - - if (server_port_ != MACH_PORT_NULL) { - // unregister the service - kern_return_t kr = bootstrap_register(server_port_, - service_name_, - MACH_PORT_NULL); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, "Breakpad UNREGISTER : bootstrap_register() : "); - } - - mach_port_deallocate(mach_task_self(), server_port_); - server_port_ = MACH_PORT_NULL; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/UnitTests-Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/UnitTests-Info.plist deleted file mode 100644 index 65013556..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.h deleted file mode 100644 index dda53703..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Interface file between the Breakpad.framework and -// the Inspector process. - -#import "common/mac/SimpleStringDictionary.h" - -#import -#import "client/mac/handler/minidump_generator.h" - -#define VERBOSE 0 - -extern bool gDebugLog; - -#define DEBUGLOG if (gDebugLog) fprintf - -// Types of mach messsages (message IDs) -enum { - kMsgType_InspectorInitialInfo = 0, // data is InspectorInfo - kMsgType_InspectorKeyValuePair = 1, // data is KeyValueMessageData - kMsgType_InspectorAcknowledgement = 2 // no data sent -}; - -// Initial information sent from the crashed process by -// Breakpad.framework to the Inspector process -// The mach message with this struct as data will also include -// several descriptors for sending mach port rights to the crashed -// task, etc. -struct InspectorInfo { - int exception_type; - int exception_code; - int exception_subcode; - unsigned int parameter_count; // key-value pairs -}; - -// Key/value message data to be sent to the Inspector -struct KeyValueMessageData { - public: - KeyValueMessageData() {} - KeyValueMessageData(const google_breakpad::KeyValueEntry &inEntry) { - strlcpy(key, inEntry.GetKey(), sizeof(key) ); - strlcpy(value, inEntry.GetValue(), sizeof(value) ); - } - - char key[google_breakpad::KeyValueEntry::MAX_STRING_STORAGE_SIZE]; - char value[google_breakpad::KeyValueEntry::MAX_STRING_STORAGE_SIZE]; -}; - -using std::string; -using google_breakpad::MinidumpGenerator; - -namespace google_breakpad { - -static BOOL EnsureDirectoryPathExists(NSString *dirPath); - -//============================================================================= -class ConfigFile { - public: - ConfigFile() { - config_file_ = -1; - config_file_path_[0] = 0; - has_created_file_ = false; - }; - - ~ConfigFile() { - }; - - void WriteFile(const SimpleStringDictionary *configurationParameters, - const char *dump_dir, - const char *minidump_id); - - const char *GetFilePath() { return config_file_path_; } - - void Unlink() { - if (config_file_ != -1) - unlink(config_file_path_); - - config_file_ = -1; - } - - private: - BOOL WriteData(const void *data, size_t length); - - BOOL AppendConfigData(const char *key, - const void *data, - size_t length); - - BOOL AppendConfigString(const char *key, - const char *value); - - int config_file_; // descriptor for config file - char config_file_path_[PATH_MAX]; // Path to configuration file - bool has_created_file_; -}; - -//============================================================================= -class MinidumpLocation { - public: - MinidumpLocation(const NSString *minidumpDir) { - // Ensure that the path exists. Fallback to /tmp if unable to locate path. - assert(minidumpDir); - if (!EnsureDirectoryPathExists(minidumpDir)) { - DEBUGLOG(stderr, "Unable to create: %s\n", [minidumpDir UTF8String]); - minidumpDir = @"/tmp"; - } - - strlcpy(minidump_dir_path_, [minidumpDir fileSystemRepresentation], - sizeof(minidump_dir_path_)); - - // now generate a unique ID - string dump_path(minidump_dir_path_); - string next_minidump_id; - - string next_minidump_path_ = - (MinidumpGenerator::UniqueNameInDirectory(dump_path, &next_minidump_id)); - - strlcpy(minidump_id_, next_minidump_id.c_str(), sizeof(minidump_id_)); - }; - - const char *GetPath() { return minidump_dir_path_; } - const char *GetID() { return minidump_id_; } - - private: - char minidump_dir_path_[PATH_MAX]; // Path to minidump directory - char minidump_id_[128]; -}; - -//============================================================================= -class Inspector { - public: - Inspector() {}; - - // given a bootstrap service name, receives mach messages - // from a crashed process, then inspects it, creates a minidump file - // and asks the user if he wants to upload it to a server. - void Inspect(const char *receive_port_name); - - private: - kern_return_t ServiceCheckIn(const char *receive_port_name); - kern_return_t ServiceCheckOut(const char *receive_port_name); - - kern_return_t ReadMessages(); - - bool InspectTask(); - kern_return_t SendAcknowledgement(); - void LaunchReporter(const char *inConfigFilePath); - - void SetCrashTimeParameters(); - - mach_port_t service_rcv_port_; - - int exception_type_; - int exception_code_; - int exception_subcode_; - mach_port_t remote_task_; - mach_port_t crashing_thread_; - mach_port_t handler_thread_; - mach_port_t ack_port_; - - SimpleStringDictionary config_params_; - - ConfigFile config_file_; -}; - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.mm deleted file mode 100644 index a8930858..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/Inspector.mm +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Utility that can inspect another process and write a crash dump - -#include -#include -#include -#include -#include -#include - -#import "client/mac/crash_generation/Inspector.h" - -#import "client/mac/Framework/Breakpad.h" -#import "client/mac/handler/minidump_generator.h" - -#import "common/mac/SimpleStringDictionary.h" -#import "common/mac/MachIPC.h" - -#import "GTMDefines.h" - -#import - -#if VERBOSE - bool gDebugLog = true; -#else - bool gDebugLog = false; -#endif - -namespace google_breakpad { - -//============================================================================= -static BOOL EnsureDirectoryPathExists(NSString *dirPath) { - NSFileManager *mgr = [NSFileManager defaultManager]; - - // If we got a relative path, prepend the current directory - if (![dirPath isAbsolutePath]) - dirPath = [[mgr currentDirectoryPath] stringByAppendingPathComponent:dirPath]; - - NSString *path = dirPath; - - // Ensure that no file exists within the path which would block creation - while (1) { - BOOL isDir; - if ([mgr fileExistsAtPath:path isDirectory:&isDir]) { - if (isDir) - break; - - return NO; - } - - path = [path stringByDeletingLastPathComponent]; - } - - // Path now contains the first valid directory (or is empty) - if (![path length]) - return NO; - - NSString *common = - [dirPath commonPrefixWithString:path options:NSLiteralSearch]; - - // If everything is good - if ([common isEqualToString:dirPath]) - return YES; - - // Break up the difference into components - NSString *diff = [dirPath substringFromIndex:[common length] + 1]; - NSArray *components = [diff pathComponents]; - NSUInteger count = [components count]; - - // Rebuild the path one component at a time - NSDictionary *attrs = - [NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedLong:0750] - forKey:NSFilePosixPermissions]; - path = common; - for (NSUInteger i = 0; i < count; ++i) { - path = [path stringByAppendingPathComponent:[components objectAtIndex:i]]; - - if (![mgr createDirectoryAtPath:path attributes:attrs]) - return NO; - } - - return YES; -} - -//============================================================================= -BOOL ConfigFile::WriteData(const void *data, size_t length) { - size_t result = write(config_file_, data, length); - - return result == length; -} - -//============================================================================= -BOOL ConfigFile::AppendConfigData(const char *key, - const void *data, size_t length) { - assert(config_file_ != -1); - - if (!key) { - DEBUGLOG(stderr, "Breakpad: Missing Key\n"); - return NO; - } - - if (!data) { - DEBUGLOG(stderr, "Breakpad: Missing data for key: %s\n", key ? key : - ""); - return NO; - } - - // Write the key, \n, length of data (ascii integer), \n, data - char buffer[16]; - char nl = '\n'; - BOOL result = WriteData(key, strlen(key)); - - snprintf(buffer, sizeof(buffer) - 1, "\n%lu\n", length); - result &= WriteData(buffer, strlen(buffer)); - result &= WriteData(data, length); - result &= WriteData(&nl, 1); - return result; -} - -//============================================================================= -BOOL ConfigFile::AppendConfigString(const char *key, - const char *value) { - return AppendConfigData(key, value, strlen(value)); -} - -//============================================================================= -void ConfigFile::WriteFile(const SimpleStringDictionary *configurationParameters, - const char *dump_dir, - const char *minidump_id) { - - assert(config_file_ == -1); - - // Open and write out configuration file preamble - strlcpy(config_file_path_, "/tmp/Config-XXXXXX", - sizeof(config_file_path_)); - config_file_ = mkstemp(config_file_path_); - - if (config_file_ == -1) { - DEBUGLOG(stderr, - "mkstemp(config_file_path_) == -1 (%s)\n", - strerror(errno)); - return; - } - else { - DEBUGLOG(stderr, "Writing config file to (%s)\n", config_file_path_); - } - - has_created_file_ = true; - - // Add the minidump dir - AppendConfigString(kReporterMinidumpDirectoryKey, dump_dir); - AppendConfigString(kReporterMinidumpIDKey, minidump_id); - - // Write out the configuration parameters - BOOL result = YES; - const SimpleStringDictionary &dictionary = *configurationParameters; - - const KeyValueEntry *entry = NULL; - SimpleStringDictionaryIterator iter(dictionary); - - while ((entry = iter.Next())) { - DEBUGLOG(stderr, - "config: (%s) -> (%s)\n", - entry->GetKey(), - entry->GetValue()); - result = AppendConfigString(entry->GetKey(), entry->GetValue()); - - if (!result) - break; - } - - close(config_file_); - config_file_ = -1; -} - -//============================================================================= -void Inspector::Inspect(const char *receive_port_name) { - kern_return_t result = ServiceCheckIn(receive_port_name); - - if (result == KERN_SUCCESS) { - result = ReadMessages(); - - if (result == KERN_SUCCESS) { - // Inspect the task and write a minidump file. - bool wrote_minidump = InspectTask(); - - // Send acknowledgement to the crashed process that the inspection - // has finished. It will then be able to cleanly exit. - // The return value is ignored because failure isn't fatal. If the process - // didn't get the message there's nothing we can do, and we still want to - // send the report. - SendAcknowledgement(); - - if (wrote_minidump) { - // Ask the user if he wants to upload the crash report to a server, - // and do so if he agrees. - LaunchReporter(config_file_.GetFilePath()); - } else { - fprintf(stderr, "Inspection of crashed process failed\n"); - } - - // Now that we're done reading messages, cleanup the service, but only - // if there was an actual exception - // Otherwise, it means the dump was generated on demand and the process - // lives on, and we might be needed again in the future. - if (exception_code_) { - ServiceCheckOut(receive_port_name); - } - } else { - PRINT_MACH_RESULT(result, "Inspector: WaitForMessage()"); - } - } -} - -//============================================================================= -kern_return_t Inspector::ServiceCheckIn(const char *receive_port_name) { - // We need to get the mach port representing this service, so we can - // get information from the crashed process. - kern_return_t kr = bootstrap_check_in(bootstrap_port, - (char*)receive_port_name, - &service_rcv_port_); - - if (kr != KERN_SUCCESS) { -#if VERBOSE - PRINT_MACH_RESULT(kr, "Inspector: bootstrap_check_in()"); -#endif - } - - return kr; -} - -//============================================================================= -kern_return_t Inspector::ServiceCheckOut(const char *receive_port_name) { - // We're done receiving mach messages from the crashed process, - // so clean up a bit. - kern_return_t kr; - - // DO NOT use mach_port_deallocate() here -- it will fail and the - // following bootstrap_register() will also fail leaving our service - // name hanging around forever (until reboot) - kr = mach_port_destroy(mach_task_self(), service_rcv_port_); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, - "Inspector: UNREGISTERING: service_rcv_port mach_port_deallocate()"); - return kr; - } - - // Unregister the service associated with the receive port. - kr = bootstrap_register(bootstrap_port, - (char*)receive_port_name, - MACH_PORT_NULL); - - if (kr != KERN_SUCCESS) { - PRINT_MACH_RESULT(kr, "Inspector: UNREGISTERING: bootstrap_register()"); - } - - return kr; -} - -//============================================================================= -kern_return_t Inspector::ReadMessages() { - // Wait for an initial message from the crashed process containing basic - // information about the crash. - ReceivePort receive_port(service_rcv_port_); - - MachReceiveMessage message; - kern_return_t result = receive_port.WaitForMessage(&message, 1000); - - if (result == KERN_SUCCESS) { - InspectorInfo &info = (InspectorInfo &)*message.GetData(); - exception_type_ = info.exception_type; - exception_code_ = info.exception_code; - exception_subcode_ = info.exception_subcode; - -#if VERBOSE - printf("message ID = %d\n", message.GetMessageID()); -#endif - - remote_task_ = message.GetTranslatedPort(0); - crashing_thread_ = message.GetTranslatedPort(1); - handler_thread_ = message.GetTranslatedPort(2); - ack_port_ = message.GetTranslatedPort(3); - -#if VERBOSE - printf("exception_type = %d\n", exception_type_); - printf("exception_code = %d\n", exception_code_); - printf("exception_subcode = %d\n", exception_subcode_); - printf("remote_task = %d\n", remote_task_); - printf("crashing_thread = %d\n", crashing_thread_); - printf("handler_thread = %d\n", handler_thread_); - printf("ack_port_ = %d\n", ack_port_); - printf("parameter count = %d\n", info.parameter_count); -#endif - - // In certain situations where multiple crash requests come - // through quickly, we can end up with the mach IPC messages not - // coming through correctly. Since we don't know what parameters - // we've missed, we can't do much besides abort the crash dump - // situation in this case. - unsigned int parameters_read = 0; - // The initial message contains the number of key value pairs that - // we are expected to read. - // Read each key/value pair, one mach message per key/value pair. - for (unsigned int i = 0; i < info.parameter_count; ++i) { - MachReceiveMessage parameter_message; - result = receive_port.WaitForMessage(¶meter_message, 1000); - - if(result == KERN_SUCCESS) { - KeyValueMessageData &key_value_data = - (KeyValueMessageData&)*parameter_message.GetData(); - // If we get a blank key, make sure we don't increment the - // parameter count; in some cases (notably on-demand generation - // many times in a short period of time) caused the Mach IPC - // messages to not come through correctly. - if (strlen(key_value_data.key) == 0) { - continue; - } - parameters_read++; - - config_params_.SetKeyValue(key_value_data.key, key_value_data.value); - } else { - PRINT_MACH_RESULT(result, "Inspector: key/value message"); - break; - } - } - if (parameters_read != info.parameter_count) { - DEBUGLOG(stderr, "Only read %d parameters instead of %d, aborting crash " - "dump generation.", parameters_read, info.parameter_count); - return KERN_FAILURE; - } - } - - return result; -} - -//============================================================================= -// Sets keys in the parameters dictionary that are specific to process uptime. -// The two we set are process up time, and process crash time. -void Inspector::SetCrashTimeParameters() { - // Set process uptime parameter - struct timeval tv; - gettimeofday(&tv, NULL); - - char processUptimeString[32], processCrashtimeString[32]; - const char *processStartTimeString = - config_params_.GetValueForKey(BREAKPAD_PROCESS_START_TIME); - - // Set up time if we've received the start time. - if (processStartTimeString) { - time_t processStartTime = strtol(processStartTimeString, NULL, 10); - time_t processUptime = tv.tv_sec - processStartTime; - sprintf(processUptimeString, "%zd", processUptime); - config_params_.SetKeyValue(BREAKPAD_PROCESS_UP_TIME, processUptimeString); - } - - sprintf(processCrashtimeString, "%zd", tv.tv_sec); - config_params_.SetKeyValue(BREAKPAD_PROCESS_CRASH_TIME, - processCrashtimeString); -} - -bool Inspector::InspectTask() { - // keep the task quiet while we're looking at it - task_suspend(remote_task_); - DEBUGLOG(stderr, "Suspended Remote task\n"); - - NSString *minidumpDir; - - const char *minidumpDirectory = - config_params_.GetValueForKey(BREAKPAD_DUMP_DIRECTORY); - - SetCrashTimeParameters(); - // If the client app has not specified a minidump directory, - // use a default of Library// - if (!minidumpDirectory || 0 == strlen(minidumpDirectory)) { - NSArray *libraryDirectories = - NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, - NSUserDomainMask, - YES); - - NSString *applicationSupportDirectory = - [libraryDirectories objectAtIndex:0]; - NSString *library_subdirectory = [NSString - stringWithUTF8String:kDefaultLibrarySubdirectory]; - NSString *breakpad_product = [NSString - stringWithUTF8String:config_params_.GetValueForKey(BREAKPAD_PRODUCT)]; - - NSArray *path_components = [NSArray - arrayWithObjects:applicationSupportDirectory, - library_subdirectory, - breakpad_product, - nil]; - - minidumpDir = [NSString pathWithComponents:path_components]; - } else { - minidumpDir = [[NSString stringWithUTF8String:minidumpDirectory] - stringByExpandingTildeInPath]; - } - DEBUGLOG(stderr, - "Writing minidump to directory (%s)\n", - [minidumpDir UTF8String]); - - MinidumpLocation minidumpLocation(minidumpDir); - - // Obscure bug alert: - // Don't use [NSString stringWithFormat] to build up the path here since it - // assumes system encoding and in RTL locales will prepend an LTR override - // character for paths beginning with '/' which fileSystemRepresentation does - // not remove. Filed as rdar://6889706 . - NSString *path_ns = [NSString - stringWithUTF8String:minidumpLocation.GetPath()]; - NSString *pathid_ns = [NSString - stringWithUTF8String:minidumpLocation.GetID()]; - NSString *minidumpPath = [path_ns stringByAppendingPathComponent:pathid_ns]; - minidumpPath = [minidumpPath - stringByAppendingPathExtension:@"dmp"]; - - DEBUGLOG(stderr, - "minidump path (%s)\n", - [minidumpPath UTF8String]); - - - config_file_.WriteFile( &config_params_, - minidumpLocation.GetPath(), - minidumpLocation.GetID()); - - - MinidumpGenerator generator(remote_task_, handler_thread_); - - if (exception_type_ && exception_code_) { - generator.SetExceptionInformation(exception_type_, - exception_code_, - exception_subcode_, - crashing_thread_); - } - - - bool result = generator.Write([minidumpPath fileSystemRepresentation]); - - if (result) { - DEBUGLOG(stderr, "Wrote minidump - OK\n"); - } else { - DEBUGLOG(stderr, "Error writing minidump - errno=%s\n", strerror(errno)); - } - - // let the task continue - task_resume(remote_task_); - DEBUGLOG(stderr, "Resumed remote task\n"); - - return result; -} - -//============================================================================= -// The crashed task needs to be told that the inspection has finished. -// It will wait on a mach port (with timeout) until we send acknowledgement. -kern_return_t Inspector::SendAcknowledgement() { - if (ack_port_ != MACH_PORT_DEAD) { - MachPortSender sender(ack_port_); - MachSendMessage ack_message(kMsgType_InspectorAcknowledgement); - - DEBUGLOG(stderr, "Inspector: trying to send acknowledgement to port %d\n", - ack_port_); - - kern_return_t result = sender.SendMessage(ack_message, 2000); - -#if VERBOSE - PRINT_MACH_RESULT(result, "Inspector: sent acknowledgement"); -#endif - - return result; - } - - DEBUGLOG(stderr, "Inspector: port translation failure!\n"); - return KERN_INVALID_NAME; -} - -//============================================================================= -void Inspector::LaunchReporter(const char *inConfigFilePath) { - // Extract the path to the reporter executable. - const char *reporterExecutablePath = - config_params_.GetValueForKey(BREAKPAD_REPORTER_EXE_LOCATION); - DEBUGLOG(stderr, "reporter path = %s\n", reporterExecutablePath); - - // Setup and launch the crash dump sender. - const char *argv[3]; - argv[0] = reporterExecutablePath; - argv[1] = inConfigFilePath; - argv[2] = NULL; - - // Launch the reporter - pid_t pid = fork(); - - // If we're in the child, load in our new executable and run. - // The parent will not wait for the child to complete. - if (pid == 0) { - execv(argv[0], (char * const *)argv); - config_file_.Unlink(); // launch failed - get rid of config file - DEBUGLOG(stderr, "Inspector: unable to launch reporter app\n"); - _exit(1); - } - - // Wait until the Reporter child process exits. - // - - // We'll use a timeout of one minute. - int timeoutCount = 60; // 60 seconds - - while (timeoutCount-- > 0) { - int status; - pid_t result = waitpid(pid, &status, WNOHANG); - - if (result == 0) { - // The child has not yet finished. - sleep(1); - } else if (result == -1) { - DEBUGLOG(stderr, "Inspector: waitpid error (%d) waiting for reporter app\n", - errno); - break; - } else { - // child has finished - break; - } - } -} - -} // namespace google_breakpad - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/InspectorMain.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/InspectorMain.mm deleted file mode 100644 index 137c6a1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/InspectorMain.mm +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Main driver for Inspector - -#import "client/mac/crash_generation/Inspector.h" -#import - -namespace google_breakpad { - -//============================================================================= -extern "C" { - -int main(int argc, char *const argv[]) { -#if DEBUG - // Since we're launched on-demand, this is necessary to see debugging - // output in the console window. - freopen("/dev/console", "w", stdout); - freopen("/dev/console", "w", stderr); -#endif - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (argc != 2) { - exit(0); - } - // Our first command-line argument contains the name of the service - // that we're providing. - google_breakpad::Inspector inspector; - inspector.Inspect(argv[1]); - - [pool release]; - - return 0; -} - -} // extern "C" - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/client_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/client_info.h deleted file mode 100644 index a3a95dca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/client_info.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ -#define CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ - -namespace google_breakpad { - -class ClientInfo { - public: - explicit ClientInfo(pid_t pid) : pid_(pid) {} - - pid_t pid() const { return pid_; } - - private: - pid_t pid_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.cc deleted file mode 100644 index ceeb3b32..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/crash_generation/crash_generation_client.h" - -#include "client/mac/crash_generation/crash_generation_server.h" -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -bool CrashGenerationClient::RequestDumpForException( - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread) { - // The server will send a message to this port indicating that it - // has finished its work. - ReceivePort acknowledge_port; - - MachSendMessage message(kDumpRequestMessage); - message.AddDescriptor(mach_task_self()); // this task - message.AddDescriptor(crashing_thread); // crashing thread - message.AddDescriptor(mach_thread_self()); // handler thread - message.AddDescriptor(acknowledge_port.GetPort()); // message receive port - - ExceptionInfo info; - info.exception_type = exception_type; - info.exception_code = exception_code; - info.exception_subcode = exception_subcode; - message.SetData(&info, sizeof(info)); - - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - kern_return_t result = sender_.SendMessage(message, kSendTimeoutMs); - if (result != KERN_SUCCESS) - return false; - - // Give the server slightly longer to reply since it has to - // inspect this task and write the minidump. - const mach_msg_timeout_t kReceiveTimeoutMs = 5 * 1000; - MachReceiveMessage acknowledge_message; - result = acknowledge_port.WaitForMessage(&acknowledge_message, - kReceiveTimeoutMs); - return result == KERN_SUCCESS; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.h deleted file mode 100644 index 527f577a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ -#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ - -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -class CrashGenerationClient { - public: - explicit CrashGenerationClient(const char* mach_port_name) - : sender_(mach_port_name) { - } - - // Request the crash server to generate a dump. - // - // Return true if the dump was successful; false otherwise. - bool RequestDumpForException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread); - - bool RequestDump() { - return RequestDumpForException(0, 0, 0, MACH_PORT_NULL); - } - - private: - MachPortSender sender_; - - // Prevent copy construction and assignment. - CrashGenerationClient(const CrashGenerationClient&); - CrashGenerationClient& operator=(const CrashGenerationClient&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.cc deleted file mode 100644 index 44548ef0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.cc +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/crash_generation/crash_generation_server.h" - -#include "client/mac/crash_generation/client_info.h" -#include "client/mac/handler/minidump_generator.h" -#include "common/mac/scoped_task_suspend-inl.h" - -namespace google_breakpad { - -CrashGenerationServer::CrashGenerationServer( - const char *mach_port_name, - OnClientDumpRequestCallback dump_callback, - void *dump_context, - OnClientExitingCallback exit_callback, - void *exit_context, - bool generate_dumps, - const std::string &dump_path) - : dump_callback_(dump_callback), - dump_context_(dump_context), - exit_callback_(exit_callback), - exit_context_(exit_context), - generate_dumps_(generate_dumps), - dump_dir_(dump_path.empty() ? "/tmp" : dump_path), - started_(false), - receive_port_(mach_port_name), - mach_port_name_(mach_port_name) { -} - -CrashGenerationServer::~CrashGenerationServer() { - if (started_) - Stop(); -} - -bool CrashGenerationServer::Start() { - int thread_create_result = pthread_create(&server_thread_, NULL, - &WaitForMessages, this); - started_ = thread_create_result == 0; - return started_; -} - -bool CrashGenerationServer::Stop() { - if (!started_) - return false; - - // Send a quit message to the background thread, and then join it. - MachPortSender sender(mach_port_name_.c_str()); - MachSendMessage quit_message(kQuitMessage); - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - kern_return_t result = sender.SendMessage(quit_message, kSendTimeoutMs); - if (result == KERN_SUCCESS) { - int thread_join_result = pthread_join(server_thread_, NULL); - started_ = thread_join_result != 0; - } - - return !started_; -} - -// static -void *CrashGenerationServer::WaitForMessages(void *server) { - CrashGenerationServer *self = - reinterpret_cast(server); - while (self->WaitForOneMessage()) {} - return NULL; -} - -bool CrashGenerationServer::WaitForOneMessage() { - MachReceiveMessage message; - kern_return_t result = receive_port_.WaitForMessage(&message, - MACH_MSG_TIMEOUT_NONE); - if (result == KERN_SUCCESS) { - switch (message.GetMessageID()) { - case kDumpRequestMessage: { - ExceptionInfo &info = (ExceptionInfo &)*message.GetData(); - - mach_port_t remote_task = message.GetTranslatedPort(0); - mach_port_t crashing_thread = message.GetTranslatedPort(1); - mach_port_t handler_thread = message.GetTranslatedPort(2); - mach_port_t ack_port = message.GetTranslatedPort(3); - pid_t remote_pid = -1; - pid_for_task(remote_task, &remote_pid); - ClientInfo client(remote_pid); - - bool result; - std::string dump_path; - if (generate_dumps_) { - ScopedTaskSuspend suspend(remote_task); - - MinidumpGenerator generator(remote_task, handler_thread); - dump_path = generator.UniqueNameInDirectory(dump_dir_, NULL); - - if (info.exception_type && info.exception_code) { - generator.SetExceptionInformation(info.exception_type, - info.exception_code, - info.exception_subcode, - crashing_thread); - } - result = generator.Write(dump_path.c_str()); - } else { - result = true; - } - - if (result && dump_callback_) { - dump_callback_(dump_context_, client, dump_path); - } - - // TODO(ted): support a way for the client to send additional data, - // perhaps with a callback so users of the server can read the data - // themselves? - - if (ack_port != MACH_PORT_DEAD && ack_port != MACH_PORT_NULL) { - MachPortSender sender(ack_port); - MachSendMessage ack_message(kAcknowledgementMessage); - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - - sender.SendMessage(ack_message, kSendTimeoutMs); - } - - if (exit_callback_) { - exit_callback_(exit_context_, client); - } - break; - } - case kQuitMessage: - return false; - } - } else { // result != KERN_SUCCESS - return false; - } - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.h deleted file mode 100644 index 6e6cb44d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ -#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ - -#include - -#include - -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -class ClientInfo; - -// Messages the server can read via its mach port -enum { - kDumpRequestMessage = 1, - kAcknowledgementMessage = 2, - kQuitMessage = 3 -}; - -// Exception details sent by the client when requesting a dump. -struct ExceptionInfo { - int32_t exception_type; - int32_t exception_code; - int32_t exception_subcode; -}; - -class CrashGenerationServer { - public: - // WARNING: callbacks may be invoked on a different thread - // than that which creates the CrashGenerationServer. They must - // be thread safe. - typedef void (*OnClientDumpRequestCallback)(void *context, - const ClientInfo &client_info, - const std::string &file_path); - - typedef void (*OnClientExitingCallback)(void *context, - const ClientInfo &client_info); - - // Create an instance with the given parameters. - // - // mach_port_name: Named server port to listen on. - // dump_callback: Callback for a client crash dump request. - // dump_context: Context for client crash dump request callback. - // exit_callback: Callback for client process exit. - // exit_context: Context for client exit callback. - // generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly - // in the crash dump request callback. In that case, false can be - // passed for this parameter. - // dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const char *mach_port_name, - OnClientDumpRequestCallback dump_callback, - void *dump_context, - OnClientExitingCallback exit_callback, - void *exit_context, - bool generate_dumps, - const std::string &dump_path); - - ~CrashGenerationServer(); - - // Perform initialization steps needed to start listening to clients. - // - // Return true if initialization is successful; false otherwise. - bool Start(); - - // Stop the server. - bool Stop(); - - private: - // Return a unique filename at which a minidump can be written. - bool MakeMinidumpFilename(std::string &outFilename); - - // Loop reading client messages and responding to them until - // a quit message is received. - static void *WaitForMessages(void *server); - - // Wait for a single client message and respond to it. Returns false - // if a quit message was received or if an error occurred. - bool WaitForOneMessage(); - - OnClientDumpRequestCallback dump_callback_; - void *dump_context_; - - OnClientExitingCallback exit_callback_; - void *exit_context_; - - bool generate_dumps_; - - std::string dump_dir_; - - bool started_; - - // The mach port that receives requests to dump from child processes. - ReceivePort receive_port_; - - // The name of the mach port. Stored so the Stop method can message - // the background thread to shut it down. - std::string mach_port_name_; - - // The thread that waits on the receive port. - pthread_t server_thread_; - - // Disable copy constructor and operator=. - CrashGenerationServer(const CrashGenerationServer&); - CrashGenerationServer& operator=(const CrashGenerationServer&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/gcov/libgcov.a b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/gcov/libgcov.a deleted file mode 100644 index f45a58d7..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/gcov/libgcov.a and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.c b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.c deleted file mode 100644 index 19f36b19..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.c +++ /dev/null @@ -1,1750 +0,0 @@ -/* - * IDENTIFICATION: - * stub generated Mon Jun 16 18:08:10 2008 - * with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local - * OPTIONS: - */ - -/* Module exc */ - -#define __MIG_check__Request__exc_subsystem__ 1 -#define __NDR_convert__Request__exc_subsystem__ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifndef mig_internal -#define mig_internal static __inline__ -#endif /* mig_internal */ - -#ifndef mig_external -#define mig_external -#endif /* mig_external */ - -#if !defined(__MigTypeCheck) && defined(TypeCheck) -#define __MigTypeCheck TypeCheck /* Legacy setting */ -#endif /* !defined(__MigTypeCheck) */ - -#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) -#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ -#endif /* !defined(__MigKernelSpecificCode) */ - -#ifndef LimitCheck -#define LimitCheck 0 -#endif /* LimitCheck */ - -#ifndef min -#define min(a,b) ( ((a) < (b))? (a): (b) ) -#endif /* min */ - -#if !defined(_WALIGN_) -#define _WALIGN_(x) (((x) + 3) & ~3) -#endif /* !defined(_WALIGN_) */ - -#if !defined(_WALIGNSZ_) -#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) -#endif /* !defined(_WALIGNSZ_) */ - -#ifndef UseStaticTemplates -#define UseStaticTemplates 0 -#endif /* UseStaticTemplates */ - -#ifndef __DeclareRcvRpc -#define __DeclareRcvRpc(_NUM_, _NAME_) -#endif /* __DeclareRcvRpc */ - -#ifndef __BeforeRcvRpc -#define __BeforeRcvRpc(_NUM_, _NAME_) -#endif /* __BeforeRcvRpc */ - -#ifndef __AfterRcvRpc -#define __AfterRcvRpc(_NUM_, _NAME_) -#endif /* __AfterRcvRpc */ - -#ifndef __DeclareRcvSimple -#define __DeclareRcvSimple(_NUM_, _NAME_) -#endif /* __DeclareRcvSimple */ - -#ifndef __BeforeRcvSimple -#define __BeforeRcvSimple(_NUM_, _NAME_) -#endif /* __BeforeRcvSimple */ - -#ifndef __AfterRcvSimple -#define __AfterRcvSimple(_NUM_, _NAME_) -#endif /* __AfterRcvSimple */ - -#define novalue void - -#define msgh_request_port msgh_local_port -#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) -#define msgh_reply_port msgh_remote_port -#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) - -#define MIG_RETURN_ERROR(X, code) {\ - ((mig_reply_error_t *)X)->RetCode = code;\ - ((mig_reply_error_t *)X)->NDR = NDR_record;\ - return;\ - } - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - - -/* union of all replies */ - -#ifndef __ReplyUnion__breakpad_exc_subsystem__defined -#define __ReplyUnion__breakpad_exc_subsystem__defined -union __ReplyUnion__breakpad_exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* __RequestUnion__breakpad_exc_subsystem__defined */ -/* Forward Declarations */ - - -mig_internal novalue _Xexception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xexception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xexception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_t__defined) -#define __MIG_check__Request__exception_raise_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__code__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_t(__attribute__((__unused__)) __Request__exception_raise_t *In0P) -{ - - typedef __Request__exception_raise_t __Request; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 8)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)) -) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 8) + ((4 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_t__code__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_t__code__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise */ -mig_internal novalue _Xexception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_t __Request; - typedef __Reply__exception_raise_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_t__defined */ - - __DeclareRcvRpc(2401, "exception_raise") - __BeforeRcvRpc(2401, "exception_raise") - -#if defined(__MIG_check__Request__exception_raise_t__defined) - check_result = __MIG_check__Request__exception_raise_t((__Request *)In0P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_t__defined) */ - - OutP->RetCode = breakpad_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); - - OutP->NDR = NDR_record; - - - __AfterRcvRpc(2401, "exception_raise") -} - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_state_t__defined) -#define __MIG_check__Request__exception_raise_state_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t) -#elif defined(__NDR_convert__int_rep__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t) -#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t) -#elif defined(__NDR_convert__int_rep__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t) -#elif defined(__NDR_convert__char_rep__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t) -#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t) -#elif defined(__NDR_convert__char_rep__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t) -#elif defined(__NDR_convert__float_rep__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t) -#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t) -#elif defined(__NDR_convert__float_rep__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_state_t(__attribute__((__unused__)) __Request__exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__exception_raise_state_t **In1PP) -{ - - typedef __Request__exception_raise_state_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined */ - msgh_size_delta = (4 * In0P->codeCnt); -#if __MigTypeCheck - if (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584) + msgh_size_delta) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 8); - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 584) + ((4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.int_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.char_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.float_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_state_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state */ -mig_internal novalue _Xexception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_state_t __Request; - typedef __Reply__exception_raise_state_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_state_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_state_t__defined */ - - __DeclareRcvRpc(2402, "exception_raise_state") - __BeforeRcvRpc(2402, "exception_raise_state") - -#if defined(__MIG_check__Request__exception_raise_state_t__defined) - check_result = __MIG_check__Request__exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_state_t__defined) */ - - OutP->new_stateCnt = 144; - - OutP->RetCode = breakpad_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 576) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2402, "exception_raise_state") -} - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_state_identity_t__defined) -#define __MIG_check__Request__exception_raise_state_identity_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t) -#elif defined(__NDR_convert__int_rep__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t) -#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t) -#elif defined(__NDR_convert__int_rep__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t) -#elif defined(__NDR_convert__char_rep__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t) -#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t) -#elif defined(__NDR_convert__char_rep__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t) -#elif defined(__NDR_convert__float_rep__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t) -#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t) -#elif defined(__NDR_convert__float_rep__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_state_identity_t(__attribute__((__unused__)) __Request__exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__exception_raise_state_identity_t **In1PP) -{ - - typedef __Request__exception_raise_state_identity_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)) -) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined */ - msgh_size_delta = (4 * In0P->codeCnt); -#if __MigTypeCheck - if (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584) + msgh_size_delta) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 8); - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 584) + ((4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.int_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.char_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.float_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_state_identity_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -mig_internal novalue _Xexception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_state_identity_t __Request; - typedef __Reply__exception_raise_state_identity_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_state_identity_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_state_identity_t__defined */ - - __DeclareRcvRpc(2403, "exception_raise_state_identity") - __BeforeRcvRpc(2403, "exception_raise_state_identity") - -#if defined(__MIG_check__Request__exception_raise_state_identity_t__defined) - check_result = __MIG_check__Request__exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_state_identity_t__defined) */ - - OutP->new_stateCnt = 144; - - OutP->RetCode = breakpad_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 576) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2403, "exception_raise_state_identity") -} - - -extern boolean_t exc_server( - mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -extern mig_routine_t exc_server_routine( - mach_msg_header_t *InHeadP); - - -/* Description of this subsystem, for use in direct RPC */ -const struct breakpad_exc_subsystem { - mig_server_routine_t server; /* Server routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max msg size */ - vm_address_t reserved; /* Reserved */ - struct routine_descriptor /*Array of routine descriptors */ - routine[3]; -} breakpad_exc_subsystem = { - exc_server_routine, - 2401, - 2404, - (mach_msg_size_t)sizeof(union __ReplyUnion__breakpad_exc_subsystem), - (vm_address_t)0, - { - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_state_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_state_identity_t)}, - } -}; - -mig_external boolean_t exc_server - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - register mig_routine_t routine; - - OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - - if ((InHeadP->msgh_id > 2403) || (InHeadP->msgh_id < 2401) || - ((routine = breakpad_exc_subsystem.routine[InHeadP->msgh_id - 2401].stub_routine) == 0)) { - ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - (*routine) (InHeadP, OutHeadP); - return TRUE; -} - -mig_external mig_routine_t exc_server_routine - (mach_msg_header_t *InHeadP) -{ - register int msgh_id; - - msgh_id = InHeadP->msgh_id - 2401; - - if ((msgh_id > 2) || (msgh_id < 0)) - return 0; - - return breakpad_exc_subsystem.routine[msgh_id].stub_routine; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.h deleted file mode 100644 index c05f25a8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_exc_server.h +++ /dev/null @@ -1,258 +0,0 @@ -#ifndef _exc_user_ -#define _exc_user_ - -/* Module exc */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef exc_MSG_COUNT -#define exc_MSG_COUNT 3 -#endif /* exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include -__BEGIN_DECLS - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__exc_subsystem__defined -#define __RequestUnion__exc_subsystem__defined -union __RequestUnion__exc_subsystem { - __Request__exception_raise_t Request_exception_raise; - __Request__exception_raise_state_t Request_exception_raise_state; - __Request__exception_raise_state_identity_t Request_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__exc_subsystem__defined -#define __ReplyUnion__exc_subsystem__defined -union __ReplyUnion__exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_exc -#define subsystem_to_name_map_exc \ - { "exception_raise", 2401 },\ - { "exception_raise_state", 2402 },\ - { "exception_raise_state_identity", 2403 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _exc_user_ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.cc deleted file mode 100644 index 709e8546..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.cc +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -/* - * This file was copied from libc/gen/nlist.c from Darwin's source code - * The version of nlist used as a base is from 10.5.2, libc-498 - * http://www.opensource.apple.com/darwinsource/10.5.2/Libc-498/gen/nlist.c - * - * The full tarball is at: - * http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libc-498.tar.gz - * - * I've modified it to be compatible with 64-bit images. -*/ - -#include "breakpad_nlist_64.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Stuff lifted from and since they are gone */ -/* - * Header prepended to each a.out file. - */ -struct exec { - unsigned short a_machtype; /* machine type */ - unsigned short a_magic; /* magic number */ - unsigned long a_text; /* size of text segment */ - unsigned long a_data; /* size of initialized data */ - unsigned long a_bss; /* size of uninitialized data */ - unsigned long a_syms; /* size of symbol table */ - unsigned long a_entry; /* entry point */ - unsigned long a_trsize; /* size of text relocation */ - unsigned long a_drsize; /* size of data relocation */ -}; - -#define OMAGIC 0407 /* old impure format */ -#define NMAGIC 0410 /* read-only text */ -#define ZMAGIC 0413 /* demand load format */ - -#define N_BADMAG(x) \ - (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) -#define N_TXTOFF(x) \ - ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec)) -#define N_SYMOFF(x) \ - (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize) - -// Traits structs for specializing function templates to handle -// 32-bit/64-bit Mach-O files. -template -struct MachBits {}; - -typedef struct nlist nlist32; -typedef struct nlist_64 nlist64; - -template<> -struct MachBits { - typedef mach_header mach_header_type; - typedef uint32_t word_type; - static const uint32_t magic = MH_MAGIC; -}; - -template<> -struct MachBits { - typedef mach_header_64 mach_header_type; - typedef uint64_t word_type; - static const uint32_t magic = MH_MAGIC_64; -}; - -template -int -__breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, - cpu_type_t cpu_type); - -/* - * nlist - retreive attributes from name list (string table version) - */ - -template -int breakpad_nlist_common(const char *name, - nlist_type *list, - const char **symbolNames, - cpu_type_t cpu_type) { - int fd = open(name, O_RDONLY, 0); - if (fd < 0) - return -1; - int n = __breakpad_fdnlist(fd, list, symbolNames, cpu_type); - close(fd); - return n; -} - -int breakpad_nlist(const char *name, - struct nlist *list, - const char **symbolNames, - cpu_type_t cpu_type) { - return breakpad_nlist_common(name, list, symbolNames, cpu_type); -} - -int breakpad_nlist(const char *name, - struct nlist_64 *list, - const char **symbolNames, - cpu_type_t cpu_type) { - return breakpad_nlist_common(name, list, symbolNames, cpu_type); -} - -/* Note: __fdnlist() is called from kvm_nlist in libkvm's kvm.c */ - -template -int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, - cpu_type_t cpu_type) { - typedef typename MachBits::mach_header_type mach_header_type; - typedef typename MachBits::word_type word_type; - - const uint32_t magic = MachBits::magic; - - int maxlen = 500; - int nreq = 0; - for (nlist_type* q = list; - symbolNames[q-list] && symbolNames[q-list][0]; - q++, nreq++) { - - q->n_type = 0; - q->n_value = 0; - q->n_desc = 0; - q->n_sect = 0; - q->n_un.n_strx = 0; - } - - struct exec buf; - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) || - (N_BADMAG(buf) && *((long *)&buf) != magic && - NXSwapBigLongToHost(*((long *)&buf)) != FAT_MAGIC) && - /* The following is the big-endian ppc64 check */ - (*((long*)&buf)) != FAT_MAGIC) { - return -1; - } - - /* Deal with fat file if necessary */ - unsigned arch_offset = 0; - if (NXSwapBigLongToHost(*((long *)&buf)) == FAT_MAGIC || - /* The following is the big-endian ppc64 check */ - *((unsigned int *)&buf) == FAT_MAGIC) { - /* Get host info */ - host_t host = mach_host_self(); - unsigned i = HOST_BASIC_INFO_COUNT; - struct host_basic_info hbi; - kern_return_t kr; - if ((kr = host_info(host, HOST_BASIC_INFO, - (host_info_t)(&hbi), &i)) != KERN_SUCCESS) { - return -1; - } - mach_port_deallocate(mach_task_self(), host); - - /* Read in the fat header */ - struct fat_header fh; - if (lseek(fd, 0, SEEK_SET) == -1) { - return -1; - } - if (read(fd, (char *)&fh, sizeof(fh)) != sizeof(fh)) { - return -1; - } - - /* Convert fat_narchs to host byte order */ - fh.nfat_arch = NXSwapBigIntToHost(fh.nfat_arch); - - /* Read in the fat archs */ - struct fat_arch *fat_archs = - (struct fat_arch *)malloc(fh.nfat_arch * sizeof(struct fat_arch)); - if (fat_archs == NULL) { - return -1; - } - if (read(fd, (char *)fat_archs, - sizeof(struct fat_arch) * fh.nfat_arch) != - (ssize_t)sizeof(struct fat_arch) * fh.nfat_arch) { - free(fat_archs); - return -1; - } - - /* - * Convert archs to host byte ordering (a constraint of - * cpusubtype_getbestarch() - */ - for (unsigned i = 0; i < fh.nfat_arch; i++) { - fat_archs[i].cputype = - NXSwapBigIntToHost(fat_archs[i].cputype); - fat_archs[i].cpusubtype = - NXSwapBigIntToHost(fat_archs[i].cpusubtype); - fat_archs[i].offset = - NXSwapBigIntToHost(fat_archs[i].offset); - fat_archs[i].size = - NXSwapBigIntToHost(fat_archs[i].size); - fat_archs[i].align = - NXSwapBigIntToHost(fat_archs[i].align); - } - - struct fat_arch *fap = NULL; - for (unsigned i = 0; i < fh.nfat_arch; i++) { - if (fat_archs[i].cputype == cpu_type) { - fap = &fat_archs[i]; - break; - } - } - - if (!fap) { - free(fat_archs); - return -1; - } - arch_offset = fap->offset; - free(fat_archs); - - /* Read in the beginning of the architecture-specific file */ - if (lseek(fd, arch_offset, SEEK_SET) == -1) { - return -1; - } - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf)) { - return -1; - } - } - - off_t sa; /* symbol address */ - off_t ss; /* start of strings */ - register register_t n; - if (*((unsigned int *)&buf) == magic) { - if (lseek(fd, arch_offset, SEEK_SET) == -1) { - return -1; - } - mach_header_type mh; - if (read(fd, (char *)&mh, sizeof(mh)) != sizeof(mh)) { - return -1; - } - - struct load_command *load_commands = - (struct load_command *)malloc(mh.sizeofcmds); - if (load_commands == NULL) { - return -1; - } - if (read(fd, (char *)load_commands, mh.sizeofcmds) != - mh.sizeofcmds) { - free(load_commands); - return -1; - } - struct symtab_command *stp = NULL; - struct load_command *lcp = load_commands; - // iterate through all load commands, looking for - // LC_SYMTAB load command - for (long i = 0; i < mh.ncmds; i++) { - if (lcp->cmdsize % sizeof(word_type) != 0 || - lcp->cmdsize <= 0 || - (char *)lcp + lcp->cmdsize > - (char *)load_commands + mh.sizeofcmds) { - free(load_commands); - return -1; - } - if (lcp->cmd == LC_SYMTAB) { - if (lcp->cmdsize != - sizeof(struct symtab_command)) { - free(load_commands); - return -1; - } - stp = (struct symtab_command *)lcp; - break; - } - lcp = (struct load_command *) - ((char *)lcp + lcp->cmdsize); - } - if (stp == NULL) { - free(load_commands); - return -1; - } - // sa points to the beginning of the symbol table - sa = stp->symoff + arch_offset; - // ss points to the beginning of the string table - ss = stp->stroff + arch_offset; - // n is the number of bytes in the symbol table - // each symbol table entry is an nlist structure - n = stp->nsyms * sizeof(nlist_type); - free(load_commands); - } else { - sa = N_SYMOFF(buf) + arch_offset; - ss = sa + buf.a_syms + arch_offset; - n = buf.a_syms; - } - - if (lseek(fd, sa, SEEK_SET) == -1) { - return -1; - } - - // the algorithm here is to read the nlist entries in m-sized - // chunks into q. q is then iterated over. for each entry in q, - // use the string table index(q->n_un.n_strx) to read the symbol - // name, then scan the nlist entries passed in by the user(via p), - // and look for a match - while (n) { - nlist_type space[BUFSIZ/sizeof (nlist_type)]; - register register_t m = sizeof (space); - - if (n < m) - m = n; - if (read(fd, (char *)space, m) != m) - break; - n -= m; - long savpos = lseek(fd, 0, SEEK_CUR); - if (savpos == -1) { - return -1; - } - for (nlist_type* q = space; (m -= sizeof(nlist_type)) >= 0; q++) { - char nambuf[BUFSIZ]; - - if (q->n_un.n_strx == 0 || q->n_type & N_STAB) - continue; - - // seek to the location in the binary where the symbol - // name is stored & read it into memory - if (lseek(fd, ss+q->n_un.n_strx, SEEK_SET) == -1) { - return -1; - } - if (read(fd, nambuf, maxlen+1) == -1) { - return -1; - } - const char *s2 = nambuf; - for (nlist_type *p = list; - symbolNames[p-list] && symbolNames[p-list][0]; - p++) { - // get the symbol name the user has passed in that - // corresponds to the nlist entry that we're looking at - const char *s1 = symbolNames[p - list]; - while (*s1) { - if (*s1++ != *s2++) - goto cont; - } - if (*s2) - goto cont; - - p->n_value = q->n_value; - p->n_type = q->n_type; - p->n_desc = q->n_desc; - p->n_sect = q->n_sect; - p->n_un.n_strx = q->n_un.n_strx; - if (--nreq == 0) - return nreq; - - break; - cont: ; - } - } - if (lseek(fd, savpos, SEEK_SET) == -1) { - return -1; - } - } - return nreq; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.h deleted file mode 100644 index 1d2c6391..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/breakpad_nlist_64.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// breakpad_nlist.h -// -// This file is meant to provide a header for clients of the modified -// nlist function implemented to work on 64-bit. - -#ifndef CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ - -#include - -int breakpad_nlist(const char *name, - struct nlist *list, - const char **symbolNames, - cpu_type_t cpu_type); -int breakpad_nlist(const char *name, - struct nlist_64 *list, - const char **symbolNames, - cpu_type_t cpu_type); - -#endif /* CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.cc deleted file mode 100644 index c6499e68..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.cc +++ /dev/null @@ -1,567 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/handler/dynamic_images.h" - -extern "C" { // needed to compile on Leopard - #include - #include - #include -} - -#include "breakpad_nlist_64.h" -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif - -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 - -// Fallback declarations for TASK_DYLD_INFO and friends, introduced in -// in the Mac OS X 10.6 SDK. -#define TASK_DYLD_INFO 17 -struct task_dyld_info { - mach_vm_address_t all_image_info_addr; - mach_vm_size_t all_image_info_size; -}; -typedef struct task_dyld_info task_dyld_info_data_t; -typedef struct task_dyld_info *task_dyld_info_t; -#define TASK_DYLD_INFO_COUNT (sizeof(task_dyld_info_data_t) / sizeof(natural_t)) - -#endif - -namespace google_breakpad { - -using std::string; -using std::vector; - -//============================================================================== -// Returns the size of the memory region containing |address| and the -// number of bytes from |address| to the end of the region. -// We potentially, will extend the size of the original -// region by the size of the following region if it's contiguous with the -// first in order to handle cases when we're reading strings and they -// straddle two vm regions. -// -static mach_vm_size_t GetMemoryRegionSize(task_port_t target_task, - const uint64_t address, - mach_vm_size_t *size_to_end) { - mach_vm_address_t region_base = (mach_vm_address_t)address; - mach_vm_size_t region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - // Get information about the vm region containing |address| - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - kern_return_t result = - mach_vm_region_recurse(target_task, - ®ion_base, - ®ion_size, - &nesting_level, - region_info, - &info_count); - - if (result == KERN_SUCCESS) { - // Get distance from |address| to the end of this region - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - - // If we want to handle strings as long as 4096 characters we may need - // to check if there's a vm region immediately following the first one. - // If so, we need to extend |*size_to_end| to go all the way to the end - // of the second region. - if (*size_to_end < 4096) { - // Second region starts where the first one ends - mach_vm_address_t region_base2 = - (mach_vm_address_t)(region_base + region_size); - mach_vm_size_t region_size2; - - // Get information about the following vm region - result = - mach_vm_region_recurse(target_task, - ®ion_base2, - ®ion_size2, - &nesting_level, - region_info, - &info_count); - - // Extend region_size to go all the way to the end of the 2nd region - if (result == KERN_SUCCESS - && region_base2 == region_base + region_size) { - region_size += region_size2; - } - } - - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - } else { - region_size = 0; - *size_to_end = 0; - } - - return region_size; -} - -#define kMaxStringLength 8192 -//============================================================================== -// Reads a NULL-terminated string from another task. -// -// Warning! This will not read any strings longer than kMaxStringLength-1 -// -static string ReadTaskString(task_port_t target_task, - const uint64_t address) { - // The problem is we don't know how much to read until we know how long - // the string is. And we don't know how long the string is, until we've read - // the memory! So, we'll try to read kMaxStringLength bytes - // (or as many bytes as we can until we reach the end of the vm region). - mach_vm_size_t size_to_end; - GetMemoryRegionSize(target_task, address, &size_to_end); - - if (size_to_end > 0) { - mach_vm_size_t size_to_read = - size_to_end > kMaxStringLength ? kMaxStringLength : size_to_end; - - vector bytes; - if (ReadTaskMemory(target_task, address, (size_t)size_to_read, bytes) != - KERN_SUCCESS) - return string(); - - return string(reinterpret_cast(&bytes[0])); - } - - return string(); -} - -//============================================================================== -// Reads an address range from another task. The bytes read will be returned -// in bytes, which will be resized as necessary. -kern_return_t ReadTaskMemory(task_port_t target_task, - const uint64_t address, - size_t length, - vector &bytes) { - int systemPageSize = getpagesize(); - - // use the negative of the page size for the mask to find the page address - mach_vm_address_t page_address = address & (-systemPageSize); - - mach_vm_address_t last_page_address = - (address + length + (systemPageSize - 1)) & (-systemPageSize); - - mach_vm_size_t page_size = last_page_address - page_address; - uint8_t* local_start; - uint32_t local_length; - - kern_return_t r = mach_vm_read(target_task, - page_address, - page_size, - reinterpret_cast(&local_start), - &local_length); - - if (r != KERN_SUCCESS) - return r; - - bytes.resize(length); - memcpy(&bytes[0], - &local_start[(mach_vm_address_t)address - page_address], - length); - mach_vm_deallocate(mach_task_self(), (uintptr_t)local_start, local_length); - return KERN_SUCCESS; -} - -#pragma mark - - -//============================================================================== -// Traits structs for specializing function templates to handle -// 32-bit/64-bit Mach-O files. -struct MachO32 { - typedef mach_header mach_header_type; - typedef segment_command mach_segment_command_type; - typedef dyld_image_info32 dyld_image_info; - typedef dyld_all_image_infos32 dyld_all_image_infos; - typedef struct nlist nlist_type; - static const uint32_t magic = MH_MAGIC; - static const uint32_t segment_load_command = LC_SEGMENT; -}; - -struct MachO64 { - typedef mach_header_64 mach_header_type; - typedef segment_command_64 mach_segment_command_type; - typedef dyld_image_info64 dyld_image_info; - typedef dyld_all_image_infos64 dyld_all_image_infos; - typedef struct nlist_64 nlist_type; - static const uint32_t magic = MH_MAGIC_64; - static const uint32_t segment_load_command = LC_SEGMENT_64; -}; - -template -bool FindTextSection(DynamicImage& image) { - typedef typename MachBits::mach_header_type mach_header_type; - typedef typename MachBits::mach_segment_command_type - mach_segment_command_type; - - const mach_header_type* header = - reinterpret_cast(&image.header_[0]); - - if(header->magic != MachBits::magic) { - return false; - } - - const struct load_command *cmd = - reinterpret_cast(header + 1); - - bool found_text_section = false; - bool found_dylib_id_command = false; - for (unsigned int i = 0; cmd && (i < header->ncmds); ++i) { - if (!found_text_section) { - if (cmd->cmd == MachBits::segment_load_command) { - const mach_segment_command_type *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - image.vmaddr_ = seg->vmaddr; - image.vmsize_ = seg->vmsize; - image.slide_ = 0; - - if (seg->fileoff == 0 && seg->filesize != 0) { - image.slide_ = - (uintptr_t)image.GetLoadAddress() - (uintptr_t)seg->vmaddr; - } - found_text_section = true; - } - } - } - - if (!found_dylib_id_command) { - if (cmd->cmd == LC_ID_DYLIB) { - const struct dylib_command *dc = - reinterpret_cast(cmd); - - image.version_ = dc->dylib.current_version; - found_dylib_id_command = true; - } - } - - if (found_dylib_id_command && found_text_section) { - return true; - } - - cmd = reinterpret_cast - (reinterpret_cast(cmd) + cmd->cmdsize); - } - - return false; -} - -//============================================================================== -// Initializes vmaddr_, vmsize_, and slide_ -void DynamicImage::CalculateMemoryAndVersionInfo() { - // unless we can process the header, ensure that calls to - // IsValid() will return false - vmaddr_ = 0; - vmsize_ = 0; - slide_ = 0; - version_ = 0; - - // The function template above does all the real work. - if (Is64Bit()) - FindTextSection(*this); - else - FindTextSection(*this); -} - -//============================================================================== -// The helper function template abstracts the 32/64-bit differences. -template -uint32_t GetFileTypeFromHeader(DynamicImage& image) { - typedef typename MachBits::mach_header_type mach_header_type; - - const mach_header_type* header = - reinterpret_cast(&image.header_[0]); - return header->filetype; -} - -uint32_t DynamicImage::GetFileType() { - if (Is64Bit()) - return GetFileTypeFromHeader(*this); - - return GetFileTypeFromHeader(*this); -} - -#pragma mark - - -//============================================================================== -// Loads information about dynamically loaded code in the given task. -DynamicImages::DynamicImages(mach_port_t task) - : task_(task), - cpu_type_(DetermineTaskCPUType(task)), - image_list_() { - ReadImageInfoForTask(); -} - -template -static uint64_t LookupSymbol(const char* symbol_name, - const char* filename, - cpu_type_t cpu_type) { - typedef typename MachBits::nlist_type nlist_type; - - nlist_type symbol_info[8] = {}; - const char *symbolNames[2] = { symbol_name, "\0" }; - nlist_type &list = symbol_info[0]; - int invalidEntriesCount = breakpad_nlist(filename, - &list, - symbolNames, - cpu_type); - - if(invalidEntriesCount != 0) { - return 0; - } - - assert(list.n_value); - return list.n_value; -} - -static SInt32 GetOSVersionInternal() { - SInt32 os_version = 0; - Gestalt(gestaltSystemVersion, &os_version); - return os_version; -} - -static SInt32 GetOSVersion() { - static SInt32 os_version = GetOSVersionInternal(); - return os_version; -} - -static bool IsSnowLeopardOrLater() { -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - return true; -#else - return GetOSVersion() >= 0x1060; -#endif -} - -uint64_t DynamicImages::GetDyldAllImageInfosPointer() { - if (IsSnowLeopardOrLater()) { - task_dyld_info_data_t task_dyld_info; - mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT; - if (task_info(task_, TASK_DYLD_INFO, (task_info_t)&task_dyld_info, - &count) != KERN_SUCCESS) { - return NULL; - } - - return (uint64_t)task_dyld_info.all_image_info_addr; - } else { - const char *imageSymbolName = "_dyld_all_image_infos"; - const char *dyldPath = "/usr/lib/dyld"; - - if (Is64Bit()) - return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); - return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); - } -} - -//============================================================================== -// This code was written using dyld_debug.c (from Darwin) as a guide. - -template -void ReadImageInfo(DynamicImages& images, - uint64_t image_list_address) { - typedef typename MachBits::dyld_image_info dyld_image_info; - typedef typename MachBits::dyld_all_image_infos dyld_all_image_infos; - typedef typename MachBits::mach_header_type mach_header_type; - - // Read the structure inside of dyld that contains information about - // loaded images. We're reading from the desired task's address space. - - // Here we make the assumption that dyld loaded at the same address in - // the crashed process vs. this one. This is an assumption made in - // "dyld_debug.c" and is said to be nearly always valid. - vector dyld_all_info_bytes; - if (ReadTaskMemory(images.task_, - image_list_address, - sizeof(dyld_all_image_infos), - dyld_all_info_bytes) != KERN_SUCCESS) - return; - - dyld_all_image_infos *dyldInfo = - reinterpret_cast(&dyld_all_info_bytes[0]); - - // number of loaded images - int count = dyldInfo->infoArrayCount; - - // Read an array of dyld_image_info structures each containing - // information about a loaded image. - vector dyld_info_array_bytes; - if (ReadTaskMemory(images.task_, - dyldInfo->infoArray, - count * sizeof(dyld_image_info), - dyld_info_array_bytes) != KERN_SUCCESS) - return; - - dyld_image_info *infoArray = - reinterpret_cast(&dyld_info_array_bytes[0]); - images.image_list_.reserve(count); - - for (int i = 0; i < count; ++i) { - dyld_image_info &info = infoArray[i]; - - // First read just the mach_header from the image in the task. - vector mach_header_bytes; - if (ReadTaskMemory(images.task_, - info.load_address_, - sizeof(mach_header_type), - mach_header_bytes) != KERN_SUCCESS) - continue; // bail on this dynamic image - - mach_header_type *header = - reinterpret_cast(&mach_header_bytes[0]); - - // Now determine the total amount necessary to read the header - // plus all of the load commands. - size_t header_size = - sizeof(mach_header_type) + header->sizeofcmds; - - if (ReadTaskMemory(images.task_, - info.load_address_, - header_size, - mach_header_bytes) != KERN_SUCCESS) - continue; - - header = reinterpret_cast(&mach_header_bytes[0]); - - // Read the file name from the task's memory space. - string file_path; - if (info.file_path_) { - // Although we're reading kMaxStringLength bytes, it's copied in the - // the DynamicImage constructor below with the correct string length, - // so it's not really wasting memory. - file_path = ReadTaskString(images.task_, info.file_path_); - } - - // Create an object representing this image and add it to our list. - DynamicImage *new_image; - new_image = new DynamicImage(&mach_header_bytes[0], - header_size, - info.load_address_, - file_path, - info.file_mod_date_, - images.task_, - images.cpu_type_); - - if (new_image->IsValid()) { - images.image_list_.push_back(DynamicImageRef(new_image)); - } else { - delete new_image; - } - } - - // sorts based on loading address - sort(images.image_list_.begin(), images.image_list_.end()); - // remove duplicates - this happens in certain strange cases - // You can see it in DashboardClient when Google Gadgets plugin - // is installed. Apple's crash reporter log and gdb "info shared" - // both show the same library multiple times at the same address - - vector::iterator it = unique(images.image_list_.begin(), - images.image_list_.end()); - images.image_list_.erase(it, images.image_list_.end()); -} - -void DynamicImages::ReadImageInfoForTask() { - uint64_t imageList = GetDyldAllImageInfosPointer(); - - if (imageList) { - if (Is64Bit()) - ReadImageInfo(*this, imageList); - else - ReadImageInfo(*this, imageList); - } -} - -//============================================================================== -DynamicImage *DynamicImages::GetExecutableImage() { - int executable_index = GetExecutableImageIndex(); - - if (executable_index >= 0) { - return GetImage(executable_index); - } - - return NULL; -} - -//============================================================================== -// returns -1 if failure to find executable -int DynamicImages::GetExecutableImageIndex() { - int image_count = GetImageCount(); - - for (int i = 0; i < image_count; ++i) { - DynamicImage *image = GetImage(i); - if (image->GetFileType() == MH_EXECUTE) { - return i; - } - } - - return -1; -} - -//============================================================================== -// static -cpu_type_t DynamicImages::DetermineTaskCPUType(task_t task) { - if (task == mach_task_self()) - return GetNativeCPUType(); - - int mib[CTL_MAXNAME]; - size_t mibLen = CTL_MAXNAME; - int err = sysctlnametomib("sysctl.proc_cputype", mib, &mibLen); - if (err == 0) { - assert(mibLen < CTL_MAXNAME); - pid_for_task(task, &mib[mibLen]); - mibLen += 1; - - cpu_type_t cpu_type; - size_t cpuTypeSize = sizeof(cpu_type); - sysctl(mib, mibLen, &cpu_type, &cpuTypeSize, 0, 0); - return cpu_type; - } - - return GetNativeCPUType(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.h deleted file mode 100644 index 63816bf3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/dynamic_images.h +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dynamic_images.h -// -// Implements most of the function of the dyld API, but allowing an -// arbitrary task to be introspected, unlike the dyld API which -// only allows operation on the current task. The current implementation -// is limited to use by 32-bit tasks. - -#ifndef CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ -#define CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ - -#include -#include -#include -#include - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -//============================================================================== -// The memory layout of this struct matches the dyld_image_info struct -// defined in "dyld_gdb.h" in the darwin source. -typedef struct dyld_image_info32 { - uint32_t load_address_; // struct mach_header* - uint32_t file_path_; // char* - uint32_t file_mod_date_; -} dyld_image_info32; - -typedef struct dyld_image_info64 { - uint64_t load_address_; // struct mach_header* - uint64_t file_path_; // char* - uint64_t file_mod_date_; -} dyld_image_info64; - -//============================================================================== -// This is as defined in "dyld_gdb.h" in the darwin source. -// _dyld_all_image_infos (in dyld) is a structure of this type -// which will be used to determine which dynamic code has been loaded. -typedef struct dyld_all_image_infos32 { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - uint32_t infoArray; // const struct dyld_image_info* - uint32_t notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos32; - -typedef struct dyld_all_image_infos64 { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - uint64_t infoArray; // const struct dyld_image_info* - uint64_t notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos64; - -// some typedefs to isolate 64/32 bit differences -#ifdef __LP64__ -typedef mach_header_64 breakpad_mach_header; -typedef segment_command_64 breakpad_mach_segment_command; -#else -typedef mach_header breakpad_mach_header; -typedef segment_command breakpad_mach_segment_command; -#endif - -// Helper functions to deal with 32-bit/64-bit Mach-O differences. -class DynamicImage; -template -bool FindTextSection(DynamicImage& image); - -template -uint32_t GetFileTypeFromHeader(DynamicImage& image); - -//============================================================================== -// Represents a single dynamically loaded mach-o image -class DynamicImage { - public: - DynamicImage(uint8_t *header, // data is copied - size_t header_size, // includes load commands - uint64_t load_address, - string file_path, - uintptr_t image_mod_date, - mach_port_t task, - cpu_type_t cpu_type) - : header_(header, header + header_size), - header_size_(header_size), - load_address_(load_address), - vmaddr_(0), - vmsize_(0), - slide_(0), - version_(0), - file_path_(file_path), - file_mod_date_(image_mod_date), - task_(task), - cpu_type_(cpu_type) { - CalculateMemoryAndVersionInfo(); - } - - // Size of mach_header plus load commands - size_t GetHeaderSize() const {return header_.size();} - - // Full path to mach-o binary - string GetFilePath() {return file_path_;} - - uint64_t GetModDate() const {return file_mod_date_;} - - // Actual address where the image was loaded - uint64_t GetLoadAddress() const {return load_address_;} - - // Address where the image should be loaded - mach_vm_address_t GetVMAddr() const {return vmaddr_;} - - // Difference between GetLoadAddress() and GetVMAddr() - ptrdiff_t GetVMAddrSlide() const {return slide_;} - - // Size of the image - mach_vm_size_t GetVMSize() const {return vmsize_;} - - // Task owning this loaded image - mach_port_t GetTask() {return task_;} - - // CPU type of the task - cpu_type_t GetCPUType() {return cpu_type_;} - - // filetype from the Mach-O header. - uint32_t GetFileType(); - - // Return true if the task is a 64-bit architecture. - bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } - - uint32_t GetVersion() {return version_;} - // For sorting - bool operator<(const DynamicImage &inInfo) { - return GetLoadAddress() < inInfo.GetLoadAddress(); - } - - // Sanity checking - bool IsValid() {return GetVMSize() != 0;} - - private: - DynamicImage(const DynamicImage &); - DynamicImage &operator=(const DynamicImage &); - - friend class DynamicImages; - template - friend bool FindTextSection(DynamicImage& image); - template - friend uint32_t GetFileTypeFromHeader(DynamicImage& image); - - // Initializes vmaddr_, vmsize_, and slide_ - void CalculateMemoryAndVersionInfo(); - - const vector header_; // our local copy of the header - size_t header_size_; // mach_header plus load commands - uint64_t load_address_; // base address image is mapped into - mach_vm_address_t vmaddr_; - mach_vm_size_t vmsize_; - ptrdiff_t slide_; - uint32_t version_; // Dylib version - string file_path_; // path dyld used to load the image - uintptr_t file_mod_date_; // time_t of image file - - mach_port_t task_; - cpu_type_t cpu_type_; // CPU type of task_ -}; - -//============================================================================== -// DynamicImageRef is just a simple wrapper for a pointer to -// DynamicImage. The reason we use it instead of a simple typedef is so -// that we can use stl::sort() on a vector of DynamicImageRefs -// and simple class pointers can't implement operator<(). -// -class DynamicImageRef { - public: - explicit DynamicImageRef(DynamicImage *inP) : p(inP) {} - // The copy constructor is required by STL - DynamicImageRef(const DynamicImageRef &inRef) : p(inRef.p) {} - - bool operator<(const DynamicImageRef &inRef) const { - return (*const_cast(this)->p) - < (*const_cast(inRef).p); - } - - bool operator==(const DynamicImageRef &inInfo) const { - return (*const_cast(this)->p).GetLoadAddress() == - (*const_cast(inInfo)).GetLoadAddress(); - } - - // Be just like DynamicImage* - DynamicImage *operator->() {return p;} - operator DynamicImage*() {return p;} - - private: - DynamicImage *p; -}; - -// Helper function to deal with 32-bit/64-bit Mach-O differences. -class DynamicImages; -template -void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); - -//============================================================================== -// An object of type DynamicImages may be created to allow introspection of -// an arbitrary task's dynamically loaded mach-o binaries. This makes the -// assumption that the current task has send rights to the target task. -class DynamicImages { - public: - explicit DynamicImages(mach_port_t task); - - ~DynamicImages() { - for (int i = 0; i < GetImageCount(); ++i) { - delete image_list_[i]; - } - } - - // Returns the number of dynamically loaded mach-o images. - int GetImageCount() const {return static_cast(image_list_.size());} - - // Returns an individual image. - DynamicImage *GetImage(int i) { - if (i < (int)image_list_.size()) { - return image_list_[i]; - } - return NULL; - } - - // Returns the image corresponding to the main executable. - DynamicImage *GetExecutableImage(); - int GetExecutableImageIndex(); - - // Returns the task which we're looking at. - mach_port_t GetTask() const {return task_;} - - // CPU type of the task - cpu_type_t GetCPUType() {return cpu_type_;} - - // Return true if the task is a 64-bit architecture. - bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } - - // Determine the CPU type of the task being dumped. - static cpu_type_t DetermineTaskCPUType(task_t task); - - // Get the native CPU type of this task. - static cpu_type_t GetNativeCPUType() { -#if defined(__i386__) - return CPU_TYPE_I386; -#elif defined(__x86_64__) - return CPU_TYPE_X86_64; -#elif defined(__ppc__) - return CPU_TYPE_POWERPC; -#elif defined(__ppc64__) - return CPU_TYPE_POWERPC64; -#else -#error "GetNativeCPUType not implemented for this architecture" -#endif - } - - private: - template - friend void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); - - bool IsOurTask() {return task_ == mach_task_self();} - - // Initialization - void ReadImageInfoForTask(); - uint64_t GetDyldAllImageInfosPointer(); - - mach_port_t task_; - cpu_type_t cpu_type_; // CPU type of task_ - vector image_list_; -}; - -// Fill bytes with the contents of memory at a particular -// location in another task. -kern_return_t ReadTaskMemory(task_port_t target_task, - const uint64_t address, - size_t length, - vector &bytes); - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.cc deleted file mode 100644 index a6786fa1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.cc +++ /dev/null @@ -1,813 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "client/mac/handler/exception_handler.h" -#include "client/mac/handler/minidump_generator.h" -#include "common/mac/macho_utilities.h" -#include "common/mac/scoped_task_suspend-inl.h" - -#ifndef USE_PROTECTED_ALLOCATIONS -#define USE_PROTECTED_ALLOCATIONS 0 -#endif - -// If USE_PROTECTED_ALLOCATIONS is activated then the -// gBreakpadAllocator needs to be setup in other code -// ahead of time. Please see ProtectedMemoryAllocator.h -// for more details. -#if USE_PROTECTED_ALLOCATIONS - #include "protected_memory_allocator.h" - extern ProtectedMemoryAllocator *gBreakpadAllocator; -#endif - - -namespace google_breakpad { - -using std::map; - -// These structures and techniques are illustrated in -// Mac OS X Internals, Amit Singh, ch 9.7 -struct ExceptionMessage { - mach_msg_header_t header; - mach_msg_body_t body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - NDR_record_t ndr; - exception_type_t exception; - mach_msg_type_number_t code_count; - integer_t code[EXCEPTION_CODE_MAX]; - char padding[512]; -}; - -struct ExceptionParameters { - ExceptionParameters() : count(0) {} - mach_msg_type_number_t count; - exception_mask_t masks[EXC_TYPES_COUNT]; - mach_port_t ports[EXC_TYPES_COUNT]; - exception_behavior_t behaviors[EXC_TYPES_COUNT]; - thread_state_flavor_t flavors[EXC_TYPES_COUNT]; -}; - -struct ExceptionReplyMessage { - mach_msg_header_t header; - NDR_record_t ndr; - kern_return_t return_code; -}; - -// Only catch these three exceptions. The other ones are nebulously defined -// and may result in treating a non-fatal exception as fatal. -exception_mask_t s_exception_mask = EXC_MASK_BAD_ACCESS | -EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | EXC_MASK_BREAKPOINT; - -extern "C" -{ - // Forward declarations for functions that need "C" style compilation - boolean_t exc_server(mach_msg_header_t *request, - mach_msg_header_t *reply); - - // This symbol must be visible to dlsym() - see - // http://code.google.com/p/google-breakpad/issues/detail?id=345 for details. - kern_return_t catch_exception_raise(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) - __attribute__((visibility("default"))); - - kern_return_t ForwardException(mach_port_t task, - mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); - - kern_return_t exception_raise(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t exception_code_count); - - kern_return_t - exception_raise_state(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t code_count, - thread_state_flavor_t *target_flavor, - thread_state_t in_thread_state, - mach_msg_type_number_t in_thread_state_count, - thread_state_t out_thread_state, - mach_msg_type_number_t *out_thread_state_count); - - kern_return_t - exception_raise_state_identity(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t exception_code_count, - thread_state_flavor_t *target_flavor, - thread_state_t in_thread_state, - mach_msg_type_number_t in_thread_state_count, - thread_state_t out_thread_state, - mach_msg_type_number_t *out_thread_state_count); - - kern_return_t breakpad_exception_raise_state(mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ); - - kern_return_t breakpad_exception_raise_state_identity(mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ); - - kern_return_t breakpad_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); -} - - - -kern_return_t breakpad_exception_raise_state(mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ) -{ - return KERN_SUCCESS; -} - -kern_return_t breakpad_exception_raise_state_identity(mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ) -{ - return KERN_SUCCESS; -} - -kern_return_t breakpad_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - - if (task != mach_task_self()) { - return KERN_FAILURE; - } - return ForwardException(task, failed_thread, exception, code, code_count); -} - - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler, - const char *port_name) - : dump_path_(), - filter_(filter), - callback_(callback), - callback_context_(callback_context), - directCallback_(NULL), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - // This will update to the ID and C-string pointers - set_dump_path(dump_path); - MinidumpGenerator::GatherSystemInformation(); - if (port_name) - crash_generation_client_.reset(new CrashGenerationClient(port_name)); - Setup(install_handler); -} - -// special constructor if we want to bypass minidump writing and -// simply get a callback with the exception information -ExceptionHandler::ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler) - : dump_path_(), - filter_(NULL), - callback_(NULL), - callback_context_(callback_context), - directCallback_(callback), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - MinidumpGenerator::GatherSystemInformation(); - Setup(install_handler); -} - -ExceptionHandler::~ExceptionHandler() { - Teardown(); -} - -bool ExceptionHandler::WriteMinidump(bool write_exception_stream) { - // If we're currently writing, just return - if (use_minidump_write_mutex_) - return false; - - use_minidump_write_mutex_ = true; - last_minidump_write_result_ = false; - - // Lock the mutex. Since we just created it, this will return immediately. - if (pthread_mutex_lock(&minidump_write_mutex_) == 0) { - // Send an empty message to the handle port so that a minidump will - // be written - SendMessageToHandlerThread(write_exception_stream ? - kWriteDumpWithExceptionMessage : - kWriteDumpMessage); - - // Wait for the minidump writer to complete its writing. It will unlock - // the mutex when completed - pthread_mutex_lock(&minidump_write_mutex_); - } - - use_minidump_write_mutex_ = false; - UpdateNextID(); - return last_minidump_write_result_; -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - bool write_exception_stream, - MinidumpCallback callback, - void *callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, false, - NULL); - return handler.WriteMinidump(write_exception_stream); -} - -// static -bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child, - mach_port_t child_blamed_thread, - const string &dump_path, - MinidumpCallback callback, - void *callback_context) { - ScopedTaskSuspend suspend(child); - - MinidumpGenerator generator(child, MACH_PORT_NULL); - string dump_id; - string dump_filename = generator.UniqueNameInDirectory(dump_path, &dump_id); - - generator.SetExceptionInformation(EXC_BREAKPOINT, -#if defined (__i386__) || defined(__x86_64__) - EXC_I386_BPT, -#elif defined (__ppc__) || defined (__ppc64__) - EXC_PPC_BREAKPOINT, -#else -#error architecture not supported -#endif - 0, - child_blamed_thread); - bool result = generator.Write(dump_filename.c_str()); - - if (callback) { - return callback(dump_path.c_str(), dump_id.c_str(), - callback_context, result); - } - return result; -} - -bool ExceptionHandler::WriteMinidumpWithException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t thread_name, - bool exit_after_write) { - bool result = false; - - if (directCallback_) { - if (directCallback_(callback_context_, - exception_type, - exception_code, - exception_subcode, - thread_name) ) { - if (exit_after_write) - _exit(exception_type); - } - } else if (IsOutOfProcess()) { - if (exception_type && exception_code) { - // If this is a real exception, give the filter (if any) a chance to - // decide if this should be sent. - if (filter_ && !filter_(callback_context_)) - return false; - return crash_generation_client_->RequestDumpForException( - exception_type, - exception_code, - exception_subcode, - thread_name); - } - } else { - string minidump_id; - - // Putting the MinidumpGenerator in its own context will ensure that the - // destructor is executed, closing the newly created minidump file. - if (!dump_path_.empty()) { - MinidumpGenerator md; - if (exception_type && exception_code) { - // If this is a real exception, give the filter (if any) a chance to - // decide if this should be sent. - if (filter_ && !filter_(callback_context_)) - return false; - - md.SetExceptionInformation(exception_type, exception_code, - exception_subcode, thread_name); - } - - result = md.Write(next_minidump_path_c_); - } - - // Call user specified callback (if any) - if (callback_) { - // If the user callback returned true and we're handling an exception - // (rather than just writing out the file), then we should exit without - // forwarding the exception to the next handler. - if (callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - result)) { - if (exit_after_write) - _exit(exception_type); - } - } - } - - return result; -} - -kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - // At this time, we should have called Uninstall() on the exception handler - // so that the current exception ports are the ones that we should be - // forwarding to. - ExceptionParameters current; - - current.count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - kern_return_t result = task_get_exception_ports(current_task, - s_exception_mask, - current.masks, - ¤t.count, - current.ports, - current.behaviors, - current.flavors); - - // Find the first exception handler that matches the exception - unsigned int found; - for (found = 0; found < current.count; ++found) { - if (current.masks[found] & (1 << exception)) { - break; - } - } - - // Nothing to forward - if (found == current.count) { - fprintf(stderr, "** No previous ports for forwarding!! \n"); - exit(KERN_FAILURE); - } - - mach_port_t target_port = current.ports[found]; - exception_behavior_t target_behavior = current.behaviors[found]; - thread_state_flavor_t target_flavor = current.flavors[found]; - - mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX; - breakpad_thread_state_data_t thread_state; - switch (target_behavior) { - case EXCEPTION_DEFAULT: - result = exception_raise(target_port, failed_thread, task, exception, - code, code_count); - break; - - case EXCEPTION_STATE: - result = thread_get_state(failed_thread, target_flavor, thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = exception_raise_state(target_port, failed_thread, task, - exception, code, - code_count, &target_flavor, - thread_state, thread_state_count, - thread_state, &thread_state_count); - if (result == KERN_SUCCESS) - result = thread_set_state(failed_thread, target_flavor, thread_state, - thread_state_count); - break; - - case EXCEPTION_STATE_IDENTITY: - result = thread_get_state(failed_thread, target_flavor, thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = exception_raise_state_identity(target_port, failed_thread, - task, exception, code, - code_count, &target_flavor, - thread_state, - thread_state_count, - thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = thread_set_state(failed_thread, target_flavor, thread_state, - thread_state_count); - break; - - default: - fprintf(stderr, "** Unknown exception behavior\n"); - result = KERN_FAILURE; - break; - } - - return result; -} - -// Callback from exc_server() -kern_return_t catch_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - if (task != mach_task_self()) { - return KERN_FAILURE; - } - return ForwardException(task, failed_thread, exception, code, code_count); -} - -// static -void *ExceptionHandler::WaitForMessage(void *exception_handler_class) { - ExceptionHandler *self = - reinterpret_cast(exception_handler_class); - ExceptionMessage receive; - - // Wait for the exception info - while (1) { - receive.header.msgh_local_port = self->handler_port_; - receive.header.msgh_size = static_cast(sizeof(receive)); - kern_return_t result = mach_msg(&(receive.header), - MACH_RCV_MSG | MACH_RCV_LARGE, 0, - receive.header.msgh_size, - self->handler_port_, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - - if (result == KERN_SUCCESS) { - // Uninstall our handler so that we don't get in a loop if the process of - // writing out a minidump causes an exception. However, if the exception - // was caused by a fork'd process, don't uninstall things - - // If the actual exception code is zero, then we're calling this handler - // in a way that indicates that we want to either exit this thread or - // generate a minidump - // - // While reporting, all threads (except this one) must be suspended - // to avoid misleading stacks. If appropriate they will be resumed - // afterwards. - if (!receive.exception) { - // Don't touch self, since this message could have been sent - // from its destructor. - if (receive.header.msgh_id == kShutdownMessage) - return NULL; - - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - mach_port_t thread = MACH_PORT_NULL; - int exception_type = 0; - int exception_code = 0; - if (receive.header.msgh_id == kWriteDumpWithExceptionMessage) { - thread = receive.thread.name; - exception_type = EXC_BREAKPOINT; -#if defined (__i386__) || defined(__x86_64__) - exception_code = EXC_I386_BPT; -#elif defined (__ppc__) || defined (__ppc64__) - exception_code = EXC_PPC_BREAKPOINT; -#else -#error architecture not supported -#endif - } - - // Write out the dump and save the result for later retrieval - self->last_minidump_write_result_ = - self->WriteMinidumpWithException(exception_type, exception_code, - 0, thread, - false); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - - self->ResumeThreads(); - - if (self->use_minidump_write_mutex_) - pthread_mutex_unlock(&self->minidump_write_mutex_); - } else { - // When forking a child process with the exception handler installed, - // if the child crashes, it will send the exception back to the parent - // process. The check for task == self_task() ensures that only - // exceptions that occur in the parent process are caught and - // processed. If the exception was not caused by this task, we - // still need to call into the exception server and have it return - // KERN_FAILURE (see breakpad_exception_raise) in order for the kernel - // to move onto the host exception handler for the child task - if (receive.task.name == mach_task_self()) { - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - int subcode = 0; - if (receive.exception == EXC_BAD_ACCESS && receive.code_count > 1) - subcode = receive.code[1]; - - // Generate the minidump with the exception data. - self->WriteMinidumpWithException(receive.exception, receive.code[0], - subcode, receive.thread.name, true); - - self->UninstallHandler(true); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - } - // Pass along the exception to the server, which will setup the - // message and call breakpad_exception_raise() and put the return - // code into the reply. - ExceptionReplyMessage reply; - if (!exc_server(&receive.header, &reply.header)) - exit(1); - - // Send a reply and exit - result = mach_msg(&(reply.header), MACH_SEND_MSG, - reply.header.msgh_size, 0, MACH_PORT_NULL, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - } - } - } - - return NULL; -} - -bool ExceptionHandler::InstallHandler() { - try { -#if USE_PROTECTED_ALLOCATIONS - previous_ = new (gBreakpadAllocator->Allocate(sizeof(ExceptionParameters)) ) - ExceptionParameters(); -#else - previous_ = new ExceptionParameters(); -#endif - - } - catch (std::bad_alloc) { - return false; - } - - // Save the current exception ports so that we can forward to them - previous_->count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - kern_return_t result = task_get_exception_ports(current_task, - s_exception_mask, - previous_->masks, - &previous_->count, - previous_->ports, - previous_->behaviors, - previous_->flavors); - - // Setup the exception ports on this task - if (result == KERN_SUCCESS) - result = task_set_exception_ports(current_task, s_exception_mask, - handler_port_, EXCEPTION_DEFAULT, - THREAD_STATE_NONE); - - installed_exception_handler_ = (result == KERN_SUCCESS); - - return installed_exception_handler_; -} - -bool ExceptionHandler::UninstallHandler(bool in_exception) { - kern_return_t result = KERN_SUCCESS; - - if (installed_exception_handler_) { - mach_port_t current_task = mach_task_self(); - - // Restore the previous ports - for (unsigned int i = 0; i < previous_->count; ++i) { - result = task_set_exception_ports(current_task, previous_->masks[i], - previous_->ports[i], - previous_->behaviors[i], - previous_->flavors[i]); - if (result != KERN_SUCCESS) - return false; - } - - // this delete should NOT happen if an exception just occurred! - if (!in_exception) { -#if USE_PROTECTED_ALLOCATIONS - previous_->~ExceptionParameters(); -#else - delete previous_; -#endif - } - - previous_ = NULL; - installed_exception_handler_ = false; - } - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::Setup(bool install_handler) { - if (pthread_mutex_init(&minidump_write_mutex_, NULL)) - return false; - - // Create a receive right - mach_port_t current_task = mach_task_self(); - kern_return_t result = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &handler_port_); - // Add send right - if (result == KERN_SUCCESS) - result = mach_port_insert_right(current_task, handler_port_, handler_port_, - MACH_MSG_TYPE_MAKE_SEND); - - if (install_handler && result == KERN_SUCCESS) - if (!InstallHandler()) - return false; - - if (result == KERN_SUCCESS) { - // Install the handler in its own thread, detached as we won't be joining. - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - int thread_create_result = pthread_create(&handler_thread_, &attr, - &WaitForMessage, this); - pthread_attr_destroy(&attr); - result = thread_create_result ? KERN_FAILURE : KERN_SUCCESS; - } - - return result == KERN_SUCCESS ? true : false; -} - -bool ExceptionHandler::Teardown() { - kern_return_t result = KERN_SUCCESS; - is_in_teardown_ = true; - - if (!UninstallHandler(false)) - return false; - - // Send an empty message so that the handler_thread exits - if (SendMessageToHandlerThread(kShutdownMessage)) { - mach_port_t current_task = mach_task_self(); - result = mach_port_deallocate(current_task, handler_port_); - if (result != KERN_SUCCESS) - return false; - } else { - return false; - } - - handler_thread_ = NULL; - handler_port_ = NULL; - pthread_mutex_destroy(&minidump_write_mutex_); - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::SendMessageToHandlerThread( - HandlerThreadMessage message_id) { - ExceptionMessage msg; - memset(&msg, 0, sizeof(msg)); - msg.header.msgh_id = message_id; - if (message_id == kWriteDumpMessage || - message_id == kWriteDumpWithExceptionMessage) { - // Include this thread's port. - msg.thread.name = mach_thread_self(); - msg.thread.disposition = MACH_MSG_TYPE_PORT_SEND; - msg.thread.type = MACH_MSG_PORT_DESCRIPTOR; - } - msg.header.msgh_size = sizeof(msg) - sizeof(msg.padding); - msg.header.msgh_remote_port = handler_port_; - msg.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, - MACH_MSG_TYPE_MAKE_SEND_ONCE); - kern_return_t result = mach_msg(&(msg.header), - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - msg.header.msgh_size, 0, 0, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - return result == KERN_SUCCESS; -} - -void ExceptionHandler::UpdateNextID() { - next_minidump_path_ = - (MinidumpGenerator::UniqueNameInDirectory(dump_path_, &next_minidump_id_)); - - next_minidump_path_c_ = next_minidump_path_.c_str(); - next_minidump_id_c_ = next_minidump_id_.c_str(); -} - -bool ExceptionHandler::SuspendThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // suspend all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_suspend(threads_for_task[i])) - return false; - } - } - - return true; -} - -bool ExceptionHandler::ResumeThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // resume all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_resume(threads_for_task[i])) - return false; - } - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.h deleted file mode 100644 index 172dc358..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/exception_handler.h +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exception_handler.h: MacOS exception handler -// This class can install a Mach exception port handler to trap most common -// programming errors. If an exception occurs, a minidump file will be -// generated which contains detailed information about the process and the -// exception. - -#ifndef CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ - -#include - -#include - -#include "client/mac/crash_generation/crash_generation_client.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -using std::string; - -struct ExceptionParameters; - -enum HandlerThreadMessage { - // Message ID telling the handler thread to write a dump. - kWriteDumpMessage = 0, - // Message ID telling the handler thread to write a dump and include - // an exception stream. - kWriteDumpWithExceptionMessage = 1, - // Message ID telling the handler thread to quit. - kShutdownMessage = 2 -}; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // |minidump_id| is a unique id for the dump, so the minidump - // file is /.dmp. - // |context| is the value passed into the constructor. - // |succeeded| indicates whether a minidump file was successfully written. - // Return true if the exception was fully handled and breakpad should exit. - // Return false to allow any other exception handlers to process the - // exception. - typedef bool (*MinidumpCallback)(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded); - - // A callback function which will be called directly if an exception occurs. - // This bypasses the minidump file writing and simply gives the client - // the exception information. - typedef bool (*DirectCallback)( void *context, - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t thread_name); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Minidump files will be written to dump_path, and the optional callback - // is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - // If port_name is non-NULL, attempt to perform out-of-process dump generation - // If port_name is NULL, in-process dump generation will be used. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, bool install_handler, - const char *port_name); - - // A special constructor if we want to bypass minidump writing and - // simply get a callback with the exception information. - ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler); - - ~ExceptionHandler(); - - // Get and set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump() { - return WriteMinidump(false); - } - - bool WriteMinidump(bool write_exception_stream); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, MinidumpCallback callback, - void *callback_context) { - return WriteMinidump(dump_path, false, callback, callback_context); - } - - static bool WriteMinidump(const string &dump_path, - bool write_exception_stream, - MinidumpCallback callback, - void *callback_context); - - // Write a minidump of child immediately. This can be used to capture - // the execution state of a child process independently of a crash. - static bool WriteMinidumpForChild(mach_port_t child, - mach_port_t child_blamed_thread, - const std::string &dump_path, - MinidumpCallback callback, - void *callback_context); - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { - return crash_generation_client_.get() != NULL; - } - - private: - // Install the mach exception handler - bool InstallHandler(); - - // Uninstall the mach exception handler (if any) - bool UninstallHandler(bool in_exception); - - // Setup the handler thread, and if |install_handler| is true, install the - // mach exception port handler - bool Setup(bool install_handler); - - // Uninstall the mach exception handler (if any) and terminate the helper - // thread - bool Teardown(); - - // Send a mach message to the exception handler. Return true on - // success, false otherwise. - bool SendMessageToHandlerThread(HandlerThreadMessage message_id); - - // All minidump writing goes through this one routine - bool WriteMinidumpWithException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t thread_name, - bool exit_after_write); - - // When installed, this static function will be call from a newly created - // pthread with |this| as the argument - static void *WaitForMessage(void *exception_handler_class); - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - // These functions will suspend/resume all threads except for the - // reporting thread - bool SuspendThreads(); - bool ResumeThreads(); - - // The destination directory for the minidump - string dump_path_; - - // The basename of the next minidump w/o extension - string next_minidump_id_; - - // The full path to the next minidump to be written, including extension - string next_minidump_path_; - - // Pointers to the UTF-8 versions of above - const char *dump_path_c_; - const char *next_minidump_id_c_; - const char *next_minidump_path_c_; - - // The callback function and pointer to be passed back after the minidump - // has been written - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The callback function to be passed back when we don't want a minidump - // file to be written - DirectCallback directCallback_; - - // The thread that is created for the handler - pthread_t handler_thread_; - - // The port that is waiting on an exception message to be sent, if the - // handler is installed - mach_port_t handler_port_; - - // These variables save the previous exception handler's data so that it - // can be re-installed when this handler is uninstalled - ExceptionParameters *previous_; - - // True, if we've installed the exception handler - bool installed_exception_handler_; - - // True, if we're in the process of uninstalling the exception handler and - // the thread. - bool is_in_teardown_; - - // Save the last result of the last minidump - bool last_minidump_write_result_; - - // A mutex for use when writing out a minidump that was requested on a - // thread other than the exception handler. - pthread_mutex_t minidump_write_mutex_; - - // True, if we're using the mutext to indicate when mindump writing occurs - bool use_minidump_write_mutex_; - - // Client for out-of-process dump generation. - scoped_ptr crash_generation_client_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.cc deleted file mode 100644 index 8d670429..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.cc +++ /dev/null @@ -1,1290 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "client/mac/handler/minidump_generator.h" -#include "client/minidump_file_writer-inl.h" -#include "common/mac/file_id.h" -#include "common/mac/string_utilities.h" - -using MacStringUtils::ConvertToString; -using MacStringUtils::IntegerValueAtIndex; - -namespace google_breakpad { - -#if __LP64__ -#define LC_SEGMENT_ARCH LC_SEGMENT_64 -#else -#define LC_SEGMENT_ARCH LC_SEGMENT -#endif - -// constructor when generating from within the crashed process -MinidumpGenerator::MinidumpGenerator() - : writer_(), - exception_type_(0), - exception_code_(0), - exception_subcode_(0), - exception_thread_(0), - crashing_task_(mach_task_self()), - handler_thread_(mach_thread_self()), - cpu_type_(DynamicImages::GetNativeCPUType()), - dynamic_images_(NULL), - memory_blocks_(&allocator_) { - GatherSystemInformation(); -} - -// constructor when generating from a different process than the -// crashed process -MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, - mach_port_t handler_thread) - : writer_(), - exception_type_(0), - exception_code_(0), - exception_subcode_(0), - exception_thread_(0), - crashing_task_(crashing_task), - handler_thread_(handler_thread), - cpu_type_(DynamicImages::GetNativeCPUType()), - dynamic_images_(NULL), - memory_blocks_(&allocator_) { - if (crashing_task != mach_task_self()) { - dynamic_images_ = new DynamicImages(crashing_task_); - cpu_type_ = dynamic_images_->GetCPUType(); - } else { - dynamic_images_ = NULL; - cpu_type_ = DynamicImages::GetNativeCPUType(); - } - - GatherSystemInformation(); -} - -MinidumpGenerator::~MinidumpGenerator() { - delete dynamic_images_; -} - -char MinidumpGenerator::build_string_[16]; -int MinidumpGenerator::os_major_version_ = 0; -int MinidumpGenerator::os_minor_version_ = 0; -int MinidumpGenerator::os_build_number_ = 0; - -// static -void MinidumpGenerator::GatherSystemInformation() { - // If this is non-zero, then we've already gathered the information - if (os_major_version_) - return; - - // This code extracts the version and build information from the OS - CFStringRef vers_path = - CFSTR("/System/Library/CoreServices/SystemVersion.plist"); - CFURLRef sys_vers = - CFURLCreateWithFileSystemPath(NULL, - vers_path, - kCFURLPOSIXPathStyle, - false); - CFDataRef data; - SInt32 error; - CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL, - &error); - - if (!data) - return; - - CFDictionaryRef list = static_cast - (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, - NULL)); - if (!list) - return; - - CFStringRef build_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); - CFStringRef product_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); - string build_str = ConvertToString(build_version); - string product_str = ConvertToString(product_version); - - CFRelease(list); - CFRelease(sys_vers); - CFRelease(data); - - strlcpy(build_string_, build_str.c_str(), sizeof(build_string_)); - - // Parse the string that looks like "10.4.8" - os_major_version_ = IntegerValueAtIndex(product_str, 0); - os_minor_version_ = IntegerValueAtIndex(product_str, 1); - os_build_number_ = IntegerValueAtIndex(product_str, 2); -} - -string MinidumpGenerator::UniqueNameInDirectory(const string &dir, - string *unique_name) { - CFUUIDRef uuid = CFUUIDCreate(NULL); - CFStringRef uuid_cfstr = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - string file_name(ConvertToString(uuid_cfstr)); - CFRelease(uuid_cfstr); - string path(dir); - - // Ensure that the directory (if non-empty) has a trailing slash so that - // we can append the file name and have a valid pathname. - if (!dir.empty()) { - if (dir.at(dir.size() - 1) != '/') - path.append(1, '/'); - } - - path.append(file_name); - path.append(".dmp"); - - if (unique_name) - *unique_name = file_name; - - return path; -} - -bool MinidumpGenerator::Write(const char *path) { - WriteStreamFN writers[] = { - &MinidumpGenerator::WriteThreadListStream, - &MinidumpGenerator::WriteMemoryListStream, - &MinidumpGenerator::WriteSystemInfoStream, - &MinidumpGenerator::WriteModuleListStream, - &MinidumpGenerator::WriteMiscInfoStream, - &MinidumpGenerator::WriteBreakpadInfoStream, - // Exception stream needs to be the last entry in this array as it may - // be omitted in the case where the minidump is written without an - // exception. - &MinidumpGenerator::WriteExceptionStream, - }; - bool result = false; - - // If opening was successful, create the header, directory, and call each - // writer. The destructor for the TypedMDRVAs will cause the data to be - // flushed. The destructor for the MinidumpFileWriter will close the file. - if (writer_.Open(path)) { - TypedMDRVA header(&writer_); - TypedMDRVA dir(&writer_); - - if (!header.Allocate()) - return false; - - int writer_count = static_cast(sizeof(writers) / sizeof(writers[0])); - - // If we don't have exception information, don't write out the - // exception stream - if (!exception_thread_ && !exception_type_) - --writer_count; - - // Add space for all writers - if (!dir.AllocateArray(writer_count)) - return false; - - MDRawHeader *header_ptr = header.get(); - header_ptr->signature = MD_HEADER_SIGNATURE; - header_ptr->version = MD_HEADER_VERSION; - time(reinterpret_cast(&(header_ptr->time_date_stamp))); - header_ptr->stream_count = writer_count; - header_ptr->stream_directory_rva = dir.position(); - - MDRawDirectory local_dir; - result = true; - for (int i = 0; (result) && (i < writer_count); ++i) { - result = (this->*writers[i])(&local_dir); - - if (result) - dir.CopyIndex(i, &local_dir); - } - } - return result; -} - -size_t MinidumpGenerator::CalculateStackSize(mach_vm_address_t start_addr) { - mach_vm_address_t stack_region_base = start_addr; - mach_vm_size_t stack_region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - if (start_addr == 0) { - return 0; - } - - kern_return_t result = - mach_vm_region_recurse(crashing_task_, &stack_region_base, - &stack_region_size, &nesting_level, - region_info, - &info_count); - - if (start_addr < stack_region_base) { - // probably stack corruption, since mach_vm_region had to go - // higher in the process address space to find a valid region. - return 0; - } - - if (((cpu_type_ & CPU_ARCH_ABI64) && - (stack_region_base + stack_region_size) == TOP_OF_THREAD0_STACK_64BIT) || - (!(cpu_type_ & CPU_ARCH_ABI64) && - (stack_region_base + stack_region_size) == TOP_OF_THREAD0_STACK_32BIT)) { - // The stack for thread 0 needs to extend all the way to - // 0xc0000000 on 32 bit and 00007fff5fc00000 on 64bit. HOWEVER, - // for many processes, the stack is first created in one page - // below this, and is then later extended to a much larger size by - // creating a new VM region immediately below the initial page. - - // You can see this for yourself by running vmmap on a "hello, - // world" program - - // Because of the above, we'll add 4k to include the original - // stack frame page. - // This method of finding the stack region needs to be done in - // a better way; the breakpad issue 247 is tracking this. - stack_region_size += 0x1000; - } - - return result == KERN_SUCCESS ? - stack_region_base + stack_region_size - start_addr : 0; -} - -bool MinidumpGenerator::WriteStackFromStartAddress( - mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location) { - UntypedMDRVA memory(&writer_); - - bool result = false; - size_t size = CalculateStackSize(start_addr); - - if (size == 0) { - // In some situations the stack address for the thread can come back 0. - // In these cases we skip over the threads in question and stuff the - // stack with a clearly borked value. - start_addr = 0xDEADBEEF; - size = 16; - if (!memory.Allocate(size)) - return false; - - unsigned long long dummy_stack[2]; // Fill dummy stack with 16 bytes of - // junk. - dummy_stack[0] = 0xDEADBEEF; - dummy_stack[1] = 0xDEADBEEF; - - result = memory.Copy(dummy_stack, size); - } else { - - if (!memory.Allocate(size)) - return false; - - if (dynamic_images_) { - vector stack_memory; - if (ReadTaskMemory(crashing_task_, - start_addr, - size, - stack_memory) != KERN_SUCCESS) { - return false; - } - - result = memory.Copy(&stack_memory[0], size); - } else { - result = memory.Copy(reinterpret_cast(start_addr), size); - } - } - - stack_location->start_of_memory_range = start_addr; - stack_location->memory = memory.location(); - - return result; -} - -bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - switch (cpu_type_) { - case CPU_TYPE_POWERPC: - return WriteStackPPC(state, stack_location); - case CPU_TYPE_POWERPC64: - return WriteStackPPC64(state, stack_location); - case CPU_TYPE_I386: - return WriteStackX86(state, stack_location); - case CPU_TYPE_X86_64: - return WriteStackX86_64(state, stack_location); - default: - return false; - } -} - -bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - switch (cpu_type_) { - case CPU_TYPE_POWERPC: - return WriteContextPPC(state, register_location); - case CPU_TYPE_POWERPC64: - return WriteContextPPC64(state, register_location); - case CPU_TYPE_I386: - return WriteContextX86(state, register_location); - case CPU_TYPE_X86_64: - return WriteContextX86_64(state, register_location); - default: - return false; - } -} - -u_int64_t MinidumpGenerator::CurrentPCForStack( - breakpad_thread_state_data_t state) { - switch (cpu_type_) { - case CPU_TYPE_POWERPC: - return CurrentPCForStackPPC(state); - case CPU_TYPE_POWERPC64: - return CurrentPCForStackPPC64(state); - case CPU_TYPE_I386: - return CurrentPCForStackX86(state); - case CPU_TYPE_X86_64: - return CurrentPCForStackX86_64(state); - default: - assert("Unknown CPU type!"); - return 0; - } -} - -bool MinidumpGenerator::WriteStackPPC(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -bool MinidumpGenerator::WriteStackPPC64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStackPPC(breakpad_thread_state_data_t state) { - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, srr0); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStackPPC64(breakpad_thread_state_data_t state) { - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, srr0); -} - -bool MinidumpGenerator::WriteContextPPC(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextPPC *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_PPC_BASE; - -#define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) -#define AddGPR(a) context_ptr->gpr[a] = REGISTER_FROM_THREADSTATE(machine_state, r ## a) - - AddReg(srr0); - AddReg(cr); - AddReg(xer); - AddReg(ctr); - AddReg(lr); - AddReg(vrsave); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); - AddGPR(29); - AddGPR(30); - AddGPR(31); - AddReg(mq); -#undef AddReg -#undef AddGPR - - return true; -} - -bool MinidumpGenerator::WriteContextPPC64( - breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextPPC64 *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_PPC_BASE; - -#define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) -#define AddGPR(a) context_ptr->gpr[a] = REGISTER_FROM_THREADSTATE(machine_state, r ## a) - - AddReg(srr0); - AddReg(cr); - AddReg(xer); - AddReg(ctr); - AddReg(lr); - AddReg(vrsave); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); - AddGPR(29); - AddGPR(30); - AddGPR(31); -#undef AddReg -#undef AddGPR - - return true; -} - -bool MinidumpGenerator::WriteStackX86(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, esp); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -bool MinidumpGenerator::WriteStackX86_64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, rsp); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStackX86(breakpad_thread_state_data_t state) { - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, eip); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStackX86_64(breakpad_thread_state_data_t state) { - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, rip); -} - -bool MinidumpGenerator::WriteContextX86(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextX86 *context_ptr = context.get(); - -#define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) - - context_ptr->context_flags = MD_CONTEXT_X86; - AddReg(eax); - AddReg(ebx); - AddReg(ecx); - AddReg(edx); - AddReg(esi); - AddReg(edi); - AddReg(ebp); - AddReg(esp); - - AddReg(cs); - AddReg(ds); - AddReg(ss); - AddReg(es); - AddReg(fs); - AddReg(gs); - AddReg(eflags); - - AddReg(eip); -#undef AddReg(a) - - return true; -} - -bool MinidumpGenerator::WriteContextX86_64( - breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextAMD64 *context_ptr = context.get(); - -#define AddReg(a) context_ptr->a = REGISTER_FROM_THREADSTATE(machine_state, a) - - context_ptr->context_flags = MD_CONTEXT_AMD64; - AddReg(rax); - AddReg(rbx); - AddReg(rcx); - AddReg(rdx); - AddReg(rdi); - AddReg(rsi); - AddReg(rbp); - AddReg(rsp); - AddReg(r8); - AddReg(r9); - AddReg(r10); - AddReg(r11); - AddReg(r12); - AddReg(r13); - AddReg(r14); - AddReg(r15); - AddReg(rip); - // according to AMD's software developer guide, bits above 18 are - // not used in the flags register. Since the minidump format - // specifies 32 bits for the flags register, we can truncate safely - // with no loss. - context_ptr->eflags = static_cast(REGISTER_FROM_THREADSTATE(machine_state, rflags)); - AddReg(cs); - AddReg(fs); - AddReg(gs); -#undef AddReg(a) - - return true; -} - -bool MinidumpGenerator::GetThreadState(thread_act_t target_thread, - thread_state_t state, - mach_msg_type_number_t *count) { - thread_state_flavor_t flavor; - switch (cpu_type_) { - case CPU_TYPE_POWERPC: - flavor = PPC_THREAD_STATE; - break; - case CPU_TYPE_POWERPC64: - flavor = PPC_THREAD_STATE64; - break; - case CPU_TYPE_I386: - flavor = i386_THREAD_STATE; - break; - case CPU_TYPE_X86_64: - flavor = x86_THREAD_STATE64; - break; - default: - return false; - } - return thread_get_state(target_thread, flavor, - state, count) == KERN_SUCCESS; -} - -bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id, - MDRawThread *thread) { - breakpad_thread_state_data_t state; - mach_msg_type_number_t state_count - = static_cast(sizeof(state)); - - if (GetThreadState(thread_id, state, &state_count)) { - if (!WriteStack(state, &thread->stack)) - return false; - - memory_blocks_.push_back(thread->stack); - - if (!WriteContext(state, &thread->thread_context)) - return false; - - thread->thread_id = thread_id; - } else { - return false; - } - - return true; -} - -bool MinidumpGenerator::WriteThreadListStream( - MDRawDirectory *thread_list_stream) { - TypedMDRVA list(&writer_); - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - int non_generator_thread_count; - - if (task_threads(crashing_task_, &threads_for_task, &thread_count)) - return false; - - // Don't include the generator thread - if (handler_thread_ != MACH_PORT_NULL) - non_generator_thread_count = thread_count - 1; - else - non_generator_thread_count = thread_count; - if (!list.AllocateObjectAndArray(non_generator_thread_count, - sizeof(MDRawThread))) - return false; - - thread_list_stream->stream_type = MD_THREAD_LIST_STREAM; - thread_list_stream->location = list.location(); - - list.get()->number_of_threads = non_generator_thread_count; - - MDRawThread thread; - int thread_idx = 0; - - for (unsigned int i = 0; i < thread_count; ++i) { - memset(&thread, 0, sizeof(MDRawThread)); - - if (threads_for_task[i] != handler_thread_) { - if (!WriteThreadStream(threads_for_task[i], &thread)) - return false; - - list.CopyIndexAfterObject(thread_idx++, &thread, sizeof(MDRawThread)); - } - } - - return true; -} - -bool MinidumpGenerator::WriteMemoryListStream( - MDRawDirectory *memory_list_stream) { - TypedMDRVA list(&writer_); - - // If the dump has an exception, include some memory around the - // instruction pointer. - const size_t kIPMemorySize = 256; // bytes - bool have_ip_memory = false; - MDMemoryDescriptor ip_memory_d; - if (exception_thread_ && exception_type_) { - breakpad_thread_state_data_t state; - mach_msg_type_number_t stateCount - = static_cast(sizeof(state)); - - if (thread_get_state(exception_thread_, - BREAKPAD_MACHINE_THREAD_STATE, - state, - &stateCount) == KERN_SUCCESS) { - u_int64_t ip = CurrentPCForStack(state); - // Bound it to the upper and lower bounds of the region - // it's contained within. If it's not in a known memory region, - // don't bother trying to write it. - mach_vm_address_t addr = ip; - mach_vm_size_t size; - natural_t nesting_level = 0; - vm_region_submap_info_64 info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - kern_return_t ret = - mach_vm_region_recurse(crashing_task_, - &addr, - &size, - &nesting_level, - (vm_region_recurse_info_t)&info, - &info_count); - if (ret == KERN_SUCCESS && ip >= addr && ip < (addr + size)) { - // Try to get 128 bytes before and after the IP, but - // settle for whatever's available. - ip_memory_d.start_of_memory_range = - std::max(uintptr_t(addr), - uintptr_t(ip - (kIPMemorySize / 2))); - uintptr_t end_of_range = - std::min(uintptr_t(ip + (kIPMemorySize / 2)), - uintptr_t(addr + size)); - ip_memory_d.memory.data_size = - end_of_range - ip_memory_d.start_of_memory_range; - have_ip_memory = true; - // This needs to get appended to the list even though - // the memory bytes aren't filled in yet so the entire - // list can be written first. The memory bytes will get filled - // in after the memory list is written. - memory_blocks_.push_back(ip_memory_d); - } - } - } - - // Now fill in the memory list and write it. - unsigned memory_count = memory_blocks_.size(); - if (!list.AllocateObjectAndArray(memory_count, - sizeof(MDMemoryDescriptor))) - return false; - - memory_list_stream->stream_type = MD_MEMORY_LIST_STREAM; - memory_list_stream->location = list.location(); - - list.get()->number_of_memory_ranges = memory_count; - - unsigned int i; - for (i = 0; i < memory_count; ++i) { - list.CopyIndexAfterObject(i, &memory_blocks_[i], - sizeof(MDMemoryDescriptor)); - } - - if (have_ip_memory) { - // Now read the memory around the instruction pointer. - UntypedMDRVA ip_memory(&writer_); - if (!ip_memory.Allocate(ip_memory_d.memory.data_size)) - return false; - - if (dynamic_images_) { - // Out-of-process. - vector memory; - if (ReadTaskMemory(crashing_task_, - ip_memory_d.start_of_memory_range, - ip_memory_d.memory.data_size, - memory) != KERN_SUCCESS) { - return false; - } - - ip_memory.Copy(&memory[0], ip_memory_d.memory.data_size); - } else { - // In-process, just copy from local memory. - ip_memory.Copy( - reinterpret_cast(ip_memory_d.start_of_memory_range), - ip_memory_d.memory.data_size); - } - - ip_memory_d.memory = ip_memory.location(); - // Write this again now that the data location is filled in. - list.CopyIndexAfterObject(i - 1, &ip_memory_d, - sizeof(MDMemoryDescriptor)); - } - - return true; -} - -bool -MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) { - TypedMDRVA exception(&writer_); - - if (!exception.Allocate()) - return false; - - exception_stream->stream_type = MD_EXCEPTION_STREAM; - exception_stream->location = exception.location(); - MDRawExceptionStream *exception_ptr = exception.get(); - exception_ptr->thread_id = exception_thread_; - - // This naming is confusing, but it is the proper translation from - // mach naming to minidump naming. - exception_ptr->exception_record.exception_code = exception_type_; - exception_ptr->exception_record.exception_flags = exception_code_; - - breakpad_thread_state_data_t state; - mach_msg_type_number_t state_count - = static_cast(sizeof(state)); - - if (!GetThreadState(exception_thread_, state, &state_count)) - return false; - - if (!WriteContext(state, &exception_ptr->thread_context)) - return false; - - if (exception_type_ == EXC_BAD_ACCESS) - exception_ptr->exception_record.exception_address = exception_subcode_; - else - exception_ptr->exception_record.exception_address = CurrentPCForStack(state); - - return true; -} - -bool MinidumpGenerator::WriteSystemInfoStream( - MDRawDirectory *system_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - system_info_stream->stream_type = MD_SYSTEM_INFO_STREAM; - system_info_stream->location = info.location(); - - // CPU Information - uint32_t number_of_processors; - size_t len = sizeof(number_of_processors); - sysctlbyname("hw.ncpu", &number_of_processors, &len, NULL, 0); - MDRawSystemInfo *info_ptr = info.get(); - - switch (cpu_type_) { - case CPU_TYPE_POWERPC: - case CPU_TYPE_POWERPC64: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_PPC; - break; - case CPU_TYPE_I386: - case CPU_TYPE_X86_64: - if (cpu_type_ == CPU_TYPE_I386) - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; - else - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_AMD64; -#ifdef __i386__ - // ebx is used for PIC code, so we need - // to preserve it. -#define cpuid(op,eax,ebx,ecx,edx) \ - asm ("pushl %%ebx \n\t" \ - "cpuid \n\t" \ - "movl %%ebx,%1 \n\t" \ - "popl %%ebx" \ - : "=a" (eax), \ - "=g" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "0" (op)) -#elif defined(__x86_64__) - -#define cpuid(op,eax,ebx,ecx,edx) \ - asm ("cpuid \n\t" \ - : "=a" (eax), \ - "=b" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "0" (op)) -#endif - -#if defined(__i386__) || defined(__x86_64__) - int unused, unused2; - // get vendor id - cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], - info_ptr->cpu.x86_cpu_info.vendor_id[2], - info_ptr->cpu.x86_cpu_info.vendor_id[1]); - // get version and feature info - cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, - info_ptr->cpu.x86_cpu_info.feature_information); - - // family - info_ptr->processor_level = - (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; - // 0xMMSS (Model, Stepping) - info_ptr->processor_revision = - (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | - ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4); - - // decode extended model info - if (info_ptr->processor_level == 0xF || - info_ptr->processor_level == 0x6) { - info_ptr->processor_revision |= - ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4); - } - - // decode extended family info - if (info_ptr->processor_level == 0xF) { - info_ptr->processor_level += - ((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20); - } - -#endif // __i386__ || __x86_64_ - break; - default: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - break; - } - - info_ptr->number_of_processors = number_of_processors; - info_ptr->platform_id = MD_OS_MAC_OS_X; - - MDLocationDescriptor build_string_loc; - - if (!writer_.WriteString(build_string_, 0, - &build_string_loc)) - return false; - - info_ptr->csd_version_rva = build_string_loc.rva; - info_ptr->major_version = os_major_version_; - info_ptr->minor_version = os_minor_version_; - info_ptr->build_number = os_build_number_; - - return true; -} - -bool MinidumpGenerator::WriteModuleStream(unsigned int index, - MDRawModule *module) { - if (dynamic_images_) { - // we're in a different process than the crashed process - DynamicImage *image = dynamic_images_->GetImage(index); - - if (!image) - return false; - - memset(module, 0, sizeof(MDRawModule)); - - MDLocationDescriptor string_location; - - string name = image->GetFilePath(); - if (!writer_.WriteString(name.c_str(), 0, &string_location)) - return false; - - module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); - module->size_of_image = static_cast(image->GetVMSize()); - module->module_name_rva = string_location.rva; - - // We'll skip the executable module, because they don't have - // LC_ID_DYLIB load commands, and the crash processing server gets - // version information from the Plist file, anyway. - if (index != (uint32_t)FindExecutableModule()) { - module->version_info.signature = MD_VSFIXEDFILEINFO_SIGNATURE; - module->version_info.struct_version |= MD_VSFIXEDFILEINFO_VERSION; - // Convert MAC dylib version format, which is a 32 bit number, to the - // format used by minidump. The mac format is <16 bits>.<8 bits>.<8 bits> - // so it fits nicely into the windows version with some massaging - // The mapping is: - // 1) upper 16 bits of MAC version go to lower 16 bits of product HI - // 2) Next most significant 8 bits go to upper 16 bits of product LO - // 3) Least significant 8 bits go to lower 16 bits of product LO - uint32_t modVersion = image->GetVersion(); - module->version_info.file_version_hi = 0; - module->version_info.file_version_hi = modVersion >> 16; - module->version_info.file_version_lo |= (modVersion & 0xff00) << 8; - module->version_info.file_version_lo |= (modVersion & 0xff); - } - - if (!WriteCVRecord(module, image->GetCPUType(), name.c_str())) { - return false; - } - } else { - // Getting module info in the crashed process - const breakpad_mach_header *header; - header = (breakpad_mach_header*)_dyld_get_image_header(index); - if (!header) - return false; - -#ifdef __LP64__ - assert(header->magic == MH_MAGIC_64); - - if(header->magic != MH_MAGIC_64) - return false; -#else - assert(header->magic == MH_MAGIC); - - if(header->magic != MH_MAGIC) - return false; -#endif - - int cpu_type = header->cputype; - unsigned long slide = _dyld_get_image_vmaddr_slide(index); - const char* name = _dyld_get_image_name(index); - const struct load_command *cmd = - reinterpret_cast(header + 1); - - memset(module, 0, sizeof(MDRawModule)); - - for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { - if (cmd->cmd == LC_SEGMENT_ARCH) { - - const breakpad_mach_segment_command *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - MDLocationDescriptor string_location; - - if (!writer_.WriteString(name, 0, &string_location)) - return false; - - module->base_of_image = seg->vmaddr + slide; - module->size_of_image = static_cast(seg->vmsize); - module->module_name_rva = string_location.rva; - - if (!WriteCVRecord(module, cpu_type, name)) - return false; - - return true; - } - } - - cmd = reinterpret_cast((char *)cmd + cmd->cmdsize); - } - } - - return true; -} - -int MinidumpGenerator::FindExecutableModule() { - if (dynamic_images_) { - int index = dynamic_images_->GetExecutableImageIndex(); - - if (index >= 0) { - return index; - } - } else { - int image_count = _dyld_image_count(); - const struct mach_header *header; - - for (int index = 0; index < image_count; ++index) { - header = _dyld_get_image_header(index); - - if (header->filetype == MH_EXECUTE) - return index; - } - } - - // failed - just use the first image - return 0; -} - -bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path) { - TypedMDRVA cv(&writer_); - - // Only return the last path component of the full module path - const char *module_name = strrchr(module_path, '/'); - - // Increment past the slash - if (module_name) - ++module_name; - else - module_name = ""; - - size_t module_name_length = strlen(module_name); - - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) - return false; - - if (!cv.CopyIndexAfterObject(0, module_name, module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - FileID file_id(module_path); - unsigned char identifier[16]; - - if (file_id.MachoIdentifier(cpu_type, identifier)) { - cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | - (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | - (uint32_t)identifier[3]; - cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; - cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - - return true; -} - -bool MinidumpGenerator::WriteModuleListStream( - MDRawDirectory *module_list_stream) { - TypedMDRVA list(&writer_); - - int image_count = dynamic_images_ ? - dynamic_images_->GetImageCount() : _dyld_image_count(); - - if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) - return false; - - module_list_stream->stream_type = MD_MODULE_LIST_STREAM; - module_list_stream->location = list.location(); - list.get()->number_of_modules = image_count; - - // Write out the executable module as the first one - MDRawModule module; - int executableIndex = FindExecutableModule(); - - if (!WriteModuleStream(executableIndex, &module)) { - return false; - } - - list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); - int destinationIndex = 1; // Write all other modules after this one - - for (int i = 0; i < image_count; ++i) { - if (i != executableIndex) { - if (!WriteModuleStream(i, &module)) { - return false; - } - - list.CopyIndexAfterObject(destinationIndex++, &module, MD_MODULE_SIZE); - } - } - - return true; -} - -bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - misc_info_stream->stream_type = MD_MISC_INFO_STREAM; - misc_info_stream->location = info.location(); - - MDRawMiscInfo *info_ptr = info.get(); - info_ptr->size_of_info = static_cast(sizeof(MDRawMiscInfo)); - info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID | - MD_MISCINFO_FLAGS1_PROCESS_TIMES | - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO; - - // Process ID - info_ptr->process_id = getpid(); - - // Times - struct rusage usage; - if (getrusage(RUSAGE_SELF, &usage) != -1) { - // Omit the fractional time since the MDRawMiscInfo only wants seconds - info_ptr->process_user_time = - static_cast(usage.ru_utime.tv_sec); - info_ptr->process_kernel_time = - static_cast(usage.ru_stime.tv_sec); - } - int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, info_ptr->process_id }; - u_int mibsize = static_cast(sizeof(mib) / sizeof(mib[0])); - size_t size; - if (!sysctl(mib, mibsize, NULL, &size, NULL, 0)) { - mach_vm_address_t addr; - if (mach_vm_allocate(mach_task_self(), - &addr, - size, - true) == KERN_SUCCESS) { - struct kinfo_proc *proc = (struct kinfo_proc *)addr; - if (!sysctl(mib, mibsize, proc, &size, NULL, 0)) - info_ptr->process_create_time = - static_cast(proc->kp_proc.p_starttime.tv_sec); - mach_vm_deallocate(mach_task_self(), addr, size); - } - } - - // Speed - uint64_t speed; - const uint64_t kOneMillion = 1000 * 1000; - size = sizeof(speed); - sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); - info_ptr->processor_max_mhz = static_cast(speed / kOneMillion); - info_ptr->processor_mhz_limit = static_cast(speed / kOneMillion); - size = sizeof(speed); - sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); - info_ptr->processor_current_mhz = static_cast(speed / kOneMillion); - - return true; -} - -bool MinidumpGenerator::WriteBreakpadInfoStream( - MDRawDirectory *breakpad_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM; - breakpad_info_stream->location = info.location(); - MDRawBreakpadInfo *info_ptr = info.get(); - - if (exception_thread_ && exception_type_) { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = exception_thread_; - } else { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = 0; - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.h deleted file mode 100644 index 224ad1c2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_generator.h +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator.h: Create a minidump of the current MacOS process. - -#ifndef CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ -#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ - -#include - -#include - -#include "client/minidump_file_writer.h" -#include "common/memory.h" -#include "common/mac/macho_utilities.h" -#include "google_breakpad/common/minidump_format.h" - -#include "dynamic_images.h" - -namespace google_breakpad { - -using std::string; - -const u_int64_t TOP_OF_THREAD0_STACK_64BIT = 0x00007fff5fbff000LL; -const u_int32_t TOP_OF_THREAD0_STACK_32BIT = 0xbffff000; - -// Use the REGISTER_FROM_THREADSTATE to access a register name from the -// breakpad_thread_state_t structure. -#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64 -// In The 10.5 SDK Headers Apple prepended __ to the variable names in the -// i386_thread_state_t structure. There's no good way to tell what version of -// the SDK we're compiling against so we just toggle on the same preprocessor -// symbol Apple's headers use. -#define REGISTER_FROM_THREADSTATE(a, b) ((a)->__ ## b) -#else -#define REGISTER_FROM_THREADSTATE(a, b) (a->b) -#endif - -// Creates a minidump file of the current process. If there is exception data, -// use SetExceptionInformation() to add this to the minidump. The minidump -// file is generated by the Write() function. -// Usage: -// MinidumpGenerator minidump(); -// minidump.Write("/tmp/minidump"); -// -class MinidumpGenerator { - public: - MinidumpGenerator(); - MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread); - - ~MinidumpGenerator(); - - // Return /.dmp - // Sets |unique_name| (if requested) to the unique name for the minidump - static string UniqueNameInDirectory(const string &dir, string *unique_name); - - // Write out the minidump into |path| - // All of the components of |path| must exist and be writable - // Return true if successful, false otherwise - bool Write(const char *path); - - // Specify some exception information, if applicable - void SetExceptionInformation(int type, int code, int subcode, - mach_port_t thread_name) { - exception_type_ = type; - exception_code_ = code; - exception_subcode_ = subcode; - exception_thread_ = thread_name; - } - - // Gather system information. This should be call at least once before using - // the MinidumpGenerator class. - static void GatherSystemInformation(); - - private: - typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *); - - // Stream writers - bool WriteThreadListStream(MDRawDirectory *thread_list_stream); - bool WriteMemoryListStream(MDRawDirectory *memory_list_stream); - bool WriteExceptionStream(MDRawDirectory *exception_stream); - bool WriteSystemInfoStream(MDRawDirectory *system_info_stream); - bool WriteModuleListStream(MDRawDirectory *module_list_stream); - bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream); - bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); - - // Helpers - u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state); - bool GetThreadState(thread_act_t target_thread, thread_state_t state, - mach_msg_type_number_t *count); - bool WriteStackFromStartAddress(mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location); - bool WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread); - bool WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path); - bool WriteModuleStream(unsigned int index, MDRawModule *module); - size_t CalculateStackSize(mach_vm_address_t start_addr); - int FindExecutableModule(); - - // Per-CPU implementations of these methods - bool WriteStackPPC(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextPPC(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state); - bool WriteStackPPC64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextPPC64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); - bool WriteStackX86(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextX86(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackX86(breakpad_thread_state_data_t state); - bool WriteStackX86_64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextX86_64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state); - - // disallow copy ctor and operator= - explicit MinidumpGenerator(const MinidumpGenerator &); - void operator=(const MinidumpGenerator &); - - // Use this writer to put the data to disk - MinidumpFileWriter writer_; - - // Exception information - int exception_type_; - int exception_code_; - int exception_subcode_; - mach_port_t exception_thread_; - mach_port_t crashing_task_; - mach_port_t handler_thread_; - - // CPU type of the task being dumped. - cpu_type_t cpu_type_; - - // System information - static char build_string_[16]; - static int os_major_version_; - static int os_minor_version_; - static int os_build_number_; - - // Information about dynamically loaded code - DynamicImages *dynamic_images_; - - // PageAllocator makes it possible to allocate memory - // directly from the system, even while handling an exception. - mutable PageAllocator allocator_; - - // Blocks of memory written to the dump. These are all currently - // written while writing the thread list stream, but saved here - // so a memory list stream can be written afterwards. - wasteful_vector memory_blocks_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests32-Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests32-Info.plist deleted file mode 100644 index 921ebf35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests32-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.breakpad.minidump_tests32 - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests64-Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests64-Info.plist deleted file mode 100644 index acfbd309..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/minidump_tests64-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.breakpad.minidump_tests64 - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - CSResourcesFileMapped - yes - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/obj-cTestCases-Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/obj-cTestCases-Info.plist deleted file mode 100644 index 65013556..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/obj-cTestCases-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.cc deleted file mode 100644 index 6142ad12..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// ProtectedMemoryAllocator -// -// See the header file for documentation - -#include "protected_memory_allocator.h" -#include - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ProtectedMemoryAllocator::ProtectedMemoryAllocator(vm_size_t pool_size) - : pool_size_(pool_size), - next_alloc_offset_(0), - valid_(false) { - - kern_return_t result = vm_allocate(mach_task_self(), - &base_address_, - pool_size, - TRUE - ); - - valid_ = (result == KERN_SUCCESS); - assert(valid_); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ProtectedMemoryAllocator::~ProtectedMemoryAllocator() { - vm_deallocate(mach_task_self(), - base_address_, - pool_size_ - ); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -char *ProtectedMemoryAllocator::Allocate(vm_size_t bytes) { - if (valid_ && next_alloc_offset_ + bytes <= pool_size_) { - char *p = (char*)base_address_ + next_alloc_offset_; - next_alloc_offset_ += bytes; - return p; - } - - return NULL; // ran out of memory in our allocation block -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -kern_return_t ProtectedMemoryAllocator::Protect() { - kern_return_t result = vm_protect(mach_task_self(), - base_address_, - pool_size_, - FALSE, - VM_PROT_READ); - - return result; -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -kern_return_t ProtectedMemoryAllocator::Unprotect() { - kern_return_t result = vm_protect(mach_task_self(), - base_address_, - pool_size_, - FALSE, - VM_PROT_READ | VM_PROT_WRITE); - - return result; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.h deleted file mode 100644 index 7e188db2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/protected_memory_allocator.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// ProtectedMemoryAllocator -// -// A very simple allocator class which allows allocation, but not deallocation. -// The allocations can be made read-only with the Protect() method. -// This class is NOT useful as a general-purpose memory allocation system, -// since it does not allow deallocation. It is useful to use for a group -// of allocations which are created in the same time-frame and destroyed -// in the same time-frame. It is useful for making allocations of memory -// which will not need to change often once initialized. This memory can then -// be protected from memory smashers by calling the Protect() method. - -#ifndef PROTECTED_MEMORY_ALLOCATOR_H__ -#define PROTECTED_MEMORY_ALLOCATOR_H__ - -#include - -// -class ProtectedMemoryAllocator { - public: - ProtectedMemoryAllocator(vm_size_t pool_size); - ~ProtectedMemoryAllocator(); - - // Returns a pointer to an allocation of size n within the pool. - // Fails by returning NULL is no more space is available. - // Please note that the pointers returned from this method should not - // be freed in any way (for example by calling free() on them ). - char * Allocate(vm_size_t n); - - // Returns the base address of the allocation pool. - char * GetBaseAddress() { return (char*)base_address_; } - - // Returns the size of the allocation pool, including allocated - // plus free space. - vm_size_t GetTotalSize() { return pool_size_; } - - // Returns the number of bytes already allocated in the pool. - vm_size_t GetAllocatedSize() { return next_alloc_offset_; } - - // Returns the number of bytes available for allocation. - vm_size_t GetFreeSize() { return pool_size_ - next_alloc_offset_; } - - // Makes the entire allocation pool read-only including, of course, - // all allocations made from the pool. - kern_return_t Protect(); - - // Makes the entire allocation pool read/write. - kern_return_t Unprotect(); - - private: - vm_size_t pool_size_; - vm_address_t base_address_; - vm_size_t next_alloc_offset_; - bool valid_; -}; - -#endif // PROTECTED_MEMORY_ALLOCATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.cc deleted file mode 100644 index cb76eb10..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// DynamicImagesTests.cpp -// minidump_test -// -// Created by Neal Sidhwaney on 4/17/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#include "client/mac/handler/testcases/DynamicImagesTests.h" -#include "client/mac/handler/dynamic_images.h" - -DynamicImagesTests test2(TEST_INVOCATION(DynamicImagesTests, - ReadTaskMemoryTest)); -DynamicImagesTests test3(TEST_INVOCATION(DynamicImagesTests, - ReadLibrariesFromLocalTaskTest)); - -DynamicImagesTests::DynamicImagesTests(TestInvocation *invocation) - : TestCase(invocation) { -} - -DynamicImagesTests::~DynamicImagesTests() { -} - -void DynamicImagesTests::ReadTaskMemoryTest() { - kern_return_t kr; - - // pick test2 as a symbol we know to be valid to read - // anything will work, really - void *addr = reinterpret_cast(&test2); - void *buf; - - fprintf(stderr, "reading 0x%p\n", addr); - buf = google_breakpad::ReadTaskMemory(mach_task_self(), - addr, - getpagesize(), - &kr); - - CPTAssert(kr == KERN_SUCCESS); - - CPTAssert(buf != NULL); - - CPTAssert(0 == memcmp(buf, (const void*)addr, getpagesize())); - - free(buf); -} - -void DynamicImagesTests::ReadLibrariesFromLocalTaskTest() { - - mach_port_t me = mach_task_self(); - google_breakpad::DynamicImages *d = new google_breakpad::DynamicImages(me); - - fprintf(stderr,"Local task image count: %d\n", d->GetImageCount()); - - d->TestPrint(); - - CPTAssert(d->GetImageCount() > 0); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.h deleted file mode 100644 index e1e79993..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/DynamicImagesTests.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// DynamicImagesTests.h -// minidump_test -// -// Created by Neal Sidhwaney on 4/17/08. -// Copyright 2008 Google Inc. All rights reserved. -// -// - -#ifndef _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ -#define _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ - -#include - -class DynamicImagesTests : public TestCase { - public: - explicit DynamicImagesTests(TestInvocation* invocation); - virtual ~DynamicImagesTests(); - - void ReadTaskMemoryTest(); - void ReadLibrariesFromLocalTaskTest(); -}; - -#endif /* _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.cc deleted file mode 100644 index e7332bfb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.cc +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// breakpad_nlist_test.cc -// minidump_test -// -// Created by Neal Sidhwaney on 4/13/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#include "client/mac/handler/testcases/breakpad_nlist_test.h" -#include -#include "client/mac/handler/breakpad_nlist_64.h" - -BreakpadNlistTest test1(TEST_INVOCATION(BreakpadNlistTest, CompareToNM)); - -BreakpadNlistTest::BreakpadNlistTest(TestInvocation *invocation) - : TestCase(invocation) { -} - - -BreakpadNlistTest::~BreakpadNlistTest() { -} - -void BreakpadNlistTest::CompareToNM() { -#if TARGET_CPU_X86_64 - system("/usr/bin/nm -arch x86_64 /usr/lib/dyld > /tmp/dyld-namelist.txt"); -#elif TARGET_CPU_PPC64 - system("/usr/bin/nm -arch ppc64 /usr/lib/dyld > /tmp/dyld-namelist.txt"); -#endif - - FILE *fd = fopen("/tmp/dyld-namelist.txt", "rt"); - - char oneNMAddr[30]; - char symbolType; - char symbolName[500]; - while (!feof(fd)) { - fscanf(fd, "%s %c %s", oneNMAddr, &symbolType, symbolName); - breakpad_nlist symbolList[2]; - breakpad_nlist &list = symbolList[0]; - - memset(symbolList, 0, sizeof(breakpad_nlist)*2); - const char *symbolNames[2]; - symbolNames[0] = (const char*)symbolName; - symbolNames[1] = "\0"; - breakpad_nlist_64("/usr/lib/dyld", &list, symbolNames); - uint64_t nmAddr = strtol(oneNMAddr, NULL, 16); - if (!IsSymbolMoreThanOnceInDyld(symbolName)) { - CPTAssert(nmAddr == symbolList[0].n_value); - } - } - - fclose(fd); -} - -bool BreakpadNlistTest::IsSymbolMoreThanOnceInDyld(const char *symbolName) { - // These are the symbols that occur more than once when nm dumps - // the symbol table of /usr/lib/dyld. Our nlist program returns - // the first address because it's doing a search so we need to exclude - // these from causing the test to fail - const char *multipleSymbols[] = { - "__Z41__static_initialization_and_destruction_0ii", - "___tcf_0", - "___tcf_1", - "_read_encoded_value_with_base", - "_read_sleb128", - "_read_uleb128", - "\0"}; - - bool found = false; - - for (int i = 0; multipleSymbols[i][0]; i++) { - if (!strcmp(multipleSymbols[i], symbolName)) { - found = true; - break; - } - } - - return found; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.h deleted file mode 100644 index e93657cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/breakpad_nlist_test.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// breakpad_nlist_test.h -// minidump_test -// -// Created by Neal Sidhwaney on 4/13/08. -// Copyright 2008 Google Inc. All rights reserved. -// -// - -#ifndef CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__ -#define CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__ - -#include - -class BreakpadNlistTest : public TestCase { - private: - - // nm dumps multiple addresses for the same symbol in - // /usr/lib/dyld. So we track those so we don't report failures - // in mismatches between what our nlist returns and what nm has - // for the duplicate symbols. - bool IsSymbolMoreThanOnceInDyld(const char *symbolName); - - public: - explicit BreakpadNlistTest(TestInvocation* invocation); - virtual ~BreakpadNlistTest(); - - - /* This test case runs nm on /usr/lib/dyld and then compares the - output of every symbol to what our nlist implementation returns */ - void CompareToNM(); -}; - -#endif /* CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__*/ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.h deleted file mode 100644 index 21ff7a44..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// dwarftests.h -// minidump_test -// -// Created by Neal Sidhwaney on 9/24/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#import - - -@interface dwarftests : SenTestCase { - -} - -- (void) testDWARFSymbolFileGeneration; - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.mm deleted file mode 100644 index 40c69aff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/dwarftests.mm +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// dwarftests.m -// minidump_test -// -// Created by Neal Sidhwaney on 9/24/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#import "dwarftests.h" -#import "dump_syms.h" - -@implementation dwarftests -- (void) testDWARFSymbolFileGeneration { - NSString *inputBreakpadSymbolFile = @"testcases/testdata/dump_syms_i386_breakpad.sym"; - NSString *outputBreakpadSymbolFile = @"/tmp/dump_syms_i386.breakpad"; - - DumpSymbols *dump = [[DumpSymbols alloc] initWithContentsOfFile:@"testcases/testdata/dump_syms_dwarf_data"]; - - STAssertNotNil(dump, @"DumpSymbols is nil"); - [dump setArchitecture:@"i386"]; - [dump writeSymbolFile:outputBreakpadSymbolFile]; - - NSData *d = [[NSData alloc] initWithContentsOfFile:inputBreakpadSymbolFile]; - STAssertNotNil(d, @"Input breakpad symbol file not found"); - - NSData *d1 = [[NSData alloc] initWithContentsOfFile:outputBreakpadSymbolFile]; - STAssertNotNil(d1, @"Output breakpad symbol file not found"); - - STAssertTrue([d isEqualToData:d1], - @"Symbol files were not equal!",nil); -} -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data deleted file mode 100644 index 5be17aee..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym deleted file mode 100644 index bca43c10..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym +++ /dev/null @@ -1,5300 +0,0 @@ -MODULE mac x86 94BF873C47A73BC07125291390B4C5F10 dump_syms_dwarf_data -FILE 1 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 2 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 3 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dump_syms.mm -FILE 4 /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSRange.h -FILE 5 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/new -FILE 6 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_fun.h -FILE 7 ../../../common/mac/dwarf/dwarf2reader.h -FILE 8 ../../../common/mac/file_id.h -FILE 9 ../../../common/mac/dwarf/functioninfo.h -FILE 10 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_tree.h -FILE 11 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 12 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hashtable.h -FILE 13 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 14 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 15 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/allocator.h -FILE 16 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 17 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h -FILE 18 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h -FILE 19 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algo.h -FILE 20 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_map.h -FILE 21 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 22 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_function.h -FILE 23 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_map -FILE 24 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/basic_string.h -FILE 25 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 26 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_list.h -FILE 27 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/list.tcc -FILE 28 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 29 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 30 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/functioninfo.cc -FILE 31 ../../../common/mac/dwarf/dwarf2reader.h -FILE 32 ../../../common/mac/dwarf/functioninfo.h -FILE 33 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 34 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hashtable.h -FILE 35 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/memory -FILE 36 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 37 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/basic_string.h -FILE 38 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 39 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 40 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_tree.h -FILE 41 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_function.h -FILE 42 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_map -FILE 43 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 44 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 45 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_map.h -FILE 46 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 47 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 48 /g/code/breakpad-staging/src/tools/mac/dump_syms/dump_syms_tool.mm -FILE 49 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/file_id.cc -FILE 50 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 51 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_id.cc -FILE 52 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 53 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 54 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_walker.cc -FILE 55 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 56 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 57 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_utilities.cc -FILE 58 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/bytereader.cc -FILE 59 ../../../common/mac/dwarf/bytereader-inl.h -FILE 60 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/dwarf2reader.cc -FILE 61 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 62 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_deque.h -FILE 63 ../../../common/mac/dwarf/bytereader.h -FILE 64 ../../../common/mac/dwarf/bytereader-inl.h -FILE 65 ../../../common/mac/dwarf/line_state_machine.h -FILE 66 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_list.h -FILE 67 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/memory -FILE 68 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 69 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/allocator.h -FILE 70 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 71 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 72 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 73 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 74 ../../../common/mac/dwarf/dwarf2reader.h -FILE 75 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_stack.h -FILE 76 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/deque.tcc -FILE 77 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/list.tcc -FILE 78 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 79 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 80 /var/tmp/gcc/gcc-5484~1/src/gcc/libgcc2.c -FUNC 162a 28 0 _OSSwapInt16 -162a 10 44 55 -163a 16 46 55 -1650 2 47 55 -FUNC 1652 1c 0 _OSSwapInt32 -1652 f 53 55 -1661 8 55 55 -1669 3 56 55 -166c 2 57 55 -FUNC 166e 2b 0 _OSSwapInt64 -166e 12 64 55 -1680 11 69 55 -1691 6 70 55 -1697 2 71 55 -1699 1 71 55 -FUNC 169a 1e 0 NXSwapShort -169a 10 43 56 -16aa c 45 56 -16b6 2 46 56 -FUNC 16b8 19 0 NXSwapInt -16b8 f 52 56 -16c7 8 54 56 -16cf 2 55 56 -16d1 1 55 56 -FUNC 16d2 19 0 NXSwapLong -16d2 f 61 56 -16e1 8 63 56 -16e9 2 64 56 -16eb 1 64 56 -FUNC 16ec 1f 0 NXSwapLongLong -16ec 12 70 56 -16fe b 72 56 -1709 2 73 56 -170b 1 73 56 -FUNC 170c 181 0 -[DumpSymbols convertCPlusPlusSymbols:] -170c 14 128 3 -1720 54 130 3 -1774 f 132 3 -1783 7 133 3 -178a 1a 136 3 -17a4 5 138 3 -17a9 1a 139 3 -17c3 23 140 3 -17e6 7 141 3 -17ed 44 142 3 -1831 1e 145 3 -184f 29 138 3 -1878 b 148 3 -1883 3 150 3 -1886 7 151 3 -188d 1 151 3 -FUNC 188e 323 0 -[DumpSymbols convertSymbols] -188e 14 154 3 -18a2 1f 155 3 -18c1 3e 156 3 -18ff 2b 160 3 -192a c 162 3 -1936 43 164 3 -1979 2a 165 3 -19a3 20 168 3 -19c3 d 169 3 -19d0 1e 171 3 -19ee 11 162 3 -19ff 7 181 3 -1a06 6 182 3 -1a0c 5 184 3 -1a11 15 185 3 -1a26 6 18 4 -1a2c 6 19 4 -1a32 6 20 4 -1a38 6 185 3 -1a3e 28 186 3 -1a66 21 187 3 -1a87 1a 188 3 -1aa1 a 190 3 -1aab c 194 3 -1ab7 43 198 3 -1afa 21 199 3 -1b1b 20 202 3 -1b3b 2e 203 3 -1b69 1e 194 3 -1b87 c 184 3 -1b93 17 207 3 -1baa 7 208 3 -1bb1 1 208 3 -FUNC 1bb2 4a2 0 -[DumpSymbols addFunction:line:address:section:] -1bb2 21 211 3 -1bd3 2f 212 3 -1c02 e 214 3 -1c10 4 219 3 -1c14 2a 221 3 -1c3e 22 223 3 -1c60 6 224 3 -1c66 2a 225 3 -1c90 4 226 3 -1c94 2e 230 3 -1cc2 2e 233 3 -1cf0 2e 236 3 -1d1e a 239 3 -1d28 2b 253 3 -1d53 e 254 3 -1d61 3c 255 3 -1d9d 22 32 4 -1dbf 3 256 3 -1dc2 6 259 3 -1dc8 a 260 3 -1dd2 3c 261 3 -1e0e 25 262 3 -1e33 2a 263 3 -1e5d 22 265 3 -1e7f 26 270 3 -1ea5 6 272 3 -1eab 37 273 3 -1ee2 2a 274 3 -1f0c 17 275 3 -1f23 43 278 3 -1f66 2e 279 3 -1f94 23 282 3 -1fb7 43 285 3 -1ffa 52 287 3 -204c 8 289 3 -FUNC 2054 5a4 0 -[DumpSymbols processSymbolItem:stringTable:] -2054 18 292 3 -206c 8 293 3 -2074 4 294 3 -2078 16 297 3 -208e c 298 3 -209a f 300 3 -20a9 b 301 3 -20b4 16 303 3 -20ca 4d 309 3 -2117 38 311 3 -214f 30 315 3 -217f 60 317 3 -21df d 322 3 -21ec 2b 325 3 -2217 3a 327 3 -2251 f 332 3 -2260 2d 333 3 -228d 1a 334 3 -22a7 32 335 3 -22d9 20 342 3 -22f9 c 343 3 -2305 24 348 3 -2329 a 349 3 -2333 3c 350 3 -236f 2a 352 3 -2399 1c 353 3 -23b5 9 354 3 -23be f 356 3 -23cd 2d 357 3 -23fa 2f 358 3 -2429 20 360 3 -2449 c 361 3 -2455 7 363 3 -245c 21 365 3 -247d 4a 368 3 -24c7 9 370 3 -24d0 1a 371 3 -24ea 4b 372 3 -2535 4 373 3 -2539 5 371 3 -253e 29 374 3 -2567 2d 376 3 -2594 4b 378 3 -25df 4 379 3 -25e3 a 382 3 -25ed b 383 3 -FUNC 25f8 c9 0 -[DumpSymbols loadSymbolInfo:offset:] -25f8 13 391 3 -260b 2b 392 3 -2636 2a 393 3 -2660 2d 395 3 -268d 2e 398 3 -26bb 6 399 3 -26c1 1 399 3 -FUNC 26c2 2be 0 -[DumpSymbols loadSTABSSymbolInfo:offset:] -26c2 16 537 3 -26d8 9 538 3 -26e1 10 539 3 -26f1 2e 540 3 -271f 9 542 3 -2728 22 543 3 -274a 4 544 3 -274e a 546 3 -2758 3c 547 3 -2794 c 549 3 -27a0 e 550 3 -27ae 6 551 3 -27b4 25 552 3 -27d9 25 553 3 -27fe 25 554 3 -2823 c 555 3 -282f c 556 3 -283b c 559 3 -2847 23 562 3 -286a a 563 3 -2874 a 564 3 -287e 2e 565 3 -28ac 39 566 3 -28e5 2e 570 3 -2913 4 571 3 -2917 17 559 3 -292e 25 575 3 -2953 9 576 3 -295c 17 549 3 -2973 4 579 3 -2977 9 580 3 -FUNC 2980 28a 0 -[DumpSymbols loadSymbolInfo64:offset:] -2980 16 583 3 -2996 9 585 3 -299f 10 586 3 -29af 2e 587 3 -29dd 9 589 3 -29e6 22 590 3 -2a08 4 591 3 -2a0c c 593 3 -2a18 e 594 3 -2a26 6 595 3 -2a2c 25 596 3 -2a51 25 597 3 -2a76 25 598 3 -2a9b 9 599 3 -2aa4 c 600 3 -2ab0 c 603 3 -2abc 17 604 3 -2ad3 23 609 3 -2af6 a 610 3 -2b00 a 611 3 -2b0a 2e 612 3 -2b38 37 613 3 -2b6f 2e 615 3 -2b9d 4 616 3 -2ba1 17 603 3 -2bb8 25 620 3 -2bdd 9 621 3 -2be6 17 593 3 -2bfd 4 624 3 -2c01 9 625 3 -FUNC 2c0a 199 0 -[DumpSymbols loadSymbolInfoForArchitecture] -2c0a 13 628 3 -2c1d 41 630 3 -2c5e 2b 631 3 -2c89 1a 632 3 -2ca3 40 634 3 -2ce3 40 635 3 -2d23 5f 637 3 -2d82 17 639 3 -2d99 4 640 3 -2d9d 6 641 3 -2da3 1 641 3 -FUNC 2da4 3e5 0 -[DumpSymbols loadHeader:offset:] -2da4 18 728 3 -2dbc 9 729 3 -2dc5 10 730 3 -2dd5 2e 731 3 -2e03 9 733 3 -2e0c 2b 734 3 -2e37 1e 736 3 -2e55 c 738 3 -2e61 e 739 3 -2e6f 6 740 3 -2e75 50 742 3 -2ec5 2e 743 3 -2ef3 2e 744 3 -2f21 2e 745 3 -2f4f 20 746 3 -2f6f 1b7 755 3 -3126 9 757 3 -312f 25 761 3 -3154 9 762 3 -315d 17 738 3 -3174 a 765 3 -317e b 766 3 -3189 1 766 3 -FUNC 318a 41d 0 -[DumpSymbols loadHeader64:offset:] -318a 18 769 3 -31a2 9 771 3 -31ab 10 772 3 -31bb 2e 773 3 -31e9 9 775 3 -31f2 c 777 3 -31fe 2b 778 3 -3229 e 779 3 -3237 6 780 3 -323d 50 781 3 -328d 49 782 3 -32d6 49 783 3 -331f 2e 784 3 -334d 9 785 3 -3356 29 786 3 -337f 1c5 794 3 -3544 9 795 3 -354d 25 799 3 -3572 9 800 3 -357b 17 777 3 -3592 a 803 3 -359c b 804 3 -35a7 1 804 3 -FUNC 35a8 52a 0 -[DumpSymbols loadModuleInfo] -35a8 14 807 3 -35bc e 808 3 -35ca 41 810 3 -360b 1a 811 3 -3625 6 812 3 -362b 6 814 3 -3631 17 815 3 -3648 c 816 3 -3654 29 820 3 -367d 29 821 3 -36a6 29 822 3 -36cf 35 824 3 -3704 12 826 3 -3716 17 827 3 -372d c 828 3 -3739 3c 832 3 -3775 a 834 3 -377f 9 836 3 -3788 25 837 3 -37ad c 839 3 -37b9 54 840 3 -380d 57 841 3 -3864 57 842 3 -38bb 57 843 3 -3912 57 844 3 -3969 1c 846 3 -3985 4b 847 3 -39d0 49 849 3 -3a19 13 839 3 -3a2c 6 851 3 -3a32 3c 852 3 -3a6e 3a 854 3 -3aa8 17 857 3 -3abf c 858 3 -3acb 7 859 3 -FUNC 3ad2 b6 0 WriteFormat -3ad2 10 862 3 -3ae2 6 867 3 -3ae8 24 868 3 -3b0c 27 869 3 -3b33 40 870 3 -3b73 c 873 3 -3b7f 9 874 3 -FUNC 3b88 35 0 -[DumpSymbols availableArchitectures] -3b88 13 1140 3 -3b9b 1c 1141 3 -3bb7 6 1142 3 -3bbd 1 1142 3 -FUNC 3bbe 1b4 0 -[DumpSymbols setArchitecture:] -3bbe 13 1158 3 -3bd1 1a 1159 3 -3beb 4 1160 3 -3bef 2a 1162 3 -3c19 9 1163 3 -3c22 2a 1165 3 -3c4c 9 1166 3 -3c55 9 1167 3 -3c5e 2a 1169 3 -3c88 6 1170 3 -3c8e 2a 1172 3 -3cb8 6 1173 3 -3cbe 2a 1175 3 -3ce8 4 1176 3 -3cec 6 1179 3 -3cf2 2c 1180 3 -3d1e 9 1181 3 -3d27 1c 1183 3 -3d43 1f 1184 3 -3d62 a 1187 3 -3d6c 6 1188 3 -FUNC 3d72 14 0 -[DumpSymbols architecture] -3d72 c 1191 3 -3d7e 6 1192 3 -3d84 2 1193 3 -FUNC 3d86 e7 0 -[DumpSymbols writeSymbolFile:] -3d86 13 1196 3 -3d99 1a 1197 3 -3db3 48 1200 3 -3dfb 9 1201 3 -3e04 1e 1203 3 -3e22 6 1205 3 -3e28 9 1206 3 -3e31 21 1208 3 -3e52 b 1210 3 -3e5d a 1212 3 -3e67 6 1213 3 -3e6d 1 1213 3 -FUNC 3e6e 65 0 -[MachSection initWithMachSection:andNumber:] -3e6e 13 1219 3 -3e81 37 1220 3 -3eb8 9 1221 3 -3ec1 9 1222 3 -3eca 3 1225 3 -3ecd 6 1226 3 -3ed3 1 1226 3 -FUNC 3ed4 14 0 -[MachSection sectionPointer] -3ed4 c 1228 3 -3ee0 6 1229 3 -3ee6 2 1230 3 -FUNC 3ee8 14 0 -[MachSection sectionNumber] -3ee8 c 1232 3 -3ef4 6 1233 3 -3efa 2 1234 3 -FUNC 3efc 17c 0 -[DumpSymbols processDWARFSourceFileInfo:] -3efc 14 459 3 -3f10 a 460 3 -3f1a 3c 461 3 -3f56 20 463 3 -3f76 5 464 3 -3f7b 3a 465 3 -3fb5 1d 466 3 -3fd2 3a 467 3 -400c 2a 468 3 -4036 3b 464 3 -4071 7 471 3 -FUNC 4078 1d7 0 DumpFunctionMap(std::map, std::allocator > >) -4078 15 82 3 -408d 13 83 3 -40a0 1e 85 3 -40be 42 89 3 -4100 20 90 3 -4120 2b 91 3 -414b 1a 92 3 -4165 23 93 3 -4188 46 96 3 -41ce 46 99 3 -4214 33 83 3 -4247 8 102 3 -424f 1 102 3 -FUNC 4250 3ef 0 -[DumpSymbols processDWARFFunctionInfo:] -4250 15 473 3 -4265 25 474 3 -428a 1e 476 3 -42a8 a 480 3 -42b2 3c 481 3 -42ee 3d 483 3 -432b 23 485 3 -434e 26 487 3 -4374 6 489 3 -437a 37 490 3 -43b1 2a 491 3 -43db 17 492 3 -43f2 30 496 3 -4422 3d 497 3 -445f 2e 498 3 -448d 30 502 3 -44bd 64 504 3 -4521 34 507 3 -4555 9d 509 3 -45f2 45 474 3 -4637 8 513 3 -463f 1 513 3 -FUNC 4640 1f5 0 -[DumpSymbols processDWARFLineNumberInfo:] -4640 15 515 3 -4655 25 516 3 -467a 39 520 3 -46b3 26 521 3 -46d9 6 523 3 -46df 37 524 3 -4716 2a 525 3 -4740 17 526 3 -4757 30 529 3 -4787 61 531 3 -47e8 45 516 3 -482d 8 534 3 -4835 1 534 3 -FUNC 4836 10f 0 -[DumpSymbols dealloc] -4836 13 1145 3 -4849 1c 1146 3 -4865 1c 1147 3 -4881 1c 1148 3 -489d 1c 1149 3 -48b9 1c 1150 3 -48d5 1c 1151 3 -48f1 25 1152 3 -4916 29 1154 3 -493f 6 1155 3 -4945 1 1155 3 -FUNC 4946 512 0 -[DumpSymbols loadDWARFSymbolInfo:offset:] -4946 17 402 3 -495d 9 405 3 -4966 10 406 3 -4976 2b 408 3 -49a1 38 409 3 -49d9 3a 410 3 -4a13 2e 411 3 -4a41 31 416 3 -4a72 e 418 3 -4a80 24 420 3 -4aa4 5 422 3 -4aa9 b 424 3 -4ab4 b 425 3 -4abf e 426 3 -4acd 2b 427 3 -4af8 2b 428 3 -4b23 2c 431 3 -4b4f 52 439 3 -4ba1 34 444 3 -4bd5 1a 446 3 -4bef 21 451 3 -4c10 1e 452 3 -4c2e 21 453 3 -4c4f 40 422 3 -4c8f 6 453 3 -4c95 170 422 3 -4e05 43 456 3 -4e48 10 457 3 -FUNC 4e58 4fd 0 -[DumpSymbols generateSectionDictionary:] -4e58 18 663 3 -4e70 10 665 3 -4e80 2e 666 3 -4eae 9 668 3 -4eb7 2b 669 3 -4ee2 7 670 3 -4ee9 2e 672 3 -4f17 d 676 3 -4f24 32 678 3 -4f56 29 680 3 -4f7f a 684 3 -4f89 3c 685 3 -4fc5 31 688 3 -4ff6 5d 689 3 -5053 26 692 3 -5079 21 694 3 -509a c 698 3 -50a6 e 699 3 -50b4 6 700 3 -50ba 9 701 3 -50c3 2e 702 3 -50f1 c 704 3 -50fd 3c 706 3 -5139 66 709 3 -519f 1c 712 3 -51bb fb 714 3 -52b6 6 717 3 -52bc 5 718 3 -52c1 19 704 3 -52da 25 714 3 -52ff 2e 722 3 -532d 9 723 3 -5336 17 698 3 -534d 8 725 3 -5355 1 725 3 -FUNC 5356 24a 0 -[DumpSymbols getSectionMapForArchitecture:] -5356 14 643 3 -536a 43 645 3 -53ad 1a 648 3 -53c7 1c 645 3 -53e3 18 648 3 -53fb 40 650 3 -543b 20 651 3 -545b 17 652 3 -5472 16 651 3 -5488 cb 652 3 -5553 11 654 3 -5564 32 657 3 -5596 a 658 3 -FUNC 55a0 3fe 0 -[DumpSymbols initWithContentsOfFile:] -55a0 14 1056 3 -55b4 3b 1057 3 -55ef 44 1059 3 -5633 17 1060 3 -564a c 1061 3 -5656 1f 1064 3 -5675 2b 1067 3 -56a0 a 1069 3 -56aa 35 1083 3 -56df 2 1087 3 -56e1 1a 1088 3 -56fb 3d 1087 3 -5738 33 1092 3 -576b 6 1094 3 -5771 e 1095 3 -577f 17 1096 3 -5796 c 1097 3 -57a2 1c 1101 3 -57be 1f 1103 3 -57dd 18 1104 3 -57f5 23 1107 3 -5818 25 1109 3 -583d 1c 1107 3 -5859 17 1110 3 -5870 c 1111 3 -587c 2a 1115 3 -58a6 8 1116 3 -58ae a 1118 3 -58b8 9 1119 3 -58c1 d 1122 3 -58ce 29 1124 3 -58f7 20 1126 3 -5917 20 1128 3 -5937 57 1132 3 -598e 9 1136 3 -5997 7 1137 3 -FUNC 599e d74 0 -[DumpSymbols outputSymbolFile:] -599e 18 877 3 -59b6 2e 879 3 -59e4 30 880 3 -5a14 5d 882 3 -5a71 30 883 3 -5aa1 5d 885 3 -5afe 2e 888 3 -5b2c 38 891 3 -5b64 46 892 3 -5baa 26 893 3 -5bd0 20 895 3 -5bf0 20 904 3 -5c10 30 898 3 -5c40 f 899 3 -5c4f 1e 904 3 -5c6d 17 907 3 -5c84 17 908 3 -5c9b 44 911 3 -5cdf 44 914 3 -5d23 a 917 3 -5d2d 36 921 3 -5d63 30 923 3 -5d93 9 18 4 -5d9c 9 19 4 -5da5 c 20 4 -5db1 56 923 3 -5e07 74 925 3 -5e7b f 927 3 -5e8a 44 932 3 -5ece 20 933 3 -5eee c 934 3 -5efa 4e 935 3 -5f48 41 936 3 -5f89 f 937 3 -5f98 14 934 3 -5fac 7 941 3 -5fb3 14 942 3 -5fc7 14 943 3 -5fdb 1d 946 3 -5ff8 c 948 3 -6004 24 949 3 -6028 29 950 3 -6051 9 953 3 -605a 28 954 3 -6082 2e 955 3 -60b0 1e 957 3 -60ce 7 959 3 -60d5 26 962 3 -60fb 2a 963 3 -6125 2a 964 3 -614f 6 966 3 -6155 2a 967 3 -617f e 971 3 -618d 43 972 3 -61d0 4c 974 3 -621c 8 975 3 -6224 2e 979 3 -6252 2e 982 3 -6280 2e 985 3 -62ae 2e 988 3 -62dc 2e 991 3 -630a 2e 994 3 -6338 2e 997 3 -6366 2e 1000 3 -6394 54 1004 3 -63e8 c 1005 3 -63f4 e 1007 3 -6402 27 1008 3 -6429 8 1009 3 -6431 34 1010 3 -6465 24 1012 3 -6489 2 1013 3 -648b 2a 1017 3 -64b5 a 1019 3 -64bf 14 1020 3 -64d3 1d 1021 3 -64f0 a 1025 3 -64fa 32 1026 3 -652c 33 1028 3 -655f c 1029 3 -656b 55 1034 3 -65c0 f 1036 3 -65cf 16 1040 3 -65e5 61 1041 3 -6646 f 1043 3 -6655 47 1046 3 -669c c 1048 3 -66a8 11 948 3 -66b9 4e 1052 3 -6707 b 1053 3 -FUNC 6712 11 0 operator new(unsigned long, void*) -6712 c 94 5 -671e 5 94 5 -6723 1 94 5 -FUNC 6724 e 0 operator delete(void*, void*) -6724 c 98 5 -6730 2 98 5 -673e 7 76 6 -6745 2 77 6 -6747 1a 78 6 -6761 d 77 6 -676e 3 79 6 -6771 2 80 6 -6773 1 80 6 -6780 d 95 6 -678d 1 95 6 -678e 13 127 74 -67a1 2a 127 74 -67cb 1 127 74 -67cc 13 127 74 -67df 2a 127 74 -6809 1 127 74 -680a 13 127 74 -681d 2a 127 74 -6847 1 127 74 -FUNC 6848 e 0 dwarf2reader::LineInfoHandler::DefineDir(std::string const&, unsigned int) -6848 c 131 7 -6854 2 131 74 -FUNC 6856 26 0 dwarf2reader::LineInfoHandler::DefineFile(std::string const&, int, unsigned int, unsigned long long, unsigned long long) -6856 24 142 7 -687a 2 142 74 -FUNC 687c 1a 0 dwarf2reader::LineInfoHandler::AddLine(unsigned long long, unsigned int, unsigned int, unsigned int) -687c 18 150 7 -6894 2 150 74 -6896 12 299 74 -68a8 12 299 74 -68ba 13 301 74 -68cd 2a 301 74 -68f7 1 301 74 -68f8 13 301 74 -690b 2a 301 74 -6935 1 301 74 -6936 13 301 74 -6949 2a 301 74 -6973 1 301 74 -FUNC 6974 44 0 dwarf2reader::Dwarf2Handler::StartCompilationUnit(unsigned long long, unsigned char, unsigned char, unsigned long long, unsigned char) -6974 39 308 7 -69ad b 308 74 -FUNC 69b8 1f 0 dwarf2reader::Dwarf2Handler::StartDIE(unsigned long long, dwarf2reader::DwarfTag, std::list, std::allocator > > const&) -69b8 18 314 7 -69d0 7 314 74 -69d7 1 314 74 -FUNC 69d8 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeUnsigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, unsigned long long) -69d8 24 323 7 -69fc 2 323 74 -FUNC 69fe 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeSigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, long long) -69fe 24 332 7 -6a22 2 332 74 -FUNC 6a24 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeBuffer(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, char const*, unsigned long long) -6a24 24 345 7 -6a48 2 345 74 -FUNC 6a4a 1a 0 dwarf2reader::Dwarf2Handler::ProcessAttributeString(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, std::string const&) -6a4a 18 354 7 -6a62 2 354 74 -FUNC 6a64 1a 0 dwarf2reader::Dwarf2Handler::EndDIE(unsigned long long) -6a64 18 360 7 -6a7c 2 360 74 -6a7e c 44 8 -6a8a 2 44 8 -6a8c 13 55 32 -6a9f 35 55 32 -6ad4 13 91 32 -6ae7 73 96 32 -6b5a 13 98 32 -6b6d 35 98 32 -6bae 1a 75 3 -6bc8 2 76 3 -FUNC 6bca 20 0 std::_Rb_tree_const_iterator >::operator!=(std::_Rb_tree_const_iterator > const&) const -6bca c 287 10 -6bd6 14 288 40 -FUNC 6bea 16 0 std::_Rb_tree_const_iterator >::operator->() const -6bea c 249 10 -6bf6 a 250 40 -6c0c 7 614 72 -6c13 1 614 72 -6c14 c 241 40 -6c20 c 242 40 -FUNC 6c2c 16 0 std::_Rb_tree_const_iterator >::operator*() const -6c2c c 245 11 -6c38 a 246 40 -6c42 c 241 40 -6c4e c 242 40 -FUNC 6c5a 20 0 std::_Rb_tree_const_iterator > >::operator!=(std::_Rb_tree_const_iterator > > const&) const -6c5a c 287 11 -6c66 14 288 40 -FUNC 6c7a 16 0 std::_Rb_tree_const_iterator > >::operator->() const -6c7a c 249 11 -6c86 a 250 40 -6c90 c 185 34 -6c9c 18 186 34 -6cc0 14 204 34 -6cd4 c 69 70 -6ce0 d 69 70 -6ced 1 69 70 -6cee c 89 70 -6cfa 20 90 70 -6d1a c 69 70 -6d26 d 69 70 -6d33 1 69 70 -6d34 c 69 70 -6d40 d 69 70 -6d4d 1 69 70 -FUNC 6d4e 25 0 std::_Rb_tree_const_iterator >::operator++() -6d4e c 253 13 -6d5a 14 255 40 -6d6e 5 256 40 -6d73 1 256 40 -FUNC 6d74 25 0 std::_Rb_tree_const_iterator > >::operator++() -6d74 c 253 13 -6d80 14 255 40 -6d94 5 256 40 -6d99 1 256 40 -FUNC 6d9a 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_begin() -6d9a c 461 13 -6da6 8 462 40 -FUNC 6dae 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_begin() -6dae c 461 13 -6dba 8 462 40 -6dc2 c 65 68 -6dce 2 65 68 -6dd0 c 72 68 -6ddc 2 72 68 -6dde c 97 69 -6dea d 97 69 -6df7 1 97 69 -6df8 c 105 69 -6e04 d 105 69 -6e11 1 105 69 -6e12 c 105 69 -6e1e d 105 69 -6e2b 1 105 69 -6e2c c 67 68 -6e38 2 67 68 -6e3a c 99 69 -6e46 14 100 69 -6e5a c 99 69 -6e66 14 100 69 -FUNC 6e7a 2b 0 std::_Vector_base >::get_allocator() const -6e7a 10 93 16 -6e8a 1b 94 71 -6ea5 1 94 71 -6ea6 c 65 68 -6eb2 2 65 68 -6eb4 c 72 68 -6ec0 2 72 68 -6ec2 c 97 69 -6ece d 97 69 -6edb 1 97 69 -6edc c 105 69 -6ee8 d 105 69 -6ef5 1 105 69 -6ef6 c 105 69 -6f02 d 105 69 -6f0f 1 105 69 -6f10 c 67 68 -6f1c 2 67 68 -6f1e c 99 69 -6f2a 14 100 69 -6f3e c 99 69 -6f4a 14 100 69 -FUNC 6f5e 2b 0 std::_Vector_base >::get_allocator() const -6f5e 10 93 16 -6f6e 1b 94 71 -6f89 1 94 71 -6f8a c 603 72 -6f96 c 603 72 -FUNC 6fa2 23 0 std::vector >::begin() -6fa2 c 333 16 -6fae 17 334 71 -6fc5 1 334 71 -FUNC 6fc6 26 0 std::vector >::end() -6fc6 c 351 16 -6fd2 1a 352 71 -6ff8 5 666 72 -6ffd 1 666 72 -6ffe c 608 72 -700a 14 609 72 -702a 5 666 72 -702f 1 666 72 -FUNC 7030 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -7030 d 693 16 -703d 28 694 72 -7065 1 694 72 -7066 c 603 72 -7072 c 603 72 -708a 27 629 72 -70b1 1 629 72 -70b2 c 84 70 -70be 1f 85 70 -70dd 1 85 70 -FUNC 70de 32 0 std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*> std::make_pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*>(std::string, __gnu_cxx::hash_map, __gnu_cxx::hash, std::equal_to, std::allocator > >*) -70de 10 144 16 -70ee 22 145 70 -711c a 190 34 -7132 d 194 34 -713f 1 194 34 -7140 c 84 70 -714c 17 85 70 -7163 1 85 70 -FUNC 7164 2d 0 std::pair std::make_pair(char const*, unsigned long) -7164 c 144 16 -7170 21 145 70 -7191 1 145 70 -7192 c 84 70 -719e 1d 85 70 -71bb 1 85 70 -FUNC 71bc 30 0 std::pair > std::make_pair >(char*, std::pair) -71bc 10 144 16 -71cc 20 145 70 -71ec c 89 70 -71f8 20 90 70 -7218 d 89 70 -7225 70 90 70 -7295 1 90 70 -FUNC 7296 12 0 std::iterator_traits::iterator_category std::__iterator_category(unsigned long const* const&) -7296 c 164 17 -72a2 6 165 17 -FUNC 72a8 1d 0 std::iterator_traits::difference_type std::__distance(unsigned long const*, unsigned long const*, std::random_access_iterator_tag) -72a8 c 92 18 -72b4 11 97 18 -72c5 1 97 18 -FUNC 72c6 33 0 std::iterator_traits::difference_type std::distance(unsigned long const*, unsigned long const*) -72c6 c 114 18 -72d2 27 118 18 -72f9 1 118 18 -FUNC 72fa 20 0 void std::__advance(unsigned long const*&, int, std::random_access_iterator_tag) -72fa c 150 18 -7306 14 155 18 -FUNC 731a 33 0 void std::advance(unsigned long const*&, int) -731a c 172 18 -7326 27 175 18 -734d 1 175 18 -FUNC 734e 7a 0 unsigned long const* std::lower_bound(unsigned long const*, unsigned long const*, unsigned long const&) -734e c 2625 19 -735a 15 2642 19 -736f 2 2646 19 -7371 8 2648 19 -7379 6 2649 19 -737f 12 2650 19 -7391 e 2651 19 -739f 6 2653 19 -73a5 4 2654 19 -73a9 e 2655 19 -73b7 6 2658 19 -73bd 6 2646 19 -73c3 5 2660 19 -73db b 227 34 -73e6 e 228 34 -73f4 1c 229 34 -7410 20 230 34 -7430 6 231 34 -7436 c 72 68 -7442 2 72 68 -7444 c 105 69 -7450 d 105 69 -745d 1 105 69 -745e c 105 69 -746a d 105 69 -7477 1 105 69 -7478 c 80 71 -7484 d 80 71 -7491 1 80 71 -7492 c 67 68 -749e 2 67 68 -74a0 c 99 69 -74ac 14 100 69 -FUNC 74c0 2b 0 std::_Vector_base >::get_allocator() const -74c0 10 93 19 -74d0 1b 94 71 -74eb 1 94 71 -74ec c 238 40 -74f8 a 239 40 -FUNC 7502 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin() const -7502 c 585 19 -750e 1a 588 40 -FUNC 7528 19 0 std::map, std::allocator > >::begin() const -7528 c 243 20 -7534 d 244 45 -7541 1 244 45 -FUNC 7542 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::end() const -7542 c 596 20 -754e 1a 597 40 -FUNC 7568 19 0 std::map, std::allocator > >::end() const -7568 c 260 20 -7574 d 261 45 -7581 1 261 45 -7582 c 65 68 -758e 2 65 68 -7590 c 72 68 -759c 2 72 68 -759e c 97 69 -75aa d 97 69 -75b7 1 97 69 -75b8 c 105 69 -75c4 d 105 69 -75d1 1 105 69 -75d2 c 72 68 -75de 2 72 68 -75e0 c 105 69 -75ec d 105 69 -75f9 1 105 69 -75fa c 397 40 -7606 d 397 40 -7613 1 397 40 -7614 c 105 69 -7620 d 105 69 -762d 1 105 69 -FUNC 762e 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_right(std::_Rb_tree_node_base*) -762e c 496 20 -763a 8 497 40 -FUNC 7642 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_left(std::_Rb_tree_node_base*) -7642 c 488 20 -764e 8 489 40 -7656 c 65 68 -7662 2 65 68 -7664 c 72 68 -7670 2 72 68 -7672 c 97 69 -767e d 97 69 -768b 1 97 69 -768c c 105 69 -7698 d 105 69 -76a5 1 105 69 -76a6 c 72 68 -76b2 2 72 68 -76b4 c 105 69 -76c0 d 105 69 -76cd 1 105 69 -76ce c 397 40 -76da d 397 40 -76e7 1 397 40 -76e8 c 105 69 -76f4 d 105 69 -7701 1 105 69 -FUNC 7702 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_right(std::_Rb_tree_node_base*) -7702 c 496 20 -770e 8 497 40 -FUNC 7716 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_left(std::_Rb_tree_node_base*) -7716 c 488 20 -7722 8 489 40 -772a c 84 71 -7736 2f 85 71 -7765 2 86 71 -7767 1 86 71 -7768 c 80 71 -7774 d 80 71 -7781 1 80 71 -7782 c 96 71 -778e 12 97 71 -77a0 2 98 71 -77a2 c 84 71 -77ae 2f 85 71 -77dd 2 86 71 -77df 1 86 71 -77e0 c 80 71 -77ec d 80 71 -77f9 1 80 71 -77fa c 96 71 -7806 12 97 71 -7818 2 98 71 -7826 d 107 68 -7833 1 107 68 -FUNC 7834 2e 0 void std::_Destroy >(std::string*, std::string*, std::allocator) -7834 c 171 21 -7840 2 173 73 -7842 12 174 73 -7854 c 173 73 -7860 2 174 73 -7862 c 167 40 -786e a 168 40 -FUNC 7878 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin() -7878 c 581 21 -7884 1a 582 40 -FUNC 789e 19 0 std::map, std::allocator > >::begin() -789e c 234 21 -78aa d 235 45 -78b7 1 235 45 -FUNC 78b8 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::end() -78b8 c 592 21 -78c4 1a 593 40 -FUNC 78de 19 0 std::map, std::allocator > >::end() -78de c 251 21 -78ea d 252 45 -78f7 1 252 45 -78f8 c 167 40 -7904 a 168 40 -FUNC 790e 26 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::begin() -790e c 581 21 -791a 1a 582 40 -FUNC 7934 19 0 std::map, std::less, std::allocator > > >::begin() -7934 c 234 21 -7940 d 235 45 -794d 1 235 45 -FUNC 794e 26 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::end() -794e c 592 21 -795a 1a 593 40 -FUNC 7974 19 0 std::map, std::less, std::allocator > > >::end() -7974 c 251 21 -7980 d 252 45 -798d 1 252 45 -FUNC 798e 11 0 std::_Select1st, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >::operator()(std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*>&) const -798e c 546 22 -799a 5 547 41 -799f 1 547 41 -79a0 c 128 34 -79ac 13 129 34 -79bf 1 129 34 -79cc 22 396 34 -79fa d 199 42 -7a07 1 199 42 -7a08 c 65 68 -7a14 2 65 68 -7a16 c 72 68 -7a22 2 72 68 -7a24 c 97 69 -7a30 d 97 69 -7a3d 1 97 69 -7a3e c 105 69 -7a4a d 105 69 -7a57 1 105 69 -7a58 c 65 68 -7a64 2 65 68 -7a66 c 72 68 -7a72 2 72 68 -7a74 c 105 69 -7a80 d 105 69 -7a8d 1 105 69 -7a8e c 97 69 -7a9a d 97 69 -7aa7 1 97 69 -7aa8 c 72 68 -7ab4 2 72 68 -7ab6 c 105 69 -7ac2 d 105 69 -7acf 1 105 69 -7adc d 94 68 -7ae9 1 94 68 -FUNC 7aea 2f 0 std::_Vector_base >::_M_deallocate(dwarf2reader::CompilationUnit::Abbrev*, unsigned long) -7aea c 120 23 -7af6 6 122 71 -7afc 1d 123 71 -7b19 1 123 71 -7b1a c 108 71 -7b26 43 109 71 -7b69 1 109 71 -7b6a c 65 68 -7b76 2 65 68 -7b78 c 103 69 -7b84 d 103 69 -7b91 1 103 69 -7b92 c 65 68 -7b9e 2 65 68 -7ba0 c 103 69 -7bac d 103 69 -7bb9 1 103 69 -7bc6 d 94 68 -7bd3 1 94 68 -FUNC 7bd4 2f 0 std::_Vector_base >::_M_deallocate(dwarf2reader::SourceFileInfo*, unsigned long) -7bd4 c 120 23 -7be0 6 122 71 -7be6 1d 123 71 -7c03 1 123 71 -7c04 c 108 71 -7c10 43 109 71 -7c53 1 109 71 -7c54 c 188 71 -7c60 12 189 71 -7c72 2 190 71 -7c74 c 35 32 -7c80 d 35 32 -7c8d 1 35 32 -7c9a d 107 68 -7ca7 1 107 68 -FUNC 7ca8 2e 0 void std::_Destroy >(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, std::allocator) -7ca8 c 171 23 -7cb4 2 173 73 -7cb6 12 174 73 -7cc8 c 173 73 -7cd4 2 174 73 -7cd6 d 272 71 -7ce3 8c 273 71 -7d6f 1 273 71 -7d7c d 94 68 -7d89 1 94 68 -FUNC 7d8a 2f 0 std::_Vector_base >::_M_deallocate(std::string*, unsigned long) -7d8a c 120 23 -7d96 6 122 71 -7d9c 1d 123 71 -7db9 1 123 71 -7dba c 108 71 -7dc6 3d 109 71 -7e03 1 109 71 -7e04 c 188 71 -7e10 12 189 71 -7e22 2 190 71 -7e24 d 272 71 -7e31 8c 273 71 -7ebd 1 273 71 -7eca 2b 596 34 -7ef5 1 596 34 -7f02 7 614 72 -7f09 1 614 72 -7f0a c 65 68 -7f16 2 65 68 -7f18 c 72 68 -7f24 2 72 68 -7f26 c 103 69 -7f32 d 103 69 -7f3f 1 103 69 -7f40 c 105 69 -7f4c d 105 69 -7f59 1 105 69 -7f5a c 65 68 -7f66 2 65 68 -7f68 c 72 68 -7f74 2 72 68 -7f76 c 103 69 -7f82 d 103 69 -7f8f 1 103 69 -7f90 c 105 69 -7f9c d 105 69 -7fa9 1 105 69 -7faa c 105 69 -7fb6 d 105 69 -7fc3 1 105 69 -7fd0 d 575 34 -7fdd 1 575 34 -7fea d 575 34 -7ff7 1 575 34 -FUNC 7ff8 11 0 std::_Select1st, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >::operator()(std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*> const&) const -7ff8 c 550 23 -8004 5 551 41 -8009 1 551 41 -8016 2f 600 34 -8045 1 600 34 -8046 c 84 70 -8052 1e 85 70 -FUNC 8070 11 0 std::_Select1st > >::operator()(std::pair >&) const -8070 c 546 23 -807c 5 547 41 -8081 1 547 41 -FUNC 8082 11 0 std::_Select1st > >::operator()(std::pair > const&) const -8082 c 550 23 -808e 5 551 41 -8093 1 551 41 -8094 c 128 34 -80a0 13 129 34 -80b3 1 129 34 -80b4 c 84 70 -80c0 1e 85 70 -80de c 65 68 -80ea 2 65 68 -80ec c 103 69 -80f8 d 103 69 -8105 1 103 69 -8106 c 65 68 -8112 2 65 68 -8114 c 72 68 -8120 2 72 68 -8122 c 105 69 -812e d 105 69 -813b 1 105 69 -813c c 103 69 -8148 d 103 69 -8155 1 103 69 -8156 c 105 69 -8162 d 105 69 -816f 1 105 69 -8170 c 80 71 -817c d 80 71 -8189 1 80 71 -818a c 67 68 -8196 2 67 68 -8198 c 99 69 -81a4 14 100 69 -FUNC 81b8 2b 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::get_allocator() const -81b8 10 93 23 -81c8 1b 94 71 -81e3 1 94 71 -81e4 c 99 69 -81f0 14 100 69 -8210 2 107 68 -FUNC 8212 2e 0 void std::_Destroy<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -8212 c 171 23 -821e 2 173 73 -8220 12 174 73 -8232 c 173 73 -823e 2 174 73 -824c d 107 68 -8259 1 107 68 -825a c 67 68 -8266 2 67 68 -8268 c 99 69 -8274 14 100 69 -8288 c 403 40 -8294 1c 404 40 -82b0 a 406 40 -82ba a 407 40 -82c4 c 408 40 -82d0 e 409 40 -82de c 553 40 -82ea 36 554 40 -8320 2 555 40 -8322 c 103 69 -832e d 103 69 -833b 1 103 69 -FUNC 833c 2b 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::get_allocator() const -833c 10 350 23 -834c 1b 351 40 -8367 1 351 40 -8368 c 69 70 -8374 2 69 70 -8382 d 107 68 -838f 1 107 68 -839c d 94 68 -83a9 1 94 68 -FUNC 83aa 2a 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_put_node(std::_Rb_tree_node >*) -83aa c 359 23 -83b6 1e 360 40 -FUNC 83d4 59 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::destroy_node(std::_Rb_tree_node >*) -83d4 d 387 23 -83e1 35 389 40 -8416 17 390 40 -842d 1 390 40 -FUNC 842e 56 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) -842e c 1051 23 -843a 2 1054 40 -843c 1a 1056 40 -8456 e 1057 40 -8464 12 1058 40 -8476 6 1059 40 -847c 6 1054 40 -8482 2 1059 40 -8484 d 569 40 -8491 58 570 40 -84e9 1 570 40 -84ea c 147 45 -84f6 31 148 45 -8527 1 148 45 -8528 c 92 45 -8534 d 92 45 -8541 1 92 45 -8542 c 67 68 -854e 2 67 68 -8550 c 99 69 -855c 14 100 69 -8570 c 403 40 -857c 1c 404 40 -8598 a 406 40 -85a2 a 407 40 -85ac c 408 40 -85b8 e 409 40 -85c6 c 553 40 -85d2 36 554 40 -8608 2 555 40 -860a c 103 69 -8616 d 103 69 -8623 1 103 69 -FUNC 8624 2b 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::get_allocator() const -8624 10 350 23 -8634 1b 351 40 -864f 1 351 40 -8650 c 69 70 -865c d 69 70 -8669 1 69 70 -866a c 69 70 -8676 30 69 70 -86b2 d 107 68 -86bf 1 107 68 -86cc d 94 68 -86d9 1 94 68 -FUNC 86da 2a 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_put_node(std::_Rb_tree_node > >*) -86da c 359 23 -86e6 1e 360 40 -FUNC 8704 59 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::destroy_node(std::_Rb_tree_node > >*) -8704 d 387 23 -8711 35 389 40 -8746 17 390 40 -875d 1 390 40 -FUNC 875e 56 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_erase(std::_Rb_tree_node > >*) -875e c 1051 23 -876a 2 1054 40 -876c 1a 1056 40 -8786 e 1057 40 -8794 12 1058 40 -87a6 6 1059 40 -87ac 6 1054 40 -87b2 2 1059 40 -87b4 d 569 40 -87c1 58 570 40 -8819 1 570 40 -881a c 147 45 -8826 31 148 45 -8857 1 148 45 -8858 c 92 45 -8864 d 92 45 -8871 1 92 45 -8872 c 603 72 -887e c 603 72 -FUNC 888a 23 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::begin() -888a c 333 23 -8896 17 334 71 -88ad 1 334 71 -88ba 2a 654 72 -FUNC 88e4 42 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::operator[](unsigned long) -88e4 c 494 23 -88f0 36 495 71 -FUNC 8926 26 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::end() -8926 c 351 23 -8932 1a 352 71 -FUNC 894c 28 0 bool std::operator==, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&) -894c c 2115 24 -8958 1c 2116 37 -FUNC 8974 23 0 std::equal_to::operator()(std::string const&, std::string const&) const -8974 c 199 24 -8980 17 200 41 -8997 1 200 41 -8998 c 80 71 -89a4 d 80 71 -89b1 1 80 71 -89b2 c 67 68 -89be 2 67 68 -89c0 c 99 69 -89cc 14 100 69 -FUNC 89e0 2b 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::get_allocator() const -89e0 10 93 24 -89f0 1b 94 71 -8a0b 1 94 71 -8a0c c 99 69 -8a18 14 100 69 -8a2c c 84 71 -8a38 2f 85 71 -8a67 2 86 71 -8a69 1 86 71 -8a6a c 96 71 -8a76 12 97 71 -8a88 2 98 71 -8a96 2 107 68 -FUNC 8a98 2e 0 void std::_Destroy<__gnu_cxx::_Hashtable_node > >**, std::allocator<__gnu_cxx::_Hashtable_node > >*> >(__gnu_cxx::_Hashtable_node > >**, __gnu_cxx::_Hashtable_node > >**, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -8a98 c 171 24 -8aa4 2 173 73 -8aa6 12 174 73 -8ab8 c 173 73 -8ac4 2 174 73 -FUNC 8ac6 13 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::max_size() const -8ac6 c 407 24 -8ad2 7 408 71 -8ad9 1 408 71 -8ada c 603 72 -8ae6 c 603 72 -FUNC 8af2 26 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::end() -8af2 c 351 24 -8afe 1a 352 71 -FUNC 8b18 23 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::begin() -8b18 c 333 24 -8b24 17 334 71 -8b3b 1 334 71 -8b48 2a 654 72 -8b7e 7 614 72 -8b85 1 614 72 -FUNC 8b86 42 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::operator[](unsigned long) -8b86 c 494 24 -8b92 36 495 71 -8bd4 d 107 68 -8be1 1 107 68 -FUNC 8be2 28 0 void std::swap<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**&, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**&) -8be2 c 92 25 -8bee 8 97 61 -8bf6 a 98 61 -8c00 a 99 61 -FUNC 8c0a 50 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::swap(std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >&) -8c0a c 733 25 -8c16 12 735 71 -8c28 18 736 71 -8c40 1a 737 71 -8c66 2b 596 34 -8c91 1 596 34 -8c9e 2f 600 34 -8ccd 1 600 34 -FUNC 8cce 28 0 void std::swap<__gnu_cxx::_Hashtable_node > >**>(__gnu_cxx::_Hashtable_node > >**&, __gnu_cxx::_Hashtable_node > >**&) -8cce c 92 25 -8cda 8 97 61 -8ce2 a 98 61 -8cec a 99 61 -FUNC 8cf6 50 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::swap(std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >&) -8cf6 c 733 25 -8d02 12 735 71 -8d14 18 736 71 -8d2c 1a 737 71 -8d46 c 84 71 -8d52 2f 85 71 -8d81 2 86 71 -8d83 1 86 71 -8d84 c 96 71 -8d90 12 97 71 -8da2 2 98 71 -FUNC 8da4 13 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::max_size() const -8da4 c 407 25 -8db0 7 408 71 -8db7 1 408 71 -8dc4 d 94 68 -8dd1 1 94 68 -FUNC 8dd2 2f 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_deallocate(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long) -8dd2 c 120 25 -8dde 6 122 71 -8de4 1d 123 71 -8e01 1 123 71 -8e02 c 108 71 -8e0e 3d 109 71 -8e4b 1 109 71 -8e4c c 272 71 -8e58 4b 273 71 -8ea3 1 273 71 -8ea4 c 188 71 -8eb0 12 189 71 -8ec2 2 190 71 -8ec4 c 603 72 -8ed0 c 603 72 -FUNC 8edc 2b 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::begin() const -8edc c 342 25 -8ee8 1f 343 71 -8f07 1 343 71 -FUNC 8f08 2c 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::end() const -8f08 c 360 25 -8f14 20 361 71 -8f40 5 666 72 -8f45 1 666 72 -8f53 2b 759 72 -FUNC 8f7e 3c 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::size() const -8f7e c 402 25 -8f8a 30 403 71 -8fc6 26 588 34 -8ff8 15 511 34 -900d 79 513 34 -9086 21 517 34 -90a7 1 517 34 -90b4 14 225 42 -90d4 26 592 34 -FUNC 90fa 49 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::capacity() const -90fa c 449 25 -9106 3d 451 71 -9143 1 451 71 -9144 c 103 69 -9150 d 103 69 -915d 1 103 69 -916e 1b 286 34 -9189 1 286 34 -9196 d 94 68 -91a3 1 94 68 -91b0 1e 301 34 -91db 56 622 34 -9231 17 623 34 -9254 9 1080 34 -925d 1a 1082 34 -9277 2 1083 34 -9279 8 1085 34 -9281 12 1086 34 -9293 6 1087 34 -9299 6 1083 34 -929f 1b 1089 34 -92ba 1d 1080 34 -92d7 c 1091 34 -92e3 1 1091 34 -92e4 d 360 34 -92f1 77 361 34 -9368 c 93 42 -9374 d 93 42 -9381 1 93 42 -9382 c 72 68 -938e 2 72 68 -9390 c 105 69 -939c d 105 69 -93a9 1 105 69 -93aa c 301 66 -93b6 d 301 66 -93c3 1 301 66 -93d0 d 94 68 -93dd 1 94 68 -FUNC 93de 2f 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_deallocate(__gnu_cxx::_Hashtable_node > >**, unsigned long) -93de c 120 26 -93ea 6 122 71 -93f0 1d 123 71 -940d 1 123 71 -940e c 108 71 -941a 3d 109 71 -9457 1 109 71 -9458 c 188 71 -9464 12 189 71 -9476 2 190 71 -9478 c 272 71 -9484 4b 273 71 -94cf 1 273 71 -94d0 c 603 72 -94dc c 603 72 -FUNC 94e8 2b 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::begin() const -94e8 c 342 26 -94f4 1f 343 71 -9513 1 343 71 -FUNC 9514 2c 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::end() const -9514 c 360 26 -9520 20 361 71 -954c 2d 662 72 -9579 1 662 72 -FUNC 957a 2d 0 unsigned long const& std::max(unsigned long const&, unsigned long const&) -957a c 206 26 -9586 e 211 61 -9594 8 212 61 -959c b 213 61 -95a7 1 213 61 -95b4 19 650 72 -95cd 1 650 72 -95da 5 666 72 -95df 1 666 72 -95ed 2b 759 72 -9624 5 666 72 -9629 1 666 72 -9637 2b 759 72 -FUNC 9662 49 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::capacity() const -9662 c 449 26 -966e 3d 451 71 -96ab 1 451 71 -FUNC 96ac 3c 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::size() const -96ac c 402 26 -96b8 30 403 71 -96f4 26 588 34 -9726 26 592 34 -974c c 103 69 -9758 d 103 69 -9765 1 103 69 -9776 1b 286 34 -9791 1 286 34 -979e d 94 68 -97ab 1 94 68 -97b8 1e 301 34 -97e3 56 622 34 -9839 17 623 34 -985c 9 1080 34 -9865 1a 1082 34 -987f 2 1083 34 -9881 8 1085 34 -9889 12 1086 34 -989b 6 1087 34 -98a1 6 1083 34 -98a7 1b 1089 34 -98c2 1d 1080 34 -98df c 1091 34 -98eb 1 1091 34 -98ec d 360 34 -98f9 77 361 34 -9970 c 69 70 -997c 20 69 70 -99a9 5c 104 68 -9a05 1 104 68 -9a06 c 69 70 -9a12 2c 69 70 -9a4b 5c 104 68 -9aa7 1 104 68 -9ab4 2d 662 72 -9ae1 1 662 72 -9aee 19 650 72 -9b07 1 650 72 -9b14 5 666 72 -9b19 1 666 72 -9b27 2b 759 72 -9b52 c 72 68 -9b5e 2 72 68 -9b60 c 105 69 -9b6c d 105 69 -9b79 1 105 69 -9b7a c 69 70 -9b86 2 69 70 -9b94 d 107 68 -9ba1 1 107 68 -9bae d 94 68 -9bbb 1 94 68 -FUNC 9bbc 2a 0 std::_List_base, std::allocator > >::_M_put_node(std::_List_node >*) -9bbc c 315 26 -9bc8 1e 316 66 -FUNC 9be6 35 0 bool __gnu_cxx::operator!=<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > > const&, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > > const&) -9be6 d 699 26 -9bf3 28 700 72 -9c1b 1 700 72 -9c28 d 623 72 -9c35 5 624 72 -FUNC 9c3a 4b 0 void std::__fill::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >* const&) -9c3a c 539 61 -9c46 8 541 61 -9c4e 2 542 61 -9c50 12 543 61 -9c62 21 542 61 -9c83 2 543 61 -9c85 1 543 61 -FUNC 9c86 2b 0 void std::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >* const&) -9c86 c 560 26 -9c92 4 567 61 -9c96 1b 568 61 -9cb1 1 568 61 -FUNC 9cb2 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, std::allocator<__gnu_cxx::_Hashtable_node > >*> >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -9cb2 c 171 26 -9cbe 2 173 73 -9cc0 1a 174 73 -9cda 21 173 73 -9cfb 2 174 73 -9cfd 1 174 73 -9d0a 7 98 68 -9d11 1 98 68 -9d1e 1d 85 68 -9d3b 5 86 68 -9d40 16 88 68 -9d62 1d 297 34 -9d7f 1 297 34 -9d8d e 605 34 -9d9b 9 606 34 -9da4 3c 609 34 -9de0 b 610 34 -9deb 11 609 34 -9dfc b 612 34 -9e07 12 614 34 -9e19 b 615 34 -9e24 13 612 34 -9e37 8 615 34 -9e3f 1 615 34 -9e4d 15 751 34 -9e62 1a 752 34 -9e7c b 754 34 -9e87 49 755 34 -9ed0 3b 756 34 -9f0b 12 754 34 -9f1d 15 758 34 -9f32 8 759 34 -9f3a 1c 760 34 -9f56 f 761 34 -9f65 41 762 34 -9fb2 7 98 68 -9fb9 1 98 68 -9fc6 1d 85 68 -9fe3 5 86 68 -9fe8 17 88 68 -9fff 1 88 68 -a00c 1d 297 34 -a029 1 297 34 -a037 e 605 34 -a045 9 606 34 -a04e 3c 609 34 -a08a b 610 34 -a095 11 609 34 -a0a6 b 612 34 -a0b1 12 614 34 -a0c3 b 615 34 -a0ce 13 612 34 -a0e1 8 615 34 -a0e9 1 615 34 -a0f7 15 751 34 -a10c 1a 752 34 -a126 b 754 34 -a131 49 755 34 -a17a 3b 756 34 -a1b5 12 754 34 -a1c7 15 758 34 -a1dc 8 759 34 -a1e4 1c 760 34 -a200 f 761 34 -a20f 41 762 34 -FUNC a250 35 0 bool __gnu_cxx::operator!=<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > > const&, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > > const&) -a250 d 699 26 -a25d 28 700 72 -a285 1 700 72 -a292 d 623 72 -a29f 5 624 72 -FUNC a2a4 4b 0 void std::__fill::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a2a4 c 539 61 -a2b0 8 541 61 -a2b8 2 542 61 -a2ba 12 543 61 -a2cc 21 542 61 -a2ed 2 543 61 -a2ef 1 543 61 -FUNC a2f0 2b 0 void std::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a2f0 c 560 26 -a2fc 4 567 61 -a300 1b 568 61 -a31b 1 568 61 -FUNC a31c 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -a31c c 171 26 -a328 2 173 73 -a32a 1a 174 73 -a344 21 173 73 -a365 2 174 73 -a367 1 174 73 -a368 c 65 68 -a374 2 65 68 -a376 c 103 69 -a382 d 103 69 -a38f 1 103 69 -FUNC a390 2b 0 std::_List_base, std::allocator > >::get_allocator() const -a390 10 322 26 -a3a0 1b 324 66 -a3bb 1 324 66 -FUNC a3bc 7b 0 std::_List_base, std::allocator > >::_M_clear() -a3bc d 69 27 -a3c9 8 72 77 -a3d1 2 73 77 -a3d3 6 75 77 -a3d9 8 76 77 -a3e1 35 77 77 -a416 12 78 77 -a428 a 73 77 -a432 5 78 77 -a437 1 78 77 -a438 c 331 66 -a444 18 332 66 -a45c c 392 66 -a468 d 392 66 -a475 1 392 66 -a476 c 211 74 -a482 10 211 74 -a49e d 107 68 -a4ab 1 107 68 -FUNC a4ac 2e 0 void std::_Destroy >(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -a4ac c 171 27 -a4b8 2 173 73 -a4ba 12 174 73 -a4cc c 173 73 -a4d8 2 174 73 -a4da c 272 71 -a4e6 4b 273 71 -a531 1 273 71 -a532 13 196 74 -a545 10 196 74 -a555 2f 197 74 -a584 1a 198 74 -a59e 13 196 74 -a5b1 10 196 74 -a5c1 2f 197 74 -a5f0 1a 198 74 -a616 7 98 68 -a61d 1 98 68 -a62a 1d 85 68 -a647 5 86 68 -a64c 10 88 68 -FUNC a65c 2a 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_allocate(unsigned long) -a65c c 116 27 -a668 1e 117 71 -a686 d 100 71 -a693 12 101 71 -a6a5 19 103 71 -a6be b 104 71 -a6c9 3a 105 71 -a703 1 105 71 -a710 7 98 68 -a717 1 98 68 -a724 1d 85 68 -a741 5 86 68 -a746 10 88 68 -FUNC a756 2a 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_allocate(unsigned long) -a756 c 116 27 -a762 1e 117 71 -a780 d 100 71 -a78d 12 101 71 -a79f 19 103 71 -a7b8 b 104 71 -a7c3 3a 105 71 -a7fd 1 105 71 -a80b 12 424 61 -a81d 2e 425 61 -a84b 13 426 61 -a86a 4 440 61 -a86e 1b 443 61 -a889 1 443 61 -a898 56 482 61 -a8fa 4 514 61 -a8fe 4 515 61 -a902 1b 517 61 -a91d 1 517 61 -a92a 8 616 61 -a932 2 617 61 -a934 8 618 61 -a93c f 617 61 -a94b 5 619 61 -a95c 4 641 61 -a960 1b 642 61 -a97b 1 642 61 -FUNC a97c 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, __true_type) -a97c c 182 28 -a988 1b 183 79 -a9a3 1 183 79 -FUNC a9a4 2f 0 void std::uninitialized_fill_n<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a9a4 c 214 28 -a9b0 23 218 79 -a9d3 1 218 79 -FUNC a9d4 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -a9d4 c 308 28 -a9e0 1b 310 79 -a9fb 1 310 79 -a9fc c 200 71 -aa08 19 201 71 -aa21 42 203 71 -aa63 15 205 71 -aa85 11 992 34 -aa96 c 993 34 -aaa2 15 995 34 -aab7 c 996 34 -aac3 4a 998 34 -ab0d f 1001 34 -ab1c 1c 998 34 -ab38 1a 1003 34 -ab52 5 1004 34 -ab57 1f 1007 34 -ab76 1c 1008 34 -ab92 19 1009 34 -abab 19 1010 34 -abc4 1a 1011 34 -abde a 1004 34 -abe8 11 1001 34 -abf9 15 1014 34 -ac0e 13 1028 34 -ac21 b 1016 34 -ac2c 9 1018 34 -ac35 19 1023 34 -ac4e 23 1024 34 -ac71 19 1025 34 -ac8a 1d 1021 34 -aca7 1a 1018 34 -acc1 b 1028 34 -accc b 1016 34 -acd7 1e 1028 34 -acf5 1 1028 34 -ad06 16 438 34 -ad1c 37 439 34 -ad53 1 439 34 -ad64 37 212 42 -ad9b 1 212 42 -ada8 8 616 61 -adb0 2 617 61 -adb2 8 618 61 -adba f 617 61 -adc9 5 619 61 -adda 4 641 61 -adde 1b 642 61 -adf9 1 642 61 -FUNC adfa 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, __true_type) -adfa c 182 28 -ae06 1b 183 79 -ae21 1 183 79 -FUNC ae22 2f 0 void std::uninitialized_fill_n<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -ae22 c 214 28 -ae2e 23 218 79 -ae51 1 218 79 -FUNC ae52 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -ae52 c 308 28 -ae5e 1b 310 79 -ae79 1 310 79 -ae7a c 200 71 -ae86 19 201 71 -ae9f 42 203 71 -aee1 15 205 71 -af03 11 992 34 -af14 c 993 34 -af20 15 995 34 -af35 c 996 34 -af41 4a 998 34 -af8b f 1001 34 -af9a 1c 998 34 -afb6 1a 1003 34 -afd0 5 1004 34 -afd5 1f 1007 34 -aff4 1c 1008 34 -b010 19 1009 34 -b029 19 1010 34 -b042 1a 1011 34 -b05c a 1004 34 -b066 11 1001 34 -b077 15 1014 34 -b08c 13 1028 34 -b09f b 1016 34 -b0aa 9 1018 34 -b0b3 19 1023 34 -b0cc 23 1024 34 -b0ef 19 1025 34 -b108 1d 1021 34 -b125 1a 1018 34 -b13f b 1028 34 -b14a b 1016 34 -b155 1e 1028 34 -b173 1 1028 34 -b184 16 438 34 -b19a 37 439 34 -b1d1 1 439 34 -b1e2 37 212 42 -b219 1 212 42 -b227 12 424 61 -b239 2e 425 61 -b267 13 426 61 -b286 4 440 61 -b28a 1b 443 61 -b2a5 1 443 61 -b2b4 56 482 61 -b316 4 514 61 -b31a 4 515 61 -b31e 1b 517 61 -b339 1 517 61 -b346 8 616 61 -b34e 2 617 61 -b350 12 618 61 -b362 16 617 61 -b378 5 619 61 -b37d 1 619 61 -b38a 4 641 61 -b38e 1b 642 61 -b3a9 1 642 61 -FUNC b3aa 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, __true_type) -b3aa c 182 28 -b3b6 1b 183 79 -b3d1 1 183 79 -FUNC b3d2 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -b3d2 c 214 28 -b3de 23 218 79 -b401 1 218 79 -FUNC b402 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -b402 c 308 28 -b40e 1b 310 79 -b429 1 310 79 -b436 8 616 61 -b43e 2 617 61 -b440 12 618 61 -b452 16 617 61 -b468 5 619 61 -b46d 1 619 61 -b47a 4 641 61 -b47e 1b 642 61 -b499 1 642 61 -FUNC b49a 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, __true_type) -b49a c 182 28 -b4a6 1b 183 79 -b4c1 1 183 79 -FUNC b4c2 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -b4c2 c 214 28 -b4ce 23 218 79 -b4f1 1 218 79 -FUNC b4f2 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -b4f2 c 308 28 -b4fe 1b 310 79 -b519 1 310 79 -b526 22 300 61 -b548 11 301 61 -b559 1 301 61 -b566 4 315 61 -b56a 1b 317 61 -b585 1 317 61 -b592 1b 326 61 -b5ad 1 326 61 -b5ba 4 384 61 -b5be 4 385 61 -b5c2 1b 387 61 -b5dd 1 387 61 -b5ea 1b 74 79 -b605 1 74 79 -b612 23 113 79 -b635 1 113 79 -b642 1b 254 79 -b65d 1 254 79 -b66a 15 763 71 -b67f 40 766 71 -b6bf 3 768 71 -b6c2 2 773 71 -FUNC b6c4 124 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::reserve(unsigned long) -b6c4 13 69 29 -b6d7 15 71 78 -b6ec e 72 78 -b6fa 19 73 78 -b713 e 75 78 -b721 28 78 78 -b749 3e 79 78 -b787 30 81 78 -b7b7 8 84 78 -b7bf 11 85 78 -b7d0 18 86 78 -b7f5 33 335 61 -b834 4 384 61 -b838 4 385 61 -b83c 1b 387 61 -b857 1 387 61 -b864 1b 74 79 -b87f 1 74 79 -b88c 23 113 79 -b8af 1 113 79 -b8bc 1b 254 79 -b8d7 1 254 79 -b8e6 56 354 61 -b948 4 384 61 -b94c 4 385 61 -b950 1b 387 61 -b96b 1 387 61 -b978 1b 74 79 -b993 1 74 79 -b9a0 23 113 79 -b9c3 1 113 79 -b9d0 1b 254 79 -b9eb 1 254 79 -FUNC b9ec 46e 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -b9ec 14 311 29 -ba00 b 313 78 -ba0b 24 315 78 -ba2f 8 318 78 -ba37 23 319 78 -ba5a 15 320 78 -ba6f c 321 78 -ba7b 51 323 78 -bacc 14 327 78 -bae0 30 328 78 -bb10 35 330 78 -bb45 48 334 78 -bb8d 17 338 78 -bba4 43 339 78 -bbe7 14 342 78 -bbfb 1e 343 78 -bc19 e 348 78 -bc27 1e 349 78 -bc45 e 350 78 -bc53 1d 353 78 -bc70 8 354 78 -bc78 e 355 78 -bc86 27 357 78 -bcad 6 358 78 -bcb3 4d 361 78 -bd00 40 365 78 -bd40 18 367 78 -bd58 4d 368 78 -bda5 3e 379 78 -bde3 30 381 78 -be13 12 384 78 -be25 13 385 78 -be38 22 386 78 -FUNC be5a 2e 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -be5a c 657 29 -be66 22 658 71 -be94 15 580 34 -bea9 15 581 34 -bebe 37 582 34 -bef5 c 583 34 -bf01 1 583 34 -bf02 d 335 34 -bf0f 4e 337 34 -bf5d 4d 338 34 -bfaa d 134 42 -bfb7 65 135 42 -c028 22 300 61 -c04a 11 301 61 -c05b 1 301 61 -c068 4 315 61 -c06c 1b 317 61 -c087 1 317 61 -c094 1b 326 61 -c0af 1 326 61 -c0bc 4 384 61 -c0c0 4 385 61 -c0c4 1b 387 61 -c0df 1 387 61 -c0ec 1b 74 79 -c107 1 74 79 -c114 23 113 79 -c137 1 113 79 -c144 1b 254 79 -c15f 1 254 79 -c16c 15 763 71 -c181 40 766 71 -c1c1 3 768 71 -c1c4 2 773 71 -FUNC c1c6 124 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::reserve(unsigned long) -c1c6 13 69 29 -c1d9 15 71 78 -c1ee e 72 78 -c1fc 19 73 78 -c215 e 75 78 -c223 28 78 78 -c24b 3e 79 78 -c289 30 81 78 -c2b9 8 84 78 -c2c1 11 85 78 -c2d2 18 86 78 -c2f7 33 335 61 -c336 4 384 61 -c33a 4 385 61 -c33e 1b 387 61 -c359 1 387 61 -c366 1b 74 79 -c381 1 74 79 -c38e 23 113 79 -c3b1 1 113 79 -c3be 1b 254 79 -c3d9 1 254 79 -c3e8 56 354 61 -c44a 4 384 61 -c44e 4 385 61 -c452 1b 387 61 -c46d 1 387 61 -c47a 1b 74 79 -c495 1 74 79 -c4a2 23 113 79 -c4c5 1 113 79 -c4d2 1b 254 79 -c4ed 1 254 79 -FUNC c4ee 46e 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -c4ee 14 311 29 -c502 b 313 78 -c50d 24 315 78 -c531 8 318 78 -c539 23 319 78 -c55c 15 320 78 -c571 c 321 78 -c57d 51 323 78 -c5ce 14 327 78 -c5e2 30 328 78 -c612 35 330 78 -c647 48 334 78 -c68f 17 338 78 -c6a6 43 339 78 -c6e9 14 342 78 -c6fd 1e 343 78 -c71b e 348 78 -c729 1e 349 78 -c747 e 350 78 -c755 1d 353 78 -c772 8 354 78 -c77a e 355 78 -c788 27 357 78 -c7af 6 358 78 -c7b5 4d 361 78 -c802 40 365 78 -c842 18 367 78 -c85a 4d 368 78 -c8a7 3e 379 78 -c8e5 30 381 78 -c915 12 384 78 -c927 13 385 78 -c93a 22 386 78 -FUNC c95c 2e 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -c95c c 657 29 -c968 22 658 71 -c996 15 580 34 -c9ab 15 581 34 -c9c0 37 582 34 -c9f7 c 583 34 -ca03 1 583 34 -ca04 d 335 34 -ca11 4e 337 34 -ca5f 4d 338 34 -caac d 134 42 -cab9 65 135 42 -FUNC cb1e 44 0 dwarf2reader::CUFunctionInfoHandler::StartCompilationUnit(unsigned long long, unsigned char, unsigned char, unsigned long long, unsigned char) -cb1e 39 135 42 -cb57 5 102 30 -cb5c 6 103 30 -FUNC cb62 41 0 dwarf2reader::CUFunctionInfoHandler::ProcessAttributeString(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, std::string const&) -cb62 18 136 30 -cb7a 10 137 30 -cb8a 17 138 30 -cba1 2 139 30 -cba3 1 139 30 -FUNC cba4 2a5 0 dwarf2reader::CUFunctionInfoHandler::ProcessAttributeUnsigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, unsigned long long) -cba4 2d 144 30 -cbd1 a 145 30 -cbdb 58 146 30 -cc33 35 147 30 -cc68 32 146 30 -cc9a 2a 147 30 -ccc4 82 152 30 -cd46 18 153 30 -cd5e 1c 152 30 -cd7a 2f 153 30 -cda9 e 154 30 -cdb7 28 155 30 -cddf 12 157 30 -cdf1 2 158 30 -cdf3 12 160 30 -ce05 2 161 30 -ce07 c 163 30 -ce13 2 164 30 -ce15 2c 166 30 -ce41 8 172 30 -ce49 1 172 30 -FUNC ce4a 19c 0 dwarf2reader::CULineInfoHandler::AddLine(unsigned long long, unsigned int, unsigned int, unsigned int) -ce4a 20 84 30 -ce6a 1c 85 30 -ce86 9c 87 30 -cf22 4f 89 30 -cf71 19 87 30 -cf8a 25 90 30 -cfaf 30 93 30 -cfdf 7 95 30 -FUNC cfe6 9f 0 dwarf2reader::CUFunctionInfoHandler::EndDIE(unsigned long long) -cfe6 19 174 30 -cfff 1c 175 30 -d01b 65 177 30 -d080 5 178 30 -d085 1 178 30 -FUNC d086 164 0 dwarf2reader::CUFunctionInfoHandler::StartDIE(unsigned long long, dwarf2reader::DwarfTag, std::list, std::allocator > > const&) -d086 20 111 30 -d0a6 1c 112 30 -d0c2 c 126 30 -d0ce 23 115 30 -d0f1 26 116 30 -d117 1a 117 30 -d131 d 118 30 -d13e 1b 119 30 -d159 5f 120 30 -d1b8 c 124 30 -d1c4 1c 115 30 -d1e0 3 126 30 -d1e3 7 129 30 -FUNC d1ea 73 0 dwarf2reader::CULineInfoHandler::DefineDir(std::string const&, unsigned int) -d1ea 13 52 30 -d1fd 45 54 30 -d242 15 55 30 -d257 6 56 30 -d25d 1 56 30 -FUNC d25e 23b 0 dwarf2reader::CULineInfoHandler::DefineFile(std::string const&, int, unsigned int, unsigned long long, unsigned long long) -d25e 2c 60 30 -d28a 45 62 30 -d2cf 2f 65 30 -d2fe 24 66 30 -d322 b 68 30 -d32d e 69 30 -d33b 19 71 30 -d354 17 72 30 -d36b 93 74 30 -d3fe 64 77 30 -d462 30 79 30 -d492 7 81 30 -d499 1 81 30 -d49a 14 38 30 -d4ae 36 40 30 -d4e4 41 43 30 -d525 41 44 30 -d566 67 45 30 -d5cd 10 46 30 -d5dd 13 45 30 -d5f0 15 47 30 -d605 e 48 30 -d613 3d 49 30 -d650 20 50 30 -d670 14 38 30 -d684 36 40 30 -d6ba 41 43 30 -d6fb 41 44 30 -d73c 67 45 30 -d7a3 10 46 30 -d7b3 13 45 30 -d7c6 15 47 30 -d7db e 48 30 -d7e9 3d 49 30 -d826 20 50 30 -d846 12 125 74 -d858 12 125 74 -d86a 13 55 32 -d87d 35 55 32 -d8b2 13 98 32 -d8c5 35 98 32 -d8fa c 35 32 -d906 d 35 32 -d913 1 35 32 -d914 d 22 32 -d921 40 22 32 -d961 1 22 32 -d962 c 89 70 -d96e 1e 90 70 -d998 14 208 34 -d9ac c 190 67 -d9b8 a 190 67 -d9c2 c 259 67 -d9ce 21 259 67 -d9ef 1 259 67 -FUNC d9f0 13 0 std::auto_ptr::operator->() const -d9f0 c 283 35 -d9fc 7 286 67 -da03 1 286 67 -da11 5c 104 68 -da6d 1 104 68 -FUNC da6e 28 0 bool std::operator==, std::allocator >(std::basic_string, std::allocator > const&, char const*) -da6e c 2139 37 -da7a 1c 2140 37 -FUNC da96 5d 0 std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, char const*) -da96 d 2081 37 -daa3 12 2083 37 -dab5 1a 2084 37 -dacf 24 2085 37 -daf3 1 2085 37 -FUNC daf4 5d 0 std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&) -daf4 d 2044 37 -db01 12 2046 37 -db13 1a 2047 37 -db2d 24 2048 37 -db51 1 2048 37 -db52 c 84 70 -db5e 17 85 70 -db75 1 85 70 -FUNC db76 2d 0 std::pair std::make_pair(char const*, unsigned int) -db76 c 144 37 -db82 21 145 70 -dba3 1 145 70 -dba4 c 84 70 -dbb0 23 85 70 -dbd3 1 85 70 -FUNC dbd4 3c 0 std::pair > std::make_pair >(unsigned long long, std::pair) -dbd4 1c 144 37 -dbf0 20 145 70 -dc10 d 89 70 -dc1d 64 90 70 -dc81 1 90 70 -dc82 c 89 70 -dc8e 2a 90 70 -dcb8 c 84 70 -dcc4 1d 85 70 -dce1 1 85 70 -FUNC dce2 3c 0 std::pair std::make_pair(unsigned long long, dwarf2reader::FunctionInfo*) -dce2 1c 144 37 -dcfe 20 145 70 -dd2a a 190 34 -dd40 d 194 34 -dd4d 1 194 34 -dd4e c 603 72 -dd5a c 603 72 -FUNC dd66 2b 0 std::vector >::begin() const -dd66 c 342 39 -dd72 1f 343 71 -dd91 1 343 71 -FUNC dd92 2c 0 std::vector >::end() const -dd92 c 360 39 -dd9e 20 361 71 -ddca 5 666 72 -ddcf 1 666 72 -dddd 2b 759 72 -FUNC de08 3c 0 std::vector >::size() const -de08 c 402 39 -de14 30 403 71 -FUNC de44 2b 0 std::vector >::begin() const -de44 c 342 39 -de50 1f 343 71 -de6f 1 343 71 -FUNC de70 2c 0 std::vector >::end() const -de70 c 360 39 -de7c 20 361 71 -dea9 31 759 72 -FUNC deda 3c 0 std::vector >::size() const -deda c 402 39 -dee6 30 403 71 -df16 c 603 72 -df22 c 603 72 -FUNC df2e 26 0 std::vector >::end() -df2e c 351 39 -df3a 1a 352 71 -df60 7 614 72 -df67 1 614 72 -FUNC df68 13 0 std::vector >::max_size() const -df68 c 407 39 -df74 7 408 71 -df7b 1 408 71 -df88 5 666 72 -df8d 1 666 72 -df9a d 623 72 -dfa7 5 624 72 -FUNC dfac 23 0 std::vector >::begin() -dfac c 333 39 -dfb8 17 334 71 -dfcf 1 334 71 -dfd0 c 35 32 -dfdc 26 35 32 -e00f 5c 104 68 -e06b 1 104 68 -e078 7 614 72 -e07f 1 614 72 -FUNC e080 35 0 dwarf2reader::SourceFileInfo::operator=(dwarf2reader::SourceFileInfo const&) -e080 c 35 39 -e08c 29 35 32 -e0b5 1 35 32 -FUNC e0b6 13 0 std::vector >::max_size() const -e0b6 c 407 39 -e0c2 7 408 71 -e0c9 1 408 71 -e0d6 d 623 72 -e0e3 5 624 72 -FUNC e0e8 3c 0 std::vector >::_M_range_check(unsigned long) const -e0e8 13 515 39 -e0fb 15 517 71 -e110 14 518 71 -FUNC e124 3c 0 std::vector >::_M_range_check(unsigned long) const -e124 13 515 39 -e137 15 517 71 -e14c 14 518 71 -e16c 2a 654 72 -FUNC e196 42 0 std::vector >::operator[](unsigned long) -e196 c 494 39 -e1a2 36 495 71 -FUNC e1d8 32 0 std::vector >::at(unsigned long) -e1d8 c 534 39 -e1e4 12 536 71 -e1f6 14 537 71 -e216 32 654 72 -FUNC e248 42 0 std::vector >::operator[](unsigned long) -e248 c 494 39 -e254 36 495 71 -FUNC e28a 32 0 std::vector >::at(unsigned long) -e28a c 534 39 -e296 12 536 71 -e2a8 14 537 71 -FUNC e2bc 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_end() -e2bc c 472 40 -e2c8 8 473 40 -FUNC e2d0 11 0 std::_Select1st > >::operator()(std::pair > const&) const -e2d0 c 550 41 -e2dc 5 551 41 -e2e1 1 551 41 -FUNC e2e2 53 0 std::less::operator()(unsigned long long const&, unsigned long long const&) const -e2e2 c 226 41 -e2ee 47 227 41 -e335 1 227 41 -FUNC e336 20 0 std::_Rb_tree_iterator > >::operator==(std::_Rb_tree_iterator > > const&) const -e336 c 209 41 -e342 14 210 40 -e356 c 84 70 -e362 18 85 70 -FUNC e37a 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_end() -e37a c 472 41 -e386 8 473 40 -FUNC e38e 11 0 std::_Select1st >::operator()(std::pair const&) const -e38e c 550 41 -e39a 5 551 41 -e39f 1 551 41 -FUNC e3a0 20 0 std::_Rb_tree_iterator >::operator==(std::_Rb_tree_iterator > const&) const -e3a0 c 209 41 -e3ac 14 210 40 -e3c0 c 84 70 -e3cc 18 85 70 -e3e4 c 180 34 -e3f0 13 181 34 -e403 1 181 34 -e410 22 409 34 -e43e d 207 42 -e44b 1 207 42 -FUNC e44c 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -e44c d 699 42 -e459 28 700 72 -e481 1 700 72 -FUNC e482 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -e482 c 171 43 -e48e 2 173 73 -e490 1a 174 73 -e4aa 21 173 73 -e4cb 2 174 73 -e4cd 1 174 73 -FUNC e4ce 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -e4ce d 699 43 -e4db 28 700 72 -e503 1 700 72 -FUNC e504 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -e504 c 171 43 -e510 2 173 73 -e512 1a 174 73 -e52c 21 173 73 -e54d 2 174 73 -e54f 1 174 73 -FUNC e550 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_value(std::_Rb_tree_node > > const*) -e550 c 480 43 -e55c 8 481 40 -FUNC e564 28 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_key(std::_Rb_tree_node > > const*) -e564 c 484 43 -e570 1c 485 40 -FUNC e58c 25 0 std::_Rb_tree_iterator >::operator--() -e58c c 194 43 -e598 14 196 40 -e5ac 5 197 40 -e5b1 1 197 40 -FUNC e5b2 25 0 std::_Rb_tree_iterator > >::operator--() -e5b2 c 194 43 -e5be 14 196 40 -e5d2 5 197 40 -e5d7 1 197 40 -FUNC e5d8 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_value(std::_Rb_tree_node_base const*) -e5d8 c 504 43 -e5e4 8 505 40 -FUNC e5ec 28 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_key(std::_Rb_tree_node_base const*) -e5ec c 508 43 -e5f8 1c 509 40 -FUNC e614 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value(std::_Rb_tree_node > const*) -e614 c 480 43 -e620 8 481 40 -FUNC e628 28 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_key(std::_Rb_tree_node > const*) -e628 c 484 43 -e634 1c 485 40 -FUNC e650 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value(std::_Rb_tree_node_base const*) -e650 c 504 43 -e65c 8 505 40 -FUNC e664 28 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_key(std::_Rb_tree_node_base const*) -e664 c 508 43 -e670 1c 509 40 -e698 7 614 72 -e69f 1 614 72 -e6ac 7 98 68 -e6b3 1 98 68 -e6c0 1d 85 68 -e6dd 5 86 68 -e6e2 10 88 68 -FUNC e6f2 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -e6f2 c 116 43 -e6fe 1e 117 71 -e728 7 98 68 -e72f 1 98 68 -e73c 1d 85 68 -e759 5 86 68 -e75e 16 88 68 -FUNC e774 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -e774 c 116 43 -e780 1e 117 71 -e7aa 3a 104 68 -e7f0 2a 654 72 -FUNC e81a 42 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::operator[](unsigned long) const -e81a c 509 43 -e826 36 510 71 -FUNC e85c 4e 0 std::string* std::__copy_backward::copy_b(std::string*, std::string*, std::string*) -e85c c 408 61 -e868 14 411 61 -e87c 1e 412 61 -e89a b 411 61 -e8a5 5 413 61 -FUNC e8aa 2b 0 std::string* std::__copy_backward_aux(std::string*, std::string*, std::string*) -e8aa c 432 44 -e8b6 4 440 61 -e8ba 1b 443 61 -e8d5 1 443 61 -e8e4 56 482 61 -e946 4 514 61 -e94a 4 515 61 -e94e 1b 517 61 -e969 1 517 61 -FUNC e96a 69 0 void std::_Construct(std::string*, std::string const&) -e96a d 77 44 -e977 5c 81 73 -e9d3 1 81 73 -FUNC e9d4 54 0 dwarf2reader::SourceFileInfo* std::__copy_backward::copy_b(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*) -e9d4 c 408 61 -e9e0 1a 411 61 -e9fa 1e 412 61 -ea18 b 411 61 -ea23 5 413 61 -FUNC ea28 2b 0 dwarf2reader::SourceFileInfo* std::__copy_backward_aux(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*) -ea28 c 432 44 -ea34 4 440 61 -ea38 1b 443 61 -ea53 1 443 61 -ea62 56 482 61 -eac4 4 514 61 -eac8 4 515 61 -eacc 1b 517 61 -eae7 1 517 61 -FUNC eae8 69 0 void std::_Construct(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo const&) -eae8 d 77 44 -eaf5 5c 81 73 -eb51 1 81 73 -eb52 c 69 70 -eb5e 20 69 70 -eb7e c 69 70 -eb8a 2a 69 70 -ebc1 5c 104 68 -ec1d 1 104 68 -ec2a 15 523 34 -ec3f 79 525 34 -ecb8 21 529 34 -ecd9 1 529 34 -ece6 14 229 42 -ed06 7 98 68 -ed0d 1 98 68 -ed1a 1d 85 68 -ed37 5 86 68 -ed3c 10 88 68 -FUNC ed4c 29 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_get_node() -ed4c c 355 44 -ed58 1d 356 40 -ed75 1 356 40 -FUNC ed76 b6 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_create_node(std::pair > const&) -ed76 d 363 44 -ed83 e 365 40 -ed91 3c 367 40 -edcd b 373 40 -edd8 11 367 40 -ede9 b 368 40 -edf4 12 370 40 -ee06 b 371 40 -ee11 13 368 40 -ee24 8 373 40 -FUNC ee2c cd 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair > const&) -ee2c d 787 44 -ee39 15 789 40 -ee4e 5d 792 40 -eeab 24 796 40 -eecf f 798 40 -eede 1b 799 40 -eef9 1 799 40 -FUNC eefa 1ef 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::insert_unique(std::pair > const&) -eefa d 869 44 -ef07 e 871 40 -ef15 e 872 40 -ef23 4 873 40 -ef27 2 874 40 -ef29 6 876 40 -ef2f 35 877 40 -ef64 2a 878 40 -ef8e 6 874 40 -ef94 12 880 40 -efa6 a 881 40 -efb0 24 882 40 -efd4 51 883 40 -f025 b 885 40 -f030 36 886 40 -f066 4e 887 40 -f0b4 35 888 40 -f0e9 1 888 40 -FUNC f0ea 20 0 std::map, std::less, std::allocator > > >::insert(std::pair > const&) -f0ea c 359 45 -f0f6 14 360 45 -f116 7 98 68 -f11d 1 98 68 -f12a 1d 85 68 -f147 5 86 68 -f14c 1d 88 68 -f169 1 88 68 -FUNC f16a 29 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_node() -f16a c 355 45 -f176 1d 356 40 -f193 1 356 40 -FUNC f194 5f 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) -f194 d 363 45 -f1a1 e 365 40 -f1af 3c 367 40 -f1eb 8 373 40 -f1f3 1 373 40 -FUNC f1f4 cd 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair const&) -f1f4 d 787 45 -f201 15 789 40 -f216 5d 792 40 -f273 24 796 40 -f297 f 798 40 -f2a6 1b 799 40 -f2c1 1 799 40 -FUNC f2c2 1ef 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::insert_unique(std::pair const&) -f2c2 d 869 45 -f2cf e 871 40 -f2dd e 872 40 -f2eb 4 873 40 -f2ef 2 874 40 -f2f1 6 876 40 -f2f7 35 877 40 -f32c 2a 878 40 -f356 6 874 40 -f35c 12 880 40 -f36e a 881 40 -f378 24 882 40 -f39c 51 883 40 -f3ed b 885 40 -f3f8 36 886 40 -f42e 4e 887 40 -f47c 35 888 40 -f4b1 1 888 40 -FUNC f4b2 20 0 std::map, std::allocator > >::insert(std::pair const&) -f4b2 c 359 45 -f4be 14 360 45 -FUNC f4d2 19 0 void std::_Destroy(std::string*) -f4d2 c 106 45 -f4de d 107 73 -f4eb 1 107 73 -FUNC f4ec 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -f4ec c 119 45 -f4f8 2 121 73 -f4fa 13 122 73 -f50d 21 121 73 -f52e 2 122 73 -FUNC f530 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -f530 c 148 45 -f53c 1c 155 73 -f565 6 82 79 -f56b 2 85 79 -f56d 24 86 79 -f591 2c 85 79 -f5bd b 87 79 -f5c8 b 89 79 -f5d3 12 91 79 -f5e5 b 92 79 -f5f0 13 89 79 -f603 9 92 79 -f618 23 113 79 -f63b 1 113 79 -f648 1b 254 79 -f663 1 254 79 -FUNC f664 430 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, std::string const&) -f664 14 249 47 -f678 14 251 78 -f68c 22 253 78 -f6ae f 255 78 -f6bd 12 256 78 -f6cf 55 257 78 -f724 4b 260 78 -f76f e 264 78 -f77d 15 265 78 -f792 e 266 78 -f7a0 1d 271 78 -f7bd 8 272 78 -f7c5 e 273 78 -f7d3 27 275 78 -f7fa 6 276 78 -f800 55 279 78 -f855 25 284 78 -f87a b 285 78 -f885 4f 286 78 -f8d4 3 284 78 -f8d7 13 279 78 -f8ea e 286 78 -f8f8 4d 298 78 -f945 30 299 78 -f975 12 302 78 -f987 13 303 78 -f99a 23 304 78 -f9bd 3 298 78 -f9c0 13 286 78 -f9d3 b 292 78 -f9de 39 294 78 -fa17 23 295 78 -fa3a 8 296 78 -fa42 16 294 78 -fa58 3 296 78 -fa5b 19 292 78 -fa74 19 298 78 -fa8d 7 304 78 -FUNC fa94 70 0 std::vector >::push_back(std::string const&) -fa94 c 602 47 -faa0 10 604 71 -fab0 1e 606 71 -face 11 607 71 -fadf 25 610 71 -FUNC fb04 19 0 void std::_Destroy(dwarf2reader::SourceFileInfo*) -fb04 c 106 47 -fb10 d 107 73 -fb1d 1 107 73 -FUNC fb1e 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -fb1e c 119 47 -fb2a 2 121 73 -fb2c 13 122 73 -fb3f 21 121 73 -fb60 2 122 73 -FUNC fb62 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -fb62 c 148 47 -fb6e 1c 155 73 -fb97 6 82 79 -fb9d 2 85 79 -fb9f 24 86 79 -fbc3 2c 85 79 -fbef b 87 79 -fbfa b 89 79 -fc05 12 91 79 -fc17 b 92 79 -fc22 13 89 79 -fc35 9 92 79 -fc4a 23 113 79 -fc6d 1 113 79 -fc7a 1b 254 79 -fc95 1 254 79 -FUNC fc96 43d 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, dwarf2reader::SourceFileInfo const&) -fc96 14 249 47 -fcaa 14 251 78 -fcbe 22 253 78 -fce0 f 255 78 -fcef 12 256 78 -fd01 55 257 78 -fd56 4b 260 78 -fda1 e 264 78 -fdaf 15 265 78 -fdc4 e 266 78 -fdd2 1d 271 78 -fdef 8 272 78 -fdf7 e 273 78 -fe05 27 275 78 -fe2c 6 276 78 -fe32 55 279 78 -fe87 25 284 78 -feac b 285 78 -feb7 4f 286 78 -ff06 3 284 78 -ff09 13 279 78 -ff1c e 286 78 -ff2a 4d 298 78 -ff77 36 299 78 -ffad 12 302 78 -ffbf 13 303 78 -ffd2 2a 304 78 -fffc 3 298 78 -ffff 13 286 78 -10012 b 292 78 -1001d 39 294 78 -10056 23 295 78 -10079 8 296 78 -10081 16 294 78 -10097 3 296 78 -1009a 19 292 78 -100b3 19 298 78 -100cc 7 304 78 -100d3 1 304 78 -FUNC 100d4 70 0 std::vector >::push_back(dwarf2reader::SourceFileInfo const&) -100d4 c 602 47 -100e0 10 604 71 -100f0 1e 606 71 -1010e 11 607 71 -1011f 25 610 71 -FUNC 10144 16c 0 Start -10144 17 610 71 -1015b 40 49 48 -1019b 6 51 48 -101a1 3f 53 48 -101e0 7 54 48 -101e7 5 55 48 -101ec 2a 58 48 -10216 61 61 48 -10277 7 62 48 -1027e 2 63 48 -10280 29 66 48 -102a9 7 67 48 -FUNC 102b0 108 0 Usage -102b0 19 70 48 -102c9 30 71 48 -102f9 29 73 48 -10322 30 74 48 -10352 30 75 48 -10382 30 76 48 -103b2 6 77 48 -FUNC 103b8 3af 0 SetupOptions -103b8 21 80 48 -103d9 8 82 48 -103e1 6 85 48 -103e7 10 86 48 -103f7 2e 88 48 -10425 2f 94 48 -10454 2a 91 48 -1047e 23 95 48 -104a1 3e 97 48 -104df 11 98 48 -104f0 7c 99 48 -1056c c 100 48 -10578 5 99 48 -1057d 3e 101 48 -105bb 11 102 48 -105cc 3e 103 48 -1060a 11 104 48 -1061b 37 106 48 -10652 b 107 48 -1065d c 108 48 -10669 b 113 48 -10674 c 114 48 -10680 14 119 48 -10694 30 120 48 -106c4 b 121 48 -106cf c 122 48 -106db 81 127 48 -1075c b 128 48 -10767 1 128 48 -FUNC 10768 a7 0 main -10768 13 131 48 -1077b 37 132 48 -107b2 1e 135 48 -107d0 e 136 48 -107de 8 137 48 -107e6 17 139 48 -107fd c 141 48 -10809 6 142 48 -1080f 1 142 48 -10810 c 47 49 -1081c 1a 48 49 -10836 2 49 49 -10838 c 47 49 -10844 1a 48 49 -1085e 2 49 49 -FUNC 10860 cb 0 google_breakpad::FileID::FileIdentifier(unsigned char*) -10860 f 51 49 -1086f 16 52 49 -10885 6 53 49 -1088b f 54 49 -1089a b 57 49 -108a5 7 62 49 -108ac 2 63 49 -108ae 1c 64 49 -108ca 32 63 49 -108fc b 67 49 -10907 12 68 49 -10919 10 70 49 -10929 2 71 49 -1092b 1 71 49 -FUNC 1092c f2 0 google_breakpad::FileID::MachoIdentifier(int, unsigned char*) -1092c 10 73 49 -1093c 15 74 49 -10951 20 76 49 -10971 f 77 49 -10980 20 79 49 -109a0 c 80 49 -109ac 69 82 49 -10a15 9 83 49 -FUNC 10a1e fb 0 google_breakpad::FileID::ConvertIdentifierToString(unsigned char const*, char*, int) -10a1e c 87 49 -10a2a 7 88 49 -10a31 c 89 49 -10a3d 15 90 49 -10a52 12 91 49 -10a64 18 93 49 -10a7c e 94 49 -10a8a 2b 96 49 -10ab5 2b 97 49 -10ae0 17 89 49 -10af7 20 101 49 -10b17 2 102 49 -10b19 1 102 49 -FUNC 10b1a 13 0 NXHostByteOrder -10b1a c 144 56 -10b26 5 147 56 -10b2b 2 153 56 -10b2d 1 153 56 -10b2e c 56 51 -10b3a 1a 57 51 -10b54 1e 58 51 -10b72 2 59 51 -10b74 c 56 51 -10b80 1a 57 51 -10b9a 1e 58 51 -10bb8 2 59 51 -10bba c 61 51 -10bc6 e 62 51 -10bd4 11 63 51 -10be5 2 64 51 -10be7 1 64 51 -10be8 c 61 51 -10bf4 e 62 51 -10c02 11 63 51 -10c13 2 64 51 -10c15 1 64 51 -FUNC 10c16 477 0 MacFileUtilities::MachoID::UpdateCRC(unsigned char*, unsigned long) -10c16 c 74 51 -10c22 11 82 51 -10c33 14 83 51 -10c47 5 86 51 -10c4c 9 87 51 -10c55 7 88 51 -10c5c 18b 90 51 -10de7 6 91 51 -10ded 14 89 51 -10e01 23 93 51 -10e24 23 94 51 -10e47 d 86 51 -10e54 f 98 51 -10e63 6 100 51 -10e69 18b 101 51 -10ff4 6 102 51 -10ffa c 99 51 -11006 13 105 51 -11019 8 106 51 -11021 10 104 51 -11031 23 108 51 -11054 23 109 51 -11077 14 110 51 -1108b 2 112 51 -1108d 1 112 51 -FUNC 1108e 2c 0 MacFileUtilities::MachoID::UpdateMD5(unsigned char*, unsigned long) -1108e c 114 51 -1109a 1e 115 51 -110b8 2 116 51 -FUNC 110ba 2c 0 MacFileUtilities::MachoID::UpdateSHA1(unsigned char*, unsigned long) -110ba c 118 51 -110c6 1e 119 51 -110e4 2 120 51 -FUNC 110e6 121 0 MacFileUtilities::MachoID::Update(MacFileUtilities::MachoWalker*, unsigned long, unsigned long) -110e6 f 122 51 -110f5 1b 123 51 -11110 e 129 51 -1111e 5 130 51 -11123 9 131 51 -1112c 7 132 51 -11133 a 133 51 -1113d 6 135 51 -11143 7 136 51 -1114a 35 139 51 -1117f 6c 142 51 -111eb 10 143 51 -111fb a 130 51 -11205 2 145 51 -11207 1 145 51 -FUNC 11208 cf 0 MacFileUtilities::MachoID::UUIDCommand(int, unsigned char*) -11208 14 147 51 -1121c 25 149 51 -11241 7 151 51 -11248 19 152 51 -11261 9 153 51 -1126a 8 157 51 -11272 1f 158 51 -11291 9 159 51 -1129a 36 162 51 -112d0 7 163 51 -112d7 1 163 51 -FUNC 112d8 224 0 MacFileUtilities::MachoID::IDCommand(int, unsigned char*) -112d8 15 165 51 -112ed 25 167 51 -11312 7 169 51 -11319 19 170 51 -11332 c 171 51 -1133e c 175 51 -1134a 6 180 51 -11350 7 181 51 -11357 9 182 51 -11360 9 183 51 -11369 28 185 51 -11391 33 186 51 -113c4 1e 185 51 -113e2 10 189 51 -113f2 10 190 51 -11402 10 191 51 -11412 d 192 51 -1141f 10 193 51 -1142f 10 194 51 -1143f 10 195 51 -1144f d 196 51 -1145c 17 197 51 -11473 17 198 51 -1148a 17 199 51 -114a1 14 200 51 -114b5 9 202 51 -114be 36 205 51 -114f4 8 206 51 -FUNC 114fc d1 0 MacFileUtilities::MachoID::Adler32(int) -114fc 14 208 51 -11510 25 209 51 -11535 27 210 51 -1155c d 211 51 -11569 19 213 51 -11582 9 214 51 -1158b 3b 216 51 -115c6 7 217 51 -115cd 1 217 51 -FUNC 115ce f8 0 MacFileUtilities::MachoID::MD5(int, unsigned char*) -115ce 14 219 51 -115e2 25 220 51 -11607 27 221 51 -1162e 19 223 51 -11647 19 224 51 -11660 9 225 51 -11669 17 227 51 -11680 9 228 51 -11689 36 231 51 -116bf 7 232 51 -FUNC 116c6 f8 0 MacFileUtilities::MachoID::SHA1(int, unsigned char*) -116c6 14 234 51 -116da 25 235 51 -116ff 27 236 51 -11726 19 238 51 -1173f 19 239 51 -11758 9 240 51 -11761 17 242 51 -11778 9 243 51 -11781 36 246 51 -117b7 7 247 51 -FUNC 117be 378 0 MacFileUtilities::MachoID::WalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -117be 2b 251 51 -117e9 6 252 51 -117ef e 254 51 -117fd 38 257 51 -11835 f 258 51 -11844 9 260 51 -1184d 17 261 51 -11864 20 266 51 -11884 f 267 51 -11893 d 271 51 -118a0 c 273 51 -118ac 38 274 51 -118e4 f 275 51 -118f3 9 277 51 -118fc 1f 278 51 -1191b 14 282 51 -1192f 2b 283 51 -1195a d 285 51 -11967 19 273 51 -11980 e 287 51 -1198e 38 290 51 -119c6 f 291 51 -119d5 9 293 51 -119de 17 294 51 -119f5 20 299 51 -11a15 f 300 51 -11a24 d 304 51 -11a31 c 306 51 -11a3d 38 307 51 -11a75 f 308 51 -11a84 9 310 51 -11a8d 1f 311 51 -11aac 1a 315 51 -11ac6 39 316 51 -11aff d 318 51 -11b0c 11 306 51 -11b1d 10 323 51 -11b2d 9 324 51 -FUNC 11b36 95 0 MacFileUtilities::MachoID::UUIDWalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -11b36 1e 328 51 -11b54 a 329 51 -11b5e 6 331 51 -11b64 2f 333 51 -11b93 9 335 51 -11b9c 6 337 51 -11ba2 14 338 51 -11bb6 9 340 51 -11bbf a 344 51 -11bc9 2 345 51 -11bcb 1 345 51 -FUNC 11bcc 95 0 MacFileUtilities::MachoID::IDWalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -11bcc 1e 349 51 -11bea a 350 51 -11bf4 6 351 51 -11bfa 2f 353 51 -11c29 9 354 51 -11c32 6 356 51 -11c38 14 357 51 -11c4c 9 359 51 -11c55 a 363 51 -11c5f 2 364 51 -11c61 1 364 51 -FUNC 11c62 1c 0 _OSSwapInt32 -11c62 f 53 55 -11c71 8 55 55 -11c79 3 56 55 -11c7c 2 57 55 -FUNC 11c7e 19 0 NXSwapInt -11c7e f 52 56 -11c8d 8 54 56 -11c95 2 55 56 -11c97 1 55 56 -FUNC 11c98 13 0 NXHostByteOrder -11c98 c 144 56 -11ca4 5 147 56 -11ca9 2 153 56 -11cab 1 153 56 -11cac c 52 54 -11cb8 12 54 54 -11cca 1a 55 54 -11ce4 2 56 54 -11ce6 c 52 54 -11cf2 12 54 54 -11d04 1a 55 54 -11d1e 2 56 54 -11d20 c 58 54 -11d2c a 59 54 -11d36 d 60 54 -11d43 2 61 54 -11d45 1 61 54 -11d46 c 58 54 -11d52 a 59 54 -11d5c d 60 54 -11d69 2 61 54 -11d6b 1 61 54 -FUNC 11d6c 37 0 MacFileUtilities::MachoWalker::ValidateCPUType(int) -11d6c c 63 54 -11d78 6 66 54 -11d7e 8 67 54 -11d86 6 68 54 -11d8c b 69 54 -11d97 7 74 54 -11d9e 3 80 54 -11da1 2 81 54 -11da3 1 81 54 -FUNC 11da4 50 0 MacFileUtilities::MachoWalker::ReadBytes(void*, unsigned long, long long) -11da4 18 96 54 -11dbc 36 97 54 -11df2 2 98 54 -FUNC 11df4 73 0 MacFileUtilities::MachoWalker::CurrentHeader(mach_header_64*, long long*) -11df4 c 100 54 -11e00 a 101 54 -11e0a 37 102 54 -11e41 11 103 54 -11e52 9 104 54 -11e5b a 107 54 -11e65 2 108 54 -11e67 1 108 54 -FUNC 11e68 2a6 0 MacFileUtilities::MachoWalker::FindHeader(int, long long&) -11e68 c 110 54 -11e74 15 111 54 -11e89 31 114 54 -11eba c 115 54 -11ec6 10 117 54 -11ed6 4 120 54 -11eda 14 121 54 -11eee 4 122 54 -11ef2 11 129 54 -11f03 28 124 54 -11f2b c 126 54 -11f37 31 133 54 -11f68 c 134 54 -11f74 14 136 54 -11f88 b 137 54 -11f93 8 139 54 -11f9b c 140 54 -11fa7 10 142 54 -11fb7 c 143 54 -11fc3 10 146 54 -11fd3 31 148 54 -12004 c 149 54 -12010 f 151 54 -1201f 14 152 54 -12033 16 154 54 -12049 c 158 54 -12055 31 159 54 -12086 9 160 54 -1208f f 162 54 -1209e 1c 163 54 -120ba 8 165 54 -120c2 10 166 54 -120d2 9 167 54 -120db 16 170 54 -120f1 11 158 54 -12102 a 174 54 -1210c 2 175 54 -FUNC 1210e 109 0 MacFileUtilities::MachoWalker::WalkHeaderCore(long long, unsigned int, bool) -1210e 1e 224 54 -1212c c 225 54 -12138 2f 227 54 -12167 c 228 54 -12173 6 230 54 -12179 14 231 54 -1218d 5b 234 54 -121e8 12 237 54 -121fa 11 225 54 -1220b a 240 54 -12215 2 241 54 -12217 1 241 54 -FUNC 12218 10e 0 MacFileUtilities::MachoWalker::WalkHeader64AtOffset(long long) -12218 18 203 54 -12230 2f 205 54 -1225f c 206 54 -1226b e 208 54 -12279 6 209 54 -1227f 14 210 54 -12293 9 212 54 -1229c a 213 54 -122a6 f 214 54 -122b5 15 215 54 -122ca 2b 216 54 -122f5 a 217 54 -122ff a 218 54 -12309 11 219 54 -1231a a 220 54 -12324 2 221 54 -FUNC 12326 143 0 MacFileUtilities::MachoWalker::WalkHeaderAtOffset(long long) -12326 18 177 54 -1233e 2f 179 54 -1236d c 180 54 -12379 e 182 54 -12387 6 183 54 -1238d 14 184 54 -123a1 2e 189 54 -123cf 7 190 54 -123d6 9 192 54 -123df a 193 54 -123e9 f 194 54 -123f8 15 195 54 -1240d 2b 196 54 -12438 a 197 54 -12442 a 198 54 -1244c 11 199 54 -1245d a 200 54 -12467 2 201 54 -12469 1 201 54 -FUNC 1246a 99 0 MacFileUtilities::MachoWalker::WalkHeader(int) -1246a c 83 54 -12476 15 84 54 -1248b 1d 86 54 -124a8 d 87 54 -124b5 21 88 54 -124d6 21 90 54 -124f7 a 93 54 -12501 2 94 54 -12503 1 94 54 -FUNC 12504 1c 0 _OSSwapInt32 -12504 f 53 55 -12513 8 55 55 -1251b 3 56 55 -1251e 2 57 55 -FUNC 12520 2b 0 _OSSwapInt64 -12520 12 64 55 -12532 11 69 55 -12543 6 70 55 -12549 2 71 55 -1254b 1 71 55 -FUNC 1254c 19 0 NXSwapLong -1254c f 61 56 -1255b 8 63 56 -12563 2 64 56 -12565 1 64 56 -FUNC 12566 1f 0 NXSwapLongLong -12566 12 70 56 -12578 b 72 56 -12583 2 73 56 -12585 1 73 56 -FUNC 12586 32 0 breakpad_swap_uuid_command(breakpad_uuid_command*, NXByteOrder) -12586 c 37 57 -12592 11 39 57 -125a3 13 40 57 -125b6 2 41 57 -FUNC 125b8 da 0 breakpad_swap_segment_command_64(segment_command_64*, NXByteOrder) -125b8 c 44 57 -125c4 11 46 57 -125d5 13 47 57 -125e8 17 49 57 -125ff 17 50 57 -12616 17 51 57 -1262d 17 52 57 -12644 13 54 57 -12657 13 55 57 -1266a 13 56 57 -1267d 13 57 57 -12690 2 58 57 -FUNC 12692 a4 0 breakpad_swap_mach_header_64(mach_header_64*, NXByteOrder) -12692 c 61 57 -1269e 11 63 57 -126af 13 64 57 -126c2 13 65 57 -126d5 13 66 57 -126e8 13 67 57 -126fb 13 68 57 -1270e 13 69 57 -12721 13 70 57 -12734 2 71 57 -FUNC 12736 1d1 0 breakpad_swap_section_64(section_64*, unsigned int, NXByteOrder) -12736 d 75 57 -12743 c 77 57 -1274f 33 78 57 -12782 33 79 57 -127b5 2d 81 57 -127e2 2d 82 57 -1280f 2d 83 57 -1283c 2d 84 57 -12869 2d 85 57 -12896 2d 86 57 -128c3 2d 87 57 -128f0 11 77 57 -12901 6 89 57 -12907 1 89 57 -12908 12 9 58 -1291a 4f 11 58 -12969 2 12 58 -1296b 1 12 58 -1296c 12 9 58 -1297e 4f 11 58 -129cd 2 12 58 -129cf 1 12 58 -129d0 13 14 58 -129e3 2a 14 58 -12a0d 1 14 58 -12a0e 13 14 58 -12a21 2a 14 58 -12a4b 1 14 58 -12a4c 13 14 58 -12a5f 2a 14 58 -12a89 1 14 58 -FUNC 12a8a bb 0 dwarf2reader::ByteReader::SetOffsetSize(unsigned char) -12a8a 19 16 58 -12aa3 a 17 58 -12aad 48 18 58 -12af5 6 19 58 -12afb 23 20 58 -12b1e 21 22 58 -12b3f 6 24 58 -12b45 1 24 58 -FUNC 12b46 bb 0 dwarf2reader::ByteReader::SetAddressSize(unsigned char) -12b46 19 26 58 -12b5f a 27 58 -12b69 48 28 58 -12bb1 6 29 58 -12bb7 23 30 58 -12bda 21 32 58 -12bfb 6 34 58 -12c01 1 34 58 -FUNC 12c02 a2 0 dwarf2reader::ByteReader::ReadFourBytes(char const*) const -12c02 c 24 59 -12c0e c 25 64 -12c1a d 26 64 -12c27 f 27 64 -12c36 f 28 64 -12c45 b 29 64 -12c50 27 30 64 -12c77 2b 32 64 -12ca2 2 34 64 -FUNC 12ca4 40e 0 dwarf2reader::ByteReader::ReadEightBytes(char const*) const -12ca4 11 36 59 -12cb5 1a 37 64 -12ccf 1b 38 64 -12cea 1d 39 64 -12d07 1d 40 64 -12d24 1d 41 64 -12d41 1d 42 64 -12d5e 1d 43 64 -12d7b 1d 44 64 -12d98 f 45 64 -12da7 18f 47 64 -12f36 172 50 64 -130a8 a 52 64 -130b2 2 52 64 -FUNC 130b4 a6 0 ReadInitialLength -130b4 15 29 60 -130c9 18 30 60 -130e1 6 31 60 -130e7 d 35 60 -130f4 13 36 60 -13107 9 37 60 -13110 1a 38 60 -1312a 13 40 60 -1313d 9 41 60 -13146 12 43 60 -13158 2 44 60 -1315a 1f 47 60 -13179 65 50 60 -131de 1f 47 60 -131fd 65 50 60 -FUNC 13262 393 0 dwarf2reader::CompilationUnit::SkipAttribute(char const*, dwarf2reader::DwarfForm) -13262 14 133 60 -13276 82 136 60 -132f8 1f 139 60 -13317 a 140 60 -13321 21 141 60 -13342 c 147 60 -1334e e 151 60 -1335c e 155 60 -1336a e 159 60 -13378 27 162 60 -1339f 1c 166 60 -133bb 10 167 60 -133cb 1c 171 60 -133e7 10 172 60 -133f7 1e 175 60 -13415 56 180 60 -1346b d 181 60 -13478 1e 182 60 -13496 11 183 60 -134a7 1e 184 60 -134c5 24 189 60 -134e9 26 192 60 -1350f 23 195 60 -13532 22 198 60 -13554 15 199 60 -13569 1b 203 60 -13584 30 206 60 -135b4 30 208 60 -135e4 a 209 60 -135ee 7 210 60 -135f5 1 210 60 -FUNC 135f6 29b 0 dwarf2reader::CompilationUnit::ReadHeader() -135f6 14 217 60 -1360a 9 218 60 -13613 4e 221 60 -13661 17 223 60 -13678 a 224 60 -13682 f 225 60 -13691 4e 227 60 -136df 1e 228 60 -136fd 6 229 60 -13703 5e 231 60 -13761 1e 232 60 -1377f 18 233 60 -13797 4c 235 60 -137e3 1d 236 60 -13800 1c 237 60 -1381c 5 238 60 -13821 9 240 60 -1382a 60 245 60 -1388a 7 247 60 -13891 1 247 60 -FUNC 13892 a57 0 dwarf2reader::CompilationUnit::ProcessAttribute(unsigned long long, char const*, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm) -13892 24 299 60 -138b6 8a 302 60 -13940 1f 307 60 -1395f a 308 60 -13969 36 309 60 -1399f 5b 316 60 -139fa c 317 60 -13a06 5b 322 60 -13a61 e 323 60 -13a6f 55 328 60 -13ac4 e 329 60 -13ad2 55 334 60 -13b27 e 335 60 -13b35 6 338 60 -13b3b 9a 340 60 -13bd5 33 341 60 -13c08 25 340 60 -13c2d 5c 348 60 -13c89 10 349 60 -13c99 5c 354 60 -13cf5 10 355 60 -13d05 55 359 60 -13d5a 1e 360 60 -13d78 56 365 60 -13dce d 366 60 -13ddb 55 368 60 -13e30 1e 369 60 -13e4e 11 370 60 -13e5f 55 372 60 -13eb4 1e 373 60 -13ed2 29 378 60 -13efb 4a 380 60 -13f45 f 381 60 -13f54 29 385 60 -13f7d 4c 387 60 -13fc9 11 388 60 -13fda 1b 392 60 -13ff5 4c 394 60 -14041 11 395 60 -14052 22 399 60 -14074 4e 401 60 -140c2 15 402 60 -140d7 3c 406 60 -14113 1b 408 60 -1412e 54 409 60 -14182 f 411 60 -14191 9a 413 60 -1422b 24 414 60 -1424f 25 413 60 -14274 30 418 60 -142a4 30 420 60 -142d4 a 421 60 -142de b 422 60 -142e9 1 422 60 -142ea 1f 489 60 -14309 3a 491 60 -14343 a 492 60 -1434d 6 493 60 -14353 1 493 60 -14354 1f 489 60 -14373 3a 491 60 -143ad a 492 60 -143b7 6 493 60 -143bd 1 493 60 -FUNC 143be b5 0 dwarf2reader::CompilationUnit::ProcessDIE(unsigned long long, char const*, dwarf2reader::CompilationUnit::Abbrev const&) -143be 19 426 60 -143d7 13 427 60 -143ea 46 430 60 -14430 3a 427 60 -1446a 3 432 60 -1446d 6 433 60 -14473 1 433 60 -FUNC 14474 85 0 dwarf2reader::CompilationUnit::SkipDIE(char const*, dwarf2reader::CompilationUnit::Abbrev const&) -14474 c 122 60 -14480 13 123 60 -14493 27 126 60 -144ba 3a 123 60 -144f4 3 128 60 -144f7 2 129 60 -144f9 1 129 60 -FUNC 144fa be4 0 dwarf2reader::LineInfo::ProcessOneOpcode(dwarf2reader::ByteReader*, dwarf2reader::LineInfoHandler*, dwarf2reader::LineInfoHeader const&, char const*, dwarf2reader::LineStateMachine*, unsigned long*, unsigned long, bool*) -144fa 18 593 60 -14512 a 594 60 -1451c 18 596 60 -14534 8 597 60 -1453c 5 598 60 -14541 19 602 60 -1455a f 603 60 -14569 50 605 60 -145b9 46 607 60 -145ff e0 610 60 -146df 6 612 60 -146e5 22 615 60 -14707 22 616 60 -14729 7 617 60 -14730 b 618 60 -1473b f 619 60 -1474a 5a 623 60 -147a4 7 625 60 -147ab b 626 60 -147b6 f 627 60 -147c5 28 631 60 -147ed e 632 60 -147fb 144 635 60 -1493f 6 637 60 -14945 9e 640 60 -149e3 5 642 60 -149e8 22 644 60 -14a0a e 645 60 -14a18 1c 646 60 -14a34 2b 652 60 -14a5f b 653 60 -14a6a 22 658 60 -14a8c e 659 60 -14a9a 8 660 60 -14aa2 5 662 60 -14aa7 22 664 60 -14ac9 e 665 60 -14ad7 9 666 60 -14ae0 5 668 60 -14ae5 12 670 60 -14af7 5 672 60 -14afc 7 674 60 -14b03 5 676 60 -14b08 16 678 60 -14b1e 9 679 60 -14b27 d9 682 60 -14c00 6 684 60 -14c06 1f 687 60 -14c25 5 689 60 -14c2a 40 693 60 -14c6a d6 696 60 -14d40 6 698 60 -14d46 1c 701 60 -14d62 5 703 60 -14d67 1f 706 60 -14d86 d 707 60 -14d93 13 708 60 -14da6 26 710 60 -14dcc 5 711 60 -14dd1 50 713 60 -14e21 7 715 60 -14e28 b 716 60 -14e33 f 717 60 -14e42 18 725 60 -14e5a f 726 60 -14e69 5 728 60 -14e6e 6 730 60 -14e74 28 732 60 -14e9c d 733 60 -14ea9 22 735 60 -14ecb e 736 60 -14ed9 22 739 60 -14efb e 740 60 -14f09 22 743 60 -14f2b e 744 60 -14f39 a 746 60 -14f43 fd 748 60 -15040 a 758 60 -1504a 9 759 60 -15053 1c 761 60 -1506f d 762 60 -1507c e 763 60 -1508a 2e 759 60 -150b8 b 769 60 -150c3 10 770 60 -150d3 b 771 60 -FUNC 150de 14b 0 dwarf2reader::LineInfo::ReadLines() -150de e 773 60 -150ec 9 778 60 -150f5 17 782 60 -1510c 8 783 60 -15114 6 785 60 -1511a 9 787 60 -15123 5 788 60 -15128 19 789 60 -15141 5 790 60 -15146 4a 793 60 -15190 6 794 60 -15196 4a 796 60 -151e0 a 797 60 -151ea f 790 60 -151f9 15 788 60 -1520e 14 801 60 -15222 7 802 60 -15229 1 802 60 -FUNC 1522a 4fd 0 dwarf2reader::CompilationUnit::ReadAbbrevs() -1522a 18 60 60 -15242 e 61 60 -15250 58 65 60 -152a8 38 66 60 -152e0 44 65 60 -15324 2a 66 60 -1534e 45 68 60 -15393 16 69 60 -153a9 1d 75 60 -153c6 6 76 60 -153cc 40 77 60 -1540c b 80 60 -15417 1f 82 60 -15436 e 84 60 -15444 6 77 60 -1544a 1f 68 60 -15469 a 84 60 -15473 1d 79 60 -15490 6 86 60 -15496 a 87 60 -154a0 3d 89 60 -154dd 1f 90 60 -154fc a 91 60 -15506 6 92 60 -1550c 3d 94 60 -15549 1d 95 60 -15566 5 96 60 -1556b 3d 98 60 -155a8 1f 101 60 -155c7 a 102 60 -155d1 3d 104 60 -1560e 1f 105 60 -1562d a 106 60 -15637 c 107 60 -15643 6 111 60 -15649 6 112 60 -1564f 32 113 60 -15681 47 115 60 -156c8 30 116 60 -156f8 24 79 60 -1571c b 118 60 -15727 1 118 60 -FUNC 15728 5dc 0 dwarf2reader::LineInfo::ReadHeader() -15728 18 503 60 -15740 9 504 60 -15749 17 508 60 -15760 a 510 60 -1576a f 511 60 -15779 60 512 60 -157d9 44 516 60 -1581d 1e 518 60 -1583b 6 519 60 -15841 1e 521 60 -1585f 18 522 60 -15877 1d 524 60 -15894 5 525 60 -15899 20 527 60 -158b9 5 528 60 -158be c 530 60 -158ca 5 531 60 -158cf 1d 533 60 -158ec 5 534 60 -158f1 1d 536 60 -1590e 5 537 60 -15913 45 539 60 -15958 1f 540 60 -15977 19 541 60 -15990 15 542 60 -159a5 1f 539 60 -159c4 30 543 60 -159f4 5 544 60 -159f9 14 542 60 -15a0d e 548 60 -15a1b 7 549 60 -15a22 5 550 60 -15a27 6 551 60 -15a2d 8b 552 60 -15ab8 28 553 60 -15ae0 5 554 60 -15ae5 16 550 60 -15afb 25 552 60 -15b20 5 557 60 -15b25 e 560 60 -15b33 7 561 60 -15b3a 5 563 60 -15b3f 6 564 60 -15b45 28 565 60 -15b6d 22 567 60 -15b8f a 568 60 -15b99 22 570 60 -15bbb a 571 60 -15bc5 22 573 60 -15be7 a 574 60 -15bf1 ba 576 60 -15cab 5 577 60 -15cb0 16 563 60 -15cc6 25 576 60 -15ceb 5 580 60 -15cf0 9 582 60 -15cf9 b 583 60 -FUNC 15d04 3d 0 dwarf2reader::LineInfo::Start() -15d04 c 495 60 -15d10 b 496 60 -15d1b b 497 60 -15d26 19 498 60 -15d3f 2 499 60 -15d41 1 499 60 -FUNC 15d42 304 0 dwarf2reader::CompilationUnit::ProcessDIEs() -15d42 11 435 60 -15d53 9 436 60 -15d5c 9 441 60 -15d65 17 445 60 -15d7c 8 446 60 -15d84 6 448 60 -15d8a 6c 453 60 -15df6 8 455 60 -15dfe 16 453 60 -15e14 3 455 60 -15e17 2f 453 60 -15e46 29 458 60 -15e6f 22 460 60 -15e91 a 462 60 -15e9b a 465 60 -15ea5 1e 466 60 -15ec3 13 467 60 -15ed6 2b 468 60 -15f01 18 472 60 -15f19 9 473 60 -15f22 42 474 60 -15f64 1e 475 60 -15f82 2a 477 60 -15fac b 480 60 -15fb7 1e 481 60 -15fd5 26 483 60 -15ffb 1d 455 60 -16018 24 485 60 -1603c a 486 60 -FUNC 16046 35f 0 dwarf2reader::CompilationUnit::Start() -16046 18 249 60 -1605e 58 251 60 -160b6 35 252 60 -160eb 32 251 60 -1611d 2a 252 60 -16147 20 255 60 -16167 37 256 60 -1619e b 259 60 -161a9 f 264 60 -161b8 17 265 60 -161cf c 266 60 -161db a 268 60 -161e5 95 271 60 -1627a 11 276 60 -1628b b 279 60 -16296 58 282 60 -162ee 2f 283 60 -1631d 32 282 60 -1634f 14 284 60 -16363 1a 285 60 -1637d b 289 60 -16388 12 291 60 -1639a b 292 60 -163a5 1 292 60 -FUNC 163a6 3a 0 std::fill(unsigned char*, unsigned char*, unsigned char const&) -163a6 c 573 61 -163b2 9 576 61 -163bb 23 577 61 -163de 2 578 61 -FUNC 163e0 33 0 std::__deque_buf_size(unsigned long) -163e0 c 83 62 -163ec 27 84 62 -16413 1 84 62 -FUNC 16414 18 0 dwarf2reader::ByteReader::OffsetSize() const -16414 c 38 63 -16420 c 38 63 -FUNC 1642c 18 0 dwarf2reader::ByteReader::AddressSize() const -1642c c 41 63 -16438 c 41 63 -FUNC 16444 17 0 dwarf2reader::ByteReader::ReadOneByte(char const*) const -16444 c 10 64 -16450 9 11 64 -16459 2 12 64 -1645b 1 12 64 -FUNC 1645c 63 0 dwarf2reader::ByteReader::ReadTwoBytes(char const*) const -1645c c 14 64 -16468 d 15 64 -16475 e 16 64 -16483 b 17 64 -1648e 17 18 64 -164a5 18 20 64 -164bd 2 22 64 -164bf 1 22 64 -FUNC 164c0 98 0 dwarf2reader::ByteReader::ReadUnsignedLEB128(char const*, unsigned long*) const -164c0 e 59 64 -164ce e 60 64 -164dc 7 61 64 -164e3 7 62 64 -164ea e 66 64 -164f8 5 67 64 -164fd 38 69 64 -16535 6 71 64 -1653b 8 65 64 -16543 8 75 64 -1654b 6 77 64 -16551 7 78 64 -FUNC 16558 ee 0 dwarf2reader::ByteReader::ReadSignedLEB128(char const*, unsigned long*) const -16558 e 84 64 -16566 e 85 64 -16574 7 86 64 -1657b 7 87 64 -16582 e 91 64 -16590 5 92 64 -16595 44 93 64 -165d9 6 94 64 -165df 8 90 64 -165e7 14 97 64 -165fb 36 98 64 -16631 8 99 64 -16639 6 100 64 -1663f 7 101 64 -FUNC 16646 a2 0 dwarf2reader::ByteReader::ReadOffset(char const*) const -16646 13 103 64 -16659 3f 104 64 -16698 4a 105 64 -166e2 6 106 64 -FUNC 166e8 a2 0 dwarf2reader::ByteReader::ReadAddress(char const*) const -166e8 13 108 64 -166fb 3f 109 64 -1673a 4a 110 64 -16784 6 111 64 -FUNC 1678a 61 0 dwarf2reader::LineStateMachine::Reset(bool) -1678a 12 12 65 -1679c 9 13 65 -167a5 11 14 65 -167b6 11 15 65 -167c7 a 16 65 -167d1 a 17 65 -167db 7 18 65 -167e2 7 19 65 -167e9 2 20 65 -167eb 1 20 65 -FUNC 167ec 20 0 std::_List_const_iterator >::operator!=(std::_List_const_iterator > const&) const -167ec c 253 66 -167f8 14 254 66 -FUNC 1680c 25 0 std::_List_const_iterator >::operator++(int) -1680c c 226 66 -16818 8 228 66 -16820 c 229 66 -1682c 5 230 66 -16831 1 230 66 -FUNC 16832 16 0 std::_List_const_iterator >::operator->() const -16832 c 215 66 -1683e a 216 66 -16848 c 190 67 -16854 a 190 67 -FUNC 1685e 13 0 std::auto_ptr > > >::operator->() const -1685e c 283 67 -1686a 7 286 67 -16871 1 286 67 -16872 c 65 68 -1687e 2 65 68 -16880 c 97 69 -1688c d 97 69 -16899 1 97 69 -1689a c 99 69 -168a6 14 100 69 -168ba c 97 69 -168c6 d 97 69 -168d3 1 97 69 -168d4 c 84 70 -168e0 17 85 70 -168f7 1 85 70 -FUNC 168f8 2d 0 std::pair std::make_pair(dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm) -168f8 c 144 70 -16904 21 145 70 -16925 1 145 70 -16926 c 202 66 -16932 a 203 66 -FUNC 1693c 25 0 std::list, std::allocator > >::begin() const -1693c c 588 70 -16948 19 589 66 -16961 1 589 66 -FUNC 16962 23 0 std::list, std::allocator > >::end() const -16962 c 605 70 -1696e 17 606 66 -16985 1 606 66 -16986 c 65 68 -16992 2 65 68 -16994 c 72 68 -169a0 2 72 68 -169a2 c 97 69 -169ae d 97 69 -169bb 1 97 69 -169bc c 105 69 -169c8 d 105 69 -169d5 1 105 69 -169d6 c 105 69 -169e2 d 105 69 -169ef 1 105 69 -169f0 c 67 68 -169fc 2 67 68 -169fe c 99 69 -16a0a 14 100 69 -16a1e c 99 69 -16a2a 14 100 69 -16a3e c 129 62 -16a4a 30 131 62 -16a7a c 65 68 -16a86 2 65 68 -16a88 c 72 68 -16a94 2 72 68 -16a96 c 97 69 -16aa2 d 97 69 -16aaf 1 97 69 -16ab0 c 105 69 -16abc d 105 69 -16ac9 1 105 69 -16aca c 105 69 -16ad6 d 105 69 -16ae3 1 105 69 -16ae4 c 67 68 -16af0 2 67 68 -16af2 c 99 69 -16afe 14 100 69 -16b12 c 99 69 -16b1e 14 100 69 -FUNC 16b32 2b 0 std::_Vector_base >::get_allocator() const -16b32 10 93 71 -16b42 1b 94 71 -16b5d 1 94 71 -16b6a 7 614 72 -16b71 1 614 72 -16b72 c 80 71 -16b7e d 80 71 -16b8b 1 80 71 -16b98 2 107 68 -FUNC 16b9a 2d 0 void std::_Destroy >(unsigned char*, unsigned char*, std::allocator) -16b9a c 171 73 -16ba6 2 173 73 -16ba8 12 174 73 -16bba b 173 73 -16bc5 2 174 73 -16bc7 1 174 73 -16bc8 c 84 71 -16bd4 2f 85 71 -16c03 2 86 71 -16c05 1 86 71 -16c06 c 96 71 -16c12 12 97 71 -16c24 2 98 71 -FUNC 16c26 1f 0 std::_List_base, std::allocator > >::_M_init() -16c26 c 338 73 -16c32 8 340 66 -16c3a b 341 66 -16c45 1 341 66 -16c46 c 105 69 -16c52 d 105 69 -16c5f 1 105 69 -16c60 c 125 66 -16c6c a 126 66 -FUNC 16c76 25 0 std::list, std::allocator > >::begin() -16c76 c 579 73 -16c82 19 580 66 -16c9b 1 580 66 -FUNC 16c9c 23 0 std::list, std::allocator > >::end() -16c9c c 597 73 -16ca8 17 597 66 -16cbf 1 597 66 -16cc0 c 603 72 -16ccc c 603 72 -FUNC 16cd8 2b 0 std::vector >::begin() const -16cd8 c 342 73 -16ce4 1f 343 71 -16d03 1 343 71 -FUNC 16d04 2c 0 std::vector >::end() const -16d04 c 360 73 -16d10 20 361 71 -16d3c 5 666 72 -16d41 1 666 72 -16d4f 31 759 72 -FUNC 16d80 3c 0 std::vector >::size() const -16d80 c 402 73 -16d8c 30 403 71 -16dbc c 603 72 -16dc8 c 603 72 -FUNC 16dd4 23 0 std::vector >::begin() -16dd4 c 333 73 -16de0 17 334 71 -16df7 1 334 71 -16e04 33 654 72 -16e37 1 654 72 -FUNC 16e38 26 0 std::vector >::end() -16e38 c 351 73 -16e44 1a 352 71 -16e6a 7 614 72 -16e71 1 614 72 -FUNC 16e72 42 0 std::vector >::operator[](unsigned long) -16e72 c 494 73 -16e7e 36 495 71 -FUNC 16eb4 13 0 std::vector >::max_size() const -16eb4 c 407 73 -16ec0 7 408 71 -16ec7 1 408 71 -16ed4 5 666 72 -16ed9 1 666 72 -16ee6 d 623 72 -16ef3 5 624 72 -16ef8 c 382 62 -16f04 d 382 62 -16f11 1 382 62 -FUNC 16f12 2b 0 std::_Deque_base >::get_allocator() const -16f12 10 360 73 -16f22 1b 361 62 -16f3d 1 361 62 -FUNC 16f3e 2d 0 std::deque >::get_allocator() const -16f3e 10 764 73 -16f4e 1d 765 62 -16f6b 1 765 62 -FUNC 16f6c 13 0 std::_Deque_iterator::operator*() const -16f6c c 134 73 -16f78 7 135 62 -16f7f 1 135 62 -16f8c 2 107 68 -16f8e c 129 62 -16f9a 30 131 62 -FUNC 16fca 2c 0 std::deque >::end() const -16fca 10 799 73 -16fda 1c 800 62 -FUNC 16ff6 2c 0 std::deque >::begin() const -16ff6 10 781 73 -17006 1c 782 62 -FUNC 17022 2e 0 std::deque >::end() -17022 10 790 73 -17032 1e 791 62 -FUNC 17050 3c 0 std::vector >::_M_range_check(unsigned long) const -17050 13 515 73 -17063 15 517 71 -17078 14 518 71 -FUNC 1708c 32 0 std::vector >::at(unsigned long) -1708c c 534 73 -17098 12 536 71 -170aa 14 537 71 -170ca 2e 104 68 -170f8 c 84 71 -17104 2f 85 71 -17133 2 86 71 -17135 1 86 71 -17136 c 96 71 -17142 12 97 71 -17154 2 98 71 -17156 c 603 72 -17162 c 603 72 -FUNC 1716e 23 0 std::vector >::begin() -1716e c 333 73 -1717a 17 334 71 -17191 1 334 71 -1719e 27 654 72 -171c5 1 654 72 -FUNC 171c6 42 0 std::vector >::operator[](unsigned long) -171c6 c 494 73 -171d2 36 495 71 -FUNC 17208 26 0 std::vector >::end() -17208 c 351 73 -17214 1a 352 71 -1723a d 94 68 -17247 1 94 68 -FUNC 17248 2f 0 std::_Vector_base >::_M_deallocate(unsigned char*, unsigned long) -17248 c 120 73 -17254 6 122 71 -1725a 1d 123 71 -17277 1 123 71 -17278 c 108 71 -17284 3a 109 71 -172be c 188 71 -172ca 12 189 71 -172dc 2 190 71 -172de c 272 71 -172ea 4b 273 71 -17335 1 273 71 -17336 13 62 74 -17349 10 62 74 -17359 a 63 74 -17363 25 64 74 -17388 1a 66 74 -173a2 13 62 74 -173b5 10 62 74 -173c5 a 63 74 -173cf 25 64 74 -173f4 1a 66 74 -1740e c 188 71 -1741a 12 189 71 -1742c 2 190 71 -1743b 31 759 72 -1746c c 65 68 -17478 2 65 68 -1747a c 103 69 -17486 d 103 69 -17493 1 103 69 -FUNC 17494 2d 0 std::list, std::allocator > >::get_allocator() const -17494 10 570 74 -174a4 1d 571 66 -174c1 1 571 66 -174ce 2e 104 68 -FUNC 174fc 20 0 std::_List_iterator >::operator!=(std::_List_iterator > const&) const -174fc c 172 74 -17508 14 173 66 -FUNC 1751c 1d 0 std::_List_const_iterator >::operator++() -1751c c 219 74 -17528 c 221 66 -17534 5 222 66 -17539 1 222 66 -FUNC 1753a 1d 0 std::_List_iterator >::operator++() -1753a c 138 74 -17546 c 140 66 -17552 5 141 66 -17557 1 141 66 -FUNC 17558 16 0 std::_List_const_iterator >::operator*() const -17558 c 211 74 -17564 a 212 66 -FUNC 1756e 16 0 std::_List_iterator >::operator*() const -1756e c 130 74 -1757a a 131 66 -FUNC 17584 20 0 std::_List_const_iterator >::operator==(std::_List_const_iterator > const&) const -17584 c 249 74 -17590 14 250 66 -FUNC 175a4 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -175a4 d 699 74 -175b1 28 700 72 -175d9 1 700 72 -FUNC 175da 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -175da c 171 74 -175e6 2 173 73 -175e8 1a 174 73 -17602 21 173 73 -17623 2 174 73 -17625 1 174 73 -17626 c 127 62 -17632 29 127 62 -1765b 1 127 62 -1765c c 388 62 -17668 41 389 62 -176a9 2 390 62 -176ab 1 390 62 -176b8 d 94 68 -176c5 1 94 68 -FUNC 176c6 20 0 bool std::operator==(std::_Deque_iterator const&, std::_Deque_iterator const&) -176c6 c 243 74 -176d2 14 244 62 -FUNC 176e6 26 0 bool std::operator!=(std::_Deque_iterator const&, std::_Deque_iterator const&) -176e6 c 256 74 -176f2 1a 257 62 -FUNC 1770c 1a 0 std::_Deque_iterator::_S_buffer_size() -1770c c 106 74 -17718 e 107 62 -FUNC 17726 3e 0 std::_Deque_iterator::_M_set_node(unsigned long long**) -17726 d 229 74 -17733 9 231 62 -1773c b 232 62 -17747 1d 233 62 -FUNC 17764 50 0 std::_Deque_iterator::operator++() -17764 c 142 74 -17770 d 144 62 -1777d f 145 62 -1778c 18 147 62 -177a4 b 148 62 -177af 5 150 62 -FUNC 177b4 4b 0 void std::_Destroy, std::allocator >(std::_Deque_iterator, std::_Deque_iterator, std::allocator) -177b4 c 171 74 -177c0 2 173 73 -177c2 1a 174 73 -177dc 21 173 73 -177fd 2 174 73 -177ff 1 174 73 -FUNC 17800 50 0 std::_Deque_iterator::operator--() -17800 c 162 74 -1780c f 164 62 -1781b 18 166 62 -17833 b 167 62 -1783e d 169 62 -1784b 5 170 62 -FUNC 17850 39 0 std::deque >::back() -17850 c 988 74 -1785c 15 990 62 -17871 b 991 62 -1787c d 992 62 -17889 1 992 62 -FUNC 1788a 19 0 std::stack > >::top() -1788a c 163 75 -17896 d 166 75 -178a3 1 166 75 -FUNC 178a4 66 0 std::_Deque_iterator::difference_type std::operator-(std::_Deque_iterator const&, std::_Deque_iterator const&) -178a4 d 328 75 -178b1 59 333 62 -FUNC 1790a 26 0 std::deque >::size() const -1790a c 840 75 -17916 1a 841 62 -1793c 36 662 72 -1797e 23 650 72 -179a1 1 650 72 -179a2 c 67 68 -179ae 2 67 68 -179b0 c 99 69 -179bc 14 100 69 -179d0 c 303 66 -179dc 12 304 66 -179ee 2 305 66 -179f0 c 326 66 -179fc 2f 327 66 -17a2b d 328 66 -17a38 c 457 66 -17a44 14 458 66 -17a58 c 211 74 -17a64 2d 211 74 -17a91 1 211 74 -17a9e 7 98 68 -17aa5 1 98 68 -17ab2 1d 85 68 -17acf 5 86 68 -17ad4 17 88 68 -17aeb 1 88 68 -FUNC 17aec 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -17aec c 116 75 -17af8 1e 117 71 -17b22 d 94 68 -17b2f 1 94 68 -FUNC 17b30 34 0 std::_Deque_base >::_M_deallocate_node(unsigned long long*) -17b30 c 402 75 -17b3c 28 403 62 -FUNC 17b64 38 0 std::_Deque_base >::_M_destroy_nodes(unsigned long long**, unsigned long long**) -17b64 c 504 75 -17b70 8 506 62 -17b78 14 507 62 -17b8c e 506 62 -17b9a 2 507 62 -FUNC 17b9c 62 0 std::deque >::_M_pop_back_aux() -17b9c c 391 76 -17ba8 15 393 76 -17bbd 1b 394 76 -17bd8 f 395 76 -17be7 17 396 76 -FUNC 17bfe 4f 0 std::deque >::pop_back() -17bfe c 1081 76 -17c0a 10 1083 62 -17c1a f 1086 62 -17c29 17 1087 62 -17c40 d 1090 62 -17c4d 1 1090 62 -FUNC 17c4e 19 0 std::stack > >::pop() -17c4e c 205 76 -17c5a d 208 75 -17c67 1 208 75 -17c68 c 72 68 -17c74 2 72 68 -17c76 c 105 69 -17c82 d 105 69 -17c8f 1 105 69 -17c90 c 603 72 -17c9c c 603 72 -FUNC 17ca8 2b 0 std::vector >::begin() const -17ca8 c 342 76 -17cb4 1f 343 71 -17cd3 1 343 71 -FUNC 17cd4 2c 0 std::vector >::end() const -17cd4 c 360 76 -17ce0 20 361 71 -17d0c 5 666 72 -17d11 1 666 72 -17d1f 28 759 72 -17d47 1 759 72 -FUNC 17d48 3c 0 std::vector >::size() const -17d48 c 402 76 -17d54 30 403 71 -17d90 d 623 72 -17d9d 5 624 72 -17dae 5 666 72 -17db3 1 666 72 -FUNC 17db4 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -17db4 d 699 76 -17dc1 28 700 72 -17de9 1 700 72 -FUNC 17dea 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -17dea c 171 76 -17df6 2 173 73 -17df8 1a 174 73 -17e12 21 173 73 -17e33 2 174 73 -17e35 1 174 73 -17e43 28 759 72 -17e6b 1 759 72 -17e78 2a 662 72 -FUNC 17ea2 13 0 std::vector >::max_size() const -17ea2 c 407 76 -17eae 7 408 71 -17eb5 1 408 71 -17ec2 16 650 72 -17ee4 7 98 68 -17eeb 1 98 68 -17ef8 1d 85 68 -17f15 5 86 68 -17f1a 10 88 68 -FUNC 17f2a 29 0 std::_List_base, std::allocator > >::_M_get_node() -17f2a c 311 76 -17f36 1d 312 66 -17f53 1 312 66 -FUNC 17f54 5f 0 std::list, std::allocator > >::_M_create_node(std::pair const&) -17f54 d 435 76 -17f61 e 437 66 -17f6f 3c 440 66 -17fab 8 447 66 -17fb3 1 447 66 -FUNC 17fb4 35 0 std::list, std::allocator > >::_M_insert(std::_List_iterator >, std::pair const&) -17fb4 c 1149 76 -17fc0 15 1151 66 -17fd5 14 1152 66 -17fe9 1 1152 66 -FUNC 17fea 52 0 void std::list, std::allocator > >::_M_insert_dispatch > >(std::_List_iterator >, std::_List_const_iterator >, std::_List_const_iterator >, __false_type) -17fea c 1126 66 -17ff6 2 1128 66 -17ff8 21 1129 66 -18019 21 1128 66 -1803a 2 1129 66 -FUNC 1803c 36 0 void std::list, std::allocator > >::insert > >(std::_List_iterator >, std::_List_const_iterator >, std::_List_const_iterator >) -1803c c 838 66 -18048 2a 842 66 -18072 e 491 66 -18080 32 492 66 -180b2 64 493 66 -18116 c 211 74 -18122 3d 211 74 -1815f 1 211 74 -1816d 5c 104 68 -181c9 1 104 68 -FUNC 181ca 31 0 std::list, std::allocator > >::push_back(std::pair const&) -181ca c 772 76 -181d6 25 773 66 -181fb 1 773 66 -FUNC 181fc 69 0 void std::_Construct(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev const&) -181fc d 77 76 -18209 5c 81 73 -18265 1 81 73 -18272 7 98 68 -18279 1 98 68 -18286 1d 85 68 -182a3 5 86 68 -182a8 10 88 68 -182b8 c 65 68 -182c4 2 65 68 -182c6 c 103 69 -182d2 d 103 69 -182df 1 103 69 -FUNC 182e0 4d 0 std::_Deque_base >::_M_get_map_allocator() const -182e0 11 394 76 -182f1 3c 395 62 -1832d 1 395 62 -FUNC 1832e 75 0 std::_Deque_base >::_M_allocate_map(unsigned long) -1832e d 406 76 -1833b 68 407 62 -183a3 1 407 62 -FUNC 183a4 47 0 std::_Deque_base >::_M_deallocate_map(unsigned long long**, unsigned long) -183a4 c 410 76 -183b0 3b 411 62 -183eb 1 411 62 -183ec c 424 62 -183f8 9 426 62 -18401 22 428 62 -18423 2b 430 62 -1844e c 714 62 -1845a 70 715 62 -184ca c 111 75 -184d6 d 111 75 -184e3 1 111 75 -184e4 c 259 67 -184f0 26 259 67 -18522 7 98 68 -18529 1 98 68 -18536 1d 85 68 -18553 5 86 68 -18558 10 88 68 -FUNC 18568 33 0 std::_Deque_base >::_M_allocate_node() -18568 c 398 76 -18574 27 399 62 -1859b 1 399 62 -FUNC 1859c 82 0 std::_Deque_base >::_M_create_nodes(unsigned long long**, unsigned long long**) -1859c d 486 76 -185a9 8 491 62 -185b1 12 492 62 -185c3 13 491 62 -185d6 b 494 62 -185e1 19 496 62 -185fa b 497 62 -18605 13 494 62 -18618 6 497 62 -FUNC 1861e 17b 0 std::_Deque_base >::_M_initialize_map(unsigned long) -1861e d 447 76 -1862b 1e 450 62 -18649 2a 452 62 -18673 1c 454 62 -1868f 19 462 62 -186a8 c 463 62 -186b4 1e 466 62 -186d2 b 467 62 -186dd 1e 469 62 -186fb 9 470 62 -18704 a 471 62 -1870e b 472 62 -18719 13 467 62 -1872c 15 475 62 -18741 18 476 62 -18759 c 477 62 -18765 34 478 62 -18799 1 478 62 -1879a d 366 62 -187a7 12 367 62 -187b9 39 368 62 -187f2 c 645 62 -187fe 1c 646 62 -FUNC 1881a 4d 0 void std::__fill::fill<__gnu_cxx::__normal_iterator > >, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char const&) -1881a c 539 61 -18826 9 541 61 -1882f 2 542 61 -18831 13 543 61 -18844 21 542 61 -18865 2 543 61 -18867 1 543 61 -FUNC 18868 2b 0 void std::fill<__gnu_cxx::__normal_iterator > >, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char const&) -18868 c 560 76 -18874 4 567 61 -18878 1b 568 61 -18893 1 568 61 -FUNC 18894 6a 0 std::list, std::allocator > >::_M_erase(std::_List_iterator >) -18894 d 1157 76 -188a1 b 1159 66 -188ac 6 1160 66 -188b2 35 1161 66 -188e7 17 1162 66 -FUNC 188fe 37 0 std::list, std::allocator > >::erase(std::_List_iterator >) -188fe c 95 77 -1890a 14 97 77 -1891e 12 98 77 -18930 5 99 77 -18935 1 99 77 -FUNC 18936 3e 0 std::list, std::allocator > >::erase(std::_List_iterator >, std::_List_iterator >) -18936 c 883 77 -18942 2 885 66 -18944 15 886 66 -18959 16 885 66 -1896f 5 887 66 -FUNC 18974 129 0 std::list, std::allocator > >::operator=(std::list, std::allocator > > const&) -18974 e 120 77 -18982 c 122 77 -1898e e 124 77 -1899c e 125 77 -189aa e 126 77 -189b8 e 127 77 -189c6 2 128 77 -189c8 20 130 77 -189e8 5a 128 77 -18a42 16 131 77 -18a58 1b 132 77 -18a73 20 134 77 -18a93 a 136 77 -18a9d 1 136 77 -FUNC 18a9e 4c 0 dwarf2reader::CompilationUnit::Abbrev::operator=(dwarf2reader::CompilationUnit::Abbrev const&) -18a9e c 211 77 -18aaa 40 211 74 -FUNC 18aea 52 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy::copy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18aea c 280 61 -18af6 1a 283 61 -18b10 12 285 61 -18b22 4 286 61 -18b26 6 287 61 -18b2c b 283 61 -18b37 5 289 61 -FUNC 18b3c 2b 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18b3c c 307 77 -18b48 4 315 61 -18b4c 1b 317 61 -18b67 1 317 61 -18b76 56 354 61 -18bd8 4 384 61 -18bdc 4 385 61 -18be0 1b 387 61 -18bfb 1 387 61 -FUNC 18bfc ac 0 std::vector >::erase(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -18bfc d 122 78 -18c09 26 124 78 -18c2f 43 125 78 -18c72 2e 126 78 -18ca0 8 127 78 -FUNC 18ca8 54 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_backward::copy_b(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18ca8 c 408 61 -18cb4 1a 411 61 -18cce 1e 412 61 -18cec b 411 61 -18cf7 5 413 61 -FUNC 18cfc 2b 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_backward_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18cfc c 432 78 -18d08 4 440 61 -18d0c 1b 443 61 -18d27 1 443 61 -18d36 56 482 61 -18d98 4 514 61 -18d9c 4 515 61 -18da0 1b 517 61 -18dbb 1 517 61 -FUNC 18dbc 4d 0 void std::__fill::fill<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -18dbc c 526 61 -18dc8 2 528 61 -18dca 1c 529 61 -18de6 21 528 61 -18e07 2 529 61 -18e09 1 529 61 -FUNC 18e0a 2b 0 void std::fill<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -18e0a c 560 78 -18e16 4 567 61 -18e1a 1b 568 61 -18e35 1 568 61 -FUNC 18e36 3f 0 unsigned char* std::__copy::copy(unsigned char const*, unsigned char const*, unsigned char*) -18e36 c 298 61 -18e42 22 300 61 -18e64 11 301 61 -18e75 1 301 61 -FUNC 18e76 2b 0 unsigned char* std::__copy_aux(unsigned char*, unsigned char*, unsigned char*) -18e76 c 307 78 -18e82 4 315 61 -18e86 1b 317 61 -18ea1 1 317 61 -18eb0 56 354 61 -18f12 4 384 61 -18f16 4 385 61 -18f1a 1b 387 61 -18f35 1 387 61 -FUNC 18f36 a0 0 std::vector >::erase(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -18f36 d 122 78 -18f43 26 124 78 -18f69 43 125 78 -18fac 22 126 78 -18fce 8 127 78 -18fe2 7 98 68 -18fe9 1 98 68 -18ff6 1d 85 68 -19013 5 86 68 -19018 d 88 68 -19025 1 88 68 -FUNC 19026 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -19026 c 116 78 -19032 1e 117 71 -1905c 1b 74 79 -19077 1 74 79 -19084 23 113 79 -190a7 1 113 79 -190b4 1b 254 79 -190cf 1 254 79 -FUNC 190d0 19 0 void std::_Destroy(dwarf2reader::CompilationUnit::Abbrev*) -190d0 c 106 79 -190dc d 107 73 -190e9 1 107 73 -FUNC 190ea 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -190ea c 119 79 -190f6 2 121 73 -190f8 13 122 73 -1910b 21 121 73 -1912c 2 122 73 -FUNC 1912e 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -1912e c 148 79 -1913a 1c 155 73 -FUNC 19156 8d 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, __false_type) -19156 d 188 79 -19163 6 190 79 -19169 2 193 79 -1916b 1c 194 79 -19187 1b 193 79 -191a2 b 196 79 -191ad 12 198 79 -191bf b 199 79 -191ca 13 196 79 -191dd 6 199 79 -191e3 1 199 79 -FUNC 191e4 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -191e4 c 214 79 -191f0 23 218 79 -19213 1 218 79 -FUNC 19214 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, std::allocator) -19214 c 308 79 -19220 1b 310 79 -1923b 1 310 79 -19249 6 82 79 -1924f 2 85 79 -19251 24 86 79 -19275 2c 85 79 -192a1 b 87 79 -192ac b 89 79 -192b7 12 91 79 -192c9 b 92 79 -192d4 13 89 79 -192e7 9 92 79 -192fc 23 113 79 -1931f 1 113 79 -1932c 1b 254 79 -19347 1 254 79 -FUNC 19348 409 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -19348 14 249 79 -1935c 14 251 78 -19370 22 253 78 -19392 f 255 78 -193a1 12 256 78 -193b3 55 257 78 -19408 4b 260 78 -19453 e 264 78 -19461 15 265 78 -19476 e 266 78 -19484 1d 271 78 -194a1 8 272 78 -194a9 e 273 78 -194b7 27 275 78 -194de 6 276 78 -194e4 55 279 78 -19539 25 284 78 -1955e b 285 78 -19569 4f 286 78 -195b8 3 284 78 -195bb 13 279 78 -195ce e 286 78 -195dc 4d 298 78 -19629 36 299 78 -1965f 12 302 78 -19671 13 303 78 -19684 2e 304 78 -196b2 13 286 78 -196c5 b 292 78 -196d0 39 294 78 -19709 23 295 78 -1972c b 296 78 -19737 13 292 78 -1974a 7 304 78 -19751 1 304 78 -FUNC 19752 70 0 std::vector >::push_back(dwarf2reader::CompilationUnit::Abbrev const&) -19752 c 602 79 -1975e 10 604 71 -1976e 1e 606 71 -1978c 11 607 71 -1979d 25 610 71 -FUNC 197c2 50 0 unsigned char* std::__copy_backward::copy_b(unsigned char const*, unsigned char const*, unsigned char*) -197c2 d 422 61 -197cf f 424 61 -197de 24 425 61 -19802 10 426 61 -FUNC 19812 2b 0 unsigned char* std::__copy_backward_aux(unsigned char*, unsigned char*, unsigned char*) -19812 c 432 79 -1981e 4 440 61 -19822 1b 443 61 -1983d 1 443 61 -1984c 56 482 61 -198ae 4 514 61 -198b2 4 515 61 -198b6 1b 517 61 -198d1 1 517 61 -FUNC 198d2 32 0 unsigned char* std::fill_n(unsigned char*, unsigned long, unsigned char const&) -198d2 c 647 79 -198de 1e 649 61 -198fc 8 650 61 -FUNC 19904 27 0 void std::__uninitialized_fill_n_aux(unsigned char*, unsigned long, unsigned char const&, __true_type) -19904 c 182 79 -19910 1b 183 79 -1992b 1 183 79 -FUNC 1992c 2f 0 void std::uninitialized_fill_n(unsigned char*, unsigned long, unsigned char const&) -1992c c 214 79 -19938 23 218 79 -1995b 1 218 79 -FUNC 1995c 27 0 void std::__uninitialized_fill_n_a(unsigned char*, unsigned long, unsigned char const&, std::allocator) -1995c c 308 79 -19968 1b 310 79 -19983 1 310 79 -FUNC 19984 27 0 void std::__destroy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -19984 c 119 79 -19990 2 121 73 -19992 b 122 73 -1999d c 121 73 -199a9 2 122 73 -199ab 1 122 73 -FUNC 199ac 28 0 void std::_Destroy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -199ac c 148 79 -199b8 1c 155 73 -FUNC 199d4 88 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -199d4 d 80 79 -199e1 6 82 79 -199e7 2 85 79 -199e9 12 86 79 -199fb 12 85 79 -19a0d b 87 79 -19a18 b 89 79 -19a23 12 91 79 -19a35 b 92 79 -19a40 13 89 79 -19a53 9 92 79 -FUNC 19a5c 2f 0 dwarf2reader::CompilationUnit::Abbrev* std::uninitialized_copy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -19a5c c 108 79 -19a68 23 113 79 -19a8b 1 113 79 -FUNC 19a8c 27 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_a(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -19a8c c 252 79 -19a98 1b 254 79 -19ab3 1 254 79 -FUNC 19ab4 7e 0 void std::__uninitialized_fill_n_aux(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, __false_type) -19ab4 d 188 79 -19ac1 6 190 79 -19ac7 2 193 79 -19ac9 12 194 79 -19adb 16 193 79 -19af1 b 196 79 -19afc 12 198 79 -19b0e b 199 79 -19b19 13 196 79 -19b2c 6 199 79 -FUNC 19b32 2f 0 void std::uninitialized_fill_n(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -19b32 c 214 79 -19b3e 23 218 79 -19b61 1 218 79 -FUNC 19b62 27 0 void std::__uninitialized_fill_n_a(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, std::allocator) -19b62 c 308 79 -19b6e 1b 310 79 -19b89 1 310 79 -FUNC 19b8a a5 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_aux<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -19b8a d 80 79 -19b97 6 82 79 -19b9d 2 85 79 -19b9f 1a 86 79 -19bb9 27 85 79 -19be0 b 87 79 -19beb b 89 79 -19bf6 12 91 79 -19c08 b 92 79 -19c13 13 89 79 -19c26 9 92 79 -19c2f 1 92 79 -FUNC 19c30 2f 0 dwarf2reader::CompilationUnit::Abbrev* std::uninitialized_copy<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*) -19c30 c 108 79 -19c3c 23 113 79 -19c5f 1 113 79 -FUNC 19c60 27 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -19c60 c 252 79 -19c6c 1b 254 79 -19c87 1 254 79 -FUNC 19c88 5f8 0 std::vector >::_M_fill_insert(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -19c88 15 311 79 -19c9d b 313 78 -19ca8 2a 315 78 -19cd2 12 318 78 -19ce4 23 319 78 -19d07 15 320 78 -19d1c c 321 78 -19d28 5a 323 78 -19d82 1c 327 78 -19d9e 35 328 78 -19dd3 16 323 78 -19de9 30 330 78 -19e19 10 343 78 -19e29 48 334 78 -19e71 21 338 78 -19e92 3d 339 78 -19ecf 13 334 78 -19ee2 b 339 78 -19eed 1c 342 78 -19f09 1e 343 78 -19f27 13 339 78 -19f3a 24 343 78 -19f5e e 348 78 -19f6c 1e 349 78 -19f8a e 350 78 -19f98 1d 353 78 -19fb5 8 354 78 -19fbd e 355 78 -19fcb 27 357 78 -19ff2 6 358 78 -19ff8 4d 361 78 -1a045 40 365 78 -1a085 18 367 78 -1a09d 44 368 78 -1a0e1 3 365 78 -1a0e4 19 361 78 -1a0fd 13 365 78 -1a110 e 368 78 -1a11e 3e 379 78 -1a15c 36 381 78 -1a192 12 384 78 -1a1a4 13 385 78 -1a1b7 2e 386 78 -1a1e5 e 368 78 -1a1f3 b 372 78 -1a1fe 39 374 78 -1a237 23 376 78 -1a25a b 377 78 -1a265 13 372 78 -1a278 8 386 78 -FUNC 1a280 2e 0 std::vector >::insert(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -1a280 c 657 79 -1a28c 22 658 71 -FUNC 1a2ae ab 0 std::vector >::resize(unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -1a2ae d 422 79 -1a2bb 15 424 71 -1a2d0 48 425 71 -1a318 41 427 71 -1a359 1 427 71 -FUNC 1a35a 63 0 std::vector >::resize(unsigned long) -1a35a d 441 79 -1a367 56 442 71 -1a3bd 1 442 71 -FUNC 1a3be 13 0 std::_Deque_iterator::operator*() const -1a3be c 134 79 -1a3ca 7 135 62 -1a3d1 1 135 62 -FUNC 1a3d2 3f 0 unsigned long long** std::__copy::copy(unsigned long long* const*, unsigned long long* const*, unsigned long long**) -1a3d2 c 298 61 -1a3de 22 300 61 -1a400 11 301 61 -1a411 1 301 61 -FUNC 1a412 2b 0 unsigned long long** std::__copy_aux(unsigned long long**, unsigned long long**, unsigned long long**) -1a412 c 307 79 -1a41e 4 315 61 -1a422 1b 317 61 -1a43d 1 317 61 -FUNC 1a43e 27 0 unsigned long long** std::__copy_normal::copy_n(unsigned long long**, unsigned long long**, unsigned long long**) -1a43e c 325 61 -1a44a 1b 326 61 -1a465 1 326 61 -FUNC 1a466 2f 0 unsigned long long** std::copy(unsigned long long**, unsigned long long**, unsigned long long**) -1a466 c 376 79 -1a472 4 384 61 -1a476 4 385 61 -1a47a 1b 387 61 -1a495 1 387 61 -FUNC 1a496 60 0 unsigned long long** std::__copy_backward::copy_b(unsigned long long* const*, unsigned long long* const*, unsigned long long**) -1a496 d 422 61 -1a4a3 12 424 61 -1a4b5 2e 425 61 -1a4e3 13 426 61 -FUNC 1a4f6 2b 0 unsigned long long** std::__copy_backward_aux(unsigned long long**, unsigned long long**, unsigned long long**) -1a4f6 c 432 79 -1a502 4 440 61 -1a506 1b 443 61 -1a521 1 443 61 -FUNC 1a522 27 0 unsigned long long** std::__copy_backward_normal::copy_b_n(unsigned long long**, unsigned long long**, unsigned long long**) -1a522 c 451 61 -1a52e 1b 452 61 -1a549 1 452 61 -FUNC 1a54a 2f 0 unsigned long long** std::copy_backward(unsigned long long**, unsigned long long**, unsigned long long**) -1a54a c 504 79 -1a556 4 514 61 -1a55a 4 515 61 -1a55e 1b 517 61 -1a579 1 517 61 -FUNC 1a57a 1df 0 std::deque >::_M_reallocate_map(unsigned long, bool) -1a57a 13 723 79 -1a58d 1b 726 76 -1a5a8 9 727 76 -1a5b1 13 730 76 -1a5c4 39 732 76 -1a5fd b 735 76 -1a608 27 736 76 -1a62f 2f 740 76 -1a65e 26 748 76 -1a684 15 750 76 -1a699 36 751 76 -1a6cf 22 753 76 -1a6f1 1e 756 76 -1a70f 8 758 76 -1a717 9 759 76 -1a720 15 762 76 -1a735 24 763 76 -1a759 1 763 76 -FUNC 1a75a 59 0 std::deque >::_M_reserve_map_at_back(unsigned long) -1a75a e 1443 79 -1a768 2a 1445 62 -1a792 21 1447 62 -1a7b3 1 1447 62 -FUNC 1a7b4 8c 0 std::deque >::_M_push_back_aux(unsigned long long const&) -1a7b4 c 345 79 -1a7c0 e 347 76 -1a7ce 13 348 76 -1a7e1 18 349 76 -1a7f9 1e 352 76 -1a817 1b 353 76 -1a832 c 355 76 -1a83e 2 360 76 -FUNC 1a840 62 0 std::deque >::push_back(unsigned long long const&) -1a840 c 1039 79 -1a84c 13 1041 62 -1a85f 1e 1044 62 -1a87d 11 1045 62 -1a88e 14 1048 62 -FUNC 1a8a2 20 0 std::stack > >::push(unsigned long long const&) -1a8a2 c 190 79 -1a8ae 14 191 75 -FUNC 1a8c2 27 0 unsigned char* std::__copy_normal::copy_n(unsigned char*, unsigned char*, unsigned char*) -1a8c2 c 325 61 -1a8ce 1b 326 61 -1a8e9 1 326 61 -FUNC 1a8ea 2f 0 unsigned char* std::copy(unsigned char*, unsigned char*, unsigned char*) -1a8ea c 376 79 -1a8f6 4 384 61 -1a8fa 4 385 61 -1a8fe 1b 387 61 -1a919 1 387 61 -FUNC 1a91a 27 0 unsigned char* std::__uninitialized_copy_aux(unsigned char*, unsigned char*, unsigned char*, __true_type) -1a91a c 73 79 -1a926 1b 74 79 -1a941 1 74 79 -FUNC 1a942 2f 0 unsigned char* std::uninitialized_copy(unsigned char*, unsigned char*, unsigned char*) -1a942 c 108 79 -1a94e 23 113 79 -1a971 1 113 79 -FUNC 1a972 27 0 unsigned char* std::__uninitialized_copy_a(unsigned char*, unsigned char*, unsigned char*, std::allocator) -1a972 c 252 79 -1a97e 1b 254 79 -1a999 1 254 79 -FUNC 1a99a 40 0 unsigned char* std::__copy_normal::copy_n<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1a99a d 334 61 -1a9a7 33 335 61 -FUNC 1a9da 2f 0 unsigned char* std::copy<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1a9da c 376 79 -1a9e6 4 384 61 -1a9ea 4 385 61 -1a9ee 1b 387 61 -1aa09 1 387 61 -FUNC 1aa0a 27 0 unsigned char* std::__uninitialized_copy_aux<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*, __true_type) -1aa0a c 73 79 -1aa16 1b 74 79 -1aa31 1 74 79 -FUNC 1aa32 2f 0 unsigned char* std::uninitialized_copy<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1aa32 c 108 79 -1aa3e 23 113 79 -1aa61 1 113 79 -FUNC 1aa62 27 0 unsigned char* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator > >, unsigned char*, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*, std::allocator) -1aa62 c 252 79 -1aa6e 1b 254 79 -1aa89 1 254 79 -1aa96 9 616 61 -1aa9f 2 617 61 -1aaa1 13 618 61 -1aab4 16 617 61 -1aaca 5 619 61 -1aacf 1 619 61 -1aadc 4 641 61 -1aae0 1b 642 61 -1aafb 1 642 61 -FUNC 1aafc 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&, __true_type) -1aafc c 182 79 -1ab08 1b 183 79 -1ab23 1 183 79 -FUNC 1ab24 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1ab24 c 214 79 -1ab30 23 218 79 -1ab53 1 218 79 -FUNC 1ab54 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&, std::allocator) -1ab54 c 308 79 -1ab60 1b 310 79 -1ab7b 1 310 79 -FUNC 1ab7c 45a 0 std::vector >::_M_fill_insert(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1ab7c 14 311 79 -1ab90 b 313 78 -1ab9b 21 315 78 -1abbc 9 318 78 -1abc5 23 319 78 -1abe8 15 320 78 -1abfd c 321 78 -1ac09 4e 323 78 -1ac57 11 327 78 -1ac68 30 328 78 -1ac98 35 330 78 -1accd 48 334 78 -1ad15 14 338 78 -1ad29 43 339 78 -1ad6c 11 342 78 -1ad7d 1e 343 78 -1ad9b e 348 78 -1ada9 1e 349 78 -1adc7 e 350 78 -1add5 1d 353 78 -1adf2 8 354 78 -1adfa e 355 78 -1ae08 27 357 78 -1ae2f 6 358 78 -1ae35 4d 361 78 -1ae82 40 365 78 -1aec2 18 367 78 -1aeda 4d 368 78 -1af27 3e 379 78 -1af65 2d 381 78 -1af92 12 384 78 -1afa4 13 385 78 -1afb7 1f 386 78 -FUNC 1afd6 2e 0 std::vector >::insert(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1afd6 c 657 79 -1afe2 22 658 71 -FUNC 1b004 ab 0 std::vector >::resize(unsigned long, unsigned char const&) -1b004 d 422 79 -1b011 15 424 71 -1b026 48 425 71 -1b06e 41 427 71 -1b0af 1 427 71 -FUNC 1b0b0 2b 0 std::vector >::resize(unsigned long) -1b0b0 c 441 79 -1b0bc 1f 442 71 -1b0db 1 442 71 -FUNC 1b0dc 1a 0 std::_Deque_iterator::_S_buffer_size() -1b0dc c 106 79 -1b0e8 e 107 62 -FUNC 1b0f6 66 0 std::_Deque_iterator::difference_type std::operator-(std::_Deque_iterator const&, std::_Deque_iterator const&) -1b0f6 d 328 79 -1b103 59 333 62 -FUNC 1b15c 3e 0 std::_Deque_iterator::_M_set_node(unsigned long long**) -1b15c d 229 79 -1b169 9 231 62 -1b172 b 232 62 -1b17d 1d 233 62 -FUNC 1b19a 50 0 std::_Deque_iterator::operator++() -1b19a c 142 79 -1b1a6 d 144 62 -1b1b3 f 145 62 -1b1c2 18 147 62 -1b1da b 148 62 -1b1e5 5 150 62 -FUNC 1b1ea 84 0 std::_Deque_iterator std::__copy::copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b1ea e 280 61 -1b1f8 17 283 61 -1b20f 20 285 61 -1b22f b 286 61 -1b23a b 287 61 -1b245 b 283 61 -1b250 1e 289 61 -FUNC 1b26e 7e 0 std::_Deque_iterator std::__copy_aux, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b26e 11 307 79 -1b27f 4 315 61 -1b283 69 317 61 -FUNC 1b2ec 7a 0 std::_Deque_iterator std::__copy_normal::copy_n, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b2ec 11 325 61 -1b2fd 69 326 61 -FUNC 1b366 82 0 std::_Deque_iterator std::copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b366 11 376 79 -1b377 4 384 61 -1b37b 4 385 61 -1b37f 69 387 61 -FUNC 1b3e8 7a 0 std::_Deque_iterator std::__uninitialized_copy_aux, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator, __true_type) -1b3e8 11 73 79 -1b3f9 69 74 79 -FUNC 1b462 82 0 std::_Deque_iterator std::uninitialized_copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b462 11 108 79 -1b473 71 113 79 -FUNC 1b4e4 7a 0 std::_Deque_iterator std::__uninitialized_copy_a, std::_Deque_iterator, unsigned long long>(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator, std::allocator) -1b4e4 11 252 79 -1b4f5 69 254 79 -1b55e 10 679 62 -1b56e 64 680 62 -1b5d2 e8 681 62 -1b6ba c 143 75 -1b6c6 14 144 75 -1b6da 6 144 75 -FUNC 1b6e0 4d 0 __eprintf -1b6e0 6 1826 80 -1b6e6 3 1832 80 -1b6e9 c 1826 80 -1b6f5 29 1832 80 -1b71e a 1837 80 -1b728 5 1838 80 -1b72d e8d3 1838 80 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/Breakpad.xib b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/Breakpad.xib deleted file mode 100644 index 7966f895..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/Breakpad.xib +++ /dev/null @@ -1,1140 +0,0 @@ - - - - 1050 - 10F569 - 762 - 1038.29 - 461.00 - - YES - - YES - - - YES - - - - YES - - - - YES - - - YES - - - - YES - - Reporter - - - FirstResponder - - - NSApplication - - - 1 - 2 - {{72, 251}, {490, 489}} - 536871936 - - NSWindow - - {1.79769e+308, 1.79769e+308} - {72, 5} - - - 264 - - YES - - - 272 - - YES - - - 256 - - YES - - - 290 - {{17, 36}, {456, 70}} - - YES - - 67239424 - 272760832 - Providing your email address is optional and will allow us contact you in case we need more details. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed arcu urna, pulvinar sit amet, tincidunt ac, fermentum ut, ligula. Quisque mi. Duis lectus. Vestibulum velit. Morbi turpis. Nunc at diam consectetur turpis volutpat tristique. Donec quis diam. Suspendisse scelerisque. - - LucidaGrande - 11 - 3100 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - - - - 290 - {{87, 9}, {195, 19}} - - YES - - -1804468671 - 272761856 - - - optional - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - - - - - - 292 - {{17, 11}, {65, 14}} - - YES - - 68288064 - 71435264 - EmailLabel: - - - - - - - - - 289 - {{456, 10}, {16, 17}} - - YES - - -2080244224 - 0 - Privacy Policy - - LucidaGrande - 13 - 1044 - - - -2040250113 - 36 - - NSImage - goArrow - - - - 400 - 75 - - - - - 289 - {{355, 11}, {100, 14}} - - YES - - 68288064 - 4326400 - PrivacyPolicyLabel - - - - - - - - {490, 114} - - - - {{0, 51}, {490, 114}} - - {0, 0} - - 67239424 - 0 - Title - - LucidaGrande - 11 - 16 - - - - 3 - MCAwLjgwMDAwMDAxAA - - - - 0 - 3 - 0 - NO - - - - 289 - {{330, 12}, {146, 32}} - - YES - - 67239424 - 134217728 - SendReportLabel - - - -2038284033 - 129 - - - DQ - 200 - 25 - - - - - 289 - {{214, 12}, {116, 32}} - - YES - - 67239424 - 134217728 - CancelLabel - - - -2038284033 - 129 - - - Gw - 200 - 25 - - - - - 256 - - YES - - - 256 - - YES - - - 266 - {{17, 83}, {456, 154}} - - YES - - 67239424 - 272760832 - VGhlIHN5c3RlbSBhbmQgb3RoZXIgYXBwbGljYXRpb25zIGhhdmUgbm90IGJlZW4gYWZmZWN0ZWQuIEEg -cmVwb3J0IGhhcyBiZWVuIGNyZWF0ZWQgdGhhdCB5b3UgY2FuIHNlbmQgdG8gPFJlYWxseSBMb25nIENv -bXBhbnkgTmFtZT4gdG8gaGVscCBpZGVudGlmeSB0aGUgcHJvYmxlbS4gTG9yZW0gaXBzdW0gZG9sb3Ig -c2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4gU2VkIGFyY3UgdXJuYSwgcHVsdmlu -YXIgc2l0IGFtZXQsIHRpbmNpZHVudCBhYywgZmVybWVudHVtIHV0LCBsaWd1bGEuIFF1aXNxdWUgbWku -IER1aXMgbGVjdHVzLiBWZXN0aWJ1bHVtIHZlbGl0LiBNb3JiaSB0dXJwaXMuIE51bmMgYXQgZGlhbSBj -b25zZWN0ZXR1ciB0dXJwaXMgdm9sdXRwYXQgdHJpc3RpcXVlLiBEb25lYyBxdWlzIGRpYW0uIFN1c3Bl -bmRpc3NlIHNjZWxlcmlzcXVlLiBRdWlzcXVlIHB1bHZpbmFyIG1pIGlkIHB1cnVzLiBFdGlhbSB2aXRh -ZSB0dXJwaXMgdml0YWUgbmVxdWUgcG9ydGEgY29uZ3VlLgoKUGxlYXNlIGhlbHAgdXMgZml4IHRoZSBw -cm9ibGVtIGJ5IGRlc2NyaWJpbmcgd2hhdCBoYXBwZW5lZCBiZWZvcmUgdGhlIGNyYXNoLiBMb3JlbSBp -cHN1bSBkb2xvciBzaXQgYW1ldCwgY29uc2VjdGV0dXIgYWRpcGlzY2luZyBlbGl0LiBTZWQgYXJjdSB1 -cm5hLCBwdWx2aW5hciBzaXQgYW1ldCwgdGluY2lkdW50IGFjLCBmZXJtZW50dW0gdXQsIGxpZ3VsYS4g -UXVpc3F1ZSBtaS4gRHVpcyBsZWN0dXMuA - - - - - - - - - 274 - {{20, 14}, {450, 61}} - - YES - - 341966337 - 272760832 - Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 - - - YES - - - - - - - 256 - - YES - - - 256 - - YES - - - 266 - {{85, 10}, {381, 54}} - - YES - - 67239424 - 272629760 - The application <Really Long App Name Here> has quit unexpectedly. - - LucidaGrande-Bold - 14 - 16 - - - - - - - - - 268 - - YES - - YES - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - NSFilenamesPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT TIFF v4.0 pasteboard type - - - {{16, 0}, {64, 64}} - - YES - - 130560 - 33554432 - - NSImage - NSApplicationIcon - - 0 - 0 - 0 - NO - - YES - - - {482, 70} - - - - {{4, 245}, {482, 70}} - - {0, 0} - - 67239424 - 0 - Title - - - - 3 - MCAwLjgwMDAwMDAxAA - - - - 0 - 3 - 0 - NO - - - {490, 325} - - - - {{0, 160}, {490, 325}} - - {0, 0} - - 67239424 - 0 - Title - - - - 3 - MCAwLjgwMDAwMDAxAA - - - - 0 - 3 - 0 - NO - - - - 268 - {{17, 20}, {163, 14}} - - YES - - 68288064 - 272630784 - xx seconds. - - - - - - - - {490, 489} - - {{0, 0}, {2560, 1578}} - {72, 27} - {1.79769e+308, 1.79769e+308} - - - YES - - - - - YES - - - sendReport: - - - - 45 - - - - cancel: - - - - 46 - - - - showPrivacyPolicy: - - - - 53 - - - - value: emailValue - - - - - - value: emailValue - value - emailValue - - NSNullPlaceholder - optional - - 2 - - - 90 - - - - initialFirstResponder - - - - 91 - - - - value: commentsValue - - - - - - value: commentsValue - value - commentsValue - - NSNullPlaceholder - optional comments - - 2 - - - 124 - - - - nextKeyView - - - - 125 - - - - nextKeyView - - - - 126 - - - - nextKeyView - - - - 127 - - - - delegate - - - - 128 - - - - alertWindow_ - - - - 142 - - - - preEmailBox_ - - - - 150 - - - - headerBox_ - - - - 151 - - - - emailSectionBox_ - - - - 152 - - - - privacyLinkLabel_ - - - - 153 - - - - commentMessage_ - - - - 154 - - - - dialogTitle_ - - - - 155 - - - - emailLabel_ - - - - 156 - - - - cancelButton_ - - - - 158 - - - - sendButton_ - - - - 159 - - - - emailEntryField_ - - - - 161 - - - - privacyLinkArrow_ - - - - 162 - - - - emailMessage_ - - - - 163 - - - - commentsEntryField_ - - - - 176 - - - - value: countdownMessage - - - - - - value: countdownMessage - value - countdownMessage - 2 - - - 194 - - - - countdownLabel_ - - - - 208 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - YES - - - - Window - - - 2 - - - YES - - - - - - - - - - 12 - - - YES - - - - - - 14 - - - YES - - - - - - 132 - - - YES - - - - - - - - - - 145 - - - YES - - - - - - - - 189 - - - YES - - - - - - 191 - - - Shared User Defaults Controller - - - 210 - - - - - 211 - - - - - 221 - - - - - 58 - - - YES - - - - - - 215 - - - - - 18 - - - YES - - - - - - 212 - - - - - 20 - - - YES - - - - - - 213 - - - - - 48 - - - YES - - - - - - 214 - - - - - 66 - - - YES - - - - - - 216 - - - - - 8 - - - YES - - - - - - 217 - - - - - 116 - - - YES - - - - - - 218 - - - - - 147 - - - YES - - - - - - - 3 - - - YES - - - - - - 219 - - - - - 6 - - - YES - - - - - - 220 - - - - - - - YES - - YES - -3.ImportedFromIB2 - 1.IBEditorWindowLastContentRect - 1.IBWindowTemplateEditedContentRect - 1.ImportedFromIB2 - 1.windowTemplate.hasMinSize - 1.windowTemplate.minSize - 116.CustomClassName - 116.ImportedFromIB2 - 12.ImportedFromIB2 - 132.ImportedFromIB2 - 14.ImportedFromIB2 - 145.ImportedFromIB2 - 147.ImportedFromIB2 - 18.CustomClassName - 18.ImportedFromIB2 - 189.ImportedFromIB2 - 191.ImportedFromIB2 - 2.ImportedFromIB2 - 20.ImportedFromIB2 - 3.ImportedFromIB2 - 48.ImportedFromIB2 - 58.ImportedFromIB2 - 6.ImportedFromIB2 - 66.ImportedFromIB2 - 8.ImportedFromIB2 - - - YES - - {{0, 656}, {490, 489}} - {{0, 656}, {490, 489}} - - - {72, 5} - LengthLimitingTextField - - - - - - - LengthLimitingTextField - - - - - - - - - - - - - - - YES - - - YES - - - - - YES - - - YES - - - - 221 - - - - YES - - LengthLimitingTextField - NSTextField - - IBUserSource - - - - - Reporter - NSObject - - YES - - YES - cancel: - sendReport: - showPrivacyPolicy: - - - YES - id - id - id - - - - YES - - YES - alertWindow_ - cancelButton_ - commentMessage_ - commentsEntryField_ - countdownLabel_ - dialogTitle_ - emailEntryField_ - emailLabel_ - emailMessage_ - emailSectionBox_ - headerBox_ - preEmailBox_ - privacyLinkArrow_ - privacyLinkLabel_ - sendButton_ - - - YES - NSWindow - NSButton - NSTextField - LengthLimitingTextField - NSTextField - NSTextField - LengthLimitingTextField - NSTextField - NSTextField - NSBox - NSBox - NSBox - NSView - NSTextField - NSButton - - - - IBUserSource - - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../Breakpad.xcodeproj - 3 - - YES - - YES - NSApplicationIcon - goArrow - - - YES - {128, 128} - {128, 128} - - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/InfoPlist.strings deleted file mode 100644 index 65d16181..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/Localizable.strings deleted file mode 100644 index 5f1cc826..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/English.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ReporterIcon.graffle b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ReporterIcon.graffle deleted file mode 100644 index 14a0e7c4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ReporterIcon.graffle +++ /dev/null @@ -1,2489 +0,0 @@ - - - - - ActiveLayerIndex - 0 - ApplicationVersion - - com.omnigroup.OmniGrafflePro - 137.6.0.106738 - - AutoAdjust - - BackgroundGraphic - - Bounds - {{0, 0}, {512, 512}} - Class - SolidGraphic - FontInfo - - Font - CalisMTBol - Size - 112 - - ID - 2 - Style - - fill - - Color - - a - 0 - b - 0 - g - 0.852018 - r - 0.998962 - - - shadow - - Draws - NO - - stroke - - Draws - NO - - - - CanvasOrigin - {0, 0} - CanvasSize - {512, 512} - ColumnAlign - 1 - ColumnSpacing - 36 - CreationDate - 2008-11-14 16:58:15 -0700 - Creator - John P. Developer - DisplayScale - 1 pt = 1 px - FileType - flat - GraphDocumentVersion - 6 - GraphicsList - - - Bounds - {{33.9443, 35.3885}, {444.111, 437.112}} - Class - ShapedGraphic - FontInfo - - Font - CalisMTBol - Size - 112 - - ID - 31 - Rotation - 270 - Shape - Bezier - ShapeData - - UnitPoints - - {-0.5, -0.439247} - {-0.5, -0.485429} - {-0.446294, -0.512626} - {-0.409932, -0.494153} - {-0.373569, -0.47568} - {0.436363, -0.0733799} - {0.472729, -0.0549059} - {0.50909, -0.0364333} - {0.509091, 0.0364345} - {0.472729, 0.0549059} - {0.436368, 0.0733802} - {-0.373569, 0.475681} - {-0.409932, 0.494153} - {-0.446294, 0.512626} - {-0.500001, 0.485429} - {-0.5, 0.439247} - {-0.49998, 0.393072} - {-0.500002, -0.393066} - - - Style - - fill - - Color - - b - 0 - g - 0.770962 - r - 0.997971 - - Draws - NO - FillType - 3 - GradientCenter - {-0.609524, 0} - GradientColor - - b - 0 - g - 0.911574 - r - 0.998779 - - MiddleFraction - 0.6111111044883728 - - shadow - - Color - - a - 0.43 - b - 0 - g - 0 - r - 0 - - Draws - NO - Fuzziness - 7.2213706970214844 - ShadowVector - {0, 6} - - stroke - - Color - - b - 0 - g - 0.766903 - r - 0.997925 - - Width - 7 - - - Text - - Pad - 0 - VerticalPad - 0 - - TextPlacement - 0 - TextRelativeArea - {{0.06, 0.17}, {0.88, 0.5}} - TextRotation - 90 - Wrap - NO - - - Bounds - {{3.89085, 67.8908}, {404.218, 332}} - Class - ShapedGraphic - FontInfo - - Font - CalisMTBol - Size - 112 - - ID - 30 - Rotation - 270 - Shape - Bezier - ShapeData - - UnitPoints - - {-0.5, -0.5} - {-0.459695, -0.475464} - {0.429465, 0.0537758} - {0.469773, 0.0783133} - {0.510074, 0.102849} - {0.510077, 0.198357} - {0.469773, 0.222892} - {0.429473, 0.247428} - {-0.00521517, 0.499998} - {-0.00521785, 0.5} - {-0.00521713, -0.113381} - {-0.44962, -0.458615} - - - Style - - fill - - Color - - a - 0 - b - 1 - g - 1 - r - 1 - - FillType - 2 - GradientAngle - 180 - GradientCenter - {-0.609524, 0} - GradientColor - - a - 0.5 - w - 1 - - MiddleFraction - 0.6111111044883728 - - shadow - - Color - - a - 0.51 - b - 0 - g - 0 - r - 0 - - Draws - NO - Fuzziness - 3.3371961116790771 - ShadowVector - {0, 2} - - stroke - - Color - - b - 0 - g - 0.766903 - r - 0.997925 - - Draws - NO - Width - 2 - - - Text - - Pad - 0 - VerticalPad - 0 - - TextPlacement - 0 - TextRelativeArea - {{0.06, 0.17}, {0.88, 0.5}} - TextRotation - 90 - Wrap - NO - - - Bounds - {{33.9443, 35.3886}, {444.112, 437.111}} - Class - ShapedGraphic - FontInfo - - Font - CalisMTBol - Size - 112 - - ID - 29 - Rotation - 270 - Shape - Bezier - ShapeData - - UnitPoints - - {-0.5, -0.439247} - {-0.500001, -0.485429} - {-0.446295, -0.512626} - {-0.409932, -0.494153} - {-0.373568, -0.475681} - {0.436363, -0.0733802} - {0.472729, -0.0549062} - {0.509089, -0.0364334} - {0.509092, 0.0364341} - {0.472729, 0.0549056} - {0.436369, 0.0733803} - {-0.373568, 0.475681} - {-0.409932, 0.494153} - {-0.446294, 0.512626} - {-0.500001, 0.485428} - {-0.5, 0.439248} - {-0.499978, 0.39307} - {-0.500003, -0.393066} - - - Style - - fill - - Color - - a - 0.2 - b - 1 - g - 1 - r - 1 - - FillType - 2 - GradientAngle - 90 - GradientCenter - {-0.609524, 0} - GradientColor - - a - 0 - w - 1 - - MiddleFraction - 0.6111111044883728 - - shadow - - Color - - a - 0.51 - b - 0 - g - 0 - r - 0 - - Draws - NO - Fuzziness - 3.3371961116790771 - ShadowVector - {0, 2} - - stroke - - Color - - b - 0 - g - 0.766903 - r - 0.997925 - - Draws - NO - Width - 2 - - - Text - - Pad - 0 - VerticalPad - 0 - - TextPlacement - 0 - TextRelativeArea - {{0.06, 0.17}, {0.88, 0.5}} - TextRotation - 90 - Wrap - NO - - - Bounds - {{176, 102.384}, {158.841, 537.616}} - Class - ShapedGraphic - FontInfo - - Font - CalisMTBol - Size - 425 - - ID - 26 - Shape - Rectangle - Style - - fill - - Draws - NO - - shadow - - Draws - NO - - stroke - - Draws - NO - - - Text - - Pad - 0 - Text - {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350 -{\fonttbl\f0\fnil\fcharset0 CalistoMT;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs850 \cf1 !} - VerticalPad - 0 - - Wrap - NO - - - Bounds - {{176, 104}, {158.841, 537.616}} - Class - ShapedGraphic - FontInfo - - Color - - b - 0 - g - 0.749523 - r - 0.997726 - - Font - CalisMTBol - Size - 425 - - ID - 27 - Shape - Rectangle - Style - - fill - - Draws - NO - - shadow - - Draws - NO - - stroke - - Draws - NO - - - Text - - Pad - 0 - RTFD - - BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 - ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp - bmcBlIQBKwEhhoQCaUkBAZKEhIQMTlNEaWN0aW9uYXJ5 - AJSEAWkEkoSWlhBOU1BhcmFncmFwaFN0eWxlhpKEhIQQ - TlNQYXJhZ3JhcGhTdHlsZQCUhARDQ0BTAgCEhIQHTlNB - cnJheQCUmQyShISECU5TVGV4dFRhYgCUhAJDZgAchpKE - n54AOIaShJ+eAFSGkoSfngBwhpKEn54AgYwAhpKEn54A - gagAhpKEn54AgcQAhpKEn54AgeAAhpKEn54AgfwAhpKE - n54AgRgBhpKEn54AgTQBhpKEn54AgVABhoYAhpKElpYG - TlNGb250hpKEhIQGTlNGb250HpSZIIQFWzMyY10GAAAA - FgAAAP/+QwBhAGwAaQBzAE0AVABCAG8AbAAAAIQBZoGp - AYQBYwCiAaIAogCGkoSWlg1OU1N0cm9rZVdpZHRohpKE - hIQITlNOdW1iZXIAhIQHTlNWYWx1ZQCUhAEqhIQBZKYD - hpKElpYHTlNDb2xvcoaShISEB05TQ29sb3IAlKIChARm - ZmZmAYN4dz8/AAGGhoY= - - Text - {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350 -{\fonttbl\f0\fnil\fcharset0 CalistoMT;} -{\colortbl;\red255\green255\blue255;\red254\green191\blue0;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs850 \cf2 \outl\strokewidth60 \strokec2 !} - VerticalPad - 0 - - Wrap - NO - - - Bounds - {{33.9441, 35.3884}, {444.112, 437.111}} - Class - ShapedGraphic - FontInfo - - Font - CalisMTBol - Size - 112 - - ID - 16 - Rotation - 270 - Shape - Bezier - ShapeData - - UnitPoints - - {-0.5, -0.439247} - {-0.5, -0.485429} - {-0.446295, -0.512626} - {-0.409933, -0.494153} - {-0.373569, -0.47568} - {0.436363, -0.073379} - {0.472729, -0.0549049} - {0.50909, -0.0364324} - {0.509091, 0.0364344} - {0.472729, 0.0549058} - {0.436368, 0.0733801} - {-0.373569, 0.47568} - {-0.409933, 0.494153} - {-0.446295, 0.512626} - {-0.500001, 0.485429} - {-0.5, 0.439247} - {-0.49998, 0.393072} - {-0.500002, -0.393066} - - - Style - - fill - - Color - - b - 0 - g - 0.770962 - r - 0.997971 - - FillType - 3 - GradientCenter - {-0.609524, 0} - GradientColor - - b - 0 - g - 0.911574 - r - 0.998779 - - MiddleFraction - 0.6111111044883728 - - shadow - - Color - - a - 0.9 - b - 0 - g - 0 - r - 0 - - Fuzziness - 8.0632610321044922 - ShadowVector - {0, 9} - - stroke - - Color - - b - 0 - g - 0.766903 - r - 0.997925 - - Draws - NO - Width - 2 - - - Text - - Pad - 0 - VerticalPad - 0 - - TextPlacement - 0 - TextRelativeArea - {{0.06, 0.17}, {0.88, 0.5}} - TextRotation - 90 - Wrap - NO - - - GridInfo - - GridSpacing - 4 - ShowsGrid - YES - SnapsToGrid - YES - - GuidesLocked - NO - GuidesVisible - YES - HPages - 1 - ImageCounter - 2 - KeepToScale - - Layers - - - Lock - NO - Name - Layer 1 - Print - YES - View - YES - - - LayoutInfo - - Animate - NO - circoMinDist - 18 - circoSeparation - 0.0 - layoutEngine - dot - neatoSeparation - 0.0 - twopiSeparation - 0.0 - - LinksVisible - NO - MagnetsVisible - NO - MasterSheets - - ModificationDate - 2008-11-17 11:41:28 -0700 - Modifier - Preston Jackson - NotesVisible - NO - Orientation - 2 - OriginVisible - NO - PageBreaks - YES - PrintInfo - - NSBottomMargin - - float - 41 - - NSLeftMargin - - float - 18 - - NSPaperSize - - size - {612, 792} - - NSRightMargin - - float - 18 - - NSTopMargin - - float - 18 - - - PrintOnePage - - QuickLookPreview - - JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoKPDwgL0xlbmd0aCA1IDAgUiAvRmls - dGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeAGVlktvJEUQhO/9K5IbHFyuR9brioEV - nFh5JM5o5MWsPIA9IP4+X2b12gPrBbHWSt3lzkdFREb6Ud7Ko0R+asr+/+lOfpBfJIYW - /Z/8LNc35yTHsyROh/ZYxyTgfJTrN/zip7NcxVD3r1+e9oQbCd/J9fd3T8e7337/48cH - eSLjm3O2wEfR2ry8tiJ5hDJSVEk9pF7jkONJrr89JfnqV/p8uz1KK1YpJynNHlKVk2gJ - JZWqdqZz9iklBc21ZmkxlJoin0/vsEonTo6b9lC79iQzh6azSc7FYjINZWIkk4MCKtrG - ejhyRpZeRYcSNIbk7oXmtk5m4mRaD/NvYcOK1bKnpnkuu4qt6jqEVujLmtuOvFgdrXv7 - mcjWQxut71ds5LcbAIADIcTkDgpt4TKmyigWoXNzVAYtfYzdUe5fOT25ACxMtZAQiPeX - xEVTSCkNeaBLDbXWDhwfnxH1QHJX0sfiulDDhhpMgMnUJZAGDLkCea3T6b+9T3K+N/pf - F6qL8+ZW0hYDjM4ESlFubyTlAFd/kvfwRKilj3IFRdTQHJsk6EwzW5UvDwBY1xf2cNVL - SDWiyTa2AyL8JgXr8fBOPv/sCzm8l68PNERtwm0wGIb4yTrK2LiYt3+rI5+uY1df7JW8 - CD9tS/XNGUdxFSUs1e+yiQPuXPUMyVI9lL2qeh2bq16Rjet+qRdVLcWrceySz8+S30+A - zyTPTNiYWMQSe10Z64vY+/OoudZNus9dudwRqE+rVVty97v63bZd7iZHL7PkjnfYe5xw - vvTOAJtW5+gMv3vFB8RetF6yzYQ5x3/L08wKeQZ3t1pin5Fp1GpD0ORKy7AnlLN/kbPS - 2ofZwIlqwA1G35aT5d3JyGncLARwMKZb0Tt2gIAHLOBGpTJExgtaxZ/MjxbK+B8mYdQ0 - 5QuYoSumBgvBBXEsP0n9khlidnI8xrK6LZqBzVm2bFzEhIjMiIwcPyGGeQqjdjrwT7h+ - LYHiADxbwGHg6+Uux+3+4u1/I6yj5DSiaKw0CBBXpRSDluldCFM4zgHvPa9zujJygMR3 - RXlB+JWt1t0PvmNg35PwHxsOE4mw1Weu0cykNci2JJjJhX+sVUm1pt4BgIOOr6HBGsLd - eYUt0uRFYFIEgAl4n6yrBqw6QuzKxtA0wdf4g/OZ2QWMAd4DfUgXOqHaYjtc4/Gjshmh - y/PP/YQ62VDzj4dlZttYGh2ZHAwCzaCeVcoaJty3VGm2b4bnZwuhC2LommlOA9lxF2ub - WDS6QrjdWjcjNZJ3Uzh/OyA6IjK7cIVwj0t8fPwuD05ya6b+F7C1v1cKZW5kc3RyZWFt - CmVuZG9iago1IDAgb2JqCjk4MwplbmRvYmoKMiAwIG9iago8PCAvVHlwZSAvUGFnZSAv - UGFyZW50IDMgMCBSIC9SZXNvdXJjZXMgNiAwIFIgL0NvbnRlbnRzIDQgMCBSIC9NZWRp - YUJveCBbMCAwIDUxMiA1MTJdCj4+CmVuZG9iago2IDAgb2JqCjw8IC9Qcm9jU2V0IFsg - L1BERiAvVGV4dCAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSSBdIC9Db2xvclNwYWNlIDw8 - IC9DczIgMTIgMCBSCi9DczEgNyAwIFIgPj4gL0V4dEdTdGF0ZSA8PCAvR3MxIDE3IDAg - UiAvR3MyIDE4IDAgUiA+PiAvRm9udCA8PCAvRjEuMCAxMSAwIFIKPj4gL1hPYmplY3Qg - PDwgL0ltMiAxMyAwIFIgL0ltMSA4IDAgUiAvSW0zIDE1IDAgUiA+PiAvU2hhZGluZyA8 - PCAvU2gxIDEwIDAgUgo+PiA+PgplbmRvYmoKMTAgMCBvYmoKPDwgL0NvbG9yU3BhY2Ug - NyAwIFIgL1NoYWRpbmdUeXBlIDMgL0Nvb3JkcyBbIC0yNzEuMzA2MyAwIDAgLTI3MS4z - MDYzIDAgNTQwLjI2NApdIC9Eb21haW4gWyAwIDEgXSAvRXh0ZW5kIFsgZmFsc2UgZmFs - c2UgXSAvRnVuY3Rpb24gMTkgMCBSID4+CmVuZG9iagoxMyAwIG9iago8PCAvTGVuZ3Ro - IDE0IDAgUiAvVHlwZSAvWE9iamVjdCAvU3VidHlwZSAvSW1hZ2UgL1dpZHRoIDI1NiAv - SGVpZ2h0IDI1NiAvQ29sb3JTcGFjZQo3IDAgUiAvU01hc2sgMjAgMCBSIC9CaXRzUGVy - Q29tcG9uZW50IDggL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCngB7dABAQAA - CAKg/p+2Bx4QJpBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBg - wIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYM - GDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBg - wIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYM - GDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBg - wIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYM - GDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBg - wIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYM - GDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBg - wIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYM - GDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIAB - AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDDQBg4DBgwYMGDA - wNjAA65NNU0KZW5kc3RyZWFtCmVuZG9iagoxNCAwIG9iago4ODMKZW5kb2JqCjggMCBv - YmoKPDwgL0xlbmd0aCA5IDAgUiAvVHlwZSAvWE9iamVjdCAvU3VidHlwZSAvSW1hZ2Ug - L1dpZHRoIDkxMiAvSGVpZ2h0IDkyNiAvQ29sb3JTcGFjZQoyMiAwIFIgL1NNYXNrIDIz - IDAgUiAvQml0c1BlckNvbXBvbmVudCA4IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlID4+CnN0 - cmVhbQp4Ae3QgQAAAADDoPlTH+SFUGHAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - gAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwY - MGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAED - BgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDA - wMvAAKraAAEKZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjExMDcwCmVuZG9iagoxNSAw - IG9iago8PCAvTGVuZ3RoIDE2IDAgUiAvVHlwZSAvWE9iamVjdCAvU3VidHlwZSAvSW1h - Z2UgL1dpZHRoIDI1NiAvSGVpZ2h0IDI1NiAvQ29sb3JTcGFjZQo3IDAgUiAvU01hc2sg - MjUgMCBSIC9CaXRzUGVyQ29tcG9uZW50IDggL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4K - c3RyZWFtCngB7dKBDQAgDMMw/n+6SHBGvA+aeXMKFAucd8XlNiuw8U9BuQD/5e/bzj8D - 5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+ - vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2889A - uQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/ - bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t/DNQ - LsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv - 284/A+UC/Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyU - C/Bf/r7t/DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7 - tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPl - AvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+ - 7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5 - AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79v - O/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+vu38M1Au - wH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2889AuQD/5e/b - zj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL - 8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2 - 889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC - /Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287/wyUC/Bf/r7t - /DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7Af/n7tvPPQLkA - /+Xv284/A+UC/Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vOPwPlAvyXv287 - /wyUC/Bf/r7t/DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvwX/6+7fwzUC7A - f/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+vu38M1AuwH/5+7bzz0C5AP/l79vO - PwPlAvyXv287/wyUC/Bf/r7t/DNQLsB/+fu2889AuQD/5e/bzj8D5QL8l79vO/8MlAvw - X/6+7fwzUC7Af/n7tvPPQLkA/+Xv284/A+UC/Je/bzv/DJQL8F/+vu3f/wUgwjJ6CmVu - ZHN0cmVhbQplbmRvYmoKMTYgMCBvYmoKMTIxNAplbmRvYmoKMjMgMCBvYmoKPDwgL0xl - bmd0aCAyNCAwIFIgL1R5cGUgL1hPYmplY3QgL1N1YnR5cGUgL0ltYWdlIC9XaWR0aCA5 - MTIgL0hlaWdodCA5MjYgL0NvbG9yU3BhY2UKL0RldmljZUdyYXkgL0JpdHNQZXJDb21w - b25lbnQgOCAvRmlsdGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeAHsnYlfTV37/288 - j4xJUVJRGtCEoggliZCxyFQUlUiGNCgJIXOFyFTKlCljmUMlUaZK4XY/N31fv//jd621 - 9z57n6nxDPvU1ev1PHfts89a61zn+njvz7XW3uuvv/AHI4ARwAhgBDACGAGMQOeIQDfy - 0132hx7tHB8QPwVGQCciwOiwR48e//nPf/4r9QMH/gPHQaRwjk58FhwkRkCHI0ClSIT4 - 3//27Kmn10vuR0+vZ8///peoEjWpw98zDl0HIkAuT0GLIEWqxN59+vTt269ff8lPv379 - +vbt07s3iJSoEkSJmtSBrxWHqIsRoGKkWuzVqzcRYn/9AQMMDAwGDhxoyPwMHAh/GgzQ - 1+/fD1QJmtQDTTKc1MUPjGPGCIg1AqwYe8IFKmiRSNFgoKHRoEGDjY1NTIbAjyn5PxMT - Y+PBg4wMQZcD9PszmmQkiWZSrN8sjkv3IgBqJI6xJxEjaNHAAKRobDLE1HSombmFxbBh - w+nPsGHDLMzNzYaampqAKkGUA/SBk+TSFShJLlx174PjiDECoosAMY0gRj0qRuCi0WDj - IaZDzS2GWVpZjbC2sbG1tWN+bG1trEdYWVkOH2ZuBqIETRoYEEyCJOl1KypSdN8tDkjX - IsCqsVevPn37DwAwDjYBLYIUR9jYjRxlb+/g6OjkDD9j4H9OTo4O9vajR9nZgiyHW5iZ - DjEmmNTvB2aSgSQqUte+fhyvqCLAqJGiUZ+QcYipmYWllbXtyNH2js5jxrm4uI6f4Obu - 7j5xIvyfm9uE8a4u48Y6OznYj7KzGWE1zHyoKUjSYED/vqhIUX2vOBhdjAD1jWAbwTXq - GxgOMiFiHGEzcrSD0xgX1wnuEz0mT5nq6TVtmrf39One3t7TvLw8p0yePMndbbzLWGdH - +1G21lbDzU2HDDYayCmS+EhdjASOGSOg9QiQKg4p4vTpBxeqgEbz4VY2I+0dQYtuEydP - 8Zw23cd3pt/sOXPn+jM/c+fM9pvlO8PH22vqZA/3CS5jnQCT1pbDzACSAw0oI0llBy9a - tf7N4gB0LwIUjlDFoWwcPGSohaW13WgQ44SJk6dOmz5j1uy5/vMXLgoIDFyydGkQ+Vm6 - ZElgwOJFC+b5z/Hz9fH2nDzJzXUcSNKGQBIUSRlJa62ISN1LBxyxdiNA4QjGsS9cqYIa - hxE0Oo8bP3Gyp/eMWXP8FywOXLpsxargkNWhYWFr165bt27t2rDQNauDg1cuDwoMWDjf - f7avz7QpHm4uYxxH244gijQyGNCvDxR2EJHa/Waxdx2MAJEjgWP/AQMHmQy1sLIZ5TDG - xc3Dc7qvH2hxybKVwWvCwiPWb4jeFBOzecuWrVu3btmyOSYmemNUZPja0JBVy5cGLpo3 - Z6aP1+SJ4wGSdiOGw1WroYE+FHYAkegidTAlcMhaiwC5ViV1HICjkbGpuaU1qNF14uRp - Pn7+CwODVoaEhkdu2LR5a2x8QmJS8s6UXbt2pe7alZKyM2lHQnzcti0xG9eHr10dvHzJ - YpDk9KkeE1yc7G2thg0dAhetBJHURWrtw2HHGAHdigDI8T//Jc4R4DjEbPiIkfagxine - vnPmBwStXL02YkPM1u3xO3bu2r133/709IOHDh0mP4cOpqcf2Je2JzUlKSFu2+bo9eGh - wcsDF/r7+Xh6TBjnNNrGyoJctFJEkmtW3YoJjhYjoKUIsNaxT38DQ2NTCytbe2cXUOPM - uQsDV4SsjdgYExuflLI77UD64aPHMzNPnDyVnX0afrKzT508kZWZcezIwfR9e1KTE+O2 - booKX7MqaPG82T5eHhPGOoy0Hm4GiNTvR65ZUZBa+naxWx2LACtHcq1qYjbcepTjOLfJ - RI1LVq4J3wBiTE7de+DQ0Yysk9k5OecuXMzNu3QpH34uXcrLvXjh/NmcM6dOZB47nL5v - d8qOuC3RkWHBywLmASMnuY6Bi1Zz08GG5JoVBaljWYHD1VIEmEoOWEe4VjUHOI4Z7+E1 - g6gxNCJ6S3xSalr64eNZp86cvZB7Kf/y1WvXC2/cuHETfuA/NwqvX71SkJ938VzO6ROZ - Rw/u370zITZm/TqiyFnTp7i5OI4cMYyUdfqjILX07WK3OhaBbt2gsNqrN1jHwXCtOtJh - nNsUH7/5gSvXRERvjd+5+wCIMTvnQl7+lWuFN27dKbp3/wH8PCQ/8N/79+4W3b554/rV - gksXz505mXk0PS11x/aYqLXBQYvm+np5uDqPthk+1MSICFIPL1l1LDVwuFqIAJRyeuox - chw2YpSTyyQvX//Fy0LCN25NSNmbfjQTxHjp8jWQ4r0HDx6VPH7y9NmzZ8+ZH/jt6ZOS - 4ocP7hfdvnH9Sn7uuTMnjh/al5q0PWZ92KrA+X7TJ7uNtbe1NBtCBYmXrFr4erFL3YoA - raz27jtgoLHpMOvRY8ZP9vabv2TV2qjN8Tv3ph87ceZ8XsG1G7fvghSfPHv+ovTV6zdl - ZeXsT1nZm9evSl++ePb0cTFo8lbhlfyLOacyD+9P3RG7KXz1ssVzZ3i6uzjYWZmzgsQq - q24lB45W0xEg8456vcA7GpsOt7EfA9eqcxYtWx2xaXvSblBjzoX8qzdu33tQ/OTZi9LX - b8rL31a+q6p6//4D8/P+fdW7yrcV5WVvXr18/rTk4f2im9cLcs9mZx7atythS9TaVYHz - ZnpNcnEUChJnPTT9FWN/uhMBiRwHEzmOdZs6wz9gRVjUloTU/UeyzlzIv3ajiIjx5euy - 8rfvqj5UV9d8/Pjp8+fPX+AH/vPp08ea6uoP799VVpS/KX3+rOThvduFl/POnjp+cE/y - 9k3hwUsX+Hl7uDqOpISEaQ9YqYOC1J30wJFqOAK0ltNH32AwXKzaj3X39PUPDF4XHZu8 - 52BG9vn8azfvPighYqyoBC2CEL98ra2rl/qpq6v9+uUzqPL9u7dEkk8e3QdF5uacOLp/ - V/zmyDXLFs6ePpkI0swEpj16Y01Hw18wdqdLESDmEZasGgzi5DhvSXB4THzK/iMncvKu - 3Lj74PGz0jflle+raz59+QpK/NbQ0Pj9+w/Jz/fvjY0N3+rrQZSfP1Z/qHpb/vrF0+L7 - t6/nXzidkb57x9ao0OWL5hBB2lkONTYc0LeX3n96ICB1KUVwrBqMADGPvfsZGA2xGDF6 - jJun77ylIRExCanpx7MvFBTeATW+KntbRcRYW18PSvzx8+fff/+S/vn7758/vhNR1hFJ - vq8kinx07+bVvJysw2nJsRvDViyeM93DxcF2+NDBA/VhGhKvWDX4BWNXuhQBMtXRq+8A - QxMzq5HOE6b6zlsSErk5cffBzJzcqzfvFT8rLXv7vvojiPFbA2iRKPGf//3vf/8KfuDP - f/6B43//BE0SSdZ8eAeKfPLgTmH+uZNH9+3cvnHtikWzvSe52NsMMx1k0B+vWHUpQXCs - mowAKebA1erAwUMt7RzHT57hD3LckrjnUFbOpet3Hjx58QbY+AkuU0GMoMV//gEl/v79 - h/w00R/66+/fv//993+gSSLJb/W1oMjK8lfPiu/duHwh+9j+lO0bw5Yv8ps2cezoERZD - jAb0Q0Bq8ivGvnQoAlDMIVerYB5tHFwm+0ApJ2Jz4p7DJ87l37j76Nmr8ndEjd8af/wk - XAQtskL8P+EPEeafP6BJKskf3xuIIt+/ffPi8YNbV3NPHz9ABLlswSxPN+dRVmbG9IoV - V5brUJLgUDUVAcnVqvmI0eMmes8JWBUeQ+VYcONeyfM3bz/UfCFq/JsTIyhPqET+d4Ek - AZIN9V8/Vb8rL3368Pa13DPH9++M3bAmaN6MKeMdbYebDmauWLGko6kvGfvRmQh0I8Wc - /gaDh4J5dPOctXDFuk3xuw+dOFdw4/7jl2UAx9r6BkaNQEalYmRlSSlJIAmK/Fb3peZ9 - xetnj+5cA0LuT962PiTQ38fDxd6aXLH2xStWnUkRHKjmIsDg0cCIXK26Tp4xLyh0Y1zq - wayzIMcnpeVVBI7ffxI2UjXyNCS//T/mR+ogoSS9bP37RyMg8sNbRpDZR9N2bA5fFTB7 - mvsYesXavw9MQiIgNfdFY086EQHAY68++gNNyNXqpOlzA0PWx6akZ+bks3L8SuGoSI2s - GOUlKVEkILL2c3XlGyDk1YunjuxJiFm3fIEvc8U6yABLOjqRHzhIjUaA4pEUcyztnCZ4 - zlq0KnxL0r7jZy4V3nv8svz9x6/1jSwcpV2jlBjpH0JIMletcNH6vaGOCvLh7SvnTxxM - jdu4ZilcsY6zH2FuYgiTkAhIjX7X2Jn4I8Dg0XCIhbU91FbnBYVtit9zJDv3+t2SF+VV - rBzlLlXl1SgrSeai9dffP4gg4ZL1wc2Cs5kHdm6NDF4828vNeaQllHQQkOJPDxyhZiPA - 4pEUc8a4T5sTGBIVu+vgifNX7jx6XlZV87WeWEeQoxQclaiRHOYhSRBJ6jpEkB8qXj25 - f+PSmWNpiTFrl8+fMZmWdBCQmv2qsTcdiACHR1LMmeK7cEX45qT9GTn5Nx88e1NZ/YVc - rBLrKJRjM2qUU+RvIshvdZ/el78sKbp28eSh1LgNqwPnek+Eks5QBKQO5AcOUaMR4PE4 - auzE6f5L1myM330kO6/w3pNXb6s/K5BjC2qURSQI8m8o6nysKnv+8Ba5Yk3eEr5y4cwp - rg42w4YgIDX6XWNn4o+ABI+2juOnQjEnYuvO9Cy4Wi1+Uf7+U13DD9mL1ZblKFQkMZH/ - g6JO/ZfqytdP4Yr19NE98dGhS/2nTxqLgBR/duAINRwBDo9mVjDX4eO/NGxTwt5jZ/Jv - wNXqu5qv32Tl2Co1ygvyZ2P95w/kivXqhRPpKdsiVi2aNXW8IwJSw182dif6CFA8DjAa - MszWEeY6FgdHQjHn5MVrdx+XVhDz+Pev/wm9Y2vlKCjrACH/JRaSXLFCjTU/53hawqaw - IH+fSeNGo4MUfX7gADUaASEePXz8g8JiEvdl5BTcevgcpjrqGkgtR1DKab0cBYgka3XA - QsIV69tXj+9ev3jy4K5YmPPw85zgaIsOUqPfNnYm9ggw7pHgEZYC+C0OXh+beuhU7nUo - 5lRWw1TH3zDTIamstkmN0oL836+fDaTGSko6ORn7EmMIID0AkGZYYhV7iuD4NBcBaTzO - C1obs2NfxtnLtx/RYg6Z6oCrVXZGsa1ylFyzMles3799ra589eReYe6pQ6mx6xGQmvuW - sSddiYA0HgOC128HPOYV3n/6upIt5kiuVtsuR16QpMb6s5EA8sWj25fPZuzbEbM2aB4C - UlfSBMepmQjI4HEZwWMmg8cPMPX49y+yEKDdeOQvWdmSztcaMuehAJB4m4dmvm/sRdwR - EMw9gnukeDwsxGOHrlYpUBkxk5LOr79hzgMBKe6EwNFpMwLK8AhLATg8csWc9lytkvew - cKWrAn58EwByu5SDREBqMw+wb3FEAPCo10ffkJl7ZPAo5R55PLZXjpwgm5rInEdj/acP - 5S+KJQ4S5yDFkQc4ClFEQBEeSXGVw6NgrqP9emQJKQ9IpsQKj9Khc5AISFGkBA5CixGQ - xiPMPcoUV1WBRyEgqYMEQHIlVlyko8UvH7sWWwQ4PA6lK1f5uUd5PHaAjhILqRiQszy5 - VawISLHlB45HsxEQ4HE8vzSHn3tUDR45QRIHSQBJHCQAUrJIZ9I4vM1Ds9879ibKCEjj - kaxcZZbmcHiEuUe2uNoxPEquWMmiAGGJla5i5W/zQECKMk1wUBqKgASPNuS+R27lqhrw - yAqSAhLuu2IAya9ixfsgNfSFYzdijgCPx1Fj4b5H9sYOunL1wydmaY6K8MgD8l8OkE/u - Xc89eYgHpAV5UAACUsz5gmNTbwRk8Qj3PcKNHWrBIwdIskiHAJIs0oHbPI6nJW4Kg2c/ - 8oDs0V29nxlbxwiINQJkf7l+ZIcAIR4LmBs7yENzVOYeifvkVs3RG5PhNo/XFJDkPkj6 - oAAHGwSkWPMEx6WRCHB4tGDdI8HjSXLfI3tjB7kNmVFRR6s59P20KTrlIQ9IwZN0EJAa - +fKxE9FFoHsPHo/TyVNzEtOOw2MB6H2PDB5ZPapEjgoBSR4UsE0CSPKwcr3/dsfdPESX - Kjgg9UegW3dm5aqFjQN9qFzkNnhqDoPHauYhVirFI+8gufsgnzMOMmGT5FFzdDcPBKT6 - v3vsQXwRYPA4iLpHwGOoEI91wscCqAaP8g4SHhRAn6RDHjU3cyo8i9UCANlb7z8ISPEl - C45I3RGAyQ5yY4eJFB4vsk/Noc94VDEeFQCSPEmHPGqOAHIieRbrIAPYDxIBqe7vHtsX - XwTk8JjAuMfn5BHI6sCjUkDSZ7GSh5VbIyDFlyc4Io1EgOCxN4NH16kz4ZHkxD2qF48K - AQnPYt2bQB9WDrt5WJoiIDXy7WMnYosAwWNfA+oeYccOcI8MHuGZq2rDoxQguUfNXb/I - PqycBeTA/uggxZYrOB61R0CCR2vY0IriMUX9eFQCyGMEkEv8Ybsr2A8SAan27x47EF8E - WDyaWo4cQ/EYnbD3eE4+eSS5GvEoB8i3r57Aw8oBkFsjmO2uwEEiIMWXLTgiNUeA4rH/ - QBMLHo/pJy5ev0v2l/v67TvsZ6Xy4iozayJcpMM+rDw/59je+Og1S8h+kBJA4poANWcA - Ni+mCAjx6O2/JBTweEwDeJQGZP1XupvHNbLdFQtIewSkmNIEx6KZCEjjceHKiK0pgEfY - 0IrgsV6NeJRykLCbB9mgFba7kgPkf3sgIDWTCtiLCCLQjSmuUvfoPXfJmuh4gseb6naP - 5JJVcJsHt90VAeTOrbBhsu8UV3trc3SQIsgQHIIGI8Dj0R6KqwtXhhM8XmDw+EW9eJTo - kezm0VBH9oMUAtKdc5AISA3mA3al3QjAjVZk7lEej2VVsDu5cEMrVS1dFbQjC8jSx3d5 - QE52QUBqNzewd41HgMOjuTXg0ZfgcafG8MhfsEoB8szRPfEbSYmVAeSAvr0QkBrPC+xQ - OxGgeBxA8ehO3ONGcI9nwD0+K2O3Q5ZsaCXAmup+VQjIrPSdW8JXLPRFQGonJ7BXrUVA - gEeXySwes4h7LH1brW73SFTN6ZEH5IOb+RSQqwPneLs7kzlIBKTW0gM71nAE5PG45yjg - 8YGG8MgLEnbXoSXW0sdFVy8wgFxAADkCS6waTgnsTnsRkMbjghXhW3amaxKPvB4FgLwh - AeQ0d2c7S1MjBKT2MgR71mQEeDw6u0+bE7h6Y7yG8cgLUgjI81npyeAgWUAawyrWnvig - AE3mBfallQgAHnv27j/Q2HyEPbhHDo9Xi1j3+LfaVq4KCkJSDrKWzEE+kAbkcASkVpID - O9V4BBg8Gpla2gnxeENz7lFY0mEBWVFaUnSVA+QM6iCNDRCQGs8N7FDjEZDHY3J61nmC - xwpSXNUIHvkLVuogOUCePro7fgOUWKe5OdshIDWeGdihNiLA4XG4nbMbcY8bqHtk8Fir - 7qU5/CUrd8UqBcjMA8mbwUEiILWRGNinNiLA4NGAcY8ziHtk8FiiUTwqBuSl00ekAdkH - F+loI0ewT81FQB6Pu4+eztc4HnlBygNy+XwKSDN0kJpLC+xJOxGQxuP8FeGbkw9kgnvU - NB55PXIO8g2UWAkg4zaEBM72cnOiDhIBqZ00wV41FAGCxz4DjEwl7jFu95HTlwCPb6o+ - atA9SkqsTU1/KCA/V1e8LCm6cp44yHU8IPv1wjlIDWUGdqOFCFA89jMwNiNzjzPmL5fg - 8WVF9We2uMrsaMVXXtT1G1fRAUD+aKj9+A4BqYWEwC61GgEej05uXrMDQzZI8PhO03hk - r1ilAHnnyrnMA0kcIK3AQSIgtZov2LlaI0DwCPuvSvC4bnPSgcxzV+6UaAGPUg6SB2T2 - kdS4KMZB2pI5SHSQas0IbFybEZDFY5QUHn/8+p9673uUvfKlV6wSQH6oeFnMADIGHKQP - LNJBQGozWbBvdUdAgkcrcI8+85drF4+ygKyhDjIv+zABZMBsrwlOtsMQkOrOCWxfexGQ - 4NGWcY9RcalHsmlx9V1NbYPG8ShxkL+ZEisHyP1JMeuWzfPxGDfaymwwOkjt5Qv2rNYI - yOExJmk/cY/FLys+aLq4yly6Ckus32p5QG6PCmYBOcRIHx2kWrMCG9dWBDg8DrN1muA1 - OyAkanvq4ew8MveoJTxKAbKx/vOHcsZBAiDXIiC1lSbYr2YiwOJxsJnV6HEePvOWrZPg - sRzw2Ag3dvxu0tTcI1fZkQfk/RvEQRJA+nkSBznEEAGpmfzAXjQbAYpHfaMhBI+efgHB - UniE7ck1XFwVXLE2NREHyQHy8rnM/TsQkJpNDuxN0xGQxePamB2se9QeHqVLrMRBvn7K - AnI9BaQjA0g9fBarptMF+1NzBBg8GgIeHSke1zPu8f7T1+AetYVHeQf5ovj25bMISDUn - Azav7QgoxOPZy1Bc1SYeZQD5lQKyMO8UOMj1wYvBQSIgtZ042L9aIgB41OujL43HU3k3 - tI1HJYDM2AcOMoiZgxyKc5BqyQhsVIsRkMFjELjHfZlnL98ufqFdPMoBshIcZGHuqUOp - sRSQ4x1taIkVHaQWkwe7VnkEpPG4OBjc46FTeYWAx8qar9pzj6TIyq5ilZRYqYMkgAwL - 8veZBIt0EJAqTwdsULsR4PA4FOYeJ/n4UzxmiAKPzQNy1lQEpHYzB3tXRwQkeLRxHO85 - C/AYC3jMFQUeBYD8xcxBvngEJdaMfYkMIMeOQkCqIyWwTe1FQBaPYeAeCR4fse7xlxaW - 5nBLdJQCcldsZPBiBKT2sgZ7VlcEhHicCniMFBMehYD82Vj/6X05ALIgJyNNFpA9uqsr - PtguRkCDEeDxOGoscY9hMYn7MnIKKB4/wcpV7eJRASCf3CvMPXmQB6QFWcWKJVYNpgx2 - pcYIcHi0APfI4HGXeNwjX2L98/vfXxwgbxXkHE9L3BS21H/6JImDRECqMUmwaY1FoHsP - 8tScwUOtWDxuSkxj8fge8PhT23jkAfnvP79+fPtaXfn6yb3rBJDbIlctAgfpYMMCsns3 - jcUMO8IIqCkCMnhcFRm76+DJ3Ov3nrBzj5rYYI6v3ij8jZmDZABZRx0kC8hQDpCDyIMC - EJBqShFsVoMREOJxuv/SMMDj8ZyCW1Bc5fD4R9P3PcqKkrsPkgPkKwDkRSlAmhjq99bD - /Vk1mDbYlXoi0K07s3LVwsYB3OOiVZHbAI8XKR6rydIcEeCRK7H+IZsHNBJAPn9EAZmw - iQByInGQgwz6IiDVkyHYqiYjwOBxEHWPgMfQTQkMHp8DHuvAPUruQ5aFlib/VgLIlG0R - qxbNnOoKDhIBqcmkwb7UFQGY7NDrrW9oAnh0JXiM4PD4qlI8eFQAyIe38qHEygJyzCgr - UwSkulIE29VgBAge+xpQPE4ULR7lSqxvWQfJAHKKq4O1hcnA/uggNZg42JU6IkDx2J/B - 45SZBI8pjHsUFx6VAPLY3oTo0CX+3hPHjLREQKojP7BNzUaAxaOp5agxFI/RCXuP5+Tf - eigq90icqsBBfoc5SADk3esXT6SnbI1YuXAmAlKzWYO9qSkCDB4HmlhYO7iyeEw/QYqr - r96KyT1KBNkkKLESB0kAuWbJXCEgcU2AmnIFm1V/BCR4HDlmorf/klDA4zFR4lEakPVf - AJCP7167wAPSHh2k+tMFe1BvBKTxuHBlxNYUwOO1uxSP9d/FMffIzatwi3SYOciqsucP - bxJAxksDEh/9qN6UwdbVGIFuTHHV1JLgce6SNdHxBI83xeceJRes/0c2MP/1XQDInVvD - Vy70neJqb22OJVY15go2rfYIcHg0t7YH97hwZTjB44Vrdx+De/wiNjxKKjpkkU5D3ceq - smcsIDcSB+nOlVgRkGrPG+xAPRGAleRk7pHg0V0Kj2VVn+oaRLI0h7tclXeQpYyDZAAJ - +7MiINWTJtiqZiIgxONkX4LHnSLGI69HHpAPbuafObonXgDIAX17ISA1kz7Yi4ojQPE4 - gMfjRtY9Piur+iiFx//jGaXV34RzkMRBUkBmpe/cEr5igS8CUsXpgc1pNgICPLpweMwi - 7rFUjO5RWNGRB+TqwDnT3J3JIh0EpGazCHtTVQR4PDqDewxcszF+z9Ez+TcfiBaP/BUr - 3cCcArLo6gUBIEeYG8Mq1p54H6SqcgTb0VgEJHgcYQ94XLAifMvOdMBjEYtH2H+VvQ1Z - LFerQEjuglUAyBuMg2QAaWdpaoSA1FgKYUcqjIAEj3bO7tPmBK7WATzygmQBWVH6uOjq - +az0ZM5BIiBVmCHYlAYjAHjs2bv/QGNzKTxeFTUeeT1SQNaSOcgHDCA3EEC6OdsNR0Bq - MImwK5VFgMGjkelwKTzeoO6xVjj3KKLLVcEVqwSQJTwgZ0CJFQBpgA5SZVmCDWkoAgwe - DRg8ziDuMTk96zzBYwVZmiNK9yhXYuUAefro7ngEpIYyB7tRRwQEeHQj7nFD/G4orooe - j/wVqxQgMw8kbw5fPh8BqY5UwTbVHwE5PG5OPpAJeCwROR55PXIO8g04yEunj+yO2xDC - O8g+uEhH/TmEPaguAgrweOT0JR3AIyvIJnKbx9/kNo+KlyVFV84LAWlmbNAP5yBVlyvY - ktojwOHRjBRXZ8xfHq4zeJQD5DshIGd7uTnREisCUu05hB2oLgIEj30G0OKqm9fswJAN - cbsZPL6p+iji4iop6MgA8jMB5J0r5zIPJG1exzpIAsheuEhHdemCLak3AgSPsIOOsTQe - rxSVvKyo/swWV7W9RQCjPUX/L1ik86Oh9iMPyKiQQAJIWzIHiYBUbwph6yqMAI9HJxk8 - vgM8/uAfSS6uuUdOnMyDO1gHKQNIH5iDtEJAqjBZsCl1R0CCRyvGPa7bnHQg89yVO7qB - RykHCYCsYQCZfSQ1jgJyAgJS3QmE7as0AhI82jJ4jIpLPZJNiqtvdAKPsg7yQ8XLYuIg - 9yfFgIP08SCAHIwOUqUpg42pLwJSePSZv3xdDIPHYp1wj+SiVdpBMoDMyz6cuj0qJGC2 - FwBymKmRPjpI9aUQtqzCCAjwOMFrdkAI4PFwdh7FY40OuEeJIJuafsMcZGP95w/lPCCX - zfPxGDcaAanCfMGm1BoBFo+DzaxGj/PwmbcM8LifuEfA4wemuPq7SbzFVaamIwTkN9ZB - MoAMDvDzJIAcYoiAVGsaYeMqigDFo77RkGG2TgSPwVHbBXiE/Vcl+z2Ks7gqEKQ8IHfE - rEVAqihPsBmNREAWj2sleCwHPDbCjR3ix6O0gySAfP30/g0KyPUUkI4MIPXwUXMaySns - pP0RYPBoSPHo6RcQvJ7B4/1nr9/V1OoKHiUlVqGDvHw2cz8Csv2Zge/UQgTk8bgD3ONl - cI+6hEcZQH6lgCzMOwUlVgSkFrIKu2xvBACPen30CR4dJwjx+FS38CgPyBfFty+fzdgH - gAxiSqxDcQ6yvUmC79NUBBTgcV/m2cu3i1/oFh7lAFkJDrIw99Sh1Nj1wYv9PMc72tAS - KzpITWUW9tOeCEjjcTFxj4dO5RXeJ3j8qjvuUdEcpASQYUH+PpNgDhIB2Z4MwfdoMAIc - Hocyc49Ba2N27MvQSTw2D8hZUxGQGkwr7KqdEZDg0cZxvKcf4DEW8JhL8Fipa3gUOMhf - zCKdF4+og0yMoYAcOwoB2c4swbdpKAJCPE7y8Q8K02E8KgXkrtjI4MUISA2lFHbTgQgI - 8Th11uLgSF3GowwgP70vB0AW5GSkyQKyR/cOhAzfihFQVwR4PI4ay+AxcV9GzuXbj6C4 - +gmW5vzSiaU5zII5SUUHNjCHR839+Pa1pvL1k3uFuScP8oC0IKtYscSqrnzCdjsWAQ6P - FuAeGTzu0l33KBEk6PHfXz8b6zlAHk9L3BS21H/6JImDREB2LG/w3eqJQPce5Kk5g4da - SfCYlpFTQPD4HvD4U9fwyDvIf/8hgKwmgLxOALktctUicJAONiwgu3dTT0CxVYxA+yOg - AI8HT+Zev/dEF4urzFUr8yQdBpB1AMjnj24V5BBAhnKAHEQeFICAbH/W4DvVFQEhHqf7 - Lw3blJh2PKfglgCP7IaPvEMT+2/cfZAcIF8BIC9KAdLEUL+3Hu7Pqq6cwnbbHYFu3enK - VRMLGwdwj4tWRW7bdfDkRYrHarI0R4z7r7b47wEHyP+BgxQAMoECciJxkIMM+iIg2500 - +Ea1RYDB4yDqHgGPoZsSGDw+B/dYB+5Rch9yiyIQ0QlKAJmyLWLVoplTXcFBmhj2R0Cq - Lamw4fZGACY79HrrGxI8uhI8RnB4fFWpu3jk5iDJlAcLyIe38sFBsoAcM8rKFAHZ3pTB - 96kxAgSPfQ0oHid2GjzKlVjfsg6SAeQUVwdrC5OBCEg15hU23a4IUDz2H2hiYe3gOmUm - wWMK4x51G49KAHlsb0J06BJ/74ljRloiINuVMPgmtUaAxaOp5cgxFI/RCXuP5+TfeqjT - 7pEYWYGD/A5zkADIu9cvnkhP2RqxcuFMBKRakwobb28EFOAx/QQprr56q8vuUSJIumhO - 4CCP7Y2PXrNkrhCQuCagvcmD71N5BIR49PZfEgp4PNYp8CgNSNif9e2rx3evXeABaW9t - jg5S5fmEDXYoAjwe7cE9LlwZsTUF8HjtLsVj/XfdnHvkpl0Ec5ANdZ+qyp4/vJmfIwdI - fPRjhzII36zKCMBSOVJcpe7Re+6SNdHxBI83dd89Si5Y4TYPWKRDNjDnALlza/jKhb5T - XBGQqswkbEsFEeDwaG4NePRduDKc4PHCtbuPwT1+0XU8Sio6ZA6yoe5jVdkzFpAbiYN0 - pyXWAX17ISBVkEnYhCoiIMCjuxQey6o+1TXo6NIc7nJV3kGWEgeZlc4AEvZnRQepiiTC - NlQVASEeJ1M87uxEeOT1yAPywc38M0f3xDOAdCZzkAhIVWUTttPRCFA8DqDukeJxY/ye - Y2fAPT4rq/oohUcx76DD41D+N+EcJHGQHCC3hK9Y4IuA7Gj+4PtVGgEBHl0AjyvCt+xM - zyLusbQzuEdhRUcekKsD50xzR0CqNJ+wsY5FgMejs7v3nMA1gMejgMcHnQaP/BUr7M9K - S6ylj4uuEgfJAXKEuTGsYu2J90F2LJPw3SqIAOCxZ+/+A43NR9gDHhdweCxi8QgbzLG3 - Ievq1SoQkrtgpYCsJSXWBzcYB8kA0m64qRE6SBUkEzbR4QgweDQytbRzdp82J3B1J8Qj - L0gWkBUEkOez0pMJIGeAg0RAdjiPsAGVREAxHq92KjzyepQD5AYCSDdnBKRKkgkb6XAE - ODwOt3N24/F4g7rHWuHcow5frgquWCWALAFAZkoB0gAdZIezCRvoYAQYPBow7nEGcY/J - 6VnnrxaVlFaQpTmdwj3KlVg5B3n6yO54BGQHMwjfrsoIyOJxQ/zuo6fzOx0e+StWaUAe - SN4cvnw+dZBmxghIVWYWttWOCMjhcXPygcxOiEdej5yDfAMl1ksAyLgNIYFzvFgH2QdX - sbYjifAtKosAwWOfAUamnHvcELf7yOlLnRCPrCCbyG0edA6y4mVJ0ZXzmdKA7IdzkCpL - LWyo7RGgeOxnYGxG5h5nzF8ezuHxZedyjwoc5DshIGd7uTnREisCsu1JhO9QWQR4PDq5 - ec0ODJHg8c27j52ouErkKAPIz9UAyDtXzmUeSNq8jnGQVuAgYfMAXKSjsvTChtoWAYJH - 2EFHgsd1BI/nrhSVAB4/s8XVJrq2hclo3f5/wSKdHw21HzlApsZFhQQSQNqSRToIyLal - EJ6twgjI4jGKc48Ujz/4R5Lr9twj988IFSTnIAkgixlAxgAgfWCRDgJShbmFTbU5AhI8 - WoF79Jm/fN3mJILHO50Tj1IlVgBkDQPI7MMEkAGzvSYgINucQfgGVUZAgkdbpwnEPUbF - pR7JJsXVN+9qahs6HR4lDvI3LbF+/sACcn9SzLpl83w8xo22MhuMDlKVGYZttSECLB4H - mwEePQgeY5L2EzwWv6z40PncI7loFTrIbywg8wCQ26OCGUAOG2Kkjw6yDTmEp6ouAhSP - +kamwygeA0Kitqcezs7rxHiUAmRj/ecP5YyDBECuRUCqLrGwpfZEgMfj6HEePvOWSeOx - EVau/m7qPMVVpqYjD8j7Nygg1wcH+HmCgxw2xBAB2Z5swvd0NAIMHg2HEDx6+gUES+ER - 9l+V7PfYOYqrAkE2NREHyQHy8rnM/TsQkB1NJ3x/xyIgi8e1MTtY91gO7rFz4lHeQb5+ - KgVIRwaQevgs1o4lF767zREAPOr10Sd4dKR4XM+4x/tPX0NxtbPiUd5Bvii+ffls5j4E - ZJsTCN+gyggoxOPZy1Bc7cx4lAHk15p3AMjCvFOHUrevD14MDhIBqcokw7ZaHQFFeDyV - V9jZ8agEkBkEkEH+dA5yKM5BtjqL8EQVRYDD41ArWlwNAve4L/Ps5dvFLzo3HuUAWUkA - mQuAjKWAHO9oQ0us6CBVlGjYTKsiIMDjeE+/xcHrY1MPncoleKys+dp53aNkUYCgxPri - EThIAsgwAOQkWKSDgGxVCuFJqouAEI+TfPyDwgCPGV0Cj80AMjJ48aypCEjVZRm21NoI - SPBo4zh+6qwuhUeBg/wFc5CfPpQDIAtyMvYlMoAcOwoB2do0wvNUEwEej6PGMnhMpHh8 - xLrHX51waQ6zHkBywQr7s8KTdH58+1rDOchdsRwgLcgiHXSQqsk1bKXlCMjiMTJ2V1dx - jxJBEgf56ycA8j0LyLTETdRBSgDZo3vLkcQzMAIdj0D3HuSxAIOHWknwmJaRU3Ab8Pj+ - EyzN6dx4FDjIf1hAPrl3PffkQQRkxzMLW2hHBDg8WrDuEfB48GRu4b0uUFxlrlqZBwX8 - oYCso4C8VZBznAByqf/0SQSQg8h9kAjIdiQXvqXNERDicbr/0rBNiWnHeTz+7Ox45AH5 - LwVkdeVrAORFAOS2yFWLoMTqYGNhQh1k925tji2+ASPQxgh0686sXLWwcYDi6qJVDB6v - 33vyurKazD12hg3m+OqNwt84QP4PHCQB5PNHFJAJm0IRkG3MJjy9oxFg8DiIukfAYyiD - x1vUPdY1EjyyGz4qTOVOcZC7D5ID5CsOkBGrFs2c6soAsrcePvqxo7mG728xAjDZoddb - 39BEgsdt4B4vAh5fdRk8cnOQZMpDASAnMg6yLzrIFpMJT+hwBAge+xpQPE6keEwg7vHW - o+dQXCV4lNyH3ClIqORDKAFkyjYCyCmuDtYWJrCBOQKyw9mGDbQQAQEeXafOXLQqYltK - 18OjAkA+vJWfc3xvQjRxkBPHjLQ0HWSAgGwhl/DljkeAxaOp1agxPB7zbz3sUniUK7G+ - pQ7yRDoAciUCsuNZhi20MgIUj/0HmlhYO7hOkcLj265SXGUuYeVKrASQxwggl8z1RkC2 - Mp3wtA5GgMOj5cgxE739l4RGJ+w9ltP18CgFyO/1X6vfvnp899pFAOTWiJULwUHao4Ps - YKbh21sRAWk8LlwZsTUl/cTF63efvCJ4/N4V5h65Co88IG8SQMZHrxECEp9s1YqswlPa - G4FuTHHVlOJx7pI10fFdFI8ygPzCAPLCifSdW8NXLvQlgDTHEmt70wzf17oI8Hi0B/fI - 4vHCtbuPAY9f6rsUHqVKrA11n6rKnj8UANKdK7EiIFuXWnhWOyIAK8nJ3KMMHm8+fF5W - 1XXmHqUuWOE+SFik871eFpCTEZDtyC98S5siwOHR3Brw6LtwZfjWneknuioehbvr/Gyo - +1hV9gwAeebYnviNxEEygBzQtxcCsk05hie3PgIUjwMoHt29wT1upO7x5sNnZVUf6xq6 - yNIcDo/yDrIUSqwXstJ3bglfsdAX9mdFB9n61MIz2x4BAR5dJrN4zCJ4LO2C7hFkyS2a - I6tYGUA+AEAeBUCuDpzj7e5MFukgINueZ/iO1kVAHo97jp7Jv/lADo+daQcdHofyv3GC - pPuzgoMsfVzEAXIBAeQIc2NYxdoTb/NoXX7hWW2KgDQeF6wI37IzvSvjsQVATnN3trM0 - NUJAtinJ8ORWR4DHo7P7tDmBqzfGd3E88oIUAPLqecZBIiBbnVh4YnsiAHjs2bv/QGPz - EfbgHjk8Xi1i3SPsv8rehtxVrlZlHWQtKbE+uCFxkNPcnO2GIyDbk2v4npYjwODRyNTS - TohH2J5ctrjahfQoKemwgKwoLSkigEyGEuuCGYyDNEAH2XJy4RltjYA8HpPTs84TPFaQ - pTldEo/8BSstsXKAPH10d/wGKLEiINuaZHh+qyPA4XG4nbMbcY8bqHtk8FgrnHvsSnjk - BSkFyMwDyZvDV8xHQLY6u/DENkaAwaMB4x5nEPeYnJ4JeCzp0njk9SgE5KXTR3bHCQHZ - BxfptDHd8PQWIiCPx91HTud3eTzyguQA+ZI4SArI5QwgzYwN+uEcZAvphS+3LQIcHs1I - cXXG/OXhm5MPIB7JCgFuTQALyHdvoMTKADIkcLaXmxMtsSIg25ZueHYLESB47DPAyJS4 - R685gSEb4gCPlwCPb6o+dmH3KBFkE7nN4+/v9Z+rK16W3LlyjgBynQCQvXCRTgsZhi+3 - IQIUj/0MjKXxeKWo5CVfXG2ipCAZ2rV+BID80VD7kQdkFAKyDSmGp7YhAjwendy8Zgvx - +K6r45G9YpUHZBIBpA/MQVoRB4mAbEO64anNR4DgETaYMzazYtzjus1JBzLPXblD8PiZ - nXvsqniUcpAAyBoGkNlHUuMoICc42ZJFOuggm08xfLUNEZDg0ZbBY1RcKuseCR5/8I8k - 71pzj9x1Ob1ilQDyQ8XLYuIg9yfFEEB6EEAORkC2Id3w1OYjIIVHn/nL18UweCxGPFJJ - SjtIBpB52YdTt0eFBMz2AkAOMzXSR0A2n2T4aqsjIMDjBK/ZASGAx8PZtLj6rgbxCJJk - AfkbSqyN9Z8/lPOAXDbPx2PcaARkq3MNT2wxAiweB5tZjR7n4TNvGeBxP3GPgMcPjHv8 - 3dR13SMhpBCQ31gHyQAyOMDPkwByCOzPiot0Wkw1PKEVEaB41DcaMszWieAxOGo74DGP - zD0CHmH/VcmGVl3TPUoE2dQkC8gdMWsRkK3IMDylDRGQxeNaCR7LAY+NcGNHV8ejPCBf - P71/gwJyPQWkIwNIPXzUXBvyDk9VHAEGj4YUj55+AcHrGTzef/Ya8UjYSH8UOMjLZzP3 - IyAV5xQebXcE5PG4A9zjZXCPiEdOjTKA/FrzDgBZmHcKSqwIyHZnHr5RUQQAj3p99Ake - HScI8fgU8cjLUb7E+qL49uWzGfsAkEFMiXUozkEqSi881rYIcHgcyhZX18bs2Jd59vLt - 4heIRzk9wuYBcJvHj29fayoJIHNPHUqNXR+82M9zvKMNLbGig2xb9uHZshGQxuNi4h4P - ncorvE/w+BWLq7wkZR2kBJBhQf4+k2AOEgEpm1v4d5sjII1H/yCCxwzEIy9DyW9Sc5Ay - gJw1FQHZ5tTDNyiIgASPNo7jPf0Aj7GAx1yCx0rEo0SL9BcJIH8xi3RePKIOMjGGAnLs - KASkgvzCQ22KAI/HUeMm+fgHhbF4fITuUVqM8JcSQO6KjQxejIBsU9rhyUoiIMTj1FmL - gyMRj3I6lByQAuSn9+UAyIKcjDRZQPboriTYeBgj0EIEmPseBw+1GjWWwWPivoycgtsE - j59gac4vXJojUaMCQD65V5h78iAPSAuyihVLrC3kHL6sNAIcHi3APTJ43IXuUaBAmV8Z - QP75/e+vn431HCCPpyVuClvqP32SxEEiIJUmHL7QbAS69yCPBWDwOB3c46bENBaP7wGP - PxGP0oLkHCRsYA5zkNWVr5/cu04AuS1y1SJwkA42LCC7d2s26vgiRkBhBLp1Z5bmCPB4 - 8GTu9XtP2OLqP7+73g460gqU+UsIyDoA5PNHtwpyCCBDOUAOIg8KQEAqTDc82EIEGDwO - ou5xuv9SgsfjOQW3wD2+/1RH8cjqUSYtu+yfsoB8BYC8SAAZQQDpCoA0MdTvrYf7s7aQ - ePiyogjAZAdZuWpiYeMA7nHRqshtuw6evEjxWE2W5nTFDeZa+KeGAyRsYN4oAGQCBeRE - 4iAHGfRFQCrKNjzWUgRk8Bi6KYHB43MWj5L7kFtI0i70shJAphBAzpzCALI/ArKlzMPX - FUSA4LE3g0fXqTMXrYrg8PiqEvGo7N8YOUA+vJWfc3wvC8gxoyxNEZAKcg0PtRwBgse+ - BsQ9jpkI7pHD40PEozIxwnEZQL5lHGS6BJDWFiYDEZAtJx+eIRsBisf+A00srB1cp1A8 - pjDuEfHYjB7ZR82R265YB0kAeWxvQnToEn/viWNGIiBlEw3/blUEWDyaWo4cM9Eb8Bid - sPd4Tv4txGNzapQC5HeYgwRA3r1+8UR6ytaIlQvBQdojIFuVfXiSTARk8LgyYmtK+glS - XH31Ft1jc5JU6CCP7Y2PXrNkrhCQuCZAJuPwz+Yi0I1xjwwe5y4heDyGeGxOiOxrAgf5 - vf4LAPLx3WsXCCDDWUCao4NsLvHwNUUR4PFoD+5xIYvHa3cfEzzWf8e5R+XKFACyoe5T - VdnzhzeJg2QA6c45SHz0o6K0w2NKIgAryUlxlcPjmuh4gsebD5+XMUtzcO5RqSCVAHIn - AaTvZHCQCEglSYeHlUWAw6O5NeDRd+HK8K07009cYPD4BfGoVIvkBU6PdAPzuo9VZc9Y - QG4kDpIB5IC+uHmAstzD4/IREODR3XvuEgken5VVfapr+MlvEdBsZnbRFzlBwm0e1EGW - EgeZlc4C0gUBKZ9veKTZCAjw6DJZiMfSt9WIx5b+meH0yAPywc38M0f3xG9cEzjH292Z - zEEiIJtNQHxRKgIUjwOoe6R43Bi/5+gZcI+Ax49SeOy6O+g0J0pOkLD9HAvIIgrILeEr - FvjCBuYjqIPsibd5SCUd/qEsAjJ4XBG+ZWd6FnGPiMfmZCh5jdOjPCBXB86Z5u5sZwkb - mKODVJZ+eFwmAjwend295wSuZvH4APEokVzzv3CCFADyKnGQPCCNYRUrAlIm7/BPhREA - PPbs3X+gsfkIe3CPC1g8Xi1i8QgbzOFjAVqnRwrIWlJifXCDcZAEkG7OdsMRkApTDw8q - iACDRyNTSztn92kSPML+q+gem5ch/6oMICtKHxddPZ+VnkwAOYM6SGMDBKSC3MNDchGQ - x2NyetZ5gscKUlxFPPKyU/obp0cpQJ4+ujt+AwJSLuHwQLMR4PA43M7ZTRaPtcK5Ryyu - KtWjZFEA6yArSksAkJkHkjcjIJtNPnxRNgIMHg0Y9ziDuEcGjyWIR+Xyk3tFESAvnT6y - O04IyD64SEc2+/Bv2QjI4nFD/O6jp/MZ94h4lBOesgOcIOUBuXw+dZBmxgb9sMQqm334 - t0wEpPE4f3n45uQDmeAeEY/KlKf4OKdHzkG+gRIrA8iQwNlebk60xIqAlMk+/FM2AgSP - fQYYmbLuMWRD3O4jpy8BHt9UfUQ8KtaewqNUkE1NfyggP1dXvCwpukId5DoBIHvhHKRs - AuLfwghQPPYzMDYjc48zODxeKSp5icVVhbJTelAAyB8NtR/fISCFeYa/ty4CPB6d3Lxm - Bwrw+A7xqFR7Cl+QB+SdK+cyDyRtZgFpRRwkArJ1edlFzyJ4hB10JHhcR9zjuSt3CB4/ - s3OPTTTRFKYgHhREQCEgs4+kxkUxDtKWLNJBB9lFlda6jy3Boy2DxyiJeyR4/MHf94hz - jwLlKflVDpDFBJD7k2IAkD4eLvZWZoMRkK3Lyy56lgSPVuAefeYvXxeThHhUoraWD0sD - soY6yLzsw6nbo0ICZntNcLIdZmqkj4DsolprzccW4HECcY9RcalHsmlx9V0N4rFlBcqc - wQLyN5RYG+s/fyh/KQHksnk+HuNGIyBbk5Rd9xwWj4PNrEa7ePjMWwZ43E/cY/HLig/o - HmXE1oo/hYD8VisEZHCAnycBJNnAHBfpdF3FNf/JKR71jUyH2ToBHgOCo7anHs7OI3OP - gEfYYE7yUDl0j61QI5yiBJA7YtYiIJtPRXz1r78EeBwnjcdywGMj3NjxuwmLq61TInOW - LCBfP71/gzrI9RSQjgwg9fBZrCg/BRFg8Gg4hODR0w/x2BblKTlXASAvn83cj4BUkH54 - SDoCsnhcG7ODdY+IRyVya/GwFCC/1rwDQBbmnYISKwJSOvnwL7kIAB7J9uSAR0eKx/WM - e7z/9DW6xxaFp+wEWUC+KL4NgNwHgAxiSqxDcQ5SLhPxAERAIR7PXr5T/ALxqExtLR+X - AWQlAWTuqUOpseuDF/t5jne0oSVWdJAoQdkISONxcTDB46m8QorHr1hcbVl6is9QCMgM - AGRYkL/PJJiDREDKZiL+DRHg8DjUajQprgaBe9yXcfbybcSjYp219mhzgJw1FQGJ4lMc - AQkebRzHe/oBHmNTD53KJXisrEE8tlZ9Cs6TAPIXs0jnxSNwkBn7EhlAjh2FgFSckF37 - qBCPk3z8g8IQjwq01Z5DSgC5KzYyeDECsmurTvmnF+Jx6qzFwZGIx/aIT9F7pAD56X05 - ALIgJyNNFpA9uiv/dvCVLhYBHo+jxjJ4TKTu8RFbXP2FS3MUSa1Vx+QBea8w9+RBHpAW - ZBUrlli7mOSa/bgcHi3APTJ43IXusVVqa8VJPCB/NtZzgDyelrgpbKn/9EkSB4mAbDZF - u9SL3XuQxwIMHmolwWNaRk7BbcDj+0/1jT8Rj62QndJTOEDC/qw/vn2trnz95N51Asht - kasWgYN0sGEB2b1bl8o5/LBKI6AAjwdP5hbee4LFVaUqa8MLDCD//P7318/GOgrIWwU5 - BJChHCAHkQcFICCVJmgXe0GIx+n+S8M2JaYdzym4JcAju6NVG5IQT5VEQBaQrwCQFwkg - IzhAmhjq99bD/Vm7mOyUfdxu3enKVRMLGwdwj4tWRW7bdfDkxesEj9Vk7hE3mJNIq32/ - cID8HwvI548oIBMoICcSBznIoC8CUll+drXjDB4HUfcIeAzdlMDg8Tm4xzrqHhGP7RMi - +y4lgEwhgJw51RUcpIlhfwRkV9Odks8Lkx16vfUNCR5dp85ctCqCw+MrxGOHZMi/WQ6Q - D2/l5xzfywJyzChLUwSkkuzseocJHvsaUDxOVIRHyWM6+PzC39oWARlAvmUcZDoDyCmu - DtYWJrCBOTrIric++U9M8dh/oImFtYPrFIrHFMY9Ih7bJrrmzlYIyGN7E6JDl/h7Txwz - EgEpn5hd9AiLR1PLkWMoHqMT9h7Pyb/1kHOPiMfmhNbK1wSA/A5zkADIu9cvnkhP2Rqx - cuFMBGQXlZ6ijy2Dx5UR21LST5Di6qu3WFxtpdpacZoSQMZHr1kyVwhIXBOgKEm70DEh - Hr3nLgkFPB5DPLZCYW07RQjI+i8AyMd3r10ggAyngLS3NkcH2YVUp/Sj8ni0B/e4cGXE - VoLHa3cfEzzWf8e5x7bJTvnZ0oCsKnv+8GZ+zrG9DCDdOQeJj35Umqld4wVYKkeKq9Q9 - Ah7XRMcTPN5E96hcWe17RQkgdxJA+k52RUB2Db218Ck5PJpbAx59F64M37oz/cQFBo9f - EI/tk57idwkA2VD3sarsGQvIjcRBMoAc0Bc3D2ghYTv5ywI8ukvhsazqU13DT36LAMU5 - hkdbHwFZQJYSB5mVzgLSBQHZyaXWmo8nxONkxGPrxdWOMzk9/oZVrAwgH9zMP3N0T/zG - NYEASGcyB4mAbE3Wdt5zKB4HUPdI8bgxfs+xM+Aen5VVfZTCI+6g0w4FyryFEyRsP/ed - lFhLHxdRQG4JX7HAd7KL/QgssXZepbXqkwnw6AJ4XBG+ZWd6FnGPpW+r0T3KyKnDf3J6 - lAfk6sA509yd7RCQrcraznsSj0dnd+85gasBj0cBjw8Qjx0Wn6IGOEEKAHmVOEgekMaw - irUn3gfZeRXX7CcDPPbs3X+gsfkI2J7cdwGHxyIWj7DBHHufFV6tKpJXm49xeqSArCUl - 1gc3GAfJAnK4qRE6yGZTtlO/yODRyNTSztl9GuKxzfpq8xs4QbKArAAHefV8VnoyAeQM - 6iCNDRCQnVpzzXw4eTwmp2edv4p4bLPOWvsGTo8ygNwdv4EA0s3ZDgHZTL529pc4PA63 - c3bj8Qjbk0NxtVY494iXq60VXEvncYKUALIEAJmZnrwZAdnZ1dbi52PwaMC4xxnEPTJ4 - LCmtIMVVdI8tiasdr3N6FALy0ukj0oDsg4t0WkzeTniCLB43xO8+ejof8dgOmbX+LZwg - pQF5AAC5fD51kGbGBv2wxNoJ5dbSR5LG4/wV4ZuTD2SCe0Q8tl5dbT+T0yMHyDdQYiWA - jNsQEjjbi3WQCMiWkrcTvk7w2GeAkSnnHjfE7T5y+hLg8Q26x7brrNXvoIJsavpDAfm5 - uuJlSdGV85kAyHUCQPbCOchOqLhmPxLFYz8DYzMy9zhj/nIJHl+ie2y1uNpxogCQPxpq - P76TAaQTLbEiIJvN3c74Io9HJzev2YEhPB7fYXG1HTpr9VvkAXnnyrnMA0kcIK2Ig0RA - dkbNNfOZCB5hBx0JHtcR93juyp0SwONntrjaRFOn1YmGJ7YqAgoBmX0kNS6KOkgnWzIH - iYBsJnc740uyeIySuEeCxx/8fY8499gqlbXhJDlAFhNA7k+KAQfpA4t0rMwGIyA7o+aa - +UwSPFqBe/SZv3zd5iTEYxs01ZFTpQFZQx1kXvbh1O1RIQGzvSY42Q4zNdJHQDaTvZ3v - JQkebZ0mEPcYFZd6JJsWV9/VIB47orZWvJcF5G8osTbWf/5Q8VICyGXzfDzGjUZAdj7B - Nf+JWDwONrMa7eJB8BiTtJ+4x+KXFR/QPbZCUh06RQjIb7VCQAYH+HkSQJINzHGRTvM5 - 3JlepXjUNzIdRvEYEBK1PfVwdh6ZewQ8wgZzkkeSo3vskPKUvFkGkOUSQK5FQHYmmbX2 - swjwOM7DZ94yHo/lgMdGWLn6uwmLq0rEpILDsoB8/fT+Deog11NAOjKA1MNnsbY2oXX8 - PAaPhkMIHj39AoIRjyoQWVuaUADIy2cz9++IQUDquLTaM3xZPK6N2cG6R8RjW1TV/nMV - ALIw7xSUWBGQ7UloHX8P4FGvjz7BoyPF43rGPd5/+hrdY/s11qZ3ygLyRfFtAOQ+AGQQ - U2IdinOQOq6yVg9fIR7PXr5T/ALx2CZRdeBkKUB+rakEB1mYe+pQauz64MV+nuPRQbY6 - m3X/REV4PJVXSPH4FYurHVBZG96qEJAZFJD+PpNgDhIBqftKa9Un4PA41Go0Ka4GgXvc - l3H28m3EYxvk1OFTmwPkrKnjHW3oHCSWWFuV0jp9kgSPNo7jPf0WB6+PTT10KpfgsbIG - 8dhhobW2AQkgf9FFOuUvHoGDzNiXGBMWBIAcOwoBqdMqa/XghXic5OMfFIZ4bK2EVHqe - EkDuio0MXoyAbHU66/yJQjxOnYV4VKnI2tKYFCA/vSeALMiRB2SP7jqfcvgBlEeAx+Oo - sQweE6l7fMQWV3/h0py2iKoD58oD8l5h7slDPCAtyCpWdJDKc7kzvMLh0QLcI8FjZOwu - dI8dUFUH3soD8mdjPQfI42mJm8KW+k/nHSQCsjPoTtln6N6DPBZg8FArCR7TMnIKbgMe - 33+qb/yJeOyAwNr4Vg6Q//7z68e3r9WVr5/cu5578uCubZGrFoGDdLBhAdm9m7IvE4/r - egQU4PHgydzCe0+wuNpGNangdAaQf37/++tnYx0A8vmjWwU5BJChHCAHkQcFICB1XXXK - xy/E43T/pWGbEtOO5xTcEuCR3dFKBemGTbQQAVlAvgJAXpQCpImhfm893H5OeT7r+Cvd - utOVqyYWNg7gHhetity26+DJi9cJHqvJ3CNuMNeChFT7MgdI2MBcCMgECsiJZA5ykEFf - BKSOi66Z4TN4HETdI+AxdFMCg8fn4B7rqHtEPKpWcs22pgSQKdsiVi2aOdUVHKSJYX8E - ZDMJrdsvwWSHXm99Q4JHV4LHCA6PrxCPzQpHXS/KAfLhrXxwkCwgx4yyMkVA6rbkmh09 - wWNfA4rHiYrwKHlMh7ryD9uVjoAMIN+yDpIB5BRXB2sLE9jAHB1ks1mtsy9SPPYfaGJh - 7eA6ZSbBYwrjHhGP0jLR3F8KAXlsb0J06BJ/74ljRloiIHVWbi0OnMWjqeXIMRSP0Ql7 - j+fk33rIuUfEo+aEyPYkAOR3mIMEQN69fvFEesrWiJULZyIgW0xpXT5BAR7TT5Di6qu3 - WFzVuBKFgmz6Q7afY0qsxEEe2xsfvWbJXCEgcU2ALktP4diFePSeuyQU8HgM8agtIQr1 - +H9k+7lf3+u/ACAf3712gQAynALS3tocHaTCbNb5gzwe7cE9LlwZsTUF8Hjt7mOCx/rv - OPeoHWUKHGRD3aeqsucPb/KAdOccJD76Uef1J/sBYKkcKa5S9wh4XBMdT/B4E92jdnTI - 9Sp0kAJA7iSA9J3iioCUzeNO8jeHR3NrwKPvwpXhBI8XGDx+QTxy8tD8f6UA+bGq7BkL - yI3EQTKAHNAXNw/oJDKUfAwBHt2l8FhW9amu4Se/RYDmM7Jr9ygLyFLiILPSGUDC9nPo - ICU53Il+EeJxMsXjTsSjKP4h4PRISqwNdQSQD27mnzm6J37jmkAApDOZg0RAdiIp0o9C - 8TiAukeKx43xe46dAff4rKzqoxQecQcdTauUEyRXYuUAuSV8xQJfAOQILLF2NjX+JcCj - C+BxRfiWnelZxD2Wvq1G96hpBUr3x+lRHpCrA+dMc3e2s4QNzNFBdipN8nh0dveeE7gG - 8HgU8PgA8SitDa38xQkS9melc5Clj4uuEgfJA9IYVrH2xPsgO40kAY89e/cfaGw+ArYn - 913A4bGIxSNsMMfeZ4VXq1pQJKdHCsha6iBvMA6SBeRwBGSnkSL9IAwejUwt7Zzdp80J - XI141ILslHfJCZIFZAUB5Pms9GQCyBnUQSIgO5Mg5fGYnJ51/iriUblENPoKp0cZQO6O - 30AA6eZsh4DsTHL8i8PjcDtnNx6PsD05FFdrhXOPeLmqUR1KOuMEKQFkCQAyMz15Mw9I - A3SQnUWTDB4NGPc4g7hHBo8lpRWkuIruUaILbf3C6VEIyEunj0gDsg8u0ukcipTF44b4 - 3UdP5yMetaU+Bf1ygpQG5AEA5PL51EGaGRv0wxJrp9CjNB7nLw/fnHwgE9wj4lGBMLR0 - iNMjB8g3zx7cIICM2xASONvLzYk6SARk59Aj3NjRZ4CRKeseQzbE7T5y+hLg8Q26Ry3J - T75bKsgmch8kzEF+rq54WVJ05XwmAHKdAJC9cA5S9xVJ8djPwNiMzD3O4PB4pajkJbpH - eV1o64gMIN8hIHVfeYo/AXGPDB6d3LxmBwrw+A6Lq9qSn3y/8oC8c+Vc5oEkDpBWxEEi - IBXnuA4dJXiEHXQkeFxH3OO5K3cIHj+zxdUmmgzyOYJHNBcBASB/NNR+ZACZfSQ1Lopx - kLZkDhIdpA4pT/FQZfEYJXGPBI8/+Psece5Rc+JT1JMcIIsJIPcnxYCD9PFwsbcyG4yA - VJzjOnRUgkcrcI8+85ev25yEeFQkB60fkwZkDQVkXvbh1O1RIQGzvSY42Q4zNdJHQOqQ - 9hQNVYJHW6cJxD1GxaUeyabF1Xc1iEeti1A4ABaQv6HE2lj/+UPFSwkgl83z8Rg3GgGp - KMF16xiLx8FmVqNdPAgeY5L2E/dY/LLiA7pHoRq0/7sQkN9qhYAMDvDzJIAkG5jjIh3d - UqD0aCke9Y1Mh1E8BoREbU89nJ1H5h4Bj7DBnOSR5OgeRSLIpiYOkOUSQK5FQEqnta7+ - JcDjOA+fect4PJYDHhth5ervJiyual+JzAhkAfn66f0b1EGup4B0ZACph89i1VU50hs7 - +ugbDiF49PQLCEY8ikV7Csch4yAJIC+fzdy/IwYBqbMSFA5cFo9rY3aw7hHxqFAQWj6o - AJCFeaegxIqAFKa1zv4O7lGPwaMjxeN6xj3ef/oa3aOWpae4e1lAvii+DYDcB4AMYkqs - Q3EOUmfVSB4qR5bmkOIqdY8Uj2cv3yl+gXhUrAdtH5UC5NeaSnCQhbmnDhFALvbzHI8O - UnfFCCOXxuPiYILHU3mFFI9fsbiqbfEp6l8hIDMoIP19JsEcJAJSZyXJ4XEog8cgwOO+ - jLOXbyMeFSlBHMeUATIWADlr6nhHGzoHiSVWXRSlBI82juM9/QCPsamHTuUSPFbWIB7F - oT+5UUgA+Ysu0il/8QgcZMa+xJiwIADk2FEISF2UIhmzEI+TfPyDwhCPctkvvgNKALkr - NhIBqatKZMYtxOPUWYhH8WlP4YikAPnpPQFkQU5Gmiwge3TX7ezscqPn8ThqLIPHROoe - H7HF1V+4NEehHrR9UB6Q96DEepAHpAVZxYoOUtcEzeHRAtwjwWNk7C50j9oWW2v65wH5 - s7GeA+TxtMRNYUv9p/MOEgGpW4rs3oPOPQ61kuAxLSOn4Dbg8f2n+safiMfWaEMb53CA - hO3nfnz7Wl35+sm967knD+7aFrlqEZRYHWxYQHbvplsJ2bVHqwCPB0/mFt57gsVVbYis - LX0ygPzz+99fPxvrKCBvFeQQQIZygBxEHhSAgNQlhQvxON1/adimxLTjOQW3BHhkd7Rq - S6bguZqIgCwgXwEgLxJARnCANDHU762H28/pkB67dacrV00sbBzAPS5aFbltF+DxOsFj - NZl7xA3mNKGsdvbBARI2MKeAfP6IAjKBAnIimYMcZNAXAalDcvyLweMg6h4Bj6GbEhg8 - Pgf3WEfdI+KxnWpR/9uUADKFAHLmVFdwkCaG/RGQOqRHmOzQ661vSPDoSvAYQfB4EfD4 - CvGofj11uAc5QD68lQ8OkgXkmFFWpghIHVLjXxSPfQ0oHicqwqPkMR0dTh1sQA0RkAHk - W9ZBMoCc4upgbWECG5ijg9QVTVI89h9oYmHt4DplJsFjCuJRDbpRW5MKAXlsb0J06BJ/ - 74ljRloiIHVFi2ScxD0CHk0tR46heIxO2Hs8J//WQ849Ih7VpiTVNCwA5HeYgwRA3r1+ - 8UR6ytaIlQtnIiB1SYswVgV4TD9B3eNbLK6qRjDqbkUJIOOj1yyZKwQkrgnQAW0K8eg9 - d0ko4PEY4lHdElJp+0JA1n8BQD6+e+0CD0h7a3N0kDqgRDpEHo/24B4XrozYmgJ4vHb3 - 8SvAY/13nHtUqXLU1Jg0IKvKnj+8mZ9zbC8DSHfOQeKjH3VAlLBUTuIeAY9rouMJHm+i - e1STdNTSrBJA7twavnKh72RXBKQOCJEZIodHc2vAo+/CleEEjxcYPH5BPKpFPWpoVADI - hrqPVWXPWEBuJA6SAeSAvrh5gPhlKcCjuxQey6o+1TX85LcIUEMSYZMqi4AsIEuJg8xK - ZwHpgoAUvxLpCIV4nEzxuBPxqDKVaK4hTo+/YRUrA8gHN/PPHN0Tv3FNIADSmcxBIiDF - L0qKxwF07pHicWP8nmNnwD0+K6v6KIVH3EFHc+JqT0+cIGH7ue+kxFr6uIgCckv4igW+ - k13sR2CJVfxqlMw9gnt0ATyuCN+yMz2LuMfSt9XoHtujC229h9OjPCBXB86Z5u5sZwkb - mKODFLkmeTw6u3vPCVwDeDwKeHyAeNSWrtrdLydIASCvEgfJA9IYVrH2xPsgRSxJcI89 - e/cfaGw+guBxAYfHIhaPsMEce58VXq22WyeaeiOnRwrIWlJifXCDcZAsIIcjIEUsRTo0 - Bo9GppZ2zu7T5gSuRjxqSj1q6IcTJAvICnCQV89npScTQM6gDhIBKW5ByuMxOT3r/FXE - oxrUov4mOT3KAHJ3/AYCSDdnOwSkuOVI91/tO8DIdLidsxuPR9ieHIqrtcK5R7xcVb+c - Ot4DJ0gJIEsAkJnpyZt5QBqggxSvJhk8GjDucQZxjwweS0orSHEV3WPHJaLRFjg9CgF5 - 6fQRaUD2wUU6YlUk5x45PG6I3330dD7iUaMiUmVnnCClAXkAALl8PnWQZsYG/bDEKlI9 - SuNx/vLwzckHMsE9Ih5VqRFNtsXpkQPkGyixEkDGbQgJnO3l5kQdJAJSrHqEGzv68O4x - ZEPc7iOnLwEe36B71KSKVNgXFWRT0x8KyM/VFS9Liq6czwRArhMAshfOQYpRkRSP/QyM - zcjc4wwOj1eKSl6ie1ShRDTalAwg3yEgxag8xWMi7pHBo5Ob1+xAAR7fYXFVoypSYWfy - gLxz5VzmgSQOkFbEQSIgFStCq0cJHnsJ8LiOuMdzV+4QPH5mi6tN9OtVYbpgU2qOgACQ - PxpqPzKAzD6SGhfFOEhbMgeJDlKrylPcuSweoyTukeDxB3/fI849qllDKm1eDpDFBJD7 - k2LAQfrAIh0rs8EISMWK0OpRCR6twD36zF++bnMS4lGlytBOY9KArKGAzMs+nLo9KiRg - ttcEJ9thpkb6CEitak9R5xI82jpNIO4xKi71SDYtrr6rQTxqR0sq6ZUF5G8osTbWf/5Q - 8VICyGXzfDzGjUZAKpKDto+xeBxsZjXaxYPgMSZpP3GPxS8rPqB7VIkwtNSIEJDfaoWA - DA7w8ySAJBuY4yIdbStQun+KR30j02EUjwEhUdtTD2fnkblHwCNsMCd5JDm6Ry3pqt3d - ygCynAXkjpi1CEhpEYjnLwEex3n4zFvG47Ec8NgIK1d/N2Fxtd2S0OobZQH5+un9G9RB - rqeAdGQAqYfPYhWPHOmNHX30DYcQPHr6BQQjHrUqIdV2rgCQl89m7kdAikiA0kORxePa - mB2se0Q8qlYb2mhNASAL805BiRUBKS0D0fwF7lGPwaMjxeN6xj3ef/oa3aM2FKTiPmUB - +aL4NgByHwAyiCmxDsU5SNFoEQaiEI9nL98pfoF4VLE0tNKcFCC/1lSCgwRAHiKAXOzn - OR4dpJjESPSoAI+n8gopHr9icVUrGlJppwoBmUEB6e8zCeYgEZAikiSHx6FWo0lxNQjc - 476Ms5dvIx5VKgotNqYIkLkAyFgA5Kyp4x1t6BwklljFIUoJHm0cx3v6LQ5eH5t66FQu - wWNlDeJRizJSXdcSQP6ii3TKXzwCB5mxLzEmLAgAOXYUAlIcUiSjEOJxko9/UBjiUXVC - EElLSgEZiYAUjxKZkQjxOHUW4lEkElLtMKQA+ek9AWRBjjwge3QXW3Z2ufHweBw1lsFj - InWPj9ji6i9cmqNaaWilNXlA3isEB7krlgOkBVnFig5S+/Ln8GgB7pHgMTJ2F7pHrWhG - rZ3ygPzZWM8B8nha4qawpf7TeQeJgNS2Irv3II8FGDzUSoLHtIycgtuAx/ef6ht/Ih7V - KhONNc4B8t9/fv349rW68vWTe9dzTx7ctS1y1SIosTrYsIDs3k3bCdm1+1eAx4Mncwvv - PcHiqsa0opGOGED++f3vr5+NdRSQtwpyCCBDOUAOIg8KQEBq998DIR6n+y8N25SYdjyn - 4JYAj+yOVhpJGuxEbRGQBeQrAORFAsgIDpAmhvq99XD7Oa3qsVt3unLVxMLGAdzjolWR - 23YdPHnxOsFjNZl7xA3m1CYQTTfMARI2MKeAfP6IAjKBAnIimYMcZNAXAalVOf7F4HEQ - dY+Ax9BNCQwen4N7rKPuEfGoaeGoqT8lgEwhgJw51RUcpIlhfwSkVvUIkx16vfUNCR5d - p85ctCqCw+MrxKOaZKG9ZuUA+fBWPjhIFpBjRlmZIiC1qsa/KB77GlA8TlSER8ljOrSX - RdizqiIgA8i3rINkADnF1cHawgQ2MEcHqT1NUjz2H2hiYe3gOoXiMYVxj4hHVYlATO0o - BOSxvQnRoUv8vSeOGWmJgNSeFknPxD0CHk0tR46heIxO2Hs8J//WQ849Ih7FJKcOj0UA - yO8wBwmAvHv94on0lK0RKxfOREBqV4vQuwweV0ZsS0k/QYqrr95icbXD2S/CBpQAMj56 - zZK5QkDimgCtaFOIR++5S0IBj8cQjyLUkaqGJARk/RcA5OO71y7wgLS3NkcHqRUl0k55 - PNqDe1y4MmIrweO1u48JHuu/49yjqmQgnnakAVlV9vzhzfycY3sZQLpzDhIf/agVUcJS - OYl7BDyuiY4neLyJ7lE8+lH1SJQAcufW8JULfSe7IiC1IkSmUw6P5taAR9+FK8O37kw/ - cYHB4xfEo6qlII72BIBsqPtYVfaMBeRG4iAZQA7oi5sHaEOWAjy6S+GxrOpTXcNPfosA - cWQSjkIVEZAFZClxkFnpLCBdEJDaUCLtU4jHyYhHVSS7DrTB6fE3rGJlAPngZv6Zo3vi - N64JBEA6kzlIBKQ2REnxOIDOPVI8bozfc+wMuMdnZVUfpfCIO+jogM5aPUROkLD93HdS - Yi19XEQBuSV8xQJf2J91BJZYtaFGydwjuEcXwOOK8C0707OIeyx9W43usdXprXMncnqU - B+TqwDnT3J3tLGEDc3SQGtckj0dnd+85gasBj0cBjw8QjzonsbYNmBOkAJBXiYPkAWkM - q1h74n2QGpUkuMeevfsPNDYfQfC4gMNjEYtH2GCOvc8Kr1bblu6iP5vTIwVkLSmxPrjB - OEgWkMMRkBqVIu2MwaORqaWds/s0xKPoVaTCAXKCZAFZAQ7y6vms9GQCyBnUQRobICA1 - K0mFeDx/FfGowrwXa1OcHmUAuTt+AwGkm7MdAlKzYoTeODwOt3N24/EI25NDcbVWOPeI - l6tilVX7x8UJUgLIEgBkZnryZgSkxoXIdMjg0YBxjzOIe0xOzwI8lpRWkOIqusf2J7sO - vJPToxCQl04fkQZkH1ykozlxyuJxQ/zuo6fzEY86ICZVDJETpDQgDwAgl8+nDtLM2KAf - llg1pkdpPM5fEb45+UAm4lEVqa4TbXB65AD5BkqsBJBxG0ICZ3u5OVEHiYDUnB7hxo4+ - A4xMOfe4IW73kdOXAI9v0D3qhKA6OkgqyKamPxSQn6srXpYUXTmfCYBcJwBkL5yD1Iwi - KR77GRibkbnHGfOXS/D4Et1jRzNdN94vAOSPhtqP7xCQmlGe4l6Ie2Tw6OTmNTswhMfj - Oyyu6oagOjpKeUDeuXIu80ASB0gr4iARkIr1o+KjBI+wg44Ej+uIezx35U4J4PEzW1xt - ol9YR791fL9YI6AQkNlHUuOiGAdpS+Yg0UGqWHmKm5PFY5TEPRI8/uDve8S5R7HKqePj - kgNkMQHk/qQYcJA+Hi72VmaDEZCK9aPioxI8WoF79Jm/fN3mJMRjxxNcx1qQBmQNdZB5 - 2YdTt0eFBMz2muBkO8zUSB8BqWLtKWpOgkdbpwnEPUbFpR7JpsXVdzWIRx2TVfuHywLy - N5RYG+s/f6h4KQHksnk+HuNGIyAViUf1x1g8DjazGu3iQfAYk7SfuMfilxUf0D22P791 - 7Z1CQH6rFQIyOMDPkwCSbGCOi3RUr0DpFike9Y1Mh1E8BoREbU89nJ1H5h4Bj7DBnOSR - 5OgedU1ibRuvDCDLJYBci4CUlow6/xLgcZyHz7xlPB7LAY+NsHL1dxMWV9uW2bp5tiwg - Xz+9f4M6yPUUkI4MIPXwWazqlCO9saOPvuEQgkdPv4BgxKNuqkkFo1YAyMtnM/fviEFA - qlWCwsZl8bg2ZgfrHhGPKkhxnWpCASAL805BiRUBKZSMWn8H96jH4NGR4nE94x7vP32N - 7lGnxKSKwcoC8kXxbQDkPgBkEFNiHYpzkGpVI3moHFmaQ4qr1D1SPJ69fKf4BeJRFRmu - W21IAfJrTSU4yMLcU4dSY9cHL/bzHI8OUr1ihNYV4fFUXiHF41csruqWnDo+WoWAzKCA - 9PeZBHOQCEi1SpLD41AGj0GAx30ZZy/fRjx2PLd1sYXmADlr6nhHGzoHiSVWdYlSgkcb - x/GefouD18emHjqVS/BYWYN41EVFdXDMEkD+oot0yl88AgeZsS8xJiwIADl2FAJSXVIk - 7QrxOMnHPygM8djBfNb1tysB5K7YyODFCEh1apHqkSuuAh6nzkI86rqaVDB+KUB+ek8A - WZCTkSYLyB7d1Z2bXbB9Ho+jxjJ4TKTu8RFbXP2FS3NUkOG61YQ8IO8V5p48yAPSgqxi - RQepjn8uOPdoweIxMnYXukfdko/qR8sD8mdjPQfI42mJm8KW+k/nHSQCUvWK7N6Dzj0O - tZLgMS0jp+A24PH9p/rGn4hH1We7+FvkAPnvP79+fPtaXfn6yb3rBJDbIlctAgfpYMMC - sns31Sdk125RAR4PnswtvPcEi6vil436RsgA8s/vf3/9bKwDQD5/dKsghwAylAPkIPKg - AASkqv/1EOJxuv/SsE2JacdzCm4J8MjuaKW+7x5bFl8EZAH5CgB5UQqQJob6vfVw+zkV - 67Fbd7py1cTCxgGKq4tWRW7bdfDkxesEj9Vk7hE3mBOfVjQyIg6QsIG5EJAJFJATyRzk - IIO+CEgVy/EvBo+DqHsEPIZuSmDw+BzcYx11j4hHjeS/2DpRAsiUbRGrFs2c6goO0sSw - PwJSxXqEyQ693vqGBI+uBI8RHB5fIR7FphANj0cOkA9v5YODZAE5ZpSVKQJSxWr8i+Kx - rwHF40RFeJQ8pkPDyYDdaT0CMoB8yzpIBpBTXB2sLUxgA3N0kKrUJMVj/4EmFtYOrlNm - EjymMO4R8ah1PWh9AAoBeWxvQnToEn/viWNGWiIgValF0hZxj4BHU8uRYygeoxP2Hs/J - v/WQc4+IR62rQnsDEADyO8xBAiDvXr94Ij1la8TKhTMRkKrWIrSnAI/pJ0hx9dVbLK5q - Twhi6VkJIOOj1yyZKwQkrglQkTaFePT2XxIKeDyGeBSLHLQ+DiEg678AIB/fvXaBADKc - AtLe2hwdpIqUSJvh8WgP7nHhyoitKQSPdxk8fse5R60rQssDEACyoe5TVdnzhzfzc47t - ZQDpzjlIfPSjikQJS+Uk7tF77pI10fGIRy0rQFzdKwHkTgJI3ymuCEgVCZFphsOjuTXg - 0XfhynCCxwvX7j4G9/ilHvEoLm1oZTRSgPxYVfaMBeRG4iAZQA7oi5sHqEaWAjy683i8 - +fB5WdWnuoaf/BYBWkkF7FQEEZAFZClxkFnpDCAnuyAgVaNE2ooQj5MpHnciHkWgATEN - gdPjb1jF2lBHAPngZv6Zo3viN64JBEA6kzlIBKRqREnxOIDOPVI8bozfc+xM/s2Hz8qq - PkrhEXfQEZNENDsWTpBwH+R3UmLlALklfMUCXwDkCCyxqkaNkrlHcI8ugMcV4Vt2pmcR - 91iK7lGzOS/m3jg9ygNydeCcae7OdpawgTk6SBVoksejs7v3nMA1gMejgMcHiEcx60Pj - Y+MECfuzsoAsukocJA9IY1jF2hPvg+ygJME99uzdf6Cx+QiCxwUcHotYPMIGc+x9Vni1 - qnENiKlDTo8UkLXUQd5gHCQLyOEIyA5Kkb6dwaORqaWds/u0OYGrEY9iUoGIxsIJkgVk - Renjoqvns9KTCSBnUAeJgOy4IOXxmAzu8SriUURKEMdQOD3KAHJ3/AYCSDdnOwRkx+VI - 91/tO8DIdLidsxuPR9ieHIqrtcK5R7xcFYcstDcKTpASQJYAIDPTkzfzgDRAB9kxTTJ4 - NGDc4wziHgGP568WlZRWkKU56B61l/6i65nToxCQl04fkQZkH1yk0xFFcu6Rw+OG+N1H - T+cjHkUnBjEMiBOkNCAPACCXz6cO0szYoB+WWDugR2k8zl8Rvjn5QCbiUQzJL8IxcHrk - APnm2YMbBJBxG0ICZ3u5OVEHiYDsiB7hxo4+Ave4IW73kdOXAI9v0D2KUBDaHhIVZFPT - HwrIz9UVL0uKrpzPBECuEwCyF85BtleRFI/9DIzNyNzjjPnLJXh8ie5R27kvxv5lAPkO - Adle5Sl+H3GPDB6d3LxmB4bweHyHxVUxCkLbY5IH5J0r5zIPJHGAtCIOEgGpWG0tHiV4 - 7CXA4zriHs9duVMCePzMFleb6Feg7TzA/sURAQEgfzTUfmQAmX0kNS6KcZC2ZA4SHWSL - ylN8giweoyTukeDxB3/fI849ikMO2h+FHCCLCSD3J8WAg/TxcLG3MhuMgFSsthaPSvBo - Be7RZ/7ydZuTEI/aT3lRj0AakDUUkHnZh1O3R4UEzPaa4GQ7zNRIHwHZovYUnSDBo63T - BOIeo+JSj2TT4uq7GsSjqGWhvcGxgPwNJdbG+s8fKl5KALlsno/HuNEISEVSa80xFo+D - zaxGu3gQPMYk7SfusfhlxQd0j9rLeHH3LATkt1ohIIMD/DwJIMkG5rhIpzUKlD6H4lHf - yHQYxWNASNT21MPZeWTuEfAIG8xJHkmO7lHcEtHs6GQAWS4B5FoEpLTA2vaXAI/jPHzm - LePxWA54bISVq7+bsLiq2VzXhd5kAfn66f0b1EGup4B0ZACph89ibZsc6Y0dffQNhxA8 - evoFBCMedUENIhijAkBePpu5f0cMArKNEhSeLovHtTE7WPeIeBRB0ot4CAoAWZh3Ckqs - CEihwNr4O7hHPQaPjhSP6xn3eP/pa3SPIhaDGIYmC8gXxbcBkPsAkEFMiXUozkG2UY3k - oXJkaQ4prlL3SPF49vKd4heIRzHkvJjHIAXIrzWV4CALc08dIoBc7Oc5Hh1kW8UI50vj - cXEwweOpvEKKx69YXBWzHLQ/NoWAzKCA9PeZBHOQCMg2SpLD41AGj0GAx30ZZy/fRjxq - P9vFPwJlgIwFQM6aOt7Rhs5BYom19aKU4NHGcbynH+AxNvXQqVyCx8oaxKP4FaHlEUoA - +Ysu0il/8QgcZMa+xJiwIADk2FEIyNZLkZwpxOMkH/+gMMSjljNct7pXAshdsZEIyLYp - kTlbiMepsxCPuqUGEYxWCpCf3hNAFuRkpMkCskf39mRnl3sPj8dRYxk8JlL3+Igtrv7C - pTkiyHkxD0EekPegxHqQB6QFWcWKDrJ1/7RweLQA90jwGBm7C92jmNNffGPjAfmzsZ4D - 5PG0xE1hS/2n8w4SAdkaRXbvQeceh1pJ8JiWkVNwG/D4/lN940/Eo/jyX2wj4gAJ28/9 - +Pa1uvL1k3vXc08e3LUtctUiKLE62LCA7N6tNQnZtc9RgMeDJ3ML7z3B4qrY0l6842EA - +ef3v79+NtZRQN4qyCGADOUAOYg8KAAB2fK/NUI8TvdfGrYpMe14TsEtAR7ZHa3Emw04 - Mm1HQBaQrwCQ/7+9c3+oaev6+ME5HLdEKqko5VYpROVSoVCEKNcuRBclhVRUlFshVC7J - raTcKUohSipKN1QKx3OO4/1H3jHnWmvvtXflnEN7t9daY/3wPJ7zPNaec6wxns/8jjnm - HFcIIIM5QOqP0Bo4ANvP/WM89ulLK1f1jc0tQT2u9A3Ztf/omSs3CR4byN4jNpjrbV8X - xO9zgIQG5hSQzx5RQMZSQDqQPciR2oMRkP8Yjr8weBxJ1SPgMWB7LIPHZ6AeW6l6RDwK - IiJ6d5DdAHIfAeQiR1tQkPojhiIg/zEeYbNjwECtEQSPto6LVvoGc3h8gXjsXQ8X2K93 - AmTx3VxQkCwgbSaZGiAg/zEaf6F4HKxN8ejQFR5l13QIzD1wuGq2gBIgX7EKkgHkXFtL - M2N9aGCOCvL7MUnxOHS4vrGZpe1cisd9jHpEPKrZnwX/c10C8uTB2PCA1R7zHWwmmiAg - vx+L5L8l6hHwaGAy0YbiMTz24Kms3LvFnHpEPAo+TtQ1AR4gP8IeJACy8OaV0yn7dgb7 - eC5CQP5zLML/ogs8ppwmydUXrzC5qi5HFsvvdAPImPBNq5fyAYk1Ad3GJh+P8z1WBwAe - TyIexRIgap4HH5Bt7wCQjwtvXJYD0sLMCBVkt5FI/ws5Hi1APXr6BO/cB3i8UUjx2PYR - 9x7V7NEC/zlFQNZVPSu+k5t18qASIPHqx26DEkrlZOpx/tLVm8JjCB7voHoUeGD00vC7 - AWTCziAfz4VzbRGQ3QYi819weDQyAzwu9PQJIni8fKPwMajHd4jHXvJqAf8sD5DtrU11 - VWUsILcRBWlPU6zDBmPzgO7CkodHewU8VtU1t7Z/lrcIELCL4NDVaAFlQFYQBZmRwgBy - znQEZHeRSP85H49zKB4TEI9q9F7x/RQXj1+hipUBZNGd3PMnDsRs2+QNgLQme5AIyO6C - kuJxGN17pHjcFnPg5HlQj2VVdU0KeMQOOuILHdXMiAtIOAf5kaRYKx4XUEDuCNqwYiEA - chymWLuLRtneI6jH6YDHDUE7ElIyiHqsQPWoGm8V/1u5eOwMyI3eS+bZW08wgQbmqCC7 - jEk5Hq3t5y/x3gh4PAF4LEI8ij9uVDZDLiChPysHyOtEQcoBqQdVrP3xHGSnkAT12H/g - 0OF6RuMIHldweCxg8QgN5thzVrhaVZn3iu/FXDxSQLaQFGvRbUZBsoAci4DsFIr0HzB4 - 1DEwmWBtPw/xKL7Q6J0ZcQHJArIGFOT1Sxkp8QSQrlRBIiC7Csgu8XjpOuKxd9xYNL/K - xaMSIJNiwggg7awnICC7Ckfaf3XwMB2DsROs7eR4hPbkkFxt4e894nJVNLGilolwASkD - ZCkAMj0lPlIOSG1UkMoxyeBRm1GPrkQ9xqdkAB5LK2pIaQ6qR7X4rhh/hItHPiCvZqYq - AnIQFukoRiSnHjk8hsUkncjMRTyKMULUPCcuIBUBmQyAXL+cKkhDPQSkYjTSDjoDh3J4 - XL4hKDI+OR3xqGbPFefPcfHIAfIlpFgJIKPD/L3dne2mUAWJgFSISILHQTz1GBadlJp5 - FfEozghR86xoQH779jcF5NuGmvLSgvxL6QDIQDkg4W5k3IOUhSRVj0O09QzJ3qPr8vUy - PJajelSz84rw55QAWYuAlAVeN3+Q43GKnbO7t78Mjy9rMbkqwghR85Q6A/J+/sX05DgO - kKagIBGQ8tgkePydh8dAoh4v5t8vBTy+ZZOr36hR1fwh8edEYQEeID+1tzQxgDyXmhgd - yijI8WQPEhWkLCCV8RjKqUeKx0/yc4+49yiK+FD7JDoBsoQA8khcBChIFyjSMTXURUDK - w5HDoymoR5fl6wMj4xCPavdZMf+gIiAbKSBzzh0ngPRyd545ZfwYBKQsHGlpDk2ujp8y - k6jH0OjE1HMkufqytrGlHfEo5khR09xYQH6FFGtH29v6mnIZINctc5k9bTICkheODB51 - DQGPswkeI+KOEPVYUl5Tj+pRTQ4r8p/hA/JDixyQu0P9vNycCCBH6WihgqRBSdWjlo7B - GIpHL//Q3YnHz+UgHkUeIuqdnhIgq2WA3IKAlKOR/IlNrgIeJ0+b7bJsnRyP1YDHDqhc - /foNk6vq9V7x/ZoyICvLHt4mCnL3VhkgR2gNGoB3sTLqUWvEKIJHJzcvPwU8Qv9VWccO - TK6KL0zUN6MuAJl3If3I3ggEpAIflfG4JWIvqx4Rj+rzVvH/UidAPn14K+esDJBWoCAR - kGS52o+2Jwc8WlE8bmXU48OnlZBcRTyKP1DUNUNlQD4vuQeAPAyAXMukWEfjHmRn9Ujx - eCEPkquIR3V5qjR+RwGQ7xtrKykgjxEFucrNaQYCki5bu8Lj2ZxbFI/vEY/SCBX1zLJL - QKZRQHq4zII9SASkLLk6mkmurgU8Hk67kHev5DniUT1eKp1fUQLkawLI7LPHEqMAkIsB - kOaoIOXq0dxqhpPbKr+tUYnHzmYTPL5uRDxKJ1bUMtNOgHwECjLt8J6IzWsBkFMnISC5 - 5CrB4ywXj7WbEY9q8Uxp/ki3gAwBQDoiIHnJVcCj42LEozTjRG2zlgHyC1SxNtdXP390 - 71pWZ0D266uwIyed/yDH46SpDB73UPX4iFWPX7A0R22+KoUf6gzIB0RB7o/iAGks7T1I - WXKVxWNI1H5Uj1IIjN6aoxyQnwGQbxhAnjq0Z/vmNR4L5ApSqoDs249cC6A72lSGx0Np - WdfuAR7fNLd1fEY89pbfivV3OUBC+7lPH943vK588uBm9pmjAEhfoiAtzVlA9u0jnUWq - fKYcHo3leDx6JvvWgyeYXBVrQPT2vBhA/v31ry+fO1opIO9eyyKADOAAOZJcFCBNQPLx - uMBjzebtew6dUsQj29Gqt78i/r5YLKAMyBcAyCsAyF0hvisZQOqP0Bo4QJJXP/bpSytX - 9Y3NLSG5utI3ZNd+wONNgscGsveIDebEEgUaNA8OkNDAnALy2SMKyFg+IAdLE5AMHkdS - 9Qh4DGDwePfRM1CPrVQ9Ih41yJPFMZRuALlvV7DvykWOtqAgpQpI2OwYMFBrBMGjLcFj - MMHjFcDjC8SjOHxfI2fRCZDFPEA62EwyNRipLUlAEjwO1qZ4dKB4jCXqUY5H2Tlkjfys - OCiBWkAJkK9YBckAcq6tpZmxPjQwl56CpHgcCng0s7Sdu4jgcR/iUaA+LqhhdwHI3KyT - B2PDA1Z7zHewmWgiTUCyeDQwmWjD4vHgqazcu8WcekQ8CsrLhTNYHiA/wh4kALLw5pXT - Kft2Bvt4LpIsIBk8DufjMeU0VY+vMLkqHOcW4ki7BeSm1Uv5gJRUTQAfj/M9VgeExx48 - iXgUonsLbsx8QLa9A0A+LrxxWQ5ICykqSDkeLUA9evoE79xH8Fj45AXB40fcexSclwto - wIqArKt6VnyHKMiYcAVASurqxz5McpWqx/lLV28Kj0E8CsijhT3UbgCZsDPIx3PhXFsL - MyOppVg5PBqZAR4XevoEETxevlH4GPD4rg3xKGx/1/jR8wDZ3tpUV1XGAnIbAaQ9TbEO - G/y7hAAJleRk75Hg0V6OxzvFz6rqmlvbP8vvQNb4T4sDFKAFlAFZwShIBpDQfk5qgOTj - cQ7FYwLiUYB+LdQhc/H4FapYGUAW3ck9f+JAjEQBSfE4TI7HbTEHILl6p7isqq5JAY/Y - IkCoLq/Z4+YCEs5BfiQpVgrIjJSEHUEbViyUHCB5eJwOeNwQtDMhJYOoxwpUj5rtx2IZ - HRePnQG50XvJPHtrUqQjHQUpx6O1/fwl3psAjyfO594pQjyKxd81fh5cQEJ/VhaQBdcv - 8wA5zkgPqlj7S+IcJOCx/8Chw/WMxkF78oUrNgTtoHgsYPEIDebYc1a4WtV4vxbqALl4 - pIBsISnWotuMgmQAOcEEGphLJMXK4FHHwGSCtf28Jd4bEY9C9WoBj5sLSBaQNRWPC65f - ykiJ5xSkdADZNR6vIx4F7N3CGzoXj50AGUYAaWc9YaxUAMnhcewEazs5HqE9OSRXW/h7 - j7hcFZ6bC2fEXEDKAFkKgExnAOkKKVYApLYUFCSDR21GPboS9RifknGJ4LGGlOagehSO - Swt6pFw8KgAyMzUphg/IQeIv0lHGY1hM0onMXMSjoJ1biIPnAlIRkMnxkUHrl1NAGkoB - kJ3wGBmfnA54LEU8CtGpBTxmLh45QL6EFOtVAGR0mL/3EmdWQYoekASPg4bpGHDqEfCY - mnkV8Shgxxbq0GlAfvv2NwfI8tKC/EvpioAcIvI9SIrHIdp6hmTv0XX5+iDEo1DdWfDj - VgJkLR+Q7s52U2iKVeSAlONxip2zu7d/WDSLx5eYXBW8gwttAgqAfNtQU156P/9ienJc - ZCCjIE1BQULzABEX6RA8QgcdGR4DCR4v5heUltc0vGWTq9+omYT2bXG8wrMAD5Cf2lua - OEAmRof6exNAjid7kKIGZPd4rIW9x0/yc4+49yg89xbeiDsBsoQBZAQA0gX2IMUOSBke - TUE9uixfHxgZR/B4H/EoPF8Ww4gVAdnIAPLccQJIL3fnmVPGjxE3IGV4HD9lJlGPodGJ - qedIcvUl4lEM/i24ObCA/EpTrG/ra8opII/ERQSuW+Yye9pkU0NdEStIFo+6hoDH2QSP - EXFHCB5LymvqUT0KzplFMGA+ID+0MIDMAUDuDvVjATlKR0u0CpLiUUvHYAzFo5d/6O7E - 4+dyKB4bUT2KwL2FNwUeIDva3tZXywC5RfyAlONx8rTZLsvWKeKxAypXv37D5KrwfFrI - I+4MyIe3KSC3+nm5OREFOWqEWAHJ4HHEKIJHJzcvPwU8Qv9VWccOTK4K2cWFNfYuAJl3 - Mf3I3gjRA1IZj1si9rLqsRrUI+JRWH4sltEqA7LyqQIgrRhADhDhXayAxwGDtAgerSge - tzLq8eHTytrGFsSjWBxcaPNQBuTzknt5F/iAHC3OFGuXeLyQB8lVxKPQfFhM41UA5PvG - WgDkrZyzkGLd6rcKFKRoAdkVHs/m3EI8ism5hTiXLgGZdhgU5FoPugcpSkByeBxtSpOr - a0E9Hk6/kHev5DniUYheLJ4xKwHyNQFk9tljiVEAyMVOM6zMaYpVbAqSh8cZTm6r/LZG - JR47m03w+LrxPapH8bi38GbSCZCPQEESQG4GQM6aNslUhIDk43GWi8fazYDHNMSj8JxX - hCPuFpAhAEhHcQJShkdzqxmOixGPInRr4U5JBsgvf3S0NddXPwdAZqUd3sMAcqockL+I - 5ZHjcdJUBo97KB4fserxC5bmCNedBT/ybgC5P4oDpDEp0hGTglTGY0jUflSPgvdj0UxA - DsjPAMg3BJDXstIO7dkOCnLBLBkg+/UVCx/7QnvyIdq6o01leDyUlnXtHuDxTTOU5iAe - RePagpyIDJD/+/Lpw/vG15VPHtzMPnO0EyD79hFHQHJ4NGbVI+Dx6JnsWw8wuSpI9xXf - oBlA/v31ry+fO1opIO9eyzpFALmGBeRIcg5SLIDk43GBx5rN2/ccOiXH42fEo/g8XFgz - 4gAJ/VkBkA0UkFcAkLtCfFdCitXS3FifKEiR3GzVpy9TuWpsbgnJ1ZW+IbsIHm8+eFL5 - uoHsPWKDOWF5rwhHywESGphTQD57RAEZuz1AhIBk8DiSqkfAYwCDx7tUPbZ2EDyyDR9F - +KFxSoKwgDIgX4CCBEDu2xXsu3KRoy0DyIHiACRsdgwYqDVCXwGPVwCPLxCPgnBWKQyy - EyCLeYB0sJlkajBSe7A4FCTB42BtikcHisdYoh7vPnoGyVWCR9k5ZCl8d5yjZlrgu4Cc - a2tpZqwPDczFAEiKx6EUj7aOi1b6Bu/ad/QM4lEz3VK6o+oCkLlZJw/GhoOCnO9gM9FE - LIBk8WhgOslGjsfcu8WIR+k6vwbOXAmQr6iCPJ2yb2ewz8pFIgIkg8fh+sZmlrZzFfD4 - CpOrGuiXkh1S94BcvZQPSIHXBHB4NJlo4zDfY3VAeOzBk1mIR8m6vcZOnAfIj23vG169 - eFx44woDSE8ApIU4FKQiHj19gnfuSzl95WbhkxcEjx9x71Fj/VNyA1MEZF31s+I7REHG - hG/iA1LgN1v1YZKrBhSPS1dvCo9BPErO04UxYQVAvmMAefl0SsLOIB/PhQSQRsJPsXJ4 - NDKzAPXI4vHyjcLHgMd3bYhHYXiqREbJA2R7a1NdVRkfkPZcilXQgIRKcrL3qITHO8XP - qupw71Eibi6YaSoDsgIUpAyQ0H5O+IBUwONCT5+gnQkppxGPgvFQaQ2Ui8evUMUqA+T5 - EwdithEFyQBy2ODfBQxIisdhFI/280E9bqPq8U5xWVVdU2s7luZIy981frZcQMIxj49t - oCApIDNSEnYEbfBcKAJA8vA4fQ6LxwyCxwpUjxrvnBIcIBePckAW3cmlgNzovWSevTUp - 0hEyIOV4tAY8egMeD5w4n3unqBMesYOOBL1fA6fMBSTtz0oBWXD9MgPIFQSQ44z0oIq1 - v0DPQcrwOA7aky9csSFoR0IK4lED3RCHxFqAi0ceIG/zATnBBBqYC1ZByvA4wdp+3hLv - jYhHdHwNtwAXkHxAXspIiQcFKXhAAh77Dxw6XM9IAY/XC1j1CP1X2WPIuFrVcC+VzvC4 - eKSAbCF7kEU8QNpZTxgrXEAyeNQxGKuAR2hPDsnVFn5yFeNROg6v6TPlApIFZE1FacF1 - DpCujILUFqaCVMCjK1GP8SkZlwgea0hpDuJR011TkuPj4lEBkJknkmLCSIpVyIDk4dGO - qMewmCRIriIeJenmwpk0F5AKgExPjo8MWr9cyIBk8KjNqEcWj+mAx1LEo3CcU4Ij5eKR - A+RLUJBXM1OTosP85YAcJLwinS7wmJqJeJSghwtsylxAcoAsLy3Iv8QHpKGe9hDB7UFy - eDQkyVXX5euDIuOTEY8Cc01JDpeLRxaQtXxAujvbTaEpVsEBkuBx0DCaXLVzdvf2D4tO - Ss28CurxJSZXJenmwpk0Dchv3/6mgHzbUFNeej//YnpyXGQgqyAJIH8XVpEOxeMQbT1F - POYXlJbXNLxlk6vf6MSF851wpNKwAA+Qn9pbmuSADPX3JoAcT/YgBQZIOR6nKOGxFvce - peHWwp1ld4CMAEC6wB6kqeAASfAIDeb0DE0Z9RgYGZecfjH/PuJRuF4qnZErArKRAeS5 - 1MRoCsiZAgSkDI/jGTyGRiey6pHg8ZP8SnIszZGOmwtnpoqArK8pLyEK8kgcBeRsAkhd - QSlIBTy6LF8fGMHgsQTVo3CcUsIj7QqQOeeOJ+4O9fdydwZAjjHQ0RKQguThcaazu5c/ - 4PH4OZpcrW1EPErY0YUydRaQXyHF2tH2tr5aDsh1y1xmT5ssLECyeNQ1NJ08bbbLsnWA - xyNEPQIe65nk6tdvmFwVim9KcZx8QH5oYRQkA0g/LzcnAshR0J9VKEU6FI9aOqPGjJ9C - 8OgXuhvwmEP2HgGP0H9V1tAK1aMUnV0Ic+4GkHsjtggPkMp43CLDYzXgsQMOdiAeheCT - Uh6jMiArnz68TQG5lQLSigHkAEFcNcfgcQTFo5Obl99WBo8PyyoRj1L2cUHNXRmQz0vu - 511IPyJAQHbG415Qj3mgHhGPgnJJSQ9WAZDvG2sBkLdyzkKKVXCABDwOGKRF8Gg1k4/H - p4hHSXu4wCbfGZD38i6kHQZArmVSrKOFsQfZBR4Pp1/Iu1fyHPEoMJeU9HCVAPmaADL7 - 7LHEqK1+q9ycZliZ0xSr5itIRTyuIurx2NmcWw8JHt9jclXSPi6oyXcLyM1rPVxmwR6k - IADJ4XE03Xv0WLslYu/hNMSjoDwRB0ss8D1ALnYUCiBleDS3muHkBniMAjxmEzy+Rjyi - owvJAjJAfmGKdJ4/ogpyTwQF5NRJQgAkH4+zXDzWbmbx+AjVo5BcEccKFugGkPujQvxW - CQWQfDw6Ll7lF4J4RN8WqgXkgPzc0db8phoAeS0r7ZAyIPv1/UVjH+bco+5o00lTGTzu - OZyWde0ewWMzlOZ8wdIcoTqnBMfdCZBPHtzKPnNUDkhjUsWqySlWDo/GoB4ZPO5H9ShB - TxbJlBlA/v31ry88QJ46tGf75jUeC2bJFKTmArJvP3ItgByP2/ccYvH4BvD4GfEoEkeV - yDQ4QEJ/1k8f3je8rnzy4CYB5K4Q35WgIC3NWUD27aOZC9Y+fZnSHBaPviFR+4+eyb75 - 4AmbXMUOOhJxZLFMkw/IVlCQzx7dvZZFABnAAXIkuShAUwHJx+MCjzWbAY+nsq7dBfXI - 4ZHtaCWW74XzELcFlAH5AgB5hQAymADSFgCpP0Jr4AAN7c8Kmx2kclXf2NwS1ONK35Bd - gMcrFI8NpDQH8Shu7xXh7DhA/gkKkgfIWApIB6IgR2oP1lRAMngcSZOrgMeA7bEMHp8B - HltBPcrOIYvww+GURGmBbgC5jwBy0VwGkEM1FJAEjwMZPNo6LlrpG8zh8cVrxKMovVUC - k+oEyOK7uVmnDrKAtJlkYqCxgCR4HKxN8eiAeJSAr0phikqAfMUoyBQZIM2M9YdrJiAp - HocO1zc2s7SdS/G4j1GPiEcpOK5Y59glIE8ejA0PWO0x38FmosYCksWjgclEG4rH8NiD - p7Jy7xajehSrq0piXjxAfoQ9SABk4c0rp1P27Qz28SQKUlMB2QUeU06T5OqLV6geJeG5 - Ip1kN4CMCd+0eikfkBpWE8DH4/ylqwMAjycRjyL1USlNiw/ItncAyMeFNy7LAWlhZqSJ - ClKORwtQj54+wTv3AR5vFD4meGz7iHuPUnJhcc2VB8j21ua6qmfFd3KzTh5kAGnPKUgN - u/oRKslJcpWqR8DjpvAYgsc7qB7F5ZtSnE03gEzYGeTjuXCOrUYCksOjkRngcaGnTxDB - 42UGj+8Qj1J0Y9HMmYtH2sC8tamuqowF5DaiIBlADhusWc0DeHi0V8BjVV1zazuW5ojG - OaU4ES4g4ZjHR6IgK4iCzEhhATldAwHJx+MciscExKMUXVeUc+biUQ7Ioju5508ciNm2 - yRsAaU32IDULkBSPw6h6pHjcFnPg5HlQj2VVdU0KeMQOOqL0WJFPigtIaD/HArKAAnJH - 0IYVC6GB+TgNS7Hy8Dgd8LghaEdCSgZRjxWvGlA9itxZJTA9Lh47A3Kj95J59tYTNAyQ - cjxa289f4r0R8HgC8FiEeJSAs0philxA8gB5nShIOSD1oIq1v4acgwQ89h84dLie0TgL - wOMKDo8FLB6hwRx7DBlXq1JwXhHOkYtHCsgWkmItus0oSBaQYw10NEdBMnjUMTCZYG0/ - D/EoQn+U/JS4gGQBWVPxuOD6pYyUeAJIV6ogNQeQXeLx0nXEo+S9WDwG4OJRCZBJMWEE - kHbWEzQIkBwex06wtpPjEdqTQ3K1hb/3iMtV8Tio1GbCBaQMkKUAyPSU+Eg5ILU1Q0Ey - eNRm1KMrUY/xKRmAx9KKGpJcRfUoNdcV5Xy5eFQAZGaqBgJSGY9hMUknMnMRj6J0S+lO - igtIRUAmAyDXL6cK0lBPIwDZCY+R8cnpiEfpOq5IZ87FIwfIl5BivQqAjA7z93Z3ZhXk - oN6vYiV4HDRMx4BTj4DH1MyriEeRuqV0p0UD8tu3vykg3zbUlJcW5F9KVwTkkF7fg6R4 - HKKtZ0j2Hl2Xrw/i8FiO6lG6vivGmSsBslYJkFNoirXXASnH4xQ7Z3dv/7BoFo8vazG5 - Kka3lO6cOgPyfv7F9OS4yEBGQZqCgoTmAb1apEPwCB10ZHgMJHi8mF9QCnh8yyZXv9GJ - SPc74szFYQEeID+1tzQxgDyXmhgdShXklPFkD7KXAfl9PH6SX0mOe4/icEopz6ITIEsY - QEYAIF2gSKf3ASnDoymoR5fl6wMj4wge7yMepey3Yp27IiAbWUAeJ4D0cneeqQGAlOFx - PKMeQ6MTU8+R5OrL2saWdsSjWD1TovNiAfmVSbHW15RTQB6Jiwhct8xl9rTJpoa6vaog - O+ExIu4IwWNJeU09qkeJOq2Ip80H5IcWBpA5544n7g71YwA5ZpSOVi8qSIpHLR2DMeOn - zHR29/IP3Z14/FwO4lHELintqfEA2dH2tr5aBsgtmgBIFo+6hqaTp812WbYuUAGPHVC5 - +vUbJlel7cHimr0yICvLHt7mAOnmBApyzKgRvQdIBo8jRhE8Orl5+SngEfqvyvo9YnJV - XG4p3dl0Aci8i+lH9kZoACCV8bglYi+rHqtBPSIepeu14p15J0A+ZQG51c8LAGnFAHJA - r1xWDngk7ckBj1YUj1sZ9fjwaSUkVxGP4nVKKc9MGZDPS+7lXUg/rAGA7BKPF/IguYp4 - lLLHinvuCoB831hb+fThrZyzxxJ3b/Vb1buA7AqPZ3NuIR7F7ZBSn12XgEwjgFzL7EGO - 7p09SA6Po5nk6lpQj4fTL+TdK3mOeJS6z4p5/kqAfE0AmQ2AjKKAnGFlTlOs6leQinhc - 5Qfq8RiDx9eN71E9itklpT23bgG5ea2Hyywo0ukVQPLxOMvFg+IxDfEobVeVxOy/B8jF - jr0FSBkeza1mOC0GPEYBHrOJekQ8SsItpTtJGSC//NHR1lxf/fwRpFjTDu+JoICcOqk3 - ACnH46RpBI+bI/YcJnh8xKrHL1iaI12HFfnMuwHk/qgQv1UUkMakSEe9CpKPR0fAYwji - UeReiNOTWUAOyM8AyDcEkNey0g4pA7Jf31/U9jDXAuiONp00VYbHrGsUj81QmoN4lH08 - /IPoLNAJkE8e3Mw+c7QXAcnh0RjUI4PH/ageRed3OKFuLMAA8u+vf33hAHn3WtapQ3u2 - b17jsWCWTEGqD5B9+5Fbcxg8LgD1uH3PoTQGj28Aj58Rj918SPzHorAAB0hoYP7pw/uG - 15UsIHeF+K4EBWlpzirIvn3Us2Dt05epXGXx6BsStf/omeybD55Uvm4ge4/YYE4UboeT - 6M4CHCD/BEC2goJ89ogCMnZ7AAfIkeSiAHUBksHjSKoeF3isIXg8lXXtLiRX3zS3Ujyy - DR+7mw/+c7SAkC2gDMgXAMgroCB3BRNA2gIg9UdoDRygpqsfYbODHOzQNza3BPW40jdk - F+DxCuJRyB6GY/9PFvguIB2IghypPVhdgFTCY8D2WAaPz1g8ys4h/6cp4v8YLSAYC3QD - yH0EkIvmMoAcqiZAEjwOZPBo67hopW/wrn0MHl+gehSMQ+FAf84CnQBZfDc369TB2HCi - IB1sJpkYqA2QBI+DtUcawN6jA6hHDo/FiMef+8T4twVkASVAvqIK8nSKDJBmxvrD1QNI - isehw/WNzSxt5yIeBeRDONQetECXgDxJALnaY76DzUS1AZLDo8lEG4f5gMfw2IOnsnLv - Ih578GPjqzTeAjxAfoQ9SABk4c0rAMidwT6eREGqC5BKePQB9ZhymiRXX7zCvUeN9yIc - YI9ZoBtAxoRvWr2UD0gV1wQo4HHpaoLHk4jHHvvK+CKhWIAPyLZ3AMjHhTcuywFpYWak - DgUpx6MFqEdPn+CdBI83Ch8TPLZ9xNIcobgTjvNnLcADZHtrc13Vs+I7uVknDzKAtOcU - pIqvfoRKcppcpepx6epN4TEEj3dQPf7s18W/LzQLdAPIhJ1BPp4L59qqBZAcHo3MAI8L - PX2CCB4vM3h8h3gUmkvheH/CAlw8foUq1vbWprqqMhaQ24iCZAA5bPDvKgUkD4/28/l4 - rKprbm3/LG8R8BPzxL+KFhCEBbiAhGMeH4mCrCAKMiOFAST0Z1W9guTjcQ7FYwLiURC+ - g4PseQtw8SgHZNGd3PMnDsRs2+QNgLQme5CqBSTF47CRBqAeKR63xRw4eR7UY1lVXZMC - HrGDTs9/fnyjplmAC0g5IAsoIHcEbVixEAA5TsUpVh4epwMeNwTtSEjJIOqx4lUDqkdN - 8xYcj6otwMVjZ0Bu9F4yz956gooBKcejtf38Jd6bAI8nAI9FiEdVf3l8v0ZagAtI2sCc - KsiC60RBygGpB1Ws/VV0DlKGx3EWgMcVHB4LWDxC/1X2GDKuVjXSe3BQPW0BLh4pIFtI - irXoNqMgZYDUUZ2CZPCoY2Aywdp+3hLvjYjHnv6++D6BWYALSBaQNRWPC65fykiJJ4B0 - pQpSdYAEPPYfOHS4npECHq8jHgXmQzjcnrMAF49KgEyKCSOAtLOeMNZAZYDk8DhWAY+3 - qXps4e894nK15z44vkmzLcAFpAyQpQDIdAVAaqtGQTJ41Gbw6ErUY3xKxiWCxxqSXEX1 - qNmOg6NTiQW4eFQAZGaqGgDJw6MdUY9hMUknMnMRjyr5zPhSoViAC0hFQCbHRwatX04V - pKGeSgDZCY+R8cnpgMdSxKNQXAfHqQILcPHIAfIlpFivAiCjw/y93Z1ZBTmo56tYu8Bj - auZVxKMKPjG+UkgWoAH57dvfFJBvG2rKSwvyL6UrAnJIj+9Bcng0JMlV1+Xrgzg8lqN6 - FJL34Fh72gJKgKxVAuQUmmLtcUASPA4apmMwdsIUO2d3b/+w6CQGjy/rmjC52tPfGN8n - IAt0BuT9/IvpyXGRgYyCNAUFCc0DerRIh+AROujocXgMpHjMLygFPL5lk6vf6MAEZEgc - KlqgByzAA+Sn9pYmOSBDqYKcMp7sQfYwILvHYy3g8ZP83CPuPfbAF8ZXCMoC3wOkCxTp - 9DwgZXg0ZdRjYGRccvrF/PuIR0E5Dg5WJRZQBGQjA8hzqYnRFJAzVQBIGR7HM+oxNDox - 9RxJrr6sbUQ8quQj40uFYwFFQNbXlJcQBXkkLgIUpMtsAkjdHlWQCnh0Wb4+MILBYwmq - R+E4DY5UZRbgA/JDCwPInHPHE3eH+nu5OwMgxxjoaPWgguThcaazu5c/4PH4uRzEo8o+ - ML5YWBZgAfkV9iA72t7WV8sBuW6Zy+xpk3sWkCwedQ1NJ0+f7bJsHeDxCFGPgMd6Jrn6 - 9RsmV4XlQTjanrRA94D083JzIoAcNaLnAEnxqKUzasz4KQSPfqG7eXiE9uSyfo+YXO3J - j4zvEo4FugHk3ogtPQ9IHh6nETxukeGxGvDYAQc7EI/C8RwcqSosoAzIyqcPb1MFuZUC - 0ooB5IAeuYuVweMIikcnNxkeH9LkKuJRFZ8X3yk0CygD8nnJ/bwL6UdUAMjOeNwL6jEP - 1CPiUWheg+NVlQW6AOStnLOQYu1xQAIeBwzSIni0mknwuJVRjw+fVsLeI+JRVR8Y3yss - C3QG5L28C2mHAZBrmRTr6J7Zg+wSjxfy7pU8RzwKy2NwtKq0gAIg3ze+BgV5K/vsscSo - rX6r3Jxm9JiC7AqPZ3NuUTy+Rzyq8hPju4Vkge8A0sNlFuxB9gggOTyONp1Mkqtrt0Ts - PZyGeBSSo+BY1WKB7wFyMQDSnO5B/myKlYfHGU5uq/y2RiUeO5tN8Pi6EfGolg+NPyIM - C8gA+YUp0nn+iCrIPRGb1xJATuoJQPLxOMvFY+1mxKMwnANHqXYLdAPI/VEhfqsWO/YM - IGV4NLea4bgY8aj2j4w/KBwLKACyub4aAHktK+0wC8ipckD+8qOPHI+TpjJ43EPV4yM2 - ufoFS3OE4y44UhVboBMgnzwgKVY5II1JFevPKEhlPIZE7Uf1qOKviq8XrAXkgPzc0db8 - hgHkqUN7tm9eAwpSBsh+fX+Uj8ytObqjTXl4zLp2D/D4prmt4zPiUbCugwNXgQU4QEJ/ - 1k8f3je8rnzy4Gb2maMASF9GQbKA7NvnxwKSw6Mxqx4JHs9k33rwBJOrKvia+ErBW4AB - 5N9f//rCAfLutSwCyIA1Hgt+HpB9+5FL5Rg8LvBYs3n7nkOnEI+C9xqcgKos0BUgrwAg - d4X4roQUq6W5sT5RkD949WOfvkzlqrG5JUmu+gIej57Jvknw2ED2HrH/qqq+K75XoBbg - APknALIVFOSzRxSQsXJAjiQ36fyYgmTwOJKqR8BjAIPHu1Q9tlL1yPZDFqjxcNhogR62 - gDIgX4CCpIAM9l25yNGWAeTAHwMkbHaQgx36DB5X+obsAjxeQTz28CfE14nJAp0AWcwD - pANJsY7UHvxjgOyEx1iiHu8+egbJVYJH2TUdYrInzgUt8DMW6AaQ+3YRQM61tTQjCvKH - AEnwOJDBo63jopW+wRweX6B6/Jkvhn9X1BboApC5WacOxoaTFKuDzSQTgx8EJMHjYG2q - Hh2oemTwWIx4FLU/4eR+zgI8QH6EPchXVEGeTuEDcvjQHwCkDI9mlrZzKR73MeoR8fhz - Hwz/trgt0CUgTxJArvaY72Az8QcByeLRwGSiDcVjeOzBU1m5dxGP4vYmnN3PWoAPyDYK - yMIbVwCQO4N9PFkF+QOApHgcOlzfmMGjT/CufSmnSXL1xSvYe/yIe48/+9nw74vVAp0B - eSc36+TBmPBNq5fyAfmfiub4eJzvsToA8HgS8ShWF8J59aAFFAD5DhTk48Ibl+WAtIAU - 638GpCIePX2CdxI83iikeGxDPPbg58NXic0CPEC2tzbXVT0r7gqQ/+lu5D5McpWqx/lL - V28KjyF4vIPqUWy+g/PpeQt0A8iEnUE+ngvn2lqYGf1XQMrxaAHJVRaPl28UPgb1+A7x - 2POfEN8oIgtw8fgVqljbW5vqqspYQG4jCtKepliHDf79PwASDlqRvcfOeKyqa25tx9Ic - ETkPTqXnLcAFJJyD/NgGCrKCKMiMFAaQ0MD8vwKSw6ORGeBxoadP0M6ElNOIx57/cPhG - UVqAi0c5IIvu5J4/cSDmBwFJ8TiM4tGeqMdtMQdOngf1WFZV16SAR2wwJ0p/wkn9pAW4 - gFQG5I6gDZ4L/zMgeXicPofFYwbBYwWqx5/8UPjXJWEBLh67AKT30nn21qRI598ryC7w - eALwWIR4lIQz4SR/3gJcQEIDc1ZBFlwnChIAuYIActx/SLEq4XFD0I6EFMTjz38jfIN0 - LMDFIw+QtxkFudF7CQBygomBzr8FpByP1vbzlnoT9Yh4lI4r4Ux7wgJcQLKArKl4XHD9 - kgIg9aBIp/+/uElHhsdxFqAeV7B4vF7AqkdoT87e0oHJnJ74cPgOUVqAi0cKyBayB1n0 - g4Bk8KhjYDIB8LjEeyODx9uoHkXpNzgpFVmAC0gZIEspIOOJgnSlClJP+98AEvDYf+DQ - 4XpGMjzGp2RcInisIaU5iEcVfT98rbgswMWjAiAzYQ8yjChIO+sJY/+dgvweHlv4pTm4 - XBWXA+FsetYCXED+HCAZPGozeHQl6pHBYynisWc/F75N5Bbg4pEPyKuZJ5L+GyA5PI6d - YG1H1GMYJFczcxn1iHgUuQvh9HrSAjQgv337WwGQ6cnxkUHrl1MFafjPCrIrPKaDekQ8 - 9uSXwndJwQJKgKx9CSnWq5mpSdFh/nIFOej7xzwIHgcN0zGQ4zHpROZVxKMU/Afn2MMW - UADk24aacpJiJYAM/LeApHgcoq1nSJKrrsvXB0XGJyvj8Rv9mR4eOr4OLSA6C/AA+am9 - pUkBkO7OdlNoivW7gJTjcYqds7u3f1h0UirF48vaJlSPonMYnJBqLdAZkPfzL6Ynx3GA - NAUFCd11ui3SIXiEBnN6hqYMHgMj4wCP+QWl5TUNb9m9R8Sjar8hvl08FugGkInRof7e - BJDjx8Ae5HcASfGopWMwZjyDx9DoRB4eP8k7duDeo3icBmeiOgt0DcgjcRGB65a7zJ42 - 2dRQlwFk1/2S2fbkhqaTp812Wb4uMCLuSPrF/PuIR9V9MXyzmC2gCMhGRkGeO564O9TP - y81pptX4MaNIf9ZubtLh+q+OGW8108nNyy90d+LxcyS5StUj4lHMnoNzU4kFFAFZX1Ne - QhTkkb0RW9Yto4AcTQHZdX9Wcskj2558tsuydVsi9lI8lpTX1KN6VMnnwpeK3AJ8QH5o - IYB8eDuHAHKr3yo3xxlW5gSQ3XTXgWwO12COtCf32wp4PJtz+yHgsbGlHfEoctfB6anC - Aiwgv0KRTkfb2/rq8pJ7eRfSDu+N2LzWY8Esrj9rlwtWWirHXvK4wGPt5og9h9Mu5N0r - eV6NeFTFp8J3SsACyoCsfPrwVvbZY/ujQmT9WZnmAZ0zOtxBK3LJIzSYg/bkx85m33r4 - tBLw+AHxKAHnwSn2vAWUAfn80b1rWacO7dkesIa9G7mbLQ+yXB0Emx1QKgfXdECLALY9 - OcVjB5x7/PoN9x57/nvhG8VtAQVAvm98Xfnkwc0rZ46S9nPMzVZMTUC/Tt2uyHIVsjlM - LQActKIddEiDOaY9+Z9f8ZoOcXsOzk4lFlAAZPOb6mfFd2n7uW0boSZgJtQE0C2PX/sq - L1iZ5eooY3Oy2QGlcswtVrSDThviUSWfCl8qAQsoApJtP5eRAlXlsOXRfUYHNh/hZAfT - sgOyOVsiSKkcc4vVe1SPEvAbnKKKLMAHJGk/xxy7olsei+faWpoZwU1zv/dXXrAyy1Xm - ZMdCT9+QKKgFyGFvser4/AXVo4q+Fr5W7BbgAxK668CxK1ITcBgyOqvJXeXklAfU6Cgv - WKEYYODQEaOgdHUmnOwg2Ry62QGV5KTBHKpHsXsNzk9lFpABEtrPwbEruuVBMjpBG5gi - VqjRge5zfRUzOiS7CgeRTSZNneXisS4Q7iQ/fQWyOZWvoRYA8aiyb4UvFr8FZIAk7eeg - JoDJ6MBNc36rFjvSBSsUlSuXBIB8HAzZVXrLo6cv1OakwrU5xWXVb5rxkkfxuwzOUJUW - YAD5N9xs9enDe9IOktwTAEWsZMFKjiWTmjklAUlqV4cO14fs6gwnd++NdLnKnOx4R7M5 - uPeoyg+G7xa1BThAkqI56JdMLtLJgRqdnUHrmQwrNLtSFpBEPmqNoMUA8z3WbImMp8tV - WpvT/hlbBIjaXXByqraAHJB0wfr8EWxBnjgQvdVv5SJyVTmcgiQCkr8D2YfIx5EGzMnH - DcG72JNWVWS5Ks/mqHrc+H60gBgtIAPkl8/sgpVmWMOhJMAJDnkY6w8HAakQj31/lcnH - RSv9QqEhcta1e3DSqoEuV7E0R4xegnNSmwU4QNIFK8mw3rxyGkoCtpAaVtjxGDUCWnko - 7EBCOgcuzqHy0Q3k454jUAxQ+PgFza7KlqtqGz7+EFpAVBZgAQkZHViwvqkmJQFwCnIX - KyChGSQcglSOx6HDye6jHdSSb44g8hGOdsDFAK1QK4eV5KJyDpyM+i3AAvIvyLC+a6h+ - XgKHPE6CgPT1hJvKJ5uOpgkd3gYkm84xmWjjsMBjXdDO/cfoRR3Vb+BiAJCPeLBD/V8Q - f1FMFuDi8X+f25kdj/yLaYdiyQ7kXFs2ocOv0IF4JGetTCeRi6w2BO9OhI7Idx/BUat3 - bZ++cA1YxWQfnAtaQK0WYALyKwhIUqLz5MGNyxnJe7dv9HajCR1yD6tiPJL06mjTydAS - GaoBYg6eysqj98q9/0B2O+jL1Dp8/DG0gKgswMYjCEioKYdrdG5ln0mJh4oA6AUJZ66U - E6yw3cFW58DVAH5hsYfgnscCLp3zFeNRVK6Bk+kNC5CA/PY3P6FzbN+OLWs9SIIVzkAO - Vdjw6EO2O/QM4aoOx8Ve/ttIevVGIRSvknQOKx97Yw74m2gBsViAiUdI6DAlrHdyM0mC - dZ3HAgebiWMNYMPjt37yggCIR9juMDK3pNVy2+OSSTE5VOdgPIrFHXAevWwBumD9+y+o - CCAJVqjQOX8iMYq/4dFfOR5J9So9bAXbHWfgJquyl3W0OoepBujl6eDPowWEbQESkNCc - lVTowL3IZMMjaXcwPXI1yZRsQPLjkZQDQDX5eCs75yWrAyISSDwWlVXx4lHYtsDRowV6 - 2wJ0wfqVxuOripL7eVmnDkSH+KxwnQN9PAxGag3iF+hw8QjlAEugHCDhKFyEDPHIbD9S - Pvb2bPD30QICtwAE5DeIR7oBWXo/78Kpg7x4HNZdPJLyHIV4pNuPAjcFDh8t0OsWYOLx - D148xmwlfGQLdLrhI8Zjr384HIAoLfBj8YjrVVE6A06q1y3wnfUqKWBV4CPsdyjlc+jd - cvL8aq/PBgeAFhC2Bdh4pCcgO+dzFA5c0f3H7+53CNsUOHq0QG9bAMLx/779y/0O5XoA - clsHd9wK63N6+0vi74vBAiQe2XqAGubGju/WA0C9nJGZ5QxHNy9/OI6ccfkGXPaI9Tli - cAScgyZYgOIR4vFT27v66ufFUC+X+r16ObaeHFrNrYJ68sPpF6FXAL0egBxHJu/ShDnh - GNACQrUAE49w5aPsgoBj+3cEMvXk5MIOxXryfsx5KwvZeasLcN6q4lXDe3q7HHkXBqRQ - PQHHrQkW4OLxYxvTwwPOWyVEbKY3sHZx3grOI5Pr5bjzyEknsq7BeWTmOiv2PLImTArH - gBYQpgUo0r59/ZPcwAoXWkETyIzkuO2b4IK5meSCOaXzyL+Q61ehW8BE6BawbF0QXPeY - mXsHes2RTuVf/mSvlxOmIXDUaAENsACNx7/hfoD2lsbXL+gN5Ydjt/mTjgEW0OIKLmDl - 3w/wCxSwkm460Bt5/lK4Djnh6Jls+QYk3p+jAR8UhyBkCzB4pOlVeryDlJMfjAn181wI - FyKbQkcduKCcd58ViUdSEMAeuNq+N5lNsEI3HUjoICCF7As49t63ABuPNJ1DOurcyT2f - mhglP24FDQMU73ukFwQYjbOwnbsYEqwx0G0O2neQhM4H6G6F8dj7XxRHIGAL0HCE0x3k - ug4mnZNz9ug+kl5lrwdQbqjD9AugF1q5rvAJ2Z3Ev2COu/ARU6wCdgkcei9agFuuMvKR - vV4uLiLAe4nzTHqdleJ2xy+/9Ok3gEno2JD2j0E79x1jTkDWNdMLkRGQvfgx8aeFbgEW - j6QagN4OQE4/ph2KCaPpHNKxnDSAVOjfQS5E5i4oJzcExBEBWfiEaRggW7AiIIXuGTj+ - XrAAF45cuwAiH6E6Zze9HYCeftQerNSwvA9J6NCKObhhjghIuIGVbagDNyJju/Je+Ir4 - k2KxABePTP9HtmF5SsKOQOZ2OaZ9h0J69ZdfaIMrciPytDkgIIOjuIZzcIUOdPDgMjoI - SLH4CM5DbRbgwlHWH7n0PtNuDqoBnGdajR8zavjQ3/mnH8m9j5DQIQJyLNmB9Fi7hV2w - 0hJWyLBCRofp4YEBqbbPiD8kDgsw4Qh3IQMeaXcruttxIknejpXKR4XtDpLQkTcshyMe - 22IOQgdI2sKDlOjIAYkBKQ4vwVmoywI8PH4mxTmQXSXdHxN2BK3rtl05xCMISNIywBRK - ysmCddf+Y2fhDlbScq6lHbYguZoArCtX13fE3xGFBXh4hM1HOGsFd6/mZUFzq/BNsNtB - mnfQbqxK8pEIyAGkxRWzYF2zOWLvEejhQXvqvGMBiStWUTgITkKdFpCFI6hHwGNT7Uto - xpoDzVijQnxpsdw4ZrdDablKF6yw46FvbGZJM6yh0YmpmVdpDWtTKwBSnmLFFas6vyf+ - lqAtwIUjUY8Ej3A1Oc3mJMdFQC8dUpxjYjBy2GDYfeRXr9KETj+6YCUZ1tkuy9YHRsan - ZFy6XlBaAYeuFAGJASloF8HBq88CbDhCMofisbWpror0Ks9MTYoO8/diej+OGgHNyhUO - d9C+On3ognWEAfQsJ008Nm6LOQA1cwwgiYIkgGRXrBiQ6vui+EtCtgCHx7+/0uQq4LGi - tOD6pYyU+B1B65e7zIZWAYa6UJyjvNtBIrIvZFihJMBwHM3obAjakcAHJOxBylM6GJBC - dhIcu7oswIUjrFbhZAenHq+eP3EgZttGms2ZMNZAB852dF6uEgEJC1a4JMAEtiDnLfXe - RABJFeTL2saWD59gzwMDUl0fEn9HBBaQLVaZ1WoHafxYXnI/n8HjBtIpwAKyOcOHDuzf - eblKdjygJAAyOkZm9BYdHwJIkmIteV5dD1XlsGKFKh1uxYqEFIHD4BRUaQF+ONLV6vuG - 15VPH1L1SPE4z96ay+Z0yq4yGZ3+sAUJgJxoA7cEEAWZlHou59bDJy9ekZTOHwoSEgNS - ld8S3y14CyiGI12tvql+9uhe3oX05PjIoA0ryM0AZkb6gEfI5ihnV2k8Mhkd2PIggFyx - ISgy7kgaFOkUQyPIppYPHxkJiYQUvKvgBFRvAS4cSWoVxONnWK1CMudx4c0rZ48lRoeB - emTxCDfndJXNkWd0CCBBQS7x9g/dnXj0zGXY8yivftPc2s5KSFlAIiJV/1nxF4Rpgc7h - +A5Wq7DXkZt16tDeiMD1y4l6JHjU6jqbwyxYf4ManRGMgnRdvm5LROxBktKhK9a3bbDp - QXM6GJDC9BEctdoswIXjN4aOUEf+vrGuClar+RczUvbtCvHzcne2s54AtQBks6OrbA67 - YCVbHiTFOsXOyW2Vb/DO+OT0C9fuFJVVvgYJCTkdDEi1fVP8IaFagIvG/5OF44eWpjfV - 5aUFN7LPHk+KCQ9Y4+EymyRXGTx2mc1hAfn7IC1IsY6bPG3WAo/Vm8KiE4+evpR/79Gz - qtrGrgIS16xCdRoct6os0FU4NtfXVDyB3Or5k4f2Rgb5eC5ynGE1fizgEdRj19kcGSAH - a+tAkY7VjLkLV6yHFeuB1HPZNwpg06Ou8T1HSN6+B573UNVnxfcK0gKyaOTRsbW5/tWL - p0V3crPSkxN2bfXzXjLfYeokU0Oy9zjgt27xSGsCYA9SW2+06SQb+3nuq3yDdsQdPnX+ - 6q1CyOlwAfknKQyQi0hEpCD9BgetCgsoRCOpkvvyx8cPrc0NryCXczfvYsbRxOhtAWuW - uUAyx3zMKB2oJP8OHmlNAOxBDhsxiux5zHbx8PbfuishOS0r9/aDxyQg37W1f4J9SBqQ - GJGq+KD4TgFbQB6NFI5f//zfl88fP7QAHSvLiu/lXz5zPCl2+5b1sFqdOQWSObra/4BH - Akgo0iEpnbHjrWznui5bG7Bt9/6U9Au5tx+SgISkTjsUBvzvz6+KiMRVq4C9CIfeIxbg - BSOJRrrtSPYd2XC8f/3KudSDIB59V7nPc5g62dRIf4TWINh77LIWgKhH8vTpC1WskNLR - MzSdaG3ntNhz/ZbwmMSjGTQgn1fXNrxt+QBpVopIhUUrjKZHZoUvQQsI0QKK0Ui3OWCt - +qm97X3Tm5oXZcUkHE8eitsR4ue9lORWzcYY6MBex4Bfv6MemYD8lVmxQo51qgNISJ/A - iJjEYyQgH5Q+f/m6vvk9XbP+jyxalSMSQ1KIroRj/kkL8GPx/4CNEI1UOX7u+ND6tqGu - uuJp0b3r2ZknD8fv2rpxtYfrHFur8bLV6nfxyACSWbGOMQcJuWCJl29QRGwSDcjCkrLK - mjeN71o/dICK5CKSpyPZgf3k9PCvowWEYgHFUGSCkaxU//cFlCPAsbnhdVX5k6K7+Vcy - Tx5JiArdtHb5QseZ1hNJbpWsVrvf66DLVbpi/RVWrEO1dUebgIScAzkdPxKQR9Ozcm8W - FD+tgDVr83smImlIUkrC/ycojwz/M1pAUhaAGADVSNAI0fgHicaWt41val4+K314J+/y - uZOHE6LCAtatWOxkbzN5nBHNrf7japWuWPuRFSsjIafM4AIyEQIy58a9osfPX9bUQUS2 - fej4+PmPLyQk//oK2R180AIStwCEwV9//UnQ+McnEo3vmupfV1eUPSq8fe3SmROH40k4 - ero5O0wj4hEK5cjW4z+sVhkF2e+3Ab8PGQZ1rKaTrGfOdaWEjElMScu8knf7waOyiqpX - bwgj29o7PpGQ/PK///0Jz1/4oAUkawESAf+DUAQyQjB+ADY21ddWVz57XHTvZu6F08cP - xe8KC1jv6TZvFuw8jiVbHf9qtSoLSNj00BllPI4XkPuPnDx7MfcmILLsRTVEZNNbCMkP - 7R0fP33+/AcJS3zQAhK2wB9/QCh++tjR3gZobG6sr615Wf4U4JiffT796IG9O0MJHSEc - LcePHa07XItUAvxDbpUEI3ngpoD+REKONDAeN9mGEtI3MHx3wqHjGVnZ+bcLi588e1H1 - qraehGRLaxsEZXtHx0fyfMIHLSA5C1DX7+joaP/woa2t9T0EY8Ob19Uvy8tKHgIcL507 - lZIYGxmyce0KJhxNRuuNgMKcf7daZQKSSEheQLos9fLZHLZrb1JK2rmLuTfuFBY/Lqt4 - Wf2qrr6hsentu/cQla0Ql/igBSRrgdbWlpb37942NzVAMNZUvXj+tKTo/q287KyM1MP7 - YiKC/NesWEzpaGII4fhvxSMNR1oVAAGppa3LEHKOy5KV6zdtjYzZfzg14/zl3Jt3CotK - y55DSNa8rn1T39DQ2NjU1AzPW3zQApKzAPH85qamxgYIxbraV9VVleVlTx49vH87P+fC - 2VMpSXFR2wL9vJctcnaAxaqJoT4Tjv+81cEEI/lXUqYzAJKsEJBjQEPOmDPfbcUav6Dw - qLiklJOns67k3rhd8PDR46fPyl+8rKquefX6dW1tXV3dG3zQAlK0APh+be3rVzXVEIsV - z8uelBQV3r2Vl3PxXPoxgGPk1oANXh6uTvbTLGg4Qmr13+w8ysORF5BEQ06cYjtr3qJl - 3j6bQyNjEg4ePXUm63Ju/q27BQ+LSx4/LXtWXvHiReXLly+ryFOND1pAQhagTl/18mVl - 5YuK8ufPyp6UPip6cO/2jWvZF86lpx5J3LsrPMh/recSl7l2Uy3MTUZTOtJcTld3WPFj - UOHPMkJCQJpOsJru4Oi6dOU6/6BtO2P3Hzp68nTmxezc67fu3Ct8WFT8qPTxkydPn5bh - gxaQqgWePn3yuLTkUVHRg/t3b9/Iu3o562z68eSkuOiIrQE+3ssWz58zw2ay2ViSyqF0 - /Dc7j0oB+SuzZB05ysh0vMXUmXMWLF7mvWFT8PZde/YfTElNP5sFIZl3/ebtO3fvFxQ+ - ePDwYRE+aAFJWuDhw4cPCgvu37t7+9aN/Nycy1mZGaeOHUmMi44MDfRbu3Kpq5PD9CmT - xo0x+OFwpLseEJCQZdXRNxxrNtnadpaT6xLP1b6bQ7bviklIOnL0RPqZzKxLV3Jyr+Xl - X79x8+atW7fxQQtI0AK3bt26eePG9fxruVezL1/IOptx6njKwf17oyPDgvzXe3kAHGdO - s5xgamygO/wH6UhQySxZISBH6EFWZ6LlNLs58xd5rFzjGxAcviN6774DR1JST6WfPpuZ - lXXx0uXLV7Kzs3PwQQtIzgLg+FeuXL508ULW+XNnMtJOHEs+lBgfsysiNNB/vfdydxdH - h+nWk81NDEeN1NYaTFI5/3mxyqxcSUDCtseQYcN1DYxMzSdbT3eYu2AxRKTPpqDQiJ3R - exISDx5OOXr8xKm09PSM02fOnDmLD1pAchYAxz99OiM9Pe1k6rGU5ENJ++NioiK3BW/2 - WwfR6Oo8e+ZUy4njxozW14Fw/H3AD4cjJSQUBgwcoqU9Un80INLCxnaWI0Skp/d6v4Cg - 0O2RUTF74vYlJh08dPhIcgo8R5nnGD6aaAH26+C/8S3wMx+KfQ/x/OTkI4cOHkjcn7A3 - ZvfOiG0hWzb6rFm1DKJxjt30KQBHIwPdEaRmdcBvP0pHdsn6a3/YiKRrViMTs0mWU2fM - cpy/cMmyVavX+20KDA4Nj9ixa3d0TOyevXHx8fEJ8OzDBy0gGQsQj0+Ij4+L27snJmZ3 - 1M6I7WEhQZv9fdZ6e3osdiHRaG0xwRTgOJKRjr9BGcB/2uhglqrcv8KSlaRZyZoVEGls - aj7Jaqqtwxxnl8VLl6/0XrvBzz9gS1BwSGjYtvDt2yO4JxIfTbQA93nw33kW+JkPJX/N - 9vDwsNCtIUGBmzf5+axb7bXCw33hfMfZNBrHjTWkcOSk40+EIyxZGRE5kCBSd9ToMRCR - ljbT7WY7znNZ5O6xfKWX95p1G3z8/Pw3bty0KQCezfigBaRkAeL0mzZt9Pfz8/VZv3a1 - 96oVy5a6uS5wmuMwY9oUiwnjYKmqp6M9bMjPrlVZRPaRIVJLW0d3lCFE5ESLKdNs7WbP - dV7gsshticey5StWrvLy8oZnNT5oAclZgHi+t9eqlZ4rlnksdV/s6jLPcY7DzOk2lpNp - NJKl6lACR1ir/ovzx9zStNt/pwHZ/3eyaNXW0Rs12tjEbMJkS+tp02c6zJ7j6DzfxcV1 - 4aLFbm7u7kvgWYoPWkBCFiA+v8Td3c1t8aKFri4L5jnNnTPLbsZ0GyuLieamY40MIBrp - LgeTyPmptSoXoRwiYdEKEak7ysBorCmEpIWVzbTpM+zsZ82eM2euo6OTk7Oz8zx80AIS - swC4vbOTk+PcOXNmz3Kwm2k7faq1pcXE8eNMjA0N9Eg0kqVqf7iboyfgyMRkn75MXodG - 5IiRegajjceajhs/cbKF5RRriMrp021nzJg5c6YdPmgByVkAHH/GDFvb6dOnTbWZYmUx - edIEM1OTMYYGo3R1ZNFIdjl6BI4sJGlEwtbHwEGwGzlcR1ffYLTRGIhJs/ETJk6abGFh - YWlpZWU1BR+0gOQsAI5vZWkJMTB50sTx5uMgFoGMo/RGjtCmuhHY2NPRCEEJi1aGkb8P - GjwUQhIoCTFpCEFpYmoKcWlmZm5uPh4ftIDkLACOb25mNm6cqanJ2DHGRqMNRunr6kAw - wkJ1IFmpqiAaCSXZiKSQJCEJmBypq6c/ygDC0tDIyMgYnjH4oAUkZgHi98ZGRoaGo0cb - QCjqQSwOBzIOgZQqKcdRUTSSiKS7kb/++huEJFByyFCtYRCUI3QgLHX19PT0uWcUPmgB - aViAc3lwf13dkSMhEodr01gEMrJo7FndSMOQ9y8MJJmQBDEJQQlRCWFJn+H4oAWkaAHG - /YcN09ICLA5mYpGsU3s4icOLQ94faUhCGR1gEjj5+8CBgwYNGjx48BD5MxQfTbSA/APh - n2QW+JkPJXvJEIhCiMNBA4GKvw8Y0B9iEZapqiUjLyJh3UqyO/36wdr1t/79IS5JYOKD - FpCyBSAKIBZ+I6FIY7Entzf4wdfdn2lQsmH5Kzy/4YMWkKgFiP+TOCSRCFjs0a3G7uKv - m39Ofh0eGAc+aAHpWoAJA3VDsZugxH+MFkALoAXQAmgBtABaAC2AFkALoAXQAmgBtABa - AC2AFkALoAXQAmgBtABaoFct8P/b5umcCmVuZHN0cmVhbQplbmRvYmoKMjQgMCBvYmoK - NDQ4NjUKZW5kb2JqCjIwIDAgb2JqCjw8IC9MZW5ndGggMjEgMCBSIC9UeXBlIC9YT2Jq - ZWN0IC9TdWJ0eXBlIC9JbWFnZSAvV2lkdGggMjU2IC9IZWlnaHQgMjU2IC9Db2xvclNw - YWNlCi9EZXZpY2VHcmF5IC9CaXRzUGVyQ29tcG9uZW50IDggL0ZpbHRlciAvRmxhdGVE - ZWNvZGUgPj4Kc3RyZWFtCngB7dCFQQIAAABBsTswEAxsBQWD/XdzkL8b4Vartj8MGDBg - IDnwiwEDBgwkB34wYMCAgeTANwYMGDCQHFhiwIABA8mBBQYMGDCQHPjCgAEDBpIDnxgw - YMCAgeDAHAMGDBhIDswwYMCAgeTABwYMGDCQHHjHgAEDBpIDbxgwYMBAcuAVAwYMGEgO - vGDAgAEDBoIDzxgwYMBAcuAJAwYMGEgOPGLAgAEDyYEHDBgwYCA5MMWAAQMGkgP3GDBg - wEBy4A4DBgwYSA7cYsCAAQMGggM3GDBgwEByYIIBAwYMJAfGGDBgIDpwjQED2YERBgxk - B64wYCA7cIkBA9mBCwyEB84xYCA7MMSAgezAGQYMZAdOMWAgO3CCAQPZgWMMGMgOHGHA - QHbgEAMGsgMHGDCQHdjHQHhgDwMGsgO7GDCQHdjBgIHswDYGDGQHtjBgIDuwiQED2YEN - DBjIDqxjwEB2YIABA9mBNQyEB/4BLgXylgplbmRzdHJlYW0KZW5kb2JqCjIxIDAgb2Jq - CjM2NgplbmRvYmoKMjUgMCBvYmoKPDwgL0xlbmd0aCAyNiAwIFIgL1R5cGUgL1hPYmpl - Y3QgL1N1YnR5cGUgL0ltYWdlIC9XaWR0aCAyNTYgL0hlaWdodCAyNTYgL0NvbG9yU3Bh - Y2UKL0RldmljZUdyYXkgL0JpdHNQZXJDb21wb25lbnQgOCAvRmlsdGVyIC9GbGF0ZURl - Y29kZSA+PgpzdHJlYW0KeAHt3Qs/k2EYB+A5j2HOZpjz+TxzNkQSSSJJJJEkkkgStq/e - B+n6CPtte9/nuQ//K51KPT483N//vbv7c3v7++bm1/X11dXPy8sfFxffz8/Pzr6dnn49 - OflyfPz56Ojw8NPBwcf9/Q97e7u773d23m1vv93aerO5ubHxen391dray9XVFysry8vP - l5aeLS4+XViYn38yNzc7OzOTTCanp6empiYnJyYmxsfHxsZGR0dGEonE8HA8Hh8aGhwc - HBjo7+/v6+vt7e3p6e7u6urq7Ozo6Ghvb2tra21taWlpbm5qampsbGiIxWL19XV1dbW1 - 0Wi0piYSiVRXV1VVVVZWVJSXl5eVlZaWlpSEw+Hi4qKiosLCUChUUJCfHwwG8/Jyc3Nz - crKzs7OyMjMzMzICgbTP7/v3+/f/9/zz/Pf+8/53/nH+c/51/nf/cf9z/3X/V/9Q/1H/ - Uv9T/1T/Vf9W/9f/0P/R/9L/0//U/9X/1v83/2D+w/yL+R/zT+a/zL+Z/zP/aP7T/Kv5 - X/PP5r/Nv5v/t/9g/8P+i/0f+0/2v+y/2f+z/2j/0/6r/V/7z/a/7b/b/5d/IP9B/oX8 - D/kn8l/k38j/kX8k/0n+lfwv+Wfy3+Tfyf+Tfyj/Uf6l/E/5p/Jf5d/K/5V/LP9Z/rX8 - b/nn8t/l38v/5x/wH/gX/A/+Cf+Ff8P/4R/xn/hX/C/+Gf+Nf8f/4x/yH/mX/E/+Kf+V - f8v/5R/zn/nX/G/+Of89IxBIp1L8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8 - d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/ - zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf - +e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47 - /53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/nv/Pf+e/8d/47/53/zn/n - vwfSqdTjw3/sv/8DK6twSQplbmRzdHJlYW0KZW5kb2JqCjI2IDAgb2JqCjgxNwplbmRv - YmoKMTcgMCBvYmoKPDwgL1R5cGUgL0V4dEdTdGF0ZSAvY2EgMCA+PgplbmRvYmoKMTgg - MCBvYmoKPDwgL1R5cGUgL0V4dEdTdGF0ZSAvY2EgMSA+PgplbmRvYmoKMjcgMCBvYmoK - PDwgL0xlbmd0aCAyOCAwIFIgL04gMSAvQWx0ZXJuYXRlIC9EZXZpY2VHcmF5IC9GaWx0 - ZXIgL0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4AYVST0gUURz+zTYShIhBhXiIdwoJlSms - rKDadnVZlW1bldKiGGffuqOzM9Ob2TXFkwRdojx1D6JjdOzQoZuXosCsS9cgqSAIPHXo - +83s6iiEb3k73/v9/X7fe0RtnabvOylBVHNDlSulp25OTYuDHylFHdROWKYV+OlicYyx - 67mSv7vX1mfS2LLex7V2+/Y9tZVlYCHqLba3EPohkWYAH5mfKGWAs8Adlq/YPgE8WA6s - GvAjogMPmrkw09GcdKWyLZFT5qIoKq9iO0mu+/m5xr6LtYmD/lyPZtaOvbPqqtFM1LT3 - RKG8D65EGc9fVPZsNRSnDeOcSEMaKfKu1d8rTMcRkSsQSgZSNWS5n2pOnXXgdRi7XbqT - 4/j2EKU+yWCoibXpspkdhX0AdirL7BDwBejxsmIP54F7Yf9bUcOTwCdhP2SHedatH/YX - rlPge4Q9NeDOFK7F8dqKH14tAUP3VCNojHNNxNPXOXOkiO8x1BmY90Y5pgsxd5aqEzeA - O2EfWapmCrFd+67qJe57AnfT4zvRmzkLXKAcSXKxFdkU0DwJWBR9i7BJDjw+zh5V4Heo - mMAcuYnczSj3HtURG2ejUoFWeo1Xxk/jufHF+GVsGM+Afqx213t8/+njFXXXtj48+Y16 - 3DmuvZ0bVWFWcWUL3f/HMoSP2Sc5psHToVlYa9h25A+azEywDCjEfwU+l/qSE1Xc1e7t - uEUSzFA+LGwluktUbinU6j2DSqwcK9gAdnCSxCxaHLhTa7o5eHfYInpt+U1XsuuG/vr2 - evva8h5tyqgpKBPNs0RmlLFbo+TdeNv9ZpERnzg6vue9ilrJ/klFED+FOVoq8hRV9FZQ - 1sRvZw5+G7Z+XD+l5/VB/TwJPa2f0a/ooxG+DHRJz8JzUR+jSfCwaSHiEqCKgzPUTlRj - jQPiKfHytFtkkf0PQBn9ZgplbmRzdHJlYW0KZW5kb2JqCjI4IDAgb2JqCjcwNAplbmRv - YmoKMTIgMCBvYmoKWyAvSUNDQmFzZWQgMjcgMCBSIF0KZW5kb2JqCjI5IDAgb2JqCjw8 - IC9MZW5ndGggMzAgMCBSIC9OIDMgL0FsdGVybmF0ZSAvRGV2aWNlUkdCIC9GaWx0ZXIg - L0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4Aa2TzWsTQRjGn02QCtZQi0jx4oJSPERdkhbb - W9t8SOwSlySlfhw02d1soslm3d1ErR561H+gFEQQPOjBmxc9tSeR4ieC9OBdUU9a6qGU - 9Z0Zd4Ng8eK7zMxvH555Z+adXSC+UXWcVgxA2/bd0qkZ+ey58/LAOiQcQgJJyFXdc6Y1 - TSXLDrH5gdwU74+xXF9iz7c+fdtz58Li7bXDSw9bO0wK5YRLCwJSkoT9luApxjXBFcbX - fMcnT4Ox3qgaxLeIk26llCF+RJywBD9lXBP8gnFPt9jcdWLFNpo2ENtNPGGYnk48RWwZ - nt4mpjwS2u0O5Y+znEd1x6W58bfER1hdaKS4mgAmv5J+r69dPAE8WQMOaH1tdBkYvgQ8 - m+xrP97wWkkjNa+eTvF00uBBYNdqEHwPgAHyb78Ogq3lINheojU2gJWi3nV73EsblF4B - /3oXZxbZgXd0Bgp+R39nURfuUoAHq0BlEVBpvEvj6E9g301AA+lUpnQ6bKKGJAN7szlV - lVNjynhem+fKf+zarS7dFY9h6gftWvEMjSPUPju+RpsS7PXKuZDrzXwhZKOanQ15oZEp - hlx386WQL1dPswPynKY9Vw7ZafFv//daM5Hf9HKRZ6FRYWfmHrdbmgv5Smc28htmNtqb - 3Sqy/4n7m34h2j+yyEGlR0YKY1AwjjyVfV58kzQDQ4+B+0PKyXR55eNLJvwRvnmd33Wm - 49xwm1bDl6fpjzSTcsHWjyfllKJM4BeDarM/CmVuZHN0cmVhbQplbmRvYmoKMzAgMCBv - YmoKNTY1CmVuZG9iagoyMiAwIG9iagpbIC9JQ0NCYXNlZCAyOSAwIFIgXQplbmRvYmoK - MzEgMCBvYmoKPDwgL0xlbmd0aCAzMiAwIFIgL04gMyAvQWx0ZXJuYXRlIC9EZXZpY2VS - R0IgL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCngBhZRNSBRhGMf/s40EsQbR - lwjF0MEkVCYLUgLT9StTtmXVTAlinX13nRxnp5ndLUUihOiYdYwuVkSHiE7hoUOnOkQE - mXWJoKNFEAVeIrb/O5O7Y1S+MDO/eZ7/+3y9wwBVj1KOY0U0YMrOu8nemHZ6dEzb/BpV - qEYUXCnDczoSiQGfqZXP9Wv1LRRpWWqUsdb7NnyrdpkQUDQqd2QDPix5PODjki/knTw1 - ZyQbE6k02SE3uEPJTvIt8tZsiMdDnBaeAVS1U5MzHJdxIjvILUUjK2M+IOt22rTJ76U9 - 7RlT1LDfyDc5C9q48v1A2x5g04uKbcwDHtwDdtdVbPU1wM4RYPFQxfY96c9H2fXKyxxq - 9sMp0Rhr+lAqfa8DNt8Afl4vlX7cLpV+3mEO1vHUMgpu0deyMOUlENQb7Gb85Br9i4Oe - fFULsMA5jmwB+q8ANz8C+x8C2x8DiWpgqBWRy2w3uPLiIucCdOacadfMTuS1Zl0/onXw - aIXWZxtNDVrKsjTf5Wmu8IRbFOkmTFkFztlf23iPCnt4kE/2F7kkvO7frMylU12cJZrY - 1qe06OomN5DvZ8yePnI9r/cZt2c4YOWAme8bCjhyyrbiPBepidTY4/GTZMZXVCcfk/OQ - POcVB2VM334udSJBrqU9OZnrl5pd3Ns+MzHEM5KsWDMTnfHf/MYtJGXefdTcdSz/m2dt - kWcYhQUBEzbvNjQk0YsYGuHARQ4ZekwqTFqlX9BqwsPkX5UWEuVdFhW9WOGeFX/PeRS4 - W8Y/hVgccw3lCJr+Tv+iL+sL+l3983xtob7imXPPmsara18ZV2aW1ci4QY0yvqwpiG+w - 2g56LWRpneIV9OSV9Y3h6jL2fG3Zo8kc4mp8NdSlCGVqxDjjya5l90WyxTfh51vL9q/p - Uft89klNJdeyunhmKfp8NlwNa/+zq2DSsqvw5I2QLjxroe5VD6p9aovaCk09prarbWoX - 346qA+Udw5yViQus22X1KfZgY5reyklXZovg38Ivhv+lXmEL1zQ0+Q9NuLmMaQnfEdw2 - cIeU/8NfswMN3gplbmRzdHJlYW0KZW5kb2JqCjMyIDAgb2JqCjc5MgplbmRvYmoKNyAw - IG9iagpbIC9JQ0NCYXNlZCAzMSAwIFIgXQplbmRvYmoKMTkgMCBvYmoKPDwgL0xlbmd0 - aCAzMyAwIFIgL0Z1bmN0aW9uVHlwZSAwIC9CaXRzUGVyU2FtcGxlIDggL1NpemUgWyAx - MzY1IF0gL0RvbWFpbgpbIDAgMSBdIC9SYW5nZSBbIDAgMSAwIDEgMCAxIF0gL0ZpbHRl - ciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCngBzcLXcQJAEAXByT8vjLDCO4HwIoobfRPA - K7arW4f22V1akT1anX3ae/t85hfWOcAih1jnCIscY50TLHKKdX5jkTMsco51LrDIJda5 - wiLXWOcGQ7cYusPEPYYeMPEHQ4+YeMLQXww9Y+IFQ6+YeMPQO4Y+MPGJoX+Y+MLAf+tF - vN4KZW5kc3RyZWFtCmVuZG9iagozMyAwIG9iagoxMzAKZW5kb2JqCjMgMCBvYmoKPDwg - L1R5cGUgL1BhZ2VzIC9NZWRpYUJveCBbMCAwIDUxMiA1MTJdIC9Db3VudCAxIC9LaWRz - IFsgMiAwIFIgXSA+PgplbmRvYmoKMzQgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1Bh - Z2VzIDMgMCBSIC9WZXJzaW9uIC8xLjQgPj4KZW5kb2JqCjM1IDAgb2JqCjw8IC9MZW5n - dGggMzYgMCBSIC9MZW5ndGgxIDUwMzIgL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3Ry - ZWFtCngB7TiNfxNVtufcOzOZNkDT0pbQAJl0aJWm2QIKlEJpaJKWNkILVDepsCb9kADF - Flo+n9Iqq2L4sK7a1d+u6K6rFaw6bZENRZevxdUVfn6ivLfig4X14z0R9Af7VoHOO5Nq - BZd9f8Gbk3vn3nPOveeej3vu3AACwBBoAw7u2mXhJpBhGmEOU7HWrmpR3tm342NqnwaQ - V9zetGhZ6hcziZ4QABDKFzWsvT0yatrbAEN/RzyvR+rDdWeXqscBhjVQf3KEEMPGCEQf - ZtDHRpa1rJH3Yxf1X6e+3NBYG4Y6SKc+8YC0LLymiT0q3k39Y9RX7ggvqx+59bl11P8H - 9dWmxuYWvQpuB0gaRf3sphX1TWeOuN6jvpfWEyYcEhjPEJCoADgMjNgLILbBGCojeA9k - 6hf0v1L5zCj9s4j2NCT31wDwEmpvi4+/qhJP0OyeAZT+L56rBlyzMzAQDE2Ncu2nHMxQ - AltABAsI8Az1zsJxuA8klGEyJEM+vIAfgQcq4R4shJ8TTwaUwQuwGz7ARfolEPSgfgCW - QidOIv0zoAAWwF44T3x/gp9CGNZAK96j30XWSYQxkAk3kDVXwDo4SRwJkAY2yMQsNo0f - gxE0sgHaYAPsFir0Z/XjNCaBoAKeheegH6sxou/STxEmH6aCD+bDHcT7AIqYJo7R/6Kf - 18/DRFrnQlhE8yyHx2AXmnA4OvEPrIh3wDjSsxGaIAod8Ev4M2bjm7xS3w4uggkwh+a7 - FWpozi3QB2/ANyixGraGvcB28RX8ogDCUfFtyae/ph+hyBXBSmMKaMRtFE+Lad4H4R34 - EP4KX8HXmIaZOAEn4wwsw6WsQTJLP9X30BgzjAaFbJADebTSAigmmEe2uBMehS54BV4l - OABfokJwHcE4vBWfwR48xZKYwg6zd9g3PJ/7+aOCVVgo3Ck+Jp6UcnSPvosslQJ2UGEK - zVhOFrsVamlVzWT9X0InwYuwE2LwHvwFTsHfaH0j0Iqj0IOlWI7nGGePs8/5ZL5OkPpH - 6xP19fGoTqLVziAoJ7gJZsNcuJk8GoB68vY6+De4C9bDPRQRD0I7gSFnQEof7IPXKeLe - JXv8B/n5FPwXnKOI+BYukz+SSLIDc/AGzMfp6CXwYQVBBFfj/bgZ2/Fh7CKNN7KH2Vc8 - kafycl7P7+ab+JN8Lz/IjwjZwiyhR+gVC8RScROBJh4TP5G45JEekj4zbTe9IlvlIrlM - Xiz/+tLOfug/2n9On6HP0bfoW/V2/b/j3pPIYjL5YwhFeCpFrRNupIgqp+iZD1UQ/M5+ - yyhSmwlWwipYC/fC/bCZYAs8RBH0G3geeuBl2A9/hNdIUwOO0c75mOA07aF/kK4ymnEo - aWwhGIVjcCzFnBNzMQ8nYSG6yf5zMIj1uAI34TZ8GV/Ft/AjBuRtG1NZAZvO6sgKz7Od - bC/55zryUD6/iS8iazwpJAluEcQO8TOpU3oV3sPptN+ufh6Br/RUYQucod2zGt7neXod - r8Xl0CLehk74lnbGbtJF5ZSLcRycE75AJ1vN0nAjS2OT2GnxFXykP4qJ5MuPIIdW5hM6 - 4N+hkM+gvbqW+4WF7PdCNu6kCK3BL9lC9ivmE9ewaijGF9GF5XwcHDFlSZ+wevycZ5pC - cBFXkRaV8Du2AzYyF/4Pm9a/T3KJE2G78BHzwHY4xjJMEkvjF9m77Am4gz1Ee+IRirpv - 4Be03qG4gnKOCwvwXYqmg/g+5d8XxDb9vHgnK2TT8R32N4ogEJ4QwgNc/yJx/j86bgF4 - iS0zzaKsO0I8IB4w2uwQa+Qu7mImOEJ1IzOxD4Ri+AXXTDoWiptQkd6U3sQlUCciZEOF - 8DPswK/xIPQKU+A8fg0opEAFZkvT8AlxGlSII+ExlgkP0Sn3Br7I18DnOJrGLGGHTLMw - X7gICzEffisUC5/wDvYImlkOnsT78O8EDZRdnbgW1ksvwWq+EfJ42PQ+OtjP2R5oYaWU - ZeewbKzkb8Eh2CMVsJvpnQ37+TYWoCyXJx+GM9ggbBA24AdQxuZBG2sVEJLwuHAJGqQW - uFP8EO7C1XEpfYYc2vO/IVmT8E902m2gHJNNZ8sewn4IRZBLuXsN5e0dlAOClCmQzsYz - KFFmMHLeKbYTGfweZsHD3Mct0sNwN/sWMyjD1BE2C5bBVlQpSxRS1jyIH9M5GqBT73pe - A3NN24HhcNqhIG6lk0eFE/AqlsNP4EPMoMyoAjKB34htcAmrWEd/jVACiXw53yAuxRLa - Ty8C6qnwZz0i0PeGe1L+lBsmjM/7iSvXmTPu+uuys8aqmQ7FPmb0KFvGSOuI9LTU4SnJ - lqRhQ4eYExNkkyQKnCHk+tSSkKJlhzQhW501y2X01TAhwlcgQppCqJKreTTFGBcm0lWc - buK8/Uec7gFO9yAnWpTpMN2Vq/hURTviVZUYVs8NUHuLVw0q2pl4e3a8LWTHO0Op43DQ - CMVnjXgVDUOKTyvVhCwtsSrg0MqCqyJRX8jrysVuc6JH9dQnunKhO9FMTTO1tBK1qRtL - ZmC8wUp8Bd0M5KGkrlauen1amUpDaUae5QvXaZVzAz6vzeEIunI19NSqNRqoxVqSM84C - nrgYTfJoprgYZbFGmsEmpTt3X3RzzAI1IeeQOrUuvCCg8TDN4dOSnVqp6tVK1522unJj - +GxVQEvwxBCqAruhXG/rLmvzeoOGtBRP4P4r2W086rMuVozR0ej9ivbU3MAVk9kcxpTB - IE3qyvXPCzho1apvs2KoMS8Q14AmRWseLdzAGWoOKFyv+gxMaImiJajFaiS6JER+y4hq - MG+toyej3L1bPwHlPiVaFVAdWpFNDYa9o7pTITpvbW+ZWym7muLK7bYkD1i6e1jSd40h - Q69s1JMXBmjxVpzdaNGqvzc1GitSyzQ3hVutQisJqBrLyjeq+nyI1uaTR+gJIll0Mdkv - FLUUkHaamGVRlegFoJhQz3xxNSb8HUbKslwAg2hEzmD0aRj+vq05nVpOjhEpJg+5llY2 - I96f5MpdpfnVJoui+clkUBmgQcGCPDK5w2F4eVPMDTXU0drmBgb6CtTYesCd5wxqLGRQ - 9n1PSbvZoLR9TxkcHlIpsnfGbxJpmpw9+EuypA/3RQo0TP8/yPUD9BLax9FoiaqUREPR - cExvq1EVixrt9vujTT7afwMrj+l9m2xayeagZglFkMynDfcEuI0ZsUctZuNBF31GUGKg - nERAX0smutQkO5KzqKLTFS4pfN8ltwgXQRH2ERcw6NKPMyvdY0wwHCrciRIKAJQeuRDD - ZW6b/PwwM98q3CfhSrO0MjmttLTc/HxyWeqCVVbnHMv52Zfn+Oq9n8y2nCY4fwaKLn9Z - hMkpU4HK1AnjcQTjKqNPn4mUwCQ1M3vSjZPx0wlTb1non3ggtTwSKS+LLBK3Zfe/cfkW - thyvL7z4noGKlJVHaG2GGgzgsulXoduSpl8Am2ysGA6VNvQMvmn1pOk24k2I8xsEGiex - y81wWt7f/1j/4/ITgxSDajxMIhTbT9/tQPfJOqoHZC0geQvITIzuU6kwnRgLhR6yokFF - +ko33jQ5fXeCd25xZdktTk+4YXHz7KriRrrC0lqNR7/JuHNe4zHoZNwYf7Rn+Uh7jF/s - pdeUGJrdGWNW22+hspCK0jq+1d3KX37Qa59iWWfpQw6MHd7VNNZ+6ORwewz7e0+OtOfN - TMAHoIgKg5PsIF3F7Oyge/5rqr2pta2VtZofND9pfsm81/yWme5hlgT2dsKJhHMJPInb - OftPfpbrnOcpaM+8LfOsoitCkpKnFCkVSqPSqrykmJIy7ZkVmbxtOVpmOlgTKFTGU3FT - aafyFBVpEGtgeJxWSS02iCd9qW9hTe5EtmNdpr1tHW7siumHe63p8bf7emv6U5+a7E99 - +owpfUnnnqyBquPp8faOpxPGpz/dmZMwUMVwQs/jZnsfToDH8Ua3xXwFLSVZdsdY/ss3 - 2xJsCe1/wOcoktvx1/Fachea2i+a2ttM7UtN7YtM7SFT+89M7QHTWDlTVuQx8ig5gy4c - 6XKqnCJb5GHyEDlRlmVJFmQmg5wa00+4JxiuT6V/HRDSJYvxkowdAkK8bSElKZTIsxQb - DGVG9xD0a/tqwV+jaH+fr8YwcW61JqrFqKX4wV9VbEVtOPcz//xiLd/pj8kwT5vi9GsJ - lbcGuhG3BgmrsY3x4yWGIw3UvTbjZNlNXy7z7t1iM976vVuCQUhfVWQtSpmRPLXEe40q - 9AMy5HX+82P9AYX+yrV7wY5nyWh2VOJ1aq/J/qTJ4PHPJ2J7nNgeJ7YjEdsHiNbRWod/ - fkDbMTqoTTQa+uhgb3XfhqM+OqRCqq+eSkjbtCpi1dpqFKV7Q59BoLMiO1RTGzHe4Xqt - T633ahtUr9JdHR/3I/JRg1ytervhqK8q0H3UXe/tqXZX+9SwN9jb2dLYdZWsBwZlNbZc - Q1aLMVmjIaszPu5HsroMcqchq8uQ1WXI6nR3xmWhb/H8YrJVoFuG4qBnwcC7l5kTyT0h - myNYHPfTNId1va2PXcACMNMpMoQ+PoZSMVzomumaSSQP88RJw4zvku9I1vXTHLY+LGAX - 4iQLoZMpaPAHLxmtZmdzc/PKFqpaVkLLSoJm4miOU5zQMsBMwfi/LcjbTgplbmRzdHJl - YW0KZW5kb2JqCjM2IDAgb2JqCjM0NTYKZW5kb2JqCjM3IDAgb2JqCjw8IC9UeXBlIC9G - b250RGVzY3JpcHRvciAvQXNjZW50IDc1MSAvQ2FwSGVpZ2h0IDY5NSAvRGVzY2VudCAt - MzE5IC9GbGFncyAzMgovRm9udEJCb3ggWy0xNzYgLTIyNyAxMDc2IDkxM10gL0ZvbnRO - YW1lIC9EUUJQSVYrQ2FsaXNNVEJvbCAvSXRhbGljQW5nbGUgMAovU3RlbVYgMCAvTGVh - ZGluZyAxMTEgL01heFdpZHRoIDEwOTQgL1hIZWlnaHQgNDcxIC9Gb250RmlsZTIgMzUg - MCBSID4+CmVuZG9iagozOCAwIG9iagpbIDM0NCBdCmVuZG9iagoxMSAwIG9iago8PCAv - VHlwZSAvRm9udCAvU3VidHlwZSAvVHJ1ZVR5cGUgL0Jhc2VGb250IC9EUUJQSVYrQ2Fs - aXNNVEJvbCAvRm9udERlc2NyaXB0b3IKMzcgMCBSIC9XaWR0aHMgMzggMCBSIC9GaXJz - dENoYXIgMzMgL0xhc3RDaGFyIDMzIC9FbmNvZGluZyAvTWFjUm9tYW5FbmNvZGluZwo+ - PgplbmRvYmoKMSAwIG9iago8PCAvVGl0bGUgKFVudGl0bGVkKSAvQXV0aG9yIChQcmVz - dG9uIEphY2tzb24pIC9DcmVhdG9yIChPbW5pR3JhZmZsZSBQcm9mZXNzaW9uYWwpCi9Q - cm9kdWNlciAoTWFjIE9TIFggMTAuNS41IFF1YXJ0eiBQREZDb250ZXh0KSAvQ3JlYXRp - b25EYXRlIChEOjIwMDgxMTE3MTg0NzE0WjAwJzAwJykKL01vZERhdGUgKEQ6MjAwODEx - MTcxODQ3MTRaMDAnMDAnKSA+PgplbmRvYmoKeHJlZgowIDM5CjAwMDAwMDAwMDAgNjU1 - MzUgZiAKMDAwMDA2OTExNCAwMDAwMCBuIAowMDAwMDAxMDk4IDAwMDAwIG4gCjAwMDAw - NjQ5NjMgMDAwMDAgbiAKMDAwMDAwMDAyMiAwMDAwMCBuIAowMDAwMDAxMDc5IDAwMDAw - IG4gCjAwMDAwMDEyMDIgMDAwMDAgbiAKMDAwMDA2NDYxNCAwMDAwMCBuIAowMDAwMDAy - Njk4IDAwMDAwIG4gCjAwMDAwMTM5NDkgMDAwMDAgbiAKMDAwMDAwMTQ1NSAwMDAwMCBu - IAowMDAwMDY4OTM5IDAwMDAwIG4gCjAwMDAwNjI5MzcgMDAwMDAgbiAKMDAwMDAwMTYx - MyAwMDAwMCBuIAowMDAwMDAyNjc4IDAwMDAwIG4gCjAwMDAwMTM5NzAgMDAwMDAgbiAK - MDAwMDAxNTM2NiAwMDAwMCBuIAowMDAwMDYyMDE5IDAwMDAwIG4gCjAwMDAwNjIwNjQg - MDAwMDAgbiAKMDAwMDA2NDY1MCAwMDAwMCBuIAowMDAwMDYwNDQ4IDAwMDAwIG4gCjAw - MDAwNjA5ODggMDAwMDAgbiAKMDAwMDA2MzY2MiAwMDAwMCBuIAowMDAwMDE1Mzg3IDAw - MDAwIG4gCjAwMDAwNjA0MjYgMDAwMDAgbiAKMDAwMDA2MTAwOCAwMDAwMCBuIAowMDAw - MDYxOTk5IDAwMDAwIG4gCjAwMDAwNjIxMDkgMDAwMDAgbiAKMDAwMDA2MjkxNyAwMDAw - MCBuIAowMDAwMDYyOTc0IDAwMDAwIG4gCjAwMDAwNjM2NDIgMDAwMDAgbiAKMDAwMDA2 - MzY5OSAwMDAwMCBuIAowMDAwMDY0NTk0IDAwMDAwIG4gCjAwMDAwNjQ5NDMgMDAwMDAg - biAKMDAwMDA2NTA0NiAwMDAwMCBuIAowMDAwMDY1MTEwIDAwMDAwIG4gCjAwMDAwNjg2 - NTYgMDAwMDAgbiAKMDAwMDA2ODY3NyAwMDAwMCBuIAowMDAwMDY4OTE1IDAwMDAwIG4g - CnRyYWlsZXIKPDwgL1NpemUgMzkgL1Jvb3QgMzQgMCBSIC9JbmZvIDEgMCBSIC9JRCBb - IDw0OWU2MjQzZGUwYzBiMTQ0NmRmMDQzNjRjNzc1ZGNlZj4KPDQ5ZTYyNDNkZTBjMGIx - NDQ2ZGYwNDM2NGM3NzVkY2VmPiBdID4+CnN0YXJ0eHJlZgo2OTMzNgolJUVPRgoxIDAg - b2JqCjw8L0F1dGhvciAoUHJlc3RvbiBKYWNrc29uKS9DcmVhdGlvbkRhdGUgKEQ6MjAw - ODExMTQyMzU4MDBaKS9DcmVhdG9yIChPbW5pR3JhZmZsZSBQcm9mZXNzaW9uYWwgNS4x - IHJjIDEpL01vZERhdGUgKEQ6MjAwODExMTcxODQxMDBaKS9Qcm9kdWNlciAoTWFjIE9T - IFggMTAuNS41IFF1YXJ0eiBQREZDb250ZXh0KS9UaXRsZSAoUmVwb3J0ZXJJY29uLmdy - YWZmbGUpPj4KZW5kb2JqCnhyZWYKMSAxCjAwMDAwNzAyNzQgMDAwMDAgbiAKdHJhaWxl - cgo8PC9JRCBbPDQ5ZTYyNDNkZTBjMGIxNDQ2ZGYwNDM2NGM3NzVkY2VmPiA8NDllNjI0 - M2RlMGMwYjE0NDZkZjA0MzY0Yzc3NWRjZWY+XSAvSW5mbyAxIDAgUiAvUHJldiA2OTMz - NiAvUm9vdCAzNCAwIFIgL1NpemUgMzk+PgpzdGFydHhyZWYKNzA0OTgKJSVFT0YK - - QuickLookThumbnail - - TU0AKgAALDSAACBQOCQWDQeEQmFQuGQ2HQ+IRGJROKQoViABCsQhoAiEKA8AhR2PF/ux - vuZ/t9quB/NWKy+YTGZTOaTWbTecTmdTucAYCAADHwwUEzlADGcLA8ABaISd/N9PLV9p - 5FKZ9op9PwAPqeV2vV+wWGxWOyWWCiAMAEQMRMgtihsJAANAABAKBAoEgB/gYDAAAgO7 - P9+v2/Pp9gB/PV7P4BP9/gJpt1+tMnHh8E5wOh/uCzZ3PZ/QaHRaOCT6gN5XA1vhsIv8 - NP8HA6BBII366wYAv+BbqB7x/P6BO94QJ4vMAMxsP1mDs0vcd1mt6TpdPqdXrdNIHEEp - I3lIBm0AbGBBQKwfgQjHboA+uB8DHQJ+ul2PwCPZ6gQ9Jl8npDqR9kO68AwFAcCQKh4G - LyBx2FsBp1r4AIDACDoQIEwC9Pe9iDt496/AC3qDH8wh8G2cR8sUf56BAKp6hAeh7gAe - kDRlGcaRqsxGDaBBJjmKwCDYAAIgmvQIAgv0jSO9MOt3DEMve3T1IOfZ2HcfgCnmeICD - uS58juqqrxtMEwzFMaIAUA4AAYdpcAadgEQjM4OhCgTbt2hbeQ/KEPTrPaCRCAB8m6cR - 9OKfx4BCKp7BCex8gAe0yUfSFIxkQw0gQRo8i0Ag5H+B64gCCIKIE3ML1FI9R1IgzeSa - 872Mc4E9ABKUqAKeksDkSZ8jkR5VH2R9JV/YFgs7NwAAVNQGnaBUIgQAAOBFCqfz4gkn - r1I1YWpKD0NwgZ+K0fRvnCfZ2ngfx2BEK57BEfCuHxYV3XfeCZj+MYDkOQAwAKPAAAhI - R/gi8sPT0f73IG9dryXUsLvVVdq1FgVq1gfR0nafYDHseACjaR58jaShXH2Sl45FkeSI - M0wEHcXIHHaBYDn+BR/g6Eq/AGAeCt288j4bhuGSVVGeYPVFW27WJvm+fZ1Hcfx0hHdA - RugrmS6lqdJDwLwDkAQ4ygKP4AAfIQAAkDE8YhDeISNalYT5D20oLbGdW2fJ0nSfQDnu - eIDDQRZ8DQTJZH4TOqcFwcZgLmwDzVlYGgSf4F2aEyBAIAsPz3DiC1hnODyTtW1WnVKB - rsgWiH2cBvH4cp1H8cgTCyewTH2wjD8J2faNIOQsgOPRGjUApCn+BshJCudSbTnudSfD - Gyc5gWCYd5GHc09+JHVup8bwMZDnwMZPFsfhPdr8HwrFCwC8SdoH8YBtmhRyK+z5O+2M - RuFp/hymd214/6/e+CtH4cI3X/DoH8OEE4Wh7AnH6cAwj4oGQNJoGoKYBg5iVDgAYRgA - HgECAmBxPCqlTtuaE8ZJbCyCNsYGz6EMHXnIfHwOcdA+QED6HkAcLwhB8BeFGLkfgo4H - Q9h8Q8ASHgCDsFwA8dgEQFD9KUBwFRenJPzIUbpV5DU7m9VVFZhL9FssOfsk8fZXB/Dj - G8P0bg5B/DcBUFwewKh/RSh/G+OBAgyBNAMGwTYdgDCTTQv0CgHW0J2Q1Fx+61FRJOZv - Id4jZyGJ3iqAAfA5RywwH4PMA4WA/j4CwKkXw/BUxxk8+JPQAx1C2AeOoCgDR+lxA2Cs - gQBX3QgQ4/GFDOWEIdka/dz0UZEPPj+3A3kXwAD9HIN0fw1xwD9GsC4L49wXNmk/M9qg - XAkAFDIKMPYBxNgAAXHwD8KJYwlZxFl+kWXLOeliteQktm1zgaE/pao9xyDiHwAkfo9A - EBTD2PcKYrhhD9FdNCgDJABDoFqA8dIFwHD9VCBsFjkUzv5Z252dMsn7SyQyb8hU6JCu - VkQnVtshx/j6UYP8csxBpGSGkDEMQ9wY0BpcsIKwQwCheFSIAA4oVilxH+BRZ6GZzLWi - 6zeNznXMNueS9GEjZFStBlxR9hI9hxjhHwAof09gnB3HuE4WYxh+izpfV9MYAhyiyAgO - YDQER+AXAABmhpQC8wpL0qyir+Jbl+mctKQNEYsPHYLIyQCsV2j+HNMQZpyRmg2DMPcG - 1YLGIzCeD0AgVxYCGAQKinJAgKgkkC/Wdzb6JV6kXFGRtTmfSGShaNgsHyBD2HEN+qY/ - x6gICQHMe4SBcjKH6LmxtuzrACHCLACA4wPATH4a8DILS/AGAVXmEEunPrai3R6Dz9rm - xUupZtgo+kXj/HONwf4xxqD9GODsNRzreXnNEEgG4BAoC3EYAgV4AAEm1H+BYE8UGFTe - ivUapLP6O17VHOeLE7rQRanVLijcWTgD1HENwe7jh7gJCGG8e4QxfDOH6L69GGyxgBG8 - K0CA4AQgWH4B4AAGLkAAAOAyv8Vb9zfv3f65kuSE1+kdAtdaFTAgML65y67lG1G8Hyo4 - AA6RuAAGCM8fowQgBuHuEDDmUSeBBBkAMJIvhIgJFsAABCRQAAXBTfxDrAqJ3Wc+5tVr - ya+tuH4YQAI+CtSOdlLQg60WvLMLpc+vipa/D0HCNse4DABYRB8GsewPhhjSH8MPKWjS - ZgBGyKoCA3ATAZH4s8DALiBYrrxOSutd8g56nYqhDg+XZZwdEzlO7oQHA5labUAA7KvE - FdDBih4BXQ6huciYgQ6sji7GWPwXYRg5D4CNo7ZBEwdgtAGEEYglgEi+H+AgpQAQL3Ic - 3qNs0W7SIfim0FnJ0B/6mMLqpkzwwJhKg0E3TdaiCpqIEOEQxAh/IvIKBSt8QWEPFlqh - keg3xsD2AYAOqYOQzj2ByMgaw/hkbJ4dRkaopwIjYBUBwfbkAL6avkUq6uNVU11Paed2 - BetyABH1nRPYAnHJACEQICIRyBANBhIIiA7xgkCG8HZOZuwJF5YDj+D8tx8HGABr4AAt - hjj8FsEsOw+Al8P6gQMGoKABg7GUJsBIxMVcc0zqKkCTIunn3EPkrQAeR3VADQ8B4OuX - BEIEA4HCFaHk1HWLEgQ4t5lA1Znh+GoMbEH3+NXgQBB9AKBoGQewNBmjZH8M3qOyAAjQ - FGBEaYLwQD7lYBbFN8682d5CQIedI8234uT28G5AgIBBIEA8HaFa3lhHEI4gQ6xVF3J+ - P8BLk2Db9xpyAgQ9zh6xG8AAWAwh+CwCiHsfAUfH5RBeCQAQNBnifAUMrtIDkPAYpaw2 - pzbU9OYN4O7IgArlnh1cvsH3pkK54NGNpH4AB5+Ogw+401EHPRTo9UDeiMBweCAWAGHy - ASBgDCHuBgpOH8Gk+at2ACGWFAAiGeBoBGH2BeAAAq2wASeC48qM5oN4Hg3sBKe+vkQo - QMGkCSIEH2Hi5czw30p+5+f2IUPOHwHeIEJMAAFWF+H4FWCsD8HwCtAUq+BSIwBcGqFE - AUGg7SAa+yBoIeeQYWYeWqVeHoUYAAA2EC9Q9aQEH1BmAAGo3YT2AkzwSazWwKWqzQqK - WoHqG8GmHsAUAGH0AQBYC8HsBYGuHCH+GvB+meACGME2AgGUByBQH5CWAo40AUVCwI46 - r+HsaiAgC+IEAwC0QGHmGeIEG2DcQqN2AeTPBc28/0VOrqbU5QHsHaIEHaG+AAFMF2H2 - FMC2EEHyC3DyjgBKA4ACBUGyFMAWGoQgAYQ8Ay9OT2o0z47BA2wO7IIEAMB+IEA+X0QE - HUFgIEHIEbGOdCAY7m88rw34o42+YSHoG6GeHsASAGH2AOBSjUBSG2HIH+G3FigcGCEu - AgGMB8BYH41dEILu3cwQxpE+unGIowVixMAABMEqQGHGEhBovivkWiAQcmues6VU7+qK - cuIGHqHWIEHdFOFAFsH2FADCEOHyDDHYfABCAyACBOG6FSAXDwAMAWPWAw/OzSv6nGue - SatGjaL86IAABcFkQGG2DiIEHoGcL0AW90AMZsz4bKl2rk36eYYSliPeHoHAGcHsAQAE - H4AMBMgMBMG+HOJTJCcGF2EkAgGCCIBiH4/SAmxSAWAy4+lg/1DKSYc606HiHqIEBQss - KAbAOoGoCnBPFI/mcjKM4826s8Z05QIQHqHQOCHCAAE2FkH2E2DMEWHyDNK8ZKA6AsAC - BGHAFYAYG2AEAKASNyAy9a93ESxmrm/yTy9A3sA+ES5jAoNIH5LoAAGmCYbcAgWYp8Ig - hOl8kQMIljBYQ5JtKgGaHsQiPoBICwHsBIHGHUH+HHMqXgFoEaAgF0CWBsH4CKH+AkuQ - ACAYeHA0kXH4xcnIIGHsXbAqDWPG6eNIHqGwIEG0DUL1KMACAdDCx+xkeOVZLiME5oly - N8HoHKMeHiHGACEqFcH0EqDYEeH0/fOiUkAyAmACA+HIFeAYG9M+ASLsA1GSz2IAAACA - AA/4NAoJBIPCYS/4IAYHBodA4HCoLDoE+n3BAWTIIGzNDJFI5JJZNJ5E7V3BHGiIIBAF - BAYB4S/oTEYLAoxFpHGIhF4nOYtO5/PIuAHq4GU9wIAH6AhCVnsIXO7X+55RWa1W65Xa - 9X7BYbFY7JJFciQetCiOn6SwAEhbBAaHaNJp3DZLO7vN7xPH2/IIAxjBBCgLLh5E5k9B - HUp4IB6aAASBZrYL1KL3dYVPoi83C/wC8XIAUgqn0kDik30ccRrddr9hsdlYgsEACG3O - sgY4gEBARMQ0QYfMYdQbzIoXFZzQeVDOLOYpBH7gAA+wrBBOmdnYnAg4I8GHBMnBchAu - bJH/NqJy4PEPPBPVfPRzou/QA9nAyHuAX8/n+EIqqmdR4H+dTtwPBEEwVBYAFQQgHlcK - 4fn6KIAAiuIAAaD75uczjMsyk71vg+R/vsAB5uoFhXuHBiTmyNCCHubyZJoACYIezbjM - wvrkR5HaSJsfx5G+fwBHmcwBEUUp9EUO5MH0O8WylKcqSqAAJgcAALnSWYHHKAYCgMAY - AA0ISHzG9cQPons2JGirkqEkp5nsggSk4x4MSshZpiehR8oKBoEIEmLLM3HyHoi9LzR4 - 5SDxEhTAPwZB8H8flKhAKp6hAdp5AAdsrVBUNRLGUI/AcVAvCKfwrwsFlABFRcOIan04 - qyjCFoQzUOome0/gADo/rkGUrHydaCGwLscIIBwFR44r2qLWqjADW9HxNXM3varSHH6e - Btn8AZ6nQARClCfRCj4Th9D5Ud23dd6CAgBkrnWWoHHSAgCALMYNCKwMx2krdqLq56H0 - c+WEJtOLlHufSCAoMmHiVKx5mgghvD0l6KgXQSR4UkVGrxNOFx7XWSrynabHub5iHwfZ - 9n+fQPioeoPngegAHheGd55BZNDyBxQjKJR/C9CwVrkEllYCrdn0RNc1TVQ1cgAfLqAZ - icyDFKx2FqghykqggDUIBMa6Yvbnujk017PH9HoOfp3GofoBnudwBj+Tp8j+QRQH2QWe - 8DwTEAaBIAAgdpcAedYCgIAYCH+DQjUGyNtq/XDj6W57mMq6rqAJYYABBjMqnKTaCHaW - GxMi8aj5BWfNWrzWEzogzAIG6h/9yjcRoK6k4owfs6Huc51HyfB8n+ewPinmp5nvE/B+ - l6atEmOgGk0Ngnn+MvD6QAAHBMu2EKH8jl/NtiGPfRWlvUfqbACfgLoIExJSsb/AROZS - CgQygApiR6jooY/noLUV8P8fB0k6EFgSQR3gAGPtvKArEoRBn4HNIGPseY9R+AFH0PoA - gehMj5D0IcUg+xDvUhVCtjj4B3C4AgOwAwBQAgFH+BsJJ5jKNUUeh12ZfVGsjfhDx1x7 - y+k7HqiYFRjoKILGyGogg+RyEcAMQQATCh/DxOkPMhQ9SFMOh4rci0F1sk5iGTeMrVCG - H9aWyQgp9h8DpHkPkeg9R/jzUwpoesCYvQrj8zwRobgGCTDkFUAAbAAAPBUvGRcRVDpu - jErJzLJ31NTkoQQej0AAJ2bEBJBRCxor+Oqp8AADIHu8Oax+NLA1lPskuUYzkln0yPOS - TYfcc4Oj7HyAQOolR8h1EYKgfYjI/zFVEAmKoCx3i5AgO4A5lIqgcLcAAAUO4xQCZDG4 - 5C0D0E+kirFXDBSdMIj2QQD53gAALBSgofA5iCDOBsSMCS8yhrabRGhEUrkQHKWuTibD - sCJEInuoiLEUR1DyH0PAeY/h3oAKmw0AEmpjUTQWIUNIDBGh6C0AAOQ/wHTrACBFV0rW - PldakyVtL61tRoIVSVDg93eAXDSQQCIQEFDwGMQQawVjAkVWY08gtLo1ENPijhtE3FnI - /VzK59Eb04y3ZcAYfg+gChvEiPkN4khWD7ftRSrxspnmSmWBEd0yB/qCA2R4AAA2zI5q - GrapUk2mnQqXUIfR1AHhQIIBaniCR0CmYuHZsTAIWvtkeSVRrCnMVARKwsopyZ8wRJPK - whg/T7D6HYPQfY6x3j+HUCMK49gRj5I2r6r9pyyB+DGAsQwgQwABDy+AFFNAXohlm2wn - Ftk2xEcufCWI/2XkCAQDkggHA2oKHAIYgg5hLGPh2AomlASIIguoiGVSPGFLRdhUue0k - nOyVaqO9hoBx/D7AMGoRo+A1CXFgPwS9qL4FeX2AAA47xdARHeAu8jhgNhNMCoJtM3ag - NMlYh+ult2SXSpVUZqY+h0wOk8AAFcTEEDYJCAAdwtiCAKiqACGcbaiNPwVdV11Aq6Uu - h6UKbNQcRLQMuTyNg+7Mj7HMOwf45gShYHsCUfZ9oH3xyASMO4XAFB/EQGcARhgGgnII - BIGd37wQVVotOw8r5tWKJItFW7Ch+IGOrg+CEYB7gLIIDMZKChohHIIPUapcmOgDYAtG - xVJzmofyxG3EjJbH5zsni8kg+B3j2H0Ah3QBgyCIHwGQTotR+CdyDo+tZMQC32AkO8mY - /AFgBA4n0f4A3DXaiOdCk59IBSXglqVN51MuwOHQQqB5yj1Dxi8AEGo2DA1tNgMmdZTo - uPgcNNRgD5yJ4FpZixkeCsoomxSfPAN27Hn2KIwOyGPh2wcHEOgf44QThaHsCd95TtIW - oDgFcBQdxHhsAES4Br4krg1J7qOb7lrcNMrgAAfg7oHDji+iSoRDB5M4AAC4Xh4gRmwH - 1vgAAzbauuAes2JsQK3HnMzsSWRD87wUz9LO6RIqhRGghREdzyHDD8AOF8Qg+AviiFyP - wUW4aJgCIGAQdwuQJjuAeAkfYDQAAbQqjbhzJ5/Ym3rONN2zrtxrgWPocB8GcYjbXOIA - I9YFgjMWhYH5sB5jPIINQJzBllz0YOojjNSnZMgUSfbj0QbHdlsR2zEh/t7DuHoP0bo5 - R/jcBUFwewKu4b95c4EMwUAEBuEyHMAgkZSglYeDqw+BuvQVqaTyb/Ht7EEH1vre2YGA - lEqPqhGMmgNLBAABgLhsB1orAANwNzGiCgK0/Bi7ERc6ocLuiDjqiSgyx8ks/Yca2E2M - uyQMew7R7D4AUAEfoCAsiAHwFkVAvR+Co7+4MioAx2i5AoO0CICh8gP52FMggBZ6LSOT - Eaxa294EE1W1UcJCTqbSyn8C7xInkZNDDOa2Jrxx+IAAOSYjDxgBsrp7iBhDtxkR8zsa - 3ZqD+JqiyQzTZo6QmxboeofwbAcIfwa4FoLwe4FreL6ZdoMIJYBANITwPAAi5oBhpQf4 - CgHyoaCRtbKsBQhqMAfAbaN5nS6bKjULoripXSD48QIZ+i5o14bgOYggdYVS5wggBDDr - 87FUDx87LTPL3yH7KxD6e6C7eaWBQwezkL4wAT5IKgPge4KgVoYIfoVsD5d4AQdYW4Cg - dYCgBgfKTwDYKT8L7yuY47UozAjAfiUgfIbrVz+beiAMFzLL9SB7xQAAFoWQ2AaiQxE4 - ZA8TDpxsQ53qbUBJ4C6yxxRhR7PkKrfr+L8qlqN7aAeIe4fwaQbsVIGIMQe4wcNRUILA - IgA4MAU4P4AoT6dJpQAACw4TZDd4rhqROBEwfMGx3RYziSRz3SpkSzj5NkUY+BEwe5jo - GgZw2AZqeIAAfQrCdJGrOCbSer3qbccaHjvyI8UR8q7Q4ruDUCMyNTtQnjFbj4eodofD - MYAYfwBIJwO4e4JwWYYwfoWcWJKYAQdAWoCodIC4Bwe4ChMgKgx4CK3ZbLUpp0eC7BnR - qobQ+CBplC70YCHzoUeL8wjAeSPoGrNqtbn4sAfyMAZMXgoQBzX6t8kMkbAScbBRkKC0 - mh18dEYKNTsalKgC7qCBIIeUVAZobAf0bIMwe8bUghBIKQH4AwLIVoQgAywABZWEXpyb - Fi3q3QhgfQcTyzpcGSbcQbycm8eJ8ZE6BYFoXDDbdgsJlYggaEFokSn8PJOBgjPEHccx - NyNJgLArxwgUUMQbEJRYeodge7MYAkfQJIOge4JIXAZIfsuEqA2QAQcoWYCwcwDICAew - C426voAwCcKMnsZ7oZ3SBga4gQfodiH7jbfkcryCR8ebqDFSMptIeqTQEh05CxMwsQeA - YIgga70qagiIBjT81D3joRRjFTZ0tI+C7JqZaLtRtKxbaK68S8LR9j+DizaAeQfAf4Y4 - agfwY4HYNQe4HczA14JYHIAwKYWgRQAwVgAABQEAggC6HKcEwiyhRKM4hSTQe4aQ+CBb - eUjxWricizykKal5XwDYPoggDBowsQdAUYggb50hxzDbXAuzF825Dkiiobi7jzEkaKCr - jpNJRTLUKi8AegdQe4ewBgAwf4BQIgOAe4IgXoZofoXs9osgAIcQWACwcgDoCYewDRMi - voA468sy3hkofk2CiIawi4jdFrEE6pZzibo7Ubo1LUn8H4t4L6cwPYsYcAQoggc4TBsS - HZ/sHTjibypTWE2wmqorjAm9E7Ok7c71L4o7ANOgpxEwehhwYIZ4foYIIANwe6m1IAr4 - IYGYAoJQXgSAA4Wof4BJDYAIDLrq3SHqb4fIb7y0QNTxEhWkdMHptsPMmtLQjC4M+8II - AAE0IYsIbKmbDAWkJcShytUxg1OUsBtik870wNPL2TeL2ySBacK5WTKYeYdQfAewBtGo - BQHwNYewHwYYaQfw8NRwrIAIbwVoC4cAEICweoD1JcJZ+boskD2oggfDWw6qKddk3Dob - d6AUJzKcnJQxka3QfhEwATdgFoWIsYaStQeoaMJbACGghDyj3aVpD0vjojozFEBFZLEr - Kkw0nrjYy78rF5SzNZhwXgZgfgXgIoOIfCUVbokgHYFoAgIQYgSwBFH4BNc4AADLnsQj - 2UUiiNArezLz872dnKMMBVB1i8Hlo0GDGBhQfLhwGgZgsYZQFw6Qd7DbX4AdhrWETNYp - hbF5NUc5NrPcGMLZk1osTUeQgYeYdIfAeoBoA4f4BYHIM4ewHIZAawf0SVlQh4bIVQC4 - bgEwDIepWADUSABIDaR0m7yp5TrT5DfFjtXtpKbs2jo4zaIboL2FiLK1yiNSDYggG1eA - AZjorIfjgAZaRooQBbhxQkcNzVhsA5HUCEBrjquU09YVO8HNxycET8mxkVj7qJhwWwY4 - fgWwJYOwfCadRwGwFIAgHYZITQBAYgAABADgj6vskLEwiYfyBoe1p6CDgDzb9Ir0vdBU - n9zMtBEL+IebgAF9H4yTgorQeteAaUrooQBjMjojZbEs6VslsUZ9/FVVnNPrxr2kZi7J - qVZwfNtltwBYGgMgewGgZobMpczAAIaoVADAbAFQDYeh8QDKvoBQul/17LNbM6CFA7tj - jViETDKl8F61yZ2MKrilpIeyBYEwUBeMu4rIdwXQggbJiIf5QgAIBTn9VBXV8TzlZUGM - nbtKgCfF/ji9VVEa3LKJRTaL9xEweojYWIYYfgWIKAPQfCvUNQF4EgAQGgZ4T4BQZQAI - BADRagDYLckS7CBIf4erM4/l70tWF1rks8i8Hd3GFsv1EK7lytiwnce4ggDoQk/QLIrY - c7RwAAcAQIl5QgBF0JzdhmF9h0/svtpMZrecBljj3UrzPRN86iSye73LAb31tOBAmdGw - GAMIe4GEVUVLlwAIaAUgDAagF4D4eiRYDMSABYEMHqBCTFvGOlzGF0kGQFKF8uItZdQG - TOZxgIfJXwCU44DJ7orQcoSAxj6QAESq+jDtoUBdo82seU5o91ndBFYNLOUbjTA5zVjM - wS7dfwggewwAVYX4fgVYKwPwfF6q+IFQEAAQF4agUYBQZ4AIA4DIgYDlMl3JPyTAYqLs - vlT9E58l/S6mIjYUnmc8tiV6cKoAjSKJP9fmZwA9Xd/lZY4+QmdEBVr8Kzx8K8LMAlpE - wYlFr6ygh1tIfQeoBdGoBIFoL4ewFoawcAf9Kq04AIZgUIDAZ4GYEQegF4f4DMiAAIBc - RSNZXweuiiCDXtBOsNP1dsr+sSWjPx9b4NMGPloJt9PSxlEE5+AauKpM1CNk5lrZk+ji - oV8Rttebx6x+uLyw6ge4+wUwXYfYUwLYQQfOOCigEoDgAIFQbIU4Bgah/4CwgYDwMYno - wAf4el6A/iLSerEFBktePW08cmTEnBbTFdYVL2s+uVswheu46c6eQIitDjSI+WGKNzAs - 7Y52tVsYk1ErUKMhkVFgorWGU1/eu25hg9yV2gvFZwfYeoBSGwBAFLvQFIbYcgf8GyP4 - Y4ToDAZgHAEwegGYf4DGq4Bi2Z3oegY46TL0mswMwh87Bmc+KW2VVmZNMGJUmmjW4ExG - 2xqqA92dyAjBfNNqNoistetEn2QY82tNo+I+tjUdEu0zzuOM6rOkxAhYfgjAe4wAUIW4 - fYUIMAQwfIMCFQEWNoFAbgVIBgax/4CggYDoM6oAewZaByKbyTBG1GPUJy29L21+Tmsl - 1dw9pAfxEwfCBohYhYA1dQBSRoBZ74ATX7Nme4ald0stVQA5ju3V/+PPDk6uUvCi2+nc - TdsFPzKWTOGNoPNoo4eYdm6oBIpoA4EzbgEwb4c4f9URwQYITIDAYwHwFQei4gDD8BDK - kYe5iyBEQNy9P+eJDu4+PmZiAO1sKtYabfSuj98Bascuu+Q51wBYGAggEYRTDerQsAfd - qgAAb70Qdr1D84A5GucOALUliWvXClinBjeMc7ANssUWULsUvpOFOU2T9RhWwoAATYWQ - fYTYMwRYfLC5eAD2zIEgcAVoBkjYAoCYiAD4NbyxGaiLrVD8w8vzUyld8ikxt1FybNFH - IJhXUYf4yIDb1bnZGAgTYI2IdoW5i5KI6rhAhgBLN91XIpXWnCw1VedvAFjOKJ9WE+ur - FaykxG4IAAegdgfgew8oAoEi0IEgcQdQf8sZdoXYSgDAYIIgF4ekFoC7noBVJRE48Ih2 - mt8ethH2FmPXS4zG4Qu+4EBMaPJ73R479Q6gEpsJK8/hKge79oAAaSUR4RpfgqK1YmnJ - WVQNBLj2mNFzBHYetdsztuU9o4fXJgmwSwVwfYSwNYR4fPcRUADXb4EAcYWABobyaoB/ - G2znjAXw+CVHndBk6G/pNvI9xG2VoHnN82kAoWu9GQggCa/yTb/hd1C5i7/IhgAqHY8r - K+UGJ0sHhXOA9G5nMWusmtemmcTIy4egdfjYAomIAYEQqQEQcwqydxKYWwR4C4XYJIGg - eoIkXtToAJT5EpTsKV1ejHTnCXwe+8oGdKx6SayL+SH/iCNIfRXwAMPAFwXL8MiRnoaq - jYAAeIYRpYBV0MecHviqCcHK3GsmttfKulY/YypHSXYvBDrw9M2htHso0B5IgABSKrfS - ROCSfRwAELhkNh0PiERhoXCIBDjmWIOcICAoNAQACo2hb7c8PAMMf7/iQAlMLk8Llsrl - UymENmcRmM3l8smYBl8xm0MAM3oMOoFEoUwmb4e0LDJphYdOcrqlVq1XhbwYsLaxXlEL - BIIhYCnc7mc6m9npAAoc0hj+l1mr8spNvmsutcxnd0nkmtUunFzvU7uGAllwejsfj2Ac - nAIhKr2ELpd7/dNYzEOV6LCy1KA4exKAARG8sAdNn0Nn9ph9ou8quGOiFnmsqvdGmW0u - dsoz/2Op1tK3eEusRfz9hb3e8LEqVhYTJGZ6XTiL7eELZYsuYHA0LAgE1uFiXil9m8XF - oHB39U3102243mz4XBtlIwes1+1tk/lD5fh/AEfQAAERhTn0Rg6ksfQ6uoqoKAeAAMnS - WYIHIAQCAQj4IhCwz4Pooq7w83a+LlEcTN7D6cMK4D0vlFLhoW47kuWAAYF+hYEA9Bsd - x4ZocIWfJxoWAwCu88D4r5D61tUwqdRHJcVpQnqfvOuazLWtq+yQo8Otc16exA2bkHqd - p/OWuB/BAKp6hAdh4gAdkeIcVRDAqV4qh6e4oAABoQRwBz5xc3jdS3JclylLqiqJMEQr - 5Q0wpMlEVyour2odFiZn8wp8uQAAbGsuM5VEzJrC8rJeoWAsjgM7stJtRkYog4irS5JE - SUQ/K8Rc8z2K+nS9vwvVcNuux/HzTUAwGQ5Rn0Q49E0fQ9TkCIGpAdZaggc4B22AYAAm - Ezi1wiT7TBR8UKuvNDsFYdiUdSEX1zQr5nupoABkZMhgpUd9qsaAhoWexsVTVoC26w1h - N3dVY0ut9YQ8/D40tYFBRBcj1w63CUvfLElp3TqWntMp7n65B+A+Kh6g+d55gAd7qFIQ - ILFULYhHsKoAAYDSwAqwSVSc2csXFRVZUJV+DpavcrxjKdG4q9Dw17S7VuSeqFhMTyFg - iH9+a4hx+nwhZlBOmB+IWA4DoXbcur+u+lP2u1aY5E9eSSAFJp437y0zuWmvpLMW761e - L6+44Bn2AABkET59EEP5PH0P7MAeBYAAkdhbAgdQCW6AZ/gmFK2AEj9XaKwMk7dRdE19 - pFMYx0q5vJoEYKNKstqFoufr4fR8qcN6Fg2NWu+EAB5mghZpiZXQAASBUTqBEss6M+qs - bZW75JTvL54nJUQ+jhXvOE+9I7gmy4Hudp/nwfMBHxNU2Hjqs3qoTo+AmUYxCOfIuAAB - YMoWAsCyjXqnsYU3VQLpkwrmgSa13K73pEOdqh5qZd1NFjA+QsFosSxpFeGqIbweyFjo - FCkZIcHCcMQXMix2rbjVLDYUpY+DdDgKObulp6Lpm/wKPQlEr4/B7j/H6ARsoAw+ibHy - H0Qgoh9iEIiA0BIAAIDsFuA4dQBgCABSK58lgAVurtMOuhdT2DeIldOz1UK8YDH0YhGV - L5dYctRjY9InY+EaAYDQQsDxU4OnUHgMQrgWCHgIie9NqRMHYohYgeWCLCYapJkaW9Tp - wG/u3RcwgvpsD9m3Z8oN1ZcWmKuh47QAA+B3D/HyPZsCbGUJ+IgH0MACBCCCDGASED/X - /wBaO6s96HyhwFXS2s3MEo0upbrA2Q0Z3AQQUrDWZLPx/tlAA+shYKhWELAaDCPZVR+M - sAANFf80RzJDbQ4h0cLIyF5ke+Q4o/mHENlCYOY7TZNwzfK+OGz33qw6dOAFKrGm3gAM - XM8AhyACBqEaPh4JDwBjeFYA8b4IQLj9A6AACgKyXJHhafOZLsi3TEhPPZwEloHonb6o - eRb2lxLtkOpZSw/lqgABEIlrIQJskMHuN8hY3HfPEGcqmDgA4OPbYfMt10657HkjWlZc - UKVJRnUcrAvShHtpZnZUUlcoZhoxHkpoYQ0R+jCIgA4fIvwGjsAMAgA6RQJAoJ5LuSsB - VETzds3WQ6UjYq2edVBRTHWoPjYkiWZrT1zxsmekBsBIJAAAA+Hw7zlEGkxHQJ8hY4RD - oxRoAVVoBITVNkIZhiSIFZ0frxPF6JJ65T6bbUs9ytob0odW9lvsyl5MRIYNoao/RxAW - IrS9AZDAMj+GEAwcYAQDALJOBFcDC1Dl/mM0KBjFJKwOudGqBClGMRme68qqtrHyQTsI - p0fjhy2KAT4DMhYCqLP8vSAOQY9RqkLvcQsejxpRjeJc6MAsHABMGnhF+0ZD3apev63Z - dEjT8UqPFO27ryrA2pV22yYhZSlV3koREZozB+DeBgCQAUF1UkMA+PEXQDRpgOAWhhb1 - 6Y0sRwTGCYOAFKzuXDa5VzpqPLEhhYCT9T1BXek/DCjOQCYKdgqABkmQ25nlYMAN0boo - BEmutCzGc8YY3WozjVLtWLUV/bg61hdc3rOnWCw6qWMl5K/IWOQbw/R3F0sOABVoAAQj - FEwAwXIOqLQXAk6BxGccbVwgPW8t1sWh4MxtaC7Fo1anjsE7kolK5E4LnvUSf6SZnaRk - RMDSuAczX/qwsO1V/56q2tRpbB6gW9aJwroxvxL8itVAALEYY/BcEMowB4KQPgBh8FaI - UBIYQAAIAmSwBoHNRaLP0bKS5dNlYNv7jnQKl2fSPerF5QMzq6pN1Xd5WaXoETDx/BHH - 5PVCUiyuTeutUG2JZy9ivb+DJmQontautx+t6xpbcW2MRPrvHFn5Da1o5Bwj9HuBwCQA - gEhTD2PcMRxQLlkAAEQbgqQFiYBABkAICgAgOBAScA6EI1aAyxYPQq8D4Uez/YJiNSVX - Rkr2rJhNz5/q1cBCrlTQcAbxqdugla7dFt8ulzrTOm3upQ5uoKvXMcHQ2OMX6UY9TfAH - H6P8AI1hwD+HGC4L49wZEQAYQwGQLAQgCDKM0ToCgtX534AwDZQwDgS5nswqtG9A77RZ - y+5rzoHaO1RzLHi8MvbP6FYTdONJLc25JMjA+iMv6hnpOrTVQ9REoU6uO65u6V6ftXPS - AZdK72mKFv8ho9x6KaAGPwlWRx+g2DKPcMA1Bvj+FeRBgwAANkMCGEIGQAwvivEMAgHm - JouD/AGAfqgBgHEnAHnHa3I0RXZ2j5bd27249HdVdLbHio4cux70qz3fOl95+m9xHdJ+ - TfU/HqYiWUldmtH7OweQ8iUgP40AId38h8hUD4PgR4vxnh+hLCGByiqHmjmCGAgAQAMA - Agjg/AwADAbAtgjACAJEiPHqawLwMQMwNQNwOQOwPF9h9B9jfBShdB+BwhBBQB9BQBwB - 0B/hYCGBtqbCsLyKYCGLzCFgXlqM5AUgPgBALAQgMgBAGFVPJnhO6QPwkQkwlQlwmQNB - +GShvhzh/B2urB/Brh4B6AABliGKeiFr7CFpuEGwCgAALsQLfCGQaITHRwmw2Q2w3Q3w - 4Q2DxLxAAB5CGJwrJiGB1CGF6muPapBgAQxpxrevLw4xDRDxERExFO5nyHeGAQZCFvKx - FxJxKRKxLRLxMRMxNRNxOROxPRPxQRQxRRRxSRSxTRTxURUxVRVxWRWxXRXxYRYxZRZx - aRaxbRbxcRcxdRdxeRexfRfxgRgxhRhxiRixjRjxkRkxlRlxmRmxnRnxoRoxpRpxqRqx - rRrxsRsxtRtxuRuxvRvxwRwxxRxxyRyxzRzx0R0x1R1x2R2x3R3x4R4x5R5x6R6x7R7x - 8R8x9R9x+R+x/R/yASAyBSByCSCyDSDyESEyFSFyGSGyHSHyISIyJSJx4iAgAA8BAAAD - AAAAAQBxAAABAQADAAAAAQCZAAABAgADAAAABAAALO4BAwADAAAAAQAFAAABBgADAAAA - AQACAAABEQAEAAAAAQAAAAgBEgADAAAAAQABAAABFQADAAAAAQAEAAABFgADAAAAAQEh - AAABFwAEAAAAAQAALCwBHAADAAAAAQABAAABPQADAAAAAQACAAABUgADAAAAAQABAAAB - UwADAAAABAAALPaHcwAHAAAD9AAALP4AAAAAAAgACAAIAAgAAQABAAEAAQAAA/RhcHBs - AgAAAG1udHJSR0IgWFlaIAfYAAEAHwAOACwAIGFjc3BBUFBMAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAD21gABAAAAANMtYXBwbOoCxvvn7AuJW4CIyiOWp2wAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAADnJYWVoAAAEsAAAAFGdYWVoAAAFAAAAAFGJYWVoA - AAFUAAAAFHd0cHQAAAFoAAAAFGNoYWQAAAF8AAAALHJUUkMAAAGoAAAADmdUUkMAAAG4 - AAAADmJUUkMAAAHIAAAADnZjZ3QAAAHYAAAAMG5kaW4AAAIIAAAAOGRlc2MAAAJAAAAA - Z2RzY20AAAKoAAABAG1tb2QAAAOoAAAAKGNwcnQAAAPQAAAAJFhZWiAAAAAAAABxDgAA - OesAAAOdWFlaIAAAAAAAAF8vAACzygAAFlBYWVogAAAAAAAAJpgAABJgAAC5OVhZWiAA - AAAAAADzzwABAAAAARhic2YzMgAAAAAAAQwaAAAFwP//8v8AAAdgAAD9zv//+5j///2W - AAAD9AAAv05jdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAGN1cnYAAAAAAAAA - AQHNAAB2Y2d0AAAAAAAAAAEAANF0AAAAAAABAAAAANF0AAAAAAABAAAAANF0AAAAAAAB - AABuZGluAAAAAAAAADAAAKPAAABUgAAATMAAAJuAAAAm9wAAEXsAAFAAAABUAAACMzMA - AjMzAAIzM2Rlc2MAAAAAAAAADURFTEwgMjQwNUZQVwAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAbWx1YwAAAAAAAAASAAAADG5iTk8AAAAYAAAA6HB0UFQAAAAYAAAA6HN2 - U0UAAAAYAAAA6GZpRkkAAAAYAAAA6GRhREsAAAAYAAAA6HpoQ04AAAAYAAAA6GZyRlIA - AAAYAAAA6GphSlAAAAAYAAAA6GVuVVMAAAAYAAAA6HBsUEwAAAAYAAAA6HB0QlIAAAAY - AAAA6GVzRVMAAAAYAAAA6HpoVFcAAAAYAAAA6HJ1UlUAAAAYAAAA6GtvS1IAAAAYAAAA - 6GRlREUAAAAYAAAA6G5sTkwAAAAYAAAA6Gl0SVQAAAAYAAAA6ABEAEUATABMACAAMgA0 - ADAANQBGAFAAV21tb2QAAAAAAAAQrAAAoBAwNzNTv9zMAAAAAAAAAAAAAAAAAAAAAAB0 - ZXh0AAAAAENvcHlyaWdodCBBcHBsZSwgSW5jLiwgMjAwOAA= - - ReadOnly - NO - RowAlign - 1 - RowSpacing - 36 - SheetTitle - Canvas 1 - SmartAlignmentGuidesActive - NO - SmartDistanceGuidesActive - NO - UniqueID - 1 - UseEntirePage - - VPages - 1 - WindowInfo - - CurrentSheet - 0 - ExpandedCanvases - - - name - Canvas 1 - - - Frame - {{2002, 20}, {1215, 1180}} - ListView - - OutlineWidth - 142 - RightSidebar - - Sidebar - - SidebarWidth - 157 - VisibleRegion - {{-4.5, 0.5}, {522, 535.5}} - Zoom - 2 - ZoomValues - - - Canvas 1 - 2 - 4 - - - - saveQuickLookFiles - YES - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender-Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender-Info.plist deleted file mode 100644 index 976687e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${EXECUTABLE_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - crash_report_sender - CFBundleIdentifier - com.Breakpad.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${EXECUTABLE_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSHasLocalizedDisplayName - - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.h deleted file mode 100644 index c0728ca8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// This component uses the HTTPMultipartUpload of the breakpad project to send -// the minidump and associated data to the crash reporting servers. -// It will perform throttling based on the parameters passed to it and will -// prompt the user to send the minidump. - -#include - -#include "client/mac/Framework/Breakpad.h" -#import "GTMDefines.h" - -#define kClientIdPreferenceKey @"clientid" - -extern NSString *const kGoogleServerType; -extern NSString *const kSocorroServerType; -extern NSString *const kDefaultServerType; - -// We're sublcassing NSTextField in order to override a particular -// method (see the implementation) that lets us reject changes if they -// are longer than a particular length. Bindings would normally solve -// this problem, but when we implemented a validation method, and -// returned NO for strings that were too long, the UI was not updated -// right away, which was a poor user experience. The UI would be -// updated as soon as the text field lost first responder status, -// which isn't soon enough. It is a known bug that the UI KVO didn't -// work in the middle of a validation. -@interface LengthLimitingTextField : NSTextField { - @private - NSUInteger maximumLength_; -} - -- (void)setMaximumLength:(NSUInteger)maxLength; -@end - -@interface Reporter : NSObject { - @public - IBOutlet NSWindow *alertWindow_; // The alert window - - // Grouping boxes used for resizing. - IBOutlet NSBox *headerBox_; - IBOutlet NSBox *preEmailBox_; - IBOutlet NSBox *emailSectionBox_; - // Localized elements (or things that need to be moved during localization). - IBOutlet NSTextField *dialogTitle_; - IBOutlet NSTextField *commentMessage_; - IBOutlet NSTextField *emailMessage_; - IBOutlet NSTextField *emailLabel_; - IBOutlet NSTextField *privacyLinkLabel_; - IBOutlet NSButton *sendButton_; - IBOutlet NSButton *cancelButton_; - IBOutlet LengthLimitingTextField *emailEntryField_; - IBOutlet LengthLimitingTextField *commentsEntryField_; - IBOutlet NSTextField *countdownLabel_; - IBOutlet NSView *privacyLinkArrow_; - - // Text field bindings, for user input. - NSString *commentsValue_; // Comments from the user - NSString *emailValue_; // Email from the user - NSString *countdownMessage_; // Message indicating time - // left for input. - @private - int configFile_; // File descriptor for config file - NSMutableDictionary *parameters_; // Key value pairs of data (STRONG) - NSData *minidumpContents_; // The data in the minidump (STRONG) - NSData *logFileData_; // An NSdata for the tar, - // bz2'd log file. - NSTimeInterval remainingDialogTime_; // Keeps track of how long - // we have until we cancel - // the dialog - NSTimer *messageTimer_; // Timer we use to update - // the dialog - NSMutableDictionary *serverDictionary_; // The dictionary mapping a - // server type name to a - // dictionary of server - // parameter names. - NSMutableDictionary *socorroDictionary_; // The dictionary for - // Socorro. - NSMutableDictionary *googleDictionary_; // The dictionary for - // Google. - NSMutableDictionary *extraServerVars_; // A dictionary containing - // extra key/value pairs - // that are uploaded to the - // crash server with the - // minidump. -} - -// Stops the modal panel with an NSAlertDefaultReturn value. This is the action -// invoked by the "Send Report" button. -- (IBAction)sendReport:(id)sender; -// Stops the modal panel with an NSAlertAlternateReturn value. This is the -// action invoked by the "Cancel" button. -- (IBAction)cancel:(id)sender; -// Opens the Privacy Policy url in the default web browser. -- (IBAction)showPrivacyPolicy:(id)sender; - -// Delegate methods for the NSTextField for comments. We want to capture the -// Return key and use it to send the message when no text has been entered. -// Otherwise, we want Return to add a carriage return to the comments field. -- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView - doCommandBySelector:(SEL)commandSelector; - -// Accessors to make bindings work -- (NSString *)commentsValue; -- (void)setCommentsValue:(NSString *)value; - -- (NSString *)emailValue; -- (void)setEmailValue:(NSString *)value; - -- (NSString *)countdownMessage; -- (void)setCountdownMessage:(NSString *)value; - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.icns b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.icns deleted file mode 100644 index e8c21242..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.icns and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.m b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.m deleted file mode 100644 index e3889761..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/crash_report_sender.m +++ /dev/null @@ -1,1264 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import -#import -#import - -#import -#import - -#import "common/mac/HTTPMultipartUpload.h" - -#import "crash_report_sender.h" -#import "common/mac/GTMLogger.h" - - -#define kLastSubmission @"LastSubmission" -const int kMinidumpFileLengthLimit = 800000; -const int kUserCommentsMaxLength = 1500; -const int kEmailMaxLength = 64; - -#define kApplePrefsSyncExcludeAllKey \ - @"com.apple.PreferenceSync.ExcludeAllSyncKeys" - -NSString *const kGoogleServerType = @"google"; -NSString *const kSocorroServerType = @"socorro"; -NSString *const kDefaultServerType = @"google"; - -#pragma mark - - -@interface NSView (ResizabilityExtentions) -// Shifts the view vertically by the given amount. -- (void)breakpad_shiftVertically:(CGFloat)offset; - -// Shifts the view horizontally by the given amount. -- (void)breakpad_shiftHorizontally:(CGFloat)offset; -@end - -@implementation NSView (ResizabilityExtentions) -- (void)breakpad_shiftVertically:(CGFloat)offset { - NSPoint origin = [self frame].origin; - origin.y += offset; - [self setFrameOrigin:origin]; -} - -- (void)breakpad_shiftHorizontally:(CGFloat)offset { - NSPoint origin = [self frame].origin; - origin.x += offset; - [self setFrameOrigin:origin]; -} -@end - -@interface NSWindow (ResizabilityExtentions) -// Adjusts the window height by heightDelta relative to its current height, -// keeping all the content at the same size. -- (void)breakpad_adjustHeight:(CGFloat)heightDelta; -@end - -@implementation NSWindow (ResizabilityExtentions) -- (void)breakpad_adjustHeight:(CGFloat)heightDelta { - [[self contentView] setAutoresizesSubviews:NO]; - - NSRect windowFrame = [self frame]; - windowFrame.size.height += heightDelta; - [self setFrame:windowFrame display:YES]; - // For some reason the content view is resizing, but not adjusting its origin, - // so correct it manually. - [[self contentView] setFrameOrigin:NSMakePoint(0, 0)]; - - [[self contentView] setAutoresizesSubviews:YES]; -} -@end - -@interface NSTextField (ResizabilityExtentions) -// Grows or shrinks the height of the field to the minimum required to show the -// current text, preserving the existing width and origin. -// Returns the change in height. -- (CGFloat)breakpad_adjustHeightToFit; - -// Grows or shrinks the width of the field to the minimum required to show the -// current text, preserving the existing height and origin. -// Returns the change in width. -- (CGFloat)breakpad_adjustWidthToFit; -@end - -@implementation NSTextField (ResizabilityExtentions) -- (CGFloat)breakpad_adjustHeightToFit { - NSRect oldFrame = [self frame]; - // Starting with the 10.5 SDK, height won't grow, so make it huge to start. - NSRect presizeFrame = oldFrame; - presizeFrame.size.height = MAXFLOAT; - // sizeToFit will blow out the width rather than making the field taller, so - // we do it manually. - NSSize newSize = [[self cell] cellSizeForBounds:presizeFrame]; - NSRect newFrame = NSMakeRect(oldFrame.origin.x, oldFrame.origin.y, - NSWidth(oldFrame), newSize.height); - [self setFrame:newFrame]; - - return newSize.height - NSHeight(oldFrame); -} - -- (CGFloat)breakpad_adjustWidthToFit { - NSRect oldFrame = [self frame]; - [self sizeToFit]; - return NSWidth([self frame]) - NSWidth(oldFrame); -} -@end - -@interface NSButton (ResizabilityExtentions) -// Resizes to fit the label using IB-style size-to-fit metrics and enforcing a -// minimum width of 70, while preserving the right edge location. -// Returns the change in width. -- (CGFloat)breakpad_smartSizeToFit; -@end - -@implementation NSButton (ResizabilityExtentions) -- (CGFloat)breakpad_smartSizeToFit { - NSRect oldFrame = [self frame]; - [self sizeToFit]; - NSRect newFrame = [self frame]; - // sizeToFit gives much worse results that IB's Size to Fit option. This is - // the amount of padding IB adds over a sizeToFit, empirically determined. - const float kExtraPaddingAmount = 12; - const float kMinButtonWidth = 70; // The default button size in IB. - newFrame.size.width = NSWidth(newFrame) + kExtraPaddingAmount; - if (NSWidth(newFrame) < kMinButtonWidth) - newFrame.size.width = kMinButtonWidth; - // Preserve the right edge location. - newFrame.origin.x = NSMaxX(oldFrame) - NSWidth(newFrame); - [self setFrame:newFrame]; - return NSWidth(newFrame) - NSWidth(oldFrame); -} -@end - -#pragma mark - - - -@interface Reporter(PrivateMethods) -+ (uid_t)consoleUID; - -- (id)initWithConfigurationFD:(int)fd; - -- (NSString *)readString; -- (NSData *)readData:(ssize_t)length; - -- (BOOL)readConfigurationData; -- (BOOL)readMinidumpData; -- (BOOL)readLogFileData; - -// Returns YES if it has been long enough since the last report that we should -// submit a report for this crash. -- (BOOL)reportIntervalElapsed; - -// Returns YES if we should send the report without asking the user first. -- (BOOL)shouldSubmitSilently; - -// Returns YES if the minidump was generated on demand. -- (BOOL)isOnDemand; - -// Returns YES if we should ask the user to provide comments. -- (BOOL)shouldRequestComments; - -// Returns YES if we should ask the user to provide an email address. -- (BOOL)shouldRequestEmail; - -// Shows UI to the user to ask for permission to send and any extra information -// we've been instructed to request. Returns YES if the user allows the report -// to be sent. -- (BOOL)askUserPermissionToSend; - -// Returns the short description of the crash, suitable for use as a dialog -// title (e.g., "The application Foo has quit unexpectedly"). -- (NSString*)shortDialogMessage; - -// Return explanatory text about the crash and the reporter, suitable for the -// body text of a dialog. -- (NSString*)explanatoryDialogText; - -// Returns the amount of time the UI should be shown before timing out. -- (NSTimeInterval)messageTimeout; - -// Preps the comment-prompting alert window for display: -// * localizes all the elements -// * resizes and adjusts layout as necessary for localization -// * removes the email section if includeEmail is NO -- (void)configureAlertWindowIncludingEmail:(BOOL)includeEmail; - -// Rmevoes the email section of the dialog, adjusting the rest of the window -// as necessary. -- (void)removeEmailPrompt; - -// Run an alert window with the given timeout. Returns -// NSRunStoppedResponse if the timeout is exceeded. A timeout of 0 -// queues the message immediately in the modal run loop. -- (NSInteger)runModalWindow:(NSWindow*)window - withTimeout:(NSTimeInterval)timeout; - -// Returns a unique client id (user-specific), creating a persistent -// one in the user defaults, if necessary. -- (NSString*)clientID; - -// Returns a dictionary that can be used to map Breakpad parameter names to -// URL parameter names. -- (NSMutableDictionary *)dictionaryForServerType:(NSString *)serverType; - -// Helper method to set HTTP parameters based on server type. This is -// called right before the upload - crashParameters will contain, on exit, -// URL parameters that should be sent with the minidump. -- (BOOL)populateServerDictionary:(NSMutableDictionary *)crashParameters; - -// Initialization helper to create dictionaries mapping Breakpad -// parameters to URL parameters -- (void)createServerParameterDictionaries; - -// Accessor method for the URL parameter dictionary -- (NSMutableDictionary *)urlParameterDictionary; - -// This method adds a key/value pair to the dictionary that -// will be uploaded to the crash server. -- (void)addServerParameter:(id)value forKey:(NSString *)key; - -// This method is used to periodically update the UI with how many -// seconds are left in the dialog display. -- (void)updateSecondsLeftInDialogDisplay:(NSTimer*)theTimer; - -// When we receive this notification, it means that the user has -// begun editing the email address or comments field, and we disable -// the timers so that the user has as long as they want to type -// in their comments/email. -- (void)controlTextDidBeginEditing:(NSNotification *)aNotification; - -// Records the uploaded crash ID to the log file. -- (void)logUploadWithID:(const char *)uploadID; - -@end - -@implementation Reporter -//============================================================================= -+ (uid_t)consoleUID { - SCDynamicStoreRef store = - SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("Reporter"), NULL, NULL); - uid_t uid = -2; // Default to "nobody" - if (store) { - CFStringRef user = SCDynamicStoreCopyConsoleUser(store, &uid, NULL); - - if (user) - CFRelease(user); - else - uid = -2; - - CFRelease(store); - } - - return uid; -} - -//============================================================================= -- (id)initWithConfigurationFD:(int)fd { - if ((self = [super init])) { - configFile_ = fd; - remainingDialogTime_ = 0; - } - - // Because the reporter is embedded in the framework (and many copies - // of the framework may exist) its not completely certain that the OS - // will obey the com.apple.PreferenceSync.ExcludeAllSyncKeys in our - // Info.plist. To make sure, also set the key directly if needed. - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - if (![ud boolForKey:kApplePrefsSyncExcludeAllKey]) { - [ud setBool:YES forKey:kApplePrefsSyncExcludeAllKey]; - } - - [self createServerParameterDictionaries]; - - return self; -} - -//============================================================================= -- (NSString *)readString { - NSMutableString *str = [NSMutableString stringWithCapacity:32]; - char ch[2] = { 0 }; - - while (read(configFile_, &ch[0], 1) == 1) { - if (ch[0] == '\n') { - // Break if this is the first newline after reading some other string - // data. - if ([str length]) - break; - } else { - [str appendString:[NSString stringWithUTF8String:ch]]; - } - } - - return str; -} - -//============================================================================= -- (NSData *)readData:(ssize_t)length { - NSMutableData *data = [NSMutableData dataWithLength:length]; - char *bytes = (char *)[data bytes]; - - if (read(configFile_, bytes, length) != length) - return nil; - - return data; -} - -//============================================================================= -- (BOOL)readConfigurationData { - parameters_ = [[NSMutableDictionary alloc] init]; - - while (1) { - NSString *key = [self readString]; - - if (![key length]) - break; - - // Read the data. Try to convert to a UTF-8 string, or just save - // the data - NSString *lenStr = [self readString]; - ssize_t len = [lenStr intValue]; - NSData *data = [self readData:len]; - id value = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - - // If the keyname is prefixed by BREAKPAD_SERVER_PARAMETER_PREFIX - // that indicates that it should be uploaded to the server along - // with the minidump, so we treat it specially. - if ([key hasPrefix:@BREAKPAD_SERVER_PARAMETER_PREFIX]) { - NSString *urlParameterKey = - [key substringFromIndex:[@BREAKPAD_SERVER_PARAMETER_PREFIX length]]; - if ([urlParameterKey length]) { - if (value) { - [self addServerParameter:value - forKey:urlParameterKey]; - } else { - [self addServerParameter:data - forKey:urlParameterKey]; - } - } - } else { - [parameters_ setObject:(value ? value : data) forKey:key]; - } - [value release]; - } - - // generate a unique client ID based on this host's MAC address - // then add a key/value pair for it - NSString *clientID = [self clientID]; - [parameters_ setObject:clientID forKey:@"guid"]; - - close(configFile_); - configFile_ = -1; - - return YES; -} - -// Per user per machine -- (NSString *)clientID { - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - NSString *crashClientID = [ud stringForKey:kClientIdPreferenceKey]; - if (crashClientID) { - return crashClientID; - } - - // Otherwise, if we have no client id, generate one! - srandom((int)[[NSDate date] timeIntervalSince1970]); - long clientId1 = random(); - long clientId2 = random(); - long clientId3 = random(); - crashClientID = [NSString stringWithFormat:@"%x%x%x", - clientId1, clientId2, clientId3]; - - [ud setObject:crashClientID forKey:kClientIdPreferenceKey]; - [ud synchronize]; - return crashClientID; -} - -//============================================================================= -- (BOOL)readLogFileData { - unsigned int logFileCounter = 0; - - NSString *logPath; - size_t logFileTailSize = - [[parameters_ objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE] intValue]; - - NSMutableArray *logFilenames; // An array of NSString, one per log file - logFilenames = [[NSMutableArray alloc] init]; - - char tmpDirTemplate[80] = "/tmp/CrashUpload-XXXXX"; - char *tmpDir = mkdtemp(tmpDirTemplate); - - // Construct key names for the keys we expect to contain log file paths - for(logFileCounter = 0;; logFileCounter++) { - NSString *logFileKey = [NSString stringWithFormat:@"%@%d", - @BREAKPAD_LOGFILE_KEY_PREFIX, - logFileCounter]; - - logPath = [parameters_ objectForKey:logFileKey]; - - // They should all be consecutive, so if we don't find one, assume - // we're done - - if (!logPath) { - break; - } - - NSData *entireLogFile = [[NSData alloc] initWithContentsOfFile:logPath]; - - if (entireLogFile == nil) { - continue; - } - - NSRange fileRange; - - // Truncate the log file, only if necessary - - if ([entireLogFile length] <= logFileTailSize) { - fileRange = NSMakeRange(0, [entireLogFile length]); - } else { - fileRange = NSMakeRange([entireLogFile length] - logFileTailSize, - logFileTailSize); - } - - char tmpFilenameTemplate[100]; - - // Generate a template based on the log filename - sprintf(tmpFilenameTemplate,"%s/%s-XXXX", tmpDir, - [[logPath lastPathComponent] fileSystemRepresentation]); - - char *tmpFile = mktemp(tmpFilenameTemplate); - - NSData *logSubdata = [entireLogFile subdataWithRange:fileRange]; - NSString *tmpFileString = [NSString stringWithUTF8String:tmpFile]; - [logSubdata writeToFile:tmpFileString atomically:NO]; - - [logFilenames addObject:[tmpFileString lastPathComponent]]; - [entireLogFile release]; - } - - if ([logFilenames count] == 0) { - [logFilenames release]; - logFileData_ = nil; - return NO; - } - - // now, bzip all files into one - NSTask *tarTask = [[NSTask alloc] init]; - - [tarTask setCurrentDirectoryPath:[NSString stringWithUTF8String:tmpDir]]; - [tarTask setLaunchPath:@"/usr/bin/tar"]; - - NSMutableArray *bzipArgs = [NSMutableArray arrayWithObjects:@"-cjvf", - @"log.tar.bz2",nil]; - [bzipArgs addObjectsFromArray:logFilenames]; - - [logFilenames release]; - - [tarTask setArguments:bzipArgs]; - [tarTask launch]; - [tarTask waitUntilExit]; - [tarTask release]; - - NSString *logTarFile = [NSString stringWithFormat:@"%s/log.tar.bz2",tmpDir]; - logFileData_ = [[NSData alloc] initWithContentsOfFile:logTarFile]; - if (logFileData_ == nil) { - GTMLoggerDebug(@"Cannot find temp tar log file: %@", logTarFile); - return NO; - } - return YES; - -} - -//============================================================================= -- (BOOL)readMinidumpData { - NSString *minidumpDir = [parameters_ objectForKey:@kReporterMinidumpDirectoryKey]; - NSString *minidumpID = [parameters_ objectForKey:@kReporterMinidumpIDKey]; - - if (![minidumpID length]) - return NO; - - NSString *path = [minidumpDir stringByAppendingPathComponent:minidumpID]; - path = [path stringByAppendingPathExtension:@"dmp"]; - - // check the size of the minidump and limit it to a reasonable size - // before attempting to load into memory and upload - const char *fileName = [path fileSystemRepresentation]; - struct stat fileStatus; - - BOOL success = YES; - - if (!stat(fileName, &fileStatus)) { - if (fileStatus.st_size > kMinidumpFileLengthLimit) { - fprintf(stderr, "Breakpad Reporter: minidump file too large " \ - "to upload : %d\n", (int)fileStatus.st_size); - success = NO; - } - } else { - fprintf(stderr, "Breakpad Reporter: unable to determine minidump " \ - "file length\n"); - success = NO; - } - - if (success) { - minidumpContents_ = [[NSData alloc] initWithContentsOfFile:path]; - success = ([minidumpContents_ length] ? YES : NO); - } - - if (!success) { - // something wrong with the minidump file -- delete it - unlink(fileName); - } - - return success; -} - -//============================================================================= -- (BOOL)askUserPermissionToSend { - // Initialize Cocoa, needed to display the alert - NSApplicationLoad(); - - // Get the timeout value for the notification. - NSTimeInterval timeout = [self messageTimeout]; - - NSInteger buttonPressed = NSAlertAlternateReturn; - // Determine whether we should create a text box for user feedback. - if ([self shouldRequestComments]) { - BOOL didLoadNib = [NSBundle loadNibNamed:@"Breakpad" owner:self]; - if (!didLoadNib) { - return NO; - } - - [self configureAlertWindowIncludingEmail:[self shouldRequestEmail]]; - - buttonPressed = [self runModalWindow:alertWindow_ withTimeout:timeout]; - - // Extract info from the user into the parameters_ dictionary - if ([self commentsValue]) { - [parameters_ setObject:[self commentsValue] forKey:@BREAKPAD_COMMENTS]; - } - if ([self emailValue]) { - [parameters_ setObject:[self emailValue] forKey:@BREAKPAD_EMAIL]; - } - } else { - // Create an alert panel to tell the user something happened - NSPanel* alert = NSGetAlertPanel([self shortDialogMessage], - [self explanatoryDialogText], - NSLocalizedString(@"sendReportButton", @""), - NSLocalizedString(@"cancelButton", @""), - nil); - - // Pop the alert with an automatic timeout, and wait for the response - buttonPressed = [self runModalWindow:alert withTimeout:timeout]; - - // Release the panel memory - NSReleaseAlertPanel(alert); - } - return buttonPressed == NSAlertDefaultReturn; -} - -- (void)configureAlertWindowIncludingEmail:(BOOL)includeEmail { - // Swap in localized values, making size adjustments to impacted elements as - // we go. Remember that the origin is in the bottom left, so elements above - // "fall" as text areas are shrunk from their overly-large IB sizes. - - // Localize the header. No resizing needed, as it has plenty of room. - [dialogTitle_ setStringValue:[self shortDialogMessage]]; - - // Localize the explanatory text field. - [commentMessage_ setStringValue:[NSString stringWithFormat:@"%@\n\n%@", - [self explanatoryDialogText], - NSLocalizedString(@"commentsMsg", @"")]]; - CGFloat commentHeightDelta = [commentMessage_ breakpad_adjustHeightToFit]; - [headerBox_ breakpad_shiftVertically:commentHeightDelta]; - [alertWindow_ breakpad_adjustHeight:commentHeightDelta]; - - // Either localize the email explanation field or remove the whole email - // section depending on whether or not we are asking for email. - if (includeEmail) { - [emailMessage_ setStringValue:NSLocalizedString(@"emailMsg", @"")]; - CGFloat emailHeightDelta = [emailMessage_ breakpad_adjustHeightToFit]; - [preEmailBox_ breakpad_shiftVertically:emailHeightDelta]; - [alertWindow_ breakpad_adjustHeight:emailHeightDelta]; - } else { - [self removeEmailPrompt]; // Handles necessary resizing. - } - - // Localize the email label, and shift the associated text field. - [emailLabel_ setStringValue:NSLocalizedString(@"emailLabel", @"")]; - CGFloat emailLabelWidthDelta = [emailLabel_ breakpad_adjustWidthToFit]; - [emailEntryField_ breakpad_shiftHorizontally:emailLabelWidthDelta]; - - // Localize the privacy policy label, and keep it right-aligned to the arrow. - [privacyLinkLabel_ setStringValue:NSLocalizedString(@"privacyLabel", @"")]; - CGFloat privacyLabelWidthDelta = - [privacyLinkLabel_ breakpad_adjustWidthToFit]; - [privacyLinkLabel_ breakpad_shiftHorizontally:(-privacyLabelWidthDelta)]; - - // Ensure that the email field and the privacy policy link don't overlap. - CGFloat kMinControlPadding = 8; - CGFloat maxEmailFieldWidth = NSMinX([privacyLinkLabel_ frame]) - - NSMinX([emailEntryField_ frame]) - - kMinControlPadding; - if (NSWidth([emailEntryField_ bounds]) > maxEmailFieldWidth && - maxEmailFieldWidth > 0) { - NSSize emailSize = [emailEntryField_ frame].size; - emailSize.width = maxEmailFieldWidth; - [emailEntryField_ setFrameSize:emailSize]; - } - - // Localize the placeholder text. - [[commentsEntryField_ cell] - setPlaceholderString:NSLocalizedString(@"commentsPlaceholder", @"")]; - [[emailEntryField_ cell] - setPlaceholderString:NSLocalizedString(@"emailPlaceholder", @"")]; - - // Localize the buttons, and keep the cancel button at the right distance. - [sendButton_ setTitle:NSLocalizedString(@"sendReportButton", @"")]; - CGFloat sendButtonWidthDelta = [sendButton_ breakpad_smartSizeToFit]; - [cancelButton_ breakpad_shiftHorizontally:(-sendButtonWidthDelta)]; - [cancelButton_ setTitle:NSLocalizedString(@"cancelButton", @"")]; - [cancelButton_ breakpad_smartSizeToFit]; -} - -- (void)removeEmailPrompt { - [emailSectionBox_ setHidden:YES]; - CGFloat emailSectionHeight = NSHeight([emailSectionBox_ frame]); - [preEmailBox_ breakpad_shiftVertically:(-emailSectionHeight)]; - [alertWindow_ breakpad_adjustHeight:(-emailSectionHeight)]; -} - -- (NSInteger)runModalWindow:(NSWindow*)window - withTimeout:(NSTimeInterval)timeout { - // Queue a |stopModal| message to be performed in |timeout| seconds. - if (timeout > 0.001) { - remainingDialogTime_ = timeout; - SEL updateSelector = @selector(updateSecondsLeftInDialogDisplay:); - messageTimer_ = [NSTimer scheduledTimerWithTimeInterval:1.0 - target:self - selector:updateSelector - userInfo:nil - repeats:YES]; - } - - // Run the window modally and wait for either a |stopModal| message or a - // button click. - [NSApp activateIgnoringOtherApps:YES]; - NSInteger returnMethod = [NSApp runModalForWindow:window]; - - return returnMethod; -} - -- (IBAction)sendReport:(id)sender { - // Force the text fields to end editing so text for the currently focused - // field will be commited. - [alertWindow_ makeFirstResponder:alertWindow_]; - - [alertWindow_ orderOut:self]; - // Use NSAlertDefaultReturn so that the return value of |runModalWithWindow| - // matches the AppKit function NSRunAlertPanel() - [NSApp stopModalWithCode:NSAlertDefaultReturn]; -} - -// UI Button Actions -//============================================================================= -- (IBAction)cancel:(id)sender { - [alertWindow_ orderOut:self]; - // Use NSAlertDefaultReturn so that the return value of |runModalWithWindow| - // matches the AppKit function NSRunAlertPanel() - [NSApp stopModalWithCode:NSAlertAlternateReturn]; -} - -- (IBAction)showPrivacyPolicy:(id)sender { - // Get the localized privacy policy URL and open it in the default browser. - NSURL* privacyPolicyURL = - [NSURL URLWithString:NSLocalizedString(@"privacyPolicyURL", @"")]; - [[NSWorkspace sharedWorkspace] openURL:privacyPolicyURL]; -} - -// Text Field Delegate Methods -//============================================================================= -- (BOOL) control:(NSControl*)control - textView:(NSTextView*)textView -doCommandBySelector:(SEL)commandSelector { - BOOL result = NO; - // If the user has entered text on the comment field, don't end - // editing on "return". - if (control == commentsEntryField_ && - commandSelector == @selector(insertNewline:) - && [[textView string] length] > 0) { - [textView insertNewlineIgnoringFieldEditor:self]; - result = YES; - } - return result; -} - -- (void)controlTextDidBeginEditing:(NSNotification *)aNotification { - [messageTimer_ invalidate]; - [self setCountdownMessage:@""]; -} - -- (void)updateSecondsLeftInDialogDisplay:(NSTimer*)theTimer { - remainingDialogTime_ -= 1; - - NSString *countdownMessage; - NSString *formatString; - - int displayedTimeLeft; // This can be either minutes or seconds. - - if (remainingDialogTime_ > 59) { - // calculate minutes remaining for UI purposes - displayedTimeLeft = (int)(remainingDialogTime_ / 60); - - if (displayedTimeLeft == 1) { - formatString = NSLocalizedString(@"countdownMsgMinuteSingular", @""); - } else { - formatString = NSLocalizedString(@"countdownMsgMinutesPlural", @""); - } - } else { - displayedTimeLeft = (int)remainingDialogTime_; - if (displayedTimeLeft == 1) { - formatString = NSLocalizedString(@"countdownMsgSecondSingular", @""); - } else { - formatString = NSLocalizedString(@"countdownMsgSecondsPlural", @""); - } - } - countdownMessage = [NSString stringWithFormat:formatString, - displayedTimeLeft]; - if (remainingDialogTime_ <= 30) { - [countdownLabel_ setTextColor:[NSColor redColor]]; - } - [self setCountdownMessage:countdownMessage]; - if (remainingDialogTime_ <= 0) { - [messageTimer_ invalidate]; - [NSApp stopModal]; - } -} - - - -#pragma mark Accessors -#pragma mark - -//============================================================================= - -- (NSString *)commentsValue { - return [[commentsValue_ retain] autorelease]; -} - -- (void)setCommentsValue:(NSString *)value { - if (commentsValue_ != value) { - [commentsValue_ release]; - commentsValue_ = [value copy]; - } -} - -- (NSString *)emailValue { - return [[emailValue_ retain] autorelease]; -} - -- (void)setEmailValue:(NSString *)value { - if (emailValue_ != value) { - [emailValue_ release]; - emailValue_ = [value copy]; - } -} - -- (NSString *)countdownMessage { - return [[countdownMessage_ retain] autorelease]; -} - -- (void)setCountdownMessage:(NSString *)value { - if (countdownMessage_ != value) { - [countdownMessage_ release]; - countdownMessage_ = [value copy]; - } -} - -#pragma mark - -//============================================================================= -- (BOOL)reportIntervalElapsed { - float interval = [[parameters_ objectForKey:@BREAKPAD_REPORT_INTERVAL] - floatValue]; - NSString *program = [parameters_ objectForKey:@BREAKPAD_PRODUCT]; - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *programDict = - [NSMutableDictionary dictionaryWithDictionary:[ud dictionaryForKey:program]]; - NSNumber *lastTimeNum = [programDict objectForKey:kLastSubmission]; - NSTimeInterval lastTime = lastTimeNum ? [lastTimeNum floatValue] : 0; - NSTimeInterval now = CFAbsoluteTimeGetCurrent(); - NSTimeInterval spanSeconds = (now - lastTime); - - [programDict setObject:[NSNumber numberWithDouble:now] - forKey:kLastSubmission]; - [ud setObject:programDict forKey:program]; - [ud synchronize]; - - // If we've specified an interval and we're within that time, don't ask the - // user if we should report - GTMLoggerDebug(@"Reporter Interval: %f", interval); - if (interval > spanSeconds) { - GTMLoggerDebug(@"Within throttling interval, not sending report"); - return NO; - } - return YES; -} - -- (BOOL)isOnDemand { - return [[parameters_ objectForKey:@BREAKPAD_ON_DEMAND] - isEqualToString:@"YES"]; -} - -- (BOOL)shouldSubmitSilently { - return [[parameters_ objectForKey:@BREAKPAD_SKIP_CONFIRM] - isEqualToString:@"YES"]; -} - -- (BOOL)shouldRequestComments { - return [[parameters_ objectForKey:@BREAKPAD_REQUEST_COMMENTS] - isEqualToString:@"YES"]; -} - -- (BOOL)shouldRequestEmail { - return [[parameters_ objectForKey:@BREAKPAD_REQUEST_EMAIL] - isEqualToString:@"YES"]; -} - -- (NSString*)shortDialogMessage { - NSString *displayName = [parameters_ objectForKey:@BREAKPAD_PRODUCT_DISPLAY]; - if (![displayName length]) - displayName = [parameters_ objectForKey:@BREAKPAD_PRODUCT]; - - if ([self isOnDemand]) { - return [NSString - stringWithFormat:NSLocalizedString(@"noCrashDialogHeader", @""), - displayName]; - } else { - return [NSString - stringWithFormat:NSLocalizedString(@"crashDialogHeader", @""), - displayName]; - } -} - -- (NSString*)explanatoryDialogText { - NSString *displayName = [parameters_ objectForKey:@BREAKPAD_PRODUCT_DISPLAY]; - if (![displayName length]) - displayName = [parameters_ objectForKey:@BREAKPAD_PRODUCT]; - - NSString *vendor = [parameters_ objectForKey:@BREAKPAD_VENDOR]; - if (![vendor length]) - vendor = @"unknown vendor"; - - if ([self isOnDemand]) { - return [NSString - stringWithFormat:NSLocalizedString(@"noCrashDialogMsg", @""), - vendor, displayName]; - } else { - return [NSString - stringWithFormat:NSLocalizedString(@"crashDialogMsg", @""), - vendor]; - } -} - -- (NSTimeInterval)messageTimeout { - // Get the timeout value for the notification. - NSTimeInterval timeout = [[parameters_ objectForKey:@BREAKPAD_CONFIRM_TIMEOUT] - floatValue]; - // Require a timeout of at least a minute (except 0, which means no timeout). - if (timeout > 0.001 && timeout < 60.0) { - timeout = 60.0; - } - return timeout; -} - -- (void)createServerParameterDictionaries { - serverDictionary_ = [[NSMutableDictionary alloc] init]; - socorroDictionary_ = [[NSMutableDictionary alloc] init]; - googleDictionary_ = [[NSMutableDictionary alloc] init]; - extraServerVars_ = [[NSMutableDictionary alloc] init]; - - [serverDictionary_ setObject:socorroDictionary_ forKey:kSocorroServerType]; - [serverDictionary_ setObject:googleDictionary_ forKey:kGoogleServerType]; - - [googleDictionary_ setObject:@"ptime" forKey:@BREAKPAD_PROCESS_UP_TIME]; - [googleDictionary_ setObject:@"email" forKey:@BREAKPAD_EMAIL]; - [googleDictionary_ setObject:@"comments" forKey:@BREAKPAD_COMMENTS]; - [googleDictionary_ setObject:@"prod" forKey:@BREAKPAD_PRODUCT]; - [googleDictionary_ setObject:@"ver" forKey:@BREAKPAD_VERSION]; - - [socorroDictionary_ setObject:@"Comments" forKey:@BREAKPAD_COMMENTS]; - [socorroDictionary_ setObject:@"CrashTime" - forKey:@BREAKPAD_PROCESS_CRASH_TIME]; - [socorroDictionary_ setObject:@"StartupTime" - forKey:@BREAKPAD_PROCESS_START_TIME]; - [socorroDictionary_ setObject:@"Version" - forKey:@BREAKPAD_VERSION]; - [socorroDictionary_ setObject:@"ProductName" - forKey:@BREAKPAD_PRODUCT]; - [socorroDictionary_ setObject:@"Email" - forKey:@BREAKPAD_EMAIL]; -} - -- (NSMutableDictionary *)dictionaryForServerType:(NSString *)serverType { - if (serverType == nil || [serverType length] == 0) { - return [serverDictionary_ objectForKey:kDefaultServerType]; - } - return [serverDictionary_ objectForKey:serverType]; -} - -- (NSMutableDictionary *)urlParameterDictionary { - NSString *serverType = [parameters_ objectForKey:@BREAKPAD_SERVER_TYPE]; - return [self dictionaryForServerType:serverType]; - -} - -- (BOOL)populateServerDictionary:(NSMutableDictionary *)crashParameters { - NSDictionary *urlParameterNames = [self urlParameterDictionary]; - - id key; - NSEnumerator *enumerator = [parameters_ keyEnumerator]; - - while ((key = [enumerator nextObject])) { - // The key from parameters_ corresponds to a key in - // urlParameterNames. The value in parameters_ gets stored in - // crashParameters with a key that is the value in - // urlParameterNames. - - // For instance, if parameters_ has [PRODUCT_NAME => "FOOBAR"] and - // urlParameterNames has [PRODUCT_NAME => "pname"] the final HTTP - // URL parameter becomes [pname => "FOOBAR"]. - NSString *breakpadParameterName = (NSString *)key; - NSString *urlParameter = [urlParameterNames - objectForKey:breakpadParameterName]; - if (urlParameter) { - [crashParameters setObject:[parameters_ objectForKey:key] - forKey:urlParameter]; - } - } - - // Now, add the parameters that were added by the application. - enumerator = [extraServerVars_ keyEnumerator]; - - while ((key = [enumerator nextObject])) { - NSString *urlParameterName = (NSString *)key; - NSString *urlParameterValue = - [extraServerVars_ objectForKey:urlParameterName]; - [crashParameters setObject:urlParameterValue - forKey:urlParameterName]; - } - return YES; -} - -- (void)addServerParameter:(id)value forKey:(NSString *)key { - [extraServerVars_ setObject:value forKey:key]; -} - -//============================================================================= -- (void)report { - NSURL *url = [NSURL URLWithString:[parameters_ objectForKey:@BREAKPAD_URL]]; - HTTPMultipartUpload *upload = [[HTTPMultipartUpload alloc] initWithURL:url]; - NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary]; - - if (![self populateServerDictionary:uploadParameters]) { - return; - } - - [upload setParameters:uploadParameters]; - - // Add minidump file - if (minidumpContents_) { - [upload addFileContents:minidumpContents_ name:@"upload_file_minidump"]; - - // Send it - NSError *error = nil; - NSData *data = [upload send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - const char *reportID = "ERR"; - - if (error) { - fprintf(stderr, "Breakpad Reporter: Send Error: %s\n", - [[error description] UTF8String]); - } else { - NSCharacterSet *trimSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; - reportID = [[result stringByTrimmingCharactersInSet:trimSet] UTF8String]; - [self logUploadWithID:reportID]; - } - - // rename the minidump file according to the id returned from the server - NSString *minidumpDir = [parameters_ objectForKey:@kReporterMinidumpDirectoryKey]; - NSString *minidumpID = [parameters_ objectForKey:@kReporterMinidumpIDKey]; - - NSString *srcString = [NSString stringWithFormat:@"%@/%@.dmp", - minidumpDir, minidumpID]; - NSString *destString = [NSString stringWithFormat:@"%@/%s.dmp", - minidumpDir, reportID]; - - const char *src = [srcString fileSystemRepresentation]; - const char *dest = [destString fileSystemRepresentation]; - - if (rename(src, dest) == 0) { - GTMLoggerInfo(@"Breakpad Reporter: Renamed %s to %s after successful " \ - "upload",src, dest); - } - else { - // can't rename - don't worry - it's not important for users - GTMLoggerDebug(@"Breakpad Reporter: successful upload report ID = %s\n", - reportID ); - } - [result release]; - } - - if (logFileData_) { - HTTPMultipartUpload *logUpload = [[HTTPMultipartUpload alloc] initWithURL:url]; - - [uploadParameters setObject:@"log" forKey:@"type"]; - [logUpload setParameters:uploadParameters]; - [logUpload addFileContents:logFileData_ name:@"log"]; - - NSError *error = nil; - NSData *data = [logUpload send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - [result release]; - [logUpload release]; - } - - [upload release]; -} - -- (void)logUploadWithID:(const char *)uploadID { - NSString *minidumpDir = - [parameters_ objectForKey:@kReporterMinidumpDirectoryKey]; - NSString *logFilePath = [NSString stringWithFormat:@"%@/%s", - minidumpDir, kReporterLogFilename]; - NSString *logLine = [NSString stringWithFormat:@"%0.f,%s\n", - [[NSDate date] timeIntervalSince1970], uploadID]; - NSData *logData = [logLine dataUsingEncoding:kCFStringEncodingUTF8]; - - NSFileManager *fileManager = [NSFileManager defaultManager]; - if ([fileManager fileExistsAtPath:logFilePath]) { - NSFileHandle *logFileHandle = - [NSFileHandle fileHandleForWritingAtPath:logFilePath]; - [logFileHandle seekToEndOfFile]; - [logFileHandle writeData:logData]; - [logFileHandle closeFile]; - } else { - [fileManager createFileAtPath:logFilePath - contents:logData - attributes:nil]; - } -} - -//============================================================================= -- (void)dealloc { - [parameters_ release]; - [minidumpContents_ release]; - [logFileData_ release]; - [googleDictionary_ release]; - [socorroDictionary_ release]; - [serverDictionary_ release]; - [extraServerVars_ release]; - [super dealloc]; -} - -- (void)awakeFromNib { - [emailEntryField_ setMaximumLength:kEmailMaxLength]; - [commentsEntryField_ setMaximumLength:kUserCommentsMaxLength]; -} - -@end - -//============================================================================= -@implementation LengthLimitingTextField - -- (void)setMaximumLength:(NSUInteger)maxLength { - maximumLength_ = maxLength; -} - -// This is the method we're overriding in NSTextField, which lets us -// limit the user's input if it makes the string too long. -- (BOOL) textView:(NSTextView *)textView -shouldChangeTextInRange:(NSRange)affectedCharRange - replacementString:(NSString *)replacementString { - - // Sometimes the range comes in invalid, so reject if we can't - // figure out if the replacement text is too long. - if (affectedCharRange.location == NSNotFound) { - return NO; - } - // Figure out what the new string length would be, taking into - // account user selections. - NSUInteger newStringLength = - [[textView string] length] - affectedCharRange.length + - [replacementString length]; - if (newStringLength > maximumLength_) { - return NO; - } else { - return YES; - } -} - -// Cut, copy, and paste have to be caught specifically since there is no menu. -- (BOOL)performKeyEquivalent:(NSEvent*)event { - // Only handle the key equivalent if |self| is the text field with focus. - NSText* fieldEditor = [self currentEditor]; - if (fieldEditor != nil) { - // Check for a single "Command" modifier - NSUInteger modifiers = [event modifierFlags]; - modifiers &= NSDeviceIndependentModifierFlagsMask; - if (modifiers == NSCommandKeyMask) { - // Now, check for Select All, Cut, Copy, or Paste key equivalents. - NSString* characters = [event characters]; - // Select All is Command-A. - if ([characters isEqualToString:@"a"]) { - [fieldEditor selectAll:self]; - return YES; - // Cut is Command-X. - } else if ([characters isEqualToString:@"x"]) { - [fieldEditor cut:self]; - return YES; - // Copy is Command-C. - } else if ([characters isEqualToString:@"c"]) { - [fieldEditor copy:self]; - return YES; - // Paste is Command-V. - } else if ([characters isEqualToString:@"v"]) { - [fieldEditor paste:self]; - return YES; - } - } - } - // Let the super class handle the rest (e.g. Command-Period will cancel). - return [super performKeyEquivalent:event]; -} - -@end - -//============================================================================= -int main(int argc, const char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; -#if DEBUG - // Log to stderr in debug builds. - [GTMLogger setSharedLogger:[GTMLogger standardLoggerWithStderr]]; -#endif - GTMLoggerDebug(@"Reporter Launched, argc=%d", argc); - // The expectation is that there will be one argument which is the path - // to the configuration file - if (argc != 2) { - exit(1); - } - - // Open the file before (potentially) switching to console user - int configFile = open(argv[1], O_RDONLY, 0600); - - if (configFile == -1) { - GTMLoggerDebug(@"Couldn't open config file %s - %s", - argv[1], - strerror(errno)); - } - - // we want to avoid a build-up of old config files even if they - // have been incorrectly written by the framework - unlink(argv[1]); - - if (configFile == -1) { - GTMLoggerDebug(@"Couldn't unlink config file %s - %s", - argv[1], - strerror(errno)); - exit(1); - } - - Reporter *reporter = [[Reporter alloc] initWithConfigurationFD:configFile]; - - // Gather the configuration data - if (![reporter readConfigurationData]) { - GTMLoggerDebug(@"reporter readConfigurationData failed"); - exit(1); - } - - // Read the minidump into memory before we (potentially) switch from the - // root user - [reporter readMinidumpData]; - - [reporter readLogFileData]; - - // only submit a report if we have not recently crashed in the past - BOOL shouldSubmitReport = [reporter reportIntervalElapsed]; - BOOL okayToSend = NO; - - // ask user if we should send - if (shouldSubmitReport) { - if ([reporter shouldSubmitSilently]) { - GTMLoggerDebug(@"Skipping confirmation and sending report"); - okayToSend = YES; - } else { - okayToSend = [reporter askUserPermissionToSend]; - } - } - - // If we're running as root, switch over to nobody - if (getuid() == 0 || geteuid() == 0) { - struct passwd *pw = getpwnam("nobody"); - - // If we can't get a non-root uid, don't send the report - if (!pw) { - GTMLoggerDebug(@"!pw - %s", strerror(errno)); - exit(0); - } - - if (setgid(pw->pw_gid) == -1) { - GTMLoggerDebug(@"setgid(pw->pw_gid) == -1 - %s", strerror(errno)); - exit(0); - } - - if (setuid(pw->pw_uid) == -1) { - GTMLoggerDebug(@"setuid(pw->pw_uid) == -1 - %s", strerror(errno)); - exit(0); - } - } - else { - GTMLoggerDebug(@"getuid() !=0 || geteuid() != 0"); - } - - if (okayToSend && shouldSubmitReport) { - GTMLoggerDebug(@"Sending Report"); - [reporter report]; - GTMLoggerDebug(@"Report Sent!"); - } else { - GTMLoggerDebug(@"Not sending crash report okayToSend=%d, "\ - "shouldSubmitReport=%d", okayToSend, shouldSubmitReport); - } - - GTMLoggerDebug(@"Exiting with no errors"); - // Cleanup - [reporter release]; - [pool release]; - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/Localizable.strings deleted file mode 100644 index 2b8bb969..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/da.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/InfoPlist.strings deleted file mode 100644 index 3180973e..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/Localizable.strings deleted file mode 100644 index 73da36f4..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/de.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/InfoPlist.strings deleted file mode 100644 index a82c013e..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/Localizable.strings deleted file mode 100644 index c31d6f48..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/es.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/Localizable.strings deleted file mode 100644 index c32f8ff7..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/fr.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/goArrow.png b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/goArrow.png deleted file mode 100644 index f318a567..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/goArrow.png and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/Localizable.strings deleted file mode 100644 index a4b7fd3a..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/it.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/Localizable.strings deleted file mode 100644 index 1f1a4fee..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/ja.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/Localizable.strings deleted file mode 100644 index a4a54f75..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/nl.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/Localizable.strings deleted file mode 100644 index 725ef5a2..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/no.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/InfoPlist.strings deleted file mode 100644 index 585f6221..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/Localizable.strings deleted file mode 100644 index b7dfeece..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sl.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/InfoPlist.strings deleted file mode 100644 index 4cfd32c5..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/Localizable.strings deleted file mode 100644 index f7d12516..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/sv.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/InfoPlist.strings deleted file mode 100644 index 088fb4f6..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/Localizable.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/Localizable.strings deleted file mode 100644 index a82f990e..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/sender/tr.lproj/Localizable.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.h deleted file mode 100644 index 7b3be2d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import - -enum BreakpadForkBehavior { - DONOTHING = 0, - UNINSTALL, - RESETEXCEPTIONPORT -}; - -enum BreakpadForkTestCrashPoint { - DURINGLAUNCH = 5, - AFTERLAUNCH = 6, - BETWEENFORKEXEC = 7 -}; - -@interface Controller : NSObject { - IBOutlet NSWindow *window_; - IBOutlet NSWindow *forkTestOptions_; - - BreakpadRef breakpad_; - - enum BreakpadForkBehavior bpForkOption; - - BOOL useVFork; - enum BreakpadForkTestCrashPoint progCrashPoint; -} - -- (IBAction)crash:(id)sender; -- (IBAction)forkTestOptions:(id)sender; -- (IBAction)forkTestGo:(id)sender; -- (IBAction)showForkTestWindow:(id) sender; -- (void)generateReportWithoutCrash:(id)sender; -- (void)awakeFromNib; - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.m b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.m deleted file mode 100644 index 87c43024..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Controller.m +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "Controller.h" -#import "TestClass.h" -#import "GTMDefines.h" -#include -#include - -@implementation Controller - -- (void)causeCrash { - float *aPtr = nil; - NSLog(@"Crash!"); - NSLog(@"Bad programmer: %f", *aPtr); -} - -- (void)generateReportWithoutCrash:(id)sender { - BreakpadGenerateAndSendReport(breakpad_); -} - -- (IBAction)showForkTestWindow:(id) sender { - [forkTestOptions_ setIsVisible:YES]; -} - -- (IBAction)forkTestOptions:(id)sender { - NSInteger tag = [[sender selectedCell] tag]; - NSLog(@"sender tag: %d", tag); - if (tag <= 2) { - bpForkOption = tag; - } - - if (tag == 3) { - useVFork = NO; - } - - if (tag == 4) { - useVFork = YES; - } - - if (tag >= 5 && tag <= 7) { - progCrashPoint = tag; - } - -} - -- (IBAction)forkTestGo:(id)sender { - - NSString *resourcePath = [[NSBundle bundleForClass: - [self class]] resourcePath]; - NSString *execProgname = nil; - if (progCrashPoint == DURINGLAUNCH) { - execProgname = [resourcePath stringByAppendingString:@"/crashduringload"]; - } else if (progCrashPoint == AFTERLAUNCH) { - execProgname = [resourcePath stringByAppendingString:@"/crashInMain"]; - } - - const char *progName = NULL; - if (progCrashPoint != BETWEENFORKEXEC) { - progName = [execProgname UTF8String]; - } - - int pid; - - if (bpForkOption == UNINSTALL) { - BreakpadRelease(breakpad_); - } - - if (useVFork) { - pid = vfork(); - } else { - pid = fork(); - } - - if (pid == 0) { - sleep(3); - NSLog(@"Child continuing"); - FILE *fd = fopen("/tmp/childlog.txt","wt"); - kern_return_t kr; - if (bpForkOption == RESETEXCEPTIONPORT) { - kr = task_set_exception_ports(mach_task_self(), - EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | - EXC_MASK_ARITHMETIC | EXC_MASK_BREAKPOINT, - MACH_PORT_NULL, - EXCEPTION_DEFAULT, - THREAD_STATE_NONE); - fprintf(fd,"task_set_exception_ports returned %d\n", kr); - } - - if (progCrashPoint == BETWEENFORKEXEC) { - fprintf(fd,"crashing post-fork\n"); - int *a = NULL; - printf("%d\n",*a++); - } - - fprintf(fd,"about to call exec with %s\n", progName); - fclose(fd); - int i = execl(progName, progName, NULL); - fprintf(fd, "exec returned! %d\n", i); - fclose(fd); - } -} - -- (IBAction)crash:(id)sender { - NSInteger tag = [sender tag]; - - if (tag == 1) { - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [self performSelector:@selector(causeCrash) withObject:nil afterDelay:10.0]; - [sender setState:NSOnState]; - return; - } - - if (tag == 2 && breakpad_) { - BreakpadRelease(breakpad_); - breakpad_ = NULL; - return; - } - - [self causeCrash]; -} - -- (void)anotherThread { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - TestClass *tc = [[TestClass alloc] init]; - - [tc wait]; - - [pool release]; -} - -- (void)awakeFromNib { - NSBundle *bundle = [NSBundle mainBundle]; - NSDictionary *info = [bundle infoDictionary]; - - - breakpad_ = BreakpadCreate(info); - - // Do some unit tests with keys - // first a series of bogus values - BreakpadSetKeyValue(breakpad_, nil, @"bad2"); - BreakpadSetKeyValue(nil, @"bad3", @"bad3"); - - // Now some good ones - BreakpadSetKeyValue(breakpad_,@"key1", @"value1"); - BreakpadSetKeyValue(breakpad_,@"key2", @"value2"); - BreakpadSetKeyValue(breakpad_,@"key3", @"value3"); - - // Look for a bogus one that we didn't try to set - NSString *test = BreakpadKeyValue(breakpad_, @"bad4"); - if (test) { - NSLog(@"Bad BreakpadKeyValue (bad4)"); - } - - // Look for a bogus one we did try to set - test = BreakpadKeyValue(breakpad_, @"bad1"); - if (test) { - NSLog(@"Bad BreakpadKeyValue (bad1)"); - } - - // Test some bad args for BreakpadKeyValue - test = BreakpadKeyValue(nil, @"bad5"); - if (test) { - NSLog(@"Bad BreakpadKeyValue (bad5)"); - } - - test = BreakpadKeyValue(breakpad_, nil); - if (test) { - NSLog(@"Bad BreakpadKeyValue (nil)"); - } - - // Find some we did set - test = BreakpadKeyValue(breakpad_, @"key1"); - if (![test isEqualToString:@"value1"]) { - NSLog(@"Can't find BreakpadKeyValue (key1)"); - } - test = BreakpadKeyValue(breakpad_, @"key2"); - if (![test isEqualToString:@"value2"]) { - NSLog(@"Can't find BreakpadKeyValue (key2)"); - } - test = BreakpadKeyValue(breakpad_, @"key3"); - if (![test isEqualToString:@"value3"]) { - NSLog(@"Can't find BreakpadKeyValue (key3)"); - } - - // Bad args for BreakpadRemoveKeyValue - BreakpadRemoveKeyValue(nil, @"bad6"); - BreakpadRemoveKeyValue(breakpad_, nil); - - // Remove one that is valid - BreakpadRemoveKeyValue(breakpad_, @"key3"); - - // Try and find it - test = BreakpadKeyValue(breakpad_, @"key3"); - if (test) { - NSLog(@"Shouldn't find BreakpadKeyValue (key3)"); - } - - // Try and remove it again - BreakpadRemoveKeyValue(breakpad_, @"key3"); - - // Try removal by setting to nil - BreakpadSetKeyValue(breakpad_,@"key2", nil); - // Try and find it - test = BreakpadKeyValue(breakpad_, @"key2"); - if (test) { - NSLog(@"Shouldn't find BreakpadKeyValue (key2)"); - } - - BreakpadAddUploadParameter(breakpad_, - @"MeaningOfLife", - @"42"); - [NSThread detachNewThreadSelector:@selector(anotherThread) - toTarget:self withObject:nil]; - - NSUserDefaults *args = [NSUserDefaults standardUserDefaults]; - - // If the user specified autocrash on the command line, toggle - // Breakpad to not confirm and crash immediately. This is for - // automated testing. - if ([args boolForKey:@"autocrash"]) { - BreakpadSetKeyValue(breakpad_, - @BREAKPAD_SKIP_CONFIRM, - @"YES"); - [self causeCrash]; - } - - progCrashPoint = DURINGLAUNCH; - [window_ center]; - [window_ makeKeyAndOrderFront:self]; -} - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/InfoPlist.strings b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/InfoPlist.strings deleted file mode 100644 index b8c6c6bf..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/MainMenu.xib b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/MainMenu.xib deleted file mode 100644 index 840c0db3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/English.lproj/MainMenu.xib +++ /dev/null @@ -1,3748 +0,0 @@ - - - - 1050 - 10F569 - 788 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 788 - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - - NSApplication - - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{945, 874}, {320, 188}} - 1886912512 - Window - NSWindow - - View - - {1.79769e+308, 1.79769e+308} - {213, 107} - - - 256 - - YES - - - 301 - {{14, 140}, {292, 32}} - - - YES - - 67239424 - 134217728 - Crash! (Airbag Installed) - - LucidaGrande - 13 - 1044 - - - -2038284033 - 1 - - - - - - 200 - 25 - - - - - 301 - {{14, 76}, {292, 32}} - - - 2 - YES - - 67239424 - 134217728 - Crash! (Airbag NOT Installed) - - - 2 - -2038284033 - 1 - - - - - - 200 - 25 - - - - - 301 - {{14, 108}, {292, 32}} - - - 1 - YES - - 67239424 - 134217728 - Crash! (Airbag Installed w/10sec delay) - - - 1 - -2038284033 - 1 - - - - - - 200 - 25 - - - - - 268 - {{14, 44}, {292, 32}} - - - YES - - 67239424 - 134217728 - Fork Test - - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{14, 12}, {292, 32}} - - - YES - - 67239424 - 134217728 - Generate report without crash - - - -2038284033 - 129 - - - 200 - 25 - - - - {320, 188} - - - - {{0, 0}, {1440, 878}} - {213, 129} - {1.79769e+308, 1.79769e+308} - - - MainMenu - - YES - - - NewApplication - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - NewApplication - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - - Services - - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - - File - - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open... - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - - Open Recent - - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1048576 - 2147483647 - - - - - - Revert - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup… - P - 1048576 - 2147483647 - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - - Edit - - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - - Find - - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1048576 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling - - 1048576 - 2147483647 - - - submenuAction: - - Spelling - - YES - - - Spelling… - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling as You Type - - 1048576 - 2147483647 - - - - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - - Window - - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - Controller - - - 15 - 2 - {{858, 755}, {787, 260}} - 603979776 - Window - NSWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - - YES - - - 268 - {{20, 7}, {645, 79}} - - YES - 3 - 1 - - YES - - -2080244224 - 0 - program crashes during launch because of missing dylib - - - 5 - 1211912703 - 0 - - NSRadioButton - - - - 200 - 25 - - - 67239424 - 0 - program crashes after launch - - - 6 - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw -cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA -AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA -BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA -AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA -AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 -cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD -AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH -SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF -hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 -vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt -7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq -Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo -aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e -n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX -2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW -FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O -Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 -ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt -rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA -AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA -AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl -A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq -DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU -HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 -MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v -UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ -eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj -rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn -5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh -AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK -CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY -GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 -MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S -UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 -d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV -pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK -0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// -AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw -BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA -FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H -LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh -Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ -h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp -svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb -1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX -8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE -AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg -QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA - - - - - - 3 - MCAwAA - - - - 400 - 75 - - - 67239424 - 0 - program crashes in between fork() and exec() (3rd option in first group will happen before crash) - - - 7 - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAv0AAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAL9GFw -cGwCAAAAbW50clJHQiBYWVogB9gAAgAMAAoAFgAIYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAPbWAAEAAAAA0y1hcHBs625VECyhxeSV9P9A73pKGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAANclhZWgAAASAAAAAUZ1hZWgAAATQAAAAUYlhZWgAAAUgAAAAUd3RwdAAAAVwAAAAUY2hhZAAA -AXAAAAAsclRSQwAAAZwAAAAOZ1RSQwAAAawAAAAOYlRSQwAAAbwAAAAOdmNndAAAAcwAAAYSbmRpbgAA -B+AAAAMOZGVzYwAACvAAAACZY3BydAAAC4wAAABAbW1vZAAAC8wAAAAoWFlaIAAAAAAAAJumAABMVQAA -ArBYWVogAAAAAAAANWMAAJ/rAAAZsVhZWiAAAAAAAAAlzQAAE9UAALbFWFlaIAAAAAAAAPPYAAEAAAAB -FghzZjMyAAAAAAABC7cAAAWW///zVwAABykAAP3X///7t////aYAAAPaAADA9mN1cnYAAAAAAAAAAQHN -AABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAADAQAAAgAAAioENAYA -B9AJlAtRDQwOshBOEekTgxUVFqMYMRm9GzwcvR4+H7chLiKnJBoliCb3KGIpyCswLJMt9C9WMLIyDjNn -NL02FTdoOLs6ETtdPKw9+D9DQJBB1kMeRGZFq0bySDRJeEq6S/tNPk59T75Q+lI2U25Uo1XZVwlYOlln -WpZbwFzsXhdfQWBrYZRiv2PoZRNmPWdqaJhpyGr5bC1tZW6hb+BxLXJ+c9d1OHafeA55gnr5fHR98H9t -gOuCY4PYhUqGsIgSiWyKuIwBjTqObY+VkLORyJLUk9eU05XFlrWXlZh2mUuaG5rsm6ucbJ0qndqei588 -n9+ghKEqoceiYqL/o5qkLqTDpVml66Z7pwunnKgpqLWpQqnQqlqq5Ktvq/qsg60MrZauIa6qrzOvvbBH -sNGxXLHnsnKy/7OMtBm0p7U3tci2Wbbrt4C4FrituUa54rqAux27wbxlvQq9rr5Tvvi/ncBAwOXBisIu -wtPDeMQdxMLFaMYPxrXHXMgEyKzJVcn/yqnLVcwBzK7NXc4Mzr3PcNAk0NnRkdJK0wTTw9SC1UTWCtbR -153Ybdk+2hfa8dvM3KfdhN5g3zzgGuD34dbiteOV5HblWeY85yHoCOjw6drqxuu27Kbtm+6R74zwivGM -8pPzn/Sw9cj25/gP+T76e/u//Rr+hP//AAABpANzBRoGsggnCZsLFQx+Dd4PRRCiEf8TYxS0FgoXXRiu -GgQbTRyZHekfMCB8IcIjCSRSJZUm3SgdKWAqpCvjLSYuZC+lMOIyIDNgNJs12TcTOFA5izrEO/49NT5w -P6dA30IWQ01Eg0W4Ru9IIElVSoZLt0zmThVPRFBwUZ5SylP5VSRWUVd+WKtZ2lsIXDhdaV6bX89hBWI8 -Y3dktGX0ZzhohGnVayxsiW3sb1Vww3I0c6p1I3aeeBl5k3sMfIR99X9kgM6CLYOJhNyGJodriKGJ1Ir5 -jBuNL45Aj0WQSJE8kjKTGJP+lNyVspaKl1OYHZjlmaSaZJshm9ecj51EnfSepJ9Vn/+gqqFWofyio6NL -o/CklKU4pdymfacfp8KoYqkDqaWqRarlq4asJ6zHrWiuCq6rr02v77CSsTax27KAsyezzrR3tSG1zLZ5 -tye32LiKuT659rqwu2q8J7zkvaK+YL8ev93AnMFcwhzC3MOdxF7FIMXixqXHaMgryPDJtcp6y0DMB8zO -zZbOX88oz/PQvtGJ0lbTI9Px1MDVkNZi1zTYB9jb2bDah9te3DjdEt3t3sjfpOB/4VviN+MT4/DkzeWq -5ojnZuhG6SXqBuro68rsre2S7nfvXvBH8TDyHPMI8/j06fXc9tL3yvjF+cL6w/vG/ND92v7s//8AAAMJ -BboIZwrCDSsPghG8E/IWHxg5GkgcVB5VIEQiMyQTJeknuimHK00tCy7AMHEyHDO/NV829ziKOhs7pj0s -PrBALEGmQx9EkkYCR3JI3EpCS6pND05vT89RLVKKU+dVP1aYV+9ZRVqdW/NdSV6hX+thM2JzY61k42YS -Z0FoZ2mOaq5rz2zsbglvI3A9cVRybHOEdJx1tHbOd+d5A3ofez98Yn2Lfrl/8IEqgmyDsoT8hkuHnYjw -ikSLmYzsjj+PjJDWkh2TW5SXlceW85gWmTOaSJtVnFqdWp5Pn0SgKaEQoeuiwqOYpGClKaXtpqmnZqgf -qNKph6o5quWrk6xArOatja41rtevebAcsLyxWbH3spWzL7PJtGO0/LWTtiq2wrdWt+q4f7kUuaW6OLrL -u1277Lx9vQ69nr4tvry/TL/bwGjA98GGwhPCocMvw77ESsTYxWXF9MZ/xwzHmcgkyKXJJ8mpyizKpMsc -y5XMDsyFzPjNa83fzlPOxc81z6fQGNCK0PvRbNHe0lDSw9M206vUINSV1QvVhtYA1nzW+Nd61//YhNkK -2ZnaL9rG213cCty63WveI97d35fgUuEO4crih+NE5ALkw+WD5kXnCufP6JbpYOor6vrry+yd7XbuUe8w -8BXw+/Ht8uDz4PTl9fj3E/hE+X363vxa/gH//wAAbmRpbgAAAAAAAAMGAACogAAAUwAAADRAAACqQAAA -JpcAABLbAABQQAAAVEAAAj99AAI1egACxUsAAwB4AAIAAAADAAsAGQAsAEUAYwCHALEA4QEWAVEBkgHZ -AiYCeQLSAzEDlwQDBHYE7wVvBfUGgwcXB7IIUwj8CawKYgsgC+QMrw2BDloPORAfEQ0SBRMGFBEVJBZA -F2MYjhm/GvYcMh1xHrMf9SE1ImwjnSTJJfAnFig7KWMqjivBLP4uSC+jMRMymzRBNgo3+joWPGY+8EG8 -RNhIQEvvT95UCFhkXOxhlWZYaylv/XTKeYN+GoKOhxGLqJBOlP6Ztp5voyan1Kx0sQG1c7nGvfHB9cX7 -ygbOFNIi1izaMN4p4hTl7emv7Vbw3vRC93z6iP1g//8AAAAEAA8AIgA9AF8AiQC7APQBNAF8AcwCIgKB -AuYDUwPHBEIExAVOBd4GdgcUB7oIZgkaCdQKlQteDC0NAw3gDsQPrxCiEZwSnxOpFLsV0xbyGBcZQRpw -G6Mc2R4RH0oggyG3IuckEyU8JmQniyiyKd0rDCxBLYAuyTAhMYkzBjSbNkw4HToSPDA+fED8Q7FGmUmx -TPdQaFQAV7tbll+KY5RnrmvTb/p0H3g6fEOAMoQXiASL+I/yk/KX+JwBoA2kHKgrrDuwS7RYuGK8aMBo -xGvId8yI0J/UuNjS3OvhAOUQ6RftE/EC9OH4rfxi//8AAAABAAYADQAXACUANQBIAF8AeQCWALcA3AEE -ATABYQGVAc4CDAJOApUC4QMyA4gD5QRGBK4FHAWPBgkGigcQB54IMQjMCW0KFArDC3cMMgzzDbsOiA9a -EDIRFhIIEwgUFRUvFlYXhxjDGgkbVhyqHgMfYCC8IhIjYSSrJfMnOSiBKc0rHyx7LeQvXTDrMpE0VTY7 -OEg6gjzuP5NCckWCSMJMMk/QU5xXk1u1X/9kcGkGbb5ylneLfJqByoeDjcyUf5t4oo2plLBetru8eMFr -xirK7c+v1GnZFd2r4iXme+ql7pryUvXD+OT7qv4M//8AAGRlc2MAAAAAAAAAFUhQIExQMzA2NSBDYWxp -YnJhdGVkAAAAAAAAAAAVAEgAUAAgAEwAUAAzADAANgA1ACAAQwBhAGwAaQBiAHIAYQB0AGUAZAAAAAAV -SFAgTFAzMDY1IENhbGlicmF0ZWQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIEluYy4sIDIwMDgAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAA - - - - - - - - - 200 - 25 - - - {645, 25} - {4, 2} - 1151868928 - NSActionCell - - -2080244224 - 0 - program crashes after launch - - 5 - 1211912703 - 0 - - - - 200 - 25 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 3 - MQA - - - - - - 268 - {{20, 170}, {565, 70}} - - YES - 3 - 1 - - YES - - -2080244224 - 0 - Leave breakpad alone before fork - - - 1211912703 - 0 - - - - 200 - 25 - - - 67239424 - 0 - Uninitialize Breakpad before fork - - - 1 - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw -cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA -AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA -BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA -AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA -AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 -cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD -AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH -SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF -hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 -vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt -7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq -Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo -aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e -n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX -2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW -FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O -Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 -ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt -rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA -AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA -AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl -A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq -DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU -HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 -MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v -UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ -eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj -rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn -5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh -AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK -CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY -GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 -MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S -UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 -d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV -pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK -0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// -AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw -BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA -FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H -LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh -Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ -h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp -svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb -1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX -8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE -AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg -QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA - - - - - - - - 400 - 75 - - - 67239424 - 0 - Call task_set_exception_port with null exception port in child process before exec - - - 2 - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAv0AAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAL9GFw -cGwCAAAAbW50clJHQiBYWVogB9gAAgAMAAoAFgAIYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAPbWAAEAAAAA0y1hcHBs625VECyhxeSV9P9A73pKGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAANclhZWgAAASAAAAAUZ1hZWgAAATQAAAAUYlhZWgAAAUgAAAAUd3RwdAAAAVwAAAAUY2hhZAAA -AXAAAAAsclRSQwAAAZwAAAAOZ1RSQwAAAawAAAAOYlRSQwAAAbwAAAAOdmNndAAAAcwAAAYSbmRpbgAA -B+AAAAMOZGVzYwAACvAAAACZY3BydAAAC4wAAABAbW1vZAAAC8wAAAAoWFlaIAAAAAAAAJumAABMVQAA -ArBYWVogAAAAAAAANWMAAJ/rAAAZsVhZWiAAAAAAAAAlzQAAE9UAALbFWFlaIAAAAAAAAPPYAAEAAAAB -FghzZjMyAAAAAAABC7cAAAWW///zVwAABykAAP3X///7t////aYAAAPaAADA9mN1cnYAAAAAAAAAAQHN -AABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAADAQAAAgAAAioENAYA -B9AJlAtRDQwOshBOEekTgxUVFqMYMRm9GzwcvR4+H7chLiKnJBoliCb3KGIpyCswLJMt9C9WMLIyDjNn -NL02FTdoOLs6ETtdPKw9+D9DQJBB1kMeRGZFq0bySDRJeEq6S/tNPk59T75Q+lI2U25Uo1XZVwlYOlln -WpZbwFzsXhdfQWBrYZRiv2PoZRNmPWdqaJhpyGr5bC1tZW6hb+BxLXJ+c9d1OHafeA55gnr5fHR98H9t -gOuCY4PYhUqGsIgSiWyKuIwBjTqObY+VkLORyJLUk9eU05XFlrWXlZh2mUuaG5rsm6ucbJ0qndqei588 -n9+ghKEqoceiYqL/o5qkLqTDpVml66Z7pwunnKgpqLWpQqnQqlqq5Ktvq/qsg60MrZauIa6qrzOvvbBH -sNGxXLHnsnKy/7OMtBm0p7U3tci2Wbbrt4C4FrituUa54rqAux27wbxlvQq9rr5Tvvi/ncBAwOXBisIu -wtPDeMQdxMLFaMYPxrXHXMgEyKzJVcn/yqnLVcwBzK7NXc4Mzr3PcNAk0NnRkdJK0wTTw9SC1UTWCtbR -153Ybdk+2hfa8dvM3KfdhN5g3zzgGuD34dbiteOV5HblWeY85yHoCOjw6drqxuu27Kbtm+6R74zwivGM -8pPzn/Sw9cj25/gP+T76e/u//Rr+hP//AAABpANzBRoGsggnCZsLFQx+Dd4PRRCiEf8TYxS0FgoXXRiu -GgQbTRyZHekfMCB8IcIjCSRSJZUm3SgdKWAqpCvjLSYuZC+lMOIyIDNgNJs12TcTOFA5izrEO/49NT5w -P6dA30IWQ01Eg0W4Ru9IIElVSoZLt0zmThVPRFBwUZ5SylP5VSRWUVd+WKtZ2lsIXDhdaV6bX89hBWI8 -Y3dktGX0ZzhohGnVayxsiW3sb1Vww3I0c6p1I3aeeBl5k3sMfIR99X9kgM6CLYOJhNyGJodriKGJ1Ir5 -jBuNL45Aj0WQSJE8kjKTGJP+lNyVspaKl1OYHZjlmaSaZJshm9ecj51EnfSepJ9Vn/+gqqFWofyio6NL -o/CklKU4pdymfacfp8KoYqkDqaWqRarlq4asJ6zHrWiuCq6rr02v77CSsTax27KAsyezzrR3tSG1zLZ5 -tye32LiKuT659rqwu2q8J7zkvaK+YL8ev93AnMFcwhzC3MOdxF7FIMXixqXHaMgryPDJtcp6y0DMB8zO -zZbOX88oz/PQvtGJ0lbTI9Px1MDVkNZi1zTYB9jb2bDah9te3DjdEt3t3sjfpOB/4VviN+MT4/DkzeWq -5ojnZuhG6SXqBuro68rsre2S7nfvXvBH8TDyHPMI8/j06fXc9tL3yvjF+cL6w/vG/ND92v7s//8AAAMJ -BboIZwrCDSsPghG8E/IWHxg5GkgcVB5VIEQiMyQTJeknuimHK00tCy7AMHEyHDO/NV829ziKOhs7pj0s -PrBALEGmQx9EkkYCR3JI3EpCS6pND05vT89RLVKKU+dVP1aYV+9ZRVqdW/NdSV6hX+thM2JzY61k42YS -Z0FoZ2mOaq5rz2zsbglvI3A9cVRybHOEdJx1tHbOd+d5A3ofez98Yn2Lfrl/8IEqgmyDsoT8hkuHnYjw -ikSLmYzsjj+PjJDWkh2TW5SXlceW85gWmTOaSJtVnFqdWp5Pn0SgKaEQoeuiwqOYpGClKaXtpqmnZqgf -qNKph6o5quWrk6xArOatja41rtevebAcsLyxWbH3spWzL7PJtGO0/LWTtiq2wrdWt+q4f7kUuaW6OLrL -u1277Lx9vQ69nr4tvry/TL/bwGjA98GGwhPCocMvw77ESsTYxWXF9MZ/xwzHmcgkyKXJJ8mpyizKpMsc -y5XMDsyFzPjNa83fzlPOxc81z6fQGNCK0PvRbNHe0lDSw9M206vUINSV1QvVhtYA1nzW+Nd61//YhNkK -2ZnaL9rG213cCty63WveI97d35fgUuEO4crih+NE5ALkw+WD5kXnCufP6JbpYOor6vrry+yd7XbuUe8w -8BXw+/Ht8uDz4PTl9fj3E/hE+X363vxa/gH//wAAbmRpbgAAAAAAAAMGAACogAAAUwAAADRAAACqQAAA -JpcAABLbAABQQAAAVEAAAj99AAI1egACxUsAAwB4AAIAAAADAAsAGQAsAEUAYwCHALEA4QEWAVEBkgHZ -AiYCeQLSAzEDlwQDBHYE7wVvBfUGgwcXB7IIUwj8CawKYgsgC+QMrw2BDloPORAfEQ0SBRMGFBEVJBZA -F2MYjhm/GvYcMh1xHrMf9SE1ImwjnSTJJfAnFig7KWMqjivBLP4uSC+jMRMymzRBNgo3+joWPGY+8EG8 -RNhIQEvvT95UCFhkXOxhlWZYaylv/XTKeYN+GoKOhxGLqJBOlP6Ztp5voyan1Kx0sQG1c7nGvfHB9cX7 -ygbOFNIi1izaMN4p4hTl7emv7Vbw3vRC93z6iP1g//8AAAAEAA8AIgA9AF8AiQC7APQBNAF8AcwCIgKB -AuYDUwPHBEIExAVOBd4GdgcUB7oIZgkaCdQKlQteDC0NAw3gDsQPrxCiEZwSnxOpFLsV0xbyGBcZQRpw -G6Mc2R4RH0oggyG3IuckEyU8JmQniyiyKd0rDCxBLYAuyTAhMYkzBjSbNkw4HToSPDA+fED8Q7FGmUmx -TPdQaFQAV7tbll+KY5RnrmvTb/p0H3g6fEOAMoQXiASL+I/yk/KX+JwBoA2kHKgrrDuwS7RYuGK8aMBo -xGvId8yI0J/UuNjS3OvhAOUQ6RftE/EC9OH4rfxi//8AAAABAAYADQAXACUANQBIAF8AeQCWALcA3AEE -ATABYQGVAc4CDAJOApUC4QMyA4gD5QRGBK4FHAWPBgkGigcQB54IMQjMCW0KFArDC3cMMgzzDbsOiA9a -EDIRFhIIEwgUFRUvFlYXhxjDGgkbVhyqHgMfYCC8IhIjYSSrJfMnOSiBKc0rHyx7LeQvXTDrMpE0VTY7 -OEg6gjzuP5NCckWCSMJMMk/QU5xXk1u1X/9kcGkGbb5ylneLfJqByoeDjcyUf5t4oo2plLBetru8eMFr -xirK7c+v1GnZFd2r4iXme+ql7pryUvXD+OT7qv4M//8AAGRlc2MAAAAAAAAAFUhQIExQMzA2NSBDYWxp -YnJhdGVkAAAAAAAAAAAVAEgAUAAgAEwAUAAzADAANgA1ACAAQwBhAGwAaQBiAHIAYQB0AGUAZAAAAAAV -SFAgTFAzMDY1IENhbGlicmF0ZWQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIEluYy4sIDIwMDgAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAA - - - - - - - - 400 - 75 - - - {565, 22} - {4, 2} - 1151868928 - NSActionCell - - 67239424 - 0 - Radio - - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - - - - - - - - 400 - 75 - - - - - - - - - 268 - {{20, 104}, {565, 38}} - - YES - 2 - 1 - - YES - - -2080244224 - 0 - fork() - - - 3 - 1211912703 - 0 - - - - 200 - 25 - - - 67239424 - 0 - vfork() - - - 4 - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFxgEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFzodzAAcAAAwYAAAF1gAAAAAACAAIAAgACAABAAEAAQABAAAMGGFw -cGwCAAAAbW50clJHQiBYWVogB9YABAADABMALAASYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAPbWAAEAAAAA0y1hcHBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAOclhZWgAAASwAAAAUZ1hZWgAAAUAAAAAUYlhZWgAAAVQAAAAUd3RwdAAAAWgAAAAUY2hhZAAA -AXwAAAAsclRSQwAAAagAAAAOZ1RSQwAAAbgAAAAOYlRSQwAAAcgAAAAOdmNndAAAAdgAAAMSbmRpbgAA -BOwAAAY+ZGVzYwAACywAAABkZHNjbQAAC5AAAAAubW1vZAAAC8AAAAAoY3BydAAAC+gAAAAtWFlaIAAA -AAAAAF1KAAA0kQAACCVYWVogAAAAAAAAdCAAALRgAAAjPVhZWiAAAAAAAAAlbAAAFyoAAKfDWFlaIAAA -AAAAAPNSAAEAAAABFs9zZjMyAAAAAAABDEIAAAXe///zJgAAB5IAAP2R///7ov///aMAAAPcAADAbGN1 -cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAAAD -AQAAAQACBAUGBwkKCw0ODxASExQWFxgaGxweHyAiIyQmJygpKywtLzAxMjM1Njc4OTs8PT5AQUJDREZH -SElKS0xOT1BRUlNUVVZXWFlaW1xdXl9hYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SF -hoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnZ6foKGio6SlpqanqKmqq6ytra6vsLGysrO0tba3uLi5uru8 -vL2+v8DBwcLDxMXGxsfIycrKy8zNzs7P0NHS0tPU1dbW19jZ2drb3Nzd3t/g4eLi4+Tl5ufo6enq6+zt -7u/w8fHy8/T19vf4+fr7/P3+/v8AAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR8gISIjJCUnKCkq -Ky0uLzAxMzQ1Njc4OTo7PD0/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaWltcXV5fYGFiY2RlZmdo -aWprbG1ub3BxcnN0dXZ3d3h5ent8fH1+f4CBgoKDhIWGh4iIiYqLjI2Oj5CRkpOUlJWWl5iZmpucnZ2e -n6ChoqOkpaamp6ipqqusra6vsLCxsrO0tba3uLm5uru8vb6/wMHCw8TFx8jJysvMzc7P0NDR0tPU1dbX -2Nna29ze3+Dh4uPk5ebn6err7O3u7/Hy8/T19vf5+vv8/f7/AAIDAwQFBgcICQoKCwwNDg8QERITFBUW -FxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODg5Ojs8PT4+P0BBQkNDREVGR0hJSUpLTE1O -Tk9QUVJSU1RVVVZXWFhZWltbXF1eXl9gYWFiY2RkZWZnZ2hpaWprbGxtbm5vcHFxcnNzdHV1dnd4eHl6 -ent8fH1+fn+AgYGCg4SEhYaHiImJiouMjY6Oj5CRkpOTlJWWl5iZmZqbnJ2en6ChoqOkpaanqKmqq6yt -rq+xsrO0tba3uLq7vL2+wMHDxMbHycrMzs/R0tTW19nb3d7g4uTm6Ors7vDy9Pb4+vz+/wAAbmRpbgAA -AAAAAAY2AACXGgAAVjoAAFPKAACJ3gAAJ8IAABaoAABQDQAAVDkAAiuFAAIZmQABeFEAAwEAAAIAAAAA -AAEABgANABcAIwAxAEAAUgBlAHsAkwCrAMUA4gD/AR8BPwFhAYUBqgHQAfgCIAJLAncCpQLSAwIDMwNl -A5gDzgQFBD0EdQSvBOsFKQVnBacF6AYqBm4GtQb8B0UHkgfkCDkIkAjnCT4JmAn0ClAKrQsLC2sLygwq -DIwM8Q1XDcAOKA6SDv4PbA/bEE0QxBE7EbQSMRKwEzITuRREFNAVYBXxFocXHhfAGGIZBBmsGlQa+RuU -HC4czh1yHhQeux9jIA0gvCFoIhkizyOJJEEk+SW6JnknOygFKMspkypiKzIsASzXLawuhy9gMD4xGzH8 -MtszvzSgNYY2cjdcOEw5OTorOxs8CD0EPfU+6z/nQOFB2ELUQ9VE00XcRttH5EjxSgBLCUwdTTFOUE9v -UI9Rt1LdVAVVNlZsV6VY4FohW21ct135X09goGH0Y0tkqGYFZ19oxGova5ptCG54b/BxbnLsdG119Xd/ -eQh6knwqfcV/W4D4gpSEO4Xih4CJKorYjIqOOY/jkZuTWJUOlsyYiZpSnB6d4Z+soX+jWqUvpxOo+6rj -rMuuwLC4sra0rra0uL+60LzfvwDBHcLdxLXGhchYyi7MCs3lz7rRmtOA1WPXR9kq2xPc/97s4M/iveSn -5o3obupT7ELuLPAM8fLz0PW396H5f/tZ/T3//wAAAAEAAwALABYAJQA3AE0AZQCBAJ8AwQDlAQsBNQFh -AZABwQH1AisCZAKfAtwDHANfA6MD6gQ0BH8EzQT1BR0FcAXEBhsGdAbPBy0HXAeMB+4IUgi4CSAJVAmK -CfYKZArVC0cLgQu8DDIMqw0mDaIOIQ6hDyQPqRAvELgQ/RFDEc8SXRLuE4AUFRSrFUMV3RZ5FxcXthhY -GPwZoRpIGvEbnBxJHPgdqB5bHw8fxSB9ITch8iKwJDAk8yW3Jn4nRigQKNwpqSp5K0osHCzxLccuoC95 -MFUxMzISMvMz1TS5NaA2hzdxOFw5STo4Oyg8Gj4DPvs/9EDuQepD6ETpRexG8Uf3SP9LFEwhTTBOQE9S -UGZSklOrVMVV4Vb/WB5ZP1phW4Vcq13SXvthUmJ/Y69k4GYSZ0dofGm0au1tZG6ib+FxInJlc6l073Y2 -d396FXtjfLJ+A39VgKmB/4NWhK+GCYjCiiGLgYzjjkePrJESknuT5Ja8mCuZm5sMnH+d9J9qoOGiWqPV -pVGmz6eOqE6pzqtRrNSuWq/gsWmy8rR+tgu5Kbq6vE294b93wQ7Cp8RBxd3He8kZyrrLisxbzf/Po9FK -0vHUm9ZF1/HZn9tO3Cbc/96x4GTiGePQ5YjnQegf6Pzquex27jbv9/G583z0X/VC9wj40Pqa/GX+Mf// -AAAAAQADAAsAJQA3AE0AZQCBAJ8AwQELATUBYQGQAcEB9QIrAmQCnwLcAxwDXwOjA+oENAR/BM0FHQVw -BcQGGwZ0Bs8HLQeMB+4IUgi4CSAJign2CmQK1QtHC7wMMgyrDSYNog4hDqEPJA+pEC8QuBFDEl0S7hOA -FBUUqxVDFnkXFxe2GFgY/BpIGvEbnBxJHPgdqB8PH8UgfSE3IfIjbyQwJPMltydGKBAo3Cp5K0osHC3H -LqAveTEzMhIy8zS5NaA2hzhcOUk6ODwaPQ4+Az/0QO5C6EPoROlG8Uf3SglLFEwhTkBPUlF7UpJUxVXh -Vv9ZP1phXKtd0mAlYVJjr2TgZhJofGm0au1tZG6ib+FxInJldO92Nnd/eMl6FXyyfgN/VYCpgf+Er4YJ -h2WIwoohi4GOR4+skRKSe5PklVCWvJgrmZubDJx/nfSfaqDholqj1aVRps+oTqnOq1Gs1K2Xrlqv4LFp -svK0frYLt5m5Kbnxurq8Tb3hv3fBDsHawqfEQcUPxd3He8hKyRnKusuKzFvN/87Rz6PQdtFK0vHTxtSb -1kXXG9fx2MjZn9tO3Cbc/93Y3rHfiuBk4hni9ePQ5KzliOZk50HoH+j86drqueuX7HbtVu427xbv9/DX -8bnymvN89F/1QvYl9wj37PjQ+bX6mvt//GX9S/4x//8AAGRlc2MAAAAAAAAACkNvbG9yIExDRAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAABIAAAAcAEMAbwBsAG8AcgAgAEwAQwBE -AABtbW9kAAAAAAAABhAAAJxOAAAAAL5zkQAAAAAAAAAAAAAAAAAAAAAAdGV4dAAAAABDb3B5cmlnaHQg -QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA - - - - - - - - 400 - 75 - - - {565, 18} - {4, 2} - 1151868928 - NSActionCell - - 67239424 - 0 - Radio - - 1211912703 - 0 - - 549453824 - {18, 18} - - YES - - YES - - - - TU0AKgAABRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAADwRERGLJycnySsrK/A1NTXw -IyMjyRwcHIsJCQk8AAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFRUVdVBQUOCoqKj/ -29vb//n5+f/6+vr/2tra/6qqqv9UVFTgHx8fdQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUZGRl5 -dXV198PDw//8/Pz////////////////////////////U1NT/fHx89yUlJXkAAAAFAAAAAAAAAAAAAAAA -AAAAAxEREUZqamrmtbW1/+3t7f/+/v7//v7+//7+/v/9/f3//f39//39/f/39/f/xMTE/3d3d+YZGRlG -AAAAAwAAAAAAAAAAAAAACkJCQqGtra3/xsbG/+vr6//y8vL/9fX1//X19f/z8/P/9fX1//Ly8v/u7u7/ -0tLS/6+vr/9KSkqhAAAACgAAAAAAAAAAAAAAF3h4eN2/v7//z8/P/93d3f/q6ur/7+/v/+/v7//w8PD/ -7e3t/+3t7f/i4uL/zs7O/8XFxf98fHzdAAAAFwAAAAAAAAADAAAAJKSkpPjOzs7/2dnZ/+Dg4P/i4uL/ -5eXl/+bm5v/n5+f/5eXl/+Li4v/e3t7/2tra/9DQ0P+srKz4AAAAJAAAAAMAAAADAAAALrCwsPrW1tb/ -3t7e/+Tk5P/p6en/6+vr/+zs7P/p6en/6+vr/+fn5//k5OT/4ODg/9nZ2f+zs7P6AAAALgAAAAMAAAAD -AAAALp2dnezg4OD/5eXl/+rq6v/u7u7/8PDw//Dw8P/x8fH/8PDw/+7u7v/q6ur/5ubm/+Hh4f+ZmZns -AAAALgAAAAMAAAADAAAAJG5ubs/l5eX/6enp/+/v7//y8vL/9vb2//r6+v/5+fn/9/f3//b29v/x8fH/ -6+vr/+Tk5P9ra2vPAAAAJAAAAAMAAAAAAAAAFy4uLpPCwsL67Ozs//Pz8//5+fn//v7+//7+/v/+/v7/ -/v7+//v7+//19fX/8PDw/8LCwvosLCyTAAAAFwAAAAAAAAAAAAAACgAAAENfX1/S5OTk/vn5+f/+/v7/ -///////////////////////////8/Pz/5ubm/l9fX9IAAABDAAAACgAAAAAAAAAAAAAAAwAAABcAAABl -YmJi3NLS0v3////////////////////////////////V1dX9ZGRk3AAAAGUAAAAXAAAAAwAAAAAAAAAA -AAAAAAAAAAUAAAAfAAAAZTMzM8KAgIDwv7+//O3t7f/t7e3/v7+//ICAgPAzMzPCAAAAZQAAAB8AAAAF -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAFwAAAEMAAAB3AAAAnwAAALMAAACzAAAAnwAAAHcAAABD -AAAAFwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAoAAAAXAAAAJAAAAC4AAAAu -AAAAJAAAABcAAAAKAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQEAAAMAAAABABIAAAEB -AAMAAAABABIAAAECAAMAAAAEAAAFugEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES -AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABABIAAAEXAAQAAAABAAAFEAEcAAMAAAABAAEAAAFS -AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - - - - - - - - 400 - 75 - - - - - - - - - 268 - {{591, 59}, {178, 161}} - - YES - - 67239424 - 134217728 - Go! - - LucidaGrande - 10 - 16 - - - -2033434369 - 130 - - - 400 - 75 - - - - {787, 260} - - - {{0, 0}, {1440, 878}} - {1.79769e+308, 1.79769e+308} - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - showHelp: - - - - 122 - - - - clearRecentDocuments: - - - - 127 - - - - terminate: - - - - 139 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - hideOtherApplications: - - - - 146 - - - - hide: - - - - 152 - - - - unhideAllApplications: - - - - 153 - - - - cut: - - - - 175 - - - - paste: - - - - 176 - - - - redo: - - - - 178 - - - - selectAll: - - - - 179 - - - - undo: - - - - 180 - - - - copy: - - - - 181 - - - - showGuessPanel: - - - - 188 - - - - checkSpelling: - - - - 190 - - - - toggleContinuousSpellChecking: - - - - 192 - - - - performClose: - - - - 193 - - - - delete: - - - - 195 - - - - performZoom: - - - - 198 - - - - performFindPanelAction: - - - - 199 - - - - performFindPanelAction: - - - - 200 - - - - performFindPanelAction: - - - - 201 - - - - performFindPanelAction: - - - - 202 - - - - centerSelectionInVisibleArea: - - - - 203 - - - - pasteAsPlainText: - - - - 205 - - - - crash: - - - - 208 - - - - window_ - - - - 209 - - - - crash: - - - - 211 - - - - crash: - - - - 213 - - - - forkTestOptions_ - - - - 241 - - - - forkTestOptions: - - - - 242 - - - - forkTestOptions: - - - - 243 - - - - forkTestOptions: - - - - 244 - - - - forkTestGo: - - - - 250 - - - - forkTestOptions: - - - - 261 - - - - forkTestOptions: - - - - 262 - - - - showForkTestWindow: - - - - 283 - - - - generateReportWithoutCrash: - - - - 327 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 21 - - - YES - - - - Window - - - 2 - - - YES - - - - - - - - - - 206 - - - YES - - - - - - 210 - - - YES - - - - - - 212 - - - YES - - - - - - 218 - - - YES - - - - - - 325 - - - YES - - - - - - 29 - - - YES - - - - - - - - MainMenu - - - 19 - - - YES - - - - - - 24 - - - YES - - - - - - - - - 5 - - - - - 23 - - - - - 92 - - - - - 197 - - - - - 56 - - - YES - - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 129 - - - - - 131 - - - YES - - - - - - 130 - - - - - 134 - - - - - 136 - - - - - 143 - - - - - 144 - - - - - 145 - - - - - 149 - - - - - 150 - - - - - 196 - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 72 - - - - - 73 - - - - - 74 - - - - - 75 - - - - - 77 - - - - - 78 - - - - - 79 - - - - - 80 - - - - - 82 - - - - - 112 - - - - - 124 - - - YES - - - - - - 125 - - - YES - - - - - - 126 - - - - - 103 - - - YES - - - - - - 106 - - - YES - - - - - - 111 - - - - - 163 - - - YES - - - - - - 169 - - - YES - - - - - - - - - - - - - - - - - 156 - - - - - 157 - - - - - 158 - - - - - 160 - - - - - 164 - - - - - 168 - - - YES - - - - - - 159 - - - YES - - - - - - - - - - 154 - - - - - 155 - - - - - 161 - - - - - 162 - - - - - 167 - - - - - 171 - - - - - 172 - - - - - 173 - - - - - 174 - - - - - 184 - - - YES - - - - - - 185 - - - YES - - - - - - - - 187 - - - - - 189 - - - - - 191 - - - - - 204 - - - - - 207 - - - Controller - - - 220 - - - YES - - - - Window (Window) - - - 221 - - - YES - - - - - - - - - 226 - - - YES - - - - - - - - - 227 - - - - - 228 - - - - - 272 - - - - - 232 - - - YES - - - - - - - - - 233 - - - - - 234 - - - - - 236 - - - - - 237 - - - YES - - - - - - - - 238 - - - - - 239 - - - - - 248 - - - YES - - - - - - 329 - - - - - 330 - - - - - 331 - - - - - 332 - - - - - 333 - - - - - 334 - - - - - 335 - - - - - 336 - - - - - 337 - - - - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBPluginDependency - 106.ImportedFromIB2 - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 154.IBPluginDependency - 154.ImportedFromIB2 - 155.IBPluginDependency - 155.ImportedFromIB2 - 156.IBPluginDependency - 156.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 158.IBPluginDependency - 158.ImportedFromIB2 - 159.IBPluginDependency - 159.ImportedFromIB2 - 160.IBPluginDependency - 160.ImportedFromIB2 - 161.IBPluginDependency - 161.ImportedFromIB2 - 162.IBPluginDependency - 162.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 164.IBPluginDependency - 164.ImportedFromIB2 - 167.IBPluginDependency - 167.ImportedFromIB2 - 168.IBPluginDependency - 168.ImportedFromIB2 - 169.IBPluginDependency - 169.ImportedFromIB2 - 171.IBPluginDependency - 171.ImportedFromIB2 - 172.IBPluginDependency - 172.ImportedFromIB2 - 173.IBPluginDependency - 173.ImportedFromIB2 - 174.IBPluginDependency - 174.ImportedFromIB2 - 184.IBPluginDependency - 184.ImportedFromIB2 - 185.IBPluginDependency - 185.ImportedFromIB2 - 187.IBPluginDependency - 187.ImportedFromIB2 - 189.IBPluginDependency - 189.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 191.IBPluginDependency - 191.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 2.IBPluginDependency - 2.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.ImportedFromIB2 - 21.IBEditorWindowLastContentRect - 21.IBPluginDependency - 21.IBWindowTemplateEditedContentRect - 21.ImportedFromIB2 - 21.windowTemplate.hasMinSize - 21.windowTemplate.minSize - 210.IBPluginDependency - 210.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.IBWindowTemplateEditedContentRect - 220.ImportedFromIB2 - 221.IBPluginDependency - 221.ImportedFromIB2 - 226.IBPluginDependency - 226.ImportedFromIB2 - 227.IBPluginDependency - 227.ImportedFromIB2 - 228.IBPluginDependency - 228.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 232.IBPluginDependency - 232.ImportedFromIB2 - 233.IBPluginDependency - 233.ImportedFromIB2 - 234.IBPluginDependency - 234.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 237.IBPluginDependency - 237.ImportedFromIB2 - 238.IBPluginDependency - 238.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBPluginDependency - 24.ImportedFromIB2 - 248.IBPluginDependency - 248.ImportedFromIB2 - 272.IBPluginDependency - 272.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 325.IBPluginDependency - 325.ImportedFromIB2 - 329.IBPluginDependency - 330.IBPluginDependency - 331.IBPluginDependency - 332.IBPluginDependency - 333.IBPluginDependency - 334.IBPluginDependency - 335.IBPluginDependency - 336.IBPluginDependency - 337.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBPluginDependency - 57.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBPluginDependency - 81.ImportedFromIB2 - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - {{510, 1250}, {320, 188}} - com.apple.InterfaceBuilder.CocoaPlugin - {{510, 1250}, {320, 188}} - - - {213, 107} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{-55, 1287}, {787, 260}} - com.apple.InterfaceBuilder.CocoaPlugin - {{-55, 1287}, {787, 260}} - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{0, 1114}, {362, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 337 - - - - YES - - Controller - NSObject - - YES - - YES - crash: - forkTestGo: - forkTestOptions: - generateReportWithoutCrash: - showForkTestWindow: - - - YES - id - id - id - id - id - - - - YES - - YES - crash: - forkTestGo: - forkTestOptions: - generateReportWithoutCrash: - showForkTestWindow: - - - YES - - crash: - id - - - forkTestGo: - id - - - forkTestOptions: - id - - - generateReportWithoutCrash: - id - - - showForkTestWindow: - id - - - - - YES - - YES - forkTestOptions_ - window_ - - - YES - NSWindow - NSWindow - - - - YES - - YES - forkTestOptions_ - window_ - - - YES - - forkTestOptions_ - NSWindow - - - window_ - NSWindow - - - - - IBProjectSource - testapp/Controller.h - - - - Controller - NSObject - - IBUserSource - - - - - FirstResponder - NSObject - - IBUserSource - - - - - - YES - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - - clearRecentDocuments: - id - - - newDocument: - id - - - openDocument: - id - - - saveAllDocuments: - id - - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../../Breakpad.xcodeproj - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Info.plist deleted file mode 100644 index 6094ec6c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/Info.plist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - bomb - CFBundleIdentifier - com.Google.BreakpadTest - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - BreakpadProductDisplay - Breakpad Tester - BreakpadProduct - Breakpad_Tester - BreakpadVersion - 1.2.3.4 - BreakpadReportInterval - 10 - BreakpadSkipConfirm - NO - BreakpadSendAndExit - YES - BreakpadRequestEmail - YES - BreakpadRequestComments - YES - BreakpadVendor - Foo Bar Corp, Incorporated, LTD, LLC - BreakpadServerParameters - - Param1 - Value1 - Param2 - Value2 - - LSUIElement - 1 - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.h deleted file mode 100644 index 0a6d736d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@interface TestClass : NSObject { -} - -- (void)wait; - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.mm deleted file mode 100644 index 6e6a8833..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/TestClass.mm +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#import "TestClass.h" - -struct AStruct { - int x; - float y; - double z; -}; - -class InternalTestClass { - public: - InternalTestClass(int a) : a_(a) {} - ~InternalTestClass() {} - - void snooze(float a); - void snooze(int a); - int snooze(int a, float b); - - protected: - int a_; - AStruct s_; - - static void InternalFunction(AStruct &s); - static float kStaticFloatValue; -}; - -void InternalTestClass::snooze(float a) { - InternalFunction(s_); - sleep(a_ * a); -} - -void InternalTestClass::snooze(int a) { - InternalFunction(s_); - sleep(a_ * a); -} - -int InternalTestClass::snooze(int a, float b) { - InternalFunction(s_); - sleep(a_ * a * b); - - return 33; -} - -void InternalTestClass::InternalFunction(AStruct &s) { - s.x = InternalTestClass::kStaticFloatValue; -} - -float InternalTestClass::kStaticFloatValue = 42; - -static float PlainOldFunction() { - return 3.14145f; -} - -@implementation TestClass - -- (void)wait { - InternalTestClass t(10); - float z = PlainOldFunction(); - - while (1) { - t.snooze(z); - } -} - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/bomb.icns b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/bomb.icns deleted file mode 100644 index c360dbf6..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/bomb.icns and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashInMain b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashInMain deleted file mode 100755 index 03bb3172..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashInMain and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashduringload b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashduringload deleted file mode 100755 index 5ca9debb..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/crashduringload and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/main.m b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/main.m deleted file mode 100644 index 1ed19bf9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/testapp/main.m +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -int main(int argc, char *argv[]) { - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/BreakpadFramework_Test.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/BreakpadFramework_Test.mm deleted file mode 100644 index 2ea103c6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/BreakpadFramework_Test.mm +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// BreakpadFramework_Test.mm -// Test case file for Breakpad.h/mm. -// - -#import "GTMSenTestCase.h" -#import "Breakpad.h" - -#include - -@interface BreakpadFramework_Test : GTMTestCase { - @private - int last_exception_code_; - int last_exception_type_; - mach_port_t last_exception_thread_; - // We're not using Obj-C BOOL because we need to interop with - // Breakpad's callback. - bool shouldHandleException_; -} - -// This method is used by a callback used by test cases to determine -// whether to return true or false to Breakpad when handling an -// exception. -- (bool)shouldHandleException; -// This method returns a minimal dictionary that has what -// Breakpad needs to initialize. -- (NSMutableDictionary *)breakpadInitializationDictionary; -// This method is used by the exception handling callback -// to communicate to test cases the properites of the last -// exception. -- (void)setLastExceptionType:(int)type andCode:(int)code - andThread:(mach_port_t)thread; -@end - -// Callback for Breakpad exceptions -bool myBreakpadCallback(int exception_type, - int exception_code, - mach_port_t crashing_thread, - void *context); - -bool myBreakpadCallback(int exception_type, - int exception_code, - mach_port_t crashing_thread, - void *context) { - BreakpadFramework_Test *testCaseClass = - (BreakpadFramework_Test *)context; - [testCaseClass setLastExceptionType:exception_type - andCode:exception_code - andThread:crashing_thread]; - bool shouldHandleException = - [testCaseClass shouldHandleException]; - NSLog(@"Callback returning %d", shouldHandleException); - return shouldHandleException; -} -const int kNoLastExceptionCode = -1; -const int kNoLastExceptionType = -1; -const mach_port_t kNoLastExceptionThread = MACH_PORT_NULL; - -@implementation BreakpadFramework_Test -- (void) initializeExceptionStateVariables { - last_exception_code_ = kNoLastExceptionCode; - last_exception_type_ = kNoLastExceptionType; - last_exception_thread_ = kNoLastExceptionThread; -} - -- (NSMutableDictionary *)breakpadInitializationDictionary { - NSMutableDictionary *breakpadParams = - [NSMutableDictionary dictionaryWithCapacity:3]; - - [breakpadParams setObject:@"UnitTests" forKey:@BREAKPAD_PRODUCT]; - [breakpadParams setObject:@"1.0" forKey:@BREAKPAD_VERSION]; - [breakpadParams setObject:@"http://staging" forKey:@BREAKPAD_URL]; - return breakpadParams; -} - -- (bool)shouldHandleException { - return shouldHandleException_; -} - -- (void)setLastExceptionType:(int)type - andCode:(int)code - andThread:(mach_port_t)thread { - last_exception_type_ = type; - last_exception_code_ = code; - last_exception_thread_ = thread; -} - -// Test that the parameters mark required actually enable Breakpad to -// be initialized. -- (void)testBreakpadInstantiationWithRequiredParameters { - BreakpadRef b = BreakpadCreate([self breakpadInitializationDictionary]); - STAssertNotNULL(b, @"BreakpadCreate failed with required parameters"); - BreakpadRelease(b); -} - -// Test that Breakpad fails to initialize cleanly when required -// parameters are not present. -- (void)testBreakpadInstantiationWithoutRequiredParameters { - NSMutableDictionary *breakpadDictionary = - [self breakpadInitializationDictionary]; - - // Skip setting version, so that BreakpadCreate fails. - [breakpadDictionary removeObjectForKey:@BREAKPAD_VERSION]; - BreakpadRef b = BreakpadCreate(breakpadDictionary); - STAssertNULL(b, @"BreakpadCreate did not fail when missing a required" - " parameter!"); - - breakpadDictionary = [self breakpadInitializationDictionary]; - // Now test with no product - [breakpadDictionary removeObjectForKey:@BREAKPAD_PRODUCT]; - b = BreakpadCreate(breakpadDictionary); - STAssertNULL(b, @"BreakpadCreate did not fail when missing a required" - " parameter!"); - - breakpadDictionary = [self breakpadInitializationDictionary]; - // Now test with no URL - [breakpadDictionary removeObjectForKey:@BREAKPAD_URL]; - b = BreakpadCreate(breakpadDictionary); - STAssertNULL(b, @"BreakpadCreate did not fail when missing a required" - " parameter!"); - BreakpadRelease(b); -} - -// Test to ensure that when we call BreakpadAddUploadParameter, -// it's added to the dictionary correctly(this test depends on -// some internal details of Breakpad, namely, the special prefix -// that it uses to figure out which key/value pairs to upload). -- (void)testAddingBreakpadServerVariable { - NSMutableDictionary *breakpadDictionary = - [self breakpadInitializationDictionary]; - - BreakpadRef b = BreakpadCreate(breakpadDictionary); - STAssertNotNULL(b, @"BreakpadCreate failed with valid dictionary!"); - - BreakpadAddUploadParameter(b, - @"key", - @"value"); - - // Test that it did not add the key/value directly, e.g. without - // prepending the key with the prefix. - STAssertNil(BreakpadKeyValue(b, @"key"), - @"AddUploadParameter added key directly to dictionary" - " instead of prepending it!"); - - NSString *prependedKeyname = - [@BREAKPAD_SERVER_PARAMETER_PREFIX stringByAppendingString:@"key"]; - - STAssertEqualStrings(BreakpadKeyValue(b, prependedKeyname), - @"value", - @"Calling BreakpadAddUploadParameter did not prepend " - "key name"); - BreakpadRelease(b); -} - -// Test that when we do on-demand minidump generation, -// the exception code/type/thread are set properly. -- (void)testFilterCallbackReturnsFalse { - NSMutableDictionary *breakpadDictionary = - [self breakpadInitializationDictionary]; - - BreakpadRef b = BreakpadCreate(breakpadDictionary); - STAssertNotNULL(b, @"BreakpadCreate failed with valid dictionary!"); - BreakpadSetFilterCallback(b, &myBreakpadCallback, self); - - // This causes the callback to return false, meaning - // Breakpad won't take the exception - shouldHandleException_ = false; - - [self initializeExceptionStateVariables]; - STAssertEquals(last_exception_type_, kNoLastExceptionType, - @"Last exception type not initialized correctly."); - STAssertEquals(last_exception_code_, kNoLastExceptionCode, - @"Last exception code not initialized correctly."); - STAssertEquals(last_exception_thread_, kNoLastExceptionThread, - @"Last exception thread is not initialized correctly."); - - // Cause Breakpad's exception handler to be invoked. - BreakpadGenerateAndSendReport(b); - - STAssertEquals(last_exception_type_, 0, - @"Last exception type is not 0 for on demand"); - STAssertEquals(last_exception_code_, 0, - @"Last exception code is not 0 for on demand"); - STAssertEquals(last_exception_thread_, mach_thread_self(), - @"Last exception thread is not mach_thread_self() " - "for on demand"); -} - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.h deleted file mode 100644 index 53f6ae42..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GTMSenTestCase.h" -#import "SimpleStringDictionary.h" - -@interface SimpleStringDictionaryTest : GTMTestCase { - -} - -- (void)testKeyValueEntry; -- (void)testSimpleStringDictionary; -- (void)testSimpleStringDictionaryIterator; -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.mm deleted file mode 100644 index 94179cd2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/SimpleStringDictionaryTest.mm +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "SimpleStringDictionaryTest.h" -#import "SimpleStringDictionary.h" - -using google_breakpad::KeyValueEntry; -using google_breakpad::SimpleStringDictionary; -using google_breakpad::SimpleStringDictionaryIterator; - -@implementation SimpleStringDictionaryTest - -//============================================================================== -- (void)testKeyValueEntry { - KeyValueEntry entry; - - // Verify that initial state is correct - STAssertFalse(entry.IsActive(), @"Initial key value entry is active!"); - STAssertEquals(strlen(entry.GetKey()), (size_t)0, @"Empty key value did not " - @"have length 0"); - STAssertEquals(strlen(entry.GetValue()), (size_t)0, @"Empty key value did not " - @"have length 0"); - - // Try setting a key/value and then verify - entry.SetKeyValue("key1", "value1"); - STAssertEqualCStrings(entry.GetKey(), "key1", @"key was not equal to key1"); - STAssertEqualCStrings(entry.GetValue(), "value1", @"value was not equal"); - - // Try setting a new value - entry.SetValue("value3"); - - // Make sure the new value took - STAssertEqualCStrings(entry.GetValue(), "value3", @"value was not equal"); - - // Make sure the key didn't change - STAssertEqualCStrings(entry.GetKey(), "key1", @"key changed after setting " - @"value!"); - - // Try setting a new key/value and then verify - entry.SetKeyValue("key2", "value2"); - STAssertEqualCStrings(entry.GetKey(), "key2", @"New key was not equal to " - @"key2"); - STAssertEqualCStrings(entry.GetValue(), "value2", @"New value was not equal " - @"to value2"); - - // Clear the entry and verify the key and value are empty strings - entry.Clear(); - STAssertFalse(entry.IsActive(), @"Key value clear did not clear object"); - STAssertEquals(strlen(entry.GetKey()), (size_t)0, @"Length of cleared key " - @"was not 0"); - STAssertEquals(strlen(entry.GetValue()), (size_t)0, @"Length of cleared " - @"value was not 0!"); -} - -- (void)testEmptyKeyValueCombos { - KeyValueEntry entry; - entry.SetKeyValue(NULL, NULL); - STAssertEqualCStrings(entry.GetKey(), "", @"Setting NULL key did not return " - @"empty key!"); - STAssertEqualCStrings(entry.GetValue(), "", @"Setting NULL value did not " - @"set empty string value!"); -} - - -//============================================================================== -- (void)testSimpleStringDictionary { - // Make a new dictionary - SimpleStringDictionary *dict = new SimpleStringDictionary(); - STAssertTrue(dict != NULL, nil); - - // try passing in NULL for key - //dict->SetKeyValue(NULL, "bad"); // causes assert() to fire - - // Set three distinct values on three keys - dict->SetKeyValue("key1", "value1"); - dict->SetKeyValue("key2", "value2"); - dict->SetKeyValue("key3", "value3"); - - STAssertTrue(!strcmp(dict->GetValueForKey("key1"), "value1"), nil); - STAssertTrue(!strcmp(dict->GetValueForKey("key2"), "value2"), nil); - STAssertTrue(!strcmp(dict->GetValueForKey("key3"), "value3"), nil); - STAssertEquals(dict->GetCount(), 3, @"GetCount did not return 3"); - // try an unknown key - STAssertTrue(dict->GetValueForKey("key4") == NULL, nil); - - // try a NULL key - //STAssertTrue(dict->GetValueForKey(NULL) == NULL, nil); // asserts - - // Remove a key - dict->RemoveKey("key3"); - - // Now make sure it's not there anymore - STAssertTrue(dict->GetValueForKey("key3") == NULL, nil); - - // Remove a NULL key - //dict->RemoveKey(NULL); // will cause assert() to fire - - // Remove by setting value to NULL - dict->SetKeyValue("key2", NULL); - - // Now make sure it's not there anymore - STAssertTrue(dict->GetValueForKey("key2") == NULL, nil); -} - -//============================================================================== -// The idea behind this test is to add a bunch of values to the dictionary, -// remove some in the middle, then add a few more in. We then create a -// SimpleStringDictionaryIterator and iterate through the dictionary, taking -// note of the key/value pairs we see. We then verify that it iterates -// through exactly the number of key/value pairs we expect, and that they -// match one-for-one with what we would expect. In all cases we're setting -// key value pairs of the form: -// -// key/value (like key0/value0, key17,value17, etc.) -// -- (void)testSimpleStringDictionaryIterator { - SimpleStringDictionary *dict = new SimpleStringDictionary(); - STAssertTrue(dict != NULL, nil); - - char key[KeyValueEntry::MAX_STRING_STORAGE_SIZE]; - char value[KeyValueEntry::MAX_STRING_STORAGE_SIZE]; - - const int kDictionaryCapacity = SimpleStringDictionary::MAX_NUM_ENTRIES; - const int kPartitionIndex = kDictionaryCapacity - 5; - - // We assume at least this size in the tests below - STAssertTrue(kDictionaryCapacity >= 64, nil); - - // We'll keep track of the number of key/value pairs we think should - // be in the dictionary - int expectedDictionarySize = 0; - - // Set a bunch of key/value pairs like key0/value0, key1/value1, ... - for (int i = 0; i < kPartitionIndex; ++i) { - sprintf(key, "key%d", i); - sprintf(value, "value%d", i); - dict->SetKeyValue(key, value); - } - expectedDictionarySize = kPartitionIndex; - - // set a couple of the keys twice (with the same value) - should be nop - dict->SetKeyValue("key2", "value2"); - dict->SetKeyValue("key4", "value4"); - dict->SetKeyValue("key15", "value15"); - - // Remove some random elements in the middle - dict->RemoveKey("key7"); - dict->RemoveKey("key18"); - dict->RemoveKey("key23"); - dict->RemoveKey("key31"); - expectedDictionarySize -= 4; // we just removed four key/value pairs - - // Set some more key/value pairs like key59/value59, key60/value60, ... - for (int i = kPartitionIndex; i < kDictionaryCapacity; ++i) { - sprintf(key, "key%d", i); - sprintf(value, "value%d", i); - dict->SetKeyValue(key, value); - } - expectedDictionarySize += kDictionaryCapacity - kPartitionIndex; - - // Now create an iterator on the dictionary - SimpleStringDictionaryIterator iter(*dict); - - // We then verify that it iterates through exactly the number of - // key/value pairs we expect, and that they match one-for-one with what we - // would expect. The ordering of the iteration does not matter... - - // used to keep track of number of occurrences found for key/value pairs - int count[kDictionaryCapacity]; - memset(count, 0, sizeof(count)); - - int totalCount = 0; - - const KeyValueEntry *entry; - - while ((entry = iter.Next())) { - totalCount++; - - // Extract keyNumber from a string of the form key - int keyNumber; - sscanf(entry->GetKey(), "key%d", &keyNumber); - - // Extract valueNumber from a string of the form value - int valueNumber; - sscanf(entry->GetValue(), "value%d", &valueNumber); - - // The value number should equal the key number since that's how we set them - STAssertTrue(keyNumber == valueNumber, nil); - - // Key and value numbers should be in proper range: - // 0 <= keyNumber < kDictionaryCapacity - bool isKeyInGoodRange = - (keyNumber >= 0 && keyNumber < kDictionaryCapacity); - bool isValueInGoodRange = - (valueNumber >= 0 && valueNumber < kDictionaryCapacity); - STAssertTrue(isKeyInGoodRange, nil); - STAssertTrue(isValueInGoodRange, nil); - - if (isKeyInGoodRange && isValueInGoodRange) { - ++count[keyNumber]; - } - } - - // Make sure each of the key/value pairs showed up exactly one time, except - // for the ones which we removed. - for (int i = 0; i < kDictionaryCapacity; ++i) { - // Skip over key7, key18, key23, and key31, since we removed them - if (!(i == 7 || i == 18 || i == 23 || i == 31)) { - STAssertTrue(count[i] == 1, nil); - } - } - - // Make sure the number of iterations matches the expected dictionary size. - STAssertTrue(totalCount == expectedDictionarySize, nil); -} - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/auto_tempdir.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/auto_tempdir.h deleted file mode 100644 index b6473a5c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/auto_tempdir.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Utility class for creating a temporary directory for unit tests -// that is deleted in the destructor. -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_AUTO_TEMPDIR -#define GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_AUTO_TEMPDIR - -#include -#include - -#include - -namespace google_breakpad { - -class AutoTempDir { - public: - AutoTempDir() { - char tempDir[16] = "/tmp/XXXXXXXXXX"; - mkdtemp(tempDir); - path = tempDir; - } - - ~AutoTempDir() { - // First remove any files in the dir - DIR* dir = opendir(path.c_str()); - if (!dir) - return; - - dirent* entry; - while ((entry = readdir(dir)) != NULL) { - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) - continue; - std::string entryPath = path + "/" + entry->d_name; - unlink(entryPath.c_str()); - } - closedir(dir); - rmdir(path.c_str()); - } - - std::string path; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_AUTO_TEMPDIR diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/crash_generation_server_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/crash_generation_server_test.cc deleted file mode 100644 index fdb9cdd1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/crash_generation_server_test.cc +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// crash_generation_server_test.cc -// Unit tests for CrashGenerationServer - -#include -#include -#include -#include -#include - -#include - -#include "breakpad_googletest_includes.h" -#include "client/mac/crash_generation/client_info.h" -#include "client/mac/crash_generation/crash_generation_client.h" -#include "client/mac/crash_generation/crash_generation_server.h" -#include "client/mac/handler/exception_handler.h" -#include "client/mac/tests/auto_tempdir.h" -#include "client/mac/tests/spawn_child_process.h" -#include "google_breakpad/processor/minidump.h" - -namespace google_breakpad { -// This acts as the log sink for INFO logging from the processor -// logging code. The logging output confuses XCode and makes it think -// there are unit test failures. testlogging.h handles the overriding. -std::ostringstream info_log; -} - -namespace { -using std::string; -using google_breakpad::AutoTempDir; -using google_breakpad::ClientInfo; -using google_breakpad::CrashGenerationClient; -using google_breakpad::CrashGenerationServer; -using google_breakpad::ExceptionHandler; -using google_breakpad::Minidump; -using google_breakpad::MinidumpContext; -using google_breakpad::MinidumpException; -using google_breakpad::MinidumpModule; -using google_breakpad::MinidumpModuleList; -using google_breakpad::MinidumpSystemInfo; -using google_breakpad::MinidumpThread; -using google_breakpad::MinidumpThreadList; -using testing::Test; -using namespace google_breakpad_test; - -class CrashGenerationServerTest : public Test { -public: - // The port name to receive messages on - char mach_port_name[128]; - // Filename of the last dump that was generated - string last_dump_name; - // PID of the child process - pid_t child_pid; - // A temp dir - AutoTempDir temp_dir; - // Counter just to ensure that we don't hit the same port again - static int i; - - void SetUp() { - sprintf(mach_port_name, - "com.google.breakpad.ServerTest.%d.%d", getpid(), - CrashGenerationServerTest::i++); - child_pid = (pid_t)-1; - } -}; -int CrashGenerationServerTest::i = 0; - -// Test that starting and stopping a server works -TEST_F(CrashGenerationServerTest, testStartStopServer) { - CrashGenerationServer server(mach_port_name, - NULL, // dump callback - NULL, // dump context - NULL, // exit callback - NULL, // exit context - false, // generate dumps - ""); // dump path - ASSERT_TRUE(server.Start()); - ASSERT_TRUE(server.Stop()); -} - -// Test that requesting a dump via CrashGenerationClient works -// Test without actually dumping -TEST_F(CrashGenerationServerTest, testRequestDumpNoDump) { - CrashGenerationServer server(mach_port_name, - NULL, // dump callback - NULL, // dump context - NULL, // exit callback - NULL, // exit context - false, // don't generate dumps - temp_dir.path); // dump path - ASSERT_TRUE(server.Start()); - - pid_t pid = fork(); - ASSERT_NE(-1, pid); - if (pid == 0) { - CrashGenerationClient client(mach_port_name); - bool result = client.RequestDump(); - exit(result ? 0 : 1); - } - - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_TRUE(WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - EXPECT_TRUE(server.Stop()); - // check that no minidump was written - string pattern = temp_dir.path + "/*"; - glob_t dirContents; - ret = glob(pattern.c_str(), GLOB_NOSORT, NULL, &dirContents); - EXPECT_EQ(GLOB_NOMATCH, ret); - if (ret != GLOB_NOMATCH) - globfree(&dirContents); -} - -void dumpCallback(void *context, const ClientInfo &client_info, - const std::string &file_path) { - if (context) { - CrashGenerationServerTest* self = - reinterpret_cast(context); - if (!file_path.empty()) - self->last_dump_name = file_path; - self->child_pid = client_info.pid(); - } -} - -void *RequestDump(void *context) { - CrashGenerationClient client((const char*)context); - bool result = client.RequestDump(); - return (void*)(result ? 0 : 1); -} - -// Test that actually writing a minidump works -TEST_F(CrashGenerationServerTest, testRequestDump) { - CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path - ASSERT_TRUE(server.Start()); - - pid_t pid = fork(); - ASSERT_NE(-1, pid); - if (pid == 0) { - // Have to spawn off a separate thread to request the dump, - // because MinidumpGenerator assumes the handler thread is not - // the only thread - pthread_t thread; - if (pthread_create(&thread, NULL, RequestDump, (void*)mach_port_name) != 0) - exit(1); - void* result; - pthread_join(thread, &result); - exit(reinterpret_cast(result)); - } - - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_TRUE(WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - EXPECT_TRUE(server.Stop()); - // check that minidump was written - ASSERT_FALSE(last_dump_name.empty()); - struct stat st; - EXPECT_EQ(0, stat(last_dump_name.c_str(), &st)); - EXPECT_LT(0, st.st_size); - // check client's PID - ASSERT_EQ(pid, child_pid); -} - -static void Crasher() { - int *a = (int*)0x42; - - fprintf(stdout, "Going to crash...\n"); - fprintf(stdout, "A = %d", *a); -} - -// Test that crashing a child process with an OOP ExceptionHandler installed -// results in a minidump being written by the CrashGenerationServer in -// the parent. -TEST_F(CrashGenerationServerTest, testChildProcessCrash) { - CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path - ASSERT_TRUE(server.Start()); - - pid_t pid = fork(); - ASSERT_NE(-1, pid); - if (pid == 0) { - // Instantiate an OOP exception handler. - ExceptionHandler eh("", NULL, NULL, NULL, true, mach_port_name); - Crasher(); - // not reached - exit(0); - } - - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_FALSE(WIFEXITED(ret)); - EXPECT_TRUE(server.Stop()); - // check that minidump was written - ASSERT_FALSE(last_dump_name.empty()); - struct stat st; - EXPECT_EQ(0, stat(last_dump_name.c_str(), &st)); - EXPECT_LT(0, st.st_size); - - // Read the minidump, sanity check some data. - Minidump minidump(last_dump_name.c_str()); - ASSERT_TRUE(minidump.Read()); - - MinidumpSystemInfo* system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(system_info); - const MDRawSystemInfo* raw_info = system_info->system_info(); - ASSERT_TRUE(raw_info); - EXPECT_EQ(kNativeArchitecture, raw_info->processor_architecture); - - MinidumpThreadList* thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list); - ASSERT_EQ((unsigned int)1, thread_list->thread_count()); - - MinidumpThread* main_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(main_thread); - MinidumpContext* context = main_thread->GetContext(); - ASSERT_TRUE(context); - EXPECT_EQ(kNativeContext, context->GetContextCPU()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* main_module = module_list->GetMainModule(); - ASSERT_TRUE(main_module); - EXPECT_EQ(GetExecutablePath(), main_module->code_file()); -} - -#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6) && \ - (defined(__x86_64__) || defined(__i386__)) -// Test that crashing a child process of a different architecture -// produces a valid minidump. -TEST_F(CrashGenerationServerTest, testChildProcessCrashCrossArchitecture) { - CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path - ASSERT_TRUE(server.Start()); - - // Spawn a child process - string helper_path = GetHelperPath(); - const char* argv[] = { - helper_path.c_str(), - "crash", - mach_port_name, - NULL - }; - pid_t pid = spawn_child_process(argv); - ASSERT_NE(-1, pid); - - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_FALSE(WIFEXITED(ret)); - EXPECT_TRUE(server.Stop()); - // check that minidump was written - ASSERT_FALSE(last_dump_name.empty()); - struct stat st; - EXPECT_EQ(0, stat(last_dump_name.c_str(), &st)); - EXPECT_LT(0, st.st_size); - -const MDCPUArchitecture kExpectedArchitecture = -#if defined(__x86_64__) - MD_CPU_ARCHITECTURE_X86 -#elif defined(__i386__) - MD_CPU_ARCHITECTURE_AMD64 -#endif - ; -const u_int32_t kExpectedContext = -#if defined(__i386__) - MD_CONTEXT_AMD64 -#elif defined(__x86_64__) - MD_CONTEXT_X86 -#endif - ; - - // Read the minidump, sanity check some data. - Minidump minidump(last_dump_name.c_str()); - ASSERT_TRUE(minidump.Read()); - - MinidumpSystemInfo* system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(system_info); - const MDRawSystemInfo* raw_info = system_info->system_info(); - ASSERT_TRUE(raw_info); - EXPECT_EQ(kExpectedArchitecture, raw_info->processor_architecture); - - MinidumpThreadList* thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list); - ASSERT_EQ((unsigned int)1, thread_list->thread_count()); - - MinidumpThread* main_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(main_thread); - MinidumpContext* context = main_thread->GetContext(); - ASSERT_TRUE(context); - EXPECT_EQ(kExpectedContext, context->GetContextCPU()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* main_module = module_list->GetMainModule(); - ASSERT_TRUE(main_module); - EXPECT_EQ(helper_path, main_module->code_file()); -} -#endif - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/exception_handler_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/exception_handler_test.cc deleted file mode 100644 index b1b74ef1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/exception_handler_test.cc +++ /dev/null @@ -1,698 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exception_handler_test.cc: Unit tests for google_breakpad::ExceptionHandler - -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "client/mac/handler/exception_handler.h" -#include "client/mac/tests/auto_tempdir.h" -#include "common/mac/MachIPC.h" -#include "google_breakpad/processor/minidump.h" - -namespace google_breakpad { -// This acts as the log sink for INFO logging from the processor -// logging code. The logging output confuses XCode and makes it think -// there are unit test failures. testlogging.h handles the overriding. -std::ostringstream info_log; -} - -namespace { -using std::string; -using google_breakpad::AutoTempDir; -using google_breakpad::ExceptionHandler; -using google_breakpad::MachPortSender; -using google_breakpad::MachReceiveMessage; -using google_breakpad::MachSendMessage; -using google_breakpad::Minidump; -using google_breakpad::MinidumpContext; -using google_breakpad::MinidumpException; -using google_breakpad::MinidumpMemoryList; -using google_breakpad::MinidumpMemoryRegion; -using google_breakpad::ReceivePort; -using testing::Test; - -class ExceptionHandlerTest : public Test { - public: - AutoTempDir tempDir; - string lastDumpName; -}; - -static void Crasher() { - int *a = (int*)0x42; - - fprintf(stdout, "Going to crash...\n"); - fprintf(stdout, "A = %d", *a); -} - -static void SoonToCrash() { - Crasher(); -} - -static bool MDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { - string path(dump_dir); - path.append("/"); - path.append(file_name); - path.append(".dmp"); - - int fd = *reinterpret_cast(context); - (void)write(fd, path.c_str(), path.length() + 1); - close(fd); - exit(0); - // not reached - return true; -} - -TEST_F(ExceptionHandlerTest, InProcess) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - // Fork off a child process so it can crash. - pid_t pid = fork(); - if (pid == 0) { - // In the child process. - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - // crash - SoonToCrash(); - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); -} - -static bool DumpNameMDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { - ExceptionHandlerTest *self = reinterpret_cast(context); - if (dump_dir && file_name) { - self->lastDumpName = dump_dir; - self->lastDumpName += "/"; - self->lastDumpName += file_name; - self->lastDumpName += ".dmp"; - } - return true; -} - -TEST_F(ExceptionHandlerTest, WriteMinidump) { - ExceptionHandler eh(tempDir.path, NULL, DumpNameMDCallback, this, true, NULL); - ASSERT_TRUE(eh.WriteMinidump()); - - // Ensure that minidump file exists and is > 0 bytes. - ASSERT_FALSE(lastDumpName.empty()); - struct stat st; - ASSERT_EQ(0, stat(lastDumpName.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // The minidump should not contain an exception stream. - Minidump minidump(lastDumpName); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - EXPECT_FALSE(exception); -} - -TEST_F(ExceptionHandlerTest, WriteMinidumpWithException) { - ExceptionHandler eh(tempDir.path, NULL, DumpNameMDCallback, this, true, NULL); - ASSERT_TRUE(eh.WriteMinidump(true)); - - // Ensure that minidump file exists and is > 0 bytes. - ASSERT_FALSE(lastDumpName.empty()); - struct stat st; - ASSERT_EQ(0, stat(lastDumpName.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // The minidump should contain an exception stream. - Minidump minidump(lastDumpName); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - ASSERT_TRUE(exception); - const MDRawExceptionStream* raw_exception = exception->exception(); - ASSERT_TRUE(raw_exception); - - EXPECT_EQ(MD_EXCEPTION_MAC_BREAKPOINT, - raw_exception->exception_record.exception_code); -} - -TEST_F(ExceptionHandlerTest, DumpChildProcess) { - const int kTimeoutMs = 2000; - // Create a mach port to receive the child task on. - char machPortName[128]; - sprintf(machPortName, "ExceptionHandlerTest.%d", getpid()); - ReceivePort parent_recv_port(machPortName); - - // Give the child process a pipe to block on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - // Fork off a child process to dump. - pid_t pid = fork(); - if (pid == 0) { - // In the child process - close(fds[1]); - - // Send parent process the task and thread ports. - MachSendMessage child_message(0); - child_message.AddDescriptor(mach_task_self()); - child_message.AddDescriptor(mach_thread_self()); - - MachPortSender child_sender(machPortName); - if (child_sender.SendMessage(child_message, kTimeoutMs) != KERN_SUCCESS) - exit(1); - - // Wait for the parent process. - uint8_t data; - read(fds[0], &data, 1); - exit(0); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[0]); - - // Read the child's task and thread ports. - MachReceiveMessage child_message; - ASSERT_EQ(KERN_SUCCESS, - parent_recv_port.WaitForMessage(&child_message, kTimeoutMs)); - mach_port_t child_task = child_message.GetTranslatedPort(0); - mach_port_t child_thread = child_message.GetTranslatedPort(1); - ASSERT_NE((mach_port_t)MACH_PORT_NULL, child_task); - ASSERT_NE((mach_port_t)MACH_PORT_NULL, child_thread); - - // Write a minidump of the child process. - bool result = ExceptionHandler::WriteMinidumpForChild(child_task, - child_thread, - tempDir.path, - DumpNameMDCallback, - this); - ASSERT_EQ(true, result); - - // Ensure that minidump file exists and is > 0 bytes. - ASSERT_FALSE(lastDumpName.empty()); - struct stat st; - ASSERT_EQ(0, stat(lastDumpName.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // Unblock child process - uint8_t data = 1; - (void)write(fds[1], &data, 1); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); -} - -// Test that memory around the instruction pointer is written -// to the dump as a MinidumpMemoryRegion. -TEST_F(ExceptionHandlerTest, InstructionPointerMemory) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = 256; // bytes - const int kOffset = kMemorySize / 2; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them in the middle - // of the block of memory, because the minidump should contain 128 - // bytes on either side of the instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[1]); - - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_file); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_NE((unsigned int)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - EXPECT_TRUE(region); - - EXPECT_EQ(kMemorySize, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kOffset]; - u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); -} - -// Test that the memory region around the instruction pointer is -// bounded correctly on the low end. -TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMinBound) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - const u_int32_t kMemorySize = 256; // bytes - const int kOffset = 0; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them at the start - // of the block of memory, to ensure that the memory bounding - // works properly. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[1]); - - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_file); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_NE((unsigned int)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - EXPECT_TRUE(region); - - EXPECT_EQ(kMemorySize / 2, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)]; - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); -} - -// Test that the memory region around the instruction pointer is -// bounded correctly on the high end. -TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. - // Use 4k here because the OS will hand out a single page even - // if a smaller size is requested, and this test wants to - // test the upper bound of the memory range. - const u_int32_t kMemorySize = 4096; // bytes - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - const int kOffset = kMemorySize - sizeof(instructions); - - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - // Get some executable memory. - char* memory = - reinterpret_cast(mmap(NULL, - kMemorySize, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANON, - -1, - 0)); - if (!memory) - exit(0); - - // Write some instructions that will crash. Put them at the start - // of the block of memory, to ensure that the memory bounding - // works properly. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - memory_function(); - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[1]); - - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - Minidump minidump(minidump_file); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_NE((unsigned int)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - case MD_CONTEXT_ARM: - instruction_pointer = context->GetContextARM()->iregs[15]; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - EXPECT_TRUE(region); - - const size_t kPrefixSize = 128; // bytes - EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kPrefixSize]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kPrefixSize, - instructions, sizeof(instructions)) == 0); -} - -// Ensure that an extra memory block doesn't get added when the -// instruction pointer is not in mapped memory. -TEST_F(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - // Try calling a NULL pointer. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(NULL); - memory_function(); - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[1]); - - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is only one memory region - // in the memory list (the thread memory from the single thread). - Minidump minidump(minidump_file); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_EQ((unsigned int)1, memory_list->region_count()); -} - -static void *Junk(void *) { - sleep(1000000); - return NULL; -} - -// Test that the memory list gets written correctly when multiple -// threads are running. -TEST_F(ExceptionHandlerTest, MemoryListMultipleThreads) { - // Give the child process a pipe to report back on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL); - - // Run an extra thread so >2 memory regions will be written. - pthread_t junk_thread; - if (pthread_create(&junk_thread, NULL, Junk, NULL) == 0) - pthread_detach(junk_thread); - - // Just crash. - Crasher(); - - // not reached - exit(1); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[1]); - - // Wait for the background process to return the minidump file. - close(fds[1]); - char minidump_file[PATH_MAX]; - ssize_t nbytes = read(fds[0], minidump_file, sizeof(minidump_file)); - ASSERT_NE(0, nbytes); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(minidump_file, &st)); - ASSERT_LT(0, st.st_size); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump, and verify that the memory list can be read. - Minidump minidump(minidump_file); - ASSERT_TRUE(minidump.Read()); - - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(memory_list); - // Verify that there are three memory regions: - // one per thread, and one for the instruction pointer memory. - ASSERT_EQ((unsigned int)3, memory_list->region_count()); -} - -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test.cc deleted file mode 100644 index f9cf75af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test.cc +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator_test.cc: Unit tests for google_breakpad::MinidumpGenerator - -#include -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif -#include -#include - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "client/mac/handler/minidump_generator.h" -#include "client/mac/tests/auto_tempdir.h" -#include "client/mac/tests/spawn_child_process.h" -#include "common/mac/MachIPC.h" -#include "google_breakpad/processor/minidump.h" - -namespace google_breakpad { -// This acts as the log sink for INFO logging from the processor -// logging code. The logging output confuses XCode and makes it think -// there are unit test failures. testlogging.h handles the overriding. -std::ostringstream info_log; -} - -namespace { -using std::string; -using std::vector; -using google_breakpad::AutoTempDir; -using google_breakpad::MinidumpGenerator; -using google_breakpad::MachPortSender; -using google_breakpad::MachReceiveMessage; -using google_breakpad::MachSendMessage; -using google_breakpad::Minidump; -using google_breakpad::MinidumpContext; -using google_breakpad::MinidumpException; -using google_breakpad::MinidumpModule; -using google_breakpad::MinidumpModuleList; -using google_breakpad::MinidumpSystemInfo; -using google_breakpad::MinidumpThread; -using google_breakpad::MinidumpThreadList; -using google_breakpad::ReceivePort; -using testing::Test; -using namespace google_breakpad_test; - -class MinidumpGeneratorTest : public Test { - public: - AutoTempDir tempDir; -}; - -static void *Junk(void* data) { - bool* wait = reinterpret_cast(data); - while (!*wait) { - usleep(10000); - } - return NULL; -} - -TEST_F(MinidumpGeneratorTest, InProcess) { - MinidumpGenerator generator; - string dump_filename = MinidumpGenerator::UniqueNameInDirectory(tempDir.path, - NULL); - - // Run an extra thread since MinidumpGenerator assumes there - // are 2 or more threads. - pthread_t junk_thread; - bool quit = false; - ASSERT_EQ(0, pthread_create(&junk_thread, NULL, Junk, &quit)); - - ASSERT_TRUE(generator.Write(dump_filename.c_str())); - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(dump_filename.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // join the background thread - quit = true; - pthread_join(junk_thread, NULL); - - // Read the minidump, sanity check some data. - Minidump minidump(dump_filename.c_str()); - ASSERT_TRUE(minidump.Read()); - - MinidumpSystemInfo* system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(system_info); - const MDRawSystemInfo* raw_info = system_info->system_info(); - ASSERT_TRUE(raw_info); - EXPECT_EQ(kNativeArchitecture, raw_info->processor_architecture); - - MinidumpThreadList* thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list); - ASSERT_EQ((unsigned int)1, thread_list->thread_count()); - - MinidumpThread* main_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(main_thread); - MinidumpContext* context = main_thread->GetContext(); - ASSERT_TRUE(context); - EXPECT_EQ(kNativeContext, context->GetContextCPU()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* main_module = module_list->GetMainModule(); - ASSERT_TRUE(main_module); - EXPECT_EQ(GetExecutablePath(), main_module->code_file()); -} - -TEST_F(MinidumpGeneratorTest, OutOfProcess) { - const int kTimeoutMs = 2000; - // Create a mach port to receive the child task on. - char machPortName[128]; - sprintf(machPortName, "MinidumpGeneratorTest.OutOfProcess.%d", getpid()); - ReceivePort parent_recv_port(machPortName); - - // Give the child process a pipe to block on. - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - - // Fork off a child process to dump. - pid_t pid = fork(); - if (pid == 0) { - // In the child process - close(fds[1]); - - // Send parent process the task port. - MachSendMessage child_message(0); - child_message.AddDescriptor(mach_task_self()); - - MachPortSender child_sender(machPortName); - if (child_sender.SendMessage(child_message, kTimeoutMs) != KERN_SUCCESS) { - fprintf(stderr, "Error sending message from child process!\n"); - exit(1); - } - - // Wait for the parent process. - uint8_t data; - read(fds[0], &data, 1); - exit(0); - } - // In the parent process. - ASSERT_NE(-1, pid); - close(fds[0]); - - // Read the child's task port. - MachReceiveMessage child_message; - ASSERT_EQ(KERN_SUCCESS, - parent_recv_port.WaitForMessage(&child_message, kTimeoutMs)); - mach_port_t child_task = child_message.GetTranslatedPort(0); - ASSERT_NE((mach_port_t)MACH_PORT_NULL, child_task); - - // Write a minidump of the child process. - MinidumpGenerator generator(child_task, MACH_PORT_NULL); - string dump_filename = MinidumpGenerator::UniqueNameInDirectory(tempDir.path, - NULL); - ASSERT_TRUE(generator.Write(dump_filename.c_str())); - - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(dump_filename.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // Unblock child process - uint8_t data = 1; - (void)write(fds[1], &data, 1); - - // Child process should have exited with a zero status. - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - EXPECT_NE(0, WIFEXITED(ret)); - EXPECT_EQ(0, WEXITSTATUS(ret)); - - // Read the minidump, sanity check some data. - Minidump minidump(dump_filename.c_str()); - ASSERT_TRUE(minidump.Read()); - - MinidumpSystemInfo* system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(system_info); - const MDRawSystemInfo* raw_info = system_info->system_info(); - ASSERT_TRUE(raw_info); - EXPECT_EQ(kNativeArchitecture, raw_info->processor_architecture); - - MinidumpThreadList* thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list); - ASSERT_EQ((unsigned int)1, thread_list->thread_count()); - - MinidumpThread* main_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(main_thread); - MinidumpContext* context = main_thread->GetContext(); - ASSERT_TRUE(context); - EXPECT_EQ(kNativeContext, context->GetContextCPU()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* main_module = module_list->GetMainModule(); - ASSERT_TRUE(main_module); - EXPECT_EQ(GetExecutablePath(), main_module->code_file()); -} - -// This test fails on 10.5, but I don't have easy access to a 10.5 machine, -// so it's simpler to just limit it to 10.6 for now. -#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6) && \ - (defined(__x86_64__) || defined(__i386__)) - -TEST_F(MinidumpGeneratorTest, CrossArchitectureDump) { - const int kTimeoutMs = 5000; - // Create a mach port to receive the child task on. - char machPortName[128]; - sprintf(machPortName, - "MinidumpGeneratorTest.CrossArchitectureDump.%d", getpid()); - - ReceivePort parent_recv_port(machPortName); - - // Spawn a child process to dump. - string helper_path = GetHelperPath(); - const char* argv[] = { - helper_path.c_str(), - machPortName, - NULL - }; - pid_t pid = spawn_child_process(argv); - ASSERT_NE(-1, pid); - - // Read the child's task port. - MachReceiveMessage child_message; - ASSERT_EQ(KERN_SUCCESS, - parent_recv_port.WaitForMessage(&child_message, kTimeoutMs)); - mach_port_t child_task = child_message.GetTranslatedPort(0); - ASSERT_NE((mach_port_t)MACH_PORT_NULL, child_task); - - // Write a minidump of the child process. - MinidumpGenerator generator(child_task, MACH_PORT_NULL); - string dump_filename = MinidumpGenerator::UniqueNameInDirectory(tempDir.path, - NULL); - ASSERT_TRUE(generator.Write(dump_filename.c_str())); - - // Ensure that minidump file exists and is > 0 bytes. - struct stat st; - ASSERT_EQ(0, stat(dump_filename.c_str(), &st)); - ASSERT_LT(0, st.st_size); - - // Kill child process. - kill(pid, SIGKILL); - - int ret; - ASSERT_EQ(pid, waitpid(pid, &ret, 0)); - -const MDCPUArchitecture kExpectedArchitecture = -#if defined(__x86_64__) - MD_CPU_ARCHITECTURE_X86 -#elif defined(__i386__) - MD_CPU_ARCHITECTURE_AMD64 -#endif - ; -const u_int32_t kExpectedContext = -#if defined(__i386__) - MD_CONTEXT_AMD64 -#elif defined(__x86_64__) - MD_CONTEXT_X86 -#endif - ; - - // Read the minidump, sanity check some data. - Minidump minidump(dump_filename.c_str()); - ASSERT_TRUE(minidump.Read()); - - MinidumpSystemInfo* system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(system_info); - const MDRawSystemInfo* raw_info = system_info->system_info(); - ASSERT_TRUE(raw_info); - EXPECT_EQ(kExpectedArchitecture, raw_info->processor_architecture); - - MinidumpThreadList* thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list); - ASSERT_EQ((unsigned int)1, thread_list->thread_count()); - - MinidumpThread* main_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(main_thread); - MinidumpContext* context = main_thread->GetContext(); - ASSERT_TRUE(context); - EXPECT_EQ(kExpectedContext, context->GetContextCPU()); - - MinidumpModuleList* module_list = minidump.GetModuleList(); - ASSERT_TRUE(module_list); - const MinidumpModule* main_module = module_list->GetMainModule(); - ASSERT_TRUE(main_module); - EXPECT_EQ(helper_path, main_module->code_file()); -} -#endif // 10.6 && (x86-64 || i386) - -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test_helper.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test_helper.cc deleted file mode 100644 index 4e8ce3cf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/minidump_generator_test_helper.cc +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator_test_helper.cc: A helper program that -// minidump_generator_test.cc can launch to test certain things -// that require a separate executable. - -#include - -#include "client/mac/handler/exception_handler.h" -#include "common/mac/MachIPC.h" - -using google_breakpad::MachPortSender; -using google_breakpad::MachReceiveMessage; -using google_breakpad::MachSendMessage; -using google_breakpad::ReceivePort; - -int main(int argc, char** argv) { - if (argc < 2) - return 1; - - if (strcmp(argv[1], "crash") != 0) { - const int kTimeoutMs = 2000; - // Send parent process the task and thread ports. - MachSendMessage child_message(0); - child_message.AddDescriptor(mach_task_self()); - child_message.AddDescriptor(mach_thread_self()); - - MachPortSender child_sender(argv[1]); - if (child_sender.SendMessage(child_message, kTimeoutMs) != KERN_SUCCESS) { - fprintf(stderr, "Error sending message from child process!\n"); - exit(1); - } - - // Loop forever. - while (true) { - sleep(100); - } - } else if (argc == 3 && strcmp(argv[1], "crash") == 0) { - // Instantiate an OOP exception handler - google_breakpad::ExceptionHandler eh("", NULL, NULL, NULL, true, argv[2]); - // and crash. - int *a = (int*)0x42; - *a = 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/spawn_child_process.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/spawn_child_process.h deleted file mode 100644 index bdd293b1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/spawn_child_process.h +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Utility functions for spawning a helper process using a different -// CPU architecture. - -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_SPAWN_CHILD_PROCESS -#define GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_SPAWN_CHILD_PROCESS - -#include -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif -#include -#include -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 -#include -#endif - -#include -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad_test { - -using std::string; -using std::vector; - -const MDCPUArchitecture kNativeArchitecture = -#if defined(__i386__) - MD_CPU_ARCHITECTURE_X86 -#elif defined(__x86_64__) - MD_CPU_ARCHITECTURE_AMD64 -#elif defined(__ppc__) || defined(__ppc64__) - MD_CPU_ARCHITECTURE_PPC -#else -#error "This file has not been ported to this CPU architecture." -#endif - ; - -const u_int32_t kNativeContext = -#if defined(__i386__) - MD_CONTEXT_X86 -#elif defined(__x86_64__) - MD_CONTEXT_AMD64 -#elif defined(__ppc__) || defined(__ppc64__) - MD_CONTEXT_PPC -#else -#error "This file has not been ported to this CPU architecture." -#endif - ; - -string GetExecutablePath() { - char self_path[PATH_MAX]; - uint32_t size = sizeof(self_path); - if (_NSGetExecutablePath(self_path, &size) != 0) - return ""; - return self_path; -} - -string GetHelperPath() { - string helper_path(GetExecutablePath()); - size_t pos = helper_path.rfind('/'); - if (pos == string::npos) - return ""; - - helper_path.erase(pos + 1); - helper_path += "minidump_generator_test_helper"; - return helper_path; -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - -pid_t spawn_child_process(const char** argv) { - posix_spawnattr_t spawnattr; - if (posix_spawnattr_init(&spawnattr) != 0) - return (pid_t)-1; - - cpu_type_t pref_cpu_types[2] = { -#if defined(__x86_64__) - CPU_TYPE_X86, -#elif defined(__i386__) - CPU_TYPE_X86_64, -#endif - CPU_TYPE_ANY - }; - - // Set spawn attributes. - size_t attr_count = sizeof(pref_cpu_types) / sizeof(pref_cpu_types[0]); - size_t attr_ocount = 0; - if (posix_spawnattr_setbinpref_np(&spawnattr, - attr_count, - pref_cpu_types, - &attr_ocount) != 0 || - attr_ocount != attr_count) { - posix_spawnattr_destroy(&spawnattr); - return (pid_t)-1; - } - - // Create an argv array. - vector argv_v; - while (*argv) { - argv_v.push_back(strdup(*argv)); - argv++; - } - argv_v.push_back(NULL); - pid_t new_pid = 0; - int result = posix_spawnp(&new_pid, argv_v[0], NULL, &spawnattr, - &argv_v[0], *_NSGetEnviron()); - posix_spawnattr_destroy(&spawnattr); - - for (unsigned i = 0; i < argv_v.size(); i++) { - free(argv_v[i]); - } - - return result == 0 ? new_pid : -1; -} -#endif - -} // namespace google_breakpad_test - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_TESTS_SPAWN_CHILD_PROCESS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/testlogging.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/testlogging.h deleted file mode 100644 index c6b6be69..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/mac/tests/testlogging.h +++ /dev/null @@ -1,9 +0,0 @@ -// This file exists to override the processor logging for unit tests, -// since it confuses XCode into thinking unit tests have failed. -#include - -namespace google_breakpad { -extern std::ostringstream info_log; -} - -#define BPLOG_INFO_STREAM google_breakpad::info_log diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer-inl.h deleted file mode 100644 index 0e12e00b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer-inl.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer-inl.h: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_size.h" - -namespace google_breakpad { - -template -inline bool TypedMDRVA::Allocate() { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size()); -} - -template -inline bool TypedMDRVA::Allocate(size_t additional) { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size() + additional); -} - -template -inline bool TypedMDRVA::AllocateArray(size_t count) { - assert(count); - allocation_state_ = ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() * count); -} - -template -inline bool TypedMDRVA::AllocateObjectAndArray(size_t count, - size_t length) { - assert(count && length); - allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() + count * length); -} - -template -inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { - assert(allocation_state_ == ARRAY); - return writer_->Copy( - static_cast(position_ + index * minidump_size::size()), - item, minidump_size::size()); -} - -template -inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, - const void *src, - size_t length) { - assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); - return writer_->Copy( - static_cast(position_ + minidump_size::size() - + index * length), - src, length); -} - -template -inline bool TypedMDRVA::Flush() { - return writer_->Copy(position_, &data_, minidump_size::size()); -} - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.cc deleted file mode 100644 index db304662..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.cc +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.cc: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#include -#include -#include -#include -#include - -#include "client/minidump_file_writer-inl.h" -#include "common/linux/linux_libc_support.h" -#include "common/string_conversion.h" -#if __linux__ -#include "third_party/lss/linux_syscall_support.h" -#endif - -namespace google_breakpad { - -const MDRVA MinidumpFileWriter::kInvalidMDRVA = static_cast(-1); - -MinidumpFileWriter::MinidumpFileWriter() : file_(-1), position_(0), size_(0) { -} - -MinidumpFileWriter::~MinidumpFileWriter() { - Close(); -} - -bool MinidumpFileWriter::Open(const char *path) { - assert(file_ == -1); -#if __linux__ - file_ = sys_open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); -#else - file_ = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); -#endif - - return file_ != -1; -} - -bool MinidumpFileWriter::Close() { - bool result = true; - - if (file_ != -1) { - if (-1 == ftruncate(file_, position_)) { - return false; - } -#if __linux__ - result = (sys_close(file_) == 0); -#else - result = (close(file_) == 0); -#endif - file_ = -1; - } - - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - if (sizeof(wchar_t) == sizeof(u_int16_t)) { - // Shortcut if wchar_t is the same size as MDString's buffer - result = mdstring->Copy(str, mdstring->get()->length); - } else { - u_int16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - UTF32ToUTF16Char(*str, out); - if (!out[0]) - return false; - - // Process one character at a time - --length; - ++str; - - // Append the one or two UTF-16 characters. The first one will be non- - // zero, but the second one may be zero, depending on the conversion from - // UTF-32. - int out_count = out[1] ? 2 : 1; - size_t out_size = sizeof(u_int16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - } - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const char *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - u_int16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - int conversion_count = UTF8ToUTF16Char(str, length, out); - if (!conversion_count) - return false; - - // Move the pointer along based on the nubmer of converted characters - length -= conversion_count; - str += conversion_count; - - // Append the one or two UTF-16 characters - int out_count = out[1] ? 2 : 1; - size_t out_size = sizeof(u_int16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - return result; -} - -template -bool MinidumpFileWriter::WriteStringCore(const CharType *str, - unsigned int length, - MDLocationDescriptor *location) { - assert(str); - assert(location); - // Calculate the mdstring length by either limiting to |length| as passed in - // or by finding the location of the NULL character. - unsigned int mdstring_length = 0; - if (!length) - length = INT_MAX; - for (; mdstring_length < length && str[mdstring_length]; ++mdstring_length) - ; - - // Allocate the string buffer - TypedMDRVA mdstring(this); - if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(u_int16_t))) - return false; - - // Set length excluding the NULL and copy the string - mdstring.get()->length = - static_cast(mdstring_length * sizeof(u_int16_t)); - bool result = CopyStringToMDString(str, mdstring_length, &mdstring); - - // NULL terminate - if (result) { - u_int16_t ch = 0; - result = mdstring.CopyIndexAfterObject(mdstring_length, &ch, sizeof(ch)); - - if (result) - *location = mdstring.location(); - } - - return result; -} - -bool MinidumpFileWriter::WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteMemory(const void *src, size_t size, - MDMemoryDescriptor *output) { - assert(src); - assert(output); - UntypedMDRVA mem(this); - - if (!mem.Allocate(size)) - return false; - if (!mem.Copy(src, mem.size())) - return false; - - output->start_of_memory_range = reinterpret_cast(src); - output->memory = mem.location(); - - return true; -} - -MDRVA MinidumpFileWriter::Allocate(size_t size) { - assert(size); - assert(file_ != -1); - size_t aligned_size = (size + 7) & ~7; // 64-bit alignment - - if (position_ + aligned_size > size_) { - size_t growth = aligned_size; - size_t minimal_growth = getpagesize(); - - // Ensure that the file grows by at least the size of a memory page - if (growth < minimal_growth) - growth = minimal_growth; - - size_t new_size = size_ + growth; - if (ftruncate(file_, new_size) != 0) - return kInvalidMDRVA; - - size_ = new_size; - } - - MDRVA current_position = position_; - position_ += static_cast(aligned_size); - - return current_position; -} - -bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { - assert(src); - assert(size); - assert(file_ != -1); - - // Ensure that the data will fit in the allocated space - if (static_cast(size + position) > size_) - return false; - - // Seek and write the data -#if __linux__ - if (sys_lseek(file_, position, SEEK_SET) == static_cast(position)) { - if (sys_write(file_, src, size) == size) { -#else - if (lseek(file_, position, SEEK_SET) == static_cast(position)) { - if (write(file_, src, size) == size) { -#endif - return true; - } - } - - return false; -} - -bool UntypedMDRVA::Allocate(size_t size) { - assert(size_ == 0); - size_ = size; - position_ = writer_->Allocate(size_); - return position_ != MinidumpFileWriter::kInvalidMDRVA; -} - -bool UntypedMDRVA::Copy(MDRVA pos, const void *src, size_t size) { - assert(src); - assert(size); - assert(pos + size <= position_ + size_); - return writer_->Copy(pos, src, size); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.h deleted file mode 100644 index cded3585..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer.h +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.h: Implements file-based minidump generation. It's -// intended to be used with the Google Breakpad open source crash handling -// project. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class UntypedMDRVA; -template class TypedMDRVA; - -// The user of this class can Open() a file and add minidump streams, data, and -// strings using the definitions in minidump_format.h. Since this class is -// expected to be used in a situation where the current process may be -// damaged, it will not allocate heap memory. -// Sample usage: -// MinidumpFileWriter writer; -// writer.Open("/tmp/minidump.dmp"); -// TypedMDRVA header(&writer_); -// header.Allocate(); -// header->get()->signature = MD_HEADER_SIGNATURE; -// : -// writer.Close(); -class MinidumpFileWriter { -public: - // Invalid MDRVA (Minidump Relative Virtual Address) - // returned on failed allocation - static const MDRVA kInvalidMDRVA; - - MinidumpFileWriter(); - ~MinidumpFileWriter(); - - // Open |path| as the destination of the minidump data. Any existing file - // will be overwritten. - // Return true on success, or false on failure - bool Open(const char *path); - - // Close the current file - // Return true on success, or false on failure - bool Close(); - - // Copy the contents of |str| to a MDString and write it to the file. - // |str| is expected to be either UTF-16 or UTF-32 depending on the size - // of wchar_t. - // Maximum |length| of characters to copy from |str|, or specify 0 to use the - // entire NULL terminated string. Copying will stop at the first NULL. - // |location| the allocated location - // Return true on success, or false on failure - bool WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location); - - // Same as above, except with |str| as a UTF-8 string - bool WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location); - - // Write |size| bytes starting at |src| into the current position. - // Return true on success and set |output| to position, or false on failure - bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output); - - // Copies |size| bytes from |src| to |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, ssize_t size); - - // Return the current position for writing to the minidump - inline MDRVA position() const { return position_; } - - private: - friend class UntypedMDRVA; - - // Allocates an area of |size| bytes. - // Returns the position of the allocation, or kInvalidMDRVA if it was - // unable to allocate the bytes. - MDRVA Allocate(size_t size); - - // The file descriptor for the output file - int file_; - - // Current position in buffer - MDRVA position_; - - // Current allocated size - size_t size_; - - // Copy |length| characters from |str| to |mdstring|. These are distinct - // because the underlying MDString is a UTF-16 based string. The wchar_t - // variant may need to create a MDString that has more characters than the - // source |str|, whereas the UTF-8 variant may coalesce characters to form - // a single UTF-16 character. - bool CopyStringToMDString(const wchar_t *str, unsigned int length, - TypedMDRVA *mdstring); - bool CopyStringToMDString(const char *str, unsigned int length, - TypedMDRVA *mdstring); - - // The common templated code for writing a string - template - bool WriteStringCore(const CharType *str, unsigned int length, - MDLocationDescriptor *location); -}; - -// Represents an untyped allocated chunk -class UntypedMDRVA { - public: - explicit UntypedMDRVA(MinidumpFileWriter *writer) - : writer_(writer), - position_(writer->position()), - size_(0) {} - - // Allocates |size| bytes. Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t size); - - // Returns the current position or kInvalidMDRVA if allocation failed - inline MDRVA position() const { return position_; } - - // Number of bytes allocated - inline size_t size() const { return size_; } - - // Return size and position - inline MDLocationDescriptor location() const { - MDLocationDescriptor location = { static_cast(size_), position_ }; - return location; - } - - // Copy |size| bytes starting at |src| into the minidump at |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, size_t size); - - // Copy |size| bytes from |src| to the current position - inline bool Copy(const void *src, size_t size) { - return Copy(position_, src, size); - } - - protected: - // Writer we associate with - MinidumpFileWriter *writer_; - - // Position of the start of the data - MDRVA position_; - - // Allocated size - size_t size_; -}; - -// Represents a Minidump object chunk. Additional memory can be allocated at -// the end of the object as a: -// - single allocation -// - Array of MDType objects -// - A MDType object followed by an array -template -class TypedMDRVA : public UntypedMDRVA { - public: - // Constructs an unallocated MDRVA - explicit TypedMDRVA(MinidumpFileWriter *writer) - : UntypedMDRVA(writer), - data_(), - allocation_state_(UNALLOCATED) {} - - inline ~TypedMDRVA() { - // Ensure that the data_ object is written out - if (allocation_state_ != ARRAY) - Flush(); - } - - // Address of object data_ of MDType. This is not declared const as the - // typical usage will be to access the underlying |data_| object as to - // alter its contents. - MDType *get() { return &data_; } - - // Allocates minidump_size::size() bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(); - - // Allocates minidump_size::size() + |additional| bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t additional); - - // Allocate an array of |count| elements of MDType. - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateArray(size_t count); - - // Allocate an array of |count| elements of |size| after object of MDType - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateObjectAndArray(size_t count, size_t size); - - // Copy |item| to |index| - // Must have been allocated using AllocateArray(). - // Return true on success, or false on failure - bool CopyIndex(unsigned int index, MDType *item); - - // Copy |size| bytes starting at |str| to |index| - // Must have been allocated using AllocateObjectAndArray(). - // Return true on success, or false on failure - bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); - - // Write data_ - bool Flush(); - - private: - enum AllocationState { - UNALLOCATED = 0, - SINGLE_OBJECT, - ARRAY, - SINGLE_OBJECT_WITH_ARRAY - }; - - MDType data_; - AllocationState allocation_state_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer_unittest.cc deleted file mode 100644 index 08522fb2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/minidump_file_writer_unittest.cc +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: waylonis@google.com (Dan Waylonis) - -/* - g++ -I../ ../common/convert_UTF.c \ - ../common/string_conversion.cc \ - minidump_file_writer.cc \ - minidump_file_writer_unittest.cc \ - -o minidump_file_writer_unittest - */ - -#include -#include - -#include "minidump_file_writer-inl.h" - -using google_breakpad::MinidumpFileWriter; - -#define ASSERT_TRUE(cond) \ -if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - return false; \ -} - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) -#define ASSERT_NE(e1, e2) ASSERT_TRUE((e1) != (e2)) - -struct StringStructure { - unsigned long integer_value; - MDLocationDescriptor first_string; - MDLocationDescriptor second_string; -}; - -struct ArrayStructure { - unsigned char char_value; - unsigned short short_value; - unsigned long long_value; -}; - -typedef struct { - unsigned long count; - ArrayStructure array[0]; -} ObjectAndArrayStructure; - -static bool WriteFile(const char *path) { - MinidumpFileWriter writer; - if (writer.Open(path)) { - // Test a single structure - google_breakpad::TypedMDRVA strings(&writer); - ASSERT_TRUE(strings.Allocate()); - strings.get()->integer_value = 0xBEEF; - const char *first = "First String"; - ASSERT_TRUE(writer.WriteString(first, 0, &strings.get()->first_string)); - const wchar_t *second = L"Second String"; - ASSERT_TRUE(writer.WriteString(second, 0, &strings.get()->second_string)); - - // Test an array structure - google_breakpad::TypedMDRVA array(&writer); - unsigned int count = 10; - ASSERT_TRUE(array.AllocateArray(count)); - for (unsigned int i = 0; i < count; ++i) { - ArrayStructure local; - local.char_value = i; - local.short_value = i + 1; - local.long_value = i + 2; - ASSERT_TRUE(array.CopyIndex(i, &local)); - } - - // Test an object followed by an array - google_breakpad::TypedMDRVA obj_array(&writer); - ASSERT_TRUE(obj_array.AllocateObjectAndArray(count, - sizeof(ArrayStructure))); - obj_array.get()->count = count; - for (unsigned int i = 0; i < count; ++i) { - ArrayStructure local; - local.char_value = i; - local.short_value = i + 1; - local.long_value = i + 2; - ASSERT_TRUE(obj_array.CopyIndexAfterObject(i, &local, sizeof(local))); - } - } - - return writer.Close(); -} - -static bool CompareFile(const char *path) { - unsigned long expected[] = { -#if defined(__BIG_ENDIAN__) - 0x0000beef, 0x0000001e, 0x00000018, 0x00000020, 0x00000038, 0x00000000, - 0x00000018, 0x00460069, 0x00720073, 0x00740020, 0x00530074, 0x00720069, - 0x006e0067, 0x00000000, 0x0000001a, 0x00530065, 0x0063006f, 0x006e0064, - 0x00200053, 0x00740072, 0x0069006e, 0x00670000, 0x00000001, 0x00000002, - 0x01000002, 0x00000003, 0x02000003, 0x00000004, 0x03000004, 0x00000005, - 0x04000005, 0x00000006, 0x05000006, 0x00000007, 0x06000007, 0x00000008, - 0x07000008, 0x00000009, 0x08000009, 0x0000000a, 0x0900000a, 0x0000000b, - 0x0000000a, 0x00000001, 0x00000002, 0x01000002, 0x00000003, 0x02000003, - 0x00000004, 0x03000004, 0x00000005, 0x04000005, 0x00000006, 0x05000006, - 0x00000007, 0x06000007, 0x00000008, 0x07000008, 0x00000009, 0x08000009, - 0x0000000a, 0x0900000a, 0x0000000b, 0x00000000 -#else - 0x0000beef, 0x0000001e, 0x00000018, 0x00000020, - 0x00000038, 0x00000000, 0x00000018, 0x00690046, - 0x00730072, 0x00200074, 0x00740053, 0x00690072, - 0x0067006e, 0x00000000, 0x0000001a, 0x00650053, - 0x006f0063, 0x0064006e, 0x00530020, 0x00720074, - 0x006e0069, 0x00000067, 0x00011e00, 0x00000002, - 0x00021e01, 0x00000003, 0x00031e02, 0x00000004, - 0x00041e03, 0x00000005, 0x00051e04, 0x00000006, - 0x00061e05, 0x00000007, 0x00071e06, 0x00000008, - 0x00081e07, 0x00000009, 0x00091e08, 0x0000000a, - 0x000a1e09, 0x0000000b, 0x0000000a, 0x00011c00, - 0x00000002, 0x00021c01, 0x00000003, 0x00031c02, - 0x00000004, 0x00041c03, 0x00000005, 0x00051c04, - 0x00000006, 0x00061c05, 0x00000007, 0x00071c06, - 0x00000008, 0x00081c07, 0x00000009, 0x00091c08, - 0x0000000a, 0x000a1c09, 0x0000000b, 0x00000000, -#endif - }; - size_t expected_byte_count = sizeof(expected); - int fd = open(path, O_RDONLY, 0600); - void *buffer = malloc(expected_byte_count); - ASSERT_NE(fd, -1); - ASSERT_TRUE(buffer); - ASSERT_EQ(read(fd, buffer, expected_byte_count), - static_cast(expected_byte_count)); - - char *b1, *b2; - b1 = reinterpret_cast(buffer); - b2 = reinterpret_cast(expected); - while (*b1 == *b2) { - b1++; - b2++; - } - - printf("%p\n", reinterpret_cast(b1 - (char*)buffer)); - - ASSERT_EQ(memcmp(buffer, expected, expected_byte_count), 0); - return true; -} - -static bool RunTests() { - const char *path = "/tmp/minidump_file_writer_unittest.dmp"; - ASSERT_TRUE(WriteFile(path)); - ASSERT_TRUE(CompareFile(path)); - unlink(path); - return true; -} - -extern "C" int main(int argc, const char *argv[]) { - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/Makefile deleted file mode 100644 index 9b642865..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Author: Alfred Peng - -CC=cc -CXX=CC - -CPPFLAGS=-g -I../../.. -DNDEBUG -features=extensions -D_REENTRANT -LDFLAGS=-lpthread -lssl -lgnutls-openssl -lelf - -OBJ_DIR=. -BIN_DIR=. - -THREAD_SRC=solaris_lwp.cc -SHARE_SRC=../../minidump_file_writer.cc\ - ../../../common/md5.c\ - ../../../common/string_conversion.cc\ - ../../../common/solaris/file_id.cc\ - minidump_generator.cc -HANDLER_SRC=exception_handler.cc\ - ../../../common/solaris/guid_creator.cc -SHARE_C_SRC=../../../common/convert_UTF.c - -MINIDUMP_TEST_SRC=minidump_test.cc -EXCEPTION_TEST_SRC=exception_handler_test.cc - -THREAD_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(THREAD_SRC)) -SHARE_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(SHARE_SRC)) -HANDLER_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(HANDLER_SRC)) -SHARE_C_OBJ=$(patsubst %.c,$(OBJ_DIR)/%.o,$(SHARE_C_SRC)) -MINIDUMP_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(MINIDUMP_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_OBJ) -EXCEPTION_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(EXCEPTION_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_OBJ) - -BIN=$(BIN_DIR)/minidump_test\ - $(BIN_DIR)/exception_handler_test - -.PHONY:all clean - -all:$(BIN) - -$(BIN_DIR)/minidump_test:$(MINIDUMP_TEST_OBJ) - $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ - -$(BIN_DIR)/exception_handler_test:$(EXCEPTION_TEST_OBJ) - $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ - -clean: - rm -f $(BIN) *.o *.out *.dmp core ../../minidump_file_writer.o\ - ../../../common/*.o ../../../common/solaris/*.o diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.cc deleted file mode 100644 index 7fc8d255..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.cc +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include - -#include -#include -#include - -#include "client/solaris/handler/exception_handler.h" -#include "common/solaris/guid_creator.h" -#include "common/solaris/message_output.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Signals that we are interested. -static const int kSigTable[] = { - SIGSEGV, - SIGABRT, - SIGFPE, - SIGILL, - SIGBUS -}; - -std::vector *ExceptionHandler::handler_stack_ = NULL; -int ExceptionHandler::handler_stack_index_ = 0; -pthread_mutex_t ExceptionHandler::handler_stack_mutex_ = - PTHREAD_MUTEX_INITIALIZER; - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - dump_path_(), - installed_handler_(install_handler) { - set_dump_path(dump_path); - - if (install_handler) { - SetupHandler(); - } - - if (install_handler) { - pthread_mutex_lock(&handler_stack_mutex_); - - if (handler_stack_ == NULL) - handler_stack_ = new std::vector; - handler_stack_->push_back(this); - pthread_mutex_unlock(&handler_stack_mutex_); - } -} - -ExceptionHandler::~ExceptionHandler() { - TeardownAllHandlers(); - pthread_mutex_lock(&handler_stack_mutex_); - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - print_message1(2, "warning: removing Breakpad handler out of order\n"); - for (std::vector::iterator iterator = - handler_stack_->begin(); - iterator != handler_stack_->end(); - ++iterator) { - if (*iterator == this) { - handler_stack_->erase(iterator); - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::WriteMinidump() { - return InternalWriteMinidump(0, 0, NULL); -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, - callback_context, false); - return handler.InternalWriteMinidump(0, 0, NULL); -} - -void ExceptionHandler::SetupHandler() { - // Signal on a different stack to avoid using the stack - // of the crashing lwp. - struct sigaltstack sig_stack; - sig_stack.ss_sp = malloc(MINSIGSTKSZ); - if (sig_stack.ss_sp == NULL) - return; - sig_stack.ss_size = MINSIGSTKSZ; - sig_stack.ss_flags = 0; - - if (sigaltstack(&sig_stack, NULL) < 0) - return; - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) - SetupHandler(kSigTable[i]); -} - -void ExceptionHandler::SetupHandler(int signo) { - struct sigaction act, old_act; - act.sa_handler = HandleException; - act.sa_flags = SA_ONSTACK; - if (sigaction(signo, &act, &old_act) < 0) - return; - old_handlers_[signo] = old_act.sa_handler; -} - -void ExceptionHandler::TeardownHandler(int signo) { - if (old_handlers_.find(signo) != old_handlers_.end()) { - struct sigaction act; - act.sa_handler = old_handlers_[signo]; - act.sa_flags = 0; - sigaction(signo, &act, 0); - } -} - -void ExceptionHandler::TeardownAllHandlers() { - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) { - TeardownHandler(kSigTable[i]); - } -} - -// static -void ExceptionHandler::HandleException(int signo) { -//void ExceptionHandler::HandleException(int signo, siginfo_t *sip, ucontext_t *sig_ctx) { - // The context information about the signal is put on the stack of - // the signal handler frame as value parameter. For some reasons, the - // prototype of the handler doesn't declare this information as parameter, we - // will do it by hand. The stack layout for a signal handler frame is here: - // http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libproc/common/Pstack.c#81 - // - // However, if we are being called by another signal handler passing the - // signal up the chain, then we may not have this random extra parameter, - // so we may have to walk the stack to find it. We do the actual work - // on another thread, where it's a little safer, but we want the ebp - // from this frame to find it. - uintptr_t current_ebp = (uintptr_t)_getfp(); - - pthread_mutex_lock(&handler_stack_mutex_); - ExceptionHandler *current_handler = - handler_stack_->at(handler_stack_->size() - ++handler_stack_index_); - pthread_mutex_unlock(&handler_stack_mutex_); - - // Restore original handler. - current_handler->TeardownHandler(signo); - - ucontext_t *sig_ctx = NULL; - if (current_handler->InternalWriteMinidump(signo, current_ebp, &sig_ctx)) { -// if (current_handler->InternalWriteMinidump(signo, &sig_ctx)) { - // Fully handled this exception, safe to exit. - exit(EXIT_FAILURE); - } else { - // Exception not fully handled, will call the next handler in stack to - // process it. - typedef void (*SignalHandler)(int signo); - SignalHandler old_handler = - reinterpret_cast(current_handler->old_handlers_[signo]); - if (old_handler != NULL) - old_handler(signo); - } - - pthread_mutex_lock(&handler_stack_mutex_); - current_handler->SetupHandler(signo); - --handler_stack_index_; - // All the handlers in stack have been invoked to handle the exception, - // normally the process should be terminated and should not reach here. - // In case we got here, ask the OS to handle it to avoid endless loop, - // normally the OS will generate a core and termiate the process. This - // may be desired to debug the program. - if (handler_stack_index_ == 0) - signal(signo, SIG_DFL); - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::InternalWriteMinidump(int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) { - if (filter_ && !filter_(callback_context_)) - return false; - - bool success = false; - GUID guid; - char guid_str[kGUIDStringLength + 1]; - if (CreateGUID(&guid) && GUIDToString(&guid, guid_str, sizeof(guid_str))) { - char minidump_path[PATH_MAX]; - snprintf(minidump_path, sizeof(minidump_path), "%s/%s.dmp", - dump_path_c_, guid_str); - - // Block all the signals we want to process when writing minidump. - // We don't want it to be interrupted. - sigset_t sig_blocked, sig_old; - bool blocked = true; - sigfillset(&sig_blocked); - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) - sigdelset(&sig_blocked, kSigTable[i]); - if (sigprocmask(SIG_BLOCK, &sig_blocked, &sig_old) != 0) { - blocked = false; - print_message1(2, "HandleException: failed to block signals.\n"); - } - - success = minidump_generator_.WriteMinidumpToFile( - minidump_path, signo, sighandler_ebp, sig_ctx); - - // Unblock the signals. - if (blocked) - sigprocmask(SIG_SETMASK, &sig_old, &sig_old); - - if (callback_) - success = callback_(dump_path_c_, guid_str, callback_context_, success); - } - return success; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.h deleted file mode 100644 index 4d72485f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include - -#include "client/solaris/handler/minidump_generator.h" - -namespace google_breakpad { - -using std::string; - -// -// ExceptionHandler -// -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// (NOTE): There should be only one this kind of exception handler -// object per process. -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// Caller should try to make the callbacks as crash-friendly as possible, -// it should avoid use heap memory allocation as much as possible. -// -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is /.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. succeeded - // indicates whether a minidump file was successfully written. - // - // If an exception occurred and the callback returns true, Breakpad will - // treat the exception as fully-handled, suppressing any other handlers from - // being notified of the exception. If the callback returns false, Breakpad - // will treat the exception as unhandled, and allow another handler to handle - // it. If there are no other handlers, Breakpad will report the exception to - // the system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - typedef bool (*MinidumpCallback)(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, - bool install_handler); - ~ExceptionHandler(); - - // Get and Set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context); - - private: - // Setup crash handler. - void SetupHandler(); - // Setup signal handler for a signal. - void SetupHandler(int signo); - // Teardown the handler for a signal. - void TeardownHandler(int signo); - // Teardown all handlers. - void TeardownAllHandlers(); - - // Runs the main loop for the exception handler thread. - static void* ExceptionHandlerThreadMain(void *lpParameter); - - // Signal handler. - static void HandleException(int signo); - - // Write all the information to the dump file. - // If called from a signal handler, sighandler_ebp is the ebp of - // that signal handler's frame, and sig_ctx is an out parameter - // that will be set to point at the ucontext_t that was placed - // on the stack by the kernel. You can pass zero and NULL - // for the second and third parameters if you are not calling - // this from a signal handler. - bool InternalWriteMinidump(int signo, uintptr_t sighandler_ebp, - ucontext_t **sig_ctx); - - private: - // The callbacks before and after writing the dump file. - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - string dump_path_; - // C style dump path. Keep this when setting dump path, since calling - // c_str() of std::string when crashing may not be safe. - const char *dump_path_c_; - - // True if the ExceptionHandler installed an unhandled exception filter - // when created (with an install_handler parameter set to true). - bool installed_handler_; - - // Keep the previous handlers for the signal. - typedef void (*sighandler_t)(int); - std::map old_handlers_; - - // The global exception handler stack. This is need becuase there may exist - // multiple ExceptionHandler instances in a process. Each will have itself - // registered in this stack. - static std::vector *handler_stack_; - // The index of the handler that should handle the next exception. - static int handler_stack_index_; - static pthread_mutex_t handler_stack_mutex_; - - // The minidump generator. - MinidumpGenerator minidump_generator_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler_test.cc deleted file mode 100644 index 6bb8e18d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/exception_handler_test.cc +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include -#include -#include -#include - -#include "client/solaris/handler/exception_handler.h" -#include "client/solaris/handler/solaris_lwp.h" - -using namespace google_breakpad; - -// Thread use this to see if it should stop working. -static bool should_exit = false; - -static int foo2(int arg) { - // Stack variable, used for debugging stack dumps. - int c = 0xcccccccc; - fprintf(stderr, "Thread trying to crash: %x\n", getpid()); - c = *reinterpret_cast(0x5); - return c; -} - -static int foo(int arg) { - // Stack variable, used for debugging stack dumps. - int b = 0xbbbbbbbb; - b = foo2(b); - return b; -} - -static void *thread_crash(void *) { - // Stack variable, used for debugging stack dumps. - int a = 0xaaaaaaaa; - sleep(3); - a = foo(a); - printf("%x\n", a); - return NULL; -} - -static void *thread_main(void *) { - while (!should_exit) - sleep(1); - return NULL; -} - -static void CreateCrashThread() { - pthread_t h; - pthread_create(&h, NULL, thread_crash, NULL); - pthread_detach(h); -} - -// Create working threads. -static void CreateThread(int num) { - pthread_t h; - for (int i = 0; i < num; ++i) { - pthread_create(&h, NULL, thread_main, NULL); - pthread_detach(h); - } -} - -// Callback when minidump written. -static bool MinidumpCallback(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded) { - int index = reinterpret_cast(context); - if (index == 0) { - should_exit = true; - return true; - } - // Don't process it. - return false; -} - -int main(int argc, char *argv[]) { - int handler_index = 1; - ExceptionHandler handler_ignore(".", NULL, MinidumpCallback, - (void*)handler_index, true); - CreateCrashThread(); - CreateThread(10); - - while (true) - sleep(20); - should_exit = true; - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.cc deleted file mode 100644 index ea046cff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.cc +++ /dev/null @@ -1,786 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "client/solaris/handler/minidump_generator.h" -#include "client/minidump_file_writer-inl.h" -#include "common/solaris/file_id.h" - -namespace { - -using namespace google_breakpad; - -// Argument for the writer function. -struct WriterArgument { - MinidumpFileWriter *minidump_writer; - - // Pid of the lwp who called WriteMinidumpToFile - int requester_pid; - - // The stack bottom of the lwp which caused the dump. - // Mainly used to find the lwp id of the crashed lwp since signal - // handler may not be called in the lwp who caused it. - uintptr_t crashed_stack_bottom; - - // Id of the crashing lwp. - int crashed_lwpid; - - // Signal number when crash happened. Can be 0 if this is a requested dump. - int signo; - - // The ebp of the signal handler frame on x86. Can be 0 if this is a - // requested dump. - uintptr_t sighandler_ebp; - - // User context when crash happens. Can be NULL if this is a requested dump. - // This is actually an out parameter, but it will be filled in at the start - // of the writer LWP. - ucontext_t *sig_ctx; - - // Used to get information about the lwps. - SolarisLwp *lwp_lister; -}; - -// Holding context information for the callback of finding the crashing lwp. -struct FindCrashLwpContext { - const SolarisLwp *lwp_lister; - uintptr_t crashing_stack_bottom; - int crashing_lwpid; - - FindCrashLwpContext() : - lwp_lister(NULL), - crashing_stack_bottom(0UL), - crashing_lwpid(-1) { - } -}; - -// Callback for list lwps. -// It will compare the stack bottom of the provided lwp with the stack -// bottom of the crashed lwp, it they are eqaul, this lwp is the one -// who crashed. -bool IsLwpCrashedCallback(lwpstatus_t *lsp, void *context) { - FindCrashLwpContext *crashing_context = - static_cast(context); - const SolarisLwp *lwp_lister = crashing_context->lwp_lister; - const prgregset_t *gregs = &(lsp->pr_reg); -#if TARGET_CPU_SPARC - uintptr_t last_ebp = (*gregs)[R_FP]; -#elif TARGET_CPU_X86 - uintptr_t last_ebp = (*gregs)[EBP]; -#endif - uintptr_t stack_bottom = lwp_lister->GetLwpStackBottom(last_ebp); - if (stack_bottom > last_ebp && - stack_bottom == crashing_context->crashing_stack_bottom) { - // Got it. Stop iteration. - crashing_context->crashing_lwpid = lsp->pr_lwpid; - return false; - } - - return true; -} - -// Find the crashing lwpid. -// This is done based on stack bottom comparing. -int FindCrashingLwp(uintptr_t crashing_stack_bottom, - int requester_pid, - const SolarisLwp *lwp_lister) { - FindCrashLwpContext context; - context.lwp_lister = lwp_lister; - context.crashing_stack_bottom = crashing_stack_bottom; - CallbackParam callback_param(IsLwpCrashedCallback, - &context); - lwp_lister->Lwp_iter_all(lwp_lister->getpid(), &callback_param); - return context.crashing_lwpid; -} - -bool WriteLwpStack(const SolarisLwp *lwp_lister, - uintptr_t last_esp, - UntypedMDRVA *memory, - MDMemoryDescriptor *loc) { - uintptr_t stack_bottom = lwp_lister->GetLwpStackBottom(last_esp); - if (stack_bottom >= last_esp) { - int size = stack_bottom - last_esp; - if (size > 0) { - if (!memory->Allocate(size)) - return false; - memory->Copy(reinterpret_cast(last_esp), size); - loc->start_of_memory_range = last_esp; - loc->memory = memory->location(); - } - return true; - } - return false; -} - -#if TARGET_CPU_SPARC -bool WriteContext(MDRawContextSPARC *context, ucontext_t *sig_ctx) { - assert(sig_ctx != NULL); - int* regs = sig_ctx->uc_mcontext.gregs; - context->context_flags = MD_CONTEXT_SPARC_FULL; - - context->ccr = (unsigned int)(regs[0]); - context->pc = (unsigned int)(regs[REG_PC]); - context->npc = (unsigned int)(regs[REG_nPC]); - context->y = (unsigned int)(regs[REG_Y]); - context->asi = (unsigned int)(regs[19]); - context->fprs = (unsigned int)(regs[20]); - - for ( int i = 0 ; i < 32; ++i ) { - context->g_r[i] = 0; - } - - for ( int i = 1 ; i < 16; ++i ) { - context->g_r[i] = (uintptr_t)(sig_ctx->uc_mcontext.gregs[i + 3]); - } - context->g_r[30] = (uintptr_t)(((struct frame *)context->g_r[14])->fr_savfp); - - return true; -} - -bool WriteContext(MDRawContextSPARC *context, prgregset_t regs, - prfpregset_t *fp_regs) { - if (!context || !regs) - return false; - - context->context_flags = MD_CONTEXT_SPARC_FULL; - - context->ccr = (uintptr_t)(regs[32]); - context->pc = (uintptr_t)(regs[R_PC]); - context->npc = (uintptr_t)(regs[R_nPC]); - context->y = (uintptr_t)(regs[R_Y]); - context->asi = (uintptr_t)(regs[36]); - context->fprs = (uintptr_t)(regs[37]); - for ( int i = 0 ; i < 32 ; ++i ){ - context->g_r[i] = (uintptr_t)(regs[i]); - } - - return true; -} -#elif TARGET_CPU_X86 -bool WriteContext(MDRawContextX86 *context, prgregset_t regs, - prfpregset_t *fp_regs) { - if (!context || !regs) - return false; - - context->context_flags = MD_CONTEXT_X86_FULL; - - context->cs = regs[CS]; - context->ds = regs[DS]; - context->es = regs[ES]; - context->fs = regs[FS]; - context->gs = regs[GS]; - context->ss = regs[SS]; - context->edi = regs[EDI]; - context->esi = regs[ESI]; - context->ebx = regs[EBX]; - context->edx = regs[EDX]; - context->ecx = regs[ECX]; - context->eax = regs[EAX]; - context->ebp = regs[EBP]; - context->eip = regs[EIP]; - context->esp = regs[UESP]; - context->eflags = regs[EFL]; - - return true; -} -#endif /* TARGET_CPU_XXX */ - -// Write information about a crashed Lwp. -// When a lwp crash, kernel will write something on the stack for processing -// signal. This makes the current stack not reliable, and our stack walker -// won't figure out the whole call stack for this. So we write the stack at the -// time of the crash into the minidump file, not the current stack. -bool WriteCrashedLwpStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - const lwpstatus_t *lsp, - MDRawThread *lwp) { - assert(writer_args->sig_ctx != NULL); - - lwp->thread_id = lsp->pr_lwpid; - -#if TARGET_CPU_SPARC - UntypedMDRVA memory(minidump_writer); - if (!WriteLwpStack(writer_args->lwp_lister, - writer_args->sig_ctx->uc_mcontext.gregs[REG_O6], - &memory, - &lwp->stack)) - return false; - - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); - return WriteContext(context.get(), writer_args->sig_ctx); -#elif TARGET_CPU_X86 - UntypedMDRVA memory(minidump_writer); - if (!WriteLwpStack(writer_args->lwp_lister, - writer_args->sig_ctx->uc_mcontext.gregs[UESP], - &memory, - &lwp->stack)) - return false; - - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), - (int *)&writer_args->sig_ctx->uc_mcontext.gregs, - &writer_args->sig_ctx->uc_mcontext.fpregs); -#endif -} - -bool WriteLwpStream(MinidumpFileWriter *minidump_writer, - const SolarisLwp *lwp_lister, - const lwpstatus_t *lsp, MDRawThread *lwp) { - prfpregset_t fp_regs = lsp->pr_fpreg; - const prgregset_t *gregs = &(lsp->pr_reg); - UntypedMDRVA memory(minidump_writer); -#if TARGET_CPU_SPARC - if (!WriteLwpStack(lwp_lister, - (*gregs)[R_SP], - &memory, - &lwp->stack)) - return false; - - // Write context - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - // should be the thread_id - lwp->thread_id = lsp->pr_lwpid; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); -#elif TARGET_CPU_X86 - if (!WriteLwpStack(lwp_lister, - (*gregs)[UESP], - &memory, - &lwp->stack)) - return false; - - // Write context - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - // should be the thread_id - lwp->thread_id = lsp->pr_lwpid; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); -#endif /* TARGET_CPU_XXX */ - return WriteContext(context.get(), (int *)gregs, &fp_regs); -} - -bool WriteCPUInformation(MDRawSystemInfo *sys_info) { - struct utsname uts; - char *major, *minor, *build; - - sys_info->number_of_processors = sysconf(_SC_NPROCESSORS_CONF); - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - if (uname(&uts) != -1) { - // Match "i86pc" as X86 architecture. - if (strcmp(uts.machine, "i86pc") == 0) - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_X86; - else if (strcmp(uts.machine, "sun4u") == 0) - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_SPARC; - } - - major = uts.release; - minor = strchr(major, '.'); - *minor = '\0'; - ++minor; - sys_info->major_version = atoi(major); - sys_info->minor_version = atoi(minor); - - build = strchr(uts.version, '_'); - ++build; - sys_info->build_number = atoi(build); - - return true; -} - -bool WriteOSInformation(MinidumpFileWriter *minidump_writer, - MDRawSystemInfo *sys_info) { - sys_info->platform_id = MD_OS_SOLARIS; - - struct utsname uts; - if (uname(&uts) != -1) { - char os_version[512]; - size_t space_left = sizeof(os_version); - memset(os_version, 0, space_left); - const char *os_info_table[] = { - uts.sysname, - uts.release, - uts.version, - uts.machine, - "OpenSolaris", - NULL - }; - for (const char **cur_os_info = os_info_table; - *cur_os_info != NULL; - ++cur_os_info) { - if (cur_os_info != os_info_table && space_left > 1) { - strcat(os_version, " "); - --space_left; - } - if (space_left > strlen(*cur_os_info)) { - strcat(os_version, *cur_os_info); - space_left -= strlen(*cur_os_info); - } else { - break; - } - } - - MDLocationDescriptor location; - if (!minidump_writer->WriteString(os_version, 0, &location)) - return false; - sys_info->csd_version_rva = location.rva; - } - return true; -} - -// Callback context for get writting lwp information. -struct LwpInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int lwp_index; -}; - -bool LwpInformationCallback(lwpstatus_t *lsp, void *context) { - bool success = true; - LwpInfoCallbackCtx *callback_context = - static_cast(context); - - // The current lwp is the one to handle the crash. Ignore it. - if (lsp->pr_lwpid != pthread_self()) { - LwpInfoCallbackCtx *callback_context = - static_cast(context); - MDRawThread lwp; - memset(&lwp, 0, sizeof(MDRawThread)); - - if (lsp->pr_lwpid != callback_context->writer_args->crashed_lwpid || - callback_context->writer_args->sig_ctx == NULL) { - success = WriteLwpStream(callback_context->minidump_writer, - callback_context->writer_args->lwp_lister, - lsp, &lwp); - } else { - success = WriteCrashedLwpStream(callback_context->minidump_writer, - callback_context->writer_args, - lsp, &lwp); - } - if (success) { - callback_context->list->CopyIndexAfterObject( - callback_context->lwp_index++, - &lwp, sizeof(MDRawThread)); - } - } - - return success; -} - -bool WriteLwpListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // Get the lwp information. - const SolarisLwp *lwp_lister = writer_args->lwp_lister; - int lwp_count = lwp_lister->GetLwpCount(); - if (lwp_count < 0) - return false; - TypedMDRVA list(minidump_writer); - if (!list.AllocateObjectAndArray(lwp_count - 1, sizeof(MDRawThread))) - return false; - dir->stream_type = MD_THREAD_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_threads = lwp_count - 1; - - LwpInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.lwp_index = 0; - CallbackParam callback_param(LwpInformationCallback, - &context); - int written = - lwp_lister->Lwp_iter_all(lwp_lister->getpid(), &callback_param); - return written == lwp_count; -} - -bool WriteCVRecord(MinidumpFileWriter *minidump_writer, - MDRawModule *module, - const char *module_path, - char *realname) { - TypedMDRVA cv(minidump_writer); - - char path[PATH_MAX]; - const char *module_name = module_path ? module_path : ""; - snprintf(path, sizeof(path), "/proc/self/object/%s", module_name); - - size_t module_name_length = strlen(realname); - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) - return false; - if (!cv.CopyIndexAfterObject(0, realname, module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - memset(cv_ptr, 0, sizeof(MDCVInfoPDB70)); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - FileID file_id(path); - unsigned char identifier[16]; - - if (file_id.ElfFileIdentifier(identifier)) { - cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | - (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | - (uint32_t)identifier[3]; - cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; - cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - return true; -} - -struct ModuleInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int module_index; -}; - -bool ModuleInfoCallback(const ModuleInfo &module_info, void *context) { - ModuleInfoCallbackCtx *callback_context = - static_cast(context); - // Skip those modules without name, or those that are not modules. - if (strlen(module_info.name) == 0) - return true; - - MDRawModule module; - memset(&module, 0, sizeof(module)); - MDLocationDescriptor loc; - char path[PATH_MAX]; - char buf[PATH_MAX]; - char *realname; - int count; - - snprintf(path, sizeof (path), "/proc/self/path/%s", module_info.name); - if ((count = readlink(path, buf, PATH_MAX)) < 0) - return false; - buf[count] = '\0'; - - if ((realname = strrchr(buf, '/')) == NULL) - return false; - realname++; - - if (!callback_context->minidump_writer->WriteString(realname, 0, &loc)) - return false; - - module.base_of_image = (u_int64_t)module_info.start_addr; - module.size_of_image = module_info.size; - module.module_name_rva = loc.rva; - - if (!WriteCVRecord(callback_context->minidump_writer, &module, - module_info.name, realname)) - return false; - - callback_context->list->CopyIndexAfterObject( - callback_context->module_index++, &module, MD_MODULE_SIZE); - return true; -} - -bool WriteModuleListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA list(minidump_writer); - int module_count = writer_args->lwp_lister->GetModuleCount(); - - if (module_count <= 0 || - !list.AllocateObjectAndArray(module_count, MD_MODULE_SIZE)) { - return false; - } - - dir->stream_type = MD_MODULE_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_modules = module_count; - ModuleInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.module_index = 0; - CallbackParam callback(ModuleInfoCallback, &context); - return writer_args->lwp_lister->ListModules(&callback) == module_count; -} - -bool WriteSystemInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA sys_info(minidump_writer); - - if (!sys_info.Allocate()) - return false; - - dir->stream_type = MD_SYSTEM_INFO_STREAM; - dir->location = sys_info.location(); - - return WriteCPUInformation(sys_info.get()) && - WriteOSInformation(minidump_writer, sys_info.get()); -} - -bool WriteExceptionStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // This happenes when this is not a crash, but a requested dump. - if (writer_args->sig_ctx == NULL) - return false; - - TypedMDRVA exception(minidump_writer); - if (!exception.Allocate()) - return false; - - dir->stream_type = MD_EXCEPTION_STREAM; - dir->location = exception.location(); - exception.get()->thread_id = writer_args->crashed_lwpid; - exception.get()->exception_record.exception_code = writer_args->signo; - exception.get()->exception_record.exception_flags = 0; - -#if TARGET_CPU_SPARC - if (writer_args->sig_ctx != NULL) { - exception.get()->exception_record.exception_address = - writer_args->sig_ctx->uc_mcontext.gregs[REG_PC]; - } else { - return true; - } - - // Write context of the exception. - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - exception.get()->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); - return WriteContext(context.get(), writer_args->sig_ctx); -#elif TARGET_CPU_X86 - if (writer_args->sig_ctx != NULL) { - exception.get()->exception_record.exception_address = - writer_args->sig_ctx->uc_mcontext.gregs[EIP]; - } else { - return true; - } - - // Write context of the exception. - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - exception.get()->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), - (int *)&writer_args->sig_ctx->uc_mcontext.gregs, - NULL); -#endif -} - -bool WriteMiscInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - - if (!info.Allocate()) - return false; - - dir->stream_type = MD_MISC_INFO_STREAM; - dir->location = info.location(); - info.get()->size_of_info = sizeof(MDRawMiscInfo); - info.get()->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID; - info.get()->process_id = writer_args->requester_pid; - - return true; -} - -bool WriteBreakpadInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - - if (!info.Allocate()) - return false; - - dir->stream_type = MD_BREAKPAD_INFO_STREAM; - dir->location = info.location(); - - info.get()->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info.get()->dump_thread_id = getpid(); - info.get()->requesting_thread_id = writer_args->requester_pid; - return true; -} - -class AutoLwpResumer { - public: - AutoLwpResumer(SolarisLwp *lwp) : lwp_(lwp) {} - ~AutoLwpResumer() { lwp_->ControlAllLwps(false); } - private: - SolarisLwp *lwp_; -}; - -// Prototype of writer functions. -typedef bool (*WriteStreamFN)(MinidumpFileWriter *, - const WriterArgument *, - MDRawDirectory *); - -// Function table to writer a full minidump. -const WriteStreamFN writers[] = { - WriteLwpListStream, - WriteModuleListStream, - WriteSystemInfoStream, - WriteExceptionStream, - WriteMiscInfoStream, - WriteBreakpadInfoStream, -}; - -// Will call each writer function in the writers table. -//void* MinidumpGenerator::Write(void *argument) { -void* Write(void *argument) { - WriterArgument *writer_args = static_cast(argument); - - if (!writer_args->lwp_lister->ControlAllLwps(true)) - return NULL; - - AutoLwpResumer lwpResumer(writer_args->lwp_lister); - - if (writer_args->sighandler_ebp != 0 && - writer_args->lwp_lister->FindSigContext(writer_args->sighandler_ebp, - &writer_args->sig_ctx)) { - writer_args->crashed_stack_bottom = - writer_args->lwp_lister->GetLwpStackBottom( -#if TARGET_CPU_SPARC - writer_args->sig_ctx->uc_mcontext.gregs[REG_O6] -#elif TARGET_CPU_X86 - writer_args->sig_ctx->uc_mcontext.gregs[UESP] -#endif - ); - - int crashed_lwpid = FindCrashingLwp(writer_args->crashed_stack_bottom, - writer_args->requester_pid, - writer_args->lwp_lister); - if (crashed_lwpid > 0) - writer_args->crashed_lwpid = crashed_lwpid; - } - - MinidumpFileWriter *minidump_writer = writer_args->minidump_writer; - TypedMDRVA header(minidump_writer); - TypedMDRVA dir(minidump_writer); - if (!header.Allocate()) - return 0; - - int writer_count = sizeof(writers) / sizeof(writers[0]); - // Need directory space for all writers. - if (!dir.AllocateArray(writer_count)) - return 0; - header.get()->signature = MD_HEADER_SIGNATURE; - header.get()->version = MD_HEADER_VERSION; - header.get()->time_date_stamp = time(NULL); - header.get()->stream_count = writer_count; - header.get()->stream_directory_rva = dir.position(); - - int dir_index = 0; - MDRawDirectory local_dir; - for (int i = 0; i < writer_count; ++i) { - if ((*writers[i])(minidump_writer, writer_args, &local_dir)) - dir.CopyIndex(dir_index++, &local_dir); - } - - return 0; -} - -} // namespace - -namespace google_breakpad { - -MinidumpGenerator::MinidumpGenerator() { -} - -MinidumpGenerator::~MinidumpGenerator() { -} - -// Write minidump into file. -// It runs in a different thread from the crashing thread. -bool MinidumpGenerator::WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) const { - // The exception handler thread. - pthread_t handler_thread; - - assert(file_pathname != NULL); - - if (file_pathname == NULL) - return false; - - MinidumpFileWriter minidump_writer; - if (minidump_writer.Open(file_pathname)) { - WriterArgument argument; - memset(&argument, 0, sizeof(argument)); - SolarisLwp lwp_lister(getpid()); - argument.lwp_lister = &lwp_lister; - argument.minidump_writer = &minidump_writer; - argument.requester_pid = getpid(); - argument.crashed_lwpid = pthread_self(); - argument.signo = signo; - argument.sighandler_ebp = sighandler_ebp; - argument.sig_ctx = NULL; - - pthread_create(&handler_thread, NULL, Write, (void *)&argument); - pthread_join(handler_thread, NULL); - return true; - } - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.h deleted file mode 100644 index 882f9e1d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_generator.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H__ -#define CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "client/solaris/handler/solaris_lwp.h" -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// -// MinidumpGenerator -// -// A minidump generator should be created before any exception happen. -// -class MinidumpGenerator { - // Callback run for writing lwp information in the process. - friend bool LwpInformationCallback(lwpstatus_t *lsp, void *context); - - // Callback run for writing module information in the process. - friend bool ModuleInfoCallback(const ModuleInfo &module_info, void *context); - - public: - MinidumpGenerator(); - - ~MinidumpGenerator(); - - // Write minidump. - bool WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) const; -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_test.cc deleted file mode 100644 index 33302d86..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/minidump_test.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include "client/minidump_file_writer.h" -#include "client/solaris/handler/minidump_generator.h" - -using std::string; -using google_breakpad::MinidumpGenerator; - -static bool doneWritingReport = false; - -static void *Reporter(void *) { - char buffer[PATH_MAX]; - MinidumpGenerator md; - - // Write it to the desktop - snprintf(buffer, sizeof(buffer), "./minidump_test.out"); - fprintf(stdout, "Writing %s\n", buffer); - - md.WriteMinidumpToFile(buffer, 0, 0, NULL); - doneWritingReport = true; - - return NULL; -} - -static void SleepyFunction() { - while (!doneWritingReport) { - usleep(100); - } -} - -int main(int argc, char * const argv[]) { - pthread_t reporter_thread; - - if (pthread_create(&reporter_thread, NULL, Reporter, NULL) == 0) { - pthread_detach(reporter_thread); - } else { - perror("pthread_create"); - } - - SleepyFunction(); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.cc deleted file mode 100644 index 0148997a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.cc +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "client/solaris/handler/solaris_lwp.h" -#include "common/solaris/message_output.h" - -using namespace google_breakpad; - -// This unamed namespace contains helper function. -namespace { - -uintptr_t stack_base_address = 0; -static const int HEADER_MAX = 2000; -static const int MAP_MAX = 1000; - -// Context information for the callbacks when validating address by listing -// modules. -struct AddressValidatingContext { - uintptr_t address; - bool is_mapped; - - AddressValidatingContext() : address(0UL), is_mapped(false) { - } -}; - -// Convert from string to int. -static bool LocalAtoi(char *s, int *r) { - assert(s != NULL); - assert(r != NULL); - char *endptr = NULL; - int ret = strtol(s, &endptr, 10); - if (endptr == s) - return false; - *r = ret; - return true; -} - -// Callback invoked for each mapped module. -// It uses the module's adderss range to validate the address. -static bool AddressNotInModuleCallback(const ModuleInfo &module_info, - void *context) { - AddressValidatingContext *addr = - reinterpret_cast(context); - if (addr->is_mapped = ((module_info.start_addr > 0) && - (addr->address >= module_info.start_addr) && - (addr->address <= module_info.start_addr + - module_info.size))) { - stack_base_address = module_info.start_addr + module_info.size; - } - - return !addr->is_mapped; -} - -static int IterateLwpAll(int pid, - CallbackParam *callback_param) { - char lwp_path[40]; - DIR *dir; - int count = 0; - - snprintf(lwp_path, sizeof (lwp_path), "/proc/%d/lwp", (int)pid); - if ((dir = opendir(lwp_path)) == NULL) - return -1; - - struct dirent *entry = NULL; - while ((entry = readdir(dir)) != NULL) { - if ((strcmp(entry->d_name, ".") != 0) && - (strcmp(entry->d_name, "..") != 0)) { - int lwpid = 0; - int last_pid = 0; - if (LocalAtoi(entry->d_name, &lwpid) && last_pid != lwpid) { - last_pid = lwpid; - ++count; - if (callback_param && - !(callback_param->call_back)(lwpid, callback_param->context)) { - break; - } - } - } - } - - closedir(dir); - return count; -} - -#if defined(__i386) && !defined(NO_FRAME_POINTER) -void *GetNextFrame(void **last_ebp) { - void *sp = *last_ebp; - if ((unsigned long)sp == (unsigned long)last_ebp) - return NULL; - if ((unsigned long)sp & (sizeof(void *) - 1)) - return NULL; - if ((unsigned long)sp - (unsigned long)last_ebp > 100000) - return NULL; - return sp; -} -#elif defined(__sparc) -void *GetNextFrame(void *last_ebp) { - return reinterpret_cast(last_ebp)->fr_savfp; -} -#else -void *GetNextFrame(void **last_ebp) { - return reinterpret_cast(last_ebp); -} -#endif - - -class AutoCloser { - public: - AutoCloser(int fd) : fd_(fd) {} - ~AutoCloser() { if (fd_) close(fd_); } - private: - int fd_; -}; - -// Control the execution of the lwp. -// Suspend/Resume lwp based on the value of context. -static bool ControlLwp(int lwpid, void *context) { - // The current thread is the one to handle the crash. Ignore it. - if (lwpid != pthread_self()) { - int ctlfd; - char procname[PATH_MAX]; - bool suspend = *(bool *)context; - - // Open the /proc/$pid/lwp/$lwpid/lwpctl files - snprintf(procname, sizeof (procname), "/proc/self/lwp/%d/lwpctl", lwpid); - - if ((ctlfd = open(procname, O_WRONLY|O_EXCL)) < 0) { - print_message2(2, "failed to open %s in ControlLwp\n", procname); - return false; - } - - AutoCloser autocloser(ctlfd); - - long ctl[2]; - ctl[0] = suspend ? PCSTOP : PCRUN; - ctl[1] = 0; - if (write(ctlfd, ctl, sizeof (ctl)) != sizeof (ctl)) { - print_message2(2, "failed in lwp %d\n", lwpid); - return false; - } - } - - return true; -} - -/* - * Utility function to read the contents of a file that contains a - * prheader_t at the start (/proc/$pid/lstatus or /proc/$pid/lpsinfo). - * Return true on success. - */ -static bool read_lfile(int pid, const char *lname, prheader_t *lhp) { - char lpath[PATH_MAX]; - struct stat statb; - int fd; - size_t size; - - snprintf(lpath, sizeof (lpath), "/proc/%d/%s", pid, lname); - if ((fd = open(lpath, O_RDONLY)) < 0) { - print_message2(2, "failed to open %s in read_lfile\n", lpath); - return false; - } - - AutoCloser autocloser(fd); - - if (fstat(fd, &statb) != 0) - return false; - - size = statb.st_size; - if ((size / sizeof (prheader_t)) + 32 > HEADER_MAX) { - print_message1(2, "map size overflow\n"); - return false; - } - - if (pread(fd, lhp, size, 0) <= sizeof (prheader_t)) - return false; - - return true; -} - -} // namespace - -namespace google_breakpad { - -SolarisLwp::SolarisLwp(int pid) : pid_(pid) { -} - -SolarisLwp::~SolarisLwp() { -} - -int SolarisLwp::ControlAllLwps(bool suspend) { - CallbackParam callback_param(ControlLwp, &suspend); - return IterateLwpAll(pid_, &callback_param); -} - -int SolarisLwp::GetLwpCount() const { - return IterateLwpAll(pid_, NULL); -} - -int SolarisLwp::Lwp_iter_all(int pid, - CallbackParam *callback_param) const { - lwpstatus_t *Lsp; - lwpstatus_t *sp; - prheader_t lphp[HEADER_MAX]; - prheader_t lhp[HEADER_MAX]; - prheader_t *Lphp = lphp; - prheader_t *Lhp = lhp; - lwpsinfo_t *Lpsp; - long nstat; - long ninfo; - int rv = 0; - - /* - * The /proc/pid/lstatus file has the array of lwpstatus_t's and the - * /proc/pid/lpsinfo file has the array of lwpsinfo_t's. - */ - if (read_lfile(pid, "lstatus", Lhp) == NULL) - return -1; - if (read_lfile(pid, "lpsinfo", Lphp) == NULL) { - return -1; - } - - Lsp = (lwpstatus_t *)(uintptr_t)(Lhp + 1); - Lpsp = (lwpsinfo_t *)(uintptr_t)(Lphp + 1); - - for (ninfo = Lphp->pr_nent; ninfo != 0; --ninfo) { - if (Lpsp->pr_sname != 'Z') { - sp = Lsp; - Lsp = (lwpstatus_t *)((uintptr_t)Lsp + Lhp->pr_entsize); - } else { - sp = NULL; - } - if (callback_param && - !(callback_param->call_back)(sp, callback_param->context)) - break; - ++rv; - Lpsp = (lwpsinfo_t *)((uintptr_t)Lpsp + Lphp->pr_entsize); - } - - return rv; -} - -uintptr_t SolarisLwp::GetLwpStackBottom(uintptr_t current_esp) const { - AddressValidatingContext addr; - addr.address = current_esp; - CallbackParam callback_param(AddressNotInModuleCallback, - &addr); - ListModules(&callback_param); - return stack_base_address; -} - -int SolarisLwp::GetModuleCount() const { - return ListModules(NULL); -} - -int SolarisLwp::ListModules( - CallbackParam *callback_param) const { - const char *maps_path = "/proc/self/map"; - struct stat status; - int fd = 0, num; - prmap_t map_array[MAP_MAX]; - prmap_t *maps = map_array; - size_t size; - - if ((fd = open(maps_path, O_RDONLY)) == -1) { - print_message2(2, "failed to open %s in ListModules\n", maps_path); - return -1; - } - - AutoCloser autocloser(fd); - - if (fstat(fd, &status)) - return -1; - - /* - * Determine number of mappings, this value must be - * larger than the actual module count - */ - size = status.st_size; - if ((num = (int)(size / sizeof (prmap_t))) > MAP_MAX) { - print_message1(2, "map size overflow\n"); - return -1; - } - - if (read(fd, (void *)maps, size) < 0) { - print_message2(2, "failed to read %d\n", fd); - return -1; - } - - prmap_t *_maps; - int _num; - int module_count = 0; - - /* - * Scan each mapping - note it is assummed that the mappings are - * presented in order. We fill holes between mappings. On intel - * the last mapping is usually the data segment of ld.so.1, after - * this comes a red zone into which non-fixed mapping won't get - * place. Thus we can simply bail from the loop after seeing the - * last mapping. - */ - for (_num = 0, _maps = maps; _num < num; ++_num, ++_maps) { - ModuleInfo module; - char *name = _maps->pr_mapname; - - memset(&module, 0, sizeof (module)); - module.start_addr = _maps->pr_vaddr; - module.size = _maps->pr_size; - if (strlen(name) > 0) { - int objectfd = 0; - char path[PATH_MAX]; - char buf[SELFMAG]; - - snprintf(path, sizeof (path), "/proc/self/object/%s", name); - if ((objectfd = open(path, O_RDONLY)) < 0) { - print_message1(2, "can't open module file\n"); - continue; - } - - AutoCloser autocloser(objectfd); - - if (read(objectfd, buf, SELFMAG) != SELFMAG) { - print_message1(2, "can't read module file\n"); - continue; - } - if (buf[0] != ELFMAG0 || buf[1] != ELFMAG1 || - buf[2] != ELFMAG2 || buf[3] != ELFMAG3) { - continue; - } - - strncpy(module.name, name, sizeof (module.name) - 1); - ++module_count; - } - if (callback_param && - (!callback_param->call_back(module, callback_param->context))) { - break; - } - } - - return module_count; -} - -// Check if the address is a valid virtual address. -// If the address is in any of the mapped modules, we take it as valid. -// Otherwise it is invalid. -bool SolarisLwp::IsAddressMapped(uintptr_t address) const { - AddressValidatingContext addr; - addr.address = address; - CallbackParam callback_param(AddressNotInModuleCallback, - &addr); - ListModules(&callback_param); - return addr.is_mapped; -} - -// We're looking for a ucontext_t as the second parameter -// to a signal handler function call. Luckily, the ucontext_t -// has an ebp(fp on SPARC) member which should match the ebp(fp) -// pointed to by the ebp(fp) of the signal handler frame. -// The Solaris stack looks like this: -// http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libproc/common/Pstack.c#81 -bool SolarisLwp::FindSigContext(uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) { - uintptr_t previous_ebp; - uintptr_t sig_ebp; - const int MAX_STACK_DEPTH = 50; - int depth_counter = 0; - - do { -#if TARGET_CPU_SPARC - previous_ebp = reinterpret_cast(GetNextFrame( - reinterpret_cast(sighandler_ebp))); - *sig_ctx = reinterpret_cast(sighandler_ebp + sizeof (struct frame)); - uintptr_t sig_esp = (*sig_ctx)->uc_mcontext.gregs[REG_O6]; - if (sig_esp < previous_ebp && sig_esp > sighandler_ebp) - sig_ebp = (uintptr_t)(((struct frame *)sig_esp)->fr_savfp); - -#elif TARGET_CPU_X86 - previous_ebp = reinterpret_cast(GetNextFrame( - reinterpret_cast(sighandler_ebp))); - *sig_ctx = reinterpret_cast(sighandler_ebp + sizeof (struct frame) + - 3 * sizeof(uintptr_t)); - sig_ebp = (*sig_ctx)->uc_mcontext.gregs[EBP]; -#endif - sighandler_ebp = previous_ebp; - depth_counter++; - } while(previous_ebp != sig_ebp && sighandler_ebp != 0 && - IsAddressMapped(sighandler_ebp) && depth_counter < MAX_STACK_DEPTH); - - return previous_ebp == sig_ebp && previous_ebp != 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.h deleted file mode 100644 index 0914cfcd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/solaris/handler/solaris_lwp.h +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ -#define CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ - -#if defined(sparc) || defined(__sparc) -#define TARGET_CPU_SPARC 1 -#elif defined(i386) || defined(__i386) -#define TARGET_CPU_X86 1 -#else -#error "cannot determine cpu type" -#endif - -#include -#include -#include -#include - -#ifndef _KERNEL -#define _KERNEL -#define MUST_UNDEF_KERNEL -#endif // _KERNEL -#include -#ifdef MUST_UNDEF_KERNEL -#undef _KERNEL -#undef MUST_UNDEF_KERNEL -#endif // MUST_UNDEF_KERNEL - -namespace google_breakpad { - -// Max module path name length. -static const int kMaxModuleNameLength = 256; - -// Holding infomaton about a module in the process. -struct ModuleInfo { - char name[kMaxModuleNameLength]; - uintptr_t start_addr; - int size; -}; - -// A callback to run when getting a lwp in the process. -// Return true will go on to the next lwp while return false will stop the -// iteration. -typedef bool (*LwpCallback)(lwpstatus_t* lsp, void *context); - -// A callback to run when a new module is found in the process. -// Return true will go on to the next module while return false will stop the -// iteration. -typedef bool (*ModuleCallback)(const ModuleInfo &module_info, void *context); - -// A callback to run when getting a lwpid in the process. -// Return true will go on to the next lwp while return false will stop the -// iteration. -typedef bool (*LwpidCallback)(int lwpid, void *context); - -// Holding the callback information. -template -struct CallbackParam { - // Callback function address. - CallbackFunc call_back; - // Callback context; - void *context; - - CallbackParam() : call_back(NULL), context(NULL) { - } - - CallbackParam(CallbackFunc func, void *func_context) : - call_back(func), context(func_context) { - } -}; - -/////////////////////////////////////////////////////////////////////////////// - -// -// SolarisLwp -// -// Provides handy support for operation on Solaris lwps. -// It uses proc file system to get lwp information. -// -// TODO(Alfred): Currently it only supports x86. Add SPARC support. -// -class SolarisLwp { - public: - // Create a SolarisLwp instance to list all the lwps in a process. - explicit SolarisLwp(int pid); - ~SolarisLwp(); - - int getpid() const { return this->pid_; } - - // Control all the lwps in the process. - // Return the number of suspended/resumed lwps in the process. - // Return -1 means failed to control lwps. - int ControlAllLwps(bool suspend); - - // Get the count of lwps in the process. - // Return -1 means error. - int GetLwpCount() const; - - // Iterate the lwps of process. - // Whenever there is a lwp found, the callback will be invoked to process - // the information. - // Return the callback return value or -1 on error. - int Lwp_iter_all(int pid, CallbackParam *callback_param) const; - - // Get the module count of the current process. - int GetModuleCount() const; - - // Get the mapped modules in the address space. - // Whenever a module is found, the callback will be invoked to process the - // information. - // Return how may modules are found. - int ListModules(CallbackParam *callback_param) const; - - // Get the bottom of the stack from esp. - uintptr_t GetLwpStackBottom(uintptr_t current_esp) const; - - // Finds a signal context on the stack given the ebp of our signal handler. - bool FindSigContext(uintptr_t sighandler_ebp, ucontext_t **sig_ctx); - - private: - // Check if the address is a valid virtual address. - bool IsAddressMapped(uintptr_t address) const; - - private: - // The pid of the process we are listing lwps. - int pid_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/breakpad_client.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/breakpad_client.gyp deleted file mode 100755 index ae26b91d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/breakpad_client.gyp +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - 'build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'build_all', - 'type': 'none', - 'dependencies': [ - './crash_generation/crash_generation.gyp:*', - './handler/exception_handler.gyp:*', - './sender/crash_report_sender.gyp:*', - './unittests/client_tests.gyp:*', - './unittests/testing.gyp:*', - './tests/crash_generation_app/crash_generation_app.gyp:*', - ] - }, - { - 'target_name': 'common', - 'type': 'static_library', - 'include_dirs': [ - '<(DEPTH)', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(DEPTH)', - ] - }, - 'sources': [ - '<(DEPTH)/common/windows/guid_string.cc', - '<(DEPTH)/common/windows/guid_string.h', - '<(DEPTH)/common/windows/http_upload.cc', - '<(DEPTH)/common/windows/http_upload.h', - '<(DEPTH)/common/windows/string_utils.cc', - ] - } - ] -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/auto_critical_section.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/auto_critical_section.h deleted file mode 100644 index 82c7b7f1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/auto_critical_section.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ -#define CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ - -#include - -namespace google_breakpad { - -// Automatically enters the critical section in the constructor and leaves -// the critical section in the destructor. -class AutoCriticalSection { - public: - // Creates a new instance with the given critical section object - // and enters the critical section immediately. - explicit AutoCriticalSection(CRITICAL_SECTION* cs) : cs_(cs) { - assert(cs_); - EnterCriticalSection(cs_); - } - - // Destructor: leaves the critical section. - ~AutoCriticalSection() { - LeaveCriticalSection(cs_); - } - - private: - // Disable copy ctor and operator=. - AutoCriticalSection(const AutoCriticalSection&); - AutoCriticalSection& operator=(const AutoCriticalSection&); - - CRITICAL_SECTION* cs_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/ipc_protocol.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/ipc_protocol.h deleted file mode 100644 index 7d101d38..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/common/ipc_protocol.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ -#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ - -#include -#include -#include -#include -#include "common/windows/string_utils-inl.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Name/value pair for custom client information. -struct CustomInfoEntry { - // Maximum length for name and value for client custom info. - static const int kNameMaxLength = 64; - static const int kValueMaxLength = 64; - - CustomInfoEntry() { - // Putting name and value in initializer list makes VC++ show warning 4351. - set_name(NULL); - set_value(NULL); - } - - CustomInfoEntry(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - void set_name(const wchar_t* name_arg) { - if (!name_arg) { - name[0] = L'\0'; - return; - } - WindowsStringUtils::safe_wcscpy(name, kNameMaxLength, name_arg); - } - - void set_value(const wchar_t* value_arg) { - if (!value_arg) { - value[0] = L'\0'; - return; - } - - WindowsStringUtils::safe_wcscpy(value, kValueMaxLength, value_arg); - } - - void set(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - wchar_t name[kNameMaxLength]; - wchar_t value[kValueMaxLength]; -}; - -// Constants for the protocol between client and the server. - -// Tags sent with each message indicating the purpose of -// the message. -enum MessageTag { - MESSAGE_TAG_NONE = 0, - MESSAGE_TAG_REGISTRATION_REQUEST = 1, - MESSAGE_TAG_REGISTRATION_RESPONSE = 2, - MESSAGE_TAG_REGISTRATION_ACK = 3 -}; - -struct CustomClientInfo { - const CustomInfoEntry* entries; - size_t count; -}; - -// Message structure for IPC between crash client and crash server. -struct ProtocolMessage { - ProtocolMessage() - : tag(MESSAGE_TAG_NONE), - pid(0), - dump_type(MiniDumpNormal), - thread_id(0), - exception_pointers(NULL), - assert_info(NULL), - custom_client_info(), - dump_request_handle(NULL), - dump_generated_handle(NULL), - server_alive_handle(NULL) { - } - - // Creates an instance with the given parameters. - ProtocolMessage(MessageTag arg_tag, - DWORD arg_pid, - MINIDUMP_TYPE arg_dump_type, - DWORD* arg_thread_id, - EXCEPTION_POINTERS** arg_exception_pointers, - MDRawAssertionInfo* arg_assert_info, - const CustomClientInfo& custom_info, - HANDLE arg_dump_request_handle, - HANDLE arg_dump_generated_handle, - HANDLE arg_server_alive) - : tag(arg_tag), - pid(arg_pid), - dump_type(arg_dump_type), - thread_id(arg_thread_id), - exception_pointers(arg_exception_pointers), - assert_info(arg_assert_info), - custom_client_info(custom_info), - dump_request_handle(arg_dump_request_handle), - dump_generated_handle(arg_dump_generated_handle), - server_alive_handle(arg_server_alive) { - } - - // Tag in the message. - MessageTag tag; - - // Process id. - DWORD pid; - - // Dump type requested. - MINIDUMP_TYPE dump_type; - - // Client thread id pointer. - DWORD* thread_id; - - // Exception information. - EXCEPTION_POINTERS** exception_pointers; - - // Assert information in case of an invalid parameter or - // pure call failure. - MDRawAssertionInfo* assert_info; - - // Custom client information. - CustomClientInfo custom_client_info; - - // Handle to signal the crash event. - HANDLE dump_request_handle; - - // Handle to check if server is done generating crash. - HANDLE dump_generated_handle; - - // Handle to a mutex that becomes signaled (WAIT_ABANDONED) - // if server process goes down. - HANDLE server_alive_handle; - - private: - // Disable copy ctor and operator=. - ProtocolMessage(const ProtocolMessage& msg); - ProtocolMessage& operator=(const ProtocolMessage& msg); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/ReadMe.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/ReadMe.txt deleted file mode 100644 index b54d0e11..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/ReadMe.txt +++ /dev/null @@ -1,58 +0,0 @@ -========================================================================= - State machine transitions for the Crash Generation Server -========================================================================= - -========================================================================= - | - STATE | ACTIONS - | -========================================================================= - ERROR | Clean up resources used to serve clients. - | Always remain in ERROR state. -------------------------------------------------------------------------- - INITIAL | Connect to the pipe asynchronously. - | If connection is successfully queued up asynchronously, - | go into CONNECTING state. - | If connection is done synchronously, go into CONNECTED - | state. - | For any unexpected problems, go into ERROR state. -------------------------------------------------------------------------- - CONNECTING | Get the result of async connection request. - | If I/O is still incomplete, remain in the CONNECTING - | state. - | If connection is complete, go into CONNECTED state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - CONNECTED | Read from the pipe asynchronously. - | If read request is successfully queued up asynchronously, - | go into READING state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READING | Get the result of async read request. - | If read is done, go into READ_DONE state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READ_DONE | Register the client, prepare the reply and write the - | reply to the pipe asynchronously. - | If write request is successfully queued up asynchronously, - | go into WRITING state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - WRITING | Get the result of the async write request. - | If write is done, go into WRITE_DONE state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - WRITE_DONE | Read from the pipe asynchronously (for an ACK). - | If read request is successfully queued up asynchonously, - | go into READING_ACK state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READING_ACK | Get the result of the async read request. - | If read is done, perform action for successful client - | connection. - | Go into DISCONNECTING state. -------------------------------------------------------------------------- - DISCONNECTING | Disconnect from the pipe, reset the event and go into - | INITIAL state and signal the event again. If anything - | fails, go into ERROR state. -========================================================================= diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.cc deleted file mode 100644 index 94f9c3cd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/common/ipc_protocol.h" - -static const wchar_t kCustomInfoProcessUptimeName[] = L"ptime"; - -namespace google_breakpad { - -ClientInfo::ClientInfo(CrashGenerationServer* crash_server, - DWORD pid, - MINIDUMP_TYPE dump_type, - DWORD* thread_id, - EXCEPTION_POINTERS** ex_info, - MDRawAssertionInfo* assert_info, - const CustomClientInfo& custom_client_info) - : crash_server_(crash_server), - pid_(pid), - dump_type_(dump_type), - ex_info_(ex_info), - assert_info_(assert_info), - custom_client_info_(custom_client_info), - thread_id_(thread_id), - process_handle_(NULL), - dump_requested_handle_(NULL), - dump_generated_handle_(NULL), - dump_request_wait_handle_(NULL), - process_exit_wait_handle_(NULL) { - GetSystemTimeAsFileTime(&start_time_); -} - -bool ClientInfo::Initialize() { - process_handle_ = OpenProcess(GENERIC_ALL, FALSE, pid_); - if (!process_handle_) { - return false; - } - - dump_requested_handle_ = CreateEvent(NULL, // Security attributes. - TRUE, // Manual reset. - FALSE, // Initial state. - NULL); // Name. - if (!dump_requested_handle_) { - return false; - } - - dump_generated_handle_ = CreateEvent(NULL, // Security attributes. - TRUE, // Manual reset. - FALSE, // Initial state. - NULL); // Name. - return dump_generated_handle_ != NULL; -} - -ClientInfo::~ClientInfo() { - if (dump_request_wait_handle_) { - // Wait for callbacks that might already be running to finish. - UnregisterWaitEx(dump_request_wait_handle_, INVALID_HANDLE_VALUE); - } - - if (process_exit_wait_handle_) { - // Wait for the callback that might already be running to finish. - UnregisterWaitEx(process_exit_wait_handle_, INVALID_HANDLE_VALUE); - } - - if (process_handle_) { - CloseHandle(process_handle_); - } - - if (dump_requested_handle_) { - CloseHandle(dump_requested_handle_); - } - - if (dump_generated_handle_) { - CloseHandle(dump_generated_handle_); - } -} - -void ClientInfo::UnregisterWaits() { - if (dump_request_wait_handle_) { - UnregisterWait(dump_request_wait_handle_); - dump_request_wait_handle_ = NULL; - } - - if (process_exit_wait_handle_) { - UnregisterWait(process_exit_wait_handle_); - process_exit_wait_handle_ = NULL; - } -} - -bool ClientInfo::GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const { - SIZE_T bytes_count = 0; - if (!ReadProcessMemory(process_handle_, - ex_info_, - ex_info, - sizeof(*ex_info), - &bytes_count)) { - return false; - } - - return bytes_count == sizeof(*ex_info); -} - -bool ClientInfo::GetClientThreadId(DWORD* thread_id) const { - SIZE_T bytes_count = 0; - if (!ReadProcessMemory(process_handle_, - thread_id_, - thread_id, - sizeof(*thread_id), - &bytes_count)) { - return false; - } - - return bytes_count == sizeof(*thread_id); -} - -void ClientInfo::SetProcessUptime() { - FILETIME now = {0}; - GetSystemTimeAsFileTime(&now); - - ULARGE_INTEGER time_start; - time_start.HighPart = start_time_.dwHighDateTime; - time_start.LowPart = start_time_.dwLowDateTime; - - ULARGE_INTEGER time_now; - time_now.HighPart = now.dwHighDateTime; - time_now.LowPart = now.dwLowDateTime; - - // Calculate the delay and convert it from 100-nanoseconds to milliseconds. - __int64 delay = (time_now.QuadPart - time_start.QuadPart) / 10 / 1000; - - // Convert it to a string. - wchar_t* value = custom_info_entries_.get()[custom_client_info_.count].value; - _i64tow_s(delay, value, CustomInfoEntry::kValueMaxLength, 10); -} - -bool ClientInfo::PopulateCustomInfo() { - SIZE_T bytes_count = 0; - SIZE_T read_count = sizeof(CustomInfoEntry) * custom_client_info_.count; - - // If the scoped array for custom info already has an array, it will be - // the same size as what we need. This is because the number of custom info - // entries is always the same. So allocate memory only if scoped array has - // a NULL pointer. - if (!custom_info_entries_.get()) { - // Allocate an extra entry for reporting uptime for the client process. - custom_info_entries_.reset( - new CustomInfoEntry[custom_client_info_.count + 1]); - // Use the last element in the array for uptime. - custom_info_entries_.get()[custom_client_info_.count].set_name( - kCustomInfoProcessUptimeName); - } - - if (!ReadProcessMemory(process_handle_, - custom_client_info_.entries, - custom_info_entries_.get(), - read_count, - &bytes_count)) { - return false; - } - - SetProcessUptime(); - return (bytes_count != read_count); -} - -CustomClientInfo ClientInfo::GetCustomInfo() const { - CustomClientInfo custom_info; - custom_info.entries = custom_info_entries_.get(); - // Add 1 to the count from the client process to account for extra entry for - // process uptime. - custom_info.count = custom_client_info_.count + 1; - return custom_info; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.h deleted file mode 100644 index 47a5d21f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/client_info.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -class CrashGenerationServer; - -// Abstraction for a crash client process. -class ClientInfo { - public: - // Creates an instance with the given values. Gets the process - // handle for the given process id and creates necessary event - // objects. - ClientInfo(CrashGenerationServer* crash_server, - DWORD pid, - MINIDUMP_TYPE dump_type, - DWORD* thread_id, - EXCEPTION_POINTERS** ex_info, - MDRawAssertionInfo* assert_info, - const CustomClientInfo& custom_client_info); - - ~ClientInfo(); - - CrashGenerationServer* crash_server() const { return crash_server_; } - DWORD pid() const { return pid_; } - MINIDUMP_TYPE dump_type() const { return dump_type_; } - EXCEPTION_POINTERS** ex_info() const { return ex_info_; } - MDRawAssertionInfo* assert_info() const { return assert_info_; } - DWORD* thread_id() const { return thread_id_; } - HANDLE process_handle() const { return process_handle_; } - HANDLE dump_requested_handle() const { return dump_requested_handle_; } - HANDLE dump_generated_handle() const { return dump_generated_handle_; } - - HANDLE dump_request_wait_handle() const { - return dump_request_wait_handle_; - } - - void set_dump_request_wait_handle(HANDLE value) { - dump_request_wait_handle_ = value; - } - - HANDLE process_exit_wait_handle() const { - return process_exit_wait_handle_; - } - - void set_process_exit_wait_handle(HANDLE value) { - process_exit_wait_handle_ = value; - } - - // Unregister all waits for the client. - void UnregisterWaits(); - - bool Initialize(); - bool GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const; - bool GetClientThreadId(DWORD* thread_id) const; - - // Reads the custom information from the client process address space. - bool PopulateCustomInfo(); - - // Returns the client custom information. - CustomClientInfo GetCustomInfo() const; - - private: - // Calcualtes the uptime for the client process, converts it to a string and - // stores it in the last entry of client custom info. - void SetProcessUptime(); - - // Crash generation server. - CrashGenerationServer* crash_server_; - - // Client process ID. - DWORD pid_; - - // Dump type requested by the client. - MINIDUMP_TYPE dump_type_; - - // Address of an EXCEPTION_POINTERS* variable in the client - // process address space that will point to an instance of - // EXCEPTION_POINTERS containing information about crash. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - EXCEPTION_POINTERS** ex_info_; - - // Address of an instance of MDRawAssertionInfo in the client - // process address space that will contain information about - // non-exception related crashes like invalid parameter assertion - // failures and pure calls. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - MDRawAssertionInfo* assert_info_; - - // Custom information about the client. - CustomClientInfo custom_client_info_; - - // Contains the custom client info entries read from the client process - // memory. This will be populated only if the method GetClientCustomInfo - // is called. - scoped_array custom_info_entries_; - - // Address of a variable in the client process address space that - // will contain the thread id of the crashing client thread. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - DWORD* thread_id_; - - // Client process handle. - HANDLE process_handle_; - - // Dump request event handle. - HANDLE dump_requested_handle_; - - // Dump generated event handle. - HANDLE dump_generated_handle_; - - // Wait handle for dump request event. - HANDLE dump_request_wait_handle_; - - // Wait handle for process exit event. - HANDLE process_exit_wait_handle_; - - // Time when the client process started. It is used to determine the uptime - // for the client process when it signals a crash. - FILETIME start_time_; - - // Disallow copy ctor and operator=. - ClientInfo(const ClientInfo& client_info); - ClientInfo& operator=(const ClientInfo& client_info); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation.gyp deleted file mode 100755 index ecc82d04..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation.gyp +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'crash_generation_server', - 'type': '<(library)', - 'sources': [ - 'client_info.cc', - 'crash_generation_server.cc', - 'minidump_generator.cc', - 'client_info.h', - 'crash_generation_client.h', - 'crash_generation_server.h', - 'minidump_generator.h', - ], - 'dependencies': [ - '../breakpad_client.gyp:common' - ], - }, - { - 'target_name': 'crash_generation_client', - 'type': '<(library)', - 'include_dirs': [ - '<(DEPTH)', - ], - 'sources': [ - 'crash_generation_client.h', - 'crash_generation_client.cc', - 'crash_generation_server.h', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.cc deleted file mode 100644 index 5e4e3cb9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/crash_generation_client.h" -#include -#include -#include "client/windows/common/ipc_protocol.h" - -namespace google_breakpad { - -const int kPipeBusyWaitTimeoutMs = 2000; - -#ifdef _DEBUG -const DWORD kWaitForServerTimeoutMs = INFINITE; -#else -const DWORD kWaitForServerTimeoutMs = 15000; -#endif - -const int kPipeConnectMaxAttempts = 2; - -const DWORD kPipeDesiredAccess = FILE_READ_DATA | - FILE_WRITE_DATA | - FILE_WRITE_ATTRIBUTES; - -const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION | - SECURITY_SQOS_PRESENT; - -const DWORD kPipeMode = PIPE_READMODE_MESSAGE; - -const size_t kWaitEventCount = 2; - -// This function is orphan for production code. It can be used -// for debugging to help repro some scenarios like the client -// is slow in writing to the pipe after connecting, the client -// is slow in reading from the pipe after writing, etc. The parameter -// overlapped below is not used and it is present to match the signature -// of this function to TransactNamedPipe Win32 API. Uncomment if needed -// for debugging. -/** -static bool TransactNamedPipeDebugHelper(HANDLE pipe, - const void* in_buffer, - DWORD in_size, - void* out_buffer, - DWORD out_size, - DWORD* bytes_count, - LPOVERLAPPED) { - // Uncomment the next sleep to create a gap before writing - // to pipe. - // Sleep(5000); - - if (!WriteFile(pipe, - in_buffer, - in_size, - bytes_count, - NULL)) { - return false; - } - - // Uncomment the next sleep to create a gap between write - // and read. - // Sleep(5000); - - return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; -} -**/ - -CrashGenerationClient::CrashGenerationClient( - const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info) - : pipe_name_(pipe_name), - dump_type_(dump_type), - thread_id_(0), - server_process_id_(0), - crash_event_(NULL), - crash_generated_(NULL), - server_alive_(NULL), - exception_pointers_(NULL), - custom_info_() { - memset(&assert_info_, 0, sizeof(assert_info_)); - if (custom_info) { - custom_info_ = *custom_info; - } -} - -CrashGenerationClient::~CrashGenerationClient() { - if (crash_event_) { - CloseHandle(crash_event_); - } - - if (crash_generated_) { - CloseHandle(crash_generated_); - } - - if (server_alive_) { - CloseHandle(server_alive_); - } -} - -// Performs the registration step with the server process. -// The registration step involves communicating with the server -// via a named pipe. The client sends the following pieces of -// data to the server: -// -// * Message tag indicating the client is requesting registration. -// * Process id of the client process. -// * Address of a DWORD variable in the client address space -// that will contain the thread id of the client thread that -// caused the crash. -// * Address of a EXCEPTION_POINTERS* variable in the client -// address space that will point to an instance of EXCEPTION_POINTERS -// when the crash happens. -// * Address of an instance of MDRawAssertionInfo that will contain -// relevant information in case of non-exception crashes like assertion -// failures and pure calls. -// -// In return the client expects the following information from the server: -// -// * Message tag indicating successful registration. -// * Server process id. -// * Handle to an object that client can signal to request dump -// generation from the server. -// * Handle to an object that client can wait on after requesting -// dump generation for the server to finish dump generation. -// * Handle to a mutex object that client can wait on to make sure -// server is still alive. -// -// If any step of the expected behavior mentioned above fails, the -// registration step is not considered successful and hence out-of-process -// dump generation service is not available. -// -// Returns true if the registration is successful; false otherwise. -bool CrashGenerationClient::Register() { - HANDLE pipe = ConnectToServer(); - if (!pipe) { - return false; - } - - bool success = RegisterClient(pipe); - CloseHandle(pipe); - return success; -} - -HANDLE CrashGenerationClient::ConnectToServer() { - HANDLE pipe = ConnectToPipe(pipe_name_.c_str(), - kPipeDesiredAccess, - kPipeFlagsAndAttributes); - if (!pipe) { - return NULL; - } - - DWORD mode = kPipeMode; - if (!SetNamedPipeHandleState(pipe, &mode, NULL, NULL)) { - CloseHandle(pipe); - pipe = NULL; - } - - return pipe; -} - -bool CrashGenerationClient::RegisterClient(HANDLE pipe) { - ProtocolMessage msg(MESSAGE_TAG_REGISTRATION_REQUEST, - GetCurrentProcessId(), - dump_type_, - &thread_id_, - &exception_pointers_, - &assert_info_, - custom_info_, - NULL, - NULL, - NULL); - ProtocolMessage reply; - DWORD bytes_count = 0; - // The call to TransactNamedPipe below can be changed to a call - // to TransactNamedPipeDebugHelper to help repro some scenarios. - // For details see comments for TransactNamedPipeDebugHelper. - if (!TransactNamedPipe(pipe, - &msg, - sizeof(msg), - &reply, - sizeof(ProtocolMessage), - &bytes_count, - NULL)) { - return false; - } - - if (!ValidateResponse(reply)) { - return false; - } - - ProtocolMessage ack_msg; - ack_msg.tag = MESSAGE_TAG_REGISTRATION_ACK; - - if (!WriteFile(pipe, &ack_msg, sizeof(ack_msg), &bytes_count, NULL)) { - return false; - } - crash_event_ = reply.dump_request_handle; - crash_generated_ = reply.dump_generated_handle; - server_alive_ = reply.server_alive_handle; - server_process_id_ = reply.pid; - - return true; -} - -HANDLE CrashGenerationClient::ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs) { - for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { - HANDLE pipe = CreateFile(pipe_name, - pipe_access, - 0, - NULL, - OPEN_EXISTING, - flags_attrs, - NULL); - if (pipe != INVALID_HANDLE_VALUE) { - return pipe; - } - - // Cannot continue retrying if error is something other than - // ERROR_PIPE_BUSY. - if (GetLastError() != ERROR_PIPE_BUSY) { - break; - } - - // Cannot continue retrying if wait on pipe fails. - if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { - break; - } - } - - return NULL; -} - -bool CrashGenerationClient::ValidateResponse( - const ProtocolMessage& msg) const { - return (msg.tag == MESSAGE_TAG_REGISTRATION_RESPONSE) && - (msg.pid != 0) && - (msg.dump_request_handle != NULL) && - (msg.dump_generated_handle != NULL) && - (msg.server_alive_handle != NULL); -} - -bool CrashGenerationClient::IsRegistered() const { - return crash_event_ != NULL; -} - -bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info, - MDRawAssertionInfo* assert_info) { - if (!IsRegistered()) { - return false; - } - - exception_pointers_ = ex_info; - thread_id_ = GetCurrentThreadId(); - - if (assert_info) { - memcpy(&assert_info_, assert_info, sizeof(assert_info_)); - } else { - memset(&assert_info_, 0, sizeof(assert_info_)); - } - - return SignalCrashEventAndWait(); -} - -bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info) { - return RequestDump(ex_info, NULL); -} - -bool CrashGenerationClient::RequestDump(MDRawAssertionInfo* assert_info) { - return RequestDump(NULL, assert_info); -} - -bool CrashGenerationClient::SignalCrashEventAndWait() { - assert(crash_event_); - assert(crash_generated_); - assert(server_alive_); - - // Reset the dump generated event before signaling the crash - // event so that the server can set the dump generated event - // once it is done generating the event. - if (!ResetEvent(crash_generated_)) { - return false; - } - - if (!SetEvent(crash_event_)) { - return false; - } - - HANDLE wait_handles[kWaitEventCount] = {crash_generated_, server_alive_}; - - DWORD result = WaitForMultipleObjects(kWaitEventCount, - wait_handles, - FALSE, - kWaitForServerTimeoutMs); - - // Crash dump was successfully generated only if the server - // signaled the crash generated event. - return result == WAIT_OBJECT_0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.h deleted file mode 100644 index 01d13dde..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ - -#include -#include -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -struct CustomClientInfo; - -// Abstraction of client-side implementation of out of process -// crash generation. -// -// The process that desires to have out-of-process crash dump -// generation service can use this class in the following way: -// -// * Create an instance. -// * Call Register method so that the client tries to register -// with the server process and check the return value. If -// registration is not successful, out-of-process crash dump -// generation will not be available -// * Request dump generation by calling either of the two -// overloaded RequestDump methods - one in case of exceptions -// and the other in case of assertion failures -// -// Note that it is the responsibility of the client code of -// this class to set the unhandled exception filter with the -// system by calling the SetUnhandledExceptionFilter function -// and the client code should explicitly request dump generation. -class CrashGenerationClient { - public: - CrashGenerationClient(const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info); - - ~CrashGenerationClient(); - - // Registers the client process with the crash server. - // - // Returns true if the registration is successful; false otherwise. - bool Register(); - - bool RequestDump(EXCEPTION_POINTERS* ex_info, - MDRawAssertionInfo* assert_info); - - // Requests the crash server to generate a dump with the given - // exception information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(EXCEPTION_POINTERS* ex_info); - - // Requests the crash server to generate a dump with the given - // assertion information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(MDRawAssertionInfo* assert_info); - - private: - // Connects to the appropriate pipe and sets the pipe handle state. - // - // Returns the pipe handle if everything goes well; otherwise Returns NULL. - HANDLE ConnectToServer(); - - // Performs a handshake with the server over the given pipe which should be - // already connected to the server. - // - // Returns true if handshake with the server was successful; false otherwise. - bool RegisterClient(HANDLE pipe); - - // Validates the given server response. - bool ValidateResponse(const ProtocolMessage& msg) const; - - // Returns true if the registration step succeeded; false otherwise. - bool IsRegistered() const; - - // Connects to the given named pipe with given parameters. - // - // Returns true if the connection is successful; false otherwise. - HANDLE ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs); - - // Signals the crash event and wait for the server to generate crash. - bool SignalCrashEventAndWait(); - - // Pipe name to use to talk to server. - std::wstring pipe_name_; - - // Custom client information - CustomClientInfo custom_info_; - - // Type of dump to generate. - MINIDUMP_TYPE dump_type_; - - // Event to signal in case of a crash. - HANDLE crash_event_; - - // Handle to wait on after signaling a crash for the server - // to finish generating crash dump. - HANDLE crash_generated_; - - // Handle to a mutex that will become signaled with WAIT_ABANDONED - // if the server process goes down. - HANDLE server_alive_; - - // Server process id. - DWORD server_process_id_; - - // Id of the thread that caused the crash. - DWORD thread_id_; - - // Exception pointers for an exception crash. - EXCEPTION_POINTERS* exception_pointers_; - - // Assertion info for an invalid parameter or pure call crash. - MDRawAssertionInfo assert_info_; - - // Disable copy ctor and operator=. - CrashGenerationClient(const CrashGenerationClient& crash_client); - CrashGenerationClient& operator=(const CrashGenerationClient& crash_client); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.cc deleted file mode 100644 index 61af1b2d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.cc +++ /dev/null @@ -1,880 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/crash_generation_server.h" -#include -#include -#include -#include "client/windows/common/auto_critical_section.h" -#include "processor/scoped_ptr.h" - -#include "client/windows/crash_generation/client_info.h" - -namespace google_breakpad { - -// Output buffer size. -static const size_t kOutBufferSize = 64; - -// Input buffer size. -static const size_t kInBufferSize = 64; - -// Access flags for the client on the dump request event. -static const DWORD kDumpRequestEventAccess = EVENT_MODIFY_STATE; - -// Access flags for the client on the dump generated event. -static const DWORD kDumpGeneratedEventAccess = EVENT_MODIFY_STATE | - SYNCHRONIZE; - -// Access flags for the client on the mutex. -static const DWORD kMutexAccess = SYNCHRONIZE; - -// Attribute flags for the pipe. -static const DWORD kPipeAttr = FILE_FLAG_FIRST_PIPE_INSTANCE | - PIPE_ACCESS_DUPLEX | - FILE_FLAG_OVERLAPPED; - -// Mode for the pipe. -static const DWORD kPipeMode = PIPE_TYPE_MESSAGE | - PIPE_READMODE_MESSAGE | - PIPE_WAIT; - -// For pipe I/O, execute the callback in the wait thread itself, -// since the callback does very little work. The callback executes -// the code for one of the states of the server state machine and -// the code for all of the states perform async I/O and hence -// finish very quickly. -static const ULONG kPipeIOThreadFlags = WT_EXECUTEINWAITTHREAD; - -// Dump request threads will, most likely, generate dumps. That may -// take some time to finish, so specify WT_EXECUTELONGFUNCTION flag. -static const ULONG kDumpRequestThreadFlags = WT_EXECUTEINWAITTHREAD | - WT_EXECUTELONGFUNCTION; - -// Maximum delay during server shutdown if some work items -// are still executing. -static const int kShutdownDelayMs = 10000; - -// Interval for each sleep during server shutdown. -static const int kShutdownSleepIntervalMs = 5; - -static bool IsClientRequestValid(const ProtocolMessage& msg) { - return msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST && - msg.pid != 0 && - msg.thread_id != NULL && - msg.exception_pointers != NULL && - msg.assert_info != NULL; -} - -CrashGenerationServer::CrashGenerationServer( - const std::wstring& pipe_name, - SECURITY_ATTRIBUTES* pipe_sec_attrs, - OnClientConnectedCallback connect_callback, - void* connect_context, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitedCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::wstring* dump_path) - : pipe_name_(pipe_name), - pipe_sec_attrs_(pipe_sec_attrs), - pipe_(NULL), - pipe_wait_handle_(NULL), - server_alive_handle_(NULL), - connect_callback_(connect_callback), - connect_context_(connect_context), - dump_callback_(dump_callback), - dump_context_(dump_context), - exit_callback_(exit_callback), - exit_context_(exit_context), - generate_dumps_(generate_dumps), - dump_generator_(NULL), - server_state_(IPC_SERVER_STATE_UNINITIALIZED), - shutting_down_(false), - overlapped_(), - client_info_(NULL), - cleanup_item_count_(0) { - InitializeCriticalSection(&clients_sync_); - - if (dump_path) { - dump_generator_.reset(new MinidumpGenerator(*dump_path)); - } -} - -CrashGenerationServer::~CrashGenerationServer() { - // Indicate to existing threads that server is shutting down. - shutting_down_ = true; - - // Even if there are no current worker threads running, it is possible that - // an I/O request is pending on the pipe right now but not yet done. In fact, - // it's very likely this is the case unless we are in an ERROR state. If we - // don't wait for the pending I/O to be done, then when the I/O completes, - // it may write to invalid memory. AppVerifier will flag this problem too. - // So we disconnect from the pipe and then wait for the server to get into - // error state so that the pending I/O will fail and get cleared. - DisconnectNamedPipe(pipe_); - int num_tries = 100; - while (num_tries-- && server_state_ != IPC_SERVER_STATE_ERROR) { - Sleep(10); - } - - // Unregister wait on the pipe. - if (pipe_wait_handle_) { - // Wait for already executing callbacks to finish. - UnregisterWaitEx(pipe_wait_handle_, INVALID_HANDLE_VALUE); - } - - // Close the pipe to avoid further client connections. - if (pipe_) { - CloseHandle(pipe_); - } - - // Request all ClientInfo objects to unregister all waits. - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - - std::list::iterator iter; - for (iter = clients_.begin(); iter != clients_.end(); ++iter) { - ClientInfo* client_info = *iter; - client_info->UnregisterWaits(); - } - } - - // Now that all waits have been unregistered, wait for some time - // for all pending work items to finish. - int total_wait = 0; - while (cleanup_item_count_ > 0) { - Sleep(kShutdownSleepIntervalMs); - - total_wait += kShutdownSleepIntervalMs; - - if (total_wait >= kShutdownDelayMs) { - break; - } - } - - // Clean up all the ClientInfo objects. - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - - std::list::iterator iter; - for (iter = clients_.begin(); iter != clients_.end(); ++iter) { - ClientInfo* client_info = *iter; - delete client_info; - } - } - - if (server_alive_handle_) { - // Release the mutex before closing the handle so that clients requesting - // dumps wait for a long time for the server to generate a dump. - ReleaseMutex(server_alive_handle_); - CloseHandle(server_alive_handle_); - } - - if (overlapped_.hEvent) { - CloseHandle(overlapped_.hEvent); - } - - DeleteCriticalSection(&clients_sync_); -} - -bool CrashGenerationServer::Start() { - if (server_state_ != IPC_SERVER_STATE_UNINITIALIZED) { - return false; - } - - server_state_ = IPC_SERVER_STATE_INITIAL; - - server_alive_handle_ = CreateMutex(NULL, TRUE, NULL); - if (!server_alive_handle_) { - return false; - } - - // Event to signal the client connection and pipe reads and writes. - overlapped_.hEvent = CreateEvent(NULL, // Security descriptor. - TRUE, // Manual reset. - FALSE, // Initially signaled. - NULL); // Name. - if (!overlapped_.hEvent) { - return false; - } - - // Register a callback with the thread pool for the client connection. - if (!RegisterWaitForSingleObject(&pipe_wait_handle_, - overlapped_.hEvent, - OnPipeConnected, - this, - INFINITE, - kPipeIOThreadFlags)) { - return false; - } - - pipe_ = CreateNamedPipe(pipe_name_.c_str(), - kPipeAttr, - kPipeMode, - 1, - kOutBufferSize, - kInBufferSize, - 0, - pipe_sec_attrs_); - if (pipe_ == INVALID_HANDLE_VALUE) { - return false; - } - - // Kick-start the state machine. This will initiate an asynchronous wait - // for client connections. - HandleInitialState(); - - // If we are in error state, it's because we failed to start listening. - return server_state_ != IPC_SERVER_STATE_ERROR; -} - -// If the server thread serving clients ever gets into the -// ERROR state, reset the event, close the pipe and remain -// in the error state forever. Error state means something -// that we didn't account for has happened, and it's dangerous -// to do anything unknowingly. -void CrashGenerationServer::HandleErrorState() { - assert(server_state_ == IPC_SERVER_STATE_ERROR); - - // If the server is shutting down anyway, don't clean up - // here since shut down process will clean up. - if (shutting_down_) { - return; - } - - if (pipe_wait_handle_) { - UnregisterWait(pipe_wait_handle_); - pipe_wait_handle_ = NULL; - } - - if (pipe_) { - CloseHandle(pipe_); - pipe_ = NULL; - } - - if (overlapped_.hEvent) { - CloseHandle(overlapped_.hEvent); - overlapped_.hEvent = NULL; - } -} - -// When the server thread serving clients is in the INITIAL state, -// try to connect to the pipe asynchronously. If the connection -// finishes synchronously, directly go into the CONNECTED state; -// otherwise go into the CONNECTING state. For any problems, go -// into the ERROR state. -void CrashGenerationServer::HandleInitialState() { - assert(server_state_ == IPC_SERVER_STATE_INITIAL); - - if (!ResetEvent(overlapped_.hEvent)) { - EnterErrorState(); - return; - } - - bool success = ConnectNamedPipe(pipe_, &overlapped_) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - // From MSDN, it is not clear that when ConnectNamedPipe is used - // in an overlapped mode, will it ever return non-zero value, and - // if so, in what cases. - assert(!success); - - switch (error_code) { - case ERROR_IO_PENDING: - EnterStateWhenSignaled(IPC_SERVER_STATE_CONNECTING); - break; - - case ERROR_PIPE_CONNECTED: - EnterStateImmediately(IPC_SERVER_STATE_CONNECTED); - break; - - default: - EnterErrorState(); - break; - } -} - -// When the server thread serving the clients is in the CONNECTING state, -// try to get the result of the asynchronous connection request using -// the OVERLAPPED object. If the result indicates the connection is done, -// go into the CONNECTED state. If the result indicates I/O is still -// INCOMPLETE, remain in the CONNECTING state. For any problems, -// go into the DISCONNECTING state. -void CrashGenerationServer::HandleConnectingState() { - assert(server_state_ == IPC_SERVER_STATE_CONNECTING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (success) { - EnterStateImmediately(IPC_SERVER_STATE_CONNECTED); - } else if (error_code != ERROR_IO_INCOMPLETE) { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - } else { - // remain in CONNECTING state - } -} - -// When the server thread serving the clients is in the CONNECTED state, -// try to issue an asynchronous read from the pipe. If read completes -// synchronously or if I/O is pending then go into the READING state. -// For any problems, go into the DISCONNECTING state. -void CrashGenerationServer::HandleConnectedState() { - assert(server_state_ == IPC_SERVER_STATE_CONNECTED); - - DWORD bytes_count = 0; - memset(&msg_, 0, sizeof(msg_)); - bool success = ReadFile(pipe_, - &msg_, - sizeof(msg_), - &bytes_count, - &overlapped_) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - // Note that the asynchronous read issued above can finish before the - // code below executes. But, it is okay to change state after issuing - // the asynchronous read. This is because even if the asynchronous read - // is done, the callback for it would not be executed until the current - // thread finishes its execution. - if (success || error_code == ERROR_IO_PENDING) { - EnterStateWhenSignaled(IPC_SERVER_STATE_READING); - } else { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - } -} - -// When the server thread serving the clients is in the READING state, -// try to get the result of the async read. If async read is done, -// go into the READ_DONE state. For any problems, go into the -// DISCONNECTING state. -void CrashGenerationServer::HandleReadingState() { - assert(server_state_ == IPC_SERVER_STATE_READING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (success && bytes_count == sizeof(ProtocolMessage)) { - EnterStateImmediately(IPC_SERVER_STATE_READ_DONE); - } else { - // We should never get an I/O incomplete since we should not execute this - // unless the Read has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - } -} - -// When the server thread serving the client is in the READ_DONE state, -// validate the client's request message, register the client by -// creating appropriate objects and prepare the response. Then try to -// write the response to the pipe asynchronously. If that succeeds, -// go into the WRITING state. For any problems, go into the DISCONNECTING -// state. -void CrashGenerationServer::HandleReadDoneState() { - assert(server_state_ == IPC_SERVER_STATE_READ_DONE); - - if (!IsClientRequestValid(msg_)) { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - return; - } - - scoped_ptr client_info( - new ClientInfo(this, - msg_.pid, - msg_.dump_type, - msg_.thread_id, - msg_.exception_pointers, - msg_.assert_info, - msg_.custom_client_info)); - - if (!client_info->Initialize()) { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - return; - } - - // Issues an asynchronous WriteFile call if successful. - // Iff successful, assigns ownership of the client_info pointer to the server - // instance, in which case we must be sure not to free it in this function. - if (!RespondToClient(client_info.get())) { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - return; - } - - client_info_ = client_info.release(); - - // Note that the asynchronous write issued by RespondToClient function - // can finish before the code below executes. But it is okay to change - // state after issuing the asynchronous write. This is because even if - // the asynchronous write is done, the callback for it would not be - // executed until the current thread finishes its execution. - EnterStateWhenSignaled(IPC_SERVER_STATE_WRITING); -} - -// When the server thread serving the clients is in the WRITING state, -// try to get the result of the async write. If the async write is done, -// go into the WRITE_DONE state. For any problems, go into the -// DISONNECTING state. -void CrashGenerationServer::HandleWritingState() { - assert(server_state_ == IPC_SERVER_STATE_WRITING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (success) { - EnterStateImmediately(IPC_SERVER_STATE_WRITE_DONE); - return; - } - - // We should never get an I/O incomplete since we should not execute this - // unless the Write has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); -} - -// When the server thread serving the clients is in the WRITE_DONE state, -// try to issue an async read on the pipe. If the read completes synchronously -// or if I/O is still pending then go into the READING_ACK state. For any -// issues, go into the DISCONNECTING state. -void CrashGenerationServer::HandleWriteDoneState() { - assert(server_state_ == IPC_SERVER_STATE_WRITE_DONE); - - DWORD bytes_count = 0; - bool success = ReadFile(pipe_, - &msg_, - sizeof(msg_), - &bytes_count, - &overlapped_) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (success) { - EnterStateImmediately(IPC_SERVER_STATE_READING_ACK); - } else if (error_code == ERROR_IO_PENDING) { - EnterStateWhenSignaled(IPC_SERVER_STATE_READING_ACK); - } else { - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); - } -} - -// When the server thread serving the clients is in the READING_ACK state, -// try to get result of async read. Go into the DISCONNECTING state. -void CrashGenerationServer::HandleReadingAckState() { - assert(server_state_ == IPC_SERVER_STATE_READING_ACK); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (success) { - // The connection handshake with the client is now complete; perform - // the callback. - if (connect_callback_) { - connect_callback_(connect_context_, client_info_); - } - } else { - // We should never get an I/O incomplete since we should not execute this - // unless the Read has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - } - - EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING); -} - -// When the server thread serving the client is in the DISCONNECTING state, -// disconnect from the pipe and reset the event. If anything fails, go into -// the ERROR state. If it goes well, go into the INITIAL state and set the -// event to start all over again. -void CrashGenerationServer::HandleDisconnectingState() { - assert(server_state_ == IPC_SERVER_STATE_DISCONNECTING); - - // Done serving the client. - client_info_ = NULL; - - overlapped_.Internal = NULL; - overlapped_.InternalHigh = NULL; - overlapped_.Offset = 0; - overlapped_.OffsetHigh = 0; - overlapped_.Pointer = NULL; - - if (!ResetEvent(overlapped_.hEvent)) { - EnterErrorState(); - return; - } - - if (!DisconnectNamedPipe(pipe_)) { - EnterErrorState(); - return; - } - - // If the server is shutting down do not connect to the - // next client. - if (shutting_down_) { - return; - } - - EnterStateImmediately(IPC_SERVER_STATE_INITIAL); -} - -void CrashGenerationServer::EnterErrorState() { - SetEvent(overlapped_.hEvent); - server_state_ = IPC_SERVER_STATE_ERROR; -} - -void CrashGenerationServer::EnterStateWhenSignaled(IPCServerState state) { - server_state_ = state; -} - -void CrashGenerationServer::EnterStateImmediately(IPCServerState state) { - server_state_ = state; - - if (!SetEvent(overlapped_.hEvent)) { - server_state_ = IPC_SERVER_STATE_ERROR; - } -} - -bool CrashGenerationServer::PrepareReply(const ClientInfo& client_info, - ProtocolMessage* reply) const { - reply->tag = MESSAGE_TAG_REGISTRATION_RESPONSE; - reply->pid = GetCurrentProcessId(); - - if (CreateClientHandles(client_info, reply)) { - return true; - } - - if (reply->dump_request_handle) { - CloseHandle(reply->dump_request_handle); - } - - if (reply->dump_generated_handle) { - CloseHandle(reply->dump_generated_handle); - } - - if (reply->server_alive_handle) { - CloseHandle(reply->server_alive_handle); - } - - return false; -} - -bool CrashGenerationServer::CreateClientHandles(const ClientInfo& client_info, - ProtocolMessage* reply) const { - HANDLE current_process = GetCurrentProcess(); - if (!DuplicateHandle(current_process, - client_info.dump_requested_handle(), - client_info.process_handle(), - &reply->dump_request_handle, - kDumpRequestEventAccess, - FALSE, - 0)) { - return false; - } - - if (!DuplicateHandle(current_process, - client_info.dump_generated_handle(), - client_info.process_handle(), - &reply->dump_generated_handle, - kDumpGeneratedEventAccess, - FALSE, - 0)) { - return false; - } - - if (!DuplicateHandle(current_process, - server_alive_handle_, - client_info.process_handle(), - &reply->server_alive_handle, - kMutexAccess, - FALSE, - 0)) { - return false; - } - - return true; -} - -bool CrashGenerationServer::RespondToClient(ClientInfo* client_info) { - ProtocolMessage reply; - if (!PrepareReply(*client_info, &reply)) { - return false; - } - - DWORD bytes_count = 0; - bool success = WriteFile(pipe_, - &reply, - sizeof(reply), - &bytes_count, - &overlapped_) != FALSE; - DWORD error_code = success ? ERROR_SUCCESS : GetLastError(); - - if (!success && error_code != ERROR_IO_PENDING) { - return false; - } - - // Takes over ownership of client_info. We MUST return true if AddClient - // succeeds. - if (!AddClient(client_info)) { - return false; - } - - return true; -} - -// The server thread servicing the clients runs this method. The method -// implements the state machine described in ReadMe.txt along with the -// helper methods HandleXXXState. -void CrashGenerationServer::HandleConnectionRequest() { - // If we are shutting doen then get into ERROR state, reset the event so more - // workers don't run and return immediately. - if (shutting_down_) { - server_state_ = IPC_SERVER_STATE_ERROR; - ResetEvent(overlapped_.hEvent); - return; - } - - switch (server_state_) { - case IPC_SERVER_STATE_ERROR: - HandleErrorState(); - break; - - case IPC_SERVER_STATE_INITIAL: - HandleInitialState(); - break; - - case IPC_SERVER_STATE_CONNECTING: - HandleConnectingState(); - break; - - case IPC_SERVER_STATE_CONNECTED: - HandleConnectedState(); - break; - - case IPC_SERVER_STATE_READING: - HandleReadingState(); - break; - - case IPC_SERVER_STATE_READ_DONE: - HandleReadDoneState(); - break; - - case IPC_SERVER_STATE_WRITING: - HandleWritingState(); - break; - - case IPC_SERVER_STATE_WRITE_DONE: - HandleWriteDoneState(); - break; - - case IPC_SERVER_STATE_READING_ACK: - HandleReadingAckState(); - break; - - case IPC_SERVER_STATE_DISCONNECTING: - HandleDisconnectingState(); - break; - - default: - assert(false); - // This indicates that we added one more state without - // adding handling code. - server_state_ = IPC_SERVER_STATE_ERROR; - break; - } -} - -bool CrashGenerationServer::AddClient(ClientInfo* client_info) { - HANDLE request_wait_handle = NULL; - if (!RegisterWaitForSingleObject(&request_wait_handle, - client_info->dump_requested_handle(), - OnDumpRequest, - client_info, - INFINITE, - kDumpRequestThreadFlags)) { - return false; - } - - client_info->set_dump_request_wait_handle(request_wait_handle); - - // OnClientEnd will be called when the client process terminates. - HANDLE process_wait_handle = NULL; - if (!RegisterWaitForSingleObject(&process_wait_handle, - client_info->process_handle(), - OnClientEnd, - client_info, - INFINITE, - WT_EXECUTEONLYONCE)) { - return false; - } - - client_info->set_process_exit_wait_handle(process_wait_handle); - - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - clients_.push_back(client_info); - } - - return true; -} - -// static -void CALLBACK CrashGenerationServer::OnPipeConnected(void* context, BOOLEAN) { - assert(context); - - CrashGenerationServer* obj = - reinterpret_cast(context); - obj->HandleConnectionRequest(); -} - -// static -void CALLBACK CrashGenerationServer::OnDumpRequest(void* context, BOOLEAN) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - client_info->PopulateCustomInfo(); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - crash_server->HandleDumpRequest(*client_info); - - ResetEvent(client_info->dump_requested_handle()); -} - -// static -void CALLBACK CrashGenerationServer::OnClientEnd(void* context, BOOLEAN) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - - InterlockedIncrement(&crash_server->cleanup_item_count_); - - if (!QueueUserWorkItem(CleanupClient, context, WT_EXECUTEDEFAULT)) { - InterlockedDecrement(&crash_server->cleanup_item_count_); - } -} - -// static -DWORD WINAPI CrashGenerationServer::CleanupClient(void* context) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - - if (crash_server->exit_callback_) { - crash_server->exit_callback_(crash_server->exit_context_, client_info); - } - - crash_server->DoCleanup(client_info); - - InterlockedDecrement(&crash_server->cleanup_item_count_); - return 0; -} - -void CrashGenerationServer::DoCleanup(ClientInfo* client_info) { - assert(client_info); - - // Start a new scope to release lock automatically. - { - AutoCriticalSection lock(&clients_sync_); - clients_.remove(client_info); - } - - delete client_info; -} - -void CrashGenerationServer::HandleDumpRequest(const ClientInfo& client_info) { - // Generate the dump only if it's explicitly requested by the - // server application; otherwise the server might want to generate - // dump in the callback. - std::wstring dump_path; - if (generate_dumps_) { - if (!GenerateDump(client_info, &dump_path)) { - return; - } - } - - if (dump_callback_) { - std::wstring* ptr_dump_path = (dump_path == L"") ? NULL : &dump_path; - dump_callback_(dump_context_, &client_info, ptr_dump_path); - } - - SetEvent(client_info.dump_generated_handle()); -} - -bool CrashGenerationServer::GenerateDump(const ClientInfo& client, - std::wstring* dump_path) { - assert(client.pid() != 0); - assert(client.process_handle()); - - // We have to get the address of EXCEPTION_INFORMATION from - // the client process address space. - EXCEPTION_POINTERS* client_ex_info = NULL; - if (!client.GetClientExceptionInfo(&client_ex_info)) { - return false; - } - - DWORD client_thread_id = 0; - if (!client.GetClientThreadId(&client_thread_id)) { - return false; - } - - return dump_generator_->WriteMinidump(client.process_handle(), - client.pid(), - client_thread_id, - GetCurrentThreadId(), - client_ex_info, - client.assert_info(), - client.dump_type(), - true, - dump_path); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.h deleted file mode 100644 index 31a353bf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/minidump_generator.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { -class ClientInfo; - -// Abstraction for server side implementation of out-of-process crash -// generation protocol for Windows platform only. It generates Windows -// minidump files for client processes that request dump generation. When -// the server is requested to start listening for clients (by calling the -// Start method), it creates a named pipe and waits for the clients to -// register. In response, it hands them event handles that the client can -// signal to request dump generation. When the clients request dump -// generation in this way, the server generates Windows minidump files. -class CrashGenerationServer { - public: - typedef void (*OnClientConnectedCallback)(void* context, - const ClientInfo* client_info); - - typedef void (*OnClientDumpRequestCallback)(void* context, - const ClientInfo* client_info, - const std::wstring* file_path); - - typedef void (*OnClientExitedCallback)(void* context, - const ClientInfo* client_info); - - // Creates an instance with the given parameters. - // - // Parameter pipe_name: Name of the Windows named pipe - // Parameter pipe_sec_attrs Security attributes to set on the pipe. Pass - // NULL to use default security on the pipe. By default, the pipe created - // allows Local System, Administrators and the Creator full control and - // the Everyone group read access on the pipe. - // Parameter connect_callback: Callback for a new client connection. - // Parameter connect_context: Context for client connection callback. - // Parameter crash_callback: Callback for a client crash dump request. - // Parameter crash_context: Context for client crash dump request callback. - // Parameter exit_callback: Callback for client process exit. - // Parameter exit_context: Context for client exit callback. - // Parameter generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly in the - // crash dump request callback. In that case, false can be passed for this - // parameter. - // Parameter dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const std::wstring& pipe_name, - SECURITY_ATTRIBUTES* pipe_sec_attrs, - OnClientConnectedCallback connect_callback, - void* connect_context, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitedCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::wstring* dump_path); - - ~CrashGenerationServer(); - - // Performs initialization steps needed to start listening to clients. Upon - // successful return clients may connect to this server's pipe. - // - // Returns true if initialization is successful; false otherwise. - bool Start(); - - private: - // Various states the client can be in during the handshake with - // the server. - enum IPCServerState { - // Server starts in this state. - IPC_SERVER_STATE_UNINITIALIZED, - - // Server is in error state and it cannot serve any clients. - IPC_SERVER_STATE_ERROR, - - // Server starts in this state. - IPC_SERVER_STATE_INITIAL, - - // Server has issued an async connect to the pipe and it is waiting - // for the connection to be established. - IPC_SERVER_STATE_CONNECTING, - - // Server is connected successfully. - IPC_SERVER_STATE_CONNECTED, - - // Server has issued an async read from the pipe and it is waiting for - // the read to finish. - IPC_SERVER_STATE_READING, - - // Server is done reading from the pipe. - IPC_SERVER_STATE_READ_DONE, - - // Server has issued an async write to the pipe and it is waiting for - // the write to finish. - IPC_SERVER_STATE_WRITING, - - // Server is done writing to the pipe. - IPC_SERVER_STATE_WRITE_DONE, - - // Server has issued an async read from the pipe for an ack and it - // is waiting for the read to finish. - IPC_SERVER_STATE_READING_ACK, - - // Server is done writing to the pipe and it is now ready to disconnect - // and reconnect. - IPC_SERVER_STATE_DISCONNECTING - }; - - // - // Helper methods to handle various server IPC states. - // - void HandleErrorState(); - void HandleInitialState(); - void HandleConnectingState(); - void HandleConnectedState(); - void HandleReadingState(); - void HandleReadDoneState(); - void HandleWritingState(); - void HandleWriteDoneState(); - void HandleReadingAckState(); - void HandleDisconnectingState(); - - // Prepares reply for a client from the given parameters. - bool PrepareReply(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Duplicates various handles in the ClientInfo object for the client - // process and stores them in the given ProtocolMessage instance. If - // creating any handle fails, ProtocolMessage will contain the handles - // already created successfully, which should be closed by the caller. - bool CreateClientHandles(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Response to the given client. Return true if all steps of - // responding to the client succeed, false otherwise. - bool RespondToClient(ClientInfo* client_info); - - // Handles a connection request from the client. - void HandleConnectionRequest(); - - // Handles a dump request from the client. - void HandleDumpRequest(const ClientInfo& client_info); - - // Callback for pipe connected event. - static void CALLBACK OnPipeConnected(void* context, BOOLEAN timer_or_wait); - - // Callback for a dump request. - static void CALLBACK OnDumpRequest(void* context, BOOLEAN timer_or_wait); - - // Callback for client process exit event. - static void CALLBACK OnClientEnd(void* context, BOOLEAN timer_or_wait); - - // Releases resources for a client. - static DWORD WINAPI CleanupClient(void* context); - - // Cleans up for the given client. - void DoCleanup(ClientInfo* client_info); - - // Adds the given client to the list of registered clients. - bool AddClient(ClientInfo* client_info); - - // Generates dump for the given client. - bool GenerateDump(const ClientInfo& client, std::wstring* dump_path); - - // Puts the server in a permanent error state and sets a signal such that - // the state will be immediately entered after the current state transition - // is complete. - void EnterErrorState(); - - // Puts the server in the specified state and sets a signal such that the - // state is immediately entered after the current state transition is - // complete. - void EnterStateImmediately(IPCServerState state); - - // Puts the server in the specified state. No signal will be set, so the state - // transition will only occur when signaled manually or by completion of an - // asynchronous IO operation. - void EnterStateWhenSignaled(IPCServerState state); - - // Sync object for thread-safe access to the shared list of clients. - CRITICAL_SECTION clients_sync_; - - // List of clients. - std::list clients_; - - // Pipe name. - std::wstring pipe_name_; - - // Pipe security attributes - SECURITY_ATTRIBUTES* pipe_sec_attrs_; - - // Handle to the pipe used for handshake with clients. - HANDLE pipe_; - - // Pipe wait handle. - HANDLE pipe_wait_handle_; - - // Handle to server-alive mutex. - HANDLE server_alive_handle_; - - // Callback for a successful client connection. - OnClientConnectedCallback connect_callback_; - - // Context for client connected callback. - void* connect_context_; - - // Callback for a client dump request. - OnClientDumpRequestCallback dump_callback_; - - // Context for client dump request callback. - void* dump_context_; - - // Callback for client process exit. - OnClientExitedCallback exit_callback_; - - // Context for client process exit callback. - void* exit_context_; - - // Whether to generate dumps. - bool generate_dumps_; - - // Instance of a mini dump generator. - scoped_ptr dump_generator_; - - // State of the server in performing the IPC with the client. - // Note that since we restrict the pipe to one instance, we - // only need to keep one state of the server. Otherwise, server - // would have one state per client it is talking to. - volatile IPCServerState server_state_; - - // Whether the server is shutting down. - volatile bool shutting_down_; - - // Overlapped instance for async I/O on the pipe. - OVERLAPPED overlapped_; - - // Message object used in IPC with the client. - ProtocolMessage msg_; - - // Client Info for the client that's connecting to the server. - ClientInfo* client_info_; - - // Count of clean-up work items that are currently running or are - // already queued to run. - volatile LONG cleanup_item_count_; - - // Disable copy ctor and operator=. - CrashGenerationServer(const CrashGenerationServer& crash_server); - CrashGenerationServer& operator=(const CrashGenerationServer& crash_server); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.cc deleted file mode 100644 index 37bd55e4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.cc +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/minidump_generator.h" -#include -#include "client/windows/common/auto_critical_section.h" -#include "common/windows/guid_string.h" - -using std::wstring; - -namespace google_breakpad { - -MinidumpGenerator::MinidumpGenerator(const wstring& dump_path) - : dbghelp_module_(NULL), - rpcrt4_module_(NULL), - dump_path_(dump_path), - write_dump_(NULL), - create_uuid_(NULL) { - InitializeCriticalSection(&module_load_sync_); - InitializeCriticalSection(&get_proc_address_sync_); -} - -MinidumpGenerator::~MinidumpGenerator() { - if (dbghelp_module_) { - FreeLibrary(dbghelp_module_); - } - - if (rpcrt4_module_) { - FreeLibrary(rpcrt4_module_); - } - - DeleteCriticalSection(&get_proc_address_sync_); - DeleteCriticalSection(&module_load_sync_); -} - -bool MinidumpGenerator::WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - wstring* dump_path) { - // Just call the full WriteMinidump with NULL as the full_dump_path. - return this->WriteMinidump(process_handle, process_id, thread_id, - requesting_thread_id, exception_pointers, - assert_info, dump_type, is_client_pointers, - dump_path, NULL); -} - -bool MinidumpGenerator::WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - wstring* dump_path, - wstring* full_dump_path) { - MiniDumpWriteDumpType write_dump = GetWriteDump(); - if (!write_dump) { - return false; - } - - wstring dump_file_path; - if (!GenerateDumpFilePath(&dump_file_path)) { - return false; - } - - // If the client requests a full memory dump, we will write a normal mini - // dump and a full memory dump. Both dump files use the same uuid as file - // name prefix. - bool full_memory_dump = (dump_type & MiniDumpWithFullMemory) != 0; - wstring full_dump_file_path; - if (full_memory_dump) { - full_dump_file_path.assign(dump_file_path); - full_dump_file_path.resize(full_dump_file_path.size() - 4); // strip .dmp - full_dump_file_path.append(TEXT("-full.dmp")); - } - - HANDLE dump_file = CreateFile(dump_file_path.c_str(), - GENERIC_WRITE, - 0, - NULL, - CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (dump_file == INVALID_HANDLE_VALUE) { - return false; - } - - HANDLE full_dump_file = INVALID_HANDLE_VALUE; - if (full_memory_dump) { - full_dump_file = CreateFile(full_dump_file_path.c_str(), - GENERIC_WRITE, - 0, - NULL, - CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (full_dump_file == INVALID_HANDLE_VALUE) { - CloseHandle(dump_file); - return false; - } - } - - MINIDUMP_EXCEPTION_INFORMATION* dump_exception_pointers = NULL; - MINIDUMP_EXCEPTION_INFORMATION dump_exception_info; - - // Setup the exception information object only if it's a dump - // due to an exception. - if (exception_pointers) { - dump_exception_pointers = &dump_exception_info; - dump_exception_info.ThreadId = thread_id; - dump_exception_info.ExceptionPointers = exception_pointers; - dump_exception_info.ClientPointers = is_client_pointers; - } - - // Add an MDRawBreakpadInfo stream to the minidump, to provide additional - // information about the exception handler to the Breakpad processor. - // The information will help the processor determine which threads are - // relevant. The Breakpad processor does not require this information but - // can function better with Breakpad-generated dumps when it is present. - // The native debugger is not harmed by the presence of this information. - MDRawBreakpadInfo breakpad_info = {0}; - if (!is_client_pointers) { - // Set the dump thread id and requesting thread id only in case of - // in-process dump generation. - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = thread_id; - breakpad_info.requesting_thread_id = requesting_thread_id; - } - - // Leave room in user_stream_array for a possible assertion info stream. - MINIDUMP_USER_STREAM user_stream_array[2]; - user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM; - user_stream_array[0].BufferSize = sizeof(breakpad_info); - user_stream_array[0].Buffer = &breakpad_info; - - MINIDUMP_USER_STREAM_INFORMATION user_streams; - user_streams.UserStreamCount = 1; - user_streams.UserStreamArray = user_stream_array; - - MDRawAssertionInfo* actual_assert_info = assert_info; - MDRawAssertionInfo client_assert_info = {0}; - - if (assert_info) { - // If the assertion info object lives in the client process, - // read the memory of the client process. - if (is_client_pointers) { - SIZE_T bytes_read = 0; - if (!ReadProcessMemory(process_handle, - assert_info, - &client_assert_info, - sizeof(client_assert_info), - &bytes_read)) { - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - return false; - } - - if (bytes_read != sizeof(client_assert_info)) { - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - return false; - } - - actual_assert_info = &client_assert_info; - } - - user_stream_array[1].Type = MD_ASSERTION_INFO_STREAM; - user_stream_array[1].BufferSize = sizeof(MDRawAssertionInfo); - user_stream_array[1].Buffer = actual_assert_info; - ++user_streams.UserStreamCount; - } - - bool result_minidump = write_dump( - process_handle, - process_id, - dump_file, - static_cast((dump_type & (~MiniDumpWithFullMemory)) - | MiniDumpNormal), - exception_pointers ? &dump_exception_info : NULL, - &user_streams, - NULL) != FALSE; - - bool result_full_memory = true; - if (full_memory_dump) { - result_full_memory = write_dump( - process_handle, - process_id, - full_dump_file, - static_cast(dump_type & (~MiniDumpNormal)), - exception_pointers ? &dump_exception_info : NULL, - &user_streams, - NULL) != FALSE; - } - - bool result = result_minidump && result_full_memory; - - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - - // Store the path of the dump file in the out parameter if dump generation - // succeeded. - if (result && dump_path) { - *dump_path = dump_file_path; - } - if (result && full_memory_dump && full_dump_path) { - *full_dump_path = full_dump_file_path; - } - - return result; -} - -HMODULE MinidumpGenerator::GetDbghelpModule() { - AutoCriticalSection lock(&module_load_sync_); - if (!dbghelp_module_) { - dbghelp_module_ = LoadLibrary(TEXT("dbghelp.dll")); - } - - return dbghelp_module_; -} - -MinidumpGenerator::MiniDumpWriteDumpType MinidumpGenerator::GetWriteDump() { - AutoCriticalSection lock(&get_proc_address_sync_); - if (!write_dump_) { - HMODULE module = GetDbghelpModule(); - if (module) { - FARPROC proc = GetProcAddress(module, "MiniDumpWriteDump"); - write_dump_ = reinterpret_cast(proc); - } - } - - return write_dump_; -} - -HMODULE MinidumpGenerator::GetRpcrt4Module() { - AutoCriticalSection lock(&module_load_sync_); - if (!rpcrt4_module_) { - rpcrt4_module_ = LoadLibrary(TEXT("rpcrt4.dll")); - } - - return rpcrt4_module_; -} - -MinidumpGenerator::UuidCreateType MinidumpGenerator::GetCreateUuid() { - AutoCriticalSection lock(&module_load_sync_); - if (!create_uuid_) { - HMODULE module = GetRpcrt4Module(); - if (module) { - FARPROC proc = GetProcAddress(module, "UuidCreate"); - create_uuid_ = reinterpret_cast(proc); - } - } - - return create_uuid_; -} - -bool MinidumpGenerator::GenerateDumpFilePath(wstring* file_path) { - UUID id = {0}; - - UuidCreateType create_uuid = GetCreateUuid(); - if (!create_uuid) { - return false; - } - - create_uuid(&id); - wstring id_str = GUIDString::GUIDToWString(&id); - - *file_path = dump_path_ + TEXT("\\") + id_str + TEXT(".dmp"); - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.h deleted file mode 100644 index 5f9e4b54..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/crash_generation/minidump_generator.h +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_ -#define CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_ - -#include -#include -#include -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Abstraction for various objects and operations needed to generate -// minidump on Windows. This abstraction is useful to hide all the gory -// details for minidump generation and provide a clean interface to -// the clients to generate minidumps. -class MinidumpGenerator { - public: - // Creates an instance with the given dump path. - explicit MinidumpGenerator(const std::wstring& dump_path); - - ~MinidumpGenerator(); - - // Writes the minidump with the given parameters. Stores the - // dump file path in the dump_path parameter if dump generation - // succeeds. - bool WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - std::wstring* dump_path); - - // Writes the minidump with the given parameters. Stores the dump file - // path in the dump_path (and full_dump_path) parameter if dump - // generation succeeds. full_dump_path and dump_path can be NULL. - bool WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - std::wstring* dump_path, - std::wstring* full_dump_path); - - private: - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI* MiniDumpWriteDumpType)( - HANDLE hProcess, - DWORD ProcessId, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY* UuidCreateType)(UUID* Uuid); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetDbghelpModule(); - - // Loads the appropriate DLL and gets a pointer to the MiniDumpWriteDump - // function lazily and in a thread-safe manner. - MiniDumpWriteDumpType GetWriteDump(); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetRpcrt4Module(); - - // Loads the appropriate DLL and gets a pointer to the UuidCreate - // function lazily and in a thread-safe manner. - UuidCreateType GetCreateUuid(); - - // Returns the path for the file to write dump to. - bool GenerateDumpFilePath(std::wstring* file_path); - - // Handle to dynamically loaded DbgHelp.dll. - HMODULE dbghelp_module_; - - // Pointer to the MiniDumpWriteDump function. - MiniDumpWriteDumpType write_dump_; - - // Handle to dynamically loaded rpcrt4.dll. - HMODULE rpcrt4_module_; - - // Pointer to the UuidCreate function. - UuidCreateType create_uuid_; - - // Folder path to store dump files. - std::wstring dump_path_; - - // Critical section to sychronize action of loading modules dynamically. - CRITICAL_SECTION module_load_sync_; - - // Critical section to synchronize action of dynamically getting function - // addresses from modules. - CRITICAL_SECTION get_proc_address_sync_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.cc deleted file mode 100644 index ec5397dc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.cc +++ /dev/null @@ -1,898 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/handler/exception_handler.h" -#include "common/windows/guid_string.h" - -typedef VOID (WINAPI *RtlCaptureContextPtr) (PCONTEXT pContextRecord); - -namespace google_breakpad { - -static const int kWaitForHandlerThreadMs = 60000; -static const int kExceptionHandlerThreadInitialStackSize = 64 * 1024; - -// This is passed as the context to the MinidumpWriteDump callback. -typedef struct { - ULONG64 memory_base; - ULONG memory_size; - bool finished; -} MinidumpCallbackContext; - -vector* ExceptionHandler::handler_stack_ = NULL; -LONG ExceptionHandler::handler_stack_index_ = 0; -CRITICAL_SECTION ExceptionHandler::handler_stack_critical_section_; -volatile LONG ExceptionHandler::instance_count_ = 0; - -ExceptionHandler::ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - dump_type, - pipe_name, - custom_info); -} - -ExceptionHandler::ExceptionHandler(const wstring &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - MiniDumpNormal, - NULL, - NULL); -} - -void ExceptionHandler::Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info) { - LONG instance_count = InterlockedIncrement(&instance_count_); - filter_ = filter; - callback_ = callback; - callback_context_ = callback_context; - dump_path_c_ = NULL; - next_minidump_id_c_ = NULL; - next_minidump_path_c_ = NULL; - dbghelp_module_ = NULL; - minidump_write_dump_ = NULL; - dump_type_ = dump_type; - rpcrt4_module_ = NULL; - uuid_create_ = NULL; - handler_types_ = handler_types; - previous_filter_ = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - previous_iph_ = NULL; -#endif // _MSC_VER >= 1400 - previous_pch_ = NULL; - handler_thread_ = NULL; - is_shutdown_ = false; - handler_start_semaphore_ = NULL; - handler_finish_semaphore_ = NULL; - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - handler_return_value_ = false; - handle_debug_exceptions_ = false; - - // Attempt to use out-of-process if user has specified pipe name. - if (pipe_name != NULL) { - scoped_ptr client( - new CrashGenerationClient(pipe_name, - dump_type_, - custom_info)); - - // If successful in registering with the monitoring process, - // there is no need to setup in-process crash generation. - if (client->Register()) { - crash_generation_client_.reset(client.release()); - } - } - - if (!IsOutOfProcess()) { - // Either client did not ask for out-of-process crash generation - // or registration with the server process failed. In either case, - // setup to do in-process crash generation. - - // Set synchronization primitives and the handler thread. Each - // ExceptionHandler object gets its own handler thread because that's the - // only way to reliably guarantee sufficient stack space in an exception, - // and it allows an easy way to get a snapshot of the requesting thread's - // context outside of an exception. - InitializeCriticalSection(&handler_critical_section_); - handler_start_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_start_semaphore_ != NULL); - - handler_finish_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_finish_semaphore_ != NULL); - - // Don't attempt to create the thread if we could not create the semaphores. - if (handler_finish_semaphore_ != NULL && handler_start_semaphore_ != NULL) { - DWORD thread_id; - handler_thread_ = CreateThread(NULL, // lpThreadAttributes - kExceptionHandlerThreadInitialStackSize, - ExceptionHandlerThreadMain, - this, // lpParameter - 0, // dwCreationFlags - &thread_id); - assert(handler_thread_ != NULL); - } - - dbghelp_module_ = LoadLibrary(L"dbghelp.dll"); - if (dbghelp_module_) { - minidump_write_dump_ = reinterpret_cast( - GetProcAddress(dbghelp_module_, "MiniDumpWriteDump")); - } - - // Load this library dynamically to not affect existing projects. Most - // projects don't link against this directly, it's usually dynamically - // loaded by dependent code. - rpcrt4_module_ = LoadLibrary(L"rpcrt4.dll"); - if (rpcrt4_module_) { - uuid_create_ = reinterpret_cast( - GetProcAddress(rpcrt4_module_, "UuidCreate")); - } - - // set_dump_path calls UpdateNextID. This sets up all of the path and id - // strings, and their equivalent c_str pointers. - set_dump_path(dump_path); - } - - // There is a race condition here. If the first instance has not yet - // initialized the critical section, the second (and later) instances may - // try to use uninitialized critical section object. The feature of multiple - // instances in one module is not used much, so leave it as is for now. - // One way to solve this in the current design (that is, keeping the static - // handler stack) is to use spin locks with volatile bools to synchronize - // the handler stack. This works only if the compiler guarantees to generate - // cache coherent code for volatile. - // TODO(munjal): Fix this in a better way by changing the design if possible. - - // Lazy initialization of the handler_stack_critical_section_ - if (instance_count == 1) { - InitializeCriticalSection(&handler_stack_critical_section_); - } - - if (handler_types != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - // The first time an ExceptionHandler that installs a handler is - // created, set up the handler stack. - if (!handler_stack_) { - handler_stack_ = new vector(); - } - handler_stack_->push_back(this); - - if (handler_types & HANDLER_EXCEPTION) - previous_filter_ = SetUnhandledExceptionFilter(HandleException); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types & HANDLER_INVALID_PARAMETER) - previous_iph_ = _set_invalid_parameter_handler(HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - - if (handler_types & HANDLER_PURECALL) - previous_pch_ = _set_purecall_handler(HandlePureVirtualCall); - - LeaveCriticalSection(&handler_stack_critical_section_); - } -} - -ExceptionHandler::~ExceptionHandler() { - if (dbghelp_module_) { - FreeLibrary(dbghelp_module_); - } - - if (rpcrt4_module_) { - FreeLibrary(rpcrt4_module_); - } - - if (handler_types_ != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - if (handler_types_ & HANDLER_EXCEPTION) - SetUnhandledExceptionFilter(previous_filter_); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types_ & HANDLER_INVALID_PARAMETER) - _set_invalid_parameter_handler(previous_iph_); -#endif // _MSC_VER >= 1400 - - if (handler_types_ & HANDLER_PURECALL) - _set_purecall_handler(previous_pch_); - - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - // TODO(mmentovai): use advapi32!ReportEvent to log the warning to the - // system's application event log. - fprintf(stderr, "warning: removing Breakpad handler out of order\n"); - vector::iterator iterator = handler_stack_->begin(); - while (iterator != handler_stack_->end()) { - if (*iterator == this) { - iterator = handler_stack_->erase(iterator); - } else { - ++iterator; - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - - LeaveCriticalSection(&handler_stack_critical_section_); - } - - // Some of the objects were only initialized if out of process - // registration was not done. - if (!IsOutOfProcess()) { -#ifdef BREAKPAD_NO_TERMINATE_THREAD - // Clean up the handler thread and synchronization primitives. The handler - // thread is either waiting on the semaphore to handle a crash or it is - // handling a crash. Coming out of the wait is fast but wait more in the - // eventuality a crash is handled. This compilation option results in a - // deadlock if the exception handler is destroyed while executing code - // inside DllMain. - is_shutdown_ = true; - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - WaitForSingleObject(handler_thread_, kWaitForHandlerThreadMs); -#else - TerminateThread(handler_thread_, 1); -#endif // BREAKPAD_NO_TERMINATE_THREAD - - CloseHandle(handler_thread_); - handler_thread_ = NULL; - DeleteCriticalSection(&handler_critical_section_); - CloseHandle(handler_start_semaphore_); - CloseHandle(handler_finish_semaphore_); - } - - // There is a race condition in the code below: if this instance is - // deleting the static critical section and a new instance of the class - // is created, then there is a possibility that the critical section be - // initialized while the same critical section is being deleted. Given the - // usage pattern for the code, this race condition is unlikely to hit, but it - // is a race condition nonetheless. - if (InterlockedDecrement(&instance_count_) == 0) { - DeleteCriticalSection(&handler_stack_critical_section_); - } -} - -// static -DWORD ExceptionHandler::ExceptionHandlerThreadMain(void* lpParameter) { - ExceptionHandler* self = reinterpret_cast(lpParameter); - assert(self); - assert(self->handler_start_semaphore_ != NULL); - assert(self->handler_finish_semaphore_ != NULL); - - while (true) { - if (WaitForSingleObject(self->handler_start_semaphore_, INFINITE) == - WAIT_OBJECT_0) { - // Perform the requested action. - if (self->is_shutdown_) { - // The instance of the exception handler is being destroyed. - break; - } else { - self->handler_return_value_ = - self->WriteMinidumpWithException(self->requesting_thread_id_, - self->exception_info_, - self->assertion_); - } - - // Allow the requesting thread to proceed. - ReleaseSemaphore(self->handler_finish_semaphore_, 1, NULL); - } - } - - // This statement is not reached when the thread is unconditionally - // terminated by the ExceptionHandler destructor. - return 0; -} - -// HandleException and HandleInvalidParameter must create an -// AutoExceptionHandler object to maintain static state and to determine which -// ExceptionHandler instance to use. The constructor locates the correct -// instance, and makes it available through get_handler(). The destructor -// restores the state in effect prior to allocating the AutoExceptionHandler. -class AutoExceptionHandler { - public: - AutoExceptionHandler() { - // Increment handler_stack_index_ so that if another Breakpad handler is - // registered using this same HandleException function, and it needs to be - // called while this handler is running (either because this handler - // declines to handle the exception, or an exception occurs during - // handling), HandleException will find the appropriate ExceptionHandler - // object in handler_stack_ to deliver the exception to. - // - // Because handler_stack_ is addressed in reverse (as |size - index|), - // preincrementing handler_stack_index_ avoids needing to subtract 1 from - // the argument to |at|. - // - // The index is maintained instead of popping elements off of the handler - // stack and pushing them at the end of this method. This avoids ruining - // the order of elements in the stack in the event that some other thread - // decides to manipulate the handler stack (such as creating a new - // ExceptionHandler object) while an exception is being handled. - EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - handler_ = ExceptionHandler::handler_stack_->at( - ExceptionHandler::handler_stack_->size() - - ++ExceptionHandler::handler_stack_index_); - - // In case another exception occurs while this handler is doing its thing, - // it should be delivered to the previous filter. - SetUnhandledExceptionFilter(handler_->previous_filter_); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(handler_->previous_iph_); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(handler_->previous_pch_); - } - - ~AutoExceptionHandler() { - // Put things back the way they were before entering this handler. - SetUnhandledExceptionFilter(ExceptionHandler::HandleException); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(ExceptionHandler::HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(ExceptionHandler::HandlePureVirtualCall); - - --ExceptionHandler::handler_stack_index_; - LeaveCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - } - - ExceptionHandler* get_handler() const { return handler_; } - - private: - ExceptionHandler* handler_; -}; - -// static -LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) { - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions. This - // logic will short-circuit before calling WriteMinidumpOnHandlerThread, - // allowing something else to handle the breakpoint without incurring the - // overhead transitioning to and from the handler thread. This behavior - // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions. - DWORD code = exinfo->ExceptionRecord->ExceptionCode; - LONG action; - bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || - (code == EXCEPTION_SINGLE_STEP); - - bool success = false; - - if (!is_debug_exception || - current_handler->get_handle_debug_exceptions()) { - // If out-of-proc crash handler client is available, we have to use that - // to generate dump and we cannot fall back on in-proc dump generation - // because we never prepared for an in-proc dump generation - - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - exinfo, - NULL); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL); - } - } - - // The handler fully handled the exception. Returning - // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually - // results in the application being terminated. - // - // Note: If the application was launched from within the Cygwin - // environment, returning EXCEPTION_EXECUTE_HANDLER seems to cause the - // application to be restarted. - if (success) { - action = EXCEPTION_EXECUTE_HANDLER; - } else { - // There was an exception, it was a breakpoint or something else ignored - // above, or it was passed to the handler, which decided not to handle it. - // This could be because the filter callback didn't want it, because - // minidump writing failed for some reason, or because the post-minidump - // callback function indicated failure. Give the previous handler a - // chance to do something with the exception. If there is no previous - // handler, return EXCEPTION_CONTINUE_SEARCH, which will allow a debugger - // or native "crashed" dialog to handle the exception. - if (current_handler->previous_filter_) { - action = current_handler->previous_filter_(exinfo); - } else { - action = EXCEPTION_CONTINUE_SEARCH; - } - } - - return action; -} - -#if _MSC_VER >= 1400 // MSVC 2005/8 -// static -void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved) { - // This is an invalid parameter, not an exception. It's safe to play with - // sprintf here. - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - _snwprintf_s(reinterpret_cast(assertion.expression), - sizeof(assertion.expression) / sizeof(assertion.expression[0]), - _TRUNCATE, L"%s", expression); - _snwprintf_s(reinterpret_cast(assertion.function), - sizeof(assertion.function) / sizeof(assertion.function[0]), - _TRUNCATE, L"%s", function); - _snwprintf_s(reinterpret_cast(assertion.file), - sizeof(assertion.file) / sizeof(assertion.file[0]), - _TRUNCATE, L"%s", file); - assertion.line = line; - assertion.type = MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER; - - // Make up an exception record for the current thread and CPU context - // to make it possible for the crash processor to classify these - // as do regular crashes, and to make it humane for developers to - // analyze them. - EXCEPTION_RECORD exception_record = {}; - CONTEXT exception_context = {}; - EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; - - EXCEPTION_POINTERS* exinfo = NULL; - - RtlCaptureContextPtr fnRtlCaptureContext = (RtlCaptureContextPtr) - GetProcAddress(GetModuleHandleW(L"kernel32"), "RtlCaptureContext"); - if (fnRtlCaptureContext) { - fnRtlCaptureContext(&exception_context); - - exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; - - // We store pointers to the the expression and function strings, - // and the line as exception parameters to make them easy to - // access by the developer on the far side. - exception_record.NumberParameters = 3; - exception_record.ExceptionInformation[0] = - reinterpret_cast(&assertion.expression); - exception_record.ExceptionInformation[1] = - reinterpret_cast(&assertion.file); - exception_record.ExceptionInformation[2] = assertion.line; - - exinfo = &exception_ptrs; - } - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - exinfo, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(exinfo, - &assertion); - } - - if (!success) { - if (current_handler->previous_iph_) { - // The handler didn't fully handle the exception. Give it to the - // previous invalid parameter handler. - current_handler->previous_iph_(expression, - function, - file, - line, - reserved); - } else { - // If there's no previous handler, pass the exception back in to the - // invalid parameter handler's core. That's the routine that called this - // function, but now, since this function is no longer registered (and in - // fact, no function at all is registered), this will result in the - // default code path being taken: _CRT_DEBUGGER_HOOK and _invoke_watson. - // Use _invalid_parameter where it exists (in _DEBUG builds) as it passes - // more information through. In non-debug builds, it is not available, - // so fall back to using _invalid_parameter_noinfo. See invarg.c in the - // CRT source. -#ifdef _DEBUG - _invalid_parameter(expression, function, file, line, reserved); -#else // _DEBUG - _invalid_parameter_noinfo(); -#endif // _DEBUG - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} -#endif // _MSC_VER >= 1400 - -// static -void ExceptionHandler::HandlePureVirtualCall() { - // This is an pure virtual function call, not an exception. It's safe to - // play with sprintf here. - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - assertion.type = MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL; - - // Make up an exception record for the current thread and CPU context - // to make it possible for the crash processor to classify these - // as do regular crashes, and to make it humane for developers to - // analyze them. - EXCEPTION_RECORD exception_record = {}; - CONTEXT exception_context = {}; - EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; - - EXCEPTION_POINTERS* exinfo = NULL; - - RtlCaptureContextPtr fnRtlCaptureContext = (RtlCaptureContextPtr) - GetProcAddress(GetModuleHandleW(L"kernel32"), "RtlCaptureContext"); - if (fnRtlCaptureContext) { - fnRtlCaptureContext(&exception_context); - - exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; - - // We store pointers to the the expression and function strings, - // and the line as exception parameters to make them easy to - // access by the developer on the far side. - exception_record.NumberParameters = 3; - exception_record.ExceptionInformation[0] = - reinterpret_cast(&assertion.expression); - exception_record.ExceptionInformation[1] = - reinterpret_cast(&assertion.file); - exception_record.ExceptionInformation[2] = assertion.line; - - exinfo = &exception_ptrs; - } - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - exinfo, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(exinfo, - &assertion); - } - - if (!success) { - if (current_handler->previous_pch_) { - // The handler didn't fully handle the exception. Give it to the - // previous purecall handler. - current_handler->previous_pch_(); - } else { - // If there's no previous handler, return and let _purecall handle it. - // This will just put up an assertion dialog. - return; - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} - -bool ExceptionHandler::WriteMinidumpOnHandlerThread( - EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion) { - EnterCriticalSection(&handler_critical_section_); - - // There isn't much we can do if the handler thread - // was not successfully created. - if (handler_thread_ == NULL) { - LeaveCriticalSection(&handler_critical_section_); - return false; - } - - // The handler thread should only be created when the semaphores are valid. - assert(handler_start_semaphore_ != NULL); - assert(handler_finish_semaphore_ != NULL); - - // Set up data to be passed in to the handler thread. - requesting_thread_id_ = GetCurrentThreadId(); - exception_info_ = exinfo; - assertion_ = assertion; - - // This causes the handler thread to call WriteMinidumpWithException. - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - - // Wait until WriteMinidumpWithException is done and collect its return value. - WaitForSingleObject(handler_finish_semaphore_, INFINITE); - bool status = handler_return_value_; - - // Clean up. - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - - LeaveCriticalSection(&handler_critical_section_); - - return status; -} - -bool ExceptionHandler::WriteMinidump() { - return WriteMinidumpForException(NULL); -} - -bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) { - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (IsOutOfProcess()) { - return WriteMinidumpWithException(GetCurrentThreadId(), - exinfo, - NULL); - } - - bool success = WriteMinidumpOnHandlerThread(exinfo, NULL); - UpdateNextID(); - return success; -} - -// static -bool ExceptionHandler::WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, - void* callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); - return handler.WriteMinidump(); -} - -bool ExceptionHandler::WriteMinidumpWithException( - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion) { - // Give user code a chance to approve or prevent writing a minidump. If the - // filter returns false, don't handle the exception at all. If this method - // was called as a result of an exception, returning false will cause - // HandleException to call any previous handler or return - // EXCEPTION_CONTINUE_SEARCH on the exception thread, allowing it to appear - // as though this handler were not present at all. - if (filter_ && !filter_(callback_context_, exinfo, assertion)) { - return false; - } - - bool success = false; - if (IsOutOfProcess()) { - success = crash_generation_client_->RequestDump(exinfo, assertion); - } else { - if (minidump_write_dump_) { - HANDLE dump_file = CreateFile(next_minidump_path_c_, - GENERIC_WRITE, - 0, // no sharing - NULL, - CREATE_NEW, // fail if exists - FILE_ATTRIBUTE_NORMAL, - NULL); - if (dump_file != INVALID_HANDLE_VALUE) { - MINIDUMP_EXCEPTION_INFORMATION except_info; - except_info.ThreadId = requesting_thread_id; - except_info.ExceptionPointers = exinfo; - except_info.ClientPointers = FALSE; - - // Add an MDRawBreakpadInfo stream to the minidump, to provide - // additional information about the exception handler to the Breakpad - // processor. The information will help the processor determine which - // threads are relevant. The Breakpad processor does not require this - // information but can function better with Breakpad-generated dumps - // when it is present. The native debugger is not harmed by the - // presence of this information. - MDRawBreakpadInfo breakpad_info; - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = GetCurrentThreadId(); - breakpad_info.requesting_thread_id = requesting_thread_id; - - // Leave room in user_stream_array for a possible assertion info stream. - MINIDUMP_USER_STREAM user_stream_array[2]; - user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM; - user_stream_array[0].BufferSize = sizeof(breakpad_info); - user_stream_array[0].Buffer = &breakpad_info; - - MINIDUMP_USER_STREAM_INFORMATION user_streams; - user_streams.UserStreamCount = 1; - user_streams.UserStreamArray = user_stream_array; - - if (assertion) { - user_stream_array[1].Type = MD_ASSERTION_INFO_STREAM; - user_stream_array[1].BufferSize = sizeof(MDRawAssertionInfo); - user_stream_array[1].Buffer = assertion; - ++user_streams.UserStreamCount; - } - - MINIDUMP_CALLBACK_INFORMATION callback; - MinidumpCallbackContext context; - MINIDUMP_CALLBACK_INFORMATION* callback_pointer = NULL; - // Older versions of DbgHelp.dll don't correctly put the memory around - // the faulting instruction pointer into the minidump. This - // callback will ensure that it gets included. - if (exinfo) { - // Find a memory region of 256 bytes centered on the - // faulting instruction pointer. - const ULONG64 instruction_pointer = -#if defined(_M_IX86) - exinfo->ContextRecord->Eip; -#elif defined(_M_AMD64) - exinfo->ContextRecord->Rip; -#else -#error Unsupported platform -#endif - - MEMORY_BASIC_INFORMATION info; - if (VirtualQuery(reinterpret_cast(instruction_pointer), - &info, - sizeof(MEMORY_BASIC_INFORMATION)) != 0 && - info.State == MEM_COMMIT) { - // Attempt to get 128 bytes before and after the instruction - // pointer, but settle for whatever's available up to the - // boundaries of the memory region. - const ULONG64 kIPMemorySize = 256; - context.memory_base = - (std::max)(reinterpret_cast(info.BaseAddress), - instruction_pointer - (kIPMemorySize / 2)); - ULONG64 end_of_range = - (std::min)(instruction_pointer + (kIPMemorySize / 2), - reinterpret_cast(info.BaseAddress) - + info.RegionSize); - context.memory_size = - static_cast(end_of_range - context.memory_base); - - context.finished = false; - callback.CallbackRoutine = MinidumpWriteDumpCallback; - callback.CallbackParam = reinterpret_cast(&context); - callback_pointer = &callback; - } - } - - // The explicit comparison to TRUE avoids a warning (C4800). - success = (minidump_write_dump_(GetCurrentProcess(), - GetCurrentProcessId(), - dump_file, - dump_type_, - exinfo ? &except_info : NULL, - &user_streams, - callback_pointer) == TRUE); - - CloseHandle(dump_file); - } - } - } - - if (callback_) { - // TODO(munjal): In case of out-of-process dump generation, both - // dump_path_c_ and next_minidump_id_ will be NULL. For out-of-process - // scenario, the server process ends up creating the dump path and dump - // id so they are not known to the client. - success = callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - exinfo, assertion, success); - } - - return success; -} - -// static -BOOL CALLBACK ExceptionHandler::MinidumpWriteDumpCallback( - PVOID context, - const PMINIDUMP_CALLBACK_INPUT callback_input, - PMINIDUMP_CALLBACK_OUTPUT callback_output) { - switch (callback_input->CallbackType) { - case MemoryCallback: { - MinidumpCallbackContext* callback_context = - reinterpret_cast(context); - if (callback_context->finished) - return FALSE; - - // Include the specified memory region. - callback_output->MemoryBase = callback_context->memory_base; - callback_output->MemorySize = callback_context->memory_size; - callback_context->finished = true; - return TRUE; - } - - // Include all modules. - case IncludeModuleCallback: - case ModuleCallback: - return TRUE; - - // Include all threads. - case IncludeThreadCallback: - case ThreadCallback: - return TRUE; - - // Stop receiving cancel callbacks. - case CancelCallback: - callback_output->CheckCancel = FALSE; - callback_output->Cancel = FALSE; - return TRUE; - } - // Ignore other callback types. - return FALSE; -} - -void ExceptionHandler::UpdateNextID() { - assert(uuid_create_); - UUID id = {0}; - if (uuid_create_) { - uuid_create_(&id); - } - next_minidump_id_ = GUIDString::GUIDToWString(&id); - next_minidump_id_c_ = next_minidump_id_.c_str(); - - wchar_t minidump_path[MAX_PATH]; - swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp", - dump_path_c_, next_minidump_id_c_); - - // remove when VC++7.1 is no longer supported - minidump_path[MAX_PATH - 1] = L'\0'; - - next_minidump_path_ = minidump_path; - next_minidump_path_c_ = next_minidump_path_.c_str(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.gyp deleted file mode 100755 index e1e65eec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.gyp +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'exception_handler', - 'type': '<(library)', - 'sources': [ - "exception_handler.cc", - "exception_handler.h", - ], - 'dependencies': [ - '../breakpad_client.gyp:common', - '../crash_generation/crash_generation.gyp:crash_generation_server', - ] - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.h deleted file mode 100644 index 2c2e7b76..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/handler/exception_handler.h +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// It is important that creation and destruction of ExceptionHandler objects -// be nested cleanly, when using install_handler = true. -// Avoid the following pattern: -// ExceptionHandler *e = new ExceptionHandler(...); -// ExceptionHandler *f = new ExceptionHandler(...); -// delete e; -// This will put the exception filter stack into an inconsistent state. - -#ifndef CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include -#include - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/crash_generation_client.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -using std::vector; -using std::wstring; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. exinfo points to the - // exception record, if any; assertion points to assertion information, - // if any. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void* context, EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. exinfo - // points to the exception record, or NULL if no exception occurred. - // succeeded indicates whether a minidump file was successfully written. - // assertion points to information about an assertion if the handler was - // invoked by an assertion. - // - // If an exception occurred and the callback returns true, Breakpad will treat - // the exception as fully-handled, suppressing any other handlers from being - // notified of the exception. If the callback returns false, Breakpad will - // treat the exception as unhandled, and allow another handler to handle it. - // If there are no other handlers, Breakpad will report the exception to the - // system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - // - // For out-of-process dump generation, dump path and minidump ID will always - // be NULL. In case of out-of-process dump generation, the dump path and - // minidump id are controlled by the server process and are not communicated - // back to the crashing process. - typedef bool (*MinidumpCallback)(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded); - - // HandlerType specifies which types of handlers should be installed, if - // any. Use HANDLER_NONE for an ExceptionHandler that remains idle, - // without catching any failures on its own. This type of handler may - // still be triggered by calling WriteMinidump. Otherwise, use a - // combination of the other HANDLER_ values, or HANDLER_ALL to install - // all handlers. - enum HandlerType { - HANDLER_NONE = 0, - HANDLER_EXCEPTION = 1 << 0, // SetUnhandledExceptionFilter - HANDLER_INVALID_PARAMETER = 1 << 1, // _set_invalid_parameter_handler - HANDLER_PURECALL = 1 << 2, // _set_purecall_handler - HANDLER_ALL = HANDLER_EXCEPTION | - HANDLER_INVALID_PARAMETER | - HANDLER_PURECALL - }; - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // handler_types specifies the types of handlers that should be installed. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types); - - // Creates a new ExcetpionHandler instance that can attempt to perform - // out-of-process dump generation if pipe_name is not NULL. If pipe_name is - // NULL, or if out-of-process dump generation registration step fails, - // in-process dump generation will be used. This also allows specifying - // the dump type to generate. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - ~ExceptionHandler(); - - // Get and set the minidump path. - wstring dump_path() const { return dump_path_; } - void set_dump_path(const wstring &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Writes a minidump immediately, with the user-supplied exception - // information. - bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, void* callback_context); - - // Get the thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). This - // may be useful if you want to include additional thread state in your - // dumps. - DWORD get_requesting_thread_id() const { return requesting_thread_id_; } - - // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. - bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } - void set_handle_debug_exceptions(bool handle_debug_exceptions) { - handle_debug_exceptions_ = handle_debug_exceptions; - } - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { return crash_generation_client_.get() != NULL; } - - private: - friend class AutoExceptionHandler; - - // Initializes the instance with given values. - void Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI *MiniDumpWriteDump_type)( - HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY *UuidCreate_type)(UUID* Uuid); - - // Runs the main loop for the exception handler thread. - static DWORD WINAPI ExceptionHandlerThreadMain(void* lpParameter); - - // Called on the exception thread when an unhandled exception occurs. - // Signals the exception handler thread to handle the exception. - static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // This function will be called by some CRT functions when they detect - // that they were passed an invalid parameter. Note that in _DEBUG builds, - // the CRT may display an assertion dialog before calling this function, - // and the function will not be called unless the assertion dialog is - // dismissed by clicking "Ignore." - static void HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved); -#endif // _MSC_VER >= 1400 - - // This function will be called by the CRT when a pure virtual - // function is called. - static void HandlePureVirtualCall(); - - // This is called on the exception thread or on another thread that - // the user wishes to produce a dump from. It calls - // WriteMinidumpWithException on the handler thread, avoiding stack - // overflows and inconsistent dumps due to writing the dump from - // the exception thread. If the dump is requested as a result of an - // exception, exinfo contains exception information, otherwise, it - // is NULL. If the dump is requested as a result of an assertion - // (such as an invalid parameter being passed to a CRT function), - // assertion contains data about the assertion, otherwise, it is NULL. - bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function does the actual writing of a minidump. It is called - // on the handler thread. requesting_thread_id is the ID of the thread - // that requested the dump. If the dump is requested as a result of - // an exception, exinfo contains exception information, otherwise, - // it is NULL. - bool WriteMinidumpWithException(DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function is used as a callback when calling MinidumpWriteDump, - // in order to add additional memory regions to the dump. - static BOOL CALLBACK MinidumpWriteDumpCallback( - PVOID context, - const PMINIDUMP_CALLBACK_INPUT callback_input, - PMINIDUMP_CALLBACK_OUTPUT callback_output); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - FilterCallback filter_; - MinidumpCallback callback_; - void* callback_context_; - - scoped_ptr crash_generation_client_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - wstring dump_path_; - - // The basename of the next minidump to be written, without the extension. - wstring next_minidump_id_; - - // The full pathname of the next minidump to be written, including the file - // extension. - wstring next_minidump_path_; - - // Pointers to C-string representations of the above. These are set when - // the above wstring versions are set in order to avoid calling c_str during - // an exception, as c_str may attempt to allocate heap memory. These - // pointers are not owned by the ExceptionHandler object, but their lifetimes - // should be equivalent to the lifetimes of the associated wstring, provided - // that the wstrings are not altered. - const wchar_t* dump_path_c_; - const wchar_t* next_minidump_id_c_; - const wchar_t* next_minidump_path_c_; - - HMODULE dbghelp_module_; - MiniDumpWriteDump_type minidump_write_dump_; - MINIDUMP_TYPE dump_type_; - - HMODULE rpcrt4_module_; - UuidCreate_type uuid_create_; - - // Tracks the handler types that were installed according to the - // handler_types constructor argument. - int handler_types_; - - // When installed_handler_ is true, previous_filter_ is the unhandled - // exception filter that was set prior to installing ExceptionHandler as - // the unhandled exception filter and pointing it to |this|. NULL indicates - // that there is no previous unhandled exception filter. - LPTOP_LEVEL_EXCEPTION_FILTER previous_filter_; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // Beginning in VC 8, the CRT provides an invalid parameter handler that will - // be called when some CRT functions are passed invalid parameters. In - // earlier CRTs, the same conditions would cause unexpected behavior or - // crashes. - _invalid_parameter_handler previous_iph_; -#endif // _MSC_VER >= 1400 - - // The CRT allows you to override the default handler for pure - // virtual function calls. - _purecall_handler previous_pch_; - - // The exception handler thread. - HANDLE handler_thread_; - - // True if the exception handler is being destroyed. - // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars. - // It has release semantics on write and acquire semantics on reads. - // See the msdn documentation. - volatile bool is_shutdown_; - - // The critical section enforcing the requirement that only one exception be - // handled by a handler at a time. - CRITICAL_SECTION handler_critical_section_; - - // Semaphores used to move exception handling between the exception thread - // and the handler thread. handler_start_semaphore_ is signalled by the - // exception thread to wake up the handler thread when an exception occurs. - // handler_finish_semaphore_ is signalled by the handler thread to wake up - // the exception thread when handling is complete. - HANDLE handler_start_semaphore_; - HANDLE handler_finish_semaphore_; - - // The next 2 fields contain data passed from the requesting thread to - // the handler thread. - - // The thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). - DWORD requesting_thread_id_; - - // The exception info passed to the exception handler on the exception - // thread, if an exception occurred. NULL for user-requested dumps. - EXCEPTION_POINTERS* exception_info_; - - // If the handler is invoked due to an assertion, this will contain a - // pointer to the assertion information. It is NULL at other times. - MDRawAssertionInfo* assertion_; - - // The return value of the handler, passed from the handler thread back to - // the requesting thread. - bool handler_return_value_; - - // If true, the handler will intercept EXCEPTION_BREAKPOINT and - // EXCEPTION_SINGLE_STEP exceptions. Leave this false (the default) - // to not interfere with debuggers. - bool handle_debug_exceptions_; - - // A stack of ExceptionHandler objects that have installed unhandled - // exception filters. This vector is used by HandleException to determine - // which ExceptionHandler object to route an exception to. When an - // ExceptionHandler is created with install_handler true, it will append - // itself to this list. - static vector* handler_stack_; - - // The index of the ExceptionHandler in handler_stack_ that will handle the - // next exception. Note that 0 means the last entry in handler_stack_, 1 - // means the next-to-last entry, and so on. This is used by HandleException - // to support multiple stacked Breakpad handlers. - static LONG handler_stack_index_; - - // handler_stack_critical_section_ guards operations on handler_stack_ and - // handler_stack_index_. The critical section is initialized by the - // first instance of the class and destroyed by the last instance of it. - static CRITICAL_SECTION handler_stack_critical_section_; - - // The number of instances of this class. - volatile static LONG instance_count_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.cc deleted file mode 100644 index ecf626d8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.cc +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include - -#include "client/windows/sender/crash_report_sender.h" -#include "common/windows/http_upload.h" - -#if _MSC_VER < 1400 // MSVC 2005/8 -// Older MSVC doesn't have fscanf_s, but they are compatible as long as -// we don't use the string conversions (%s/%c/%S/%C). -#define fscanf_s fscanf -#endif - -namespace google_breakpad { - -static const char kCheckpointSignature[] = "GBP1\n"; - -CrashReportSender::CrashReportSender(const wstring &checkpoint_file) - : checkpoint_file_(checkpoint_file), - max_reports_per_day_(-1), - last_sent_date_(-1), - reports_sent_(0) { - FILE *fd; - if (OpenCheckpointFile(L"r", &fd) == 0) { - ReadCheckpoint(fd); - fclose(fd); - } -} - -ReportResult CrashReportSender::SendCrashReport( - const wstring &url, const map ¶meters, - const wstring &dump_file_name, wstring *report_code) { - int today = GetCurrentDate(); - if (today == last_sent_date_ && - max_reports_per_day_ != -1 && - reports_sent_ >= max_reports_per_day_) { - return RESULT_THROTTLED; - } - - int http_response = 0; - bool result = HTTPUpload::SendRequest( - url, parameters, dump_file_name, L"upload_file_minidump", NULL, report_code, - &http_response); - - if (result) { - ReportSent(today); - return RESULT_SUCCEEDED; - } else if (http_response >= 400 && http_response < 500) { - return RESULT_REJECTED; - } else { - return RESULT_FAILED; - } -} - -void CrashReportSender::ReadCheckpoint(FILE *fd) { - char buf[128]; - if (!fgets(buf, sizeof(buf), fd) || - strcmp(buf, kCheckpointSignature) != 0) { - return; - } - - if (fscanf_s(fd, "%d\n", &last_sent_date_) != 1) { - last_sent_date_ = -1; - return; - } - if (fscanf_s(fd, "%d\n", &reports_sent_) != 1) { - reports_sent_ = 0; - return; - } -} - -void CrashReportSender::ReportSent(int today) { - // Update the report stats - if (today != last_sent_date_) { - last_sent_date_ = today; - reports_sent_ = 0; - } - ++reports_sent_; - - // Update the checkpoint file - FILE *fd; - if (OpenCheckpointFile(L"w", &fd) == 0) { - fputs(kCheckpointSignature, fd); - fprintf(fd, "%d\n", last_sent_date_); - fprintf(fd, "%d\n", reports_sent_); - fclose(fd); - } -} - -int CrashReportSender::GetCurrentDate() const { - SYSTEMTIME system_time; - GetSystemTime(&system_time); - return (system_time.wYear * 10000) + (system_time.wMonth * 100) + - system_time.wDay; -} - -int CrashReportSender::OpenCheckpointFile(const wchar_t *mode, FILE **fd) { - if (checkpoint_file_.empty()) { - return ENOENT; - } -#if _MSC_VER >= 1400 // MSVC 2005/8 - return _wfopen_s(fd, checkpoint_file_.c_str(), mode); -#else - *fd = _wfopen(checkpoint_file_.c_str(), mode); - if (*fd == NULL) { - return errno; - } - return 0; -#endif -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.gyp deleted file mode 100755 index 0c2421d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.gyp +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'crash_report_sender', - 'type': '<(library)', - 'sources': [ - 'crash_report_sender.cc', - 'crash_report_sender.h', - ], - 'dependencies': [ - '../breakpad_client.gyp:common' - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.h deleted file mode 100644 index da1ed0af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/sender/crash_report_sender.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ -#define CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ - -// CrashReportSender is a "static" class which provides an API to upload -// crash reports via HTTP(S). A crash report is formatted as a multipart POST -// request, which contains a set of caller-supplied string key/value pairs, -// and a minidump file to upload. -// -// To use this library in your project, you will need to link against -// wininet.lib. - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -namespace google_breakpad { - -using std::wstring; -using std::map; - -typedef enum { - RESULT_FAILED = 0, // Failed to communicate with the server; try later. - RESULT_REJECTED, // Successfully sent the crash report, but the - // server rejected it; don't resend this report. - RESULT_SUCCEEDED, // The server accepted the crash report. - RESULT_THROTTLED // No attempt was made to send the crash report, because - // we exceeded the maximum reports per day. -} ReportResult; - -class CrashReportSender { - public: - // Initializes a CrashReportSender instance. - // If checkpoint_file is non-empty, breakpad will persist crash report - // state to this file. A checkpoint file is required for - // set_max_reports_per_day() to function properly. - explicit CrashReportSender(const wstring &checkpoint_file); - ~CrashReportSender() {} - - // Sets the maximum number of crash reports that will be sent in a 24-hour - // period. This uses the state persisted to the checkpoint file. - // The default value of -1 means that there is no limit on reports sent. - void set_max_reports_per_day(int reports) { - max_reports_per_day_ = reports; - } - - int max_reports_per_day() const { return max_reports_per_day_; } - - // Sends the specified minidump file, along with the map of - // name value pairs, as a multipart POST request to the given URL. - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. The return value indicates - // the result of the operation (see above for possible results). - // If report_code is non-NULL and the report is sent successfully (that is, - // the return value is RESULT_SUCCEEDED), a code uniquely identifying the - // report will be returned in report_code. - // (Otherwise, report_code will be unchanged.) - ReportResult SendCrashReport(const wstring &url, - const map ¶meters, - const wstring &dump_file_name, - wstring *report_code); - - private: - // Reads persistent state from a checkpoint file. - void ReadCheckpoint(FILE *fd); - - // Called when a new report has been sent, to update the checkpoint state. - void ReportSent(int today); - - // Returns today's date (UTC) formatted as YYYYMMDD. - int GetCurrentDate() const; - - // Opens the checkpoint file with the specified mode. - // Returns zero on success, or an error code on failure. - int OpenCheckpointFile(const wchar_t *mode, FILE **fd); - - wstring checkpoint_file_; - int max_reports_per_day_; - // The last date on which we sent a report, expressed as YYYYMMDD. - int last_sent_date_; - // Number of reports sent on last_sent_date_ - int reports_sent_; - - // Disallow copy constructor and operator= - explicit CrashReportSender(const CrashReportSender &); - void operator=(const CrashReportSender &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.cc deleted file mode 100644 index 32f78f2b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/tests/crash_generation_app/abstract_class.h" - -namespace google_breakpad { - -Base::Base(Derived* derived) - : derived_(derived) { -} - -Base::~Base() { - derived_->DoSomething(); -} - -#pragma warning(push) -#pragma warning(disable:4355) -// Disable warning C4355: 'this' : used in base member initializer list. -Derived::Derived() - : Base(this) { // C4355 -} -#pragma warning(pop) - -void Derived::DoSomething() { -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.h deleted file mode 100644 index e3f2a4f3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/abstract_class.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_ABSTRACT_CLASS_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_ABSTRACT_CLASS_H__ - -namespace google_breakpad { - -// Dummy classes to help generate a pure call violation. - -class Derived; - -class Base { - public: - Base(Derived* derived); - virtual ~Base(); - virtual void DoSomething() = 0; - - private: - Derived* derived_; -}; - -class Derived : public Base { - public: - Derived(); - virtual void DoSomething(); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.cc deleted file mode 100644 index 1b4bd3c9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +++ /dev/null @@ -1,520 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// crash_generation_app.cpp : Defines the entry point for the application. -// - -#include "client/windows/tests/crash_generation_app/crash_generation_app.h" - -#include -#include - -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/crash_generation/crash_generation_server.h" -#include "client/windows/handler/exception_handler.h" -#include "client/windows/common/ipc_protocol.h" - -#include "client/windows/tests/crash_generation_app/abstract_class.h" - -namespace google_breakpad { - -const int kMaxLoadString = 100; -const wchar_t kPipeName[] = L"\\\\.\\pipe\\BreakpadCrashServices\\TestServer"; - -const DWORD kEditBoxStyles = WS_CHILD | - WS_VISIBLE | - WS_VSCROLL | - ES_LEFT | - ES_MULTILINE | - ES_AUTOVSCROLL | - ES_READONLY; - -// Maximum length of a line in the edit box. -const size_t kMaximumLineLength = 256; - -// CS to access edit control in a thread safe way. -static CRITICAL_SECTION* cs_edit = NULL; - -// Edit control. -static HWND client_status_edit_box; - -HINSTANCE current_instance; // Current instance. -TCHAR title[kMaxLoadString]; // Title bar text. -TCHAR window_class[kMaxLoadString]; // Main window class name. - -ATOM MyRegisterClass(HINSTANCE instance); -BOOL InitInstance(HINSTANCE, int); -LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); -INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); - -static int kCustomInfoCount = 2; -static CustomInfoEntry kCustomInfoEntries[] = { - CustomInfoEntry(L"prod", L"CrashTestApp"), - CustomInfoEntry(L"ver", L"1.0"), -}; - -static ExceptionHandler* handler = NULL; -static CrashGenerationServer* crash_server = NULL; - -// Registers the window class. -// -// This function and its usage are only necessary if you want this code -// to be compatible with Win32 systems prior to the 'RegisterClassEx' -// function that was added to Windows 95. It is important to call this -// function so that the application will get 'well formed' small icons -// associated with it. -ATOM MyRegisterClass(HINSTANCE instance) { - WNDCLASSEX wcex; - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = instance; - wcex.hIcon = LoadIcon(instance, - MAKEINTRESOURCE(IDI_CRASHGENERATIONAPP)); - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = MAKEINTRESOURCE(IDC_CRASHGENERATIONAPP); - wcex.lpszClassName = window_class; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - return RegisterClassEx(&wcex); -} - -// Saves instance handle and creates main window -// -// In this function, we save the instance handle in a global variable and -// create and display the main program window. -BOOL InitInstance(HINSTANCE instance, int command_show) { - current_instance = instance; - HWND wnd = CreateWindow(window_class, - title, - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - 0, - CW_USEDEFAULT, - 0, - NULL, - NULL, - instance, - NULL); - - if (!wnd) { - return FALSE; - } - - ShowWindow(wnd, command_show); - UpdateWindow(wnd); - - return TRUE; -} - -static void AppendTextToEditBox(TCHAR* text) { - EnterCriticalSection(cs_edit); - SYSTEMTIME current_time; - GetLocalTime(¤t_time); - TCHAR line[kMaximumLineLength]; - int result = swprintf_s(line, - kMaximumLineLength, - L"[%.2d-%.2d-%.4d %.2d:%.2d:%.2d] %s", - current_time.wMonth, - current_time.wDay, - current_time.wYear, - current_time.wHour, - current_time.wMinute, - current_time.wSecond, - text); - - if (result == -1) { - return; - } - - int length = GetWindowTextLength(client_status_edit_box); - SendMessage(client_status_edit_box, - EM_SETSEL, - (WPARAM)length, - (LPARAM)length); - SendMessage(client_status_edit_box, - EM_REPLACESEL, - (WPARAM)FALSE, - (LPARAM)line); - LeaveCriticalSection(cs_edit); -} - -static DWORD WINAPI AppendTextWorker(void* context) { - TCHAR* text = reinterpret_cast(context); - - AppendTextToEditBox(text); - delete[] text; - - return 0; -} - -bool ShowDumpResults(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) { - TCHAR* text = new TCHAR[kMaximumLineLength]; - text[0] = _T('\0'); - int result = swprintf_s(text, - kMaximumLineLength, - TEXT("Dump generation request %s\r\n"), - succeeded ? TEXT("succeeded") : TEXT("failed")); - if (result == -1) { - delete [] text; - } - - QueueUserWorkItem(AppendTextWorker, text, WT_EXECUTEDEFAULT); - return succeeded; -} - -static void _cdecl ShowClientConnected(void* context, - const ClientInfo* client_info) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - L"Client connected:\t\t%d\r\n", - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -static void _cdecl ShowClientCrashed(void* context, - const ClientInfo* client_info, - const wstring* dump_path) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - TEXT("Client requested dump:\t%d\r\n"), - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); - - CustomClientInfo custom_info = client_info->GetCustomInfo(); - if (custom_info.count <= 0) { - return; - } - - wstring str_line; - for (size_t i = 0; i < custom_info.count; ++i) { - if (i > 0) { - str_line += L", "; - } - str_line += custom_info.entries[i].name; - str_line += L": "; - str_line += custom_info.entries[i].value; - } - - line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - result = swprintf_s(line, - kMaximumLineLength, - L"%s\n", - str_line.c_str()); - if (result == -1) { - delete[] line; - return; - } - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -static void _cdecl ShowClientExited(void* context, - const ClientInfo* client_info) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - TEXT("Client exited:\t\t%d\r\n"), - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -void CrashServerStart() { - // Do not create another instance of the server. - if (crash_server) { - return; - } - - std::wstring dump_path = L"C:\\Dumps\\"; - crash_server = new CrashGenerationServer(kPipeName, - NULL, - ShowClientConnected, - NULL, - ShowClientCrashed, - NULL, - ShowClientExited, - NULL, - true, - &dump_path); - - if (!crash_server->Start()) { - MessageBoxW(NULL, L"Unable to start server", L"Dumper", MB_OK); - delete crash_server; - crash_server = NULL; - } -} - -void CrashServerStop() { - delete crash_server; - crash_server = NULL; -} - -void DerefZeroCrash() { - int* x = 0; - *x = 1; -} - -void InvalidParamCrash() { - printf(NULL); -} - -void PureCallCrash() { - Derived derived; -} - -void RequestDump() { - if (!handler->WriteMinidump()) { - MessageBoxW(NULL, L"Dump request failed", L"Dumper", MB_OK); - } - kCustomInfoEntries[1].set_value(L"1.1"); -} - -void CleanUp() { - if (cs_edit) { - DeleteCriticalSection(cs_edit); - delete cs_edit; - } - - if (handler) { - delete handler; - } - - if (crash_server) { - delete crash_server; - } -} - -// Processes messages for the main window. -// -// WM_COMMAND - process the application menu. -// WM_PAINT - Paint the main window. -// WM_DESTROY - post a quit message and return. -LRESULT CALLBACK WndProc(HWND wnd, - UINT message, - WPARAM w_param, - LPARAM l_param) { - int message_id; - int message_event; - PAINTSTRUCT ps; - HDC hdc; - -#pragma warning(push) -#pragma warning(disable:4312) - // Disable warning C4312: 'type cast' : conversion from 'LONG' to - // 'HINSTANCE' of greater size. - // The value returned by GetwindowLong in the case below returns unsigned. - HINSTANCE instance = (HINSTANCE)GetWindowLong(wnd, GWL_HINSTANCE); -#pragma warning(pop) - - switch (message) { - case WM_COMMAND: - // Parse the menu selections. - message_id = LOWORD(w_param); - message_event = HIWORD(w_param); - switch (message_id) { - case IDM_ABOUT: - DialogBox(current_instance, - MAKEINTRESOURCE(IDD_ABOUTBOX), - wnd, - About); - break; - case IDM_EXIT: - DestroyWindow(wnd); - break; - case ID_SERVER_START: - CrashServerStart(); - break; - case ID_SERVER_STOP: - CrashServerStop(); - break; - case ID_CLIENT_DEREFZERO: - DerefZeroCrash(); - break; - case ID_CLIENT_INVALIDPARAM: - InvalidParamCrash(); - break; - case ID_CLIENT_PURECALL: - PureCallCrash(); - break; - case ID_CLIENT_REQUESTEXPLICITDUMP: - RequestDump(); - break; - default: - return DefWindowProc(wnd, message, w_param, l_param); - } - break; - case WM_CREATE: - client_status_edit_box = CreateWindow(TEXT("EDIT"), - NULL, - kEditBoxStyles, - 0, - 0, - 0, - 0, - wnd, - NULL, - instance, - NULL); - break; - case WM_SIZE: - // Make the edit control the size of the window's client area. - MoveWindow(client_status_edit_box, - 0, - 0, - LOWORD(l_param), // width of client area. - HIWORD(l_param), // height of client area. - TRUE); // repaint window. - break; - case WM_SETFOCUS: - SetFocus(client_status_edit_box); - break; - case WM_PAINT: - hdc = BeginPaint(wnd, &ps); - EndPaint(wnd, &ps); - break; - case WM_DESTROY: - CleanUp(); - PostQuitMessage(0); - break; - default: - return DefWindowProc(wnd, message, w_param, l_param); - } - - return 0; -} - -// Message handler for about box. -INT_PTR CALLBACK About(HWND dlg, - UINT message, - WPARAM w_param, - LPARAM l_param) { - UNREFERENCED_PARAMETER(l_param); - switch (message) { - case WM_INITDIALOG: - return (INT_PTR)TRUE; - - case WM_COMMAND: - if (LOWORD(w_param) == IDOK || LOWORD(w_param) == IDCANCEL) { - EndDialog(dlg, LOWORD(w_param)); - return (INT_PTR)TRUE; - } - break; - } - - return (INT_PTR)FALSE; -} - -} // namespace google_breakpad - -int APIENTRY _tWinMain(HINSTANCE instance, - HINSTANCE previous_instance, - LPTSTR command_line, - int command_show) { - using namespace google_breakpad; - - UNREFERENCED_PARAMETER(previous_instance); - UNREFERENCED_PARAMETER(command_line); - - cs_edit = new CRITICAL_SECTION(); - InitializeCriticalSection(cs_edit); - - CustomClientInfo custom_info = {kCustomInfoEntries, kCustomInfoCount}; - - CrashServerStart(); - // This is needed for CRT to not show dialog for invalid param - // failures and instead let the code handle it. - _CrtSetReportMode(_CRT_ASSERT, 0); - handler = new ExceptionHandler(L"C:\\dumps\\", - NULL, - google_breakpad::ShowDumpResults, - NULL, - ExceptionHandler::HANDLER_ALL, - MiniDumpNormal, - kPipeName, - &custom_info); - - // Initialize global strings. - LoadString(instance, IDS_APP_TITLE, title, kMaxLoadString); - LoadString(instance, - IDC_CRASHGENERATIONAPP, - window_class, - kMaxLoadString); - MyRegisterClass(instance); - - // Perform application initialization. - if (!InitInstance (instance, command_show)) { - return FALSE; - } - - HACCEL accel_table = LoadAccelerators( - instance, - MAKEINTRESOURCE(IDC_CRASHGENERATIONAPP)); - - // Main message loop. - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) { - if (!TranslateAccelerator(msg.hwnd, accel_table, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - return (int)msg.wParam; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp deleted file mode 100644 index aabf9c01..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.gyp +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'crash_generation_app', - 'type': 'executable', - 'sources': [ - 'abstract_class.cc', - 'abstract_class.h', - 'crash_generation_app.cc', - 'crash_generation_app.h', - 'crash_generation_app.ico', - 'crash_generation_app.rc', - 'resource.h', - 'small.ico', - ], - 'dependencies': [ - '../../breakpad_client.gyp:common', - '../../crash_generation/crash_generation.gyp:crash_generation_server', - '../../crash_generation/crash_generation.gyp:crash_generation_client', - '../../handler/exception_handler.gyp:exception_handler', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '2', # Windows Subsystem as opposed to a console app - }, - }, - } - ] -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.h deleted file mode 100644 index 4d3bb6eb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ - -#include "resource.h" - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.ico b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.ico deleted file mode 100644 index d551aa3a..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.ico and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.rc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.rc deleted file mode 100644 index a362562b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/crash_generation_app.rc +++ /dev/null @@ -1,144 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_CRASHGENERATIONAPP ICON "crash_generation_app.ico" -IDI_SMALL ICON "small.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDC_CRASHGENERATIONAPP MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "E&xit", IDM_EXIT - END - POPUP "&Server" - BEGIN - MENUITEM "&Start", ID_SERVER_START - MENUITEM "S&top", ID_SERVER_STOP - END - POPUP "&Client" - BEGIN - MENUITEM "&Deref Zero", ID_CLIENT_DEREFZERO - MENUITEM "&Invalid Param", ID_CLIENT_INVALIDPARAM - MENUITEM "&Pure Call", ID_CLIENT_PURECALL - MENUITEM "&Request Dump", ID_CLIENT_REQUESTEXPLICITDUMP - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDC_CRASHGENERATIONAPP ACCELERATORS -BEGIN - "?", IDM_ABOUT, ASCII, ALT - "/", IDM_ABOUT, ASCII, ALT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG 22, 17, 230, 75 -STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "About" -FONT 8, "System" -BEGIN - ICON IDI_CRASHGENERATIONAPP,IDC_MYICON,14,9,16,16 - LTEXT "CrashGenerationApp Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX - LTEXT "Copyright (C) 2008",IDC_STATIC,49,20,119,8 - DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_APP_TITLE "CrashGenerationApp" - IDC_CRASHGENERATIONAPP "CRASHGENERATIONAPP" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/resource.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/resource.h deleted file mode 100644 index 8c7f6570..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/resource.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PreCompile.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ - -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by crash_generation_app.rc -// -#define IDC_MYICON 2 -#define IDD_CRASHGENERATIONAPP_DIALOG 102 -#define IDS_APP_TITLE 103 -#define IDD_ABOUTBOX 103 -#define IDM_ABOUT 104 -#define IDM_EXIT 105 -#define IDI_CRASHGENERATIONAPP 107 -#define IDI_SMALL 108 -#define IDC_CRASHGENERATIONAPP 109 -#define IDR_MAINFRAME 128 -#define ID_SERVER_START 32771 -#define ID_SERVER_STOP 32772 -#define ID_CLIENT_INVALIDPARAM 32773 -#define ID_CLIENT_ASSERTFAILURE 32774 -#define ID_CLIENT_DEREFZERO 32775 -#define ID_CLIENT_PURECALL 32777 -#define ID_CLIENT_REQUESTEXPLICITDUMP 32778 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 129 -#define _APS_NEXT_COMMAND_VALUE 32780 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 110 -#endif -#endif - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/small.ico b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/small.ico deleted file mode 100644 index d551aa3a..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/tests/crash_generation_app/small.ico and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/client_tests.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/client_tests.gyp deleted file mode 100755 index 6563ecf0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/client_tests.gyp +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../build/common.gypi', - ], - 'targets': [ - { - 'target_name': 'client_tests', - 'type': 'executable', - 'sources': [ - 'exception_handler_test.cc', - 'exception_handler_death_test.cc', - 'minidump_test.cc', - 'dump_analysis.cc', - 'dump_analysis.h', - 'crash_generation_server_test.cc' - ], - 'dependencies': [ - 'testing.gyp:gtest', - 'testing.gyp:gmock', - '../breakpad_client.gyp:common', - '../crash_generation/crash_generation.gyp:crash_generation_server', - '../crash_generation/crash_generation.gyp:crash_generation_client', - '../handler/exception_handler.gyp:exception_handler', - 'processor_bits', - ] - }, - { - 'target_name': 'processor_bits', - 'type': 'static_library', - 'include_dirs': [ - '<(DEPTH)', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(DEPTH)', - ] - }, - 'sources': [ - '<(DEPTH)/common/string_conversion.cc', - '<(DEPTH)/processor/basic_code_modules.cc', - '<(DEPTH)/processor/logging.cc', - '<(DEPTH)/processor/minidump.cc', - '<(DEPTH)/processor/pathname_stripper.cc', - ] - } - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/crash_generation_server_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/crash_generation_server_test.cc deleted file mode 100644 index 75d0be97..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/crash_generation_server_test.cc +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#include "testing/gtest/include/gtest/gtest.h" -#include "testing/include/gmock/gmock.h" - -#include "client/windows/crash_generation/crash_generation_server.h" -#include "client/windows/common/ipc_protocol.h" - -using testing::_; - -namespace { - -const wchar_t kPipeName[] = - L"\\\\.\\pipe\\CrashGenerationServerTest\\TestCaseServer"; - -const DWORD kPipeDesiredAccess = FILE_READ_DATA | - FILE_WRITE_DATA | - FILE_WRITE_ATTRIBUTES; - -const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION | - SECURITY_SQOS_PRESENT; - -const DWORD kPipeMode = PIPE_READMODE_MESSAGE; - -int kCustomInfoCount = 2; - -google_breakpad::CustomInfoEntry kCustomInfoEntries[] = { - google_breakpad::CustomInfoEntry(L"prod", L"CrashGenerationServerTest"), - google_breakpad::CustomInfoEntry(L"ver", L"1.0"), -}; - -class CrashGenerationServerTest : public ::testing::Test { - public: - CrashGenerationServerTest() - : crash_generation_server_(kPipeName, - NULL, - CallOnClientConnected, &mock_callbacks_, - CallOnClientDumpRequested, &mock_callbacks_, - CallOnClientExited, &mock_callbacks_, - false, - NULL), - thread_id_(0), - exception_pointers_(NULL) { - memset(&assert_info_, 0, sizeof(assert_info_)); - } - - protected: - class MockCrashGenerationServerCallbacks { - public: - MOCK_METHOD1(OnClientConnected, - void(const google_breakpad::ClientInfo* client_info)); - MOCK_METHOD2(OnClientDumpRequested, - void(const google_breakpad::ClientInfo* client_info, - const std::wstring* file_path)); - MOCK_METHOD1(OnClientExited, - void(const google_breakpad::ClientInfo* client_info)); - }; - - enum ClientFault { - NO_FAULT, - CLOSE_AFTER_CONNECT, - SEND_INVALID_REGISTRATION, - TRUNCATE_REGISTRATION, - CLOSE_AFTER_REGISTRATION, - RESPONSE_BUFFER_TOO_SMALL, - CLOSE_AFTER_RESPONSE, - SEND_INVALID_ACK - }; - - void SetUp() { - ASSERT_TRUE(crash_generation_server_.Start()); - } - - void FaultyClient(ClientFault fault_type) { - HANDLE pipe = CreateFile(kPipeName, - kPipeDesiredAccess, - 0, - NULL, - OPEN_EXISTING, - kPipeFlagsAndAttributes, - NULL); - - if (pipe == INVALID_HANDLE_VALUE) { - ASSERT_EQ(ERROR_PIPE_BUSY, GetLastError()); - - // Cannot continue retrying if wait on pipe fails. - ASSERT_TRUE(WaitNamedPipe(kPipeName, 500)); - - pipe = CreateFile(kPipeName, - kPipeDesiredAccess, - 0, - NULL, - OPEN_EXISTING, - kPipeFlagsAndAttributes, - NULL); - } - - ASSERT_NE(pipe, INVALID_HANDLE_VALUE); - - DWORD mode = kPipeMode; - ASSERT_TRUE(SetNamedPipeHandleState(pipe, &mode, NULL, NULL)); - - DoFaultyClient(fault_type, pipe); - - CloseHandle(pipe); - } - - void DoTestFault(ClientFault fault) { - EXPECT_CALL(mock_callbacks_, OnClientConnected(_)).Times(0); - ASSERT_NO_FATAL_FAILURE(FaultyClient(fault)); - ASSERT_NO_FATAL_FAILURE(FaultyClient(fault)); - ASSERT_NO_FATAL_FAILURE(FaultyClient(fault)); - - EXPECT_CALL(mock_callbacks_, OnClientConnected(_)); - - ASSERT_NO_FATAL_FAILURE(FaultyClient(NO_FAULT)); - - // Slight hack. The OnClientConnected is only invoked after the ack is - // received by the server. At that point, the FaultyClient call has already - // returned. The best way to wait until the server is done handling that is - // to send one more ping, whose processing will be blocked by delivery of - // the OnClientConnected message. - ASSERT_NO_FATAL_FAILURE(FaultyClient(CLOSE_AFTER_CONNECT)); - } - - MockCrashGenerationServerCallbacks mock_callbacks_; - - private: - // Depends on the caller to successfully open the pipe before invocation and - // to close it immediately afterwards. - void DoFaultyClient(ClientFault fault_type, HANDLE pipe) { - if (fault_type == CLOSE_AFTER_CONNECT) { - return; - } - - google_breakpad::CustomClientInfo custom_info = {kCustomInfoEntries, - kCustomInfoCount}; - - google_breakpad::ProtocolMessage msg( - fault_type == SEND_INVALID_REGISTRATION ? - google_breakpad::MESSAGE_TAG_NONE : - google_breakpad::MESSAGE_TAG_REGISTRATION_REQUEST, - GetCurrentProcessId(), - MiniDumpNormal, - &thread_id_, - &exception_pointers_, - &assert_info_, - custom_info, - NULL, - NULL, - NULL); - - DWORD bytes_count = 0; - - ASSERT_TRUE(WriteFile(pipe, - &msg, - fault_type == TRUNCATE_REGISTRATION ? - sizeof(msg) / 2 : sizeof(msg), - &bytes_count, - NULL)); - - if (fault_type == CLOSE_AFTER_REGISTRATION) { - return; - } - - google_breakpad::ProtocolMessage reply; - - if (!ReadFile(pipe, - &reply, - fault_type == RESPONSE_BUFFER_TOO_SMALL ? - sizeof(google_breakpad::ProtocolMessage) / 2 : - sizeof(google_breakpad::ProtocolMessage), - &bytes_count, - NULL)) { - switch (fault_type) { - case TRUNCATE_REGISTRATION: - case RESPONSE_BUFFER_TOO_SMALL: - case SEND_INVALID_REGISTRATION: - return; - - default: - FAIL() << "Unexpectedly failed to register."; - } - } - - if (fault_type == CLOSE_AFTER_RESPONSE) { - return; - } - - google_breakpad::ProtocolMessage ack_msg; - ack_msg.tag = google_breakpad::MESSAGE_TAG_REGISTRATION_ACK; - - ASSERT_TRUE(WriteFile(pipe, - &ack_msg, - SEND_INVALID_ACK ? - sizeof(ack_msg) : sizeof(ack_msg) / 2, - &bytes_count, - NULL)); - - return; - } - - static void CallOnClientConnected( - void* context, const google_breakpad::ClientInfo* client_info) { - static_cast(context)-> - OnClientConnected(client_info); - } - - static void CallOnClientDumpRequested( - void* context, - const google_breakpad::ClientInfo* client_info, - const std::wstring* file_path) { - static_cast(context)-> - OnClientDumpRequested(client_info, file_path); - } - - static void CallOnClientExited( - void* context, const google_breakpad::ClientInfo* client_info) { - static_cast(context)-> - OnClientExited(client_info); - } - - DWORD thread_id_; - EXCEPTION_POINTERS* exception_pointers_; - MDRawAssertionInfo assert_info_; - - google_breakpad::CrashGenerationServer crash_generation_server_; -}; - -TEST_F(CrashGenerationServerTest, PingServerTest) { - DoTestFault(CLOSE_AFTER_CONNECT); -} - -TEST_F(CrashGenerationServerTest, InvalidRegistration) { - DoTestFault(SEND_INVALID_REGISTRATION); -} - -TEST_F(CrashGenerationServerTest, TruncateRegistration) { - DoTestFault(TRUNCATE_REGISTRATION); -} - -TEST_F(CrashGenerationServerTest, CloseAfterRegistration) { - DoTestFault(CLOSE_AFTER_REGISTRATION); -} - -TEST_F(CrashGenerationServerTest, ResponseBufferTooSmall) { - DoTestFault(RESPONSE_BUFFER_TOO_SMALL); -} - -TEST_F(CrashGenerationServerTest, CloseAfterResponse) { - DoTestFault(CLOSE_AFTER_RESPONSE); -} - -// It turns out that, as long as you send one byte, the ACK is accepted and -// registration succeeds. -TEST_F(CrashGenerationServerTest, SendInvalidAck) { - EXPECT_CALL(mock_callbacks_, OnClientConnected(_)); - ASSERT_NO_FATAL_FAILURE(FaultyClient(SEND_INVALID_ACK)); - - // See DoTestFault for an explanation of this line - ASSERT_NO_FATAL_FAILURE(FaultyClient(CLOSE_AFTER_CONNECT)); - - EXPECT_CALL(mock_callbacks_, OnClientConnected(_)); - ASSERT_NO_FATAL_FAILURE(FaultyClient(NO_FAULT)); - - // See DoTestFault for an explanation of this line - ASSERT_NO_FATAL_FAILURE(FaultyClient(CLOSE_AFTER_CONNECT)); -} - -} // anonymous namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.cc deleted file mode 100755 index 936b27fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.cc +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include "dump_analysis.h" // NOLINT -#include "gtest/gtest.h" - -DumpAnalysis::~DumpAnalysis() { - if (dump_file_view_ != NULL) { - EXPECT_TRUE(::UnmapViewOfFile(dump_file_view_)); - ::CloseHandle(dump_file_mapping_); - dump_file_mapping_ = NULL; - } - - if (dump_file_handle_ != NULL) { - ::CloseHandle(dump_file_handle_); - dump_file_handle_ = NULL; - } -} - -void DumpAnalysis::EnsureDumpMapped() { - if (dump_file_view_ == NULL) { - dump_file_handle_ = ::CreateFile(dump_file_.c_str(), - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - 0, - NULL); - ASSERT_TRUE(dump_file_handle_ != NULL); - ASSERT_TRUE(dump_file_mapping_ == NULL); - - dump_file_mapping_ = ::CreateFileMapping(dump_file_handle_, - NULL, - PAGE_READONLY, - 0, - 0, - NULL); - ASSERT_TRUE(dump_file_mapping_ != NULL); - - dump_file_view_ = ::MapViewOfFile(dump_file_mapping_, - FILE_MAP_READ, - 0, - 0, - 0); - ASSERT_TRUE(dump_file_view_ != NULL); - } -} - -bool DumpAnalysis::HasTebs() const { - MINIDUMP_THREAD_LIST* thread_list = NULL; - size_t thread_list_size = GetStream(ThreadListStream, &thread_list); - - if (thread_list_size > 0 && thread_list != NULL) { - for (ULONG i = 0; i < thread_list->NumberOfThreads; ++i) { - if (!HasMemory(thread_list->Threads[i].Teb)) - return false; - } - - return true; - } - - // No thread list, no TEB info. - return false; -} - -bool DumpAnalysis::HasPeb() const { - MINIDUMP_THREAD_LIST* thread_list = NULL; - size_t thread_list_size = GetStream(ThreadListStream, &thread_list); - - if (thread_list_size > 0 && thread_list != NULL && - thread_list->NumberOfThreads > 0) { - FakeTEB* teb = NULL; - if (!HasMemory(thread_list->Threads[0].Teb, &teb)) - return false; - - return HasMemory(teb->peb); - } - - return false; -} - -bool DumpAnalysis::HasStream(ULONG stream_number) const { - void* stream = NULL; - size_t stream_size = GetStreamImpl(stream_number, &stream); - return stream_size > 0 && stream != NULL; -} - -size_t DumpAnalysis::GetStreamImpl(ULONG stream_number, void** stream) const { - MINIDUMP_DIRECTORY* directory = NULL; - ULONG memory_list_size = 0; - BOOL ret = ::MiniDumpReadDumpStream(dump_file_view_, - stream_number, - &directory, - stream, - &memory_list_size); - - return ret ? memory_list_size : 0; -} - -bool DumpAnalysis::HasMemoryImpl(const void *addr_in, size_t structuresize, - void **structure) const { - uintptr_t address = reinterpret_cast(addr_in); - MINIDUMP_MEMORY_LIST* memory_list = NULL; - size_t memory_list_size = GetStream(MemoryListStream, &memory_list); - if (memory_list_size > 0 && memory_list != NULL) { - for (ULONG i = 0; i < memory_list->NumberOfMemoryRanges; ++i) { - MINIDUMP_MEMORY_DESCRIPTOR& descr = memory_list->MemoryRanges[i]; - const uintptr_t range_start = - static_cast(descr.StartOfMemoryRange); - uintptr_t range_end = range_start + descr.Memory.DataSize; - - if (address >= range_start && - address + structuresize < range_end) { - // The start address falls in the range, and the end address is - // in bounds, return a pointer to the structure if requested. - if (structure != NULL) - *structure = RVA_TO_ADDR(dump_file_view_, descr.Memory.Rva); - - return true; - } - } - } - - // We didn't find the range in a MINIDUMP_MEMORY_LIST, so maybe this - // is a full dump using MINIDUMP_MEMORY64_LIST with all the memory at the - // end of the dump file. - MINIDUMP_MEMORY64_LIST* memory64_list = NULL; - memory_list_size = GetStream(Memory64ListStream, &memory64_list); - if (memory_list_size > 0 && memory64_list != NULL) { - // Keep track of where the current descriptor maps to. - RVA64 curr_rva = memory64_list->BaseRva; - for (ULONG i = 0; i < memory64_list->NumberOfMemoryRanges; ++i) { - MINIDUMP_MEMORY_DESCRIPTOR64& descr = memory64_list->MemoryRanges[i]; - uintptr_t range_start = - static_cast(descr.StartOfMemoryRange); - uintptr_t range_end = range_start + static_cast(descr.DataSize); - - if (address >= range_start && - address + structuresize < range_end) { - // The start address falls in the range, and the end address is - // in bounds, return a pointer to the structure if requested. - if (structure != NULL) - *structure = RVA_TO_ADDR(dump_file_view_, curr_rva); - - return true; - } - - // Advance the current RVA. - curr_rva += descr.DataSize; - } - } - - return false; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.h b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.h deleted file mode 100755 index 0392f5d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/dump_analysis.h +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_UNITTESTS_DUMP_ANALYSIS_H_ -#define CLIENT_WINDOWS_UNITTESTS_DUMP_ANALYSIS_H_ - -#include "../crash_generation/minidump_generator.h" - -// Convenience to get to the PEB pointer in a TEB. -struct FakeTEB { - char dummy[0x30]; - void* peb; -}; - -class DumpAnalysis { - public: - explicit DumpAnalysis(const std::wstring& file_path) - : dump_file_(file_path), dump_file_view_(NULL), dump_file_mapping_(NULL), - dump_file_handle_(NULL) { - EnsureDumpMapped(); - } - ~DumpAnalysis(); - - bool HasStream(ULONG stream_number) const; - - // This is template to keep type safety in the front, but we end up casting - // to void** inside the implementation to pass the pointer to Win32. So - // casting here is considered safe. - template - size_t GetStream(ULONG stream_number, StreamType** stream) const { - return GetStreamImpl(stream_number, reinterpret_cast(stream)); - } - - bool HasTebs() const; - bool HasPeb() const; - bool HasMemory(ULONG64 address) const { - return HasMemory(address, NULL); - } - - bool HasMemory(const void* address) const { - return HasMemory(address, NULL); - } - - template - bool HasMemory(ULONG64 address, StructureType** structure = NULL) const { - // We can't cope with 64 bit addresses for now. - if (address > 0xFFFFFFFFUL) - return false; - - return HasMemory(reinterpret_cast(address), structure); - } - - template - bool HasMemory(const void* addr_in, StructureType** structure = NULL) const { - return HasMemoryImpl(addr_in, sizeof(StructureType), - reinterpret_cast(structure)); - } - - protected: - void EnsureDumpMapped(); - - HANDLE dump_file_mapping_; - HANDLE dump_file_handle_; - void* dump_file_view_; - std::wstring dump_file_; - - private: - // This is the implementation of GetStream<>. - size_t GetStreamImpl(ULONG stream_number, void** stream) const; - - // This is the implementation of HasMemory<>. - bool HasMemoryImpl(const void* addr_in, size_t pointersize, - void** structure) const; -}; - -#endif // CLIENT_WINDOWS_UNITTESTS_DUMP_ANALYSIS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_death_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_death_test.cc deleted file mode 100755 index adea044f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_death_test.cc +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include - -#include "../../../breakpad_googletest_includes.h" -#include "../../../../common/windows/string_utils-inl.h" -#include "../crash_generation/crash_generation_server.h" -#include "../handler/exception_handler.h" -#include "../../../../google_breakpad/processor/minidump.h" - -namespace { - -using std::wstring; -using namespace google_breakpad; - -const wchar_t kPipeName[] = L"\\\\.\\pipe\\BreakpadCrashTest\\TestCaseServer"; -const char kSuccessIndicator[] = "success"; -const char kFailureIndicator[] = "failure"; - -// Utility function to test for a path's existence. -BOOL DoesPathExist(const TCHAR *path_name); - -class ExceptionHandlerDeathTest : public ::testing::Test { - protected: - // Member variable for each test that they can use - // for temporary storage. - TCHAR temp_path_[MAX_PATH]; - // Actually constructs a temp path name. - virtual void SetUp(); - // A helper method that tests can use to crash. - void DoCrashAccessViolation(); - void DoCrashPureVirtualCall(); -}; - -void ExceptionHandlerDeathTest::SetUp() { - const ::testing::TestInfo* const test_info = - ::testing::UnitTest::GetInstance()->current_test_info(); - TCHAR temp_path[MAX_PATH] = { '\0' }; - TCHAR test_name_wide[MAX_PATH] = { '\0' }; - // We want the temporary directory to be what the OS returns - // to us, + the test case name. - GetTempPath(MAX_PATH, temp_path); - // The test case name is exposed as a c-style string, - // convert it to a wchar_t string. - int dwRet = MultiByteToWideChar(CP_ACP, 0, test_info->name(), - strlen(test_info->name()), - test_name_wide, - MAX_PATH); - if (!dwRet) { - assert(false); - } - StringCchPrintfW(temp_path_, MAX_PATH, L"%s%s", temp_path, test_name_wide); - CreateDirectory(temp_path_, NULL); -} - -BOOL DoesPathExist(const TCHAR *path_name) { - DWORD flags = GetFileAttributes(path_name); - if (flags == INVALID_FILE_ATTRIBUTES) { - return FALSE; - } - return TRUE; -} - -bool MinidumpWrittenCallback(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) { - if (succeeded && DoesPathExist(dump_path)) { - fprintf(stderr, kSuccessIndicator); - } else { - fprintf(stderr, kFailureIndicator); - } - // If we don't flush, the output doesn't get sent before - // this process dies. - fflush(stderr); - return succeeded; -} - -TEST_F(ExceptionHandlerDeathTest, InProcTest) { - // For the in-proc test, we just need to instantiate an exception - // handler in in-proc mode, and crash. Since the entire test is - // reexecuted in the child process, we don't have to worry about - // the semantics of the exception handler being inherited/not - // inherited across CreateProcess(). - ASSERT_TRUE(DoesPathExist(temp_path_)); - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, &MinidumpWrittenCallback, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - int *i = NULL; - ASSERT_DEATH((*i)++, kSuccessIndicator); - delete exc; -} - -static bool gDumpCallbackCalled = false; - -void clientDumpCallback(void *dump_context, - const google_breakpad::ClientInfo *client_info, - const std::wstring *dump_path) { - gDumpCallbackCalled = true; -} - -void ExceptionHandlerDeathTest::DoCrashAccessViolation() { - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL, MiniDumpNormal, kPipeName, - NULL); - // Although this is executing in the child process of the death test, - // if it's not true we'll still get an error rather than the crash - // being expected. - ASSERT_TRUE(exc->IsOutOfProcess()); - int *i = NULL; - printf("%d\n", (*i)++); -} - -TEST_F(ExceptionHandlerDeathTest, OutOfProcTest) { - // We can take advantage of a detail of google test here to save some - // complexity in testing: when you do a death test, it actually forks. - // So we can make the main test harness the crash generation server, - // and call ASSERT_DEATH on a NULL dereference, it to expecting test - // the out of process scenario, since it's happening in a different - // process! This is different from the above because, above, we pass - // a NULL pipe name, and we also don't start a crash generation server. - - ASSERT_TRUE(DoesPathExist(temp_path_)); - std::wstring dump_path(temp_path_); - google_breakpad::CrashGenerationServer server( - kPipeName, NULL, NULL, NULL, &clientDumpCallback, NULL, NULL, NULL, true, - &dump_path); - - // This HAS to be EXPECT_, because when this test case is executed in the - // child process, the server registration will fail due to the named pipe - // being the same. - EXPECT_TRUE(server.Start()); - EXPECT_FALSE(gDumpCallbackCalled); - ASSERT_DEATH(this->DoCrashAccessViolation(), ""); - EXPECT_TRUE(gDumpCallbackCalled); -} - -TEST_F(ExceptionHandlerDeathTest, InvalidParameterTest) { - using google_breakpad::ExceptionHandler; - - ASSERT_TRUE(DoesPathExist(temp_path_)); - ExceptionHandler handler(temp_path_, NULL, NULL, NULL, - ExceptionHandler::HANDLER_INVALID_PARAMETER); - - // Disable the message box for assertions - _CrtSetReportMode(_CRT_ASSERT, 0); - - // Call with a bad argument. The invalid parameter will be swallowed - // and a dump will be generated, the process will exit(0). - ASSERT_EXIT(printf(NULL), ::testing::ExitedWithCode(0), ""); -} - - -struct PureVirtualCallBase { - PureVirtualCallBase() { - // We have to reinterpret so the linker doesn't get confused because the - // method isn't defined. - reinterpret_cast(this)->PureFunction(); - } - virtual ~PureVirtualCallBase() {} - virtual void PureFunction() const = 0; -}; -struct PureVirtualCall : public PureVirtualCallBase { - PureVirtualCall() { PureFunction(); } - virtual void PureFunction() const {} -}; - -void ExceptionHandlerDeathTest::DoCrashPureVirtualCall() { - PureVirtualCall instance; -} - -TEST_F(ExceptionHandlerDeathTest, PureVirtualCallTest) { - using google_breakpad::ExceptionHandler; - - ASSERT_TRUE(DoesPathExist(temp_path_)); - ExceptionHandler handler(temp_path_, NULL, NULL, NULL, - ExceptionHandler::HANDLER_PURECALL); - - // Disable the message box for assertions - _CrtSetReportMode(_CRT_ASSERT, 0); - - // Calls a pure virtual function. - EXPECT_EXIT(DoCrashPureVirtualCall(), ::testing::ExitedWithCode(0), ""); -} - -wstring find_minidump_in_directory(const wstring &directory) { - wstring search_path = directory + L"\\*"; - WIN32_FIND_DATA find_data; - HANDLE find_handle = FindFirstFileW(search_path.c_str(), &find_data); - if (find_handle == INVALID_HANDLE_VALUE) - return wstring(); - - wstring filename; - do { - const wchar_t extension[] = L".dmp"; - const int extension_length = sizeof(extension) / sizeof(extension[0]) - 1; - const int filename_length = wcslen(find_data.cFileName); - if (filename_length > extension_length && - wcsncmp(extension, - find_data.cFileName + filename_length - extension_length, - extension_length) == 0) { - filename = directory + L"\\" + find_data.cFileName; - break; - } - } while(FindNextFile(find_handle, &find_data)); - FindClose(find_handle); - return filename; -} - -TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) { - ASSERT_TRUE(DoesPathExist(temp_path_)); - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - - // Get some executable memory. - const u_int32_t kMemorySize = 256; // bytes - const int kOffset = kMemorySize / 2; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - char* memory = reinterpret_cast(VirtualAlloc(NULL, - kMemorySize, - MEM_COMMIT | MEM_RESERVE, - PAGE_EXECUTE_READWRITE)); - ASSERT_TRUE(memory); - - // Write some instructions that will crash. Put them - // in the middle of the block of memory, because the - // minidump should contain 128 bytes on either side of the - // instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - ASSERT_DEATH(memory_function(), ""); - - // free the memory. - VirtualFree(memory, 0, MEM_RELEASE); - - // Verify that the resulting minidump contains the memory around the IP - wstring minidump_filename_wide = find_minidump_in_directory(temp_path_); - ASSERT_FALSE(minidump_filename_wide.empty()); - string minidump_filename; - ASSERT_TRUE(WindowsStringUtils::safe_wcstombs(minidump_filename_wide, - &minidump_filename)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - { - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT((unsigned)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - EXPECT_EQ(kMemorySize, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kOffset]; - u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset, instructions, - sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); - } - - DeleteFileW(minidump_filename_wide.c_str()); -} - -TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMinBound) { - ASSERT_TRUE(DoesPathExist(temp_path_)); - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - - SYSTEM_INFO sSysInfo; // Useful information about the system - GetSystemInfo(&sSysInfo); // Initialize the structure. - - const u_int32_t kMemorySize = 256; // bytes - const DWORD kPageSize = sSysInfo.dwPageSize; - const int kOffset = 0; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - // Get some executable memory. Specifically, reserve two pages, - // but only commit the second. - char* all_memory = reinterpret_cast(VirtualAlloc(NULL, - kPageSize * 2, - MEM_RESERVE, - PAGE_NOACCESS)); - ASSERT_TRUE(all_memory); - char* memory = all_memory + kPageSize; - ASSERT_TRUE(VirtualAlloc(memory, kPageSize, - MEM_COMMIT, PAGE_EXECUTE_READWRITE)); - - // Write some instructions that will crash. Put them - // in the middle of the block of memory, because the - // minidump should contain 128 bytes on either side of the - // instruction pointer. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - ASSERT_DEATH(memory_function(), ""); - - // free the memory. - VirtualFree(memory, 0, MEM_RELEASE); - - // Verify that the resulting minidump contains the memory around the IP - wstring minidump_filename_wide = find_minidump_in_directory(temp_path_); - ASSERT_FALSE(minidump_filename_wide.empty()); - string minidump_filename; - ASSERT_TRUE(WindowsStringUtils::safe_wcstombs(minidump_filename_wide, - &minidump_filename)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - { - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT((unsigned)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - EXPECT_EQ(kMemorySize / 2, region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)]; - memset(suffix_bytes, 0, sizeof(suffix_bytes)); - EXPECT_TRUE(memcmp(bytes + kOffset, - instructions, sizeof(instructions)) == 0); - EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions), - suffix_bytes, sizeof(suffix_bytes)) == 0); - } - - DeleteFileW(minidump_filename_wide.c_str()); -} - -TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMaxBound) { - ASSERT_TRUE(DoesPathExist(temp_path_)); - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - - SYSTEM_INFO sSysInfo; // Useful information about the system - GetSystemInfo(&sSysInfo); // Initialize the structure. - - const DWORD kPageSize = sSysInfo.dwPageSize; - // This crashes with SIGILL on x86/x86-64/arm. - const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff }; - const int kOffset = kPageSize - sizeof(instructions); - // Get some executable memory. Specifically, reserve two pages, - // but only commit the first. - char* memory = reinterpret_cast(VirtualAlloc(NULL, - kPageSize * 2, - MEM_RESERVE, - PAGE_NOACCESS)); - ASSERT_TRUE(memory); - ASSERT_TRUE(VirtualAlloc(memory, kPageSize, - MEM_COMMIT, PAGE_EXECUTE_READWRITE)); - - // Write some instructions that will crash. - memcpy(memory + kOffset, instructions, sizeof(instructions)); - - // Now execute the instructions, which should crash. - typedef void (*void_function)(void); - void_function memory_function = - reinterpret_cast(memory + kOffset); - ASSERT_DEATH(memory_function(), ""); - - // free the memory. - VirtualFree(memory, 0, MEM_RELEASE); - - // Verify that the resulting minidump contains the memory around the IP - wstring minidump_filename_wide = find_minidump_in_directory(temp_path_); - ASSERT_FALSE(minidump_filename_wide.empty()); - string minidump_filename; - ASSERT_TRUE(WindowsStringUtils::safe_wcstombs(minidump_filename_wide, - &minidump_filename)); - - // Read the minidump. Locate the exception record and the - // memory list, and then ensure that there is a memory region - // in the memory list that covers the instruction pointer from - // the exception record. - { - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - - MinidumpException* exception = minidump.GetException(); - MinidumpMemoryList* memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(exception); - ASSERT_TRUE(memory_list); - ASSERT_LT((unsigned)0, memory_list->region_count()); - - MinidumpContext* context = exception->GetContext(); - ASSERT_TRUE(context); - - u_int64_t instruction_pointer; - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - instruction_pointer = context->GetContextX86()->eip; - break; - case MD_CONTEXT_AMD64: - instruction_pointer = context->GetContextAMD64()->rip; - break; - default: - FAIL() << "Unknown context CPU: " << context->GetContextCPU(); - break; - } - - MinidumpMemoryRegion* region = - memory_list->GetMemoryRegionForAddress(instruction_pointer); - ASSERT_TRUE(region); - - const size_t kPrefixSize = 128; // bytes - EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize()); - const u_int8_t* bytes = region->GetMemory(); - ASSERT_TRUE(bytes); - - u_int8_t prefix_bytes[kPrefixSize]; - memset(prefix_bytes, 0, sizeof(prefix_bytes)); - EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0); - EXPECT_TRUE(memcmp(bytes + kPrefixSize, - instructions, sizeof(instructions)) == 0); - } - - DeleteFileW(minidump_filename_wide.c_str()); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_test.cc deleted file mode 100755 index f0341880..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/exception_handler_test.cc +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include - -#include "../../../breakpad_googletest_includes.h" -#include "../../../../common/windows/string_utils-inl.h" -#include "../../../../google_breakpad/processor/minidump.h" -#include "../crash_generation/crash_generation_server.h" -#include "../handler/exception_handler.h" -#include "dump_analysis.h" // NOLINT - -namespace { - -using std::wstring; -using namespace google_breakpad; - -const wchar_t kPipeName[] = L"\\\\.\\pipe\\BreakpadCrashTest\\TestCaseServer"; -const char kSuccessIndicator[] = "success"; -const char kFailureIndicator[] = "failure"; - -const MINIDUMP_TYPE kFullDumpType = static_cast( - MiniDumpWithFullMemory | // Full memory from process. - MiniDumpWithProcessThreadData | // Get PEB and TEB. - MiniDumpWithHandleData); // Get all handle information. - -class ExceptionHandlerTest : public ::testing::Test { - protected: - // Member variable for each test that they can use - // for temporary storage. - TCHAR temp_path_[MAX_PATH]; - - // Actually constructs a temp path name. - virtual void SetUp(); - - // Deletes temporary files. - virtual void TearDown(); - - void DoCrashInvalidParameter(); - void DoCrashPureVirtualCall(); - - // Utility function to test for a path's existence. - static BOOL DoesPathExist(const TCHAR *path_name); - - // Client callback. - static void ClientDumpCallback( - void *dump_context, - const google_breakpad::ClientInfo *client_info, - const std::wstring *dump_path); - - static bool DumpCallback(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded); - - static std::wstring dump_file; - static std::wstring full_dump_file; -}; - -std::wstring ExceptionHandlerTest::dump_file; -std::wstring ExceptionHandlerTest::full_dump_file; - -void ExceptionHandlerTest::SetUp() { - const ::testing::TestInfo* const test_info = - ::testing::UnitTest::GetInstance()->current_test_info(); - TCHAR temp_path[MAX_PATH] = { '\0' }; - TCHAR test_name_wide[MAX_PATH] = { '\0' }; - // We want the temporary directory to be what the OS returns - // to us, + the test case name. - GetTempPath(MAX_PATH, temp_path); - // THe test case name is exposed to use as a c-style string, - // But we might be working in UNICODE here on Windows. - int dwRet = MultiByteToWideChar(CP_ACP, 0, test_info->name(), - strlen(test_info->name()), - test_name_wide, - MAX_PATH); - if (!dwRet) { - assert(false); - } - StringCchPrintfW(temp_path_, MAX_PATH, L"%s%s", temp_path, test_name_wide); - CreateDirectory(temp_path_, NULL); -} - -void ExceptionHandlerTest::TearDown() { - if (!dump_file.empty()) { - ::DeleteFile(dump_file.c_str()); - dump_file = L""; - } - if (!full_dump_file.empty()) { - ::DeleteFile(full_dump_file.c_str()); - full_dump_file = L""; - } -} - -BOOL ExceptionHandlerTest::DoesPathExist(const TCHAR *path_name) { - DWORD flags = GetFileAttributes(path_name); - if (flags == INVALID_FILE_ATTRIBUTES) { - return FALSE; - } - return TRUE; -} - -// static -void ExceptionHandlerTest::ClientDumpCallback( - void *dump_context, - const google_breakpad::ClientInfo *client_info, - const wstring *dump_path) { - dump_file = *dump_path; - // Create the full dump file name from the dump path. - full_dump_file = dump_file.substr(0, dump_file.length() - 4) + L"-full.dmp"; -} - -// static -bool ExceptionHandlerTest::DumpCallback(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) { - dump_file = dump_path; - dump_file += L"\\"; - dump_file += minidump_id; - dump_file += L".dmp"; - return succeeded; -} - -void ExceptionHandlerTest::DoCrashInvalidParameter() { - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_INVALID_PARAMETER, - kFullDumpType, kPipeName, NULL); - - // Disable the message box for assertions - _CrtSetReportMode(_CRT_ASSERT, 0); - - // Although this is executing in the child process of the death test, - // if it's not true we'll still get an error rather than the crash - // being expected. - ASSERT_TRUE(exc->IsOutOfProcess()); - printf(NULL); -} - - -struct PureVirtualCallBase { - PureVirtualCallBase() { - // We have to reinterpret so the linker doesn't get confused because the - // method isn't defined. - reinterpret_cast(this)->PureFunction(); - } - virtual ~PureVirtualCallBase() {} - virtual void PureFunction() const = 0; -}; -struct PureVirtualCall : public PureVirtualCallBase { - PureVirtualCall() { PureFunction(); } - virtual void PureFunction() const {} -}; - -void ExceptionHandlerTest::DoCrashPureVirtualCall() { - google_breakpad::ExceptionHandler *exc = - new google_breakpad::ExceptionHandler( - temp_path_, NULL, NULL, NULL, - google_breakpad::ExceptionHandler::HANDLER_PURECALL, - kFullDumpType, kPipeName, NULL); - - // Disable the message box for assertions - _CrtSetReportMode(_CRT_ASSERT, 0); - - // Although this is executing in the child process of the death test, - // if it's not true we'll still get an error rather than the crash - // being expected. - ASSERT_TRUE(exc->IsOutOfProcess()); - - // Create a new frame to ensure PureVirtualCall is not optimized to some - // other line in this function. - { - PureVirtualCall instance; - } -} - -// This test validates that the minidump is written correctly. -TEST_F(ExceptionHandlerTest, InvalidParameterMiniDumpTest) { - ASSERT_TRUE(DoesPathExist(temp_path_)); - - // Call with a bad argument - ASSERT_TRUE(DoesPathExist(temp_path_)); - wstring dump_path(temp_path_); - google_breakpad::CrashGenerationServer server( - kPipeName, NULL, NULL, NULL, ClientDumpCallback, NULL, NULL, NULL, true, - &dump_path); - - ASSERT_TRUE(dump_file.empty() && full_dump_file.empty()); - - // This HAS to be EXPECT_, because when this test case is executed in the - // child process, the server registration will fail due to the named pipe - // being the same. - EXPECT_TRUE(server.Start()); - EXPECT_EXIT(DoCrashInvalidParameter(), ::testing::ExitedWithCode(0), ""); - ASSERT_TRUE(!dump_file.empty() && !full_dump_file.empty()); - ASSERT_TRUE(DoesPathExist(dump_file.c_str())); - - // Verify the dump for infos. - DumpAnalysis mini(dump_file); - DumpAnalysis full(full_dump_file); - - // The dump should have all of these streams. - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(full.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(full.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(full.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(full.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - EXPECT_TRUE(full.HasStream(MiscInfoStream)); - EXPECT_TRUE(mini.HasStream(HandleDataStream)); - EXPECT_TRUE(full.HasStream(HandleDataStream)); - - // We expect PEB and TEBs in this dump. - EXPECT_TRUE(mini.HasTebs() || full.HasTebs()); - EXPECT_TRUE(mini.HasPeb() || full.HasPeb()); - - // Minidump should have a memory listing, but no 64-bit memory. - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - - EXPECT_FALSE(full.HasStream(MemoryListStream)); - EXPECT_TRUE(full.HasStream(Memory64ListStream)); - - // This is the only place we don't use OR because we want both not - // to have the streams. - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(full.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(full.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(full.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(full.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(full.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(full.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(full.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); - EXPECT_FALSE(full.HasStream(TokenStream)); -} - - -// This test validates that the minidump is written correctly. -TEST_F(ExceptionHandlerTest, PureVirtualCallMiniDumpTest) { - ASSERT_TRUE(DoesPathExist(temp_path_)); - - // Call with a bad argument - ASSERT_TRUE(DoesPathExist(temp_path_)); - wstring dump_path(temp_path_); - google_breakpad::CrashGenerationServer server( - kPipeName, NULL, NULL, NULL, ClientDumpCallback, NULL, NULL, NULL, true, - &dump_path); - - ASSERT_TRUE(dump_file.empty() && full_dump_file.empty()); - - // This HAS to be EXPECT_, because when this test case is executed in the - // child process, the server registration will fail due to the named pipe - // being the same. - EXPECT_TRUE(server.Start()); - EXPECT_EXIT(DoCrashPureVirtualCall(), ::testing::ExitedWithCode(0), ""); - ASSERT_TRUE(!dump_file.empty() && !full_dump_file.empty()); - ASSERT_TRUE(DoesPathExist(dump_file.c_str())); - - // Verify the dump for infos. - DumpAnalysis mini(dump_file); - DumpAnalysis full(full_dump_file); - - // The dump should have all of these streams. - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(full.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(full.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(full.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(full.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - EXPECT_TRUE(full.HasStream(MiscInfoStream)); - EXPECT_TRUE(mini.HasStream(HandleDataStream)); - EXPECT_TRUE(full.HasStream(HandleDataStream)); - - // We expect PEB and TEBs in this dump. - EXPECT_TRUE(mini.HasTebs() || full.HasTebs()); - EXPECT_TRUE(mini.HasPeb() || full.HasPeb()); - - // Minidump should have a memory listing, but no 64-bit memory. - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - - EXPECT_FALSE(full.HasStream(MemoryListStream)); - EXPECT_TRUE(full.HasStream(Memory64ListStream)); - - // This is the only place we don't use OR because we want both not - // to have the streams. - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(full.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(full.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(full.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(full.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(full.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(full.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(full.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); - EXPECT_FALSE(full.HasStream(TokenStream)); -} - -// Test that writing a minidump produces a valid minidump containing -// some expected structures. -TEST_F(ExceptionHandlerTest, WriteMinidumpTest) { - ExceptionHandler handler(temp_path_, - NULL, - DumpCallback, - NULL, - ExceptionHandler::HANDLER_ALL); - ASSERT_TRUE(handler.WriteMinidump()); - ASSERT_FALSE(dump_file.empty()); - - string minidump_filename; - ASSERT_TRUE(WindowsStringUtils::safe_wcstombs(dump_file, - &minidump_filename)); - - // Read the minidump and verify some info. - Minidump minidump(minidump_filename); - ASSERT_TRUE(minidump.Read()); - //TODO(ted): more comprehensive tests... -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/minidump_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/minidump_test.cc deleted file mode 100755 index 5b2960b0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/minidump_test.cc +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include "../crash_generation/minidump_generator.h" -#include "dump_analysis.h" // NOLINT - -#include "gtest/gtest.h" - -namespace { - -// Minidump with stacks, PEB, TEB, and unloaded module list. -const MINIDUMP_TYPE kSmallDumpType = static_cast( - MiniDumpWithProcessThreadData | // Get PEB and TEB. - MiniDumpWithUnloadedModules); // Get unloaded modules when available. - -// Minidump with all of the above, plus memory referenced from stack. -const MINIDUMP_TYPE kLargerDumpType = static_cast( - MiniDumpWithProcessThreadData | // Get PEB and TEB. - MiniDumpWithUnloadedModules | // Get unloaded modules when available. - MiniDumpWithIndirectlyReferencedMemory); // Get memory referenced by stack. - -// Large dump with all process memory. -const MINIDUMP_TYPE kFullDumpType = static_cast( - MiniDumpWithFullMemory | // Full memory from process. - MiniDumpWithProcessThreadData | // Get PEB and TEB. - MiniDumpWithHandleData | // Get all handle information. - MiniDumpWithUnloadedModules); // Get unloaded modules when available. - -class MinidumpTest: public testing::Test { - public: - MinidumpTest() { - wchar_t temp_dir_path[ MAX_PATH ] = {0}; - ::GetTempPath(MAX_PATH, temp_dir_path); - dump_path_ = temp_dir_path; - } - - virtual void SetUp() { - // Make sure URLMon isn't loaded into our process. - ASSERT_EQ(NULL, ::GetModuleHandle(L"urlmon.dll")); - - // Then load and unload it to ensure we have something to - // stock the unloaded module list with. - HMODULE urlmon = ::LoadLibrary(L"urlmon.dll"); - ASSERT_TRUE(urlmon != NULL); - ASSERT_TRUE(::FreeLibrary(urlmon)); - } - - virtual void TearDown() { - if (!dump_file_.empty()) { - ::DeleteFile(dump_file_.c_str()); - dump_file_ = L""; - } - if (!full_dump_file_.empty()) { - ::DeleteFile(full_dump_file_.c_str()); - full_dump_file_ = L""; - } - } - - bool WriteDump(ULONG flags) { - using google_breakpad::MinidumpGenerator; - - // Fake exception is access violation on write to this. - EXCEPTION_RECORD ex_record = { - STATUS_ACCESS_VIOLATION, // ExceptionCode - 0, // ExceptionFlags - NULL, // ExceptionRecord; - reinterpret_cast(0xCAFEBABE), // ExceptionAddress; - 2, // NumberParameters; - { EXCEPTION_WRITE_FAULT, reinterpret_cast(this) } - }; - CONTEXT ctx_record = {}; - EXCEPTION_POINTERS ex_ptrs = { - &ex_record, - &ctx_record, - }; - - MinidumpGenerator generator(dump_path_); - - // And write a dump - bool result = generator.WriteMinidump(::GetCurrentProcess(), - ::GetCurrentProcessId(), - ::GetCurrentThreadId(), - ::GetCurrentThreadId(), - &ex_ptrs, - NULL, - static_cast(flags), - TRUE, - &dump_file_, - &full_dump_file_); - return result == TRUE; - } - - protected: - std::wstring dump_file_; - std::wstring full_dump_file_; - - std::wstring dump_path_; -}; - -// We need to be able to get file information from Windows -bool HasFileInfo(const std::wstring& file_path) { - DWORD dummy; - const wchar_t* path = file_path.c_str(); - DWORD length = ::GetFileVersionInfoSize(path, &dummy); - if (length == 0) - return NULL; - - void* data = calloc(length, 1); - if (!data) - return false; - - if (!::GetFileVersionInfo(path, dummy, length, data)) { - free(data); - return false; - } - - void* translate = NULL; - UINT page_count; - BOOL query_result = VerQueryValue( - data, - L"\\VarFileInfo\\Translation", - static_cast(&translate), - &page_count); - - free(data); - if (query_result && translate) { - return true; - } else { - return false; - } -} - -TEST_F(MinidumpTest, Version) { - API_VERSION* version = ::ImagehlpApiVersion(); - - HMODULE dbg_help = ::GetModuleHandle(L"dbghelp.dll"); - ASSERT_TRUE(dbg_help != NULL); - - wchar_t dbg_help_file[1024] = {}; - ASSERT_TRUE(::GetModuleFileName(dbg_help, - dbg_help_file, - sizeof(dbg_help_file) / - sizeof(*dbg_help_file))); - ASSERT_TRUE(HasFileInfo(std::wstring(dbg_help_file)) != NULL); - -// LOG(INFO) << "DbgHelp.dll version: " << file_info->file_version(); -} - -TEST_F(MinidumpTest, Normal) { - EXPECT_TRUE(WriteDump(MiniDumpNormal)); - DumpAnalysis mini(dump_file_); - - // We expect threads, modules and some memory. - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(HandleDataStream)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(UnloadedModuleListStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); - - // We expect no PEB nor TEBs in this dump. - EXPECT_FALSE(mini.HasTebs()); - EXPECT_FALSE(mini.HasPeb()); - - // We expect no off-stack memory in this dump. - EXPECT_FALSE(mini.HasMemory(this)); -} - -TEST_F(MinidumpTest, SmallDump) { - ASSERT_TRUE(WriteDump(kSmallDumpType)); - DumpAnalysis mini(dump_file_); - - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(UnloadedModuleListStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - - // We expect PEB and TEBs in this dump. - EXPECT_TRUE(mini.HasTebs()); - EXPECT_TRUE(mini.HasPeb()); - - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(HandleDataStream)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); - - // We expect no off-stack memory in this dump. - EXPECT_FALSE(mini.HasMemory(this)); -} - -TEST_F(MinidumpTest, LargerDump) { - ASSERT_TRUE(WriteDump(kLargerDumpType)); - DumpAnalysis mini(dump_file_); - - // The dump should have all of these streams. - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(UnloadedModuleListStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - - // We expect memory referenced by stack in this dump. - EXPECT_TRUE(mini.HasMemory(this)); - - // We expect PEB and TEBs in this dump. - EXPECT_TRUE(mini.HasTebs()); - EXPECT_TRUE(mini.HasPeb()); - - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(HandleDataStream)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); -} - -TEST_F(MinidumpTest, FullDump) { - ASSERT_TRUE(WriteDump(kFullDumpType)); - ASSERT_TRUE(dump_file_ != L""); - ASSERT_TRUE(full_dump_file_ != L""); - DumpAnalysis mini(dump_file_); - DumpAnalysis full(full_dump_file_); - - // Either dumps can contain part of the information. - - // The dump should have all of these streams. - EXPECT_TRUE(mini.HasStream(ThreadListStream)); - EXPECT_TRUE(full.HasStream(ThreadListStream)); - EXPECT_TRUE(mini.HasStream(ModuleListStream)); - EXPECT_TRUE(full.HasStream(ModuleListStream)); - EXPECT_TRUE(mini.HasStream(ExceptionStream)); - EXPECT_TRUE(full.HasStream(ExceptionStream)); - EXPECT_TRUE(mini.HasStream(SystemInfoStream)); - EXPECT_TRUE(full.HasStream(SystemInfoStream)); - EXPECT_TRUE(mini.HasStream(UnloadedModuleListStream)); - EXPECT_TRUE(full.HasStream(UnloadedModuleListStream)); - EXPECT_TRUE(mini.HasStream(MiscInfoStream)); - EXPECT_TRUE(full.HasStream(MiscInfoStream)); - EXPECT_TRUE(mini.HasStream(HandleDataStream)); - EXPECT_TRUE(full.HasStream(HandleDataStream)); - - // We expect memory referenced by stack in this dump. - EXPECT_FALSE(mini.HasMemory(this)); - EXPECT_TRUE(full.HasMemory(this)); - - // We expect PEB and TEBs in this dump. - EXPECT_TRUE(mini.HasTebs() || full.HasTebs()); - EXPECT_TRUE(mini.HasPeb() || full.HasPeb()); - - EXPECT_TRUE(mini.HasStream(MemoryListStream)); - EXPECT_TRUE(full.HasStream(Memory64ListStream)); - EXPECT_FALSE(mini.HasStream(Memory64ListStream)); - EXPECT_FALSE(full.HasStream(MemoryListStream)); - - // This is the only place we don't use OR because we want both not - // to have the streams. - EXPECT_FALSE(mini.HasStream(ThreadExListStream)); - EXPECT_FALSE(full.HasStream(ThreadExListStream)); - EXPECT_FALSE(mini.HasStream(CommentStreamA)); - EXPECT_FALSE(full.HasStream(CommentStreamA)); - EXPECT_FALSE(mini.HasStream(CommentStreamW)); - EXPECT_FALSE(full.HasStream(CommentStreamW)); - EXPECT_FALSE(mini.HasStream(FunctionTableStream)); - EXPECT_FALSE(full.HasStream(FunctionTableStream)); - EXPECT_FALSE(mini.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(full.HasStream(MemoryInfoListStream)); - EXPECT_FALSE(mini.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(full.HasStream(ThreadInfoListStream)); - EXPECT_FALSE(mini.HasStream(HandleOperationListStream)); - EXPECT_FALSE(full.HasStream(HandleOperationListStream)); - EXPECT_FALSE(mini.HasStream(TokenStream)); - EXPECT_FALSE(full.HasStream(TokenStream)); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/testing.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/testing.gyp deleted file mode 100644 index 85854288..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/client/windows/unittests/testing.gyp +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2010, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -{ - 'includes': [ - '../build/common.gypi', - ], - 'target_defaults': { - }, - 'targets': [ - { - 'target_name': 'gtest', - 'type': '<(library)', - 'include_dirs': [ - '<(DEPTH)/testing/include', - '<(DEPTH)/testing/gtest', - '<(DEPTH)/testing/gtest/include', - ], - 'sources': [ - '<(DEPTH)/testing/gtest/src/gtest-all.cc', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(DEPTH)/testing/include', - '<(DEPTH)/testing/gtest/include', - ] - }, - }, - { - 'target_name': 'gmock', - 'type': '<(library)', - 'include_dirs': [ - '<(DEPTH)/testing/include', - '<(DEPTH)/testing/', - '<(DEPTH)/testing/gtest', - '<(DEPTH)/testing/gtest/include', - ], - 'sources': [ - '<(DEPTH)/testing/src/gmock-all.cc', - '<(DEPTH)/testing/src/gmock_main.cc', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(DEPTH)/testing/include', - '<(DEPTH)/testing/gtest/include', - ] - }, - }, - - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor.h deleted file mode 100644 index 24ffce75..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor.h +++ /dev/null @@ -1,263 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// byte_cursor.h: Classes for parsing values from a buffer of bytes. -// The ByteCursor class provides a convenient interface for reading -// fixed-size integers of arbitrary endianness, being thorough about -// checking for buffer overruns. - -#ifndef COMMON_BYTE_CURSOR_H_ -#define COMMON_BYTE_CURSOR_H_ - -#include -#include -#include -#include -#include - -namespace google_breakpad { - -// A buffer holding a series of bytes. -struct ByteBuffer { - ByteBuffer() : start(0), end(0) { } - ByteBuffer(const uint8_t *set_start, size_t set_size) - : start(set_start), end(set_start + set_size) { } - ~ByteBuffer() { }; - - // Equality operators. Useful in unit tests, and when we're using - // ByteBuffers to refer to regions of a larger buffer. - bool operator==(const ByteBuffer &that) const { - return start == that.start && end == that.end; - } - bool operator!=(const ByteBuffer &that) const { - return start != that.start || end != that.end; - } - - // Not C++ style guide compliant, but this definitely belongs here. - size_t Size() const { - assert(start <= end); - return end - start; - } - - const uint8_t *start, *end; -}; - -// A cursor pointing into a ByteBuffer that can parse numbers of various -// widths and representations, strings, and data blocks, advancing through -// the buffer as it goes. All ByteCursor operations check that accesses -// haven't gone beyond the end of the enclosing ByteBuffer. -class ByteCursor { - public: - // Create a cursor reading bytes from the start of BUFFER. By default, the - // cursor reads multi-byte values in little-endian form. - ByteCursor(const ByteBuffer *buffer, bool big_endian = false) - : buffer_(buffer), here_(buffer->start), - big_endian_(big_endian), complete_(true) { } - - // Accessor and setter for this cursor's endianness flag. - bool big_endian() const { return big_endian_; } - void set_big_endian(bool big_endian) { big_endian_ = big_endian; } - - // Accessor and setter for this cursor's current position. The setter - // returns a reference to this cursor. - const uint8_t *here() const { return here_; } - ByteCursor &set_here(const uint8_t *here) { - assert(buffer_->start <= here && here <= buffer_->end); - here_ = here; - return *this; - } - - // Return the number of bytes available to read at the cursor. - size_t Available() const { return size_t(buffer_->end - here_); } - - // Return true if this cursor is at the end of its buffer. - bool AtEnd() const { return Available() == 0; } - - // When used as a boolean value this cursor converts to true if all - // prior reads have been completed, or false if we ran off the end - // of the buffer. - operator bool() const { return complete_; } - - // Read a SIZE-byte integer at this cursor, signed if IS_SIGNED is true, - // unsigned otherwise, using the cursor's established endianness, and set - // *RESULT to the number. If we read off the end of our buffer, clear - // this cursor's complete_ flag, and store a dummy value in *RESULT. - // Return a reference to this cursor. - template - ByteCursor &Read(size_t size, bool is_signed, T *result) { - if (CheckAvailable(size)) { - T v = 0; - if (big_endian_) { - for (size_t i = 0; i < size; i++) - v = (v << 8) + here_[i]; - } else { - // This loop condition looks weird, but size_t is unsigned, so - // decrementing i after it is zero yields the largest size_t value. - for (size_t i = size - 1; i < size; i--) - v = (v << 8) + here_[i]; - } - if (is_signed && size < sizeof(T)) { - size_t sign_bit = (T)1 << (size * 8 - 1); - v = (v ^ sign_bit) - sign_bit; - } - here_ += size; - *result = v; - } else { - *result = (T) 0xdeadbeef; - } - return *this; - } - - // Read an integer, using the cursor's established endianness and - // *RESULT's size and signedness, and set *RESULT to the number. If we - // read off the end of our buffer, clear this cursor's complete_ flag. - // Return a reference to this cursor. - template - ByteCursor &operator>>(T &result) { - bool T_is_signed = (T)-1 < 0; - return Read(sizeof(T), T_is_signed, &result); - } - - // Copy the SIZE bytes at the cursor to BUFFER, and advance this - // cursor to the end of them. If we read off the end of our buffer, - // clear this cursor's complete_ flag, and set *POINTER to NULL. - // Return a reference to this cursor. - ByteCursor &Read(uint8_t *buffer, size_t size) { - if (CheckAvailable(size)) { - memcpy(buffer, here_, size); - here_ += size; - } - return *this; - } - - // Set STR to a copy of the '\0'-terminated string at the cursor. If the - // byte buffer does not contain a terminating zero, clear this cursor's - // complete_ flag, and set STR to the empty string. Return a reference to - // this cursor. - ByteCursor &CString(std::string *str) { - const uint8_t *end - = static_cast(memchr(here_, '\0', Available())); - if (end) { - str->assign(reinterpret_cast(here_), end - here_); - here_ = end + 1; - } else { - str->clear(); - here_ = buffer_->end; - complete_ = false; - } - return *this; - } - - // Like CString(STR), but extract the string from a fixed-width buffer - // LIMIT bytes long, which may or may not contain a terminating '\0' - // byte. Specifically: - // - // - If there are not LIMIT bytes available at the cursor, clear the - // cursor's complete_ flag and set STR to the empty string. - // - // - Otherwise, if the LIMIT bytes at the cursor contain any '\0' - // characters, set *STR to a copy of the bytes before the first '\0', - // and advance the cursor by LIMIT bytes. - // - // - Otherwise, set *STR to a copy of those LIMIT bytes, and advance the - // cursor by LIMIT bytes. - ByteCursor &CString(std::string *str, size_t limit) { - if (CheckAvailable(limit)) { - const uint8_t *end - = static_cast(memchr(here_, '\0', limit)); - if (end) - str->assign(reinterpret_cast(here_), end - here_); - else - str->assign(reinterpret_cast(here_), limit); - here_ += limit; - } else { - str->clear(); - } - return *this; - } - - // Set *POINTER to point to the SIZE bytes at the cursor, and advance - // this cursor to the end of them. If SIZE is omitted, don't move the - // cursor. If we read off the end of our buffer, clear this cursor's - // complete_ flag, and set *POINTER to NULL. Return a reference to this - // cursor. - ByteCursor &PointTo(const uint8_t **pointer, size_t size = 0) { - if (CheckAvailable(size)) { - *pointer = here_; - here_ += size; - } else { - *pointer = NULL; - } - return *this; - } - - // Skip SIZE bytes at the cursor. If doing so would advance us off - // the end of our buffer, clear this cursor's complete_ flag, and - // set *POINTER to NULL. Return a reference to this cursor. - ByteCursor &Skip(size_t size) { - if (CheckAvailable(size)) - here_ += size; - return *this; - } - - private: - // If there are at least SIZE bytes available to read from the buffer, - // return true. Otherwise, set here_ to the end of the buffer, set - // complete_ to false, and return false. - bool CheckAvailable(size_t size) { - if (Available() >= size) { - return true; - } else { - here_ = buffer_->end; - complete_ = false; - return false; - } - } - - // The buffer we're reading bytes from. - const ByteBuffer *buffer_; - - // The next byte within buffer_ that we'll read. - const uint8_t *here_; - - // True if we should read numbers in big-endian form; false if we - // should read in little-endian form. - bool big_endian_; - - // True if we've been able to read all we've been asked to. - bool complete_; -}; - -} // namespace google_breakpad - -#endif // COMMON_BYTE_CURSOR_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor_unittest.cc deleted file mode 100644 index 0ab4770a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/byte_cursor_unittest.cc +++ /dev/null @@ -1,776 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// byte_cursor_unittest.cc: Unit tests for google_breakpad::ByteBuffer -// and google_breakpad::ByteCursor. - -#include - -#include - -#include "common/byte_cursor.h" -#include "breakpad_googletest_includes.h" - -using google_breakpad::ByteBuffer; -using google_breakpad::ByteCursor; -using std::string; - -TEST(Buffer, SizeOfNothing) { - uint8_t data[1]; - ByteBuffer buffer(data, 0); - EXPECT_EQ(0U, buffer.Size()); -} - -TEST(Buffer, SizeOfSomething) { - uint8_t data[10]; - ByteBuffer buffer(data, sizeof(data)); - EXPECT_EQ(10U, buffer.Size()); -} - -TEST(Extent, AvailableEmpty) { - uint8_t data[1]; - ByteBuffer buffer(data, 0); - ByteCursor cursor(&buffer); - EXPECT_EQ(0U, cursor.Available()); -} - -TEST(Extent, AtEndEmpty) { - uint8_t data[1]; - ByteBuffer buffer(data, 0); - ByteCursor cursor(&buffer); - EXPECT_TRUE(cursor.AtEnd()); -} - -TEST(Extent, AsBoolEmpty) { - uint8_t data[1]; - ByteBuffer buffer(data, 0); - ByteCursor cursor(&buffer); - EXPECT_TRUE(cursor); -} - -TEST(Extent, AvailableSome) { - uint8_t data[10]; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - EXPECT_EQ(10U, cursor.Available()); -} - -TEST(Extent, AtEndSome) { - uint8_t data[10]; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - EXPECT_FALSE(cursor.AtEnd()); - EXPECT_TRUE(cursor.Skip(sizeof(data)).AtEnd()); -} - -TEST(Extent, AsBoolSome) { - uint8_t data[10]; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - EXPECT_TRUE(cursor); - EXPECT_TRUE(cursor.Skip(sizeof(data))); - EXPECT_FALSE(cursor.Skip(1)); -} - -TEST(Extent, Cursor) { - uint8_t data[] = { 0xf7, - 0x9f, 0xbe, - 0x67, 0xfb, 0xd3, 0x58, - 0x6f, 0x36, 0xde, 0xd1, - 0x2a, 0x2a, 0x2a }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - - uint8_t a; - uint16_t b; - uint32_t c; - uint32_t d; - uint8_t stars[3]; - - EXPECT_EQ(data + 0U, cursor.here()); - - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(data + 1U, cursor.here()); - - EXPECT_TRUE(cursor >> b); - EXPECT_EQ(data + 3U, cursor.here()); - - EXPECT_TRUE(cursor >> c); - EXPECT_EQ(data + 7U, cursor.here()); - - EXPECT_TRUE(cursor.Skip(4)); - EXPECT_EQ(data + 11U, cursor.here()); - - EXPECT_TRUE(cursor.Read(stars, 3)); - EXPECT_EQ(data + 14U, cursor.here()); - - EXPECT_FALSE(cursor >> d); - EXPECT_EQ(data + 14U, cursor.here()); -} - -TEST(Extent, SetOffset) { - uint8_t data[] = { 0x5c, 0x79, 0x8c, 0xd5 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - - uint8_t a, b, c, d, e; - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(0x5cU, a); - EXPECT_EQ(data + 1U, cursor.here()); - EXPECT_TRUE(((cursor >> b).set_here(data + 3) >> c).set_here(data + 1) - >> d >> e); - EXPECT_EQ(0x79U, b); - EXPECT_EQ(0xd5U, c); - EXPECT_EQ(0x79U, d); - EXPECT_EQ(0x8cU, e); - EXPECT_EQ(data + 3U, cursor.here()); -} - -TEST(BigEndian, Signed1) { - uint8_t data[] = { 0x00, 0x7f, 0x80, 0xff }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - cursor.set_big_endian(true); - int a, b, c, d, e; - ASSERT_TRUE(cursor - .Read(1, true, &a) - .Read(1, true, &b) - .Read(1, true, &c) - .Read(1, true, &d)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7f, b); - EXPECT_EQ(-0x80, c); - EXPECT_EQ(-1, d); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(1, true, &e)); -} - -TEST(BigEndian, Signed2) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x80, 0x7f, 0xff, - 0x80, 0x00, 0x80, 0x80, 0xff, 0xff, - 0x39, 0xf1, 0x8a, 0xbc, 0x5a, 0xec }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, true); - int a, b, c, d, e, f, g, h, i, j; - ASSERT_TRUE(cursor - .Read(2, true, &a) - .Read(2, true, &b) - .Read(2, true, &c) - .Read(2, true, &d) - .Read(2, true, &e) - .Read(2, true, &f) - .Read(2, true, &g) - .Read(2, true, &h) - .Read(2, true, &i)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x80, b); - EXPECT_EQ(0x7fff, c); - EXPECT_EQ(-0x8000, d); - EXPECT_EQ(-0x7f80, e); - EXPECT_EQ(-1, f); - EXPECT_EQ(0x39f1, g); - EXPECT_EQ(-0x7544, h); - EXPECT_EQ(0x5aec, i); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(2, true, &j)); -} - -TEST(BigEndian, Signed4) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, - 0xb6, 0xb1, 0xff, 0xef, - 0x19, 0x6a, 0xca, 0x46 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - cursor.set_big_endian(true); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(4, true, &a) - .Read(4, true, &b) - .Read(4, true, &c) - .Read(4, true, &d) - .Read(4, true, &e) - .Read(4, true, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffff, b); - EXPECT_EQ(-0x80000000LL, c); - EXPECT_EQ(-1, d); - EXPECT_EQ((int32_t) 0xb6b1ffef, e); - EXPECT_EQ(0x196aca46, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(4, true, &g)); -} - -TEST(BigEndian, Signed8) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x93, 0x20, 0xd5, 0xe9, 0xd2, 0xd5, 0x87, 0x9c, - 0x4e, 0x42, 0x49, 0xd2, 0x7f, 0x84, 0x14, 0xa4 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, true); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(8, true, &a) - .Read(8, true, &b) - .Read(8, true, &c) - .Read(8, true, &d) - .Read(8, true, &e) - .Read(8, true, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffffffffffffLL, b); - EXPECT_EQ(-0x7fffffffffffffffLL - 1, c); - EXPECT_EQ(-1, d); - EXPECT_EQ((int64_t) 0x9320d5e9d2d5879cULL, e); - EXPECT_EQ(0x4e4249d27f8414a4LL, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(8, true, &g)); -} - -TEST(BigEndian, Unsigned1) { - uint8_t data[] = { 0x00, 0x7f, 0x80, 0xff }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - cursor.set_big_endian(true); - int32_t a, b, c, d, e; - ASSERT_TRUE(cursor - .Read(1, false, &a) - .Read(1, false, &b) - .Read(1, false, &c) - .Read(1, false, &d)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7f, b); - EXPECT_EQ(0x80, c); - EXPECT_EQ(0xff, d); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(1, false, &e)); -} - -TEST(BigEndian, Unsigned2) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x80, 0x7f, 0xff, - 0x80, 0x00, 0x80, 0x80, 0xff, 0xff, - 0x39, 0xf1, 0x8a, 0xbc, 0x5a, 0xec }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, true); - int64_t a, b, c, d, e, f, g, h, i, j; - ASSERT_TRUE(cursor - .Read(2, false, &a) - .Read(2, false, &b) - .Read(2, false, &c) - .Read(2, false, &d) - .Read(2, false, &e) - .Read(2, false, &f) - .Read(2, false, &g) - .Read(2, false, &h) - .Read(2, false, &i)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x80, b); - EXPECT_EQ(0x7fff, c); - EXPECT_EQ(0x8000, d); - EXPECT_EQ(0x8080, e); - EXPECT_EQ(0xffff, f); - EXPECT_EQ(0x39f1, g); - EXPECT_EQ(0x8abc, h); - EXPECT_EQ(0x5aec, i); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(2, false, &j)); -} - -TEST(BigEndian, Unsigned4) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, - 0xb6, 0xb1, 0xff, 0xef, - 0x19, 0x6a, 0xca, 0x46 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - cursor.set_big_endian(true); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(4, false, &a) - .Read(4, false, &b) - .Read(4, false, &c) - .Read(4, false, &d) - .Read(4, false, &e) - .Read(4, false, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffff, b); - EXPECT_EQ(0x80000000, c); - EXPECT_EQ(0xffffffff, d); - EXPECT_EQ(0xb6b1ffef, e); - EXPECT_EQ(0x196aca46, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(4, false, &g)); -} - -TEST(BigEndian, Unsigned8) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x93, 0x20, 0xd5, 0xe9, 0xd2, 0xd5, 0x87, 0x9c, - 0x4e, 0x42, 0x49, 0xd2, 0x7f, 0x84, 0x14, 0xa4 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, true); - uint64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(8, false, &a) - .Read(8, false, &b) - .Read(8, false, &c) - .Read(8, false, &d) - .Read(8, false, &e) - .Read(8, false, &f)); - EXPECT_EQ(0U, a); - EXPECT_EQ(0x7fffffffffffffffULL, b); - EXPECT_EQ(0x8000000000000000ULL, c); - EXPECT_EQ(0xffffffffffffffffULL, d); - EXPECT_EQ(0x9320d5e9d2d5879cULL, e); - EXPECT_EQ(0x4e4249d27f8414a4ULL, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(8, false, &g)); -} - -TEST(LittleEndian, Signed1) { - uint8_t data[] = { 0x00, 0x7f, 0x80, 0xff }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int32_t a, b, c, d, e; - ASSERT_TRUE(cursor - .Read(1, true, &a) - .Read(1, true, &b) - .Read(1, true, &c) - .Read(1, true, &d)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7f, b); - EXPECT_EQ(-0x80, c); - EXPECT_EQ(-1, d); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(1, true, &e)); -} - -TEST(LittleEndian, Signed2) { - uint8_t data[] = { 0x00, 0x00, 0x80, 0x00, 0xff, 0x7f, - 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, - 0xf1, 0x39, 0xbc, 0x8a, 0xec, 0x5a }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, false); - int32_t a, b, c, d, e, f, g, h, i, j; - ASSERT_TRUE(cursor - .Read(2, true, &a) - .Read(2, true, &b) - .Read(2, true, &c) - .Read(2, true, &d) - .Read(2, true, &e) - .Read(2, true, &f) - .Read(2, true, &g) - .Read(2, true, &h) - .Read(2, true, &i)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x80, b); - EXPECT_EQ(0x7fff, c); - EXPECT_EQ(-0x8000, d); - EXPECT_EQ(-0x7f80, e); - EXPECT_EQ(-1, f); - EXPECT_EQ(0x39f1, g); - EXPECT_EQ(-0x7544, h); - EXPECT_EQ(0x5aec, i); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(2, true, &j)); -} - -TEST(LittleEndian, Signed4) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x7f, - 0x00, 0x00, 0x00, 0x80, - 0xff, 0xff, 0xff, 0xff, - 0xef, 0xff, 0xb1, 0xb6, - 0x46, 0xca, 0x6a, 0x19 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(4, true, &a) - .Read(4, true, &b) - .Read(4, true, &c) - .Read(4, true, &d) - .Read(4, true, &e) - .Read(4, true, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffff, b); - EXPECT_EQ(-0x80000000LL, c); - EXPECT_EQ(-1, d); - EXPECT_EQ((int32_t) 0xb6b1ffef, e); - EXPECT_EQ(0x196aca46, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(4, true, &g)); -} - -TEST(LittleEndian, Signed8) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x9c, 0x87, 0xd5, 0xd2, 0xe9, 0xd5, 0x20, 0x93, - 0xa4, 0x14, 0x84, 0x7f, 0xd2, 0x49, 0x42, 0x4e }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer, false); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(8, true, &a) - .Read(8, true, &b) - .Read(8, true, &c) - .Read(8, true, &d) - .Read(8, true, &e) - .Read(8, true, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffffffffffffLL, b); - EXPECT_EQ(-0x7fffffffffffffffLL - 1, c); - EXPECT_EQ(-1, d); - EXPECT_EQ((int64_t) 0x9320d5e9d2d5879cULL, e); - EXPECT_EQ(0x4e4249d27f8414a4LL, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(8, true, &g)); -} - -TEST(LittleEndian, Unsigned1) { - uint8_t data[] = { 0x00, 0x7f, 0x80, 0xff }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int32_t a, b, c, d, e; - ASSERT_TRUE(cursor - .Read(1, false, &a) - .Read(1, false, &b) - .Read(1, false, &c) - .Read(1, false, &d)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7f, b); - EXPECT_EQ(0x80, c); - EXPECT_EQ(0xff, d); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(1, false, &e)); -} - -TEST(LittleEndian, Unsigned2) { - uint8_t data[] = { 0x00, 0x00, 0x80, 0x00, 0xff, 0x7f, - 0x00, 0x80, 0x80, 0x80, 0xff, 0xff, - 0xf1, 0x39, 0xbc, 0x8a, 0xec, 0x5a }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int32_t a, b, c, d, e, f, g, h, i, j; - ASSERT_TRUE(cursor - .Read(2, false, &a) - .Read(2, false, &b) - .Read(2, false, &c) - .Read(2, false, &d) - .Read(2, false, &e) - .Read(2, false, &f) - .Read(2, false, &g) - .Read(2, false, &h) - .Read(2, false, &i)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x80, b); - EXPECT_EQ(0x7fff, c); - EXPECT_EQ(0x8000, d); - EXPECT_EQ(0x8080, e); - EXPECT_EQ(0xffff, f); - EXPECT_EQ(0x39f1, g); - EXPECT_EQ(0x8abc, h); - EXPECT_EQ(0x5aec, i); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(2, false, &j)); -} - -TEST(LittleEndian, Unsigned4) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x7f, - 0x00, 0x00, 0x00, 0x80, - 0xff, 0xff, 0xff, 0xff, - 0xef, 0xff, 0xb1, 0xb6, - 0x46, 0xca, 0x6a, 0x19 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(4, false, &a) - .Read(4, false, &b) - .Read(4, false, &c) - .Read(4, false, &d) - .Read(4, false, &e) - .Read(4, false, &f)); - EXPECT_EQ(0, a); - EXPECT_EQ(0x7fffffff, b); - EXPECT_EQ(0x80000000, c); - EXPECT_EQ(0xffffffff, d); - EXPECT_EQ(0xb6b1ffef, e); - EXPECT_EQ(0x196aca46, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(4, false, &g)); -} - -TEST(LittleEndian, Unsigned8) { - uint8_t data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x9c, 0x87, 0xd5, 0xd2, 0xe9, 0xd5, 0x20, 0x93, - 0xa4, 0x14, 0x84, 0x7f, 0xd2, 0x49, 0x42, 0x4e }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - uint64_t a, b, c, d, e, f, g; - ASSERT_TRUE(cursor - .Read(8, false, &a) - .Read(8, false, &b) - .Read(8, false, &c) - .Read(8, false, &d) - .Read(8, false, &e) - .Read(8, false, &f)); - EXPECT_EQ(0U, a); - EXPECT_EQ(0x7fffffffffffffffULL, b); - EXPECT_EQ(0x8000000000000000ULL, c); - EXPECT_EQ(0xffffffffffffffffULL, d); - EXPECT_EQ(0x9320d5e9d2d5879cULL, e); - EXPECT_EQ(0x4e4249d27f8414a4ULL, f); - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor.Read(8, false, &g)); -} - -TEST(Extractor, Signed1) { - uint8_t data[] = { 0xfd }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int8_t a; - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(-3, a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Signed2) { - uint8_t data[] = { 0x13, 0xcd }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int16_t a; - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(-13037, a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Signed4) { - uint8_t data[] = { 0xd2, 0xe4, 0x53, 0xe9 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - int32_t a; - // For some reason, G++ 4.4.1 complains: - // warning: array subscript is above array bounds - // in ByteCursor::Read(size_t, bool, T *) as it inlines this call, but - // I'm not able to see how such a reference would occur. - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(-380377902, a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Unsigned1) { - uint8_t data[] = { 0xfd }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - uint8_t a; - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(0xfd, a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Unsigned2) { - uint8_t data[] = { 0x13, 0xcd }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - uint16_t a; - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(0xcd13, a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Unsigned4) { - uint8_t data[] = { 0xd2, 0xe4, 0x53, 0xe9 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - uint32_t a; - // For some reason, G++ 4.4.1 complains: - // warning: array subscript is above array bounds - // in ByteCursor::Read(size_t, bool, T *) as it inlines this call, but - // I'm not able to see how such a reference would occur. - EXPECT_TRUE(cursor >> a); - EXPECT_EQ(0xe953e4d2, a); - EXPECT_FALSE(cursor >> a); - EXPECT_FALSE(cursor >> a); -} - -TEST(Extractor, Mixed) { - uint8_t data[] = { 0x42, - 0x25, 0x0b, - 0x3d, 0x25, 0xed, 0x2a, - 0xec, 0x16, 0x9e, 0x14, 0x61, 0x5b, 0x2c, 0xcf, - 0xd8, - 0x22, 0xa5, - 0x3a, 0x02, 0x6a, 0xd7, - 0x93, 0x2a, 0x2d, 0x8d, 0xb4, 0x95, 0xe0, 0xc6 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - cursor.set_big_endian(true); - - uint8_t a; - uint16_t b; - uint32_t c; - uint64_t d; - int8_t e; - int16_t f; - int32_t g; - int64_t h; - int z; - EXPECT_FALSE(cursor.AtEnd()); - EXPECT_TRUE(cursor >> a >> b >> c >> d >> e >> f >> g >> h); - EXPECT_EQ(0x42U, a); - EXPECT_EQ(0x250bU, b); - EXPECT_EQ(0x3d25ed2aU, c); - EXPECT_EQ(0xec169e14615b2ccfULL, d); - EXPECT_EQ(-40, e); - EXPECT_EQ(0x22a5, f); - EXPECT_EQ(0x3a026ad7, g); - EXPECT_EQ(-7842405714468937530LL, h); - - EXPECT_TRUE(cursor.AtEnd()); - EXPECT_FALSE(cursor >> z); -} - -TEST(Strings, Zero) { - uint8_t data[] = { 0xa6 }; - ByteBuffer buffer(data, 0); - ByteCursor cursor(&buffer); - - uint8_t received[1]; - received[0] = 0xc2; - EXPECT_TRUE(cursor.Read(received, 0)); - EXPECT_EQ(0xc2U, received[0]); -} - -TEST(Strings, Some) { - uint8_t data[] = { 0x5d, 0x31, 0x09, 0xa6, 0x2e, 0x2c, 0x83, 0xbb }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - - uint8_t received[7] = { 0xa7, 0xf7, 0x43, 0x0c, 0x27, 0xea, 0xed }; - EXPECT_TRUE(cursor.Skip(2).Read(received, 5)); - uint8_t expected[7] = { 0x09, 0xa6, 0x2e, 0x2c, 0x83, 0xea, 0xed }; - EXPECT_TRUE(memcmp(received, expected, 7) == 0); -} - -TEST(Strings, TooMuch) { - uint8_t data[] = { 0x5d, 0x31, 0x09, 0xa6, 0x2e, 0x2c, 0x83, 0xbb }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - - uint8_t received1[3]; - uint8_t received2[3]; - uint8_t received3[3]; - EXPECT_FALSE(cursor - .Read(received1, 3) - .Read(received2, 3) - .Read(received3, 3)); - uint8_t expected1[3] = { 0x5d, 0x31, 0x09 }; - uint8_t expected2[3] = { 0xa6, 0x2e, 0x2c }; - - EXPECT_TRUE(memcmp(received1, expected1, 3) == 0); - EXPECT_TRUE(memcmp(received2, expected2, 3) == 0); -} - -TEST(Strings, PointTo) { - uint8_t data[] = { 0x83, 0x80, 0xb4, 0x38, 0x00, 0x2c, 0x0a, 0x27 }; - ByteBuffer buffer(data, sizeof(data)); - ByteCursor cursor(&buffer); - - const uint8_t *received1; - const uint8_t *received2; - const uint8_t *received3; - const uint8_t *received4; - EXPECT_FALSE(cursor - .PointTo(&received1, 3) - .PointTo(&received2, 3) - .PointTo(&received3) - .PointTo(&received4, 3)); - EXPECT_EQ(data + 0, received1); - EXPECT_EQ(data + 3, received2); - EXPECT_EQ(data + 6, received3); - EXPECT_EQ(NULL, received4); -} - -TEST(Strings, CString) { - uint8_t data[] = "abc\0\0foo"; - ByteBuffer buffer(data, sizeof(data) - 1); // don't include terminating '\0' - ByteCursor cursor(&buffer); - - string a, b, c; - EXPECT_TRUE(cursor.CString(&a).CString(&b)); - EXPECT_EQ("abc", a); - EXPECT_EQ("", b); - EXPECT_FALSE(cursor.CString(&c)); - EXPECT_EQ("", c); - EXPECT_TRUE(cursor.AtEnd()); -} - -TEST(Strings, CStringLimit) { - uint8_t data[] = "abcdef\0\0foobar"; - ByteBuffer buffer(data, sizeof(data) - 1); // don't include terminating '\0' - ByteCursor cursor(&buffer); - - string a, b, c, d, e; - - EXPECT_TRUE(cursor.CString(&a, 3)); - EXPECT_EQ("abc", a); - - EXPECT_TRUE(cursor.CString(&b, 0)); - EXPECT_EQ("", b); - - EXPECT_TRUE(cursor.CString(&c, 6)); - EXPECT_EQ("def", c); - - EXPECT_TRUE(cursor.CString(&d, 4)); - EXPECT_EQ("ooba", d); - - EXPECT_FALSE(cursor.CString(&e, 4)); - EXPECT_EQ("", e); - - EXPECT_TRUE(cursor.AtEnd()); -} - -// uint8_t data[] = { 0xa6, 0x54, 0xdf, 0x67, 0x51, 0x43, 0xac, 0xf1 }; -// ByteBuffer buffer(data, sizeof(data)); diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.c b/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.c deleted file mode 100644 index 80178d35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.c +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Copyright 2001-2004 Unicode, Inc. - * - * Disclaimer - * - * This source code is provided as is by Unicode, Inc. No claims are - * made as to fitness for any particular purpose. No warranties of any - * kind are expressed or implied. The recipient agrees to determine - * applicability of information provided. If this file has been - * purchased on magnetic or optical media from Unicode, Inc., the - * sole remedy for any claim will be exchange of defective media - * within 90 days of receipt. - * - * Limitations on Rights to Redistribute This Code - * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form - * for internal or external distribution as long as this notice - * remains attached. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Source code file. -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Sept 2001: fixed const & error conditions per -mods suggested by S. Parent & A. Lillich. -June 2002: Tim Dodd added detection and handling of incomplete -source sequences, enhanced error detection, added casts -to eliminate compiler warnings. -July 2003: slight mods to back out aggressive FFFE detection. -Jan 2004: updated switches in from-UTF8 conversions. -Oct 2004: updated to use UNI_MAX_LEGAL_UTF32 in UTF-32 conversions. - -See the header file "ConvertUTF.h" for complete documentation. - ------------------------------------------------------------------------- */ - - -#include "convert_UTF.h" -#ifdef CVTUTF_DEBUG -#include -#endif - -static const int halfShift = 10; /* used for shifting by 10 bits */ - -static const UTF32 halfBase = 0x0010000UL; -static const UTF32 halfMask = 0x3FFUL; - -#define UNI_SUR_HIGH_START (UTF32)0xD800 -#define UNI_SUR_HIGH_END (UTF32)0xDBFF -#define UNI_SUR_LOW_START (UTF32)0xDC00 -#define UNI_SUR_LOW_END (UTF32)0xDFFF -#define false 0 -#define true 1 - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - if (target >= targetEnd) { - result = targetExhausted; break; - } - ch = *source++; - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32; 0xffff or 0xfffe are both reserved values */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_LEGAL_UTF32) { - if (flags == strictConversion) { - result = sourceIllegal; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - --source; /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF32* target = *targetStart; - UTF32 ch, ch2; - while (source < sourceEnd) { - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - if (target >= targetEnd) { - source = oldSource; /* Back up source pointer! */ - result = targetExhausted; break; - } - *target++ = ch; - } - *sourceStart = source; - *targetStart = target; -#ifdef CVTUTF_DEBUG - if (result == sourceIllegal) { - fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2); - fflush(stderr); - } -#endif - return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Index into the table below with the first byte of a UTF-8 sequence to - * get the number of trailing bytes that are supposed to follow it. - * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is - * left as-is for anyone who may want to do such conversion, which was - * allowed in earlier algorithms. - */ -static const char trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -/* - * Magic values subtracted from a buffer value during UTF8 conversion. - * This table contains as many values as there might be trailing bytes - * in a UTF-8 sequence. - */ -static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, - 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; - -/* - * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed - * into the first byte, depending on how many bytes follow. There are - * as many entries in this table as there are UTF-8 sequence types. - * (I.e., one byte sequence, two byte... etc.). Remember that sequencs - * for *legal* UTF-8 will be 4 or fewer bytes total. - */ -static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - -/* --------------------------------------------------------------------- */ - -/* The interface converts a whole buffer to avoid function-call overhead. -* Constants have been gathered. Loops & conditionals have been removed as -* much as possible for efficiency, in favor of drop-through switches. -* (See "Note A" at the bottom of the file for equivalent code.) -* If your compiler supports it, the "isLegalUTF8" call can be turned -* into an inline function. -*/ - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - UTF32 ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* Figure out how many bytes the result will require */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - } - - target += bytesToWrite; - if (target > targetEnd) { - source = oldSource; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Utility routine to tell whether a sequence of bytes is legal UTF-8. - * This must be called with the length pre-determined by the first byte. - * If not calling this from ConvertUTF8to*, then the length can be set by: - * length = trailingBytesForUTF8[*source]+1; - * and the sequence is illegal right away if there aren't that many bytes - * available. - * If presented with a length > 4, this returns false. The Unicode - * definition of UTF-8 goes up to 4-byte sequences. - */ - -static Boolean isLegalUTF8(const UTF8 *source, int length) { - UTF8 a; - const UTF8 *srcptr = source+length; - switch (length) { - default: return false; - /* Everything else falls through when "true"... */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 2: if ((a = (*--srcptr)) > 0xBF) return false; - - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return false; break; - case 0xED: if (a > 0x9F) return false; break; - case 0xF0: if (a < 0x90) return false; break; - case 0xF4: if (a > 0x8F) return false; break; - default: if (a < 0x80) return false; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return false; - } - if (*source > 0xF4) return false; - return true; -} - -/* --------------------------------------------------------------------- */ - -/* - * Exported function to return whether a UTF-8 sequence is legal or not. - * This is not used here; it's just exported. - */ -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { - int length = trailingBytesForUTF8[*source]+1; - if (source+length > sourceEnd) { - return false; - } - return isLegalUTF8(source, length); -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_UTF16) { - if (flags == strictConversion) { - result = sourceIllegal; - source -= (extraBytesToRead+1); /* return to the start */ - break; /* Bail out; shouldn't continue */ - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - ch = *source++; - if (flags == strictConversion ) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* - * Figure out how many bytes the result will require. Turn any - * illegally large UTF32 things (> Plane 17) into replacement chars. - */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - result = sourceIllegal; - } - - target += bytesToWrite; - if (target > targetEnd) { - --source; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF32* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; - case 4: ch += *source++; ch <<= 6; - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up the source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_LEGAL_UTF32) { - /* - * UTF-16 surrogate values are illegal in UTF-32, and anything - * over Plane 17 (> 0x10FFFF) is illegal. - */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = ch; - } - } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */ - result = sourceIllegal; - *target++ = UNI_REPLACEMENT_CHAR; - } - } - *sourceStart = source; - *targetStart = target; - return result; -} - -/* --------------------------------------------------------------------- - -Note A. -The fall-through switches in UTF-8 reading code save a -temp variable, some decrements & conditionals. The switches -are equivalent to the following loop: -{ - int tmpBytesToRead = extraBytesToRead+1; - do { - ch += *source++; - --tmpBytesToRead; - if (tmpBytesToRead) ch <<= 6; - } while (tmpBytesToRead > 0); -} -In UTF-8 writing code, the switches on "bytesToWrite" are -similarly unrolled loops. - ---------------------------------------------------------------------- */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.h deleted file mode 100644 index b1556de8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/convert_UTF.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2001-2004 Unicode, Inc. - * - * Disclaimer - * - * This source code is provided as is by Unicode, Inc. No claims are - * made as to fitness for any particular purpose. No warranties of any - * kind are expressed or implied. The recipient agrees to determine - * applicability of information provided. If this file has been - * purchased on magnetic or optical media from Unicode, Inc., the - * sole remedy for any claim will be exchange of defective media - * within 90 days of receipt. - * - * Limitations on Rights to Redistribute This Code - * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form - * for internal or external distribution as long as this notice - * remains attached. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Header file. - -Several funtions are included here, forming a complete set of -conversions between the three formats. UTF-7 is not included -here, but is handled in a separate source file. - -Each of these routines takes pointers to input buffers and output -buffers. The input buffers are const. - -Each routine converts the text between *sourceStart and sourceEnd, -putting the result into the buffer between *targetStart and -targetEnd. Note: the end pointers are *after* the last item: e.g. -*(sourceEnd - 1) is the last item. - -The return result indicates whether the conversion was successful, -and if not, whether the problem was in the source or target buffers. -(Only the first encountered problem is indicated.) - -After the conversion, *sourceStart and *targetStart are both -updated to point to the end of last text successfully converted in -the respective buffers. - -Input parameters: -sourceStart - pointer to a pointer to the source buffer. -The contents of this are modified on return so that -it points at the next thing to be converted. -targetStart - similarly, pointer to pointer to the target buffer. -sourceEnd, targetEnd - respectively pointers to the ends of the -two buffers, for overflow checking only. - -These conversion functions take a ConversionFlags argument. When this -flag is set to strict, both irregular sequences and isolated surrogates -will cause an error. When the flag is set to lenient, both irregular -sequences and isolated surrogates are converted. - -Whether the flag is strict or lenient, all illegal sequences will cause -an error return. This includes sequences such as: , , -or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code -must check for illegal sequences. - -When the flag is set to lenient, characters over 0x10FFFF are converted -to the replacement character; otherwise (when the flag is set to strict) -they constitute an error. - -Output parameters: -The value "sourceIllegal" is returned from some routines if the input -sequence is malformed. When "sourceIllegal" is returned, the source -value will point to the illegal value that caused the problem. E.g., -in UTF-8 when a sequence is malformed, it points to the start of the -malformed sequence. - -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Fixes & updates, Sept 2001. - ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------- -The following 4 definitions are compiler-specific. -The C standard does not guarantee that wchar_t has at least -16 bits, so wchar_t is no less portable than unsigned short! -All should be unsigned values to avoid sign extension during -bit mask & shift operations. ------------------------------------------------------------------------- */ - -typedef unsigned long UTF32; /* at least 32 bits */ -typedef unsigned short UTF16; /* at least 16 bits */ -typedef unsigned char UTF8; /* typically 8 bits */ -typedef unsigned char Boolean; /* 0 or 1 */ - -/* Some fundamental constants */ -#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD -#define UNI_MAX_BMP (UTF32)0x0000FFFF -#define UNI_MAX_UTF16 (UTF32)0x0010FFFF -#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF -#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF - -typedef enum { - conversionOK, /* conversion successful */ - sourceExhausted, /* partial character in source, but hit end */ - targetExhausted, /* insuff. room in target for conversion */ - sourceIllegal /* source sequence is illegal/malformed */ -} ConversionResult; - -typedef enum { - strictConversion = 0, - lenientConversion -} ConversionFlags; - -/* This is for C++ and does no harm in C */ -#ifdef __cplusplus -extern "C" { -#endif - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); - -#ifdef __cplusplus -} -#endif - -/* --------------------------------------------------------------------- */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader-inl.h deleted file mode 100644 index 3c167089..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader-inl.h +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef UTIL_DEBUGINFO_BYTEREADER_INL_H__ -#define UTIL_DEBUGINFO_BYTEREADER_INL_H__ - -#include "common/dwarf/bytereader.h" - -#include - -namespace dwarf2reader { - -inline uint8 ByteReader::ReadOneByte(const char* buffer) const { - return buffer[0]; -} - -inline uint16 ByteReader::ReadTwoBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast(signed_buffer); - const uint16 buffer0 = buffer[0]; - const uint16 buffer1 = buffer[1]; - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8; - } else { - return buffer1 | buffer0 << 8; - } -} - -inline uint64 ByteReader::ReadFourBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast(signed_buffer); - const uint32 buffer0 = buffer[0]; - const uint32 buffer1 = buffer[1]; - const uint32 buffer2 = buffer[2]; - const uint32 buffer3 = buffer[3]; - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8 | buffer2 << 16 | buffer3 << 24; - } else { - return buffer3 | buffer2 << 8 | buffer1 << 16 | buffer0 << 24; - } -} - -inline uint64 ByteReader::ReadEightBytes(const char* signed_buffer) const { - const unsigned char *buffer - = reinterpret_cast(signed_buffer); - const uint64 buffer0 = buffer[0]; - const uint64 buffer1 = buffer[1]; - const uint64 buffer2 = buffer[2]; - const uint64 buffer3 = buffer[3]; - const uint64 buffer4 = buffer[4]; - const uint64 buffer5 = buffer[5]; - const uint64 buffer6 = buffer[6]; - const uint64 buffer7 = buffer[7]; - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8 | buffer2 << 16 | buffer3 << 24 | - buffer4 << 32 | buffer5 << 40 | buffer6 << 48 | buffer7 << 56; - } else { - return buffer7 | buffer6 << 8 | buffer5 << 16 | buffer4 << 24 | - buffer3 << 32 | buffer2 << 40 | buffer1 << 48 | buffer0 << 56; - } -} - -// Read an unsigned LEB128 number. Each byte contains 7 bits of -// information, plus one bit saying whether the number continues or -// not. - -inline uint64 ByteReader::ReadUnsignedLEB128(const char* buffer, - size_t* len) const { - uint64 result = 0; - size_t num_read = 0; - unsigned int shift = 0; - unsigned char byte; - - do { - byte = *buffer++; - num_read++; - - result |= (static_cast(byte & 0x7f)) << shift; - - shift += 7; - - } while (byte & 0x80); - - *len = num_read; - - return result; -} - -// Read a signed LEB128 number. These are like regular LEB128 -// numbers, except the last byte may have a sign bit set. - -inline int64 ByteReader::ReadSignedLEB128(const char* buffer, - size_t* len) const { - int64 result = 0; - unsigned int shift = 0; - size_t num_read = 0; - unsigned char byte; - - do { - byte = *buffer++; - num_read++; - result |= (static_cast(byte & 0x7f) << shift); - shift += 7; - } while (byte & 0x80); - - if ((shift < 8 * sizeof (result)) && (byte & 0x40)) - result |= -((static_cast(1)) << shift); - *len = num_read; - return result; -} - -inline uint64 ByteReader::ReadOffset(const char* buffer) const { - assert(this->offset_reader_); - return (this->*offset_reader_)(buffer); -} - -inline uint64 ByteReader::ReadAddress(const char* buffer) const { - assert(this->address_reader_); - return (this->*address_reader_)(buffer); -} - -inline void ByteReader::SetCFIDataBase(uint64 section_base, - const char *buffer_base) { - section_base_ = section_base; - buffer_base_ = buffer_base; - have_section_base_ = true; -} - -inline void ByteReader::SetTextBase(uint64 text_base) { - text_base_ = text_base; - have_text_base_ = true; -} - -inline void ByteReader::SetDataBase(uint64 data_base) { - data_base_ = data_base; - have_data_base_ = true; -} - -inline void ByteReader::SetFunctionBase(uint64 function_base) { - function_base_ = function_base; - have_function_base_ = true; -} - -inline void ByteReader::ClearFunctionBase() { - have_function_base_ = false; -} - -} // namespace dwarf2reader - -#endif // UTIL_DEBUGINFO_BYTEREADER_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.cc deleted file mode 100644 index 68020264..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.cc +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/bytereader.h" - -namespace dwarf2reader { - -ByteReader::ByteReader(enum Endianness endian) - :offset_reader_(NULL), address_reader_(NULL), endian_(endian), - address_size_(0), offset_size_(0), - have_section_base_(), have_text_base_(), have_data_base_(), - have_function_base_() { } - -ByteReader::~ByteReader() { } - -void ByteReader::SetOffsetSize(uint8 size) { - offset_size_ = size; - assert(size == 4 || size == 8); - if (size == 4) { - this->offset_reader_ = &ByteReader::ReadFourBytes; - } else { - this->offset_reader_ = &ByteReader::ReadEightBytes; - } -} - -void ByteReader::SetAddressSize(uint8 size) { - address_size_ = size; - assert(size == 4 || size == 8); - if (size == 4) { - this->address_reader_ = &ByteReader::ReadFourBytes; - } else { - this->address_reader_ = &ByteReader::ReadEightBytes; - } -} - -uint64 ByteReader::ReadInitialLength(const char* start, size_t* len) { - const uint64 initial_length = ReadFourBytes(start); - start += 4; - - // In DWARF2/3, if the initial length is all 1 bits, then the offset - // size is 8 and we need to read the next 8 bytes for the real length. - if (initial_length == 0xffffffff) { - SetOffsetSize(8); - *len = 12; - return ReadOffset(start); - } else { - SetOffsetSize(4); - *len = 4; - } - return initial_length; -} - -bool ByteReader::ValidEncoding(DwarfPointerEncoding encoding) const { - if (encoding == DW_EH_PE_omit) return true; - if (encoding == DW_EH_PE_aligned) return true; - if ((encoding & 0x7) > DW_EH_PE_udata8) - return false; - if ((encoding & 0x70) > DW_EH_PE_funcrel) - return false; - return true; -} - -bool ByteReader::UsableEncoding(DwarfPointerEncoding encoding) const { - switch (encoding & 0x70) { - case DW_EH_PE_absptr: return true; - case DW_EH_PE_pcrel: return have_section_base_; - case DW_EH_PE_textrel: return have_text_base_; - case DW_EH_PE_datarel: return have_data_base_; - case DW_EH_PE_funcrel: return have_function_base_; - default: return false; - } -} - -uint64 ByteReader::ReadEncodedPointer(const char *buffer, - DwarfPointerEncoding encoding, - size_t *len) const { - // UsableEncoding doesn't approve of DW_EH_PE_omit, so we shouldn't - // see it here. - assert(encoding != DW_EH_PE_omit); - - // The Linux Standards Base 4.0 does not make this clear, but the - // GNU tools (gcc/unwind-pe.h; readelf/dwarf.c; gdb/dwarf2-frame.c) - // agree that aligned pointers are always absolute, machine-sized, - // machine-signed pointers. - if (encoding == DW_EH_PE_aligned) { - assert(have_section_base_); - - // We don't need to align BUFFER in *our* address space. Rather, we - // need to find the next position in our buffer that would be aligned - // when the .eh_frame section the buffer contains is loaded into the - // program's memory. So align assuming that buffer_base_ gets loaded at - // address section_base_, where section_base_ itself may or may not be - // aligned. - - // First, find the offset to START from the closest prior aligned - // address. - uint64 skew = section_base_ & (AddressSize() - 1); - // Now find the offset from that aligned address to buffer. - uint64 offset = skew + (buffer - buffer_base_); - // Round up to the next boundary. - uint64 aligned = (offset + AddressSize() - 1) & -AddressSize(); - // Convert back to a pointer. - const char *aligned_buffer = buffer_base_ + (aligned - skew); - // Finally, store the length and actually fetch the pointer. - *len = aligned_buffer - buffer + AddressSize(); - return ReadAddress(aligned_buffer); - } - - // Extract the value first, ignoring whether it's a pointer or an - // offset relative to some base. - uint64 offset; - switch (encoding & 0x0f) { - case DW_EH_PE_absptr: - // DW_EH_PE_absptr is weird, as it is used as a meaningful value for - // both the high and low nybble of encoding bytes. When it appears in - // the high nybble, it means that the pointer is absolute, not an - // offset from some base address. When it appears in the low nybble, - // as here, it means that the pointer is stored as a normal - // machine-sized and machine-signed address. A low nybble of - // DW_EH_PE_absptr does not imply that the pointer is absolute; it is - // correct for us to treat the value as an offset from a base address - // if the upper nybble is not DW_EH_PE_absptr. - offset = ReadAddress(buffer); - *len = AddressSize(); - break; - - case DW_EH_PE_uleb128: - offset = ReadUnsignedLEB128(buffer, len); - break; - - case DW_EH_PE_udata2: - offset = ReadTwoBytes(buffer); - *len = 2; - break; - - case DW_EH_PE_udata4: - offset = ReadFourBytes(buffer); - *len = 4; - break; - - case DW_EH_PE_udata8: - offset = ReadEightBytes(buffer); - *len = 8; - break; - - case DW_EH_PE_sleb128: - offset = ReadSignedLEB128(buffer, len); - break; - - case DW_EH_PE_sdata2: - offset = ReadTwoBytes(buffer); - // Sign-extend from 16 bits. - offset = (offset ^ 0x8000) - 0x8000; - *len = 2; - break; - - case DW_EH_PE_sdata4: - offset = ReadFourBytes(buffer); - // Sign-extend from 32 bits. - offset = (offset ^ 0x80000000ULL) - 0x80000000ULL; - *len = 4; - break; - - case DW_EH_PE_sdata8: - // No need to sign-extend; this is the full width of our type. - offset = ReadEightBytes(buffer); - *len = 8; - break; - - default: - abort(); - } - - // Find the appropriate base address. - uint64 base; - switch (encoding & 0x70) { - case DW_EH_PE_absptr: - base = 0; - break; - - case DW_EH_PE_pcrel: - assert(have_section_base_); - base = section_base_ + (buffer - buffer_base_); - break; - - case DW_EH_PE_textrel: - assert(have_text_base_); - base = text_base_; - break; - - case DW_EH_PE_datarel: - assert(have_data_base_); - base = data_base_; - break; - - case DW_EH_PE_funcrel: - assert(have_function_base_); - base = function_base_; - break; - - default: - abort(); - } - - uint64 pointer = base + offset; - - // Remove inappropriate upper bits. - if (AddressSize() == 4) - pointer = pointer & 0xffffffff; - else - assert(AddressSize() == sizeof(uint64)); - - return pointer; -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.h deleted file mode 100644 index e3894273..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader.h +++ /dev/null @@ -1,310 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_DWARF_BYTEREADER_H__ -#define COMMON_DWARF_BYTEREADER_H__ - -#include -#include "common/dwarf/types.h" -#include "common/dwarf/dwarf2enums.h" - -namespace dwarf2reader { - -// We can't use the obvious name of LITTLE_ENDIAN and BIG_ENDIAN -// because it conflicts with a macro -enum Endianness { - ENDIANNESS_BIG, - ENDIANNESS_LITTLE -}; - -// A ByteReader knows how to read single- and multi-byte values of -// various endiannesses, sizes, and encodings, as used in DWARF -// debugging information and Linux C++ exception handling data. -class ByteReader { - public: - // Construct a ByteReader capable of reading one-, two-, four-, and - // eight-byte values according to ENDIANNESS, absolute machine-sized - // addresses, DWARF-style "initial length" values, signed and - // unsigned LEB128 numbers, and Linux C++ exception handling data's - // encoded pointers. - explicit ByteReader(enum Endianness endianness); - virtual ~ByteReader(); - - // Read a single byte from BUFFER and return it as an unsigned 8 bit - // number. - uint8 ReadOneByte(const char* buffer) const; - - // Read two bytes from BUFFER and return them as an unsigned 16 bit - // number, using this ByteReader's endianness. - uint16 ReadTwoBytes(const char* buffer) const; - - // Read four bytes from BUFFER and return them as an unsigned 32 bit - // number, using this ByteReader's endianness. This function returns - // a uint64 so that it is compatible with ReadAddress and - // ReadOffset. The number it returns will never be outside the range - // of an unsigned 32 bit integer. - uint64 ReadFourBytes(const char* buffer) const; - - // Read eight bytes from BUFFER and return them as an unsigned 64 - // bit number, using this ByteReader's endianness. - uint64 ReadEightBytes(const char* buffer) const; - - // Read an unsigned LEB128 (Little Endian Base 128) number from - // BUFFER and return it as an unsigned 64 bit integer. Set LEN to - // the number of bytes read. - // - // The unsigned LEB128 representation of an integer N is a variable - // number of bytes: - // - // - If N is between 0 and 0x7f, then its unsigned LEB128 - // representation is a single byte whose value is N. - // - // - Otherwise, its unsigned LEB128 representation is (N & 0x7f) | - // 0x80, followed by the unsigned LEB128 representation of N / - // 128, rounded towards negative infinity. - // - // In other words, we break VALUE into groups of seven bits, put - // them in little-endian order, and then write them as eight-bit - // bytes with the high bit on all but the last. - uint64 ReadUnsignedLEB128(const char* buffer, size_t* len) const; - - // Read a signed LEB128 number from BUFFER and return it as an - // signed 64 bit integer. Set LEN to the number of bytes read. - // - // The signed LEB128 representation of an integer N is a variable - // number of bytes: - // - // - If N is between -0x40 and 0x3f, then its signed LEB128 - // representation is a single byte whose value is N in two's - // complement. - // - // - Otherwise, its signed LEB128 representation is (N & 0x7f) | - // 0x80, followed by the signed LEB128 representation of N / 128, - // rounded towards negative infinity. - // - // In other words, we break VALUE into groups of seven bits, put - // them in little-endian order, and then write them as eight-bit - // bytes with the high bit on all but the last. - int64 ReadSignedLEB128(const char* buffer, size_t* len) const; - - // Indicate that addresses on this architecture are SIZE bytes long. SIZE - // must be either 4 or 8. (DWARF allows addresses to be any number of - // bytes in length from 1 to 255, but we only support 32- and 64-bit - // addresses at the moment.) You must call this before using the - // ReadAddress member function. - // - // For data in a .debug_info section, or something that .debug_info - // refers to like line number or macro data, the compilation unit - // header's address_size field indicates the address size to use. Call - // frame information doesn't indicate its address size (a shortcoming of - // the spec); you must supply the appropriate size based on the - // architecture of the target machine. - void SetAddressSize(uint8 size); - - // Return the current address size, in bytes. This is either 4, - // indicating 32-bit addresses, or 8, indicating 64-bit addresses. - uint8 AddressSize() const { return address_size_; } - - // Read an address from BUFFER and return it as an unsigned 64 bit - // integer, respecting this ByteReader's endianness and address size. You - // must call SetAddressSize before calling this function. - uint64 ReadAddress(const char* buffer) const; - - // DWARF actually defines two slightly different formats: 32-bit DWARF - // and 64-bit DWARF. This is *not* related to the size of registers or - // addresses on the target machine; it refers only to the size of section - // offsets and data lengths appearing in the DWARF data. One only needs - // 64-bit DWARF when the debugging data itself is larger than 4GiB. - // 32-bit DWARF can handle x86_64 or PPC64 code just fine, unless the - // debugging data itself is very large. - // - // DWARF information identifies itself as 32-bit or 64-bit DWARF: each - // compilation unit and call frame information entry begins with an - // "initial length" field, which, in addition to giving the length of the - // data, also indicates the size of section offsets and lengths appearing - // in that data. The ReadInitialLength member function, below, reads an - // initial length and sets the ByteReader's offset size as a side effect. - // Thus, in the normal process of reading DWARF data, the appropriate - // offset size is set automatically. So, you should only need to call - // SetOffsetSize if you are using the same ByteReader to jump from the - // midst of one block of DWARF data into another. - - // Read a DWARF "initial length" field from START, and return it as - // an unsigned 64 bit integer, respecting this ByteReader's - // endianness. Set *LEN to the length of the initial length in - // bytes, either four or twelve. As a side effect, set this - // ByteReader's offset size to either 4 (if we see a 32-bit DWARF - // initial length) or 8 (if we see a 64-bit DWARF initial length). - // - // A DWARF initial length is either: - // - // - a byte count stored as an unsigned 32-bit value less than - // 0xffffff00, indicating that the data whose length is being - // measured uses the 32-bit DWARF format, or - // - // - The 32-bit value 0xffffffff, followed by a 64-bit byte count, - // indicating that the data whose length is being measured uses - // the 64-bit DWARF format. - uint64 ReadInitialLength(const char* start, size_t* len); - - // Read an offset from BUFFER and return it as an unsigned 64 bit - // integer, respecting the ByteReader's endianness. In 32-bit DWARF, the - // offset is 4 bytes long; in 64-bit DWARF, the offset is eight bytes - // long. You must call ReadInitialLength or SetOffsetSize before calling - // this function; see the comments above for details. - uint64 ReadOffset(const char* buffer) const; - - // Return the current offset size, in bytes. - // A return value of 4 indicates that we are reading 32-bit DWARF. - // A return value of 8 indicates that we are reading 64-bit DWARF. - uint8 OffsetSize() const { return offset_size_; } - - // Indicate that section offsets and lengths are SIZE bytes long. SIZE - // must be either 4 (meaning 32-bit DWARF) or 8 (meaning 64-bit DWARF). - // Usually, you should not call this function yourself; instead, let a - // call to ReadInitialLength establish the data's offset size - // automatically. - void SetOffsetSize(uint8 size); - - // The Linux C++ ABI uses a variant of DWARF call frame information - // for exception handling. This data is included in the program's - // address space as the ".eh_frame" section, and intepreted at - // runtime to walk the stack, find exception handlers, and run - // cleanup code. The format is mostly the same as DWARF CFI, with - // some adjustments made to provide the additional - // exception-handling data, and to make the data easier to work with - // in memory --- for example, to allow it to be placed in read-only - // memory even when describing position-independent code. - // - // In particular, exception handling data can select a number of - // different encodings for pointers that appear in the data, as - // described by the DwarfPointerEncoding enum. There are actually - // four axes(!) to the encoding: - // - // - The pointer size: pointers can be 2, 4, or 8 bytes long, or use - // the DWARF LEB128 encoding. - // - // - The pointer's signedness: pointers can be signed or unsigned. - // - // - The pointer's base address: the data stored in the exception - // handling data can be the actual address (that is, an absolute - // pointer), or relative to one of a number of different base - // addreses --- including that of the encoded pointer itself, for - // a form of "pc-relative" addressing. - // - // - The pointer may be indirect: it may be the address where the - // true pointer is stored. (This is used to refer to things via - // global offset table entries, program linkage table entries, or - // other tricks used in position-independent code.) - // - // There are also two options that fall outside that matrix - // altogether: the pointer may be omitted, or it may have padding to - // align it on an appropriate address boundary. (That last option - // may seem like it should be just another axis, but it is not.) - - // Indicate that the exception handling data is loaded starting at - // SECTION_BASE, and that the start of its buffer in our own memory - // is BUFFER_BASE. This allows us to find the address that a given - // byte in our buffer would have when loaded into the program the - // data describes. We need this to resolve DW_EH_PE_pcrel pointers. - void SetCFIDataBase(uint64 section_base, const char *buffer_base); - - // Indicate that the base address of the program's ".text" section - // is TEXT_BASE. We need this to resolve DW_EH_PE_textrel pointers. - void SetTextBase(uint64 text_base); - - // Indicate that the base address for DW_EH_PE_datarel pointers is - // DATA_BASE. The proper value depends on the ABI; it is usually the - // address of the global offset table, held in a designated register in - // position-independent code. You will need to look at the startup code - // for the target system to be sure. I tried; my eyes bled. - void SetDataBase(uint64 data_base); - - // Indicate that the base address for the FDE we are processing is - // FUNCTION_BASE. This is the start address of DW_EH_PE_funcrel - // pointers. (This encoding does not seem to be used by the GNU - // toolchain.) - void SetFunctionBase(uint64 function_base); - - // Indicate that we are no longer processing any FDE, so any use of - // a DW_EH_PE_funcrel encoding is an error. - void ClearFunctionBase(); - - // Return true if ENCODING is a valid pointer encoding. - bool ValidEncoding(DwarfPointerEncoding encoding) const; - - // Return true if we have all the information we need to read a - // pointer that uses ENCODING. This checks that the appropriate - // SetFooBase function for ENCODING has been called. - bool UsableEncoding(DwarfPointerEncoding encoding) const; - - // Read an encoded pointer from BUFFER using ENCODING; return the - // absolute address it represents, and set *LEN to the pointer's - // length in bytes, including any padding for aligned pointers. - // - // This function calls 'abort' if ENCODING is invalid or refers to a - // base address this reader hasn't been given, so you should check - // with ValidEncoding and UsableEncoding first if you would rather - // die in a more helpful way. - uint64 ReadEncodedPointer(const char *buffer, DwarfPointerEncoding encoding, - size_t *len) const; - - private: - - // Function pointer type for our address and offset readers. - typedef uint64 (ByteReader::*AddressReader)(const char*) const; - - // Read an offset from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 define offsets as either 4 or 8 bytes, - // generally depending on the amount of DWARF2/3 info present. - // This function pointer gets set by SetOffsetSize. - AddressReader offset_reader_; - - // Read an address from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 allow addresses to be any size from 0-255 - // bytes currently. Internally we support 4 and 8 byte addresses, - // and will CHECK on anything else. - // This function pointer gets set by SetAddressSize. - AddressReader address_reader_; - - Endianness endian_; - uint8 address_size_; - uint8 offset_size_; - - // Base addresses for Linux C++ exception handling data's encoded pointers. - bool have_section_base_, have_text_base_, have_data_base_; - bool have_function_base_; - uint64 section_base_, text_base_, data_base_, function_base_; - const char *buffer_base_; -}; - -} // namespace dwarf2reader - -#endif // COMMON_DWARF_BYTEREADER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader_unittest.cc deleted file mode 100644 index d839dbe7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/bytereader_unittest.cc +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// bytereader_unittest.cc: Unit tests for dwarf2reader::ByteReader - -#include - -#include "breakpad_googletest_includes.h" -#include "common/dwarf/bytereader.h" -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/cfi_assembler.h" - -using dwarf2reader::ByteReader; -using dwarf2reader::DwarfPointerEncoding; -using dwarf2reader::ENDIANNESS_BIG; -using dwarf2reader::ENDIANNESS_LITTLE; -using google_breakpad::CFISection; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Section; -using std::string; -using testing::Test; - -struct ReaderFixture { - string contents; - size_t pointer_size; -}; - -class Reader: public ReaderFixture, public Test { }; -class ReaderDeathTest: public ReaderFixture, public Test { }; - -TEST_F(Reader, SimpleConstructor) { - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - CFISection section(kBigEndian, 4); - section - .D8(0xc0) - .D16(0xcf0d) - .D32(0x96fdd219) - .D64(0xbbf55fef0825f117ULL) - .ULEB128(0xa0927048ba8121afULL) - .LEB128(-0x4f337badf4483f83LL) - .D32(0xfec319c9); - ASSERT_TRUE(section.GetContents(&contents)); - const char *data = contents.data(); - EXPECT_EQ(0xc0U, reader.ReadOneByte(data)); - EXPECT_EQ(0xcf0dU, reader.ReadTwoBytes(data + 1)); - EXPECT_EQ(0x96fdd219U, reader.ReadFourBytes(data + 3)); - EXPECT_EQ(0xbbf55fef0825f117ULL, reader.ReadEightBytes(data + 7)); - size_t leb128_size; - EXPECT_EQ(0xa0927048ba8121afULL, - reader.ReadUnsignedLEB128(data + 15, &leb128_size)); - EXPECT_EQ(10U, leb128_size); - EXPECT_EQ(-0x4f337badf4483f83LL, - reader.ReadSignedLEB128(data + 25, &leb128_size)); - EXPECT_EQ(10U, leb128_size); - EXPECT_EQ(0xfec319c9, reader.ReadAddress(data + 35)); -} - -TEST_F(Reader, ValidEncodings) { - ByteReader reader(ENDIANNESS_LITTLE); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_absptr))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_omit))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_aligned))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_uleb128))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata2))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata4))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata8))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sleb128))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata2))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata4))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata8))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_pcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_textrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_datarel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_absptr | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_uleb128 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata2 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata4 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_udata8 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sleb128 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata2 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata4 | - dwarf2reader::DW_EH_PE_funcrel))); - EXPECT_TRUE(reader.ValidEncoding( - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect | - dwarf2reader::DW_EH_PE_sdata8 | - dwarf2reader::DW_EH_PE_funcrel))); - - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x05))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x07))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x0d))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x0f))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x51))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x60))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0x70))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0xf0))); - EXPECT_FALSE(reader.ValidEncoding(DwarfPointerEncoding(0xd0))); -} - -TEST_F(ReaderDeathTest, DW_EH_PE_omit) { - static const char data[1] = { 42 }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - EXPECT_DEATH(reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_omit, - &pointer_size), - "encoding != DW_EH_PE_omit"); -} - -TEST_F(Reader, DW_EH_PE_absptr4) { - static const char data[] = { 0x27, 0x57, 0xea, 0x40 }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(4); - EXPECT_EQ(0x40ea5727U, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_absptr, - &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_absptr8) { - static const char data[] = { - 0x60, 0x27, 0x57, 0xea, 0x40, 0xc2, 0x98, 0x05, 0x01, 0x50 - }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(8); - EXPECT_EQ(0x010598c240ea5727ULL, - reader.ReadEncodedPointer(data + 1, dwarf2reader::DW_EH_PE_absptr, - &pointer_size)); - EXPECT_EQ(8U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_uleb128) { - static const char data[] = { 0x81, 0x84, 0x4c }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(4); - EXPECT_EQ(0x130201U, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_uleb128, - &pointer_size)); - EXPECT_EQ(3U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_udata2) { - static const char data[] = { 0xf4, 0x8d }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - EXPECT_EQ(0xf48dU, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_udata2, - &pointer_size)); - EXPECT_EQ(2U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_udata4) { - static const char data[] = { 0xb2, 0x68, 0xa5, 0x62, 0x8f, 0x8b }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(8); - EXPECT_EQ(0xa5628f8b, - reader.ReadEncodedPointer(data + 2, dwarf2reader::DW_EH_PE_udata4, - &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_udata8Addr8) { - static const char data[] = { - 0x27, 0x04, 0x73, 0x04, 0x69, 0x9f, 0x19, 0xed, 0x8f, 0xfe - }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(8); - EXPECT_EQ(0x8fed199f69047304ULL, - reader.ReadEncodedPointer(data + 1, dwarf2reader::DW_EH_PE_udata8, - &pointer_size)); - EXPECT_EQ(8U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_udata8Addr4) { - static const char data[] = { - 0x27, 0x04, 0x73, 0x04, 0x69, 0x9f, 0x19, 0xed, 0x8f, 0xfe - }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(4); - EXPECT_EQ(0x69047304ULL, - reader.ReadEncodedPointer(data + 1, dwarf2reader::DW_EH_PE_udata8, - &pointer_size)); - EXPECT_EQ(8U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_sleb128) { - static const char data[] = { 0x42, 0xff, 0xfb, 0x73 }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - EXPECT_EQ(-0x030201U & 0xffffffff, - reader.ReadEncodedPointer(data + 1, dwarf2reader::DW_EH_PE_sleb128, - &pointer_size)); - EXPECT_EQ(3U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_sdata2) { - static const char data[] = { 0xb9, 0xbf }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(8); - EXPECT_EQ(0xffffffffffffbfb9ULL, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_sdata2, - &pointer_size)); - EXPECT_EQ(2U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_sdata4) { - static const char data[] = { 0xa0, 0xca, 0xf2, 0xb8, 0xc2, 0xad }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(8); - EXPECT_EQ(0xffffffffadc2b8f2ULL, - reader.ReadEncodedPointer(data + 2, dwarf2reader::DW_EH_PE_sdata4, - &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_sdata8) { - static const char data[] = { - 0xf6, 0x66, 0x57, 0x79, 0xe0, 0x0c, 0x9b, 0x26, 0x87 - }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(8); - EXPECT_EQ(0x87269b0ce0795766ULL, - reader.ReadEncodedPointer(data + 1, dwarf2reader::DW_EH_PE_sdata8, - &pointer_size)); - EXPECT_EQ(8U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_pcrel) { - static const char data[] = { 0x4a, 0x8b, 0x1b, 0x14, 0xc8, 0xc4, 0x02, 0xce }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - DwarfPointerEncoding encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_pcrel - | dwarf2reader::DW_EH_PE_absptr); - reader.SetCFIDataBase(0x89951377, data); - EXPECT_EQ(0x89951377 + 3 + 0x14c8c402, - reader.ReadEncodedPointer(data + 3, encoding, &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_textrel) { - static const char data[] = { 0xd9, 0x0d, 0x05, 0x17, 0xc9, 0x7a, 0x42, 0x1e }; - ByteReader reader(ENDIANNESS_LITTLE); - reader.SetAddressSize(4); - reader.SetTextBase(0xb91beaf0); - DwarfPointerEncoding encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_textrel - | dwarf2reader::DW_EH_PE_sdata2); - EXPECT_EQ((0xb91beaf0 + 0xffffc917) & 0xffffffff, - reader.ReadEncodedPointer(data + 3, encoding, &pointer_size)); - EXPECT_EQ(2U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_datarel) { - static const char data[] = { 0x16, 0xf2, 0xbb, 0x82, 0x68, 0xa7, 0xbc, 0x39 }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(8); - reader.SetDataBase(0xbef308bd25ce74f0ULL); - DwarfPointerEncoding encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_datarel - | dwarf2reader::DW_EH_PE_sleb128); - EXPECT_EQ(0xbef308bd25ce74f0ULL + 0xfffffffffffa013bULL, - reader.ReadEncodedPointer(data + 2, encoding, &pointer_size)); - EXPECT_EQ(3U, pointer_size); -} - -TEST_F(Reader, DW_EH_PE_funcrel) { - static const char data[] = { 0x84, 0xf8, 0x14, 0x01, 0x61, 0xd1, 0x48, 0xc9 }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetAddressSize(4); - reader.SetFunctionBase(0x823c3520); - DwarfPointerEncoding encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_funcrel - | dwarf2reader::DW_EH_PE_udata2); - EXPECT_EQ(0x823c3520 + 0xd148, - reader.ReadEncodedPointer(data + 5, encoding, &pointer_size)); - EXPECT_EQ(2U, pointer_size); -} - -TEST(UsableBase, CFI) { - static const char data[1] = { 0x42 }; - ByteReader reader(ENDIANNESS_BIG); - reader.SetCFIDataBase(0xb31cbd20, data); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_absptr)); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_pcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_textrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_datarel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_funcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_omit)); - EXPECT_FALSE(reader.UsableEncoding(DwarfPointerEncoding(0x60))); -} - -TEST(UsableBase, Text) { - ByteReader reader(ENDIANNESS_BIG); - reader.SetTextBase(0xa899ccb9); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_absptr)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_pcrel)); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_textrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_datarel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_funcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_omit)); - EXPECT_FALSE(reader.UsableEncoding(DwarfPointerEncoding(0x60))); -} - -TEST(UsableBase, Data) { - ByteReader reader(ENDIANNESS_BIG); - reader.SetDataBase(0xf7b10bcd); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_absptr)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_pcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_textrel)); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_datarel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_funcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_omit)); - EXPECT_FALSE(reader.UsableEncoding(DwarfPointerEncoding(0x60))); -} - -TEST(UsableBase, Function) { - ByteReader reader(ENDIANNESS_BIG); - reader.SetFunctionBase(0xc2c0ed81); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_absptr)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_pcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_textrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_datarel)); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_funcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_omit)); - EXPECT_FALSE(reader.UsableEncoding(DwarfPointerEncoding(0x60))); -} - -TEST(UsableBase, ClearFunction) { - ByteReader reader(ENDIANNESS_BIG); - reader.SetFunctionBase(0xc2c0ed81); - reader.ClearFunctionBase(); - EXPECT_TRUE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_absptr)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_pcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_textrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_datarel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_funcrel)); - EXPECT_FALSE(reader.UsableEncoding(dwarf2reader::DW_EH_PE_omit)); - EXPECT_FALSE(reader.UsableEncoding(DwarfPointerEncoding(0x60))); -} - -struct AlignedFixture { - AlignedFixture() : reader(ENDIANNESS_BIG) { reader.SetAddressSize(4); } - static const char data[10]; - ByteReader reader; - size_t pointer_size; -}; - -const char AlignedFixture::data[10] = { - 0xfe, 0x6e, 0x93, 0xd8, 0x34, 0xd5, 0x1c, 0xd3, 0xac, 0x2b -}; - -class Aligned: public AlignedFixture, public Test { }; - -TEST_F(Aligned, DW_EH_PE_aligned0) { - reader.SetCFIDataBase(0xb440305c, data); - EXPECT_EQ(0xfe6e93d8U, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned1) { - reader.SetCFIDataBase(0xb440305d, data); - EXPECT_EQ(0xd834d51cU, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(7U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned2) { - reader.SetCFIDataBase(0xb440305e, data); - EXPECT_EQ(0x93d834d5U, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(6U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned3) { - reader.SetCFIDataBase(0xb440305f, data); - EXPECT_EQ(0x6e93d834U, - reader.ReadEncodedPointer(data, dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(5U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned11) { - reader.SetCFIDataBase(0xb4403061, data); - EXPECT_EQ(0xd834d51cU, - reader.ReadEncodedPointer(data + 1, - dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(6U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned30) { - reader.SetCFIDataBase(0xb4403063, data); - EXPECT_EQ(0x6e93d834U, - reader.ReadEncodedPointer(data + 1, - dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(4U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned23) { - reader.SetCFIDataBase(0xb4403062, data); - EXPECT_EQ(0x1cd3ac2bU, - reader.ReadEncodedPointer(data + 3, - dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(7U, pointer_size); -} - -TEST_F(Aligned, DW_EH_PE_aligned03) { - reader.SetCFIDataBase(0xb4403064, data); - EXPECT_EQ(0x34d51cd3U, - reader.ReadEncodedPointer(data + 3, - dwarf2reader::DW_EH_PE_aligned, - &pointer_size)); - EXPECT_EQ(5U, pointer_size); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.cc deleted file mode 100644 index a6a5aca6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.cc +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_assembler.cc: Implementation of google_breakpad::CFISection class. -// See cfi_assembler.h for details. - -#include "common/dwarf/cfi_assembler.h" - -#include -#include - -namespace google_breakpad { - -using dwarf2reader::DwarfPointerEncoding; - -CFISection &CFISection::CIEHeader(u_int64_t code_alignment_factor, - int data_alignment_factor, - unsigned return_address_register, - u_int8_t version, - const string &augmentation, - bool dwarf64) { - assert(!entry_length_); - entry_length_ = new PendingLength(); - in_fde_ = false; - - if (dwarf64) { - D32(kDwarf64InitialLengthMarker); - D64(entry_length_->length); - entry_length_->start = Here(); - D64(eh_frame_ ? kEHFrame64CIEIdentifier : kDwarf64CIEIdentifier); - } else { - D32(entry_length_->length); - entry_length_->start = Here(); - D32(eh_frame_ ? kEHFrame32CIEIdentifier : kDwarf32CIEIdentifier); - } - D8(version); - AppendCString(augmentation); - ULEB128(code_alignment_factor); - LEB128(data_alignment_factor); - if (version == 1) - D8(return_address_register); - else - ULEB128(return_address_register); - return *this; -} - -CFISection &CFISection::FDEHeader(Label cie_pointer, - u_int64_t initial_location, - u_int64_t address_range, - bool dwarf64) { - assert(!entry_length_); - entry_length_ = new PendingLength(); - in_fde_ = true; - fde_start_address_ = initial_location; - - if (dwarf64) { - D32(0xffffffff); - D64(entry_length_->length); - entry_length_->start = Here(); - if (eh_frame_) - D64(Here() - cie_pointer); - else - D64(cie_pointer); - } else { - D32(entry_length_->length); - entry_length_->start = Here(); - if (eh_frame_) - D32(Here() - cie_pointer); - else - D32(cie_pointer); - } - EncodedPointer(initial_location); - // The FDE length in an .eh_frame section uses the same encoding as the - // initial location, but ignores the base address (selected by the upper - // nybble of the encoding), as it's a length, not an address that can be - // made relative. - EncodedPointer(address_range, - DwarfPointerEncoding(pointer_encoding_ & 0x0f)); - return *this; -} - -CFISection &CFISection::FinishEntry() { - assert(entry_length_); - Align(address_size_, dwarf2reader::DW_CFA_nop); - entry_length_->length = Here() - entry_length_->start; - delete entry_length_; - entry_length_ = NULL; - in_fde_ = false; - return *this; -} - -CFISection &CFISection::EncodedPointer(u_int64_t address, - DwarfPointerEncoding encoding, - const EncodedPointerBases &bases) { - // Omitted data is extremely easy to emit. - if (encoding == dwarf2reader::DW_EH_PE_omit) - return *this; - - // If (encoding & dwarf2reader::DW_EH_PE_indirect) != 0, then we assume - // that ADDRESS is the address at which the pointer is stored --- in - // other words, that bit has no effect on how we write the pointer. - encoding = DwarfPointerEncoding(encoding & ~dwarf2reader::DW_EH_PE_indirect); - - // Find the base address to which this pointer is relative. The upper - // nybble of the encoding specifies this. - u_int64_t base; - switch (encoding & 0xf0) { - case dwarf2reader::DW_EH_PE_absptr: base = 0; break; - case dwarf2reader::DW_EH_PE_pcrel: base = bases.cfi + Size(); break; - case dwarf2reader::DW_EH_PE_textrel: base = bases.text; break; - case dwarf2reader::DW_EH_PE_datarel: base = bases.data; break; - case dwarf2reader::DW_EH_PE_funcrel: base = fde_start_address_; break; - case dwarf2reader::DW_EH_PE_aligned: base = 0; break; - default: abort(); - }; - - // Make ADDRESS relative. Yes, this is appropriate even for "absptr" - // values; see gcc/unwind-pe.h. - address -= base; - - // Align the pointer, if required. - if ((encoding & 0xf0) == dwarf2reader::DW_EH_PE_aligned) - Align(AddressSize()); - - // Append ADDRESS to this section in the appropriate form. For the - // fixed-width forms, we don't need to differentiate between signed and - // unsigned encodings, because ADDRESS has already been extended to 64 - // bits before it was passed to us. - switch (encoding & 0x0f) { - case dwarf2reader::DW_EH_PE_absptr: - Address(address); - break; - - case dwarf2reader::DW_EH_PE_uleb128: - ULEB128(address); - break; - - case dwarf2reader::DW_EH_PE_sleb128: - LEB128(address); - break; - - case dwarf2reader::DW_EH_PE_udata2: - case dwarf2reader::DW_EH_PE_sdata2: - D16(address); - break; - - case dwarf2reader::DW_EH_PE_udata4: - case dwarf2reader::DW_EH_PE_sdata4: - D32(address); - break; - - case dwarf2reader::DW_EH_PE_udata8: - case dwarf2reader::DW_EH_PE_sdata8: - D64(address); - break; - - default: - abort(); - } - - return *this; -}; - -const u_int32_t CFISection::kDwarf64InitialLengthMarker; -const u_int32_t CFISection::kDwarf32CIEIdentifier; -const u_int64_t CFISection::kDwarf64CIEIdentifier; -const u_int32_t CFISection::kEHFrame32CIEIdentifier; -const u_int64_t CFISection::kEHFrame64CIEIdentifier; - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.h deleted file mode 100644 index 3f305030..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/cfi_assembler.h +++ /dev/null @@ -1,269 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_assembler.h: Define CFISection, a class for creating properly -// (and improperly) formatted DWARF CFI data for unit tests. - -#ifndef PROCESSOR_CFI_ASSEMBLER_H_ -#define PROCESSOR_CFI_ASSEMBLER_H_ - -#include - -#include "common/dwarf/dwarf2enums.h" -#include "common/test_assembler.h" -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using dwarf2reader::DwarfPointerEncoding; -using google_breakpad::test_assembler::Endianness; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using std::string; - -class CFISection: public Section { - public: - - // CFI augmentation strings beginning with 'z', defined by the - // Linux/IA-64 C++ ABI, can specify interesting encodings for - // addresses appearing in FDE headers and call frame instructions (and - // for additional fields whose presence the augmentation string - // specifies). In particular, pointers can be specified to be relative - // to various base address: the start of the .text section, the - // location holding the address itself, and so on. These allow the - // frame data to be position-independent even when they live in - // write-protected pages. These variants are specified at the - // following two URLs: - // - // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html - // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html - // - // CFISection leaves the production of well-formed 'z'-augmented CIEs and - // FDEs to the user, but does provide EncodedPointer, to emit - // properly-encoded addresses for a given pointer encoding. - // EncodedPointer uses an instance of this structure to find the base - // addresses it should use; you can establish a default for all encoded - // pointers appended to this section with SetEncodedPointerBases. - struct EncodedPointerBases { - EncodedPointerBases() : cfi(), text(), data() { } - - // The starting address of this CFI section in memory, for - // DW_EH_PE_pcrel. DW_EH_PE_pcrel pointers may only be used in data - // that has is loaded into the program's address space. - u_int64_t cfi; - - // The starting address of this file's .text section, for DW_EH_PE_textrel. - u_int64_t text; - - // The starting address of this file's .got or .eh_frame_hdr section, - // for DW_EH_PE_datarel. - u_int64_t data; - }; - - // Create a CFISection whose endianness is ENDIANNESS, and where - // machine addresses are ADDRESS_SIZE bytes long. If EH_FRAME is - // true, use the .eh_frame format, as described by the Linux - // Standards Base Core Specification, instead of the DWARF CFI - // format. - CFISection(Endianness endianness, size_t address_size, - bool eh_frame = false) - : Section(endianness), address_size_(address_size), eh_frame_(eh_frame), - pointer_encoding_(dwarf2reader::DW_EH_PE_absptr), - encoded_pointer_bases_(), entry_length_(NULL), in_fde_(false) { - // The 'start', 'Here', and 'Mark' members of a CFISection all refer - // to section offsets. - start() = 0; - } - - // Return this CFISection's address size. - size_t AddressSize() const { return address_size_; } - - // Return true if this CFISection uses the .eh_frame format, or - // false if it contains ordinary DWARF CFI data. - bool ContainsEHFrame() const { return eh_frame_; } - - // Use ENCODING for pointers in calls to FDEHeader and EncodedPointer. - void SetPointerEncoding(DwarfPointerEncoding encoding) { - pointer_encoding_ = encoding; - } - - // Use the addresses in BASES as the base addresses for encoded - // pointers in subsequent calls to FDEHeader or EncodedPointer. - // This function makes a copy of BASES. - void SetEncodedPointerBases(const EncodedPointerBases &bases) { - encoded_pointer_bases_ = bases; - } - - // Append a Common Information Entry header to this section with the - // given values. If dwarf64 is true, use the 64-bit DWARF initial - // length format for the CIE's initial length. Return a reference to - // this section. You should call FinishEntry after writing the last - // instruction for the CIE. - // - // Before calling this function, you will typically want to use Mark - // or Here to make a label to pass to FDEHeader that refers to this - // CIE's position in the section. - CFISection &CIEHeader(u_int64_t code_alignment_factor, - int data_alignment_factor, - unsigned return_address_register, - u_int8_t version = 3, - const string &augmentation = "", - bool dwarf64 = false); - - // Append a Frame Description Entry header to this section with the - // given values. If dwarf64 is true, use the 64-bit DWARF initial - // length format for the CIE's initial length. Return a reference to - // this section. You should call FinishEntry after writing the last - // instruction for the CIE. - // - // This function doesn't support entries that are longer than - // 0xffffff00 bytes. (The "initial length" is always a 32-bit - // value.) Nor does it support .debug_frame sections longer than - // 0xffffff00 bytes. - CFISection &FDEHeader(Label cie_pointer, - u_int64_t initial_location, - u_int64_t address_range, - bool dwarf64 = false); - - // Note the current position as the end of the last CIE or FDE we - // started, after padding with DW_CFA_nops for alignment. This - // defines the label representing the entry's length, cited in the - // entry's header. Return a reference to this section. - CFISection &FinishEntry(); - - // Append the contents of BLOCK as a DW_FORM_block value: an - // unsigned LEB128 length, followed by that many bytes of data. - CFISection &Block(const string &block) { - ULEB128(block.size()); - Append(block); - return *this; - } - - // Append ADDRESS to this section, in the appropriate size and - // endianness. Return a reference to this section. - CFISection &Address(u_int64_t address) { - Section::Append(endianness(), address_size_, address); - return *this; - } - CFISection &Address(Label address) { - Section::Append(endianness(), address_size_, address); - return *this; - } - - // Append ADDRESS to this section, using ENCODING and BASES. ENCODING - // defaults to this section's default encoding, established by - // SetPointerEncoding. BASES defaults to this section's bases, set by - // SetEncodedPointerBases. If the DW_EH_PE_indirect bit is set in the - // encoding, assume that ADDRESS is where the true address is stored. - // Return a reference to this section. - // - // (C++ doesn't let me use default arguments here, because I want to - // refer to members of *this in the default argument expression.) - CFISection &EncodedPointer(u_int64_t address) { - return EncodedPointer(address, pointer_encoding_, encoded_pointer_bases_); - } - CFISection &EncodedPointer(u_int64_t address, DwarfPointerEncoding encoding) { - return EncodedPointer(address, encoding, encoded_pointer_bases_); - } - CFISection &EncodedPointer(u_int64_t address, DwarfPointerEncoding encoding, - const EncodedPointerBases &bases); - - // Restate some member functions, to keep chaining working nicely. - CFISection &Mark(Label *label) { Section::Mark(label); return *this; } - CFISection &D8(u_int8_t v) { Section::D8(v); return *this; } - CFISection &D16(u_int16_t v) { Section::D16(v); return *this; } - CFISection &D16(Label v) { Section::D16(v); return *this; } - CFISection &D32(u_int32_t v) { Section::D32(v); return *this; } - CFISection &D32(const Label &v) { Section::D32(v); return *this; } - CFISection &D64(u_int64_t v) { Section::D64(v); return *this; } - CFISection &D64(const Label &v) { Section::D64(v); return *this; } - CFISection &LEB128(long long v) { Section::LEB128(v); return *this; } - CFISection &ULEB128(u_int64_t v) { Section::ULEB128(v); return *this; } - - private: - // A length value that we've appended to the section, but is not yet - // known. LENGTH is the appended value; START is a label referring - // to the start of the data whose length was cited. - struct PendingLength { - Label length; - Label start; - }; - - // Constants used in CFI/.eh_frame data: - - // If the first four bytes of an "initial length" are this constant, then - // the data uses the 64-bit DWARF format, and the length itself is the - // subsequent eight bytes. - static const u_int32_t kDwarf64InitialLengthMarker = 0xffffffffU; - - // The CIE identifier for 32- and 64-bit DWARF CFI and .eh_frame data. - static const u_int32_t kDwarf32CIEIdentifier = ~(u_int32_t)0; - static const u_int64_t kDwarf64CIEIdentifier = ~(u_int64_t)0; - static const u_int32_t kEHFrame32CIEIdentifier = 0; - static const u_int64_t kEHFrame64CIEIdentifier = 0; - - // The size of a machine address for the data in this section. - size_t address_size_; - - // If true, we are generating a Linux .eh_frame section, instead of - // a standard DWARF .debug_frame section. - bool eh_frame_; - - // The encoding to use for FDE pointers. - DwarfPointerEncoding pointer_encoding_; - - // The base addresses to use when emitting encoded pointers. - EncodedPointerBases encoded_pointer_bases_; - - // The length value for the current entry. - // - // Oddly, this must be dynamically allocated. Labels never get new - // values; they only acquire constraints on the value they already - // have, or assert if you assign them something incompatible. So - // each header needs truly fresh Label objects to cite in their - // headers and track their positions. The alternative is explicit - // destructor invocation and a placement new. Ick. - PendingLength *entry_length_; - - // True if we are currently emitting an FDE --- that is, we have - // called FDEHeader but have not yet called FinishEntry. - bool in_fde_; - - // If in_fde_ is true, this is its starting address. We use this for - // emitting DW_EH_PE_funcrel pointers. - u_int64_t fde_start_address_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_CFI_ASSEMBLER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.cc deleted file mode 100644 index 5d019293..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.cc +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf2diehandler.cc: Implement the dwarf2reader::DieDispatcher class. -// See dwarf2diehandler.h for details. - -#include "common/dwarf/dwarf2diehandler.h" - -#include - -namespace dwarf2reader { - -DIEDispatcher::~DIEDispatcher() { - while (!die_handlers_.empty()) { - HandlerStack &entry = die_handlers_.top(); - if (entry.handler_ != root_handler_) - delete entry.handler_; - die_handlers_.pop(); - } -} - -bool DIEDispatcher::StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version) { - return root_handler_->StartCompilationUnit(offset, address_size, - offset_size, cu_length, - dwarf_version); -} - -bool DIEDispatcher::StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { - // The stack entry for the parent of this DIE, if there is one. - HandlerStack *parent = die_handlers_.empty() ? NULL : &die_handlers_.top(); - - // Does this call indicate that we're done receiving the parent's - // attributes' values? If so, call its EndAttributes member function. - if (parent && parent->handler_ && !parent->reported_attributes_end_) { - parent->reported_attributes_end_ = true; - if (!parent->handler_->EndAttributes()) { - // Finish off this handler now. and edit *PARENT to indicate that - // we don't want to visit any of the children. - parent->handler_->Finish(); - if (parent->handler_ != root_handler_) - delete parent->handler_; - parent->handler_ = NULL; - return false; - } - } - - // Find a handler for this DIE. - DIEHandler *handler; - if (parent) { - if (parent->handler_) - // Ask the parent to find a handler. - handler = parent->handler_->FindChildHandler(offset, tag, attrs); - else - // No parent handler means we're not interested in any of our - // children. - handler = NULL; - } else { - // This is the root DIE. For a non-root DIE, the parent's handler - // decides whether to visit it, but the root DIE has no parent - // handler, so we have a special method on the root DIE handler - // itself to decide. - if (root_handler_->StartRootDIE(offset, tag, attrs)) - handler = root_handler_; - else - handler = NULL; - } - - // Push a handler stack entry for this new handler. As an - // optimization, we don't push NULL-handler entries on top of other - // NULL-handler entries; we just let the oldest such entry stand for - // the whole subtree. - if (handler || !parent || parent->handler_) { - HandlerStack entry; - entry.offset_ = offset; - entry.handler_ = handler; - entry.reported_attributes_end_ = false; - die_handlers_.push(entry); - } - - return handler != NULL; -} - -void DIEDispatcher::EndDIE(uint64 offset) { - assert(!die_handlers_.empty()); - HandlerStack *entry = &die_handlers_.top(); - if (entry->handler_) { - // This entry had better be the handler for this DIE. - assert(entry->offset_ == offset); - // If a DIE has no children, this EndDIE call indicates that we're - // done receiving its attributes' values. - if (!entry->reported_attributes_end_) - entry->handler_->EndAttributes(); // Ignore return value: no children. - entry->handler_->Finish(); - if (entry->handler_ != root_handler_) - delete entry->handler_; - } else { - // If this DIE is within a tree we're ignoring, then don't pop the - // handler stack: that entry stands for the whole tree. - if (entry->offset_ != offset) - return; - } - die_handlers_.pop(); -} - -void DIEDispatcher::ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - HandlerStack ¤t = die_handlers_.top(); - // This had better be an attribute of the DIE we were meant to handle. - assert(offset == current.offset_); - current.handler_->ProcessAttributeUnsigned(attr, form, data); -} - -void DIEDispatcher::ProcessAttributeSigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { - HandlerStack ¤t = die_handlers_.top(); - // This had better be an attribute of the DIE we were meant to handle. - assert(offset == current.offset_); - current.handler_->ProcessAttributeSigned(attr, form, data); -} - -void DIEDispatcher::ProcessAttributeReference(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - HandlerStack ¤t = die_handlers_.top(); - // This had better be an attribute of the DIE we were meant to handle. - assert(offset == current.offset_); - current.handler_->ProcessAttributeReference(attr, form, data); -} - -void DIEDispatcher::ProcessAttributeBuffer(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const char* data, - uint64 len) { - HandlerStack ¤t = die_handlers_.top(); - // This had better be an attribute of the DIE we were meant to handle. - assert(offset == current.offset_); - current.handler_->ProcessAttributeBuffer(attr, form, data, len); -} - -void DIEDispatcher::ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string& data) { - HandlerStack ¤t = die_handlers_.top(); - // This had better be an attribute of the DIE we were meant to handle. - assert(offset == current.offset_); - current.handler_->ProcessAttributeString(attr, form, data); -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.h deleted file mode 100644 index 4c9d7536..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler.h +++ /dev/null @@ -1,358 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf2reader::CompilationUnit is a simple and direct parser for -// DWARF data, but its handler interface is not convenient to use. In -// particular: -// -// - CompilationUnit calls Dwarf2Handler's member functions to report -// every attribute's value, regardless of what sort of DIE it is. -// As a result, the ProcessAttributeX functions end up looking like -// this: -// -// switch (parent_die_tag) { -// case DW_TAG_x: -// switch (attribute_name) { -// case DW_AT_y: -// handle attribute y of DIE type x -// ... -// } break; -// ... -// } -// -// In C++ it's much nicer to use virtual function dispatch to find -// the right code for a given case than to switch on the DIE tag -// like this. -// -// - Processing different kinds of DIEs requires different sets of -// data: lexical block DIEs have start and end addresses, but struct -// type DIEs don't. It would be nice to be able to have separate -// handler classes for separate kinds of DIEs, each with the members -// appropriate to its role, instead of having one handler class that -// needs to hold data for every DIE type. -// -// - There should be a separate instance of the appropriate handler -// class for each DIE, instead of a single object with tables -// tracking all the dies in the compilation unit. -// -// - It's not convenient to take some action after all a DIE's -// attributes have been seen, but before visiting any of its -// children. The only indication you have that a DIE's attribute -// list is complete is that you get either a StartDIE or an EndDIE -// call. -// -// - It's not convenient to make use of the tree structure of the -// DIEs. Skipping all the children of a given die requires -// maintaining state and returning false from StartDIE until we get -// an EndDIE call with the appropriate offset. -// -// This interface tries to take care of all that. (You're shocked, I'm sure.) -// -// Using the classes here, you provide an initial handler for the root -// DIE of the compilation unit. Each handler receives its DIE's -// attributes, and provides fresh handler objects for children of -// interest, if any. The three classes are: -// -// - DIEHandler: the base class for your DIE-type-specific handler -// classes. -// -// - RootDIEHandler: derived from DIEHandler, the base class for your -// root DIE handler class. -// -// - DIEDispatcher: derived from Dwarf2Handler, an instance of this -// invokes your DIE-type-specific handler objects. -// -// In detail: -// -// - Define handler classes specialized for the DIE types you're -// interested in. These handler classes must inherit from -// DIEHandler. Thus: -// -// class My_DW_TAG_X_Handler: public DIEHandler { ... }; -// class My_DW_TAG_Y_Handler: public DIEHandler { ... }; -// -// DIEHandler subclasses needn't correspond exactly to single DIE -// types, as shown here; the point is that you can have several -// different classes appropriate to different kinds of DIEs. -// -// - In particular, define a handler class for the compilation -// unit's root DIE, that inherits from RootDIEHandler: -// -// class My_DW_TAG_compile_unit_Handler: public RootDIEHandler { ... }; -// -// RootDIEHandler inherits from DIEHandler, adding a few additional -// member functions for examining the compilation unit as a whole, -// and other quirks of rootness. -// -// - Then, create a DIEDispatcher instance, passing it an instance of -// your root DIE handler class, and use that DIEDispatcher as the -// dwarf2reader::CompilationUnit's handler: -// -// My_DW_TAG_compile_unit_Handler root_die_handler(...); -// DIEDispatcher die_dispatcher(&root_die_handler); -// CompilationUnit reader(sections, offset, bytereader, &die_dispatcher); -// -// Here, 'die_dispatcher' acts as a shim between 'reader' and the -// various DIE-specific handlers you have defined. -// -// - When you call reader.Start(), die_dispatcher behaves as follows, -// starting with your root die handler and the compilation unit's -// root DIE: -// -// - It calls the handler's ProcessAttributeX member functions for -// each of the DIE's attributes. -// -// - It calls the handler's EndAttributes member function. This -// should return true if any of the DIE's children should be -// visited, in which case: -// -// - For each of the DIE's children, die_dispatcher calls the -// DIE's handler's FindChildHandler member function. If that -// returns a pointer to a DIEHandler instance, then -// die_dispatcher uses that handler to process the child, using -// this procedure recursively. Alternatively, if -// FindChildHandler returns NULL, die_dispatcher ignores that -// child and its descendants. -// -// - When die_dispatcher has finished processing all the DIE's -// children, it invokes the handler's Finish() member function, -// and destroys the handler. (As a special case, it doesn't -// destroy the root DIE handler.) -// -// This allows the code for handling a particular kind of DIE to be -// gathered together in a single class, makes it easy to skip all the -// children or individual children of a particular DIE, and provides -// appropriate parental context for each die. - -#ifndef COMMON_DWARF_DWARF2DIEHANDLER_H__ -#define COMMON_DWARF_DWARF2DIEHANDLER_H__ - -#include - -#include "common/dwarf/types.h" -#include "common/dwarf/dwarf2enums.h" -#include "common/dwarf/dwarf2reader.h" - -namespace dwarf2reader { - -// A base class for handlers for specific DIE types. The series of -// calls made on a DIE handler is as follows: -// -// - for each attribute of the DIE: -// - ProcessAttributeX() -// - EndAttributes() -// - if that returned true, then for each child: -// - FindChildHandler() -// - if that returns a non-NULL pointer to a new handler: -// - recurse, with the new handler and the child die -// - Finish() -// - destruction -class DIEHandler { - public: - DIEHandler() { } - virtual ~DIEHandler() { } - - // When we visit a DIE, we first use these member functions to - // report the DIE's attributes and their values. These have the - // same restrictions as the corresponding member functions of - // dwarf2reader::Dwarf2Handler. - // - // Since DWARF does not specify in what order attributes must - // appear, avoid making decisions in these functions that would be - // affected by the presence of other attributes. The EndAttributes - // function is a more appropriate place for such work, as all the - // DIE's attributes have been seen at that point. - // - // The default definitions ignore the values they are passed. - virtual void ProcessAttributeUnsigned(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { } - virtual void ProcessAttributeSigned(enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { } - virtual void ProcessAttributeReference(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { } - virtual void ProcessAttributeBuffer(enum DwarfAttribute attr, - enum DwarfForm form, - const char* data, - uint64 len) { } - virtual void ProcessAttributeString(enum DwarfAttribute attr, - enum DwarfForm form, - const string& data) { } - - // Once we have reported all the DIE's attributes' values, we call - // this member function. If it returns false, we skip all the DIE's - // children. If it returns true, we call FindChildHandler on each - // child. If that returns a handler object, we use that to visit - // the child; otherwise, we skip the child. - // - // This is a good place to make decisions that depend on more than - // one attribute. DWARF does not specify in what order attributes - // must appear, so only when the EndAttributes function is called - // does the handler have a complete picture of the DIE's attributes. - // - // The default definition elects to ignore the DIE's children. - // You'll need to override this if you override FindChildHandler, - // but at least the default behavior isn't to pass the children to - // FindChildHandler, which then ignores them all. - virtual bool EndAttributes() { return false; } - - // If EndAttributes returns true to indicate that some of the DIE's - // children might be of interest, then we apply this function to - // each of the DIE's children. If it returns a handler object, then - // we use that to visit the child DIE. If it returns NULL, we skip - // that child DIE (and all its descendants). - // - // OFFSET is the offset of the child; TAG indicates what kind of DIE - // it is; and ATTRS is the list of attributes the DIE will have, and - // their forms (their values are not provided). - // - // The default definition skips all children. - virtual DIEHandler *FindChildHandler(uint64 offset, enum DwarfTag tag, - const AttributeList &attrs) { - return NULL; - } - - // When we are done processing a DIE, we call this member function. - // This happens after the EndAttributes call, all FindChildHandler - // calls (if any), and all operations on the children themselves (if - // any). We call Finish on every handler --- even if EndAttributes - // returns false. - virtual void Finish() { }; -}; - -// A subclass of DIEHandler, with additional kludges for handling the -// compilation unit's root die. -class RootDIEHandler: public DIEHandler { - public: - RootDIEHandler() { } - virtual ~RootDIEHandler() { } - - // We pass the values reported via Dwarf2Handler::StartCompilationUnit - // to this member function, and skip the entire compilation unit if it - // returns false. So the root DIE handler is actually also - // responsible for handling the compilation unit metadata. - // The default definition always visits the compilation unit. - virtual bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version) { return true; } - - // For the root DIE handler only, we pass the offset, tag and - // attributes of the compilation unit's root DIE. This is the only - // way the root DIE handler can find the root DIE's tag. If this - // function returns true, we will visit the root DIE using the usual - // DIEHandler methods; otherwise, we skip the entire compilation - // unit. - // - // The default definition elects to visit the root DIE. - virtual bool StartRootDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { return true; } -}; - -class DIEDispatcher: public Dwarf2Handler { - public: - // Create a Dwarf2Handler which uses ROOT_HANDLER as the handler for - // the compilation unit's root die, as described for the DIEHandler - // class. - DIEDispatcher(RootDIEHandler *root_handler) : root_handler_(root_handler) { } - // Destroying a DIEDispatcher destroys all active handler objects - // except the root handler. - ~DIEDispatcher(); - bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version); - bool StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList &attrs); - void ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - void ProcessAttributeSigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - int64 data); - void ProcessAttributeReference(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - void ProcessAttributeBuffer(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const char* data, - uint64 len); - void ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string &data); - void EndDIE(uint64 offset); - - private: - - // The type of a handler stack entry. This includes some fields - // which don't really need to be on the stack --- they could just be - // single data members of DIEDispatcher --- but putting them here - // makes it easier to see that the code is correct. - struct HandlerStack { - // The offset of the DIE for this handler stack entry. - uint64 offset_; - - // The handler object interested in this DIE's attributes and - // children. If NULL, we're not interested in either. - DIEHandler *handler_; - - // Have we reported the end of this DIE's attributes to the handler? - bool reported_attributes_end_; - }; - - // Stack of DIE attribute handlers. At StartDIE(D), the top of the - // stack is the handler of D's parent, whom we may ask for a handler - // for D itself. At EndDIE(D), the top of the stack is D's handler. - // Special cases: - // - // - Before we've seen the compilation unit's root DIE, the stack is - // empty; we'll call root_handler_'s special member functions, and - // perhaps push root_handler_ on the stack to look at the root's - // immediate children. - // - // - When we decide to ignore a subtree, we only push an entry on - // the stack for the root of the tree being ignored, rather than - // pushing lots of stack entries with handler_ set to NULL. - stack die_handlers_; - - // The root handler. We don't push it on die_handlers_ until we - // actually get the StartDIE call for the root. - RootDIEHandler *root_handler_; -}; - -} // namespace dwarf2reader -#endif // COMMON_DWARF_DWARF2DIEHANDLER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler_unittest.cc deleted file mode 100644 index 67ccb95f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2diehandler_unittest.cc +++ /dev/null @@ -1,560 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf2diehander_unittest.cc: Unit tests for google_breakpad::DIEDispatcher. - -#include "breakpad_googletest_includes.h" - -#include "common/dwarf/dwarf2diehandler.h" - -using ::testing::_; -using ::testing::ContainerEq; -using ::testing::ElementsAreArray; -using ::testing::Eq; -using ::testing::InSequence; -using ::testing::Return; -using ::testing::Sequence; -using ::testing::StrEq; - -using dwarf2reader::AttributeList; -using dwarf2reader::DIEDispatcher; -using dwarf2reader::DIEHandler; -using dwarf2reader::DwarfAttribute; -using dwarf2reader::DwarfForm; -using dwarf2reader::DwarfTag; -using dwarf2reader::RootDIEHandler; - -class MockDIEHandler: public DIEHandler { - public: - MOCK_METHOD3(ProcessAttributeUnsigned, - void(DwarfAttribute, DwarfForm, uint64)); - MOCK_METHOD3(ProcessAttributeSigned, - void(DwarfAttribute, DwarfForm, int64)); - MOCK_METHOD3(ProcessAttributeReference, - void(DwarfAttribute, DwarfForm, uint64)); - MOCK_METHOD4(ProcessAttributeBuffer, - void(DwarfAttribute, DwarfForm, const char *, uint64)); - MOCK_METHOD3(ProcessAttributeString, - void(DwarfAttribute, DwarfForm, const string &)); - MOCK_METHOD0(EndAttributes, bool()); - MOCK_METHOD3(FindChildHandler, DIEHandler *(uint64, DwarfTag, - const AttributeList &)); - MOCK_METHOD0(Finish, void()); -}; - -class MockRootDIEHandler: public RootDIEHandler { - public: - MOCK_METHOD3(ProcessAttributeUnsigned, - void(DwarfAttribute, DwarfForm, uint64)); - MOCK_METHOD3(ProcessAttributeSigned, - void(DwarfAttribute, DwarfForm, int64)); - MOCK_METHOD3(ProcessAttributeReference, - void(DwarfAttribute, DwarfForm, uint64)); - MOCK_METHOD4(ProcessAttributeBuffer, - void(DwarfAttribute, DwarfForm, const char *, uint64)); - MOCK_METHOD3(ProcessAttributeString, - void(DwarfAttribute, DwarfForm, const string &)); - MOCK_METHOD0(EndAttributes, bool()); - MOCK_METHOD3(FindChildHandler, DIEHandler *(uint64, DwarfTag, - const AttributeList &)); - MOCK_METHOD0(Finish, void()); - MOCK_METHOD5(StartCompilationUnit, bool(uint64, uint8, uint8, uint64, uint8)); - MOCK_METHOD3(StartRootDIE, bool(uint64, DwarfTag, const AttributeList &)); -}; - -// If the handler elects to skip the compilation unit, the dispatcher -// should tell the reader so. -TEST(Dwarf2DIEHandler, SkipCompilationUnit) { - Sequence s; - MockRootDIEHandler mock_root_handler; - DIEDispatcher die_dispatcher(&mock_root_handler); - - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0x8d42aed77cfccf3eLL, - 0x89, 0xdc, - 0x2ecb4dc778a80f21LL, - 0x66)) - .InSequence(s) - .WillOnce(Return(false)); - - EXPECT_FALSE(die_dispatcher.StartCompilationUnit(0x8d42aed77cfccf3eLL, - 0x89, 0xdc, - 0x2ecb4dc778a80f21LL, - 0x66)); -} - -// If the handler elects to skip the root DIE, the dispatcher should -// tell the reader so. -TEST(Dwarf2DIEHandler, SkipRootDIE) { - Sequence s; - MockRootDIEHandler mock_root_handler; - DIEDispatcher die_dispatcher(&mock_root_handler); - - AttributeList mock_attribute_list; - mock_attribute_list.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_string)); - - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0xde8994029fc8b999LL, 0xf4, 0x02, - 0xb00febffa76e2b2bLL, 0x5c)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(mock_root_handler, - StartRootDIE(0x7d08242b4b510cf2LL, (DwarfTag) 0xb4f98da6, - ContainerEq(mock_attribute_list))) - .InSequence(s) - .WillOnce(Return(false)); - - EXPECT_TRUE(die_dispatcher.StartCompilationUnit(0xde8994029fc8b999LL, - 0xf4, 0x02, - 0xb00febffa76e2b2bLL, 0x5c)); - EXPECT_FALSE(die_dispatcher.StartDIE(0x7d08242b4b510cf2LL, - (DwarfTag) 0xb4f98da6, - mock_attribute_list)); - die_dispatcher.EndDIE(0x7d08242b4b510cf2LL); -} - -// If the handler elects to skip the root DIE's children, the -// dispatcher should tell the reader so --- and avoid deleting the -// root handler. -TEST(Dwarf2DIEHandler, SkipRootDIEChildren) { - MockRootDIEHandler mock_root_handler; - DIEDispatcher die_dispatcher(&mock_root_handler); - - AttributeList mock_attribute_list; - - { - InSequence s; - - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0x15d6897480cc65a7LL, 0x26, 0xa0, - 0x09f8bf0767f91675LL, 0xdb)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_root_handler, - StartRootDIE(0x7d08242b4b510cf2LL, (DwarfTag) 0xb4f98da6, - ContainerEq(mock_attribute_list))) - .WillOnce(Return(true)); - // Please don't tell me about my children. - EXPECT_CALL(mock_root_handler, EndAttributes()) - .WillOnce(Return(false)); - EXPECT_CALL(mock_root_handler, Finish()) - .WillOnce(Return()); - } - - EXPECT_TRUE(die_dispatcher.StartCompilationUnit(0x15d6897480cc65a7LL, - 0x26, 0xa0, - 0x09f8bf0767f91675LL, 0xdb)); - EXPECT_TRUE(die_dispatcher.StartDIE(0x7d08242b4b510cf2LL, - (DwarfTag) 0xb4f98da6, - mock_attribute_list)); - EXPECT_FALSE(die_dispatcher.StartDIE(0x435150ceedccda18LL, - (DwarfTag) 0xc3a17bba, - mock_attribute_list)); - die_dispatcher.EndDIE(0x435150ceedccda18LL); - die_dispatcher.EndDIE(0x7d08242b4b510cf2LL); -} - -// The dispatcher should pass attribute values through to the die -// handler accurately. -TEST(Dwarf2DIEHandler, PassAttributeValues) { - MockRootDIEHandler mock_root_handler; - DIEDispatcher die_dispatcher(&mock_root_handler); - - AttributeList mock_attribute_list; - mock_attribute_list.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_string)); - const char buffer[10] = { 0x24, 0x24, 0x35, 0x9a, 0xca, - 0xcf, 0xa8, 0x84, 0xa7, 0x18 }; - string str = "\xc8\x26\x2e\x0d\xa4\x9c\x37\xd6\xfb\x1d"; - - // Set expectations. - { - InSequence s; - - // We'll like the compilation unit header. - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0x8d42aed77cfccf3eLL, 0x89, 0xdc, - 0x2ecb4dc778a80f21LL, 0x66)) - .WillOnce(Return(true)); - - // We'll like the root DIE. - EXPECT_CALL(mock_root_handler, - StartRootDIE(0xe2222da01e29f2a9LL, (DwarfTag) 0x9829445c, - ContainerEq(mock_attribute_list))) - .WillOnce(Return(true)); - - // Expect some attribute values. - EXPECT_CALL(mock_root_handler, - ProcessAttributeUnsigned((DwarfAttribute) 0x1cc0bfed, - (DwarfForm) 0x424f1468, - 0xa592571997facda1ULL)) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, - ProcessAttributeSigned((DwarfAttribute) 0x43694dc9, - (DwarfForm) 0xf6f78901L, - 0x92602a4e3bf1f446LL)) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, - ProcessAttributeReference((DwarfAttribute) 0x4033e8cL, - (DwarfForm) 0xf66fbe0bL, - 0x50fddef44734fdecULL)) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, - ProcessAttributeBuffer((DwarfAttribute) 0x25d7e0af, - (DwarfForm) 0xe99a539a, - buffer, sizeof(buffer))) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, - ProcessAttributeString((DwarfAttribute) 0x310ed065, - (DwarfForm) 0x15762fec, - StrEq(str))) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, EndAttributes()) - .WillOnce(Return(true)); - EXPECT_CALL(mock_root_handler, FindChildHandler(_, _, _)) - .Times(0); - EXPECT_CALL(mock_root_handler, Finish()) - .WillOnce(Return()); - } - - // Drive the dispatcher. - - // Report the CU header. - EXPECT_TRUE(die_dispatcher.StartCompilationUnit(0x8d42aed77cfccf3eLL, - 0x89, 0xdc, - 0x2ecb4dc778a80f21LL, - 0x66)); - // Report the root DIE. - EXPECT_TRUE(die_dispatcher.StartDIE(0xe2222da01e29f2a9LL, - (DwarfTag) 0x9829445c, - mock_attribute_list)); - - // Report some attribute values. - die_dispatcher.ProcessAttributeUnsigned(0xe2222da01e29f2a9LL, - (DwarfAttribute) 0x1cc0bfed, - (DwarfForm) 0x424f1468, - 0xa592571997facda1ULL); - die_dispatcher.ProcessAttributeSigned(0xe2222da01e29f2a9LL, - (DwarfAttribute) 0x43694dc9, - (DwarfForm) 0xf6f78901, - 0x92602a4e3bf1f446LL); - die_dispatcher.ProcessAttributeReference(0xe2222da01e29f2a9LL, - (DwarfAttribute) 0x4033e8c, - (DwarfForm) 0xf66fbe0b, - 0x50fddef44734fdecULL); - die_dispatcher.ProcessAttributeBuffer(0xe2222da01e29f2a9LL, - (DwarfAttribute) 0x25d7e0af, - (DwarfForm) 0xe99a539a, - buffer, sizeof(buffer)); - die_dispatcher.ProcessAttributeString(0xe2222da01e29f2a9LL, - (DwarfAttribute) 0x310ed065, - (DwarfForm) 0x15762fec, - str); - - // Finish the root DIE (and thus the CU). - die_dispatcher.EndDIE(0xe2222da01e29f2a9LL); -} - -TEST(Dwarf2DIEHandler, FindAndSkipChildren) { - MockRootDIEHandler mock_root_handler; - MockDIEHandler *mock_child1_handler = new(MockDIEHandler); - MockDIEHandler *mock_child3_handler = new(MockDIEHandler); - DIEDispatcher die_dispatcher(&mock_root_handler); - - AttributeList root_attribute_list; - root_attribute_list.push_back(make_pair((DwarfAttribute) 0xb01185df, - (DwarfForm) 0xbc97cee8)); - AttributeList child1_attribute_list; - child1_attribute_list.push_back(make_pair((DwarfAttribute) 0x41014e43, - (DwarfForm) 0x63155f4c)); - AttributeList grandchild1_attribute_list; - grandchild1_attribute_list.push_back(make_pair((DwarfAttribute) 0xf72f823c, - (DwarfForm) 0x0ff6a201)); - AttributeList greatgrandchild1_attribute_list; - greatgrandchild1_attribute_list - .push_back(make_pair((DwarfAttribute) 0xbe66e5f0, (DwarfForm) 0xb4b24ff7)); - AttributeList child2_attribute_list; - child1_attribute_list.push_back(make_pair((DwarfAttribute) 0xf22df14c, - (DwarfForm) 0x20676e7d)); - AttributeList child3_attribute_list; - child3_attribute_list.push_back(make_pair((DwarfAttribute) 0xe8bf1201, - (DwarfForm) 0x53a5b7a8)); - - { - InSequence s; - - // We'll like the compilation unit header. - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0x9ec1e6d05e434a0eLL, 0xeb, 0x21, - 0x47dd3c764275a216LL, 0xa5)) - .WillOnce(Return(true)); - - // Root DIE. - { - EXPECT_CALL(mock_root_handler, - StartRootDIE(0x15f0e06bdfe3c372LL, (DwarfTag) 0xf5d60c59, - ContainerEq(root_attribute_list))) - .WillOnce(Return(true)); - EXPECT_CALL(mock_root_handler, - ProcessAttributeSigned((DwarfAttribute) 0xf779a642, - (DwarfForm) 0x2cb63027, - 0x18e744661769d08fLL)) - .WillOnce(Return()); - EXPECT_CALL(mock_root_handler, EndAttributes()) - .WillOnce(Return(true)); - - // First child DIE. - EXPECT_CALL(mock_root_handler, - FindChildHandler(0x149f644f8116fe8cLL, - (DwarfTag) 0xac2cbd8c, - ContainerEq(child1_attribute_list))) - .WillOnce(Return(mock_child1_handler)); - { - EXPECT_CALL(*mock_child1_handler, - ProcessAttributeSigned((DwarfAttribute) 0xa6fd6f65, - (DwarfForm) 0xe4f64c41, - 0x1b04e5444a55fe67LL)) - .WillOnce(Return()); - EXPECT_CALL(*mock_child1_handler, EndAttributes()) - .WillOnce(Return(false)); - // Skip first grandchild DIE and first great-grandchild DIE. - EXPECT_CALL(*mock_child1_handler, Finish()) - .WillOnce(Return()); - } - - // Second child DIE. Root handler will decline to return a handler - // for this child. - EXPECT_CALL(mock_root_handler, - FindChildHandler(0x97412be24875de9dLL, - (DwarfTag) 0x505a068b, - ContainerEq(child2_attribute_list))) - .WillOnce(Return((DIEHandler *) NULL)); - - // Third child DIE. - EXPECT_CALL(mock_root_handler, - FindChildHandler(0x753c964c8ab538aeLL, - (DwarfTag) 0x8c22970e, - ContainerEq(child3_attribute_list))) - .WillOnce(Return(mock_child3_handler)); - { - EXPECT_CALL(*mock_child3_handler, - ProcessAttributeSigned((DwarfAttribute) 0x4e2b7cfb, - (DwarfForm) 0x610b7ae1, - 0x3ea5c609d7d7560fLL)) - .WillOnce(Return()); - EXPECT_CALL(*mock_child3_handler, EndAttributes()) - .WillOnce(Return(true)); - EXPECT_CALL(*mock_child3_handler, Finish()) - .WillOnce(Return()); - } - - EXPECT_CALL(mock_root_handler, Finish()) - .WillOnce(Return()); - } - } - - - // Drive the dispatcher. - - // Report the CU header. - EXPECT_TRUE(die_dispatcher - .StartCompilationUnit(0x9ec1e6d05e434a0eLL, 0xeb, 0x21, - 0x47dd3c764275a216LL, 0xa5)); - // Report the root DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0x15f0e06bdfe3c372LL, - (DwarfTag) 0xf5d60c59, - root_attribute_list)); - die_dispatcher.ProcessAttributeSigned(0x15f0e06bdfe3c372LL, - (DwarfAttribute) 0xf779a642, - (DwarfForm) 0x2cb63027, - 0x18e744661769d08fLL); - - // First child DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0x149f644f8116fe8cLL, - (DwarfTag) 0xac2cbd8c, - child1_attribute_list)); - die_dispatcher.ProcessAttributeSigned(0x149f644f8116fe8cLL, - (DwarfAttribute) 0xa6fd6f65, - (DwarfForm) 0xe4f64c41, - 0x1b04e5444a55fe67LL); - - // First grandchild DIE. Will be skipped. - { - EXPECT_FALSE(die_dispatcher.StartDIE(0xd68de1ee0bd29419LL, - (DwarfTag) 0x22f05a15, - grandchild1_attribute_list)); - // First great-grandchild DIE. Will be skipped without being - // mentioned to any handler. - { - EXPECT_FALSE(die_dispatcher - .StartDIE(0xb3076285d25cac25LL, - (DwarfTag) 0xcff4061b, - greatgrandchild1_attribute_list)); - die_dispatcher.EndDIE(0xb3076285d25cac25LL); - } - die_dispatcher.EndDIE(0xd68de1ee0bd29419LL); - } - die_dispatcher.EndDIE(0x149f644f8116fe8cLL); - } - - // Second child DIE. Root handler will decline to find a handler for it. - { - EXPECT_FALSE(die_dispatcher.StartDIE(0x97412be24875de9dLL, - (DwarfTag) 0x505a068b, - child2_attribute_list)); - die_dispatcher.EndDIE(0x97412be24875de9dLL); - } - - // Third child DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0x753c964c8ab538aeLL, - (DwarfTag) 0x8c22970e, - child3_attribute_list)); - die_dispatcher.ProcessAttributeSigned(0x753c964c8ab538aeLL, - (DwarfAttribute) 0x4e2b7cfb, - (DwarfForm) 0x610b7ae1, - 0x3ea5c609d7d7560fLL); - die_dispatcher.EndDIE(0x753c964c8ab538aeLL); - } - - // Finish the root DIE (and thus the CU). - die_dispatcher.EndDIE(0x15f0e06bdfe3c372LL); - } -} - -// The DIEDispatcher destructor is supposed to delete all handlers on -// the stack, except for the root. -TEST(Dwarf2DIEHandler, FreeHandlersOnStack) { - MockRootDIEHandler mock_root_handler; - MockDIEHandler *mock_child_handler = new(MockDIEHandler); - MockDIEHandler *mock_grandchild_handler = new(MockDIEHandler); - AttributeList empty_attribute_list; - - { - InSequence s; - - // We'll like the compilation unit header. - EXPECT_CALL(mock_root_handler, - StartCompilationUnit(0x87b41ba8381cd71cLL, 0xff, 0x89, - 0x76d392ff393ddda2LL, 0xbf)) - .WillOnce(Return(true)); - - // Root DIE. - { - EXPECT_CALL(mock_root_handler, - StartRootDIE(0xbf13b761691ddc91LL, (DwarfTag) 0x98980361, - ContainerEq(empty_attribute_list))) - .WillOnce(Return(true)); - EXPECT_CALL(mock_root_handler, EndAttributes()) - .WillOnce(Return(true)); - - // Child DIE. - EXPECT_CALL(mock_root_handler, - FindChildHandler(0x058f09240c5fc8c9LL, - (DwarfTag) 0x898bf0d0, - ContainerEq(empty_attribute_list))) - .WillOnce(Return(mock_child_handler)); - { - EXPECT_CALL(*mock_child_handler, EndAttributes()) - .WillOnce(Return(true)); - - // Grandchild DIE. - EXPECT_CALL(*mock_child_handler, - FindChildHandler(0x32dc00c9945dc0c8LL, - (DwarfTag) 0x2802d007, - ContainerEq(empty_attribute_list))) - .WillOnce(Return(mock_grandchild_handler)); - { - EXPECT_CALL(*mock_grandchild_handler, - ProcessAttributeSigned((DwarfAttribute) 0x4e2b7cfb, - (DwarfForm) 0x610b7ae1, - 0x3ea5c609d7d7560fLL)) - .WillOnce(Return()); - - // At this point, we abandon the traversal, so none of the - // usual stuff should get called. - EXPECT_CALL(*mock_grandchild_handler, EndAttributes()) - .Times(0); - EXPECT_CALL(*mock_grandchild_handler, Finish()) - .Times(0); - } - - EXPECT_CALL(*mock_child_handler, Finish()) - .Times(0); - } - - EXPECT_CALL(mock_root_handler, Finish()) - .Times(0); - } - } - - // The dispatcher. - DIEDispatcher die_dispatcher(&mock_root_handler); - - // Report the CU header. - EXPECT_TRUE(die_dispatcher - .StartCompilationUnit(0x87b41ba8381cd71cLL, 0xff, 0x89, - 0x76d392ff393ddda2LL, 0xbf)); - // Report the root DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0xbf13b761691ddc91LL, - (DwarfTag) 0x98980361, - empty_attribute_list)); - - // Child DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0x058f09240c5fc8c9LL, - (DwarfTag) 0x898bf0d0, - empty_attribute_list)); - - // Grandchild DIE. - { - EXPECT_TRUE(die_dispatcher.StartDIE(0x32dc00c9945dc0c8LL, - (DwarfTag) 0x2802d007, - empty_attribute_list)); - die_dispatcher.ProcessAttributeSigned(0x32dc00c9945dc0c8LL, - (DwarfAttribute) 0x4e2b7cfb, - (DwarfForm) 0x610b7ae1, - 0x3ea5c609d7d7560fLL); - - // Stop the traversal abruptly, so that there will still be - // handlers on the stack when the dispatcher is destructed. - - // No EndDIE call... - } - // No EndDIE call... - } - // No EndDIE call... - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2enums.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2enums.h deleted file mode 100644 index 832a17ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2enums.h +++ /dev/null @@ -1,644 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_DWARF_DWARF2ENUMS_H__ -#define COMMON_DWARF_DWARF2ENUMS_H__ - -namespace dwarf2reader { - -// These enums do not follow the google3 style only because they are -// known universally (specs, other implementations) by the names in -// exactly this capitalization. -// Tag names and codes. -enum DwarfTag { - DW_TAG_padding = 0x00, - DW_TAG_array_type = 0x01, - DW_TAG_class_type = 0x02, - DW_TAG_entry_point = 0x03, - DW_TAG_enumeration_type = 0x04, - DW_TAG_formal_parameter = 0x05, - DW_TAG_imported_declaration = 0x08, - DW_TAG_label = 0x0a, - DW_TAG_lexical_block = 0x0b, - DW_TAG_member = 0x0d, - DW_TAG_pointer_type = 0x0f, - DW_TAG_reference_type = 0x10, - DW_TAG_compile_unit = 0x11, - DW_TAG_string_type = 0x12, - DW_TAG_structure_type = 0x13, - DW_TAG_subroutine_type = 0x15, - DW_TAG_typedef = 0x16, - DW_TAG_union_type = 0x17, - DW_TAG_unspecified_parameters = 0x18, - DW_TAG_variant = 0x19, - DW_TAG_common_block = 0x1a, - DW_TAG_common_inclusion = 0x1b, - DW_TAG_inheritance = 0x1c, - DW_TAG_inlined_subroutine = 0x1d, - DW_TAG_module = 0x1e, - DW_TAG_ptr_to_member_type = 0x1f, - DW_TAG_set_type = 0x20, - DW_TAG_subrange_type = 0x21, - DW_TAG_with_stmt = 0x22, - DW_TAG_access_declaration = 0x23, - DW_TAG_base_type = 0x24, - DW_TAG_catch_block = 0x25, - DW_TAG_const_type = 0x26, - DW_TAG_constant = 0x27, - DW_TAG_enumerator = 0x28, - DW_TAG_file_type = 0x29, - DW_TAG_friend = 0x2a, - DW_TAG_namelist = 0x2b, - DW_TAG_namelist_item = 0x2c, - DW_TAG_packed_type = 0x2d, - DW_TAG_subprogram = 0x2e, - DW_TAG_template_type_param = 0x2f, - DW_TAG_template_value_param = 0x30, - DW_TAG_thrown_type = 0x31, - DW_TAG_try_block = 0x32, - DW_TAG_variant_part = 0x33, - DW_TAG_variable = 0x34, - DW_TAG_volatile_type = 0x35, - // DWARF 3. - DW_TAG_dwarf_procedure = 0x36, - DW_TAG_restrict_type = 0x37, - DW_TAG_interface_type = 0x38, - DW_TAG_namespace = 0x39, - DW_TAG_imported_module = 0x3a, - DW_TAG_unspecified_type = 0x3b, - DW_TAG_partial_unit = 0x3c, - DW_TAG_imported_unit = 0x3d, - // SGI/MIPS Extensions. - DW_TAG_MIPS_loop = 0x4081, - // HP extensions. See: - // ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz - DW_TAG_HP_array_descriptor = 0x4090, - // GNU extensions. - DW_TAG_format_label = 0x4101, // For FORTRAN 77 and Fortran 90. - DW_TAG_function_template = 0x4102, // For C++. - DW_TAG_class_template = 0x4103, // For C++. - DW_TAG_GNU_BINCL = 0x4104, - DW_TAG_GNU_EINCL = 0x4105, - // Extensions for UPC. See: http://upc.gwu.edu/~upc. - DW_TAG_upc_shared_type = 0x8765, - DW_TAG_upc_strict_type = 0x8766, - DW_TAG_upc_relaxed_type = 0x8767, - // PGI (STMicroelectronics) extensions. No documentation available. - DW_TAG_PGI_kanji_type = 0xA000, - DW_TAG_PGI_interface_block = 0xA020 -}; - - -enum DwarfHasChild { - DW_children_no = 0, - DW_children_yes = 1 -}; - -// Form names and codes. -enum DwarfForm { - DW_FORM_addr = 0x01, - DW_FORM_block2 = 0x03, - DW_FORM_block4 = 0x04, - DW_FORM_data2 = 0x05, - DW_FORM_data4 = 0x06, - DW_FORM_data8 = 0x07, - DW_FORM_string = 0x08, - DW_FORM_block = 0x09, - DW_FORM_block1 = 0x0a, - DW_FORM_data1 = 0x0b, - DW_FORM_flag = 0x0c, - DW_FORM_sdata = 0x0d, - DW_FORM_strp = 0x0e, - DW_FORM_udata = 0x0f, - DW_FORM_ref_addr = 0x10, - DW_FORM_ref1 = 0x11, - DW_FORM_ref2 = 0x12, - DW_FORM_ref4 = 0x13, - DW_FORM_ref8 = 0x14, - DW_FORM_ref_udata = 0x15, - DW_FORM_indirect = 0x16 -}; - -// Attribute names and codes -enum DwarfAttribute { - DW_AT_sibling = 0x01, - DW_AT_location = 0x02, - DW_AT_name = 0x03, - DW_AT_ordering = 0x09, - DW_AT_subscr_data = 0x0a, - DW_AT_byte_size = 0x0b, - DW_AT_bit_offset = 0x0c, - DW_AT_bit_size = 0x0d, - DW_AT_element_list = 0x0f, - DW_AT_stmt_list = 0x10, - DW_AT_low_pc = 0x11, - DW_AT_high_pc = 0x12, - DW_AT_language = 0x13, - DW_AT_member = 0x14, - DW_AT_discr = 0x15, - DW_AT_discr_value = 0x16, - DW_AT_visibility = 0x17, - DW_AT_import = 0x18, - DW_AT_string_length = 0x19, - DW_AT_common_reference = 0x1a, - DW_AT_comp_dir = 0x1b, - DW_AT_const_value = 0x1c, - DW_AT_containing_type = 0x1d, - DW_AT_default_value = 0x1e, - DW_AT_inline = 0x20, - DW_AT_is_optional = 0x21, - DW_AT_lower_bound = 0x22, - DW_AT_producer = 0x25, - DW_AT_prototyped = 0x27, - DW_AT_return_addr = 0x2a, - DW_AT_start_scope = 0x2c, - DW_AT_stride_size = 0x2e, - DW_AT_upper_bound = 0x2f, - DW_AT_abstract_origin = 0x31, - DW_AT_accessibility = 0x32, - DW_AT_address_class = 0x33, - DW_AT_artificial = 0x34, - DW_AT_base_types = 0x35, - DW_AT_calling_convention = 0x36, - DW_AT_count = 0x37, - DW_AT_data_member_location = 0x38, - DW_AT_decl_column = 0x39, - DW_AT_decl_file = 0x3a, - DW_AT_decl_line = 0x3b, - DW_AT_declaration = 0x3c, - DW_AT_discr_list = 0x3d, - DW_AT_encoding = 0x3e, - DW_AT_external = 0x3f, - DW_AT_frame_base = 0x40, - DW_AT_friend = 0x41, - DW_AT_identifier_case = 0x42, - DW_AT_macro_info = 0x43, - DW_AT_namelist_items = 0x44, - DW_AT_priority = 0x45, - DW_AT_segment = 0x46, - DW_AT_specification = 0x47, - DW_AT_static_link = 0x48, - DW_AT_type = 0x49, - DW_AT_use_location = 0x4a, - DW_AT_variable_parameter = 0x4b, - DW_AT_virtuality = 0x4c, - DW_AT_vtable_elem_location = 0x4d, - // DWARF 3 values. - DW_AT_allocated = 0x4e, - DW_AT_associated = 0x4f, - DW_AT_data_location = 0x50, - DW_AT_stride = 0x51, - DW_AT_entry_pc = 0x52, - DW_AT_use_UTF8 = 0x53, - DW_AT_extension = 0x54, - DW_AT_ranges = 0x55, - DW_AT_trampoline = 0x56, - DW_AT_call_column = 0x57, - DW_AT_call_file = 0x58, - DW_AT_call_line = 0x59, - // SGI/MIPS extensions. - DW_AT_MIPS_fde = 0x2001, - DW_AT_MIPS_loop_begin = 0x2002, - DW_AT_MIPS_tail_loop_begin = 0x2003, - DW_AT_MIPS_epilog_begin = 0x2004, - DW_AT_MIPS_loop_unroll_factor = 0x2005, - DW_AT_MIPS_software_pipeline_depth = 0x2006, - DW_AT_MIPS_linkage_name = 0x2007, - DW_AT_MIPS_stride = 0x2008, - DW_AT_MIPS_abstract_name = 0x2009, - DW_AT_MIPS_clone_origin = 0x200a, - DW_AT_MIPS_has_inlines = 0x200b, - // HP extensions. - DW_AT_HP_block_index = 0x2000, - DW_AT_HP_unmodifiable = 0x2001, // Same as DW_AT_MIPS_fde. - DW_AT_HP_actuals_stmt_list = 0x2010, - DW_AT_HP_proc_per_section = 0x2011, - DW_AT_HP_raw_data_ptr = 0x2012, - DW_AT_HP_pass_by_reference = 0x2013, - DW_AT_HP_opt_level = 0x2014, - DW_AT_HP_prof_version_id = 0x2015, - DW_AT_HP_opt_flags = 0x2016, - DW_AT_HP_cold_region_low_pc = 0x2017, - DW_AT_HP_cold_region_high_pc = 0x2018, - DW_AT_HP_all_variables_modifiable = 0x2019, - DW_AT_HP_linkage_name = 0x201a, - DW_AT_HP_prof_flags = 0x201b, // In comp unit of procs_info for -g. - // GNU extensions. - DW_AT_sf_names = 0x2101, - DW_AT_src_info = 0x2102, - DW_AT_mac_info = 0x2103, - DW_AT_src_coords = 0x2104, - DW_AT_body_begin = 0x2105, - DW_AT_body_end = 0x2106, - DW_AT_GNU_vector = 0x2107, - // VMS extensions. - DW_AT_VMS_rtnbeg_pd_address = 0x2201, - // UPC extension. - DW_AT_upc_threads_scaled = 0x3210, - // PGI (STMicroelectronics) extensions. - DW_AT_PGI_lbase = 0x3a00, - DW_AT_PGI_soffset = 0x3a01, - DW_AT_PGI_lstride = 0x3a02 -}; - - -// Line number opcodes. -enum DwarfLineNumberOps { - DW_LNS_extended_op = 0, - DW_LNS_copy = 1, - DW_LNS_advance_pc = 2, - DW_LNS_advance_line = 3, - DW_LNS_set_file = 4, - DW_LNS_set_column = 5, - DW_LNS_negate_stmt = 6, - DW_LNS_set_basic_block = 7, - DW_LNS_const_add_pc = 8, - DW_LNS_fixed_advance_pc = 9, - // DWARF 3. - DW_LNS_set_prologue_end = 10, - DW_LNS_set_epilogue_begin = 11, - DW_LNS_set_isa = 12 -}; - -// Line number extended opcodes. -enum DwarfLineNumberExtendedOps { - DW_LNE_end_sequence = 1, - DW_LNE_set_address = 2, - DW_LNE_define_file = 3, - // HP extensions. - DW_LNE_HP_negate_is_UV_update = 0x11, - DW_LNE_HP_push_context = 0x12, - DW_LNE_HP_pop_context = 0x13, - DW_LNE_HP_set_file_line_column = 0x14, - DW_LNE_HP_set_routine_name = 0x15, - DW_LNE_HP_set_sequence = 0x16, - DW_LNE_HP_negate_post_semantics = 0x17, - DW_LNE_HP_negate_function_exit = 0x18, - DW_LNE_HP_negate_front_end_logical = 0x19, - DW_LNE_HP_define_proc = 0x20 -}; - -// Type encoding names and codes -enum DwarfEncoding { - DW_ATE_address =0x1, - DW_ATE_boolean =0x2, - DW_ATE_complex_float =0x3, - DW_ATE_float =0x4, - DW_ATE_signed =0x5, - DW_ATE_signed_char =0x6, - DW_ATE_unsigned =0x7, - DW_ATE_unsigned_char =0x8, - // DWARF3/DWARF3f - DW_ATE_imaginary_float =0x9, - DW_ATE_packed_decimal =0xa, - DW_ATE_numeric_string =0xb, - DW_ATE_edited =0xc, - DW_ATE_signed_fixed =0xd, - DW_ATE_unsigned_fixed =0xe, - DW_ATE_decimal_float =0xf, - DW_ATE_lo_user =0x80, - DW_ATE_hi_user =0xff -}; - -// Location virtual machine opcodes -enum DwarfOpcode { - DW_OP_addr =0x03, - DW_OP_deref =0x06, - DW_OP_const1u =0x08, - DW_OP_const1s =0x09, - DW_OP_const2u =0x0a, - DW_OP_const2s =0x0b, - DW_OP_const4u =0x0c, - DW_OP_const4s =0x0d, - DW_OP_const8u =0x0e, - DW_OP_const8s =0x0f, - DW_OP_constu =0x10, - DW_OP_consts =0x11, - DW_OP_dup =0x12, - DW_OP_drop =0x13, - DW_OP_over =0x14, - DW_OP_pick =0x15, - DW_OP_swap =0x16, - DW_OP_rot =0x17, - DW_OP_xderef =0x18, - DW_OP_abs =0x19, - DW_OP_and =0x1a, - DW_OP_div =0x1b, - DW_OP_minus =0x1c, - DW_OP_mod =0x1d, - DW_OP_mul =0x1e, - DW_OP_neg =0x1f, - DW_OP_not =0x20, - DW_OP_or =0x21, - DW_OP_plus =0x22, - DW_OP_plus_uconst =0x23, - DW_OP_shl =0x24, - DW_OP_shr =0x25, - DW_OP_shra =0x26, - DW_OP_xor =0x27, - DW_OP_bra =0x28, - DW_OP_eq =0x29, - DW_OP_ge =0x2a, - DW_OP_gt =0x2b, - DW_OP_le =0x2c, - DW_OP_lt =0x2d, - DW_OP_ne =0x2e, - DW_OP_skip =0x2f, - DW_OP_lit0 =0x30, - DW_OP_lit1 =0x31, - DW_OP_lit2 =0x32, - DW_OP_lit3 =0x33, - DW_OP_lit4 =0x34, - DW_OP_lit5 =0x35, - DW_OP_lit6 =0x36, - DW_OP_lit7 =0x37, - DW_OP_lit8 =0x38, - DW_OP_lit9 =0x39, - DW_OP_lit10 =0x3a, - DW_OP_lit11 =0x3b, - DW_OP_lit12 =0x3c, - DW_OP_lit13 =0x3d, - DW_OP_lit14 =0x3e, - DW_OP_lit15 =0x3f, - DW_OP_lit16 =0x40, - DW_OP_lit17 =0x41, - DW_OP_lit18 =0x42, - DW_OP_lit19 =0x43, - DW_OP_lit20 =0x44, - DW_OP_lit21 =0x45, - DW_OP_lit22 =0x46, - DW_OP_lit23 =0x47, - DW_OP_lit24 =0x48, - DW_OP_lit25 =0x49, - DW_OP_lit26 =0x4a, - DW_OP_lit27 =0x4b, - DW_OP_lit28 =0x4c, - DW_OP_lit29 =0x4d, - DW_OP_lit30 =0x4e, - DW_OP_lit31 =0x4f, - DW_OP_reg0 =0x50, - DW_OP_reg1 =0x51, - DW_OP_reg2 =0x52, - DW_OP_reg3 =0x53, - DW_OP_reg4 =0x54, - DW_OP_reg5 =0x55, - DW_OP_reg6 =0x56, - DW_OP_reg7 =0x57, - DW_OP_reg8 =0x58, - DW_OP_reg9 =0x59, - DW_OP_reg10 =0x5a, - DW_OP_reg11 =0x5b, - DW_OP_reg12 =0x5c, - DW_OP_reg13 =0x5d, - DW_OP_reg14 =0x5e, - DW_OP_reg15 =0x5f, - DW_OP_reg16 =0x60, - DW_OP_reg17 =0x61, - DW_OP_reg18 =0x62, - DW_OP_reg19 =0x63, - DW_OP_reg20 =0x64, - DW_OP_reg21 =0x65, - DW_OP_reg22 =0x66, - DW_OP_reg23 =0x67, - DW_OP_reg24 =0x68, - DW_OP_reg25 =0x69, - DW_OP_reg26 =0x6a, - DW_OP_reg27 =0x6b, - DW_OP_reg28 =0x6c, - DW_OP_reg29 =0x6d, - DW_OP_reg30 =0x6e, - DW_OP_reg31 =0x6f, - DW_OP_breg0 =0x70, - DW_OP_breg1 =0x71, - DW_OP_breg2 =0x72, - DW_OP_breg3 =0x73, - DW_OP_breg4 =0x74, - DW_OP_breg5 =0x75, - DW_OP_breg6 =0x76, - DW_OP_breg7 =0x77, - DW_OP_breg8 =0x78, - DW_OP_breg9 =0x79, - DW_OP_breg10 =0x7a, - DW_OP_breg11 =0x7b, - DW_OP_breg12 =0x7c, - DW_OP_breg13 =0x7d, - DW_OP_breg14 =0x7e, - DW_OP_breg15 =0x7f, - DW_OP_breg16 =0x80, - DW_OP_breg17 =0x81, - DW_OP_breg18 =0x82, - DW_OP_breg19 =0x83, - DW_OP_breg20 =0x84, - DW_OP_breg21 =0x85, - DW_OP_breg22 =0x86, - DW_OP_breg23 =0x87, - DW_OP_breg24 =0x88, - DW_OP_breg25 =0x89, - DW_OP_breg26 =0x8a, - DW_OP_breg27 =0x8b, - DW_OP_breg28 =0x8c, - DW_OP_breg29 =0x8d, - DW_OP_breg30 =0x8e, - DW_OP_breg31 =0x8f, - DW_OP_regX =0x90, - DW_OP_fbreg =0x91, - DW_OP_bregX =0x92, - DW_OP_piece =0x93, - DW_OP_deref_size =0x94, - DW_OP_xderef_size =0x95, - DW_OP_nop =0x96, - // DWARF3/DWARF3f - DW_OP_push_object_address =0x97, - DW_OP_call2 =0x98, - DW_OP_call4 =0x99, - DW_OP_call_ref =0x9a, - DW_OP_form_tls_address =0x9b, - DW_OP_call_frame_cfa =0x9c, - DW_OP_bit_piece =0x9d, - DW_OP_lo_user =0xe0, - DW_OP_hi_user =0xff, - // GNU extensions - DW_OP_GNU_push_tls_address =0xe0 -}; - -// Source languages. These are values for DW_AT_language. -enum DwarfLanguage - { - DW_LANG_none =0x0000, - DW_LANG_C89 =0x0001, - DW_LANG_C =0x0002, - DW_LANG_Ada83 =0x0003, - DW_LANG_C_plus_plus =0x0004, - DW_LANG_Cobol74 =0x0005, - DW_LANG_Cobol85 =0x0006, - DW_LANG_Fortran77 =0x0007, - DW_LANG_Fortran90 =0x0008, - DW_LANG_Pascal83 =0x0009, - DW_LANG_Modula2 =0x000a, - DW_LANG_Java =0x000b, - DW_LANG_C99 =0x000c, - DW_LANG_Ada95 =0x000d, - DW_LANG_Fortran95 =0x000e, - DW_LANG_PLI =0x000f, - DW_LANG_ObjC =0x0010, - DW_LANG_ObjC_plus_plus =0x0011, - DW_LANG_UPC =0x0012, - DW_LANG_D =0x0013, - // Implementation-defined language code range. - DW_LANG_lo_user = 0x8000, - DW_LANG_hi_user = 0xffff, - - // Extensions. - - // MIPS assembly language. The GNU toolchain uses this for all - // assembly languages, since there's no generic DW_LANG_ value for that. - // See include/dwarf2.h in the binutils, gdb, or gcc source trees. - DW_LANG_Mips_Assembler =0x8001, - DW_LANG_Upc =0x8765 // Unified Parallel C - }; - -// Inline codes. These are values for DW_AT_inline. -enum DwarfInline { - DW_INL_not_inlined =0x0, - DW_INL_inlined =0x1, - DW_INL_declared_not_inlined =0x2, - DW_INL_declared_inlined =0x3 -}; - -// Call Frame Info instructions. -enum DwarfCFI - { - DW_CFA_advance_loc = 0x40, - DW_CFA_offset = 0x80, - DW_CFA_restore = 0xc0, - DW_CFA_nop = 0x00, - DW_CFA_set_loc = 0x01, - DW_CFA_advance_loc1 = 0x02, - DW_CFA_advance_loc2 = 0x03, - DW_CFA_advance_loc4 = 0x04, - DW_CFA_offset_extended = 0x05, - DW_CFA_restore_extended = 0x06, - DW_CFA_undefined = 0x07, - DW_CFA_same_value = 0x08, - DW_CFA_register = 0x09, - DW_CFA_remember_state = 0x0a, - DW_CFA_restore_state = 0x0b, - DW_CFA_def_cfa = 0x0c, - DW_CFA_def_cfa_register = 0x0d, - DW_CFA_def_cfa_offset = 0x0e, - DW_CFA_def_cfa_expression = 0x0f, - DW_CFA_expression = 0x10, - DW_CFA_offset_extended_sf = 0x11, - DW_CFA_def_cfa_sf = 0x12, - DW_CFA_def_cfa_offset_sf = 0x13, - DW_CFA_val_offset = 0x14, - DW_CFA_val_offset_sf = 0x15, - DW_CFA_val_expression = 0x16, - - // Opcodes in this range are reserved for user extensions. - DW_CFA_lo_user = 0x1c, - DW_CFA_hi_user = 0x3f, - - // SGI/MIPS specific. - DW_CFA_MIPS_advance_loc8 = 0x1d, - - // GNU extensions. - DW_CFA_GNU_window_save = 0x2d, - DW_CFA_GNU_args_size = 0x2e, - DW_CFA_GNU_negative_offset_extended = 0x2f - }; - -// Exception handling 'z' augmentation letters. -enum DwarfZAugmentationCodes { - // If the CFI augmentation string begins with 'z', then the CIE and FDE - // have an augmentation data area just before the instructions, whose - // contents are determined by the subsequent augmentation letters. - DW_Z_augmentation_start = 'z', - - // If this letter is present in a 'z' augmentation string, the CIE - // augmentation data includes a pointer encoding, and the FDE - // augmentation data includes a language-specific data area pointer, - // represented using that encoding. - DW_Z_has_LSDA = 'L', - - // If this letter is present in a 'z' augmentation string, the CIE - // augmentation data includes a pointer encoding, followed by a pointer - // to a personality routine, represented using that encoding. - DW_Z_has_personality_routine = 'P', - - // If this letter is present in a 'z' augmentation string, the CIE - // augmentation data includes a pointer encoding describing how the FDE's - // initial location, address range, and DW_CFA_set_loc operands are - // encoded. - DW_Z_has_FDE_address_encoding = 'R', - - // If this letter is present in a 'z' augmentation string, then code - // addresses covered by FDEs that cite this CIE are signal delivery - // trampolines. Return addresses of frames in trampolines should not be - // adjusted as described in section 6.4.4 of the DWARF 3 spec. - DW_Z_is_signal_trampoline = 'S' -}; - -// Exception handling frame description pointer formats, as described -// by the Linux Standard Base Core Specification 4.0, section 11.5, -// DWARF Extensions. -enum DwarfPointerEncoding - { - DW_EH_PE_absptr = 0x00, - DW_EH_PE_omit = 0xff, - DW_EH_PE_uleb128 = 0x01, - DW_EH_PE_udata2 = 0x02, - DW_EH_PE_udata4 = 0x03, - DW_EH_PE_udata8 = 0x04, - DW_EH_PE_sleb128 = 0x09, - DW_EH_PE_sdata2 = 0x0A, - DW_EH_PE_sdata4 = 0x0B, - DW_EH_PE_sdata8 = 0x0C, - DW_EH_PE_pcrel = 0x10, - DW_EH_PE_textrel = 0x20, - DW_EH_PE_datarel = 0x30, - DW_EH_PE_funcrel = 0x40, - DW_EH_PE_aligned = 0x50, - - // The GNU toolchain sources define this enum value as well, - // simply to help classify the lower nybble values into signed and - // unsigned groups. - DW_EH_PE_signed = 0x08, - - // This is not documented in LSB 4.0, but it is used in both the - // Linux and OS X toolchains. It can be added to any other - // encoding (except DW_EH_PE_aligned), and indicates that the - // encoded value represents the address at which the true address - // is stored, not the true address itself. - DW_EH_PE_indirect = 0x80 - }; - -} // namespace dwarf2reader -#endif // COMMON_DWARF_DWARF2ENUMS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.cc deleted file mode 100644 index 63d1ffb7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.cc +++ /dev/null @@ -1,2363 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// CFI reader author: Jim Blandy - -// Implementation of dwarf2reader::LineInfo, dwarf2reader::CompilationUnit, -// and dwarf2reader::CallFrameInfo. See dwarf2reader.h for details. - -#include "common/dwarf/dwarf2reader.h" - -#include -#include -#include -#include - -#include -#include -#include - -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/bytereader.h" -#include "common/dwarf/line_state_machine.h" - -namespace dwarf2reader { - -CompilationUnit::CompilationUnit(const SectionMap& sections, uint64 offset, - ByteReader* reader, Dwarf2Handler* handler) - : offset_from_section_start_(offset), reader_(reader), - sections_(sections), handler_(handler), abbrevs_(NULL), - string_buffer_(NULL), string_buffer_length_(0) {} - -// Read a DWARF2/3 abbreviation section. -// Each abbrev consists of a abbreviation number, a tag, a byte -// specifying whether the tag has children, and a list of -// attribute/form pairs. -// The list of forms is terminated by a 0 for the attribute, and a -// zero for the form. The entire abbreviation section is terminated -// by a zero for the code. - -void CompilationUnit::ReadAbbrevs() { - if (abbrevs_) - return; - - // First get the debug_abbrev section. ".debug_abbrev" is the name - // recommended in the DWARF spec, and used on Linux; - // "__debug_abbrev" is the name used in Mac OS X Mach-O files. - SectionMap::const_iterator iter = sections_.find(".debug_abbrev"); - if (iter == sections_.end()) - iter = sections_.find("__debug_abbrev"); - assert(iter != sections_.end()); - - abbrevs_ = new vector; - abbrevs_->resize(1); - - // The only way to check whether we are reading over the end of the - // buffer would be to first compute the size of the leb128 data by - // reading it, then go back and read it again. - const char* abbrev_start = iter->second.first + - header_.abbrev_offset; - const char* abbrevptr = abbrev_start; -#ifndef NDEBUG - const uint64 abbrev_length = iter->second.second - header_.abbrev_offset; -#endif - - while (1) { - CompilationUnit::Abbrev abbrev; - size_t len; - const uint64 number = reader_->ReadUnsignedLEB128(abbrevptr, &len); - - if (number == 0) - break; - abbrev.number = number; - abbrevptr += len; - - assert(abbrevptr < abbrev_start + abbrev_length); - const uint64 tag = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - abbrev.tag = static_cast(tag); - - assert(abbrevptr < abbrev_start + abbrev_length); - abbrev.has_children = reader_->ReadOneByte(abbrevptr); - abbrevptr += 1; - - assert(abbrevptr < abbrev_start + abbrev_length); - - while (1) { - const uint64 nametemp = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - - assert(abbrevptr < abbrev_start + abbrev_length); - const uint64 formtemp = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - if (nametemp == 0 && formtemp == 0) - break; - - const enum DwarfAttribute name = - static_cast(nametemp); - const enum DwarfForm form = static_cast(formtemp); - abbrev.attributes.push_back(make_pair(name, form)); - } - assert(abbrev.number == abbrevs_->size()); - abbrevs_->push_back(abbrev); - } -} - -// Skips a single DIE's attributes. -const char* CompilationUnit::SkipDIE(const char* start, - const Abbrev& abbrev) { - for (AttributeList::const_iterator i = abbrev.attributes.begin(); - i != abbrev.attributes.end(); - i++) { - start = SkipAttribute(start, i->second); - } - return start; -} - -// Skips a single attribute form's data. -const char* CompilationUnit::SkipAttribute(const char* start, - enum DwarfForm form) { - size_t len; - - switch (form) { - case DW_FORM_indirect: - form = static_cast(reader_->ReadUnsignedLEB128(start, - &len)); - start += len; - return SkipAttribute(start, form); - break; - - case DW_FORM_data1: - case DW_FORM_flag: - case DW_FORM_ref1: - return start + 1; - break; - case DW_FORM_ref2: - case DW_FORM_data2: - return start + 2; - break; - case DW_FORM_ref4: - case DW_FORM_data4: - return start + 4; - break; - case DW_FORM_ref8: - case DW_FORM_data8: - return start + 8; - break; - case DW_FORM_string: - return start + strlen(start) + 1; - break; - case DW_FORM_udata: - case DW_FORM_ref_udata: - reader_->ReadUnsignedLEB128(start, &len); - return start + len; - break; - - case DW_FORM_sdata: - reader_->ReadSignedLEB128(start, &len); - return start + len; - break; - case DW_FORM_addr: - return start + reader_->AddressSize(); - break; - case DW_FORM_ref_addr: - // DWARF2 and 3 differ on whether ref_addr is address size or - // offset size. - assert(header_.version == 2 || header_.version == 3); - if (header_.version == 2) { - return start + reader_->AddressSize(); - } else if (header_.version == 3) { - return start + reader_->OffsetSize(); - } - break; - - case DW_FORM_block1: - return start + 1 + reader_->ReadOneByte(start); - break; - case DW_FORM_block2: - return start + 2 + reader_->ReadTwoBytes(start); - break; - case DW_FORM_block4: - return start + 4 + reader_->ReadFourBytes(start); - break; - case DW_FORM_block: { - uint64 size = reader_->ReadUnsignedLEB128(start, &len); - return start + size + len; - } - break; - case DW_FORM_strp: - return start + reader_->OffsetSize(); - break; - default: - fprintf(stderr,"Unhandled form type"); - } - fprintf(stderr,"Unhandled form type"); - return NULL; -} - -// Read a DWARF2/3 header. -// The header is variable length in DWARF3 (and DWARF2 as extended by -// most compilers), and consists of an length field, a version number, -// the offset in the .debug_abbrev section for our abbrevs, and an -// address size. -void CompilationUnit::ReadHeader() { - const char* headerptr = buffer_; - size_t initial_length_size; - - assert(headerptr + 4 < buffer_ + buffer_length_); - const uint64 initial_length - = reader_->ReadInitialLength(headerptr, &initial_length_size); - headerptr += initial_length_size; - header_.length = initial_length; - - assert(headerptr + 2 < buffer_ + buffer_length_); - header_.version = reader_->ReadTwoBytes(headerptr); - headerptr += 2; - - assert(headerptr + reader_->OffsetSize() < buffer_ + buffer_length_); - header_.abbrev_offset = reader_->ReadOffset(headerptr); - headerptr += reader_->OffsetSize(); - - assert(headerptr + 1 < buffer_ + buffer_length_); - header_.address_size = reader_->ReadOneByte(headerptr); - reader_->SetAddressSize(header_.address_size); - headerptr += 1; - - after_header_ = headerptr; - - // This check ensures that we don't have to do checking during the - // reading of DIEs. header_.length does not include the size of the - // initial length. - assert(buffer_ + initial_length_size + header_.length <= - buffer_ + buffer_length_); -} - -uint64 CompilationUnit::Start() { - // First get the debug_info section. ".debug_info" is the name - // recommended in the DWARF spec, and used on Linux; "__debug_info" - // is the name used in Mac OS X Mach-O files. - SectionMap::const_iterator iter = sections_.find(".debug_info"); - if (iter == sections_.end()) - iter = sections_.find("__debug_info"); - assert(iter != sections_.end()); - - // Set up our buffer - buffer_ = iter->second.first + offset_from_section_start_; - buffer_length_ = iter->second.second - offset_from_section_start_; - - // Read the header - ReadHeader(); - - // Figure out the real length from the end of the initial length to - // the end of the compilation unit, since that is the value we - // return. - uint64 ourlength = header_.length; - if (reader_->OffsetSize() == 8) - ourlength += 12; - else - ourlength += 4; - - // See if the user wants this compilation unit, and if not, just return. - if (!handler_->StartCompilationUnit(offset_from_section_start_, - reader_->AddressSize(), - reader_->OffsetSize(), - header_.length, - header_.version)) - return ourlength; - - // Otherwise, continue by reading our abbreviation entries. - ReadAbbrevs(); - - // Set the string section if we have one. ".debug_str" is the name - // recommended in the DWARF spec, and used on Linux; "__debug_str" - // is the name used in Mac OS X Mach-O files. - iter = sections_.find(".debug_str"); - if (iter == sections_.end()) - iter = sections_.find("__debug_str"); - if (iter != sections_.end()) { - string_buffer_ = iter->second.first; - string_buffer_length_ = iter->second.second; - } - - // Now that we have our abbreviations, start processing DIE's. - ProcessDIEs(); - - return ourlength; -} - -// If one really wanted, you could merge SkipAttribute and -// ProcessAttribute -// This is all boring data manipulation and calling of the handler. -const char* CompilationUnit::ProcessAttribute( - uint64 dieoffset, const char* start, enum DwarfAttribute attr, - enum DwarfForm form) { - size_t len; - - switch (form) { - // DW_FORM_indirect is never used because it is such a space - // waster. - case DW_FORM_indirect: - form = static_cast(reader_->ReadUnsignedLEB128(start, - &len)); - start += len; - return ProcessAttribute(dieoffset, start, attr, form); - break; - - case DW_FORM_data1: - case DW_FORM_flag: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadOneByte(start)); - return start + 1; - break; - case DW_FORM_data2: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadTwoBytes(start)); - return start + 2; - break; - case DW_FORM_data4: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadFourBytes(start)); - return start + 4; - break; - case DW_FORM_data8: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadEightBytes(start)); - return start + 8; - break; - case DW_FORM_string: { - const char* str = start; - handler_->ProcessAttributeString(dieoffset, attr, form, - str); - return start + strlen(str) + 1; - } - break; - case DW_FORM_udata: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadUnsignedLEB128(start, - &len)); - return start + len; - break; - - case DW_FORM_sdata: - handler_->ProcessAttributeSigned(dieoffset, attr, form, - reader_->ReadSignedLEB128(start, &len)); - return start + len; - break; - case DW_FORM_addr: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadAddress(start)); - return start + reader_->AddressSize(); - break; - - case DW_FORM_ref1: - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadOneByte(start) - + offset_from_section_start_); - return start + 1; - break; - case DW_FORM_ref2: - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadTwoBytes(start) - + offset_from_section_start_); - return start + 2; - break; - case DW_FORM_ref4: - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadFourBytes(start) - + offset_from_section_start_); - return start + 4; - break; - case DW_FORM_ref8: - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadEightBytes(start) - + offset_from_section_start_); - return start + 8; - break; - case DW_FORM_ref_udata: - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadUnsignedLEB128(start, - &len) - + offset_from_section_start_); - return start + len; - break; - case DW_FORM_ref_addr: - // DWARF2 and 3 differ on whether ref_addr is address size or - // offset size. - assert(header_.version == 2 || header_.version == 3); - if (header_.version == 2) { - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadAddress(start)); - return start + reader_->AddressSize(); - } else if (header_.version == 3) { - handler_->ProcessAttributeReference(dieoffset, attr, form, - reader_->ReadOffset(start)); - return start + reader_->OffsetSize(); - } - break; - - case DW_FORM_block1: { - uint64 datalen = reader_->ReadOneByte(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 1, - datalen); - return start + 1 + datalen; - } - break; - case DW_FORM_block2: { - uint64 datalen = reader_->ReadTwoBytes(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 2, - datalen); - return start + 2 + datalen; - } - break; - case DW_FORM_block4: { - uint64 datalen = reader_->ReadFourBytes(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 4, - datalen); - return start + 4 + datalen; - } - break; - case DW_FORM_block: { - uint64 datalen = reader_->ReadUnsignedLEB128(start, &len); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + len, - datalen); - return start + datalen + len; - } - break; - case DW_FORM_strp: { - assert(string_buffer_ != NULL); - - const uint64 offset = reader_->ReadOffset(start); - assert(string_buffer_ + offset < string_buffer_ + string_buffer_length_); - - const char* str = string_buffer_ + offset; - handler_->ProcessAttributeString(dieoffset, attr, form, - str); - return start + reader_->OffsetSize(); - } - break; - default: - fprintf(stderr, "Unhandled form type"); - } - fprintf(stderr, "Unhandled form type"); - return NULL; -} - -const char* CompilationUnit::ProcessDIE(uint64 dieoffset, - const char* start, - const Abbrev& abbrev) { - for (AttributeList::const_iterator i = abbrev.attributes.begin(); - i != abbrev.attributes.end(); - i++) { - start = ProcessAttribute(dieoffset, start, i->first, i->second); - } - return start; -} - -void CompilationUnit::ProcessDIEs() { - const char* dieptr = after_header_; - size_t len; - - // lengthstart is the place the length field is based on. - // It is the point in the header after the initial length field - const char* lengthstart = buffer_; - - // In 64 bit dwarf, the initial length is 12 bytes, because of the - // 0xffffffff at the start. - if (reader_->OffsetSize() == 8) - lengthstart += 12; - else - lengthstart += 4; - - stack die_stack; - - while (dieptr < (lengthstart + header_.length)) { - // We give the user the absolute offset from the beginning of - // debug_info, since they need it to deal with ref_addr forms. - uint64 absolute_offset = (dieptr - buffer_) + offset_from_section_start_; - - uint64 abbrev_num = reader_->ReadUnsignedLEB128(dieptr, &len); - - dieptr += len; - - // Abbrev == 0 represents the end of a list of children, or padding - // at the end of the compilation unit. - if (abbrev_num == 0) { - if (die_stack.size() == 0) - // If it is padding, then we are done with the compilation unit's DIEs. - return; - const uint64 offset = die_stack.top(); - die_stack.pop(); - handler_->EndDIE(offset); - continue; - } - - const Abbrev& abbrev = abbrevs_->at(static_cast(abbrev_num)); - const enum DwarfTag tag = abbrev.tag; - if (!handler_->StartDIE(absolute_offset, tag, abbrev.attributes)) { - dieptr = SkipDIE(dieptr, abbrev); - } else { - dieptr = ProcessDIE(absolute_offset, dieptr, abbrev); - } - - if (abbrev.has_children) { - die_stack.push(absolute_offset); - } else { - handler_->EndDIE(absolute_offset); - } - } -} - -LineInfo::LineInfo(const char* buffer, uint64 buffer_length, - ByteReader* reader, LineInfoHandler* handler): - handler_(handler), reader_(reader), buffer_(buffer), - buffer_length_(buffer_length) { - header_.std_opcode_lengths = NULL; -} - -uint64 LineInfo::Start() { - ReadHeader(); - ReadLines(); - return after_header_ - buffer_; -} - -// The header for a debug_line section is mildly complicated, because -// the line info is very tightly encoded. -void LineInfo::ReadHeader() { - const char* lineptr = buffer_; - size_t initial_length_size; - - const uint64 initial_length - = reader_->ReadInitialLength(lineptr, &initial_length_size); - - lineptr += initial_length_size; - header_.total_length = initial_length; - assert(buffer_ + initial_length_size + header_.total_length <= - buffer_ + buffer_length_); - - // Address size *must* be set by CU ahead of time. - assert(reader_->AddressSize() != 0); - - header_.version = reader_->ReadTwoBytes(lineptr); - lineptr += 2; - - header_.prologue_length = reader_->ReadOffset(lineptr); - lineptr += reader_->OffsetSize(); - - header_.min_insn_length = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.default_is_stmt = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.line_base = *reinterpret_cast(lineptr); - lineptr += 1; - - header_.line_range = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.opcode_base = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.std_opcode_lengths = new vector; - header_.std_opcode_lengths->resize(header_.opcode_base + 1); - (*header_.std_opcode_lengths)[0] = 0; - for (int i = 1; i < header_.opcode_base; i++) { - (*header_.std_opcode_lengths)[i] = reader_->ReadOneByte(lineptr); - lineptr += 1; - } - - // It is legal for the directory entry table to be empty. - if (*lineptr) { - uint32 dirindex = 1; - while (*lineptr) { - const char* dirname = lineptr; - handler_->DefineDir(dirname, dirindex); - lineptr += strlen(dirname) + 1; - dirindex++; - } - } - lineptr++; - - // It is also legal for the file entry table to be empty. - if (*lineptr) { - uint32 fileindex = 1; - size_t len; - while (*lineptr) { - const char* filename = lineptr; - lineptr += strlen(filename) + 1; - - uint64 dirindex = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - - uint64 mod_time = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - - uint64 filelength = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - handler_->DefineFile(filename, fileindex, static_cast(dirindex), - mod_time, filelength); - fileindex++; - } - } - lineptr++; - - after_header_ = lineptr; -} - -/* static */ -bool LineInfo::ProcessOneOpcode(ByteReader* reader, - LineInfoHandler* handler, - const struct LineInfoHeader &header, - const char* start, - struct LineStateMachine* lsm, - size_t* len, - uintptr pc, - bool *lsm_passes_pc) { - size_t oplen = 0; - size_t templen; - uint8 opcode = reader->ReadOneByte(start); - oplen++; - start++; - - // If the opcode is great than the opcode_base, it is a special - // opcode. Most line programs consist mainly of special opcodes. - if (opcode >= header.opcode_base) { - opcode -= header.opcode_base; - const int64 advance_address = (opcode / header.line_range) - * header.min_insn_length; - const int32 advance_line = (opcode % header.line_range) - + header.line_base; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - lsm->line_num += advance_line; - lsm->basic_block = true; - *len = oplen; - return true; - } - - // Otherwise, we have the regular opcodes - switch (opcode) { - case DW_LNS_copy: { - lsm->basic_block = false; - *len = oplen; - return true; - } - - case DW_LNS_advance_pc: { - uint64 advance_address = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && lsm->address <= pc && - pc < lsm->address + header.min_insn_length * advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += header.min_insn_length * advance_address; - } - break; - case DW_LNS_advance_line: { - const int64 advance_line = reader->ReadSignedLEB128(start, &templen); - oplen += templen; - lsm->line_num += static_cast(advance_line); - - // With gcc 4.2.1, we can get the line_no here for the first time - // since DW_LNS_advance_line is called after DW_LNE_set_address is - // called. So we check if the lsm passes "pc" here, not in - // DW_LNE_set_address. - if (lsm_passes_pc && lsm->address == pc) { - *lsm_passes_pc = true; - } - } - break; - case DW_LNS_set_file: { - const uint64 fileno = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - lsm->file_num = static_cast(fileno); - } - break; - case DW_LNS_set_column: { - const uint64 colno = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - lsm->column_num = static_cast(colno); - } - break; - case DW_LNS_negate_stmt: { - lsm->is_stmt = !lsm->is_stmt; - } - break; - case DW_LNS_set_basic_block: { - lsm->basic_block = true; - } - break; - case DW_LNS_fixed_advance_pc: { - const uint16 advance_address = reader->ReadTwoBytes(start); - oplen += 2; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - } - break; - case DW_LNS_const_add_pc: { - const int64 advance_address = header.min_insn_length - * ((255 - header.opcode_base) - / header.line_range); - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - } - break; - case DW_LNS_extended_op: { - const uint64 extended_op_len = reader->ReadUnsignedLEB128(start, - &templen); - start += templen; - oplen += templen + extended_op_len; - - const uint64 extended_op = reader->ReadOneByte(start); - start++; - - switch (extended_op) { - case DW_LNE_end_sequence: { - lsm->end_sequence = true; - *len = oplen; - return true; - } - break; - case DW_LNE_set_address: { - // With gcc 4.2.1, we cannot tell the line_no here since - // DW_LNE_set_address is called before DW_LNS_advance_line is - // called. So we do not check if the lsm passes "pc" here. See - // also the comment in DW_LNS_advance_line. - uint64 address = reader->ReadAddress(start); - lsm->address = address; - } - break; - case DW_LNE_define_file: { - const char* filename = start; - - templen = strlen(filename) + 1; - start += templen; - - uint64 dirindex = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - - const uint64 mod_time = reader->ReadUnsignedLEB128(start, - &templen); - oplen += templen; - - const uint64 filelength = reader->ReadUnsignedLEB128(start, - &templen); - oplen += templen; - - if (handler) { - handler->DefineFile(filename, -1, static_cast(dirindex), - mod_time, filelength); - } - } - break; - } - } - break; - - default: { - // Ignore unknown opcode silently - if (header.std_opcode_lengths) { - for (int i = 0; i < (*header.std_opcode_lengths)[opcode]; i++) { - reader->ReadUnsignedLEB128(start, &templen); - start += templen; - oplen += templen; - } - } - } - break; - } - *len = oplen; - return false; -} - -void LineInfo::ReadLines() { - struct LineStateMachine lsm; - - // lengthstart is the place the length field is based on. - // It is the point in the header after the initial length field - const char* lengthstart = buffer_; - - // In 64 bit dwarf, the initial length is 12 bytes, because of the - // 0xffffffff at the start. - if (reader_->OffsetSize() == 8) - lengthstart += 12; - else - lengthstart += 4; - - const char* lineptr = after_header_; - lsm.Reset(header_.default_is_stmt); - - // The LineInfoHandler interface expects each line's length along - // with its address, but DWARF only provides addresses (sans - // length), and an end-of-sequence address; one infers the length - // from the next address. So we report a line only when we get the - // next line's address, or the end-of-sequence address. - bool have_pending_line = false; - uint64 pending_address = 0; - uint32 pending_file_num = 0, pending_line_num = 0, pending_column_num = 0; - - while (lineptr < lengthstart + header_.total_length) { - size_t oplength; - bool add_row = ProcessOneOpcode(reader_, handler_, header_, - lineptr, &lsm, &oplength, (uintptr)-1, - NULL); - if (add_row) { - if (have_pending_line) - handler_->AddLine(pending_address, lsm.address - pending_address, - pending_file_num, pending_line_num, - pending_column_num); - if (lsm.end_sequence) { - lsm.Reset(header_.default_is_stmt); - have_pending_line = false; - } else { - pending_address = lsm.address; - pending_file_num = lsm.file_num; - pending_line_num = lsm.line_num; - pending_column_num = lsm.column_num; - have_pending_line = true; - } - } - lineptr += oplength; - } - - after_header_ = lengthstart + header_.total_length; -} - -// A DWARF rule for recovering the address or value of a register, or -// computing the canonical frame address. There is one subclass of this for -// each '*Rule' member function in CallFrameInfo::Handler. -// -// It's annoying that we have to handle Rules using pointers (because -// the concrete instances can have an arbitrary size). They're small, -// so it would be much nicer if we could just handle them by value -// instead of fretting about ownership and destruction. -// -// It seems like all these could simply be instances of std::tr1::bind, -// except that we need instances to be EqualityComparable, too. -// -// This could logically be nested within State, but then the qualified names -// get horrendous. -class CallFrameInfo::Rule { - public: - virtual ~Rule() { } - - // Tell HANDLER that, at ADDRESS in the program, REGISTER can be - // recovered using this rule. If REGISTER is kCFARegister, then this rule - // describes how to compute the canonical frame address. Return what the - // HANDLER member function returned. - virtual bool Handle(Handler *handler, - uint64 address, int register) const = 0; - - // Equality on rules. We use these to decide which rules we need - // to report after a DW_CFA_restore_state instruction. - virtual bool operator==(const Rule &rhs) const = 0; - - bool operator!=(const Rule &rhs) const { return ! (*this == rhs); } - - // Return a pointer to a copy of this rule. - virtual Rule *Copy() const = 0; - - // If this is a base+offset rule, change its base register to REG. - // Otherwise, do nothing. (Ugly, but required for DW_CFA_def_cfa_register.) - virtual void SetBaseRegister(unsigned reg) { } - - // If this is a base+offset rule, change its offset to OFFSET. Otherwise, - // do nothing. (Ugly, but required for DW_CFA_def_cfa_offset.) - virtual void SetOffset(long long offset) { } -}; - -// Rule: the value the register had in the caller cannot be recovered. -class CallFrameInfo::UndefinedRule: public CallFrameInfo::Rule { - public: - UndefinedRule() { } - ~UndefinedRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->UndefinedRule(address, reg); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const UndefinedRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs != NULL); - } - Rule *Copy() const { return new UndefinedRule(*this); } -}; - -// Rule: the register's value is the same as that it had in the caller. -class CallFrameInfo::SameValueRule: public CallFrameInfo::Rule { - public: - SameValueRule() { } - ~SameValueRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->SameValueRule(address, reg); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const SameValueRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs != NULL); - } - Rule *Copy() const { return new SameValueRule(*this); } -}; - -// Rule: the register is saved at OFFSET from BASE_REGISTER. BASE_REGISTER -// may be CallFrameInfo::Handler::kCFARegister. -class CallFrameInfo::OffsetRule: public CallFrameInfo::Rule { - public: - OffsetRule(int base_register, long offset) - : base_register_(base_register), offset_(offset) { } - ~OffsetRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->OffsetRule(address, reg, base_register_, offset_); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const OffsetRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs && - base_register_ == our_rhs->base_register_ && - offset_ == our_rhs->offset_); - } - Rule *Copy() const { return new OffsetRule(*this); } - // We don't actually need SetBaseRegister or SetOffset here, since they - // are only ever applied to CFA rules, for DW_CFA_def_cfa_offset, and it - // doesn't make sense to use OffsetRule for computing the CFA: it - // computes the address at which a register is saved, not a value. - private: - int base_register_; - long offset_; -}; - -// Rule: the value the register had in the caller is the value of -// BASE_REGISTER plus offset. BASE_REGISTER may be -// CallFrameInfo::Handler::kCFARegister. -class CallFrameInfo::ValOffsetRule: public CallFrameInfo::Rule { - public: - ValOffsetRule(int base_register, long offset) - : base_register_(base_register), offset_(offset) { } - ~ValOffsetRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->ValOffsetRule(address, reg, base_register_, offset_); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const ValOffsetRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs && - base_register_ == our_rhs->base_register_ && - offset_ == our_rhs->offset_); - } - Rule *Copy() const { return new ValOffsetRule(*this); } - void SetBaseRegister(unsigned reg) { base_register_ = reg; } - void SetOffset(long long offset) { offset_ = offset; } - private: - int base_register_; - long offset_; -}; - -// Rule: the register has been saved in another register REGISTER_NUMBER_. -class CallFrameInfo::RegisterRule: public CallFrameInfo::Rule { - public: - explicit RegisterRule(int register_number) - : register_number_(register_number) { } - ~RegisterRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->RegisterRule(address, reg, register_number_); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const RegisterRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs && register_number_ == our_rhs->register_number_); - } - Rule *Copy() const { return new RegisterRule(*this); } - private: - int register_number_; -}; - -// Rule: EXPRESSION evaluates to the address at which the register is saved. -class CallFrameInfo::ExpressionRule: public CallFrameInfo::Rule { - public: - explicit ExpressionRule(const string &expression) - : expression_(expression) { } - ~ExpressionRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->ExpressionRule(address, reg, expression_); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const ExpressionRule *our_rhs = dynamic_cast(&rhs); - return (our_rhs && expression_ == our_rhs->expression_); - } - Rule *Copy() const { return new ExpressionRule(*this); } - private: - string expression_; -}; - -// Rule: EXPRESSION evaluates to the address at which the register is saved. -class CallFrameInfo::ValExpressionRule: public CallFrameInfo::Rule { - public: - explicit ValExpressionRule(const string &expression) - : expression_(expression) { } - ~ValExpressionRule() { } - bool Handle(Handler *handler, uint64 address, int reg) const { - return handler->ValExpressionRule(address, reg, expression_); - } - bool operator==(const Rule &rhs) const { - // dynamic_cast is allowed by the Google C++ Style Guide, if the use has - // been carefully considered; cheap RTTI-like workarounds are forbidden. - const ValExpressionRule *our_rhs = - dynamic_cast(&rhs); - return (our_rhs && expression_ == our_rhs->expression_); - } - Rule *Copy() const { return new ValExpressionRule(*this); } - private: - string expression_; -}; - -// A map from register numbers to rules. -class CallFrameInfo::RuleMap { - public: - RuleMap() : cfa_rule_(NULL) { } - RuleMap(const RuleMap &rhs) : cfa_rule_(NULL) { *this = rhs; } - ~RuleMap() { Clear(); } - - RuleMap &operator=(const RuleMap &rhs); - - // Set the rule for computing the CFA to RULE. Take ownership of RULE. - void SetCFARule(Rule *rule) { delete cfa_rule_; cfa_rule_ = rule; } - - // Return the current CFA rule. Unlike RegisterRule, this RuleMap retains - // ownership of the rule. We use this for DW_CFA_def_cfa_offset and - // DW_CFA_def_cfa_register, and for detecting references to the CFA before - // a rule for it has been established. - Rule *CFARule() const { return cfa_rule_; } - - // Return the rule for REG, or NULL if there is none. The caller takes - // ownership of the result. - Rule *RegisterRule(int reg) const; - - // Set the rule for computing REG to RULE. Take ownership of RULE. - void SetRegisterRule(int reg, Rule *rule); - - // Make all the appropriate calls to HANDLER as if we were changing from - // this RuleMap to NEW_RULES at ADDRESS. We use this to implement - // DW_CFA_restore_state, where lots of rules can change simultaneously. - // Return true if all handlers returned true; otherwise, return false. - bool HandleTransitionTo(Handler *handler, uint64 address, - const RuleMap &new_rules) const; - - private: - // A map from register numbers to Rules. - typedef map RuleByNumber; - - // Remove all register rules and clear cfa_rule_. - void Clear(); - - // The rule for computing the canonical frame address. This RuleMap owns - // this rule. - Rule *cfa_rule_; - - // A map from register numbers to postfix expressions to recover - // their values. This RuleMap owns the Rules the map refers to. - RuleByNumber registers_; -}; - -CallFrameInfo::RuleMap &CallFrameInfo::RuleMap::operator=(const RuleMap &rhs) { - Clear(); - // Since each map owns the rules it refers to, assignment must copy them. - if (rhs.cfa_rule_) cfa_rule_ = rhs.cfa_rule_->Copy(); - for (RuleByNumber::const_iterator it = rhs.registers_.begin(); - it != rhs.registers_.end(); it++) - registers_[it->first] = it->second->Copy(); - return *this; -} - -CallFrameInfo::Rule *CallFrameInfo::RuleMap::RegisterRule(int reg) const { - assert(reg != Handler::kCFARegister); - RuleByNumber::const_iterator it = registers_.find(reg); - if (it != registers_.end()) - return it->second->Copy(); - else - return NULL; -} - -void CallFrameInfo::RuleMap::SetRegisterRule(int reg, Rule *rule) { - assert(reg != Handler::kCFARegister); - assert(rule); - Rule **slot = ®isters_[reg]; - delete *slot; - *slot = rule; -} - -bool CallFrameInfo::RuleMap::HandleTransitionTo( - Handler *handler, - uint64 address, - const RuleMap &new_rules) const { - // Transition from cfa_rule_ to new_rules.cfa_rule_. - if (cfa_rule_ && new_rules.cfa_rule_) { - if (*cfa_rule_ != *new_rules.cfa_rule_ && - !new_rules.cfa_rule_->Handle(handler, address, - Handler::kCFARegister)) - return false; - } else if (cfa_rule_) { - // this RuleMap has a CFA rule but new_rules doesn't. - // CallFrameInfo::Handler has no way to handle this --- and shouldn't; - // it's garbage input. The instruction interpreter should have - // detected this and warned, so take no action here. - } else if (new_rules.cfa_rule_) { - // This shouldn't be possible: NEW_RULES is some prior state, and - // there's no way to remove entries. - assert(0); - } else { - // Both CFA rules are empty. No action needed. - } - - // Traverse the two maps in order by register number, and report - // whatever differences we find. - RuleByNumber::const_iterator old_it = registers_.begin(); - RuleByNumber::const_iterator new_it = new_rules.registers_.begin(); - while (old_it != registers_.end() && new_it != new_rules.registers_.end()) { - if (old_it->first < new_it->first) { - // This RuleMap has an entry for old_it->first, but NEW_RULES - // doesn't. - // - // This isn't really the right thing to do, but since CFI generally - // only mentions callee-saves registers, and GCC's convention for - // callee-saves registers is that they are unchanged, it's a good - // approximation. - if (!handler->SameValueRule(address, old_it->first)) - return false; - old_it++; - } else if (old_it->first > new_it->first) { - // NEW_RULES has entry for new_it->first, but this RuleMap - // doesn't. This shouldn't be possible: NEW_RULES is some prior - // state, and there's no way to remove entries. - assert(0); - } else { - // Both maps have an entry for this register. Report the new - // rule if it is different. - if (*old_it->second != *new_it->second && - !new_it->second->Handle(handler, address, new_it->first)) - return false; - new_it++, old_it++; - } - } - // Finish off entries from this RuleMap with no counterparts in new_rules. - while (old_it != registers_.end()) { - if (!handler->SameValueRule(address, old_it->first)) - return false; - old_it++; - } - // Since we only make transitions from a rule set to some previously - // saved rule set, and we can only add rules to the map, NEW_RULES - // must have fewer rules than *this. - assert(new_it == new_rules.registers_.end()); - - return true; -} - -// Remove all register rules and clear cfa_rule_. -void CallFrameInfo::RuleMap::Clear() { - delete cfa_rule_; - cfa_rule_ = NULL; - for (RuleByNumber::iterator it = registers_.begin(); - it != registers_.end(); it++) - delete it->second; - registers_.clear(); -} - -// The state of the call frame information interpreter as it processes -// instructions from a CIE and FDE. -class CallFrameInfo::State { - public: - // Create a call frame information interpreter state with the given - // reporter, reader, handler, and initial call frame info address. - State(ByteReader *reader, Handler *handler, Reporter *reporter, - uint64 address) - : reader_(reader), handler_(handler), reporter_(reporter), - address_(address), entry_(NULL), cursor_(NULL) { } - - // Interpret instructions from CIE, save the resulting rule set for - // DW_CFA_restore instructions, and return true. On error, report - // the problem to reporter_ and return false. - bool InterpretCIE(const CIE &cie); - - // Interpret instructions from FDE, and return true. On error, - // report the problem to reporter_ and return false. - bool InterpretFDE(const FDE &fde); - - private: - // The operands of a CFI instruction, for ParseOperands. - struct Operands { - unsigned register_number; // A register number. - uint64 offset; // An offset or address. - long signed_offset; // A signed offset. - string expression; // A DWARF expression. - }; - - // Parse CFI instruction operands from STATE's instruction stream as - // described by FORMAT. On success, populate OPERANDS with the - // results, and return true. On failure, report the problem and - // return false. - // - // Each character of FORMAT should be one of the following: - // - // 'r' unsigned LEB128 register number (OPERANDS->register_number) - // 'o' unsigned LEB128 offset (OPERANDS->offset) - // 's' signed LEB128 offset (OPERANDS->signed_offset) - // 'a' machine-size address (OPERANDS->offset) - // (If the CIE has a 'z' augmentation string, 'a' uses the - // encoding specified by the 'R' argument.) - // '1' a one-byte offset (OPERANDS->offset) - // '2' a two-byte offset (OPERANDS->offset) - // '4' a four-byte offset (OPERANDS->offset) - // '8' an eight-byte offset (OPERANDS->offset) - // 'e' a DW_FORM_block holding a (OPERANDS->expression) - // DWARF expression - bool ParseOperands(const char *format, Operands *operands); - - // Interpret one CFI instruction from STATE's instruction stream, update - // STATE, report any rule changes to handler_, and return true. On - // failure, report the problem and return false. - bool DoInstruction(); - - // The following Do* member functions are subroutines of DoInstruction, - // factoring out the actual work of operations that have several - // different encodings. - - // Set the CFA rule to be the value of BASE_REGISTER plus OFFSET, and - // return true. On failure, report and return false. (Used for - // DW_CFA_def_cfa and DW_CFA_def_cfa_sf.) - bool DoDefCFA(unsigned base_register, long offset); - - // Change the offset of the CFA rule to OFFSET, and return true. On - // failure, report and return false. (Subroutine for - // DW_CFA_def_cfa_offset and DW_CFA_def_cfa_offset_sf.) - bool DoDefCFAOffset(long offset); - - // Specify that REG can be recovered using RULE, and return true. On - // failure, report and return false. - bool DoRule(unsigned reg, Rule *rule); - - // Specify that REG can be found at OFFSET from the CFA, and return true. - // On failure, report and return false. (Subroutine for DW_CFA_offset, - // DW_CFA_offset_extended, and DW_CFA_offset_extended_sf.) - bool DoOffset(unsigned reg, long offset); - - // Specify that the caller's value for REG is the CFA plus OFFSET, - // and return true. On failure, report and return false. (Subroutine - // for DW_CFA_val_offset and DW_CFA_val_offset_sf.) - bool DoValOffset(unsigned reg, long offset); - - // Restore REG to the rule established in the CIE, and return true. On - // failure, report and return false. (Subroutine for DW_CFA_restore and - // DW_CFA_restore_extended.) - bool DoRestore(unsigned reg); - - // Return the section offset of the instruction at cursor. For use - // in error messages. - uint64 CursorOffset() { return entry_->offset + (cursor_ - entry_->start); } - - // Report that entry_ is incomplete, and return false. For brevity. - bool ReportIncomplete() { - reporter_->Incomplete(entry_->offset, entry_->kind); - return false; - } - - // For reading multi-byte values with the appropriate endianness. - ByteReader *reader_; - - // The handler to which we should report the data we find. - Handler *handler_; - - // For reporting problems in the info we're parsing. - Reporter *reporter_; - - // The code address to which the next instruction in the stream applies. - uint64 address_; - - // The entry whose instructions we are currently processing. This is - // first a CIE, and then an FDE. - const Entry *entry_; - - // The next instruction to process. - const char *cursor_; - - // The current set of rules. - RuleMap rules_; - - // The set of rules established by the CIE, used by DW_CFA_restore - // and DW_CFA_restore_extended. We set this after interpreting the - // CIE's instructions. - RuleMap cie_rules_; - - // A stack of saved states, for DW_CFA_remember_state and - // DW_CFA_restore_state. - stack saved_rules_; -}; - -bool CallFrameInfo::State::InterpretCIE(const CIE &cie) { - entry_ = &cie; - cursor_ = entry_->instructions; - while (cursor_ < entry_->end) - if (!DoInstruction()) - return false; - // Note the rules established by the CIE, for use by DW_CFA_restore - // and DW_CFA_restore_extended. - cie_rules_ = rules_; - return true; -} - -bool CallFrameInfo::State::InterpretFDE(const FDE &fde) { - entry_ = &fde; - cursor_ = entry_->instructions; - while (cursor_ < entry_->end) - if (!DoInstruction()) - return false; - return true; -} - -bool CallFrameInfo::State::ParseOperands(const char *format, - Operands *operands) { - size_t len; - const char *operand; - - for (operand = format; *operand; operand++) { - size_t bytes_left = entry_->end - cursor_; - switch (*operand) { - case 'r': - operands->register_number = reader_->ReadUnsignedLEB128(cursor_, &len); - if (len > bytes_left) return ReportIncomplete(); - cursor_ += len; - break; - - case 'o': - operands->offset = reader_->ReadUnsignedLEB128(cursor_, &len); - if (len > bytes_left) return ReportIncomplete(); - cursor_ += len; - break; - - case 's': - operands->signed_offset = reader_->ReadSignedLEB128(cursor_, &len); - if (len > bytes_left) return ReportIncomplete(); - cursor_ += len; - break; - - case 'a': - operands->offset = - reader_->ReadEncodedPointer(cursor_, entry_->cie->pointer_encoding, - &len); - if (len > bytes_left) return ReportIncomplete(); - cursor_ += len; - break; - - case '1': - if (1 > bytes_left) return ReportIncomplete(); - operands->offset = static_cast(*cursor_++); - break; - - case '2': - if (2 > bytes_left) return ReportIncomplete(); - operands->offset = reader_->ReadTwoBytes(cursor_); - cursor_ += 2; - break; - - case '4': - if (4 > bytes_left) return ReportIncomplete(); - operands->offset = reader_->ReadFourBytes(cursor_); - cursor_ += 4; - break; - - case '8': - if (8 > bytes_left) return ReportIncomplete(); - operands->offset = reader_->ReadEightBytes(cursor_); - cursor_ += 8; - break; - - case 'e': { - size_t expression_length = reader_->ReadUnsignedLEB128(cursor_, &len); - if (len > bytes_left || expression_length > bytes_left - len) - return ReportIncomplete(); - cursor_ += len; - operands->expression = string(cursor_, expression_length); - cursor_ += expression_length; - break; - } - - default: - assert(0); - } - } - - return true; -} - -bool CallFrameInfo::State::DoInstruction() { - CIE *cie = entry_->cie; - Operands ops; - - // Our entry's kind should have been set by now. - assert(entry_->kind != kUnknown); - - // We shouldn't have been invoked unless there were more - // instructions to parse. - assert(cursor_ < entry_->end); - - unsigned opcode = *cursor_++; - if ((opcode & 0xc0) != 0) { - switch (opcode & 0xc0) { - // Advance the address. - case DW_CFA_advance_loc: { - size_t code_offset = opcode & 0x3f; - address_ += code_offset * cie->code_alignment_factor; - break; - } - - // Find a register at an offset from the CFA. - case DW_CFA_offset: - if (!ParseOperands("o", &ops) || - !DoOffset(opcode & 0x3f, ops.offset * cie->data_alignment_factor)) - return false; - break; - - // Restore the rule established for a register by the CIE. - case DW_CFA_restore: - if (!DoRestore(opcode & 0x3f)) return false; - break; - - // The 'if' above should have excluded this possibility. - default: - assert(0); - } - - // Return here, so the big switch below won't be indented. - return true; - } - - switch (opcode) { - // Set the address. - case DW_CFA_set_loc: - if (!ParseOperands("a", &ops)) return false; - address_ = ops.offset; - break; - - // Advance the address. - case DW_CFA_advance_loc1: - if (!ParseOperands("1", &ops)) return false; - address_ += ops.offset * cie->code_alignment_factor; - break; - - // Advance the address. - case DW_CFA_advance_loc2: - if (!ParseOperands("2", &ops)) return false; - address_ += ops.offset * cie->code_alignment_factor; - break; - - // Advance the address. - case DW_CFA_advance_loc4: - if (!ParseOperands("4", &ops)) return false; - address_ += ops.offset * cie->code_alignment_factor; - break; - - // Advance the address. - case DW_CFA_MIPS_advance_loc8: - if (!ParseOperands("8", &ops)) return false; - address_ += ops.offset * cie->code_alignment_factor; - break; - - // Compute the CFA by adding an offset to a register. - case DW_CFA_def_cfa: - if (!ParseOperands("ro", &ops) || - !DoDefCFA(ops.register_number, ops.offset)) - return false; - break; - - // Compute the CFA by adding an offset to a register. - case DW_CFA_def_cfa_sf: - if (!ParseOperands("rs", &ops) || - !DoDefCFA(ops.register_number, - ops.signed_offset * cie->data_alignment_factor)) - return false; - break; - - // Change the base register used to compute the CFA. - case DW_CFA_def_cfa_register: { - Rule *cfa_rule = rules_.CFARule(); - if (!cfa_rule) { - reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset()); - return false; - } - if (!ParseOperands("r", &ops)) return false; - cfa_rule->SetBaseRegister(ops.register_number); - if (!cfa_rule->Handle(handler_, address_, - Handler::kCFARegister)) - return false; - break; - } - - // Change the offset used to compute the CFA. - case DW_CFA_def_cfa_offset: - if (!ParseOperands("o", &ops) || - !DoDefCFAOffset(ops.offset)) - return false; - break; - - // Change the offset used to compute the CFA. - case DW_CFA_def_cfa_offset_sf: - if (!ParseOperands("s", &ops) || - !DoDefCFAOffset(ops.signed_offset * cie->data_alignment_factor)) - return false; - break; - - // Specify an expression whose value is the CFA. - case DW_CFA_def_cfa_expression: { - if (!ParseOperands("e", &ops)) - return false; - Rule *rule = new ValExpressionRule(ops.expression); - rules_.SetCFARule(rule); - if (!rule->Handle(handler_, address_, - Handler::kCFARegister)) - return false; - break; - } - - // The register's value cannot be recovered. - case DW_CFA_undefined: { - if (!ParseOperands("r", &ops) || - !DoRule(ops.register_number, new UndefinedRule())) - return false; - break; - } - - // The register's value is unchanged from its value in the caller. - case DW_CFA_same_value: { - if (!ParseOperands("r", &ops) || - !DoRule(ops.register_number, new SameValueRule())) - return false; - break; - } - - // Find a register at an offset from the CFA. - case DW_CFA_offset_extended: - if (!ParseOperands("ro", &ops) || - !DoOffset(ops.register_number, - ops.offset * cie->data_alignment_factor)) - return false; - break; - - // The register is saved at an offset from the CFA. - case DW_CFA_offset_extended_sf: - if (!ParseOperands("rs", &ops) || - !DoOffset(ops.register_number, - ops.signed_offset * cie->data_alignment_factor)) - return false; - break; - - // The register is saved at an offset from the CFA. - case DW_CFA_GNU_negative_offset_extended: - if (!ParseOperands("ro", &ops) || - !DoOffset(ops.register_number, - -ops.offset * cie->data_alignment_factor)) - return false; - break; - - // The register's value is the sum of the CFA plus an offset. - case DW_CFA_val_offset: - if (!ParseOperands("ro", &ops) || - !DoValOffset(ops.register_number, - ops.offset * cie->data_alignment_factor)) - return false; - break; - - // The register's value is the sum of the CFA plus an offset. - case DW_CFA_val_offset_sf: - if (!ParseOperands("rs", &ops) || - !DoValOffset(ops.register_number, - ops.signed_offset * cie->data_alignment_factor)) - return false; - break; - - // The register has been saved in another register. - case DW_CFA_register: { - if (!ParseOperands("ro", &ops) || - !DoRule(ops.register_number, new RegisterRule(ops.offset))) - return false; - break; - } - - // An expression yields the address at which the register is saved. - case DW_CFA_expression: { - if (!ParseOperands("re", &ops) || - !DoRule(ops.register_number, new ExpressionRule(ops.expression))) - return false; - break; - } - - // An expression yields the caller's value for the register. - case DW_CFA_val_expression: { - if (!ParseOperands("re", &ops) || - !DoRule(ops.register_number, new ValExpressionRule(ops.expression))) - return false; - break; - } - - // Restore the rule established for a register by the CIE. - case DW_CFA_restore_extended: - if (!ParseOperands("r", &ops) || - !DoRestore( ops.register_number)) - return false; - break; - - // Save the current set of rules on a stack. - case DW_CFA_remember_state: - saved_rules_.push(rules_); - break; - - // Pop the current set of rules off the stack. - case DW_CFA_restore_state: { - if (saved_rules_.empty()) { - reporter_->EmptyStateStack(entry_->offset, entry_->kind, - CursorOffset()); - return false; - } - const RuleMap &new_rules = saved_rules_.top(); - if (rules_.CFARule() && !new_rules.CFARule()) { - reporter_->ClearingCFARule(entry_->offset, entry_->kind, - CursorOffset()); - return false; - } - rules_.HandleTransitionTo(handler_, address_, new_rules); - rules_ = new_rules; - saved_rules_.pop(); - break; - } - - // No operation. (Padding instruction.) - case DW_CFA_nop: - break; - - // A SPARC register window save: Registers 8 through 15 (%o0-%o7) - // are saved in registers 24 through 31 (%i0-%i7), and registers - // 16 through 31 (%l0-%l7 and %i0-%i7) are saved at CFA offsets - // (0-15 * the register size). The register numbers must be - // hard-coded. A GNU extension, and not a pretty one. - case DW_CFA_GNU_window_save: { - // Save %o0-%o7 in %i0-%i7. - for (int i = 8; i < 16; i++) - if (!DoRule(i, new RegisterRule(i + 16))) - return false; - // Save %l0-%l7 and %i0-%i7 at the CFA. - for (int i = 16; i < 32; i++) - // Assume that the byte reader's address size is the same as - // the architecture's register size. !@#%*^ hilarious. - if (!DoRule(i, new OffsetRule(Handler::kCFARegister, - (i - 16) * reader_->AddressSize()))) - return false; - break; - } - - // I'm not sure what this is. GDB doesn't use it for unwinding. - case DW_CFA_GNU_args_size: - if (!ParseOperands("o", &ops)) return false; - break; - - // An opcode we don't recognize. - default: { - reporter_->BadInstruction(entry_->offset, entry_->kind, CursorOffset()); - return false; - } - } - - return true; -} - -bool CallFrameInfo::State::DoDefCFA(unsigned base_register, long offset) { - Rule *rule = new ValOffsetRule(base_register, offset); - rules_.SetCFARule(rule); - return rule->Handle(handler_, address_, - Handler::kCFARegister); -} - -bool CallFrameInfo::State::DoDefCFAOffset(long offset) { - Rule *cfa_rule = rules_.CFARule(); - if (!cfa_rule) { - reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset()); - return false; - } - cfa_rule->SetOffset(offset); - return cfa_rule->Handle(handler_, address_, - Handler::kCFARegister); -} - -bool CallFrameInfo::State::DoRule(unsigned reg, Rule *rule) { - rules_.SetRegisterRule(reg, rule); - return rule->Handle(handler_, address_, reg); -} - -bool CallFrameInfo::State::DoOffset(unsigned reg, long offset) { - if (!rules_.CFARule()) { - reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset()); - return false; - } - return DoRule(reg, - new OffsetRule(Handler::kCFARegister, offset)); -} - -bool CallFrameInfo::State::DoValOffset(unsigned reg, long offset) { - if (!rules_.CFARule()) { - reporter_->NoCFARule(entry_->offset, entry_->kind, CursorOffset()); - return false; - } - return DoRule(reg, - new ValOffsetRule(Handler::kCFARegister, offset)); -} - -bool CallFrameInfo::State::DoRestore(unsigned reg) { - // DW_CFA_restore and DW_CFA_restore_extended don't make sense in a CIE. - if (entry_->kind == kCIE) { - reporter_->RestoreInCIE(entry_->offset, CursorOffset()); - return false; - } - Rule *rule = cie_rules_.RegisterRule(reg); - if (!rule) { - // This isn't really the right thing to do, but since CFI generally - // only mentions callee-saves registers, and GCC's convention for - // callee-saves registers is that they are unchanged, it's a good - // approximation. - rule = new SameValueRule(); - } - return DoRule(reg, rule); -} - -bool CallFrameInfo::ReadEntryPrologue(const char *cursor, Entry *entry) { - const char *buffer_end = buffer_ + buffer_length_; - - // Initialize enough of ENTRY for use in error reporting. - entry->offset = cursor - buffer_; - entry->start = cursor; - entry->kind = kUnknown; - entry->end = NULL; - - // Read the initial length. This sets reader_'s offset size. - size_t length_size; - uint64 length = reader_->ReadInitialLength(cursor, &length_size); - if (length_size > size_t(buffer_end - cursor)) - return ReportIncomplete(entry); - cursor += length_size; - - // In a .eh_frame section, a length of zero marks the end of the series - // of entries. - if (length == 0 && eh_frame_) { - entry->kind = kTerminator; - entry->end = cursor; - return true; - } - - // Validate the length. - if (length > size_t(buffer_end - cursor)) - return ReportIncomplete(entry); - - // The length is the number of bytes after the initial length field; - // we have that position handy at this point, so compute the end - // now. (If we're parsing 64-bit-offset DWARF on a 32-bit machine, - // and the length didn't fit in a size_t, we would have rejected it - // above.) - entry->end = cursor + length; - - // Parse the next field: either the offset of a CIE or a CIE id. - size_t offset_size = reader_->OffsetSize(); - if (offset_size > size_t(entry->end - cursor)) return ReportIncomplete(entry); - entry->id = reader_->ReadOffset(cursor); - - // Don't advance cursor past id field yet; in .eh_frame data we need - // the id's position to compute the section offset of an FDE's CIE. - - // Now we can decide what kind of entry this is. - if (eh_frame_) { - // In .eh_frame data, an ID of zero marks the entry as a CIE, and - // anything else is an offset from the id field of the FDE to the start - // of the CIE. - if (entry->id == 0) { - entry->kind = kCIE; - } else { - entry->kind = kFDE; - // Turn the offset from the id into an offset from the buffer's start. - entry->id = (cursor - buffer_) - entry->id; - } - } else { - // In DWARF CFI data, an ID of ~0 (of the appropriate width, given the - // offset size for the entry) marks the entry as a CIE, and anything - // else is the offset of the CIE from the beginning of the section. - if (offset_size == 4) - entry->kind = (entry->id == 0xffffffff) ? kCIE : kFDE; - else { - assert(offset_size == 8); - entry->kind = (entry->id == 0xffffffffffffffffULL) ? kCIE : kFDE; - } - } - - // Now advance cursor past the id. - cursor += offset_size; - - // The fields specific to this kind of entry start here. - entry->fields = cursor; - - entry->cie = NULL; - - return true; -} - -bool CallFrameInfo::ReadCIEFields(CIE *cie) { - const char *cursor = cie->fields; - size_t len; - - assert(cie->kind == kCIE); - - // Prepare for early exit. - cie->version = 0; - cie->augmentation.clear(); - cie->code_alignment_factor = 0; - cie->data_alignment_factor = 0; - cie->return_address_register = 0; - cie->has_z_augmentation = false; - cie->pointer_encoding = DW_EH_PE_absptr; - cie->instructions = 0; - - // Parse the version number. - if (cie->end - cursor < 1) - return ReportIncomplete(cie); - cie->version = reader_->ReadOneByte(cursor); - cursor++; - - // If we don't recognize the version, we can't parse any more fields - // of the CIE. For DWARF CFI, we handle versions 1 through 3 (there - // was never a version 2 of CFI data). For .eh_frame, we handle only - // version 1. - if (eh_frame_) { - if (cie->version != 1) { - reporter_->UnrecognizedVersion(cie->offset, cie->version); - return false; - } - } else { - if (cie->version < 1 || cie->version > 3) { - reporter_->UnrecognizedVersion(cie->offset, cie->version); - return false; - } - } - - const char *augmentation_start = cursor; - const void *augmentation_end = - memchr(augmentation_start, '\0', cie->end - augmentation_start); - if (! augmentation_end) return ReportIncomplete(cie); - cursor = static_cast(augmentation_end); - cie->augmentation = string(augmentation_start, cursor - augmentation_start); - // Skip the terminating '\0'. - cursor++; - - // Is this CFI augmented? - if (!cie->augmentation.empty()) { - // Is it an augmentation we recognize? - if (cie->augmentation[0] == DW_Z_augmentation_start) { - // Linux C++ ABI 'z' augmentation, used for exception handling data. - cie->has_z_augmentation = true; - } else { - // Not an augmentation we recognize. Augmentations can have arbitrary - // effects on the form of rest of the content, so we have to give up. - reporter_->UnrecognizedAugmentation(cie->offset, cie->augmentation); - return false; - } - } - - // Parse the code alignment factor. - cie->code_alignment_factor = reader_->ReadUnsignedLEB128(cursor, &len); - if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie); - cursor += len; - - // Parse the data alignment factor. - cie->data_alignment_factor = reader_->ReadSignedLEB128(cursor, &len); - if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie); - cursor += len; - - // Parse the return address register. This is a ubyte in version 1, and - // a ULEB128 in version 3. - if (cie->version == 1) { - if (cursor >= cie->end) return ReportIncomplete(cie); - cie->return_address_register = uint8(*cursor++); - } else { - cie->return_address_register = reader_->ReadUnsignedLEB128(cursor, &len); - if (size_t(cie->end - cursor) < len) return ReportIncomplete(cie); - cursor += len; - } - - // If we have a 'z' augmentation string, find the augmentation data and - // use the augmentation string to parse it. - if (cie->has_z_augmentation) { - uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &len); - if (size_t(cie->end - cursor) < len + data_size) - return ReportIncomplete(cie); - cursor += len; - const char *data = cursor; - cursor += data_size; - const char *data_end = cursor; - - cie->has_z_lsda = false; - cie->has_z_personality = false; - cie->has_z_signal_frame = false; - - // Walk the augmentation string, and extract values from the - // augmentation data as the string directs. - for (size_t i = 1; i < cie->augmentation.size(); i++) { - switch (cie->augmentation[i]) { - case DW_Z_has_LSDA: - // The CIE's augmentation data holds the language-specific data - // area pointer's encoding, and the FDE's augmentation data holds - // the pointer itself. - cie->has_z_lsda = true; - // Fetch the LSDA encoding from the augmentation data. - if (data >= data_end) return ReportIncomplete(cie); - cie->lsda_encoding = DwarfPointerEncoding(*data++); - if (!reader_->ValidEncoding(cie->lsda_encoding)) { - reporter_->InvalidPointerEncoding(cie->offset, cie->lsda_encoding); - return false; - } - // Don't check if the encoding is usable here --- we haven't - // read the FDE's fields yet, so we're not prepared for - // DW_EH_PE_funcrel, although that's a fine encoding for the - // LSDA to use, since it appears in the FDE. - break; - - case DW_Z_has_personality_routine: - // The CIE's augmentation data holds the personality routine - // pointer's encoding, followed by the pointer itself. - cie->has_z_personality = true; - // Fetch the personality routine pointer's encoding from the - // augmentation data. - if (data >= data_end) return ReportIncomplete(cie); - cie->personality_encoding = DwarfPointerEncoding(*data++); - if (!reader_->ValidEncoding(cie->personality_encoding)) { - reporter_->InvalidPointerEncoding(cie->offset, - cie->personality_encoding); - return false; - } - if (!reader_->UsableEncoding(cie->personality_encoding)) { - reporter_->UnusablePointerEncoding(cie->offset, - cie->personality_encoding); - return false; - } - // Fetch the personality routine's pointer itself from the data. - cie->personality_address = - reader_->ReadEncodedPointer(data, cie->personality_encoding, - &len); - if (len > size_t(data_end - data)) - return ReportIncomplete(cie); - data += len; - break; - - case DW_Z_has_FDE_address_encoding: - // The CIE's augmentation data holds the pointer encoding to use - // for addresses in the FDE. - if (data >= data_end) return ReportIncomplete(cie); - cie->pointer_encoding = DwarfPointerEncoding(*data++); - if (!reader_->ValidEncoding(cie->pointer_encoding)) { - reporter_->InvalidPointerEncoding(cie->offset, - cie->pointer_encoding); - return false; - } - if (!reader_->UsableEncoding(cie->pointer_encoding)) { - reporter_->UnusablePointerEncoding(cie->offset, - cie->pointer_encoding); - return false; - } - break; - - case DW_Z_is_signal_trampoline: - // Frames using this CIE are signal delivery frames. - cie->has_z_signal_frame = true; - break; - - default: - // An augmentation we don't recognize. - reporter_->UnrecognizedAugmentation(cie->offset, cie->augmentation); - return false; - } - } - } - - // The CIE's instructions start here. - cie->instructions = cursor; - - return true; -} - -bool CallFrameInfo::ReadFDEFields(FDE *fde) { - const char *cursor = fde->fields; - size_t size; - - fde->address = reader_->ReadEncodedPointer(cursor, fde->cie->pointer_encoding, - &size); - if (size > size_t(fde->end - cursor)) - return ReportIncomplete(fde); - cursor += size; - reader_->SetFunctionBase(fde->address); - - // For the length, we strip off the upper nybble of the encoding used for - // the starting address. - DwarfPointerEncoding length_encoding = - DwarfPointerEncoding(fde->cie->pointer_encoding & 0x0f); - fde->size = reader_->ReadEncodedPointer(cursor, length_encoding, &size); - if (size > size_t(fde->end - cursor)) - return ReportIncomplete(fde); - cursor += size; - - // If the CIE has a 'z' augmentation string, then augmentation data - // appears here. - if (fde->cie->has_z_augmentation) { - uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &size); - if (size_t(fde->end - cursor) < size + data_size) - return ReportIncomplete(fde); - cursor += size; - - // In the abstract, we should walk the augmentation string, and extract - // items from the FDE's augmentation data as we encounter augmentation - // string characters that specify their presence: the ordering of items - // in the augmentation string determines the arrangement of values in - // the augmentation data. - // - // In practice, there's only ever one value in FDE augmentation data - // that we support --- the LSDA pointer --- and we have to bail if we - // see any unrecognized augmentation string characters. So if there is - // anything here at all, we know what it is, and where it starts. - if (fde->cie->has_z_lsda) { - // Check whether the LSDA's pointer encoding is usable now: only once - // we've parsed the FDE's starting address do we call reader_-> - // SetFunctionBase, so that the DW_EH_PE_funcrel encoding becomes - // usable. - if (!reader_->UsableEncoding(fde->cie->lsda_encoding)) { - reporter_->UnusablePointerEncoding(fde->cie->offset, - fde->cie->lsda_encoding); - return false; - } - - fde->lsda_address = - reader_->ReadEncodedPointer(cursor, fde->cie->lsda_encoding, &size); - if (size > data_size) - return ReportIncomplete(fde); - // Ideally, we would also complain here if there were unconsumed - // augmentation data. - } - - cursor += data_size; - } - - // The FDE's instructions start after those. - fde->instructions = cursor; - - return true; -} - -bool CallFrameInfo::Start() { - const char *buffer_end = buffer_ + buffer_length_; - const char *cursor; - bool all_ok = true; - const char *entry_end; - bool ok; - - // Traverse all the entries in buffer_, skipping CIEs and offering - // FDEs to the handler. - for (cursor = buffer_; cursor < buffer_end; - cursor = entry_end, all_ok = all_ok && ok) { - FDE fde; - - // Make it easy to skip this entry with 'continue': assume that - // things are not okay until we've checked all the data, and - // prepare the address of the next entry. - ok = false; - - // Read the entry's prologue. - if (!ReadEntryPrologue(cursor, &fde)) { - if (!fde.end) { - // If we couldn't even figure out this entry's extent, then we - // must stop processing entries altogether. - all_ok = false; - break; - } - entry_end = fde.end; - continue; - } - - // The next iteration picks up after this entry. - entry_end = fde.end; - - // Did we see an .eh_frame terminating mark? - if (fde.kind == kTerminator) { - // If there appears to be more data left in the section after the - // terminating mark, warn the user. But this is just a warning; - // we leave all_ok true. - if (fde.end < buffer_end) reporter_->EarlyEHTerminator(fde.offset); - break; - } - - // In this loop, we skip CIEs. We only parse them fully when we - // parse an FDE that refers to them. This limits our memory - // consumption (beyond the buffer itself) to that needed to - // process the largest single entry. - if (fde.kind != kFDE) { - ok = true; - continue; - } - - // Validate the CIE pointer. - if (fde.id > buffer_length_) { - reporter_->CIEPointerOutOfRange(fde.offset, fde.id); - continue; - } - - CIE cie; - - // Parse this FDE's CIE header. - if (!ReadEntryPrologue(buffer_ + fde.id, &cie)) - continue; - // This had better be an actual CIE. - if (cie.kind != kCIE) { - reporter_->BadCIEId(fde.offset, fde.id); - continue; - } - if (!ReadCIEFields(&cie)) - continue; - - // We now have the values that govern both the CIE and the FDE. - cie.cie = &cie; - fde.cie = &cie; - - // Parse the FDE's header. - if (!ReadFDEFields(&fde)) - continue; - - // Call Entry to ask the consumer if they're interested. - if (!handler_->Entry(fde.offset, fde.address, fde.size, - cie.version, cie.augmentation, - cie.return_address_register)) { - // The handler isn't interested in this entry. That's not an error. - ok = true; - continue; - } - - if (cie.has_z_augmentation) { - // Report the personality routine address, if we have one. - if (cie.has_z_personality) { - if (!handler_ - ->PersonalityRoutine(cie.personality_address, - IsIndirectEncoding(cie.personality_encoding))) - continue; - } - - // Report the language-specific data area address, if we have one. - if (cie.has_z_lsda) { - if (!handler_ - ->LanguageSpecificDataArea(fde.lsda_address, - IsIndirectEncoding(cie.lsda_encoding))) - continue; - } - - // If this is a signal-handling frame, report that. - if (cie.has_z_signal_frame) { - if (!handler_->SignalHandler()) - continue; - } - } - - // Interpret the CIE's instructions, and then the FDE's instructions. - State state(reader_, handler_, reporter_, fde.address); - ok = state.InterpretCIE(cie) && state.InterpretFDE(fde); - - // Tell the ByteReader that the function start address from the - // FDE header is no longer valid. - reader_->ClearFunctionBase(); - - // Report the end of the entry. - handler_->End(); - } - - return all_ok; -} - -const char *CallFrameInfo::KindName(EntryKind kind) { - if (kind == CallFrameInfo::kUnknown) - return "entry"; - else if (kind == CallFrameInfo::kCIE) - return "common information entry"; - else if (kind == CallFrameInfo::kFDE) - return "frame description entry"; - else { - assert (kind == CallFrameInfo::kTerminator); - return ".eh_frame sequence terminator"; - } -} - -bool CallFrameInfo::ReportIncomplete(Entry *entry) { - reporter_->Incomplete(entry->offset, entry->kind); - return false; -} - -void CallFrameInfo::Reporter::Incomplete(uint64 offset, - CallFrameInfo::EntryKind kind) { - fprintf(stderr, - "%s: CFI %s at offset 0x%llx in '%s': entry ends early\n", - filename_.c_str(), CallFrameInfo::KindName(kind), offset, - section_.c_str()); -} - -void CallFrameInfo::Reporter::EarlyEHTerminator(uint64 offset) { - fprintf(stderr, - "%s: CFI at offset 0x%llx in '%s': saw end-of-data marker" - " before end of section contents\n", - filename_.c_str(), offset, section_.c_str()); -} - -void CallFrameInfo::Reporter::CIEPointerOutOfRange(uint64 offset, - uint64 cie_offset) { - fprintf(stderr, - "%s: CFI frame description entry at offset 0x%llx in '%s':" - " CIE pointer is out of range: 0x%llx\n", - filename_.c_str(), offset, section_.c_str(), cie_offset); -} - -void CallFrameInfo::Reporter::BadCIEId(uint64 offset, uint64 cie_offset) { - fprintf(stderr, - "%s: CFI frame description entry at offset 0x%llx in '%s':" - " CIE pointer does not point to a CIE: 0x%llx\n", - filename_.c_str(), offset, section_.c_str(), cie_offset); -} - -void CallFrameInfo::Reporter::UnrecognizedVersion(uint64 offset, int version) { - fprintf(stderr, - "%s: CFI frame description entry at offset 0x%llx in '%s':" - " CIE specifies unrecognized version: %d\n", - filename_.c_str(), offset, section_.c_str(), version); -} - -void CallFrameInfo::Reporter::UnrecognizedAugmentation(uint64 offset, - const string &aug) { - fprintf(stderr, - "%s: CFI frame description entry at offset 0x%llx in '%s':" - " CIE specifies unrecognized augmentation: '%s'\n", - filename_.c_str(), offset, section_.c_str(), aug.c_str()); -} - -void CallFrameInfo::Reporter::InvalidPointerEncoding(uint64 offset, - uint8 encoding) { - fprintf(stderr, - "%s: CFI common information entry at offset 0x%llx in '%s':" - " 'z' augmentation specifies invalid pointer encoding: 0x%02x\n", - filename_.c_str(), offset, section_.c_str(), encoding); -} - -void CallFrameInfo::Reporter::UnusablePointerEncoding(uint64 offset, - uint8 encoding) { - fprintf(stderr, - "%s: CFI common information entry at offset 0x%llx in '%s':" - " 'z' augmentation specifies a pointer encoding for which" - " we have no base address: 0x%02x\n", - filename_.c_str(), offset, section_.c_str(), encoding); -} - -void CallFrameInfo::Reporter::RestoreInCIE(uint64 offset, uint64 insn_offset) { - fprintf(stderr, - "%s: CFI common information entry at offset 0x%llx in '%s':" - " the DW_CFA_restore instruction at offset 0x%llx" - " cannot be used in a common information entry\n", - filename_.c_str(), offset, section_.c_str(), insn_offset); -} - -void CallFrameInfo::Reporter::BadInstruction(uint64 offset, - CallFrameInfo::EntryKind kind, - uint64 insn_offset) { - fprintf(stderr, - "%s: CFI %s at offset 0x%llx in section '%s':" - " the instruction at offset 0x%llx is unrecognized\n", - filename_.c_str(), CallFrameInfo::KindName(kind), - offset, section_.c_str(), insn_offset); -} - -void CallFrameInfo::Reporter::NoCFARule(uint64 offset, - CallFrameInfo::EntryKind kind, - uint64 insn_offset) { - fprintf(stderr, - "%s: CFI %s at offset 0x%llx in section '%s':" - " the instruction at offset 0x%llx assumes that a CFA rule has" - " been set, but none has been set\n", - filename_.c_str(), CallFrameInfo::KindName(kind), offset, - section_.c_str(), insn_offset); -} - -void CallFrameInfo::Reporter::EmptyStateStack(uint64 offset, - CallFrameInfo::EntryKind kind, - uint64 insn_offset) { - fprintf(stderr, - "%s: CFI %s at offset 0x%llx in section '%s':" - " the DW_CFA_restore_state instruction at offset 0x%llx" - " should pop a saved state from the stack, but the stack is empty\n", - filename_.c_str(), CallFrameInfo::KindName(kind), offset, - section_.c_str(), insn_offset); -} - -void CallFrameInfo::Reporter::ClearingCFARule(uint64 offset, - CallFrameInfo::EntryKind kind, - uint64 insn_offset) { - fprintf(stderr, - "%s: CFI %s at offset 0x%llx in section '%s':" - " the DW_CFA_restore_state instruction at offset 0x%llx" - " would clear the CFA rule in effect\n", - filename_.c_str(), CallFrameInfo::KindName(kind), offset, - section_.c_str(), insn_offset); -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.h deleted file mode 100644 index 5a255238..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader.h +++ /dev/null @@ -1,1042 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// CFI reader author: Jim Blandy - -// This file contains definitions related to the DWARF2/3 reader and -// it's handler interfaces. -// The DWARF2/3 specification can be found at -// http://dwarf.freestandards.org and should be considered required -// reading if you wish to modify the implementation. -// Only a cursory attempt is made to explain terminology that is -// used here, as it is much better explained in the standard documents -#ifndef COMMON_DWARF_DWARF2READER_H__ -#define COMMON_DWARF_DWARF2READER_H__ - -#include -#include -#include -#include -#include - -#include "common/dwarf/bytereader.h" -#include "common/dwarf/dwarf2enums.h" -#include "common/dwarf/types.h" - -using namespace std; - -namespace dwarf2reader { -struct LineStateMachine; -class Dwarf2Handler; -class LineInfoHandler; - -// This maps from a string naming a section to a pair containing a -// the data for the section, and the size of the section. -typedef map > SectionMap; -typedef list > AttributeList; -typedef AttributeList::iterator AttributeIterator; -typedef AttributeList::const_iterator ConstAttributeIterator; - -struct LineInfoHeader { - uint64 total_length; - uint16 version; - uint64 prologue_length; - uint8 min_insn_length; // insn stands for instructin - bool default_is_stmt; // stmt stands for statement - int8 line_base; - uint8 line_range; - uint8 opcode_base; - // Use a pointer so that signalsafe_addr2line is able to use this structure - // without heap allocation problem. - vector *std_opcode_lengths; -}; - -class LineInfo { - public: - - // Initializes a .debug_line reader. Buffer and buffer length point - // to the beginning and length of the line information to read. - // Reader is a ByteReader class that has the endianness set - // properly. - LineInfo(const char* buffer_, uint64 buffer_length, - ByteReader* reader, LineInfoHandler* handler); - - virtual ~LineInfo() { - if (header_.std_opcode_lengths) { - delete header_.std_opcode_lengths; - } - } - - // Start processing line info, and calling callbacks in the handler. - // Consumes the line number information for a single compilation unit. - // Returns the number of bytes processed. - uint64 Start(); - - // Process a single line info opcode at START using the state - // machine at LSM. Return true if we should define a line using the - // current state of the line state machine. Place the length of the - // opcode in LEN. - // If LSM_PASSES_PC is non-NULL, this function also checks if the lsm - // passes the address of PC. In other words, LSM_PASSES_PC will be - // set to true, if the following condition is met. - // - // lsm's old address < PC <= lsm's new address - static bool ProcessOneOpcode(ByteReader* reader, - LineInfoHandler* handler, - const struct LineInfoHeader &header, - const char* start, - struct LineStateMachine* lsm, - size_t* len, - uintptr pc, - bool *lsm_passes_pc); - - private: - // Reads the DWARF2/3 header for this line info. - void ReadHeader(); - - // Reads the DWARF2/3 line information - void ReadLines(); - - // The associated handler to call processing functions in - LineInfoHandler* handler_; - - // The associated ByteReader that handles endianness issues for us - ByteReader* reader_; - - // A DWARF2/3 line info header. This is not the same size as - // in the actual file, as the one in the file may have a 32 bit or - // 64 bit lengths - - struct LineInfoHeader header_; - - // buffer is the buffer for our line info, starting at exactly where - // the line info to read is. after_header is the place right after - // the end of the line information header. - const char* buffer_; - uint64 buffer_length_; - const char* after_header_; -}; - -// This class is the main interface between the line info reader and -// the client. The virtual functions inside this get called for -// interesting events that happen during line info reading. The -// default implementation does nothing - -class LineInfoHandler { - public: - LineInfoHandler() { } - - virtual ~LineInfoHandler() { } - - // Called when we define a directory. NAME is the directory name, - // DIR_NUM is the directory number - virtual void DefineDir(const string& name, uint32 dir_num) { } - - // Called when we define a filename. NAME is the filename, FILE_NUM - // is the file number which is -1 if the file index is the next - // index after the last numbered index (this happens when files are - // dynamically defined by the line program), DIR_NUM is the - // directory index for the directory name of this file, MOD_TIME is - // the modification time of the file, and LENGTH is the length of - // the file - virtual void DefineFile(const string& name, int32 file_num, - uint32 dir_num, uint64 mod_time, - uint64 length) { } - - // Called when the line info reader has a new line, address pair - // ready for us. ADDRESS is the address of the code, LENGTH is the - // length of its machine code in bytes, FILE_NUM is the file number - // containing the code, LINE_NUM is the line number in that file for - // the code, and COLUMN_NUM is the column number the code starts at, - // if we know it (0 otherwise). - virtual void AddLine(uint64 address, uint64 length, - uint32 file_num, uint32 line_num, uint32 column_num) { } -}; - -// The base of DWARF2/3 debug info is a DIE (Debugging Information -// Entry. -// DWARF groups DIE's into a tree and calls the root of this tree a -// "compilation unit". Most of the time, there is one compilation -// unit in the .debug_info section for each file that had debug info -// generated. -// Each DIE consists of - -// 1. a tag specifying a thing that is being described (ie -// DW_TAG_subprogram for functions, DW_TAG_variable for variables, etc -// 2. attributes (such as DW_AT_location for location in memory, -// DW_AT_name for name), and data for each attribute. -// 3. A flag saying whether the DIE has children or not - -// In order to gain some amount of compression, the format of -// each DIE (tag name, attributes and data forms for the attributes) -// are stored in a separate table called the "abbreviation table". -// This is done because a large number of DIEs have the exact same tag -// and list of attributes, but different data for those attributes. -// As a result, the .debug_info section is just a stream of data, and -// requires reading of the .debug_abbrev section to say what the data -// means. - -// As a warning to the user, it should be noted that the reason for -// using absolute offsets from the beginning of .debug_info is that -// DWARF2/3 supports referencing DIE's from other DIE's by their offset -// from either the current compilation unit start, *or* the beginning -// of the .debug_info section. This means it is possible to reference -// a DIE in one compilation unit from a DIE in another compilation -// unit. This style of reference is usually used to eliminate -// duplicated information that occurs across compilation -// units, such as base types, etc. GCC 3.4+ support this with -// -feliminate-dwarf2-dups. Other toolchains will sometimes do -// duplicate elimination in the linker. - -class CompilationUnit { - public: - - // Initialize a compilation unit. This requires a map of sections, - // the offset of this compilation unit in the .debug_info section, a - // ByteReader, and a Dwarf2Handler class to call callbacks in. - CompilationUnit(const SectionMap& sections, uint64 offset, - ByteReader* reader, Dwarf2Handler* handler); - virtual ~CompilationUnit() { - if (abbrevs_) delete abbrevs_; - } - - // Begin reading a Dwarf2 compilation unit, and calling the - // callbacks in the Dwarf2Handler - - // Return the full length of the compilation unit, including - // headers. This plus the starting offset passed to the constructor - // is the offset of the end of the compilation unit --- and the - // start of the next compilation unit, if there is one. - uint64 Start(); - - private: - - // This struct represents a single DWARF2/3 abbreviation - // The abbreviation tells how to read a DWARF2/3 DIE, and consist of a - // tag and a list of attributes, as well as the data form of each attribute. - struct Abbrev { - uint64 number; - enum DwarfTag tag; - bool has_children; - AttributeList attributes; - }; - - // A DWARF2/3 compilation unit header. This is not the same size as - // in the actual file, as the one in the file may have a 32 bit or - // 64 bit length. - struct CompilationUnitHeader { - uint64 length; - uint16 version; - uint64 abbrev_offset; - uint8 address_size; - } header_; - - // Reads the DWARF2/3 header for this compilation unit. - void ReadHeader(); - - // Reads the DWARF2/3 abbreviations for this compilation unit - void ReadAbbrevs(); - - // Processes a single DIE for this compilation unit and return a new - // pointer just past the end of it - const char* ProcessDIE(uint64 dieoffset, - const char* start, - const Abbrev& abbrev); - - // Processes a single attribute and return a new pointer just past the - // end of it - const char* ProcessAttribute(uint64 dieoffset, - const char* start, - enum DwarfAttribute attr, - enum DwarfForm form); - - // Processes all DIEs for this compilation unit - void ProcessDIEs(); - - // Skips the die with attributes specified in ABBREV starting at - // START, and return the new place to position the stream to. - const char* SkipDIE(const char* start, - const Abbrev& abbrev); - - // Skips the attribute starting at START, with FORM, and return the - // new place to position the stream to. - const char* SkipAttribute(const char* start, - enum DwarfForm form); - - // Offset from section start is the offset of this compilation unit - // from the beginning of the .debug_info section. - uint64 offset_from_section_start_; - - // buffer is the buffer for our CU, starting at .debug_info + offset - // passed in from constructor. - // after_header points to right after the compilation unit header. - const char* buffer_; - uint64 buffer_length_; - const char* after_header_; - - // The associated ByteReader that handles endianness issues for us - ByteReader* reader_; - - // The map of sections in our file to buffers containing their data - const SectionMap& sections_; - - // The associated handler to call processing functions in - Dwarf2Handler* handler_; - - // Set of DWARF2/3 abbreviations for this compilation unit. Indexed - // by abbreviation number, which means that abbrevs_[0] is not - // valid. - vector* abbrevs_; - - // String section buffer and length, if we have a string section. - // This is here to avoid doing a section lookup for strings in - // ProcessAttribute, which is in the hot path for DWARF2 reading. - const char* string_buffer_; - uint64 string_buffer_length_; -}; - -// This class is the main interface between the reader and the -// client. The virtual functions inside this get called for -// interesting events that happen during DWARF2 reading. -// The default implementation skips everything. - -class Dwarf2Handler { - public: - Dwarf2Handler() { } - - virtual ~Dwarf2Handler() { } - - // Start to process a compilation unit at OFFSET from the beginning of the - // .debug_info section. Return false if you would like to skip this - // compilation unit. - virtual bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version) { return false; } - - // Start to process a DIE at OFFSET from the beginning of the .debug_info - // section. Return false if you would like to skip this DIE. - virtual bool StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { return false; } - - // Called when we have an attribute with unsigned data to give to our - // handler. The attribute is for the DIE at OFFSET from the beginning of the - // .debug_info section. Its name is ATTR, its form is FORM, and its value is - // DATA. - virtual void ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { } - - // Called when we have an attribute with signed data to give to our handler. - // The attribute is for the DIE at OFFSET from the beginning of the - // .debug_info section. Its name is ATTR, its form is FORM, and its value is - // DATA. - virtual void ProcessAttributeSigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { } - - // Called when we have an attribute whose value is a reference to - // another DIE. The attribute belongs to the DIE at OFFSET from the - // beginning of the .debug_info section. Its name is ATTR, its form - // is FORM, and the offset of the DIE being referred to from the - // beginning of the .debug_info section is DATA. - virtual void ProcessAttributeReference(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { } - - // Called when we have an attribute with a buffer of data to give to our - // handler. The attribute is for the DIE at OFFSET from the beginning of the - // .debug_info section. Its name is ATTR, its form is FORM, DATA points to - // the buffer's contents, and its length in bytes is LENGTH. The buffer is - // owned by the caller, not the callee, and may not persist for very long. - // If you want the data to be available later, it needs to be copied. - virtual void ProcessAttributeBuffer(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const char* data, - uint64 len) { } - - // Called when we have an attribute with string data to give to our handler. - // The attribute is for the DIE at OFFSET from the beginning of the - // .debug_info section. Its name is ATTR, its form is FORM, and its value is - // DATA. - virtual void ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string& data) { } - - // Called when finished processing the DIE at OFFSET. - // Because DWARF2/3 specifies a tree of DIEs, you may get starts - // before ends of the previous DIE, as we process children before - // ending the parent. - virtual void EndDIE(uint64 offset) { } - -}; - -// This class is a reader for DWARF's Call Frame Information. CFI -// describes how to unwind stack frames --- even for functions that do -// not follow fixed conventions for saving registers, whose frame size -// varies as they execute, etc. -// -// CFI describes, at each machine instruction, how to compute the -// stack frame's base address, how to find the return address, and -// where to find the saved values of the caller's registers (if the -// callee has stashed them somewhere to free up the registers for its -// own use). -// -// For example, suppose we have a function whose machine code looks -// like this (imagine an assembly language that looks like C, for a -// machine with 32-bit registers, and a stack that grows towards lower -// addresses): -// -// func: ; entry point; return address at sp -// func+0: sp = sp - 16 ; allocate space for stack frame -// func+1: sp[12] = r0 ; save r0 at sp+12 -// ... ; other code, not frame-related -// func+10: sp -= 4; *sp = x ; push some x on the stack -// ... ; other code, not frame-related -// func+20: r0 = sp[16] ; restore saved r0 -// func+21: sp += 20 ; pop whole stack frame -// func+22: pc = *sp; sp += 4 ; pop return address and jump to it -// -// DWARF CFI is (a very compressed representation of) a table with a -// row for each machine instruction address and a column for each -// register showing how to restore it, if possible. -// -// A special column named "CFA", for "Canonical Frame Address", tells how -// to compute the base address of the frame; registers' entries may -// refer to the CFA in describing where the registers are saved. -// -// Another special column, named "RA", represents the return address. -// -// For example, here is a complete (uncompressed) table describing the -// function above: -// -// insn cfa r0 r1 ... ra -// ======================================= -// func+0: sp cfa[0] -// func+1: sp+16 cfa[0] -// func+2: sp+16 cfa[-4] cfa[0] -// func+11: sp+20 cfa[-4] cfa[0] -// func+21: sp+20 cfa[0] -// func+22: sp cfa[0] -// -// Some things to note here: -// -// - Each row describes the state of affairs *before* executing the -// instruction at the given address. Thus, the row for func+0 -// describes the state before we allocate the stack frame. In the -// next row, the formula for computing the CFA has changed, -// reflecting that allocation. -// -// - The other entries are written in terms of the CFA; this allows -// them to remain unchanged as the stack pointer gets bumped around. -// For example, the rule for recovering the return address (the "ra" -// column) remains unchanged throughout the function, even as the -// stack pointer takes on three different offsets from the return -// address. -// -// - Although we haven't shown it, most calling conventions designate -// "callee-saves" and "caller-saves" registers. The callee must -// preserve the values of callee-saves registers; if it uses them, -// it must save their original values somewhere, and restore them -// before it returns. In contrast, the callee is free to trash -// caller-saves registers; if the callee uses these, it will -// probably not bother to save them anywhere, and the CFI will -// probably mark their values as "unrecoverable". -// -// (However, since the caller cannot assume the callee was going to -// save them, caller-saves registers are probably dead in the caller -// anyway, so compilers usually don't generate CFA for caller-saves -// registers.) -// -// - Exactly where the CFA points is a matter of convention that -// depends on the architecture and ABI in use. In the example, the -// CFA is the value the stack pointer had upon entry to the -// function, pointing at the saved return address. But on the x86, -// the call frame information generated by GCC follows the -// convention that the CFA is the address *after* the saved return -// address. -// -// But by definition, the CFA remains constant throughout the -// lifetime of the frame. This makes it a useful value for other -// columns to refer to. It is also gives debuggers a useful handle -// for identifying a frame. -// -// If you look at the table above, you'll notice that a given entry is -// often the same as the one immediately above it: most instructions -// change only one or two aspects of the stack frame, if they affect -// it at all. The DWARF format takes advantage of this fact, and -// reduces the size of the data by mentioning only the addresses and -// columns at which changes take place. So for the above, DWARF CFI -// data would only actually mention the following: -// -// insn cfa r0 r1 ... ra -// ======================================= -// func+0: sp cfa[0] -// func+1: sp+16 -// func+2: cfa[-4] -// func+11: sp+20 -// func+21: r0 -// func+22: sp -// -// In fact, this is the way the parser reports CFI to the consumer: as -// a series of statements of the form, "At address X, column Y changed -// to Z," and related conventions for describing the initial state. -// -// Naturally, it would be impractical to have to scan the entire -// program's CFI, noting changes as we go, just to recover the -// unwinding rules in effect at one particular instruction. To avoid -// this, CFI data is grouped into "entries", each of which covers a -// specified range of addresses and begins with a complete statement -// of the rules for all recoverable registers at that starting -// address. Each entry typically covers a single function. -// -// Thus, to compute the contents of a given row of the table --- that -// is, rules for recovering the CFA, RA, and registers at a given -// instruction --- the consumer should find the entry that covers that -// instruction's address, start with the initial state supplied at the -// beginning of the entry, and work forward until it has processed all -// the changes up to and including those for the present instruction. -// -// There are seven kinds of rules that can appear in an entry of the -// table: -// -// - "undefined": The given register is not preserved by the callee; -// its value cannot be recovered. -// -// - "same value": This register has the same value it did in the callee. -// -// - offset(N): The register is saved at offset N from the CFA. -// -// - val_offset(N): The value the register had in the caller is the -// CFA plus offset N. (This is usually only useful for describing -// the stack pointer.) -// -// - register(R): The register's value was saved in another register R. -// -// - expression(E): Evaluating the DWARF expression E using the -// current frame's registers' values yields the address at which the -// register was saved. -// -// - val_expression(E): Evaluating the DWARF expression E using the -// current frame's registers' values yields the value the register -// had in the caller. - -class CallFrameInfo { - public: - // The different kinds of entries one finds in CFI. Used internally, - // and for error reporting. - enum EntryKind { kUnknown, kCIE, kFDE, kTerminator }; - - // The handler class to which the parser hands the parsed call frame - // information. Defined below. - class Handler; - - // A reporter class, which CallFrameInfo uses to report errors - // encountered while parsing call frame information. Defined below. - class Reporter; - - // Create a DWARF CFI parser. BUFFER points to the contents of the - // .debug_frame section to parse; BUFFER_LENGTH is its length in bytes. - // REPORTER is an error reporter the parser should use to report - // problems. READER is a ByteReader instance that has the endianness and - // address size set properly. Report the data we find to HANDLER. - // - // This class can also parse Linux C++ exception handling data, as found - // in '.eh_frame' sections. This data is a variant of DWARF CFI that is - // placed in loadable segments so that it is present in the program's - // address space, and is interpreted by the C++ runtime to search the - // call stack for a handler interested in the exception being thrown, - // actually pop the frames, and find cleanup code to run. - // - // There are two differences between the call frame information described - // in the DWARF standard and the exception handling data Linux places in - // the .eh_frame section: - // - // - Exception handling data uses uses a different format for call frame - // information entry headers. The distinguished CIE id, the way FDEs - // refer to their CIEs, and the way the end of the series of entries is - // determined are all slightly different. - // - // If the constructor's EH_FRAME argument is true, then the - // CallFrameInfo parses the entry headers as Linux C++ exception - // handling data. If EH_FRAME is false or omitted, the CallFrameInfo - // parses standard DWARF call frame information. - // - // - Linux C++ exception handling data uses CIE augmentation strings - // beginning with 'z' to specify the presence of additional data after - // the CIE and FDE headers and special encodings used for addresses in - // frame description entries. - // - // CallFrameInfo can handle 'z' augmentations in either DWARF CFI or - // exception handling data if you have supplied READER with the base - // addresses needed to interpret the pointer encodings that 'z' - // augmentations can specify. See the ByteReader interface for details - // about the base addresses. See the CallFrameInfo::Handler interface - // for details about the additional information one might find in - // 'z'-augmented data. - // - // Thus: - // - // - If you are parsing standard DWARF CFI, as found in a .debug_frame - // section, you should pass false for the EH_FRAME argument, or omit - // it, and you need not worry about providing READER with the - // additional base addresses. - // - // - If you want to parse Linux C++ exception handling data from a - // .eh_frame section, you should pass EH_FRAME as true, and call - // READER's Set*Base member functions before calling our Start method. - // - // - If you want to parse DWARF CFI that uses the 'z' augmentations - // (although I don't think any toolchain ever emits such data), you - // could pass false for EH_FRAME, but call READER's Set*Base members. - // - // The extensions the Linux C++ ABI makes to DWARF for exception - // handling are described here, rather poorly: - // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html - // http://refspecs.linux-foundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html - // - // The mechanics of C++ exception handling, personality routines, - // and language-specific data areas are described here, rather nicely: - // http://www.codesourcery.com/public/cxx-abi/abi-eh.html - CallFrameInfo(const char *buffer, size_t buffer_length, - ByteReader *reader, Handler *handler, Reporter *reporter, - bool eh_frame = false) - : buffer_(buffer), buffer_length_(buffer_length), - reader_(reader), handler_(handler), reporter_(reporter), - eh_frame_(eh_frame) { } - - ~CallFrameInfo() { } - - // Parse the entries in BUFFER, reporting what we find to HANDLER. - // Return true if we reach the end of the section successfully, or - // false if we encounter an error. - bool Start(); - - // Return the textual name of KIND. For error reporting. - static const char *KindName(EntryKind kind); - - private: - - struct CIE; - - // A CFI entry, either an FDE or a CIE. - struct Entry { - // The starting offset of the entry in the section, for error - // reporting. - size_t offset; - - // The start of this entry in the buffer. - const char *start; - - // Which kind of entry this is. - // - // We want to be able to use this for error reporting even while we're - // in the midst of parsing. Error reporting code may assume that kind, - // offset, and start fields are valid, although kind may be kUnknown. - EntryKind kind; - - // The end of this entry's common prologue (initial length and id), and - // the start of this entry's kind-specific fields. - const char *fields; - - // The start of this entry's instructions. - const char *instructions; - - // The address past the entry's last byte in the buffer. (Note that - // since offset points to the entry's initial length field, and the - // length field is the number of bytes after that field, this is not - // simply buffer_ + offset + length.) - const char *end; - - // For both DWARF CFI and .eh_frame sections, this is the CIE id in a - // CIE, and the offset of the associated CIE in an FDE. - uint64 id; - - // The CIE that applies to this entry, if we've parsed it. If this is a - // CIE, then this field points to this structure. - CIE *cie; - }; - - // A common information entry (CIE). - struct CIE: public Entry { - uint8 version; // CFI data version number - string augmentation; // vendor format extension markers - uint64 code_alignment_factor; // scale for code address adjustments - int data_alignment_factor; // scale for stack pointer adjustments - unsigned return_address_register; // which register holds the return addr - - // True if this CIE includes Linux C++ ABI 'z' augmentation data. - bool has_z_augmentation; - - // Parsed 'z' augmentation data. These are meaningful only if - // has_z_augmentation is true. - bool has_z_lsda; // The 'z' augmentation included 'L'. - bool has_z_personality; // The 'z' augmentation included 'P'. - bool has_z_signal_frame; // The 'z' augmentation included 'S'. - - // If has_z_lsda is true, this is the encoding to be used for language- - // specific data area pointers in FDEs. - DwarfPointerEncoding lsda_encoding; - - // If has_z_personality is true, this is the encoding used for the - // personality routine pointer in the augmentation data. - DwarfPointerEncoding personality_encoding; - - // If has_z_personality is true, this is the address of the personality - // routine --- or, if personality_encoding & DW_EH_PE_indirect, the - // address where the personality routine's address is stored. - uint64 personality_address; - - // This is the encoding used for addresses in the FDE header and - // in DW_CFA_set_loc instructions. This is always valid, whether - // or not we saw a 'z' augmentation string; its default value is - // DW_EH_PE_absptr, which is what normal DWARF CFI uses. - DwarfPointerEncoding pointer_encoding; - }; - - // A frame description entry (FDE). - struct FDE: public Entry { - uint64 address; // start address of described code - uint64 size; // size of described code, in bytes - - // If cie->has_z_lsda is true, then this is the language-specific data - // area's address --- or its address's address, if cie->lsda_encoding - // has the DW_EH_PE_indirect bit set. - uint64 lsda_address; - }; - - // Internal use. - class Rule; - class UndefinedRule; - class SameValueRule; - class OffsetRule; - class ValOffsetRule; - class RegisterRule; - class ExpressionRule; - class ValExpressionRule; - class RuleMap; - class State; - - // Parse the initial length and id of a CFI entry, either a CIE, an FDE, - // or a .eh_frame end-of-data mark. CURSOR points to the beginning of the - // data to parse. On success, populate ENTRY as appropriate, and return - // true. On failure, report the problem, and return false. Even if we - // return false, set ENTRY->end to the first byte after the entry if we - // were able to figure that out, or NULL if we weren't. - bool ReadEntryPrologue(const char *cursor, Entry *entry); - - // Parse the fields of a CIE after the entry prologue, including any 'z' - // augmentation data. Assume that the 'Entry' fields of CIE are - // populated; use CIE->fields and CIE->end as the start and limit for - // parsing. On success, populate the rest of *CIE, and return true; on - // failure, report the problem and return false. - bool ReadCIEFields(CIE *cie); - - // Parse the fields of an FDE after the entry prologue, including any 'z' - // augmentation data. Assume that the 'Entry' fields of *FDE are - // initialized; use FDE->fields and FDE->end as the start and limit for - // parsing. Assume that FDE->cie is fully initialized. On success, - // populate the rest of *FDE, and return true; on failure, report the - // problem and return false. - bool ReadFDEFields(FDE *fde); - - // Report that ENTRY is incomplete, and return false. This is just a - // trivial wrapper for invoking reporter_->Incomplete; it provides a - // little brevity. - bool ReportIncomplete(Entry *entry); - - // Return true if ENCODING has the DW_EH_PE_indirect bit set. - static bool IsIndirectEncoding(DwarfPointerEncoding encoding) { - return encoding & DW_EH_PE_indirect; - } - - // The contents of the DWARF .debug_info section we're parsing. - const char *buffer_; - size_t buffer_length_; - - // For reading multi-byte values with the appropriate endianness. - ByteReader *reader_; - - // The handler to which we should report the data we find. - Handler *handler_; - - // For reporting problems in the info we're parsing. - Reporter *reporter_; - - // True if we are processing .eh_frame-format data. - bool eh_frame_; -}; - -// The handler class for CallFrameInfo. The a CFI parser calls the -// member functions of a handler object to report the data it finds. -class CallFrameInfo::Handler { - public: - // The pseudo-register number for the canonical frame address. - enum { kCFARegister = -1 }; - - Handler() { } - virtual ~Handler() { } - - // The parser has found CFI for the machine code at ADDRESS, - // extending for LENGTH bytes. OFFSET is the offset of the frame - // description entry in the section, for use in error messages. - // VERSION is the version number of the CFI format. AUGMENTATION is - // a string describing any producer-specific extensions present in - // the data. RETURN_ADDRESS is the number of the register that holds - // the address to which the function should return. - // - // Entry should return true to process this CFI, or false to skip to - // the next entry. - // - // The parser invokes Entry for each Frame Description Entry (FDE) - // it finds. The parser doesn't report Common Information Entries - // to the handler explicitly; instead, if the handler elects to - // process a given FDE, the parser reiterates the appropriate CIE's - // contents at the beginning of the FDE's rules. - virtual bool Entry(size_t offset, uint64 address, uint64 length, - uint8 version, const string &augmentation, - unsigned return_address) = 0; - - // When the Entry function returns true, the parser calls these - // handler functions repeatedly to describe the rules for recovering - // registers at each instruction in the given range of machine code. - // Immediately after a call to Entry, the handler should assume that - // the rule for each callee-saves register is "unchanged" --- that - // is, that the register still has the value it had in the caller. - // - // If a *Rule function returns true, we continue processing this entry's - // instructions. If a *Rule function returns false, we stop evaluating - // instructions, and skip to the next entry. Either way, we call End - // before going on to the next entry. - // - // In all of these functions, if the REG parameter is kCFARegister, then - // the rule describes how to find the canonical frame address. - // kCFARegister may be passed as a BASE_REGISTER argument, meaning that - // the canonical frame address should be used as the base address for the - // computation. All other REG values will be positive. - - // At ADDRESS, register REG's value is not recoverable. - virtual bool UndefinedRule(uint64 address, int reg) = 0; - - // At ADDRESS, register REG's value is the same as that it had in - // the caller. - virtual bool SameValueRule(uint64 address, int reg) = 0; - - // At ADDRESS, register REG has been saved at offset OFFSET from - // BASE_REGISTER. - virtual bool OffsetRule(uint64 address, int reg, - int base_register, long offset) = 0; - - // At ADDRESS, the caller's value of register REG is the current - // value of BASE_REGISTER plus OFFSET. (This rule doesn't provide an - // address at which the register's value is saved.) - virtual bool ValOffsetRule(uint64 address, int reg, - int base_register, long offset) = 0; - - // At ADDRESS, register REG has been saved in BASE_REGISTER. This differs - // from ValOffsetRule(ADDRESS, REG, BASE_REGISTER, 0), in that - // BASE_REGISTER is the "home" for REG's saved value: if you want to - // assign to a variable whose home is REG in the calling frame, you - // should put the value in BASE_REGISTER. - virtual bool RegisterRule(uint64 address, int reg, int base_register) = 0; - - // At ADDRESS, the DWARF expression EXPRESSION yields the address at - // which REG was saved. - virtual bool ExpressionRule(uint64 address, int reg, - const string &expression) = 0; - - // At ADDRESS, the DWARF expression EXPRESSION yields the caller's - // value for REG. (This rule doesn't provide an address at which the - // register's value is saved.) - virtual bool ValExpressionRule(uint64 address, int reg, - const string &expression) = 0; - - // Indicate that the rules for the address range reported by the - // last call to Entry are complete. End should return true if - // everything is okay, or false if an error has occurred and parsing - // should stop. - virtual bool End() = 0; - - // Handler functions for Linux C++ exception handling data. These are - // only called if the data includes 'z' augmentation strings. - - // The Linux C++ ABI uses an extension of the DWARF CFI format to - // walk the stack to propagate exceptions from the throw to the - // appropriate catch, and do the appropriate cleanups along the way. - // CFI entries used for exception handling have two additional data - // associated with them: - // - // - The "language-specific data area" describes which exception - // types the function has 'catch' clauses for, and indicates how - // to go about re-entering the function at the appropriate catch - // clause. If the exception is not caught, it describes the - // destructors that must run before the frame is popped. - // - // - The "personality routine" is responsible for interpreting the - // language-specific data area's contents, and deciding whether - // the exception should continue to propagate down the stack, - // perhaps after doing some cleanup for this frame, or whether the - // exception will be caught here. - // - // In principle, the language-specific data area is opaque to - // everybody but the personality routine. In practice, these values - // may be useful or interesting to readers with extra context, and - // we have to at least skip them anyway, so we might as well report - // them to the handler. - - // This entry's exception handling personality routine's address is - // ADDRESS. If INDIRECT is true, then ADDRESS is the address at - // which the routine's address is stored. The default definition for - // this handler function simply returns true, allowing parsing of - // the entry to continue. - virtual bool PersonalityRoutine(uint64 address, bool indirect) { - return true; - } - - // This entry's language-specific data area (LSDA) is located at - // ADDRESS. If INDIRECT is true, then ADDRESS is the address at - // which the area's address is stored. The default definition for - // this handler function simply returns true, allowing parsing of - // the entry to continue. - virtual bool LanguageSpecificDataArea(uint64 address, bool indirect) { - return true; - } - - // This entry describes a signal trampoline --- this frame is the - // caller of a signal handler. The default definition for this - // handler function simply returns true, allowing parsing of the - // entry to continue. - // - // The best description of the rationale for and meaning of signal - // trampoline CFI entries seems to be in the GCC bug database: - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26208 - virtual bool SignalHandler() { return true; } -}; - -// The CallFrameInfo class makes calls on an instance of this class to -// report errors or warn about problems in the data it is parsing. The -// default definitions of these methods print a message to stderr, but -// you can make a derived class that overrides them. -class CallFrameInfo::Reporter { - public: - // Create an error reporter which attributes troubles to the section - // named SECTION in FILENAME. - // - // Normally SECTION would be .debug_frame, but the Mac puts CFI data - // in a Mach-O section named __debug_frame. If we support - // Linux-style exception handling data, we could be reading an - // .eh_frame section. - Reporter(const string &filename, - const string §ion = ".debug_frame") - : filename_(filename), section_(section) { } - virtual ~Reporter() { } - - // The CFI entry at OFFSET ends too early to be well-formed. KIND - // indicates what kind of entry it is; KIND can be kUnknown if we - // haven't parsed enough of the entry to tell yet. - virtual void Incomplete(uint64 offset, CallFrameInfo::EntryKind kind); - - // The .eh_frame data has a four-byte zero at OFFSET where the next - // entry's length would be; this is a terminator. However, the buffer - // length as given to the CallFrameInfo constructor says there should be - // more data. - virtual void EarlyEHTerminator(uint64 offset); - - // The FDE at OFFSET refers to the CIE at CIE_OFFSET, but the - // section is not that large. - virtual void CIEPointerOutOfRange(uint64 offset, uint64 cie_offset); - - // The FDE at OFFSET refers to the CIE at CIE_OFFSET, but the entry - // there is not a CIE. - virtual void BadCIEId(uint64 offset, uint64 cie_offset); - - // The FDE at OFFSET refers to a CIE with version number VERSION, - // which we don't recognize. We cannot parse DWARF CFI if it uses - // a version number we don't recognize. - virtual void UnrecognizedVersion(uint64 offset, int version); - - // The FDE at OFFSET refers to a CIE with augmentation AUGMENTATION, - // which we don't recognize. We cannot parse DWARF CFI if it uses - // augmentations we don't recognize. - virtual void UnrecognizedAugmentation(uint64 offset, - const string &augmentation); - - // The pointer encoding ENCODING, specified by the CIE at OFFSET, is not - // a valid encoding. - virtual void InvalidPointerEncoding(uint64 offset, uint8 encoding); - - // The pointer encoding ENCODING, specified by the CIE at OFFSET, depends - // on a base address which has not been supplied. - virtual void UnusablePointerEncoding(uint64 offset, uint8 encoding); - - // The CIE at OFFSET contains a DW_CFA_restore instruction at - // INSN_OFFSET, which may not appear in a CIE. - virtual void RestoreInCIE(uint64 offset, uint64 insn_offset); - - // The entry at OFFSET, of kind KIND, has an unrecognized - // instruction at INSN_OFFSET. - virtual void BadInstruction(uint64 offset, CallFrameInfo::EntryKind kind, - uint64 insn_offset); - - // The instruction at INSN_OFFSET in the entry at OFFSET, of kind - // KIND, establishes a rule that cites the CFA, but we have not - // established a CFA rule yet. - virtual void NoCFARule(uint64 offset, CallFrameInfo::EntryKind kind, - uint64 insn_offset); - - // The instruction at INSN_OFFSET in the entry at OFFSET, of kind - // KIND, is a DW_CFA_restore_state instruction, but the stack of - // saved states is empty. - virtual void EmptyStateStack(uint64 offset, CallFrameInfo::EntryKind kind, - uint64 insn_offset); - - // The DW_CFA_remember_state instruction at INSN_OFFSET in the entry - // at OFFSET, of kind KIND, would restore a state that has no CFA - // rule, whereas the current state does have a CFA rule. This is - // bogus input, which the CallFrameInfo::Handler interface doesn't - // (and shouldn't) have any way to report. - virtual void ClearingCFARule(uint64 offset, CallFrameInfo::EntryKind kind, - uint64 insn_offset); - - protected: - // The name of the file whose CFI we're reading. - string filename_; - - // The name of the CFI section in that file. - string section_; -}; - -} // namespace dwarf2reader - -#endif // UTIL_DEBUGINFO_DWARF2READER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader_cfi_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader_cfi_unittest.cc deleted file mode 100644 index 1a2431c7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/dwarf2reader_cfi_unittest.cc +++ /dev/null @@ -1,2450 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf2reader_cfi_unittest.cc: Unit tests for dwarf2reader::CallFrameInfo - -#include - -#include - -// The '.eh_frame' format, used by the Linux C++ ABI for exception -// handling, is poorly specified. To help test our support for .eh_frame, -// if you #define WRITE_ELF while compiling this file, and add the -// 'include' directory from the binutils, gcc, or gdb source tree to the -// #include path, then each test that calls the -// PERHAPS_WRITE_DEBUG_FRAME_FILE or PERHAPS_WRITE_EH_FRAME_FILE will write -// an ELF file containing a .debug_frame or .eh_frame section; you can then -// use tools like readelf to examine the test data, and check the tools' -// interpretation against the test's intentions. Each ELF file is named -// "cfitest-TEST", where TEST identifies the particular test. -#ifdef WRITE_ELF -#include -#include -#include -extern "C" { -// To compile with WRITE_ELF, you should add the 'include' directory -// of the binutils, gcc, or gdb source tree to your #include path; -// that directory contains this header. -#include "elf/common.h" -} -#endif - -#include "breakpad_googletest_includes.h" -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/cfi_assembler.h" -#include "common/dwarf/dwarf2reader.h" -#include "google_breakpad/common/breakpad_types.h" - -using google_breakpad::CFISection; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Section; - -using dwarf2reader::DwarfPointerEncoding; -using dwarf2reader::ENDIANNESS_BIG; -using dwarf2reader::ENDIANNESS_LITTLE; -using dwarf2reader::ByteReader; -using dwarf2reader::CallFrameInfo; - -using std::vector; -using testing::InSequence; -using testing::Return; -using testing::Sequence; -using testing::Test; -using testing::_; - -#ifdef WRITE_ELF -void WriteELFFrameSection(const char *filename, const char *section_name, - const CFISection §ion); -#define PERHAPS_WRITE_DEBUG_FRAME_FILE(name, section) \ - WriteELFFrameSection("cfitest-" name, ".debug_frame", section); -#define PERHAPS_WRITE_EH_FRAME_FILE(name, section) \ - WriteELFFrameSection("cfitest-" name, ".eh_frame", section); -#else -#define PERHAPS_WRITE_DEBUG_FRAME_FILE(name, section) -#define PERHAPS_WRITE_EH_FRAME_FILE(name, section) -#endif - -class MockCallFrameInfoHandler: public CallFrameInfo::Handler { - public: - MOCK_METHOD6(Entry, bool(size_t offset, uint64 address, uint64 length, - uint8 version, const string &augmentation, - unsigned return_address)); - MOCK_METHOD2(UndefinedRule, bool(uint64 address, int reg)); - MOCK_METHOD2(SameValueRule, bool(uint64 address, int reg)); - MOCK_METHOD4(OffsetRule, bool(uint64 address, int reg, int base_register, - long offset)); - MOCK_METHOD4(ValOffsetRule, bool(uint64 address, int reg, int base_register, - long offset)); - MOCK_METHOD3(RegisterRule, bool(uint64 address, int reg, int base_register)); - MOCK_METHOD3(ExpressionRule, bool(uint64 address, int reg, - const string &expression)); - MOCK_METHOD3(ValExpressionRule, bool(uint64 address, int reg, - const string &expression)); - MOCK_METHOD0(End, bool()); - MOCK_METHOD2(PersonalityRoutine, bool(uint64 address, bool indirect)); - MOCK_METHOD2(LanguageSpecificDataArea, bool(uint64 address, bool indirect)); - MOCK_METHOD0(SignalHandler, bool()); -}; - -class MockCallFrameErrorReporter: public CallFrameInfo::Reporter { - public: - MockCallFrameErrorReporter() : Reporter("mock filename", "mock section") { } - MOCK_METHOD2(Incomplete, void(uint64, CallFrameInfo::EntryKind)); - MOCK_METHOD1(EarlyEHTerminator, void(uint64)); - MOCK_METHOD2(CIEPointerOutOfRange, void(uint64, uint64)); - MOCK_METHOD2(BadCIEId, void(uint64, uint64)); - MOCK_METHOD2(UnrecognizedVersion, void(uint64, int version)); - MOCK_METHOD2(UnrecognizedAugmentation, void(uint64, const string &)); - MOCK_METHOD2(InvalidPointerEncoding, void(uint64, uint8)); - MOCK_METHOD2(UnusablePointerEncoding, void(uint64, uint8)); - MOCK_METHOD2(RestoreInCIE, void(uint64, uint64)); - MOCK_METHOD3(BadInstruction, void(uint64, CallFrameInfo::EntryKind, uint64)); - MOCK_METHOD3(NoCFARule, void(uint64, CallFrameInfo::EntryKind, uint64)); - MOCK_METHOD3(EmptyStateStack, void(uint64, CallFrameInfo::EntryKind, uint64)); -}; - -struct CFIFixture { - - enum { kCFARegister = CallFrameInfo::Handler::kCFARegister }; - - CFIFixture() { - // Default expectations for the data handler. - // - // - Leave Entry and End without expectations, as it's probably a - // good idea to set those explicitly in each test. - // - // - Expect the *Rule functions to not be called, - // so that each test can simply list the calls they expect. - // - // I gather I could use StrictMock for this, but the manual seems - // to suggest using that only as a last resort, and this isn't so - // bad. - EXPECT_CALL(handler, UndefinedRule(_, _)).Times(0); - EXPECT_CALL(handler, SameValueRule(_, _)).Times(0); - EXPECT_CALL(handler, OffsetRule(_, _, _, _)).Times(0); - EXPECT_CALL(handler, ValOffsetRule(_, _, _, _)).Times(0); - EXPECT_CALL(handler, RegisterRule(_, _, _)).Times(0); - EXPECT_CALL(handler, ExpressionRule(_, _, _)).Times(0); - EXPECT_CALL(handler, ValExpressionRule(_, _, _)).Times(0); - EXPECT_CALL(handler, PersonalityRoutine(_, _)).Times(0); - EXPECT_CALL(handler, LanguageSpecificDataArea(_, _)).Times(0); - EXPECT_CALL(handler, SignalHandler()).Times(0); - - // Default expectations for the error/warning reporer. - EXPECT_CALL(reporter, Incomplete(_, _)).Times(0); - EXPECT_CALL(reporter, EarlyEHTerminator(_)).Times(0); - EXPECT_CALL(reporter, CIEPointerOutOfRange(_, _)).Times(0); - EXPECT_CALL(reporter, BadCIEId(_, _)).Times(0); - EXPECT_CALL(reporter, UnrecognizedVersion(_, _)).Times(0); - EXPECT_CALL(reporter, UnrecognizedAugmentation(_, _)).Times(0); - EXPECT_CALL(reporter, InvalidPointerEncoding(_, _)).Times(0); - EXPECT_CALL(reporter, UnusablePointerEncoding(_, _)).Times(0); - EXPECT_CALL(reporter, RestoreInCIE(_, _)).Times(0); - EXPECT_CALL(reporter, BadInstruction(_, _, _)).Times(0); - EXPECT_CALL(reporter, NoCFARule(_, _, _)).Times(0); - EXPECT_CALL(reporter, EmptyStateStack(_, _, _)).Times(0); - } - - MockCallFrameInfoHandler handler; - MockCallFrameErrorReporter reporter; -}; - -class CFI: public CFIFixture, public Test { }; - -TEST_F(CFI, EmptyRegion) { - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - static const char data[1] = { 42 }; - - ByteReader byte_reader(ENDIANNESS_BIG); - CallFrameInfo parser(data, 0, &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -TEST_F(CFI, IncompleteLength32) { - CFISection section(kBigEndian, 8); - section - // Not even long enough for an initial length. - .D16(0xa0f) - // Padding to keep valgrind happy. We subtract these off when we - // construct the parser. - .D16(0); - - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - - EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown)) - .WillOnce(Return()); - - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(8); - CallFrameInfo parser(contents.data(), contents.size() - 2, - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -TEST_F(CFI, IncompleteLength64) { - CFISection section(kLittleEndian, 4); - section - // An incomplete 64-bit DWARF initial length. - .D32(0xffffffff).D32(0x71fbaec2) - // Padding to keep valgrind happy. We subtract these off when we - // construct the parser. - .D32(0); - - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - - EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown)) - .WillOnce(Return()); - - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - - ByteReader byte_reader(ENDIANNESS_LITTLE); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size() - 4, - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -TEST_F(CFI, IncompleteId32) { - CFISection section(kBigEndian, 8); - section - .D32(3) // Initial length, not long enough for id - .D8(0xd7).D8(0xe5).D8(0xf1) // incomplete id - .CIEHeader(8727, 3983, 8889, 3, "") - .FinishEntry(); - - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - - EXPECT_CALL(reporter, Incomplete(_, CallFrameInfo::kUnknown)) - .WillOnce(Return()); - - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(8); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -TEST_F(CFI, BadId32) { - CFISection section(kBigEndian, 8); - section - .D32(0x100) // Initial length - .D32(0xe802fade) // bogus ID - .Append(0x100 - 4, 0x42); // make the length true - section - .CIEHeader(1672, 9872, 8529, 3, "") - .FinishEntry(); - - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - - EXPECT_CALL(reporter, CIEPointerOutOfRange(_, 0xe802fade)) - .WillOnce(Return()); - - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(8); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -// A lone CIE shouldn't cause any handler calls. -TEST_F(CFI, SingleCIE) { - CFISection section(kLittleEndian, 4); - section.CIEHeader(0xffe799a8, 0x3398dcdd, 0x6e9683de, 3, ""); - section.Append(10, dwarf2reader::DW_CFA_nop); - section.FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("SingleCIE", section); - - EXPECT_CALL(handler, Entry(_, _, _, _, _, _)).Times(0); - EXPECT_CALL(handler, End()).Times(0); - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_LITTLE); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -// One FDE, one CIE. -TEST_F(CFI, OneFDE) { - CFISection section(kBigEndian, 4); - Label cie; - section - .Mark(&cie) - .CIEHeader(0x4be22f75, 0x2492236e, 0x6b6efb87, 3, "") - .FinishEntry() - .FDEHeader(cie, 0x7714740d, 0x3d5a10cd) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("OneFDE", section); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, 0x7714740d, 0x3d5a10cd, 3, "", 0x6b6efb87)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -// Two FDEs share a CIE. -TEST_F(CFI, TwoFDEsOneCIE) { - CFISection section(kBigEndian, 4); - Label cie; - section - // First FDE. readelf complains about this one because it makes - // a forward reference to its CIE. - .FDEHeader(cie, 0xa42744df, 0xa3b42121) - .FinishEntry() - // CIE. - .Mark(&cie) - .CIEHeader(0x04f7dc7b, 0x3d00c05f, 0xbd43cb59, 3, "") - .FinishEntry() - // Second FDE. - .FDEHeader(cie, 0x6057d391, 0x700f608d) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("TwoFDEsOneCIE", section); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, 0xa42744df, 0xa3b42121, 3, "", 0xbd43cb59)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, 0x6057d391, 0x700f608d, 3, "", 0xbd43cb59)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -// Two FDEs, two CIEs. -TEST_F(CFI, TwoFDEsTwoCIEs) { - CFISection section(kLittleEndian, 8); - Label cie1, cie2; - section - // First CIE. - .Mark(&cie1) - .CIEHeader(0x694d5d45, 0x4233221b, 0xbf45e65a, 3, "") - .FinishEntry() - // First FDE which cites second CIE. readelf complains about - // this one because it makes a forward reference to its CIE. - .FDEHeader(cie2, 0x778b27dfe5871f05ULL, 0x324ace3448070926ULL) - .FinishEntry() - // Second FDE, which cites first CIE. - .FDEHeader(cie1, 0xf6054ca18b10bf5fULL, 0x45fdb970d8bca342ULL) - .FinishEntry() - // Second CIE. - .Mark(&cie2) - .CIEHeader(0xfba3fad7, 0x6287e1fd, 0x61d2c581, 2, "") - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("TwoFDEsTwoCIEs", section); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, 0x778b27dfe5871f05ULL, 0x324ace3448070926ULL, 2, - "", 0x61d2c581)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, 0xf6054ca18b10bf5fULL, 0x45fdb970d8bca342ULL, 3, - "", 0xbf45e65a)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_LITTLE); - byte_reader.SetAddressSize(8); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -// An FDE whose CIE specifies a version we don't recognize. -TEST_F(CFI, BadVersion) { - CFISection section(kBigEndian, 4); - Label cie1, cie2; - section - .Mark(&cie1) - .CIEHeader(0xca878cf0, 0x7698ec04, 0x7b616f54, 0x52, "") - .FinishEntry() - // We should skip this entry, as its CIE specifies a version we - // don't recognize. - .FDEHeader(cie1, 0x08852292, 0x2204004a) - .FinishEntry() - // Despite the above, we should visit this entry. - .Mark(&cie2) - .CIEHeader(0x7c3ae7c9, 0xb9b9a512, 0x96cb3264, 3, "") - .FinishEntry() - .FDEHeader(cie2, 0x2094735a, 0x6e875501) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("BadVersion", section); - - EXPECT_CALL(reporter, UnrecognizedVersion(_, 0x52)) - .WillOnce(Return()); - - { - InSequence s; - // We should see no mention of the first FDE, but we should get - // a call to Entry for the second. - EXPECT_CALL(handler, Entry(_, 0x2094735a, 0x6e875501, 3, "", - 0x96cb3264)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -// An FDE whose CIE specifies an augmentation we don't recognize. -TEST_F(CFI, BadAugmentation) { - CFISection section(kBigEndian, 4); - Label cie1, cie2; - section - .Mark(&cie1) - .CIEHeader(0x4be22f75, 0x2492236e, 0x6b6efb87, 3, "spaniels!") - .FinishEntry() - // We should skip this entry, as its CIE specifies an - // augmentation we don't recognize. - .FDEHeader(cie1, 0x7714740d, 0x3d5a10cd) - .FinishEntry() - // Despite the above, we should visit this entry. - .Mark(&cie2) - .CIEHeader(0xf8bc4399, 0x8cf09931, 0xf2f519b2, 3, "") - .FinishEntry() - .FDEHeader(cie2, 0x7bf0fda0, 0xcbcd28d8) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("BadAugmentation", section); - - EXPECT_CALL(reporter, UnrecognizedAugmentation(_, "spaniels!")) - .WillOnce(Return()); - - { - InSequence s; - // We should see no mention of the first FDE, but we should get - // a call to Entry for the second. - EXPECT_CALL(handler, Entry(_, 0x7bf0fda0, 0xcbcd28d8, 3, "", - 0xf2f519b2)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_FALSE(parser.Start()); -} - -// The return address column field is a byte in CFI version 1 -// (DWARF2), but a ULEB128 value in version 3 (DWARF3). -TEST_F(CFI, CIEVersion1ReturnColumn) { - CFISection section(kBigEndian, 4); - Label cie; - section - // CIE, using the version 1 format: return column is a ubyte. - .Mark(&cie) - // Use a value for the return column that is parsed differently - // as a ubyte and as a ULEB128. - .CIEHeader(0xbcdea24f, 0x5be28286, 0x9f, 1, "") - .FinishEntry() - // FDE, citing that CIE. - .FDEHeader(cie, 0xb8d347b5, 0x825e55dc) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("CIEVersion1ReturnColumn", section); - - { - InSequence s; - EXPECT_CALL(handler, Entry(_, 0xb8d347b5, 0x825e55dc, 1, "", 0x9f)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -// The return address column field is a byte in CFI version 1 -// (DWARF2), but a ULEB128 value in version 3 (DWARF3). -TEST_F(CFI, CIEVersion3ReturnColumn) { - CFISection section(kBigEndian, 4); - Label cie; - section - // CIE, using the version 3 format: return column is a ULEB128. - .Mark(&cie) - // Use a value for the return column that is parsed differently - // as a ubyte and as a ULEB128. - .CIEHeader(0x0ab4758d, 0xc010fdf7, 0x89, 3, "") - .FinishEntry() - // FDE, citing that CIE. - .FDEHeader(cie, 0x86763f2b, 0x2a66dc23) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("CIEVersion3ReturnColumn", section); - - { - InSequence s; - EXPECT_CALL(handler, Entry(_, 0x86763f2b, 0x2a66dc23, 3, "", 0x89)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - string contents; - EXPECT_TRUE(section.GetContents(&contents)); - ByteReader byte_reader(ENDIANNESS_BIG); - byte_reader.SetAddressSize(4); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - EXPECT_TRUE(parser.Start()); -} - -struct CFIInsnFixture: public CFIFixture { - CFIInsnFixture() : CFIFixture() { - data_factor = 0xb6f; - return_register = 0x9be1ed9f; - version = 3; - cfa_base_register = 0x383a3aa; - cfa_offset = 0xf748; - } - - // Prepare SECTION to receive FDE instructions. - // - // - Append a stock CIE header that establishes the fixture's - // code_factor, data_factor, return_register, version, and - // augmentation values. - // - Have the CIE set up a CFA rule using cfa_base_register and - // cfa_offset. - // - Append a stock FDE header, referring to the above CIE, for the - // fde_size bytes at fde_start. Choose fde_start and fde_size - // appropriately for the section's address size. - // - Set appropriate expectations on handler in sequence s for the - // frame description entry and the CIE's CFA rule. - // - // On return, SECTION is ready to have FDE instructions appended to - // it, and its FinishEntry member called. - void StockCIEAndFDE(CFISection *section) { - // Choose appropriate constants for our address size. - if (section->AddressSize() == 4) { - fde_start = 0xc628ecfbU; - fde_size = 0x5dee04a2; - code_factor = 0x60b; - } else { - assert(section->AddressSize() == 8); - fde_start = 0x0005c57ce7806bd3ULL; - fde_size = 0x2699521b5e333100ULL; - code_factor = 0x01008e32855274a8ULL; - } - - // Create the CIE. - (*section) - .Mark(&cie_label) - .CIEHeader(code_factor, data_factor, return_register, version, - "") - .D8(dwarf2reader::DW_CFA_def_cfa) - .ULEB128(cfa_base_register) - .ULEB128(cfa_offset) - .FinishEntry(); - - // Create the FDE. - section->FDEHeader(cie_label, fde_start, fde_size); - - // Expect an Entry call for the FDE and a ValOffsetRule call for the - // CIE's CFA rule. - EXPECT_CALL(handler, Entry(_, fde_start, fde_size, version, "", - return_register)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(fde_start, kCFARegister, - cfa_base_register, cfa_offset)) - .InSequence(s) - .WillOnce(Return(true)); - } - - // Run the contents of SECTION through a CallFrameInfo parser, - // expecting parser.Start to return SUCCEEDS - void ParseSection(CFISection *section, bool succeeds = true) { - string contents; - EXPECT_TRUE(section->GetContents(&contents)); - dwarf2reader::Endianness endianness; - if (section->endianness() == kBigEndian) - endianness = ENDIANNESS_BIG; - else { - assert(section->endianness() == kLittleEndian); - endianness = ENDIANNESS_LITTLE; - } - ByteReader byte_reader(endianness); - byte_reader.SetAddressSize(section->AddressSize()); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter); - if (succeeds) - EXPECT_TRUE(parser.Start()); - else - EXPECT_FALSE(parser.Start()); - } - - Label cie_label; - Sequence s; - uint64 code_factor; - int data_factor; - unsigned return_register; - unsigned version; - unsigned cfa_base_register; - int cfa_offset; - uint64 fde_start, fde_size; -}; - -class CFIInsn: public CFIInsnFixture, public Test { }; - -TEST_F(CFIInsn, DW_CFA_set_loc) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_set_loc).D32(0xb1ee3e7a) - // Use DW_CFA_def_cfa to force a handler call that we can use to - // check the effect of the DW_CFA_set_loc. - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x4defb431).ULEB128(0x6d17b0ee) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_set_loc", section); - - EXPECT_CALL(handler, - ValOffsetRule(0xb1ee3e7a, kCFARegister, 0x4defb431, 0x6d17b0ee)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_advance_loc) { - CFISection section(kBigEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_advance_loc | 0x2a) - // Use DW_CFA_def_cfa to force a handler call that we can use to - // check the effect of the DW_CFA_advance_loc. - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x5bbb3715).ULEB128(0x0186c7bf) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc", section); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start + 0x2a * code_factor, - kCFARegister, 0x5bbb3715, 0x0186c7bf)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_advance_loc1) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_advance_loc1).D8(0xd8) - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x69d5696a).ULEB128(0x1eb7fc93) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc1", section); - - EXPECT_CALL(handler, - ValOffsetRule((fde_start + 0xd8 * code_factor), - kCFARegister, 0x69d5696a, 0x1eb7fc93)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_advance_loc2) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_advance_loc2).D16(0x3adb) - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x3a368bed).ULEB128(0x3194ee37) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc2", section); - - EXPECT_CALL(handler, - ValOffsetRule((fde_start + 0x3adb * code_factor), - kCFARegister, 0x3a368bed, 0x3194ee37)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_advance_loc4) { - CFISection section(kBigEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_advance_loc4).D32(0x15813c88) - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x135270c5).ULEB128(0x24bad7cb) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc4", section); - - EXPECT_CALL(handler, - ValOffsetRule((fde_start + 0x15813c88ULL * code_factor), - kCFARegister, 0x135270c5, 0x24bad7cb)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_MIPS_advance_loc8) { - code_factor = 0x2d; - CFISection section(kBigEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_MIPS_advance_loc8).D64(0x3c4f3945b92c14ULL) - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0xe17ed602).ULEB128(0x3d162e7f) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_advance_loc8", section); - - EXPECT_CALL(handler, - ValOffsetRule((fde_start + 0x3c4f3945b92c14ULL * code_factor), - kCFARegister, 0xe17ed602, 0x3d162e7f)) - .InSequence(s) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x4e363a85).ULEB128(0x815f9aa7) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("DW_CFA_def_cfa", section); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x4e363a85, 0x815f9aa7)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa_sf) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_sf).ULEB128(0x8ccb32b7).LEB128(0x9ea) - .D8(dwarf2reader::DW_CFA_def_cfa_sf).ULEB128(0x9b40f5da).LEB128(-0x40a2) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x8ccb32b7, - 0x9ea * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x9b40f5da, - -0x40a2 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa_register) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_register).ULEB128(0x3e7e9363) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x3e7e9363, cfa_offset)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -// DW_CFA_def_cfa_register should have no effect when applied to a -// non-base/offset rule. -TEST_F(CFIInsn, DW_CFA_def_cfa_registerBadRule) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_expression).Block("needle in a haystack") - .D8(dwarf2reader::DW_CFA_def_cfa_register).ULEB128(0xf1b49e49) - .FinishEntry(); - - EXPECT_CALL(handler, - ValExpressionRule(fde_start, kCFARegister, - "needle in a haystack")) - .WillRepeatedly(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa_offset) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_offset).ULEB128(0x1e8e3b9b) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, cfa_base_register, - 0x1e8e3b9b)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa_offset_sf) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_offset_sf).LEB128(0x970) - .D8(dwarf2reader::DW_CFA_def_cfa_offset_sf).LEB128(-0x2cd) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, cfa_base_register, - 0x970 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, cfa_base_register, - -0x2cd * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -// DW_CFA_def_cfa_offset should have no effect when applied to a -// non-base/offset rule. -TEST_F(CFIInsn, DW_CFA_def_cfa_offsetBadRule) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_expression).Block("six ways to Sunday") - .D8(dwarf2reader::DW_CFA_def_cfa_offset).ULEB128(0x1e8e3b9b) - .FinishEntry(); - - EXPECT_CALL(handler, - ValExpressionRule(fde_start, kCFARegister, "six ways to Sunday")) - .WillRepeatedly(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_def_cfa_expression) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_def_cfa_expression).Block("eating crow") - .FinishEntry(); - - EXPECT_CALL(handler, ValExpressionRule(fde_start, kCFARegister, - "eating crow")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_undefined) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x300ce45d) - .FinishEntry(); - - EXPECT_CALL(handler, UndefinedRule(fde_start, 0x300ce45d)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_same_value) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_same_value).ULEB128(0x3865a760) - .FinishEntry(); - - EXPECT_CALL(handler, SameValueRule(fde_start, 0x3865a760)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_offset) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset | 0x2c).ULEB128(0x9f6) - .FinishEntry(); - - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x2c, kCFARegister, 0x9f6 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_offset_extended) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset_extended).ULEB128(0x402b).ULEB128(0xb48) - .FinishEntry(); - - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x402b, kCFARegister, 0xb48 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_offset_extended_sf) { - CFISection section(kBigEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset_extended_sf) - .ULEB128(0x997c23ee).LEB128(0x2d00) - .D8(dwarf2reader::DW_CFA_offset_extended_sf) - .ULEB128(0x9519eb82).LEB128(-0xa77) - .FinishEntry(); - - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x997c23ee, - kCFARegister, 0x2d00 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x9519eb82, - kCFARegister, -0xa77 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_val_offset) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_offset).ULEB128(0x623562fe).ULEB128(0x673) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, 0x623562fe, - kCFARegister, 0x673 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_val_offset_sf) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_offset_sf).ULEB128(0x6f4f).LEB128(0xaab) - .D8(dwarf2reader::DW_CFA_val_offset_sf).ULEB128(0x2483).LEB128(-0x8a2) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, 0x6f4f, - kCFARegister, 0xaab * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, - ValOffsetRule(fde_start, 0x2483, - kCFARegister, -0x8a2 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_register) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_register).ULEB128(0x278d18f9).ULEB128(0x1a684414) - .FinishEntry(); - - EXPECT_CALL(handler, RegisterRule(fde_start, 0x278d18f9, 0x1a684414)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_expression) { - CFISection section(kBigEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0xa1619fb2) - .Block("plus ça change, plus c'est la même chose") - .FinishEntry(); - - EXPECT_CALL(handler, - ExpressionRule(fde_start, 0xa1619fb2, - "plus ça change, plus c'est la même chose")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_val_expression) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_expression).ULEB128(0xc5e4a9e3) - .Block("he who has the gold makes the rules") - .FinishEntry(); - - EXPECT_CALL(handler, - ValExpressionRule(fde_start, 0xc5e4a9e3, - "he who has the gold makes the rules")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_restore) { - CFISection section(kLittleEndian, 8); - code_factor = 0x01bd188a9b1fa083ULL; - data_factor = -0x1ac8; - return_register = 0x8c35b049; - version = 2; - fde_start = 0x2d70fe998298bbb1ULL; - fde_size = 0x46ccc2e63cf0b108ULL; - Label cie; - section - .Mark(&cie) - .CIEHeader(code_factor, data_factor, return_register, version, - "") - // Provide a CFA rule, because register rules require them. - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x6ca1d50e).ULEB128(0x372e38e8) - // Provide an offset(N) rule for register 0x3c. - .D8(dwarf2reader::DW_CFA_offset | 0x3c).ULEB128(0xb348) - .FinishEntry() - // In the FDE... - .FDEHeader(cie, fde_start, fde_size) - // At a second address, provide a new offset(N) rule for register 0x3c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0x13) - .D8(dwarf2reader::DW_CFA_offset | 0x3c).ULEB128(0x9a50) - // At a third address, restore the original rule for register 0x3c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0x01) - .D8(dwarf2reader::DW_CFA_restore | 0x3c) - .FinishEntry(); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, fde_start, fde_size, version, "", return_register)) - .WillOnce(Return(true)); - // CIE's CFA rule. - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x6ca1d50e, 0x372e38e8)) - .WillOnce(Return(true)); - // CIE's rule for register 0x3c. - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x3c, kCFARegister, 0xb348 * data_factor)) - .WillOnce(Return(true)); - // FDE's rule for register 0x3c. - EXPECT_CALL(handler, - OffsetRule(fde_start + 0x13 * code_factor, 0x3c, - kCFARegister, 0x9a50 * data_factor)) - .WillOnce(Return(true)); - // Restore CIE's rule for register 0x3c. - EXPECT_CALL(handler, - OffsetRule(fde_start + (0x13 + 0x01) * code_factor, 0x3c, - kCFARegister, 0xb348 * data_factor)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_restoreNoRule) { - CFISection section(kBigEndian, 4); - code_factor = 0x005f78143c1c3b82ULL; - data_factor = 0x25d0; - return_register = 0xe8; - version = 1; - fde_start = 0x4062e30f; - fde_size = 0x5302a389; - Label cie; - section - .Mark(&cie) - .CIEHeader(code_factor, data_factor, return_register, version, "") - // Provide a CFA rule, because register rules require them. - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x470aa334).ULEB128(0x099ef127) - .FinishEntry() - // In the FDE... - .FDEHeader(cie, fde_start, fde_size) - // At a second address, provide an offset(N) rule for register 0x2c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0x7) - .D8(dwarf2reader::DW_CFA_offset | 0x2c).ULEB128(0x1f47) - // At a third address, restore the (missing) CIE rule for register 0x2c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0xb) - .D8(dwarf2reader::DW_CFA_restore | 0x2c) - .FinishEntry(); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, fde_start, fde_size, version, "", return_register)) - .WillOnce(Return(true)); - // CIE's CFA rule. - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x470aa334, 0x099ef127)) - .WillOnce(Return(true)); - // FDE's rule for register 0x2c. - EXPECT_CALL(handler, - OffsetRule(fde_start + 0x7 * code_factor, 0x2c, - kCFARegister, 0x1f47 * data_factor)) - .WillOnce(Return(true)); - // Restore CIE's (missing) rule for register 0x2c. - EXPECT_CALL(handler, - SameValueRule(fde_start + (0x7 + 0xb) * code_factor, 0x2c)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_restore_extended) { - CFISection section(kBigEndian, 4); - code_factor = 0x126e; - data_factor = -0xd8b; - return_register = 0x77711787; - version = 3; - fde_start = 0x01f55a45; - fde_size = 0x452adb80; - Label cie; - section - .Mark(&cie) - .CIEHeader(code_factor, data_factor, return_register, version, - "", true /* dwarf64 */ ) - // Provide a CFA rule, because register rules require them. - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x56fa0edd).ULEB128(0x097f78a5) - // Provide an offset(N) rule for register 0x0f9b8a1c. - .D8(dwarf2reader::DW_CFA_offset_extended) - .ULEB128(0x0f9b8a1c).ULEB128(0xc979) - .FinishEntry() - // In the FDE... - .FDEHeader(cie, fde_start, fde_size) - // At a second address, provide a new offset(N) rule for reg 0x0f9b8a1c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0x3) - .D8(dwarf2reader::DW_CFA_offset_extended) - .ULEB128(0x0f9b8a1c).ULEB128(0x3b7b) - // At a third address, restore the original rule for register 0x0f9b8a1c. - .D8(dwarf2reader::DW_CFA_advance_loc | 0x04) - .D8(dwarf2reader::DW_CFA_restore_extended).ULEB128(0x0f9b8a1c) - .FinishEntry(); - - { - InSequence s; - EXPECT_CALL(handler, - Entry(_, fde_start, fde_size, version, "", return_register)) - .WillOnce(Return(true)); - // CIE's CFA rule. - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x56fa0edd, 0x097f78a5)) - .WillOnce(Return(true)); - // CIE's rule for register 0x0f9b8a1c. - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x0f9b8a1c, kCFARegister, - 0xc979 * data_factor)) - .WillOnce(Return(true)); - // FDE's rule for register 0x0f9b8a1c. - EXPECT_CALL(handler, - OffsetRule(fde_start + 0x3 * code_factor, 0x0f9b8a1c, - kCFARegister, 0x3b7b * data_factor)) - .WillOnce(Return(true)); - // Restore CIE's rule for register 0x0f9b8a1c. - EXPECT_CALL(handler, - OffsetRule(fde_start + (0x3 + 0x4) * code_factor, 0x0f9b8a1c, - kCFARegister, 0xc979 * data_factor)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - } - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_remember_and_restore_state) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - - // We create a state, save it, modify it, and then restore. We - // refer to the state that is overridden the restore as the - // "outgoing" state, and the restored state the "incoming" state. - // - // Register outgoing incoming expect - // 1 offset(N) no rule new "same value" rule - // 2 register(R) offset(N) report changed rule - // 3 offset(N) offset(M) report changed offset - // 4 offset(N) offset(N) no report - // 5 offset(N) no rule new "same value" rule - section - // Create the "incoming" state, which we will save and later restore. - .D8(dwarf2reader::DW_CFA_offset | 2).ULEB128(0x9806) - .D8(dwarf2reader::DW_CFA_offset | 3).ULEB128(0x995d) - .D8(dwarf2reader::DW_CFA_offset | 4).ULEB128(0x7055) - .D8(dwarf2reader::DW_CFA_remember_state) - // Advance to a new instruction; an implementation could legitimately - // ignore all but the final rule for a given register at a given address. - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - // Create the "outgoing" state, which we will discard. - .D8(dwarf2reader::DW_CFA_offset | 1).ULEB128(0xea1a) - .D8(dwarf2reader::DW_CFA_register).ULEB128(2).ULEB128(0x1d2a3767) - .D8(dwarf2reader::DW_CFA_offset | 3).ULEB128(0xdd29) - .D8(dwarf2reader::DW_CFA_offset | 5).ULEB128(0xf1ce) - // At a third address, restore the incoming state. - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - uint64 addr = fde_start; - - // Expect the incoming rules to be reported. - EXPECT_CALL(handler, OffsetRule(addr, 2, kCFARegister, 0x9806 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0x995d * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 4, kCFARegister, 0x7055 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - - addr += code_factor; - - // After the save, we establish the outgoing rule set. - EXPECT_CALL(handler, OffsetRule(addr, 1, kCFARegister, 0xea1a * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(addr, 2, 0x1d2a3767)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0xdd29 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 5, kCFARegister, 0xf1ce * data_factor)) - .InSequence(s).WillOnce(Return(true)); - - addr += code_factor; - - // Finally, after the restore, expect to see the differences from - // the outgoing to the incoming rules reported. - EXPECT_CALL(handler, SameValueRule(addr, 1)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 2, kCFARegister, 0x9806 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(addr, 3, kCFARegister, 0x995d * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, SameValueRule(addr, 5)) - .InSequence(s).WillOnce(Return(true)); - - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -// Check that restoring a rule set reports changes to the CFA rule. -TEST_F(CFIInsn, DW_CFA_remember_and_restore_stateCFA) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - - section - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_def_cfa_offset).ULEB128(0x90481102) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor, kCFARegister, - cfa_base_register, 0x90481102)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor * 2, kCFARegister, - cfa_base_register, cfa_offset)) - .InSequence(s).WillOnce(Return(true)); - - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_nop) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_nop) - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x3fb8d4f1).ULEB128(0x078dc67b) - .D8(dwarf2reader::DW_CFA_nop) - .FinishEntry(); - - EXPECT_CALL(handler, - ValOffsetRule(fde_start, kCFARegister, 0x3fb8d4f1, 0x078dc67b)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_GNU_window_save) { - CFISection section(kBigEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_GNU_window_save) - .FinishEntry(); - - // Don't include all the rules in any particular sequence. - - // The caller's %o0-%o7 have become the callee's %i0-%i7. This is - // the GCC register numbering. - for (int i = 8; i < 16; i++) - EXPECT_CALL(handler, RegisterRule(fde_start, i, i + 16)) - .WillOnce(Return(true)); - // The caller's %l0-%l7 and %i0-%i7 have been saved at the top of - // its frame. - for (int i = 16; i < 32; i++) - EXPECT_CALL(handler, OffsetRule(fde_start, i, kCFARegister, (i-16) * 4)) - .WillOnce(Return(true)); - - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_GNU_args_size) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_GNU_args_size).ULEB128(0xeddfa520) - // Verify that we see this, meaning we parsed the above properly. - .D8(dwarf2reader::DW_CFA_offset | 0x23).ULEB128(0x269) - .FinishEntry(); - - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x23, kCFARegister, 0x269 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIInsn, DW_CFA_GNU_negative_offset_extended) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_GNU_negative_offset_extended) - .ULEB128(0x430cc87a).ULEB128(0x613) - .FinishEntry(); - - EXPECT_CALL(handler, - OffsetRule(fde_start, 0x430cc87a, - kCFARegister, -0x613 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion); -} - -// Three FDEs: skip the second -TEST_F(CFIInsn, SkipFDE) { - CFISection section(kBigEndian, 4); - Label cie; - section - // CIE, used by all FDEs. - .Mark(&cie) - .CIEHeader(0x010269f2, 0x9177, 0xedca5849, 2, "") - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(0x42ed390b).ULEB128(0x98f43aad) - .FinishEntry() - // First FDE. - .FDEHeader(cie, 0xa870ebdd, 0x60f6aa4) - .D8(dwarf2reader::DW_CFA_register).ULEB128(0x3a860351).ULEB128(0x6c9a6bcf) - .FinishEntry() - // Second FDE. - .FDEHeader(cie, 0xc534f7c0, 0xf6552e9, true /* dwarf64 */) - .D8(dwarf2reader::DW_CFA_register).ULEB128(0x1b62c234).ULEB128(0x26586b18) - .FinishEntry() - // Third FDE. - .FDEHeader(cie, 0xf681cfc8, 0x7e4594e) - .D8(dwarf2reader::DW_CFA_register).ULEB128(0x26c53934).ULEB128(0x18eeb8a4) - .FinishEntry(); - - { - InSequence s; - - // Process the first FDE. - EXPECT_CALL(handler, Entry(_, 0xa870ebdd, 0x60f6aa4, 2, "", 0xedca5849)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(0xa870ebdd, kCFARegister, - 0x42ed390b, 0x98f43aad)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(0xa870ebdd, 0x3a860351, 0x6c9a6bcf)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .WillOnce(Return(true)); - - // Skip the second FDE. - EXPECT_CALL(handler, Entry(_, 0xc534f7c0, 0xf6552e9, 2, "", 0xedca5849)) - .WillOnce(Return(false)); - - // Process the third FDE. - EXPECT_CALL(handler, Entry(_, 0xf681cfc8, 0x7e4594e, 2, "", 0xedca5849)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(0xf681cfc8, kCFARegister, - 0x42ed390b, 0x98f43aad)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(0xf681cfc8, 0x26c53934, 0x18eeb8a4)) - .WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .WillOnce(Return(true)); - } - - ParseSection(§ion); -} - -// Quit processing in the middle of an entry's instructions. -TEST_F(CFIInsn, QuitMidentry) { - CFISection section(kLittleEndian, 8); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_register).ULEB128(0xe0cf850d).ULEB128(0x15aab431) - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0x46750aa5).Block("meat") - .FinishEntry(); - - EXPECT_CALL(handler, RegisterRule(fde_start, 0xe0cf850d, 0x15aab431)) - .InSequence(s).WillOnce(Return(false)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseSection(§ion, false); -} - -class CFIRestore: public CFIInsnFixture, public Test { }; - -TEST_F(CFIRestore, RestoreUndefinedRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x0bac878e) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, UndefinedRule(fde_start, 0x0bac878e)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreUndefinedRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x7dedff5f) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_same_value).ULEB128(0x7dedff5f) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, UndefinedRule(fde_start, 0x7dedff5f)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, SameValueRule(fde_start + code_factor, 0x7dedff5f)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + 2 * code_factor, 0x7dedff5f)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreSameValueRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_same_value).ULEB128(0xadbc9b3a) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, SameValueRule(fde_start, 0xadbc9b3a)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreSameValueRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_same_value).ULEB128(0x3d90dcb5) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x3d90dcb5) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, SameValueRule(fde_start, 0x3d90dcb5)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0x3d90dcb5)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, SameValueRule(fde_start + 2 * code_factor, 0x3d90dcb5)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreOffsetRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset | 0x14).ULEB128(0xb6f) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, OffsetRule(fde_start, 0x14, - kCFARegister, 0xb6f * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreOffsetRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset | 0x21).ULEB128(0xeb7) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x21) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, OffsetRule(fde_start, 0x21, - kCFARegister, 0xeb7 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0x21)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(fde_start + 2 * code_factor, 0x21, - kCFARegister, 0xeb7 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreOffsetRuleChangedOffset) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_offset | 0x21).ULEB128(0x134) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_offset | 0x21).ULEB128(0xf4f) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, OffsetRule(fde_start, 0x21, - kCFARegister, 0x134 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(fde_start + code_factor, 0x21, - kCFARegister, 0xf4f * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, OffsetRule(fde_start + 2 * code_factor, 0x21, - kCFARegister, 0x134 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValOffsetRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_offset).ULEB128(0x829caee6).ULEB128(0xe4c) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ValOffsetRule(fde_start, 0x829caee6, - kCFARegister, 0xe4c * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValOffsetRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_offset).ULEB128(0xf17c36d6).ULEB128(0xeb7) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0xf17c36d6) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ValOffsetRule(fde_start, 0xf17c36d6, - kCFARegister, 0xeb7 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xf17c36d6)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(fde_start + 2 * code_factor, 0xf17c36d6, - kCFARegister, 0xeb7 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValOffsetRuleChangedValOffset) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_offset).ULEB128(0x2cf0ab1b).ULEB128(0x562) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_val_offset).ULEB128(0x2cf0ab1b).ULEB128(0xe88) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ValOffsetRule(fde_start, 0x2cf0ab1b, - kCFARegister, 0x562 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(fde_start + code_factor, 0x2cf0ab1b, - kCFARegister, 0xe88 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(fde_start + 2 * code_factor, 0x2cf0ab1b, - kCFARegister, 0x562 * data_factor)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreRegisterRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_register).ULEB128(0x77514acc).ULEB128(0x464de4ce) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, RegisterRule(fde_start, 0x77514acc, 0x464de4ce)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreRegisterRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_register).ULEB128(0xe39acce5).ULEB128(0x095f1559) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0xe39acce5) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, RegisterRule(fde_start, 0xe39acce5, 0x095f1559)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xe39acce5)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(fde_start + 2 * code_factor, 0xe39acce5, - 0x095f1559)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreRegisterRuleChangedRegister) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_register).ULEB128(0xd40e21b1).ULEB128(0x16607d6a) - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_register).ULEB128(0xd40e21b1).ULEB128(0xbabb4742) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, RegisterRule(fde_start, 0xd40e21b1, 0x16607d6a)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(fde_start + code_factor, 0xd40e21b1, - 0xbabb4742)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, RegisterRule(fde_start + 2 * code_factor, 0xd40e21b1, - 0x16607d6a)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreExpressionRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0x666ae152).Block("dwarf") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ExpressionRule(fde_start, 0x666ae152, "dwarf")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreExpressionRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0xb5ca5c46).Block("elf") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0xb5ca5c46) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ExpressionRule(fde_start, 0xb5ca5c46, "elf")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xb5ca5c46)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ExpressionRule(fde_start + 2 * code_factor, 0xb5ca5c46, - "elf")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreExpressionRuleChangedExpression) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0x500f5739).Block("smurf") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_expression).ULEB128(0x500f5739).Block("orc") - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ExpressionRule(fde_start, 0x500f5739, "smurf")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ExpressionRule(fde_start + code_factor, 0x500f5739, - "orc")) - .InSequence(s).WillOnce(Return(true)); - // Expectations are not wishes. - EXPECT_CALL(handler, ExpressionRule(fde_start + 2 * code_factor, 0x500f5739, - "smurf")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValExpressionRuleUnchanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_expression).ULEB128(0x666ae152) - .Block("hideous") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - EXPECT_CALL(handler, ValExpressionRule(fde_start, 0x666ae152, "hideous")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValExpressionRuleChanged) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_expression).ULEB128(0xb5ca5c46) - .Block("revolting") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0xb5ca5c46) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("RestoreValExpressionRuleChanged", section); - - EXPECT_CALL(handler, ValExpressionRule(fde_start, 0xb5ca5c46, "revolting")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(fde_start + code_factor, 0xb5ca5c46)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValExpressionRule(fde_start + 2 * code_factor, 0xb5ca5c46, - "revolting")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -TEST_F(CFIRestore, RestoreValExpressionRuleChangedValExpression) { - CFISection section(kLittleEndian, 4); - StockCIEAndFDE(§ion); - section - .D8(dwarf2reader::DW_CFA_val_expression).ULEB128(0x500f5739) - .Block("repulsive") - .D8(dwarf2reader::DW_CFA_remember_state) - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_val_expression).ULEB128(0x500f5739) - .Block("nauseous") - .D8(dwarf2reader::DW_CFA_advance_loc | 1) - .D8(dwarf2reader::DW_CFA_restore_state) - .FinishEntry(); - - PERHAPS_WRITE_DEBUG_FRAME_FILE("RestoreValExpressionRuleChangedValExpression", - section); - - EXPECT_CALL(handler, ValExpressionRule(fde_start, 0x500f5739, "repulsive")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValExpressionRule(fde_start + code_factor, 0x500f5739, - "nauseous")) - .InSequence(s).WillOnce(Return(true)); - // Expectations are not wishes. - EXPECT_CALL(handler, ValExpressionRule(fde_start + 2 * code_factor, 0x500f5739, - "repulsive")) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()).WillOnce(Return(true)); - - ParseSection(§ion); -} - -struct EHFrameFixture: public CFIInsnFixture { - EHFrameFixture() - : CFIInsnFixture(), section(kBigEndian, 4, true) { - encoded_pointer_bases.cfi = 0x7f496cb2; - encoded_pointer_bases.text = 0x540f67b6; - encoded_pointer_bases.data = 0xe3eab768; - section.SetEncodedPointerBases(encoded_pointer_bases); - } - CFISection section; - CFISection::EncodedPointerBases encoded_pointer_bases; - - // Parse CFIInsnFixture::ParseSection, but parse the section as - // .eh_frame data, supplying stock base addresses. - void ParseEHFrameSection(CFISection *section, bool succeeds = true) { - EXPECT_TRUE(section->ContainsEHFrame()); - string contents; - EXPECT_TRUE(section->GetContents(&contents)); - dwarf2reader::Endianness endianness; - if (section->endianness() == kBigEndian) - endianness = ENDIANNESS_BIG; - else { - assert(section->endianness() == kLittleEndian); - endianness = ENDIANNESS_LITTLE; - } - ByteReader byte_reader(endianness); - byte_reader.SetAddressSize(section->AddressSize()); - byte_reader.SetCFIDataBase(encoded_pointer_bases.cfi, contents.data()); - byte_reader.SetTextBase(encoded_pointer_bases.text); - byte_reader.SetDataBase(encoded_pointer_bases.data); - CallFrameInfo parser(contents.data(), contents.size(), - &byte_reader, &handler, &reporter, true); - if (succeeds) - EXPECT_TRUE(parser.Start()); - else - EXPECT_FALSE(parser.Start()); - } - -}; - -class EHFrame: public EHFrameFixture, public Test { }; - -// A simple CIE, an FDE, and a terminator. -TEST_F(EHFrame, Terminator) { - Label cie; - section - .Mark(&cie) - .CIEHeader(9968, 2466, 67, 1, "") - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(3772).ULEB128(1372) - .FinishEntry() - .FDEHeader(cie, 0x848037a1, 0x7b30475e) - .D8(dwarf2reader::DW_CFA_set_loc).D32(0x17713850) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(5721) - .FinishEntry() - .D32(0) // Terminate the sequence. - // This FDE should be ignored. - .FDEHeader(cie, 0xf19629fe, 0x439fb09b) - .FinishEntry(); - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.Terminator", section); - - EXPECT_CALL(handler, Entry(_, 0x848037a1, 0x7b30475e, 1, "", 67)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(0x848037a1, kCFARegister, 3772, 1372)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(0x17713850, 5721)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(reporter, EarlyEHTerminator(_)) - .InSequence(s).WillOnce(Return()); - - ParseEHFrameSection(§ion); -} - -// The parser should recognize the Linux Standards Base 'z' augmentations. -TEST_F(EHFrame, SimpleFDE) { - DwarfPointerEncoding lsda_encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_indirect - | dwarf2reader::DW_EH_PE_datarel - | dwarf2reader::DW_EH_PE_sdata2); - DwarfPointerEncoding fde_encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_textrel - | dwarf2reader::DW_EH_PE_udata2); - - section.SetPointerEncoding(fde_encoding); - section.SetEncodedPointerBases(encoded_pointer_bases); - Label cie; - section - .Mark(&cie) - .CIEHeader(4873, 7012, 100, 1, "zSLPR") - .ULEB128(7) // Augmentation data length - .D8(lsda_encoding) // LSDA pointer format - .D8(dwarf2reader::DW_EH_PE_pcrel) // personality pointer format - .EncodedPointer(0x97baa00, dwarf2reader::DW_EH_PE_pcrel) // and value - .D8(fde_encoding) // FDE pointer format - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(6706).ULEB128(31) - .FinishEntry() - .FDEHeader(cie, 0x540f6b56, 0xf686) - .ULEB128(2) // Augmentation data length - .EncodedPointer(0xe3eab475, lsda_encoding) // LSDA pointer, signed - .D8(dwarf2reader::DW_CFA_set_loc) - .EncodedPointer(0x540fa4ce, fde_encoding) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(0x675e) - .FinishEntry() - .D32(0); // terminator - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.SimpleFDE", section); - - EXPECT_CALL(handler, Entry(_, 0x540f6b56, 0xf686, 1, "zSLPR", 100)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, PersonalityRoutine(0x97baa00, false)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, LanguageSpecificDataArea(0xe3eab475, true)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, SignalHandler()) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(0x540f6b56, kCFARegister, 6706, 31)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(0x540fa4ce, 0x675e)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -// Check that we can handle an empty 'z' augmentation. -TEST_F(EHFrame, EmptyZ) { - Label cie; - section - .Mark(&cie) - .CIEHeader(5955, 5805, 228, 1, "z") - .ULEB128(0) // Augmentation data length - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(3629).ULEB128(247) - .FinishEntry() - .FDEHeader(cie, 0xda007738, 0xfb55c641) - .ULEB128(0) // Augmentation data length - .D8(dwarf2reader::DW_CFA_advance_loc1).D8(11) - .D8(dwarf2reader::DW_CFA_undefined).ULEB128(3769) - .FinishEntry(); - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.EmptyZ", section); - - EXPECT_CALL(handler, Entry(_, 0xda007738, 0xfb55c641, 1, "z", 228)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, ValOffsetRule(0xda007738, kCFARegister, 3629, 247)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, UndefinedRule(0xda007738 + 11 * 5955, 3769)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -// Check that we recognize bad 'z' augmentation characters. -TEST_F(EHFrame, BadZ) { - Label cie; - section - .Mark(&cie) - .CIEHeader(6937, 1045, 142, 1, "zQ") - .ULEB128(0) // Augmentation data length - .D8(dwarf2reader::DW_CFA_def_cfa).ULEB128(9006).ULEB128(7725) - .FinishEntry() - .FDEHeader(cie, 0x1293efa8, 0x236f53f2) - .ULEB128(0) // Augmentation data length - .D8(dwarf2reader::DW_CFA_advance_loc | 12) - .D8(dwarf2reader::DW_CFA_register).ULEB128(5667).ULEB128(3462) - .FinishEntry(); - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.BadZ", section); - - EXPECT_CALL(reporter, UnrecognizedAugmentation(_, "zQ")) - .WillOnce(Return()); - - ParseEHFrameSection(§ion, false); -} - -TEST_F(EHFrame, zL) { - Label cie; - DwarfPointerEncoding lsda_encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_funcrel - | dwarf2reader::DW_EH_PE_udata2); - section - .Mark(&cie) - .CIEHeader(9285, 9959, 54, 1, "zL") - .ULEB128(1) // Augmentation data length - .D8(lsda_encoding) // encoding for LSDA pointer in FDE - - .FinishEntry() - .FDEHeader(cie, 0xd40091aa, 0x9aa6e746) - .ULEB128(2) // Augmentation data length - .EncodedPointer(0xd40099cd, lsda_encoding) // LSDA pointer - .FinishEntry() - .D32(0); // terminator - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zL", section); - - EXPECT_CALL(handler, Entry(_, 0xd40091aa, 0x9aa6e746, 1, "zL", 54)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, LanguageSpecificDataArea(0xd40099cd, false)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -TEST_F(EHFrame, zP) { - Label cie; - DwarfPointerEncoding personality_encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_datarel - | dwarf2reader::DW_EH_PE_udata2); - section - .Mark(&cie) - .CIEHeader(1097, 6313, 17, 1, "zP") - .ULEB128(3) // Augmentation data length - .D8(personality_encoding) // encoding for personality routine - .EncodedPointer(0xe3eaccac, personality_encoding) // value - .FinishEntry() - .FDEHeader(cie, 0x0c8350c9, 0xbef11087) - .ULEB128(0) // Augmentation data length - .FinishEntry() - .D32(0); // terminator - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zP", section); - - EXPECT_CALL(handler, Entry(_, 0x0c8350c9, 0xbef11087, 1, "zP", 17)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, PersonalityRoutine(0xe3eaccac, false)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -TEST_F(EHFrame, zR) { - Label cie; - DwarfPointerEncoding pointer_encoding = - DwarfPointerEncoding(dwarf2reader::DW_EH_PE_textrel - | dwarf2reader::DW_EH_PE_sdata2); - section.SetPointerEncoding(pointer_encoding); - section - .Mark(&cie) - .CIEHeader(8011, 5496, 75, 1, "zR") - .ULEB128(1) // Augmentation data length - .D8(pointer_encoding) // encoding for FDE addresses - .FinishEntry() - .FDEHeader(cie, 0x540f9431, 0xbd0) - .ULEB128(0) // Augmentation data length - .FinishEntry() - .D32(0); // terminator - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zR", section); - - EXPECT_CALL(handler, Entry(_, 0x540f9431, 0xbd0, 1, "zR", 75)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -TEST_F(EHFrame, zS) { - Label cie; - section - .Mark(&cie) - .CIEHeader(9217, 7694, 57, 1, "zS") - .ULEB128(0) // Augmentation data length - .FinishEntry() - .FDEHeader(cie, 0xd40091aa, 0x9aa6e746) - .ULEB128(0) // Augmentation data length - .FinishEntry() - .D32(0); // terminator - - PERHAPS_WRITE_EH_FRAME_FILE("EHFrame.zS", section); - - EXPECT_CALL(handler, Entry(_, 0xd40091aa, 0x9aa6e746, 1, "zS", 57)) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, SignalHandler()) - .InSequence(s).WillOnce(Return(true)); - EXPECT_CALL(handler, End()) - .InSequence(s).WillOnce(Return(true)); - - ParseEHFrameSection(§ion); -} - -// These tests require manual inspection of the test output. -struct CFIReporterFixture { - CFIReporterFixture() : reporter("test file name", "test section name") { } - CallFrameInfo::Reporter reporter; -}; - -class CFIReporter: public CFIReporterFixture, public Test { }; - -TEST_F(CFIReporter, Incomplete) { - reporter.Incomplete(0x0102030405060708ULL, CallFrameInfo::kUnknown); -} - -TEST_F(CFIReporter, EarlyEHTerminator) { - reporter.EarlyEHTerminator(0x0102030405060708ULL); -} - -TEST_F(CFIReporter, CIEPointerOutOfRange) { - reporter.CIEPointerOutOfRange(0x0123456789abcdefULL, 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, BadCIEId) { - reporter.BadCIEId(0x0123456789abcdefULL, 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, UnrecognizedVersion) { - reporter.UnrecognizedVersion(0x0123456789abcdefULL, 43); -} - -TEST_F(CFIReporter, UnrecognizedAugmentation) { - reporter.UnrecognizedAugmentation(0x0123456789abcdefULL, "poodles"); -} - -TEST_F(CFIReporter, InvalidPointerEncoding) { - reporter.InvalidPointerEncoding(0x0123456789abcdefULL, 0x42); -} - -TEST_F(CFIReporter, UnusablePointerEncoding) { - reporter.UnusablePointerEncoding(0x0123456789abcdefULL, 0x42); -} - -TEST_F(CFIReporter, RestoreInCIE) { - reporter.RestoreInCIE(0x0123456789abcdefULL, 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, BadInstruction) { - reporter.BadInstruction(0x0123456789abcdefULL, CallFrameInfo::kFDE, - 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, NoCFARule) { - reporter.NoCFARule(0x0123456789abcdefULL, CallFrameInfo::kCIE, - 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, EmptyStateStack) { - reporter.EmptyStateStack(0x0123456789abcdefULL, CallFrameInfo::kTerminator, - 0xfedcba9876543210ULL); -} - -TEST_F(CFIReporter, ClearingCFARule) { - reporter.ClearingCFARule(0x0123456789abcdefULL, CallFrameInfo::kFDE, - 0xfedcba9876543210ULL); -} - -#ifdef WRITE_ELF -// See comments at the top of the file mentioning WRITE_ELF for details. - -using google_breakpad::test_assembler::Section; - -struct ELFSectionHeader { - ELFSectionHeader(unsigned int set_type) - : type(set_type), flags(0), address(0), link(0), info(0), - alignment(1), entry_size(0) { } - Label name; - unsigned int type; - u_int64_t flags; - u_int64_t address; - Label file_offset; - Label file_size; - unsigned int link; - unsigned int info; - u_int64_t alignment; - u_int64_t entry_size; -}; - -void AppendSectionHeader(CFISection *table, const ELFSectionHeader &header) { - (*table) - .D32(header.name) // name, index in string tbl - .D32(header.type) // type - .Address(header.flags) // flags - .Address(header.address) // address in memory - .Address(header.file_offset) // offset in ELF file - .Address(header.file_size) // length in bytes - .D32(header.link) // link to related section - .D32(header.info) // miscellaneous - .Address(header.alignment) // alignment - .Address(header.entry_size); // entry size -} - -void WriteELFFrameSection(const char *filename, const char *cfi_name, - const CFISection &cfi) { - int elf_class = cfi.AddressSize() == 4 ? ELFCLASS32 : ELFCLASS64; - int elf_data = (cfi.endianness() == kBigEndian - ? ELFDATA2MSB : ELFDATA2LSB); - CFISection elf(cfi.endianness(), cfi.AddressSize()); - Label elf_header_size, section_table_offset; - elf - .Append("\x7f" "ELF") - .D8(elf_class) // 32-bit or 64-bit ELF - .D8(elf_data) // endianness - .D8(1) // ELF version - .D8(ELFOSABI_LINUX) // Operating System/ABI indication - .D8(0) // ABI version - .Append(7, 0xda) // padding - .D16(ET_EXEC) // file type: executable file - .D16(EM_386) // architecture: Intel IA-32 - .D32(EV_CURRENT); // ELF version - elf - .Address(0x0123456789abcdefULL) // program entry point - .Address(0) // program header offset - .Address(section_table_offset) // section header offset - .D32(0) // processor-specific flags - .D16(elf_header_size) // ELF header size in bytes */ - .D16(elf_class == ELFCLASS32 ? 32 : 56) // program header entry size - .D16(0) // program header table entry count - .D16(elf_class == ELFCLASS32 ? 40 : 64) // section header entry size - .D16(3) // section count - .D16(1) // section name string table - .Mark(&elf_header_size); - - // The null section. Every ELF file has one, as the first entry in - // the section header table. - ELFSectionHeader null_header(SHT_NULL); - null_header.file_offset = 0; - null_header.file_size = 0; - - // The CFI section. The whole reason for writing out this ELF file - // is to put this in it so that we can run other dumping programs on - // it to check its contents. - ELFSectionHeader cfi_header(SHT_PROGBITS); - cfi_header.file_size = cfi.Size(); - - // The section holding the names of the sections. This is the - // section whose index appears in the e_shstrndx member of the ELF - // header. - ELFSectionHeader section_names_header(SHT_STRTAB); - CFISection section_names(cfi.endianness(), cfi.AddressSize()); - section_names - .Mark(&null_header.name) - .AppendCString("") - .Mark(§ion_names_header.name) - .AppendCString(".shstrtab") - .Mark(&cfi_header.name) - .AppendCString(cfi_name) - .Mark(§ion_names_header.file_size); - - // Create the section table. The ELF header's e_shoff member refers - // to this, and the e_shnum member gives the number of entries it - // contains. - CFISection section_table(cfi.endianness(), cfi.AddressSize()); - AppendSectionHeader(§ion_table, null_header); - AppendSectionHeader(§ion_table, section_names_header); - AppendSectionHeader(§ion_table, cfi_header); - - // Append the section table and the section contents to the ELF file. - elf - .Mark(§ion_table_offset) - .Append(section_table) - .Mark(§ion_names_header.file_offset) - .Append(section_names) - .Mark(&cfi_header.file_offset) - .Append(cfi); - - string contents; - if (!elf.GetContents(&contents)) { - fprintf(stderr, "failed to get ELF file contents\n"); - exit(1); - } - - FILE *out = fopen(filename, "w"); - if (!out) { - fprintf(stderr, "error opening ELF file '%s': %s\n", - filename, strerror(errno)); - exit(1); - } - - if (fwrite(contents.data(), 1, contents.size(), out) != contents.size()) { - fprintf(stderr, "error writing ELF data to '%s': %s\n", - filename, strerror(errno)); - exit(1); - } - - if (fclose(out) == EOF) { - fprintf(stderr, "error closing ELF file '%s': %s\n", - filename, strerror(errno)); - exit(1); - } -} -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.cc deleted file mode 100644 index d8ab7da9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.cc +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This is a client for the dwarf2reader to extract function and line -// information from the debug info. - -#include -#include -#include - -#include -#include -#include -#include - -#include "common/dwarf/functioninfo.h" - -#include "common/dwarf/bytereader.h" - - -namespace dwarf2reader { - -CULineInfoHandler::CULineInfoHandler(vector* files, - vector* dirs, - LineMap* linemap):linemap_(linemap), - files_(files), - dirs_(dirs) { - // The dirs and files are 1 indexed, so just make sure we put - // nothing in the 0 vector. - assert(dirs->size() == 0); - assert(files->size() == 0); - dirs->push_back(""); - SourceFileInfo s; - s.name = ""; - s.lowpc = ULLONG_MAX; - files->push_back(s); -} - -void CULineInfoHandler::DefineDir(const string& name, uint32 dir_num) { - // These should never come out of order, actually - assert(dir_num == dirs_->size()); - dirs_->push_back(name); -} - -void CULineInfoHandler::DefineFile(const string& name, - int32 file_num, uint32 dir_num, - uint64 mod_time, uint64 length) { - assert(dir_num >= 0); - assert(dir_num < dirs_->size()); - - // These should never come out of order, actually. - if (file_num == (int32)files_->size() || file_num == -1) { - string dir = dirs_->at(dir_num); - - SourceFileInfo s; - s.lowpc = ULLONG_MAX; - - if (dir == "") { - s.name = name; - } else { - s.name = dir + "/" + name; - } - - files_->push_back(s); - } else { - fprintf(stderr, "error in DefineFile"); - } -} - -void CULineInfoHandler::AddLine(uint64 address, uint64 length, uint32 file_num, - uint32 line_num, uint32 column_num) { - if (file_num < files_->size()) { - linemap_->insert(make_pair(address, make_pair(files_->at(file_num).name.c_str(), - line_num))); - - if(address < files_->at(file_num).lowpc) { - files_->at(file_num).lowpc = address; - } - } else { - fprintf(stderr,"error in AddLine"); - } -} - -bool CUFunctionInfoHandler::StartCompilationUnit(uint64 offset, - uint8 address_size, - uint8 offset_size, - uint64 cu_length, - uint8 dwarf_version) { - current_compilation_unit_offset_ = offset; - return true; -} - - -// For function info, we only care about subprograms and inlined -// subroutines. For line info, the DW_AT_stmt_list lives in the -// compile unit tag. - -bool CUFunctionInfoHandler::StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { - switch (tag) { - case DW_TAG_subprogram: - case DW_TAG_inlined_subroutine: { - current_function_info_ = new FunctionInfo; - current_function_info_->lowpc = current_function_info_->highpc = 0; - current_function_info_->name = ""; - current_function_info_->line = 0; - current_function_info_->file = ""; - offset_to_funcinfo_->insert(make_pair(offset, current_function_info_)); - }; - // FALLTHROUGH - case DW_TAG_compile_unit: - return true; - default: - return false; - } - return false; -} - -// Only care about the name attribute for functions - -void CUFunctionInfoHandler::ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string &data) { - if (current_function_info_) { - if (attr == DW_AT_name) - current_function_info_->name = data; - else if(attr == DW_AT_MIPS_linkage_name) - current_function_info_->mangled_name = data; - } -} - -void CUFunctionInfoHandler::ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - if (attr == DW_AT_stmt_list) { - SectionMap::const_iterator iter = sections_.find("__debug_line"); - assert(iter != sections_.end()); - - // this should be a scoped_ptr but we dont' use boost :-( - auto_ptr lireader(new LineInfo(iter->second.first + data, - iter->second.second - data, - reader_, linehandler_)); - lireader->Start(); - } else if (current_function_info_) { - switch (attr) { - case DW_AT_low_pc: - current_function_info_->lowpc = data; - break; - case DW_AT_high_pc: - current_function_info_->highpc = data; - break; - case DW_AT_decl_line: - current_function_info_->line = data; - break; - case DW_AT_decl_file: - current_function_info_->file = files_->at(data).name; - break; - default: - break; - } - } -} - -void CUFunctionInfoHandler::ProcessAttributeReference(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - if (current_function_info_) { - switch (attr) { - case DW_AT_specification: { - // Some functions have a "specification" attribute - // which means they were defined elsewhere. The name - // attribute is not repeated, and must be taken from - // the specification DIE. Here we'll assume that - // any DIE referenced in this manner will already have - // been seen, but that's not really required by the spec. - FunctionMap::iterator iter = offset_to_funcinfo_->find(data); - if (iter != offset_to_funcinfo_->end()) { - current_function_info_->name = iter->second->name; - current_function_info_->mangled_name = iter->second->mangled_name; - } else { - // If you hit this, this code probably needs to be rewritten. - fprintf(stderr, "Error: DW_AT_specification was seen before the referenced DIE! (Looking for DIE at offset %08llx, in DIE at offset %08llx)\n", data, offset); - } - break; - } - default: - break; - } - } -} - -void CUFunctionInfoHandler::EndDIE(uint64 offset) { - if (current_function_info_ && current_function_info_->lowpc) - address_to_funcinfo_->insert(make_pair(current_function_info_->lowpc, - current_function_info_)); -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.h deleted file mode 100644 index 901b7df5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/functioninfo.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// This file contains the definitions for a DWARF2/3 information -// collector that uses the DWARF2/3 reader interface to build a mapping -// of addresses to files, lines, and functions. - -#ifndef COMMON_DWARF_FUNCTIONINFO_H__ -#define COMMON_DWARF_FUNCTIONINFO_H__ - -#include -#include -#include -#include - -#include "common/dwarf/dwarf2reader.h" - - -namespace dwarf2reader { - -struct FunctionInfo { - // Name of the function - string name; - // Mangled name of the function - string mangled_name; - // File containing this function - string file; - // Line number for start of function. - uint32 line; - // Beginning address for this function - uint64 lowpc; - // End address for this function. - uint64 highpc; -}; - -struct SourceFileInfo { - // Name of the source file name - string name; - // Low address of source file name - uint64 lowpc; -}; - -typedef map FunctionMap; -typedef map > LineMap; - -// This class is a basic line info handler that fills in the dirs, -// file, and linemap passed into it with the data produced from the -// LineInfoHandler. -class CULineInfoHandler: public LineInfoHandler { - public: - - // - CULineInfoHandler(vector* files, - vector* dirs, - LineMap* linemap); - virtual ~CULineInfoHandler() { } - - // Called when we define a directory. We just place NAME into dirs_ - // at position DIR_NUM. - virtual void DefineDir(const string& name, uint32 dir_num); - - // Called when we define a filename. We just place - // concat(dirs_[DIR_NUM], NAME) into files_ at position FILE_NUM. - virtual void DefineFile(const string& name, int32 file_num, - uint32 dir_num, uint64 mod_time, uint64 length); - - - // Called when the line info reader has a new line, address pair - // ready for us. ADDRESS is the address of the code, LENGTH is the - // length of its machine code in bytes, FILE_NUM is the file number - // containing the code, LINE_NUM is the line number in that file for - // the code, and COLUMN_NUM is the column number the code starts at, - // if we know it (0 otherwise). - virtual void AddLine(uint64 address, uint64 length, - uint32 file_num, uint32 line_num, uint32 column_num); - - private: - LineMap* linemap_; - vector* files_; - vector* dirs_; -}; - -class CUFunctionInfoHandler: public Dwarf2Handler { - public: - CUFunctionInfoHandler(vector* files, - vector* dirs, - LineMap* linemap, - FunctionMap* offset_to_funcinfo, - FunctionMap* address_to_funcinfo, - CULineInfoHandler* linehandler, - const SectionMap& sections, - ByteReader* reader) - : files_(files), dirs_(dirs), linemap_(linemap), - offset_to_funcinfo_(offset_to_funcinfo), - address_to_funcinfo_(address_to_funcinfo), - linehandler_(linehandler), sections_(sections), - reader_(reader), current_function_info_(NULL) { } - - virtual ~CUFunctionInfoHandler() { } - - // Start to process a compilation unit at OFFSET from the beginning of the - // .debug_info section. We want to see all compilation units, so we - // always return true. - - virtual bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version); - - // Start to process a DIE at OFFSET from the beginning of the - // .debug_info section. We only care about function related DIE's. - virtual bool StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs); - - // Called when we have an attribute with unsigned data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of the .debug_info section, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - // Called when we have an attribute with a DIE reference to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of the .debug_info section, has a name of ATTR, a form of - // FORM, and the offset of the referenced DIE from the start of the - // .debug_info section is in DATA. - virtual void ProcessAttributeReference(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - // Called when we have an attribute with string data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of the .debug_info section, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string& data); - - // Called when finished processing the DIE at OFFSET. - // Because DWARF2/3 specifies a tree of DIEs, you may get starts - // before ends of the previous DIE, as we process children before - // ending the parent. - virtual void EndDIE(uint64 offset); - - private: - vector* files_; - vector* dirs_; - LineMap* linemap_; - FunctionMap* offset_to_funcinfo_; - FunctionMap* address_to_funcinfo_; - CULineInfoHandler* linehandler_; - const SectionMap& sections_; - ByteReader* reader_; - FunctionInfo* current_function_info_; - uint64 current_compilation_unit_offset_; -}; - -} // namespace dwarf2reader -#endif // COMMON_DWARF_FUNCTIONINFO_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/line_state_machine.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/line_state_machine.h deleted file mode 100644 index 0ff72abc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/line_state_machine.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2008 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef COMMON_DWARF_LINE_STATE_MACHINE_H__ -#define COMMON_DWARF_LINE_STATE_MACHINE_H__ - -namespace dwarf2reader { - -// This is the format of a DWARF2/3 line state machine that we process -// opcodes using. There is no need for anything outside the lineinfo -// processor to know how this works. -struct LineStateMachine { - void Reset(bool default_is_stmt) { - file_num = 1; - address = 0; - line_num = 1; - column_num = 0; - is_stmt = default_is_stmt; - basic_block = false; - end_sequence = false; - } - - uint32 file_num; - uint64 address; - uint32 line_num; - uint32 column_num; - bool is_stmt; // stmt means statement. - bool basic_block; - bool end_sequence; -}; - -} // namespace dwarf2reader - - -#endif // COMMON_DWARF_LINE_STATE_MACHINE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/types.h deleted file mode 100644 index 08a325aa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf/types.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2008 Google, Inc. All Rights reserved -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// This file contains some typedefs for basic types - - -#ifndef _COMMON_DWARF_TYPES_H__ -#define _COMMON_DWARF_TYPES_H__ - -typedef signed char int8; -typedef short int16; -typedef int int32; -typedef long long int64; - -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef unsigned long long uint64; - -#ifdef __PTRDIFF_TYPE__ -typedef __PTRDIFF_TYPE__ intptr; -typedef unsigned __PTRDIFF_TYPE__ uintptr; -#else -#error "Can't find pointer-sized integral types." -#endif - -#endif // _COMMON_DWARF_TYPES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.cc deleted file mode 100644 index ed0b406d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.cc +++ /dev/null @@ -1,247 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// Implementation of google_breakpad::DwarfCFIToModule. -// See dwarf_cfi_to_module.h for details. - -#include - -#include "common/dwarf_cfi_to_module.h" - -namespace google_breakpad { - -using std::ostringstream; - -vector DwarfCFIToModule::RegisterNames::MakeVector( - const char * const *strings, - size_t size) { - vector names(strings, strings + size); - return names; -} - -vector DwarfCFIToModule::RegisterNames::I386() { - static const char *const names[] = { - "$eax", "$ecx", "$edx", "$ebx", "$esp", "$ebp", "$esi", "$edi", - "$eip", "$eflags", "$unused1", - "$st0", "$st1", "$st2", "$st3", "$st4", "$st5", "$st6", "$st7", - "$unused2", "$unused3", - "$xmm0", "$xmm1", "$xmm2", "$xmm3", "$xmm4", "$xmm5", "$xmm6", "$xmm7", - "$mm0", "$mm1", "$mm2", "$mm3", "$mm4", "$mm5", "$mm6", "$mm7", - "$fcw", "$fsw", "$mxcsr", - "$es", "$cs", "$ss", "$ds", "$fs", "$gs", "$unused4", "$unused5", - "$tr", "$ldtr" - }; - - return MakeVector(names, sizeof(names) / sizeof(names[0])); -} - -vector DwarfCFIToModule::RegisterNames::X86_64() { - static const char *const names[] = { - "$rax", "$rdx", "$rcx", "$rbx", "$rsi", "$rdi", "$rbp", "$rsp", - "$r8", "$r9", "$r10", "$r11", "$r12", "$r13", "$r14", "$r15", - "$rip", - "$xmm0","$xmm1","$xmm2", "$xmm3", "$xmm4", "$xmm5", "$xmm6", "$xmm7", - "$xmm8","$xmm9","$xmm10","$xmm11","$xmm12","$xmm13","$xmm14","$xmm15", - "$st0", "$st1", "$st2", "$st3", "$st4", "$st5", "$st6", "$st7", - "$mm0", "$mm1", "$mm2", "$mm3", "$mm4", "$mm5", "$mm6", "$mm7", - "$rflags", - "$es", "$cs", "$ss", "$ds", "$fs", "$gs", "$unused1", "$unused2", - "$fs.base", "$gs.base", "$unused3", "$unused4", - "$tr", "$ldtr", - "$mxcsr", "$fcw", "$fsw" - }; - - return MakeVector(names, sizeof(names) / sizeof(names[0])); -} - -vector DwarfCFIToModule::RegisterNames::ARM() { - static const char *const names[] = { - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc", - "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", - "fps", "cpsr" - }; - - return MakeVector(names, sizeof(names) / sizeof(names[0])); -} - -bool DwarfCFIToModule::Entry(size_t offset, uint64 address, uint64 length, - uint8 version, const string &augmentation, - unsigned return_address) { - assert(!entry_); - - // If dwarf2reader::CallFrameInfo can handle this version and - // augmentation, then we should be okay with that, so there's no - // need to check them here. - - // Get ready to collect entries. - entry_ = new Module::StackFrameEntry; - entry_->address = address; - entry_->size = length; - entry_offset_ = offset; - return_address_ = return_address; - - // Breakpad STACK CFI records must provide a .ra rule, but DWARF CFI - // may not establish any rule for .ra if the return address column - // is an ordinary register, and that register holds the return - // address on entry to the function. So establish an initial .ra - // rule citing the return address register. - if (return_address_ < register_names_.size()) - entry_->initial_rules[ra_name_] = register_names_[return_address_]; - - return true; -} - -string DwarfCFIToModule::RegisterName(int i) { - assert(entry_); - if (i < 0) { - assert(i == kCFARegister); - return cfa_name_; - } - unsigned reg = i; - if (reg == return_address_) - return ra_name_; - - if (0 <= reg && reg < register_names_.size()) - return register_names_[reg]; - - reporter_->UnnamedRegister(entry_offset_, reg); - char buf[30]; - sprintf(buf, "unnamed_register%u", reg); - return buf; -} - -void DwarfCFIToModule::Record(Module::Address address, int reg, - const string &rule) { - assert(entry_); - - // Place the name in our global set of strings, and then use the string - // from the set. Even though the assignment looks like a copy, all the - // major std::string implementations use reference counting internally, - // so the effect is to have all our data structures share copies of rules - // whenever possible. Since register names are drawn from a - // vector, register names are already shared. - string shared_rule = *common_strings_.insert(rule).first; - - // Is this one of this entry's initial rules? - if (address == entry_->address) - entry_->initial_rules[RegisterName(reg)] = shared_rule; - // File it under the appropriate address. - else - entry_->rule_changes[address][RegisterName(reg)] = shared_rule; -} - -bool DwarfCFIToModule::UndefinedRule(uint64 address, int reg) { - reporter_->UndefinedNotSupported(entry_offset_, RegisterName(reg)); - // Treat this as a non-fatal error. - return true; -} - -bool DwarfCFIToModule::SameValueRule(uint64 address, int reg) { - ostringstream s; - s << RegisterName(reg); - Record(address, reg, s.str()); - return true; -} - -bool DwarfCFIToModule::OffsetRule(uint64 address, int reg, - int base_register, long offset) { - ostringstream s; - s << RegisterName(base_register) << " " << offset << " + ^"; - Record(address, reg, s.str()); - return true; -} - -bool DwarfCFIToModule::ValOffsetRule(uint64 address, int reg, - int base_register, long offset) { - ostringstream s; - s << RegisterName(base_register) << " " << offset << " +"; - Record(address, reg, s.str()); - return true; -} - -bool DwarfCFIToModule::RegisterRule(uint64 address, int reg, - int base_register) { - ostringstream s; - s << RegisterName(base_register); - Record(address, reg, s.str()); - return true; -} - -bool DwarfCFIToModule::ExpressionRule(uint64 address, int reg, - const string &expression) { - reporter_->ExpressionsNotSupported(entry_offset_, RegisterName(reg)); - // Treat this as a non-fatal error. - return true; -} - -bool DwarfCFIToModule::ValExpressionRule(uint64 address, int reg, - const string &expression) { - reporter_->ExpressionsNotSupported(entry_offset_, RegisterName(reg)); - // Treat this as a non-fatal error. - return true; -} - -bool DwarfCFIToModule::End() { - module_->AddStackFrameEntry(entry_); - entry_ = NULL; - return true; -} - -void DwarfCFIToModule::Reporter::UnnamedRegister(size_t offset, int reg) { - fprintf(stderr, "%s, section '%s': " - "the call frame entry at offset 0x%zx refers to register %d," - " whose name we don't know\n", - file_.c_str(), section_.c_str(), offset, reg); -} - -void DwarfCFIToModule::Reporter::UndefinedNotSupported(size_t offset, - const string ®) { - fprintf(stderr, "%s, section '%s': " - "the call frame entry at offset 0x%zx sets the rule for " - "register '%s' to 'undefined', but the Breakpad symbol file format" - " cannot express this\n", - file_.c_str(), section_.c_str(), offset, reg.c_str()); -} - -void DwarfCFIToModule::Reporter::ExpressionsNotSupported(size_t offset, - const string ®) { - fprintf(stderr, "%s, section '%s': " - "the call frame entry at offset 0x%zx uses a DWARF expression to" - " describe how to recover register '%s', " - " but this translator cannot yet translate DWARF expressions to" - " Breakpad postfix expressions\n", - file_.c_str(), section_.c_str(), offset, reg.c_str()); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.h deleted file mode 100644 index d29a796c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module.h +++ /dev/null @@ -1,196 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf_cfi_to_module.h: Define the DwarfCFIToModule class, which -// accepts parsed DWARF call frame info and adds it to a -// google_breakpad::Module object, which can write that information to -// a Breakpad symbol file. - -#ifndef COMMON_LINUX_DWARF_CFI_TO_MODULE_H -#define COMMON_LINUX_DWARF_CFI_TO_MODULE_H - -#include -#include - -#include -#include -#include - -#include "common/module.h" -#include "common/dwarf/dwarf2reader.h" - -namespace google_breakpad { - -using dwarf2reader::CallFrameInfo; -using google_breakpad::Module; -using std::set; -using std::string; -using std::vector; - -// A class that accepts parsed call frame information from the DWARF -// CFI parser and populates a google_breakpad::Module object with the -// contents. -class DwarfCFIToModule: public CallFrameInfo::Handler { - public: - - // DwarfCFIToModule uses an instance of this class to report errors - // detected while converting DWARF CFI to Breakpad STACK CFI records. - class Reporter { - public: - // Create a reporter that writes messages to the standard error - // stream. FILE is the name of the file we're processing, and - // SECTION is the name of the section within that file that we're - // looking at (.debug_frame, .eh_frame, etc.). - Reporter(const string &file, const string §ion) - : file_(file), section_(section) { } - virtual ~Reporter() { } - - // The DWARF CFI entry at OFFSET cites register REG, but REG is not - // covered by the vector of register names passed to the - // DwarfCFIToModule constructor, nor does it match the return - // address column number for this entry. - virtual void UnnamedRegister(size_t offset, int reg); - - // The DWARF CFI entry at OFFSET says that REG is undefined, but the - // Breakpad symbol file format cannot express this. - virtual void UndefinedNotSupported(size_t offset, const string ®); - - // The DWARF CFI entry at OFFSET says that REG uses a DWARF - // expression to find its value, but DwarfCFIToModule is not - // capable of translating DWARF expressions to Breakpad postfix - // expressions. - virtual void ExpressionsNotSupported(size_t offset, const string ®); - - protected: - string file_, section_; - }; - - // Register name tables. If TABLE is a vector returned by one of these - // functions, then TABLE[R] is the name of the register numbered R in - // DWARF call frame information. - class RegisterNames { - public: - // Intel's "x86" or IA-32. - static vector I386(); - - // AMD x86_64, AMD64, Intel EM64T, or Intel 64 - static vector X86_64(); - - // ARM. - static vector ARM(); - - private: - // Given STRINGS, an array of C strings with SIZE elements, return an - // equivalent vector. - static vector MakeVector(const char * const *strings, size_t size); - }; - - // Create a handler for the dwarf2reader::CallFrameInfo parser that - // records the stack unwinding information it receives in MODULE. - // - // Use REGISTER_NAMES[I] as the name of register number I; *this - // keeps a reference to the vector, so the vector should remain - // alive for as long as the DwarfCFIToModule does. - // - // Use REPORTER for reporting problems encountered in the conversion - // process. - DwarfCFIToModule(Module *module, const vector ®ister_names, - Reporter *reporter) - : module_(module), register_names_(register_names), reporter_(reporter), - entry_(NULL), return_address_(-1), cfa_name_(".cfa"), ra_name_(".ra") { - } - virtual ~DwarfCFIToModule() { delete entry_; } - - virtual bool Entry(size_t offset, uint64 address, uint64 length, - uint8 version, const string &augmentation, - unsigned return_address); - virtual bool UndefinedRule(uint64 address, int reg); - virtual bool SameValueRule(uint64 address, int reg); - virtual bool OffsetRule(uint64 address, int reg, - int base_register, long offset); - virtual bool ValOffsetRule(uint64 address, int reg, - int base_register, long offset); - virtual bool RegisterRule(uint64 address, int reg, int base_register); - virtual bool ExpressionRule(uint64 address, int reg, - const string &expression); - virtual bool ValExpressionRule(uint64 address, int reg, - const string &expression); - virtual bool End(); - - private: - // Return the name to use for register REG. - string RegisterName(int i); - - // Record RULE for register REG at ADDRESS. - void Record(Module::Address address, int reg, const string &rule); - - // The module to which we should add entries. - Module *module_; - - // Map from register numbers to register names. - const vector ®ister_names_; - - // The reporter to use to report problems. - Reporter *reporter_; - - // The current entry we're constructing. - Module::StackFrameEntry *entry_; - - // The section offset of the current frame description entry, for - // use in error messages. - size_t entry_offset_; - - // The return address column for that entry. - unsigned return_address_; - - // The names of the return address and canonical frame address. Putting - // these here instead of using string literals allows us to share their - // texts in reference-counted std::string implementations (all the - // popular ones). Many, many rules cite these strings. - string cfa_name_, ra_name_; - - // A set of strings used by this CFI. Before storing a string in one of - // our data structures, insert it into this set, and then use the string - // from the set. - // - // Because std::string uses reference counting internally, simply using - // strings from this set, even if passed by value, assigned, or held - // directly in structures and containers (map, for example), - // causes those strings to share a single instance of each distinct piece - // of text. - set common_strings_; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DWARF_CFI_TO_MODULE_H diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module_unittest.cc deleted file mode 100644 index 9477296d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cfi_to_module_unittest.cc +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf_cfi_to_module_unittest.cc: Tests for google_breakpad::DwarfCFIToModule. - -#include "breakpad_googletest_includes.h" -#include "common/dwarf_cfi_to_module.h" - -using google_breakpad::Module; -using google_breakpad::DwarfCFIToModule; -using testing::ContainerEq; -using testing::Test; -using testing::_; - -struct MockCFIReporter: public DwarfCFIToModule::Reporter { - MockCFIReporter(const string &file, const string §ion) - : Reporter(file, section) { } - MOCK_METHOD2(UnnamedRegister, void(size_t offset, int reg)); - MOCK_METHOD2(UndefinedNotSupported, void(size_t offset, const string ®)); - MOCK_METHOD2(ExpressionsNotSupported, void(size_t offset, const string ®)); -}; - -struct DwarfCFIToModuleFixture { - DwarfCFIToModuleFixture() - : module("module name", "module os", "module arch", "module id"), - reporter("reporter file", "reporter section"), - handler(&module, register_names, &reporter) { - register_names.push_back("reg0"); - register_names.push_back("reg1"); - register_names.push_back("reg2"); - register_names.push_back("reg3"); - register_names.push_back("reg4"); - register_names.push_back("reg5"); - register_names.push_back("reg6"); - register_names.push_back("reg7"); - register_names.push_back("sp"); - register_names.push_back("pc"); - - EXPECT_CALL(reporter, UnnamedRegister(_, _)).Times(0); - EXPECT_CALL(reporter, UndefinedNotSupported(_, _)).Times(0); - EXPECT_CALL(reporter, ExpressionsNotSupported(_, _)).Times(0); - } - - Module module; - vector register_names; - MockCFIReporter reporter; - DwarfCFIToModule handler; - vector entries; -}; - -class Entry: public DwarfCFIToModuleFixture, public Test { }; - -TEST_F(Entry, Accept) { - ASSERT_TRUE(handler.Entry(0x3b8961b8, 0xa21069698096fc98ULL, - 0xb440ce248169c8d6ULL, 3, "", 0xea93c106)); - ASSERT_TRUE(handler.End()); - module.GetStackFrameEntries(&entries); - EXPECT_EQ(1U, entries.size()); - EXPECT_EQ(0xa21069698096fc98ULL, entries[0]->address); - EXPECT_EQ(0xb440ce248169c8d6ULL, entries[0]->size); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Entry, AcceptOldVersion) { - ASSERT_TRUE(handler.Entry(0xeb60e0fc, 0x75b8806bb09eab78ULL, - 0xc771f44958d40bbcULL, 1, "", 0x093c945e)); - ASSERT_TRUE(handler.End()); - module.GetStackFrameEntries(&entries); - EXPECT_EQ(1U, entries.size()); - EXPECT_EQ(0x75b8806bb09eab78ULL, entries[0]->address); - EXPECT_EQ(0xc771f44958d40bbcULL, entries[0]->size); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -struct RuleFixture: public DwarfCFIToModuleFixture { - RuleFixture() : DwarfCFIToModuleFixture() { - entry_address = 0x89327ebf86b47492ULL; - entry_size = 0x2f8cd573072fe02aULL; - return_reg = 0x7886a346; - } - void StartEntry() { - ASSERT_TRUE(handler.Entry(0x4445c05c, entry_address, entry_size, - 3, "", return_reg)); - } - void CheckEntry() { - module.GetStackFrameEntries(&entries); - EXPECT_EQ(1U, entries.size()); - EXPECT_EQ(entry_address, entries[0]->address); - EXPECT_EQ(entry_size, entries[0]->size); - } - uint64 entry_address, entry_size; - unsigned return_reg; -}; - -class Rule: public RuleFixture, public Test { }; - -TEST_F(Rule, UndefinedRule) { - EXPECT_CALL(reporter, UndefinedNotSupported(_, "reg7")); - StartEntry(); - ASSERT_TRUE(handler.UndefinedRule(entry_address, 7)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, SameValueRule) { - StartEntry(); - ASSERT_TRUE(handler.SameValueRule(entry_address, 6)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - Module::RuleMap expected_initial; - expected_initial["reg6"] = "reg6"; - EXPECT_THAT(entries[0]->initial_rules, ContainerEq(expected_initial)); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, OffsetRule) { - StartEntry(); - ASSERT_TRUE(handler.OffsetRule(entry_address + 1, return_reg, - DwarfCFIToModule::kCFARegister, - 16927065)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - Module::RuleChangeMap expected_changes; - expected_changes[entry_address + 1][".ra"] = ".cfa 16927065 + ^"; - EXPECT_THAT(entries[0]->rule_changes, ContainerEq(expected_changes)); -} - -TEST_F(Rule, OffsetRuleNegative) { - StartEntry(); - ASSERT_TRUE(handler.OffsetRule(entry_address + 1, - DwarfCFIToModule::kCFARegister, 4, -34530721)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - Module::RuleChangeMap expected_changes; - expected_changes[entry_address + 1][".cfa"] = "reg4 -34530721 + ^"; - EXPECT_THAT(entries[0]->rule_changes, ContainerEq(expected_changes)); -} - -TEST_F(Rule, ValOffsetRule) { - // Use an unnamed register number, to exercise that branch of RegisterName. - EXPECT_CALL(reporter, UnnamedRegister(_, 10)); - StartEntry(); - ASSERT_TRUE(handler.ValOffsetRule(entry_address + 0x5ab7, - DwarfCFIToModule::kCFARegister, - 10, 61812979)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - Module::RuleChangeMap expected_changes; - expected_changes[entry_address + 0x5ab7][".cfa"] = - "unnamed_register10 61812979 +"; - EXPECT_THAT(entries[0]->rule_changes, ContainerEq(expected_changes)); -} - -TEST_F(Rule, RegisterRule) { - StartEntry(); - ASSERT_TRUE(handler.RegisterRule(entry_address, return_reg, 3)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - Module::RuleMap expected_initial; - expected_initial[".ra"] = "reg3"; - EXPECT_THAT(entries[0]->initial_rules, ContainerEq(expected_initial)); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, ExpressionRule) { - EXPECT_CALL(reporter, ExpressionsNotSupported(_, "reg2")); - StartEntry(); - ASSERT_TRUE(handler.ExpressionRule(entry_address + 0xf326, 2, - "it takes two to tango")); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, ValExpressionRule) { - EXPECT_CALL(reporter, ExpressionsNotSupported(_, "reg0")); - StartEntry(); - ASSERT_TRUE(handler.ValExpressionRule(entry_address + 0x6367, 0, - "bit off more than he could chew")); - ASSERT_TRUE(handler.End()); - CheckEntry(); - EXPECT_EQ(0U, entries[0]->initial_rules.size()); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, DefaultReturnAddressRule) { - return_reg = 2; - StartEntry(); - ASSERT_TRUE(handler.RegisterRule(entry_address, 0, 1)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - Module::RuleMap expected_initial; - expected_initial[".ra"] = "reg2"; - expected_initial["reg0"] = "reg1"; - EXPECT_THAT(entries[0]->initial_rules, ContainerEq(expected_initial)); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, DefaultReturnAddressRuleOverride) { - return_reg = 2; - StartEntry(); - ASSERT_TRUE(handler.RegisterRule(entry_address, return_reg, 1)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - Module::RuleMap expected_initial; - expected_initial[".ra"] = "reg1"; - EXPECT_THAT(entries[0]->initial_rules, ContainerEq(expected_initial)); - EXPECT_EQ(0U, entries[0]->rule_changes.size()); -} - -TEST_F(Rule, DefaultReturnAddressRuleLater) { - return_reg = 2; - StartEntry(); - ASSERT_TRUE(handler.RegisterRule(entry_address + 1, return_reg, 1)); - ASSERT_TRUE(handler.End()); - CheckEntry(); - Module::RuleMap expected_initial; - expected_initial[".ra"] = "reg2"; - EXPECT_THAT(entries[0]->initial_rules, ContainerEq(expected_initial)); - Module::RuleChangeMap expected_changes; - expected_changes[entry_address + 1][".ra"] = "reg1"; - EXPECT_THAT(entries[0]->rule_changes, ContainerEq(expected_changes)); -} - -TEST(RegisterNames, I386) { - vector names = DwarfCFIToModule::RegisterNames::I386(); - - EXPECT_EQ("$eax", names[0]); - EXPECT_EQ("$ecx", names[1]); - EXPECT_EQ("$esp", names[4]); - EXPECT_EQ("$eip", names[8]); -} - -TEST(RegisterNames, ARM) { - vector names = DwarfCFIToModule::RegisterNames::ARM(); - - EXPECT_EQ("r0", names[0]); - EXPECT_EQ("r10", names[10]); - EXPECT_EQ("sp", names[13]); - EXPECT_EQ("lr", names[14]); - EXPECT_EQ("pc", names[15]); -} - -TEST(RegisterNames, X86_64) { - vector names = DwarfCFIToModule::RegisterNames::X86_64(); - - EXPECT_EQ("$rax", names[0]); - EXPECT_EQ("$rdx", names[1]); - EXPECT_EQ("$rbp", names[6]); - EXPECT_EQ("$rsp", names[7]); - EXPECT_EQ("$rip", names[16]); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.cc deleted file mode 100644 index 1922066a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.cc +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// Implement the DwarfCUToModule class; see dwarf_cu_to_module.h. - -// For PRI* macros, before anything else might #include it. -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif /* __STDC_FORMAT_MACROS */ - -#include "common/dwarf_cu_to_module.h" - -#include -#include - -#include -#include -#include - -#include "common/dwarf_line_to_module.h" - -namespace google_breakpad { - -using std::map; -using std::pair; -using std::set; -using std::vector; - -// Data provided by a DWARF specification DIE. -// -// In DWARF, the DIE for a definition may contain a DW_AT_specification -// attribute giving the offset of the corresponding declaration DIE, and -// the definition DIE may omit information given in the declaration. For -// example, it's common for a function's address range to appear only in -// its definition DIE, but its name to appear only in its declaration -// DIE. -// -// The dumper needs to be able to follow DW_AT_specification links to -// bring all this information together in a FUNC record. Conveniently, -// DIEs that are the target of such links have a DW_AT_declaration flag -// set, so we can identify them when we first see them, and record their -// contents for later reference. -// -// A Specification holds information gathered from a declaration DIE that -// we may need if we find a DW_AT_specification link pointing to it. -struct DwarfCUToModule::Specification { - // The name of the enclosing scope, or the empty string if there is none. - string enclosing_name; - - // The name for the specification DIE itself, without any enclosing - // name components. - string unqualified_name; -}; - -// An abstract origin -- base definition of an inline function. -struct AbstractOrigin { - AbstractOrigin() : name() {} - AbstractOrigin(const string& name) : name(name) {} - - string name; -}; - -typedef map AbstractOriginByOffset; - -// Data global to the DWARF-bearing file that is private to the -// DWARF-to-Module process. -struct DwarfCUToModule::FilePrivate { - // A set of strings used in this CU. Before storing a string in one of - // our data structures, insert it into this set, and then use the string - // from the set. - // - // Because std::string uses reference counting internally, simply using - // strings from this set, even if passed by value, assigned, or held - // directly in structures and containers (map, for example), - // causes those strings to share a single instance of each distinct piece - // of text. - set common_strings; - - // A map from offsets of DIEs within the .debug_info section to - // Specifications describing those DIEs. Specification references can - // cross compilation unit boundaries. - SpecificationByOffset specifications; - - AbstractOriginByOffset origins; -}; - -DwarfCUToModule::FileContext::FileContext(const string &filename_arg, - Module *module_arg) - : filename(filename_arg), module(module_arg) { - file_private = new FilePrivate(); -} - -DwarfCUToModule::FileContext::~FileContext() { - delete file_private; -} - -// Information global to the particular compilation unit we're -// parsing. This is for data shared across the CU's entire DIE tree, -// and parameters from the code invoking the CU parser. -struct DwarfCUToModule::CUContext { - CUContext(FileContext *file_context_arg, WarningReporter *reporter_arg) - : file_context(file_context_arg), - reporter(reporter_arg), - language(Language::CPlusPlus) { } - ~CUContext() { - for (vector::iterator it = functions.begin(); - it != functions.end(); it++) - delete *it; - }; - - // The DWARF-bearing file into which this CU was incorporated. - FileContext *file_context; - - // For printing error messages. - WarningReporter *reporter; - - // The source language of this compilation unit. - const Language *language; - - // The functions defined in this compilation unit. We accumulate - // them here during parsing. Then, in DwarfCUToModule::Finish, we - // assign them lines and add them to file_context->module. - // - // Destroying this destroys all the functions this vector points to. - vector functions; -}; - -// Information about the context of a particular DIE. This is for -// information that changes as we descend the tree towards the leaves: -// the containing classes/namespaces, etc. -struct DwarfCUToModule::DIEContext { - // The fully-qualified name of the context. For example, for a - // tree like: - // - // DW_TAG_namespace Foo - // DW_TAG_class Bar - // DW_TAG_subprogram Baz - // - // in a C++ compilation unit, the DIEContext's name for the - // DW_TAG_subprogram DIE would be "Foo::Bar". The DIEContext's - // name for the DW_TAG_namespace DIE would be "". - string name; -}; - -// An abstract base class for all the dumper's DIE handlers. -class DwarfCUToModule::GenericDIEHandler: public dwarf2reader::DIEHandler { - public: - // Create a handler for the DIE at OFFSET whose compilation unit is - // described by CU_CONTEXT, and whose immediate context is described - // by PARENT_CONTEXT. - GenericDIEHandler(CUContext *cu_context, DIEContext *parent_context, - uint64 offset) - : cu_context_(cu_context), - parent_context_(parent_context), - offset_(offset), - declaration_(false), - specification_(NULL) { } - - // Derived classes' ProcessAttributeUnsigned can defer to this to - // handle DW_AT_declaration, or simply not override it. - void ProcessAttributeUnsigned(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - // Derived classes' ProcessAttributeReference can defer to this to - // handle DW_AT_specification, or simply not override it. - void ProcessAttributeReference(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - // Derived classes' ProcessAttributeReference can defer to this to - // handle DW_AT_specification, or simply not override it. - void ProcessAttributeString(enum DwarfAttribute attr, - enum DwarfForm form, - const string &data); - - protected: - // Compute and return the fully-qualified name of the DIE. If this - // DIE is a declaration DIE, to be cited by other DIEs' - // DW_AT_specification attributes, record its enclosing name and - // unqualified name in the specification table. - // - // Use this from EndAttributes member functions, not ProcessAttribute* - // functions; only the former can be sure that all the DIE's attributes - // have been seen. - string ComputeQualifiedName(); - - CUContext *cu_context_; - DIEContext *parent_context_; - uint64 offset_; - - // If this DIE has a DW_AT_declaration attribute, this is its value. - // It is false on DIEs with no DW_AT_declaration attribute. - bool declaration_; - - // If this DIE has a DW_AT_specification attribute, this is the - // Specification structure for the DIE the attribute refers to. - // Otherwise, this is NULL. - Specification *specification_; - - // The value of the DW_AT_name attribute, or the empty string if the - // DIE has no such attribute. - string name_attribute_; -}; - -void DwarfCUToModule::GenericDIEHandler::ProcessAttributeUnsigned( - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - switch (attr) { - case dwarf2reader::DW_AT_declaration: declaration_ = (data != 0); break; - default: break; - } -} - -void DwarfCUToModule::GenericDIEHandler::ProcessAttributeReference( - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - switch (attr) { - case dwarf2reader::DW_AT_specification: { - // Find the Specification to which this attribute refers, and - // set specification_ appropriately. We could do more processing - // here, but it's better to leave the real work to our - // EndAttribute member function, at which point we know we have - // seen all the DIE's attributes. - FileContext *file_context = cu_context_->file_context; - SpecificationByOffset *specifications - = &file_context->file_private->specifications; - SpecificationByOffset::iterator spec = specifications->find(data); - if (spec != specifications->end()) { - specification_ = &spec->second; - } else { - // Technically, there's no reason a DW_AT_specification - // couldn't be a forward reference, but supporting that would - // be a lot of work (changing to a two-pass structure), and I - // don't think any producers we care about ever emit such - // things. - cu_context_->reporter->UnknownSpecification(offset_, data); - } - break; - } - default: break; - } -} - -void DwarfCUToModule::GenericDIEHandler::ProcessAttributeString( - enum DwarfAttribute attr, - enum DwarfForm form, - const string &data) { - switch (attr) { - case dwarf2reader::DW_AT_name: { - // Place the name in our global set of strings, and then use the - // string from the set. Even though the assignment looks like a copy, - // all the major std::string implementations use reference counting - // internally, so the effect is to have all our data structures share - // copies of strings whenever possible. - pair::iterator, bool> result = - cu_context_->file_context->file_private->common_strings.insert(data); - name_attribute_ = *result.first; - break; - } - default: break; - } -} - -string DwarfCUToModule::GenericDIEHandler::ComputeQualifiedName() { - // Find our unqualified name. If the DIE has its own DW_AT_name - // attribute, then use that; otherwise, check our specification. - const string *unqualified_name; - if (name_attribute_.empty() && specification_) - unqualified_name = &specification_->unqualified_name; - else - unqualified_name = &name_attribute_; - - // Find the name of our enclosing context. If we have a - // specification, it's the specification's enclosing context that - // counts; otherwise, use this DIE's context. - const string *enclosing_name; - if (specification_) - enclosing_name = &specification_->enclosing_name; - else - enclosing_name = &parent_context_->name; - - // If this DIE was marked as a declaration, record its names in the - // specification table. - if (declaration_) { - FileContext *file_context = cu_context_->file_context; - Specification spec; - spec.enclosing_name = *enclosing_name; - spec.unqualified_name = *unqualified_name; - file_context->file_private->specifications[offset_] = spec; - } - - // Combine the enclosing name and unqualified name to produce our - // own fully-qualified name. - return cu_context_->language->MakeQualifiedName(*enclosing_name, - *unqualified_name); -} - -// A handler class for DW_TAG_subprogram DIEs. -class DwarfCUToModule::FuncHandler: public GenericDIEHandler { - public: - FuncHandler(CUContext *cu_context, DIEContext *parent_context, - uint64 offset) - : GenericDIEHandler(cu_context, parent_context, offset), - low_pc_(0), high_pc_(0), abstract_origin_(NULL), inline_(false) { } - void ProcessAttributeUnsigned(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - void ProcessAttributeSigned(enum DwarfAttribute attr, - enum DwarfForm form, - int64 data); - void ProcessAttributeReference(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - bool EndAttributes(); - void Finish(); - - private: - // The fully-qualified name, as derived from name_attribute_, - // specification_, parent_context_. Computed in EndAttributes. - string name_; - uint64 low_pc_, high_pc_; // DW_AT_low_pc, DW_AT_high_pc - const AbstractOrigin* abstract_origin_; - bool inline_; -}; - -void DwarfCUToModule::FuncHandler::ProcessAttributeUnsigned( - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - switch (attr) { - // If this attribute is present at all --- even if its value is - // DW_INL_not_inlined --- then GCC may cite it as someone else's - // DW_AT_abstract_origin attribute. - case dwarf2reader::DW_AT_inline: inline_ = true; break; - - case dwarf2reader::DW_AT_low_pc: low_pc_ = data; break; - case dwarf2reader::DW_AT_high_pc: high_pc_ = data; break; - default: - GenericDIEHandler::ProcessAttributeUnsigned(attr, form, data); - break; - } -} - -void DwarfCUToModule::FuncHandler::ProcessAttributeSigned( - enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { - switch (attr) { - // If this attribute is present at all --- even if its value is - // DW_INL_not_inlined --- then GCC may cite it as someone else's - // DW_AT_abstract_origin attribute. - case dwarf2reader::DW_AT_inline: inline_ = true; break; - - default: - break; - } -} - -void DwarfCUToModule::FuncHandler::ProcessAttributeReference( - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - switch(attr) { - case dwarf2reader::DW_AT_abstract_origin: { - const AbstractOriginByOffset& origins = - cu_context_->file_context->file_private->origins; - AbstractOriginByOffset::const_iterator origin = origins.find(data); - if (origin != origins.end()) { - abstract_origin_ = &(origin->second); - } else { - cu_context_->reporter->UnknownAbstractOrigin(offset_, data); - } - break; - } - default: - GenericDIEHandler::ProcessAttributeReference(attr, form, data); - break; - } -} - -bool DwarfCUToModule::FuncHandler::EndAttributes() { - // Compute our name, and record a specification, if appropriate. - name_ = ComputeQualifiedName(); - if (name_.empty() && abstract_origin_) { - name_ = abstract_origin_->name; - } - return true; -} - -void DwarfCUToModule::FuncHandler::Finish() { - // Did we collect the information we need? Not all DWARF function - // entries have low and high addresses (for example, inlined - // functions that were never used), but all the ones we're - // interested in cover a non-empty range of bytes. - if (low_pc_ < high_pc_) { - // Create a Module::Function based on the data we've gathered, and - // add it to the functions_ list. - Module::Function *func = new Module::Function; - // Malformed DWARF may omit the name, but all Module::Functions must - // have names. - if (!name_.empty()) { - func->name = name_; - } else { - cu_context_->reporter->UnnamedFunction(offset_); - func->name = ""; - } - func->address = low_pc_; - func->size = high_pc_ - low_pc_; - func->parameter_size = 0; - cu_context_->functions.push_back(func); - } else if (inline_) { - AbstractOrigin origin(name_); - cu_context_->file_context->file_private->origins[offset_] = origin; - } -} - -// A handler for DIEs that contain functions and contribute a -// component to their names: namespaces, classes, etc. -class DwarfCUToModule::NamedScopeHandler: public GenericDIEHandler { - public: - NamedScopeHandler(CUContext *cu_context, DIEContext *parent_context, - uint64 offset) - : GenericDIEHandler(cu_context, parent_context, offset) { } - bool EndAttributes(); - DIEHandler *FindChildHandler(uint64 offset, enum DwarfTag tag, - const AttributeList &attrs); - - private: - DIEContext child_context_; // A context for our children. -}; - -bool DwarfCUToModule::NamedScopeHandler::EndAttributes() { - child_context_.name = ComputeQualifiedName(); - return true; -} - -dwarf2reader::DIEHandler *DwarfCUToModule::NamedScopeHandler::FindChildHandler( - uint64 offset, - enum DwarfTag tag, - const AttributeList &attrs) { - switch (tag) { - case dwarf2reader::DW_TAG_subprogram: - return new FuncHandler(cu_context_, &child_context_, offset); - case dwarf2reader::DW_TAG_namespace: - case dwarf2reader::DW_TAG_class_type: - case dwarf2reader::DW_TAG_structure_type: - case dwarf2reader::DW_TAG_union_type: - return new NamedScopeHandler(cu_context_, &child_context_, offset); - default: - return NULL; - } -} - -void DwarfCUToModule::WarningReporter::CUHeading() { - if (printed_cu_header_) - return; - fprintf(stderr, "%s: in compilation unit '%s' (offset 0x%llx):\n", - filename_.c_str(), cu_name_.c_str(), cu_offset_); - printed_cu_header_ = true; -} - -void DwarfCUToModule::WarningReporter::UnknownSpecification(uint64 offset, - uint64 target) { - CUHeading(); - fprintf(stderr, "%s: the DIE at offset 0x%llx has a DW_AT_specification" - " attribute referring to the die at offset 0x%llx, which either" - " was not marked as a declaration, or comes later in the file\n", - filename_.c_str(), offset, target); -} - -void DwarfCUToModule::WarningReporter::UnknownAbstractOrigin(uint64 offset, - uint64 target) { - CUHeading(); - fprintf(stderr, "%s: the DIE at offset 0x%llx has a DW_AT_abstract_origin" - " attribute referring to the die at offset 0x%llx, which either" - " was not marked as an inline, or comes later in the file\n", - filename_.c_str(), offset, target); -} - -void DwarfCUToModule::WarningReporter::MissingSection(const string &name) { - CUHeading(); - fprintf(stderr, "%s: warning: couldn't find DWARF '%s' section\n", - filename_.c_str(), name.c_str()); -} - -void DwarfCUToModule::WarningReporter::BadLineInfoOffset(uint64 offset) { - CUHeading(); - fprintf(stderr, "%s: warning: line number data offset beyond end" - " of '.debug_line' section\n", - filename_.c_str()); -} - -void DwarfCUToModule::WarningReporter::UncoveredHeading() { - if (printed_unpaired_header_) - return; - CUHeading(); - fprintf(stderr, "%s: warning: skipping unpaired lines/functions:\n", - filename_.c_str()); - printed_unpaired_header_ = true; -} - -void DwarfCUToModule::WarningReporter::UncoveredFunction( - const Module::Function &function) { - if (!uncovered_warnings_enabled_) - return; - UncoveredHeading(); - fprintf(stderr, " function%s: %s\n", - function.size == 0 ? " (zero-length)" : "", - function.name.c_str()); -} - -void DwarfCUToModule::WarningReporter::UncoveredLine(const Module::Line &line) { - if (!uncovered_warnings_enabled_) - return; - UncoveredHeading(); - fprintf(stderr, " line%s: %s:%d at 0x%" PRIx64 "\n", - (line.size == 0 ? " (zero-length)" : ""), - line.file->name.c_str(), line.number, line.address); -} - -void DwarfCUToModule::WarningReporter::UnnamedFunction(uint64 offset) { - CUHeading(); - fprintf(stderr, "%s: warning: function at offset 0x%" PRIx64 " has no name\n", - filename_.c_str(), offset); -} - -DwarfCUToModule::DwarfCUToModule(FileContext *file_context, - LineToModuleFunctor *line_reader, - WarningReporter *reporter) - : line_reader_(line_reader), has_source_line_info_(false) { - cu_context_ = new CUContext(file_context, reporter); - child_context_ = new DIEContext(); -} - -DwarfCUToModule::~DwarfCUToModule() { - delete cu_context_; - delete child_context_; -} - -void DwarfCUToModule::ProcessAttributeSigned(enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { - switch (attr) { - case dwarf2reader::DW_AT_language: // source language of this CU - SetLanguage(static_cast(data)); - break; - default: - break; - } -} - -void DwarfCUToModule::ProcessAttributeUnsigned(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - switch (attr) { - case dwarf2reader::DW_AT_stmt_list: // Line number information. - has_source_line_info_ = true; - source_line_offset_ = data; - break; - case dwarf2reader::DW_AT_language: // source language of this CU - SetLanguage(static_cast(data)); - break; - default: - break; - } -} - -void DwarfCUToModule::ProcessAttributeString(enum DwarfAttribute attr, - enum DwarfForm form, - const string &data) { - if (attr == dwarf2reader::DW_AT_name) - cu_context_->reporter->SetCUName(data); -} - -bool DwarfCUToModule::EndAttributes() { - return true; -} - -dwarf2reader::DIEHandler *DwarfCUToModule::FindChildHandler( - uint64 offset, - enum DwarfTag tag, - const AttributeList &attrs) { - switch (tag) { - case dwarf2reader::DW_TAG_subprogram: - return new FuncHandler(cu_context_, child_context_, offset); - case dwarf2reader::DW_TAG_namespace: - case dwarf2reader::DW_TAG_class_type: - case dwarf2reader::DW_TAG_structure_type: - case dwarf2reader::DW_TAG_union_type: - return new NamedScopeHandler(cu_context_, child_context_, offset); - default: - return NULL; - } -} - -void DwarfCUToModule::SetLanguage(DwarfLanguage language) { - switch (language) { - case dwarf2reader::DW_LANG_Java: - cu_context_->language = Language::Java; - break; - - // DWARF has no generic language code for assembly language; this is - // what the GNU toolchain uses. - case dwarf2reader::DW_LANG_Mips_Assembler: - cu_context_->language = Language::Assembler; - break; - - // C++ covers so many cases that it probably has some way to cope - // with whatever the other languages throw at us. So make it the - // default. - // - // Objective C and Objective C++ seem to create entries for - // methods whose DW_AT_name values are already fully-qualified: - // "-[Classname method:]". These appear at the top level. - // - // DWARF data for C should never include namespaces or functions - // nested in struct types, but if it ever does, then C++'s - // notation is probably not a bad choice for that. - default: - case dwarf2reader::DW_LANG_ObjC: - case dwarf2reader::DW_LANG_ObjC_plus_plus: - case dwarf2reader::DW_LANG_C: - case dwarf2reader::DW_LANG_C89: - case dwarf2reader::DW_LANG_C99: - case dwarf2reader::DW_LANG_C_plus_plus: - cu_context_->language = Language::CPlusPlus; - break; - } -} - -void DwarfCUToModule::ReadSourceLines(uint64 offset) { - const dwarf2reader::SectionMap §ion_map - = cu_context_->file_context->section_map; - dwarf2reader::SectionMap::const_iterator map_entry - = section_map.find(".debug_line"); - // Mac OS X puts DWARF data in sections whose names begin with "__" - // instead of ".". - if (map_entry == section_map.end()) - map_entry = section_map.find("__debug_line"); - if (map_entry == section_map.end()) { - cu_context_->reporter->MissingSection(".debug_line"); - return; - } - const char *section_start = map_entry->second.first; - uint64 section_length = map_entry->second.second; - if (offset >= section_length) { - cu_context_->reporter->BadLineInfoOffset(offset); - return; - } - (*line_reader_)(section_start + offset, section_length - offset, - cu_context_->file_context->module, &lines_); -} - -namespace { -// Return true if ADDRESS falls within the range of ITEM. -template -inline bool within(const T &item, Module::Address address) { - // Because Module::Address is unsigned, and unsigned arithmetic - // wraps around, this will be false if ADDRESS falls before the - // start of ITEM, or if it falls after ITEM's end. - return address - item.address < item.size; -} -} - -void DwarfCUToModule::AssignLinesToFunctions() { - vector *functions = &cu_context_->functions; - WarningReporter *reporter = cu_context_->reporter; - - // This would be simpler if we assumed that source line entries - // don't cross function boundaries. However, there's no real reason - // to assume that (say) a series of function definitions on the same - // line wouldn't get coalesced into one line number entry. The - // DWARF spec certainly makes no such promises. - // - // So treat the functions and lines as peers, and take the trouble - // to compute their ranges' intersections precisely. In any case, - // the hair here is a constant factor for performance; the - // complexity from here on out is linear. - - // Put both our functions and lines in order by address. - sort(functions->begin(), functions->end(), - Module::Function::CompareByAddress); - sort(lines_.begin(), lines_.end(), Module::Line::CompareByAddress); - - // The last line that we used any piece of. We use this only for - // generating warnings. - const Module::Line *last_line_used = NULL; - - // The last function and line we warned about --- so we can avoid - // doing so more than once. - const Module::Function *last_function_cited = NULL; - const Module::Line *last_line_cited = NULL; - - // Make a single pass through both vectors from lower to higher - // addresses, populating each Function's lines vector with lines - // from our lines_ vector that fall within the function's address - // range. - vector::iterator func_it = functions->begin(); - vector::const_iterator line_it = lines_.begin(); - - Module::Address current; - - // Pointers to the referents of func_it and line_it, or NULL if the - // iterator is at the end of the sequence. - Module::Function *func; - const Module::Line *line; - - // Start current at the beginning of the first line or function, - // whichever is earlier. - if (func_it != functions->end() && line_it != lines_.end()) { - func = *func_it; - line = &*line_it; - current = std::min(func->address, line->address); - } else if (line_it != lines_.end()) { - func = NULL; - line = &*line_it; - current = line->address; - } else if (func_it != functions->end()) { - func = *func_it; - line = NULL; - current = (*func_it)->address; - } else { - return; - } - - while (func || line) { - // This loop has two invariants that hold at the top. - // - // First, at least one of the iterators is not at the end of its - // sequence, and those that are not refer to the earliest - // function or line that contains or starts after CURRENT. - // - // Note that every byte is in one of four states: it is covered - // or not covered by a function, and, independently, it is - // covered or not covered by a line. - // - // The second invariant is that CURRENT refers to a byte whose - // state is different from its predecessor, or it refers to the - // first byte in the address space. In other words, CURRENT is - // always the address of a transition. - // - // Note that, although each iteration advances CURRENT from one - // transition address to the next in each iteration, it might - // not advance the iterators. Suppose we have a function that - // starts with a line, has a gap, and then a second line, and - // suppose that we enter an iteration with CURRENT at the end of - // the first line. The next transition address is the start of - // the second line, after the gap, so the iteration should - // advance CURRENT to that point. At the head of that iteration, - // the invariants require that the line iterator be pointing at - // the second line. But this is also true at the head of the - // next. And clearly, the iteration must not change the function - // iterator. So neither iterator moves. - - // Assert the first invariant (see above). - assert(!func || current < func->address || within(*func, current)); - assert(!line || current < line->address || within(*line, current)); - - // The next transition after CURRENT. - Module::Address next_transition; - - // Figure out which state we're in, add lines or warn, and compute - // the next transition address. - if (func && current >= func->address) { - if (line && current >= line->address) { - // Covered by both a line and a function. - Module::Address func_left = func->size - (current - func->address); - Module::Address line_left = line->size - (current - line->address); - // This may overflow, but things work out. - next_transition = current + std::min(func_left, line_left); - Module::Line l = *line; - l.address = current; - l.size = next_transition - current; - func->lines.push_back(l); - last_line_used = line; - } else { - // Covered by a function, but no line. - if (func != last_function_cited) { - reporter->UncoveredFunction(*func); - last_function_cited = func; - } - if (line && within(*func, line->address)) - next_transition = line->address; - else - // If this overflows, we'll catch it below. - next_transition = func->address + func->size; - } - } else { - if (line && current >= line->address) { - // Covered by a line, but no function. - // - // If GCC emits padding after one function to align the start - // of the next, then it will attribute the padding - // instructions to the last source line of function (to reduce - // the size of the line number info), but omit it from the - // DW_AT_{low,high}_pc range given in .debug_info (since it - // costs nothing to be precise there). If we did use at least - // some of the line we're about to skip, and it ends at the - // start of the next function, then assume this is what - // happened, and don't warn. - if (line != last_line_cited - && !(func - && line == last_line_used - && func->address - line->address == line->size)) { - reporter->UncoveredLine(*line); - last_line_cited = line; - } - if (func && within(*line, func->address)) - next_transition = func->address; - else - // If this overflows, we'll catch it below. - next_transition = line->address + line->size; - } else { - // Covered by neither a function nor a line. By the invariant, - // both func and line begin after CURRENT. The next transition - // is the start of the next function or next line, whichever - // is earliest. - assert (func || line); - if (func && line) - next_transition = std::min(func->address, line->address); - else if (func) - next_transition = func->address; - else - next_transition = line->address; - } - } - - // If a function or line abuts the end of the address space, then - // next_transition may end up being zero, in which case we've completed - // our pass. Handle that here, instead of trying to deal with it in - // each place we compute next_transition. - if (!next_transition) - break; - - // Advance iterators as needed. If lines overlap or functions overlap, - // then we could go around more than once. We don't worry too much - // about what result we produce in that case, just as long as we don't - // hang or crash. - while (func_it != functions->end() - && next_transition >= (*func_it)->address - && !within(**func_it, next_transition)) - func_it++; - func = (func_it != functions->end()) ? *func_it : NULL; - while (line_it != lines_.end() - && next_transition >= line_it->address - && !within(*line_it, next_transition)) - line_it++; - line = (line_it != lines_.end()) ? &*line_it : NULL; - - // We must make progress. - assert(next_transition > current); - current = next_transition; - } -} - -void DwarfCUToModule::Finish() { - // Assembly language files have no function data, and that gives us - // no place to store our line numbers (even though the GNU toolchain - // will happily produce source line info for assembly language - // files). To avoid spurious warnings about lines we can't assign - // to functions, skip CUs in languages that lack functions. - if (!cu_context_->language->HasFunctions()) - return; - - // Read source line info, if we have any. - if (has_source_line_info_) - ReadSourceLines(source_line_offset_); - - vector *functions = &cu_context_->functions; - - // Dole out lines to the appropriate functions. - AssignLinesToFunctions(); - - // Add our functions, which now have source lines assigned to them, - // to module_. - cu_context_->file_context->module->AddFunctions(functions->begin(), - functions->end()); - - // Ownership of the function objects has shifted from cu_context to - // the Module. - functions->clear(); -} - -bool DwarfCUToModule::StartCompilationUnit(uint64 offset, - uint8 address_size, - uint8 offset_size, - uint64 cu_length, - uint8 dwarf_version) { - return dwarf_version >= 2; -} - -bool DwarfCUToModule::StartRootDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { - // We don't deal with partial compilation units (the only other tag - // likely to be used for root DIE). - return tag == dwarf2reader::DW_TAG_compile_unit; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.h deleted file mode 100644 index a262f3b5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module.h +++ /dev/null @@ -1,275 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// Add DWARF debugging information to a Breakpad symbol file. This -// file defines the DwarfCUToModule class, which accepts parsed DWARF -// data and populates a google_breakpad::Module with the results; the -// Module can then write its contents as a Breakpad symbol file. - -#ifndef COMMON_LINUX_DWARF_CU_TO_MODULE_H__ -#define COMMON_LINUX_DWARF_CU_TO_MODULE_H__ - -#include - -#include "common/language.h" -#include "common/module.h" -#include "common/dwarf/bytereader.h" -#include "common/dwarf/dwarf2diehandler.h" -#include "common/dwarf/dwarf2reader.h" - -namespace google_breakpad { - -using dwarf2reader::AttributeList; -using dwarf2reader::DwarfAttribute; -using dwarf2reader::DwarfForm; -using dwarf2reader::DwarfLanguage; -using dwarf2reader::DwarfTag; - -// Populate a google_breakpad::Module with DWARF debugging information. -// -// An instance of this class can be provided as a handler to a -// dwarf2reader::CompilationUnit DWARF parser. The handler uses the -// results of parsing to populate a google_breakpad::Module with -// source file, function, and source line information. -class DwarfCUToModule: public dwarf2reader::RootDIEHandler { - struct FilePrivate; - public: - - // Information global to the DWARF-bearing file we are processing, - // for use by DwarfCUToModule. Each DwarfCUToModule instance deals - // with a single compilation unit within the file, but information - // global to the whole file is held here. The client is responsible - // for filling it in appropriately (except for the 'file_private' - // field, which the constructor and destructor take care of), and - // then providing it to the DwarfCUToModule instance for each - // compilation unit we process in that file. - struct FileContext { - FileContext(const string &filename_arg, Module *module_arg); - ~FileContext(); - - // The name of this file, for use in error messages. - string filename; - - // A map of this file's sections, used for finding other DWARF - // sections that the .debug_info section may refer to. - dwarf2reader::SectionMap section_map; - - // The Module to which we're contributing definitions. - Module *module; - - // Inter-compilation unit data used internally by the handlers. - FilePrivate *file_private; - }; - - // An abstract base class for functors that handle DWARF line data - // for DwarfCUToModule. DwarfCUToModule could certainly just use - // dwarf2reader::LineInfo itself directly, but decoupling things - // this way makes unit testing a little easier. - class LineToModuleFunctor { - public: - LineToModuleFunctor() { } - virtual ~LineToModuleFunctor() { } - - // Populate MODULE and LINES with source file names and code/line - // mappings, given a pointer to some DWARF line number data - // PROGRAM, and an overestimate of its size. Add no zero-length - // lines to LINES. - virtual void operator()(const char *program, uint64 length, - Module *module, vector *lines) = 0; - }; - - // The interface DwarfCUToModule uses to report warnings. The member - // function definitions for this class write messages to stderr, but - // you can override them if you'd like to detect or report these - // conditions yourself. - class WarningReporter { - public: - // Warn about problems in the DWARF file FILENAME, in the - // compilation unit at OFFSET. - WarningReporter(const string &filename, uint64 cu_offset) - : filename_(filename), cu_offset_(cu_offset), printed_cu_header_(false), - printed_unpaired_header_(false), - uncovered_warnings_enabled_(false) { } - virtual ~WarningReporter() { } - - // Set the name of the compilation unit we're processing to NAME. - virtual void SetCUName(const string &name) { cu_name_ = name; } - - // Accessor and setter for uncovered_warnings_enabled_. - // UncoveredFunction and UncoveredLine only report a problem if that is - // true. By default, these warnings are disabled, because those - // conditions occur occasionally in healthy code. - virtual bool uncovered_warnings_enabled() const { - return uncovered_warnings_enabled_; - } - virtual void set_uncovered_warnings_enabled(bool value) { - uncovered_warnings_enabled_ = value; - } - - // A DW_AT_specification in the DIE at OFFSET refers to a DIE we - // haven't processed yet, or that wasn't marked as a declaration, - // at TARGET. - virtual void UnknownSpecification(uint64 offset, uint64 target); - - // A DW_AT_abstract_origin in the DIE at OFFSET refers to a DIE we - // haven't processed yet, or that wasn't marked as inline, at TARGET. - virtual void UnknownAbstractOrigin(uint64 offset, uint64 target); - - // We were unable to find the DWARF section named SECTION_NAME. - virtual void MissingSection(const string §ion_name); - - // The CU's DW_AT_stmt_list offset OFFSET is bogus. - virtual void BadLineInfoOffset(uint64 offset); - - // FUNCTION includes code covered by no line number data. - virtual void UncoveredFunction(const Module::Function &function); - - // Line number NUMBER in LINE_FILE, of length LENGTH, includes code - // covered by no function. - virtual void UncoveredLine(const Module::Line &line); - - // The DW_TAG_subprogram DIE at OFFSET has no name specified directly - // in the DIE, nor via a DW_AT_specification or DW_AT_abstract_origin - // link. - virtual void UnnamedFunction(uint64 offset); - - protected: - string filename_; - uint64 cu_offset_; - string cu_name_; - bool printed_cu_header_; - bool printed_unpaired_header_; - bool uncovered_warnings_enabled_; - - private: - // Print a per-CU heading, once. - void CUHeading(); - // Print an unpaired function/line heading, once. - void UncoveredHeading(); - }; - - // Create a DWARF debugging info handler for a compilation unit - // within FILE_CONTEXT. This uses information received from the - // dwarf2reader::CompilationUnit DWARF parser to populate - // FILE_CONTEXT->module. Use LINE_READER to handle the compilation - // unit's line number data. Use REPORTER to report problems with the - // data we find. - DwarfCUToModule(FileContext *file_context, - LineToModuleFunctor *line_reader, - WarningReporter *reporter); - ~DwarfCUToModule(); - - void ProcessAttributeSigned(enum DwarfAttribute attr, - enum DwarfForm form, - int64 data); - void ProcessAttributeUnsigned(enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - void ProcessAttributeString(enum DwarfAttribute attr, - enum DwarfForm form, - const string &data); - bool EndAttributes(); - DIEHandler *FindChildHandler(uint64 offset, enum DwarfTag tag, - const AttributeList &attrs); - - // Assign all our source Lines to the Functions that cover their - // addresses, and then add them to module_. - void Finish(); - - bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version); - bool StartRootDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs); - - private: - - // Used internally by the handler. Full definitions are in - // dwarf_cu_to_module.cc. - struct FilePrivate; - struct Specification; - struct CUContext; - struct DIEContext; - class GenericDIEHandler; - class FuncHandler; - class NamedScopeHandler; - - // A map from section offsets to specifications. - typedef map SpecificationByOffset; - - // Set this compilation unit's source language to LANGUAGE. - void SetLanguage(DwarfLanguage language); - - // Read source line information at OFFSET in the .debug_line - // section. Record source files in module_, but record source lines - // in lines_; we apportion them to functions in - // AssignLinesToFunctions. - void ReadSourceLines(uint64 offset); - - // Assign the lines in lines_ to the individual line lists of the - // functions in functions_. (DWARF line information maps an entire - // compilation unit at a time, and gives no indication of which - // lines belong to which functions, beyond their addresses.) - void AssignLinesToFunctions(); - - // The only reason cu_context_ and child_context_ are pointers is - // that we want to keep their definitions private to - // dwarf_cu_to_module.cc, instead of listing them all here. They are - // owned by this DwarfCUToModule: the constructor sets them, and the - // destructor deletes them. - - // The functor to use to handle line number data. - LineToModuleFunctor *line_reader_; - - // This compilation unit's context. - CUContext *cu_context_; - - // A context for our children. - DIEContext *child_context_; - - // True if this compilation unit has source line information. - bool has_source_line_info_; - - // The offset of this compilation unit's line number information in - // the .debug_line section. - uint64 source_line_offset_; - - // The line numbers we have seen thus far. We accumulate these here - // during parsing. Then, in Finish, we call AssignLinesToFunctions - // to dole them out to the appropriate functions. - vector lines_; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DWARF_CU_TO_MODULE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module_unittest.cc deleted file mode 100644 index cea1a487..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_cu_to_module_unittest.cc +++ /dev/null @@ -1,1724 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf_cu_to_module.cc: Unit tests for google_breakpad::DwarfCUToModule. - -#include - -#include "breakpad_googletest_includes.h" -#include "common/dwarf_cu_to_module.h" - -using std::vector; - -using dwarf2reader::AttributeList; -using dwarf2reader::DIEHandler; -using dwarf2reader::DwarfTag; -using dwarf2reader::DwarfAttribute; -using dwarf2reader::DwarfForm; -using dwarf2reader::DwarfInline; -using dwarf2reader::RootDIEHandler; -using google_breakpad::DwarfCUToModule; -using google_breakpad::Module; - -using ::testing::_; -using ::testing::AtMost; -using ::testing::Invoke; -using ::testing::Return; -using ::testing::Test; -using ::testing::TestWithParam; -using ::testing::Values; -using ::testing::ValuesIn; - -// Mock classes. - -class MockLineToModuleFunctor: public DwarfCUToModule::LineToModuleFunctor { - public: - MOCK_METHOD4(mock_apply, void(const char *program, uint64 length, - Module *module, vector *lines)); - void operator()(const char *program, uint64 length, - Module *module, vector *lines) { - mock_apply(program, length, module, lines); - } -}; - -class MockWarningReporter: public DwarfCUToModule::WarningReporter { - public: - MockWarningReporter(const string &filename, uint64 cu_offset) - : DwarfCUToModule::WarningReporter(filename, cu_offset) { } - MOCK_METHOD1(SetCUName, void(const string &name)); - MOCK_METHOD2(UnknownSpecification, void(uint64 offset, uint64 target)); - MOCK_METHOD2(UnknownAbstractOrigin, void(uint64 offset, uint64 target)); - MOCK_METHOD1(MissingSection, void(const string §ion_name)); - MOCK_METHOD1(BadLineInfoOffset, void(uint64 offset)); - MOCK_METHOD1(UncoveredFunction, void(const Module::Function &function)); - MOCK_METHOD1(UncoveredLine, void(const Module::Line &line)); - MOCK_METHOD1(UnnamedFunction, void(uint64 offset)); -}; - -// A fixture class including all the objects needed to handle a -// compilation unit, and their entourage. It includes member functions -// for doing common kinds of setup and tests. -class CUFixtureBase { - public: - - // If we have: - // - // vector lines; - // AppendLinesFunctor appender(lines); - // - // then doing: - // - // appender(line_program, length, module, line_vector); - // - // will append lines to the end of line_vector. We can use this with - // MockLineToModuleFunctor like this: - // - // MockLineToModuleFunctor l2m; - // EXPECT_CALL(l2m, mock_apply(_,_,_,_)) - // .WillOnce(DoAll(Invoke(appender), Return())); - // - // in which case calling l2m with some line vector will append lines. - class AppendLinesFunctor { - public: - AppendLinesFunctor(const vector *lines) : lines_(lines) { } - void operator()(const char *program, uint64 length, - Module *module, vector *lines) { - lines->insert(lines->end(), lines_->begin(), lines_->end()); - } - private: - const vector *lines_; - }; - - CUFixtureBase() - : module_("module-name", "module-os", "module-arch", "module-id"), - file_context_("dwarf-filename", &module_), - language_(dwarf2reader::DW_LANG_none), - language_signed_(false), - appender_(&lines_), - reporter_("dwarf-filename", 0xcf8f9bb6443d29b5LL), - root_handler_(&file_context_, &line_reader_, &reporter_), - functions_filled_(false) { - // By default, expect no warnings to be reported, and expect the - // compilation unit's name to be provided. The test can override - // these expectations. - EXPECT_CALL(reporter_, SetCUName("compilation-unit-name")).Times(1); - EXPECT_CALL(reporter_, UnknownSpecification(_, _)).Times(0); - EXPECT_CALL(reporter_, UnknownAbstractOrigin(_, _)).Times(0); - EXPECT_CALL(reporter_, MissingSection(_)).Times(0); - EXPECT_CALL(reporter_, BadLineInfoOffset(_)).Times(0); - EXPECT_CALL(reporter_, UncoveredFunction(_)).Times(0); - EXPECT_CALL(reporter_, UncoveredLine(_)).Times(0); - EXPECT_CALL(reporter_, UnnamedFunction(_)).Times(0); - - // By default, expect the line program reader not to be invoked. We - // may override this in StartCU. - EXPECT_CALL(line_reader_, mock_apply(_,_,_,_)).Times(0); - - // The handler will consult this section map to decide what to - // pass to our line reader. - file_context_.section_map[".debug_line"] = std::make_pair(dummy_line_program_, - dummy_line_size_); - } - - // Add a line with the given address, size, filename, and line - // number to the end of the statement list the handler will receive - // when it invokes its LineToModuleFunctor. Call this before calling - // StartCU. - void PushLine(Module::Address address, Module::Address size, - const string &filename, int line_number); - - // Use LANGUAGE for the compilation unit. More precisely, arrange - // for StartCU to pass the compilation unit's root DIE a - // DW_AT_language attribute whose value is LANGUAGE. - void SetLanguage(dwarf2reader::DwarfLanguage language) { - language_ = language; - } - - // If SIGNED true, have StartCU report DW_AT_language as a signed - // attribute; if false, have it report it as unsigned. - void SetLanguageSigned(bool is_signed) { language_signed_ = is_signed; } - - // Call the handler this.root_handler_'s StartCompilationUnit and - // StartRootDIE member functions, passing it appropriate attributes as - // determined by prior calls to PushLine and SetLanguage. Leave - // this.root_handler_ ready to hear about children: call - // this.root_handler_.EndAttributes, but not this.root_handler_.Finish. - void StartCU(); - - // Add some strange attributes/form pairs to the end of ATTRS. - void PushBackStrangeAttributes(dwarf2reader::AttributeList *attrs); - - // Have HANDLER process some strange attribute/form/value triples. - // These will match those promised by PushBackStrangeAttributes. - void ProcessStrangeAttributes(dwarf2reader::DIEHandler *handler); - - // Start a child DIE of PARENT with the given tag and name. Leave - // the handler ready to hear about children: call EndAttributes, but - // not Finish. - DIEHandler *StartNamedDIE(DIEHandler *parent, DwarfTag tag, - const string &name); - - // Start a child DIE of PARENT with the given tag and a - // DW_AT_specification attribute whose value is SPECIFICATION. Leave - // the handler ready to hear about children: call EndAttributes, but - // not Finish. If NAME is non-zero, use it as the DW_AT_name - // attribute. - DIEHandler *StartSpecifiedDIE(DIEHandler *parent, DwarfTag tag, - uint64 offset, const char *name = NULL); - - // Define a function as a child of PARENT with the given name, - // address, and size. Call EndAttributes and Finish; one cannot - // define children of the defined function's DIE. - void DefineFunction(DIEHandler *parent, const string &name, - Module::Address address, Module::Address size); - - // Create a declaration DIE as a child of PARENT with the given - // offset, tag and name. If NAME is the empty string, don't provide - // a DW_AT_name attribute. Call EndAttributes and Finish. - void DeclarationDIE(DIEHandler *parent, uint64 offset, - DwarfTag tag, const string &name); - - // Create a definition DIE as a child of PARENT with the given tag - // that refers to the declaration DIE at offset SPECIFICATION as its - // specification. If NAME is non-empty, pass it as the DW_AT_name - // attribute. If SIZE is non-zero, record ADDRESS and SIZE as - // low_pc/high_pc attributes. - void DefinitionDIE(DIEHandler *parent, DwarfTag tag, - uint64 specification, const string &name, - Module::Address address = 0, Module::Address size = 0); - - // Create an inline DW_TAG_subprogram DIE as a child of PARENT. If - // SPECIFICATION is non-zero, then the DIE refers to the declaration DIE at - // offset SPECIFICATION as its specification. If Name is non-empty, pass it - // as the DW_AT_name attribute. - void AbstractInstanceDIE(DIEHandler *parent, uint64 offset, - DwarfInline type, uint64 specification, - const string &name, - DwarfForm form = dwarf2reader::DW_FORM_data1); - - // Create a DW_TAG_subprogram DIE as a child of PARENT that refers to - // ORIGIN in its DW_AT_abstract_origin attribute. If NAME is the empty - // string, don't provide a DW_AT_name attribute. - void DefineInlineInstanceDIE(DIEHandler *parent, const string &name, - uint64 origin, Module::Address address, - Module::Address size); - - // The following Test* functions should be called after calling - // this.root_handler_.Finish. After that point, no further calls - // should be made on the handler. - - // Test that the number of functions defined in the module this.module_ is - // equal to EXPECTED. - void TestFunctionCount(size_t expected); - - // Test that the I'th function (ordered by address) in the module - // this.module_ has the given name, address, and size, and that its - // parameter size is zero. - void TestFunction(int i, const string &name, - Module::Address address, Module::Address size); - - // Test that the number of source lines owned by the I'th function - // in the module this.module_ is equal to EXPECTED. - void TestLineCount(int i, size_t expected); - - // Test that the J'th line (ordered by address) of the I'th function - // (again, by address) has the given address, size, filename, and - // line number. - void TestLine(int i, int j, Module::Address address, Module::Address size, - const string &filename, int number); - - // Actual objects under test. - Module module_; - DwarfCUToModule::FileContext file_context_; - - // If this is not DW_LANG_none, we'll pass it as a DW_AT_language - // attribute to the compilation unit. This defaults to DW_LANG_none. - dwarf2reader::DwarfLanguage language_; - - // If this is true, report DW_AT_language as a signed value; if false, - // report it as an unsigned value. - bool language_signed_; - - // If this is not empty, we'll give the CU a DW_AT_stmt_list - // attribute that, when passed to line_reader_, adds these lines to the - // provided lines array. - vector lines_; - - // Mock line program reader. - MockLineToModuleFunctor line_reader_; - AppendLinesFunctor appender_; - static const char dummy_line_program_[]; - static const size_t dummy_line_size_; - - MockWarningReporter reporter_; - DwarfCUToModule root_handler_; - - private: - // Fill functions_, if we haven't already. - void FillFunctions(); - - // If functions_filled_ is true, this is a table of functions we've - // extracted from module_, sorted by address. - vector functions_; - // True if we have filled the above vector with this.module_'s function list. - bool functions_filled_; -}; - -const char CUFixtureBase::dummy_line_program_[] = "lots of fun data"; -const size_t CUFixtureBase::dummy_line_size_ = - sizeof (CUFixtureBase::dummy_line_program_); - -void CUFixtureBase::PushLine(Module::Address address, Module::Address size, - const string &filename, int line_number) { - Module::Line l; - l.address = address; - l.size = size; - l.file = module_.FindFile(filename); - l.number = line_number; - lines_.push_back(l); -} - -void CUFixtureBase::StartCU() { - // If we have lines, make the line reader expect to be invoked at - // most once. (Hey, if the handler can pass its tests without - // bothering to read the line number data, that's great.) - // Have it add the lines passed to PushLine. Otherwise, leave the - // initial expectation (no calls) in force. - if (!lines_.empty()) - EXPECT_CALL(line_reader_, - mock_apply(&dummy_line_program_[0], dummy_line_size_, - &module_, _)) - .Times(AtMost(1)) - .WillOnce(DoAll(Invoke(appender_), Return())); - - ASSERT_TRUE(root_handler_ - .StartCompilationUnit(0x51182ec307610b51ULL, 0x81, 0x44, - 0x4241b4f33720dd5cULL, 3)); - { - dwarf2reader::AttributeList attrs; - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - if (!lines_.empty()) - attrs.push_back(make_pair(dwarf2reader::DW_AT_stmt_list, - dwarf2reader::DW_FORM_ref4)); - if (language_ != dwarf2reader::DW_LANG_none) - attrs.push_back(make_pair(dwarf2reader::DW_AT_language, - language_signed_ - ? dwarf2reader::DW_FORM_sdata - : dwarf2reader::DW_FORM_udata)); - ASSERT_TRUE(root_handler_.StartRootDIE(0x02e56bfbda9e7337ULL, - dwarf2reader::DW_TAG_compile_unit, - attrs)); - } - root_handler_.ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - "compilation-unit-name"); - if (!lines_.empty()) - root_handler_.ProcessAttributeUnsigned(dwarf2reader::DW_AT_stmt_list, - dwarf2reader::DW_FORM_ref4, - 0); - if (language_ != dwarf2reader::DW_LANG_none) { - if (language_signed_) - root_handler_.ProcessAttributeSigned(dwarf2reader::DW_AT_language, - dwarf2reader::DW_FORM_sdata, - language_); - else - root_handler_.ProcessAttributeUnsigned(dwarf2reader::DW_AT_language, - dwarf2reader::DW_FORM_udata, - language_); - } - ASSERT_TRUE(root_handler_.EndAttributes()); -} - -void CUFixtureBase::PushBackStrangeAttributes( - dwarf2reader::AttributeList *attrs) { - attrs->push_back(make_pair((DwarfAttribute) 0xf560dead, - (DwarfForm) 0x4106e4db)); - attrs->push_back(make_pair((DwarfAttribute) 0x85380095, - (DwarfForm) 0x0f16fe87)); - attrs->push_back(make_pair((DwarfAttribute) 0xf7f7480f, - (DwarfForm) 0x829e038a)); - attrs->push_back(make_pair((DwarfAttribute) 0xa55ffb51, - (DwarfForm) 0x2f43b041)); - attrs->push_back(make_pair((DwarfAttribute) 0x2fde304a, - (DwarfForm) 0x895ffa23)); -} - -void CUFixtureBase::ProcessStrangeAttributes( - dwarf2reader::DIEHandler *handler) { - handler->ProcessAttributeUnsigned((DwarfAttribute) 0xf560dead, - (DwarfForm) 0x4106e4db, - 0xa592571997facda1ULL); - handler->ProcessAttributeSigned((DwarfAttribute) 0x85380095, - (DwarfForm) 0x0f16fe87, - 0x12602a4e3bf1f446LL); - handler->ProcessAttributeReference((DwarfAttribute) 0xf7f7480f, - (DwarfForm) 0x829e038a, - 0x50fddef44734fdecULL); - static const char buffer[10] = "frobynode"; - handler->ProcessAttributeBuffer((DwarfAttribute) 0xa55ffb51, - (DwarfForm) 0x2f43b041, - buffer, sizeof(buffer)); - handler->ProcessAttributeString((DwarfAttribute) 0x2f43b041, - (DwarfForm) 0x895ffa23, - "strange string"); -} - -DIEHandler *CUFixtureBase::StartNamedDIE(DIEHandler *parent, - DwarfTag tag, - const string &name) { - dwarf2reader::AttributeList attrs; - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - PushBackStrangeAttributes(&attrs); - dwarf2reader::DIEHandler *handler - = parent->FindChildHandler(0x8f4c783c0467c989ULL, tag, attrs); - if (!handler) - return NULL; - handler->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - ProcessStrangeAttributes(handler); - if (!handler->EndAttributes()) { - handler->Finish(); - delete handler; - return NULL; - } - - return handler; -} - -DIEHandler *CUFixtureBase::StartSpecifiedDIE(DIEHandler *parent, - DwarfTag tag, - uint64 specification, - const char *name) { - dwarf2reader::AttributeList attrs; - if (name) - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - attrs.push_back(make_pair(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4)); - dwarf2reader::DIEHandler *handler - = parent->FindChildHandler(0x8f4c783c0467c989ULL, tag, attrs); - if (!handler) - return NULL; - if (name) - handler->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - handler->ProcessAttributeReference(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4, - specification); - if (!handler->EndAttributes()) { - handler->Finish(); - delete handler; - return NULL; - } - - return handler; -} - -void CUFixtureBase::DefineFunction(dwarf2reader::DIEHandler *parent, - const string &name, Module::Address address, - Module::Address size) { - dwarf2reader::AttributeList func_attrs; - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr)); - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr)); - PushBackStrangeAttributes(&func_attrs); - dwarf2reader::DIEHandler *func - = parent->FindChildHandler(0xe34797c7e68590a8LL, - dwarf2reader::DW_TAG_subprogram, - func_attrs); - ASSERT_TRUE(func != NULL); - func->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - func->ProcessAttributeUnsigned(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr, - address); - func->ProcessAttributeUnsigned(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr, - address + size); - ProcessStrangeAttributes(func); - EXPECT_TRUE(func->EndAttributes()); - func->Finish(); - delete func; -} - -void CUFixtureBase::DeclarationDIE(DIEHandler *parent, uint64 offset, - DwarfTag tag, - const string &name) { - dwarf2reader::AttributeList attrs; - if (!name.empty()) - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - attrs.push_back(make_pair(dwarf2reader::DW_AT_declaration, - dwarf2reader::DW_FORM_flag)); - dwarf2reader::DIEHandler *die = parent->FindChildHandler(offset, tag, attrs); - ASSERT_TRUE(die != NULL); - if (!name.empty()) - die->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - die->ProcessAttributeUnsigned(dwarf2reader::DW_AT_declaration, - dwarf2reader::DW_FORM_flag, - 1); - EXPECT_TRUE(die->EndAttributes()); - die->Finish(); - delete die; -} - -void CUFixtureBase::DefinitionDIE(DIEHandler *parent, - DwarfTag tag, - uint64 specification, - const string &name, - Module::Address address, - Module::Address size) { - dwarf2reader::AttributeList attrs; - attrs.push_back(make_pair(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4)); - if (!name.empty()) - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - if (size) { - attrs.push_back(make_pair(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr)); - attrs.push_back(make_pair(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr)); - } - dwarf2reader::DIEHandler *die - = parent->FindChildHandler(0x6ccfea031a9e6cc9ULL, tag, attrs); - ASSERT_TRUE(die != NULL); - die->ProcessAttributeReference(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4, - specification); - if (!name.empty()) - die->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - if (size) { - die->ProcessAttributeUnsigned(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr, - address); - die->ProcessAttributeUnsigned(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr, - address + size); - } - EXPECT_TRUE(die->EndAttributes()); - die->Finish(); - delete die; -} - -void CUFixtureBase::AbstractInstanceDIE(DIEHandler *parent, - uint64 offset, - DwarfInline type, - uint64 specification, - const string &name, - DwarfForm form) { - dwarf2reader::AttributeList attrs; - if (specification != 0ULL) - attrs.push_back(make_pair(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4)); - attrs.push_back(make_pair(dwarf2reader::DW_AT_inline, form)); - if (!name.empty()) - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - dwarf2reader::DIEHandler *die - = parent->FindChildHandler(offset, dwarf2reader::DW_TAG_subprogram, attrs); - ASSERT_TRUE(die != NULL); - if (specification != 0ULL) - die->ProcessAttributeReference(dwarf2reader::DW_AT_specification, - dwarf2reader::DW_FORM_ref4, - specification); - if (form == dwarf2reader::DW_FORM_sdata) { - die->ProcessAttributeSigned(dwarf2reader::DW_AT_inline, form, type); - } else { - die->ProcessAttributeUnsigned(dwarf2reader::DW_AT_inline, form, type); - } - if (!name.empty()) - die->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - - EXPECT_TRUE(die->EndAttributes()); - die->Finish(); - delete die; -} - -void CUFixtureBase::DefineInlineInstanceDIE(DIEHandler *parent, - const string &name, - uint64 origin, - Module::Address address, - Module::Address size) { - dwarf2reader::AttributeList func_attrs; - if (!name.empty()) - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr)); - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr)); - func_attrs.push_back(make_pair(dwarf2reader::DW_AT_abstract_origin, - dwarf2reader::DW_FORM_ref4)); - PushBackStrangeAttributes(&func_attrs); - dwarf2reader::DIEHandler *func - = parent->FindChildHandler(0x11c70f94c6e87ccdLL, - dwarf2reader::DW_TAG_subprogram, - func_attrs); - ASSERT_TRUE(func != NULL); - if (!name.empty()) { - func->ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - name); - } - func->ProcessAttributeUnsigned(dwarf2reader::DW_AT_low_pc, - dwarf2reader::DW_FORM_addr, - address); - func->ProcessAttributeUnsigned(dwarf2reader::DW_AT_high_pc, - dwarf2reader::DW_FORM_addr, - address + size); - func->ProcessAttributeReference(dwarf2reader::DW_AT_abstract_origin, - dwarf2reader::DW_FORM_ref4, - origin); - ProcessStrangeAttributes(func); - EXPECT_TRUE(func->EndAttributes()); - func->Finish(); - delete func; -} - -void CUFixtureBase::FillFunctions() { - if (functions_filled_) - return; - module_.GetFunctions(&functions_, functions_.end()); - sort(functions_.begin(), functions_.end(), - Module::Function::CompareByAddress); - functions_filled_ = true; -} - -void CUFixtureBase::TestFunctionCount(size_t expected) { - FillFunctions(); - ASSERT_EQ(expected, functions_.size()); -} - -void CUFixtureBase::TestFunction(int i, const string &name, - Module::Address address, - Module::Address size) { - FillFunctions(); - ASSERT_LT((size_t) i, functions_.size()); - - Module::Function *function = functions_[i]; - EXPECT_EQ(name, function->name); - EXPECT_EQ(address, function->address); - EXPECT_EQ(size, function->size); - EXPECT_EQ(0U, function->parameter_size); -} - -void CUFixtureBase::TestLineCount(int i, size_t expected) { - FillFunctions(); - ASSERT_LT((size_t) i, functions_.size()); - - ASSERT_EQ(expected, functions_[i]->lines.size()); -} - -void CUFixtureBase::TestLine(int i, int j, - Module::Address address, Module::Address size, - const string &filename, int number) { - FillFunctions(); - ASSERT_LT((size_t) i, functions_.size()); - ASSERT_LT((size_t) j, functions_[i]->lines.size()); - - Module::Line *line = &functions_[i]->lines[j]; - EXPECT_EQ(address, line->address); - EXPECT_EQ(size, line->size); - EXPECT_EQ(filename, line->file->name.c_str()); - EXPECT_EQ(number, line->number); -} - -// Include caller locations for our test subroutines. -#define TRACE(call) do { SCOPED_TRACE("called from here"); call; } while (0) -#define PushLine(a,b,c,d) TRACE(PushLine((a),(b),(c),(d))) -#define SetLanguage(a) TRACE(SetLanguage(a)) -#define StartCU() TRACE(StartCU()) -#define DefineFunction(a,b,c,d) TRACE(DefineFunction((a),(b),(c),(d))) -#define DeclarationDIE(a,b,c,d) TRACE(DeclarationDIE((a),(b),(c),(d))) -#define DefinitionDIE(a,b,c,d,e,f) TRACE(DefinitionDIE((a),(b),(c),(d),(e),(f))) -#define TestFunctionCount(a) TRACE(TestFunctionCount(a)) -#define TestFunction(a,b,c,d) TRACE(TestFunction((a),(b),(c),(d))) -#define TestLineCount(a,b) TRACE(TestLineCount((a),(b))) -#define TestLine(a,b,c,d,e,f) TRACE(TestLine((a),(b),(c),(d),(e),(f))) - -class SimpleCU: public CUFixtureBase, public Test { -}; - -TEST_F(SimpleCU, OneFunc) { - PushLine(0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL, "line-file", 246571772); - - StartCU(); - DefineFunction(&root_handler_, "function1", - 0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "function1", 0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL); - TestLineCount(0, 1); - TestLine(0, 0, 0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL, "line-file", - 246571772); -} - -TEST_F(SimpleCU, IrrelevantRootChildren) { - StartCU(); - dwarf2reader::AttributeList no_attrs; - EXPECT_FALSE(root_handler_ - .FindChildHandler(0x7db32bff4e2dcfb1ULL, - dwarf2reader::DW_TAG_lexical_block, no_attrs)); -} - -TEST_F(SimpleCU, IrrelevantNamedScopeChildren) { - StartCU(); - dwarf2reader::AttributeList no_attrs; - DIEHandler *class_A_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, "class_A"); - EXPECT_TRUE(class_A_handler != NULL); - EXPECT_FALSE(class_A_handler - ->FindChildHandler(0x02e55999b865e4e9ULL, - dwarf2reader::DW_TAG_lexical_block, - no_attrs)); - delete class_A_handler; -} - -// Verify that FileContexts can safely be deleted unused. -TEST_F(SimpleCU, UnusedFileContext) { - Module m("module-name", "module-os", "module-arch", "module-id"); - DwarfCUToModule::FileContext fc("dwarf-filename", &m); - - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); -} - -TEST_F(SimpleCU, InlineFunction) { - PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118); - - StartCU(); - AbstractInstanceDIE(&root_handler_, 0x1e8dac5d507ed7abULL, - dwarf2reader::DW_INL_inlined, 0, "inline-name"); - DefineInlineInstanceDIE(&root_handler_, "", 0x1e8dac5d507ed7abULL, - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "inline-name", - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); -} - -TEST_F(SimpleCU, InlineFunctionSignedAttribute) { - PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118); - - StartCU(); - AbstractInstanceDIE(&root_handler_, 0x1e8dac5d507ed7abULL, - dwarf2reader::DW_INL_inlined, 0, "inline-name", - dwarf2reader::DW_FORM_sdata); - DefineInlineInstanceDIE(&root_handler_, "", 0x1e8dac5d507ed7abULL, - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "inline-name", - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); -} - -// Any DIE with an DW_AT_inline attribute can be cited by -// DW_AT_abstract_origin attributes --- even if the value of the -// DW_AT_inline attribute is DW_INL_not_inlined. -TEST_F(SimpleCU, AbstractOriginNotInlined) { - PushLine(0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL, "line-file", 6111581); - - StartCU(); - AbstractInstanceDIE(&root_handler_, 0x93e9cdad52826b39ULL, - dwarf2reader::DW_INL_not_inlined, 0, "abstract-instance"); - DefineInlineInstanceDIE(&root_handler_, "", 0x93e9cdad52826b39ULL, - 0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "abstract-instance", - 0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL); -} - -TEST_F(SimpleCU, UnknownAbstractOrigin) { - EXPECT_CALL(reporter_, UnknownAbstractOrigin(_, 1ULL)).WillOnce(Return()); - EXPECT_CALL(reporter_, UnnamedFunction(0x11c70f94c6e87ccdLL)) - .WillOnce(Return()); - PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118); - - StartCU(); - AbstractInstanceDIE(&root_handler_, 0x1e8dac5d507ed7abULL, - dwarf2reader::DW_INL_inlined, 0, "inline-name"); - DefineInlineInstanceDIE(&root_handler_, "", 1ULL, - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "", - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); -} - -TEST_F(SimpleCU, UnnamedFunction) { - EXPECT_CALL(reporter_, UnnamedFunction(0xe34797c7e68590a8LL)) - .WillOnce(Return()); - PushLine(0x72b80e41a0ac1d40ULL, 0x537174f231ee181cULL, "line-file", 14044850); - - StartCU(); - DefineFunction(&root_handler_, "", - 0x72b80e41a0ac1d40ULL, 0x537174f231ee181cULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "", - 0x72b80e41a0ac1d40ULL, 0x537174f231ee181cULL); -} - -// An address range. -struct Range { - Module::Address start, end; -}; - -// Test data for pairing functions and lines. -struct Situation { - // Two function intervals, and two line intervals. - Range functions[2], lines[2]; - - // The number of lines we expect to be assigned to each of the - // functions, and the address ranges. - int paired_count[2]; - Range paired[2][2]; - - // The number of functions that are not entirely covered by lines, - // and vice versa. - int uncovered_functions, uncovered_lines; -}; - -#define PAIRING(func1_start, func1_end, func2_start, func2_end, \ - line1_start, line1_end, line2_start, line2_end, \ - func1_num_lines, func2_num_lines, \ - func1_line1_start, func1_line1_end, \ - func1_line2_start, func1_line2_end, \ - func2_line1_start, func2_line1_end, \ - func2_line2_start, func2_line2_end, \ - uncovered_functions, uncovered_lines) \ - { { { func1_start, func1_end }, { func2_start, func2_end } }, \ - { { line1_start, line1_end }, { line2_start, line2_end } }, \ - { func1_num_lines, func2_num_lines }, \ - { { { func1_line1_start, func1_line1_end }, \ - { func1_line2_start, func1_line2_end } }, \ - { { func2_line1_start, func2_line1_end }, \ - { func2_line2_start, func2_line2_end } } }, \ - uncovered_functions, uncovered_lines }, - -Situation situations[] = { -#include "common/testdata/func-line-pairing.h" -}; - -#undef PAIRING - -class FuncLinePairing: public CUFixtureBase, - public TestWithParam { }; - -INSTANTIATE_TEST_CASE_P(AllSituations, FuncLinePairing, - ValuesIn(situations)); - -TEST_P(FuncLinePairing, Pairing) { - const Situation &s = GetParam(); - PushLine(s.lines[0].start, - s.lines[0].end - s.lines[0].start, - "line-file", 67636963); - PushLine(s.lines[1].start, - s.lines[1].end - s.lines[1].start, - "line-file", 67636963); - if (s.uncovered_functions) - EXPECT_CALL(reporter_, UncoveredFunction(_)) - .Times(s.uncovered_functions) - .WillRepeatedly(Return()); - if (s.uncovered_lines) - EXPECT_CALL(reporter_, UncoveredLine(_)) - .Times(s.uncovered_lines) - .WillRepeatedly(Return()); - - StartCU(); - DefineFunction(&root_handler_, "function1", - s.functions[0].start, - s.functions[0].end - s.functions[0].start); - DefineFunction(&root_handler_, "function2", - s.functions[1].start, - s.functions[1].end - s.functions[1].start); - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "function1", - s.functions[0].start, - s.functions[0].end - s.functions[0].start); - TestLineCount(0, s.paired_count[0]); - for (int i = 0; i < s.paired_count[0]; i++) - TestLine(0, i, s.paired[0][i].start, - s.paired[0][i].end - s.paired[0][i].start, - "line-file", 67636963); - TestFunction(1, "function2", - s.functions[1].start, - s.functions[1].end - s.functions[1].start); - TestLineCount(1, s.paired_count[1]); - for (int i = 0; i < s.paired_count[1]; i++) - TestLine(1, i, s.paired[1][i].start, - s.paired[1][i].end - s.paired[1][i].start, - "line-file", 67636963); -} - -TEST_F(FuncLinePairing, EmptyCU) { - - StartCU(); - root_handler_.Finish(); - - TestFunctionCount(0); -} - -TEST_F(FuncLinePairing, LinesNoFuncs) { - PushLine(40, 2, "line-file", 82485646); - EXPECT_CALL(reporter_, UncoveredLine(_)).WillOnce(Return()); - - StartCU(); - root_handler_.Finish(); - - TestFunctionCount(0); -} - -TEST_F(FuncLinePairing, FuncsNoLines) { - EXPECT_CALL(reporter_, UncoveredFunction(_)).WillOnce(Return()); - - StartCU(); - DefineFunction(&root_handler_, "function1", 0x127da12ffcf5c51fULL, 0x1000U); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "function1", 0x127da12ffcf5c51fULL, 0x1000U); -} - -TEST_F(FuncLinePairing, GapThenFunction) { - PushLine(20, 2, "line-file-2", 174314698); - PushLine(10, 2, "line-file-1", 263008005); - - StartCU(); - DefineFunction(&root_handler_, "function1", 10, 2); - DefineFunction(&root_handler_, "function2", 20, 2); - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "function1", 10, 2); - TestLineCount(0, 1); - TestLine(0, 0, 10, 2, "line-file-1", 263008005); - TestFunction(1, "function2", 20, 2); - TestLineCount(1, 1); - TestLine(1, 0, 20, 2, "line-file-2", 174314698); -} - -// If GCC emits padding after one function to align the start of -// the next, then it will attribute the padding instructions to -// the last source line of function (to reduce the size of the -// line number info), but omit it from the DW_AT_{low,high}_pc -// range given in .debug_info (since it costs nothing to be -// precise there). If we did use at least some of the line -// we're about to skip, then assume this is what happened, and -// don't warn. -TEST_F(FuncLinePairing, GCCAlignmentStretch) { - PushLine(10, 10, "line-file", 63351048); - PushLine(20, 10, "line-file", 61661044); - - StartCU(); - DefineFunction(&root_handler_, "function1", 10, 5); - // five-byte gap between functions, covered by line 63351048. - // This should not elicit a warning. - DefineFunction(&root_handler_, "function2", 20, 10); - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "function1", 10, 5); - TestLineCount(0, 1); - TestLine(0, 0, 10, 5, "line-file", 63351048); - TestFunction(1, "function2", 20, 10); - TestLineCount(1, 1); - TestLine(1, 0, 20, 10, "line-file", 61661044); -} - -// Unfortunately, neither the DWARF parser's handler interface nor the -// DIEHandler interface is capable of expressing a function that abuts -// the end of the address space: the high_pc value looks like zero. - -TEST_F(FuncLinePairing, LineAtEndOfAddressSpace) { - PushLine(0xfffffffffffffff0ULL, 16, "line-file", 63351048); - EXPECT_CALL(reporter_, UncoveredLine(_)).WillOnce(Return()); - - StartCU(); - DefineFunction(&root_handler_, "function1", 0xfffffffffffffff0ULL, 6); - DefineFunction(&root_handler_, "function2", 0xfffffffffffffffaULL, 5); - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "function1", 0xfffffffffffffff0ULL, 6); - TestLineCount(0, 1); - TestLine(0, 0, 0xfffffffffffffff0ULL, 6, "line-file", 63351048); - TestFunction(1, "function2", 0xfffffffffffffffaULL, 5); - TestLineCount(1, 1); - TestLine(1, 0, 0xfffffffffffffffaULL, 5, "line-file", 63351048); -} - -// A function with more than one uncovered area should only be warned -// about once. -TEST_F(FuncLinePairing, WarnOnceFunc) { - PushLine(20, 1, "line-file-2", 262951329); - PushLine(11, 1, "line-file-1", 219964021); - EXPECT_CALL(reporter_, UncoveredFunction(_)).WillOnce(Return()); - - StartCU(); - DefineFunction(&root_handler_, "function", 10, 11); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "function", 10, 11); - TestLineCount(0, 2); - TestLine(0, 0, 11, 1, "line-file-1", 219964021); - TestLine(0, 1, 20, 1, "line-file-2", 262951329); -} - -// A line with more than one uncovered area should only be warned -// about once. -TEST_F(FuncLinePairing, WarnOnceLine) { - PushLine(10, 20, "filename1", 118581871); - EXPECT_CALL(reporter_, UncoveredLine(_)).WillOnce(Return()); - - StartCU(); - DefineFunction(&root_handler_, "function1", 11, 1); - DefineFunction(&root_handler_, "function2", 13, 1); - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "function1", 11, 1); - TestLineCount(0, 1); - TestLine(0, 0, 11, 1, "filename1", 118581871); - TestFunction(1, "function2", 13, 1); - TestLineCount(1, 1); - TestLine(1, 0, 13, 1, "filename1", 118581871); -} - -class CXXQualifiedNames: public CUFixtureBase, - public TestWithParam { }; - -INSTANTIATE_TEST_CASE_P(VersusEnclosures, CXXQualifiedNames, - Values(dwarf2reader::DW_TAG_class_type, - dwarf2reader::DW_TAG_structure_type, - dwarf2reader::DW_TAG_union_type, - dwarf2reader::DW_TAG_namespace)); - -TEST_P(CXXQualifiedNames, TwoFunctions) { - DwarfTag tag = GetParam(); - - SetLanguage(dwarf2reader::DW_LANG_C_plus_plus); - PushLine(10, 1, "filename1", 69819327); - PushLine(20, 1, "filename2", 95115701); - - StartCU(); - DIEHandler *enclosure_handler = StartNamedDIE(&root_handler_, tag, - "Enclosure"); - EXPECT_TRUE(enclosure_handler != NULL); - DefineFunction(enclosure_handler, "func_B", 10, 1); - DefineFunction(enclosure_handler, "func_C", 20, 1); - enclosure_handler->Finish(); - delete enclosure_handler; - root_handler_.Finish(); - - TestFunctionCount(2); - TestFunction(0, "Enclosure::func_B", 10, 1); - TestFunction(1, "Enclosure::func_C", 20, 1); -} - -TEST_P(CXXQualifiedNames, FuncInEnclosureInNamespace) { - DwarfTag tag = GetParam(); - - SetLanguage(dwarf2reader::DW_LANG_C_plus_plus); - PushLine(10, 1, "line-file", 69819327); - - StartCU(); - DIEHandler *namespace_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_namespace, - "Namespace"); - EXPECT_TRUE(namespace_handler != NULL); - DIEHandler *enclosure_handler = StartNamedDIE(namespace_handler, tag, - "Enclosure"); - EXPECT_TRUE(enclosure_handler != NULL); - DefineFunction(enclosure_handler, "function", 10, 1); - enclosure_handler->Finish(); - delete enclosure_handler; - namespace_handler->Finish(); - delete namespace_handler; - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "Namespace::Enclosure::function", 10, 1); -} - -TEST_F(CXXQualifiedNames, FunctionInClassInStructInNamespace) { - SetLanguage(dwarf2reader::DW_LANG_C_plus_plus); - PushLine(10, 1, "filename1", 69819327); - - StartCU(); - DIEHandler *namespace_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_namespace, - "namespace_A"); - EXPECT_TRUE(namespace_handler != NULL); - DIEHandler *struct_handler - = StartNamedDIE(namespace_handler, dwarf2reader::DW_TAG_structure_type, - "struct_B"); - EXPECT_TRUE(struct_handler != NULL); - DIEHandler *class_handler - = StartNamedDIE(struct_handler, dwarf2reader::DW_TAG_class_type, - "class_C"); - DefineFunction(class_handler, "function_D", 10, 1); - class_handler->Finish(); - delete class_handler; - struct_handler->Finish(); - delete struct_handler; - namespace_handler->Finish(); - delete namespace_handler; - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "namespace_A::struct_B::class_C::function_D", 10, 1); -} - -struct LanguageAndQualifiedName { - dwarf2reader::DwarfLanguage language; - const char *name; -}; - -const LanguageAndQualifiedName LanguageAndQualifiedNameCases[] = { - { dwarf2reader::DW_LANG_none, "class_A::function_B" }, - { dwarf2reader::DW_LANG_C, "class_A::function_B" }, - { dwarf2reader::DW_LANG_C89, "class_A::function_B" }, - { dwarf2reader::DW_LANG_C99, "class_A::function_B" }, - { dwarf2reader::DW_LANG_C_plus_plus, "class_A::function_B" }, - { dwarf2reader::DW_LANG_Java, "class_A.function_B" }, - { dwarf2reader::DW_LANG_Cobol74, "class_A::function_B" }, - { dwarf2reader::DW_LANG_Mips_Assembler, NULL } -}; - -class QualifiedForLanguage: - public CUFixtureBase, - public TestWithParam { }; - -INSTANTIATE_TEST_CASE_P(LanguageAndQualifiedName, QualifiedForLanguage, - ValuesIn(LanguageAndQualifiedNameCases)); - -TEST_P(QualifiedForLanguage, MemberFunction) { - const LanguageAndQualifiedName ¶m = GetParam(); - - PushLine(10, 1, "line-file", 212966758); - SetLanguage(param.language); - - StartCU(); - DIEHandler *class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - "class_A"); - DefineFunction(class_handler, "function_B", 10, 1); - class_handler->Finish(); - delete class_handler; - root_handler_.Finish(); - - if (param.name) { - TestFunctionCount(1); - TestFunction(0, param.name, 10, 1); - } else { - TestFunctionCount(0); - } -} - -TEST_P(QualifiedForLanguage, MemberFunctionSignedLanguage) { - const LanguageAndQualifiedName ¶m = GetParam(); - - PushLine(10, 1, "line-file", 212966758); - SetLanguage(param.language); - SetLanguageSigned(true); - - StartCU(); - DIEHandler *class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - "class_A"); - DefineFunction(class_handler, "function_B", 10, 1); - class_handler->Finish(); - delete class_handler; - root_handler_.Finish(); - - if (param.name) { - TestFunctionCount(1); - TestFunction(0, param.name, 10, 1); - } else { - TestFunctionCount(0); - } -} - -class Specifications: public CUFixtureBase, public Test { }; - -TEST_F(Specifications, Function) { - PushLine(0x93cd3dfc1aa10097ULL, 0x0397d47a0b4ca0d4ULL, "line-file", 54883661); - - StartCU(); - DeclarationDIE(&root_handler_, 0xcd3c51b946fb1eeeLL, - dwarf2reader::DW_TAG_subprogram, "declaration-name"); - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0xcd3c51b946fb1eeeLL, "", - 0x93cd3dfc1aa10097ULL, 0x0397d47a0b4ca0d4ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "declaration-name", - 0x93cd3dfc1aa10097ULL, 0x0397d47a0b4ca0d4ULL); -} - -TEST_F(Specifications, MemberFunction) { - PushLine(0x3341a248634e7170ULL, 0x5f6938ee5553b953ULL, "line-file", 18116691); - - StartCU(); - DIEHandler *class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, "class_A"); - DeclarationDIE(class_handler, 0x7d83028c431406e8ULL, - dwarf2reader::DW_TAG_subprogram, "declaration-name"); - class_handler->Finish(); - delete class_handler; - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0x7d83028c431406e8ULL, "", - 0x3341a248634e7170ULL, 0x5f6938ee5553b953ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "class_A::declaration-name", - 0x3341a248634e7170ULL, 0x5f6938ee5553b953ULL); -} - -// This case should gather the name from both the definition and the -// declaration's parent. -TEST_F(Specifications, FunctionDeclarationParent) { - PushLine(0x463c9ddf405be227ULL, 0x6a47774af5049680ULL, "line-file", 70254922); - - StartCU(); - { - DIEHandler *class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - "class_A"); - ASSERT_TRUE(class_handler != NULL); - DeclarationDIE(class_handler, 0x0e0e877c8404544aULL, - dwarf2reader::DW_TAG_subprogram, "declaration-name"); - class_handler->Finish(); - delete class_handler; - } - - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0x0e0e877c8404544aULL, "definition-name", - 0x463c9ddf405be227ULL, 0x6a47774af5049680ULL); - - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "class_A::definition-name", - 0x463c9ddf405be227ULL, 0x6a47774af5049680ULL); -} - -// Named scopes should also gather enclosing name components from -// their declarations. -TEST_F(Specifications, NamedScopeDeclarationParent) { - PushLine(0x5d13433d0df13d00ULL, 0x48ebebe5ade2cab4ULL, "line-file", 77392604); - - StartCU(); - { - DIEHandler *space_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_namespace, - "space_A"); - ASSERT_TRUE(space_handler != NULL); - DeclarationDIE(space_handler, 0x419bb1d12f9a73a2ULL, - dwarf2reader::DW_TAG_class_type, "class-declaration-name"); - space_handler->Finish(); - delete space_handler; - } - - { - DIEHandler *class_handler - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - 0x419bb1d12f9a73a2ULL, "class-definition-name"); - ASSERT_TRUE(class_handler != NULL); - DefineFunction(class_handler, "function", - 0x5d13433d0df13d00ULL, 0x48ebebe5ade2cab4ULL); - class_handler->Finish(); - delete class_handler; - } - - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "space_A::class-definition-name::function", - 0x5d13433d0df13d00ULL, 0x48ebebe5ade2cab4ULL); -} - -// This test recreates bug 364. -TEST_F(Specifications, InlineFunction) { - PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118); - - StartCU(); - DeclarationDIE(&root_handler_, 0xcd3c51b946fb1eeeLL, - dwarf2reader::DW_TAG_subprogram, "inline-name"); - AbstractInstanceDIE(&root_handler_, 0x1e8dac5d507ed7abULL, - dwarf2reader::DW_INL_inlined, 0xcd3c51b946fb1eeeLL, ""); - DefineInlineInstanceDIE(&root_handler_, "", 0x1e8dac5d507ed7abULL, - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "inline-name", - 0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL); -} - -// Check name construction for a long chain containing each combination of: -// - struct, union, class, namespace -// - direct and definition -TEST_F(Specifications, LongChain) { - PushLine(0x5a0dd6bb85db754cULL, 0x3bccb213d08c7fd3ULL, "line-file", 21192926); - SetLanguage(dwarf2reader::DW_LANG_C_plus_plus); - - StartCU(); - // The structure we're building here is: - // space_A full definition - // space_B declaration - // space_B definition - // struct_C full definition - // struct_D declaration - // struct_D definition - // union_E full definition - // union_F declaration - // union_F definition - // class_G full definition - // class_H declaration - // class_H definition - // func_I declaration - // func_I definition - // - // So: - // - space_A, struct_C, union_E, and class_G don't use specifications; - // - space_B, struct_D, union_F, and class_H do. - // - func_I uses a specification. - // - // The full name for func_I is thus: - // - // space_A::space_B::struct_C::struct_D::union_E::union_F:: - // class_G::class_H::func_I - { - DIEHandler *space_A_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_namespace, - "space_A"); - DeclarationDIE(space_A_handler, 0x2e111126496596e2ULL, - dwarf2reader::DW_TAG_namespace, "space_B"); - space_A_handler->Finish(); - delete space_A_handler; - } - - { - DIEHandler *space_B_handler - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_namespace, - 0x2e111126496596e2ULL); - DIEHandler *struct_C_handler - = StartNamedDIE(space_B_handler, dwarf2reader::DW_TAG_structure_type, - "struct_C"); - DeclarationDIE(struct_C_handler, 0x20cd423bf2a25a4cULL, - dwarf2reader::DW_TAG_structure_type, "struct_D"); - struct_C_handler->Finish(); - delete struct_C_handler; - space_B_handler->Finish(); - delete space_B_handler; - } - - { - DIEHandler *struct_D_handler - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_structure_type, - 0x20cd423bf2a25a4cULL); - DIEHandler *union_E_handler - = StartNamedDIE(struct_D_handler, dwarf2reader::DW_TAG_union_type, - "union_E"); - DeclarationDIE(union_E_handler, 0xe25c84805aa58c32ULL, - dwarf2reader::DW_TAG_union_type, "union_F"); - union_E_handler->Finish(); - delete union_E_handler; - struct_D_handler->Finish(); - delete struct_D_handler; - } - - { - DIEHandler *union_F_handler - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_union_type, - 0xe25c84805aa58c32ULL); - DIEHandler *class_G_handler - = StartNamedDIE(union_F_handler, dwarf2reader::DW_TAG_class_type, - "class_G"); - DeclarationDIE(class_G_handler, 0xb70d960dcc173b6eULL, - dwarf2reader::DW_TAG_class_type, "class_H"); - class_G_handler->Finish(); - delete class_G_handler; - union_F_handler->Finish(); - delete union_F_handler; - } - - { - DIEHandler *class_H_handler - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - 0xb70d960dcc173b6eULL); - DeclarationDIE(class_H_handler, 0x27ff829e3bf69f37ULL, - dwarf2reader::DW_TAG_subprogram, "func_I"); - class_H_handler->Finish(); - delete class_H_handler; - } - - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0x27ff829e3bf69f37ULL, "", - 0x5a0dd6bb85db754cULL, 0x3bccb213d08c7fd3ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "space_A::space_B::struct_C::struct_D::union_E::union_F" - "::class_G::class_H::func_I", - 0x5a0dd6bb85db754cULL, 0x3bccb213d08c7fd3ULL); -} - -TEST_F(Specifications, InterCU) { - Module m("module-name", "module-os", "module-arch", "module-id"); - DwarfCUToModule::FileContext fc("dwarf-filename", &m); - EXPECT_CALL(reporter_, UncoveredFunction(_)).WillOnce(Return()); - MockLineToModuleFunctor lr; - EXPECT_CALL(lr, mock_apply(_,_,_,_)).Times(0); - dwarf2reader::AttributeList no_attrs; - - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); - - // First CU. Declares class_A. - { - DwarfCUToModule root1_handler(&fc, &lr, &reporter_); - ASSERT_TRUE(root1_handler.StartCompilationUnit(0, 1, 2, 3, 3)); - dwarf2reader::AttributeList attrs; - PushBackStrangeAttributes(&attrs); - ASSERT_TRUE(root1_handler.StartRootDIE(1, dwarf2reader::DW_TAG_compile_unit, - attrs)); - ProcessStrangeAttributes(&root1_handler); - ASSERT_TRUE(root1_handler.EndAttributes()); - DeclarationDIE(&root1_handler, 0xb8fbfdd5f0b26fceULL, - dwarf2reader::DW_TAG_class_type, "class_A"); - root1_handler.Finish(); - } - - // Second CU. Defines class_A, declares member_func_B. - { - DwarfCUToModule root2_handler(&fc, &lr, &reporter_); - ASSERT_TRUE(root2_handler.StartCompilationUnit(0, 1, 2, 3, 3)); - ASSERT_TRUE(root2_handler.StartRootDIE(1, dwarf2reader::DW_TAG_compile_unit, - no_attrs)); - ASSERT_TRUE(root2_handler.EndAttributes()); - DIEHandler *class_A_handler - = StartSpecifiedDIE(&root2_handler, dwarf2reader::DW_TAG_class_type, - 0xb8fbfdd5f0b26fceULL); - DeclarationDIE(class_A_handler, 0xb01fef8b380bd1a2ULL, - dwarf2reader::DW_TAG_subprogram, "member_func_B"); - class_A_handler->Finish(); - delete class_A_handler; - root2_handler.Finish(); - } - - // Third CU. Defines member_func_B. - { - DwarfCUToModule root3_handler(&fc, &lr, &reporter_); - ASSERT_TRUE(root3_handler.StartCompilationUnit(0, 1, 2, 3, 3)); - ASSERT_TRUE(root3_handler.StartRootDIE(1, dwarf2reader::DW_TAG_compile_unit, - no_attrs)); - ASSERT_TRUE(root3_handler.EndAttributes()); - DefinitionDIE(&root3_handler, dwarf2reader::DW_TAG_subprogram, - 0xb01fef8b380bd1a2ULL, "", - 0x2618f00a1a711e53ULL, 0x4fd94b76d7c2caf5ULL); - root3_handler.Finish(); - } - - vector functions; - m.GetFunctions(&functions, functions.end()); - EXPECT_EQ(1U, functions.size()); - EXPECT_STREQ("class_A::member_func_B", functions[0]->name.c_str()); -} - -TEST_F(Specifications, BadOffset) { - PushLine(0xa0277efd7ce83771ULL, 0x149554a184c730c1ULL, "line-file", 56636272); - EXPECT_CALL(reporter_, UnknownSpecification(_, 0x2be953efa6f9a996ULL)) - .WillOnce(Return()); - - StartCU(); - DeclarationDIE(&root_handler_, 0xefd7f7752c27b7e4ULL, - dwarf2reader::DW_TAG_subprogram, ""); - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0x2be953efa6f9a996ULL, "function", - 0xa0277efd7ce83771ULL, 0x149554a184c730c1ULL); - root_handler_.Finish(); -} - -TEST_F(Specifications, FunctionDefinitionHasOwnName) { - PushLine(0xced50b3eea81022cULL, 0x08dd4d301cc7a7d2ULL, "line-file", 56792403); - - StartCU(); - DeclarationDIE(&root_handler_, 0xc34ff4786cae78bdULL, - dwarf2reader::DW_TAG_subprogram, "declaration-name"); - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0xc34ff4786cae78bdULL, "definition-name", - 0xced50b3eea81022cULL, 0x08dd4d301cc7a7d2ULL); - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "definition-name", - 0xced50b3eea81022cULL, 0x08dd4d301cc7a7d2ULL); -} - -TEST_F(Specifications, ClassDefinitionHasOwnName) { - PushLine(0x1d0f5e0f6ce309bdULL, 0x654e1852ec3599e7ULL, "line-file", 57119241); - - StartCU(); - DeclarationDIE(&root_handler_, 0xd0fe467ec2f1a58cULL, - dwarf2reader::DW_TAG_class_type, "class-declaration-name"); - - dwarf2reader::DIEHandler *class_definition - = StartSpecifiedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - 0xd0fe467ec2f1a58cULL, "class-definition-name"); - ASSERT_TRUE(class_definition); - DeclarationDIE(class_definition, 0x6d028229c15623dbULL, - dwarf2reader::DW_TAG_subprogram, - "function-declaration-name"); - class_definition->Finish(); - delete class_definition; - - DefinitionDIE(&root_handler_, dwarf2reader::DW_TAG_subprogram, - 0x6d028229c15623dbULL, "function-definition-name", - 0x1d0f5e0f6ce309bdULL, 0x654e1852ec3599e7ULL); - - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "class-definition-name::function-definition-name", - 0x1d0f5e0f6ce309bdULL, 0x654e1852ec3599e7ULL); -} - -// DIEs that cite a specification should prefer the specification's -// parents over their own when choosing qualified names. In this test, -// we take the name from our definition but the enclosing scope name -// from our declaration. I don't see why they'd ever be different, but -// we want to verify what DwarfCUToModule is looking at. -TEST_F(Specifications, PreferSpecificationParents) { - PushLine(0xbbd9d54dce3b95b7ULL, 0x39188b7b52b0899fULL, "line-file", 79488694); - - StartCU(); - { - dwarf2reader::DIEHandler *declaration_class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, "declaration-class"); - DeclarationDIE(declaration_class_handler, 0x9ddb35517455ef7aULL, - dwarf2reader::DW_TAG_subprogram, "function-declaration"); - declaration_class_handler->Finish(); - delete declaration_class_handler; - } - { - dwarf2reader::DIEHandler *definition_class_handler - = StartNamedDIE(&root_handler_, dwarf2reader::DW_TAG_class_type, - "definition-class"); - DefinitionDIE(definition_class_handler, dwarf2reader::DW_TAG_subprogram, - 0x9ddb35517455ef7aULL, "function-definition", - 0xbbd9d54dce3b95b7ULL, 0x39188b7b52b0899fULL); - definition_class_handler->Finish(); - delete definition_class_handler; - } - root_handler_.Finish(); - - TestFunctionCount(1); - TestFunction(0, "declaration-class::function-definition", - 0xbbd9d54dce3b95b7ULL, 0x39188b7b52b0899fULL); -} - -class CUErrors: public CUFixtureBase, public Test { }; - -TEST_F(CUErrors, BadStmtList) { - EXPECT_CALL(reporter_, BadLineInfoOffset(dummy_line_size_ + 10)).Times(1); - - ASSERT_TRUE(root_handler_ - .StartCompilationUnit(0xc591d5b037543d7cULL, 0x11, 0xcd, - 0x2d7d19546cf6590cULL, 3)); - dwarf2reader::AttributeList attrs; - attrs.push_back(make_pair(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp)); - attrs.push_back(make_pair(dwarf2reader::DW_AT_stmt_list, - dwarf2reader::DW_FORM_ref4)); - ASSERT_TRUE(root_handler_.StartRootDIE(0xae789dc102cfca54ULL, - dwarf2reader::DW_TAG_compile_unit, - attrs)); - root_handler_.ProcessAttributeString(dwarf2reader::DW_AT_name, - dwarf2reader::DW_FORM_strp, - "compilation-unit-name"); - root_handler_.ProcessAttributeUnsigned(dwarf2reader::DW_AT_stmt_list, - dwarf2reader::DW_FORM_ref4, - dummy_line_size_ + 10); - root_handler_.EndAttributes(); - root_handler_.Finish(); -} - -TEST_F(CUErrors, NoLineSection) { - EXPECT_CALL(reporter_, MissingSection(".debug_line")).Times(1); - PushLine(0x88507fb678052611ULL, 0x42c8e9de6bbaa0faULL, "line-file", 64472290); - // Delete the entry for .debug_line added by the fixture class's constructor. - file_context_.section_map.clear(); - - StartCU(); - root_handler_.Finish(); -} - -TEST_F(CUErrors, BadDwarfVersion1) { - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); - - ASSERT_FALSE(root_handler_ - .StartCompilationUnit(0xadf6e0eb71e2b0d9ULL, 0x4d, 0x90, - 0xc9de224ccb99ac3eULL, 1)); -} - -TEST_F(CUErrors, GoodDwarfVersion2) { - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); - - ASSERT_TRUE(root_handler_ - .StartCompilationUnit(0xadf6e0eb71e2b0d9ULL, 0x4d, 0x90, - 0xc9de224ccb99ac3eULL, 2)); -} - -TEST_F(CUErrors, GoodDwarfVersion3) { - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); - - ASSERT_TRUE(root_handler_ - .StartCompilationUnit(0xadf6e0eb71e2b0d9ULL, 0x4d, 0x90, - 0xc9de224ccb99ac3eULL, 3)); -} - -TEST_F(CUErrors, BadCURootDIETag) { - // Kludge: satisfy reporter_'s expectation. - reporter_.SetCUName("compilation-unit-name"); - - ASSERT_TRUE(root_handler_ - .StartCompilationUnit(0xadf6e0eb71e2b0d9ULL, 0x4d, 0x90, - 0xc9de224ccb99ac3eULL, 3)); - - dwarf2reader::AttributeList no_attrs; - ASSERT_FALSE(root_handler_.StartRootDIE(0x02e56bfbda9e7337ULL, - dwarf2reader::DW_TAG_subprogram, - no_attrs)); -} - -// Tests for DwarfCUToModule::Reporter. These just produce (or fail to -// produce) output, so their results need to be checked by hand. -struct Reporter: public Test { - Reporter() - : reporter("filename", 0x123456789abcdef0ULL) { - reporter.SetCUName("compilation-unit-name"); - - function.name = "function name"; - function.address = 0x19c45c30770c1eb0ULL; - function.size = 0x89808a5bdfa0a6a3ULL; - function.parameter_size = 0x6a329f18683dcd51ULL; - - file.name = "source file name"; - - line.address = 0x3606ac6267aebeccULL; - line.size = 0x5de482229f32556aULL; - line.file = &file; - line.number = 93400201; - } - - DwarfCUToModule::WarningReporter reporter; - Module::Function function; - Module::File file; - Module::Line line; -}; - -TEST_F(Reporter, UnknownSpecification) { - reporter.UnknownSpecification(0x123456789abcdef1ULL, 0x323456789abcdef2ULL); -} - -TEST_F(Reporter, UnknownAbstractOrigin) { - reporter.UnknownAbstractOrigin(0x123456789abcdef1ULL, 0x323456789abcdef2ULL); -} - -TEST_F(Reporter, MissingSection) { - reporter.MissingSection("section name"); -} - -TEST_F(Reporter, BadLineInfoOffset) { - reporter.BadLineInfoOffset(0x123456789abcdef1ULL); -} - -TEST_F(Reporter, UncoveredFunctionDisabled) { - reporter.UncoveredFunction(function); - EXPECT_FALSE(reporter.uncovered_warnings_enabled()); -} - -TEST_F(Reporter, UncoveredFunctionEnabled) { - reporter.set_uncovered_warnings_enabled(true); - reporter.UncoveredFunction(function); - EXPECT_TRUE(reporter.uncovered_warnings_enabled()); -} - -TEST_F(Reporter, UncoveredLineDisabled) { - reporter.UncoveredLine(line); - EXPECT_FALSE(reporter.uncovered_warnings_enabled()); -} - -TEST_F(Reporter, UncoveredLineEnabled) { - reporter.set_uncovered_warnings_enabled(true); - reporter.UncoveredLine(line); - EXPECT_TRUE(reporter.uncovered_warnings_enabled()); -} - -TEST_F(Reporter, UnnamedFunction) { - reporter.UnnamedFunction(0x90c0baff9dedb2d9ULL); -} - -// Would be nice to also test: -// - overlapping lines, functions diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.cc deleted file mode 100644 index 75afd93c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf_line_to_module.cc: Implementation of DwarfLineToModule class. -// See dwarf_line_to_module.h for details. - -#include "common/dwarf_line_to_module.h" - -// Trying to support Windows paths in a reasonable way adds a lot of -// variations to test; it would be better to just put off dealing with -// it until we actually have to deal with DWARF on Windows. - -// Return true if PATH is an absolute path, false if it is relative. -static bool PathIsAbsolute(const string &path) { - return (path.size() >= 1 && path[0] == '/'); -} - -// If PATH is an absolute path, return PATH. If PATH is a relative path, -// treat it as relative to BASE and return the combined path. -static string ExpandPath(const string &path, const string &base) { - if (PathIsAbsolute(path)) - return path; - return base + "/" + path; -} - -namespace google_breakpad { - -void DwarfLineToModule::DefineDir(const string &name, uint32 dir_num) { - // Directory number zero is reserved to mean the compilation - // directory. Silently ignore attempts to redefine it. - if (dir_num != 0) - directories_[dir_num] = name; -} - -void DwarfLineToModule::DefineFile(const string &name, int32 file_num, - uint32 dir_num, uint64 mod_time, - uint64 length) { - if (file_num == -1) - file_num = ++highest_file_number_; - else if (file_num > highest_file_number_) - highest_file_number_ = file_num; - - std::string full_name; - if (dir_num != 0) { - DirectoryTable::const_iterator directory_it = directories_.find(dir_num); - if (directory_it != directories_.end()) { - full_name = ExpandPath(name, directory_it->second); - } else { - if (!warned_bad_directory_number_) { - fprintf(stderr, "warning: DWARF line number data refers to undefined" - " directory numbers\n"); - warned_bad_directory_number_ = true; - } - full_name = name; // just treat name as relative - } - } else { - // Directory number zero is the compilation directory; we just report - // relative paths in that case. - full_name = name; - } - - // Find a Module::File object of the given name, and add it to the - // file table. - files_[file_num] = module_->FindFile(full_name); -} - -void DwarfLineToModule::AddLine(uint64 address, uint64 length, - uint32 file_num, uint32 line_num, - uint32 column_num) { - if (length == 0) - return; - - // Clip lines not to extend beyond the end of the address space. - if (address + length < address) - length = -address; - - // Should we omit this line? (See the comments for omitted_line_end_.) - if (address == 0 || address == omitted_line_end_) { - omitted_line_end_ = address + length; - return; - } else { - omitted_line_end_ = 0; - } - - // Find the source file being referred to. - Module::File *file = files_[file_num]; - if (!file) { - if (!warned_bad_file_number_) { - fprintf(stderr, "warning: DWARF line number data refers to " - "undefined file numbers\n"); - warned_bad_file_number_ = true; - } - return; - } - Module::Line line; - line.address = address; - // We set the size when we get the next line or the EndSequence call. - line.size = length; - line.file = file; - line.number = line_num; - lines_->push_back(line); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.h deleted file mode 100644 index 49b3eb35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module.h +++ /dev/null @@ -1,179 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// The DwarfLineToModule class accepts line number information from a -// DWARF parser and adds it to a google_breakpad::Module. The Module -// can write that data out as a Breakpad symbol file. - -#ifndef COMMON_LINUX_DWARF_LINE_TO_MODULE_H -#define COMMON_LINUX_DWARF_LINE_TO_MODULE_H - -#include "common/module.h" -#include "common/dwarf/dwarf2reader.h" - -namespace google_breakpad { - -// A class for producing a vector of google_breakpad::Module::Line -// instances from parsed DWARF line number data. -// -// An instance of this class can be provided as a handler to a -// dwarf2reader::LineInfo DWARF line number information parser. The -// handler accepts source location information from the parser and -// uses it to produce a vector of google_breakpad::Module::Line -// objects, referring to google_breakpad::Module::File objects added -// to a particular google_breakpad::Module. -// -// GNU toolchain omitted sections support: -// ====================================== -// -// Given the right options, the GNU toolchain will omit unreferenced -// functions from the final executable. Unfortunately, when it does so, it -// does not remove the associated portions of the DWARF line number -// program; instead, it gives the DW_LNE_set_address instructions referring -// to the now-deleted code addresses of zero. Given this input, the DWARF -// line parser will call AddLine with a series of lines starting at address -// zero. For example, here is the output from 'readelf -wl' for a program -// with four functions, the first three of which have been omitted: -// -// Line Number Statements: -// Extended opcode 2: set Address to 0x0 -// Advance Line by 14 to 15 -// Copy -// Special opcode 48: advance Address by 3 to 0x3 and Line by 1 to 16 -// Special opcode 119: advance Address by 8 to 0xb and Line by 2 to 18 -// Advance PC by 2 to 0xd -// Extended opcode 1: End of Sequence -// -// Extended opcode 2: set Address to 0x0 -// Advance Line by 14 to 15 -// Copy -// Special opcode 48: advance Address by 3 to 0x3 and Line by 1 to 16 -// Special opcode 119: advance Address by 8 to 0xb and Line by 2 to 18 -// Advance PC by 2 to 0xd -// Extended opcode 1: End of Sequence -// -// Extended opcode 2: set Address to 0x0 -// Advance Line by 19 to 20 -// Copy -// Special opcode 48: advance Address by 3 to 0x3 and Line by 1 to 21 -// Special opcode 76: advance Address by 5 to 0x8 and Line by 1 to 22 -// Advance PC by 2 to 0xa -// Extended opcode 1: End of Sequence -// -// Extended opcode 2: set Address to 0x80483a4 -// Advance Line by 23 to 24 -// Copy -// Special opcode 202: advance Address by 14 to 0x80483b2 and Line by 1 to 25 -// Special opcode 76: advance Address by 5 to 0x80483b7 and Line by 1 to 26 -// Advance PC by 6 to 0x80483bd -// Extended opcode 1: End of Sequence -// -// Instead of collecting runs of lines describing code that is not there, -// we try to recognize and drop them. Since the linker doesn't explicitly -// distinguish references to dropped sections from genuine references to -// code at address zero, we must use a heuristic. We have chosen: -// -// - If a line starts at address zero, omit it. (On the platforms -// breakpad targets, it is extremely unlikely that there will be code -// at address zero.) -// -// - If a line starts immediately after an omitted line, omit it too. -class DwarfLineToModule: public dwarf2reader::LineInfoHandler { - public: - // As the DWARF line info parser passes us line records, add source - // files to MODULE, and add all lines to the end of LINES. LINES - // need not be empty. If the parser hands us a zero-length line, we - // omit it. If the parser hands us a line that extends beyond the - // end of the address space, we clip it. It's up to our client to - // sort out which lines belong to which functions; we don't add them - // to any particular function in MODULE ourselves. - DwarfLineToModule(Module *module, vector *lines) - : module_(module), - lines_(lines), - highest_file_number_(-1), - omitted_line_end_(0), - warned_bad_file_number_(false), - warned_bad_directory_number_(false) { } - - ~DwarfLineToModule() { } - - void DefineDir(const std::string &name, uint32 dir_num); - void DefineFile(const std::string &name, int32 file_num, - uint32 dir_num, uint64 mod_time, - uint64 length); - void AddLine(uint64 address, uint64 length, - uint32 file_num, uint32 line_num, uint32 column_num); - - private: - - typedef std::map DirectoryTable; - typedef std::map FileTable; - - // The module we're contributing debugging info to. Owned by our - // client. - Module *module_; - - // The vector of lines we're accumulating. Owned by our client. - // - // In a Module, as in a breakpad symbol file, lines belong to - // specific functions, but DWARF simply assigns lines to addresses; - // one must infer the line/function relationship using the - // functions' beginning and ending addresses. So we can't add these - // to the appropriate function from module_ until we've read the - // function info as well. Instead, we accumulate lines here, and let - // whoever constructed this sort it all out. - vector *lines_; - - // A table mapping directory numbers to paths. - DirectoryTable directories_; - - // A table mapping file numbers to Module::File pointers. - FileTable files_; - - // The highest file number we've seen so far, or -1 if we've seen - // none. Used for dynamically defined file numbers. - int32 highest_file_number_; - - // This is the ending address of the last line we omitted, or zero if we - // didn't omit the previous line. It is zero before we have received any - // AddLine calls. - uint64 omitted_line_end_; - - // True if we've warned about: - bool warned_bad_file_number_; // bad file numbers - bool warned_bad_directory_number_; // bad directory numbers -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DWARF_LINE_TO_MODULE_H diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module_unittest.cc deleted file mode 100644 index 82bef685..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/dwarf_line_to_module_unittest.cc +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dwarf_line_to_module.cc: Unit tests for google_breakpad::DwarfLineToModule. - -#include "breakpad_googletest_includes.h" -#include "common/dwarf_line_to_module.h" - -using google_breakpad::DwarfLineToModule; -using google_breakpad::Module; -using google_breakpad::Module; - -TEST(SimpleModule, One) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("file1", 0x30bf0f27, 0, 0, 0); - h.AddLine(0x6fd126fbf74f2680LL, 0x63c9a14cf556712bLL, 0x30bf0f27, - 0x4c090cbf, 0x1cf9fe0d); - - vector files; - m.GetFiles(&files); - EXPECT_EQ(1U, files.size()); - EXPECT_STREQ("file1", files[0]->name.c_str()); - - EXPECT_EQ(1U, lines.size()); - EXPECT_EQ(0x6fd126fbf74f2680ULL, lines[0].address); - EXPECT_EQ(0x63c9a14cf556712bULL, lines[0].size); - EXPECT_TRUE(lines[0].file == files[0]); - EXPECT_EQ(0x4c090cbf, lines[0].number); -} - -TEST(SimpleModule, Many) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory1", 0x838299ab); - h.DefineDir("directory2", 0xf85de023); - h.DefineFile("file1", 0x2b80377a, 0x838299ab, 0, 0); - h.DefineFile("file1", 0x63beb4a4, 0xf85de023, 0, 0); - h.DefineFile("file2", 0x1d161d56, 0x838299ab, 0, 0); - h.DefineFile("file2", 0x1e7a667c, 0xf85de023, 0, 0); - h.AddLine(0x69900c5d553b7274ULL, 0x90fded183f0d0d3cULL, 0x2b80377a, - 0x15b0f0a9U, 0x3ff5abd6U); - h.AddLine(0x45811219a39b7101ULL, 0x25a5e6a924afc41fULL, 0x63beb4a4, - 0x4d259ce9U, 0x41c5ee32U); - h.AddLine(0xfa90514c1dc9704bULL, 0x0063efeabc02f313ULL, 0x1d161d56, - 0x1ee9fa4fU, 0xbf70e46aU); - h.AddLine(0x556b55fb6a647b10ULL, 0x3f3089ca2bfd80f5ULL, 0x1e7a667c, - 0x77fc280eU, 0x2c4a728cU); - h.DefineFile("file3", -1, 0, 0, 0); - h.AddLine(0xe2d72a37f8d9403aULL, 0x034dfab5b0d4d236ULL, 0x63beb4a5, - 0x75047044U, 0xb6a0016cU); - - vector files; - m.GetFiles(&files); - ASSERT_EQ(5U, files.size()); - EXPECT_STREQ("directory1/file1", files[0]->name.c_str()); - EXPECT_STREQ("directory1/file2", files[1]->name.c_str()); - EXPECT_STREQ("directory2/file1", files[2]->name.c_str()); - EXPECT_STREQ("directory2/file2", files[3]->name.c_str()); - EXPECT_STREQ("file3", files[4]->name.c_str()); - - ASSERT_EQ(5U, lines.size()); - - EXPECT_EQ(0x69900c5d553b7274ULL, lines[0].address); - EXPECT_EQ(0x90fded183f0d0d3cULL, lines[0].size); - EXPECT_TRUE(lines[0].file == files[0]); - EXPECT_EQ(0x15b0f0a9, lines[0].number); - - EXPECT_EQ(0x45811219a39b7101ULL, lines[1].address); - EXPECT_EQ(0x25a5e6a924afc41fULL, lines[1].size); - EXPECT_TRUE(lines[1].file == files[2]); - EXPECT_EQ(0x4d259ce9, lines[1].number); - - EXPECT_EQ(0xfa90514c1dc9704bULL, lines[2].address); - EXPECT_EQ(0x0063efeabc02f313ULL, lines[2].size); - EXPECT_TRUE(lines[2].file == files[1]); - EXPECT_EQ(0x1ee9fa4f, lines[2].number); - - EXPECT_EQ(0x556b55fb6a647b10ULL, lines[3].address); - EXPECT_EQ(0x3f3089ca2bfd80f5ULL, lines[3].size); - EXPECT_TRUE(lines[3].file == files[3]); - EXPECT_EQ(0x77fc280e, lines[3].number); - - EXPECT_EQ(0xe2d72a37f8d9403aULL, lines[4].address); - EXPECT_EQ(0x034dfab5b0d4d236ULL, lines[4].size); - EXPECT_TRUE(lines[4].file == files[4]); - EXPECT_EQ(0x75047044, lines[4].number); -} - -TEST(Filenames, Absolute) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory1", 1); - h.DefineFile("/absolute", 1, 1, 0, 0); - - h.AddLine(1, 1, 1, 0, 0); - - vector files; - m.GetFiles(&files); - ASSERT_EQ(1U, files.size()); - EXPECT_STREQ("/absolute", files[0]->name.c_str()); - ASSERT_EQ(1U, lines.size()); - EXPECT_TRUE(lines[0].file == files[0]); -} - -TEST(Filenames, Relative) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory1", 1); - h.DefineFile("relative", 1, 1, 0, 0); - - h.AddLine(1, 1, 1, 0, 0); - - vector files; - m.GetFiles(&files); - ASSERT_EQ(1U, files.size()); - EXPECT_STREQ("directory1/relative", files[0]->name.c_str()); - ASSERT_EQ(1U, lines.size()); - EXPECT_TRUE(lines[0].file == files[0]); -} - -TEST(Filenames, StrangeFile) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory1", 1); - h.DefineFile("", 1, 1, 0, 0); - h.AddLine(1, 1, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_STREQ("directory1/", lines[0].file->name.c_str()); -} - -TEST(Filenames, StrangeDirectory) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("", 1); - h.DefineFile("file1", 1, 1, 0, 0); - h.AddLine(1, 1, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_STREQ("/file1", lines[0].file->name.c_str()); -} - -TEST(Filenames, StrangeDirectoryAndFile) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("", 1); - h.DefineFile("", 1, 1, 0, 0); - h.AddLine(1, 1, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_STREQ("/", lines[0].file->name.c_str()); -} - -// We should silently ignore attempts to define directory number zero, -// since that is always the compilation directory. -TEST(ModuleErrors, DirectoryZero) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory0", 0); // should be ignored - h.DefineFile("relative", 1, 0, 0, 0); - - h.AddLine(1, 1, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_STREQ("relative", lines[0].file->name.c_str()); -} - -// We should refuse to add lines with bogus file numbers. We should -// produce only one warning, however. -TEST(ModuleErrors, BadFileNumber) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("relative", 1, 0, 0, 0); - h.AddLine(1, 1, 2, 0, 0); // bad file number - h.AddLine(2, 1, 2, 0, 0); // bad file number (no duplicate warning) - - EXPECT_EQ(0U, lines.size()); -} - -// We should treat files with bogus directory numbers as relative to -// the compilation unit. -TEST(ModuleErrors, BadDirectoryNumber) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineDir("directory1", 1); - h.DefineFile("baddirnumber1", 1, 2, 0, 0); // bad directory number - h.DefineFile("baddirnumber2", 2, 2, 0, 0); // bad dir number (no warning) - h.AddLine(1, 1, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_STREQ("baddirnumber1", lines[0].file->name.c_str()); -} - -// We promise not to report empty lines. -TEST(ModuleErrors, EmptyLine) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(1, 0, 1, 0, 0); - - ASSERT_EQ(0U, lines.size()); -} - -// We are supposed to clip lines that extend beyond the end of the -// address space. -TEST(ModuleErrors, BigLine) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(0xffffffffffffffffULL, 2, 1, 0, 0); - - ASSERT_EQ(1U, lines.size()); - EXPECT_EQ(1U, lines[0].size); -} - -// The 'Omitted' tests verify that we correctly omit line information -// for code in sections that the linker has dropped. See "GNU -// toolchain omitted sections support" at the top of the -// DwarfLineToModule class. - -TEST(Omitted, DroppedThenGood) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(0, 10, 1, 83816211, 0); // should be omitted - h.AddLine(20, 10, 1, 13059195, 0); // should be recorded - - ASSERT_EQ(1U, lines.size()); - EXPECT_EQ(13059195, lines[0].number); -} - -TEST(Omitted, GoodThenDropped) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(0x9dd6a372, 10, 1, 41454594, 0); // should be recorded - h.AddLine(0, 10, 1, 44793413, 0); // should be omitted - - ASSERT_EQ(1U, lines.size()); - EXPECT_EQ(41454594, lines[0].number); -} - -TEST(Omitted, Mix1) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(0x679ed72f, 10, 1, 58932642, 0); // should be recorded - h.AddLine(0xdfb5a72d, 10, 1, 39847385, 0); // should be recorded - h.AddLine(0, 0x78, 1, 23053829, 0); // should be omitted - h.AddLine(0x78, 0x6a, 1, 65317783, 0); // should be omitted - h.AddLine(0x78 + 0x6a, 0x2a, 1, 77601423, 0); // should be omitted - h.AddLine(0x9fe0cea5, 10, 1, 91806582, 0); // should be recorded - h.AddLine(0x7e41a109, 10, 1, 56169221, 0); // should be recorded - - ASSERT_EQ(4U, lines.size()); - EXPECT_EQ(58932642, lines[0].number); - EXPECT_EQ(39847385, lines[1].number); - EXPECT_EQ(91806582, lines[2].number); - EXPECT_EQ(56169221, lines[3].number); -} - -TEST(Omitted, Mix2) { - Module m("name", "os", "architecture", "id"); - vector lines; - DwarfLineToModule h(&m, &lines); - - h.DefineFile("filename1", 1, 0, 0, 0); - h.AddLine(0, 0xf2, 1, 58802211, 0); // should be omitted - h.AddLine(0xf2, 0xb9, 1, 78958222, 0); // should be omitted - h.AddLine(0xf2 + 0xb9, 0xf7, 1, 64861892, 0); // should be omitted - h.AddLine(0x4e4d271e, 9, 1, 67355743, 0); // should be recorded - h.AddLine(0xdfb5a72d, 30, 1, 23365776, 0); // should be recorded - h.AddLine(0, 0x64, 1, 76196762, 0); // should be omitted - h.AddLine(0x64, 0x33, 1, 71066611, 0); // should be omitted - h.AddLine(0x64 + 0x33, 0xe3, 1, 61749337, 0); // should be omitted - - ASSERT_EQ(2U, lines.size()); - EXPECT_EQ(67355743, lines[0].number); - EXPECT_EQ(23365776, lines[1].number); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.cc deleted file mode 100644 index 4e90d916..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// language.cc: Subclasses and singletons for google_breakpad::Language. -// See language.h for details. - -#include "common/language.h" - -namespace google_breakpad { - -// C++ language-specific operations. -class CPPLanguage: public Language { - public: - CPPLanguage() {} - string MakeQualifiedName(const string &parent_name, - const string &name) const { - if (parent_name.empty()) - return name; - else - return parent_name + "::" + name; - } -}; - -const CPPLanguage CPPLanguageSingleton; - -// Java language-specific operations. -class JavaLanguage: public Language { - public: - string MakeQualifiedName(const string &parent_name, - const string &name) const { - if (parent_name.empty()) - return name; - else - return parent_name + "." + name; - } -}; - -JavaLanguage JavaLanguageSingleton; - -// Assembler language-specific operations. -class AssemblerLanguage: public Language { - bool HasFunctions() const { return false; } - string MakeQualifiedName(const string &parent_name, - const string &name) const { - return name; - } -}; - -AssemblerLanguage AssemblerLanguageSingleton; - -const Language * const Language::CPlusPlus = &CPPLanguageSingleton; -const Language * const Language::Java = &JavaLanguageSingleton; -const Language * const Language::Assembler = &AssemblerLanguageSingleton; - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.h deleted file mode 100644 index 03bdf7f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/language.h +++ /dev/null @@ -1,84 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// language.h: Define google_breakpad::Language. Instances of -// subclasses of this class provide language-appropriate operations -// for the Breakpad symbol dumper. - -#ifndef COMMON_LINUX_LANGUAGE_H__ -#define COMMON_LINUX_LANGUAGE_H__ - -#include - -namespace google_breakpad { - -using std::string; - -// An abstract base class for language-specific operations. We choose -// an instance of a subclass of this when we find the CU's language. -// This class's definitions are appropriate for CUs with no specified -// language. -class Language { - public: - // Return true if this language has functions to which we can assign - // line numbers. (Debugging info for assembly language, for example, - // can have source location information, but does not have functions - // recorded using DW_TAG_subprogram DIEs.) - virtual bool HasFunctions() const { return true; } - - // Construct a fully-qualified, language-appropriate form of NAME, - // given that PARENT_NAME is the name of the construct enclosing - // NAME. If PARENT_NAME is the empty string, then NAME is a - // top-level name. - // - // This API sort of assumes that a fully-qualified name is always - // some simple textual composition of the unqualified name and its - // parent's name, and that we don't need to know anything else about - // the parent or the child (say, their DIEs' tags) to do the job. - // This is true for the languages we support at the moment, and - // keeps things concrete. Perhaps a more refined operation would - // take into account the parent and child DIE types, allow languages - // to use their own data type for complex parent names, etc. But if - // C++ doesn't need all that, who would? - virtual string MakeQualifiedName (const string &parent_name, - const string &name) const = 0; - - // Instances for specific languages. - static const Language * const CPlusPlus, - * const Java, - * const Assembler; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_LANGUAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.cc deleted file mode 100644 index 887880d2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.cc +++ /dev/null @@ -1,758 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Restructured in 2009 by: Jim Blandy - -// dump_symbols.cc: implement google_breakpad::WriteSymbolFile: -// Find all the debugging info in a file and dump it as a Breakpad symbol file. - -#include "common/linux/dump_symbols.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/dwarf2diehandler.h" -#include "common/dwarf_cfi_to_module.h" -#include "common/dwarf_cu_to_module.h" -#include "common/dwarf_line_to_module.h" -#include "common/linux/file_id.h" -#include "common/module.h" -#include "common/stabs_reader.h" -#include "common/stabs_to_module.h" - -// This namespace contains helper functions. -namespace { - -using google_breakpad::DwarfCFIToModule; -using google_breakpad::DwarfCUToModule; -using google_breakpad::DwarfLineToModule; -using google_breakpad::Module; -using google_breakpad::StabsToModule; - -// -// FDWrapper -// -// Wrapper class to make sure opened file is closed. -// -class FDWrapper { - public: - explicit FDWrapper(int fd) : - fd_(fd) {} - ~FDWrapper() { - if (fd_ != -1) - close(fd_); - } - int get() { - return fd_; - } - int release() { - int fd = fd_; - fd_ = -1; - return fd; - } - private: - int fd_; -}; - -// -// MmapWrapper -// -// Wrapper class to make sure mapped regions are unmapped. -// -class MmapWrapper { - public: - MmapWrapper() : is_set_(false) {} - ~MmapWrapper() { - assert(is_set_); - if (base_ != NULL) { - assert(size_ > 0); - munmap(base_, size_); - } - } - void set(void *mapped_address, size_t mapped_size) { - is_set_ = true; - base_ = mapped_address; - size_ = mapped_size; - } - void release() { - assert(is_set_); - base_ = NULL; - size_ = 0; - } - - private: - bool is_set_; - void *base_; - size_t size_; -}; - - -// Fix offset into virtual address by adding the mapped base into offsets. -// Make life easier when want to find something by offset. -static void FixAddress(void *obj_base) { - ElfW(Addr) base = reinterpret_cast(obj_base); - ElfW(Ehdr) *elf_header = static_cast(obj_base); - elf_header->e_phoff += base; - elf_header->e_shoff += base; - ElfW(Shdr) *sections = reinterpret_cast(elf_header->e_shoff); - for (int i = 0; i < elf_header->e_shnum; ++i) - sections[i].sh_offset += base; -} - -// Find the preferred loading address of the binary. -static ElfW(Addr) GetLoadingAddress(const ElfW(Phdr) *program_headers, - int nheader) { - for (int i = 0; i < nheader; ++i) { - const ElfW(Phdr) &header = program_headers[i]; - // For executable, it is the PT_LOAD segment with offset to zero. - if (header.p_type == PT_LOAD && - header.p_offset == 0) - return header.p_vaddr; - } - // For other types of ELF, return 0. - return 0; -} - -static bool IsValidElf(const ElfW(Ehdr) *elf_header) { - return memcmp(elf_header, ELFMAG, SELFMAG) == 0; -} - -static const ElfW(Shdr) *FindSectionByName(const char *name, - const ElfW(Shdr) *sections, - const ElfW(Shdr) *section_names, - int nsection) { - assert(name != NULL); - assert(sections != NULL); - assert(nsection > 0); - - int name_len = strlen(name); - if (name_len == 0) - return NULL; - - // Find the end of the section name section, to make sure that - // comparisons don't run off the end of the section. - const char *names_end = - reinterpret_cast(section_names->sh_offset + section_names->sh_size); - - for (int i = 0; i < nsection; ++i) { - const char *section_name = - reinterpret_cast(section_names->sh_offset + sections[i].sh_name); - if (names_end - section_name >= name_len + 1 && - strcmp(name, section_name) == 0) { - if (sections[i].sh_type == SHT_NOBITS) { - fprintf(stderr, - "Section %s found, but ignored because type=SHT_NOBITS.\n", - name); - return NULL; - } - return sections + i; - } - } - return NULL; -} - -static bool LoadStabs(const ElfW(Ehdr) *elf_header, - const ElfW(Shdr) *stab_section, - const ElfW(Shdr) *stabstr_section, - const bool big_endian, - Module *module) { - // A callback object to handle data from the STABS reader. - StabsToModule handler(module); - // Find the addresses of the STABS data, and create a STABS reader object. - // On Linux, STABS entries always have 32-bit values, regardless of the - // address size of the architecture whose code they're describing, and - // the strings are always "unitized". - uint8_t *stabs = reinterpret_cast(stab_section->sh_offset); - uint8_t *stabstr = reinterpret_cast(stabstr_section->sh_offset); - google_breakpad::StabsReader reader(stabs, stab_section->sh_size, - stabstr, stabstr_section->sh_size, - big_endian, 4, true, &handler); - // Read the STABS data, and do post-processing. - if (!reader.Process()) - return false; - handler.Finalize(); - return true; -} - -// A line-to-module loader that accepts line number info parsed by -// dwarf2reader::LineInfo and populates a Module and a line vector -// with the results. -class DumperLineToModule: public DwarfCUToModule::LineToModuleFunctor { - public: - // Create a line-to-module converter using BYTE_READER. - explicit DumperLineToModule(dwarf2reader::ByteReader *byte_reader) - : byte_reader_(byte_reader) { } - void operator()(const char *program, uint64 length, - Module *module, vector *lines) { - DwarfLineToModule handler(module, lines); - dwarf2reader::LineInfo parser(program, length, byte_reader_, &handler); - parser.Start(); - } - private: - dwarf2reader::ByteReader *byte_reader_; -}; - -static bool LoadDwarf(const string &dwarf_filename, - const ElfW(Ehdr) *elf_header, - const bool big_endian, - Module *module) { - const dwarf2reader::Endianness endianness = big_endian ? - dwarf2reader::ENDIANNESS_BIG : dwarf2reader::ENDIANNESS_LITTLE; - dwarf2reader::ByteReader byte_reader(endianness); - - // Construct a context for this file. - DwarfCUToModule::FileContext file_context(dwarf_filename, module); - - // Build a map of the ELF file's sections. - const ElfW(Shdr) *sections - = reinterpret_cast(elf_header->e_shoff); - int num_sections = elf_header->e_shnum; - const ElfW(Shdr) *section_names = sections + elf_header->e_shstrndx; - for (int i = 0; i < num_sections; i++) { - const ElfW(Shdr) *section = §ions[i]; - string name = reinterpret_cast(section_names->sh_offset - + section->sh_name); - const char *contents = reinterpret_cast(section->sh_offset); - uint64 length = section->sh_size; - file_context.section_map[name] = std::make_pair(contents, length); - } - - // Parse all the compilation units in the .debug_info section. - DumperLineToModule line_to_module(&byte_reader); - std::pair debug_info_section - = file_context.section_map[".debug_info"]; - // We should never have been called if the file doesn't have a - // .debug_info section. - assert(debug_info_section.first); - uint64 debug_info_length = debug_info_section.second; - for (uint64 offset = 0; offset < debug_info_length;) { - // Make a handler for the root DIE that populates MODULE with the - // data we find. - DwarfCUToModule::WarningReporter reporter(dwarf_filename, offset); - DwarfCUToModule root_handler(&file_context, &line_to_module, &reporter); - // Make a Dwarf2Handler that drives our DIEHandler. - dwarf2reader::DIEDispatcher die_dispatcher(&root_handler); - // Make a DWARF parser for the compilation unit at OFFSET. - dwarf2reader::CompilationUnit reader(file_context.section_map, - offset, - &byte_reader, - &die_dispatcher); - // Process the entire compilation unit; get the offset of the next. - offset += reader.Start(); - } - return true; -} - -// Fill REGISTER_NAMES with the register names appropriate to the -// machine architecture given in HEADER, indexed by the register -// numbers used in DWARF call frame information. Return true on -// success, or false if we don't recognize HEADER's machine -// architecture. -static bool DwarfCFIRegisterNames(const ElfW(Ehdr) *elf_header, - vector *register_names) { - switch (elf_header->e_machine) { - case EM_386: - *register_names = DwarfCFIToModule::RegisterNames::I386(); - return true; - case EM_ARM: - *register_names = DwarfCFIToModule::RegisterNames::ARM(); - return true; - case EM_X86_64: - *register_names = DwarfCFIToModule::RegisterNames::X86_64(); - return true; - default: - return false; - } -} - -static bool LoadDwarfCFI(const string &dwarf_filename, - const ElfW(Ehdr) *elf_header, - const char *section_name, - const ElfW(Shdr) *section, - const bool eh_frame, - const ElfW(Shdr) *got_section, - const ElfW(Shdr) *text_section, - const bool big_endian, - Module *module) { - // Find the appropriate set of register names for this file's - // architecture. - vector register_names; - if (!DwarfCFIRegisterNames(elf_header, ®ister_names)) { - fprintf(stderr, "%s: unrecognized ELF machine architecture '%d';" - " cannot convert DWARF call frame information\n", - dwarf_filename.c_str(), elf_header->e_machine); - return false; - } - - const dwarf2reader::Endianness endianness = big_endian ? - dwarf2reader::ENDIANNESS_BIG : dwarf2reader::ENDIANNESS_LITTLE; - - // Find the call frame information and its size. - const char *cfi = reinterpret_cast(section->sh_offset); - size_t cfi_size = section->sh_size; - - // Plug together the parser, handler, and their entourages. - DwarfCFIToModule::Reporter module_reporter(dwarf_filename, section_name); - DwarfCFIToModule handler(module, register_names, &module_reporter); - dwarf2reader::ByteReader byte_reader(endianness); - // Since we're using the ElfW macro, we're not actually capable of - // processing both ELF32 and ELF64 files with the same program; that - // would take a bit more work. But this will work out well enough. - if (elf_header->e_ident[EI_CLASS] == ELFCLASS32) - byte_reader.SetAddressSize(4); - else if (elf_header->e_ident[EI_CLASS] == ELFCLASS64) - byte_reader.SetAddressSize(8); - else { - fprintf(stderr, "%s: bad file class in ELF header: %d\n", - dwarf_filename.c_str(), elf_header->e_ident[EI_CLASS]); - return false; - } - // Provide the base addresses for .eh_frame encoded pointers, if - // possible. - byte_reader.SetCFIDataBase(section->sh_addr, cfi); - if (got_section) - byte_reader.SetDataBase(got_section->sh_addr); - if (text_section) - byte_reader.SetTextBase(text_section->sh_addr); - - dwarf2reader::CallFrameInfo::Reporter dwarf_reporter(dwarf_filename, - section_name); - dwarf2reader::CallFrameInfo parser(cfi, cfi_size, - &byte_reader, &handler, &dwarf_reporter, - eh_frame); - parser.Start(); - return true; -} - -bool LoadELF(const std::string &obj_file, MmapWrapper* map_wrapper, - ElfW(Ehdr) **elf_header) { - int obj_fd = open(obj_file.c_str(), O_RDONLY); - if (obj_fd < 0) { - fprintf(stderr, "Failed to open ELF file '%s': %s\n", - obj_file.c_str(), strerror(errno)); - return false; - } - FDWrapper obj_fd_wrapper(obj_fd); - struct stat st; - if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) { - fprintf(stderr, "Unable to fstat ELF file '%s': %s\n", - obj_file.c_str(), strerror(errno)); - return false; - } - void *obj_base = mmap(NULL, st.st_size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, obj_fd, 0); - if (obj_base == MAP_FAILED) { - fprintf(stderr, "Failed to mmap ELF file '%s': %s\n", - obj_file.c_str(), strerror(errno)); - return false; - } - map_wrapper->set(obj_base, st.st_size); - *elf_header = reinterpret_cast(obj_base); - if (!IsValidElf(*elf_header)) { - fprintf(stderr, "Not a valid ELF file: %s\n", obj_file.c_str()); - return false; - } - return true; -} - -// Get the endianness of ELF_HEADER. If it's invalid, return false. -bool ElfEndianness(const ElfW(Ehdr) *elf_header, bool *big_endian) { - if (elf_header->e_ident[EI_DATA] == ELFDATA2LSB) { - *big_endian = false; - return true; - } - if (elf_header->e_ident[EI_DATA] == ELFDATA2MSB) { - *big_endian = true; - return true; - } - - fprintf(stderr, "bad data encoding in ELF header: %d\n", - elf_header->e_ident[EI_DATA]); - return false; -} - -// Read the .gnu_debuglink and get the debug file name. If anything goes -// wrong, return an empty string. -static std::string ReadDebugLink(const ElfW(Shdr) *debuglink_section, - const std::string &obj_file, - const std::string &debug_dir) { - char *debuglink = reinterpret_cast(debuglink_section->sh_offset); - size_t debuglink_len = strlen(debuglink) + 5; // '\0' + CRC32. - debuglink_len = 4 * ((debuglink_len + 3) / 4); // Round to nearest 4 bytes. - - // Sanity check. - if (debuglink_len != debuglink_section->sh_size) { - fprintf(stderr, "Mismatched .gnu_debuglink string / section size: " - "%zx %zx\n", debuglink_len, debuglink_section->sh_size); - return ""; - } - - std::string debuglink_path = debug_dir + "/" + debuglink; - int debuglink_fd = open(debuglink_path.c_str(), O_RDONLY); - if (debuglink_fd < 0) { - fprintf(stderr, "Failed to open debug ELF file '%s' for '%s': %s\n", - debuglink_path.c_str(), obj_file.c_str(), strerror(errno)); - return ""; - } - FDWrapper debuglink_fd_wrapper(debuglink_fd); - // TODO(thestig) check the CRC-32 at the end of the .gnu_debuglink - // section. - - return debuglink_path; -} - -// -// LoadSymbolsInfo -// -// Holds the state between the two calls to LoadSymbols() in case we have to -// follow the .gnu_debuglink section and load debug information from a -// different file. -// -class LoadSymbolsInfo { - public: - explicit LoadSymbolsInfo(const std::string &dbg_dir) : - debug_dir_(dbg_dir), - has_loading_addr_(false) {} - - // Keeps track of which sections have been loaded so we don't accidentally - // load it twice from two different files. - void LoadedSection(const std::string §ion) { - if (loaded_sections_.count(section) == 0) { - loaded_sections_.insert(section); - } else { - fprintf(stderr, "Section %s has already been loaded.\n", - section.c_str()); - } - } - - // We expect the ELF file and linked debug file to have the same preferred - // loading address. - void set_loading_addr(ElfW(Addr) addr, const std::string &filename) { - if (!has_loading_addr_) { - loading_addr_ = addr; - loaded_file_ = filename; - return; - } - - if (addr != loading_addr_) { - fprintf(stderr, - "ELF file '%s' and debug ELF file '%s' " - "have different load addresses.\n", - loaded_file_.c_str(), filename.c_str()); - assert(false); - } - } - - // Setters and getters - const std::string &debug_dir() const { - return debug_dir_; - } - - std::string debuglink_file() const { - return debuglink_file_; - } - void set_debuglink_file(std::string file) { - debuglink_file_ = file; - } - - private: - const std::string &debug_dir_; // Directory with the debug ELF file. - - std::string debuglink_file_; // Full path to the debug ELF file. - - bool has_loading_addr_; // Indicate if LOADING_ADDR_ is valid. - - ElfW(Addr) loading_addr_; // Saves the preferred loading address from the - // first call to LoadSymbols(). - - std::string loaded_file_; // Name of the file loaded from the first call to - // LoadSymbols(). - - std::set loaded_sections_; // Tracks the Loaded ELF sections - // between calls to LoadSymbols(). -}; - -static bool LoadSymbols(const std::string &obj_file, - const bool big_endian, - ElfW(Ehdr) *elf_header, - const bool read_gnu_debug_link, - LoadSymbolsInfo *info, - Module *module) { - // Translate all offsets in section headers into address. - FixAddress(elf_header); - ElfW(Addr) loading_addr = GetLoadingAddress( - reinterpret_cast(elf_header->e_phoff), - elf_header->e_phnum); - module->SetLoadAddress(loading_addr); - info->set_loading_addr(loading_addr, obj_file); - - const ElfW(Shdr) *sections = - reinterpret_cast(elf_header->e_shoff); - const ElfW(Shdr) *section_names = sections + elf_header->e_shstrndx; - bool found_debug_info_section = false; - - // Look for STABS debugging information, and load it if present. - const ElfW(Shdr) *stab_section - = FindSectionByName(".stab", sections, section_names, - elf_header->e_shnum); - if (stab_section) { - const ElfW(Shdr) *stabstr_section = stab_section->sh_link + sections; - if (stabstr_section) { - found_debug_info_section = true; - info->LoadedSection(".stab"); - if (!LoadStabs(elf_header, stab_section, stabstr_section, big_endian, - module)) { - fprintf(stderr, "%s: \".stab\" section found, but failed to load STABS" - " debugging information\n", obj_file.c_str()); - } - } - } - - // Look for DWARF debugging information, and load it if present. - const ElfW(Shdr) *dwarf_section - = FindSectionByName(".debug_info", sections, section_names, - elf_header->e_shnum); - if (dwarf_section) { - found_debug_info_section = true; - info->LoadedSection(".debug_info"); - if (!LoadDwarf(obj_file, elf_header, big_endian, module)) - fprintf(stderr, "%s: \".debug_info\" section found, but failed to load " - "DWARF debugging information\n", obj_file.c_str()); - } - - // Dwarf Call Frame Information (CFI) is actually independent from - // the other DWARF debugging information, and can be used alone. - const ElfW(Shdr) *dwarf_cfi_section = - FindSectionByName(".debug_frame", sections, section_names, - elf_header->e_shnum); - if (dwarf_cfi_section) { - // Ignore the return value of this function; even without call frame - // information, the other debugging information could be perfectly - // useful. - info->LoadedSection(".debug_frame"); - LoadDwarfCFI(obj_file, elf_header, ".debug_frame", - dwarf_cfi_section, false, 0, 0, big_endian, module); - } - - // Linux C++ exception handling information can also provide - // unwinding data. - const ElfW(Shdr) *eh_frame_section = - FindSectionByName(".eh_frame", sections, section_names, - elf_header->e_shnum); - if (eh_frame_section) { - // Pointers in .eh_frame data may be relative to the base addresses of - // certain sections. Provide those sections if present. - const ElfW(Shdr) *got_section = - FindSectionByName(".got", sections, section_names, elf_header->e_shnum); - const ElfW(Shdr) *text_section = - FindSectionByName(".text", sections, section_names, - elf_header->e_shnum); - info->LoadedSection(".eh_frame"); - // As above, ignore the return value of this function. - LoadDwarfCFI(obj_file, elf_header, ".eh_frame", eh_frame_section, true, - got_section, text_section, big_endian, module); - } - - if (!found_debug_info_section) { - fprintf(stderr, "%s: file contains no debugging information" - " (no \".stab\" or \".debug_info\" sections)\n", - obj_file.c_str()); - - // Failed, but maybe we can find a .gnu_debuglink section? - if (read_gnu_debug_link) { - const ElfW(Shdr) *gnu_debuglink_section - = FindSectionByName(".gnu_debuglink", sections, section_names, - elf_header->e_shnum); - if (gnu_debuglink_section) { - if (!info->debug_dir().empty()) { - std::string debuglink_file = - ReadDebugLink(gnu_debuglink_section, obj_file, info->debug_dir()); - info->set_debuglink_file(debuglink_file); - } else { - fprintf(stderr, ".gnu_debuglink section found in '%s', " - "but no debug path specified.\n", obj_file.c_str()); - } - } else { - fprintf(stderr, "%s does not contain a .gnu_debuglink section.\n", - obj_file.c_str()); - } - } - return false; - } - - return true; -} - -// Return the breakpad symbol file identifier for the architecture of -// ELF_HEADER. -const char *ElfArchitecture(const ElfW(Ehdr) *elf_header) { - ElfW(Half) arch = elf_header->e_machine; - switch (arch) { - case EM_386: return "x86"; - case EM_ARM: return "arm"; - case EM_MIPS: return "mips"; - case EM_PPC64: return "ppc64"; - case EM_PPC: return "ppc"; - case EM_S390: return "s390"; - case EM_SPARC: return "sparc"; - case EM_SPARCV9: return "sparcv9"; - case EM_X86_64: return "x86_64"; - default: return NULL; - } -} - -// Format the Elf file identifier in IDENTIFIER as a UUID with the -// dashes removed. -std::string FormatIdentifier(unsigned char identifier[16]) { - char identifier_str[40]; - google_breakpad::FileID::ConvertIdentifierToString( - identifier, - identifier_str, - sizeof(identifier_str)); - std::string id_no_dash; - for (int i = 0; identifier_str[i] != '\0'; ++i) - if (identifier_str[i] != '-') - id_no_dash += identifier_str[i]; - // Add an extra "0" by the end. PDB files on Windows have an 'age' - // number appended to the end of the file identifier; this isn't - // really used or necessary on other platforms, but let's preserve - // the pattern. - id_no_dash += '0'; - return id_no_dash; -} - -// Return the non-directory portion of FILENAME: the portion after the -// last slash, or the whole filename if there are no slashes. -std::string BaseFileName(const std::string &filename) { - // Lots of copies! basename's behavior is less than ideal. - char *c_filename = strdup(filename.c_str()); - std::string base = basename(c_filename); - free(c_filename); - return base; -} - -} // namespace - -namespace google_breakpad { - -bool WriteSymbolFile(const std::string &obj_file, - const std::string &debug_dir, FILE *sym_file) { - MmapWrapper map_wrapper; - ElfW(Ehdr) *elf_header = NULL; - if (!LoadELF(obj_file, &map_wrapper, &elf_header)) - return false; - - unsigned char identifier[16]; - google_breakpad::FileID file_id(obj_file.c_str()); - if (!file_id.ElfFileIdentifierFromMappedFile(elf_header, identifier)) { - fprintf(stderr, "%s: unable to generate file identifier\n", - obj_file.c_str()); - return false; - } - - const char *architecture = ElfArchitecture(elf_header); - if (!architecture) { - fprintf(stderr, "%s: unrecognized ELF machine architecture: %d\n", - obj_file.c_str(), elf_header->e_machine); - return false; - } - - // Figure out what endianness this file is. - bool big_endian; - if (!ElfEndianness(elf_header, &big_endian)) - return false; - - std::string name = BaseFileName(obj_file); - std::string os = "Linux"; - std::string id = FormatIdentifier(identifier); - - LoadSymbolsInfo info(debug_dir); - Module module(name, os, architecture, id); - if (!LoadSymbols(obj_file, big_endian, elf_header, true, &info, &module)) { - const std::string debuglink_file = info.debuglink_file(); - if (debuglink_file.empty()) - return false; - - // Load debuglink ELF file. - fprintf(stderr, "Found debugging info in %s\n", debuglink_file.c_str()); - MmapWrapper debug_map_wrapper; - ElfW(Ehdr) *debug_elf_header = NULL; - if (!LoadELF(debuglink_file, &debug_map_wrapper, &debug_elf_header)) - return false; - // Sanity checks to make sure everything matches up. - const char *debug_architecture = ElfArchitecture(debug_elf_header); - if (!debug_architecture) { - fprintf(stderr, "%s: unrecognized ELF machine architecture: %d\n", - debuglink_file.c_str(), debug_elf_header->e_machine); - return false; - } - if (strcmp(architecture, debug_architecture)) { - fprintf(stderr, "%s with ELF machine architecture %s does not match " - "%s with ELF architecture %s\n", - debuglink_file.c_str(), debug_architecture, - obj_file.c_str(), architecture); - return false; - } - - bool debug_big_endian; - if (!ElfEndianness(debug_elf_header, &debug_big_endian)) - return false; - if (debug_big_endian != big_endian) { - fprintf(stderr, "%s and %s does not match in endianness\n", - obj_file.c_str(), debuglink_file.c_str()); - return false; - } - - if (!LoadSymbols(debuglink_file, debug_big_endian, debug_elf_header, - false, &info, &module)) { - return false; - } - } - if (!module.Write(sym_file)) - return false; - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.h deleted file mode 100644 index e1a930ac..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/dump_symbols.h +++ /dev/null @@ -1,54 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_symbols.h: Read debugging information from an ELF file, and write -// it out as a Breakpad symbol file. - -#ifndef COMMON_LINUX_DUMP_SYMBOLS_H__ -#define COMMON_LINUX_DUMP_SYMBOLS_H__ - -#include - -#include - -namespace google_breakpad { - -// Find all the debugging information in OBJ_FILE, an ELF executable -// or shared library, and write it to SYM_FILE in the Breakpad symbol -// file format. -// If OBJ_FILE has been stripped but contains a .gnu_debuglink section, -// then look for the debug file in DEBUG_DIR. -bool WriteSymbolFile(const std::string &obj_file, - const std::string &debug_dir, FILE *sym_file); - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DUMP_SYMBOLS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/eintr_wrapper.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/eintr_wrapper.h deleted file mode 100644 index 225311e6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/eintr_wrapper.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_LINUX_EINTR_WRAPPER_H_ -#define COMMON_LINUX_EINTR_WRAPPER_H_ - -#include - -// This provides a wrapper around system calls which may be interrupted by a -// signal and return EINTR. See man 7 signal. -// - -#define HANDLE_EINTR(x) ({ \ - typeof(x) __eintr_result__; \ - do { \ - __eintr_result__ = x; \ - } while (__eintr_result__ == -1 && errno == EINTR); \ - __eintr_result__;\ -}) - -#endif // ifndef COMMON_LINUX_EINTR_WRAPPER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.cc deleted file mode 100644 index 2227c83b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.cc +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// - -#include "common/linux/file_id.h" - -#include -#include -#include -#include -#if defined(__ANDROID__) -#include "client/linux/android_link.h" -#else -#include -#endif -#include -#include -#include -#include -#include - -#include - -#include "common/linux/linux_libc_support.h" -#include "third_party/lss/linux_syscall_support.h" - -namespace google_breakpad { - -FileID::FileID(const char* path) { - strncpy(path_, path, sizeof(path_)); -} - -struct ElfClass32 { - typedef Elf32_Ehdr Ehdr; - typedef Elf32_Shdr Shdr; - static const int kClass = ELFCLASS32; -}; - -struct ElfClass64 { - typedef Elf64_Ehdr Ehdr; - typedef Elf64_Shdr Shdr; - static const int kClass = ELFCLASS64; -}; - -// These three functions are also used inside the crashed process, so be safe -// and use the syscall/libc wrappers instead of direct syscalls or libc. -template -static void FindElfClassTextSection(const char *elf_base, - const void **text_start, - int *text_size) { - typedef typename ElfClass::Ehdr Ehdr; - typedef typename ElfClass::Shdr Shdr; - - assert(elf_base); - assert(text_start); - assert(text_size); - - assert(my_strncmp(elf_base, ELFMAG, SELFMAG) == 0); - - const char* text_section_name = ".text"; - int name_len = my_strlen(text_section_name); - - const Ehdr* elf_header = reinterpret_cast(elf_base); - assert(elf_header->e_ident[EI_CLASS] == ElfClass::kClass); - - const Shdr* sections = - reinterpret_cast(elf_base + elf_header->e_shoff); - const Shdr* string_section = sections + elf_header->e_shstrndx; - - const Shdr* text_section = NULL; - for (int i = 0; i < elf_header->e_shnum; ++i) { - if (sections[i].sh_type == SHT_PROGBITS) { - const char* section_name = (char*)(elf_base + - string_section->sh_offset + - sections[i].sh_name); - if (!my_strncmp(section_name, text_section_name, name_len)) { - text_section = §ions[i]; - break; - } - } - } - if (text_section != NULL && text_section->sh_size > 0) { - *text_start = elf_base + text_section->sh_offset; - *text_size = text_section->sh_size; - } -} - -static bool FindElfTextSection(const void *elf_mapped_base, - const void **text_start, - int *text_size) { - assert(elf_mapped_base); - assert(text_start); - assert(text_size); - - const char* elf_base = - static_cast(elf_mapped_base); - const ElfW(Ehdr)* elf_header = - reinterpret_cast(elf_base); - if (my_strncmp(elf_base, ELFMAG, SELFMAG) != 0) - return false; - - if (elf_header->e_ident[EI_CLASS] == ELFCLASS32) { - FindElfClassTextSection(elf_base, text_start, text_size); - } else if (elf_header->e_ident[EI_CLASS] == ELFCLASS64) { - FindElfClassTextSection(elf_base, text_start, text_size); - } else { - return false; - } - - return true; -} - -// static -bool FileID::ElfFileIdentifierFromMappedFile(void* base, - uint8_t identifier[kMDGUIDSize]) -{ - const void* text_section = NULL; - int text_size = 0; - bool success = false; - if (FindElfTextSection(base, &text_section, &text_size) && (text_size > 0)) { - my_memset(identifier, 0, kMDGUIDSize); - const uint8_t* ptr = reinterpret_cast(text_section); - const uint8_t* ptr_end = ptr + std::min(text_size, 4096); - while (ptr < ptr_end) { - for (unsigned i = 0; i < kMDGUIDSize; i++) - identifier[i] ^= ptr[i]; - ptr += kMDGUIDSize; - } - success = true; - } - return success; -} - -bool FileID::ElfFileIdentifier(uint8_t identifier[kMDGUIDSize]) { - int fd = open(path_, O_RDONLY); - if (fd < 0) - return false; - struct stat st; - if (fstat(fd, &st) != 0) { - close(fd); - return false; - } - void* base = mmap(NULL, st.st_size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); - close(fd); - if (base == MAP_FAILED) - return false; - - bool success = ElfFileIdentifierFromMappedFile(base, identifier); - munmap(base, st.st_size); - return success; -} - -// static -void FileID::ConvertIdentifierToString(const uint8_t identifier[kMDGUIDSize], - char* buffer, int buffer_length) { - uint8_t identifier_swapped[kMDGUIDSize]; - - // Endian-ness swap to match dump processor expectation. - memcpy(identifier_swapped, identifier, kMDGUIDSize); - uint32_t* data1 = reinterpret_cast(identifier_swapped); - *data1 = htonl(*data1); - uint16_t* data2 = reinterpret_cast(identifier_swapped + 4); - *data2 = htons(*data2); - uint16_t* data3 = reinterpret_cast(identifier_swapped + 6); - *data3 = htons(*data3); - - int buffer_idx = 0; - for (unsigned int idx = 0; - (buffer_idx < buffer_length) && (idx < kMDGUIDSize); - ++idx) { - int hi = (identifier_swapped[idx] >> 4) & 0x0F; - int lo = (identifier_swapped[idx]) & 0x0F; - - if (idx == 4 || idx == 6 || idx == 8 || idx == 10) - buffer[buffer_idx++] = '-'; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // NULL terminate - buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.h deleted file mode 100644 index 2cd4953e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// file_id.h: Return a unique identifier for a file -// - -#ifndef COMMON_LINUX_FILE_ID_H__ -#define COMMON_LINUX_FILE_ID_H__ - -#include - -#include "common/linux/guid_creator.h" - -namespace google_breakpad { - -static const size_t kMDGUIDSize = sizeof(MDGUID); - -class FileID { - public: - explicit FileID(const char* path); - ~FileID() {} - - // Load the identifier for the elf file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will XOR the first 4096 bytes of the - // .text section to generate an identifier. - bool ElfFileIdentifier(uint8_t identifier[kMDGUIDSize]); - - // Load the identifier for the elf file mapped into memory at |base| into - // |identifier|. Return false if the identifier could not be created for the - // file. - static bool ElfFileIdentifierFromMappedFile(void* base, - uint8_t identifier[kMDGUIDSize]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). - // The |buffer| should be at least 37 bytes long to receive all of the data - // and termination. Shorter buffers will contain truncated data. - static void ConvertIdentifierToString(const uint8_t identifier[kMDGUIDSize], - char* buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_FILE_ID_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id_unittest.cc deleted file mode 100644 index f5298b12..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/file_id_unittest.cc +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit tests for FileID - -#include -#include - -#include "common/linux/file_id.h" -#include "breakpad_googletest_includes.h" - -using namespace google_breakpad; - -namespace { -typedef testing::Test FileIDTest; -} - -TEST(FileIDTest, FileIDStrip) { - // Calculate the File ID of our binary using - // FileID::ElfFileIdentifier, then make a copy of our binary, - // strip it, and ensure that we still get the same result. - char exe_name[PATH_MAX]; - ssize_t len = readlink("/proc/self/exe", exe_name, PATH_MAX - 1); - ASSERT_NE(len, -1); - exe_name[len] = '\0'; - - // copy our binary to a temp file, and strip it - char templ[] = "/tmp/file-id-unittest-XXXXXX"; - mktemp(templ); - char cmdline[4096]; - sprintf(cmdline, "cp \"%s\" \"%s\"", exe_name, templ); - ASSERT_EQ(system(cmdline), 0); - sprintf(cmdline, "strip \"%s\"", templ); - ASSERT_EQ(system(cmdline), 0); - - uint8_t identifier1[sizeof(MDGUID)]; - uint8_t identifier2[sizeof(MDGUID)]; - FileID fileid1(exe_name); - EXPECT_TRUE(fileid1.ElfFileIdentifier(identifier1)); - FileID fileid2(templ); - EXPECT_TRUE(fileid2.ElfFileIdentifier(identifier2)); - char identifier_string1[37]; - char identifier_string2[37]; - FileID::ConvertIdentifierToString(identifier1, identifier_string1, - 37); - FileID::ConvertIdentifierToString(identifier2, identifier_string2, - 37); - EXPECT_STREQ(identifier_string1, identifier_string2); - unlink(templ); -} - -struct ElfClass32 { - typedef Elf32_Ehdr Ehdr; - typedef Elf32_Shdr Shdr; - static const int kClass = ELFCLASS32; -}; - -struct ElfClass64 { - typedef Elf64_Ehdr Ehdr; - typedef Elf64_Shdr Shdr; - static const int kClass = ELFCLASS64; -}; - -template -struct ElfishElf { - static const size_t kTextSectionSize = 128; - typedef typename ElfClass::Ehdr Ehdr; - typedef typename ElfClass::Shdr Shdr; - - Ehdr elf_header; - Shdr text_header; - Shdr string_header; - char text_section[kTextSectionSize]; - char string_section[8]; - - static void Populate(ElfishElf* elf) { - memset(elf, 0, sizeof(ElfishElf)); - memcpy(elf, ELFMAG, SELFMAG); - elf->elf_header.e_ident[EI_CLASS] = ElfClass::kClass; - elf->elf_header.e_shoff = offsetof(ElfishElf, text_header); - elf->elf_header.e_shnum = 2; - elf->elf_header.e_shstrndx = 1; - elf->text_header.sh_name = 0; - elf->text_header.sh_type = SHT_PROGBITS; - elf->text_header.sh_offset = offsetof(ElfishElf, text_section); - elf->text_header.sh_size = kTextSectionSize; - for (size_t i = 0; i < kTextSectionSize; ++i) { - elf->text_section[i] = i * 3; - } - elf->string_header.sh_offset = offsetof(ElfishElf, string_section); - strcpy(elf->string_section, ".text"); - } -}; - -TEST(FileIDTest, ElfClass) { - uint8_t identifier[sizeof(MDGUID)]; - const char expected_identifier_string[] = - "80808080-8080-0000-0000-008080808080"; - char identifier_string[sizeof(expected_identifier_string)]; - - ElfishElf elf32; - ElfishElf::Populate(&elf32); - EXPECT_TRUE(FileID::ElfFileIdentifierFromMappedFile(&elf32, identifier)); - FileID::ConvertIdentifierToString(identifier, identifier_string, - sizeof(identifier_string)); - EXPECT_STREQ(expected_identifier_string, identifier_string); - - memset(identifier, 0, sizeof(identifier)); - memset(identifier_string, 0, sizeof(identifier_string)); - - ElfishElf elf64; - ElfishElf::Populate(&elf64); - EXPECT_TRUE(FileID::ElfFileIdentifierFromMappedFile(&elf64, identifier)); - FileID::ConvertIdentifierToString(identifier, identifier_string, - sizeof(identifier_string)); - EXPECT_STREQ(expected_identifier_string, identifier_string); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.cc deleted file mode 100644 index b739a6f6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.cc +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#include "common/linux/google_crashdump_uploader.h" -#include "common/linux/libcurl_wrapper.h" - -#include -#include -#include - -#include - -using std::string; - -namespace google_breakpad { - -GoogleCrashdumpUploader::GoogleCrashdumpUploader(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword) { - LibcurlWrapper* http_layer = new LibcurlWrapper(); - Init(product, - version, - guid, - ptime, - ctime, - email, - comments, - minidump_pathname, - crash_server, - proxy_host, - proxy_userpassword, - http_layer); -} - -GoogleCrashdumpUploader::GoogleCrashdumpUploader(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword, - LibcurlWrapper* http_layer) { - Init(product, - version, - guid, - ptime, - ctime, - email, - comments, - minidump_pathname, - crash_server, - proxy_host, - proxy_userpassword, - http_layer); -} - -void GoogleCrashdumpUploader::Init(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword, - LibcurlWrapper* http_layer) { - product_ = product; - version_ = version; - guid_ = guid; - ptime_ = ptime; - ctime_ = ctime; - email_ = email; - comments_ = comments; - http_layer_ = http_layer; - - crash_server_ = crash_server; - proxy_host_ = proxy_host; - proxy_userpassword_ = proxy_userpassword; - minidump_pathname_ = minidump_pathname; - std::cout << "Uploader initializing"; - std::cout << "\tProduct: " << product_; - std::cout << "\tVersion: " << version_; - std::cout << "\tGUID: " << guid_; - if (!ptime_.empty()) { - std::cout << "\tProcess uptime: " << ptime_; - } - if (!ctime_.empty()) { - std::cout << "\tCumulative Process uptime: " << ctime_; - } - if (!email_.empty()) { - std::cout << "\tEmail: " << email_; - } - if (!comments_.empty()) { - std::cout << "\tComments: " << comments_; - } -} - -bool GoogleCrashdumpUploader::CheckRequiredParametersArePresent() { - std::string error_text; - if (product_.empty()) { - error_text.append("\nProduct name must be specified."); - } - - if (version_.empty()) { - error_text.append("\nProduct version must be specified."); - } - - if (guid_.empty()) { - error_text.append("\nClient ID must be specified."); - } - - if (minidump_pathname_.empty()) { - error_text.append("\nMinidump pathname must be specified."); - } - - if (!error_text.empty()) { - std::cout << error_text; - return false; - } - return true; - -} - -bool GoogleCrashdumpUploader::Upload() { - bool ok = http_layer_->Init(); - if (!ok) { - std::cout << "http layer init failed"; - return ok; - } - - if (!CheckRequiredParametersArePresent()) { - return false; - } - - struct stat st; - int err = stat(minidump_pathname_.c_str(), &st); - if (err) { - std::cout << minidump_pathname_ << " could not be found"; - return false; - } - - parameters_["prod"] = product_; - parameters_["ver"] = version_; - parameters_["guid"] = guid_; - parameters_["ptime"] = ptime_; - parameters_["ctime"] = ctime_; - parameters_["email"] = email_; - parameters_["comments_"] = comments_; - if (!http_layer_->AddFile(minidump_pathname_, - "upload_file_minidump")) { - return false; - } - std::cout << "Sending request to " << crash_server_; - return http_layer_->SendRequest(crash_server_, - parameters_, - NULL); -} -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.h deleted file mode 100644 index 5cea17d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#include -#include - -namespace google_breakpad { - -class LibcurlWrapper; - -class GoogleCrashdumpUploader { - public: - GoogleCrashdumpUploader(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword); - - GoogleCrashdumpUploader(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword, - LibcurlWrapper* http_layer); - - void Init(const std::string& product, - const std::string& version, - const std::string& guid, - const std::string& ptime, - const std::string& ctime, - const std::string& email, - const std::string& comments, - const std::string& minidump_pathname, - const std::string& crash_server, - const std::string& proxy_host, - const std::string& proxy_userpassword, - LibcurlWrapper* http_layer); - bool Upload(); - - private: - bool CheckRequiredParametersArePresent(); - - LibcurlWrapper* http_layer_; - std::string product_; - std::string version_; - std::string guid_; - std::string ptime_; - std::string ctime_; - std::string email_; - std::string comments_; - std::string minidump_pathname_; - - std::string crash_server_; - std::string proxy_host_; - std::string proxy_userpassword_; - - std::map parameters_; -}; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader_test.cc deleted file mode 100644 index c65355c9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/google_crashdump_uploader_test.cc +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit test for crash dump uploader. - -#include "common/linux/google_crashdump_uploader.h" -#include "common/linux/libcurl_wrapper.h" -#include "breakpad_googletest_includes.h" - -namespace google_breakpad { - -using ::testing::Return; -using ::testing::_; - -class MockLibcurlWrapper : public LibcurlWrapper { - public: - MOCK_METHOD0(Init, bool()); - MOCK_METHOD2(SetProxy, bool(const std::string& proxy_host, - const std::string& proxy_userpwd)); - MOCK_METHOD2(AddFile, bool(const std::string& upload_file_path, - const std::string& basename)); - MOCK_METHOD3(SendRequest, - bool(const std::string& url, - const std::map& parameters, - std::string* server_response)); -}; - -class GoogleCrashdumpUploaderTest : public ::testing::Test { -}; - -TEST_F(GoogleCrashdumpUploaderTest, InitFailsCausesUploadFailure) { - MockLibcurlWrapper m; - EXPECT_CALL(m, Init()).Times(1).WillOnce(Return(false)); - GoogleCrashdumpUploader *uploader = new GoogleCrashdumpUploader("foobar", - "1.0", - "AAA-BBB", - "", - "", - "test@test.com", - "none", - "/tmp/foo.dmp", - "http://foo.com", - "", - "", - &m); - ASSERT_FALSE(uploader->Upload()); -} - -TEST_F(GoogleCrashdumpUploaderTest, TestSendRequestHappensWithValidParameters) { - // Create a temp file - char tempfn[80] = "/tmp/googletest-upload-XXXXXX"; - int fd = mkstemp(tempfn); - ASSERT_NE(fd, -1); - close(fd); - - MockLibcurlWrapper m; - EXPECT_CALL(m, Init()).Times(1).WillOnce(Return(true)); - EXPECT_CALL(m, AddFile(tempfn, _)).WillOnce(Return(true)); - EXPECT_CALL(m, - SendRequest("http://foo.com",_,_)).Times(1).WillOnce(Return(true)); - GoogleCrashdumpUploader *uploader = new GoogleCrashdumpUploader("foobar", - "1.0", - "AAA-BBB", - "", - "", - "test@test.com", - "none", - tempfn, - "http://foo.com", - "", - "", - &m); - ASSERT_TRUE(uploader->Upload()); -} - - -TEST_F(GoogleCrashdumpUploaderTest, InvalidPathname) { - MockLibcurlWrapper m; - EXPECT_CALL(m, Init()).Times(1).WillOnce(Return(true)); - EXPECT_CALL(m, SendRequest(_,_,_)).Times(0); - GoogleCrashdumpUploader *uploader = new GoogleCrashdumpUploader("foobar", - "1.0", - "AAA-BBB", - "", - "", - "test@test.com", - "none", - "/tmp/foo.dmp", - "http://foo.com", - "", - "", - &m); - ASSERT_FALSE(uploader->Upload()); -} - -TEST_F(GoogleCrashdumpUploaderTest, TestRequiredParametersMustBePresent) { - // Test with empty product name. - GoogleCrashdumpUploader uploader("", - "1.0", - "AAA-BBB", - "", - "", - "test@test.com", - "none", - "/tmp/foo.dmp", - "http://foo.com", - "", - ""); - ASSERT_FALSE(uploader.Upload()); - - // Test with empty product version. - GoogleCrashdumpUploader uploader1("product", - "", - "AAA-BBB", - "", - "", - "", - "", - "/tmp/foo.dmp", - "", - "", - ""); - - ASSERT_FALSE(uploader1.Upload()); - - // Test with empty client GUID. - GoogleCrashdumpUploader uploader2("product", - "1.0", - "", - "", - "", - "", - "", - "/tmp/foo.dmp", - "", - "", - ""); - ASSERT_FALSE(uploader2.Upload()); -} -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.cc deleted file mode 100644 index 678f5904..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.cc +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/linux/guid_creator.h" - -#include -#include -#include -#include -#include - -// -// GUIDGenerator -// -// This class is used to generate random GUID. -// Currently use random number to generate a GUID since Linux has -// no native GUID generator. This should be OK since we don't expect -// crash to happen very offen. -// -class GUIDGenerator { - public: - GUIDGenerator() { - srandom(time(NULL)); - } - - static u_int32_t BytesToUInt32(const u_int8_t bytes[]) { - return ((u_int32_t) bytes[0] - | ((u_int32_t) bytes[1] << 8) - | ((u_int32_t) bytes[2] << 16) - | ((u_int32_t) bytes[3] << 24)); - } - - static void UInt32ToBytes(u_int8_t bytes[], u_int32_t n) { - bytes[0] = n & 0xff; - bytes[1] = (n >> 8) & 0xff; - bytes[2] = (n >> 16) & 0xff; - bytes[3] = (n >> 24) & 0xff; - } - - bool CreateGUID(GUID *guid) const { - guid->data1 = random(); - guid->data2 = (u_int16_t)(random()); - guid->data3 = (u_int16_t)(random()); - UInt32ToBytes(&guid->data4[0], random()); - UInt32ToBytes(&guid->data4[4], random()); - return true; - } -}; - -// Guid generator. -const GUIDGenerator kGuidGenerator; - -bool CreateGUID(GUID *guid) { - return kGuidGenerator.CreateGUID(guid); -} - -// Parse guid to string. -bool GUIDToString(const GUID *guid, char *buf, int buf_len) { - // Should allow more space the the max length of GUID. - assert(buf_len > kGUIDStringLength); - int num = snprintf(buf, buf_len, kGUIDFormatString, - guid->data1, guid->data2, guid->data3, - GUIDGenerator::BytesToUInt32(&(guid->data4[0])), - GUIDGenerator::BytesToUInt32(&(guid->data4[4]))); - if (num != kGUIDStringLength) - return false; - - buf[num] = '\0'; - return true; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.h deleted file mode 100644 index c86d856c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/guid_creator.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_LINUX_GUID_CREATOR_H__ -#define COMMON_LINUX_GUID_CREATOR_H__ - -#include "google_breakpad/common/minidump_format.h" - -typedef MDGUID GUID; - -// Format string for parsing GUID. -#define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" -// Length of GUID string. Don't count the ending '\0'. -#define kGUIDStringLength 36 - -// Create a guid. -bool CreateGUID(GUID *guid); - -// Get the string from guid. -bool GUIDToString(const GUID *guid, char *buf, int buf_len); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.cc deleted file mode 100644 index d552d00b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.cc +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/linux/http_upload.h" - -#include -#include -#include -#include -#include - -namespace { - -// Callback to get the response data from server. -static size_t WriteCallback(void *ptr, size_t size, - size_t nmemb, void *userp) { - if (!userp) - return 0; - - std::string *response = reinterpret_cast(userp); - size_t real_size = size * nmemb; - response->append(reinterpret_cast(ptr), real_size); - return real_size; -} - -} // namespace - -namespace google_breakpad { - -static const char kUserAgent[] = "Breakpad/1.0 (Linux)"; - -// static -bool HTTPUpload::SendRequest(const string &url, - const map ¶meters, - const string &upload_file, - const string &file_part_name, - const string &proxy, - const string &proxy_user_pwd, - const string &ca_certificate_file, - string *response_body, - string *error_description) { - if (!CheckParameters(parameters)) - return false; - - void *curl_lib = dlopen("libcurl.so", RTLD_NOW); - if (!curl_lib) { - if (error_description != NULL) - *error_description = dlerror(); - curl_lib = dlopen("libcurl.so.4", RTLD_NOW); - } - if (!curl_lib) { - // Debian gives libcurl a different name when it is built against GnuTLS - // instead of OpenSSL. - curl_lib = dlopen("libcurl-gnutls.so.4", RTLD_NOW); - } - if (!curl_lib) { - curl_lib = dlopen("libcurl.so.3", RTLD_NOW); - } - if (!curl_lib) { - return false; - } - - CURL* (*curl_easy_init)(void); - *(void**) (&curl_easy_init) = dlsym(curl_lib, "curl_easy_init"); - CURL *curl = (*curl_easy_init)(); - if (error_description != NULL) - *error_description = "No Error"; - - if (!curl) { - dlclose(curl_lib); - return false; - } - - CURLcode err_code = CURLE_OK; - CURLcode (*curl_easy_setopt)(CURL *, CURLoption, ...); - *(void**) (&curl_easy_setopt) = dlsym(curl_lib, "curl_easy_setopt"); - (*curl_easy_setopt)(curl, CURLOPT_URL, url.c_str()); - (*curl_easy_setopt)(curl, CURLOPT_USERAGENT, kUserAgent); - // Set proxy information if necessary. - if (!proxy.empty()) - (*curl_easy_setopt)(curl, CURLOPT_PROXY, proxy.c_str()); - if (!proxy_user_pwd.empty()) - (*curl_easy_setopt)(curl, CURLOPT_PROXYUSERPWD, proxy_user_pwd.c_str()); - - if (!ca_certificate_file.empty()) - (*curl_easy_setopt)(curl, CURLOPT_CAINFO, ca_certificate_file.c_str()); - - struct curl_httppost *formpost = NULL; - struct curl_httppost *lastptr = NULL; - // Add form data. - CURLFORMcode (*curl_formadd)(struct curl_httppost **, struct curl_httppost **, ...); - *(void**) (&curl_formadd) = dlsym(curl_lib, "curl_formadd"); - map::const_iterator iter = parameters.begin(); - for (; iter != parameters.end(); ++iter) - (*curl_formadd)(&formpost, &lastptr, - CURLFORM_COPYNAME, iter->first.c_str(), - CURLFORM_COPYCONTENTS, iter->second.c_str(), - CURLFORM_END); - - // Add form file. - (*curl_formadd)(&formpost, &lastptr, - CURLFORM_COPYNAME, file_part_name.c_str(), - CURLFORM_FILE, upload_file.c_str(), - CURLFORM_END); - - (*curl_easy_setopt)(curl, CURLOPT_HTTPPOST, formpost); - - // Disable 100-continue header. - struct curl_slist *headerlist = NULL; - char buf[] = "Expect:"; - struct curl_slist* (*curl_slist_append)(struct curl_slist *, const char *); - *(void**) (&curl_slist_append) = dlsym(curl_lib, "curl_slist_append"); - headerlist = (*curl_slist_append)(headerlist, buf); - (*curl_easy_setopt)(curl, CURLOPT_HTTPHEADER, headerlist); - - if (response_body != NULL) { - (*curl_easy_setopt)(curl, CURLOPT_WRITEFUNCTION, WriteCallback); - (*curl_easy_setopt)(curl, CURLOPT_WRITEDATA, - reinterpret_cast(response_body)); - } - - // Fail if 400+ is returned from the web server. - (*curl_easy_setopt)(curl, CURLOPT_FAILONERROR, 1); - - CURLcode (*curl_easy_perform)(CURL *); - *(void**) (&curl_easy_perform) = dlsym(curl_lib, "curl_easy_perform"); - err_code = (*curl_easy_perform)(curl); - const char* (*curl_easy_strerror)(CURLcode); - *(void**) (&curl_easy_strerror) = dlsym(curl_lib, "curl_easy_strerror"); -#ifndef NDEBUG - if (err_code != CURLE_OK) - fprintf(stderr, "Failed to send http request to %s, error: %s\n", - url.c_str(), - (*curl_easy_strerror)(err_code)); -#endif - if (error_description != NULL) - *error_description = (*curl_easy_strerror)(err_code); - - void (*curl_easy_cleanup)(CURL *); - *(void**) (&curl_easy_cleanup) = dlsym(curl_lib, "curl_easy_cleanup"); - (*curl_easy_cleanup)(curl); - if (formpost != NULL) { - void (*curl_formfree)(struct curl_httppost *); - *(void**) (&curl_formfree) = dlsym(curl_lib, "curl_formfree"); - (*curl_formfree)(formpost); - } - if (headerlist != NULL) { - void (*curl_slist_free_all)(struct curl_slist *); - *(void**) (&curl_slist_free_all) = dlsym(curl_lib, "curl_slist_free_all"); - (*curl_slist_free_all)(headerlist); - } - dlclose(curl_lib); - return err_code == CURLE_OK; -} - -// static -bool HTTPUpload::CheckParameters(const map ¶meters) { - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - const string &str = pos->first; - if (str.size() == 0) - return false; // disallow empty parameter names - for (unsigned int i = 0; i < str.size(); ++i) { - int c = str[i]; - if (c < 32 || c == '"' || c > 127) { - return false; - } - } - } - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.h deleted file mode 100644 index e98b25de..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/http_upload.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPUpload provides a "nice" API to send a multipart HTTP(S) POST -// request using libcurl. It currently supports requests that contain -// a set of string parameters (key/value pairs), and a file to upload. - -#ifndef COMMON_LINUX_HTTP_UPLOAD_H__ -#define COMMON_LINUX_HTTP_UPLOAD_H__ - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::map; - -class HTTPUpload { - public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request - // (i.e. it corresponds to the name= attribute on an . - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. Returns true on success. - // If the request is successful and response_body is non-NULL, - // the response body will be returned in response_body. - // If the send fails, a description of the error will be - // returned in error_description. - static bool SendRequest(const string &url, - const map ¶meters, - const string &upload_file, - const string &file_part_name, - const string &proxy, - const string &proxy_user_pwd, - const string &ca_certificate_file, - string *response_body, - string *error_description); - - private: - // Checks that the given list of parameters has only printable - // ASCII characters in the parameter name, and does not contain - // any quote (") characters. Returns true if so. - static bool CheckParameters(const map ¶meters); - - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - HTTPUpload(); - explicit HTTPUpload(const HTTPUpload &); - void operator=(const HTTPUpload &); - ~HTTPUpload(); -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_HTTP_UPLOAD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.cc deleted file mode 100644 index 8b61aa09..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.cc +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include - -#include "common/linux/libcurl_wrapper.h" - -using std::string; - -namespace google_breakpad { -LibcurlWrapper::LibcurlWrapper() - : init_ok_(false), - formpost_(NULL), - lastptr_(NULL), - headerlist_(NULL) { - curl_lib_ = dlopen("libcurl.so", RTLD_NOW); - if (!curl_lib_) { - curl_lib_ = dlopen("libcurl.so.4", RTLD_NOW); - } - if (!curl_lib_) { - curl_lib_ = dlopen("libcurl.so.3", RTLD_NOW); - } - if (!curl_lib_) { - std::cout << "Could not find libcurl via dlopen"; - return; - } - std::cout << "LibcurlWrapper init succeeded"; - init_ok_ = true; - return; -} - -bool LibcurlWrapper::SetProxy(const std::string& proxy_host, - const std::string& proxy_userpwd) { - if (!init_ok_) { - return false; - } - // Set proxy information if necessary. - if (!proxy_host.empty()) { - (*easy_setopt_)(curl_, CURLOPT_PROXY, proxy_host.c_str()); - } else { - std::cout << "SetProxy called with empty proxy host."; - return false; - } - if (!proxy_userpwd.empty()) { - (*easy_setopt_)(curl_, CURLOPT_PROXYUSERPWD, proxy_userpwd.c_str()); - } else { - std::cout << "SetProxy called with empty proxy username/password."; - return false; - } - std::cout << "Set proxy host to " << proxy_host; - return true; -} - -bool LibcurlWrapper::AddFile(const std::string& upload_file_path, - const std::string& basename) { - if (!init_ok_) { - return false; - } - std::cout << "Adding " << upload_file_path << " to form upload."; - // Add form file. - (*formadd_)(&formpost_, &lastptr_, - CURLFORM_COPYNAME, basename.c_str(), - CURLFORM_FILE, upload_file_path.c_str(), - CURLFORM_END); - - return true; -} - -// Callback to get the response data from server. -static size_t WriteCallback(void *ptr, size_t size, - size_t nmemb, void *userp) { - if (!userp) - return 0; - - std::string *response = reinterpret_cast(userp); - size_t real_size = size * nmemb; - response->append(reinterpret_cast(ptr), real_size); - return real_size; -} - -bool LibcurlWrapper::SendRequest(const std::string& url, - const std::map& parameters, - std::string* server_response) { - (*easy_setopt_)(curl_, CURLOPT_URL, url.c_str()); - std::map::const_iterator iter = parameters.begin(); - for (; iter != parameters.end(); ++iter) - (*formadd_)(&formpost_, &lastptr_, - CURLFORM_COPYNAME, iter->first.c_str(), - CURLFORM_COPYCONTENTS, iter->second.c_str(), - CURLFORM_END); - - (*easy_setopt_)(curl_, CURLOPT_HTTPPOST, formpost_); - if (server_response != NULL) { - (*easy_setopt_)(curl_, CURLOPT_WRITEFUNCTION, WriteCallback); - (*easy_setopt_)(curl_, CURLOPT_WRITEDATA, - reinterpret_cast(server_response)); - } - - CURLcode err_code = CURLE_OK; - err_code = (*easy_perform_)(curl_); - easy_strerror_ = reinterpret_cast - (dlsym(curl_lib_, "curl_easy_strerror")); - -#ifndef NDEBUG - if (err_code != CURLE_OK) - fprintf(stderr, "Failed to send http request to %s, error: %s\n", - url.c_str(), - (*easy_strerror_)(err_code)); -#endif - if (headerlist_ != NULL) { - (*slist_free_all_)(headerlist_); - } - - (*easy_cleanup_)(curl_); - if (formpost_ != NULL) { - (*formfree_)(formpost_); - } - - return err_code == CURLE_OK; -} - -bool LibcurlWrapper::Init() { - if (!init_ok_) { - std::cout << "Init_OK was not true in LibcurlWrapper::Init(), check earlier log messages"; - return false; - } - - if (!SetFunctionPointers()) { - std::cout << "Could not find function pointers"; - init_ok_ = false; - return false; - } - - curl_ = (*easy_init_)(); - - last_curl_error_ = "No Error"; - - if (!curl_) { - dlclose(curl_lib_); - std::cout << "Curl initialization failed"; - return false; - } - - // Disable 100-continue header. - char buf[] = "Expect:"; - - headerlist_ = (*slist_append_)(headerlist_, buf); - (*easy_setopt_)(curl_, CURLOPT_HTTPHEADER, headerlist_); - return true; -} - -#define SET_AND_CHECK_FUNCTION_POINTER(var, function_name, type) \ - var = reinterpret_cast(dlsym(curl_lib_, function_name)); \ - if (!var) { \ - std::cout << "Could not find libcurl function " << function_name; \ - init_ok_ = false; \ - return false; \ - } - -bool LibcurlWrapper::SetFunctionPointers() { - - SET_AND_CHECK_FUNCTION_POINTER(easy_init_, - "curl_easy_init", - CURL*(*)()); - - SET_AND_CHECK_FUNCTION_POINTER(easy_setopt_, - "curl_easy_setopt", - CURLcode(*)(CURL*, CURLoption, ...)); - - SET_AND_CHECK_FUNCTION_POINTER(formadd_, "curl_formadd", - CURLFORMcode(*)(curl_httppost**, curl_httppost**, ...)); - - SET_AND_CHECK_FUNCTION_POINTER(slist_append_, "curl_slist_append", - curl_slist*(*)(curl_slist*, const char*)); - - SET_AND_CHECK_FUNCTION_POINTER(easy_perform_, - "curl_easy_perform", - CURLcode(*)(CURL*)); - - SET_AND_CHECK_FUNCTION_POINTER(easy_cleanup_, - "curl_easy_cleanup", - void(*)(CURL*)); - - SET_AND_CHECK_FUNCTION_POINTER(slist_free_all_, - "curl_slist_free_all", - void(*)(curl_slist*)); - - SET_AND_CHECK_FUNCTION_POINTER(formfree_, - "curl_formfree", - void(*)(curl_httppost*)); - return true; -} - -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.h deleted file mode 100644 index 3e53e616..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/libcurl_wrapper.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A wrapper for libcurl to do HTTP Uploads, to support easy mocking -// and unit testing of the HTTPUpload class. - -#include -#include - -#include "third_party/curl/curl.h" - -namespace google_breakpad { -class LibcurlWrapper { - public: - LibcurlWrapper(); - virtual bool Init(); - virtual bool SetProxy(const std::string& proxy_host, - const std::string& proxy_userpwd); - virtual bool AddFile(const std::string& upload_file_path, - const std::string& basename); - virtual bool SendRequest(const std::string& url, - const std::map& parameters, - std::string* server_response); - private: - // This function initializes class state corresponding to function - // pointers into the CURL library. - bool SetFunctionPointers(); - - bool init_ok_; // Whether init succeeded - void* curl_lib_; // Pointer to result of dlopen() on - // curl library - std::string last_curl_error_; // The text of the last error when - // dealing - // with CURL. - - CURL *curl_; // Pointer for handle for CURL calls. - - CURL* (*easy_init_)(void); - - // Stateful pointers for calling into curl_formadd() - struct curl_httppost *formpost_; - struct curl_httppost *lastptr_; - struct curl_slist *headerlist_; - - // Function pointers into CURL library - CURLcode (*easy_setopt_)(CURL *, CURLoption, ...); - CURLFORMcode (*formadd_)(struct curl_httppost **, - struct curl_httppost **, ...); - struct curl_slist* (*slist_append_)(struct curl_slist *, const char *); - void (*slist_free_all_)(struct curl_slist *); - CURLcode (*easy_perform_)(CURL *); - const char* (*easy_strerror_)(CURLcode); - void (*easy_cleanup_)(CURL *); - void (*formfree_)(struct curl_httppost *); - -}; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support.h deleted file mode 100644 index e08f27f7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support.h +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header provides replacements for libc functions that we need. We if -// call the libc functions directly we risk crashing in the dynamic linker as -// it tries to resolve uncached PLT entries. - -#ifndef CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ -#define CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ - -#include -#include -#include - -extern "C" { - -static inline size_t -my_strlen(const char* s) { - size_t len = 0; - while (*s++) len++; - return len; -} - -static inline int -my_strcmp(const char* a, const char* b) { - for (;;) { - if (*a < *b) - return -1; - else if (*a > *b) - return 1; - else if (*a == 0) - return 0; - a++; - b++; - } -} - -static inline int -my_strncmp(const char* a, const char* b, size_t len) { - for (size_t i = 0; i < len; ++i) { - if (*a < *b) - return -1; - else if (*a > *b) - return 1; - else if (*a == 0) - return 0; - a++; - b++; - } - - return 0; -} - -// Parse a non-negative integer. -// result: (output) the resulting non-negative integer -// s: a NUL terminated string -// Return true iff successful. -static inline bool -my_strtoui(int* result, const char* s) { - if (*s == 0) - return false; - int r = 0; - for (;; s++) { - if (*s == 0) - break; - const int old_r = r; - r *= 10; - if (*s < '0' || *s > '9') - return false; - r += *s - '0'; - if (r < old_r) - return false; - } - - *result = r; - return true; -} - -// Return the length of the given, non-negative integer when expressed in base -// 10. -static inline unsigned -my_int_len(int i) { - if (!i) - return 1; - - int len = 0; - while (i) { - len++; - i /= 10; - } - - return len; -} - -// Convert a non-negative integer to a string -// output: (output) the resulting string is written here. This buffer must be -// large enough to hold the resulting string. Call |my_int_len| to get the -// required length. -// i: the non-negative integer to serialise. -// i_len: the length of the integer in base 10 (see |my_int_len|). -static inline void -my_itos(char* output, int i, unsigned i_len) { - for (unsigned index = i_len; index; --index, i /= 10) - output[index - 1] = '0' + (i % 10); -} - -static inline const char* -my_strchr(const char* haystack, char needle) { - while (*haystack && *haystack != needle) - haystack++; - if (*haystack == needle) - return haystack; - return (const char*) 0; -} - -// Read a hex value -// result: (output) the resulting value -// s: a string -// Returns a pointer to the first invalid charactor. -static inline const char* -my_read_hex_ptr(uintptr_t* result, const char* s) { - uintptr_t r = 0; - - for (;; ++s) { - if (*s >= '0' && *s <= '9') { - r <<= 4; - r += *s - '0'; - } else if (*s >= 'a' && *s <= 'f') { - r <<= 4; - r += (*s - 'a') + 10; - } else if (*s >= 'A' && *s <= 'F') { - r <<= 4; - r += (*s - 'A') + 10; - } else { - break; - } - } - - *result = r; - return s; -} - -static inline void -my_memset(void* ip, char c, size_t len) { - char* p = (char *) ip; - while (len--) - *p++ = c; -} - -} // extern "C" - -#endif // CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support_unittest.cc deleted file mode 100644 index d3907e94..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/linux/linux_libc_support_unittest.cc +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/linux/linux_libc_support.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace { -typedef testing::Test LinuxLibcSupportTest; -} - -TEST(LinuxLibcSupportTest, strlen) { - static const char* test_data[] = { "", "a", "aa", "aaa", "aabc", NULL }; - for (unsigned i = 0; ; ++i) { - if (!test_data[i]) - break; - ASSERT_EQ(strlen(test_data[i]), my_strlen(test_data[i])); - } -} - -TEST(LinuxLibcSupportTest, strcmp) { - static const char* test_data[] = { - "", "", - "a", "", - "", "a", - "a", "b", - "a", "a", - "ab", "aa", - "abc", "ab", - "abc", "abc", - NULL, - }; - - for (unsigned i = 0; ; ++i) { - if (!test_data[i*2]) - break; - ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]), - strcmp(test_data[i*2], test_data[i*2 + 1])); - } -} - -TEST(LinuxLibcSupportTest, strtoui) { - int result; - - ASSERT_FALSE(my_strtoui(&result, "")); - ASSERT_FALSE(my_strtoui(&result, "-1")); - ASSERT_FALSE(my_strtoui(&result, "-")); - ASSERT_FALSE(my_strtoui(&result, "a")); - ASSERT_FALSE(my_strtoui(&result, "23472893472938472987987398472398")); - - ASSERT_TRUE(my_strtoui(&result, "0")); - ASSERT_EQ(result, 0); - ASSERT_TRUE(my_strtoui(&result, "1")); - ASSERT_EQ(result, 1); - ASSERT_TRUE(my_strtoui(&result, "12")); - ASSERT_EQ(result, 12); - ASSERT_TRUE(my_strtoui(&result, "123")); - ASSERT_EQ(result, 123); - ASSERT_TRUE(my_strtoui(&result, "0123")); - ASSERT_EQ(result, 123); -} - -TEST(LinuxLibcSupportTest, int_len) { - ASSERT_EQ(my_int_len(0), 1); - ASSERT_EQ(my_int_len(2), 1); - ASSERT_EQ(my_int_len(5), 1); - ASSERT_EQ(my_int_len(9), 1); - ASSERT_EQ(my_int_len(10), 2); - ASSERT_EQ(my_int_len(99), 2); - ASSERT_EQ(my_int_len(100), 3); - ASSERT_EQ(my_int_len(101), 3); - ASSERT_EQ(my_int_len(1000), 4); -} - -TEST(LinuxLibcSupportTest, itos) { - char buf[10]; - - my_itos(buf, 0, 1); - ASSERT_EQ(0, memcmp(buf, "0", 1)); - - my_itos(buf, 1, 1); - ASSERT_EQ(0, memcmp(buf, "1", 1)); - - my_itos(buf, 10, 2); - ASSERT_EQ(0, memcmp(buf, "10", 2)); - - my_itos(buf, 63, 2); - ASSERT_EQ(0, memcmp(buf, "63", 2)); - - my_itos(buf, 101, 3); - ASSERT_EQ(0, memcmp(buf, "101", 2)); -} - -TEST(LinuxLibcSupportTest, strchr) { - ASSERT_EQ(NULL, my_strchr("abc", 'd')); - ASSERT_EQ(NULL, my_strchr("", 'd')); - ASSERT_EQ(NULL, my_strchr("efghi", 'd')); - - ASSERT_TRUE(my_strchr("a", 'a')); - ASSERT_TRUE(my_strchr("abc", 'a')); - ASSERT_TRUE(my_strchr("bcda", 'a')); - ASSERT_TRUE(my_strchr("sdfasdf", 'a')); -} - -TEST(LinuxLibcSupportTest, read_hex_ptr) { - uintptr_t result; - const char* last; - - last = my_read_hex_ptr(&result, ""); - ASSERT_EQ(result, 0); - ASSERT_EQ(*last, 0); - - last = my_read_hex_ptr(&result, "0"); - ASSERT_EQ(result, 0); - ASSERT_EQ(*last, 0); - - last = my_read_hex_ptr(&result, "0123"); - ASSERT_EQ(result, 0x123); - ASSERT_EQ(*last, 0); - - last = my_read_hex_ptr(&result, "0123a"); - ASSERT_EQ(result, 0x123a); - ASSERT_EQ(*last, 0); - - last = my_read_hex_ptr(&result, "0123a-"); - ASSERT_EQ(result, 0x123a); - ASSERT_EQ(*last, '-'); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/Breakpad.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/Breakpad.xcconfig deleted file mode 100644 index b6bf92b5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/Breakpad.xcconfig +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -ARCHS = $(ARCHS_STANDARD_32_64_BIT) -SDKROOT = macosx10.5 -SDKROOT[arch=i386] = macosx10.4 -SDKROOT[arch=ppc] = macosx10.4 - -GCC_VERSION = 4.2 -GCC_VERSION[sdk=macosx10.4][arch=*] = 4.0 - -GCC_C_LANGUAGE_STANDARD = c99 - -GCC_WARN_CHECK_SWITCH_STATEMENTS = YES -// TODO(nealsid): Get the code so we can turn on the 64_TO_32 warning. -GCC_WARN_64_TO_32_BIT_CONVERSION = NO -GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES -GCC_WARN_ABOUT_RETURN_TYPE = YES -GCC_WARN_MISSING_PARENTHESES = YES -GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_WARN_SIGN_COMPARE = YES -GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES -GCC_WARN_UNDECLARED_SELECTOR = YES -GCC_WARN_UNKNOWN_PRAGMAS = YES -GCC_WARN_UNUSED_VARIABLE = YES -GCC_TREAT_WARNINGS_AS_ERRORS = YES - -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym -DEBUG_INFORMATION_FORMAT[sdk=macosx10.4][arch=*] = stabs - -ALWAYS_SEARCH_USER_PATHS = NO diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadDebug.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadDebug.xcconfig deleted file mode 100644 index 94cdd8cf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadDebug.xcconfig +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "Breakpad.xcconfig" - -GCC_OPTIMIZATION_LEVEL = 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadRelease.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadRelease.xcconfig deleted file mode 100644 index af209a42..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/BreakpadRelease.xcconfig +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "Breakpad.xcconfig" - -GCC_OPTIMIZATION_LEVEL = s -GCC_WARN_UNINITIALIZED_AUTOS = YES diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMDefines.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMDefines.h deleted file mode 100644 index b88193cd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMDefines.h +++ /dev/null @@ -1,241 +0,0 @@ -// -// GTMDefines.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// ============================================================================ - -#include -#include - -// Not all MAC_OS_X_VERSION_10_X macros defined in past SDKs -#ifndef MAC_OS_X_VERSION_10_5 - #define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 - #define MAC_OS_X_VERSION_10_6 1060 -#endif - -// ---------------------------------------------------------------------------- -// CPP symbols that can be overridden in a prefix to control how the toolbox -// is compiled. -// ---------------------------------------------------------------------------- - - -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 -#endif - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) - #if defined (__GNUC__) && (__GNUC__ == 4) - #define GTM_INLINE static __inline__ __attribute__((always_inline)) - #else - #define GTM_INLINE static __inline__ - #endif -#endif - -// Give ourselves a consistent way of doing externs that links up nicely -// when mixing objc and objc++ -#if !defined (GTM_EXTERN) - #if defined __cplusplus - #define GTM_EXTERN extern "C" - #else - #define GTM_EXTERN extern - #endif -#endif - -// Give ourselves a consistent way of exporting things if we have visibility -// set to hidden. -#if !defined (GTM_EXPORT) - #define GTM_EXPORT __attribute__((visibility("default"))) -#endif - -// _GTMDevLog & _GTMDevAssert -// -// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for -// developer level errors. This implementation simply macros to NSLog/NSAssert. -// It is not intended to be a general logging/reporting system. -// -// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert -// for a little more background on the usage of these macros. -// -// _GTMDevLog log some error/problem in debug builds -// _GTMDevAssert assert if conditon isn't met w/in a method/function -// in all builds. -// -// To replace this system, just provide different macro definitions in your -// prefix header. Remember, any implementation you provide *must* be thread -// safe since this could be called by anything in what ever situtation it has -// been placed in. -// - -// We only define the simple macros if nothing else has defined this. -#ifndef _GTMDevLog - -#ifdef DEBUG - #define _GTMDevLog(...) NSLog(__VA_ARGS__) -#else - #define _GTMDevLog(...) do { } while (0) -#endif - -#endif // _GTMDevLog - -// Declared here so that it can easily be used for logging tracking if -// necessary. See GTMUnitTestDevLog.h for details. -@class NSString; -GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...); - -#ifndef _GTMDevAssert -// we directly invoke the NSAssert handler so we can pass on the varargs -// (NSAssert doesn't have a macro we can use that takes varargs) -#if !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) \ - do { \ - if (!(condition)) { \ - [[NSAssertionHandler currentHandler] \ - handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ - file:[NSString stringWithUTF8String:__FILE__] \ - lineNumber:__LINE__ \ - description:__VA_ARGS__]; \ - } \ - } while(0) -#else // !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) do { } while (0) -#endif // !defined(NS_BLOCK_ASSERTIONS) - -#endif // _GTMDevAssert - -// _GTMCompileAssert -// _GTMCompileAssert is an assert that is meant to fire at compile time if you -// want to check things at compile instead of runtime. For example if you -// want to check that a wchar is 4 bytes instead of 2 you would use -// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) -// Note that the second "arg" is not in quotes, and must be a valid processor -// symbol in it's own right (no spaces, punctuation etc). - -// Wrapping this in an #ifndef allows external groups to define their own -// compile time assert scheme. -#ifndef _GTMCompileAssert - // We got this technique from here: - // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html - - #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg - #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) - #define _GTMCompileAssert(test, msg) \ - typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] -#endif // _GTMCompileAssert - -// Macro to allow fast enumeration when building for 10.5 or later, and -// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration -// does keys, so pick the right thing, nothing is done on the FastEnumeration -// side to be sure you're getting what you wanted. -#ifndef GTM_FOREACH_OBJECT - #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) - #define GTM_FOREACH_OBJECT(element, collection) \ - for (element in collection) - #define GTM_FOREACH_KEY(element, collection) \ - for (element in collection) - #else - #define GTM_FOREACH_OBJECT(element, collection) \ - for (NSEnumerator * _ ## element ## _enum = [collection objectEnumerator]; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #define GTM_FOREACH_KEY(element, collection) \ - for (NSEnumerator * _ ## element ## _enum = [collection keyEnumerator]; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #endif -#endif - -// ============================================================================ - -// ---------------------------------------------------------------------------- -// CPP symbols defined based on the project settings so the GTM code has -// simple things to test against w/o scattering the knowledge of project -// setting through all the code. -// ---------------------------------------------------------------------------- - -// Provide a single constant CPP symbol that all of GTM uses for ifdefing -// iPhone code. -#if TARGET_OS_IPHONE // iPhone SDK - // For iPhone specific stuff - #define GTM_IPHONE_SDK 1 - #if TARGET_IPHONE_SIMULATOR - #define GTM_IPHONE_SIMULATOR 1 - #else - #define GTM_IPHONE_DEVICE 1 - #endif // TARGET_IPHONE_SIMULATOR -#else - // For MacOS specific stuff - #define GTM_MACOS_SDK 1 -#endif - -// Provide a symbol to include/exclude extra code for GC support. (This mainly -// just controls the inclusion of finalize methods). -#ifndef GTM_SUPPORT_GC - #if GTM_IPHONE_SDK - // iPhone never needs GC - #define GTM_SUPPORT_GC 0 - #else - // We can't find a symbol to tell if GC is supported/required, so best we - // do on Mac targets is include it if we're on 10.5 or later. - #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 - #define GTM_SUPPORT_GC 0 - #else - #define GTM_SUPPORT_GC 1 - #endif - #endif -#endif - -// To simplify support for 64bit (and Leopard in general), we provide the type -// defines for non Leopard SDKs -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 - // NSInteger/NSUInteger and Max/Mins - #ifndef NSINTEGER_DEFINED - #if __LP64__ || NS_BUILD_32_LIKE_64 - typedef long NSInteger; - typedef unsigned long NSUInteger; - #else - typedef int NSInteger; - typedef unsigned int NSUInteger; - #endif - #define NSIntegerMax LONG_MAX - #define NSIntegerMin LONG_MIN - #define NSUIntegerMax ULONG_MAX - #define NSINTEGER_DEFINED 1 - #endif // NSINTEGER_DEFINED - // CGFloat - #ifndef CGFLOAT_DEFINED - #if defined(__LP64__) && __LP64__ - // This really is an untested path (64bit on Tiger?) - typedef double CGFloat; - #define CGFLOAT_MIN DBL_MIN - #define CGFLOAT_MAX DBL_MAX - #define CGFLOAT_IS_DOUBLE 1 - #else /* !defined(__LP64__) || !__LP64__ */ - typedef float CGFloat; - #define CGFLOAT_MIN FLT_MIN - #define CGFLOAT_MAX FLT_MAX - #define CGFLOAT_IS_DOUBLE 0 - #endif /* !defined(__LP64__) || !__LP64__ */ - #define CGFLOAT_DEFINED 1 - #endif // CGFLOAT_DEFINED -#endif // MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMGarbageCollection.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMGarbageCollection.h deleted file mode 100644 index 93d4efab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMGarbageCollection.h +++ /dev/null @@ -1,72 +0,0 @@ -// -// GTMGarbageCollection.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import "GTMDefines.h" - -// This allows us to easily move our code from GC to non GC. -// They are no-ops unless we are require Leopard or above. -// See -// http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/index.html -// and -// http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html#//apple_ref/doc/uid/TP40006687-SW1 -// for details. - -#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) && !GTM_IPHONE_SDK -// General use would be to call this through GTMCFAutorelease -// but there may be a reason the you want to make something collectable -// but not autoreleased, especially in pure GC code where you don't -// want to bother with the nop autorelease. Done as a define instead of an -// inline so that tools like Clang's scan-build don't report code as leaking. -#define GTMNSMakeCollectable(cf) ((id)NSMakeCollectable(cf)) - -// GTMNSMakeUncollectable is for global maps, etc. that we don't -// want released ever. You should still retain these in non-gc code. -GTM_INLINE void GTMNSMakeUncollectable(id object) { - [[NSGarbageCollector defaultCollector] disableCollectorForPointer:object]; -} - -// Hopefully no code really needs this, but GTMIsGarbageCollectionEnabled is -// a common way to check at runtime if GC is on. -// There are some places where GC doesn't work w/ things w/in Apple's -// frameworks, so this is here so GTM unittests and detect it, and not run -// individual tests to work around bugs in Apple's frameworks. -GTM_INLINE BOOL GTMIsGarbageCollectionEnabled(void) { - return ([NSGarbageCollector defaultCollector] != nil); -} - -#else - -#define GTMNSMakeCollectable(cf) ((id)(cf)) - -GTM_INLINE void GTMNSMakeUncollectable(id object) { -} - -GTM_INLINE BOOL GTMIsGarbageCollectionEnabled(void) { - return NO; -} - -#endif - -// GTMCFAutorelease makes a CF object collectable in GC mode, or adds it -// to the autorelease pool in non-GC mode. Either way it is taken care -// of. Done as a define instead of an inline so that tools like Clang's -// scan-build don't report code as leaking. -#define GTMCFAutorelease(cf) ([GTMNSMakeCollectable(cf) autorelease]) - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.h deleted file mode 100644 index 7d52f01e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.h +++ /dev/null @@ -1,458 +0,0 @@ -// -// GTMLogger.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Key Abstractions -// ---------------- -// -// This file declares multiple classes and protocols that are used by the -// GTMLogger logging system. The 4 main abstractions used in this file are the -// following: -// -// * logger (GTMLogger) - The main logging class that users interact with. It -// has methods for logging at different levels and uses a log writer, a log -// formatter, and a log filter to get the job done. -// -// * log writer (GTMLogWriter) - Writes a given string to some log file, where -// a "log file" can be a physical file on disk, a POST over HTTP to some URL, -// or even some in-memory structure (e.g., a ring buffer). -// -// * log formatter (GTMLogFormatter) - Given a format string and arguments as -// a va_list, returns a single formatted NSString. A "formatted string" could -// be a string with the date prepended, a string with values in a CSV format, -// or even a string of XML. -// -// * log filter (GTMLogFilter) - Given a formatted log message as an NSString -// and the level at which the message is to be logged, this class will decide -// whether the given message should be logged or not. This is a flexible way -// to filter out messages logged at a certain level, messages that contain -// certain text, or filter nothing out at all. This gives the caller the -// flexibility to dynamically enable debug logging in Release builds. -// -// This file also declares some classes to handle the common log writer, log -// formatter, and log filter cases. Callers can also create their own writers, -// formatters, and filters and they can even build them on top of the ones -// declared here. Keep in mind that your custom writer/formatter/filter may be -// called from multiple threads, so it must be thread-safe. - -#import -#import "GTMDefines.h" - -// Predeclaration of used protocols that are declared later in this file. -@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -#define CHECK_FORMAT_NSSTRING(a, b) __attribute__((format(__NSString__, a, b))) -#else -#define CHECK_FORMAT_NSSTRING(a, b) -#endif - -// GTMLogger -// -// GTMLogger is the primary user-facing class for an object-oriented logging -// system. It is built on the concept of log formatters (GTMLogFormatter), log -// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is -// sent to a GTMLogger to log a message, the message is formatted using the log -// formatter, then the log filter is consulted to see if the message should be -// logged, and if so, the message is sent to the log writer to be written out. -// -// GTMLogger is intended to be a flexible and thread-safe logging solution. Its -// flexibility comes from the fact that GTMLogger instances can be customized -// with user defined formatters, filters, and writers. And these writers, -// filters, and formatters can be combined, stacked, and customized in arbitrary -// ways to suit the needs at hand. For example, multiple writers can be used at -// the same time, and a GTMLogger instance can even be used as another -// GTMLogger's writer. This allows for arbitrarily deep logging trees. -// -// A standard GTMLogger uses a writer that sends messages to standard out, a -// formatter that smacks a timestamp and a few other bits of interesting -// information on the message, and a filter that filters out debug messages from -// release builds. Using the standard log settings, a log message will look like -// the following: -// -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= -// -// The output contains the date and time of the log message, the name of the -// process followed by its process ID/thread ID, the log level at which the -// message was logged (in the previous example the level was 1: -// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in -// this case, the log message was @"foo=%@", foo). -// -// Multiple instances of GTMLogger can be created, each configured their own -// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide -// access to a shared (i.e., globally accessible) GTMLogger instance. This makes -// it convenient for all code in a process to use the same GTMLogger instance. -// The shared GTMLogger instance can also be configured in an arbitrary, and -// these configuration changes will affect all code that logs through the shared -// instance. - -// -// Log Levels -// ---------- -// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger -// doesn't take any special action based on the log level; it simply forwards -// this information on to formatters, filters, and writers, each of which may -// optionally take action based on the level. Since log level filtering is -// performed at runtime, log messages are typically not filtered out at compile -// time. The exception to this rule is that calls to the GTMLoggerDebug() macro -// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible -// with behavior that many developers are currently used to. Note that this -// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but -// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. -// -// Standard loggers are created with the GTMLogLevelFilter log filter, which -// filters out certain log messages based on log level, and some other settings. -// -// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on -// GTMLogger itself, there are also C macros that make usage of the shared -// GTMLogger instance very convenient. These macros are: -// -// GTMLoggerDebug(...) -// GTMLoggerInfo(...) -// GTMLoggerError(...) -// -// Again, a notable feature of these macros is that GTMLogDebug() calls *will be -// compiled out of non-DEBUG builds*. -// -// Standard Loggers -// ---------------- -// GTMLogger has the concept of "standard loggers". A standard logger is simply -// a logger that is pre-configured with some standard/common writer, formatter, -// and filter combination. Standard loggers are created using the creation -// methods beginning with "standard". The alternative to a standard logger is a -// regular logger, which will send messages to stdout, with no special -// formatting, and no filtering. -// -// How do I use GTMLogger? -// ---------------------- -// The typical way you will want to use GTMLogger is to simply use the -// GTMLogger*() macros for logging from code. That way we can easily make -// changes to the GTMLogger class and simply update the macros accordingly. Only -// your application startup code (perhaps, somewhere in main()) should use the -// GTMLogger class directly in order to configure the shared logger, which all -// of the code using the macros will be using. Again, this is just the typical -// situation. -// -// To be complete, there are cases where you may want to use GTMLogger directly, -// or even create separate GTMLogger instances for some reason. That's fine, -// too. -// -// Examples -// -------- -// The following show some common GTMLogger use cases. -// -// 1. You want to log something as simply as possible. Also, this call will only -// appear in debug builds. In non-DEBUG builds it will be completely removed. -// -// GTMLoggerDebug(@"foo = %@", foo); -// -// 2. The previous example is similar to the following. The major difference is -// that the previous call (example 1) will be compiled out of Release builds -// but this statement will not be compiled out. -// -// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; -// -// 3. Send all logging output from the shared logger to a file. We do this by -// creating an NSFileHandle for writing associated with a file, and setting -// that file handle as the logger's writer. -// -// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" -// create:YES]; -// [[GTMLogger sharedLogger] setWriter:f]; -// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log -// -// 4. Create a new GTMLogger that will log to a file. This example differs from -// the previous one because here we create a new GTMLogger that is different -// from the shared logger. -// -// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; -// [logger logInfo:@"hi temp log file"]; -// -// 5. Create a logger that writes to stdout and does NOT do any formatting to -// the log message. This might be useful, for example, when writing a help -// screen for a command-line tool to standard output. -// -// GTMLogger *logger = [GTMLogger logger]; -// [logger logInfo:@"%@ version 0.1 usage", progName]; -// -// 6. Send log output to stdout AND to a log file. The trick here is that -// NSArrays function as composite log writers, which means when an array is -// set as the log writer, it forwards all logging messages to all of its -// contained GTMLogWriters. -// -// // Create array of GTMLogWriters -// NSArray *writers = [NSArray arrayWithObjects: -// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], -// [NSFileHandle fileHandleWithStandardOutput], nil]; -// -// GTMLogger *logger = [GTMLogger standardLogger]; -// [logger setWriter:writers]; -// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log -// -// For futher details on log writers, formatters, and filters, see the -// documentation below. -// -// NOTE: GTMLogger is application level logging. By default it does nothing -// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose -// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro -// definitions in its prefix header (see GTMDefines.h for how one would do -// that). -// -@interface GTMLogger : NSObject { - @private - id writer_; - id formatter_; - id filter_; -} - -// -// Accessors for the shared logger instance -// - -// Returns a shared/global standard GTMLogger instance. Callers should typically -// use this method to get a GTMLogger instance, unless they explicitly want -// their own instance to configure for their own needs. This is the only method -// that returns a shared instance; all the rest return new GTMLogger instances. -+ (id)sharedLogger; - -// Sets the shared logger instance to |logger|. Future calls to +sharedLogger -// will return |logger| instead. -+ (void)setSharedLogger:(GTMLogger *)logger; - -// -// Creation methods -// - -// Returns a new autoreleased GTMLogger instance that will log to stdout, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLogger; - -// Same as +standardLogger, but logs to stderr. -+ (id)standardLoggerWithStderr; - -// Returns a new standard GTMLogger instance with a log writer that will -// write to the file at |path|, and will use the GTMLogStandardFormatter and -// GTMLogLevelFilter classes. If |path| does not exist, it will be created. -+ (id)standardLoggerWithPath:(NSString *)path; - -// Returns an autoreleased GTMLogger instance that will use the specified -// |writer|, |formatter|, and |filter|. -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// Returns an autoreleased GTMLogger instance that logs to stdout, with the -// basic formatter, and no filter. The returned logger differs from the logger -// returned by +standardLogger because this one does not do any filtering and -// does not do any special log formatting; this is the difference between a -// "regular" logger and a "standard" logger. -+ (id)logger; - -// Designated initializer. This method returns a GTMLogger initialized with the -// specified |writer|, |formatter|, and |filter|. See the setter methods below -// for what values will be used if nil is passed for a parameter. -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// -// Logging methods -// - -// Logs a message at the debug level (kGTMLoggerLevelDebug). -- (void)logDebug:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the info level (kGTMLoggerLevelInfo). -- (void)logInfo:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the error level (kGTMLoggerLevelError). -- (void)logError:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the assert level (kGTMLoggerLevelAssert). -- (void)logAssert:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); - - -// -// Accessors -// - -// Accessor methods for the log writer. If the log writer is set to nil, -// [NSFileHandle fileHandleWithStandardOutput] is used. -- (id)writer; -- (void)setWriter:(id)writer; - -// Accessor methods for the log formatter. If the log formatter is set to nil, -// GTMLogBasicFormatter is used. This formatter will format log messages in a -// plain printf style. -- (id)formatter; -- (void)setFormatter:(id)formatter; - -// Accessor methods for the log filter. If the log filter is set to nil, -// GTMLogNoFilter is used, which allows all log messages through. -- (id)filter; -- (void)setFilter:(id)filter; - -@end // GTMLogger - - -// Helper functions that are used by the convenience GTMLogger*() macros that -// enable the logging of function names. -@interface GTMLogger (GTMLoggerMacroHelpers) -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -@end // GTMLoggerMacroHelpers - - -// Convenience macros that log to the shared GTMLogger instance. These macros -// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() -// calls will be compiled out of non-Debug builds. -#define GTMLoggerDebug(...) \ - [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] -#define GTMLoggerInfo(...) \ - [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] -#define GTMLoggerError(...) \ - [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] -#define GTMLoggerAssert(...) \ - [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] - -// If we're not in a debug build, remove the GTMLoggerDebug statements. This -// makes calls to GTMLoggerDebug "compile out" of Release builds -#ifndef DEBUG -#undef GTMLoggerDebug -#define GTMLoggerDebug(...) do {} while(0) -#endif - -// Log levels. -typedef enum { - kGTMLoggerLevelUnknown, - kGTMLoggerLevelDebug, - kGTMLoggerLevelInfo, - kGTMLoggerLevelError, - kGTMLoggerLevelAssert, -} GTMLoggerLevel; - - -// -// Log Writers -// - -// Protocol to be implemented by a GTMLogWriter instance. -@protocol GTMLogWriter -// Writes the given log message to where the log writer is configured to write. -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogWriter - - -// Simple category on NSFileHandle that makes NSFileHandles valid log writers. -// This is convenient because something like, say, +fileHandleWithStandardError -// now becomes a valid log writer. Log messages are written to the file handle -// with a newline appended. -@interface NSFileHandle (GTMFileHandleLogWriter) -// Opens the file at |path| in append mode, and creates the file with |mode| -// if it didn't previously exist. -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; -@end // NSFileHandle - - -// This category makes NSArray a GTMLogWriter that can be composed of other -// GTMLogWriters. This is the classic Composite GoF design pattern. When the -// GTMLogWriter -logMessage:level: message is sent to the array, the array -// forwards the message to all of its elements that implement the GTMLogWriter -// protocol. -// -// This is useful in situations where you would like to send log output to -// multiple log writers at the same time. Simply create an NSArray of the log -// writers you wish to use, then set the array as the "writer" for your -// GTMLogger instance. -@interface NSArray (GTMArrayCompositeLogWriter) -@end // GTMArrayCompositeLogWriter - - -// This category adapts the GTMLogger interface so that it can be used as a log -// writer; it's an "adapter" in the GoF Adapter pattern sense. -// -// This is useful when you want to configure a logger to log to a specific -// writer with a specific formatter and/or filter. But you want to also compose -// that with a different log writer that may have its own formatter and/or -// filter. -@interface GTMLogger (GTMLoggerLogWriter) -@end // GTMLoggerLogWriter - - -// -// Log Formatters -// - -// Protocol to be implemented by a GTMLogFormatter instance. -@protocol GTMLogFormatter -// Returns a formatted string using the format specified in |fmt| and the va -// args specified in |args|. -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level; -@end // GTMLogFormatter - - -// A basic log formatter that formats a string the same way that NSLog (or -// printf) would. It does not do anything fancy, nor does it add any data of its -// own. -@interface GTMLogBasicFormatter : NSObject -@end // GTMLogBasicFormatter - - -// A log formatter that formats the log string like the basic formatter, but -// also prepends a timestamp and some basic process info to the message, as -// shown in the following sample output. -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here -@interface GTMLogStandardFormatter : GTMLogBasicFormatter { - @private - NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS - NSString *pname_; - pid_t pid_; -} -@end // GTMLogStandardFormatter - - -// -// Log Filters -// - -// Protocol to be imlemented by a GTMLogFilter instance. -@protocol GTMLogFilter -// Returns YES if |msg| at |level| should be filtered out; NO otherwise. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogFilter - - -// A log filter that filters messages at the kGTMLoggerLevelDebug level out of -// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered -// out of non-debug builds unless GTMVerboseLogging is set in the environment or -// the processes's defaults. Messages at the kGTMLoggerLevelError level are -// never filtered. -@interface GTMLogLevelFilter : NSObject -@end // GTMLogLevelFilter - - -// A simple log filter that does NOT filter anything out; -// -filterAllowsMessage:level will always return YES. This can be a convenient -// way to enable debug-level logging in release builds (if you so desire). -@interface GTMLogNoFilter : NSObject -@end // GTMLogNoFilter diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.m b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.m deleted file mode 100644 index de941d2e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/GTMLogger.m +++ /dev/null @@ -1,445 +0,0 @@ -// -// GTMLogger.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger.h" -#import "GTMGarbageCollection.h" -#import -#import -#import -#import - - -// Define a trivial assertion macro to avoid dependencies -#ifdef DEBUG - #define GTMLOGGER_ASSERT(expr) assert(expr) -#else - #define GTMLOGGER_ASSERT(expr) -#endif - - -@interface GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level; - -@end - - -// Reference to the shared GTMLogger instance. This is not a singleton, it's -// just an easy reference to one shared instance. -static GTMLogger *gSharedLogger = nil; - - -@implementation GTMLogger - -// Returns a pointer to the shared logger instance. If none exists, a standard -// logger is created and returned. -+ (id)sharedLogger { - @synchronized(self) { - if (gSharedLogger == nil) { - gSharedLogger = [[self standardLogger] retain]; - } - GTMLOGGER_ASSERT(gSharedLogger != nil); - } - return [[gSharedLogger retain] autorelease]; -} - -+ (void)setSharedLogger:(GTMLogger *)logger { - @synchronized(self) { - [gSharedLogger autorelease]; - gSharedLogger = [logger retain]; - } -} - -+ (id)standardLogger { - id writer = [NSFileHandle fileHandleWithStandardOutput]; - id fr = [[[GTMLogStandardFormatter alloc] init] autorelease]; - id filter = [[[GTMLogLevelFilter alloc] init] autorelease]; - return [self loggerWithWriter:writer formatter:fr filter:filter]; -} - -+ (id)standardLoggerWithStderr { - id me = [self standardLogger]; - [me setWriter:[NSFileHandle fileHandleWithStandardError]]; - return me; -} - -+ (id)standardLoggerWithPath:(NSString *)path { - NSFileHandle *fh = [NSFileHandle fileHandleForLoggingAtPath:path mode:0644]; - if (fh == nil) return nil; - id me = [self standardLogger]; - [me setWriter:fh]; - return me; -} - -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - return [[[self alloc] initWithWriter:writer - formatter:formatter - filter:filter] autorelease]; -} - -+ (id)logger { - return [[[self alloc] init] autorelease]; -} - -- (id)init { - return [self initWithWriter:nil formatter:nil filter:nil]; -} - -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - if ((self = [super init])) { - [self setWriter:writer]; - [self setFormatter:formatter]; - [self setFilter:filter]; - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - GTMLOGGER_ASSERT(writer_ != nil); - } - return self; -} - -- (void)dealloc { - GTMLOGGER_ASSERT(writer_ != nil); - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - [writer_ release]; - [formatter_ release]; - [filter_ release]; - [super dealloc]; -} - -- (id)writer { - GTMLOGGER_ASSERT(writer_ != nil); - return [[writer_ retain] autorelease]; -} - -- (void)setWriter:(id)writer { - @synchronized(self) { - [writer_ autorelease]; - if (writer == nil) - writer_ = [[NSFileHandle fileHandleWithStandardOutput] retain]; - else - writer_ = [writer retain]; - } - GTMLOGGER_ASSERT(writer_ != nil); -} - -- (id)formatter { - GTMLOGGER_ASSERT(formatter_ != nil); - return [[formatter_ retain] autorelease]; -} - -- (void)setFormatter:(id)formatter { - @synchronized(self) { - [formatter_ autorelease]; - if (formatter == nil) - formatter_ = [[GTMLogBasicFormatter alloc] init]; - else - formatter_ = [formatter retain]; - } - GTMLOGGER_ASSERT(formatter_ != nil); -} - -- (id)filter { - GTMLOGGER_ASSERT(filter_ != nil); - return [[filter_ retain] autorelease]; -} - -- (void)setFilter:(id)filter { - @synchronized(self) { - [filter_ autorelease]; - if (filter == nil) - filter_ = [[GTMLogNoFilter alloc] init]; - else - filter_ = [filter retain]; - } - GTMLOGGER_ASSERT(filter_ != nil); -} - -- (void)logDebug:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logInfo:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logError:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logAssert:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLogger - - -@implementation GTMLogger (GTMLoggerMacroHelpers) - -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLoggerMacroHelpers - - -@implementation GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - GTMLOGGER_ASSERT(writer_ != nil); - - NSString *fname = func ? [NSString stringWithUTF8String:func] : nil; - NSString *msg = [formatter_ stringForFunc:fname - withFormat:fmt - valist:args - level:level]; - if (msg && [filter_ filterAllowsMessage:msg level:level]) - [writer_ logMessage:msg level:level]; -} - -@end // PrivateMethods - - -@implementation NSFileHandle (GTMFileHandleLogWriter) - -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode { - int fd = -1; - if (path) { - int flags = O_WRONLY | O_APPEND | O_CREAT; - fd = open([path fileSystemRepresentation], flags, mode); - } - if (fd == -1) return nil; - return [[[self alloc] initWithFileDescriptor:fd - closeOnDealloc:YES] autorelease]; -} - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - NSString *line = [NSString stringWithFormat:@"%@\n", msg]; - [self writeData:[line dataUsingEncoding:NSUTF8StringEncoding]]; - } -} - -@end // GTMFileHandleLogWriter - - -@implementation NSArray (GTMArrayCompositeLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - id child = nil; - GTM_FOREACH_OBJECT(child, self) { - if ([child conformsToProtocol:@protocol(GTMLogWriter)]) - [child logMessage:msg level:level]; - } - } -} - -@end // GTMArrayCompositeLogWriter - - -@implementation GTMLogger (GTMLoggerLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - switch (level) { - case kGTMLoggerLevelDebug: - [self logDebug:@"%@", msg]; - break; - case kGTMLoggerLevelInfo: - [self logInfo:@"%@", msg]; - break; - case kGTMLoggerLevelError: - [self logError:@"%@", msg]; - break; - case kGTMLoggerLevelAssert: - [self logAssert:@"%@", msg]; - break; - default: - // Ignore the message. - break; - } -} - -@end // GTMLoggerLogWriter - - -@implementation GTMLogBasicFormatter - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - // Performance note: since we always have to create a new NSString from the - // returned CFStringRef, we may want to do a quick check here to see if |fmt| - // contains a '%', and if not, simply return 'fmt'. - CFStringRef cfmsg = NULL; - cfmsg = CFStringCreateWithFormatAndArguments(kCFAllocatorDefault, - NULL, // format options - (CFStringRef)fmt, - args); - return GTMCFAutorelease(cfmsg); -} - -@end // GTMLogBasicFormatter - - -@implementation GTMLogStandardFormatter - -- (id)init { - if ((self = [super init])) { - dateFormatter_ = [[NSDateFormatter alloc] init]; - [dateFormatter_ setFormatterBehavior:NSDateFormatterBehavior10_4]; - [dateFormatter_ setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; - pname_ = [[[NSProcessInfo processInfo] processName] copy]; - pid_ = [[NSProcessInfo processInfo] processIdentifier]; - } - return self; -} - -- (void)dealloc { - [dateFormatter_ release]; - [pname_ release]; - [super dealloc]; -} - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - GTMLOGGER_ASSERT(dateFormatter_ != nil); - NSString *tstamp = nil; - @synchronized (dateFormatter_) { - tstamp = [dateFormatter_ stringFromDate:[NSDate date]]; - } - return [NSString stringWithFormat:@"%@ %@[%d/%p] [lvl=%d] %@ %@", - tstamp, pname_, pid_, pthread_self(), - level, (func ? func : @"(no func)"), - [super stringForFunc:func withFormat:fmt valist:args level:level]]; -} - -@end // GTMLogStandardFormatter - - -@implementation GTMLogLevelFilter - -// Check the environment and the user preferences for the GTMVerboseLogging key -// to see if verbose logging has been enabled. The environment variable will -// override the defaults setting, so check the environment first. -// COV_NF_START -static BOOL IsVerboseLoggingEnabled(void) { - static NSString *const kVerboseLoggingKey = @"GTMVerboseLogging"; - static char *env = NULL; - if (env == NULL) - env = getenv([kVerboseLoggingKey UTF8String]); - - if (env && env[0]) { - return (strtol(env, NULL, 10) != 0); - } - - return [[NSUserDefaults standardUserDefaults] boolForKey:kVerboseLoggingKey]; -} -// COV_NF_END - -// In DEBUG builds, log everything. If we're not in a debug build we'll assume -// that we're in a Release build. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { -#if DEBUG - return YES; -#endif - - BOOL allow = YES; - - switch (level) { - case kGTMLoggerLevelDebug: - allow = NO; - break; - case kGTMLoggerLevelInfo: - allow = (IsVerboseLoggingEnabled() == YES); - break; - case kGTMLoggerLevelError: - allow = YES; - break; - case kGTMLoggerLevelAssert: - allow = YES; - break; - default: - allow = YES; - break; - } - - return allow; -} - -@end // GTMLogLevelFilter - - -@implementation GTMLogNoFilter - -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { - return YES; // Allow everything through -} - -@end // GTMLogNoFilter diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.h deleted file mode 100644 index 95f259b9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPMultipartUpload: A multipart/form-data HTTP uploader. -// Each parameter pair is sent as a boundary -// Each file is sent with a name field in addition to the filename and data -// The data will be sent synchronously. - -#import - -@interface HTTPMultipartUpload : NSObject { - @protected - NSURL *url_; // The destination URL (STRONG) - NSDictionary *parameters_; // The key/value pairs for sending data (STRONG) - NSMutableDictionary *files_; // Dictionary of name/file-path (STRONG) - NSString *boundary_; // The boundary string (STRONG) - NSHTTPURLResponse *response_; // The response from the send (STRONG) -} - -- (id)initWithURL:(NSURL *)url; - -- (NSURL *)URL; - -- (void)setParameters:(NSDictionary *)parameters; -- (NSDictionary *)parameters; - -- (void)addFileAtPath:(NSString *)path name:(NSString *)name; -- (void)addFileContents:(NSData *)data name:(NSString *)name; -- (NSDictionary *)files; - -// Set the data and return the response -- (NSData *)send:(NSError **)error; -- (NSHTTPURLResponse *)response; - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.m b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.m deleted file mode 100644 index eee66a9c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/HTTPMultipartUpload.m +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "HTTPMultipartUpload.h" -#import "GTMDefines.h" - -@interface HTTPMultipartUpload(PrivateMethods) -- (NSString *)multipartBoundary; -- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value; -- (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name; -- (NSData *)formDataForFile:(NSString *)file name:(NSString *)name; -@end - -@implementation HTTPMultipartUpload -//============================================================================= -#pragma mark - -#pragma mark || Private || -//============================================================================= -- (NSString *)multipartBoundary { - // The boundary has 27 '-' characters followed by 16 hex digits - return [NSString stringWithFormat:@"---------------------------%08X%08X", - rand(), rand()]; -} - -//============================================================================= -- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value { - NSString *escaped = - [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - NSString *fmt = - @"--%@\r\nContent-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n"; - NSString *form = [NSString stringWithFormat:fmt, boundary_, escaped, value]; - - return [form dataUsingEncoding:NSUTF8StringEncoding]; -} - -//============================================================================= -- (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name { - NSMutableData *data = [NSMutableData data]; - NSString *escaped = - [name stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - NSString *fmt = @"--%@\r\nContent-Disposition: form-data; name=\"%@\"; " - "filename=\"minidump.dmp\"\r\nContent-Type: application/octet-stream\r\n\r\n"; - NSString *pre = [NSString stringWithFormat:fmt, boundary_, escaped]; - NSString *post = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_]; - - [data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]]; - [data appendData:contents]; - [data appendData:[post dataUsingEncoding:NSUTF8StringEncoding]]; - - return data; -} - -//============================================================================= -- (NSData *)formDataForFile:(NSString *)file name:(NSString *)name { - NSData *contents = [NSData dataWithContentsOfFile:file]; - - return [self formDataForFileContents:contents name:name]; -} - -//============================================================================= -#pragma mark - -#pragma mark || Public || -//============================================================================= -- (id)initWithURL:(NSURL *)url { - if ((self = [super init])) { - url_ = [url copy]; - boundary_ = [[self multipartBoundary] retain]; - files_ = [[NSMutableDictionary alloc] init]; - } - - return self; -} - -//============================================================================= -- (void)dealloc { - [url_ release]; - [parameters_ release]; - [files_ release]; - [boundary_ release]; - [response_ release]; - - [super dealloc]; -} - -//============================================================================= -- (NSURL *)URL { - return url_; -} - -//============================================================================= -- (void)setParameters:(NSDictionary *)parameters { - if (parameters != parameters_) { - [parameters_ release]; - parameters_ = [parameters copy]; - } -} - -//============================================================================= -- (NSDictionary *)parameters { - return parameters_; -} - -//============================================================================= -- (void)addFileAtPath:(NSString *)path name:(NSString *)name { - [files_ setObject:path forKey:name]; -} - -//============================================================================= -- (void)addFileContents:(NSData *)data name:(NSString *)name { - [files_ setObject:data forKey:name]; -} - -//============================================================================= -- (NSDictionary *)files { - return files_; -} - -//============================================================================= -- (NSData *)send:(NSError **)error { - NSMutableURLRequest *req = - [[NSMutableURLRequest alloc] - initWithURL:url_ cachePolicy:NSURLRequestUseProtocolCachePolicy - timeoutInterval:10.0 ]; - - NSMutableData *postBody = [NSMutableData data]; - - [req setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", - boundary_] forHTTPHeaderField:@"Content-type"]; - - // Add any parameters to the message - NSArray *parameterKeys = [parameters_ allKeys]; - NSString *key; - - NSInteger count = [parameterKeys count]; - for (NSInteger i = 0; i < count; ++i) { - key = [parameterKeys objectAtIndex:i]; - [postBody appendData:[self formDataForKey:key - value:[parameters_ objectForKey:key]]]; - } - - // Add any files to the message - NSArray *fileNames = [files_ allKeys]; - count = [fileNames count]; - for (NSInteger i = 0; i < count; ++i) { - NSString *name = [fileNames objectAtIndex:i]; - id fileOrData = [files_ objectForKey:name]; - NSData *fileData; - - // The object can be either the path to a file (NSString) or the contents - // of the file (NSData). - if ([fileOrData isKindOfClass:[NSData class]]) - fileData = [self formDataForFileContents:fileOrData name:name]; - else - fileData = [self formDataForFile:fileOrData name:name]; - - [postBody appendData:fileData]; - } - - [req setHTTPBody:postBody]; - [req setHTTPMethod:@"POST"]; - - [response_ release]; - response_ = nil; - - NSData *data = [NSURLConnection sendSynchronousRequest:req - returningResponse:&response_ - error:error]; - - [response_ retain]; - - return data; -} - -//============================================================================= -- (NSHTTPURLResponse *)response { - return response_; -} - -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.h deleted file mode 100644 index 2213fc6b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.h +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// MachIPC.h -// -// Some helpful wrappers for using Mach IPC calls - -#ifndef MACH_IPC_H__ -#define MACH_IPC_H__ - -#import -#import -#import -#import - -#import - -//============================================================================== -// DISCUSSION: -// -// The three main classes of interest are -// -// MachMessage: a wrapper for a mach message of the following form -// mach_msg_header_t -// mach_msg_body_t -// optional descriptors -// optional extra message data -// -// MachReceiveMessage and MachSendMessage subclass MachMessage -// and are used instead of MachMessage which is an abstract base class -// -// ReceivePort: -// Represents a mach port for which we have receive rights -// -// MachPortSender: -// Represents a mach port for which we have send rights -// -// Here's an example to receive a message on a server port: -// -// // This creates our named server port -// ReceivePort receivePort("com.Google.MyService"); -// -// MachReceiveMessage message; -// kern_return_t result = receivePort.WaitForMessage(&message, 0); -// -// if (result == KERN_SUCCESS && message.GetMessageID() == 57) { -// mach_port_t task = message.GetTranslatedPort(0); -// mach_port_t thread = message.GetTranslatedPort(1); -// -// char *messageString = message.GetData(); -// -// printf("message string = %s\n", messageString); -// } -// -// Here is an example of using these classes to send a message to this port: -// -// // send to already named port -// MachPortSender sender("com.Google.MyService"); -// MachSendMessage message(57); // our message ID is 57 -// -// // add some ports to be translated for us -// message.AddDescriptor(mach_task_self()); // our task -// message.AddDescriptor(mach_thread_self()); // this thread -// -// char messageString[] = "Hello server!\n"; -// message.SetData(messageString, strlen(messageString)+1); -// -// kern_return_t result = sender.SendMessage(message, 1000); // timeout 1000ms -// - -namespace google_breakpad { -#define PRINT_MACH_RESULT(result_, message_) \ - printf(message_" %s (%d)\n", mach_error_string(result_), result_ ); - -//============================================================================== -// A wrapper class for mach_msg_port_descriptor_t (with same memory layout) -// with convenient constructors and accessors -class MachMsgPortDescriptor : public mach_msg_port_descriptor_t { - public: - // General-purpose constructor - MachMsgPortDescriptor(mach_port_t in_name, - mach_msg_type_name_t in_disposition) { - name = in_name; - pad1 = 0; - pad2 = 0; - disposition = in_disposition; - type = MACH_MSG_PORT_DESCRIPTOR; - } - - // For passing send rights to a port - MachMsgPortDescriptor(mach_port_t in_name) { - name = in_name; - pad1 = 0; - pad2 = 0; - disposition = MACH_MSG_TYPE_COPY_SEND; - type = MACH_MSG_PORT_DESCRIPTOR; - } - - // Copy constructor - MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { - name = desc.name; - pad1 = desc.pad1; - pad2 = desc.pad2; - disposition = desc.disposition; - type = desc.type; - } - - mach_port_t GetMachPort() const { - return name; - } - - mach_msg_type_name_t GetDisposition() const { - return disposition; - } - - // We're just a simple wrapper for mach_msg_port_descriptor_t - // and have the same memory layout - operator mach_msg_port_descriptor_t&() { - return *this; - } - - // For convenience - operator mach_port_t() const { - return GetMachPort(); - } -}; - -//============================================================================== -// MachMessage: a wrapper for a mach message -// (mach_msg_header_t, mach_msg_body_t, extra data) -// -// This considerably simplifies the construction of a message for sending -// and the getting at relevant data and descriptors for the receiver. -// -// Currently the combined size of the descriptors plus data must be -// less than 1024. But as a benefit no memory allocation is necessary. -// -// TODO: could consider adding malloc() support for very large messages -// -// A MachMessage object is used by ReceivePort::WaitForMessage -// and MachPortSender::SendMessage -// -class MachMessage { - public: - - // The receiver of the message can retrieve the raw data this way - u_int8_t *GetData() { - return GetDataLength() > 0 ? GetDataPacket()->data : NULL; - } - - u_int32_t GetDataLength() { - return EndianU32_LtoN(GetDataPacket()->data_length); - } - - // The message ID may be used as a code identifying the type of message - void SetMessageID(int32_t message_id) { - GetDataPacket()->id = EndianU32_NtoL(message_id); - } - - int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); } - - // Adds a descriptor (typically a mach port) to be translated - // returns true if successful, otherwise not enough space - bool AddDescriptor(const MachMsgPortDescriptor &desc); - - int GetDescriptorCount() const { return body.msgh_descriptor_count; } - MachMsgPortDescriptor *GetDescriptor(int n); - - // Convenience method which gets the mach port described by the descriptor - mach_port_t GetTranslatedPort(int n); - - // A simple message is one with no descriptors - bool IsSimpleMessage() const { return GetDescriptorCount() == 0; } - - // Sets raw data for the message (returns false if not enough space) - bool SetData(void *data, int32_t data_length); - - protected: - // Consider this an abstract base class - must create an actual instance - // of MachReceiveMessage or MachSendMessage - - MachMessage() { - memset(this, 0, sizeof(MachMessage)); - } - - friend class ReceivePort; - friend class MachPortSender; - - // Represents raw data in our message - struct MessageDataPacket { - int32_t id; // little-endian - int32_t data_length; // little-endian - u_int8_t data[1]; // actual size limited by sizeof(MachMessage) - }; - - MessageDataPacket* GetDataPacket(); - - void SetDescriptorCount(int n); - void SetDescriptor(int n, const MachMsgPortDescriptor &desc); - - // Returns total message size setting msgh_size in the header to this value - mach_msg_size_t CalculateSize(); - - mach_msg_header_t head; - mach_msg_body_t body; - u_int8_t padding[1024]; // descriptors and data may be embedded here -}; - -//============================================================================== -// MachReceiveMessage and MachSendMessage are useful to separate the idea -// of a mach message being sent and being received, and adds increased type -// safety: -// ReceivePort::WaitForMessage() only accepts a MachReceiveMessage -// MachPortSender::SendMessage() only accepts a MachSendMessage - -//============================================================================== -class MachReceiveMessage : public MachMessage { - public: - MachReceiveMessage() : MachMessage() {}; -}; - -//============================================================================== -class MachSendMessage : public MachMessage { - public: - MachSendMessage(int32_t message_id); -}; - -//============================================================================== -// Represents a mach port for which we have receive rights -class ReceivePort { - public: - // Creates a new mach port for receiving messages and registers a name for it - explicit ReceivePort(const char *receive_port_name); - - // Given an already existing mach port, use it. We take ownership of the - // port and deallocate it in our destructor. - explicit ReceivePort(mach_port_t receive_port); - - // Create a new mach port for receiving messages - ReceivePort(); - - ~ReceivePort(); - - // Waits on the mach port until message received or timeout - kern_return_t WaitForMessage(MachReceiveMessage *out_message, - mach_msg_timeout_t timeout); - - // The underlying mach port that we wrap - mach_port_t GetPort() const { return port_; } - - private: - ReceivePort(const ReceivePort&); // disable copy c-tor - - mach_port_t port_; - kern_return_t init_result_; -}; - -//============================================================================== -// Represents a mach port for which we have send rights -class MachPortSender { - public: - // get a port with send rights corresponding to a named registered service - explicit MachPortSender(const char *receive_port_name); - - - // Given an already existing mach port, use it. - explicit MachPortSender(mach_port_t send_port); - - kern_return_t SendMessage(MachSendMessage &message, - mach_msg_timeout_t timeout); - - private: - MachPortSender(const MachPortSender&); // disable copy c-tor - - mach_port_t send_port_; - kern_return_t init_result_; -}; - -} // namespace google_breakpad - -#endif // MACH_IPC_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.mm deleted file mode 100644 index 4f58c02d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/MachIPC.mm +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// MachIPC.mm -// Wrapper for mach IPC calls - -#import -#import "MachIPC.h" - -namespace google_breakpad { -//============================================================================== -MachSendMessage::MachSendMessage(int32_t message_id) : MachMessage() { - head.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); - - // head.msgh_remote_port = ...; // filled out in MachPortSender::SendMessage() - head.msgh_local_port = MACH_PORT_NULL; - head.msgh_reserved = 0; - head.msgh_id = 0; - - SetDescriptorCount(0); // start out with no descriptors - - SetMessageID(message_id); - SetData(NULL, 0); // client may add data later -} - -//============================================================================== -// returns true if successful -bool MachMessage::SetData(void *data, - int32_t data_length) { - // first check to make sure we have enough space - size_t size = CalculateSize(); - size_t new_size = size + data_length; - - if (new_size > sizeof(MachMessage)) { - return false; // not enough space - } - - GetDataPacket()->data_length = EndianU32_NtoL(data_length); - if (data) memcpy(GetDataPacket()->data, data, data_length); - - CalculateSize(); - - return true; -} - -//============================================================================== -// calculates and returns the total size of the message -// Currently, the entire message MUST fit inside of the MachMessage -// messsage size <= sizeof(MachMessage) -mach_msg_size_t MachMessage::CalculateSize() { - size_t size = sizeof(mach_msg_header_t) + sizeof(mach_msg_body_t); - - // add space for MessageDataPacket - int32_t alignedDataLength = (GetDataLength() + 3) & ~0x3; - size += 2*sizeof(int32_t) + alignedDataLength; - - // add space for descriptors - size += GetDescriptorCount() * sizeof(MachMsgPortDescriptor); - - head.msgh_size = static_cast(size); - - return head.msgh_size; -} - -//============================================================================== -MachMessage::MessageDataPacket *MachMessage::GetDataPacket() { - size_t desc_size = sizeof(MachMsgPortDescriptor)*GetDescriptorCount(); - MessageDataPacket *packet = - reinterpret_cast(padding + desc_size); - - return packet; -} - -//============================================================================== -void MachMessage::SetDescriptor(int n, - const MachMsgPortDescriptor &desc) { - MachMsgPortDescriptor *desc_array = - reinterpret_cast(padding); - desc_array[n] = desc; -} - -//============================================================================== -// returns true if successful otherwise there was not enough space -bool MachMessage::AddDescriptor(const MachMsgPortDescriptor &desc) { - // first check to make sure we have enough space - int size = CalculateSize(); - size_t new_size = size + sizeof(MachMsgPortDescriptor); - - if (new_size > sizeof(MachMessage)) { - return false; // not enough space - } - - // unfortunately, we need to move the data to allow space for the - // new descriptor - u_int8_t *p = reinterpret_cast(GetDataPacket()); - bcopy(p, p+sizeof(MachMsgPortDescriptor), GetDataLength()+2*sizeof(int32_t)); - - SetDescriptor(GetDescriptorCount(), desc); - SetDescriptorCount(GetDescriptorCount() + 1); - - CalculateSize(); - - return true; -} - -//============================================================================== -void MachMessage::SetDescriptorCount(int n) { - body.msgh_descriptor_count = n; - - if (n > 0) { - head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; - } else { - head.msgh_bits &= ~MACH_MSGH_BITS_COMPLEX; - } -} - -//============================================================================== -MachMsgPortDescriptor *MachMessage::GetDescriptor(int n) { - if (n < GetDescriptorCount()) { - MachMsgPortDescriptor *desc = - reinterpret_cast(padding); - return desc + n; - } - - return nil; -} - -//============================================================================== -mach_port_t MachMessage::GetTranslatedPort(int n) { - if (n < GetDescriptorCount()) { - return GetDescriptor(n)->GetMachPort(); - } - return MACH_PORT_NULL; -} - -#pragma mark - - -//============================================================================== -// create a new mach port for receiving messages and register a name for it -ReceivePort::ReceivePort(const char *receive_port_name) { - mach_port_t current_task = mach_task_self(); - - init_result_ = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &port_); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = mach_port_insert_right(current_task, - port_, - port_, - MACH_MSG_TYPE_MAKE_SEND); - - if (init_result_ != KERN_SUCCESS) - return; - - mach_port_t task_bootstrap_port = 0; - init_result_ = task_get_bootstrap_port(current_task, &task_bootstrap_port); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = bootstrap_register(bootstrap_port, - const_cast(receive_port_name), - port_); -} - -//============================================================================== -// create a new mach port for receiving messages -ReceivePort::ReceivePort() { - mach_port_t current_task = mach_task_self(); - - init_result_ = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &port_); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = mach_port_insert_right(current_task, - port_, - port_, - MACH_MSG_TYPE_MAKE_SEND); -} - -//============================================================================== -// Given an already existing mach port, use it. We take ownership of the -// port and deallocate it in our destructor. -ReceivePort::ReceivePort(mach_port_t receive_port) - : port_(receive_port), - init_result_(KERN_SUCCESS) { -} - -//============================================================================== -ReceivePort::~ReceivePort() { - if (init_result_ == KERN_SUCCESS) - mach_port_deallocate(mach_task_self(), port_); -} - -//============================================================================== -kern_return_t ReceivePort::WaitForMessage(MachReceiveMessage *out_message, - mach_msg_timeout_t timeout) { - if (!out_message) { - return KERN_INVALID_ARGUMENT; - } - - // return any error condition encountered in constructor - if (init_result_ != KERN_SUCCESS) - return init_result_; - - out_message->head.msgh_bits = 0; - out_message->head.msgh_local_port = port_; - out_message->head.msgh_remote_port = MACH_PORT_NULL; - out_message->head.msgh_reserved = 0; - out_message->head.msgh_id = 0; - - mach_msg_option_t options = MACH_RCV_MSG; - if (timeout != MACH_MSG_TIMEOUT_NONE) - options |= MACH_RCV_TIMEOUT; - kern_return_t result = mach_msg(&out_message->head, - options, - 0, - sizeof(MachMessage), - port_, - timeout, // timeout in ms - MACH_PORT_NULL); - - return result; -} - -#pragma mark - - -//============================================================================== -// get a port with send rights corresponding to a named registered service -MachPortSender::MachPortSender(const char *receive_port_name) { - mach_port_t task_bootstrap_port = 0; - init_result_ = task_get_bootstrap_port(mach_task_self(), - &task_bootstrap_port); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = bootstrap_look_up(task_bootstrap_port, - const_cast(receive_port_name), - &send_port_); -} - -//============================================================================== -MachPortSender::MachPortSender(mach_port_t send_port) - : send_port_(send_port), - init_result_(KERN_SUCCESS) { -} - -//============================================================================== -kern_return_t MachPortSender::SendMessage(MachSendMessage &message, - mach_msg_timeout_t timeout) { - if (message.head.msgh_size == 0) { - return KERN_INVALID_VALUE; // just for safety -- never should occur - }; - - if (init_result_ != KERN_SUCCESS) - return init_result_; - - message.head.msgh_remote_port = send_port_; - - kern_return_t result = mach_msg(&message.head, - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - message.head.msgh_size, - 0, - MACH_PORT_NULL, - timeout, // timeout in ms - MACH_PORT_NULL); - - return result; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.h deleted file mode 100644 index 3d6c27bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.h +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// SimpleStringDictionary.h -// - -#ifndef SimpleStringDictionary_H__ -#define SimpleStringDictionary_H__ - -#import -#import - -namespace google_breakpad { - -//============================================================================== -// SimpleStringDictionary (and associated class KeyValueEntry) implement a very -// basic dictionary container class. It has the property of not making any -// memory allocations when getting and setting values. But it is not very -// efficient, with calls to get and set values operating in linear time. -// It has the additional limitation of having a fairly small fixed capacity of -// SimpleStringDictionary::MAX_NUM_ENTRIES entries. An assert() will fire if -// the client attempts to set more than this number of key/value pairs. -// Ordinarilly a C++ programmer would use something like the std::map template -// class, or on the Macintosh would often choose CFDictionary or NSDictionary. -// But these dictionary classes may call malloc() during get and set operations. -// Google Breakpad requires that no memory allocations be made in code running -// in its exception handling thread, so it uses SimpleStringDictionary as the -// underlying implementation for the GoogleBreakpad.framework APIs: -// GoogleBreakpadSetKeyValue(), GoogleBreakpadKeyValue(), and -// GoogleBreakpadRemoveKeyValue() -// - -//============================================================================== -// KeyValueEntry -// -// A helper class used by SimpleStringDictionary representing a single -// storage cell for a key/value pair. Each key and value string are -// limited to MAX_STRING_STORAGE_SIZE-1 bytes (not glyphs). This class -// performs no memory allocations. It has methods for setting and getting -// key and value strings. -// -class KeyValueEntry { - public: - KeyValueEntry() { - Clear(); - } - - KeyValueEntry(const char *key, const char *value) { - SetKeyValue(key, value); - } - - void SetKeyValue(const char *key, const char *value) { - if (!key) { - key = ""; - } - if (!value) { - value = ""; - } - - strlcpy(key_, key, sizeof(key_)); - strlcpy(value_, value, sizeof(value_)); - } - - void SetValue(const char *value) { - if (!value) { - value = ""; - } - strlcpy(value_, value, sizeof(value_)); - }; - - // Removes the key/value - void Clear() { - memset(key_, 0, sizeof(key_)); - memset(value_, 0, sizeof(value_)); - } - - bool IsActive() const { return key_[0] != '\0'; } - const char *GetKey() const { return key_; } - const char *GetValue() const { return value_; } - - // Don't change this without considering the fixed size - // of MachMessage (in MachIPC.h) - // (see also struct KeyValueMessageData in Inspector.h) - enum {MAX_STRING_STORAGE_SIZE = 256}; - - private: - char key_[MAX_STRING_STORAGE_SIZE]; - char value_[MAX_STRING_STORAGE_SIZE]; -}; - -//============================================================================== -// This class is not an efficient dictionary, but for the purposes of breakpad -// will be just fine. We're just dealing with ten or so distinct -// key/value pairs. The idea is to avoid any malloc() or free() calls -// in certain important methods to be called when a process is in a -// crashed state. Each key and value string are limited to -// KeyValueEntry::MAX_STRING_STORAGE_SIZE-1 bytes (not glyphs). Strings passed -// in exceeding this length will be truncated. -// -class SimpleStringDictionary { - public: - SimpleStringDictionary() {}; // entries will all be cleared - - // Returns the number of active key/value pairs. The upper limit for this - // is MAX_NUM_ENTRIES. - int GetCount() const; - - // Given |key|, returns its corresponding |value|. - // If |key| is NULL, an assert will fire or NULL will be returned. If |key| - // is not found or is an empty string, NULL is returned. - const char *GetValueForKey(const char *key); - - // Stores a string |value| represented by |key|. If |key| is NULL or an empty - // string, this will assert (or do nothing). If |value| is NULL then - // the |key| will be removed. An empty string is OK for |value|. - void SetKeyValue(const char *key, const char *value); - - // Given |key|, removes any associated value. It will assert (or do nothing) - // if NULL is passed in. It will do nothing if |key| is not found. - void RemoveKey(const char *key); - - // This is the maximum number of key/value pairs which may be set in the - // dictionary. An assert may fire if more values than this are set. - // Don't change this without also changing comment in GoogleBreakpad.h - enum {MAX_NUM_ENTRIES = 64}; - - private: - friend class SimpleStringDictionaryIterator; - - const KeyValueEntry *GetEntry(int i) const; - - KeyValueEntry entries_[MAX_NUM_ENTRIES]; -}; - -//============================================================================== -class SimpleStringDictionaryIterator { - public: - SimpleStringDictionaryIterator(const SimpleStringDictionary &dict) - : dict_(dict), i_(0) { - } - - // Initializes iterator to the beginning (may later call Next() ) - void Start() { - i_ = 0; - } - - // like the nextObject method of NSEnumerator (in Cocoa) - // returns NULL when there are no more entries - // - const KeyValueEntry* Next() { - for (; i_ < SimpleStringDictionary::MAX_NUM_ENTRIES; ++i_) { - const KeyValueEntry *entry = dict_.GetEntry(i_); - if (entry->IsActive()) { - i_++; // move to next entry for next time - return entry; - } - } - - return NULL; // reached end of array - } - - private: - const SimpleStringDictionary& dict_; - int i_; -}; - -} // namespace google_breakpad - -#endif // SimpleStringDictionary_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.mm deleted file mode 100644 index d9c791cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/SimpleStringDictionary.mm +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// SimpleStringDictionary.mm -// Simple string dictionary that does not allocate memory -// - -#include - -#import "SimpleStringDictionary.h" - -namespace google_breakpad { - -//============================================================================== -const KeyValueEntry *SimpleStringDictionary::GetEntry(int i) const { - return (i >= 0 && i < MAX_NUM_ENTRIES) ? &entries_[i] : NULL; -} - -//============================================================================== -int SimpleStringDictionary::GetCount() const { - int count = 0; - for (int i = 0; i < MAX_NUM_ENTRIES; ++i) { - if (entries_[i].IsActive() ) { - ++count; - } - } - - return count; -} - -//============================================================================== -const char *SimpleStringDictionary::GetValueForKey(const char *key) { - assert(key); - if (!key) - return NULL; - - for (int i = 0; i < MAX_NUM_ENTRIES; ++i) { - KeyValueEntry &entry = entries_[i]; - if (entry.IsActive() && !strcmp(entry.GetKey(), key)) { - return entry.GetValue(); - } - } - - return NULL; -} - -//============================================================================== -void SimpleStringDictionary::SetKeyValue(const char *key, - const char *value) { - if (!value) { - RemoveKey(key); - return; - } - - // key must not be NULL - assert(key); - if (!key) - return; - - // key must not be empty string - assert(key[0] != '\0'); - if (key[0] == '\0') - return; - - int free_index = -1; - - // check if key already exists - for (int i = 0; i < MAX_NUM_ENTRIES; ++i) { - KeyValueEntry &entry = entries_[i]; - - if (entry.IsActive()) { - if (!strcmp(entry.GetKey(), key)) { - entry.SetValue(value); - return; - } - } else { - // Make a note of an empty slot - if (free_index == -1) { - free_index = i; - } - } - } - - // check if we've run out of space - assert(free_index != -1); - - // Put new key into an empty slot (if found) - if (free_index != -1) { - entries_[free_index].SetKeyValue(key, value); - } -} - -//============================================================================== -void SimpleStringDictionary::RemoveKey(const char *key) { - assert(key); - if (!key) - return; - - for (int i = 0; i < MAX_NUM_ENTRIES; ++i) { - if (!strcmp(entries_[i].GetKey(), key)) { - entries_[i].Clear(); - return; - } - } -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/byteswap.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/byteswap.h deleted file mode 100644 index a5d745b3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/byteswap.h +++ /dev/null @@ -1,48 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// byteswap.h: Overloaded functions for conveniently byteswapping values. - -#ifndef COMMON_MAC_BYTESWAP_H_ -#define COMMON_MAC_BYTESWAP_H_ - -#include - -static inline uint16_t ByteSwap(uint16_t v) { return OSSwapInt16(v); } -static inline uint32_t ByteSwap(uint32_t v) { return OSSwapInt32(v); } -static inline uint64_t ByteSwap(uint64_t v) { return OSSwapInt64(v); } -static inline int16_t ByteSwap(int16_t v) { return OSSwapInt16(v); } -static inline int32_t ByteSwap(int32_t v) { return OSSwapInt32(v); } -static inline int64_t ByteSwap(int64_t v) { return OSSwapInt64(v); } - -#endif // COMMON_MAC_BYTESWAP_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.h deleted file mode 100644 index fbf11c78..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.h +++ /dev/null @@ -1,171 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Jim Blandy - -// dump_syms.h: Declaration of google_breakpad::DumpSymbols, a class for -// reading debugging information from Mach-O files and writing it out as a -// Breakpad symbol file. - -#include -#include -#include -#include - -#include -#include - -#include "common/byte_cursor.h" -#include "common/mac/macho_reader.h" -#include "common/module.h" - -namespace google_breakpad { - -class DumpSymbols { - public: - DumpSymbols() - : input_pathname_(), - object_filename_(), - contents_(), - selected_object_file_(), - selected_object_name_() { } - ~DumpSymbols() { - [input_pathname_ release]; - [object_filename_ release]; - [contents_ release]; - } - - // Prepare to read debugging information from |filename|. |filename| may be - // the name of a universal binary, a Mach-O file, or a dSYM bundle - // containing either of the above. On success, return true; if there is a - // problem reading |filename|, report it and return false. - // - // (This class uses NSString for filenames and related values, - // because the Mac Foundation framework seems to support - // filename-related operations more fully on NSString values.) - bool Read(NSString *filename); - - // If this dumper's file includes an object file for |cpu_type| and - // |cpu_subtype|, then select that object file for dumping, and return - // true. Otherwise, return false, and leave this dumper's selected - // architecture unchanged. - // - // By default, if this dumper's file contains only one object file, then - // the dumper will dump those symbols; and if it contains more than one - // object file, then the dumper will dump the object file whose - // architecture matches that of this dumper program. - bool SetArchitecture(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype); - - // If this dumper's file includes an object file for |arch_name|, then select - // that object file for dumping, and return true. Otherwise, return false, - // and leave this dumper's selected architecture unchanged. - // - // By default, if this dumper's file contains only one object file, then - // the dumper will dump those symbols; and if it contains more than one - // object file, then the dumper will dump the object file whose - // architecture matches that of this dumper program. - bool SetArchitecture(const std::string &arch_name); - - // Return a pointer to an array of 'struct fat_arch' structures, - // describing the object files contained in this dumper's file. Set - // *|count| to the number of elements in the array. The returned array is - // owned by this DumpSymbols instance. - // - // If there are no available architectures, this function - // may return NULL. - const struct fat_arch *AvailableArchitectures(size_t *count) { - *count = object_files_.size(); - if (object_files_.size() > 0) - return &object_files_[0]; - return NULL; - } - - // Read the selected object file's debugging information, and write it - // out to |stream|. Return true on success; if an error occurs, report it - // and return false. - bool WriteSymbolFile(FILE *stream); - - private: - // Used internally. - class DumperLineToModule; - class LoadCommandDumper; - - // Return an identifier string for the file this DumpSymbols is dumping. - std::string Identifier(); - - // Read debugging information from |dwarf_sections|, which was taken from - // |macho_reader|, and add it to |module|. On success, return true; - // on failure, report the problem and return false. - bool ReadDwarf(google_breakpad::Module *module, - const mach_o::Reader &macho_reader, - const mach_o::SectionMap &dwarf_sections) const; - - // Read DWARF CFI or .eh_frame data from |section|, belonging to - // |macho_reader|, and record it in |module|. If |eh_frame| is true, - // then the data is .eh_frame-format data; otherwise, it is standard DWARF - // .debug_frame data. On success, return true; on failure, report - // the problem and return false. - bool ReadCFI(google_breakpad::Module *module, - const mach_o::Reader &macho_reader, - const mach_o::Section §ion, - bool eh_frame) const; - - // The name of the file or bundle whose symbols this will dump. - // This is the path given to Read, for use in error messages. - NSString *input_pathname_; - - // The name of the file this DumpSymbols will actually read debugging - // information from. Normally, this is the same as input_pathname_, but if - // filename refers to a dSYM bundle, then this is the resource file - // within that bundle. - NSString *object_filename_; - - // The complete contents of object_filename_, mapped into memory. - NSData *contents_; - - // A vector of fat_arch structures describing the object files - // object_filename_ contains. If object_filename_ refers to a fat binary, - // this may have more than one element; if it refers to a Mach-O file, this - // has exactly one element. - vector object_files_; - - // The object file in object_files_ selected to dump, or NULL if - // SetArchitecture hasn't been called yet. - const struct fat_arch *selected_object_file_; - - // A string that identifies the selected object file, for use in error - // messages. This is usually object_filename_, but if that refers to a - // fat binary, it includes an indication of the particular architecture - // within that binary. - string selected_object_name_; -}; - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.mm deleted file mode 100644 index cc2efe17..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/dump_syms.mm +++ /dev/null @@ -1,495 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Jim Blandy - -// dump_syms.mm: Create a symbol file for use with minidumps - -#include "common/mac/dump_syms.h" - -#include -#include -#include -#include - -#include -#include - -#include "common/dwarf/bytereader-inl.h" -#include "common/dwarf/dwarf2reader.h" -#include "common/dwarf_cfi_to_module.h" -#include "common/dwarf_cu_to_module.h" -#include "common/dwarf_line_to_module.h" -#include "common/mac/file_id.h" -#include "common/mac/macho_reader.h" -#include "common/module.h" -#include "common/stabs_reader.h" -#include "common/stabs_to_module.h" - -#ifndef CPU_TYPE_ARM -#define CPU_TYPE_ARM (static_cast(12)) -#endif // CPU_TYPE_ARM - -using dwarf2reader::ByteReader; -using google_breakpad::DwarfCUToModule; -using google_breakpad::DwarfLineToModule; -using google_breakpad::FileID; -using google_breakpad::mach_o::FatReader; -using google_breakpad::mach_o::Section; -using google_breakpad::mach_o::Segment; -using google_breakpad::Module; -using google_breakpad::StabsReader; -using google_breakpad::StabsToModule; -using std::make_pair; -using std::pair; -using std::string; -using std::vector; - -namespace google_breakpad { - -bool DumpSymbols::Read(NSString *filename) { - if (![[NSFileManager defaultManager] fileExistsAtPath:filename]) { - fprintf(stderr, "Object file does not exist: %s\n", - [filename fileSystemRepresentation]); - return false; - } - - input_pathname_ = [filename retain]; - - // Does this filename refer to a dSYM bundle? - NSBundle *bundle = [NSBundle bundleWithPath:input_pathname_]; - - if (bundle) { - // Filenames referring to bundles usually have names of the form - // ".dSYM"; however, if the user has specified a wrapper - // suffix (the WRAPPER_SUFFIX and WRAPPER_EXTENSION build settings), - // then the name may have the form "..dSYM". In - // either case, the resource name for the file containing the DWARF - // info within the bundle is . - // - // Since there's no way to tell how much to strip off, remove one - // extension at a time, and use the first one that - // pathForResource:ofType:inDirectory likes. - NSString *base_name = [input_pathname_ lastPathComponent]; - NSString *dwarf_resource; - - do { - NSString *new_base_name = [base_name stringByDeletingPathExtension]; - - // If stringByDeletingPathExtension returned the name unchanged, then - // there's nothing more for us to strip off --- lose. - if ([new_base_name isEqualToString:base_name]) { - fprintf(stderr, "Unable to find DWARF-bearing file in bundle: %s\n", - [input_pathname_ fileSystemRepresentation]); - return false; - } - - // Take the shortened result as our new base_name. - base_name = new_base_name; - - // Try to find a DWARF resource in the bundle under the new base_name. - dwarf_resource = [bundle pathForResource:base_name - ofType:nil inDirectory:@"DWARF"]; - } while (!dwarf_resource); - - object_filename_ = [dwarf_resource retain]; - } else { - object_filename_ = [input_pathname_ retain]; - } - - // Read the file's contents into memory. - // - // The documentation for dataWithContentsOfMappedFile says: - // - // Because of file mapping restrictions, this method should only be - // used if the file is guaranteed to exist for the duration of the - // data object’s existence. It is generally safer to use the - // dataWithContentsOfFile: method. - // - // I gather this means that OS X doesn't have (or at least, that method - // doesn't use) a form of mapping like Linux's MAP_PRIVATE, where the - // process appears to get its own copy of the data, and changes to the - // file don't affect memory and vice versa). - NSError *error; - contents_ = [NSData dataWithContentsOfFile:object_filename_ - options:0 - error:&error]; - if (!contents_) { - fprintf(stderr, "Error reading object file: %s: %s\n", - [object_filename_ fileSystemRepresentation], - [[error localizedDescription] UTF8String]); - return false; - } - [contents_ retain]; - - // Get the list of object files present in the file. - FatReader::Reporter fat_reporter([object_filename_ - fileSystemRepresentation]); - FatReader fat_reader(&fat_reporter); - if (!fat_reader.Read(reinterpret_cast([contents_ bytes]), - [contents_ length])) { - return false; - } - - // Get our own copy of fat_reader's object file list. - size_t object_files_count; - const struct fat_arch *object_files = - fat_reader.object_files(&object_files_count); - if (object_files_count == 0) { - fprintf(stderr, "Fat binary file contains *no* architectures: %s\n", - [object_filename_ fileSystemRepresentation]); - return false; - } - object_files_.resize(object_files_count); - memcpy(&object_files_[0], object_files, - sizeof(struct fat_arch) * object_files_count); - - return true; -} - -bool DumpSymbols::SetArchitecture(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype) { - // Find the best match for the architecture the user requested. - const struct fat_arch *best_match - = NXFindBestFatArch(cpu_type, cpu_subtype, &object_files_[0], - static_cast(object_files_.size())); - if (!best_match) return false; - - // Record the selected object file. - selected_object_file_ = best_match; - return true; -} - -bool DumpSymbols::SetArchitecture(const std::string &arch_name) { - bool arch_set = false; - const NXArchInfo *arch_info = NXGetArchInfoFromName(arch_name.c_str()); - if (arch_info) { - arch_set = SetArchitecture(arch_info->cputype, arch_info->cpusubtype); - } - return arch_set; -} - -string DumpSymbols::Identifier() { - FileID file_id([object_filename_ fileSystemRepresentation]); - unsigned char identifier_bytes[16]; - cpu_type_t cpu_type = selected_object_file_->cputype; - if (!file_id.MachoIdentifier(cpu_type, identifier_bytes)) { - fprintf(stderr, "Unable to calculate UUID of mach-o binary %s!\n", - [object_filename_ fileSystemRepresentation]); - return ""; - } - - char identifier_string[40]; - FileID::ConvertIdentifierToString(identifier_bytes, identifier_string, - sizeof(identifier_string)); - - string compacted(identifier_string); - for(size_t i = compacted.find('-'); i != string::npos; - i = compacted.find('-', i)) - compacted.erase(i, 1); - - return compacted; -} - -// A line-to-module loader that accepts line number info parsed by -// dwarf2reader::LineInfo and populates a Module and a line vector -// with the results. -class DumpSymbols::DumperLineToModule: - public DwarfCUToModule::LineToModuleFunctor { - public: - // Create a line-to-module converter using BYTE_READER. - DumperLineToModule(dwarf2reader::ByteReader *byte_reader) - : byte_reader_(byte_reader) { } - void operator()(const char *program, uint64 length, - Module *module, vector *lines) { - DwarfLineToModule handler(module, lines); - dwarf2reader::LineInfo parser(program, length, byte_reader_, &handler); - parser.Start(); - } - private: - dwarf2reader::ByteReader *byte_reader_; // WEAK -}; - -bool DumpSymbols::ReadDwarf(google_breakpad::Module *module, - const mach_o::Reader &macho_reader, - const mach_o::SectionMap &dwarf_sections) const { - // Build a byte reader of the appropriate endianness. - ByteReader byte_reader(macho_reader.big_endian() - ? dwarf2reader::ENDIANNESS_BIG - : dwarf2reader::ENDIANNESS_LITTLE); - - // Construct a context for this file. - DwarfCUToModule::FileContext file_context(selected_object_name_, - module); - - // Build a dwarf2reader::SectionMap from our mach_o::SectionMap. - for (mach_o::SectionMap::const_iterator it = dwarf_sections.begin(); - it != dwarf_sections.end(); it++) { - file_context.section_map[it->first] = - make_pair(reinterpret_cast(it->second.contents.start), - it->second.contents.Size()); - } - - // Find the __debug_info section. - std::pair debug_info_section - = file_context.section_map["__debug_info"]; - // There had better be a __debug_info section! - if (!debug_info_section.first) { - fprintf(stderr, "%s: __DWARF segment of file has no __debug_info section\n", - selected_object_name_.c_str()); - return false; - } - - // Build a line-to-module loader for the root handler to use. - DumperLineToModule line_to_module(&byte_reader); - - // Walk the __debug_info section, one compilation unit at a time. - uint64 debug_info_length = debug_info_section.second; - for (uint64 offset = 0; offset < debug_info_length;) { - // Make a handler for the root DIE that populates MODULE with the - // debug info. - DwarfCUToModule::WarningReporter reporter(selected_object_name_, - offset); - DwarfCUToModule root_handler(&file_context, &line_to_module, &reporter); - // Make a Dwarf2Handler that drives our DIEHandler. - dwarf2reader::DIEDispatcher die_dispatcher(&root_handler); - // Make a DWARF parser for the compilation unit at OFFSET. - dwarf2reader::CompilationUnit dwarf_reader(file_context.section_map, - offset, - &byte_reader, - &die_dispatcher); - // Process the entire compilation unit; get the offset of the next. - offset += dwarf_reader.Start(); - } - - return true; -} - -bool DumpSymbols::ReadCFI(google_breakpad::Module *module, - const mach_o::Reader &macho_reader, - const mach_o::Section §ion, - bool eh_frame) const { - // Find the appropriate set of register names for this file's - // architecture. - vector register_names; - switch (macho_reader.cpu_type()) { - case CPU_TYPE_X86: - register_names = DwarfCFIToModule::RegisterNames::I386(); - break; - case CPU_TYPE_X86_64: - register_names = DwarfCFIToModule::RegisterNames::X86_64(); - break; - case CPU_TYPE_ARM: - register_names = DwarfCFIToModule::RegisterNames::ARM(); - break; - default: { - const NXArchInfo *arch = - NXGetArchInfoFromCpuType(macho_reader.cpu_type(), - macho_reader.cpu_subtype()); - fprintf(stderr, "%s: cannot convert DWARF call frame information for ", - selected_object_name_.c_str()); - if (arch) - fprintf(stderr, "architecture '%s'", arch->name); - else - fprintf(stderr, "architecture %d,%d", - macho_reader.cpu_type(), macho_reader.cpu_subtype()); - fprintf(stderr, " to Breakpad symbol file: no register name table\n"); - return false; - } - } - - // Find the call frame information and its size. - const char *cfi = reinterpret_cast(section.contents.start); - size_t cfi_size = section.contents.Size(); - - // Plug together the parser, handler, and their entourages. - DwarfCFIToModule::Reporter module_reporter(selected_object_name_, - section.section_name); - DwarfCFIToModule handler(module, register_names, &module_reporter); - dwarf2reader::ByteReader byte_reader(macho_reader.big_endian() ? - dwarf2reader::ENDIANNESS_BIG : - dwarf2reader::ENDIANNESS_LITTLE); - byte_reader.SetAddressSize(macho_reader.bits_64() ? 8 : 4); - // At the moment, according to folks at Apple and some cursory - // investigation, Mac OS X only uses DW_EH_PE_pcrel-based pointers, so - // this is the only base address the CFI parser will need. - byte_reader.SetCFIDataBase(section.address, cfi); - - dwarf2reader::CallFrameInfo::Reporter dwarf_reporter(selected_object_name_, - section.section_name); - dwarf2reader::CallFrameInfo parser(cfi, cfi_size, - &byte_reader, &handler, &dwarf_reporter, - eh_frame); - parser.Start(); - return true; -} - -// A LoadCommandHandler that loads whatever debugging data it finds into a -// Module. -class DumpSymbols::LoadCommandDumper: - public mach_o::Reader::LoadCommandHandler { - public: - // Create a load command dumper handling load commands from READER's - // file, and adding data to MODULE. - LoadCommandDumper(const DumpSymbols &dumper, - google_breakpad::Module *module, - const mach_o::Reader &reader) - : dumper_(dumper), module_(module), reader_(reader) { } - - bool SegmentCommand(const mach_o::Segment &segment); - bool SymtabCommand(const ByteBuffer &entries, const ByteBuffer &strings); - - private: - const DumpSymbols &dumper_; - google_breakpad::Module *module_; // WEAK - const mach_o::Reader &reader_; -}; - -bool DumpSymbols::LoadCommandDumper::SegmentCommand(const Segment &segment) { - mach_o::SectionMap section_map; - if (!reader_.MapSegmentSections(segment, §ion_map)) - return false; - - if (segment.name == "__TEXT") { - module_->SetLoadAddress(segment.vmaddr); - mach_o::SectionMap::const_iterator eh_frame = - section_map.find("__eh_frame"); - if (eh_frame != section_map.end()) { - // If there is a problem reading this, don't treat it as a fatal error. - dumper_.ReadCFI(module_, reader_, eh_frame->second, true); - } - return true; - } - - if (segment.name == "__DWARF") { - if (!dumper_.ReadDwarf(module_, reader_, section_map)) - return false; - mach_o::SectionMap::const_iterator debug_frame - = section_map.find("__debug_frame"); - if (debug_frame != section_map.end()) { - // If there is a problem reading this, don't treat it as a fatal error. - dumper_.ReadCFI(module_, reader_, debug_frame->second, false); - } - } - - return true; -} - -bool DumpSymbols::LoadCommandDumper::SymtabCommand(const ByteBuffer &entries, - const ByteBuffer &strings) { - StabsToModule stabs_to_module(module_); - // Mac OS X STABS are never "unitized", and the size of the 'value' field - // matches the address size of the executable. - StabsReader stabs_reader(entries.start, entries.Size(), - strings.start, strings.Size(), - reader_.big_endian(), - reader_.bits_64() ? 8 : 4, - true, - &stabs_to_module); - if (!stabs_reader.Process()) - return false; - stabs_to_module.Finalize(); - return true; -} - -bool DumpSymbols::WriteSymbolFile(FILE *stream) { - // Select an object file, if SetArchitecture hasn't been called to set one - // explicitly. - if (!selected_object_file_) { - // If there's only one architecture, that's the one. - if (object_files_.size() == 1) - selected_object_file_ = &object_files_[0]; - else { - // Look for an object file whose architecture matches our own. - const NXArchInfo *local_arch = NXGetLocalArchInfo(); - if (!SetArchitecture(local_arch->cputype, local_arch->cpusubtype)) { - fprintf(stderr, "%s: object file contains more than one" - " architecture, none of which match the current" - " architecture; specify an architecture explicitly" - " with '-a ARCH' to resolve the ambiguity\n", - [object_filename_ fileSystemRepresentation]); - return false; - } - } - } - - assert(selected_object_file_); - - // Find the name of the selected file's architecture, to appear in - // the MODULE record and in error messages. - const NXArchInfo *selected_arch_info - = NXGetArchInfoFromCpuType(selected_object_file_->cputype, - selected_object_file_->cpusubtype); - - const char *selected_arch_name = selected_arch_info->name; - if (strcmp(selected_arch_name, "i386") == 0) - selected_arch_name = "x86"; - - // Produce a name to use in error messages that includes the - // filename, and the architecture, if there is more than one. - selected_object_name_ = [object_filename_ UTF8String]; - if (object_files_.size() > 1) { - selected_object_name_ += ", architecture "; - selected_object_name_ + selected_arch_name; - } - - // Compute a module name, to appear in the MODULE record. - NSString *module_name = [object_filename_ lastPathComponent]; - - // Choose an identifier string, to appear in the MODULE record. - string identifier = Identifier(); - if (identifier.empty()) - return false; - identifier += "0"; - - // Create a module to hold the debugging information. - Module module([module_name UTF8String], "mac", selected_arch_name, - identifier); - - // Parse the selected object file. - mach_o::Reader::Reporter reporter(selected_object_name_); - mach_o::Reader reader(&reporter); - if (!reader.Read(reinterpret_cast([contents_ bytes]) - + selected_object_file_->offset, - selected_object_file_->size, - selected_object_file_->cputype, - selected_object_file_->cpusubtype)) - return false; - - // Walk its load commands, and deal with whatever is there. - LoadCommandDumper load_command_dumper(*this, &module, reader); - if (!reader.WalkLoadCommands(&load_command_dumper)) - return false; - - return module.Write(stream); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.cc deleted file mode 100644 index ebb8c40e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.cc +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// -// Author: Dan Waylonis - -#include -#include -#include - -#include "common/mac/file_id.h" -#include "common/mac/macho_id.h" - -using MacFileUtilities::MachoID; - -namespace google_breakpad { - -FileID::FileID(const char *path) { - strlcpy(path_, path, sizeof(path_)); -} - -bool FileID::FileIdentifier(unsigned char identifier[16]) { - int fd = open(path_, O_RDONLY); - if (fd == -1) - return false; - - MD5_CTX md5; - MD5_Init(&md5); - - // Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but - // doesn't seem to be an unreasonable size for the stack. - unsigned char buffer[4096 * 2]; - size_t buffer_size = sizeof(buffer); - while ((buffer_size = read(fd, buffer, buffer_size) > 0)) { - MD5_Update(&md5, buffer, buffer_size); - } - - close(fd); - MD5_Final(identifier, &md5); - - return true; -} - -bool FileID::MachoIdentifier(int cpu_type, unsigned char identifier[16]) { - MachoID macho(path_); - - if (macho.UUIDCommand(cpu_type, identifier)) - return true; - - return macho.MD5(cpu_type, identifier); -} - -// static -void FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - int buffer_idx = 0; - for (int idx = 0; (buffer_idx < buffer_length) && (idx < 16); ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - if (idx == 4 || idx == 6 || idx == 8 || idx == 10) - buffer[buffer_idx++] = '-'; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // NULL terminate - buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.h deleted file mode 100644 index eb06b0d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/file_id.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.h: Return a unique identifier for a file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_FILE_ID_H__ -#define COMMON_MAC_FILE_ID_H__ - -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool FileIdentifier(unsigned char identifier[16]); - - // Treat the file as a mach-o file that will contain one or more archicture. - // Accepted values for |cpu_type| (e.g., CPU_TYPE_X86 or CPU_TYPE_POWERPC) - // are listed in /usr/include/mach/machine.h. - // If |cpu_type| is 0, then the native cpu type is used. - // Returns false if opening the file failed or if the |cpu_type| is not - // present in the file. - // Return the unique identifier in |identifier|. - // The current implementation will look for the (in order of priority): - // LC_UUID, LC_ID_DYLIB, or MD5 hash of the given |cpu_type|. - bool MachoIdentifier(int cpu_type, unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). - // The |buffer| should be at least 37 bytes long to receive all of the data - // and termination. Shorter buffers will contain truncated data. - static void ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_MAC_FILE_ID_H__ - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.cc deleted file mode 100644 index 486cf536..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.cc +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.cc: Functions to gather identifying information from a macho file -// -// See macho_id.h for documentation -// -// Author: Dan Waylonis - -extern "C" { // necessary for Leopard - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -} - -#include "common/mac/macho_id.h" -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -MachoID::MachoID(const char *path) - : file_(0), - crc_(0), - md5_context_(), - sha1_context_(), - update_function_(NULL) { - strlcpy(path_, path, sizeof(path_)); - file_ = open(path, O_RDONLY); -} - -MachoID::~MachoID() { - if (file_ != -1) - close(file_); -} - -// The CRC info is from http://en.wikipedia.org/wiki/Adler-32 -// With optimizations from http://www.zlib.net/ - -// The largest prime smaller than 65536 -#define MOD_ADLER 65521 -// MAX_BLOCK is the largest n such that 255n(n+1)/2 + (n+1)(MAX_BLOCK-1) <= 2^32-1 -#define MAX_BLOCK 5552 - -void MachoID::UpdateCRC(unsigned char *bytes, size_t size) { -// Unrolled loops for summing -#define DO1(buf,i) {sum1 += (buf)[i]; sum2 += sum1;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - // Split up the crc - uint32_t sum1 = crc_ & 0xFFFF; - uint32_t sum2 = (crc_ >> 16) & 0xFFFF; - - // Do large blocks - while (size >= MAX_BLOCK) { - size -= MAX_BLOCK; - int block_count = MAX_BLOCK / 16; - do { - DO16(bytes); - bytes += 16; - } while (--block_count); - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - } - - // Do remaining bytes - if (size) { - while (size >= 16) { - size -= 16; - DO16(bytes); - bytes += 16; - } - while (size--) { - sum1 += *bytes++; - sum2 += sum1; - } - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - crc_ = (sum2 << 16) | sum1; - } -} - -void MachoID::UpdateMD5(unsigned char *bytes, size_t size) { - MD5_Update(&md5_context_, bytes, size); -} - -void MachoID::UpdateSHA1(unsigned char *bytes, size_t size) { - SHA_Update(&sha1_context_, bytes, size); -} - -void MachoID::Update(MachoWalker *walker, off_t offset, size_t size) { - if (!update_function_ || !size) - return; - - // Read up to 4k bytes at a time - unsigned char buffer[4096]; - size_t buffer_size; - off_t file_offset = offset; - while (size > 0) { - if (size > sizeof(buffer)) { - buffer_size = sizeof(buffer); - size -= buffer_size; - } else { - buffer_size = size; - size = 0; - } - - if (!walker->ReadBytes(buffer, buffer_size, file_offset)) - return; - - (this->*update_function_)(buffer, buffer_size); - file_offset += buffer_size; - } -} - -bool MachoID::UUIDCommand(int cpu_type, unsigned char bytes[16]) { - struct breakpad_uuid_command uuid_cmd; - MachoWalker walker(path_, UUIDWalkerCB, &uuid_cmd); - - uuid_cmd.cmd = 0; - if (!walker.WalkHeader(cpu_type)) - return false; - - // If we found the command, we'll have initialized the uuid_command - // structure - if (uuid_cmd.cmd == LC_UUID) { - memcpy(bytes, uuid_cmd.uuid, sizeof(uuid_cmd.uuid)); - return true; - } - - return false; -} - -bool MachoID::IDCommand(int cpu_type, unsigned char identifier[16]) { - struct dylib_command dylib_cmd; - MachoWalker walker(path_, IDWalkerCB, &dylib_cmd); - - dylib_cmd.cmd = 0; - if (!walker.WalkHeader(cpu_type)) - return false; - - // If we found the command, we'll have initialized the dylib_command - // structure - if (dylib_cmd.cmd == LC_ID_DYLIB) { - // Take the hashed filename, version, and compatability version bytes - // to form the first 12 bytes, pad the rest with zeros - - // create a crude hash of the filename to generate the first 4 bytes - identifier[0] = 0; - identifier[1] = 0; - identifier[2] = 0; - identifier[3] = 0; - - for (int j = 0, i = (int)strlen(path_)-1; i>=0 && path_[i]!='/'; ++j, --i) { - identifier[j%4] += path_[i]; - } - - identifier[4] = (dylib_cmd.dylib.current_version >> 24) & 0xFF; - identifier[5] = (dylib_cmd.dylib.current_version >> 16) & 0xFF; - identifier[6] = (dylib_cmd.dylib.current_version >> 8) & 0xFF; - identifier[7] = dylib_cmd.dylib.current_version & 0xFF; - identifier[8] = (dylib_cmd.dylib.compatibility_version >> 24) & 0xFF; - identifier[9] = (dylib_cmd.dylib.compatibility_version >> 16) & 0xFF; - identifier[10] = (dylib_cmd.dylib.compatibility_version >> 8) & 0xFF; - identifier[11] = dylib_cmd.dylib.compatibility_version & 0xFF; - identifier[12] = (cpu_type >> 24) & 0xFF; - identifier[13] = (cpu_type >> 16) & 0xFF; - identifier[14] = (cpu_type >> 8) & 0xFF; - identifier[15] = cpu_type & 0xFF; - - return true; - } - - return false; -} - -uint32_t MachoID::Adler32(int cpu_type) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateCRC; - crc_ = 0; - - if (!walker.WalkHeader(cpu_type)) - return 0; - - return crc_; -} - -bool MachoID::MD5(int cpu_type, unsigned char identifier[16]) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateMD5; - - if (MD5_Init(&md5_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - MD5_Final(identifier, &md5_context_); - return true; - } - - return false; -} - -bool MachoID::SHA1(int cpu_type, unsigned char identifier[16]) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateSHA1; - - if (SHA_Init(&sha1_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - SHA_Final(identifier, &sha1_context_); - return true; - } - - return false; -} - -// static -bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - MachoID *macho_id = (MachoID *)context; - - if (cmd->cmd == LC_SEGMENT) { - struct segment_command seg; - - if (!walker->ReadBytes(&seg, sizeof(seg), offset)) - return false; - - if (swap) - swap_segment_command(&seg, NXHostByteOrder()); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command); - struct section sec; - for (unsigned long i = 0; i < seg.nsects; ++i) { - if (!walker->ReadBytes(&sec, sizeof(sec), offset)) - return false; - - if (swap) - swap_section(&sec, 1, NXHostByteOrder()); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec.flags & SECTION_TYPE) != S_ZEROFILL && sec.offset != 0) - macho_id->Update(walker, header_offset + sec.offset, sec.size); - - offset += sizeof(struct section); - } - } else if (cmd->cmd == LC_SEGMENT_64) { - struct segment_command_64 seg64; - - if (!walker->ReadBytes(&seg64, sizeof(seg64), offset)) - return false; - - if (swap) - breakpad_swap_segment_command_64(&seg64, NXHostByteOrder()); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command_64); - struct section_64 sec64; - for (unsigned long i = 0; i < seg64.nsects; ++i) { - if (!walker->ReadBytes(&sec64, sizeof(sec64), offset)) - return false; - - if (swap) - breakpad_swap_section_64(&sec64, 1, NXHostByteOrder()); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec64.flags & SECTION_TYPE) != S_ZEROFILL && sec64.offset != 0) - macho_id->Update(walker, - header_offset + sec64.offset, - (size_t)sec64.size); - - offset += sizeof(struct section_64); - } - } - - // Continue processing - return true; -} - -// static -bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_UUID) { - struct breakpad_uuid_command *uuid_cmd = - (struct breakpad_uuid_command *)context; - - if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command), - offset)) - return false; - - if (swap) - breakpad_swap_uuid_command(uuid_cmd, NXHostByteOrder()); - - return false; - } - - // Continue processing - return true; -} - -// static -bool MachoID::IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_ID_DYLIB) { - struct dylib_command *dylib_cmd = (struct dylib_command *)context; - - if (!walker->ReadBytes(dylib_cmd, sizeof(struct dylib_command), offset)) - return false; - - if (swap) - swap_dylib_command(dylib_cmd, NXHostByteOrder()); - - return false; - } - - // Continue processing - return true; -} - -} // namespace MacFileUtilities diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.h deleted file mode 100644 index ea01a6d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_id.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.h: Functions to gather identifying information from a macho file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_ID_H__ -#define COMMON_MAC_MACHO_ID_H__ - -#include -#include -#include -#include - -namespace MacFileUtilities { - -class MachoWalker; - -class MachoID { - public: - MachoID(const char *path); - ~MachoID(); - - // For the given |cpu_type|, return a UUID from the LC_UUID command. - // Return false if there isn't a LC_UUID command. - bool UUIDCommand(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return a UUID from the LC_ID_DYLIB command. - // Return false if there isn't a LC_ID_DYLIB command. - bool IDCommand(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return the Adler32 CRC for the mach-o data - // segment(s). - // Return 0 on error (e.g., if the file is not a mach-o file) - uint32_t Adler32(int cpu_type); - - // For the given |cpu_type|, return the MD5 for the mach-o data segment(s). - // Return true on success, false otherwise - bool MD5(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return the SHA1 for the mach-o data segment(s). - // Return true on success, false otherwise - bool SHA1(int cpu_type, unsigned char identifier[16]); - - private: - // Signature of class member function to be called with data read from file - typedef void (MachoID::*UpdateFunction)(unsigned char *bytes, size_t size); - - // Update the CRC value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateCRC(unsigned char *bytes, size_t size); - - // Update the MD5 value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateMD5(unsigned char *bytes, size_t size); - - // Update the SHA1 value by examining |size| |bytes| and applying the - // algorithm to each byte. - void UpdateSHA1(unsigned char *bytes, size_t size); - - // Bottleneck for update routines - void Update(MachoWalker *walker, off_t offset, size_t size); - - // The callback from the MachoWalker for CRC, MD5, and SHA1 - static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_UUID - static bool UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_ID_DYLIB - static bool IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // File path - char path_[PATH_MAX]; - - // File descriptor - int file_; - - // The current crc value - uint32_t crc_; - - // The MD5 context - MD5_CTX md5_context_; - - // The SHA1 context - SHA_CTX sha1_context_; - - // The current update to call from the Update callback - UpdateFunction update_function_; -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_ID_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.cc deleted file mode 100644 index ff16bc61..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.cc +++ /dev/null @@ -1,524 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// macho_reader.cc: Implementation of google_breakpad::Mach_O::FatReader and -// google_breakpad::Mach_O::Reader. See macho_reader.h for details. - -#include "common/mac/macho_reader.h" - -#include -#include -#include - -namespace google_breakpad { -namespace mach_o { - -// If NDEBUG is #defined, then the 'assert' macro doesn't evaluate its -// arguments, so you can't place expressions that do necessary work in -// the argument of an assert. Nor can you assign the result of the -// expression to a variable and assert that the variable's value is -// true: you'll get unused variable warnings when NDEBUG is #defined. -// -// ASSERT_ALWAYS_EVAL always evaluates its argument, and asserts that -// the result is true if NDEBUG is not #defined. -#if defined(NDEBUG) -#define ASSERT_ALWAYS_EVAL(x) (x) -#else -#define ASSERT_ALWAYS_EVAL(x) assert(x) -#endif - -void FatReader::Reporter::BadHeader() { - fprintf(stderr, "%s: file is neither a fat binary file" - " nor a Mach-O object file\n", filename_.c_str()); -} - -void FatReader::Reporter::TooShort() { - fprintf(stderr, "%s: file too short for the data it claims to contain\n", - filename_.c_str()); -} - -void FatReader::Reporter::MisplacedObjectFile() { - fprintf(stderr, "%s: file too short for the object files it claims" - " to contain\n", filename_.c_str()); -} - -bool FatReader::Read(const uint8_t *buffer, size_t size) { - buffer_.start = buffer; - buffer_.end = buffer + size; - ByteCursor cursor(&buffer_); - - // Fat binaries always use big-endian, so read the magic number in - // that endianness. To recognize Mach-O magic numbers, which can use - // either endianness, check for both the proper and reversed forms - // of the magic numbers. - cursor.set_big_endian(true); - if (cursor >> magic_) { - if (magic_ == FAT_MAGIC) { - // How many object files does this fat binary contain? - uint32_t object_files_count; - if (!(cursor >> object_files_count)) { // nfat_arch - reporter_->TooShort(); - return false; - } - - // Read the list of object files. - object_files_.resize(object_files_count); - for (size_t i = 0; i < object_files_count; i++) { - struct fat_arch *objfile = &object_files_[i]; - - // Read this object file entry, byte-swapping as appropriate. - cursor >> objfile->cputype - >> objfile->cpusubtype - >> objfile->offset - >> objfile->size - >> objfile->align; - if (!cursor) { - reporter_->TooShort(); - return false; - } - // Does the file actually have the bytes this entry refers to? - size_t fat_size = buffer_.Size(); - if (objfile->offset > fat_size || - objfile->size > fat_size - objfile->offset) { - reporter_->MisplacedObjectFile(); - return false; - } - } - - return true; - } else if (magic_ == MH_MAGIC || magic_ == MH_MAGIC_64 || - magic_ == MH_CIGAM || magic_ == MH_CIGAM_64) { - // If this is a little-endian Mach-O file, fix the cursor's endianness. - if (magic_ == MH_CIGAM || magic_ == MH_CIGAM_64) - cursor.set_big_endian(false); - // Record the entire file as a single entry in the object file list. - object_files_.resize(1); - - // Get the cpu type and subtype from the Mach-O header. - if (!(cursor >> object_files_[0].cputype - >> object_files_[0].cpusubtype)) { - reporter_->TooShort(); - return false; - } - - object_files_[0].offset = 0; - object_files_[0].size = static_cast(buffer_.Size()); - // This alignment is correct for 32 and 64-bit x86 and ppc. - // See get_align in the lipo source for other architectures: - // http://www.opensource.apple.com/source/cctools/cctools-773/misc/lipo.c - object_files_[0].align = 12; // 2^12 == 4096 - - return true; - } - } - - reporter_->BadHeader(); - return false; -} - -void Reader::Reporter::BadHeader() { - fprintf(stderr, "%s: file is not a Mach-O object file\n", filename_.c_str()); -} - -void Reader::Reporter::CPUTypeMismatch(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype) { - fprintf(stderr, "%s: CPU type %d, subtype %d does not match expected" - " type %d, subtype %d\n", - filename_.c_str(), cpu_type, cpu_subtype, - expected_cpu_type, expected_cpu_subtype); -} - -void Reader::Reporter::HeaderTruncated() { - fprintf(stderr, "%s: file does not contain a complete Mach-O header\n", - filename_.c_str()); -} - -void Reader::Reporter::LoadCommandRegionTruncated() { - fprintf(stderr, "%s: file too short to hold load command region" - " given in Mach-O header\n", filename_.c_str()); -} - -void Reader::Reporter::LoadCommandsOverrun(size_t claimed, size_t i, - LoadCommandType type) { - fprintf(stderr, "%s: file's header claims there are %ld" - " load commands, but load command #%ld", - filename_.c_str(), claimed, i); - if (type) fprintf(stderr, ", of type %d,", type); - fprintf(stderr, " extends beyond the end of the load command region\n"); -} - -void Reader::Reporter::LoadCommandTooShort(size_t i, LoadCommandType type) { - fprintf(stderr, "%s: the contents of load command #%ld, of type %d," - " extend beyond the size given in the load command's header\n", - filename_.c_str(), i, type); -} - -void Reader::Reporter::SectionsMissing(const string &name) { - fprintf(stderr, "%s: the load command for segment '%s'" - " is too short to hold the section headers it claims to have\n", - filename_.c_str(), name.c_str()); -} - -void Reader::Reporter::MisplacedSegmentData(const string &name) { - fprintf(stderr, "%s: the segment '%s' claims its contents lie beyond" - " the end of the file\n", filename_.c_str(), name.c_str()); -} - -void Reader::Reporter::MisplacedSectionData(const string §ion, - const string &segment) { - fprintf(stderr, "%s: the section '%s' in segment '%s'" - " claims its contents lie outside the segment's contents\n", - filename_.c_str(), section.c_str(), segment.c_str()); -} - -void Reader::Reporter::MisplacedSymbolTable() { - fprintf(stderr, "%s: the LC_SYMTAB load command claims that the symbol" - " table's contents are located beyond the end of the file\n", - filename_.c_str()); -} - -void Reader::Reporter::UnsupportedCPUType(cpu_type_t cpu_type) { - fprintf(stderr, "%s: CPU type %d is not supported\n", - filename_.c_str(), cpu_type); -} - -bool Reader::Read(const uint8_t *buffer, - size_t size, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype) { - assert(!buffer_.start); - buffer_.start = buffer; - buffer_.end = buffer + size; - ByteCursor cursor(&buffer_, true); - uint32_t magic; - if (!(cursor >> magic)) { - reporter_->HeaderTruncated(); - return false; - } - - if (expected_cpu_type != CPU_TYPE_ANY) { - uint32_t expected_magic; - // validate that magic matches the expected cpu type - switch (expected_cpu_type) { - case CPU_TYPE_I386: - expected_magic = MH_CIGAM; - break; - case CPU_TYPE_POWERPC: - expected_magic = MH_MAGIC; - break; - case CPU_TYPE_X86_64: - expected_magic = MH_CIGAM_64; - break; - case CPU_TYPE_POWERPC64: - expected_magic = MH_MAGIC_64; - break; - default: - reporter_->UnsupportedCPUType(expected_cpu_type); - return false; - } - - if (expected_magic != magic) { - reporter_->BadHeader(); - return false; - } - } - - // Since the byte cursor is in big-endian mode, a reversed magic number - // always indicates a little-endian file, regardless of our own endianness. - switch (magic) { - case MH_MAGIC: big_endian_ = true; bits_64_ = false; break; - case MH_CIGAM: big_endian_ = false; bits_64_ = false; break; - case MH_MAGIC_64: big_endian_ = true; bits_64_ = true; break; - case MH_CIGAM_64: big_endian_ = false; bits_64_ = true; break; - default: - reporter_->BadHeader(); - return false; - } - cursor.set_big_endian(big_endian_); - uint32_t commands_size, reserved; - cursor >> cpu_type_ >> cpu_subtype_ >> file_type_ >> load_command_count_ - >> commands_size >> flags_; - if (bits_64_) - cursor >> reserved; - if (!cursor) { - reporter_->HeaderTruncated(); - return false; - } - - if (expected_cpu_type != CPU_TYPE_ANY && - (expected_cpu_type != cpu_type_ || - expected_cpu_subtype != cpu_subtype_)) { - reporter_->CPUTypeMismatch(cpu_type_, cpu_subtype_, - expected_cpu_type, expected_cpu_subtype); - return false; - } - - cursor - .PointTo(&load_commands_.start, commands_size) - .PointTo(&load_commands_.end, 0); - if (!cursor) { - reporter_->LoadCommandRegionTruncated(); - return false; - } - - return true; -} - -bool Reader::WalkLoadCommands(Reader::LoadCommandHandler *handler) const { - ByteCursor list_cursor(&load_commands_, big_endian_); - - for (size_t index = 0; index < load_command_count_; ++index) { - // command refers to this load command alone, so that cursor will - // refuse to read past the load command's end. But since we haven't - // read the size yet, let command initially refer to the entire - // remainder of the load command series. - ByteBuffer command(list_cursor.here(), list_cursor.Available()); - ByteCursor cursor(&command, big_endian_); - - // Read the command type and size --- fields common to all commands. - uint32_t type, size; - if (!(cursor >> type)) { - reporter_->LoadCommandsOverrun(load_command_count_, index, 0); - return false; - } - if (!(cursor >> size) || size > command.Size()) { - reporter_->LoadCommandsOverrun(load_command_count_, index, type); - return false; - } - - // Now that we've read the length, restrict command's range to this - // load command only. - command.end = command.start + size; - - switch (type) { - case LC_SEGMENT: - case LC_SEGMENT_64: { - Segment segment; - segment.bits_64 = (type == LC_SEGMENT_64); - size_t word_size = segment.bits_64 ? 8 : 4; - cursor.CString(&segment.name, 16); - size_t file_offset, file_size; - cursor - .Read(word_size, false, &segment.vmaddr) - .Read(word_size, false, &segment.vmsize) - .Read(word_size, false, &file_offset) - .Read(word_size, false, &file_size); - cursor >> segment.maxprot - >> segment.initprot - >> segment.nsects - >> segment.flags; - if (!cursor) { - reporter_->LoadCommandTooShort(index, type); - return false; - } - if (file_offset > buffer_.Size() || - file_size > buffer_.Size() - file_offset) { - reporter_->MisplacedSegmentData(segment.name); - return false; - } - // Mach-O files in .dSYM bundles have the contents of the loaded - // segments removed, and their file offsets and file sizes zeroed - // out. To help us handle this special case properly, give such - // segments' contents NULL starting and ending pointers. - if (file_offset == 0 && file_size == 0) { - segment.contents.start = segment.contents.end = NULL; - } else { - segment.contents.start = buffer_.start + file_offset; - segment.contents.end = segment.contents.start + file_size; - } - // The section list occupies the remainder of this load command's space. - segment.section_list.start = cursor.here(); - segment.section_list.end = command.end; - - if (!handler->SegmentCommand(segment)) - return false; - break; - } - - case LC_SYMTAB: { - uint32_t symoff, nsyms, stroff, strsize; - cursor >> symoff >> nsyms >> stroff >> strsize; - if (!cursor) { - reporter_->LoadCommandTooShort(index, type); - return false; - } - // How big are the entries in the symbol table? - // sizeof(struct nlist_64) : sizeof(struct nlist), - // but be paranoid about alignment vs. target architecture. - size_t symbol_size = bits_64_ ? 16 : 12; - // How big is the entire symbol array? - size_t symbols_size = nsyms * symbol_size; - if (symoff > buffer_.Size() || symbols_size > buffer_.Size() - symoff || - stroff > buffer_.Size() || strsize > buffer_.Size() - stroff) { - reporter_->MisplacedSymbolTable(); - return false; - } - ByteBuffer entries(buffer_.start + symoff, symbols_size); - ByteBuffer names(buffer_.start + stroff, strsize); - if (!handler->SymtabCommand(entries, names)) - return false; - break; - } - - default: { - if (!handler->UnknownCommand(type, command)) - return false; - break; - } - } - - list_cursor.set_here(command.end); - } - - return true; -} - -// A load command handler that looks for a segment of a given name. -class Reader::SegmentFinder : public LoadCommandHandler { - public: - // Create a load command handler that looks for a segment named NAME, - // and sets SEGMENT to describe it if found. - SegmentFinder(const string &name, Segment *segment) - : name_(name), segment_(segment), found_() { } - - // Return true if the traversal found the segment, false otherwise. - bool found() const { return found_; } - - bool SegmentCommand(const Segment &segment) { - if (segment.name == name_) { - *segment_ = segment; - found_ = true; - return false; - } - return true; - } - - private: - // The name of the segment our creator is looking for. - const string &name_; - - // Where we should store the segment if found. (WEAK) - Segment *segment_; - - // True if we found the segment. - bool found_; -}; - -bool Reader::FindSegment(const string &name, Segment *segment) const { - SegmentFinder finder(name, segment); - WalkLoadCommands(&finder); - return finder.found(); -} - -bool Reader::WalkSegmentSections(const Segment &segment, - SectionHandler *handler) const { - size_t word_size = segment.bits_64 ? 8 : 4; - ByteCursor cursor(&segment.section_list, big_endian_); - - for (size_t i = 0; i < segment.nsects; i++) { - Section section; - section.bits_64 = segment.bits_64; - uint64_t size; - uint32_t offset, dummy32; - cursor - .CString(§ion.section_name, 16) - .CString(§ion.segment_name, 16) - .Read(word_size, false, §ion.address) - .Read(word_size, false, &size) - >> offset - >> section.align - >> dummy32 - >> dummy32 - >> section.flags - >> dummy32 - >> dummy32; - if (section.bits_64) - cursor >> dummy32; - if (!cursor) { - reporter_->SectionsMissing(segment.name); - return false; - } - if ((section.flags & SECTION_TYPE) == S_ZEROFILL) { - // Zero-fill sections have a size, but no contents. - section.contents.start = section.contents.end = NULL; - } else if (segment.contents.start == NULL && - segment.contents.end == NULL) { - // Mach-O files in .dSYM bundles have the contents of the loaded - // segments removed, and their file offsets and file sizes zeroed - // out. However, the sections within those segments still have - // non-zero sizes. There's no reason to call MisplacedSectionData in - // this case; the caller may just need the section's load - // address. But do set the contents' limits to NULL, for safety. - section.contents.start = section.contents.end = NULL; - } else { - if (offset < size_t(segment.contents.start - buffer_.start) || - offset > size_t(segment.contents.end - buffer_.start) || - size > size_t(segment.contents.end - buffer_.start - offset)) { - reporter_->MisplacedSectionData(section.section_name, - section.segment_name); - return false; - } - section.contents.start = buffer_.start + offset; - section.contents.end = section.contents.start + size; - } - if (!handler->HandleSection(section)) - return false; - } - return true; -} - -// A SectionHandler that builds a SectionMap for the sections within a -// given segment. -class Reader::SectionMapper: public SectionHandler { - public: - // Create a SectionHandler that populates MAP with an entry for - // each section it is given. - SectionMapper(SectionMap *map) : map_(map) { } - bool HandleSection(const Section §ion) { - (*map_)[section.section_name] = section; - return true; - } - private: - // The map under construction. (WEAK) - SectionMap *map_; -}; - -bool Reader::MapSegmentSections(const Segment &segment, - SectionMap *section_map) const { - section_map->clear(); - SectionMapper mapper(section_map); - return WalkSegmentSections(segment, &mapper); -} - -} // namespace mach_o -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.h deleted file mode 100644 index 75376482..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader.h +++ /dev/null @@ -1,459 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// macho_reader.h: A class for parsing Mach-O files. - -#ifndef BREAKPAD_COMMON_MAC_MACHO_READER_H_ -#define BREAKPAD_COMMON_MAC_MACHO_READER_H_ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "common/byte_cursor.h" - -namespace google_breakpad { -namespace mach_o { - -using std::map; -using std::string; -using std::vector; - -// The Mac headers don't specify particular types for these groups of -// constants, but defining them here provides some documentation -// value. We also give them the same width as the fields in which -// they appear, which makes them a bit easier to use with ByteCursors. -typedef uint32_t Magic; -typedef uint32_t FileType; -typedef uint32_t FileFlags; -typedef uint32_t LoadCommandType; -typedef uint32_t SegmentFlags; -typedef uint32_t SectionFlags; - -// A parser for fat binary files, used to store universal binaries. -// When applied to a (non-fat) Mach-O file, this behaves as if the -// file were a fat file containing a single object file. -class FatReader { - public: - - // A class for reporting errors found while parsing fat binary files. The - // default definitions of these methods print messages to stderr. - class Reporter { - public: - // Create a reporter that attributes problems to |filename|. - explicit Reporter(const string &filename) : filename_(filename) { } - - virtual ~Reporter() { } - - // The data does not begin with a fat binary or Mach-O magic number. - // This is a fatal error. - virtual void BadHeader(); - - // The Mach-O fat binary file ends abruptly, without enough space - // to contain an object file it claims is present. - virtual void MisplacedObjectFile(); - - // The file ends abruptly: either it is not large enough to hold a - // complete header, or the header implies that contents are present - // beyond the actual end of the file. - virtual void TooShort(); - - private: - // The filename to which the reader should attribute problems. - string filename_; - }; - - // Create a fat binary file reader that uses |reporter| to report problems. - explicit FatReader(Reporter *reporter) : reporter_(reporter) { } - - // Read the |size| bytes at |buffer| as a fat binary file. On success, - // return true; on failure, report the problem to reporter_ and return - // false. - // - // If the data is a plain Mach-O file, rather than a fat binary file, - // then the reader behaves as if it had found a fat binary file whose - // single object file is the Mach-O file. - bool Read(const uint8_t *buffer, size_t size); - - // Return an array of 'struct fat_arch' structures describing the - // object files present in this fat binary file. Set |size| to the - // number of elements in the array. - // - // Assuming Read returned true, the entries are validated: it is - // safe to assume that the offsets and sizes in each 'struct - // fat_arch' refer to subranges of the bytes passed to Read. - // - // If there are no object files in this fat binary, then this - // function can return NULL. - // - // The array is owned by this FatReader instance; it will be freed when - // this FatReader is destroyed. - // - // This function returns a C-style array instead of a vector to make it - // possible to use the result with OS X functions like NXFindBestFatArch, - // so that the symbol dumper will behave consistently with other OS X - // utilities that work with fat binaries. - const struct fat_arch *object_files(size_t *count) const { - *count = object_files_.size(); - if (object_files_.size() > 0) - return &object_files_[0]; - return NULL; - } - - private: - // We use this to report problems parsing the file's contents. (WEAK) - Reporter *reporter_; - - // The contents of the fat binary or Mach-O file we're parsing. We do not - // own the storage it refers to. - ByteBuffer buffer_; - - // The magic number of this binary, in host byte order. - Magic magic_; - - // The list of object files in this binary. - // object_files_.size() == fat_header.nfat_arch - vector object_files_; -}; - -// A segment in a Mach-O file. All these fields have been byte-swapped as -// appropriate for use by the executing architecture. -struct Segment { - // The ByteBuffers below point into the bytes passed to the Reader that - // created this Segment. - - ByteBuffer section_list; // This segment's section list. - ByteBuffer contents; // This segment's contents. - - // This segment's name. - string name; - - // The address at which this segment should be loaded in memory. If - // bits_64 is false, only the bottom 32 bits of this value are valid. - uint64_t vmaddr; - - // The size of this segment when loaded into memory. This may be larger - // than contents.Size(), in which case the extra area will be - // initialized with zeros. If bits_64 is false, only the bottom 32 bits - // of this value are valid. - uint64_t vmsize; - - // The maximum and initial VM protection of this segment's contents. - uint32_t maxprot; - uint32_t initprot; - - // The number of sections in section_list. - uint32_t nsects; - - // Flags describing this segment, from SegmentFlags. - uint32_t flags; - - // True if this is a 64-bit section; false if it is a 32-bit section. - bool bits_64; -}; - -// A section in a Mach-O file. All these fields have been byte-swapped as -// appropriate for use by the executing architecture. -struct Section { - // This section's contents. This points into the bytes passed to the - // Reader that created this Section. - ByteBuffer contents; - - // This section's name. - string section_name; // section[_64].sectname - // The name of the segment this section belongs to. - string segment_name; // section[_64].segname - - // The address at which this section's contents should be loaded in - // memory. If bits_64 is false, only the bottom 32 bits of this value - // are valid. - uint64_t address; - - // The contents of this section should be loaded into memory at an - // address which is a multiple of (two raised to this power). - uint32_t align; - - // Flags from SectionFlags describing the section's contents. - uint32_t flags; - - // We don't support reading relocations yet. - - // True if this is a 64-bit section; false if it is a 32-bit section. - bool bits_64; -}; - -// A map from section names to Sections. -typedef map SectionMap; - -// A reader for a Mach-O file. -// -// This does not handle fat binaries; see FatReader above. FatReader -// provides a friendly interface for parsing data that could be either a -// fat binary or a Mach-O file. -class Reader { - public: - - // A class for reporting errors found while parsing Mach-O files. The - // default definitions of these member functions print messages to - // stderr. - class Reporter { - public: - // Create a reporter that attributes problems to |filename|. - explicit Reporter(const string &filename) : filename_(filename) { } - virtual ~Reporter() { } - - // Reporter functions for fatal errors return void; the reader will - // definitely return an error to its caller after calling them - - // The data does not begin with a Mach-O magic number, or the magic - // number does not match the expected value for the cpu architecture. - // This is a fatal error. - virtual void BadHeader(); - - // The data contained in a Mach-O fat binary (|cpu_type|, |cpu_subtype|) - // does not match the expected CPU architecture - // (|expected_cpu_type|, |expected_cpu_subtype|). - virtual void CPUTypeMismatch(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype); - - // The file ends abruptly: either it is not large enough to hold a - // complete header, or the header implies that contents are present - // beyond the actual end of the file. - virtual void HeaderTruncated(); - - // The file's load command region, as given in the Mach-O header, is - // too large for the file. - virtual void LoadCommandRegionTruncated(); - - // The file's Mach-O header claims the file contains |claimed| load - // commands, but the I'th load command, of type |type|, extends beyond - // the end of the load command region, as given by the Mach-O header. - // If |type| is zero, the command's type was unreadable. - virtual void LoadCommandsOverrun(size_t claimed, size_t i, - LoadCommandType type); - - // The contents of the |i|'th load command, of type |type|, extend beyond - // the size given in the load command's header. - virtual void LoadCommandTooShort(size_t i, LoadCommandType type); - - // The LC_SEGMENT or LC_SEGMENT_64 load command for the segment named - // |name| is too short to hold the sections that its header says it does. - // (This more specific than LoadCommandTooShort.) - virtual void SectionsMissing(const string &name); - - // The segment named |name| claims that its contents lie beyond the end - // of the file. - virtual void MisplacedSegmentData(const string &name); - - // The section named |section| in the segment named |segment| claims that - // its contents do not lie entirely within the segment. - virtual void MisplacedSectionData(const string §ion, - const string &segment); - - // The LC_SYMTAB command claims that symbol table contents are located - // beyond the end of the file. - virtual void MisplacedSymbolTable(); - - // An attempt was made to read a Mach-O file of the unsupported - // CPU architecture |cpu_type|. - virtual void UnsupportedCPUType(cpu_type_t cpu_type); - - private: - string filename_; - }; - - // A handler for sections parsed from a segment. The WalkSegmentSections - // member function accepts an instance of this class, and applies it to - // each section defined in a given segment. - class SectionHandler { - public: - virtual ~SectionHandler() { } - - // Called to report that the segment's section list contains |section|. - // This should return true if the iteration should continue, or false - // if it should stop. - virtual bool HandleSection(const Section §ion) = 0; - }; - - // A handler for the load commands in a Mach-O file. - class LoadCommandHandler { - public: - LoadCommandHandler() { } - virtual ~LoadCommandHandler() { } - - // When called from WalkLoadCommands, the following handler functions - // should return true if they wish to continue iterating over the load - // command list, or false if they wish to stop iterating. - // - // When called from LoadCommandIterator::Handle or Reader::Handle, - // these functions' return values are simply passed through to Handle's - // caller. - // - // The definitions provided by this base class simply return true; the - // default is to silently ignore sections whose member functions the - // subclass doesn't override. - - // COMMAND is load command we don't recognize. We provide only the - // command type and a ByteBuffer enclosing the command's data (If we - // cannot parse the command type or its size, we call - // reporter_->IncompleteLoadCommand instead.) - virtual bool UnknownCommand(LoadCommandType type, - const ByteBuffer &contents) { - return true; - } - - // The load command is LC_SEGMENT or LC_SEGMENT_64, defining a segment - // with the properties given in |segment|. - virtual bool SegmentCommand(const Segment &segment) { - return true; - } - - // The load command is LC_SYMTAB. |entries| holds the array of nlist - // entries, and |names| holds the strings the entries refer to. - virtual bool SymtabCommand(const ByteBuffer &entries, - const ByteBuffer &names) { - return true; - } - - // Add handler functions for more load commands here as needed. - }; - - // Create a Mach-O file reader that reports problems to |reporter|. - explicit Reader(Reporter *reporter) - : reporter_(reporter) { } - - // Read the given data as a Mach-O file. The reader retains pointers - // into the data passed, so the data should live as long as the reader - // does. On success, return true; on failure, return false. - // - // At most one of these functions should be invoked once on each Reader - // instance. - bool Read(const uint8_t *buffer, - size_t size, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype); - bool Read(const ByteBuffer &buffer, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype) { - return Read(buffer.start, - buffer.Size(), - expected_cpu_type, - expected_cpu_subtype); - } - - // Return this file's characteristics, as found in the Mach-O header. - cpu_type_t cpu_type() const { return cpu_type_; } - cpu_subtype_t cpu_subtype() const { return cpu_subtype_; } - FileType file_type() const { return file_type_; } - FileFlags flags() const { return flags_; } - - // Return true if this is a 64-bit Mach-O file, false if it is a 32-bit - // Mach-O file. - bool bits_64() const { return bits_64_; } - - // Return true if this is a big-endian Mach-O file, false if it is - // little-endian. - bool big_endian() const { return big_endian_; } - - // Apply |handler| to each load command in this Mach-O file, stopping when - // a handler function returns false. If we encounter a malformed load - // command, report it via reporter_ and return false. Return true if all - // load commands were parseable and all handlers returned true. - bool WalkLoadCommands(LoadCommandHandler *handler) const; - - // Set |segment| to describe the segment named |name|, if present. If - // found, |segment|'s byte buffers refer to a subregion of the bytes - // passed to Read. If we find the section, return true; otherwise, - // return false. - bool FindSegment(const string &name, Segment *segment) const; - - // Apply |handler| to each section defined in |segment|. If |handler| returns - // false, stop iterating and return false. If all calls to |handler| return - // true and we reach the end of the section list, return true. - bool WalkSegmentSections(const Segment &segment, SectionHandler *handler) - const; - - // Clear |section_map| and then populate it with a map of the sections - // in |segment|, from section names to Section structures. - // Each Section's contents refer to bytes in |segment|'s contents. - // On success, return true; if a problem occurs, report it and return false. - bool MapSegmentSections(const Segment &segment, SectionMap *section_map) - const; - - private: - // Used internally. - class SegmentFinder; - class SectionMapper; - - // We use this to report problems parsing the file's contents. (WEAK) - Reporter *reporter_; - - // The contents of the Mach-O file we're parsing. We do not own the - // storage it refers to. - ByteBuffer buffer_; - - // True if this file is big-endian. - bool big_endian_; - - // True if this file is a 64-bit Mach-O file. - bool bits_64_; - - // This file's cpu type and subtype. - cpu_type_t cpu_type_; // mach_header[_64].cputype - cpu_subtype_t cpu_subtype_; // mach_header[_64].cpusubtype - - // This file's type. - FileType file_type_; // mach_header[_64].filetype - - // The region of buffer_ occupied by load commands. - ByteBuffer load_commands_; - - // The number of load commands in load_commands_. - uint32_t load_command_count_; // mach_header[_64].ncmds - - // This file's header flags. - FileFlags flags_; -}; - -} // namespace mach_o -} // namespace google_breakpad - -#endif // BREAKPAD_COMMON_MAC_MACHO_READER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader_unittest.cc deleted file mode 100644 index 9bc6d25a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_reader_unittest.cc +++ /dev/null @@ -1,1898 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// macho_reader_unittest.cc: Unit tests for google_breakpad::Mach_O::FatReader -// and google_breakpad::Mach_O::Reader. - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/mac/macho_reader.h" -#include "common/test_assembler.h" - -namespace mach_o = google_breakpad::mach_o; -namespace test_assembler = google_breakpad::test_assembler; - -using mach_o::FatReader; -using mach_o::FileFlags; -using mach_o::FileType; -using mach_o::LoadCommandType; -using mach_o::Reader; -using mach_o::Section; -using mach_o::SectionMap; -using mach_o::Segment; -using test_assembler::Endianness; -using test_assembler::Label; -using test_assembler::kBigEndian; -using test_assembler::kLittleEndian; -using test_assembler::kUnsetEndian; -using google_breakpad::ByteBuffer; -using std::map; -using std::string; -using std::vector; -using testing::AllOf; -using testing::DoAll; -using testing::Field; -using testing::InSequence; -using testing::Matcher; -using testing::Return; -using testing::SaveArg; -using testing::Test; -using testing::_; - - -// Mock classes for the reader's various reporters and handlers. - -class MockFatReaderReporter: public FatReader::Reporter { - public: - MockFatReaderReporter(const string &filename) - : FatReader::Reporter(filename) { } - MOCK_METHOD0(BadHeader, void()); - MOCK_METHOD0(MisplacedObjectFile, void()); - MOCK_METHOD0(TooShort, void()); -}; - -class MockReaderReporter: public Reader::Reporter { - public: - MockReaderReporter(const string &filename) : Reader::Reporter(filename) { } - MOCK_METHOD0(BadHeader, void()); - MOCK_METHOD4(CPUTypeMismatch, void(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype)); - MOCK_METHOD0(HeaderTruncated, void()); - MOCK_METHOD0(LoadCommandRegionTruncated, void()); - MOCK_METHOD3(LoadCommandsOverrun, void(size_t claimed, size_t i, - LoadCommandType type)); - MOCK_METHOD2(LoadCommandTooShort, void(size_t i, LoadCommandType type)); - MOCK_METHOD1(SectionsMissing, void(const string &name)); - MOCK_METHOD1(MisplacedSegmentData, void(const string &name)); - MOCK_METHOD2(MisplacedSectionData, void(const string §ion, - const string &segment)); - MOCK_METHOD0(MisplacedSymbolTable, void()); - MOCK_METHOD1(UnsupportedCPUType, void(cpu_type_t cpu_type)); -}; - -class MockLoadCommandHandler: public Reader::LoadCommandHandler { - public: - MOCK_METHOD2(UnknownCommand, bool(LoadCommandType, const ByteBuffer &)); - MOCK_METHOD1(SegmentCommand, bool(const Segment &)); - MOCK_METHOD2(SymtabCommand, bool(const ByteBuffer &, const ByteBuffer &)); -}; - -class MockSectionHandler: public Reader::SectionHandler { - public: - MOCK_METHOD1(HandleSection, bool(const Section §ion)); -}; - - -// Tests for mach_o::FatReader. - -// Since the effect of these functions is to write to stderr, the -// results of these tests must be inspected by hand. -TEST(FatReaderReporter, BadHeader) { - FatReader::Reporter reporter("filename"); - reporter.BadHeader(); -} - -TEST(FatReaderReporter, MisplacedObjectFile) { - FatReader::Reporter reporter("filename"); - reporter.MisplacedObjectFile(); -} - -TEST(FatReaderReporter, TooShort) { - FatReader::Reporter reporter("filename"); - reporter.TooShort(); -} - -TEST(MachOReaderReporter, BadHeader) { - Reader::Reporter reporter("filename"); - reporter.BadHeader(); -} - -TEST(MachOReaderReporter, CPUTypeMismatch) { - Reader::Reporter reporter("filename"); - reporter.CPUTypeMismatch(CPU_TYPE_I386, CPU_SUBTYPE_X86_ALL, - CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_ALL); -} - -TEST(MachOReaderReporter, HeaderTruncated) { - Reader::Reporter reporter("filename"); - reporter.HeaderTruncated(); -} - -TEST(MachOReaderReporter, LoadCommandRegionTruncated) { - Reader::Reporter reporter("filename"); - reporter.LoadCommandRegionTruncated(); -} - -TEST(MachOReaderReporter, LoadCommandsOverrun) { - Reader::Reporter reporter("filename"); - reporter.LoadCommandsOverrun(10, 9, LC_DYSYMTAB); - reporter.LoadCommandsOverrun(10, 9, 0); -} - -TEST(MachOReaderReporter, LoadCommandTooShort) { - Reader::Reporter reporter("filename"); - reporter.LoadCommandTooShort(11, LC_SYMTAB); -} - -TEST(MachOReaderReporter, SectionsMissing) { - Reader::Reporter reporter("filename"); - reporter.SectionsMissing("segment name"); -} - -TEST(MachOReaderReporter, MisplacedSegmentData) { - Reader::Reporter reporter("filename"); - reporter.MisplacedSegmentData("segment name"); -} - -TEST(MachOReaderReporter, MisplacedSectionData) { - Reader::Reporter reporter("filename"); - reporter.MisplacedSectionData("section name", "segment name"); -} - -TEST(MachOReaderReporter, MisplacedSymbolTable) { - Reader::Reporter reporter("filename"); - reporter.MisplacedSymbolTable(); -} - -TEST(MachOReaderReporter, UnsupportedCPUType) { - Reader::Reporter reporter("filename"); - reporter.UnsupportedCPUType(CPU_TYPE_HPPA); -} - -struct FatReaderFixture { - FatReaderFixture() - : fat(kBigEndian), - reporter("reporter filename"), - reader(&reporter), object_files(), object_files_size() { - EXPECT_CALL(reporter, BadHeader()).Times(0); - EXPECT_CALL(reporter, TooShort()).Times(0); - - // here, start, and Mark are file offsets in 'fat'. - fat.start() = 0; - } - // Append a 'fat_arch' entry to 'fat', with the given field values. - void AppendFatArch(cpu_type_t type, cpu_subtype_t subtype, - Label offset, Label size, uint32_t align) { - fat - .B32(type) - .B32(subtype) - .B32(offset) - .B32(size) - .B32(align); - } - // Append |n| dummy 'fat_arch' entries to 'fat'. The cpu type and - // subtype have unrealistic values. - void AppendDummyArchEntries(int n) { - for (int i = 0; i < n; i++) - AppendFatArch(0xb68ad617, 0x715a0840, 0, 0, 1); - } - void ReadFat(bool expect_parse_success = true) { - ASSERT_TRUE(fat.GetContents(&contents)); - fat_bytes = reinterpret_cast(contents.data()); - if (expect_parse_success) { - EXPECT_TRUE(reader.Read(fat_bytes, contents.size())); - object_files = reader.object_files(&object_files_size); - } - else - EXPECT_FALSE(reader.Read(fat_bytes, contents.size())); - } - test_assembler::Section fat; - MockFatReaderReporter reporter; - FatReader reader; - string contents; - const uint8_t *fat_bytes; - const struct fat_arch *object_files; - size_t object_files_size; -}; - -class FatReaderTest: public FatReaderFixture, public Test { }; - -TEST_F(FatReaderTest, BadMagic) { - EXPECT_CALL(reporter, BadHeader()).Times(1); - fat - .B32(0xcafed00d) // magic number (incorrect) - .B32(10); // number of architectures - AppendDummyArchEntries(10); - ReadFat(false); -} - -TEST_F(FatReaderTest, HeaderTooShort) { - EXPECT_CALL(reporter, TooShort()).Times(1); - fat - .B32(0xcafebabe); // magic number - ReadFat(false); -} - -TEST_F(FatReaderTest, ObjectListTooShort) { - EXPECT_CALL(reporter, TooShort()).Times(1); - fat - .B32(0xcafebabe) // magic number - .B32(10); // number of architectures - AppendDummyArchEntries(9); // nine dummy architecture entries... - fat // and a tenth, missing a byte at the end - .B32(0x3d46c8fc) // cpu type - .B32(0x8a7bfb01) // cpu subtype - .B32(0) // offset - .B32(0) // size - .Append(3, '*'); // one byte short of a four-byte alignment - ReadFat(false); -} - -TEST_F(FatReaderTest, DataTooShort) { - EXPECT_CALL(reporter, MisplacedObjectFile()).Times(1); - Label arch_data; - fat - .B32(0xcafebabe) // magic number - .B32(1); // number of architectures - AppendFatArch(0xb4d4a366, 0x4ba4f525, arch_data, 40, 0); - fat - .Mark(&arch_data) // file data begins here - .Append(30, '*'); // only 30 bytes, not 40 as header claims - ReadFat(false); -} - -TEST_F(FatReaderTest, NoObjectFiles) { - fat - .B32(0xcafebabe) // magic number - .B32(0); // number of architectures - ReadFat(); - EXPECT_EQ(0U, object_files_size); -} - -TEST_F(FatReaderTest, OneObjectFile) { - Label obj1_offset; - fat - .B32(0xcafebabe) // magic number - .B32(1); // number of architectures - // First object file list entry - AppendFatArch(0x5e3a6e91, 0x52ccd852, obj1_offset, 0x42, 0x355b15b2); - // First object file data - fat - .Mark(&obj1_offset) - .Append(0x42, '*'); // dummy contents - ReadFat(); - ASSERT_EQ(1U, object_files_size); - EXPECT_EQ(0x5e3a6e91, object_files[0].cputype); - EXPECT_EQ(0x52ccd852, object_files[0].cpusubtype); - EXPECT_EQ(obj1_offset.Value(), object_files[0].offset); - EXPECT_EQ(0x42U, object_files[0].size); - EXPECT_EQ(0x355b15b2U, object_files[0].align); -} - -TEST_F(FatReaderTest, ThreeObjectFiles) { - Label obj1, obj2, obj3; - fat - .B32(0xcafebabe) // magic number - .B32(3); // number of architectures - // Three object file list entries. - AppendFatArch(0x0cb92c30, 0x6a159a71, obj1, 0xfb4, 0x2615dbe8); - AppendFatArch(0x0f3f1cbb, 0x6c55e90f, obj2, 0xc31, 0x83af6ffd); - AppendFatArch(0x3717276d, 0x10ecdc84, obj3, 0x4b3, 0x035267d7); - fat - // First object file data - .Mark(&obj1) - .Append(0xfb4, '*') // dummy contents - // Second object file data - .Mark(&obj2) - .Append(0xc31, '%') // dummy contents - // Third object file data - .Mark(&obj3) - .Append(0x4b3, '^'); // dummy contents - - ReadFat(); - - ASSERT_EQ(3U, object_files_size); - - // First object file. - EXPECT_EQ(0x0cb92c30, object_files[0].cputype); - EXPECT_EQ(0x6a159a71, object_files[0].cpusubtype); - EXPECT_EQ(obj1.Value(), object_files[0].offset); - EXPECT_EQ(0xfb4U, object_files[0].size); - EXPECT_EQ(0x2615dbe8U, object_files[0].align); - - // Second object file. - EXPECT_EQ(0x0f3f1cbb, object_files[1].cputype); - EXPECT_EQ(0x6c55e90f, object_files[1].cpusubtype); - EXPECT_EQ(obj2.Value(), object_files[1].offset); - EXPECT_EQ(0xc31U, object_files[1].size); - EXPECT_EQ(0x83af6ffdU, object_files[1].align); - - // Third object file. - EXPECT_EQ(0x3717276d, object_files[2].cputype); - EXPECT_EQ(0x10ecdc84, object_files[2].cpusubtype); - EXPECT_EQ(obj3.Value(), object_files[2].offset); - EXPECT_EQ(0x4b3U, object_files[2].size); - EXPECT_EQ(0x035267d7U, object_files[2].align); -} - -TEST_F(FatReaderTest, BigEndianMachO32) { - fat.set_endianness(kBigEndian); - fat - .D32(0xfeedface) // Mach-O file magic number - .D32(0x1a9d0518) // cpu type - .D32(0x1b779357) // cpu subtype - .D32(0x009df67e) // file type - .D32(0) // no load commands - .D32(0) // the load commands occupy no bytes - .D32(0x21987a99); // flags - - ReadFat(); - - // FatReader should treat a Mach-O file as if it were a fat binary file - // containing one object file --- the whole thing. - ASSERT_EQ(1U, object_files_size); - EXPECT_EQ(0x1a9d0518, object_files[0].cputype); - EXPECT_EQ(0x1b779357, object_files[0].cpusubtype); - EXPECT_EQ(0U, object_files[0].offset); - EXPECT_EQ(contents.size(), object_files[0].size); -} - -TEST_F(FatReaderTest, BigEndianMachO64) { - fat.set_endianness(kBigEndian); - fat - .D32(0xfeedfacf) // Mach-O 64-bit file magic number - .D32(0x5aff8487) // cpu type - .D32(0x4c6a57f7) // cpu subtype - .D32(0x4392d2c8) // file type - .D32(0) // no load commands - .D32(0) // the load commands occupy no bytes - .D32(0x1b033eea); // flags - - ReadFat(); - - // FatReader should treat a Mach-O file as if it were a fat binary file - // containing one object file --- the whole thing. - ASSERT_EQ(1U, object_files_size); - EXPECT_EQ(0x5aff8487, object_files[0].cputype); - EXPECT_EQ(0x4c6a57f7, object_files[0].cpusubtype); - EXPECT_EQ(0U, object_files[0].offset); - EXPECT_EQ(contents.size(), object_files[0].size); -} - -TEST_F(FatReaderTest, LittleEndianMachO32) { - fat.set_endianness(kLittleEndian); - fat - .D32(0xfeedface) // Mach-O file magic number - .D32(0x1a9d0518) // cpu type - .D32(0x1b779357) // cpu subtype - .D32(0x009df67e) // file type - .D32(0) // no load commands - .D32(0) // the load commands occupy no bytes - .D32(0x21987a99); // flags - - ReadFat(); - - // FatReader should treat a Mach-O file as if it were a fat binary file - // containing one object file --- the whole thing. - ASSERT_EQ(1U, object_files_size); - EXPECT_EQ(0x1a9d0518, object_files[0].cputype); - EXPECT_EQ(0x1b779357, object_files[0].cpusubtype); - EXPECT_EQ(0U, object_files[0].offset); - EXPECT_EQ(contents.size(), object_files[0].size); -} - -TEST_F(FatReaderTest, LittleEndianMachO64) { - fat.set_endianness(kLittleEndian); - fat - .D32(0xfeedfacf) // Mach-O 64-bit file magic number - .D32(0x5aff8487) // cpu type - .D32(0x4c6a57f7) // cpu subtype - .D32(0x4392d2c8) // file type - .D32(0) // no load commands - .D32(0) // the load commands occupy no bytes - .D32(0x1b033eea); // flags - - ReadFat(); - - // FatReader should treat a Mach-O file as if it were a fat binary file - // containing one object file --- the whole thing. - ASSERT_EQ(1U, object_files_size); - EXPECT_EQ(0x5aff8487, object_files[0].cputype); - EXPECT_EQ(0x4c6a57f7, object_files[0].cpusubtype); - EXPECT_EQ(0U, object_files[0].offset); - EXPECT_EQ(contents.size(), object_files[0].size); -} - -TEST_F(FatReaderTest, IncompleteMach) { - fat.set_endianness(kLittleEndian); - fat - .D32(0xfeedfacf) // Mach-O 64-bit file magic number - .D32(0x5aff8487); // cpu type - // Truncated! - - EXPECT_CALL(reporter, TooShort()).WillOnce(Return()); - - ReadFat(false); -} - - -// General mach_o::Reader tests. - -// Dynamically scoped configuration data. -class WithConfiguration { - public: - // Establish the given parameters as the default for SizedSections - // created within the dynamic scope of this instance. - WithConfiguration(Endianness endianness, size_t word_size) - : endianness_(endianness), word_size_(word_size), saved_(current_) { - current_ = this; - } - ~WithConfiguration() { current_ = saved_; } - static Endianness endianness() { - assert(current_); - return current_->endianness_; - } - static size_t word_size() { - assert(current_); - return current_->word_size_; - } - - private: - // The innermost WithConfiguration in whose dynamic scope we are - // currently executing. - static WithConfiguration *current_; - - // The innermost WithConfiguration whose dynamic scope encloses this - // WithConfiguration. - Endianness endianness_; - size_t word_size_; - WithConfiguration *saved_; -}; - -WithConfiguration *WithConfiguration::current_ = NULL; - -// A test_assembler::Section with a size that we can cite. The start(), -// Here() and Mark() member functions of a SizedSection always represent -// offsets within the overall file. -class SizedSection: public test_assembler::Section { - public: - // Construct a section of the given endianness and word size. - explicit SizedSection(Endianness endianness, size_t word_size) - : test_assembler::Section(endianness), word_size_(word_size) { - assert(word_size_ == 32 || word_size_ == 64); - } - SizedSection() - : test_assembler::Section(WithConfiguration::endianness()), - word_size_(WithConfiguration::word_size()) { - assert(word_size_ == 32 || word_size_ == 64); - } - - // Access/set this section's word size. - size_t word_size() const { return word_size_; } - void set_word_size(size_t word_size) { - assert(word_size_ == 32 || word_size_ == 64); - word_size_ = word_size; - } - - // Return a label representing the size this section will have when it - // is Placed in some containing section. - Label final_size() const { return final_size_; } - - // Append SECTION to the end of this section, and call its Finish member. - // Return a reference to this section. - SizedSection &Place(SizedSection *section) { - assert(section->endianness() == endianness()); - section->Finish(); - section->start() = Here(); - test_assembler::Section::Append(*section); - return *this; - } - - protected: - // Mark this section's contents as complete. For plain SizedSections, we - // set SECTION's start to its position in this section, and its final_size - // label to its current size. Derived classes can extend this as needed - // for their additional semantics. - virtual void Finish() { - final_size_ = Size(); - } - - // The word size for this data: either 32 or 64. - size_t word_size_; - - private: - // This section's final size, set when we are placed in some other - // SizedSection. - Label final_size_; -}; - -// A SizedSection that is loaded into memory at a particular address. -class LoadedSection: public SizedSection { - public: - explicit LoadedSection(Label address = Label()) : address_(address) { } - - // Return a label representing this section's address. - Label address() const { return address_; } - - // Placing a loaded section within a loaded section sets the relationship - // between their addresses. - LoadedSection &Place(LoadedSection *section) { - section->address() = address() + Size(); - SizedSection::Place(section); - return *this; - } - - protected: - // The address at which this section's contents will be loaded. - Label address_; -}; - -// A SizedSection representing a segment load command. -class SegmentLoadCommand: public SizedSection { - public: - SegmentLoadCommand() : section_count_(0) { } - - // Append a segment load command header with the given characteristics. - // The load command will refer to CONTENTS, which must be Placed in the - // file separately, at the desired position. Return a reference to this - // section. - SegmentLoadCommand &Header(const string &name, const LoadedSection &contents, - uint32_t maxprot, uint32_t initprot, - uint32_t flags) { - assert(contents.word_size() == word_size()); - D32(word_size() == 32 ? LC_SEGMENT : LC_SEGMENT_64); - D32(final_size()); - AppendCString(name, 16); - Append(endianness(), word_size() / 8, contents.address()); - Append(endianness(), word_size() / 8, vmsize_); - Append(endianness(), word_size() / 8, contents.start()); - Append(endianness(), word_size() / 8, contents.final_size()); - D32(maxprot); - D32(initprot); - D32(final_section_count_); - D32(flags); - - content_final_size_ = contents.final_size(); - - return *this; - } - - // Return a label representing the size of this segment when loaded into - // memory. If this label is still undefined by the time we place this - // segment, it defaults to the final size of the segment's in-file - // contents. Return a reference to this load command. - Label &vmsize() { return vmsize_; } - - // Add a section entry with the given characteristics to this segment - // load command. Return a reference to this. The section entry will refer - // to CONTENTS, which must be Placed in the segment's contents - // separately, at the desired position. - SegmentLoadCommand &AppendSectionEntry(const string §ion_name, - const string &segment_name, - uint32_t alignment, uint32_t flags, - const LoadedSection &contents) { - AppendCString(section_name, 16); - AppendCString(segment_name, 16); - Append(endianness(), word_size() / 8, contents.address()); - Append(endianness(), word_size() / 8, contents.final_size()); - D32(contents.start()); - D32(alignment); - D32(0); // relocations start - D32(0); // relocations size - D32(flags); - D32(0x93656b95); // reserved1 - D32(0xc35a2473); // reserved2 - if (word_size() == 64) - D32(0x70284b95); // reserved3 - - section_count_++; - - return *this; - } - - protected: - void Finish() { - final_section_count_ = section_count_; - if (!vmsize_.IsKnownConstant()) - vmsize_ = content_final_size_; - SizedSection::Finish(); - } - - private: - // The number of sections that have been added to this segment so far. - size_t section_count_; - - // A label representing the final number of sections this segment will hold. - Label final_section_count_; - - // The size of the contents for this segment present in the file. - Label content_final_size_; - - // A label representing the size of this segment when loaded; this can be - // larger than the size of its file contents, the difference being - // zero-filled. If not set explicitly by calling set_vmsize, this is set - // equal to the size of the contents. - Label vmsize_; -}; - -// A SizedSection holding a list of Mach-O load commands. -class LoadCommands: public SizedSection { - public: - LoadCommands() : command_count_(0) { } - - // Return a label representing the final load command count. - Label final_command_count() const { return final_command_count_; } - - // Increment the command count; return a reference to this section. - LoadCommands &CountCommand() { - command_count_++; - return *this; - } - - // Place COMMAND, containing a load command, at the end of this section. - // Return a reference to this section. - LoadCommands &Place(SizedSection *section) { - SizedSection::Place(section); - CountCommand(); - return *this; - } - - protected: - // Mark this load command list as complete. - void Finish() { - SizedSection::Finish(); - final_command_count_ = command_count_; - } - - private: - // The number of load commands we have added to this file so far. - size_t command_count_; - - // A label representing the final command count. - Label final_command_count_; -}; - -// A SizedSection holding the contents of a Mach-O file. Within a -// MachOFile, the start, Here, and Mark members refer to file offsets. -class MachOFile: public SizedSection { - public: - MachOFile() { - start() = 0; - } - - // Create a Mach-O file header using the given characteristics and load - // command list. This Places COMMANDS immediately after the header. - // Return a reference to this section. - MachOFile &Header(LoadCommands *commands, - cpu_type_t cpu_type = CPU_TYPE_X86, - cpu_subtype_t cpu_subtype = CPU_SUBTYPE_I386_ALL, - FileType file_type = MH_EXECUTE, - uint32_t file_flags = (MH_TWOLEVEL | - MH_DYLDLINK | - MH_NOUNDEFS)) { - D32(word_size() == 32 ? 0xfeedface : 0xfeedfacf); // magic number - D32(cpu_type); // cpu type - D32(cpu_subtype); // cpu subtype - D32(file_type); // file type - D32(commands->final_command_count()); // number of load commands - D32(commands->final_size()); // their size in bytes - D32(file_flags); // flags - if (word_size() == 64) - D32(0x55638b90); // reserved - Place(commands); - return *this; - } -}; - - -struct ReaderFixture { - ReaderFixture() - : reporter("reporter filename"), - reader(&reporter) { - EXPECT_CALL(reporter, BadHeader()).Times(0); - EXPECT_CALL(reporter, CPUTypeMismatch(_, _, _, _)).Times(0); - EXPECT_CALL(reporter, HeaderTruncated()).Times(0); - EXPECT_CALL(reporter, LoadCommandRegionTruncated()).Times(0); - EXPECT_CALL(reporter, LoadCommandsOverrun(_, _, _)).Times(0); - EXPECT_CALL(reporter, LoadCommandTooShort(_, _)).Times(0); - EXPECT_CALL(reporter, SectionsMissing(_)).Times(0); - EXPECT_CALL(reporter, MisplacedSegmentData(_)).Times(0); - EXPECT_CALL(reporter, MisplacedSectionData(_, _)).Times(0); - EXPECT_CALL(reporter, MisplacedSymbolTable()).Times(0); - EXPECT_CALL(reporter, UnsupportedCPUType(_)).Times(0); - - EXPECT_CALL(load_command_handler, UnknownCommand(_, _)).Times(0); - EXPECT_CALL(load_command_handler, SegmentCommand(_)).Times(0); - } - - void ReadFile(MachOFile *file, - bool expect_parse_success, - cpu_type_t expected_cpu_type, - cpu_subtype_t expected_cpu_subtype) { - ASSERT_TRUE(file->GetContents(&file_contents)); - file_bytes = reinterpret_cast(file_contents.data()); - if (expect_parse_success) { - EXPECT_TRUE(reader.Read(file_bytes, - file_contents.size(), - expected_cpu_type, - expected_cpu_subtype)); - } else { - EXPECT_FALSE(reader.Read(file_bytes, - file_contents.size(), - expected_cpu_type, - expected_cpu_subtype)); - } - } - - string file_contents; - const uint8_t *file_bytes; - MockReaderReporter reporter; - Reader reader; - MockLoadCommandHandler load_command_handler; - MockSectionHandler section_handler; -}; - -class ReaderTest: public ReaderFixture, public Test { }; - -TEST_F(ReaderTest, BadMagic) { - WithConfiguration config(kLittleEndian, 32); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0x67bdebe1) // Not a proper magic number. - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - EXPECT_CALL(reporter, BadHeader()).WillOnce(Return()); - ReadFile(&file, false, CPU_TYPE_ANY, kCPUSubType); -} - -TEST_F(ReaderTest, MismatchedMagic) { - WithConfiguration config(kLittleEndian, 32); - const cpu_type_t kCPUType = CPU_TYPE_I386; - const cpu_subtype_t kCPUSubType = CPU_SUBTYPE_X86_ALL; - MachOFile file; - file - .D32(MH_CIGAM) // Right magic, but winds up wrong - // due to bitswapping - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - EXPECT_CALL(reporter, BadHeader()).WillOnce(Return()); - ReadFile(&file, false, kCPUType, kCPUSubType); -} - -TEST_F(ReaderTest, ShortMagic) { - WithConfiguration config(kBigEndian, 32); - MachOFile file; - file - .D16(0xfeed); // magic number - // truncated! - EXPECT_CALL(reporter, HeaderTruncated()).WillOnce(Return()); - ReadFile(&file, false, CPU_TYPE_ANY, 0); -} - -TEST_F(ReaderTest, ShortHeader) { - WithConfiguration config(kBigEndian, 32); - const cpu_type_t kCPUType = CPU_TYPE_ANY; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedface) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0); // they occupy no bytes - EXPECT_CALL(reporter, HeaderTruncated()).WillOnce(Return()); - ReadFile(&file, false, CPU_TYPE_ANY, kCPUSubType); -} - -TEST_F(ReaderTest, MismatchedCPU) { - WithConfiguration config(kBigEndian, 32); - const cpu_type_t kCPUType = CPU_TYPE_I386; - const cpu_subtype_t kCPUSubType = CPU_SUBTYPE_X86_ALL; - MachOFile file; - file - .D32(MH_MAGIC) // Right magic for PPC (once bitswapped) - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - EXPECT_CALL(reporter, - CPUTypeMismatch(CPU_TYPE_I386, CPU_SUBTYPE_X86_ALL, - CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_ALL)) - .WillOnce(Return()); - ReadFile(&file, false, CPU_TYPE_POWERPC, CPU_SUBTYPE_POWERPC_ALL); -} - -TEST_F(ReaderTest, LittleEndian32Bit) { - WithConfiguration config(kLittleEndian, 32); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedface) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - ReadFile(&file, true, CPU_TYPE_ANY, kCPUSubType); - EXPECT_FALSE(reader.bits_64()); - EXPECT_FALSE(reader.big_endian()); - EXPECT_EQ(kCPUType, reader.cpu_type()); - EXPECT_EQ(kCPUSubType, reader.cpu_subtype()); - EXPECT_EQ(FileType(0x149fc717), reader.file_type()); - EXPECT_EQ(FileFlags(0x80e71d64), reader.flags()); -} - -TEST_F(ReaderTest, LittleEndian64Bit) { - WithConfiguration config(kLittleEndian, 64); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedfacf) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - ReadFile(&file, true, CPU_TYPE_ANY, kCPUSubType); - EXPECT_TRUE(reader.bits_64()); - EXPECT_FALSE(reader.big_endian()); - EXPECT_EQ(kCPUType, reader.cpu_type()); - EXPECT_EQ(kCPUSubType, reader.cpu_subtype()); - EXPECT_EQ(FileType(0x149fc717), reader.file_type()); - EXPECT_EQ(FileFlags(0x80e71d64), reader.flags()); -} - -TEST_F(ReaderTest, BigEndian32Bit) { - WithConfiguration config(kBigEndian, 32); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedface) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - ReadFile(&file, true, CPU_TYPE_ANY, kCPUSubType); - EXPECT_FALSE(reader.bits_64()); - EXPECT_TRUE(reader.big_endian()); - EXPECT_EQ(kCPUType, reader.cpu_type()); - EXPECT_EQ(kCPUSubType, reader.cpu_subtype()); - EXPECT_EQ(FileType(0x149fc717), reader.file_type()); - EXPECT_EQ(FileFlags(0x80e71d64), reader.flags()); -} - -TEST_F(ReaderTest, BigEndian64Bit) { - WithConfiguration config(kBigEndian, 64); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedfacf) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(0) // no load commands - .D32(0) // they occupy no bytes - .D32(0x80e71d64) // flags - .D32(0); // reserved - ReadFile(&file, true, CPU_TYPE_ANY, kCPUSubType); - EXPECT_TRUE(reader.bits_64()); - EXPECT_TRUE(reader.big_endian()); - EXPECT_EQ(kCPUType, reader.cpu_type()); - EXPECT_EQ(kCPUSubType, reader.cpu_subtype()); - EXPECT_EQ(FileType(0x149fc717), reader.file_type()); - EXPECT_EQ(FileFlags(0x80e71d64), reader.flags()); -} - - -// Load command tests. - -class LoadCommand: public ReaderFixture, public Test { }; - -TEST_F(LoadCommand, RegionTruncated) { - WithConfiguration config(kBigEndian, 64); - const cpu_type_t kCPUType = 0x46b760df; - const cpu_subtype_t kCPUSubType = 0x76a0e7f7; - MachOFile file; - file - .D32(0xfeedfacf) // magic number - .D32(kCPUType) // cpu type - .D32(kCPUSubType) // cpu subtype - .D32(0x149fc717) // file type - .D32(1) // one load command - .D32(40) // occupying 40 bytes - .D32(0x80e71d64) // flags - .D32(0) // reserved - .Append(20, 0); // load command region, not as long as - // Mach-O header promised - - EXPECT_CALL(reporter, LoadCommandRegionTruncated()).WillOnce(Return()); - - ReadFile(&file, false, CPU_TYPE_ANY, kCPUSubType); -} - -TEST_F(LoadCommand, None) { - WithConfiguration config(kLittleEndian, 32); - LoadCommands load_commands; - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_X86, CPU_SUBTYPE_I386_ALL); - - EXPECT_FALSE(reader.bits_64()); - EXPECT_FALSE(reader.big_endian()); - EXPECT_EQ(CPU_TYPE_X86, reader.cpu_type()); - EXPECT_EQ(CPU_SUBTYPE_I386_ALL, reader.cpu_subtype()); - EXPECT_EQ(static_cast(MH_EXECUTE), reader.file_type()); - EXPECT_EQ(FileFlags(MH_TWOLEVEL | - MH_DYLDLINK | - MH_NOUNDEFS), - FileFlags(reader.flags())); - - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, Unknown) { - WithConfiguration config(kBigEndian, 32); - LoadCommands load_commands; - load_commands - .CountCommand() - .D32(0x33293d4a) // unknown load command - .D32(40) // total size in bytes - .Append(32, '*'); // dummy data - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_FALSE(reader.bits_64()); - EXPECT_TRUE(reader.big_endian()); - EXPECT_EQ(CPU_TYPE_X86, reader.cpu_type()); - EXPECT_EQ(CPU_SUBTYPE_I386_ALL, reader.cpu_subtype()); - EXPECT_EQ(static_cast(MH_EXECUTE), reader.file_type()); - EXPECT_EQ(FileFlags(MH_TWOLEVEL | - MH_DYLDLINK | - MH_NOUNDEFS), - reader.flags()); - - ByteBuffer expected; - expected.start = file_bytes + load_commands.start().Value(); - expected.end = expected.start + load_commands.final_size().Value(); - EXPECT_CALL(load_command_handler, UnknownCommand(0x33293d4a, - expected)) - .WillOnce(Return(true)); - - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, TypeIncomplete) { - WithConfiguration config(kLittleEndian, 32); - LoadCommands load_commands; - load_commands - .CountCommand() - .Append(3, 0); // load command type, incomplete - - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, LoadCommandsOverrun(1, 0, 0)) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, LengthIncomplete) { - WithConfiguration config(kBigEndian, 64); - LoadCommands load_commands; - load_commands - .CountCommand() - .D32(LC_SEGMENT); // load command - // no length - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, LoadCommandsOverrun(1, 0, LC_SEGMENT)) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, ContentIncomplete) { - WithConfiguration config(kLittleEndian, 64); - LoadCommands load_commands; - load_commands - .CountCommand() - .D32(LC_SEGMENT) // load command - .D32(40) // total size in bytes - .Append(28, '*'); // not enough dummy data - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, LoadCommandsOverrun(1, 0, LC_SEGMENT)) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, SegmentBE32) { - WithConfiguration config(kBigEndian, 32); - LoadedSection segment; - segment.address() = 0x1891139c; - segment.Append(42, '*'); // segment contents - SegmentLoadCommand segment_command; - segment_command - .Header("froon", segment, 0x94d6dd22, 0x8bdbc319, 0x990a16dd); - segment_command.vmsize() = 0xcb76584fU; - LoadCommands load_commands; - load_commands.Place(&segment_command); - MachOFile file; - file - .Header(&load_commands) - .Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_CALL(load_command_handler, SegmentCommand(_)) - .WillOnce(DoAll(SaveArg<0>(&actual_segment), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(false, actual_segment.bits_64); - EXPECT_EQ("froon", actual_segment.name); - EXPECT_EQ(0x1891139cU, actual_segment.vmaddr); - EXPECT_EQ(0xcb76584fU, actual_segment.vmsize); - EXPECT_EQ(0x94d6dd22U, actual_segment.maxprot); - EXPECT_EQ(0x8bdbc319U, actual_segment.initprot); - EXPECT_EQ(0x990a16ddU, actual_segment.flags); - EXPECT_EQ(0U, actual_segment.nsects); - EXPECT_EQ(0U, actual_segment.section_list.Size()); - EXPECT_EQ(segment.final_size().Value(), actual_segment.contents.Size()); -} - -TEST_F(LoadCommand, SegmentLE32) { - WithConfiguration config(kLittleEndian, 32); - LoadedSection segment; - segment.address() = 0x4b877866; - segment.Append(42, '*'); // segment contents - SegmentLoadCommand segment_command; - segment_command - .Header("sixteenprecisely", segment, - 0x350759ed, 0x6cf5a62e, 0x990a16dd); - segment_command.vmsize() = 0xcb76584fU; - LoadCommands load_commands; - load_commands.Place(&segment_command); - MachOFile file; - file - .Header(&load_commands) - .Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_CALL(load_command_handler, SegmentCommand(_)) - .WillOnce(DoAll(SaveArg<0>(&actual_segment), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(false, actual_segment.bits_64); - EXPECT_EQ("sixteenprecisely", actual_segment.name); - EXPECT_EQ(0x4b877866U, actual_segment.vmaddr); - EXPECT_EQ(0xcb76584fU, actual_segment.vmsize); - EXPECT_EQ(0x350759edU, actual_segment.maxprot); - EXPECT_EQ(0x6cf5a62eU, actual_segment.initprot); - EXPECT_EQ(0x990a16ddU, actual_segment.flags); - EXPECT_EQ(0U, actual_segment.nsects); - EXPECT_EQ(0U, actual_segment.section_list.Size()); - EXPECT_EQ(segment.final_size().Value(), actual_segment.contents.Size()); -} - -TEST_F(LoadCommand, SegmentBE64) { - WithConfiguration config(kBigEndian, 64); - LoadedSection segment; - segment.address() = 0x79f484f77009e511ULL; - segment.Append(42, '*'); // segment contents - SegmentLoadCommand segment_command; - segment_command - .Header("froon", segment, 0x42b45da5, 0x8bdbc319, 0xb2335220); - segment_command.vmsize() = 0x8d92397ce6248abaULL; - LoadCommands load_commands; - load_commands.Place(&segment_command); - MachOFile file; - file - .Header(&load_commands) - .Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_CALL(load_command_handler, SegmentCommand(_)) - .WillOnce(DoAll(SaveArg<0>(&actual_segment), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(true, actual_segment.bits_64); - EXPECT_EQ("froon", actual_segment.name); - EXPECT_EQ(0x79f484f77009e511ULL, actual_segment.vmaddr); - EXPECT_EQ(0x8d92397ce6248abaULL, actual_segment.vmsize); - EXPECT_EQ(0x42b45da5U, actual_segment.maxprot); - EXPECT_EQ(0x8bdbc319U, actual_segment.initprot); - EXPECT_EQ(0xb2335220U, actual_segment.flags); - EXPECT_EQ(0U, actual_segment.nsects); - EXPECT_EQ(0U, actual_segment.section_list.Size()); - EXPECT_EQ(segment.final_size().Value(), actual_segment.contents.Size()); -} - -TEST_F(LoadCommand, SegmentLE64) { - WithConfiguration config(kLittleEndian, 64); - LoadedSection segment; - segment.address() = 0x50c0501dc5922d35ULL; - segment.Append(42, '*'); // segment contents - SegmentLoadCommand segment_command; - segment_command - .Header("sixteenprecisely", segment, - 0x917c339d, 0xdbc446fa, 0xb650b563); - segment_command.vmsize() = 0x84ae73e7c75469bfULL; - LoadCommands load_commands; - load_commands.Place(&segment_command); - MachOFile file; - file - .Header(&load_commands) - .Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_CALL(load_command_handler, SegmentCommand(_)) - .WillOnce(DoAll(SaveArg<0>(&actual_segment), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(true, actual_segment.bits_64); - EXPECT_EQ("sixteenprecisely", actual_segment.name); - EXPECT_EQ(0x50c0501dc5922d35ULL, actual_segment.vmaddr); - EXPECT_EQ(0x84ae73e7c75469bfULL, actual_segment.vmsize); - EXPECT_EQ(0x917c339dU, actual_segment.maxprot); - EXPECT_EQ(0xdbc446faU, actual_segment.initprot); - EXPECT_EQ(0xb650b563U, actual_segment.flags); - EXPECT_EQ(0U, actual_segment.nsects); - EXPECT_EQ(0U, actual_segment.section_list.Size()); - EXPECT_EQ(segment.final_size().Value(), actual_segment.contents.Size()); -} - -TEST_F(LoadCommand, SegmentCommandTruncated) { - WithConfiguration config(kBigEndian, 32); - LoadedSection segment_contents; - segment_contents.Append(20, '*'); // lah di dah - SizedSection command; - command - .D32(LC_SEGMENT) // command type - .D32(command.final_size()) // command size - .AppendCString("too-short", 16) // segment name - .D32(0x9c759211) // vmaddr - .D32(segment_contents.final_size()) // vmsize - .D32(segment_contents.start()) // file offset - .D32(segment_contents.final_size()) // file size - .D32(0x56f28446) // max protection - .D32(0xe7910dcb) // initial protection - .D32(0) // no sections - .Append(3, 0); // flags (one byte short!) - LoadCommands load_commands; - load_commands.Place(&command); - MachOFile file; - file - .Header(&load_commands) - .Place(&segment_contents); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, LoadCommandTooShort(0, LC_SEGMENT)) - .WillOnce(Return()); - - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, SegmentBadContentOffset) { - WithConfiguration config(kLittleEndian, 32); - // Instead of letting a Place call set the segment's file offset and size, - // set them ourselves, to check that the parser catches invalid offsets - // instead of handing us bogus pointers. - LoadedSection segment; - segment.address() = 0x4db5489c; - segment.start() = 0x7e189e76; // beyond end of file - segment.final_size() = 0x98b9c3ab; - SegmentLoadCommand segment_command; - segment_command - .Header("notmerelyfifteen", segment, 0xcbab25ee, 0x359a20db, 0x68a3933f); - LoadCommands load_commands; - load_commands.Place(&segment_command); - MachOFile file; - file.Header(&load_commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, MisplacedSegmentData("notmerelyfifteen")) - .WillOnce(Return()); - - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(LoadCommand, ThreeLoadCommands) { - WithConfiguration config(kBigEndian, 32); - LoadedSection seg1, seg2, seg3; - SegmentLoadCommand cmd1, cmd2, cmd3; - - seg1.Append(128, '@'); - seg1.address() = 0xa7f61ef6; - cmd1.Header("head", seg1, 0x88bf1cc7, 0x889a26a4, 0xe9b80d87); - // Include some dummy data at the end of the load command. Since we - // didn't claim to have any sections, the reader should ignore this. But - // making sure the commands have different lengths ensures that we're - // using the right command's length to advance the LoadCommandIterator. - cmd1.Append(128, '!'); - - seg2.Append(42, '*'); - seg2.address() = 0xc70fc909; - cmd2.Header("thorax", seg2, 0xde7327f4, 0xfdaf771d, 0x65e74b30); - // More dummy data at the end of the load command. - cmd2.Append(32, '^'); - - seg3.Append(42, '%'); - seg3.address() = 0x46b3ab05; - cmd3.Header("abdomen", seg3, 0x7098b70d, 0x8d8d7728, 0x5131419b); - // More dummy data at the end of the load command. - cmd3.Append(64, '&'); - - LoadCommands load_commands; - load_commands.Place(&cmd1).Place(&cmd2).Place(&cmd3); - - MachOFile file; - file.Header(&load_commands).Place(&seg1).Place(&seg2).Place(&seg3); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - { - InSequence s; - EXPECT_CALL(load_command_handler, - SegmentCommand(Field(&Segment::name, "head"))) - .WillOnce(Return(true)); - EXPECT_CALL(load_command_handler, - SegmentCommand(Field(&Segment::name, "thorax"))) - .WillOnce(Return(true)); - EXPECT_CALL(load_command_handler, - SegmentCommand(Field(&Segment::name, "abdomen"))) - .WillOnce(Return(true)); - } - - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); -} - -static inline Matcher MatchSection( - Matcher bits_64, - Matcher section_name, - Matcher segment_name, - Matcher address, - Matcher alignment, - Matcher flags, - Matcher contents) { - return AllOf(AllOf(Field(&Section::bits_64, bits_64), - Field(&Section::section_name, section_name), - Field(&Section::segment_name, segment_name), - Field(&Section::address, address)), - AllOf(Field(&Section::align, alignment), - Field(&Section::flags, flags), - Field(&Section::contents, contents))); -} - -static inline Matcher MatchSection( - Matcher bits_64, - Matcher section_name, - Matcher segment_name, - Matcher address) { - return AllOf(Field(&Section::bits_64, bits_64), - Field(&Section::section_name, section_name), - Field(&Section::segment_name, segment_name), - Field(&Section::address, address)); -} - -TEST_F(LoadCommand, OneSegmentTwoSections) { - WithConfiguration config(kBigEndian, 64); - - // Create some sections with some data. - LoadedSection section1, section2; - section1.Append("buddha's hand"); - section2.Append("kumquat"); - - // Create a segment to hold them. - LoadedSection segment; - segment.address() = 0xe1d0eeec; - segment.Place(§ion2).Place(§ion1); - - SegmentLoadCommand segment_command; - segment_command - .Header("head", segment, 0x92c9568c, 0xa89f2627, 0x4dc7a1e2) - .AppendSectionEntry("mandarin", "kishu", 12, 0x8cd4604bU, section1) - .AppendSectionEntry("bergamot", "cara cara", 12, 0x98746efaU, section2); - - LoadCommands commands; - commands.Place(&segment_command); - - MachOFile file; - file.Header(&commands).Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_CALL(load_command_handler, SegmentCommand(_)) - .WillOnce(DoAll(SaveArg<0>(&actual_segment), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - { - InSequence s; - ByteBuffer contents1; - contents1.start = file_bytes + section1.start().Value(); - contents1.end = contents1.start + section1.final_size().Value(); - EXPECT_EQ("buddha's hand", - string(reinterpret_cast(contents1.start), - contents1.Size())); - EXPECT_CALL(section_handler, - HandleSection(MatchSection(true, "mandarin", "kishu", - section1.address().Value(), 12, - 0x8cd4604bU, contents1))) - .WillOnce(Return(true)); - - ByteBuffer contents2; - contents2.start = file_bytes + section2.start().Value(); - contents2.end = contents2.start + section2.final_size().Value(); - EXPECT_EQ("kumquat", - string(reinterpret_cast(contents2.start), - contents2.Size())); - EXPECT_CALL(section_handler, - HandleSection(MatchSection(true, "bergamot", "cara cara", - section2.address().Value(), 12, - 0x98746efaU, contents2))) - .WillOnce(Return(true)); - } - - EXPECT_TRUE(reader.WalkSegmentSections(actual_segment, §ion_handler)); -} - -TEST_F(LoadCommand, MisplacedSectionBefore) { - WithConfiguration config(kLittleEndian, 64); - - // The segment. - LoadedSection segment; - segment.address() = 0x696d83cc; - segment.Append(10, '0'); - - // The contents of the following sections don't matter, because - // we're not really going to Place them in segment; we're just going - // to set all their labels by hand to get the (impossible) - // configurations we want. - - // A section whose starting offset is before that of its section. - LoadedSection before; - before.Append(10, '1'); - before.start() = segment.start() - 1; - before.address() = segment.address() - 1; - before.final_size() = before.Size(); - - SegmentLoadCommand command; - command - .Header("segment", segment, 0x173baa29, 0x8407275d, 0xed8f7057) - .AppendSectionEntry("before", "segment", 0, 0x686c6921, before); - - LoadCommands commands; - commands.Place(&command); - - MachOFile file; - file.Header(&commands).Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_TRUE(reader.FindSegment("segment", &actual_segment)); - - EXPECT_CALL(reporter, MisplacedSectionData("before", "segment")) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkSegmentSections(actual_segment, §ion_handler)); -} - -TEST_F(LoadCommand, MisplacedSectionAfter) { - WithConfiguration config(kLittleEndian, 64); - - // The segment. - LoadedSection segment; - segment.address() = 0x696d83cc; - segment.Append(10, '0'); - - // The contents of the following sections don't matter, because - // we're not really going to Place them in segment; we're just going - // to set all their labels by hand to get the (impossible) - // configurations we want. - - // A section whose starting offset is after the end of its section. - LoadedSection after; - after.Append(10, '2'); - after.start() = segment.start() + 11; - after.address() = segment.address() + 11; - after.final_size() = after.Size(); - - SegmentLoadCommand command; - command - .Header("segment", segment, 0x173baa29, 0x8407275d, 0xed8f7057) - .AppendSectionEntry("after", "segment", 0, 0x2ee50124, after); - - LoadCommands commands; - commands.Place(&command); - - MachOFile file; - file.Header(&commands).Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_TRUE(reader.FindSegment("segment", &actual_segment)); - - EXPECT_CALL(reporter, MisplacedSectionData("after", "segment")) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkSegmentSections(actual_segment, §ion_handler)); -} - -TEST_F(LoadCommand, MisplacedSectionTooBig) { - WithConfiguration config(kLittleEndian, 64); - - // The segment. - LoadedSection segment; - segment.address() = 0x696d83cc; - segment.Append(10, '0'); - - // The contents of the following sections don't matter, because - // we're not really going to Place them in segment; we're just going - // to set all their labels by hand to get the (impossible) - // configurations we want. - - // A section that extends beyond the end of its section. - LoadedSection too_big; - too_big.Append(10, '3'); - too_big.start() = segment.start() + 1; - too_big.address() = segment.address() + 1; - too_big.final_size() = too_big.Size(); - - SegmentLoadCommand command; - command - .Header("segment", segment, 0x173baa29, 0x8407275d, 0xed8f7057) - .AppendSectionEntry("too big", "segment", 0, 0x8b53ae5c, too_big); - - LoadCommands commands; - commands.Place(&command); - - MachOFile file; - file.Header(&commands).Place(&segment); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_TRUE(reader.FindSegment("segment", &actual_segment)); - - EXPECT_CALL(reporter, MisplacedSectionData("too big", "segment")) - .WillOnce(Return()); - EXPECT_FALSE(reader.WalkSegmentSections(actual_segment, §ion_handler)); -} - - -// The segments in a .dSYM bundle's Mach-O file have their file offset -// and size set to zero, but the sections don't. The reader shouldn't -// report an error in this case. -TEST_F(LoadCommand, ZappedSegment) { - WithConfiguration config(kBigEndian, 32); - - // The segment. - LoadedSection segment; - segment.address() = 0x696d83cc; - segment.start() = 0; - segment.final_size() = 0; - - // The section. - LoadedSection section; - section.address() = segment.address(); - section.start() = 0; - section.final_size() = 1000; // extends beyond its segment - - SegmentLoadCommand command; - command - .Header("zapped", segment, 0x0861a5cb, 0x68ccff67, 0x0b66255c) - .AppendSectionEntry("twitching", "zapped", 0, 0x93b3bd42, section); - - LoadCommands commands; - commands.Place(&command); - - MachOFile file; - file.Header(&commands); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - EXPECT_TRUE(reader.FindSegment("zapped", &actual_segment)); - - ByteBuffer zapped_extent(NULL, 0); - EXPECT_CALL(section_handler, - HandleSection(MatchSection(false, "twitching", "zapped", - 0x696d83cc, 0, 0x93b3bd42, - zapped_extent))) - .WillOnce(Return(true)); - - EXPECT_TRUE(reader.WalkSegmentSections(actual_segment, §ion_handler)); -} - -TEST_F(LoadCommand, MapSegmentSections) { - WithConfiguration config(kLittleEndian, 32); - - // Create some sections with some data. - LoadedSection section1, section2, section3, section4; - section1.Append("buddha's hand"); - section2.start() = 0; // Section 2 is an S_ZEROFILL section. - section2.final_size() = 0; - section3.Append("shasta gold"); - section4.Append("satsuma"); - - // Create two segments to hold them. - LoadedSection segment1, segment2; - segment1.address() = 0x13e6c8a9; - segment1.Place(§ion3).Place(§ion1); - segment2.set_word_size(64); - segment2.address() = 0x04d462e2; - segment2.Place(§ion4); - section2.address() = segment2.address() + segment2.Size(); - - SegmentLoadCommand segment_command1, segment_command2; - segment_command1 - .Header("head", segment1, 0x67d955a6, 0x7a61c13e, 0xe3e50c64) - .AppendSectionEntry("mandarin", "head", 12, 0x5bb565d7, section1) - .AppendSectionEntry("bergamot", "head", 12, 0x8620de73, section3); - segment_command2.set_word_size(64); - segment_command2 - .Header("thorax", segment2, 0x7aab2419, 0xe908007f, 0x17961d33) - .AppendSectionEntry("sixteenprecisely", "thorax", - 12, S_ZEROFILL, section2) - .AppendSectionEntry("cara cara", "thorax", 12, 0xb6c5dd8a, section4); - - LoadCommands commands; - commands.Place(&segment_command1).Place(&segment_command2); - - MachOFile file; - file.Header(&commands).Place(&segment1).Place(&segment2); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment segment; - SectionMap section_map; - - EXPECT_FALSE(reader.FindSegment("smoot", &segment)); - - ASSERT_TRUE(reader.FindSegment("thorax", &segment)); - ASSERT_TRUE(reader.MapSegmentSections(segment, §ion_map)); - - EXPECT_FALSE(section_map.find("sixteenpreciselyandthensome") - != section_map.end()); - EXPECT_FALSE(section_map.find("mandarin") != section_map.end()); - ASSERT_TRUE(section_map.find("cara cara") != section_map.end()); - EXPECT_THAT(section_map["cara cara"], - MatchSection(true, "cara cara", "thorax", 0x04d462e2)); - ASSERT_TRUE(section_map.find("sixteenprecisely") - != section_map.end()); - ByteBuffer sixteenprecisely_contents(NULL, 0); - EXPECT_THAT(section_map["sixteenprecisely"], - MatchSection(true, "sixteenprecisely", "thorax", - 0x04d462e2 + 7, 12, S_ZEROFILL, - sixteenprecisely_contents)); - - ASSERT_TRUE(reader.FindSegment("head", &segment)); - ASSERT_TRUE(reader.MapSegmentSections(segment, §ion_map)); - - ASSERT_TRUE(section_map.find("mandarin") != section_map.end()); - EXPECT_THAT(section_map["mandarin"], - MatchSection(false, "mandarin", "head", 0x13e6c8a9 + 11)); - ASSERT_TRUE(section_map.find("bergamot") != section_map.end()); - EXPECT_THAT(section_map["bergamot"], - MatchSection(false, "bergamot", "head", 0x13e6c8a9)); -} - -TEST_F(LoadCommand, FindSegment) { - WithConfiguration config(kBigEndian, 32); - - LoadedSection segment1, segment2, segment3; - segment1.address() = 0xb8ae5752; - segment1.Append("Some contents!"); - segment2.address() = 0xd6b0ce83; - segment2.Append("Different stuff."); - segment3.address() = 0x7374fd2a; - segment3.Append("Further materials."); - - SegmentLoadCommand cmd1, cmd2, cmd3; - cmd1.Header("first", segment1, 0xfadb6932, 0x175bf529, 0x0de790ad); - cmd2.Header("second", segment2, 0xeef716e0, 0xe103a9d7, 0x7d38a8ef); - cmd3.Header("third", segment3, 0xe172b39e, 0x86012f07, 0x080ac94d); - - LoadCommands commands; - commands.Place(&cmd1).Place(&cmd2).Place(&cmd3); - - MachOFile file; - file.Header(&commands).Place(&segment1).Place(&segment2).Place(&segment3); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - Segment actual_segment; - - EXPECT_FALSE(reader.FindSegment("murphy", &actual_segment)); - - EXPECT_TRUE(reader.FindSegment("second", &actual_segment)); - EXPECT_EQ(0xd6b0ce83, actual_segment.vmaddr); -} - - -// Symtab tests. - -// A StringAssembler is a class for generating .stabstr sections to present -// as input to the STABS parser. -class StringAssembler: public SizedSection { - public: - // Add the string S to this StringAssembler, and return the string's - // offset within this compilation unit's strings. - size_t Add(const string &s) { - size_t offset = Size(); - AppendCString(s); - return offset; - } -}; - -// A SymbolAssembler is a class for generating .stab sections to present as -// test input for the STABS parser. -class SymbolAssembler: public SizedSection { - public: - // Create a SymbolAssembler that uses StringAssembler for its strings. - explicit SymbolAssembler(StringAssembler *string_assembler) - : string_assembler_(string_assembler), - entry_count_(0) { } - - // Append a STAB entry to the end of this section with the given - // characteristics. NAME is the offset of this entry's name string within - // its compilation unit's portion of the .stabstr section; this can be a - // value generated by a StringAssembler. Return a reference to this - // SymbolAssembler. - SymbolAssembler &Symbol(uint8_t type, uint8_t other, Label descriptor, - Label value, Label name) { - D32(name); - D8(type); - D8(other); - D16(descriptor); - Append(endianness(), word_size_ / 8, value); - entry_count_++; - return *this; - } - - // As above, but automatically add NAME to our StringAssembler. - SymbolAssembler &Symbol(uint8_t type, uint8_t other, Label descriptor, - Label value, const string &name) { - return Symbol(type, other, descriptor, value, string_assembler_->Add(name)); - } - - private: - // The strings for our STABS entries. - StringAssembler *string_assembler_; - - // The number of entries in this compilation unit so far. - size_t entry_count_; -}; - -class Symtab: public ReaderFixture, public Test { }; - -TEST_F(Symtab, Symtab32) { - WithConfiguration config(kLittleEndian, 32); - - StringAssembler strings; - SymbolAssembler symbols(&strings); - symbols - .Symbol(0x52, 0x7c, 0x3470, 0x9bb02e7c, "hrududu") - .Symbol(0x50, 0x90, 0x7520, 0x1122525d, "Frith"); - - SizedSection symtab_command; - symtab_command - .D32(LC_SYMTAB) // command - .D32(symtab_command.final_size()) // size - .D32(symbols.start()) // file offset of symbols - .D32(2) // symbol count - .D32(strings.start()) // file offset of strings - .D32(strings.final_size()); // strings size - - LoadCommands load_commands; - load_commands.Place(&symtab_command); - - MachOFile file; - file.Header(&load_commands).Place(&symbols).Place(&strings); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - ByteBuffer symbols_found, strings_found; - EXPECT_CALL(load_command_handler, SymtabCommand(_, _)) - .WillOnce(DoAll(SaveArg<0>(&symbols_found), - SaveArg<1>(&strings_found), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(24U, symbols_found.Size()); - EXPECT_EQ(14U, strings_found.Size()); -} - -TEST_F(Symtab, Symtab64) { - WithConfiguration config(kBigEndian, 64); - - StringAssembler strings; - SymbolAssembler symbols(&strings); - symbols - .Symbol(0xa7, 0xaf, 0x03af, 0x42f3072c74335181ULL, "foo") - .Symbol(0xb0, 0x9a, 0x2aa7, 0x2e2d349b3d5744a0ULL, "bar"); - - SizedSection symtab_command; - symtab_command - .D32(LC_SYMTAB) // command - .D32(symtab_command.final_size()) // size - .D32(symbols.start()) // file offset of symbols - .D32(2) // symbol count - .D32(strings.start()) // file offset of strings - .D32(strings.final_size()); // strings size - - LoadCommands load_commands; - load_commands.Place(&symtab_command); - - MachOFile file; - file.Header(&load_commands).Place(&symbols).Place(&strings); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - ByteBuffer symbols_found, strings_found; - EXPECT_CALL(load_command_handler, SymtabCommand(_, _)) - .WillOnce(DoAll(SaveArg<0>(&symbols_found), - SaveArg<1>(&strings_found), - Return(true))); - EXPECT_TRUE(reader.WalkLoadCommands(&load_command_handler)); - - EXPECT_EQ(32U, symbols_found.Size()); - EXPECT_EQ(8U, strings_found.Size()); -} - -TEST_F(Symtab, SymtabMisplacedSymbols) { - WithConfiguration config(kBigEndian, 32); - - StringAssembler strings; - SymbolAssembler symbols(&strings); - symbols - .Symbol(0xa7, 0xaf, 0x03af, 0x42f3072c74335181ULL, "foo") - .Symbol(0xb0, 0x9a, 0x2aa7, 0x2e2d349b3d5744a0ULL, "bar"); - - SizedSection symtab_command; - symtab_command - .D32(LC_SYMTAB) // command - .D32(symtab_command.final_size()) // size - .D32(symbols.start()) // file offset of symbols - .D32(3) // symbol count (too many) - .D32(strings.start()) // file offset of strings - .D32(strings.final_size()); // strings size - - LoadCommands load_commands; - load_commands.Place(&symtab_command); - - MachOFile file; - // Put symbols at end, so the excessive length will be noticed. - file.Header(&load_commands).Place(&strings).Place(&symbols); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, MisplacedSymbolTable()).Times(1); - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - -TEST_F(Symtab, SymtabMisplacedStrings) { - WithConfiguration config(kLittleEndian, 32); - - StringAssembler strings; - SymbolAssembler symbols(&strings); - symbols - .Symbol(0xa7, 0xaf, 0x03af, 0x42f3072c74335181ULL, "foo") - .Symbol(0xb0, 0x9a, 0x2aa7, 0x2e2d349b3d5744a0ULL, "bar"); - - SizedSection symtab_command; - symtab_command - .D32(LC_SYMTAB) // command - .D32(symtab_command.final_size()) // size - .D32(symbols.start()) // file offset of symbols - .D32(2) // symbol count - .D32(strings.start()) // file offset of strings - .D32(strings.final_size() + 1); // strings size (too long) - - LoadCommands load_commands; - load_commands.Place(&symtab_command); - - MachOFile file; - // Put strings at end, so the excessive length will be noticed. - file.Header(&load_commands).Place(&symbols).Place(&strings); - - ReadFile(&file, true, CPU_TYPE_ANY, 0); - - EXPECT_CALL(reporter, MisplacedSymbolTable()).Times(1); - EXPECT_FALSE(reader.WalkLoadCommands(&load_command_handler)); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.cc deleted file mode 100644 index 89f9e775..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.cc +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilties.cc: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#include "common/mac/byteswap.h" -#include "common/mac/macho_utilities.h" - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc, - enum NXByteOrder target_byte_order) -{ - uc->cmd = ByteSwap(uc->cmd); - uc->cmdsize = ByteSwap(uc->cmdsize); -} - -void breakpad_swap_segment_command_64(struct segment_command_64 *sg, - enum NXByteOrder target_byte_order) -{ - sg->cmd = ByteSwap(sg->cmd); - sg->cmdsize = ByteSwap(sg->cmdsize); - - sg->vmaddr = ByteSwap(sg->vmaddr); - sg->vmsize = ByteSwap(sg->vmsize); - sg->fileoff = ByteSwap(sg->fileoff); - sg->filesize = ByteSwap(sg->filesize); - - sg->maxprot = ByteSwap(sg->maxprot); - sg->initprot = ByteSwap(sg->initprot); - sg->nsects = ByteSwap(sg->nsects); - sg->flags = ByteSwap(sg->flags); -} - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh, - enum NXByteOrder target_byte_order) -{ - mh->magic = ByteSwap(mh->magic); - mh->cputype = ByteSwap(mh->cputype); - mh->cpusubtype = ByteSwap(mh->cpusubtype); - mh->filetype = ByteSwap(mh->filetype); - mh->ncmds = ByteSwap(mh->ncmds); - mh->sizeofcmds = ByteSwap(mh->sizeofcmds); - mh->flags = ByteSwap(mh->flags); - mh->reserved = ByteSwap(mh->reserved); -} - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects, - enum NXByteOrder target_byte_order) -{ - for (uint32_t i = 0; i < nsects; i++) { - s[i].addr = ByteSwap(s[i].addr); - s[i].size = ByteSwap(s[i].size); - - s[i].offset = ByteSwap(s[i].offset); - s[i].align = ByteSwap(s[i].align); - s[i].reloff = ByteSwap(s[i].reloff); - s[i].nreloc = ByteSwap(s[i].nreloc); - s[i].flags = ByteSwap(s[i].flags); - s[i].reserved1 = ByteSwap(s[i].reserved1); - s[i].reserved2 = ByteSwap(s[i].reserved2); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.h deleted file mode 100644 index a07945fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_utilities.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilities.h: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#ifndef COMMON_MAC_MACHO_UTILITIES_H__ -#define COMMON_MAC_MACHO_UTILITIES_H__ - -#include -#include - -/* Some #defines and structs that aren't defined in older SDKs */ -#ifndef CPU_ARCH_ABI64 -# define CPU_ARCH_ABI64 0x01000000 -#endif - -#ifndef CPU_TYPE_X86 -# define CPU_TYPE_X86 CPU_TYPE_I386 -#endif - -#ifndef CPU_TYPE_POWERPC64 -# define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) -#endif - -#ifndef LC_UUID -# define LC_UUID 0x1b /* the uuid */ -#endif - -#if TARGET_CPU_X86 -# define BREAKPAD_MACHINE_THREAD_STATE i386_THREAD_STATE -#elif TARGET_CPU_X86_64 -# define BREAKPAD_MACHINE_THREAD_STATE x86_THREAD_STATE64 -#else -# define BREAKPAD_MACHINE_THREAD_STATE MACHINE_THREAD_STATE -#endif - -// The uuid_command struct/swap routines were added during the 10.4 series. -// Their presence isn't guaranteed. -struct breakpad_uuid_command { - uint32_t cmd; /* LC_UUID */ - uint32_t cmdsize; /* sizeof(struct uuid_command) */ - uint8_t uuid[16]; /* the 128-bit uuid */ -}; - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc, - enum NXByteOrder target_byte_order); - -// Older SDKs defines thread_state_data_t as an int[] instead -// of the natural_t[] it should be. -typedef natural_t breakpad_thread_state_data_t[THREAD_STATE_MAX]; - -// The 64-bit swap routines were added during the 10.4 series, their -// presence isn't guaranteed. -void breakpad_swap_segment_command_64(struct segment_command_64 *sg, - enum NXByteOrder target_byte_order); - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh, - enum NXByteOrder target_byte_order); - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects, - enum NXByteOrder target_byte_order); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.cc deleted file mode 100644 index 3e8fe211..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.cc +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.cc: Iterate over the load commands in a mach-o file -// -// See macho_walker.h for documentation -// -// Author: Dan Waylonis - -extern "C" { // necessary for Leopard - #include - #include - #include - #include - #include - #include - #include -} - -#include "common/mac/byteswap.h" -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, - void *context) - : file_(0), - callback_(callback), - callback_context_(context), - current_header_(NULL), - current_header_size_(0), - current_header_offset_(0) { - file_ = open(path, O_RDONLY); -} - -MachoWalker::~MachoWalker() { - if (file_ != -1) - close(file_); -} - -int MachoWalker::ValidateCPUType(int cpu_type) { - // If the user didn't specify, use the local architecture. - if (cpu_type == 0) { - const NXArchInfo *arch = NXGetLocalArchInfo(); - assert(arch); - cpu_type = arch->cputype; - } - - return cpu_type; -} - -bool MachoWalker::WalkHeader(int cpu_type) { - int valid_cpu_type = ValidateCPUType(cpu_type); - off_t offset; - if (FindHeader(valid_cpu_type, offset)) { - if (cpu_type & CPU_ARCH_ABI64) - return WalkHeader64AtOffset(offset); - - return WalkHeaderAtOffset(offset); - } - - return false; -} - -bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) { - return pread(file_, buffer, size, offset) == (ssize_t)size; -} - -bool MachoWalker::CurrentHeader(struct mach_header_64 *header, off_t *offset) { - if (current_header_) { - memcpy(header, current_header_, sizeof(mach_header_64)); - *offset = current_header_offset_; - return true; - } - - return false; -} - -bool MachoWalker::FindHeader(int cpu_type, off_t &offset) { - int valid_cpu_type = ValidateCPUType(cpu_type); - // Read the magic bytes that's common amongst all mach-o files - uint32_t magic; - if (!ReadBytes(&magic, sizeof(magic), 0)) - return false; - - offset = sizeof(magic); - - // Figure out what type of file we've got - bool is_fat = false; - if (magic == FAT_MAGIC || magic == FAT_CIGAM) { - is_fat = true; - } - else if (magic != MH_MAGIC && magic != MH_CIGAM && magic != MH_MAGIC_64 && - magic != MH_CIGAM_64) { - return false; - } - - if (!is_fat) { - // If we don't have a fat header, check if the cpu type matches the single - // header - cpu_type_t header_cpu_type; - if (!ReadBytes(&header_cpu_type, sizeof(header_cpu_type), offset)) - return false; - - if (magic == MH_CIGAM || magic == MH_CIGAM_64) - header_cpu_type = ByteSwap(header_cpu_type); - - if (valid_cpu_type != header_cpu_type) - return false; - - offset = 0; - return true; - } else { - // Read the fat header and find an appropriate architecture - offset = 0; - struct fat_header fat; - if (!ReadBytes(&fat, sizeof(fat), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - swap_fat_header(&fat, NXHostByteOrder()); - - offset += sizeof(fat); - - // Search each architecture for the desired one - struct fat_arch arch; - for (uint32_t i = 0; i < fat.nfat_arch; ++i) { - if (!ReadBytes(&arch, sizeof(arch), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - swap_fat_arch(&arch, 1, NXHostByteOrder()); - - if (arch.cputype == valid_cpu_type) { - offset = arch.offset; - return true; - } - - offset += sizeof(arch); - } - } - - return false; -} - -bool MachoWalker::WalkHeaderAtOffset(off_t offset) { - struct mach_header header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM); - if (swap) - swap_mach_header(&header, NXHostByteOrder()); - - // Copy the data into the mach_header_64 structure. Since the 32-bit and - // 64-bit only differ in the last field (reserved), this is safe to do. - struct mach_header_64 header64; - memcpy((void *)&header64, (const void *)&header, sizeof(header)); - header64.reserved = 0; - - current_header_ = &header64; - current_header_size_ = sizeof(header); // 32-bit, not 64-bit - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeader64AtOffset(off_t offset) { - struct mach_header_64 header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM_64); - if (swap) - breakpad_swap_mach_header_64(&header, NXHostByteOrder()); - - current_header_ = &header; - current_header_size_ = sizeof(header); - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeaderCore(off_t offset, uint32_t number_of_commands, - bool swap) { - for (uint32_t i = 0; i < number_of_commands; ++i) { - struct load_command cmd; - if (!ReadBytes(&cmd, sizeof(cmd), offset)) - return false; - - if (swap) - swap_load_command(&cmd, NXHostByteOrder()); - - // Call the user callback - if (callback_ && !callback_(this, &cmd, offset, swap, callback_context_)) - break; - - offset += cmd.cmdsize; - } - - return true; -} - -} // namespace MacFileUtilities diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.h deleted file mode 100644 index 0d30b5c0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/macho_walker.h +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.h: Iterate over the load commands in a mach-o file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_WALKER_H__ -#define COMMON_MAC_MACHO_WALKER_H__ - -#include -#include - -namespace MacFileUtilities { - -class MachoWalker { - public: - // A callback function executed when a new load command is read. If no - // further processing of load commands is desired, return false. Otherwise, - // return true. - // |cmd| is the current command, and |offset| is the location relative to the - // beginning of the file (not header) where the command was read. If |swap| - // is set, then any command data (other than the returned load_command) should - // be swapped when read - typedef bool (*LoadCommandCallback)(MachoWalker *walker, load_command *cmd, - off_t offset, bool swap, void *context); - - MachoWalker(const char *path, LoadCommandCallback callback, void *context); - MachoWalker(int file_descriptor, LoadCommandCallback callback, void *context); - ~MachoWalker(); - - // Begin walking the header for |cpu_type|. If |cpu_type| is 0, then the - // native cpu type is used. Otherwise, accepted values are listed in - // /usr/include/mach/machine.h (e.g., CPU_TYPE_X86 or CPU_TYPE_POWERPC). - // Returns false if opening the file failed or if the |cpu_type| is not - // present in the file. - bool WalkHeader(int cpu_type); - - // Locate (if any) the header offset for |cpu_type| and return in |offset|. - // Return true if found, false otherwise. - bool FindHeader(int cpu_type, off_t &offset); - - // Read |size| bytes from the opened file at |offset| into |buffer| - bool ReadBytes(void *buffer, size_t size, off_t offset); - - // Return the current header and header offset - bool CurrentHeader(struct mach_header_64 *header, off_t *offset); - - private: - // Validate the |cpu_type| - int ValidateCPUType(int cpu_type); - - // Process an individual header starting at |offset| from the start of the - // file. Return true if successful, false otherwise. - bool WalkHeaderAtOffset(off_t offset); - bool WalkHeader64AtOffset(off_t offset); - - // Bottleneck for walking the load commands - bool WalkHeaderCore(off_t offset, uint32_t number_of_commands, bool swap); - - // File descriptor to the opened file - int file_; - - // User specified callback & context - LoadCommandCallback callback_; - void *callback_context_; - - // Current header, size, and offset. The mach_header_64 is used for both - // 32-bit and 64-bit headers because they only differ in their last field - // (reserved). By adding the |current_header_size_| and the - // |current_header_offset_|, you can determine the offset in the file just - // after the header. - struct mach_header_64 *current_header_; - unsigned long current_header_size_; - off_t current_header_offset_; - - private: - MachoWalker(const MachoWalker &); - MachoWalker &operator=(const MachoWalker &); -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_WALKER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/scoped_task_suspend-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/scoped_task_suspend-inl.h deleted file mode 100644 index d6d1bef9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/scoped_task_suspend-inl.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Inline implementation of ScopedTaskSuspend, which suspends a Mach -// task for the duration of its scope. - -#ifndef GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ -#define GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ - -#include - -namespace google_breakpad { - -class ScopedTaskSuspend { - public: - explicit ScopedTaskSuspend(mach_port_t target) : target_(target) { - task_suspend(target_); - } - - ~ScopedTaskSuspend() { - task_resume(target_); - } - - private: - mach_port_t target_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.cc deleted file mode 100644 index e1f63a98..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "processor/scoped_ptr.h" -#include "common/mac/string_utilities.h" - -namespace MacStringUtils { - -using google_breakpad::scoped_array; - -std::string ConvertToString(CFStringRef str) { - CFIndex length = CFStringGetLength(str); - std::string result; - - if (!length) - return result; - - CFIndex maxUTF8Length = - CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); - scoped_array buffer(new UInt8[maxUTF8Length + 1]); - CFIndex actualUTF8Length; - CFStringGetBytes(str, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, - false, buffer.get(), maxUTF8Length, &actualUTF8Length); - buffer[actualUTF8Length] = 0; - result.assign((const char *)buffer.get()); - - return result; -} - -unsigned int IntegerValueAtIndex(string &str, unsigned int idx) { - string digits("0123456789"), temp; - size_t start = 0; - size_t end; - size_t found = 0; - unsigned int result = 0; - - for (; found <= idx; ++found) { - end = str.find_first_not_of(digits, start); - - if (end == string::npos) - end = str.size(); - - temp = str.substr(start, end - start); - - if (found == idx) { - result = atoi(temp.c_str()); - } - - start = str.find_first_of(digits, end + 1); - - if (start == string::npos) - break; - } - - return result; -} - -} // namespace MacStringUtils diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.h deleted file mode 100644 index 6d89c834..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/string_utilities.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utilities.h: Utilities for strings for Mac platform - -#ifndef COMMON_MAC_STRING_UTILITIES_H__ -#define COMMON_MAC_STRING_UTILITIES_H__ - -#include - -#include - -namespace MacStringUtils { - -using std::string; - -// Convert a CoreFoundation string into a std::string -string ConvertToString(CFStringRef str); - -// Return the idx'th decimal integer in str, separated by non-decimal-digits -// E.g., str = 10.4.8, idx = 1 -> 4 -unsigned int IntegerValueAtIndex(string &str, unsigned int idx); - -} // namespace MacStringUtils - -#endif // COMMON_MAC_STRING_UTILITIES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.h deleted file mode 100644 index d425f597..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.h +++ /dev/null @@ -1,1004 +0,0 @@ -// -// GTMSenTestCase.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Portions of this file fall under the following license, marked with -// SENTE_BEGIN - SENTE_END -// -// Copyright (c) 1997-2005, Sen:te (Sente SA). All rights reserved. -// -// Use of this source code is governed by the following license: -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// (1) Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// (2) Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -// IN NO EVENT SHALL Sente SA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Note: this license is equivalent to the FreeBSD license. -// -// This notice may not be removed from this file. - -// Some extra test case macros that would have been convenient for SenTestingKit -// to provide. I didn't stick GTM in front of the Macro names, so that they would -// be easy to remember. - -#import "GTMDefines.h" - -#if (!GTM_IPHONE_SDK) -#import -#else -#import -NSString *STComposeString(NSString *, ...); -#endif - -// Generates a failure when a1 != noErr -// Args: -// a1: should be either an OSErr or an OSStatus -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNoErr(a1, description, ...) \ -do { \ - @try {\ - OSStatus a1value = (a1); \ - if (a1value != noErr) { \ - NSString *_expression = [NSString stringWithFormat:@"Expected noErr, got %ld for (%s)", a1value, #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == noErr fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 != a2 -// Args: -// a1: received value. Should be either an OSErr or an OSStatus -// a2: expected value. Should be either an OSErr or an OSStatus -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertErr(a1, a2, description, ...) \ -do { \ - @try {\ - OSStatus a1value = (a1); \ - OSStatus a2value = (a2); \ - if (a1value != a2value) { \ - NSString *_expression = [NSString stringWithFormat:@"Expected %s(%ld) but got %ld for (%s)", #a2, a2value, a1value, #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == (%s) fails", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -// Generates a failure when a1 is NULL -// Args: -// a1: should be a pointer (use STAssertNotNil for an object) -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotNULL(a1, description, ...) \ -do { \ - @try {\ - const void* a1value = (a1); \ - if (a1value == NULL) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) != NULL", #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != NULL fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not NULL -// Args: -// a1: should be a pointer (use STAssertNil for an object) -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNULL(a1, description, ...) \ -do { \ - @try {\ - const void* a1value = (a1); \ - if (a1value != NULL) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) == NULL", #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == NULL fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is equal to a2. This test is for C scalars, -// structs and unions. -// Args: -// a1: argument 1 -// a2: argument 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEquals(a1, a2, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[[[NSString stringWithFormat:@"Type mismatch (%@/%@) -- ",@encode(__typeof__(a1)),@encode(__typeof__(a2))] stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType:@encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType:@encode(__typeof__(a2))]; \ - if ([a1encoded isEqualToValue:a2encoded]) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is equal to a2. This test is for objects. -// Args: -// a1: argument 1. object. -// a2: argument 2. object. -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualObjects(a1, a2, desc, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if ( (@encode(__typeof__(a1value)) == @encode(id)) && \ - (@encode(__typeof__(a2value)) == @encode(id)) && \ - ![(id)a1value isEqual:(id)a2value] ) continue; \ - NSString *_expression = [NSString stringWithFormat:@"%s('%@') != %s('%@')", #a1, [a1 description], #a2, [a2 description]]; \ - if (desc) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(desc, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(desc, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not 'op' to a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertOperation(a1, a2, op, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[[[NSString stringWithFormat:@"Type mismatch (%@/%@) -- ",@encode(__typeof__(a1)),@encode(__typeof__(a2))] stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - if (!(a1value op a2value)) { \ - double a1DoubleValue = a1value; \ - double a2DoubleValue = a2value; \ - NSString *_expression = [NSString stringWithFormat:@"%s (%lg) %s %s (%lg)", #a1, a1DoubleValue, #op, #a2, a2DoubleValue]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException \ - failureInRaise:[NSString stringWithFormat:@"(%s) %s (%s)", #a1, #op, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not > a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertGreaterThan(a1, a2, description, ...) \ - STAssertOperation(a1, a2, >, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not >= a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertGreaterThanOrEqual(a1, a2, description, ...) \ - STAssertOperation(a1, a2, >=, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not < a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertLessThan(a1, a2, description, ...) \ - STAssertOperation(a1, a2, <, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not <= a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertLessThanOrEqual(a1, a2, description, ...) \ - STAssertOperation(a1, a2, <=, description, ##__VA_ARGS__) - -// Generates a failure when string a1 is not equal to string a2. This call -// differs from STAssertEqualObjects in that strings that are different in -// composition (precomposed vs decomposed) will compare equal if their final -// representation is equal. -// ex O + umlaut decomposed is the same as O + umlaut composed. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertEqualStrings(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if (a1value == a2value) continue; \ - if ([a1value isKindOfClass:[NSString class]] && \ - [a2value isKindOfClass:[NSString class]] && \ - [a1value compare:a2value options:0] == NSOrderedSame) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when string a1 is equal to string a2. This call -// differs from STAssertEqualObjects in that strings that are different in -// composition (precomposed vs decomposed) will compare equal if their final -// representation is equal. -// ex O + umlaut decomposed is the same as O + umlaut composed. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualStrings(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if ([a1value isKindOfClass:[NSString class]] && \ - [a2value isKindOfClass:[NSString class]] && \ - [a1value compare:a2value options:0] != NSOrderedSame) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when c-string a1 is not equal to c-string a2. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertEqualCStrings(a1, a2, description, ...) \ -do { \ - @try {\ - const char* a1value = (a1); \ - const char* a2value = (a2); \ - if (a1value == a2value) continue; \ - if (strcmp(a1value, a2value) == 0) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: [NSString stringWithUTF8String:a1value] \ - andObject: [NSString stringWithUTF8String:a2value] \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when c-string a1 is equal to c-string a2. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualCStrings(a1, a2, description, ...) \ -do { \ - @try {\ - const char* a1value = (a1); \ - const char* a2value = (a2); \ - if (strcmp(a1value, a2value) != 0) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: [NSString stringWithUTF8String:a1value] \ - andObject: [NSString stringWithUTF8String:a2value] \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -#if GTM_IPHONE_SDK - -// SENTE_BEGIN -/*" Generates a failure when !{ [a1 isEqualTo:a2] } is false - (or one is nil and the other is not). - _{a1 The object on the left.} - _{a2 The object on the right.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertEqualObjects(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if (a1value == a2value) continue; \ - if ( (@encode(__typeof__(a1value)) == @encode(id)) && \ - (@encode(__typeof__(a2value)) == @encode(id)) && \ - [(id)a1value isEqual: (id)a2value] ) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when a1 is not equal to a2. This test is for - C scalars, structs and unions. - _{a1 The argument on the left.} - _{a2 The argument on the right.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertEquals(a1, a2, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[[NSString stringWithFormat:@"Type mismatch (%@/%@) -- ",@encode(__typeof__(a1)),@encode(__typeof__(a2))] stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType: @encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType: @encode(__typeof__(a2))]; \ - if (![a1encoded isEqualToValue:a2encoded]) { \ - [self failWithException:[NSException failureInEqualityBetweenValue: a1encoded \ - andValue: a2encoded \ - withAccuracy: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -#define STAbsoluteDifference(left,right) (MAX(left,right)-MIN(left,right)) - - -/*" Generates a failure when a1 is not equal to a2 within + or - accuracy is false. - This test is for scalars such as floats and doubles where small differences - could make these items not exactly equal, but also works for all scalars. - _{a1 The scalar on the left.} - _{a2 The scalar on the right.} - _{accuracy The maximum difference between a1 and a2 for these values to be - considered equal.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ - -#define STAssertEqualsWithAccuracy(a1, a2, accuracy, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[[[NSString stringWithFormat:@"Type mismatch (%@/%@) -- ",@encode(__typeof__(a1)),@encode(__typeof__(a2))] stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - __typeof__(accuracy) accuracyvalue = (accuracy); \ - if (STAbsoluteDifference(a1value, a2value) > accuracyvalue) { \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType:@encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType:@encode(__typeof__(a2))]; \ - NSValue *accuracyencoded = [NSValue value:&accuracyvalue withObjCType:@encode(__typeof__(accuracy))]; \ - [self failWithException:[NSException failureInEqualityBetweenValue: a1encoded \ - andValue: a2encoded \ - withAccuracy: accuracyencoded \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - - -/*" Generates a failure unconditionally. - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STFail(description, ...) \ -[self failWithException:[NSException failureInFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]] - - - -/*" Generates a failure when a1 is not nil. - _{a1 An object.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNil(a1, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - if (a1value != nil) { \ - NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ - NSString *_expression = [NSString stringWithFormat:@"((%@) == nil)", _a1]; \ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == nil fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when a1 is nil. - _{a1 An object.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNotNil(a1, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - if (a1value == nil) { \ - NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ - NSString *_expression = [NSString stringWithFormat:@"((%@) != nil)", _a1]; \ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != nil fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when expression evaluates to false. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertTrue(expr, description, ...) \ -do { \ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ -} while (0) - - -/*" Generates a failure when expression evaluates to false and in addition will - generate error messages if an exception is encountered. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertTrueNoThrow(expr, description, ...) \ -do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) ", #expr] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when the expression evaluates to true. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertFalse(expr, description, ...) \ -do { \ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: YES \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ -} while (0) - - -/*" Generates a failure when the expression evaluates to true and in addition - will generate error messages if an exception is encountered. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertFalseNoThrow(expr, description, ...) \ -do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: YES \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"!(%s) ", #expr] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when expression does not throw an exception. - _{expression The expression that is evaluated.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent. -"*/ -#define STAssertThrows(expr, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (id anException) { \ - continue; \ - }\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does not throw an exception of a - specific class. - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertThrowsSpecific(expr, specificException, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does not throw an exception of a - specific class with a specific name. Useful for those frameworks like - AppKit or Foundation that throw generic NSException w/specific names - (NSInvalidArgumentException, etc). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{aName The name of the specified exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} - -"*/ -#define STAssertThrowsSpecificNamed(expr, specificException, aName, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - if ([aName isEqualToString: [anException name]]) continue; \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does throw an exception. - _{expression The expression that is evaluated.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNoThrow(expr, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (id anException) { \ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when expression does throw an exception of the specitied - class. Any other exception is okay (i.e. does not generate a failure). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNoThrowSpecific(expr, specificException, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anythingElse) {\ - ; \ - }\ -} while (0) - - -/*" Generates a failure when expression does throw an exception of a - specific class with a specific name. Useful for those frameworks like - AppKit or Foundation that throw generic NSException w/specific names - (NSInvalidArgumentException, etc). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{aName The name of the specified exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} - -"*/ -#define STAssertNoThrowSpecificNamed(expr, specificException, aName, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - if ([aName isEqualToString: [anException name]]) { \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - } \ - continue; \ - }\ - @catch (id anythingElse) {\ - ; \ - }\ -} while (0) - - - -@interface NSException (GTMSenTestAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInCondition:(NSString *)condition - isTrue:(BOOL)isTrue - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInEqualityBetweenObject:(id)left - andObject:(id)right - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInEqualityBetweenValue:(NSValue *)left - andValue:(NSValue *)right - withAccuracy:(NSValue *)accuracy - inFile:(NSString *)filename - atLine:(int) ineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInRaise:(NSString *)expression - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInRaise:(NSString *)expression - exception:(NSException *)exception - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -@end - -// SENTE_END - -@interface SenTestCase : NSObject { - SEL currentSelector_; -} - -- (void)setUp; -- (void)invokeTest; -- (void)tearDown; -- (void)performTest:(SEL)sel; -- (void)failWithException:(NSException*)exception; -@end - -GTM_EXTERN NSString *const SenTestFailureException; - -GTM_EXTERN NSString *const SenTestFilenameKey; -GTM_EXTERN NSString *const SenTestLineNumberKey; - -#endif // GTM_IPHONE_SDK - -// All unittest cases in GTM should inherit from GTMTestCase. It makes sure -// to set up our logging system correctly to verify logging calls. -// See GTMUnitTestDevLog.h for details -@interface GTMTestCase : SenTestCase -@end diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.m b/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.m deleted file mode 100644 index 99b9db07..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/mac/testing/GTMSenTestCase.m +++ /dev/null @@ -1,366 +0,0 @@ -// -// GTMSenTestCase.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import - -#if !GTM_IPHONE_SDK -#import "GTMGarbageCollection.h" -#endif // !GTM_IPHONE_SDK - -#if GTM_IPHONE_SDK -#import - -@interface NSException (GTMSenTestPrivateAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - reason:(NSString *)reason; -@end - -@implementation NSException (GTMSenTestPrivateAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - reason:(NSString *)reason { - NSDictionary *userInfo = - [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInteger:lineNumber], SenTestLineNumberKey, - filename, SenTestFilenameKey, - nil]; - - return [self exceptionWithName:SenTestFailureException - reason:reason - userInfo:userInfo]; -} -@end - -@implementation NSException (GTMSenTestAdditions) - -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = testDescription; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInCondition:(NSString *)condition - isTrue:(BOOL)isTrue - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = [NSString stringWithFormat:@"'%@' should be %s. %@", - condition, isTrue ? "TRUE" : "FALSE", testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInEqualityBetweenObject:(id)left - andObject:(id)right - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@'. %@", - [left description], [right description], testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInEqualityBetweenValue:(NSValue *)left - andValue:(NSValue *)right - withAccuracy:(NSValue *)accuracy - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason; - if (accuracy) { - reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@'. %@", - left, right, testDescription]; - } else { - reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@' +/-'%@'. %@", - left, right, accuracy, testDescription]; - } - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInRaise:(NSString *)expression - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = [NSString stringWithFormat:@"'%@' should raise. %@", - expression, testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInRaise:(NSString *)expression - exception:(NSException *)exception - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason; - if ([[exception name] isEqualToString:SenTestFailureException]) { - // it's our exception, assume it has the right description on it. - reason = [exception reason]; - } else { - // not one of our exception, use the exceptions reason and our description - reason = [NSString stringWithFormat:@"'%@' raised '%@'. %@", - expression, [exception reason], testDescription]; - } - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -@end - -NSString *STComposeString(NSString *formatString, ...) { - NSString *reason = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - reason = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - return reason; -} - -NSString *const SenTestFailureException = @"SenTestFailureException"; -NSString *const SenTestFilenameKey = @"SenTestFilenameKey"; -NSString *const SenTestLineNumberKey = @"SenTestLineNumberKey"; - -@interface SenTestCase (SenTestCasePrivate) -// our method of logging errors -+ (void)printException:(NSException *)exception fromTestName:(NSString *)name; -@end - -@implementation SenTestCase -- (void)failWithException:(NSException*)exception { - [exception raise]; -} - -- (void)setUp { -} - -- (void)performTest:(SEL)sel { - currentSelector_ = sel; - @try { - [self invokeTest]; - } @catch (NSException *exception) { - [[self class] printException:exception - fromTestName:NSStringFromSelector(sel)]; - [exception raise]; - } -} - -+ (void)printException:(NSException *)exception fromTestName:(NSString *)name { - NSDictionary *userInfo = [exception userInfo]; - NSString *filename = [userInfo objectForKey:SenTestFilenameKey]; - NSNumber *lineNumber = [userInfo objectForKey:SenTestLineNumberKey]; - NSString *className = NSStringFromClass([self class]); - if ([filename length] == 0) { - filename = @"Unknown.m"; - } - fprintf(stderr, "%s:%ld: error: -[%s %s] : %s\n", - [filename UTF8String], - (long)[lineNumber integerValue], - [className UTF8String], - [name UTF8String], - [[exception reason] UTF8String]); - fflush(stderr); -} - -- (void)invokeTest { - NSException *e = nil; - @try { - // Wrap things in autorelease pools because they may - // have an STMacro in their dealloc which may get called - // when the pool is cleaned up - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - // We don't log exceptions here, instead we let the person that called - // this log the exception. This ensures they are only logged once but the - // outer layers get the exceptions to report counts, etc. - @try { - [self setUp]; - @try { - [self performSelector:currentSelector_]; - } @catch (NSException *exception) { - e = [exception retain]; - } - [self tearDown]; - } @catch (NSException *exception) { - e = [exception retain]; - } - [pool release]; - } @catch (NSException *exception) { - e = [exception retain]; - } - if (e) { - [e autorelease]; - [e raise]; - } -} - -- (void)tearDown { -} - -- (NSString *)description { - // This matches the description OCUnit would return to you - return [NSString stringWithFormat:@"-[%@ %@]", [self class], - NSStringFromSelector(currentSelector_)]; -} -@end - -#endif // GTM_IPHONE_SDK - -@implementation GTMTestCase : SenTestCase -- (void)invokeTest { - Class devLogClass = NSClassFromString(@"GTMUnitTestDevLog"); - if (devLogClass) { - [devLogClass performSelector:@selector(enableTracking)]; - [devLogClass performSelector:@selector(verifyNoMoreLogsExpected)]; - - } - [super invokeTest]; - if (devLogClass) { - [devLogClass performSelector:@selector(verifyNoMoreLogsExpected)]; - [devLogClass performSelector:@selector(disableTracking)]; - } -} -@end - -// Leak detection -#if !GTM_IPHONE_DEVICE -// Don't want to get leaks on the iPhone Device as the device doesn't -// have 'leaks'. The simulator does though. - -// COV_NF_START -// We don't have leak checking on by default, so this won't be hit. -static void _GTMRunLeaks(void) { - // This is an atexit handler. It runs leaks for us to check if we are - // leaking anything in our tests. - const char* cExclusionsEnv = getenv("GTM_LEAKS_SYMBOLS_TO_IGNORE"); - NSMutableString *exclusions = [NSMutableString string]; - if (cExclusionsEnv) { - NSString *exclusionsEnv = [NSString stringWithUTF8String:cExclusionsEnv]; - NSArray *exclusionsArray = [exclusionsEnv componentsSeparatedByString:@","]; - NSString *exclusion; - NSCharacterSet *wcSet = [NSCharacterSet whitespaceCharacterSet]; - GTM_FOREACH_OBJECT(exclusion, exclusionsArray) { - exclusion = [exclusion stringByTrimmingCharactersInSet:wcSet]; - [exclusions appendFormat:@"-exclude \"%@\" ", exclusion]; - } - } - NSString *string - = [NSString stringWithFormat:@"/usr/bin/leaks %@%d" - @"| /usr/bin/sed -e 's/Leak: /Leaks:0: warning: Leak /'", - exclusions, getpid()]; - int ret = system([string UTF8String]); - if (ret) { - fprintf(stderr, "%s:%d: Error: Unable to run leaks. 'system' returned: %d", - __FILE__, __LINE__, ret); - fflush(stderr); - } -} -// COV_NF_END - -static __attribute__((constructor)) void _GTMInstallLeaks(void) { - BOOL checkLeaks = YES; -#if !GTM_IPHONE_SDK - checkLeaks = GTMIsGarbageCollectionEnabled() ? NO : YES; -#endif // !GTM_IPHONE_SDK - if (checkLeaks) { - checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO; - if (checkLeaks) { - // COV_NF_START - // We don't have leak checking on by default, so this won't be hit. - fprintf(stderr, "Leak Checking Enabled\n"); - fflush(stderr); - int ret = atexit(&_GTMRunLeaks); - _GTMDevAssert(ret == 0, - @"Unable to install _GTMRunLeaks as an atexit handler (%d)", - errno); - // COV_NF_END - } - } -} - -#endif // !GTM_IPHONE_DEVICE diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.c b/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.c deleted file mode 100644 index 7fc198af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ - -#include - -#include "common/md5.h" - -#ifndef WORDS_BIGENDIAN -#define byteReverse(buf, len) /* Nothing */ -#else -/* - * Note: this code is harmless on little-endian machines. - */ -static void byteReverse(unsigned char *buf, unsigned longs) -{ - u32 t; - do { - t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | - ((unsigned) buf[1] << 8 | buf[0]); - *(u32 *) buf = t; - buf += 4; - } while (--longs); -} -#endif - -static void MD5Transform(u32 buf[4], u32 const in[16]); - -/* - * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - * initialization constants. - */ -void MD5Init(struct MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - * Update context to reflect the concatenation of another buffer full - * of bytes. - */ -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) -{ - u32 t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((u32) len << 3)) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; - - t = 64 - t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += t; - len -= t; - } - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void MD5Final(unsigned char digest[16], struct MD5Context *ctx) -{ - unsigned count; - unsigned char *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } - byteReverse(ctx->in, 14); - - /* Append length in bits and transform */ - ((u32 *) ctx->in)[14] = ctx->bits[0]; - ((u32 *) ctx->in)[15] = ctx->bits[1]; - - MD5Transform(ctx->buf, (u32 *) ctx->in); - byteReverse((unsigned char *) ctx->buf, 4); - memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -} - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -static void MD5Transform(u32 buf[4], u32 const in[16]) -{ - register u32 a, b, c, d; - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.h deleted file mode 100644 index dbf4893c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/md5.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2007 Google Inc. All Rights Reserved. -// Author: liuli@google.com (Liu Li) -#ifndef COMMON_MD5_H__ -#define COMMON_MD5_H__ - -#include - -typedef uint32_t u32; -typedef uint8_t u8; - -struct MD5Context { - u32 buf[4]; - u32 bits[2]; - u8 in[64]; -}; - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -void MD5Init(struct MD5Context *ctx); - -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len); - -void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - -#ifdef __cplusplus -} -#endif - -#endif // COMMON_MD5_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory.h deleted file mode 100644 index a02ac578..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory.h +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_COMMON_MEMORY_H_ -#define GOOGLE_BREAKPAD_COMMON_MEMORY_H_ - -#include -#include -#include -#include - -#ifdef __APPLE__ -#define sys_mmap mmap -#define sys_mmap2 mmap -#define sys_munmap munmap -#define MAP_ANONYMOUS MAP_ANON -#else -#include "third_party/lss/linux_syscall_support.h" -#endif - -namespace google_breakpad { - -// This is very simple allocator which fetches pages from the kernel directly. -// Thus, it can be used even when the heap may be corrupted. -// -// There is no free operation. The pages are only freed when the object is -// destroyed. -class PageAllocator { - public: - PageAllocator() - : page_size_(getpagesize()), - last_(NULL), - current_page_(NULL), - page_offset_(0) { - } - - ~PageAllocator() { - FreeAll(); - } - - void *Alloc(unsigned bytes) { - if (!bytes) - return NULL; - - if (current_page_ && page_size_ - page_offset_ >= bytes) { - uint8_t *const ret = current_page_ + page_offset_; - page_offset_ += bytes; - if (page_offset_ == page_size_) { - page_offset_ = 0; - current_page_ = NULL; - } - - return ret; - } - - const unsigned pages = - (bytes + sizeof(PageHeader) + page_size_ - 1) / page_size_; - uint8_t *const ret = GetNPages(pages); - if (!ret) - return NULL; - - page_offset_ = (page_size_ - (page_size_ * pages - (bytes + sizeof(PageHeader)))) % page_size_; - current_page_ = page_offset_ ? ret + page_size_ * (pages - 1) : NULL; - - return ret + sizeof(PageHeader); - } - - private: - uint8_t *GetNPages(unsigned num_pages) { -#ifdef __x86_64 - void *a = sys_mmap(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -#else - void *a = sys_mmap2(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -#endif - if (a == MAP_FAILED) - return NULL; - - struct PageHeader *header = reinterpret_cast(a); - header->next = last_; - header->num_pages = num_pages; - last_ = header; - - return reinterpret_cast(a); - } - - void FreeAll() { - PageHeader *next; - - for (PageHeader *cur = last_; cur; cur = next) { - next = cur->next; - sys_munmap(cur, cur->num_pages * page_size_); - } - } - - struct PageHeader { - PageHeader *next; // pointer to the start of the next set of pages. - unsigned num_pages; // the number of pages in this set. - }; - - const unsigned page_size_; - PageHeader *last_; - uint8_t *current_page_; - unsigned page_offset_; -}; - -// A wasteful vector is like a normal std::vector, except that it's very much -// simplier and it allocates memory from a PageAllocator. It's wasteful -// because, when resizing, it always allocates a whole new array since the -// PageAllocator doesn't support realloc. -template -class wasteful_vector { - public: - wasteful_vector(PageAllocator *allocator, unsigned size_hint = 16) - : allocator_(allocator), - a_((T*) allocator->Alloc(sizeof(T) * size_hint)), - allocated_(size_hint), - used_(0) { - } - - void push_back(const T& new_element) { - if (used_ == allocated_) - Realloc(allocated_ * 2); - a_[used_++] = new_element; - } - - size_t size() const { - return used_; - } - - void resize(unsigned sz, T c = T()) { - // No need to test "sz >= 0", as "sz" is unsigned. - if (sz <= used_) { - used_ = sz; - } else { - unsigned a = allocated_; - if (sz > a) { - while (sz > a) { - a *= 2; - } - Realloc(a); - } - while (sz > used_) { - a_[used_++] = c; - } - } - } - - T& operator[](size_t index) { - return a_[index]; - } - - const T& operator[](size_t index) const { - return a_[index]; - } - - private: - void Realloc(unsigned new_size) { - T *new_array = - reinterpret_cast(allocator_->Alloc(sizeof(T) * new_size)); - memcpy(new_array, a_, used_ * sizeof(T)); - a_ = new_array; - allocated_ = new_size; - } - - PageAllocator *const allocator_; - T *a_; // pointer to an array of |allocated_| elements. - unsigned allocated_; // size of |a_|, in elements. - unsigned used_; // number of used slots in |a_|. -}; - -} // namespace google_breakpad - -inline void* operator new(size_t nbytes, - google_breakpad::PageAllocator& allocator) { - return allocator.Alloc(nbytes); -} - -#endif // GOOGLE_BREAKPAD_COMMON_MEMORY_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory_unittest.cc deleted file mode 100644 index 8b2ec410..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/memory_unittest.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/memory.h" -#include "testing/gtest/include/gtest/gtest.h" - -using namespace google_breakpad; - -namespace { -typedef testing::Test PageAllocatorTest; -} - -TEST(PageAllocatorTest, Setup) { - PageAllocator allocator; -} - -TEST(PageAllocatorTest, SmallObjects) { - PageAllocator allocator; - - for (unsigned i = 1; i < 1024; ++i) { - uint8_t *p = reinterpret_cast(allocator.Alloc(i)); - ASSERT_FALSE(p == NULL); - memset(p, 0, i); - } -} - -TEST(PageAllocatorTest, LargeObject) { - PageAllocator allocator; - - uint8_t *p = reinterpret_cast(allocator.Alloc(10000)); - ASSERT_FALSE(p == NULL); - for (unsigned i = 1; i < 10; ++i) { - uint8_t *p = reinterpret_cast(allocator.Alloc(i)); - ASSERT_FALSE(p == NULL); - memset(p, 0, i); - } -} - -namespace { -typedef testing::Test WastefulVectorTest; -} - -TEST(WastefulVectorTest, Setup) { - PageAllocator allocator_; - wasteful_vector v(&allocator_); - ASSERT_EQ(v.size(), 0u); -} - -TEST(WastefulVectorTest, Simple) { - PageAllocator allocator_; - wasteful_vector v(&allocator_); - - for (unsigned i = 0; i < 256; ++i) - v.push_back(i); - ASSERT_EQ(v.size(), 256u); - for (unsigned i = 0; i < 256; ++i) - ASSERT_EQ(v[i], i); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.cc deleted file mode 100644 index ffaeb87a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.cc +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// module.cc: Implement google_breakpad::Module. See module.h. - -#include "common/module.h" - -#include -#include -#include - -namespace google_breakpad { - -Module::Module(const string &name, const string &os, - const string &architecture, const string &id) : - name_(name), - os_(os), - architecture_(architecture), - id_(id), - load_address_(0) { } - -Module::~Module() { - for (FileByNameMap::iterator it = files_.begin(); it != files_.end(); it++) - delete it->second; - for (FunctionSet::iterator it = functions_.begin(); - it != functions_.end(); it++) - delete *it; - for (vector::iterator it = stack_frame_entries_.begin(); - it != stack_frame_entries_.end(); it++) - delete *it; - for (ExternSet::iterator it = externs_.begin(); - it != externs_.end(); it++) - delete *it; -} - -void Module::SetLoadAddress(Address address) { - load_address_ = address; -} - -void Module::AddFunction(Function *function) { - // FUNC lines must not hold an empty name, so catch the problem early if - // callers try to add one. - assert(!function->name.empty()); - std::pair ret = functions_.insert(function); - if (!ret.second) { - // Free the duplicate that was not inserted because this Module - // now owns it. - delete function; - } -} - -void Module::AddFunctions(vector::iterator begin, - vector::iterator end) { - for (vector::iterator it = begin; it != end; it++) - AddFunction(*it); -} - -void Module::AddStackFrameEntry(StackFrameEntry *stack_frame_entry) { - stack_frame_entries_.push_back(stack_frame_entry); -} - -void Module::AddExtern(Extern *ext) { - std::pair ret = externs_.insert(ext); - if (!ret.second) { - // Free the duplicate that was not inserted because this Module - // now owns it. - delete ext; - } -} - -void Module::GetFunctions(vector *vec, - vector::iterator i) { - vec->insert(i, functions_.begin(), functions_.end()); -} - -void Module::GetExterns(vector *vec, - vector::iterator i) { - vec->insert(i, externs_.begin(), externs_.end()); -} - -Module::File *Module::FindFile(const string &name) { - // A tricky bit here. The key of each map entry needs to be a - // pointer to the entry's File's name string. This means that we - // can't do the initial lookup with any operation that would create - // an empty entry for us if the name isn't found (like, say, - // operator[] or insert do), because such a created entry's key will - // be a pointer the string passed as our argument. Since the key of - // a map's value type is const, we can't fix it up once we've - // created our file. lower_bound does the lookup without doing an - // insertion, and returns a good hint iterator to pass to insert. - // Our "destiny" is where we belong, whether we're there or not now. - FileByNameMap::iterator destiny = files_.lower_bound(&name); - if (destiny == files_.end() - || *destiny->first != name) { // Repeated string comparison, boo hoo. - File *file = new File; - file->name = name; - file->source_id = -1; - destiny = files_.insert(destiny, - FileByNameMap::value_type(&file->name, file)); - } - return destiny->second; -} - -Module::File *Module::FindFile(const char *name) { - string name_string = name; - return FindFile(name_string); -} - -Module::File *Module::FindExistingFile(const string &name) { - FileByNameMap::iterator it = files_.find(&name); - return (it == files_.end()) ? NULL : it->second; -} - -void Module::GetFiles(vector *vec) { - vec->clear(); - for (FileByNameMap::iterator it = files_.begin(); it != files_.end(); it++) - vec->push_back(it->second); -} - -void Module::GetStackFrameEntries(vector *vec) { - *vec = stack_frame_entries_; -} - -void Module::AssignSourceIds() { - // First, give every source file an id of -1. - for (FileByNameMap::iterator file_it = files_.begin(); - file_it != files_.end(); file_it++) - file_it->second->source_id = -1; - - // Next, mark all files actually cited by our functions' line number - // info, by setting each one's source id to zero. - for (FunctionSet::const_iterator func_it = functions_.begin(); - func_it != functions_.end(); func_it++) { - Function *func = *func_it; - for (vector::iterator line_it = func->lines.begin(); - line_it != func->lines.end(); line_it++) - line_it->file->source_id = 0; - } - - // Finally, assign source ids to those files that have been marked. - // We could have just assigned source id numbers while traversing - // the line numbers, but doing it this way numbers the files in - // lexicographical order by name, which is neat. - int next_source_id = 0; - for (FileByNameMap::iterator file_it = files_.begin(); - file_it != files_.end(); file_it++) - if (!file_it->second->source_id) - file_it->second->source_id = next_source_id++; -} - -bool Module::ReportError() { - fprintf(stderr, "error writing symbol file: %s\n", - strerror(errno)); - return false; -} - -bool Module::WriteRuleMap(const RuleMap &rule_map, FILE *stream) { - for (RuleMap::const_iterator it = rule_map.begin(); - it != rule_map.end(); it++) { - if (it != rule_map.begin() && - 0 > putc(' ', stream)) - return false; - if (0 > fprintf(stream, "%s: %s", it->first.c_str(), it->second.c_str())) - return false; - } - return true; -} - -bool Module::Write(FILE *stream) { - if (0 > fprintf(stream, "MODULE %s %s %s %s\n", - os_.c_str(), architecture_.c_str(), id_.c_str(), - name_.c_str())) - return ReportError(); - - AssignSourceIds(); - - // Write out files. - for (FileByNameMap::iterator file_it = files_.begin(); - file_it != files_.end(); file_it++) { - File *file = file_it->second; - if (file->source_id >= 0) { - if (0 > fprintf(stream, "FILE %d %s\n", - file->source_id, file->name.c_str())) - return ReportError(); - } - } - - // Write out functions and their lines. - for (FunctionSet::const_iterator func_it = functions_.begin(); - func_it != functions_.end(); func_it++) { - Function *func = *func_it; - if (0 > fprintf(stream, "FUNC %llx %llx %llx %s\n", - (unsigned long long) (func->address - load_address_), - (unsigned long long) func->size, - (unsigned long long) func->parameter_size, - func->name.c_str())) - return ReportError(); - for (vector::iterator line_it = func->lines.begin(); - line_it != func->lines.end(); line_it++) - if (0 > fprintf(stream, "%llx %llx %d %d\n", - (unsigned long long) (line_it->address - load_address_), - (unsigned long long) line_it->size, - line_it->number, - line_it->file->source_id)) - return ReportError(); - } - - // Write out 'PUBLIC' records. - for (ExternSet::const_iterator extern_it = externs_.begin(); - extern_it != externs_.end(); extern_it++) { - Extern *ext = *extern_it; - if (0 > fprintf(stream, "PUBLIC %llx 0 %s\n", - (unsigned long long) (ext->address - load_address_), - ext->name.c_str())) - return ReportError(); - } - - // Write out 'STACK CFI INIT' and 'STACK CFI' records. - vector::const_iterator frame_it; - for (frame_it = stack_frame_entries_.begin(); - frame_it != stack_frame_entries_.end(); frame_it++) { - StackFrameEntry *entry = *frame_it; - if (0 > fprintf(stream, "STACK CFI INIT %llx %llx ", - (unsigned long long) entry->address - load_address_, - (unsigned long long) entry->size) - || !WriteRuleMap(entry->initial_rules, stream) - || 0 > putc('\n', stream)) - return ReportError(); - - // Write out this entry's delta rules as 'STACK CFI' records. - for (RuleChangeMap::const_iterator delta_it = entry->rule_changes.begin(); - delta_it != entry->rule_changes.end(); delta_it++) { - if (0 > fprintf(stream, "STACK CFI %llx ", - (unsigned long long) delta_it->first - load_address_) - || !WriteRuleMap(delta_it->second, stream) - || 0 > putc('\n', stream)) - return ReportError(); - } - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.h deleted file mode 100644 index 8e6a05e2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module.h +++ /dev/null @@ -1,321 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// module.h: Define google_breakpad::Module. A Module holds debugging -// information, and can write that information out as a Breakpad -// symbol file. - -#ifndef COMMON_LINUX_MODULE_H__ -#define COMMON_LINUX_MODULE_H__ - -#include - -#include -#include -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::set; -using std::string; -using std::vector; -using std::map; - -// A Module represents the contents of a module, and supports methods -// for adding information produced by parsing STABS or DWARF data -// --- possibly both from the same file --- and then writing out the -// unified contents as a Breakpad-format symbol file. -class Module { - public: - // The type of addresses and sizes in a symbol table. - typedef u_int64_t Address; - struct File; - struct Function; - struct Line; - struct Extern; - - // Addresses appearing in File, Function, and Line structures are - // absolute, not relative to the the module's load address. That - // is, if the module were loaded at its nominal load address, the - // addresses would be correct. - - // A source file. - struct File { - // The name of the source file. - string name; - - // The file's source id. The Write member function clears this - // field and assigns source ids a fresh, so any value placed here - // before calling Write will be lost. - int source_id; - }; - - // A function. - struct Function { - // For sorting by address. (Not style-guide compliant, but it's - // stupid not to put this in the struct.) - static bool CompareByAddress(const Function *x, const Function *y) { - return x->address < y->address; - } - - // The function's name. - string name; - - // The start address and length of the function's code. - Address address, size; - - // The function's parameter size. - Address parameter_size; - - // Source lines belonging to this function, sorted by increasing - // address. - vector lines; - }; - - // A source line. - struct Line { - // For sorting by address. (Not style-guide compliant, but it's - // stupid not to put this in the struct.) - static bool CompareByAddress(const Module::Line &x, const Module::Line &y) { - return x.address < y.address; - } - - Address address, size; // The address and size of the line's code. - File *file; // The source file. - int number; // The source line number. - }; - - // An exported symbol. - struct Extern { - Address address; - string name; - }; - - // A map from register names to postfix expressions that recover - // their their values. This can represent a complete set of rules to - // follow at some address, or a set of changes to be applied to an - // extant set of rules. - typedef map RuleMap; - - // A map from addresses to RuleMaps, representing changes that take - // effect at given addresses. - typedef map RuleChangeMap; - - // A range of 'STACK CFI' stack walking information. An instance of - // this structure corresponds to a 'STACK CFI INIT' record and the - // subsequent 'STACK CFI' records that fall within its range. - struct StackFrameEntry { - // The starting address and number of bytes of machine code this - // entry covers. - Address address, size; - - // The initial register recovery rules, in force at the starting - // address. - RuleMap initial_rules; - - // A map from addresses to rule changes. To find the rules in - // force at a given address, start with initial_rules, and then - // apply the changes given in this map for all addresses up to and - // including the address you're interested in. - RuleChangeMap rule_changes; - }; - - struct FunctionCompare { - bool operator() (const Function *lhs, - const Function *rhs) const { - if (lhs->address == rhs->address) - return lhs->name < rhs->name; - return lhs->address < rhs->address; - } - }; - - struct ExternCompare { - bool operator() (const Extern *lhs, - const Extern *rhs) const { - return lhs->address < rhs->address; - } - }; - - // Create a new module with the given name, operating system, - // architecture, and ID string. - Module(const string &name, const string &os, const string &architecture, - const string &id); - ~Module(); - - // Set the module's load address to LOAD_ADDRESS; addresses given - // for functions and lines will be written to the Breakpad symbol - // file as offsets from this address. Construction initializes this - // module's load address to zero: addresses written to the symbol - // file will be the same as they appear in the Function, Line, and - // StackFrameEntry structures. - // - // Note that this member function has no effect on addresses stored - // in the data added to this module; the Write member function - // simply subtracts off the load address from addresses before it - // prints them. Only the last load address given before calling - // Write is used. - void SetLoadAddress(Address load_address); - - // Add FUNCTION to the module. FUNCTION's name must not be empty. - // This module owns all Function objects added with this function: - // destroying the module destroys them as well. - void AddFunction(Function *function); - - // Add all the functions in [BEGIN,END) to the module. - // This module owns all Function objects added with this function: - // destroying the module destroys them as well. - void AddFunctions(vector::iterator begin, - vector::iterator end); - - // Add STACK_FRAME_ENTRY to the module. - // This module owns all StackFrameEntry objects added with this - // function: destroying the module destroys them as well. - void AddStackFrameEntry(StackFrameEntry *stack_frame_entry); - - // Add PUBLIC to the module. - // This module owns all Extern objects added with this function: - // destroying the module destroys them as well. - void AddExtern(Extern *ext); - - // If this module has a file named NAME, return a pointer to it. If - // it has none, then create one and return a pointer to the new - // file. This module owns all File objects created using these - // functions; destroying the module destroys them as well. - File *FindFile(const string &name); - File *FindFile(const char *name); - - // If this module has a file named NAME, return a pointer to it. - // Otherwise, return NULL. - File *FindExistingFile(const string &name); - - // Insert pointers to the functions added to this module at I in - // VEC. The pointed-to Functions are still owned by this module. - // (Since this is effectively a copy of the function list, this is - // mostly useful for testing; other uses should probably get a more - // appropriate interface.) - void GetFunctions(vector *vec, vector::iterator i); - - // Insert pointers to the externs added to this module at I in - // VEC. The pointed-to Externs are still owned by this module. - // (Since this is effectively a copy of the extern list, this is - // mostly useful for testing; other uses should probably get a more - // appropriate interface.) - void GetExterns(vector *vec, vector::iterator i); - - // Clear VEC and fill it with pointers to the Files added to this - // module, sorted by name. The pointed-to Files are still owned by - // this module. (Since this is effectively a copy of the file list, - // this is mostly useful for testing; other uses should probably get - // a more appropriate interface.) - void GetFiles(vector *vec); - - // Clear VEC and fill it with pointers to the StackFrameEntry - // objects that have been added to this module. (Since this is - // effectively a copy of the stack frame entry list, this is mostly - // useful for testing; other uses should probably get - // a more appropriate interface.) - void GetStackFrameEntries(vector *vec); - - // Find those files in this module that are actually referred to by - // functions' line number data, and assign them source id numbers. - // Set the source id numbers for all other files --- unused by the - // source line data --- to -1. We do this before writing out the - // symbol file, at which point we omit any unused files. - void AssignSourceIds(); - - // Call AssignSourceIds, and write this module to STREAM in the - // breakpad symbol format. Return true if all goes well, or false if - // an error occurs. This method writes out: - // - a header based on the values given to the constructor, - // - the source files added via FindFile, and finally - // - the functions added via AddFunctions, each with its lines. - // Addresses in the output are all relative to the load address - // established by SetLoadAddress. - bool Write(FILE *stream); - - private: - - // Report an error that has occurred writing the symbol file, using - // errno to find the appropriate cause. Return false. - static bool ReportError(); - - // Write RULE_MAP to STREAM, in the form appropriate for 'STACK CFI' - // records, without a final newline. Return true if all goes well; - // if an error occurs, return false, and leave errno set. - static bool WriteRuleMap(const RuleMap &rule_map, FILE *stream); - - // Module header entries. - string name_, os_, architecture_, id_; - - // The module's nominal load address. Addresses for functions and - // lines are absolute, assuming the module is loaded at this - // address. - Address load_address_; - - // Relation for maps whose keys are strings shared with some other - // structure. - struct CompareStringPtrs { - bool operator()(const string *x, const string *y) { return *x < *y; }; - }; - - // A map from filenames to File structures. The map's keys are - // pointers to the Files' names. - typedef map FileByNameMap; - - // A set containing Function structures, sorted by address. - typedef set FunctionSet; - - // A set containing Extern structures, sorted by address. - typedef set ExternSet; - - // The module owns all the files and functions that have been added - // to it; destroying the module frees the Files and Functions these - // point to. - FileByNameMap files_; // This module's source files. - FunctionSet functions_; // This module's functions. - - // The module owns all the call frame info entries that have been - // added to it. - vector stack_frame_entries_; - - // The module owns all the externs that have been added to it; - // destroying the module frees the Externs these point to. - ExternSet externs_; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_MODULE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/module_unittest.cc deleted file mode 100644 index 63ad5056..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/module_unittest.cc +++ /dev/null @@ -1,516 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// module_unittest.cc: Unit tests for google_breakpad::Module. - -#include -#include -#include -#include - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/module.h" - -using google_breakpad::Module; -using std::string; -using std::vector; -using testing::ContainerEq; - -// Return a FILE * referring to a temporary file that will be deleted -// automatically when the stream is closed or the program exits. -static FILE *checked_tmpfile() { - FILE *f = tmpfile(); - if (!f) { - fprintf(stderr, "error creating temporary file: %s\n", strerror(errno)); - exit(1); - } - return f; -} - -// Read from STREAM until end of file, and return the contents as a -// string. -static string checked_read(FILE *stream) { - string contents; - int c; - while ((c = getc(stream)) != EOF) - contents.push_back(c); - if (ferror(stream)) { - fprintf(stderr, "error reading temporary file contents: %s\n", - strerror(errno)); - exit(1); - } - return contents; -} - -// Apply 'fflush' to STREAM, and check for errors. -static void checked_fflush(FILE *stream) { - if (fflush(stream) == EOF) { - fprintf(stderr, "error flushing temporary file stream: %s\n", - strerror(errno)); - exit(1); - } -} - -// Apply 'fclose' to STREAM, and check for errors. -static void checked_fclose(FILE *stream) { - if (fclose(stream) == EOF) { - fprintf(stderr, "error closing temporary file stream: %s\n", - strerror(errno)); - exit(1); - } -} - -static Module::Function *generate_duplicate_function(const string &name) { - const Module::Address DUP_ADDRESS = 0xd35402aac7a7ad5cLL; - const Module::Address DUP_SIZE = 0x200b26e605f99071LL; - const Module::Address DUP_PARAMETER_SIZE = 0xf14ac4fed48c4a99LL; - - Module::Function *function = new(Module::Function); - function->name = name; - function->address = DUP_ADDRESS; - function->size = DUP_SIZE; - function->parameter_size = DUP_PARAMETER_SIZE; - return function; -} - -#define MODULE_NAME "name with spaces" -#define MODULE_OS "os-name" -#define MODULE_ARCH "architecture" -#define MODULE_ID "id-string" - -TEST(Write, Header) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n", - contents.c_str()); -} - -TEST(Write, OneLineFunc) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - Module::File *file = m.FindFile("file_name.cc"); - Module::Function *function = new(Module::Function); - function->name = "function_name"; - function->address = 0xe165bf8023b9d9abLL; - function->size = 0x1e4bb0eb1cbf5b09LL; - function->parameter_size = 0x772beee89114358aLL; - Module::Line line = { 0xe165bf8023b9d9abLL, 0x1e4bb0eb1cbf5b09LL, - file, 67519080 }; - function->lines.push_back(line); - m.AddFunction(function); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FILE 0 file_name.cc\n" - "FUNC e165bf8023b9d9ab 1e4bb0eb1cbf5b09 772beee89114358a" - " function_name\n" - "e165bf8023b9d9ab 1e4bb0eb1cbf5b09 67519080 0\n", - contents.c_str()); -} - -TEST(Write, RelativeLoadAddress) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Some source files. We will expect to see them in lexicographic order. - Module::File *file1 = m.FindFile("filename-b.cc"); - Module::File *file2 = m.FindFile("filename-a.cc"); - - // A function. - Module::Function *function = new(Module::Function); - function->name = "A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)"; - function->address = 0xbec774ea5dd935f3LL; - function->size = 0x2922088f98d3f6fcLL; - function->parameter_size = 0xe5e9aa008bd5f0d0LL; - - // Some source lines. The module should not sort these. - Module::Line line1 = { 0xbec774ea5dd935f3LL, 0x1c2be6d6c5af2611LL, - file1, 41676901 }; - Module::Line line2 = { 0xdaf35bc123885c04LL, 0xcf621b8d324d0ebLL, - file2, 67519080 }; - function->lines.push_back(line2); - function->lines.push_back(line1); - - m.AddFunction(function); - - // Some stack information. - Module::StackFrameEntry *entry = new Module::StackFrameEntry(); - entry->address = 0x30f9e5c83323973dULL; - entry->size = 0x49fc9ca7c7c13dc2ULL; - entry->initial_rules[".cfa"] = "he was a handsome man"; - entry->initial_rules["and"] = "what i want to know is"; - entry->rule_changes[0x30f9e5c83323973eULL]["how"] = - "do you like your blueeyed boy"; - entry->rule_changes[0x30f9e5c83323973eULL]["Mister"] = "Death"; - m.AddStackFrameEntry(entry); - - // Set the load address. Doing this after adding all the data to - // the module must work fine. - m.SetLoadAddress(0x2ab698b0b6407073LL); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FILE 0 filename-a.cc\n" - "FILE 1 filename-b.cc\n" - "FUNC 9410dc39a798c580 2922088f98d3f6fc e5e9aa008bd5f0d0" - " A_FLIBBERTIJIBBET::a_will_o_the_wisp(a clown)\n" - "b03cc3106d47eb91 cf621b8d324d0eb 67519080 0\n" - "9410dc39a798c580 1c2be6d6c5af2611 41676901 1\n" - "STACK CFI INIT 6434d177ce326ca 49fc9ca7c7c13dc2" - " .cfa: he was a handsome man" - " and: what i want to know is\n" - "STACK CFI 6434d177ce326cb" - " Mister: Death" - " how: do you like your blueeyed boy\n", - contents.c_str()); -} - -TEST(Write, OmitUnusedFiles) { - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Create some source files. - Module::File *file1 = m.FindFile("filename1"); - m.FindFile("filename2"); // not used by any line - Module::File *file3 = m.FindFile("filename3"); - - // Create a function. - Module::Function *function = new(Module::Function); - function->name = "function_name"; - function->address = 0x9b926d464f0b9384LL; - function->size = 0x4f524a4ba795e6a6LL; - function->parameter_size = 0xbbe8133a6641c9b7LL; - - // Source files that refer to some files, but not others. - Module::Line line1 = { 0x595fa44ebacc1086LL, 0x1e1e0191b066c5b3LL, - file1, 137850127 }; - Module::Line line2 = { 0x401ce8c8a12d25e3LL, 0x895751c41b8d2ce2LL, - file3, 28113549 }; - function->lines.push_back(line1); - function->lines.push_back(line2); - m.AddFunction(function); - - m.AssignSourceIds(); - - vector vec; - m.GetFiles(&vec); - EXPECT_EQ((size_t) 3, vec.size()); - EXPECT_STREQ("filename1", vec[0]->name.c_str()); - EXPECT_NE(-1, vec[0]->source_id); - // Expect filename2 not to be used. - EXPECT_STREQ("filename2", vec[1]->name.c_str()); - EXPECT_EQ(-1, vec[1]->source_id); - EXPECT_STREQ("filename3", vec[2]->name.c_str()); - EXPECT_NE(-1, vec[2]->source_id); - - FILE *f = checked_tmpfile(); - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FILE 0 filename1\n" - "FILE 1 filename3\n" - "FUNC 9b926d464f0b9384 4f524a4ba795e6a6 bbe8133a6641c9b7" - " function_name\n" - "595fa44ebacc1086 1e1e0191b066c5b3 137850127 0\n" - "401ce8c8a12d25e3 895751c41b8d2ce2 28113549 1\n", - contents.c_str()); -} - -TEST(Construct, AddFunctions) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Two functions. - Module::Function *function1 = new(Module::Function); - function1->name = "_without_form"; - function1->address = 0xd35024aa7ca7da5cLL; - function1->size = 0x200b26e605f99071LL; - function1->parameter_size = 0xf14ac4fed48c4a99LL; - - Module::Function *function2 = new(Module::Function); - function2->name = "_and_void"; - function2->address = 0x2987743d0b35b13fLL; - function2->size = 0xb369db048deb3010LL; - function2->parameter_size = 0x938e556cb5a79988LL; - - // Put them in a vector. - vector vec; - vec.push_back(function1); - vec.push_back(function2); - - m.AddFunctions(vec.begin(), vec.end()); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FUNC 2987743d0b35b13f b369db048deb3010 938e556cb5a79988" - " _and_void\n" - "FUNC d35024aa7ca7da5c 200b26e605f99071 f14ac4fed48c4a99" - " _without_form\n", - contents.c_str()); - - // Check that m.GetFunctions returns the functions we expect. - vec.clear(); - m.GetFunctions(&vec, vec.end()); - EXPECT_TRUE(vec.end() != find(vec.begin(), vec.end(), function1)); - EXPECT_TRUE(vec.end() != find(vec.begin(), vec.end(), function2)); - EXPECT_EQ((size_t) 2, vec.size()); -} - -TEST(Construct, AddFrames) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // First STACK CFI entry, with no initial rules or deltas. - Module::StackFrameEntry *entry1 = new Module::StackFrameEntry(); - entry1->address = 0xddb5f41285aa7757ULL; - entry1->size = 0x1486493370dc5073ULL; - m.AddStackFrameEntry(entry1); - - // Second STACK CFI entry, with initial rules but no deltas. - Module::StackFrameEntry *entry2 = new Module::StackFrameEntry(); - entry2->address = 0x8064f3af5e067e38ULL; - entry2->size = 0x0de2a5ee55509407ULL; - entry2->initial_rules[".cfa"] = "I think that I shall never see"; - entry2->initial_rules["stromboli"] = "a poem lovely as a tree"; - entry2->initial_rules["cannoli"] = "a tree whose hungry mouth is prest"; - m.AddStackFrameEntry(entry2); - - // Third STACK CFI entry, with initial rules and deltas. - Module::StackFrameEntry *entry3 = new Module::StackFrameEntry(); - entry3->address = 0x5e8d0db0a7075c6cULL; - entry3->size = 0x1c7edb12a7aea229ULL; - entry3->initial_rules[".cfa"] = "Whose woods are these"; - entry3->rule_changes[0x47ceb0f63c269d7fULL]["calzone"] = - "the village though"; - entry3->rule_changes[0x47ceb0f63c269d7fULL]["cannoli"] = - "he will not see me stopping here"; - entry3->rule_changes[0x36682fad3763ffffULL]["stromboli"] = - "his house is in"; - entry3->rule_changes[0x36682fad3763ffffULL][".cfa"] = - "I think I know"; - m.AddStackFrameEntry(entry3); - - // Check that Write writes STACK CFI records properly. - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "STACK CFI INIT ddb5f41285aa7757 1486493370dc5073 \n" - "STACK CFI INIT 8064f3af5e067e38 de2a5ee55509407" - " .cfa: I think that I shall never see" - " cannoli: a tree whose hungry mouth is prest" - " stromboli: a poem lovely as a tree\n" - "STACK CFI INIT 5e8d0db0a7075c6c 1c7edb12a7aea229" - " .cfa: Whose woods are these\n" - "STACK CFI 36682fad3763ffff" - " .cfa: I think I know" - " stromboli: his house is in\n" - "STACK CFI 47ceb0f63c269d7f" - " calzone: the village though" - " cannoli: he will not see me stopping here\n", - contents.c_str()); - - // Check that GetStackFrameEntries works. - vector entries; - m.GetStackFrameEntries(&entries); - ASSERT_EQ(3U, entries.size()); - // Check first entry. - EXPECT_EQ(0xddb5f41285aa7757ULL, entries[0]->address); - EXPECT_EQ(0x1486493370dc5073ULL, entries[0]->size); - ASSERT_EQ(0U, entries[0]->initial_rules.size()); - ASSERT_EQ(0U, entries[0]->rule_changes.size()); - // Check second entry. - EXPECT_EQ(0x8064f3af5e067e38ULL, entries[1]->address); - EXPECT_EQ(0x0de2a5ee55509407ULL, entries[1]->size); - ASSERT_EQ(3U, entries[1]->initial_rules.size()); - Module::RuleMap entry2_initial; - entry2_initial[".cfa"] = "I think that I shall never see"; - entry2_initial["stromboli"] = "a poem lovely as a tree"; - entry2_initial["cannoli"] = "a tree whose hungry mouth is prest"; - EXPECT_THAT(entries[1]->initial_rules, ContainerEq(entry2_initial)); - ASSERT_EQ(0U, entries[1]->rule_changes.size()); - // Check third entry. - EXPECT_EQ(0x5e8d0db0a7075c6cULL, entries[2]->address); - EXPECT_EQ(0x1c7edb12a7aea229ULL, entries[2]->size); - Module::RuleMap entry3_initial; - entry3_initial[".cfa"] = "Whose woods are these"; - EXPECT_THAT(entries[2]->initial_rules, ContainerEq(entry3_initial)); - Module::RuleChangeMap entry3_changes; - entry3_changes[0x36682fad3763ffffULL][".cfa"] = "I think I know"; - entry3_changes[0x36682fad3763ffffULL]["stromboli"] = "his house is in"; - entry3_changes[0x47ceb0f63c269d7fULL]["calzone"] = "the village though"; - entry3_changes[0x47ceb0f63c269d7fULL]["cannoli"] = - "he will not see me stopping here"; - EXPECT_THAT(entries[2]->rule_changes, ContainerEq(entry3_changes)); -} - -TEST(Construct, UniqueFiles) { - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - Module::File *file1 = m.FindFile("foo"); - Module::File *file2 = m.FindFile(string("bar")); - Module::File *file3 = m.FindFile(string("foo")); - Module::File *file4 = m.FindFile("bar"); - EXPECT_NE(file1, file2); - EXPECT_EQ(file1, file3); - EXPECT_EQ(file2, file4); - EXPECT_EQ(file1, m.FindExistingFile("foo")); - EXPECT_TRUE(m.FindExistingFile("baz") == NULL); -} - -TEST(Construct, DuplicateFunctions) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Two functions. - Module::Function *function1 = generate_duplicate_function("_without_form"); - Module::Function *function2 = generate_duplicate_function("_without_form"); - - m.AddFunction(function1); - m.AddFunction(function2); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FUNC d35402aac7a7ad5c 200b26e605f99071 f14ac4fed48c4a99" - " _without_form\n", - contents.c_str()); -} - -TEST(Construct, FunctionsWithSameAddress) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Two functions. - Module::Function *function1 = generate_duplicate_function("_without_form"); - Module::Function *function2 = generate_duplicate_function("_and_void"); - - m.AddFunction(function1); - m.AddFunction(function2); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" - "FUNC d35402aac7a7ad5c 200b26e605f99071 f14ac4fed48c4a99" - " _and_void\n" - "FUNC d35402aac7a7ad5c 200b26e605f99071 f14ac4fed48c4a99" - " _without_form\n", - contents.c_str()); -} - -// Externs should be written out as PUBLIC records, sorted by -// address. -TEST(Construct, Externs) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Two externs. - Module::Extern *extern1 = new(Module::Extern); - extern1->address = 0xffff; - extern1->name = "_abc"; - Module::Extern *extern2 = new(Module::Extern); - extern2->address = 0xaaaa; - extern2->name = "_xyz"; - - m.AddExtern(extern1); - m.AddExtern(extern2); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - - EXPECT_STREQ("MODULE " MODULE_OS " " MODULE_ARCH " " - MODULE_ID " " MODULE_NAME "\n" - "PUBLIC aaaa 0 _xyz\n" - "PUBLIC ffff 0 _abc\n", - contents.c_str()); -} - -// Externs with the same address should only keep the first entry -// added. -TEST(Construct, DuplicateExterns) { - FILE *f = checked_tmpfile(); - Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); - - // Two externs. - Module::Extern *extern1 = new(Module::Extern); - extern1->address = 0xffff; - extern1->name = "_xyz"; - Module::Extern *extern2 = new(Module::Extern); - extern2->address = 0xffff; - extern2->name = "_abc"; - - m.AddExtern(extern1); - m.AddExtern(extern2); - - m.Write(f); - checked_fflush(f); - rewind(f); - string contents = checked_read(f); - checked_fclose(f); - - EXPECT_STREQ("MODULE " MODULE_OS " " MODULE_ARCH " " - MODULE_ID " " MODULE_NAME "\n" - "PUBLIC ffff 0 _xyz\n", - contents.c_str()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.cc deleted file mode 100644 index b1e995dd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.cc +++ /dev/null @@ -1,681 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "common/solaris/dump_symbols.h" -#include "common/solaris/file_id.h" -#include "common/solaris/guid_creator.h" -#include "processor/scoped_ptr.h" - -// This namespace contains helper functions. -namespace { - -using std::make_pair; - -#if defined(_LP64) -typedef Elf64_Sym Elf_Sym; -#else -typedef Elf32_Sym Elf_Sym; -#endif - -// Symbol table entry from stabs. Sun CC specific. -struct slist { - // String table index. - unsigned int n_strx; - // Stab type. - unsigned char n_type; - char n_other; - short n_desc; - unsigned long n_value; -}; - -// Symbol table entry -struct SymbolEntry { - // Offset from the start of the file. - GElf_Addr offset; - // Function size. - GElf_Word size; -}; - -// Infomation of a line. -struct LineInfo { - // Offset from start of the function. - // Load from stab symbol. - GElf_Off rva_to_func; - // Offset from base of the loading binary. - GElf_Off rva_to_base; - // Size of the line. - // The first line: equals to rva_to_func. - // The other lines: the difference of rva_to_func of the line and - // rva_to_func of the previous N_SLINE. - uint32_t size; - // Line number. - uint32_t line_num; -}; - -// Information of a function. -struct FuncInfo { - // Name of the function. - const char *name; - // Offset from the base of the loading address. - GElf_Off rva_to_base; - // Virtual address of the function. - // Load from stab symbol. - GElf_Addr addr; - // Size of the function. - // Equal to rva_to_func of the last function line. - uint32_t size; - // Total size of stack parameters. - uint32_t stack_param_size; - // Line information array. - std::vector line_info; -}; - -// Information of a source file. -struct SourceFileInfo { - // Name of the source file. - const char *name; - // Starting address of the source file. - GElf_Addr addr; - // Id of the source file. - int source_id; - // Functions information. - std::vector func_info; -}; - -struct CompareString { - bool operator()(const char *s1, const char *s2) const { - return strcmp(s1, s2) < 0; - } -}; - -typedef std::map SymbolMap; - -// Information of a symbol table. -// This is the root of all types of symbol. -struct SymbolInfo { - std::vector source_file_info; - // Symbols information. - SymbolMap symbol_entries; -}; - -// Stab section name. -const char *kStabName = ".stab"; - -// Stab str section name. -const char *kStabStrName = ".stabstr"; - -// Symtab section name. -const char *kSymtabName = ".symtab"; - -// Strtab section name. -const char *kStrtabName = ".strtab"; - -// Default buffer lenght for demangle. -const int demangleLen = 20000; - -// Offset to the string table. -u_int64_t stringOffset = 0; - -// Update the offset to the start of the string index of the next -// object module for every N_ENDM stabs. -inline void RecalculateOffset(struct slist* cur_list, char *stabstr) { - while ((--cur_list)->n_strx == 0) ; - stringOffset += cur_list->n_strx; - - char *temp = stabstr + stringOffset; - while (*temp != '\0') { - ++stringOffset; - ++temp; - } - // Skip the extra '\0' - ++stringOffset; -} - -// Demangle using demangle library on Solaris. -std::string Demangle(const char *mangled) { - int status = 0; - std::string str(mangled); - char *demangled = (char *)malloc(demangleLen); - - if (!demangled) { - fprintf(stderr, "no enough memory.\n"); - goto out; - } - - if ((status = cplus_demangle(mangled, demangled, demangleLen)) == - DEMANGLE_ESPACE) { - fprintf(stderr, "incorrect demangle.\n"); - goto out; - } - - str = demangled; - free(demangled); - -out: - return str; -} - -bool WriteFormat(int fd, const char *fmt, ...) { - va_list list; - char buffer[4096]; - ssize_t expected, written; - va_start(list, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, list); - expected = strlen(buffer); - written = write(fd, buffer, strlen(buffer)); - va_end(list); - return expected == written; -} - -bool IsValidElf(const GElf_Ehdr *elf_header) { - return memcmp(elf_header, ELFMAG, SELFMAG) == 0; -} - -static bool FindSectionByName(Elf *elf, const char *name, - int shstrndx, - GElf_Shdr *shdr) { - assert(name != NULL); - - if (strlen(name) == 0) - return false; - - Elf_Scn *scn = NULL; - - while ((scn = elf_nextscn(elf, scn)) != NULL) { - if (gelf_getshdr(scn, shdr) == (GElf_Shdr *)0) { - fprintf(stderr, "failed to read section header: %s\n", elf_errmsg(0)); - return false; - } - - const char *section_name = elf_strptr(elf, shstrndx, shdr->sh_name); - if (!section_name) { - fprintf(stderr, "Section name error: %s\n", elf_errmsg(-1)); - continue; - } - - if (strcmp(section_name, name) == 0) - return true; - } - - return false; -} - -// The parameter size is used for FPO-optimized code, and -// this is all tied up with the debugging data for Windows x86. -// Set it to 0 on Solaris. -int LoadStackParamSize(struct slist *list, - struct slist *list_end, - struct FuncInfo *func_info) { - struct slist *cur_list = list; - int step = 1; - while (cur_list < list_end && cur_list->n_type == N_PSYM) { - ++cur_list; - ++step; - } - - func_info->stack_param_size = 0; - return step; -} - -int LoadLineInfo(struct slist *list, - struct slist *list_end, - struct FuncInfo *func_info) { - struct slist *cur_list = list; - do { - // Skip non line information. - while (cur_list < list_end && cur_list->n_type != N_SLINE) { - // Only exit when got another function, or source file, or end stab. - if (cur_list->n_type == N_FUN || cur_list->n_type == N_SO || - cur_list->n_type == N_ENDM) { - return cur_list - list; - } - ++cur_list; - } - struct LineInfo line; - while (cur_list < list_end && cur_list->n_type == N_SLINE) { - line.rva_to_func = cur_list->n_value; - // n_desc is a signed short - line.line_num = (unsigned short)cur_list->n_desc; - func_info->line_info.push_back(line); - ++cur_list; - } - if (cur_list == list_end && cur_list->n_type == N_ENDM) - break; - } while (list < list_end); - - return cur_list - list; -} - -int LoadFuncSymbols(struct slist *list, - struct slist *list_end, - char *stabstr, - GElf_Word base, - struct SourceFileInfo *source_file_info) { - struct slist *cur_list = list; - assert(cur_list->n_type == N_SO); - ++cur_list; - - source_file_info->func_info.clear(); - while (cur_list < list_end) { - // Go until the function symbol. - while (cur_list < list_end && cur_list->n_type != N_FUN) { - if (cur_list->n_type == N_SO) { - return cur_list - list; - } - ++cur_list; - if (cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - continue; - } - while (cur_list->n_type == N_FUN) { - struct FuncInfo func_info; - memset(&func_info, 0, sizeof(func_info)); - func_info.name = stabstr + cur_list->n_strx + stringOffset; - // The n_value field is always 0 from stab generated by Sun CC. - // TODO(Alfred): Find the correct value. - func_info.addr = cur_list->n_value; - ++cur_list; - if (cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - if (cur_list->n_type != N_ESYM && cur_list->n_type != N_ISYM && - cur_list->n_type != N_FUN) { - // Stack parameter size. - cur_list += LoadStackParamSize(cur_list, list_end, &func_info); - // Line info. - cur_list += LoadLineInfo(cur_list, list_end, &func_info); - } - if (cur_list < list_end && cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - // Functions in this module should have address bigger than the module - // starting address. - // - // These two values are always 0 with Sun CC. - // TODO(Alfred): Get the correct value or remove the condition statement. - if (func_info.addr >= source_file_info->addr) { - source_file_info->func_info.push_back(func_info); - } - } - } - return cur_list - list; -} - -// Compute size and rva information based on symbols loaded from stab section. -bool ComputeSizeAndRVA(struct SymbolInfo *symbols) { - std::vector *sorted_files = - &(symbols->source_file_info); - SymbolMap *symbol_entries = &(symbols->symbol_entries); - for (size_t i = 0; i < sorted_files->size(); ++i) { - struct SourceFileInfo &source_file = (*sorted_files)[i]; - std::vector *sorted_functions = &(source_file.func_info); - int func_size = sorted_functions->size(); - - for (size_t j = 0; j < func_size; ++j) { - struct FuncInfo &func_info = (*sorted_functions)[j]; - int line_count = func_info.line_info.size(); - - // Discard the ending part of the name. - std::string func_name(func_info.name); - std::string::size_type last_colon = func_name.find_first_of(':'); - if (last_colon != std::string::npos) - func_name = func_name.substr(0, last_colon); - - // Fine the symbol offset from the loading address and size by name. - SymbolMap::const_iterator it = symbol_entries->find(func_name.c_str()); - if (it->second) { - func_info.rva_to_base = it->second->offset; - func_info.size = (line_count == 0) ? 0 : it->second->size; - } else { - func_info.rva_to_base = 0; - func_info.size = 0; - } - - // Compute function and line size. - for (size_t k = 0; k < line_count; ++k) { - struct LineInfo &line_info = func_info.line_info[k]; - - line_info.rva_to_base = line_info.rva_to_func + func_info.rva_to_base; - if (k == line_count - 1) { - line_info.size = func_info.size - line_info.rva_to_func; - } else { - struct LineInfo &next_line = func_info.line_info[k + 1]; - line_info.size = next_line.rva_to_func - line_info.rva_to_func; - } - } // for each line. - } // for each function. - } // for each source file. - for (SymbolMap::iterator it = symbol_entries->begin(); - it != symbol_entries->end(); ++it) { - free(it->second); - } - return true; -} - -bool LoadAllSymbols(const GElf_Shdr *stab_section, - const GElf_Shdr *stabstr_section, - GElf_Word base, - struct SymbolInfo *symbols) { - if (stab_section == NULL || stabstr_section == NULL) - return false; - - char *stabstr = - reinterpret_cast(stabstr_section->sh_offset + base); - struct slist *lists = - reinterpret_cast(stab_section->sh_offset + base); - int nstab = stab_section->sh_size / sizeof(struct slist); - int source_id = 0; - - // First pass, load all symbols from the object file. - for (int i = 0; i < nstab; ) { - int step = 1; - struct slist *cur_list = lists + i; - if (cur_list->n_type == N_SO) { - // FUNC
- struct SourceFileInfo source_file_info; - source_file_info.name = stabstr + cur_list->n_strx + stringOffset; - // The n_value field is always 0 from stab generated by Sun CC. - // TODO(Alfred): Find the correct value. - source_file_info.addr = cur_list->n_value; - if (strchr(source_file_info.name, '.')) - source_file_info.source_id = source_id++; - else - source_file_info.source_id = -1; - step = LoadFuncSymbols(cur_list, lists + nstab - 1, stabstr, - base, &source_file_info); - symbols->source_file_info.push_back(source_file_info); - } - i += step; - } - // Second pass, compute the size of functions and lines. - return ComputeSizeAndRVA(symbols); -} - -bool LoadSymbols(Elf *elf, GElf_Ehdr *elf_header, struct SymbolInfo *symbols, - void *obj_base) { - GElf_Word base = reinterpret_cast(obj_base); - - const GElf_Shdr *sections = - reinterpret_cast(elf_header->e_shoff + base); - GElf_Shdr stab_section; - if (!FindSectionByName(elf, kStabName, elf_header->e_shstrndx, - &stab_section)) { - fprintf(stderr, "Stab section not found.\n"); - return false; - } - GElf_Shdr stabstr_section; - if (!FindSectionByName(elf, kStabStrName, elf_header->e_shstrndx, - &stabstr_section)) { - fprintf(stderr, "Stabstr section not found.\n"); - return false; - } - GElf_Shdr symtab_section; - if (!FindSectionByName(elf, kSymtabName, elf_header->e_shstrndx, - &symtab_section)) { - fprintf(stderr, "Symtab section not found.\n"); - return false; - } - GElf_Shdr strtab_section; - if (!FindSectionByName(elf, kStrtabName, elf_header->e_shstrndx, - &strtab_section)) { - fprintf(stderr, "Strtab section not found.\n"); - return false; - } - - Elf_Sym *symbol = (Elf_Sym *)((char *)base + symtab_section.sh_offset); - for (int i = 0; i < symtab_section.sh_size/symtab_section.sh_entsize; ++i) { - struct SymbolEntry *symbol_entry = - (struct SymbolEntry *)malloc(sizeof(struct SymbolEntry)); - const char *name = reinterpret_cast( - strtab_section.sh_offset + (GElf_Word)base + symbol->st_name); - symbol_entry->offset = symbol->st_value; - symbol_entry->size = symbol->st_size; - symbols->symbol_entries.insert(make_pair(name, symbol_entry)); - ++symbol; - } - - - // Load symbols. - return LoadAllSymbols(&stab_section, &stabstr_section, base, symbols); -} - -bool WriteModuleInfo(int fd, GElf_Half arch, const std::string &obj_file) { - const char *arch_name = NULL; - if (arch == EM_386) - arch_name = "x86"; - else if (arch == EM_X86_64) - arch_name = "x86_64"; - else if (arch == EM_SPARC32PLUS) - arch_name = "SPARC_32+"; - else { - printf("Please add more ARCH support\n"); - return false; - } - - unsigned char identifier[16]; - google_breakpad::FileID file_id(obj_file.c_str()); - if (file_id.ElfFileIdentifier(identifier)) { - char identifier_str[40]; - file_id.ConvertIdentifierToString(identifier, - identifier_str, sizeof(identifier_str)); - std::string filename = obj_file; - size_t slash_pos = obj_file.find_last_of("/"); - if (slash_pos != std::string::npos) - filename = obj_file.substr(slash_pos + 1); - return WriteFormat(fd, "MODULE solaris %s %s %s\n", arch_name, - identifier_str, filename.c_str()); - } - return false; -} - -bool WriteSourceFileInfo(int fd, const struct SymbolInfo &symbols) { - for (size_t i = 0; i < symbols.source_file_info.size(); ++i) { - if (symbols.source_file_info[i].source_id != -1) { - const char *name = symbols.source_file_info[i].name; - if (!WriteFormat(fd, "FILE %d %s\n", - symbols.source_file_info[i].source_id, name)) - return false; - } - } - return true; -} - -bool WriteOneFunction(int fd, int source_id, - const struct FuncInfo &func_info){ - // Discard the ending part of the name. - std::string func_name(func_info.name); - std::string::size_type last_colon = func_name.find_last_of(':'); - if (last_colon != std::string::npos) - func_name = func_name.substr(0, last_colon); - func_name = Demangle(func_name.c_str()); - - if (func_info.size <= 0) - return true; - - // rva_to_base could be unsigned long(32 bit) or unsigned long long(64 bit). - if (WriteFormat(fd, "FUNC %llx %x %d %s\n", - (long long)func_info.rva_to_base, - func_info.size, - func_info.stack_param_size, - func_name.c_str())) { - for (size_t i = 0; i < func_info.line_info.size(); ++i) { - const struct LineInfo &line_info = func_info.line_info[i]; - if (line_info.line_num == 0) - return true; - if (!WriteFormat(fd, "%llx %x %d %d\n", - (long long)line_info.rva_to_base, - line_info.size, - line_info.line_num, - source_id)) - return false; - } - return true; - } - return false; -} - -bool WriteFunctionInfo(int fd, const struct SymbolInfo &symbols) { - for (size_t i = 0; i < symbols.source_file_info.size(); ++i) { - const struct SourceFileInfo &file_info = symbols.source_file_info[i]; - for (size_t j = 0; j < file_info.func_info.size(); ++j) { - const struct FuncInfo &func_info = file_info.func_info[j]; - if (!WriteOneFunction(fd, file_info.source_id, func_info)) - return false; - } - } - return true; -} - -bool DumpStabSymbols(int fd, const struct SymbolInfo &symbols) { - return WriteSourceFileInfo(fd, symbols) && - WriteFunctionInfo(fd, symbols); -} - -// -// FDWrapper -// -// Wrapper class to make sure opened file is closed. -// -class FDWrapper { - public: - explicit FDWrapper(int fd) : - fd_(fd) { - } - ~FDWrapper() { - if (fd_ != -1) - close(fd_); - } - int get() { - return fd_; - } - int release() { - int fd = fd_; - fd_ = -1; - return fd; - } - private: - int fd_; -}; - -// -// MmapWrapper -// -// Wrapper class to make sure mapped regions are unmapped. -// -class MmapWrapper { - public: - MmapWrapper(void *mapped_address, size_t mapped_size) : - base_(mapped_address), size_(mapped_size) { - } - ~MmapWrapper() { - if (base_ != NULL) { - assert(size_ > 0); - munmap((char *)base_, size_); - } - } - void release() { - base_ = NULL; - size_ = 0; - } - - private: - void *base_; - size_t size_; -}; - -} // namespace - -namespace google_breakpad { - -class AutoElfEnder { - public: - AutoElfEnder(Elf *elf) : elf_(elf) {} - ~AutoElfEnder() { if (elf_) elf_end(elf_); } - private: - Elf *elf_; -}; - - -bool DumpSymbols::WriteSymbolFile(const std::string &obj_file, int sym_fd) { - if (elf_version(EV_CURRENT) == EV_NONE) { - fprintf(stderr, "elf_version() failed: %s\n", elf_errmsg(0)); - return false; - } - - int obj_fd = open(obj_file.c_str(), O_RDONLY); - if (obj_fd < 0) - return false; - FDWrapper obj_fd_wrapper(obj_fd); - struct stat st; - if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) - return false; - void *obj_base = mmap(NULL, st.st_size, - PROT_READ, MAP_PRIVATE, obj_fd, 0); - if (obj_base == MAP_FAILED) - return false; - MmapWrapper map_wrapper(obj_base, st.st_size); - GElf_Ehdr elf_header; - Elf *elf = elf_begin(obj_fd, ELF_C_READ, NULL); - AutoElfEnder elfEnder(elf); - - if (gelf_getehdr(elf, &elf_header) == (GElf_Ehdr *)NULL) { - fprintf(stderr, "failed to read elf header: %s\n", elf_errmsg(-1)); - return false; - } - - if (!IsValidElf(&elf_header)) { - fprintf(stderr, "header magic doesn't match\n"); - return false; - } - struct SymbolInfo symbols; - if (!LoadSymbols(elf, &elf_header, &symbols, obj_base)) - return false; - // Write to symbol file. - if (WriteModuleInfo(sym_fd, elf_header.e_machine, obj_file) && - DumpStabSymbols(sym_fd, symbols)) - return true; - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.h deleted file mode 100644 index 7f4baadc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/dump_symbols.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// dump_symbols.cc: Implements a Solaris stab debugging format dumper. -// -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_DUMP_SYMBOLS_H__ -#define COMMON_SOLARIS_DUMP_SYMBOLS_H__ - -#include - -namespace google_breakpad { - -class DumpSymbols { - public: - bool WriteSymbolFile(const std::string &obj_file, - int sym_fd); -}; - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_DUMP_SYMBOLS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.cc deleted file mode 100644 index 643a1462..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.cc +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "common/md5.h" -#include "common/solaris/file_id.h" -#include "common/solaris/message_output.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class AutoElfEnder { - public: - AutoElfEnder(Elf *elf) : elf_(elf) {} - ~AutoElfEnder() { if (elf_) elf_end(elf_); } - private: - Elf *elf_; -}; - -// Find the text section in elf object file. -// Return the section start address and the size. -static bool FindElfTextSection(int fd, const void *elf_base, - const void **text_start, - int *text_size) { - assert(text_start); - assert(text_size); - - *text_start = NULL; - *text_size = 0; - - if (elf_version(EV_CURRENT) == EV_NONE) { - print_message2(2, "elf_version() failed: %s\n", elf_errmsg(0)); - return false; - } - - GElf_Ehdr elf_header; - lseek(fd, 0L, 0); - Elf *elf = elf_begin(fd, ELF_C_READ, NULL); - AutoElfEnder elfEnder(elf); - - if (gelf_getehdr(elf, &elf_header) == (GElf_Ehdr *)NULL) { - print_message2(2, "failed to read elf header: %s\n", elf_errmsg(-1)); - return false; - } - - if (elf_header.e_ident[EI_MAG0] != ELFMAG0 || - elf_header.e_ident[EI_MAG1] != ELFMAG1 || - elf_header.e_ident[EI_MAG2] != ELFMAG2 || - elf_header.e_ident[EI_MAG3] != ELFMAG3) { - print_message1(2, "header magic doesn't match\n"); - return false; - } - - static const char kTextSectionName[] = ".text"; - const GElf_Shdr *text_section = NULL; - Elf_Scn *scn = NULL; - GElf_Shdr shdr; - - while ((scn = elf_nextscn(elf, scn)) != NULL) { - if (gelf_getshdr(scn, &shdr) == (GElf_Shdr *)0) { - print_message2(2, "failed to read section header: %s\n", elf_errmsg(0)); - return false; - } - - if (shdr.sh_type == SHT_PROGBITS) { - const char *section_name = elf_strptr(elf, elf_header.e_shstrndx, - shdr.sh_name); - if (!section_name) { - print_message2(2, "Section name error: %s\n", elf_errmsg(-1)); - continue; - } - - if (strcmp(section_name, kTextSectionName) == 0) { - text_section = &shdr; - break; - } - } - } - if (text_section != NULL && text_section->sh_size > 0) { - *text_start = (char *)elf_base + text_section->sh_offset; - *text_size = text_section->sh_size; - return true; - } - - return false; -} - -FileID::FileID(const char *path) { - strcpy(path_, path); -} - -class AutoCloser { - public: - AutoCloser(int fd) : fd_(fd) {} - ~AutoCloser() { if (fd_) close(fd_); } - private: - int fd_; -}; - -bool FileID::ElfFileIdentifier(unsigned char identifier[16]) { - int fd = 0; - if ((fd = open(path_, O_RDONLY)) < 0) - return false; - - AutoCloser autocloser(fd); - struct stat st; - if (fstat(fd, &st) != 0 || st.st_size <= 0) - return false; - - void *base = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - if (base == MAP_FAILED) - return false; - - bool success = false; - const void *text_section = NULL; - int text_size = 0; - - if (FindElfTextSection(fd, base, &text_section, &text_size)) { - MD5Context md5; - MD5Init(&md5); - MD5Update(&md5, (const unsigned char *)text_section, text_size); - MD5Final(identifier, &md5); - success = true; - } - - munmap((char *)base, st.st_size); - return success; -} - -// static -bool FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - if (buffer_length < 34) - return false; - - int buffer_idx = 0; - for (int idx = 0; idx < 16; ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // Add an extra "0" by the end. - buffer[buffer_idx++] = '0'; - - // NULL terminate - buffer[buffer_idx] = 0; - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.h deleted file mode 100644 index 375e8575..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/file_id.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.h: Return a unique identifier for a file -// -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_FILE_ID_H__ -#define COMMON_SOLARIS_FILE_ID_H__ - -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the elf file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool ElfFileIdentifier(unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a MDCVInfoPDB70 struct. - // The |buffer| should be at least 34 bytes long to receive all of the data - // and termination. Shorter buffers will return false. - static bool ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_FILE_ID_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.cc deleted file mode 100644 index 70940259..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include -#include -#include - -#include "common/solaris/guid_creator.h" - -// -// GUIDGenerator -// -// This class is used to generate random GUID. -// Currently use random number to generate a GUID. This should be OK since -// we don't expect crash to happen very offen. -// -class GUIDGenerator { - public: - GUIDGenerator() { - srandom(time(NULL)); - } - - bool CreateGUID(GUID *guid) const { - guid->data1 = random(); - guid->data2 = (u_int16_t)(random()); - guid->data3 = (u_int16_t)(random()); - *reinterpret_cast(&guid->data4[0]) = random(); - *reinterpret_cast(&guid->data4[4]) = random(); - return true; - } -}; - -// Guid generator. -const GUIDGenerator kGuidGenerator; - -bool CreateGUID(GUID *guid) { - return kGuidGenerator.CreateGUID(guid); -}; - -// Parse guid to string. -bool GUIDToString(const GUID *guid, char *buf, int buf_len) { - // Should allow more space the the max length of GUID. - assert(buf_len > kGUIDStringLength); - int num = snprintf(buf, buf_len, kGUIDFormatString, - guid->data1, guid->data2, guid->data3, - *reinterpret_cast(&(guid->data4[0])), - *reinterpret_cast(&(guid->data4[4]))); - if (num != kGUIDStringLength) - return false; - - buf[num] = '\0'; - return true; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.h deleted file mode 100644 index 4aee3a1c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/guid_creator.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_GUID_CREATOR_H__ -#define COMMON_SOLARIS_GUID_CREATOR_H__ - -#include "google_breakpad/common/minidump_format.h" - -typedef MDGUID GUID; - -// Format string for parsing GUID. -#define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" -// Length of GUID string. Don't count the ending '\0'. -#define kGUIDStringLength 36 - -// Create a guid. -bool CreateGUID(GUID *guid); - -// Get the string from guid. -bool GUIDToString(const GUID *guid, char *buf, int buf_len); - -#endif // COMMON_SOLARIS_GUID_CREATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/message_output.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/message_output.h deleted file mode 100644 index 3e3b1d46..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/solaris/message_output.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_MESSAGE_OUTPUT_H__ -#define COMMON_SOLARIS_MESSAGE_OUTPUT_H__ - -namespace google_breakpad { - -const int MESSAGE_MAX = 1000; - -// Message output macros. -// snprintf doesn't operate heap on Solaris, while printf and fprintf do. -// Use snprintf here to avoid heap allocation. -#define print_message1(std, message) \ - char buffer[MESSAGE_MAX]; \ - int len = snprintf(buffer, MESSAGE_MAX, message); \ - write(std, buffer, len) - -#define print_message2(std, message, para) \ - char buffer[MESSAGE_MAX]; \ - int len = snprintf(buffer, MESSAGE_MAX, message, para); \ - write(std, buffer, len); - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_MESSAGE_OUTPUT_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.cc deleted file mode 100644 index 7dd2eecd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.cc +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// This file implements the google_breakpad::StabsReader class. -// See stabs_reader.h. - -#include "common/stabs_reader.h" - -#include -#include -#include - -using std::vector; - -namespace google_breakpad { - -StabsReader::EntryIterator::EntryIterator(const ByteBuffer *buffer, - bool big_endian, size_t value_size) - : value_size_(value_size), cursor_(buffer, big_endian) { - // Actually, we could handle weird sizes just fine, but they're - // probably mistakes --- expressed in bits, say. - assert(value_size == 4 || value_size == 8); - entry_.index = 0; - Fetch(); -} - -void StabsReader::EntryIterator::Fetch() { - cursor_ - .Read(4, false, &entry_.name_offset) - .Read(1, false, &entry_.type) - .Read(1, false, &entry_.other) - .Read(2, false, &entry_.descriptor) - .Read(value_size_, false, &entry_.value); - entry_.at_end = !cursor_; -} - -StabsReader::StabsReader(const uint8_t *stab, size_t stab_size, - const uint8_t *stabstr, size_t stabstr_size, - bool big_endian, size_t value_size, bool unitized, - StabsHandler *handler) - : entries_(stab, stab_size), - strings_(stabstr, stabstr_size), - iterator_(&entries_, big_endian, value_size), - unitized_(unitized), - handler_(handler), - string_offset_(0), - next_cu_string_offset_(0), - current_source_file_(NULL) { } - -const char *StabsReader::SymbolString() { - ptrdiff_t offset = string_offset_ + iterator_->name_offset; - if (offset < 0 || (size_t) offset >= strings_.Size()) { - handler_->Warning("symbol %d: name offset outside the string section\n", - iterator_->index); - // Return our null string, to keep our promise about all names being - // taken from the string section. - offset = 0; - } - return reinterpret_cast(strings_.start + offset); -} - -bool StabsReader::Process() { - while (!iterator_->at_end) { - if (iterator_->type == N_SO) { - if (! ProcessCompilationUnit()) - return false; - } else if (iterator_->type == N_UNDF && unitized_) { - // In unitized STABS (including Linux STABS, and pretty much anything - // else that puts STABS data in sections), at the head of each - // compilation unit's entries there is an N_UNDF stab giving the - // number of symbols in the compilation unit, and the number of bytes - // that compilation unit's strings take up in the .stabstr section. - // Each CU's strings are separate; the n_strx values are offsets - // within the current CU's portion of the .stabstr section. - // - // As an optimization, the GNU linker combines all the - // compilation units into one, with a single N_UNDF at the - // beginning. However, other linkers, like Gold, do not perform - // this optimization. - string_offset_ = next_cu_string_offset_; - next_cu_string_offset_ = iterator_->value; - ++iterator_; - } -#if defined(HAVE_MACH_O_NLIST_H) - // Export symbols in Mach-O binaries look like this. - // This is necessary in order to be able to dump symbols - // from OS X system libraries. - else if ((iterator_->type & N_STAB) == 0 && - (iterator_->type & N_TYPE) == N_SECT) { - ProcessExtern(); - } -#endif - else { - ++iterator_; - } - } - return true; -} - -bool StabsReader::ProcessCompilationUnit() { - assert(!iterator_->at_end && iterator_->type == N_SO); - - // There may be an N_SO entry whose name ends with a slash, - // indicating the directory in which the compilation occurred. - // The build directory defaults to NULL. - const char *build_directory = NULL; - { - const char *name = SymbolString(); - if (name[0] && name[strlen(name) - 1] == '/') { - build_directory = name; - ++iterator_; - } - } - - // We expect to see an N_SO entry with a filename next, indicating - // the start of the compilation unit. - { - if (iterator_->at_end || iterator_->type != N_SO) - return true; - const char *name = SymbolString(); - if (name[0] == '\0') { - // This seems to be a stray end-of-compilation-unit marker; - // consume it, but don't report the end, since we didn't see a - // beginning. - ++iterator_; - return true; - } - current_source_file_ = name; - } - - if (! handler_->StartCompilationUnit(current_source_file_, - iterator_->value, - build_directory)) - return false; - - ++iterator_; - - // The STABS documentation says that some compilers may emit - // additional N_SO entries with names immediately following the - // first, and that they should be ignored. However, the original - // Breakpad STABS reader doesn't ignore them, so we won't either. - - // Process the body of the compilation unit, up to the next N_SO. - while (!iterator_->at_end && iterator_->type != N_SO) { - if (iterator_->type == N_FUN) { - if (! ProcessFunction()) - return false; - } else if (iterator_->type == N_SLINE) { - // Mac OS X STABS place SLINE records before functions. - Line line; - // The value of an N_SLINE entry that appears outside a function is - // the absolute address of the line. - line.address = iterator_->value; - line.filename = current_source_file_; - // The n_desc of a N_SLINE entry is the line number. It's a - // signed 16-bit field; line numbers from 32768 to 65535 are - // stored as n-65536. - line.number = (uint16_t) iterator_->descriptor; - queued_lines_.push_back(line); - ++iterator_; - } else if (iterator_->type == N_SOL) { - current_source_file_ = SymbolString(); - ++iterator_; - } else { - // Ignore anything else. - ++iterator_; - } - } - - // An N_SO with an empty name indicates the end of the compilation - // unit. Default to zero. - uint64_t ending_address = 0; - if (!iterator_->at_end) { - assert(iterator_->type == N_SO); - const char *name = SymbolString(); - if (name[0] == '\0') { - ending_address = iterator_->value; - ++iterator_; - } - } - - if (! handler_->EndCompilationUnit(ending_address)) - return false; - - queued_lines_.clear(); - - return true; -} - -bool StabsReader::ProcessFunction() { - assert(!iterator_->at_end && iterator_->type == N_FUN); - - uint64_t function_address = iterator_->value; - // The STABS string for an N_FUN entry is the name of the function, - // followed by a colon, followed by type information for the - // function. We want to pass the name alone to StartFunction. - const char *stab_string = SymbolString(); - const char *name_end = strchr(stab_string, ':'); - if (! name_end) - name_end = stab_string + strlen(stab_string); - std::string name(stab_string, name_end - stab_string); - if (! handler_->StartFunction(name, function_address)) - return false; - ++iterator_; - - // If there were any SLINE records given before the function, report them now. - for (vector::const_iterator it = queued_lines_.begin(); - it != queued_lines_.end(); it++) { - if (!handler_->Line(it->address, it->filename, it->number)) - return false; - } - queued_lines_.clear(); - - while (!iterator_->at_end) { - if (iterator_->type == N_SO || iterator_->type == N_FUN) - break; - else if (iterator_->type == N_SLINE) { - // The value of an N_SLINE entry is the offset of the line from - // the function's start address. - uint64_t line_address = function_address + iterator_->value; - // The n_desc of a N_SLINE entry is the line number. It's a - // signed 16-bit field; line numbers from 32768 to 65535 are - // stored as n-65536. - uint16_t line_number = iterator_->descriptor; - if (! handler_->Line(line_address, current_source_file_, line_number)) - return false; - ++iterator_; - } else if (iterator_->type == N_SOL) { - current_source_file_ = SymbolString(); - ++iterator_; - } else - // Ignore anything else. - ++iterator_; - } - - // We've reached the end of the function. See if we can figure out its - // ending address. - uint64_t ending_address = 0; - if (!iterator_->at_end) { - assert(iterator_->type == N_SO || iterator_->type == N_FUN); - if (iterator_->type == N_FUN) { - const char *name = SymbolString(); - if (name[0] == '\0') { - // An N_FUN entry with no name is a terminator for this function; - // its value is the function's size. - ending_address = function_address + iterator_->value; - ++iterator_; - } else { - // An N_FUN entry with a name is the next function, and we can take - // its value as our ending address. Don't advance the iterator, as - // we'll use this symbol to start the next function as well. - ending_address = iterator_->value; - } - } else { - // An N_SO entry could be an end-of-compilation-unit marker, or the - // start of the next compilation unit, but in either case, its value - // is our ending address. We don't advance the iterator; - // ProcessCompilationUnit will decide what to do with this symbol. - ending_address = iterator_->value; - } - } - - if (! handler_->EndFunction(ending_address)) - return false; - - return true; -} - -bool StabsReader::ProcessExtern() { -#if defined(HAVE_MACH_O_NLIST_H) - assert(!iterator_->at_end && - (iterator_->type & N_STAB) == 0 && - (iterator_->type & N_TYPE) == N_SECT); -#endif - - // TODO(mark): only do symbols in the text section? - if (!handler_->Extern(SymbolString(), iterator_->value)) - return false; - - ++iterator_; - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.h deleted file mode 100644 index b22ebfd3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader.h +++ /dev/null @@ -1,325 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// stabs_reader.h: Define StabsReader, a parser for STABS debugging -// information. A description of the STABS debugging format can be -// found at: -// -// http://sourceware.org/gdb/current/onlinedocs/stabs_toc.html -// -// The comments here assume you understand the format. -// -// This parser can handle big-endian and little-endian data, and the symbol -// values may be either 32 or 64 bits long. It handles both STABS in -// sections (as used on Linux) and STABS appearing directly in an -// a.out-like symbol table (as used in Darwin OS X Mach-O files). - -#ifndef COMMON_STABS_READER_H__ -#define COMMON_STABS_READER_H__ - -#include -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef HAVE_A_OUT_H -#include -#endif -#ifdef HAVE_MACH_O_NLIST_H -#include -#endif - -#include -#include - -#include "common/byte_cursor.h" - -namespace google_breakpad { - -class StabsHandler; - -class StabsReader { - public: - // Create a reader for the STABS debug information whose .stab section is - // being traversed by ITERATOR, and whose .stabstr section is referred to - // by STRINGS. The reader will call the member functions of HANDLER to - // report the information it finds, when the reader's 'Process' member - // function is called. - // - // BIG_ENDIAN should be true if the entries in the .stab section are in - // big-endian form, or false if they are in little-endian form. - // - // VALUE_SIZE should be either 4 or 8, indicating the size of the 'value' - // field in each entry in bytes. - // - // UNITIZED should be true if the STABS data is stored in units with - // N_UNDF headers. This is usually the case for STABS stored in sections, - // like .stab/.stabstr, and usually not the case for STABS stored in the - // actual symbol table; UNITIZED should be true when parsing Linux stabs, - // false when parsing Mac OS X STABS. For details, see: - // http://sourceware.org/gdb/current/onlinedocs/stabs/Stab-Section-Basics.html - // - // Note that, in ELF, the .stabstr section should be found using the - // 'sh_link' field of the .stab section header, not by name. - StabsReader(const uint8_t *stab, size_t stab_size, - const uint8_t *stabstr, size_t stabstr_size, - bool big_endian, size_t value_size, bool unitized, - StabsHandler *handler); - - // Process the STABS data, calling the handler's member functions to - // report what we find. While the handler functions return true, - // continue to process until we reach the end of the section. If we - // processed the entire section and all handlers returned true, - // return true. If any handler returned false, return false. - // - // This is only meant to be called once per StabsReader instance; - // resuming a prior processing pass that stopped abruptly isn't supported. - bool Process(); - - private: - - // An class for walking arrays of STABS entries. This isolates the main - // STABS reader from the exact format (size; endianness) of the entries - // themselves. - class EntryIterator { - public: - // The contents of a STABS entry, adjusted for the host's endianness, - // word size, 'struct nlist' layout, and so on. - struct Entry { - // True if this iterator has reached the end of the entry array. When - // this is set, the other members of this structure are not valid. - bool at_end; - - // The number of this entry within the list. - size_t index; - - // The current entry's name offset. This is the offset within the - // current compilation unit's strings, as establish by the N_UNDF entries. - size_t name_offset; - - // The current entry's type, 'other' field, descriptor, and value. - unsigned char type; - unsigned char other; - short descriptor; - uint64_t value; - }; - - // Create a EntryIterator walking the entries in BUFFER. Treat the - // entries as big-endian if BIG_ENDIAN is true, as little-endian - // otherwise. Assume each entry has a 'value' field whose size is - // VALUE_SIZE. - // - // This would not be terribly clean to extend to other format variations, - // but it's enough to handle Linux and Mac, and we'd like STABS to die - // anyway. - // - // For the record: on Linux, STABS entry values are always 32 bits, - // regardless of the architecture address size (don't ask me why); on - // Mac, they are 32 or 64 bits long. Oddly, the section header's entry - // size for a Linux ELF .stab section varies according to the ELF class - // from 12 to 20 even as the actual entries remain unchanged. - EntryIterator(const ByteBuffer *buffer, bool big_endian, size_t value_size); - - // Move to the next entry. This function's behavior is undefined if - // at_end() is true when it is called. - EntryIterator &operator++() { Fetch(); entry_.index++; return *this; } - - // Dereferencing this iterator produces a reference to an Entry structure - // that holds the current entry's values. The entry is owned by this - // EntryIterator, and will be invalidated at the next call to operator++. - const Entry &operator*() const { return entry_; } - const Entry *operator->() const { return &entry_; } - - private: - // Read the STABS entry at cursor_, and set entry_ appropriately. - void Fetch(); - - // The size of entries' value field, in bytes. - size_t value_size_; - - // A byte cursor traversing buffer_. - ByteCursor cursor_; - - // Values for the entry this iterator refers to. - Entry entry_; - }; - - // A source line, saved to be reported later. - struct Line { - uint64_t address; - const char *filename; - int number; - }; - - // Return the name of the current symbol. - const char *SymbolString(); - - // Process a compilation unit starting at symbol_. Return true - // to continue processing, or false to abort. - bool ProcessCompilationUnit(); - - // Process a function in current_source_file_ starting at symbol_. - // Return true to continue processing, or false to abort. - bool ProcessFunction(); - - // Process an exported function symbol. - // Return true to continue processing, or false to abort. - bool ProcessExtern(); - - // The STABS entries being parsed. - ByteBuffer entries_; - - // The string section to which the entries refer. - ByteBuffer strings_; - - // The iterator walking the STABS entries. - EntryIterator iterator_; - - // True if the data is "unitized"; see the explanation in the comment for - // StabsReader::StabsReader. - bool unitized_; - - StabsHandler *handler_; - - // The offset of the current compilation unit's strings within stabstr_. - size_t string_offset_; - - // The value string_offset_ should have for the next compilation unit, - // as established by N_UNDF entries. - size_t next_cu_string_offset_; - - // The current source file name. - const char *current_source_file_; - - // Mac OS X STABS place SLINE records before functions; we accumulate a - // vector of these until we see the FUN record, and then report them - // after the StartFunction call. - std::vector queued_lines_; -}; - -// Consumer-provided callback structure for the STABS reader. Clients -// of the STABS reader provide an instance of this structure. The -// reader then invokes the member functions of that instance to report -// the information it finds. -// -// The default definitions of the member functions do nothing, and return -// true so processing will continue. -class StabsHandler { - public: - StabsHandler() { } - virtual ~StabsHandler() { } - - // Some general notes about the handler callback functions: - - // Processing proceeds until the end of the .stabs section, or until - // one of these functions returns false. - - // The addresses given are as reported in the STABS info, without - // regard for whether the module may be loaded at different - // addresses at different times (a shared library, say). When - // processing STABS from an ELF shared library, the addresses given - // all assume the library is loaded at its nominal load address. - // They are *not* offsets from the nominal load address. If you - // want offsets, you must subtract off the library's nominal load - // address. - - // The arguments to these functions named FILENAME are all - // references to strings stored in the .stabstr section. Because - // both the Linux and Solaris linkers factor out duplicate strings - // from the .stabstr section, the consumer can assume that if two - // FILENAME values are different addresses, they represent different - // file names. - // - // Thus, it's safe to use (say) std::map, which does - // string address comparisons, not string content comparisons. - // Since all the strings are in same array of characters --- the - // .stabstr section --- comparing their addresses produces - // predictable, if not lexicographically meaningful, results. - - // Begin processing a compilation unit whose main source file is - // named FILENAME, and whose base address is ADDRESS. If - // BUILD_DIRECTORY is non-NULL, it is the name of the build - // directory in which the compilation occurred. - virtual bool StartCompilationUnit(const char *filename, uint64_t address, - const char *build_directory) { - return true; - } - - // Finish processing the compilation unit. If ADDRESS is non-zero, - // it is the ending address of the compilation unit. If ADDRESS is - // zero, then the compilation unit's ending address is not - // available, and the consumer must infer it by other means. - virtual bool EndCompilationUnit(uint64_t address) { return true; } - - // Begin processing a function named NAME, whose starting address is - // ADDRESS. This function belongs to the compilation unit that was - // most recently started but not ended. - // - // Note that, unlike filenames, NAME is not a pointer into the - // .stabstr section; this is because the name as it appears in the - // STABS data is followed by type information. The value passed to - // StartFunction is the function name alone. - // - // In languages that use name mangling, like C++, NAME is mangled. - virtual bool StartFunction(const std::string &name, uint64_t address) { - return true; - } - - // Finish processing the function. If ADDRESS is non-zero, it is - // the ending address for the function. If ADDRESS is zero, then - // the function's ending address is not available, and the consumer - // must infer it by other means. - virtual bool EndFunction(uint64_t address) { return true; } - - // Report that the code at ADDRESS is attributable to line NUMBER of - // the source file named FILENAME. The caller must infer the ending - // address of the line. - virtual bool Line(uint64_t address, const char *filename, int number) { - return true; - } - - // Report that an exported function NAME is present at ADDRESS. - // The size of the function is unknown. - virtual bool Extern(const std::string &name, uint64_t address) { - return true; - } - - // Report a warning. FORMAT is a printf-like format string, - // specifying how to format the subsequent arguments. - virtual void Warning(const char *format, ...) = 0; -}; - -} // namespace google_breakpad - -#endif // COMMON_STABS_READER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader_unittest.cc deleted file mode 100644 index 2a9b5d41..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_reader_unittest.cc +++ /dev/null @@ -1,610 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// stabs_reader_unittest.cc: Unit tests for google_breakpad::StabsReader. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/stabs_reader.h" -#include "common/test_assembler.h" - -using ::testing::Eq; -using ::testing::InSequence; -using ::testing::Return; -using ::testing::StrEq; -using ::testing::Test; -using ::testing::_; -using google_breakpad::StabsHandler; -using google_breakpad::StabsReader; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using std::map; -using std::string; - -namespace { - -// A StringAssembler is a class for generating .stabstr sections to present -// as input to the STABS parser. -class StringAssembler: public Section { - public: - StringAssembler() : in_cu_(false) { StartCU(); } - - // Add the string S to this StringAssembler, and return the string's - // offset within this compilation unit's strings. If S has been added - // already, this returns the offset of its first instance. - size_t Add(const string &s) { - map::iterator it = added_.find(s); - if (it != added_.end()) - return it->second; - size_t offset = Size() - cu_start_; - AppendCString(s); - added_[s] = offset; - return offset; - } - - // Start a fresh compilation unit string collection. - void StartCU() { - // Ignore duplicate calls to StartCU. Our test data don't always call - // StartCU at all, meaning that our constructor has to take care of it, - // meaning that tests that *do* call StartCU call it twice at the - // beginning. This is not worth smoothing out. - if (in_cu_) return; - - added_.clear(); - cu_start_ = Size(); - - // Each compilation unit's strings start with an empty string. - AppendCString(""); - added_[""] = 0; - - in_cu_ = true; - } - - // Finish off the current CU's strings. - size_t EndCU() { - assert(in_cu_); - in_cu_ = false; - return Size() - cu_start_; - } - - private: - // The offset of the start of this compilation unit's strings. - size_t cu_start_; - - // True if we're in a CU. - bool in_cu_; - - // A map from the strings that have been added to this section to - // their starting indices within their compilation unit. - map added_; -}; - -// A StabsAssembler is a class for generating .stab sections to present as -// test input for the STABS parser. -class StabsAssembler: public Section { - public: - // Create a StabsAssembler that uses StringAssembler for its strings. - StabsAssembler(StringAssembler *string_assembler) - : Section(string_assembler->endianness()), - string_assembler_(string_assembler), - value_size_(0), - entry_count_(0), - cu_header_(NULL) { } - ~StabsAssembler() { assert(!cu_header_); } - - // Accessor and setter for value_size_. - size_t value_size() const { return value_size_; } - StabsAssembler &set_value_size(size_t value_size) { - value_size_ = value_size; - return *this; - } - - // Append a STAB entry to the end of this section with the given - // characteristics. NAME is the offset of this entry's name string within - // its compilation unit's portion of the .stabstr section; this can be a - // value generated by a StringAssembler. Return a reference to this - // StabsAssembler. - StabsAssembler &Stab(uint8_t type, uint8_t other, Label descriptor, - Label value, Label name) { - D32(name); - D8(type); - D8(other); - D16(descriptor); - Append(endianness(), value_size_, value); - entry_count_++; - return *this; - } - - // As above, but automatically add NAME to our StringAssembler. - StabsAssembler &Stab(uint8_t type, uint8_t other, Label descriptor, - Label value, const string &name) { - return Stab(type, other, descriptor, value, string_assembler_->Add(name)); - } - - // Start a compilation unit named NAME, with an N_UNDF symbol to start - // it, and its own portion of the string section. Return a reference to - // this StabsAssembler. - StabsAssembler &StartCU(const string &name) { - assert(!cu_header_); - cu_header_ = new CUHeader; - string_assembler_->StartCU(); - entry_count_ = 0; - return Stab(N_UNDF, 0, - cu_header_->final_entry_count, - cu_header_->final_string_size, - string_assembler_->Add(name)); - } - - // Close off the current compilation unit. Return a reference to this - // StabsAssembler. - StabsAssembler &EndCU() { - assert(cu_header_); - cu_header_->final_entry_count = entry_count_; - cu_header_->final_string_size = string_assembler_->EndCU(); - delete cu_header_; - cu_header_ = NULL; - return *this; - } - - private: - // Data used in a compilation unit header STAB that we won't know until - // we've finished the compilation unit. - struct CUHeader { - // The final number of entries this compilation unit will hold. - Label final_entry_count; - - // The final size of this compilation unit's strings. - Label final_string_size; - }; - - // The strings for our STABS entries. - StringAssembler *string_assembler_; - - // The size of the 'value' field of stabs entries in this section. - size_t value_size_; - - // The number of entries in this compilation unit so far. - size_t entry_count_; - - // Header labels for this compilation unit, if we've started one but not - // finished it. - CUHeader *cu_header_; -}; - -class MockStabsReaderHandler: public StabsHandler { - public: - MOCK_METHOD3(StartCompilationUnit, - bool(const char *, uint64_t, const char *)); - MOCK_METHOD1(EndCompilationUnit, bool(uint64_t)); - MOCK_METHOD2(StartFunction, bool(const std::string &, uint64_t)); - MOCK_METHOD1(EndFunction, bool(uint64_t)); - MOCK_METHOD3(Line, bool(uint64_t, const char *, int)); - MOCK_METHOD2(Extern, bool(const std::string &, uint64_t)); - void Warning(const char *format, ...) { MockWarning(format); } - MOCK_METHOD1(MockWarning, void(const char *)); -}; - -struct StabsFixture { - StabsFixture() : stabs(&strings), unitized(true) { } - - // Create a StabsReader to parse the mock stabs data in stabs and - // strings, and pass the parsed information to mock_handler. Use the - // endianness and value size of stabs to parse the data. If all goes - // well, return the result of calling the reader's Process member - // function. Otherwise, return false. - bool ApplyHandlerToMockStabsData() { - string stabs_contents, stabstr_contents; - if (!stabs.GetContents(&stabs_contents) || - !strings.GetContents(&stabstr_contents)) - return false; - - // Run the parser on the test input, passing whatever we find to HANDLER. - StabsReader reader( - reinterpret_cast(stabs_contents.data()), - stabs_contents.size(), - reinterpret_cast(stabstr_contents.data()), - stabstr_contents.size(), - stabs.endianness() == kBigEndian, stabs.value_size(), unitized, - &mock_handler); - return reader.Process(); - } - - StringAssembler strings; - StabsAssembler stabs; - bool unitized; - MockStabsReaderHandler mock_handler; -}; - -class Stabs: public StabsFixture, public Test { }; - -TEST_F(Stabs, MockStabsInput) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(4); - stabs - .Stab(N_SO, 149, 40232, 0x18a2a72bU, "builddir/") - .Stab(N_FUN, 83, 50010, 0x91a5353fU, - "not the SO with source file name we expected ") - .Stab(N_SO, 165, 24791, 0xfe69d23cU, "") - .Stab(N_SO, 184, 34178, 0xca4d883aU, "builddir1/") - .Stab(N_SO, 83, 40859, 0xd2fe5df3U, "file1.c") - .Stab(N_LSYM, 147, 39565, 0x60d4bb8aU, "not the FUN we're looking for") - .Stab(N_FUN, 120, 50271, 0xa049f4b1U, "fun1") - .Stab(N_BINCL, 150, 15694, 0xef65c659U, - "something to ignore in a FUN body") - .Stab(N_SLINE, 147, 4967, 0xd904b3f, "") - .Stab(N_SOL, 177, 56135, 0xbd97b1dcU, "header.h") - .Stab(N_SLINE, 130, 24610, 0x90f145b, "") - .Stab(N_FUN, 45, 32441, 0xbf27cf93U, - "fun2:some stabs type info here:to trim from the name") - .Stab(N_SLINE, 138, 39002, 0x8148b87, "") - .Stab(N_SOL, 60, 49318, 0x1d06e025U, "file1.c") - .Stab(N_SLINE, 29, 52163, 0x6eebbb7, "") - .Stab(N_SO, 167, 4647, 0xd04b7448U, "") - .Stab(N_LSYM, 58, 37837, 0xe6b14d37U, "") - .Stab(N_SO, 152, 7810, 0x11759f10U, "file3.c") - .Stab(N_SO, 218, 12447, 0x11cfe4b5U, ""); - - { - InSequence s; - - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("file1.c"), 0xd2fe5df3U, - StrEq("builddir1/"))) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartFunction(StrEq("fun1"), 0xa049f4b1U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0xa049f4b1U + 0xd904b3f, StrEq("file1.c"), 4967)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0xa049f4b1U + 0x90f145b, StrEq("header.h"), 24610)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xbf27cf93U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartFunction(StrEq("fun2"), 0xbf27cf93U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0xbf27cf93U + 0x8148b87, StrEq("header.h"), 39002)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0xbf27cf93U + 0x6eebbb7, StrEq("file1.c"), 52163)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xd04b7448U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0xd04b7448U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartCompilationUnit(StrEq("file3.c"), - 0x11759f10U, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0x11cfe4b5U)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, AbruptCU) { - stabs.set_endianness(kBigEndian); - stabs.set_value_size(4); - stabs.Stab(N_SO, 177, 23446, 0xbf10d5e4, "file2-1.c"); - - { - InSequence s; - - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("file2-1.c"), 0xbf10d5e4, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(NULL)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, AbruptFunction) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(8); - stabs - .Stab(N_SO, 218, 26631, 0xb83ddf10U, "file3-1.c") - .Stab(N_FUN, 113, 24765, 0xbbd4a145U, "fun3_1"); - - { - InSequence s; - - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("file3-1.c"), 0xb83ddf10U, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartFunction(StrEq("fun3_1"), 0xbbd4a145U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(NULL)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, NoCU) { - stabs.set_endianness(kBigEndian); - stabs.set_value_size(8); - stabs.Stab(N_SO, 161, 25673, 0x8f676e7bU, "build-directory/"); - - EXPECT_CALL(mock_handler, StartCompilationUnit(_, _, _)) - .Times(0); - EXPECT_CALL(mock_handler, StartFunction(_, _)) - .Times(0); - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, NoCUEnd) { - stabs.set_endianness(kBigEndian); - stabs.set_value_size(8); - stabs - .Stab(N_SO, 116, 58280, 0x2f7493c9U, "file5-1.c") - .Stab(N_SO, 224, 23057, 0xf9f1d50fU, "file5-2.c"); - - { - InSequence s; - - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("file5-1.c"), 0x2f7493c9U, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("file5-2.c"), 0xf9f1d50fU, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(NULL)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -// On systems that store STABS in sections, string offsets are relative to -// the beginning of that compilation unit's strings, marked with N_UNDF -// symbols; see the comments for StabsReader::StabsReader. -TEST_F(Stabs, Unitized) { - stabs.set_endianness(kBigEndian); - stabs.set_value_size(4); - stabs - .StartCU("antimony") - .Stab(N_SO, 49, 26043, 0x7e259f1aU, "antimony") - .Stab(N_FUN, 101, 63253, 0x7fbcccaeU, "arsenic") - .Stab(N_SO, 124, 37175, 0x80b0014cU, "") - .EndCU() - .StartCU("aluminum") - .Stab(N_SO, 72, 23084, 0x86756839U, "aluminum") - .Stab(N_FUN, 59, 3305, 0xa8e120b0U, "selenium") - .Stab(N_SO, 178, 56949, 0xbffff983U, "") - .EndCU(); - - { - InSequence s; - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("antimony"), 0x7e259f1aU, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartFunction(Eq("arsenic"), 0x7fbcccaeU)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0x80b0014cU)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0x80b0014cU)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("aluminum"), 0x86756839U, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, StartFunction(Eq("selenium"), 0xa8e120b0U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xbffff983U)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0xbffff983U)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -// On systems that store STABS entries in the real symbol table, the N_UNDF -// entries have no special meaning, and shouldn't mess up the string -// indices. -TEST_F(Stabs, NonUnitized) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(4); - unitized = false; - stabs - .Stab(N_UNDF, 21, 11551, 0x9bad2b2e, "") - .Stab(N_UNDF, 21, 11551, 0x9bad2b2e, "") - .Stab(N_SO, 71, 45139, 0x11a97352, "Tanzania") - .Stab(N_SO, 221, 41976, 0x21a97352, ""); - - { - InSequence s; - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("Tanzania"), - 0x11a97352, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0x21a97352)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, FunctionEnd) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(8); - stabs - .Stab(N_SO, 102, 62362, 0x52a830d644cd6942ULL, "compilation unit") - // This function is terminated by the start of the next function. - .Stab(N_FUN, 216, 38405, 0xbb5ab70ecdd23bfeULL, "function 1") - // This function is terminated by an explicit end-of-function stab, - // whose value is a size in bytes. - .Stab(N_FUN, 240, 10973, 0xc954de9b8fb3e5e2ULL, "function 2") - .Stab(N_FUN, 14, 36749, 0xc1ab, "") - // This function is terminated by the end of the compilation unit. - .Stab(N_FUN, 143, 64514, 0xdff98c9a35386e1fULL, "function 3") - .Stab(N_SO, 164, 60142, 0xfdacb856e78bbf57ULL, ""); - - { - InSequence s; - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("compilation unit"), - 0x52a830d644cd6942ULL, NULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartFunction(Eq("function 1"), 0xbb5ab70ecdd23bfeULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xc954de9b8fb3e5e2ULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartFunction(Eq("function 2"), 0xc954de9b8fb3e5e2ULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xc954de9b8fb3e5e2ULL + 0xc1ab)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartFunction(Eq("function 3"), 0xdff98c9a35386e1fULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xfdacb856e78bbf57ULL)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0xfdacb856e78bbf57ULL)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -// On Mac OS X, SLINE records can appear before the FUN stab to which they -// belong, and their values are absolute addresses, not offsets. -TEST_F(Stabs, LeadingLine) { - stabs.set_endianness(kBigEndian); - stabs.set_value_size(4); - stabs - .Stab(N_SO, 179, 27357, 0x8adabc15, "build directory/") - .Stab(N_SO, 52, 53058, 0x4c7e3bf4, "compilation unit") - .Stab(N_SOL, 165, 12086, 0x6a797ca3, "source file name") - .Stab(N_SLINE, 229, 20015, 0x4cb3d7e0, "") - .Stab(N_SLINE, 89, 43802, 0x4cba8b88, "") - .Stab(N_FUN, 251, 51639, 0xce1b98fa, "rutabaga") - .Stab(N_FUN, 218, 16113, 0x5798, "") - .Stab(N_SO, 52, 53058, 0xd4af4415, ""); - - { - InSequence s; - EXPECT_CALL(mock_handler, - StartCompilationUnit(StrEq("compilation unit"), - 0x4c7e3bf4, StrEq("build directory/"))) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - StartFunction(Eq("rutabaga"), 0xce1b98fa)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0x4cb3d7e0, StrEq("source file name"), 20015)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Line(0x4cba8b88, StrEq("source file name"), 43802)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndFunction(0xce1b98fa + 0x5798)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, EndCompilationUnit(0xd4af4415)) - .WillOnce(Return(true)); - } - - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - - -#if defined(HAVE_MACH_O_NLIST_H) -// These tests have no meaning on non-Mach-O-based systems, as -// only Mach-O uses N_SECT to represent public symbols. -TEST_F(Stabs, OnePublicSymbol) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(4); - - const u_int32_t kExpectedAddress = 0x9000; - const string kExpectedFunctionName("public_function"); - stabs - .Stab(N_SECT, 1, 0, kExpectedAddress, kExpectedFunctionName); - - { - InSequence s; - EXPECT_CALL(mock_handler, - Extern(StrEq(kExpectedFunctionName), - kExpectedAddress)) - .WillOnce(Return(true)); - } - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -TEST_F(Stabs, TwoPublicSymbols) { - stabs.set_endianness(kLittleEndian); - stabs.set_value_size(4); - - const u_int32_t kExpectedAddress1 = 0xB0B0B0B0; - const string kExpectedFunctionName1("public_function"); - const u_int32_t kExpectedAddress2 = 0xF0F0F0F0; - const string kExpectedFunctionName2("something else"); - stabs - .Stab(N_SECT, 1, 0, kExpectedAddress1, kExpectedFunctionName1) - .Stab(N_SECT, 1, 0, kExpectedAddress2, kExpectedFunctionName2); - - { - InSequence s; - EXPECT_CALL(mock_handler, - Extern(StrEq(kExpectedFunctionName1), - kExpectedAddress1)) - .WillOnce(Return(true)); - EXPECT_CALL(mock_handler, - Extern(StrEq(kExpectedFunctionName2), - kExpectedAddress2)) - .WillOnce(Return(true)); - } - ASSERT_TRUE(ApplyHandlerToMockStabsData()); -} - -#endif - -} // anonymous namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.cc deleted file mode 100644 index e694febc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs.cc --- implement the StabsToModule class. - -#include -#include -#include - -#include - -#include "common/stabs_to_module.h" - -namespace google_breakpad { - -using std::string; - -// Demangle using abi call. -// Older GCC may not support it. -static string Demangle(const string &mangled) { - int status = 0; - char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status); - if (status == 0 && demangled != NULL) { - string str(demangled); - free(demangled); - return str; - } - return string(mangled); -} - -StabsToModule::~StabsToModule() { - // Free any functions we've accumulated but not added to the module. - for (vector::const_iterator func_it = functions_.begin(); - func_it != functions_.end(); func_it++) - delete *func_it; - // Free any function that we're currently within. - delete current_function_; -} - -bool StabsToModule::StartCompilationUnit(const char *name, uint64_t address, - const char *build_directory) { - assert(!in_compilation_unit_); - in_compilation_unit_ = true; - current_source_file_name_ = name; - current_source_file_ = module_->FindFile(name); - comp_unit_base_address_ = address; - boundaries_.push_back(static_cast(address)); - return true; -} - -bool StabsToModule::EndCompilationUnit(uint64_t address) { - assert(in_compilation_unit_); - in_compilation_unit_ = false; - comp_unit_base_address_ = 0; - current_source_file_ = NULL; - current_source_file_name_ = NULL; - if (address) - boundaries_.push_back(static_cast(address)); - return true; -} - -bool StabsToModule::StartFunction(const string &name, - uint64_t address) { - assert(!current_function_); - Module::Function *f = new Module::Function; - f->name = Demangle(name); - f->address = address; - f->size = 0; // We compute this in StabsToModule::Finalize(). - f->parameter_size = 0; // We don't provide this information. - current_function_ = f; - boundaries_.push_back(static_cast(address)); - return true; -} - -bool StabsToModule::EndFunction(uint64_t address) { - assert(current_function_); - // Functions in this compilation unit should have address bigger - // than the compilation unit's starting address. There may be a lot - // of duplicated entries for functions in the STABS data. We will - // count on the Module to remove the duplicates. - if (current_function_->address >= comp_unit_base_address_) - functions_.push_back(current_function_); - else - delete current_function_; - current_function_ = NULL; - if (address) - boundaries_.push_back(static_cast(address)); - return true; -} - -bool StabsToModule::Line(uint64_t address, const char *name, int number) { - assert(current_function_); - assert(current_source_file_); - if (name != current_source_file_name_) { - current_source_file_ = module_->FindFile(name); - current_source_file_name_ = name; - } - Module::Line line; - line.address = address; - line.size = 0; // We compute this in StabsToModule::Finalize(). - line.file = current_source_file_; - line.number = number; - current_function_->lines.push_back(line); - return true; -} - -bool StabsToModule::Extern(const string &name, uint64_t address) { - Module::Extern *ext = new Module::Extern; - // Older libstdc++ demangle implementations can crash on unexpected - // input, so be careful about what gets passed in. - if (name.compare(0, 3, "__Z") == 0) { - ext->name = Demangle(name.substr(1)); - } else if (name[0] == '_') { - ext->name = name.substr(1); - } else { - ext->name = name; - } - ext->address = address; - module_->AddExtern(ext); - return true; -} - -void StabsToModule::Warning(const char *format, ...) { - va_list args; - va_start(args, format); - vfprintf(stderr, format, args); - va_end(args); -} - -void StabsToModule::Finalize() { - // Sort our boundary list, so we can search it quickly. - sort(boundaries_.begin(), boundaries_.end()); - // Sort all functions by address, just for neatness. - sort(functions_.begin(), functions_.end(), - Module::Function::CompareByAddress); - - for (vector::const_iterator func_it = functions_.begin(); - func_it != functions_.end(); - func_it++) { - Module::Function *f = *func_it; - // Compute the function f's size. - vector::const_iterator boundary - = std::upper_bound(boundaries_.begin(), boundaries_.end(), f->address); - if (boundary != boundaries_.end()) - f->size = *boundary - f->address; - else - // If this is the last function in the module, and the STABS - // reader was unable to give us its ending address, then assign - // it a bogus, very large value. This will happen at most once - // per module: since we've added all functions' addresses to the - // boundary table, only one can be the last. - f->size = kFallbackSize; - - // Compute sizes for each of the function f's lines --- if it has any. - if (!f->lines.empty()) { - stable_sort(f->lines.begin(), f->lines.end(), - Module::Line::CompareByAddress); - vector::iterator last_line = f->lines.end() - 1; - for (vector::iterator line_it = f->lines.begin(); - line_it != last_line; line_it++) - line_it[0].size = line_it[1].address - line_it[0].address; - // Compute the size of the last line from f's end address. - last_line->size = (f->address + f->size) - last_line->address; - } - } - // Now that everything has a size, add our functions to the module, and - // dispose of our private list. - module_->AddFunctions(functions_.begin(), functions_.end()); - functions_.clear(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.h deleted file mode 100644 index 632f4d00..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module.h +++ /dev/null @@ -1,143 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs.h: Define the StabsToModule class, which receives -// STABS debugging information from a parser and adds it to a Breakpad -// symbol file. - -#ifndef BREAKPAD_COMMON_STABS_TO_MODULE_H_ -#define BREAKPAD_COMMON_STABS_TO_MODULE_H_ - -#include - -#include -#include - -#include "common/module.h" -#include "common/stabs_reader.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -// A StabsToModule is a handler that receives parsed STABS debugging -// information from a StabsReader, and uses that to populate -// a Module. (All classes are in the google_breakpad namespace.) A -// Module represents the contents of a Breakpad symbol file, and knows -// how to write itself out as such. A StabsToModule thus acts as -// the bridge between STABS and Breakpad data. -// When processing Darwin Mach-O files, this also receives public linker -// symbols, like those found in system libraries. -class StabsToModule: public google_breakpad::StabsHandler { - public: - // Receive parsed debugging information from a StabsReader, and - // store it all in MODULE. - StabsToModule(Module *module) : - module_(module), - in_compilation_unit_(false), - comp_unit_base_address_(0), - current_function_(NULL), - current_source_file_(NULL), - current_source_file_name_(NULL) { } - ~StabsToModule(); - - // The standard StabsHandler virtual member functions. - bool StartCompilationUnit(const char *name, uint64_t address, - const char *build_directory); - bool EndCompilationUnit(uint64_t address); - bool StartFunction(const string &name, uint64_t address); - bool EndFunction(uint64_t address); - bool Line(uint64_t address, const char *name, int number); - bool Extern(const string &name, uint64_t address); - void Warning(const char *format, ...); - - // Do any final processing necessary to make module_ contain all the - // data provided by the STABS reader. - // - // Because STABS does not provide reliable size information for - // functions and lines, we need to make a pass over the data after - // processing all the STABS to compute those sizes. We take care of - // that here. - void Finalize(); - - private: - - // An arbitrary, but very large, size to use for functions whose - // size we can't compute properly. - static const uint64_t kFallbackSize = 0x10000000; - - // The module we're contributing debugging info to. - Module *module_; - - // The functions we've generated so far. We don't add these to - // module_ as we parse them. Instead, we wait until we've computed - // their ending address, and their lines' ending addresses. - // - // We could just stick them in module_ from the outset, but if - // module_ already contains data gathered from other debugging - // formats, that would complicate the size computation. - vector functions_; - - // Boundary addresses. STABS doesn't necessarily supply sizes for - // functions and lines, so we need to compute them ourselves by - // finding the next object. - vector boundaries_; - - // True if we are currently within a compilation unit: we have gotten a - // StartCompilationUnit call, but no matching EndCompilationUnit call - // yet. We use this for sanity checks. - bool in_compilation_unit_; - - // The base address of the current compilation unit. We use this to - // recognize functions we should omit from the symbol file. (If you - // know the details of why we omit these, please patch this - // comment.) - Module::Address comp_unit_base_address_; - - // The function we're currently contributing lines to. - Module::Function *current_function_; - - // The last Module::File we got a line number in. - Module::File *current_source_file_; - - // The pointer in the .stabstr section of the name that - // current_source_file_ is built from. This allows us to quickly - // recognize when the current line is in the same file as the - // previous one (which it usually is). - const char *current_source_file_name_; -}; - -} // namespace google_breakpad - -#endif // BREAKPAD_COMMON_STABS_TO_MODULE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module_unittest.cc deleted file mode 100644 index d445d1d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/stabs_to_module_unittest.cc +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// dump_stabs_unittest.cc: Unit tests for StabsToModule. - -#include - -#include "breakpad_googletest_includes.h" -#include "common/stabs_to_module.h" - -using google_breakpad::Module; -using google_breakpad::StabsToModule; -using std::vector; - -TEST(StabsToModule, SimpleCU) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // Feed in a simple compilation unit that defines a function with - // one line. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0x9f4d1271e50db93bLL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0xfde4abbed390c394LL)); - EXPECT_TRUE(h.Line(0xfde4abbed390c394LL, "source-file-name", 174823314)); - EXPECT_TRUE(h.EndFunction(0xfde4abbed390c3a4LL)); - EXPECT_TRUE(h.EndCompilationUnit(0xfee4abbed390c3a4LL)); - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file = m.FindExistingFile("source-file-name"); - ASSERT_TRUE(file != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ((size_t) 1, functions.size()); - Module::Function *function = functions[0]; - EXPECT_STREQ("function", function->name.c_str()); - EXPECT_EQ(0xfde4abbed390c394LL, function->address); - EXPECT_EQ(0x10U, function->size); - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ((size_t) 1, function->lines.size()); - Module::Line *line = &function->lines[0]; - EXPECT_EQ(0xfde4abbed390c394LL, line->address); - EXPECT_EQ(0x10U, line->size); // derived from EndFunction - EXPECT_TRUE(line->file == file); - EXPECT_EQ(174823314, line->number); -} - -#ifdef __GNUC__ -// Function name mangling can vary by compiler, so only run mangled-name -// tests on GCC for simplicity's sake. -TEST(StabsToModule, Externs) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // Feed in a few Extern symbols. - EXPECT_TRUE(h.Extern("_foo", 0xffff)); - EXPECT_TRUE(h.Extern("__Z21dyldGlobalLockAcquirev", 0xaaaa)); - EXPECT_TRUE(h.Extern("_MorphTableGetNextMorphChain", 0x1111)); - h.Finalize(); - - // Now check to see what has been added to the Module. - vector externs; - m.GetExterns(&externs, externs.end()); - ASSERT_EQ((size_t) 3, externs.size()); - Module::Extern *extern1 = externs[0]; - EXPECT_STREQ("MorphTableGetNextMorphChain", extern1->name.c_str()); - EXPECT_EQ((Module::Address)0x1111, extern1->address); - Module::Extern *extern2 = externs[1]; - EXPECT_STREQ("dyldGlobalLockAcquire()", extern2->name.c_str()); - EXPECT_EQ((Module::Address)0xaaaa, extern2->address); - Module::Extern *extern3 = externs[2]; - EXPECT_STREQ("foo", extern3->name.c_str()); - EXPECT_EQ((Module::Address)0xffff, extern3->address); -} -#endif // __GNUC__ - -TEST(StabsToModule, DuplicateFunctionNames) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // Compilation unit with one function, mangled name. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xf2cfda36ecf7f46cLL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("funcfoo", - 0xf2cfda36ecf7f46dLL)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.StartFunction("funcfoo", - 0xf2cfda36ecf7f46dLL)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.EndCompilationUnit(0)); - - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file = m.FindExistingFile("compilation-unit"); - ASSERT_TRUE(file != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ(1U, functions.size()); - - Module::Function *function = functions[0]; - EXPECT_EQ(0xf2cfda36ecf7f46dLL, function->address); - EXPECT_LT(0U, function->size); // should have used dummy size - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ(0U, function->lines.size()); -} - -TEST(InferSizes, LineSize) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // Feed in a simple compilation unit that defines a function with - // one line. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xb4513962eff94e92LL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0xb4513962eff94e92LL)); - EXPECT_TRUE(h.Line(0xb4513962eff94e92LL, "source-file-name-1", 77396614)); - EXPECT_TRUE(h.Line(0xb4513963eff94e92LL, "source-file-name-2", 87660088)); - EXPECT_TRUE(h.EndFunction(0)); // unknown function end address - EXPECT_TRUE(h.EndCompilationUnit(0)); // unknown CU end address - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit-2", 0xb4523963eff94e92LL, - "build-directory-2")); // next boundary - EXPECT_TRUE(h.EndCompilationUnit(0)); - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file1 = m.FindExistingFile("source-file-name-1"); - ASSERT_TRUE(file1 != NULL); - Module::File *file2 = m.FindExistingFile("source-file-name-2"); - ASSERT_TRUE(file2 != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ((size_t) 1, functions.size()); - - Module::Function *function = functions[0]; - EXPECT_STREQ("function", function->name.c_str()); - EXPECT_EQ(0xb4513962eff94e92LL, function->address); - EXPECT_EQ(0x1000100000000ULL, function->size); // inferred from CU end - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ((size_t) 2, function->lines.size()); - - Module::Line *line1 = &function->lines[0]; - EXPECT_EQ(0xb4513962eff94e92LL, line1->address); - EXPECT_EQ(0x100000000ULL, line1->size); // derived from EndFunction - EXPECT_TRUE(line1->file == file1); - EXPECT_EQ(77396614, line1->number); - - Module::Line *line2 = &function->lines[1]; - EXPECT_EQ(0xb4513963eff94e92LL, line2->address); - EXPECT_EQ(0x1000000000000ULL, line2->size); // derived from EndFunction - EXPECT_TRUE(line2->file == file2); - EXPECT_EQ(87660088, line2->number); -} - -#ifdef __GNUC__ -// Function name mangling can vary by compiler, so only run mangled-name -// tests on GCC for simplicity's sake. -TEST(FunctionNames, Mangled) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // Compilation unit with one function, mangled name. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0xf2cfda63cef7f46cLL, - "build-directory")); - EXPECT_TRUE(h.StartFunction("_ZNSt6vectorIySaIyEE9push_backERKy", - 0xf2cfda63cef7f46dLL)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.EndCompilationUnit(0)); - - h.Finalize(); - - // Now check to see what has been added to the Module. - Module::File *file = m.FindExistingFile("compilation-unit"); - ASSERT_TRUE(file != NULL); - - vector functions; - m.GetFunctions(&functions, functions.end()); - ASSERT_EQ(1U, functions.size()); - - Module::Function *function = functions[0]; - // This is GCC-specific, but we shouldn't be seeing STABS data anywhere - // but Linux. - EXPECT_STREQ("std::vector >::" - "push_back(unsigned long long const&)", - function->name.c_str()); - EXPECT_EQ(0xf2cfda63cef7f46dLL, function->address); - EXPECT_LT(0U, function->size); // should have used dummy size - EXPECT_EQ(0U, function->parameter_size); - ASSERT_EQ(0U, function->lines.size()); -} -#endif // __GNUC__ - -// The GNU toolchain can omit functions that are not used; however, -// when it does so, it doesn't clean up the debugging information that -// refers to them. In STABS, this results in compilation units whose -// SO addresses are zero. -TEST(Omitted, Function) { - Module m("name", "os", "arch", "id"); - StabsToModule h(&m); - - // The StartCompilationUnit and EndCompilationUnit calls may both have an - // address of zero if the compilation unit has had sections removed. - EXPECT_TRUE(h.StartCompilationUnit("compilation-unit", 0, "build-directory")); - EXPECT_TRUE(h.StartFunction("function", 0x2a133596)); - EXPECT_TRUE(h.EndFunction(0)); - EXPECT_TRUE(h.EndCompilationUnit(0)); -} - -// TODO --- if we actually cared about STABS. Even without these we've -// got full coverage of non-failure source lines in dump_stabs.cc. - -// Line size from next line -// Line size from function end -// Line size from next function start -// line size from cu end -// line size from next cu start -// fallback size is something plausible - -// function size from function end -// function size from next function start -// function size from cu end -// function size from next cu start -// fallback size is something plausible - -// omitting functions outside the compilation unit's address range -// zero-line, one-line, many-line functions diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.cc deleted file mode 100644 index 5af12f5a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.cc +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/convert_UTF.h" -#include "processor/scoped_ptr.h" -#include "common/string_conversion.h" -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -void UTF8ToUTF16(const char *in, vector *out) { - size_t source_length = strlen(in); - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->empty(); - out->insert(out->begin(), source_length, 0); - u_int16_t *target_ptr = &(*out)[0]; - u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]) { - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + sizeof(char); - u_int16_t *target_ptr = out; - u_int16_t *target_end_ptr = target_ptr + 2 * sizeof(u_int16_t); - out[0] = out[1] = 0; - - // Process one character at a time - while (1) { - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) - return static_cast(source_ptr - reinterpret_cast(in)); - - // Add another character to the input stream and try again - source_ptr = reinterpret_cast(in); - ++source_end_ptr; - - if (source_end_ptr > reinterpret_cast(in) + in_length) - break; - } - - return 0; -} - -void UTF32ToUTF16(const wchar_t *in, vector *out) { - size_t source_length = wcslen(in); - const UTF32 *source_ptr = reinterpret_cast(in); - const UTF32 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->empty(); - out->insert(out->begin(), source_length, 0); - u_int16_t *target_ptr = &(*out)[0]; - u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]) { - const UTF32 *source_ptr = reinterpret_cast(&in); - const UTF32 *source_end_ptr = source_ptr + 1; - u_int16_t *target_ptr = out; - u_int16_t *target_end_ptr = target_ptr + 2 * sizeof(u_int16_t); - out[0] = out[1] = 0; - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result != conversionOK) { - out[0] = out[1] = 0; - } -} - -static inline u_int16_t Swap(u_int16_t value) { - return (value >> 8) | (value << 8); -} - -string UTF16ToUTF8(const vector &in, bool swap) { - const UTF16 *source_ptr = &in[0]; - scoped_ptr source_buffer; - - // If we're to swap, we need to make a local copy and swap each byte pair - if (swap) { - int idx = 0; - source_buffer.reset(new u_int16_t[in.size()]); - UTF16 *source_buffer_ptr = source_buffer.get(); - for (vector::const_iterator it = in.begin(); - it != in.end(); ++it, ++idx) - source_buffer_ptr[idx] = Swap(*it); - - source_ptr = source_buffer.get(); - } - - // The maximum expansion would be 4x the size of the input string. - const UTF16 *source_end_ptr = source_ptr + in.size(); - size_t target_capacity = in.size() * 4; - scoped_array target_buffer(new UTF8[target_capacity]); - UTF8 *target_ptr = target_buffer.get(); - UTF8 *target_end_ptr = target_ptr + target_capacity; - ConversionResult result = ConvertUTF16toUTF8(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) { - const char *targetPtr = reinterpret_cast(target_buffer.get()); - return targetPtr; - } - - return ""; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.h deleted file mode 100644 index d51f46bb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/string_conversion.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_conversion.h: Conversion between different UTF-8/16/32 encodings. - -#ifndef COMMON_STRING_CONVERSION_H__ -#define COMMON_STRING_CONVERSION_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::vector; - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF8ToUTF16(const char *in, vector *out); - -// Convert at least one character (up to a maximum of |in_length|) from |in| -// to UTF-16 into |out|. Return the number of characters consumed from |in|. -// Any unused characters in |out| will be initialized to 0. No memory will -// be allocated by this routine. -int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]); - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF32ToUTF16(const wchar_t *in, vector *out); - -// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be -// initialized to 0. No memory will be allocated by this routine. -void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]); - -// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. -std::string UTF16ToUTF8(const vector &in, bool swap); - -} // namespace google_breakpad - -#endif // COMMON_STRING_CONVERSION_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.cc deleted file mode 100644 index 7f5dd384..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.cc +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// test_assembler.cc: Implementation of google_breakpad::TestAssembler. -// See test_assembler.h for details. - -#include "common/test_assembler.h" - -#include -#include - -#include - -namespace google_breakpad { -namespace test_assembler { - -using std::back_insert_iterator; - -Label::Label() : value_(new Binding()) { } -Label::Label(u_int64_t value) : value_(new Binding(value)) { } -Label::Label(const Label &label) { - value_ = label.value_; - value_->Acquire(); -} -Label::~Label() { - if (value_->Release()) delete value_; -} - -Label &Label::operator=(u_int64_t value) { - value_->Set(NULL, value); - return *this; -} - -Label &Label::operator=(const Label &label) { - value_->Set(label.value_, 0); - return *this; -} - -Label Label::operator+(u_int64_t addend) const { - Label l; - l.value_->Set(this->value_, addend); - return l; -} - -Label Label::operator-(u_int64_t subtrahend) const { - Label l; - l.value_->Set(this->value_, -subtrahend); - return l; -} - -// When NDEBUG is #defined, assert doesn't evaluate its argument. This -// means you can't simply use assert to check the return value of a -// function with necessary side effects. -// -// ALWAYS_EVALUATE_AND_ASSERT(x) evaluates x regardless of whether -// NDEBUG is #defined; when NDEBUG is not #defined, it further asserts -// that x is true. -#ifdef NDEBUG -#define ALWAYS_EVALUATE_AND_ASSERT(x) x -#else -#define ALWAYS_EVALUATE_AND_ASSERT(x) assert(x) -#endif - -u_int64_t Label::operator-(const Label &label) const { - u_int64_t offset; - ALWAYS_EVALUATE_AND_ASSERT(IsKnownOffsetFrom(label, &offset)); - return offset; -} - -u_int64_t Label::Value() const { - u_int64_t v = 0; - ALWAYS_EVALUATE_AND_ASSERT(IsKnownConstant(&v)); - return v; -}; - -bool Label::IsKnownConstant(u_int64_t *value_p) const { - Binding *base; - u_int64_t addend; - value_->Get(&base, &addend); - if (base != NULL) return false; - if (value_p) *value_p = addend; - return true; -} - -bool Label::IsKnownOffsetFrom(const Label &label, u_int64_t *offset_p) const -{ - Binding *label_base, *this_base; - u_int64_t label_addend, this_addend; - label.value_->Get(&label_base, &label_addend); - value_->Get(&this_base, &this_addend); - // If this and label are related, Get will find their final - // common ancestor, regardless of how indirect the relation is. This - // comparison also handles the constant vs. constant case. - if (this_base != label_base) return false; - if (offset_p) *offset_p = this_addend - label_addend; - return true; -} - -Label::Binding::Binding() : base_(this), addend_(), reference_count_(1) { } - -Label::Binding::Binding(u_int64_t addend) - : base_(NULL), addend_(addend), reference_count_(1) { } - -Label::Binding::~Binding() { - assert(reference_count_ == 0); - if (base_ && base_ != this && base_->Release()) - delete base_; -} - -void Label::Binding::Set(Binding *binding, u_int64_t addend) { - if (!base_ && !binding) { - // We're equating two constants. This could be okay. - assert(addend_ == addend); - } else if (!base_) { - // We are a known constant, but BINDING may not be, so turn the - // tables and try to set BINDING's value instead. - binding->Set(NULL, addend_ - addend); - } else { - if (binding) { - // Find binding's final value. Since the final value is always either - // completely unconstrained or a constant, never a reference to - // another variable (otherwise, it wouldn't be final), this - // guarantees we won't create cycles here, even for code like this: - // l = m, m = n, n = l; - u_int64_t binding_addend; - binding->Get(&binding, &binding_addend); - addend += binding_addend; - } - - // It seems likely that setting a binding to itself is a bug - // (although I can imagine this might turn out to be helpful to - // permit). - assert(binding != this); - - if (base_ != this) { - // Set the other bindings on our chain as well. Note that this - // is sufficient even though binding relationships form trees: - // All binding operations traverse their chains to the end, and - // all bindings related to us share some tail of our chain, so - // they will see the changes we make here. - base_->Set(binding, addend - addend_); - // We're not going to use base_ any more. - if (base_->Release()) delete base_; - } - - // Adopt BINDING as our base. Note that it should be correct to - // acquire here, after the release above, even though the usual - // reference-counting rules call for acquiring first, and then - // releasing: the self-reference assertion above should have - // complained if BINDING were 'this' or anywhere along our chain, - // so we didn't release BINDING. - if (binding) binding->Acquire(); - base_ = binding; - addend_ = addend; - } -} - -void Label::Binding::Get(Binding **base, u_int64_t *addend) { - if (base_ && base_ != this) { - // Recurse to find the end of our reference chain (the root of our - // tree), and then rewrite every binding along the chain to refer - // to it directly, adjusting addends appropriately. (This is why - // this member function isn't this-const.) - Binding *final_base; - u_int64_t final_addend; - base_->Get(&final_base, &final_addend); - if (final_base) final_base->Acquire(); - if (base_->Release()) delete base_; - base_ = final_base; - addend_ += final_addend; - } - *base = base_; - *addend = addend_; -} - -template -static inline void InsertEndian(test_assembler::Endianness endianness, - size_t size, u_int64_t number, Inserter dest) { - assert(size > 0); - if (endianness == kLittleEndian) { - for (size_t i = 0; i < size; i++) { - *dest++ = (char) (number & 0xff); - number >>= 8; - } - } else { - assert(endianness == kBigEndian); - // The loop condition is odd, but it's correct for size_t. - for (size_t i = size - 1; i < size; i--) - *dest++ = (char) ((number >> (i * 8)) & 0xff); - } -} - -Section &Section::Append(Endianness endianness, size_t size, u_int64_t number) { - InsertEndian(endianness, size, number, - back_insert_iterator(contents_)); - return *this; -} - -Section &Section::Append(Endianness endianness, size_t size, - const Label &label) { - // If this label's value is known, there's no reason to waste an - // entry in references_ on it. - u_int64_t value; - if (label.IsKnownConstant(&value)) - return Append(endianness, size, value); - - // This will get caught when the references are resolved, but it's - // nicer to find out earlier. - assert(endianness != kUnsetEndian); - - references_.push_back(Reference(contents_.size(), endianness, size, label)); - contents_.append(size, 0); - return *this; -} - -#define ENDIANNESS_L kLittleEndian -#define ENDIANNESS_B kBigEndian -#define ENDIANNESS(e) ENDIANNESS_ ## e - -#define DEFINE_SHORT_APPEND_NUMBER_ENDIAN(e, bits) \ - Section &Section::e ## bits(u_int ## bits ## _t v) { \ - InsertEndian(ENDIANNESS(e), bits / 8, v, \ - back_insert_iterator(contents_)); \ - return *this; \ - } - -#define DEFINE_SHORT_APPEND_LABEL_ENDIAN(e, bits) \ - Section &Section::e ## bits(const Label &v) { \ - return Append(ENDIANNESS(e), bits / 8, v); \ - } - -// Define L16, B32, and friends. -#define DEFINE_SHORT_APPEND_ENDIAN(e, bits) \ - DEFINE_SHORT_APPEND_NUMBER_ENDIAN(e, bits) \ - DEFINE_SHORT_APPEND_LABEL_ENDIAN(e, bits) - -DEFINE_SHORT_APPEND_LABEL_ENDIAN(L, 8); -DEFINE_SHORT_APPEND_LABEL_ENDIAN(B, 8); -DEFINE_SHORT_APPEND_ENDIAN(L, 16); -DEFINE_SHORT_APPEND_ENDIAN(L, 32); -DEFINE_SHORT_APPEND_ENDIAN(L, 64); -DEFINE_SHORT_APPEND_ENDIAN(B, 16); -DEFINE_SHORT_APPEND_ENDIAN(B, 32); -DEFINE_SHORT_APPEND_ENDIAN(B, 64); - -#define DEFINE_SHORT_APPEND_NUMBER_DEFAULT(bits) \ - Section &Section::D ## bits(u_int ## bits ## _t v) { \ - InsertEndian(endianness_, bits / 8, v, \ - back_insert_iterator(contents_)); \ - return *this; \ - } -#define DEFINE_SHORT_APPEND_LABEL_DEFAULT(bits) \ - Section &Section::D ## bits(const Label &v) { \ - return Append(endianness_, bits / 8, v); \ - } -#define DEFINE_SHORT_APPEND_DEFAULT(bits) \ - DEFINE_SHORT_APPEND_NUMBER_DEFAULT(bits) \ - DEFINE_SHORT_APPEND_LABEL_DEFAULT(bits) - -DEFINE_SHORT_APPEND_LABEL_DEFAULT(8) -DEFINE_SHORT_APPEND_DEFAULT(16); -DEFINE_SHORT_APPEND_DEFAULT(32); -DEFINE_SHORT_APPEND_DEFAULT(64); - -Section &Section::Append(const Section §ion) { - size_t base = contents_.size(); - contents_.append(section.contents_); - for (vector::const_iterator it = section.references_.begin(); - it != section.references_.end(); it++) - references_.push_back(Reference(base + it->offset, it->endianness, - it->size, it->label)); - return *this; -} - -Section &Section::LEB128(long long value) { - while (value < -0x40 || 0x3f < value) { - contents_ += (value & 0x7f) | 0x80; - if (value < 0) - value = (value >> 7) | ~(((unsigned long long) -1) >> 7); - else - value = (value >> 7); - } - contents_ += value & 0x7f; - return *this; -} - -Section &Section::ULEB128(u_int64_t value) { - while (value > 0x7f) { - contents_ += (value & 0x7f) | 0x80; - value = (value >> 7); - } - contents_ += value; - return *this; -} - -Section &Section::Align(size_t alignment, u_int8_t pad_byte) { - // ALIGNMENT must be a power of two. - assert(((alignment - 1) & alignment) == 0); - size_t new_size = (contents_.size() + alignment - 1) & ~(alignment - 1); - contents_.append(new_size - contents_.size(), pad_byte); - assert((contents_.size() & (alignment - 1)) == 0); - return *this; -} - -void Section::Clear() { - contents_.clear(); - references_.clear(); -} - -bool Section::GetContents(string *contents) { - // For each label reference, find the label's value, and patch it into - // the section's contents. - for (size_t i = 0; i < references_.size(); i++) { - Reference &r = references_[i]; - u_int64_t value; - if (!r.label.IsKnownConstant(&value)) { - fprintf(stderr, "Undefined label #%zu at offset 0x%zx\n", i, r.offset); - return false; - } - assert(r.offset < contents_.size()); - assert(contents_.size() - r.offset >= r.size); - InsertEndian(r.endianness, r.size, value, contents_.begin() + r.offset); - } - contents->clear(); - std::swap(contents_, *contents); - references_.clear(); - return true; -} - -} // namespace test_assembler -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.h deleted file mode 100644 index 5ce6b0c8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler.h +++ /dev/null @@ -1,481 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// test-assembler.h: interface to class for building complex binary streams. - -// To test the Breakpad symbol dumper and processor thoroughly, for -// all combinations of host system and minidump processor -// architecture, we need to be able to easily generate complex test -// data like debugging information and minidump files. -// -// For example, if we want our unit tests to provide full code -// coverage for stack walking, it may be difficult to persuade the -// compiler to generate every possible sort of stack walking -// information that we want to support; there are probably DWARF CFI -// opcodes that GCC never emits. Similarly, if we want to test our -// error handling, we will need to generate damaged minidumps or -// debugging information that (we hope) the client or compiler will -// never produce on its own. -// -// google_breakpad::TestAssembler provides a predictable and -// (relatively) simple way to generate complex formatted data streams -// like minidumps and CFI. Furthermore, because TestAssembler is -// portable, developers without access to (say) Visual Studio or a -// SPARC assembler can still work on test data for those targets. - -#ifndef PROCESSOR_TEST_ASSEMBLER_H_ -#define PROCESSOR_TEST_ASSEMBLER_H_ - -#include -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::list; -using std::string; -using std::vector; - -namespace test_assembler { - -// A Label represents a value not yet known that we need to store in a -// section. As long as all the labels a section refers to are defined -// by the time we retrieve its contents as bytes, we can use undefined -// labels freely in that section's construction. -// -// A label can be in one of three states: -// - undefined, -// - defined as the sum of some other label and a constant, or -// - a constant. -// -// A label's value never changes, but it can accumulate constraints. -// Adding labels and integers is permitted, and yields a label. -// Subtracting a constant from a label is permitted, and also yields a -// label. Subtracting two labels that have some relationship to each -// other is permitted, and yields a constant. -// -// For example: -// -// Label a; // a's value is undefined -// Label b; // b's value is undefined -// { -// Label c = a + 4; // okay, even though a's value is unknown -// b = c + 4; // also okay; b is now a+8 -// } -// Label d = b - 2; // okay; d == a+6, even though c is gone -// d.Value(); // error: d's value is not yet known -// d - a; // is 6, even though their values are not known -// a = 12; // now b == 20, and d == 18 -// d.Value(); // 18: no longer an error -// b.Value(); // 20 -// d = 10; // error: d is already defined. -// -// Label objects' lifetimes are unconstrained: notice that, in the -// above example, even though a and b are only related through c, and -// c goes out of scope, the assignment to a sets b's value as well. In -// particular, it's not necessary to ensure that a Label lives beyond -// Sections that refer to it. -class Label { - public: - Label(); // An undefined label. - Label(u_int64_t value); // A label with a fixed value - Label(const Label &value); // A label equal to another. - ~Label(); - - // Return this label's value; it must be known. - // - // Providing this as a cast operator is nifty, but the conversions - // happen in unexpected places. In particular, ISO C++ says that - // Label + size_t becomes ambigious, because it can't decide whether - // to convert the Label to a u_int64_t and then to a size_t, or use - // the overloaded operator that returns a new label, even though the - // former could fail if the label is not yet defined and the latter won't. - u_int64_t Value() const; - - Label &operator=(u_int64_t value); - Label &operator=(const Label &value); - Label operator+(u_int64_t addend) const; - Label operator-(u_int64_t subtrahend) const; - u_int64_t operator-(const Label &subtrahend) const; - - // We could also provide == and != that work on undefined, but - // related, labels. - - // Return true if this label's value is known. If VALUE_P is given, - // set *VALUE_P to the known value if returning true. - bool IsKnownConstant(u_int64_t *value_p = NULL) const; - - // Return true if the offset from LABEL to this label is known. If - // OFFSET_P is given, set *OFFSET_P to the offset when returning true. - // - // You can think of l.KnownOffsetFrom(m, &d) as being like 'd = l-m', - // except that it also returns a value indicating whether the - // subtraction is possible given what we currently know of l and m. - // It can be possible even if we don't know l and m's values. For - // example: - // - // Label l, m; - // m = l + 10; - // l.IsKnownConstant(); // false - // m.IsKnownConstant(); // false - // u_int64_t d; - // l.IsKnownOffsetFrom(m, &d); // true, and sets d to -10. - // l-m // -10 - // m-l // 10 - // m.Value() // error: m's value is not known - bool IsKnownOffsetFrom(const Label &label, u_int64_t *offset_p = NULL) const; - - private: - // A label's value, or if that is not yet known, how the value is - // related to other labels' values. A binding may be: - // - a known constant, - // - constrained to be equal to some other binding plus a constant, or - // - unconstrained, and free to take on any value. - // - // Many labels may point to a single binding, and each binding may - // refer to another, so bindings and labels form trees whose leaves - // are labels, whose interior nodes (and roots) are bindings, and - // where links point from children to parents. Bindings are - // reference counted, allowing labels to be lightweight, copyable, - // assignable, placed in containers, and so on. - class Binding { - public: - Binding(); - Binding(u_int64_t addend); - ~Binding(); - - // Increment our reference count. - void Acquire() { reference_count_++; }; - // Decrement our reference count, and return true if it is zero. - bool Release() { return --reference_count_ == 0; } - - // Set this binding to be equal to BINDING + ADDEND. If BINDING is - // NULL, then set this binding to the known constant ADDEND. - // Update every binding on this binding's chain to point directly - // to BINDING, or to be a constant, with addends adjusted - // appropriately. - void Set(Binding *binding, u_int64_t value); - - // Return what we know about the value of this binding. - // - If this binding's value is a known constant, set BASE to - // NULL, and set ADDEND to its value. - // - If this binding is not a known constant but related to other - // bindings, set BASE to the binding at the end of the relation - // chain (which will always be unconstrained), and set ADDEND to the - // value to add to that binding's value to get this binding's - // value. - // - If this binding is unconstrained, set BASE to this, and leave - // ADDEND unchanged. - void Get(Binding **base, u_int64_t *addend); - - private: - // There are three cases: - // - // - A binding representing a known constant value has base_ NULL, - // and addend_ equal to the value. - // - // - A binding representing a completely unconstrained value has - // base_ pointing to this; addend_ is unused. - // - // - A binding whose value is related to some other binding's - // value has base_ pointing to that other binding, and addend_ - // set to the amount to add to that binding's value to get this - // binding's value. We only represent relationships of the form - // x = y+c. - // - // Thus, the bind_ links form a chain terminating in either a - // known constant value or a completely unconstrained value. Most - // operations on bindings do path compression: they change every - // binding on the chain to point directly to the final value, - // adjusting addends as appropriate. - Binding *base_; - u_int64_t addend_; - - // The number of Labels and Bindings pointing to this binding. - // (When a binding points to itself, indicating a completely - // unconstrained binding, that doesn't count as a reference.) - int reference_count_; - }; - - // This label's value. - Binding *value_; -}; - -inline Label operator+(u_int64_t a, const Label &l) { return l + a; } -// Note that int-Label isn't defined, as negating a Label is not an -// operation we support. - -// Conventions for representing larger numbers as sequences of bytes. -enum Endianness { - kBigEndian, // Big-endian: the most significant byte comes first. - kLittleEndian, // Little-endian: the least significant byte comes first. - kUnsetEndian, // used internally -}; - -// A section is a sequence of bytes, constructed by appending bytes -// to the end. Sections have a convenient and flexible set of member -// functions for appending data in various formats: big-endian and -// little-endian signed and unsigned values of different sizes; -// LEB128 and ULEB128 values (see below), and raw blocks of bytes. -// -// If you need to append a value to a section that is not convenient -// to compute immediately, you can create a label, append the -// label's value to the section, and then set the label's value -// later, when it's convenient to do so. Once a label's value is -// known, the section class takes care of updating all previously -// appended references to it. -// -// Once all the labels to which a section refers have had their -// values determined, you can get a copy of the section's contents -// as a string. -// -// Note that there is no specified "start of section" label. This is -// because there are typically several different meanings for "the -// start of a section": the offset of the section within an object -// file, the address in memory at which the section's content appear, -// and so on. It's up to the code that uses the Section class to -// keep track of these explicitly, as they depend on the application. -class Section { - public: - Section(Endianness endianness = kUnsetEndian) - : endianness_(endianness) { }; - ~Section() { }; - - // Set the default endianness of this section to ENDIANNESS. This - // sets the behavior of the D appending functions. If the - // assembler's default endianness was set, this is the - void set_endianness(Endianness endianness) { - endianness_ = endianness; - } - - // Return the default endianness of this section. - Endianness endianness() const { return endianness_; } - - // Append the SIZE bytes at DATA or the contents of STRING to the - // end of this section. Return a reference to this section. - Section &Append(const u_int8_t *data, size_t size) { - contents_.append(reinterpret_cast(data), size); - return *this; - }; - Section &Append(const string &data) { - contents_.append(data); - return *this; - }; - - // Append SIZE copies of BYTE to the end of this section. Return a - // reference to this section. - Section &Append(size_t size, u_int8_t byte) { - contents_.append(size, (char) byte); - return *this; - } - - // Append NUMBER to this section. ENDIANNESS is the endianness to - // use to write the number. SIZE is the length of the number in - // bytes. Return a reference to this section. - Section &Append(Endianness endianness, size_t size, u_int64_t number); - Section &Append(Endianness endianness, size_t size, const Label &label); - - // Append SECTION to the end of this section. The labels SECTION - // refers to need not be defined yet. - // - // Note that this has no effect on any Labels' values, or on - // SECTION. If placing SECTION within 'this' provides new - // constraints on existing labels' values, then it's up to the - // caller to fiddle with those labels as needed. - Section &Append(const Section §ion); - - // Append the contents of DATA as a series of bytes terminated by - // a NULL character. - Section &AppendCString(const string &data) { - Append(data); - contents_ += '\0'; - return *this; - } - - // Append at most SIZE bytes from DATA; if DATA is less than SIZE bytes - // long, pad with '\0' characters. - Section &AppendCString(const string &data, size_t size) { - contents_.append(data, 0, size); - if (data.size() < size) - Append(size - data.size(), 0); - return *this; - } - - // Append VALUE or LABEL to this section, with the given bit width and - // endianness. Return a reference to this section. - // - // The names of these functions have the form : - // is either 'L' (little-endian, least significant byte first), - // 'B' (big-endian, most significant byte first), or - // 'D' (default, the section's default endianness) - // is 8, 16, 32, or 64. - // - // Since endianness doesn't matter for a single byte, all the - // =8 functions are equivalent. - // - // These can be used to write both signed and unsigned values, as - // the compiler will properly sign-extend a signed value before - // passing it to the function, at which point the function's - // behavior is the same either way. - Section &L8(u_int8_t value) { contents_ += value; return *this; } - Section &B8(u_int8_t value) { contents_ += value; return *this; } - Section &D8(u_int8_t value) { contents_ += value; return *this; } - Section &L16(u_int16_t), &L32(u_int32_t), &L64(u_int64_t), - &B16(u_int16_t), &B32(u_int32_t), &B64(u_int64_t), - &D16(u_int16_t), &D32(u_int32_t), &D64(u_int64_t); - Section &L8(const Label &label), &L16(const Label &label), - &L32(const Label &label), &L64(const Label &label), - &B8(const Label &label), &B16(const Label &label), - &B32(const Label &label), &B64(const Label &label), - &D8(const Label &label), &D16(const Label &label), - &D32(const Label &label), &D64(const Label &label); - - // Append VALUE in a signed LEB128 (Little-Endian Base 128) form. - // - // The signed LEB128 representation of an integer N is a variable - // number of bytes: - // - // - If N is between -0x40 and 0x3f, then its signed LEB128 - // representation is a single byte whose value is N. - // - // - Otherwise, its signed LEB128 representation is (N & 0x7f) | - // 0x80, followed by the signed LEB128 representation of N / 128, - // rounded towards negative infinity. - // - // In other words, we break VALUE into groups of seven bits, put - // them in little-endian order, and then write them as eight-bit - // bytes with the high bit on all but the last. - // - // Note that VALUE cannot be a Label (we would have to implement - // relaxation). - Section &LEB128(long long value); - - // Append VALUE in unsigned LEB128 (Little-Endian Base 128) form. - // - // The unsigned LEB128 representation of an integer N is a variable - // number of bytes: - // - // - If N is between 0 and 0x7f, then its unsigned LEB128 - // representation is a single byte whose value is N. - // - // - Otherwise, its unsigned LEB128 representation is (N & 0x7f) | - // 0x80, followed by the unsigned LEB128 representation of N / - // 128, rounded towards negative infinity. - // - // Note that VALUE cannot be a Label (we would have to implement - // relaxation). - Section &ULEB128(u_int64_t value); - - // Jump to the next location aligned on an ALIGNMENT-byte boundary, - // relative to the start of the section. Fill the gap with PAD_BYTE. - // ALIGNMENT must be a power of two. Return a reference to this - // section. - Section &Align(size_t alignment, u_int8_t pad_byte = 0); - - // Clear the contents of this section. - void Clear(); - - // Return the current size of the section. - size_t Size() const { return contents_.size(); } - - // Return a label representing the start of the section. - // - // It is up to the user whether this label represents the section's - // position in an object file, the section's address in memory, or - // what have you; some applications may need both, in which case - // this simple-minded interface won't be enough. This class only - // provides a single start label, for use with the Here and Mark - // member functions. - // - // Ideally, we'd provide this in a subclass that actually knows more - // about the application at hand and can provide an appropriate - // collection of start labels. But then the appending member - // functions like Append and D32 would return a reference to the - // base class, not the derived class, and the chaining won't work. - // Since the only value here is in pretty notation, that's a fatal - // flaw. - Label start() const { return start_; } - - // Return a label representing the point at which the next Appended - // item will appear in the section, relative to start(). - Label Here() const { return start_ + Size(); } - - // Set *LABEL to Here, and return a reference to this section. - Section &Mark(Label *label) { *label = Here(); return *this; } - - // If there are no undefined label references left in this - // section, set CONTENTS to the contents of this section, as a - // string, and clear this section. Return true on success, or false - // if there were still undefined labels. - bool GetContents(string *contents); - - private: - // Used internally. A reference to a label's value. - struct Reference { - Reference(size_t set_offset, Endianness set_endianness, size_t set_size, - const Label &set_label) - : offset(set_offset), endianness(set_endianness), size(set_size), - label(set_label) { } - - // The offset of the reference within the section. - size_t offset; - - // The endianness of the reference. - Endianness endianness; - - // The size of the reference. - size_t size; - - // The label to which this is a reference. - Label label; - }; - - // The default endianness of this section. - Endianness endianness_; - - // The contents of the section. - string contents_; - - // References to labels within those contents. - vector references_; - - // A label referring to the beginning of the section. - Label start_; -}; - -} // namespace test_assembler -} // namespace google_breakpad - -#endif // PROCESSOR_TEST_ASSEMBLER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler_unittest.cc deleted file mode 100644 index 5db13267..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/test_assembler_unittest.cc +++ /dev/null @@ -1,1662 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// test_assembler_unittest.cc: Unit tests for google_breakpad::TestAssembler. - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/test_assembler.h" - -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using std::string; -using testing::Test; - -TEST(ConstructLabel, Simple) { - Label l; -} - -TEST(ConstructLabel, Undefined) { - Label l; - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(ConstructLabelDeathTest, Undefined) { - Label l; - ASSERT_DEATH(l.Value(), "IsKnownConstant\\(&v\\)"); -} - -TEST(ConstructLabel, Constant) { - Label l(0x060b9f974eaf301eULL); - u_int64_t v; - EXPECT_TRUE(l.IsKnownConstant(&v)); - EXPECT_EQ(v, 0x060b9f974eaf301eULL); - EXPECT_EQ(l.Value(), 0x060b9f974eaf301eULL); -} - -TEST(ConstructLabel, Copy) { - Label l; - Label m(l); - u_int64_t v; - EXPECT_TRUE(l.IsKnownOffsetFrom(m, &v)); - EXPECT_EQ(0U, v); -} - -// The left-hand-side of a label assignment can be either -// unconstrained, related, or known. The right-hand-side can be any of -// those, or an integer. -TEST(Assignment, UnconstrainedToUnconstrained) { - Label l, m; - l = m; - EXPECT_EQ(0U, l-m); - EXPECT_TRUE(l.IsKnownOffsetFrom(m)); - u_int64_t d; - EXPECT_TRUE(l.IsKnownOffsetFrom(m, &d)); - EXPECT_EQ(0U, d); - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(Assignment, UnconstrainedToRelated) { - Label l, m, n; - l = n; - l = m; - EXPECT_EQ(0U, l-m); - EXPECT_TRUE(l.IsKnownOffsetFrom(m)); - u_int64_t d; - EXPECT_TRUE(l.IsKnownOffsetFrom(m, &d)); - EXPECT_EQ(0U, d); - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(Assignment, UnconstrainedToKnown) { - Label l, m; - l = 0x8fd16e55b20a39c1ULL; - l = m; - EXPECT_EQ(0U, l-m); - EXPECT_TRUE(l.IsKnownOffsetFrom(m)); - u_int64_t d; - EXPECT_TRUE(l.IsKnownOffsetFrom(m, &d)); - EXPECT_EQ(0U, d); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x8fd16e55b20a39c1ULL, m.Value()); -} - -TEST(Assignment, RelatedToUnconstrained) { - Label l, m, n; - m = n; - l = m; - EXPECT_EQ(0U, l-n); - EXPECT_TRUE(l.IsKnownOffsetFrom(n)); - u_int64_t d; - EXPECT_TRUE(l.IsKnownOffsetFrom(n, &d)); - EXPECT_EQ(0U, d); - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(Assignment, RelatedToRelated) { - Label l, m, n, o; - l = n; - m = o; - l = m; - EXPECT_EQ(0U, n-o); - EXPECT_TRUE(n.IsKnownOffsetFrom(o)); - u_int64_t d; - EXPECT_TRUE(n.IsKnownOffsetFrom(o, &d)); - EXPECT_EQ(0U, d); - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(Assignment, RelatedToKnown) { - Label l, m, n; - m = n; - l = 0xd2011f8c82ad56f2ULL; - l = m; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0xd2011f8c82ad56f2ULL, l.Value()); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0xd2011f8c82ad56f2ULL, m.Value()); - EXPECT_TRUE(n.IsKnownConstant()); - EXPECT_EQ(0xd2011f8c82ad56f2ULL, n.Value()); -} - -TEST(Assignment, KnownToUnconstrained) { - Label l, m; - m = 0x50b024c0d6073887ULL; - l = m; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0x50b024c0d6073887ULL, l.Value()); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x50b024c0d6073887ULL, m.Value()); -} - -TEST(Assignment, KnownToRelated) { - Label l, m, n; - l = n; - m = 0x5348883655c727e5ULL; - l = m; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0x5348883655c727e5ULL, l.Value()); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x5348883655c727e5ULL, m.Value()); - EXPECT_TRUE(n.IsKnownConstant()); - EXPECT_EQ(0x5348883655c727e5ULL, n.Value()); -} - -TEST(Assignment, KnownToKnown) { - Label l, m; - l = 0x36c209c20987564eULL; - m = 0x36c209c20987564eULL; - l = m; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0x36c209c20987564eULL, l.Value()); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x36c209c20987564eULL, m.Value()); -} - -TEST(Assignment, ConstantToUnconstrained) { - Label l; - l = 0xc02495f4d7f5a957ULL; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0xc02495f4d7f5a957ULL, l.Value()); -} - -TEST(Assignment, ConstantToRelated) { - Label l, m; - l = m; - l = 0x4577901cf275488dULL; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0x4577901cf275488dULL, l.Value()); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x4577901cf275488dULL, m.Value()); -} - -TEST(Assignment, ConstantToKnown) { - Label l; - l = 0xec0b9c369b7e8ea7ULL; - l = 0xec0b9c369b7e8ea7ULL; - EXPECT_TRUE(l.IsKnownConstant()); - EXPECT_EQ(0xec0b9c369b7e8ea7ULL, l.Value()); -} - -TEST(AssignmentDeathTest, Self) { - Label l; - ASSERT_DEATH(l = l, "binding != this"); -} - -TEST(AssignmentDeathTest, IndirectCycle) { - Label l, m, n; - l = m; - m = n; - ASSERT_DEATH(n = l, "binding != this"); -} - -TEST(AssignmentDeathTest, Cycle) { - Label l, m, n, o; - l = m; - m = n; - o = n; - ASSERT_DEATH(o = l, "binding != this"); -} - -TEST(Addition, LabelConstant) { - Label l, m; - m = l + 0x5248d93e8bbe9497ULL; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(0x5248d93e8bbe9497ULL, d); - EXPECT_FALSE(m.IsKnownConstant()); -} - -TEST(Addition, ConstantLabel) { - Label l, m; - m = 0xf51e94e00d6e3c84ULL + l; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(0xf51e94e00d6e3c84ULL, d); - EXPECT_FALSE(m.IsKnownConstant()); -} - -TEST(Addition, KnownLabelConstant) { - Label l, m; - l = 0x16286307042ce0d8ULL; - m = l + 0x3fdddd91306719d7ULL; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(0x3fdddd91306719d7ULL, d); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x16286307042ce0d8ULL + 0x3fdddd91306719d7ULL, m.Value()); -} - -TEST(Addition, ConstantKnownLabel) { - Label l, m; - l = 0x50f62d0cdd1031deULL; - m = 0x1b13462d8577c538ULL + l; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(0x1b13462d8577c538ULL, d); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x50f62d0cdd1031deULL + 0x1b13462d8577c538ULL, m.Value()); -} - -TEST(Subtraction, LabelConstant) { - Label l, m; - m = l - 0x0620884d21d3138eULL; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(-0x0620884d21d3138eULL, d); - EXPECT_FALSE(m.IsKnownConstant()); -} - -TEST(Subtraction, KnownLabelConstant) { - Label l, m; - l = 0x6237fbaf9ef7929eULL; - m = l - 0x317730995d2ab6eeULL; - EXPECT_TRUE(m.IsKnownOffsetFrom(l)); - u_int64_t d; - EXPECT_TRUE(m.IsKnownOffsetFrom(l, &d)); - EXPECT_EQ(-0x317730995d2ab6eeULL, d); - EXPECT_TRUE(m.IsKnownConstant()); - EXPECT_EQ(0x6237fbaf9ef7929eULL - 0x317730995d2ab6eeULL, m.Value()); -} - -TEST(SubtractionDeathTest, LabelLabel) { - Label l, m; - ASSERT_DEATH(l - m, "IsKnownOffsetFrom\\(label, &offset\\)"); -} - -TEST(Subtraction, LabelLabel) { - Label l, m; - l = m + 0x7fa77ec63e28a17aULL; - EXPECT_EQ(0x7fa77ec63e28a17aULL, l - m); - EXPECT_EQ(-0x7fa77ec63e28a17aULL, m - l); -} - -TEST(IsKnownConstant, Undefined) { - Label l; - EXPECT_FALSE(l.IsKnownConstant()); -} - -TEST(IsKnownConstant, RelatedLabel) { - Label l, m; - l = m; - EXPECT_FALSE(l.IsKnownConstant()); - EXPECT_FALSE(m.IsKnownConstant()); -} - -TEST(IsKnownConstant, Constant) { - Label l; - l = 0xf374b1bdd6a22576ULL; - EXPECT_TRUE(l.IsKnownConstant()); -} - -TEST(IsKnownOffsetFrom, Unrelated) { - Label l, m; - EXPECT_FALSE(l.IsKnownOffsetFrom(m)); -} - -TEST(IsKnownOffsetFrom, Related) { - Label l, m; - l = m; - EXPECT_TRUE(l.IsKnownOffsetFrom(m)); -} - -// Test the construction of chains of related labels, and the -// propagation of values through them. -// -// Although the relations between labels are supposed to behave -// symmetrically --- that is, 'a = b' should put a and b in -// indistinguishable states --- there's a distinction made internally -// between the target (a) and the source (b). -// -// So there are five test axes to cover: -// -// - Do we construct the chain with assignment ("Assign") or with constructors -// ("Construct")? -// -// - Do we set the value of the label at the start of the chain -// ("Start") or the label at the end ("End")? -// -// - Are we testing the propagation of a relationship between variable -// values ("Relation"), or the propagation of a known constant value -// ("Value")? -// -// - Do we set the value before building the chain ("Before") or after -// the chain has been built ("After")? -// -// - Do we add new relationships to the end of the existing chain -// ("Forward") or to the beginning ("Backward")? -// -// Of course, "Construct" and "Backward" can't be combined, which -// eliminates eight combinations, and "Construct", "End", and "Before" -// can't be combined, which eliminates two more, so there are are 22 -// combinations, not 32. - -TEST(LabelChain, AssignStartRelationBeforeForward) { - Label a, b, c, d; - Label x; - a = x; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, AssignStartRelationBeforeBackward) { - Label a, b, c, d; - Label x; - a = x; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, AssignStartRelationAfterForward) { - Label a, b, c, d; - Label x; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - a = x; - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, AssignStartRelationAfterBackward) { - Label a, b, c, d; - Label x; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - a = x; - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, AssignStartValueBeforeForward) { - Label a, b, c, d; - a = 0xa131200190546ac2ULL; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - EXPECT_EQ(0xa131200190546ac2ULL + 0x111U, d.Value()); - EXPECT_EQ(0xa131200190546ac2ULL + 0x11U, c.Value()); - EXPECT_EQ(0xa131200190546ac2ULL + 0x1U, b.Value()); - EXPECT_EQ(0xa131200190546ac2ULL + 0U, a.Value()); -} - -TEST(LabelChain, AssignStartValueBeforeBackward) { - Label a, b, c, d; - a = 0x8da17e1670ad4fa2ULL; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - EXPECT_EQ(0x8da17e1670ad4fa2ULL + 0x111U, d.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL + 0x11U, c.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL + 0x1U, b.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL + 0U, a.Value()); -} - -TEST(LabelChain, AssignStartValueAfterForward) { - Label a, b, c, d; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - a = 0x99b8f51bafd41adaULL; - EXPECT_EQ(0x99b8f51bafd41adaULL + 0x111U, d.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL + 0x11U, c.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL + 0x1U, b.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL + 0U, a.Value()); -} - -TEST(LabelChain, AssignStartValueAfterBackward) { - Label a, b, c, d; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - a = 0xc86ca1d97ab5df6eULL; - EXPECT_EQ(0xc86ca1d97ab5df6eULL + 0x111U, d.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL + 0x11U, c.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL + 0x1U, b.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL + 0U, a.Value()); -} - -TEST(LabelChain, AssignEndRelationBeforeForward) { - Label a, b, c, d; - Label x; - x = d; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - EXPECT_EQ(-(u_int64_t)0x111U, a-x); - EXPECT_EQ(-(u_int64_t)0x110U, b-x); - EXPECT_EQ(-(u_int64_t)0x100U, c-x); - EXPECT_EQ(-(u_int64_t)0U, d-x); -} - -TEST(LabelChain, AssignEndRelationBeforeBackward) { - Label a, b, c, d; - Label x; - x = d; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - EXPECT_EQ(-(u_int64_t)0x111U, a-x); - EXPECT_EQ(-(u_int64_t)0x110U, b-x); - EXPECT_EQ(-(u_int64_t)0x100U, c-x); - EXPECT_EQ(-(u_int64_t)0U, d-x); -} - -TEST(LabelChain, AssignEndRelationAfterForward) { - Label a, b, c, d; - Label x; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - x = d; - EXPECT_EQ(-(u_int64_t)0x111U, a-x); - EXPECT_EQ(-(u_int64_t)0x110U, b-x); - EXPECT_EQ(-(u_int64_t)0x100U, c-x); - EXPECT_EQ(-(u_int64_t)0x000U, d-x); -} - -TEST(LabelChain, AssignEndRelationAfterBackward) { - Label a, b, c, d; - Label x; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - x = d; - EXPECT_EQ(-(u_int64_t)0x111U, a-x); - EXPECT_EQ(-(u_int64_t)0x110U, b-x); - EXPECT_EQ(-(u_int64_t)0x100U, c-x); - EXPECT_EQ(-(u_int64_t)0x000U, d-x); -} - -TEST(LabelChain, AssignEndValueBeforeForward) { - Label a, b, c, d; - d = 0xa131200190546ac2ULL; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - EXPECT_EQ(0xa131200190546ac2ULL - 0x111, a.Value()); - EXPECT_EQ(0xa131200190546ac2ULL - 0x110, b.Value()); - EXPECT_EQ(0xa131200190546ac2ULL - 0x100, c.Value()); - EXPECT_EQ(0xa131200190546ac2ULL - 0x000, d.Value()); -} - -TEST(LabelChain, AssignEndValueBeforeBackward) { - Label a, b, c, d; - d = 0x8da17e1670ad4fa2ULL; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - EXPECT_EQ(0x8da17e1670ad4fa2ULL - 0x111, a.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL - 0x110, b.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL - 0x100, c.Value()); - EXPECT_EQ(0x8da17e1670ad4fa2ULL - 0x000, d.Value()); -} - -TEST(LabelChain, AssignEndValueAfterForward) { - Label a, b, c, d; - b = a + 0x1; - c = b + 0x10; - d = c + 0x100; - d = 0x99b8f51bafd41adaULL; - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x111, a.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x110, b.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x100, c.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x000, d.Value()); -} - -TEST(LabelChain, AssignEndValueAfterBackward) { - Label a, b, c, d; - d = c + 0x100; - c = b + 0x10; - b = a + 0x1; - d = 0xc86ca1d97ab5df6eULL; - EXPECT_EQ(0xc86ca1d97ab5df6eULL - 0x111, a.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL - 0x110, b.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL - 0x100, c.Value()); - EXPECT_EQ(0xc86ca1d97ab5df6eULL - 0x000, d.Value()); -} - -TEST(LabelChain, ConstructStartRelationBeforeForward) { - Label x; - Label a(x); - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, ConstructStartRelationAfterForward) { - Label x; - Label a; - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - a = x; - EXPECT_EQ(0x111U, d-x); - EXPECT_EQ(0x11U, c-x); - EXPECT_EQ(0x1U, b-x); - EXPECT_EQ(0U, a-x); -} - -TEST(LabelChain, ConstructStartValueBeforeForward) { - Label a(0x5d234d177d01ccc8ULL); - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - EXPECT_EQ(0x5d234d177d01ccc8ULL + 0x111U, d.Value()); - EXPECT_EQ(0x5d234d177d01ccc8ULL + 0x011U, c.Value()); - EXPECT_EQ(0x5d234d177d01ccc8ULL + 0x001U, b.Value()); - EXPECT_EQ(0x5d234d177d01ccc8ULL + 0x000U, a.Value()); -} - -TEST(LabelChain, ConstructStartValueAfterForward) { - Label a; - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - a = 0xded85d54586e84fcULL; - EXPECT_EQ(0xded85d54586e84fcULL + 0x111U, d.Value()); - EXPECT_EQ(0xded85d54586e84fcULL + 0x011U, c.Value()); - EXPECT_EQ(0xded85d54586e84fcULL + 0x001U, b.Value()); - EXPECT_EQ(0xded85d54586e84fcULL + 0x000U, a.Value()); -} - -TEST(LabelChain, ConstructEndRelationAfterForward) { - Label x; - Label a; - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - x = d; - EXPECT_EQ(-(u_int64_t)0x111U, a-x); - EXPECT_EQ(-(u_int64_t)0x110U, b-x); - EXPECT_EQ(-(u_int64_t)0x100U, c-x); - EXPECT_EQ(-(u_int64_t)0x000U, d-x); -} - -TEST(LabelChain, ConstructEndValueAfterForward) { - Label a; - Label b(a + 0x1); - Label c(b + 0x10); - Label d(c + 0x100); - d = 0x99b8f51bafd41adaULL; - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x111, a.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x110, b.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x100, c.Value()); - EXPECT_EQ(0x99b8f51bafd41adaULL - 0x000, d.Value()); -} - -TEST(LabelTree, KnownValue) { - Label l, m, n, o, p; - l = m; - m = n; - o = p; - p = n; - l = 0x536b5de3d468a1b5ULL; - EXPECT_EQ(0x536b5de3d468a1b5ULL, o.Value()); -} - -TEST(LabelTree, Related) { - Label l, m, n, o, p; - l = m - 1; - m = n - 10; - o = p + 100; - p = n + 1000; - EXPECT_EQ(1111U, o - l); -} - -TEST(EquationDeathTest, EqualConstants) { - Label m = 0x0d3962f280f07d24ULL; - Label n = 0x0d3962f280f07d24ULL; - m = n; // no death expected -} - -TEST(EquationDeathTest, EqualIndirectConstants) { - Label m = 0xa347f1e5238fe6a1ULL; - Label n; - Label o = n; - n = 0xa347f1e5238fe6a1ULL; - n = m; // no death expected -} - -TEST(EquationDeathTest, ConstantClash) { - Label m = 0xd4cc0f4f630ec741ULL; - Label n = 0x934cd2d8254fc3eaULL; - ASSERT_DEATH(m = n, "addend_ == addend"); -} - -TEST(EquationDeathTest, IndirectConstantClash) { - Label m = 0xd4cc0f4f630ec741ULL; - Label n, o; - n = o; - o = 0xcfbe3b83ac49ce86ULL; - ASSERT_DEATH(m = n, "addend_ == addend"); -} - -// Assigning to a related label may free the next Binding on its -// chain. This test always passes; it is interesting to memory -// checkers and coverage analysis. -TEST(LabelReferenceCount, AssignmentFree) { - Label l; - { - Label m; - l = m; - } - // This should free m's Binding. - l = 0xca8bae92f0376d4fULL; - ASSERT_EQ(0xca8bae92f0376d4fULL, l.Value()); -} - -// Finding the value of a label may free the Binding it refers to. This test -// always passes; it is interesting to memory checkers and coverage analysis. -TEST(LabelReferenceCount, FindValueFree) { - Label l; - { - Label m, n; - l = m; - m = n; - n = 0x7a0b0c576672daafULL; - // At this point, l's Binding refers to m's Binding, which refers - // to n's binding. - } - // Now, l is the only reference keeping the three Bindings alive. - // Resolving its value should free l's and m's original bindings. - ASSERT_EQ(0x7a0b0c576672daafULL, l.Value()); -} - -TEST(ConstructSection, Simple) { - Section s; -} - -TEST(ConstructSection, WithEndian) { - Section s(kBigEndian); -} - -// A fixture class for TestAssembler::Section tests. -class SectionFixture { - public: - Section section; - string contents; - static const u_int8_t data[]; - static const size_t data_size; -}; - -const u_int8_t SectionFixture::data[] = { - 0x87, 0x4f, 0x43, 0x67, 0x30, 0xd0, 0xd4, 0x0e -}; - -#define I0() -#define I1(a) { a } -#define I2(a,b) { a,b } -#define I3(a,b,c) { a,b,c } -#define I4(a,b,c,d) { a,b,c,d } -#define I5(a,b,c,d,e) { a,b,c,d,e } -#define I6(a,b,c,d,e,f) { a,b,c,d,e,f } -#define I7(a,b,c,d,e,f,g) { a,b,c,d,e,f,g } -#define I8(a,b,c,d,e,f,g,h) { a,b,c,d,e,f,g,h } -#define I9(a,b,c,d,e,f,g,h,i) { a,b,c,d,e,f,g,h,i } -#define ASSERT_BYTES(s, b) \ - do \ - { \ - static const u_int8_t expected_bytes[] = b; \ - ASSERT_EQ(sizeof(expected_bytes), s.size()); \ - ASSERT_TRUE(memcmp(s.data(), (const char *) expected_bytes, \ - sizeof(expected_bytes)) == 0); \ - } \ - while(0) - -class Append: public SectionFixture, public Test { }; - -TEST_F(Append, Bytes) { - section.Append(data, sizeof(data)); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_EQ(sizeof(data), contents.size()); - EXPECT_TRUE(0 == memcmp(contents.data(), (const char *) data, sizeof(data))); -} - -TEST_F(Append, BytesTwice) { - section.Append(data, sizeof(data)); - section.Append(data, sizeof(data)); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_EQ(2 * sizeof(data), contents.size()); - ASSERT_TRUE(0 == memcmp(contents.data(), (const char *) data, sizeof(data))); - ASSERT_TRUE(0 == memcmp(contents.data() + sizeof(data), - (const char *) data, sizeof(data))); -} - -TEST_F(Append, String) { - string s1 = "howdy "; - string s2 = "there"; - section.Append(s1); - section.Append(s2); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_STREQ(contents.c_str(), "howdy there"); -} - -TEST_F(Append, CString) { - section.AppendCString("howdy"); - section.AppendCString(""); - section.AppendCString("there"); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_EQ(string("howdy\0\0there\0", 13), contents); -} - -TEST_F(Append, CStringSize) { - section.AppendCString("howdy", 3); - section.AppendCString("there", 5); - section.AppendCString("fred", 6); - section.AppendCString("natalie", 0); - section.AppendCString("", 10); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_EQ(string("howtherefred\0\0\0\0\0\0\0\0\0\0\0\0", 24), contents); -} - -TEST_F(Append, RepeatedBytes) { - section.Append((size_t) 10, '*'); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_STREQ(contents.c_str(), "**********"); -} - -TEST_F(Append, GeneralLE1) { - section.Append(kLittleEndian, 1, 42); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I1(42)); -} - -TEST_F(Append, GeneralLE2) { - section.Append(kLittleEndian, 2, 0x15a1); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0xa1, 0x15)); -} - -TEST_F(Append, GeneralLE3) { - section.Append(kLittleEndian, 3, 0x59ae8d); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x8d, 0xae, 0x59)); -} - -TEST_F(Append, GeneralLE4) { - section.Append(kLittleEndian, 4, 0x51603c56); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I4(0x56, 0x3c, 0x60, 0x51)); -} - -TEST_F(Append, GeneralLE5) { - section.Append(kLittleEndian, 5, 0x385e2803b4ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0xb4, 0x03, 0x28, 0x5e, 0x38)); -} - -TEST_F(Append, GeneralLE6) { - section.Append(kLittleEndian, 6, 0xc7db9534dd1fULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I6(0x1f, 0xdd, 0x34, 0x95, 0xdb, 0xc7)); -} - -TEST_F(Append, GeneralLE7) { - section.Append(kLittleEndian, 7, 0x1445c9f1b843e6ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I7(0xe6, 0x43, 0xb8, 0xf1, 0xc9, 0x45, 0x14)); -} - -TEST_F(Append, GeneralLE8) { - section.Append(kLittleEndian, 8, 0xaf48019dfe5c01e5ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I8(0xe5, 0x01, 0x5c, 0xfe, 0x9d, 0x01, 0x48, 0xaf)); -} - -TEST_F(Append, GeneralBE1) { - section.Append(kBigEndian, 1, 0xd0ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I1(0xd0)); -} - -TEST_F(Append, GeneralBE2) { - section.Append(kBigEndian, 2, 0x2e7eULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2e, 0x7e)); -} - -TEST_F(Append, GeneralBE3) { - section.Append(kBigEndian, 3, 0x37dad6ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x37, 0xda, 0xd6)); -} - -TEST_F(Append, GeneralBE4) { - section.Append(kBigEndian, 4, 0x715935c7ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I4(0x71, 0x59, 0x35, 0xc7)); -} - -TEST_F(Append, GeneralBE5) { - section.Append(kBigEndian, 5, 0x42baeb02b7ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x42, 0xba, 0xeb, 0x02, 0xb7)); -} - -TEST_F(Append, GeneralBE6) { - section.Append(kBigEndian, 6, 0xf1cdf10e7b18ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I6(0xf1, 0xcd, 0xf1, 0x0e, 0x7b, 0x18)); -} - -TEST_F(Append, GeneralBE7) { - section.Append(kBigEndian, 7, 0xf50a724f0b0d20ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I7(0xf5, 0x0a, 0x72, 0x4f, 0x0b, 0x0d, 0x20)); -} - -TEST_F(Append, GeneralBE8) { - section.Append(kBigEndian, 8, 0xa6b2cb5e98dc9c16ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I8(0xa6, 0xb2, 0xcb, 0x5e, 0x98, 0xdc, 0x9c, 0x16)); -} - -TEST_F(Append, GeneralLE1Label) { - Label l; - section.Append(kLittleEndian, 1, l); - l = 42; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I1(42)); -} - -TEST_F(Append, GeneralLE2Label) { - Label l; - section.Append(kLittleEndian, 2, l); - l = 0x15a1; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0xa1, 0x15)); -} - -TEST_F(Append, GeneralLE3Label) { - Label l; - section.Append(kLittleEndian, 3, l); - l = 0x59ae8d; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x8d, 0xae, 0x59)); -} - -TEST_F(Append, GeneralLE4Label) { - Label l; - section.Append(kLittleEndian, 4, l); - l = 0x51603c56; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I4(0x56, 0x3c, 0x60, 0x51)); -} - -TEST_F(Append, GeneralLE5Label) { - Label l; - section.Append(kLittleEndian, 5, l); - l = 0x385e2803b4ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0xb4, 0x03, 0x28, 0x5e, 0x38)); -} - -TEST_F(Append, GeneralLE6Label) { - Label l; - section.Append(kLittleEndian, 6, l); - l = 0xc7db9534dd1fULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I6(0x1f, 0xdd, 0x34, 0x95, 0xdb, 0xc7)); -} - -TEST_F(Append, GeneralLE7Label) { - Label l; - section.Append(kLittleEndian, 7, l); - l = 0x1445c9f1b843e6ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I7(0xe6, 0x43, 0xb8, 0xf1, 0xc9, 0x45, 0x14)); -} - -TEST_F(Append, GeneralLE8Label) { - Label l; - section.Append(kLittleEndian, 8, l); - l = 0xaf48019dfe5c01e5ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I8(0xe5, 0x01, 0x5c, 0xfe, 0x9d, 0x01, 0x48, 0xaf)); -} - -TEST_F(Append, GeneralBE1Label) { - Label l; - section.Append(kBigEndian, 1, l); - l = 0xd0ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I1(0xd0)); -} - -TEST_F(Append, GeneralBE2Label) { - Label l; - section.Append(kBigEndian, 2, l); - l = 0x2e7eULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2e, 0x7e)); -} - -TEST_F(Append, GeneralBE3Label) { - Label l; - section.Append(kBigEndian, 3, l); - l = 0x37dad6ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x37, 0xda, 0xd6)); -} - -TEST_F(Append, GeneralBE4Label) { - Label l; - section.Append(kBigEndian, 4, l); - l = 0x715935c7ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I4(0x71, 0x59, 0x35, 0xc7)); -} - -TEST_F(Append, GeneralBE5Label) { - Label l; - section.Append(kBigEndian, 5, l); - l = 0x42baeb02b7ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x42, 0xba, 0xeb, 0x02, 0xb7)); -} - -TEST_F(Append, GeneralBE6Label) { - Label l; - section.Append(kBigEndian, 6, l); - l = 0xf1cdf10e7b18ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I6(0xf1, 0xcd, 0xf1, 0x0e, 0x7b, 0x18)); -} - -TEST_F(Append, GeneralBE7Label) { - Label l; - section.Append(kBigEndian, 7, l); - l = 0xf50a724f0b0d20ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I7(0xf5, 0x0a, 0x72, 0x4f, 0x0b, 0x0d, 0x20)); -} - -TEST_F(Append, GeneralBE8Label) { - Label l; - section.Append(kBigEndian, 8, l); - l = 0xa6b2cb5e98dc9c16ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I8(0xa6, 0xb2, 0xcb, 0x5e, 0x98, 0xdc, 0x9c, 0x16)); -} - -TEST_F(Append, B8) { - section.Append(1, 0x2a); - section.B8(0xd3U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0xd3)); -} - -TEST_F(Append, B8Label) { - Label l; - section.Append(1, 0x2a); - section.B8(l); - l = 0x4bU; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0x4b)); -} - -TEST_F(Append, B16) { - section.Append(1, 0x2a); - section.B16(0x472aU); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x47, 0x2a)); -} - -TEST_F(Append, B16Label) { - Label l; - section.Append(1, 0x2a); - section.B16(l); - l = 0x55e8U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x55, 0xe8)); -} - -TEST_F(Append, B32) { - section.Append(1, 0x2a); - section.B32(0xbd412cbcU); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0xbd, 0x41, 0x2c, 0xbc)); -} - -TEST_F(Append, B32Label) { - Label l; - section.Append(1, 0x2a); - section.B32(l); - l = 0x208e37d5U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0x20, 0x8e, 0x37, 0xd5)); -} - -TEST_F(Append, B64) { - section.Append(1, 0x2a); - section.B64(0x3402a013111e68adULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0x34, 0x02, 0xa0, 0x13, 0x11, 0x1e, 0x68, 0xad)); -} - -TEST_F(Append, B64Label) { - Label l; - section.Append(1, 0x2a); - section.B64(l); - l = 0x355dbfbb4ac6d57fULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0x35, 0x5d, 0xbf, 0xbb, 0x4a, 0xc6, 0xd5, 0x7f)); -} - -TEST_F(Append, L8) { - section.Append(1, 0x2a); - section.L8(0x26U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0x26)); -} - -TEST_F(Append, L8Label) { - Label l; - section.Append(1, 0x2a); - section.L8(l); - l = 0xa8U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0xa8)); -} - -TEST_F(Append, L16) { - section.Append(1, 0x2a); - section.L16(0xca6dU); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x6d, 0xca)); -} - -TEST_F(Append, L16Label) { - Label l; - section.Append(1, 0x2a); - section.L16(l); - l = 0xd21fU; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x1f, 0xd2)); -} - -TEST_F(Append, L32) { - section.Append(1, 0x2a); - section.L32(0x558f6181U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0x81, 0x61, 0x8f, 0x55)); -} - -TEST_F(Append, L32Label) { - Label l; - section.Append(1, 0x2a); - section.L32(l); - l = 0x4b810f82U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0x82, 0x0f, 0x81, 0x4b)); -} - -TEST_F(Append, L64) { - section.Append(1, 0x2a); - section.L64(0x564384f7579515bfULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0xbf, 0x15, 0x95, 0x57, 0xf7, 0x84, 0x43, 0x56)); -} - -TEST_F(Append, L64Label) { - Label l; - section.Append(1, 0x2a); - section.L64(l); - l = 0x424b1d020667c8dbULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0xdb, 0xc8, 0x67, 0x06, 0x02, 0x1d, 0x4b, 0x42)); -} - -TEST_F(Append, D8Big) { - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D8(0xe6U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0xe6)); -} - -TEST_F(Append, D8BigLabel) { - Label l; - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D8(l); - l = 0xeeU; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0xee)); -} - -TEST_F(Append, D16Big) { - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D16(0x83b1U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x83, 0xb1)); -} - -TEST_F(Append, D16BigLabel) { - Label l; - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D16(l); - l = 0x5b55U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x5b, 0x55)); -} - -TEST_F(Append, D32Big) { - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D32(0xd0b0e431U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0xd0, 0xb0, 0xe4, 0x31)); -} - -TEST_F(Append, D32BigLabel) { - Label l; - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D32(l); - l = 0x312fb340U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0x31, 0x2f, 0xb3, 0x40)); -} - -TEST_F(Append, D64Big) { - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D64(0xb109843500dbcb16ULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0xb1, 0x09, 0x84, 0x35, 0x00, 0xdb, 0xcb, 0x16)); -} - -TEST_F(Append, D64BigLabel) { - Label l; - section.set_endianness(kBigEndian); - section.Append(1, 0x2a); - section.D64(l); - l = 0x9a0d61b70f671fd7ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0x9a, 0x0d, 0x61, 0xb7, 0x0f, 0x67, 0x1f, 0xd7)); -} - -TEST_F(Append, D8Little) { - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D8(0x42U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0x42)); -} - -TEST_F(Append, D8LittleLabel) { - Label l; - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D8(l); - l = 0x05U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I2(0x2a, 0x05)); -} - -TEST_F(Append, D16Little) { - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D16(0xc5c5U); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0xc5, 0xc5)); -} - -TEST_F(Append, D16LittleLabel) { - Label l; - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D16(l); - l = 0xb620U; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I3(0x2a, 0x20, 0xb6)); -} - -TEST_F(Append, D32Little) { - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D32(0x1a87d0feU); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0xfe, 0xd0, 0x87, 0x1a)); -} - -TEST_F(Append, D32LittleLabel) { - Label l; - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D32(l); - l = 0xb8012d6bU; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I5(0x2a, 0x6b, 0x2d, 0x01, 0xb8)); -} - -TEST_F(Append, D64Little) { - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D64(0x42de75c61375a1deULL); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0xde, 0xa1, 0x75, 0x13, 0xc6, 0x75, 0xde, 0x42)); -} - -TEST_F(Append, D64LittleLabel) { - Label l; - section.set_endianness(kLittleEndian); - section.Append(1, 0x2a); - section.D64(l); - l = 0x8b3bececf3fb5312ULL; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, - I9(0x2a, 0x12, 0x53, 0xfb, 0xf3, 0xec, 0xec, 0x3b, 0x8b)); -} - -TEST_F(Append, Variety) { - Label a, b, c, d, e, f, g, h; - section.Append(kBigEndian, 1, a) - .Append(kLittleEndian, 8, h) - .Append(kBigEndian, 1, 0x8bULL) - .Append(kLittleEndian, 8, 0x0ea56540448f4439ULL) - .Append(kBigEndian, 2, b) - .Append(kLittleEndian, 7, g) - .Append(kBigEndian, 2, 0xcf15ULL) - .Append(kLittleEndian, 7, 0x29694f04c5724aULL) - .Append(kBigEndian, 3, c) - .Append(kLittleEndian, 6, f) - .Append(kBigEndian, 3, 0x8c3ffdULL) - .Append(kLittleEndian, 6, 0x6f11ba80187aULL) - .Append(kBigEndian, 4, d) - .Append(kLittleEndian, 5, e) - .Append(kBigEndian, 4, 0x2fda2472ULL) - .Append(kLittleEndian, 5, 0x0aa02d423fULL) - .Append(kBigEndian, 5, e) - .Append(kLittleEndian, 4, d) - .Append(kBigEndian, 5, 0x53ba432138ULL) - .Append(kLittleEndian, 4, 0xf139ae60ULL) - .Append(kBigEndian, 6, f) - .Append(kLittleEndian, 3, c) - .Append(kBigEndian, 6, 0x168e436af716ULL) - .Append(kLittleEndian, 3, 0x3ef189ULL) - .Append(kBigEndian, 7, g) - .Append(kLittleEndian, 2, b) - .Append(kBigEndian, 7, 0xacd4ef233e47d9ULL) - .Append(kLittleEndian, 2, 0x5311ULL) - .Append(kBigEndian, 8, h) - .Append(kLittleEndian, 1, a) - .Append(kBigEndian, 8, 0x4668d5f1c93637a1ULL) - .Append(kLittleEndian, 1, 0x65ULL); - a = 0x79ac9bd8aa256b35ULL; - b = 0x22d13097ef86c91cULL; - c = 0xf204968b0a05862fULL; - d = 0x163177f15a0eb4ecULL; - e = 0xbd1b0f1d977f2246ULL; - f = 0x2b0842eee83c6461ULL; - g = 0x92f4b928a4bf875eULL; - h = 0x61a199a8f7286ba6ULL; - ASSERT_EQ(8 * 18U, section.Size()); - ASSERT_TRUE(section.GetContents(&contents)); - - static const u_int8_t expected[] = { - 0x35, 0xa6, 0x6b, 0x28, 0xf7, 0xa8, 0x99, 0xa1, 0x61, - 0x8b, 0x39, 0x44, 0x8f, 0x44, 0x40, 0x65, 0xa5, 0x0e, - 0xc9, 0x1c, 0x5e, 0x87, 0xbf, 0xa4, 0x28, 0xb9, 0xf4, - 0xcf, 0x15, 0x4a, 0x72, 0xc5, 0x04, 0x4f, 0x69, 0x29, - 0x05, 0x86, 0x2f, 0x61, 0x64, 0x3c, 0xe8, 0xee, 0x42, - 0x8c, 0x3f, 0xfd, 0x7a, 0x18, 0x80, 0xba, 0x11, 0x6f, - 0x5a, 0x0e, 0xb4, 0xec, 0x46, 0x22, 0x7f, 0x97, 0x1d, - 0x2f, 0xda, 0x24, 0x72, 0x3f, 0x42, 0x2d, 0xa0, 0x0a, - 0x1d, 0x97, 0x7f, 0x22, 0x46, 0xec, 0xb4, 0x0e, 0x5a, - 0x53, 0xba, 0x43, 0x21, 0x38, 0x60, 0xae, 0x39, 0xf1, - 0x42, 0xee, 0xe8, 0x3c, 0x64, 0x61, 0x2f, 0x86, 0x05, - 0x16, 0x8e, 0x43, 0x6a, 0xf7, 0x16, 0x89, 0xf1, 0x3e, - 0xf4, 0xb9, 0x28, 0xa4, 0xbf, 0x87, 0x5e, 0x1c, 0xc9, - 0xac, 0xd4, 0xef, 0x23, 0x3e, 0x47, 0xd9, 0x11, 0x53, - 0x61, 0xa1, 0x99, 0xa8, 0xf7, 0x28, 0x6b, 0xa6, 0x35, - 0x46, 0x68, 0xd5, 0xf1, 0xc9, 0x36, 0x37, 0xa1, 0x65, - }; - - ASSERT_TRUE(0 == memcmp(contents.data(), expected, sizeof(expected))); -} - -TEST_F(Append, Section) { - section.Append("murder"); - { - Section middle; - middle.Append(" she"); - section.Append(middle); - } - section.Append(" wrote"); - EXPECT_EQ(16U, section.Size()); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_STREQ(contents.c_str(), "murder she wrote"); -} - -TEST_F(Append, SectionRefs) { - section.Append("sugar "); - Label l; - { - Section middle; - Label m; - middle.B32(m); - section.Append(middle); - m = 0x66726565; - } - section.Append(" jazz"); - EXPECT_EQ(15U, section.Size()); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_STREQ(contents.c_str(), "sugar free jazz"); -} - -TEST_F(Append, LEB128_0) { - section.LEB128(0); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\0", 1), contents); -} - -TEST_F(Append, LEB128_0x3f) { - section.LEB128(0x3f); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x3f", 1), contents); -} - -TEST_F(Append, LEB128_0x40) { - section.LEB128(0x40); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xc0\x00", 2), contents); -} - -TEST_F(Append, LEB128_0x7f) { - section.LEB128(0x7f); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x00", 2), contents); -} - -TEST_F(Append, LEB128_0x80) { - section.LEB128(0x80); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x01", 2), contents); -} - -TEST_F(Append, LEB128_0xff) { - section.LEB128(0xff); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x01", 2), contents); -} - -TEST_F(Append, LEB128_0x1fff) { - section.LEB128(0x1fff); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x3f", 2), contents); -} - -TEST_F(Append, LEB128_0x2000) { - section.LEB128(0x2000); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\xc0\x00", 3), contents); -} - -TEST_F(Append, LEB128_n1) { - section.LEB128(-1); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x7f", 1), contents); -} - -TEST_F(Append, LEB128_n0x40) { - section.LEB128(-0x40); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x40", 1), contents); -} - -TEST_F(Append, LEB128_n0x41) { - section.LEB128(-0x41); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xbf\x7f", 2), contents); -} - -TEST_F(Append, LEB128_n0x7f) { - section.LEB128(-0x7f); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x81\x7f", 2), contents); -} - -TEST_F(Append, LEB128_n0x80) { - section.LEB128(-0x80); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x7f", 2), contents); -} - -TEST_F(Append, LEB128_n0x2000) { - section.LEB128(-0x2000); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x40", 2), contents); -} - -TEST_F(Append, LEB128_n0x2001) { - section.LEB128(-0x2001); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\xbf\x7f", 3), contents); -} - -TEST_F(Append,ULEB128_0) { - section.ULEB128(0); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\0", 1), contents); -} - -TEST_F(Append,ULEB128_1) { - section.ULEB128(1); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x01", 1), contents); -} - -TEST_F(Append,ULEB128_0x3f) { - section.ULEB128(0x3f); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x3f", 1), contents); -} - -TEST_F(Append,ULEB128_0x40) { - section.ULEB128(0x40); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x40", 1), contents); -} - -TEST_F(Append,ULEB128_0x7f) { - section.ULEB128(0x7f); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x7f", 1), contents); -} - -TEST_F(Append,ULEB128_0x80) { - section.ULEB128(0x80); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x01", 2), contents); -} - -TEST_F(Append,ULEB128_0xff) { - section.ULEB128(0xff); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x01", 2), contents); -} - -TEST_F(Append,ULEB128_0x100) { - section.ULEB128(0x100); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x02", 2), contents); -} - -TEST_F(Append,ULEB128_0x1fff) { - section.ULEB128(0x1fff); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x3f", 2), contents); -} - -TEST_F(Append,ULEB128_0x2000) { - section.ULEB128(0x2000); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x40", 2), contents); -} - -TEST_F(Append,ULEB128_0x3fff) { - section.ULEB128(0x3fff); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xff\x7f", 2), contents); -} - -TEST_F(Append,ULEB128_0x4000) { - section.ULEB128(0x4000); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x80\x01", 3), contents); -} - -TEST_F(Append,ULEB128_12857) { - section.ULEB128(12857); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\xb9\x64", 2), contents); -} - -TEST_F(Append, LEBChain) { - section.LEB128(-0x80).ULEB128(12857).Append("*"); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x80\x7f\xb9\x64*", 5), contents); -} - - -class GetContents: public SectionFixture, public Test { }; - -TEST_F(GetContents, Undefined) { - Label l; - section.Append(kLittleEndian, 8, l); - ASSERT_FALSE(section.GetContents(&contents)); -} - -TEST_F(GetContents, ClearsContents) { - section.Append((size_t) 10, '*'); - EXPECT_EQ(10U, section.Size()); - EXPECT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(0U, section.Size()); -} - -TEST_F(GetContents, ClearsReferences) { - Label l; - section.Append(kBigEndian, 1, l); - l = 42; - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_BYTES(contents, I1(42)); - ASSERT_TRUE(section.GetContents(&contents)); // should not die -} - -class Miscellanea: public SectionFixture, public Test { }; - -TEST_F(Miscellanea, Clear) { - section.Append("howdy"); - Label l; - section.L32(l); - EXPECT_EQ(9U, section.Size()); - section.Clear(); - EXPECT_EQ(0U, section.Size()); - l = 0x8d231bf0U; - ASSERT_TRUE(section.GetContents(&contents)); // should not die -} - -TEST_F(Miscellanea, Align) { - section.Append("*"); - EXPECT_EQ(1U, section.Size()); - section.Align(4).Append("*"); - EXPECT_EQ(5U, section.Size()); - section.Append("*").Align(2); - EXPECT_EQ(6U, section.Size()); -} - -TEST_F(Miscellanea, AlignPad) { - section.Append("*"); - EXPECT_EQ(1U, section.Size()); - section.Align(4, ' ').Append("*"); - EXPECT_EQ(5U, section.Size()); - section.Append("*").Align(2, ' '); - EXPECT_EQ(6U, section.Size()); - ASSERT_TRUE(section.GetContents(&contents)); - ASSERT_EQ(string("* **"), contents); -} - -TEST_F(Miscellanea, StartHereMark) { - Label m; - section.Append(42, ' ').Mark(&m).Append(13, '+'); - EXPECT_EQ(42U, m - section.start()); - EXPECT_EQ(42U + 13U, section.Here() - section.start()); - EXPECT_FALSE(section.start().IsKnownConstant()); - EXPECT_FALSE(m.IsKnownConstant()); - EXPECT_FALSE(section.Here().IsKnownConstant()); -} - -TEST_F(Miscellanea, Endianness) { - section.set_endianness(kBigEndian); - EXPECT_EQ(kBigEndian, section.endianness()); - section.set_endianness(kLittleEndian); - EXPECT_EQ(kLittleEndian, section.endianness()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/testdata/func-line-pairing.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/testdata/func-line-pairing.h deleted file mode 100644 index 05538f96..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/testdata/func-line-pairing.h +++ /dev/null @@ -1,676 +0,0 @@ -// -*- mode: c++ -*- - -// Test data for pairing functions and lines. -// -// For a pair of functions that are adjacent (10,20),(20,25) and a -// pair that are not (10,15),(20,25), we include a test case for every -// possible arrangement of two lines relative to those functions. We -// include cases only for non-empty ranges, since empty functions and -// lines are dropped before we do any pairing. -// -// Each test case is represented by a macro call of the form: -// -// PAIRING(func1_start, func1_end, func2_start, func2_end, -// line1_start, line1_end, line2_start, line2_end, -// func1_num_lines, func2_num_lines, -// func1_line1_start, func1_line1_end, -// func1_line2_start, func1_line2_end, -// func2_line1_start, func2_line1_end, -// func2_line2_start, func2_line2_end, -// uncovered_funcs, uncovered_lines) -// -// where: -// - funcN_{start,end} is the range of the N'th function -// - lineN_{start,end} is the range of the N'th function -// - funcN_num_lines is the number of source lines that should be -// paired with the N'th function -// - funcN_lineM_{start,end} is the range of the M'th line -// paired with the N'th function, where 0,0 indicates that -// there should be no such line paired -// - uncovered_funcs is the number of functions with area that is -// uncovered by any line, and -// - uncovered_lines is the reverse. - -// func1 func2 line1 line2 num pairing1 pairing2 uncovered -PAIRING(10, 20, 20, 25, 6, 7, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #0 -PAIRING(10, 20, 20, 25, 6, 7, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #1 -PAIRING(10, 20, 20, 25, 6, 7, 7, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #2 -PAIRING(10, 20, 20, 25, 6, 7, 7, 20, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 2) // #3 -PAIRING(10, 20, 20, 25, 6, 7, 7, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 2) // #4 -PAIRING(10, 20, 20, 25, 6, 7, 7, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #5 -PAIRING(10, 20, 20, 25, 6, 7, 7, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #6 -PAIRING(10, 20, 20, 25, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #7 -PAIRING(10, 20, 20, 25, 6, 7, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #8 -PAIRING(10, 20, 20, 25, 6, 7, 8, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #9 -PAIRING(10, 20, 20, 25, 6, 7, 8, 20, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 2) // #10 -PAIRING(10, 20, 20, 25, 6, 7, 8, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 2) // #11 -PAIRING(10, 20, 20, 25, 6, 7, 8, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #12 -PAIRING(10, 20, 20, 25, 6, 7, 8, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #13 -PAIRING(10, 20, 20, 25, 6, 7, 10, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #14 -PAIRING(10, 20, 20, 25, 6, 7, 10, 20, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 1) // #15 -PAIRING(10, 20, 20, 25, 6, 7, 10, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 1) // #16 -PAIRING(10, 20, 20, 25, 6, 7, 10, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #17 -PAIRING(10, 20, 20, 25, 6, 7, 10, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #18 -PAIRING(10, 20, 20, 25, 6, 7, 11, 12, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #19 -PAIRING(10, 20, 20, 25, 6, 7, 11, 20, 1, 0, 11, 20, 0, 0, 0, 0, 0, 0, 2, 1) // #20 -PAIRING(10, 20, 20, 25, 6, 7, 11, 21, 1, 1, 11, 20, 0, 0, 20, 21, 0, 0, 2, 1) // #21 -PAIRING(10, 20, 20, 25, 6, 7, 11, 25, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 1) // #22 -PAIRING(10, 20, 20, 25, 6, 7, 11, 26, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 2) // #23 -PAIRING(10, 20, 20, 25, 6, 7, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #24 -PAIRING(10, 20, 20, 25, 6, 7, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #25 -PAIRING(10, 20, 20, 25, 6, 7, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #26 -PAIRING(10, 20, 20, 25, 6, 7, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #27 -PAIRING(10, 20, 20, 25, 6, 7, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #28 -PAIRING(10, 20, 20, 25, 6, 7, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #29 -PAIRING(10, 20, 20, 25, 6, 7, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #30 -PAIRING(10, 20, 20, 25, 6, 7, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #31 -PAIRING(10, 20, 20, 25, 6, 10, 10, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #32 -PAIRING(10, 20, 20, 25, 6, 10, 10, 20, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 1) // #33 -PAIRING(10, 20, 20, 25, 6, 10, 10, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 1) // #34 -PAIRING(10, 20, 20, 25, 6, 10, 10, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #35 -PAIRING(10, 20, 20, 25, 6, 10, 10, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #36 -PAIRING(10, 20, 20, 25, 6, 10, 11, 12, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #37 -PAIRING(10, 20, 20, 25, 6, 10, 11, 20, 1, 0, 11, 20, 0, 0, 0, 0, 0, 0, 2, 1) // #38 -PAIRING(10, 20, 20, 25, 6, 10, 11, 21, 1, 1, 11, 20, 0, 0, 20, 21, 0, 0, 2, 1) // #39 -PAIRING(10, 20, 20, 25, 6, 10, 11, 25, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 1) // #40 -PAIRING(10, 20, 20, 25, 6, 10, 11, 26, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 2) // #41 -PAIRING(10, 20, 20, 25, 6, 10, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #42 -PAIRING(10, 20, 20, 25, 6, 10, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #43 -PAIRING(10, 20, 20, 25, 6, 10, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #44 -PAIRING(10, 20, 20, 25, 6, 10, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #45 -PAIRING(10, 20, 20, 25, 6, 10, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #46 -PAIRING(10, 20, 20, 25, 6, 10, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #47 -PAIRING(10, 20, 20, 25, 6, 10, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #48 -PAIRING(10, 20, 20, 25, 6, 10, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #49 -PAIRING(10, 20, 20, 25, 6, 11, 11, 12, 2, 0, 10, 11, 11, 12, 0, 0, 0, 0, 2, 1) // #50 -PAIRING(10, 20, 20, 25, 6, 11, 11, 20, 2, 0, 10, 11, 11, 20, 0, 0, 0, 0, 1, 1) // #51 -PAIRING(10, 20, 20, 25, 6, 11, 11, 21, 2, 1, 10, 11, 11, 20, 20, 21, 0, 0, 1, 1) // #52 -PAIRING(10, 20, 20, 25, 6, 11, 11, 25, 2, 1, 10, 11, 11, 20, 20, 25, 0, 0, 0, 1) // #53 -PAIRING(10, 20, 20, 25, 6, 11, 11, 26, 2, 1, 10, 11, 11, 20, 20, 25, 0, 0, 0, 2) // #54 -PAIRING(10, 20, 20, 25, 6, 11, 12, 13, 2, 0, 10, 11, 12, 13, 0, 0, 0, 0, 2, 1) // #55 -PAIRING(10, 20, 20, 25, 6, 11, 12, 20, 2, 0, 10, 11, 12, 20, 0, 0, 0, 0, 2, 1) // #56 -PAIRING(10, 20, 20, 25, 6, 11, 12, 21, 2, 1, 10, 11, 12, 20, 20, 21, 0, 0, 2, 1) // #57 -PAIRING(10, 20, 20, 25, 6, 11, 12, 25, 2, 1, 10, 11, 12, 20, 20, 25, 0, 0, 1, 1) // #58 -PAIRING(10, 20, 20, 25, 6, 11, 12, 26, 2, 1, 10, 11, 12, 20, 20, 25, 0, 0, 1, 2) // #59 -PAIRING(10, 20, 20, 25, 6, 11, 20, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 1) // #60 -PAIRING(10, 20, 20, 25, 6, 11, 20, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #61 -PAIRING(10, 20, 20, 25, 6, 11, 20, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #62 -PAIRING(10, 20, 20, 25, 6, 11, 21, 22, 1, 1, 10, 11, 0, 0, 21, 22, 0, 0, 2, 1) // #63 -PAIRING(10, 20, 20, 25, 6, 11, 21, 25, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 1) // #64 -PAIRING(10, 20, 20, 25, 6, 11, 21, 26, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 2) // #65 -PAIRING(10, 20, 20, 25, 6, 11, 25, 26, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #66 -PAIRING(10, 20, 20, 25, 6, 11, 26, 27, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #67 -PAIRING(10, 20, 20, 25, 6, 20, 20, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 1) // #68 -PAIRING(10, 20, 20, 25, 6, 20, 20, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #69 -PAIRING(10, 20, 20, 25, 6, 20, 20, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #70 -PAIRING(10, 20, 20, 25, 6, 20, 21, 22, 1, 1, 10, 20, 0, 0, 21, 22, 0, 0, 1, 1) // #71 -PAIRING(10, 20, 20, 25, 6, 20, 21, 25, 1, 1, 10, 20, 0, 0, 21, 25, 0, 0, 1, 1) // #72 -PAIRING(10, 20, 20, 25, 6, 20, 21, 26, 1, 1, 10, 20, 0, 0, 21, 25, 0, 0, 1, 2) // #73 -PAIRING(10, 20, 20, 25, 6, 20, 25, 26, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 2) // #74 -PAIRING(10, 20, 20, 25, 6, 20, 26, 27, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 2) // #75 -PAIRING(10, 20, 20, 25, 6, 21, 21, 22, 1, 2, 10, 20, 0, 0, 20, 21, 21, 22, 1, 1) // #76 -PAIRING(10, 20, 20, 25, 6, 21, 21, 25, 1, 2, 10, 20, 0, 0, 20, 21, 21, 25, 0, 1) // #77 -PAIRING(10, 20, 20, 25, 6, 21, 21, 26, 1, 2, 10, 20, 0, 0, 20, 21, 21, 25, 0, 2) // #78 -PAIRING(10, 20, 20, 25, 6, 21, 22, 23, 1, 2, 10, 20, 0, 0, 20, 21, 22, 23, 1, 1) // #79 -PAIRING(10, 20, 20, 25, 6, 21, 22, 25, 1, 2, 10, 20, 0, 0, 20, 21, 22, 25, 1, 1) // #80 -PAIRING(10, 20, 20, 25, 6, 21, 22, 26, 1, 2, 10, 20, 0, 0, 20, 21, 22, 25, 1, 2) // #81 -PAIRING(10, 20, 20, 25, 6, 21, 25, 26, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 2) // #82 -PAIRING(10, 20, 20, 25, 6, 21, 26, 27, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 2) // #83 -PAIRING(10, 20, 20, 25, 6, 25, 25, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #84 -PAIRING(10, 20, 20, 25, 6, 25, 26, 27, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #85 -PAIRING(10, 20, 20, 25, 6, 26, 26, 27, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #86 -PAIRING(10, 20, 20, 25, 6, 26, 27, 28, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #87 -PAIRING(10, 20, 20, 25, 10, 11, 11, 12, 2, 0, 10, 11, 11, 12, 0, 0, 0, 0, 2, 0) // #88 -PAIRING(10, 20, 20, 25, 10, 11, 11, 20, 2, 0, 10, 11, 11, 20, 0, 0, 0, 0, 1, 0) // #89 -PAIRING(10, 20, 20, 25, 10, 11, 11, 21, 2, 1, 10, 11, 11, 20, 20, 21, 0, 0, 1, 0) // #90 -PAIRING(10, 20, 20, 25, 10, 11, 11, 25, 2, 1, 10, 11, 11, 20, 20, 25, 0, 0, 0, 0) // #91 -PAIRING(10, 20, 20, 25, 10, 11, 11, 26, 2, 1, 10, 11, 11, 20, 20, 25, 0, 0, 0, 1) // #92 -PAIRING(10, 20, 20, 25, 10, 11, 12, 13, 2, 0, 10, 11, 12, 13, 0, 0, 0, 0, 2, 0) // #93 -PAIRING(10, 20, 20, 25, 10, 11, 12, 20, 2, 0, 10, 11, 12, 20, 0, 0, 0, 0, 2, 0) // #94 -PAIRING(10, 20, 20, 25, 10, 11, 12, 21, 2, 1, 10, 11, 12, 20, 20, 21, 0, 0, 2, 0) // #95 -PAIRING(10, 20, 20, 25, 10, 11, 12, 25, 2, 1, 10, 11, 12, 20, 20, 25, 0, 0, 1, 0) // #96 -PAIRING(10, 20, 20, 25, 10, 11, 12, 26, 2, 1, 10, 11, 12, 20, 20, 25, 0, 0, 1, 1) // #97 -PAIRING(10, 20, 20, 25, 10, 11, 20, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 0) // #98 -PAIRING(10, 20, 20, 25, 10, 11, 20, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 0) // #99 -PAIRING(10, 20, 20, 25, 10, 11, 20, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #100 -PAIRING(10, 20, 20, 25, 10, 11, 21, 22, 1, 1, 10, 11, 0, 0, 21, 22, 0, 0, 2, 0) // #101 -PAIRING(10, 20, 20, 25, 10, 11, 21, 25, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 0) // #102 -PAIRING(10, 20, 20, 25, 10, 11, 21, 26, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 1) // #103 -PAIRING(10, 20, 20, 25, 10, 11, 25, 26, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #104 -PAIRING(10, 20, 20, 25, 10, 11, 26, 27, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #105 -PAIRING(10, 20, 20, 25, 10, 20, 20, 21, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 0) // #106 -PAIRING(10, 20, 20, 25, 10, 20, 20, 25, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 0) // #107 -PAIRING(10, 20, 20, 25, 10, 20, 20, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #108 -PAIRING(10, 20, 20, 25, 10, 20, 21, 22, 1, 1, 10, 20, 0, 0, 21, 22, 0, 0, 1, 0) // #109 -PAIRING(10, 20, 20, 25, 10, 20, 21, 25, 1, 1, 10, 20, 0, 0, 21, 25, 0, 0, 1, 0) // #110 -PAIRING(10, 20, 20, 25, 10, 20, 21, 26, 1, 1, 10, 20, 0, 0, 21, 25, 0, 0, 1, 1) // #111 -PAIRING(10, 20, 20, 25, 10, 20, 25, 26, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 1) // #112 -PAIRING(10, 20, 20, 25, 10, 20, 26, 27, 1, 0, 10, 20, 0, 0, 0, 0, 0, 0, 1, 1) // #113 -PAIRING(10, 20, 20, 25, 10, 21, 21, 22, 1, 2, 10, 20, 0, 0, 20, 21, 21, 22, 1, 0) // #114 -PAIRING(10, 20, 20, 25, 10, 21, 21, 25, 1, 2, 10, 20, 0, 0, 20, 21, 21, 25, 0, 0) // #115 -PAIRING(10, 20, 20, 25, 10, 21, 21, 26, 1, 2, 10, 20, 0, 0, 20, 21, 21, 25, 0, 1) // #116 -PAIRING(10, 20, 20, 25, 10, 21, 22, 23, 1, 2, 10, 20, 0, 0, 20, 21, 22, 23, 1, 0) // #117 -PAIRING(10, 20, 20, 25, 10, 21, 22, 25, 1, 2, 10, 20, 0, 0, 20, 21, 22, 25, 1, 0) // #118 -PAIRING(10, 20, 20, 25, 10, 21, 22, 26, 1, 2, 10, 20, 0, 0, 20, 21, 22, 25, 1, 1) // #119 -PAIRING(10, 20, 20, 25, 10, 21, 25, 26, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 1) // #120 -PAIRING(10, 20, 20, 25, 10, 21, 26, 27, 1, 1, 10, 20, 0, 0, 20, 21, 0, 0, 1, 1) // #121 -PAIRING(10, 20, 20, 25, 10, 25, 25, 26, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #122 -PAIRING(10, 20, 20, 25, 10, 25, 26, 27, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 1) // #123 -PAIRING(10, 20, 20, 25, 10, 26, 26, 27, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #124 -PAIRING(10, 20, 20, 25, 10, 26, 27, 28, 1, 1, 10, 20, 0, 0, 20, 25, 0, 0, 0, 2) // #125 -PAIRING(10, 20, 20, 25, 11, 12, 12, 13, 2, 0, 11, 12, 12, 13, 0, 0, 0, 0, 2, 0) // #126 -PAIRING(10, 20, 20, 25, 11, 12, 12, 20, 2, 0, 11, 12, 12, 20, 0, 0, 0, 0, 2, 0) // #127 -PAIRING(10, 20, 20, 25, 11, 12, 12, 21, 2, 1, 11, 12, 12, 20, 20, 21, 0, 0, 2, 0) // #128 -PAIRING(10, 20, 20, 25, 11, 12, 12, 25, 2, 1, 11, 12, 12, 20, 20, 25, 0, 0, 1, 0) // #129 -PAIRING(10, 20, 20, 25, 11, 12, 12, 26, 2, 1, 11, 12, 12, 20, 20, 25, 0, 0, 1, 1) // #130 -PAIRING(10, 20, 20, 25, 11, 12, 13, 14, 2, 0, 11, 12, 13, 14, 0, 0, 0, 0, 2, 0) // #131 -PAIRING(10, 20, 20, 25, 11, 12, 13, 20, 2, 0, 11, 12, 13, 20, 0, 0, 0, 0, 2, 0) // #132 -PAIRING(10, 20, 20, 25, 11, 12, 13, 21, 2, 1, 11, 12, 13, 20, 20, 21, 0, 0, 2, 0) // #133 -PAIRING(10, 20, 20, 25, 11, 12, 13, 25, 2, 1, 11, 12, 13, 20, 20, 25, 0, 0, 1, 0) // #134 -PAIRING(10, 20, 20, 25, 11, 12, 13, 26, 2, 1, 11, 12, 13, 20, 20, 25, 0, 0, 1, 1) // #135 -PAIRING(10, 20, 20, 25, 11, 12, 20, 21, 1, 1, 11, 12, 0, 0, 20, 21, 0, 0, 2, 0) // #136 -PAIRING(10, 20, 20, 25, 11, 12, 20, 25, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 0) // #137 -PAIRING(10, 20, 20, 25, 11, 12, 20, 26, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #138 -PAIRING(10, 20, 20, 25, 11, 12, 21, 22, 1, 1, 11, 12, 0, 0, 21, 22, 0, 0, 2, 0) // #139 -PAIRING(10, 20, 20, 25, 11, 12, 21, 25, 1, 1, 11, 12, 0, 0, 21, 25, 0, 0, 2, 0) // #140 -PAIRING(10, 20, 20, 25, 11, 12, 21, 26, 1, 1, 11, 12, 0, 0, 21, 25, 0, 0, 2, 1) // #141 -PAIRING(10, 20, 20, 25, 11, 12, 25, 26, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #142 -PAIRING(10, 20, 20, 25, 11, 12, 26, 27, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #143 -PAIRING(10, 20, 20, 25, 11, 20, 20, 21, 1, 1, 11, 20, 0, 0, 20, 21, 0, 0, 2, 0) // #144 -PAIRING(10, 20, 20, 25, 11, 20, 20, 25, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 0) // #145 -PAIRING(10, 20, 20, 25, 11, 20, 20, 26, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 1) // #146 -PAIRING(10, 20, 20, 25, 11, 20, 21, 22, 1, 1, 11, 20, 0, 0, 21, 22, 0, 0, 2, 0) // #147 -PAIRING(10, 20, 20, 25, 11, 20, 21, 25, 1, 1, 11, 20, 0, 0, 21, 25, 0, 0, 2, 0) // #148 -PAIRING(10, 20, 20, 25, 11, 20, 21, 26, 1, 1, 11, 20, 0, 0, 21, 25, 0, 0, 2, 1) // #149 -PAIRING(10, 20, 20, 25, 11, 20, 25, 26, 1, 0, 11, 20, 0, 0, 0, 0, 0, 0, 2, 1) // #150 -PAIRING(10, 20, 20, 25, 11, 20, 26, 27, 1, 0, 11, 20, 0, 0, 0, 0, 0, 0, 2, 1) // #151 -PAIRING(10, 20, 20, 25, 11, 21, 21, 22, 1, 2, 11, 20, 0, 0, 20, 21, 21, 22, 2, 0) // #152 -PAIRING(10, 20, 20, 25, 11, 21, 21, 25, 1, 2, 11, 20, 0, 0, 20, 21, 21, 25, 1, 0) // #153 -PAIRING(10, 20, 20, 25, 11, 21, 21, 26, 1, 2, 11, 20, 0, 0, 20, 21, 21, 25, 1, 1) // #154 -PAIRING(10, 20, 20, 25, 11, 21, 22, 23, 1, 2, 11, 20, 0, 0, 20, 21, 22, 23, 2, 0) // #155 -PAIRING(10, 20, 20, 25, 11, 21, 22, 25, 1, 2, 11, 20, 0, 0, 20, 21, 22, 25, 2, 0) // #156 -PAIRING(10, 20, 20, 25, 11, 21, 22, 26, 1, 2, 11, 20, 0, 0, 20, 21, 22, 25, 2, 1) // #157 -PAIRING(10, 20, 20, 25, 11, 21, 25, 26, 1, 1, 11, 20, 0, 0, 20, 21, 0, 0, 2, 1) // #158 -PAIRING(10, 20, 20, 25, 11, 21, 26, 27, 1, 1, 11, 20, 0, 0, 20, 21, 0, 0, 2, 1) // #159 -PAIRING(10, 20, 20, 25, 11, 25, 25, 26, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 1) // #160 -PAIRING(10, 20, 20, 25, 11, 25, 26, 27, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 1) // #161 -PAIRING(10, 20, 20, 25, 11, 26, 26, 27, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 2) // #162 -PAIRING(10, 20, 20, 25, 11, 26, 27, 28, 1, 1, 11, 20, 0, 0, 20, 25, 0, 0, 1, 2) // #163 -PAIRING(10, 20, 20, 25, 20, 21, 21, 22, 0, 2, 0, 0, 0, 0, 20, 21, 21, 22, 2, 0) // #164 -PAIRING(10, 20, 20, 25, 20, 21, 21, 25, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 0) // #165 -PAIRING(10, 20, 20, 25, 20, 21, 21, 26, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 1) // #166 -PAIRING(10, 20, 20, 25, 20, 21, 22, 23, 0, 2, 0, 0, 0, 0, 20, 21, 22, 23, 2, 0) // #167 -PAIRING(10, 20, 20, 25, 20, 21, 22, 25, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 0) // #168 -PAIRING(10, 20, 20, 25, 20, 21, 22, 26, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 1) // #169 -PAIRING(10, 20, 20, 25, 20, 21, 25, 26, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #170 -PAIRING(10, 20, 20, 25, 20, 21, 26, 27, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #171 -PAIRING(10, 20, 20, 25, 20, 25, 25, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #172 -PAIRING(10, 20, 20, 25, 20, 25, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #173 -PAIRING(10, 20, 20, 25, 20, 26, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #174 -PAIRING(10, 20, 20, 25, 20, 26, 27, 28, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #175 -PAIRING(10, 20, 20, 25, 21, 22, 22, 23, 0, 2, 0, 0, 0, 0, 21, 22, 22, 23, 2, 0) // #176 -PAIRING(10, 20, 20, 25, 21, 22, 22, 25, 0, 2, 0, 0, 0, 0, 21, 22, 22, 25, 2, 0) // #177 -PAIRING(10, 20, 20, 25, 21, 22, 22, 26, 0, 2, 0, 0, 0, 0, 21, 22, 22, 25, 2, 1) // #178 -PAIRING(10, 20, 20, 25, 21, 22, 23, 24, 0, 2, 0, 0, 0, 0, 21, 22, 23, 24, 2, 0) // #179 -PAIRING(10, 20, 20, 25, 21, 22, 23, 25, 0, 2, 0, 0, 0, 0, 21, 22, 23, 25, 2, 0) // #180 -PAIRING(10, 20, 20, 25, 21, 22, 23, 26, 0, 2, 0, 0, 0, 0, 21, 22, 23, 25, 2, 1) // #181 -PAIRING(10, 20, 20, 25, 21, 22, 25, 26, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #182 -PAIRING(10, 20, 20, 25, 21, 22, 26, 27, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #183 -PAIRING(10, 20, 20, 25, 21, 25, 25, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #184 -PAIRING(10, 20, 20, 25, 21, 25, 26, 27, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #185 -PAIRING(10, 20, 20, 25, 21, 26, 26, 27, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #186 -PAIRING(10, 20, 20, 25, 21, 26, 27, 28, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #187 -PAIRING(10, 20, 20, 25, 25, 26, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #188 -PAIRING(10, 20, 20, 25, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #189 -PAIRING(10, 20, 20, 25, 26, 27, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #190 -PAIRING(10, 20, 20, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #191 -PAIRING(10, 15, 20, 25, 6, 7, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #192 -PAIRING(10, 15, 20, 25, 6, 7, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #193 -PAIRING(10, 15, 20, 25, 6, 7, 7, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #194 -PAIRING(10, 15, 20, 25, 6, 7, 7, 15, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #195 -PAIRING(10, 15, 20, 25, 6, 7, 7, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #196 -PAIRING(10, 15, 20, 25, 6, 7, 7, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #197 -PAIRING(10, 15, 20, 25, 6, 7, 7, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #198 -PAIRING(10, 15, 20, 25, 6, 7, 7, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #199 -PAIRING(10, 15, 20, 25, 6, 7, 7, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #200 -PAIRING(10, 15, 20, 25, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #201 -PAIRING(10, 15, 20, 25, 6, 7, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #202 -PAIRING(10, 15, 20, 25, 6, 7, 8, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #203 -PAIRING(10, 15, 20, 25, 6, 7, 8, 15, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #204 -PAIRING(10, 15, 20, 25, 6, 7, 8, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #205 -PAIRING(10, 15, 20, 25, 6, 7, 8, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #206 -PAIRING(10, 15, 20, 25, 6, 7, 8, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #207 -PAIRING(10, 15, 20, 25, 6, 7, 8, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #208 -PAIRING(10, 15, 20, 25, 6, 7, 8, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #209 -PAIRING(10, 15, 20, 25, 6, 7, 10, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #210 -PAIRING(10, 15, 20, 25, 6, 7, 10, 15, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #211 -PAIRING(10, 15, 20, 25, 6, 7, 10, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #212 -PAIRING(10, 15, 20, 25, 6, 7, 10, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #213 -PAIRING(10, 15, 20, 25, 6, 7, 10, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #214 -PAIRING(10, 15, 20, 25, 6, 7, 10, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #215 -PAIRING(10, 15, 20, 25, 6, 7, 10, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #216 -PAIRING(10, 15, 20, 25, 6, 7, 11, 12, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #217 -PAIRING(10, 15, 20, 25, 6, 7, 11, 15, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #218 -PAIRING(10, 15, 20, 25, 6, 7, 11, 16, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #219 -PAIRING(10, 15, 20, 25, 6, 7, 11, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #220 -PAIRING(10, 15, 20, 25, 6, 7, 11, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #221 -PAIRING(10, 15, 20, 25, 6, 7, 11, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #222 -PAIRING(10, 15, 20, 25, 6, 7, 11, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #223 -PAIRING(10, 15, 20, 25, 6, 7, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #224 -PAIRING(10, 15, 20, 25, 6, 7, 15, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #225 -PAIRING(10, 15, 20, 25, 6, 7, 15, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #226 -PAIRING(10, 15, 20, 25, 6, 7, 15, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #227 -PAIRING(10, 15, 20, 25, 6, 7, 15, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #228 -PAIRING(10, 15, 20, 25, 6, 7, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #229 -PAIRING(10, 15, 20, 25, 6, 7, 16, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #230 -PAIRING(10, 15, 20, 25, 6, 7, 16, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #231 -PAIRING(10, 15, 20, 25, 6, 7, 16, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #232 -PAIRING(10, 15, 20, 25, 6, 7, 16, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #233 -PAIRING(10, 15, 20, 25, 6, 7, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #234 -PAIRING(10, 15, 20, 25, 6, 7, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #235 -PAIRING(10, 15, 20, 25, 6, 7, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #236 -PAIRING(10, 15, 20, 25, 6, 7, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #237 -PAIRING(10, 15, 20, 25, 6, 7, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #238 -PAIRING(10, 15, 20, 25, 6, 7, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #239 -PAIRING(10, 15, 20, 25, 6, 7, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #240 -PAIRING(10, 15, 20, 25, 6, 7, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #241 -PAIRING(10, 15, 20, 25, 6, 10, 10, 11, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #242 -PAIRING(10, 15, 20, 25, 6, 10, 10, 15, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #243 -PAIRING(10, 15, 20, 25, 6, 10, 10, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #244 -PAIRING(10, 15, 20, 25, 6, 10, 10, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #245 -PAIRING(10, 15, 20, 25, 6, 10, 10, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #246 -PAIRING(10, 15, 20, 25, 6, 10, 10, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #247 -PAIRING(10, 15, 20, 25, 6, 10, 10, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #248 -PAIRING(10, 15, 20, 25, 6, 10, 11, 12, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #249 -PAIRING(10, 15, 20, 25, 6, 10, 11, 15, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #250 -PAIRING(10, 15, 20, 25, 6, 10, 11, 16, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #251 -PAIRING(10, 15, 20, 25, 6, 10, 11, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #252 -PAIRING(10, 15, 20, 25, 6, 10, 11, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #253 -PAIRING(10, 15, 20, 25, 6, 10, 11, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #254 -PAIRING(10, 15, 20, 25, 6, 10, 11, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #255 -PAIRING(10, 15, 20, 25, 6, 10, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #256 -PAIRING(10, 15, 20, 25, 6, 10, 15, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #257 -PAIRING(10, 15, 20, 25, 6, 10, 15, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #258 -PAIRING(10, 15, 20, 25, 6, 10, 15, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #259 -PAIRING(10, 15, 20, 25, 6, 10, 15, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #260 -PAIRING(10, 15, 20, 25, 6, 10, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #261 -PAIRING(10, 15, 20, 25, 6, 10, 16, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #262 -PAIRING(10, 15, 20, 25, 6, 10, 16, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #263 -PAIRING(10, 15, 20, 25, 6, 10, 16, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #264 -PAIRING(10, 15, 20, 25, 6, 10, 16, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #265 -PAIRING(10, 15, 20, 25, 6, 10, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #266 -PAIRING(10, 15, 20, 25, 6, 10, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #267 -PAIRING(10, 15, 20, 25, 6, 10, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #268 -PAIRING(10, 15, 20, 25, 6, 10, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #269 -PAIRING(10, 15, 20, 25, 6, 10, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #270 -PAIRING(10, 15, 20, 25, 6, 10, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #271 -PAIRING(10, 15, 20, 25, 6, 10, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #272 -PAIRING(10, 15, 20, 25, 6, 10, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #273 -PAIRING(10, 15, 20, 25, 6, 11, 11, 12, 2, 0, 10, 11, 11, 12, 0, 0, 0, 0, 2, 1) // #274 -PAIRING(10, 15, 20, 25, 6, 11, 11, 15, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 1) // #275 -PAIRING(10, 15, 20, 25, 6, 11, 11, 16, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 2) // #276 -PAIRING(10, 15, 20, 25, 6, 11, 11, 20, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 1) // #277 -PAIRING(10, 15, 20, 25, 6, 11, 11, 21, 2, 1, 10, 11, 11, 15, 20, 21, 0, 0, 1, 2) // #278 -PAIRING(10, 15, 20, 25, 6, 11, 11, 25, 2, 1, 10, 11, 11, 15, 20, 25, 0, 0, 0, 2) // #279 -PAIRING(10, 15, 20, 25, 6, 11, 11, 26, 2, 1, 10, 11, 11, 15, 20, 25, 0, 0, 0, 2) // #280 -PAIRING(10, 15, 20, 25, 6, 11, 12, 13, 2, 0, 10, 11, 12, 13, 0, 0, 0, 0, 2, 1) // #281 -PAIRING(10, 15, 20, 25, 6, 11, 12, 15, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 1) // #282 -PAIRING(10, 15, 20, 25, 6, 11, 12, 16, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 2) // #283 -PAIRING(10, 15, 20, 25, 6, 11, 12, 20, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 1) // #284 -PAIRING(10, 15, 20, 25, 6, 11, 12, 21, 2, 1, 10, 11, 12, 15, 20, 21, 0, 0, 2, 2) // #285 -PAIRING(10, 15, 20, 25, 6, 11, 12, 25, 2, 1, 10, 11, 12, 15, 20, 25, 0, 0, 1, 2) // #286 -PAIRING(10, 15, 20, 25, 6, 11, 12, 26, 2, 1, 10, 11, 12, 15, 20, 25, 0, 0, 1, 2) // #287 -PAIRING(10, 15, 20, 25, 6, 11, 15, 16, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #288 -PAIRING(10, 15, 20, 25, 6, 11, 15, 20, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #289 -PAIRING(10, 15, 20, 25, 6, 11, 15, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 2) // #290 -PAIRING(10, 15, 20, 25, 6, 11, 15, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #291 -PAIRING(10, 15, 20, 25, 6, 11, 15, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #292 -PAIRING(10, 15, 20, 25, 6, 11, 16, 17, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #293 -PAIRING(10, 15, 20, 25, 6, 11, 16, 20, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #294 -PAIRING(10, 15, 20, 25, 6, 11, 16, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 2) // #295 -PAIRING(10, 15, 20, 25, 6, 11, 16, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #296 -PAIRING(10, 15, 20, 25, 6, 11, 16, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #297 -PAIRING(10, 15, 20, 25, 6, 11, 20, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 1) // #298 -PAIRING(10, 15, 20, 25, 6, 11, 20, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #299 -PAIRING(10, 15, 20, 25, 6, 11, 20, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 2) // #300 -PAIRING(10, 15, 20, 25, 6, 11, 21, 22, 1, 1, 10, 11, 0, 0, 21, 22, 0, 0, 2, 1) // #301 -PAIRING(10, 15, 20, 25, 6, 11, 21, 25, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 1) // #302 -PAIRING(10, 15, 20, 25, 6, 11, 21, 26, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 2) // #303 -PAIRING(10, 15, 20, 25, 6, 11, 25, 26, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #304 -PAIRING(10, 15, 20, 25, 6, 11, 26, 27, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 2) // #305 -PAIRING(10, 15, 20, 25, 6, 15, 15, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #306 -PAIRING(10, 15, 20, 25, 6, 15, 15, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #307 -PAIRING(10, 15, 20, 25, 6, 15, 15, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #308 -PAIRING(10, 15, 20, 25, 6, 15, 15, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #309 -PAIRING(10, 15, 20, 25, 6, 15, 15, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #310 -PAIRING(10, 15, 20, 25, 6, 15, 16, 17, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #311 -PAIRING(10, 15, 20, 25, 6, 15, 16, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #312 -PAIRING(10, 15, 20, 25, 6, 15, 16, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #313 -PAIRING(10, 15, 20, 25, 6, 15, 16, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #314 -PAIRING(10, 15, 20, 25, 6, 15, 16, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #315 -PAIRING(10, 15, 20, 25, 6, 15, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #316 -PAIRING(10, 15, 20, 25, 6, 15, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #317 -PAIRING(10, 15, 20, 25, 6, 15, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #318 -PAIRING(10, 15, 20, 25, 6, 15, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 1) // #319 -PAIRING(10, 15, 20, 25, 6, 15, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #320 -PAIRING(10, 15, 20, 25, 6, 15, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 2) // #321 -PAIRING(10, 15, 20, 25, 6, 15, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #322 -PAIRING(10, 15, 20, 25, 6, 15, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #323 -PAIRING(10, 15, 20, 25, 6, 16, 16, 17, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #324 -PAIRING(10, 15, 20, 25, 6, 16, 16, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #325 -PAIRING(10, 15, 20, 25, 6, 16, 16, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #326 -PAIRING(10, 15, 20, 25, 6, 16, 16, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #327 -PAIRING(10, 15, 20, 25, 6, 16, 16, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #328 -PAIRING(10, 15, 20, 25, 6, 16, 17, 18, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #329 -PAIRING(10, 15, 20, 25, 6, 16, 17, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #330 -PAIRING(10, 15, 20, 25, 6, 16, 17, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #331 -PAIRING(10, 15, 20, 25, 6, 16, 17, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #332 -PAIRING(10, 15, 20, 25, 6, 16, 17, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #333 -PAIRING(10, 15, 20, 25, 6, 16, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #334 -PAIRING(10, 15, 20, 25, 6, 16, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #335 -PAIRING(10, 15, 20, 25, 6, 16, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #336 -PAIRING(10, 15, 20, 25, 6, 16, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 1) // #337 -PAIRING(10, 15, 20, 25, 6, 16, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #338 -PAIRING(10, 15, 20, 25, 6, 16, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 2) // #339 -PAIRING(10, 15, 20, 25, 6, 16, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #340 -PAIRING(10, 15, 20, 25, 6, 16, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #341 -PAIRING(10, 15, 20, 25, 6, 20, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #342 -PAIRING(10, 15, 20, 25, 6, 20, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #343 -PAIRING(10, 15, 20, 25, 6, 20, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #344 -PAIRING(10, 15, 20, 25, 6, 20, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 1) // #345 -PAIRING(10, 15, 20, 25, 6, 20, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #346 -PAIRING(10, 15, 20, 25, 6, 20, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 2) // #347 -PAIRING(10, 15, 20, 25, 6, 20, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #348 -PAIRING(10, 15, 20, 25, 6, 20, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #349 -PAIRING(10, 15, 20, 25, 6, 21, 21, 22, 1, 2, 10, 15, 0, 0, 20, 21, 21, 22, 1, 1) // #350 -PAIRING(10, 15, 20, 25, 6, 21, 21, 25, 1, 2, 10, 15, 0, 0, 20, 21, 21, 25, 0, 1) // #351 -PAIRING(10, 15, 20, 25, 6, 21, 21, 26, 1, 2, 10, 15, 0, 0, 20, 21, 21, 25, 0, 2) // #352 -PAIRING(10, 15, 20, 25, 6, 21, 22, 23, 1, 2, 10, 15, 0, 0, 20, 21, 22, 23, 1, 1) // #353 -PAIRING(10, 15, 20, 25, 6, 21, 22, 25, 1, 2, 10, 15, 0, 0, 20, 21, 22, 25, 1, 1) // #354 -PAIRING(10, 15, 20, 25, 6, 21, 22, 26, 1, 2, 10, 15, 0, 0, 20, 21, 22, 25, 1, 2) // #355 -PAIRING(10, 15, 20, 25, 6, 21, 25, 26, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #356 -PAIRING(10, 15, 20, 25, 6, 21, 26, 27, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #357 -PAIRING(10, 15, 20, 25, 6, 25, 25, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #358 -PAIRING(10, 15, 20, 25, 6, 25, 26, 27, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #359 -PAIRING(10, 15, 20, 25, 6, 26, 26, 27, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #360 -PAIRING(10, 15, 20, 25, 6, 26, 27, 28, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #361 -PAIRING(10, 15, 20, 25, 10, 11, 11, 12, 2, 0, 10, 11, 11, 12, 0, 0, 0, 0, 2, 0) // #362 -PAIRING(10, 15, 20, 25, 10, 11, 11, 15, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 0) // #363 -PAIRING(10, 15, 20, 25, 10, 11, 11, 16, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 1) // #364 -PAIRING(10, 15, 20, 25, 10, 11, 11, 20, 2, 0, 10, 11, 11, 15, 0, 0, 0, 0, 1, 0) // #365 -PAIRING(10, 15, 20, 25, 10, 11, 11, 21, 2, 1, 10, 11, 11, 15, 20, 21, 0, 0, 1, 1) // #366 -PAIRING(10, 15, 20, 25, 10, 11, 11, 25, 2, 1, 10, 11, 11, 15, 20, 25, 0, 0, 0, 1) // #367 -PAIRING(10, 15, 20, 25, 10, 11, 11, 26, 2, 1, 10, 11, 11, 15, 20, 25, 0, 0, 0, 1) // #368 -PAIRING(10, 15, 20, 25, 10, 11, 12, 13, 2, 0, 10, 11, 12, 13, 0, 0, 0, 0, 2, 0) // #369 -PAIRING(10, 15, 20, 25, 10, 11, 12, 15, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 0) // #370 -PAIRING(10, 15, 20, 25, 10, 11, 12, 16, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 1) // #371 -PAIRING(10, 15, 20, 25, 10, 11, 12, 20, 2, 0, 10, 11, 12, 15, 0, 0, 0, 0, 2, 0) // #372 -PAIRING(10, 15, 20, 25, 10, 11, 12, 21, 2, 1, 10, 11, 12, 15, 20, 21, 0, 0, 2, 1) // #373 -PAIRING(10, 15, 20, 25, 10, 11, 12, 25, 2, 1, 10, 11, 12, 15, 20, 25, 0, 0, 1, 1) // #374 -PAIRING(10, 15, 20, 25, 10, 11, 12, 26, 2, 1, 10, 11, 12, 15, 20, 25, 0, 0, 1, 1) // #375 -PAIRING(10, 15, 20, 25, 10, 11, 15, 16, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #376 -PAIRING(10, 15, 20, 25, 10, 11, 15, 20, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #377 -PAIRING(10, 15, 20, 25, 10, 11, 15, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 1) // #378 -PAIRING(10, 15, 20, 25, 10, 11, 15, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #379 -PAIRING(10, 15, 20, 25, 10, 11, 15, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #380 -PAIRING(10, 15, 20, 25, 10, 11, 16, 17, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #381 -PAIRING(10, 15, 20, 25, 10, 11, 16, 20, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #382 -PAIRING(10, 15, 20, 25, 10, 11, 16, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 1) // #383 -PAIRING(10, 15, 20, 25, 10, 11, 16, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #384 -PAIRING(10, 15, 20, 25, 10, 11, 16, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #385 -PAIRING(10, 15, 20, 25, 10, 11, 20, 21, 1, 1, 10, 11, 0, 0, 20, 21, 0, 0, 2, 0) // #386 -PAIRING(10, 15, 20, 25, 10, 11, 20, 25, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 0) // #387 -PAIRING(10, 15, 20, 25, 10, 11, 20, 26, 1, 1, 10, 11, 0, 0, 20, 25, 0, 0, 1, 1) // #388 -PAIRING(10, 15, 20, 25, 10, 11, 21, 22, 1, 1, 10, 11, 0, 0, 21, 22, 0, 0, 2, 0) // #389 -PAIRING(10, 15, 20, 25, 10, 11, 21, 25, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 0) // #390 -PAIRING(10, 15, 20, 25, 10, 11, 21, 26, 1, 1, 10, 11, 0, 0, 21, 25, 0, 0, 2, 1) // #391 -PAIRING(10, 15, 20, 25, 10, 11, 25, 26, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #392 -PAIRING(10, 15, 20, 25, 10, 11, 26, 27, 1, 0, 10, 11, 0, 0, 0, 0, 0, 0, 2, 1) // #393 -PAIRING(10, 15, 20, 25, 10, 15, 15, 16, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #394 -PAIRING(10, 15, 20, 25, 10, 15, 15, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #395 -PAIRING(10, 15, 20, 25, 10, 15, 15, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #396 -PAIRING(10, 15, 20, 25, 10, 15, 15, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #397 -PAIRING(10, 15, 20, 25, 10, 15, 15, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #398 -PAIRING(10, 15, 20, 25, 10, 15, 16, 17, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #399 -PAIRING(10, 15, 20, 25, 10, 15, 16, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #400 -PAIRING(10, 15, 20, 25, 10, 15, 16, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #401 -PAIRING(10, 15, 20, 25, 10, 15, 16, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #402 -PAIRING(10, 15, 20, 25, 10, 15, 16, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #403 -PAIRING(10, 15, 20, 25, 10, 15, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 0) // #404 -PAIRING(10, 15, 20, 25, 10, 15, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 0) // #405 -PAIRING(10, 15, 20, 25, 10, 15, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #406 -PAIRING(10, 15, 20, 25, 10, 15, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 0) // #407 -PAIRING(10, 15, 20, 25, 10, 15, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 0) // #408 -PAIRING(10, 15, 20, 25, 10, 15, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #409 -PAIRING(10, 15, 20, 25, 10, 15, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #410 -PAIRING(10, 15, 20, 25, 10, 15, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #411 -PAIRING(10, 15, 20, 25, 10, 16, 16, 17, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #412 -PAIRING(10, 15, 20, 25, 10, 16, 16, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #413 -PAIRING(10, 15, 20, 25, 10, 16, 16, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #414 -PAIRING(10, 15, 20, 25, 10, 16, 16, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #415 -PAIRING(10, 15, 20, 25, 10, 16, 16, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #416 -PAIRING(10, 15, 20, 25, 10, 16, 17, 18, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #417 -PAIRING(10, 15, 20, 25, 10, 16, 17, 20, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #418 -PAIRING(10, 15, 20, 25, 10, 16, 17, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #419 -PAIRING(10, 15, 20, 25, 10, 16, 17, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #420 -PAIRING(10, 15, 20, 25, 10, 16, 17, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #421 -PAIRING(10, 15, 20, 25, 10, 16, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 1) // #422 -PAIRING(10, 15, 20, 25, 10, 16, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #423 -PAIRING(10, 15, 20, 25, 10, 16, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #424 -PAIRING(10, 15, 20, 25, 10, 16, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 1) // #425 -PAIRING(10, 15, 20, 25, 10, 16, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #426 -PAIRING(10, 15, 20, 25, 10, 16, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 2) // #427 -PAIRING(10, 15, 20, 25, 10, 16, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #428 -PAIRING(10, 15, 20, 25, 10, 16, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 2) // #429 -PAIRING(10, 15, 20, 25, 10, 20, 20, 21, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 0) // #430 -PAIRING(10, 15, 20, 25, 10, 20, 20, 25, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 0) // #431 -PAIRING(10, 15, 20, 25, 10, 20, 20, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 1) // #432 -PAIRING(10, 15, 20, 25, 10, 20, 21, 22, 1, 1, 10, 15, 0, 0, 21, 22, 0, 0, 1, 0) // #433 -PAIRING(10, 15, 20, 25, 10, 20, 21, 25, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 0) // #434 -PAIRING(10, 15, 20, 25, 10, 20, 21, 26, 1, 1, 10, 15, 0, 0, 21, 25, 0, 0, 1, 1) // #435 -PAIRING(10, 15, 20, 25, 10, 20, 25, 26, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #436 -PAIRING(10, 15, 20, 25, 10, 20, 26, 27, 1, 0, 10, 15, 0, 0, 0, 0, 0, 0, 1, 1) // #437 -PAIRING(10, 15, 20, 25, 10, 21, 21, 22, 1, 2, 10, 15, 0, 0, 20, 21, 21, 22, 1, 1) // #438 -PAIRING(10, 15, 20, 25, 10, 21, 21, 25, 1, 2, 10, 15, 0, 0, 20, 21, 21, 25, 0, 1) // #439 -PAIRING(10, 15, 20, 25, 10, 21, 21, 26, 1, 2, 10, 15, 0, 0, 20, 21, 21, 25, 0, 2) // #440 -PAIRING(10, 15, 20, 25, 10, 21, 22, 23, 1, 2, 10, 15, 0, 0, 20, 21, 22, 23, 1, 1) // #441 -PAIRING(10, 15, 20, 25, 10, 21, 22, 25, 1, 2, 10, 15, 0, 0, 20, 21, 22, 25, 1, 1) // #442 -PAIRING(10, 15, 20, 25, 10, 21, 22, 26, 1, 2, 10, 15, 0, 0, 20, 21, 22, 25, 1, 2) // #443 -PAIRING(10, 15, 20, 25, 10, 21, 25, 26, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #444 -PAIRING(10, 15, 20, 25, 10, 21, 26, 27, 1, 1, 10, 15, 0, 0, 20, 21, 0, 0, 1, 2) // #445 -PAIRING(10, 15, 20, 25, 10, 25, 25, 26, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #446 -PAIRING(10, 15, 20, 25, 10, 25, 26, 27, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #447 -PAIRING(10, 15, 20, 25, 10, 26, 26, 27, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #448 -PAIRING(10, 15, 20, 25, 10, 26, 27, 28, 1, 1, 10, 15, 0, 0, 20, 25, 0, 0, 0, 2) // #449 -PAIRING(10, 15, 20, 25, 11, 12, 12, 13, 2, 0, 11, 12, 12, 13, 0, 0, 0, 0, 2, 0) // #450 -PAIRING(10, 15, 20, 25, 11, 12, 12, 15, 2, 0, 11, 12, 12, 15, 0, 0, 0, 0, 2, 0) // #451 -PAIRING(10, 15, 20, 25, 11, 12, 12, 16, 2, 0, 11, 12, 12, 15, 0, 0, 0, 0, 2, 1) // #452 -PAIRING(10, 15, 20, 25, 11, 12, 12, 20, 2, 0, 11, 12, 12, 15, 0, 0, 0, 0, 2, 0) // #453 -PAIRING(10, 15, 20, 25, 11, 12, 12, 21, 2, 1, 11, 12, 12, 15, 20, 21, 0, 0, 2, 1) // #454 -PAIRING(10, 15, 20, 25, 11, 12, 12, 25, 2, 1, 11, 12, 12, 15, 20, 25, 0, 0, 1, 1) // #455 -PAIRING(10, 15, 20, 25, 11, 12, 12, 26, 2, 1, 11, 12, 12, 15, 20, 25, 0, 0, 1, 1) // #456 -PAIRING(10, 15, 20, 25, 11, 12, 13, 14, 2, 0, 11, 12, 13, 14, 0, 0, 0, 0, 2, 0) // #457 -PAIRING(10, 15, 20, 25, 11, 12, 13, 15, 2, 0, 11, 12, 13, 15, 0, 0, 0, 0, 2, 0) // #458 -PAIRING(10, 15, 20, 25, 11, 12, 13, 16, 2, 0, 11, 12, 13, 15, 0, 0, 0, 0, 2, 1) // #459 -PAIRING(10, 15, 20, 25, 11, 12, 13, 20, 2, 0, 11, 12, 13, 15, 0, 0, 0, 0, 2, 0) // #460 -PAIRING(10, 15, 20, 25, 11, 12, 13, 21, 2, 1, 11, 12, 13, 15, 20, 21, 0, 0, 2, 1) // #461 -PAIRING(10, 15, 20, 25, 11, 12, 13, 25, 2, 1, 11, 12, 13, 15, 20, 25, 0, 0, 1, 1) // #462 -PAIRING(10, 15, 20, 25, 11, 12, 13, 26, 2, 1, 11, 12, 13, 15, 20, 25, 0, 0, 1, 1) // #463 -PAIRING(10, 15, 20, 25, 11, 12, 15, 16, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #464 -PAIRING(10, 15, 20, 25, 11, 12, 15, 20, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #465 -PAIRING(10, 15, 20, 25, 11, 12, 15, 21, 1, 1, 11, 12, 0, 0, 20, 21, 0, 0, 2, 1) // #466 -PAIRING(10, 15, 20, 25, 11, 12, 15, 25, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #467 -PAIRING(10, 15, 20, 25, 11, 12, 15, 26, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #468 -PAIRING(10, 15, 20, 25, 11, 12, 16, 17, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #469 -PAIRING(10, 15, 20, 25, 11, 12, 16, 20, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #470 -PAIRING(10, 15, 20, 25, 11, 12, 16, 21, 1, 1, 11, 12, 0, 0, 20, 21, 0, 0, 2, 1) // #471 -PAIRING(10, 15, 20, 25, 11, 12, 16, 25, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #472 -PAIRING(10, 15, 20, 25, 11, 12, 16, 26, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #473 -PAIRING(10, 15, 20, 25, 11, 12, 20, 21, 1, 1, 11, 12, 0, 0, 20, 21, 0, 0, 2, 0) // #474 -PAIRING(10, 15, 20, 25, 11, 12, 20, 25, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 0) // #475 -PAIRING(10, 15, 20, 25, 11, 12, 20, 26, 1, 1, 11, 12, 0, 0, 20, 25, 0, 0, 1, 1) // #476 -PAIRING(10, 15, 20, 25, 11, 12, 21, 22, 1, 1, 11, 12, 0, 0, 21, 22, 0, 0, 2, 0) // #477 -PAIRING(10, 15, 20, 25, 11, 12, 21, 25, 1, 1, 11, 12, 0, 0, 21, 25, 0, 0, 2, 0) // #478 -PAIRING(10, 15, 20, 25, 11, 12, 21, 26, 1, 1, 11, 12, 0, 0, 21, 25, 0, 0, 2, 1) // #479 -PAIRING(10, 15, 20, 25, 11, 12, 25, 26, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #480 -PAIRING(10, 15, 20, 25, 11, 12, 26, 27, 1, 0, 11, 12, 0, 0, 0, 0, 0, 0, 2, 1) // #481 -PAIRING(10, 15, 20, 25, 11, 15, 15, 16, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #482 -PAIRING(10, 15, 20, 25, 11, 15, 15, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #483 -PAIRING(10, 15, 20, 25, 11, 15, 15, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 1) // #484 -PAIRING(10, 15, 20, 25, 11, 15, 15, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #485 -PAIRING(10, 15, 20, 25, 11, 15, 15, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #486 -PAIRING(10, 15, 20, 25, 11, 15, 16, 17, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #487 -PAIRING(10, 15, 20, 25, 11, 15, 16, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #488 -PAIRING(10, 15, 20, 25, 11, 15, 16, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 1) // #489 -PAIRING(10, 15, 20, 25, 11, 15, 16, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #490 -PAIRING(10, 15, 20, 25, 11, 15, 16, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #491 -PAIRING(10, 15, 20, 25, 11, 15, 20, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 0) // #492 -PAIRING(10, 15, 20, 25, 11, 15, 20, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 0) // #493 -PAIRING(10, 15, 20, 25, 11, 15, 20, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #494 -PAIRING(10, 15, 20, 25, 11, 15, 21, 22, 1, 1, 11, 15, 0, 0, 21, 22, 0, 0, 2, 0) // #495 -PAIRING(10, 15, 20, 25, 11, 15, 21, 25, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 0) // #496 -PAIRING(10, 15, 20, 25, 11, 15, 21, 26, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 1) // #497 -PAIRING(10, 15, 20, 25, 11, 15, 25, 26, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #498 -PAIRING(10, 15, 20, 25, 11, 15, 26, 27, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #499 -PAIRING(10, 15, 20, 25, 11, 16, 16, 17, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #500 -PAIRING(10, 15, 20, 25, 11, 16, 16, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #501 -PAIRING(10, 15, 20, 25, 11, 16, 16, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #502 -PAIRING(10, 15, 20, 25, 11, 16, 16, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #503 -PAIRING(10, 15, 20, 25, 11, 16, 16, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #504 -PAIRING(10, 15, 20, 25, 11, 16, 17, 18, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #505 -PAIRING(10, 15, 20, 25, 11, 16, 17, 20, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #506 -PAIRING(10, 15, 20, 25, 11, 16, 17, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #507 -PAIRING(10, 15, 20, 25, 11, 16, 17, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #508 -PAIRING(10, 15, 20, 25, 11, 16, 17, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #509 -PAIRING(10, 15, 20, 25, 11, 16, 20, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 1) // #510 -PAIRING(10, 15, 20, 25, 11, 16, 20, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #511 -PAIRING(10, 15, 20, 25, 11, 16, 20, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #512 -PAIRING(10, 15, 20, 25, 11, 16, 21, 22, 1, 1, 11, 15, 0, 0, 21, 22, 0, 0, 2, 1) // #513 -PAIRING(10, 15, 20, 25, 11, 16, 21, 25, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 1) // #514 -PAIRING(10, 15, 20, 25, 11, 16, 21, 26, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 2) // #515 -PAIRING(10, 15, 20, 25, 11, 16, 25, 26, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #516 -PAIRING(10, 15, 20, 25, 11, 16, 26, 27, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 2) // #517 -PAIRING(10, 15, 20, 25, 11, 20, 20, 21, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 0) // #518 -PAIRING(10, 15, 20, 25, 11, 20, 20, 25, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 0) // #519 -PAIRING(10, 15, 20, 25, 11, 20, 20, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 1) // #520 -PAIRING(10, 15, 20, 25, 11, 20, 21, 22, 1, 1, 11, 15, 0, 0, 21, 22, 0, 0, 2, 0) // #521 -PAIRING(10, 15, 20, 25, 11, 20, 21, 25, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 0) // #522 -PAIRING(10, 15, 20, 25, 11, 20, 21, 26, 1, 1, 11, 15, 0, 0, 21, 25, 0, 0, 2, 1) // #523 -PAIRING(10, 15, 20, 25, 11, 20, 25, 26, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #524 -PAIRING(10, 15, 20, 25, 11, 20, 26, 27, 1, 0, 11, 15, 0, 0, 0, 0, 0, 0, 2, 1) // #525 -PAIRING(10, 15, 20, 25, 11, 21, 21, 22, 1, 2, 11, 15, 0, 0, 20, 21, 21, 22, 2, 1) // #526 -PAIRING(10, 15, 20, 25, 11, 21, 21, 25, 1, 2, 11, 15, 0, 0, 20, 21, 21, 25, 1, 1) // #527 -PAIRING(10, 15, 20, 25, 11, 21, 21, 26, 1, 2, 11, 15, 0, 0, 20, 21, 21, 25, 1, 2) // #528 -PAIRING(10, 15, 20, 25, 11, 21, 22, 23, 1, 2, 11, 15, 0, 0, 20, 21, 22, 23, 2, 1) // #529 -PAIRING(10, 15, 20, 25, 11, 21, 22, 25, 1, 2, 11, 15, 0, 0, 20, 21, 22, 25, 2, 1) // #530 -PAIRING(10, 15, 20, 25, 11, 21, 22, 26, 1, 2, 11, 15, 0, 0, 20, 21, 22, 25, 2, 2) // #531 -PAIRING(10, 15, 20, 25, 11, 21, 25, 26, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #532 -PAIRING(10, 15, 20, 25, 11, 21, 26, 27, 1, 1, 11, 15, 0, 0, 20, 21, 0, 0, 2, 2) // #533 -PAIRING(10, 15, 20, 25, 11, 25, 25, 26, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #534 -PAIRING(10, 15, 20, 25, 11, 25, 26, 27, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #535 -PAIRING(10, 15, 20, 25, 11, 26, 26, 27, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #536 -PAIRING(10, 15, 20, 25, 11, 26, 27, 28, 1, 1, 11, 15, 0, 0, 20, 25, 0, 0, 1, 2) // #537 -PAIRING(10, 15, 20, 25, 15, 16, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #538 -PAIRING(10, 15, 20, 25, 15, 16, 16, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #539 -PAIRING(10, 15, 20, 25, 15, 16, 16, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #540 -PAIRING(10, 15, 20, 25, 15, 16, 16, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #541 -PAIRING(10, 15, 20, 25, 15, 16, 16, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #542 -PAIRING(10, 15, 20, 25, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #543 -PAIRING(10, 15, 20, 25, 15, 16, 17, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #544 -PAIRING(10, 15, 20, 25, 15, 16, 17, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #545 -PAIRING(10, 15, 20, 25, 15, 16, 17, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #546 -PAIRING(10, 15, 20, 25, 15, 16, 17, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #547 -PAIRING(10, 15, 20, 25, 15, 16, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #548 -PAIRING(10, 15, 20, 25, 15, 16, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #549 -PAIRING(10, 15, 20, 25, 15, 16, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #550 -PAIRING(10, 15, 20, 25, 15, 16, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #551 -PAIRING(10, 15, 20, 25, 15, 16, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #552 -PAIRING(10, 15, 20, 25, 15, 16, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #553 -PAIRING(10, 15, 20, 25, 15, 16, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #554 -PAIRING(10, 15, 20, 25, 15, 16, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #555 -PAIRING(10, 15, 20, 25, 15, 20, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #556 -PAIRING(10, 15, 20, 25, 15, 20, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #557 -PAIRING(10, 15, 20, 25, 15, 20, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #558 -PAIRING(10, 15, 20, 25, 15, 20, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #559 -PAIRING(10, 15, 20, 25, 15, 20, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #560 -PAIRING(10, 15, 20, 25, 15, 20, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #561 -PAIRING(10, 15, 20, 25, 15, 20, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #562 -PAIRING(10, 15, 20, 25, 15, 20, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #563 -PAIRING(10, 15, 20, 25, 15, 21, 21, 22, 0, 2, 0, 0, 0, 0, 20, 21, 21, 22, 2, 1) // #564 -PAIRING(10, 15, 20, 25, 15, 21, 21, 25, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 1) // #565 -PAIRING(10, 15, 20, 25, 15, 21, 21, 26, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 2) // #566 -PAIRING(10, 15, 20, 25, 15, 21, 22, 23, 0, 2, 0, 0, 0, 0, 20, 21, 22, 23, 2, 1) // #567 -PAIRING(10, 15, 20, 25, 15, 21, 22, 25, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 1) // #568 -PAIRING(10, 15, 20, 25, 15, 21, 22, 26, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 2) // #569 -PAIRING(10, 15, 20, 25, 15, 21, 25, 26, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #570 -PAIRING(10, 15, 20, 25, 15, 21, 26, 27, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #571 -PAIRING(10, 15, 20, 25, 15, 25, 25, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #572 -PAIRING(10, 15, 20, 25, 15, 25, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #573 -PAIRING(10, 15, 20, 25, 15, 26, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #574 -PAIRING(10, 15, 20, 25, 15, 26, 27, 28, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #575 -PAIRING(10, 15, 20, 25, 16, 17, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #576 -PAIRING(10, 15, 20, 25, 16, 17, 17, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #577 -PAIRING(10, 15, 20, 25, 16, 17, 17, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #578 -PAIRING(10, 15, 20, 25, 16, 17, 17, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #579 -PAIRING(10, 15, 20, 25, 16, 17, 17, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #580 -PAIRING(10, 15, 20, 25, 16, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #581 -PAIRING(10, 15, 20, 25, 16, 17, 18, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #582 -PAIRING(10, 15, 20, 25, 16, 17, 18, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #583 -PAIRING(10, 15, 20, 25, 16, 17, 18, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #584 -PAIRING(10, 15, 20, 25, 16, 17, 18, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #585 -PAIRING(10, 15, 20, 25, 16, 17, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #586 -PAIRING(10, 15, 20, 25, 16, 17, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #587 -PAIRING(10, 15, 20, 25, 16, 17, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #588 -PAIRING(10, 15, 20, 25, 16, 17, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #589 -PAIRING(10, 15, 20, 25, 16, 17, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #590 -PAIRING(10, 15, 20, 25, 16, 17, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #591 -PAIRING(10, 15, 20, 25, 16, 17, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #592 -PAIRING(10, 15, 20, 25, 16, 17, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #593 -PAIRING(10, 15, 20, 25, 16, 20, 20, 21, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #594 -PAIRING(10, 15, 20, 25, 16, 20, 20, 25, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #595 -PAIRING(10, 15, 20, 25, 16, 20, 20, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #596 -PAIRING(10, 15, 20, 25, 16, 20, 21, 22, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #597 -PAIRING(10, 15, 20, 25, 16, 20, 21, 25, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #598 -PAIRING(10, 15, 20, 25, 16, 20, 21, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #599 -PAIRING(10, 15, 20, 25, 16, 20, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #600 -PAIRING(10, 15, 20, 25, 16, 20, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #601 -PAIRING(10, 15, 20, 25, 16, 21, 21, 22, 0, 2, 0, 0, 0, 0, 20, 21, 21, 22, 2, 1) // #602 -PAIRING(10, 15, 20, 25, 16, 21, 21, 25, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 1) // #603 -PAIRING(10, 15, 20, 25, 16, 21, 21, 26, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 2) // #604 -PAIRING(10, 15, 20, 25, 16, 21, 22, 23, 0, 2, 0, 0, 0, 0, 20, 21, 22, 23, 2, 1) // #605 -PAIRING(10, 15, 20, 25, 16, 21, 22, 25, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 1) // #606 -PAIRING(10, 15, 20, 25, 16, 21, 22, 26, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 2) // #607 -PAIRING(10, 15, 20, 25, 16, 21, 25, 26, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #608 -PAIRING(10, 15, 20, 25, 16, 21, 26, 27, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 2) // #609 -PAIRING(10, 15, 20, 25, 16, 25, 25, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #610 -PAIRING(10, 15, 20, 25, 16, 25, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #611 -PAIRING(10, 15, 20, 25, 16, 26, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #612 -PAIRING(10, 15, 20, 25, 16, 26, 27, 28, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #613 -PAIRING(10, 15, 20, 25, 20, 21, 21, 22, 0, 2, 0, 0, 0, 0, 20, 21, 21, 22, 2, 0) // #614 -PAIRING(10, 15, 20, 25, 20, 21, 21, 25, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 0) // #615 -PAIRING(10, 15, 20, 25, 20, 21, 21, 26, 0, 2, 0, 0, 0, 0, 20, 21, 21, 25, 1, 1) // #616 -PAIRING(10, 15, 20, 25, 20, 21, 22, 23, 0, 2, 0, 0, 0, 0, 20, 21, 22, 23, 2, 0) // #617 -PAIRING(10, 15, 20, 25, 20, 21, 22, 25, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 0) // #618 -PAIRING(10, 15, 20, 25, 20, 21, 22, 26, 0, 2, 0, 0, 0, 0, 20, 21, 22, 25, 2, 1) // #619 -PAIRING(10, 15, 20, 25, 20, 21, 25, 26, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #620 -PAIRING(10, 15, 20, 25, 20, 21, 26, 27, 0, 1, 0, 0, 0, 0, 20, 21, 0, 0, 2, 1) // #621 -PAIRING(10, 15, 20, 25, 20, 25, 25, 26, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #622 -PAIRING(10, 15, 20, 25, 20, 25, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 1) // #623 -PAIRING(10, 15, 20, 25, 20, 26, 26, 27, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #624 -PAIRING(10, 15, 20, 25, 20, 26, 27, 28, 0, 1, 0, 0, 0, 0, 20, 25, 0, 0, 1, 2) // #625 -PAIRING(10, 15, 20, 25, 21, 22, 22, 23, 0, 2, 0, 0, 0, 0, 21, 22, 22, 23, 2, 0) // #626 -PAIRING(10, 15, 20, 25, 21, 22, 22, 25, 0, 2, 0, 0, 0, 0, 21, 22, 22, 25, 2, 0) // #627 -PAIRING(10, 15, 20, 25, 21, 22, 22, 26, 0, 2, 0, 0, 0, 0, 21, 22, 22, 25, 2, 1) // #628 -PAIRING(10, 15, 20, 25, 21, 22, 23, 24, 0, 2, 0, 0, 0, 0, 21, 22, 23, 24, 2, 0) // #629 -PAIRING(10, 15, 20, 25, 21, 22, 23, 25, 0, 2, 0, 0, 0, 0, 21, 22, 23, 25, 2, 0) // #630 -PAIRING(10, 15, 20, 25, 21, 22, 23, 26, 0, 2, 0, 0, 0, 0, 21, 22, 23, 25, 2, 1) // #631 -PAIRING(10, 15, 20, 25, 21, 22, 25, 26, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #632 -PAIRING(10, 15, 20, 25, 21, 22, 26, 27, 0, 1, 0, 0, 0, 0, 21, 22, 0, 0, 2, 1) // #633 -PAIRING(10, 15, 20, 25, 21, 25, 25, 26, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #634 -PAIRING(10, 15, 20, 25, 21, 25, 26, 27, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 1) // #635 -PAIRING(10, 15, 20, 25, 21, 26, 26, 27, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #636 -PAIRING(10, 15, 20, 25, 21, 26, 27, 28, 0, 1, 0, 0, 0, 0, 21, 25, 0, 0, 2, 2) // #637 -PAIRING(10, 15, 20, 25, 25, 26, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #638 -PAIRING(10, 15, 20, 25, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #639 -PAIRING(10, 15, 20, 25, 26, 27, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #640 -PAIRING(10, 15, 20, 25, 26, 27, 28, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2) // #641 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.cc deleted file mode 100644 index b7f877e6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. -// -// See guid_string.h for documentation. - -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/guid_string.h" - -namespace google_breakpad { - -// static -wstring GUIDString::GUIDToWString(GUID *guid) { - wchar_t guid_string[37]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -// static -wstring GUIDString::GUIDToSymbolServerWString(GUID *guid) { - wchar_t guid_string[33]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.h deleted file mode 100644 index f8aa8a23..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/guid_string.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. - -#ifndef COMMON_WINDOWS_GUID_STRING_H__ -#define COMMON_WINDOWS_GUID_STRING_H__ - -#include - -#include - -namespace google_breakpad { - -using std::wstring; - -class GUIDString { - public: - // Converts guid to a string in the format recommended by RFC 4122 and - // returns the string. - static wstring GUIDToWString(GUID *guid); - - // Converts guid to a string formatted as uppercase hexadecimal, with - // no separators, and returns the string. This is the format used for - // symbol server identifiers, although identifiers have an age tacked - // on to the string. - static wstring GUIDToSymbolServerWString(GUID *guid); -}; - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_GUID_STRING_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.cc deleted file mode 100644 index ddf61f7f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.cc +++ /dev/null @@ -1,412 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/http_upload.h" - -namespace google_breakpad { - -using std::ifstream; -using std::ios; - -static const wchar_t kUserAgent[] = L"Breakpad/1.0 (Windows)"; - -// Helper class which closes an internet handle when it goes away -class HTTPUpload::AutoInternetHandle { - public: - explicit AutoInternetHandle(HINTERNET handle) : handle_(handle) {} - ~AutoInternetHandle() { - if (handle_) { - InternetCloseHandle(handle_); - } - } - - HINTERNET get() { return handle_; } - - private: - HINTERNET handle_; -}; - -// static -bool HTTPUpload::SendRequest(const wstring &url, - const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - int *timeout, - wstring *response_body, - int *response_code) { - if (response_code) { - *response_code = 0; - } - - // TODO(bryner): support non-ASCII parameter names - if (!CheckParameters(parameters)) { - return false; - } - - // Break up the URL and make sure we can handle it - wchar_t scheme[16], host[256], path[256]; - URL_COMPONENTS components; - memset(&components, 0, sizeof(components)); - components.dwStructSize = sizeof(components); - components.lpszScheme = scheme; - components.dwSchemeLength = sizeof(scheme) / sizeof(scheme[0]); - components.lpszHostName = host; - components.dwHostNameLength = sizeof(host) / sizeof(host[0]); - components.lpszUrlPath = path; - components.dwUrlPathLength = sizeof(path) / sizeof(path[0]); - if (!InternetCrackUrl(url.c_str(), static_cast(url.size()), - 0, &components)) { - return false; - } - bool secure = false; - if (wcscmp(scheme, L"https") == 0) { - secure = true; - } else if (wcscmp(scheme, L"http") != 0) { - return false; - } - - AutoInternetHandle internet(InternetOpen(kUserAgent, - INTERNET_OPEN_TYPE_PRECONFIG, - NULL, // proxy name - NULL, // proxy bypass - 0)); // flags - if (!internet.get()) { - return false; - } - - AutoInternetHandle connection(InternetConnect(internet.get(), - host, - components.nPort, - NULL, // user name - NULL, // password - INTERNET_SERVICE_HTTP, - 0, // flags - NULL)); // context - if (!connection.get()) { - return false; - } - - DWORD http_open_flags = secure ? INTERNET_FLAG_SECURE : 0; - http_open_flags |= INTERNET_FLAG_NO_COOKIES; - AutoInternetHandle request(HttpOpenRequest(connection.get(), - L"POST", - path, - NULL, // version - NULL, // referer - NULL, // agent type - http_open_flags, - NULL)); // context - if (!request.get()) { - return false; - } - - wstring boundary = GenerateMultipartBoundary(); - wstring content_type_header = GenerateRequestHeader(boundary); - HttpAddRequestHeaders(request.get(), - content_type_header.c_str(), - static_cast(-1), - HTTP_ADDREQ_FLAG_ADD); - - string request_body; - if (!GenerateRequestBody(parameters, upload_file, - file_part_name, boundary, &request_body)) { - return false; - } - - if (timeout) { - if (!InternetSetOption(request.get(), - INTERNET_OPTION_SEND_TIMEOUT, - timeout, - sizeof(timeout))) { - fwprintf(stderr, L"Could not unset send timeout, continuing...\n"); - } - - if (!InternetSetOption(request.get(), - INTERNET_OPTION_RECEIVE_TIMEOUT, - timeout, - sizeof(timeout))) { - fwprintf(stderr, L"Could not unset receive timeout, continuing...\n"); - } - } - - if (!HttpSendRequest(request.get(), NULL, 0, - const_cast(request_body.data()), - static_cast(request_body.size()))) { - return false; - } - - // The server indicates a successful upload with HTTP status 200. - wchar_t http_status[4]; - DWORD http_status_size = sizeof(http_status); - if (!HttpQueryInfo(request.get(), HTTP_QUERY_STATUS_CODE, - static_cast(&http_status), &http_status_size, - 0)) { - return false; - } - - int http_response = wcstol(http_status, NULL, 10); - if (response_code) { - *response_code = http_response; - } - - bool result = (http_response == 200); - - if (result) { - result = ReadResponse(request.get(), response_body); - } - - return result; -} - -// static -bool HTTPUpload::ReadResponse(HINTERNET request, wstring *response) { - bool has_content_length_header = false; - wchar_t content_length[32]; - DWORD content_length_size = sizeof(content_length); - DWORD claimed_size = 0; - string response_body; - - if (HttpQueryInfo(request, HTTP_QUERY_CONTENT_LENGTH, - static_cast(&content_length), - &content_length_size, 0)) { - has_content_length_header = true; - claimed_size = wcstol(content_length, NULL, 10); - response_body.reserve(claimed_size); - } - - - DWORD bytes_available; - DWORD total_read = 0; - BOOL return_code; - - while (((return_code = InternetQueryDataAvailable(request, &bytes_available, - 0, 0)) != 0) && bytes_available > 0) { - - vector response_buffer(bytes_available); - DWORD size_read; - - return_code = InternetReadFile(request, - &response_buffer[0], - bytes_available, &size_read); - - if (return_code && size_read > 0) { - total_read += size_read; - response_body.append(&response_buffer[0], size_read); - } else { - break; - } - } - - bool succeeded = return_code && (!has_content_length_header || - (total_read == claimed_size)); - if (succeeded && response) { - *response = UTF8ToWide(response_body); - } - - return succeeded; -} - -// static -wstring HTTPUpload::GenerateMultipartBoundary() { - // The boundary has 27 '-' characters followed by 16 hex digits - static const wchar_t kBoundaryPrefix[] = L"---------------------------"; - static const int kBoundaryLength = 27 + 16 + 1; - - // Generate some random numbers to fill out the boundary - int r0 = rand(); - int r1 = rand(); - - wchar_t temp[kBoundaryLength]; - swprintf(temp, kBoundaryLength, L"%s%08X%08X", kBoundaryPrefix, r0, r1); - - // remove when VC++7.1 is no longer supported - temp[kBoundaryLength - 1] = L'\0'; - - return wstring(temp); -} - -// static -wstring HTTPUpload::GenerateRequestHeader(const wstring &boundary) { - wstring header = L"Content-Type: multipart/form-data; boundary="; - header += boundary; - return header; -} - -// static -bool HTTPUpload::GenerateRequestBody(const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - const wstring &boundary, - string *request_body) { - vector contents; - if (!GetFileContents(upload_file, &contents)) { - return false; - } - - string boundary_str = WideToUTF8(boundary); - if (boundary_str.empty()) { - return false; - } - - request_body->clear(); - - // Append each of the parameter pairs as a form-data part - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - request_body->append("--" + boundary_str + "\r\n"); - request_body->append("Content-Disposition: form-data; name=\"" + - WideToUTF8(pos->first) + "\"\r\n\r\n" + - WideToUTF8(pos->second) + "\r\n"); - } - - // Now append the upload file as a binary (octet-stream) part - string filename_utf8 = WideToUTF8(upload_file); - if (filename_utf8.empty()) { - return false; - } - - string file_part_name_utf8 = WideToUTF8(file_part_name); - if (file_part_name_utf8.empty()) { - return false; - } - - request_body->append("--" + boundary_str + "\r\n"); - request_body->append("Content-Disposition: form-data; " - "name=\"" + file_part_name_utf8 + "\"; " - "filename=\"" + filename_utf8 + "\"\r\n"); - request_body->append("Content-Type: application/octet-stream\r\n"); - request_body->append("\r\n"); - - if (!contents.empty()) { - request_body->append(&(contents[0]), contents.size()); - } - request_body->append("\r\n"); - request_body->append("--" + boundary_str + "--\r\n"); - return true; -} - -// static -bool HTTPUpload::GetFileContents(const wstring &filename, - vector *contents) { - // The "open" method on pre-MSVC8 ifstream implementations doesn't accept a - // wchar_t* filename, so use _wfopen directly in that case. For VC8 and - // later, _wfopen has been deprecated in favor of _wfopen_s, which does - // not exist in earlier versions, so let the ifstream open the file itself. -#if _MSC_VER >= 1400 // MSVC 2005/8 - ifstream file; - file.open(filename.c_str(), ios::binary); -#else // _MSC_VER >= 1400 - ifstream file(_wfopen(filename.c_str(), L"rb")); -#endif // _MSC_VER >= 1400 - if (file.is_open()) { - file.seekg(0, ios::end); - std::streamoff length = file.tellg(); - contents->resize(length); - if (length != 0) { - file.seekg(0, ios::beg); - file.read(&((*contents)[0]), length); - } - file.close(); - return true; - } - return false; -} - -// static -wstring HTTPUpload::UTF8ToWide(const string &utf8) { - if (utf8.length() == 0) { - return wstring(); - } - - // compute the length of the buffer we'll need - int charcount = MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, NULL, 0); - - if (charcount == 0) { - return wstring(); - } - - // convert - wchar_t* buf = new wchar_t[charcount]; - MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, buf, charcount); - wstring result(buf); - delete[] buf; - return result; -} - -// static -string HTTPUpload::WideToUTF8(const wstring &wide) { - if (wide.length() == 0) { - return string(); - } - - // compute the length of the buffer we'll need - int charcount = WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1, - NULL, 0, NULL, NULL); - if (charcount == 0) { - return string(); - } - - // convert - char *buf = new char[charcount]; - WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1, buf, charcount, - NULL, NULL); - - string result(buf); - delete[] buf; - return result; -} - -// static -bool HTTPUpload::CheckParameters(const map ¶meters) { - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - const wstring &str = pos->first; - if (str.size() == 0) { - return false; // disallow empty parameter names - } - for (unsigned int i = 0; i < str.size(); ++i) { - wchar_t c = str[i]; - if (c < 32 || c == '"' || c > 127) { - return false; - } - } - } - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.h deleted file mode 100644 index 8a17aab1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/http_upload.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPUpload provides a "nice" API to send a multipart HTTP(S) POST -// request using wininet. It currently supports requests that contain -// a set of string parameters (key/value pairs), and a file to upload. - -#ifndef COMMON_WINDOWS_HTTP_UPLOAD_H__ -#define COMMON_WINDOWS_HTTP_UPLOAD_H__ - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include -#include -#include - -namespace google_breakpad { - -using std::string; -using std::wstring; -using std::map; -using std::vector; - -class HTTPUpload { - public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request - // (i.e. it corresponds to the name= attribute on an . - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. Returns true on success. - // If the request is successful and response_body is non-NULL, - // the response body will be returned in response_body. - // If response_code is non-NULL, it will be set to the HTTP response code - // received (or 0 if the request failed before getting an HTTP response). - static bool SendRequest(const wstring &url, - const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - int *timeout, - wstring *response_body, - int *response_code); - - private: - class AutoInternetHandle; - - // Retrieves the HTTP response. If NULL is passed in for response, - // this merely checks (via the return value) that we were successfully - // able to retrieve exactly as many bytes of content in the response as - // were specified in the Content-Length header. - static bool HTTPUpload::ReadResponse(HINTERNET request, wstring* response); - - // Generates a new multipart boundary for a POST request - static wstring GenerateMultipartBoundary(); - - // Generates a HTTP request header for a multipart form submit. - static wstring GenerateRequestHeader(const wstring &boundary); - - // Given a set of parameters, an upload filename, and a file part name, - // generates a multipart request body string with these parameters - // and minidump contents. Returns true on success. - static bool GenerateRequestBody(const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - const wstring &boundary, - string *request_body); - - // Fills the supplied vector with the contents of filename. - static bool GetFileContents(const wstring &filename, vector *contents); - - // Converts a UTF8 string to UTF16. - static wstring UTF8ToWide(const string &utf8); - - // Converts a UTF16 string to UTF8. - static string WideToUTF8(const wstring &wide); - - // Checks that the given list of parameters has only printable - // ASCII characters in the parameter name, and does not contain - // any quote (") characters. Returns true if so. - static bool CheckParameters(const map ¶meters); - - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - HTTPUpload(); - explicit HTTPUpload(const HTTPUpload &); - void operator=(const HTTPUpload &); - ~HTTPUpload(); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // COMMON_WINDOWS_HTTP_UPLOAD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.cc deleted file mode 100644 index c0415d00..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.cc +++ /dev/null @@ -1,996 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/pdb_source_line_writer.h" -#include "common/windows/guid_string.h" - -// This constant may be missing from DbgHelp.h. See the documentation for -// IDiaSymbol::get_undecoratedNameEx. -#ifndef UNDNAME_NO_ECSU -#define UNDNAME_NO_ECSU 0x8000 // Suppresses enum/class/struct/union. -#endif // UNDNAME_NO_ECSU - -namespace google_breakpad { - -using std::vector; - -// A helper class to scope a PLOADED_IMAGE. -class AutoImage { - public: - explicit AutoImage(PLOADED_IMAGE img) : img_(img) {} - ~AutoImage() { - if (img_) - ImageUnload(img_); - } - - operator PLOADED_IMAGE() { return img_; } - PLOADED_IMAGE operator->() { return img_; } - - private: - PLOADED_IMAGE img_; -}; - -PDBSourceLineWriter::PDBSourceLineWriter() : output_(NULL) { -} - -PDBSourceLineWriter::~PDBSourceLineWriter() { -} - -bool PDBSourceLineWriter::Open(const wstring &file, FileFormat format) { - Close(); - - if (FAILED(CoInitialize(NULL))) { - fprintf(stderr, "CoInitialize failed\n"); - return false; - } - - CComPtr data_source; - if (FAILED(data_source.CoCreateInstance(CLSID_DiaSource))) { - fprintf(stderr, "CoCreateInstance CLSID_DiaSource failed " - "(msdia80.dll unregistered?)\n"); - return false; - } - - switch (format) { - case PDB_FILE: - if (FAILED(data_source->loadDataFromPdb(file.c_str()))) { - fprintf(stderr, "loadDataFromPdb failed\n"); - return false; - } - break; - case EXE_FILE: - if (FAILED(data_source->loadDataForExe(file.c_str(), NULL, NULL))) { - fprintf(stderr, "loadDataForExe failed\n"); - return false; - } - code_file_ = file; - break; - case ANY_FILE: - if (FAILED(data_source->loadDataFromPdb(file.c_str()))) { - if (FAILED(data_source->loadDataForExe(file.c_str(), NULL, NULL))) { - fprintf(stderr, "loadDataForPdb and loadDataFromExe failed\n"); - return false; - } - code_file_ = file; - } - break; - default: - fprintf(stderr, "Unknown file format\n"); - return false; - } - - if (FAILED(data_source->openSession(&session_))) { - fprintf(stderr, "openSession failed\n"); - } - - return true; -} - -bool PDBSourceLineWriter::PrintLines(IDiaEnumLineNumbers *lines) { - // The line number format is: - // - CComPtr line; - ULONG count; - - while (SUCCEEDED(lines->Next(1, &line, &count)) && count == 1) { - DWORD rva; - if (FAILED(line->get_relativeVirtualAddress(&rva))) { - fprintf(stderr, "failed to get line rva\n"); - return false; - } - - DWORD length; - if (FAILED(line->get_length(&length))) { - fprintf(stderr, "failed to get line code length\n"); - return false; - } - - DWORD dia_source_id; - if (FAILED(line->get_sourceFileId(&dia_source_id))) { - fprintf(stderr, "failed to get line source file id\n"); - return false; - } - // duplicate file names are coalesced to share one ID - DWORD source_id = GetRealFileID(dia_source_id); - - DWORD line_num; - if (FAILED(line->get_lineNumber(&line_num))) { - fprintf(stderr, "failed to get line number\n"); - return false; - } - - fprintf(output_, "%x %x %d %d\n", rva, length, line_num, source_id); - line.Release(); - } - return true; -} - -bool PDBSourceLineWriter::PrintFunction(IDiaSymbol *function, - IDiaSymbol *block) { - // The function format is: - // FUNC
- DWORD rva; - if (FAILED(block->get_relativeVirtualAddress(&rva))) { - fprintf(stderr, "couldn't get rva\n"); - return false; - } - - ULONGLONG length; - if (FAILED(block->get_length(&length))) { - fprintf(stderr, "failed to get function length\n"); - return false; - } - - if (length == 0) { - // Silently ignore zero-length functions, which can infrequently pop up. - return true; - } - - CComBSTR name; - int stack_param_size; - if (!GetSymbolFunctionName(function, &name, &stack_param_size)) { - return false; - } - - // If the decorated name didn't give the parameter size, try to - // calculate it. - if (stack_param_size < 0) { - stack_param_size = GetFunctionStackParamSize(function); - } - - fprintf(output_, "FUNC %x %" WIN_STRING_FORMAT_LL "x %x %ws\n", - rva, length, stack_param_size, name); - - CComPtr lines; - if (FAILED(session_->findLinesByRVA(rva, DWORD(length), &lines))) { - return false; - } - - if (!PrintLines(lines)) { - return false; - } - return true; -} - -bool PDBSourceLineWriter::PrintSourceFiles() { - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - fprintf(stderr, "get_globalScope failed\n"); - return false; - } - - CComPtr compilands; - if (FAILED(global->findChildren(SymTagCompiland, NULL, - nsNone, &compilands))) { - fprintf(stderr, "findChildren failed\n"); - return false; - } - - CComPtr compiland; - ULONG count; - while (SUCCEEDED(compilands->Next(1, &compiland, &count)) && count == 1) { - CComPtr source_files; - if (FAILED(session_->findFile(compiland, NULL, nsNone, &source_files))) { - return false; - } - CComPtr file; - while (SUCCEEDED(source_files->Next(1, &file, &count)) && count == 1) { - DWORD file_id; - if (FAILED(file->get_uniqueId(&file_id))) { - return false; - } - - CComBSTR file_name; - if (FAILED(file->get_fileName(&file_name))) { - return false; - } - - wstring file_name_string(file_name); - if (!FileIDIsCached(file_name_string)) { - // this is a new file name, cache it and output a FILE line. - CacheFileID(file_name_string, file_id); - fwprintf(output_, L"FILE %d %s\n", file_id, file_name); - } else { - // this file name has already been seen, just save this - // ID for later lookup. - StoreDuplicateFileID(file_name_string, file_id); - } - file.Release(); - } - compiland.Release(); - } - return true; -} - -bool PDBSourceLineWriter::PrintFunctions() { - CComPtr symbols; - if (FAILED(session_->getSymbolsByAddr(&symbols))) { - fprintf(stderr, "failed to get symbol enumerator\n"); - return false; - } - - CComPtr symbol; - if (FAILED(symbols->symbolByAddr(1, 0, &symbol))) { - fprintf(stderr, "failed to enumerate symbols\n"); - return false; - } - - DWORD rva_last = 0; - if (FAILED(symbol->get_relativeVirtualAddress(&rva_last))) { - fprintf(stderr, "failed to get symbol rva\n"); - return false; - } - - ULONG count; - do { - DWORD tag; - if (FAILED(symbol->get_symTag(&tag))) { - fprintf(stderr, "failed to get symbol tag\n"); - return false; - } - - // For a given function, DIA seems to give either a symbol with - // SymTagFunction or SymTagPublicSymbol, but not both. This means - // that PDBSourceLineWriter will output either a FUNC or PUBLIC line, - // but not both. - if (tag == SymTagFunction) { - if (!PrintFunction(symbol, symbol)) { - return false; - } - } else if (tag == SymTagPublicSymbol) { - if (!PrintCodePublicSymbol(symbol)) { - return false; - } - } - symbol.Release(); - } while (SUCCEEDED(symbols->Next(1, &symbol, &count)) && count == 1); - - // When building with PGO, the compiler can split functions into - // "hot" and "cold" blocks, and move the "cold" blocks out to separate - // pages, so the function can be noncontiguous. To find these blocks, - // we have to iterate over all the compilands, and then find blocks - // that are children of them. We can then find the lexical parents - // of those blocks and print out an extra FUNC line for blocks - // that are not contained in their parent functions. - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - fprintf(stderr, "get_globalScope failed\n"); - return false; - } - - CComPtr compilands; - if (FAILED(global->findChildren(SymTagCompiland, NULL, - nsNone, &compilands))) { - fprintf(stderr, "findChildren failed on the global\n"); - return false; - } - - CComPtr compiland; - while (SUCCEEDED(compilands->Next(1, &compiland, &count)) && count == 1) { - CComPtr blocks; - if (FAILED(compiland->findChildren(SymTagBlock, NULL, - nsNone, &blocks))) { - fprintf(stderr, "findChildren failed on a compiland\n"); - return false; - } - - CComPtr block; - while (SUCCEEDED(blocks->Next(1, &block, &count)) && count == 1) { - // find this block's lexical parent function - CComPtr parent; - DWORD tag; - if (SUCCEEDED(block->get_lexicalParent(&parent)) && - SUCCEEDED(parent->get_symTag(&tag)) && - tag == SymTagFunction) { - // now get the block's offset and the function's offset and size, - // and determine if the block is outside of the function - DWORD func_rva, block_rva; - ULONGLONG func_length; - if (SUCCEEDED(block->get_relativeVirtualAddress(&block_rva)) && - SUCCEEDED(parent->get_relativeVirtualAddress(&func_rva)) && - SUCCEEDED(parent->get_length(&func_length))) { - if (block_rva < func_rva || block_rva > (func_rva + func_length)) { - if (!PrintFunction(parent, block)) { - return false; - } - } - } - } - parent.Release(); - block.Release(); - } - blocks.Release(); - compiland.Release(); - } - - return true; -} - -bool PDBSourceLineWriter::PrintFrameData() { - // It would be nice if it were possible to output frame data alongside the - // associated function, as is done with line numbers, but the DIA API - // doesn't make it possible to get the frame data in that way. - - CComPtr tables; - if (FAILED(session_->getEnumTables(&tables))) - return false; - - // Pick up the first table that supports IDiaEnumFrameData. - CComPtr frame_data_enum; - CComPtr table; - ULONG count; - while (!frame_data_enum && - SUCCEEDED(tables->Next(1, &table, &count)) && - count == 1) { - table->QueryInterface(_uuidof(IDiaEnumFrameData), - reinterpret_cast(&frame_data_enum)); - table.Release(); - } - if (!frame_data_enum) - return false; - - DWORD last_type = -1; - DWORD last_rva = -1; - DWORD last_code_size = 0; - DWORD last_prolog_size = -1; - - CComPtr frame_data; - while (SUCCEEDED(frame_data_enum->Next(1, &frame_data, &count)) && - count == 1) { - DWORD type; - if (FAILED(frame_data->get_type(&type))) - return false; - - DWORD rva; - if (FAILED(frame_data->get_relativeVirtualAddress(&rva))) - return false; - - DWORD code_size; - if (FAILED(frame_data->get_lengthBlock(&code_size))) - return false; - - DWORD prolog_size; - if (FAILED(frame_data->get_lengthProlog(&prolog_size))) - return false; - - // epliog_size is always 0. - DWORD epilog_size = 0; - - // parameter_size is the size of parameters passed on the stack. If any - // parameters are not passed on the stack (such as in registers), their - // sizes will not be included in parameter_size. - DWORD parameter_size; - if (FAILED(frame_data->get_lengthParams(¶meter_size))) - return false; - - DWORD saved_register_size; - if (FAILED(frame_data->get_lengthSavedRegisters(&saved_register_size))) - return false; - - DWORD local_size; - if (FAILED(frame_data->get_lengthLocals(&local_size))) - return false; - - // get_maxStack can return S_FALSE, just use 0 in that case. - DWORD max_stack_size = 0; - if (FAILED(frame_data->get_maxStack(&max_stack_size))) - return false; - - // get_programString can return S_FALSE, indicating that there is no - // program string. In that case, check whether %ebp is used. - HRESULT program_string_result; - CComBSTR program_string; - if (FAILED(program_string_result = frame_data->get_program( - &program_string))) { - return false; - } - - // get_allocatesBasePointer can return S_FALSE, treat that as though - // %ebp is not used. - BOOL allocates_base_pointer = FALSE; - if (program_string_result != S_OK) { - if (FAILED(frame_data->get_allocatesBasePointer( - &allocates_base_pointer))) { - return false; - } - } - - // Only print out a line if type, rva, code_size, or prolog_size have - // changed from the last line. It is surprisingly common (especially in - // system library PDBs) for DIA to return a series of identical - // IDiaFrameData objects. For kernel32.pdb from Windows XP SP2 on x86, - // this check reduces the size of the dumped symbol file by a third. - if (type != last_type || rva != last_rva || code_size != last_code_size || - prolog_size != last_prolog_size) { - fprintf(output_, "STACK WIN %x %x %x %x %x %x %x %x %x %d ", - type, rva, code_size, prolog_size, epilog_size, - parameter_size, saved_register_size, local_size, max_stack_size, - program_string_result == S_OK); - if (program_string_result == S_OK) { - fprintf(output_, "%ws\n", program_string); - } else { - fprintf(output_, "%d\n", allocates_base_pointer); - } - - last_type = type; - last_rva = rva; - last_code_size = code_size; - last_prolog_size = prolog_size; - } - - frame_data.Release(); - } - - return true; -} - -bool PDBSourceLineWriter::PrintCodePublicSymbol(IDiaSymbol *symbol) { - BOOL is_code; - if (FAILED(symbol->get_code(&is_code))) { - return false; - } - if (!is_code) { - return true; - } - - DWORD rva; - if (FAILED(symbol->get_relativeVirtualAddress(&rva))) { - return false; - } - - CComBSTR name; - int stack_param_size; - if (!GetSymbolFunctionName(symbol, &name, &stack_param_size)) { - return false; - } - - fprintf(output_, "PUBLIC %x %x %ws\n", rva, - stack_param_size > 0 ? stack_param_size : 0, name); - return true; -} - -bool PDBSourceLineWriter::PrintPDBInfo() { - PDBModuleInfo info; - if (!GetModuleInfo(&info)) { - return false; - } - - // Hard-code "windows" for the OS because that's the only thing that makes - // sense for PDB files. (This might not be strictly correct for Windows CE - // support, but we don't care about that at the moment.) - fprintf(output_, "MODULE windows %ws %ws %ws\n", - info.cpu.c_str(), info.debug_identifier.c_str(), - info.debug_file.c_str()); - - return true; -} - -bool PDBSourceLineWriter::PrintPEInfo() { - PEModuleInfo info; - if (!GetPEInfo(&info)) { - return false; - } - - fprintf(output_, "INFO CODE_ID %ws %ws\n", - info.code_identifier.c_str(), - info.code_file.c_str()); - return true; -} - -// wcstol_positive_strict is sort of like wcstol, but much stricter. string -// should be a buffer pointing to a null-terminated string containing only -// decimal digits. If the entire string can be converted to an integer -// without overflowing, and there are no non-digit characters before the -// result is set to the value and this function returns true. Otherwise, -// this function returns false. This is an alternative to the strtol, atoi, -// and scanf families, which are not as strict about input and in some cases -// don't provide a good way for the caller to determine if a conversion was -// successful. -static bool wcstol_positive_strict(wchar_t *string, int *result) { - int value = 0; - for (wchar_t *c = string; *c != '\0'; ++c) { - int last_value = value; - value *= 10; - // Detect overflow. - if (value / 10 != last_value || value < 0) { - return false; - } - if (*c < '0' || *c > '9') { - return false; - } - unsigned int c_value = *c - '0'; - last_value = value; - value += c_value; - // Detect overflow. - if (value < last_value) { - return false; - } - // Forbid leading zeroes unless the string is just "0". - if (value == 0 && *(c+1) != '\0') { - return false; - } - } - *result = value; - return true; -} - -bool PDBSourceLineWriter::FindPEFile() { - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - fprintf(stderr, "get_globalScope failed\n"); - return false; - } - - CComBSTR symbols_file; - if (SUCCEEDED(global->get_symbolsFileName(&symbols_file))) { - wstring file(symbols_file); - - // Look for an EXE or DLL file. - const wchar_t *extensions[] = { L"exe", L"dll" }; - for (int i = 0; i < sizeof(extensions) / sizeof(extensions[0]); i++) { - size_t dot_pos = file.find_last_of(L"."); - if (dot_pos != wstring::npos) { - file.replace(dot_pos + 1, wstring::npos, extensions[i]); - // Check if this file exists. - if (GetFileAttributesW(file.c_str()) != INVALID_FILE_ATTRIBUTES) { - code_file_ = file; - return true; - } - } - } - } - - return false; -} - -// static -bool PDBSourceLineWriter::GetSymbolFunctionName(IDiaSymbol *function, - BSTR *name, - int *stack_param_size) { - *stack_param_size = -1; - const DWORD undecorate_options = UNDNAME_NO_MS_KEYWORDS | - UNDNAME_NO_FUNCTION_RETURNS | - UNDNAME_NO_ALLOCATION_MODEL | - UNDNAME_NO_ALLOCATION_LANGUAGE | - UNDNAME_NO_THISTYPE | - UNDNAME_NO_ACCESS_SPECIFIERS | - UNDNAME_NO_THROW_SIGNATURES | - UNDNAME_NO_MEMBER_TYPE | - UNDNAME_NO_RETURN_UDT_MODEL | - UNDNAME_NO_ECSU; - - // Use get_undecoratedNameEx to get readable C++ names with arguments. - if (function->get_undecoratedNameEx(undecorate_options, name) != S_OK) { - if (function->get_name(name) != S_OK) { - fprintf(stderr, "failed to get function name\n"); - return false; - } - // If a name comes from get_name because no undecorated form existed, - // it's already formatted properly to be used as output. Don't do any - // additional processing. - // - // MSVC7's DIA seems to not undecorate names in as many cases as MSVC8's. - // This will result in calling get_name for some C++ symbols, so - // all of the parameter and return type information may not be included in - // the name string. - } else { - // C++ uses a bogus "void" argument for functions and methods that don't - // take any parameters. Take it out of the undecorated name because it's - // ugly and unnecessary. - const wchar_t *replace_string = L"(void)"; - const size_t replace_length = wcslen(replace_string); - const wchar_t *replacement_string = L"()"; - size_t length = wcslen(*name); - if (length >= replace_length) { - wchar_t *name_end = *name + length - replace_length; - if (wcscmp(name_end, replace_string) == 0) { - WindowsStringUtils::safe_wcscpy(name_end, replace_length, - replacement_string); - length = wcslen(*name); - } - } - - // Undecorate names used for stdcall and fastcall. These names prefix - // the identifier with '_' (stdcall) or '@' (fastcall) and suffix it - // with '@' followed by the number of bytes of parameters, in decimal. - // If such a name is found, take note of the size and undecorate it. - // Only do this for names that aren't C++, which is determined based on - // whether the undecorated name contains any ':' or '(' characters. - if (!wcschr(*name, ':') && !wcschr(*name, '(') && - (*name[0] == '_' || *name[0] == '@')) { - wchar_t *last_at = wcsrchr(*name + 1, '@'); - if (last_at && wcstol_positive_strict(last_at + 1, stack_param_size)) { - // If this function adheres to the fastcall convention, it accepts up - // to the first 8 bytes of parameters in registers (%ecx and %edx). - // We're only interested in the stack space used for parameters, so - // so subtract 8 and don't let the size go below 0. - if (*name[0] == '@') { - if (*stack_param_size > 8) { - *stack_param_size -= 8; - } else { - *stack_param_size = 0; - } - } - - // Undecorate the name by moving it one character to the left in its - // buffer, and terminating it where the last '@' had been. - WindowsStringUtils::safe_wcsncpy(*name, length, - *name + 1, last_at - *name - 1); - } else if (*name[0] == '_') { - // This symbol's name is encoded according to the cdecl rules. The - // name doesn't end in a '@' character followed by a decimal positive - // integer, so it's not a stdcall name. Strip off the leading - // underscore. - WindowsStringUtils::safe_wcsncpy(*name, length, *name + 1, length); - } - } - } - - return true; -} - -// static -int PDBSourceLineWriter::GetFunctionStackParamSize(IDiaSymbol *function) { - // This implementation is highly x86-specific. - - // Gather the symbols corresponding to data. - CComPtr data_children; - if (FAILED(function->findChildren(SymTagData, NULL, nsNone, - &data_children))) { - return 0; - } - - // lowest_base is the lowest %ebp-relative byte offset used for a parameter. - // highest_end is one greater than the highest offset (i.e. base + length). - // Stack parameters are assumed to be contiguous, because in reality, they - // are. - int lowest_base = INT_MAX; - int highest_end = INT_MIN; - - CComPtr child; - DWORD count; - while (SUCCEEDED(data_children->Next(1, &child, &count)) && count == 1) { - // If any operation fails at this point, just proceed to the next child. - // Use the next_child label instead of continue because child needs to - // be released before it's reused. Declare constructable/destructable - // types early to avoid gotos that cross initializations. - CComPtr child_type; - - // DataIsObjectPtr is only used for |this|. Because |this| can be passed - // as a stack parameter, look for it in addition to traditional - // parameters. - DWORD child_kind; - if (FAILED(child->get_dataKind(&child_kind)) || - (child_kind != DataIsParam && child_kind != DataIsObjectPtr)) { - goto next_child; - } - - // Only concentrate on register-relative parameters. Parameters may also - // be enregistered (passed directly in a register), but those don't - // consume any stack space, so they're not of interest. - DWORD child_location_type; - if (FAILED(child->get_locationType(&child_location_type)) || - child_location_type != LocIsRegRel) { - goto next_child; - } - - // Of register-relative parameters, the only ones that make any sense are - // %ebp- or %esp-relative. Note that MSVC's debugging information always - // gives parameters as %ebp-relative even when a function doesn't use a - // traditional frame pointer and stack parameters are accessed relative to - // %esp, so just look for %ebp-relative parameters. If you wanted to - // access parameters, you'd probably want to treat these %ebp-relative - // offsets as if they were relative to %esp before a function's prolog - // executed. - DWORD child_register; - if (FAILED(child->get_registerId(&child_register)) || - child_register != CV_REG_EBP) { - goto next_child; - } - - LONG child_register_offset; - if (FAILED(child->get_offset(&child_register_offset))) { - goto next_child; - } - - // IDiaSymbol::get_type can succeed but still pass back a NULL value. - if (FAILED(child->get_type(&child_type)) || !child_type) { - goto next_child; - } - - ULONGLONG child_length; - if (FAILED(child_type->get_length(&child_length))) { - goto next_child; - } - - int child_end = child_register_offset + static_cast(child_length); - if (child_register_offset < lowest_base) { - lowest_base = child_register_offset; - } - if (child_end > highest_end) { - highest_end = child_end; - } - -next_child: - child.Release(); - } - - int param_size = 0; - // Make sure lowest_base isn't less than 4, because [%esp+4] is the lowest - // possible address to find a stack parameter before executing a function's - // prolog (see above). Some optimizations cause parameter offsets to be - // lower than 4, but we're not concerned with those because we're only - // looking for parameters contained in addresses higher than where the - // return address is stored. - if (lowest_base < 4) { - lowest_base = 4; - } - if (highest_end > lowest_base) { - // All stack parameters are pushed as at least 4-byte quantities. If the - // last type was narrower than 4 bytes, promote it. This assumes that all - // parameters' offsets are 4-byte-aligned, which is always the case. Only - // worry about the last type, because we're not summing the type sizes, - // just looking at the lowest and highest offsets. - int remainder = highest_end % 4; - if (remainder) { - highest_end += 4 - remainder; - } - - param_size = highest_end - lowest_base; - } - - return param_size; -} - -bool PDBSourceLineWriter::WriteMap(FILE *map_file) { - output_ = map_file; - - bool ret = PrintPDBInfo(); - // This is not a critical piece of the symbol file. - PrintPEInfo(); - ret = ret && - PrintSourceFiles() && - PrintFunctions() && - PrintFrameData(); - - output_ = NULL; - return ret; -} - -void PDBSourceLineWriter::Close() { - session_.Release(); -} - -bool PDBSourceLineWriter::GetModuleInfo(PDBModuleInfo *info) { - if (!info) { - return false; - } - - info->debug_file.clear(); - info->debug_identifier.clear(); - info->cpu.clear(); - - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - return false; - } - - DWORD machine_type; - // get_machineType can return S_FALSE. - if (global->get_machineType(&machine_type) == S_OK) { - // The documentation claims that get_machineType returns a value from - // the CV_CPU_TYPE_e enumeration, but that's not the case. - // Instead, it returns one of the IMAGE_FILE_MACHINE values as - // defined here: - // http://msdn.microsoft.com/en-us/library/ms680313%28VS.85%29.aspx - switch (machine_type) { - case IMAGE_FILE_MACHINE_I386: - info->cpu = L"x86"; - break; - case IMAGE_FILE_MACHINE_AMD64: - info->cpu = L"x86_64"; - break; - default: - info->cpu = L"unknown"; - break; - } - } else { - // Unexpected, but handle gracefully. - info->cpu = L"unknown"; - } - - // DWORD* and int* are not compatible. This is clean and avoids a cast. - DWORD age; - if (FAILED(global->get_age(&age))) { - return false; - } - - bool uses_guid; - if (!UsesGUID(&uses_guid)) { - return false; - } - - if (uses_guid) { - GUID guid; - if (FAILED(global->get_guid(&guid))) { - return false; - } - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - wchar_t age_string[9]; - swprintf(age_string, sizeof(age_string) / sizeof(age_string[0]), - L"%x", age); - - // remove when VC++7.1 is no longer supported - age_string[sizeof(age_string) / sizeof(age_string[0]) - 1] = L'\0'; - - info->debug_identifier = GUIDString::GUIDToSymbolServerWString(&guid); - info->debug_identifier.append(age_string); - } else { - DWORD signature; - if (FAILED(global->get_signature(&signature))) { - return false; - } - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - wchar_t identifier_string[17]; - swprintf(identifier_string, - sizeof(identifier_string) / sizeof(identifier_string[0]), - L"%08X%x", signature, age); - - // remove when VC++7.1 is no longer supported - identifier_string[sizeof(identifier_string) / - sizeof(identifier_string[0]) - 1] = L'\0'; - - info->debug_identifier = identifier_string; - } - - CComBSTR debug_file_string; - if (FAILED(global->get_symbolsFileName(&debug_file_string))) { - return false; - } - info->debug_file = - WindowsStringUtils::GetBaseName(wstring(debug_file_string)); - - return true; -} - -bool PDBSourceLineWriter::GetPEInfo(PEModuleInfo *info) { - if (!info) { - return false; - } - - if (code_file_.empty() && !FindPEFile()) { - fprintf(stderr, "Couldn't locate EXE or DLL file.\n"); - return false; - } - - // Convert wchar to native charset because ImageLoad only takes - // a PSTR as input. - string code_file; - if (!WindowsStringUtils::safe_wcstombs(code_file_, &code_file)) { - return false; - } - - AutoImage img(ImageLoad((PSTR)code_file.c_str(), NULL)); - if (!img) { - fprintf(stderr, "Failed to open PE file: %s\n", code_file.c_str()); - return false; - } - - info->code_file = WindowsStringUtils::GetBaseName(code_file_); - - // The date and time that the file was created by the linker. - DWORD TimeDateStamp = img->FileHeader->FileHeader.TimeDateStamp; - // The size of the file in bytes, including all headers. - DWORD SizeOfImage = 0; - PIMAGE_OPTIONAL_HEADER64 opt = - &((PIMAGE_NT_HEADERS64)img->FileHeader)->OptionalHeader; - if (opt->Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) { - // 64-bit PE file. - SizeOfImage = opt->SizeOfImage; - } - else { - // 32-bit PE file. - SizeOfImage = img->FileHeader->OptionalHeader.SizeOfImage; - } - wchar_t code_identifier[32]; - swprintf(code_identifier, - sizeof(code_identifier) / sizeof(code_identifier[0]), - L"%08X%X", TimeDateStamp, SizeOfImage); - info->code_identifier = code_identifier; - - return true; -} - -bool PDBSourceLineWriter::UsesGUID(bool *uses_guid) { - if (!uses_guid) - return false; - - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) - return false; - - GUID guid; - if (FAILED(global->get_guid(&guid))) - return false; - - DWORD signature; - if (FAILED(global->get_signature(&signature))) - return false; - - // There are two possibilities for guid: either it's a real 128-bit GUID - // as identified in a code module by a new-style CodeView record, or it's - // a 32-bit signature (timestamp) as identified by an old-style record. - // See MDCVInfoPDB70 and MDCVInfoPDB20 in minidump_format.h. - // - // Because DIA doesn't provide a way to directly determine whether a module - // uses a GUID or a 32-bit signature, this code checks whether the first 32 - // bits of guid are the same as the signature, and if the rest of guid is - // zero. If so, then with a pretty high degree of certainty, there's an - // old-style CodeView record in use. This method will only falsely find an - // an old-style CodeView record if a real 128-bit GUID has its first 32 - // bits set the same as the module's signature (timestamp) and the rest of - // the GUID is set to 0. This is highly unlikely. - - GUID signature_guid = {signature}; // 0-initializes other members - *uses_guid = !IsEqualGUID(guid, signature_guid); - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.h deleted file mode 100644 index ef2a27db..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/pdb_source_line_writer.h +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PDBSourceLineWriter uses a pdb file produced by Visual C++ to output -// a line/address map for use with BasicSourceLineResolver. - -#ifndef _PDB_SOURCE_LINE_WRITER_H__ -#define _PDB_SOURCE_LINE_WRITER_H__ - -#include - -#include -#include - -struct IDiaEnumLineNumbers; -struct IDiaSession; -struct IDiaSymbol; - -namespace google_breakpad { - -using std::wstring; -using stdext::hash_map; - -// A structure that carries information that identifies a pdb file. -struct PDBModuleInfo { - public: - // The basename of the pdb file from which information was loaded. - wstring debug_file; - - // The pdb's identifier. For recent pdb files, the identifier consists - // of the pdb's guid, in uppercase hexadecimal form without any dashes - // or separators, followed immediately by the pdb's age, also in - // uppercase hexadecimal form. For older pdb files which have no guid, - // the identifier is the pdb's 32-bit signature value, in zero-padded - // hexadecimal form, followed immediately by the pdb's age, in lowercase - // hexadecimal form. - wstring debug_identifier; - - // A string identifying the cpu that the pdb is associated with. - // Currently, this may be "x86" or "unknown". - wstring cpu; -}; - -// A structure that carries information that identifies a PE file, -// either an EXE or a DLL. -struct PEModuleInfo { - // The basename of the PE file. - wstring code_file; - - // The PE file's code identifier, which consists of its timestamp - // and file size concatenated together into a single hex string. - // (The fields IMAGE_OPTIONAL_HEADER::SizeOfImage and - // IMAGE_FILE_HEADER::TimeDateStamp, as defined in the ImageHlp - // documentation.) This is not well documented, if it's documented - // at all, but it's what symstore does and what DbgHelp supports. - wstring code_identifier; -}; - -class PDBSourceLineWriter { - public: - enum FileFormat { - PDB_FILE, // a .pdb file containing debug symbols - EXE_FILE, // a .exe or .dll file - ANY_FILE // try PDB_FILE and then EXE_FILE - }; - - explicit PDBSourceLineWriter(); - ~PDBSourceLineWriter(); - - // Opens the given file. For executable files, the corresponding pdb - // file must be available; Open will be if it is not. - // If there is already a pdb file open, it is automatically closed. - // Returns true on success. - bool Open(const wstring &file, FileFormat format); - - // Locates the pdb file for the given executable (exe or dll) file, - // and opens it. If there is already a pdb file open, it is automatically - // closed. Returns true on success. - bool OpenExecutable(const wstring &exe_file); - - // Writes a map file from the current pdb file to the given file stream. - // Returns true on success. - bool WriteMap(FILE *map_file); - - // Closes the current pdb file and its associated resources. - void Close(); - - // Retrieves information about the module's debugging file. Returns - // true on success and false on failure. - bool GetModuleInfo(PDBModuleInfo *info); - - // Retrieves information about the module's PE file. Returns - // true on success and false on failure. - bool GetPEInfo(PEModuleInfo *info); - - // Sets uses_guid to true if the opened file uses a new-style CodeView - // record with a 128-bit GUID, or false if the opened file uses an old-style - // CodeView record. When no GUID is available, a 32-bit signature should be - // used to identify the module instead. If the information cannot be - // determined, this method returns false. - bool UsesGUID(bool *uses_guid); - - private: - // Outputs the line/address pairs for each line in the enumerator. - // Returns true on success. - bool PrintLines(IDiaEnumLineNumbers *lines); - - // Outputs a function address and name, followed by its source line list. - // block can be the same object as function, or it can be a reference - // to a code block that is lexically part of this function, but - // resides at a separate address. - // Returns true on success. - bool PrintFunction(IDiaSymbol *function, IDiaSymbol *block); - - // Outputs all functions as described above. Returns true on success. - bool PrintFunctions(); - - // Outputs all of the source files in the session's pdb file. - // Returns true on success. - bool PrintSourceFiles(); - - // Outputs all of the frame information necessary to construct stack - // backtraces in the absence of frame pointers. Returns true on success. - bool PrintFrameData(); - - // Outputs a single public symbol address and name, if the symbol corresponds - // to a code address. Returns true on success. If symbol is does not - // correspond to code, returns true without outputting anything. - bool PrintCodePublicSymbol(IDiaSymbol *symbol); - - // Outputs a line identifying the PDB file that is being dumped, along with - // its uuid and age. - bool PrintPDBInfo(); - - // Outputs a line identifying the PE file corresponding to the PDB - // file that is being dumped, along with its code identifier, - // which consists of its timestamp and file size. - bool PrintPEInfo(); - - // Returns true if this filename has already been seen, - // and an ID is stored for it, or false if it has not. - bool FileIDIsCached(const wstring &file) { - return unique_files_.find(file) != unique_files_.end(); - }; - - // Cache this filename and ID for later reuse. - void CacheFileID(const wstring &file, DWORD id) { - unique_files_[file] = id; - }; - - // Store this ID in the cache as a duplicate for this filename. - void StoreDuplicateFileID(const wstring &file, DWORD id) { - hash_map::iterator iter = unique_files_.find(file); - if (iter != unique_files_.end()) { - // map this id to the previously seen one - file_ids_[id] = iter->second; - } - }; - - // Given a file's unique ID, return the ID that should be used to - // reference it. There may be multiple files with identical filenames - // but different unique IDs. The cache attempts to coalesce these into - // one ID per unique filename. - DWORD GetRealFileID(DWORD id) { - hash_map::iterator iter = file_ids_.find(id); - if (iter == file_ids_.end()) - return id; - return iter->second; - }; - - // Find the PE file corresponding to the loaded PDB file, and - // set the code_file_ member. Returns false on failure. - bool FindPEFile(); - - // Returns the function name for a symbol. If possible, the name is - // undecorated. If the symbol's decorated form indicates the size of - // parameters on the stack, this information is returned in stack_param_size. - // Returns true on success. If the symbol doesn't encode parameter size - // information, stack_param_size is set to -1. - static bool GetSymbolFunctionName(IDiaSymbol *function, BSTR *name, - int *stack_param_size); - - // Returns the number of bytes of stack space used for a function's - // parameters. function must have the tag SymTagFunction. In the event of - // a failure, returns 0, which is also a valid number of bytes. - static int GetFunctionStackParamSize(IDiaSymbol *function); - - // The filename of the PE file corresponding to the currently-open - // pdb file. - wstring code_file_; - - // The session for the currently-open pdb file. - CComPtr session_; - - // The current output file for this WriteMap invocation. - FILE *output_; - - // There may be many duplicate filenames with different IDs. - // This maps from the DIA "unique ID" to a single ID per unique - // filename. - hash_map file_ids_; - // This maps unique filenames to file IDs. - hash_map unique_files_; - - // Disallow copy ctor and operator= - PDBSourceLineWriter(const PDBSourceLineWriter&); - void operator=(const PDBSourceLineWriter&); -}; - -} // namespace google_breakpad - -#endif // _PDB_SOURCE_LINE_WRITER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils-inl.h deleted file mode 100644 index d281aaa1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils-inl.h +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utils-inl.h: Safer string manipulation on Windows, supporting -// pre-MSVC8 environments. - -#ifndef COMMON_WINDOWS_STRING_UTILS_INL_H__ -#define COMMON_WINDOWS_STRING_UTILS_INL_H__ - -#include -#include - -#include - -// The "ll" printf format size specifier corresponding to |long long| was -// intrudced in MSVC8. Earlier versions did not provide this size specifier, -// but "I64" can be used to print 64-bit types. Don't use "I64" where "ll" -// is available, in the event of oddball systems where |long long| is not -// 64 bits wide. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define WIN_STRING_FORMAT_LL "ll" -#else // MSC_VER >= 1400 -#define WIN_STRING_FORMAT_LL "I64" -#endif // MSC_VER >= 1400 - -// A nonconforming version of swprintf, without the length argument, was -// included with the CRT prior to MSVC8. Although a conforming version was -// also available via an overload, it is not reliably chosen. _snwprintf -// behaves as a standards-confirming swprintf should, so force the use of -// _snwprintf when using older CRTs. -#if _MSC_VER < 1400 // MSVC 2005/8 -#define swprintf _snwprintf -#else -// For MSVC8 and newer, swprintf_s is the recommended method. Conveniently, -// it takes the same argument list as swprintf. -#define swprintf swprintf_s -#endif // MSC_VER < 1400 - -namespace google_breakpad { - -using std::string; -using std::wstring; - -class WindowsStringUtils { - public: - // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does - // not fail if source is longer than destination_size. The destination - // buffer is always 0-terminated. - static void safe_wcscpy(wchar_t *destination, size_t destination_size, - const wchar_t *source); - - // Roughly equivalent to MSVC8's wcsncpy_s, except that _TRUNCATE cannot - // be passed directly, and pre-MSVC8, this will not fail if source or count - // are longer than destination_size. The destination buffer is always - // 0-terminated. - static void safe_wcsncpy(wchar_t *destination, size_t destination_size, - const wchar_t *source, size_t count); - - // Performs multi-byte to wide character conversion on C++ strings, using - // mbstowcs_s (MSVC8) or mbstowcs (pre-MSVC8). Returns false on failure, - // without setting wcs. - static bool safe_mbstowcs(const string &mbs, wstring *wcs); - - // The inverse of safe_mbstowcs. - static bool safe_wcstombs(const wstring &wcs, string *mbs); - - // Returns the base name of a file, e.g. strips off the path. - static wstring GetBaseName(const wstring &filename); - - private: - // Disallow instantiation and other object-based operations. - WindowsStringUtils(); - WindowsStringUtils(const WindowsStringUtils&); - ~WindowsStringUtils(); - void operator=(const WindowsStringUtils&); -}; - -// static -inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcscpy_s(destination, destination_size, source); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcscpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - wcsncpy(destination, source, destination_size); - if (destination && destination_size) - destination[destination_size - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -// static -inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source, - size_t count) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcsncpy_s(destination, destination_size, source, count); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcsncpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - if (destination_size < count) - count = destination_size; - - wcsncpy(destination, source, count); - if (destination && count) - destination[count - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_STRING_UTILS_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils.cc deleted file mode 100644 index e6ffa082..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/common/windows/string_utils.cc +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "common/windows/string_utils-inl.h" - -namespace google_breakpad { - -// static -wstring WindowsStringUtils::GetBaseName(const wstring &filename) { - wstring base_name(filename); - size_t slash_pos = base_name.find_last_of(L"/\\"); - if (slash_pos != wstring::npos) { - base_name.erase(0, slash_pos + 1); - } - return base_name; -} - -// static -bool WindowsStringUtils::safe_mbstowcs(const string &mbs, wstring *wcs) { - assert(wcs); - - // First, determine the length of the destination buffer. - size_t wcs_length; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - errno_t err; - if ((err = mbstowcs_s(&wcs_length, NULL, 0, mbs.c_str(), _TRUNCATE)) != 0) { - return false; - } - assert(wcs_length > 0); -#else // _MSC_VER >= 1400 - if ((wcs_length = mbstowcs(NULL, mbs.c_str(), mbs.length())) < 0) { - return false; - } - - // Leave space for the 0-terminator. - ++wcs_length; -#endif // _MSC_VER >= 1400 - - std::vector wcs_v(wcs_length); - - // Now, convert. -#if _MSC_VER >= 1400 // MSVC 2005/8 - if ((err = mbstowcs_s(NULL, &wcs_v[0], wcs_length, mbs.c_str(), - _TRUNCATE)) != 0) { - return false; - } -#else // _MSC_VER >= 1400 - if (mbstowcs(&wcs_v[0], mbs.c_str(), mbs.length()) < 0) { - return false; - } - - // Ensure presence of 0-terminator. - wcs_v[wcs_length - 1] = '\0'; -#endif // _MSC_VER >= 1400 - - *wcs = &wcs_v[0]; - return true; -} - -// static -bool WindowsStringUtils::safe_wcstombs(const wstring &wcs, string *mbs) { - assert(mbs); - - // First, determine the length of the destination buffer. - size_t mbs_length; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - errno_t err; - if ((err = wcstombs_s(&mbs_length, NULL, 0, wcs.c_str(), _TRUNCATE)) != 0) { - return false; - } - assert(mbs_length > 0); -#else // _MSC_VER >= 1400 - if ((mbs_length = wcstombs(NULL, wcs.c_str(), wcs.length())) < 0) { - return false; - } - - // Leave space for the 0-terminator. - ++mbs_length; -#endif // _MSC_VER >= 1400 - - std::vector mbs_v(mbs_length); - - // Now, convert. -#if _MSC_VER >= 1400 // MSVC 2005/8 - if ((err = wcstombs_s(NULL, &mbs_v[0], mbs_length, wcs.c_str(), - _TRUNCATE)) != 0) { - return false; - } -#else // _MSC_VER >= 1400 - if (wcstombs(&mbs_v[0], wcs.c_str(), wcs.length()) < 0) { - return false; - } - - // Ensure presence of 0-terminator. - mbs_v[mbs_length - 1] = '\0'; -#endif // _MSC_VER >= 1400 - - *mbs = &mbs_v[0]; - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/config.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/config.h.in deleted file mode 100644 index 35b84797..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/config.h.in +++ /dev/null @@ -1,71 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* actual length of specific struct sockaddr */ -#undef GET_SA_LEN - -/* Define to 1 if you have the header file. */ -#undef HAVE_A_OUT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/breakpad_types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/breakpad_types.h deleted file mode 100644 index 926b47f2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/breakpad_types.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* breakpad_types.h: Precise-width types - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file ensures that types u_intN_t are defined for N = 8, 16, 32, and - * 64. Types of precise widths are crucial to the task of writing data - * structures on one platform and reading them on another. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ -#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ - -#ifndef _WIN32 - -#include -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif /* __STDC_FORMAT_MACROS */ -#include - -#if defined(__SUNPRO_CC) || (defined(__GNUC__) && defined(__sun__)) -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; -#endif - -#else /* !_WIN32 */ - -#include - -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; -typedef unsigned __int64 u_int64_t; - -#endif /* !_WIN32 */ - -typedef struct { - u_int64_t high; - u_int64_t low; -} u_int128_t; - -typedef u_int64_t breakpad_time_t; - -/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to - * llx, which is the format string for "long long" - this is a 64-bit - * integral type on many systems. */ -#ifndef PRIx64 -#define PRIx64 "llx" -#endif /* !PRIx64 */ - -#endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_amd64.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_amd64.h deleted file mode 100644 index 75dae7dd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_amd64.h +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on amd64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ - - -/* - * AMD64 support, see WINNT.H - */ - -typedef struct { - u_int16_t control_word; - u_int16_t status_word; - u_int8_t tag_word; - u_int8_t reserved1; - u_int16_t error_opcode; - u_int32_t error_offset; - u_int16_t error_selector; - u_int16_t reserved2; - u_int32_t data_offset; - u_int16_t data_selector; - u_int16_t reserved3; - u_int32_t mx_csr; - u_int32_t mx_csr_mask; - u_int128_t float_registers[8]; - u_int128_t xmm_registers[16]; - u_int8_t reserved4[96]; -} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */ - -#define MD_CONTEXT_AMD64_VR_COUNT 26 - -typedef struct { - /* - * Register parameter home addresses. - */ - u_int64_t p1_home; - u_int64_t p2_home; - u_int64_t p3_home; - u_int64_t p4_home; - u_int64_t p5_home; - u_int64_t p6_home; - - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - u_int32_t mx_csr; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t cs; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */ - u_int16_t ds; - u_int16_t es; - u_int16_t fs; - u_int16_t gs; - - /* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t ss; - u_int32_t eflags; - - /* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t dr0; - u_int64_t dr1; - u_int64_t dr2; - u_int64_t dr3; - u_int64_t dr6; - u_int64_t dr7; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rax; - u_int64_t rcx; - u_int64_t rdx; - u_int64_t rbx; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rsp; - - /* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rbp; - u_int64_t rsi; - u_int64_t rdi; - u_int64_t r8; - u_int64_t r9; - u_int64_t r10; - u_int64_t r11; - u_int64_t r12; - u_int64_t r13; - u_int64_t r14; - u_int64_t r15; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rip; - - /* The next set of registers are included with - * MD_CONTEXT_AMD64_FLOATING_POINT - */ - union { - MDXmmSaveArea32AMD64 flt_save; - struct { - u_int128_t header[2]; - u_int128_t legacy[8]; - u_int128_t xmm0; - u_int128_t xmm1; - u_int128_t xmm2; - u_int128_t xmm3; - u_int128_t xmm4; - u_int128_t xmm5; - u_int128_t xmm6; - u_int128_t xmm7; - u_int128_t xmm8; - u_int128_t xmm9; - u_int128_t xmm10; - u_int128_t xmm11; - u_int128_t xmm12; - u_int128_t xmm13; - u_int128_t xmm14; - u_int128_t xmm15; - } sse_registers; - }; - - u_int128_t vector_register[MD_CONTEXT_AMD64_VR_COUNT]; - u_int64_t vector_control; - - /* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t debug_control; - u_int64_t last_branch_to_rip; - u_int64_t last_branch_from_rip; - u_int64_t last_exception_to_rip; - u_int64_t last_exception_from_rip; - -} MDRawContextAMD64; /* CONTEXT */ - -/* For (MDRawContextAMD64).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_AMD64_CONTROL (MD_CONTEXT_AMD64 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_AMD64_INTEGER (MD_CONTEXT_AMD64 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_AMD64_SEGMENTS (MD_CONTEXT_AMD64 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_AMD64_FLOATING_POINT (MD_CONTEXT_AMD64 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_AMD64_DEBUG_REGISTERS (MD_CONTEXT_AMD64 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -/* WinNT.h refers to CONTEXT_MMX_REGISTERS but doesn't appear to define it - * I think it really means CONTEXT_FLOATING_POINT. - */ - -#define MD_CONTEXT_AMD64_FULL (MD_CONTEXT_AMD64_CONTROL | \ - MD_CONTEXT_AMD64_INTEGER | \ - MD_CONTEXT_AMD64_FLOATING_POINT) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_AMD64_ALL (MD_CONTEXT_AMD64_FULL | \ - MD_CONTEXT_AMD64_SEGMENTS | \ - MD_CONTEXT_X86_DEBUG_REGISTERS) - /* CONTEXT_ALL */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_arm.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_arm.h deleted file mode 100644 index 14d81460..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_arm.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright (c) 2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ARM. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by - * ensuring that all members are aligned on their natural boundaries. - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. - * - * Author: Julian Seward - */ - -/* - * ARM support - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ - -#define MD_FLOATINGSAVEAREA_ARM_FPR_COUNT 32 -#define MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT 8 - -/* - * Note that these structures *do not* map directly to the CONTEXT - * structure defined in WinNT.h in the Windows Mobile SDK. That structure - * does not accomodate VFPv3, and I'm unsure if it was ever used in the - * wild anyway, as Windows CE only seems to produce "cedumps" which - * are not exactly minidumps. - */ -typedef struct { - u_int64_t fpscr; /* FPU status register */ - - /* 32 64-bit floating point registers, d0 .. d31. */ - u_int64_t regs[MD_FLOATINGSAVEAREA_ARM_FPR_COUNT]; - - /* Miscellaneous control words */ - u_int32_t extra[MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT]; -} MDFloatingSaveAreaARM; - -#define MD_CONTEXT_ARM_GPR_COUNT 16 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - u_int32_t context_flags; - - /* 16 32-bit integer registers, r0 .. r15 - * Note the following fixed uses: - * r13 is the stack pointer - * r14 is the link register - * r15 is the program counter - */ - u_int32_t iregs[MD_CONTEXT_ARM_GPR_COUNT]; - - /* CPSR (flags, basically): 32 bits: - bit 31 - N (negative) - bit 30 - Z (zero) - bit 29 - C (carry) - bit 28 - V (overflow) - bit 27 - Q (saturation flag, sticky) - All other fields -- ignore */ - u_int32_t cpsr; - - /* The next field is included with MD_CONTEXT_ARM_FLOATING_POINT */ - MDFloatingSaveAreaARM float_save; - -} MDRawContextARM; - -/* Indices into iregs for registers with a dedicated or conventional - * purpose. - */ -enum MDARMRegisterNumbers { - MD_CONTEXT_ARM_REG_FP = 11, - MD_CONTEXT_ARM_REG_SP = 13, - MD_CONTEXT_ARM_REG_LR = 14, - MD_CONTEXT_ARM_REG_PC = 15 -}; - -/* For (MDRawContextARM).context_flags. These values indicate the type of - * context stored in the structure. */ -#define MD_CONTEXT_ARM_INTEGER (MD_CONTEXT_ARM | 0x00000002) -#define MD_CONTEXT_ARM_FLOATING_POINT (MD_CONTEXT_ARM | 0x00000004) - -#define MD_CONTEXT_ARM_FULL (MD_CONTEXT_ARM_INTEGER | \ - MD_CONTEXT_ARM_FLOATING_POINT) - -#define MD_CONTEXT_ARM_ALL (MD_CONTEXT_ARM_INTEGER | \ - MD_CONTEXT_ARM_FLOATING_POINT) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc.h deleted file mode 100644 index 038e921a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * Breakpad minidump extension for PowerPC support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ - -#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32 - -typedef struct { - /* fpregs is a double[32] in mach/ppc/_types.h, but a u_int64_t is used - * here for precise sizing. */ - u_int64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT]; - u_int32_t fpscr_pad; - u_int32_t fpscr; /* Status/control */ -} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */ - - -#define MD_VECTORSAVEAREA_PPC_VR_COUNT 32 - -typedef struct { - /* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h - * exposes them as four 32-bit quantities. */ - u_int128_t save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT]; - u_int128_t save_vscr; /* Status/control */ - u_int32_t save_pad5[4]; - u_int32_t save_vrvalid; /* Identifies which vector registers are saved */ - u_int32_t save_pad6[7]; -} MDVectorSaveAreaPPC; /* ppc_vector_state */ - - -#define MD_CONTEXT_PPC_GPR_COUNT 32 - -/* Use the same 32-bit alignment when accessing this structure from 64-bit code - * as is used natively in 32-bit code. #pragma pack is a MSVC extension - * supported by gcc. */ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(4) -#else -#pragma pack(push, 4) -#endif - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int32_t context_flags; - - u_int32_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int32_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int32_t gpr[MD_CONTEXT_PPC_GPR_COUNT]; - u_int32_t cr; /* Condition */ - u_int32_t xer; /* Integer (fiXed-point) exception */ - u_int32_t lr; /* Link */ - u_int32_t ctr; /* Count */ - u_int32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */ - u_int32_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC; /* Based on ppc_thread_state */ - -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(0) -#else -#pragma pack(pop) -#endif - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc64.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc64.h deleted file mode 100644 index a788e5d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_ppc64.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Neal Sidhwaney */ - - -/* - * Breakpad minidump extension for PPC64 support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ - -#include "minidump_cpu_ppc.h" - -// these types are the same in ppc64 & ppc -typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; -typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; - -#define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int64_t context_flags; - - u_int64_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int64_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; - u_int64_t cr; /* Condition */ - u_int64_t xer; /* Integer (fiXed-point) exception */ - u_int64_t lr; /* Link */ - u_int64_t ctr; /* Count */ - u_int64_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC64; /* Based on ppc_thread_state */ - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_sparc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_sparc.h deleted file mode 100644 index ee95b64e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_sparc.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on sparc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * SPARC support, see (solaris)sys/procfs_isa.h also - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ - -#define MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT 32 - -typedef struct { - - /* FPU floating point regs */ - u_int64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT]; - - u_int64_t filler; - u_int64_t fsr; /* FPU status register */ -} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */ - -#define MD_CONTEXT_SPARC_GPR_COUNT 32 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - u_int32_t context_flags; - u_int32_t flag_pad; - /* - * General register access (SPARC). - * Don't confuse definitions here with definitions in . - * Registers are 32 bits for ILP32, 64 bits for LP64. - * SPARC V7/V8 is for 32bit, SPARC V9 is for 64bit - */ - - /* 32 Integer working registers */ - - /* g_r[0-7] global registers(g0-g7) - * g_r[8-15] out registers(o0-o7) - * g_r[16-23] local registers(l0-l7) - * g_r[24-31] in registers(i0-i7) - */ - u_int64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT]; - - /* several control registers */ - - /* Processor State register(PSR) for SPARC V7/V8 - * Condition Code register (CCR) for SPARC V9 - */ - u_int64_t ccr; - - u_int64_t pc; /* Program Counter register (PC) */ - u_int64_t npc; /* Next Program Counter register (nPC) */ - u_int64_t y; /* Y register (Y) */ - - /* Address Space Identifier register (ASI) for SPARC V9 - * WIM for SPARC V7/V8 - */ - u_int64_t asi; - - /* Floating-Point Registers State register (FPRS) for SPARC V9 - * TBR for for SPARC V7/V8 - */ - u_int64_t fprs; - - /* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */ - MDFloatingSaveAreaSPARC float_save; - -} MDRawContextSPARC; /* CONTEXT_SPARC */ - -/* For (MDRawContextSPARC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_SPARC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_SPARC 0x10000000 -#define MD_CONTEXT_SPARC_CONTROL (MD_CONTEXT_SPARC | 0x00000001) -#define MD_CONTEXT_SPARC_INTEGER (MD_CONTEXT_SPARC | 0x00000002) -#define MD_CONTEXT_SAPARC_FLOATING_POINT (MD_CONTEXT_SPARC | 0x00000004) -#define MD_CONTEXT_SAPARC_EXTRA (MD_CONTEXT_SPARC | 0x00000008) - -#define MD_CONTEXT_SPARC_FULL (MD_CONTEXT_SPARC_CONTROL | \ - MD_CONTEXT_SPARC_INTEGER) - -#define MD_CONTEXT_SPARC_ALL (MD_CONTEXT_SPARC_FULL | \ - MD_CONTEXT_SAPARC_FLOATING_POINT | \ - MD_CONTEXT_SAPARC_EXTRA) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_x86.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_x86.h deleted file mode 100644 index 4dbc0e9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_cpu_x86.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on x86. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ - -#define MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE 80 - /* SIZE_OF_80387_REGISTERS */ - -typedef struct { - u_int32_t control_word; - u_int32_t status_word; - u_int32_t tag_word; - u_int32_t error_offset; - u_int32_t error_selector; - u_int32_t data_offset; - u_int32_t data_selector; - - /* register_area contains eight 80-bit (x87 "long double") quantities for - * floating-point registers %st0 (%mm0) through %st7 (%mm7). */ - u_int8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE]; - u_int32_t cr0_npx_state; -} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */ - - -#define MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE 512 - /* MAXIMUM_SUPPORTED_EXTENSION */ - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - - /* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */ - u_int32_t dr0; - u_int32_t dr1; - u_int32_t dr2; - u_int32_t dr3; - u_int32_t dr6; - u_int32_t dr7; - - /* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */ - MDFloatingSaveAreaX86 float_save; - - /* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */ - u_int32_t gs; - u_int32_t fs; - u_int32_t es; - u_int32_t ds; - /* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */ - u_int32_t edi; - u_int32_t esi; - u_int32_t ebx; - u_int32_t edx; - u_int32_t ecx; - u_int32_t eax; - - /* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */ - u_int32_t ebp; - u_int32_t eip; - u_int32_t cs; /* WinNT.h says "must be sanitized" */ - u_int32_t eflags; /* WinNT.h says "must be sanitized" */ - u_int32_t esp; - u_int32_t ss; - - /* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS. - * It contains vector (MMX/SSE) registers. It it laid out in the - * format used by the fxsave and fsrstor instructions, so it includes - * a copy of the x87 floating-point registers as well. See FXSAVE in - * "Intel Architecture Software Developer's Manual, Volume 2." */ - u_int8_t extended_registers[ - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE]; -} MDRawContextX86; /* CONTEXT */ - -/* For (MDRawContextX86).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_X86 0x00010000 - /* CONTEXT_i386, CONTEXT_i486: identifies CPU */ -#define MD_CONTEXT_X86_CONTROL (MD_CONTEXT_X86 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_X86_INTEGER (MD_CONTEXT_X86 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_X86_SEGMENTS (MD_CONTEXT_X86 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_X86_FLOATING_POINT (MD_CONTEXT_X86 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_X86_DEBUG_REGISTERS (MD_CONTEXT_X86 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -#define MD_CONTEXT_X86_EXTENDED_REGISTERS (MD_CONTEXT_X86 | 0x00000020) - /* CONTEXT_EXTENDED_REGISTERS */ - -#define MD_CONTEXT_X86_FULL (MD_CONTEXT_X86_CONTROL | \ - MD_CONTEXT_X86_INTEGER | \ - MD_CONTEXT_X86_SEGMENTS) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_X86_ALL (MD_CONTEXT_X86_FULL | \ - MD_CONTEXT_X86_FLOATING_POINT | \ - MD_CONTEXT_X86_DEBUG_REGISTERS | \ - MD_CONTEXT_X86_EXTENDED_REGISTERS) - /* CONTEXT_ALL */ - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_linux.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_linux.h deleted file mode 100644 index d52c7519..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_linux.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_linux.h: A definition of exception codes for - * Linux - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from bits/signum.h. - */ -typedef enum { - MD_EXCEPTION_CODE_LIN_SIGHUP = 1, /* Hangup (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGINT = 2, /* Interrupt (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGQUIT = 3, /* Quit (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGILL = 4, /* Illegal instruction (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGTRAP = 5, /* Trace trap (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGABRT = 6, /* Abort (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGBUS = 7, /* BUS error (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGFPE = 8, /* Floating-point exception (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGKILL = 9, /* Kill, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGUSR1 = 10, /* User-defined signal 1 (POSIX). */ - MD_EXCEPTION_CODE_LIN_SIGSEGV = 11, /* Segmentation violation (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGUSR2 = 12, /* User-defined signal 2 (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGPIPE = 13, /* Broken pipe (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGALRM = 14, /* Alarm clock (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTERM = 15, /* Termination (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGSTKFLT = 16, /* Stack faultd */ - MD_EXCEPTION_CODE_LIN_SIGCHLD = 17, /* Child status has changed (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGCONT = 18, /* Continue (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGSTOP = 19, /* Stop, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTSTP = 20, /* Keyboard stop (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTIN = 21, /* Background read from tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTOU = 22, /* Background write to tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGURG = 23, - /* Urgent condition on socket (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXCPU = 24, /* CPU limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXFSZ = 25, - /* File size limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGVTALRM = 26, /* Virtual alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPROF = 27, /* Profiling alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGWINCH = 28, /* Window size change (4.3 BSD, Sun) */ - MD_EXCEPTION_CODE_LIN_SIGIO = 29, /* I/O now possible (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPWR = 30, /* Power failure restart (System V) */ - MD_EXCEPTION_CODE_LIN_SIGSYS = 31 /* Bad system call */ -} MDExceptionCodeLinux; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_mac.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_mac.h deleted file mode 100644 index 5fba44ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_mac.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_mac.h: A definition of exception codes for Mac - * OS X - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/exception_types.h. This is - * what Mac OS X calls an "exception", not a "code". */ -typedef enum { - /* Exception code. The high 16 bits of exception_code contains one of - * these values. */ - MD_EXCEPTION_MAC_BAD_ACCESS = 1, /* code can be a kern_return_t */ - /* EXC_BAD_ACCESS */ - MD_EXCEPTION_MAC_BAD_INSTRUCTION = 2, /* code is CPU-specific */ - /* EXC_BAD_INSTRUCTION */ - MD_EXCEPTION_MAC_ARITHMETIC = 3, /* code is CPU-specific */ - /* EXC_ARITHMETIC */ - MD_EXCEPTION_MAC_EMULATION = 4, /* code is CPU-specific */ - /* EXC_EMULATION */ - MD_EXCEPTION_MAC_SOFTWARE = 5, - /* EXC_SOFTWARE */ - MD_EXCEPTION_MAC_BREAKPOINT = 6, /* code is CPU-specific */ - /* EXC_BREAKPOINT */ - MD_EXCEPTION_MAC_SYSCALL = 7, - /* EXC_SYSCALL */ - MD_EXCEPTION_MAC_MACH_SYSCALL = 8, - /* EXC_MACH_SYSCALL */ - MD_EXCEPTION_MAC_RPC_ALERT = 9 - /* EXC_RPC_ALERT */ -} MDExceptionMac; - -/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/ppc/exception.h and - * mach/i386/exception.h. This is what Mac OS X calls a "code". */ -typedef enum { - /* With MD_EXCEPTION_BAD_ACCESS. These are relevant kern_return_t values - * from mach/kern_return.h. */ - MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS = 1, - /* KERN_INVALID_ADDRESS */ - MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE = 2, - /* KERN_PROTECTION_FAILURE */ - MD_EXCEPTION_CODE_MAC_NO_ACCESS = 8, - /* KERN_NO_ACCESS */ - MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE = 9, - /* KERN_MEMORY_FAILURE */ - MD_EXCEPTION_CODE_MAC_MEMORY_ERROR = 10, - /* KERN_MEMORY_ERROR */ - - /* With MD_EXCEPTION_SOFTWARE */ - MD_EXCEPTION_CODE_MAC_BAD_SYSCALL = 0x00010000, /* Mach SIGSYS */ - MD_EXCEPTION_CODE_MAC_BAD_PIPE = 0x00010001, /* Mach SIGPIPE */ - MD_EXCEPTION_CODE_MAC_ABORT = 0x00010002, /* Mach SIGABRT */ - - /* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101, - /* EXC_PPC_VM_PROT_READ */ - MD_EXCEPTION_CODE_MAC_PPC_BADSPACE = 0x0102, - /* EXC_PPC_BADSPACE */ - MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED = 0x0103, - /* EXC_PPC_UNALIGNED */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL = 1, - /* EXC_PPC_INVALID_SYSCALL */ - MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION = 2, - /* EXC_PPC_UNIPL_INST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION = 3, - /* EXC_PPC_PRIVINST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER = 4, - /* EXC_PPC_PRIVREG */ - MD_EXCEPTION_CODE_MAC_PPC_TRACE = 5, - /* EXC_PPC_TRACE */ - MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR = 6, - /* EXC_PPC_PERFMON */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW = 1, - /* EXC_PPC_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE = 2, - /* EXC_PPC_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT = 3, - /* EXC_FLT_INEXACT */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE = 4, - /* EXC_PPC_FLT_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW = 5, - /* EXC_PPC_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW = 6, - /* EXC_PPC_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER = 7, - /* EXC_PPC_FLT_NOT_A_NUMBER */ - - /* With MD_EXCEPTION_MAC_EMULATION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION = 8, - /* EXC_PPC_NOEMULATION */ - MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST = 9, - /* EXC_PPC_ALTIVECASSIST */ - - /* With MD_EXCEPTION_MAC_SOFTWARE on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_TRAP = 0x00000001, /* EXC_PPC_TRAP */ - MD_EXCEPTION_CODE_MAC_PPC_MIGRATE = 0x00010100, /* EXC_PPC_MIGRATE */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT = 1, /* EXC_PPC_BREAKPOINT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86, see also x86 interrupt - * values below. */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION = 1, /* EXC_I386_INVOP */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on x86 */ - MD_EXCEPTION_CODE_MAC_X86_DIV = 1, /* EXC_I386_DIV */ - MD_EXCEPTION_CODE_MAC_X86_INTO = 2, /* EXC_I386_INTO */ - MD_EXCEPTION_CODE_MAC_X86_NOEXT = 3, /* EXC_I386_NOEXT */ - MD_EXCEPTION_CODE_MAC_X86_EXTOVR = 4, /* EXC_I386_EXTOVR */ - MD_EXCEPTION_CODE_MAC_X86_EXTERR = 5, /* EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_EMERR = 6, /* EXC_I386_EMERR */ - MD_EXCEPTION_CODE_MAC_X86_BOUND = 7, /* EXC_I386_BOUND */ - MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR = 8, /* EXC_I386_SSEEXTERR */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on x86 */ - MD_EXCEPTION_CODE_MAC_X86_SGL = 1, /* EXC_I386_SGL */ - MD_EXCEPTION_CODE_MAC_X86_BPT = 2, /* EXC_I386_BPT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86. These are the raw - * x86 interrupt codes. Most of these are mapped to other Mach - * exceptions and codes, are handled, or should not occur in user space. - * A few of these will do occur with MD_EXCEPTION_MAC_BAD_INSTRUCTION. */ - /* EXC_I386_DIVERR = 0: mapped to EXC_ARITHMETIC/EXC_I386_DIV */ - /* EXC_I386_SGLSTP = 1: mapped to EXC_BREAKPOINT/EXC_I386_SGL */ - /* EXC_I386_NMIFLT = 2: should not occur in user space */ - /* EXC_I386_BPTFLT = 3: mapped to EXC_BREAKPOINT/EXC_I386_BPT */ - /* EXC_I386_INTOFLT = 4: mapped to EXC_ARITHMETIC/EXC_I386_INTO */ - /* EXC_I386_BOUNDFLT = 5: mapped to EXC_ARITHMETIC/EXC_I386_BOUND */ - /* EXC_I386_INVOPFLT = 6: mapped to EXC_BAD_INSTRUCTION/EXC_I386_INVOP */ - /* EXC_I386_NOEXTFLT = 7: should be handled by the kernel */ - /* EXC_I386_DBLFLT = 8: should be handled (if possible) by the kernel */ - /* EXC_I386_EXTOVRFLT = 9: mapped to EXC_BAD_ACCESS/(PROT_READ|PROT_EXEC) */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT = 10, - /* EXC_INVTSSFLT */ - MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT = 11, - /* EXC_SEGNPFLT */ - MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT = 12, - /* EXC_STKFLT */ - MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT = 13, - /* EXC_GPFLT */ - /* EXC_I386_PGFLT = 14: should not occur in user space */ - /* EXC_I386_EXTERRFLT = 16: mapped to EXC_ARITHMETIC/EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT = 17 - /* EXC_ALIGNFLT (for vector operations) */ - /* EXC_I386_ENOEXTFLT = 32: should be handled by the kernel */ - /* EXC_I386_ENDPERR = 33: should not occur */ -} MDExceptionCodeMac; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_OSX_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_solaris.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_solaris.h deleted file mode 100644 index f18ddf42..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_solaris.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_solaris.h: A definition of exception codes for - * Solaris - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. These values come from sys/iso/signal_iso.h - */ -typedef enum { - MD_EXCEPTION_CODE_SOL_SIGHUP = 1, /* Hangup */ - MD_EXCEPTION_CODE_SOL_SIGINT = 2, /* interrupt (rubout) */ - MD_EXCEPTION_CODE_SOL_SIGQUIT = 3, /* quit (ASCII FS) */ - MD_EXCEPTION_CODE_SOL_SIGILL = 4, /* illegal instruction (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGTRAP = 5, /* trace trap (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGIOT = 6, /* IOT instruction */ - MD_EXCEPTION_CODE_SOL_SIGABRT = 6, /* used by abort, replace SIGIOT in the future */ - MD_EXCEPTION_CODE_SOL_SIGEMT = 7, /* EMT instruction */ - MD_EXCEPTION_CODE_SOL_SIGFPE = 8, /* floating point exception */ - MD_EXCEPTION_CODE_SOL_SIGKILL = 9, /* kill (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGBUS = 10, /* bus error */ - MD_EXCEPTION_CODE_SOL_SIGSEGV = 11, /* segmentation violation */ - MD_EXCEPTION_CODE_SOL_SIGSYS = 12, /* bad argument to system call */ - MD_EXCEPTION_CODE_SOL_SIGPIPE = 13, /* write on a pipe with no one to read it */ - MD_EXCEPTION_CODE_SOL_SIGALRM = 14, /* alarm clock */ - MD_EXCEPTION_CODE_SOL_SIGTERM = 15, /* software termination signal from kill */ - MD_EXCEPTION_CODE_SOL_SIGUSR1 = 16, /* user defined signal 1 */ - MD_EXCEPTION_CODE_SOL_SIGUSR2 = 17, /* user defined signal 2 */ - MD_EXCEPTION_CODE_SOL_SIGCLD = 18, /* child status change */ - MD_EXCEPTION_CODE_SOL_SIGCHLD = 18, /* child status change alias (POSIX) */ - MD_EXCEPTION_CODE_SOL_SIGPWR = 19, /* power-fail restart */ - MD_EXCEPTION_CODE_SOL_SIGWINCH = 20, /* window size change */ - MD_EXCEPTION_CODE_SOL_SIGURG = 21, /* urgent socket condition */ - MD_EXCEPTION_CODE_SOL_SIGPOLL = 22, /* pollable event occurred */ - MD_EXCEPTION_CODE_SOL_SIGIO = 22, /* socket I/O possible (SIGPOLL alias) */ - MD_EXCEPTION_CODE_SOL_SIGSTOP = 23, /* stop (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGTSTP = 24, /* user stop requested from tty */ - MD_EXCEPTION_CODE_SOL_SIGCONT = 25, /* stopped process has been continued */ - MD_EXCEPTION_CODE_SOL_SIGTTIN = 26, /* background tty read attempted */ - MD_EXCEPTION_CODE_SOL_SIGTTOU = 27, /* background tty write attempted */ - MD_EXCEPTION_CODE_SOL_SIGVTALRM = 28, /* virtual timer expired */ - MD_EXCEPTION_CODE_SOL_SIGPROF = 29, /* profiling timer expired */ - MD_EXCEPTION_CODE_SOL_SIGXCPU = 30, /* exceeded cpu limit */ - MD_EXCEPTION_CODE_SOL_SIGXFSZ = 31, /* exceeded file size limit */ - MD_EXCEPTION_CODE_SOL_SIGWAITING = 32, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGLWP = 33, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGFREEZE = 34, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGTHAW = 35, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGCANCEL = 36, /* reserved signal for thread cancellation */ - MD_EXCEPTION_CODE_SOL_SIGLOST = 37, /* resource lost (eg, record-lock lost) */ - MD_EXCEPTION_CODE_SOL_SIGXRES = 38, /* resource control exceeded */ - MD_EXCEPTION_CODE_SOL_SIGJVM1 = 39, /* reserved signal for Java Virtual Machine */ - MD_EXCEPTION_CODE_SOL_SIGJVM2 = 40 /* reserved signal for Java Virtual Machine */ -} MDExceptionCodeSolaris; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_win32.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_win32.h deleted file mode 100644 index 458a7054..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_exception_win32.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_win32.h: Definitions of exception codes for - * Win32 platform - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from WinBase.h - * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h, - * they are STATUS_ in WinNT.h). */ -typedef enum { - MD_EXCEPTION_CODE_WIN_CONTROL_C = 0x40010005, - /* DBG_CONTROL_C */ - MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION = 0x80000001, - /* EXCEPTION_GUARD_PAGE */ - MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT = 0x80000002, - /* EXCEPTION_DATATYPE_MISALIGNMENT */ - MD_EXCEPTION_CODE_WIN_BREAKPOINT = 0x80000003, - /* EXCEPTION_BREAKPOINT */ - MD_EXCEPTION_CODE_WIN_SINGLE_STEP = 0x80000004, - /* EXCEPTION_SINGLE_STEP */ - MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION = 0xc0000005, - /* EXCEPTION_ACCESS_VIOLATION */ - MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR = 0xc0000006, - /* EXCEPTION_IN_PAGE_ERROR */ - MD_EXCEPTION_CODE_WIN_INVALID_HANDLE = 0xc0000008, - /* EXCEPTION_INVALID_HANDLE */ - MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION = 0xc000001d, - /* EXCEPTION_ILLEGAL_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025, - /* EXCEPTION_NONCONTINUABLE_EXCEPTION */ - MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION = 0xc0000026, - /* EXCEPTION_INVALID_DISPOSITION */ - MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED = 0xc000008c, - /* EXCEPTION_BOUNDS_EXCEEDED */ - MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND = 0xc000008d, - /* EXCEPTION_FLT_DENORMAL_OPERAND */ - MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO = 0xc000008e, - /* EXCEPTION_FLT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT = 0xc000008f, - /* EXCEPTION_FLT_INEXACT_RESULT */ - MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION = 0xc0000090, - /* EXCEPTION_FLT_INVALID_OPERATION */ - MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW = 0xc0000091, - /* EXCEPTION_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK = 0xc0000092, - /* EXCEPTION_FLT_STACK_CHECK */ - MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW = 0xc0000093, - /* EXCEPTION_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO = 0xc0000094, - /* EXCEPTION_INT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW = 0xc0000095, - /* EXCEPTION_INT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION = 0xc0000096, - /* EXCEPTION_PRIV_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW = 0xc00000fd, - /* EXCEPTION_STACK_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194, - /* EXCEPTION_POSSIBLE_DEADLOCK */ - MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN = 0xc0000409, - /* STATUS_STACK_BUFFER_OVERRUN */ - MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION = 0xc0000374, - /* STATUS_HEAP_CORRUPTION */ - MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363 - /* Per http://support.microsoft.com/kb/185294, - generated by Visual C++ compiler */ -} MDExceptionCodeWin; - -// These constants are defined in the MSDN documentation of -// the EXCEPTION_RECORD structure. -typedef enum { - MD_ACCESS_VIOLATION_WIN_READ = 0, - MD_ACCESS_VIOLATION_WIN_WRITE = 1, - MD_ACCESS_VIOLATION_WIN_EXEC = 8 -} MDAccessViolationTypeWin; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_format.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_format.h deleted file mode 100644 index 77f28ca7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_format.h +++ /dev/null @@ -1,792 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -#if defined(_MSC_VER) -/* Disable "zero-sized array in struct/union" warnings when compiling in - * MSVC. DbgHelp.h does this too. */ -#pragma warning(push) -#pragma warning(disable:4200) -#endif /* _MSC_VER */ - - -/* - * guiddef.h - */ - -typedef struct { - u_int32_t data1; - u_int16_t data2; - u_int16_t data3; - u_int8_t data4[8]; -} MDGUID; /* GUID */ - - -/* - * WinNT.h - */ - -/* Non-x86 CPU identifiers found in the high 26 bits of - * (MDRawContext*).context_flags. These aren't used by Breakpad, but are - * defined here for reference, to avoid assigning values that conflict - * (although some values already conflict). */ -#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */ -#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */ -/* Additional values from winnt.h in the Windows CE 5.0 SDK: */ -#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */ -#define MD_CONTEXT_ARM 0x00000040 /* CONTEXT_ARM (0x40 bit set in SHx?) */ -#define MD_CONTEXT_MIPS 0x00010000 /* CONTEXT_R4000 (same value as x86?) */ -#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */ - -#define MD_CONTEXT_CPU_MASK 0xffffffc0 - - -/* This is a base type for MDRawContextX86 and MDRawContextPPC. This - * structure should never be allocated directly. The actual structure type - * can be determined by examining the context_flags field. */ -typedef struct { - u_int32_t context_flags; -} MDRawContextBase; - -#include "minidump_cpu_amd64.h" -#include "minidump_cpu_arm.h" -#include "minidump_cpu_ppc.h" -#include "minidump_cpu_ppc64.h" -#include "minidump_cpu_sparc.h" -#include "minidump_cpu_x86.h" - -/* - * WinVer.h - */ - - -typedef struct { - u_int32_t signature; - u_int32_t struct_version; - u_int32_t file_version_hi; - u_int32_t file_version_lo; - u_int32_t product_version_hi; - u_int32_t product_version_lo; - u_int32_t file_flags_mask; /* Identifies valid bits in fileFlags */ - u_int32_t file_flags; - u_int32_t file_os; - u_int32_t file_type; - u_int32_t file_subtype; - u_int32_t file_date_hi; - u_int32_t file_date_lo; -} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */ - -/* For (MDVSFixedFileInfo).signature */ -#define MD_VSFIXEDFILEINFO_SIGNATURE 0xfeef04bd - /* VS_FFI_SIGNATURE */ - -/* For (MDVSFixedFileInfo).version */ -#define MD_VSFIXEDFILEINFO_VERSION 0x00010000 - /* VS_FFI_STRUCVERSION */ - -/* For (MDVSFixedFileInfo).file_flags_mask and - * (MDVSFixedFileInfo).file_flags */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG 0x00000001 - /* VS_FF_DEBUG */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRERELEASE 0x00000002 - /* VS_FF_PRERELEASE */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PATCHED 0x00000004 - /* VS_FF_PATCHED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRIVATEBUILD 0x00000008 - /* VS_FF_PRIVATEBUILD */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_INFOINFERRED 0x00000010 - /* VS_FF_INFOINFERRED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_SPECIALBUILD 0x00000020 - /* VS_FF_SPECIALBUILD */ - -/* For (MDVSFixedFileInfo).file_os: high 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS_UNKNOWN 0 /* VOS_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_OS_DOS (1 << 16) /* VOS_DOS */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS216 (2 << 16) /* VOS_OS216 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS232 (3 << 16) /* VOS_OS232 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_NT (4 << 16) /* VOS_NT */ -#define MD_VSFIXEDFILEINFO_FILE_OS_WINCE (5 << 16) /* VOS_WINCE */ -/* Low 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS__BASE 0 /* VOS__BASE */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS16 1 /* VOS__WINDOWS16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM16 2 /* VOS__PM16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM32 3 /* VOS__PM32 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32 4 /* VOS__WINDOWS32 */ - -/* For (MDVSFixedFileInfo).file_type */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_UNKNOWN 0 /* VFT_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_APP 1 /* VFT_APP */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DLL 2 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DRV 3 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_FONT 4 /* VFT_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_VXD 5 /* VFT_VXD */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_STATIC_LIB 7 /* VFT_STATIC_LIB */ - -/* For (MDVSFixedFileInfo).file_subtype */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN 0 - /* VFT2_UNKNOWN */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_DRV */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_PRINTER 1 - /* VFT2_DRV_PRINTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_KEYBOARD 2 - /* VFT2_DRV_KEYBOARD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_LANGUAGE 3 - /* VFT2_DRV_LANGUAGE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_DISPLAY 4 - /* VFT2_DRV_DISPLAY */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_MOUSE 5 - /* VFT2_DRV_MOUSE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_NETWORK 6 - /* VFT2_DRV_NETWORK */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SYSTEM 7 - /* VFT2_DRV_SYSTEM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INSTALLABLE 8 - /* VFT2_DRV_INSTALLABLE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SOUND 9 - /* VFT2_DRV_SOUND */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_COMM 10 - /* VFT2_DRV_COMM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INPUTMETHOD 11 - /* VFT2_DRV_INPUTMETHOD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_VERSIONED_PRINTER 12 - /* VFT2_DRV_VERSIONED_PRINTER */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_RASTER 1 - /* VFT2_FONT_RASTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_VECTOR 2 - /* VFT2_FONT_VECTOR */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_TRUETYPE 3 - /* VFT2_FONT_TRUETYPE */ - - -/* - * DbgHelp.h - */ - - -/* An MDRVA is an offset into the minidump file. The beginning of the - * MDRawHeader is at offset 0. */ -typedef u_int32_t MDRVA; /* RVA */ - -typedef struct { - u_int32_t data_size; - MDRVA rva; -} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */ - - -typedef struct { - /* The base address of the memory range on the host that produced the - * minidump. */ - u_int64_t start_of_memory_range; - - MDLocationDescriptor memory; -} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */ - - -typedef struct { - u_int32_t signature; - u_int32_t version; - u_int32_t stream_count; - MDRVA stream_directory_rva; /* A |stream_count|-sized array of - * MDRawDirectory structures. */ - u_int32_t checksum; /* Can be 0. In fact, that's all that's - * been found in minidump files. */ - u_int32_t time_date_stamp; /* time_t */ - u_int64_t flags; -} MDRawHeader; /* MINIDUMP_HEADER */ - -/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the - * low 16 bits of (MDRawHeader).version are MD_HEADER_VERSION. Per the - * documentation, the high 16 bits are implementation-specific. */ -#define MD_HEADER_SIGNATURE 0x504d444d /* 'PMDM' */ - /* MINIDUMP_SIGNATURE */ -#define MD_HEADER_VERSION 0x0000a793 /* 42899 */ - /* MINIDUMP_VERSION */ - -/* For (MDRawHeader).flags: */ -typedef enum { - /* MD_NORMAL is the standard type of minidump. It includes full - * streams for the thread list, module list, exception, system info, - * and miscellaneous info. A memory list stream is also present, - * pointing to the same stack memory contained in the thread list, - * as well as a 256-byte region around the instruction address that - * was executing when the exception occurred. Stack memory is from - * 4 bytes below a thread's stack pointer up to the top of the - * memory region encompassing the stack. */ - MD_NORMAL = 0x00000000, - MD_WITH_DATA_SEGS = 0x00000001, - MD_WITH_FULL_MEMORY = 0x00000002, - MD_WITH_HANDLE_DATA = 0x00000004, - MD_FILTER_MEMORY = 0x00000008, - MD_SCAN_MEMORY = 0x00000010, - MD_WITH_UNLOADED_MODULES = 0x00000020, - MD_WITH_INDIRECTLY_REFERENCED_MEMORY = 0x00000040, - MD_FILTER_MODULE_PATHS = 0x00000080, - MD_WITH_PROCESS_THREAD_DATA = 0x00000100, - MD_WITH_PRIVATE_READ_WRITE_MEMORY = 0x00000200, - MD_WITHOUT_OPTIONAL_DATA = 0x00000400, - MD_WITH_FULL_MEMORY_INFO = 0x00000800, - MD_WITH_THREAD_INFO = 0x00001000, - MD_WITH_CODE_SEGS = 0x00002000, - MD_WITHOUT_AUXILLIARY_SEGS = 0x00004000, - MD_WITH_FULL_AUXILLIARY_STATE = 0x00008000, - MD_WITH_PRIVATE_WRITE_COPY_MEMORY = 0x00010000, - MD_IGNORE_INACCESSIBLE_MEMORY = 0x00020000, - MD_WITH_TOKEN_INFORMATION = 0x00040000 -} MDType; /* MINIDUMP_TYPE */ - - -typedef struct { - u_int32_t stream_type; - MDLocationDescriptor location; -} MDRawDirectory; /* MINIDUMP_DIRECTORY */ - -/* For (MDRawDirectory).stream_type */ -typedef enum { - MD_UNUSED_STREAM = 0, - MD_RESERVED_STREAM_0 = 1, - MD_RESERVED_STREAM_1 = 2, - MD_THREAD_LIST_STREAM = 3, /* MDRawThreadList */ - MD_MODULE_LIST_STREAM = 4, /* MDRawModuleList */ - MD_MEMORY_LIST_STREAM = 5, /* MDRawMemoryList */ - MD_EXCEPTION_STREAM = 6, /* MDRawExceptionStream */ - MD_SYSTEM_INFO_STREAM = 7, /* MDRawSystemInfo */ - MD_THREAD_EX_LIST_STREAM = 8, - MD_MEMORY_64_LIST_STREAM = 9, - MD_COMMENT_STREAM_A = 10, - MD_COMMENT_STREAM_W = 11, - MD_HANDLE_DATA_STREAM = 12, - MD_FUNCTION_TABLE_STREAM = 13, - MD_UNLOADED_MODULE_LIST_STREAM = 14, - MD_MISC_INFO_STREAM = 15, /* MDRawMiscInfo */ - MD_MEMORY_INFO_LIST_STREAM = 16, /* MDRawMemoryInfoList */ - MD_THREAD_INFO_LIST_STREAM = 17, - MD_HANDLE_OPERATION_LIST_STREAM = 18, - MD_LAST_RESERVED_STREAM = 0x0000ffff, - - /* Breakpad extension types. 0x4767 = "Gg" */ - MD_BREAKPAD_INFO_STREAM = 0x47670001, /* MDRawBreakpadInfo */ - MD_ASSERTION_INFO_STREAM = 0x47670002 /* MDRawAssertionInfo */ -} MDStreamType; /* MINIDUMP_STREAM_TYPE */ - - -typedef struct { - u_int32_t length; /* Length of buffer in bytes (not characters), - * excluding 0-terminator */ - u_int16_t buffer[1]; /* UTF-16-encoded, 0-terminated */ -} MDString; /* MINIDUMP_STRING */ - -static const size_t MDString_minsize = offsetof(MDString, buffer[0]); - - -typedef struct { - u_int32_t thread_id; - u_int32_t suspend_count; - u_int32_t priority_class; - u_int32_t priority; - u_int64_t teb; /* Thread environment block */ - MDMemoryDescriptor stack; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawThread; /* MINIDUMP_THREAD */ - - -typedef struct { - u_int32_t number_of_threads; - MDRawThread threads[1]; -} MDRawThreadList; /* MINIDUMP_THREAD_LIST */ - -static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList, - threads[0]); - - -typedef struct { - u_int64_t base_of_image; - u_int32_t size_of_image; - u_int32_t checksum; /* 0 if unknown */ - u_int32_t time_date_stamp; /* time_t */ - MDRVA module_name_rva; /* MDString, pathname or filename */ - MDVSFixedFileInfo version_info; - - /* The next field stores a CodeView record and is populated when a module's - * debug information resides in a PDB file. It identifies the PDB file. */ - MDLocationDescriptor cv_record; - - /* The next field is populated when a module's debug information resides - * in a DBG file. It identifies the DBG file. This field is effectively - * obsolete with modules built by recent toolchains. */ - MDLocationDescriptor misc_record; - - /* Alignment problem: reserved0 and reserved1 are defined by the platform - * SDK as 64-bit quantities. However, that results in a structure whose - * alignment is unpredictable on different CPUs and ABIs. If the ABI - * specifies full alignment of 64-bit quantities in structures (as ppc - * does), there will be padding between miscRecord and reserved0. If - * 64-bit quantities can be aligned on 32-bit boundaries (as on x86), - * this padding will not exist. (Note that the structure up to this point - * contains 1 64-bit member followed by 21 32-bit members.) - * As a workaround, reserved0 and reserved1 are instead defined here as - * four 32-bit quantities. This should be harmless, as there are - * currently no known uses for these fields. */ - u_int32_t reserved0[2]; - u_int32_t reserved1[2]; -} MDRawModule; /* MINIDUMP_MODULE */ - -/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to - * be tail-padded out to a multiple of 64 bits under some ABIs (such as PPC). - * This doesn't occur on systems that don't tail-pad in this manner. Define - * this macro to be the usable size of the MDRawModule struct, and use it in - * place of sizeof(MDRawModule). */ -#define MD_MODULE_SIZE 108 - - -/* (MDRawModule).cv_record can reference MDCVInfoPDB20 or MDCVInfoPDB70. - * Ref.: http://www.debuginfo.com/articles/debuginfomatch.html - * MDCVInfoPDB70 is the expected structure type with recent toolchains. */ - -typedef struct { - u_int32_t signature; - u_int32_t offset; /* Offset to debug data (expect 0 in minidump) */ -} MDCVHeader; - -typedef struct { - MDCVHeader cv_header; - u_int32_t signature; /* time_t debug information created */ - u_int32_t age; /* revision of PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file */ -} MDCVInfoPDB20; - -static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20, - pdb_file_name[0]); - -#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */ - -typedef struct { - u_int32_t cv_signature; - MDGUID signature; /* GUID, identifies PDB file */ - u_int32_t age; /* Identifies incremental changes to PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file, - * 0-terminated 8-bit character data (UTF-8?) */ -} MDCVInfoPDB70; - -static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70, - pdb_file_name[0]); - -#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */ - -typedef struct { - u_int32_t data1[2]; - u_int32_t data2; - u_int32_t data3; - u_int32_t data4; - u_int32_t data5[3]; - u_int8_t extra[2]; -} MDCVInfoELF; - -/* In addition to the two CodeView record formats above, used for linking - * to external pdb files, it is possible for debugging data to be carried - * directly in the CodeView record itself. These signature values will - * be found in the first 4 bytes of the CodeView record. Additional values - * not commonly experienced in the wild are given by "Microsoft Symbol and - * Type Information", http://www.x86.org/ftp/manuals/tools/sym.pdf, section - * 7.2. An in-depth description of the CodeView 4.1 format is given by - * "Undocumented Windows 2000 Secrets", Windows 2000 Debugging Support/ - * Microsoft Symbol File Internals/CodeView Subsections, - * http://www.rawol.com/features/undocumented/sbs-w2k-1-windows-2000-debugging-support.pdf - */ -#define MD_CVINFOCV41_SIGNATURE 0x3930424e /* '90BN', CodeView 4.10. */ -#define MD_CVINFOCV50_SIGNATURE 0x3131424e /* '11BN', CodeView 5.0, - * MS C7-format (/Z7). */ - -#define MD_CVINFOUNKNOWN_SIGNATURE 0xffffffff /* An unlikely value. */ - -/* (MDRawModule).miscRecord can reference MDImageDebugMisc. The Windows - * structure is actually defined in WinNT.h. This structure is effectively - * obsolete with modules built by recent toolchains. */ - -typedef struct { - u_int32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because - * this debug record type is mostly obsolete. */ - u_int32_t length; /* Length of entire MDImageDebugMisc structure */ - u_int8_t unicode; /* True if data is multibyte */ - u_int8_t reserved[3]; - u_int8_t data[1]; -} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */ - -static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc, - data[0]); - - -typedef struct { - u_int32_t number_of_modules; - MDRawModule modules[1]; -} MDRawModuleList; /* MINIDUMP_MODULE_LIST */ - -static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList, - modules[0]); - - -typedef struct { - u_int32_t number_of_memory_ranges; - MDMemoryDescriptor memory_ranges[1]; -} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */ - -static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList, - memory_ranges[0]); - - -#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15 - -typedef struct { - u_int32_t exception_code; /* Windows: MDExceptionCodeWin, - * Mac OS X: MDExceptionMac, - * Linux: MDExceptionCodeLinux. */ - u_int32_t exception_flags; /* Windows: 1 if noncontinuable, - Mac OS X: MDExceptionCodeMac. */ - u_int64_t exception_record; /* Address (in the minidump-producing host's - * memory) of another MDException, for - * nested exceptions. */ - u_int64_t exception_address; /* The address that caused the exception. - * Mac OS X: exception subcode (which is - * typically the address). */ - u_int32_t number_parameters; /* Number of valid elements in - * exception_information. */ - u_int32_t __align; - u_int64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS]; -} MDException; /* MINIDUMP_EXCEPTION */ - -#include "minidump_exception_win32.h" -#include "minidump_exception_mac.h" -#include "minidump_exception_linux.h" -#include "minidump_exception_solaris.h" - -typedef struct { - u_int32_t thread_id; /* Thread in which the exception - * occurred. Corresponds to - * (MDRawThread).thread_id. */ - u_int32_t __align; - MDException exception_record; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */ - - -typedef union { - struct { - u_int32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ - u_int32_t version_information; /* cpuid 1: eax */ - u_int32_t feature_information; /* cpuid 1: edx */ - u_int32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ - } x86_cpu_info; - struct { - u_int64_t processor_features[2]; - } other_cpu_info; -} MDCPUInformation; /* CPU_INFORMATION */ - - -typedef struct { - /* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO - * structure as returned by GetSystemInfo */ - u_int16_t processor_architecture; - u_int16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */ - u_int16_t processor_revision; /* x86: 0xMMSS, where MM=model, - * SS=stepping */ - - u_int8_t number_of_processors; - u_int8_t product_type; /* Windows: VER_NT_* from WinNT.h */ - - /* The next 5 fields are from the OSVERSIONINFO structure as returned - * by GetVersionEx */ - u_int32_t major_version; - u_int32_t minor_version; - u_int32_t build_number; - u_int32_t platform_id; - MDRVA csd_version_rva; /* MDString further identifying the - * host OS. - * Windows: name of the installed OS - * service pack. - * Mac OS X: the Apple OS build number - * (sw_vers -buildVersion). - * Linux: uname -srvmo */ - - u_int16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */ - u_int16_t reserved2; - - MDCPUInformation cpu; -} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */ - -/* For (MDRawSystemInfo).processor_architecture: */ -typedef enum { - MD_CPU_ARCHITECTURE_X86 = 0, /* PROCESSOR_ARCHITECTURE_INTEL */ - MD_CPU_ARCHITECTURE_MIPS = 1, /* PROCESSOR_ARCHITECTURE_MIPS */ - MD_CPU_ARCHITECTURE_ALPHA = 2, /* PROCESSOR_ARCHITECTURE_ALPHA */ - MD_CPU_ARCHITECTURE_PPC = 3, /* PROCESSOR_ARCHITECTURE_PPC */ - MD_CPU_ARCHITECTURE_SHX = 4, /* PROCESSOR_ARCHITECTURE_SHX - * (Super-H) */ - MD_CPU_ARCHITECTURE_ARM = 5, /* PROCESSOR_ARCHITECTURE_ARM */ - MD_CPU_ARCHITECTURE_IA64 = 6, /* PROCESSOR_ARCHITECTURE_IA64 */ - MD_CPU_ARCHITECTURE_ALPHA64 = 7, /* PROCESSOR_ARCHITECTURE_ALPHA64 */ - MD_CPU_ARCHITECTURE_MSIL = 8, /* PROCESSOR_ARCHITECTURE_MSIL - * (Microsoft Intermediate Language) */ - MD_CPU_ARCHITECTURE_AMD64 = 9, /* PROCESSOR_ARCHITECTURE_AMD64 */ - MD_CPU_ARCHITECTURE_X86_WIN64 = 10, - /* PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 (WoW64) */ - MD_CPU_ARCHITECTURE_SPARC = 0x8001, /* Breakpad-defined value for SPARC */ - MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ -} MDCPUArchitecture; - -/* For (MDRawSystemInfo).platform_id: */ -typedef enum { - MD_OS_WIN32S = 0, /* VER_PLATFORM_WIN32s (Windows 3.1) */ - MD_OS_WIN32_WINDOWS = 1, /* VER_PLATFORM_WIN32_WINDOWS (Windows 95-98-Me) */ - MD_OS_WIN32_NT = 2, /* VER_PLATFORM_WIN32_NT (Windows NT, 2000+) */ - MD_OS_WIN32_CE = 3, /* VER_PLATFORM_WIN32_CE, VER_PLATFORM_WIN32_HH - * (Windows CE, Windows Mobile, "Handheld") */ - - /* The following values are Breakpad-defined. */ - MD_OS_UNIX = 0x8000, /* Generic Unix-ish */ - MD_OS_MAC_OS_X = 0x8101, /* Mac OS X/Darwin */ - MD_OS_LINUX = 0x8201, /* Linux */ - MD_OS_SOLARIS = 0x8202 /* Solaris */ -} MDOSPlatform; - - -typedef struct { - u_int32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ - u_int32_t flags1; - - /* The next field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_ID. */ - u_int32_t process_id; - - /* The next 3 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_TIMES. */ - u_int32_t process_create_time; /* time_t process started */ - u_int32_t process_user_time; /* seconds of user CPU time */ - u_int32_t process_kernel_time; /* seconds of kernel CPU time */ - - /* The following fields are not present in MINIDUMP_MISC_INFO but are - * in MINIDUMP_MISC_INFO_2. When this struct is populated, these values - * may not be set. Use flags1 or sizeOfInfo to determine whether these - * values are present. These are only valid when flags1 contains - * MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */ - u_int32_t processor_max_mhz; - u_int32_t processor_current_mhz; - u_int32_t processor_mhz_limit; - u_int32_t processor_max_idle_state; - u_int32_t processor_current_idle_state; -} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO2 */ - -#define MD_MISCINFO_SIZE 24 -#define MD_MISCINFO2_SIZE 44 - -/* For (MDRawMiscInfo).flags1. These values indicate which fields in the - * MDRawMiscInfoStructure are valid. */ -typedef enum { - MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, - /* MINIDUMP_MISC1_PROCESS_ID */ - MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, - /* MINIDUMP_MISC1_PROCESS_TIMES */ - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004 - /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ -} MDMiscInfoFlags1; - -/* - * Around DbgHelp version 6.0, the style of new LIST structures changed - * from including an array of length 1 at the end of the struct to - * represent the variable-length data to including explicit - * "size of header", "size of entry" and "number of entries" fields - * in the header, presumably to allow backwards-compatibly-extending - * the structures in the future. The actual list entries follow the - * header data directly in this case. - */ - -typedef struct { - u_int32_t size_of_header; /* sizeof(MDRawMemoryInfoList) */ - u_int32_t size_of_entry; /* sizeof(MDRawMemoryInfo) */ - u_int64_t number_of_entries; -} MDRawMemoryInfoList; /* MINIDUMP_MEMORY_INFO_LIST */ - -typedef struct { - u_int64_t base_address; /* Base address of a region of pages */ - u_int64_t allocation_base; /* Base address of a range of pages - * within this region. */ - u_int32_t allocation_protection; /* Memory protection when this region - * was originally allocated: - * MDMemoryProtection */ - u_int32_t __alignment1; - u_int64_t region_size; - u_int32_t state; /* MDMemoryState */ - u_int32_t protection; /* MDMemoryProtection */ - u_int32_t type; /* MDMemoryType */ - u_int32_t __alignment2; -} MDRawMemoryInfo; /* MINIDUMP_MEMORY_INFO */ - -/* For (MDRawMemoryInfo).state */ -typedef enum { - MD_MEMORY_STATE_COMMIT = 0x1000, /* physical storage has been allocated */ - MD_MEMORY_STATE_RESERVE = 0x2000, /* reserved, but no physical storage */ - MD_MEMORY_STATE_FREE = 0x10000 /* available to be allocated */ -} MDMemoryState; - -/* For (MDRawMemoryInfo).allocation_protection and .protection */ -typedef enum { - MD_MEMORY_PROTECT_NOACCESS = 0x01, /* PAGE_NOACCESS */ - MD_MEMORY_PROTECT_READONLY = 0x02, /* PAGE_READONLY */ - MD_MEMORY_PROTECT_READWRITE = 0x04, /* PAGE_READWRITE */ - MD_MEMORY_PROTECT_WRITECOPY = 0x08, /* PAGE_WRITECOPY */ - MD_MEMORY_PROTECT_EXECUTE = 0x10, /* PAGE_EXECUTE */ - MD_MEMORY_PROTECT_EXECUTE_READ = 0x20, /* PAGE_EXECUTE_READ */ - MD_MEMORY_PROTECT_EXECUTE_READWRITE = 0x40, /* PAGE_EXECUTE_READWRITE */ - MD_MEMORY_PROTECT_EXECUTE_WRITECOPY = 0x80, /* PAGE_EXECUTE_WRITECOPY */ - /* These options can be combined with the previous flags. */ - MD_MEMORY_PROTECT_GUARD = 0x100, /* PAGE_GUARD */ - MD_MEMORY_PROTECT_NOCACHE = 0x200, /* PAGE_NOCACHE */ - MD_MEMORY_PROTECT_WRITECOMBINE = 0x400, /* PAGE_WRITECOMBINE */ -} MDMemoryProtection; - -/* Used to mask the mutually exclusive options from the combinable flags. */ -const u_int32_t MD_MEMORY_PROTECTION_ACCESS_MASK = 0xFF; - -/* For (MDRawMemoryInfo).type */ -typedef enum { - MD_MEMORY_TYPE_PRIVATE = 0x20000, /* not shared by other processes */ - MD_MEMORY_TYPE_MAPPED = 0x40000, /* mapped into the view of a section */ - MD_MEMORY_TYPE_IMAGE = 0x1000000 /* mapped into the view of an image */ -} MDMemoryType; - -/* - * Breakpad extension types - */ - - -typedef struct { - /* validity is a bitmask with values from MDBreakpadInfoValidity, indicating - * which of the other fields in the structure are valid. */ - u_int32_t validity; - - /* Thread ID of the handler thread. dump_thread_id should correspond to - * the thread_id of an MDRawThread in the minidump's MDRawThreadList if - * a dedicated thread in that list was used to produce the minidump. If - * the MDRawThreadList does not contain a dedicated thread used to produce - * the minidump, this field should be set to 0 and the validity field - * must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */ - u_int32_t dump_thread_id; - - /* Thread ID of the thread that requested the minidump be produced. As - * with dump_thread_id, requesting_thread_id should correspond to the - * thread_id of an MDRawThread in the minidump's MDRawThreadList. For - * minidumps produced as a result of an exception, requesting_thread_id - * will be the same as the MDRawExceptionStream's thread_id field. For - * minidumps produced "manually" at the program's request, - * requesting_thread_id will indicate which thread caused the dump to be - * written. If the minidump was produced at the request of something - * other than a thread in the MDRawThreadList, this field should be set - * to 0 and the validity field must not contain - * MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */ - u_int32_t requesting_thread_id; -} MDRawBreakpadInfo; - -/* For (MDRawBreakpadInfo).validity: */ -typedef enum { - /* When set, the dump_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID = 1 << 0, - - /* When set, the requesting_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID = 1 << 1 -} MDBreakpadInfoValidity; - -typedef struct { - /* expression, function, and file are 0-terminated UTF-16 strings. They - * may be truncated if necessary, but should always be 0-terminated when - * written to a file. - * Fixed-length strings are used because MiniDumpWriteDump doesn't offer - * a way for user streams to point to arbitrary RVAs for strings. */ - u_int16_t expression[128]; /* Assertion that failed... */ - u_int16_t function[128]; /* ...within this function... */ - u_int16_t file[128]; /* ...in this file... */ - u_int32_t line; /* ...at this line. */ - u_int32_t type; -} MDRawAssertionInfo; - -/* For (MDRawAssertionInfo).type: */ -typedef enum { - MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to an invalid parameter handler instead. */ - MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to a pure virtual call handler instead. */ - MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL -} MDAssertionInfoData; - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_size.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_size.h deleted file mode 100644 index 918544b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/common/minidump_size.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// minidump_size.h: Provides a C++ template for programmatic access to -// the sizes of various types defined in minidump_format.h. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -template -class minidump_size { - public: - static size_t size() { return sizeof(T); } -}; - -// Explicit specializations for variable-length types. The size returned -// for these should be the size for an object without its variable-length -// section. - -template<> -class minidump_size { - public: - static size_t size() { return MDString_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawThreadList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB20_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB70_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDImageDebugMisc_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawModuleList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawMemoryList_minsize; } -}; - -// Explicit specialization for MDRawModule, for which sizeof may include -// tail-padding on some architectures but not others. - -template<> -class minidump_size { - public: - static size_t size() { return MD_MODULE_SIZE; } -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/basic_source_line_resolver.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/basic_source_line_resolver.h deleted file mode 100644 index f77b3bbb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/basic_source_line_resolver.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_source_line_resolver.h: BasicSourceLineResolver is derived from -// SourceLineResolverBase, and is a concrete implementation of -// SourceLineResolverInterface, using address map files produced by a -// compatible writer, e.g. PDBSourceLineWriter. -// -// see "processor/source_line_resolver_base.h" -// and "source_line_resolver_interface.h" for more documentation. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ - -#include - -#include "google_breakpad/processor/source_line_resolver_base.h" - -namespace google_breakpad { - -using std::string; -using std::map; - -class BasicSourceLineResolver : public SourceLineResolverBase { - public: - BasicSourceLineResolver(); - virtual ~BasicSourceLineResolver() { } - - using SourceLineResolverBase::LoadModule; - using SourceLineResolverBase::LoadModuleUsingMapBuffer; - using SourceLineResolverBase::LoadModuleUsingMemoryBuffer; - using SourceLineResolverBase::ShouldDeleteMemoryBufferAfterLoadModule; - using SourceLineResolverBase::UnloadModule; - using SourceLineResolverBase::HasModule; - using SourceLineResolverBase::FillSourceLineInfo; - using SourceLineResolverBase::FindWindowsFrameInfo; - using SourceLineResolverBase::FindCFIFrameInfo; - - private: - // friend declarations: - friend class BasicModuleFactory; - friend class ModuleComparer; - friend class ModuleSerializer; - template friend class SimpleSerializer; - - // Function derives from SourceLineResolverBase::Function. - struct Function; - // Module implements SourceLineResolverBase::Module interface. - class Module; - - // Disallow unwanted copy ctor and assignment operator - BasicSourceLineResolver(const BasicSourceLineResolver&); - void operator=(const BasicSourceLineResolver&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/call_stack.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/call_stack.h deleted file mode 100644 index 21f595e7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/call_stack.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// call_stack.h: A call stack comprised of stack frames. -// -// This class manages a vector of stack frames. It is used instead of -// exposing the vector directly to allow the CallStack to own StackFrame -// pointers without having to publicly export the linked_ptr class. A -// CallStack must be composed of pointers instead of objects to allow for -// CPU-specific StackFrame subclasses. -// -// By convention, the stack frame at index 0 is the innermost callee frame, -// and the frame at the highest index in a call stack is the outermost -// caller. CallStack only allows stacks to be built by pushing frames, -// beginning with the innermost callee frame. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ - -#include - -namespace google_breakpad { - -using std::vector; - -struct StackFrame; -template class linked_ptr; - -class CallStack { - public: - CallStack() { Clear(); } - ~CallStack(); - - // Resets the CallStack to its initial empty state - void Clear(); - - const vector* frames() const { return &frames_; } - - private: - // Stackwalker is responsible for building the frames_ vector. - friend class Stackwalker; - - // Storage for pushed frames. - vector frames_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCSSOR_CALL_STACK_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_module.h deleted file mode 100644 index 38ee956e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_module.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_module.h: Carries information about code modules that are loaded -// into a process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class CodeModule { - public: - virtual ~CodeModule() {} - - // The base address of this code module as it was loaded by the process. - // (u_int64_t)-1 on error. - virtual u_int64_t base_address() const = 0; - - // The size of the code module. 0 on error. - virtual u_int64_t size() const = 0; - - // The path or file name that the code module was loaded from. Empty on - // error. - virtual string code_file() const = 0; - - // An identifying string used to discriminate between multiple versions and - // builds of the same code module. This may contain a uuid, timestamp, - // version number, or any combination of this or other information, in an - // implementation-defined format. Empty on error. - virtual string code_identifier() const = 0; - - // The filename containing debugging information associated with the code - // module. If debugging information is stored in a file separate from the - // code module itself (as is the case when .pdb or .dSYM files are used), - // this will be different from code_file. If debugging information is - // stored in the code module itself (possibly prior to stripping), this - // will be the same as code_file. Empty on error. - virtual string debug_file() const = 0; - - // An identifying string similar to code_identifier, but identifies a - // specific version and build of the associated debug file. This may be - // the same as code_identifier when the debug_file and code_file are - // identical or when the same identifier is used to identify distinct - // debug and code files. - virtual string debug_identifier() const = 0; - - // A human-readable representation of the code module's version. Empty on - // error. - virtual string version() const = 0; - - // Creates a new copy of this CodeModule object, which the caller takes - // ownership of. The new CodeModule may be of a different concrete class - // than the CodeModule being copied, but will behave identically to the - // copied CodeModule as far as the CodeModule interface is concerned. - virtual const CodeModule* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_modules.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_modules.h deleted file mode 100644 index 29c55d4e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/code_modules.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_modules.h: Contains all of the CodeModule objects that were loaded -// into a single process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -class CodeModules { - public: - virtual ~CodeModules() {} - - // The number of contained CodeModule objects. - virtual unsigned int module_count() const = 0; - - // Random access to modules. Returns the module whose code is present - // at the address indicated by |address|. If no module is present at this - // address, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const = 0; - - // Returns the module corresponding to the main executable. If there is - // no main executable, returns NULL. Ownership of the returned CodeModule - // is retained by the CodeModules object; pointers returned by this method - // are valid for comparison with pointers returned by the other Get - // methods. - virtual const CodeModule* GetMainModule() const = 0; - - // Sequential access to modules. A sequence number of 0 corresponds to the - // module residing lowest in memory. If the sequence number is out of - // range, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtSequence( - unsigned int sequence) const = 0; - - // Sequential access to modules. This is similar to GetModuleAtSequence, - // except no ordering requirement is enforced. A CodeModules implementation - // may return CodeModule objects from GetModuleAtIndex in any order it - // wishes, provided that the order remain the same throughout the life of - // the CodeModules object. Typically, GetModuleAtIndex would be used by - // a caller to enumerate all CodeModule objects quickly when the enumeration - // does not require any ordering. If the index argument is out of range, - // returns NULL. Ownership of the returned CodeModule is retained by - // the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const = 0; - - // Creates a new copy of this CodeModules object, which the caller takes - // ownership of. The new object will also contain copies of the existing - // object's child CodeModule objects. The new CodeModules object may be of - // a different concrete class than the object being copied, but will behave - // identically to the copied object as far as the CodeModules and CodeModule - // interfaces are concerned, except that the order that GetModuleAtIndex - // returns objects in may differ between a copy and the original CodeModules - // object. - virtual const CodeModules* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/exploitability.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/exploitability.h deleted file mode 100644 index 225206d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/exploitability.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exploitability_engine.h: Generic exploitability engine. -// -// The Exploitability class is an abstract base class providing common -// generic methods that apply to exploitability engines for specific platforms. -// Specific implementations will extend this class by providing run -// methods to fill in the exploitability_ enumeration of the ProcessState -// for a crash. -// -// Author: Cris Neckar - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/process_state.h" - -namespace google_breakpad { - -class Exploitability { - public: - virtual ~Exploitability() {} - - static Exploitability *ExploitabilityForPlatform(Minidump *dump, - ProcessState *process_state); - - ExploitabilityRating CheckExploitability(); - bool AddressIsAscii(u_int64_t); - - protected: - Exploitability(Minidump *dump, - ProcessState *process_state); - - Minidump *dump_; - ProcessState *process_state_; - SystemInfo *system_info_; - - private: - virtual ExploitabilityRating CheckPlatformExploitability() = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/fast_source_line_resolver.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/fast_source_line_resolver.h deleted file mode 100644 index 60f6dfce..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/fast_source_line_resolver.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// fast_source_line_resolver.h: FastSourceLineResolver is derived from -// SourceLineResolverBase, and is a concrete implementation of -// SourceLineResolverInterface. -// -// FastSourceLineResolver is a sibling class of BasicSourceLineResolver. The -// difference is FastSourceLineResolver loads a serialized memory chunk of data -// which can be used directly a Module without parsing or copying of underlying -// data. Therefore loading a symbol in FastSourceLineResolver is much faster -// and more memory-efficient than BasicSourceLineResolver. -// -// See "source_line_resolver_base.h" and -// "google_breakpad/source_line_resolver_interface.h" for more reference. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_FAST_SOURCE_LINE_RESOLVER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_FAST_SOURCE_LINE_RESOLVER_H__ - -#include -#include - -#include "google_breakpad/processor/source_line_resolver_base.h" - -namespace google_breakpad { - -using std::map; - -class FastSourceLineResolver : public SourceLineResolverBase { - public: - FastSourceLineResolver(); - virtual ~FastSourceLineResolver() { } - - using SourceLineResolverBase::FillSourceLineInfo; - using SourceLineResolverBase::FindCFIFrameInfo; - using SourceLineResolverBase::FindWindowsFrameInfo; - using SourceLineResolverBase::HasModule; - using SourceLineResolverBase::LoadModule; - using SourceLineResolverBase::LoadModuleUsingMapBuffer; - using SourceLineResolverBase::LoadModuleUsingMemoryBuffer; - using SourceLineResolverBase::UnloadModule; - - private: - // Friend declarations. - friend class ModuleComparer; - friend class ModuleSerializer; - friend class FastModuleFactory; - - // Nested types that will derive from corresponding nested types defined in - // SourceLineResolverBase. - struct Line; - struct Function; - struct PublicSymbol; - class Module; - - // Deserialize raw memory data to construct a WindowsFrameInfo object. - static WindowsFrameInfo CopyWFI(const char *raw_memory); - - // FastSourceLineResolver requires the memory buffer stays alive during the - // lifetime of a corresponding module, therefore it needs to redefine this - // virtual method. - virtual bool ShouldDeleteMemoryBufferAfterLoadModule(); - - // Disallow unwanted copy ctor and assignment operator - FastSourceLineResolver(const FastSourceLineResolver&); - void operator=(const FastSourceLineResolver&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_FAST_SOURCE_LINE_RESOLVER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/memory_region.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/memory_region.h deleted file mode 100644 index 15e23ddc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/memory_region.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// memory_region.h: Access to memory regions. -// -// A MemoryRegion provides virtual access to a range of memory. It is an -// abstraction allowing the actual source of memory to be independent of -// methods which need to access a virtual memory space. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ - - -#include "google_breakpad/common/breakpad_types.h" - - -namespace google_breakpad { - - -class MemoryRegion { - public: - virtual ~MemoryRegion() {} - - // The base address of this memory region. - virtual u_int64_t GetBase() const = 0; - - // The size of this memory region. - virtual u_int32_t GetSize() const = 0; - - // Access to data of various sizes within the memory region. address - // is a pointer to read, and it must lie within the memory region as - // defined by its base address and size. The location pointed to by - // value is set to the value at address. Byte-swapping is performed - // if necessary so that the value is appropriate for the running - // program. Returns true on success. Fails and returns false if address - // is out of the region's bounds (after considering the width of value), - // or for other types of errors. - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const =0; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump.h deleted file mode 100644 index 012a8135..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump.h +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump.h: A minidump reader. -// -// The basic structure of this module tracks the structure of the minidump -// file itself. At the top level, a minidump file is represented by a -// Minidump object. Like most other classes in this module, Minidump -// provides a Read method that initializes the object with information from -// the file. Most of the classes in this file are wrappers around the -// "raw" structures found in the minidump file itself, and defined in -// minidump_format.h. For example, each thread is represented by a -// MinidumpThread object, whose parameters are specified in an MDRawThread -// structure. A properly byte-swapped MDRawThread can be obtained from a -// MinidumpThread easily by calling its thread() method. -// -// Most of the module lazily reads only the portion of the minidump file -// necessary to fulfill the user's request. Calling Minidump::Read -// only reads the minidump's directory. The thread list is not read until -// it is needed, and even once it's read, the memory regions for each -// thread's stack aren't read until they're needed. This strategy avoids -// unnecessary file input, and allocating memory for data in which the user -// has no interest. Note that although memory allocations for a typical -// minidump file are not particularly large, it is possible for legitimate -// minidumps to be sizable. A full-memory minidump, for example, contains -// a snapshot of the entire mapped memory space. Even a normal minidump, -// with stack memory only, can be large if, for example, the dump was -// generated in response to a crash that occurred due to an infinite- -// recursion bug that caused the stack's limits to be exceeded. Finally, -// some users of this library will unfortunately find themselves in the -// position of having to process potentially-hostile minidumps that might -// attempt to cause problems by forcing the minidump processor to over- -// allocate memory. -// -// Memory management in this module is based on a strict -// you-don't-own-anything policy. The only object owned by the user is -// the top-level Minidump object, the creation and destruction of which -// must be the user's own responsibility. All other objects obtained -// through interaction with this module are ultimately owned by the -// Minidump object, and will be freed upon the Minidump object's destruction. -// Because memory regions can potentially involve large allocations, a -// FreeMemory method is provided by MinidumpMemoryRegion, allowing the user -// to release data when it is no longer needed. Use of this method is -// optional but recommended. If freed data is later required, it will -// be read back in from the minidump file again. -// -// There is one exception to this memory management policy: -// Minidump::ReadString will return a string object to the user, and the user -// is responsible for its deletion. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ - -#ifndef _WIN32 -#include -#endif - -#include -#include -#include -#include - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" - - -namespace google_breakpad { - - -using std::map; -using std::string; -using std::vector; - - -class Minidump; -template class RangeMap; - - -// MinidumpObject is the base of all Minidump* objects except for Minidump -// itself. -class MinidumpObject { - public: - virtual ~MinidumpObject() {} - - bool valid() const { return valid_; } - - protected: - explicit MinidumpObject(Minidump* minidump); - - // Refers to the Minidump object that is the ultimate parent of this - // Some MinidumpObjects are owned by other MinidumpObjects, but at the - // root of the ownership tree is always a Minidump. The Minidump object - // is kept here for access to its seeking and reading facilities, and - // for access to data about the minidump file itself, such as whether - // it should be byte-swapped. - Minidump* minidump_; - - // MinidumpObjects are not valid when created. When a subclass populates - // its own fields, it can set valid_ to true. Accessors and mutators may - // wish to consider or alter the valid_ state as they interact with - // objects. - bool valid_; -}; - - -// This class exists primarily to provide a virtual destructor in a base -// class common to all objects that might be stored in -// Minidump::mStreamObjects. Some object types (MinidumpContext) will -// never be stored in Minidump::mStreamObjects, but are represented as -// streams and adhere to the same interface, and may be derived from -// this class. -class MinidumpStream : public MinidumpObject { - public: - virtual ~MinidumpStream() {} - - protected: - explicit MinidumpStream(Minidump* minidump); - - private: - // Populate (and validate) the MinidumpStream. minidump_ is expected - // to be positioned at the beginning of the stream, so that the next - // read from the minidump will be at the beginning of the stream. - // expected_size should be set to the stream's length as contained in - // the MDRawDirectory record or other identifying record. A class - // that implements MinidumpStream can compare expected_size to a - // known size as an integrity check. - virtual bool Read(u_int32_t expected_size) = 0; -}; - - -// MinidumpContext carries a CPU-specific MDRawContext structure, which -// contains CPU context such as register states. Each thread has its -// own context, and the exception record, if present, also has its own -// context. Note that if the exception record is present, the context it -// refers to is probably what the user wants to use for the exception -// thread, instead of that thread's own context. The exception thread's -// context (as opposed to the exception record's context) will contain -// context for the exception handler (which performs minidump generation), -// and not the context that caused the exception (which is probably what the -// user wants). -class MinidumpContext : public MinidumpStream { - public: - virtual ~MinidumpContext(); - - // Returns an MD_CONTEXT_* value such as MD_CONTEXT_X86 or MD_CONTEXT_PPC - // identifying the CPU type that the context was collected from. The - // returned value will identify the CPU only, and will have any other - // MD_CONTEXT_* bits masked out. Returns 0 on failure. - u_int32_t GetContextCPU() const; - - // Returns raw CPU-specific context data for the named CPU type. If the - // context data does not match the CPU type or does not exist, returns - // NULL. - const MDRawContextAMD64* GetContextAMD64() const; - const MDRawContextARM* GetContextARM() const; - const MDRawContextPPC* GetContextPPC() const; - const MDRawContextSPARC* GetContextSPARC() const; - const MDRawContextX86* GetContextX86() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpException; - - explicit MinidumpContext(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // Free the CPU-specific context structure. - void FreeContext(); - - // If the minidump contains a SYSTEM_INFO_STREAM, makes sure that the - // system info stream gives an appropriate CPU type matching the context - // CPU type in context_cpu_type. Returns false if the CPU type does not - // match. Returns true if the CPU type matches or if the minidump does - // not contain a system info stream. - bool CheckAgainstSystemInfo(u_int32_t context_cpu_type); - - // Store this separately because of the weirdo AMD64 context - u_int32_t context_flags_; - - // The CPU-specific context structure. - union { - MDRawContextBase* base; - MDRawContextX86* x86; - MDRawContextPPC* ppc; - MDRawContextAMD64* amd64; - // on Solaris SPARC, sparc is defined as a numeric constant, - // so variables can NOT be named as sparc - MDRawContextSPARC* ctx_sparc; - MDRawContextARM* arm; - } context_; -}; - - -// MinidumpMemoryRegion does not wrap any MDRaw structure, and only contains -// a reference to an MDMemoryDescriptor. This object is intended to wrap -// portions of a minidump file that contain memory dumps. In normal -// minidumps, each MinidumpThread owns a MinidumpMemoryRegion corresponding -// to the thread's stack memory. MinidumpMemoryList also gives access to -// memory regions in its list as MinidumpMemoryRegions. This class -// adheres to MemoryRegion so that it may be used as a data provider to -// the Stackwalker family of classes. -class MinidumpMemoryRegion : public MinidumpObject, - public MemoryRegion { - public: - virtual ~MinidumpMemoryRegion(); - - static void set_max_bytes(u_int32_t max_bytes) { max_bytes_ = max_bytes; } - static u_int32_t max_bytes() { return max_bytes_; } - - // Returns a pointer to the base of the memory region. Returns the - // cached value if available, otherwise, reads the minidump file and - // caches the memory region. - const u_int8_t* GetMemory() const; - - // The address of the base of the memory region. - u_int64_t GetBase() const; - - // The size, in bytes, of the memory region. - u_int32_t GetSize() const; - - // Frees the cached memory region, if cached. - void FreeMemory(); - - // Obtains the value of memory at the pointer specified by address. - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpMemoryList; - - explicit MinidumpMemoryRegion(Minidump* minidump); - - // Identify the base address and size of the memory region, and the - // location it may be found in the minidump file. - void SetDescriptor(MDMemoryDescriptor* descriptor); - - // Implementation for GetMemoryAtAddress - template bool GetMemoryAtAddressInternal(u_int64_t address, - T* value) const; - - // The largest memory region that will be read from a minidump. The - // default is 1MB. - static u_int32_t max_bytes_; - - // Base address and size of the memory region, and its position in the - // minidump file. - MDMemoryDescriptor* descriptor_; - - // Cached memory. - mutable vector* memory_; -}; - - -// MinidumpThread contains information about a thread of execution, -// including a snapshot of the thread's stack and CPU context. For -// the thread that caused an exception, the context carried by -// MinidumpException is probably desired instead of the CPU context -// provided here. -class MinidumpThread : public MinidumpObject { - public: - virtual ~MinidumpThread(); - - const MDRawThread* thread() const { return valid_ ? &thread_ : NULL; } - MinidumpMemoryRegion* GetMemory(); - MinidumpContext* GetContext(); - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawThread structure. Returns false if the thread ID cannot be - // determined. - bool GetThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpThreadList. - friend class MinidumpThreadList; - - explicit MinidumpThread(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpThreadList. No size checking is done, because - // MinidumpThreadList handles that directly. - bool Read(); - - MDRawThread thread_; - MinidumpMemoryRegion* memory_; - MinidumpContext* context_; -}; - - -// MinidumpThreadList contains all of the threads (as MinidumpThreads) in -// a process. -class MinidumpThreadList : public MinidumpStream { - public: - virtual ~MinidumpThreadList(); - - static void set_max_threads(u_int32_t max_threads) { - max_threads_ = max_threads; - } - static u_int32_t max_threads() { return max_threads_; } - - unsigned int thread_count() const { - return valid_ ? thread_count_ : 0; - } - - // Sequential access to threads. - MinidumpThread* GetThreadAtIndex(unsigned int index) const; - - // Random access to threads. - MinidumpThread* GetThreadByID(u_int32_t thread_id); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef map IDToThreadMap; - typedef vector MinidumpThreads; - - static const u_int32_t kStreamType = MD_THREAD_LIST_STREAM; - - explicit MinidumpThreadList(Minidump* aMinidump); - - bool Read(u_int32_t aExpectedSize); - - // The largest number of threads that will be read from a minidump. The - // default is 256. - static u_int32_t max_threads_; - - // Access to threads using the thread ID as the key. - IDToThreadMap id_to_thread_map_; - - // The list of threads. - MinidumpThreads* threads_; - u_int32_t thread_count_; -}; - - -// MinidumpModule wraps MDRawModule, which contains information about loaded -// code modules. Access is provided to various data referenced indirectly -// by MDRawModule, such as the module's name and a specification for where -// to locate debugging information for the module. -class MinidumpModule : public MinidumpObject, - public CodeModule { - public: - virtual ~MinidumpModule(); - - static void set_max_cv_bytes(u_int32_t max_cv_bytes) { - max_cv_bytes_ = max_cv_bytes; - } - static u_int32_t max_cv_bytes() { return max_cv_bytes_; } - - static void set_max_misc_bytes(u_int32_t max_misc_bytes) { - max_misc_bytes_ = max_misc_bytes; - } - static u_int32_t max_misc_bytes() { return max_misc_bytes_; } - - const MDRawModule* module() const { return valid_ ? &module_ : NULL; } - - // CodeModule implementation - virtual u_int64_t base_address() const { - return valid_ ? module_.base_of_image : static_cast(-1); - } - virtual u_int64_t size() const { return valid_ ? module_.size_of_image : 0; } - virtual string code_file() const; - virtual string code_identifier() const; - virtual string debug_file() const; - virtual string debug_identifier() const; - virtual string version() const; - virtual const CodeModule* Copy() const; - - // The CodeView record, which contains information to locate the module's - // debugging information (pdb). This is returned as u_int8_t* because - // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be - // of a type unknown to Breakpad, in which case the raw data will still be - // returned but no byte-swapping will have been performed. Check the - // record's signature in the first four bytes to differentiate between - // the various types. Current toolchains generate modules which carry - // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on - // success, and NULL on failure. On success, the optional |size| argument - // is set to the size of the CodeView record. - const u_int8_t* GetCVRecord(u_int32_t* size); - - // The miscellaneous debug record, which is obsolete. Current toolchains - // do not generate this type of debugging information (dbg), and this - // field is not expected to be present. Returns a pointer to the debugging - // record on success, and NULL on failure. On success, the optional |size| - // argument is set to the size of the debugging record. - const MDImageDebugMisc* GetMiscRecord(u_int32_t* size); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpModuleList. - friend class MinidumpModuleList; - - explicit MinidumpModule(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpModuleList. No size checking is done, because - // MinidumpModuleList handles that directly. - bool Read(); - - // Reads indirectly-referenced data, including the module name, CodeView - // record, and miscellaneous debugging record. This is necessary to allow - // MinidumpModuleList to fully construct MinidumpModule objects without - // requiring seeks to read a contiguous set of MinidumpModule objects. - // All auxiliary data should be available when Read is called, in order to - // allow the CodeModule getters to be const methods. - bool ReadAuxiliaryData(); - - // The largest number of bytes that will be read from a minidump for a - // CodeView record or miscellaneous debugging record, respectively. The - // default for each is 1024. - static u_int32_t max_cv_bytes_; - static u_int32_t max_misc_bytes_; - - // True after a successful Read. This is different from valid_, which is - // not set true until ReadAuxiliaryData also completes successfully. - // module_valid_ is only used by ReadAuxiliaryData and the functions it - // calls to determine whether the object is ready for auxiliary data to - // be read. - bool module_valid_; - - // True if debug info was read from the module. Certain modules - // may contain debug records in formats we don't support, - // so we can just set this to false to ignore them. - bool has_debug_info_; - - MDRawModule module_; - - // Cached module name. - const string* name_; - - // Cached CodeView record - this is MDCVInfoPDB20 or (likely) - // MDCVInfoPDB70, or possibly something else entirely. Stored as a u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* cv_record_; - - // If cv_record_ is present, cv_record_signature_ contains a copy of the - // CodeView record's first four bytes, for ease of determinining the - // type of structure that cv_record_ contains. - u_int32_t cv_record_signature_; - - // Cached MDImageDebugMisc (usually not present), stored as u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* misc_record_; -}; - - -// MinidumpModuleList contains all of the loaded code modules for a process -// in the form of MinidumpModules. It maintains a map of these modules -// so that it may easily provide a code module corresponding to a specific -// address. -class MinidumpModuleList : public MinidumpStream, - public CodeModules { - public: - virtual ~MinidumpModuleList(); - - static void set_max_modules(u_int32_t max_modules) { - max_modules_ = max_modules; - } - static u_int32_t max_modules() { return max_modules_; } - - // CodeModules implementation. - virtual unsigned int module_count() const { - return valid_ ? module_count_ : 0; - } - virtual const MinidumpModule* GetModuleForAddress(u_int64_t address) const; - virtual const MinidumpModule* GetMainModule() const; - virtual const MinidumpModule* GetModuleAtSequence( - unsigned int sequence) const; - virtual const MinidumpModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MinidumpModules; - - static const u_int32_t kStreamType = MD_MODULE_LIST_STREAM; - - explicit MinidumpModuleList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of modules that will be read from a minidump. The - // default is 1024. - static u_int32_t max_modules_; - - // Access to modules using addresses as the key. - RangeMap *range_map_; - - MinidumpModules *modules_; - u_int32_t module_count_; -}; - - -// MinidumpMemoryList corresponds to a minidump's MEMORY_LIST_STREAM stream, -// which references the snapshots of all of the memory regions contained -// within the minidump. For a normal minidump, this includes stack memory -// (also referenced by each MinidumpThread, in fact, the MDMemoryDescriptors -// here and in MDRawThread both point to exactly the same data in a -// minidump file, conserving space), as well as a 256-byte snapshot of memory -// surrounding the instruction pointer in the case of an exception. Other -// types of minidumps may contain significantly more memory regions. Full- -// memory minidumps contain all of a process' mapped memory. -class MinidumpMemoryList : public MinidumpStream { - public: - virtual ~MinidumpMemoryList(); - - static void set_max_regions(u_int32_t max_regions) { - max_regions_ = max_regions; - } - static u_int32_t max_regions() { return max_regions_; } - - unsigned int region_count() const { return valid_ ? region_count_ : 0; } - - // Sequential access to memory regions. - MinidumpMemoryRegion* GetMemoryRegionAtIndex(unsigned int index); - - // Random access to memory regions. Returns the region encompassing - // the address identified by address. - MinidumpMemoryRegion* GetMemoryRegionForAddress(u_int64_t address); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MemoryDescriptors; - typedef vector MemoryRegions; - - static const u_int32_t kStreamType = MD_MEMORY_LIST_STREAM; - - explicit MinidumpMemoryList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of memory regions that will be read from a minidump. - // The default is 256. - static u_int32_t max_regions_; - - // Access to memory regions using addresses as the key. - RangeMap *range_map_; - - // The list of descriptors. This is maintained separately from the list - // of regions, because MemoryRegion doesn't own its MemoryDescriptor, it - // maintains a pointer to it. descriptors_ provides the storage for this - // purpose. - MemoryDescriptors *descriptors_; - - // The list of regions. - MemoryRegions *regions_; - u_int32_t region_count_; -}; - - -// MinidumpException wraps MDRawExceptionStream, which contains information -// about the exception that caused the minidump to be generated, if the -// minidump was generated in an exception handler called as a result of -// an exception. It also provides access to a MinidumpContext object, -// which contains the CPU context for the exception thread at the time -// the exception occurred. -class MinidumpException : public MinidumpStream { - public: - virtual ~MinidumpException(); - - const MDRawExceptionStream* exception() const { - return valid_ ? &exception_ : NULL; - } - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawExceptionStream structure. Returns false if the thread ID cannot - // be determined. - bool GetThreadID(u_int32_t *thread_id) const; - - MinidumpContext* GetContext(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_EXCEPTION_STREAM; - - explicit MinidumpException(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawExceptionStream exception_; - MinidumpContext* context_; -}; - -// MinidumpAssertion wraps MDRawAssertionInfo, which contains information -// about an assertion that caused the minidump to be generated. -class MinidumpAssertion : public MinidumpStream { - public: - virtual ~MinidumpAssertion(); - - const MDRawAssertionInfo* assertion() const { - return valid_ ? &assertion_ : NULL; - } - - string expression() const { - return valid_ ? expression_ : ""; - } - - string function() const { - return valid_ ? function_ : ""; - } - - string file() const { - return valid_ ? file_ : ""; - } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_ASSERTION_INFO_STREAM; - - explicit MinidumpAssertion(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawAssertionInfo assertion_; - string expression_; - string function_; - string file_; -}; - - -// MinidumpSystemInfo wraps MDRawSystemInfo and provides information about -// the system on which the minidump was generated. See also MinidumpMiscInfo. -class MinidumpSystemInfo : public MinidumpStream { - public: - virtual ~MinidumpSystemInfo(); - - const MDRawSystemInfo* system_info() const { - return valid_ ? &system_info_ : NULL; - } - - // GetOS and GetCPU return textual representations of the operating system - // and CPU that produced the minidump. Unlike most other Minidump* methods, - // they return string objects, not weak pointers. Defined values for - // GetOS() are "mac", "windows", and "linux". Defined values for GetCPU - // are "x86" and "ppc". These methods return an empty string when their - // values are unknown. - string GetOS(); - string GetCPU(); - - // I don't know what CSD stands for, but this field is documented as - // returning a textual representation of the OS service pack. On other - // platforms, this provides additional information about an OS version - // level beyond major.minor.micro. Returns NULL if unknown. - const string* GetCSDVersion(); - - // If a CPU vendor string can be determined, returns a pointer to it, - // otherwise, returns NULL. CPU vendor strings can be determined from - // x86 CPUs with CPUID 0. - const string* GetCPUVendor(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_SYSTEM_INFO_STREAM; - - explicit MinidumpSystemInfo(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawSystemInfo system_info_; - - // Textual representation of the OS service pack, for minidumps produced - // by MiniDumpWriteDump on Windows. - const string* csd_version_; - - // A string identifying the CPU vendor, if known. - const string* cpu_vendor_; -}; - - -// MinidumpMiscInfo wraps MDRawMiscInfo and provides information about -// the process that generated the minidump, and optionally additional system -// information. See also MinidumpSystemInfo. -class MinidumpMiscInfo : public MinidumpStream { - public: - const MDRawMiscInfo* misc_info() const { - return valid_ ? &misc_info_ : NULL; - } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_MISC_INFO_STREAM; - - explicit MinidumpMiscInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawMiscInfo misc_info_; -}; - - -// MinidumpBreakpadInfo wraps MDRawBreakpadInfo, which is an optional stream in -// a minidump that provides additional information about the process state -// at the time the minidump was generated. -class MinidumpBreakpadInfo : public MinidumpStream { - public: - const MDRawBreakpadInfo* breakpad_info() const { - return valid_ ? &breakpad_info_ : NULL; - } - - // These thread IDs are used to determine if threads deserve special - // treatment, so special getters are provided to retrieve this data from - // the MDRawBreakpadInfo structure. The getters return false if the thread - // IDs cannot be determined. - bool GetDumpThreadID(u_int32_t *thread_id) const; - bool GetRequestingThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_BREAKPAD_INFO_STREAM; - - explicit MinidumpBreakpadInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawBreakpadInfo breakpad_info_; -}; - -// MinidumpMemoryInfo wraps MDRawMemoryInfo, which provides information -// about mapped memory regions in a process, including their ranges -// and protection. -class MinidumpMemoryInfo : public MinidumpObject { - public: - const MDRawMemoryInfo* info() const { return valid_ ? &memory_info_ : NULL; } - - // The address of the base of the memory region. - u_int64_t GetBase() const { return valid_ ? memory_info_.base_address : 0; } - - // The size, in bytes, of the memory region. - u_int32_t GetSize() const { return valid_ ? memory_info_.region_size : 0; } - - // Return true if the memory protection allows execution. - bool IsExecutable() const; - - // Return true if the memory protection allows writing. - bool IsWritable() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpMemoryInfoList. - friend class MinidumpMemoryInfoList; - - explicit MinidumpMemoryInfo(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpMemoryInfoList. No size checking is done, because - // MinidumpMemoryInfoList handles that directly. - bool Read(); - - MDRawMemoryInfo memory_info_; -}; - -// MinidumpMemoryInfoList contains a list of information about -// mapped memory regions for a process in the form of MDRawMemoryInfo. -// It maintains a map of these structures so that it may easily provide -// info corresponding to a specific address. -class MinidumpMemoryInfoList : public MinidumpStream { - public: - virtual ~MinidumpMemoryInfoList(); - - unsigned int info_count() const { return valid_ ? info_count_ : 0; } - - const MinidumpMemoryInfo* GetMemoryInfoForAddress(u_int64_t address) const; - const MinidumpMemoryInfo* GetMemoryInfoAtIndex(unsigned int index) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MinidumpMemoryInfos; - - static const u_int32_t kStreamType = MD_MEMORY_INFO_LIST_STREAM; - - explicit MinidumpMemoryInfoList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // Access to memory info using addresses as the key. - RangeMap *range_map_; - - MinidumpMemoryInfos* infos_; - u_int32_t info_count_; -}; - - -// Minidump is the user's interface to a minidump file. It wraps MDRawHeader -// and provides access to the minidump's top-level stream directory. -class Minidump { - public: - // path is the pathname of a file containing the minidump. - explicit Minidump(const string& path); - // input is an istream wrapping minidump data. Minidump holds a - // weak pointer to input, and the caller must ensure that the stream - // is valid as long as the Minidump object is. - explicit Minidump(std::istream& input); - - virtual ~Minidump(); - - // path may be empty if the minidump was not opened from a file - virtual string path() const { - return path_; - } - static void set_max_streams(u_int32_t max_streams) { - max_streams_ = max_streams; - } - static u_int32_t max_streams() { return max_streams_; } - - static void set_max_string_length(u_int32_t max_string_length) { - max_string_length_ = max_string_length; - } - static u_int32_t max_string_length() { return max_string_length_; } - - virtual const MDRawHeader* header() const { return valid_ ? &header_ : NULL; } - - // Reads the minidump file's header and top-level stream directory. - // The minidump is expected to be positioned at the beginning of the - // header. Read() sets up the stream list and map, and validates the - // Minidump object. - virtual bool Read(); - - // The next set of methods are stubs that call GetStream. They exist to - // force code generation of the templatized API within the module, and - // to avoid exposing an ugly API (GetStream needs to accept a garbage - // parameter). - virtual MinidumpThreadList* GetThreadList(); - MinidumpModuleList* GetModuleList(); - MinidumpMemoryList* GetMemoryList(); - MinidumpException* GetException(); - MinidumpAssertion* GetAssertion(); - MinidumpSystemInfo* GetSystemInfo(); - MinidumpMiscInfo* GetMiscInfo(); - MinidumpBreakpadInfo* GetBreakpadInfo(); - MinidumpMemoryInfoList* GetMemoryInfoList(); - - // The next set of methods are provided for users who wish to access - // data in minidump files directly, while leveraging the rest of - // this class and related classes to handle the basic minidump - // structure and known stream types. - - unsigned int GetDirectoryEntryCount() const { - return valid_ ? header_.stream_count : 0; - } - const MDRawDirectory* GetDirectoryEntryAtIndex(unsigned int index) const; - - // The next 2 methods are lower-level I/O routines. They use fd_. - - // Reads count bytes from the minidump at the current position into - // the storage area pointed to by bytes. bytes must be of sufficient - // size. After the read, the file position is advanced by count. - bool ReadBytes(void* bytes, size_t count); - - // Sets the position of the minidump file to offset. - bool SeekSet(off_t offset); - - // Returns the current position of the minidump file. - off_t Tell(); - - // The next 2 methods are medium-level I/O routines. - - // ReadString returns a string which is owned by the caller! offset - // specifies the offset that a length-encoded string is stored at in the - // minidump file. - string* ReadString(off_t offset); - - // SeekToStreamType positions the file at the beginning of a stream - // identified by stream_type, and informs the caller of the stream's - // length by setting *stream_length. Because stream_map maps each stream - // type to only one stream in the file, this might mislead the user into - // thinking that the stream that this seeks to is the only stream with - // type stream_type. That can't happen for streams that these classes - // deal with directly, because they're only supposed to be present in the - // file singly, and that's verified when stream_map_ is built. Users who - // are looking for other stream types should be aware of this - // possibility, and consider using GetDirectoryEntryAtIndex (possibly - // with GetDirectoryEntryCount) if expecting multiple streams of the same - // type in a single minidump file. - bool SeekToStreamType(u_int32_t stream_type, u_int32_t* stream_length); - - bool swap() const { return valid_ ? swap_ : false; } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // MinidumpStreamInfo is used in the MinidumpStreamMap. It lets - // the Minidump object locate interesting streams quickly, and - // provides a convenient place to stash MinidumpStream objects. - struct MinidumpStreamInfo { - MinidumpStreamInfo() : stream_index(0), stream(NULL) {} - ~MinidumpStreamInfo() { delete stream; } - - // Index into the MinidumpDirectoryEntries vector - unsigned int stream_index; - - // Pointer to the stream if cached, or NULL if not yet populated - MinidumpStream* stream; - }; - - typedef vector MinidumpDirectoryEntries; - typedef map MinidumpStreamMap; - - template T* GetStream(T** stream); - - // Opens the minidump file, or if already open, seeks to the beginning. - bool Open(); - - // The largest number of top-level streams that will be read from a minidump. - // Note that streams are only read (and only consume memory) as needed, - // when directed by the caller. The default is 128. - static u_int32_t max_streams_; - - // The maximum length of a UTF-16 string that will be read from a minidump - // in 16-bit words. The default is 1024. UTF-16 strings are converted - // to UTF-8 when stored in memory, and each UTF-16 word will be represented - // by as many as 3 bytes in UTF-8. - static unsigned int max_string_length_; - - MDRawHeader header_; - - // The list of streams. - MinidumpDirectoryEntries* directory_; - - // Access to streams using the stream type as the key. - MinidumpStreamMap* stream_map_; - - // The pathname of the minidump file to process, set in the constructor. - // This may be empty if the minidump was opened directly from a stream. - const string path_; - - // The stream for all file I/O. Used by ReadBytes and SeekSet. - // Set based on the path in Open, or directly in the constructor. - std::istream* stream_; - - // swap_ is true if the minidump file should be byte-swapped. If the - // minidump was produced by a CPU that is other-endian than the CPU - // processing the minidump, this will be true. If the two CPUs are - // same-endian, this will be false. - bool swap_; - - // Validity of the Minidump structure, false immediately after - // construction or after a failed Read(); true following a successful - // Read(). - bool valid_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump_processor.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump_processor.h deleted file mode 100644 index 384c60c1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/minidump_processor.h +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class Minidump; -class ProcessState; -class SourceLineResolverInterface; -class SymbolSupplier; -class SystemInfo; -// Return type for Process() -enum ProcessResult { - PROCESS_OK, // The minidump was - // processed - // successfully. - - PROCESS_ERROR_MINIDUMP_NOT_FOUND, // The minidump file - // was not found. - - PROCESS_ERROR_NO_MINIDUMP_HEADER, // The minidump file - // had no header - - PROCESS_ERROR_NO_THREAD_LIST, // The minidump file - // had no thread list. - - PROCESS_ERROR_GETTING_THREAD, // There was an error - // getting one - // thread's data from - // the minidump. - - PROCESS_ERROR_GETTING_THREAD_ID, // There was an error - // getting a thread id - // from the thread's - // data. - - PROCESS_ERROR_DUPLICATE_REQUESTING_THREADS, // There was more than - // one requesting - // thread. - - PROCESS_ERROR_NO_MEMORY_FOR_THREAD, // A thread had no - // memory region. - - PROCESS_ERROR_NO_STACKWALKER_FOR_THREAD, // We couldn't - // determine the - // StackWalker to walk - // the minidump's - // threads. - - PROCESS_SYMBOL_SUPPLIER_INTERRUPTED // The minidump - // processing was - // interrupted by the - // SymbolSupplier(not - // fatal) -}; - -class MinidumpProcessor { - public: - // Initializes this MinidumpProcessor. supplier should be an - // implementation of the SymbolSupplier abstract base class. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - // Initializes the MinidumpProcessor with the option of - // enabling the exploitability framework to analyze dumps - // for probable security relevance. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, - bool enable_exploitability); - - ~MinidumpProcessor(); - - // Processes the minidump file and fills process_state with the result. - ProcessResult Process(const string &minidump_file, - ProcessState *process_state); - - // Processes the minidump structure and fills process_state with the - // result. - ProcessResult Process(Minidump *minidump, - ProcessState *process_state); - // Populates the cpu_* fields of the |info| parameter with textual - // representations of the CPU type that the minidump in |dump| was - // produced on. Returns false if this information is not available in - // the minidump. - static bool GetCPUInfo(Minidump *dump, SystemInfo *info); - - // Populates the os_* fields of the |info| parameter with textual - // representations of the operating system that the minidump in |dump| - // was produced on. Returns false if this information is not available in - // the minidump. - static bool GetOSInfo(Minidump *dump, SystemInfo *info); - - // Returns a textual representation of the reason that a crash occurred, - // if the minidump in dump was produced as a result of a crash. Returns - // an empty string if this information cannot be determined. If address - // is non-NULL, it will be set to contain the address that caused the - // exception, if this information is available. This will be a code - // address when the crash was caused by problems such as illegal - // instructions or divisions by zero, or a data address when the crash - // was caused by a memory access violation. - static string GetCrashReason(Minidump *dump, u_int64_t *address); - - // This function returns true if the passed-in error code is - // something unrecoverable(i.e. retry should not happen). For - // instance, if the minidump is corrupt, then it makes no sense to - // retry as we won't be able to glean additional information. - // However, as an example of the other case, the symbol supplier can - // return an error code indicating it was 'interrupted', which can - // happen of the symbols are fetched from a remote store, and a - // retry might be successful later on. - // You should not call this method with PROCESS_OK! Test for - // that separately before calling this. - static bool IsErrorUnrecoverable(ProcessResult p) { - assert(p != PROCESS_OK); - return (p != PROCESS_SYMBOL_SUPPLIER_INTERRUPTED); - } - - // Returns a textual representation of an assertion included - // in the minidump. Returns an empty string if this information - // does not exist or cannot be determined. - static string GetAssertion(Minidump *dump); - - private: - SymbolSupplier *supplier_; - SourceLineResolverInterface *resolver_; - - // This flag enables the exploitability scanner which attempts to - // guess how likely it is that the crash represents an exploitable - // memory corruption issue. - bool enable_exploitability_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/network_source_line_resolver.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/network_source_line_resolver.h deleted file mode 100644 index 138b2f56..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/network_source_line_resolver.h +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// NetworkSourceLineResolver implements SourceLineResolverInterface and -// SymbolSupplier using a UDP-based network protocol to communicate to a -// server process which handles the lower-level details of loading symbols -// and resolving source info. When used, it must be used simultaneously -// as the SourceLineResolver and SymbolSupplier. -// -// See network_source_line_server.h for a description of the protocol used. -// An implementation of the server side of the protocol is provided there -// as NetworkSourceLineServer. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_RESOLVER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_RESOLVER_H__ - -#include - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/binarystream.h" -#include "processor/linked_ptr.h" -#include "processor/network_interface.h" - -namespace google_breakpad { - -using std::string; - -class NetworkSourceLineResolver : public SourceLineResolverInterface, - public SymbolSupplier { - public: - // The server and port to connect to, and the - // maximum time (in milliseconds) to wait for network replies. - NetworkSourceLineResolver(const string &server, - unsigned short port, - int wait_milliseconds); - // The network interface to connect to, and maximum wait time. - NetworkSourceLineResolver(NetworkInterface *net, - int wait_milliseconds); - virtual ~NetworkSourceLineResolver(); - - // SourceLineResolverInterface methods, see source_line_resolver_interface.h - // for more details. - - - // These methods are actually NOOPs in this implementation. - // The server loads modules as a result of the GetSymbolFile call. - // Since we're both the symbol supplier and source line resolver, - // this is an optimization. - virtual bool LoadModule(const CodeModule *module, const string &map_file); - virtual bool LoadModuleUsingMapBuffer(const CodeModule *module, - const string &map_buffer); - virtual bool LoadModuleUsingMemoryBuffer(const CodeModule *module, - char *memory_buffer); - - // It doesn't matter whether returns true or false, since no memory buffer - // will be allocated in GetCStringSymbolData(). - virtual bool ShouldDeleteMemoryBufferAfterLoadModule() { return true; } - - void UnloadModule(const CodeModule *module); - - virtual bool HasModule(const CodeModule *module); - - virtual void FillSourceLineInfo(StackFrame *frame); - virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame); - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame); - - // SymbolSupplier methods, see symbol_supplier.h for more details. - // Note that the server will actually load the symbol data - // in response to this request, as an optimization. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - //FIXME: we'll never return symbol_data here, it doesn't make sense. - // the SymbolSupplier interface should just state that the supplier - // *may* fill in symbol_data if it desires, and clients should - // handle it gracefully either way. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - // Similar as the above GetSymbolFile() method, see the comment above. - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data); - - // Delete the data buffer allocated in GetCStringSymbolData(). - // Since the above GetCStringSymbolData() won't allocate any memory at all, - // this method is no-op. - virtual void FreeSymbolData(const CodeModule *module) { } - - private: - int wait_milliseconds_; - // if false, some part of our network setup failed. - bool initialized_; - // sequence number of the last request we made - u_int16_t sequence_; - NetworkInterface *net_; - // cached list of loaded modules, so we can quickly answer - // HasModule requests for modules we've already queried the - // server about, avoiding another network round-trip. - std::set module_cache_; - // cached list of modules for which we don't have symbols, - // so we can short-circuit that as well. - std::set no_symbols_cache_; - - // Cached list of source line info, to avoid repeated GET requests - // for the same frame. In Multithreaded apps that use the same - // framework across threads, it's pretty common to hit the same - // exact set of frames in multiple threads. - // Data is stored in the cache keyed by instruction pointer - typedef std::map SourceCache; - SourceCache source_line_info_cache_; - - // Cached list of WindowsFrameInfo/CFIFrameInfo, for the same reason. - // Stored as serialized strings to avoid shuffling around pointers. - typedef std::map FrameInfoCache; - - typedef enum { - kWindowsFrameInfo = 0, - kCFIFrameInfo = 1, - } FrameInfoType; - FrameInfoCache frame_info_cache_[2]; - - // Send a message to the server, wait a certain amount of time for a reply. - // Returns true if a response is received, with the response data - // in |response|. - // Returns false if the response times out. - bool SendMessageGetResponse(const binarystream &message, - binarystream &response); - - // See if this stack frame is cached, and fill in the source line info - // if so. - bool FindCachedSourceLineInfo(StackFrame *frame) const; - bool FindCachedFrameInfo(const StackFrame *frame, - FrameInfoType type, - string *info) const; - - // Save this stack frame in the cache - void CacheSourceLineInfo(const StackFrame *frame); - void CacheFrameInfo(const StackFrame *frame, - FrameInfoType type, - const string &info); - - // Disallow unwanted copy ctor and assignment operator - NetworkSourceLineResolver(const NetworkSourceLineResolver&); - void operator=(const NetworkSourceLineResolver&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_RESOLVER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/process_state.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/process_state.h deleted file mode 100644 index f3f2ec42..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/process_state.h +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state.h: A snapshot of a process, in a fully-digested state. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/system_info.h" -#include "google_breakpad/processor/minidump.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -class CallStack; -class CodeModules; - -enum ExploitabilityRating { - EXPLOITABILITY_HIGH, // The crash likely represents - // a exploitable memory corruption - // vulnerability. - - EXPLOITABLITY_MEDIUM, // The crash appears to corrupt - // memory in a way which may be - // exploitable in some situations. - - EXPLOITABILITY_LOW, // The crash either does not corrupt - // memory directly or control over - // the effected data is limited. The - // issue may still be exploitable - // on certain platforms or situations. - - EXPLOITABILITY_INTERESTING, // The crash does not appear to be - // directly exploitable. However it - // represents a condition which should - // be furthur analyzed. - - EXPLOITABILITY_NONE, // The crash does not appear to represent - // an exploitable condition. - - EXPLOITABILITY_NOT_ANALYZED, // The crash was not analyzed for - // exploitability because the engine - // was disabled. - - EXPLOITABILITY_ERR_NOENGINE, // The supplied minidump's platform does - // not have a exploitability engine - // associated with it. - - EXPLOITABILITY_ERR_PROCESSING // An error occured within the - // exploitability engine and no rating - // was calculated. -}; - -class ProcessState { - public: - ProcessState() : modules_(NULL) { Clear(); } - ~ProcessState(); - - // Resets the ProcessState to its default values - void Clear(); - - // Accessors. See the data declarations below. - u_int32_t time_date_stamp() const { return time_date_stamp_; } - bool crashed() const { return crashed_; } - string crash_reason() const { return crash_reason_; } - u_int64_t crash_address() const { return crash_address_; } - string assertion() const { return assertion_; } - int requesting_thread() const { return requesting_thread_; } - const vector* threads() const { return &threads_; } - const vector* thread_memory_regions() const { - return &thread_memory_regions_; - } - const SystemInfo* system_info() const { return &system_info_; } - const CodeModules* modules() const { return modules_; } - ExploitabilityRating exploitability() const { return exploitability_; } - - private: - // MinidumpProcessor is responsible for building ProcessState objects. - friend class MinidumpProcessor; - - // The time-date stamp of the minidump (time_t format) - u_int32_t time_date_stamp_; - - // True if the process crashed, false if the dump was produced outside - // of an exception handler. - bool crashed_; - - // If the process crashed, the type of crash. OS- and possibly CPU- - // specific. For example, "EXCEPTION_ACCESS_VIOLATION" (Windows), - // "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" - // (other Unix). - string crash_reason_; - - // If the process crashed, and if crash_reason implicates memory, - // the memory address that caused the crash. For data access errors, - // this will be the data address that caused the fault. For code errors, - // this will be the address of the instruction that caused the fault. - u_int64_t crash_address_; - - // If there was an assertion that was hit, a textual representation - // of that assertion, possibly including the file and line at which - // it occurred. - string assertion_; - - // The index of the thread that requested a dump be written in the - // threads vector. If a dump was produced as a result of a crash, this - // will point to the thread that crashed. If the dump was produced as - // by user code without crashing, and the dump contains extended Breakpad - // information, this will point to the thread that requested the dump. - // If the dump was not produced as a result of an exception and no - // extended Breakpad information is present, this field will be set to -1, - // indicating that the dump thread is not available. - int requesting_thread_; - - // Stacks for each thread (except possibly the exception handler - // thread) at the time of the crash. - vector threads_; - vector thread_memory_regions_; - - // OS and CPU information. - SystemInfo system_info_; - - // The modules that were loaded into the process represented by the - // ProcessState. - const CodeModules *modules_; - - // The exploitability rating as determined by the exploitability - // engine. When the exploitability engine is not enabled this - // defaults to EXPLOITABILITY_NONE. - ExploitabilityRating exploitability_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_base.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_base.h deleted file mode 100644 index efa76e7e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_base.h +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// source_line_resolver_base.h: SourceLineResolverBase, an (incomplete) -// implementation of SourceLineResolverInterface. It serves as a common base -// class for concrete implementations: FastSourceLineResolver and -// BasicSourceLineResolver. It is designed for refactoring that removes -// code redundancy in the two concrete source line resolver classes. -// -// See "google_breakpad/processor/source_line_resolver_interface.h" for more -// documentation. - -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_BASE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_BASE_H__ - -#include -#include - -#include "google_breakpad/processor/source_line_resolver_interface.h" - -namespace google_breakpad { - -using std::map; - -// Forward declaration. -// ModuleFactory is a simple factory interface for creating a Module instance -// at run-time. -class ModuleFactory; - -class SourceLineResolverBase : public SourceLineResolverInterface { - public: - // Read the symbol_data from a file with given file_name. - // The part of code was originally in BasicSourceLineResolver::Module's - // LoadMap() method. - // Place dynamically allocated heap buffer in symbol_data. Caller has the - // ownership of the buffer, and should call delete [] to free the buffer. - static bool ReadSymbolFile(char **symbol_data, const string &file_name); - - protected: - // Users are not allowed create SourceLineResolverBase instance directly. - SourceLineResolverBase(ModuleFactory *module_factory); - virtual ~SourceLineResolverBase(); - - // Virtual methods inherited from SourceLineResolverInterface. - virtual bool LoadModule(const CodeModule *module, const string &map_file); - virtual bool LoadModuleUsingMapBuffer(const CodeModule *module, - const string &map_buffer); - virtual bool LoadModuleUsingMemoryBuffer(const CodeModule *module, - char *memory_buffer); - virtual bool ShouldDeleteMemoryBufferAfterLoadModule(); - virtual void UnloadModule(const CodeModule *module); - virtual bool HasModule(const CodeModule *module); - virtual void FillSourceLineInfo(StackFrame *frame); - virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame); - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame); - - // Nested structs and classes. - struct Line; - struct Function; - struct PublicSymbol; - struct CompareString { - bool operator()(const string &s1, const string &s2) const; - }; - // Module is an interface for an in-memory symbol file. - class Module; - class AutoFileCloser; - - // All of the modules that are loaded. - typedef map ModuleMap; - ModuleMap *modules_; - - // All of heap-allocated buffers that are owned locally by resolver. - typedef std::map MemoryMap; - MemoryMap *memory_buffers_; - - // Creates a concrete module at run-time. - ModuleFactory *module_factory_; - - private: - // ModuleFactory needs to have access to protected type Module. - friend class ModuleFactory; - - // Disallow unwanted copy ctor and assignment operator - SourceLineResolverBase(const SourceLineResolverBase&); - void operator=(const SourceLineResolverBase&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_BASE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_interface.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_interface.h deleted file mode 100644 index 103f979e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/source_line_resolver_interface.h +++ /dev/null @@ -1,111 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Abstract interface to return function/file/line info for a memory address. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/code_module.h" - -namespace google_breakpad { - -using std::string; - -struct StackFrame; -struct WindowsFrameInfo; -struct CFIFrameInfo; - -class SourceLineResolverInterface { - public: - typedef u_int64_t MemAddr; - - virtual ~SourceLineResolverInterface() {} - - // Adds a module to this resolver, returning true on success. - // - // module should have at least the code_file, debug_file, - // and debug_identifier members populated. - // - // map_file should contain line/address mappings for this module. - virtual bool LoadModule(const CodeModule *module, - const string &map_file) = 0; - // Same as above, but takes the contents of a pre-read map buffer - virtual bool LoadModuleUsingMapBuffer(const CodeModule *module, - const string &map_buffer) = 0; - - // Add an interface to load symbol using C-String data insteading string. - // This is useful in the optimization design for avoiding unnecessary copying - // of symbol data, in order to improve memory efficiency. - // LoadModuleUsingMemoryBuffer() does NOT take ownership of memory_buffer. - virtual bool LoadModuleUsingMemoryBuffer(const CodeModule *module, - char *memory_buffer) = 0; - - // Return true if the memory buffer should be deleted immediately after - // LoadModuleUsingMemoryBuffer(). Return false if the memory buffer has to be - // alive during the lifetime of the corresponding Module. - virtual bool ShouldDeleteMemoryBufferAfterLoadModule() = 0; - - // Request that the specified module be unloaded from this resolver. - // A resolver may choose to ignore such a request. - virtual void UnloadModule(const CodeModule *module) = 0; - - // Returns true if the module has been loaded. - virtual bool HasModule(const CodeModule *module) = 0; - - // Fills in the function_base, function_name, source_file_name, - // and source_line fields of the StackFrame. The instruction and - // module_name fields must already be filled in. - virtual void FillSourceLineInfo(StackFrame *frame) = 0; - - // If Windows stack walking information is available covering - // FRAME's instruction address, return a WindowsFrameInfo structure - // describing it. If the information is not available, returns NULL. - // A NULL return value does not indicate an error. The caller takes - // ownership of any returned WindowsFrameInfo object. - virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame) = 0; - - // If CFI stack walking information is available covering ADDRESS, - // return a CFIFrameInfo structure describing it. If the information - // is not available, return NULL. The caller takes ownership of any - // returned CFIFrameInfo object. - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame) = 0; - - protected: - // SourceLineResolverInterface cannot be instantiated except by subclasses - SourceLineResolverInterface() {} -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame.h deleted file mode 100644 index c4449938..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -using std::string; - -struct StackFrame { - // Indicates how well the instruction pointer derived during - // stack walking is trusted. Since the stack walker can resort to - // stack scanning, it can wind up with dubious frames. - // In rough order of "trust metric". - enum FrameTrust { - FRAME_TRUST_NONE, // Unknown - FRAME_TRUST_SCAN, // Scanned the stack, found this - FRAME_TRUST_CFI_SCAN, // Scanned the stack using call frame info, found this - FRAME_TRUST_FP, // Derived from frame pointer - FRAME_TRUST_CFI, // Derived from call frame info - FRAME_TRUST_CONTEXT // Given as instruction pointer in a context - }; - - StackFrame() - : instruction(), - module(NULL), - function_name(), - function_base(), - source_file_name(), - source_line(), - source_line_base(), - trust(FRAME_TRUST_NONE) {} - virtual ~StackFrame() {} - - // Return a string describing how this stack frame was found - // by the stackwalker. - string trust_description() const { - switch (trust) { - case StackFrame::FRAME_TRUST_CONTEXT: - return "given as instruction pointer in context"; - case StackFrame::FRAME_TRUST_CFI: - return "call frame info"; - case StackFrame::FRAME_TRUST_CFI_SCAN: - return "call frame info with scanning"; - case StackFrame::FRAME_TRUST_FP: - return "previous frame's frame pointer"; - case StackFrame::FRAME_TRUST_SCAN: - return "stack scanning"; - default: - return "unknown"; - } - }; - - // The program counter location as an absolute virtual address. For the - // innermost called frame in a stack, this will be an exact program counter - // or instruction pointer value. For all other frames, this will be within - // the instruction that caused execution to branch to a called function, - // but may not necessarily point to the exact beginning of that instruction. - u_int64_t instruction; - - // The module in which the instruction resides. - const CodeModule *module; - - // The function name, may be omitted if debug symbols are not available. - string function_name; - - // The start address of the function, may be omitted if debug symbols - // are not available. - u_int64_t function_base; - - // The source file name, may be omitted if debug symbols are not available. - string source_file_name; - - // The (1-based) source line number, may be omitted if debug symbols are - // not available. - int source_line; - - // The start address of the source line, may be omitted if debug symbols - // are not available. - u_int64_t source_line_base; - - // Amount of trust the stack walker has in the instruction pointer - // of this frame. - FrameTrust trust; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame_cpu.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame_cpu.h deleted file mode 100644 index 805b6bc3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stack_frame_cpu.h +++ /dev/null @@ -1,243 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stack_frame_cpu.h: CPU-specific StackFrame extensions. -// -// These types extend the StackFrame structure to carry CPU-specific register -// state. They are defined in this header instead of stack_frame.h to -// avoid the need to include minidump_format.h when only the generic -// StackFrame type is needed. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stack_frame.h" - -namespace google_breakpad { - -struct WindowsFrameInfo; -struct CFIFrameInfo; - -struct StackFrameX86 : public StackFrame { - // ContextValidity has one entry for each relevant hardware pointer - // register (%eip and %esp) and one entry for each general-purpose - // register. It's worthwhile having validity flags for caller-saves - // registers: they are valid in the youngest frame, and such a frame - // might save a callee-saves register in a caller-saves register, but - // SimpleCFIWalker won't touch registers unless they're marked as valid. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_EIP = 1 << 0, - CONTEXT_VALID_ESP = 1 << 1, - CONTEXT_VALID_EBP = 1 << 2, - CONTEXT_VALID_EAX = 1 << 3, - CONTEXT_VALID_EBX = 1 << 4, - CONTEXT_VALID_ECX = 1 << 5, - CONTEXT_VALID_EDX = 1 << 6, - CONTEXT_VALID_ESI = 1 << 7, - CONTEXT_VALID_EDI = 1 << 8, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameX86() - : context(), - context_validity(CONTEXT_VALID_NONE), - windows_frame_info(NULL), - cfi_frame_info(NULL) {} - ~StackFrameX86(); - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextX86 context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; - - // Any stack walking information we found describing this.instruction. - // These may be NULL if there is no such information for that address. - WindowsFrameInfo *windows_frame_info; - CFIFrameInfo *cfi_frame_info; -}; - -struct StackFramePPC : public StackFrame { - // ContextValidity should eventually contain entries for the validity of - // other nonvolatile (callee-save) registers as in - // StackFrameX86::ContextValidity, but the ppc stackwalker doesn't currently - // locate registers other than the ones listed here. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_SRR0 = 1 << 0, - CONTEXT_VALID_GPR1 = 1 << 1, - CONTEXT_VALID_ALL = -1 - }; - - StackFramePPC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextPPC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameAMD64 : public StackFrame { - // ContextValidity has one entry for each register that we might be able - // to recover. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_RAX = 1 << 0, - CONTEXT_VALID_RDX = 1 << 1, - CONTEXT_VALID_RCX = 1 << 2, - CONTEXT_VALID_RBX = 1 << 3, - CONTEXT_VALID_RSI = 1 << 4, - CONTEXT_VALID_RDI = 1 << 5, - CONTEXT_VALID_RBP = 1 << 6, - CONTEXT_VALID_RSP = 1 << 7, - CONTEXT_VALID_R8 = 1 << 8, - CONTEXT_VALID_R9 = 1 << 9, - CONTEXT_VALID_R10 = 1 << 10, - CONTEXT_VALID_R11 = 1 << 11, - CONTEXT_VALID_R12 = 1 << 12, - CONTEXT_VALID_R13 = 1 << 13, - CONTEXT_VALID_R14 = 1 << 14, - CONTEXT_VALID_R15 = 1 << 15, - CONTEXT_VALID_RIP = 1 << 16, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, which registers are present depends on what - // debugging information we had available. Refer to context_validity. - MDRawContextAMD64 context; - - // For each register in context whose value has been recovered, we set - // the corresponding CONTEXT_VALID_ bit in context_validity. - // - // context_validity's type should actually be ContextValidity, but - // we use int instead because the bitwise inclusive or operator - // yields an int when applied to enum values, and C++ doesn't - // silently convert from ints to enums. - int context_validity; -}; - -struct StackFrameSPARC : public StackFrame { - // to be confirmed - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_PC = 1 << 0, - CONTEXT_VALID_SP = 1 << 1, - CONTEXT_VALID_FP = 1 << 2, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameSPARC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextSPARC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameARM : public StackFrame { - // A flag for each register we might know. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_R0 = 1 << 0, - CONTEXT_VALID_R1 = 1 << 1, - CONTEXT_VALID_R2 = 1 << 2, - CONTEXT_VALID_R3 = 1 << 3, - CONTEXT_VALID_R4 = 1 << 4, - CONTEXT_VALID_R5 = 1 << 5, - CONTEXT_VALID_R6 = 1 << 6, - CONTEXT_VALID_R7 = 1 << 7, - CONTEXT_VALID_R8 = 1 << 8, - CONTEXT_VALID_R9 = 1 << 9, - CONTEXT_VALID_R10 = 1 << 10, - CONTEXT_VALID_R11 = 1 << 11, - CONTEXT_VALID_R12 = 1 << 12, - CONTEXT_VALID_R13 = 1 << 13, - CONTEXT_VALID_R14 = 1 << 14, - CONTEXT_VALID_R15 = 1 << 15, - CONTEXT_VALID_ALL = ~CONTEXT_VALID_NONE, - - // Aliases for registers with dedicated or conventional roles. - CONTEXT_VALID_FP = CONTEXT_VALID_R11, - CONTEXT_VALID_SP = CONTEXT_VALID_R13, - CONTEXT_VALID_LR = CONTEXT_VALID_R14, - CONTEXT_VALID_PC = CONTEXT_VALID_R15 - }; - - StackFrameARM() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Return the ContextValidity flag for register rN. - static ContextValidity RegisterValidFlag(int n) { - return ContextValidity(1 << n); - } - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextARM context; - - // For each register in context whose value has been recovered, we set - // the corresponding CONTEXT_VALID_ bit in context_validity. - // - // context_validity's type should actually be ContextValidity, but - // we use int instead because the bitwise inclusive or operator - // yields an int when applied to enum values, and C++ doesn't - // silently convert from ints to enums. - int context_validity; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stackwalker.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stackwalker.h deleted file mode 100644 index 6822f16a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/stackwalker.h +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker.h: Generic stackwalker. -// -// The Stackwalker class is an abstract base class providing common generic -// methods that apply to stacks from all systems. Specific implementations -// will extend this class by providing GetContextFrame and GetCallerFrame -// methods to fill in system-specific data in a StackFrame structure. -// Stackwalker assembles these StackFrame strucutres into a CallStack. -// -// Author: Mark Mentovai - - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" - -namespace google_breakpad { - -class CallStack; -class MinidumpContext; -class SourceLineResolverInterface; -struct StackFrame; -class SymbolSupplier; -class SystemInfo; - -using std::set; - - -class Stackwalker { - public: - virtual ~Stackwalker() {} - - // Populates the given CallStack by calling GetContextFrame and - // GetCallerFrame. The frames are further processed to fill all available - // data. Returns true if the stackwalk completed, or false if it was - // interrupted by SymbolSupplier::GetSymbolFile(). - bool Walk(CallStack *stack); - - // Returns a new concrete subclass suitable for the CPU that a stack was - // generated on, according to the CPU type indicated by the context - // argument. If no suitable concrete subclass exists, returns NULL. - static Stackwalker* StackwalkerForCPU(const SystemInfo *system_info, - MinidumpContext *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - static void set_max_frames(u_int32_t max_frames) { max_frames_ = max_frames; } - static u_int32_t max_frames() { return max_frames_; } - - protected: - // system_info identifies the operating system, NULL or empty if unknown. - // memory identifies a MemoryRegion that provides the stack memory - // for the stack to walk. modules, if non-NULL, is a CodeModules - // object that is used to look up which code module each stack frame is - // associated with. supplier is an optional caller-supplied SymbolSupplier - // implementation. If supplier is NULL, source line info will not be - // resolved. resolver is an instance of SourceLineResolverInterface - // (see source_line_resolver_interface.h and basic_source_line_resolver.h). - // If resolver is NULL, source line info will not be resolved. - Stackwalker(const SystemInfo *system_info, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - // This can be used to filter out potential return addresses when - // the stack walker resorts to stack scanning. - // Returns true if any of: - // * This address is within a loaded module, but we don't have symbols - // for that module. - // * This address is within a loaded module for which we have symbols, - // and falls inside a function in that module. - // Returns false otherwise. - bool InstructionAddressSeemsValid(u_int64_t address); - - // Scan the stack starting at location_start, looking for an address - // that looks like a valid instruction pointer. Addresses must - // 1) be contained in the current stack memory - // 2) pass the checks in InstructionAddressSeemsValid - // - // Returns true if a valid-looking instruction pointer was found. - // When returning true, sets location_found to the address at which - // the value was found, and ip_found to the value contained at that - // location in memory. - template - bool ScanForReturnAddress(InstructionType location_start, - InstructionType *location_found, - InstructionType *ip_found) { - const int kRASearchWords = 30; - for (InstructionType location = location_start; - location <= location_start + kRASearchWords * sizeof(InstructionType); - location += sizeof(InstructionType)) { - InstructionType ip; - if (!memory_->GetMemoryAtAddress(location, &ip)) - break; - - if (modules_ && modules_->GetModuleForAddress(ip) && - InstructionAddressSeemsValid(ip)) { - - *ip_found = ip; - *location_found = location; - return true; - } - } - // nothing found - return false; - } - - // Information about the system that produced the minidump. Subclasses - // and the SymbolSupplier may find this information useful. - const SystemInfo *system_info_; - - // The stack memory to walk. Subclasses will require this region to - // get information from the stack. - MemoryRegion *memory_; - - // A list of modules, for populating each StackFrame's module information. - // This field is optional and may be NULL. - const CodeModules *modules_; - - protected: - // The SourceLineResolver implementation. - SourceLineResolverInterface *resolver_; - - private: - // Obtains the context frame, the innermost called procedure in a stack - // trace. Returns NULL on failure. GetContextFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetContextFrame() = 0; - - // Obtains a caller frame. Each call to GetCallerFrame should return the - // frame that called the last frame returned by GetContextFrame or - // GetCallerFrame. To aid this purpose, stack contains the CallStack - // made of frames that have already been walked. GetCallerFrame should - // return NULL on failure or when there are no more caller frames (when - // the end of the stack has been reached). GetCallerFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetCallerFrame(const CallStack *stack) = 0; - - // The optional SymbolSupplier for resolving source line info. - SymbolSupplier *supplier_; - - // A list of modules that we haven't found symbols for. We track - // this in order to avoid repeatedly looking them up again within - // one minidump. - set no_symbol_modules_; - - // The maximum number of frames Stackwalker will walk through. - // This defaults to 1024 to prevent infinite loops. - static u_int32_t max_frames_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/symbol_supplier.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/symbol_supplier.h deleted file mode 100644 index 26f5d7fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/symbol_supplier.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The caller may implement the SymbolSupplier abstract base class -// to provide symbols for a given module. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ - -#include - -namespace google_breakpad { - -using std::string; -class CodeModule; -class SystemInfo; - -class SymbolSupplier { - public: - // Result type for GetSymbolFile - enum SymbolResult { - // no symbols were found, but continue processing - NOT_FOUND, - - // symbols were found, and the path has been placed in symbol_file - FOUND, - - // stops processing the minidump immediately - INTERRUPT - }; - - virtual ~SymbolSupplier() {} - - // Retrieves the symbol file for the given CodeModule, placing the - // path in symbol_file if successful. system_info contains strings - // identifying the operating system and CPU; SymbolSupplier may use - // to help locate the symbol file. system_info may be NULL or its - // fields may be empty if these values are unknown. symbol_file - // must be a pointer to a valid string - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) = 0; - // Same as above, except also places symbol data into symbol_data. - // If symbol_data is NULL, the data is not returned. - // TODO(nealsid) Once we have symbol data caching behavior implemented - // investigate making all symbol suppliers implement all methods, - // and make this pure virtual - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) = 0; - - // Same as above, except allocates data buffer on heap and then places the - // symbol data into the buffer as C-string. - // SymbolSupplier is responsible for deleting the data buffer. After the call - // to GetCStringSymbolData(), the caller should call FreeSymbolData(const - // Module *module) once the data buffer is no longer needed. - // If symbol_data is not NULL, symbol supplier won't return FOUND unless it - // returns a valid buffer in symbol_data, e.g., returns INTERRUPT on memory - // allocation failure. - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) = 0; - - // Frees the data buffer allocated for the module in GetCStringSymbolData. - virtual void FreeSymbolData(const CodeModule *module) = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/system_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/system_info.h deleted file mode 100644 index fdbdbfd6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/google_breakpad/processor/system_info.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// system_info.h: Information about the system that was running a program -// when a crash report was produced. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ - -#include - -namespace google_breakpad { - -using std::string; - -struct SystemInfo { - public: - SystemInfo() : os(), os_short(), os_version(), cpu(), cpu_info(), - cpu_count(0) {} - - // Resets the SystemInfo object to its default values. - void Clear() { - os.clear(); - os_short.clear(); - os_version.clear(); - cpu.clear(); - cpu_info.clear(); - cpu_count = 0; - } - - // A string identifying the operating system, such as "Windows NT", - // "Mac OS X", or "Linux". If the information is present in the dump but - // its value is unknown, this field will contain a numeric value. If - // the information is not present in the dump, this field will be empty. - string os; - - // A short form of the os string, using lowercase letters and no spaces, - // suitable for use in a filesystem. Possible values are "windows", - // "mac", and "linux". Empty if the information is not present in the dump - // or if the OS given by the dump is unknown. The values stored in this - // field should match those used by MinidumpSystemInfo::GetOS. - string os_short; - - // A string identifying the version of the operating system, such as - // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not - // contain this information, this field will be empty. - string os_version; - - // A string identifying the basic CPU family, such as "x86" or "ppc". - // If this information is present in the dump but its value is unknown, - // this field will contain a numeric value. If the information is not - // present in the dump, this field will be empty. The values stored in - // this field should match those used by MinidumpSystemInfo::GetCPU. - string cpu; - - // A string further identifying the specific CPU, such as - // "GenuineIntel level 6 model 13 stepping 8". If the information is not - // present in the dump, or additional identifying information is not - // defined for the CPU family, this field will be empty. - string cpu_info; - - // The number of processors in the system. Will be greater than one for - // multi-core systems. - int cpu_count; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map-inl.h deleted file mode 100644 index 251c4478..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map-inl.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map-inl.h: Address map implementation. -// -// See address_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_INL_H__ -#define PROCESSOR_ADDRESS_MAP_INL_H__ - -#include "processor/address_map.h" - -#include - -#include "processor/logging.h" - -namespace google_breakpad { - -template -bool AddressMap::Store(const AddressType &address, - const EntryType &entry) { - // Ensure that the specified address doesn't conflict with something already - // in the map. - if (map_.find(address) != map_.end()) { - BPLOG(INFO) << "Store failed, address " << HexString(address) << - " is already present"; - return false; - } - - map_.insert(MapValue(address, entry)); - return true; -} - -template -bool AddressMap::Retrieve( - const AddressType &address, - EntryType *entry, AddressType *entry_address) const { - BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|"; - assert(entry); - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second; - if (entry_address) - *entry_address = iterator->first; - - return true; -} - -template -void AddressMap::Clear() { - map_.clear(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map.h deleted file mode 100644 index 2972cbb9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map.h: Address maps. -// -// An address map contains a set of objects keyed by address. Objects are -// retrieved from the map by returning the object with the highest key less -// than or equal to the lookup key. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_H__ -#define PROCESSOR_ADDRESS_MAP_H__ - -#include - -namespace google_breakpad { - -// Forward declarations (for later friend declarations). -template class AddressMapSerializer; - -template -class AddressMap { - public: - AddressMap() : map_() {} - - // Inserts an entry into the map. Returns false without storing the entry - // if an entry is already stored in the map at the same address as specified - // by the address argument. - bool Store(const AddressType &address, const EntryType &entry); - - // Locates the entry stored at the highest address less than or equal to - // the address argument. If there is no such range, returns false. The - // entry is returned in entry, which is a required argument. If - // entry_address is not NULL, it will be set to the address that the entry - // was stored at. - bool Retrieve(const AddressType &address, - EntryType *entry, AddressType *entry_address) const; - - // Empties the address map, restoring it to the same state as when it was - // initially created. - void Clear(); - - private: - friend class AddressMapSerializer; - friend class ModuleComparer; - - // Convenience types. - typedef std::map AddressToEntryMap; - typedef typename AddressToEntryMap::const_iterator MapConstIterator; - typedef typename AddressToEntryMap::value_type MapValue; - - // Maps the address of each entry to an EntryType. - AddressToEntryMap map_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map_unittest.cc deleted file mode 100644 index 9b4095b1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/address_map_unittest.cc +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map_unittest.cc: Unit tests for AddressMap. -// -// Author: Mark Mentovai - -#include -#include - -#include "processor/address_map-inl.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(condition) ASSERT_TRUE(!(condition)) - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -namespace { - -using google_breakpad::AddressMap; -using google_breakpad::linked_ptr; - -// A CountedObject holds an int. A global (not thread safe!) count of -// allocated CountedObjects is maintained to help test memory management. -class CountedObject { - public: - explicit CountedObject(int id) : id_(id) { ++count_; } - ~CountedObject() { --count_; } - - static int count() { return count_; } - int id() const { return id_; } - - private: - static int count_; - int id_; -}; - -int CountedObject::count_; - -typedef int AddressType; -typedef AddressMap< AddressType, linked_ptr > TestMap; - -static bool DoAddressMapTest() { - ASSERT_EQ(CountedObject::count(), 0); - - TestMap test_map; - linked_ptr entry; - AddressType address; - - // Check that a new map is truly empty. - ASSERT_FALSE(test_map.Retrieve(0, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MIN, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MAX, &entry, &address)); - - // Check that Clear clears the map without leaking. - ASSERT_EQ(CountedObject::count(), 0); - ASSERT_TRUE(test_map.Store(1, - linked_ptr(new CountedObject(0)))); - ASSERT_TRUE(test_map.Retrieve(1, &entry, &address)); - ASSERT_EQ(CountedObject::count(), 1); - test_map.Clear(); - ASSERT_EQ(CountedObject::count(), 1); // still holding entry in this scope - - // Check that a cleared map is truly empty. - ASSERT_FALSE(test_map.Retrieve(0, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MIN, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MAX, &entry, &address)); - - // Check a single-element map. - ASSERT_TRUE(test_map.Store(10, - linked_ptr(new CountedObject(1)))); - ASSERT_FALSE(test_map.Retrieve(9, &entry, &address)); - ASSERT_TRUE(test_map.Retrieve(10, &entry, &address)); - ASSERT_EQ(CountedObject::count(), 1); - ASSERT_EQ(entry->id(), 1); - ASSERT_EQ(address, 10); - ASSERT_TRUE(test_map.Retrieve(11, &entry, &address)); - ASSERT_TRUE(test_map.Retrieve(11, &entry, NULL)); // NULL ok here - - // Add some more elements. - ASSERT_TRUE(test_map.Store(5, - linked_ptr(new CountedObject(2)))); - ASSERT_EQ(CountedObject::count(), 2); - ASSERT_TRUE(test_map.Store(20, - linked_ptr(new CountedObject(3)))); - ASSERT_TRUE(test_map.Store(15, - linked_ptr(new CountedObject(4)))); - ASSERT_FALSE(test_map.Store(10, - linked_ptr(new CountedObject(5)))); // already in map - ASSERT_TRUE(test_map.Store(16, - linked_ptr(new CountedObject(6)))); - ASSERT_TRUE(test_map.Store(14, - linked_ptr(new CountedObject(7)))); - - // Nothing was stored with a key under 5. Don't use ASSERT inside loops - // because it won't show exactly which key/entry/address failed. - for (AddressType key = 0; key < 5; ++key) { - if (test_map.Retrieve(key, &entry, &address)) { - fprintf(stderr, - "FAIL: retrieve %d expected false observed true @ %s:%d\n", - key, __FILE__, __LINE__); - return false; - } - } - - // Check everything that was stored. - const int id_verify[] = { 0, 0, 0, 0, 0, // unused - 2, 2, 2, 2, 2, // 5 - 9 - 1, 1, 1, 1, 7, // 10 - 14 - 4, 6, 6, 6, 6, // 15 - 19 - 3, 3, 3, 3, 3, // 20 - 24 - 3, 3, 3, 3, 3 }; // 25 - 29 - const AddressType address_verify[] = { 0, 0, 0, 0, 0, // unused - 5, 5, 5, 5, 5, // 5 - 9 - 10, 10, 10, 10, 14, // 10 - 14 - 15, 16, 16, 16, 16, // 15 - 19 - 20, 20, 20, 20, 20, // 20 - 24 - 20, 20, 20, 20, 20 }; // 25 - 29 - - for (AddressType key = 5; key < 30; ++key) { - if (!test_map.Retrieve(key, &entry, &address)) { - fprintf(stderr, - "FAIL: retrieve %d expected true observed false @ %s:%d\n", - key, __FILE__, __LINE__); - return false; - } - if (entry->id() != id_verify[key]) { - fprintf(stderr, - "FAIL: retrieve %d expected entry %d observed %d @ %s:%d\n", - key, id_verify[key], entry->id(), __FILE__, __LINE__); - return false; - } - if (address != address_verify[key]) { - fprintf(stderr, - "FAIL: retrieve %d expected address %d observed %d @ %s:%d\n", - key, address_verify[key], address, __FILE__, __LINE__); - return false; - } - } - - // The stored objects should still be in the map. - ASSERT_EQ(CountedObject::count(), 6); - - return true; -} - -static bool RunTests() { - if (!DoAddressMapTest()) - return false; - - // Leak check. - ASSERT_EQ(CountedObject::count(), 0); - - return true; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_module.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_module.h deleted file mode 100644 index e3955d29..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_module.h +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_module.h: Carries information about code modules that are loaded -// into a process. -// -// This is a basic concrete implementation of CodeModule. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModule interface. It exists to provide a CodeModule implementation -// a place to store information when the life of the original object (such as -// a MinidumpModule) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULE_H__ -#define PROCESSOR_BASIC_CODE_MODULE_H__ - -#include - -#include "google_breakpad/processor/code_module.h" - -namespace google_breakpad { - -using std::string; - -class BasicCodeModule : public CodeModule { - public: - // Creates a new BasicCodeModule given any existing CodeModule - // implementation. This is useful to make a copy of the data relevant to - // the CodeModule interface without requiring all of the resources that - // other CodeModule implementations may require. - explicit BasicCodeModule(const CodeModule *that) - : base_address_(that->base_address()), - size_(that->size()), - code_file_(that->code_file()), - code_identifier_(that->code_identifier()), - debug_file_(that->debug_file()), - debug_identifier_(that->debug_identifier()), - version_(that->version()) {} - - BasicCodeModule(u_int64_t base_address, u_int64_t size, - const string &code_file, - const string &code_identifier, - const string &debug_file, - const string &debug_identifier, - const string &version) - : base_address_(base_address), - size_(size), - code_file_(code_file), - code_identifier_(code_identifier), - debug_file_(debug_file), - debug_identifier_(debug_identifier), - version_(version) - {} - virtual ~BasicCodeModule() {} - - // See code_module.h for descriptions of these methods and the associated - // members. - virtual u_int64_t base_address() const { return base_address_; } - virtual u_int64_t size() const { return size_; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return code_identifier_; } - virtual string debug_file() const { return debug_file_; } - virtual string debug_identifier() const { return debug_identifier_; } - virtual string version() const { return version_; } - virtual const CodeModule* Copy() const { return new BasicCodeModule(this); } - - private: - u_int64_t base_address_; - u_int64_t size_; - string code_file_; - string code_identifier_; - string debug_file_; - string debug_identifier_; - string version_; - - // Disallow copy constructor and assignment operator. - BasicCodeModule(const BasicCodeModule &that); - void operator=(const BasicCodeModule &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.cc deleted file mode 100644 index 63da8995..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.cc +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_modules.cc: Contains all of the CodeModule objects that -// were loaded into a single process. -// -// See basic_code_modules.h for documentation. -// -// Author: Mark Mentovai - -#include "processor/basic_code_modules.h" - -#include - -#include "google_breakpad/processor/code_module.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/range_map-inl.h" - -namespace google_breakpad { - -BasicCodeModules::BasicCodeModules(const CodeModules *that) - : main_address_(0), - map_(new RangeMap >()) { - BPLOG_IF(ERROR, !that) << "BasicCodeModules::BasicCodeModules requires " - "|that|"; - assert(that); - - const CodeModule *main_module = that->GetMainModule(); - if (main_module) - main_address_ = main_module->base_address(); - - unsigned int count = that->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < count; - ++module_sequence) { - // Make a copy of the module and insert it into the map. Use - // GetModuleAtIndex because ordering is unimportant when slurping the - // entire list, and GetModuleAtIndex may be faster than - // GetModuleAtSequence. - const CodeModule *module = that->GetModuleAtIndex(module_sequence)->Copy(); - if (!map_->StoreRange(module->base_address(), module->size(), - linked_ptr(module))) { - BPLOG(ERROR) << "Module " << module->code_file() << - " could not be stored"; - } - } -} - -BasicCodeModules::~BasicCodeModules() { - delete map_; -} - -unsigned int BasicCodeModules::module_count() const { - return map_->GetCount(); -} - -const CodeModule* BasicCodeModules::GetModuleForAddress( - u_int64_t address) const { - linked_ptr module; - if (!map_->RetrieveRange(address, &module, NULL, NULL)) { - BPLOG(INFO) << "No module at " << HexString(address); - return NULL; - } - - return module.get(); -} - -const CodeModule* BasicCodeModules::GetMainModule() const { - return GetModuleForAddress(main_address_); -} - -const CodeModule* BasicCodeModules::GetModuleAtSequence( - unsigned int sequence) const { - linked_ptr module; - if (!map_->RetrieveRangeAtIndex(sequence, &module, NULL, NULL)) { - BPLOG(ERROR) << "RetrieveRangeAtIndex failed for sequence " << sequence; - return NULL; - } - - return module.get(); -} - -const CodeModule* BasicCodeModules::GetModuleAtIndex( - unsigned int index) const { - // This class stores everything in a RangeMap, without any more-efficient - // way to walk the list of CodeModule objects. Implement GetModuleAtIndex - // using GetModuleAtSequence, which meets all of the requirements, and - // in addition, guarantees ordering. - return GetModuleAtSequence(index); -} - -const CodeModules* BasicCodeModules::Copy() const { - return new BasicCodeModules(this); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.h deleted file mode 100644 index df87fc49..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_code_modules.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_modules.h: Contains all of the CodeModule objects that -// were loaded into a single process. -// -// This is a basic concrete implementation of CodeModules. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModules interface. It exists to provide a CodeModules -// implementation a place to store information when the life of the original -// object (such as a MinidumpModuleList) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULES_H__ -#define PROCESSOR_BASIC_CODE_MODULES_H__ - -#include "google_breakpad/processor/code_modules.h" - -namespace google_breakpad { - -template class linked_ptr; -template class RangeMap; - -class BasicCodeModules : public CodeModules { - public: - // Creates a new BasicCodeModules object given any existing CodeModules - // implementation. This is useful to make a copy of the data relevant to - // the CodeModules and CodeModule interfaces without requiring all of the - // resources that other implementations may require. A copy will be - // made of each contained CodeModule using CodeModule::Copy. - explicit BasicCodeModules(const CodeModules *that); - - virtual ~BasicCodeModules(); - - // See code_modules.h for descriptions of these methods. - virtual unsigned int module_count() const; - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const; - virtual const CodeModule* GetMainModule() const; - virtual const CodeModule* GetModuleAtSequence(unsigned int sequence) const; - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - private: - // The base address of the main module. - u_int64_t main_address_; - - // The map used to contain each CodeModule, keyed by each CodeModule's - // address range. - RangeMap > *map_; - - // Disallow copy constructor and assignment operator. - BasicCodeModules(const BasicCodeModules &that); - void operator=(const BasicCodeModules &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver.cc deleted file mode 100644 index ff57140f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver.cc +++ /dev/null @@ -1,451 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// basic_source_line_resolver.cc: BasicSourceLineResolver implementation. -// -// See basic_source_line_resolver.h and basic_source_line_resolver_types.h -// for documentation. - - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "processor/basic_source_line_resolver_types.h" -#include "processor/module_factory.h" - -#include "processor/tokenize.h" - -using std::map; -using std::vector; -using std::make_pair; - -namespace google_breakpad { - -static const char *kWhitespace = " \r\n"; - -BasicSourceLineResolver::BasicSourceLineResolver() : - SourceLineResolverBase(new BasicModuleFactory) { } - -bool BasicSourceLineResolver::Module::LoadMapFromMemory(char *memory_buffer) { - linked_ptr cur_func; - int line_number = 0; - char *save_ptr; - size_t map_buffer_length = strlen(memory_buffer); - - // If the length is 0, we can still pretend we have a symbol file. This is - // for scenarios that want to test symbol lookup, but don't necessarily care - // if certain modules do not have any information, like system libraries. - if (map_buffer_length == 0) { - return true; - } - - if (memory_buffer[map_buffer_length - 1] == '\n') { - memory_buffer[map_buffer_length - 1] = '\0'; - } - - char *buffer; - buffer = strtok_r(memory_buffer, "\r\n", &save_ptr); - - while (buffer != NULL) { - ++line_number; - - if (strncmp(buffer, "FILE ", 5) == 0) { - if (!ParseFile(buffer)) { - BPLOG(ERROR) << "ParseFile on buffer failed at " << - ":" << line_number; - return false; - } - } else if (strncmp(buffer, "STACK ", 6) == 0) { - if (!ParseStackInfo(buffer)) { - BPLOG(ERROR) << "ParseStackInfo failed at " << - ":" << line_number; - return false; - } - } else if (strncmp(buffer, "FUNC ", 5) == 0) { - cur_func.reset(ParseFunction(buffer)); - if (!cur_func.get()) { - BPLOG(ERROR) << "ParseFunction failed at " << - ":" << line_number; - return false; - } - // StoreRange will fail if the function has an invalid address or size. - // We'll silently ignore this, the function and any corresponding lines - // will be destroyed when cur_func is released. - functions_.StoreRange(cur_func->address, cur_func->size, cur_func); - } else if (strncmp(buffer, "PUBLIC ", 7) == 0) { - // Clear cur_func: public symbols don't contain line number information. - cur_func.reset(); - - if (!ParsePublicSymbol(buffer)) { - BPLOG(ERROR) << "ParsePublicSymbol failed at " << - ":" << line_number; - return false; - } - } else if (strncmp(buffer, "MODULE ", 7) == 0) { - // Ignore these. They're not of any use to BasicSourceLineResolver, - // which is fed modules by a SymbolSupplier. These lines are present to - // aid other tools in properly placing symbol files so that they can - // be accessed by a SymbolSupplier. - // - // MODULE - } else if (strncmp(buffer, "INFO ", 5) == 0) { - // Ignore these as well, they're similarly just for housekeeping. - // - // INFO CODE_ID - } else { - if (!cur_func.get()) { - BPLOG(ERROR) << "Found source line data without a function at " << - ":" << line_number; - return false; - } - Line *line = ParseLine(buffer); - if (!line) { - BPLOG(ERROR) << "ParseLine failed at " << line_number << " for " << - buffer; - return false; - } - cur_func->lines.StoreRange(line->address, line->size, - linked_ptr(line)); - } - buffer = strtok_r(NULL, "\r\n", &save_ptr); - } - return true; -} - -void BasicSourceLineResolver::Module::LookupAddress(StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - - // First, look for a FUNC record that covers address. Use - // RetrieveNearestRange instead of RetrieveRange so that, if there - // is no such function, we can use the next function to bound the - // extent of the PUBLIC symbol we find, below. This does mean we - // need to check that address indeed falls within the function we - // find; do the range comparison in an overflow-friendly way. - linked_ptr func; - linked_ptr public_symbol; - MemAddr function_base; - MemAddr function_size; - MemAddr public_address; - if (functions_.RetrieveNearestRange(address, &func, - &function_base, &function_size) && - address >= function_base && address - function_base < function_size) { - frame->function_name = func->name; - frame->function_base = frame->module->base_address() + function_base; - - linked_ptr line; - MemAddr line_base; - if (func->lines.RetrieveRange(address, &line, &line_base, NULL)) { - FileMap::const_iterator it = files_.find(line->source_file_id); - if (it != files_.end()) { - frame->source_file_name = files_.find(line->source_file_id)->second; - } - frame->source_line = line->line; - frame->source_line_base = frame->module->base_address() + line_base; - } - } else if (public_symbols_.Retrieve(address, - &public_symbol, &public_address) && - (!func.get() || public_address > function_base)) { - frame->function_name = public_symbol->name; - frame->function_base = frame->module->base_address() + public_address; - } -} - -WindowsFrameInfo *BasicSourceLineResolver::Module::FindWindowsFrameInfo( - const StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - scoped_ptr result(new WindowsFrameInfo()); - - // We only know about WindowsFrameInfo::STACK_INFO_FRAME_DATA and - // WindowsFrameInfo::STACK_INFO_FPO. Prefer them in this order. - // WindowsFrameInfo::STACK_INFO_FRAME_DATA is the newer type that - // includes its own program string. - // WindowsFrameInfo::STACK_INFO_FPO is the older type - // corresponding to the FPO_DATA struct. See stackwalker_x86.cc. - linked_ptr frame_info; - if ((windows_frame_info_[WindowsFrameInfo::STACK_INFO_FRAME_DATA] - .RetrieveRange(address, &frame_info)) - || (windows_frame_info_[WindowsFrameInfo::STACK_INFO_FPO] - .RetrieveRange(address, &frame_info))) { - result->CopyFrom(*frame_info.get()); - return result.release(); - } - - // Even without a relevant STACK line, many functions contain - // information about how much space their parameters consume on the - // stack. Use RetrieveNearestRange instead of RetrieveRange, so that - // we can use the function to bound the extent of the PUBLIC symbol, - // below. However, this does mean we need to check that ADDRESS - // falls within the retrieved function's range; do the range - // comparison in an overflow-friendly way. - linked_ptr function; - MemAddr function_base, function_size; - if (functions_.RetrieveNearestRange(address, &function, - &function_base, &function_size) && - address >= function_base && address - function_base < function_size) { - result->parameter_size = function->parameter_size; - result->valid |= WindowsFrameInfo::VALID_PARAMETER_SIZE; - return result.release(); - } - - // PUBLIC symbols might have a parameter size. Use the function we - // found above to limit the range the public symbol covers. - linked_ptr public_symbol; - MemAddr public_address; - if (public_symbols_.Retrieve(address, &public_symbol, &public_address) && - (!function.get() || public_address > function_base)) { - result->parameter_size = public_symbol->parameter_size; - } - - return NULL; -} - -CFIFrameInfo *BasicSourceLineResolver::Module::FindCFIFrameInfo( - const StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - MemAddr initial_base, initial_size; - string initial_rules; - - // Find the initial rule whose range covers this address. That - // provides an initial set of register recovery rules. Then, walk - // forward from the initial rule's starting address to frame's - // instruction address, applying delta rules. - if (!cfi_initial_rules_.RetrieveRange(address, &initial_rules, - &initial_base, &initial_size)) { - return NULL; - } - - // Create a frame info structure, and populate it with the rules from - // the STACK CFI INIT record. - scoped_ptr rules(new CFIFrameInfo()); - if (!ParseCFIRuleSet(initial_rules, rules.get())) - return NULL; - - // Find the first delta rule that falls within the initial rule's range. - map::const_iterator delta = - cfi_delta_rules_.lower_bound(initial_base); - - // Apply delta rules up to and including the frame's address. - while (delta != cfi_delta_rules_.end() && delta->first <= address) { - ParseCFIRuleSet(delta->second, rules.get()); - delta++; - } - - return rules.release(); -} - -bool BasicSourceLineResolver::Module::ParseFile(char *file_line) { - // FILE - file_line += 5; // skip prefix - - vector tokens; - if (!Tokenize(file_line, kWhitespace, 2, &tokens)) { - return false; - } - - int index = atoi(tokens[0]); - if (index < 0) { - return false; - } - - char *filename = tokens[1]; - if (!filename) { - return false; - } - - files_.insert(make_pair(index, string(filename))); - return true; -} - -BasicSourceLineResolver::Function* -BasicSourceLineResolver::Module::ParseFunction(char *function_line) { - // FUNC
- function_line += 5; // skip prefix - - vector tokens; - if (!Tokenize(function_line, kWhitespace, 4, &tokens)) { - return NULL; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - u_int64_t size = strtoull(tokens[1], NULL, 16); - int stack_param_size = strtoull(tokens[2], NULL, 16); - char *name = tokens[3]; - - return new Function(name, address, size, stack_param_size); -} - -BasicSourceLineResolver::Line* BasicSourceLineResolver::Module::ParseLine( - char *line_line) { - //
- vector tokens; - if (!Tokenize(line_line, kWhitespace, 4, &tokens)) { - return NULL; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - u_int64_t size = strtoull(tokens[1], NULL, 16); - int line_number = atoi(tokens[2]); - int source_file = atoi(tokens[3]); - if (line_number <= 0) { - return NULL; - } - - return new Line(address, size, source_file, line_number); -} - -bool BasicSourceLineResolver::Module::ParsePublicSymbol(char *public_line) { - // PUBLIC
- - // Skip "PUBLIC " prefix. - public_line += 7; - - vector tokens; - if (!Tokenize(public_line, kWhitespace, 3, &tokens)) { - return false; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - int stack_param_size = strtoull(tokens[1], NULL, 16); - char *name = tokens[2]; - - // A few public symbols show up with an address of 0. This has been seen - // in the dumped output of ntdll.pdb for symbols such as _CIlog, _CIpow, - // RtlDescribeChunkLZNT1, and RtlReserveChunkLZNT1. They would conflict - // with one another if they were allowed into the public_symbols_ map, - // but since the address is obviously invalid, gracefully accept them - // as input without putting them into the map. - if (address == 0) { - return true; - } - - linked_ptr symbol(new PublicSymbol(name, address, - stack_param_size)); - return public_symbols_.Store(address, symbol); -} - -bool BasicSourceLineResolver::Module::ParseStackInfo(char *stack_info_line) { - // Skip "STACK " prefix. - stack_info_line += 6; - - // Find the token indicating what sort of stack frame walking - // information this is. - while (*stack_info_line == ' ') - stack_info_line++; - const char *platform = stack_info_line; - while (!strchr(kWhitespace, *stack_info_line)) - stack_info_line++; - *stack_info_line++ = '\0'; - - // MSVC stack frame info. - if (strcmp(platform, "WIN") == 0) { - int type = 0; - u_int64_t rva, code_size; - linked_ptr - stack_frame_info(WindowsFrameInfo::ParseFromString(stack_info_line, - type, - rva, - code_size)); - if (stack_frame_info == NULL) - return false; - - // TODO(mmentovai): I wanted to use StoreRange's return value as this - // method's return value, but MSVC infrequently outputs stack info that - // violates the containment rules. This happens with a section of code - // in strncpy_s in test_app.cc (testdata/minidump2). There, problem looks - // like this: - // STACK WIN 4 4242 1a a 0 ... (STACK WIN 4 base size prolog 0 ...) - // STACK WIN 4 4243 2e 9 0 ... - // ContainedRangeMap treats these two blocks as conflicting. In reality, - // when the prolog lengths are taken into account, the actual code of - // these blocks doesn't conflict. However, we can't take the prolog lengths - // into account directly here because we'd wind up with a different set - // of range conflicts when MSVC outputs stack info like this: - // STACK WIN 4 1040 73 33 0 ... - // STACK WIN 4 105a 59 19 0 ... - // because in both of these entries, the beginning of the code after the - // prolog is at 0x1073, and the last byte of contained code is at 0x10b2. - // Perhaps we could get away with storing ranges by rva + prolog_size - // if ContainedRangeMap were modified to allow replacement of - // already-stored values. - - windows_frame_info_[type].StoreRange(rva, code_size, stack_frame_info); - return true; - } else if (strcmp(platform, "CFI") == 0) { - // DWARF CFI stack frame info - return ParseCFIFrameInfo(stack_info_line); - } else { - // Something unrecognized. - return false; - } -} - -bool BasicSourceLineResolver::Module::ParseCFIFrameInfo( - char *stack_info_line) { - char *cursor; - - // Is this an INIT record or a delta record? - char *init_or_address = strtok_r(stack_info_line, " \r\n", &cursor); - if (!init_or_address) - return false; - - if (strcmp(init_or_address, "INIT") == 0) { - // This record has the form "STACK INIT
". - char *address_field = strtok_r(NULL, " \r\n", &cursor); - if (!address_field) return false; - - char *size_field = strtok_r(NULL, " \r\n", &cursor); - if (!size_field) return false; - - char *initial_rules = strtok_r(NULL, "\r\n", &cursor); - if (!initial_rules) return false; - - MemAddr address = strtoul(address_field, NULL, 16); - MemAddr size = strtoul(size_field, NULL, 16); - cfi_initial_rules_.StoreRange(address, size, initial_rules); - return true; - } - - // This record has the form "STACK
". - char *address_field = init_or_address; - char *delta_rules = strtok_r(NULL, "\r\n", &cursor); - if (!delta_rules) return false; - MemAddr address = strtoul(address_field, NULL, 16); - cfi_delta_rules_[address] = delta_rules; - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_types.h deleted file mode 100644 index 87b93db9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_types.h +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// basic_source_line_types.h: definition of nested classes/structs in -// BasicSourceLineResolver. It moves the definitions out of -// basic_source_line_resolver.cc, so that other classes could have access -// to these private nested types without including basic_source_line_resolver.cc -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_TYPES_H__ -#define PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_TYPES_H__ - -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "processor/source_line_resolver_base_types.h" - -#include "processor/address_map-inl.h" -#include "processor/range_map-inl.h" -#include "processor/contained_range_map-inl.h" - -#include "processor/linked_ptr.h" -#include "processor/scoped_ptr.h" -#include "google_breakpad/processor/stack_frame.h" -#include "processor/cfi_frame_info.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -struct -BasicSourceLineResolver::Function : public SourceLineResolverBase::Function { - Function(const string &function_name, - MemAddr function_address, - MemAddr code_size, - int set_parameter_size) : Base(function_name, - function_address, - code_size, - set_parameter_size), - lines() { } - RangeMap< MemAddr, linked_ptr > lines; - private: - typedef SourceLineResolverBase::Function Base; -}; - - -class BasicSourceLineResolver::Module : public SourceLineResolverBase::Module { - public: - explicit Module(const string &name) : name_(name) { } - virtual ~Module() { } - - // Loads a map from the given buffer in char* type. - // Does NOT have ownership of memory_buffer. - virtual bool LoadMapFromMemory(char *memory_buffer); - - // Looks up the given relative address, and fills the StackFrame struct - // with the result. - virtual void LookupAddress(StackFrame *frame) const; - - // If Windows stack walking information is available covering ADDRESS, - // return a WindowsFrameInfo structure describing it. If the information - // is not available, returns NULL. A NULL return value does not indicate - // an error. The caller takes ownership of any returned WindowsFrameInfo - // object. - virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame) const; - - // If CFI stack walking information is available covering ADDRESS, - // return a CFIFrameInfo structure describing it. If the information - // is not available, return NULL. The caller takes ownership of any - // returned CFIFrameInfo object. - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame) const; - - private: - // Friend declarations. - friend class BasicSourceLineResolver; - friend class ModuleComparer; - friend class ModuleSerializer; - - typedef std::map FileMap; - - // Parses a file declaration - bool ParseFile(char *file_line); - - // Parses a function declaration, returning a new Function object. - Function* ParseFunction(char *function_line); - - // Parses a line declaration, returning a new Line object. - Line* ParseLine(char *line_line); - - // Parses a PUBLIC symbol declaration, storing it in public_symbols_. - // Returns false if an error occurs. - bool ParsePublicSymbol(char *public_line); - - // Parses a STACK WIN or STACK CFI frame info declaration, storing - // it in the appropriate table. - bool ParseStackInfo(char *stack_info_line); - - // Parses a STACK CFI record, storing it in cfi_frame_info_. - bool ParseCFIFrameInfo(char *stack_info_line); - - string name_; - FileMap files_; - RangeMap< MemAddr, linked_ptr > functions_; - AddressMap< MemAddr, linked_ptr > public_symbols_; - - // Each element in the array is a ContainedRangeMap for a type - // listed in WindowsFrameInfoTypes. These are split by type because - // there may be overlaps between maps of different types, but some - // information is only available as certain types. - ContainedRangeMap< MemAddr, linked_ptr > - windows_frame_info_[WindowsFrameInfo::STACK_INFO_LAST]; - - // DWARF CFI stack walking data. The Module stores the initial rule sets - // and rule deltas as strings, just as they appear in the symbol file: - // although the file may contain hundreds of thousands of STACK CFI - // records, walking a stack will only ever use a few of them, so it's - // best to delay parsing a record until it's actually needed. - - // STACK CFI INIT records: for each range, an initial set of register - // recovery rules. The RangeMap's itself gives the starting and ending - // addresses. - RangeMap cfi_initial_rules_; - - // STACK CFI records: at a given address, the changes to the register - // recovery rules that take effect at that address. The map key is the - // starting address; the ending address is the key of the next entry in - // this map, or the end of the range as given by the cfi_initial_rules_ - // entry (which FindCFIFrameInfo looks up first). - std::map cfi_delta_rules_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_TYPES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_unittest.cc deleted file mode 100644 index c241ea0a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/basic_source_line_resolver_unittest.cc +++ /dev/null @@ -1,407 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/windows_frame_info.h" -#include "processor/cfi_frame_info.h" - -namespace { - -using std::string; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CFIFrameInfo; -using google_breakpad::CodeModule; -using google_breakpad::MemoryRegion; -using google_breakpad::StackFrame; -using google_breakpad::WindowsFrameInfo; -using google_breakpad::linked_ptr; -using google_breakpad::scoped_ptr; - -class TestCodeModule : public CodeModule { - public: - TestCodeModule(string code_file) : code_file_(code_file) {} - virtual ~TestCodeModule() {} - - virtual u_int64_t base_address() const { return 0; } - virtual u_int64_t size() const { return 0xb000; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return ""; } - virtual string debug_file() const { return ""; } - virtual string debug_identifier() const { return ""; } - virtual string version() const { return ""; } - virtual const CodeModule* Copy() const { - return new TestCodeModule(code_file_); - } - - private: - string code_file_; -}; - -// A mock memory region object, for use by the STACK CFI tests. -class MockMemoryRegion: public MemoryRegion { - u_int64_t GetBase() const { return 0x10000; } - u_int32_t GetSize() const { return 0x01000; } - bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) const { - *value = address & 0xff; - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) const { - *value = address & 0xffff; - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) const { - switch (address) { - case 0x10008: *value = 0x98ecadc3; break; // saved %ebx - case 0x1000c: *value = 0x878f7524; break; // saved %esi - case 0x10010: *value = 0x6312f9a5; break; // saved %edi - case 0x10014: *value = 0x10038; break; // caller's %ebp - case 0x10018: *value = 0xf6438648; break; // return address - default: *value = 0xdeadbeef; break; // junk - } - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) const { - *value = address; - return true; - } -}; - -// Verify that, for every association in ACTUAL, EXPECTED has the same -// association. (That is, ACTUAL's associations should be a subset of -// EXPECTED's.) Also verify that ACTUAL has associations for ".ra" and -// ".cfa". -static bool VerifyRegisters( - const char *file, int line, - const CFIFrameInfo::RegisterValueMap &expected, - const CFIFrameInfo::RegisterValueMap &actual) { - CFIFrameInfo::RegisterValueMap::const_iterator a; - a = actual.find(".cfa"); - if (a == actual.end()) - return false; - a = actual.find(".ra"); - if (a == actual.end()) - return false; - for (a = actual.begin(); a != actual.end(); a++) { - CFIFrameInfo::RegisterValueMap::const_iterator e = - expected.find(a->first); - if (e == expected.end()) { - fprintf(stderr, "%s:%d: unexpected register '%s' recovered, value 0x%x\n", - file, line, a->first.c_str(), a->second); - return false; - } - if (e->second != a->second) { - fprintf(stderr, - "%s:%d: register '%s' recovered value was 0x%x, expected 0x%x\n", - file, line, a->first.c_str(), a->second, e->second); - return false; - } - // Don't complain if this doesn't recover all registers. Although - // the DWARF spec says that unmentioned registers are undefined, - // GCC uses omission to mean that they are unchanged. - } - return true; -} - - -static bool VerifyEmpty(const StackFrame &frame) { - if (frame.function_name.empty() && - frame.source_file_name.empty() && - frame.source_line == 0) - return true; - return false; -} - -static void ClearSourceLineInfo(StackFrame *frame) { - frame->function_name.clear(); - frame->module = NULL; - frame->source_file_name.clear(); - frame->source_line = 0; -} - -class TestBasicSourceLineResolver : public ::testing::Test { -public: - void SetUp() { - testdata_dir = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata"; - } - - BasicSourceLineResolver resolver; - string testdata_dir; -}; - -TEST_F(TestBasicSourceLineResolver, TestLoadAndResolve) -{ - TestCodeModule module1("module1"); - ASSERT_TRUE(resolver.LoadModule(&module1, testdata_dir + "/module1.out")); - ASSERT_TRUE(resolver.HasModule(&module1)); - TestCodeModule module2("module2"); - ASSERT_TRUE(resolver.LoadModule(&module2, testdata_dir + "/module2.out")); - ASSERT_TRUE(resolver.HasModule(&module2)); - - - StackFrame frame; - scoped_ptr windows_frame_info; - scoped_ptr cfi_frame_info; - frame.instruction = 0x1000; - frame.module = NULL; - resolver.FillSourceLineInfo(&frame); - ASSERT_FALSE(frame.module); - ASSERT_TRUE(frame.function_name.empty()); - ASSERT_EQ(frame.function_base, 0); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - ASSERT_EQ(frame.source_line_base, 0); - - frame.module = &module1; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_1"); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module1"); - ASSERT_EQ(frame.function_base, 0x1000); - ASSERT_EQ(frame.source_file_name, "file1_1.cc"); - ASSERT_EQ(frame.source_line, 44); - ASSERT_EQ(frame.source_line_base, 0x1000); - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_EQ(windows_frame_info->program_string, - "$eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ ="); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x800; - frame.module = &module1; - resolver.FillSourceLineInfo(&frame); - ASSERT_TRUE(VerifyEmpty(frame)); - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_FALSE(windows_frame_info.get()); - - frame.instruction = 0x1280; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_3"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_TRUE(windows_frame_info->program_string.empty()); - - frame.instruction = 0x1380; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_4"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_FALSE(windows_frame_info->program_string.empty()); - - frame.instruction = 0x2000; - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_FALSE(windows_frame_info.get()); - - // module1 has STACK CFI records covering 3d40..3def; - // module2 has STACK CFI records covering 3df0..3e9f; - // check that FindCFIFrameInfo doesn't claim to find any outside those ranges. - frame.instruction = 0x3d3f; - frame.module = &module1; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_FALSE(cfi_frame_info.get()); - - frame.instruction = 0x3e9f; - frame.module = &module1; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_FALSE(cfi_frame_info.get()); - - CFIFrameInfo::RegisterValueMap current_registers; - CFIFrameInfo::RegisterValueMap caller_registers; - CFIFrameInfo::RegisterValueMap expected_caller_registers; - MockMemoryRegion memory; - - // Regardless of which instruction evaluation takes place at, it - // should produce the same values for the caller's registers. - expected_caller_registers[".cfa"] = 0x1001c; - expected_caller_registers[".ra"] = 0xf6438648; - expected_caller_registers["$ebp"] = 0x10038; - expected_caller_registers["$ebx"] = 0x98ecadc3; - expected_caller_registers["$esi"] = 0x878f7524; - expected_caller_registers["$edi"] = 0x6312f9a5; - - frame.instruction = 0x3d40; - frame.module = &module1; - current_registers.clear(); - current_registers["$esp"] = 0x10018; - current_registers["$ebp"] = 0x10038; - current_registers["$ebx"] = 0x98ecadc3; - current_registers["$esi"] = 0x878f7524; - current_registers["$edi"] = 0x6312f9a5; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - ASSERT_TRUE(VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers)); - - frame.instruction = 0x3d41; - current_registers["$esp"] = 0x10014; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - ASSERT_TRUE(VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers)); - - frame.instruction = 0x3d43; - current_registers["$ebp"] = 0x10014; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d54; - current_registers["$ebx"] = 0x6864f054U; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d5a; - current_registers["$esi"] = 0x6285f79aU; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d84; - current_registers["$edi"] = 0x64061449U; - cfi_frame_info.reset(resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x2900; - frame.module = &module1; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, string("PublicSymbol")); - - frame.instruction = 0x4000; - frame.module = &module1; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, string("LargeFunction")); - - frame.instruction = 0x2181; - frame.module = &module2; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function2_2"); - ASSERT_EQ(frame.function_base, 0x2170); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module2"); - ASSERT_EQ(frame.source_file_name, "file2_2.cc"); - ASSERT_EQ(frame.source_line, 21); - ASSERT_EQ(frame.source_line_base, 0x2180); - windows_frame_info.reset(resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_EQ(windows_frame_info->prolog_size, 1); - - frame.instruction = 0x216f; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_1"); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x219f; - frame.module = &module2; - resolver.FillSourceLineInfo(&frame); - ASSERT_TRUE(frame.function_name.empty()); - - frame.instruction = 0x21a0; - frame.module = &module2; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_2"); -} - -TEST_F(TestBasicSourceLineResolver, TestInvalidLoads) -{ - TestCodeModule module3("module3"); - ASSERT_FALSE(resolver.LoadModule(&module3, - testdata_dir + "/module3_bad.out")); - ASSERT_FALSE(resolver.HasModule(&module3)); - TestCodeModule module4("module4"); - ASSERT_FALSE(resolver.LoadModule(&module4, - testdata_dir + "/module4_bad.out")); - ASSERT_FALSE(resolver.HasModule(&module4)); - TestCodeModule module5("module5"); - ASSERT_FALSE(resolver.LoadModule(&module5, - testdata_dir + "/invalid-filename")); - ASSERT_FALSE(resolver.HasModule(&module5)); - TestCodeModule invalidmodule("invalid-module"); - ASSERT_FALSE(resolver.HasModule(&invalidmodule)); -} - -TEST_F(TestBasicSourceLineResolver, TestUnload) -{ - TestCodeModule module1("module1"); - ASSERT_FALSE(resolver.HasModule(&module1)); - ASSERT_TRUE(resolver.LoadModule(&module1, testdata_dir + "/module1.out")); - ASSERT_TRUE(resolver.HasModule(&module1)); - resolver.UnloadModule(&module1); - ASSERT_FALSE(resolver.HasModule(&module1)); - ASSERT_TRUE(resolver.LoadModule(&module1, testdata_dir + "/module1.out")); - ASSERT_TRUE(resolver.HasModule(&module1)); -} - -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.cc deleted file mode 100644 index c8ee2186..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.cc +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include - -#include "processor/binarystream.h" - -namespace google_breakpad { -using std::string; -using std::vector; - -binarystream &binarystream::operator>>(std::string &str) { - u_int16_t length; - *this >> length; - if (eof()) - return *this; - if (length == 0) { - str.clear(); - return *this; - } - vector buffer(length); - stream_.read(&buffer[0], length); - if (!eof()) - str.assign(&buffer[0], length); - return *this; -} - -binarystream &binarystream::operator>>(u_int8_t &u8) { - stream_.read((char *)&u8, 1); - return *this; -} - -binarystream &binarystream::operator>>(u_int16_t &u16) { - u_int16_t temp; - stream_.read((char *)&temp, 2); - if (!eof()) - u16 = ntohs(temp); - return *this; -} - -binarystream &binarystream::operator>>(u_int32_t &u32) { - u_int32_t temp; - stream_.read((char *)&temp, 4); - if (!eof()) - u32 = ntohl(temp); - return *this; -} - -binarystream &binarystream::operator>>(u_int64_t &u64) { - u_int32_t lower, upper; - *this >> lower >> upper; - if (!eof()) - u64 = static_cast(lower) | (static_cast(upper) << 32); - return *this; -} - -binarystream &binarystream::operator<<(const std::string &str) { - if (str.length() > USHRT_MAX) { - // truncate to 16-bit length - *this << static_cast(USHRT_MAX); - stream_.write(str.c_str(), USHRT_MAX); - } else { - *this << (u_int16_t)(str.length() & 0xFFFF); - stream_.write(str.c_str(), str.length()); - } - return *this; -} - -binarystream &binarystream::operator<<(u_int8_t u8) { - stream_.write((const char*)&u8, 1); - return *this; -} - -binarystream &binarystream::operator<<(u_int16_t u16) { - u16 = htons(u16); - stream_.write((const char*)&u16, 2); - return *this; -} - -binarystream &binarystream::operator<<(u_int32_t u32) { - u32 = htonl(u32); - stream_.write((const char*)&u32, 4); - return *this; -} - -binarystream &binarystream::operator<<(u_int64_t u64) { - // write 64-bit ints as two 32-bit ints, so we can byte-swap them easily - u_int32_t lower = static_cast(u64 & 0xFFFFFFFF); - u_int32_t upper = static_cast(u64 >> 32); - *this << lower << upper; - return *this; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.h deleted file mode 100644 index 8cb3af98..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// binarystream implements part of the std::iostream interface as a -// wrapper around std::stringstream to allow reading and writing -// std::string and integers of known size. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_BINARYSTREAM_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_BINARYSTREAM_H_ - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { -using std::ios_base; -using std::ios; - -class binarystream { - public: - explicit binarystream(ios_base::openmode which = ios_base::out|ios_base::in) - : stream_(which) {} - explicit binarystream(const std::string &str, - ios_base::openmode which = ios_base::out|ios_base::in) - : stream_(str, which) {} - explicit binarystream(const char *str, size_t size, - ios_base::openmode which = ios_base::out|ios_base::in) - : stream_(std::string(str, size), which) {} - - binarystream &operator>>(std::string &str); - binarystream &operator>>(u_int8_t &u8); - binarystream &operator>>(u_int16_t &u16); - binarystream &operator>>(u_int32_t &u32); - binarystream &operator>>(u_int64_t &u64); - - // Note: strings are truncated at 65535 characters - binarystream &operator<<(const std::string &str); - binarystream &operator<<(u_int8_t u8); - binarystream &operator<<(u_int16_t u16); - binarystream &operator<<(u_int32_t u32); - binarystream &operator<<(u_int64_t u64); - - // Forward a few methods directly from the stream object - bool eof() const { return stream_.eof(); } - void clear() { stream_.clear(); } - std::string str() const { return stream_.str(); } - void str(const std::string &s) { stream_.str(s); } - - // Seek both read and write pointers to the beginning of the stream. - void rewind() { - stream_.seekg (0, ios::beg); - stream_.seekp (0, ios::beg); - } - - private: - std::stringstream stream_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_BINARYSTREAM_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream_unittest.cc deleted file mode 100644 index 2ed76e28..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/binarystream_unittest.cc +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "processor/binarystream.h" - -namespace { -using std::ios_base; -using std::string; -using std::vector; -using google_breakpad::binarystream; - - -class BinaryStreamBasicTest : public ::testing::Test { -protected: - binarystream stream; -}; - -TEST_F(BinaryStreamBasicTest, ReadU8) { - u_int8_t u8 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u8; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u8); - stream.rewind(); - stream.clear(); - stream << (u_int8_t)1; - ASSERT_FALSE(stream.eof()); - stream >> u8; - EXPECT_EQ(1, u8); - EXPECT_FALSE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadU16) { - u_int16_t u16 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u16; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u16); - stream.rewind(); - stream.clear(); - stream << (u_int16_t)1; - ASSERT_FALSE(stream.eof()); - stream >> u16; - EXPECT_EQ(1, u16); - EXPECT_FALSE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadU32) { - u_int32_t u32 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u32; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u32); - stream.rewind(); - stream.clear(); - stream << (u_int32_t)1; - ASSERT_FALSE(stream.eof()); - stream >> u32; - EXPECT_EQ(1, u32); - EXPECT_FALSE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadU64) { - u_int64_t u64 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u64; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u64); - stream.rewind(); - stream.clear(); - stream << (u_int64_t)1; - ASSERT_FALSE(stream.eof()); - stream >> u64; - EXPECT_EQ(1, u64); - EXPECT_FALSE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadString) { - string s(""); - ASSERT_FALSE(stream.eof()); - stream >> s; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ("", s); - // write an empty string to the stream, read it back - s = "abcd"; - stream.rewind(); - stream.clear(); - stream << string(""); - stream >> s; - EXPECT_EQ("", s); - EXPECT_FALSE(stream.eof()); - stream.rewind(); - stream.clear(); - stream << string("test"); - ASSERT_FALSE(stream.eof()); - stream >> s; - EXPECT_EQ("test", s); - EXPECT_FALSE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadEmptyString) { - string s("abc"); - stream << string(""); - stream >> s; - EXPECT_EQ("", s); -} - -TEST_F(BinaryStreamBasicTest, ReadMultiU8) { - const u_int8_t ea = 0, eb = 100, ec = 200, ed = 0xFF; - u_int8_t a, b, c, d, e; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - ASSERT_FALSE(stream.eof()); - e = 0; - stream >> e; - EXPECT_EQ(0, e); - ASSERT_TRUE(stream.eof()); - // try reading all at once, including one past eof - stream.rewind(); - stream.clear(); - ASSERT_FALSE(stream.eof()); - a = b = c = d = e = 0; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d >> e; - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadMultiU16) { - const u_int16_t ea = 0, eb = 0x100, ec = 0x8000, ed = 0xFFFF; - u_int16_t a, b, c, d, e; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - ASSERT_FALSE(stream.eof()); - e = 0; - stream >> e; - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); - // try reading all at once, including one past eof - stream.rewind(); - stream.clear(); - ASSERT_FALSE(stream.eof()); - a = b = c = d = e = 0; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d >> e; - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadMultiU32) { - const u_int32_t ea = 0, eb = 0x10000, ec = 0x8000000, ed = 0xFFFFFFFF; - u_int32_t a, b, c, d, e; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - ASSERT_FALSE(stream.eof()); - e = 0; - stream >> e; - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); - // try reading all at once, including one past eof - stream.rewind(); - stream.clear(); - ASSERT_FALSE(stream.eof()); - a = b = c = d = e = 0; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d >> e; - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadMultiU64) { - const u_int64_t ea = 0, eb = 0x10000, ec = 0x100000000ULL, - ed = 0xFFFFFFFFFFFFFFFFULL; - u_int64_t a, b, c, d, e; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - ASSERT_FALSE(stream.eof()); - e = 0; - stream >> e; - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); - // try reading all at once, including one past eof - stream.rewind(); - stream.clear(); - ASSERT_FALSE(stream.eof()); - a = b = c = d = e = 0; - stream << ea << eb << ec << ed; - stream >> a >> b >> c >> d >> e; - EXPECT_EQ(ea, a); - EXPECT_EQ(eb, b); - EXPECT_EQ(ec, c); - EXPECT_EQ(ed, d); - EXPECT_EQ(0, e); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadMixed) { - const u_int8_t e8 = 0x10; - const u_int16_t e16 = 0x2020; - const u_int32_t e32 = 0x30303030; - const u_int64_t e64 = 0x4040404040404040ULL; - const string es = "test"; - u_int8_t u8 = 0; - u_int16_t u16 = 0; - u_int32_t u32 = 0; - u_int64_t u64 = 0; - string s("test"); - stream << e8 << e16 << e32 << e64 << es; - stream >> u8 >> u16 >> u32 >> u64 >> s; - EXPECT_FALSE(stream.eof()); - EXPECT_EQ(e8, u8); - EXPECT_EQ(e16, u16); - EXPECT_EQ(e32, u32); - EXPECT_EQ(e64, u64); - EXPECT_EQ(es, s); -} - -TEST_F(BinaryStreamBasicTest, ReadStringMissing) { - // ensure that reading a string where only the length is present fails - u_int16_t u16 = 8; - stream << u16; - stream.rewind(); - string s(""); - stream >> s; - EXPECT_EQ("", s); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, ReadStringTruncated) { - // ensure that reading a string where not all the data is present fails - u_int16_t u16 = 8; - stream << u16; - stream << (u_int8_t)'t' << (u_int8_t)'e' << (u_int8_t)'s' << (u_int8_t)'t'; - stream.rewind(); - string s(""); - stream >> s; - EXPECT_EQ("", s); - EXPECT_TRUE(stream.eof()); -} - -TEST_F(BinaryStreamBasicTest, StreamByteLength) { - // Test that the stream buffer contains the right amount of data - stream << (u_int8_t)0 << (u_int16_t)1 << (u_int32_t)2 << (u_int64_t)3 - << string("test"); - string s = stream.str(); - EXPECT_EQ(21, s.length()); -} - -TEST_F(BinaryStreamBasicTest, AppendStreamResultsByteLength) { - // Test that appending the str() results from two streams - // gives the right byte length - binarystream stream2; - stream << (u_int8_t)0 << (u_int16_t)1; - stream2 << (u_int32_t)0 << (u_int64_t)2 - << string("test"); - string s = stream.str(); - string s2 = stream2.str(); - s.append(s2); - EXPECT_EQ(21, s.length()); -} - -TEST_F(BinaryStreamBasicTest, StreamSetStr) { - const string es("test"); - stream << es; - binarystream stream2; - stream2.str(stream.str()); - string s; - stream2 >> s; - EXPECT_FALSE(stream2.eof()); - EXPECT_EQ("test", s); - s = ""; - stream2.str(stream.str()); - stream2.rewind(); - stream2 >> s; - EXPECT_FALSE(stream2.eof()); - EXPECT_EQ("test", s); -} - -class BinaryStreamU8Test : public ::testing::Test { -protected: - binarystream stream; - - void SetUp() { - stream << (u_int8_t)1; - } -}; - -TEST_F(BinaryStreamU8Test, ReadU16) { - u_int16_t u16 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u16; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u16); -} - -TEST_F(BinaryStreamU8Test, ReadU32) { - u_int32_t u32 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u32; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u32); -} - -TEST_F(BinaryStreamU8Test, ReadU64) { - u_int64_t u64 = 0; - ASSERT_FALSE(stream.eof()); - stream >> u64; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ(0, u64); -} - -TEST_F(BinaryStreamU8Test, ReadString) { - string s(""); - ASSERT_FALSE(stream.eof()); - stream >> s; - ASSERT_TRUE(stream.eof()); - EXPECT_EQ("", s); -} - - -TEST(BinaryStreamTest, InitWithData) { - const char *data = "abcd"; - binarystream stream(data); - u_int8_t a, b, c, d; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); -} - -TEST(BinaryStreamTest, InitWithDataLeadingNull) { - const char *data = "\0abcd"; - binarystream stream(data, 5); - u_int8_t z, a, b, c, d; - stream >> z >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ(0, z); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); -} - -TEST(BinaryStreamTest, InitWithDataVector) { - vector data; - data.push_back('a'); - data.push_back('b'); - data.push_back('c'); - data.push_back('d'); - data.push_back('e'); - data.resize(4); - binarystream stream(&data[0], data.size()); - u_int8_t a, b, c, d; - stream >> a >> b >> c >> d; - ASSERT_FALSE(stream.eof()); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); -} - -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/call_stack.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/call_stack.cc deleted file mode 100644 index e3276716..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/call_stack.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// call_stack.cc: A call stack comprised of stack frames. -// -// See call_stack.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/stack_frame.h" - -namespace google_breakpad { - -CallStack::~CallStack() { - Clear(); -} - -void CallStack::Clear() { - for (vector::const_iterator iterator = frames_.begin(); - iterator != frames_.end(); - ++iterator) { - delete *iterator; - } -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info-inl.h deleted file mode 100644 index e55e6ea2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info-inl.h +++ /dev/null @@ -1,119 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_frame_info-inl.h: Definitions for cfi_frame_info.h inlined functions. - -#ifndef PROCESSOR_CFI_FRAME_INFO_INL_H_ -#define PROCESSOR_CFI_FRAME_INFO_INL_H_ - -#include - -namespace google_breakpad { - -template -bool SimpleCFIWalker::FindCallerRegisters( - const MemoryRegion &memory, - const CFIFrameInfo &cfi_frame_info, - const RawContextType &callee_context, - int callee_validity, - RawContextType *caller_context, - int *caller_validity) const { - typedef CFIFrameInfo::RegisterValueMap ValueMap; - ValueMap callee_registers; - ValueMap caller_registers; - // Just for brevity. - typename ValueMap::const_iterator caller_none = caller_registers.end(); - - // Populate callee_registers with register values from callee_context. - for (size_t i = 0; i < map_size_; i++) { - const RegisterSet &r = register_map_[i]; - if (callee_validity & r.validity_flag) - callee_registers[r.name] = callee_context.*r.context_member; - } - - // Apply the rules, and see what register values they yield. - if (!cfi_frame_info.FindCallerRegs(callee_registers, memory, - &caller_registers)) - return false; - - // Populate *caller_context with the values the rules placed in - // caller_registers. - memset(caller_context, 0xda, sizeof(caller_context)); - *caller_validity = 0; - for (size_t i = 0; i < map_size_; i++) { - const RegisterSet &r = register_map_[i]; - typename ValueMap::const_iterator caller_entry; - - // Did the rules provide a value for this register by its name? - caller_entry = caller_registers.find(r.name); - if (caller_entry != caller_none) { - caller_context->*r.context_member = caller_entry->second; - *caller_validity |= r.validity_flag; - continue; - } - - // Did the rules provide a value for this register under its - // alternate name? - if (r.alternate_name) { - caller_entry = caller_registers.find(r.alternate_name); - if (caller_entry != caller_none) { - caller_context->*r.context_member = caller_entry->second; - *caller_validity |= r.validity_flag; - continue; - } - } - - // Is this a callee-saves register? The walker assumes that these - // still hold the caller's value if the CFI doesn't mention them. - // - // Note that other frame walkers may fail to recover callee-saves - // registers; for example, the x86 "traditional" strategy only - // recovers %eip, %esp, and %ebp, even though %ebx, %esi, and %edi - // are callee-saves, too. It is not correct to blindly set the - // valid bit for all callee-saves registers, without first - // checking its validity bit in the callee. - if (r.callee_saves && (callee_validity & r.validity_flag) != 0) { - caller_context->*r.context_member = callee_context.*r.context_member; - *caller_validity |= r.validity_flag; - continue; - } - - // Otherwise, the register's value is unknown. - } - - return true; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_CFI_FRAME_INFO_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.cc deleted file mode 100644 index 1ded99d3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.cc +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_frame_info.cc: Implementation of CFIFrameInfo class. -// See cfi_frame_info.h for details. - -#include "processor/cfi_frame_info.h" - -#include - -#include - -#include "processor/postfix_evaluator-inl.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -template -bool CFIFrameInfo::FindCallerRegs(const RegisterValueMap ®isters, - const MemoryRegion &memory, - RegisterValueMap *caller_registers) const { - // If there are not rules for both .ra and .cfa in effect at this address, - // don't use this CFI data for stack walking. - if (cfa_rule_.empty() || ra_rule_.empty()) - return false; - - RegisterValueMap working; - PostfixEvaluator evaluator(&working, &memory); - - caller_registers->clear(); - - // First, compute the CFA. - V cfa; - working = registers; - if (!evaluator.EvaluateForValue(cfa_rule_, &cfa)) - return false; - - // Then, compute the return address. - V ra; - working = registers; - working[".cfa"] = cfa; - if (!evaluator.EvaluateForValue(ra_rule_, &ra)) - return false; - - // Now, compute values for all the registers register_rules_ mentions. - for (RuleMap::const_iterator it = register_rules_.begin(); - it != register_rules_.end(); it++) { - V value; - working = registers; - working[".cfa"] = cfa; - if (!evaluator.EvaluateForValue(it->second, &value)) - return false; - (*caller_registers)[it->first] = value; - } - - (*caller_registers)[".ra"] = ra; - (*caller_registers)[".cfa"] = cfa; - - return true; -} - -// Explicit instantiations for 32-bit and 64-bit architectures. -template bool CFIFrameInfo::FindCallerRegs( - const RegisterValueMap ®isters, - const MemoryRegion &memory, - RegisterValueMap *caller_registers) const; -template bool CFIFrameInfo::FindCallerRegs( - const RegisterValueMap ®isters, - const MemoryRegion &memory, - RegisterValueMap *caller_registers) const; - -string CFIFrameInfo::Serialize() const { - std::ostringstream stream; - - if (!cfa_rule_.empty()) { - stream << ".cfa: " << cfa_rule_; - } - if (!ra_rule_.empty()) { - if (static_cast(stream.tellp()) != 0) - stream << " "; - stream << ".ra: " << ra_rule_; - } - for (RuleMap::const_iterator iter = register_rules_.begin(); - iter != register_rules_.end(); - ++iter) { - if (static_cast(stream.tellp()) != 0) - stream << " "; - stream << iter->first << ": " << iter->second; - } - - return stream.str(); -} - -bool CFIRuleParser::Parse(const string &rule_set) { - size_t rule_set_len = rule_set.size(); - scoped_array working_copy(new char[rule_set_len + 1]); - memcpy(working_copy.get(), rule_set.data(), rule_set_len); - working_copy[rule_set_len] = '\0'; - - name_.clear(); - expression_.clear(); - - char *cursor; - static const char token_breaks[] = " \t\r\n"; - char *token = strtok_r(working_copy.get(), token_breaks, &cursor); - - for (;;) { - // End of rule set? - if (!token) return Report(); - - // Register/pseudoregister name? - size_t token_len = strlen(token); - if (token_len >= 1 && token[token_len - 1] == ':') { - // Names can't be empty. - if (token_len < 2) return false; - // If there is any pending content, report it. - if (!name_.empty() || !expression_.empty()) { - if (!Report()) return false; - } - name_.assign(token, token_len - 1); - expression_.clear(); - } else { - // Another expression component. - assert(token_len > 0); // strtok_r guarantees this, I think. - if (!expression_.empty()) - expression_ += ' '; - expression_ += token; - } - token = strtok_r(NULL, token_breaks, &cursor); - } -} - -bool CFIRuleParser::Report() { - if (name_.empty() || expression_.empty()) return false; - if (name_ == ".cfa") handler_->CFARule(expression_); - else if (name_ == ".ra") handler_->RARule(expression_); - else handler_->RegisterRule(name_, expression_); - return true; -} - -void CFIFrameInfoParseHandler::CFARule(const string &expression) { - frame_info_->SetCFARule(expression); -} - -void CFIFrameInfoParseHandler::RARule(const string &expression) { - frame_info_->SetRARule(expression); -} - -void CFIFrameInfoParseHandler::RegisterRule(const string &name, - const string &expression) { - frame_info_->SetRegisterRule(name, expression); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.h deleted file mode 100644 index fe06fb4f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info.h +++ /dev/null @@ -1,275 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_frame_info.h: Define the CFIFrameInfo class, which holds the -// set of 'STACK CFI'-derived register recovery rules that apply at a -// given instruction. - -#ifndef PROCESSOR_CFI_FRAME_INFO_H_ -#define PROCESSOR_CFI_FRAME_INFO_H_ - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::map; -using std::string; - -class MemoryRegion; - -// A set of rules for recovering the calling frame's registers' -// values, when the PC is at a given address in the current frame's -// function. See the description of 'STACK CFI' records at: -// -// http://code.google.com/p/google-breakpad/wiki/SymbolFiles -// -// To prepare an instance of CFIFrameInfo for use at a given -// instruction, first populate it with the rules from the 'STACK CFI -// INIT' record that covers that instruction, and then apply the -// changes given by the 'STACK CFI' records up to our instruction's -// address. Then, use the FindCallerRegs member function to apply the -// rules to the callee frame's register values, yielding the caller -// frame's register values. -class CFIFrameInfo { - public: - // A map from register names onto values. - template class RegisterValueMap: - public map { }; - - // Set the expression for computing a call frame address, return - // address, or register's value. At least the CFA rule and the RA - // rule must be set before calling FindCallerRegs. - void SetCFARule(const string &expression) { cfa_rule_ = expression; } - void SetRARule(const string &expression) { ra_rule_ = expression; } - void SetRegisterRule(const string ®ister_name, const string &expression) { - register_rules_[register_name] = expression; - } - - // Compute the values of the calling frame's registers, according to - // this rule set. Use ValueType in expression evaluation; this - // should be u_int32_t on machines with 32-bit addresses, or - // u_int64_t on machines with 64-bit addresses. - // - // Return true on success, false otherwise. - // - // MEMORY provides access to the contents of the stack. REGISTERS is - // a dictionary mapping the names of registers whose values are - // known in the current frame to their values. CALLER_REGISTERS is - // populated with the values of the recoverable registers in the - // frame that called the current frame. - // - // In addition, CALLER_REGISTERS[".ra"] will be the return address, - // and CALLER_REGISTERS[".cfa"] will be the call frame address. - // These may be helpful in computing the caller's PC and stack - // pointer, if their values are not explicitly specified. - template - bool FindCallerRegs(const RegisterValueMap ®isters, - const MemoryRegion &memory, - RegisterValueMap *caller_registers) const; - - // Serialize the rules in this object into a string in the format - // of STACK CFI records. - string Serialize() const; - - private: - - // A map from register names onto evaluation rules. - typedef map RuleMap; - - // In this type, a "postfix expression" is an expression of the sort - // interpreted by google_breakpad::PostfixEvaluator. - - // A postfix expression for computing the current frame's CFA (call - // frame address). The CFA is a reference address for the frame that - // remains unchanged throughout the frame's lifetime. You should - // evaluate this expression with a dictionary initially populated - // with the values of the current frame's known registers. - string cfa_rule_; - - // The following expressions should be evaluated with a dictionary - // initially populated with the values of the current frame's known - // registers, and with ".cfa" set to the result of evaluating the - // cfa_rule expression, above. - - // A postfix expression for computing the current frame's return - // address. - string ra_rule_; - - // For a register named REG, rules[REG] is a postfix expression - // which leaves the value of REG in the calling frame on the top of - // the stack. You should evaluate this expression - RuleMap register_rules_; -}; - -// A parser for STACK CFI-style rule sets. -// This may seem bureaucratic: there's no legitimate run-time reason -// to use a parser/handler pattern for this, as it's not a likely -// reuse boundary. But doing so makes finer-grained unit testing -// possible. -class CFIRuleParser { - public: - - class Handler { - public: - Handler() { } - virtual ~Handler() { } - - // The input specifies EXPRESSION as the CFA/RA computation rule. - virtual void CFARule(const string &expression) = 0; - virtual void RARule(const string &expression) = 0; - - // The input specifies EXPRESSION as the recovery rule for register NAME. - virtual void RegisterRule(const string &name, const string &expression) = 0; - }; - - // Construct a parser which feeds its results to HANDLER. - CFIRuleParser(Handler *handler) : handler_(handler) { } - - // Parse RULE_SET as a set of CFA computation and RA/register - // recovery rules, as appearing in STACK CFI records. Report the - // results of parsing by making the appropriate calls to handler_. - // Return true if parsing was successful, false otherwise. - bool Parse(const string &rule_set); - - private: - // Report any accumulated rule to handler_ - bool Report(); - - // The handler to which the parser reports its findings. - Handler *handler_; - - // Working data. - string name_, expression_; -}; - -// A handler for rule set parsing that populates a CFIFrameInfo with -// the results. -class CFIFrameInfoParseHandler: public CFIRuleParser::Handler { - public: - // Populate FRAME_INFO with the results of parsing. - CFIFrameInfoParseHandler(CFIFrameInfo *frame_info) - : frame_info_(frame_info) { } - - void CFARule(const string &expression); - void RARule(const string &expression); - void RegisterRule(const string &name, const string &expression); - - private: - CFIFrameInfo *frame_info_; -}; - -// A utility class template for simple 'STACK CFI'-driven stack walkers. -// Given a CFIFrameInfo instance, a table describing the architecture's -// register set, and a context holding the last frame's registers, an -// instance of this class can populate a new context with the caller's -// registers. -// -// This class template doesn't use any internal knowledge of CFIFrameInfo -// or the other stack walking structures; it just uses the public interface -// of CFIFrameInfo to do the usual things. But the logic it handles should -// be common to many different architectures' stack walkers, so wrapping it -// up in a class should allow the walkers to share code. -// -// RegisterType should be the type of this architecture's registers, either -// u_int32_t or u_int64_t. RawContextType should be the raw context -// structure type for this architecture. -template -class SimpleCFIWalker { - public: - // A structure describing one architecture register. - struct RegisterSet { - // The register name, as it appears in STACK CFI rules. - const char *name; - - // An alternate name that the register's value might be found - // under in a register value dictionary, or NULL. When generating - // names, prefer NAME to this value. It's common to list ".cfa" as - // an alternative name for the stack pointer, and ".ra" as an - // alternative name for the instruction pointer. - const char *alternate_name; - - // True if the callee is expected to preserve the value of this - // register. If this flag is true for some register R, and the STACK - // CFI records provide no rule to recover R, then SimpleCFIWalker - // assumes that the callee has not changed R's value, and the caller's - // value for R is that currently in the callee's context. - bool callee_saves; - - // The ContextValidity flag representing the register's presence. - int validity_flag; - - // A pointer to the RawContextType member that holds the - // register's value. - RegisterType RawContextType::*context_member; - }; - - // Create a simple CFI-based frame walker, given a description of the - // architecture's register set. REGISTER_MAP is an array of - // RegisterSet structures; MAP_SIZE is the number of elements in the - // array. - SimpleCFIWalker(const RegisterSet *register_map, size_t map_size) - : register_map_(register_map), map_size_(map_size) { } - - // Compute the calling frame's raw context given the callee's raw - // context. - // - // Given: - // - // - MEMORY, holding the stack's contents, - // - CFI_FRAME_INFO, describing the called function, - // - CALLEE_CONTEXT, holding the called frame's registers, and - // - CALLEE_VALIDITY, indicating which registers in CALLEE_CONTEXT are valid, - // - // fill in CALLER_CONTEXT with the caller's register values, and set - // CALLER_VALIDITY to indicate which registers are valid in - // CALLER_CONTEXT. Return true on success, or false on failure. - bool FindCallerRegisters(const MemoryRegion &memory, - const CFIFrameInfo &cfi_frame_info, - const RawContextType &callee_context, - int callee_validity, - RawContextType *caller_context, - int *caller_validity) const; - - private: - const RegisterSet *register_map_; - size_t map_size_; -}; - -} // namespace google_breakpad - -#include "cfi_frame_info-inl.h" - -#endif // PROCESSOR_CFI_FRAME_INFO_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info_unittest.cc deleted file mode 100644 index 979d4a3b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/cfi_frame_info_unittest.cc +++ /dev/null @@ -1,545 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// cfi_frame_info_unittest.cc: Unit tests for CFIFrameInfo, -// CFIRuleParser, CFIFrameInfoParseHandler, and SimpleCFIWalker. - -#include - -#include "breakpad_googletest_includes.h" -#include "processor/cfi_frame_info.h" -#include "google_breakpad/processor/memory_region.h" - -using google_breakpad::CFIFrameInfo; -using google_breakpad::CFIFrameInfoParseHandler; -using google_breakpad::CFIRuleParser; -using google_breakpad::MemoryRegion; -using google_breakpad::SimpleCFIWalker; -using std::string; -using testing::_; -using testing::A; -using testing::AtMost; -using testing::DoAll; -using testing::Return; -using testing::SetArgumentPointee; -using testing::Test; - -class MockMemoryRegion: public MemoryRegion { - public: - MOCK_CONST_METHOD0(GetBase, u_int64_t()); - MOCK_CONST_METHOD0(GetSize, u_int32_t()); - MOCK_CONST_METHOD2(GetMemoryAtAddress, bool(u_int64_t, u_int8_t *)); - MOCK_CONST_METHOD2(GetMemoryAtAddress, bool(u_int64_t, u_int16_t *)); - MOCK_CONST_METHOD2(GetMemoryAtAddress, bool(u_int64_t, u_int32_t *)); - MOCK_CONST_METHOD2(GetMemoryAtAddress, bool(u_int64_t, u_int64_t *)); -}; - -// Handy definitions for all tests. -struct CFIFixture { - - // Set up the mock memory object to expect no references. - void ExpectNoMemoryReferences() { - EXPECT_CALL(memory, GetBase()).Times(0); - EXPECT_CALL(memory, GetSize()).Times(0); - EXPECT_CALL(memory, GetMemoryAtAddress(_, A())).Times(0); - EXPECT_CALL(memory, GetMemoryAtAddress(_, A())).Times(0); - EXPECT_CALL(memory, GetMemoryAtAddress(_, A())).Times(0); - EXPECT_CALL(memory, GetMemoryAtAddress(_, A())).Times(0); - } - - CFIFrameInfo cfi; - MockMemoryRegion memory; - CFIFrameInfo::RegisterValueMap registers, caller_registers; -}; - -class Simple: public CFIFixture, public Test { }; - -// FindCallerRegs should fail if no .cfa rule is provided. -TEST_F(Simple, NoCFA) { - ExpectNoMemoryReferences(); - - cfi.SetRARule("0"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(".ra: 0", cfi.Serialize()); -} - -// FindCallerRegs should fail if no .ra rule is provided. -TEST_F(Simple, NoRA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("0"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(".cfa: 0", cfi.Serialize()); -} - -TEST_F(Simple, SetCFAAndRARule) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("330903416631436410"); - cfi.SetRARule("5870666104170902211"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(2U, caller_registers.size()); - ASSERT_EQ(330903416631436410ULL, caller_registers[".cfa"]); - ASSERT_EQ(5870666104170902211ULL, caller_registers[".ra"]); - - ASSERT_EQ(".cfa: 330903416631436410 .ra: 5870666104170902211", - cfi.Serialize()); -} - -TEST_F(Simple, SetManyRules) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("$temp1 68737028 = $temp2 61072337 = $temp1 $temp2 -"); - cfi.SetRARule(".cfa 99804755 +"); - cfi.SetRegisterRule("register1", ".cfa 54370437 *"); - cfi.SetRegisterRule("vodkathumbscrewingly", "24076308 .cfa +"); - cfi.SetRegisterRule("pubvexingfjordschmaltzy", ".cfa 29801007 -"); - cfi.SetRegisterRule("uncopyrightables", "92642917 .cfa /"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(6U, caller_registers.size()); - ASSERT_EQ(7664691U, caller_registers[".cfa"]); - ASSERT_EQ(107469446U, caller_registers[".ra"]); - ASSERT_EQ(416732599139967ULL, caller_registers["register1"]); - ASSERT_EQ(31740999U, caller_registers["vodkathumbscrewingly"]); - ASSERT_EQ(-22136316ULL, caller_registers["pubvexingfjordschmaltzy"]); - ASSERT_EQ(12U, caller_registers["uncopyrightables"]); - ASSERT_EQ(".cfa: $temp1 68737028 = $temp2 61072337 = $temp1 $temp2 - " - ".ra: .cfa 99804755 + " - "pubvexingfjordschmaltzy: .cfa 29801007 - " - "register1: .cfa 54370437 * " - "uncopyrightables: 92642917 .cfa / " - "vodkathumbscrewingly: 24076308 .cfa +", - cfi.Serialize()); -} - -TEST_F(Simple, RulesOverride) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("330903416631436410"); - cfi.SetRARule("5870666104170902211"); - cfi.SetCFARule("2828089117179001"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(2U, caller_registers.size()); - ASSERT_EQ(2828089117179001ULL, caller_registers[".cfa"]); - ASSERT_EQ(5870666104170902211ULL, caller_registers[".ra"]); - ASSERT_EQ(".cfa: 2828089117179001 .ra: 5870666104170902211", - cfi.Serialize()); -} - -class Scope: public CFIFixture, public Test { }; - -// There should be no value for .cfa in scope when evaluating the CFA rule. -TEST_F(Scope, CFALacksCFA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule(".cfa"); - cfi.SetRARule("0"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); -} - -// There should be no value for .ra in scope when evaluating the CFA rule. -TEST_F(Scope, CFALacksRA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule(".ra"); - cfi.SetRARule("0"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); -} - -// The current frame's registers should be in scope when evaluating -// the CFA rule. -TEST_F(Scope, CFASeesCurrentRegs) { - ExpectNoMemoryReferences(); - - registers[".baraminology"] = 0x06a7bc63e4f13893ULL; - registers[".ornithorhynchus"] = 0x5e0bf850bafce9d2ULL; - cfi.SetCFARule(".baraminology .ornithorhynchus +"); - cfi.SetRARule("0"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(2U, caller_registers.size()); - ASSERT_EQ(0x06a7bc63e4f13893ULL + 0x5e0bf850bafce9d2ULL, - caller_registers[".cfa"]); -} - -// .cfa should be in scope in the return address expression. -TEST_F(Scope, RASeesCFA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("48364076"); - cfi.SetRARule(".cfa"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(2U, caller_registers.size()); - ASSERT_EQ(48364076U, caller_registers[".ra"]); -} - -// There should be no value for .ra in scope when evaluating the CFA rule. -TEST_F(Scope, RALacksRA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("0"); - cfi.SetRARule(".ra"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); -} - -// The current frame's registers should be in scope in the return -// address expression. -TEST_F(Scope, RASeesCurrentRegs) { - ExpectNoMemoryReferences(); - - registers["noachian"] = 0x54dc4a5d8e5eb503ULL; - cfi.SetCFARule("10359370"); - cfi.SetRARule("noachian"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(2U, caller_registers.size()); - ASSERT_EQ(0x54dc4a5d8e5eb503ULL, caller_registers[".ra"]); -} - -// .cfa should be in scope for register rules. -TEST_F(Scope, RegistersSeeCFA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("6515179"); - cfi.SetRARule(".cfa"); - cfi.SetRegisterRule("rogerian", ".cfa"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(3U, caller_registers.size()); - ASSERT_EQ(6515179U, caller_registers["rogerian"]); -} - -// The return address should not be in scope for register rules. -TEST_F(Scope, RegsLackRA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("42740329"); - cfi.SetRARule("27045204"); - cfi.SetRegisterRule("$r1", ".ra"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); -} - -// Register rules can see the current frame's register values. -TEST_F(Scope, RegsSeeRegs) { - ExpectNoMemoryReferences(); - - registers["$r1"] = 0x6ed3582c4bedb9adULL; - registers["$r2"] = 0xd27d9e742b8df6d0ULL; - cfi.SetCFARule("88239303"); - cfi.SetRARule("30503835"); - cfi.SetRegisterRule("$r1", "$r1 42175211 = $r2"); - cfi.SetRegisterRule("$r2", "$r2 21357221 = $r1"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(4U, caller_registers.size()); - ASSERT_EQ(0xd27d9e742b8df6d0ULL, caller_registers["$r1"]); - ASSERT_EQ(0x6ed3582c4bedb9adULL, caller_registers["$r2"]); -} - -// Each rule's temporaries are separate. -TEST_F(Scope, SeparateTempsRA) { - ExpectNoMemoryReferences(); - - cfi.SetCFARule("$temp1 76569129 = $temp1"); - cfi.SetRARule("0"); - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - - cfi.SetCFARule("$temp1 76569129 = $temp1"); - cfi.SetRARule("$temp1"); - ASSERT_FALSE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); -} - -class MockCFIRuleParserHandler: public CFIRuleParser::Handler { - public: - MOCK_METHOD1(CFARule, void(const string &)); - MOCK_METHOD1(RARule, void(const string &)); - MOCK_METHOD2(RegisterRule, void(const string &, const string &)); -}; - -// A fixture class for testing CFIRuleParser. -class CFIParserFixture { - public: - CFIParserFixture() : parser(&mock_handler) { - // Expect no parsing results to be reported to mock_handler. Individual - // tests can override this. - EXPECT_CALL(mock_handler, CFARule(_)).Times(0); - EXPECT_CALL(mock_handler, RARule(_)).Times(0); - EXPECT_CALL(mock_handler, RegisterRule(_, _)).Times(0); - } - - MockCFIRuleParserHandler mock_handler; - CFIRuleParser parser; -}; - -class Parser: public CFIParserFixture, public Test { }; - -TEST_F(Parser, Empty) { - EXPECT_FALSE(parser.Parse("")); -} - -TEST_F(Parser, LoneColon) { - EXPECT_FALSE(parser.Parse(":")); -} - -TEST_F(Parser, CFANoExpr) { - EXPECT_FALSE(parser.Parse(".cfa:")); -} - -TEST_F(Parser, CFANoColonNoExpr) { - EXPECT_FALSE(parser.Parse(".cfa")); -} - -TEST_F(Parser, RANoExpr) { - EXPECT_FALSE(parser.Parse(".ra:")); -} - -TEST_F(Parser, RANoColonNoExpr) { - EXPECT_FALSE(parser.Parse(".ra")); -} - -TEST_F(Parser, RegNoExpr) { - EXPECT_FALSE(parser.Parse("reg:")); -} - -TEST_F(Parser, NoName) { - EXPECT_FALSE(parser.Parse("expr")); -} - -TEST_F(Parser, NoNameTwo) { - EXPECT_FALSE(parser.Parse("expr1 expr2")); -} - -TEST_F(Parser, StartsWithExpr) { - EXPECT_FALSE(parser.Parse("expr1 reg: expr2")); -} - -TEST_F(Parser, CFA) { - EXPECT_CALL(mock_handler, CFARule("spleen")).WillOnce(Return()); - EXPECT_TRUE(parser.Parse(".cfa: spleen")); -} - -TEST_F(Parser, RA) { - EXPECT_CALL(mock_handler, RARule("notoriety")).WillOnce(Return()); - EXPECT_TRUE(parser.Parse(".ra: notoriety")); -} - -TEST_F(Parser, Reg) { - EXPECT_CALL(mock_handler, RegisterRule("nemo", "mellifluous")) - .WillOnce(Return()); - EXPECT_TRUE(parser.Parse("nemo: mellifluous")); -} - -TEST_F(Parser, CFARARegs) { - EXPECT_CALL(mock_handler, CFARule("cfa expression")).WillOnce(Return()); - EXPECT_CALL(mock_handler, RARule("ra expression")).WillOnce(Return()); - EXPECT_CALL(mock_handler, RegisterRule("galba", "praetorian")) - .WillOnce(Return()); - EXPECT_CALL(mock_handler, RegisterRule("otho", "vitellius")) - .WillOnce(Return()); - EXPECT_TRUE(parser.Parse(".cfa: cfa expression .ra: ra expression " - "galba: praetorian otho: vitellius")); -} - -TEST_F(Parser, Whitespace) { - EXPECT_CALL(mock_handler, RegisterRule("r1", "r1 expression")) - .WillOnce(Return()); - EXPECT_CALL(mock_handler, RegisterRule("r2", "r2 expression")) - .WillOnce(Return()); - EXPECT_TRUE(parser.Parse(" r1:\tr1\nexpression \tr2:\t\rr2\r\n " - "expression \n")); -} - -TEST_F(Parser, WhitespaceLoneColon) { - EXPECT_FALSE(parser.Parse(" \n:\t ")); -} - -TEST_F(Parser, EmptyName) { - EXPECT_CALL(mock_handler, RegisterRule("reg", _)) - .Times(AtMost(1)) - .WillRepeatedly(Return()); - EXPECT_FALSE(parser.Parse("reg: expr1 : expr2")); -} - -TEST_F(Parser, RuleLoneColon) { - EXPECT_CALL(mock_handler, RegisterRule("r1", "expr")) - .Times(AtMost(1)) - .WillRepeatedly(Return()); - EXPECT_FALSE(parser.Parse(" r1: expr :")); -} - -TEST_F(Parser, RegNoExprRule) { - EXPECT_CALL(mock_handler, RegisterRule("r1", "expr")) - .Times(AtMost(1)) - .WillRepeatedly(Return()); - EXPECT_FALSE(parser.Parse("r0: r1: expr")); -} - -class ParseHandlerFixture: public CFIFixture { - public: - ParseHandlerFixture() : CFIFixture(), handler(&cfi) { } - CFIFrameInfoParseHandler handler; -}; - -class ParseHandler: public ParseHandlerFixture, public Test { }; - -TEST_F(ParseHandler, CFARARule) { - handler.CFARule("reg-for-cfa"); - handler.RARule("reg-for-ra"); - registers["reg-for-cfa"] = 0x268a9a4a3821a797ULL; - registers["reg-for-ra"] = 0x6301b475b8b91c02ULL; - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(0x268a9a4a3821a797ULL, caller_registers[".cfa"]); - ASSERT_EQ(0x6301b475b8b91c02ULL, caller_registers[".ra"]); -} - -TEST_F(ParseHandler, RegisterRules) { - handler.CFARule("reg-for-cfa"); - handler.RARule("reg-for-ra"); - handler.RegisterRule("reg1", "reg-for-reg1"); - handler.RegisterRule("reg2", "reg-for-reg2"); - registers["reg-for-cfa"] = 0x268a9a4a3821a797ULL; - registers["reg-for-ra"] = 0x6301b475b8b91c02ULL; - registers["reg-for-reg1"] = 0x06cde8e2ff062481ULL; - registers["reg-for-reg2"] = 0xff0c4f76403173e2ULL; - ASSERT_TRUE(cfi.FindCallerRegs(registers, memory, - &caller_registers)); - ASSERT_EQ(0x268a9a4a3821a797ULL, caller_registers[".cfa"]); - ASSERT_EQ(0x6301b475b8b91c02ULL, caller_registers[".ra"]); - ASSERT_EQ(0x06cde8e2ff062481ULL, caller_registers["reg1"]); - ASSERT_EQ(0xff0c4f76403173e2ULL, caller_registers["reg2"]); -} - -struct SimpleCFIWalkerFixture { - struct RawContext { - u_int64_t r0, r1, r2, r3, r4, sp, pc; - }; - enum Validity { - R0_VALID = 0x01, - R1_VALID = 0x02, - R2_VALID = 0x04, - R3_VALID = 0x08, - R4_VALID = 0x10, - SP_VALID = 0x20, - PC_VALID = 0x40 - }; - typedef SimpleCFIWalker CFIWalker; - - SimpleCFIWalkerFixture() - : walker(register_map, - sizeof(register_map) / sizeof(register_map[0])) { } - - static CFIWalker::RegisterSet register_map[7]; - CFIFrameInfo call_frame_info; - CFIWalker walker; - MockMemoryRegion memory; - RawContext callee_context, caller_context; -}; - -SimpleCFIWalkerFixture::CFIWalker::RegisterSet -SimpleCFIWalkerFixture::register_map[7] = { - { "r0", NULL, true, R0_VALID, &RawContext::r0 }, - { "r1", NULL, true, R1_VALID, &RawContext::r1 }, - { "r2", NULL, false, R2_VALID, &RawContext::r2 }, - { "r3", NULL, false, R3_VALID, &RawContext::r3 }, - { "r4", NULL, true, R4_VALID, &RawContext::r4 }, - { "sp", ".cfa", true, SP_VALID, &RawContext::sp }, - { "pc", ".ra", true, PC_VALID, &RawContext::pc }, -}; - -class SimpleWalker: public SimpleCFIWalkerFixture, public Test { }; - -TEST_F(SimpleWalker, Walk) { - // Stack_top is the current stack pointer, pointing to the lowest - // address of a frame that looks like this (all 64-bit words): - // - // sp -> saved r0 - // garbage - // return address - // cfa -> - // - // r0 has been saved on the stack. - // r1 has been saved in r2. - // r2 and r3 are not recoverable. - // r4 is not recoverable, even though it is a callee-saves register. - // Some earlier frame's unwinder must have failed to recover it. - - u_int64_t stack_top = 0x83254944b20d5512ULL; - - // Saved r0. - EXPECT_CALL(memory, - GetMemoryAtAddress(stack_top, A())) - .WillRepeatedly(DoAll(SetArgumentPointee<1>(0xdc1975eba8602302ULL), - Return(true))); - // Saved return address. - EXPECT_CALL(memory, - GetMemoryAtAddress(stack_top + 16, A())) - .WillRepeatedly(DoAll(SetArgumentPointee<1>(0xba5ad6d9acce28deULL), - Return(true))); - - call_frame_info.SetCFARule("sp 24 +"); - call_frame_info.SetRARule(".cfa 8 - ^"); - call_frame_info.SetRegisterRule("r0", ".cfa 24 - ^"); - call_frame_info.SetRegisterRule("r1", "r2"); - - callee_context.r0 = 0x94e030ca79edd119ULL; - callee_context.r1 = 0x937b4d7e95ce52d9ULL; - callee_context.r2 = 0x5fe0027416b8b62aULL; // caller's r1 - // callee_context.r3 is not valid in callee. - // callee_context.r4 is not valid in callee. - callee_context.sp = stack_top; - callee_context.pc = 0x25b21b224311d280ULL; - int callee_validity = R0_VALID | R1_VALID | R2_VALID | SP_VALID | PC_VALID; - - memset(&caller_context, 0, sizeof(caller_context)); - - int caller_validity; - EXPECT_TRUE(walker.FindCallerRegisters(memory, call_frame_info, - callee_context, callee_validity, - &caller_context, &caller_validity)); - EXPECT_EQ(R0_VALID | R1_VALID | SP_VALID | PC_VALID, caller_validity); - EXPECT_EQ(0xdc1975eba8602302ULL, caller_context.r0); - EXPECT_EQ(0x5fe0027416b8b62aULL, caller_context.r1); - EXPECT_EQ(stack_top + 24, caller_context.sp); - EXPECT_EQ(0xba5ad6d9acce28deULL, caller_context.pc); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map-inl.h deleted file mode 100644 index 4c0ad41f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map-inl.h +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map-inl.h: Hierarchically-organized range map implementation. -// -// See contained_range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ - -#include "processor/contained_range_map.h" - -#include - -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -ContainedRangeMap::~ContainedRangeMap() { - // Clear frees the children pointed to by the map, and frees the map itself. - Clear(); -} - - -template -bool ContainedRangeMap::StoreRange( - const AddressType &base, const AddressType &size, const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - //TODO(nealsid) We are commenting this out in order to prevent - // excessive logging. We plan to move to better logging as this - // failure happens quite often and is expected(see comment in - // basic_source_line_resolver.cc:671). - // BPLOG(INFO) << "StoreRange failed, " << HexString(base) << "+" - // << HexString(size) << ", " << HexString(high); - return false; - } - - if (!map_) - map_ = new AddressToRangeMap(); - - MapIterator iterator_base = map_->lower_bound(base); - MapIterator iterator_high = map_->lower_bound(high); - MapIterator iterator_end = map_->end(); - - if (iterator_base == iterator_high && iterator_base != iterator_end && - base >= iterator_base->second->base_) { - // The new range is entirely within an existing child range. - - // If the new range's geometry is exactly equal to an existing child - // range's, it violates the containment rules, and an attempt to store - // it must fail. iterator_base->first contains the key, which was the - // containing child's high address. - if (iterator_base->second->base_ == base && iterator_base->first == high) { - // TODO(nealsid): See the TODO above on why this is commented out. -// BPLOG(INFO) << "StoreRange failed, identical range is already " -// "present: " << HexString(base) << "+" << HexString(size); - return false; - } - - // Pass the new range on to the child to attempt to store. - return iterator_base->second->StoreRange(base, size, entry); - } - - // iterator_high might refer to an irrelevant range: one whose base address - // is higher than the new range's high address. Set contains_high to true - // only if iterator_high refers to a range that is at least partially - // within the new range. - bool contains_high = iterator_high != iterator_end && - high >= iterator_high->second->base_; - - // If the new range encompasses any existing child ranges, it must do so - // fully. Partial containment isn't allowed. - if ((iterator_base != iterator_end && base > iterator_base->second->base_) || - (contains_high && high < iterator_high->first)) { - // TODO(mmentovai): Some symbol files will trip this check frequently - // on STACK lines. Too many messages will be produced. These are more - // suitable for a DEBUG channel than an INFO channel. - // BPLOG(INFO) << "StoreRange failed, new range partially contains " - // "existing range: " << HexString(base) << "+" << - // HexString(size); - return false; - } - - // When copying and erasing contained ranges, the "end" iterator needs to - // point one past the last item of the range to copy. If contains_high is - // false, the iterator's already in the right place; the increment is safe - // because contains_high can't be true if iterator_high == iterator_end. - if (contains_high) - ++iterator_high; - - // Optimization: if the iterators are equal, no child ranges would be - // moved. Create the new child range with a NULL map to conserve space - // in leaf nodes, of which there will be many. - AddressToRangeMap *child_map = NULL; - - if (iterator_base != iterator_high) { - // The children of this range that are contained by the new range must - // be transferred over to the new range. Create the new child range map - // and copy the pointers to range maps it should contain into it. - child_map = new AddressToRangeMap(iterator_base, iterator_high); - - // Remove the copied child pointers from this range's map of children. - map_->erase(iterator_base, iterator_high); - } - - // Store the new range in the map by its high address. Any children that - // the new child range contains were formerly children of this range but - // are now this range's grandchildren. Ownership of these is transferred - // to the new child range. - map_->insert(MapValue(high, - new ContainedRangeMap(base, entry, child_map))); - return true; -} - - -template -bool ContainedRangeMap::RetrieveRange( - const AddressType &address, EntryType *entry) const { - BPLOG_IF(ERROR, !entry) << "ContainedRangeMap::RetrieveRange requires " - "|entry|"; - assert(entry); - - // If nothing was ever stored, then there's nothing to retrieve. - if (!map_) - return false; - - // Get an iterator to the child range whose high address is equal to or - // greater than the supplied address. If the supplied address is higher - // than all of the high addresses in the range, then this range does not - // contain a child at address, so return false. If the supplied address - // is lower than the base address of the child range, then it is not within - // the child range, so return false. - MapConstIterator iterator = map_->lower_bound(address); - if (iterator == map_->end() || address < iterator->second->base_) - return false; - - // The child in iterator->second contains the specified address. Find out - // if it has a more-specific descendant that also contains it. If it does, - // it will set |entry| appropriately. If not, set |entry| to the child. - if (!iterator->second->RetrieveRange(address, entry)) - *entry = iterator->second->entry_; - - return true; -} - - -template -void ContainedRangeMap::Clear() { - if (map_) { - MapConstIterator end = map_->end(); - for (MapConstIterator child = map_->begin(); child != end; ++child) - delete child->second; - - delete map_; - map_ = NULL; - } -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map.h deleted file mode 100644 index 1015ae8c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map.h +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map.h: Hierarchically-organized range maps. -// -// A contained range map is similar to a standard range map, except it allows -// objects to be organized hierarchically. A contained range map allows -// objects to contain other objects. It is not sensitive to the order that -// objects are added to the map: larger, more general, containing objects -// may be added either before or after smaller, more specific, contained -// ones. -// -// Contained range maps guarantee that each object may only contain smaller -// objects than itself, and that a parent object may only contain child -// objects located entirely within the parent's address space. Attempts -// to introduce objects (via StoreRange) that violate these rules will fail. -// Retrieval (via RetrieveRange) always returns the most specific (smallest) -// object that contains the address being queried. Note that while it is -// not possible to insert two objects into a map that have exactly the same -// geometry (base address and size), it is possible to completely mask a -// larger object by inserting smaller objects that entirely fill the larger -// object's address space. -// -// Internally, contained range maps are implemented as a tree. Each tree -// node except for the root node describes an object in the map. Each node -// maintains its list of children in a map similar to a standard range map, -// keyed by the highest address that each child occupies. Each node's -// children occupy address ranges entirely within the node. The root node -// is the only node directly accessible to the user, and represents the -// entire address space. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - -// Forward declarations (for later friend declarations of specialized template). -template class ContainedRangeMapSerializer; - -template -class ContainedRangeMap { - public: - // The default constructor creates a ContainedRangeMap with no geometry - // and no entry, and as such is only suitable for the root node of a - // ContainedRangeMap tree. - ContainedRangeMap() : base_(), entry_(), map_(NULL) {} - - ~ContainedRangeMap(); - - // Inserts a range into the map. If the new range is encompassed by - // an existing child range, the new range is passed into the child range's - // StoreRange method. If the new range encompasses any existing child - // ranges, those child ranges are moved to the new range, becoming - // grandchildren of this ContainedRangeMap. Returns false for a - // parameter error, or if the ContainedRangeMap hierarchy guarantees - // would be violated. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Retrieves the most specific (smallest) descendant range encompassing - // the specified address. This method will only return entries held by - // child ranges, and not the entry contained by |this|. This is necessary - // to support a sparsely-populated root range. If no descendant range - // encompasses the address, returns false. - bool RetrieveRange(const AddressType &address, EntryType *entry) const; - - // Removes all children. Note that Clear only removes descendants, - // leaving the node on which it is called intact. Because the only - // meaningful things contained by a root node are descendants, this - // is sufficient to restore an entire ContainedRangeMap to its initial - // empty state when called on the root node. - void Clear(); - - private: - friend class ContainedRangeMapSerializer; - friend class ModuleComparer; - - // AddressToRangeMap stores pointers. This makes reparenting simpler in - // StoreRange, because it doesn't need to copy entire objects. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::iterator MapIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Creates a new ContainedRangeMap with the specified base address, entry, - // and initial child map, which may be NULL. This is only used internally - // by ContainedRangeMap when it creates a new child. - ContainedRangeMap(const AddressType &base, const EntryType &entry, - AddressToRangeMap *map) - : base_(base), entry_(entry), map_(map) {} - - // The base address of this range. The high address does not need to - // be stored, because it is used as the key to an object in its parent's - // map, and all ContainedRangeMaps except for the root range are contained - // within maps. The root range does not actually contain an entry, so its - // base_ field is meaningless, and the fact that it has no parent and thus - // no key is unimportant. For this reason, the base_ field should only be - // is accessed on child ContainedRangeMap objects, and never on |this|. - const AddressType base_; - - // The entry corresponding to this range. The root range does not - // actually contain an entry, so its entry_ field is meaningless. For - // this reason, the entry_ field should only be accessed on child - // ContainedRangeMap objects, and never on |this|. - const EntryType entry_; - - // The map containing child ranges, keyed by each child range's high - // address. This is a pointer to avoid allocating map structures for - // leaf nodes, where they are not needed. - AddressToRangeMap *map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map_unittest.cc deleted file mode 100644 index e5910da0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/contained_range_map_unittest.cc +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map_unittest.cc: Unit tests for ContainedRangeMap -// -// Author: Mark Mentovai - -#include - -#include "processor/contained_range_map-inl.h" - -#include "processor/logging.h" - - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(condition) ASSERT_TRUE(!(condition)) - - -namespace { - - -using google_breakpad::ContainedRangeMap; - - -static bool RunTests() { - ContainedRangeMap crm; - - // First, do the StoreRange tests. This validates the containment - // rules. - ASSERT_TRUE (crm.StoreRange(10, 10, 1)); - ASSERT_FALSE(crm.StoreRange(10, 10, 2)); // exactly equal to 1 - ASSERT_FALSE(crm.StoreRange(11, 10, 3)); // begins inside 1 and extends up - ASSERT_FALSE(crm.StoreRange( 9, 10, 4)); // begins below 1 and ends inside - ASSERT_TRUE (crm.StoreRange(11, 9, 5)); // contained by existing - ASSERT_TRUE (crm.StoreRange(12, 7, 6)); - ASSERT_TRUE (crm.StoreRange( 9, 12, 7)); // contains existing - ASSERT_TRUE (crm.StoreRange( 9, 13, 8)); - ASSERT_TRUE (crm.StoreRange( 8, 14, 9)); - ASSERT_TRUE (crm.StoreRange(30, 3, 10)); - ASSERT_TRUE (crm.StoreRange(33, 3, 11)); - ASSERT_TRUE (crm.StoreRange(30, 6, 12)); // storable but totally masked - ASSERT_TRUE (crm.StoreRange(40, 8, 13)); // will be totally masked - ASSERT_TRUE (crm.StoreRange(40, 4, 14)); - ASSERT_TRUE (crm.StoreRange(44, 4, 15)); - ASSERT_FALSE(crm.StoreRange(32, 10, 16)); // begins in #10, ends in #14 - ASSERT_FALSE(crm.StoreRange(50, 0, 17)); // zero length - ASSERT_TRUE (crm.StoreRange(50, 10, 18)); - ASSERT_TRUE (crm.StoreRange(50, 1, 19)); - ASSERT_TRUE (crm.StoreRange(59, 1, 20)); - ASSERT_TRUE (crm.StoreRange(60, 1, 21)); - ASSERT_TRUE (crm.StoreRange(69, 1, 22)); - ASSERT_TRUE (crm.StoreRange(60, 10, 23)); - ASSERT_TRUE (crm.StoreRange(68, 1, 24)); - ASSERT_TRUE (crm.StoreRange(61, 1, 25)); - ASSERT_TRUE (crm.StoreRange(61, 8, 26)); - ASSERT_FALSE(crm.StoreRange(59, 9, 27)); - ASSERT_FALSE(crm.StoreRange(59, 10, 28)); - ASSERT_FALSE(crm.StoreRange(59, 11, 29)); - ASSERT_TRUE (crm.StoreRange(70, 10, 30)); - ASSERT_TRUE (crm.StoreRange(74, 2, 31)); - ASSERT_TRUE (crm.StoreRange(77, 2, 32)); - ASSERT_FALSE(crm.StoreRange(72, 6, 33)); - ASSERT_TRUE (crm.StoreRange(80, 3, 34)); - ASSERT_TRUE (crm.StoreRange(81, 1, 35)); - ASSERT_TRUE (crm.StoreRange(82, 1, 36)); - ASSERT_TRUE (crm.StoreRange(83, 3, 37)); - ASSERT_TRUE (crm.StoreRange(84, 1, 38)); - ASSERT_TRUE (crm.StoreRange(83, 1, 39)); - ASSERT_TRUE (crm.StoreRange(86, 5, 40)); - ASSERT_TRUE (crm.StoreRange(88, 1, 41)); - ASSERT_TRUE (crm.StoreRange(90, 1, 42)); - ASSERT_TRUE (crm.StoreRange(86, 1, 43)); - ASSERT_TRUE (crm.StoreRange(87, 1, 44)); - ASSERT_TRUE (crm.StoreRange(89, 1, 45)); - ASSERT_TRUE (crm.StoreRange(87, 4, 46)); - ASSERT_TRUE (crm.StoreRange(87, 3, 47)); - ASSERT_FALSE(crm.StoreRange(86, 2, 48)); - - // Each element in test_data contains the expected result when calling - // RetrieveRange on an address. - const int test_data[] = { - 0, // 0 - 0, // 1 - 0, // 2 - 0, // 3 - 0, // 4 - 0, // 5 - 0, // 6 - 0, // 7 - 9, // 8 - 7, // 9 - 1, // 10 - 5, // 11 - 6, // 12 - 6, // 13 - 6, // 14 - 6, // 15 - 6, // 16 - 6, // 17 - 6, // 18 - 5, // 19 - 7, // 20 - 8, // 21 - 0, // 22 - 0, // 23 - 0, // 24 - 0, // 25 - 0, // 26 - 0, // 27 - 0, // 28 - 0, // 29 - 10, // 30 - 10, // 31 - 10, // 32 - 11, // 33 - 11, // 34 - 11, // 35 - 0, // 36 - 0, // 37 - 0, // 38 - 0, // 39 - 14, // 40 - 14, // 41 - 14, // 42 - 14, // 43 - 15, // 44 - 15, // 45 - 15, // 46 - 15, // 47 - 0, // 48 - 0, // 49 - 19, // 50 - 18, // 51 - 18, // 52 - 18, // 53 - 18, // 54 - 18, // 55 - 18, // 56 - 18, // 57 - 18, // 58 - 20, // 59 - 21, // 60 - 25, // 61 - 26, // 62 - 26, // 63 - 26, // 64 - 26, // 65 - 26, // 66 - 26, // 67 - 24, // 68 - 22, // 69 - 30, // 70 - 30, // 71 - 30, // 72 - 30, // 73 - 31, // 74 - 31, // 75 - 30, // 76 - 32, // 77 - 32, // 78 - 30, // 79 - 34, // 80 - 35, // 81 - 36, // 82 - 39, // 83 - 38, // 84 - 37, // 85 - 43, // 86 - 44, // 87 - 41, // 88 - 45, // 89 - 42, // 90 - 0, // 91 - 0, // 92 - 0, // 93 - 0, // 94 - 0, // 95 - 0, // 96 - 0, // 97 - 0, // 98 - 0 // 99 - }; - unsigned int test_high = sizeof(test_data) / sizeof(int); - - // Now, do the RetrieveRange tests. This further validates that the - // objects were stored properly and that retrieval returns the correct - // object. - // If GENERATE_TEST_DATA is defined, instead of the retrieval tests, a - // new test_data array will be printed. Exercise caution when doing this. - // Be sure to verify the results manually! -#ifdef GENERATE_TEST_DATA - printf(" const int test_data[] = {\n"); -#endif // GENERATE_TEST_DATA - - for (unsigned int address = 0; address < test_high; ++address) { - int value; - if (!crm.RetrieveRange(address, &value)) - value = 0; - -#ifndef GENERATE_TEST_DATA - // Don't use ASSERT inside the loop because it won't show the failed - // |address|, and the line number will always be the same. That makes - // it difficult to figure out which test failed. - if (value != test_data[address]) { - fprintf(stderr, "FAIL: retrieve %d expected %d observed %d @ %s:%d\n", - address, test_data[address], value, __FILE__, __LINE__); - return false; - } -#else // !GENERATE_TEST_DATA - printf(" %d%c%s // %d\n", value, - address == test_high - 1 ? ' ' : ',', - value < 10 ? " " : "", - address); -#endif // !GENERATE_TEST_DATA - } - -#ifdef GENERATE_TEST_DATA - printf(" };\n"); -#endif // GENERATE_TEST_DATA - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.cc deleted file mode 100644 index 76015f4a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.cc +++ /dev/null @@ -1,238 +0,0 @@ -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// disassembler_x86.cc: simple x86 disassembler. -// -// Provides single step disassembly of x86 bytecode and flags instructions -// that utilize known bad register values. -// -// Author: Cris Neckar - -#include "processor/disassembler_x86.h" - -#include -#include - -namespace google_breakpad { - -DisassemblerX86::DisassemblerX86(const u_int8_t *bytecode, - u_int32_t size, - u_int32_t virtual_address) : - bytecode_(bytecode), - size_(size), - virtual_address_(virtual_address), - current_byte_offset_(0), - current_inst_offset_(0), - instr_valid_(false), - register_valid_(false), - pushed_bad_value_(false), - end_of_block_(false), - flags_(0) { - libdis::x86_init(libdis::opt_none, NULL, NULL); -} - -DisassemblerX86::~DisassemblerX86() { - libdis::x86_cleanup(); -} - -u_int32_t DisassemblerX86::NextInstruction() { - if (instr_valid_) - libdis::x86_oplist_free(¤t_instr_); - - if (current_byte_offset_ >= size_) { - instr_valid_ = false; - return 0; - } - u_int32_t instr_size = 0; - instr_size = libdis::x86_disasm((unsigned char *)bytecode_, size_, - virtual_address_, current_byte_offset_, - ¤t_instr_); - if (instr_size == 0) { - instr_valid_ = false; - return 0; - } - - current_byte_offset_ += instr_size; - current_inst_offset_++; - instr_valid_ = libdis::x86_insn_is_valid(¤t_instr_); - if (!instr_valid_) - return 0; - - if (current_instr_.type == libdis::insn_return) - end_of_block_ = true; - libdis::x86_op_t *src = libdis::x86_get_src_operand(¤t_instr_); - libdis::x86_op_t *dest = libdis::x86_get_dest_operand(¤t_instr_); - - if (register_valid_) { - switch (current_instr_.group) { - // Flag branches based off of bad registers and calls that occur - // after pushing bad values. - case libdis::insn_controlflow: - switch (current_instr_.type) { - case libdis::insn_jmp: - case libdis::insn_jcc: - case libdis::insn_call: - case libdis::insn_callcc: - if (dest) { - switch (dest->type) { - case libdis::op_expression: - if (dest->data.expression.base.id == bad_register_.id) - flags_ |= DISX86_BAD_BRANCH_TARGET; - break; - case libdis::op_register: - if (dest->data.reg.id == bad_register_.id) - flags_ |= DISX86_BAD_BRANCH_TARGET; - break; - default: - if (pushed_bad_value_ && - (current_instr_.type == libdis::insn_call || - current_instr_.type == libdis::insn_callcc)) - flags_ |= DISX86_BAD_ARGUMENT_PASSED; - break; - } - } - break; - default: - break; - } - break; - - // Flag block data operations that use bad registers for src or dest. - case libdis::insn_string: - if (dest && dest->type == libdis::op_expression && - dest->data.expression.base.id == bad_register_.id) - flags_ |= DISX86_BAD_BLOCK_WRITE; - if (src && src->type == libdis::op_expression && - src->data.expression.base.id == bad_register_.id) - flags_ |= DISX86_BAD_BLOCK_READ; - break; - - // Flag comparisons based on bad data. - case libdis::insn_comparison: - if ((dest && dest->type == libdis::op_expression && - dest->data.expression.base.id == bad_register_.id) || - (src && src->type == libdis::op_expression && - src->data.expression.base.id == bad_register_.id) || - (dest && dest->type == libdis::op_register && - dest->data.reg.id == bad_register_.id) || - (src && src->type == libdis::op_register && - src->data.reg.id == bad_register_.id)) - flags_ |= DISX86_BAD_COMPARISON; - break; - - // Flag any other instruction which derefs a bad register for - // src or dest. - default: - if (dest && dest->type == libdis::op_expression && - dest->data.expression.base.id == bad_register_.id) - flags_ |= DISX86_BAD_WRITE; - if (src && src->type == libdis::op_expression && - src->data.expression.base.id == bad_register_.id) - flags_ |= DISX86_BAD_READ; - break; - } - } - - // When a register is marked as tainted check if it is pushed. - // TODO(cdn): may also want to check for MOVs into EBP offsets. - if (register_valid_ && dest && current_instr_.type == libdis::insn_push) { - switch (dest->type) { - case libdis::op_expression: - if (dest->data.expression.base.id == bad_register_.id || - dest->data.expression.index.id == bad_register_.id) - pushed_bad_value_ = true; - break; - case libdis::op_register: - if (dest->data.reg.id == bad_register_.id) - pushed_bad_value_ = true; - break; - default: - break; - } - } - - // Check if a tainted register value is clobbered. - // For conditional MOVs and XCHGs assume that - // there is a hit. - if (register_valid_) { - switch (current_instr_.type) { - case libdis::insn_xor: - if (src && src->type == libdis::op_register && - dest->type == libdis::op_register && - src->data.reg.id == bad_register_.id && - src->data.reg.id == dest->data.reg.id) - register_valid_ = false; - break; - case libdis::insn_pop: - case libdis::insn_mov: - case libdis::insn_movcc: - if (dest && dest->type == libdis::op_register && - dest->data.reg.id == bad_register_.id) - register_valid_ = false; - break; - case libdis::insn_popregs: - register_valid_ = false; - break; - case libdis::insn_xchg: - case libdis::insn_xchgcc: - if (dest && dest->type == libdis::op_register && - src->type == libdis::op_register) { - if (dest->data.reg.id == bad_register_.id) - memcpy(&bad_register_, &src->data.reg, sizeof(libdis::x86_reg_t)); - else if (src->data.reg.id == bad_register_.id) - memcpy(&bad_register_, &dest->data.reg, sizeof(libdis::x86_reg_t)); - } - break; - default: - break; - } - } - - return instr_size; -} - -bool DisassemblerX86::setBadRead() { - if (!instr_valid_) - return false; - - libdis::x86_op_t *operand = libdis::x86_get_src_operand(¤t_instr_); - if (!operand || operand->type != libdis::op_expression) - return false; - - memcpy(&bad_register_, &operand->data.expression.base, - sizeof(libdis::x86_reg_t)); - register_valid_ = true; - return true; -} - -bool DisassemblerX86::setBadWrite() { - if (!instr_valid_) - return false; - - libdis::x86_op_t *operand = libdis::x86_get_dest_operand(¤t_instr_); - if (!operand || operand->type != libdis::op_expression) - return false; - - memcpy(&bad_register_, &operand->data.expression.base, - sizeof(libdis::x86_reg_t)); - register_valid_ = true; - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.h deleted file mode 100644 index 3bdd558f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86.h +++ /dev/null @@ -1,126 +0,0 @@ -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// disassembler_x86.h: Basic x86 bytecode disassembler -// -// Provides a simple disassembler which wraps libdisasm. This allows simple -// tests to be run against bytecode to test for various properties. -// -// Author: Cris Neckar - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_DISASSEMBLER_X86_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_DISASSEMBLER_X86_H_ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace libdis { -#include "third_party/libdisasm/libdis.h" -} - -namespace google_breakpad { - -enum { - DISX86_NONE = 0x0, - DISX86_BAD_BRANCH_TARGET = 0x1, - DISX86_BAD_ARGUMENT_PASSED = 0x2, - DISX86_BAD_WRITE = 0x4, - DISX86_BAD_BLOCK_WRITE = 0x8, - DISX86_BAD_READ = 0x10, - DISX86_BAD_BLOCK_READ = 0x20, - DISX86_BAD_COMPARISON = 0x40 -}; - -class DisassemblerX86 { - public: - // TODO(cdn): Modify this class to take a MemoryRegion instead of just - // a raw buffer. This will make it easier to use this on arbitrary - // minidumps without first copying out the code segment. - DisassemblerX86(const u_int8_t *bytecode, u_int32_t, u_int32_t); - ~DisassemblerX86(); - - // This walks to the next instruction in the memory region and - // sets flags based on the type of instruction and previous state - // including any registers marked as bad through setBadRead() - // or setBadWrite(). This method can be called in a loop to - // disassemble until the end of a region. - u_int32_t NextInstruction(); - - // Indicates whether the current disassembled instruction was valid. - bool currentInstructionValid() { return instr_valid_; } - - // Returns the current instruction as defined in libdis.h, - // or NULL if the current instruction is not valid. - const libdis::x86_insn_t* currentInstruction() { - return instr_valid_ ? ¤t_instr_ : NULL; - } - - // Returns the type of the current instruction as defined in libdis.h. - libdis::x86_insn_group currentInstructionGroup() { - return current_instr_.group; - } - - // Indicates whether a return instruction has been encountered. - bool endOfBlock() { return end_of_block_; } - - // The flags set so far for the disassembly. - u_int16_t flags() { return flags_; } - - // This sets an indicator that the register used to determine - // src or dest for the current instruction is tainted. These can - // be used after examining the current instruction to indicate, - // for example that a bad read or write occurred and the pointer - // stored in the register is currently invalid. - bool setBadRead(); - bool setBadWrite(); - - protected: - const u_int8_t *bytecode_; - u_int32_t size_; - u_int32_t virtual_address_; - u_int32_t current_byte_offset_; - u_int32_t current_inst_offset_; - - bool instr_valid_; - libdis::x86_insn_t current_instr_; - - // TODO(cdn): Maybe also track an expression's index register. - // ex: mov eax, [ebx + ecx]; ebx is base, ecx is index. - bool register_valid_; - libdis::x86_reg_t bad_register_; - - bool pushed_bad_value_; - bool end_of_block_; - - u_int16_t flags_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_DISASSEMBLER_X86_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86_unittest.cc deleted file mode 100644 index b6884c1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/disassembler_x86_unittest.cc +++ /dev/null @@ -1,244 +0,0 @@ -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "breakpad_googletest_includes.h" -#include "processor/disassembler_x86.h" -#include "third_party/libdisasm/libdis.h" - -namespace { - -using google_breakpad::DisassemblerX86; - -unsigned char just_return[] = "\xc3"; // retn - -unsigned char invalid_instruction[] = "\x00"; // invalid - -unsigned char read_eax_jmp_eax[] = - "\x8b\x18" // mov ebx, [eax]; - "\x33\xc9" // xor ebx, ebx; - "\xff\x20" // jmp eax; - "\xc3"; // retn; - -unsigned char write_eax_arg_to_call[] = - "\x89\xa8\x00\x02\x00\x00" // mov [eax+200], ebp; - "\xc1\xeb\x02" // shr ebx, 2; - "\x50" // push eax; - "\xe8\xd1\x24\x77\x88" // call something; - "\xc3"; // retn; - -unsigned char read_edi_stosb[] = - "\x8b\x07" // mov eax, [edi]; - "\x8b\xc8" // mov ecx, eax; - "\xf3\xaa" // rep stosb; - "\xc3"; // retn; - -unsigned char read_clobber_write[] = - "\x03\x18" // add ebx, [eax]; - "\x8b\xc1" // mov eax, ecx; - "\x89\x10" // mov [eax], edx; - "\xc3"; // retn; - -unsigned char read_xchg_write[] = - "\x03\x18" // add ebx, [eax]; - "\x91" // xchg eax, ecx; - "\x89\x18" // mov [eax], ebx; - "\x89\x11" // mov [ecx], edx; - "\xc3"; // retn; - -unsigned char read_cmp[] = - "\x03\x18" // add ebx, [eax]; - "\x83\xf8\x00" // cmp eax, 0; - "\x74\x04" // je +4; - "\xc3"; // retn; - -TEST(DisassemblerX86Test, SimpleReturnInstruction) { - DisassemblerX86 dis(just_return, sizeof(just_return)-1, 0); - EXPECT_EQ(1, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(true, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup()); - const libdis::x86_insn_t* instruction = dis.currentInstruction(); - EXPECT_EQ(libdis::insn_controlflow, instruction->group); - EXPECT_EQ(libdis::insn_return, instruction->type); - EXPECT_EQ(0, dis.NextInstruction()); - EXPECT_EQ(false, dis.currentInstructionValid()); - EXPECT_EQ(NULL, dis.currentInstruction()); -} - -TEST(DisassemblerX86Test, SimpleInvalidInstruction) { - DisassemblerX86 dis(invalid_instruction, sizeof(invalid_instruction)-1, 0); - EXPECT_EQ(0, dis.NextInstruction()); - EXPECT_EQ(false, dis.currentInstructionValid()); -} - -TEST(DisassemblerX86Test, BadReadLeadsToBranch) { - DisassemblerX86 dis(read_eax_jmp_eax, sizeof(read_eax_jmp_eax)-1, 0); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadRead()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_logic, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_BRANCH_TARGET, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup()); -} - -TEST(DisassemblerX86Test, BadWriteLeadsToPushedArg) { - DisassemblerX86 dis(write_eax_arg_to_call, - sizeof(write_eax_arg_to_call)-1, 0); - EXPECT_EQ(6, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadWrite()); - EXPECT_EQ(3, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup()); - EXPECT_EQ(1, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(5, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_ARGUMENT_PASSED, dis.flags()); - EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup()); - EXPECT_EQ(false, dis.endOfBlock()); -} - - -TEST(DisassemblerX86Test, BadReadLeadsToBlockWrite) { - DisassemblerX86 dis(read_edi_stosb, sizeof(read_edi_stosb)-1, 0); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadRead()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_BLOCK_WRITE, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_string, dis.currentInstructionGroup()); -} - -TEST(DisassemblerX86Test, BadReadClobberThenWrite) { - DisassemblerX86 dis(read_clobber_write, sizeof(read_clobber_write)-1, 0); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadRead()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); -} - -TEST(DisassemblerX86Test, BadReadXCHGThenWrite) { - DisassemblerX86 dis(read_xchg_write, sizeof(read_xchg_write)-1, 0); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadRead()); - EXPECT_EQ(1, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_WRITE, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_move, dis.currentInstructionGroup()); -} - -TEST(DisassemblerX86Test, BadReadThenCMP) { - DisassemblerX86 dis(read_cmp, sizeof(read_cmp)-1, 0); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(0, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_arithmetic, dis.currentInstructionGroup()); - EXPECT_EQ(true, dis.setBadRead()); - EXPECT_EQ(3, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_COMPARISON, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_comparison, dis.currentInstructionGroup()); - EXPECT_EQ(2, dis.NextInstruction()); - EXPECT_EQ(true, dis.currentInstructionValid()); - EXPECT_EQ(google_breakpad::DISX86_BAD_COMPARISON, dis.flags()); - EXPECT_EQ(false, dis.endOfBlock()); - EXPECT_EQ(libdis::insn_controlflow, dis.currentInstructionGroup()); -} -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability.cc deleted file mode 100644 index d8821d4b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exploitability_engine.cc: Generic exploitability engine. -// -// See exploitable_engine.h for documentation. -// -// Author: Cris Neckar - - -#include - -#include "google_breakpad/processor/exploitability.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/process_state.h" -#include "processor/exploitability_win.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -Exploitability::Exploitability(Minidump *dump, - ProcessState *process_state) - : dump_(dump), - process_state_(process_state) {} - -ExploitabilityRating Exploitability::CheckExploitability() { - return CheckPlatformExploitability(); -} - -Exploitability *Exploitability::ExploitabilityForPlatform( - Minidump *dump, - ProcessState *process_state) { - Exploitability *platform_exploitability = NULL; - MinidumpSystemInfo *minidump_system_info = dump->GetSystemInfo(); - if (!minidump_system_info) - return NULL; - - const MDRawSystemInfo *raw_system_info = - minidump_system_info->system_info(); - if (!raw_system_info) - return NULL; - - switch (raw_system_info->platform_id) { - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: { - platform_exploitability = new ExploitabilityWin(dump, - process_state); - break; - } - case MD_OS_MAC_OS_X: - case MD_OS_LINUX: - case MD_OS_UNIX: - case MD_OS_SOLARIS: - default: { - platform_exploitability = NULL; - break; - } - } - - BPLOG_IF(ERROR, !platform_exploitability) << - "No Exploitability module for platform: " << - process_state->system_info()->os; - return platform_exploitability; -} - -bool Exploitability::AddressIsAscii(u_int64_t address) { - for (int i = 0; i < 8; i++) { - u_int8_t byte = (address >> (8*i)) & 0xff; - if ((byte >= ' ' && byte <= '~') || byte == 0) - continue; - return false; - } - return true; -} - -} // namespace google_breakpad - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_unittest.cc deleted file mode 100644 index 4de6f1d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_unittest.cc +++ /dev/null @@ -1,255 +0,0 @@ -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { -class MockMinidump : public Minidump { - public: - MockMinidump() : Minidump("") { - } - - MOCK_METHOD0(Read, bool()); - MOCK_CONST_METHOD0(path, string()); - MOCK_CONST_METHOD0(header, const MDRawHeader*()); - MOCK_METHOD0(GetThreadList, MinidumpThreadList*()); -}; -} - -namespace { - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::MinidumpProcessor; -using google_breakpad::MinidumpThreadList; -using google_breakpad::MinidumpThread; -using google_breakpad::MockMinidump; -using google_breakpad::ProcessState; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; -using std::string; - -class TestSymbolSupplier : public SymbolSupplier { - public: - TestSymbolSupplier() : interrupt_(false) {} - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data); - - virtual void FreeSymbolData(const CodeModule *module) { } - // When set to true, causes the SymbolSupplier to return INTERRUPT - void set_interrupt(bool interrupt) { interrupt_ = interrupt; } - - private: - bool interrupt_; -}; - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - - if (interrupt_) { - return INTERRUPT; - } - - return NOT_FOUND; -} - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetCStringSymbolData( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) { - return GetSymbolFile(module, system_info, symbol_file); -} - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - return GetSymbolFile(module, system_info, symbol_file); -} - -TEST(ExploitabilityTest, TestWindowsEngine) { - TestSymbolSupplier supplier; - BasicSourceLineResolver resolver; - MinidumpProcessor processor(&supplier, &resolver, true); - ProcessState state; - - string minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av_block_write.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av_clobber_write.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av_conditional.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av_then_jmp.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_read_av_xchg_write.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_write_av.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/ascii_write_av_arg_to_call.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/null_read_av.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_NONE, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/null_write_av.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_NONE, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/stack_exhaustion.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_NONE, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/exec_av_on_stack.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/write_av_non_null.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABLITY_MEDIUM, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/read_av_non_null.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_LOW, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/read_av_clobber_write.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_LOW, - state.exploitability()); - - minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/read_av_conditional.dmp"; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_LOW, - state.exploitability()); -} -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.cc deleted file mode 100644 index 443635fb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.cc +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exploitability_win.cc: Windows specific exploitability engine. -// -// Provides a guess at the exploitability of the crash for the Windows -// platform given a minidump and process_state. -// -// Author: Cris Neckar - -#include - -#include "processor/exploitability_win.h" - -#include "google_breakpad/common/minidump_exception_win32.h" -#include "google_breakpad/processor/minidump.h" -#include "processor/disassembler_x86.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -#include "third_party/libdisasm/libdis.h" - -namespace google_breakpad { - -// The cutoff that we use to judge if and address is likely an offset -// from various interesting addresses. -static const u_int64_t kProbableNullOffset = 4096; -static const u_int64_t kProbableStackOffset = 8192; - -// The various cutoffs for the different ratings. -static const size_t kHighCutoff = 100; -static const size_t kMediumCutoff = 80; -static const size_t kLowCutoff = 50; -static const size_t kInterestingCutoff = 25; - -// Predefined incremental values for conditional weighting. -static const size_t kTinyBump = 5; -static const size_t kSmallBump = 20; -static const size_t kMediumBump = 50; -static const size_t kLargeBump = 70; -static const size_t kHugeBump = 90; - -// The maximum number of bytes to disassemble past the program counter. -static const size_t kDisassembleBytesBeyondPC = 2048; - -ExploitabilityWin::ExploitabilityWin(Minidump *dump, - ProcessState *process_state) - : Exploitability(dump, process_state) { } - -ExploitabilityRating ExploitabilityWin::CheckPlatformExploitability() { - MinidumpException *exception = dump_->GetException(); - if (!exception) { - BPLOG(INFO) << "Minidump does not have exception record."; - return EXPLOITABILITY_ERR_PROCESSING; - } - - const MDRawExceptionStream *raw_exception = exception->exception(); - if (!raw_exception) { - BPLOG(INFO) << "Could not obtain raw exception info."; - return EXPLOITABILITY_ERR_PROCESSING; - } - - const MinidumpContext *context = exception->GetContext(); - if (!context) { - BPLOG(INFO) << "Could not obtain exception context."; - return EXPLOITABILITY_ERR_PROCESSING; - } - - MinidumpMemoryList *memory_list = dump_->GetMemoryList(); - bool memory_available = true; - if (!memory_list) { - BPLOG(INFO) << "Minidump memory segments not available."; - memory_available = false; - } - u_int64_t address = process_state_->crash_address(); - u_int32_t exception_code = raw_exception->exception_record.exception_code; - - u_int32_t exploitability_weight = 0; - - u_int64_t stack_ptr = 0; - u_int64_t instruction_ptr = 0; - u_int64_t this_ptr = 0; - - switch (context->GetContextCPU()) { - case MD_CONTEXT_X86: - stack_ptr = context->GetContextX86()->esp; - instruction_ptr = context->GetContextX86()->eip; - this_ptr = context->GetContextX86()->ecx; - break; - case MD_CONTEXT_AMD64: - stack_ptr = context->GetContextAMD64()->rsp; - instruction_ptr = context->GetContextAMD64()->rip; - this_ptr = context->GetContextAMD64()->rcx; - break; - default: - BPLOG(INFO) << "Unsupported architecture."; - return EXPLOITABILITY_ERR_PROCESSING; - } - - // Check if we are executing on the stack. - if (instruction_ptr <= (stack_ptr + kProbableStackOffset) && - instruction_ptr >= (stack_ptr - kProbableStackOffset)) - exploitability_weight += kHugeBump; - - switch (exception_code) { - // This is almost certainly recursion. - case MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW: - exploitability_weight += kTinyBump; - break; - - // These exceptions tend to be benign and we can generally ignore them. - case MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO: - case MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW: - case MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO: - case MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT: - case MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW: - case MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW: - case MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR: - exploitability_weight += kTinyBump; - break; - - // These exceptions will typically mean that we have jumped where we - // shouldn't. - case MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION: - case MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION: - case MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION: - exploitability_weight += kLargeBump; - break; - - // These represent bugs in exception handlers. - case MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION: - case MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION: - exploitability_weight += kSmallBump; - break; - - case MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION: - case MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN: - exploitability_weight += kHugeBump; - break; - - case MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION: - exploitability_weight += kLargeBump; - break; - - case MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION: - bool near_null = (address <= kProbableNullOffset); - bool bad_read = false; - bool bad_write = false; - if (raw_exception->exception_record.number_parameters >= 1) { - MDAccessViolationTypeWin av_type = - static_cast - (raw_exception->exception_record.exception_information[0]); - switch (av_type) { - case MD_ACCESS_VIOLATION_WIN_READ: - bad_read = true; - if (near_null) - exploitability_weight += kSmallBump; - else - exploitability_weight += kMediumBump; - break; - case MD_ACCESS_VIOLATION_WIN_WRITE: - bad_write = true; - if (near_null) - exploitability_weight += kSmallBump; - else - exploitability_weight += kHugeBump; - break; - case MD_ACCESS_VIOLATION_WIN_EXEC: - if (near_null) - exploitability_weight += kSmallBump; - else - exploitability_weight += kHugeBump; - break; - default: - BPLOG(INFO) << "Unrecognized access violation type."; - return EXPLOITABILITY_ERR_PROCESSING; - break; - } - MinidumpMemoryRegion *instruction_region = 0; - if (memory_available) { - instruction_region = - memory_list->GetMemoryRegionForAddress(instruction_ptr); - } - if (!near_null && instruction_region && - context->GetContextCPU() == MD_CONTEXT_X86 && - (bad_read || bad_write)) { - // Perform checks related to memory around instruction pointer. - u_int32_t memory_offset = - instruction_ptr - instruction_region->GetBase(); - u_int32_t available_memory = - instruction_region->GetSize() - memory_offset; - available_memory = available_memory > kDisassembleBytesBeyondPC ? - kDisassembleBytesBeyondPC : available_memory; - if (available_memory) { - const u_int8_t *raw_memory = - instruction_region->GetMemory() + memory_offset; - DisassemblerX86 disassembler(raw_memory, - available_memory, - instruction_ptr); - disassembler.NextInstruction(); - if (bad_read) - disassembler.setBadRead(); - else - disassembler.setBadWrite(); - if (disassembler.currentInstructionValid()) { - // Check if the faulting instruction falls into one of - // several interesting groups. - switch (disassembler.currentInstructionGroup()) { - case libdis::insn_controlflow: - exploitability_weight += kLargeBump; - break; - case libdis::insn_string: - exploitability_weight += kHugeBump; - break; - default: - break; - } - // Loop the disassembler through the code and check if it - // IDed any interesting conditions in the near future. - // Multiple flags may be set so treat each equally. - while (disassembler.NextInstruction() && - disassembler.currentInstructionValid() && - !disassembler.endOfBlock()) - continue; - if (disassembler.flags() & DISX86_BAD_BRANCH_TARGET) - exploitability_weight += kLargeBump; - if (disassembler.flags() & DISX86_BAD_ARGUMENT_PASSED) - exploitability_weight += kTinyBump; - if (disassembler.flags() & DISX86_BAD_WRITE) - exploitability_weight += kMediumBump; - if (disassembler.flags() & DISX86_BAD_BLOCK_WRITE) - exploitability_weight += kMediumBump; - if (disassembler.flags() & DISX86_BAD_READ) - exploitability_weight += kTinyBump; - if (disassembler.flags() & DISX86_BAD_BLOCK_READ) - exploitability_weight += kTinyBump; - if (disassembler.flags() & DISX86_BAD_COMPARISON) - exploitability_weight += kTinyBump; - } - } - } - if (!near_null && AddressIsAscii(address)) - exploitability_weight += kMediumBump; - } else { - BPLOG(INFO) << "Access violation type parameter missing."; - return EXPLOITABILITY_ERR_PROCESSING; - } - } - - // Based on the calculated weight we return a simplified classification. - BPLOG(INFO) << "Calculated exploitability weight: " << exploitability_weight; - if (exploitability_weight >= kHighCutoff) - return EXPLOITABILITY_HIGH; - if (exploitability_weight >= kMediumCutoff) - return EXPLOITABLITY_MEDIUM; - if (exploitability_weight >= kLowCutoff) - return EXPLOITABILITY_LOW; - if (exploitability_weight >= kInterestingCutoff) - return EXPLOITABILITY_INTERESTING; - - return EXPLOITABILITY_NONE; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.h deleted file mode 100644 index 4e08aef0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/exploitability_win.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exploitability_win.h: Windows specific exploitability engine. -// -// Provides a guess at the exploitability of the crash for the Windows -// platform given a minidump and process_state. -// -// Author: Cris Neckar - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/exploitability.h" - -namespace google_breakpad { - -class ExploitabilityWin : public Exploitability { - public: - ExploitabilityWin(Minidump *dump, - ProcessState *process_state); - - virtual ExploitabilityRating CheckPlatformExploitability(); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver.cc deleted file mode 100644 index 45c1f0f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver.cc +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// fast_source_line_resolver.cc: FastSourceLineResolver is a concrete class that -// implements SourceLineResolverInterface. Both FastSourceLineResolver and -// BasicSourceLineResolver inherit from SourceLineResolverBase class to reduce -// code redundancy. -// -// See fast_source_line_resolver.h and fast_source_line_resolver_types.h -// for more documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include "google_breakpad/processor/fast_source_line_resolver.h" -#include "processor/fast_source_line_resolver_types.h" - -#include -#include - -#include "processor/module_factory.h" -#include "processor/scoped_ptr.h" - -using std::map; -using std::make_pair; - -namespace google_breakpad { - -FastSourceLineResolver::FastSourceLineResolver() - : SourceLineResolverBase(new FastModuleFactory) { } - -bool FastSourceLineResolver::ShouldDeleteMemoryBufferAfterLoadModule() { - return false; -} - -void FastSourceLineResolver::Module::LookupAddress(StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - - // First, look for a FUNC record that covers address. Use - // RetrieveNearestRange instead of RetrieveRange so that, if there - // is no such function, we can use the next function to bound the - // extent of the PUBLIC symbol we find, below. This does mean we - // need to check that address indeed falls within the function we - // find; do the range comparison in an overflow-friendly way. - scoped_ptr func(new Function); - const Function* func_ptr = 0; - scoped_ptr public_symbol(new PublicSymbol); - const PublicSymbol* public_symbol_ptr = 0; - MemAddr function_base; - MemAddr function_size; - MemAddr public_address; - - if (functions_.RetrieveNearestRange(address, func_ptr, - &function_base, &function_size) && - address >= function_base && address - function_base < function_size) { - func.get()->CopyFrom(func_ptr); - frame->function_name = func->name; - frame->function_base = frame->module->base_address() + function_base; - - scoped_ptr line(new Line); - const Line* line_ptr = 0; - MemAddr line_base; - if (func->lines.RetrieveRange(address, line_ptr, &line_base, NULL)) { - line.get()->CopyFrom(line_ptr); - FileMap::iterator it = files_.find(line->source_file_id); - if (it != files_.end()) { - frame->source_file_name = - files_.find(line->source_file_id).GetValuePtr(); - } - frame->source_line = line->line; - frame->source_line_base = frame->module->base_address() + line_base; - } - } else if (public_symbols_.Retrieve(address, - public_symbol_ptr, &public_address) && - (!func_ptr || public_address > function_base)) { - public_symbol.get()->CopyFrom(public_symbol_ptr); - frame->function_name = public_symbol->name; - frame->function_base = frame->module->base_address() + public_address; - } -} - -// WFI: WindowsFrameInfo. -// Returns a WFI object reading from a raw memory chunk of data -WindowsFrameInfo FastSourceLineResolver::CopyWFI(const char *raw) { - // The first 4Bytes of int data are unused. - // They corresponds to "int valid;" data member of WFI. - const u_int32_t *para_uint32 = reinterpret_cast( - raw + sizeof(int32_t)); - - u_int32_t prolog_size = para_uint32[0];; - u_int32_t epilog_size = para_uint32[1]; - u_int32_t parameter_size = para_uint32[2]; - u_int32_t saved_register_size = para_uint32[3]; - u_int32_t local_size = para_uint32[4]; - u_int32_t max_stack_size = para_uint32[5]; - const char *boolean = reinterpret_cast(para_uint32 + 6); - bool allocates_base_pointer = (*boolean != 0); - std::string program_string = boolean + 1; - - return WindowsFrameInfo(prolog_size, - epilog_size, - parameter_size, - saved_register_size, - local_size, - max_stack_size, - allocates_base_pointer, - program_string); -} - -// Loads a map from the given buffer in char* type. -// Does NOT take ownership of mem_buffer. -// In addition, treat mem_buffer as const char*. -bool FastSourceLineResolver::Module::LoadMapFromMemory(char *mem_buffer) { - if (!mem_buffer) return false; - - const u_int32_t *map_sizes = reinterpret_cast(mem_buffer); - - unsigned int header_size = kNumberMaps_ * sizeof(unsigned int); - - // offsets[]: an array of offset addresses (with respect to mem_buffer), - // for each "Static***Map" component of Module. - // "Static***Map": static version of std::map or map wrapper, i.e., StaticMap, - // StaticAddressMap, StaticContainedRangeMap, and StaticRangeMap. - unsigned int offsets[kNumberMaps_]; - offsets[0] = header_size; - for (int i = 1; i < kNumberMaps_; ++i) { - offsets[i] = offsets[i - 1] + map_sizes[i - 1]; - } - - // Use pointers to construct Static*Map data members in Module: - int map_id = 0; - files_ = StaticMap(mem_buffer + offsets[map_id++]); - functions_ = - StaticRangeMap(mem_buffer + offsets[map_id++]); - public_symbols_ = - StaticAddressMap(mem_buffer + offsets[map_id++]); - for (int i = 0; i < WindowsFrameInfo::STACK_INFO_LAST; ++i) - windows_frame_info_[i] = - StaticContainedRangeMap(mem_buffer + offsets[map_id++]); - - cfi_initial_rules_ = - StaticRangeMap(mem_buffer + offsets[map_id++]); - cfi_delta_rules_ = StaticMap(mem_buffer + offsets[map_id++]); - - return true; -} - -WindowsFrameInfo *FastSourceLineResolver::Module::FindWindowsFrameInfo( - const StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - scoped_ptr result(new WindowsFrameInfo()); - - // We only know about WindowsFrameInfo::STACK_INFO_FRAME_DATA and - // WindowsFrameInfo::STACK_INFO_FPO. Prefer them in this order. - // WindowsFrameInfo::STACK_INFO_FRAME_DATA is the newer type that - // includes its own program string. - // WindowsFrameInfo::STACK_INFO_FPO is the older type - // corresponding to the FPO_DATA struct. See stackwalker_x86.cc. - const char* frame_info_ptr; - if ((windows_frame_info_[WindowsFrameInfo::STACK_INFO_FRAME_DATA] - .RetrieveRange(address, frame_info_ptr)) - || (windows_frame_info_[WindowsFrameInfo::STACK_INFO_FPO] - .RetrieveRange(address, frame_info_ptr))) { - result->CopyFrom(CopyWFI(frame_info_ptr)); - return result.release(); - } - - // Even without a relevant STACK line, many functions contain - // information about how much space their parameters consume on the - // stack. Use RetrieveNearestRange instead of RetrieveRange, so that - // we can use the function to bound the extent of the PUBLIC symbol, - // below. However, this does mean we need to check that ADDRESS - // falls within the retrieved function's range; do the range - // comparison in an overflow-friendly way. - scoped_ptr function(new Function); - const Function* function_ptr = 0; - MemAddr function_base, function_size; - if (functions_.RetrieveNearestRange(address, function_ptr, - &function_base, &function_size) && - address >= function_base && address - function_base < function_size) { - function.get()->CopyFrom(function_ptr); - result->parameter_size = function->parameter_size; - result->valid |= WindowsFrameInfo::VALID_PARAMETER_SIZE; - return result.release(); - } - - // PUBLIC symbols might have a parameter size. Use the function we - // found above to limit the range the public symbol covers. - scoped_ptr public_symbol(new PublicSymbol); - const PublicSymbol* public_symbol_ptr = 0; - MemAddr public_address; - if (public_symbols_.Retrieve(address, public_symbol_ptr, &public_address) && - (!function_ptr || public_address > function_base)) { - public_symbol.get()->CopyFrom(public_symbol_ptr); - result->parameter_size = public_symbol->parameter_size; - } - - return NULL; -} - -CFIFrameInfo *FastSourceLineResolver::Module::FindCFIFrameInfo( - const StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - MemAddr initial_base, initial_size; - const char* initial_rules = NULL; - - // Find the initial rule whose range covers this address. That - // provides an initial set of register recovery rules. Then, walk - // forward from the initial rule's starting address to frame's - // instruction address, applying delta rules. - if (!cfi_initial_rules_.RetrieveRange(address, initial_rules, - &initial_base, &initial_size)) { - return NULL; - } - - // Create a frame info structure, and populate it with the rules from - // the STACK CFI INIT record. - scoped_ptr rules(new CFIFrameInfo()); - if (!ParseCFIRuleSet(initial_rules, rules.get())) - return NULL; - - // Find the first delta rule that falls within the initial rule's range. - StaticMap::iterator delta = - cfi_delta_rules_.lower_bound(initial_base); - - // Apply delta rules up to and including the frame's address. - while (delta != cfi_delta_rules_.end() && delta.GetKey() <= address) { - ParseCFIRuleSet(delta.GetValuePtr(), rules.get()); - delta++; - } - - return rules.release(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_types.h deleted file mode 100644 index c4cec60f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_types.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// fast_source_line_resolver_types.h: definition of nested classes/structs in -// FastSourceLineResolver. It moves the definitions out of -// fast_source_line_resolver.cc, so that other classes could have access -// to these private nested types without including fast_source_line_resolver.cc -// -// Author: lambxsy@google.com (Siyang Xie) - -#ifndef PROCESSOR_FAST_SOURCE_LINE_RESOLVER_TYPES_H__ -#define PROCESSOR_FAST_SOURCE_LINE_RESOLVER_TYPES_H__ - -#include "google_breakpad/processor/fast_source_line_resolver.h" -#include "processor/source_line_resolver_base_types.h" - -#include -#include - -#include "google_breakpad/processor/stack_frame.h" -#include "processor/cfi_frame_info.h" -#include "processor/static_address_map-inl.h" -#include "processor/static_contained_range_map-inl.h" -#include "processor/static_map.h" -#include "processor/static_range_map-inl.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -struct FastSourceLineResolver::Line : public SourceLineResolverBase::Line { - void CopyFrom(const Line *line_ptr) { - const char *raw = reinterpret_cast(line_ptr); - CopyFrom(raw); - } - - // De-serialize the memory data of a Line. - void CopyFrom(const char *raw) { - address = *(reinterpret_cast(raw)); - size = *(reinterpret_cast(raw + sizeof(address))); - source_file_id = *(reinterpret_cast( - raw + 2 * sizeof(address))); - line = *(reinterpret_cast( - raw + 2 * sizeof(address) + sizeof(source_file_id))); - } -}; - -struct FastSourceLineResolver::Function : -public SourceLineResolverBase::Function { - void CopyFrom(const Function *func_ptr) { - const char *raw = reinterpret_cast(func_ptr); - CopyFrom(raw); - } - - // De-serialize the memory data of a Function. - void CopyFrom(const char *raw) { - size_t name_size = strlen(raw) + 1; - name = raw; - address = *(reinterpret_cast(raw + name_size)); - size = *(reinterpret_cast( - raw + name_size + sizeof(MemAddr))); - parameter_size = *(reinterpret_cast( - raw + name_size + 2 * sizeof(MemAddr))); - lines = StaticRangeMap( - raw + name_size + 2 * sizeof(MemAddr) + sizeof(int32_t)); - } - - StaticRangeMap lines; -}; - -struct FastSourceLineResolver::PublicSymbol : -public SourceLineResolverBase::PublicSymbol { - void CopyFrom(const PublicSymbol *public_symbol_ptr) { - const char *raw = reinterpret_cast(public_symbol_ptr); - CopyFrom(raw); - } - - // De-serialize the memory data of a PublicSymbol. - void CopyFrom(const char *raw) { - size_t name_size = strlen(raw) + 1; - name = raw; - address = *(reinterpret_cast(raw + name_size)); - parameter_size = *(reinterpret_cast( - raw + name_size + sizeof(MemAddr))); - } -}; - -class FastSourceLineResolver::Module: public SourceLineResolverBase::Module { - public: - explicit Module(const string &name) : name_(name) { } - virtual ~Module() { } - - // Looks up the given relative address, and fills the StackFrame struct - // with the result. - virtual void LookupAddress(StackFrame *frame) const; - - // Loads a map from the given buffer in char* type. - virtual bool LoadMapFromMemory(char *memory_buffer); - - // If Windows stack walking information is available covering ADDRESS, - // return a WindowsFrameInfo structure describing it. If the information - // is not available, returns NULL. A NULL return value does not indicate - // an error. The caller takes ownership of any returned WindowsFrameInfo - // object. - virtual WindowsFrameInfo *FindWindowsFrameInfo(const StackFrame *frame) const; - - // If CFI stack walking information is available covering ADDRESS, - // return a CFIFrameInfo structure describing it. If the information - // is not available, return NULL. The caller takes ownership of any - // returned CFIFrameInfo object. - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame) const; - - // Number of serialized map components of Module. - static const int kNumberMaps_ = 5 + WindowsFrameInfo::STACK_INFO_LAST; - - private: - friend class FastSourceLineResolver; - friend class ModuleComparer; - typedef StaticMap FileMap; - - string name_; - StaticMap files_; - StaticRangeMap functions_; - StaticAddressMap public_symbols_; - - // Each element in the array is a ContainedRangeMap for a type - // listed in WindowsFrameInfoTypes. These are split by type because - // there may be overlaps between maps of different types, but some - // information is only available as certain types. - StaticContainedRangeMap - windows_frame_info_[WindowsFrameInfo::STACK_INFO_LAST]; - - // DWARF CFI stack walking data. The Module stores the initial rule sets - // and rule deltas as strings, just as they appear in the symbol file: - // although the file may contain hundreds of thousands of STACK CFI - // records, walking a stack will only ever use a few of them, so it's - // best to delay parsing a record until it's actually needed. - // - // STACK CFI INIT records: for each range, an initial set of register - // recovery rules. The RangeMap's itself gives the starting and ending - // addresses. - StaticRangeMap cfi_initial_rules_; - - // STACK CFI records: at a given address, the changes to the register - // recovery rules that take effect at that address. The map key is the - // starting address; the ending address is the key of the next entry in - // this map, or the end of the range as given by the cfi_initial_rules_ - // entry (which FindCFIFrameInfo looks up first). - StaticMap cfi_delta_rules_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_FAST_SOURCE_LINE_RESOLVER_TYPES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_unittest.cc deleted file mode 100644 index a4a92097..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/fast_source_line_resolver_unittest.cc +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// fast_source_line_resolver_unittest.cc: Unit tests for FastSourceLineResolver. -// Two different approaches for testing fast source line resolver: -// First, use the same unit test data for basic source line resolver. -// Second, read data from symbol files, load them as basic modules, and then -// serialize them and load the serialized data as fast modules. Then compare -// modules to assure the fast module contains exactly the same data as -// basic module. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" -#include "processor/module_serializer.h" -#include "processor/module_comparer.h" - -namespace { - -using std::string; -using google_breakpad::SourceLineResolverBase; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::FastSourceLineResolver; -using google_breakpad::ModuleSerializer; -using google_breakpad::ModuleComparer; -using google_breakpad::CFIFrameInfo; -using google_breakpad::CodeModule; -using google_breakpad::MemoryRegion; -using google_breakpad::StackFrame; -using google_breakpad::WindowsFrameInfo; -using google_breakpad::linked_ptr; -using google_breakpad::scoped_ptr; - -class TestCodeModule : public CodeModule { - public: - explicit TestCodeModule(string code_file) : code_file_(code_file) {} - virtual ~TestCodeModule() {} - - virtual u_int64_t base_address() const { return 0; } - virtual u_int64_t size() const { return 0xb000; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return ""; } - virtual string debug_file() const { return ""; } - virtual string debug_identifier() const { return ""; } - virtual string version() const { return ""; } - virtual const CodeModule* Copy() const { - return new TestCodeModule(code_file_); - } - - private: - string code_file_; -}; - -// A mock memory region object, for use by the STACK CFI tests. -class MockMemoryRegion: public MemoryRegion { - u_int64_t GetBase() const { return 0x10000; } - u_int32_t GetSize() const { return 0x01000; } - bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) const { - *value = address & 0xff; - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) const { - *value = address & 0xffff; - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) const { - switch (address) { - case 0x10008: *value = 0x98ecadc3; break; // saved %ebx - case 0x1000c: *value = 0x878f7524; break; // saved %esi - case 0x10010: *value = 0x6312f9a5; break; // saved %edi - case 0x10014: *value = 0x10038; break; // caller's %ebp - case 0x10018: *value = 0xf6438648; break; // return address - default: *value = 0xdeadbeef; break; // junk - } - return true; - } - bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) const { - *value = address; - return true; - } -}; - -// Verify that, for every association in ACTUAL, EXPECTED has the same -// association. (That is, ACTUAL's associations should be a subset of -// EXPECTED's.) Also verify that ACTUAL has associations for ".ra" and -// ".cfa". -static bool VerifyRegisters( - const char *file, int line, - const CFIFrameInfo::RegisterValueMap &expected, - const CFIFrameInfo::RegisterValueMap &actual) { - CFIFrameInfo::RegisterValueMap::const_iterator a; - a = actual.find(".cfa"); - if (a == actual.end()) - return false; - a = actual.find(".ra"); - if (a == actual.end()) - return false; - for (a = actual.begin(); a != actual.end(); a++) { - CFIFrameInfo::RegisterValueMap::const_iterator e = - expected.find(a->first); - if (e == expected.end()) { - fprintf(stderr, "%s:%d: unexpected register '%s' recovered, value 0x%x\n", - file, line, a->first.c_str(), a->second); - return false; - } - if (e->second != a->second) { - fprintf(stderr, - "%s:%d: register '%s' recovered value was 0x%x, expected 0x%x\n", - file, line, a->first.c_str(), a->second, e->second); - return false; - } - // Don't complain if this doesn't recover all registers. Although - // the DWARF spec says that unmentioned registers are undefined, - // GCC uses omission to mean that they are unchanged. - } - return true; -} - -static bool VerifyEmpty(const StackFrame &frame) { - if (frame.function_name.empty() && - frame.source_file_name.empty() && - frame.source_line == 0) - return true; - return false; -} - -static void ClearSourceLineInfo(StackFrame *frame) { - frame->function_name.clear(); - frame->module = NULL; - frame->source_file_name.clear(); - frame->source_line = 0; -} - -class TestFastSourceLineResolver : public ::testing::Test { - public: - void SetUp() { - testdata_dir = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata"; - } - - string symbol_file(int file_index) { - std::stringstream ss; - ss << testdata_dir << "/module" << file_index << ".out"; - return ss.str(); - } - - ModuleSerializer serializer; - BasicSourceLineResolver basic_resolver; - FastSourceLineResolver fast_resolver; - ModuleComparer module_comparer; - - string testdata_dir; -}; - -// Test adapted from basic_source_line_resolver_unittest. -TEST_F(TestFastSourceLineResolver, TestLoadAndResolve) { - TestCodeModule module1("module1"); - ASSERT_TRUE(basic_resolver.LoadModule(&module1, symbol_file(1))); - ASSERT_TRUE(basic_resolver.HasModule(&module1)); - // Convert module1 to fast_module: - ASSERT_TRUE(serializer.ConvertOneModule( - module1.code_file(), &basic_resolver, &fast_resolver)); - ASSERT_TRUE(fast_resolver.HasModule(&module1)); - - TestCodeModule module2("module2"); - ASSERT_TRUE(basic_resolver.LoadModule(&module2, symbol_file(2))); - ASSERT_TRUE(basic_resolver.HasModule(&module2)); - // Convert module2 to fast_module: - ASSERT_TRUE(serializer.ConvertOneModule( - module2.code_file(), &basic_resolver, &fast_resolver)); - ASSERT_TRUE(fast_resolver.HasModule(&module2)); - - StackFrame frame; - scoped_ptr windows_frame_info; - scoped_ptr cfi_frame_info; - frame.instruction = 0x1000; - frame.module = NULL; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_FALSE(frame.module); - ASSERT_TRUE(frame.function_name.empty()); - ASSERT_EQ(frame.function_base, 0); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - ASSERT_EQ(frame.source_line_base, 0); - - frame.module = &module1; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_1"); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module1"); - ASSERT_EQ(frame.function_base, 0x1000); - ASSERT_EQ(frame.source_file_name, "file1_1.cc"); - ASSERT_EQ(frame.source_line, 44); - ASSERT_EQ(frame.source_line_base, 0x1000); - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_EQ(windows_frame_info->program_string, - "$eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ ="); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x800; - frame.module = &module1; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_TRUE(VerifyEmpty(frame)); - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_FALSE(windows_frame_info.get()); - - frame.instruction = 0x1280; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_3"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_TRUE(windows_frame_info->program_string.empty()); - - frame.instruction = 0x1380; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function1_4"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_FALSE(windows_frame_info->allocates_base_pointer); - ASSERT_FALSE(windows_frame_info->program_string.empty()); - - frame.instruction = 0x2000; - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_FALSE(windows_frame_info.get()); - - // module1 has STACK CFI records covering 3d40..3def; - // module2 has STACK CFI records covering 3df0..3e9f; - // check that FindCFIFrameInfo doesn't claim to find any outside those ranges. - frame.instruction = 0x3d3f; - frame.module = &module1; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_FALSE(cfi_frame_info.get()); - - frame.instruction = 0x3e9f; - frame.module = &module1; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_FALSE(cfi_frame_info.get()); - - CFIFrameInfo::RegisterValueMap current_registers; - CFIFrameInfo::RegisterValueMap caller_registers; - CFIFrameInfo::RegisterValueMap expected_caller_registers; - MockMemoryRegion memory; - - // Regardless of which instruction evaluation takes place at, it - // should produce the same values for the caller's registers. - expected_caller_registers[".cfa"] = 0x1001c; - expected_caller_registers[".ra"] = 0xf6438648; - expected_caller_registers["$ebp"] = 0x10038; - expected_caller_registers["$ebx"] = 0x98ecadc3; - expected_caller_registers["$esi"] = 0x878f7524; - expected_caller_registers["$edi"] = 0x6312f9a5; - - frame.instruction = 0x3d40; - frame.module = &module1; - current_registers.clear(); - current_registers["$esp"] = 0x10018; - current_registers["$ebp"] = 0x10038; - current_registers["$ebx"] = 0x98ecadc3; - current_registers["$esi"] = 0x878f7524; - current_registers["$edi"] = 0x6312f9a5; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - ASSERT_TRUE(VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers)); - - frame.instruction = 0x3d41; - current_registers["$esp"] = 0x10014; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - ASSERT_TRUE(VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers)); - - frame.instruction = 0x3d43; - current_registers["$ebp"] = 0x10014; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d54; - current_registers["$ebx"] = 0x6864f054U; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d5a; - current_registers["$esi"] = 0x6285f79aU; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x3d84; - current_registers["$edi"] = 0x64061449U; - cfi_frame_info.reset(fast_resolver.FindCFIFrameInfo(&frame)); - ASSERT_TRUE(cfi_frame_info.get()); - ASSERT_TRUE(cfi_frame_info.get() - ->FindCallerRegs(current_registers, memory, - &caller_registers)); - VerifyRegisters(__FILE__, __LINE__, - expected_caller_registers, caller_registers); - - frame.instruction = 0x2900; - frame.module = &module1; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, string("PublicSymbol")); - - frame.instruction = 0x4000; - frame.module = &module1; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, string("LargeFunction")); - - frame.instruction = 0x2181; - frame.module = &module2; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Function2_2"); - ASSERT_EQ(frame.function_base, 0x2170); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module2"); - ASSERT_EQ(frame.source_file_name, "file2_2.cc"); - ASSERT_EQ(frame.source_line, 21); - ASSERT_EQ(frame.source_line_base, 0x2180); - windows_frame_info.reset(fast_resolver.FindWindowsFrameInfo(&frame)); - ASSERT_TRUE(windows_frame_info.get()); - ASSERT_EQ(windows_frame_info->prolog_size, 1); - - frame.instruction = 0x216f; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_1"); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x219f; - frame.module = &module2; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_TRUE(frame.function_name.empty()); - - frame.instruction = 0x21a0; - frame.module = &module2; - fast_resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_2"); -} - -TEST_F(TestFastSourceLineResolver, TestInvalidLoads) { - TestCodeModule module3("module3"); - ASSERT_FALSE(basic_resolver.LoadModule(&module3, - testdata_dir + "/module3_bad.out")); - ASSERT_FALSE(basic_resolver.HasModule(&module3)); - // Convert module3 to fast_module: - ASSERT_FALSE(serializer.ConvertOneModule(module3.code_file(), - &basic_resolver, - &fast_resolver)); - ASSERT_FALSE(fast_resolver.HasModule(&module3)); - - TestCodeModule module4("module4"); - ASSERT_FALSE(basic_resolver.LoadModule(&module4, - testdata_dir + "/module4_bad.out")); - ASSERT_FALSE(basic_resolver.HasModule(&module4)); - // Convert module4 to fast_module: - ASSERT_FALSE(serializer.ConvertOneModule(module4.code_file(), - &basic_resolver, - &fast_resolver)); - ASSERT_FALSE(fast_resolver.HasModule(&module4)); - - TestCodeModule module5("module5"); - ASSERT_FALSE(fast_resolver.LoadModule(&module5, - testdata_dir + "/invalid-filename")); - ASSERT_FALSE(fast_resolver.HasModule(&module5)); - - TestCodeModule invalidmodule("invalid-module"); - ASSERT_FALSE(fast_resolver.HasModule(&invalidmodule)); -} - -TEST_F(TestFastSourceLineResolver, TestUnload) { - TestCodeModule module1("module1"); - ASSERT_FALSE(basic_resolver.HasModule(&module1)); - - ASSERT_TRUE(basic_resolver.LoadModule(&module1, symbol_file(1))); - ASSERT_TRUE(basic_resolver.HasModule(&module1)); - // Convert module1 to fast_module. - ASSERT_TRUE(serializer.ConvertOneModule(module1.code_file(), - &basic_resolver, - &fast_resolver)); - ASSERT_TRUE(fast_resolver.HasModule(&module1)); - basic_resolver.UnloadModule(&module1); - fast_resolver.UnloadModule(&module1); - ASSERT_FALSE(fast_resolver.HasModule(&module1)); - - ASSERT_TRUE(basic_resolver.LoadModule(&module1, symbol_file(1))); - ASSERT_TRUE(basic_resolver.HasModule(&module1)); - // Convert module1 to fast_module. - ASSERT_TRUE(serializer.ConvertOneModule(module1.code_file(), - &basic_resolver, - &fast_resolver)); - ASSERT_TRUE(fast_resolver.HasModule(&module1)); -} - -TEST_F(TestFastSourceLineResolver, CompareModule) { - char *symbol_data; - string symbol_data_string; - string filename; - - for (int module_index = 0; module_index < 3; ++module_index) { - std::stringstream ss; - ss << testdata_dir << "/module" << module_index << ".out"; - filename = ss.str(); - ASSERT_TRUE(SourceLineResolverBase::ReadSymbolFile( - &symbol_data, symbol_file(module_index))); - symbol_data_string = symbol_data; - delete [] symbol_data; - ASSERT_TRUE(module_comparer.Compare(symbol_data_string)); - } -} - -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/linked_ptr.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/linked_ptr.h deleted file mode 100644 index 1a4ef7d4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/linked_ptr.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). - -#ifndef PROCESSOR_LINKED_PTR_H__ -#define PROCESSOR_LINKED_PTR_H__ - -namespace google_breakpad { - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Join an existing circle. - void join(linked_ptr_internal const* ptr) { - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true iff we were the - // last member of the circle. Once this is done, you can join() another. - bool depart() { - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { depart(); capture(ptr); } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - // Release ownership of the pointed object and returns it. - // Sole ownership by this linked_ptr object is required. - T* release() { - bool last = link_.depart(); - T* v = value_; - value_ = NULL; - return v; - } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_LINKED_PTR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.cc deleted file mode 100644 index 70f6958e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// logging.cc: Breakpad logging -// -// See logging.h for documentation. -// -// Author: Mark Mentovai - -#include -#include -#include -#include -#include - -#include "processor/logging.h" -#include "processor/pathname_stripper.h" - -#ifdef _WIN32 -#define snprintf _snprintf -#endif - -namespace google_breakpad { - -LogStream::LogStream(std::ostream &stream, Severity severity, - const char *file, int line) - : stream_(stream) { - time_t clock; - time(&clock); - struct tm tm_struct; -#ifdef _WIN32 - localtime_s(&tm_struct, &clock); -#else - localtime_r(&clock, &tm_struct); -#endif - char time_string[20]; - strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", &tm_struct); - - const char *severity_string = "UNKNOWN_SEVERITY"; - switch (severity) { - case SEVERITY_INFO: - severity_string = "INFO"; - break; - case SEVERITY_ERROR: - severity_string = "ERROR"; - break; - } - - stream_ << time_string << ": " << PathnameStripper::File(file) << ":" << - line << ": " << severity_string << ": "; -} - -LogStream::~LogStream() { - stream_ << std::endl; -} - -std::string HexString(u_int32_t number) { - char buffer[11]; - snprintf(buffer, sizeof(buffer), "0x%x", number); - return std::string(buffer); -} - -std::string HexString(u_int64_t number) { - char buffer[19]; - snprintf(buffer, sizeof(buffer), "0x%" PRIx64, number); - return std::string(buffer); -} - -std::string HexString(int number) { - char buffer[19]; - snprintf(buffer, sizeof(buffer), "0x%x", number); - return std::string(buffer); -} - -int ErrnoString(std::string *error_string) { - assert(error_string); - - // strerror isn't necessarily thread-safe. strerror_r would be preferrable, - // but GNU libc uses a nonstandard strerror_r by default, which returns a - // char* (rather than an int success indicator) and doesn't necessarily - // use the supplied buffer. - error_string->assign(strerror(errno)); - return errno; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.h deleted file mode 100644 index 642506d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/logging.h +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// logging.h: Breakpad logging -// -// Breakpad itself uses Breakpad logging with statements of the form: -// BPLOG(severity) << "message"; -// severity may be INFO, ERROR, or other values defined in this file. -// -// BPLOG is an overridable macro so that users can customize Breakpad's -// logging. Left at the default, logging messages are sent to stderr along -// with a timestamp and the source code location that produced a message. -// The streams may be changed by redefining BPLOG_*_STREAM, the logging -// behavior may be changed by redefining BPLOG_*, and the entire logging -// system may be overridden by redefining BPLOG(severity). These -// redefinitions may be passed to the preprocessor as a command-line flag -// (-D). -// -// If an additional header is required to override Breakpad logging, it can -// be specified by the BP_LOGGING_INCLUDE macro. If defined, this header -// will #include the header specified by that macro. -// -// If any initialization is needed before logging, it can be performed by -// a function called through the BPLOG_INIT macro. Each main function of -// an executable program in the Breakpad processor library calls -// BPLOG_INIT(&argc, &argv); before any logging can be performed; define -// BPLOG_INIT appropriately if initialization is required. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_LOGGING_H__ -#define PROCESSOR_LOGGING_H__ - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -#ifdef BP_LOGGING_INCLUDE -#include BP_LOGGING_INCLUDE -#endif // BP_LOGGING_INCLUDE - -namespace google_breakpad { - -// These are defined in Microsoft headers. -#ifdef SEVERITY_ERROR -#undef SEVERITY_ERROR -#endif - -#ifdef ERROR -#undef ERROR -#endif - -class LogStream { - public: - enum Severity { - SEVERITY_INFO, - SEVERITY_ERROR - }; - - // Begin logging a message to the stream identified by |stream|, at the - // indicated severity. The file and line parameters should be set so as to - // identify the line of source code that is producing a message. - LogStream(std::ostream &stream, Severity severity, - const char *file, int line); - - // Finish logging by printing a newline and flushing the output stream. - ~LogStream(); - - template std::ostream& operator<<(const T &t) { - return stream_ << t; - } - - private: - std::ostream &stream_; - - // Disallow copy constructor and assignment operator - explicit LogStream(const LogStream &that); - void operator=(const LogStream &that); -}; - -// This class is used to explicitly ignore values in the conditional logging -// macros. This avoids compiler warnings like "value computed is not used" -// and "statement has no effect". -class LogMessageVoidify { - public: - LogMessageVoidify() {} - - // This has to be an operator with a precedence lower than << but higher - // than ?: - void operator&(std::ostream &) {} -}; - -// Returns number formatted as a hexadecimal string, such as "0x7b". -std::string HexString(u_int32_t number); -std::string HexString(u_int64_t number); -std::string HexString(int number); - -// Returns the error code as set in the global errno variable, and sets -// error_string, a required argument, to a string describing that error -// code. -int ErrnoString(std::string *error_string); - -} // namespace google_breakpad - -#ifndef BPLOG_INIT -#define BPLOG_INIT(pargc, pargv) -#endif // BPLOG_INIT - -#ifndef BPLOG -#define BPLOG(severity) BPLOG_ ## severity -#endif // BPLOG - -#ifndef BPLOG_INFO -#ifndef BPLOG_INFO_STREAM -#define BPLOG_INFO_STREAM std::clog -#endif // BPLOG_INFO_STREAM -#define BPLOG_INFO google_breakpad::LogStream(BPLOG_INFO_STREAM, \ - google_breakpad::LogStream::SEVERITY_INFO, \ - __FILE__, __LINE__) -#endif // BPLOG_INFO - -#ifndef BPLOG_ERROR -#ifndef BPLOG_ERROR_STREAM -#define BPLOG_ERROR_STREAM std::cerr -#endif // BPLOG_ERROR_STREAM -#define BPLOG_ERROR google_breakpad::LogStream(BPLOG_ERROR_STREAM, \ - google_breakpad::LogStream::SEVERITY_ERROR, \ - __FILE__, __LINE__) -#endif // BPLOG_ERROR - -#define BPLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : \ - google_breakpad::LogMessageVoidify() & BPLOG(severity) - -#endif // PROCESSOR_LOGGING_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers-inl.h deleted file mode 100644 index d68e8b9f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers-inl.h +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// map_serializers_inl.h: implementation for serializing std::map and its -// wrapper classes. -// -// See map_serializers.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_MAP_SERIALIZERS_INL_H__ -#define PROCESSOR_MAP_SERIALIZERS_INL_H__ - -#include -#include - -#include "processor/map_serializers.h" -#include "processor/simple_serializer.h" - -#include "processor/address_map-inl.h" -#include "processor/range_map-inl.h" -#include "processor/contained_range_map-inl.h" - -#include "processor/logging.h" - -namespace google_breakpad { - -template -size_t StdMapSerializer::SizeOf( - const std::map &m) const { - size_t size = 0; - size_t header_size = (1 + m.size()) * sizeof(u_int32_t); - size += header_size; - - typename std::map::const_iterator iter; - for (iter = m.begin(); iter != m.end(); ++iter) { - size += key_serializer_.SizeOf(iter->first); - size += value_serializer_.SizeOf(iter->second); - } - return size; -} - -template -char *StdMapSerializer::Write(const std::map &m, - char *dest) const { - if (!dest) { - BPLOG(ERROR) << "StdMapSerializer failed: write to NULL address."; - return NULL; - } - char *start_address = dest; - - // Write header: - // Number of nodes. - dest = SimpleSerializer::Write(m.size(), dest); - // Nodes offsets. - u_int32_t *offsets = reinterpret_cast(dest); - dest += sizeof(u_int32_t) * m.size(); - - char *key_address = dest; - dest += sizeof(Key) * m.size(); - - // Traverse map. - typename std::map::const_iterator iter; - int index = 0; - for (iter = m.begin(); iter != m.end(); ++iter, ++index) { - offsets[index] = static_cast(dest - start_address); - key_address = key_serializer_.Write(iter->first, key_address); - dest = value_serializer_.Write(iter->second, dest); - } - return dest; -} - -template -char *StdMapSerializer::Serialize( - const std::map &m, unsigned int *size) const { - // Compute size of memory to be allocated. - unsigned int size_to_alloc = SizeOf(m); - // Allocate memory. - char *serialized_data = new char[size_to_alloc]; - if (!serialized_data) { - BPLOG(INFO) << "StdMapSerializer memory allocation failed."; - if (size) *size = 0; - return NULL; - } - // Write serialized data into memory. - Write(m, serialized_data); - - if (size) *size = size_to_alloc; - return serialized_data; -} - -template -size_t RangeMapSerializer::SizeOf( - const RangeMap &m) const { - size_t size = 0; - size_t header_size = (1 + m.map_.size()) * sizeof(u_int32_t); - size += header_size; - - typename std::map::const_iterator iter; - for (iter = m.map_.begin(); iter != m.map_.end(); ++iter) { - // Size of key (high address). - size += address_serializer_.SizeOf(iter->first); - // Size of base (low address). - size += address_serializer_.SizeOf(iter->second.base()); - // Size of entry. - size += entry_serializer_.SizeOf(iter->second.entry()); - } - return size; -} - -template -char *RangeMapSerializer::Write( - const RangeMap &m, char *dest) const { - if (!dest) { - BPLOG(ERROR) << "RangeMapSerializer failed: write to NULL address."; - return NULL; - } - char *start_address = dest; - - // Write header: - // Number of nodes. - dest = SimpleSerializer::Write(m.map_.size(), dest); - // Nodes offsets. - u_int32_t *offsets = reinterpret_cast(dest); - dest += sizeof(u_int32_t) * m.map_.size(); - - char *key_address = dest; - dest += sizeof(Address) * m.map_.size(); - - // Traverse map. - typename std::map::const_iterator iter; - int index = 0; - for (iter = m.map_.begin(); iter != m.map_.end(); ++iter, ++index) { - offsets[index] = static_cast(dest - start_address); - key_address = address_serializer_.Write(iter->first, key_address); - dest = address_serializer_.Write(iter->second.base(), dest); - dest = entry_serializer_.Write(iter->second.entry(), dest); - } - return dest; -} - -template -char *RangeMapSerializer::Serialize( - const RangeMap &m, unsigned int *size) const { - // Compute size of memory to be allocated. - unsigned int size_to_alloc = SizeOf(m); - // Allocate memory. - char *serialized_data = new char[size_to_alloc]; - if (!serialized_data) { - BPLOG(INFO) << "RangeMapSerializer memory allocation failed."; - if (size) *size = 0; - return NULL; - } - - // Write serialized data into memory. - Write(m, serialized_data); - - if (size) *size = size_to_alloc; - return serialized_data; -} - - -template -size_t ContainedRangeMapSerializer::SizeOf( - const ContainedRangeMap *m) const { - size_t size = 0; - size_t header_size = addr_serializer_.SizeOf(m->base_) - + entry_serializer_.SizeOf(m->entry_) - + sizeof(u_int32_t); - size += header_size; - // In case m.map_ == NULL, we treat it as an empty map: - size += sizeof(u_int32_t); - if (m->map_) { - size += m->map_->size() * sizeof(u_int32_t); - typename Map::const_iterator iter; - for (iter = m->map_->begin(); iter != m->map_->end(); ++iter) { - size += addr_serializer_.SizeOf(iter->first); - // Recursive calculation of size: - size += SizeOf(iter->second); - } - } - return size; -} - -template -char *ContainedRangeMapSerializer::Write( - const ContainedRangeMap *m, char *dest) const { - if (!dest) { - BPLOG(ERROR) << "StdMapSerializer failed: write to NULL address."; - return NULL; - } - dest = addr_serializer_.Write(m->base_, dest); - dest = SimpleSerializer::Write(entry_serializer_.SizeOf(m->entry_), - dest); - dest = entry_serializer_.Write(m->entry_, dest); - - // Write map<: - char *map_address = dest; - if (m->map_ == NULL) { - dest = SimpleSerializer::Write(0, dest); - } else { - dest = SimpleSerializer::Write(m->map_->size(), dest); - u_int32_t *offsets = reinterpret_cast(dest); - dest += sizeof(u_int32_t) * m->map_->size(); - - char *key_address = dest; - dest += sizeof(AddrType) * m->map_->size(); - - // Traverse map. - typename Map::const_iterator iter; - int index = 0; - for (iter = m->map_->begin(); iter != m->map_->end(); ++iter, ++index) { - offsets[index] = static_cast(dest - map_address); - key_address = addr_serializer_.Write(iter->first, key_address); - // Recursively write. - dest = Write(iter->second, dest); - } - } - return dest; -} - -template -char *ContainedRangeMapSerializer::Serialize( - const ContainedRangeMap *m, unsigned int *size) const { - unsigned int size_to_alloc = SizeOf(m); - // Allocating memory. - char *serialized_data = new char[size_to_alloc]; - if (!serialized_data) { - BPLOG(INFO) << "ContainedRangeMapSerializer memory allocation failed."; - if (size) *size = 0; - return NULL; - } - Write(m, serialized_data); - if (size) *size = size_to_alloc; - return serialized_data; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_MAP_SERIALIZERS_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers.h deleted file mode 100644 index a0b9d3fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers.h +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// map_serializers.h: defines templates for serializing std::map and its -// wrappers: AddressMap, RangeMap, and ContainedRangeMap. -// -// Author: Siyang Xie (lambxsy@google.com) - - -#ifndef PROCESSOR_MAP_SERIALIZERS_H__ -#define PROCESSOR_MAP_SERIALIZERS_H__ - -#include -#include - -#include "processor/simple_serializer.h" - -#include "processor/address_map-inl.h" -#include "processor/range_map-inl.h" -#include "processor/contained_range_map-inl.h" - -namespace google_breakpad { - -// StdMapSerializer allocates memory and serializes an std::map instance into a -// chunk of memory data. -template -class StdMapSerializer { - public: - // Calculate the memory size of serialized data. - size_t SizeOf(const std::map &m) const; - - // Writes the serialized data to memory with start address = dest, - // and returns the "end" of data, i.e., return the address follow the final - // byte of data. - // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const std::map &m, char* dest) const; - - // Serializes a std::map object into a chunk of memory data with format - // described in "StaticMap.h" comment. - // Returns a pointer to the serialized data. If size != NULL, *size is set - // to the size of serialized data, i.e., SizeOf(m). - // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const std::map &m, unsigned int *size) const; - - private: - SimpleSerializer key_serializer_; - SimpleSerializer value_serializer_; -}; - -// AddressMapSerializer allocates memory and serializes an AddressMap into a -// chunk of memory data. -template -class AddressMapSerializer { - public: - // Calculate the memory size of serialized data. - size_t SizeOf(const AddressMap &m) const { - return std_map_serializer_.SizeOf(m.map_); - } - - // Write the serialized data to specified memory location. Return the "end" - // of data, i.e., return the address after the final byte of data. - // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const AddressMap &m, char *dest) const { - return std_map_serializer_.Write(m.map_, dest); - } - - // Serializes an AddressMap object into a chunk of memory data. - // Returns a pointer to the serialized data. If size != NULL, *size is set - // to the size of serialized data, i.e., SizeOf(m). - // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const AddressMap &m, unsigned int *size) const { - return std_map_serializer_.Serialize(m.map_, size); - } - - private: - // AddressMapSerializer is a simple wrapper of StdMapSerializer, just as - // AddressMap is a simple wrapper of std::map. - StdMapSerializer std_map_serializer_; -}; - -// RangeMapSerializer allocates memory and serializes a RangeMap instance into a -// chunk of memory data. -template -class RangeMapSerializer { - public: - // Calculate the memory size of serialized data. - size_t SizeOf(const RangeMap &m) const; - - // Write the serialized data to specified memory location. Return the "end" - // of data, i.e., return the address after the final byte of data. - // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const RangeMap &m, char* dest) const; - - // Serializes a RangeMap object into a chunk of memory data. - // Returns a pointer to the serialized data. If size != NULL, *size is set - // to the size of serialized data, i.e., SizeOf(m). - // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const RangeMap &m, unsigned int *size) const; - - private: - // Convenient type name for Range. - typedef typename RangeMap::Range Range; - - // Serializer for RangeMap's key and Range::base_. - SimpleSerializer
address_serializer_; - // Serializer for RangeMap::Range::entry_. - SimpleSerializer entry_serializer_; -}; - -// ContainedRangeMapSerializer allocates memory and serializes a -// ContainedRangeMap instance into a chunk of memory data. -template -class ContainedRangeMapSerializer { - public: - // Calculate the memory size of serialized data. - size_t SizeOf(const ContainedRangeMap *m) const; - - // Write the serialized data to specified memory location. Return the "end" - // of data, i.e., return the address after the final byte of data. - // NOTE: caller has to allocate enough memory before invoke Write() method. - char* Write(const ContainedRangeMap *m, - char* dest) const; - - // Serializes a ContainedRangeMap object into a chunk of memory data. - // Returns a pointer to the serialized data. If size != NULL, *size is set - // to the size of serialized data, i.e., SizeOf(m). - // Caller has the ownership of memory allocated as "new char[]". - char* Serialize(const ContainedRangeMap *m, - unsigned int *size) const; - - private: - // Convenient type name for the underlying map type. - typedef std::map*> Map; - - // Serializer for addresses and entries stored in ContainedRangeMap. - SimpleSerializer addr_serializer_; - SimpleSerializer entry_serializer_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_MAP_SERIALIZERS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers_unittest.cc deleted file mode 100644 index abaef976..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/map_serializers_unittest.cc +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// map_serializers_unittest.cc: Unit tests for std::map serializer and -// std::map wrapper serializers. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include -#include -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "map_serializers-inl.h" - -#include "processor/address_map-inl.h" -#include "processor/range_map-inl.h" -#include "processor/contained_range_map-inl.h" - -typedef int32_t AddrType; -typedef int32_t EntryType; - -const int kSizeOfInt = 4; - -class TestStdMapSerializer : public ::testing::Test { - protected: - void SetUp() { - serialized_size_ = 0; - serialized_data_ = NULL; - } - - void TearDown() { - delete [] serialized_data_; - } - - std::map std_map_; - google_breakpad::StdMapSerializer serializer_; - u_int32_t serialized_size_; - char *serialized_data_; -}; - -TEST_F(TestStdMapSerializer, EmptyMapTestCase) { - const int32_t correct_data[] = { 0 }; - u_int32_t correct_size = sizeof(correct_data); - - // std_map_ is empty. - serialized_data_ = serializer_.Serialize(std_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestStdMapSerializer, MapWithTwoElementsTestCase) { - const int32_t correct_data[] = { - // # of nodes - 2, - // Offsets - 20, 24, - // Keys - 1, 3, - // Values - 2, 6 - }; - u_int32_t correct_size = sizeof(correct_data); - - std_map_.insert(std::make_pair(1, 2)); - std_map_.insert(std::make_pair(3, 6)); - - serialized_data_ = serializer_.Serialize(std_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestStdMapSerializer, MapWithFiveElementsTestCase) { - const int32_t correct_data[] = { - // # of nodes - 5, - // Offsets - 44, 48, 52, 56, 60, - // Keys - 1, 2, 3, 4, 5, - // Values - 11, 12, 13, 14, 15 - }; - u_int32_t correct_size = sizeof(correct_data); - - for (int i = 1; i < 6; ++i) - std_map_.insert(std::make_pair(i, 10 + i)); - - serialized_data_ = serializer_.Serialize(std_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -class TestAddressMapSerializer : public ::testing::Test { - protected: - void SetUp() { - serialized_size_ = 0; - serialized_data_ = 0; - } - - void TearDown() { - delete [] serialized_data_; - } - - google_breakpad::AddressMap address_map_; - google_breakpad::AddressMapSerializer serializer_; - u_int32_t serialized_size_; - char *serialized_data_; -}; - -TEST_F(TestAddressMapSerializer, EmptyMapTestCase) { - const int32_t correct_data[] = { 0 }; - u_int32_t correct_size = sizeof(correct_data); - - // std_map_ is empty. - serialized_data_ = serializer_.Serialize(address_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestAddressMapSerializer, MapWithTwoElementsTestCase) { - const int32_t correct_data[] = { - // # of nodes - 2, - // Offsets - 20, 24, - // Keys - 1, 3, - // Values - 2, 6 - }; - u_int32_t correct_size = sizeof(correct_data); - - address_map_.Store(1, 2); - address_map_.Store(3, 6); - - serialized_data_ = serializer_.Serialize(address_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestAddressMapSerializer, MapWithFourElementsTestCase) { - const int32_t correct_data[] = { - // # of nodes - 4, - // Offsets - 36, 40, 44, 48, - // Keys - -6, -4, 8, 123, - // Values - 2, 3, 5, 8 - }; - u_int32_t correct_size = sizeof(correct_data); - - address_map_.Store(-6, 2); - address_map_.Store(-4, 3); - address_map_.Store(8, 5); - address_map_.Store(123, 8); - - serialized_data_ = serializer_.Serialize(address_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - - -class TestRangeMapSerializer : public ::testing::Test { - protected: - void SetUp() { - serialized_size_ = 0; - serialized_data_ = 0; - } - - void TearDown() { - delete [] serialized_data_; - } - - google_breakpad::RangeMap range_map_; - google_breakpad::RangeMapSerializer serializer_; - u_int32_t serialized_size_; - char *serialized_data_; -}; - -TEST_F(TestRangeMapSerializer, EmptyMapTestCase) { - const int32_t correct_data[] = { 0 }; - u_int32_t correct_size = sizeof(correct_data); - - // range_map_ is empty. - serialized_data_ = serializer_.Serialize(range_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestRangeMapSerializer, MapWithOneRangeTestCase) { - const int32_t correct_data[] = { - // # of nodes - 1, - // Offsets - 12, - // Keys: high address - 10, - // Values: (low address, entry) pairs - 1, 6 - }; - u_int32_t correct_size = sizeof(correct_data); - - range_map_.StoreRange(1, 10, 6); - - serialized_data_ = serializer_.Serialize(range_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestRangeMapSerializer, MapWithThreeRangesTestCase) { - const int32_t correct_data[] = { - // # of nodes - 3, - // Offsets - 28, 36, 44, - // Keys: high address - 5, 9, 20, - // Values: (low address, entry) pairs - 2, 1, 6, 2, 10, 3 - }; - u_int32_t correct_size = sizeof(correct_data); - - ASSERT_TRUE(range_map_.StoreRange(2, 4, 1)); - ASSERT_TRUE(range_map_.StoreRange(6, 4, 2)); - ASSERT_TRUE(range_map_.StoreRange(10, 11, 3)); - - serialized_data_ = serializer_.Serialize(range_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - - -class TestContainedRangeMapSerializer : public ::testing::Test { - protected: - void SetUp() { - serialized_size_ = 0; - serialized_data_ = 0; - } - - void TearDown() { - delete [] serialized_data_; - } - - google_breakpad::ContainedRangeMap crm_map_; - google_breakpad::ContainedRangeMapSerializer serializer_; - u_int32_t serialized_size_; - char *serialized_data_; -}; - -TEST_F(TestContainedRangeMapSerializer, EmptyMapTestCase) { - const int32_t correct_data[] = { - 0, // base address of root - 4, // size of entry - 0, // entry stored at root - 0 // empty map stored at root - }; - u_int32_t correct_size = sizeof(correct_data); - - // crm_map_ is empty. - serialized_data_ = serializer_.Serialize(&crm_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestContainedRangeMapSerializer, MapWithOneRangeTestCase) { - const int32_t correct_data[] = { - 0, // base address of root - 4, // size of entry - 0, // entry stored at root - // Map stored at root node: - 1, // # of nodes - 12, // offset - 9, // key - // value: a child ContainedRangeMap - 3, // base address of child CRM - 4, // size of entry - -1, // entry stored in child CRM - 0 // empty sub-map stored in child CRM - }; - u_int32_t correct_size = sizeof(correct_data); - - crm_map_.StoreRange(3, 7, -1); - - serialized_data_ = serializer_.Serialize(&crm_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - -TEST_F(TestContainedRangeMapSerializer, MapWithTwoLevelsTestCase) { - // Tree structure of ranges: - // root level 0 - // | - // map - // / \ level 1: child1, child2 - // 2~8 10~20 - // | | - // map map - // / \ | - // 3~4 6~7 16-20 level 2: grandchild1, grandchild2, grandchild3 - - const int32_t correct_data[] = { - // root: base, entry_size, entry - 0, 4, 0, - // root's map: # of nodes, offset1, offset2, key1, key2 - 2, 20, 84, 8, 20, - // child1: base, entry_size, entry: - 2, 4, -1, - // child1's map: # of nodes, offset1, offset2, key1, key2 - 2, 20, 36, 4, 7, - // grandchild1: base, entry_size, entry, empty_map - 3, 4, -1, 0, - // grandchild2: base, entry_size, entry, empty_map - 6, 4, -1, 0, - // child2: base, entry_size, entry: - 10, 4, -1, - // child2's map: # of nodes, offset1, key1 - 1, 12, 20, - // grandchild3: base, entry_size, entry, empty_map - 16, 4, -1, 0 - }; - u_int32_t correct_size = sizeof(correct_data); - - // Store child1. - ASSERT_TRUE(crm_map_.StoreRange(2, 7, -1)); - // Store child2. - ASSERT_TRUE(crm_map_.StoreRange(10, 11, -1)); - // Store grandchild1. - ASSERT_TRUE(crm_map_.StoreRange(3, 2, -1)); - // Store grandchild2. - ASSERT_TRUE(crm_map_.StoreRange(6, 2, -1)); - // Store grandchild3. - ASSERT_TRUE(crm_map_.StoreRange(16, 5, -1)); - - serialized_data_ = serializer_.Serialize(&crm_map_, &serialized_size_); - - EXPECT_EQ(correct_size, serialized_size_); - EXPECT_EQ(memcmp(correct_data, serialized_data_, correct_size), 0); -} - - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump.cc deleted file mode 100644 index 9e084401..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump.cc +++ /dev/null @@ -1,4203 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump.cc: A minidump reader. -// -// See minidump.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/minidump.h" - -#include -#include -#include -#include -#include - -#ifdef _WIN32 -#include -typedef SSIZE_T ssize_t; -#define PRIx64 "llx" -#define PRIx32 "lx" -#define snprintf _snprintf -#else // _WIN32 -#include -#define O_BINARY 0 -#endif // _WIN32 - -#include -#include -#include -#include -#include - -#include "processor/range_map-inl.h" - -#include "processor/basic_code_module.h" -#include "processor/basic_code_modules.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - - -namespace google_breakpad { - - -using std::istream; -using std::ifstream; -using std::numeric_limits; -using std::vector; - - -// -// Swapping routines -// -// Inlining these doesn't increase code size significantly, and it saves -// a whole lot of unnecessary jumping back and forth. -// - - -// Swapping an 8-bit quantity is a no-op. This function is only provided -// to account for certain templatized operations that require swapping for -// wider types but handle u_int8_t too -// (MinidumpMemoryRegion::GetMemoryAtAddressInternal). -static inline void Swap(u_int8_t* value) { -} - - -// Optimization: don't need to AND the furthest right shift, because we're -// shifting an unsigned quantity. The standard requires zero-filling in this -// case. If the quantities were signed, a bitmask whould be needed for this -// right shift to avoid an arithmetic shift (which retains the sign bit). -// The furthest left shift never needs to be ANDed bitmask. - - -static inline void Swap(u_int16_t* value) { - *value = (*value >> 8) | - (*value << 8); -} - - -static inline void Swap(u_int32_t* value) { - *value = (*value >> 24) | - ((*value >> 8) & 0x0000ff00) | - ((*value << 8) & 0x00ff0000) | - (*value << 24); -} - - -static inline void Swap(u_int64_t* value) { - u_int32_t* value32 = reinterpret_cast(value); - Swap(&value32[0]); - Swap(&value32[1]); - u_int32_t temp = value32[0]; - value32[0] = value32[1]; - value32[1] = temp; -} - - -// Given a pointer to a 128-bit int in the minidump data, set the "low" -// and "high" fields appropriately. -static void Normalize128(u_int128_t* value, bool is_big_endian) { - // The struct format is [high, low], so if the format is big-endian, - // the most significant bytes will already be in the high field. - if (!is_big_endian) { - u_int64_t temp = value->low; - value->low = value->high; - value->high = temp; - } -} - -// This just swaps each int64 half of the 128-bit value. -// The value should also be normalized by calling Normalize128(). -static void Swap(u_int128_t* value) { - Swap(&value->low); - Swap(&value->high); -} - - -static inline void Swap(MDLocationDescriptor* location_descriptor) { - Swap(&location_descriptor->data_size); - Swap(&location_descriptor->rva); -} - - -static inline void Swap(MDMemoryDescriptor* memory_descriptor) { - Swap(&memory_descriptor->start_of_memory_range); - Swap(&memory_descriptor->memory); -} - - -static inline void Swap(MDGUID* guid) { - Swap(&guid->data1); - Swap(&guid->data2); - Swap(&guid->data3); - // Don't swap guid->data4[] because it contains 8-bit quantities. -} - - -// -// Character conversion routines -// - - -// Standard wide-character conversion routines depend on the system's own -// idea of what width a wide character should be: some use 16 bits, and -// some use 32 bits. For the purposes of a minidump, wide strings are -// always represented with 16-bit UTF-16 chracters. iconv isn't available -// everywhere, and its interface varies where it is available. iconv also -// deals purely with char* pointers, so in addition to considering the swap -// parameter, a converter that uses iconv would also need to take the host -// CPU's endianness into consideration. It doesn't seems worth the trouble -// of making it a dependency when we don't care about anything but UTF-16. -static string* UTF16ToUTF8(const vector& in, - bool swap) { - scoped_ptr out(new string()); - - // Set the string's initial capacity to the number of UTF-16 characters, - // because the UTF-8 representation will always be at least this long. - // If the UTF-8 representation is longer, the string will grow dynamically. - out->reserve(in.size()); - - for (vector::const_iterator iterator = in.begin(); - iterator != in.end(); - ++iterator) { - // Get a 16-bit value from the input - u_int16_t in_word = *iterator; - if (swap) - Swap(&in_word); - - // Convert the input value (in_word) into a Unicode code point (unichar). - u_int32_t unichar; - if (in_word >= 0xdc00 && in_word <= 0xdcff) { - BPLOG(ERROR) << "UTF16ToUTF8 found low surrogate " << - HexString(in_word) << " without high"; - return NULL; - } else if (in_word >= 0xd800 && in_word <= 0xdbff) { - // High surrogate. - unichar = (in_word - 0xd7c0) << 10; - if (++iterator == in.end()) { - BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << - HexString(in_word) << " at end of string"; - return NULL; - } - u_int32_t high_word = in_word; - in_word = *iterator; - if (in_word < 0xdc00 || in_word > 0xdcff) { - BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << - HexString(high_word) << " without low " << - HexString(in_word); - return NULL; - } - unichar |= in_word & 0x03ff; - } else { - // The ordinary case, a single non-surrogate Unicode character encoded - // as a single 16-bit value. - unichar = in_word; - } - - // Convert the Unicode code point (unichar) into its UTF-8 representation, - // appending it to the out string. - if (unichar < 0x80) { - (*out) += unichar; - } else if (unichar < 0x800) { - (*out) += 0xc0 | (unichar >> 6); - (*out) += 0x80 | (unichar & 0x3f); - } else if (unichar < 0x10000) { - (*out) += 0xe0 | (unichar >> 12); - (*out) += 0x80 | ((unichar >> 6) & 0x3f); - (*out) += 0x80 | (unichar & 0x3f); - } else if (unichar < 0x200000) { - (*out) += 0xf0 | (unichar >> 18); - (*out) += 0x80 | ((unichar >> 12) & 0x3f); - (*out) += 0x80 | ((unichar >> 6) & 0x3f); - (*out) += 0x80 | (unichar & 0x3f); - } else { - BPLOG(ERROR) << "UTF16ToUTF8 cannot represent high value " << - HexString(unichar) << " in UTF-8"; - return NULL; - } - } - - return out.release(); -} - -// Return the smaller of the number of code units in the UTF-16 string, -// not including the terminating null word, or maxlen. -static size_t UTF16codeunits(const u_int16_t *string, size_t maxlen) { - size_t count = 0; - while (count < maxlen && string[count] != 0) - count++; - return count; -} - - -// -// MinidumpObject -// - - -MinidumpObject::MinidumpObject(Minidump* minidump) - : minidump_(minidump), - valid_(false) { -} - - -// -// MinidumpStream -// - - -MinidumpStream::MinidumpStream(Minidump* minidump) - : MinidumpObject(minidump) { -} - - -// -// MinidumpContext -// - - -MinidumpContext::MinidumpContext(Minidump* minidump) - : MinidumpStream(minidump), - context_flags_(0), - context_() { -} - - -MinidumpContext::~MinidumpContext() { - FreeContext(); -} - - -bool MinidumpContext::Read(u_int32_t expected_size) { - valid_ = false; - - FreeContext(); - - // First, figure out what type of CPU this context structure is for. - // For some reason, the AMD64 Context doesn't have context_flags - // at the beginning of the structure, so special case it here. - if (expected_size == sizeof(MDRawContextAMD64)) { - BPLOG(INFO) << "MinidumpContext: looks like AMD64 context"; - - scoped_ptr context_amd64(new MDRawContextAMD64()); - if (!minidump_->ReadBytes(context_amd64.get(), - sizeof(MDRawContextAMD64))) { - BPLOG(ERROR) << "MinidumpContext could not read amd64 context"; - return false; - } - - if (minidump_->swap()) - Swap(&context_amd64->context_flags); - - u_int32_t cpu_type = context_amd64->context_flags & MD_CONTEXT_CPU_MASK; - - if (cpu_type != MD_CONTEXT_AMD64) { - //TODO: fall through to switch below? - // need a Tell method to be able to SeekSet back to beginning - // http://code.google.com/p/google-breakpad/issues/detail?id=224 - BPLOG(ERROR) << "MinidumpContext not actually amd64 context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext amd64 does not match system info"; - return false; - } - - // Normalize the 128-bit types in the dump. - // Since this is AMD64, by definition, the values are little-endian. - for (unsigned int vr_index = 0; - vr_index < MD_CONTEXT_AMD64_VR_COUNT; - ++vr_index) - Normalize128(&context_amd64->vector_register[vr_index], false); - - if (minidump_->swap()) { - Swap(&context_amd64->p1_home); - Swap(&context_amd64->p2_home); - Swap(&context_amd64->p3_home); - Swap(&context_amd64->p4_home); - Swap(&context_amd64->p5_home); - Swap(&context_amd64->p6_home); - // context_flags is already swapped - Swap(&context_amd64->mx_csr); - Swap(&context_amd64->cs); - Swap(&context_amd64->ds); - Swap(&context_amd64->es); - Swap(&context_amd64->fs); - Swap(&context_amd64->ss); - Swap(&context_amd64->eflags); - Swap(&context_amd64->dr0); - Swap(&context_amd64->dr1); - Swap(&context_amd64->dr2); - Swap(&context_amd64->dr3); - Swap(&context_amd64->dr6); - Swap(&context_amd64->dr7); - Swap(&context_amd64->rax); - Swap(&context_amd64->rcx); - Swap(&context_amd64->rdx); - Swap(&context_amd64->rbx); - Swap(&context_amd64->rsp); - Swap(&context_amd64->rbp); - Swap(&context_amd64->rsi); - Swap(&context_amd64->rdi); - Swap(&context_amd64->r8); - Swap(&context_amd64->r9); - Swap(&context_amd64->r10); - Swap(&context_amd64->r11); - Swap(&context_amd64->r12); - Swap(&context_amd64->r13); - Swap(&context_amd64->r14); - Swap(&context_amd64->r15); - Swap(&context_amd64->rip); - //FIXME: I'm not sure what actually determines - // which member of the union {flt_save, sse_registers} - // is valid. We're not currently using either, - // but it would be good to have them swapped properly. - - for (unsigned int vr_index = 0; - vr_index < MD_CONTEXT_AMD64_VR_COUNT; - ++vr_index) - Swap(&context_amd64->vector_register[vr_index]); - Swap(&context_amd64->vector_control); - Swap(&context_amd64->debug_control); - Swap(&context_amd64->last_branch_to_rip); - Swap(&context_amd64->last_branch_from_rip); - Swap(&context_amd64->last_exception_to_rip); - Swap(&context_amd64->last_exception_from_rip); - } - - context_flags_ = context_amd64->context_flags; - - context_.amd64 = context_amd64.release(); - } - else { - u_int32_t context_flags; - if (!minidump_->ReadBytes(&context_flags, sizeof(context_flags))) { - BPLOG(ERROR) << "MinidumpContext could not read context flags"; - return false; - } - if (minidump_->swap()) - Swap(&context_flags); - - u_int32_t cpu_type = context_flags & MD_CONTEXT_CPU_MASK; - - // Allocate the context structure for the correct CPU and fill it. The - // casts are slightly unorthodox, but it seems better to do that than to - // maintain a separate pointer for each type of CPU context structure - // when only one of them will be used. - switch (cpu_type) { - case MD_CONTEXT_X86: { - if (expected_size != sizeof(MDRawContextX86)) { - BPLOG(ERROR) << "MinidumpContext x86 size mismatch, " << - expected_size << " != " << sizeof(MDRawContextX86); - return false; - } - - scoped_ptr context_x86(new MDRawContextX86()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_x86->context_flags = context_flags; - - size_t flags_size = sizeof(context_x86->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_x86.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextX86) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read x86 context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext x86 does not match system info"; - return false; - } - - if (minidump_->swap()) { - // context_x86->context_flags was already swapped. - Swap(&context_x86->dr0); - Swap(&context_x86->dr1); - Swap(&context_x86->dr2); - Swap(&context_x86->dr3); - Swap(&context_x86->dr6); - Swap(&context_x86->dr7); - Swap(&context_x86->float_save.control_word); - Swap(&context_x86->float_save.status_word); - Swap(&context_x86->float_save.tag_word); - Swap(&context_x86->float_save.error_offset); - Swap(&context_x86->float_save.error_selector); - Swap(&context_x86->float_save.data_offset); - Swap(&context_x86->float_save.data_selector); - // context_x86->float_save.register_area[] contains 8-bit quantities - // and does not need to be swapped. - Swap(&context_x86->float_save.cr0_npx_state); - Swap(&context_x86->gs); - Swap(&context_x86->fs); - Swap(&context_x86->es); - Swap(&context_x86->ds); - Swap(&context_x86->edi); - Swap(&context_x86->esi); - Swap(&context_x86->ebx); - Swap(&context_x86->edx); - Swap(&context_x86->ecx); - Swap(&context_x86->eax); - Swap(&context_x86->ebp); - Swap(&context_x86->eip); - Swap(&context_x86->cs); - Swap(&context_x86->eflags); - Swap(&context_x86->esp); - Swap(&context_x86->ss); - // context_x86->extended_registers[] contains 8-bit quantities and - // does not need to be swapped. - } - - context_.x86 = context_x86.release(); - - break; - } - - case MD_CONTEXT_PPC: { - if (expected_size != sizeof(MDRawContextPPC)) { - BPLOG(ERROR) << "MinidumpContext ppc size mismatch, " << - expected_size << " != " << sizeof(MDRawContextPPC); - return false; - } - - scoped_ptr context_ppc(new MDRawContextPPC()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_ppc->context_flags = context_flags; - - size_t flags_size = sizeof(context_ppc->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_ppc.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextPPC) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read ppc context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext ppc does not match system info"; - return false; - } - - // Normalize the 128-bit types in the dump. - // Since this is PowerPC, by definition, the values are big-endian. - for (unsigned int vr_index = 0; - vr_index < MD_VECTORSAVEAREA_PPC_VR_COUNT; - ++vr_index) { - Normalize128(&context_ppc->vector_save.save_vr[vr_index], true); - } - - if (minidump_->swap()) { - // context_ppc->context_flags was already swapped. - Swap(&context_ppc->srr0); - Swap(&context_ppc->srr1); - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_PPC_GPR_COUNT; - ++gpr_index) { - Swap(&context_ppc->gpr[gpr_index]); - } - Swap(&context_ppc->cr); - Swap(&context_ppc->xer); - Swap(&context_ppc->lr); - Swap(&context_ppc->ctr); - Swap(&context_ppc->mq); - Swap(&context_ppc->vrsave); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; - ++fpr_index) { - Swap(&context_ppc->float_save.fpregs[fpr_index]); - } - // Don't swap context_ppc->float_save.fpscr_pad because it is only - // used for padding. - Swap(&context_ppc->float_save.fpscr); - for (unsigned int vr_index = 0; - vr_index < MD_VECTORSAVEAREA_PPC_VR_COUNT; - ++vr_index) { - Swap(&context_ppc->vector_save.save_vr[vr_index]); - } - Swap(&context_ppc->vector_save.save_vscr); - // Don't swap the padding fields in vector_save. - Swap(&context_ppc->vector_save.save_vrvalid); - } - - context_.ppc = context_ppc.release(); - - break; - } - - case MD_CONTEXT_SPARC: { - if (expected_size != sizeof(MDRawContextSPARC)) { - BPLOG(ERROR) << "MinidumpContext sparc size mismatch, " << - expected_size << " != " << sizeof(MDRawContextSPARC); - return false; - } - - scoped_ptr context_sparc(new MDRawContextSPARC()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_sparc->context_flags = context_flags; - - size_t flags_size = sizeof(context_sparc->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_sparc.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextSPARC) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read sparc context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext sparc does not match system info"; - return false; - } - - if (minidump_->swap()) { - // context_sparc->context_flags was already swapped. - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_SPARC_GPR_COUNT; - ++gpr_index) { - Swap(&context_sparc->g_r[gpr_index]); - } - Swap(&context_sparc->ccr); - Swap(&context_sparc->pc); - Swap(&context_sparc->npc); - Swap(&context_sparc->y); - Swap(&context_sparc->asi); - Swap(&context_sparc->fprs); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT; - ++fpr_index) { - Swap(&context_sparc->float_save.regs[fpr_index]); - } - Swap(&context_sparc->float_save.filler); - Swap(&context_sparc->float_save.fsr); - } - context_.ctx_sparc = context_sparc.release(); - - break; - } - - case MD_CONTEXT_ARM: { - if (expected_size != sizeof(MDRawContextARM)) { - BPLOG(ERROR) << "MinidumpContext arm size mismatch, " << - expected_size << " != " << sizeof(MDRawContextARM); - return false; - } - - scoped_ptr context_arm(new MDRawContextARM()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_arm->context_flags = context_flags; - - size_t flags_size = sizeof(context_arm->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_arm.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextARM) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read arm context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext arm does not match system info"; - return false; - } - - if (minidump_->swap()) { - // context_arm->context_flags was already swapped. - for (unsigned int ireg_index = 0; - ireg_index < MD_CONTEXT_ARM_GPR_COUNT; - ++ireg_index) { - Swap(&context_arm->iregs[ireg_index]); - } - Swap(&context_arm->cpsr); - Swap(&context_arm->float_save.fpscr); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_ARM_FPR_COUNT; - ++fpr_index) { - Swap(&context_arm->float_save.regs[fpr_index]); - } - for (unsigned int fpe_index = 0; - fpe_index < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT; - ++fpe_index) { - Swap(&context_arm->float_save.extra[fpe_index]); - } - } - context_.arm = context_arm.release(); - - break; - } - - default: { - // Unknown context type - Don't log as an error yet. Let the - // caller work that out. - BPLOG(INFO) << "MinidumpContext unknown context type " << - HexString(cpu_type); - return false; - break; - } - } - context_flags_ = context_flags; - } - - valid_ = true; - return true; -} - - -u_int32_t MinidumpContext::GetContextCPU() const { - if (!valid_) { - // Don't log a message, GetContextCPU can be legitimately called with - // valid_ false by FreeContext, which is called by Read. - return 0; - } - - return context_flags_ & MD_CONTEXT_CPU_MASK; -} - - -const MDRawContextX86* MinidumpContext::GetContextX86() const { - if (GetContextCPU() != MD_CONTEXT_X86) { - BPLOG(ERROR) << "MinidumpContext cannot get x86 context"; - return NULL; - } - - return context_.x86; -} - - -const MDRawContextPPC* MinidumpContext::GetContextPPC() const { - if (GetContextCPU() != MD_CONTEXT_PPC) { - BPLOG(ERROR) << "MinidumpContext cannot get ppc context"; - return NULL; - } - - return context_.ppc; -} - -const MDRawContextAMD64* MinidumpContext::GetContextAMD64() const { - if (GetContextCPU() != MD_CONTEXT_AMD64) { - BPLOG(ERROR) << "MinidumpContext cannot get amd64 context"; - return NULL; - } - - return context_.amd64; -} - -const MDRawContextSPARC* MinidumpContext::GetContextSPARC() const { - if (GetContextCPU() != MD_CONTEXT_SPARC) { - BPLOG(ERROR) << "MinidumpContext cannot get sparc context"; - return NULL; - } - - return context_.ctx_sparc; -} - -const MDRawContextARM* MinidumpContext::GetContextARM() const { - if (GetContextCPU() != MD_CONTEXT_ARM) { - BPLOG(ERROR) << "MinidumpContext cannot get arm context"; - return NULL; - } - - return context_.arm; -} - -void MinidumpContext::FreeContext() { - switch (GetContextCPU()) { - case MD_CONTEXT_X86: - delete context_.x86; - break; - - case MD_CONTEXT_PPC: - delete context_.ppc; - break; - - case MD_CONTEXT_AMD64: - delete context_.amd64; - break; - - case MD_CONTEXT_SPARC: - delete context_.ctx_sparc; - break; - - case MD_CONTEXT_ARM: - delete context_.arm; - break; - - default: - // There is no context record (valid_ is false) or there's a - // context record for an unknown CPU (shouldn't happen, only known - // records are stored by Read). - break; - } - - context_flags_ = 0; - context_.base = NULL; -} - - -bool MinidumpContext::CheckAgainstSystemInfo(u_int32_t context_cpu_type) { - // It's OK if the minidump doesn't contain an MD_SYSTEM_INFO_STREAM, - // as this function just implements a sanity check. - MinidumpSystemInfo* system_info = minidump_->GetSystemInfo(); - if (!system_info) { - BPLOG(INFO) << "MinidumpContext could not be compared against " - "MinidumpSystemInfo"; - return true; - } - - // If there is an MD_SYSTEM_INFO_STREAM, it should contain valid system info. - const MDRawSystemInfo* raw_system_info = system_info->system_info(); - if (!raw_system_info) { - BPLOG(INFO) << "MinidumpContext could not be compared against " - "MDRawSystemInfo"; - return false; - } - - MDCPUArchitecture system_info_cpu_type = static_cast( - raw_system_info->processor_architecture); - - // Compare the CPU type of the context record to the CPU type in the - // minidump's system info stream. - bool return_value = false; - switch (context_cpu_type) { - case MD_CONTEXT_X86: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_X86 || - system_info_cpu_type == MD_CPU_ARCHITECTURE_X86_WIN64 || - system_info_cpu_type == MD_CPU_ARCHITECTURE_AMD64) { - return_value = true; - } - break; - - case MD_CONTEXT_PPC: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_PPC) - return_value = true; - break; - - case MD_CONTEXT_AMD64: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_AMD64) - return_value = true; - break; - - case MD_CONTEXT_SPARC: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_SPARC) - return_value = true; - break; - - case MD_CONTEXT_ARM: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_ARM) - return_value = true; - break; - } - - BPLOG_IF(ERROR, !return_value) << "MinidumpContext CPU " << - HexString(context_cpu_type) << - " wrong for MinidumpSystemInfo CPU " << - HexString(system_info_cpu_type); - - return return_value; -} - - -void MinidumpContext::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpContext cannot print invalid data"; - return; - } - - switch (GetContextCPU()) { - case MD_CONTEXT_X86: { - const MDRawContextX86* context_x86 = GetContextX86(); - printf("MDRawContextX86\n"); - printf(" context_flags = 0x%x\n", - context_x86->context_flags); - printf(" dr0 = 0x%x\n", context_x86->dr0); - printf(" dr1 = 0x%x\n", context_x86->dr1); - printf(" dr2 = 0x%x\n", context_x86->dr2); - printf(" dr3 = 0x%x\n", context_x86->dr3); - printf(" dr6 = 0x%x\n", context_x86->dr6); - printf(" dr7 = 0x%x\n", context_x86->dr7); - printf(" float_save.control_word = 0x%x\n", - context_x86->float_save.control_word); - printf(" float_save.status_word = 0x%x\n", - context_x86->float_save.status_word); - printf(" float_save.tag_word = 0x%x\n", - context_x86->float_save.tag_word); - printf(" float_save.error_offset = 0x%x\n", - context_x86->float_save.error_offset); - printf(" float_save.error_selector = 0x%x\n", - context_x86->float_save.error_selector); - printf(" float_save.data_offset = 0x%x\n", - context_x86->float_save.data_offset); - printf(" float_save.data_selector = 0x%x\n", - context_x86->float_save.data_selector); - printf(" float_save.register_area[%2d] = 0x", - MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE); - for (unsigned int register_index = 0; - register_index < MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE; - ++register_index) { - printf("%02x", context_x86->float_save.register_area[register_index]); - } - printf("\n"); - printf(" float_save.cr0_npx_state = 0x%x\n", - context_x86->float_save.cr0_npx_state); - printf(" gs = 0x%x\n", context_x86->gs); - printf(" fs = 0x%x\n", context_x86->fs); - printf(" es = 0x%x\n", context_x86->es); - printf(" ds = 0x%x\n", context_x86->ds); - printf(" edi = 0x%x\n", context_x86->edi); - printf(" esi = 0x%x\n", context_x86->esi); - printf(" ebx = 0x%x\n", context_x86->ebx); - printf(" edx = 0x%x\n", context_x86->edx); - printf(" ecx = 0x%x\n", context_x86->ecx); - printf(" eax = 0x%x\n", context_x86->eax); - printf(" ebp = 0x%x\n", context_x86->ebp); - printf(" eip = 0x%x\n", context_x86->eip); - printf(" cs = 0x%x\n", context_x86->cs); - printf(" eflags = 0x%x\n", context_x86->eflags); - printf(" esp = 0x%x\n", context_x86->esp); - printf(" ss = 0x%x\n", context_x86->ss); - printf(" extended_registers[%3d] = 0x", - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE); - for (unsigned int register_index = 0; - register_index < MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE; - ++register_index) { - printf("%02x", context_x86->extended_registers[register_index]); - } - printf("\n\n"); - - break; - } - - case MD_CONTEXT_PPC: { - const MDRawContextPPC* context_ppc = GetContextPPC(); - printf("MDRawContextPPC\n"); - printf(" context_flags = 0x%x\n", - context_ppc->context_flags); - printf(" srr0 = 0x%x\n", context_ppc->srr0); - printf(" srr1 = 0x%x\n", context_ppc->srr1); - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_PPC_GPR_COUNT; - ++gpr_index) { - printf(" gpr[%2d] = 0x%x\n", - gpr_index, context_ppc->gpr[gpr_index]); - } - printf(" cr = 0x%x\n", context_ppc->cr); - printf(" xer = 0x%x\n", context_ppc->xer); - printf(" lr = 0x%x\n", context_ppc->lr); - printf(" ctr = 0x%x\n", context_ppc->ctr); - printf(" mq = 0x%x\n", context_ppc->mq); - printf(" vrsave = 0x%x\n", context_ppc->vrsave); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; - ++fpr_index) { - printf(" float_save.fpregs[%2d] = 0x%" PRIx64 "\n", - fpr_index, context_ppc->float_save.fpregs[fpr_index]); - } - printf(" float_save.fpscr = 0x%x\n", - context_ppc->float_save.fpscr); - // TODO(mmentovai): print the 128-bit quantities in - // context_ppc->vector_save. This isn't done yet because printf - // doesn't support 128-bit quantities, and printing them using - // PRIx64 as two 64-bit quantities requires knowledge of the CPU's - // byte ordering. - printf(" vector_save.save_vrvalid = 0x%x\n", - context_ppc->vector_save.save_vrvalid); - printf("\n"); - - break; - } - - case MD_CONTEXT_AMD64: { - const MDRawContextAMD64* context_amd64 = GetContextAMD64(); - printf("MDRawContextAMD64\n"); - printf(" p1_home = 0x%" PRIx64 "\n", - context_amd64->p1_home); - printf(" p2_home = 0x%" PRIx64 "\n", - context_amd64->p2_home); - printf(" p3_home = 0x%" PRIx64 "\n", - context_amd64->p3_home); - printf(" p4_home = 0x%" PRIx64 "\n", - context_amd64->p4_home); - printf(" p5_home = 0x%" PRIx64 "\n", - context_amd64->p5_home); - printf(" p6_home = 0x%" PRIx64 "\n", - context_amd64->p6_home); - printf(" context_flags = 0x%x\n", - context_amd64->context_flags); - printf(" mx_csr = 0x%x\n", - context_amd64->mx_csr); - printf(" cs = 0x%x\n", context_amd64->cs); - printf(" ds = 0x%x\n", context_amd64->ds); - printf(" es = 0x%x\n", context_amd64->es); - printf(" fs = 0x%x\n", context_amd64->fs); - printf(" gs = 0x%x\n", context_amd64->gs); - printf(" ss = 0x%x\n", context_amd64->ss); - printf(" eflags = 0x%x\n", context_amd64->eflags); - printf(" dr0 = 0x%" PRIx64 "\n", context_amd64->dr0); - printf(" dr1 = 0x%" PRIx64 "\n", context_amd64->dr1); - printf(" dr2 = 0x%" PRIx64 "\n", context_amd64->dr2); - printf(" dr3 = 0x%" PRIx64 "\n", context_amd64->dr3); - printf(" dr6 = 0x%" PRIx64 "\n", context_amd64->dr6); - printf(" dr7 = 0x%" PRIx64 "\n", context_amd64->dr7); - printf(" rax = 0x%" PRIx64 "\n", context_amd64->rax); - printf(" rcx = 0x%" PRIx64 "\n", context_amd64->rcx); - printf(" rdx = 0x%" PRIx64 "\n", context_amd64->rdx); - printf(" rbx = 0x%" PRIx64 "\n", context_amd64->rbx); - printf(" rsp = 0x%" PRIx64 "\n", context_amd64->rsp); - printf(" rbp = 0x%" PRIx64 "\n", context_amd64->rbp); - printf(" rsi = 0x%" PRIx64 "\n", context_amd64->rsi); - printf(" rdi = 0x%" PRIx64 "\n", context_amd64->rdi); - printf(" r8 = 0x%" PRIx64 "\n", context_amd64->r8); - printf(" r9 = 0x%" PRIx64 "\n", context_amd64->r9); - printf(" r10 = 0x%" PRIx64 "\n", context_amd64->r10); - printf(" r11 = 0x%" PRIx64 "\n", context_amd64->r11); - printf(" r12 = 0x%" PRIx64 "\n", context_amd64->r12); - printf(" r13 = 0x%" PRIx64 "\n", context_amd64->r13); - printf(" r14 = 0x%" PRIx64 "\n", context_amd64->r14); - printf(" r15 = 0x%" PRIx64 "\n", context_amd64->r15); - printf(" rip = 0x%" PRIx64 "\n", context_amd64->rip); - //TODO: print xmm, vector, debug registers - printf("\n"); - break; - } - - case MD_CONTEXT_SPARC: { - const MDRawContextSPARC* context_sparc = GetContextSPARC(); - printf("MDRawContextSPARC\n"); - printf(" context_flags = 0x%x\n", - context_sparc->context_flags); - for (unsigned int g_r_index = 0; - g_r_index < MD_CONTEXT_SPARC_GPR_COUNT; - ++g_r_index) { - printf(" g_r[%2d] = 0x%" PRIx64 "\n", - g_r_index, context_sparc->g_r[g_r_index]); - } - printf(" ccr = 0x%" PRIx64 "\n", context_sparc->ccr); - printf(" pc = 0x%" PRIx64 "\n", context_sparc->pc); - printf(" npc = 0x%" PRIx64 "\n", context_sparc->npc); - printf(" y = 0x%" PRIx64 "\n", context_sparc->y); - printf(" asi = 0x%" PRIx64 "\n", context_sparc->asi); - printf(" fprs = 0x%" PRIx64 "\n", context_sparc->fprs); - - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT; - ++fpr_index) { - printf(" float_save.regs[%2d] = 0x%" PRIx64 "\n", - fpr_index, context_sparc->float_save.regs[fpr_index]); - } - printf(" float_save.filler = 0x%" PRIx64 "\n", - context_sparc->float_save.filler); - printf(" float_save.fsr = 0x%" PRIx64 "\n", - context_sparc->float_save.fsr); - break; - } - - case MD_CONTEXT_ARM: { - const MDRawContextARM* context_arm = GetContextARM(); - printf("MDRawContextARM\n"); - printf(" context_flags = 0x%x\n", - context_arm->context_flags); - for (unsigned int ireg_index = 0; - ireg_index < MD_CONTEXT_ARM_GPR_COUNT; - ++ireg_index) { - printf(" iregs[%2d] = 0x%x\n", - ireg_index, context_arm->iregs[ireg_index]); - } - printf(" cpsr = 0x%x\n", context_arm->cpsr); - printf(" float_save.fpscr = 0x%" PRIx64 "\n", - context_arm->float_save.fpscr); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_ARM_FPR_COUNT; - ++fpr_index) { - printf(" float_save.regs[%2d] = 0x%" PRIx64 "\n", - fpr_index, context_arm->float_save.regs[fpr_index]); - } - for (unsigned int fpe_index = 0; - fpe_index < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT; - ++fpe_index) { - printf(" float_save.extra[%2d] = 0x%" PRIx32 "\n", - fpe_index, context_arm->float_save.extra[fpe_index]); - } - - break; - } - - default: { - break; - } - } -} - - -// -// MinidumpMemoryRegion -// - - -u_int32_t MinidumpMemoryRegion::max_bytes_ = 1024 * 1024; // 1MB - - -MinidumpMemoryRegion::MinidumpMemoryRegion(Minidump* minidump) - : MinidumpObject(minidump), - descriptor_(NULL), - memory_(NULL) { -} - - -MinidumpMemoryRegion::~MinidumpMemoryRegion() { - delete memory_; -} - - -void MinidumpMemoryRegion::SetDescriptor(MDMemoryDescriptor* descriptor) { - descriptor_ = descriptor; - valid_ = descriptor && - descriptor_->memory.data_size <= - numeric_limits::max() - - descriptor_->start_of_memory_range; -} - - -const u_int8_t* MinidumpMemoryRegion::GetMemory() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetMemory"; - return NULL; - } - - if (!memory_) { - if (descriptor_->memory.data_size == 0) { - BPLOG(ERROR) << "MinidumpMemoryRegion is empty"; - return NULL; - } - - if (!minidump_->SeekSet(descriptor_->memory.rva)) { - BPLOG(ERROR) << "MinidumpMemoryRegion could not seek to memory region"; - return NULL; - } - - if (descriptor_->memory.data_size > max_bytes_) { - BPLOG(ERROR) << "MinidumpMemoryRegion size " << - descriptor_->memory.data_size << " exceeds maximum " << - max_bytes_; - return NULL; - } - - scoped_ptr< vector > memory( - new vector(descriptor_->memory.data_size)); - - if (!minidump_->ReadBytes(&(*memory)[0], descriptor_->memory.data_size)) { - BPLOG(ERROR) << "MinidumpMemoryRegion could not read memory region"; - return NULL; - } - - memory_ = memory.release(); - } - - return &(*memory_)[0]; -} - - -u_int64_t MinidumpMemoryRegion::GetBase() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetBase"; - return static_cast(-1); - } - - return descriptor_->start_of_memory_range; -} - - -u_int32_t MinidumpMemoryRegion::GetSize() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetSize"; - return 0; - } - - return descriptor_->memory.data_size; -} - - -void MinidumpMemoryRegion::FreeMemory() { - delete memory_; - memory_ = NULL; -} - - -template -bool MinidumpMemoryRegion::GetMemoryAtAddressInternal(u_int64_t address, - T* value) const { - BPLOG_IF(ERROR, !value) << "MinidumpMemoryRegion::GetMemoryAtAddressInternal " - "requires |value|"; - assert(value); - *value = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for " - "GetMemoryAtAddressInternal"; - return false; - } - - // Common failure case - if (address < descriptor_->start_of_memory_range || - sizeof(T) > numeric_limits::max() - address || - address + sizeof(T) > descriptor_->start_of_memory_range + - descriptor_->memory.data_size) { - BPLOG(INFO) << "MinidumpMemoryRegion request out of range: " << - HexString(address) << "+" << sizeof(T) << "/" << - HexString(descriptor_->start_of_memory_range) << "+" << - HexString(descriptor_->memory.data_size); - return false; - } - - const u_int8_t* memory = GetMemory(); - if (!memory) { - // GetMemory already logged a perfectly good message. - return false; - } - - // If the CPU requires memory accesses to be aligned, this can crash. - // x86 and ppc are able to cope, though. - *value = *reinterpret_cast( - &memory[address - descriptor_->start_of_memory_range]); - - if (minidump_->swap()) - Swap(value); - - return true; -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int8_t* value) const { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int16_t* value) const { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int32_t* value) const { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int64_t* value) const { - return GetMemoryAtAddressInternal(address, value); -} - - -void MinidumpMemoryRegion::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryRegion cannot print invalid data"; - return; - } - - const u_int8_t* memory = GetMemory(); - if (memory) { - printf("0x"); - for (unsigned int byte_index = 0; - byte_index < descriptor_->memory.data_size; - byte_index++) { - printf("%02x", memory[byte_index]); - } - printf("\n"); - } else { - printf("No memory\n"); - } -} - - -// -// MinidumpThread -// - - -MinidumpThread::MinidumpThread(Minidump* minidump) - : MinidumpObject(minidump), - thread_(), - memory_(NULL), - context_(NULL) { -} - - -MinidumpThread::~MinidumpThread() { - delete memory_; - delete context_; -} - - -bool MinidumpThread::Read() { - // Invalidate cached data. - delete memory_; - memory_ = NULL; - delete context_; - context_ = NULL; - - valid_ = false; - - if (!minidump_->ReadBytes(&thread_, sizeof(thread_))) { - BPLOG(ERROR) << "MinidumpThread cannot read thread"; - return false; - } - - if (minidump_->swap()) { - Swap(&thread_.thread_id); - Swap(&thread_.suspend_count); - Swap(&thread_.priority_class); - Swap(&thread_.priority); - Swap(&thread_.teb); - Swap(&thread_.stack); - Swap(&thread_.thread_context); - } - - // Check for base + size overflow or undersize. - if (thread_.stack.memory.data_size == 0 || - thread_.stack.memory.data_size > numeric_limits::max() - - thread_.stack.start_of_memory_range) { - BPLOG(ERROR) << "MinidumpThread has a memory region problem, " << - HexString(thread_.stack.start_of_memory_range) << "+" << - HexString(thread_.stack.memory.data_size); - return false; - } - - memory_ = new MinidumpMemoryRegion(minidump_); - memory_->SetDescriptor(&thread_.stack); - - valid_ = true; - return true; -} - - -MinidumpMemoryRegion* MinidumpThread::GetMemory() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetMemory"; - return NULL; - } - - return memory_; -} - - -MinidumpContext* MinidumpThread::GetContext() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetContext"; - return NULL; - } - - if (!context_) { - if (!minidump_->SeekSet(thread_.thread_context.rva)) { - BPLOG(ERROR) << "MinidumpThread cannot seek to context"; - return NULL; - } - - scoped_ptr context(new MinidumpContext(minidump_)); - - if (!context->Read(thread_.thread_context.data_size)) { - BPLOG(ERROR) << "MinidumpThread cannot read context"; - return NULL; - } - - context_ = context.release(); - } - - return context_; -} - - -bool MinidumpThread::GetThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpThread::GetThreadID requires " - "|thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetThreadID"; - return false; - } - - *thread_id = thread_.thread_id; - return true; -} - - -void MinidumpThread::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpThread cannot print invalid data"; - return; - } - - printf("MDRawThread\n"); - printf(" thread_id = 0x%x\n", thread_.thread_id); - printf(" suspend_count = %d\n", thread_.suspend_count); - printf(" priority_class = 0x%x\n", thread_.priority_class); - printf(" priority = 0x%x\n", thread_.priority); - printf(" teb = 0x%" PRIx64 "\n", thread_.teb); - printf(" stack.start_of_memory_range = 0x%" PRIx64 "\n", - thread_.stack.start_of_memory_range); - printf(" stack.memory.data_size = 0x%x\n", - thread_.stack.memory.data_size); - printf(" stack.memory.rva = 0x%x\n", thread_.stack.memory.rva); - printf(" thread_context.data_size = 0x%x\n", - thread_.thread_context.data_size); - printf(" thread_context.rva = 0x%x\n", - thread_.thread_context.rva); - - MinidumpContext* context = GetContext(); - if (context) { - printf("\n"); - context->Print(); - } else { - printf(" (no context)\n"); - printf("\n"); - } - - MinidumpMemoryRegion* memory = GetMemory(); - if (memory) { - printf("Stack\n"); - memory->Print(); - } else { - printf("No stack\n"); - } - printf("\n"); -} - - -// -// MinidumpThreadList -// - - -u_int32_t MinidumpThreadList::max_threads_ = 4096; - - -MinidumpThreadList::MinidumpThreadList(Minidump* minidump) - : MinidumpStream(minidump), - id_to_thread_map_(), - threads_(NULL), - thread_count_(0) { -} - - -MinidumpThreadList::~MinidumpThreadList() { - delete threads_; -} - - -bool MinidumpThreadList::Read(u_int32_t expected_size) { - // Invalidate cached data. - id_to_thread_map_.clear(); - delete threads_; - threads_ = NULL; - thread_count_ = 0; - - valid_ = false; - - u_int32_t thread_count; - if (expected_size < sizeof(thread_count)) { - BPLOG(ERROR) << "MinidumpThreadList count size mismatch, " << - expected_size << " < " << sizeof(thread_count); - return false; - } - if (!minidump_->ReadBytes(&thread_count, sizeof(thread_count))) { - BPLOG(ERROR) << "MinidumpThreadList cannot read thread count"; - return false; - } - - if (minidump_->swap()) - Swap(&thread_count); - - if (thread_count > numeric_limits::max() / sizeof(MDRawThread)) { - BPLOG(ERROR) << "MinidumpThreadList thread count " << thread_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(thread_count) + - thread_count * sizeof(MDRawThread)) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(thread_count) + 4 + - thread_count * sizeof(MDRawThread)) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpThreadList cannot read threadlist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpThreadList size mismatch, " << expected_size << - " != " << sizeof(thread_count) + - thread_count * sizeof(MDRawThread); - return false; - } - } - - - if (thread_count > max_threads_) { - BPLOG(ERROR) << "MinidumpThreadList count " << thread_count << - " exceeds maximum " << max_threads_; - return false; - } - - if (thread_count != 0) { - scoped_ptr threads( - new MinidumpThreads(thread_count, MinidumpThread(minidump_))); - - for (unsigned int thread_index = 0; - thread_index < thread_count; - ++thread_index) { - MinidumpThread* thread = &(*threads)[thread_index]; - - // Assume that the file offset is correct after the last read. - if (!thread->Read()) { - BPLOG(ERROR) << "MinidumpThreadList cannot read thread " << - thread_index << "/" << thread_count; - return false; - } - - u_int32_t thread_id; - if (!thread->GetThreadID(&thread_id)) { - BPLOG(ERROR) << "MinidumpThreadList cannot get thread ID for thread " << - thread_index << "/" << thread_count; - return false; - } - - if (GetThreadByID(thread_id)) { - // Another thread with this ID is already in the list. Data error. - BPLOG(ERROR) << "MinidumpThreadList found multiple threads with ID " << - HexString(thread_id) << " at thread " << - thread_index << "/" << thread_count; - return false; - } - id_to_thread_map_[thread_id] = thread; - } - - threads_ = threads.release(); - } - - thread_count_ = thread_count; - - valid_ = true; - return true; -} - - -MinidumpThread* MinidumpThreadList::GetThreadAtIndex(unsigned int index) - const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThreadList for GetThreadAtIndex"; - return NULL; - } - - if (index >= thread_count_) { - BPLOG(ERROR) << "MinidumpThreadList index out of range: " << - index << "/" << thread_count_; - return NULL; - } - - return &(*threads_)[index]; -} - - -MinidumpThread* MinidumpThreadList::GetThreadByID(u_int32_t thread_id) { - // Don't check valid_. Read calls this method before everything is - // validated. It is safe to not check valid_ here. - return id_to_thread_map_[thread_id]; -} - - -void MinidumpThreadList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpThreadList cannot print invalid data"; - return; - } - - printf("MinidumpThreadList\n"); - printf(" thread_count = %d\n", thread_count_); - printf("\n"); - - for (unsigned int thread_index = 0; - thread_index < thread_count_; - ++thread_index) { - printf("thread[%d]\n", thread_index); - - (*threads_)[thread_index].Print(); - } -} - - -// -// MinidumpModule -// - - -u_int32_t MinidumpModule::max_cv_bytes_ = 32768; -u_int32_t MinidumpModule::max_misc_bytes_ = 32768; - - -MinidumpModule::MinidumpModule(Minidump* minidump) - : MinidumpObject(minidump), - module_valid_(false), - has_debug_info_(false), - module_(), - name_(NULL), - cv_record_(NULL), - cv_record_signature_(MD_CVINFOUNKNOWN_SIGNATURE), - misc_record_(NULL) { -} - - -MinidumpModule::~MinidumpModule() { - delete name_; - delete cv_record_; - delete misc_record_; -} - - -bool MinidumpModule::Read() { - // Invalidate cached data. - delete name_; - name_ = NULL; - delete cv_record_; - cv_record_ = NULL; - cv_record_signature_ = MD_CVINFOUNKNOWN_SIGNATURE; - delete misc_record_; - misc_record_ = NULL; - - module_valid_ = false; - has_debug_info_ = false; - valid_ = false; - - if (!minidump_->ReadBytes(&module_, MD_MODULE_SIZE)) { - BPLOG(ERROR) << "MinidumpModule cannot read module"; - return false; - } - - if (minidump_->swap()) { - Swap(&module_.base_of_image); - Swap(&module_.size_of_image); - Swap(&module_.checksum); - Swap(&module_.time_date_stamp); - Swap(&module_.module_name_rva); - Swap(&module_.version_info.signature); - Swap(&module_.version_info.struct_version); - Swap(&module_.version_info.file_version_hi); - Swap(&module_.version_info.file_version_lo); - Swap(&module_.version_info.product_version_hi); - Swap(&module_.version_info.product_version_lo); - Swap(&module_.version_info.file_flags_mask); - Swap(&module_.version_info.file_flags); - Swap(&module_.version_info.file_os); - Swap(&module_.version_info.file_type); - Swap(&module_.version_info.file_subtype); - Swap(&module_.version_info.file_date_hi); - Swap(&module_.version_info.file_date_lo); - Swap(&module_.cv_record); - Swap(&module_.misc_record); - // Don't swap reserved fields because their contents are unknown (as - // are their proper widths). - } - - // Check for base + size overflow or undersize. - if (module_.size_of_image == 0 || - module_.size_of_image > - numeric_limits::max() - module_.base_of_image) { - BPLOG(ERROR) << "MinidumpModule has a module problem, " << - HexString(module_.base_of_image) << "+" << - HexString(module_.size_of_image); - return false; - } - - module_valid_ = true; - return true; -} - - -bool MinidumpModule::ReadAuxiliaryData() { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for ReadAuxiliaryData"; - return false; - } - - // Each module must have a name. - name_ = minidump_->ReadString(module_.module_name_rva); - if (!name_) { - BPLOG(ERROR) << "MinidumpModule could not read name"; - return false; - } - - // At this point, we have enough info for the module to be valid. - valid_ = true; - - // CodeView and miscellaneous debug records are only required if the - // module indicates that they exist. - if (module_.cv_record.data_size && !GetCVRecord(NULL)) { - BPLOG(ERROR) << "MinidumpModule has no CodeView record, " - "but one was expected"; - return false; - } - - if (module_.misc_record.data_size && !GetMiscRecord(NULL)) { - BPLOG(ERROR) << "MinidumpModule has no miscellaneous debug record, " - "but one was expected"; - return false; - } - - has_debug_info_ = true; - return true; -} - - -string MinidumpModule::code_file() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for code_file"; - return ""; - } - - return *name_; -} - - -string MinidumpModule::code_identifier() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for code_identifier"; - return ""; - } - - if (!has_debug_info_) - return ""; - - MinidumpSystemInfo *minidump_system_info = minidump_->GetSystemInfo(); - if (!minidump_system_info) { - BPLOG(ERROR) << "MinidumpModule code_identifier requires " - "MinidumpSystemInfo"; - return ""; - } - - const MDRawSystemInfo *raw_system_info = minidump_system_info->system_info(); - if (!raw_system_info) { - BPLOG(ERROR) << "MinidumpModule code_identifier requires MDRawSystemInfo"; - return ""; - } - - string identifier; - - switch (raw_system_info->platform_id) { - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: { - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[17]; - snprintf(identifier_string, sizeof(identifier_string), "%08X%x", - module_.time_date_stamp, module_.size_of_image); - identifier = identifier_string; - break; - } - - case MD_OS_MAC_OS_X: - case MD_OS_SOLARIS: - case MD_OS_LINUX: { - // TODO(mmentovai): support uuid extension if present, otherwise fall - // back to version (from LC_ID_DYLIB?), otherwise fall back to something - // else. - identifier = "id"; - break; - } - - default: { - // Without knowing what OS generated the dump, we can't generate a good - // identifier. Return an empty string, signalling failure. - BPLOG(ERROR) << "MinidumpModule code_identifier requires known platform, " - "found " << HexString(raw_system_info->platform_id); - break; - } - } - - return identifier; -} - - -string MinidumpModule::debug_file() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for debug_file"; - return ""; - } - - if (!has_debug_info_) - return ""; - - string file; - // Prefer the CodeView record if present. - if (cv_record_) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - // It's actually an MDCVInfoPDB70 structure. - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - // GetCVRecord guarantees pdb_file_name is null-terminated. - file = reinterpret_cast(cv_record_70->pdb_file_name); - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - // It's actually an MDCVInfoPDB20 structure. - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - // GetCVRecord guarantees pdb_file_name is null-terminated. - file = reinterpret_cast(cv_record_20->pdb_file_name); - } - - // If there's a CodeView record but it doesn't match a known signature, - // try the miscellaneous record. - } - - if (file.empty()) { - // No usable CodeView record. Try the miscellaneous debug record. - if (misc_record_) { - const MDImageDebugMisc* misc_record = - reinterpret_cast(&(*misc_record_)[0]); - if (!misc_record->unicode) { - // If it's not Unicode, just stuff it into the string. It's unclear - // if misc_record->data is 0-terminated, so use an explicit size. - file = string( - reinterpret_cast(misc_record->data), - module_.misc_record.data_size - MDImageDebugMisc_minsize); - } else { - // There's a misc_record but it encodes the debug filename in UTF-16. - // (Actually, because miscellaneous records are so old, it's probably - // UCS-2.) Convert it to UTF-8 for congruity with the other strings - // that this method (and all other methods in the Minidump family) - // return. - - unsigned int bytes = - module_.misc_record.data_size - MDImageDebugMisc_minsize; - if (bytes % 2 == 0) { - unsigned int utf16_words = bytes / 2; - - // UTF16ToUTF8 expects a vector, so create a temporary one - // and copy the UTF-16 data into it. - vector string_utf16(utf16_words); - if (utf16_words) - memcpy(&string_utf16[0], &misc_record->data, bytes); - - // GetMiscRecord already byte-swapped the data[] field if it contains - // UTF-16, so pass false as the swap argument. - scoped_ptr new_file(UTF16ToUTF8(string_utf16, false)); - file = *new_file; - } - } - } - } - - // Relatively common case - BPLOG_IF(INFO, file.empty()) << "MinidumpModule could not determine " - "debug_file for " << *name_; - - return file; -} - - -string MinidumpModule::debug_identifier() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for debug_identifier"; - return ""; - } - - if (!has_debug_info_) - return ""; - - string identifier; - - // Use the CodeView record if present. - if (cv_record_) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - // It's actually an MDCVInfoPDB70 structure. - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[41]; - snprintf(identifier_string, sizeof(identifier_string), - "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%x", - cv_record_70->signature.data1, - cv_record_70->signature.data2, - cv_record_70->signature.data3, - cv_record_70->signature.data4[0], - cv_record_70->signature.data4[1], - cv_record_70->signature.data4[2], - cv_record_70->signature.data4[3], - cv_record_70->signature.data4[4], - cv_record_70->signature.data4[5], - cv_record_70->signature.data4[6], - cv_record_70->signature.data4[7], - cv_record_70->age); - identifier = identifier_string; - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - // It's actually an MDCVInfoPDB20 structure. - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[17]; - snprintf(identifier_string, sizeof(identifier_string), - "%08X%x", cv_record_20->signature, cv_record_20->age); - identifier = identifier_string; - } - } - - // TODO(mmentovai): if there's no usable CodeView record, there might be a - // miscellaneous debug record. It only carries a filename, though, and no - // identifier. I'm not sure what the right thing to do for the identifier - // is in that case, but I don't expect to find many modules without a - // CodeView record (or some other Breakpad extension structure in place of - // a CodeView record). Treat it as an error (empty identifier) for now. - - // TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier(). - - // Relatively common case - BPLOG_IF(INFO, identifier.empty()) << "MinidumpModule could not determine " - "debug_identifier for " << *name_; - - return identifier; -} - - -string MinidumpModule::version() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for version"; - return ""; - } - - string version; - - if (module_.version_info.signature == MD_VSFIXEDFILEINFO_SIGNATURE && - module_.version_info.struct_version & MD_VSFIXEDFILEINFO_VERSION) { - char version_string[24]; - snprintf(version_string, sizeof(version_string), "%u.%u.%u.%u", - module_.version_info.file_version_hi >> 16, - module_.version_info.file_version_hi & 0xffff, - module_.version_info.file_version_lo >> 16, - module_.version_info.file_version_lo & 0xffff); - version = version_string; - } - - // TODO(mmentovai): possibly support other struct types in place of - // the one used with MD_VSFIXEDFILEINFO_SIGNATURE. We can possibly use - // a different structure that better represents versioning facilities on - // Mac OS X and Linux, instead of forcing them to adhere to the dotted - // quad of 16-bit ints that Windows uses. - - BPLOG_IF(INFO, version.empty()) << "MinidumpModule could not determine " - "version for " << *name_; - - return version; -} - - -const CodeModule* MinidumpModule::Copy() const { - return new BasicCodeModule(this); -} - - -const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for GetCVRecord"; - return NULL; - } - - if (!cv_record_) { - // This just guards against 0-sized CodeView records; more specific checks - // are used when the signature is checked against various structure types. - if (module_.cv_record.data_size == 0) { - return NULL; - } - - if (!minidump_->SeekSet(module_.cv_record.rva)) { - BPLOG(ERROR) << "MinidumpModule could not seek to CodeView record"; - return NULL; - } - - if (module_.cv_record.data_size > max_cv_bytes_) { - BPLOG(ERROR) << "MinidumpModule CodeView record size " << - module_.cv_record.data_size << " exceeds maximum " << - max_cv_bytes_; - return NULL; - } - - // Allocating something that will be accessed as MDCVInfoPDB70 or - // MDCVInfoPDB20 but is allocated as u_int8_t[] can cause alignment - // problems. x86 and ppc are able to cope, though. This allocation - // style is needed because the MDCVInfoPDB70 or MDCVInfoPDB20 are - // variable-sized due to their pdb_file_name fields; these structures - // are not MDCVInfoPDB70_minsize or MDCVInfoPDB20_minsize and treating - // them as such would result in incomplete structures or overruns. - scoped_ptr< vector > cv_record( - new vector(module_.cv_record.data_size)); - - if (!minidump_->ReadBytes(&(*cv_record)[0], module_.cv_record.data_size)) { - BPLOG(ERROR) << "MinidumpModule could not read CodeView record"; - return NULL; - } - - u_int32_t signature = MD_CVINFOUNKNOWN_SIGNATURE; - if (module_.cv_record.data_size > sizeof(signature)) { - MDCVInfoPDB70* cv_record_signature = - reinterpret_cast(&(*cv_record)[0]); - signature = cv_record_signature->cv_signature; - if (minidump_->swap()) - Swap(&signature); - } - - if (signature == MD_CVINFOPDB70_SIGNATURE) { - // Now that the structure type is known, recheck the size. - if (MDCVInfoPDB70_minsize > module_.cv_record.data_size) { - BPLOG(ERROR) << "MinidumpModule CodeView7 record size mismatch, " << - MDCVInfoPDB70_minsize << " > " << - module_.cv_record.data_size; - return NULL; - } - - if (minidump_->swap()) { - MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record)[0]); - Swap(&cv_record_70->cv_signature); - Swap(&cv_record_70->signature); - Swap(&cv_record_70->age); - // Don't swap cv_record_70.pdb_file_name because it's an array of 8-bit - // quantities. (It's a path, is it UTF-8?) - } - - // The last field of either structure is null-terminated 8-bit character - // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { - BPLOG(ERROR) << "MinidumpModule CodeView7 record string is not " - "0-terminated"; - return NULL; - } - } else if (signature == MD_CVINFOPDB20_SIGNATURE) { - // Now that the structure type is known, recheck the size. - if (MDCVInfoPDB20_minsize > module_.cv_record.data_size) { - BPLOG(ERROR) << "MinidumpModule CodeView2 record size mismatch, " << - MDCVInfoPDB20_minsize << " > " << - module_.cv_record.data_size; - return NULL; - } - if (minidump_->swap()) { - MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record)[0]); - Swap(&cv_record_20->cv_header.signature); - Swap(&cv_record_20->cv_header.offset); - Swap(&cv_record_20->signature); - Swap(&cv_record_20->age); - // Don't swap cv_record_20.pdb_file_name because it's an array of 8-bit - // quantities. (It's a path, is it UTF-8?) - } - - // The last field of either structure is null-terminated 8-bit character - // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { - BPLOG(ERROR) << "MindumpModule CodeView2 record string is not " - "0-terminated"; - return NULL; - } - } - - // If the signature doesn't match something above, it's not something - // that Breakpad can presently handle directly. Because some modules in - // the wild contain such CodeView records as MD_CVINFOCV50_SIGNATURE, - // don't bail out here - allow the data to be returned to the user, - // although byte-swapping can't be done. - - // Store the vector type because that's how storage was allocated, but - // return it casted to u_int8_t*. - cv_record_ = cv_record.release(); - cv_record_signature_ = signature; - } - - if (size) - *size = module_.cv_record.data_size; - - return &(*cv_record_)[0]; -} - - -const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for GetMiscRecord"; - return NULL; - } - - if (!misc_record_) { - if (module_.misc_record.data_size == 0) { - return NULL; - } - - if (MDImageDebugMisc_minsize > module_.misc_record.data_size) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record " - "size mismatch, " << MDImageDebugMisc_minsize << " > " << - module_.misc_record.data_size; - return NULL; - } - - if (!minidump_->SeekSet(module_.misc_record.rva)) { - BPLOG(ERROR) << "MinidumpModule could not seek to miscellaneous " - "debugging record"; - return NULL; - } - - if (module_.misc_record.data_size > max_misc_bytes_) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record size " << - module_.misc_record.data_size << " exceeds maximum " << - max_misc_bytes_; - return NULL; - } - - // Allocating something that will be accessed as MDImageDebugMisc but - // is allocated as u_int8_t[] can cause alignment problems. x86 and - // ppc are able to cope, though. This allocation style is needed - // because the MDImageDebugMisc is variable-sized due to its data field; - // this structure is not MDImageDebugMisc_minsize and treating it as such - // would result in an incomplete structure or an overrun. - scoped_ptr< vector > misc_record_mem( - new vector(module_.misc_record.data_size)); - MDImageDebugMisc* misc_record = - reinterpret_cast(&(*misc_record_mem)[0]); - - if (!minidump_->ReadBytes(misc_record, module_.misc_record.data_size)) { - BPLOG(ERROR) << "MinidumpModule could not read miscellaneous debugging " - "record"; - return NULL; - } - - if (minidump_->swap()) { - Swap(&misc_record->data_type); - Swap(&misc_record->length); - // Don't swap misc_record.unicode because it's an 8-bit quantity. - // Don't swap the reserved fields for the same reason, and because - // they don't contain any valid data. - if (misc_record->unicode) { - // There is a potential alignment problem, but shouldn't be a problem - // in practice due to the layout of MDImageDebugMisc. - u_int16_t* data16 = reinterpret_cast(&(misc_record->data)); - unsigned int dataBytes = module_.misc_record.data_size - - MDImageDebugMisc_minsize; - unsigned int dataLength = dataBytes / 2; - for (unsigned int characterIndex = 0; - characterIndex < dataLength; - ++characterIndex) { - Swap(&data16[characterIndex]); - } - } - } - - if (module_.misc_record.data_size != misc_record->length) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record data " - "size mismatch, " << module_.misc_record.data_size << - " != " << misc_record->length; - return NULL; - } - - // Store the vector type because that's how storage was allocated, but - // return it casted to MDImageDebugMisc*. - misc_record_ = misc_record_mem.release(); - } - - if (size) - *size = module_.misc_record.data_size; - - return reinterpret_cast(&(*misc_record_)[0]); -} - - -void MinidumpModule::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpModule cannot print invalid data"; - return; - } - - printf("MDRawModule\n"); - printf(" base_of_image = 0x%" PRIx64 "\n", - module_.base_of_image); - printf(" size_of_image = 0x%x\n", - module_.size_of_image); - printf(" checksum = 0x%x\n", - module_.checksum); - printf(" time_date_stamp = 0x%x\n", - module_.time_date_stamp); - printf(" module_name_rva = 0x%x\n", - module_.module_name_rva); - printf(" version_info.signature = 0x%x\n", - module_.version_info.signature); - printf(" version_info.struct_version = 0x%x\n", - module_.version_info.struct_version); - printf(" version_info.file_version = 0x%x:0x%x\n", - module_.version_info.file_version_hi, - module_.version_info.file_version_lo); - printf(" version_info.product_version = 0x%x:0x%x\n", - module_.version_info.product_version_hi, - module_.version_info.product_version_lo); - printf(" version_info.file_flags_mask = 0x%x\n", - module_.version_info.file_flags_mask); - printf(" version_info.file_flags = 0x%x\n", - module_.version_info.file_flags); - printf(" version_info.file_os = 0x%x\n", - module_.version_info.file_os); - printf(" version_info.file_type = 0x%x\n", - module_.version_info.file_type); - printf(" version_info.file_subtype = 0x%x\n", - module_.version_info.file_subtype); - printf(" version_info.file_date = 0x%x:0x%x\n", - module_.version_info.file_date_hi, - module_.version_info.file_date_lo); - printf(" cv_record.data_size = %d\n", - module_.cv_record.data_size); - printf(" cv_record.rva = 0x%x\n", - module_.cv_record.rva); - printf(" misc_record.data_size = %d\n", - module_.misc_record.data_size); - printf(" misc_record.rva = 0x%x\n", - module_.misc_record.rva); - - printf(" (code_file) = \"%s\"\n", code_file().c_str()); - printf(" (code_identifier) = \"%s\"\n", - code_identifier().c_str()); - - u_int32_t cv_record_size; - const u_int8_t *cv_record = GetCVRecord(&cv_record_size); - if (cv_record) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(cv_record); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - printf(" (cv_record).cv_signature = 0x%x\n", - cv_record_70->cv_signature); - printf(" (cv_record).signature = %08x-%04x-%04x-%02x%02x-", - cv_record_70->signature.data1, - cv_record_70->signature.data2, - cv_record_70->signature.data3, - cv_record_70->signature.data4[0], - cv_record_70->signature.data4[1]); - for (unsigned int guidIndex = 2; - guidIndex < 8; - ++guidIndex) { - printf("%02x", cv_record_70->signature.data4[guidIndex]); - } - printf("\n"); - printf(" (cv_record).age = %d\n", - cv_record_70->age); - printf(" (cv_record).pdb_file_name = \"%s\"\n", - cv_record_70->pdb_file_name); - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(cv_record); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - printf(" (cv_record).cv_header.signature = 0x%x\n", - cv_record_20->cv_header.signature); - printf(" (cv_record).cv_header.offset = 0x%x\n", - cv_record_20->cv_header.offset); - printf(" (cv_record).signature = 0x%x\n", - cv_record_20->signature); - printf(" (cv_record).age = %d\n", - cv_record_20->age); - printf(" (cv_record).pdb_file_name = \"%s\"\n", - cv_record_20->pdb_file_name); - } else { - printf(" (cv_record) = "); - for (unsigned int cv_byte_index = 0; - cv_byte_index < cv_record_size; - ++cv_byte_index) { - printf("%02x", cv_record[cv_byte_index]); - } - printf("\n"); - } - } else { - printf(" (cv_record) = (null)\n"); - } - - const MDImageDebugMisc* misc_record = GetMiscRecord(NULL); - if (misc_record) { - printf(" (misc_record).data_type = 0x%x\n", - misc_record->data_type); - printf(" (misc_record).length = 0x%x\n", - misc_record->length); - printf(" (misc_record).unicode = %d\n", - misc_record->unicode); - // Don't bother printing the UTF-16, we don't really even expect to ever - // see this misc_record anyway. - if (misc_record->unicode) - printf(" (misc_record).data = \"%s\"\n", - misc_record->data); - else - printf(" (misc_record).data = (UTF-16)\n"); - } else { - printf(" (misc_record) = (null)\n"); - } - - printf(" (debug_file) = \"%s\"\n", debug_file().c_str()); - printf(" (debug_identifier) = \"%s\"\n", - debug_identifier().c_str()); - printf(" (version) = \"%s\"\n", version().c_str()); - printf("\n"); -} - - -// -// MinidumpModuleList -// - - -u_int32_t MinidumpModuleList::max_modules_ = 1024; - - -MinidumpModuleList::MinidumpModuleList(Minidump* minidump) - : MinidumpStream(minidump), - range_map_(new RangeMap()), - modules_(NULL), - module_count_(0) { -} - - -MinidumpModuleList::~MinidumpModuleList() { - delete range_map_; - delete modules_; -} - - -bool MinidumpModuleList::Read(u_int32_t expected_size) { - // Invalidate cached data. - range_map_->Clear(); - delete modules_; - modules_ = NULL; - module_count_ = 0; - - valid_ = false; - - u_int32_t module_count; - if (expected_size < sizeof(module_count)) { - BPLOG(ERROR) << "MinidumpModuleList count size mismatch, " << - expected_size << " < " << sizeof(module_count); - return false; - } - if (!minidump_->ReadBytes(&module_count, sizeof(module_count))) { - BPLOG(ERROR) << "MinidumpModuleList could not read module count"; - return false; - } - - if (minidump_->swap()) - Swap(&module_count); - - if (module_count > numeric_limits::max() / MD_MODULE_SIZE) { - BPLOG(ERROR) << "MinidumpModuleList module count " << module_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(module_count) + - module_count * MD_MODULE_SIZE) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(module_count) + 4 + - module_count * MD_MODULE_SIZE) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpModuleList cannot read modulelist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpModuleList size mismatch, " << expected_size << - " != " << sizeof(module_count) + - module_count * MD_MODULE_SIZE; - return false; - } - } - - if (module_count > max_modules_) { - BPLOG(ERROR) << "MinidumpModuleList count " << module_count_ << - " exceeds maximum " << max_modules_; - return false; - } - - if (module_count != 0) { - scoped_ptr modules( - new MinidumpModules(module_count, MinidumpModule(minidump_))); - - for (unsigned int module_index = 0; - module_index < module_count; - ++module_index) { - MinidumpModule* module = &(*modules)[module_index]; - - // Assume that the file offset is correct after the last read. - if (!module->Read()) { - BPLOG(ERROR) << "MinidumpModuleList could not read module " << - module_index << "/" << module_count; - return false; - } - } - - // Loop through the module list once more to read additional data and - // build the range map. This is done in a second pass because - // MinidumpModule::ReadAuxiliaryData seeks around, and if it were - // included in the loop above, additional seeks would be needed where - // none are now to read contiguous data. - for (unsigned int module_index = 0; - module_index < module_count; - ++module_index) { - MinidumpModule* module = &(*modules)[module_index]; - - // ReadAuxiliaryData fails if any data that the module indicates should - // exist is missing, but we treat some such cases as valid anyway. See - // issue #222: if a debugging record is of a format that's too large to - // handle, it shouldn't render the entire dump invalid. Check module - // validity before giving up. - if (!module->ReadAuxiliaryData() && !module->valid()) { - BPLOG(ERROR) << "MinidumpModuleList could not read required module " - "auxiliary data for module " << - module_index << "/" << module_count; - return false; - } - - // It is safe to use module->code_file() after successfully calling - // module->ReadAuxiliaryData or noting that the module is valid. - - u_int64_t base_address = module->base_address(); - u_int64_t module_size = module->size(); - if (base_address == static_cast(-1)) { - BPLOG(ERROR) << "MinidumpModuleList found bad base address " - "for module " << module_index << "/" << module_count << - ", " << module->code_file(); - return false; - } - - if (!range_map_->StoreRange(base_address, module_size, module_index)) { - BPLOG(ERROR) << "MinidumpModuleList could not store module " << - module_index << "/" << module_count << ", " << - module->code_file() << ", " << - HexString(base_address) << "+" << - HexString(module_size); - return false; - } - } - - modules_ = modules.release(); - } - - module_count_ = module_count; - - valid_ = true; - return true; -} - - -const MinidumpModule* MinidumpModuleList::GetModuleForAddress( - u_int64_t address) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleForAddress"; - return NULL; - } - - unsigned int module_index; - if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) { - BPLOG(INFO) << "MinidumpModuleList has no module at " << - HexString(address); - return NULL; - } - - return GetModuleAtIndex(module_index); -} - - -const MinidumpModule* MinidumpModuleList::GetMainModule() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetMainModule"; - return NULL; - } - - // The main code module is the first one present in a minidump file's - // MDRawModuleList. - return GetModuleAtSequence(0); -} - - -const MinidumpModule* MinidumpModuleList::GetModuleAtSequence( - unsigned int sequence) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtSequence"; - return NULL; - } - - if (sequence >= module_count_) { - BPLOG(ERROR) << "MinidumpModuleList sequence out of range: " << - sequence << "/" << module_count_; - return NULL; - } - - unsigned int module_index; - if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) { - BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence; - return NULL; - } - - return GetModuleAtIndex(module_index); -} - - -const MinidumpModule* MinidumpModuleList::GetModuleAtIndex( - unsigned int index) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtIndex"; - return NULL; - } - - if (index >= module_count_) { - BPLOG(ERROR) << "MinidumpModuleList index out of range: " << - index << "/" << module_count_; - return NULL; - } - - return &(*modules_)[index]; -} - - -const CodeModules* MinidumpModuleList::Copy() const { - return new BasicCodeModules(this); -} - - -void MinidumpModuleList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpModuleList cannot print invalid data"; - return; - } - - printf("MinidumpModuleList\n"); - printf(" module_count = %d\n", module_count_); - printf("\n"); - - for (unsigned int module_index = 0; - module_index < module_count_; - ++module_index) { - printf("module[%d]\n", module_index); - - (*modules_)[module_index].Print(); - } -} - - -// -// MinidumpMemoryList -// - - -u_int32_t MinidumpMemoryList::max_regions_ = 4096; - - -MinidumpMemoryList::MinidumpMemoryList(Minidump* minidump) - : MinidumpStream(minidump), - range_map_(new RangeMap()), - descriptors_(NULL), - regions_(NULL), - region_count_(0) { -} - - -MinidumpMemoryList::~MinidumpMemoryList() { - delete range_map_; - delete descriptors_; - delete regions_; -} - - -bool MinidumpMemoryList::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete descriptors_; - descriptors_ = NULL; - delete regions_; - regions_ = NULL; - range_map_->Clear(); - region_count_ = 0; - - valid_ = false; - - u_int32_t region_count; - if (expected_size < sizeof(region_count)) { - BPLOG(ERROR) << "MinidumpMemoryList count size mismatch, " << - expected_size << " < " << sizeof(region_count); - return false; - } - if (!minidump_->ReadBytes(®ion_count, sizeof(region_count))) { - BPLOG(ERROR) << "MinidumpMemoryList could not read memory region count"; - return false; - } - - if (minidump_->swap()) - Swap(®ion_count); - - if (region_count > - numeric_limits::max() / sizeof(MDMemoryDescriptor)) { - BPLOG(ERROR) << "MinidumpMemoryList region count " << region_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(region_count) + - region_count * sizeof(MDMemoryDescriptor)) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(region_count) + 4 + - region_count * sizeof(MDMemoryDescriptor)) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpMemoryList cannot read memorylist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpMemoryList size mismatch, " << expected_size << - " != " << sizeof(region_count) + - region_count * sizeof(MDMemoryDescriptor); - return false; - } - } - - if (region_count > max_regions_) { - BPLOG(ERROR) << "MinidumpMemoryList count " << region_count << - " exceeds maximum " << max_regions_; - return false; - } - - if (region_count != 0) { - scoped_ptr descriptors( - new MemoryDescriptors(region_count)); - - // Read the entire array in one fell swoop, instead of reading one entry - // at a time in the loop. - if (!minidump_->ReadBytes(&(*descriptors)[0], - sizeof(MDMemoryDescriptor) * region_count)) { - BPLOG(ERROR) << "MinidumpMemoryList could not read memory region list"; - return false; - } - - scoped_ptr regions( - new MemoryRegions(region_count, MinidumpMemoryRegion(minidump_))); - - for (unsigned int region_index = 0; - region_index < region_count; - ++region_index) { - MDMemoryDescriptor* descriptor = &(*descriptors)[region_index]; - - if (minidump_->swap()) - Swap(descriptor); - - u_int64_t base_address = descriptor->start_of_memory_range; - u_int32_t region_size = descriptor->memory.data_size; - - // Check for base + size overflow or undersize. - if (region_size == 0 || - region_size > numeric_limits::max() - base_address) { - BPLOG(ERROR) << "MinidumpMemoryList has a memory region problem, " << - " region " << region_index << "/" << region_count << - ", " << HexString(base_address) << "+" << - HexString(region_size); - return false; - } - - if (!range_map_->StoreRange(base_address, region_size, region_index)) { - BPLOG(ERROR) << "MinidumpMemoryList could not store memory region " << - region_index << "/" << region_count << ", " << - HexString(base_address) << "+" << - HexString(region_size); - return false; - } - - (*regions)[region_index].SetDescriptor(descriptor); - } - - descriptors_ = descriptors.release(); - regions_ = regions.release(); - } - - region_count_ = region_count; - - valid_ = true; - return true; -} - - -MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionAtIndex( - unsigned int index) { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionAtIndex"; - return NULL; - } - - if (index >= region_count_) { - BPLOG(ERROR) << "MinidumpMemoryList index out of range: " << - index << "/" << region_count_; - return NULL; - } - - return &(*regions_)[index]; -} - - -MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress( - u_int64_t address) { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionForAddress"; - return NULL; - } - - unsigned int region_index; - if (!range_map_->RetrieveRange(address, ®ion_index, NULL, NULL)) { - BPLOG(INFO) << "MinidumpMemoryList has no memory region at " << - HexString(address); - return NULL; - } - - return GetMemoryRegionAtIndex(region_index); -} - - -void MinidumpMemoryList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryList cannot print invalid data"; - return; - } - - printf("MinidumpMemoryList\n"); - printf(" region_count = %d\n", region_count_); - printf("\n"); - - for (unsigned int region_index = 0; - region_index < region_count_; - ++region_index) { - MDMemoryDescriptor* descriptor = &(*descriptors_)[region_index]; - printf("region[%d]\n", region_index); - printf("MDMemoryDescriptor\n"); - printf(" start_of_memory_range = 0x%" PRIx64 "\n", - descriptor->start_of_memory_range); - printf(" memory.data_size = 0x%x\n", descriptor->memory.data_size); - printf(" memory.rva = 0x%x\n", descriptor->memory.rva); - MinidumpMemoryRegion* region = GetMemoryRegionAtIndex(region_index); - if (region) { - printf("Memory\n"); - region->Print(); - } else { - printf("No memory\n"); - } - printf("\n"); - } -} - - -// -// MinidumpException -// - - -MinidumpException::MinidumpException(Minidump* minidump) - : MinidumpStream(minidump), - exception_(), - context_(NULL) { -} - - -MinidumpException::~MinidumpException() { - delete context_; -} - - -bool MinidumpException::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete context_; - context_ = NULL; - - valid_ = false; - - if (expected_size != sizeof(exception_)) { - BPLOG(ERROR) << "MinidumpException size mismatch, " << expected_size << - " != " << sizeof(exception_); - return false; - } - - if (!minidump_->ReadBytes(&exception_, sizeof(exception_))) { - BPLOG(ERROR) << "MinidumpException cannot read exception"; - return false; - } - - if (minidump_->swap()) { - Swap(&exception_.thread_id); - // exception_.__align is for alignment only and does not need to be - // swapped. - Swap(&exception_.exception_record.exception_code); - Swap(&exception_.exception_record.exception_flags); - Swap(&exception_.exception_record.exception_record); - Swap(&exception_.exception_record.exception_address); - Swap(&exception_.exception_record.number_parameters); - // exception_.exception_record.__align is for alignment only and does not - // need to be swapped. - for (unsigned int parameter_index = 0; - parameter_index < MD_EXCEPTION_MAXIMUM_PARAMETERS; - ++parameter_index) { - Swap(&exception_.exception_record.exception_information[parameter_index]); - } - Swap(&exception_.thread_context); - } - - valid_ = true; - return true; -} - - -bool MinidumpException::GetThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpException::GetThreadID requires " - "|thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpException for GetThreadID"; - return false; - } - - *thread_id = exception_.thread_id; - return true; -} - - -MinidumpContext* MinidumpException::GetContext() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpException for GetContext"; - return NULL; - } - - if (!context_) { - if (!minidump_->SeekSet(exception_.thread_context.rva)) { - BPLOG(ERROR) << "MinidumpException cannot seek to context"; - return NULL; - } - - scoped_ptr context(new MinidumpContext(minidump_)); - - // Don't log as an error if we can still fall back on the thread's context - // (which must be possible if we got this far.) - if (!context->Read(exception_.thread_context.data_size)) { - BPLOG(INFO) << "MinidumpException cannot read context"; - return NULL; - } - - context_ = context.release(); - } - - return context_; -} - - -void MinidumpException::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpException cannot print invalid data"; - return; - } - - printf("MDException\n"); - printf(" thread_id = 0x%x\n", - exception_.thread_id); - printf(" exception_record.exception_code = 0x%x\n", - exception_.exception_record.exception_code); - printf(" exception_record.exception_flags = 0x%x\n", - exception_.exception_record.exception_flags); - printf(" exception_record.exception_record = 0x%" PRIx64 "\n", - exception_.exception_record.exception_record); - printf(" exception_record.exception_address = 0x%" PRIx64 "\n", - exception_.exception_record.exception_address); - printf(" exception_record.number_parameters = %d\n", - exception_.exception_record.number_parameters); - for (unsigned int parameterIndex = 0; - parameterIndex < exception_.exception_record.number_parameters; - ++parameterIndex) { - printf(" exception_record.exception_information[%2d] = 0x%" PRIx64 "\n", - parameterIndex, - exception_.exception_record.exception_information[parameterIndex]); - } - printf(" thread_context.data_size = %d\n", - exception_.thread_context.data_size); - printf(" thread_context.rva = 0x%x\n", - exception_.thread_context.rva); - MinidumpContext* context = GetContext(); - if (context) { - printf("\n"); - context->Print(); - } else { - printf(" (no context)\n"); - printf("\n"); - } -} - -// -// MinidumpAssertion -// - - -MinidumpAssertion::MinidumpAssertion(Minidump* minidump) - : MinidumpStream(minidump), - assertion_(), - expression_(), - function_(), - file_() { -} - - -MinidumpAssertion::~MinidumpAssertion() { -} - - -bool MinidumpAssertion::Read(u_int32_t expected_size) { - // Invalidate cached data. - valid_ = false; - - if (expected_size != sizeof(assertion_)) { - BPLOG(ERROR) << "MinidumpAssertion size mismatch, " << expected_size << - " != " << sizeof(assertion_); - return false; - } - - if (!minidump_->ReadBytes(&assertion_, sizeof(assertion_))) { - BPLOG(ERROR) << "MinidumpAssertion cannot read assertion"; - return false; - } - - // Each of {expression, function, file} is a UTF-16 string, - // we'll convert them to UTF-8 for ease of use. - // expression - // Since we don't have an explicit byte length for each string, - // we use UTF16codeunits to calculate word length, then derive byte - // length from that. - u_int32_t word_length = UTF16codeunits(assertion_.expression, - sizeof(assertion_.expression)); - if (word_length > 0) { - u_int32_t byte_length = word_length * 2; - vector expression_utf16(word_length); - memcpy(&expression_utf16[0], &assertion_.expression[0], byte_length); - - scoped_ptr new_expression(UTF16ToUTF8(expression_utf16, - minidump_->swap())); - if (new_expression.get()) - expression_ = *new_expression; - } - - // assertion - word_length = UTF16codeunits(assertion_.function, - sizeof(assertion_.function)); - if (word_length) { - u_int32_t byte_length = word_length * 2; - vector function_utf16(word_length); - memcpy(&function_utf16[0], &assertion_.function[0], byte_length); - scoped_ptr new_function(UTF16ToUTF8(function_utf16, - minidump_->swap())); - if (new_function.get()) - function_ = *new_function; - } - - // file - word_length = UTF16codeunits(assertion_.file, - sizeof(assertion_.file)); - if (word_length > 0) { - u_int32_t byte_length = word_length * 2; - vector file_utf16(word_length); - memcpy(&file_utf16[0], &assertion_.file[0], byte_length); - scoped_ptr new_file(UTF16ToUTF8(file_utf16, - minidump_->swap())); - if (new_file.get()) - file_ = *new_file; - } - - if (minidump_->swap()) { - Swap(&assertion_.line); - Swap(&assertion_.type); - } - - valid_ = true; - return true; -} - -void MinidumpAssertion::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpAssertion cannot print invalid data"; - return; - } - - printf("MDAssertion\n"); - printf(" expression = %s\n", - expression_.c_str()); - printf(" function = %s\n", - function_.c_str()); - printf(" file = %s\n", - file_.c_str()); - printf(" line = %u\n", - assertion_.line); - printf(" type = %u\n", - assertion_.type); - printf("\n"); -} - -// -// MinidumpSystemInfo -// - - -MinidumpSystemInfo::MinidumpSystemInfo(Minidump* minidump) - : MinidumpStream(minidump), - system_info_(), - csd_version_(NULL), - cpu_vendor_(NULL) { -} - - -MinidumpSystemInfo::~MinidumpSystemInfo() { - delete csd_version_; - delete cpu_vendor_; -} - - -bool MinidumpSystemInfo::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete csd_version_; - csd_version_ = NULL; - delete cpu_vendor_; - cpu_vendor_ = NULL; - - valid_ = false; - - if (expected_size != sizeof(system_info_)) { - BPLOG(ERROR) << "MinidumpSystemInfo size mismatch, " << expected_size << - " != " << sizeof(system_info_); - return false; - } - - if (!minidump_->ReadBytes(&system_info_, sizeof(system_info_))) { - BPLOG(ERROR) << "MinidumpSystemInfo cannot read system info"; - return false; - } - - if (minidump_->swap()) { - Swap(&system_info_.processor_architecture); - Swap(&system_info_.processor_level); - Swap(&system_info_.processor_revision); - // number_of_processors and product_type are 8-bit quantities and need no - // swapping. - Swap(&system_info_.major_version); - Swap(&system_info_.minor_version); - Swap(&system_info_.build_number); - Swap(&system_info_.platform_id); - Swap(&system_info_.csd_version_rva); - Swap(&system_info_.suite_mask); - // Don't swap the reserved2 field because its contents are unknown. - - if (system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86 || - system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86_WIN64) { - for (unsigned int i = 0; i < 3; ++i) - Swap(&system_info_.cpu.x86_cpu_info.vendor_id[i]); - Swap(&system_info_.cpu.x86_cpu_info.version_information); - Swap(&system_info_.cpu.x86_cpu_info.feature_information); - Swap(&system_info_.cpu.x86_cpu_info.amd_extended_cpu_features); - } else { - for (unsigned int i = 0; i < 2; ++i) - Swap(&system_info_.cpu.other_cpu_info.processor_features[i]); - } - } - - valid_ = true; - return true; -} - - -string MinidumpSystemInfo::GetOS() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetOS"; - return NULL; - } - - string os; - - switch (system_info_.platform_id) { - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: - os = "windows"; - break; - - case MD_OS_MAC_OS_X: - os = "mac"; - break; - - case MD_OS_LINUX: - os = "linux"; - break; - - case MD_OS_SOLARIS: - os = "solaris"; - break; - - default: - BPLOG(ERROR) << "MinidumpSystemInfo unknown OS for platform " << - HexString(system_info_.platform_id); - break; - } - - return os; -} - - -string MinidumpSystemInfo::GetCPU() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPU"; - return ""; - } - - string cpu; - - switch (system_info_.processor_architecture) { - case MD_CPU_ARCHITECTURE_X86: - case MD_CPU_ARCHITECTURE_X86_WIN64: - cpu = "x86"; - break; - - case MD_CPU_ARCHITECTURE_AMD64: - cpu = "x86-64"; - break; - - case MD_CPU_ARCHITECTURE_PPC: - cpu = "ppc"; - break; - - case MD_CPU_ARCHITECTURE_SPARC: - cpu = "sparc"; - break; - - case MD_CPU_ARCHITECTURE_ARM: - cpu = "arm"; - break; - - default: - BPLOG(ERROR) << "MinidumpSystemInfo unknown CPU for architecture " << - HexString(system_info_.processor_architecture); - break; - } - - return cpu; -} - - -const string* MinidumpSystemInfo::GetCSDVersion() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCSDVersion"; - return NULL; - } - - if (!csd_version_) - csd_version_ = minidump_->ReadString(system_info_.csd_version_rva); - - BPLOG_IF(ERROR, !csd_version_) << "MinidumpSystemInfo could not read " - "CSD version"; - - return csd_version_; -} - - -const string* MinidumpSystemInfo::GetCPUVendor() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPUVendor"; - return NULL; - } - - // CPU vendor information can only be determined from x86 minidumps. - if (!cpu_vendor_ && - (system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86 || - system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86_WIN64)) { - char cpu_vendor_string[13]; - snprintf(cpu_vendor_string, sizeof(cpu_vendor_string), - "%c%c%c%c%c%c%c%c%c%c%c%c", - system_info_.cpu.x86_cpu_info.vendor_id[0] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 24) & 0xff, - system_info_.cpu.x86_cpu_info.vendor_id[1] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 24) & 0xff, - system_info_.cpu.x86_cpu_info.vendor_id[2] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 24) & 0xff); - cpu_vendor_ = new string(cpu_vendor_string); - } - - return cpu_vendor_; -} - - -void MinidumpSystemInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpSystemInfo cannot print invalid data"; - return; - } - - printf("MDRawSystemInfo\n"); - printf(" processor_architecture = %d\n", - system_info_.processor_architecture); - printf(" processor_level = %d\n", - system_info_.processor_level); - printf(" processor_revision = 0x%x\n", - system_info_.processor_revision); - printf(" number_of_processors = %d\n", - system_info_.number_of_processors); - printf(" product_type = %d\n", - system_info_.product_type); - printf(" major_version = %d\n", - system_info_.major_version); - printf(" minor_version = %d\n", - system_info_.minor_version); - printf(" build_number = %d\n", - system_info_.build_number); - printf(" platform_id = %d\n", - system_info_.platform_id); - printf(" csd_version_rva = 0x%x\n", - system_info_.csd_version_rva); - printf(" suite_mask = 0x%x\n", - system_info_.suite_mask); - for (unsigned int i = 0; i < 3; ++i) { - printf(" cpu.x86_cpu_info.vendor_id[%d] = 0x%x\n", - i, system_info_.cpu.x86_cpu_info.vendor_id[i]); - } - printf(" cpu.x86_cpu_info.version_information = 0x%x\n", - system_info_.cpu.x86_cpu_info.version_information); - printf(" cpu.x86_cpu_info.feature_information = 0x%x\n", - system_info_.cpu.x86_cpu_info.feature_information); - printf(" cpu.x86_cpu_info.amd_extended_cpu_features = 0x%x\n", - system_info_.cpu.x86_cpu_info.amd_extended_cpu_features); - const string* csd_version = GetCSDVersion(); - if (csd_version) { - printf(" (csd_version) = \"%s\"\n", - csd_version->c_str()); - } else { - printf(" (csd_version) = (null)\n"); - } - const string* cpu_vendor = GetCPUVendor(); - if (cpu_vendor) { - printf(" (cpu_vendor) = \"%s\"\n", - cpu_vendor->c_str()); - } else { - printf(" (cpu_vendor) = (null)\n"); - } - printf("\n"); -} - - -// -// MinidumpMiscInfo -// - - -MinidumpMiscInfo::MinidumpMiscInfo(Minidump* minidump) - : MinidumpStream(minidump), - misc_info_() { -} - - -bool MinidumpMiscInfo::Read(u_int32_t expected_size) { - valid_ = false; - - if (expected_size != MD_MISCINFO_SIZE && - expected_size != MD_MISCINFO2_SIZE) { - BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << expected_size << - " != " << MD_MISCINFO_SIZE << ", " << MD_MISCINFO2_SIZE << - ")"; - return false; - } - - if (!minidump_->ReadBytes(&misc_info_, expected_size)) { - BPLOG(ERROR) << "MinidumpMiscInfo cannot read miscellaneous info"; - return false; - } - - if (minidump_->swap()) { - Swap(&misc_info_.size_of_info); - Swap(&misc_info_.flags1); - Swap(&misc_info_.process_id); - Swap(&misc_info_.process_create_time); - Swap(&misc_info_.process_user_time); - Swap(&misc_info_.process_kernel_time); - if (misc_info_.size_of_info > MD_MISCINFO_SIZE) { - Swap(&misc_info_.processor_max_mhz); - Swap(&misc_info_.processor_current_mhz); - Swap(&misc_info_.processor_mhz_limit); - Swap(&misc_info_.processor_max_idle_state); - Swap(&misc_info_.processor_current_idle_state); - } - } - - if (expected_size != misc_info_.size_of_info) { - BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << - expected_size << " != " << misc_info_.size_of_info; - return false; - } - - valid_ = true; - return true; -} - - -void MinidumpMiscInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMiscInfo cannot print invalid data"; - return; - } - - printf("MDRawMiscInfo\n"); - printf(" size_of_info = %d\n", misc_info_.size_of_info); - printf(" flags1 = 0x%x\n", misc_info_.flags1); - printf(" process_id = 0x%x\n", misc_info_.process_id); - printf(" process_create_time = 0x%x\n", - misc_info_.process_create_time); - printf(" process_user_time = 0x%x\n", - misc_info_.process_user_time); - printf(" process_kernel_time = 0x%x\n", - misc_info_.process_kernel_time); - if (misc_info_.size_of_info > MD_MISCINFO_SIZE) { - printf(" processor_max_mhz = %d\n", - misc_info_.processor_max_mhz); - printf(" processor_current_mhz = %d\n", - misc_info_.processor_current_mhz); - printf(" processor_mhz_limit = %d\n", - misc_info_.processor_mhz_limit); - printf(" processor_max_idle_state = 0x%x\n", - misc_info_.processor_max_idle_state); - printf(" processor_current_idle_state = 0x%x\n", - misc_info_.processor_current_idle_state); - } - printf("\n"); -} - - -// -// MinidumpBreakpadInfo -// - - -MinidumpBreakpadInfo::MinidumpBreakpadInfo(Minidump* minidump) - : MinidumpStream(minidump), - breakpad_info_() { -} - - -bool MinidumpBreakpadInfo::Read(u_int32_t expected_size) { - valid_ = false; - - if (expected_size != sizeof(breakpad_info_)) { - BPLOG(ERROR) << "MinidumpBreakpadInfo size mismatch, " << expected_size << - " != " << sizeof(breakpad_info_); - return false; - } - - if (!minidump_->ReadBytes(&breakpad_info_, sizeof(breakpad_info_))) { - BPLOG(ERROR) << "MinidumpBreakpadInfo cannot read Breakpad info"; - return false; - } - - if (minidump_->swap()) { - Swap(&breakpad_info_.validity); - Swap(&breakpad_info_.dump_thread_id); - Swap(&breakpad_info_.requesting_thread_id); - } - - valid_ = true; - return true; -} - - -bool MinidumpBreakpadInfo::GetDumpThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetDumpThreadID " - "requires |thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetDumpThreadID"; - return false; - } - - if (!(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID)) { - BPLOG(INFO) << "MinidumpBreakpadInfo has no dump thread"; - return false; - } - - *thread_id = breakpad_info_.dump_thread_id; - return true; -} - - -bool MinidumpBreakpadInfo::GetRequestingThreadID(u_int32_t *thread_id) - const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetRequestingThreadID " - "requires |thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!thread_id || !valid_) { - BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetRequestingThreadID"; - return false; - } - - if (!(breakpad_info_.validity & - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID)) { - BPLOG(INFO) << "MinidumpBreakpadInfo has no requesting thread"; - return false; - } - - *thread_id = breakpad_info_.requesting_thread_id; - return true; -} - - -void MinidumpBreakpadInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpBreakpadInfo cannot print invalid data"; - return; - } - - printf("MDRawBreakpadInfo\n"); - printf(" validity = 0x%x\n", breakpad_info_.validity); - - if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) { - printf(" dump_thread_id = 0x%x\n", breakpad_info_.dump_thread_id); - } else { - printf(" dump_thread_id = (invalid)\n"); - } - - if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) { - printf(" requesting_thread_id = 0x%x\n", - breakpad_info_.requesting_thread_id); - } else { - printf(" requesting_thread_id = (invalid)\n"); - } - - printf("\n"); -} - - -// -// MinidumpMemoryInfo -// - - -MinidumpMemoryInfo::MinidumpMemoryInfo(Minidump* minidump) - : MinidumpObject(minidump), - memory_info_() { -} - - -bool MinidumpMemoryInfo::IsExecutable() const { - u_int32_t protection = - memory_info_.protection & MD_MEMORY_PROTECTION_ACCESS_MASK; - return protection == MD_MEMORY_PROTECT_EXECUTE || - protection == MD_MEMORY_PROTECT_EXECUTE_READ || - protection == MD_MEMORY_PROTECT_EXECUTE_READWRITE; -} - - -bool MinidumpMemoryInfo::IsWritable() const { - u_int32_t protection = - memory_info_.protection & MD_MEMORY_PROTECTION_ACCESS_MASK; - return protection == MD_MEMORY_PROTECT_READWRITE || - protection == MD_MEMORY_PROTECT_WRITECOPY || - protection == MD_MEMORY_PROTECT_EXECUTE_READWRITE || - protection == MD_MEMORY_PROTECT_EXECUTE_WRITECOPY; -} - - -bool MinidumpMemoryInfo::Read() { - valid_ = false; - - if (!minidump_->ReadBytes(&memory_info_, sizeof(memory_info_))) { - BPLOG(ERROR) << "MinidumpMemoryInfo cannot read memory info"; - return false; - } - - if (minidump_->swap()) { - Swap(&memory_info_.base_address); - Swap(&memory_info_.allocation_base); - Swap(&memory_info_.allocation_protection); - Swap(&memory_info_.region_size); - Swap(&memory_info_.state); - Swap(&memory_info_.protection); - Swap(&memory_info_.type); - } - - // Check for base + size overflow or undersize. - if (memory_info_.region_size == 0 || - memory_info_.region_size > numeric_limits::max() - - memory_info_.base_address) { - BPLOG(ERROR) << "MinidumpMemoryInfo has a memory region problem, " << - HexString(memory_info_.base_address) << "+" << - HexString(memory_info_.region_size); - return false; - } - - valid_ = true; - return true; -} - - -void MinidumpMemoryInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryInfo cannot print invalid data"; - return; - } - - printf("MDRawMemoryInfo\n"); - printf(" base_address = 0x%" PRIx64 "\n", - memory_info_.base_address); - printf(" allocation_base = 0x%" PRIx64 "\n", - memory_info_.allocation_base); - printf(" allocation_protection = 0x%x\n", - memory_info_.allocation_protection); - printf(" region_size = 0x%" PRIx64 "\n", memory_info_.region_size); - printf(" state = 0x%x\n", memory_info_.state); - printf(" protection = 0x%x\n", memory_info_.protection); - printf(" type = 0x%x\n", memory_info_.type); -} - - -// -// MinidumpMemoryInfoList -// - - -MinidumpMemoryInfoList::MinidumpMemoryInfoList(Minidump* minidump) - : MinidumpStream(minidump), - range_map_(new RangeMap()), - infos_(NULL), - info_count_(0) { -} - - -MinidumpMemoryInfoList::~MinidumpMemoryInfoList() { - delete range_map_; - delete infos_; -} - - -bool MinidumpMemoryInfoList::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete infos_; - infos_ = NULL; - range_map_->Clear(); - info_count_ = 0; - - valid_ = false; - - MDRawMemoryInfoList header; - if (expected_size < sizeof(MDRawMemoryInfoList)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList header size mismatch, " << - expected_size << " < " << sizeof(MDRawMemoryInfoList); - return false; - } - if (!minidump_->ReadBytes(&header, sizeof(header))) { - BPLOG(ERROR) << "MinidumpMemoryInfoList could not read header"; - return false; - } - - if (minidump_->swap()) { - Swap(&header.size_of_header); - Swap(&header.size_of_entry); - Swap(&header.number_of_entries); - } - - // Sanity check that the header is the expected size. - //TODO(ted): could possibly handle this more gracefully, assuming - // that future versions of the structs would be backwards-compatible. - if (header.size_of_header != sizeof(MDRawMemoryInfoList)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList header size mismatch, " << - header.size_of_header << " != " << - sizeof(MDRawMemoryInfoList); - return false; - } - - // Sanity check that the entries are the expected size. - if (header.size_of_entry != sizeof(MDRawMemoryInfo)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList entry size mismatch, " << - header.size_of_entry << " != " << - sizeof(MDRawMemoryInfo); - return false; - } - - if (header.number_of_entries > - numeric_limits::max() / sizeof(MDRawMemoryInfo)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList info count " << - header.number_of_entries << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(MDRawMemoryInfoList) + - header.number_of_entries * sizeof(MDRawMemoryInfo)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList size mismatch, " << expected_size << - " != " << sizeof(MDRawMemoryInfoList) + - header.number_of_entries * sizeof(MDRawMemoryInfo); - return false; - } - - if (header.number_of_entries != 0) { - scoped_ptr infos( - new MinidumpMemoryInfos(header.number_of_entries, - MinidumpMemoryInfo(minidump_))); - - for (unsigned int index = 0; - index < header.number_of_entries; - ++index) { - MinidumpMemoryInfo* info = &(*infos)[index]; - - // Assume that the file offset is correct after the last read. - if (!info->Read()) { - BPLOG(ERROR) << "MinidumpMemoryInfoList cannot read info " << - index << "/" << header.number_of_entries; - return false; - } - - u_int64_t base_address = info->GetBase(); - u_int32_t region_size = info->GetSize(); - - if (!range_map_->StoreRange(base_address, region_size, index)) { - BPLOG(ERROR) << "MinidumpMemoryInfoList could not store" - " memory region " << - index << "/" << header.number_of_entries << ", " << - HexString(base_address) << "+" << - HexString(region_size); - return false; - } - } - - infos_ = infos.release(); - } - - info_count_ = header.number_of_entries; - - valid_ = true; - return true; -} - - -const MinidumpMemoryInfo* MinidumpMemoryInfoList::GetMemoryInfoAtIndex( - unsigned int index) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryInfoList for GetMemoryInfoAtIndex"; - return NULL; - } - - if (index >= info_count_) { - BPLOG(ERROR) << "MinidumpMemoryInfoList index out of range: " << - index << "/" << info_count_; - return NULL; - } - - return &(*infos_)[index]; -} - - -const MinidumpMemoryInfo* MinidumpMemoryInfoList::GetMemoryInfoForAddress( - u_int64_t address) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryInfoList for" - " GetMemoryInfoForAddress"; - return NULL; - } - - unsigned int info_index; - if (!range_map_->RetrieveRange(address, &info_index, NULL, NULL)) { - BPLOG(INFO) << "MinidumpMemoryInfoList has no memory info at " << - HexString(address); - return NULL; - } - - return GetMemoryInfoAtIndex(info_index); -} - - -void MinidumpMemoryInfoList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryInfoList cannot print invalid data"; - return; - } - - printf("MinidumpMemoryInfoList\n"); - printf(" info_count = %d\n", info_count_); - printf("\n"); - - for (unsigned int info_index = 0; - info_index < info_count_; - ++info_index) { - printf("info[%d]\n", info_index); - (*infos_)[info_index].Print(); - printf("\n"); - } -} - - -// -// Minidump -// - - -u_int32_t Minidump::max_streams_ = 128; -unsigned int Minidump::max_string_length_ = 1024; - - -Minidump::Minidump(const string& path) - : header_(), - directory_(NULL), - stream_map_(new MinidumpStreamMap()), - path_(path), - stream_(NULL), - swap_(false), - valid_(false) { -} - -Minidump::Minidump(istream& stream) - : header_(), - directory_(NULL), - stream_map_(new MinidumpStreamMap()), - path_(), - stream_(&stream), - swap_(false), - valid_(false) { -} - -Minidump::~Minidump() { - if (stream_) { - BPLOG(INFO) << "Minidump closing minidump"; - } - if (!path_.empty()) { - delete stream_; - } - delete directory_; - delete stream_map_; -} - - -bool Minidump::Open() { - if (stream_ != NULL) { - BPLOG(INFO) << "Minidump reopening minidump " << path_; - - // The file is already open. Seek to the beginning, which is the position - // the file would be at if it were opened anew. - return SeekSet(0); - } - - stream_ = new ifstream(path_.c_str(), std::ios::in | std::ios::binary); - if (!stream_ || !stream_->good()) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Minidump could not open minidump " << path_ << - ", error " << error_code << ": " << error_string; - return false; - } - - BPLOG(INFO) << "Minidump opened minidump " << path_; - return true; -} - - -bool Minidump::Read() { - // Invalidate cached data. - delete directory_; - directory_ = NULL; - stream_map_->clear(); - - valid_ = false; - - if (!Open()) { - BPLOG(ERROR) << "Minidump cannot open minidump"; - return false; - } - - if (!ReadBytes(&header_, sizeof(MDRawHeader))) { - BPLOG(ERROR) << "Minidump cannot read header"; - return false; - } - - if (header_.signature != MD_HEADER_SIGNATURE) { - // The file may be byte-swapped. Under the present architecture, these - // classes don't know or need to know what CPU (or endianness) the - // minidump was produced on in order to parse it. Use the signature as - // a byte order marker. - u_int32_t signature_swapped = header_.signature; - Swap(&signature_swapped); - if (signature_swapped != MD_HEADER_SIGNATURE) { - // This isn't a minidump or a byte-swapped minidump. - BPLOG(ERROR) << "Minidump header signature mismatch: (" << - HexString(header_.signature) << ", " << - HexString(signature_swapped) << ") != " << - HexString(MD_HEADER_SIGNATURE); - return false; - } - swap_ = true; - } else { - // The file is not byte-swapped. Set swap_ false (it may have been true - // if the object is being reused?) - swap_ = false; - } - - BPLOG(INFO) << "Minidump " << (swap_ ? "" : "not ") << - "byte-swapping minidump"; - - if (swap_) { - Swap(&header_.signature); - Swap(&header_.version); - Swap(&header_.stream_count); - Swap(&header_.stream_directory_rva); - Swap(&header_.checksum); - Swap(&header_.time_date_stamp); - Swap(&header_.flags); - } - - // Version check. The high 16 bits of header_.version contain something - // else "implementation specific." - if ((header_.version & 0x0000ffff) != MD_HEADER_VERSION) { - BPLOG(ERROR) << "Minidump version mismatch: " << - HexString(header_.version & 0x0000ffff) << " != " << - HexString(MD_HEADER_VERSION); - return false; - } - - if (!SeekSet(header_.stream_directory_rva)) { - BPLOG(ERROR) << "Minidump cannot seek to stream directory"; - return false; - } - - if (header_.stream_count > max_streams_) { - BPLOG(ERROR) << "Minidump stream count " << header_.stream_count << - " exceeds maximum " << max_streams_; - return false; - } - - if (header_.stream_count != 0) { - scoped_ptr directory( - new MinidumpDirectoryEntries(header_.stream_count)); - - // Read the entire array in one fell swoop, instead of reading one entry - // at a time in the loop. - if (!ReadBytes(&(*directory)[0], - sizeof(MDRawDirectory) * header_.stream_count)) { - BPLOG(ERROR) << "Minidump cannot read stream directory"; - return false; - } - - for (unsigned int stream_index = 0; - stream_index < header_.stream_count; - ++stream_index) { - MDRawDirectory* directory_entry = &(*directory)[stream_index]; - - if (swap_) { - Swap(&directory_entry->stream_type); - Swap(&directory_entry->location); - } - - // Initialize the stream_map_ map, which speeds locating a stream by - // type. - unsigned int stream_type = directory_entry->stream_type; - switch (stream_type) { - case MD_THREAD_LIST_STREAM: - case MD_MODULE_LIST_STREAM: - case MD_MEMORY_LIST_STREAM: - case MD_EXCEPTION_STREAM: - case MD_SYSTEM_INFO_STREAM: - case MD_MISC_INFO_STREAM: - case MD_BREAKPAD_INFO_STREAM: { - if (stream_map_->find(stream_type) != stream_map_->end()) { - // Another stream with this type was already found. A minidump - // file should contain at most one of each of these stream types. - BPLOG(ERROR) << "Minidump found multiple streams of type " << - stream_type << ", but can only deal with one"; - return false; - } - // Fall through to default - } - - default: { - // Overwrites for stream types other than those above, but it's - // expected to be the user's burden in that case. - (*stream_map_)[stream_type].stream_index = stream_index; - } - } - } - - directory_ = directory.release(); - } - - valid_ = true; - return true; -} - - -MinidumpThreadList* Minidump::GetThreadList() { - MinidumpThreadList* thread_list; - return GetStream(&thread_list); -} - - -MinidumpModuleList* Minidump::GetModuleList() { - MinidumpModuleList* module_list; - return GetStream(&module_list); -} - - -MinidumpMemoryList* Minidump::GetMemoryList() { - MinidumpMemoryList* memory_list; - return GetStream(&memory_list); -} - - -MinidumpException* Minidump::GetException() { - MinidumpException* exception; - return GetStream(&exception); -} - -MinidumpAssertion* Minidump::GetAssertion() { - MinidumpAssertion* assertion; - return GetStream(&assertion); -} - - -MinidumpSystemInfo* Minidump::GetSystemInfo() { - MinidumpSystemInfo* system_info; - return GetStream(&system_info); -} - - -MinidumpMiscInfo* Minidump::GetMiscInfo() { - MinidumpMiscInfo* misc_info; - return GetStream(&misc_info); -} - - -MinidumpBreakpadInfo* Minidump::GetBreakpadInfo() { - MinidumpBreakpadInfo* breakpad_info; - return GetStream(&breakpad_info); -} - -MinidumpMemoryInfoList* Minidump::GetMemoryInfoList() { - MinidumpMemoryInfoList* memory_info_list; - return GetStream(&memory_info_list); -} - - -void Minidump::Print() { - if (!valid_) { - BPLOG(ERROR) << "Minidump cannot print invalid data"; - return; - } - - printf("MDRawHeader\n"); - printf(" signature = 0x%x\n", header_.signature); - printf(" version = 0x%x\n", header_.version); - printf(" stream_count = %d\n", header_.stream_count); - printf(" stream_directory_rva = 0x%x\n", header_.stream_directory_rva); - printf(" checksum = 0x%x\n", header_.checksum); - struct tm timestruct; -#ifdef _WIN32 - gmtime_s(×truct, reinterpret_cast(&header_.time_date_stamp)); -#else - gmtime_r(reinterpret_cast(&header_.time_date_stamp), ×truct); -#endif - char timestr[20]; - strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", ×truct); - printf(" time_date_stamp = 0x%x %s\n", header_.time_date_stamp, - timestr); - printf(" flags = 0x%" PRIx64 "\n", header_.flags); - printf("\n"); - - for (unsigned int stream_index = 0; - stream_index < header_.stream_count; - ++stream_index) { - MDRawDirectory* directory_entry = &(*directory_)[stream_index]; - - printf("mDirectory[%d]\n", stream_index); - printf("MDRawDirectory\n"); - printf(" stream_type = %d\n", directory_entry->stream_type); - printf(" location.data_size = %d\n", - directory_entry->location.data_size); - printf(" location.rva = 0x%x\n", directory_entry->location.rva); - printf("\n"); - } - - printf("Streams:\n"); - for (MinidumpStreamMap::const_iterator iterator = stream_map_->begin(); - iterator != stream_map_->end(); - ++iterator) { - u_int32_t stream_type = iterator->first; - MinidumpStreamInfo info = iterator->second; - printf(" stream type 0x%x at index %d\n", stream_type, info.stream_index); - } - printf("\n"); -} - - -const MDRawDirectory* Minidump::GetDirectoryEntryAtIndex(unsigned int index) - const { - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for GetDirectoryEntryAtIndex"; - return NULL; - } - - if (index >= header_.stream_count) { - BPLOG(ERROR) << "Minidump stream directory index out of range: " << - index << "/" << header_.stream_count; - return NULL; - } - - return &(*directory_)[index]; -} - - -bool Minidump::ReadBytes(void* bytes, size_t count) { - // Can't check valid_ because Read needs to call this method before - // validity can be determined. - if (!stream_) { - return false; - } - stream_->read(static_cast(bytes), count); - size_t bytes_read = stream_->gcount(); - if (bytes_read != count) { - if (bytes_read == size_t(-1)) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "ReadBytes: error " << error_code << ": " << error_string; - } else { - BPLOG(ERROR) << "ReadBytes: read " << bytes_read << "/" << count; - } - return false; - } - return true; -} - - -bool Minidump::SeekSet(off_t offset) { - // Can't check valid_ because Read needs to call this method before - // validity can be determined. - if (!stream_) { - return false; - } - stream_->seekg(offset, std::ios_base::beg); - if (!stream_->good()) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "SeekSet: error " << error_code << ": " << error_string; - return false; - } - return true; -} - -off_t Minidump::Tell() { - if (!valid_ || !stream_) { - return (off_t)-1; - } - - return stream_->tellg(); -} - - -string* Minidump::ReadString(off_t offset) { - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for ReadString"; - return NULL; - } - if (!SeekSet(offset)) { - BPLOG(ERROR) << "ReadString could not seek to string at offset " << offset; - return NULL; - } - - u_int32_t bytes; - if (!ReadBytes(&bytes, sizeof(bytes))) { - BPLOG(ERROR) << "ReadString could not read string size at offset " << - offset; - return NULL; - } - if (swap_) - Swap(&bytes); - - if (bytes % 2 != 0) { - BPLOG(ERROR) << "ReadString found odd-sized " << bytes << - "-byte string at offset " << offset; - return NULL; - } - unsigned int utf16_words = bytes / 2; - - if (utf16_words > max_string_length_) { - BPLOG(ERROR) << "ReadString string length " << utf16_words << - " exceeds maximum " << max_string_length_ << - " at offset " << offset; - return NULL; - } - - vector string_utf16(utf16_words); - - if (utf16_words) { - if (!ReadBytes(&string_utf16[0], bytes)) { - BPLOG(ERROR) << "ReadString could not read " << bytes << - "-byte string at offset " << offset; - return NULL; - } - } - - return UTF16ToUTF8(string_utf16, swap_); -} - - -bool Minidump::SeekToStreamType(u_int32_t stream_type, - u_int32_t* stream_length) { - BPLOG_IF(ERROR, !stream_length) << "Minidump::SeekToStreamType requires " - "|stream_length|"; - assert(stream_length); - *stream_length = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid Mindump for SeekToStreamType"; - return false; - } - - MinidumpStreamMap::const_iterator iterator = stream_map_->find(stream_type); - if (iterator == stream_map_->end()) { - // This stream type didn't exist in the directory. - BPLOG(INFO) << "SeekToStreamType: type " << stream_type << " not present"; - return false; - } - - MinidumpStreamInfo info = iterator->second; - if (info.stream_index >= header_.stream_count) { - BPLOG(ERROR) << "SeekToStreamType: type " << stream_type << - " out of range: " << - info.stream_index << "/" << header_.stream_count; - return false; - } - - MDRawDirectory* directory_entry = &(*directory_)[info.stream_index]; - if (!SeekSet(directory_entry->location.rva)) { - BPLOG(ERROR) << "SeekToStreamType could not seek to stream type " << - stream_type; - return false; - } - - *stream_length = directory_entry->location.data_size; - - return true; -} - - -template -T* Minidump::GetStream(T** stream) { - // stream is a garbage parameter that's present only to account for C++'s - // inability to overload a method based solely on its return type. - - const u_int32_t stream_type = T::kStreamType; - - BPLOG_IF(ERROR, !stream) << "Minidump::GetStream type " << stream_type << - " requires |stream|"; - assert(stream); - *stream = NULL; - - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for GetStream type " << stream_type; - return NULL; - } - - MinidumpStreamMap::iterator iterator = stream_map_->find(stream_type); - if (iterator == stream_map_->end()) { - // This stream type didn't exist in the directory. - BPLOG(INFO) << "GetStream: type " << stream_type << " not present"; - return NULL; - } - - // Get a pointer so that the stored stream field can be altered. - MinidumpStreamInfo* info = &iterator->second; - - if (info->stream) { - // This cast is safe because info.stream is only populated by this - // method, and there is a direct correlation between T and stream_type. - *stream = static_cast(info->stream); - return *stream; - } - - u_int32_t stream_length; - if (!SeekToStreamType(stream_type, &stream_length)) { - BPLOG(ERROR) << "GetStream could not seek to stream type " << stream_type; - return NULL; - } - - scoped_ptr new_stream(new T(this)); - - if (!new_stream->Read(stream_length)) { - BPLOG(ERROR) << "GetStream could not read stream type " << stream_type; - return NULL; - } - - *stream = new_stream.release(); - info->stream = *stream; - return *stream; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump.cc deleted file mode 100644 index 9e70a722..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump.cc +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_dump.cc: Print the contents of a minidump file in somewhat -// readable text. -// -// Author: Mark Mentovai - -#include -#include - -#include "client/linux/minidump_writer/minidump_extension_linux.h" -#include "google_breakpad/processor/minidump.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -namespace { - -using google_breakpad::Minidump; -using google_breakpad::MinidumpThreadList; -using google_breakpad::MinidumpModuleList; -using google_breakpad::MinidumpMemoryInfoList; -using google_breakpad::MinidumpMemoryList; -using google_breakpad::MinidumpException; -using google_breakpad::MinidumpAssertion; -using google_breakpad::MinidumpSystemInfo; -using google_breakpad::MinidumpMiscInfo; -using google_breakpad::MinidumpBreakpadInfo; - -static void DumpRawStream(Minidump *minidump, - u_int32_t stream_type, - const char *stream_name, - int *errors) { - u_int32_t length = 0; - if (!minidump->SeekToStreamType(stream_type, &length)) { - return; - } - - printf("Stream %s:\n", stream_name); - - if (length == 0) { - printf("\n"); - return; - } - std::vector contents(length); - if (!minidump->ReadBytes(&contents[0], length)) { - ++*errors; - BPLOG(ERROR) << "minidump.ReadBytes failed"; - return; - } - size_t current_offset = 0; - while (current_offset < length) { - size_t remaining = length - current_offset; - // Printf requires an int and direct casting from size_t results - // in compatibility warnings. - u_int32_t int_remaining = remaining; - printf("%.*s", int_remaining, &contents[current_offset]); - char *next_null = reinterpret_cast( - memchr(&contents[current_offset], 0, remaining)); - if (next_null == NULL) - break; - printf("\\0\n"); - size_t null_offset = next_null - &contents[0]; - current_offset = null_offset + 1; - } - printf("\n\n"); -} - -static bool PrintMinidumpDump(const char *minidump_file) { - Minidump minidump(minidump_file); - if (!minidump.Read()) { - BPLOG(ERROR) << "minidump.Read() failed"; - return false; - } - minidump.Print(); - - int errors = 0; - - MinidumpThreadList *thread_list = minidump.GetThreadList(); - if (!thread_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetThreadList() failed"; - } else { - thread_list->Print(); - } - - MinidumpModuleList *module_list = minidump.GetModuleList(); - if (!module_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetModuleList() failed"; - } else { - module_list->Print(); - } - - MinidumpMemoryList *memory_list = minidump.GetMemoryList(); - if (!memory_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetMemoryList() failed"; - } else { - memory_list->Print(); - } - - MinidumpException *exception = minidump.GetException(); - if (!exception) { - BPLOG(INFO) << "minidump.GetException() failed"; - } else { - exception->Print(); - } - - MinidumpAssertion *assertion = minidump.GetAssertion(); - if (!assertion) { - BPLOG(INFO) << "minidump.GetAssertion() failed"; - } else { - assertion->Print(); - } - - MinidumpSystemInfo *system_info = minidump.GetSystemInfo(); - if (!system_info) { - ++errors; - BPLOG(ERROR) << "minidump.GetSystemInfo() failed"; - } else { - system_info->Print(); - } - - MinidumpMiscInfo *misc_info = minidump.GetMiscInfo(); - if (!misc_info) { - ++errors; - BPLOG(ERROR) << "minidump.GetMiscInfo() failed"; - } else { - misc_info->Print(); - } - - MinidumpBreakpadInfo *breakpad_info = minidump.GetBreakpadInfo(); - if (!breakpad_info) { - // Breakpad info is optional, so don't treat this as an error. - BPLOG(INFO) << "minidump.GetBreakpadInfo() failed"; - } else { - breakpad_info->Print(); - } - - MinidumpMemoryInfoList *memory_info_list = minidump.GetMemoryInfoList(); - if (!memory_info_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetMemoryInfoList() failed"; - } else { - memory_info_list->Print(); - } - - DumpRawStream(&minidump, - MD_LINUX_CMD_LINE, - "MD_LINUX_CMD_LINE", - &errors); - DumpRawStream(&minidump, - MD_LINUX_ENVIRON, - "MD_LINUX_ENVIRON", - &errors); - DumpRawStream(&minidump, - MD_LINUX_LSB_RELEASE, - "MD_LINUX_LSB_RELEASE", - &errors); - DumpRawStream(&minidump, - MD_LINUX_PROC_STATUS, - "MD_LINUX_PROC_STATUS", - &errors); - DumpRawStream(&minidump, - MD_LINUX_CPU_INFO, - "MD_LINUX_CPU_INFO", - &errors); - DumpRawStream(&minidump, - MD_LINUX_MAPS, - "MD_LINUX_MAPS", - &errors); - - return errors == 0; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - if (argc != 2) { - fprintf(stderr, "usage: %s \n", argv[0]); - return 1; - } - - return PrintMinidumpDump(argv[1]) ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump_test b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump_test deleted file mode 100755 index fb62ace7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_dump_test +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_dump $testdata_dir/minidump2.dmp | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.dump.out - -exit $? diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor.cc deleted file mode 100644 index a74db327..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor.cc +++ /dev/null @@ -1,1121 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "google_breakpad/processor/minidump_processor.h" - -#include -#include - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/exploitability.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_x86.h" - -namespace google_breakpad { - -MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : supplier_(supplier), resolver_(resolver), - enable_exploitability_(false) { -} - -MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, - bool enable_exploitability) - : supplier_(supplier), resolver_(resolver), - enable_exploitability_(enable_exploitability) { -} - -MinidumpProcessor::~MinidumpProcessor() { -} - -ProcessResult MinidumpProcessor::Process( - Minidump *dump, ProcessState *process_state) { - assert(dump); - assert(process_state); - - process_state->Clear(); - - const MDRawHeader *header = dump->header(); - if (!header) { - BPLOG(ERROR) << "Minidump " << dump->path() << " has no header"; - return PROCESS_ERROR_NO_MINIDUMP_HEADER; - } - process_state->time_date_stamp_ = header->time_date_stamp; - - bool has_cpu_info = GetCPUInfo(dump, &process_state->system_info_); - bool has_os_info = GetOSInfo(dump, &process_state->system_info_); - - u_int32_t dump_thread_id = 0; - bool has_dump_thread = false; - u_int32_t requesting_thread_id = 0; - bool has_requesting_thread = false; - - MinidumpBreakpadInfo *breakpad_info = dump->GetBreakpadInfo(); - if (breakpad_info) { - has_dump_thread = breakpad_info->GetDumpThreadID(&dump_thread_id); - has_requesting_thread = - breakpad_info->GetRequestingThreadID(&requesting_thread_id); - } - - MinidumpException *exception = dump->GetException(); - if (exception) { - process_state->crashed_ = true; - has_requesting_thread = exception->GetThreadID(&requesting_thread_id); - - process_state->crash_reason_ = GetCrashReason( - dump, &process_state->crash_address_); - } - - // This will just return an empty string if it doesn't exist. - process_state->assertion_ = GetAssertion(dump); - - MinidumpModuleList *module_list = dump->GetModuleList(); - - // Put a copy of the module list into ProcessState object. This is not - // necessarily a MinidumpModuleList, but it adheres to the CodeModules - // interface, which is all that ProcessState needs to expose. - if (module_list) - process_state->modules_ = module_list->Copy(); - - MinidumpThreadList *threads = dump->GetThreadList(); - if (!threads) { - BPLOG(ERROR) << "Minidump " << dump->path() << " has no thread list"; - return PROCESS_ERROR_NO_THREAD_LIST; - } - - BPLOG(INFO) << "Minidump " << dump->path() << " has " << - (has_cpu_info ? "" : "no ") << "CPU info, " << - (has_os_info ? "" : "no ") << "OS info, " << - (breakpad_info != NULL ? "" : "no ") << "Breakpad info, " << - (exception != NULL ? "" : "no ") << "exception, " << - (module_list != NULL ? "" : "no ") << "module list, " << - (threads != NULL ? "" : "no ") << "thread list, " << - (has_dump_thread ? "" : "no ") << "dump thread, and " << - (has_requesting_thread ? "" : "no ") << "requesting thread"; - - bool interrupted = false; - bool found_requesting_thread = false; - unsigned int thread_count = threads->thread_count(); - for (unsigned int thread_index = 0; - thread_index < thread_count; - ++thread_index) { - char thread_string_buffer[64]; - snprintf(thread_string_buffer, sizeof(thread_string_buffer), "%d/%d", - thread_index, thread_count); - string thread_string = dump->path() + ":" + thread_string_buffer; - - MinidumpThread *thread = threads->GetThreadAtIndex(thread_index); - if (!thread) { - BPLOG(ERROR) << "Could not get thread for " << thread_string; - return PROCESS_ERROR_GETTING_THREAD; - } - - u_int32_t thread_id; - if (!thread->GetThreadID(&thread_id)) { - BPLOG(ERROR) << "Could not get thread ID for " << thread_string; - return PROCESS_ERROR_GETTING_THREAD_ID; - } - - thread_string += " id " + HexString(thread_id); - BPLOG(INFO) << "Looking at thread " << thread_string; - - // If this thread is the thread that produced the minidump, don't process - // it. Because of the problems associated with a thread producing a - // dump of itself (when both its context and its stack are in flux), - // processing that stack wouldn't provide much useful data. - if (has_dump_thread && thread_id == dump_thread_id) { - continue; - } - - MinidumpContext *context = thread->GetContext(); - - if (has_requesting_thread && thread_id == requesting_thread_id) { - if (found_requesting_thread) { - // There can't be more than one requesting thread. - BPLOG(ERROR) << "Duplicate requesting thread: " << thread_string; - return PROCESS_ERROR_DUPLICATE_REQUESTING_THREADS; - } - - // Use processed_state->threads_.size() instead of thread_index. - // thread_index points to the thread index in the minidump, which - // might be greater than the thread index in the threads vector if - // any of the minidump's threads are skipped and not placed into the - // processed threads vector. The thread vector's current size will - // be the index of the current thread when it's pushed into the - // vector. - process_state->requesting_thread_ = process_state->threads_.size(); - - found_requesting_thread = true; - - if (process_state->crashed_) { - // Use the exception record's context for the crashed thread, instead - // of the thread's own context. For the crashed thread, the thread's - // own context is the state inside the exception handler. Using it - // would not result in the expected stack trace from the time of the - // crash. If the exception context is invalid, however, we fall back - // on the thread context. - MinidumpContext *ctx = exception->GetContext(); - context = ctx ? ctx : thread->GetContext(); - } - } - - MinidumpMemoryRegion *thread_memory = thread->GetMemory(); - if (!thread_memory) { - BPLOG(ERROR) << "No memory region for " << thread_string; - return PROCESS_ERROR_NO_MEMORY_FOR_THREAD; - } - - // Use process_state->modules_ instead of module_list, because the - // |modules| argument will be used to populate the |module| fields in - // the returned StackFrame objects, which will be placed into the - // returned ProcessState object. module_list's lifetime is only as - // long as the Minidump object: it will be deleted when this function - // returns. process_state->modules_ is owned by the ProcessState object - // (just like the StackFrame objects), and is much more suitable for this - // task. - scoped_ptr stackwalker( - Stackwalker::StackwalkerForCPU(process_state->system_info(), - context, - thread_memory, - process_state->modules_, - supplier_, - resolver_)); - if (!stackwalker.get()) { - BPLOG(ERROR) << "No stackwalker for " << thread_string; - return PROCESS_ERROR_NO_STACKWALKER_FOR_THREAD; - } - - scoped_ptr stack(new CallStack()); - if (!stackwalker->Walk(stack.get())) { - BPLOG(INFO) << "Stackwalker interrupt (missing symbols?) at " << - thread_string; - interrupted = true; - } - process_state->threads_.push_back(stack.release()); - process_state->thread_memory_regions_.push_back(thread_memory); - } - - if (interrupted) { - BPLOG(INFO) << "Processing interrupted for " << dump->path(); - return PROCESS_SYMBOL_SUPPLIER_INTERRUPTED; - } - - // If a requesting thread was indicated, it must be present. - if (has_requesting_thread && !found_requesting_thread) { - // Don't mark as an error, but invalidate the requesting thread - BPLOG(ERROR) << "Minidump indicated requesting thread " << - HexString(requesting_thread_id) << ", not found in " << - dump->path(); - process_state->requesting_thread_ = -1; - } - - // Exploitability defaults to EXPLOITABILITY_NOT_ANALYZED - process_state->exploitability_ = EXPLOITABILITY_NOT_ANALYZED; - - // If an exploitability run was requested we perform the platform specific - // rating. - if (enable_exploitability_) { - scoped_ptr exploitability( - Exploitability::ExploitabilityForPlatform(dump, process_state)); - // The engine will be null if the platform is not supported - if (exploitability != NULL) { - process_state->exploitability_ = exploitability->CheckExploitability(); - } else { - process_state->exploitability_ = EXPLOITABILITY_ERR_NOENGINE; - } - } - - BPLOG(INFO) << "Processed " << dump->path(); - return PROCESS_OK; -} - -ProcessResult MinidumpProcessor::Process( - const string &minidump_file, ProcessState *process_state) { - BPLOG(INFO) << "Processing minidump in file " << minidump_file; - - Minidump dump(minidump_file); - if (!dump.Read()) { - BPLOG(ERROR) << "Minidump " << dump.path() << " could not be read"; - return PROCESS_ERROR_MINIDUMP_NOT_FOUND; - } - - return Process(&dump, process_state); -} - -// Returns the MDRawSystemInfo from a minidump, or NULL if system info is -// not available from the minidump. If system_info is non-NULL, it is used -// to pass back the MinidumpSystemInfo object. -static const MDRawSystemInfo* GetSystemInfo(Minidump *dump, - MinidumpSystemInfo **system_info) { - MinidumpSystemInfo *minidump_system_info = dump->GetSystemInfo(); - if (!minidump_system_info) - return NULL; - - if (system_info) - *system_info = minidump_system_info; - - return minidump_system_info->system_info(); -} - -// static -bool MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { - assert(dump); - assert(info); - - info->cpu.clear(); - info->cpu_info.clear(); - - MinidumpSystemInfo *system_info; - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); - if (!raw_system_info) - return false; - - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_X86: - case MD_CPU_ARCHITECTURE_AMD64: { - if (raw_system_info->processor_architecture == - MD_CPU_ARCHITECTURE_X86) - info->cpu = "x86"; - else - info->cpu = "amd64"; - - const string *cpu_vendor = system_info->GetCPUVendor(); - if (cpu_vendor) { - info->cpu_info = *cpu_vendor; - info->cpu_info.append(" "); - } - - char x86_info[36]; - snprintf(x86_info, sizeof(x86_info), "family %u model %u stepping %u", - raw_system_info->processor_level, - raw_system_info->processor_revision >> 8, - raw_system_info->processor_revision & 0xff); - info->cpu_info.append(x86_info); - break; - } - - case MD_CPU_ARCHITECTURE_PPC: { - info->cpu = "ppc"; - break; - } - - case MD_CPU_ARCHITECTURE_SPARC: { - info->cpu = "sparc"; - break; - } - - case MD_CPU_ARCHITECTURE_ARM: { - info->cpu = "arm"; - break; - } - - default: { - // Assign the numeric architecture ID into the CPU string. - char cpu_string[7]; - snprintf(cpu_string, sizeof(cpu_string), "0x%04x", - raw_system_info->processor_architecture); - info->cpu = cpu_string; - break; - } - } - - info->cpu_count = raw_system_info->number_of_processors; - - return true; -} - -// static -bool MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { - assert(dump); - assert(info); - - info->os.clear(); - info->os_short.clear(); - info->os_version.clear(); - - MinidumpSystemInfo *system_info; - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); - if (!raw_system_info) - return false; - - info->os_short = system_info->GetOS(); - - switch (raw_system_info->platform_id) { - case MD_OS_WIN32_NT: { - info->os = "Windows NT"; - break; - } - - case MD_OS_WIN32_WINDOWS: { - info->os = "Windows"; - break; - } - - case MD_OS_MAC_OS_X: { - info->os = "Mac OS X"; - break; - } - - case MD_OS_LINUX: { - info->os = "Linux"; - break; - } - - case MD_OS_SOLARIS: { - info->os = "Solaris"; - break; - } - - default: { - // Assign the numeric platform ID into the OS string. - char os_string[11]; - snprintf(os_string, sizeof(os_string), "0x%08x", - raw_system_info->platform_id); - info->os = os_string; - break; - } - } - - char os_version_string[33]; - snprintf(os_version_string, sizeof(os_version_string), "%u.%u.%u", - raw_system_info->major_version, - raw_system_info->minor_version, - raw_system_info->build_number); - info->os_version = os_version_string; - - const string *csd_version = system_info->GetCSDVersion(); - if (csd_version) { - info->os_version.append(" "); - info->os_version.append(*csd_version); - } - - return true; -} - -// static -string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { - MinidumpException *exception = dump->GetException(); - if (!exception) - return ""; - - const MDRawExceptionStream *raw_exception = exception->exception(); - if (!raw_exception) - return ""; - - if (address) - *address = raw_exception->exception_record.exception_address; - - // The reason value is OS-specific and possibly CPU-specific. Set up - // sensible numeric defaults for the reason string in case we can't - // map the codes to a string (because there's no system info, or because - // it's an unrecognized platform, or because it's an unrecognized code.) - char reason_string[24]; - u_int32_t exception_code = raw_exception->exception_record.exception_code; - u_int32_t exception_flags = raw_exception->exception_record.exception_flags; - snprintf(reason_string, sizeof(reason_string), "0x%08x / 0x%08x", - exception_code, exception_flags); - string reason = reason_string; - - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, NULL); - if (!raw_system_info) - return reason; - - switch (raw_system_info->platform_id) { - case MD_OS_MAC_OS_X: { - char flags_string[11]; - snprintf(flags_string, sizeof(flags_string), "0x%08x", exception_flags); - switch (exception_code) { - case MD_EXCEPTION_MAC_BAD_ACCESS: - reason = "EXC_BAD_ACCESS / "; - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS: - reason.append("KERN_INVALID_ADDRESS"); - break; - case MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE: - reason.append("KERN_PROTECTION_FAILURE"); - break; - case MD_EXCEPTION_CODE_MAC_NO_ACCESS: - reason.append("KERN_NO_ACCESS"); - break; - case MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE: - reason.append("KERN_MEMORY_FAILURE"); - break; - case MD_EXCEPTION_CODE_MAC_MEMORY_ERROR: - reason.append("KERN_MEMORY_ERROR"); - break; - // These are ppc only but shouldn't be a problem as they're - // unused on x86 - case MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ: - reason.append("EXC_PPC_VM_PROT_READ"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_BADSPACE: - reason.append("EXC_PPC_BADSPACE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED: - reason.append("EXC_PPC_UNALIGNED"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_BAD_INSTRUCTION: - reason = "EXC_BAD_INSTRUCTION / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL: - reason.append("EXC_PPC_INVALID_SYSCALL"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION: - reason.append("EXC_PPC_UNIPL_INST"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION: - reason.append("EXC_PPC_PRIVINST"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER: - reason.append("EXC_PPC_PRIVREG"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_TRACE: - reason.append("EXC_PPC_TRACE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR: - reason.append("EXC_PPC_PERFMON"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION: - reason.append("EXC_I386_INVOP"); - break; - case MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT: - reason.append("EXC_INVTSSFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT: - reason.append("EXC_SEGNPFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT: - reason.append("EXC_STKFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT: - reason.append("EXC_GPFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT: - reason.append("EXC_ALIGNFLT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_ARITHMETIC: - reason = "EXC_ARITHMETIC / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW: - reason.append("EXC_PPC_OVERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE: - reason.append("EXC_PPC_ZERO_DIVIDE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT: - reason.append("EXC_FLT_INEXACT"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE: - reason.append("EXC_PPC_FLT_ZERO_DIVIDE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW: - reason.append("EXC_PPC_FLT_UNDERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW: - reason.append("EXC_PPC_FLT_OVERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER: - reason.append("EXC_PPC_FLT_NOT_A_NUMBER"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION: - reason.append("EXC_PPC_NOEMULATION"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST: - reason.append("EXC_PPC_ALTIVECASSIST"); - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_DIV: - reason.append("EXC_I386_DIV"); - break; - case MD_EXCEPTION_CODE_MAC_X86_INTO: - reason.append("EXC_I386_INTO"); - break; - case MD_EXCEPTION_CODE_MAC_X86_NOEXT: - reason.append("EXC_I386_NOEXT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EXTOVR: - reason.append("EXC_I386_EXTOVR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EXTERR: - reason.append("EXC_I386_EXTERR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EMERR: - reason.append("EXC_I386_EMERR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_BOUND: - reason.append("EXC_I386_BOUND"); - break; - case MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR: - reason.append("EXC_I386_SSEEXTERR"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_EMULATION: - reason = "EXC_EMULATION / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_SOFTWARE: - reason = "EXC_SOFTWARE / "; - switch (exception_flags) { - // These are ppc only but shouldn't be a problem as they're - // unused on x86 - case MD_EXCEPTION_CODE_MAC_PPC_TRAP: - reason.append("EXC_PPC_TRAP"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_MIGRATE: - reason.append("EXC_PPC_MIGRATE"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_BREAKPOINT: - reason = "EXC_BREAKPOINT / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT: - reason.append("EXC_PPC_BREAKPOINT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_SGL: - reason.append("EXC_I386_SGL"); - break; - case MD_EXCEPTION_CODE_MAC_X86_BPT: - reason.append("EXC_I386_BPT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_SYSCALL: - reason = "EXC_SYSCALL / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_MACH_SYSCALL: - reason = "EXC_MACH_SYSCALL / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_RPC_ALERT: - reason = "EXC_RPC_ALERT / "; - reason.append(flags_string); - break; - } - break; - } - - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: { - switch (exception_code) { - case MD_EXCEPTION_CODE_WIN_CONTROL_C: - reason = "DBG_CONTROL_C"; - break; - case MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION: - reason = "EXCEPTION_GUARD_PAGE"; - break; - case MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT: - reason = "EXCEPTION_DATATYPE_MISALIGNMENT"; - break; - case MD_EXCEPTION_CODE_WIN_BREAKPOINT: - reason = "EXCEPTION_BREAKPOINT"; - break; - case MD_EXCEPTION_CODE_WIN_SINGLE_STEP: - reason = "EXCEPTION_SINGLE_STEP"; - break; - case MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION: - // For EXCEPTION_ACCESS_VIOLATION, Windows puts the address that - // caused the fault in exception_information[1]. - // exception_information[0] is 0 if the violation was caused by - // an attempt to read data and 1 if it was an attempt to write - // data. - // This information is useful in addition to the code address, which - // will be present in the crash thread's instruction field anyway. - if (raw_exception->exception_record.number_parameters >= 1) { - MDAccessViolationTypeWin av_type = - static_cast - (raw_exception->exception_record.exception_information[0]); - switch (av_type) { - case MD_ACCESS_VIOLATION_WIN_READ: - reason = "EXCEPTION_ACCESS_VIOLATION_READ"; - break; - case MD_ACCESS_VIOLATION_WIN_WRITE: - reason = "EXCEPTION_ACCESS_VIOLATION_WRITE"; - break; - case MD_ACCESS_VIOLATION_WIN_EXEC: - reason = "EXCEPTION_ACCESS_VIOLATION_EXEC"; - break; - default: - reason = "EXCEPTION_ACCESS_VIOLATION"; - break; - } - } else { - reason = "EXCEPTION_ACCESS_VIOLATION"; - } - if (address && - raw_exception->exception_record.number_parameters >= 2) { - *address = - raw_exception->exception_record.exception_information[1]; - } - break; - case MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR: - reason = "EXCEPTION_IN_PAGE_ERROR"; - break; - case MD_EXCEPTION_CODE_WIN_INVALID_HANDLE: - reason = "EXCEPTION_INVALID_HANDLE"; - break; - case MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION: - reason = "EXCEPTION_ILLEGAL_INSTRUCTION"; - break; - case MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION: - reason = "EXCEPTION_NONCONTINUABLE_EXCEPTION"; - break; - case MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION: - reason = "EXCEPTION_INVALID_DISPOSITION"; - break; - case MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED: - reason = "EXCEPTION_BOUNDS_EXCEEDED"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND: - reason = "EXCEPTION_FLT_DENORMAL_OPERAND"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO: - reason = "EXCEPTION_FLT_DIVIDE_BY_ZERO"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT: - reason = "EXCEPTION_FLT_INEXACT_RESULT"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION: - reason = "EXCEPTION_FLT_INVALID_OPERATION"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW: - reason = "EXCEPTION_FLT_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK: - reason = "EXCEPTION_FLT_STACK_CHECK"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW: - reason = "EXCEPTION_FLT_UNDERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO: - reason = "EXCEPTION_INT_DIVIDE_BY_ZERO"; - break; - case MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW: - reason = "EXCEPTION_INT_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION: - reason = "EXCEPTION_PRIV_INSTRUCTION"; - break; - case MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW: - reason = "EXCEPTION_STACK_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK: - reason = "EXCEPTION_POSSIBLE_DEADLOCK"; - break; - case MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN: - reason = "EXCEPTION_STACK_BUFFER_OVERRUN"; - break; - case MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION: - reason = "EXCEPTION_HEAP_CORRUPTION"; - break; - case MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION: - reason = "Unhandled C++ Exception"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - case MD_OS_LINUX: { - switch (exception_code) { - case MD_EXCEPTION_CODE_LIN_SIGHUP: - reason = "SIGHUP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGINT: - reason = "SIGINT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGQUIT: - reason = "SIGQUIT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGILL: - reason = "SIGILL"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTRAP: - reason = "SIGTRAP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGABRT: - reason = "SIGABRT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGBUS: - reason = "SIGBUS"; - break; - case MD_EXCEPTION_CODE_LIN_SIGFPE: - reason = "SIGFPE"; - break; - case MD_EXCEPTION_CODE_LIN_SIGKILL: - reason = "SIGKILL"; - break; - case MD_EXCEPTION_CODE_LIN_SIGUSR1: - reason = "SIGUSR1"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSEGV: - reason = "SIGSEGV"; - break; - case MD_EXCEPTION_CODE_LIN_SIGUSR2: - reason = "SIGUSR2"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPIPE: - reason = "SIGPIPE"; - break; - case MD_EXCEPTION_CODE_LIN_SIGALRM: - reason = "SIGALRM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTERM: - reason = "SIGTERM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSTKFLT: - reason = "SIGSTKFLT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGCHLD: - reason = "SIGCHLD"; - break; - case MD_EXCEPTION_CODE_LIN_SIGCONT: - reason = "SIGCONT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSTOP: - reason = "SIGSTOP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTSTP: - reason = "SIGTSTP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTTIN: - reason = "SIGTTIN"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTTOU: - reason = "SIGTTOU"; - break; - case MD_EXCEPTION_CODE_LIN_SIGURG: - reason = "SIGURG"; - break; - case MD_EXCEPTION_CODE_LIN_SIGXCPU: - reason = "SIGXCPU"; - break; - case MD_EXCEPTION_CODE_LIN_SIGXFSZ: - reason = "SIGXFSZ"; - break; - case MD_EXCEPTION_CODE_LIN_SIGVTALRM: - reason = "SIGVTALRM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPROF: - reason = "SIGPROF"; - break; - case MD_EXCEPTION_CODE_LIN_SIGWINCH: - reason = "SIGWINCH"; - break; - case MD_EXCEPTION_CODE_LIN_SIGIO: - reason = "SIGIO"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPWR: - reason = "SIGPWR"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSYS: - reason = "SIGSYS"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - case MD_OS_SOLARIS: { - switch (exception_code) { - case MD_EXCEPTION_CODE_SOL_SIGHUP: - reason = "SIGHUP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGINT: - reason = "SIGINT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGQUIT: - reason = "SIGQUIT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGILL: - reason = "SIGILL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTRAP: - reason = "SIGTRAP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGIOT: - reason = "SIGIOT | SIGABRT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGEMT: - reason = "SIGEMT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGFPE: - reason = "SIGFPE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGKILL: - reason = "SIGKILL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGBUS: - reason = "SIGBUS"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSEGV: - reason = "SIGSEGV"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSYS: - reason = "SIGSYS"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPIPE: - reason = "SIGPIPE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGALRM: - reason = "SIGALRM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTERM: - reason = "SIGTERM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGUSR1: - reason = "SIGUSR1"; - break; - case MD_EXCEPTION_CODE_SOL_SIGUSR2: - reason = "SIGUSR2"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCLD: - reason = "SIGCLD | SIGCHLD"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPWR: - reason = "SIGPWR"; - break; - case MD_EXCEPTION_CODE_SOL_SIGWINCH: - reason = "SIGWINCH"; - break; - case MD_EXCEPTION_CODE_SOL_SIGURG: - reason = "SIGURG"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPOLL: - reason = "SIGPOLL | SIGIO"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSTOP: - reason = "SIGSTOP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTSTP: - reason = "SIGTSTP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCONT: - reason = "SIGCONT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTTIN: - reason = "SIGTTIN"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTTOU: - reason = "SIGTTOU"; - break; - case MD_EXCEPTION_CODE_SOL_SIGVTALRM: - reason = "SIGVTALRM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPROF: - reason = "SIGPROF"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXCPU: - reason = "SIGXCPU"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXFSZ: - reason = "SIGXFSZ"; - break; - case MD_EXCEPTION_CODE_SOL_SIGWAITING: - reason = "SIGWAITING"; - break; - case MD_EXCEPTION_CODE_SOL_SIGLWP: - reason = "SIGLWP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGFREEZE: - reason = "SIGFREEZE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTHAW: - reason = "SIGTHAW"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCANCEL: - reason = "SIGCANCEL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGLOST: - reason = "SIGLOST"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXRES: - reason = "SIGXRES"; - break; - case MD_EXCEPTION_CODE_SOL_SIGJVM1: - reason = "SIGJVM1"; - break; - case MD_EXCEPTION_CODE_SOL_SIGJVM2: - reason = "SIGJVM2"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - default: { - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - } - - return reason; -} - -// static -string MinidumpProcessor::GetAssertion(Minidump *dump) { - MinidumpAssertion *assertion = dump->GetAssertion(); - if (!assertion) - return ""; - - const MDRawAssertionInfo *raw_assertion = assertion->assertion(); - if (!raw_assertion) - return ""; - - string assertion_string; - switch (raw_assertion->type) { - case MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER: - assertion_string = "Invalid parameter passed to library function"; - break; - case MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL: - assertion_string = "Pure virtual function called"; - break; - default: { - char assertion_type[32]; - sprintf(assertion_type, "0x%08x", raw_assertion->type); - assertion_string = "Unknown assertion type "; - assertion_string += assertion_type; - break; - } - } - - string expression = assertion->expression(); - if (!expression.empty()) { - assertion_string.append(" " + expression); - } - - string function = assertion->function(); - if (!function.empty()) { - assertion_string.append(" in function " + function); - } - - string file = assertion->file(); - if (!file.empty()) { - assertion_string.append(", in file " + file); - } - - if (raw_assertion->line != 0) { - char assertion_line[32]; - sprintf(assertion_line, "%u", raw_assertion->line); - assertion_string.append(" at line "); - assertion_string.append(assertion_line); - } - - return assertion_string; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor_unittest.cc deleted file mode 100644 index fcac48ff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_processor_unittest.cc +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit test for MinidumpProcessor. Uses a pre-generated minidump and -// corresponding symbol file, and checks the stack frames for correctness. - -#include - -#include -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -using std::map; - -namespace google_breakpad { -class MockMinidump : public Minidump { - public: - MockMinidump() : Minidump("") { - } - - MOCK_METHOD0(Read, bool()); - MOCK_CONST_METHOD0(path, string()); - MOCK_CONST_METHOD0(header, const MDRawHeader*()); - MOCK_METHOD0(GetThreadList, MinidumpThreadList*()); -}; -} - -namespace { - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::MinidumpProcessor; -using google_breakpad::MinidumpThreadList; -using google_breakpad::MinidumpThread; -using google_breakpad::MockMinidump; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; -using std::string; -using ::testing::_; -using ::testing::Mock; -using ::testing::Ne; -using ::testing::Property; -using ::testing::Return; - -static const char *kSystemInfoOS = "Windows NT"; -static const char *kSystemInfoOSShort = "windows"; -static const char *kSystemInfoOSVersion = "5.1.2600 Service Pack 2"; -static const char *kSystemInfoCPU = "x86"; -static const char *kSystemInfoCPUInfo = - "GenuineIntel family 6 model 13 stepping 8"; - -#define ASSERT_TRUE_ABORT(cond) \ - if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - abort(); \ - } - -#define ASSERT_EQ_ABORT(e1, e2) ASSERT_TRUE_ABORT((e1) == (e2)) - -class TestSymbolSupplier : public SymbolSupplier { - public: - TestSymbolSupplier() : interrupt_(false) {} - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data); - - virtual void FreeSymbolData(const CodeModule *module); - - // When set to true, causes the SymbolSupplier to return INTERRUPT - void set_interrupt(bool interrupt) { interrupt_ = interrupt; } - - private: - bool interrupt_; - map memory_buffers_; -}; - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - ASSERT_TRUE_ABORT(module); - ASSERT_TRUE_ABORT(system_info); - ASSERT_EQ_ABORT(system_info->cpu, kSystemInfoCPU); - ASSERT_EQ_ABORT(system_info->cpu_info, kSystemInfoCPUInfo); - ASSERT_EQ_ABORT(system_info->os, kSystemInfoOS); - ASSERT_EQ_ABORT(system_info->os_short, kSystemInfoOSShort); - ASSERT_EQ_ABORT(system_info->os_version, kSystemInfoOSVersion); - - if (interrupt_) { - return INTERRUPT; - } - - if (module && module->code_file() == "c:\\test_app.exe") { - *symbol_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/symbols/test_app.pdb/" + - module->debug_identifier() + - "/test_app.sym"; - return FOUND; - } - - return NOT_FOUND; -} - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - SymbolSupplier::SymbolResult s = GetSymbolFile(module, system_info, - symbol_file); - if (s == FOUND) { - std::ifstream in(symbol_file->c_str()); - std::getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - - return s; -} - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetCStringSymbolData( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) { - string symbol_data_string; - SymbolSupplier::SymbolResult s = GetSymbolFile(module, - system_info, - symbol_file, - &symbol_data_string); - if (s == FOUND) { - unsigned int size = symbol_data_string.size() + 1; - *symbol_data = new char[size]; - if (*symbol_data == NULL) { - BPLOG(ERROR) << "Memory allocation failed for module: " - << module->code_file() << " size: " << size; - return INTERRUPT; - } - strcpy(*symbol_data, symbol_data_string.c_str()); - memory_buffers_.insert(make_pair(module->code_file(), *symbol_data)); - } - - return s; -} - -void TestSymbolSupplier::FreeSymbolData(const CodeModule *module) { - map::iterator it = memory_buffers_.find(module->code_file()); - if (it != memory_buffers_.end()) { - delete [] it->second; - memory_buffers_.erase(it); - } -} - -// A mock symbol supplier that always returns NOT_FOUND; one current -// use for testing the processor's caching of symbol lookups. -class MockSymbolSupplier : public SymbolSupplier { - public: - MockSymbolSupplier() { } - MOCK_METHOD3(GetSymbolFile, SymbolResult(const CodeModule*, - const SystemInfo*, - string*)); - MOCK_METHOD4(GetSymbolFile, SymbolResult(const CodeModule*, - const SystemInfo*, - string*, - string*)); - MOCK_METHOD4(GetCStringSymbolData, SymbolResult(const CodeModule*, - const SystemInfo*, - string*, - char**)); - MOCK_METHOD1(FreeSymbolData, void(const CodeModule*)); -}; - -class MinidumpProcessorTest : public ::testing::Test { -}; - -TEST_F(MinidumpProcessorTest, TestCorruptMinidumps) { - MockMinidump dump; - TestSymbolSupplier supplier; - BasicSourceLineResolver resolver; - MinidumpProcessor processor(&supplier, &resolver); - ProcessState state; - - EXPECT_EQ(processor.Process("nonexistent minidump", &state), - google_breakpad::PROCESS_ERROR_MINIDUMP_NOT_FOUND); - - EXPECT_CALL(dump, path()).WillRepeatedly(Return("mock minidump")); - EXPECT_CALL(dump, Read()).WillRepeatedly(Return(true)); - - MDRawHeader fakeHeader; - fakeHeader.time_date_stamp = 0; - EXPECT_CALL(dump, header()).WillOnce(Return((MDRawHeader*)NULL)). - WillRepeatedly(Return(&fakeHeader)); - EXPECT_EQ(processor.Process(&dump, &state), - google_breakpad::PROCESS_ERROR_NO_MINIDUMP_HEADER); - - EXPECT_CALL(dump, GetThreadList()). - WillOnce(Return((MinidumpThreadList*)NULL)); - EXPECT_EQ(processor.Process(&dump, &state), - google_breakpad::PROCESS_ERROR_NO_THREAD_LIST); -} - -// This test case verifies that the symbol supplier is only consulted -// once per minidump per module. -TEST_F(MinidumpProcessorTest, TestSymbolSupplierLookupCounts) { - MockSymbolSupplier supplier; - BasicSourceLineResolver resolver; - MinidumpProcessor processor(&supplier, &resolver); - - string minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/minidump2.dmp"; - ProcessState state; - EXPECT_CALL(supplier, GetCStringSymbolData( - Property(&google_breakpad::CodeModule::code_file, - "c:\\test_app.exe"), - _, _, _)).WillOnce(Return(SymbolSupplier::NOT_FOUND)); - EXPECT_CALL(supplier, GetCStringSymbolData( - Property(&google_breakpad::CodeModule::code_file, - Ne("c:\\test_app.exe")), - _, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND)); - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - - ASSERT_TRUE(Mock::VerifyAndClearExpectations(&supplier)); - - // We need to verify that across minidumps, the processor will refetch - // symbol files, even with the same symbol supplier. - EXPECT_CALL(supplier, GetCStringSymbolData( - Property(&google_breakpad::CodeModule::code_file, - "c:\\test_app.exe"), - _, _, _)).WillOnce(Return(SymbolSupplier::NOT_FOUND)); - EXPECT_CALL(supplier, GetCStringSymbolData( - Property(&google_breakpad::CodeModule::code_file, - Ne("c:\\test_app.exe")), - _, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND)); - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); -} - -TEST_F(MinidumpProcessorTest, TestBasicProcessing) { - TestSymbolSupplier supplier; - BasicSourceLineResolver resolver; - MinidumpProcessor processor(&supplier, &resolver); - - string minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/minidump2.dmp"; - - ProcessState state; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(state.system_info()->os, kSystemInfoOS); - ASSERT_EQ(state.system_info()->os_short, kSystemInfoOSShort); - ASSERT_EQ(state.system_info()->os_version, kSystemInfoOSVersion); - ASSERT_EQ(state.system_info()->cpu, kSystemInfoCPU); - ASSERT_EQ(state.system_info()->cpu_info, kSystemInfoCPUInfo); - ASSERT_TRUE(state.crashed()); - ASSERT_EQ(state.crash_reason(), "EXCEPTION_ACCESS_VIOLATION_WRITE"); - ASSERT_EQ(state.crash_address(), 0x45U); - ASSERT_EQ(state.threads()->size(), size_t(1)); - ASSERT_EQ(state.requesting_thread(), 0); - - CallStack *stack = state.threads()->at(0); - ASSERT_TRUE(stack); - ASSERT_EQ(stack->frames()->size(), 4U); - - ASSERT_TRUE(stack->frames()->at(0)->module); - ASSERT_EQ(stack->frames()->at(0)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(0)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(0)->function_name, - "`anonymous namespace'::CrashFunction"); - ASSERT_EQ(stack->frames()->at(0)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(0)->source_line, 58); - - ASSERT_TRUE(stack->frames()->at(1)->module); - ASSERT_EQ(stack->frames()->at(1)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(1)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(1)->function_name, "main"); - ASSERT_EQ(stack->frames()->at(1)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(1)->source_line, 65); - - // This comes from the CRT - ASSERT_TRUE(stack->frames()->at(2)->module); - ASSERT_EQ(stack->frames()->at(2)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(2)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(2)->function_name, "__tmainCRTStartup"); - ASSERT_EQ(stack->frames()->at(2)->source_file_name, - "f:\\sp\\vctools\\crt_bld\\self_x86\\crt\\src\\crt0.c"); - ASSERT_EQ(stack->frames()->at(2)->source_line, 327); - - // No debug info available for kernel32.dll - ASSERT_TRUE(stack->frames()->at(3)->module); - ASSERT_EQ(stack->frames()->at(3)->module->base_address(), 0x7c800000U); - ASSERT_EQ(stack->frames()->at(3)->module->code_file(), - "C:\\WINDOWS\\system32\\kernel32.dll"); - ASSERT_TRUE(stack->frames()->at(3)->function_name.empty()); - ASSERT_TRUE(stack->frames()->at(3)->source_file_name.empty()); - ASSERT_EQ(stack->frames()->at(3)->source_line, 0); - - ASSERT_EQ(state.modules()->module_count(), 13U); - ASSERT_TRUE(state.modules()->GetMainModule()); - ASSERT_EQ(state.modules()->GetMainModule()->code_file(), "c:\\test_app.exe"); - ASSERT_FALSE(state.modules()->GetModuleForAddress(0)); - ASSERT_EQ(state.modules()->GetMainModule(), - state.modules()->GetModuleForAddress(0x400000)); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x7c801234)->debug_file(), - "kernel32.pdb"); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x77d43210)->version(), - "5.1.2600.2622"); - - // Test that disabled exploitability engine defaults to - // EXPLOITABILITY_NOT_ANALYZED. - ASSERT_EQ(google_breakpad::EXPLOITABILITY_NOT_ANALYZED, - state.exploitability()); - - // Test that the symbol supplier can interrupt processing - state.Clear(); - supplier.set_interrupt(true); - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_SYMBOL_SUPPLIER_INTERRUPTED); -} -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk.cc deleted file mode 100644 index 86f679e9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk.cc +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_stackwalk.cc: Process a minidump with MinidumpProcessor, printing -// the results, including stack traces. -// -// Author: Mark Mentovai - -#include -#include -#include - -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" -#include "processor/pathname_stripper.h" -#include "processor/scoped_ptr.h" -#include "processor/simple_symbol_supplier.h" - -namespace { - -using std::string; -using std::vector; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::CodeModules; -using google_breakpad::MinidumpModule; -using google_breakpad::MinidumpProcessor; -using google_breakpad::PathnameStripper; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::SimpleSymbolSupplier; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameSPARC; -using google_breakpad::StackFrameX86; -using google_breakpad::StackFrameAMD64; -using google_breakpad::StackFrameARM; - -// Separator character for machine readable output. -static const char kOutputSeparator = '|'; - -// PrintRegister prints a register's name and value to stdout. It will -// print four registers on a line. For the first register in a set, -// pass 0 for |start_col|. For registers in a set, pass the most recent -// return value of PrintRegister. -// The caller is responsible for printing the final newline after a set -// of registers is completely printed, regardless of the number of calls -// to PrintRegister. -static const int kMaxWidth = 80; // optimize for an 80-column terminal -static int PrintRegister(const char *name, u_int32_t value, int start_col) { - char buffer[64]; - snprintf(buffer, sizeof(buffer), " %5s = 0x%08x", name, value); - - if (start_col + strlen(buffer) > kMaxWidth) { - start_col = 0; - printf("\n "); - } - fputs(buffer, stdout); - - return start_col + strlen(buffer); -} - -// PrintRegister64 does the same thing, but for 64-bit registers. -static int PrintRegister64(const char *name, u_int64_t value, int start_col) { - char buffer[64]; - snprintf(buffer, sizeof(buffer), " %5s = 0x%016" PRIx64 , name, value); - - if (start_col + strlen(buffer) > kMaxWidth) { - start_col = 0; - printf("\n "); - } - fputs(buffer, stdout); - - return start_col + strlen(buffer); -} - -// StripSeparator takes a string |original| and returns a copy -// of the string with all occurences of |kOutputSeparator| removed. -static string StripSeparator(const string &original) { - string result = original; - string::size_type position = 0; - while ((position = result.find(kOutputSeparator, position)) != string::npos) { - result.erase(position, 1); - } - position = 0; - while ((position = result.find('\n', position)) != string::npos) { - result.erase(position, 1); - } - return result; -} - -// PrintStack prints the call stack in |stack| to stdout, in a reasonably -// useful form. Module, function, and source file names are displayed if -// they are available. The code offset to the base code address of the -// source line, function, or module is printed, preferring them in that -// order. If no source line, function, or module information is available, -// an absolute code offset is printed. -// -// If |cpu| is a recognized CPU name, relevant register state for each stack -// frame printed is also output, if available. -static void PrintStack(const CallStack *stack, const string &cpu) { - int frame_count = stack->frames()->size(); - for (int frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - printf("%2d ", frame_index); - - if (frame->module) { - printf("%s", PathnameStripper::File(frame->module->code_file()).c_str()); - if (!frame->function_name.empty()) { - printf("!%s", frame->function_name.c_str()); - if (!frame->source_file_name.empty()) { - string source_file = PathnameStripper::File(frame->source_file_name); - printf(" [%s : %d + 0x%" PRIx64 "]", - source_file.c_str(), - frame->source_line, - frame->instruction - frame->source_line_base); - } else { - printf(" + 0x%" PRIx64, frame->instruction - frame->function_base); - } - } else { - printf(" + 0x%" PRIx64, - frame->instruction - frame->module->base_address()); - } - } else { - printf("0x%" PRIx64, frame->instruction); - } - printf("\n "); - - int sequence = 0; - if (cpu == "x86") { - const StackFrameX86 *frame_x86 = - reinterpret_cast(frame); - - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EIP) - sequence = PrintRegister("eip", frame_x86->context.eip, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESP) - sequence = PrintRegister("esp", frame_x86->context.esp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBP) - sequence = PrintRegister("ebp", frame_x86->context.ebp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBX) - sequence = PrintRegister("ebx", frame_x86->context.ebx, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESI) - sequence = PrintRegister("esi", frame_x86->context.esi, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EDI) - sequence = PrintRegister("edi", frame_x86->context.edi, sequence); - if (frame_x86->context_validity == StackFrameX86::CONTEXT_VALID_ALL) { - sequence = PrintRegister("eax", frame_x86->context.eax, sequence); - sequence = PrintRegister("ecx", frame_x86->context.ecx, sequence); - sequence = PrintRegister("edx", frame_x86->context.edx, sequence); - sequence = PrintRegister("efl", frame_x86->context.eflags, sequence); - } - } else if (cpu == "ppc") { - const StackFramePPC *frame_ppc = - reinterpret_cast(frame); - - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_SRR0) - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_GPR1) - sequence = PrintRegister("r1", frame_ppc->context.gpr[1], sequence); - } else if (cpu == "amd64") { - const StackFrameAMD64 *frame_amd64 = - reinterpret_cast(frame); - - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RBX) - sequence = PrintRegister64("rbx", frame_amd64->context.rbx, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_R12) - sequence = PrintRegister64("r12", frame_amd64->context.r12, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_R13) - sequence = PrintRegister64("r13", frame_amd64->context.r13, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_R14) - sequence = PrintRegister64("r14", frame_amd64->context.r14, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_R15) - sequence = PrintRegister64("r15", frame_amd64->context.r15, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RIP) - sequence = PrintRegister64("rip", frame_amd64->context.rip, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RSP) - sequence = PrintRegister64("rsp", frame_amd64->context.rsp, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RBP) - sequence = PrintRegister64("rbp", frame_amd64->context.rbp, sequence); - } else if (cpu == "sparc") { - const StackFrameSPARC *frame_sparc = - reinterpret_cast(frame); - - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_SP) - sequence = PrintRegister("sp", frame_sparc->context.g_r[14], sequence); - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_FP) - sequence = PrintRegister("fp", frame_sparc->context.g_r[30], sequence); - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_PC) - sequence = PrintRegister("pc", frame_sparc->context.pc, sequence); - } else if (cpu == "arm") { - const StackFrameARM *frame_arm = - reinterpret_cast(frame); - - // General-purpose callee-saves registers. - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R4) - sequence = PrintRegister("r4", frame_arm->context.iregs[4], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R5) - sequence = PrintRegister("r5", frame_arm->context.iregs[5], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R6) - sequence = PrintRegister("r6", frame_arm->context.iregs[6], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R7) - sequence = PrintRegister("r7", frame_arm->context.iregs[7], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R8) - sequence = PrintRegister("r8", frame_arm->context.iregs[8], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R9) - sequence = PrintRegister("r9", frame_arm->context.iregs[9], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R10) - sequence = PrintRegister("r10", frame_arm->context.iregs[10], sequence); - - // Registers with a dedicated or conventional purpose. - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_FP) - sequence = PrintRegister("fp", frame_arm->context.iregs[11], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_SP) - sequence = PrintRegister("sp", frame_arm->context.iregs[13], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_LR) - sequence = PrintRegister("lr", frame_arm->context.iregs[14], sequence); - if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_PC) - sequence = PrintRegister("pc", frame_arm->context.iregs[15], sequence); - } - printf("\n Found by: %s\n", frame->trust_description().c_str()); - } -} - -// PrintStackMachineReadable prints the call stack in |stack| to stdout, -// in the following machine readable pipe-delimited text format: -// thread number|frame number|module|function|source file|line|offset -// -// Module, function, source file, and source line may all be empty -// depending on availability. The code offset follows the same rules as -// PrintStack above. -static void PrintStackMachineReadable(int thread_num, const CallStack *stack) { - int frame_count = stack->frames()->size(); - for (int frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - printf("%d%c%d%c", thread_num, kOutputSeparator, frame_index, - kOutputSeparator); - - if (frame->module) { - assert(!frame->module->code_file().empty()); - printf("%s", StripSeparator(PathnameStripper::File( - frame->module->code_file())).c_str()); - if (!frame->function_name.empty()) { - printf("%c%s", kOutputSeparator, - StripSeparator(frame->function_name).c_str()); - if (!frame->source_file_name.empty()) { - printf("%c%s%c%d%c0x%" PRIx64, - kOutputSeparator, - StripSeparator(frame->source_file_name).c_str(), - kOutputSeparator, - frame->source_line, - kOutputSeparator, - frame->instruction - frame->source_line_base); - } else { - printf("%c%c%c0x%" PRIx64, - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction - frame->function_base); - } - } else { - printf("%c%c%c%c0x%" PRIx64, - kOutputSeparator, // empty function name - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction - frame->module->base_address()); - } - } else { - // the printf before this prints a trailing separator for module name - printf("%c%c%c%c0x%" PRIx64, - kOutputSeparator, // empty function name - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction); - } - printf("\n"); - } -} - -static void PrintModules(const CodeModules *modules) { - if (!modules) - return; - - printf("\n"); - printf("Loaded modules:\n"); - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - u_int64_t base_address = module->base_address(); - printf("0x%08" PRIx64 " - 0x%08" PRIx64 " %s %s%s\n", - base_address, base_address + module->size() - 1, - PathnameStripper::File(module->code_file()).c_str(), - module->version().empty() ? "???" : module->version().c_str(), - main_module != NULL && base_address == main_address ? - " (main)" : ""); - } -} - -// PrintModulesMachineReadable outputs a list of loaded modules, -// one per line, in the following machine-readable pipe-delimited -// text format: -// Module|{Module Filename}|{Version}|{Debug Filename}|{Debug Identifier}| -// {Base Address}|{Max Address}|{Main} -static void PrintModulesMachineReadable(const CodeModules *modules) { - if (!modules) - return; - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - u_int64_t base_address = module->base_address(); - printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d\n", - kOutputSeparator, - StripSeparator(PathnameStripper::File(module->code_file())).c_str(), - kOutputSeparator, StripSeparator(module->version()).c_str(), - kOutputSeparator, - StripSeparator(PathnameStripper::File(module->debug_file())).c_str(), - kOutputSeparator, - StripSeparator(module->debug_identifier()).c_str(), - kOutputSeparator, base_address, - kOutputSeparator, base_address + module->size() - 1, - kOutputSeparator, - main_module != NULL && base_address == main_address ? 1 : 0); - } -} - -static void PrintProcessState(const ProcessState& process_state) { - // Print OS and CPU information. - string cpu = process_state.system_info()->cpu; - string cpu_info = process_state.system_info()->cpu_info; - printf("Operating system: %s\n", process_state.system_info()->os.c_str()); - printf(" %s\n", - process_state.system_info()->os_version.c_str()); - printf("CPU: %s\n", cpu.c_str()); - if (!cpu_info.empty()) { - // This field is optional. - printf(" %s\n", cpu_info.c_str()); - } - printf(" %d CPU%s\n", - process_state.system_info()->cpu_count, - process_state.system_info()->cpu_count != 1 ? "s" : ""); - printf("\n"); - - // Print crash information. - if (process_state.crashed()) { - printf("Crash reason: %s\n", process_state.crash_reason().c_str()); - printf("Crash address: 0x%" PRIx64 "\n", process_state.crash_address()); - } else { - printf("No crash\n"); - } - - string assertion = process_state.assertion(); - if (!assertion.empty()) { - printf("Assertion: %s\n", assertion.c_str()); - } - - // If the thread that requested the dump is known, print it first. - int requesting_thread = process_state.requesting_thread(); - if (requesting_thread != -1) { - printf("\n"); - printf("Thread %d (%s)\n", - requesting_thread, - process_state.crashed() ? "crashed" : - "requested dump, did not crash"); - PrintStack(process_state.threads()->at(requesting_thread), cpu); - } - - // Print all of the threads in the dump. - int thread_count = process_state.threads()->size(); - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - printf("\n"); - printf("Thread %d\n", thread_index); - PrintStack(process_state.threads()->at(thread_index), cpu); - } - } - - PrintModules(process_state.modules()); -} - -static void PrintProcessStateMachineReadable(const ProcessState& process_state) -{ - // Print OS and CPU information. - // OS|{OS Name}|{OS Version} - // CPU|{CPU Name}|{CPU Info}|{Number of CPUs} - printf("OS%c%s%c%s\n", kOutputSeparator, - StripSeparator(process_state.system_info()->os).c_str(), - kOutputSeparator, - StripSeparator(process_state.system_info()->os_version).c_str()); - printf("CPU%c%s%c%s%c%d\n", kOutputSeparator, - StripSeparator(process_state.system_info()->cpu).c_str(), - kOutputSeparator, - // this may be empty - StripSeparator(process_state.system_info()->cpu_info).c_str(), - kOutputSeparator, - process_state.system_info()->cpu_count); - - int requesting_thread = process_state.requesting_thread(); - - // Print crash information. - // Crash|{Crash Reason}|{Crash Address}|{Crashed Thread} - printf("Crash%c", kOutputSeparator); - if (process_state.crashed()) { - printf("%s%c0x%" PRIx64 "%c", - StripSeparator(process_state.crash_reason()).c_str(), - kOutputSeparator, process_state.crash_address(), kOutputSeparator); - } else { - // print assertion info, if available, in place of crash reason, - // instead of the unhelpful "No crash" - string assertion = process_state.assertion(); - if (!assertion.empty()) { - printf("%s%c%c", StripSeparator(assertion).c_str(), - kOutputSeparator, kOutputSeparator); - } else { - printf("No crash%c%c", kOutputSeparator, kOutputSeparator); - } - } - - if (requesting_thread != -1) { - printf("%d\n", requesting_thread); - } else { - printf("\n"); - } - - PrintModulesMachineReadable(process_state.modules()); - - // blank line to indicate start of threads - printf("\n"); - - // If the thread that requested the dump is known, print it first. - if (requesting_thread != -1) { - PrintStackMachineReadable(requesting_thread, - process_state.threads()->at(requesting_thread)); - } - - // Print all of the threads in the dump. - int thread_count = process_state.threads()->size(); - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - PrintStackMachineReadable(thread_index, - process_state.threads()->at(thread_index)); - } - } -} - -// Processes |minidump_file| using MinidumpProcessor. |symbol_path|, if -// non-empty, is the base directory of a symbol storage area, laid out in -// the format required by SimpleSymbolSupplier. If such a storage area -// is specified, it is made available for use by the MinidumpProcessor. -// -// Returns the value of MinidumpProcessor::Process. If processing succeeds, -// prints identifying OS and CPU information from the minidump, crash -// information if the minidump was produced as a result of a crash, and -// call stacks for each thread contained in the minidump. All information -// is printed to stdout. -static bool PrintMinidumpProcess(const string &minidump_file, - const vector &symbol_paths, - bool machine_readable) { - scoped_ptr symbol_supplier; - if (!symbol_paths.empty()) { - // TODO(mmentovai): check existence of symbol_path if specified? - symbol_supplier.reset(new SimpleSymbolSupplier(symbol_paths)); - } - - BasicSourceLineResolver resolver; - MinidumpProcessor minidump_processor(symbol_supplier.get(), &resolver); - - // Process the minidump. - ProcessState process_state; - if (minidump_processor.Process(minidump_file, &process_state) != - google_breakpad::PROCESS_OK) { - BPLOG(ERROR) << "MinidumpProcessor::Process failed"; - return false; - } - - if (machine_readable) { - PrintProcessStateMachineReadable(process_state); - } else { - PrintProcessState(process_state); - } - - return true; -} - -} // namespace - -static void usage(const char *program_name) { - fprintf(stderr, "usage: %s [-m] [symbol-path ...]\n" - " -m : Output in machine-readable format\n", - program_name); -} - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - if (argc < 2) { - usage(argv[0]); - return 1; - } - - const char *minidump_file; - bool machine_readable; - int symbol_path_arg; - - if (strcmp(argv[1], "-m") == 0) { - if (argc < 3) { - usage(argv[0]); - return 1; - } - - machine_readable = true; - minidump_file = argv[2]; - symbol_path_arg = 3; - } else { - machine_readable = false; - minidump_file = argv[1]; - symbol_path_arg = 2; - } - - // extra arguments are symbol paths - std::vector symbol_paths; - if (argc > symbol_path_arg) { - for (int argi = symbol_path_arg; argi < argc; ++argi) - symbol_paths.push_back(argv[argi]); - } - - return PrintMinidumpProcess(minidump_file, - symbol_paths, - machine_readable) ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_machine_readable_test b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_machine_readable_test deleted file mode 100755 index 2aadb241..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_machine_readable_test +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_stackwalk -m $testdata_dir/minidump2.dmp \ - $testdata_dir/symbols | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.stackwalk.machine_readable.out - -exit $? diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_test b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_test deleted file mode 100755 index f9790279..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_stackwalk_test +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_stackwalk $testdata_dir/minidump2.dmp \ - $testdata_dir/symbols | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.stackwalk.out - -exit $? diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_unittest.cc deleted file mode 100644 index 13876df5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/minidump_unittest.cc +++ /dev/null @@ -1,591 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit test for Minidump. Uses a pre-generated minidump and -// verifies that certain streams are correct. - -#include -#include -#include -#include -#include -#include -#include "breakpad_googletest_includes.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/minidump.h" -#include "processor/logging.h" -#include "processor/synth_minidump.h" - -namespace { - -using google_breakpad::Minidump; -using google_breakpad::MinidumpContext; -using google_breakpad::MinidumpMemoryInfo; -using google_breakpad::MinidumpMemoryInfoList; -using google_breakpad::MinidumpMemoryList; -using google_breakpad::MinidumpMemoryRegion; -using google_breakpad::MinidumpModule; -using google_breakpad::MinidumpModuleList; -using google_breakpad::MinidumpSystemInfo; -using google_breakpad::MinidumpThread; -using google_breakpad::MinidumpThreadList; -using google_breakpad::SynthMinidump::Context; -using google_breakpad::SynthMinidump::Dump; -using google_breakpad::SynthMinidump::Memory; -using google_breakpad::SynthMinidump::Module; -using google_breakpad::SynthMinidump::Stream; -using google_breakpad::SynthMinidump::String; -using google_breakpad::SynthMinidump::SystemInfo; -using google_breakpad::SynthMinidump::Thread; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using std::ifstream; -using std::istringstream; -using std::string; -using std::vector; -using ::testing::Return; - -class MinidumpTest : public ::testing::Test { -public: - void SetUp() { - minidump_file_ = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/minidump2.dmp"; - } - string minidump_file_; -}; - -TEST_F(MinidumpTest, TestMinidumpFromFile) { - Minidump minidump(minidump_file_); - ASSERT_EQ(minidump.path(), minidump_file_); - ASSERT_TRUE(minidump.Read()); - const MDRawHeader* header = minidump.header(); - ASSERT_NE(header, (MDRawHeader*)NULL); - ASSERT_EQ(header->signature, u_int32_t(MD_HEADER_SIGNATURE)); - //TODO: add more checks here -} - -TEST_F(MinidumpTest, TestMinidumpFromStream) { - // read minidump contents into memory, construct a stringstream around them - ifstream file_stream(minidump_file_.c_str(), std::ios::in); - ASSERT_TRUE(file_stream.good()); - vector bytes; - file_stream.seekg(0, std::ios_base::end); - ASSERT_TRUE(file_stream.good()); - bytes.resize(file_stream.tellg()); - file_stream.seekg(0, std::ios_base::beg); - ASSERT_TRUE(file_stream.good()); - file_stream.read(&bytes[0], bytes.size()); - ASSERT_TRUE(file_stream.good()); - string str(&bytes[0], bytes.size()); - istringstream stream(str); - ASSERT_TRUE(stream.good()); - - // now read minidump from stringstream - Minidump minidump(stream); - ASSERT_EQ(minidump.path(), ""); - ASSERT_TRUE(minidump.Read()); - const MDRawHeader* header = minidump.header(); - ASSERT_NE(header, (MDRawHeader*)NULL); - ASSERT_EQ(header->signature, u_int32_t(MD_HEADER_SIGNATURE)); - //TODO: add more checks here -} - -TEST(Dump, ReadBackEmpty) { - Dump dump(0); - dump.Finish(); - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream stream(contents); - Minidump minidump(stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(0U, minidump.GetDirectoryEntryCount()); -} - -TEST(Dump, ReadBackEmptyBigEndian) { - Dump big_minidump(0, kBigEndian); - big_minidump.Finish(); - string contents; - ASSERT_TRUE(big_minidump.GetContents(&contents)); - istringstream stream(contents); - Minidump minidump(stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(0U, minidump.GetDirectoryEntryCount()); -} - -TEST(Dump, OneStream) { - Dump dump(0, kBigEndian); - Stream stream(dump, 0xfbb7fa2bU); - stream.Append("stream contents"); - dump.Add(&stream); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(1U, minidump.GetDirectoryEntryCount()); - - const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0); - ASSERT_TRUE(dir != NULL); - EXPECT_EQ(0xfbb7fa2bU, dir->stream_type); - - u_int32_t stream_length; - ASSERT_TRUE(minidump.SeekToStreamType(0xfbb7fa2bU, &stream_length)); - ASSERT_EQ(15U, stream_length); - char stream_contents[15]; - ASSERT_TRUE(minidump.ReadBytes(stream_contents, sizeof(stream_contents))); - EXPECT_EQ(string("stream contents"), - string(stream_contents, sizeof(stream_contents))); - - EXPECT_FALSE(minidump.GetThreadList()); - EXPECT_FALSE(minidump.GetModuleList()); - EXPECT_FALSE(minidump.GetMemoryList()); - EXPECT_FALSE(minidump.GetException()); - EXPECT_FALSE(minidump.GetAssertion()); - EXPECT_FALSE(minidump.GetSystemInfo()); - EXPECT_FALSE(minidump.GetMiscInfo()); - EXPECT_FALSE(minidump.GetBreakpadInfo()); -} - -TEST(Dump, OneMemory) { - Dump dump(0, kBigEndian); - Memory memory(dump, 0x309d68010bd21b2cULL); - memory.Append("memory contents"); - dump.Add(&memory); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(1U, minidump.GetDirectoryEntryCount()); - - const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0); - ASSERT_TRUE(dir != NULL); - EXPECT_EQ((u_int32_t) MD_MEMORY_LIST_STREAM, dir->stream_type); - - MinidumpMemoryList *memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(memory_list != NULL); - ASSERT_EQ(1U, memory_list->region_count()); - - MinidumpMemoryRegion *region1 = memory_list->GetMemoryRegionAtIndex(0); - ASSERT_EQ(0x309d68010bd21b2cULL, region1->GetBase()); - ASSERT_EQ(15U, region1->GetSize()); - const u_int8_t *region1_bytes = region1->GetMemory(); - ASSERT_TRUE(memcmp("memory contents", region1_bytes, 15) == 0); -} - -// One thread --- and its requisite entourage. -TEST(Dump, OneThread) { - Dump dump(0, kLittleEndian); - Memory stack(dump, 0x2326a0fa); - stack.Append("stack for thread"); - - MDRawContextX86 raw_context; - raw_context.context_flags = MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL; - raw_context.edi = 0x3ecba80d; - raw_context.esi = 0x382583b9; - raw_context.ebx = 0x7fccc03f; - raw_context.edx = 0xf62f8ec2; - raw_context.ecx = 0x46a6a6a8; - raw_context.eax = 0x6a5025e2; - raw_context.ebp = 0xd9fabb4a; - raw_context.eip = 0x6913f540; - raw_context.cs = 0xbffe6eda; - raw_context.eflags = 0xb2ce1e2d; - raw_context.esp = 0x659caaa4; - raw_context.ss = 0x2e951ef7; - Context context(dump, raw_context); - - Thread thread(dump, 0xa898f11b, stack, context, - 0x9e39439f, 0x4abfc15f, 0xe499898a, 0x0d43e939dcfd0372ULL); - - dump.Add(&stack); - dump.Add(&context); - dump.Add(&thread); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(2U, minidump.GetDirectoryEntryCount()); - - MinidumpMemoryList *md_memory_list = minidump.GetMemoryList(); - ASSERT_TRUE(md_memory_list != NULL); - ASSERT_EQ(1U, md_memory_list->region_count()); - - MinidumpMemoryRegion *md_region = md_memory_list->GetMemoryRegionAtIndex(0); - ASSERT_EQ(0x2326a0faU, md_region->GetBase()); - ASSERT_EQ(16U, md_region->GetSize()); - const u_int8_t *region_bytes = md_region->GetMemory(); - ASSERT_TRUE(memcmp("stack for thread", region_bytes, 16) == 0); - - MinidumpThreadList *thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list != NULL); - ASSERT_EQ(1U, thread_list->thread_count()); - - MinidumpThread *md_thread = thread_list->GetThreadAtIndex(0); - ASSERT_TRUE(md_thread != NULL); - u_int32_t thread_id; - ASSERT_TRUE(md_thread->GetThreadID(&thread_id)); - ASSERT_EQ(0xa898f11bU, thread_id); - MinidumpMemoryRegion *md_stack = md_thread->GetMemory(); - ASSERT_TRUE(md_stack != NULL); - ASSERT_EQ(0x2326a0faU, md_stack->GetBase()); - ASSERT_EQ(16U, md_stack->GetSize()); - const u_int8_t *md_stack_bytes = md_stack->GetMemory(); - ASSERT_TRUE(memcmp("stack for thread", md_stack_bytes, 16) == 0); - - MinidumpContext *md_context = md_thread->GetContext(); - ASSERT_TRUE(md_context != NULL); - ASSERT_EQ((u_int32_t) MD_CONTEXT_X86, md_context->GetContextCPU()); - const MDRawContextX86 *md_raw_context = md_context->GetContextX86(); - ASSERT_TRUE(md_raw_context != NULL); - ASSERT_EQ((u_int32_t) (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL), - (md_raw_context->context_flags - & (MD_CONTEXT_X86_INTEGER | MD_CONTEXT_X86_CONTROL))); - EXPECT_EQ(0x3ecba80dU, raw_context.edi); - EXPECT_EQ(0x382583b9U, raw_context.esi); - EXPECT_EQ(0x7fccc03fU, raw_context.ebx); - EXPECT_EQ(0xf62f8ec2U, raw_context.edx); - EXPECT_EQ(0x46a6a6a8U, raw_context.ecx); - EXPECT_EQ(0x6a5025e2U, raw_context.eax); - EXPECT_EQ(0xd9fabb4aU, raw_context.ebp); - EXPECT_EQ(0x6913f540U, raw_context.eip); - EXPECT_EQ(0xbffe6edaU, raw_context.cs); - EXPECT_EQ(0xb2ce1e2dU, raw_context.eflags); - EXPECT_EQ(0x659caaa4U, raw_context.esp); - EXPECT_EQ(0x2e951ef7U, raw_context.ss); -} - -TEST(Dump, OneModule) { - static const MDVSFixedFileInfo fixed_file_info = { - 0xb2fba33a, // signature - 0x33d7a728, // struct_version - 0x31afcb20, // file_version_hi - 0xe51cdab1, // file_version_lo - 0xd1ea6907, // product_version_hi - 0x03032857, // product_version_lo - 0x11bf71d7, // file_flags_mask - 0x5fb8cdbf, // file_flags - 0xe45d0d5d, // file_os - 0x107d9562, // file_type - 0x5a8844d4, // file_subtype - 0xa8d30b20, // file_date_hi - 0x651c3e4e // file_date_lo - }; - - Dump dump(0, kBigEndian); - String module_name(dump, "single module"); - Module module(dump, 0xa90206ca83eb2852ULL, 0xada542bd, - module_name, - 0xb1054d2a, - 0x34571371, - fixed_file_info, // from synth_minidump_unittest_data.h - NULL, NULL); - - dump.Add(&module); - dump.Add(&module_name); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(1U, minidump.GetDirectoryEntryCount()); - - const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0); - ASSERT_TRUE(dir != NULL); - EXPECT_EQ((u_int32_t) MD_MODULE_LIST_STREAM, dir->stream_type); - - MinidumpModuleList *md_module_list = minidump.GetModuleList(); - ASSERT_TRUE(md_module_list != NULL); - ASSERT_EQ(1U, md_module_list->module_count()); - - const MinidumpModule *md_module = md_module_list->GetModuleAtIndex(0); - ASSERT_TRUE(md_module != NULL); - ASSERT_EQ(0xa90206ca83eb2852ULL, md_module->base_address()); - ASSERT_EQ(0xada542bd, md_module->size()); - ASSERT_EQ("single module", md_module->code_file()); - - const MDRawModule *md_raw_module = md_module->module(); - ASSERT_TRUE(md_raw_module != NULL); - ASSERT_EQ(0xb1054d2aU, md_raw_module->time_date_stamp); - ASSERT_EQ(0x34571371U, md_raw_module->checksum); - ASSERT_TRUE(memcmp(&md_raw_module->version_info, &fixed_file_info, - sizeof(fixed_file_info)) == 0); -} - -TEST(Dump, OneSystemInfo) { - Dump dump(0, kLittleEndian); - String csd_version(dump, "Petulant Pierogi"); - SystemInfo system_info(dump, SystemInfo::windows_x86, csd_version); - - dump.Add(&system_info); - dump.Add(&csd_version); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(1U, minidump.GetDirectoryEntryCount()); - - const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0); - ASSERT_TRUE(dir != NULL); - EXPECT_EQ((u_int32_t) MD_SYSTEM_INFO_STREAM, dir->stream_type); - - MinidumpSystemInfo *md_system_info = minidump.GetSystemInfo(); - ASSERT_TRUE(md_system_info != NULL); - ASSERT_EQ("windows", md_system_info->GetOS()); - ASSERT_EQ("x86", md_system_info->GetCPU()); - ASSERT_EQ("Petulant Pierogi", *md_system_info->GetCSDVersion()); - ASSERT_EQ("GenuineIntel", *md_system_info->GetCPUVendor()); -} - -TEST(Dump, BigDump) { - Dump dump(0, kLittleEndian); - - // A SystemInfo stream. - String csd_version(dump, "Munificent Macaque"); - SystemInfo system_info(dump, SystemInfo::windows_x86, csd_version); - dump.Add(&csd_version); - dump.Add(&system_info); - - // Five threads! - Memory stack0(dump, 0x70b9ebfc); - stack0.Append("stack for thread zero"); - MDRawContextX86 raw_context0; - raw_context0.context_flags = MD_CONTEXT_X86_INTEGER; - raw_context0.eip = 0xaf0709e4; - Context context0(dump, raw_context0); - Thread thread0(dump, 0xbbef4432, stack0, context0, - 0xd0377e7b, 0xdb8eb0cf, 0xd73bc314, 0x09d357bac7f9a163ULL); - dump.Add(&stack0); - dump.Add(&context0); - dump.Add(&thread0); - - Memory stack1(dump, 0xf988cc45); - stack1.Append("stack for thread one"); - MDRawContextX86 raw_context1; - raw_context1.context_flags = MD_CONTEXT_X86_INTEGER; - raw_context1.eip = 0xe4f56f81; - Context context1(dump, raw_context1); - Thread thread1(dump, 0x657c3f58, stack1, context1, - 0xa68fa182, 0x6f3cf8dd, 0xe3a78ccf, 0x78cc84775e4534bbULL); - dump.Add(&stack1); - dump.Add(&context1); - dump.Add(&thread1); - - Memory stack2(dump, 0xc8a92e7c); - stack2.Append("stack for thread two"); - MDRawContextX86 raw_context2; - raw_context2.context_flags = MD_CONTEXT_X86_INTEGER; - raw_context2.eip = 0xb336a438; - Context context2(dump, raw_context2); - Thread thread2(dump, 0xdf4b8a71, stack2, context2, - 0x674c26b6, 0x445d7120, 0x7e700c56, 0xd89bf778e7793e17ULL); - dump.Add(&stack2); - dump.Add(&context2); - dump.Add(&thread2); - - Memory stack3(dump, 0x36d08e08); - stack3.Append("stack for thread three"); - MDRawContextX86 raw_context3; - raw_context3.context_flags = MD_CONTEXT_X86_INTEGER; - raw_context3.eip = 0xdf99a60c; - Context context3(dump, raw_context3); - Thread thread3(dump, 0x86e6c341, stack3, context3, - 0x32dc5c55, 0x17a2aba8, 0xe0cc75e7, 0xa46393994dae83aeULL); - dump.Add(&stack3); - dump.Add(&context3); - dump.Add(&thread3); - - Memory stack4(dump, 0x1e0ab4fa); - stack4.Append("stack for thread four"); - MDRawContextX86 raw_context4; - raw_context4.context_flags = MD_CONTEXT_X86_INTEGER; - raw_context4.eip = 0xaa646267; - Context context4(dump, raw_context4); - Thread thread4(dump, 0x261a28d4, stack4, context4, - 0x6ebd389e, 0xa0cd4759, 0x30168846, 0x164f650a0cf39d35ULL); - dump.Add(&stack4); - dump.Add(&context4); - dump.Add(&thread4); - - // Three modules! - String module1_name(dump, "module one"); - Module module1(dump, 0xeb77da57b5d4cbdaULL, 0x83cd5a37, module1_name); - dump.Add(&module1_name); - dump.Add(&module1); - - String module2_name(dump, "module two"); - Module module2(dump, 0x8675884adfe5ac90ULL, 0xb11e4ea3, module2_name); - dump.Add(&module2_name); - dump.Add(&module2); - - String module3_name(dump, "module three"); - Module module3(dump, 0x95fc1544da321b6cULL, 0x7c2bf081, module3_name); - dump.Add(&module3_name); - dump.Add(&module3); - - // Add one more memory region, on top of the five stacks. - Memory memory5(dump, 0x61979e828040e564ULL); - memory5.Append("contents of memory 5"); - dump.Add(&memory5); - - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(4U, minidump.GetDirectoryEntryCount()); - - // Check the threads. - MinidumpThreadList *thread_list = minidump.GetThreadList(); - ASSERT_TRUE(thread_list != NULL); - ASSERT_EQ(5U, thread_list->thread_count()); - u_int32_t thread_id; - ASSERT_TRUE(thread_list->GetThreadAtIndex(0)->GetThreadID(&thread_id)); - ASSERT_EQ(0xbbef4432U, thread_id); - ASSERT_EQ(0x70b9ebfcU, - thread_list->GetThreadAtIndex(0)->GetMemory()->GetBase()); - ASSERT_EQ(0xaf0709e4U, - thread_list->GetThreadAtIndex(0)->GetContext()->GetContextX86() - ->eip); - - ASSERT_TRUE(thread_list->GetThreadAtIndex(1)->GetThreadID(&thread_id)); - ASSERT_EQ(0x657c3f58U, thread_id); - ASSERT_EQ(0xf988cc45U, - thread_list->GetThreadAtIndex(1)->GetMemory()->GetBase()); - ASSERT_EQ(0xe4f56f81U, - thread_list->GetThreadAtIndex(1)->GetContext()->GetContextX86() - ->eip); - - ASSERT_TRUE(thread_list->GetThreadAtIndex(2)->GetThreadID(&thread_id)); - ASSERT_EQ(0xdf4b8a71U, thread_id); - ASSERT_EQ(0xc8a92e7cU, - thread_list->GetThreadAtIndex(2)->GetMemory()->GetBase()); - ASSERT_EQ(0xb336a438U, - thread_list->GetThreadAtIndex(2)->GetContext()->GetContextX86() - ->eip); - - ASSERT_TRUE(thread_list->GetThreadAtIndex(3)->GetThreadID(&thread_id)); - ASSERT_EQ(0x86e6c341U, thread_id); - ASSERT_EQ(0x36d08e08U, - thread_list->GetThreadAtIndex(3)->GetMemory()->GetBase()); - ASSERT_EQ(0xdf99a60cU, - thread_list->GetThreadAtIndex(3)->GetContext()->GetContextX86() - ->eip); - - ASSERT_TRUE(thread_list->GetThreadAtIndex(4)->GetThreadID(&thread_id)); - ASSERT_EQ(0x261a28d4U, thread_id); - ASSERT_EQ(0x1e0ab4faU, - thread_list->GetThreadAtIndex(4)->GetMemory()->GetBase()); - ASSERT_EQ(0xaa646267U, - thread_list->GetThreadAtIndex(4)->GetContext()->GetContextX86() - ->eip); - - // Check the modules. - MinidumpModuleList *md_module_list = minidump.GetModuleList(); - ASSERT_TRUE(md_module_list != NULL); - ASSERT_EQ(3U, md_module_list->module_count()); - EXPECT_EQ(0xeb77da57b5d4cbdaULL, - md_module_list->GetModuleAtIndex(0)->base_address()); - EXPECT_EQ(0x8675884adfe5ac90ULL, - md_module_list->GetModuleAtIndex(1)->base_address()); - EXPECT_EQ(0x95fc1544da321b6cULL, - md_module_list->GetModuleAtIndex(2)->base_address()); -} - -TEST(Dump, OneMemoryInfo) { - Dump dump(0, kBigEndian); - Stream stream(dump, MD_MEMORY_INFO_LIST_STREAM); - - // Add the MDRawMemoryInfoList header. - const u_int64_t kNumberOfEntries = 1; - stream.D32(sizeof(MDRawMemoryInfoList)) // size_of_header - .D32(sizeof(MDRawMemoryInfo)) // size_of_entry - .D64(kNumberOfEntries); // number_of_entries - - - // Now add a MDRawMemoryInfo entry. - const u_int64_t kBaseAddress = 0x1000; - const u_int64_t kRegionSize = 0x2000; - stream.D64(kBaseAddress) // base_address - .D64(kBaseAddress) // allocation_base - .D32(MD_MEMORY_PROTECT_EXECUTE_READWRITE) // allocation_protection - .D32(0) // __alignment1 - .D64(kRegionSize) // region_size - .D32(MD_MEMORY_STATE_COMMIT) // state - .D32(MD_MEMORY_PROTECT_EXECUTE_READWRITE) // protection - .D32(MD_MEMORY_TYPE_PRIVATE) // type - .D32(0); // __alignment2 - - dump.Add(&stream); - dump.Finish(); - - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - istringstream minidump_stream(contents); - Minidump minidump(minidump_stream); - ASSERT_TRUE(minidump.Read()); - ASSERT_EQ(1U, minidump.GetDirectoryEntryCount()); - - const MDRawDirectory *dir = minidump.GetDirectoryEntryAtIndex(0); - ASSERT_TRUE(dir != NULL); - EXPECT_EQ((u_int32_t) MD_MEMORY_INFO_LIST_STREAM, dir->stream_type); - - MinidumpMemoryInfoList *info_list = minidump.GetMemoryInfoList(); - ASSERT_TRUE(info_list != NULL); - ASSERT_EQ(1U, info_list->info_count()); - - const MinidumpMemoryInfo *info1 = info_list->GetMemoryInfoAtIndex(0); - ASSERT_EQ(kBaseAddress, info1->GetBase()); - ASSERT_EQ(kRegionSize, info1->GetSize()); - ASSERT_TRUE(info1->IsExecutable()); - ASSERT_TRUE(info1->IsWritable()); - - // Should get back the same memory region here. - const MinidumpMemoryInfo *info2 = - info_list->GetMemoryInfoForAddress(kBaseAddress + kRegionSize / 2); - ASSERT_EQ(kBaseAddress, info2->GetBase()); - ASSERT_EQ(kRegionSize, info2->GetSize()); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.cc deleted file mode 100644 index 837d854b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.cc +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// module_comparer.cc: ModuleComparer implementation. -// See module_comparer.h for documentation. -// -// Author: lambxsy@google.com (Siyang Xie) - -#include "processor/module_comparer.h" - -#include -#include - -#include "processor/basic_code_module.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - BPLOG(ERROR) << "FAIL: " << #condition << " @ " \ - << __FILE__ << ":" << __LINE__; \ - return false; \ - } - -#define ASSERT_FALSE(condition) ASSERT_TRUE(!(condition)) - -namespace google_breakpad { - -bool ModuleComparer::Compare(const string &symbol_data) { - scoped_ptr basic_module(new BasicModule("test_module")); - scoped_ptr fast_module(new FastModule("test_module")); - - // Load symbol data into basic_module - scoped_array buffer(new char[symbol_data.size() + 1]); - strcpy(buffer.get(), symbol_data.c_str()); - ASSERT_TRUE(basic_module->LoadMapFromMemory(buffer.get())); - buffer.reset(); - - // Serialize BasicSourceLineResolver::Module. - unsigned int serialized_size = 0; - scoped_array serialized_data( - serializer_.Serialize(*(basic_module.get()), &serialized_size)); - ASSERT_TRUE(serialized_data.get()); - BPLOG(INFO) << "Serialized size = " << serialized_size << " Bytes"; - - // Load FastSourceLineResolver::Module using serialized data. - ASSERT_TRUE(fast_module->LoadMapFromMemory(serialized_data.get())); - - // Compare FastSourceLineResolver::Module with - // BasicSourceLineResolver::Module. - ASSERT_TRUE(CompareModule(basic_module.get(), fast_module.get())); - - return true; -} - -// Traversal the content of module and do comparison -bool ModuleComparer::CompareModule(const BasicModule *basic_module, - const FastModule *fast_module) const { - // Compare name_. - ASSERT_TRUE(basic_module->name_ == fast_module->name_); - - // Compare files_: - { - BasicModule::FileMap::const_iterator iter1 = basic_module->files_.begin(); - FastModule::FileMap::iterator iter2 = fast_module->files_.begin(); - while (iter1 != basic_module->files_.end() - && iter2 != fast_module->files_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - string tmp(iter2.GetValuePtr()); - ASSERT_TRUE(iter1->second == tmp); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_module->files_.end()); - ASSERT_TRUE(iter2 == fast_module->files_.end()); - } - - // Compare functions_: - { - RangeMap >::MapConstIterator iter1; - StaticRangeMap::MapConstIterator iter2; - iter1 = basic_module->functions_.map_.begin(); - iter2 = fast_module->functions_.map_.begin(); - while (iter1 != basic_module->functions_.map_.end() - && iter2 != fast_module->functions_.map_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - ASSERT_TRUE(iter1->second.base() == iter2.GetValuePtr()->base()); - ASSERT_TRUE(CompareFunction( - iter1->second.entry().get(), iter2.GetValuePtr()->entryptr())); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_module->functions_.map_.end()); - ASSERT_TRUE(iter2 == fast_module->functions_.map_.end()); - } - - // Compare public_symbols_: - { - AddressMap >::MapConstIterator iter1; - StaticAddressMap::MapConstIterator iter2; - iter1 = basic_module->public_symbols_.map_.begin(); - iter2 = fast_module->public_symbols_.map_.begin(); - while (iter1 != basic_module->public_symbols_.map_.end() - && iter2 != fast_module->public_symbols_.map_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - ASSERT_TRUE(ComparePubSymbol( - iter1->second.get(), iter2.GetValuePtr())); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_module->public_symbols_.map_.end()); - ASSERT_TRUE(iter2 == fast_module->public_symbols_.map_.end()); - } - - // Compare windows_frame_info_[]: - for (int i = 0; i < WindowsFrameInfo::STACK_INFO_LAST; ++i) { - ASSERT_TRUE(CompareCRM(&(basic_module->windows_frame_info_[i]), - &(fast_module->windows_frame_info_[i]))); - } - - // Compare cfi_initial_rules_: - { - RangeMap::MapConstIterator iter1; - StaticRangeMap::MapConstIterator iter2; - iter1 = basic_module->cfi_initial_rules_.map_.begin(); - iter2 = fast_module->cfi_initial_rules_.map_.begin(); - while (iter1 != basic_module->cfi_initial_rules_.map_.end() - && iter2 != fast_module->cfi_initial_rules_.map_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - ASSERT_TRUE(iter1->second.base() == iter2.GetValuePtr()->base()); - string tmp(iter2.GetValuePtr()->entryptr()); - ASSERT_TRUE(iter1->second.entry() == tmp); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_module->cfi_initial_rules_.map_.end()); - ASSERT_TRUE(iter2 == fast_module->cfi_initial_rules_.map_.end()); - } - - // Compare cfi_delta_rules_: - { - map::const_iterator iter1; - StaticMap::iterator iter2; - iter1 = basic_module->cfi_delta_rules_.begin(); - iter2 = fast_module->cfi_delta_rules_.begin(); - while (iter1 != basic_module->cfi_delta_rules_.end() - && iter2 != fast_module->cfi_delta_rules_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - string tmp(iter2.GetValuePtr()); - ASSERT_TRUE(iter1->second == tmp); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_module->cfi_delta_rules_.end()); - ASSERT_TRUE(iter2 == fast_module->cfi_delta_rules_.end()); - } - - return true; -} - -bool ModuleComparer::CompareFunction(const BasicFunc *basic_func, - const FastFunc *fast_func_raw) const { - FastFunc* fast_func = new FastFunc(); - fast_func->CopyFrom(fast_func_raw); - ASSERT_TRUE(basic_func->name == fast_func->name); - ASSERT_TRUE(basic_func->address == fast_func->address); - ASSERT_TRUE(basic_func->size == fast_func->size); - - // compare range map of lines: - RangeMap >::MapConstIterator iter1; - StaticRangeMap::MapConstIterator iter2; - iter1 = basic_func->lines.map_.begin(); - iter2 = fast_func->lines.map_.begin(); - while (iter1 != basic_func->lines.map_.end() - && iter2 != fast_func->lines.map_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - ASSERT_TRUE(iter1->second.base() == iter2.GetValuePtr()->base()); - ASSERT_TRUE(CompareLine(iter1->second.entry().get(), - iter2.GetValuePtr()->entryptr())); - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_func->lines.map_.end()); - ASSERT_TRUE(iter2 == fast_func->lines.map_.end()); - - delete fast_func; - return true; -} - -bool ModuleComparer::CompareLine(const BasicLine *basic_line, - const FastLine *fast_line_raw) const { - FastLine *fast_line = new FastLine; - fast_line->CopyFrom(fast_line_raw); - - ASSERT_TRUE(basic_line->address == fast_line->address); - ASSERT_TRUE(basic_line->size == fast_line->size); - ASSERT_TRUE(basic_line->source_file_id == fast_line->source_file_id); - ASSERT_TRUE(basic_line->line == fast_line->line); - - delete fast_line; - return true; -} - -bool ModuleComparer::ComparePubSymbol(const BasicPubSymbol* basic_ps, - const FastPubSymbol* fastps_raw) const { - FastPubSymbol *fast_ps = new FastPubSymbol; - fast_ps->CopyFrom(fastps_raw); - ASSERT_TRUE(basic_ps->name == fast_ps->name); - ASSERT_TRUE(basic_ps->address == fast_ps->address); - ASSERT_TRUE(basic_ps->parameter_size == fast_ps->parameter_size); - delete fast_ps; - return true; -} - -bool ModuleComparer::CompareWFI(const WindowsFrameInfo& wfi1, - const WindowsFrameInfo& wfi2) const { - ASSERT_TRUE(wfi1.valid == wfi2.valid); - ASSERT_TRUE(wfi1.prolog_size == wfi2.prolog_size); - ASSERT_TRUE(wfi1.epilog_size == wfi2.epilog_size); - ASSERT_TRUE(wfi1.parameter_size == wfi2.parameter_size); - ASSERT_TRUE(wfi1.saved_register_size == wfi2.saved_register_size); - ASSERT_TRUE(wfi1.local_size == wfi2.local_size); - ASSERT_TRUE(wfi1.max_stack_size == wfi2.max_stack_size); - ASSERT_TRUE(wfi1.allocates_base_pointer == wfi2.allocates_base_pointer); - ASSERT_TRUE(wfi1.program_string == wfi2.program_string); - return true; -} - -// Compare ContainedRangeMap -bool ModuleComparer::CompareCRM( - const ContainedRangeMap >* basic_crm, - const StaticContainedRangeMap* fast_crm) const { - ASSERT_TRUE(basic_crm->base_ == fast_crm->base_); - - if (!basic_crm->entry_.get() || !fast_crm->entry_ptr_) { - // empty entry: - ASSERT_TRUE(!basic_crm->entry_.get() && !fast_crm->entry_ptr_); - } else { - WFI newwfi; - newwfi.CopyFrom(fast_resolver_->CopyWFI(fast_crm->entry_ptr_)); - ASSERT_TRUE(CompareWFI(*(basic_crm->entry_.get()), newwfi)); - } - - if ((!basic_crm->map_ || basic_crm->map_->empty()) - || fast_crm->map_.empty()) { - ASSERT_TRUE((!basic_crm->map_ || basic_crm->map_->empty()) - && fast_crm->map_.empty()); - } else { - ContainedRangeMap >::MapConstIterator iter1; - StaticContainedRangeMap::MapConstIterator iter2; - iter1 = basic_crm->map_->begin(); - iter2 = fast_crm->map_.begin(); - while (iter1 != basic_crm->map_->end() - && iter2 != fast_crm->map_.end()) { - ASSERT_TRUE(iter1->first == iter2.GetKey()); - StaticContainedRangeMap *child = - new StaticContainedRangeMap( - reinterpret_cast(iter2.GetValuePtr())); - ASSERT_TRUE(CompareCRM(iter1->second, child)); - delete child; - ++iter1; - ++iter2; - } - ASSERT_TRUE(iter1 == basic_crm->map_->end()); - ASSERT_TRUE(iter2 == fast_crm->map_.end()); - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.h deleted file mode 100644 index fcbd5177..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_comparer.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// module_comparer.h: ModuleComparer reads a string format of symbol file, and -// loads the symbol into both BasicSourceLineResolver::Module and -// FastSourceLineResolve::Module. It then traverses both Modules and compare -// the content of data to verify the correctness of new fast module. -// ModuleCompare class is a tool to verify correctness of a loaded -// FastSourceLineResolver::Module instance, i.e., in-memory representation of -// parsed symbol. ModuleComparer class should be used for testing purpose only, -// e.g., in fast_source_line_resolver_unittest. -// -// Author: lambxsy@google.com (Siyang Xie) - -#ifndef PROCESSOR_MODULE_COMPARER_H__ -#define PROCESSOR_MODULE_COMPARER_H__ - -#include - -#include "processor/basic_source_line_resolver_types.h" -#include "processor/fast_source_line_resolver_types.h" -#include "processor/module_serializer.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -class ModuleComparer { - public: - ModuleComparer(): fast_resolver_(new FastSourceLineResolver), - basic_resolver_(new BasicSourceLineResolver) { } - ~ModuleComparer() { - delete fast_resolver_; - delete basic_resolver_; - } - - // BasicSourceLineResolver loads its module using the symbol data, - // ModuleSerializer serialize the loaded module into a memory chunk, - // FastSourceLineResolver loads its module using the serialized memory chunk, - // Then, traverse both modules together and compare underlying data - // return true if both modules contain exactly same data. - bool Compare(const string &symbol_data); - - private: - typedef BasicSourceLineResolver::Module BasicModule; - typedef FastSourceLineResolver::Module FastModule; - typedef BasicSourceLineResolver::Function BasicFunc; - typedef FastSourceLineResolver::Function FastFunc; - typedef BasicSourceLineResolver::Line BasicLine; - typedef FastSourceLineResolver::Line FastLine; - typedef BasicSourceLineResolver::PublicSymbol BasicPubSymbol; - typedef FastSourceLineResolver::PublicSymbol FastPubSymbol; - typedef WindowsFrameInfo WFI; - - bool CompareModule(const BasicModule *oldmodule, - const FastModule *newmodule) const; - bool CompareFunction(const BasicFunc *oldfunc, const FastFunc *newfunc) const; - bool CompareLine(const BasicLine *oldline, const FastLine *newline) const; - bool ComparePubSymbol(const BasicPubSymbol*, const FastPubSymbol*) const; - bool CompareWFI(const WindowsFrameInfo&, const WindowsFrameInfo&) const; - - // Compare ContainedRangeMap - bool CompareCRM(const ContainedRangeMap >*, - const StaticContainedRangeMap*) const; - - FastSourceLineResolver *fast_resolver_; - BasicSourceLineResolver *basic_resolver_; - ModuleSerializer serializer_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_MODULE_COMPARER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_factory.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_factory.h deleted file mode 100644 index 7aa7caa5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_factory.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// module_factory.h: ModuleFactory a factory that provides -// an interface for creating a Module and deferring instantiation to subclasses -// BasicModuleFactory and FastModuleFactory. - -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_MODULE_FACTORY_H__ -#define PROCESSOR_MODULE_FACTORY_H__ - -#include "processor/basic_source_line_resolver_types.h" -#include "processor/fast_source_line_resolver_types.h" -#include "processor/source_line_resolver_base_types.h" - -namespace google_breakpad { - -class ModuleFactory { - public: - virtual ~ModuleFactory() { }; - virtual SourceLineResolverBase::Module* CreateModule( - const string &name) const = 0; -}; - -class BasicModuleFactory : public ModuleFactory { - public: - virtual ~BasicModuleFactory() { } - virtual BasicSourceLineResolver::Module* CreateModule( - const string &name) const { - return new BasicSourceLineResolver::Module(name); - } -}; - -class FastModuleFactory : public ModuleFactory { - public: - virtual ~FastModuleFactory() { } - virtual FastSourceLineResolver::Module* CreateModule( - const string &name) const { - return new FastSourceLineResolver::Module(name); - } -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_MODULE_FACTORY_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.cc deleted file mode 100644 index 5c5ff77c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// module_serializer.cc: ModuleSerializer implementation. -// -// See module_serializer.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include "processor/module_serializer.h" - -#include -#include - -#include "processor/basic_code_module.h" -#include "processor/logging.h" - -namespace google_breakpad { - -// Definition of static member variable in SimplerSerializer, which -// is declared in file "simple_serializer-inl.h" -RangeMapSerializer< MemAddr, linked_ptr > -SimpleSerializer::range_map_serializer_; - -size_t ModuleSerializer::SizeOf(const BasicSourceLineResolver::Module &module) { - size_t total_size_alloc_ = 0; - - // Compute memory size for each map component in Module class. - int map_index = 0; - map_sizes_[map_index++] = files_serializer_.SizeOf(module.files_); - map_sizes_[map_index++] = functions_serializer_.SizeOf(module.functions_); - map_sizes_[map_index++] = pubsym_serializer_.SizeOf(module.public_symbols_); - for (int i = 0; i < WindowsFrameInfo::STACK_INFO_LAST; ++i) - map_sizes_[map_index++] = - wfi_serializer_.SizeOf(&(module.windows_frame_info_[i])); - map_sizes_[map_index++] = cfi_init_rules_serializer_.SizeOf( - module.cfi_initial_rules_); - map_sizes_[map_index++] = cfi_delta_rules_serializer_.SizeOf( - module.cfi_delta_rules_); - - // Header size. - total_size_alloc_ = kNumberMaps_ * sizeof(u_int32_t); - - for (int i = 0; i < kNumberMaps_; ++i) - total_size_alloc_ += map_sizes_[i]; - - // Extra one byte for null terminator for C-string copy safety. - ++total_size_alloc_; - - return total_size_alloc_; -} - -char *ModuleSerializer::Write(const BasicSourceLineResolver::Module &module, - char *dest) { - // Write header. - memcpy(dest, map_sizes_, kNumberMaps_ * sizeof(u_int32_t)); - dest += kNumberMaps_ * sizeof(u_int32_t); - // Write each map. - dest = files_serializer_.Write(module.files_, dest); - dest = functions_serializer_.Write(module.functions_, dest); - dest = pubsym_serializer_.Write(module.public_symbols_, dest); - for (int i = 0; i < WindowsFrameInfo::STACK_INFO_LAST; ++i) - dest = wfi_serializer_.Write(&(module.windows_frame_info_[i]), dest); - dest = cfi_init_rules_serializer_.Write(module.cfi_initial_rules_, dest); - dest = cfi_delta_rules_serializer_.Write(module.cfi_delta_rules_, dest); - // Write a null terminator. - dest = SimpleSerializer::Write(0, dest); - return dest; -} - -char* ModuleSerializer::Serialize( - const BasicSourceLineResolver::Module &module, unsigned int *size) { - // Compute size of memory to allocate. - unsigned int size_to_alloc = SizeOf(module); - - // Allocate memory for serialized data. - char *serialized_data = new char[size_to_alloc]; - if (!serialized_data) { - BPLOG(ERROR) << "ModuleSerializer: memory allocation failed, " - << "size to alloc: " << size_to_alloc; - if (size) *size = 0; - return NULL; - } - - // Write serialized data to allocated memory chunk. - char *end_address = Write(module, serialized_data); - // Verify the allocated memory size is equal to the size of data been written. - unsigned int size_written = - static_cast(end_address - serialized_data); - if (size_to_alloc != size_written) { - BPLOG(ERROR) << "size_to_alloc differs from size_written: " - << size_to_alloc << " vs " << size_written; - } - - // Set size and return the start address of memory chunk. - if (size) - *size = size_to_alloc; - return serialized_data; -} - -bool ModuleSerializer::SerializeModuleAndLoadIntoFastResolver( - const BasicSourceLineResolver::ModuleMap::const_iterator &iter, - FastSourceLineResolver *fast_resolver) { - BPLOG(INFO) << "Converting symbol " << iter->first.c_str(); - - // Cast SourceLineResolverBase::Module* to BasicSourceLineResolver::Module*. - BasicSourceLineResolver::Module* basic_module = - dynamic_cast(iter->second); - - unsigned int size = 0; - scoped_array symbol_data(Serialize(*basic_module, &size)); - if (!symbol_data.get()) { - BPLOG(ERROR) << "Serialization failed for module: " << basic_module->name_; - return false; - } - BPLOG(INFO) << "Serialized Symbol Size " << size; - - // Copy the data into string. - // Must pass string to LoadModuleUsingMapBuffer(), instead of passing char* to - // LoadModuleUsingMemoryBuffer(), becaused of data ownership/lifetime issue. - string symbol_data_string(symbol_data.get(), size); - symbol_data.reset(); - - scoped_ptr code_module( - new BasicCodeModule(0, 0, iter->first, "", "", "", "")); - - return fast_resolver->LoadModuleUsingMapBuffer(code_module.get(), - symbol_data_string); -} - -void ModuleSerializer::ConvertAllModules( - const BasicSourceLineResolver *basic_resolver, - FastSourceLineResolver *fast_resolver) { - // Check for NULL pointer. - if (!basic_resolver || !fast_resolver) - return; - - // Traverse module list in basic resolver. - BasicSourceLineResolver::ModuleMap::const_iterator iter; - iter = basic_resolver->modules_->begin(); - for (; iter != basic_resolver->modules_->end(); ++iter) - SerializeModuleAndLoadIntoFastResolver(iter, fast_resolver); -} - -bool ModuleSerializer::ConvertOneModule( - const string &moduleid, - const BasicSourceLineResolver *basic_resolver, - FastSourceLineResolver *fast_resolver) { - // Check for NULL pointer. - if (!basic_resolver || !fast_resolver) - return false; - - BasicSourceLineResolver::ModuleMap::const_iterator iter; - iter = basic_resolver->modules_->find(moduleid); - if (iter == basic_resolver->modules_->end()) - return false; - - return SerializeModuleAndLoadIntoFastResolver(iter, fast_resolver); -} - -char* ModuleSerializer::SerializeSymbolFileData( - const string &symbol_data, unsigned int *size) { - scoped_ptr module( - new BasicSourceLineResolver::Module("no name")); - scoped_array buffer(new char[symbol_data.size() + 1]); - strcpy(buffer.get(), symbol_data.c_str()); - if (!module->LoadMapFromMemory(buffer.get())) { - return NULL; - } - buffer.reset(NULL); - return Serialize(*(module.get()), size); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.h deleted file mode 100644 index 3b440a60..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/module_serializer.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// module_serializer.h: ModuleSerializer serializes a loaded symbol, -// i.e., a loaded BasicSouceLineResolver::Module instance, into a memory -// chunk of data. The serialized data can be read and loaded by -// FastSourceLineResolver without CPU & memory-intensive parsing. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_MODULE_SERIALIZER_H__ -#define PROCESSOR_MODULE_SERIALIZER_H__ - -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/fast_source_line_resolver.h" -#include "processor/basic_source_line_resolver_types.h" -#include "processor/fast_source_line_resolver_types.h" -#include "processor/linked_ptr.h" -#include "processor/map_serializers-inl.h" -#include "processor/simple_serializer-inl.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -// ModuleSerializer serializes a loaded BasicSourceLineResolver::Module into a -// chunk of memory data. ModuleSerializer also provides interface to compute -// memory size of the serialized data, write serialized data directly into -// memory, convert ASCII format symbol data into serialized binary data, and -// convert loaded BasicSourceLineResolver::Module into -// FastSourceLineResolver::Module. -class ModuleSerializer { - public: - // Compute the size of memory required to serialize a module. Return the - // total size needed for serialization. - size_t SizeOf(const BasicSourceLineResolver::Module &module); - - // Write a module into an allocated memory chunk with required size. - // Return the "end" of data, i.e., the address after the final byte of data. - char* Write(const BasicSourceLineResolver::Module &module, char *dest); - - // Serializes a loaded Module object into a chunk of memory data and returns - // the address of memory chunk. If size != NULL, *size is set to the memory - // size allocated for the serialized data. - // Caller takes the ownership of the memory chunk (allocated on heap), and - // owner should call delete [] to free the memory after use. - char* Serialize(const BasicSourceLineResolver::Module &module, - unsigned int *size = NULL); - - // Given the string format symbol_data, produces a chunk of serialized data. - // Caller takes ownership of the serialized data (on heap), and owner should - // call delete [] to free the memory after use. - char* SerializeSymbolFileData(const string &symbol_data, - unsigned int *size = NULL); - - // Serializes one loaded module with given moduleid in the basic source line - // resolver, and loads the serialized data into the fast source line resolver. - // Return false if the basic source line doesn't have a module with the given - // moduleid. - bool ConvertOneModule(const string &moduleid, - const BasicSourceLineResolver *basic_resolver, - FastSourceLineResolver *fast_resolver); - - // Serializes all the loaded modules in a basic source line resolver, and - // loads the serialized data into a fast source line resolver. - void ConvertAllModules(const BasicSourceLineResolver *basic_resolver, - FastSourceLineResolver *fast_resolver); - - private: - // Convenient type names. - typedef BasicSourceLineResolver::Line Line; - typedef BasicSourceLineResolver::Function Function; - typedef BasicSourceLineResolver::PublicSymbol PublicSymbol; - - // Internal implementation for ConvertOneModule and ConvertAllModules methods. - bool SerializeModuleAndLoadIntoFastResolver( - const BasicSourceLineResolver::ModuleMap::const_iterator &iter, - FastSourceLineResolver *fast_resolver); - - // Number of Maps that Module class contains. - static const u_int32_t kNumberMaps_ = - FastSourceLineResolver::Module::kNumberMaps_; - - // Memory sizes required to serialize map components in Module. - u_int32_t map_sizes_[kNumberMaps_]; - - // Serializers for each individual map component in Module class. - StdMapSerializer files_serializer_; - RangeMapSerializer > functions_serializer_; - AddressMapSerializer > pubsym_serializer_; - ContainedRangeMapSerializer > wfi_serializer_; - RangeMapSerializer cfi_init_rules_serializer_; - StdMapSerializer cfi_delta_rules_serializer_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_MODULE_SERIALIZER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_interface.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_interface.h deleted file mode 100644 index 3871b4f5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_interface.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// NetworkInterface is an abstract interface for network connections. -// Its purpose is to make the network portion of certain classes -// easier to mock for testing. A concrete implementation of this -// interface can be found in udp_network.h. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_NETWORK_INTERFACE_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_NETWORK_INTERFACE_H_ -namespace google_breakpad { - -class NetworkInterface { - public: - // Prepare a network connection. - // If listen is true, prepare the socket to listen for incoming - // connections. - // Returns true for success, false for failure. - virtual bool Init(bool listen) = 0; - - // Send length bytes of data to the current address. - // Returns true for success, false for failure. - virtual bool Send(const char *data, size_t length) = 0; - - // Wait at most timeout milliseconds, returning when data is available or - // time has expired. - // Returns true if data is available, false if a timeout or error occurred. - virtual bool WaitToReceive(int timeout) = 0; - - // Read data into buffer. received will contain the number of bytes received. - // Returns true for success, false for failure. - virtual bool Receive(char *buffer, size_t buffer_size, ssize_t &received) = 0; -}; - -} // namespace google_breakpad -#endif // GOOGLE_BREAKPAD_PROCESSOR_NETWORK_INTERFACE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_protocol.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_protocol.h deleted file mode 100644 index b9744a8a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_protocol.h +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file contains constants used in the network source line server -// protocol. - -// Brief protocol description: -// -// Requests are sent via UDP. All requests begin with a sequence number -// that is prepended to the response. The sequence number is opaque -// to the server, it is provided for client tracking of requests. -// -// In this file, request and response fields will be described as: -// , which should be read as "foo, an N byte unsigned integer -// in network byte order". Strings will be described as . -// -// A client request looks like: -// -// Where is a sequence number as described above, -// is one of the commands listed below, and is arbitrary -// data, defined per-command. -// -// A server response looks like: -// -// Where is the same sequence number from the request, -// is one of the OK or ERROR values defined below, -// with OK signifying that the request was formatted properly and -// the response contains data, and ERROR signifying that the request -// was malformed in some way. is arbitrary data, defined -// per-command below. -// -// Strings are sent as a 2-byte integer encoding the length, followed -// by bytes. -// -// Valid Commands: -//================================================== -// -// example: <0x8>test.dll<0x8>test.pdb<0xA>0123456789 -// -// Query whether the module with this filename and debug information -// has been previously loaded. -// -// Server Response: -// -// Where is one of MODULE_LOADED or MODULE_NOT_LOADED -// -//================================================== -// -// example: <0x8>test.dll<0x8>test.pdb<0xA>0123456789 -// -// Request that the server find and load symbols for this module. -// -// Server Response: -// -// Where is one of: -// LOAD_NOT_FOUND -// - Symbols not found -// LOAD_INTERRUPT -// - Processing should be interrupted, symbols may be available later -// LOAD_FAIL -// - Found symbols, but failed to load them -// LOAD_OK -// - Found and loaded symbols successfully -// -//================================================== -// -// example: <0x8>test.dll<0x8>test.pdb<0x9>0123456789<0x0000000000010000><0x0000000000011A2B> -// -// Look up source line info for this module, loaded at this base address, -// for the code at this instruction address. -// -// Server Response: -// -// - As many fields as available are filled in. Fields that are not available -// will contain an empty string, or a zero for numeric values. - -//================================================== -// -// example: <0x8>test.dll<0x8>test.pdb<0x9>0123456789<0x0000000000010000><0x0000000000011A2B> -// -// Look up Windows stack frame info for this module, loaded at this base -// address, for the code at this instruction address. -// -// Server Response: -// -// The stack info is formatted as in the symbol file format, with -// "STACK " omitted, as documented at: -// http://code.google.com/p/google-breakpad/wiki/SymbolFiles -// If no Windows stack frame info is available, an empty string is returned. - -//================================================== -// -// example: <0x8>test.dll<0x8>test.pdb<0x9>0123456789<0x0000000000010000><0x0000000000011A2B> -// -// Look up CFI stack frame info for this module, loaded at this base -// address, for the code at this instruction address. -// -// Server Response: -// -// The stack info is formatted as in the symbol file format, with -// "STACK " omitted, as documented at: -// http://code.google.com/p/google-breakpad/wiki/SymbolFiles -// If no CFI stack frame info is available, an empty string is returned. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_PROTOCOL_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_PROTOCOL_H_ - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { -namespace source_line_protocol { - -// Response status codes -const u_int8_t OK = 1; -const u_int8_t ERROR = 0; - -// Commands -const u_int8_t HAS = 1; -const u_int8_t LOAD = 2; -const u_int8_t GET = 3; -const u_int8_t GETSTACKWIN = 4; -const u_int8_t GETSTACKCFI = 5; - -// HAS responses -const u_int8_t MODULE_NOT_LOADED = 0; -const u_int8_t MODULE_LOADED = 1; - -// LOAD responses -const u_int8_t LOAD_NOT_FOUND = 0; -const u_int8_t LOAD_INTERRUPT = 1; -const u_int8_t LOAD_FAIL = 2; -const u_int8_t LOAD_OK = 3; - -} // namespace source_line_protocol -} // namespace google_breakpad -#endif // GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_PROTOCOL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver.cc deleted file mode 100644 index 86c939f9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver.cc +++ /dev/null @@ -1,455 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "google_breakpad/processor/network_source_line_resolver.h" - -#include -#include -#include - -#include -#include - -#include "google_breakpad/processor/stack_frame.h" -#include "processor/binarystream.h" -#include "processor/cfi_frame_info.h" -#include "processor/network_interface.h" -#include "processor/network_source_line_protocol.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/udp_network.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -using std::string; -using std::vector; -using std::dec; -using std::hex; -// Style guide forbids "using namespace", so at least shorten it. -namespace P = source_line_protocol; - -NetworkSourceLineResolver::NetworkSourceLineResolver(const string &server, - unsigned short port, - int wait_milliseconds) - : wait_milliseconds_(wait_milliseconds), - initialized_(false), - sequence_(0), - net_(new UDPNetwork(server, port)) { - if (net_->Init(false)) - initialized_ = true; -} - -NetworkSourceLineResolver::NetworkSourceLineResolver(NetworkInterface *net, - int wait_milliseconds) - : wait_milliseconds_(wait_milliseconds), - initialized_(false), - sequence_(0), - net_(net) { - if (net_ && net->Init(false)) - initialized_ = true; -} - -NetworkSourceLineResolver::~NetworkSourceLineResolver() { - initialized_ = false; -} - -bool NetworkSourceLineResolver::LoadModule(const CodeModule *module, - const string &map_file) { - // Just lie here and say it was loaded. The server always loads - // symbols immediately when they're found, since clients always - // will want to load them after finding them anyway. Since this class - // acts as both the symbol supplier and source line resolver, - // it's just a little optimization. - return true; -} - -bool NetworkSourceLineResolver::LoadModuleUsingMapBuffer( - const CodeModule *module, - const string &map_buffer) { - // see above - return true; -} - -bool NetworkSourceLineResolver::LoadModuleUsingMemoryBuffer( - const CodeModule *module, - char *memory_buffer) { - // see above - return true; -} - -void NetworkSourceLineResolver::UnloadModule(const CodeModule *module) { - // no-op -} - -bool NetworkSourceLineResolver::HasModule(const CodeModule *module) { - if (!initialized_ || !module) - return false; - - // cache seen modules so the network round trip can be skipped - if (module_cache_.find(module->code_file()) != module_cache_.end()) - return true; - - // also cache modules for which symbols aren't found - if (no_symbols_cache_.find(module->debug_file() + module->debug_identifier()) - != no_symbols_cache_.end()) - return false; - - binarystream message; - message << P::HAS - << module->code_file() - << module->debug_file() - << module->debug_identifier(); - binarystream response; - bool got_response = SendMessageGetResponse(message, response); - u_int8_t response_data; - response >> response_data; - - bool found = false; - if (got_response && !response.eof() && response_data == P::MODULE_LOADED) { - module_cache_.insert(module->code_file()); - found = true; - } - return found; -} - -void NetworkSourceLineResolver::FillSourceLineInfo( - StackFrame *frame) { - if (!initialized_) - return; - - // if don't this module isn't loaded, can't fill source line info - if (!frame->module || - module_cache_.find(frame->module->code_file()) == module_cache_.end()) - return; - - // if this frame has already been seen, return the cached copy - if (FindCachedSourceLineInfo(frame)) { - BPLOG(INFO) << "Using cached source line info"; - return; - } - - binarystream message; - message << P::GET - << frame->module->code_file() - << frame->module->debug_file() - << frame->module->debug_identifier() - << frame->module->base_address() - << frame->instruction; - binarystream response; - bool got_response = SendMessageGetResponse(message, response); - if (!got_response) - return; - - string function_name, source_file; - u_int32_t source_line; - u_int64_t function_base, source_line_base; - response >> function_name >> function_base - >> source_file >> source_line >> source_line_base; - - if (response.eof()) { - BPLOG(ERROR) << "GET response malformed"; - return; - } else { - BPLOG(INFO) << "GET response: " << function_name << " " - << hex << function_base << " " << source_file << " " - << dec << source_line << " " << hex - << source_line_base; - } - - frame->function_name = function_name; - frame->function_base = function_base; - frame->source_file_name = source_file; - frame->source_line = source_line; - frame->source_line_base = source_line_base; - - CacheSourceLineInfo(frame); -} - -WindowsFrameInfo* -NetworkSourceLineResolver::FindWindowsFrameInfo(const StackFrame *frame) { - if (!initialized_) - return NULL; - - // if this module isn't loaded, can't get frame info - if (!frame->module || - module_cache_.find(frame->module->code_file()) == module_cache_.end()) - return NULL; - - // check the cache first - string stack_info; - - if (FindCachedFrameInfo(frame, kWindowsFrameInfo, &stack_info)) { - BPLOG(INFO) << "Using cached windows frame info"; - } else { - binarystream message; - message << P::GETSTACKWIN - << frame->module->code_file() - << frame->module->debug_file() - << frame->module->debug_identifier() - << frame->module->base_address() - << frame->instruction; - binarystream response; - if (SendMessageGetResponse(message, response)) { - response >> stack_info; - CacheFrameInfo(frame, kWindowsFrameInfo, stack_info); - } - } - - WindowsFrameInfo *info = NULL; - if (!stack_info.empty()) { - int type; - u_int64_t rva, code_size; - info = WindowsFrameInfo::ParseFromString(stack_info, - type, - rva, - code_size); - } - - return info; -} - -CFIFrameInfo* -NetworkSourceLineResolver::FindCFIFrameInfo(const StackFrame *frame) -{ - if (!initialized_) - return NULL; - - // if this module isn't loaded, can't get frame info - if (!frame->module || - module_cache_.find(frame->module->code_file()) == module_cache_.end()) - return NULL; - - string stack_info; - - if (FindCachedFrameInfo(frame, kCFIFrameInfo, &stack_info)) { - BPLOG(INFO) << "Using cached CFI frame info"; - } else { - binarystream message; - message << P::GETSTACKCFI - << frame->module->code_file() - << frame->module->debug_file() - << frame->module->debug_identifier() - << frame->module->base_address() - << frame->instruction; - binarystream response; - if (SendMessageGetResponse(message, response)) { - response >> stack_info; - CacheFrameInfo(frame, kCFIFrameInfo, stack_info); - } - } - - if (!stack_info.empty()) { - scoped_ptr info(new CFIFrameInfo()); - CFIFrameInfoParseHandler handler(info.get()); - CFIRuleParser parser(&handler); - if (parser.Parse(stack_info)) - return info.release(); - } - - return NULL; -} - -SymbolSupplier::SymbolResult -NetworkSourceLineResolver::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - BPLOG_IF(ERROR, !symbol_file) << "NetworkSourceLineResolver::GetSymbolFile " - "requires |symbol_file|"; - assert(symbol_file); - - if (!initialized_) - return NOT_FOUND; - - if (no_symbols_cache_.find(module->debug_file() + module->debug_identifier()) - != no_symbols_cache_.end()) - return NOT_FOUND; - - binarystream message; - message << P::LOAD - << module->code_file() - << module->debug_file() - << module->debug_identifier(); - binarystream response; - bool got_response = SendMessageGetResponse(message, response); - if (!got_response) { - // Didn't get a response, which is the same as not having symbols. - // Don't cache this, though, to force a retry if the client asks for - // symbols for the same file again. - return NOT_FOUND; - } - u_int8_t response_data; - response >> response_data; - - if (response.eof()) { - BPLOG(ERROR) << "Malformed LOAD response"; - return NOT_FOUND; - } - - if (response_data == P::LOAD_NOT_FOUND || response_data == P::LOAD_FAIL) { - // Received NOT or FAIL, symbols not present or failed to load them. - // Same problem to the client any way you look at it. - // Cache this module to avoid pointless retry. - no_symbols_cache_.insert(module->debug_file() + module->debug_identifier()); - return NOT_FOUND; - } else if (response_data == P::LOAD_INTERRUPT) { - return INTERRUPT; - } - - // otherwise, OK - module_cache_.insert(module->code_file()); - *symbol_file = ""; - return FOUND; -} - -SymbolSupplier::SymbolResult -NetworkSourceLineResolver::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - if(symbol_data) - symbol_data->clear(); - return GetSymbolFile(module, system_info, symbol_file); -} - -SymbolSupplier::SymbolResult -NetworkSourceLineResolver::GetCStringSymbolData( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) { - if (symbol_data) - delete *symbol_data; - - return GetSymbolFile(module, system_info, symbol_file); -} - -bool NetworkSourceLineResolver::SendMessageGetResponse( - const binarystream &message, - binarystream &response) { - binarystream sequence_stream; - u_int16_t sent_sequence = sequence_; - sequence_stream << sequence_; - ++sequence_; - string message_string = sequence_stream.str(); - message_string.append(message.str()); - BPLOG(INFO) << "Sending " << message_string.length() << " bytes"; - if (!net_->Send(message_string.c_str(), message_string.length())) - return false; - - bool done = false; - while (!done) { - if (!net_->WaitToReceive(wait_milliseconds_)) - return false; - - vector buffer(1024); - ssize_t received_bytes; - if (!net_->Receive(&buffer[0], buffer.size(), received_bytes)) - return false; - - BPLOG(INFO) << "received " << received_bytes << " bytes"; - buffer.resize(received_bytes); - - response.str(string(&buffer[0], buffer.size())); - response.rewind(); - u_int16_t read_sequence; - u_int8_t status; - response >> read_sequence >> status; - if (response.eof()) { - BPLOG(ERROR) << "malformed response, missing sequence number or status"; - return false; - } - if (read_sequence < sent_sequence) // old packet - continue; - - if (read_sequence != sent_sequence) { - // not expecting this packet, just error - BPLOG(ERROR) << "error, got sequence number " << read_sequence - << ", expected " << sent_sequence; - return false; - } - - // This is the expected packet, so even if it's an error this loop is done - done = true; - - if (status != P::OK) { - BPLOG(ERROR) << "received an ER response packet"; - return false; - } - // the caller will process the rest of response - } - return true; -} - -bool NetworkSourceLineResolver::FindCachedSourceLineInfo(StackFrame *frame) - const -{ - SourceCache::const_iterator iter = - source_line_info_cache_.find(frame->instruction); - if (iter == source_line_info_cache_.end()) - return false; - - const StackFrame &f = iter->second; - frame->function_name = f.function_name; - frame->function_base = f.function_base; - frame->source_file_name = f.source_file_name; - frame->source_line = f.source_line; - frame->source_line_base = f.source_line_base; - return true; -} - -bool NetworkSourceLineResolver::FindCachedFrameInfo( - const StackFrame *frame, - FrameInfoType type, - string *info) const -{ - FrameInfoCache::const_iterator iter = - frame_info_cache_[type].find(frame->instruction); - if (iter == frame_info_cache_[type].end()) - return false; - - *info = iter->second; - return true; -} - -void NetworkSourceLineResolver::CacheSourceLineInfo(const StackFrame *frame) { - StackFrame f(*frame); - // can't hang onto this pointer, the caller owns it - f.module = NULL; - source_line_info_cache_[frame->instruction] = f; -} - -void NetworkSourceLineResolver::CacheFrameInfo( - const StackFrame *frame, - FrameInfoType type, - const string &info) { - frame_info_cache_[type][frame->instruction] = info; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_server_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_server_unittest.cc deleted file mode 100644 index 63558b40..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_server_unittest.cc +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Full system test for NetworkSourceLineResolver / NetworkSourceLineServer. -// Forks a background process to run a NetworkSourceLineServer, then -// instantiates a MinidumpProcessor with a NetworkSourceLineResolver to -// connect to the background server and process a minidump. - -#include - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/network_source_line_resolver.h" -#include "processor/simple_symbol_supplier.h" -#include "processor/network_source_line_server.h" -#include "processor/simple_symbol_supplier.h" -#include "processor/udp_network.h" - -namespace { - -using std::string; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::MinidumpProcessor; -using google_breakpad::NetworkSourceLineResolver; -using google_breakpad::NetworkSourceLineServer; -using google_breakpad::ProcessState; -using google_breakpad::SimpleSymbolSupplier; -using google_breakpad::UDPNetwork; - -static const char *kSystemInfoOS = "Windows NT"; -static const char *kSystemInfoOSShort = "windows"; -static const char *kSystemInfoOSVersion = "5.1.2600 Service Pack 2"; -static const char *kSystemInfoCPU = "x86"; -static const char *kSystemInfoCPUInfo = - "GenuineIntel family 6 model 13 stepping 8"; - -bool exitProcess = false; - -void signal_handler(int signal) { - if (signal == SIGINT) - exitProcess = true; -} - -void RunSourceLineServer(int fd) { - // Set a signal handler so the parent process - // can signal this process to end. - signal(SIGINT, signal_handler); - - BasicSourceLineResolver resolver; - SimpleSymbolSupplier supplier(string(getenv("srcdir") ? - getenv("srcdir") : ".") + - "/src/processor/testdata/symbols/"); - UDPNetwork net("localhost", - 0, // pick a free port - true); // IPv4 only - - NetworkSourceLineServer server(&supplier, &resolver, &net, - 0); // no source line limit - unsigned short port = -1; - bool initialized = server.Initialize(); - if (initialized) - port = net.port(); - - // send port number back to parent - ssize_t written = write(fd, &port, sizeof(port)); - close(fd); - - if (!initialized || written != sizeof(port)) - return; - - while (!exitProcess) { - server.RunOnce(100); - } -} - -TEST(NetworkSourceLineResolverServer, SystemTest) { - int fds[2]; - ASSERT_EQ(0, pipe(fds)); - // Fork a background process to run the server. - pid_t pid = fork(); - if (pid == 0) { - close(fds[0]); - RunSourceLineServer(fds[1]); - exit(0); - } - ASSERT_NE(-1, pid); - // Wait for the background process to return info about the port. - close(fds[1]); - unsigned short port; - ssize_t nbytes = read(fds[0], &port, sizeof(port)); - ASSERT_EQ(sizeof(port), nbytes); - ASSERT_NE(-1, port); - - NetworkSourceLineResolver resolver("localhost", port, - 5000); // wait at most 5 seconds for reply - MinidumpProcessor processor(&resolver, &resolver); - // this is all copied from minidump_processor_unittest.cc - string minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/minidump2.dmp"; - - ProcessState state; - ASSERT_EQ(processor.Process(minidump_file, &state), - google_breakpad::PROCESS_OK); - ASSERT_EQ(state.system_info()->os, kSystemInfoOS); - ASSERT_EQ(state.system_info()->os_short, kSystemInfoOSShort); - ASSERT_EQ(state.system_info()->os_version, kSystemInfoOSVersion); - ASSERT_EQ(state.system_info()->cpu, kSystemInfoCPU); - ASSERT_EQ(state.system_info()->cpu_info, kSystemInfoCPUInfo); - ASSERT_TRUE(state.crashed()); - ASSERT_EQ(state.crash_reason(), "EXCEPTION_ACCESS_VIOLATION_WRITE"); - ASSERT_EQ(state.crash_address(), 0x45U); - ASSERT_EQ(state.threads()->size(), size_t(1)); - ASSERT_EQ(state.requesting_thread(), 0); - - CallStack *stack = state.threads()->at(0); - ASSERT_TRUE(stack); - ASSERT_EQ(stack->frames()->size(), 4U); - - ASSERT_TRUE(stack->frames()->at(0)->module); - ASSERT_EQ(stack->frames()->at(0)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(0)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(0)->function_name, - "`anonymous namespace'::CrashFunction"); - ASSERT_EQ(stack->frames()->at(0)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(0)->source_line, 58); - - ASSERT_TRUE(stack->frames()->at(1)->module); - ASSERT_EQ(stack->frames()->at(1)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(1)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(1)->function_name, "main"); - ASSERT_EQ(stack->frames()->at(1)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(1)->source_line, 65); - - // This comes from the CRT - ASSERT_TRUE(stack->frames()->at(2)->module); - ASSERT_EQ(stack->frames()->at(2)->module->base_address(), 0x400000U); - ASSERT_EQ(stack->frames()->at(2)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(2)->function_name, "__tmainCRTStartup"); - ASSERT_EQ(stack->frames()->at(2)->source_file_name, - "f:\\sp\\vctools\\crt_bld\\self_x86\\crt\\src\\crt0.c"); - ASSERT_EQ(stack->frames()->at(2)->source_line, 327); - - // OS frame, kernel32.dll - ASSERT_TRUE(stack->frames()->at(3)->module); - ASSERT_EQ(stack->frames()->at(3)->module->base_address(), 0x7c800000U); - ASSERT_EQ(stack->frames()->at(3)->module->code_file(), - "C:\\WINDOWS\\system32\\kernel32.dll"); - ASSERT_EQ(stack->frames()->at(3)->function_name, "BaseProcessStart"); - ASSERT_TRUE(stack->frames()->at(3)->source_file_name.empty()); - ASSERT_EQ(stack->frames()->at(3)->source_line, 0); - - ASSERT_EQ(state.modules()->module_count(), 13U); - ASSERT_TRUE(state.modules()->GetMainModule()); - ASSERT_EQ(state.modules()->GetMainModule()->code_file(), "c:\\test_app.exe"); - ASSERT_FALSE(state.modules()->GetModuleForAddress(0)); - ASSERT_EQ(state.modules()->GetMainModule(), - state.modules()->GetModuleForAddress(0x400000)); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x7c801234)->debug_file(), - "kernel32.pdb"); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x77d43210)->version(), - "5.1.2600.2622"); - - // Kill background process - kill(pid, SIGINT); - ASSERT_EQ(pid, waitpid(pid, NULL, 0)); -} - -} - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_unittest.cc deleted file mode 100644 index bf0aae78..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_resolver_unittest.cc +++ /dev/null @@ -1,535 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Unit tests for NetworkSourceLineResolver. - -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/network_source_line_resolver.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/basic_code_module.h" -#include "processor/binarystream.h" -#include "processor/cfi_frame_info.h" -#include "processor/network_interface.h" -#include "processor/network_source_line_protocol.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { -class MockNetwork : public NetworkInterface { - public: - MockNetwork() {} - - MOCK_METHOD1(Init, bool(bool listen)); - MOCK_METHOD2(Send, bool(const char *data, size_t length)); - MOCK_METHOD1(WaitToReceive, bool(int timeout)); - MOCK_METHOD3(Receive, bool(char *buffer, size_t buffer_size, - ssize_t &received)); -}; -} - -namespace { -using std::string; -using google_breakpad::binarystream; -using google_breakpad::BasicCodeModule; -using google_breakpad::CFIFrameInfo; -using google_breakpad::MockNetwork; -using google_breakpad::NetworkSourceLineResolver; -using google_breakpad::StackFrame; -using google_breakpad::SymbolSupplier; -using google_breakpad::WindowsFrameInfo; -using ::testing::_; -using ::testing::Invoke; -using ::testing::Return; -using namespace google_breakpad::source_line_protocol; - -class TestNetworkSourceLineResolver : public ::testing::Test { -public: - TestNetworkSourceLineResolver() : resolver(NULL) {} - - void SetUp() { - EXPECT_CALL(net, Init(false)).WillOnce(Return(true)); - resolver = new NetworkSourceLineResolver(&net, 0); - } - - NetworkSourceLineResolver *resolver; - MockNetwork net; -}; - -bool GeneratePositiveHasResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << u_int16_t(0) << OK << MODULE_LOADED; - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - return true; -} - -bool GenerateNegativeHasResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << u_int16_t(1) << OK << MODULE_NOT_LOADED; - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - return true; -} - -TEST_F(TestNetworkSourceLineResolver, TestHasMessages) { - EXPECT_CALL(net, Send(_,_)) - .WillOnce(Return(true)) - .WillOnce(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .WillOnce(Return(true)) - .WillOnce(Return(true)); - EXPECT_CALL(net, Receive(_,_,_)) - .WillOnce(Invoke(GeneratePositiveHasResponse)) - .WillOnce(Invoke(GenerateNegativeHasResponse)); - ASSERT_NE(resolver, (NetworkSourceLineResolver*)NULL); - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - EXPECT_TRUE(resolver->HasModule(&module)); - BasicCodeModule module2(0x0, 0x0, "test2.dll", "test2.pdb", "FFFF", "", ""); - EXPECT_FALSE(resolver->HasModule(&module2)); - // calling again should hit the cache, and not the network - EXPECT_TRUE(resolver->HasModule(&module)); -} - -bool GenerateErrorResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << u_int16_t(0) << ERROR; - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - return true; -} - -TEST_F(TestNetworkSourceLineResolver, TestHasErrorResponse) { - EXPECT_CALL(net, Send(_,_)) - .WillOnce(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .WillOnce(Return(true)); - EXPECT_CALL(net, Receive(_,_,_)) - .WillOnce(Invoke(GenerateErrorResponse)); - ASSERT_NE(resolver, (NetworkSourceLineResolver*)NULL); - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - // error packet should function as a not found - EXPECT_FALSE(resolver->HasModule(&module)); -} - -// GenerateLoadResponse will generate (LOAD_NOT_FOUND, LOAD_INTERRUPT, -// LOAD_FAIL, LOAD_OK) in order. -class LoadHelper { - public: - LoadHelper() : response(LOAD_NOT_FOUND), sequence(0) {} - bool GenerateLoadResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << sequence << OK << response; - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - ++sequence; - ++response; - return true; - } - u_int8_t response; - u_int16_t sequence; -}; - -TEST_F(TestNetworkSourceLineResolver, TestLoadMessages) { - EXPECT_CALL(net, Send(_,_)) - .Times(4) - .WillRepeatedly(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .Times(4) - .WillRepeatedly(Return(true)); - LoadHelper helper; - EXPECT_CALL(net, Receive(_,_,_)) - .Times(4) - .WillRepeatedly(Invoke(&helper, &LoadHelper::GenerateLoadResponse)); - ASSERT_NE(resolver, (NetworkSourceLineResolver*)NULL); - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - string s; - EXPECT_EQ(SymbolSupplier::NOT_FOUND, - resolver->GetSymbolFile(&module, NULL, &s)); - BasicCodeModule module2(0x0, 0x0, "test2.dll", "test2.pdb", "FFFF", "", ""); - EXPECT_EQ(SymbolSupplier::INTERRUPT, - resolver->GetSymbolFile(&module2, NULL, &s)); - BasicCodeModule module3(0x0, 0x0, "test3.dll", "test3.pdb", "0000", "", ""); - // a FAIL result from the network should come back as NOT_FOUND - EXPECT_EQ(SymbolSupplier::NOT_FOUND, - resolver->GetSymbolFile(&module3, NULL, &s)); - BasicCodeModule module4(0x0, 0x0, "test4.dll", "test4.pdb", "1010", "", ""); - EXPECT_EQ(SymbolSupplier::FOUND, - resolver->GetSymbolFile(&module4, NULL, &s)); - // calling this should hit the cache, and not the network - EXPECT_TRUE(resolver->HasModule(&module4)); -} - -TEST_F(TestNetworkSourceLineResolver, TestLoadErrorResponse) { - EXPECT_CALL(net, Send(_,_)) - .WillOnce(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .WillOnce(Return(true)); - EXPECT_CALL(net, Receive(_,_,_)) - .WillOnce(Invoke(GenerateErrorResponse)); - ASSERT_NE(resolver, (NetworkSourceLineResolver*)NULL); - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - string s; - // error packet should function as NOT_FOUND response - EXPECT_EQ(SymbolSupplier::NOT_FOUND, - resolver->GetSymbolFile(&module, NULL, &s)); -} - -class GetHelper { - public: - GetHelper() : sequence(1) {} - bool GenerateGetResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << sequence << OK; - switch(sequence) { - case 1: - // return full info - stream << string("test()") << u_int64_t(0x1000) << string("test.c") - << u_int32_t(1) << u_int64_t(0x1010); - break; - case 2: - // return full info - stream << string("test2()") << u_int64_t(0x2000) << string("test2.c") - << u_int32_t(2) << u_int64_t(0x2020); - break; - case 3: - // return just function name - stream << string("test3()") << u_int64_t(0x4000) << string("") - << u_int32_t(0) << u_int64_t(0); - break; - } - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - ++sequence; - return true; - } - u_int16_t sequence; -}; - -TEST_F(TestNetworkSourceLineResolver, TestGetMessages) { - EXPECT_CALL(net, Send(_,_)) - .Times(4) - .WillRepeatedly(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .Times(4) - .WillRepeatedly(Return(true)); - GetHelper helper; - EXPECT_CALL(net, Receive(_,_,_)) - .Times(4) - .WillOnce(Invoke(GeneratePositiveHasResponse)) - .WillRepeatedly(Invoke(&helper, &GetHelper::GenerateGetResponse)); - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - // The resolver has to think the module is loaded before it will respond - // to GET requests for that module. - EXPECT_TRUE(resolver->HasModule(&module)); - StackFrame frame; - frame.module = &module; - frame.instruction = 0x1010; - resolver->FillSourceLineInfo(&frame); - EXPECT_EQ("test()", frame.function_name); - EXPECT_EQ(0x1000, frame.function_base); - EXPECT_EQ("test.c", frame.source_file_name); - EXPECT_EQ(1, frame.source_line); - EXPECT_EQ(0x1010, frame.source_line_base); - - StackFrame frame2; - frame2.module = &module; - frame2.instruction = 0x2020; - resolver->FillSourceLineInfo(&frame2); - EXPECT_EQ("test2()", frame2.function_name); - EXPECT_EQ(0x2000, frame2.function_base); - EXPECT_EQ("test2.c", frame2.source_file_name); - EXPECT_EQ(2, frame2.source_line); - EXPECT_EQ(0x2020, frame2.source_line_base); - - StackFrame frame3; - frame3.module = &module; - frame3.instruction = 0x4040; - resolver->FillSourceLineInfo(&frame3); - EXPECT_EQ("test3()", frame3.function_name); - EXPECT_EQ(0x4000, frame3.function_base); - EXPECT_EQ("", frame3.source_file_name); - EXPECT_EQ(0, frame3.source_line); - EXPECT_EQ(0, frame3.source_line_base); - - // this should come from the cache and not hit the network - StackFrame frame4; - frame4.module = &module; - frame4.instruction = 0x1010; - resolver->FillSourceLineInfo(&frame4); - EXPECT_EQ("test()", frame4.function_name); - EXPECT_EQ(0x1000, frame4.function_base); - EXPECT_EQ("test.c", frame4.source_file_name); - EXPECT_EQ(1, frame4.source_line); - EXPECT_EQ(0x1010, frame4.source_line_base); - - // this should also be cached - StackFrame frame5; - frame5.module = &module; - frame5.instruction = 0x4040; - resolver->FillSourceLineInfo(&frame5); - EXPECT_EQ("test3()", frame5.function_name); - EXPECT_EQ(0x4000, frame5.function_base); - EXPECT_EQ("", frame5.source_file_name); - EXPECT_EQ(0, frame5.source_line); - EXPECT_EQ(0, frame5.source_line_base); -} - -class GetStackWinHelper { - public: - GetStackWinHelper() : sequence(1) {} - bool GenerateGetStackWinResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << sequence << OK; - switch(sequence) { - case 1: - // return full info including program string - stream << string("0 0 0 1 2 3 a ff f00 1 x y ="); - break; - case 2: - // return full info, no program string - stream << string("0 0 0 1 2 3 a ff f00 0 1"); - break; - case 3: - // return empty string - stream << string(""); - break; - } - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - ++sequence; - return true; - } - u_int16_t sequence; -}; - -TEST_F(TestNetworkSourceLineResolver, TestGetStackWinMessages) { - EXPECT_CALL(net, Send(_,_)) - .Times(4) - .WillRepeatedly(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .Times(4) - .WillRepeatedly(Return(true)); - GetStackWinHelper helper; - EXPECT_CALL(net, Receive(_,_,_)) - .Times(4) - .WillOnce(Invoke(GeneratePositiveHasResponse)) - .WillRepeatedly(Invoke(&helper, - &GetStackWinHelper::GenerateGetStackWinResponse)); - - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - // The resolver has to think the module is loaded before it will respond - // to GETSTACKWIN requests for that module. - EXPECT_TRUE(resolver->HasModule(&module)); - StackFrame frame; - frame.module = &module; - frame.instruction = 0x1010; - WindowsFrameInfo *info = resolver->FindWindowsFrameInfo(&frame); - ASSERT_NE((WindowsFrameInfo*)NULL, info); - EXPECT_EQ(0x1, info->prolog_size); - EXPECT_EQ(0x2, info->epilog_size); - EXPECT_EQ(0x3, info->parameter_size); - EXPECT_EQ(0xa, info->saved_register_size); - EXPECT_EQ(0xff, info->local_size); - EXPECT_EQ(0xf00, info->max_stack_size); - EXPECT_EQ("x y =", info->program_string); - delete info; - - StackFrame frame2; - frame2.module = &module; - frame2.instruction = 0x2020; - info = resolver->FindWindowsFrameInfo(&frame2); - ASSERT_NE((WindowsFrameInfo*)NULL, info); - EXPECT_EQ(0x1, info->prolog_size); - EXPECT_EQ(0x2, info->epilog_size); - EXPECT_EQ(0x3, info->parameter_size); - EXPECT_EQ(0xa, info->saved_register_size); - EXPECT_EQ(0xff, info->local_size); - EXPECT_EQ(0xf00, info->max_stack_size); - EXPECT_EQ("", info->program_string); - EXPECT_EQ(true, info->allocates_base_pointer); - delete info; - - StackFrame frame3; - frame3.module = &module; - frame3.instruction = 0x4040; - info = resolver->FindWindowsFrameInfo(&frame3); - EXPECT_EQ((WindowsFrameInfo*)NULL, info); - - // this should come from the cache and not hit the network - StackFrame frame4; - frame4.module = &module; - frame4.instruction = 0x1010; - info = resolver->FindWindowsFrameInfo(&frame4); - ASSERT_NE((WindowsFrameInfo*)NULL, info); - EXPECT_EQ(0x1, info->prolog_size); - EXPECT_EQ(0x2, info->epilog_size); - EXPECT_EQ(0x3, info->parameter_size); - EXPECT_EQ(0xa, info->saved_register_size); - EXPECT_EQ(0xff, info->local_size); - EXPECT_EQ(0xf00, info->max_stack_size); - EXPECT_EQ("x y =", info->program_string); - delete info; - - // this should also be cached - StackFrame frame5; - frame5.module = &module; - frame5.instruction = 0x4040; - info = resolver->FindWindowsFrameInfo(&frame5); - EXPECT_EQ((WindowsFrameInfo*)NULL, info); -} - -class GetStackCFIHelper { - public: - GetStackCFIHelper() : sequence(1) {} - bool GenerateGetStackCFIResponse(char *buffer, size_t buffer_size, - ssize_t &received) { - binarystream stream; - stream << sequence << OK; - switch(sequence) { - case 1: - // return .cfa, .ra, registers - stream << string(".cfa: 1234 .ra: .cfa 5 + r0: abc xyz r2: 10 10"); - break; - case 2: - // return just .cfa - stream << string(".cfa: xyz"); - break; - case 3: - // return empty string - stream << string(""); - break; - } - string s = stream.str(); - received = s.length(); - memcpy(buffer, s.c_str(), s.length()); - ++sequence; - return true; - } - u_int16_t sequence; -}; - -TEST_F(TestNetworkSourceLineResolver, TestGetStackCFIMessages) { - EXPECT_CALL(net, Send(_,_)) - .Times(4) - .WillRepeatedly(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)) - .Times(4) - .WillRepeatedly(Return(true)); - GetStackCFIHelper helper; - EXPECT_CALL(net, Receive(_,_,_)) - .Times(4) - .WillOnce(Invoke(GeneratePositiveHasResponse)) - .WillRepeatedly(Invoke(&helper, - &GetStackCFIHelper::GenerateGetStackCFIResponse)); - - BasicCodeModule module(0x0, 0x0, "test.dll", "test.pdb", "ABCD", "", ""); - // The resolver has to think the module is loaded before it will respond - // to GETSTACKCFI requests for that module. - EXPECT_TRUE(resolver->HasModule(&module)); - StackFrame frame; - frame.module = &module; - frame.instruction = 0x1010; - CFIFrameInfo *info = resolver->FindCFIFrameInfo(&frame); - ASSERT_NE((CFIFrameInfo*)NULL, info); - // Ostensibly we would check the internal data structure, but - // we'd have to either mock out some other classes or get internal access, - // so this is easier. - EXPECT_EQ(".cfa: 1234 .ra: .cfa 5 + r0: abc xyz r2: 10 10", - info->Serialize()); - delete info; - - StackFrame frame2; - frame2.module = &module; - frame2.instruction = 0x2020; - info = resolver->FindCFIFrameInfo(&frame2); - ASSERT_NE((CFIFrameInfo*)NULL, info); - EXPECT_EQ(".cfa: xyz", info->Serialize()); - delete info; - - StackFrame frame3; - frame3.module = &module; - frame3.instruction = 0x4040; - info = resolver->FindCFIFrameInfo(&frame3); - EXPECT_EQ((CFIFrameInfo*)NULL, info); - - // this should come from the cache and not hit the network - StackFrame frame4; - frame4.module = &module; - frame4.instruction = 0x1010; - info = resolver->FindCFIFrameInfo(&frame4); - ASSERT_NE((CFIFrameInfo*)NULL, info); - EXPECT_EQ(".cfa: 1234 .ra: .cfa 5 + r0: abc xyz r2: 10 10", - info->Serialize()); - delete info; - - // this should also be cached - StackFrame frame5; - frame5.module = &module; - frame5.instruction = 0x4040; - info = resolver->FindCFIFrameInfo(&frame5); - EXPECT_EQ((CFIFrameInfo*)NULL, info); -} - -TEST_F(TestNetworkSourceLineResolver, TestBogusData) { - EXPECT_FALSE(resolver->HasModule(NULL)); - - StackFrame frame; - frame.module = NULL; - frame.instruction = 0x1000; - resolver->FillSourceLineInfo(&frame); - EXPECT_EQ("", frame.function_name); - EXPECT_EQ(0x0, frame.function_base); - EXPECT_EQ("", frame.source_file_name); - EXPECT_EQ(0, frame.source_line); - EXPECT_EQ(0x0, frame.source_line_base); - - EXPECT_EQ((WindowsFrameInfo*)NULL, resolver->FindWindowsFrameInfo(&frame)); -} - -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.cc deleted file mode 100644 index 1a6ea31b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.cc +++ /dev/null @@ -1,435 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/stack_frame.h" -#include "processor/basic_code_module.h" -#include "processor/binarystream.h" -#include "processor/cfi_frame_info.h" -#include "processor/logging.h" -#include "processor/network_source_line_protocol.h" -#include "processor/network_source_line_server.h" -#include "processor/tokenize.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -using std::dec; -using std::find; -using std::hex; -// Style guide forbids "using namespace", so at least shorten it. -namespace P = source_line_protocol; - -bool NetworkSourceLineServer::Initialize() { - if (net_->Init(true)) - initialized_ = true; - return initialized_; -} - -bool NetworkSourceLineServer::RunForever() { - if (!initialized_ && !Initialize()) - return false; - - BPLOG(INFO) << "Running forever..."; - while (true) { - RunOnce(5000); - } - // not reached - return true; -} - -bool NetworkSourceLineServer::RunOnce(int wait_milliseconds) { - if (!initialized_ && !Initialize()) - return false; - - if (!net_->WaitToReceive(wait_milliseconds)) - return false; - //TODO(ted): loop, processing packets until wait_milliseconds - // is actually exhausted? - - vector buffer(1024); - ssize_t received_bytes; - if (!net_->Receive(&buffer[0], buffer.size(), received_bytes)) - return false; - buffer.resize(received_bytes); - - binarystream request(&buffer[0], buffer.size()); - binarystream response; - if (!HandleRequest(request, response)) - return false; - - string response_string = response.str(); - if (!net_->Send(response_string.c_str(), response_string.length())) - return false; - return true; -} - -bool NetworkSourceLineServer::HandleRequest(binarystream &request, - binarystream &response) { - u_int16_t sequence_number; - u_int8_t command; - request >> sequence_number >> command; - if (request.eof()) { - BPLOG(ERROR) << "Malformed request, missing sequence number or command"; - return false; - } - - response.rewind(); - response << sequence_number; - switch(command) { - case P::HAS: - HandleHas(request, response); - break; - case P::LOAD: - HandleLoad(request, response); - break; - case P::GET: - HandleGet(request, response); - break; - case P::GETSTACKWIN: - HandleGetStackWin(request, response); - break; - case P::GETSTACKCFI: - HandleGetStackCFI(request, response); - break; - default: - BPLOG(ERROR) << "Unknown command " << int(command); - response << P::ERROR; - break; - } - return true; -} - -void NetworkSourceLineServer::HandleHas(binarystream &message, - binarystream &response) { - string module_name, debug_file, debug_id; - message >> module_name >> debug_file >> debug_id; - if (message.eof()) { - BPLOG(ERROR) << "HAS message malformed"; - response << P::ERROR; - return; - } - BPLOG(INFO) << "Received message HAS " << module_name - << " " << debug_file - << " " << debug_id; - // Need to lie about the module name here, since BasicSourceLineResolver - // uses only the module name for unique modules, but we want to allow - // multiple versions of the same named module in here. - BasicCodeModule module((u_int64_t)0, (u_int64_t)0, - module_name + "|" + debug_file + "|" + debug_id, "", - debug_file, debug_id, ""); - u_int8_t data; - if (resolver_) { - data = resolver_->HasModule(&module) - ? P::MODULE_LOADED : P::MODULE_NOT_LOADED; - } else { - data = P::MODULE_NOT_LOADED; - } - response << P::OK << data; -} - -void NetworkSourceLineServer::HandleLoad(binarystream &message, - binarystream &response) { - string module_name, debug_file, debug_id; - message >> module_name >> debug_file >> debug_id; - if (message.eof()) { - BPLOG(ERROR) << "LOAD message malformed"; - response << P::ERROR; - return; - } - BPLOG(INFO) << "Received message LOAD " << module_name - << " " << debug_file - << " " << debug_id; - - u_int8_t reply; - // stub out the bare minimum here - BasicCodeModule module((u_int64_t)0, (u_int64_t)0, - module_name + "|" + debug_file + "|" + debug_id, "", - debug_file, debug_id, ""); - if (resolver_->HasModule(&module)) { - // just short-circuit the rest of this, since it's already loaded - BPLOG(INFO) << "Got LOAD for already loaded " << module_name; - UsedModule(module); - reply = P::LOAD_OK; - } else { - BPLOG(INFO) << "Looking up symbols for (" << module_name << ", " - << debug_file << ", " << debug_id << ")"; - string symbol_data, symbol_file; - SymbolSupplier::SymbolResult symbol_result; - if (supplier_) { - symbol_result = supplier_->GetSymbolFile(&module, NULL, - &symbol_file, &symbol_data); - } else { - symbol_result = SymbolSupplier::NOT_FOUND; - } - - switch (symbol_result) { - case SymbolSupplier::FOUND: { - BPLOG(INFO) << "Found symbols for " << module_name; - reply = P::LOAD_OK; - // also go ahead and load the symbols while we're here, - // since the client is just going to ask us to do this right away - // and we already have |symbol_data| here. - int numlines = CountNewlines(symbol_data); - if (!resolver_->LoadModuleUsingMapBuffer(&module, - symbol_data)) { - BPLOG(INFO) << "Failed to load symbols for " << module_name; - reply = P::LOAD_FAIL; - } else { - // save some info about this module - symbol_lines_ += numlines; - UsedModule(module); - module_symbol_lines_[module.code_file()] = numlines; - - BPLOG(INFO) << "Loaded symbols for " << module_name - << " (" << dec << numlines << " lines, " - << symbol_lines_ << " total)"; - - if (max_symbol_lines_ != 0 && symbol_lines_ > max_symbol_lines_) { - // try unloading some modules to reclaim memory - // (but not the one that was just loaded) - BPLOG(INFO) << "Exceeded limit of " << dec << max_symbol_lines_ - << " symbol lines loaded, trying to unload modules"; - TryUnloadModules(module); - } - } - } - break; - case SymbolSupplier::NOT_FOUND: - BPLOG(INFO) << "Symbols not found for " << module_name; - reply = P::LOAD_NOT_FOUND; - break; - case SymbolSupplier::INTERRUPT: - BPLOG(INFO) << "Symbol provider returned interrupt for " << module_name; - reply = P::LOAD_INTERRUPT; - break; - } - } - response << P::OK << reply; -} - -void NetworkSourceLineServer::HandleGet(binarystream &message, - binarystream &response) { - string module_name, debug_file, debug_id; - u_int64_t module_base, instruction; - message >> module_name >> debug_file >> debug_id - >> module_base >> instruction; - if (message.eof()) { - BPLOG(ERROR) << "GET message malformed"; - response << P::ERROR; - return; - } - - BPLOG(INFO) << "Received message GET " << module_name << " " - << debug_file << " " << debug_id << " " - << hex << module_base << " " << instruction; - - StackFrame frame; - if (resolver_) { - BasicCodeModule module(module_base, (u_int64_t)0, - module_name + "|" + debug_file + "|" + debug_id, "", - debug_file, debug_id, ""); - frame.module = &module; - frame.instruction = instruction; - resolver_->FillSourceLineInfo(&frame); - UsedModule(module); - } - - response << P::OK << frame.function_name << frame.function_base - << frame.source_file_name << u_int32_t(frame.source_line) - << frame.source_line_base; - BPLOG(INFO) << "Sending GET response: " << frame.function_name << " " - << hex << frame.function_base << " " - << frame.source_file_name << " " - << dec << frame.source_line << " " - << hex << frame.source_line_base; -} - -void NetworkSourceLineServer::HandleGetStackWin(binarystream &message, - binarystream &response) { - string module_name, debug_file, debug_id; - u_int64_t module_base, instruction; - message >> module_name >> debug_file >> debug_id - >> module_base >> instruction; - if (message.eof()) { - BPLOG(ERROR) << "GETSTACKWIN message malformed"; - response << P::ERROR; - return; - } - - BPLOG(INFO) << "Received message GETSTACKWIN " << module_name << " " - << debug_file << " " << debug_id << " " - << hex << module_base << " " << instruction; - - - WindowsFrameInfo *frame_info = NULL; - if (resolver_) { - StackFrame frame; - BasicCodeModule module(module_base, (u_int64_t)0, - module_name + "|" + debug_file + "|" + debug_id, "", - debug_file, debug_id, ""); - frame.module = &module; - frame.instruction = instruction; - frame_info = resolver_->FindWindowsFrameInfo(&frame); - UsedModule(module); - } - - response << P::OK << FormatWindowsFrameInfo(frame_info); - BPLOG(INFO) << "Sending GETSTACKWIN response: " - << FormatWindowsFrameInfo(frame_info); - delete frame_info; -} - -string NetworkSourceLineServer::FormatWindowsFrameInfo( - WindowsFrameInfo *frame_info) { - if (frame_info == NULL) - return ""; - - std::ostringstream stream; - // Put "0" as the type, rva and code size because the client doesn't - // actually care what these values are, but it's easier to keep the - // format consistent with the symbol files so the parsing code can be - // shared. - stream << "0 0 0 " << hex - << frame_info->prolog_size << " " - << frame_info->epilog_size << " " - << frame_info->parameter_size << " " - << frame_info->saved_register_size << " " - << frame_info->local_size << " " - << frame_info->max_stack_size << " "; - if (!frame_info->program_string.empty()) { - stream << 1 << " " << frame_info->program_string; - } else { - stream << 0 << " " << frame_info->allocates_base_pointer; - } - return stream.str(); -} - -void NetworkSourceLineServer::HandleGetStackCFI(binarystream &message, - binarystream &response) { - string module_name, debug_file, debug_id; - u_int64_t module_base, instruction; - message >> module_name >> debug_file >> debug_id - >> module_base >> instruction; - if (message.eof()) { - BPLOG(ERROR) << "GETSTACKCFI message malformed"; - response << P::ERROR; - return; - } - - BPLOG(INFO) << "Received message GETSTACKCFI " << module_name << " " - << debug_file << " " << debug_id << " " - << hex << module_base << " " << instruction; - - - CFIFrameInfo *frame_info = NULL; - if (resolver_) { - StackFrame frame; - BasicCodeModule module(module_base, (u_int64_t)0, - module_name + "|" + debug_file + "|" + debug_id, "", - debug_file, debug_id, ""); - frame.module = &module; - frame.instruction = instruction; - frame_info = resolver_->FindCFIFrameInfo(&frame); - UsedModule(module); - } - - string frame_info_string; - if (frame_info != NULL) - frame_info_string = frame_info->Serialize(); - response << P::OK << frame_info_string; - BPLOG(INFO) << "Sending GETSTACKCFI response: " - << frame_info_string; - delete frame_info; -} - -int NetworkSourceLineServer::CountNewlines(const string &str) { - int count = 0; - string::const_iterator iter = str.begin(); - while (iter != str.end()) { - if (*iter == '\n') - count++; - iter++; - } - return count; -} - -void NetworkSourceLineServer::UsedModule(const CodeModule &module) { - list::iterator iter = find(modules_used_.begin(), - modules_used_.end(), - module.code_file()); - if (iter == modules_used_.end()) { - modules_used_.push_front(module.code_file()); - } else { - modules_used_.splice(modules_used_.begin(), - modules_used_, - iter); - } -} - -void NetworkSourceLineServer::TryUnloadModules( - const CodeModule &just_loaded_module) { - if (!resolver_) - return; - - while (symbol_lines_ > max_symbol_lines_) { - // never unload just_loaded_module - if (modules_used_.back() == just_loaded_module.code_file()) - break; - - string module_to_unload = modules_used_.back(); - modules_used_.pop_back(); - BasicCodeModule module(0, 0, module_to_unload, "", "", "", ""); - BPLOG(INFO) << "Unloading module " << module_to_unload; - resolver_->UnloadModule(&module); - - // reduce the symbol line count - map::iterator iter = - module_symbol_lines_.find(module_to_unload); - if (iter != module_symbol_lines_.end()) { - symbol_lines_ -= iter->second; - module_symbol_lines_.erase(iter); - } - } -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.h deleted file mode 100644 index 6ea4bba8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server.h +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// NetworkSourceLineServer implements a UDP-based network protocol -// to allow clients to query for source line information. -// -// A brief protocol description can be found in network_source_line_protocol.h - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_SERVER_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_SERVER_H_ - -#include -#include -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/binarystream.h" -#include "processor/network_interface.h" -#include "processor/udp_network.h" - -namespace google_breakpad { - -using std::list; -using std::string; -using std::vector; - -class NetworkSourceLineServer { - public: - explicit NetworkSourceLineServer(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, - unsigned short listen_port, - bool ip4only, - const string &listen_address, - u_int64_t max_symbol_lines) - : initialized_(false), - net_(new UDPNetwork(listen_address, listen_port, ip4only)), - resolver_(resolver), - supplier_(supplier), - max_symbol_lines_(max_symbol_lines), - symbol_lines_(0) {}; - - NetworkSourceLineServer(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, - NetworkInterface *net, - u_int64_t max_symbol_lines = 0) - : initialized_(false), - net_(net), - resolver_(resolver), - supplier_(supplier), - max_symbol_lines_(max_symbol_lines), - symbol_lines_(0) {}; - - // Initialize network connection. Will be called automatically by - // RunOnce or RunForever if not already initialized. - // Returns false if network setup fails. - bool Initialize(); - - // Run forever serving connections. - // Returns false only if network setup fails. - bool RunForever(); - - // Look for incoming connections and serve them. - // Wait at most |wait_milliseconds| before returning. Return true - // if any connections were served, and false otherwise. - bool RunOnce(int wait_milliseconds); - - private: - bool initialized_; - NetworkInterface *net_; - SourceLineResolverInterface *resolver_; - SymbolSupplier *supplier_; - // Maximum number of symbol lines to store in memory. - // The number of lines in a symbol file is used as a rough - // proxy for memory usage when parsed and loaded. When - // this limit is surpassed, modules will be unloaded until - // the sum of currently loaded modules is again lower - // than this limit. - const u_int64_t max_symbol_lines_; - // Current number of symbol lines loaded - u_int64_t symbol_lines_; - // List of modules loaded, in most-to-least recently used order - list modules_used_; - // Number of symbol lines loaded, per module. - map module_symbol_lines_; - - void HandleHas(binarystream &message, binarystream &response); - void HandleLoad(binarystream &message, binarystream &response); - void HandleGet(binarystream &message, binarystream &response); - void HandleGetStackWin(binarystream &message, binarystream &response); - void HandleGetStackCFI(binarystream &message, binarystream &response); - string FormatWindowsFrameInfo(WindowsFrameInfo *frame_info); - - int CountNewlines(const string &str); - - // Move this module to the front of the used list. - void UsedModule(const CodeModule &module); - // Try to unload some modules to reclaim memory. - // Do not unload the module passed in, as this was just loaded. - void TryUnloadModules(const CodeModule &just_loaded_module); - - protected: - // protected so we can easily unit test it - bool HandleRequest(binarystream &request, binarystream &response); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_NETWORK_SOURCE_LINE_SERVER_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server_unittest.cc deleted file mode 100644 index c45f19cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/network_source_line_server_unittest.cc +++ /dev/null @@ -1,963 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit tests for NetworkSourceLineServer. - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/binarystream.h" -#include "processor/cfi_frame_info.h" -#include "processor/network_source_line_server.h" -#include "processor/network_source_line_protocol.h" -#include "processor/windows_frame_info.h" - -namespace { -using std::ios_base; -using std::set; -using std::string; -using google_breakpad::CFIFrameInfo; -using google_breakpad::CodeModule; -using google_breakpad::binarystream; -using google_breakpad::NetworkInterface; -using google_breakpad::NetworkSourceLineServer; -using google_breakpad::SourceLineResolverInterface; -using google_breakpad::StackFrame; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; -using google_breakpad::WindowsFrameInfo; -using ::testing::_; -using ::testing::DoAll; -using ::testing::Invoke; -using ::testing::Property; -using ::testing::Return; -using ::testing::SetArgumentPointee; -// Style guide forbids "using namespace", so at least shorten it. -namespace P = google_breakpad::source_line_protocol; - -class MockNetwork : public NetworkInterface { - public: - MockNetwork() {} - - MOCK_METHOD1(Init, bool(bool listen)); - MOCK_METHOD2(Send, bool(const char *data, size_t length)); - MOCK_METHOD1(WaitToReceive, bool(int timeout)); - MOCK_METHOD3(Receive, bool(char *buffer, size_t buffer_size, - ssize_t &received)); -}; - -class MockSymbolSupplier : public SymbolSupplier { -public: - MockSymbolSupplier() {} - - MOCK_METHOD3(GetSymbolFile, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file)); - MOCK_METHOD4(GetSymbolFile, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data)); - MOCK_METHOD4(GetCStringSymbolData, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data)); - MOCK_METHOD1(FreeSymbolData, void(const CodeModule *module)); -}; - -class MockSourceLineResolver : public SourceLineResolverInterface { - public: - MockSourceLineResolver() {} - virtual ~MockSourceLineResolver() {} - - MOCK_METHOD2(LoadModule, bool(const CodeModule *module, - const string &map_file)); - MOCK_METHOD2(LoadModuleUsingMapBuffer, bool(const CodeModule *module, - const string &map_buffer)); - MOCK_METHOD2(LoadModuleUsingMemoryBuffer, bool(const CodeModule *module, - char *memory_buffer)); - MOCK_METHOD0(ShouldDeleteMemoryBufferAfterLoadModule, bool()); - MOCK_METHOD1(UnloadModule, void(const CodeModule *module)); - MOCK_METHOD1(HasModule, bool(const CodeModule *module)); - MOCK_METHOD1(FillSourceLineInfo, void(StackFrame *frame)); - MOCK_METHOD1(FindWindowsFrameInfo, - WindowsFrameInfo*(const StackFrame *frame)); - MOCK_METHOD1(FindCFIFrameInfo, - CFIFrameInfo*(const StackFrame *frame)); -}; - -class TestNetworkSourceLineServer : public NetworkSourceLineServer { - public: - // Override visibility for testing. It's a lot easier to just - // call into this method and verify the result than it would be - // to mock out the calls to the NetworkInterface, even though - // that would ostensibly be more correct and test the code more - // thoroughly. Perhaps if someone has time and figures out a - // clean way to do it this could be changed. - using NetworkSourceLineServer::HandleRequest; - - TestNetworkSourceLineServer(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver, - NetworkInterface *net, - u_int64_t max_symbol_lines = 0) - : NetworkSourceLineServer(supplier, resolver, net, max_symbol_lines) - - {} -}; - -class NetworkSourceLineServerTest : public ::testing::Test { - public: - MockSymbolSupplier supplier; - MockSourceLineResolver resolver; - MockNetwork net; - TestNetworkSourceLineServer *server; - - NetworkSourceLineServerTest() : server(NULL) {} - - void SetUp() { - server = new TestNetworkSourceLineServer(&supplier, &resolver, &net); - } -}; - -TEST_F(NetworkSourceLineServerTest, TestInit) { - EXPECT_CALL(net, Init(true)).WillOnce(Return(true)); - EXPECT_CALL(net, WaitToReceive(0)).WillOnce(Return(false)); - ASSERT_TRUE(server->Initialize()); - EXPECT_FALSE(server->RunOnce(0)); -} - -TEST_F(NetworkSourceLineServerTest, TestMalformedRequest) { - binarystream request; - // send a request without a full sequence number - request << u_int8_t(1); - binarystream response; - EXPECT_FALSE(server->HandleRequest(request, response)); - request.rewind(); - // send a request without a command - request << u_int16_t(1); - EXPECT_FALSE(server->HandleRequest(request, response)); -} - -TEST_F(NetworkSourceLineServerTest, TestUnknownCommand) { - binarystream request; - // send a request with an unknown command - request << u_int16_t(1) << u_int8_t(100); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(u_int16_t(1), response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); -} - -TEST_F(NetworkSourceLineServerTest, TestHasBasic) { - EXPECT_CALL(resolver, HasModule(_)) - .WillOnce(Return(false)) - .WillOnce(Return(true)); - - binarystream request; - const u_int16_t sequence = 0xA0A0; - // first request should come back as not loaded - request << sequence << P::HAS << string("test.dll") << string("test.pdb") - << string("ABCD1234"); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(P::MODULE_NOT_LOADED, int(response_data)); - // second request should come back as loaded - binarystream request2; - request2 << sequence << P::HAS << string("loaded.dll") << string("loaded.pdb") - << string("ABCD1234"); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(P::MODULE_LOADED, int(response_data)); -} - -TEST_F(NetworkSourceLineServerTest, TestMalformedHasRequest) { - binarystream request; - // send request with just command, missing all data - const u_int16_t sequence = 0xA0A0; - request << sequence << P::HAS; - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); - // send request with just module name - binarystream request2; - request2 << sequence << P::HAS << string("test.dll"); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); - // send request with module name, debug file, missing debug id - binarystream request3; - request3 << sequence << P::HAS << string("test.dll") << string("test.pdb"); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); -} - -TEST_F(NetworkSourceLineServerTest, TestHasLoad) { - EXPECT_CALL(resolver, HasModule(_)) - .WillOnce(Return(false)) - .WillOnce(Return(false)) - .WillOnce(Return(true)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .WillOnce(Return(true)); - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .WillOnce(Return(SymbolSupplier::FOUND)); - - // verify that the module is not loaded, with a HAS request - binarystream request; - const u_int16_t sequence = 0xA0A0; - request << sequence << P::HAS << string("found.dll") << string("found.pdb") - << string("ABCD1234"); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(P::MODULE_NOT_LOADED, int(response_data)); - // now send a load request for this module - binarystream request2; - const u_int16_t sequence2 = 0xB0B0; - request2 << sequence2 << P::LOAD << string("found.dll") << string("found.pdb") - << string("ABCD1234"); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - // sending another HAS message should now show it as loaded - binarystream request3; - const u_int16_t sequence3 = 0xC0C0; - request3 << sequence3 << P::HAS << string("found.dll") << string("found.pdb") - << string("ABCD1234"); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(P::MODULE_LOADED, int(response_data)); -} - -TEST_F(NetworkSourceLineServerTest, TestLoad) { - EXPECT_CALL(resolver, HasModule(_)) - .Times(3) - .WillRepeatedly(Return(false)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .WillOnce(Return(false)); - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .WillOnce(Return(SymbolSupplier::NOT_FOUND)) - .WillOnce(Return(SymbolSupplier::INTERRUPT)) - .WillOnce(Return(SymbolSupplier::FOUND)); - - // notfound.dll should return LOAD_NOT_FOUND - binarystream request; - const u_int16_t sequence = 0xA0A0; - request << sequence << P::LOAD << string("notfound.dll") - << string("notfound.pdb") << string("ABCD1234"); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(int(P::LOAD_NOT_FOUND), int(response_data)); - // interrupt.dll should return LOAD_INTERRUPT - binarystream request2; - const u_int16_t sequence2 = 0xB0B0; - request2 << sequence2 << P::LOAD << string("interrupt.dll") - << string("interrupt.pdb") << string("0000"); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(int(P::LOAD_INTERRUPT), int(response_data)); - // fail.dll should return LOAD_FAIL - binarystream request3; - const u_int16_t sequence3 = 0xC0C0; - request3 << sequence3 << P::LOAD << string("fail.dll") << string("fail.pdb") - << string("FFFFFFFF"); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(int(P::LOAD_FAIL), int(response_data)); -} - -TEST_F(NetworkSourceLineServerTest, TestMalformedLoadRequest) { - binarystream request; - // send request with just command, missing all data - const u_int16_t sequence = 0xA0A0; - request << sequence << P::LOAD; - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); - // send request with just module name - binarystream request2; - request2 << sequence << P::LOAD << string("test.dll"); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); - // send request with module name, debug file, missing debug id - binarystream request3; - request3 << sequence << P::LOAD << string("test.dll") << string("test.pdb"); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::ERROR, int(response_status)); -} - -void FillFullSourceLineInfo(StackFrame *frame) { - frame->function_name = "function1"; - frame->function_base = 0x1200; - frame->source_file_name = "function1.cc"; - frame->source_line = 1; - frame->source_line_base = 0x1230; -} - -void FillPartialSourceLineInfo(StackFrame *frame) { - frame->function_name = "function2"; - frame->function_base = 0xFFF0; -} - -TEST_F(NetworkSourceLineServerTest, TestGet) { - EXPECT_CALL(resolver, FillSourceLineInfo(_)) - .WillOnce(Invoke(FillFullSourceLineInfo)) - .WillOnce(Invoke(FillPartialSourceLineInfo)); - - binarystream request; - const u_int16_t sequence = 0xA0A0; - request << sequence << P::GET << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0x1234); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - string function, source_file; - u_int32_t source_line; - u_int64_t function_base, source_line_base; - response >> response_sequence >> response_status >> function - >> function_base >> source_file >> source_line >> source_line_base; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("function1", function); - EXPECT_EQ(0x1200, function_base); - EXPECT_EQ("function1.cc", source_file); - EXPECT_EQ(1, source_line); - EXPECT_EQ(0x1230, source_line_base); - - binarystream request2; - const u_int16_t sequence2 = 0xC0C0; - request2 << sequence2 << P::GET << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xFFFF); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status >> function - >> function_base >> source_file >> source_line >> source_line_base; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("function2", function); - EXPECT_EQ(0xFFF0, function_base); - EXPECT_EQ("", source_file); - EXPECT_EQ(0, source_line); - EXPECT_EQ(0, source_line_base); -} - -WindowsFrameInfo* GetFullWindowsFrameInfo(const StackFrame *frame) { - // return frame info with program string - return new WindowsFrameInfo(1, 2, 3, 0xA, 0xFF, 0xF00, - true, - "x y ="); -} - -WindowsFrameInfo* GetPartialWindowsFrameInfo(const StackFrame *frame) { - // return frame info, no program string - return new WindowsFrameInfo(1, 2, 3, 4, 5, 6, true, ""); -} - -TEST_F(NetworkSourceLineServerTest, TestGetStackWin) { - EXPECT_CALL(resolver, FindWindowsFrameInfo(_)) - .WillOnce(Invoke(GetFullWindowsFrameInfo)) - .WillOnce(Invoke(GetPartialWindowsFrameInfo)) - .WillOnce(Return((WindowsFrameInfo*)NULL)); - - binarystream request; - const u_int16_t sequence = 0xA0A0; - request << sequence << P::GETSTACKWIN << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0x1234); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - string stack_info; - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("0 0 0 1 2 3 a ff f00 1 x y =", stack_info); - - binarystream request2; - const u_int16_t sequence2 = 0xB0B0; - request2 << sequence2 << P::GETSTACKWIN << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xABCD); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("0 0 0 1 2 3 4 5 6 0 1", stack_info); - - binarystream request3; - const u_int16_t sequence3 = 0xC0C0; - request3 << sequence3 << P::GETSTACKWIN << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xFFFF); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("", stack_info); -} - - -CFIFrameInfo* GetCFIFrameInfoJustCFA(const StackFrame *frame) { - CFIFrameInfo* cfi = new CFIFrameInfo(); - cfi->SetCFARule("12345678"); - return cfi; -} - -CFIFrameInfo* GetCFIFrameInfoCFARA(const StackFrame *frame) { - CFIFrameInfo* cfi = new CFIFrameInfo(); - cfi->SetCFARule("12345678"); - cfi->SetRARule("abcdefgh"); - return cfi; -} - -CFIFrameInfo* GetCFIFrameInfoLots(const StackFrame *frame) { - CFIFrameInfo* cfi = new CFIFrameInfo(); - cfi->SetCFARule("12345678"); - cfi->SetRARule("abcdefgh"); - cfi->SetRegisterRule("r0", "foo bar"); - cfi->SetRegisterRule("b0", "123 abc +"); - return cfi; -} - -TEST_F(NetworkSourceLineServerTest, TestGetStackCFI) { - EXPECT_CALL(resolver, FindCFIFrameInfo(_)) - .WillOnce(Return((CFIFrameInfo*)NULL)) - .WillOnce(Invoke(GetCFIFrameInfoJustCFA)) - .WillOnce(Invoke(GetCFIFrameInfoCFARA)) - .WillOnce(Invoke(GetCFIFrameInfoLots)); - - binarystream request; - const u_int16_t sequence = 0xA0A0; - request << sequence << P::GETSTACKCFI << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0x1234); - binarystream response; - ASSERT_TRUE(server->HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status; - string stack_info; - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("", stack_info); - - binarystream request2; - const u_int16_t sequence2 = 0xB0B0; - request2 << sequence2 << P::GETSTACKCFI << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xABCD); - ASSERT_TRUE(server->HandleRequest(request2, response)); - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(".cfa: 12345678", stack_info); - - binarystream request3; - const u_int16_t sequence3 = 0xC0C0; - request3 << sequence3 << P::GETSTACKCFI << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xFFFF); - ASSERT_TRUE(server->HandleRequest(request3, response)); - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(".cfa: 12345678 .ra: abcdefgh", stack_info); - - binarystream request4; - const u_int16_t sequence4 = 0xD0D0; - request4 << sequence4 << P::GETSTACKCFI << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0xFFFF); - ASSERT_TRUE(server->HandleRequest(request4, response)); - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence4, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ(".cfa: 12345678 .ra: abcdefgh b0: 123 abc + r0: foo bar", - stack_info); -} - -TEST_F(NetworkSourceLineServerTest, TestMalformedGetRequest) { - //TODO -} - -TEST(TestMissingMembers, TestServerWithoutSymbolSupplier) { - // Should provide reasonable responses without a SymbolSupplier - MockSourceLineResolver resolver; - MockNetwork net; - TestNetworkSourceLineServer server(NULL, &resolver, &net); - - // All LOAD requests should return LOAD_NOT_FOUND - binarystream request; - binarystream response; - const u_int16_t sequence = 0xB0B0; - u_int16_t response_sequence; - u_int8_t response_status, response_data; - request << sequence << P::LOAD << string("found.dll") << string("found.pdb") - << string("ABCD1234"); - ASSERT_TRUE(server.HandleRequest(request, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_NOT_FOUND), int(response_data)); -} - -TEST(TestMissingMembers, TestServerWithoutResolver) { - // Should provide reasonable responses without a SourceLineResolver - MockSymbolSupplier supplier; - MockNetwork net; - TestNetworkSourceLineServer server(&supplier, NULL, &net); - - // GET requests should return empty info - binarystream request; - binarystream response; - const u_int16_t sequence = 0xA0A0; - u_int16_t response_sequence; - u_int8_t response_status; - request << sequence << P::GET << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0x1234); - ASSERT_TRUE(server.HandleRequest(request, response)); - string function, source_file; - u_int32_t source_line; - u_int64_t function_base, source_line_base; - response >> response_sequence >> response_status >> function - >> function_base >> source_file >> source_line >> source_line_base; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("", function); - EXPECT_EQ(0x0, function_base); - EXPECT_EQ("", source_file); - EXPECT_EQ(0, source_line); - EXPECT_EQ(0x0, source_line_base); - - // GETSTACKWIN requests should return an empty string - binarystream request2; - const u_int16_t sequence2 = 0xB0B0; - request << sequence2 << P::GETSTACKWIN << string("loaded.dll") - << string("loaded.pdb") << string("ABCD1234") - << u_int64_t(0x1000) << u_int64_t(0x1234); - ASSERT_TRUE(server.HandleRequest(request, response)); - string response_string; - response >> response_sequence >> response_status >> response_string; - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - EXPECT_EQ("", response_string); -} - -class TestModuleManagement : public ::testing::Test { -public: - MockSymbolSupplier supplier; - MockSourceLineResolver resolver; - MockNetwork net; - TestNetworkSourceLineServer server; - - // Init server with symbol line limit of 25 - TestModuleManagement() : server(&supplier, &resolver, &net, 25) {} -}; - -TEST_F(TestModuleManagement, TestModuleUnloading) { - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .Times(3) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(string("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")), - Return(SymbolSupplier::FOUND))); - EXPECT_CALL(resolver, HasModule(_)) - .Times(3) - .WillRepeatedly(Return(false)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .Times(3) - .WillRepeatedly(Return(true)); - EXPECT_CALL(resolver, UnloadModule(Property(&CodeModule::code_file, - string("one.dll|one.pdb|1111")))) - .Times(1); - - // load three modules, each with 10 lines of symbols. - // the third module will overflow the server's symbol line limit, - // and should cause the first module to be unloaded. - binarystream request; - const u_int16_t sequence = 0x1010; - request << sequence << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - binarystream response; - ASSERT_TRUE(server.HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request2; - const u_int16_t sequence2 = 0x2020; - request2 << sequence2 << P::LOAD << string("two.dll") << string("two.pdb") - << string("2222"); - ASSERT_TRUE(server.HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request3; - const u_int16_t sequence3 = 0x3030; - request3 << sequence3 << P::LOAD << string("three.dll") << string("three.pdb") - << string("3333"); - ASSERT_TRUE(server.HandleRequest(request3, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); -} - -TEST_F(TestModuleManagement, TestSymbolLimitTooLow) { - // load module with symbol count > limit, - // ensure that it doesn't get unloaded even though it's the only module - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .WillOnce(DoAll(SetArgumentPointee<3>(string("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n")), - Return(SymbolSupplier::FOUND))); - EXPECT_CALL(resolver, HasModule(_)) - .WillOnce(Return(false)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .WillOnce(Return(true)); - EXPECT_CALL(resolver, UnloadModule(_)) - .Times(0); - - binarystream request; - const u_int16_t sequence = 0x1010; - request << sequence << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - binarystream response; - ASSERT_TRUE(server.HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); -} - -TEST_F(TestModuleManagement, TestModuleLoadLRU) { - // load 2 modules, then re-load the first one, - // then load a third one, causing the second one to be unloaded - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .Times(3) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(string("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")), - Return(SymbolSupplier::FOUND))); - EXPECT_CALL(resolver, HasModule(_)) - .WillOnce(Return(false)) // load module 1 - .WillOnce(Return(false)) // load module 2 - .WillOnce(Return(true)) // module 1 already loaded - .WillOnce(Return(false)); // load module 3 - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .Times(3) - .WillRepeatedly(Return(true)); - EXPECT_CALL(resolver, UnloadModule(Property(&CodeModule::code_file, - string("two.dll|two.pdb|2222")))) - .Times(1); - - binarystream request; - const u_int16_t sequence = 0x1010; - request << sequence << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - binarystream response; - ASSERT_TRUE(server.HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request2; - const u_int16_t sequence2 = 0x2020; - request2 << sequence2 << P::LOAD << string("two.dll") << string("two.pdb") - << string("2222"); - ASSERT_TRUE(server.HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request3; - const u_int16_t sequence3 = 0x3030; - request3 << sequence3 << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - ASSERT_TRUE(server.HandleRequest(request3, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request4; - const u_int16_t sequence4 = 0x4040; - request4 << sequence4 << P::LOAD << string("three.dll") << string("three.pdb") - << string("3333"); - ASSERT_TRUE(server.HandleRequest(request4, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence4, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); -} - -TEST_F(TestModuleManagement, TestModuleGetLRU) { - // load 2 modules, then issue a GET for the first one, - // then load a third one, causing the second one to be unloaded - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .Times(3) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(string("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")), - Return(SymbolSupplier::FOUND))); - EXPECT_CALL(resolver, HasModule(_)) - .Times(3) - .WillRepeatedly(Return(false)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .Times(3) - .WillRepeatedly(Return(true)); - EXPECT_CALL(resolver, FillSourceLineInfo(_)) - .Times(1); - EXPECT_CALL(resolver, UnloadModule(Property(&CodeModule::code_file, - string("two.dll|two.pdb|2222")))) - .Times(1); - - binarystream request; - const u_int16_t sequence = 0x1010; - request << sequence << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - binarystream response; - ASSERT_TRUE(server.HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request2; - const u_int16_t sequence2 = 0x2020; - request2 << sequence2 << P::LOAD << string("two.dll") << string("two.pdb") - << string("2222"); - ASSERT_TRUE(server.HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request3; - const u_int16_t sequence3 = 0x3030; - request3 << sequence3 << P::GET << string("one.dll") - << string("one.pdb") << string("1111") - << u_int64_t(0x1000) << u_int64_t(0x1234); - ASSERT_TRUE(server.HandleRequest(request3, response)); - string function, source_file; - u_int32_t source_line; - u_int64_t function_base, source_line_base; - response >> response_sequence >> response_status >> function - >> function_base >> source_file >> source_line >> source_line_base; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - // Don't care about the rest of the response, really. - - binarystream request4; - const u_int16_t sequence4 = 0x4040; - request4 << sequence4 << P::LOAD << string("three.dll") << string("three.pdb") - << string("3333"); - ASSERT_TRUE(server.HandleRequest(request4, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence4, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); -} - -TEST_F(TestModuleManagement, TestModuleGetStackWinLRU) { - // load 2 modules, then issue a GETSTACKWIN for the first one, - // then load a third one, causing the second one to be unloaded - EXPECT_CALL(supplier, GetSymbolFile(_,_,_,_)) - .Times(3) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(string("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")), - Return(SymbolSupplier::FOUND))); - EXPECT_CALL(resolver, HasModule(_)) - .Times(3) - .WillRepeatedly(Return(false)); - EXPECT_CALL(resolver, LoadModuleUsingMapBuffer(_,_)) - .Times(3) - .WillRepeatedly(Return(true)); - EXPECT_CALL(resolver, FindWindowsFrameInfo(_)) - .WillOnce(Return((WindowsFrameInfo*)NULL)); - EXPECT_CALL(resolver, UnloadModule(Property(&CodeModule::code_file, - string("two.dll|two.pdb|2222")))) - .Times(1); - - binarystream request; - const u_int16_t sequence = 0x1010; - request << sequence << P::LOAD << string("one.dll") << string("one.pdb") - << string("1111"); - binarystream response; - ASSERT_TRUE(server.HandleRequest(request, response)); - u_int16_t response_sequence; - u_int8_t response_status, response_data; - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request2; - const u_int16_t sequence2 = 0x2020; - request2 << sequence2 << P::LOAD << string("two.dll") << string("two.pdb") - << string("2222"); - ASSERT_TRUE(server.HandleRequest(request2, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence2, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); - - binarystream request3; - const u_int16_t sequence3 = 0x3030; - request3 << sequence3 << P::GETSTACKWIN << string("one.dll") - << string("one.pdb") << string("1111") - << u_int64_t(0x1000) << u_int64_t(0x1234); - ASSERT_TRUE(server.HandleRequest(request3, response)); - string stack_info; - response >> response_sequence >> response_status - >> stack_info; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence3, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - // Don't care about the rest of the response, really. - - binarystream request4; - const u_int16_t sequence4 = 0x4040; - request4 << sequence4 << P::LOAD << string("three.dll") << string("three.pdb") - << string("3333"); - ASSERT_TRUE(server.HandleRequest(request4, response)); - response >> response_sequence >> response_status >> response_data; - ASSERT_FALSE(response.eof()); - EXPECT_EQ(sequence4, response_sequence); - EXPECT_EQ(P::OK, int(response_status)); - ASSERT_EQ(int(P::LOAD_OK), int(response_data)); -} - -} // namespace - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.cc deleted file mode 100644 index 839287bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// pathname_stripper.cc: Manipulates pathnames into their component parts. -// -// See pathname_stripper.h for documentation. -// -// Author: Mark Mentovai - -#include "processor/pathname_stripper.h" - -namespace google_breakpad { - -// static -string PathnameStripper::File(const string &path) { - string::size_type slash = path.rfind('/'); - string::size_type backslash = path.rfind('\\'); - - string::size_type file_start = 0; - if (slash != string::npos && - (backslash == string::npos || slash > backslash)) { - file_start = slash + 1; - } else if (backslash != string::npos) { - file_start = backslash + 1; - } - - return path.substr(file_start); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.h deleted file mode 100644 index 17db75d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// pathname_stripper.h: Manipulates pathnames into their component parts. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_PATHNAME_STRIPPER_H__ -#define PROCESSOR_PATHNAME_STRIPPER_H__ - -#include - -namespace google_breakpad { - -using std::string; - -class PathnameStripper { - public: - // Given path, a pathname with components separated by slashes (/) or - // backslashes (\), returns the trailing component, without any separator. - // If path ends in a separator character, returns an empty string. - static string File(const string &path); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_PATHNAME_STRIPPER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper_unittest.cc deleted file mode 100644 index 1bff4cb0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/pathname_stripper_unittest.cc +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "processor/pathname_stripper.h" -#include "processor/logging.h" - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -namespace { - -using google_breakpad::PathnameStripper; - -static bool RunTests() { - ASSERT_EQ(PathnameStripper::File("/dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("/dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\/file"), "file"); - ASSERT_EQ(PathnameStripper::File("file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/"), ""); - ASSERT_EQ(PathnameStripper::File("dir\\"), ""); - ASSERT_EQ(PathnameStripper::File("dir/dir/"), ""); - ASSERT_EQ(PathnameStripper::File("dir\\dir\\"), ""); - ASSERT_EQ(PathnameStripper::File("dir1/dir2/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1\\dir2\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1/dir2\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1\\dir2/file"), "file"); - ASSERT_EQ(PathnameStripper::File(""), ""); - ASSERT_EQ(PathnameStripper::File("1"), "1"); - ASSERT_EQ(PathnameStripper::File("1/2"), "2"); - ASSERT_EQ(PathnameStripper::File("1\\2"), "2"); - ASSERT_EQ(PathnameStripper::File("/1/2"), "2"); - ASSERT_EQ(PathnameStripper::File("\\1\\2"), "2"); - ASSERT_EQ(PathnameStripper::File("dir//file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("/dir//file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir\\\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("c:\\dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("c:\\dir\\file.ext"), "file.ext"); - - return true; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator-inl.h deleted file mode 100644 index b24f092c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator-inl.h +++ /dev/null @@ -1,332 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator-inl.h: Postfix (reverse Polish) notation expression -// evaluator. -// -// Documentation in postfix_evaluator.h. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_INL_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_INL_H__ - -#include "processor/postfix_evaluator.h" - -#include - -#include - -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" - -namespace google_breakpad { - -using std::istringstream; -using std::ostringstream; - - -// A small class used in Evaluate to make sure to clean up the stack -// before returning failure. -class AutoStackClearer { - public: - explicit AutoStackClearer(vector *stack) : stack_(stack) {} - ~AutoStackClearer() { stack_->clear(); } - - private: - vector *stack_; -}; - - -template -bool PostfixEvaluator::EvaluateInternal( - const string &expression, - DictionaryValidityType *assigned) { - // Tokenize, splitting on whitespace. - istringstream stream(expression); - string token; - while (stream >> token) { - // There are enough binary operations that do exactly the same thing - // (other than the specific operation, of course) that it makes sense - // to share as much code as possible. - enum BinaryOperation { - BINARY_OP_NONE = 0, - BINARY_OP_ADD, - BINARY_OP_SUBTRACT, - BINARY_OP_MULTIPLY, - BINARY_OP_DIVIDE_QUOTIENT, - BINARY_OP_DIVIDE_MODULUS - }; - - BinaryOperation operation = BINARY_OP_NONE; - if (token == "+") - operation = BINARY_OP_ADD; - else if (token == "-") - operation = BINARY_OP_SUBTRACT; - else if (token == "*") - operation = BINARY_OP_MULTIPLY; - else if (token == "/") - operation = BINARY_OP_DIVIDE_QUOTIENT; - else if (token == "%") - operation = BINARY_OP_DIVIDE_MODULUS; - - if (operation != BINARY_OP_NONE) { - // Get the operands. - ValueType operand1 = ValueType(); - ValueType operand2 = ValueType(); - if (!PopValues(&operand1, &operand2)) { - BPLOG(ERROR) << "Could not PopValues to get two values for binary " - "operation " << token << ": " << expression; - return false; - } - - // Perform the operation. - ValueType result; - switch (operation) { - case BINARY_OP_ADD: - result = operand1 + operand2; - break; - case BINARY_OP_SUBTRACT: - result = operand1 - operand2; - break; - case BINARY_OP_MULTIPLY: - result = operand1 * operand2; - break; - case BINARY_OP_DIVIDE_QUOTIENT: - result = operand1 / operand2; - break; - case BINARY_OP_DIVIDE_MODULUS: - result = operand1 % operand2; - break; - case BINARY_OP_NONE: - // This will not happen, but compilers will want a default or - // BINARY_OP_NONE case. - BPLOG(ERROR) << "Not reached!"; - return false; - break; - } - - // Save the result. - PushValue(result); - } else if (token == "^") { - // ^ for unary dereference. Can't dereference without memory. - if (!memory_) { - BPLOG(ERROR) << "Attempt to dereference without memory: " << - expression; - return false; - } - - ValueType address; - if (!PopValue(&address)) { - BPLOG(ERROR) << "Could not PopValue to get value to derefence: " << - expression; - return false; - } - - ValueType value; - if (!memory_->GetMemoryAtAddress(address, &value)) { - BPLOG(ERROR) << "Could not dereference memory at address " << - HexString(address) << ": " << expression; - return false; - } - - PushValue(value); - } else if (token == "=") { - // = for assignment. - ValueType value; - if (!PopValue(&value)) { - BPLOG(INFO) << "Could not PopValue to get value to assign: " << - expression; - return false; - } - - // Assignment is only meaningful when assigning into an identifier. - // The identifier must name a variable, not a constant. Variables - // begin with '$'. - string identifier; - if (PopValueOrIdentifier(NULL, &identifier) != POP_RESULT_IDENTIFIER) { - BPLOG(ERROR) << "PopValueOrIdentifier returned a value, but an " - "identifier is needed to assign " << - HexString(value) << ": " << expression; - return false; - } - if (identifier.empty() || identifier[0] != '$') { - BPLOG(ERROR) << "Can't assign " << HexString(value) << " to " << - identifier << ": " << expression; - return false; - } - - (*dictionary_)[identifier] = value; - if (assigned) - (*assigned)[identifier] = true; - } else { - // The token is not an operator, it's a literal value or an identifier. - // Push it onto the stack as-is. Use push_back instead of PushValue - // because PushValue pushes ValueType as a string, but token is already - // a string. - stack_.push_back(token); - } - } - - return true; -} - -template -bool PostfixEvaluator::Evaluate(const string &expression, - DictionaryValidityType *assigned) { - // Ensure that the stack is cleared before returning. - AutoStackClearer clearer(&stack_); - - if (!EvaluateInternal(expression, assigned)) - return false; - - // If there's anything left on the stack, it indicates incomplete execution. - // This is a failure case. If the stack is empty, evalution was complete - // and successful. - if (stack_.empty()) - return true; - - BPLOG(ERROR) << "Incomplete execution: " << expression; - return false; -} - -template -bool PostfixEvaluator::EvaluateForValue(const string &expression, - ValueType *result) { - // Ensure that the stack is cleared before returning. - AutoStackClearer clearer(&stack_); - - if (!EvaluateInternal(expression, NULL)) - return false; - - // A successful execution should leave exactly one value on the stack. - if (stack_.size() != 1) { - BPLOG(ERROR) << "Expression yielded bad number of results: " - << "'" << expression << "'"; - return false; - } - - return PopValue(result); -} - -template -typename PostfixEvaluator::PopResult -PostfixEvaluator::PopValueOrIdentifier( - ValueType *value, string *identifier) { - // There needs to be at least one element on the stack to pop. - if (!stack_.size()) - return POP_RESULT_FAIL; - - string token = stack_.back(); - stack_.pop_back(); - - // First, try to treat the value as a literal. Literals may have leading - // '-' sign, and the entire remaining string must be parseable as - // ValueType. If this isn't possible, it can't be a literal, so treat it - // as an identifier instead. - // - // Some versions of the libstdc++, the GNU standard C++ library, have - // stream extractors for unsigned integer values that permit a leading - // '-' sign (6.0.13); others do not (6.0.9). Since we require it, we - // handle it explicitly here. - istringstream token_stream(token); - ValueType literal = ValueType(); - bool negative; - if (token_stream.peek() == '-') { - negative = true; - token_stream.get(); - } else { - negative = false; - } - if (token_stream >> literal && token_stream.peek() == EOF) { - if (value) { - *value = literal; - } - if (negative) - *value = -*value; - return POP_RESULT_VALUE; - } else { - if (identifier) { - *identifier = token; - } - return POP_RESULT_IDENTIFIER; - } -} - - -template -bool PostfixEvaluator::PopValue(ValueType *value) { - ValueType literal = ValueType(); - string token; - PopResult result; - if ((result = PopValueOrIdentifier(&literal, &token)) == POP_RESULT_FAIL) { - return false; - } else if (result == POP_RESULT_VALUE) { - // This is the easy case. - *value = literal; - } else { // result == POP_RESULT_IDENTIFIER - // There was an identifier at the top of the stack. Resolve it to a - // value by looking it up in the dictionary. - typename DictionaryType::const_iterator iterator = - dictionary_->find(token); - if (iterator == dictionary_->end()) { - // The identifier wasn't found in the dictionary. Don't imply any - // default value, just fail. - BPLOG(INFO) << "Identifier " << token << " not in dictionary"; - return false; - } - - *value = iterator->second; - } - - return true; -} - - -template -bool PostfixEvaluator::PopValues(ValueType *value1, - ValueType *value2) { - return PopValue(value2) && PopValue(value1); -} - - -template -void PostfixEvaluator::PushValue(const ValueType &value) { - ostringstream token_stream; - token_stream << value; - stack_.push_back(token_stream.str()); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator.h deleted file mode 100644 index 24807551..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator.h +++ /dev/null @@ -1,172 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator.h: Postfix (reverse Polish) notation expression evaluator. -// -// PostfixEvaluator evaluates an expression, using the expression itself -// in postfix (reverse Polish) notation and a dictionary mapping constants -// and variables to their values. The evaluator supports standard -// arithmetic operations, assignment into variables, and when an optional -// MemoryRange is provided, dereferencing. (Any unary key-to-value operation -// may be used with a MemoryRange implementation that returns the appropriate -// values, but PostfixEvaluator was written with dereferencing in mind.) -// -// The expression language is simple. Expressions are supplied as strings, -// with operands and operators delimited by whitespace. Operands may be -// either literal values suitable for ValueType, or constants or variables, -// which reference the dictionary. The supported binary operators are + -// (addition), - (subtraction), * (multiplication), / (quotient of division), -// and % (modulus of division). The unary ^ (dereference) operator is also -// provided. These operators allow any operand to be either a literal -// value, constant, or variable. Assignment (=) of any type of operand into -// a variable is also supported. -// -// The dictionary is provided as a map with string keys. Keys beginning -// with the '$' character are treated as variables. All other keys are -// treated as constants. Any results must be assigned into variables in the -// dictionary. These variables do not need to exist prior to calling -// Evaluate, unless used in an expression prior to being assigned to. The -// internal stack state is not made available after evaluation, and any -// values remaining on the stack are treated as evidence of incomplete -// execution and cause the evaluator to indicate failure. -// -// PostfixEvaluator is intended to support evaluation of "program strings" -// obtained from MSVC frame data debugging information in pdb files as -// returned by the DIA APIs. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_H__ - - -#include -#include -#include - -namespace google_breakpad { - -using std::map; -using std::string; -using std::vector; - -class MemoryRegion; - -template -class PostfixEvaluator { - public: - typedef map DictionaryType; - typedef map DictionaryValidityType; - - // Create a PostfixEvaluator object that may be used (with Evaluate) on - // one or more expressions. PostfixEvaluator does not take ownership of - // either argument. |memory| may be NULL, in which case dereferencing - // (^) will not be supported. |dictionary| may be NULL, but evaluation - // will fail in that case unless set_dictionary is used before calling - // Evaluate. - PostfixEvaluator(DictionaryType *dictionary, const MemoryRegion *memory) - : dictionary_(dictionary), memory_(memory), stack_() {} - - // Evaluate the expression, starting with an empty stack. The results of - // execution will be stored in one (or more) variables in the dictionary. - // Returns false if any failures occur during execution, leaving - // variables in the dictionary in an indeterminate state. If assigned is - // non-NULL, any keys set in the dictionary as a result of evaluation - // will also be set to true in assigned, providing a way to determine if - // an expression modifies any of its input variables. - bool Evaluate(const string &expression, DictionaryValidityType *assigned); - - // Like Evaluate, but provides the value left on the stack to the - // caller. If evaluation succeeds and leaves exactly one value on - // the stack, pop that value, store it in *result, and return true. - // Otherwise, return false. - bool EvaluateForValue(const string &expression, ValueType *result); - - DictionaryType* dictionary() const { return dictionary_; } - - // Reset the dictionary. PostfixEvaluator does not take ownership. - void set_dictionary(DictionaryType *dictionary) {dictionary_ = dictionary; } - - private: - // Return values for PopValueOrIdentifier - enum PopResult { - POP_RESULT_FAIL = 0, - POP_RESULT_VALUE, - POP_RESULT_IDENTIFIER - }; - - // Retrieves the topmost literal value, constant, or variable from the - // stack. Returns POP_RESULT_VALUE if the topmost entry is a literal - // value, and sets |value| accordingly. Returns POP_RESULT_IDENTIFIER - // if the topmost entry is a constant or variable identifier, and sets - // |identifier| accordingly. Returns POP_RESULT_FAIL on failure, such - // as when the stack is empty. - PopResult PopValueOrIdentifier(ValueType *value, string *identifier); - - // Retrieves the topmost value on the stack. If the topmost entry is - // an identifier, the dictionary is queried for the identifier's value. - // Returns false on failure, such as when the stack is empty or when - // a nonexistent identifier is named. - bool PopValue(ValueType *value); - - // Retrieves the top two values on the stack, in the style of PopValue. - // value2 is popped before value1, so that value1 corresponds to the - // entry that was pushed prior to value2. Returns false on failure. - bool PopValues(ValueType *value1, ValueType *value2); - - // Pushes a new value onto the stack. - void PushValue(const ValueType &value); - - // Evaluate expression, updating *assigned if it is non-zero. Return - // true if evaluation completes successfully. Do not clear the stack - // upon successful evaluation. - bool EvaluateInternal(const string &expression, - DictionaryValidityType *assigned); - - // The dictionary mapping constant and variable identifiers (strings) to - // values. Keys beginning with '$' are treated as variable names, and - // PostfixEvaluator is free to create and modify these keys. Weak pointer. - DictionaryType *dictionary_; - - // If non-NULL, the MemoryRegion used for dereference (^) operations. - // If NULL, dereferencing is unsupported and will fail. Weak pointer. - const MemoryRegion *memory_; - - // The stack contains state information as execution progresses. Values - // are pushed on to it as the expression string is read and as operations - // yield values; values are popped when used as operands to operators. - vector stack_; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator_unittest.cc deleted file mode 100644 index 0c2d8ece..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/postfix_evaluator_unittest.cc +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator_unittest.cc: Unit tests for PostfixEvaluator. -// -// Author: Mark Mentovai - -#include - -#include -#include - -#include "processor/postfix_evaluator-inl.h" - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" - - -namespace { - - -using std::map; -using std::string; -using google_breakpad::MemoryRegion; -using google_breakpad::PostfixEvaluator; - - -// FakeMemoryRegion is used to test PostfixEvaluator's dereference (^) -// operator. The result of dereferencing a value is one greater than -// the value. -class FakeMemoryRegion : public MemoryRegion { - public: - virtual u_int64_t GetBase() const { return 0; } - virtual u_int32_t GetSize() const { return 0; } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) const { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) const { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) const { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) const { - *value = address + 1; - return true; - } -}; - - -struct EvaluateTest { - // Expression passed to PostfixEvaluator::Evaluate. - const string expression; - - // True if the expression is expected to be evaluable, false if evaluation - // is expected to fail. - bool evaluable; -}; - - -struct EvaluateTestSet { - // The dictionary used for all tests in the set. - PostfixEvaluator::DictionaryType *dictionary; - - // The list of tests. - const EvaluateTest *evaluate_tests; - - // The number of tests. - unsigned int evaluate_test_count; - - // Identifiers and their expected values upon completion of the Evaluate - // tests in the set. - map *validate_data; -}; - - -struct EvaluateForValueTest { - // Expression passed to PostfixEvaluator::Evaluate. - const string expression; - - // True if the expression is expected to be evaluable, false if evaluation - // is expected to fail. - bool evaluable; - - // If evaluable, the value we expect it to yield. - unsigned int value; -}; - -static bool RunTests() { - // The first test set checks the basic operations and failure modes. - PostfixEvaluator::DictionaryType dictionary_0; - const EvaluateTest evaluate_tests_0[] = { - { "$rAdd 2 2 + =", true }, // $rAdd = 2 + 2 = 4 - { "$rAdd $rAdd 2 + =", true }, // $rAdd = $rAdd + 2 = 6 - { "$rAdd 2 $rAdd + =", true }, // $rAdd = 2 + $rAdd = 8 - { "99", false }, // put some junk on the stack... - { "$rAdd2 2 2 + =", true }, // ...and make sure things still work - { "$rAdd2\t2\n2 + =", true }, // same but with different whitespace - { "$rAdd2 2 2 + = ", true }, // trailing whitespace - { " $rAdd2 2 2 + =", true }, // leading whitespace - { "$rAdd2 2 2 + =", true }, // extra whitespace - { "$T0 2 = +", false }, // too few operands for add - { "2 + =", false }, // too few operands for add - { "2 +", false }, // too few operands for add - { "+", false }, // too few operands for add - { "^", false }, // too few operands for dereference - { "=", false }, // too few operands for assignment - { "2 =", false }, // too few operands for assignment - { "2 2 + =", false }, // too few operands for assignment - { "2 2 =", false }, // can't assign into a literal - { "k 2 =", false }, // can't assign into a constant - { "2", false }, // leftover data on stack - { "2 2 +", false }, // leftover data on stack - { "$rAdd", false }, // leftover data on stack - { "0 $T1 0 0 + =", false }, // leftover data on stack - { "$T2 $T2 2 + =", false }, // can't operate on an undefined value - { "$rMul 9 6 * =", true }, // $rMul = 9 * 6 = 54 - { "$rSub 9 6 - =", true }, // $rSub = 9 - 6 = 3 - { "$rDivQ 9 6 / =", true }, // $rDivQ = 9 / 6 = 1 - { "$rDivM 9 6 % =", true }, // $rDivM = 9 % 6 = 3 - { "$rDeref 9 ^ =", true } // $rDeref = ^9 = 10 (FakeMemoryRegion) - }; - map validate_data_0; - validate_data_0["$rAdd"] = 8; - validate_data_0["$rAdd2"] = 4; - validate_data_0["$rSub"] = 3; - validate_data_0["$rMul"] = 54; - validate_data_0["$rDivQ"] = 1; - validate_data_0["$rDivM"] = 3; - validate_data_0["$rDeref"] = 10; - - // The second test set simulates a couple of MSVC program strings. - // The data is fudged a little bit because the tests use FakeMemoryRegion - // instead of a real stack snapshot, but the program strings are real and - // the implementation doesn't know or care that the data is not real. - PostfixEvaluator::DictionaryType dictionary_1; - dictionary_1["$ebp"] = 0xbfff0010; - dictionary_1["$eip"] = 0x10000000; - dictionary_1["$esp"] = 0xbfff0000; - dictionary_1[".cbSavedRegs"] = 4; - dictionary_1[".cbParams"] = 4; - dictionary_1[".raSearchStart"] = 0xbfff0020; - const EvaluateTest evaluate_tests_1[] = { - { "$T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = " - "$L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + =", true }, - // Intermediate state: $T0 = 0xbfff0010, $eip = 0xbfff0015, - // $ebp = 0xbfff0011, $esp = 0xbfff0018, - // $L = 0xbfff000c, $P = 0xbfff001c - { "$T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = " - "$L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ =", - true }, - // Intermediate state: $T0 = 0xbfff0011, $eip = 0xbfff0016, - // $ebp = 0xbfff0012, $esp = 0xbfff0019, - // $L = 0xbfff000d, $P = 0xbfff001d, - // $ebx = 0xbffefff6 - { "$T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = " - "$esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = " - "$ebx $T0 28 - ^ =", - true } - }; - map validate_data_1; - validate_data_1["$T0"] = 0xbfff0012; - validate_data_1["$T1"] = 0xbfff0020; - validate_data_1["$T2"] = 0xbfff0019; - validate_data_1["$eip"] = 0xbfff0021; - validate_data_1["$ebp"] = 0xbfff0012; - validate_data_1["$esp"] = 0xbfff0024; - validate_data_1["$L"] = 0xbfff000e; - validate_data_1["$P"] = 0xbfff0028; - validate_data_1["$ebx"] = 0xbffefff7; - validate_data_1[".cbSavedRegs"] = 4; - validate_data_1[".cbParams"] = 4; - - EvaluateTestSet evaluate_test_sets[] = { - { &dictionary_0, evaluate_tests_0, - sizeof(evaluate_tests_0) / sizeof(EvaluateTest), &validate_data_0 }, - { &dictionary_1, evaluate_tests_1, - sizeof(evaluate_tests_1) / sizeof(EvaluateTest), &validate_data_1 }, - }; - - unsigned int evaluate_test_set_count = sizeof(evaluate_test_sets) / - sizeof(EvaluateTestSet); - - FakeMemoryRegion fake_memory; - PostfixEvaluator postfix_evaluator = - PostfixEvaluator(NULL, &fake_memory); - - for (unsigned int evaluate_test_set_index = 0; - evaluate_test_set_index < evaluate_test_set_count; - ++evaluate_test_set_index) { - EvaluateTestSet *evaluate_test_set = - &evaluate_test_sets[evaluate_test_set_index]; - const EvaluateTest *evaluate_tests = evaluate_test_set->evaluate_tests; - unsigned int evaluate_test_count = evaluate_test_set->evaluate_test_count; - - // The same dictionary will be used for each test in the set. Earlier - // tests can affect the state of the dictionary for later tests. - postfix_evaluator.set_dictionary(evaluate_test_set->dictionary); - - // Use a new validity dictionary for each test set. - PostfixEvaluator::DictionaryValidityType assigned; - - for (unsigned int evaluate_test_index = 0; - evaluate_test_index < evaluate_test_count; - ++evaluate_test_index) { - const EvaluateTest *evaluate_test = &evaluate_tests[evaluate_test_index]; - - // Do the test. - bool result = postfix_evaluator.Evaluate(evaluate_test->expression, - &assigned); - if (result != evaluate_test->evaluable) { - fprintf(stderr, "FAIL: evaluate set %d/%d, test %d/%d, " - "expression \"%s\", expected %s, observed %s\n", - evaluate_test_set_index, evaluate_test_set_count, - evaluate_test_index, evaluate_test_count, - evaluate_test->expression.c_str(), - evaluate_test->evaluable ? "evaluable" : "not evaluable", - result ? "evaluted" : "not evaluated"); - return false; - } - } - - // Validate the results. - for (map::const_iterator validate_iterator = - evaluate_test_set->validate_data->begin(); - validate_iterator != evaluate_test_set->validate_data->end(); - ++validate_iterator) { - const string identifier = validate_iterator->first; - unsigned int expected_value = validate_iterator->second; - - map::const_iterator dictionary_iterator = - evaluate_test_set->dictionary->find(identifier); - - // The identifier must exist in the dictionary. - if (dictionary_iterator == evaluate_test_set->dictionary->end()) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate identifier \"%s\", " - "expected %d, observed not found\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_value); - return false; - } - - // The value in the dictionary must be the same as the expected value. - unsigned int observed_value = dictionary_iterator->second; - if (expected_value != observed_value) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate identifier \"%s\", " - "expected %d, observed %d\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_value, observed_value); - return false; - } - - // The value must be set in the "assigned" dictionary if it was a - // variable. It must not have been assigned if it was a constant. - bool expected_assigned = identifier[0] == '$'; - bool observed_assigned = false; - PostfixEvaluator::DictionaryValidityType::const_iterator - iterator_assigned = assigned.find(identifier); - if (iterator_assigned != assigned.end()) { - observed_assigned = iterator_assigned->second; - } - if (expected_assigned != observed_assigned) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate assignment of \"%s\", " - "expected %d, observed %d\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_assigned, observed_assigned); - return false; - } - } - } - - // EvaluateForValue tests. - PostfixEvaluator::DictionaryType dictionary_2; - dictionary_2["$ebp"] = 0xbfff0010; - dictionary_2["$eip"] = 0x10000000; - dictionary_2["$esp"] = 0xbfff0000; - dictionary_2[".cbSavedRegs"] = 4; - dictionary_2[".cbParams"] = 4; - dictionary_2[".raSearchStart"] = 0xbfff0020; - const EvaluateForValueTest evaluate_for_value_tests_2[] = { - { "28907223", true, 28907223 }, // simple constant - { "89854293 40010015 +", true, 89854293 + 40010015 }, // arithmetic - { "-870245 8769343 +", true, 7899098 }, // negative constants - { "$ebp $esp - $eip +", true, 0x10000010 }, // variable references - { "18929794 34015074", false, 0 }, // too many values - { "$ebp $ebp 4 - =", false, 0 }, // too few values - { "$new $eip = $new", true, 0x10000000 }, // make new variable - { "$new 4 +", true, 0x10000004 }, // see prior assignments - { ".cfa 42 = 10", false, 0 } // can't set constants - }; - const int evaluate_for_value_tests_2_size - = (sizeof (evaluate_for_value_tests_2) - / sizeof (evaluate_for_value_tests_2[0])); - map validate_data_2; - validate_data_2["$eip"] = 0x10000000; - validate_data_2["$ebp"] = 0xbfff000c; - validate_data_2["$esp"] = 0xbfff0000; - validate_data_2["$new"] = 0x10000000; - validate_data_2[".cbSavedRegs"] = 4; - validate_data_2[".cbParams"] = 4; - validate_data_2[".raSearchStart"] = 0xbfff0020; - - postfix_evaluator.set_dictionary(&dictionary_2); - for (int i = 0; i < evaluate_for_value_tests_2_size; i++) { - const EvaluateForValueTest *test = &evaluate_for_value_tests_2[i]; - unsigned int result; - if (postfix_evaluator.EvaluateForValue(test->expression, &result) - != test->evaluable) { - fprintf(stderr, "FAIL: evaluate for value test %d, " - "expected evaluation to %s, but it %s\n", - i, test->evaluable ? "succeed" : "fail", - test->evaluable ? "failed" : "succeeded"); - return false; - } - if (test->evaluable && result != test->value) { - fprintf(stderr, "FAIL: evaluate for value test %d, " - "expected value to be 0x%x, but it was 0x%x\n", - i, test->value, result); - return false; - } - } - - for (map::iterator v = validate_data_2.begin(); - v != validate_data_2.end(); v++) { - map::iterator a = dictionary_2.find(v->first); - if (a == dictionary_2.end()) { - fprintf(stderr, "FAIL: evaluate for value dictionary check: " - "expected dict[\"%s\"] to be 0x%x, but it was unset\n", - v->first.c_str(), v->second); - return false; - } else if (a->second != v->second) { - fprintf(stderr, "FAIL: evaluate for value dictionary check: " - "expected dict[\"%s\"] to be 0x%x, but it was 0x%x\n", - v->first.c_str(), v->second, a->second); - return false; - } - dictionary_2.erase(a); - } - - map::iterator remaining = dictionary_2.begin(); - if (remaining != dictionary_2.end()) { - fprintf(stderr, "FAIL: evaluation of test expressions put unexpected " - "values in dictionary:\n"); - for (; remaining != dictionary_2.end(); remaining++) - fprintf(stderr, " dict[\"%s\"] == 0x%x\n", - remaining->first.c_str(), remaining->second); - return false; - } - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/process_state.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/process_state.cc deleted file mode 100644 index 1d970bad..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/process_state.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state.cc: A snapshot of a process, in a fully-digested state. -// -// See process_state.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_modules.h" - -namespace google_breakpad { - -ProcessState::~ProcessState() { - Clear(); -} - -void ProcessState::Clear() { - time_date_stamp_ = 0; - crashed_ = false; - crash_reason_.clear(); - crash_address_ = 0; - assertion_.clear(); - requesting_thread_ = -1; - for (vector::const_iterator iterator = threads_.begin(); - iterator != threads_.end(); - ++iterator) { - delete *iterator; - } - threads_.clear(); - system_info_.Clear(); - delete modules_; - modules_ = NULL; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/README b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/README deleted file mode 100644 index df37b6f3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/README +++ /dev/null @@ -1,20 +0,0 @@ -If you wish to use these protobufs, you must generate their source files -using protoc from the protobuf project (http://code.google.com/p/protobuf/). - ------ -Troubleshooting for Protobuf: - -Install: -If you are getting permission errors install, make sure you are not trying to -install from an NFS. - - -Running protoc: -protoc: error while loading shared libraries: libprotobuf.so.0: cannot open -shared object file: No such file or directory - -The issue is that Ubuntu 8.04 doesn't include /usr/local/lib in -library paths. - -To fix it for your current terminal session, just type in -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/process_state.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/process_state.proto deleted file mode 100644 index 5ff6194c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/proto/process_state.proto +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state_proto.proto: A client proto representation of a process, -// in a fully-digested state. -// -// Derived from earlier struct and class based models of a client-side -// processed minidump found under src/google_breakpad/processor. The -// file process_state.h holds the top level representation of this model, -// supported by additional classes. We've added a proto representation -// to ease serialization and parsing for server-side storage of crash -// reports processed on the client. -// -// Author: Jess Gray - -syntax = "proto2"; - -package google_breakpad; - -// A proto representation of a process, in a fully-digested state. -// See src/google_breakpad/processor/process_state.h -message ProcessStateProto { - // Next value: 13 - - // The time-date stamp of the original minidump (time_t format) - optional int64 time_date_stamp = 1; - - message Crash { - // The type of crash. OS- and possibly CPU- specific. For example, - // "EXCEPTION_ACCESS_VIOLATION" (Windows), "EXC_BAD_ACCESS / - // KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" (other Unix). - required string reason = 1; - - // If crash_reason implicates memory, the memory address that caused the - // crash. For data access errors, this will be the data address that - // caused the fault. For code errors, this will be the address of the - // instruction that caused the fault. - required int64 address = 2; - } - optional Crash crash = 2; - - - // If there was an assertion that was hit, a textual representation - // of that assertion, possibly including the file and line at which - // it occurred. - optional string assertion = 3; - - // The index of the thread that requested a dump be written in the - // threads vector. If a dump was produced as a result of a crash, this - // will point to the thread that crashed. If the dump was produced as - // by user code without crashing, and the dump contains extended Breakpad - // information, this will point to the thread that requested the dump. - optional int32 requesting_thread = 4; - - message Thread { - // Stack for the given thread - repeated StackFrame frames = 1; - } - - // Stacks for each thread (except possibly the exception handler - // thread) at the time of the crash. - repeated Thread threads = 5; - - // The modules that were loaded into the process represented by the - // ProcessState. - repeated CodeModule modules = 6; - - // System Info: OS and CPU - - // A string identifying the operating system, such as "Windows NT", - // "Mac OS X", or "Linux". If the information is present in the dump but - // its value is unknown, this field will contain a numeric value. If - // the information is not present in the dump, this field will be empty. - optional string os = 7; - - // A short form of the os string, using lowercase letters and no spaces, - // suitable for use in a filesystem. Possible values are "windows", - // "mac", and "linux". Empty if the information is not present in the dump - // or if the OS given by the dump is unknown. The values stored in this - // field should match those used by MinidumpSystemInfo::GetOS. - optional string os_short = 8; - - // A string identifying the version of the operating system, such as - // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not - // contain this information, this field will be empty. - optional string os_version = 9; - - // A string identifying the basic CPU family, such as "x86" or "ppc". - // If this information is present in the dump but its value is unknown, - // this field will contain a numeric value. If the information is not - // present in the dump, this field will be empty. The values stored in - // this field should match those used by MinidumpSystemInfo::GetCPU. - optional string cpu = 10; - - // A string further identifying the specific CPU, such as - // "GenuineIntel level 6 model 13 stepping 8". If the information is not - // present in the dump, or additional identifying information is not - // defined for the CPU family, this field will be empty. - optional string cpu_info = 11; - - // The number of processors in the system. Will be greater than one for - // multi-core systems. - optional int32 cpu_count = 12; - - // Leave the ability to add the raw minidump to this representation -} - - -// Represents a single frame in a stack -// See src/google_breakpad/processor/code_module.h -message StackFrame { - // Next value: 8 - - // The program counter location as an absolute virtual address. For the - // innermost called frame in a stack, this will be an exact program counter - // or instruction pointer value. For all other frames, this will be within - // the instruction that caused execution to branch to a called function, - // but may not necessarily point to the exact beginning of that instruction. - required int64 instruction = 1; - - // The module in which the instruction resides. - optional CodeModule module = 2; - - // The function name, may be omitted if debug symbols are not available. - optional string function_name = 3; - - // The start address of the function, may be omitted if debug symbols - // are not available. - optional int64 function_base = 4; - - // The source file name, may be omitted if debug symbols are not available. - optional string source_file_name = 5; - - // The (1-based) source line number, may be omitted if debug symbols are - // not available. - optional int32 source_line = 6; - - // The start address of the source line, may be omitted if debug symbols - // are not available. - optional int64 source_line_base = 7; -} - - -// Carries information about code modules that are loaded into a process. -// See src/google_breakpad/processor/code_module.h -message CodeModule { - // Next value: 8 - - // The base address of this code module as it was loaded by the process. - optional int64 base_address = 1; - - // The size of the code module. - optional int64 size = 2; - - // The path or file name that the code module was loaded from. - optional string code_file = 3; - - // An identifying string used to discriminate between multiple versions and - // builds of the same code module. This may contain a uuid, timestamp, - // version number, or any combination of this or other information, in an - // implementation-defined format. - optional string code_identifier = 4; - - // The filename containing debugging information associated with the code - // module. If debugging information is stored in a file separate from the - // code module itself (as is the case when .pdb or .dSYM files are used), - // this will be different from code_file. If debugging information is - // stored in the code module itself (possibly prior to stripping), this - // will be the same as code_file. - optional string debug_file = 5; - - // An identifying string similar to code_identifier, but identifies a - // specific version and build of the associated debug file. This may be - // the same as code_identifier when the debug_file and code_file are - // identical or when the same identifier is used to identify distinct - // debug and code files. - optional string debug_identifier = 6; - - // A human-readable representation of the code module's version. - optional string version = 7; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map-inl.h deleted file mode 100644 index 3aa2603a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map-inl.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map-inl.h: Range map implementation. -// -// See range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_INL_H__ -#define PROCESSOR_RANGE_MAP_INL_H__ - - -#include - -#include "processor/range_map.h" -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -bool RangeMap::StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - // The processor will hit this case too frequently with common symbol - // files in the size == 0 case, which is more suited to a DEBUG channel. - // Filter those out since there's no DEBUG channel at the moment. - BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) << - "+" << HexString(size) << ", " << - HexString(high); - return false; - } - - // Ensure that this range does not overlap with another one already in the - // map. - MapConstIterator iterator_base = map_.lower_bound(base); - MapConstIterator iterator_high = map_.lower_bound(high); - - if (iterator_base != iterator_high) { - // Some other range begins in the space used by this range. It may be - // contained within the space used by this range, or it may extend lower. - // Regardless, it is an error. - AddressType other_base = iterator_base->second.base(); - AddressType other_size = iterator_base->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range is contained by or " - "extends lower than the new range: new " << - HexString(base) << "+" << HexString(size) << ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - - if (iterator_high != map_.end()) { - if (iterator_high->second.base() <= high) { - // The range above this one overlaps with this one. It may fully - // contain this range, or it may begin within this range and extend - // higher. Regardless, it's an error. - AddressType other_base = iterator_high->second.base(); - AddressType other_size = iterator_high->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range contains or " - "extends higher than the new range: new " << - HexString(base) << "+" << HexString(size) << - ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - } - - // Store the range in the map by its high address, so that lower_bound can - // be used to quickly locate a range by address. - map_.insert(MapValue(high, Range(base, entry))); - return true; -} - - -template -bool RangeMap::RetrieveRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRange requires |entry|"; - assert(entry); - - MapConstIterator iterator = map_.lower_bound(address); - if (iterator == map_.end()) - return false; - - // The map is keyed by the high address of each range, so |address| is - // guaranteed to be lower than the range's high address. If |range| is - // not directly preceded by another range, it's possible for address to - // be below the range's low address, though. When that happens, address - // references something not within any range, so return false. - if (address < iterator->second.base()) - return false; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->second.base(); - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveNearestRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveNearestRange requires |entry|"; - assert(entry); - - // If address is within a range, RetrieveRange can handle it. - if (RetrieveRange(address, entry, entry_base, entry_size)) - return true; - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->second.base(); - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveRangeAtIndex( - int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRangeAtIndex requires |entry|"; - assert(entry); - - if (index >= GetCount()) { - BPLOG(ERROR) << "Index out of range: " << index << "/" << GetCount(); - return false; - } - - // Walk through the map. Although it's ordered, it's not a vector, so it - // can't be addressed directly by index. - MapConstIterator iterator = map_.begin(); - for (int this_index = 0; this_index < index; ++this_index) - ++iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->second.base(); - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -int RangeMap::GetCount() const { - return map_.size(); -} - - -template -void RangeMap::Clear() { - map_.clear(); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map.h deleted file mode 100644 index 2572e492..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map.h: Range maps. -// -// A range map associates a range of addresses with a specific object. This -// is useful when certain objects of variable size are located within an -// address space. The range map makes it simple to determine which object is -// associated with a specific address, which may be any address within the -// range associated with an object. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_H__ -#define PROCESSOR_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - -// Forward declarations (for later friend declarations of specialized template). -template class RangeMapSerializer; - -template -class RangeMap { - public: - RangeMap() : map_() {} - - // Inserts a range into the map. Returns false for a parameter error, - // or if the location of the range would conflict with a range already - // stored in the map. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Locates the range encompassing the supplied address. If there is - // no such range, returns false. entry_base and entry_size, if non-NULL, - // are set to the base and size of the entry's range. - bool RetrieveRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const; - - // Locates the range encompassing the supplied address, if one exists. - // If no range encompasses the supplied address, locates the nearest range - // to the supplied address that is lower than the address. Returns false - // if no range meets these criteria. entry_base and entry_size, if - // non-NULL, are set to the base and size of the entry's range. - bool RetrieveNearestRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Treating all ranges as a list ordered by the address spaces that they - // occupy, locates the range at the index specified by index. Returns - // false if index is larger than the number of ranges stored. entry_base - // and entry_size, if non-NULL, are set to the base and size of the entry's - // range. - // - // RetrieveRangeAtIndex is not optimized for speedy operation. - bool RetrieveRangeAtIndex(int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Returns the number of ranges stored in the RangeMap. - int GetCount() const; - - // Empties the range map, restoring it to the state it was when it was - // initially created. - void Clear(); - - private: - // Friend declarations. - friend class ModuleComparer; - friend class RangeMapSerializer; - - class Range { - public: - Range(const AddressType &base, const EntryType &entry) - : base_(base), entry_(entry) {} - - AddressType base() const { return base_; } - EntryType entry() const { return entry_; } - - private: - // The base address of the range. The high address does not need to - // be stored, because RangeMap uses it as the key to the map. - const AddressType base_; - - // The entry corresponding to a range. - const EntryType entry_; - }; - - // Convenience types. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Maps the high address of each range to a EntryType. - AddressToRangeMap map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map_unittest.cc deleted file mode 100644 index 996ae6d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/range_map_unittest.cc +++ /dev/null @@ -1,553 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map_unittest.cc: Unit tests for RangeMap -// -// Author: Mark Mentovai - - -#include -#include - -#include "processor/range_map-inl.h" - -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - - -namespace { - - -using google_breakpad::linked_ptr; -using google_breakpad::scoped_ptr; -using google_breakpad::RangeMap; - - -// A CountedObject holds an int. A global (not thread safe!) count of -// allocated CountedObjects is maintained to help test memory management. -class CountedObject { - public: - explicit CountedObject(int id) : id_(id) { ++count_; } - ~CountedObject() { --count_; } - - static int count() { return count_; } - int id() const { return id_; } - - private: - static int count_; - int id_; -}; - -int CountedObject::count_; - - -typedef int AddressType; -typedef RangeMap< AddressType, linked_ptr > TestMap; - - -// RangeTest contains data to use for store and retrieve tests. See -// RunTests for descriptions of the tests. -struct RangeTest { - // Base address to use for test - AddressType address; - - // Size of range to use for test - AddressType size; - - // Unique ID of range - unstorable ranges must have unique IDs too - int id; - - // Whether this range is expected to be stored successfully or not - bool expect_storable; -}; - - -// A RangeTestSet encompasses multiple RangeTests, which are run in -// sequence on the same RangeMap. -struct RangeTestSet { - // An array of RangeTests - const RangeTest *range_tests; - - // The number of tests in the set - unsigned int range_test_count; -}; - - -// StoreTest uses the data in a RangeTest and calls StoreRange on the -// test RangeMap. It returns true if the expected result occurred, and -// false if something else happened. -static bool StoreTest(TestMap *range_map, const RangeTest *range_test) { - linked_ptr object(new CountedObject(range_test->id)); - bool stored = range_map->StoreRange(range_test->address, - range_test->size, - object); - - if (stored != range_test->expect_storable) { - fprintf(stderr, "FAILED: " - "StoreRange id %d, expected %s, observed %s\n", - range_test->id, - range_test->expect_storable ? "storable" : "not storable", - stored ? "stored" : "not stored"); - return false; - } - - return true; -} - - -// RetrieveTest uses the data in RangeTest and calls RetrieveRange on the -// test RangeMap. If it retrieves the expected value (which can be no -// map entry at the specified range,) it returns true, otherwise, it returns -// false. RetrieveTest will check the values around the base address and -// the high address of a range to guard against off-by-one errors. -static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) { - for (unsigned int side = 0; side <= 1; ++side) { - // When side == 0, check the low side (base address) of each range. - // When side == 1, check the high side (base + size) of each range. - - // Check one-less and one-greater than the target address in addition - // to the target address itself. - - // If the size of the range is only 1, don't check one greater than - // the base or one less than the high - for a successfully stored - // range, these tests would erroneously fail because the range is too - // small. - AddressType low_offset = -1; - AddressType high_offset = 1; - if (range_test->size == 1) { - if (!side) // When checking the low side, - high_offset = 0; // don't check one over the target. - else // When checking the high side, - low_offset = 0; // don't check one under the target. - } - - for (AddressType offset = low_offset; offset <= high_offset; ++offset) { - AddressType address = - offset + - (!side ? range_test->address : - range_test->address + range_test->size - 1); - - bool expected_result = false; // This is correct for tests not stored. - if (range_test->expect_storable) { - if (offset == 0) // When checking the target address, - expected_result = true; // test should always succeed. - else if (offset == -1) // When checking one below the target, - expected_result = side; // should fail low and succeed high. - else // When checking one above the target, - expected_result = !side; // should succeed low and fail high. - } - - linked_ptr object; - AddressType retrieved_base = AddressType(); - AddressType retrieved_size = AddressType(); - bool retrieved = range_map->RetrieveRange(address, &object, - &retrieved_base, - &retrieved_size); - - bool observed_result = retrieved && object->id() == range_test->id; - - if (observed_result != expected_result) { - fprintf(stderr, "FAILED: " - "RetrieveRange id %d, side %d, offset %d, " - "expected %s, observed %s\n", - range_test->id, - side, - offset, - expected_result ? "true" : "false", - observed_result ? "true" : "false"); - return false; - } - - // If a range was successfully retrieved, check that the returned - // bounds match the range as stored. - if (observed_result == true && - (retrieved_base != range_test->address || - retrieved_size != range_test->size)) { - fprintf(stderr, "FAILED: " - "RetrieveRange id %d, side %d, offset %d, " - "expected base/size %d/%d, observed %d/%d\n", - range_test->id, - side, - offset, - range_test->address, range_test->size, - retrieved_base, retrieved_size); - return false; - } - - // Now, check RetrieveNearestRange. The nearest range is always - // expected to be different from the test range when checking one - // less than the low side. - bool expected_nearest = range_test->expect_storable; - if (!side && offset < 0) - expected_nearest = false; - - linked_ptr nearest_object; - AddressType nearest_base = AddressType(); - AddressType nearest_size = AddressType(); - bool retrieved_nearest = range_map->RetrieveNearestRange(address, - &nearest_object, - &nearest_base, - &nearest_size); - - // When checking one greater than the high side, RetrieveNearestRange - // should usually return the test range. When a different range begins - // at that address, though, then RetrieveNearestRange should return the - // range at the address instead of the test range. - if (side && offset > 0 && nearest_base == address) { - expected_nearest = false; - } - - bool observed_nearest = retrieved_nearest && - nearest_object->id() == range_test->id; - - if (observed_nearest != expected_nearest) { - fprintf(stderr, "FAILED: " - "RetrieveNearestRange id %d, side %d, offset %d, " - "expected %s, observed %s\n", - range_test->id, - side, - offset, - expected_nearest ? "true" : "false", - observed_nearest ? "true" : "false"); - return false; - } - - // If a range was successfully retrieved, check that the returned - // bounds match the range as stored. - if (expected_nearest && - (nearest_base != range_test->address || - nearest_size != range_test->size)) { - fprintf(stderr, "FAILED: " - "RetrieveNearestRange id %d, side %d, offset %d, " - "expected base/size %d/%d, observed %d/%d\n", - range_test->id, - side, - offset, - range_test->address, range_test->size, - nearest_base, nearest_size); - return false; - } - } - } - - return true; -} - - -// Test RetrieveRangeAtIndex, which is supposed to return objects in order -// according to their addresses. This test is performed by looping through -// the map, calling RetrieveRangeAtIndex for all possible indices in sequence, -// and verifying that each call returns a different object than the previous -// call, and that ranges are returned with increasing base addresses. Returns -// false if the test fails. -static bool RetrieveIndexTest(TestMap *range_map, int set) { - linked_ptr object; - CountedObject *last_object = NULL; - AddressType last_base = 0; - - int object_count = range_map->GetCount(); - for (int object_index = 0; object_index < object_count; ++object_index) { - AddressType base; - if (!range_map->RetrieveRangeAtIndex(object_index, &object, &base, NULL)) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected success, observed failure\n", - set, object_index); - return false; - } - - if (!object.get()) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected object, observed NULL\n", - set, object_index); - return false; - } - - // It's impossible to do these comparisons unless there's a previous - // object to compare against. - if (last_object) { - // The object must be different from the last one. - if (object->id() == last_object->id()) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected different objects, observed same objects (%d)\n", - set, object_index, object->id()); - return false; - } - - // Each object must have a base greater than the previous object's base. - if (base <= last_base) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected different bases, observed same bases (%d)\n", - set, object_index, base); - return false; - } - } - - last_object = object.get(); - last_base = base; - } - - // Make sure that RetrieveRangeAtIndex doesn't allow lookups at indices that - // are too high. - if (range_map->RetrieveRangeAtIndex(object_count, &object, NULL, NULL)) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d (too large), " - "expected failure, observed success\n", - set, object_count); - return false; - } - - return true; -} - -// Additional RetriveAtIndex test to expose the bug in RetrieveRangeAtIndex(). -// Bug info: RetrieveRangeAtIndex() previously retrieves the high address of -// entry, however, it is supposed to retrieve the base address of entry as -// stated in the comment in range_map.h. -static bool RetriveAtIndexTest2() { - scoped_ptr range_map(new TestMap()); - - // Store ranges with base address = 2 * object_id: - const int range_size = 2; - for (int object_id = 0; object_id < 100; ++object_id) { - linked_ptr object(new CountedObject(object_id)); - int base_address = 2 * object_id; - range_map->StoreRange(base_address, range_size, object); - } - - linked_ptr object; - int object_count = range_map->GetCount(); - for (int object_index = 0; object_index < object_count; ++object_index) { - AddressType base; - if (!range_map->RetrieveRangeAtIndex(object_index, &object, &base, NULL)) { - fprintf(stderr, "FAILED: RetrieveAtIndexTest2 index %d, " - "expected success, observed failure\n", object_index); - return false; - } - - int expected_base = 2 * object->id(); - if (base != expected_base) { - fprintf(stderr, "FAILED: RetriveAtIndexTest2 index %d, " - "expected base %d, observed base %d", - object_index, expected_base, base); - return false; - } - } - - return true; -} - - -// RunTests runs a series of test sets. -static bool RunTests() { - // These tests will be run sequentially. The first set of tests exercises - // most functions of RangeTest, and verifies all of the bounds-checking. - const RangeTest range_tests_0[] = { - { INT_MIN, 16, 1, true }, // lowest possible range - { -2, 5, 2, true }, // a range through zero - { INT_MAX - 9, 11, 3, false }, // tests anti-overflow - { INT_MAX - 9, 10, 4, true }, // highest possible range - { 5, 0, 5, false }, // tests anti-zero-size - { 5, 1, 6, true }, // smallest possible range - { -20, 15, 7, true }, // entirely negative - - { 10, 10, 10, true }, // causes the following tests to fail - { 9, 10, 11, false }, // one-less base, one-less high - { 9, 11, 12, false }, // one-less base, identical high - { 9, 12, 13, false }, // completely contains existing - { 10, 9, 14, false }, // identical base, one-less high - { 10, 10, 15, false }, // exactly identical to existing range - { 10, 11, 16, false }, // identical base, one-greater high - { 11, 8, 17, false }, // contained completely within - { 11, 9, 18, false }, // one-greater base, identical high - { 11, 10, 19, false }, // one-greater base, one-greater high - { 9, 2, 20, false }, // overlaps bottom by one - { 10, 1, 21, false }, // overlaps bottom by one, contained - { 19, 1, 22, false }, // overlaps top by one, contained - { 19, 2, 23, false }, // overlaps top by one - - { 9, 1, 24, true }, // directly below without overlap - { 20, 1, 25, true }, // directly above without overlap - - { 6, 3, 26, true }, // exactly between two ranges, gapless - { 7, 3, 27, false }, // tries to span two ranges - { 7, 5, 28, false }, // tries to span three ranges - { 4, 20, 29, false }, // tries to contain several ranges - - { 30, 50, 30, true }, - { 90, 25, 31, true }, - { 35, 65, 32, false }, // tries to span two noncontiguous - { 120, 10000, 33, true }, // > 8-bit - { 20000, 20000, 34, true }, // > 8-bit - { 0x10001, 0x10001, 35, true }, // > 16-bit - - { 27, -1, 36, false } // tests high < base - }; - - // Attempt to fill the entire space. The entire space must be filled with - // three stores because AddressType is signed for these tests, so RangeMap - // treats the size as signed and rejects sizes that appear to be negative. - // Even if these tests were run as unsigned, two stores would be needed - // to fill the space because the entire size of the space could only be - // described by using one more bit than would be present in AddressType. - const RangeTest range_tests_1[] = { - { INT_MIN, INT_MAX, 50, true }, // From INT_MIN to -2, inclusive - { -1, 2, 51, true }, // From -1 to 0, inclusive - { 1, INT_MAX, 52, true }, // From 1 to INT_MAX, inclusive - { INT_MIN, INT_MAX, 53, false }, // Can't fill the space twice - { -1, 2, 54, false }, - { 1, INT_MAX, 55, false }, - { -3, 6, 56, false }, // -3 to 2, inclusive - spans 3 ranges - }; - - // A light round of testing to verify that RetrieveRange does the right - // the right thing at the extremities of the range when nothing is stored - // there. Checks are forced without storing anything at the extremities - // by setting size = 0. - const RangeTest range_tests_2[] = { - { INT_MIN, 0, 100, false }, // makes RetrieveRange check low end - { -1, 3, 101, true }, - { INT_MAX, 0, 102, false }, // makes RetrieveRange check high end - }; - - // Similar to the previous test set, but with a couple of ranges closer - // to the extremities. - const RangeTest range_tests_3[] = { - { INT_MIN + 1, 1, 110, true }, - { INT_MAX - 1, 1, 111, true }, - { INT_MIN, 0, 112, false }, // makes RetrieveRange check low end - { INT_MAX, 0, 113, false } // makes RetrieveRange check high end - }; - - // The range map is cleared between sets of tests listed here. - const RangeTestSet range_test_sets[] = { - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) }, - { range_tests_1, sizeof(range_tests_1) / sizeof(RangeTest) }, - { range_tests_2, sizeof(range_tests_2) / sizeof(RangeTest) }, - { range_tests_3, sizeof(range_tests_3) / sizeof(RangeTest) }, - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) } // Run again - }; - - // Maintain the range map in a pointer so that deletion can be meaningfully - // tested. - scoped_ptr range_map(new TestMap()); - - // Run all of the test sets in sequence. - unsigned int range_test_set_count = sizeof(range_test_sets) / - sizeof(RangeTestSet); - for (unsigned int range_test_set_index = 0; - range_test_set_index < range_test_set_count; - ++range_test_set_index) { - const RangeTest *range_tests = - range_test_sets[range_test_set_index].range_tests; - unsigned int range_test_count = - range_test_sets[range_test_set_index].range_test_count; - - // Run the StoreRange test, which validates StoreRange and initializes - // the RangeMap with data for the RetrieveRange test. - int stored_count = 0; // The number of ranges successfully stored - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest *range_test = &range_tests[range_test_index]; - if (!StoreTest(range_map.get(), range_test)) - return false; - - if (range_test->expect_storable) - ++stored_count; - } - - // There should be exactly one CountedObject for everything successfully - // stored in the RangeMap. - if (CountedObject::count() != stored_count) { - fprintf(stderr, "FAILED: " - "stored object counts don't match, expected %d, observed %d\n", - stored_count, - CountedObject::count()); - - return false; - } - - // The RangeMap's own count of objects should also match. - if (range_map->GetCount() != stored_count) { - fprintf(stderr, "FAILED: stored object count doesn't match GetCount, " - "expected %d, observed %d\n", - stored_count, range_map->GetCount()); - - return false; - } - - // Run the RetrieveRange test - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest *range_test = &range_tests[range_test_index]; - if (!RetrieveTest(range_map.get(), range_test)) - return false; - } - - if (!RetrieveIndexTest(range_map.get(), range_test_set_index)) - return false; - - // Clear the map between test sets. If this is the final test set, - // delete the map instead to test destruction. - if (range_test_set_index < range_test_set_count - 1) - range_map->Clear(); - else - range_map.reset(); - - // Test that all stored objects are freed when the RangeMap is cleared - // or deleted. - if (CountedObject::count() != 0) { - fprintf(stderr, "FAILED: " - "did not free all objects after %s, %d still allocated\n", - range_test_set_index < range_test_set_count - 1 ? "clear" - : "delete", - CountedObject::count()); - - return false; - } - } - - if (!RetriveAtIndexTest2()) { - fprintf(stderr, "FAILED: did not pass RetrieveAtIndexTest2()\n"); - return false; - } - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/scoped_ptr.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/scoped_ptr.h deleted file mode 100644 index 0d4f7fd3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/scoped_ptr.h +++ /dev/null @@ -1,335 +0,0 @@ -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 Peter Dimov -// -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. -// This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. -// -// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation. -// - -// scoped_ptr mimics a built-in pointer except that it guarantees deletion -// of the object pointed to, either on destruction of the scoped_ptr or via -// an explicit reset(). scoped_ptr is a simple solution for simple needs; -// use shared_ptr or std::auto_ptr if your needs are more complex. - -// *** NOTE *** -// If your scoped_ptr is a class member of class FOO pointing to a -// forward declared type BAR (as shown below), then you MUST use a non-inlined -// version of the destructor. The destructor of a scoped_ptr (called from -// FOO's destructor) must have a complete definition of BAR in order to -// destroy it. Example: -// -// -- foo.h -- -// class BAR; -// -// class FOO { -// public: -// FOO(); -// ~FOO(); // Required for sources that instantiate class FOO to compile! -// -// private: -// scoped_ptr bar_; -// }; -// -// -- foo.cc -- -// #include "foo.h" -// FOO::~FOO() {} // Empty, but must be non-inlined to FOO's class definition. - -// scoped_ptr_malloc added by Google -// When one of these goes out of scope, instead of doing a delete or -// delete[], it calls free(). scoped_ptr_malloc is likely to see -// much more use than any other specializations. - -// release() added by Google -// Use this to conditionally transfer ownership of a heap-allocated object -// to the caller, usually on method success. - -#ifndef PROCESSOR_SCOPED_PTR_H__ -#define PROCESSOR_SCOPED_PTR_H__ - -#include // for std::ptrdiff_t -#include // for assert -#include // for free() decl - -namespace google_breakpad { - -template -class scoped_ptr { - private: - - T* ptr; - - scoped_ptr(scoped_ptr const &); - scoped_ptr & operator=(scoped_ptr const &); - - public: - - typedef T element_type; - - explicit scoped_ptr(T* p = 0): ptr(p) {} - - ~scoped_ptr() { - typedef char type_must_be_complete[sizeof(T)]; - delete ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete ptr; - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr should have its own object - template bool operator==(scoped_ptr const& p) const; - template bool operator!=(scoped_ptr const& p) const; -}; - -template inline -void swap(scoped_ptr& a, scoped_ptr& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr& b) { - return p != b.get(); -} - -// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to -// is guaranteed, either on destruction of the scoped_array or via an explicit -// reset(). Use shared_array or std::vector if your needs are more complex. - -template -class scoped_array { - private: - - T* ptr; - - scoped_array(scoped_array const &); - scoped_array & operator=(scoped_array const &); - - public: - - typedef T element_type; - - explicit scoped_array(T* p = 0) : ptr(p) {} - - ~scoped_array() { - typedef char type_must_be_complete[sizeof(T)]; - delete[] ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete [] ptr; - ptr = p; - } - } - - T& operator[](std::ptrdiff_t i) const { - assert(ptr != 0); - assert(i >= 0); - return ptr[i]; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_array & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_array should have its own object - template bool operator==(scoped_array const& p) const; - template bool operator!=(scoped_array const& p) const; -}; - -template inline -void swap(scoped_array& a, scoped_array& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_array& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_array& b) { - return p != b.get(); -} - - -// This class wraps the c library function free() in a class that can be -// passed as a template argument to scoped_ptr_malloc below. -class ScopedPtrMallocFree { - public: - inline void operator()(void* x) const { - free(x); - } -}; - -// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a -// second template argument, the functor used to free the object. - -template -class scoped_ptr_malloc { - private: - - T* ptr; - - scoped_ptr_malloc(scoped_ptr_malloc const &); - scoped_ptr_malloc & operator=(scoped_ptr_malloc const &); - - public: - - typedef T element_type; - - explicit scoped_ptr_malloc(T* p = 0): ptr(p) {} - - ~scoped_ptr_malloc() { - typedef char type_must_be_complete[sizeof(T)]; - free_((void*) ptr); - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - free_((void*) ptr); - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr_malloc & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr_malloc should have its own object - template - bool operator==(scoped_ptr_malloc const& p) const; - template - bool operator!=(scoped_ptr_malloc const& p) const; - - static FreeProc const free_; -}; - -template -FP const scoped_ptr_malloc::free_ = FP(); - -template inline -void swap(scoped_ptr_malloc& a, scoped_ptr_malloc& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr_malloc& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr_malloc& b) { - return p != b.get(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_SCOPED_PTR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer-inl.h deleted file mode 100644 index a6f54961..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer-inl.h +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// simple_serializer-inl.h: template specializations for following types: -// bool, const char *(C-string), string, -// Line, Function, PublicSymbol, WindowsFrameInfo and their linked pointers. -// -// See simple_serializer.h for moredocumentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_SIMPLE_SERIALIZER_INL_H__ -#define PROCESSOR_SIMPLE_SERIALIZER_INL_H__ - -#include - -#include "processor/simple_serializer.h" -#include "map_serializers-inl.h" - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "processor/basic_source_line_resolver_types.h" -#include "processor/linked_ptr.h" -#include "processor/windows_frame_info.h" - -namespace google_breakpad { - -// Specializations of SimpleSerializer: bool -template<> -class SimpleSerializer { - public: - static size_t SizeOf(bool boolean) { return 1; } - - static char *Write(bool boolean, char *dest) { - *dest = static_cast(boolean? 255 : 0); - return ++dest; - } -}; - -// Specializations of SimpleSerializer: string -template<> -class SimpleSerializer { - public: - static size_t SizeOf(const string &str) { return str.size() + 1; } - - static char *Write(const string &str, char *dest) { - strcpy(dest, str.c_str()); - return dest + SizeOf(str); - } -}; - -// Specializations of SimpleSerializer: C-string -template<> -class SimpleSerializer { - public: - static size_t SizeOf(const char *cstring) { - return strlen(cstring) + 1; - } - - static char *Write(const char *cstring, char *dest) { - strcpy(dest, cstring); - return dest + SizeOf(cstring); - } -}; - -// Specializations of SimpleSerializer: Line -template<> -class SimpleSerializer { - typedef BasicSourceLineResolver::Line Line; - public: - static size_t SizeOf(const Line &line) { - return SimpleSerializer::SizeOf(line.address) - + SimpleSerializer::SizeOf(line.size) - + SimpleSerializer::SizeOf(line.source_file_id) - + SimpleSerializer::SizeOf(line.line); - } - static char *Write(const Line &line, char *dest) { - dest = SimpleSerializer::Write(line.address, dest); - dest = SimpleSerializer::Write(line.size, dest); - dest = SimpleSerializer::Write(line.source_file_id, dest); - dest = SimpleSerializer::Write(line.line, dest); - return dest; - } -}; - -// Specializations of SimpleSerializer: PublicSymbol -template<> -class SimpleSerializer { - typedef BasicSourceLineResolver::PublicSymbol PublicSymbol; - public: - static size_t SizeOf(const PublicSymbol &pubsymbol) { - return SimpleSerializer::SizeOf(pubsymbol.name) - + SimpleSerializer::SizeOf(pubsymbol.address) - + SimpleSerializer::SizeOf(pubsymbol.parameter_size); - } - static char *Write(const PublicSymbol &pubsymbol, char *dest) { - dest = SimpleSerializer::Write(pubsymbol.name, dest); - dest = SimpleSerializer::Write(pubsymbol.address, dest); - dest = SimpleSerializer::Write(pubsymbol.parameter_size, dest); - return dest; - } -}; - -// Specializations of SimpleSerializer: WindowsFrameInfo -template<> -class SimpleSerializer { - public: - static size_t SizeOf(const WindowsFrameInfo &wfi) { - unsigned int size = 0; - size += SimpleSerializer::SizeOf(wfi.valid); - size += SimpleSerializer::SizeOf(wfi.prolog_size); - size += SimpleSerializer::SizeOf(wfi.epilog_size); - size += SimpleSerializer::SizeOf(wfi.parameter_size); - size += SimpleSerializer::SizeOf(wfi.saved_register_size); - size += SimpleSerializer::SizeOf(wfi.local_size); - size += SimpleSerializer::SizeOf(wfi.max_stack_size); - size += SimpleSerializer::SizeOf(wfi.allocates_base_pointer); - size += SimpleSerializer::SizeOf(wfi.program_string); - return size; - } - static char *Write(const WindowsFrameInfo &wfi, char *dest) { - dest = SimpleSerializer::Write(wfi.valid, dest); - dest = SimpleSerializer::Write(wfi.prolog_size, dest); - dest = SimpleSerializer::Write(wfi.epilog_size, dest); - dest = SimpleSerializer::Write(wfi.parameter_size, dest); - dest = SimpleSerializer::Write(wfi.saved_register_size, dest); - dest = SimpleSerializer::Write(wfi.local_size, dest); - dest = SimpleSerializer::Write(wfi.max_stack_size, dest); - dest = SimpleSerializer::Write(wfi.allocates_base_pointer, dest); - return SimpleSerializer::Write(wfi.program_string, dest); - } -}; - -// Specializations of SimpleSerializer: Linked_ptr version of -// Line, Function, PublicSymbol, WindowsFrameInfo. -template<> -class SimpleSerializer< linked_ptr > { - typedef BasicSourceLineResolver::Line Line; - public: - static size_t SizeOf(const linked_ptr &lineptr) { - if (lineptr.get() == NULL) return 0; - return SimpleSerializer::SizeOf(*(lineptr.get())); - } - static char *Write(const linked_ptr &lineptr, char *dest) { - if (lineptr.get()) - dest = SimpleSerializer::Write(*(lineptr.get()), dest); - return dest; - } -}; - -template<> -class SimpleSerializer { - // Convenient type names. - typedef BasicSourceLineResolver::Function Function; - typedef BasicSourceLineResolver::Line Line; - public: - static size_t SizeOf(const Function &func) { - unsigned int size = 0; - size += SimpleSerializer::SizeOf(func.name); - size += SimpleSerializer::SizeOf(func.address); - size += SimpleSerializer::SizeOf(func.size); - size += SimpleSerializer::SizeOf(func.parameter_size); - size += range_map_serializer_.SizeOf(func.lines); - return size; - } - - static char *Write(const Function &func, char *dest) { - dest = SimpleSerializer::Write(func.name, dest); - dest = SimpleSerializer::Write(func.address, dest); - dest = SimpleSerializer::Write(func.size, dest); - dest = SimpleSerializer::Write(func.parameter_size, dest); - dest = range_map_serializer_.Write(func.lines, dest); - return dest; - } - private: - // This static member is defined in module_serializer.cc. - static RangeMapSerializer< MemAddr, linked_ptr > range_map_serializer_; -}; - -template<> -class SimpleSerializer< linked_ptr > { - typedef BasicSourceLineResolver::Function Function; - public: - static size_t SizeOf(const linked_ptr &func) { - if (!func.get()) return 0; - return SimpleSerializer::SizeOf(*(func.get())); - } - - static char *Write(const linked_ptr &func, char *dest) { - if (func.get()) - dest = SimpleSerializer::Write(*(func.get()), dest); - return dest; - } -}; - -template<> -class SimpleSerializer< linked_ptr > { - typedef BasicSourceLineResolver::PublicSymbol PublicSymbol; - public: - static size_t SizeOf(const linked_ptr &pubsymbol) { - if (pubsymbol.get() == NULL) return 0; - return SimpleSerializer::SizeOf(*(pubsymbol.get())); - } - static char *Write(const linked_ptr &pubsymbol, char *dest) { - if (pubsymbol.get()) - dest = SimpleSerializer::Write(*(pubsymbol.get()), dest); - return dest; - } -}; - -template<> -class SimpleSerializer< linked_ptr > { - public: - static size_t SizeOf(const linked_ptr &wfi) { - if (wfi.get() == NULL) return 0; - return SimpleSerializer::SizeOf(*(wfi.get())); - } - static char *Write(const linked_ptr &wfi, char *dest) { - if (wfi.get()) - dest = SimpleSerializer::Write(*(wfi.get()), dest); - return dest; - } -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SIMPLE_SERIALIZER_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer.h deleted file mode 100644 index a1ca4f30..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_serializer.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// simple_serializer.h: SimpleSerializer is a template for calculating size and -// writing to specific memory location for objects of primitive types, C-style -// string, string, breakpad types/structs etc. -// All specializations of SimpleSerializer template are defined in the -// "simple_serializer-inl.h" file. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_SIMPLE_SERIALIZER_H__ -#define PROCESSOR_SIMPLE_SERIALIZER_H__ - -#include - -namespace google_breakpad { - -typedef u_int64_t MemAddr; - -// Default implementation of SimpleSerializer template. -// Specializations are defined in "simple_serializer-inl.h". -template class SimpleSerializer { - public: - // Calculate and return the size of the 'item'. - static size_t SizeOf(const Type &item) { return sizeof(item); } - // Write 'item' to memory location 'dest', and return to the "end" address of - // data written, i.e., the address after the final byte written. - static char *Write(const Type &item, char *dest) { - new (dest) Type(item); - return dest + SizeOf(item); - } -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SIMPLE_SERIALIZER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.cc deleted file mode 100644 index 76820e12..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// simple_symbol_supplier.cc: A simple SymbolSupplier implementation -// -// See simple_symbol_supplier.h for documentation. -// -// Author: Mark Mentovai - -#include "processor/simple_symbol_supplier.h" - -#include -#include -#include -#include - -#include -#include -#include - -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/logging.h" -#include "processor/pathname_stripper.h" - -namespace google_breakpad { - -static bool file_exists(const string &file_name) { - struct stat sb; - return stat(file_name.c_str(), &sb) == 0; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( - const CodeModule *module, const SystemInfo *system_info, - string *symbol_file) { - BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFile " - "requires |symbol_file|"; - assert(symbol_file); - symbol_file->clear(); - - for (unsigned int path_index = 0; path_index < paths_.size(); ++path_index) { - SymbolResult result; - if ((result = GetSymbolFileAtPathFromRoot(module, system_info, - paths_[path_index], - symbol_file)) != NOT_FOUND) { - return result; - } - } - return NOT_FOUND; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - assert(symbol_data); - symbol_data->clear(); - - SymbolSupplier::SymbolResult s = GetSymbolFile(module, system_info, symbol_file); - - if (s == FOUND) { - std::ifstream in(symbol_file->c_str()); - std::getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - return s; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetCStringSymbolData( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) { - assert(symbol_data); - - string symbol_data_string; - SymbolSupplier::SymbolResult s = - GetSymbolFile(module, system_info, symbol_file, &symbol_data_string); - - if (s == FOUND) { - unsigned int size = symbol_data_string.size() + 1; - *symbol_data = new char[size]; - if (*symbol_data == NULL) { - BPLOG(ERROR) << "Memory allocation for size " << size << " failed"; - return INTERRUPT; - } - memcpy(*symbol_data, symbol_data_string.c_str(), size - 1); - (*symbol_data)[size - 1] = '\0'; - memory_buffers_.insert(make_pair(module->code_file(), *symbol_data)); - } - return s; -} - -void SimpleSymbolSupplier::FreeSymbolData(const CodeModule *module) { - if (!module) { - BPLOG(INFO) << "Cannot free symbol data buffer for NULL module"; - return; - } - - map::iterator it = memory_buffers_.find(module->code_file()); - if (it == memory_buffers_.end()) { - BPLOG(INFO) << "Cannot find symbol data buffer for module " - << module->code_file(); - return; - } - delete [] it->second; - memory_buffers_.erase(it); -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPathFromRoot( - const CodeModule *module, const SystemInfo *system_info, - const string &root_path, string *symbol_file) { - BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFileAtPath " - "requires |symbol_file|"; - assert(symbol_file); - symbol_file->clear(); - - if (!module) - return NOT_FOUND; - - // Start with the base path. - string path = root_path; - - // Append the debug (pdb) file name as a directory name. - path.append("/"); - string debug_file_name = PathnameStripper::File(module->debug_file()); - if (debug_file_name.empty()) { - BPLOG(ERROR) << "Can't construct symbol file path without debug_file " - "(code_file = " << - PathnameStripper::File(module->code_file()) << ")"; - return NOT_FOUND; - } - path.append(debug_file_name); - - // Append the identifier as a directory name. - path.append("/"); - string identifier = module->debug_identifier(); - if (identifier.empty()) { - BPLOG(ERROR) << "Can't construct symbol file path without debug_identifier " - "(code_file = " << - PathnameStripper::File(module->code_file()) << - ", debug_file = " << debug_file_name << ")"; - return NOT_FOUND; - } - path.append(identifier); - - // Transform the debug file name into one ending in .sym. If the existing - // name ends in .pdb, strip the .pdb. Otherwise, add .sym to the non-.pdb - // name. - path.append("/"); - string debug_file_extension; - if (debug_file_name.size() > 4) - debug_file_extension = debug_file_name.substr(debug_file_name.size() - 4); - std::transform(debug_file_extension.begin(), debug_file_extension.end(), - debug_file_extension.begin(), tolower); - if (debug_file_extension == ".pdb") { - path.append(debug_file_name.substr(0, debug_file_name.size() - 4)); - } else { - path.append(debug_file_name); - } - path.append(".sym"); - - if (!file_exists(path)) { - BPLOG(INFO) << "No symbol file at " << path; - return NOT_FOUND; - } - - *symbol_file = path; - return FOUND; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.h deleted file mode 100644 index e1c16195..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/simple_symbol_supplier.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// simple_symbol_supplier.h: A simple SymbolSupplier implementation -// -// SimpleSymbolSupplier is a straightforward implementation of SymbolSupplier -// that stores symbol files in a filesystem tree. A SimpleSymbolSupplier is -// created with one or more base directories, which are the root paths for all -// symbol files. Each symbol file contained therein has a directory entry in -// the base directory with a name identical to the corresponding debugging -// file (pdb). Within each of these directories, there are subdirectories -// named for the debugging file's identifier. For recent pdb files, this is -// a concatenation of the pdb's uuid and age, presented in hexadecimal form, -// without any dashes or separators. The uuid is in uppercase hexadecimal -// and the age is in lowercase hexadecimal. Within that subdirectory, -// SimpleSymbolSupplier expects to find the symbol file, which is named -// identically to the debug file, but with a .sym extension. If the original -// debug file had a name ending in .pdb, the .pdb extension will be replaced -// with .sym. This sample hierarchy is rooted at the "symbols" base -// directory: -// -// symbols -// symbols/test_app.pdb -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1 -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym -// symbols/kernel32.pdb -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542 -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym -// -// In this case, the uuid of test_app.pdb is -// 63fe4780-728d-4937-9b9d-7bb6460cb42a and its age is 1. -// -// This scheme was chosen to be roughly analogous to the way that -// symbol files may be accessed from Microsoft Symbol Server. A hierarchy -// used for Microsoft Symbol Server storage is usable as a hierarchy for -// SimpleSymbolServer, provided that the pdb files are transformed to dumped -// format using a tool such as dump_syms, and given a .sym extension. -// -// SimpleSymbolSupplier will iterate over all root paths searching for -// a symbol file existing in that path. -// -// SimpleSymbolSupplier supports any debugging file which can be identified -// by a CodeModule object's debug_file and debug_identifier accessors. The -// expected ultimate source of these CodeModule objects are MinidumpModule -// objects; it is this class that is responsible for assigning appropriate -// values for debug_file and debug_identifier. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ -#define PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ - -#include -#include -#include - -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { - -using std::map; -using std::string; -using std::vector; - -class CodeModule; - -class SimpleSymbolSupplier : public SymbolSupplier { - public: - // Creates a new SimpleSymbolSupplier, using path as the root path where - // symbols are stored. - explicit SimpleSymbolSupplier(const string &path) : paths_(1, path) {} - - // Creates a new SimpleSymbolSupplier, using paths as a list of root - // paths where symbols may be stored. - explicit SimpleSymbolSupplier(const vector &paths) : paths_(paths) {} - - virtual ~SimpleSymbolSupplier() {} - - // Returns the path to the symbol file for the given module. See the - // description above. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - - // Allocates data buffer on heap and writes symbol data into buffer. - // Symbol supplier ALWAYS takes ownership of the data buffer. - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data); - - // Free the data buffer allocated in the above GetCStringSymbolData(); - virtual void FreeSymbolData(const CodeModule *module); - - protected: - SymbolResult GetSymbolFileAtPathFromRoot(const CodeModule *module, - const SystemInfo *system_info, - const string &root_path, - string *symbol_file); - - private: - map memory_buffers_; - vector paths_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_daemon.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_daemon.cc deleted file mode 100644 index f47b1f3f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_daemon.cc +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// source_daemon.cc: Listen for incoming UDP requests for source line -// info, load symbol files and respond with source info. -// -// Author: Ted Mielczarek - -#include -#include -#include - -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "processor/logging.h" -#include "processor/network_source_line_server.h" -#include "processor/scoped_ptr.h" -#include "processor/simple_symbol_supplier.h" - -using std::string; -using std::vector; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::NetworkSourceLineServer; -using google_breakpad::scoped_ptr; -using google_breakpad::SimpleSymbolSupplier; - -void usage(char *progname) { - printf("Usage: %s [-p port] [-a listen address] " - "[-m maximum symbol lines to keep in memory] " - "\n", progname); -} - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - unsigned short listen_port = 0; - char listen_address[1024] = ""; - u_int64_t max_symbol_lines = 0; - int arg; - while((arg = getopt(argc, argv, "p:a:m:")) != -1) { - switch(arg) { - case 'p': { - int port_arg = atoi(optarg); - if (port_arg > -1 && port_arg < 65535) { - listen_port = port_arg; - } else { - fprintf(stderr, "Invalid port number for -p!\n"); - usage(argv[0]); - return 1; - } - } - break; - case 'a': - strncpy(listen_address, optarg, sizeof(listen_address)); - break; - case 'm': - max_symbol_lines = atoll(optarg); - break; - case '?': - fprintf(stderr, "Option -%c requires an argument\n", (char)optopt); - usage(argv[0]); - break; - default: - fprintf(stderr, "Unknown option: -%c\n", (char)arg); - usage(argv[0]); - return 1; - } - } - - if (optind >= argc) { - usage(argv[0]); - return 1; - } - - vector symbol_paths; - for (int argi = optind; argi < argc; ++argi) - symbol_paths.push_back(argv[argi]); - - scoped_ptr symbol_supplier; - if (!symbol_paths.empty()) { - symbol_supplier.reset(new SimpleSymbolSupplier(symbol_paths)); - } - BasicSourceLineResolver resolver; - - NetworkSourceLineServer server(symbol_supplier.get(), &resolver, listen_port, - // default to IPv4 if no listen address - // is specified - listen_address[0] == '\0', - listen_address, - max_symbol_lines); - if (!server.Initialize()) { - BPLOG(ERROR) << "Failed to initialize server."; - return 1; - } - - server.RunForever(); - // not reached - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base.cc deleted file mode 100644 index b8362dcf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base.cc +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// source_line_resolver_base.cc: Implementation of SourceLineResolverBase. -// -// See source_line_resolver_base.h and source_line_resolver_base_types.h for -// more documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include -#include -#include - -#include -#include - -#include "google_breakpad/processor/source_line_resolver_base.h" -#include "processor/source_line_resolver_base_types.h" -#include "processor/module_factory.h" - -using std::map; -using std::make_pair; - -namespace google_breakpad { - -SourceLineResolverBase::SourceLineResolverBase( - ModuleFactory *module_factory) - : modules_(new ModuleMap), - memory_buffers_(new MemoryMap), - module_factory_(module_factory) { -} - -SourceLineResolverBase::~SourceLineResolverBase() { - ModuleMap::iterator it; - // Iterate through ModuleMap and delete all loaded modules. - for (it = modules_->begin(); it != modules_->end(); ++it) { - // Delete individual module. - delete it->second; - } - // Delete the map of modules. - delete modules_; - - MemoryMap::iterator iter = memory_buffers_->begin(); - for (; iter != memory_buffers_->end(); ++iter) { - delete [] iter->second; - } - // Delete the map of memory buffers. - delete memory_buffers_; - - delete module_factory_; -} - -bool SourceLineResolverBase::ReadSymbolFile(char **symbol_data, - const string &map_file) { - if (symbol_data == NULL) { - BPLOG(ERROR) << "Could not Read file into Null memory pointer"; - return false; - } - - struct stat buf; - int error_code = stat(map_file.c_str(), &buf); - if (error_code == -1) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not open " << map_file << - ", error " << error_code << ": " << error_string; - return false; - } - - off_t file_size = buf.st_size; - - // Allocate memory for file contents, plus a null terminator - // since we may use strtok() on the contents. - *symbol_data = new char[file_size + 1]; - - if (*symbol_data == NULL) { - BPLOG(ERROR) << "Could not allocate memory for " << map_file; - return false; - } - - BPLOG(INFO) << "Opening " << map_file; - - FILE *f = fopen(map_file.c_str(), "rt"); - if (!f) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not open " << map_file << - ", error " << error_code << ": " << error_string; - delete [] (*symbol_data); - *symbol_data = NULL; - return false; - } - - AutoFileCloser closer(f); - - int items_read = 0; - - items_read = fread(*symbol_data, 1, file_size, f); - - if (items_read != file_size) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not slurp " << map_file << - ", error " << error_code << ": " << error_string; - delete [] (*symbol_data); - *symbol_data = NULL; - return false; - } - - (*symbol_data)[file_size] = '\0'; - return true; -} - -bool SourceLineResolverBase::LoadModule(const CodeModule *module, - const string &map_file) { - if (module == NULL) - return false; - - // Make sure we don't already have a module with the given name. - if (modules_->find(module->code_file()) != modules_->end()) { - BPLOG(INFO) << "Symbols for module " << module->code_file() - << " already loaded"; - return false; - } - - BPLOG(INFO) << "Loading symbols for module " << module->code_file() - << " from " << map_file; - - char *memory_buffer; - if (!ReadSymbolFile(&memory_buffer, map_file)) - return false; - - BPLOG(INFO) << "Read symbol file " << map_file << " succeeded"; - - bool load_result = LoadModuleUsingMemoryBuffer(module, memory_buffer); - - if (load_result && !ShouldDeleteMemoryBufferAfterLoadModule()) { - // memory_buffer has to stay alive as long as the module. - memory_buffers_->insert(make_pair(module->code_file(), memory_buffer)); - } else { - delete [] memory_buffer; - } - - return load_result; -} - -bool SourceLineResolverBase::LoadModuleUsingMapBuffer( - const CodeModule *module, const string &map_buffer) { - if (module == NULL) - return false; - - // Make sure we don't already have a module with the given name. - if (modules_->find(module->code_file()) != modules_->end()) { - BPLOG(INFO) << "Symbols for module " << module->code_file() - << " already loaded"; - return false; - } - - char *memory_buffer = new char[map_buffer.size() + 1]; - if (memory_buffer == NULL) { - BPLOG(ERROR) << "Could not allocate memory for " << module->code_file(); - return false; - } - - // Can't use strcpy, as the data may contain '\0's before the end. - memcpy(memory_buffer, map_buffer.c_str(), map_buffer.size()); - memory_buffer[map_buffer.size()] = '\0'; - - bool load_result = LoadModuleUsingMemoryBuffer(module, memory_buffer); - - if (load_result && !ShouldDeleteMemoryBufferAfterLoadModule()) { - // memory_buffer has to stay alive as long as the module. - memory_buffers_->insert(make_pair(module->code_file(), memory_buffer)); - } else { - delete [] memory_buffer; - } - - return load_result; -} - -bool SourceLineResolverBase::LoadModuleUsingMemoryBuffer( - const CodeModule *module, char *memory_buffer) { - if (!module) - return false; - - // Make sure we don't already have a module with the given name. - if (modules_->find(module->code_file()) != modules_->end()) { - BPLOG(INFO) << "Symbols for module " << module->code_file() - << " already loaded"; - return false; - } - - BPLOG(INFO) << "Loading symbols for module " << module->code_file() - << " from memory buffer"; - - Module *basic_module = module_factory_->CreateModule(module->code_file()); - - // Ownership of memory is NOT transfered to Module::LoadMapFromMemory(). - if (!basic_module->LoadMapFromMemory(memory_buffer)) { - delete basic_module; - return false; - } - - modules_->insert(make_pair(module->code_file(), basic_module)); - return true; -} - -bool SourceLineResolverBase::ShouldDeleteMemoryBufferAfterLoadModule() { - return true; -} - -void SourceLineResolverBase::UnloadModule(const CodeModule *code_module) { - if (!code_module) - return; - - ModuleMap::iterator iter = modules_->find(code_module->code_file()); - if (iter != modules_->end()) { - Module *symbol_module = iter->second; - delete symbol_module; - modules_->erase(iter); - } - - if (ShouldDeleteMemoryBufferAfterLoadModule()) { - // No-op. Because we never store any memory buffers. - } else { - // There may be a buffer stored locally, we need to find and delete it. - MemoryMap::iterator iter = memory_buffers_->find(code_module->code_file()); - if (iter != memory_buffers_->end()) { - delete [] iter->second; - memory_buffers_->erase(iter); - } - } -} - -bool SourceLineResolverBase::HasModule(const CodeModule *module) { - if (!module) - return false; - return modules_->find(module->code_file()) != modules_->end(); -} - -void SourceLineResolverBase::FillSourceLineInfo(StackFrame *frame) { - if (frame->module) { - ModuleMap::const_iterator it = modules_->find(frame->module->code_file()); - if (it != modules_->end()) { - it->second->LookupAddress(frame); - } - } -} - -WindowsFrameInfo *SourceLineResolverBase::FindWindowsFrameInfo( - const StackFrame *frame) { - if (frame->module) { - ModuleMap::const_iterator it = modules_->find(frame->module->code_file()); - if (it != modules_->end()) { - return it->second->FindWindowsFrameInfo(frame); - } - } - return NULL; -} - -CFIFrameInfo *SourceLineResolverBase::FindCFIFrameInfo( - const StackFrame *frame) { - if (frame->module) { - ModuleMap::const_iterator it = modules_->find(frame->module->code_file()); - if (it != modules_->end()) { - return it->second->FindCFIFrameInfo(frame); - } - } - return NULL; -} - -bool SourceLineResolverBase::CompareString::operator()( - const string &s1, const string &s2) const { - return strcmp(s1.c_str(), s2.c_str()) < 0; -} - -bool SourceLineResolverBase::Module::ParseCFIRuleSet( - const string &rule_set, CFIFrameInfo *frame_info) const { - CFIFrameInfoParseHandler handler(frame_info); - CFIRuleParser parser(&handler); - return parser.Parse(rule_set); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base_types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base_types.h deleted file mode 100644 index 5b099f1a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/source_line_resolver_base_types.h +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// source_line_resolver_base_types.h: definition of nested classes/structs in -// SourceLineResolverBase. It moves the definitions out of -// source_line_resolver_base.cc, so that other classes may have access -// to these private nested types without including source_line_resolver_base.cc -// In addition, Module is defined as a pure abstract class to be implemented by -// each concrete source line resolver class. -// -// See source_line_resolver_base.h for more documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include - -#include -#include - -#include "google_breakpad/processor/source_line_resolver_base.h" -#include "google_breakpad/processor/stack_frame.h" -#include "processor/cfi_frame_info.h" -#include "processor/windows_frame_info.h" - -#ifndef PROCESSOR_SOURCE_LINE_RESOLVER_BASE_TYPES_H__ -#define PROCESSOR_SOURCE_LINE_RESOLVER_BASE_TYPES_H__ - -namespace google_breakpad { - -class SourceLineResolverBase::AutoFileCloser { - public: - explicit AutoFileCloser(FILE *file) : file_(file) {} - ~AutoFileCloser() { - if (file_) - fclose(file_); - } - - private: - FILE *file_; -}; - -struct SourceLineResolverBase::Line { - Line() { } - Line(MemAddr addr, MemAddr code_size, int file_id, int source_line) - : address(addr) - , size(code_size) - , source_file_id(file_id) - , line(source_line) { } - - MemAddr address; - MemAddr size; - int32_t source_file_id; - int32_t line; -}; - -struct SourceLineResolverBase::Function { - Function() { } - Function(const string &function_name, - MemAddr function_address, - MemAddr code_size, - int set_parameter_size) - : name(function_name), address(function_address), size(code_size), - parameter_size(set_parameter_size) { } - - string name; - MemAddr address; - MemAddr size; - - // The size of parameters passed to this function on the stack. - int32_t parameter_size; -}; - -struct SourceLineResolverBase::PublicSymbol { - PublicSymbol() { } - PublicSymbol(const string& set_name, - MemAddr set_address, - int set_parameter_size) - : name(set_name), - address(set_address), - parameter_size(set_parameter_size) {} - - string name; - MemAddr address; - - // If the public symbol is used as a function entry point, parameter_size - // is set to the size of the parameters passed to the funciton on the - // stack, if known. - int32_t parameter_size; -}; - -class SourceLineResolverBase::Module { - public: - virtual ~Module() { }; - // Loads a map from the given buffer in char* type. - // Does NOT take ownership of memory_buffer (the caller, source line resolver, - // is the owner of memory_buffer). - virtual bool LoadMapFromMemory(char *memory_buffer) = 0; - - // Looks up the given relative address, and fills the StackFrame struct - // with the result. - virtual void LookupAddress(StackFrame *frame) const = 0; - - // If Windows stack walking information is available covering ADDRESS, - // return a WindowsFrameInfo structure describing it. If the information - // is not available, returns NULL. A NULL return value does not indicate - // an error. The caller takes ownership of any returned WindowsFrameInfo - // object. - virtual WindowsFrameInfo * - FindWindowsFrameInfo(const StackFrame *frame) const = 0; - - // If CFI stack walking information is available covering ADDRESS, - // return a CFIFrameInfo structure describing it. If the information - // is not available, return NULL. The caller takes ownership of any - // returned CFIFrameInfo object. - virtual CFIFrameInfo *FindCFIFrameInfo(const StackFrame *frame) const = 0; - protected: - virtual bool ParseCFIRuleSet(const string &rule_set, - CFIFrameInfo *frame_info) const; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SOURCE_LINE_RESOLVER_BASE_TYPES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker.cc deleted file mode 100644 index 9ddb60ae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker.cc +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker.cc: Generic stackwalker. -// -// See stackwalker.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/stackwalker.h" - -#include - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_ppc.h" -#include "processor/stackwalker_sparc.h" -#include "processor/stackwalker_x86.h" -#include "processor/stackwalker_amd64.h" -#include "processor/stackwalker_arm.h" - -namespace google_breakpad { - -u_int32_t Stackwalker::max_frames_ = 1024; - -Stackwalker::Stackwalker(const SystemInfo *system_info, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : system_info_(system_info), - memory_(memory), - modules_(modules), - resolver_(resolver), - supplier_(supplier) { -} - - -bool Stackwalker::Walk(CallStack *stack) { - BPLOG_IF(ERROR, !stack) << "Stackwalker::Walk requires |stack|"; - assert(stack); - stack->Clear(); - - // Begin with the context frame, and keep getting callers until there are - // no more. - - // Take ownership of the pointer returned by GetContextFrame. - scoped_ptr frame(GetContextFrame()); - - while (frame.get()) { - // frame already contains a good frame with properly set instruction and - // frame_pointer fields. The frame structure comes from either the - // context frame (above) or a caller frame (below). - - // Resolve the module information, if a module map was provided. - if (modules_) { - const CodeModule *module = - modules_->GetModuleForAddress(frame->instruction); - if (module) { - frame->module = module; - if (resolver_ && - !resolver_->HasModule(frame->module) && - no_symbol_modules_.find( - module->code_file()) == no_symbol_modules_.end() && - supplier_) { - string symbol_file; - char *symbol_data = NULL; - SymbolSupplier::SymbolResult symbol_result = - supplier_->GetCStringSymbolData(module, - system_info_, - &symbol_file, - &symbol_data); - - switch (symbol_result) { - case SymbolSupplier::FOUND: - resolver_->LoadModuleUsingMemoryBuffer(frame->module, - symbol_data); - break; - case SymbolSupplier::NOT_FOUND: - no_symbol_modules_.insert(module->code_file()); - break; // nothing to do - case SymbolSupplier::INTERRUPT: - return false; - } - // Inform symbol supplier to free the unused data memory buffer. - if (resolver_->ShouldDeleteMemoryBufferAfterLoadModule()) - supplier_->FreeSymbolData(module); - } - if (resolver_) - resolver_->FillSourceLineInfo(frame.get()); - } - } - - // Add the frame to the call stack. Relinquish the ownership claim - // over the frame, because the stack now owns it. - stack->frames_.push_back(frame.release()); - if (stack->frames_.size() > max_frames_) { - BPLOG(ERROR) << "The stack is over " << max_frames_ << " frames."; - break; - } - - // Get the next frame and take ownership. - frame.reset(GetCallerFrame(stack)); - } - - return true; -} - - -// static -Stackwalker* Stackwalker::StackwalkerForCPU( - const SystemInfo *system_info, - MinidumpContext *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) { - if (!context) { - BPLOG(ERROR) << "Can't choose a stackwalker implementation without context"; - return NULL; - } - - Stackwalker *cpu_stackwalker = NULL; - - u_int32_t cpu = context->GetContextCPU(); - switch (cpu) { - case MD_CONTEXT_X86: - cpu_stackwalker = new StackwalkerX86(system_info, - context->GetContextX86(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_PPC: - cpu_stackwalker = new StackwalkerPPC(system_info, - context->GetContextPPC(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_AMD64: - cpu_stackwalker = new StackwalkerAMD64(system_info, - context->GetContextAMD64(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_SPARC: - cpu_stackwalker = new StackwalkerSPARC(system_info, - context->GetContextSPARC(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_ARM: - cpu_stackwalker = new StackwalkerARM(system_info, - context->GetContextARM(), - memory, modules, supplier, - resolver); - break; - } - - BPLOG_IF(ERROR, !cpu_stackwalker) << "Unknown CPU type " << HexString(cpu) << - ", can't choose a stackwalker " - "implementation"; - return cpu_stackwalker; -} - -bool Stackwalker::InstructionAddressSeemsValid(u_int64_t address) { - const CodeModule *module = modules_->GetModuleForAddress(address); - if (!module) { - // not inside any loaded module - return false; - } - - if (!resolver_ || !supplier_) { - // we don't have a resolver and or symbol supplier, - // but we're inside a known module - return true; - } - - if (!resolver_->HasModule(module)) { - string symbol_file; - char *symbol_data = NULL; - SymbolSupplier::SymbolResult symbol_result = - supplier_->GetCStringSymbolData(module, system_info_, - &symbol_file, &symbol_data); - - if (symbol_result != SymbolSupplier::FOUND || - !resolver_->LoadModuleUsingMemoryBuffer(module, - symbol_data)) { - // we don't have symbols, but we're inside a loaded module - return true; - } - } - - StackFrame frame; - frame.module = module; - frame.instruction = address; - resolver_->FillSourceLineInfo(&frame); - // we have symbols, so return true if inside a function - return !frame.function_name.empty(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.cc deleted file mode 100644 index fd9ccdf3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.cc +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_amd64.cc: amd64-specific stackwalker. -// -// See stackwalker_amd64.h for documentation. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/cfi_frame_info.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_amd64.h" - -namespace google_breakpad { - - -const StackwalkerAMD64::CFIWalker::RegisterSet -StackwalkerAMD64::cfi_register_map_[] = { - // It may seem like $rip and $rsp are callee-saves, because the callee is - // responsible for having them restored upon return. But the callee_saves - // flags here really means that the walker should assume they're - // unchanged if the CFI doesn't mention them --- clearly wrong for $rip - // and $rsp. - { "$rax", NULL, false, - StackFrameAMD64::CONTEXT_VALID_RAX, &MDRawContextAMD64::rax }, - { "$rdx", NULL, false, - StackFrameAMD64::CONTEXT_VALID_RDX, &MDRawContextAMD64::rdx }, - { "$rcx", NULL, false, - StackFrameAMD64::CONTEXT_VALID_RCX, &MDRawContextAMD64::rcx }, - { "$rbx", NULL, true, - StackFrameAMD64::CONTEXT_VALID_RBX, &MDRawContextAMD64::rbx }, - { "$rsi", NULL, false, - StackFrameAMD64::CONTEXT_VALID_RSI, &MDRawContextAMD64::rsi }, - { "$rdi", NULL, false, - StackFrameAMD64::CONTEXT_VALID_RDI, &MDRawContextAMD64::rdi }, - { "$rbp", NULL, true, - StackFrameAMD64::CONTEXT_VALID_RBP, &MDRawContextAMD64::rbp }, - { "$rsp", ".cfa", false, - StackFrameAMD64::CONTEXT_VALID_RSP, &MDRawContextAMD64::rsp }, - { "$r8", NULL, false, - StackFrameAMD64::CONTEXT_VALID_R8, &MDRawContextAMD64::r8 }, - { "$r9", NULL, false, - StackFrameAMD64::CONTEXT_VALID_R9, &MDRawContextAMD64::r9 }, - { "$r10", NULL, false, - StackFrameAMD64::CONTEXT_VALID_R10, &MDRawContextAMD64::r10 }, - { "$r11", NULL, false, - StackFrameAMD64::CONTEXT_VALID_R11, &MDRawContextAMD64::r11 }, - { "$r12", NULL, true, - StackFrameAMD64::CONTEXT_VALID_R12, &MDRawContextAMD64::r12 }, - { "$r13", NULL, true, - StackFrameAMD64::CONTEXT_VALID_R13, &MDRawContextAMD64::r13 }, - { "$r14", NULL, true, - StackFrameAMD64::CONTEXT_VALID_R14, &MDRawContextAMD64::r14 }, - { "$r15", NULL, true, - StackFrameAMD64::CONTEXT_VALID_R15, &MDRawContextAMD64::r15 }, - { "$rip", ".ra", false, - StackFrameAMD64::CONTEXT_VALID_RIP, &MDRawContextAMD64::rip }, -}; - -StackwalkerAMD64::StackwalkerAMD64(const SystemInfo *system_info, - const MDRawContextAMD64 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context), - cfi_walker_(cfi_register_map_, - (sizeof(cfi_register_map_) / sizeof(cfi_register_map_[0]))) { -} - - -StackFrame* StackwalkerAMD64::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameAMD64 *frame = new StackFrameAMD64(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameAMD64::CONTEXT_VALID_ALL; - frame->trust = StackFrame::FRAME_TRUST_CONTEXT; - frame->instruction = frame->context.rip; - - return frame; -} - -StackFrameAMD64 *StackwalkerAMD64::GetCallerByCFIFrameInfo( - const vector &frames, - CFIFrameInfo *cfi_frame_info) { - StackFrameAMD64 *last_frame = static_cast(frames.back()); - - scoped_ptr frame(new StackFrameAMD64()); - if (!cfi_walker_ - .FindCallerRegisters(*memory_, *cfi_frame_info, - last_frame->context, last_frame->context_validity, - &frame->context, &frame->context_validity)) - return NULL; - - // Make sure we recovered all the essentials. - static const int essentials = (StackFrameAMD64::CONTEXT_VALID_RIP - | StackFrameAMD64::CONTEXT_VALID_RSP); - if ((frame->context_validity & essentials) != essentials) - return NULL; - - frame->trust = StackFrame::FRAME_TRUST_CFI; - return frame.release(); -} - -StackFrameAMD64 *StackwalkerAMD64::GetCallerByStackScan( - const vector &frames) { - StackFrameAMD64 *last_frame = static_cast(frames.back()); - u_int64_t last_rsp = last_frame->context.rsp; - u_int64_t caller_rsp, caller_rip; - - if (!ScanForReturnAddress(last_rsp, &caller_rsp, &caller_rip)) { - // No plausible return address was found. - return NULL; - } - - // ScanForReturnAddress found a reasonable return address. Advance - // %rsp to the location above the one where the return address was - // found. - caller_rsp += 8; - - // Create a new stack frame (ownership will be transferred to the caller) - // and fill it in. - StackFrameAMD64 *frame = new StackFrameAMD64(); - - frame->trust = StackFrame::FRAME_TRUST_SCAN; - frame->context = last_frame->context; - frame->context.rip = caller_rip; - frame->context.rsp = caller_rsp; - frame->context_validity = StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP; - - return frame; -} - -StackFrame* StackwalkerAMD64::GetCallerFrame(const CallStack *stack) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - const vector &frames = *stack->frames(); - StackFrameAMD64 *last_frame = static_cast(frames.back()); - scoped_ptr new_frame; - - // If we have DWARF CFI information, use it. - scoped_ptr cfi_frame_info( - resolver_ ? resolver_->FindCFIFrameInfo(last_frame) : NULL); - if (cfi_frame_info.get()) - new_frame.reset(GetCallerByCFIFrameInfo(frames, cfi_frame_info.get())); - - // If CFI failed, or there wasn't CFI available, fall back - // to stack scanning. - if (!new_frame.get()) { - new_frame.reset(GetCallerByStackScan(frames)); - } - - // If nothing worked, tell the caller. - if (!new_frame.get()) - return NULL; - - // Treat an instruction address of 0 as end-of-stack. - if (new_frame->context.rip == 0) - return NULL; - - // If the new stack pointer is at a lower address than the old, then - // that's clearly incorrect. Treat this as end-of-stack to enforce - // progress and avoid infinite loops. - if (new_frame->context.rsp <= last_frame->context.rsp) - return NULL; - - // new_frame->context.rip is the return address, which is one instruction - // past the CALL that caused us to arrive at the callee. Set - // new_frame->instruction to one less than that. This won't reference the - // beginning of the CALL instruction, but it's guaranteed to be within - // the CALL, which is sufficient to get the source line information to - // match up with the line that contains a function call. Callers that - // require the exact return address value may access the context.rip - // field of StackFrameAMD64. - new_frame->instruction = new_frame->context.rip - 1; - - return new_frame.release(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.h deleted file mode 100644 index cde95208..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_amd64.h: amd64-specific stackwalker. -// -// Provides stack frames given amd64 register context and a memory region -// corresponding to a amd64 stack. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#ifndef PROCESSOR_STACKWALKER_AMD64_H__ -#define PROCESSOR_STACKWALKER_AMD64_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/cfi_frame_info.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerAMD64 : public Stackwalker { - public: - // context is a amd64 context object that gives access to amd64-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerAMD64(const SystemInfo *system_info, - const MDRawContextAMD64 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // A STACK CFI-driven frame walker for the AMD64 - typedef SimpleCFIWalker CFIWalker; - - // Implementation of Stackwalker, using amd64 context (stack pointer in %rsp, - // stack base in %rbp) and stack conventions (saved stack pointer at 0(%rbp)) - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame(const CallStack *stack); - - // Use cfi_frame_info (derived from STACK CFI records) to construct - // the frame that called frames.back(). The caller takes ownership - // of the returned frame. Return NULL on failure. - StackFrameAMD64 *GetCallerByCFIFrameInfo(const vector &frames, - CFIFrameInfo *cfi_frame_info); - - // Scan the stack for plausible return addresses. The caller takes ownership - // of the returned frame. Return NULL on failure. - StackFrameAMD64 *GetCallerByStackScan(const vector &frames); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextAMD64 *context_; - - // Our register map, for cfi_walker_. - static const CFIWalker::RegisterSet cfi_register_map_[]; - - // Our CFI frame walker. - const CFIWalker cfi_walker_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_AMD64_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64_unittest.cc deleted file mode 100644 index 0cb5fd57..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_amd64_unittest.cc +++ /dev/null @@ -1,484 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// stackwalker_amd64_unittest.cc: Unit tests for StackwalkerAMD64 class. - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/test_assembler.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/stackwalker_unittest_utils.h" -#include "processor/stackwalker_amd64.h" - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::StackFrame; -using google_breakpad::StackFrameAMD64; -using google_breakpad::StackwalkerAMD64; -using google_breakpad::SystemInfo; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using std::string; -using std::vector; -using testing::_; -using testing::Return; -using testing::SetArgumentPointee; -using testing::Test; - -class StackwalkerAMD64Fixture { - public: - StackwalkerAMD64Fixture() - : stack_section(kLittleEndian), - // Give the two modules reasonable standard locations and names - // for tests to play with. - module1(0x40000000c0000000ULL, 0x10000, "module1", "version1"), - module2(0x50000000b0000000ULL, 0x10000, "module2", "version2") { - // Identify the system as a Linux system. - system_info.os = "Linux"; - system_info.os_short = "linux"; - system_info.os_version = "Horrendous Hippo"; - system_info.cpu = "x86"; - system_info.cpu_info = ""; - - // Put distinctive values in the raw CPU context. - BrandContext(&raw_context); - - // Create some modules with some stock debugging information. - modules.Add(&module1); - modules.Add(&module2); - - // By default, none of the modules have symbol info; call - // SetModuleSymbols to override this. - EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _)) - .WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND)); - } - - // Set the Breakpad symbol information that supplier should return for - // MODULE to INFO. - void SetModuleSymbols(MockCodeModule *module, const string &info) { - unsigned int buffer_size = info.size() + 1; - char *buffer = reinterpret_cast(operator new(buffer_size)); - strcpy(buffer, info.c_str()); - EXPECT_CALL(supplier, GetCStringSymbolData(module, &system_info, _, _)) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(buffer), - Return(MockSymbolSupplier::FOUND))); - } - - // Populate stack_region with the contents of stack_section. Use - // stack_section.start() as the region's starting address. - void RegionFromSection() { - string contents; - ASSERT_TRUE(stack_section.GetContents(&contents)); - stack_region.Init(stack_section.start().Value(), contents); - } - - // Fill RAW_CONTEXT with pseudo-random data, for round-trip checking. - void BrandContext(MDRawContextAMD64 *raw_context) { - u_int8_t x = 173; - for (size_t i = 0; i < sizeof(*raw_context); i++) - reinterpret_cast(raw_context)[i] = (x += 17); - } - - SystemInfo system_info; - MDRawContextAMD64 raw_context; - Section stack_section; - MockMemoryRegion stack_region; - MockCodeModule module1; - MockCodeModule module2; - MockCodeModules modules; - MockSymbolSupplier supplier; - BasicSourceLineResolver resolver; - CallStack call_stack; - const vector *frames; -}; - -class GetContextFrame: public StackwalkerAMD64Fixture, public Test { }; - -class SanityCheck: public StackwalkerAMD64Fixture, public Test { }; - -TEST_F(SanityCheck, NoResolver) { - // There should be no references to the stack in this walk: we don't - // provide any call frame information, so trying to reconstruct the - // context frame's caller should fail. So there's no need for us to - // provide stack contents. - raw_context.rip = 0x40000000c0000200ULL; - raw_context.rbp = 0x8000000080000000ULL; - - StackwalkerAMD64 walker(&system_info, &raw_context, &stack_region, &modules, - NULL, NULL); - // This should succeed even without a resolver or supplier. - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_GE(1U, frames->size()); - StackFrameAMD64 *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -TEST_F(GetContextFrame, Simple) { - // There should be no references to the stack in this walk: we don't - // provide any call frame information, so trying to reconstruct the - // context frame's caller should fail. So there's no need for us to - // provide stack contents. - raw_context.rip = 0x40000000c0000200ULL; - raw_context.rbp = 0x8000000080000000ULL; - - StackwalkerAMD64 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_GE(1U, frames->size()); - StackFrameAMD64 *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -class GetCallerFrame: public StackwalkerAMD64Fixture, public Test { }; - -TEST_F(GetCallerFrame, ScanWithoutSymbols) { - // When the stack walker resorts to scanning the stack, - // only addresses located within loaded modules are - // considered valid return addresses. - // Force scanning through three frames to ensure that the - // stack pointer is set properly in scan-recovered frames. - stack_section.start() = 0x8000000080000000ULL; - u_int64_t return_address1 = 0x50000000b0000100ULL; - u_int64_t return_address2 = 0x50000000b0000900ULL; - Label frame1_sp, frame2_sp; - stack_section - // frame 0 - .Append(16, 0) // space - - .D64(0x40000000b0000000ULL) // junk that's not - .D64(0x50000000d0000000ULL) // a return address - - .D64(return_address1) // actual return address - // frame 1 - .Mark(&frame1_sp) - .Append(16, 0) // space - - .D64(0x40000000b0000000ULL) // more junk - .D64(0x50000000d0000000ULL) - - .D64(return_address2) // actual return address - // frame 2 - .Mark(&frame2_sp) - .Append(32, 0); // end of stack - - RegionFromSection(); - - raw_context.rip = 0x40000000c0000200ULL; - raw_context.rsp = stack_section.start().Value(); - - StackwalkerAMD64 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(3U, frames->size()); - - StackFrameAMD64 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameAMD64::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0, memcmp(&raw_context, &frame0->context, sizeof(raw_context))); - - StackFrameAMD64 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - ASSERT_EQ((StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP), - frame1->context_validity); - EXPECT_EQ(return_address1, frame1->context.rip); - EXPECT_EQ(frame1_sp.Value(), frame1->context.rsp); - - StackFrameAMD64 *frame2 = static_cast(frames->at(2)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame2->trust); - ASSERT_EQ((StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP), - frame2->context_validity); - EXPECT_EQ(return_address2, frame2->context.rip); - EXPECT_EQ(frame2_sp.Value(), frame2->context.rsp); -} - -TEST_F(GetCallerFrame, ScanWithFunctionSymbols) { - // During stack scanning, if a potential return address - // is located within a loaded module that has symbols, - // it is only considered a valid return address if it - // lies within a function's bounds. - stack_section.start() = 0x8000000080000000ULL; - u_int64_t return_address = 0x50000000b0000110ULL; - Label frame1_sp; - - stack_section - // frame 0 - .Append(16, 0) // space - - .D64(0x40000000b0000000ULL) // junk that's not - .D64(0x50000000b0000000ULL) // a return address - - .D64(0x40000000c0001000ULL) // a couple of plausible addresses - .D64(0x50000000b000aaaaULL) // that are not within functions - - .D64(return_address) // actual return address - // frame 1 - .Mark(&frame1_sp) - .Append(32, 0); // end of stack - RegionFromSection(); - - raw_context.rip = 0x40000000c0000200ULL; - raw_context.rsp = stack_section.start().Value(); - - SetModuleSymbols(&module1, - // The youngest frame's function. - "FUNC 100 400 10 platypus\n"); - SetModuleSymbols(&module2, - // The calling frame's function. - "FUNC 100 400 10 echidna\n"); - - StackwalkerAMD64 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameAMD64 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameAMD64::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ("platypus", frame0->function_name); - EXPECT_EQ(0x40000000c0000100ULL, frame0->function_base); - - StackFrameAMD64 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - ASSERT_EQ((StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP), - frame1->context_validity); - EXPECT_EQ(return_address, frame1->context.rip); - EXPECT_EQ(frame1_sp.Value(), frame1->context.rsp); - EXPECT_EQ("echidna", frame1->function_name); - EXPECT_EQ(0x50000000b0000100ULL, frame1->function_base); -} - -struct CFIFixture: public StackwalkerAMD64Fixture { - CFIFixture() { - // Provide a bunch of STACK CFI records; we'll walk to the caller - // from every point in this series, expecting to find the same set - // of register values. - SetModuleSymbols(&module1, - // The youngest frame's function. - "FUNC 4000 1000 10 enchiridion\n" - // Initially, just a return address. - "STACK CFI INIT 4000 100 .cfa: $rsp 8 + .ra: .cfa 8 - ^\n" - // Push %rbx. - "STACK CFI 4001 .cfa: $rsp 16 + $rbx: .cfa 16 - ^\n" - // Save %r12 in %rbx. Weird, but permitted. - "STACK CFI 4002 $r12: $rbx\n" - // Allocate frame space, and save %r13. - "STACK CFI 4003 .cfa: $rsp 40 + $r13: .cfa 32 - ^\n" - // Put the return address in %r13. - "STACK CFI 4005 .ra: $r13\n" - // Save %rbp, and use it as a frame pointer. - "STACK CFI 4006 .cfa: $rbp 16 + $rbp: .cfa 24 - ^\n" - - // The calling function. - "FUNC 5000 1000 10 epictetus\n" - // Mark it as end of stack. - "STACK CFI INIT 5000 1000 .cfa: $rsp .ra 0\n"); - - // Provide some distinctive values for the caller's registers. - expected.rsp = 0x8000000080000000ULL; - expected.rip = 0x40000000c0005510ULL; - expected.rbp = 0x68995b1de4700266ULL; - expected.rbx = 0x5a5beeb38de23be8ULL; - expected.r12 = 0xed1b02e8cc0fc79cULL; - expected.r13 = 0x1d20ad8acacbe930ULL; - expected.r14 = 0xe94cffc2f7adaa28ULL; - expected.r15 = 0xb638d17d8da413b5ULL; - - // By default, registers are unchanged. - raw_context = expected; - } - - // Walk the stack, using stack_section as the contents of the stack - // and raw_context as the current register values. (Set - // raw_context.rsp to the stack's starting address.) Expect two - // stack frames; in the older frame, expect the callee-saves - // registers to have values matching those in 'expected'. - void CheckWalk() { - RegionFromSection(); - raw_context.rsp = stack_section.start().Value(); - - StackwalkerAMD64 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameAMD64 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameAMD64::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ("enchiridion", frame0->function_name); - EXPECT_EQ(0x40000000c0004000ULL, frame0->function_base); - - StackFrameAMD64 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ((StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP | - StackFrameAMD64::CONTEXT_VALID_RBP | - StackFrameAMD64::CONTEXT_VALID_RBX | - StackFrameAMD64::CONTEXT_VALID_R12 | - StackFrameAMD64::CONTEXT_VALID_R13 | - StackFrameAMD64::CONTEXT_VALID_R14 | - StackFrameAMD64::CONTEXT_VALID_R15), - frame1->context_validity); - EXPECT_EQ(expected.rip, frame1->context.rip); - EXPECT_EQ(expected.rsp, frame1->context.rsp); - EXPECT_EQ(expected.rbp, frame1->context.rbp); - EXPECT_EQ(expected.rbx, frame1->context.rbx); - EXPECT_EQ(expected.r12, frame1->context.r12); - EXPECT_EQ(expected.r13, frame1->context.r13); - EXPECT_EQ(expected.r14, frame1->context.r14); - EXPECT_EQ(expected.r15, frame1->context.r15); - EXPECT_EQ("epictetus", frame1->function_name); - } - - // The values we expect to find for the caller's registers. - MDRawContextAMD64 expected; -}; - -class CFI: public CFIFixture, public Test { }; - -TEST_F(CFI, At4000) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x40000000c0005510ULL) // return address - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004000ULL; - CheckWalk(); -} - -TEST_F(CFI, At4001) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0x40000000c0005510ULL) // return address - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004001ULL; - raw_context.rbx = 0xbe0487d2f9eafe29ULL; // callee's (distinct) %rbx value - CheckWalk(); -} - -TEST_F(CFI, At4002) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0x40000000c0005510ULL) // return address - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004002ULL; - raw_context.rbx = 0xed1b02e8cc0fc79cULL; // saved %r12 - raw_context.r12 = 0xb0118de918a4bceaULL; // callee's (distinct) %r12 value - CheckWalk(); -} - -TEST_F(CFI, At4003) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x0e023828dffd4d81ULL) // garbage - .D64(0x1d20ad8acacbe930ULL) // saved %r13 - .D64(0x319e68b49e3ace0fULL) // garbage - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0x40000000c0005510ULL) // return address - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004003ULL; - raw_context.rbx = 0xed1b02e8cc0fc79cULL; // saved %r12 - raw_context.r12 = 0x89d04fa804c87a43ULL; // callee's (distinct) %r12 - raw_context.r13 = 0x5118e02cbdb24b03ULL; // callee's (distinct) %r13 - CheckWalk(); -} - -// The results here should be the same as those at module offset 0x4003. -TEST_F(CFI, At4004) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x0e023828dffd4d81ULL) // garbage - .D64(0x1d20ad8acacbe930ULL) // saved %r13 - .D64(0x319e68b49e3ace0fULL) // garbage - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0x40000000c0005510ULL) // return address - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004004ULL; - raw_context.rbx = 0xed1b02e8cc0fc79cULL; // saved %r12 - raw_context.r12 = 0x89d04fa804c87a43ULL; // callee's (distinct) %r12 - raw_context.r13 = 0x5118e02cbdb24b03ULL; // callee's (distinct) %r13 - CheckWalk(); -} - -TEST_F(CFI, At4005) { - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x4b516dd035745953ULL) // garbage - .D64(0x1d20ad8acacbe930ULL) // saved %r13 - .D64(0xa6d445e16ae3d872ULL) // garbage - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0xaa95fa054aedfbaeULL) // garbage - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004005ULL; - raw_context.rbx = 0xed1b02e8cc0fc79cULL; // saved %r12 - raw_context.r12 = 0x46b1b8868891b34aULL; // callee's %r12 - raw_context.r13 = 0x40000000c0005510ULL; // return address - CheckWalk(); -} - -TEST_F(CFI, At4006) { - Label frame0_rbp; - Label frame1_rsp = expected.rsp; - stack_section - .D64(0x043c6dfceb91aa34ULL) // garbage - .D64(0x1d20ad8acacbe930ULL) // saved %r13 - .D64(0x68995b1de4700266ULL) // saved %rbp - .Mark(&frame0_rbp) // frame pointer points here - .D64(0x5a5beeb38de23be8ULL) // saved %rbx - .D64(0xf015ee516ad89eabULL) // garbage - .Mark(&frame1_rsp); // This effectively sets stack_section.start(). - raw_context.rip = 0x40000000c0004006ULL; - raw_context.rbp = frame0_rbp.Value(); - raw_context.rbx = 0xed1b02e8cc0fc79cULL; // saved %r12 - raw_context.r12 = 0x26e007b341acfebdULL; // callee's %r12 - raw_context.r13 = 0x40000000c0005510ULL; // return address - CheckWalk(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.cc deleted file mode 100644 index 3b91caff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.cc +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_arm.cc: arm-specific stackwalker. -// -// See stackwalker_arm.h for documentation. -// -// Author: Mark Mentovai, Ted Mielczarek, Jim Blandy - - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/cfi_frame_info.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_arm.h" - -namespace google_breakpad { - - -StackwalkerARM::StackwalkerARM(const SystemInfo *system_info, - const MDRawContextARM *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context), - context_frame_validity_(StackFrameARM::CONTEXT_VALID_ALL) { } - - -StackFrame* StackwalkerARM::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameARM *frame = new StackFrameARM(); - - // The instruction pointer is stored directly in a register (r15), so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = context_frame_validity_; - frame->trust = StackFrame::FRAME_TRUST_CONTEXT; - frame->instruction = frame->context.iregs[15]; - - return frame; -} - -StackFrameARM *StackwalkerARM::GetCallerByCFIFrameInfo( - const vector &frames, - CFIFrameInfo *cfi_frame_info) { - StackFrameARM *last_frame = static_cast(frames.back()); - - static const char *register_names[] = { - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc", - "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", - "fps", "cpsr", - NULL - }; - - // Populate a dictionary with the valid register values in last_frame. - CFIFrameInfo::RegisterValueMap callee_registers; - for (int i = 0; register_names[i]; i++) - if (last_frame->context_validity & StackFrameARM::RegisterValidFlag(i)) - callee_registers[register_names[i]] = last_frame->context.iregs[i]; - - // Use the STACK CFI data to recover the caller's register values. - CFIFrameInfo::RegisterValueMap caller_registers; - if (!cfi_frame_info->FindCallerRegs(callee_registers, *memory_, - &caller_registers)) - return NULL; - - // Construct a new stack frame given the values the CFI recovered. - scoped_ptr frame(new StackFrameARM()); - for (int i = 0; register_names[i]; i++) { - CFIFrameInfo::RegisterValueMap::iterator entry = - caller_registers.find(register_names[i]); - if (entry != caller_registers.end()) { - // We recovered the value of this register; fill the context with the - // value from caller_registers. - frame->context_validity |= StackFrameARM::RegisterValidFlag(i); - frame->context.iregs[i] = entry->second; - } else if (4 <= i && i <= 11 && (last_frame->context_validity & - StackFrameARM::RegisterValidFlag(i))) { - // If the STACK CFI data doesn't mention some callee-saves register, and - // it is valid in the callee, assume the callee has not yet changed it. - // Registers r4 through r11 are callee-saves, according to the Procedure - // Call Standard for the ARM Architecture, which the Linux ABI follows. - frame->context_validity |= StackFrameARM::RegisterValidFlag(i); - frame->context.iregs[i] = last_frame->context.iregs[i]; - } - } - // If the CFI doesn't recover the PC explicitly, then use .ra. - if (! (frame->context_validity & StackFrameARM::CONTEXT_VALID_PC)) { - CFIFrameInfo::RegisterValueMap::iterator entry = - caller_registers.find(".ra"); - if (entry != caller_registers.end()) { - frame->context_validity |= StackFrameARM::CONTEXT_VALID_PC; - frame->context.iregs[MD_CONTEXT_ARM_REG_PC] = entry->second; - } - } - // If the CFI doesn't recover the SP explicitly, then use .cfa. - if (! (frame->context_validity & StackFrameARM::CONTEXT_VALID_SP)) { - CFIFrameInfo::RegisterValueMap::iterator entry = - caller_registers.find(".cfa"); - if (entry != caller_registers.end()) { - frame->context_validity |= StackFrameARM::CONTEXT_VALID_SP; - frame->context.iregs[MD_CONTEXT_ARM_REG_SP] = entry->second; - } - } - - // If we didn't recover the PC and the SP, then the frame isn't very useful. - static const int essentials = (StackFrameARM::CONTEXT_VALID_SP - | StackFrameARM::CONTEXT_VALID_PC); - if ((frame->context_validity & essentials) != essentials) - return NULL; - - frame->trust = StackFrame::FRAME_TRUST_CFI; - return frame.release(); -} - -StackFrameARM *StackwalkerARM::GetCallerByStackScan( - const vector &frames) { - StackFrameARM *last_frame = static_cast(frames.back()); - u_int32_t last_sp = last_frame->context.iregs[MD_CONTEXT_ARM_REG_SP]; - u_int32_t caller_sp, caller_pc; - - if (!ScanForReturnAddress(last_sp, &caller_sp, &caller_pc)) { - // No plausible return address was found. - return NULL; - } - - // ScanForReturnAddress found a reasonable return address. Advance - // %sp to the location above the one where the return address was - // found. - caller_sp += 4; - - // Create a new stack frame (ownership will be transferred to the caller) - // and fill it in. - StackFrameARM *frame = new StackFrameARM(); - - frame->trust = StackFrame::FRAME_TRUST_SCAN; - frame->context = last_frame->context; - frame->context.iregs[MD_CONTEXT_ARM_REG_PC] = caller_pc; - frame->context.iregs[MD_CONTEXT_ARM_REG_SP] = caller_sp; - frame->context_validity = StackFrameARM::CONTEXT_VALID_PC | - StackFrameARM::CONTEXT_VALID_SP; - - return frame; -} - -StackFrame* StackwalkerARM::GetCallerFrame(const CallStack *stack) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - const vector &frames = *stack->frames(); - StackFrameARM *last_frame = static_cast(frames.back()); - scoped_ptr frame; - - // See if there is DWARF call frame information covering this address. - scoped_ptr cfi_frame_info( - resolver_ ? resolver_->FindCFIFrameInfo(last_frame) : NULL); - if (cfi_frame_info.get()) - frame.reset(GetCallerByCFIFrameInfo(frames, cfi_frame_info.get())); - - // If CFI failed, or there wasn't CFI available, fall back - // to stack scanning. - if (!frame.get()) { - frame.reset(GetCallerByStackScan(frames)); - } - - // If nothing worked, tell the caller. - if (!frame.get()) - return NULL; - - - // An instruction address of zero marks the end of the stack. - if (frame->context.iregs[MD_CONTEXT_ARM_REG_PC] == 0) - return NULL; - - // If the new stack pointer is at a lower address than the old, then - // that's clearly incorrect. Treat this as end-of-stack to enforce - // progress and avoid infinite loops. - if (frame->context.iregs[MD_CONTEXT_ARM_REG_SP] - < last_frame->context.iregs[MD_CONTEXT_ARM_REG_SP]) - return NULL; - - // The new frame's context's PC is the return address, which is one - // instruction past the instruction that caused us to arrive at the - // callee. Set new_frame->instruction to one less than the PC. This won't - // reference the beginning of the call instruction, but it's at least - // within it, which is sufficient to get the source line information to - // match up with the line that contains the function call. Callers that - // require the exact return address value may access - // frame->context.iregs[MD_CONTEXT_ARM_REG_PC]. - frame->instruction = frame->context.iregs[MD_CONTEXT_ARM_REG_PC] - 1; - - return frame.release(); -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.h deleted file mode 100644 index 830579b2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm.h +++ /dev/null @@ -1,99 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_arm.h: arm-specific stackwalker. -// -// Provides stack frames given arm register context and a memory region -// corresponding to an arm stack. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#ifndef PROCESSOR_STACKWALKER_ARM_H__ -#define PROCESSOR_STACKWALKER_ARM_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerARM : public Stackwalker { - public: - // context is an arm context object that gives access to arm-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerARM(const SystemInfo *system_info, - const MDRawContextARM *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - // Change the context validity mask of the frame returned by - // GetContextFrame to VALID. This is only for use by unit tests; the - // default behavior is correct for all application code. - void SetContextFrameValidity(int valid) { context_frame_validity_ = valid; } - - private: - // Implementation of Stackwalker, using arm context and stack conventions. - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame(const CallStack *stack); - - // Use cfi_frame_info (derived from STACK CFI records) to construct - // the frame that called frames.back(). The caller takes ownership - // of the returned frame. Return NULL on failure. - StackFrameARM *GetCallerByCFIFrameInfo(const vector &frames, - CFIFrameInfo *cfi_frame_info); - - // Scan the stack for plausible return addresses. The caller takes ownership - // of the returned frame. Return NULL on failure. - StackFrameARM *GetCallerByStackScan(const vector &frames); - - // Stores the CPU context corresponding to the youngest stack frame, to - // be returned by GetContextFrame. - const MDRawContextARM *context_; - - // Validity mask for youngest stack frame. This is always - // CONTEXT_VALID_ALL in real use; it is only changeable for the sake of - // unit tests. - int context_frame_validity_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_ARM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm_unittest.cc deleted file mode 100644 index cb7ce631..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_arm_unittest.cc +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// stackwalker_arm_unittest.cc: Unit tests for StackwalkerARM class. - -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/test_assembler.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/stackwalker_unittest_utils.h" -#include "processor/stackwalker_arm.h" -#include "processor/windows_frame_info.h" - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::StackFrame; -using google_breakpad::StackFrameARM; -using google_breakpad::StackwalkerARM; -using google_breakpad::SystemInfo; -using google_breakpad::WindowsFrameInfo; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using std::string; -using std::vector; -using testing::_; -using testing::Return; -using testing::SetArgumentPointee; -using testing::Test; - -class StackwalkerARMFixture { - public: - StackwalkerARMFixture() - : stack_section(kLittleEndian), - // Give the two modules reasonable standard locations and names - // for tests to play with. - module1(0x40000000, 0x10000, "module1", "version1"), - module2(0x50000000, 0x10000, "module2", "version2") { - // Identify the system as a Linux system. - system_info.os = "Linux"; - system_info.os_short = "linux"; - system_info.os_version = "Lugubrious Labrador"; - system_info.cpu = "arm"; - system_info.cpu_info = ""; - - // Put distinctive values in the raw CPU context. - BrandContext(&raw_context); - - // Create some modules with some stock debugging information. - modules.Add(&module1); - modules.Add(&module2); - - // By default, none of the modules have symbol info; call - // SetModuleSymbols to override this. - EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _)) - .WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND)); - } - - // Set the Breakpad symbol information that supplier should return for - // MODULE to INFO. - void SetModuleSymbols(MockCodeModule *module, const string &info) { - unsigned int buffer_size = info.size() + 1; - char *buffer = reinterpret_cast(operator new(buffer_size)); - strcpy(buffer, info.c_str()); - EXPECT_CALL(supplier, GetCStringSymbolData(module, &system_info, _, _)) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(buffer), - Return(MockSymbolSupplier::FOUND))); - } - - // Populate stack_region with the contents of stack_section. Use - // stack_section.start() as the region's starting address. - void RegionFromSection() { - string contents; - ASSERT_TRUE(stack_section.GetContents(&contents)); - stack_region.Init(stack_section.start().Value(), contents); - } - - // Fill RAW_CONTEXT with pseudo-random data, for round-trip checking. - void BrandContext(MDRawContextARM *raw_context) { - u_int8_t x = 173; - for (size_t i = 0; i < sizeof(*raw_context); i++) - reinterpret_cast(raw_context)[i] = (x += 17); - } - - SystemInfo system_info; - MDRawContextARM raw_context; - Section stack_section; - MockMemoryRegion stack_region; - MockCodeModule module1; - MockCodeModule module2; - MockCodeModules modules; - MockSymbolSupplier supplier; - BasicSourceLineResolver resolver; - CallStack call_stack; - const vector *frames; -}; - -class SanityCheck: public StackwalkerARMFixture, public Test { }; - -TEST_F(SanityCheck, NoResolver) { - // Since we have no call frame information, and all unwinding - // requires call frame information, the stack walk will end after - // the first frame. - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - NULL, NULL); - // This should succeed even without a resolver or supplier. - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(1U, frames->size()); - StackFrameARM *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -class GetContextFrame: public StackwalkerARMFixture, public Test { }; - -TEST_F(GetContextFrame, Simple) { - // Since we have no call frame information, and all unwinding - // requires call frame information, the stack walk will end after - // the first frame. - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(1U, frames->size()); - StackFrameARM *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -class GetCallerFrame: public StackwalkerARMFixture, public Test { }; - -TEST_F(GetCallerFrame, ScanWithoutSymbols) { - // When the stack walker resorts to scanning the stack, - // only addresses located within loaded modules are - // considered valid return addresses. - // Force scanning through three frames to ensure that the - // stack pointer is set properly in scan-recovered frames. - stack_section.start() = 0x80000000; - u_int32_t return_address1 = 0x50000100; - u_int32_t return_address2 = 0x50000900; - Label frame1_sp, frame2_sp; - stack_section - // frame 0 - .Append(16, 0) // space - - .D32(0x40090000) // junk that's not - .D32(0x60000000) // a return address - - .D32(return_address1) // actual return address - // frame 1 - .Mark(&frame1_sp) - .Append(16, 0) // space - - .D32(0xF0000000) // more junk - .D32(0x0000000D) - - .D32(return_address2) // actual return address - // frame 2 - .Mark(&frame2_sp) - .Append(32, 0); // end of stack - RegionFromSection(); - - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40005510; - raw_context.iregs[MD_CONTEXT_ARM_REG_SP] = stack_section.start().Value(); - - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(3U, frames->size()); - - StackFrameARM *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameARM::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0, memcmp(&raw_context, &frame0->context, sizeof(raw_context))); - - StackFrameARM *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - ASSERT_EQ((StackFrameARM::CONTEXT_VALID_PC | - StackFrameARM::CONTEXT_VALID_SP), - frame1->context_validity); - EXPECT_EQ(return_address1, frame1->context.iregs[MD_CONTEXT_ARM_REG_PC]); - EXPECT_EQ(frame1_sp.Value(), frame1->context.iregs[MD_CONTEXT_ARM_REG_SP]); - - StackFrameARM *frame2 = static_cast(frames->at(2)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame2->trust); - ASSERT_EQ((StackFrameARM::CONTEXT_VALID_PC | - StackFrameARM::CONTEXT_VALID_SP), - frame2->context_validity); - EXPECT_EQ(return_address2, frame2->context.iregs[MD_CONTEXT_ARM_REG_PC]); - EXPECT_EQ(frame2_sp.Value(), frame2->context.iregs[MD_CONTEXT_ARM_REG_SP]); -} - -TEST_F(GetCallerFrame, ScanWithFunctionSymbols) { - // During stack scanning, if a potential return address - // is located within a loaded module that has symbols, - // it is only considered a valid return address if it - // lies within a function's bounds. - stack_section.start() = 0x80000000; - u_int32_t return_address = 0x50000200; - Label frame1_sp; - - stack_section - // frame 0 - .Append(16, 0) // space - - .D32(0x40090000) // junk that's not - .D32(0x60000000) // a return address - - .D32(0x40001000) // a couple of plausible addresses - .D32(0x5000F000) // that are not within functions - - .D32(return_address) // actual return address - // frame 1 - .Mark(&frame1_sp) - .Append(32, 0); // end of stack - RegionFromSection(); - - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40000200; - raw_context.iregs[MD_CONTEXT_ARM_REG_SP] = stack_section.start().Value(); - - SetModuleSymbols(&module1, - // The youngest frame's function. - "FUNC 100 400 10 monotreme\n"); - SetModuleSymbols(&module2, - // The calling frame's function. - "FUNC 100 400 10 marsupial\n"); - - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameARM *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameARM::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0, memcmp(&raw_context, &frame0->context, sizeof(raw_context))); - EXPECT_EQ("monotreme", frame0->function_name); - EXPECT_EQ(0x40000100, frame0->function_base); - - StackFrameARM *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - ASSERT_EQ((StackFrameARM::CONTEXT_VALID_PC | - StackFrameARM::CONTEXT_VALID_SP), - frame1->context_validity); - EXPECT_EQ(return_address, frame1->context.iregs[MD_CONTEXT_ARM_REG_PC]); - EXPECT_EQ(frame1_sp.Value(), frame1->context.iregs[MD_CONTEXT_ARM_REG_SP]); - EXPECT_EQ("marsupial", frame1->function_name); - EXPECT_EQ(0x50000100, frame1->function_base); -} - -struct CFIFixture: public StackwalkerARMFixture { - CFIFixture() { - // Provide a bunch of STACK CFI records; we'll walk to the caller - // from every point in this series, expecting to find the same set - // of register values. - SetModuleSymbols(&module1, - // The youngest frame's function. - "FUNC 4000 1000 10 enchiridion\n" - // Initially, nothing has been pushed on the stack, - // and the return address is still in the link register. - "STACK CFI INIT 4000 100 .cfa: sp .ra: lr\n" - // Push r4, the frame pointer, and the link register. - "STACK CFI 4001 .cfa: sp 12 + r4: .cfa 12 - ^" - " r11: .cfa 8 - ^ .ra: .cfa 4 - ^\n" - // Save r4..r7 in r0..r3: verify that we populate - // the youngest frame with all the values we have. - "STACK CFI 4002 r4: r0 r5: r1 r6: r2 r7: r3\n" - // Restore r4..r7. Save the non-callee-saves register r1. - "STACK CFI 4003 .cfa: sp 16 + r1: .cfa 16 - ^" - " r4: r4 r5: r5 r6: r6 r7: r7\n" - // Move the .cfa back four bytes, to point at the return - // address, and restore the sp explicitly. - "STACK CFI 4005 .cfa: sp 12 + r1: .cfa 12 - ^" - " r11: .cfa 4 - ^ .ra: .cfa ^ sp: .cfa 4 +\n" - // Recover the PC explicitly from a new stack slot; - // provide garbage for the .ra. - "STACK CFI 4006 .cfa: sp 16 + pc: .cfa 16 - ^\n" - - // The calling function. - "FUNC 5000 1000 10 epictetus\n" - // Mark it as end of stack. - "STACK CFI INIT 5000 1000 .cfa: 0 .ra: 0\n" - - // A function whose CFI makes the stack pointer - // go backwards. - "FUNC 6000 1000 20 palinal\n" - "STACK CFI INIT 6000 1000 .cfa: sp 4 - .ra: lr\n" - - // A function with CFI expressions that can't be - // evaluated. - "FUNC 7000 1000 20 rhetorical\n" - "STACK CFI INIT 7000 1000 .cfa: moot .ra: ambiguous\n"); - - // Provide some distinctive values for the caller's registers. - expected.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40005510; - expected.iregs[MD_CONTEXT_ARM_REG_SP] = 0x80000000; - expected.iregs[4] = 0xb5d55e68; - expected.iregs[5] = 0xebd134f3; - expected.iregs[6] = 0xa31e74bc; - expected.iregs[7] = 0x2dcb16b3; - expected.iregs[8] = 0x2ada2137; - expected.iregs[9] = 0xbbbb557d; - expected.iregs[10] = 0x48bf8ca7; - expected.iregs[MD_CONTEXT_ARM_REG_FP] = 0x8112e110; - - // Expect CFI to recover all callee-saves registers. Since CFI is the - // only stack frame construction technique we have, aside from the - // context frame itself, there's no way for us to have a set of valid - // registers smaller than this. - expected_validity = (StackFrameARM::CONTEXT_VALID_PC | - StackFrameARM::CONTEXT_VALID_SP | - StackFrameARM::CONTEXT_VALID_R4 | - StackFrameARM::CONTEXT_VALID_R5 | - StackFrameARM::CONTEXT_VALID_R6 | - StackFrameARM::CONTEXT_VALID_R7 | - StackFrameARM::CONTEXT_VALID_R8 | - StackFrameARM::CONTEXT_VALID_R9 | - StackFrameARM::CONTEXT_VALID_R10 | - StackFrameARM::CONTEXT_VALID_FP); - - // By default, context frames provide all registers, as normal. - context_frame_validity = StackFrameARM::CONTEXT_VALID_ALL; - - // By default, registers are unchanged. - raw_context = expected; - } - - // Walk the stack, using stack_section as the contents of the stack - // and raw_context as the current register values. (Set the stack - // pointer to the stack's starting address.) Expect two stack - // frames; in the older frame, expect the callee-saves registers to - // have values matching those in 'expected'. - void CheckWalk() { - RegionFromSection(); - raw_context.iregs[MD_CONTEXT_ARM_REG_SP] = stack_section.start().Value(); - - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - walker.SetContextFrameValidity(context_frame_validity); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameARM *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(context_frame_validity, frame0->context_validity); - EXPECT_EQ("enchiridion", frame0->function_name); - EXPECT_EQ(0x40004000U, frame0->function_base); - - StackFrameARM *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ(expected_validity, frame1->context_validity); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R1) - EXPECT_EQ(expected.iregs[1], frame1->context.iregs[1]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R4) - EXPECT_EQ(expected.iregs[4], frame1->context.iregs[4]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R5) - EXPECT_EQ(expected.iregs[5], frame1->context.iregs[5]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R6) - EXPECT_EQ(expected.iregs[6], frame1->context.iregs[6]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R7) - EXPECT_EQ(expected.iregs[7], frame1->context.iregs[7]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R8) - EXPECT_EQ(expected.iregs[8], frame1->context.iregs[8]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R9) - EXPECT_EQ(expected.iregs[9], frame1->context.iregs[9]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_R10) - EXPECT_EQ(expected.iregs[10], frame1->context.iregs[10]); - if (expected_validity & StackFrameARM::CONTEXT_VALID_FP) - EXPECT_EQ(expected.iregs[MD_CONTEXT_ARM_REG_FP], - frame1->context.iregs[MD_CONTEXT_ARM_REG_FP]); - - // We would never have gotten a frame in the first place if the SP - // and PC weren't valid or ->instruction weren't set. - EXPECT_EQ(expected.iregs[MD_CONTEXT_ARM_REG_SP], - frame1->context.iregs[MD_CONTEXT_ARM_REG_SP]); - EXPECT_EQ(expected.iregs[MD_CONTEXT_ARM_REG_PC], - frame1->context.iregs[MD_CONTEXT_ARM_REG_PC]); - EXPECT_EQ(expected.iregs[MD_CONTEXT_ARM_REG_PC], - frame1->instruction + 1); - EXPECT_EQ("epictetus", frame1->function_name); - } - - // The values we expect to find for the caller's registers. - MDRawContextARM expected; - - // The validity mask for expected. - int expected_validity; - - // The validity mask to impose on the context frame. - int context_frame_validity; -}; - -class CFI: public CFIFixture, public Test { }; - -TEST_F(CFI, At4000) { - stack_section.start() = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004000; - raw_context.iregs[MD_CONTEXT_ARM_REG_LR] = 0x40005510; - CheckWalk(); -} - -TEST_F(CFI, At4001) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0xb5d55e68) // saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004001; - raw_context.iregs[4] = 0x635adc9f; // distinct callee r4 - raw_context.iregs[MD_CONTEXT_ARM_REG_FP] = 0xbe145fc4; // distinct callee fp - CheckWalk(); -} - -// As above, but unwind from a context that has only the PC and SP. -TEST_F(CFI, At4001LimitedValidity) { - context_frame_validity = - StackFrameARM::CONTEXT_VALID_PC | StackFrameARM::CONTEXT_VALID_SP; - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004001; - raw_context.iregs[MD_CONTEXT_ARM_REG_FP] = 0xbe145fc4; // distinct callee fp - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0xb5d55e68) // saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - expected_validity = (StackFrameARM::CONTEXT_VALID_PC - | StackFrameARM::CONTEXT_VALID_SP - | StackFrameARM::CONTEXT_VALID_FP - | StackFrameARM::CONTEXT_VALID_R4); - CheckWalk(); -} - -TEST_F(CFI, At4002) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0xfb81ff3d) // no longer saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004002; - raw_context.iregs[0] = 0xb5d55e68; // saved r4 - raw_context.iregs[1] = 0xebd134f3; // saved r5 - raw_context.iregs[2] = 0xa31e74bc; // saved r6 - raw_context.iregs[3] = 0x2dcb16b3; // saved r7 - raw_context.iregs[4] = 0xfdd35466; // distinct callee r4 - raw_context.iregs[5] = 0xf18c946c; // distinct callee r5 - raw_context.iregs[6] = 0xac2079e8; // distinct callee r6 - raw_context.iregs[7] = 0xa449829f; // distinct callee r7 - raw_context.iregs[MD_CONTEXT_ARM_REG_FP] = 0xbe145fc4; // distinct callee fp - CheckWalk(); -} - -TEST_F(CFI, At4003) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0x48c8dd5a) // saved r1 (even though it's not callee-saves) - .D32(0xcb78040e) // no longer saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004003; - raw_context.iregs[1] = 0xfb756319; // distinct callee r1 - raw_context.iregs[MD_CONTEXT_ARM_REG_FP] = 0x0a2857ea; // distinct callee fp - expected.iregs[1] = 0x48c8dd5a; // caller's r1 - expected_validity |= StackFrameARM::CONTEXT_VALID_R1; - CheckWalk(); -} - -// We have no new rule at module offset 0x4004, so the results here should -// be the same as those at module offset 0x4003. -TEST_F(CFI, At4004) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0x48c8dd5a) // saved r1 (even though it's not callee-saves) - .D32(0xcb78040e) // no longer saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004004; - raw_context.iregs[1] = 0xfb756319; // distinct callee r1 - expected.iregs[1] = 0x48c8dd5a; // caller's r1 - expected_validity |= StackFrameARM::CONTEXT_VALID_R1; - CheckWalk(); -} - -// Here we move the .cfa, but provide an explicit rule to recover the SP, -// so again there should be no change in the registers recovered. -TEST_F(CFI, At4005) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0x48c8dd5a) // saved r1 (even though it's not callee-saves) - .D32(0xf013f841) // no longer saved r4 - .D32(0x8112e110) // saved fp - .D32(0x40005510) // return address - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004005; - raw_context.iregs[1] = 0xfb756319; // distinct callee r1 - expected.iregs[1] = 0x48c8dd5a; // caller's r1 - expected_validity |= StackFrameARM::CONTEXT_VALID_R1; - CheckWalk(); -} - -// Here we provide an explicit rule for the PC, and have the saved .ra be -// bogus. -TEST_F(CFI, At4006) { - Label frame1_sp = expected.iregs[MD_CONTEXT_ARM_REG_SP]; - stack_section - .D32(0x40005510) // saved pc - .D32(0x48c8dd5a) // saved r1 (even though it's not callee-saves) - .D32(0xf013f841) // no longer saved r4 - .D32(0x8112e110) // saved fp - .D32(0xf8d15783) // .ra rule recovers this, which is garbage - .Mark(&frame1_sp); // This effectively sets stack_section.start(). - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40004006; - raw_context.iregs[1] = 0xfb756319; // callee's r1, different from caller's - expected.iregs[1] = 0x48c8dd5a; // caller's r1 - expected_validity |= StackFrameARM::CONTEXT_VALID_R1; - CheckWalk(); -} - -// Check that we reject rules that would cause the stack pointer to -// move in the wrong direction. -TEST_F(CFI, RejectBackwards) { - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40006000; - raw_context.iregs[MD_CONTEXT_ARM_REG_SP] = 0x80000000; - raw_context.iregs[MD_CONTEXT_ARM_REG_LR] = 0x40005510; - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(1U, frames->size()); -} - -// Check that we reject rules whose expressions' evaluation fails. -TEST_F(CFI, RejectBadExpressions) { - raw_context.iregs[MD_CONTEXT_ARM_REG_PC] = 0x40007000; - raw_context.iregs[MD_CONTEXT_ARM_REG_SP] = 0x80000000; - StackwalkerARM walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(1U, frames->size()); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.cc deleted file mode 100644 index 4d9a6282..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.cc +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_ppc.cc: ppc-specific stackwalker. -// -// See stackwalker_ppc.h for documentation. -// -// Author: Mark Mentovai - - -#include "processor/stackwalker_ppc.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" - -namespace google_breakpad { - - -StackwalkerPPC::StackwalkerPPC(const SystemInfo *system_info, - const MDRawContextPPC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { - if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { - // This implementation only covers 32-bit ppc CPUs. The limits of the - // supplied stack are invalid. Mark memory_ = NULL, which will cause - // stackwalking to fail. - BPLOG(ERROR) << "Memory out of range for stackwalking: " << - HexString(memory_->GetBase()) << "+" << - HexString(memory_->GetSize()); - memory_ = NULL; - } -} - - -StackFrame* StackwalkerPPC::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFramePPC *frame = new StackFramePPC(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFramePPC::CONTEXT_VALID_ALL; - frame->trust = StackFrame::FRAME_TRUST_CONTEXT; - frame->instruction = frame->context.srr0; - - return frame; -} - - -StackFrame* StackwalkerPPC::GetCallerFrame(const CallStack *stack) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - // The instruction pointers for previous frames are saved on the stack. - // The typical ppc calling convention is for the called procedure to store - // its return address in the calling procedure's stack frame at 8(%r1), - // and to allocate its own stack frame by decrementing %r1 (the stack - // pointer) and saving the old value of %r1 at 0(%r1). Because the ppc has - // no hardware stack, there is no distinction between the stack pointer and - // frame pointer, and what is typically thought of as the frame pointer on - // an x86 is usually referred to as the stack pointer on a ppc. - - StackFramePPC *last_frame = static_cast( - stack->frames()->back()); - - // A caller frame must reside higher in memory than its callee frames. - // Anything else is an error, or an indication that we've reached the - // end of the stack. - u_int32_t stack_pointer; - if (!memory_->GetMemoryAtAddress(last_frame->context.gpr[1], - &stack_pointer) || - stack_pointer <= last_frame->context.gpr[1]) { - return NULL; - } - - // Mac OS X/Darwin gives 1 as the return address from the bottom-most - // frame in a stack (a thread's entry point). I haven't found any - // documentation on this, but 0 or 1 would be bogus return addresses, - // so check for them here and return false (end of stack) when they're - // hit to avoid having a phantom frame. - u_int32_t instruction; - if (!memory_->GetMemoryAtAddress(stack_pointer + 8, &instruction) || - instruction <= 1) { - return NULL; - } - - StackFramePPC *frame = new StackFramePPC(); - - frame->context = last_frame->context; - frame->context.srr0 = instruction; - frame->context.gpr[1] = stack_pointer; - frame->context_validity = StackFramePPC::CONTEXT_VALID_SRR0 | - StackFramePPC::CONTEXT_VALID_GPR1; - frame->trust = StackFrame::FRAME_TRUST_FP; - - // frame->context.srr0 is the return address, which is one instruction - // past the branch that caused us to arrive at the callee. Set - // frame_ppc->instruction to four less than that. Since all ppc - // instructions are 4 bytes wide, this is the address of the branch - // instruction. This allows source line information to match up with the - // line that contains a function call. Callers that require the exact - // return address value may access the context.srr0 field of StackFramePPC. - frame->instruction = frame->context.srr0 - 4; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.h deleted file mode 100644 index bfbb4f82..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_ppc.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_ppc.h: ppc-specific stackwalker. -// -// Provides stack frames given ppc register context and a memory region -// corresponding to a ppc stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_PPC_H__ -#define PROCESSOR_STACKWALKER_PPC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerPPC : public Stackwalker { - public: - // context is a ppc context object that gives access to ppc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerPPC(const SystemInfo *system_info, - const MDRawContextPPC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using ppc context (stack pointer in %r1, - // saved program counter in %srr0) and stack conventions (saved stack - // pointer at 0(%r1), return address at 8(0(%r1)). - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame(const CallStack *stack); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextPPC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_PPC_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest.cc deleted file mode 100644 index fdd15270..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest.cc +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_selftest.cc: Tests StackwalkerX86 or StackwalkerPPC using the -// running process' stack as test data, if running on an x86 or ppc and -// compiled with gcc. This test is not enabled in the "make check" suite -// by default, because certain optimizations interfere with its proper -// operation. To turn it on, configure with --enable-selftest. -// -// Optimizations that cause problems: -// - stack frame reuse. The Recursor function here calls itself with -// |return Recursor|. When the caller's frame is reused, it will cause -// CountCallerFrames to correctly return the same number of frames -// in both the caller and callee. This is considered an unexpected -// condition in the test, which expects a callee to have one more -// caller frame in the stack than its caller. -// - frame pointer omission. Even with a stackwalker that understands -// this optimization, the code to harness debug information currently -// only exists to retrieve it from minidumps, not the current process. -// -// This test can also serve as a developmental and debugging aid if -// PRINT_STACKS is defined. -// -// Author: Mark Mentovai - -#include "processor/logging.h" - -#if defined(__i386) && !defined(__i386__) -#define __i386__ -#endif -#if defined(__sparc) && !defined(__sparc__) -#define __sparc__ -#endif - -#if (defined(__SUNPRO_CC) || defined(__GNUC__)) && \ - (defined(__i386__) || defined(__ppc__) || defined(__sparc__)) - - -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/scoped_ptr.h" - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::MemoryRegion; -using google_breakpad::scoped_ptr; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameX86; -using google_breakpad::StackFrameSPARC; - -#if defined(__i386__) -#include "processor/stackwalker_x86.h" -using google_breakpad::StackwalkerX86; -#elif defined(__ppc__) -#include "processor/stackwalker_ppc.h" -using google_breakpad::StackwalkerPPC; -#elif defined(__sparc__) -#include "processor/stackwalker_sparc.h" -using google_breakpad::StackwalkerSPARC; -#endif // __i386__ || __ppc__ || __sparc__ - -#define RECURSION_DEPTH 100 - - -// A simple MemoryRegion subclass that provides direct access to this -// process' memory space by pointer. -class SelfMemoryRegion : public MemoryRegion { - public: - virtual u_int64_t GetBase() { return 0; } - virtual u_int32_t GetSize() { return 0xffffffff; } - - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) { - return GetMemoryAtAddressInternal(address, value); } - - private: - template bool GetMemoryAtAddressInternal(u_int64_t address, - T* value) { - // Without knowing what addresses are actually mapped, just assume that - // everything low is not mapped. This helps the stackwalker catch the - // end of a stack when it tries to dereference a null or low pointer - // in an attempt to find the caller frame. Other unmapped accesses will - // cause the program to crash, but that would properly be a test failure. - if (address < 0x100) - return false; - - u_int8_t* memory = 0; - *value = *reinterpret_cast(&memory[address]); - return true; - } -}; - - -#if defined(__GNUC__) - - -#if defined(__i386__) - -// GetEBP returns the current value of the %ebp register. Because it's -// implemented as a function, %ebp itself contains GetEBP's frame pointer -// and not the caller's frame pointer. Dereference %ebp to obtain the -// caller's frame pointer, which the compiler-generated preamble stored -// on the stack (provided frame pointers are not being omitted.) Because -// this function depends on the compiler-generated preamble, inlining is -// disabled. -static u_int32_t GetEBP() __attribute__((noinline)); -static u_int32_t GetEBP() { - u_int32_t ebp; - __asm__ __volatile__( - "movl (%%ebp), %0" - : "=a" (ebp) - ); - return ebp; -} - - -// The caller's %esp is 8 higher than the value of %ebp in this function, -// assuming that it's not inlined and that the standard prolog is used. -// The CALL instruction places a 4-byte return address on the stack above -// the caller's %esp, and this function's prolog will save the caller's %ebp -// on the stack as well, for another 4 bytes, before storing %esp in %ebp. -static u_int32_t GetESP() __attribute__((noinline)); -static u_int32_t GetESP() { - u_int32_t ebp; - __asm__ __volatile__( - "movl %%ebp, %0" - : "=a" (ebp) - ); - return ebp + 8; -} - - -// GetEIP returns the instruction pointer identifying the next instruction -// to execute after GetEIP returns. It obtains this information from the -// stack, where it was placed by the call instruction that called GetEIP. -// This function depends on frame pointers not being omitted. It is possible -// to write a pure asm version of this routine that has no compiler-generated -// preamble and uses %esp instead of %ebp; that would function in the -// absence of frame pointers. However, the simpler approach is used here -// because GetEBP and stackwalking necessarily depends on access to frame -// pointers. Because this function depends on a call instruction and the -// compiler-generated preamble, inlining is disabled. -static u_int32_t GetEIP() __attribute__((noinline)); -static u_int32_t GetEIP() { - u_int32_t eip; - __asm__ __volatile__( - "movl 4(%%ebp), %0" - : "=a" (eip) - ); - return eip; -} - - -#elif defined(__ppc__) - - -// GetSP returns the current value of the %r1 register, which by convention, -// is the stack pointer on ppc. Because it's implemented as a function, -// %r1 itself contains GetSP's own stack pointer and not the caller's stack -// pointer. Dereference %r1 to obtain the caller's stack pointer, which the -// compiler-generated prolog stored on the stack. Because this function -// depends on the compiler-generated prolog, inlining is disabled. -static u_int32_t GetSP() __attribute__((noinline)); -static u_int32_t GetSP() { - u_int32_t sp; - __asm__ __volatile__( - "lwz %0, 0(r1)" - : "=r" (sp) - ); - return sp; -} - - -// GetPC returns the program counter identifying the next instruction to -// execute after GetPC returns. It obtains this information from the -// link register, where it was placed by the branch instruction that called -// GetPC. Because this function depends on the caller's use of a branch -// instruction, inlining is disabled. -static u_int32_t GetPC() __attribute__((noinline)); -static u_int32_t GetPC() { - u_int32_t lr; - __asm__ __volatile__( - "mflr %0" - : "=r" (lr) - ); - return lr; -} - - -#elif defined(__sparc__) - - -// GetSP returns the current value of the %sp/%o6/%g_r[14] register, which -// by convention, is the stack pointer on sparc. Because it's implemented -// as a function, %sp itself contains GetSP's own stack pointer and not -// the caller's stack pointer. Dereference to obtain the caller's stack -// pointer, which the compiler-generated prolog stored on the stack. -// Because this function depends on the compiler-generated prolog, inlining -// is disabled. -static u_int32_t GetSP() __attribute__((noinline)); -static u_int32_t GetSP() { - u_int32_t sp; - __asm__ __volatile__( - "mov %%fp, %0" - : "=r" (sp) - ); - return sp; -} - -// GetFP returns the current value of the %fp register. Because it's -// implemented as a function, %fp itself contains GetFP's frame pointer -// and not the caller's frame pointer. Dereference %fp to obtain the -// caller's frame pointer, which the compiler-generated preamble stored -// on the stack (provided frame pointers are not being omitted.) Because -// this function depends on the compiler-generated preamble, inlining is -// disabled. -static u_int32_t GetFP() __attribute__((noinline)); -static u_int32_t GetFP() { - u_int32_t fp; - __asm__ __volatile__( - "ld [%%fp+56], %0" - : "=r" (fp) - ); - return fp; -} - -// GetPC returns the program counter identifying the next instruction to -// execute after GetPC returns. It obtains this information from the -// link register, where it was placed by the branch instruction that called -// GetPC. Because this function depends on the caller's use of a branch -// instruction, inlining is disabled. -static u_int32_t GetPC() __attribute__((noinline)); -static u_int32_t GetPC() { - u_int32_t pc; - __asm__ __volatile__( - "mov %%i7, %0" - : "=r" (pc) - ); - return pc + 8; -} - -#endif // __i386__ || __ppc__ || __sparc__ - -#elif defined(__SUNPRO_CC) - -#if defined(__i386__) -extern "C" { -extern u_int32_t GetEIP(); -extern u_int32_t GetEBP(); -extern u_int32_t GetESP(); -} -#elif defined(__sparc__) -extern "C" { -extern u_int32_t GetPC(); -extern u_int32_t GetFP(); -extern u_int32_t GetSP(); -} -#endif // __i386__ || __sparc__ - -#endif // __GNUC__ || __SUNPRO_CC - -// CountCallerFrames returns the number of stack frames beneath the function -// that called CountCallerFrames. Because this function's return value -// is dependent on the size of the stack beneath it, inlining is disabled, -// and any function that calls this should not be inlined either. -#if defined(__GNUC__) -static unsigned int CountCallerFrames() __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -static unsigned int CountCallerFrames(); -#endif -static unsigned int CountCallerFrames() { - SelfMemoryRegion memory; - BasicSourceLineResolver resolver; - -#if defined(__i386__) - MDRawContextX86 context = MDRawContextX86(); - context.eip = GetEIP(); - context.ebp = GetEBP(); - context.esp = GetESP(); - - StackwalkerX86 stackwalker = StackwalkerX86(NULL, &context, &memory, NULL, - NULL, &resolver); -#elif defined(__ppc__) - MDRawContextPPC context = MDRawContextPPC(); - context.srr0 = GetPC(); - context.gpr[1] = GetSP(); - - StackwalkerPPC stackwalker = StackwalkerPPC(NULL, &context, &memory, NULL, - NULL, &resolver); -#elif defined(__sparc__) - MDRawContextSPARC context = MDRawContextSPARC(); - context.pc = GetPC(); - context.g_r[14] = GetSP(); - context.g_r[30] = GetFP(); - - StackwalkerSPARC stackwalker = StackwalkerSPARC(NULL, &context, &memory, - NULL, NULL, &resolver); -#endif // __i386__ || __ppc__ || __sparc__ - - CallStack stack; - stackwalker.Walk(&stack); - -#ifdef PRINT_STACKS - printf("\n"); - for (unsigned int frame_index = 0; - frame_index < stack.frames()->size(); - ++frame_index) { - StackFrame *frame = stack.frames()->at(frame_index); - printf("frame %-3d instruction = 0x%08" PRIx64, - frame_index, frame->instruction); -#if defined(__i386__) - StackFrameX86 *frame_x86 = reinterpret_cast(frame); - printf(" esp = 0x%08x ebp = 0x%08x\n", - frame_x86->context.esp, frame_x86->context.ebp); -#elif defined(__ppc__) - StackFramePPC *frame_ppc = reinterpret_cast(frame); - printf(" gpr[1] = 0x%08x\n", frame_ppc->context.gpr[1]); -#elif defined(__sparc__) - StackFrameSPARC *frame_sparc = reinterpret_cast(frame); - printf(" sp = 0x%08x fp = 0x%08x\n", - frame_sparc->context.g_r[14], frame_sparc->context.g_r[30]); -#endif // __i386__ || __ppc__ || __sparc__ - } -#endif // PRINT_STACKS - - // Subtract 1 because the caller wants the number of frames beneath - // itself. Because the caller called us, subract two for our frame and its - // frame, which are included in stack.size(). - return stack.frames()->size() - 2; -} - - -// Recursor verifies that the number stack frames beneath itself is one more -// than the number of stack frames beneath its parent. When depth frames -// have been reached, Recursor stops checking and returns success. If the -// frame count check fails at any depth, Recursor will stop and return false. -// Because this calls CountCallerFrames, inlining is disabled. -#if defined(__GNUC__) -static bool Recursor(unsigned int depth, unsigned int parent_callers) - __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -static bool Recursor(unsigned int depth, unsigned int parent_callers); -#endif -static bool Recursor(unsigned int depth, unsigned int parent_callers) { - unsigned int callers = CountCallerFrames(); - if (callers != parent_callers + 1) - return false; - - if (depth) - return Recursor(depth - 1, callers); - - // depth == 0 - return true; -} - - -// Because this calls CountCallerFrames, inlining is disabled - but because -// it's main (and nobody calls it other than the entry point), it wouldn't -// be inlined anyway. -#if defined(__GNUC__) -int main(int argc, char** argv) __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -int main(int argc, char** argv); -#endif -int main(int argc, char** argv) { - BPLOG_INIT(&argc, &argv); - - return Recursor(RECURSION_DEPTH, CountCallerFrames()) ? 0 : 1; -} - - -#else -// Not i386 or ppc or sparc? We can only test stacks we know how to walk. - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - // "make check" interprets an exit status of 77 to mean that the test is - // not supported. - BPLOG(ERROR) << "Selftest not supported here"; - return 77; -} - - -#endif // (__GNUC__ || __SUNPRO_CC) && (__i386__ || __ppc__ || __sparc__) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest_sol.s b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest_sol.s deleted file mode 100644 index 648b0499..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_selftest_sol.s +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2007, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* stackwalker_selftest_sol.s - * On Solaris, the recommeded compiler is CC, so we can not use gcc inline - * asm, use this method instead. - * - * How to compile: as -P -L -D_ASM -D_STDC -K PIC -o \ - * src/processor/stackwalker_selftest_sol.o \ - * src/processor/stackwalker_selftest_sol.s - * - * Author: Michael Shang - */ - -#include - -#if defined(__i386) - - -ENTRY(GetEBP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl 0x00000000(%ebp),%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - leave - ret -SET_SIZE(GetEBP) - -ENTRY(GetEIP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl 0x00000004(%ebp),%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - leave - ret -SET_SIZE(GetEIP) - -ENTRY(GetESP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl %ebp,%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - addl $0x00000008,%eax - leave - ret -SET_SIZE(GetESP) - - -#elif defined(__sparc) - - -ENTRY(GetPC) - save %sp, -120, %sp - mov %i7, %i4 - inccc 8, %i4 - mov %i4, %i0 - ret - restore -SET_SIZE(GetPC) - -ENTRY(GetSP) - save %sp, -120, %sp - mov %fp, %i4 - mov %i4, %i0 - ret - restore -SET_SIZE(GetSP) - -ENTRY(GetFP) - save %sp, -120, %sp - ld [%fp + 56], %g1 - mov %g1, %i0 - ret - restore -SET_SIZE(GetFP) - - -#endif // __i386 || __sparc diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.cc deleted file mode 100644 index 2e819a69..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.cc +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_sparc.cc: sparc-specific stackwalker. -// -// See stackwalker_sparc.h for documentation. -// -// Author: Michael Shang - - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" -#include "processor/stackwalker_sparc.h" - -namespace google_breakpad { - - -StackwalkerSPARC::StackwalkerSPARC(const SystemInfo *system_info, - const MDRawContextSPARC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { -} - - -StackFrame* StackwalkerSPARC::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameSPARC *frame = new StackFrameSPARC(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameSPARC::CONTEXT_VALID_ALL; - frame->trust = StackFrame::FRAME_TRUST_CONTEXT; - frame->instruction = frame->context.pc; - - return frame; -} - - -StackFrame* StackwalkerSPARC::GetCallerFrame(const CallStack *stack) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - StackFrameSPARC *last_frame = static_cast( - stack->frames()->back()); - - // new: caller - // old: callee - // %fp, %i6 and g_r[30] is the same, see minidump_format.h - // %sp, %o6 and g_r[14] is the same, see minidump_format.h - // %sp_new = %fp_old - // %fp_new = *(%fp_old + 32 + 32 - 8), where the callee's %i6 - // %pc_new = *(%fp_old + 32 + 32 - 4) + 8 - // which is callee's %i7 plus 8 - - // A caller frame must reside higher in memory than its callee frames. - // Anything else is an error, or an indication that we've reached the - // end of the stack. - u_int64_t stack_pointer = last_frame->context.g_r[30]; - if (stack_pointer <= last_frame->context.g_r[14]) { - return NULL; - } - - u_int32_t instruction; - if (!memory_->GetMemoryAtAddress(stack_pointer + 60, - &instruction) || instruction <= 1) { - return NULL; - } - - u_int32_t stack_base; - if (!memory_->GetMemoryAtAddress(stack_pointer + 56, - &stack_base) || stack_base <= 1) { - return NULL; - } - - StackFrameSPARC *frame = new StackFrameSPARC(); - - frame->context = last_frame->context; - frame->context.g_r[14] = stack_pointer; - frame->context.g_r[30] = stack_base; - - // frame->context.pc is the return address, which is 2 instruction - // past the branch that caused us to arrive at the callee, which are - // a CALL instruction then a NOP instruction. - // frame_ppc->instruction to 8 less than that. Since all sparc - // instructions are 4 bytes wide, this is the address of the branch - // instruction. This allows source line information to match up with the - // line that contains a function call. Callers that require the exact - // return address value may access the %i7/g_r[31] field of StackFrameSPARC. - frame->context.pc = instruction + 8; - frame->instruction = instruction; - frame->context_validity = StackFrameSPARC::CONTEXT_VALID_PC | - StackFrameSPARC::CONTEXT_VALID_SP | - StackFrameSPARC::CONTEXT_VALID_FP; - frame->trust = StackFrame::FRAME_TRUST_FP; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.h deleted file mode 100644 index ad41aeab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_sparc.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_sparc.h: sparc-specific stackwalker. -// -// Provides stack frames given sparc register context and a memory region -// corresponding to an sparc stack. -// -// Author: Michael Shang - - -#ifndef PROCESSOR_STACKWALKER_SPARC_H__ -#define PROCESSOR_STACKWALKER_SPARC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerSPARC : public Stackwalker { - public: - // context is a sparc context object that gives access to sparc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerSPARC(const SystemInfo *system_info, - const MDRawContextSPARC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using sparc context (%fp, %sp, %pc) and - // stack conventions - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame(const CallStack *stack); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextSPARC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_SPARC_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_unittest_utils.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_unittest_utils.h deleted file mode 100644 index d2e29f72..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_unittest_utils.h +++ /dev/null @@ -1,180 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// Mock classes for writing stackwalker tests, shared amongst architectures. - -#ifndef PROCESSOR_STACKWALKER_UNITTEST_UTILS_H_ -#define PROCESSOR_STACKWALKER_UNITTEST_UTILS_H_ - -#include -#include -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "google_breakpad/processor/system_info.h" - -class MockMemoryRegion: public google_breakpad::MemoryRegion { - public: - MockMemoryRegion(): base_address_(0) { } - - // Set this region's address and contents. If we have placed an - // instance of this class in a test fixture class, individual tests - // can use this to provide the region's contents. - void Init(u_int64_t base_address, const std::string &contents) { - base_address_ = base_address; - contents_ = contents; - } - - u_int64_t GetBase() const { return base_address_; } - u_int32_t GetSize() const { return contents_.size(); } - - bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) const { - return GetMemoryLittleEndian(address, value); - } - bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) const { - return GetMemoryLittleEndian(address, value); - } - bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) const { - return GetMemoryLittleEndian(address, value); - } - bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) const { - return GetMemoryLittleEndian(address, value); - } - - private: - // Fetch a little-endian value from ADDRESS in contents_ whose size - // is BYTES, and store it in *VALUE. Return true on success. - template - bool GetMemoryLittleEndian(u_int64_t address, ValueType *value) const { - if (address < base_address_ || - address - base_address_ + sizeof(ValueType) > contents_.size()) - return false; - ValueType v = 0; - int start = address - base_address_; - // The loop condition is odd, but it's correct for size_t. - for (size_t i = sizeof(ValueType) - 1; i < sizeof(ValueType); i--) - v = (v << 8) | static_cast(contents_[start + i]); - *value = v; - return true; - } - - u_int64_t base_address_; - std::string contents_; -}; - -class MockCodeModule: public google_breakpad::CodeModule { - public: - MockCodeModule(u_int64_t base_address, u_int64_t size, - const std::string &code_file, const std::string &version) - : base_address_(base_address), size_(size), code_file_(code_file) { } - - u_int64_t base_address() const { return base_address_; } - u_int64_t size() const { return size_; } - std::string code_file() const { return code_file_; } - std::string code_identifier() const { return code_file_; } - std::string debug_file() const { return code_file_; } - std::string debug_identifier() const { return code_file_; } - std::string version() const { return version_; } - const google_breakpad::CodeModule *Copy() const { - abort(); // Tests won't use this. - } - - private: - u_int64_t base_address_; - u_int64_t size_; - std::string code_file_; - std::string version_; -}; - -class MockCodeModules: public google_breakpad::CodeModules { - public: - typedef google_breakpad::CodeModule CodeModule; - typedef google_breakpad::CodeModules CodeModules; - - void Add(const MockCodeModule *module) { - modules_.push_back(module); - } - - unsigned int module_count() const { return modules_.size(); } - - const CodeModule *GetModuleForAddress(u_int64_t address) const { - for (ModuleVector::const_iterator i = modules_.begin(); - i != modules_.end(); i++) { - const MockCodeModule *module = *i; - if (module->base_address() <= address && - address - module->base_address() < module->size()) - return module; - } - return NULL; - }; - - const CodeModule *GetMainModule() const { return modules_[0]; } - - const CodeModule *GetModuleAtSequence(unsigned int sequence) const { - return modules_.at(sequence); - } - - const CodeModule *GetModuleAtIndex(unsigned int index) const { - return modules_.at(index); - } - - const CodeModules *Copy() const { abort(); } // Tests won't use this. - - private: - typedef std::vector ModuleVector; - ModuleVector modules_; -}; - -class MockSymbolSupplier: public google_breakpad::SymbolSupplier { - public: - typedef google_breakpad::CodeModule CodeModule; - typedef google_breakpad::SystemInfo SystemInfo; - MOCK_METHOD3(GetSymbolFile, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - std::string *symbol_file)); - MOCK_METHOD4(GetSymbolFile, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - std::string *symbol_file, - std::string *symbol_data)); - MOCK_METHOD4(GetCStringSymbolData, SymbolResult(const CodeModule *module, - const SystemInfo *system_info, - std::string *symbol_file, - char **symbol_data)); - MOCK_METHOD1(FreeSymbolData, void(const CodeModule *module)); -}; - -#endif // PROCESSOR_STACKWALKER_UNITTEST_UTILS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.cc deleted file mode 100644 index 2ee37bfb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.cc +++ /dev/null @@ -1,577 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_x86.cc: x86-specific stackwalker. -// -// See stackwalker_x86.h for documentation. -// -// Author: Mark Mentovai - - -#include "processor/postfix_evaluator-inl.h" - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_x86.h" -#include "processor/windows_frame_info.h" -#include "processor/cfi_frame_info.h" - -namespace google_breakpad { - - -const StackwalkerX86::CFIWalker::RegisterSet -StackwalkerX86::cfi_register_map_[] = { - // It may seem like $eip and $esp are callee-saves, because (with Unix or - // cdecl calling conventions) the callee is responsible for having them - // restored upon return. But the callee_saves flags here really means - // that the walker should assume they're unchanged if the CFI doesn't - // mention them, which is clearly wrong for $eip and $esp. - { "$eip", ".ra", false, - StackFrameX86::CONTEXT_VALID_EIP, &MDRawContextX86::eip }, - { "$esp", ".cfa", false, - StackFrameX86::CONTEXT_VALID_ESP, &MDRawContextX86::esp }, - { "$ebp", NULL, true, - StackFrameX86::CONTEXT_VALID_EBP, &MDRawContextX86::ebp }, - { "$eax", NULL, false, - StackFrameX86::CONTEXT_VALID_EAX, &MDRawContextX86::eax }, - { "$ebx", NULL, true, - StackFrameX86::CONTEXT_VALID_EBX, &MDRawContextX86::ebx }, - { "$ecx", NULL, false, - StackFrameX86::CONTEXT_VALID_ECX, &MDRawContextX86::ecx }, - { "$edx", NULL, false, - StackFrameX86::CONTEXT_VALID_EDX, &MDRawContextX86::edx }, - { "$esi", NULL, true, - StackFrameX86::CONTEXT_VALID_ESI, &MDRawContextX86::esi }, - { "$edi", NULL, true, - StackFrameX86::CONTEXT_VALID_EDI, &MDRawContextX86::edi }, -}; - -StackwalkerX86::StackwalkerX86(const SystemInfo *system_info, - const MDRawContextX86 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context), - cfi_walker_(cfi_register_map_, - (sizeof(cfi_register_map_) / sizeof(cfi_register_map_[0]))) { - if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { - // The x86 is a 32-bit CPU, the limits of the supplied stack are invalid. - // Mark memory_ = NULL, which will cause stackwalking to fail. - BPLOG(ERROR) << "Memory out of range for stackwalking: " << - HexString(memory_->GetBase()) << "+" << - HexString(memory_->GetSize()); - memory_ = NULL; - } -} - -StackFrameX86::~StackFrameX86() { - if (windows_frame_info) - delete windows_frame_info; - windows_frame_info = NULL; - if (cfi_frame_info) - delete cfi_frame_info; - cfi_frame_info = NULL; -} - -StackFrame *StackwalkerX86::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameX86 *frame = new StackFrameX86(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameX86::CONTEXT_VALID_ALL; - frame->trust = StackFrame::FRAME_TRUST_CONTEXT; - frame->instruction = frame->context.eip; - - return frame; -} - -StackFrameX86 *StackwalkerX86::GetCallerByWindowsFrameInfo( - const vector &frames, - WindowsFrameInfo *last_frame_info) { - StackFrame::FrameTrust trust = StackFrame::FRAME_TRUST_NONE; - - StackFrameX86 *last_frame = static_cast(frames.back()); - - // Save the stack walking info we found, in case we need it later to - // find the callee of the frame we're constructing now. - last_frame->windows_frame_info = last_frame_info; - - // This function only covers the full STACK WIN case. If - // last_frame_info is VALID_PARAMETER_SIZE-only, then we should - // assume the traditional frame format or use some other strategy. - if (last_frame_info->valid != WindowsFrameInfo::VALID_ALL) - return NULL; - - // This stackwalker sets each frame's %esp to its value immediately prior - // to the CALL into the callee. This means that %esp points to the last - // callee argument pushed onto the stack, which may not be where %esp points - // after the callee returns. Specifically, the value is correct for the - // cdecl calling convention, but not other conventions. The cdecl - // convention requires a caller to pop its callee's arguments from the - // stack after the callee returns. This is usually accomplished by adding - // the known size of the arguments to %esp. Other calling conventions, - // including stdcall, thiscall, and fastcall, require the callee to pop any - // parameters stored on the stack before returning. This is usually - // accomplished by using the RET n instruction, which pops n bytes off - // the stack after popping the return address. - // - // Because each frame's %esp will point to a location on the stack after - // callee arguments have been PUSHed, when locating things in a stack frame - // relative to %esp, the size of the arguments to the callee need to be - // taken into account. This seems a little bit unclean, but it's better - // than the alternative, which would need to take these same things into - // account, but only for cdecl functions. With this implementation, we get - // to be agnostic about each function's calling convention. Furthermore, - // this is how Windows debugging tools work, so it means that the %esp - // values produced by this stackwalker directly correspond to the %esp - // values you'll see there. - // - // If the last frame has no callee (because it's the context frame), just - // set the callee parameter size to 0: the stack pointer can't point to - // callee arguments because there's no callee. This is correct as long - // as the context wasn't captured while arguments were being pushed for - // a function call. Note that there may be functions whose parameter sizes - // are unknown, 0 is also used in that case. When that happens, it should - // be possible to walk to the next frame without reference to %esp. - - u_int32_t last_frame_callee_parameter_size = 0; - int frames_already_walked = frames.size(); - if (frames_already_walked >= 2) { - const StackFrameX86 *last_frame_callee - = static_cast(frames[frames_already_walked - 2]); - WindowsFrameInfo *last_frame_callee_info - = last_frame_callee->windows_frame_info; - if (last_frame_callee_info && - (last_frame_callee_info->valid - & WindowsFrameInfo::VALID_PARAMETER_SIZE)) { - last_frame_callee_parameter_size = - last_frame_callee_info->parameter_size; - } - } - - // Set up the dictionary for the PostfixEvaluator. %ebp and %esp are used - // in each program string, and their previous values are known, so set them - // here. - PostfixEvaluator::DictionaryType dictionary; - // Provide the current register values. - dictionary["$ebp"] = last_frame->context.ebp; - dictionary["$esp"] = last_frame->context.esp; - // Provide constants from the debug info for last_frame and its callee. - // .cbCalleeParams is a Breakpad extension that allows us to use the - // PostfixEvaluator engine when certain types of debugging information - // are present without having to write the constants into the program - // string as literals. - dictionary[".cbCalleeParams"] = last_frame_callee_parameter_size; - dictionary[".cbSavedRegs"] = last_frame_info->saved_register_size; - dictionary[".cbLocals"] = last_frame_info->local_size; - dictionary[".raSearchStart"] = last_frame->context.esp + - last_frame_callee_parameter_size + - last_frame_info->local_size + - last_frame_info->saved_register_size; - dictionary[".cbParams"] = last_frame_info->parameter_size; - - // Decide what type of program string to use. The program string is in - // postfix notation and will be passed to PostfixEvaluator::Evaluate. - // Given the dictionary and the program string, it is possible to compute - // the return address and the values of other registers in the calling - // function. Because of bugs described below, the stack may need to be - // scanned for these values. The results of program string evaluation - // will be used to determine whether to scan for better values. - string program_string; - bool recover_ebp = true; - - trust = StackFrame::FRAME_TRUST_CFI; - if (!last_frame_info->program_string.empty()) { - // The FPO data has its own program string, which will tell us how to - // get to the caller frame, and may even fill in the values of - // nonvolatile registers and provide pointers to local variables and - // parameters. In some cases, particularly with program strings that use - // .raSearchStart, the stack may need to be scanned afterward. - program_string = last_frame_info->program_string; - } else if (last_frame_info->allocates_base_pointer) { - // The function corresponding to the last frame doesn't use the frame - // pointer for conventional purposes, but it does allocate a new - // frame pointer and use it for its own purposes. Its callee's - // information is still accessed relative to %esp, and the previous - // value of %ebp can be recovered from a location in its stack frame, - // within the saved-register area. - // - // Functions that fall into this category use the %ebp register for - // a purpose other than the frame pointer. They restore the caller's - // %ebp before returning. These functions create their stack frame - // after a CALL by decrementing the stack pointer in an amount - // sufficient to store local variables, and then PUSHing saved - // registers onto the stack. Arguments to a callee function, if any, - // are PUSHed after that. Walking up to the caller, therefore, - // can be done solely with calculations relative to the stack pointer - // (%esp). The return address is recovered from the memory location - // above the known sizes of the callee's parameters, saved registers, - // and locals. The caller's stack pointer (the value of %esp when - // the caller executed CALL) is the location immediately above the - // saved return address. The saved value of %ebp to be restored for - // the caller is at a known location in the saved-register area of - // the stack frame. - // - // For this type of frame, MSVC 14 (from Visual Studio 8/2005) in - // link-time code generation mode (/LTCG and /GL) can generate erroneous - // debugging data. The reported size of saved registers can be 0, - // which is clearly an error because these frames must, at the very - // least, save %ebp. For this reason, in addition to those given above - // about the use of .raSearchStart, the stack may need to be scanned - // for a better return address and a better frame pointer after the - // program string is evaluated. - // - // %eip_new = *(%esp_old + callee_params + saved_regs + locals) - // %ebp_new = *(%esp_old + callee_params + saved_regs - 8) - // %esp_new = %esp_old + callee_params + saved_regs + locals + 4 - program_string = "$eip .raSearchStart ^ = " - "$ebp $esp .cbCalleeParams + .cbSavedRegs + 8 - ^ = " - "$esp .raSearchStart 4 + ="; - } else { - // The function corresponding to the last frame doesn't use %ebp at - // all. The callee frame is located relative to %esp. - // - // The called procedure's instruction pointer and stack pointer are - // recovered in the same way as the case above, except that no - // frame pointer (%ebp) is used at all, so it is not saved anywhere - // in the callee's stack frame and does not need to be recovered. - // Because %ebp wasn't used in the callee, whatever value it has - // is the value that it had in the caller, so it can be carried - // straight through without bringing its validity into question. - // - // Because of the use of .raSearchStart, the stack will possibly be - // examined to locate a better return address after program string - // evaluation. The stack will not be examined to locate a saved - // %ebp value, because these frames do not save (or use) %ebp. - // - // %eip_new = *(%esp_old + callee_params + saved_regs + locals) - // %esp_new = %esp_old + callee_params + saved_regs + locals + 4 - // %ebp_new = %ebp_old - program_string = "$eip .raSearchStart ^ = " - "$esp .raSearchStart 4 + ="; - recover_ebp = false; - } - - // Now crank it out, making sure that the program string set at least the - // two required variables. - PostfixEvaluator evaluator = - PostfixEvaluator(&dictionary, memory_); - PostfixEvaluator::DictionaryValidityType dictionary_validity; - if (!evaluator.Evaluate(program_string, &dictionary_validity) || - dictionary_validity.find("$eip") == dictionary_validity.end() || - dictionary_validity.find("$esp") == dictionary_validity.end()) { - // Program string evaluation failed. It may be that %eip is not somewhere - // with stack frame info, and %ebp is pointing to non-stack memory, so - // our evaluation couldn't succeed. We'll scan the stack for a return - // address. This can happen if the stack is in a module for which - // we don't have symbols, and that module is compiled without a - // frame pointer. - u_int32_t location_start = last_frame->context.esp; - u_int32_t location, eip; - if (!ScanForReturnAddress(location_start, &location, &eip)) { - // if we can't find an instruction pointer even with stack scanning, - // give up. - return NULL; - } - - // This seems like a reasonable return address. Since program string - // evaluation failed, use it and set %esp to the location above the - // one where the return address was found. - dictionary["$eip"] = eip; - dictionary["$esp"] = location + 4; - trust = StackFrame::FRAME_TRUST_SCAN; - } - - // Since this stack frame did not use %ebp in a traditional way, - // locating the return address isn't entirely deterministic. In that - // case, the stack can be scanned to locate the return address. - // - // However, if program string evaluation resulted in both %eip and - // %ebp values of 0, trust that the end of the stack has been - // reached and don't scan for anything else. - if (dictionary["$eip"] != 0 || dictionary["$ebp"] != 0) { - int offset = 0; - - // This scan can only be done if a CodeModules object is available, to - // check that candidate return addresses are in fact inside a module. - // - // TODO(mmentovai): This ignores dynamically-generated code. One possible - // solution is to check the minidump's memory map to see if the candidate - // %eip value comes from a mapped executable page, although this would - // require dumps that contain MINIDUMP_MEMORY_INFO, which the Breakpad - // client doesn't currently write (it would need to call MiniDumpWriteDump - // with the MiniDumpWithFullMemoryInfo type bit set). Even given this - // ability, older OSes (pre-XP SP2) and CPUs (pre-P4) don't enforce - // an independent execute privilege on memory pages. - - u_int32_t eip = dictionary["$eip"]; - if (modules_ && !modules_->GetModuleForAddress(eip)) { - // The instruction pointer at .raSearchStart was invalid, so start - // looking one 32-bit word above that location. - u_int32_t location_start = dictionary[".raSearchStart"] + 4; - u_int32_t location; - if (ScanForReturnAddress(location_start, &location, &eip)) { - // This is a better return address that what program string - // evaluation found. Use it, and set %esp to the location above the - // one where the return address was found. - dictionary["$eip"] = eip; - dictionary["$esp"] = location + 4; - offset = location - location_start; - trust = StackFrame::FRAME_TRUST_CFI_SCAN; - } - } - - // When trying to recover the previous value of the frame pointer (%ebp), - // start looking at the lowest possible address in the saved-register - // area, and look at the entire saved register area, increased by the - // size of |offset| to account for additional data that may be on the - // stack. The scan is performed from the highest possible address to - // the lowest, because we expect that the function's prolog would have - // saved %ebp early. - u_int32_t ebp = dictionary["$ebp"]; - u_int32_t value; // throwaway variable to check pointer validity - if (recover_ebp && !memory_->GetMemoryAtAddress(ebp, &value)) { - int fp_search_bytes = last_frame_info->saved_register_size + offset; - u_int32_t location_end = last_frame->context.esp + - last_frame_callee_parameter_size; - - for (u_int32_t location = location_end + fp_search_bytes; - location >= location_end; - location -= 4) { - if (!memory_->GetMemoryAtAddress(location, &ebp)) - break; - - if (memory_->GetMemoryAtAddress(ebp, &value)) { - // The candidate value is a pointer to the same memory region - // (the stack). Prefer it as a recovered %ebp result. - dictionary["$ebp"] = ebp; - break; - } - } - } - } - - // Create a new stack frame (ownership will be transferred to the caller) - // and fill it in. - StackFrameX86 *frame = new StackFrameX86(); - - frame->trust = trust; - frame->context = last_frame->context; - frame->context.eip = dictionary["$eip"]; - frame->context.esp = dictionary["$esp"]; - frame->context.ebp = dictionary["$ebp"]; - frame->context_validity = StackFrameX86::CONTEXT_VALID_EIP | - StackFrameX86::CONTEXT_VALID_ESP | - StackFrameX86::CONTEXT_VALID_EBP; - - // These are nonvolatile (callee-save) registers, and the program string - // may have filled them in. - if (dictionary_validity.find("$ebx") != dictionary_validity.end()) { - frame->context.ebx = dictionary["$ebx"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_EBX; - } - if (dictionary_validity.find("$esi") != dictionary_validity.end()) { - frame->context.esi = dictionary["$esi"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_ESI; - } - if (dictionary_validity.find("$edi") != dictionary_validity.end()) { - frame->context.edi = dictionary["$edi"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_EDI; - } - - return frame; -} - -StackFrameX86 *StackwalkerX86::GetCallerByCFIFrameInfo( - const vector &frames, - CFIFrameInfo *cfi_frame_info) { - StackFrameX86 *last_frame = static_cast(frames.back()); - last_frame->cfi_frame_info = cfi_frame_info; - - scoped_ptr frame(new StackFrameX86()); - if (!cfi_walker_ - .FindCallerRegisters(*memory_, *cfi_frame_info, - last_frame->context, last_frame->context_validity, - &frame->context, &frame->context_validity)) - return NULL; - - // Make sure we recovered all the essentials. - static const int essentials = (StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP); - if ((frame->context_validity & essentials) != essentials) - return NULL; - - frame->trust = StackFrame::FRAME_TRUST_CFI; - - return frame.release(); -} - -StackFrameX86 *StackwalkerX86::GetCallerByEBPAtBase( - const vector &frames) { - StackFrame::FrameTrust trust; - StackFrameX86 *last_frame = static_cast(frames.back()); - u_int32_t last_esp = last_frame->context.esp; - u_int32_t last_ebp = last_frame->context.ebp; - - // Assume that the standard %ebp-using x86 calling convention is in - // use. - // - // The typical x86 calling convention, when frame pointers are present, - // is for the calling procedure to use CALL, which pushes the return - // address onto the stack and sets the instruction pointer (%eip) to - // the entry point of the called routine. The called routine then - // PUSHes the calling routine's frame pointer (%ebp) onto the stack - // before copying the stack pointer (%esp) to the frame pointer (%ebp). - // Therefore, the calling procedure's frame pointer is always available - // by dereferencing the called procedure's frame pointer, and the return - // address is always available at the memory location immediately above - // the address pointed to by the called procedure's frame pointer. The - // calling procedure's stack pointer (%esp) is 8 higher than the value - // of the called procedure's frame pointer at the time the calling - // procedure made the CALL: 4 bytes for the return address pushed by the - // CALL itself, and 4 bytes for the callee's PUSH of the caller's frame - // pointer. - // - // %eip_new = *(%ebp_old + 4) - // %esp_new = %ebp_old + 8 - // %ebp_new = *(%ebp_old) - - u_int32_t caller_eip, caller_esp, caller_ebp; - - if (memory_->GetMemoryAtAddress(last_ebp + 4, &caller_eip) && - memory_->GetMemoryAtAddress(last_ebp, &caller_ebp)) { - caller_esp = last_ebp + 8; - trust = StackFrame::FRAME_TRUST_FP; - } else { - // We couldn't read the memory %ebp refers to. It may be that %ebp - // is pointing to non-stack memory. We'll scan the stack for a - // return address. This can happen if last_frame is executing code - // for a module for which we don't have symbols, and that module - // is compiled without a frame pointer. - if (!ScanForReturnAddress(last_esp, &caller_esp, &caller_eip)) { - // if we can't find an instruction pointer even with stack scanning, - // give up. - return NULL; - } - - // ScanForReturnAddress found a reasonable return address. Advance - // %esp to the location above the one where the return address was - // found. Assume that %ebp is unchanged. - caller_esp += 4; - caller_ebp = last_ebp; - - trust = StackFrame::FRAME_TRUST_SCAN; - } - - // Create a new stack frame (ownership will be transferred to the caller) - // and fill it in. - StackFrameX86 *frame = new StackFrameX86(); - - frame->trust = trust; - frame->context = last_frame->context; - frame->context.eip = caller_eip; - frame->context.esp = caller_esp; - frame->context.ebp = caller_ebp; - frame->context_validity = StackFrameX86::CONTEXT_VALID_EIP | - StackFrameX86::CONTEXT_VALID_ESP | - StackFrameX86::CONTEXT_VALID_EBP; - - return frame; -} - -StackFrame *StackwalkerX86::GetCallerFrame(const CallStack *stack) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - const vector &frames = *stack->frames(); - StackFrameX86 *last_frame = static_cast(frames.back()); - scoped_ptr new_frame; - - // If the resolver has Windows stack walking information, use that. - WindowsFrameInfo *windows_frame_info - = resolver_ ? resolver_->FindWindowsFrameInfo(last_frame) : NULL; - if (windows_frame_info) - new_frame.reset(GetCallerByWindowsFrameInfo(frames, windows_frame_info)); - - // If the resolver has DWARF CFI information, use that. - if (!new_frame.get()) { - CFIFrameInfo *cfi_frame_info = - resolver_ ? resolver_->FindCFIFrameInfo(last_frame) : NULL; - if (cfi_frame_info) - new_frame.reset(GetCallerByCFIFrameInfo(frames, cfi_frame_info)); - } - - // Otherwise, hope that the program was using a traditional frame structure. - if (!new_frame.get()) - new_frame.reset(GetCallerByEBPAtBase(frames)); - - // If nothing worked, tell the caller. - if (!new_frame.get()) - return NULL; - - // Treat an instruction address of 0 as end-of-stack. - if (new_frame->context.eip == 0) - return NULL; - - // If the new stack pointer is at a lower address than the old, then - // that's clearly incorrect. Treat this as end-of-stack to enforce - // progress and avoid infinite loops. - if (new_frame->context.esp <= last_frame->context.esp) - return NULL; - - // new_frame->context.eip is the return address, which is one instruction - // past the CALL that caused us to arrive at the callee. Set - // new_frame->instruction to one less than that. This won't reference the - // beginning of the CALL instruction, but it's guaranteed to be within - // the CALL, which is sufficient to get the source line information to - // match up with the line that contains a function call. Callers that - // require the exact return address value may access the context.eip - // field of StackFrameX86. - new_frame->instruction = new_frame->context.eip - 1; - - return new_frame.release(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.h deleted file mode 100644 index 9c56ae80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86.h +++ /dev/null @@ -1,114 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_x86.h: x86-specific stackwalker. -// -// Provides stack frames given x86 register context and a memory region -// corresponding to an x86 stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_X86_H__ -#define PROCESSOR_STACKWALKER_X86_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/cfi_frame_info.h" - -namespace google_breakpad { - -class CodeModules; - - -class StackwalkerX86 : public Stackwalker { - public: - // context is an x86 context object that gives access to x86-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerX86(const SystemInfo *system_info, - const MDRawContextX86 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // A STACK CFI-driven frame walker for the X86. - typedef SimpleCFIWalker CFIWalker; - - // Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and - // stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or - // alternate conventions as guided by any WindowsFrameInfo available for the - // code in question.). - virtual StackFrame *GetContextFrame(); - virtual StackFrame *GetCallerFrame(const CallStack *stack); - - // Use windows_frame_info (derived from STACK WIN and FUNC records) - // to construct the frame that called frames.back(). The caller - // takes ownership of the returned frame. Return NULL on failure. - StackFrameX86 *GetCallerByWindowsFrameInfo( - const vector &frames, - WindowsFrameInfo *windows_frame_info); - - // Use cfi_frame_info (derived from STACK CFI records) to construct - // the frame that called frames.back(). The caller takes ownership - // of the returned frame. Return NULL on failure. - StackFrameX86 *GetCallerByCFIFrameInfo(const vector &frames, - CFIFrameInfo *cfi_frame_info); - - // Assuming a traditional frame layout --- where the caller's %ebp - // has been pushed just after the return address and the callee's - // %ebp points to the saved %ebp --- construct the frame that called - // frames.back(). The caller takes ownership of the returned frame. - // Return NULL on failure. - StackFrameX86 *GetCallerByEBPAtBase(const vector &frames); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextX86 *context_; - - // Our register map, for cfi_walker_. - static const CFIWalker::RegisterSet cfi_register_map_[]; - - // Our CFI frame walker. - const CFIWalker cfi_walker_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_X86_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86_unittest.cc deleted file mode 100644 index aa6b6310..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/stackwalker_x86_unittest.cc +++ /dev/null @@ -1,973 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// stackwalker_x86_unittest.cc: Unit tests for StackwalkerX86 class. - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "common/test_assembler.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/stackwalker_unittest_utils.h" -#include "processor/stackwalker_x86.h" -#include "processor/windows_frame_info.h" - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::StackFrame; -using google_breakpad::StackFrameX86; -using google_breakpad::StackwalkerX86; -using google_breakpad::SystemInfo; -using google_breakpad::WindowsFrameInfo; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Label; -using google_breakpad::test_assembler::Section; -using std::string; -using std::vector; -using testing::_; -using testing::Return; -using testing::SetArgumentPointee; -using testing::Test; - -class StackwalkerX86Fixture { - public: - StackwalkerX86Fixture() - : stack_section(kLittleEndian), - // Give the two modules reasonable standard locations and names - // for tests to play with. - module1(0x40000000, 0x10000, "module1", "version1"), - module2(0x50000000, 0x10000, "module2", "version2") { - // Identify the system as a Linux system. - system_info.os = "Linux"; - system_info.os_short = "linux"; - system_info.os_version = "Salacious Skink"; - system_info.cpu = "x86"; - system_info.cpu_info = ""; - - // Put distinctive values in the raw CPU context. - BrandContext(&raw_context); - - // Create some modules with some stock debugging information. - modules.Add(&module1); - modules.Add(&module2); - - // By default, none of the modules have symbol info; call - // SetModuleSymbols to override this. - EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _)) - .WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND)); - } - - // Set the Breakpad symbol information that supplier should return for - // MODULE to INFO. - void SetModuleSymbols(MockCodeModule *module, const string &info) { - unsigned int buffer_size = info.size() + 1; - char *buffer = reinterpret_cast(operator new(buffer_size)); - strcpy(buffer, info.c_str()); - EXPECT_CALL(supplier, GetCStringSymbolData(module, &system_info, _, _)) - .WillRepeatedly(DoAll(SetArgumentPointee<3>(buffer), - Return(MockSymbolSupplier::FOUND))); - } - - // Populate stack_region with the contents of stack_section. Use - // stack_section.start() as the region's starting address. - void RegionFromSection() { - string contents; - ASSERT_TRUE(stack_section.GetContents(&contents)); - stack_region.Init(stack_section.start().Value(), contents); - } - - // Fill RAW_CONTEXT with pseudo-random data, for round-trip checking. - void BrandContext(MDRawContextX86 *raw_context) { - u_int8_t x = 173; - for (size_t i = 0; i < sizeof(*raw_context); i++) - reinterpret_cast(raw_context)[i] = (x += 17); - } - - SystemInfo system_info; - MDRawContextX86 raw_context; - Section stack_section; - MockMemoryRegion stack_region; - MockCodeModule module1; - MockCodeModule module2; - MockCodeModules modules; - MockSymbolSupplier supplier; - BasicSourceLineResolver resolver; - CallStack call_stack; - const vector *frames; -}; - -class SanityCheck: public StackwalkerX86Fixture, public Test { }; - -TEST_F(SanityCheck, NoResolver) { - stack_section.start() = 0x80000000; - stack_section.D32(0).D32(0); // end-of-stack marker - RegionFromSection(); - raw_context.eip = 0x40000200; - raw_context.ebp = 0x80000000; - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - NULL, NULL); - // This should succeed, even without a resolver or supplier. - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - StackFrameX86 *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -class GetContextFrame: public StackwalkerX86Fixture, public Test { }; - -TEST_F(GetContextFrame, Simple) { - stack_section.start() = 0x80000000; - stack_section.D32(0).D32(0); // end-of-stack marker - RegionFromSection(); - raw_context.eip = 0x40000200; - raw_context.ebp = 0x80000000; - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - StackFrameX86 *frame = static_cast(frames->at(0)); - // Check that the values from the original raw context made it - // through to the context in the stack frame. - EXPECT_EQ(0, memcmp(&raw_context, &frame->context, sizeof(raw_context))); -} - -class GetCallerFrame: public StackwalkerX86Fixture, public Test { }; - -// Walk a traditional frame. A traditional frame saves the caller's -// %ebp just below the return address, and has its own %ebp pointing -// at the saved %ebp. -TEST_F(GetCallerFrame, Traditional) { - stack_section.start() = 0x80000000; - Label frame0_ebp, frame1_ebp; - stack_section - .Append(12, 0) // frame 0: space - .Mark(&frame0_ebp) // frame 0 %ebp points here - .D32(frame1_ebp) // frame 0: saved %ebp - .D32(0x40008679) // frame 0: return address - .Append(8, 0) // frame 1: space - .Mark(&frame1_ebp) // frame 1 %ebp points here - .D32(0) // frame 1: saved %ebp (stack end) - .D32(0); // frame 1: return address (stack end) - RegionFromSection(); - raw_context.eip = 0x4000c7a5; - raw_context.esp = stack_section.start().Value(); - raw_context.ebp = frame0_ebp.Value(); - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - EXPECT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x4000c7a5U, frame0->instruction); - EXPECT_EQ(0x4000c7a5U, frame0->context.eip); - EXPECT_EQ(frame0_ebp.Value(), frame0->context.ebp); - EXPECT_EQ(NULL, frame0->windows_frame_info); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_FP, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x40008679U, frame1->instruction + 1); - EXPECT_EQ(0x40008679U, frame1->context.eip); - EXPECT_EQ(frame1_ebp.Value(), frame1->context.ebp); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -// Walk a traditional frame, but use a bogus %ebp value, forcing a scan -// of the stack for something that looks like a return address. -TEST_F(GetCallerFrame, TraditionalScan) { - stack_section.start() = 0x80000000; - Label frame1_ebp; - stack_section - // frame 0 - .D32(0xf065dc76) // locals area: - .D32(0x46ee2167) // garbage that doesn't look like - .D32(0xbab023ec) // a return address - .D32(frame1_ebp) // saved %ebp (%ebp fails to point here, forcing scan) - .D32(0x4000129d) // return address - // frame 1 - .Append(8, 0) // space - .Mark(&frame1_ebp) // %ebp points here - .D32(0) // saved %ebp (stack end) - .D32(0); // return address (stack end) - - RegionFromSection(); - raw_context.eip = 0x4000f49d; - raw_context.esp = stack_section.start().Value(); - // Make the frame pointer bogus, to make the stackwalker scan the stack - // for something that looks like a return address. - raw_context.ebp = 0xd43eed6e; - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x4000f49dU, frame0->instruction); - EXPECT_EQ(0x4000f49dU, frame0->context.eip); - EXPECT_EQ(stack_section.start().Value(), frame0->context.esp); - EXPECT_EQ(0xd43eed6eU, frame0->context.ebp); - EXPECT_EQ(NULL, frame0->windows_frame_info); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - // I'd argue that CONTEXT_VALID_EBP shouldn't be here, since the - // walker does not actually fetch the EBP after a scan (forcing the - // next frame to be scanned as well). But let's grandfather the existing - // behavior in for now. - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x4000129dU, frame1->instruction + 1); - EXPECT_EQ(0x4000129dU, frame1->context.eip); - EXPECT_EQ(0x80000014U, frame1->context.esp); - EXPECT_EQ(0xd43eed6eU, frame1->context.ebp); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -// Force scanning for a return address a long way down the stack -TEST_F(GetCallerFrame, TraditionalScanLongWay) { - stack_section.start() = 0x80000000; - Label frame1_ebp; - stack_section - // frame 0 - .D32(0xf065dc76) // locals area: - .D32(0x46ee2167) // garbage that doesn't look like - .D32(0xbab023ec) // a return address - .Append(20 * 4, 0) // a bunch of space - .D32(frame1_ebp) // saved %ebp (%ebp fails to point here, forcing scan) - .D32(0x4000129d) // return address - // frame 1 - .Append(8, 0) // space - .Mark(&frame1_ebp) // %ebp points here - .D32(0) // saved %ebp (stack end) - .D32(0); // return address (stack end) - - RegionFromSection(); - raw_context.eip = 0x4000f49d; - raw_context.esp = stack_section.start().Value(); - // Make the frame pointer bogus, to make the stackwalker scan the stack - // for something that looks like a return address. - raw_context.ebp = 0xd43eed6e; - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x4000f49dU, frame0->instruction); - EXPECT_EQ(0x4000f49dU, frame0->context.eip); - EXPECT_EQ(stack_section.start().Value(), frame0->context.esp); - EXPECT_EQ(0xd43eed6eU, frame0->context.ebp); - EXPECT_EQ(NULL, frame0->windows_frame_info); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - // I'd argue that CONTEXT_VALID_EBP shouldn't be here, since the - // walker does not actually fetch the EBP after a scan (forcing the - // next frame to be scanned as well). But let's grandfather the existing - // behavior in for now. - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x4000129dU, frame1->instruction + 1); - EXPECT_EQ(0x4000129dU, frame1->context.eip); - EXPECT_EQ(0x80000064U, frame1->context.esp); - EXPECT_EQ(0xd43eed6eU, frame1->context.ebp); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -// Use Windows frame data (a "STACK WIN 4" record, from a -// FrameTypeFrameData DIA record) to walk a stack frame. -TEST_F(GetCallerFrame, WindowsFrameData) { - SetModuleSymbols(&module1, - "STACK WIN 4 aa85 176 0 0 4 10 4 0 1" - " $T2 $esp .cbSavedRegs + =" - " $T0 .raSearchStart =" - " $eip $T0 ^ =" - " $esp $T0 4 + =" - " $ebx $T2 4 - ^ =" - " $edi $T2 8 - ^ =" - " $esi $T2 12 - ^ =" - " $ebp $T2 16 - ^ =\n"); - Label frame1_esp, frame1_ebp; - stack_section.start() = 0x80000000; - stack_section - // frame 0 - .D32(frame1_ebp) // saved regs: %ebp - .D32(0xa7120d1a) // %esi - .D32(0x630891be) // %edi - .D32(0x9068a878) // %ebx - .D32(0xa08ea45f) // locals: unused - .D32(0x40001350) // return address - // frame 1 - .Mark(&frame1_esp) - .Append(12, 0) // empty space - .Mark(&frame1_ebp) - .D32(0) // saved %ebp (stack end) - .D32(0); // saved %eip (stack end) - - RegionFromSection(); - raw_context.eip = 0x4000aa85; - raw_context.esp = stack_section.start().Value(); - raw_context.ebp = 0xf052c1de; // should not be needed to walk frame - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x4000aa85U, frame0->instruction); - EXPECT_EQ(0x4000aa85U, frame0->context.eip); - EXPECT_EQ(stack_section.start().Value(), frame0->context.esp); - EXPECT_EQ(0xf052c1deU, frame0->context.ebp); - EXPECT_TRUE(frame0->windows_frame_info != NULL); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP - | StackFrameX86::CONTEXT_VALID_EBX - | StackFrameX86::CONTEXT_VALID_ESI - | StackFrameX86::CONTEXT_VALID_EDI), - frame1->context_validity); - EXPECT_EQ(0x40001350U, frame1->instruction + 1); - EXPECT_EQ(0x40001350U, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_EQ(frame1_ebp.Value(), frame1->context.ebp); - EXPECT_EQ(0x9068a878U, frame1->context.ebx); - EXPECT_EQ(0xa7120d1aU, frame1->context.esi); - EXPECT_EQ(0x630891beU, frame1->context.edi); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -// Use Windows frame data (a "STACK WIN 4" record, from a -// FrameTypeFrameData DIA record) to walk a frame, and depend on the -// parameter size from the callee as well. -TEST_F(GetCallerFrame, WindowsFrameDataParameterSize) { - SetModuleSymbols(&module1, "FUNC 1000 100 c module1::wheedle\n"); - SetModuleSymbols(&module2, - // Note bogus parameter size in FUNC record; the stack walker - // should prefer the STACK WIN record, and see '4' below. - "FUNC aa85 176 beef module2::whine\n" - "STACK WIN 4 aa85 176 0 0 4 10 4 0 1" - " $T2 $esp .cbLocals + .cbSavedRegs + =" - " $T0 .raSearchStart =" - " $eip $T0 ^ =" - " $esp $T0 4 + =" - " $ebp $T0 20 - ^ =" - " $ebx $T0 8 - ^ =\n"); - Label frame0_esp, frame0_ebp; - Label frame1_esp; - Label frame2_esp, frame2_ebp; - stack_section.start() = 0x80000000; - stack_section - // frame 0, in module1::wheedle. Traditional frame. - .Mark(&frame0_esp) - .Append(16, 0) // frame space - .Mark(&frame0_ebp) - .D32(0x6fa902e0) // saved %ebp. Not a frame pointer. - .D32(0x5000aa95) // return address, in module2::whine - // frame 1, in module2::whine. FrameData frame. - .Mark(&frame1_esp) - .D32(0xbaa0cb7a) // argument 3 passed to module1::wheedle - .D32(0xbdc92f9f) // argument 2 - .D32(0x0b1d8442) // argument 1 - .D32(frame2_ebp) // saved %ebp - .D32(0xb1b90a15) // unused - .D32(0xf18e072d) // unused - .D32(0x2558c7f3) // saved %ebx - .D32(0x0365e25e) // unused - .D32(0x2a179e38) // return address; $T0 points here - // frame 2, in no module - .Mark(&frame2_esp) - .Append(12, 0) // empty space - .Mark(&frame2_ebp) - .D32(0) // saved %ebp (stack end) - .D32(0); // saved %eip (stack end) - - RegionFromSection(); - raw_context.eip = 0x40001004; // in module1::wheedle - raw_context.esp = stack_section.start().Value(); - raw_context.ebp = frame0_ebp.Value(); - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(3U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x40001004U, frame0->instruction); - EXPECT_EQ(0x40001004U, frame0->context.eip); - EXPECT_EQ(frame0_esp.Value(), frame0->context.esp); - EXPECT_EQ(frame0_ebp.Value(), frame0->context.ebp); - EXPECT_EQ(&module1, frame0->module); - EXPECT_EQ("module1::wheedle", frame0->function_name); - EXPECT_EQ(0x40001000U, frame0->function_base); - // The FUNC record for module1::wheedle should have produced a - // WindowsFrameInfo structure with only the parameter size valid. - ASSERT_TRUE(frame0->windows_frame_info != NULL); - EXPECT_EQ(WindowsFrameInfo::VALID_PARAMETER_SIZE, - frame0->windows_frame_info->valid); - EXPECT_EQ(12U, frame0->windows_frame_info->parameter_size); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_FP, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x5000aa95U, frame1->instruction + 1); - EXPECT_EQ(0x5000aa95U, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_EQ(0x6fa902e0U, frame1->context.ebp); - EXPECT_EQ(&module2, frame1->module); - EXPECT_EQ("module2::whine", frame1->function_name); - EXPECT_EQ(0x5000aa85U, frame1->function_base); - ASSERT_TRUE(frame1->windows_frame_info != NULL); - EXPECT_EQ(WindowsFrameInfo::VALID_ALL, frame1->windows_frame_info->valid); - // This should not see the 0xbeef parameter size from the FUNC - // record, but should instead see the STACK WIN record. - EXPECT_EQ(4U, frame1->windows_frame_info->parameter_size); - - StackFrameX86 *frame2 = static_cast(frames->at(2)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame2->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP - | StackFrameX86::CONTEXT_VALID_EBX), - frame2->context_validity); - EXPECT_EQ(0x2a179e38U, frame2->instruction + 1); - EXPECT_EQ(0x2a179e38U, frame2->context.eip); - EXPECT_EQ(frame2_esp.Value(), frame2->context.esp); - EXPECT_EQ(frame2_ebp.Value(), frame2->context.ebp); - EXPECT_EQ(0x2558c7f3U, frame2->context.ebx); - EXPECT_EQ(NULL, frame2->module); - EXPECT_EQ(NULL, frame2->windows_frame_info); -} - -// Use Windows frame data (a "STACK WIN 4" record, from a -// FrameTypeFrameData DIA record) to walk a stack frame, where the -// expression fails to yield both an $eip and an $ebp value, and the stack -// walker must scan. -TEST_F(GetCallerFrame, WindowsFrameDataScan) { - SetModuleSymbols(&module1, - "STACK WIN 4 c8c 111 0 0 4 10 4 0 1 bad program string\n"); - // Mark frame 1's PC as the end of the stack. - SetModuleSymbols(&module2, - "FUNC 7c38 accf 0 module2::function\n" - "STACK WIN 4 7c38 accf 0 0 4 10 4 0 1 $eip 0 = $ebp 0 =\n"); - Label frame1_esp; - stack_section.start() = 0x80000000; - stack_section - // frame 0 - .Append(16, 0x2a) // unused, garbage - .D32(0x50007ce9) // return address - // frame 1 - .Mark(&frame1_esp) - .Append(8, 0); // empty space - - RegionFromSection(); - raw_context.eip = 0x40000c9c; - raw_context.esp = stack_section.start().Value(); - raw_context.ebp = 0x2ae314cd; // should not be needed to walk frame - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x40000c9cU, frame0->instruction); - EXPECT_EQ(0x40000c9cU, frame0->context.eip); - EXPECT_EQ(stack_section.start().Value(), frame0->context.esp); - EXPECT_EQ(0x2ae314cdU, frame0->context.ebp); - EXPECT_TRUE(frame0->windows_frame_info != NULL); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_SCAN, frame1->trust); - // I'd argue that CONTEXT_VALID_EBP shouldn't be here, since the walker - // does not actually fetch the EBP after a scan (forcing the next frame - // to be scanned as well). But let's grandfather the existing behavior in - // for now. - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x50007ce9U, frame1->instruction + 1); - EXPECT_EQ(0x50007ce9U, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_TRUE(frame1->windows_frame_info != NULL); -} - -// Use Windows frame data (a "STACK WIN 4" record, from a -// FrameTypeFrameData DIA record) to walk a stack frame, where the -// expression yields an $eip that falls outside of any module, and the -// stack walker must scan. -TEST_F(GetCallerFrame, WindowsFrameDataBadEIPScan) { - SetModuleSymbols(&module1, - "STACK WIN 4 6e6 e7 0 0 0 8 4 0 1" - // A traditional frame, actually. - " $eip $ebp 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =\n"); - // Mark frame 1's PC as the end of the stack. - SetModuleSymbols(&module2, - "FUNC cfdb 8406 0 module2::function\n" - "STACK WIN 4 cfdb 8406 0 0 0 0 0 0 1 $eip 0 = $ebp 0 =\n"); - stack_section.start() = 0x80000000; - - // In this stack, the context's %ebp is pointing at the wrong place, so - // the stack walker needs to scan to find the return address, and then - // scan again to find the caller's saved %ebp. - Label frame0_ebp, frame1_ebp, frame1_esp; - stack_section - // frame 0 - .Append(8, 0x2a) // garbage - .Mark(&frame0_ebp) // frame 0 %ebp points here, but should point - // at *** below - // The STACK WIN record says that the following two values are - // frame 1's saved %ebp and return address, but the %ebp is wrong; - // they're garbage. The stack walker will scan for the right values. - .D32(0x3d937b2b) // alleged to be frame 1's saved %ebp - .D32(0x17847f5b) // alleged to be frame 1's return address - .D32(frame1_ebp) // frame 1's real saved %ebp; scan will find - .D32(0x2b2b2b2b) // first word of realigned register save area - // *** frame 0 %ebp ought to be pointing here - .D32(0x2c2c2c2c) // realigned locals area - .D32(0x5000d000) // frame 1's real saved %eip; scan will find - // Frame 1, in module2::function. The STACK WIN record describes - // this as the oldest frame, without referring to its contents, so - // we needn't to provide any actual data here. - .Mark(&frame1_esp) - .Mark(&frame1_ebp) // frame 1 %ebp points here - // A dummy value for frame 1's %ebp to point at. The scan recognizes the - // saved %ebp because it points to a valid word in the stack memory region. - .D32(0x2d2d2d2d); - - RegionFromSection(); - raw_context.eip = 0x40000700; - raw_context.esp = stack_section.start().Value(); - raw_context.ebp = frame0_ebp.Value(); - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x40000700U, frame0->instruction); - EXPECT_EQ(0x40000700U, frame0->context.eip); - EXPECT_EQ(stack_section.start().Value(), frame0->context.esp); - EXPECT_EQ(frame0_ebp.Value(), frame0->context.ebp); - EXPECT_TRUE(frame0->windows_frame_info != NULL); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI_SCAN, frame1->trust); - // I'd argue that CONTEXT_VALID_EBP shouldn't be here, since the - // walker does not actually fetch the EBP after a scan (forcing the - // next frame to be scanned as well). But let's grandfather the existing - // behavior in for now. - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x5000d000U, frame1->instruction + 1); - EXPECT_EQ(0x5000d000U, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_EQ(frame1_ebp.Value(), frame1->context.ebp); - EXPECT_TRUE(frame1->windows_frame_info != NULL); -} - -// Use Windows FrameTypeFPO data to walk a stack frame for a function that -// does not modify %ebp from the value it had in the caller. -TEST_F(GetCallerFrame, WindowsFPOUnchangedEBP) { - SetModuleSymbols(&module1, - // Note bogus parameter size in FUNC record; the walker - // should prefer the STACK WIN record, and see the '8' below. - "FUNC e8a8 100 feeb module1::discombobulated\n" - "STACK WIN 0 e8a8 100 0 0 8 4 10 0 0 0\n"); - Label frame0_esp; - Label frame1_esp, frame1_ebp; - stack_section.start() = 0x80000000; - stack_section - // frame 0, in module1::wheedle. FrameTypeFPO (STACK WIN 0) frame. - .Mark(&frame0_esp) - // no outgoing parameters; this is the youngest frame. - .D32(0x7c521352) // four bytes of saved registers - .Append(0x10, 0x42) // local area - .D32(0x40009b5b) // return address, in module1, no function - // frame 1, in module1, no function. - .Mark(&frame1_esp) - .D32(0xf60ea7fc) // junk - .Mark(&frame1_ebp) - .D32(0) // saved %ebp (stack end) - .D32(0); // saved %eip (stack end) - - RegionFromSection(); - raw_context.eip = 0x4000e8b8; // in module1::whine - raw_context.esp = stack_section.start().Value(); - // Frame pointer unchanged from caller. - raw_context.ebp = frame1_ebp.Value(); - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x4000e8b8U, frame0->instruction); - EXPECT_EQ(0x4000e8b8U, frame0->context.eip); - EXPECT_EQ(frame0_esp.Value(), frame0->context.esp); - EXPECT_EQ(frame1_ebp.Value(), frame0->context.ebp); // unchanged from caller - EXPECT_EQ(&module1, frame0->module); - EXPECT_EQ("module1::discombobulated", frame0->function_name); - EXPECT_EQ(0x4000e8a8U, frame0->function_base); - // The STACK WIN record for module1::discombobulated should have - // produced a fully populated WindowsFrameInfo structure. - ASSERT_TRUE(frame0->windows_frame_info != NULL); - EXPECT_EQ(WindowsFrameInfo::VALID_ALL, frame0->windows_frame_info->valid); - EXPECT_EQ(0x10U, frame0->windows_frame_info->local_size); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x40009b5bU, frame1->instruction + 1); - EXPECT_EQ(0x40009b5bU, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_EQ(frame1_ebp.Value(), frame1->context.ebp); - EXPECT_EQ(&module1, frame1->module); - EXPECT_EQ("", frame1->function_name); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -// Use Windows FrameTypeFPO data to walk a stack frame for a function -// that uses %ebp for its own purposes, saving the value it had in the -// caller in the standard place in the saved register area. -TEST_F(GetCallerFrame, WindowsFPOUsedEBP) { - SetModuleSymbols(&module1, - // Note bogus parameter size in FUNC record; the walker - // should prefer the STACK WIN record, and see the '8' below. - "FUNC 9aa8 e6 abbe module1::RaisedByTheAliens\n" - "STACK WIN 0 9aa8 e6 a 0 10 8 4 0 0 1\n"); - Label frame0_esp; - Label frame1_esp, frame1_ebp; - stack_section.start() = 0x80000000; - stack_section - // frame 0, in module1::wheedle. FrameTypeFPO (STACK WIN 0) frame. - .Mark(&frame0_esp) - // no outgoing parameters; this is the youngest frame. - .D32(frame1_ebp) // saved register area: saved %ebp - .D32(0xb68bd5f9) // saved register area: something else - .D32(0xd25d05fc) // local area - .D32(0x4000debe) // return address, in module1, no function - // frame 1, in module1, no function. - .Mark(&frame1_esp) - .D32(0xf0c9a974) // junk - .Mark(&frame1_ebp) - .D32(0) // saved %ebp (stack end) - .D32(0); // saved %eip (stack end) - - RegionFromSection(); - raw_context.eip = 0x40009ab8; // in module1::RaisedByTheAliens - raw_context.esp = stack_section.start().Value(); - // RaisedByTheAliens uses %ebp for its own mysterious purposes. - raw_context.ebp = 0xecbdd1a5; - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ(0x40009ab8U, frame0->instruction); - EXPECT_EQ(0x40009ab8U, frame0->context.eip); - EXPECT_EQ(frame0_esp.Value(), frame0->context.esp); - EXPECT_EQ(0xecbdd1a5, frame0->context.ebp); - EXPECT_EQ(&module1, frame0->module); - EXPECT_EQ("module1::RaisedByTheAliens", frame0->function_name); - EXPECT_EQ(0x40009aa8U, frame0->function_base); - // The STACK WIN record for module1::RaisedByTheAliens should have - // produced a fully populated WindowsFrameInfo structure. - ASSERT_TRUE(frame0->windows_frame_info != NULL); - EXPECT_EQ(WindowsFrameInfo::VALID_ALL, frame0->windows_frame_info->valid); - EXPECT_EQ("", frame0->windows_frame_info->program_string); - EXPECT_TRUE(frame0->windows_frame_info->allocates_base_pointer); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP - | StackFrameX86::CONTEXT_VALID_ESP - | StackFrameX86::CONTEXT_VALID_EBP), - frame1->context_validity); - EXPECT_EQ(0x4000debeU, frame1->instruction + 1); - EXPECT_EQ(0x4000debeU, frame1->context.eip); - EXPECT_EQ(frame1_esp.Value(), frame1->context.esp); - EXPECT_EQ(frame1_ebp.Value(), frame1->context.ebp); - EXPECT_EQ(&module1, frame1->module); - EXPECT_EQ("", frame1->function_name); - EXPECT_EQ(NULL, frame1->windows_frame_info); -} - -struct CFIFixture: public StackwalkerX86Fixture { - CFIFixture() { - // Provide a bunch of STACK CFI records; individual tests walk to the - // caller from every point in this series, expecting to find the same - // set of register values. - SetModuleSymbols(&module1, - // The youngest frame's function. - "FUNC 4000 1000 10 enchiridion\n" - // Initially, just a return address. - "STACK CFI INIT 4000 100 .cfa: $esp 4 + .ra: .cfa 4 - ^\n" - // Push %ebx. - "STACK CFI 4001 .cfa: $esp 8 + $ebx: .cfa 8 - ^\n" - // Move %esi into %ebx. Weird, but permitted. - "STACK CFI 4002 $esi: $ebx\n" - // Allocate frame space, and save %edi. - "STACK CFI 4003 .cfa: $esp 20 + $edi: .cfa 16 - ^\n" - // Put the return address in %edi. - "STACK CFI 4005 .ra: $edi\n" - // Save %ebp, and use it as a frame pointer. - "STACK CFI 4006 .cfa: $ebp 8 + $ebp: .cfa 12 - ^\n" - - // The calling function. - "FUNC 5000 1000 10 epictetus\n" - // Mark it as end of stack. - "STACK CFI INIT 5000 1000 .cfa: $esp .ra 0\n"); - - // Provide some distinctive values for the caller's registers. - expected.esp = 0x80000000; - expected.eip = 0x40005510; - expected.ebp = 0xc0d4aab9; - expected.ebx = 0x60f20ce6; - expected.esi = 0x53d1379d; - expected.edi = 0xafbae234; - - // By default, registers are unchanged. - raw_context = expected; - } - - // Walk the stack, using stack_section as the contents of the stack - // and raw_context as the current register values. (Set - // raw_context.esp to the stack's starting address.) Expect two - // stack frames; in the older frame, expect the callee-saves - // registers to have values matching those in 'expected'. - void CheckWalk() { - RegionFromSection(); - raw_context.esp = stack_section.start().Value(); - - StackwalkerX86 walker(&system_info, &raw_context, &stack_region, &modules, - &supplier, &resolver); - ASSERT_TRUE(walker.Walk(&call_stack)); - frames = call_stack.frames(); - ASSERT_EQ(2U, frames->size()); - - StackFrameX86 *frame0 = static_cast(frames->at(0)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CONTEXT, frame0->trust); - ASSERT_EQ(StackFrameX86::CONTEXT_VALID_ALL, frame0->context_validity); - EXPECT_EQ("enchiridion", frame0->function_name); - EXPECT_EQ(0x40004000U, frame0->function_base); - ASSERT_TRUE(frame0->windows_frame_info != NULL); - ASSERT_EQ(WindowsFrameInfo::VALID_PARAMETER_SIZE, - frame0->windows_frame_info->valid); - ASSERT_TRUE(frame0->cfi_frame_info != NULL); - - StackFrameX86 *frame1 = static_cast(frames->at(1)); - EXPECT_EQ(StackFrame::FRAME_TRUST_CFI, frame1->trust); - ASSERT_EQ((StackFrameX86::CONTEXT_VALID_EIP | - StackFrameX86::CONTEXT_VALID_ESP | - StackFrameX86::CONTEXT_VALID_EBP | - StackFrameX86::CONTEXT_VALID_EBX | - StackFrameX86::CONTEXT_VALID_ESI | - StackFrameX86::CONTEXT_VALID_EDI), - frame1->context_validity); - EXPECT_EQ(expected.eip, frame1->context.eip); - EXPECT_EQ(expected.esp, frame1->context.esp); - EXPECT_EQ(expected.ebp, frame1->context.ebp); - EXPECT_EQ(expected.ebx, frame1->context.ebx); - EXPECT_EQ(expected.esi, frame1->context.esi); - EXPECT_EQ(expected.edi, frame1->context.edi); - EXPECT_EQ("epictetus", frame1->function_name); - } - - // The values the stack walker should find for the caller's registers. - MDRawContextX86 expected; -}; - -class CFI: public CFIFixture, public Test { }; - -TEST_F(CFI, At4000) { - Label frame1_esp = expected.esp; - stack_section - .D32(0x40005510) // return address - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004000; - CheckWalk(); -} - -TEST_F(CFI, At4001) { - Label frame1_esp = expected.esp; - stack_section - .D32(0x60f20ce6) // saved %ebx - .D32(0x40005510) // return address - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004001; - raw_context.ebx = 0x91aa9a8b; // callee's %ebx value - CheckWalk(); -} - -TEST_F(CFI, At4002) { - Label frame1_esp = expected.esp; - stack_section - .D32(0x60f20ce6) // saved %ebx - .D32(0x40005510) // return address - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004002; - raw_context.ebx = 0x53d1379d; // saved %esi - raw_context.esi = 0xa5c790ed; // callee's %esi value - CheckWalk(); -} - -TEST_F(CFI, At4003) { - Label frame1_esp = expected.esp; - stack_section - .D32(0x56ec3db7) // garbage - .D32(0xafbae234) // saved %edi - .D32(0x53d67131) // garbage - .D32(0x60f20ce6) // saved %ebx - .D32(0x40005510) // return address - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004003; - raw_context.ebx = 0x53d1379d; // saved %esi - raw_context.esi = 0xa97f229d; // callee's %esi - raw_context.edi = 0xb05cc997; // callee's %edi - CheckWalk(); -} - -// The results here should be the same as those at module offset -// 0x4003. -TEST_F(CFI, At4004) { - Label frame1_esp = expected.esp; - stack_section - .D32(0xe29782c2) // garbage - .D32(0xafbae234) // saved %edi - .D32(0x5ba29ce9) // garbage - .D32(0x60f20ce6) // saved %ebx - .D32(0x40005510) // return address - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004004; - raw_context.ebx = 0x53d1379d; // saved %esi - raw_context.esi = 0x0fb7dc4e; // callee's %esi - raw_context.edi = 0x993b4280; // callee's %edi - CheckWalk(); -} - -TEST_F(CFI, At4005) { - Label frame1_esp = expected.esp; - stack_section - .D32(0xe29782c2) // garbage - .D32(0xafbae234) // saved %edi - .D32(0x5ba29ce9) // garbage - .D32(0x60f20ce6) // saved %ebx - .D32(0x8036cc02) // garbage - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004005; - raw_context.ebx = 0x53d1379d; // saved %esi - raw_context.esi = 0x0fb7dc4e; // callee's %esi - raw_context.edi = 0x40005510; // return address - CheckWalk(); -} - -TEST_F(CFI, At4006) { - Label frame0_ebp; - Label frame1_esp = expected.esp; - stack_section - .D32(0xdcdd25cd) // garbage - .D32(0xafbae234) // saved %edi - .D32(0xc0d4aab9) // saved %ebp - .Mark(&frame0_ebp) // frame pointer points here - .D32(0x60f20ce6) // saved %ebx - .D32(0x8036cc02) // garbage - .Mark(&frame1_esp); // This effectively sets stack_section.start(). - raw_context.eip = 0x40004006; - raw_context.ebp = frame0_ebp.Value(); - raw_context.ebx = 0x53d1379d; // saved %esi - raw_context.esi = 0x743833c9; // callee's %esi - raw_context.edi = 0x40005510; // return address - CheckWalk(); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map-inl.h deleted file mode 100644 index 67e07976..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map-inl.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_address_map-inl.h: StaticAddressMap implementation. -// -// See static_address_map.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ -#define PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ - -#include "processor/static_address_map.h" - -#include "processor/logging.h" - -namespace google_breakpad { - -template -bool StaticAddressMap::Retrieve( - const AddressType &address, - const EntryType *&entry, AddressType *entry_address) const { - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - entry = iterator.GetValuePtr(); - // Make sure AddressType is a copyable basic type - if (entry_address) - *entry_address = iterator.GetKey(); - - return true; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map.h deleted file mode 100644 index 6bafc667..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_address_map.h: StaticAddressMap. -// -// StaticAddressMap is a wrapper class of StaticMap, just as AddressMap wraps -// std::map. StaticAddressMap provides read-only Retrieve() operation, similar -// as AddressMap. However, the difference between StaticAddressMap and -// AddressMap is that StaticAddressMap does not support dynamic operation -// Store() due to the static nature of the underlying StaticMap. -// -// See address_map.h for reference. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_ADDRESS_MAP_H__ -#define PROCESSOR_STATIC_ADDRESS_MAP_H__ - -#include "processor/static_map-inl.h" - -namespace google_breakpad { - -// AddressType MUST be a basic type, e.g.: integer types etc -// EntryType could be a complex type, so we retrieve its pointer instead. -template -class StaticAddressMap { - public: - StaticAddressMap(): map_() { } - explicit StaticAddressMap(const char *map_data): map_(map_data) { } - - // Locates the entry stored at the highest address less than or equal to - // the address argument. If there is no such range, returns false. The - // entry is returned in entry, which is a required argument. If - // entry_address is not NULL, it will be set to the address that the entry - // was stored at. - bool Retrieve(const AddressType &address, - const EntryType *&entry, AddressType *entry_address) const; - - private: - friend class ModuleComparer; - // Convenience types. - typedef StaticAddressMap* SelfPtr; - typedef StaticMap AddressToEntryMap; - typedef typename AddressToEntryMap::const_iterator MapConstIterator; - - AddressToEntryMap map_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_ADDRESS_MAP_H__ - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map_unittest.cc deleted file mode 100644 index 5ef03455..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_address_map_unittest.cc +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_address_map_unittest.cc: Unit tests for StaticAddressMap. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include -#include -#include -#include -#include -#include - -#include "breakpad_googletest_includes.h" -#include "processor/address_map-inl.h" -#include "processor/static_address_map-inl.h" -#include "processor/simple_serializer-inl.h" -#include "map_serializers-inl.h" - -typedef google_breakpad::StaticAddressMap TestMap; -typedef google_breakpad::AddressMap AddrMap; - -class TestStaticAddressMap : public ::testing::Test { - protected: - void SetUp() { - for (int testcase = 0; testcase < kNumberTestCases; ++testcase) { - testdata[testcase] = new int[testsize[testcase]]; - } - - // Test data set0: NULL (empty map) - - // Test data set1: single element. - testdata[1][0] = 10; - - // Test data set2: six elements. - const int tempdata[] = {5, 10, 14, 15, 16, 20}; - for (int i = 0; i < testsize[2]; ++i) - testdata[2][i] = tempdata[i]; - - // Test data set3: - srand(time(NULL)); - for (int i = 0; i < testsize[3]; ++i) - testdata[3][i] = rand(); - - // Setup maps. - std::stringstream sstream; - for (int testcase = 0; testcase < kNumberTestCases; ++testcase) { - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - sstream.clear(); - sstream << "test " << testdata[testcase][data_item]; - addr_map[testcase].Store(testdata[testcase][data_item], sstream.str()); - } - map_data[testcase] = serializer.Serialize(addr_map[testcase], NULL); - test_map[testcase] = TestMap(map_data[testcase]); - } - } - - void TearDown() { - for (int i = 0; i < kNumberTestCases; ++i) { - delete [] map_data[i]; - delete [] testdata[i]; - } - } - - void CompareRetrieveResult(int testcase, int target) { - int address; - int address_test; - std::string entry; - std::string entry_test; - const char *entry_cstring = NULL; - bool found; - bool found_test; - - found = addr_map[testcase].Retrieve(target, &entry, &address); - found_test = - test_map[testcase].Retrieve(target, entry_cstring, &address_test); - - ASSERT_EQ(found, found_test); - - if (found && found_test) { - ASSERT_EQ(address, address_test); - entry_test = entry_cstring; - ASSERT_EQ(entry, entry_test); - } - } - - void RetrieveTester(int testcase) { - int target; - target = INT_MIN; - CompareRetrieveResult(testcase, target); - target = INT_MAX; - CompareRetrieveResult(testcase, target); - - srand(time(0)); - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - // Retrive (aka, search) for target address and compare results from - // AddressMap and StaticAddressMap. - - // First, assign the search target to be one of original testdata that is - // known to exist in the map. - target = testdata[testcase][data_item]; - CompareRetrieveResult(testcase, target); - // Then, add +2 / -1 bias to target value, in order to test searching for - // a target address not stored in the map. - target -= 1; - CompareRetrieveResult(testcase, target); - target += 3; - CompareRetrieveResult(testcase, target); - // Repeatedly test searching for random target addresses. - target = rand(); - CompareRetrieveResult(testcase, target); - } - } - - // Test data sets: - static const int kNumberTestCases = 4; - static const int testsize[]; - int *testdata[kNumberTestCases]; - - AddrMap addr_map[kNumberTestCases]; - TestMap test_map[kNumberTestCases]; - char *map_data[kNumberTestCases]; - google_breakpad::AddressMapSerializer serializer; -}; - -const int TestStaticAddressMap::testsize[] = {0, 1, 6, 1000}; - -TEST_F(TestStaticAddressMap, TestEmptyMap) { - int testcase = 0; - int target; - target = INT_MIN; - CompareRetrieveResult(testcase, target); - target = INT_MAX; - CompareRetrieveResult(testcase, target); - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - target = testdata[testcase][data_item]; - CompareRetrieveResult(testcase, target); - target -= 1; - CompareRetrieveResult(testcase, target); - target += 3; - CompareRetrieveResult(testcase, target); - target = rand(); - CompareRetrieveResult(testcase, target); - } -} - -TEST_F(TestStaticAddressMap, TestOneElementMap) { - int testcase = 1; - int target; - target = INT_MIN; - CompareRetrieveResult(testcase, target); - target = INT_MAX; - CompareRetrieveResult(testcase, target); - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - target = testdata[testcase][data_item]; - CompareRetrieveResult(testcase, target); - target -= 1; - CompareRetrieveResult(testcase, target); - target += 3; - CompareRetrieveResult(testcase, target); - target = rand(); - CompareRetrieveResult(testcase, target); - } -} - -TEST_F(TestStaticAddressMap, TestSixElementsMap) { - int testcase = 2; - int target; - target = INT_MIN; - CompareRetrieveResult(testcase, target); - target = INT_MAX; - CompareRetrieveResult(testcase, target); - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - target = testdata[testcase][data_item]; - CompareRetrieveResult(testcase, target); - target -= 1; - CompareRetrieveResult(testcase, target); - target += 3; - CompareRetrieveResult(testcase, target); - target = rand(); - CompareRetrieveResult(testcase, target); - } -} - -TEST_F(TestStaticAddressMap, Test1000RandomElementsMap) { - int testcase = 3; - int target; - target = INT_MIN; - CompareRetrieveResult(testcase, target); - target = INT_MAX; - CompareRetrieveResult(testcase, target); - for (int data_item = 0; data_item < testsize[testcase]; ++data_item) { - target = testdata[testcase][data_item]; - CompareRetrieveResult(testcase, target); - target -= 1; - CompareRetrieveResult(testcase, target); - target += 3; - CompareRetrieveResult(testcase, target); - target = rand(); - CompareRetrieveResult(testcase, target); - } -} - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map-inl.h deleted file mode 100644 index 46f9bbb5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map-inl.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_contained_range_map-inl.h: Hierarchically-organized range map, -// i.e., StaticContainedRangeMap implementation. -// -// See static_contained_range_map.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ -#define PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ - -#include "processor/static_contained_range_map.h" -#include "processor/logging.h" - -namespace google_breakpad { - -template -StaticContainedRangeMap::StaticContainedRangeMap( - const char *base) - : base_(*(reinterpret_cast(base))), - entry_size_(*(reinterpret_cast(base + sizeof(base_)))), - entry_ptr_(reinterpret_cast( - base + sizeof(base_) + sizeof(entry_size_))), - map_(base + sizeof(base_) + sizeof(entry_size_) + entry_size_) { - if (entry_size_ == 0) - entry_ptr_ = NULL; -} - - -template -bool StaticContainedRangeMap::RetrieveRange( - const AddressType &address, const EntryType *&entry) const { - - // Get an iterator to the child range whose high address is equal to or - // greater than the supplied address. If the supplied address is higher - // than all of the high addresses in the range, then this range does not - // contain a child at address, so return false. If the supplied address - // is lower than the base address of the child range, then it is not within - // the child range, so return false. - MapConstIterator iterator = map_.lower_bound(address); - - if (iterator == map_.end()) - return false; - - const char *memory_child = - reinterpret_cast(iterator.GetValuePtr()); - - StaticContainedRangeMap child_map(memory_child); - - if (address < child_map.base_) - return false; - - // The child in iterator->second contains the specified address. Find out - // if it has a more-specific descendant that also contains it. If it does, - // it will set |entry| appropriately. If not, set |entry| to the child. - if (!child_map.RetrieveRange(address, entry)) - entry = child_map.entry_ptr_; - - return true; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map.h deleted file mode 100644 index 4d26e63f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_contained_range_map.h: StaticContainedRangeMap. -// -// StaticContainedRangeMap is similar to ContainedRangeMap. However, -// StaticContainedRangeMap wraps a StaticMap instead of std::map, and does not -// support dynamic operations like StoreRange(...). -// StaticContainedRangeMap provides same RetrieveRange(...) interfaces as -// ContainedRangeMap. -// -// Please see contained_range_map.h for more documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_CONTAINED_RANGE_MAP_H__ -#define PROCESSOR_STATIC_CONTAINED_RANGE_MAP_H__ - -#include "processor/static_map-inl.h" - -namespace google_breakpad { - -template -class StaticContainedRangeMap { - public: - StaticContainedRangeMap(): base_(), entry_size_(), entry_ptr_(), map_() { } - explicit StaticContainedRangeMap(const char *base); - - // Retrieves the most specific (smallest) descendant range encompassing - // the specified address. This method will only return entries held by - // child ranges, and not the entry contained by |this|. This is necessary - // to support a sparsely-populated root range. If no descendant range - // encompasses the address, returns false. - bool RetrieveRange(const AddressType &address, const EntryType *&entry) const; - - private: - friend class ModuleComparer; - // AddressToRangeMap stores pointers. This makes reparenting simpler in - // StoreRange, because it doesn't need to copy entire objects. - typedef StaticContainedRangeMap* SelfPtr; - typedef - StaticMap AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - - // The base address of this range. The high address does not need to - // be stored, because it is used as the key to an object in its parent's - // map, and all ContainedRangeMaps except for the root range are contained - // within maps. The root range does not actually contain an entry, so its - // base_ field is meaningless, and the fact that it has no parent and thus - // no key is unimportant. For this reason, the base_ field should only be - // is accessed on child ContainedRangeMap objects, and never on |this|. - AddressType base_; - - // The entry corresponding to this range. The root range does not - // actually contain an entry, so its entry_ field is meaningless. For - // this reason, the entry_ field should only be accessed on child - // ContainedRangeMap objects, and never on |this|. - u_int32_t entry_size_; - const EntryType *entry_ptr_; - - // The map containing child ranges, keyed by each child range's high - // address. This is a pointer to avoid allocating map structures for - // leaf nodes, where they are not needed. - AddressToRangeMap map_; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_STATIC_CONTAINED_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map_unittest.cc deleted file mode 100644 index 4c0c72d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_contained_range_map_unittest.cc +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_contained_range_map_unittest.cc: Unit tests for -// StaticContainedRangeMap. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include "breakpad_googletest_includes.h" -#include "processor/contained_range_map-inl.h" -#include "processor/static_contained_range_map-inl.h" -#include "processor/simple_serializer-inl.h" -#include "processor/map_serializers-inl.h" - -#include "processor/scoped_ptr.h" -#include "processor/logging.h" - -namespace { - -typedef google_breakpad::ContainedRangeMap CRMMap; -typedef google_breakpad::StaticContainedRangeMap TestMap; - -// Each element in test_data contains the expected result when calling -// RetrieveRange on an address. -const int test_data[] = { - 0, // 0 - 0, // 1 - 0, // 2 - 0, // 3 - 0, // 4 - 0, // 5 - 0, // 6 - 0, // 7 - 9, // 8 - 7, // 9 - 1, // 10 - 5, // 11 - 6, // 12 - 6, // 13 - 6, // 14 - 6, // 15 - 6, // 16 - 6, // 17 - 6, // 18 - 5, // 19 - 7, // 20 - 8, // 21 - 0, // 22 - 0, // 23 - 0, // 24 - 0, // 25 - 0, // 26 - 0, // 27 - 0, // 28 - 0, // 29 - 10, // 30 - 10, // 31 - 10, // 32 - 11, // 33 - 11, // 34 - 11, // 35 - 0, // 36 - 0, // 37 - 0, // 38 - 0, // 39 - 14, // 40 - 14, // 41 - 14, // 42 - 14, // 43 - 15, // 44 - 15, // 45 - 15, // 46 - 15, // 47 - 0, // 48 - 0, // 49 - 19, // 50 - 18, // 51 - 18, // 52 - 18, // 53 - 18, // 54 - 18, // 55 - 18, // 56 - 18, // 57 - 18, // 58 - 20, // 59 - 21, // 60 - 25, // 61 - 26, // 62 - 26, // 63 - 26, // 64 - 26, // 65 - 26, // 66 - 26, // 67 - 24, // 68 - 22, // 69 - 30, // 70 - 30, // 71 - 30, // 72 - 30, // 73 - 31, // 74 - 31, // 75 - 30, // 76 - 32, // 77 - 32, // 78 - 30, // 79 - 34, // 80 - 35, // 81 - 36, // 82 - 39, // 83 - 38, // 84 - 37, // 85 - 43, // 86 - 44, // 87 - 41, // 88 - 45, // 89 - 42, // 90 - 0, // 91 - 0, // 92 - 0, // 93 - 0, // 94 - 0, // 95 - 0, // 96 - 0, // 97 - 0, // 98 - 0 // 99 -}; - -} // namespace - -namespace google_breakpad { - -class TestStaticCRMMap : public ::testing::Test { - protected: - void SetUp(); - - // A referrence map for testing StaticCRMMap. - google_breakpad::ContainedRangeMap crm_map_; - - // Static version of crm_map using serialized data of crm_map. - // The goal of testing is to make sure TestMap provides same results for - // lookup operation(s) as CRMMap does. - google_breakpad::StaticContainedRangeMap test_map_; - - google_breakpad::ContainedRangeMapSerializer serializer_; - - scoped_array serialized_data_; -}; - -void TestStaticCRMMap::SetUp() { - // First, do the StoreRange tests. This validates the containment - // rules. - // We confirm the referrence map correctly stores data during setup. - ASSERT_TRUE (crm_map_.StoreRange(10, 10, 1)); - ASSERT_FALSE(crm_map_.StoreRange(10, 10, 2)); // exactly equal to 1 - ASSERT_FALSE(crm_map_.StoreRange(11, 10, 3)); // begins inside 1 and extends up - ASSERT_FALSE(crm_map_.StoreRange( 9, 10, 4)); // begins below 1 and ends inside - ASSERT_TRUE (crm_map_.StoreRange(11, 9, 5)); // contained by existing - ASSERT_TRUE (crm_map_.StoreRange(12, 7, 6)); - ASSERT_TRUE (crm_map_.StoreRange( 9, 12, 7)); // contains existing - ASSERT_TRUE (crm_map_.StoreRange( 9, 13, 8)); - ASSERT_TRUE (crm_map_.StoreRange( 8, 14, 9)); - ASSERT_TRUE (crm_map_.StoreRange(30, 3, 10)); - ASSERT_TRUE (crm_map_.StoreRange(33, 3, 11)); - ASSERT_TRUE (crm_map_.StoreRange(30, 6, 12)); // storable but totally masked - ASSERT_TRUE (crm_map_.StoreRange(40, 8, 13)); // will be totally masked - ASSERT_TRUE (crm_map_.StoreRange(40, 4, 14)); - ASSERT_TRUE (crm_map_.StoreRange(44, 4, 15)); - ASSERT_FALSE(crm_map_.StoreRange(32, 10, 16)); // begins in #10, ends in #14 - ASSERT_FALSE(crm_map_.StoreRange(50, 0, 17)); // zero length - ASSERT_TRUE (crm_map_.StoreRange(50, 10, 18)); - ASSERT_TRUE (crm_map_.StoreRange(50, 1, 19)); - ASSERT_TRUE (crm_map_.StoreRange(59, 1, 20)); - ASSERT_TRUE (crm_map_.StoreRange(60, 1, 21)); - ASSERT_TRUE (crm_map_.StoreRange(69, 1, 22)); - ASSERT_TRUE (crm_map_.StoreRange(60, 10, 23)); - ASSERT_TRUE (crm_map_.StoreRange(68, 1, 24)); - ASSERT_TRUE (crm_map_.StoreRange(61, 1, 25)); - ASSERT_TRUE (crm_map_.StoreRange(61, 8, 26)); - ASSERT_FALSE(crm_map_.StoreRange(59, 9, 27)); - ASSERT_FALSE(crm_map_.StoreRange(59, 10, 28)); - ASSERT_FALSE(crm_map_.StoreRange(59, 11, 29)); - ASSERT_TRUE (crm_map_.StoreRange(70, 10, 30)); - ASSERT_TRUE (crm_map_.StoreRange(74, 2, 31)); - ASSERT_TRUE (crm_map_.StoreRange(77, 2, 32)); - ASSERT_FALSE(crm_map_.StoreRange(72, 6, 33)); - ASSERT_TRUE (crm_map_.StoreRange(80, 3, 34)); - ASSERT_TRUE (crm_map_.StoreRange(81, 1, 35)); - ASSERT_TRUE (crm_map_.StoreRange(82, 1, 36)); - ASSERT_TRUE (crm_map_.StoreRange(83, 3, 37)); - ASSERT_TRUE (crm_map_.StoreRange(84, 1, 38)); - ASSERT_TRUE (crm_map_.StoreRange(83, 1, 39)); - ASSERT_TRUE (crm_map_.StoreRange(86, 5, 40)); - ASSERT_TRUE (crm_map_.StoreRange(88, 1, 41)); - ASSERT_TRUE (crm_map_.StoreRange(90, 1, 42)); - ASSERT_TRUE (crm_map_.StoreRange(86, 1, 43)); - ASSERT_TRUE (crm_map_.StoreRange(87, 1, 44)); - ASSERT_TRUE (crm_map_.StoreRange(89, 1, 45)); - ASSERT_TRUE (crm_map_.StoreRange(87, 4, 46)); - ASSERT_TRUE (crm_map_.StoreRange(87, 3, 47)); - ASSERT_FALSE(crm_map_.StoreRange(86, 2, 48)); - - // Serialize crm_map to generate serialized data. - unsigned int size; - serialized_data_.reset(serializer_.Serialize(&crm_map_, &size)); - BPLOG(INFO) << "Serialized data size: " << size << " Bytes."; - - // Construct test_map_ from serialized data. - test_map_ = TestMap(serialized_data_.get()); -} - -TEST_F(TestStaticCRMMap, TestEmptyMap) { - CRMMap empty_crm_map; - - unsigned int size; - scoped_array serialized_data; - serialized_data.reset(serializer_.Serialize(&empty_crm_map, &size)); - scoped_ptr test_map(new TestMap(serialized_data.get())); - - const unsigned int kCorrectSizeForEmptyMap = 16; - ASSERT_EQ(kCorrectSizeForEmptyMap, size); - - const int *entry_test; - ASSERT_FALSE(test_map->RetrieveRange(-1, entry_test)); - ASSERT_FALSE(test_map->RetrieveRange(0, entry_test)); - ASSERT_FALSE(test_map->RetrieveRange(10, entry_test)); -} - -TEST_F(TestStaticCRMMap, TestSingleElementMap) { - CRMMap crm_map; - // Test on one element: - int entry = 1; - crm_map.StoreRange(10, 10, entry); - - unsigned int size; - scoped_array serialized_data; - serialized_data.reset(serializer_.Serialize(&crm_map, &size)); - scoped_ptr test_map(new TestMap(serialized_data.get())); - - const unsigned int kCorrectSizeForSingleElementMap = 40; - ASSERT_EQ(kCorrectSizeForSingleElementMap, size); - - const int *entry_test; - ASSERT_FALSE(test_map->RetrieveRange(-1, entry_test)); - ASSERT_FALSE(test_map->RetrieveRange(0, entry_test)); - ASSERT_TRUE(test_map->RetrieveRange(10, entry_test)); - ASSERT_EQ(*entry_test, entry); - ASSERT_TRUE(test_map->RetrieveRange(13, entry_test)); - ASSERT_EQ(*entry_test, entry); -} - -TEST_F(TestStaticCRMMap, RunTestData) { - unsigned int test_high = sizeof(test_data) / sizeof(test_data[0]); - - // Now, do the RetrieveRange tests. This further validates that the - // objects were stored properly and that retrieval returns the correct - // object. - // If GENERATE_TEST_DATA is defined, instead of the retrieval tests, a - // new test_data array will be printed. Exercise caution when doing this. - // Be sure to verify the results manually! -#ifdef GENERATE_TEST_DATA - printf(" const int test_data[] = {\n"); -#endif // GENERATE_TEST_DATA - - for (unsigned int address = 0; address < test_high; ++address) { - const int *entryptr; - int value = 0; - if (test_map_.RetrieveRange(address, entryptr)) - value = *entryptr; - -#ifndef GENERATE_TEST_DATA - // Don't use ASSERT inside the loop because it won't show the failed - // |address|, and the line number will always be the same. That makes - // it difficult to figure out which test failed. - EXPECT_EQ(value, test_data[address]) << "FAIL: retrieve address " - << address; -#else // !GENERATE_TEST_DATA - printf(" %d%c%s // %d\n", value, - address == test_high - 1 ? ' ' : ',', - value < 10 ? " " : "", - address); -#endif // !GENERATE_TEST_DATA - } - -#ifdef GENERATE_TEST_DATA - printf(" };\n"); -#endif // GENERATE_TEST_DATA -} - -} // namespace google_breakpad - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map-inl.h deleted file mode 100644 index 7727052f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map-inl.h +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_map-inl.h: StaticMap implementation. -// -// See static_map.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - - -#ifndef PROCESSOR_STATIC_MAP_INL_H__ -#define PROCESSOR_STATIC_MAP_INL_H__ - -#include "processor/static_map.h" -#include "processor/static_map_iterator-inl.h" -#include "processor/logging.h" - -namespace google_breakpad { - -template -StaticMap::StaticMap(const char* raw_data) - : raw_data_(raw_data), - compare_() { - // First 4 Bytes store the number of nodes. - num_nodes_ = *(reinterpret_cast(raw_data_)); - - offsets_ = reinterpret_cast( - raw_data_ + sizeof(num_nodes_)); - - keys_ = reinterpret_cast( - raw_data_ + (1 + num_nodes_) * sizeof(u_int32_t)); -} - -// find(), lower_bound() and upper_bound() implement binary search algorithm. -template -StaticMapIterator -StaticMap::find(const Key &key) const { - int begin = 0; - int end = num_nodes_; - int middle; - int compare_result; - while (begin < end) { - middle = begin + (end - begin) / 2; - compare_result = compare_(key, GetKeyAtIndex(middle)); - if (compare_result == 0) - return IteratorAtIndex(middle); - if (compare_result < 0) { - end = middle; - } else { - begin = middle + 1; - } - } - return this->end(); -} - -template -StaticMapIterator -StaticMap::lower_bound(const Key &key) const { - int begin = 0; - int end = num_nodes_; - int middle; - int comp_result; - while (begin < end) { - middle = begin + (end - begin) / 2; - comp_result = compare_(key, GetKeyAtIndex(middle)); - if (comp_result == 0) - return IteratorAtIndex(middle); - if (comp_result < 0) { - end = middle; - } else { - begin = middle + 1; - } - } - return IteratorAtIndex(begin); -} - -template -StaticMapIterator -StaticMap::upper_bound(const Key &key) const { - int begin = 0; - int end = num_nodes_; - int middle; - int compare_result; - while (begin < end) { - middle = begin + (end - begin) / 2; - compare_result = compare_(key, GetKeyAtIndex(middle)); - if (compare_result == 0) - return IteratorAtIndex(middle + 1); - if (compare_result < 0) { - end = middle; - } else { - begin = middle + 1; - } - } - return IteratorAtIndex(begin); -} - -template -bool StaticMap::ValidateInMemoryStructure() const { - // check the number of nodes is non-negative: - if (!raw_data_) return false; - int32_t num_nodes = *(reinterpret_cast(raw_data_)); - if (num_nodes < 0) { - BPLOG(INFO) << "StaticMap check failed: negative number of nodes"; - return false; - } - - int node_index = 0; - if (num_nodes_) { - u_int64_t first_offset = sizeof(int32_t) * (num_nodes_ + 1) - + sizeof(Key) * num_nodes_; - // Num_nodes_ is too large. - if (first_offset > 0xffffffffUL) { - BPLOG(INFO) << "StaticMap check failed: size exceeds limit"; - return false; - } - if (offsets_[node_index] != static_cast(first_offset)) { - BPLOG(INFO) << "StaticMap check failed: first node offset is incorrect"; - return false; - } - } - - for (node_index = 1; node_index < num_nodes_; ++node_index) { - // Check offsets[i] is strictly increasing: - if (offsets_[node_index] <= offsets_[node_index - 1]) { - BPLOG(INFO) << "StaticMap check failed: node offsets non-increasing"; - return false; - } - // Check Key[i] is strictly increasing as no duplicate keys are allowed. - if (compare_(GetKeyAtIndex(node_index), - GetKeyAtIndex(node_index - 1)) <= 0) { - BPLOG(INFO) << "StaticMap check failed: node keys non-increasing"; - return false; - } - } - return true; -} - -template -const Key StaticMap::GetKeyAtIndex(int index) const { - if (index < 0 || index >= num_nodes_) { - BPLOG(ERROR) << "Key index out of range error"; - // Key type is required to be primitive type. Return 0 if index is invalid. - return 0; - } - return keys_[index]; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map.h deleted file mode 100644 index 023ab3a4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map.h +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_map.h: StaticMap. -// -// StaticMap provides lookup interfaces and iterators similar as stl::map's. -// These lookup operations are purely Read-Only, thus memory -// allocation & deallocation is mostly avoided (intentionally). -// -// The chunk of memory should contain data with pre-defined pattern: -// **************** header *************** -// uint32 (4 bytes): number of nodes -// uint32 (4 bytes): address offset of node1's mapped_value -// uint32 (4 bytes): address offset of node2's mapped_value -// ... -// uint32 (4 bytes): address offset of nodeN's mapped_value -// -// ************* Key array ************ -// (X bytes): node1's key -// (X bytes): node2's key -// ... -// (X bytes): nodeN's key -// -// ************* Value array ********** -// (? bytes): node1's mapped_value -// (? bytes): node2's mapped_value -// ... -// (? bytes): nodeN's mapped_value -// -// REQUIREMENT: Key type MUST be primitive type or pointers so that: -// X = sizeof(typename Key); -// -// Note: since address offset is stored as uint32, user should keep in mind that -// StaticMap only supports up to 4GB size of memory data. - -// Author: Siyang Xie (lambxsy@google.com) - - -#ifndef PROCESSOR_STATIC_MAP_H__ -#define PROCESSOR_STATIC_MAP_H__ - -#include "processor/static_map_iterator-inl.h" - -namespace google_breakpad { - -// Default functor to compare keys. -template -class DefaultCompare { - public: - int operator()(const Key &k1, const Key &k2) const { - if (k1 < k2) return -1; - if (k1 == k2) return 0; - return 1; - } -}; - -template > -class StaticMap { - public: - typedef StaticMapIterator iterator; - typedef StaticMapIterator const_iterator; - - StaticMap() : raw_data_(0), - num_nodes_(0), - offsets_(0), - compare_() { } - - explicit StaticMap(const char* raw_data); - - inline bool empty() const { return num_nodes_ == 0; } - inline unsigned int size() const { return num_nodes_; } - - // Return iterators. - inline iterator begin() const { return IteratorAtIndex(0); } - inline iterator last() const { return IteratorAtIndex(num_nodes_ - 1); } - inline iterator end() const { return IteratorAtIndex(num_nodes_); } - inline iterator IteratorAtIndex(int index) const { - return iterator(raw_data_, index); - } - - // Lookup operations. - iterator find(const Key &k) const; - - // lower_bound(k) searches in a sorted range for the first element that has a - // key not less than the argument k. - iterator lower_bound(const Key &k) const; - - // upper_bound(k) searches in a sorted range for the first element that has a - // key greater than the argument k. - iterator upper_bound(const Key &k) const; - - // Checks if the underlying memory data conforms to the predefined pattern: - // first check the number of nodes is non-negative, - // then check both offsets and keys are strictly increasing (sorted). - bool ValidateInMemoryStructure() const; - - private: - const Key GetKeyAtIndex(int i) const; - - // Start address of a raw memory chunk with serialized data. - const char* raw_data_; - - // Number of nodes in the static map. - u_int32_t num_nodes_; - - // Array of offset addresses for stored values. - // For example: - // address_of_i-th_node_value = raw_data_ + offsets_[i] - const u_int32_t* offsets_; - - // keys_[i] = key of i_th node - const Key* keys_; - - Compare compare_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator-inl.h deleted file mode 100644 index 325046c3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator-inl.h +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_map_iterator-inl.h: StaticMapIterator implementation. -// -// See static_map_iterator.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_MAP_ITERATOR_INL_H__ -#define PROCESSOR_STATIC_MAP_ITERATOR_INL_H__ - -#include "processor/static_map_iterator.h" - -#include "processor/logging.h" - -namespace google_breakpad { - -template -StaticMapIterator::StaticMapIterator(const char* base, - const int &index): - index_(index), base_(base) { - // See static_map.h for documentation on - // bytes format of serialized StaticMap data. - num_nodes_ = *(reinterpret_cast(base_)); - offsets_ = reinterpret_cast(base_ + sizeof(num_nodes_)); - keys_ = reinterpret_cast( - base_ + (1 + num_nodes_) * sizeof(num_nodes_)); -} - -// Increment & Decrement operators: -template -StaticMapIterator& -StaticMapIterator::operator++() { - if (!IsValid()) { - BPLOG(ERROR) << "operator++ on invalid iterator"; - return *this; - } - if (++index_ > num_nodes_) index_ = num_nodes_; - return *this; -} - -template -StaticMapIterator -StaticMapIterator::operator++(int postfix_operator) { - if (!IsValid()) { - BPLOG(ERROR) << "operator++ on invalid iterator"; - return *this; - } - StaticMapIterator tmp = *this; - if (++index_ > num_nodes_) index_ = num_nodes_; - return tmp; -} - -template -StaticMapIterator& -StaticMapIterator::operator--() { - if (!IsValid()) { - BPLOG(ERROR) << "operator++ on invalid iterator"; - return *this; - } - - if (--index_ < 0) index_ = 0; - return *this; -} - -template -StaticMapIterator -StaticMapIterator::operator--(int postfix_operator) { - if (!IsValid()) { - BPLOG(ERROR) << "operator++ on invalid iterator"; - return *this; - } - StaticMapIterator tmp = *this; - - if (--index_ < 0) index_ = 0; - return tmp; -} - -template -const Key* StaticMapIterator::GetKeyPtr() const { - if (!IsValid()) { - BPLOG(ERROR) << "call GetKeyPtr() on invalid iterator"; - return NULL; - } - return &(keys_[index_]); -} - -template -const char* StaticMapIterator::GetValueRawPtr() const { - if (!IsValid()) { - BPLOG(ERROR) << "call GetValuePtr() on invalid iterator"; - return NULL; - } - return base_ + offsets_[index_]; -} - -template -bool StaticMapIterator::operator==( - const StaticMapIterator& x) const { - return base_ == x.base_ && index_ == x.index_; -} - -template -bool StaticMapIterator::operator!=( - const StaticMapIterator& x) const { - // Only need to compare base_ and index_. - // Other data members are auxiliary. - return base_ != x.base_ || index_ != x.index_; -} - -template -bool StaticMapIterator::IsValid() const { - if (!base_ || index_ < 0 || index_ > num_nodes_) - return false; - - return true; -} - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_MAP_ITERATOR_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator.h deleted file mode 100644 index 8127667b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_iterator.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2010 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_map_iterator.h: StaticMapIterator template class declaration. -// -// StaticMapIterator provides increment and decrement operators to iterate -// through a StaticMap map. It does not provide *, -> operators, user should -// use GetKeyPtr(), GetKey(), GetValuePtr() interfaces to retrieve data or -// pointer to data. StaticMapIterator is essentially a const_iterator. -// -// Author: Siyang Xie (lambxsy@google.com) - - -#ifndef PROCESSOR_STATIC_MAP_ITERATOR_H__ -#define PROCESSOR_STATIC_MAP_ITERATOR_H__ - -#include - -namespace google_breakpad { - -// Forward declaration. -template class StaticMap; - -// StaticMapIterator does not support operator*() or operator->(), -// User should use GetKey(), GetKeyPtr(), GetValuePtr() instead; -template -class StaticMapIterator { - public: - // Constructors. - StaticMapIterator(): index_(-1), base_(NULL) { } - - // Increment & Decrement operators: - StaticMapIterator& operator++(); - StaticMapIterator operator++(int post_fix_operator); - - StaticMapIterator& operator--(); - StaticMapIterator operator--(int post_fix_operator); - - // Interface for retrieving data / pointer to data. - const Key* GetKeyPtr() const; - - // Run time error will occur if GetKey() is called on an invalid iterator. - inline const Key GetKey() const { return *GetKeyPtr(); } - - // return a raw memory pointer that points to the start address of value. - const char* GetValueRawPtr() const; - - // return a reinterpret-casted pointer to the value. - inline const Value* GetValuePtr() const { - return reinterpret_cast(GetValueRawPtr()); - } - - bool operator==(const StaticMapIterator& x) const; - bool operator!=(const StaticMapIterator& x) const; - - // Check if this iterator is valid. - // If iterator is invalid, user is forbidden to use ++/-- operator - // or interfaces for retrieving data / pointer to data. - bool IsValid() const; - - private: - friend class StaticMap; - - // Only StaticMap can call this constructor. - explicit StaticMapIterator(const char* base, const int32_t &index); - - // Index of node that the iterator is pointing to. - int32_t index_; - - // Beginning address of the serialized map data. - const char* base_; - - // Number of nodes in the map. Use it to identify end() iterator. - int32_t num_nodes_; - - // offsets_ is an array of offset addresses of mapped values. - // For example: - // address_of_i-th_node_value = base_ + offsets_[i] - const u_int32_t* offsets_; - - // keys_[i] = key of i_th node. - const Key* keys_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_MAP_ITERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_unittest.cc deleted file mode 100644 index eb1e1354..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_map_unittest.cc +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_map_unittest.cc: Unit tests for StaticMap. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "processor/static_map-inl.h" - - -typedef int ValueType; -typedef int KeyType; -typedef google_breakpad::StaticMap< KeyType, ValueType > TestMap; -typedef std::map< KeyType, ValueType > StdMap; - -template -class SimpleMapSerializer { - public: - static char* Serialize(const std::map &stdmap, - unsigned int* size = NULL) { - unsigned int size_per_node = - sizeof(u_int32_t) + sizeof(Key) + sizeof(Value); - unsigned int memsize = sizeof(int32_t) + size_per_node * stdmap.size(); - if (size) *size = memsize; - - // Allocate memory for serialized data: - char* mem = reinterpret_cast(operator new(memsize)); - char* address = mem; - - // Writer the number of nodes: - new (address) u_int32_t(static_cast(stdmap.size())); - address += sizeof(u_int32_t); - - // Nodes' offset: - u_int32_t* offsets = reinterpret_cast(address); - address += sizeof(u_int32_t) * stdmap.size(); - - // Keys: - Key* keys = reinterpret_cast(address); - address += sizeof(Key) * stdmap.size(); - - // Traversing map: - typename std::map::const_iterator iter = stdmap.begin(); - for (int index = 0; iter != stdmap.end(); ++iter, ++index) { - offsets[index] = static_cast(address - mem); - keys[index] = iter->first; - new (address) Value(iter->second); - address += sizeof(Value); - } - return mem; - } -}; - - -class TestInvalidMap : public ::testing::Test { - protected: - void SetUp() { - memset(data, 0, kMemorySize); - } - - // 40 Bytes memory can hold a StaticMap with up to 3 nodes. - static const int kMemorySize = 40; - char data[kMemorySize]; - TestMap test_map; -}; - -TEST_F(TestInvalidMap, TestNegativeNumberNodes) { - memset(data, 0xff, sizeof(u_int32_t)); // Set the number of nodes = -1 - test_map = TestMap(data); - ASSERT_FALSE(test_map.ValidateInMemoryStructure()); -} - -TEST_F(TestInvalidMap, TestWrongOffsets) { - u_int32_t* header = reinterpret_cast(data); - const u_int32_t kNumNodes = 2; - const u_int32_t kHeaderOffset = - sizeof(u_int32_t) + kNumNodes * (sizeof(u_int32_t) + sizeof(KeyType)); - - header[0] = kNumNodes; - header[1] = kHeaderOffset + 3; // Wrong offset for first node - test_map = TestMap(data); - ASSERT_FALSE(test_map.ValidateInMemoryStructure()); - - header[1] = kHeaderOffset; // Correct offset for first node - header[2] = kHeaderOffset - 1; // Wrong offset for second node - test_map = TestMap(data); - ASSERT_FALSE(test_map.ValidateInMemoryStructure()); -} - -TEST_F(TestInvalidMap, TestUnSortedKeys) { - u_int32_t* header = reinterpret_cast(data); - const u_int32_t kNumNodes = 2; - const u_int32_t kHeaderOffset = - sizeof(u_int32_t) + kNumNodes * (sizeof(u_int32_t) + sizeof(KeyType)); - header[0] = kNumNodes; - header[1] = kHeaderOffset; - header[2] = kHeaderOffset + sizeof(ValueType); - - KeyType* keys = reinterpret_cast( - data + (kNumNodes + 1) * sizeof(u_int32_t)); - // Set keys in non-increasing order. - keys[0] = 10; - keys[1] = 7; - test_map = TestMap(data); - ASSERT_FALSE(test_map.ValidateInMemoryStructure()); -} - - -class TestValidMap : public ::testing::Test { - protected: - void SetUp() { - int testcase = 0; - - // Empty map. - map_data[testcase] = - serializer.Serialize(std_map[testcase], &size[testcase]); - test_map[testcase] = TestMap(map_data[testcase]); - ++testcase; - - // Single element. - std_map[testcase].insert(std::make_pair(2, 8)); - map_data[testcase] = - serializer.Serialize(std_map[testcase], &size[testcase]); - test_map[testcase] = TestMap(map_data[testcase]); - ++testcase; - - // 100 elements. - for (int i = 0; i < 100; ++i) - std_map[testcase].insert(std::make_pair(i, 2 * i)); - map_data[testcase] = - serializer.Serialize(std_map[testcase], &size[testcase]); - test_map[testcase] = TestMap(map_data[testcase]); - ++testcase; - - // 1000 random elements. - for (int i = 0; i < 1000; ++i) - std_map[testcase].insert(std::make_pair(rand(), rand())); - map_data[testcase] = - serializer.Serialize(std_map[testcase], &size[testcase]); - test_map[testcase] = TestMap(map_data[testcase]); - - // Set correct size of memory allocation for each test case. - unsigned int size_per_node = - sizeof(u_int32_t) + sizeof(KeyType) + sizeof(ValueType); - for (testcase = 0; testcase < kNumberTestCases; ++testcase) { - correct_size[testcase] = - sizeof(u_int32_t) + std_map[testcase].size() * size_per_node; - } - } - - void TearDown() { - for (int i = 0;i < kNumberTestCases; ++i) - delete map_data[i]; - } - - - void IteratorTester(int test_case) { - // scan through: - iter_test = test_map[test_case].begin(); - iter_std = std_map[test_case].begin(); - - for (; iter_test != test_map[test_case].end() && - iter_std != std_map[test_case].end(); - ++iter_test, ++iter_std) { - ASSERT_EQ(iter_test.GetKey(), iter_std->first); - ASSERT_EQ(*(iter_test.GetValuePtr()), iter_std->second); - } - ASSERT_TRUE(iter_test == test_map[test_case].end() - && iter_std == std_map[test_case].end()); - - // Boundary testcase. - if (!std_map[test_case].empty()) { - // rear boundary case: - iter_test = test_map[test_case].end(); - iter_std = std_map[test_case].end(); - --iter_std; - --iter_test; - ASSERT_EQ(iter_test.GetKey(), iter_std->first); - ASSERT_EQ(*(iter_test.GetValuePtr()), iter_std->second); - - ++iter_test; - ++iter_std; - ASSERT_TRUE(iter_test == test_map[test_case].end()); - - --iter_test; - --iter_std; - ASSERT_TRUE(iter_test != test_map[test_case].end()); - ASSERT_TRUE(iter_test == test_map[test_case].last()); - ASSERT_EQ(iter_test.GetKey(), iter_std->first); - ASSERT_EQ(*(iter_test.GetValuePtr()), iter_std->second); - - // front boundary case: - iter_test = test_map[test_case].begin(); - --iter_test; - ASSERT_TRUE(iter_test == test_map[test_case].begin()); - } - } - - void CompareLookupResult(int test_case) { - bool found1 = (iter_test != test_map[test_case].end()); - bool found2 = (iter_std != std_map[test_case].end()); - ASSERT_EQ(found1, found2); - - if (found1 && found2) { - ASSERT_EQ(iter_test.GetKey(), iter_std->first); - ASSERT_EQ(*(iter_test.GetValuePtr()), iter_std->second); - } - } - - void FindTester(int test_case, const KeyType &key) { - iter_test = test_map[test_case].find(key); - iter_std = std_map[test_case].find(key); - CompareLookupResult(test_case); - } - - void LowerBoundTester(int test_case, const KeyType &key) { - iter_test = test_map[test_case].lower_bound(key); - iter_std = std_map[test_case].lower_bound(key); - CompareLookupResult(test_case); - } - - void UpperBoundTester(int test_case, const KeyType &key) { - iter_test = test_map[test_case].upper_bound(key); - iter_std = std_map[test_case].upper_bound(key); - CompareLookupResult(test_case); - } - - void LookupTester(int test_case) { - StdMap::const_iterator iter; - // Test find(): - for (iter = std_map[test_case].begin(); - iter != std_map[test_case].end(); - ++iter) { - FindTester(test_case, iter->first); - FindTester(test_case, iter->first + 1); - FindTester(test_case, iter->first - 1); - } - FindTester(test_case, INT_MIN); - FindTester(test_case, INT_MAX); - // random test: - for (int i = 0; i < rand()%5000 + 5000; ++i) - FindTester(test_case, rand()); - - // Test lower_bound(): - for (iter = std_map[test_case].begin(); - iter != std_map[test_case].end(); - ++iter) { - LowerBoundTester(test_case, iter->first); - LowerBoundTester(test_case, iter->first + 1); - LowerBoundTester(test_case, iter->first - 1); - } - LowerBoundTester(test_case, INT_MIN); - LowerBoundTester(test_case, INT_MAX); - // random test: - for (int i = 0; i < rand()%5000 + 5000; ++i) - LowerBoundTester(test_case, rand()); - - // Test upper_bound(): - for (iter = std_map[test_case].begin(); - iter != std_map[test_case].end(); - ++iter) { - UpperBoundTester(test_case, iter->first); - UpperBoundTester(test_case, iter->first + 1); - UpperBoundTester(test_case, iter->first - 1); - } - UpperBoundTester(test_case, INT_MIN); - UpperBoundTester(test_case, INT_MAX); - // random test: - for (int i = 0; i < rand()%5000 + 5000; ++i) - UpperBoundTester(test_case, rand()); - } - - static const int kNumberTestCases = 4; - StdMap std_map[kNumberTestCases]; - TestMap test_map[kNumberTestCases]; - TestMap::const_iterator iter_test; - StdMap::const_iterator iter_std; - char* map_data[kNumberTestCases]; - unsigned int size[kNumberTestCases]; - unsigned int correct_size[kNumberTestCases]; - SimpleMapSerializer serializer; -}; - -TEST_F(TestValidMap, TestEmptyMap) { - int test_case = 0; - // Assert memory size allocated during serialization is correct. - ASSERT_EQ(correct_size[test_case], size[test_case]); - - // Sanity check of serialized data: - ASSERT_TRUE(test_map[test_case].ValidateInMemoryStructure()); - ASSERT_EQ(std_map[test_case].empty(), test_map[test_case].empty()); - ASSERT_EQ(std_map[test_case].size(), test_map[test_case].size()); - - // Test Iterator. - IteratorTester(test_case); - - // Test lookup operations. - LookupTester(test_case); -} - -TEST_F(TestValidMap, TestSingleElement) { - int test_case = 1; - // Assert memory size allocated during serialization is correct. - ASSERT_EQ(correct_size[test_case], size[test_case]); - - // Sanity check of serialized data: - ASSERT_TRUE(test_map[test_case].ValidateInMemoryStructure()); - ASSERT_EQ(std_map[test_case].empty(), test_map[test_case].empty()); - ASSERT_EQ(std_map[test_case].size(), test_map[test_case].size()); - - // Test Iterator. - IteratorTester(test_case); - - // Test lookup operations. - LookupTester(test_case); -} - -TEST_F(TestValidMap, Test100Elements) { - int test_case = 2; - // Assert memory size allocated during serialization is correct. - ASSERT_EQ(correct_size[test_case], size[test_case]); - - // Sanity check of serialized data: - ASSERT_TRUE(test_map[test_case].ValidateInMemoryStructure()); - ASSERT_EQ(std_map[test_case].empty(), test_map[test_case].empty()); - ASSERT_EQ(std_map[test_case].size(), test_map[test_case].size()); - - // Test Iterator. - IteratorTester(test_case); - - // Test lookup operations. - LookupTester(test_case); -} - -TEST_F(TestValidMap, Test1000RandomElements) { - int test_case = 3; - // Assert memory size allocated during serialization is correct. - ASSERT_EQ(correct_size[test_case], size[test_case]); - - // Sanity check of serialized data: - ASSERT_TRUE(test_map[test_case].ValidateInMemoryStructure()); - ASSERT_EQ(std_map[test_case].empty(), test_map[test_case].empty()); - ASSERT_EQ(std_map[test_case].size(), test_map[test_case].size()); - - // Test Iterator. - IteratorTester(test_case); - - // Test lookup operations. - LookupTester(test_case); -} - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map-inl.h deleted file mode 100644 index f6cef1a9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map-inl.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_range_map-inl.h: StaticRangeMap implementation. -// -// See static_range_map.h for documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_RANGE_MAP_INL_H__ -#define PROCESSOR_STATIC_RANGE_MAP_INL_H__ - -#include "processor/static_range_map.h" -#include "processor/logging.h" - -namespace google_breakpad { - -template -bool StaticRangeMap::RetrieveRange( - const AddressType &address, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) const { - MapConstIterator iterator = map_.lower_bound(address); - if (iterator == map_.end()) - return false; - - // The map is keyed by the high address of each range, so |address| is - // guaranteed to be lower than the range's high address. If |range| is - // not directly preceded by another range, it's possible for address to - // be below the range's low address, though. When that happens, address - // references something not within any range, so return false. - - const Range *range = iterator.GetValuePtr(); - - // Make sure AddressType and EntryType are copyable basic types - // e.g.: integer types, pointers etc - if (address < range->base()) - return false; - - entry = range->entryptr(); - if (entry_base) - *entry_base = range->base(); - if (entry_size) - *entry_size = iterator.GetKey() - range->base() + 1; - - return true; -} - - -template -bool StaticRangeMap::RetrieveNearestRange( - const AddressType &address, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) const { - // If address is within a range, RetrieveRange can handle it. - if (RetrieveRange(address, entry, entry_base, entry_size)) - return true; - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - const Range *range = iterator.GetValuePtr(); - entry = range->entryptr(); - if (entry_base) - *entry_base = range->base(); - if (entry_size) - *entry_size = iterator.GetKey() - range->base() + 1; - - return true; -} - -template -bool StaticRangeMap::RetrieveRangeAtIndex( - int index, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) const { - - if (index >= GetCount()) { - BPLOG(ERROR) << "Index out of range: " << index << "/" << GetCount(); - return false; - } - - MapConstIterator iterator = map_.IteratorAtIndex(index); - - const Range *range = iterator.GetValuePtr(); - - entry = range->entryptr(); - if (entry_base) - *entry_base = range->base(); - if (entry_size) - *entry_size = iterator.GetKey() - range->base() + 1; - - return true; -} - -} // namespace google_breakpad - - -#endif // PROCESSOR_STATIC_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map.h deleted file mode 100644 index 096bbbba..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// static_range_map.h: StaticRangeMap. -// -// StaticRangeMap is similar as RangeMap. However, StaticRangeMap wraps a -// StaticMap instead of std::map, and does not support dynamic operations like -// StoreRange(...). StaticRangeMap provides same Retrieve*() interfaces as -// RangeMap. Please see range_map.h for more documentation. -// -// Author: Siyang Xie (lambxsy@google.com) - -#ifndef PROCESSOR_STATIC_RANGE_MAP_H__ -#define PROCESSOR_STATIC_RANGE_MAP_H__ - - -#include "processor/static_map-inl.h" - -namespace google_breakpad { - -// AddressType is basic type, e.g.: integer types, pointers etc -// EntryType could be a complex type, so we retrieve its pointer instead. -template -class StaticRangeMap { - public: - StaticRangeMap(): map_() { } - explicit StaticRangeMap(const char *memory): map_(memory) { } - - // Locates the range encompassing the supplied address. If there is - // no such range, returns false. entry_base and entry_size, if non-NULL, - // are set to the base and size of the entry's range. - bool RetrieveRange(const AddressType &address, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) const; - - // Locates the range encompassing the supplied address, if one exists. - // If no range encompasses the supplied address, locates the nearest range - // to the supplied address that is lower than the address. Returns false - // if no range meets these criteria. entry_base and entry_size, if - // non-NULL, are set to the base and size of the entry's range. - bool RetrieveNearestRange(const AddressType &address, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Treating all ranges as a list ordered by the address spaces that they - // occupy, locates the range at the index specified by index. Returns - // false if index is larger than the number of ranges stored. entry_base - // and entry_size, if non-NULL, are set to the base and size of the entry's - // range. - // - // RetrieveRangeAtIndex is not optimized for speedy operation. - bool RetrieveRangeAtIndex(int index, const EntryType *&entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Returns the number of ranges stored in the RangeMap. - inline unsigned int GetCount() const { return map_.size(); } - - private: - friend class ModuleComparer; - class Range { - public: - AddressType base() const { - return *(reinterpret_cast(this)); - } - const EntryType* entryptr() const { - return reinterpret_cast(this + sizeof(AddressType)); - } - }; - - // Convenience types. - typedef StaticRangeMap* SelfPtr; - typedef StaticMap AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - - AddressToRangeMap map_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_STATIC_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map_unittest.cc deleted file mode 100644 index 82b26235..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/static_range_map_unittest.cc +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// static_range_map_unittest.cc: Unit tests for StaticRangeMap. -// -// Author: Siyang Xie (lambxsy@google.com) - -#include "breakpad_googletest_includes.h" -#include "processor/range_map-inl.h" -#include "processor/static_range_map-inl.h" -#include "processor/simple_serializer-inl.h" -#include "processor/map_serializers-inl.h" - -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -namespace { -// Types used for testing. -typedef int AddressType; -typedef int EntryType; -typedef google_breakpad::StaticRangeMap< AddressType, EntryType > TestMap; -typedef google_breakpad::RangeMap< AddressType, EntryType > RMap; - -// RangeTest contains data to use for store and retrieve tests. See -// RunTests for descriptions of the tests. -struct RangeTest { - // Base address to use for test - AddressType address; - - // Size of range to use for test - AddressType size; - - // Unique ID of range - unstorable ranges must have unique IDs too - EntryType id; - - // Whether this range is expected to be stored successfully or not - bool expect_storable; -}; - -// A RangeTestSet encompasses multiple RangeTests, which are run in -// sequence on the same RangeMap. -struct RangeTestSet { - // An array of RangeTests - const RangeTest* range_tests; - - // The number of tests in the set - unsigned int range_test_count; -}; - -// These tests will be run sequentially. The first set of tests exercises -// most functions of RangeTest, and verifies all of the bounds-checking. -const RangeTest range_tests_0[] = { - { INT_MIN, 16, 1, true }, // lowest possible range - { -2, 5, 2, true }, // a range through zero - { INT_MAX - 9, 11, 3, false }, // tests anti-overflow - { INT_MAX - 9, 10, 4, true }, // highest possible range - { 5, 0, 5, false }, // tests anti-zero-size - { 5, 1, 6, true }, // smallest possible range - { -20, 15, 7, true }, // entirely negative - - { 10, 10, 10, true }, // causes the following tests to fail - { 9, 10, 11, false }, // one-less base, one-less high - { 9, 11, 12, false }, // one-less base, identical high - { 9, 12, 13, false }, // completely contains existing - { 10, 9, 14, false }, // identical base, one-less high - { 10, 10, 15, false }, // exactly identical to existing range - { 10, 11, 16, false }, // identical base, one-greater high - { 11, 8, 17, false }, // contained completely within - { 11, 9, 18, false }, // one-greater base, identical high - { 11, 10, 19, false }, // one-greater base, one-greater high - { 9, 2, 20, false }, // overlaps bottom by one - { 10, 1, 21, false }, // overlaps bottom by one, contained - { 19, 1, 22, false }, // overlaps top by one, contained - { 19, 2, 23, false }, // overlaps top by one - - { 9, 1, 24, true }, // directly below without overlap - { 20, 1, 25, true }, // directly above without overlap - - { 6, 3, 26, true }, // exactly between two ranges, gapless - { 7, 3, 27, false }, // tries to span two ranges - { 7, 5, 28, false }, // tries to span three ranges - { 4, 20, 29, false }, // tries to contain several ranges - - { 30, 50, 30, true }, - { 90, 25, 31, true }, - { 35, 65, 32, false }, // tries to span two noncontiguous - { 120, 10000, 33, true }, // > 8-bit - { 20000, 20000, 34, true }, // > 8-bit - { 0x10001, 0x10001, 35, true }, // > 16-bit - - { 27, -1, 36, false } // tests high < base -}; - -// Attempt to fill the entire space. The entire space must be filled with -// three stores because AddressType is signed for these tests, so RangeMap -// treats the size as signed and rejects sizes that appear to be negative. -// Even if these tests were run as unsigned, two stores would be needed -// to fill the space because the entire size of the space could only be -// described by using one more bit than would be present in AddressType. -const RangeTest range_tests_1[] = { - { INT_MIN, INT_MAX, 50, true }, // From INT_MIN to -2, inclusive - { -1, 2, 51, true }, // From -1 to 0, inclusive - { 1, INT_MAX, 52, true }, // From 1 to INT_MAX, inclusive - { INT_MIN, INT_MAX, 53, false }, // Can't fill the space twice - { -1, 2, 54, false }, - { 1, INT_MAX, 55, false }, - { -3, 6, 56, false }, // -3 to 2, inclusive - spans 3 ranges -}; - -// A light round of testing to verify that RetrieveRange does the right -// the right thing at the extremities of the range when nothing is stored -// there. Checks are forced without storing anything at the extremities -// by setting size = 0. -const RangeTest range_tests_2[] = { - { INT_MIN, 0, 100, false }, // makes RetrieveRange check low end - { -1, 3, 101, true }, - { INT_MAX, 0, 102, false }, // makes RetrieveRange check high end -}; - -// Similar to the previous test set, but with a couple of ranges closer -// to the extremities. -const RangeTest range_tests_3[] = { - { INT_MIN + 1, 1, 110, true }, - { INT_MAX - 1, 1, 111, true }, - { INT_MIN, 0, 112, false }, // makes RetrieveRange check low end - { INT_MAX, 0, 113, false } // makes RetrieveRange check high end -}; - -// The range map is cleared between sets of tests listed here. -const RangeTestSet range_test_sets[] = { - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) }, - { range_tests_1, sizeof(range_tests_1) / sizeof(RangeTest) }, - { range_tests_2, sizeof(range_tests_2) / sizeof(RangeTest) }, - { range_tests_3, sizeof(range_tests_3) / sizeof(RangeTest) }, - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) } // Run again -}; - -} // namespace - -namespace google_breakpad { -class TestStaticRangeMap : public ::testing::Test { - protected: - void SetUp() { - kTestCasesCount_ = sizeof(range_test_sets) / sizeof(RangeTestSet); - } - - // StoreTest uses the data in a RangeTest and calls StoreRange on the - // test RangeMap. It returns true if the expected result occurred, and - // false if something else happened. - void StoreTest(RMap* range_map, const RangeTest* range_test); - - // RetrieveTest uses the data in RangeTest and calls RetrieveRange on the - // test RangeMap. If it retrieves the expected value (which can be no - // map entry at the specified range,) it returns true, otherwise, it returns - // false. RetrieveTest will check the values around the base address and - // the high address of a range to guard against off-by-one errors. - void RetrieveTest(TestMap* range_map, const RangeTest* range_test); - - // Test RetrieveRangeAtIndex, which is supposed to return objects in order - // according to their addresses. This test is performed by looping through - // the map, calling RetrieveRangeAtIndex for all possible indices in sequence, - // and verifying that each call returns a different object than the previous - // call, and that ranges are returned with increasing base addresses. Returns - // false if the test fails. - void RetrieveIndexTest(const TestMap* range_map, int set); - - void RunTestCase(int test_case); - - unsigned int kTestCasesCount_; - RangeMapSerializer serializer_; -}; - -void TestStaticRangeMap::StoreTest(RMap* range_map, - const RangeTest* range_test) { - bool stored = range_map->StoreRange(range_test->address, - range_test->size, - range_test->id); - EXPECT_EQ(stored, range_test->expect_storable) - << "StoreRange id " << range_test->id << "FAILED"; -} - -void TestStaticRangeMap::RetrieveTest(TestMap* range_map, - const RangeTest* range_test) { - for (unsigned int side = 0; side <= 1; ++side) { - // When side == 0, check the low side (base address) of each range. - // When side == 1, check the high side (base + size) of each range. - - // Check one-less and one-greater than the target address in addition - // to the target address itself. - - // If the size of the range is only 1, don't check one greater than - // the base or one less than the high - for a successfully stored - // range, these tests would erroneously fail because the range is too - // small. - AddressType low_offset = -1; - AddressType high_offset = 1; - if (range_test->size == 1) { - if (!side) // When checking the low side, - high_offset = 0; // don't check one over the target. - else // When checking the high side, - low_offset = 0; // don't check one under the target. - } - - for (AddressType offset = low_offset; offset <= high_offset; ++offset) { - AddressType address = - offset + - (!side ? range_test->address : - range_test->address + range_test->size - 1); - - bool expected_result = false; // This is correct for tests not stored. - if (range_test->expect_storable) { - if (offset == 0) // When checking the target address, - expected_result = true; // test should always succeed. - else if (offset == -1) // When checking one below the target, - expected_result = side; // should fail low and succeed high. - else // When checking one above the target, - expected_result = !side; // should succeed low and fail high. - } - - const EntryType* id; - AddressType retrieved_base; - AddressType retrieved_size; - bool retrieved = range_map->RetrieveRange(address, id, - &retrieved_base, - &retrieved_size); - - bool observed_result = retrieved && *id == range_test->id; - EXPECT_EQ(observed_result, expected_result) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - - // If a range was successfully retrieved, check that the returned - // bounds match the range as stored. - if (observed_result == true) { - EXPECT_EQ(retrieved_base, range_test->address) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - EXPECT_EQ(retrieved_size, range_test->size) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - } - - // Now, check RetrieveNearestRange. The nearest range is always - // expected to be different from the test range when checking one - // less than the low side. - bool expected_nearest = range_test->expect_storable; - if (!side && offset < 0) - expected_nearest = false; - - AddressType nearest_base; - AddressType nearest_size; - bool retrieved_nearest = range_map->RetrieveNearestRange(address, - id, - &nearest_base, - &nearest_size); - - // When checking one greater than the high side, RetrieveNearestRange - // should usually return the test range. When a different range begins - // at that address, though, then RetrieveNearestRange should return the - // range at the address instead of the test range. - if (side && offset > 0 && nearest_base == address) { - expected_nearest = false; - } - - bool observed_nearest = retrieved_nearest && - *id == range_test->id; - - EXPECT_EQ(observed_nearest, expected_nearest) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - - // If a range was successfully retrieved, check that the returned - // bounds match the range as stored. - if (expected_nearest ==true) { - EXPECT_EQ(nearest_base, range_test->address) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - EXPECT_EQ(nearest_size, range_test->size) - << "RetrieveRange id " << range_test->id - << ", side " << side << ", offset " << offset << " FAILED."; - } - } - } -} - -void TestStaticRangeMap::RetrieveIndexTest(const TestMap* range_map, int set) { - AddressType last_base = 0; - const EntryType* last_entry = 0; - const EntryType* entry; - int object_count = range_map->GetCount(); - for (int object_index = 0; object_index < object_count; ++object_index) { - AddressType base; - ASSERT_TRUE(range_map->RetrieveRangeAtIndex(object_index, - entry, - &base, - NULL)) - << "FAILED: RetrieveRangeAtIndex set " << set - << " index " << object_index; - - ASSERT_TRUE(entry) << "FAILED: RetrieveRangeAtIndex set " << set - << " index " << object_index; - - // It's impossible to do these comparisons unless there's a previous - // object to compare against. - if (last_entry) { - // The object must be different from the last_entry one. - EXPECT_NE(*entry, *last_entry) << "FAILED: RetrieveRangeAtIndex set " - << set << " index " << object_index; - // Each object must have a base greater than the previous object's base. - EXPECT_GT(base, last_base) << "FAILED: RetrieveRangeAtIndex set " << set - << " index " << object_index; - } - last_entry = entry; - last_base = base; - } - - // Make sure that RetrieveRangeAtIndex doesn't allow lookups at indices that - // are too high. - ASSERT_FALSE(range_map->RetrieveRangeAtIndex( - object_count, entry, NULL, NULL)) << "FAILED: RetrieveRangeAtIndex set " - << set << " index " << object_count - << " (too large)"; -} - -// RunTests runs a series of test sets. -void TestStaticRangeMap::RunTestCase(int test_case) { - // Maintain the range map in a pointer so that deletion can be meaningfully - // tested. - scoped_ptr rmap(new RMap()); - - const RangeTest* range_tests = range_test_sets[test_case].range_tests; - unsigned int range_test_count = range_test_sets[test_case].range_test_count; - - // Run the StoreRange test, which validates StoreRange and initializes - // the RangeMap with data for the RetrieveRange test. - int stored_count = 0; // The number of ranges successfully stored - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest* range_test = &range_tests[range_test_index]; - StoreTest(rmap.get(), range_test); - - if (range_test->expect_storable) - ++stored_count; - } - - scoped_array memaddr(serializer_.Serialize(*rmap, NULL)); - scoped_ptr static_range_map(new TestMap(memaddr.get())); - - // The RangeMap's own count of objects should also match. - EXPECT_EQ(static_range_map->GetCount(), stored_count); - - // Run the RetrieveRange test - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest* range_test = &range_tests[range_test_index]; - RetrieveTest(static_range_map.get(), range_test); - } - - RetrieveIndexTest(static_range_map.get(), test_case); -} - -TEST_F(TestStaticRangeMap, TestCase0) { - int test_case = 0; - RunTestCase(test_case); -} - -TEST_F(TestStaticRangeMap, TestCase1) { - int test_case = 1; - RunTestCase(test_case); -} - -TEST_F(TestStaticRangeMap, TestCase2) { - int test_case = 2; - RunTestCase(test_case); -} - -TEST_F(TestStaticRangeMap, TestCase3) { - int test_case = 3; - RunTestCase(test_case); -} - -TEST_F(TestStaticRangeMap, RunTestCase0Again) { - int test_case = 0; - RunTestCase(test_case); -} - -} // namespace google_breakpad - -int main(int argc, char *argv[]) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.cc deleted file mode 100644 index cebc0a6a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.cc +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// synth_minidump.cc: Implementation of SynthMinidump. See synth_minidump.h - -#include "processor/synth_minidump.h" - -namespace google_breakpad { - -namespace SynthMinidump { - -Section::Section(const Dump &dump) - : test_assembler::Section(dump.endianness()) { } - -void Section::CiteLocationIn(test_assembler::Section *section) const { - if (this) - (*section).D32(size_).D32(file_offset_); - else - (*section).D32(0).D32(0); -} - -void Stream::CiteStreamIn(test_assembler::Section *section) const { - section->D32(type_); - CiteLocationIn(section); -} - -SystemInfo::SystemInfo(const Dump &dump, - const MDRawSystemInfo &system_info, - const String &csd_version) - : Stream(dump, MD_SYSTEM_INFO_STREAM) { - D16(system_info.processor_architecture); - D16(system_info.processor_level); - D16(system_info.processor_revision); - D8(system_info.number_of_processors); - D8(system_info.product_type); - D32(system_info.major_version); - D32(system_info.minor_version); - D32(system_info.build_number); - D32(system_info.platform_id); - csd_version.CiteStringIn(this); - D16(system_info.suite_mask); - D16(system_info.reserved2); // Well, why not? - - // MDCPUInformation cpu; - if (system_info.processor_architecture == MD_CPU_ARCHITECTURE_X86) { - D32(system_info.cpu.x86_cpu_info.vendor_id[0]); - D32(system_info.cpu.x86_cpu_info.vendor_id[1]); - D32(system_info.cpu.x86_cpu_info.vendor_id[2]); - D32(system_info.cpu.x86_cpu_info.version_information); - D32(system_info.cpu.x86_cpu_info.feature_information); - D32(system_info.cpu.x86_cpu_info.amd_extended_cpu_features); - } else { - D64(system_info.cpu.other_cpu_info.processor_features[0]); - D64(system_info.cpu.other_cpu_info.processor_features[1]); - } -} - -const MDRawSystemInfo SystemInfo::windows_x86 = { - MD_CPU_ARCHITECTURE_X86, // processor_architecture - 6, // processor_level - 0xd08, // processor_revision - 1, // number_of_processors - 1, // product_type - 5, // major_version - 1, // minor_version - 2600, // build_number - 2, // platform_id - 0xdeadbeef, // csd_version_rva - 0x100, // suite_mask - 0, // reserved2 - { // cpu - { // x86_cpu_info - { 0x756e6547, 0x49656e69, 0x6c65746e }, // vendor_id - 0x6d8, // version_information - 0xafe9fbff, // feature_information - 0xffffffff // amd_extended_cpu_features - } - } -}; - -const string SystemInfo::windows_x86_csd_version = "Service Pack 2"; - -String::String(const Dump &dump, const string &contents) : Section(dump) { - D32(contents.size() * 2); - for (string::const_iterator i = contents.begin(); i != contents.end(); i++) - D16(*i); -} - -void String::CiteStringIn(test_assembler::Section *section) const { - section->D32(file_offset_); -} - -void Memory::CiteMemoryIn(test_assembler::Section *section) const { - section->D64(address_); - CiteLocationIn(section); -} - -Context::Context(const Dump &dump, const MDRawContextX86 &context) - : Section(dump) { - // The caller should have properly set the CPU type flag. - assert(context.context_flags & MD_CONTEXT_X86); - // It doesn't make sense to store x86 registers in big-endian form. - assert(dump.endianness() == kLittleEndian); - D32(context.context_flags); - D32(context.dr0); - D32(context.dr1); - D32(context.dr2); - D32(context.dr3); - D32(context.dr6); - D32(context.dr7); - D32(context.float_save.control_word); - D32(context.float_save.status_word); - D32(context.float_save.tag_word); - D32(context.float_save.error_offset); - D32(context.float_save.error_selector); - D32(context.float_save.data_offset); - D32(context.float_save.data_selector); - // context.float_save.register_area[] contains 8-bit quantities and - // does not need to be swapped. - Append(context.float_save.register_area, - sizeof(context.float_save.register_area)); - D32(context.float_save.cr0_npx_state); - D32(context.gs); - D32(context.fs); - D32(context.es); - D32(context.ds); - D32(context.edi); - D32(context.esi); - D32(context.ebx); - D32(context.edx); - D32(context.ecx); - D32(context.eax); - D32(context.ebp); - D32(context.eip); - D32(context.cs); - D32(context.eflags); - D32(context.esp); - D32(context.ss); - // context.extended_registers[] contains 8-bit quantities and does - // not need to be swapped. - Append(context.extended_registers, sizeof(context.extended_registers)); - assert(Size() == sizeof(MDRawContextX86)); -} - -Thread::Thread(const Dump &dump, - u_int32_t thread_id, const Memory &stack, const Context &context, - u_int32_t suspend_count, u_int32_t priority_class, - u_int32_t priority, u_int64_t teb) : Section(dump) { - D32(thread_id); - D32(suspend_count); - D32(priority_class); - D32(priority); - D64(teb); - stack.CiteMemoryIn(this); - context.CiteLocationIn(this); - assert(Size() == sizeof(MDRawThread)); -} - -Module::Module(const Dump &dump, - u_int64_t base_of_image, - u_int32_t size_of_image, - const String &name, - u_int32_t time_date_stamp, - u_int32_t checksum, - const MDVSFixedFileInfo &version_info, - const Section *cv_record, - const Section *misc_record) : Section(dump) { - D64(base_of_image); - D32(size_of_image); - D32(checksum); - D32(time_date_stamp); - name.CiteStringIn(this); - D32(version_info.signature); - D32(version_info.struct_version); - D32(version_info.file_version_hi); - D32(version_info.file_version_lo); - D32(version_info.product_version_hi); - D32(version_info.product_version_lo); - D32(version_info.file_flags_mask); - D32(version_info.file_flags); - D32(version_info.file_os); - D32(version_info.file_type); - D32(version_info.file_subtype); - D32(version_info.file_date_hi); - D32(version_info.file_date_lo); - cv_record->CiteLocationIn(this); - misc_record->CiteLocationIn(this); - D64(0).D64(0); -} - -const MDVSFixedFileInfo Module::stock_version_info = { - MD_VSFIXEDFILEINFO_SIGNATURE, // signature - MD_VSFIXEDFILEINFO_VERSION, // struct_version - 0x11111111, // file_version_hi - 0x22222222, // file_version_lo - 0x33333333, // product_version_hi - 0x44444444, // product_version_lo - MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG, // file_flags_mask - MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG, // file_flags - MD_VSFIXEDFILEINFO_FILE_OS_NT | MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32, - // file_os - MD_VSFIXEDFILEINFO_FILE_TYPE_APP, // file_type - MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN, // file_subtype - 0, // file_date_hi - 0 // file_date_lo -}; - -Dump::Dump(u_int64_t flags, - Endianness endianness, - u_int32_t version, - u_int32_t date_time_stamp) - : test_assembler::Section(endianness), - file_start_(0), - stream_directory_(*this), - stream_count_(0), - thread_list_(*this, MD_THREAD_LIST_STREAM), - module_list_(*this, MD_MODULE_LIST_STREAM), - memory_list_(*this, MD_MEMORY_LIST_STREAM) - { - D32(MD_HEADER_SIGNATURE); - D32(version); - D32(stream_count_label_); - D32(stream_directory_rva_); - D32(0); - D32(date_time_stamp); - D64(flags); - assert(Size() == sizeof(MDRawHeader)); -} - -Dump &Dump::Add(SynthMinidump::Section *section) { - section->Finish(file_start_ + Size()); - Append(*section); - return *this; -} - -Dump &Dump::Add(Stream *stream) { - Add(static_cast(stream)); - stream->CiteStreamIn(&stream_directory_); - stream_count_++; - return *this; -} - -Dump &Dump::Add(Memory *memory) { - // Add the memory contents themselves to the file. - Add(static_cast(memory)); - - // The memory list is a list of MDMemoryDescriptors, not of actual - // memory elements. Produce a descriptor, and add that to the list. - SynthMinidump::Section descriptor(*this); - memory->CiteMemoryIn(&descriptor); - memory_list_.Add(&descriptor); - return *this; -} - -Dump &Dump::Add(Thread *thread) { - thread_list_.Add(thread); - return *this; -} - -Dump &Dump::Add(Module *module) { - module_list_.Add(module); - return *this; -} - -void Dump::Finish() { - if (!thread_list_.Empty()) Add(&thread_list_); - if (!module_list_.Empty()) Add(&module_list_); - if (!memory_list_.Empty()) Add(&memory_list_); - - // Create the stream directory. We don't use - // stream_directory_.Finish here, because the stream directory isn't - // cited using a location descriptor; rather, the Minidump header - // has the stream count and MDRVA. - stream_count_label_ = stream_count_; - stream_directory_rva_ = file_start_ + Size(); - Append(static_cast(stream_directory_)); -} - -} // namespace SynthMinidump - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.h deleted file mode 100644 index f09a68fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump.h +++ /dev/null @@ -1,358 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// synth_minidump.h: Interface to SynthMinidump: fake minidump generator. -// -// We treat a minidump file as the concatenation of a bunch of -// test_assembler::Sections. The file header, stream directory, -// streams, memory regions, strings, and so on --- each is a Section -// that eventually gets appended to the minidump. Dump, Memory, -// Context, Thread, and so on all inherit from test_assembler::Section. -// For example: -// -// using google_breakpad::test_assembler::kLittleEndian; -// using google_breakpad::SynthMinidump::Context; -// using google_breakpad::SynthMinidump::Dump; -// using google_breakpad::SynthMinidump::Memory; -// using google_breakpad::SynthMinidump::Thread; -// -// Dump minidump(MD_NORMAL, kLittleEndian); -// -// Memory stack1(minidump, 0x569eb0a9); -// ... build contents of stack1 with test_assembler::Section functions ... -// -// MDRawContextX86 x86_context1; -// x86_context1.context_flags = MD_CONTEXT_X86; -// x86_context1.eip = 0x7c90eb94; -// x86_context1.esp = 0x569eb0a9; -// x86_context1.ebp = x86_context1.esp + something appropriate; -// Context context1(minidump, x86_context1); -// -// Thread thread1(minidump, 0xe4a4821d, stack1, context1); -// -// minidump.Add(&stack1); -// minidump.Add(&context1); -// minidump.Add(&thread1); -// minidump.Finish(); -// -// string contents; -// EXPECT_TRUE(minidump.GetContents(&contents)); -// // contents now holds the bytes of a minidump file -// -// Because the test_assembler classes let us write Label references to -// sections before the Labels' values are known, this gives us -// flexibility in how we put the dump together: minidump pieces can -// hold the file offsets of other minidump pieces before the -// referents' positions have been decided. As long as everything has -// been placed by the time we call dump.GetContents to obtain the -// bytes, all the Labels' values will be known, and everything will -// get patched up appropriately. -// -// The dump.Add(thing) functions append THINGS's contents to the -// minidump, but they also do two other things: -// -// - dump.Add(thing) invokes thing->Finish, which tells *thing the -// offset within the file at which it was placed, and allows *thing -// to do any final content generation. -// -// - If THING is something which should receive an entry in some sort -// of list or directory, then dump.Add(THING) automatically creates -// the appropriate directory or list entry. Streams must appear in -// the stream directory; memory ranges should be listed in the -// memory list; threads should be placed in the thread list; and so -// on. -// -// By convention, Section subclass constructors that take references -// to other Sections do not take care of 'Add'ing their arguments to -// the dump. For example, although the Thread constructor takes -// references to a Memory and a Context, it does not add them to the -// dump on the caller's behalf. Rather, the caller is responsible for -// 'Add'ing every section they create. This allows Sections to be -// cited from more than one place; for example, Memory ranges are -// cited both from Thread objects (as their stack contents) and by the -// memory list stream. -// -// If you forget to Add some Section, the Dump::GetContents call will -// fail, as the test_assembler::Labels used to cite the Section's -// contents from elsewhere will still be undefined. -#ifndef PROCESSOR_SYNTH_MINIDUMP_H_ -#define PROCESSOR_SYNTH_MINIDUMP_H_ - -#include - -#include -#include - -#include "common/test_assembler.h" -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -namespace SynthMinidump { - -using std::string; -using test_assembler::Endianness; -using test_assembler::kBigEndian; -using test_assembler::kLittleEndian; -using test_assembler::kUnsetEndian; -using test_assembler::Label; - -class Dump; -class Memory; -class String; - -// A test_assembler::Section which will be appended to a minidump. -class Section: public test_assembler::Section { - public: - explicit Section(const Dump &dump); - - // Append an MDLocationDescriptor referring to this section to SECTION. - // If 'this' is NULL, append a descriptor with a zero length and MDRVA. - // - // (I couldn't find the language in the C++ standard that says that - // invoking member functions of a NULL pointer to a class type is - // bad, if such language exists. Having this function handle NULL - // 'this' is convenient, but if it causes trouble, it's not hard to - // do differently.) - void CiteLocationIn(test_assembler::Section *section) const; - - // Note that this section's contents are complete, and that it has - // been placed in the minidump file at OFFSET. The 'Add' member - // functions call the Finish member function of the object being - // added for you; if you are 'Add'ing this section, you needn't Finish it. - virtual void Finish(const Label &offset) { - file_offset_ = offset; size_ = Size(); - } - - protected: - // This section's size and offset within the minidump file. - Label file_offset_, size_; -}; - -// A stream within a minidump file. 'Add'ing a stream to a minidump -// creates an entry for it in the minidump's stream directory. -class Stream: public Section { - public: - // Create a stream of type TYPE. You can append whatever contents - // you like to this stream using the test_assembler::Section methods. - Stream(const Dump &dump, u_int32_t type) : Section(dump), type_(type) { } - - // Append an MDRawDirectory referring to this stream to SECTION. - void CiteStreamIn(test_assembler::Section *section) const; - - private: - // The type of this stream. - u_int32_t type_; -}; - -class SystemInfo: public Stream { - public: - // Create an MD_SYSTEM_INFO_STREAM stream belonging to DUMP holding - // an MDRawSystem info structure initialized with the values from - // SYSTEM_INFO, except that the csd_version field is replaced with - // the file offset of the string CSD_VERSION, which can be 'Add'ed - // to the dump at the desired location. - // - // Remember that you are still responsible for 'Add'ing CSD_VERSION - // to the dump yourself. - SystemInfo(const Dump &dump, - const MDRawSystemInfo &system_info, - const String &csd_version); - - // Stock MDRawSystemInfo information and associated strings, for - // writing tests. - static const MDRawSystemInfo windows_x86; - static const string windows_x86_csd_version; -}; - -// An MDString: a string predeced by a 32-bit length. -class String: public Section { - public: - String(const Dump &dump, const string &value); - - // Append an MDRVA referring to this string to SECTION. - void CiteStringIn(test_assembler::Section *section) const; -}; - -// A range of memory contents. 'Add'ing a memory range to a minidump -// creates n entry for it in the minidump's memory list. By -// convention, the 'start', 'Here', and 'Mark' member functions refer -// to memory addresses. -class Memory: public Section { - public: - Memory(const Dump &dump, u_int64_t address) - : Section(dump), address_(address) { start() = address; } - - // Append an MDMemoryDescriptor referring to this memory range to SECTION. - void CiteMemoryIn(test_assembler::Section *section) const; - - private: - // The process address from which these memory contents were taken. - // Shouldn't this be a Label? - u_int64_t address_; -}; - -class Context: public Section { - public: - // Create a context belonging to DUMP whose contents are a copy of CONTEXT. - Context(const Dump &dump, const MDRawContextX86 &context); - // Add constructors for other architectures here. Remember to byteswap. -}; - -class Thread: public Section { - public: - // Create a thread belonging to DUMP with the given values, citing - // STACK and CONTEXT (which you must Add to the dump separately). - Thread(const Dump &dump, - u_int32_t thread_id, - const Memory &stack, - const Context &context, - u_int32_t suspend_count = 0, - u_int32_t priority_class = 0, - u_int32_t priority = 0, - u_int64_t teb = 0); -}; - -class Module: public Section { - public: - // Create a module with the given values. Note that CV_RECORD and - // MISC_RECORD can be NULL, in which case the corresponding location - // descriptior in the minidump will have a length of zero. - Module(const Dump &dump, - u_int64_t base_of_image, - u_int32_t size_of_image, - const String &name, - u_int32_t time_date_stamp = 1262805309, - u_int32_t checksum = 0, - const MDVSFixedFileInfo &version_info = Module::stock_version_info, - const Section *cv_record = NULL, - const Section *misc_record = NULL); - - private: - // A standard MDVSFixedFileInfo structure to use as a default for - // minidumps. There's no reason to make users write out all this crap - // over and over. - static const MDVSFixedFileInfo stock_version_info; -}; - -// A list of entries starting with a 32-bit count, like a memory list -// or a thread list. -template -class List: public Stream { - public: - List(const Dump &dump, u_int32_t type) : Stream(dump, type), count_(0) { - D32(count_label_); - } - - // Add ELEMENT to this list. - void Add(Element *element) { - element->Finish(file_offset_ + Size()); - Append(*element); - count_++; - } - - // Return true if this List is empty, false otherwise. - bool Empty() { return count_ == 0; } - - // Finish up the contents of this section, mark it as having been - // placed at OFFSET. - virtual void Finish(const Label &offset) { - Stream::Finish(offset); - count_label_ = count_; - } - - private: - size_t count_; - Label count_label_; -}; - -class Dump: public test_assembler::Section { - public: - - // Create a test_assembler::Section containing a minidump file whose - // header uses the given values. ENDIANNESS determines the - // endianness of the signature; we set this section's default - // endianness by this. - Dump(u_int64_t flags, - Endianness endianness = kLittleEndian, - u_int32_t version = MD_HEADER_VERSION, - u_int32_t date_time_stamp = 1262805309); - - // The following functions call OBJECT->Finish(), and append the - // contents of OBJECT to this minidump. They also record OBJECT in - // whatever directory or list is appropriate for its type. The - // stream directory, memory list, thread list, and module list are - // accumulated this way. - Dump &Add(SynthMinidump::Section *object); // simply append data - Dump &Add(Stream *object); // append, record in stream directory - Dump &Add(Memory *object); // append, record in memory list - Dump &Add(Thread *object); // append, record in thread list - Dump &Add(Module *object); // append, record in module list - - // Complete the construction of the minidump, given the Add calls - // we've seen up to this point. After this call, this Dump's - // contents are complete, all labels should be defined if everything - // Cited has been Added, and you may call GetContents on it. - void Finish(); - - private: - // A label representing the start of the minidump file. - Label file_start_; - - // The stream directory. We construct this incrementally from - // Add(Stream *) calls. - SynthMinidump::Section stream_directory_; // The directory's contents. - size_t stream_count_; // The number of streams so far. - Label stream_count_label_; // Cited in file header. - Label stream_directory_rva_; // The directory's file offset. - - // This minidump's thread list. We construct this incrementally from - // Add(Thread *) calls. - List thread_list_; - - // This minidump's module list. We construct this incrementally from - // Add(Module *) calls. - List module_list_; - - // This minidump's memory list. We construct this incrementally from - // Add(Memory *) calls. This is actually a list of MDMemoryDescriptors, - // not memory ranges --- thus the odd type. - List memory_list_; -}; - -} // namespace SynthMinidump - -} // namespace google_breakpad - -#endif // PROCESSOR_SYNTH_MINIDUMP_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest.cc deleted file mode 100644 index adad4ae8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest.cc +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// synth_minidump_unittest.cc: Unit tests for google_breakpad::SynthMinidump -// classes. - -#include -#include - -#include "breakpad_googletest_includes.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/synth_minidump.h" -#include "processor/synth_minidump_unittest_data.h" - -using google_breakpad::SynthMinidump::Context; -using google_breakpad::SynthMinidump::Dump; -using google_breakpad::SynthMinidump::List; -using google_breakpad::SynthMinidump::Memory; -using google_breakpad::SynthMinidump::Module; -using google_breakpad::SynthMinidump::Section; -using google_breakpad::SynthMinidump::Stream; -using google_breakpad::SynthMinidump::String; -using google_breakpad::SynthMinidump::SystemInfo; -using google_breakpad::SynthMinidump::Thread; -using google_breakpad::test_assembler::kBigEndian; -using google_breakpad::test_assembler::kLittleEndian; -using google_breakpad::test_assembler::Label; -using std::string; - -TEST(Section, Simple) { - Dump dump(0); - Section section(dump); - section.L32(0x12345678); - section.Finish(0); - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("\x78\x56\x34\x12", 4), contents); -} - -TEST(Section, CiteLocationIn) { - Dump dump(0, kBigEndian); - Section section1(dump), section2(dump); - section1.Append("order"); - section2.Append("mayhem"); - section2.Finish(0x32287ec2); - section2.CiteLocationIn(§ion1); - string contents; - ASSERT_TRUE(section1.GetContents(&contents)); - string expected("order\0\0\0\x06\x32\x28\x7e\xc2", 13); - EXPECT_EQ(expected, contents); -} - -TEST(Stream, CiteStreamIn) { - Dump dump(0, kLittleEndian); - Stream stream(dump, 0x40cae2b3); - Section section(dump); - stream.Append("stream contents"); - section.Append("section contents"); - stream.Finish(0x41424344); - stream.CiteStreamIn(§ion); - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - string expected("section contents" - "\xb3\xe2\xca\x40" - "\x0f\0\0\0" - "\x44\x43\x42\x41", - 16 + 4 + 4 + 4); - EXPECT_EQ(expected, contents); -} - -TEST(Memory, CiteMemoryIn) { - Dump dump(0, kBigEndian); - Memory memory(dump, 0x76d010874ab019f9ULL); - Section section(dump); - memory.Append("memory contents"); - section.Append("section contents"); - memory.Finish(0x51525354); - memory.CiteMemoryIn(§ion); - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - string expected("section contents" - "\x76\xd0\x10\x87\x4a\xb0\x19\xf9" - "\0\0\0\x0f" - "\x51\x52\x53\x54", - 16 + 8 + 4 + 4); - EXPECT_EQ(contents, expected); -} - -TEST(Memory, Here) { - Dump dump(0, kBigEndian); - Memory memory(dump, 0x89979731eb060ed4ULL); - memory.Append(1729, 42); - Label l = memory.Here(); - ASSERT_EQ(0x89979731eb060ed4ULL + 1729, l.Value()); -} - -TEST(Context, X86) { - Dump dump(0, kLittleEndian); - assert(x86_raw_context.context_flags & MD_CONTEXT_X86); - Context context(dump, x86_raw_context); - string contents; - ASSERT_TRUE(context.GetContents(&contents)); - EXPECT_EQ(sizeof(x86_expected_contents), contents.size()); - EXPECT_TRUE(memcmp(contents.data(), x86_expected_contents, contents.size()) - == 0); -} - -TEST(ContextDeathTest, X86BadFlags) { - Dump dump(0, kLittleEndian); - MDRawContextX86 raw; - raw.context_flags = 0; - ASSERT_DEATH(Context context(dump, raw);, - "context\\.context_flags & 0x[0-9a-f]+"); -} - -TEST(ContextDeathTest, X86BadEndianness) { - Dump dump(0, kBigEndian); - MDRawContextX86 raw; - raw.context_flags = MD_CONTEXT_X86; - ASSERT_DEATH(Context context(dump, raw);, - "dump\\.endianness\\(\\) == kLittleEndian"); -} - -TEST(Thread, Simple) { - Dump dump(0, kLittleEndian); - Context context(dump, x86_raw_context); - context.Finish(0x8665da0c); - Memory stack(dump, 0xaad55a93cc3c0efcULL); - stack.Append("stack contents"); - stack.Finish(0xe08cdbd1); - Thread thread(dump, 0x3d7ec360, stack, context, - 0x3593f44d, // suspend count - 0xab352b82, // priority class - 0x2753d838, // priority - 0xeb2de4be3f29e3e9ULL); // thread environment block - string contents; - ASSERT_TRUE(thread.GetContents(&contents)); - static const u_int8_t expected_bytes[] = { - 0x60, 0xc3, 0x7e, 0x3d, // thread id - 0x4d, 0xf4, 0x93, 0x35, // suspend count - 0x82, 0x2b, 0x35, 0xab, // priority class - 0x38, 0xd8, 0x53, 0x27, // priority - 0xe9, 0xe3, 0x29, 0x3f, 0xbe, 0xe4, 0x2d, 0xeb, // thread environment block - 0xfc, 0x0e, 0x3c, 0xcc, 0x93, 0x5a, 0xd5, 0xaa, // stack address - 0x0e, 0x00, 0x00, 0x00, // stack size - 0xd1, 0xdb, 0x8c, 0xe0, // stack MDRVA - 0xcc, 0x02, 0x00, 0x00, // context size - 0x0c, 0xda, 0x65, 0x86 // context MDRVA - }; - EXPECT_EQ(sizeof(expected_bytes), contents.size()); - EXPECT_TRUE(memcmp(contents.data(), expected_bytes, contents.size()) == 0); -} - -TEST(String, Simple) { - Dump dump(0, kBigEndian); - String s(dump, "All mimsy were the borogoves"); - string contents; - ASSERT_TRUE(s.GetContents(&contents)); - static const char expected[] = - "\x00\x00\x00\x38\0A\0l\0l\0 \0m\0i\0m\0s\0y\0 \0w\0e\0r\0e" - "\0 \0t\0h\0e\0 \0b\0o\0r\0o\0g\0o\0v\0e\0s"; - string expected_string(expected, sizeof(expected) - 1); - EXPECT_EQ(expected_string, contents); -} - -TEST(String, CiteStringIn) { - Dump dump(0, kLittleEndian); - String s(dump, "and the mome wraths outgrabe"); - Section section(dump); - section.Append("initial"); - s.CiteStringIn(§ion); - s.Finish(0xdc2bb469); - string contents; - ASSERT_TRUE(section.GetContents(&contents)); - EXPECT_EQ(string("initial\x69\xb4\x2b\xdc", 7 + 4), contents); -} - -TEST(List, Empty) { - Dump dump(0, kBigEndian); - List
list(dump, 0x2442779c); - EXPECT_TRUE(list.Empty()); - list.Finish(0x84e09808); - string contents; - ASSERT_TRUE(list.GetContents(&contents)); - EXPECT_EQ(string("\0\0\0\0", 4), contents); -} - -TEST(List, Two) { - Dump dump(0, kBigEndian); - List
list(dump, 0x26c9f498); - Section section1(dump); - section1.Append("section one contents"); - EXPECT_TRUE(list.Empty()); - list.Add(§ion1); - EXPECT_FALSE(list.Empty()); - Section section2(dump); - section2.Append("section two contents"); - list.Add(§ion2); - list.Finish(0x1e5bb60e); - string contents; - ASSERT_TRUE(list.GetContents(&contents)); - EXPECT_EQ(string("\0\0\0\x02section one contentssection two contents", 44), - contents); -} - -TEST(Dump, Header) { - Dump dump(0x9f738b33685cc84cULL, kLittleEndian, 0xb3817faf, 0x2c741c0a); - dump.Finish(); - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - ASSERT_EQ(string("\x4d\x44\x4d\x50" // signature - "\xaf\x7f\x81\xb3" // version - "\0\0\0\0" // stream count - "\x20\0\0\0" // directory RVA (could be anything) - "\0\0\0\0" // checksum - "\x0a\x1c\x74\x2c" // time_date_stamp - "\x4c\xc8\x5c\x68\x33\x8b\x73\x9f", // flags - 32), - contents); -} - -TEST(Dump, HeaderBigEndian) { - Dump dump(0x206ce3cc6fb8e0f0ULL, kBigEndian, 0x161693e2, 0x35667744); - dump.Finish(); - string contents; - ASSERT_TRUE(dump.GetContents(&contents)); - ASSERT_EQ(string("\x50\x4d\x44\x4d" // signature - "\x16\x16\x93\xe2" // version - "\0\0\0\0" // stream count - "\0\0\0\x20" // directory RVA (could be anything) - "\0\0\0\0" // checksum - "\x35\x66\x77\x44" // time_date_stamp - "\x20\x6c\xe3\xcc\x6f\xb8\xe0\xf0", // flags - 32), - contents); -} - -TEST(Dump, OneSection) { - Dump dump(0, kLittleEndian); - Section section(dump); - section.Append("section contents"); - dump.Add(§ion); - dump.Finish(); - string dump_contents; - // Just check for undefined labels; don't worry about the contents. - ASSERT_TRUE(dump.GetContents(&dump_contents)); - - Section referencing_section(dump); - section.CiteLocationIn(&referencing_section); - string contents; - ASSERT_TRUE(referencing_section.GetContents(&contents)); - ASSERT_EQ(string("\x10\0\0\0\x20\0\0\0", 8), contents); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest_data.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest_data.h deleted file mode 100644 index 7036d2cb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/synth_minidump_unittest_data.h +++ /dev/null @@ -1,246 +0,0 @@ -// -*- mode: C++ -*- - -// Not copyrightable: random test data. -// synth_minidump_unittest_data.h: verbose test data for SynthMinidump tests. - -#ifndef PROCESSOR_SYNTH_MINIDUMP_UNITTEST_DATA_H_ -#define PROCESSOR_SYNTH_MINIDUMP_UNITTEST_DATA_H_ - -#include "google_breakpad/common/minidump_format.h" - -static const MDRawContextX86 x86_raw_context = { - 0xded5d71b, // context_flags - 0x9fdb432e, // dr0 - 0x26b7a81a, // dr1 - 0xcac7e348, // dr2 - 0xcf99ec09, // dr3 - 0x7dc8c2cd, // dr6 - 0x21deb880, // dr7 - - // float_save - { - 0x8a5d2bb0, // control_word - 0x0286c4c9, // status_word - 0xf1feea21, // tag_word - 0xb2d40576, // error_offset - 0x48146cde, // error_selector - 0x983f9b21, // data_offset - 0x475be12c, // data_selector - - // register_area - { - 0xd9, 0x04, 0x20, 0x6b, 0x88, 0x3a, 0x3f, 0xd5, - 0x59, 0x7a, 0xa9, 0xeb, 0xd0, 0x5c, 0xdf, 0xfe, - 0xad, 0xdd, 0x4a, 0x8b, 0x10, 0xcc, 0x9a, 0x33, - 0xcb, 0xb6, 0xf7, 0x86, 0xcd, 0x69, 0x25, 0xae, - 0x25, 0xe5, 0x7a, 0xa1, 0x8f, 0xb2, 0x84, 0xd9, - 0xf7, 0x2d, 0x8a, 0xa1, 0x80, 0x81, 0x7f, 0x67, - 0x07, 0xa8, 0x23, 0xf1, 0x8c, 0xdc, 0xd8, 0x04, - 0x8b, 0x9d, 0xb1, 0xcd, 0x61, 0x0c, 0x9c, 0x69, - 0xc7, 0x8d, 0x17, 0xb6, 0xe5, 0x0b, 0x94, 0xf7, - 0x78, 0x9b, 0x63, 0x49, 0xba, 0xfc, 0x08, 0x4d - }, - - 0x84c53a90, // cr0_npx_state - }, - - 0x79f71e76, // gs - 0x8107bd25, // fs - 0x452d2921, // es - 0x87ec2875, // ds - 0xf8bb73f5, // edi - 0xa63ebb88, // esi - 0x95d35ebe, // ebx - 0x17aa2456, // edx - 0x135fa208, // ecx - 0x500615e6, // eax - 0x66d14205, // ebp - 0x000719a5, // eip - 0x477b481b, // cs - 0x8684dfba, // eflags - 0xe33ccddf, // esp - 0xc0e65d33, // ss - - // extended_registers - { - 0x68, 0x63, 0xdf, 0x50, 0xf7, 0x3b, 0xe8, 0xe5, - 0xcb, 0xd6, 0x66, 0x60, 0xe5, 0xa3, 0x58, 0xb3, - 0x6f, 0x34, 0xca, 0x02, 0x9b, 0x5f, 0xd0, 0x41, - 0xbd, 0xc5, 0x2d, 0xf8, 0xff, 0x15, 0xa2, 0xd0, - 0xe3, 0x2b, 0x3b, 0x8a, 0x9f, 0xc3, 0x9e, 0x28, - 0x0a, 0xc2, 0xac, 0x3b, 0x67, 0x37, 0x01, 0xfd, - 0xc3, 0xaf, 0x60, 0xf6, 0x2c, 0x4f, 0xa9, 0x52, - 0x92, 0xe5, 0x28, 0xde, 0x34, 0xb6, 0x2e, 0x44, - 0x15, 0xa4, 0xb6, 0xe4, 0xc9, 0x1a, 0x14, 0xb9, - 0x51, 0x33, 0x3c, 0xe0, 0xc7, 0x94, 0xf0, 0xf7, - 0x78, 0xdd, 0xe5, 0xca, 0xb7, 0xa6, 0xe0, 0x14, - 0xa6, 0x03, 0xab, 0x77, 0xad, 0xbd, 0xd2, 0x53, - 0x3d, 0x07, 0xe7, 0xaf, 0x90, 0x44, 0x71, 0xbe, - 0x0c, 0xdf, 0x2b, 0x97, 0x40, 0x48, 0xd5, 0xf9, - 0x62, 0x03, 0x91, 0x84, 0xd6, 0xdd, 0x29, 0x97, - 0x35, 0x02, 0xfb, 0x59, 0x97, 0xb0, 0xec, 0xa9, - 0x39, 0x6f, 0x81, 0x71, 0x2a, 0xf0, 0xe7, 0x2c, - 0x4e, 0x93, 0x90, 0xcb, 0x67, 0x69, 0xde, 0xd7, - 0x68, 0x3b, 0x0f, 0x69, 0xa8, 0xf4, 0xa8, 0x83, - 0x42, 0x80, 0x47, 0x65, 0x7a, 0xc9, 0x19, 0x5d, - 0xcb, 0x43, 0xa5, 0xff, 0xf8, 0x9e, 0x62, 0xf4, - 0xe2, 0x6c, 0xcc, 0x17, 0x55, 0x7c, 0x0d, 0x5c, - 0x8d, 0x16, 0x01, 0xd7, 0x3a, 0x0c, 0xf4, 0x7f, - 0x71, 0xdc, 0x48, 0xe9, 0x4b, 0xfe, 0x1a, 0xd0, - 0x04, 0x15, 0x33, 0xec, 0x78, 0xc6, 0x7e, 0xde, - 0x7c, 0x23, 0x18, 0x8d, 0x8f, 0xc2, 0x74, 0xc1, - 0x48, 0xcd, 0x5d, 0xee, 0xee, 0x81, 0x9e, 0x49, - 0x47, 0x8a, 0xf8, 0x61, 0xa3, 0x9c, 0x81, 0x96, - 0xbe, 0x2b, 0x5e, 0xbc, 0xcd, 0x34, 0x0a, 0x2a, - 0x3b, 0x8b, 0x7d, 0xa1, 0xf2, 0x8d, 0xb4, 0x51, - 0x9e, 0x14, 0x78, 0xa3, 0x58, 0x65, 0x2d, 0xd6, - 0x50, 0x40, 0x36, 0x32, 0x31, 0xd4, 0x3e, 0xc2, - 0xe0, 0x87, 0x1c, 0x05, 0x95, 0x80, 0x84, 0x24, - 0x08, 0x6f, 0x5b, 0xc7, 0xe1, 0x1d, 0xd5, 0xa3, - 0x94, 0x44, 0xa1, 0x7c, 0xd8, 0x4b, 0x86, 0xd2, - 0xc6, 0xa9, 0xf3, 0xe2, 0x4d, 0x6e, 0x1f, 0x0e, - 0xf2, 0xf5, 0x71, 0xf9, 0x71, 0x05, 0x24, 0xc9, - 0xc1, 0xe8, 0x91, 0x42, 0x61, 0x86, 0x57, 0x68, - 0xd9, 0xc9, 0x1d, 0xd5, 0x5a, 0xe9, 0xba, 0xe6, - 0x15, 0x8f, 0x87, 0xbd, 0x62, 0x56, 0xed, 0xda, - 0xc2, 0xa5, 0xd5, 0x39, 0xac, 0x05, 0x10, 0x14, - 0x4a, 0xe7, 0xe7, 0x3c, 0x3f, 0xb7, 0xbb, 0xed, - 0x01, 0x6e, 0xcd, 0xee, 0x81, 0xb4, 0x62, 0xf4, - 0x62, 0x16, 0xff, 0x20, 0xb4, 0xf0, 0xbc, 0xff, - 0x7d, 0xd9, 0xcf, 0x95, 0x30, 0x27, 0xe0, 0x2f, - 0x98, 0x53, 0x80, 0x15, 0x13, 0xef, 0x44, 0x58, - 0x12, 0x16, 0xdb, 0x11, 0xef, 0x73, 0x51, 0xcd, - 0x42, 0x3f, 0x98, 0x6c, 0xc9, 0x68, 0xc3, 0xf4, - 0x5b, 0x0f, 0x5d, 0x77, 0xed, 0xdf, 0x0f, 0xff, - 0xb8, 0x69, 0x98, 0x50, 0x77, 0x7a, 0xe8, 0x90, - 0x27, 0x46, 0x10, 0xd2, 0xb5, 0x00, 0x3b, 0x36, - 0x43, 0x6d, 0x67, 0x41, 0x20, 0x3a, 0x32, 0xe0, - 0x2e, 0x5a, 0xfb, 0x4e, 0x4f, 0xa4, 0xf7, 0xc2, - 0xe6, 0x81, 0x1a, 0x51, 0xa8, 0x7c, 0xd4, 0x60, - 0x7c, 0x45, 0xe2, 0xba, 0x5b, 0x42, 0xf3, 0xbf, - 0x28, 0xaa, 0xf2, 0x90, 0xe4, 0x94, 0xdd, 0xaa, - 0x22, 0xd3, 0x71, 0x33, 0xa1, 0x01, 0x43, 0x0e, - 0xfa, 0x46, 0xd2, 0x6e, 0x55, 0x5e, 0x49, 0xeb, - 0x94, 0xf0, 0xb0, 0xb1, 0x2e, 0xf2, 0x3d, 0x6c, - 0x00, 0x5e, 0x01, 0x56, 0x3b, 0xfd, 0x5b, 0xa1, - 0x2f, 0x63, 0x1d, 0xbf, 0xf9, 0xd8, 0x13, 0xf7, - 0x4d, 0xb7, 0x1e, 0x3d, 0x98, 0xd2, 0xee, 0xb8, - 0x48, 0xc8, 0x5b, 0x91, 0x0f, 0x54, 0x9e, 0x26, - 0xb2, 0xc7, 0x3a, 0x6c, 0x8a, 0x35, 0xe1, 0xba - } -}; - -static const u_int8_t x86_expected_contents[] = { - 0x1b, 0xd7, 0xd5, 0xde, - 0x2e, 0x43, 0xdb, 0x9f, - 0x1a, 0xa8, 0xb7, 0x26, - 0x48, 0xe3, 0xc7, 0xca, - 0x09, 0xec, 0x99, 0xcf, - 0xcd, 0xc2, 0xc8, 0x7d, - 0x80, 0xb8, 0xde, 0x21, - 0xb0, 0x2b, 0x5d, 0x8a, - 0xc9, 0xc4, 0x86, 0x02, - 0x21, 0xea, 0xfe, 0xf1, - 0x76, 0x05, 0xd4, 0xb2, - 0xde, 0x6c, 0x14, 0x48, - 0x21, 0x9b, 0x3f, 0x98, - 0x2c, 0xe1, 0x5b, 0x47, - - // float_save.register_area --- unswapped - 0xd9, 0x04, 0x20, 0x6b, 0x88, 0x3a, 0x3f, 0xd5, - 0x59, 0x7a, 0xa9, 0xeb, 0xd0, 0x5c, 0xdf, 0xfe, - 0xad, 0xdd, 0x4a, 0x8b, 0x10, 0xcc, 0x9a, 0x33, - 0xcb, 0xb6, 0xf7, 0x86, 0xcd, 0x69, 0x25, 0xae, - 0x25, 0xe5, 0x7a, 0xa1, 0x8f, 0xb2, 0x84, 0xd9, - 0xf7, 0x2d, 0x8a, 0xa1, 0x80, 0x81, 0x7f, 0x67, - 0x07, 0xa8, 0x23, 0xf1, 0x8c, 0xdc, 0xd8, 0x04, - 0x8b, 0x9d, 0xb1, 0xcd, 0x61, 0x0c, 0x9c, 0x69, - 0xc7, 0x8d, 0x17, 0xb6, 0xe5, 0x0b, 0x94, 0xf7, - 0x78, 0x9b, 0x63, 0x49, 0xba, 0xfc, 0x08, 0x4d, - - 0x90, 0x3a, 0xc5, 0x84, - 0x76, 0x1e, 0xf7, 0x79, - 0x25, 0xbd, 0x07, 0x81, - 0x21, 0x29, 0x2d, 0x45, - 0x75, 0x28, 0xec, 0x87, - 0xf5, 0x73, 0xbb, 0xf8, - 0x88, 0xbb, 0x3e, 0xa6, - 0xbe, 0x5e, 0xd3, 0x95, - 0x56, 0x24, 0xaa, 0x17, - 0x08, 0xa2, 0x5f, 0x13, - 0xe6, 0x15, 0x06, 0x50, - 0x05, 0x42, 0xd1, 0x66, - 0xa5, 0x19, 0x07, 0x00, - 0x1b, 0x48, 0x7b, 0x47, - 0xba, 0xdf, 0x84, 0x86, - 0xdf, 0xcd, 0x3c, 0xe3, - 0x33, 0x5d, 0xe6, 0xc0, - - // extended_registers --- unswapped - 0x68, 0x63, 0xdf, 0x50, 0xf7, 0x3b, 0xe8, 0xe5, - 0xcb, 0xd6, 0x66, 0x60, 0xe5, 0xa3, 0x58, 0xb3, - 0x6f, 0x34, 0xca, 0x02, 0x9b, 0x5f, 0xd0, 0x41, - 0xbd, 0xc5, 0x2d, 0xf8, 0xff, 0x15, 0xa2, 0xd0, - 0xe3, 0x2b, 0x3b, 0x8a, 0x9f, 0xc3, 0x9e, 0x28, - 0x0a, 0xc2, 0xac, 0x3b, 0x67, 0x37, 0x01, 0xfd, - 0xc3, 0xaf, 0x60, 0xf6, 0x2c, 0x4f, 0xa9, 0x52, - 0x92, 0xe5, 0x28, 0xde, 0x34, 0xb6, 0x2e, 0x44, - 0x15, 0xa4, 0xb6, 0xe4, 0xc9, 0x1a, 0x14, 0xb9, - 0x51, 0x33, 0x3c, 0xe0, 0xc7, 0x94, 0xf0, 0xf7, - 0x78, 0xdd, 0xe5, 0xca, 0xb7, 0xa6, 0xe0, 0x14, - 0xa6, 0x03, 0xab, 0x77, 0xad, 0xbd, 0xd2, 0x53, - 0x3d, 0x07, 0xe7, 0xaf, 0x90, 0x44, 0x71, 0xbe, - 0x0c, 0xdf, 0x2b, 0x97, 0x40, 0x48, 0xd5, 0xf9, - 0x62, 0x03, 0x91, 0x84, 0xd6, 0xdd, 0x29, 0x97, - 0x35, 0x02, 0xfb, 0x59, 0x97, 0xb0, 0xec, 0xa9, - 0x39, 0x6f, 0x81, 0x71, 0x2a, 0xf0, 0xe7, 0x2c, - 0x4e, 0x93, 0x90, 0xcb, 0x67, 0x69, 0xde, 0xd7, - 0x68, 0x3b, 0x0f, 0x69, 0xa8, 0xf4, 0xa8, 0x83, - 0x42, 0x80, 0x47, 0x65, 0x7a, 0xc9, 0x19, 0x5d, - 0xcb, 0x43, 0xa5, 0xff, 0xf8, 0x9e, 0x62, 0xf4, - 0xe2, 0x6c, 0xcc, 0x17, 0x55, 0x7c, 0x0d, 0x5c, - 0x8d, 0x16, 0x01, 0xd7, 0x3a, 0x0c, 0xf4, 0x7f, - 0x71, 0xdc, 0x48, 0xe9, 0x4b, 0xfe, 0x1a, 0xd0, - 0x04, 0x15, 0x33, 0xec, 0x78, 0xc6, 0x7e, 0xde, - 0x7c, 0x23, 0x18, 0x8d, 0x8f, 0xc2, 0x74, 0xc1, - 0x48, 0xcd, 0x5d, 0xee, 0xee, 0x81, 0x9e, 0x49, - 0x47, 0x8a, 0xf8, 0x61, 0xa3, 0x9c, 0x81, 0x96, - 0xbe, 0x2b, 0x5e, 0xbc, 0xcd, 0x34, 0x0a, 0x2a, - 0x3b, 0x8b, 0x7d, 0xa1, 0xf2, 0x8d, 0xb4, 0x51, - 0x9e, 0x14, 0x78, 0xa3, 0x58, 0x65, 0x2d, 0xd6, - 0x50, 0x40, 0x36, 0x32, 0x31, 0xd4, 0x3e, 0xc2, - 0xe0, 0x87, 0x1c, 0x05, 0x95, 0x80, 0x84, 0x24, - 0x08, 0x6f, 0x5b, 0xc7, 0xe1, 0x1d, 0xd5, 0xa3, - 0x94, 0x44, 0xa1, 0x7c, 0xd8, 0x4b, 0x86, 0xd2, - 0xc6, 0xa9, 0xf3, 0xe2, 0x4d, 0x6e, 0x1f, 0x0e, - 0xf2, 0xf5, 0x71, 0xf9, 0x71, 0x05, 0x24, 0xc9, - 0xc1, 0xe8, 0x91, 0x42, 0x61, 0x86, 0x57, 0x68, - 0xd9, 0xc9, 0x1d, 0xd5, 0x5a, 0xe9, 0xba, 0xe6, - 0x15, 0x8f, 0x87, 0xbd, 0x62, 0x56, 0xed, 0xda, - 0xc2, 0xa5, 0xd5, 0x39, 0xac, 0x05, 0x10, 0x14, - 0x4a, 0xe7, 0xe7, 0x3c, 0x3f, 0xb7, 0xbb, 0xed, - 0x01, 0x6e, 0xcd, 0xee, 0x81, 0xb4, 0x62, 0xf4, - 0x62, 0x16, 0xff, 0x20, 0xb4, 0xf0, 0xbc, 0xff, - 0x7d, 0xd9, 0xcf, 0x95, 0x30, 0x27, 0xe0, 0x2f, - 0x98, 0x53, 0x80, 0x15, 0x13, 0xef, 0x44, 0x58, - 0x12, 0x16, 0xdb, 0x11, 0xef, 0x73, 0x51, 0xcd, - 0x42, 0x3f, 0x98, 0x6c, 0xc9, 0x68, 0xc3, 0xf4, - 0x5b, 0x0f, 0x5d, 0x77, 0xed, 0xdf, 0x0f, 0xff, - 0xb8, 0x69, 0x98, 0x50, 0x77, 0x7a, 0xe8, 0x90, - 0x27, 0x46, 0x10, 0xd2, 0xb5, 0x00, 0x3b, 0x36, - 0x43, 0x6d, 0x67, 0x41, 0x20, 0x3a, 0x32, 0xe0, - 0x2e, 0x5a, 0xfb, 0x4e, 0x4f, 0xa4, 0xf7, 0xc2, - 0xe6, 0x81, 0x1a, 0x51, 0xa8, 0x7c, 0xd4, 0x60, - 0x7c, 0x45, 0xe2, 0xba, 0x5b, 0x42, 0xf3, 0xbf, - 0x28, 0xaa, 0xf2, 0x90, 0xe4, 0x94, 0xdd, 0xaa, - 0x22, 0xd3, 0x71, 0x33, 0xa1, 0x01, 0x43, 0x0e, - 0xfa, 0x46, 0xd2, 0x6e, 0x55, 0x5e, 0x49, 0xeb, - 0x94, 0xf0, 0xb0, 0xb1, 0x2e, 0xf2, 0x3d, 0x6c, - 0x00, 0x5e, 0x01, 0x56, 0x3b, 0xfd, 0x5b, 0xa1, - 0x2f, 0x63, 0x1d, 0xbf, 0xf9, 0xd8, 0x13, 0xf7, - 0x4d, 0xb7, 0x1e, 0x3d, 0x98, 0xd2, 0xee, 0xb8, - 0x48, 0xc8, 0x5b, 0x91, 0x0f, 0x54, 0x9e, 0x26, - 0xb2, 0xc7, 0x3a, 0x6c, 0x8a, 0x35, 0xe1, 0xba -}; - -#endif // PROCESSOR_SYNTH_MINIDUMP_UNITTEST_DATA_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av.dmp deleted file mode 100755 index 3d2429a6..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_block_write.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_block_write.dmp deleted file mode 100755 index 265e2b7d..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_block_write.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_clobber_write.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_clobber_write.dmp deleted file mode 100755 index f536c72e..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_clobber_write.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_conditional.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_conditional.dmp deleted file mode 100755 index eba8f9e7..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_conditional.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_then_jmp.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_then_jmp.dmp deleted file mode 100755 index 1124f400..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_then_jmp.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_xchg_write.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_xchg_write.dmp deleted file mode 100755 index 066ebf12..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_read_av_xchg_write.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av.dmp deleted file mode 100755 index 6f3e3bca..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av_arg_to_call.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av_arg_to_call.dmp deleted file mode 100755 index 9c0a21cd..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/ascii_write_av_arg_to_call.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/exec_av_on_stack.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/exec_av_on_stack.dmp deleted file mode 100755 index b783c434..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/exec_av_on_stack.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/linux_test_app.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/linux_test_app.cc deleted file mode 100644 index 18f0f62f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/linux_test_app.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Breakpad test application for Linux. When run, it generates one on-demand -// minidump and then crashes, which should generate an on-crash minidump. -// dump_syms can be used to extract symbol information for use in processing. - -// To build: -// g++ -g -o linux_test_app -I ../../ -L../../client/linux linux_test_app.cc \ -// -lbreakpad -// Add -m32 to build a 32-bit executable, or -m64 for a 64-bit one -// (assuming your environment supports it). Replace -g with -gstabs+ to -// generate an executable with STABS symbols (needs -m32), or -gdwarf-2 for one -// with DWARF symbols (32- or 64-bit) - -#include -#include -#include - -#include - -#include "client/linux/handler/exception_handler.h" -#include "third_party/lss/linux_syscall_support.h" - -namespace { - -// google_breakpad::MinidumpCallback to invoke after minidump generation. -static bool callback(const char *dump_path, const char *id, - void *context, - bool succeeded) { - if (succeeded) { - printf("dump guid is %s\n", id); - } else { - printf("dump failed\n"); - } - fflush(stdout); - - return succeeded; -} - -static void CrashFunction() { - int *i = reinterpret_cast(0x45); - *i = 5; // crash! -} - -} // namespace - -int main(int argc, char **argv) { - google_breakpad::ExceptionHandler eh(".", NULL, callback, NULL, true); - if (!eh.WriteMinidump()) { - printf("Failed to generate on-demand minidump\n"); - } - CrashFunction(); - printf("did not crash?\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dmp deleted file mode 100644 index 1a6feee7..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dump.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dump.out deleted file mode 100644 index d8816e5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.dump.out +++ /dev/null @@ -1,705 +0,0 @@ -MDRawHeader - signature = 0x504d444d - version = 0x5128a793 - stream_count = 9 - stream_directory_rva = 0x20 - checksum = 0x0 - time_date_stamp = 0x45d35f73 2007-02-14 19:13:55 - flags = 0x0 - -mDirectory[0] -MDRawDirectory - stream_type = 3 - location.data_size = 100 - location.rva = 0x184 - -mDirectory[1] -MDRawDirectory - stream_type = 4 - location.data_size = 1408 - location.rva = 0x1e8 - -mDirectory[2] -MDRawDirectory - stream_type = 5 - location.data_size = 52 - location.rva = 0x1505 - -mDirectory[3] -MDRawDirectory - stream_type = 6 - location.data_size = 168 - location.rva = 0xdc - -mDirectory[4] -MDRawDirectory - stream_type = 7 - location.data_size = 56 - location.rva = 0x8c - -mDirectory[5] -MDRawDirectory - stream_type = 15 - location.data_size = 24 - location.rva = 0xc4 - -mDirectory[6] -MDRawDirectory - stream_type = 1197932545 - location.data_size = 12 - location.rva = 0x14f9 - -mDirectory[7] -MDRawDirectory - stream_type = 0 - location.data_size = 0 - location.rva = 0x0 - -mDirectory[8] -MDRawDirectory - stream_type = 0 - location.data_size = 0 - location.rva = 0x0 - -Streams: - stream type 0x0 at index 8 - stream type 0x3 at index 0 - stream type 0x4 at index 1 - stream type 0x5 at index 2 - stream type 0x6 at index 3 - stream type 0x7 at index 4 - stream type 0xf at index 5 - stream type 0x47670001 at index 6 - -MinidumpThreadList - thread_count = 2 - -thread[0] -MDRawThread - thread_id = 0xbf4 - suspend_count = 0 - priority_class = 0x0 - priority = 0x0 - teb = 0x7ffdf000 - stack.start_of_memory_range = 0x12f31c - stack.memory.data_size = 0xce4 - stack.memory.rva = 0x1639 - thread_context.data_size = 0x2cc - thread_context.rva = 0xd94 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x220000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x0000000018b72200000118b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0x0 - esi = 0x7b8 - ebx = 0x7c883780 - edx = 0x7c97c0d8 - ecx = 0x7c80b46e - eax = 0x400000 - ebp = 0x12f384 - eip = 0x7c90eb94 - cs = 0x1b - eflags = 0x246 - esp = 0x12f320 - ss = 0x23 - extended_registers[512] = 0x7f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b62200 - -Stack -0x00000000c0e9907ccb25807cb8070000000000000000000034ff1200b0fe12008037887c140000000100000000000000000000001000000027e0907c2e39917c0050fd7f00f0fd7f000000000400000034f312006947c788d4f31200a89a837cf825807c0000000098f312003225807cb8070000ffffffff00000000e4f31200ff1d4000b8070000ffffffffa8fa12008037887c0e1c4000a8fa120000000000ff792a0f64f91200b01b400000004000b0fe12000040020070fa1200084042000000000080fa120080fa12004e30867ca8fa12000000000000000000000000000018000002100000e3ef907c0000000079d900000000000048f41200000014003207917c0500000078071400000014000000000020f412003207917ca05f140018ee907cfa00000074f61200000000009615917ceb06917cf00298000100000000000000384f14009615917ceb06917c7801140008000000404f14000000a659985f1400080000000000000018ee907c90fea700400698003815917c184f1400eb06917c00000000800000000000a65988f69f0090f51200a569917cf8f41200d95c878880f5120043ef907c480485000500000090f5120088fea700a8212400000000000000000080f512002469917cf8fbfd7fa821240008000000f500000000000000384d850078019800a8fa120004000000a05f140096d4917c00000000b0d4917c0000000008069800184f140000000000104f140000000000184f140000004000000000010040020063003a005c0074006500730074005f006100700070002e006500780065000000000000002f00000028000000184f1400780185007801140028000000000000000000140084f3120010000000d8f5120018ee907cf006917cffffffffeb06917ce619917c88e6a7003003000001030000ff1b917c0000980080e6a70080069800400698000000980080e6a70000000000000000000000000080e6a7000818000088e6a700d759927c78019800081800000210000000009800f8f31200280a0000dcf6120018ee907cf006917cffffffffeb06917c0859927c00009800080000005859927c00000000000001000000a659000000005a6202000010000068fe030001000000dffe03000000010000000100fffffe7f0100000001c0c27700008500000000002dc0c27700000000684aaf590000a659241a917c80c0977c0000000000000000cd5c927c0050fd7f0000a65900000100080000004550fd7f0000000000000000000000000050fd7fcd5c927c05000000d4f61200f45c927c80e4977c05000000010000000050fd7f18f712007009917cc0e4977c172e817cff2d817c000000000000a6590000a6590210000000f0fd7f05000000e8f612000806980064f81200a89a837c002e817cffffffffff2d817cc8242400dd8ea75901000000000000004cf712003608a9590000a65901000000000000000100000060f71200e407a9596cf7120000004000000000010040020063003a005c0074006500730074005f006100700070002e0065007800650000006d05917c905f140000000000440d020000000000604f14000c0000007801140000000000a04e1400d84d8700400687004509917c0800000000000000000000004000000078011400a8038700404f14000510907c000000000000000078011400980387000800000008000000c0e4977cd04d8700f835887c7801140010000000a0e7ae591600000030fd1200d39b917c44000000620000000000a65950e9ae59d8eaae59a80387000100000014040000000000000100000002000000f800a659c003870001000000780114009508917c0000a659091b917c020000000900000040000000a2fd12009cfd1200404f1400a2fd1200d04d8700640187000000000000000000d04d870010000000d84d8700384f1400a803870010000000c00300000000870074fb1200404f14006cfe120018ee907cf006917cffffffffeb06917ca09d400000008700000000000400000000000000ffffff3fc04d8700ccfd12009c4d400004000000fa19917cb84d870064018700c04d8700063440000400000018000000c04d870079d90000c0038700fa31400000000000c04d8700c04d87000000000001000000b0fe120082294000c04d87000000000000000000c04d870048fe12008cfe120000000000e224400040fe12008cfe1200c04d8700d84d8700b0fe12008600817c54fa1200d8f9120000000000160018005479420079d90000000000000757917c00000200a4f91200a4f91200a4f91200020000000200000000000000c4f912000000000079d9000014fb12004cfa120014fb1200005a917c00fa1200a0fb120001000000655a917ca405817c74c1977ce705817c00000000f4fd120098fb120000000000a0fb12000000000090fb12000000800070fa120000000000000000000000000016001800547942000000000001000000000000000000000000000000000000003308917ca89a837c0000807c0000807ce800807c2cfa12001fe2907c11fa877cffffffffe06f817c000000006cfa12001c0000000f000000e06f817c8fc60000f0f312000060817cc8fa1200a89a837c7039867cfffffffff0ff1200da36847ca8fa1200099b837cb0fa120000000000b0fa12000000000000000000000000009cfb1200b8fb1200d4fa1200bf37907c9cfb1200e0ff1200b8fb120070fb1200b0ff1200d837907ce0ff120084fb12008b37907c9cfb1200e0ff1200b8fb120070fb1200a89a837c010000009cfb1200e0ff12006078937c9cfb1200e0ff1200b8fb120070fb1200a89a837c280a00009cfb12000200000018ee907c9032917cffffffff8832917c3364917c68fb1200000087003207917c02000000dc31917c1232917c8132917c8832917c1e000000c01e2400080200003807917c54fb12003207917cc4fb120018ee907c9032917c0000130000d01200beb4800088fe1200faea907c00000000b8fb12009cfb1200b8fb1200050000c000000000000000009e4240000200000001000000450000003f0001000000000000000000000000000000000000000000000000007f02ffff0000ffffffffffff0000000000002200000000000000ffff0000000018b72200000118b7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b0000002300000023000000280a000002000000c1ab807c58bc420094fe12004500000088fe12009e4240001b0000004602010084fe1200230000007f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b622004500000070ff120000424000b8278700dc31917c00000000004c870000000020040000000000000007000000000000004042400000000000000000002e000000000000000cff12007b434100010000000700000084434100004d87002e39917cffffffff24000000240000002700000000000000584d870004000000b1944000244c87002a0000002f000000c0fe1200004d8700584d87000000a659b0b9a859015d400015aa400000000000b4070000784e14000000000001000000f40b00000000000000000000bc070000b8070000f40b0000a8fa120000000000009c4000599c400094b240004f752a0fc0ff1200ec534000010000003039870050398700ff752a0f00002400a02024000050fd7f050000c00100000005000000000000000000240084ff1200acfa1200e0ff1200d06f4000a70b7a0f00000000f0ff1200d76f817c00002400a02024000050fd7f050000c0c8ff1200a8fa1200ffffffffa89a837ce06f817c0000000000000000000000004354400000000000 - -thread[1] -MDRawThread - thread_id = 0x11c0 - suspend_count = 0 - priority_class = 0x0 - priority = 0x0 - teb = 0x7ffde000 - stack.start_of_memory_range = 0x97f6e8 - stack.memory.data_size = 0x918 - stack.memory.rva = 0x231d - thread_context.data_size = 0x2cc - thread_context.rva = 0x1060 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x870000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x84fb120000001400320778071400000014000000f4fe1200a0fd120018eeb0fd12003815917c961534ff120034ff12000000e7712a0f2a0000005400ccfb120068514000584d540000002a000000f4fe - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0x145b00 - esi = 0x145aa8 - ebx = 0x145ad0 - edx = 0x7c90eb94 - ecx = 0x7 - eax = 0xa80000 - ebp = 0x97f6fc - eip = 0x7c90eb94 - cs = 0x1b - eflags = 0x246 - esp = 0x97f6ec - ss = 0x23 - extended_registers[512] = 0x7f0200000000870000000000000000000000000000000000801f0000ccfb120084fb1200000014003207917c050000007807140000001400000000005cfb1200f4fe1200a0fd120018ee907c2d020000b0fd12003815917c9615917ceb06917c34ff120034ff12000000000060000000e7712a0f2a0000005400000000000000ccfb120068514000584d870034fc1200540000002a000000f4fe1200f8fe12002c2f4000584d87005e00000034fc12005400000000000000b0fe1200f4fe1200c0fe12005f21400034fc12002a0000003b762a0f91214000303132330000870038393a3b3c3d3e3f4041424300000000070000003bd11e2340061400b858101e5e03e0652e005c00320033003100650064003100780114002d0066003300380034002d0000000000390034002d0062003800350038002d0031003000984e1400350065003000330065003000360035002e0064006d0070000000907c08000000ffffffff8832917cbeb4807c780114001d00f40b784e14000401000044fd120050fd1200c01e240078011400bdb9807ca04e14007c80c2770000000008fd120078011400ecfc1200f0fc1200e6b9807cffffffff7c80c27708fd12001c00000024fd1200e92a867c7c80c277b45a887c8037887c2d0200000080c2770000c17780000000005003000010000020000000780114005cff12001648847c091b917c - -Stack -0x8000108020fa97009fd7907c0000000048f7970005000f0040061400000000004cf7970037b9807c00000000000000003103917c780114000000000061dc907cf1b8807c00000000ffffffff70f79700000000000000000054f797003082140001000000000000000200000000000000000000007cf7970020b9807c0e00000004000000006000000000a80078011400000000000882140092d5907c8b9b807c9c070000d0f89700780114009c07000038821400807f140020dea85910fa9700780114009807000088fb9700e07f14009c0700000000000078011400000000000882140000000000000000000000000078011400ba0300000000000000000000000000000000000000000000000000007801140000000000000000000000000000000000c0030000000000000000000000000000088214005c0057000600000078011400000000005c00730079007300740065006d0033000082140068011400000000000000000000821400d47f1400807f140070f8970061eea859e000a8000000a8001c4e000084f89700bdeea859e000a8000000a8001c4e0000a4f897005fefa8590000a8000000000006000000c4f89700e000a80060fe9700c8f897005abfa8590000a80000000000060000001c000000d47f1400807f1400380000006ce9907c88b9807cffffffff0000a80000000000807f140030fa97007fc3a859a0c4a859b0fb970060fe9700684f1400504500004c010400ca9610410000000000000000e0000e210b01070a00400000003a000000000000f1100000001000000000bf760000000000100000000200000500010005000100040000000000000000b00000000400009ba2000000001400285214000000000034fa97007801140034fa9700910e917c080614006d05917cc84d85005c4e8500684f140000000000b04800002852140078011400e00300003052140000000000000000000000000078011400c403000030821400380000000000000000000000000000000000000000000000000000003882140048050000780200003800000000100000ec000000b8470000400000000000000000000000000000000000140000000000807f140000000000000000000000000000000101a900000060fe9700dcff9700dcff97000050fd7f78fa970054fa9700ad9d917c8cfa9700c2066f7f0e000000000000001c01000078fa9700c84d850068fa970085ae807c78fc970024fc970083dba85978fc97008cfa9700800000008edba85914010000050000000100000096020000b8fc97003815917c9615917ceb06917c60fe970060fe9700c4fd9700d8fa9700000014003207917c21000000b80c14000000140030521400b0fa9700fffffffff4fc970018ee907c3807917cffffffff3207917cab06917ceb06917ccc4f140060fe9700684f1400e0004000e4fa9700a863917c74fb970018ee907c3808917cffffffff3308917c5b2c817c872c817c00000000f4fb9700000000000000000054fd970018ee907c4006140064fd97003815917c00e0fd7feb06917c684f140038821400780114000050fd7facfb970000000000000004000000000090fe97000000000018fb970050531400508b1400a89a837cffe9907cf60d817ca807000000000000ffe9907cf60d817c08000000000000000000000000000000585314003cfc97003882140000000000160e817cc4fd970060fe970058531400208f1400588b1400460f917c50531400208f1400780114003082140000000000b8fc970078011400b8fc9700910e917c080614006d05917c3882140060fe97000000000000000000960200003082140078011400ffe9907c38821400a807000000000000780114005853140058fc9700505314001000000000000000160e817c784e8500c4fd9700388214000000000024010000f00c00001000000044fc970000000000c7e2907ce721807cffffffffe8f69700388214001809000098fc9700acfc9700d2e2a859ffffffffe8f697003882140018090000c4fc97003882140060fe9700c4fd9700ccfc97004ee3a859ffffffffe8f69700000000003882140018090000e0fc9700f4fc970093b2a859ffffffffe8f69700000000003882140018090000c4fd970060fe9700a85a140078fd9700a5b3a85960fe9700c4fd9700684f1400e8f697000000000018090000000000000200000080fd9700c4fd970060fe970000000000f40b000000000000000000000000000000f0fd7f000000001cf3120000000000e40c000039160000cc020000940d00000000000000000000000000000000000002000000ac4f14006010000098fd97005eb7a8593916000000000000684f1400784e85000000000084ff9700d4fe97007bb9a85960fe9700c4fd9700684f14003849140084ff9700010000000000000008ff9700f40b0000090000000000000020000000200000006c0000008c000000380000001e000000c4000000dc000000a80000008401000064000000b801000030000000e801000080050000e8010000680700000000000068070000680700000000000005150000340000002915000039150000fc1600001d23000068070000600300008a070000c80a0000310a00002c130000f91400000c000000352c000000000000ffffffff5c0f0000c84d8500784e8500884e85000000000000000000000000004c010000fc39a6590000000002000000050000000100000000008500280a000001000001cc0200009c0000000b00000050000000040000000010000000000000000000000001000000000000000000000000000034ff970078baa859384914005c0f0000c84d850001000000884e8500684f140008ff970064ff970000000000a8070000b0fe1200f40b00009cfb120000000000b8fb12000000000000000000ae20140000000000884e8500784e8500c84d8500a8fa120011204000ffffffff5c0f0000a80700000000000078ff970064ff970000000000adbf807c2025807cecff97000100000084ff970003000000c0110000f40b0000f40b0000a8fa120000000000010067470c0000006cff9700bc070000ffffffff000000006c1a4000f40b000000fa12000000000000004000a09d4000b0fe120083b6807cb0fe120000004000a09d4000b0fe120000e0fd7f00069c86c0ff9700d8863f86ffffffffa89a837c90b6807c000000000000000000000000301a4000b0fe120000000000 - -MinidumpModuleList - module_count = 13 - -module[0] -MDRawModule - base_of_image = 0x400000 - size_of_image = 0x2d000 - checksum = 0x0 - time_date_stamp = 0x45d35f6c - module_name_rva = 0x78a - version_info.signature = 0x0 - version_info.struct_version = 0x0 - version_info.file_version = 0x0:0x0 - version_info.product_version = 0x0:0x0 - version_info.file_flags_mask = 0x0 - version_info.file_flags = 0x0 - version_info.file_os = 0x0 - version_info.file_type = 0x0 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 40 - cv_record.rva = 0x132c - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "c:\test_app.exe" - (code_identifier) = "45D35F6C2d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 5a9832e5-2872-41c1-838e-d98914e9b7ff - (cv_record).age = 1 - (cv_record).pdb_file_name = "c:\test_app.pdb" - (misc_record) = (null) - (debug_file) = "c:\test_app.pdb" - (debug_identifier) = "5A9832E5287241C1838ED98914E9B7FF1" - (version) = "" - -module[1] -MDRawModule - base_of_image = 0x7c900000 - size_of_image = 0xb0000 - checksum = 0xaf2f7 - time_date_stamp = 0x411096b4 - module_name_rva = 0x7ae - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x1354 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\ntdll.dll" - (code_identifier) = "411096B4b0000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 36515fb5-d043-45e4-91f6-72fa2e2878c0 - (cv_record).age = 2 - (cv_record).pdb_file_name = "ntdll.pdb" - (misc_record) = (null) - (debug_file) = "ntdll.pdb" - (debug_identifier) = "36515FB5D04345E491F672FA2E2878C02" - (version) = "5.1.2600.2180" - -module[2] -MDRawModule - base_of_image = 0x7c800000 - size_of_image = 0xf4000 - checksum = 0xf724d - time_date_stamp = 0x44ab9a84 - module_name_rva = 0x7ee - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280b81 - version_info.product_version = 0x50001:0xa280b81 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 37 - cv_record.rva = 0x1376 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\kernel32.dll" - (code_identifier) = "44AB9A84f4000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = bce8785c-57b4-4245-a669-896b6a19b954 - (cv_record).age = 2 - (cv_record).pdb_file_name = "kernel32.pdb" - (misc_record) = (null) - (debug_file) = "kernel32.pdb" - (debug_identifier) = "BCE8785C57B44245A669896B6A19B9542" - (version) = "5.1.2600.2945" - -module[3] -MDRawModule - base_of_image = 0x774e0000 - size_of_image = 0x13d000 - checksum = 0x13dc6b - time_date_stamp = 0x42e5be93 - module_name_rva = 0x834 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280aa6 - version_info.product_version = 0x50001:0xa280aa6 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x139b - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\ole32.dll" - (code_identifier) = "42E5BE9313d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 683b65b2-46f4-4187-96d2-ee6d4c55eb11 - (cv_record).age = 2 - (cv_record).pdb_file_name = "ole32.pdb" - (misc_record) = (null) - (debug_file) = "ole32.pdb" - (debug_identifier) = "683B65B246F4418796D2EE6D4C55EB112" - (version) = "5.1.2600.2726" - -module[4] -MDRawModule - base_of_image = 0x77dd0000 - size_of_image = 0x9b000 - checksum = 0xa0de4 - time_date_stamp = 0x411096a7 - module_name_rva = 0x874 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 37 - cv_record.rva = 0x13bd - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\advapi32.dll" - (code_identifier) = "411096A79b000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 455d6c5f-184d-45bb-b5c5-f30f82975114 - (cv_record).age = 2 - (cv_record).pdb_file_name = "advapi32.pdb" - (misc_record) = (null) - (debug_file) = "advapi32.pdb" - (debug_identifier) = "455D6C5F184D45BBB5C5F30F829751142" - (version) = "5.1.2600.2180" - -module[5] -MDRawModule - base_of_image = 0x77e70000 - size_of_image = 0x91000 - checksum = 0x9c482 - time_date_stamp = 0x411096ae - module_name_rva = 0x8ba - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x13e2 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\rpcrt4.dll" - (code_identifier) = "411096AE91000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = bea45a72-1da1-41da-a3ba-86b3a2031153 - (cv_record).age = 2 - (cv_record).pdb_file_name = "rpcrt4.pdb" - (misc_record) = (null) - (debug_file) = "rpcrt4.pdb" - (debug_identifier) = "BEA45A721DA141DAA3BA86B3A20311532" - (version) = "5.1.2600.2180" - -module[6] -MDRawModule - base_of_image = 0x77f10000 - size_of_image = 0x47000 - checksum = 0x4d0d0 - time_date_stamp = 0x43b34feb - module_name_rva = 0x8fc - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280b02 - version_info.product_version = 0x50001:0xa280b02 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x1405 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\gdi32.dll" - (code_identifier) = "43B34FEB47000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = c0ea66be-00a6-4bd7-aef7-9e443a91869c - (cv_record).age = 2 - (cv_record).pdb_file_name = "gdi32.pdb" - (misc_record) = (null) - (debug_file) = "gdi32.pdb" - (debug_identifier) = "C0EA66BE00A64BD7AEF79E443A91869C2" - (version) = "5.1.2600.2818" - -module[7] -MDRawModule - base_of_image = 0x77d40000 - size_of_image = 0x90000 - checksum = 0x9505c - time_date_stamp = 0x42260159 - module_name_rva = 0x93c - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280a3e - version_info.product_version = 0x50001:0xa280a3e - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x1427 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\user32.dll" - (code_identifier) = "4226015990000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = ee2b714d-83a3-4c9d-8802-7621272f8326 - (cv_record).age = 2 - (cv_record).pdb_file_name = "user32.pdb" - (misc_record) = (null) - (debug_file) = "user32.pdb" - (debug_identifier) = "EE2B714D83A34C9D88027621272F83262" - (version) = "5.1.2600.2622" - -module[8] -MDRawModule - base_of_image = 0x77c10000 - size_of_image = 0x58000 - checksum = 0x57cd3 - time_date_stamp = 0x41109752 - module_name_rva = 0x97e - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x70000:0xa280884 - version_info.product_version = 0x60001:0x21be0884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x1 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x144a - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\msvcrt.dll" - (code_identifier) = "4110975258000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = a678f3c3-0ded-426b-8390-32b996987e38 - (cv_record).age = 1 - (cv_record).pdb_file_name = "msvcrt.pdb" - (misc_record) = (null) - (debug_file) = "msvcrt.pdb" - (debug_identifier) = "A678F3C30DED426B839032B996987E381" - (version) = "7.0.2600.2180" - -module[9] -MDRawModule - base_of_image = 0x76390000 - size_of_image = 0x1d000 - checksum = 0x2a024 - time_date_stamp = 0x411096ae - module_name_rva = 0x9c0 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x146d - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\imm32.dll" - (code_identifier) = "411096AE1d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 2c17a49c-251b-4c8e-b9e2-ad13d7d9ea16 - (cv_record).age = 2 - (cv_record).pdb_file_name = "imm32.pdb" - (misc_record) = (null) - (debug_file) = "imm32.pdb" - (debug_identifier) = "2C17A49C251B4C8EB9E2AD13D7D9EA162" - (version) = "5.1.2600.2180" - -module[10] -MDRawModule - base_of_image = 0x59a60000 - size_of_image = 0xa1000 - checksum = 0xa8824 - time_date_stamp = 0x4110969a - module_name_rva = 0xa00 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 36 - cv_record.rva = 0x148f - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\dbghelp.dll" - (code_identifier) = "4110969Aa1000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 39559573-e21b-46f2-8e28-6923be9e6a76 - (cv_record).age = 1 - (cv_record).pdb_file_name = "dbghelp.pdb" - (misc_record) = (null) - (debug_file) = "dbghelp.pdb" - (debug_identifier) = "39559573E21B46F28E286923BE9E6A761" - (version) = "5.1.2600.2180" - -module[11] -MDRawModule - base_of_image = 0x77c00000 - size_of_image = 0x8000 - checksum = 0x11d78 - time_date_stamp = 0x411096b7 - module_name_rva = 0xa44 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 36 - cv_record.rva = 0x14b3 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\version.dll" - (code_identifier) = "411096B78000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 180a90c4-0384-463e-82dd-c45b2c8ab76e - (cv_record).age = 2 - (cv_record).pdb_file_name = "version.pdb" - (misc_record) = (null) - (debug_file) = "version.pdb" - (debug_identifier) = "180A90C40384463E82DDC45B2C8AB76E2" - (version) = "5.1.2600.2180" - -module[12] -MDRawModule - base_of_image = 0x76bf0000 - size_of_image = 0xb000 - checksum = 0xa29b - time_date_stamp = 0x411096ca - module_name_rva = 0xa88 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x14d7 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\psapi.dll" - (code_identifier) = "411096CAb000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = a5c3a1f9-689f-43d8-ad22-8a0929388970 - (cv_record).age = 2 - (cv_record).pdb_file_name = "psapi.pdb" - (misc_record) = (null) - (debug_file) = "psapi.pdb" - (debug_identifier) = "A5C3A1F9689F43D8AD228A09293889702" - (version) = "5.1.2600.2180" - -MinidumpMemoryList - region_count = 3 - -region[0] -MDMemoryDescriptor - start_of_memory_range = 0x7c90eb14 - memory.data_size = 0x100 - memory.rva = 0x1539 -Memory -0xff83c4ec890424c744240401000000895c2408c74424100000000054e877000000c208009090909090558bec83ec508944240c64a1180000008b80a4010000890424c744240400000000c744240800000000c74424100000000054e8380000008b04248be55dc3908da424000000008d490090909090908bd40f349090909090c38da424000000008d64240090909090908d542408cd2ec3558bec9c81ecd00200008985dcfdffff898dd8fdffff8b45088b4d0489480c8d852cfdffff8988b80000008998a40000008990a800000089b0a000000089b89c0000008d4d0c8988c40000008b4d008988b40000008b4dfc8988c00000008c88bc0000008c989800 - -region[1] -MDMemoryDescriptor - start_of_memory_range = 0x12f31c - memory.data_size = 0xce4 - memory.rva = 0x1639 -Memory -0x00000000c0e9907ccb25807cb8070000000000000000000034ff1200b0fe12008037887c140000000100000000000000000000001000000027e0907c2e39917c0050fd7f00f0fd7f000000000400000034f312006947c788d4f31200a89a837cf825807c0000000098f312003225807cb8070000ffffffff00000000e4f31200ff1d4000b8070000ffffffffa8fa12008037887c0e1c4000a8fa120000000000ff792a0f64f91200b01b400000004000b0fe12000040020070fa1200084042000000000080fa120080fa12004e30867ca8fa12000000000000000000000000000018000002100000e3ef907c0000000079d900000000000048f41200000014003207917c0500000078071400000014000000000020f412003207917ca05f140018ee907cfa00000074f61200000000009615917ceb06917cf00298000100000000000000384f14009615917ceb06917c7801140008000000404f14000000a659985f1400080000000000000018ee907c90fea700400698003815917c184f1400eb06917c00000000800000000000a65988f69f0090f51200a569917cf8f41200d95c878880f5120043ef907c480485000500000090f5120088fea700a8212400000000000000000080f512002469917cf8fbfd7fa821240008000000f500000000000000384d850078019800a8fa120004000000a05f140096d4917c00000000b0d4917c0000000008069800184f140000000000104f140000000000184f140000004000000000010040020063003a005c0074006500730074005f006100700070002e006500780065000000000000002f00000028000000184f1400780185007801140028000000000000000000140084f3120010000000d8f5120018ee907cf006917cffffffffeb06917ce619917c88e6a7003003000001030000ff1b917c0000980080e6a70080069800400698000000980080e6a70000000000000000000000000080e6a7000818000088e6a700d759927c78019800081800000210000000009800f8f31200280a0000dcf6120018ee907cf006917cffffffffeb06917c0859927c00009800080000005859927c00000000000001000000a659000000005a6202000010000068fe030001000000dffe03000000010000000100fffffe7f0100000001c0c27700008500000000002dc0c27700000000684aaf590000a659241a917c80c0977c0000000000000000cd5c927c0050fd7f0000a65900000100080000004550fd7f0000000000000000000000000050fd7fcd5c927c05000000d4f61200f45c927c80e4977c05000000010000000050fd7f18f712007009917cc0e4977c172e817cff2d817c000000000000a6590000a6590210000000f0fd7f05000000e8f612000806980064f81200a89a837c002e817cffffffffff2d817cc8242400dd8ea75901000000000000004cf712003608a9590000a65901000000000000000100000060f71200e407a9596cf7120000004000000000010040020063003a005c0074006500730074005f006100700070002e0065007800650000006d05917c905f140000000000440d020000000000604f14000c0000007801140000000000a04e1400d84d8700400687004509917c0800000000000000000000004000000078011400a8038700404f14000510907c000000000000000078011400980387000800000008000000c0e4977cd04d8700f835887c7801140010000000a0e7ae591600000030fd1200d39b917c44000000620000000000a65950e9ae59d8eaae59a80387000100000014040000000000000100000002000000f800a659c003870001000000780114009508917c0000a659091b917c020000000900000040000000a2fd12009cfd1200404f1400a2fd1200d04d8700640187000000000000000000d04d870010000000d84d8700384f1400a803870010000000c00300000000870074fb1200404f14006cfe120018ee907cf006917cffffffffeb06917ca09d400000008700000000000400000000000000ffffff3fc04d8700ccfd12009c4d400004000000fa19917cb84d870064018700c04d8700063440000400000018000000c04d870079d90000c0038700fa31400000000000c04d8700c04d87000000000001000000b0fe120082294000c04d87000000000000000000c04d870048fe12008cfe120000000000e224400040fe12008cfe1200c04d8700d84d8700b0fe12008600817c54fa1200d8f9120000000000160018005479420079d90000000000000757917c00000200a4f91200a4f91200a4f91200020000000200000000000000c4f912000000000079d9000014fb12004cfa120014fb1200005a917c00fa1200a0fb120001000000655a917ca405817c74c1977ce705817c00000000f4fd120098fb120000000000a0fb12000000000090fb12000000800070fa120000000000000000000000000016001800547942000000000001000000000000000000000000000000000000003308917ca89a837c0000807c0000807ce800807c2cfa12001fe2907c11fa877cffffffffe06f817c000000006cfa12001c0000000f000000e06f817c8fc60000f0f312000060817cc8fa1200a89a837c7039867cfffffffff0ff1200da36847ca8fa1200099b837cb0fa120000000000b0fa12000000000000000000000000009cfb1200b8fb1200d4fa1200bf37907c9cfb1200e0ff1200b8fb120070fb1200b0ff1200d837907ce0ff120084fb12008b37907c9cfb1200e0ff1200b8fb120070fb1200a89a837c010000009cfb1200e0ff12006078937c9cfb1200e0ff1200b8fb120070fb1200a89a837c280a00009cfb12000200000018ee907c9032917cffffffff8832917c3364917c68fb1200000087003207917c02000000dc31917c1232917c8132917c8832917c1e000000c01e2400080200003807917c54fb12003207917cc4fb120018ee907c9032917c0000130000d01200beb4800088fe1200faea907c00000000b8fb12009cfb1200b8fb1200050000c000000000000000009e4240000200000001000000450000003f0001000000000000000000000000000000000000000000000000007f02ffff0000ffffffffffff0000000000002200000000000000ffff0000000018b72200000118b7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b0000002300000023000000280a000002000000c1ab807c58bc420094fe12004500000088fe12009e4240001b0000004602010084fe1200230000007f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b622004500000070ff120000424000b8278700dc31917c00000000004c870000000020040000000000000007000000000000004042400000000000000000002e000000000000000cff12007b434100010000000700000084434100004d87002e39917cffffffff24000000240000002700000000000000584d870004000000b1944000244c87002a0000002f000000c0fe1200004d8700584d87000000a659b0b9a859015d400015aa400000000000b4070000784e14000000000001000000f40b00000000000000000000bc070000b8070000f40b0000a8fa120000000000009c4000599c400094b240004f752a0fc0ff1200ec534000010000003039870050398700ff752a0f00002400a02024000050fd7f050000c00100000005000000000000000000240084ff1200acfa1200e0ff1200d06f4000a70b7a0f00000000f0ff1200d76f817c00002400a02024000050fd7f050000c0c8ff1200a8fa1200ffffffffa89a837ce06f817c0000000000000000000000004354400000000000 - -region[2] -MDMemoryDescriptor - start_of_memory_range = 0x97f6e8 - memory.data_size = 0x918 - memory.rva = 0x231d -Memory -0x8000108020fa97009fd7907c0000000048f7970005000f0040061400000000004cf7970037b9807c00000000000000003103917c780114000000000061dc907cf1b8807c00000000ffffffff70f79700000000000000000054f797003082140001000000000000000200000000000000000000007cf7970020b9807c0e00000004000000006000000000a80078011400000000000882140092d5907c8b9b807c9c070000d0f89700780114009c07000038821400807f140020dea85910fa9700780114009807000088fb9700e07f14009c0700000000000078011400000000000882140000000000000000000000000078011400ba0300000000000000000000000000000000000000000000000000007801140000000000000000000000000000000000c0030000000000000000000000000000088214005c0057000600000078011400000000005c00730079007300740065006d0033000082140068011400000000000000000000821400d47f1400807f140070f8970061eea859e000a8000000a8001c4e000084f89700bdeea859e000a8000000a8001c4e0000a4f897005fefa8590000a8000000000006000000c4f89700e000a80060fe9700c8f897005abfa8590000a80000000000060000001c000000d47f1400807f1400380000006ce9907c88b9807cffffffff0000a80000000000807f140030fa97007fc3a859a0c4a859b0fb970060fe9700684f1400504500004c010400ca9610410000000000000000e0000e210b01070a00400000003a000000000000f1100000001000000000bf760000000000100000000200000500010005000100040000000000000000b00000000400009ba2000000001400285214000000000034fa97007801140034fa9700910e917c080614006d05917cc84d85005c4e8500684f140000000000b04800002852140078011400e00300003052140000000000000000000000000078011400c403000030821400380000000000000000000000000000000000000000000000000000003882140048050000780200003800000000100000ec000000b8470000400000000000000000000000000000000000140000000000807f140000000000000000000000000000000101a900000060fe9700dcff9700dcff97000050fd7f78fa970054fa9700ad9d917c8cfa9700c2066f7f0e000000000000001c01000078fa9700c84d850068fa970085ae807c78fc970024fc970083dba85978fc97008cfa9700800000008edba85914010000050000000100000096020000b8fc97003815917c9615917ceb06917c60fe970060fe9700c4fd9700d8fa9700000014003207917c21000000b80c14000000140030521400b0fa9700fffffffff4fc970018ee907c3807917cffffffff3207917cab06917ceb06917ccc4f140060fe9700684f1400e0004000e4fa9700a863917c74fb970018ee907c3808917cffffffff3308917c5b2c817c872c817c00000000f4fb9700000000000000000054fd970018ee907c4006140064fd97003815917c00e0fd7feb06917c684f140038821400780114000050fd7facfb970000000000000004000000000090fe97000000000018fb970050531400508b1400a89a837cffe9907cf60d817ca807000000000000ffe9907cf60d817c08000000000000000000000000000000585314003cfc97003882140000000000160e817cc4fd970060fe970058531400208f1400588b1400460f917c50531400208f1400780114003082140000000000b8fc970078011400b8fc9700910e917c080614006d05917c3882140060fe97000000000000000000960200003082140078011400ffe9907c38821400a807000000000000780114005853140058fc9700505314001000000000000000160e817c784e8500c4fd9700388214000000000024010000f00c00001000000044fc970000000000c7e2907ce721807cffffffffe8f69700388214001809000098fc9700acfc9700d2e2a859ffffffffe8f697003882140018090000c4fc97003882140060fe9700c4fd9700ccfc97004ee3a859ffffffffe8f69700000000003882140018090000e0fc9700f4fc970093b2a859ffffffffe8f69700000000003882140018090000c4fd970060fe9700a85a140078fd9700a5b3a85960fe9700c4fd9700684f1400e8f697000000000018090000000000000200000080fd9700c4fd970060fe970000000000f40b000000000000000000000000000000f0fd7f000000001cf3120000000000e40c000039160000cc020000940d00000000000000000000000000000000000002000000ac4f14006010000098fd97005eb7a8593916000000000000684f1400784e85000000000084ff9700d4fe97007bb9a85960fe9700c4fd9700684f14003849140084ff9700010000000000000008ff9700f40b0000090000000000000020000000200000006c0000008c000000380000001e000000c4000000dc000000a80000008401000064000000b801000030000000e801000080050000e8010000680700000000000068070000680700000000000005150000340000002915000039150000fc1600001d23000068070000600300008a070000c80a0000310a00002c130000f91400000c000000352c000000000000ffffffff5c0f0000c84d8500784e8500884e85000000000000000000000000004c010000fc39a6590000000002000000050000000100000000008500280a000001000001cc0200009c0000000b00000050000000040000000010000000000000000000000001000000000000000000000000000034ff970078baa859384914005c0f0000c84d850001000000884e8500684f140008ff970064ff970000000000a8070000b0fe1200f40b00009cfb120000000000b8fb12000000000000000000ae20140000000000884e8500784e8500c84d8500a8fa120011204000ffffffff5c0f0000a80700000000000078ff970064ff970000000000adbf807c2025807cecff97000100000084ff970003000000c0110000f40b0000f40b0000a8fa120000000000010067470c0000006cff9700bc070000ffffffff000000006c1a4000f40b000000fa12000000000000004000a09d4000b0fe120083b6807cb0fe120000004000a09d4000b0fe120000e0fd7f00069c86c0ff9700d8863f86ffffffffa89a837c90b6807c000000000000000000000000301a4000b0fe120000000000 - -MDException - thread_id = 0xbf4 - exception_record.exception_code = 0xc0000005 - exception_record.exception_flags = 0x0 - exception_record.exception_record = 0x0 - exception_record.exception_address = 0x40429e - exception_record.number_parameters = 2 - exception_record.exception_information[ 0] = 0x1 - exception_record.exception_information[ 1] = 0x45 - thread_context.data_size = 716 - thread_context.rva = 0xac8 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x220000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x0000000018b72200000118b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0xa28 - esi = 0x2 - ebx = 0x7c80abc1 - edx = 0x42bc58 - ecx = 0x12fe94 - eax = 0x45 - ebp = 0x12fe88 - eip = 0x40429e - cs = 0x1b - eflags = 0x10246 - esp = 0x12fe84 - ss = 0x23 - extended_registers[512] = 0x7f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b62200 - -MDRawSystemInfo - processor_architecture = 0 - processor_level = 6 - processor_revision = 0xd08 - number_of_processors = 1 - product_type = 1 - major_version = 5 - minor_version = 1 - build_number = 2600 - platform_id = 2 - csd_version_rva = 0x768 - suite_mask = 0x100 - cpu.x86_cpu_info.vendor_id[0] = 0x756e6547 - cpu.x86_cpu_info.vendor_id[1] = 0x49656e69 - cpu.x86_cpu_info.vendor_id[2] = 0x6c65746e - cpu.x86_cpu_info.version_information = 0x6d8 - cpu.x86_cpu_info.feature_information = 0xafe9fbff - cpu.x86_cpu_info.amd_extended_cpu_features = 0xffffffff - (csd_version) = "Service Pack 2" - (cpu_vendor) = "GenuineIntel" - -MDRawMiscInfo - size_of_info = 24 - flags1 = 0x3 - process_id = 0xf5c - process_create_time = 0x45d35f73 - process_user_time = 0x0 - process_kernel_time = 0x0 - -MDRawBreakpadInfo - validity = 0x3 - dump_thread_id = 0x11c0 - requesting_thread_id = 0xbf4 - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.machine_readable.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.machine_readable.out deleted file mode 100644 index 2f3b0f59..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.machine_readable.out +++ /dev/null @@ -1,21 +0,0 @@ -OS|Windows NT|5.1.2600 Service Pack 2 -CPU|x86|GenuineIntel family 6 model 13 stepping 8|1 -Crash|EXCEPTION_ACCESS_VIOLATION_WRITE|0x45|0 -Module|test_app.exe||test_app.pdb|5A9832E5287241C1838ED98914E9B7FF1|0x00400000|0x0042cfff|1 -Module|dbghelp.dll|5.1.2600.2180|dbghelp.pdb|39559573E21B46F28E286923BE9E6A761|0x59a60000|0x59b00fff|0 -Module|imm32.dll|5.1.2600.2180|imm32.pdb|2C17A49C251B4C8EB9E2AD13D7D9EA162|0x76390000|0x763acfff|0 -Module|psapi.dll|5.1.2600.2180|psapi.pdb|A5C3A1F9689F43D8AD228A09293889702|0x76bf0000|0x76bfafff|0 -Module|ole32.dll|5.1.2600.2726|ole32.pdb|683B65B246F4418796D2EE6D4C55EB112|0x774e0000|0x7761cfff|0 -Module|version.dll|5.1.2600.2180|version.pdb|180A90C40384463E82DDC45B2C8AB76E2|0x77c00000|0x77c07fff|0 -Module|msvcrt.dll|7.0.2600.2180|msvcrt.pdb|A678F3C30DED426B839032B996987E381|0x77c10000|0x77c67fff|0 -Module|user32.dll|5.1.2600.2622|user32.pdb|EE2B714D83A34C9D88027621272F83262|0x77d40000|0x77dcffff|0 -Module|advapi32.dll|5.1.2600.2180|advapi32.pdb|455D6C5F184D45BBB5C5F30F829751142|0x77dd0000|0x77e6afff|0 -Module|rpcrt4.dll|5.1.2600.2180|rpcrt4.pdb|BEA45A721DA141DAA3BA86B3A20311532|0x77e70000|0x77f00fff|0 -Module|gdi32.dll|5.1.2600.2818|gdi32.pdb|C0EA66BE00A64BD7AEF79E443A91869C2|0x77f10000|0x77f56fff|0 -Module|kernel32.dll|5.1.2600.2945|kernel32.pdb|BCE8785C57B44245A669896B6A19B9542|0x7c800000|0x7c8f3fff|0 -Module|ntdll.dll|5.1.2600.2180|ntdll.pdb|36515FB5D04345E491F672FA2E2878C02|0x7c900000|0x7c9affff|0 - -0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|58|0x3 -0|1|test_app.exe|main|c:\test_app.cc|65|0x4 -0|2|test_app.exe|__tmainCRTStartup|f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c|327|0x11 -0|3|kernel32.dll|BaseProcessStart|||0x22 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.out deleted file mode 100644 index 5b988679..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/minidump2.stackwalk.out +++ /dev/null @@ -1,39 +0,0 @@ -Operating system: Windows NT - 5.1.2600 Service Pack 2 -CPU: x86 - GenuineIntel family 6 model 13 stepping 8 - 1 CPU - -Crash reason: EXCEPTION_ACCESS_VIOLATION_WRITE -Crash address: 0x45 - -Thread 0 (crashed) - 0 test_app.exe!`anonymous namespace'::CrashFunction [test_app.cc : 58 + 0x3] - eip = 0x0040429e esp = 0x0012fe84 ebp = 0x0012fe88 ebx = 0x7c80abc1 - esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fe94 - edx = 0x0042bc58 efl = 0x00010246 - Found by: given as instruction pointer in context - 1 test_app.exe!main [test_app.cc : 65 + 0x4] - eip = 0x00404200 esp = 0x0012fe90 ebp = 0x0012ff70 - Found by: call frame info - 2 test_app.exe!__tmainCRTStartup [crt0.c : 327 + 0x11] - eip = 0x004053ec esp = 0x0012ff78 ebp = 0x0012ffc0 - Found by: call frame info - 3 kernel32.dll!BaseProcessStart + 0x22 - eip = 0x7c816fd7 esp = 0x0012ffc8 ebp = 0x0012fff0 - Found by: call frame info - -Loaded modules: -0x00400000 - 0x0042cfff test_app.exe ??? (main) -0x59a60000 - 0x59b00fff dbghelp.dll 5.1.2600.2180 -0x76390000 - 0x763acfff imm32.dll 5.1.2600.2180 -0x76bf0000 - 0x76bfafff psapi.dll 5.1.2600.2180 -0x774e0000 - 0x7761cfff ole32.dll 5.1.2600.2726 -0x77c00000 - 0x77c07fff version.dll 5.1.2600.2180 -0x77c10000 - 0x77c67fff msvcrt.dll 7.0.2600.2180 -0x77d40000 - 0x77dcffff user32.dll 5.1.2600.2622 -0x77dd0000 - 0x77e6afff advapi32.dll 5.1.2600.2180 -0x77e70000 - 0x77f00fff rpcrt4.dll 5.1.2600.2180 -0x77f10000 - 0x77f56fff gdi32.dll 5.1.2600.2818 -0x7c800000 - 0x7c8f3fff kernel32.dll 5.1.2600.2945 -0x7c900000 - 0x7c9affff ntdll.dll 5.1.2600.2180 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module0.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module0.out deleted file mode 100644 index 72fb4daa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module0.out +++ /dev/null @@ -1,22151 +0,0 @@ -MODULE windows x86 5A9832E5287241C1838ED98914E9B7FF1 test_app.pdb -FILE 1 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winbase.h -FILE 2 c:\program files\microsoft visual studio 8\vc\include\typeinfo -FILE 3 c:\breakpad\trunk\src\common\windows\guid_string.h -FILE 4 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcdce.h -FILE 5 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winreg.h -FILE 6 c:\program files\microsoft visual studio 8\vc\platformsdk\include\objidl.h -FILE 7 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wtypes.h -FILE 8 c:\program files\microsoft visual studio 8\vc\platformsdk\include\tvout.h -FILE 9 c:\program files\microsoft visual studio 8\vc\include\malloc.h -FILE 10 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack2.h -FILE 11 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winuser.h -FILE 12 c:\breakpad\trunk\src\client\windows\handler\exception_handler.cc -FILE 13 c:\program files\microsoft visual studio 8\vc\platformsdk\include\urlmon.h -FILE 14 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wincon.h -FILE 15 c:\program files\microsoft visual studio 8\vc\platformsdk\include\imm.h -FILE 16 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcdcep.h -FILE 17 c:\program files\microsoft visual studio 8\vc\include\xstring -FILE 18 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winver.h -FILE 19 c:\program files\microsoft visual studio 8\vc\include\xmemory -FILE 20 c:\program files\microsoft visual studio 8\vc\include\new -FILE 21 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack4.h -FILE 22 c:\program files\microsoft visual studio 8\vc\platformsdk\include\reason.h -FILE 23 c:\program files\microsoft visual studio 8\vc\include\vector -FILE 24 c:\program files\microsoft visual studio 8\vc\include\memory -FILE 25 c:\program files\microsoft visual studio 8\vc\include\wtime.inl -FILE 26 c:\program files\microsoft visual studio 8\vc\include\iterator -FILE 27 c:\program files\microsoft visual studio 8\vc\platformsdk\include\propidl.h -FILE 28 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack1.h -FILE 29 c:\program files\microsoft visual studio 8\vc\platformsdk\include\specstrings.h -FILE 30 c:\program files\microsoft visual studio 8\vc\platformsdk\include\basetsd.h -FILE 31 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winerror.h -FILE 32 c:\program files\microsoft visual studio 8\vc\include\assert.h -FILE 33 c:\program files\microsoft visual studio 8\vc\platformsdk\include\poppack.h -FILE 34 c:\program files\microsoft visual studio 8\vc\include\cstdio -FILE 35 c:\program files\microsoft visual studio 8\vc\include\stdio.h -FILE 36 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnterr.h -FILE 37 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcasync.h -FILE 38 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnsi.h -FILE 39 c:\program files\microsoft visual studio 8\vc\include\stdlib.h -FILE 40 c:\program files\microsoft visual studio 8\vc\platformsdk\include\servprov.h -FILE 41 c:\program files\microsoft visual studio 8\vc\include\limits.h -FILE 42 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcndr.h -FILE 43 c:\breakpad\trunk\src\client\windows\handler\exception_handler.h -FILE 44 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnsip.h -FILE 45 c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h -FILE 46 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnetwk.h -FILE 47 c:\program files\microsoft visual studio 8\vc\include\share.h -FILE 48 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack8.h -FILE 49 c:\program files\microsoft visual studio 8\vc\platformsdk\include\stralign.h -FILE 50 c:\breakpad\trunk\src\google_breakpad\common\minidump_format.h -FILE 51 c:\breakpad\trunk\src\google_breakpad\common\breakpad_types.h -FILE 52 c:\program files\microsoft visual studio 8\vc\include\xdebug -FILE 53 c:\program files\microsoft visual studio 8\vc\include\stdarg.h -FILE 54 c:\program files\microsoft visual studio 8\vc\platformsdk\include\windef.h -FILE 55 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winsvc.h -FILE 56 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h -FILE 57 c:\program files\microsoft visual studio 8\vc\include\xlocinfo -FILE 58 c:\program files\microsoft visual studio 8\vc\include\xlocinfo.h -FILE 59 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oleidl.h -FILE 60 c:\program files\microsoft visual studio 8\vc\include\locale.h -FILE 61 c:\program files\microsoft visual studio 8\vc\include\string -FILE 62 c:\program files\microsoft visual studio 8\vc\include\istream -FILE 63 c:\breakpad\trunk\src\common\windows\string_utils-inl.h -FILE 64 c:\program files\microsoft visual studio 8\vc\include\ostream -FILE 65 c:\program files\microsoft visual studio 8\vc\include\xutility -FILE 66 c:\program files\microsoft visual studio 8\vc\include\wchar.h -FILE 67 c:\program files\microsoft visual studio 8\vc\include\utility -FILE 68 c:\program files\microsoft visual studio 8\vc\include\ios -FILE 69 c:\program files\microsoft visual studio 8\vc\include\xlocnum -FILE 70 c:\program files\microsoft visual studio 8\vc\include\iosfwd -FILE 71 c:\program files\microsoft visual studio 8\vc\include\swprintf.inl -FILE 72 c:\program files\microsoft visual studio 8\vc\platformsdk\include\guiddef.h -FILE 73 c:\program files\microsoft visual studio 8\vc\include\cwchar -FILE 74 c:\program files\microsoft visual studio 8\vc\include\climits -FILE 75 c:\program files\microsoft visual studio 8\vc\include\crtdbg.h -FILE 76 c:\program files\microsoft visual studio 8\vc\include\cstdlib -FILE 77 c:\program files\microsoft visual studio 8\vc\include\streambuf -FILE 78 c:\program files\microsoft visual studio 8\vc\include\xiosbase -FILE 79 c:\program files\microsoft visual studio 8\vc\include\xlocale -FILE 80 c:\program files\microsoft visual studio 8\vc\include\cstring -FILE 81 c:\program files\microsoft visual studio 8\vc\platformsdk\include\mcx.h -FILE 82 c:\program files\microsoft visual studio 8\vc\include\stdexcept -FILE 83 c:\program files\microsoft visual studio 8\vc\include\exception -FILE 84 c:\program files\microsoft visual studio 8\vc\include\xstddef -FILE 85 c:\program files\microsoft visual studio 8\vc\platformsdk\include\objbase.h -FILE 86 c:\program files\microsoft visual studio 8\vc\include\cstddef -FILE 87 c:\program files\microsoft visual studio 8\vc\platformsdk\include\unknwn.h -FILE 88 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpc.h -FILE 89 c:\program files\microsoft visual studio 8\vc\include\stddef.h -FILE 90 c:\program files\microsoft visual studio 8\vc\include\cassert -FILE 91 c:\program files\microsoft visual studio 8\vc\platformsdk\include\ole2.h -FILE 92 c:\program files\microsoft visual studio 8\vc\platformsdk\include\windows.h -FILE 93 c:\program files\microsoft visual studio 8\vc\include\yvals.h -FILE 94 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oleauto.h -FILE 95 c:\program files\microsoft visual studio 8\vc\include\excpt.h -FILE 96 c:\program files\microsoft visual studio 8\vc\include\use_ansi.h -FILE 97 c:\program files\microsoft visual studio 8\vc\platformsdk\include\cguid.h -FILE 98 c:\program files\microsoft visual studio 8\vc\include\crtdefs.h -FILE 99 c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h -FILE 100 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oaidl.h -FILE 101 c:\program files\microsoft visual studio 8\vc\include\sal.h -FILE 102 c:\program files\microsoft visual studio 8\vc\include\vadefs.h -FILE 103 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h -FILE 104 c:\program files\microsoft visual studio 8\vc\include\ctype.h -FILE 105 c:\program files\microsoft visual studio 8\vc\include\eh.h -FILE 106 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnls.h -FILE 107 c:\program files\microsoft visual studio 8\vc\include\string.h -FILE 108 c:\program files\microsoft visual studio 8\vc\include\ctype.h -FILE 109 c:\program files\microsoft visual studio 8\vc\include\xutility -FILE 110 c:\program files\microsoft visual studio 8\vc\include\utility -FILE 111 c:\program files\microsoft visual studio 8\vc\include\iosfwd -FILE 112 c:\program files\microsoft visual studio 8\vc\include\cwchar -FILE 113 c:\program files\microsoft visual studio 8\vc\include\crtdbg.h -FILE 114 c:\program files\microsoft visual studio 8\vc\include\stdexcept -FILE 115 c:\program files\microsoft visual studio 8\vc\include\exception -FILE 116 c:\program files\microsoft visual studio 8\vc\include\xstddef -FILE 117 c:\program files\microsoft visual studio 8\vc\include\cstddef -FILE 118 c:\program files\microsoft visual studio 8\vc\include\stddef.h -FILE 119 c:\program files\microsoft visual studio 8\vc\include\eh.h -FILE 120 c:\program files\microsoft visual studio 8\vc\include\streambuf -FILE 121 c:\program files\microsoft visual studio 8\vc\include\xiosbase -FILE 122 c:\program files\microsoft visual studio 8\vc\include\xlocale -FILE 123 c:\program files\microsoft visual studio 8\vc\include\cstring -FILE 124 c:\program files\microsoft visual studio 8\vc\include\string.h -FILE 125 c:\program files\microsoft visual studio 8\vc\include\typeinfo -FILE 126 c:\breakpad\trunk\src\common\windows\guid_string.cc -FILE 127 c:\breakpad\trunk\src\common\windows\string_utils-inl.h -FILE 128 c:\program files\microsoft visual studio 8\vc\include\stdarg.h -FILE 129 c:\program files\microsoft visual studio 8\vc\include\string -FILE 130 c:\program files\microsoft visual studio 8\vc\include\istream -FILE 131 c:\program files\microsoft visual studio 8\vc\include\ostream -FILE 132 c:\program files\microsoft visual studio 8\vc\include\ios -FILE 133 c:\program files\microsoft visual studio 8\vc\include\xlocnum -FILE 134 c:\program files\microsoft visual studio 8\vc\include\climits -FILE 135 c:\program files\microsoft visual studio 8\vc\include\yvals.h -FILE 136 c:\program files\microsoft visual studio 8\vc\include\use_ansi.h -FILE 137 c:\program files\microsoft visual studio 8\vc\include\cstdlib -FILE 138 c:\program files\microsoft visual studio 8\vc\include\stdlib.h -FILE 139 c:\program files\microsoft visual studio 8\vc\include\malloc.h -FILE 140 c:\breakpad\trunk\src\common\windows\guid_string.h -FILE 141 c:\program files\microsoft visual studio 8\vc\platformsdk\include\guiddef.h -FILE 142 c:\program files\microsoft visual studio 8\vc\include\share.h -FILE 143 c:\program files\microsoft visual studio 8\vc\include\xstring -FILE 144 c:\program files\microsoft visual studio 8\vc\include\xmemory -FILE 145 c:\program files\microsoft visual studio 8\vc\include\new -FILE 146 c:\program files\microsoft visual studio 8\vc\include\locale.h -FILE 147 c:\program files\microsoft visual studio 8\vc\include\swprintf.inl -FILE 148 c:\program files\microsoft visual studio 8\vc\include\limits.h -FILE 149 c:\program files\microsoft visual studio 8\vc\include\wchar.h -FILE 150 c:\program files\microsoft visual studio 8\vc\include\cstdio -FILE 151 c:\program files\microsoft visual studio 8\vc\include\crtdefs.h -FILE 152 c:\program files\microsoft visual studio 8\vc\include\stdio.h -FILE 153 c:\program files\microsoft visual studio 8\vc\include\wtime.inl -FILE 154 c:\program files\microsoft visual studio 8\vc\include\sal.h -FILE 155 c:\program files\microsoft visual studio 8\vc\include\xdebug -FILE 156 c:\program files\microsoft visual studio 8\vc\include\vadefs.h -FILE 157 c:\program files\microsoft visual studio 8\vc\include\xlocinfo -FILE 158 c:\program files\microsoft visual studio 8\vc\include\xlocinfo.h -FILE 159 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnetwk.h -FILE 160 c:\program files\microsoft visual studio 8\vc\platformsdk\include\urlmon.h -FILE 161 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack8.h -FILE 162 c:\program files\microsoft visual studio 8\vc\platformsdk\include\cderr.h -FILE 163 c:\program files\microsoft visual studio 8\vc\platformsdk\include\shellapi.h -FILE 164 c:\program files\microsoft visual studio 8\vc\platformsdk\include\dde.h -FILE 165 c:\program files\microsoft visual studio 8\vc\include\vector -FILE 166 c:\program files\microsoft visual studio 8\vc\include\stdio.h -FILE 167 c:\program files\microsoft visual studio 8\vc\include\memory -FILE 168 c:\program files\microsoft visual studio 8\vc\include\iterator -FILE 169 c:\program files\microsoft visual studio 8\vc\include\malloc.h -FILE 170 c:\program files\microsoft visual studio 8\vc\include\stdarg.h -FILE 171 c:\program files\microsoft visual studio 8\vc\platformsdk\include\windef.h -FILE 172 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wingdi.h -FILE 173 c:\program files\microsoft visual studio 8\vc\platformsdk\include\imm.h -FILE 174 c:\program files\microsoft visual studio 8\vc\platformsdk\include\mmsystem.h -FILE 175 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winioctl.h -FILE 176 c:\program files\microsoft visual studio 8\vc\platformsdk\include\guiddef.h -FILE 177 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winsmcrd.h -FILE 178 c:\test_app.cc -FILE 179 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oaidl.h -FILE 180 c:\program files\microsoft visual studio 8\vc\platformsdk\include\nb30.h -FILE 181 c:\program files\microsoft visual studio 8\vc\include\xstring -FILE 182 c:\program files\microsoft visual studio 8\vc\include\xmemory -FILE 183 c:\program files\microsoft visual studio 8\vc\include\new -FILE 184 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oleidl.h -FILE 185 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnls.h -FILE 186 c:\breakpad\trunk\src\google_breakpad\common\minidump_format.h -FILE 187 c:\program files\microsoft visual studio 8\vc\include\string.h -FILE 188 c:\breakpad\trunk\src\google_breakpad\common\breakpad_types.h -FILE 189 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h -FILE 190 c:\program files\microsoft visual studio 8\vc\include\ctype.h -FILE 191 c:\program files\microsoft visual studio 8\vc\include\wtime.inl -FILE 192 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winbase.h -FILE 193 c:\program files\microsoft visual studio 8\vc\platformsdk\include\propidl.h -FILE 194 c:\breakpad\trunk\src\client\windows\handler\exception_handler.h -FILE 195 c:\program files\microsoft visual studio 8\vc\include\stdlib.h -FILE 196 c:\program files\microsoft visual studio 8\vc\include\swprintf.inl -FILE 197 c:\program files\microsoft visual studio 8\vc\include\limits.h -FILE 198 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winreg.h -FILE 199 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpc.h -FILE 200 c:\program files\microsoft visual studio 8\vc\platformsdk\include\ole2.h -FILE 201 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winscard.h -FILE 202 c:\program files\microsoft visual studio 8\vc\platformsdk\include\objbase.h -FILE 203 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wtypes.h -FILE 204 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcndr.h -FILE 205 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcdce.h -FILE 206 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnsip.h -FILE 207 c:\program files\microsoft visual studio 8\vc\include\share.h -FILE 208 c:\program files\microsoft visual studio 8\vc\platformsdk\include\tvout.h -FILE 209 c:\program files\microsoft visual studio 8\vc\include\use_ansi.h -FILE 210 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winefs.h -FILE 211 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack2.h -FILE 212 c:\program files\microsoft visual studio 8\vc\platformsdk\include\commdlg.h -FILE 213 c:\program files\microsoft visual studio 8\vc\platformsdk\include\unknwn.h -FILE 214 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winsock.h -FILE 215 c:\program files\microsoft visual studio 8\vc\platformsdk\include\stralign.h -FILE 216 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winuser.h -FILE 217 c:\program files\microsoft visual studio 8\vc\platformsdk\include\servprov.h -FILE 218 c:\program files\microsoft visual studio 8\vc\include\xdebug -FILE 219 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winsvc.h -FILE 220 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wincon.h -FILE 221 c:\program files\microsoft visual studio 8\vc\include\xlocinfo -FILE 222 c:\program files\microsoft visual studio 8\vc\include\xlocinfo.h -FILE 223 c:\program files\microsoft visual studio 8\vc\include\locale.h -FILE 224 c:\program files\microsoft visual studio 8\vc\platformsdk\include\cguid.h -FILE 225 c:\program files\microsoft visual studio 8\vc\include\string -FILE 226 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winver.h -FILE 227 c:\program files\microsoft visual studio 8\vc\include\istream -FILE 228 c:\program files\microsoft visual studio 8\vc\include\ostream -FILE 229 c:\program files\microsoft visual studio 8\vc\include\xutility -FILE 230 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winperf.h -FILE 231 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack4.h -FILE 232 c:\program files\microsoft visual studio 8\vc\include\utility -FILE 233 c:\program files\microsoft visual studio 8\vc\include\ios -FILE 234 c:\program files\microsoft visual studio 8\vc\include\xlocnum -FILE 235 c:\program files\microsoft visual studio 8\vc\include\crtdbg.h -FILE 236 c:\program files\microsoft visual studio 8\vc\include\iosfwd -FILE 237 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcdcep.h -FILE 238 c:\program files\microsoft visual studio 8\vc\include\cwchar -FILE 239 c:\program files\microsoft visual studio 8\vc\include\climits -FILE 240 c:\program files\microsoft visual studio 8\vc\include\wchar.h -FILE 241 c:\program files\microsoft visual studio 8\vc\include\cstdlib -FILE 242 c:\program files\microsoft visual studio 8\vc\platformsdk\include\mcx.h -FILE 243 c:\program files\microsoft visual studio 8\vc\include\streambuf -FILE 244 c:\program files\microsoft visual studio 8\vc\include\xiosbase -FILE 245 c:\program files\microsoft visual studio 8\vc\platformsdk\include\reason.h -FILE 246 c:\program files\microsoft visual studio 8\vc\include\xlocale -FILE 247 c:\program files\microsoft visual studio 8\vc\platformsdk\include\dlgs.h -FILE 248 c:\program files\microsoft visual studio 8\vc\include\cstring -FILE 249 c:\program files\microsoft visual studio 8\vc\include\stdexcept -FILE 250 c:\program files\microsoft visual studio 8\vc\platformsdk\include\pshpack1.h -FILE 251 c:\program files\microsoft visual studio 8\vc\include\exception -FILE 252 c:\program files\microsoft visual studio 8\vc\include\xstddef -FILE 253 c:\program files\microsoft visual studio 8\vc\platformsdk\include\specstrings.h -FILE 254 c:\program files\microsoft visual studio 8\vc\include\cstddef -FILE 255 c:\program files\microsoft visual studio 8\vc\platformsdk\include\basetsd.h -FILE 256 c:\program files\microsoft visual studio 8\vc\include\stddef.h -FILE 257 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winerror.h -FILE 258 c:\program files\microsoft visual studio 8\vc\platformsdk\include\wincrypt.h -FILE 259 c:\program files\microsoft visual studio 8\vc\platformsdk\include\poppack.h -FILE 260 c:\program files\microsoft visual studio 8\vc\platformsdk\include\winspool.h -FILE 261 c:\program files\microsoft visual studio 8\vc\platformsdk\include\oleauto.h -FILE 262 c:\program files\microsoft visual studio 8\vc\platformsdk\include\prsht.h -FILE 263 c:\program files\microsoft visual studio 8\vc\platformsdk\include\objidl.h -FILE 264 c:\program files\microsoft visual studio 8\vc\include\cstdio -FILE 265 c:\program files\microsoft visual studio 8\vc\include\yvals.h -FILE 266 c:\program files\microsoft visual studio 8\vc\include\eh.h -FILE 267 c:\program files\microsoft visual studio 8\vc\platformsdk\include\lzexpand.h -FILE 268 c:\program files\microsoft visual studio 8\vc\platformsdk\include\ddeml.h -FILE 269 c:\program files\microsoft visual studio 8\vc\include\crtdefs.h -FILE 270 c:\program files\microsoft visual studio 8\vc\include\sal.h -FILE 271 c:\program files\microsoft visual studio 8\vc\include\vadefs.h -FILE 272 c:\program files\microsoft visual studio 8\vc\platformsdk\include\dbghelp.h -FILE 273 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnterr.h -FILE 274 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcasync.h -FILE 275 c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcnsi.h -FILE 276 c:\program files\microsoft visual studio 8\vc\include\typeinfo -FILE 277 c:\program files\microsoft visual studio 8\vc\platformsdk\include\windows.h -FILE 278 c:\program files\microsoft visual studio 8\vc\include\excpt.h -FILE 279 c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h -FILE 280 f:\sp\vctools\crt_bld\self_x86\crt\src\xdebug -FILE 281 f:\sp\vctools\crt_bld\self_x86\crt\src\streambuf -FILE 282 f:\sp\vctools\crt_bld\self_x86\crt\src\xiosbase -FILE 283 f:\sp\vctools\crt_bld\self_x86\crt\src\xlocale -FILE 284 f:\sp\vctools\crt_bld\self_x86\crt\src\cstring -FILE 285 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 286 f:\sp\vctools\crt_bld\self_x86\crt\src\xlocinfo -FILE 287 f:\sp\vctools\crt_bld\self_x86\crt\src\xlocinfo.h -FILE 288 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 289 f:\sp\vctools\crt_bld\self_x86\crt\src\share.h -FILE 290 f:\sp\vctools\crt_bld\self_x86\crt\src\use_ansi.h -FILE 291 f:\sp\vctools\crt_bld\self_x86\crt\src\string.cpp -FILE 292 f:\sp\vctools\crt_bld\self_x86\crt\src\typeinfo -FILE 293 f:\sp\vctools\crt_bld\self_x86\crt\src\xutility -FILE 294 f:\sp\vctools\crt_bld\self_x86\crt\src\utility -FILE 295 f:\sp\vctools\crt_bld\self_x86\crt\src\iosfwd -FILE 296 f:\sp\vctools\crt_bld\self_x86\crt\src\cwchar -FILE 297 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 298 f:\sp\vctools\crt_bld\self_x86\crt\src\stdexcept -FILE 299 f:\sp\vctools\crt_bld\self_x86\crt\src\exception -FILE 300 f:\sp\vctools\crt_bld\self_x86\crt\src\xstddef -FILE 301 f:\sp\vctools\crt_bld\self_x86\crt\src\cstddef -FILE 302 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 303 f:\sp\vctools\crt_bld\self_x86\crt\src\istream -FILE 304 f:\sp\vctools\crt_bld\self_x86\crt\src\ostream -FILE 305 f:\sp\vctools\crt_bld\self_x86\crt\src\ios -FILE 306 f:\sp\vctools\crt_bld\self_x86\crt\src\xlocnum -FILE 307 f:\sp\vctools\crt_bld\self_x86\crt\src\eh.h -FILE 308 f:\sp\vctools\crt_bld\self_x86\crt\src\cstdlib -FILE 309 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 310 f:\sp\vctools\crt_bld\self_x86\crt\src\climits -FILE 311 f:\sp\vctools\crt_bld\self_x86\crt\src\yvals.h -FILE 312 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 313 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 314 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 315 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 316 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 317 f:\sp\vctools\crt_bld\self_x86\crt\src\cstdio -FILE 318 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 319 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 320 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 321 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 322 f:\sp\public\sdk\inc\ddbanned.h -FILE 323 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 324 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 325 f:\sp\vctools\crt_bld\self_x86\crt\src\xstring -FILE 326 f:\sp\vctools\crt_bld\self_x86\crt\src\xmemory -FILE 327 f:\sp\vctools\crt_bld\self_x86\crt\src\new -FILE 328 f:\sp\public\sdk\inc\reason.h -FILE 329 f:\sp\public\sdk\inc\wincon.h -FILE 330 f:\sp\public\sdk\inc\pshpack2.h -FILE 331 f:\sp\public\sdk\inc\mcx.h -FILE 332 f:\sp\public\sdk\inc\winuser.h -FILE 333 f:\sp\public\sdk\inc\winnls.h -FILE 334 f:\sp\public\sdk\inc\guiddef.h -FILE 335 f:\sp\public\sdk\inc\specstrings.h -FILE 336 f:\sp\public\sdk\inc\basetsd.h -FILE 337 f:\sp\public\sdk\inc\stralign.h -FILE 338 f:\sp\public\sdk\inc\tvout.h -FILE 339 f:\sp\public\sdk\inc\winsvc.h -FILE 340 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 341 f:\sp\public\sdk\inc\wingdi.h -FILE 342 f:\sp\public\sdk\inc\pshpack4.h -FILE 343 f:\sp\public\sdk\inc\poppack.h -FILE 344 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 345 f:\sp\public\sdk\inc\winnetwk.h -FILE 346 f:\sp\public\sdk\inc\imm.h -FILE 347 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 348 f:\sp\public\sdk\inc\windef.h -FILE 349 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 350 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\cpu_disp.c -FILE 351 f:\sp\public\sdk\inc\pshpack1.h -FILE 352 f:\sp\public\sdk\inc\winver.h -FILE 353 f:\sp\public\sdk\inc\windows.h -FILE 354 f:\sp\public\sdk\inc\winnt.h -FILE 355 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 356 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 357 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 358 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 359 f:\sp\public\sdk\inc\ddbanned.h -FILE 360 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 361 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 362 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 363 f:\sp\public\sdk\inc\winreg.h -FILE 364 f:\sp\public\sdk\inc\winbase.h -FILE 365 f:\sp\public\sdk\inc\winerror.h -FILE 366 f:\sp\public\sdk\inc\pshpack8.h -FILE 367 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 368 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 369 f:\sp\public\sdk\inc\reason.h -FILE 370 f:\sp\public\sdk\inc\wincon.h -FILE 371 f:\sp\public\sdk\inc\pshpack2.h -FILE 372 f:\sp\public\sdk\inc\mcx.h -FILE 373 f:\sp\public\sdk\inc\winuser.h -FILE 374 f:\sp\public\sdk\inc\winnls.h -FILE 375 f:\sp\public\sdk\inc\guiddef.h -FILE 376 f:\sp\public\sdk\inc\specstrings.h -FILE 377 f:\sp\public\sdk\inc\basetsd.h -FILE 378 f:\sp\public\sdk\inc\stralign.h -FILE 379 f:\sp\public\sdk\inc\tvout.h -FILE 380 f:\sp\public\sdk\inc\winsvc.h -FILE 381 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 382 f:\sp\public\sdk\inc\wingdi.h -FILE 383 f:\sp\public\sdk\inc\pshpack4.h -FILE 384 f:\sp\public\sdk\inc\poppack.h -FILE 385 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 386 f:\sp\public\sdk\inc\winnetwk.h -FILE 387 f:\sp\public\sdk\inc\imm.h -FILE 388 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 389 f:\sp\public\sdk\inc\windef.h -FILE 390 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 391 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\mathfcns.c -FILE 392 f:\sp\public\sdk\inc\pshpack1.h -FILE 393 f:\sp\public\sdk\inc\winver.h -FILE 394 f:\sp\public\sdk\inc\windows.h -FILE 395 f:\sp\public\sdk\inc\winnt.h -FILE 396 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 397 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 398 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 399 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 400 f:\sp\public\sdk\inc\ddbanned.h -FILE 401 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 402 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 403 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 404 f:\sp\public\sdk\inc\winreg.h -FILE 405 f:\sp\public\sdk\inc\winbase.h -FILE 406 f:\sp\public\sdk\inc\winerror.h -FILE 407 f:\sp\public\sdk\inc\pshpack8.h -FILE 408 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 409 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 410 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 411 f:\sp\public\sdk\inc\winreg.h -FILE 412 f:\sp\public\sdk\inc\winbase.h -FILE 413 f:\sp\public\sdk\inc\winerror.h -FILE 414 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 415 f:\sp\public\sdk\inc\windef.h -FILE 416 f:\sp\vctools\crt_bld\self_x86\crt\src\ctime.h -FILE 417 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 418 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 419 f:\sp\public\sdk\inc\pshpack8.h -FILE 420 f:\sp\public\sdk\inc\reason.h -FILE 421 f:\sp\public\sdk\inc\wincon.h -FILE 422 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 423 f:\sp\public\sdk\inc\pshpack2.h -FILE 424 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 425 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 426 f:\sp\public\sdk\inc\mcx.h -FILE 427 f:\sp\public\sdk\inc\winuser.h -FILE 428 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 429 f:\sp\public\sdk\inc\winnls.h -FILE 430 f:\sp\public\sdk\inc\guiddef.h -FILE 431 f:\sp\public\sdk\inc\stralign.h -FILE 432 f:\sp\public\sdk\inc\winnt.h -FILE 433 f:\sp\public\sdk\inc\specstrings.h -FILE 434 f:\sp\public\sdk\inc\basetsd.h -FILE 435 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 436 f:\sp\public\sdk\inc\tvout.h -FILE 437 f:\sp\public\sdk\inc\winsvc.h -FILE 438 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 439 f:\sp\public\sdk\inc\wingdi.h -FILE 440 f:\sp\vctools\crt_bld\self_x86\crt\src\tzset.c -FILE 441 f:\sp\public\sdk\inc\pshpack4.h -FILE 442 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 443 f:\sp\public\sdk\inc\poppack.h -FILE 444 f:\sp\public\sdk\inc\winnetwk.h -FILE 445 f:\sp\public\sdk\inc\imm.h -FILE 446 f:\sp\public\sdk\inc\ddbanned.h -FILE 447 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 448 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 449 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 450 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 451 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 452 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 453 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 454 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 455 f:\sp\public\sdk\inc\windows.h -FILE 456 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 457 f:\sp\public\sdk\inc\pshpack1.h -FILE 458 f:\sp\public\sdk\inc\winver.h -FILE 459 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 460 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 461 f:\sp\public\sdk\inc\winnt.h -FILE 462 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 463 f:\sp\public\sdk\inc\winreg.h -FILE 464 f:\sp\public\sdk\inc\winbase.h -FILE 465 f:\sp\public\sdk\inc\winerror.h -FILE 466 f:\sp\public\sdk\inc\pshpack8.h -FILE 467 f:\sp\public\sdk\inc\reason.h -FILE 468 f:\sp\public\sdk\inc\wincon.h -FILE 469 f:\sp\public\sdk\inc\pshpack2.h -FILE 470 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 471 f:\sp\public\sdk\inc\mcx.h -FILE 472 f:\sp\public\sdk\inc\winuser.h -FILE 473 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 474 f:\sp\public\sdk\inc\winnls.h -FILE 475 f:\sp\public\sdk\inc\guiddef.h -FILE 476 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 477 f:\sp\public\sdk\inc\stralign.h -FILE 478 f:\sp\public\sdk\inc\specstrings.h -FILE 479 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 480 f:\sp\public\sdk\inc\basetsd.h -FILE 481 f:\sp\public\sdk\inc\windows.h -FILE 482 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 483 f:\sp\public\sdk\inc\tvout.h -FILE 484 f:\sp\public\sdk\inc\winsvc.h -FILE 485 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 486 f:\sp\public\sdk\inc\wingdi.h -FILE 487 f:\sp\vctools\crt_bld\self_x86\crt\src\timeset.c -FILE 488 f:\sp\public\sdk\inc\pshpack4.h -FILE 489 f:\sp\public\sdk\inc\poppack.h -FILE 490 f:\sp\public\sdk\inc\winnetwk.h -FILE 491 f:\sp\public\sdk\inc\imm.h -FILE 492 f:\sp\public\sdk\inc\ddbanned.h -FILE 493 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 494 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 495 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 496 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 497 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 498 f:\sp\public\sdk\inc\windef.h -FILE 499 f:\sp\public\sdk\inc\pshpack1.h -FILE 500 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 501 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 502 f:\sp\public\sdk\inc\winver.h -FILE 503 f:\sp\public\sdk\inc\wincon.h -FILE 504 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 505 f:\sp\public\sdk\inc\imm.h -FILE 506 f:\sp\public\sdk\inc\winbase.h -FILE 507 f:\sp\public\sdk\inc\wingdi.h -FILE 508 f:\sp\public\sdk\inc\winver.h -FILE 509 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 510 f:\sp\public\sdk\inc\windows.h -FILE 511 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 512 f:\sp\public\sdk\inc\pshpack2.h -FILE 513 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 514 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 515 f:\sp\public\sdk\inc\reason.h -FILE 516 f:\sp\vctools\crt_bld\self_x86\crt\src\strftime.c -FILE 517 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 518 f:\sp\public\sdk\inc\specstrings.h -FILE 519 f:\sp\public\sdk\inc\basetsd.h -FILE 520 f:\sp\public\sdk\inc\pshpack4.h -FILE 521 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 522 f:\sp\public\sdk\inc\winnetwk.h -FILE 523 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 524 f:\sp\public\sdk\inc\stralign.h -FILE 525 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 526 f:\sp\public\sdk\inc\poppack.h -FILE 527 f:\sp\public\sdk\inc\winsvc.h -FILE 528 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 529 f:\sp\public\sdk\inc\windef.h -FILE 530 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 531 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 532 f:\sp\public\sdk\inc\winuser.h -FILE 533 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 534 f:\sp\public\sdk\inc\mcx.h -FILE 535 f:\sp\public\sdk\inc\pshpack8.h -FILE 536 f:\sp\public\sdk\inc\guiddef.h -FILE 537 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 538 f:\sp\public\sdk\inc\winnt.h -FILE 539 f:\sp\public\sdk\inc\winnls.h -FILE 540 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 541 f:\sp\public\sdk\inc\pshpack1.h -FILE 542 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 543 f:\sp\public\sdk\inc\winerror.h -FILE 544 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 545 f:\sp\public\sdk\inc\winreg.h -FILE 546 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 547 f:\sp\public\sdk\inc\ddbanned.h -FILE 548 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 549 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 550 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 551 f:\sp\public\sdk\inc\tvout.h -FILE 552 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 553 f:\sp\public\sdk\inc\poppack.h -FILE 554 f:\sp\public\sdk\inc\winnetwk.h -FILE 555 f:\sp\public\sdk\inc\imm.h -FILE 556 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 557 f:\sp\public\sdk\inc\windef.h -FILE 558 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 559 f:\sp\public\sdk\inc\pshpack1.h -FILE 560 f:\sp\public\sdk\inc\winver.h -FILE 561 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 562 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 563 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 564 f:\sp\public\sdk\inc\winnt.h -FILE 565 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 566 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 567 f:\sp\public\sdk\inc\winreg.h -FILE 568 f:\sp\vctools\crt_bld\self_x86\crt\src\days.c -FILE 569 f:\sp\public\sdk\inc\winbase.h -FILE 570 f:\sp\public\sdk\inc\winerror.h -FILE 571 f:\sp\public\sdk\inc\pshpack8.h -FILE 572 f:\sp\public\sdk\inc\reason.h -FILE 573 f:\sp\public\sdk\inc\wincon.h -FILE 574 f:\sp\public\sdk\inc\ddbanned.h -FILE 575 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 576 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 577 f:\sp\public\sdk\inc\pshpack2.h -FILE 578 f:\sp\public\sdk\inc\mcx.h -FILE 579 f:\sp\public\sdk\inc\winuser.h -FILE 580 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 581 f:\sp\public\sdk\inc\winnls.h -FILE 582 f:\sp\public\sdk\inc\guiddef.h -FILE 583 f:\sp\public\sdk\inc\windows.h -FILE 584 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 585 f:\sp\public\sdk\inc\specstrings.h -FILE 586 f:\sp\public\sdk\inc\basetsd.h -FILE 587 f:\sp\public\sdk\inc\stralign.h -FILE 588 f:\sp\public\sdk\inc\tvout.h -FILE 589 f:\sp\public\sdk\inc\winsvc.h -FILE 590 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 591 f:\sp\public\sdk\inc\wingdi.h -FILE 592 f:\sp\public\sdk\inc\pshpack4.h -FILE 593 f:\sp\public\sdk\inc\wincon.h -FILE 594 f:\sp\public\sdk\inc\imm.h -FILE 595 f:\sp\public\sdk\inc\winbase.h -FILE 596 f:\sp\public\sdk\inc\wingdi.h -FILE 597 f:\sp\public\sdk\inc\winver.h -FILE 598 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 599 f:\sp\public\sdk\inc\windows.h -FILE 600 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 601 f:\sp\public\sdk\inc\pshpack2.h -FILE 602 f:\sp\public\sdk\inc\reason.h -FILE 603 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicol.c -FILE 604 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 605 f:\sp\public\sdk\inc\specstrings.h -FILE 606 f:\sp\public\sdk\inc\basetsd.h -FILE 607 f:\sp\public\sdk\inc\pshpack4.h -FILE 608 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 609 f:\sp\public\sdk\inc\winnetwk.h -FILE 610 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 611 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 612 f:\sp\public\sdk\inc\stralign.h -FILE 613 f:\sp\public\sdk\inc\poppack.h -FILE 614 f:\sp\public\sdk\inc\winsvc.h -FILE 615 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 616 f:\sp\public\sdk\inc\windef.h -FILE 617 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 618 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 619 f:\sp\public\sdk\inc\winuser.h -FILE 620 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 621 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 622 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 623 f:\sp\public\sdk\inc\mcx.h -FILE 624 f:\sp\public\sdk\inc\pshpack8.h -FILE 625 f:\sp\public\sdk\inc\guiddef.h -FILE 626 f:\sp\public\sdk\inc\winnt.h -FILE 627 f:\sp\public\sdk\inc\winnls.h -FILE 628 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 629 f:\sp\public\sdk\inc\pshpack1.h -FILE 630 f:\sp\public\sdk\inc\winerror.h -FILE 631 f:\sp\public\sdk\inc\winreg.h -FILE 632 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 633 f:\sp\public\sdk\inc\ddbanned.h -FILE 634 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 635 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 636 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 637 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 638 f:\sp\public\sdk\inc\tvout.h -FILE 639 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 640 f:\sp\public\sdk\inc\mcx.h -FILE 641 f:\sp\public\sdk\inc\pshpack8.h -FILE 642 f:\sp\public\sdk\inc\winnt.h -FILE 643 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 644 f:\sp\public\sdk\inc\specstrings.h -FILE 645 f:\sp\public\sdk\inc\basetsd.h -FILE 646 f:\sp\public\sdk\inc\winnls.h -FILE 647 f:\sp\public\sdk\inc\pshpack1.h -FILE 648 f:\sp\public\sdk\inc\winerror.h -FILE 649 f:\sp\public\sdk\inc\winreg.h -FILE 650 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicmp.c -FILE 651 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 652 f:\sp\public\sdk\inc\tvout.h -FILE 653 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 654 f:\sp\public\sdk\inc\wincon.h -FILE 655 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 656 f:\sp\public\sdk\inc\imm.h -FILE 657 f:\sp\public\sdk\inc\guiddef.h -FILE 658 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 659 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 660 f:\sp\public\sdk\inc\winbase.h -FILE 661 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 662 f:\sp\public\sdk\inc\wingdi.h -FILE 663 f:\sp\public\sdk\inc\windows.h -FILE 664 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 665 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 666 f:\sp\public\sdk\inc\winver.h -FILE 667 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 668 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 669 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 670 f:\sp\public\sdk\inc\pshpack2.h -FILE 671 f:\sp\public\sdk\inc\reason.h -FILE 672 f:\sp\public\sdk\inc\pshpack4.h -FILE 673 f:\sp\public\sdk\inc\winnetwk.h -FILE 674 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 675 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 676 f:\sp\public\sdk\inc\stralign.h -FILE 677 f:\sp\public\sdk\inc\windef.h -FILE 678 f:\sp\public\sdk\inc\poppack.h -FILE 679 f:\sp\public\sdk\inc\winsvc.h -FILE 680 f:\sp\public\sdk\inc\ddbanned.h -FILE 681 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 682 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 683 f:\sp\public\sdk\inc\winuser.h -FILE 684 f:\sp\public\sdk\inc\mcx.h -FILE 685 f:\sp\public\sdk\inc\pshpack8.h -FILE 686 f:\sp\public\sdk\inc\winnt.h -FILE 687 f:\sp\public\sdk\inc\specstrings.h -FILE 688 f:\sp\public\sdk\inc\basetsd.h -FILE 689 f:\sp\public\sdk\inc\winnls.h -FILE 690 f:\sp\public\sdk\inc\pshpack1.h -FILE 691 f:\sp\public\sdk\inc\winerror.h -FILE 692 f:\sp\public\sdk\inc\winreg.h -FILE 693 f:\sp\vctools\crt_bld\self_x86\crt\src\stricmp.c -FILE 694 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 695 f:\sp\public\sdk\inc\tvout.h -FILE 696 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 697 f:\sp\public\sdk\inc\wincon.h -FILE 698 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 699 f:\sp\public\sdk\inc\imm.h -FILE 700 f:\sp\public\sdk\inc\guiddef.h -FILE 701 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 702 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 703 f:\sp\public\sdk\inc\winbase.h -FILE 704 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 705 f:\sp\public\sdk\inc\wingdi.h -FILE 706 f:\sp\public\sdk\inc\windows.h -FILE 707 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 708 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 709 f:\sp\public\sdk\inc\winver.h -FILE 710 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 711 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 712 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 713 f:\sp\public\sdk\inc\pshpack2.h -FILE 714 f:\sp\public\sdk\inc\reason.h -FILE 715 f:\sp\public\sdk\inc\pshpack4.h -FILE 716 f:\sp\public\sdk\inc\winnetwk.h -FILE 717 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 718 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 719 f:\sp\public\sdk\inc\stralign.h -FILE 720 f:\sp\public\sdk\inc\windef.h -FILE 721 f:\sp\public\sdk\inc\poppack.h -FILE 722 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 723 f:\sp\public\sdk\inc\winsvc.h -FILE 724 f:\sp\public\sdk\inc\ddbanned.h -FILE 725 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 726 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 727 f:\sp\public\sdk\inc\winuser.h -FILE 728 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 729 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 730 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 731 f:\sp\vctools\crt_bld\self_x86\crt\src\wcslen.c -FILE 732 f:\sp\public\sdk\inc\ddbanned.h -FILE 733 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 734 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 735 f:\sp\public\sdk\inc\winnt.h -FILE 736 f:\sp\public\sdk\inc\pshpack4.h -FILE 737 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 738 f:\sp\public\sdk\inc\poppack.h -FILE 739 f:\sp\vctools\crt_bld\self_x86\crt\src\tcsncpy_s.inl -FILE 740 f:\sp\public\sdk\inc\winnetwk.h -FILE 741 f:\sp\public\sdk\inc\imm.h -FILE 742 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 743 f:\sp\public\sdk\inc\pshpack1.h -FILE 744 f:\sp\public\sdk\inc\winver.h -FILE 745 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 746 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 747 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 748 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 749 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 750 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 751 f:\sp\public\sdk\inc\guiddef.h -FILE 752 f:\sp\public\sdk\inc\windows.h -FILE 753 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 754 f:\sp\public\sdk\inc\specstrings.h -FILE 755 f:\sp\public\sdk\inc\basetsd.h -FILE 756 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 757 f:\sp\public\sdk\inc\winreg.h -FILE 758 f:\sp\vctools\crt_bld\self_x86\crt\src\strncpy_s.c -FILE 759 f:\sp\public\sdk\inc\winbase.h -FILE 760 f:\sp\public\sdk\inc\winerror.h -FILE 761 f:\sp\public\sdk\inc\pshpack8.h -FILE 762 f:\sp\public\sdk\inc\reason.h -FILE 763 f:\sp\public\sdk\inc\wincon.h -FILE 764 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 765 f:\sp\public\sdk\inc\ddbanned.h -FILE 766 f:\sp\public\sdk\inc\windef.h -FILE 767 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 768 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 769 f:\sp\public\sdk\inc\pshpack2.h -FILE 770 f:\sp\public\sdk\inc\mcx.h -FILE 771 f:\sp\public\sdk\inc\winuser.h -FILE 772 f:\sp\public\sdk\inc\winnls.h -FILE 773 f:\sp\public\sdk\inc\stralign.h -FILE 774 f:\sp\public\sdk\inc\tvout.h -FILE 775 f:\sp\public\sdk\inc\winsvc.h -FILE 776 f:\sp\public\sdk\inc\wingdi.h -FILE 777 f:\sp\public\sdk\inc\winnt.h -FILE 778 f:\sp\public\sdk\inc\pshpack4.h -FILE 779 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 780 f:\sp\public\sdk\inc\poppack.h -FILE 781 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscpy_s.inl -FILE 782 f:\sp\public\sdk\inc\winnetwk.h -FILE 783 f:\sp\public\sdk\inc\imm.h -FILE 784 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 785 f:\sp\public\sdk\inc\pshpack1.h -FILE 786 f:\sp\public\sdk\inc\winver.h -FILE 787 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 788 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 789 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 790 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 791 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 792 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 793 f:\sp\public\sdk\inc\guiddef.h -FILE 794 f:\sp\public\sdk\inc\windows.h -FILE 795 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 796 f:\sp\public\sdk\inc\specstrings.h -FILE 797 f:\sp\public\sdk\inc\basetsd.h -FILE 798 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 799 f:\sp\public\sdk\inc\winreg.h -FILE 800 f:\sp\vctools\crt_bld\self_x86\crt\src\strcpy_s.c -FILE 801 f:\sp\public\sdk\inc\winbase.h -FILE 802 f:\sp\public\sdk\inc\winerror.h -FILE 803 f:\sp\public\sdk\inc\pshpack8.h -FILE 804 f:\sp\public\sdk\inc\reason.h -FILE 805 f:\sp\public\sdk\inc\wincon.h -FILE 806 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 807 f:\sp\public\sdk\inc\ddbanned.h -FILE 808 f:\sp\public\sdk\inc\windef.h -FILE 809 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 810 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 811 f:\sp\public\sdk\inc\pshpack2.h -FILE 812 f:\sp\public\sdk\inc\mcx.h -FILE 813 f:\sp\public\sdk\inc\winuser.h -FILE 814 f:\sp\public\sdk\inc\winnls.h -FILE 815 f:\sp\public\sdk\inc\stralign.h -FILE 816 f:\sp\public\sdk\inc\tvout.h -FILE 817 f:\sp\public\sdk\inc\winsvc.h -FILE 818 f:\sp\public\sdk\inc\wingdi.h -FILE 819 f:\sp\public\sdk\inc\winnt.h -FILE 820 f:\sp\public\sdk\inc\pshpack4.h -FILE 821 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 822 f:\sp\public\sdk\inc\poppack.h -FILE 823 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscat_s.inl -FILE 824 f:\sp\public\sdk\inc\winnetwk.h -FILE 825 f:\sp\public\sdk\inc\imm.h -FILE 826 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 827 f:\sp\public\sdk\inc\pshpack1.h -FILE 828 f:\sp\public\sdk\inc\winver.h -FILE 829 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 830 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 831 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 832 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 833 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 834 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 835 f:\sp\public\sdk\inc\guiddef.h -FILE 836 f:\sp\public\sdk\inc\windows.h -FILE 837 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 838 f:\sp\public\sdk\inc\specstrings.h -FILE 839 f:\sp\public\sdk\inc\basetsd.h -FILE 840 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 841 f:\sp\public\sdk\inc\winreg.h -FILE 842 f:\sp\vctools\crt_bld\self_x86\crt\src\strcat_s.c -FILE 843 f:\sp\public\sdk\inc\winbase.h -FILE 844 f:\sp\public\sdk\inc\winerror.h -FILE 845 f:\sp\public\sdk\inc\pshpack8.h -FILE 846 f:\sp\public\sdk\inc\reason.h -FILE 847 f:\sp\public\sdk\inc\wincon.h -FILE 848 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 849 f:\sp\public\sdk\inc\ddbanned.h -FILE 850 f:\sp\public\sdk\inc\windef.h -FILE 851 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 852 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 853 f:\sp\public\sdk\inc\pshpack2.h -FILE 854 f:\sp\public\sdk\inc\mcx.h -FILE 855 f:\sp\public\sdk\inc\winuser.h -FILE 856 f:\sp\public\sdk\inc\winnls.h -FILE 857 f:\sp\public\sdk\inc\stralign.h -FILE 858 f:\sp\public\sdk\inc\tvout.h -FILE 859 f:\sp\public\sdk\inc\winsvc.h -FILE 860 f:\sp\public\sdk\inc\wingdi.h -FILE 861 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 862 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 863 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 864 f:\sp\vctools\crt_bld\self_x86\crt\src\strlen_s.c -FILE 865 f:\sp\public\sdk\inc\ddbanned.h -FILE 866 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 867 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 868 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strpbrk.asm -FILE 869 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 870 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 871 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\_strnicm.asm -FILE 872 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 873 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 874 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 875 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 876 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\strncmp.c -FILE 877 f:\sp\public\sdk\inc\ddbanned.h -FILE 878 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 879 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 880 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strlen.asm -FILE 881 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 882 f:\sp\public\sdk\inc\pshpack2.h -FILE 883 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 884 f:\sp\public\sdk\inc\mcx.h -FILE 885 f:\sp\public\sdk\inc\winuser.h -FILE 886 f:\sp\public\sdk\inc\winnls.h -FILE 887 f:\sp\public\sdk\inc\stralign.h -FILE 888 f:\sp\public\sdk\inc\tvout.h -FILE 889 f:\sp\public\sdk\inc\winsvc.h -FILE 890 f:\sp\public\sdk\inc\wingdi.h -FILE 891 f:\sp\public\sdk\inc\winnt.h -FILE 892 f:\sp\public\sdk\inc\pshpack4.h -FILE 893 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 894 f:\sp\public\sdk\inc\poppack.h -FILE 895 f:\sp\public\sdk\inc\winnetwk.h -FILE 896 f:\sp\public\sdk\inc\imm.h -FILE 897 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 898 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 899 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 900 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 901 f:\sp\vctools\crt_bld\self_x86\crt\src\strdup.c -FILE 902 f:\sp\public\sdk\inc\pshpack1.h -FILE 903 f:\sp\public\sdk\inc\winver.h -FILE 904 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 905 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 906 f:\sp\public\sdk\inc\guiddef.h -FILE 907 f:\sp\public\sdk\inc\windows.h -FILE 908 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 909 f:\sp\public\sdk\inc\specstrings.h -FILE 910 f:\sp\public\sdk\inc\basetsd.h -FILE 911 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 912 f:\sp\public\sdk\inc\winreg.h -FILE 913 f:\sp\public\sdk\inc\ddbanned.h -FILE 914 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 915 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 916 f:\sp\public\sdk\inc\winbase.h -FILE 917 f:\sp\public\sdk\inc\winerror.h -FILE 918 f:\sp\public\sdk\inc\pshpack8.h -FILE 919 f:\sp\public\sdk\inc\reason.h -FILE 920 f:\sp\public\sdk\inc\wincon.h -FILE 921 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 922 f:\sp\public\sdk\inc\windef.h -FILE 923 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcspn.asm -FILE 924 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 925 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 926 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcmp.asm -FILE 927 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 928 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strchr.asm -FILE 929 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 930 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memset.c -FILE 931 f:\sp\public\sdk\inc\ddbanned.h -FILE 932 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 933 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 934 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memset.asm -FILE 935 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 936 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 937 f:\sp\public\sdk\inc\poppack.h -FILE 938 f:\sp\public\sdk\inc\winnetwk.h -FILE 939 f:\sp\public\sdk\inc\imm.h -FILE 940 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 941 f:\sp\public\sdk\inc\pshpack1.h -FILE 942 f:\sp\public\sdk\inc\winver.h -FILE 943 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 944 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 945 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 946 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 947 f:\sp\public\sdk\inc\guiddef.h -FILE 948 f:\sp\public\sdk\inc\windows.h -FILE 949 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 950 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 951 f:\sp\public\sdk\inc\specstrings.h -FILE 952 f:\sp\public\sdk\inc\basetsd.h -FILE 953 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 954 f:\sp\public\sdk\inc\winreg.h -FILE 955 f:\sp\vctools\crt_bld\self_x86\crt\src\memmove_s.c -FILE 956 f:\sp\public\sdk\inc\winbase.h -FILE 957 f:\sp\public\sdk\inc\winerror.h -FILE 958 f:\sp\public\sdk\inc\pshpack8.h -FILE 959 f:\sp\public\sdk\inc\reason.h -FILE 960 f:\sp\public\sdk\inc\wincon.h -FILE 961 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 962 f:\sp\public\sdk\inc\windef.h -FILE 963 f:\sp\public\sdk\inc\ddbanned.h -FILE 964 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 965 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 966 f:\sp\public\sdk\inc\pshpack2.h -FILE 967 f:\sp\public\sdk\inc\mcx.h -FILE 968 f:\sp\public\sdk\inc\winuser.h -FILE 969 f:\sp\public\sdk\inc\winnls.h -FILE 970 f:\sp\public\sdk\inc\stralign.h -FILE 971 f:\sp\public\sdk\inc\tvout.h -FILE 972 f:\sp\public\sdk\inc\winsvc.h -FILE 973 f:\sp\public\sdk\inc\wingdi.h -FILE 974 f:\sp\public\sdk\inc\winnt.h -FILE 975 f:\sp\public\sdk\inc\pshpack4.h -FILE 976 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memmove.asm -FILE 977 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\MEMCPY.ASM -FILE 978 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 979 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\memcmp.c -FILE 980 f:\sp\public\sdk\inc\ddbanned.h -FILE 981 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 982 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 983 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 984 f:\sp\public\sdk\inc\poppack.h -FILE 985 f:\sp\public\sdk\inc\winnetwk.h -FILE 986 f:\sp\public\sdk\inc\imm.h -FILE 987 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 988 f:\sp\public\sdk\inc\pshpack1.h -FILE 989 f:\sp\public\sdk\inc\winver.h -FILE 990 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 991 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 992 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 993 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 994 f:\sp\public\sdk\inc\guiddef.h -FILE 995 f:\sp\public\sdk\inc\windows.h -FILE 996 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 997 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 998 f:\sp\public\sdk\inc\specstrings.h -FILE 999 f:\sp\public\sdk\inc\basetsd.h -FILE 1000 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1001 f:\sp\public\sdk\inc\winreg.h -FILE 1002 f:\sp\vctools\crt_bld\self_x86\crt\src\memcpy_s.c -FILE 1003 f:\sp\public\sdk\inc\winbase.h -FILE 1004 f:\sp\public\sdk\inc\winerror.h -FILE 1005 f:\sp\public\sdk\inc\pshpack8.h -FILE 1006 f:\sp\public\sdk\inc\reason.h -FILE 1007 f:\sp\public\sdk\inc\wincon.h -FILE 1008 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1009 f:\sp\public\sdk\inc\windef.h -FILE 1010 f:\sp\public\sdk\inc\ddbanned.h -FILE 1011 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1012 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1013 f:\sp\public\sdk\inc\pshpack2.h -FILE 1014 f:\sp\public\sdk\inc\mcx.h -FILE 1015 f:\sp\public\sdk\inc\winuser.h -FILE 1016 f:\sp\public\sdk\inc\winnls.h -FILE 1017 f:\sp\public\sdk\inc\stralign.h -FILE 1018 f:\sp\public\sdk\inc\tvout.h -FILE 1019 f:\sp\public\sdk\inc\winsvc.h -FILE 1020 f:\sp\public\sdk\inc\wingdi.h -FILE 1021 f:\sp\public\sdk\inc\winnt.h -FILE 1022 f:\sp\public\sdk\inc\pshpack4.h -FILE 1023 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memcpy.c -FILE 1024 f:\sp\public\sdk\inc\ddbanned.h -FILE 1025 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 1026 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 1027 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memcpy.asm -FILE 1028 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 1029 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1030 f:\sp\public\sdk\inc\wincon.h -FILE 1031 f:\sp\public\sdk\inc\imm.h -FILE 1032 f:\sp\public\sdk\inc\winbase.h -FILE 1033 f:\sp\public\sdk\inc\wingdi.h -FILE 1034 f:\sp\public\sdk\inc\winver.h -FILE 1035 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1036 f:\sp\public\sdk\inc\windows.h -FILE 1037 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1038 f:\sp\public\sdk\inc\pshpack2.h -FILE 1039 f:\sp\public\sdk\inc\reason.h -FILE 1040 f:\sp\vctools\crt_bld\self_x86\crt\src\woutputs.c -FILE 1041 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1042 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1043 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1044 f:\sp\public\sdk\inc\specstrings.h -FILE 1045 f:\sp\public\sdk\inc\basetsd.h -FILE 1046 f:\sp\public\sdk\inc\pshpack4.h -FILE 1047 f:\sp\public\sdk\inc\winnetwk.h -FILE 1048 f:\sp\public\sdk\inc\stralign.h -FILE 1049 f:\sp\public\sdk\inc\poppack.h -FILE 1050 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1051 f:\sp\public\sdk\inc\winsvc.h -FILE 1052 f:\sp\public\sdk\inc\windef.h -FILE 1053 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1054 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1055 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1056 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1057 f:\sp\public\sdk\inc\winuser.h -FILE 1058 f:\sp\public\sdk\inc\mcx.h -FILE 1059 f:\sp\public\sdk\inc\pshpack8.h -FILE 1060 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1061 f:\sp\public\sdk\inc\guiddef.h -FILE 1062 f:\sp\public\sdk\inc\winnt.h -FILE 1063 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1064 f:\sp\public\sdk\inc\winnls.h -FILE 1065 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1066 f:\sp\public\sdk\inc\pshpack1.h -FILE 1067 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1068 f:\sp\public\sdk\inc\winerror.h -FILE 1069 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1070 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1071 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1072 f:\sp\public\sdk\inc\winreg.h -FILE 1073 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1074 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1075 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1076 f:\sp\public\sdk\inc\ddbanned.h -FILE 1077 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1078 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1079 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1080 f:\sp\public\sdk\inc\tvout.h -FILE 1081 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1082 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1083 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1084 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1085 f:\sp\public\sdk\inc\wincon.h -FILE 1086 f:\sp\public\sdk\inc\imm.h -FILE 1087 f:\sp\public\sdk\inc\winbase.h -FILE 1088 f:\sp\public\sdk\inc\wingdi.h -FILE 1089 f:\sp\public\sdk\inc\winver.h -FILE 1090 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1091 f:\sp\public\sdk\inc\windows.h -FILE 1092 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1093 f:\sp\public\sdk\inc\pshpack2.h -FILE 1094 f:\sp\public\sdk\inc\reason.h -FILE 1095 f:\sp\vctools\crt_bld\self_x86\crt\src\woutputp.c -FILE 1096 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1097 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1098 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1099 f:\sp\public\sdk\inc\specstrings.h -FILE 1100 f:\sp\public\sdk\inc\basetsd.h -FILE 1101 f:\sp\public\sdk\inc\pshpack4.h -FILE 1102 f:\sp\public\sdk\inc\winnetwk.h -FILE 1103 f:\sp\public\sdk\inc\stralign.h -FILE 1104 f:\sp\public\sdk\inc\poppack.h -FILE 1105 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1106 f:\sp\public\sdk\inc\winsvc.h -FILE 1107 f:\sp\public\sdk\inc\windef.h -FILE 1108 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1109 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1110 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1111 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1112 f:\sp\public\sdk\inc\winuser.h -FILE 1113 f:\sp\public\sdk\inc\mcx.h -FILE 1114 f:\sp\public\sdk\inc\pshpack8.h -FILE 1115 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1116 f:\sp\public\sdk\inc\guiddef.h -FILE 1117 f:\sp\public\sdk\inc\winnt.h -FILE 1118 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1119 f:\sp\public\sdk\inc\winnls.h -FILE 1120 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1121 f:\sp\public\sdk\inc\pshpack1.h -FILE 1122 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1123 f:\sp\public\sdk\inc\winerror.h -FILE 1124 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1125 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1126 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1127 f:\sp\public\sdk\inc\winreg.h -FILE 1128 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1129 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1130 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1131 f:\sp\public\sdk\inc\ddbanned.h -FILE 1132 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1133 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1134 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1135 f:\sp\public\sdk\inc\tvout.h -FILE 1136 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1137 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1138 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1139 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1140 f:\sp\public\sdk\inc\wincon.h -FILE 1141 f:\sp\public\sdk\inc\imm.h -FILE 1142 f:\sp\public\sdk\inc\winbase.h -FILE 1143 f:\sp\public\sdk\inc\wingdi.h -FILE 1144 f:\sp\public\sdk\inc\winver.h -FILE 1145 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1146 f:\sp\public\sdk\inc\windows.h -FILE 1147 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1148 f:\sp\public\sdk\inc\pshpack2.h -FILE 1149 f:\sp\public\sdk\inc\reason.h -FILE 1150 f:\sp\vctools\crt_bld\self_x86\crt\src\woutput.c -FILE 1151 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1152 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1153 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1154 f:\sp\public\sdk\inc\specstrings.h -FILE 1155 f:\sp\public\sdk\inc\basetsd.h -FILE 1156 f:\sp\public\sdk\inc\pshpack4.h -FILE 1157 f:\sp\public\sdk\inc\winnetwk.h -FILE 1158 f:\sp\public\sdk\inc\stralign.h -FILE 1159 f:\sp\public\sdk\inc\poppack.h -FILE 1160 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1161 f:\sp\public\sdk\inc\winsvc.h -FILE 1162 f:\sp\public\sdk\inc\windef.h -FILE 1163 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1164 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1165 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1166 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1167 f:\sp\public\sdk\inc\winuser.h -FILE 1168 f:\sp\public\sdk\inc\mcx.h -FILE 1169 f:\sp\public\sdk\inc\pshpack8.h -FILE 1170 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1171 f:\sp\public\sdk\inc\guiddef.h -FILE 1172 f:\sp\public\sdk\inc\winnt.h -FILE 1173 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1174 f:\sp\public\sdk\inc\winnls.h -FILE 1175 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1176 f:\sp\public\sdk\inc\pshpack1.h -FILE 1177 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1178 f:\sp\public\sdk\inc\winerror.h -FILE 1179 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1180 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1181 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1182 f:\sp\public\sdk\inc\winreg.h -FILE 1183 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1184 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1185 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1186 f:\sp\public\sdk\inc\ddbanned.h -FILE 1187 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1188 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1189 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1190 f:\sp\public\sdk\inc\tvout.h -FILE 1191 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1192 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1193 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1194 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1195 f:\sp\public\sdk\inc\wincon.h -FILE 1196 f:\sp\public\sdk\inc\imm.h -FILE 1197 f:\sp\public\sdk\inc\winbase.h -FILE 1198 f:\sp\public\sdk\inc\wingdi.h -FILE 1199 f:\sp\public\sdk\inc\winver.h -FILE 1200 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1201 f:\sp\public\sdk\inc\windows.h -FILE 1202 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1203 f:\sp\public\sdk\inc\pshpack2.h -FILE 1204 f:\sp\public\sdk\inc\reason.h -FILE 1205 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1206 f:\sp\vctools\crt_bld\self_x86\crt\src\outputs.c -FILE 1207 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1208 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1209 f:\sp\public\sdk\inc\specstrings.h -FILE 1210 f:\sp\public\sdk\inc\basetsd.h -FILE 1211 f:\sp\public\sdk\inc\pshpack4.h -FILE 1212 f:\sp\public\sdk\inc\winnetwk.h -FILE 1213 f:\sp\public\sdk\inc\stralign.h -FILE 1214 f:\sp\public\sdk\inc\poppack.h -FILE 1215 f:\sp\public\sdk\inc\winsvc.h -FILE 1216 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1217 f:\sp\public\sdk\inc\windef.h -FILE 1218 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1219 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1220 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1221 f:\sp\public\sdk\inc\winuser.h -FILE 1222 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1223 f:\sp\public\sdk\inc\mcx.h -FILE 1224 f:\sp\public\sdk\inc\pshpack8.h -FILE 1225 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1226 f:\sp\public\sdk\inc\guiddef.h -FILE 1227 f:\sp\public\sdk\inc\winnt.h -FILE 1228 f:\sp\public\sdk\inc\winnls.h -FILE 1229 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1230 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1231 f:\sp\public\sdk\inc\pshpack1.h -FILE 1232 f:\sp\public\sdk\inc\winerror.h -FILE 1233 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1234 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1235 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1236 f:\sp\public\sdk\inc\winreg.h -FILE 1237 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1238 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1239 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1240 f:\sp\public\sdk\inc\ddbanned.h -FILE 1241 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1242 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1243 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1244 f:\sp\public\sdk\inc\tvout.h -FILE 1245 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1246 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1247 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1248 f:\sp\public\sdk\inc\wincon.h -FILE 1249 f:\sp\public\sdk\inc\imm.h -FILE 1250 f:\sp\public\sdk\inc\winbase.h -FILE 1251 f:\sp\public\sdk\inc\wingdi.h -FILE 1252 f:\sp\public\sdk\inc\winver.h -FILE 1253 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1254 f:\sp\public\sdk\inc\windows.h -FILE 1255 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1256 f:\sp\public\sdk\inc\pshpack2.h -FILE 1257 f:\sp\public\sdk\inc\reason.h -FILE 1258 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1259 f:\sp\vctools\crt_bld\self_x86\crt\src\outputp.c -FILE 1260 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1261 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1262 f:\sp\public\sdk\inc\specstrings.h -FILE 1263 f:\sp\public\sdk\inc\basetsd.h -FILE 1264 f:\sp\public\sdk\inc\pshpack4.h -FILE 1265 f:\sp\public\sdk\inc\winnetwk.h -FILE 1266 f:\sp\public\sdk\inc\stralign.h -FILE 1267 f:\sp\public\sdk\inc\poppack.h -FILE 1268 f:\sp\public\sdk\inc\winsvc.h -FILE 1269 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1270 f:\sp\public\sdk\inc\windef.h -FILE 1271 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1272 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1273 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1274 f:\sp\public\sdk\inc\winuser.h -FILE 1275 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1276 f:\sp\public\sdk\inc\mcx.h -FILE 1277 f:\sp\public\sdk\inc\pshpack8.h -FILE 1278 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1279 f:\sp\public\sdk\inc\guiddef.h -FILE 1280 f:\sp\public\sdk\inc\winnt.h -FILE 1281 f:\sp\public\sdk\inc\winnls.h -FILE 1282 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1283 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1284 f:\sp\public\sdk\inc\pshpack1.h -FILE 1285 f:\sp\public\sdk\inc\winerror.h -FILE 1286 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1287 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1288 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1289 f:\sp\public\sdk\inc\winreg.h -FILE 1290 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1291 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1292 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1293 f:\sp\public\sdk\inc\ddbanned.h -FILE 1294 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1295 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1296 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1297 f:\sp\public\sdk\inc\tvout.h -FILE 1298 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1299 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1300 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1301 f:\sp\public\sdk\inc\wincon.h -FILE 1302 f:\sp\public\sdk\inc\imm.h -FILE 1303 f:\sp\public\sdk\inc\winbase.h -FILE 1304 f:\sp\public\sdk\inc\wingdi.h -FILE 1305 f:\sp\public\sdk\inc\winver.h -FILE 1306 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1307 f:\sp\public\sdk\inc\windows.h -FILE 1308 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1309 f:\sp\public\sdk\inc\pshpack2.h -FILE 1310 f:\sp\public\sdk\inc\reason.h -FILE 1311 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 1312 f:\sp\vctools\crt_bld\self_x86\crt\src\output.c -FILE 1313 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1314 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1315 f:\sp\public\sdk\inc\specstrings.h -FILE 1316 f:\sp\public\sdk\inc\basetsd.h -FILE 1317 f:\sp\public\sdk\inc\pshpack4.h -FILE 1318 f:\sp\public\sdk\inc\winnetwk.h -FILE 1319 f:\sp\public\sdk\inc\stralign.h -FILE 1320 f:\sp\public\sdk\inc\poppack.h -FILE 1321 f:\sp\public\sdk\inc\winsvc.h -FILE 1322 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1323 f:\sp\public\sdk\inc\windef.h -FILE 1324 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1325 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1326 f:\sp\public\sdk\inc\winuser.h -FILE 1327 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1328 f:\sp\public\sdk\inc\mcx.h -FILE 1329 f:\sp\public\sdk\inc\pshpack8.h -FILE 1330 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1331 f:\sp\public\sdk\inc\guiddef.h -FILE 1332 f:\sp\public\sdk\inc\winnt.h -FILE 1333 f:\sp\public\sdk\inc\winnls.h -FILE 1334 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1335 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1336 f:\sp\public\sdk\inc\pshpack1.h -FILE 1337 f:\sp\public\sdk\inc\winerror.h -FILE 1338 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1339 f:\sp\vctools\crt_bld\self_x86\crt\src\cvt.h -FILE 1340 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 1341 f:\sp\public\sdk\inc\winreg.h -FILE 1342 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1343 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1344 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1345 f:\sp\public\sdk\inc\ddbanned.h -FILE 1346 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1347 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1348 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1349 f:\sp\public\sdk\inc\tvout.h -FILE 1350 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1351 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1352 f:\sp\public\sdk\inc\stralign.h -FILE 1353 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1354 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1355 f:\sp\public\sdk\inc\tvout.h -FILE 1356 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1357 f:\sp\public\sdk\inc\windows.h -FILE 1358 f:\sp\public\sdk\inc\winsvc.h -FILE 1359 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1360 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1361 f:\sp\public\sdk\inc\wingdi.h -FILE 1362 f:\sp\public\sdk\inc\pshpack4.h -FILE 1363 f:\sp\public\sdk\inc\poppack.h -FILE 1364 f:\sp\public\sdk\inc\winnetwk.h -FILE 1365 f:\sp\public\sdk\inc\imm.h -FILE 1366 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1367 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1368 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1369 f:\sp\public\sdk\inc\windef.h -FILE 1370 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1371 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1372 f:\sp\public\sdk\inc\pshpack1.h -FILE 1373 f:\sp\public\sdk\inc\winver.h -FILE 1374 f:\sp\vctools\crt_bld\self_x86\crt\src\vswprnc.c -FILE 1375 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1376 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1377 f:\sp\public\sdk\inc\winnt.h -FILE 1378 f:\sp\public\sdk\inc\winreg.h -FILE 1379 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1380 f:\sp\vctools\crt_bld\self_x86\crt\src\vswprint.c -FILE 1381 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1382 f:\sp\public\sdk\inc\winbase.h -FILE 1383 f:\sp\public\sdk\inc\winerror.h -FILE 1384 f:\sp\public\sdk\inc\ddbanned.h -FILE 1385 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1386 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1387 f:\sp\public\sdk\inc\pshpack8.h -FILE 1388 f:\sp\public\sdk\inc\guiddef.h -FILE 1389 f:\sp\public\sdk\inc\specstrings.h -FILE 1390 f:\sp\public\sdk\inc\basetsd.h -FILE 1391 f:\sp\public\sdk\inc\reason.h -FILE 1392 f:\sp\public\sdk\inc\wincon.h -FILE 1393 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1394 f:\sp\public\sdk\inc\pshpack2.h -FILE 1395 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1396 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1397 f:\sp\public\sdk\inc\mcx.h -FILE 1398 f:\sp\public\sdk\inc\winuser.h -FILE 1399 f:\sp\public\sdk\inc\winnls.h -FILE 1400 f:\sp\public\sdk\inc\pshpack1.h -FILE 1401 f:\sp\public\sdk\inc\winver.h -FILE 1402 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1403 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1404 f:\sp\public\sdk\inc\winnt.h -FILE 1405 f:\sp\public\sdk\inc\winreg.h -FILE 1406 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1407 f:\sp\public\sdk\inc\winbase.h -FILE 1408 f:\sp\public\sdk\inc\winerror.h -FILE 1409 f:\sp\public\sdk\inc\pshpack8.h -FILE 1410 f:\sp\public\sdk\inc\guiddef.h -FILE 1411 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1412 f:\sp\public\sdk\inc\specstrings.h -FILE 1413 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1414 f:\sp\public\sdk\inc\basetsd.h -FILE 1415 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1416 f:\sp\public\sdk\inc\reason.h -FILE 1417 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1418 f:\sp\public\sdk\inc\wincon.h -FILE 1419 f:\sp\public\sdk\inc\pshpack2.h -FILE 1420 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1421 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1422 f:\sp\public\sdk\inc\mcx.h -FILE 1423 f:\sp\public\sdk\inc\winuser.h -FILE 1424 f:\sp\public\sdk\inc\winnls.h -FILE 1425 f:\sp\vctools\crt_bld\self_x86\crt\src\vswprint.c -FILE 1426 f:\sp\public\sdk\inc\stralign.h -FILE 1427 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1428 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1429 f:\sp\public\sdk\inc\tvout.h -FILE 1430 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1431 f:\sp\public\sdk\inc\windows.h -FILE 1432 f:\sp\public\sdk\inc\winsvc.h -FILE 1433 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1434 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1435 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1436 f:\sp\public\sdk\inc\wingdi.h -FILE 1437 f:\sp\public\sdk\inc\pshpack4.h -FILE 1438 f:\sp\public\sdk\inc\poppack.h -FILE 1439 f:\sp\public\sdk\inc\ddbanned.h -FILE 1440 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1441 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1442 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1443 f:\sp\public\sdk\inc\winnetwk.h -FILE 1444 f:\sp\public\sdk\inc\imm.h -FILE 1445 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1446 f:\sp\public\sdk\inc\windef.h -FILE 1447 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1448 f:\sp\public\sdk\inc\windef.h -FILE 1449 f:\sp\public\sdk\inc\pshpack1.h -FILE 1450 f:\sp\public\sdk\inc\winver.h -FILE 1451 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1452 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1453 f:\sp\public\sdk\inc\winnt.h -FILE 1454 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1455 f:\sp\public\sdk\inc\winreg.h -FILE 1456 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1457 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1458 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1459 f:\sp\public\sdk\inc\winbase.h -FILE 1460 f:\sp\public\sdk\inc\winerror.h -FILE 1461 f:\sp\public\sdk\inc\pshpack8.h -FILE 1462 f:\sp\vctools\crt_bld\self_x86\crt\src\vfprintf.c -FILE 1463 f:\sp\public\sdk\inc\reason.h -FILE 1464 f:\sp\public\sdk\inc\wincon.h -FILE 1465 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1466 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1467 f:\sp\public\sdk\inc\pshpack2.h -FILE 1468 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1469 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1470 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1471 f:\sp\public\sdk\inc\mcx.h -FILE 1472 f:\sp\public\sdk\inc\winuser.h -FILE 1473 f:\sp\public\sdk\inc\winnls.h -FILE 1474 f:\sp\public\sdk\inc\guiddef.h -FILE 1475 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1476 f:\sp\public\sdk\inc\windows.h -FILE 1477 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1478 f:\sp\public\sdk\inc\specstrings.h -FILE 1479 f:\sp\public\sdk\inc\basetsd.h -FILE 1480 f:\sp\public\sdk\inc\stralign.h -FILE 1481 f:\sp\public\sdk\inc\tvout.h -FILE 1482 f:\sp\public\sdk\inc\ddbanned.h -FILE 1483 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1484 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1485 f:\sp\public\sdk\inc\winsvc.h -FILE 1486 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1487 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1488 f:\sp\public\sdk\inc\wingdi.h -FILE 1489 f:\sp\public\sdk\inc\pshpack4.h -FILE 1490 f:\sp\public\sdk\inc\poppack.h -FILE 1491 f:\sp\public\sdk\inc\winnetwk.h -FILE 1492 f:\sp\public\sdk\inc\imm.h -FILE 1493 f:\sp\public\sdk\inc\windef.h -FILE 1494 f:\sp\public\sdk\inc\pshpack1.h -FILE 1495 f:\sp\public\sdk\inc\winver.h -FILE 1496 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1497 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1498 f:\sp\public\sdk\inc\winnt.h -FILE 1499 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1500 f:\sp\public\sdk\inc\winreg.h -FILE 1501 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1502 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1503 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1504 f:\sp\public\sdk\inc\winbase.h -FILE 1505 f:\sp\public\sdk\inc\winerror.h -FILE 1506 f:\sp\public\sdk\inc\pshpack8.h -FILE 1507 f:\sp\vctools\crt_bld\self_x86\crt\src\vprintf.c -FILE 1508 f:\sp\public\sdk\inc\reason.h -FILE 1509 f:\sp\public\sdk\inc\wincon.h -FILE 1510 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1511 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1512 f:\sp\public\sdk\inc\pshpack2.h -FILE 1513 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1514 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1515 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1516 f:\sp\public\sdk\inc\mcx.h -FILE 1517 f:\sp\public\sdk\inc\winuser.h -FILE 1518 f:\sp\public\sdk\inc\winnls.h -FILE 1519 f:\sp\public\sdk\inc\guiddef.h -FILE 1520 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1521 f:\sp\public\sdk\inc\windows.h -FILE 1522 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1523 f:\sp\public\sdk\inc\specstrings.h -FILE 1524 f:\sp\public\sdk\inc\basetsd.h -FILE 1525 f:\sp\public\sdk\inc\stralign.h -FILE 1526 f:\sp\public\sdk\inc\tvout.h -FILE 1527 f:\sp\public\sdk\inc\ddbanned.h -FILE 1528 f:\sp\public\sdk\inc\winsvc.h -FILE 1529 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1530 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1531 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1532 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1533 f:\sp\public\sdk\inc\wingdi.h -FILE 1534 f:\sp\public\sdk\inc\pshpack4.h -FILE 1535 f:\sp\public\sdk\inc\poppack.h -FILE 1536 f:\sp\public\sdk\inc\winnetwk.h -FILE 1537 f:\sp\public\sdk\inc\imm.h -FILE 1538 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1539 f:\sp\public\sdk\inc\pshpack1.h -FILE 1540 f:\sp\public\sdk\inc\winver.h -FILE 1541 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1542 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1543 f:\sp\public\sdk\inc\winnt.h -FILE 1544 f:\sp\public\sdk\inc\winreg.h -FILE 1545 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1546 f:\sp\public\sdk\inc\winbase.h -FILE 1547 f:\sp\public\sdk\inc\winerror.h -FILE 1548 f:\sp\public\sdk\inc\pshpack8.h -FILE 1549 f:\sp\public\sdk\inc\guiddef.h -FILE 1550 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1551 f:\sp\public\sdk\inc\specstrings.h -FILE 1552 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1553 f:\sp\public\sdk\inc\basetsd.h -FILE 1554 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1555 f:\sp\public\sdk\inc\reason.h -FILE 1556 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1557 f:\sp\public\sdk\inc\wincon.h -FILE 1558 f:\sp\public\sdk\inc\pshpack2.h -FILE 1559 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1560 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1561 f:\sp\public\sdk\inc\mcx.h -FILE 1562 f:\sp\public\sdk\inc\winuser.h -FILE 1563 f:\sp\public\sdk\inc\winnls.h -FILE 1564 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.c -FILE 1565 f:\sp\public\sdk\inc\stralign.h -FILE 1566 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1567 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1568 f:\sp\public\sdk\inc\tvout.h -FILE 1569 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1570 f:\sp\public\sdk\inc\windows.h -FILE 1571 f:\sp\public\sdk\inc\winsvc.h -FILE 1572 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1573 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1574 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1575 f:\sp\public\sdk\inc\wingdi.h -FILE 1576 f:\sp\public\sdk\inc\pshpack4.h -FILE 1577 f:\sp\public\sdk\inc\poppack.h -FILE 1578 f:\sp\public\sdk\inc\ddbanned.h -FILE 1579 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1580 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1581 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1582 f:\sp\public\sdk\inc\winnetwk.h -FILE 1583 f:\sp\public\sdk\inc\imm.h -FILE 1584 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1585 f:\sp\public\sdk\inc\windef.h -FILE 1586 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1587 f:\sp\public\sdk\inc\windef.h -FILE 1588 f:\sp\public\sdk\inc\pshpack1.h -FILE 1589 f:\sp\public\sdk\inc\winver.h -FILE 1590 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1591 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1592 f:\sp\public\sdk\inc\winnt.h -FILE 1593 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1594 f:\sp\public\sdk\inc\winreg.h -FILE 1595 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1596 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1597 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1598 f:\sp\public\sdk\inc\winbase.h -FILE 1599 f:\sp\public\sdk\inc\winerror.h -FILE 1600 f:\sp\public\sdk\inc\pshpack8.h -FILE 1601 f:\sp\vctools\crt_bld\self_x86\crt\src\printf.c -FILE 1602 f:\sp\public\sdk\inc\reason.h -FILE 1603 f:\sp\public\sdk\inc\wincon.h -FILE 1604 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1605 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1606 f:\sp\public\sdk\inc\pshpack2.h -FILE 1607 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1608 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1609 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1610 f:\sp\public\sdk\inc\mcx.h -FILE 1611 f:\sp\public\sdk\inc\winuser.h -FILE 1612 f:\sp\public\sdk\inc\winnls.h -FILE 1613 f:\sp\public\sdk\inc\guiddef.h -FILE 1614 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1615 f:\sp\public\sdk\inc\windows.h -FILE 1616 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1617 f:\sp\public\sdk\inc\specstrings.h -FILE 1618 f:\sp\public\sdk\inc\basetsd.h -FILE 1619 f:\sp\public\sdk\inc\stralign.h -FILE 1620 f:\sp\public\sdk\inc\tvout.h -FILE 1621 f:\sp\public\sdk\inc\ddbanned.h -FILE 1622 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1623 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1624 f:\sp\public\sdk\inc\winsvc.h -FILE 1625 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1626 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1627 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 1628 f:\sp\public\sdk\inc\wingdi.h -FILE 1629 f:\sp\public\sdk\inc\pshpack4.h -FILE 1630 f:\sp\public\sdk\inc\poppack.h -FILE 1631 f:\sp\public\sdk\inc\winnetwk.h -FILE 1632 f:\sp\public\sdk\inc\imm.h -FILE 1633 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1634 f:\sp\public\sdk\inc\windef.h -FILE 1635 f:\sp\public\sdk\inc\pshpack1.h -FILE 1636 f:\sp\public\sdk\inc\winver.h -FILE 1637 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1638 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1639 f:\sp\public\sdk\inc\winnt.h -FILE 1640 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1641 f:\sp\public\sdk\inc\winreg.h -FILE 1642 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1643 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1644 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1645 f:\sp\public\sdk\inc\winbase.h -FILE 1646 f:\sp\public\sdk\inc\winerror.h -FILE 1647 f:\sp\public\sdk\inc\pshpack8.h -FILE 1648 f:\sp\vctools\crt_bld\self_x86\crt\src\fprintf.c -FILE 1649 f:\sp\public\sdk\inc\reason.h -FILE 1650 f:\sp\public\sdk\inc\wincon.h -FILE 1651 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1652 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1653 f:\sp\public\sdk\inc\pshpack2.h -FILE 1654 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1655 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1656 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1657 f:\sp\public\sdk\inc\mcx.h -FILE 1658 f:\sp\public\sdk\inc\winuser.h -FILE 1659 f:\sp\public\sdk\inc\winnls.h -FILE 1660 f:\sp\public\sdk\inc\guiddef.h -FILE 1661 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1662 f:\sp\public\sdk\inc\windows.h -FILE 1663 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1664 f:\sp\public\sdk\inc\specstrings.h -FILE 1665 f:\sp\public\sdk\inc\basetsd.h -FILE 1666 f:\sp\public\sdk\inc\stralign.h -FILE 1667 f:\sp\public\sdk\inc\tvout.h -FILE 1668 f:\sp\public\sdk\inc\ddbanned.h -FILE 1669 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1670 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1671 f:\sp\public\sdk\inc\winsvc.h -FILE 1672 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1673 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1674 f:\sp\public\sdk\inc\wingdi.h -FILE 1675 f:\sp\public\sdk\inc\pshpack4.h -FILE 1676 f:\sp\public\sdk\inc\poppack.h -FILE 1677 f:\sp\public\sdk\inc\winnetwk.h -FILE 1678 f:\sp\public\sdk\inc\imm.h -FILE 1679 f:\sp\public\sdk\inc\pshpack1.h -FILE 1680 f:\sp\public\sdk\inc\winver.h -FILE 1681 f:\sp\public\sdk\inc\winnt.h -FILE 1682 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1683 f:\sp\public\sdk\inc\winreg.h -FILE 1684 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1685 f:\sp\public\sdk\inc\winbase.h -FILE 1686 f:\sp\public\sdk\inc\winerror.h -FILE 1687 f:\sp\public\sdk\inc\pshpack8.h -FILE 1688 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1689 f:\sp\public\sdk\inc\reason.h -FILE 1690 f:\sp\public\sdk\inc\wincon.h -FILE 1691 f:\sp\public\sdk\inc\pshpack2.h -FILE 1692 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1693 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1694 f:\sp\public\sdk\inc\mcx.h -FILE 1695 f:\sp\public\sdk\inc\winuser.h -FILE 1696 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1697 f:\sp\public\sdk\inc\winnls.h -FILE 1698 f:\sp\public\sdk\inc\guiddef.h -FILE 1699 f:\sp\public\sdk\inc\windows.h -FILE 1700 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1701 f:\sp\public\sdk\inc\specstrings.h -FILE 1702 f:\sp\public\sdk\inc\basetsd.h -FILE 1703 f:\sp\public\sdk\inc\stralign.h -FILE 1704 f:\sp\vctools\crt_bld\self_x86\crt\src\fflush.c -FILE 1705 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1706 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 1707 f:\sp\public\sdk\inc\tvout.h -FILE 1708 f:\sp\public\sdk\inc\winsvc.h -FILE 1709 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1710 f:\sp\public\sdk\inc\wingdi.h -FILE 1711 f:\sp\public\sdk\inc\pshpack4.h -FILE 1712 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1713 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1714 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1715 f:\sp\public\sdk\inc\poppack.h -FILE 1716 f:\sp\public\sdk\inc\ddbanned.h -FILE 1717 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1718 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1719 f:\sp\public\sdk\inc\winnetwk.h -FILE 1720 f:\sp\public\sdk\inc\imm.h -FILE 1721 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1722 f:\sp\public\sdk\inc\windef.h -FILE 1723 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1724 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1725 f:\sp\public\sdk\inc\pshpack8.h -FILE 1726 f:\sp\public\sdk\inc\reason.h -FILE 1727 f:\sp\public\sdk\inc\wincon.h -FILE 1728 f:\sp\public\sdk\inc\pshpack2.h -FILE 1729 f:\sp\public\sdk\inc\mcx.h -FILE 1730 f:\sp\public\sdk\inc\winuser.h -FILE 1731 f:\sp\public\sdk\inc\winnls.h -FILE 1732 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1733 f:\sp\public\sdk\inc\windef.h -FILE 1734 f:\sp\public\sdk\inc\stralign.h -FILE 1735 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1736 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1737 f:\sp\public\sdk\inc\tvout.h -FILE 1738 f:\sp\public\sdk\inc\winsvc.h -FILE 1739 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1740 f:\sp\public\sdk\inc\wingdi.h -FILE 1741 f:\sp\public\sdk\inc\pshpack4.h -FILE 1742 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1743 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1744 f:\sp\public\sdk\inc\poppack.h -FILE 1745 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1746 f:\sp\public\sdk\inc\winnt.h -FILE 1747 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1748 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1749 f:\sp\public\sdk\inc\winnetwk.h -FILE 1750 f:\sp\public\sdk\inc\imm.h -FILE 1751 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1752 f:\sp\vctools\crt_bld\self_x86\crt\src\fclose.c -FILE 1753 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1754 f:\sp\public\sdk\inc\pshpack1.h -FILE 1755 f:\sp\public\sdk\inc\winver.h -FILE 1756 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1757 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1758 f:\sp\public\sdk\inc\guiddef.h -FILE 1759 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1760 f:\sp\public\sdk\inc\ddbanned.h -FILE 1761 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1762 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1763 f:\sp\public\sdk\inc\specstrings.h -FILE 1764 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1765 f:\sp\public\sdk\inc\basetsd.h -FILE 1766 f:\sp\public\sdk\inc\windows.h -FILE 1767 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1768 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 1769 f:\sp\public\sdk\inc\winreg.h -FILE 1770 f:\sp\public\sdk\inc\winbase.h -FILE 1771 f:\sp\public\sdk\inc\winerror.h -FILE 1772 f:\sp\public\sdk\inc\poppack.h -FILE 1773 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1774 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1775 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1776 f:\sp\public\sdk\inc\winnetwk.h -FILE 1777 f:\sp\public\sdk\inc\imm.h -FILE 1778 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1779 f:\sp\public\sdk\inc\windef.h -FILE 1780 f:\sp\public\sdk\inc\pshpack1.h -FILE 1781 f:\sp\public\sdk\inc\winver.h -FILE 1782 f:\sp\public\sdk\inc\windows.h -FILE 1783 f:\sp\public\sdk\inc\winnt.h -FILE 1784 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1785 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1786 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1787 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1788 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1789 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1790 f:\sp\public\sdk\inc\winreg.h -FILE 1791 f:\sp\public\sdk\inc\winbase.h -FILE 1792 f:\sp\vctools\crt_bld\self_x86\crt\src\closeall.c -FILE 1793 f:\sp\public\sdk\inc\winerror.h -FILE 1794 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1795 f:\sp\public\sdk\inc\pshpack8.h -FILE 1796 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1797 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1798 f:\sp\public\sdk\inc\reason.h -FILE 1799 f:\sp\public\sdk\inc\wincon.h -FILE 1800 f:\sp\public\sdk\inc\ddbanned.h -FILE 1801 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1802 f:\sp\public\sdk\inc\pshpack2.h -FILE 1803 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1804 f:\sp\public\sdk\inc\mcx.h -FILE 1805 f:\sp\public\sdk\inc\winuser.h -FILE 1806 f:\sp\public\sdk\inc\winnls.h -FILE 1807 f:\sp\public\sdk\inc\guiddef.h -FILE 1808 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1809 f:\sp\public\sdk\inc\specstrings.h -FILE 1810 f:\sp\public\sdk\inc\basetsd.h -FILE 1811 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1812 f:\sp\public\sdk\inc\stralign.h -FILE 1813 f:\sp\public\sdk\inc\tvout.h -FILE 1814 f:\sp\public\sdk\inc\winsvc.h -FILE 1815 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1816 f:\sp\public\sdk\inc\wingdi.h -FILE 1817 f:\sp\public\sdk\inc\pshpack4.h -FILE 1818 f:\sp\public\sdk\inc\pshpack8.h -FILE 1819 f:\sp\public\sdk\inc\reason.h -FILE 1820 f:\sp\public\sdk\inc\wincon.h -FILE 1821 f:\sp\public\sdk\inc\pshpack2.h -FILE 1822 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1823 f:\sp\public\sdk\inc\mcx.h -FILE 1824 f:\sp\public\sdk\inc\winuser.h -FILE 1825 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1826 f:\sp\public\sdk\inc\winnls.h -FILE 1827 f:\sp\public\sdk\inc\guiddef.h -FILE 1828 f:\sp\public\sdk\inc\windows.h -FILE 1829 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1830 f:\sp\public\sdk\inc\specstrings.h -FILE 1831 f:\sp\public\sdk\inc\basetsd.h -FILE 1832 f:\sp\public\sdk\inc\stralign.h -FILE 1833 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1834 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 1835 f:\sp\public\sdk\inc\tvout.h -FILE 1836 f:\sp\public\sdk\inc\winsvc.h -FILE 1837 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1838 f:\sp\public\sdk\inc\wingdi.h -FILE 1839 f:\sp\public\sdk\inc\pshpack4.h -FILE 1840 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1841 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1842 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1843 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1844 f:\sp\public\sdk\inc\poppack.h -FILE 1845 f:\sp\public\sdk\inc\winnetwk.h -FILE 1846 f:\sp\public\sdk\inc\imm.h -FILE 1847 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1848 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1849 f:\sp\public\sdk\inc\windef.h -FILE 1850 f:\sp\vctools\crt_bld\self_x86\crt\src\_sftbuf.c -FILE 1851 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1852 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1853 f:\sp\public\sdk\inc\pshpack1.h -FILE 1854 f:\sp\public\sdk\inc\winver.h -FILE 1855 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1856 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1857 f:\sp\public\sdk\inc\ddbanned.h -FILE 1858 f:\sp\public\sdk\inc\winnt.h -FILE 1859 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1860 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1861 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1862 f:\sp\public\sdk\inc\winreg.h -FILE 1863 f:\sp\public\sdk\inc\winbase.h -FILE 1864 f:\sp\public\sdk\inc\winerror.h -FILE 1865 f:\sp\public\sdk\inc\pshpack1.h -FILE 1866 f:\sp\public\sdk\inc\winver.h -FILE 1867 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1868 f:\sp\public\sdk\inc\winnt.h -FILE 1869 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1870 f:\sp\public\sdk\inc\winreg.h -FILE 1871 f:\sp\public\sdk\inc\winbase.h -FILE 1872 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1873 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1874 f:\sp\public\sdk\inc\winerror.h -FILE 1875 f:\sp\public\sdk\inc\pshpack8.h -FILE 1876 f:\sp\public\sdk\inc\reason.h -FILE 1877 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1878 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1879 f:\sp\public\sdk\inc\wincon.h -FILE 1880 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1881 f:\sp\public\sdk\inc\pshpack2.h -FILE 1882 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1883 f:\sp\public\sdk\inc\mcx.h -FILE 1884 f:\sp\public\sdk\inc\winuser.h -FILE 1885 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1886 f:\sp\public\sdk\inc\winnls.h -FILE 1887 f:\sp\public\sdk\inc\guiddef.h -FILE 1888 f:\sp\public\sdk\inc\windows.h -FILE 1889 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1890 f:\sp\public\sdk\inc\specstrings.h -FILE 1891 f:\sp\public\sdk\inc\basetsd.h -FILE 1892 f:\sp\public\sdk\inc\stralign.h -FILE 1893 f:\sp\vctools\crt_bld\self_x86\crt\src\_getbuf.c -FILE 1894 f:\sp\public\sdk\inc\tvout.h -FILE 1895 f:\sp\public\sdk\inc\winsvc.h -FILE 1896 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1897 f:\sp\public\sdk\inc\wingdi.h -FILE 1898 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1899 f:\sp\public\sdk\inc\pshpack4.h -FILE 1900 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1901 f:\sp\public\sdk\inc\poppack.h -FILE 1902 f:\sp\public\sdk\inc\ddbanned.h -FILE 1903 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1904 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1905 f:\sp\public\sdk\inc\winnetwk.h -FILE 1906 f:\sp\public\sdk\inc\imm.h -FILE 1907 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1908 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1909 f:\sp\public\sdk\inc\windef.h -FILE 1910 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1911 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1912 f:\sp\public\sdk\inc\windef.h -FILE 1913 f:\sp\public\sdk\inc\pshpack1.h -FILE 1914 f:\sp\public\sdk\inc\winver.h -FILE 1915 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1916 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1917 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1918 f:\sp\public\sdk\inc\winnt.h -FILE 1919 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1920 f:\sp\public\sdk\inc\winreg.h -FILE 1921 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1922 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1923 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1924 f:\sp\public\sdk\inc\winbase.h -FILE 1925 f:\sp\public\sdk\inc\winerror.h -FILE 1926 f:\sp\public\sdk\inc\pshpack8.h -FILE 1927 f:\sp\vctools\crt_bld\self_x86\crt\src\_freebuf.c -FILE 1928 f:\sp\public\sdk\inc\reason.h -FILE 1929 f:\sp\public\sdk\inc\wincon.h -FILE 1930 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1931 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1932 f:\sp\public\sdk\inc\pshpack2.h -FILE 1933 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1934 f:\sp\public\sdk\inc\mcx.h -FILE 1935 f:\sp\public\sdk\inc\winuser.h -FILE 1936 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1937 f:\sp\public\sdk\inc\winnls.h -FILE 1938 f:\sp\public\sdk\inc\guiddef.h -FILE 1939 f:\sp\public\sdk\inc\windows.h -FILE 1940 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1941 f:\sp\public\sdk\inc\specstrings.h -FILE 1942 f:\sp\public\sdk\inc\basetsd.h -FILE 1943 f:\sp\public\sdk\inc\stralign.h -FILE 1944 f:\sp\public\sdk\inc\tvout.h -FILE 1945 f:\sp\public\sdk\inc\ddbanned.h -FILE 1946 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1947 f:\sp\public\sdk\inc\winsvc.h -FILE 1948 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1949 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1950 f:\sp\public\sdk\inc\wingdi.h -FILE 1951 f:\sp\public\sdk\inc\pshpack4.h -FILE 1952 f:\sp\public\sdk\inc\poppack.h -FILE 1953 f:\sp\public\sdk\inc\winnetwk.h -FILE 1954 f:\sp\public\sdk\inc\imm.h -FILE 1955 f:\sp\public\sdk\inc\specstrings.h -FILE 1956 f:\sp\public\sdk\inc\basetsd.h -FILE 1957 f:\sp\public\sdk\inc\reason.h -FILE 1958 f:\sp\public\sdk\inc\wincon.h -FILE 1959 f:\sp\public\sdk\inc\pshpack2.h -FILE 1960 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1961 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1962 f:\sp\public\sdk\inc\mcx.h -FILE 1963 f:\sp\public\sdk\inc\winuser.h -FILE 1964 f:\sp\public\sdk\inc\winnls.h -FILE 1965 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1966 f:\sp\public\sdk\inc\stralign.h -FILE 1967 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1968 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1969 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1970 f:\sp\public\sdk\inc\windows.h -FILE 1971 f:\sp\public\sdk\inc\tvout.h -FILE 1972 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1973 f:\sp\public\sdk\inc\winsvc.h -FILE 1974 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1975 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 1976 f:\sp\public\sdk\inc\wingdi.h -FILE 1977 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 1978 f:\sp\public\sdk\inc\pshpack4.h -FILE 1979 f:\sp\public\sdk\inc\poppack.h -FILE 1980 f:\sp\vctools\crt_bld\self_x86\crt\src\_flsbuf.c -FILE 1981 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 1982 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1983 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1984 f:\sp\public\sdk\inc\winnetwk.h -FILE 1985 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1986 f:\sp\public\sdk\inc\imm.h -FILE 1987 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1988 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1989 f:\sp\vctools\crt_bld\self_x86\crt\src\_flswbuf.c -FILE 1990 f:\sp\public\sdk\inc\windef.h -FILE 1991 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1992 f:\sp\public\sdk\inc\pshpack1.h -FILE 1993 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1994 f:\sp\public\sdk\inc\winver.h -FILE 1995 f:\sp\public\sdk\inc\ddbanned.h -FILE 1996 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1997 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1998 f:\sp\public\sdk\inc\winnt.h -FILE 1999 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2000 f:\sp\public\sdk\inc\winreg.h -FILE 2001 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 2002 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2003 f:\sp\public\sdk\inc\winbase.h -FILE 2004 f:\sp\public\sdk\inc\winerror.h -FILE 2005 f:\sp\public\sdk\inc\pshpack8.h -FILE 2006 f:\sp\public\sdk\inc\guiddef.h -FILE 2007 f:\sp\public\sdk\inc\basetsd.h -FILE 2008 f:\sp\public\sdk\inc\reason.h -FILE 2009 f:\sp\public\sdk\inc\wincon.h -FILE 2010 f:\sp\public\sdk\inc\pshpack2.h -FILE 2011 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2012 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2013 f:\sp\public\sdk\inc\mcx.h -FILE 2014 f:\sp\public\sdk\inc\winuser.h -FILE 2015 f:\sp\public\sdk\inc\winnls.h -FILE 2016 f:\sp\public\sdk\inc\stralign.h -FILE 2017 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2018 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2019 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2020 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2021 f:\sp\public\sdk\inc\tvout.h -FILE 2022 f:\sp\public\sdk\inc\windows.h -FILE 2023 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2024 f:\sp\public\sdk\inc\winsvc.h -FILE 2025 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2026 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2027 f:\sp\public\sdk\inc\wingdi.h -FILE 2028 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 2029 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 2030 f:\sp\public\sdk\inc\pshpack4.h -FILE 2031 f:\sp\public\sdk\inc\poppack.h -FILE 2032 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2033 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2034 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2035 f:\sp\public\sdk\inc\winnetwk.h -FILE 2036 f:\sp\public\sdk\inc\imm.h -FILE 2037 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 2038 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2039 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2040 f:\sp\public\sdk\inc\windef.h -FILE 2041 f:\sp\vctools\crt_bld\self_x86\crt\src\_flsbuf.c -FILE 2042 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2043 f:\sp\public\sdk\inc\pshpack1.h -FILE 2044 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2045 f:\sp\public\sdk\inc\winver.h -FILE 2046 f:\sp\public\sdk\inc\ddbanned.h -FILE 2047 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2048 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2049 f:\sp\public\sdk\inc\winnt.h -FILE 2050 f:\sp\public\sdk\inc\winreg.h -FILE 2051 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2052 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 2053 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2054 f:\sp\public\sdk\inc\winbase.h -FILE 2055 f:\sp\public\sdk\inc\winerror.h -FILE 2056 f:\sp\public\sdk\inc\pshpack8.h -FILE 2057 f:\sp\public\sdk\inc\guiddef.h -FILE 2058 f:\sp\public\sdk\inc\specstrings.h -FILE 2059 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2060 f:\sp\public\sdk\inc\reason.h -FILE 2061 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2062 f:\sp\public\sdk\inc\wincon.h -FILE 2063 f:\sp\public\sdk\inc\pshpack2.h -FILE 2064 f:\sp\public\sdk\inc\mcx.h -FILE 2065 f:\sp\public\sdk\inc\winuser.h -FILE 2066 f:\sp\public\sdk\inc\winnls.h -FILE 2067 f:\sp\public\sdk\inc\guiddef.h -FILE 2068 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2069 f:\sp\public\sdk\inc\specstrings.h -FILE 2070 f:\sp\public\sdk\inc\basetsd.h -FILE 2071 f:\sp\public\sdk\inc\stralign.h -FILE 2072 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2073 f:\sp\public\sdk\inc\tvout.h -FILE 2074 f:\sp\public\sdk\inc\winsvc.h -FILE 2075 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2076 f:\sp\public\sdk\inc\wingdi.h -FILE 2077 f:\sp\public\sdk\inc\pshpack4.h -FILE 2078 f:\sp\public\sdk\inc\poppack.h -FILE 2079 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2080 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 2081 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2082 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2083 f:\sp\public\sdk\inc\winnetwk.h -FILE 2084 f:\sp\public\sdk\inc\imm.h -FILE 2085 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2086 f:\sp\public\sdk\inc\windef.h -FILE 2087 f:\sp\vctools\crt_bld\self_x86\crt\src\_file.c -FILE 2088 f:\sp\public\sdk\inc\pshpack1.h -FILE 2089 f:\sp\public\sdk\inc\winver.h -FILE 2090 f:\sp\public\sdk\inc\windows.h -FILE 2091 f:\sp\public\sdk\inc\winnt.h -FILE 2092 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2093 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2094 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2095 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2096 f:\sp\public\sdk\inc\ddbanned.h -FILE 2097 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2098 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2099 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2100 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2101 f:\sp\public\sdk\inc\winreg.h -FILE 2102 f:\sp\public\sdk\inc\winbase.h -FILE 2103 f:\sp\public\sdk\inc\winerror.h -FILE 2104 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2105 f:\sp\public\sdk\inc\pshpack8.h -FILE 2106 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2107 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2108 f:\sp\public\sdk\inc\windef.h -FILE 2109 f:\sp\public\sdk\inc\pshpack1.h -FILE 2110 f:\sp\public\sdk\inc\winver.h -FILE 2111 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2112 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2113 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2114 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2115 f:\sp\public\sdk\inc\winnt.h -FILE 2116 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2117 f:\sp\public\sdk\inc\winreg.h -FILE 2118 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2119 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2120 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2121 f:\sp\public\sdk\inc\winbase.h -FILE 2122 f:\sp\public\sdk\inc\winerror.h -FILE 2123 f:\sp\public\sdk\inc\pshpack8.h -FILE 2124 f:\sp\vctools\crt_bld\self_x86\crt\src\fputwc.c -FILE 2125 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2126 f:\sp\public\sdk\inc\reason.h -FILE 2127 f:\sp\public\sdk\inc\wincon.h -FILE 2128 f:\sp\public\sdk\inc\pshpack2.h -FILE 2129 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2130 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2131 f:\sp\public\sdk\inc\mcx.h -FILE 2132 f:\sp\public\sdk\inc\winuser.h -FILE 2133 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2134 f:\sp\public\sdk\inc\winnls.h -FILE 2135 f:\sp\public\sdk\inc\guiddef.h -FILE 2136 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 2137 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2138 f:\sp\public\sdk\inc\stralign.h -FILE 2139 f:\sp\public\sdk\inc\specstrings.h -FILE 2140 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 2141 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2142 f:\sp\public\sdk\inc\basetsd.h -FILE 2143 f:\sp\public\sdk\inc\windows.h -FILE 2144 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2145 f:\sp\public\sdk\inc\tvout.h -FILE 2146 f:\sp\public\sdk\inc\ddbanned.h -FILE 2147 f:\sp\public\sdk\inc\winsvc.h -FILE 2148 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2149 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2150 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2151 f:\sp\public\sdk\inc\wingdi.h -FILE 2152 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2153 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2154 f:\sp\public\sdk\inc\pshpack4.h -FILE 2155 f:\sp\public\sdk\inc\poppack.h -FILE 2156 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 2157 f:\sp\public\sdk\inc\winnetwk.h -FILE 2158 f:\sp\public\sdk\inc\imm.h -FILE 2159 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2160 f:\sp\public\sdk\inc\poppack.h -FILE 2161 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2162 f:\sp\public\sdk\inc\winnetwk.h -FILE 2163 f:\sp\public\sdk\inc\imm.h -FILE 2164 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2165 f:\sp\public\sdk\inc\windef.h -FILE 2166 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2167 f:\sp\public\sdk\inc\pshpack1.h -FILE 2168 f:\sp\public\sdk\inc\winver.h -FILE 2169 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2170 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2171 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2172 f:\sp\public\sdk\inc\winnt.h -FILE 2173 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2174 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2175 f:\sp\public\sdk\inc\winreg.h -FILE 2176 f:\sp\vctools\crt_bld\self_x86\crt\src\fileno.c -FILE 2177 f:\sp\public\sdk\inc\winbase.h -FILE 2178 f:\sp\public\sdk\inc\winerror.h -FILE 2179 f:\sp\public\sdk\inc\pshpack8.h -FILE 2180 f:\sp\public\sdk\inc\reason.h -FILE 2181 f:\sp\public\sdk\inc\wincon.h -FILE 2182 f:\sp\public\sdk\inc\ddbanned.h -FILE 2183 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2184 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2185 f:\sp\public\sdk\inc\pshpack2.h -FILE 2186 f:\sp\public\sdk\inc\mcx.h -FILE 2187 f:\sp\public\sdk\inc\winuser.h -FILE 2188 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2189 f:\sp\public\sdk\inc\winnls.h -FILE 2190 f:\sp\public\sdk\inc\guiddef.h -FILE 2191 f:\sp\public\sdk\inc\windows.h -FILE 2192 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2193 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2194 f:\sp\public\sdk\inc\specstrings.h -FILE 2195 f:\sp\public\sdk\inc\basetsd.h -FILE 2196 f:\sp\public\sdk\inc\stralign.h -FILE 2197 f:\sp\public\sdk\inc\tvout.h -FILE 2198 f:\sp\public\sdk\inc\winsvc.h -FILE 2199 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2200 f:\sp\public\sdk\inc\wingdi.h -FILE 2201 f:\sp\public\sdk\inc\pshpack4.h -FILE 2202 f:\sp\public\sdk\inc\pshpack2.h -FILE 2203 f:\sp\public\sdk\inc\winreg.h -FILE 2204 f:\sp\public\sdk\inc\guiddef.h -FILE 2205 f:\sp\public\sdk\inc\windows.h -FILE 2206 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2207 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2208 f:\sp\public\sdk\inc\specstrings.h -FILE 2209 f:\sp\public\sdk\inc\basetsd.h -FILE 2210 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2211 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2212 f:\sp\public\sdk\inc\pshpack4.h -FILE 2213 f:\sp\public\sdk\inc\reason.h -FILE 2214 f:\sp\public\sdk\inc\wincon.h -FILE 2215 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2216 f:\sp\public\sdk\inc\poppack.h -FILE 2217 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2218 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2219 f:\sp\public\sdk\inc\mcx.h -FILE 2220 f:\sp\public\sdk\inc\winuser.h -FILE 2221 f:\sp\public\sdk\inc\winnls.h -FILE 2222 f:\sp\public\sdk\inc\stralign.h -FILE 2223 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2224 f:\sp\public\sdk\inc\windef.h -FILE 2225 f:\sp\public\sdk\inc\tvout.h -FILE 2226 f:\sp\public\sdk\inc\winsvc.h -FILE 2227 f:\sp\vctools\crt_bld\self_x86\crt\src\tidtable.c -FILE 2228 f:\sp\public\sdk\inc\wingdi.h -FILE 2229 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2230 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2231 f:\sp\public\sdk\inc\winnt.h -FILE 2232 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2233 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2234 f:\sp\public\sdk\inc\winnetwk.h -FILE 2235 f:\sp\public\sdk\inc\imm.h -FILE 2236 f:\sp\public\sdk\inc\ddbanned.h -FILE 2237 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2238 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2239 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2240 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2241 f:\sp\public\sdk\inc\winbase.h -FILE 2242 f:\sp\public\sdk\inc\winerror.h -FILE 2243 f:\sp\public\sdk\inc\pshpack1.h -FILE 2244 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2245 f:\sp\vctools\crt_bld\self_x86\crt\src\memory.h -FILE 2246 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2247 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 2248 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2249 f:\sp\public\sdk\inc\pshpack8.h -FILE 2250 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2251 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2252 f:\sp\public\sdk\inc\winver.h -FILE 2253 f:\sp\public\sdk\inc\pshpack4.h -FILE 2254 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2255 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2256 f:\sp\public\sdk\inc\poppack.h -FILE 2257 f:\sp\public\sdk\inc\winnt.h -FILE 2258 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2259 f:\sp\public\sdk\inc\winnetwk.h -FILE 2260 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2261 f:\sp\public\sdk\inc\imm.h -FILE 2262 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2263 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2264 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2265 f:\sp\public\sdk\inc\pshpack1.h -FILE 2266 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2267 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2268 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2269 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2270 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2271 f:\sp\public\sdk\inc\winver.h -FILE 2272 f:\sp\public\sdk\inc\guiddef.h -FILE 2273 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2274 f:\sp\public\sdk\inc\specstrings.h -FILE 2275 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2276 f:\sp\public\sdk\inc\basetsd.h -FILE 2277 f:\sp\public\sdk\inc\windows.h -FILE 2278 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2279 f:\sp\public\sdk\inc\winreg.h -FILE 2280 f:\sp\vctools\crt_bld\self_x86\crt\src\stdenvp.c -FILE 2281 f:\sp\public\sdk\inc\winbase.h -FILE 2282 f:\sp\public\sdk\inc\winerror.h -FILE 2283 f:\sp\public\sdk\inc\pshpack8.h -FILE 2284 f:\sp\public\sdk\inc\reason.h -FILE 2285 f:\sp\public\sdk\inc\ddbanned.h -FILE 2286 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2287 f:\sp\public\sdk\inc\wincon.h -FILE 2288 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2289 f:\sp\public\sdk\inc\pshpack2.h -FILE 2290 f:\sp\public\sdk\inc\mcx.h -FILE 2291 f:\sp\public\sdk\inc\winuser.h -FILE 2292 f:\sp\public\sdk\inc\winnls.h -FILE 2293 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2294 f:\sp\public\sdk\inc\windef.h -FILE 2295 f:\sp\public\sdk\inc\stralign.h -FILE 2296 f:\sp\public\sdk\inc\tvout.h -FILE 2297 f:\sp\public\sdk\inc\winsvc.h -FILE 2298 f:\sp\public\sdk\inc\wingdi.h -FILE 2299 f:\sp\public\sdk\inc\poppack.h -FILE 2300 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 2301 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2302 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2303 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2304 f:\sp\public\sdk\inc\winnetwk.h -FILE 2305 f:\sp\public\sdk\inc\imm.h -FILE 2306 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2307 f:\sp\public\sdk\inc\windef.h -FILE 2308 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2309 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2310 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2311 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2312 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2313 f:\sp\public\sdk\inc\pshpack1.h -FILE 2314 f:\sp\public\sdk\inc\winver.h -FILE 2315 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2316 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2317 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2318 f:\sp\public\sdk\inc\winnt.h -FILE 2319 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2320 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2321 f:\sp\public\sdk\inc\winreg.h -FILE 2322 f:\sp\vctools\crt_bld\self_x86\crt\src\stdargv.c -FILE 2323 f:\sp\public\sdk\inc\winbase.h -FILE 2324 f:\sp\public\sdk\inc\winerror.h -FILE 2325 f:\sp\public\sdk\inc\pshpack8.h -FILE 2326 f:\sp\public\sdk\inc\reason.h -FILE 2327 f:\sp\public\sdk\inc\wincon.h -FILE 2328 f:\sp\public\sdk\inc\ddbanned.h -FILE 2329 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2330 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2331 f:\sp\public\sdk\inc\pshpack2.h -FILE 2332 f:\sp\public\sdk\inc\mcx.h -FILE 2333 f:\sp\public\sdk\inc\winuser.h -FILE 2334 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2335 f:\sp\public\sdk\inc\winnls.h -FILE 2336 f:\sp\public\sdk\inc\guiddef.h -FILE 2337 f:\sp\public\sdk\inc\windows.h -FILE 2338 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2339 f:\sp\public\sdk\inc\specstrings.h -FILE 2340 f:\sp\public\sdk\inc\basetsd.h -FILE 2341 f:\sp\public\sdk\inc\stralign.h -FILE 2342 f:\sp\public\sdk\inc\tvout.h -FILE 2343 f:\sp\public\sdk\inc\winsvc.h -FILE 2344 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2345 f:\sp\public\sdk\inc\wingdi.h -FILE 2346 f:\sp\public\sdk\inc\pshpack4.h -FILE 2347 f:\sp\public\sdk\inc\reason.h -FILE 2348 f:\sp\public\sdk\inc\wincon.h -FILE 2349 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2350 f:\sp\public\sdk\inc\poppack.h -FILE 2351 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2352 f:\sp\public\sdk\inc\mcx.h -FILE 2353 f:\sp\public\sdk\inc\winuser.h -FILE 2354 f:\sp\public\sdk\inc\winnls.h -FILE 2355 f:\sp\public\sdk\inc\stralign.h -FILE 2356 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2357 f:\sp\public\sdk\inc\windef.h -FILE 2358 f:\sp\public\sdk\inc\tvout.h -FILE 2359 f:\sp\public\sdk\inc\winsvc.h -FILE 2360 f:\sp\public\sdk\inc\wingdi.h -FILE 2361 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2362 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2363 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2364 f:\sp\public\sdk\inc\winnt.h -FILE 2365 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2366 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2367 f:\sp\public\sdk\inc\winnetwk.h -FILE 2368 f:\sp\public\sdk\inc\imm.h -FILE 2369 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 2370 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2371 f:\sp\vctools\crt_bld\self_x86\crt\src\mlock.c -FILE 2372 f:\sp\public\sdk\inc\winbase.h -FILE 2373 f:\sp\public\sdk\inc\winerror.h -FILE 2374 f:\sp\public\sdk\inc\pshpack1.h -FILE 2375 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2376 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2377 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2378 f:\sp\public\sdk\inc\pshpack8.h -FILE 2379 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2380 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2381 f:\sp\public\sdk\inc\winver.h -FILE 2382 f:\sp\public\sdk\inc\ddbanned.h -FILE 2383 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2384 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2385 f:\sp\public\sdk\inc\pshpack2.h -FILE 2386 f:\sp\public\sdk\inc\winreg.h -FILE 2387 f:\sp\public\sdk\inc\guiddef.h -FILE 2388 f:\sp\public\sdk\inc\windows.h -FILE 2389 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2390 f:\sp\public\sdk\inc\specstrings.h -FILE 2391 f:\sp\public\sdk\inc\basetsd.h -FILE 2392 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2393 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2394 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2395 f:\sp\public\sdk\inc\pshpack4.h -FILE 2396 f:\sp\public\sdk\inc\poppack.h -FILE 2397 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2398 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2399 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2400 f:\sp\public\sdk\inc\winnetwk.h -FILE 2401 f:\sp\public\sdk\inc\imm.h -FILE 2402 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2403 f:\sp\public\sdk\inc\windef.h -FILE 2404 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2405 f:\sp\public\sdk\inc\pshpack1.h -FILE 2406 f:\sp\public\sdk\inc\winver.h -FILE 2407 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2408 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2409 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2410 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2411 f:\sp\public\sdk\inc\winnt.h -FILE 2412 f:\sp\vctools\crt_bld\self_x86\crt\src\cmsgs.h -FILE 2413 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2414 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2415 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2416 f:\sp\public\sdk\inc\winreg.h -FILE 2417 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2418 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0msg.c -FILE 2419 f:\sp\public\sdk\inc\winbase.h -FILE 2420 f:\sp\public\sdk\inc\winerror.h -FILE 2421 f:\sp\public\sdk\inc\pshpack8.h -FILE 2422 f:\sp\public\sdk\inc\reason.h -FILE 2423 f:\sp\public\sdk\inc\wincon.h -FILE 2424 f:\sp\public\sdk\inc\ddbanned.h -FILE 2425 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2426 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2427 f:\sp\public\sdk\inc\pshpack2.h -FILE 2428 f:\sp\public\sdk\inc\mcx.h -FILE 2429 f:\sp\public\sdk\inc\winuser.h -FILE 2430 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2431 f:\sp\public\sdk\inc\winnls.h -FILE 2432 f:\sp\public\sdk\inc\guiddef.h -FILE 2433 f:\sp\public\sdk\inc\windows.h -FILE 2434 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2435 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2436 f:\sp\public\sdk\inc\specstrings.h -FILE 2437 f:\sp\public\sdk\inc\basetsd.h -FILE 2438 f:\sp\public\sdk\inc\stralign.h -FILE 2439 f:\sp\public\sdk\inc\tvout.h -FILE 2440 f:\sp\public\sdk\inc\winsvc.h -FILE 2441 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2442 f:\sp\public\sdk\inc\wingdi.h -FILE 2443 f:\sp\public\sdk\inc\pshpack4.h -FILE 2444 f:\sp\public\sdk\inc\pshpack1.h -FILE 2445 f:\sp\public\sdk\inc\winver.h -FILE 2446 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2447 f:\sp\public\sdk\inc\winnt.h -FILE 2448 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2449 f:\sp\public\sdk\inc\winreg.h -FILE 2450 f:\sp\public\sdk\inc\winbase.h -FILE 2451 f:\sp\public\sdk\inc\winerror.h -FILE 2452 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2453 f:\sp\public\sdk\inc\pshpack8.h -FILE 2454 f:\sp\public\sdk\inc\reason.h -FILE 2455 f:\sp\public\sdk\inc\wincon.h -FILE 2456 f:\sp\public\sdk\inc\pshpack2.h -FILE 2457 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0init.c -FILE 2458 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2459 f:\sp\public\sdk\inc\mcx.h -FILE 2460 f:\sp\public\sdk\inc\winuser.h -FILE 2461 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2462 f:\sp\public\sdk\inc\winnls.h -FILE 2463 f:\sp\public\sdk\inc\guiddef.h -FILE 2464 f:\sp\public\sdk\inc\windows.h -FILE 2465 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2466 f:\sp\public\sdk\inc\specstrings.h -FILE 2467 f:\sp\public\sdk\inc\basetsd.h -FILE 2468 f:\sp\public\sdk\inc\stralign.h -FILE 2469 f:\sp\public\sdk\inc\tvout.h -FILE 2470 f:\sp\public\sdk\inc\winsvc.h -FILE 2471 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2472 f:\sp\public\sdk\inc\wingdi.h -FILE 2473 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2474 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2475 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2476 f:\sp\public\sdk\inc\pshpack4.h -FILE 2477 f:\sp\public\sdk\inc\ddbanned.h -FILE 2478 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2479 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2480 f:\sp\public\sdk\inc\poppack.h -FILE 2481 f:\sp\public\sdk\inc\winnetwk.h -FILE 2482 f:\sp\public\sdk\inc\imm.h -FILE 2483 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2484 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2485 f:\sp\public\sdk\inc\windef.h -FILE 2486 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2487 f:\sp\public\sdk\inc\poppack.h -FILE 2488 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2489 f:\sp\public\sdk\inc\winnetwk.h -FILE 2490 f:\sp\public\sdk\inc\imm.h -FILE 2491 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2492 f:\sp\public\sdk\inc\windef.h -FILE 2493 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2494 f:\sp\public\sdk\inc\pshpack1.h -FILE 2495 f:\sp\public\sdk\inc\winver.h -FILE 2496 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2497 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2498 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2499 f:\sp\public\sdk\inc\winnt.h -FILE 2500 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2501 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2502 f:\sp\public\sdk\inc\winreg.h -FILE 2503 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0fp.c -FILE 2504 f:\sp\public\sdk\inc\winbase.h -FILE 2505 f:\sp\public\sdk\inc\winerror.h -FILE 2506 f:\sp\public\sdk\inc\pshpack8.h -FILE 2507 f:\sp\public\sdk\inc\reason.h -FILE 2508 f:\sp\public\sdk\inc\wincon.h -FILE 2509 f:\sp\public\sdk\inc\ddbanned.h -FILE 2510 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2511 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2512 f:\sp\public\sdk\inc\pshpack2.h -FILE 2513 f:\sp\public\sdk\inc\mcx.h -FILE 2514 f:\sp\public\sdk\inc\winuser.h -FILE 2515 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2516 f:\sp\public\sdk\inc\winnls.h -FILE 2517 f:\sp\public\sdk\inc\guiddef.h -FILE 2518 f:\sp\public\sdk\inc\windows.h -FILE 2519 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2520 f:\sp\public\sdk\inc\specstrings.h -FILE 2521 f:\sp\public\sdk\inc\basetsd.h -FILE 2522 f:\sp\public\sdk\inc\stralign.h -FILE 2523 f:\sp\public\sdk\inc\tvout.h -FILE 2524 f:\sp\public\sdk\inc\winsvc.h -FILE 2525 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2526 f:\sp\public\sdk\inc\wingdi.h -FILE 2527 f:\sp\public\sdk\inc\pshpack4.h -FILE 2528 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 2529 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2530 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2531 f:\sp\public\sdk\inc\pshpack4.h -FILE 2532 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2533 f:\sp\public\sdk\inc\reason.h -FILE 2534 f:\sp\public\sdk\inc\wincon.h -FILE 2535 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2536 f:\sp\public\sdk\inc\poppack.h -FILE 2537 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2538 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2539 f:\sp\public\sdk\inc\mcx.h -FILE 2540 f:\sp\public\sdk\inc\winuser.h -FILE 2541 f:\sp\public\sdk\inc\winnls.h -FILE 2542 f:\sp\public\sdk\inc\stralign.h -FILE 2543 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2544 f:\sp\public\sdk\inc\windef.h -FILE 2545 f:\sp\public\sdk\inc\tvout.h -FILE 2546 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2547 f:\sp\public\sdk\inc\winsvc.h -FILE 2548 f:\sp\public\sdk\inc\wingdi.h -FILE 2549 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 2550 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 2551 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2552 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2553 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 2554 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2555 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2556 f:\sp\public\sdk\inc\winnt.h -FILE 2557 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2558 f:\sp\public\sdk\inc\winnetwk.h -FILE 2559 f:\sp\public\sdk\inc\imm.h -FILE 2560 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c -FILE 2561 f:\sp\public\sdk\inc\winbase.h -FILE 2562 f:\sp\public\sdk\inc\winerror.h -FILE 2563 f:\sp\public\sdk\inc\pshpack1.h -FILE 2564 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 2565 f:\sp\public\sdk\inc\pshpack8.h -FILE 2566 f:\sp\public\sdk\inc\winver.h -FILE 2567 f:\sp\public\sdk\inc\ddbanned.h -FILE 2568 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2569 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2570 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 2571 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2572 f:\sp\public\sdk\inc\pshpack2.h -FILE 2573 f:\sp\public\sdk\inc\winreg.h -FILE 2574 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2575 f:\sp\public\sdk\inc\guiddef.h -FILE 2576 f:\sp\public\sdk\inc\windows.h -FILE 2577 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2578 f:\sp\public\sdk\inc\specstrings.h -FILE 2579 f:\sp\public\sdk\inc\basetsd.h -FILE 2580 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2581 f:\sp\public\sdk\inc\tvout.h -FILE 2582 f:\sp\public\sdk\inc\winsvc.h -FILE 2583 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2584 f:\sp\public\sdk\inc\wingdi.h -FILE 2585 f:\sp\public\sdk\inc\pshpack4.h -FILE 2586 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2587 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2588 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 2589 f:\sp\public\sdk\inc\poppack.h -FILE 2590 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 2591 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2592 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2593 f:\sp\public\sdk\inc\winnetwk.h -FILE 2594 f:\sp\public\sdk\inc\imm.h -FILE 2595 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2596 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2597 f:\sp\public\sdk\inc\windef.h -FILE 2598 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2599 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2600 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 2601 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2602 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2603 f:\sp\public\sdk\inc\pshpack1.h -FILE 2604 f:\sp\public\sdk\inc\winver.h -FILE 2605 f:\sp\public\sdk\inc\winnt.h -FILE 2606 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2607 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2608 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c -FILE 2609 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2610 f:\sp\public\sdk\inc\winreg.h -FILE 2611 f:\sp\public\sdk\inc\winbase.h -FILE 2612 f:\sp\public\sdk\inc\winerror.h -FILE 2613 f:\sp\public\sdk\inc\ddbanned.h -FILE 2614 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2615 f:\sp\public\sdk\inc\pshpack8.h -FILE 2616 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2617 f:\sp\public\sdk\inc\reason.h -FILE 2618 f:\sp\public\sdk\inc\wincon.h -FILE 2619 f:\sp\public\sdk\inc\pshpack2.h -FILE 2620 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2621 f:\sp\public\sdk\inc\mcx.h -FILE 2622 f:\sp\public\sdk\inc\winuser.h -FILE 2623 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2624 f:\sp\public\sdk\inc\winnls.h -FILE 2625 f:\sp\public\sdk\inc\guiddef.h -FILE 2626 f:\sp\public\sdk\inc\windows.h -FILE 2627 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2628 f:\sp\public\sdk\inc\specstrings.h -FILE 2629 f:\sp\public\sdk\inc\basetsd.h -FILE 2630 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2631 f:\sp\public\sdk\inc\stralign.h -FILE 2632 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\alloca16.asm -FILE 2633 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 2634 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\chkstk.asm -FILE 2635 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 2636 f:\sp\public\sdk\inc\wincon.h -FILE 2637 f:\sp\public\sdk\inc\imm.h -FILE 2638 f:\sp\public\sdk\inc\winbase.h -FILE 2639 f:\sp\public\sdk\inc\wingdi.h -FILE 2640 f:\sp\public\sdk\inc\winver.h -FILE 2641 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 2642 f:\sp\public\sdk\inc\windows.h -FILE 2643 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 2644 f:\sp\public\sdk\inc\pshpack2.h -FILE 2645 f:\sp\public\sdk\inc\reason.h -FILE 2646 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\rtc\initsect.cpp -FILE 2647 f:\sp\public\sdk\inc\specstrings.h -FILE 2648 f:\sp\public\sdk\inc\basetsd.h -FILE 2649 f:\sp\public\sdk\inc\pshpack4.h -FILE 2650 f:\sp\public\sdk\inc\winnetwk.h -FILE 2651 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 2652 f:\sp\public\sdk\inc\stralign.h -FILE 2653 f:\sp\public\sdk\inc\poppack.h -FILE 2654 f:\sp\public\sdk\inc\winsvc.h -FILE 2655 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 2656 f:\sp\public\sdk\inc\windef.h -FILE 2657 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 2658 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 2659 f:\sp\public\sdk\inc\winuser.h -FILE 2660 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 2661 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 2662 f:\sp\public\sdk\inc\mcx.h -FILE 2663 f:\sp\public\sdk\inc\pshpack8.h -FILE 2664 f:\sp\public\sdk\inc\guiddef.h -FILE 2665 f:\sp\public\sdk\inc\winnt.h -FILE 2666 f:\sp\public\sdk\inc\winnls.h -FILE 2667 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 2668 f:\sp\public\sdk\inc\pshpack1.h -FILE 2669 f:\sp\public\sdk\inc\winerror.h -FILE 2670 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcapi.h -FILE 2671 f:\sp\public\sdk\inc\winreg.h -FILE 2672 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 2673 f:\sp\public\sdk\inc\ddbanned.h -FILE 2674 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 2675 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 2676 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcpriv.h -FILE 2677 f:\sp\public\sdk\inc\tvout.h -FILE 2678 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 2679 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 2680 f:\sp\public\sdk\inc\poppack.h -FILE 2681 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2682 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2683 f:\sp\public\sdk\inc\winnetwk.h -FILE 2684 f:\sp\public\sdk\inc\imm.h -FILE 2685 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2686 f:\sp\public\sdk\inc\windef.h -FILE 2687 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2688 f:\sp\public\sdk\inc\pshpack1.h -FILE 2689 f:\sp\public\sdk\inc\winver.h -FILE 2690 f:\sp\public\sdk\inc\windows.h -FILE 2691 f:\sp\public\sdk\inc\winnt.h -FILE 2692 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2693 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2694 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2695 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2696 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2697 f:\sp\public\sdk\inc\winreg.h -FILE 2698 f:\sp\public\sdk\inc\winbase.h -FILE 2699 f:\sp\vctools\crt_bld\self_x86\crt\src\wtombenv.c -FILE 2700 f:\sp\public\sdk\inc\winerror.h -FILE 2701 f:\sp\public\sdk\inc\pshpack8.h -FILE 2702 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2703 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2704 f:\sp\public\sdk\inc\reason.h -FILE 2705 f:\sp\public\sdk\inc\wincon.h -FILE 2706 f:\sp\public\sdk\inc\ddbanned.h -FILE 2707 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2708 f:\sp\public\sdk\inc\pshpack2.h -FILE 2709 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2710 f:\sp\public\sdk\inc\mcx.h -FILE 2711 f:\sp\public\sdk\inc\winuser.h -FILE 2712 f:\sp\public\sdk\inc\winnls.h -FILE 2713 f:\sp\public\sdk\inc\guiddef.h -FILE 2714 f:\sp\public\sdk\inc\specstrings.h -FILE 2715 f:\sp\public\sdk\inc\basetsd.h -FILE 2716 f:\sp\public\sdk\inc\stralign.h -FILE 2717 f:\sp\public\sdk\inc\tvout.h -FILE 2718 f:\sp\public\sdk\inc\winsvc.h -FILE 2719 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2720 f:\sp\public\sdk\inc\wingdi.h -FILE 2721 f:\sp\public\sdk\inc\pshpack4.h -FILE 2722 f:\sp\public\sdk\inc\winnt.h -FILE 2723 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2724 f:\sp\public\sdk\inc\winreg.h -FILE 2725 f:\sp\public\sdk\inc\winbase.h -FILE 2726 f:\sp\public\sdk\inc\winerror.h -FILE 2727 f:\sp\public\sdk\inc\pshpack8.h -FILE 2728 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2729 f:\sp\public\sdk\inc\reason.h -FILE 2730 f:\sp\public\sdk\inc\wincon.h -FILE 2731 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 2732 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2733 f:\sp\public\sdk\inc\pshpack2.h -FILE 2734 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2735 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2736 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2737 f:\sp\public\sdk\inc\mcx.h -FILE 2738 f:\sp\public\sdk\inc\winuser.h -FILE 2739 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2740 f:\sp\public\sdk\inc\winnls.h -FILE 2741 f:\sp\public\sdk\inc\guiddef.h -FILE 2742 f:\sp\public\sdk\inc\windows.h -FILE 2743 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2744 f:\sp\public\sdk\inc\specstrings.h -FILE 2745 f:\sp\public\sdk\inc\basetsd.h -FILE 2746 f:\sp\public\sdk\inc\stralign.h -FILE 2747 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2748 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 2749 f:\sp\public\sdk\inc\tvout.h -FILE 2750 f:\sp\public\sdk\inc\winsvc.h -FILE 2751 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2752 f:\sp\vctools\crt_bld\self_x86\crt\src\winxfltr.c -FILE 2753 f:\sp\public\sdk\inc\wingdi.h -FILE 2754 f:\sp\public\sdk\inc\pshpack4.h -FILE 2755 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2756 f:\sp\public\sdk\inc\poppack.h -FILE 2757 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2758 f:\sp\public\sdk\inc\winnetwk.h -FILE 2759 f:\sp\public\sdk\inc\imm.h -FILE 2760 f:\sp\public\sdk\inc\ddbanned.h -FILE 2761 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2762 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2763 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2764 f:\sp\public\sdk\inc\windef.h -FILE 2765 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 2766 f:\sp\public\sdk\inc\pshpack1.h -FILE 2767 f:\sp\public\sdk\inc\winver.h -FILE 2768 f:\sp\public\sdk\inc\winnetwk.h -FILE 2769 f:\sp\public\sdk\inc\imm.h -FILE 2770 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2771 f:\sp\public\sdk\inc\windef.h -FILE 2772 f:\sp\public\sdk\inc\pshpack1.h -FILE 2773 f:\sp\public\sdk\inc\winver.h -FILE 2774 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2775 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2776 f:\sp\public\sdk\inc\winnt.h -FILE 2777 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2778 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2779 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2780 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2781 f:\sp\public\sdk\inc\winreg.h -FILE 2782 f:\sp\public\sdk\inc\winbase.h -FILE 2783 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2784 f:\sp\public\sdk\inc\winerror.h -FILE 2785 f:\sp\vctools\crt_bld\self_x86\crt\src\winsig.c -FILE 2786 f:\sp\public\sdk\inc\pshpack8.h -FILE 2787 f:\sp\public\sdk\inc\reason.h -FILE 2788 f:\sp\public\sdk\inc\wincon.h -FILE 2789 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2790 f:\sp\public\sdk\inc\pshpack2.h -FILE 2791 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2792 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2793 f:\sp\public\sdk\inc\mcx.h -FILE 2794 f:\sp\public\sdk\inc\winuser.h -FILE 2795 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2796 f:\sp\public\sdk\inc\winnls.h -FILE 2797 f:\sp\public\sdk\inc\guiddef.h -FILE 2798 f:\sp\public\sdk\inc\windows.h -FILE 2799 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2800 f:\sp\public\sdk\inc\specstrings.h -FILE 2801 f:\sp\public\sdk\inc\ddbanned.h -FILE 2802 f:\sp\public\sdk\inc\basetsd.h -FILE 2803 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2804 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2805 f:\sp\public\sdk\inc\stralign.h -FILE 2806 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 2807 f:\sp\public\sdk\inc\tvout.h -FILE 2808 f:\sp\public\sdk\inc\winsvc.h -FILE 2809 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2810 f:\sp\public\sdk\inc\wingdi.h -FILE 2811 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 2812 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 2813 f:\sp\public\sdk\inc\pshpack4.h -FILE 2814 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2815 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2816 f:\sp\public\sdk\inc\poppack.h -FILE 2817 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2818 f:\sp\public\sdk\inc\wincon.h -FILE 2819 f:\sp\public\sdk\inc\imm.h -FILE 2820 f:\sp\public\sdk\inc\winbase.h -FILE 2821 f:\sp\public\sdk\inc\wingdi.h -FILE 2822 f:\sp\public\sdk\inc\winver.h -FILE 2823 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2824 f:\sp\public\sdk\inc\windows.h -FILE 2825 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2826 f:\sp\public\sdk\inc\pshpack2.h -FILE 2827 f:\sp\public\sdk\inc\reason.h -FILE 2828 f:\sp\vctools\crt_bld\self_x86\crt\src\w_str.c -FILE 2829 f:\sp\public\sdk\inc\specstrings.h -FILE 2830 f:\sp\public\sdk\inc\basetsd.h -FILE 2831 f:\sp\public\sdk\inc\pshpack4.h -FILE 2832 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2833 f:\sp\public\sdk\inc\winnetwk.h -FILE 2834 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2835 f:\sp\public\sdk\inc\stralign.h -FILE 2836 f:\sp\public\sdk\inc\poppack.h -FILE 2837 f:\sp\public\sdk\inc\winsvc.h -FILE 2838 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2839 f:\sp\public\sdk\inc\windef.h -FILE 2840 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2841 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2842 f:\sp\public\sdk\inc\winuser.h -FILE 2843 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2844 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2845 f:\sp\public\sdk\inc\mcx.h -FILE 2846 f:\sp\public\sdk\inc\pshpack8.h -FILE 2847 f:\sp\public\sdk\inc\guiddef.h -FILE 2848 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2849 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2850 f:\sp\public\sdk\inc\winnt.h -FILE 2851 f:\sp\public\sdk\inc\winnls.h -FILE 2852 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2853 f:\sp\public\sdk\inc\pshpack1.h -FILE 2854 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2855 f:\sp\public\sdk\inc\winerror.h -FILE 2856 f:\sp\public\sdk\inc\winreg.h -FILE 2857 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2858 f:\sp\public\sdk\inc\ddbanned.h -FILE 2859 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2860 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2861 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2862 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2863 f:\sp\public\sdk\inc\tvout.h -FILE 2864 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2865 f:\sp\public\sdk\inc\wincon.h -FILE 2866 f:\sp\public\sdk\inc\imm.h -FILE 2867 f:\sp\public\sdk\inc\winbase.h -FILE 2868 f:\sp\public\sdk\inc\wingdi.h -FILE 2869 f:\sp\public\sdk\inc\winver.h -FILE 2870 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2871 f:\sp\public\sdk\inc\windows.h -FILE 2872 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2873 f:\sp\public\sdk\inc\pshpack2.h -FILE 2874 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2875 f:\sp\public\sdk\inc\reason.h -FILE 2876 f:\sp\vctools\crt_bld\self_x86\crt\src\w_loc.c -FILE 2877 f:\sp\public\sdk\inc\specstrings.h -FILE 2878 f:\sp\public\sdk\inc\basetsd.h -FILE 2879 f:\sp\public\sdk\inc\pshpack4.h -FILE 2880 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2881 f:\sp\public\sdk\inc\winnetwk.h -FILE 2882 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2883 f:\sp\public\sdk\inc\stralign.h -FILE 2884 f:\sp\public\sdk\inc\poppack.h -FILE 2885 f:\sp\public\sdk\inc\winsvc.h -FILE 2886 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2887 f:\sp\public\sdk\inc\windef.h -FILE 2888 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2889 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2890 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2891 f:\sp\public\sdk\inc\winuser.h -FILE 2892 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2893 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2894 f:\sp\public\sdk\inc\mcx.h -FILE 2895 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2896 f:\sp\public\sdk\inc\pshpack8.h -FILE 2897 f:\sp\public\sdk\inc\guiddef.h -FILE 2898 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2899 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2900 f:\sp\public\sdk\inc\winnt.h -FILE 2901 f:\sp\public\sdk\inc\winnls.h -FILE 2902 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2903 f:\sp\public\sdk\inc\pshpack1.h -FILE 2904 f:\sp\public\sdk\inc\winerror.h -FILE 2905 f:\sp\public\sdk\inc\winreg.h -FILE 2906 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2907 f:\sp\public\sdk\inc\ddbanned.h -FILE 2908 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2909 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2910 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2911 f:\sp\public\sdk\inc\tvout.h -FILE 2912 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2913 f:\sp\public\sdk\inc\poppack.h -FILE 2914 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2915 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2916 f:\sp\public\sdk\inc\winnetwk.h -FILE 2917 f:\sp\public\sdk\inc\imm.h -FILE 2918 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2919 f:\sp\public\sdk\inc\windef.h -FILE 2920 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2921 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2922 f:\sp\public\sdk\inc\pshpack1.h -FILE 2923 f:\sp\public\sdk\inc\winver.h -FILE 2924 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2925 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2926 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2927 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2928 f:\sp\public\sdk\inc\winnt.h -FILE 2929 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2930 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2931 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2932 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2933 f:\sp\public\sdk\inc\winreg.h -FILE 2934 f:\sp\vctools\crt_bld\self_x86\crt\src\convrtcp.c -FILE 2935 f:\sp\public\sdk\inc\winbase.h -FILE 2936 f:\sp\public\sdk\inc\winerror.h -FILE 2937 f:\sp\public\sdk\inc\pshpack8.h -FILE 2938 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2939 f:\sp\public\sdk\inc\reason.h -FILE 2940 f:\sp\public\sdk\inc\wincon.h -FILE 2941 f:\sp\public\sdk\inc\ddbanned.h -FILE 2942 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2943 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2944 f:\sp\public\sdk\inc\pshpack2.h -FILE 2945 f:\sp\public\sdk\inc\mcx.h -FILE 2946 f:\sp\public\sdk\inc\winuser.h -FILE 2947 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2948 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 2949 f:\sp\public\sdk\inc\winnls.h -FILE 2950 f:\sp\public\sdk\inc\guiddef.h -FILE 2951 f:\sp\public\sdk\inc\windows.h -FILE 2952 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2953 f:\sp\public\sdk\inc\specstrings.h -FILE 2954 f:\sp\public\sdk\inc\basetsd.h -FILE 2955 f:\sp\public\sdk\inc\stralign.h -FILE 2956 f:\sp\public\sdk\inc\tvout.h -FILE 2957 f:\sp\public\sdk\inc\winsvc.h -FILE 2958 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2959 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2960 f:\sp\public\sdk\inc\wingdi.h -FILE 2961 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2962 f:\sp\public\sdk\inc\pshpack4.h -FILE 2963 f:\sp\public\sdk\inc\winerror.h -FILE 2964 f:\sp\public\sdk\inc\pshpack8.h -FILE 2965 f:\sp\public\sdk\inc\reason.h -FILE 2966 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2967 f:\sp\public\sdk\inc\wincon.h -FILE 2968 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2969 f:\sp\public\sdk\inc\pshpack2.h -FILE 2970 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2971 f:\sp\public\sdk\inc\mcx.h -FILE 2972 f:\sp\public\sdk\inc\winuser.h -FILE 2973 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2974 f:\sp\public\sdk\inc\winnls.h -FILE 2975 f:\sp\public\sdk\inc\guiddef.h -FILE 2976 f:\sp\public\sdk\inc\windows.h -FILE 2977 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2978 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2979 f:\sp\public\sdk\inc\specstrings.h -FILE 2980 f:\sp\public\sdk\inc\basetsd.h -FILE 2981 f:\sp\public\sdk\inc\stralign.h -FILE 2982 f:\sp\public\sdk\inc\tvout.h -FILE 2983 f:\sp\public\sdk\inc\winsvc.h -FILE 2984 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2985 f:\sp\public\sdk\inc\wingdi.h -FILE 2986 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2987 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2988 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2989 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2990 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2991 f:\sp\public\sdk\inc\pshpack4.h -FILE 2992 f:\sp\public\sdk\inc\poppack.h -FILE 2993 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2994 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2995 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.c -FILE 2996 f:\sp\public\sdk\inc\winnetwk.h -FILE 2997 f:\sp\public\sdk\inc\imm.h -FILE 2998 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2999 f:\sp\public\sdk\inc\windef.h -FILE 3000 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3001 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3002 f:\sp\public\sdk\inc\pshpack1.h -FILE 3003 f:\sp\public\sdk\inc\ddbanned.h -FILE 3004 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3005 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3006 f:\sp\public\sdk\inc\winver.h -FILE 3007 f:\sp\public\sdk\inc\winnt.h -FILE 3008 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3009 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3010 f:\sp\public\sdk\inc\winreg.h -FILE 3011 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3012 f:\sp\public\sdk\inc\winbase.h -FILE 3013 f:\sp\public\sdk\inc\poppack.h -FILE 3014 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 3015 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3016 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3017 f:\sp\public\sdk\inc\winnetwk.h -FILE 3018 f:\sp\public\sdk\inc\imm.h -FILE 3019 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3020 f:\sp\public\sdk\inc\windef.h -FILE 3021 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3022 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3023 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3024 f:\sp\public\sdk\inc\pshpack1.h -FILE 3025 f:\sp\public\sdk\inc\winver.h -FILE 3026 f:\sp\public\sdk\inc\windows.h -FILE 3027 f:\sp\public\sdk\inc\winnt.h -FILE 3028 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3029 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3030 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3031 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3032 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3033 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3034 f:\sp\public\sdk\inc\winreg.h -FILE 3035 f:\sp\public\sdk\inc\winbase.h -FILE 3036 f:\sp\vctools\crt_bld\self_x86\crt\src\setenv.c -FILE 3037 f:\sp\public\sdk\inc\winerror.h -FILE 3038 f:\sp\public\sdk\inc\pshpack8.h -FILE 3039 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3040 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3041 f:\sp\public\sdk\inc\reason.h -FILE 3042 f:\sp\public\sdk\inc\wincon.h -FILE 3043 f:\sp\public\sdk\inc\ddbanned.h -FILE 3044 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3045 f:\sp\public\sdk\inc\pshpack2.h -FILE 3046 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3047 f:\sp\public\sdk\inc\mcx.h -FILE 3048 f:\sp\public\sdk\inc\winuser.h -FILE 3049 f:\sp\public\sdk\inc\winnls.h -FILE 3050 f:\sp\public\sdk\inc\guiddef.h -FILE 3051 f:\sp\public\sdk\inc\specstrings.h -FILE 3052 f:\sp\public\sdk\inc\basetsd.h -FILE 3053 f:\sp\public\sdk\inc\stralign.h -FILE 3054 f:\sp\public\sdk\inc\tvout.h -FILE 3055 f:\sp\public\sdk\inc\winsvc.h -FILE 3056 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3057 f:\sp\public\sdk\inc\wingdi.h -FILE 3058 f:\sp\public\sdk\inc\pshpack4.h -FILE 3059 f:\sp\public\sdk\inc\poppack.h -FILE 3060 f:\sp\public\sdk\inc\winnetwk.h -FILE 3061 f:\sp\public\sdk\inc\imm.h -FILE 3062 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3063 f:\sp\public\sdk\inc\windef.h -FILE 3064 f:\sp\public\sdk\inc\pshpack1.h -FILE 3065 f:\sp\public\sdk\inc\winver.h -FILE 3066 f:\sp\public\sdk\inc\windows.h -FILE 3067 f:\sp\public\sdk\inc\winnt.h -FILE 3068 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3069 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3070 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3071 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3072 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3073 f:\sp\public\sdk\inc\winreg.h -FILE 3074 f:\sp\public\sdk\inc\winbase.h -FILE 3075 f:\sp\vctools\crt_bld\self_x86\crt\src\rand_s.c -FILE 3076 f:\sp\public\sdk\inc\winerror.h -FILE 3077 f:\sp\public\sdk\inc\pshpack8.h -FILE 3078 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3079 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3080 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3081 f:\sp\public\sdk\inc\reason.h -FILE 3082 f:\sp\public\sdk\inc\wincon.h -FILE 3083 f:\sp\public\sdk\inc\ddbanned.h -FILE 3084 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3085 f:\sp\public\sdk\inc\pshpack2.h -FILE 3086 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3087 f:\sp\public\sdk\inc\mcx.h -FILE 3088 f:\sp\public\sdk\inc\winuser.h -FILE 3089 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3090 f:\sp\public\sdk\inc\winnls.h -FILE 3091 f:\sp\public\sdk\inc\guiddef.h -FILE 3092 f:\sp\public\sdk\inc\specstrings.h -FILE 3093 f:\sp\public\sdk\inc\basetsd.h -FILE 3094 f:\sp\public\sdk\inc\stralign.h -FILE 3095 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3096 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3097 f:\sp\public\sdk\inc\tvout.h -FILE 3098 f:\sp\public\sdk\inc\winsvc.h -FILE 3099 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3100 f:\sp\public\sdk\inc\wingdi.h -FILE 3101 f:\sp\public\sdk\inc\pshpack4.h -FILE 3102 f:\sp\public\sdk\inc\poppack.h -FILE 3103 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3104 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3105 f:\sp\public\sdk\inc\winnetwk.h -FILE 3106 f:\sp\public\sdk\inc\imm.h -FILE 3107 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3108 f:\sp\public\sdk\inc\windef.h -FILE 3109 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3110 f:\sp\public\sdk\inc\pshpack1.h -FILE 3111 f:\sp\public\sdk\inc\winver.h -FILE 3112 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3113 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3114 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3115 f:\sp\public\sdk\inc\winnt.h -FILE 3116 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3117 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3118 f:\sp\public\sdk\inc\winreg.h -FILE 3119 f:\sp\vctools\crt_bld\self_x86\crt\src\purevirt.c -FILE 3120 f:\sp\public\sdk\inc\winbase.h -FILE 3121 f:\sp\public\sdk\inc\winerror.h -FILE 3122 f:\sp\public\sdk\inc\pshpack8.h -FILE 3123 f:\sp\public\sdk\inc\reason.h -FILE 3124 f:\sp\public\sdk\inc\wincon.h -FILE 3125 f:\sp\public\sdk\inc\ddbanned.h -FILE 3126 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3127 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3128 f:\sp\public\sdk\inc\pshpack2.h -FILE 3129 f:\sp\public\sdk\inc\mcx.h -FILE 3130 f:\sp\public\sdk\inc\winuser.h -FILE 3131 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3132 f:\sp\public\sdk\inc\winnls.h -FILE 3133 f:\sp\public\sdk\inc\guiddef.h -FILE 3134 f:\sp\public\sdk\inc\windows.h -FILE 3135 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3136 f:\sp\public\sdk\inc\specstrings.h -FILE 3137 f:\sp\public\sdk\inc\basetsd.h -FILE 3138 f:\sp\public\sdk\inc\stralign.h -FILE 3139 f:\sp\public\sdk\inc\tvout.h -FILE 3140 f:\sp\public\sdk\inc\winsvc.h -FILE 3141 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3142 f:\sp\public\sdk\inc\wingdi.h -FILE 3143 f:\sp\public\sdk\inc\pshpack4.h -FILE 3144 f:\sp\public\sdk\inc\poppack.h -FILE 3145 f:\sp\public\sdk\inc\winnetwk.h -FILE 3146 f:\sp\public\sdk\inc\imm.h -FILE 3147 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3148 f:\sp\public\sdk\inc\windef.h -FILE 3149 f:\sp\public\sdk\inc\pshpack1.h -FILE 3150 f:\sp\public\sdk\inc\winver.h -FILE 3151 f:\sp\public\sdk\inc\windows.h -FILE 3152 f:\sp\public\sdk\inc\winnt.h -FILE 3153 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3154 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3155 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3156 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3157 f:\sp\public\sdk\inc\winreg.h -FILE 3158 f:\sp\public\sdk\inc\winbase.h -FILE 3159 f:\sp\vctools\crt_bld\self_x86\crt\src\pesect.c -FILE 3160 f:\sp\public\sdk\inc\winerror.h -FILE 3161 f:\sp\public\sdk\inc\pshpack8.h -FILE 3162 f:\sp\public\sdk\inc\reason.h -FILE 3163 f:\sp\public\sdk\inc\wincon.h -FILE 3164 f:\sp\public\sdk\inc\ddbanned.h -FILE 3165 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3166 f:\sp\public\sdk\inc\pshpack2.h -FILE 3167 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3168 f:\sp\public\sdk\inc\mcx.h -FILE 3169 f:\sp\public\sdk\inc\winuser.h -FILE 3170 f:\sp\public\sdk\inc\winnls.h -FILE 3171 f:\sp\public\sdk\inc\guiddef.h -FILE 3172 f:\sp\public\sdk\inc\specstrings.h -FILE 3173 f:\sp\public\sdk\inc\basetsd.h -FILE 3174 f:\sp\public\sdk\inc\stralign.h -FILE 3175 f:\sp\public\sdk\inc\tvout.h -FILE 3176 f:\sp\public\sdk\inc\winsvc.h -FILE 3177 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3178 f:\sp\public\sdk\inc\wingdi.h -FILE 3179 f:\sp\public\sdk\inc\pshpack4.h -FILE 3180 f:\sp\public\sdk\inc\winerror.h -FILE 3181 f:\sp\public\sdk\inc\pshpack1.h -FILE 3182 f:\sp\public\sdk\inc\pshpack8.h -FILE 3183 f:\sp\public\sdk\inc\winver.h -FILE 3184 f:\sp\public\sdk\inc\pshpack2.h -FILE 3185 f:\sp\public\sdk\inc\winreg.h -FILE 3186 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3187 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3188 f:\sp\public\sdk\inc\guiddef.h -FILE 3189 f:\sp\public\sdk\inc\windows.h -FILE 3190 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3191 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 3192 f:\sp\public\sdk\inc\specstrings.h -FILE 3193 f:\sp\public\sdk\inc\basetsd.h -FILE 3194 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3195 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3196 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3197 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3198 f:\sp\public\sdk\inc\pshpack4.h -FILE 3199 f:\sp\public\sdk\inc\reason.h -FILE 3200 f:\sp\public\sdk\inc\wincon.h -FILE 3201 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3202 f:\sp\public\sdk\inc\poppack.h -FILE 3203 f:\sp\public\sdk\inc\mcx.h -FILE 3204 f:\sp\public\sdk\inc\winuser.h -FILE 3205 f:\sp\public\sdk\inc\winnls.h -FILE 3206 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata2.c -FILE 3207 f:\sp\public\sdk\inc\stralign.h -FILE 3208 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3209 f:\sp\public\sdk\inc\windef.h -FILE 3210 f:\sp\public\sdk\inc\tvout.h -FILE 3211 f:\sp\public\sdk\inc\winsvc.h -FILE 3212 f:\sp\public\sdk\inc\wingdi.h -FILE 3213 f:\sp\public\sdk\inc\ddbanned.h -FILE 3214 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3215 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3216 f:\sp\public\sdk\inc\winnt.h -FILE 3217 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3218 f:\sp\public\sdk\inc\winnetwk.h -FILE 3219 f:\sp\public\sdk\inc\imm.h -FILE 3220 f:\sp\public\sdk\inc\winbase.h -FILE 3221 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3222 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3223 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3224 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata1.c -FILE 3225 f:\sp\public\sdk\inc\ddbanned.h -FILE 3226 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3227 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3228 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3229 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 3230 f:\sp\public\sdk\inc\reason.h -FILE 3231 f:\sp\public\sdk\inc\wincon.h -FILE 3232 f:\sp\public\sdk\inc\pshpack2.h -FILE 3233 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3234 f:\sp\public\sdk\inc\mcx.h -FILE 3235 f:\sp\public\sdk\inc\winuser.h -FILE 3236 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3237 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3238 f:\sp\public\sdk\inc\winnls.h -FILE 3239 f:\sp\public\sdk\inc\guiddef.h -FILE 3240 f:\sp\public\sdk\inc\windows.h -FILE 3241 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3242 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3243 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3244 f:\sp\public\sdk\inc\specstrings.h -FILE 3245 f:\sp\public\sdk\inc\basetsd.h -FILE 3246 f:\sp\public\sdk\inc\stralign.h -FILE 3247 f:\sp\public\sdk\inc\tvout.h -FILE 3248 f:\sp\public\sdk\inc\winsvc.h -FILE 3249 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3250 f:\sp\public\sdk\inc\wingdi.h -FILE 3251 f:\sp\public\sdk\inc\pshpack4.h -FILE 3252 f:\sp\public\sdk\inc\poppack.h -FILE 3253 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 3254 f:\sp\public\sdk\inc\winnetwk.h -FILE 3255 f:\sp\public\sdk\inc\imm.h -FILE 3256 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3257 f:\sp\public\sdk\inc\windef.h -FILE 3258 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3259 f:\sp\vctools\crt_bld\self_x86\crt\src\onexit.c -FILE 3260 f:\sp\public\sdk\inc\pshpack1.h -FILE 3261 f:\sp\public\sdk\inc\winver.h -FILE 3262 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3263 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3264 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3265 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3266 f:\sp\public\sdk\inc\winnt.h -FILE 3267 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3268 f:\sp\public\sdk\inc\ddbanned.h -FILE 3269 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3270 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3271 f:\sp\public\sdk\inc\winreg.h -FILE 3272 f:\sp\public\sdk\inc\winbase.h -FILE 3273 f:\sp\public\sdk\inc\winerror.h -FILE 3274 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3275 f:\sp\public\sdk\inc\pshpack8.h -FILE 3276 f:\sp\public\sdk\inc\winbase.h -FILE 3277 f:\sp\public\sdk\inc\winerror.h -FILE 3278 f:\sp\public\sdk\inc\pshpack1.h -FILE 3279 f:\sp\public\sdk\inc\pshpack8.h -FILE 3280 f:\sp\public\sdk\inc\winver.h -FILE 3281 f:\sp\public\sdk\inc\pshpack2.h -FILE 3282 f:\sp\public\sdk\inc\winreg.h -FILE 3283 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3284 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3285 f:\sp\public\sdk\inc\guiddef.h -FILE 3286 f:\sp\public\sdk\inc\windows.h -FILE 3287 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3288 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3289 f:\sp\public\sdk\inc\specstrings.h -FILE 3290 f:\sp\public\sdk\inc\basetsd.h -FILE 3291 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3292 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3293 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3294 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3295 f:\sp\public\sdk\inc\pshpack4.h -FILE 3296 f:\sp\public\sdk\inc\reason.h -FILE 3297 f:\sp\public\sdk\inc\wincon.h -FILE 3298 f:\sp\public\sdk\inc\poppack.h -FILE 3299 f:\sp\public\sdk\inc\mcx.h -FILE 3300 f:\sp\public\sdk\inc\winuser.h -FILE 3301 f:\sp\public\sdk\inc\winnls.h -FILE 3302 f:\sp\vctools\crt_bld\self_x86\crt\src\lconv.c -FILE 3303 f:\sp\public\sdk\inc\stralign.h -FILE 3304 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3305 f:\sp\public\sdk\inc\windef.h -FILE 3306 f:\sp\public\sdk\inc\tvout.h -FILE 3307 f:\sp\public\sdk\inc\winsvc.h -FILE 3308 f:\sp\public\sdk\inc\wingdi.h -FILE 3309 f:\sp\public\sdk\inc\ddbanned.h -FILE 3310 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3311 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3312 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3313 f:\sp\public\sdk\inc\winnt.h -FILE 3314 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3315 f:\sp\public\sdk\inc\winnetwk.h -FILE 3316 f:\sp\public\sdk\inc\imm.h -FILE 3317 f:\sp\public\sdk\inc\guiddef.h -FILE 3318 f:\sp\public\sdk\inc\winnt.h -FILE 3319 f:\sp\public\sdk\inc\winnls.h -FILE 3320 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3321 f:\sp\public\sdk\inc\pshpack1.h -FILE 3322 f:\sp\public\sdk\inc\winerror.h -FILE 3323 f:\sp\public\sdk\inc\winreg.h -FILE 3324 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3325 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3326 f:\sp\public\sdk\inc\tvout.h -FILE 3327 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3328 f:\sp\vctools\crt_bld\self_x86\crt\src\invarg.c -FILE 3329 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3330 f:\sp\public\sdk\inc\wincon.h -FILE 3331 f:\sp\public\sdk\inc\imm.h -FILE 3332 f:\sp\public\sdk\inc\winbase.h -FILE 3333 f:\sp\public\sdk\inc\wingdi.h -FILE 3334 f:\sp\public\sdk\inc\winver.h -FILE 3335 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3336 f:\sp\public\sdk\inc\windows.h -FILE 3337 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3338 f:\sp\public\sdk\inc\pshpack2.h -FILE 3339 f:\sp\public\sdk\inc\reason.h -FILE 3340 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 3341 f:\sp\public\sdk\inc\specstrings.h -FILE 3342 f:\sp\public\sdk\inc\basetsd.h -FILE 3343 f:\sp\public\sdk\inc\pshpack4.h -FILE 3344 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3345 f:\sp\public\sdk\inc\winnetwk.h -FILE 3346 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3347 f:\sp\public\sdk\inc\stralign.h -FILE 3348 f:\sp\public\sdk\inc\poppack.h -FILE 3349 f:\sp\public\sdk\inc\winsvc.h -FILE 3350 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3351 f:\sp\public\sdk\inc\windef.h -FILE 3352 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3353 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3354 f:\sp\public\sdk\inc\winuser.h -FILE 3355 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3356 f:\sp\public\sdk\inc\ddbanned.h -FILE 3357 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3358 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3359 f:\sp\public\sdk\inc\mcx.h -FILE 3360 f:\sp\public\sdk\inc\pshpack8.h -FILE 3361 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3362 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3363 f:\sp\public\sdk\inc\pshpack4.h -FILE 3364 f:\sp\public\sdk\inc\poppack.h -FILE 3365 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3366 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3367 f:\sp\public\sdk\inc\winnetwk.h -FILE 3368 f:\sp\public\sdk\inc\imm.h -FILE 3369 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3370 f:\sp\public\sdk\inc\windef.h -FILE 3371 f:\sp\public\sdk\inc\pshpack1.h -FILE 3372 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3373 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3374 f:\sp\public\sdk\inc\winver.h -FILE 3375 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3376 f:\sp\public\sdk\inc\winnt.h -FILE 3377 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3378 f:\sp\public\sdk\inc\winreg.h -FILE 3379 f:\sp\vctools\crt_bld\self_x86\crt\src\inittime.c -FILE 3380 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3381 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3382 f:\sp\public\sdk\inc\winbase.h -FILE 3383 f:\sp\public\sdk\inc\winerror.h -FILE 3384 f:\sp\public\sdk\inc\pshpack8.h -FILE 3385 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3386 f:\sp\public\sdk\inc\reason.h -FILE 3387 f:\sp\public\sdk\inc\ddbanned.h -FILE 3388 f:\sp\public\sdk\inc\wincon.h -FILE 3389 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3390 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3391 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3392 f:\sp\public\sdk\inc\pshpack2.h -FILE 3393 f:\sp\public\sdk\inc\mcx.h -FILE 3394 f:\sp\public\sdk\inc\winuser.h -FILE 3395 f:\sp\public\sdk\inc\winnls.h -FILE 3396 f:\sp\public\sdk\inc\guiddef.h -FILE 3397 f:\sp\public\sdk\inc\stralign.h -FILE 3398 f:\sp\public\sdk\inc\specstrings.h -FILE 3399 f:\sp\public\sdk\inc\basetsd.h -FILE 3400 f:\sp\public\sdk\inc\windows.h -FILE 3401 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3402 f:\sp\public\sdk\inc\tvout.h -FILE 3403 f:\sp\public\sdk\inc\winsvc.h -FILE 3404 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3405 f:\sp\public\sdk\inc\wingdi.h -FILE 3406 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3407 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3408 f:\sp\public\sdk\inc\pshpack4.h -FILE 3409 f:\sp\public\sdk\inc\poppack.h -FILE 3410 f:\sp\public\sdk\inc\winnt.h -FILE 3411 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3412 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3413 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3414 f:\sp\public\sdk\inc\winnetwk.h -FILE 3415 f:\sp\public\sdk\inc\imm.h -FILE 3416 f:\sp\public\sdk\inc\pshpack1.h -FILE 3417 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3418 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3419 f:\sp\public\sdk\inc\winver.h -FILE 3420 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3421 f:\sp\public\sdk\inc\guiddef.h -FILE 3422 f:\sp\public\sdk\inc\specstrings.h -FILE 3423 f:\sp\public\sdk\inc\basetsd.h -FILE 3424 f:\sp\public\sdk\inc\windows.h -FILE 3425 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3426 f:\sp\public\sdk\inc\winreg.h -FILE 3427 f:\sp\vctools\crt_bld\self_x86\crt\src\initnum.c -FILE 3428 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 3429 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3430 f:\sp\public\sdk\inc\winbase.h -FILE 3431 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3432 f:\sp\public\sdk\inc\winerror.h -FILE 3433 f:\sp\public\sdk\inc\pshpack8.h -FILE 3434 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3435 f:\sp\public\sdk\inc\reason.h -FILE 3436 f:\sp\public\sdk\inc\ddbanned.h -FILE 3437 f:\sp\public\sdk\inc\wincon.h -FILE 3438 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3439 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3440 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3441 f:\sp\public\sdk\inc\pshpack2.h -FILE 3442 f:\sp\public\sdk\inc\mcx.h -FILE 3443 f:\sp\public\sdk\inc\winuser.h -FILE 3444 f:\sp\public\sdk\inc\winnls.h -FILE 3445 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3446 f:\sp\public\sdk\inc\windef.h -FILE 3447 f:\sp\public\sdk\inc\stralign.h -FILE 3448 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3449 f:\sp\public\sdk\inc\tvout.h -FILE 3450 f:\sp\public\sdk\inc\winsvc.h -FILE 3451 f:\sp\public\sdk\inc\wingdi.h -FILE 3452 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3453 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3454 f:\sp\public\sdk\inc\pshpack4.h -FILE 3455 f:\sp\public\sdk\inc\poppack.h -FILE 3456 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3457 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3458 f:\sp\public\sdk\inc\winnetwk.h -FILE 3459 f:\sp\public\sdk\inc\imm.h -FILE 3460 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3461 f:\sp\public\sdk\inc\windef.h -FILE 3462 f:\sp\public\sdk\inc\pshpack1.h -FILE 3463 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3464 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3465 f:\sp\public\sdk\inc\winver.h -FILE 3466 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3467 f:\sp\public\sdk\inc\winnt.h -FILE 3468 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3469 f:\sp\public\sdk\inc\winreg.h -FILE 3470 f:\sp\vctools\crt_bld\self_x86\crt\src\initmon.c -FILE 3471 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3472 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3473 f:\sp\public\sdk\inc\winbase.h -FILE 3474 f:\sp\public\sdk\inc\winerror.h -FILE 3475 f:\sp\public\sdk\inc\pshpack8.h -FILE 3476 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3477 f:\sp\public\sdk\inc\reason.h -FILE 3478 f:\sp\public\sdk\inc\ddbanned.h -FILE 3479 f:\sp\public\sdk\inc\wincon.h -FILE 3480 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3481 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3482 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3483 f:\sp\public\sdk\inc\pshpack2.h -FILE 3484 f:\sp\public\sdk\inc\mcx.h -FILE 3485 f:\sp\public\sdk\inc\winuser.h -FILE 3486 f:\sp\public\sdk\inc\winnls.h -FILE 3487 f:\sp\public\sdk\inc\guiddef.h -FILE 3488 f:\sp\public\sdk\inc\stralign.h -FILE 3489 f:\sp\public\sdk\inc\specstrings.h -FILE 3490 f:\sp\public\sdk\inc\basetsd.h -FILE 3491 f:\sp\public\sdk\inc\windows.h -FILE 3492 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3493 f:\sp\public\sdk\inc\tvout.h -FILE 3494 f:\sp\public\sdk\inc\winsvc.h -FILE 3495 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3496 f:\sp\public\sdk\inc\wingdi.h -FILE 3497 f:\sp\public\sdk\inc\winbase.h -FILE 3498 f:\sp\public\sdk\inc\winerror.h -FILE 3499 f:\sp\public\sdk\inc\pshpack1.h -FILE 3500 f:\sp\public\sdk\inc\pshpack8.h -FILE 3501 f:\sp\public\sdk\inc\winver.h -FILE 3502 f:\sp\public\sdk\inc\pshpack2.h -FILE 3503 f:\sp\public\sdk\inc\winreg.h -FILE 3504 f:\sp\public\sdk\inc\guiddef.h -FILE 3505 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3506 f:\sp\public\sdk\inc\specstrings.h -FILE 3507 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3508 f:\sp\public\sdk\inc\basetsd.h -FILE 3509 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3510 f:\sp\public\sdk\inc\windows.h -FILE 3511 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3512 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3513 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3514 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3515 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3516 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3517 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3518 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3519 f:\sp\public\sdk\inc\pshpack4.h -FILE 3520 f:\sp\public\sdk\inc\reason.h -FILE 3521 f:\sp\public\sdk\inc\wincon.h -FILE 3522 f:\sp\public\sdk\inc\poppack.h -FILE 3523 f:\sp\vctools\crt_bld\self_x86\crt\src\inithelp.c -FILE 3524 f:\sp\public\sdk\inc\mcx.h -FILE 3525 f:\sp\public\sdk\inc\winuser.h -FILE 3526 f:\sp\public\sdk\inc\winnls.h -FILE 3527 f:\sp\public\sdk\inc\stralign.h -FILE 3528 f:\sp\public\sdk\inc\tvout.h -FILE 3529 f:\sp\public\sdk\inc\winsvc.h -FILE 3530 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3531 f:\sp\public\sdk\inc\wingdi.h -FILE 3532 f:\sp\public\sdk\inc\windef.h -FILE 3533 f:\sp\public\sdk\inc\ddbanned.h -FILE 3534 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3535 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3536 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3537 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3538 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3539 f:\sp\public\sdk\inc\winnetwk.h -FILE 3540 f:\sp\public\sdk\inc\imm.h -FILE 3541 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3542 f:\sp\public\sdk\inc\winnt.h -FILE 3543 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3544 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3545 f:\sp\public\sdk\inc\pshpack4.h -FILE 3546 f:\sp\public\sdk\inc\poppack.h -FILE 3547 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3548 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3549 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3550 f:\sp\public\sdk\inc\winnetwk.h -FILE 3551 f:\sp\public\sdk\inc\imm.h -FILE 3552 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3553 f:\sp\public\sdk\inc\windef.h -FILE 3554 f:\sp\public\sdk\inc\pshpack1.h -FILE 3555 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3556 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3557 f:\sp\public\sdk\inc\winver.h -FILE 3558 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3559 f:\sp\public\sdk\inc\winnt.h -FILE 3560 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3561 f:\sp\public\sdk\inc\winreg.h -FILE 3562 f:\sp\vctools\crt_bld\self_x86\crt\src\initctyp.c -FILE 3563 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3564 f:\sp\public\sdk\inc\winbase.h -FILE 3565 f:\sp\public\sdk\inc\winerror.h -FILE 3566 f:\sp\public\sdk\inc\pshpack8.h -FILE 3567 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3568 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3569 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3570 f:\sp\public\sdk\inc\reason.h -FILE 3571 f:\sp\public\sdk\inc\ddbanned.h -FILE 3572 f:\sp\public\sdk\inc\wincon.h -FILE 3573 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3574 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3575 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3576 f:\sp\public\sdk\inc\pshpack2.h -FILE 3577 f:\sp\public\sdk\inc\mcx.h -FILE 3578 f:\sp\public\sdk\inc\winuser.h -FILE 3579 f:\sp\public\sdk\inc\winnls.h -FILE 3580 f:\sp\public\sdk\inc\guiddef.h -FILE 3581 f:\sp\public\sdk\inc\stralign.h -FILE 3582 f:\sp\public\sdk\inc\specstrings.h -FILE 3583 f:\sp\public\sdk\inc\basetsd.h -FILE 3584 f:\sp\public\sdk\inc\windows.h -FILE 3585 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3586 f:\sp\public\sdk\inc\tvout.h -FILE 3587 f:\sp\public\sdk\inc\winsvc.h -FILE 3588 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3589 f:\sp\public\sdk\inc\wingdi.h -FILE 3590 f:\sp\public\sdk\inc\poppack.h -FILE 3591 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3592 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3593 f:\sp\public\sdk\inc\winnetwk.h -FILE 3594 f:\sp\public\sdk\inc\imm.h -FILE 3595 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3596 f:\sp\public\sdk\inc\windef.h -FILE 3597 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3598 f:\sp\public\sdk\inc\pshpack1.h -FILE 3599 f:\sp\public\sdk\inc\winver.h -FILE 3600 f:\sp\public\sdk\inc\windows.h -FILE 3601 f:\sp\public\sdk\inc\winnt.h -FILE 3602 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3603 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3604 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3605 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3606 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3607 f:\sp\public\sdk\inc\winreg.h -FILE 3608 f:\sp\public\sdk\inc\winbase.h -FILE 3609 f:\sp\vctools\crt_bld\self_x86\crt\src\initcrit.c -FILE 3610 f:\sp\public\sdk\inc\winerror.h -FILE 3611 f:\sp\public\sdk\inc\pshpack8.h -FILE 3612 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3613 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3614 f:\sp\public\sdk\inc\reason.h -FILE 3615 f:\sp\public\sdk\inc\wincon.h -FILE 3616 f:\sp\public\sdk\inc\ddbanned.h -FILE 3617 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3618 f:\sp\public\sdk\inc\pshpack2.h -FILE 3619 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3620 f:\sp\public\sdk\inc\mcx.h -FILE 3621 f:\sp\public\sdk\inc\winuser.h -FILE 3622 f:\sp\public\sdk\inc\winnls.h -FILE 3623 f:\sp\public\sdk\inc\guiddef.h -FILE 3624 f:\sp\public\sdk\inc\specstrings.h -FILE 3625 f:\sp\public\sdk\inc\basetsd.h -FILE 3626 f:\sp\public\sdk\inc\stralign.h -FILE 3627 f:\sp\public\sdk\inc\tvout.h -FILE 3628 f:\sp\public\sdk\inc\winsvc.h -FILE 3629 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3630 f:\sp\public\sdk\inc\wingdi.h -FILE 3631 f:\sp\public\sdk\inc\pshpack4.h -FILE 3632 f:\sp\public\sdk\inc\poppack.h -FILE 3633 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3634 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3635 f:\sp\public\sdk\inc\winnetwk.h -FILE 3636 f:\sp\public\sdk\inc\imm.h -FILE 3637 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3638 f:\sp\public\sdk\inc\windef.h -FILE 3639 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3640 f:\sp\public\sdk\inc\pshpack1.h -FILE 3641 f:\sp\public\sdk\inc\winver.h -FILE 3642 f:\sp\public\sdk\inc\windows.h -FILE 3643 f:\sp\public\sdk\inc\winnt.h -FILE 3644 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3645 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3646 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3647 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3648 f:\sp\public\sdk\inc\winreg.h -FILE 3649 f:\sp\public\sdk\inc\winbase.h -FILE 3650 f:\sp\vctools\crt_bld\self_x86\crt\src\initcoll.c -FILE 3651 f:\sp\public\sdk\inc\winerror.h -FILE 3652 f:\sp\public\sdk\inc\pshpack8.h -FILE 3653 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3654 f:\sp\public\sdk\inc\reason.h -FILE 3655 f:\sp\public\sdk\inc\wincon.h -FILE 3656 f:\sp\public\sdk\inc\ddbanned.h -FILE 3657 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3658 f:\sp\public\sdk\inc\pshpack2.h -FILE 3659 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3660 f:\sp\public\sdk\inc\mcx.h -FILE 3661 f:\sp\public\sdk\inc\winuser.h -FILE 3662 f:\sp\public\sdk\inc\winnls.h -FILE 3663 f:\sp\public\sdk\inc\guiddef.h -FILE 3664 f:\sp\public\sdk\inc\specstrings.h -FILE 3665 f:\sp\public\sdk\inc\basetsd.h -FILE 3666 f:\sp\public\sdk\inc\stralign.h -FILE 3667 f:\sp\public\sdk\inc\tvout.h -FILE 3668 f:\sp\public\sdk\inc\winsvc.h -FILE 3669 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3670 f:\sp\public\sdk\inc\wingdi.h -FILE 3671 f:\sp\public\sdk\inc\pshpack4.h -FILE 3672 f:\sp\public\sdk\inc\poppack.h -FILE 3673 f:\sp\public\sdk\inc\winnetwk.h -FILE 3674 f:\sp\public\sdk\inc\imm.h -FILE 3675 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3676 f:\sp\public\sdk\inc\windef.h -FILE 3677 f:\binaries.x86ret\vcboot\inc\mm3dnow.h -FILE 3678 f:\sp\public\sdk\inc\pshpack1.h -FILE 3679 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3680 f:\sp\public\sdk\inc\winver.h -FILE 3681 f:\sp\public\sdk\inc\windows.h -FILE 3682 f:\sp\public\sdk\inc\winnt.h -FILE 3683 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3684 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3685 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3686 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3687 f:\sp\public\sdk\inc\winreg.h -FILE 3688 f:\sp\public\sdk\inc\winbase.h -FILE 3689 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_support.c -FILE 3690 f:\sp\public\sdk\inc\winerror.h -FILE 3691 f:\sp\public\sdk\inc\pshpack8.h -FILE 3692 f:\sp\vctools\crt_bld\self_x86\crt\src\intrin.h -FILE 3693 f:\sp\vctools\crt_bld\self_x86\crt\src\setjmp.h -FILE 3694 f:\sp\public\sdk\inc\reason.h -FILE 3695 f:\sp\public\sdk\inc\wincon.h -FILE 3696 f:\sp\public\sdk\inc\ddbanned.h -FILE 3697 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3698 f:\sp\public\sdk\inc\pshpack2.h -FILE 3699 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3700 f:\sp\public\sdk\inc\mcx.h -FILE 3701 f:\sp\public\sdk\inc\winuser.h -FILE 3702 f:\sp\public\sdk\inc\winnls.h -FILE 3703 f:\sp\public\sdk\inc\guiddef.h -FILE 3704 f:\sp\public\sdk\inc\specstrings.h -FILE 3705 f:\sp\public\sdk\inc\basetsd.h -FILE 3706 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3707 f:\sp\public\sdk\inc\stralign.h -FILE 3708 f:\sp\public\sdk\inc\tvout.h -FILE 3709 f:\sp\public\sdk\inc\winsvc.h -FILE 3710 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3711 f:\sp\public\sdk\inc\wingdi.h -FILE 3712 f:\binaries.x86ret\vcboot\inc\emmintrin.h -FILE 3713 f:\binaries.x86ret\vcboot\inc\xmmintrin.h -FILE 3714 f:\binaries.x86ret\vcboot\inc\mmintrin.h -FILE 3715 f:\sp\public\sdk\inc\pshpack4.h -FILE 3716 f:\sp\public\sdk\inc\poppack.h -FILE 3717 f:\sp\public\sdk\inc\winnetwk.h -FILE 3718 f:\sp\public\sdk\inc\imm.h -FILE 3719 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3720 f:\sp\public\sdk\inc\windef.h -FILE 3721 f:\sp\public\sdk\inc\pshpack1.h -FILE 3722 f:\sp\public\sdk\inc\winver.h -FILE 3723 f:\sp\public\sdk\inc\windows.h -FILE 3724 f:\sp\public\sdk\inc\winnt.h -FILE 3725 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3726 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3727 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3728 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3729 f:\sp\public\sdk\inc\winreg.h -FILE 3730 f:\sp\public\sdk\inc\winbase.h -FILE 3731 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_report.c -FILE 3732 f:\sp\public\sdk\inc\winerror.h -FILE 3733 f:\sp\public\sdk\inc\pshpack8.h -FILE 3734 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3735 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3736 f:\sp\public\sdk\inc\reason.h -FILE 3737 f:\sp\public\sdk\inc\wincon.h -FILE 3738 f:\sp\public\sdk\inc\ddbanned.h -FILE 3739 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3740 f:\sp\public\sdk\inc\pshpack2.h -FILE 3741 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3742 f:\sp\public\sdk\inc\mcx.h -FILE 3743 f:\sp\public\sdk\inc\winuser.h -FILE 3744 f:\sp\public\sdk\inc\winnls.h -FILE 3745 f:\sp\public\sdk\inc\guiddef.h -FILE 3746 f:\sp\public\sdk\inc\specstrings.h -FILE 3747 f:\sp\public\sdk\inc\basetsd.h -FILE 3748 f:\sp\public\sdk\inc\stralign.h -FILE 3749 f:\sp\public\sdk\inc\tvout.h -FILE 3750 f:\sp\public\sdk\inc\winsvc.h -FILE 3751 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3752 f:\sp\public\sdk\inc\wingdi.h -FILE 3753 f:\sp\public\sdk\inc\pshpack4.h -FILE 3754 f:\sp\public\sdk\inc\poppack.h -FILE 3755 f:\sp\public\sdk\inc\winnetwk.h -FILE 3756 f:\sp\public\sdk\inc\imm.h -FILE 3757 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3758 f:\sp\public\sdk\inc\windef.h -FILE 3759 f:\sp\public\sdk\inc\pshpack1.h -FILE 3760 f:\sp\public\sdk\inc\winver.h -FILE 3761 f:\sp\public\sdk\inc\windows.h -FILE 3762 f:\sp\public\sdk\inc\winnt.h -FILE 3763 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3764 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3765 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3766 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3767 f:\sp\public\sdk\inc\winreg.h -FILE 3768 f:\sp\public\sdk\inc\winbase.h -FILE 3769 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_cookie.c -FILE 3770 f:\sp\public\sdk\inc\winerror.h -FILE 3771 f:\sp\public\sdk\inc\pshpack8.h -FILE 3772 f:\sp\public\sdk\inc\reason.h -FILE 3773 f:\sp\public\sdk\inc\wincon.h -FILE 3774 f:\sp\public\sdk\inc\ddbanned.h -FILE 3775 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3776 f:\sp\public\sdk\inc\pshpack2.h -FILE 3777 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3778 f:\sp\public\sdk\inc\mcx.h -FILE 3779 f:\sp\public\sdk\inc\winuser.h -FILE 3780 f:\sp\public\sdk\inc\winnls.h -FILE 3781 f:\sp\public\sdk\inc\guiddef.h -FILE 3782 f:\sp\public\sdk\inc\specstrings.h -FILE 3783 f:\sp\public\sdk\inc\basetsd.h -FILE 3784 f:\sp\public\sdk\inc\stralign.h -FILE 3785 f:\sp\public\sdk\inc\tvout.h -FILE 3786 f:\sp\public\sdk\inc\winsvc.h -FILE 3787 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3788 f:\sp\public\sdk\inc\wingdi.h -FILE 3789 f:\sp\public\sdk\inc\pshpack4.h -FILE 3790 f:\sp\public\sdk\inc\winerror.h -FILE 3791 f:\sp\public\sdk\inc\pshpack1.h -FILE 3792 f:\sp\public\sdk\inc\pshpack8.h -FILE 3793 f:\sp\public\sdk\inc\winver.h -FILE 3794 f:\sp\public\sdk\inc\pshpack2.h -FILE 3795 f:\sp\public\sdk\inc\winreg.h -FILE 3796 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3797 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3798 f:\sp\public\sdk\inc\guiddef.h -FILE 3799 f:\sp\public\sdk\inc\windows.h -FILE 3800 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3801 f:\sp\public\sdk\inc\specstrings.h -FILE 3802 f:\sp\public\sdk\inc\basetsd.h -FILE 3803 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3804 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3805 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3806 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3807 f:\sp\public\sdk\inc\pshpack4.h -FILE 3808 f:\sp\public\sdk\inc\reason.h -FILE 3809 f:\sp\public\sdk\inc\wincon.h -FILE 3810 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3811 f:\sp\public\sdk\inc\poppack.h -FILE 3812 f:\sp\public\sdk\inc\mcx.h -FILE 3813 f:\sp\public\sdk\inc\winuser.h -FILE 3814 f:\sp\public\sdk\inc\winnls.h -FILE 3815 f:\sp\vctools\crt_bld\self_x86\crt\src\glstatus.c -FILE 3816 f:\sp\public\sdk\inc\stralign.h -FILE 3817 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3818 f:\sp\public\sdk\inc\windef.h -FILE 3819 f:\sp\public\sdk\inc\tvout.h -FILE 3820 f:\sp\public\sdk\inc\winsvc.h -FILE 3821 f:\sp\public\sdk\inc\wingdi.h -FILE 3822 f:\sp\public\sdk\inc\ddbanned.h -FILE 3823 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3824 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3825 f:\sp\public\sdk\inc\winnt.h -FILE 3826 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3827 f:\sp\public\sdk\inc\winnetwk.h -FILE 3828 f:\sp\public\sdk\inc\imm.h -FILE 3829 f:\sp\public\sdk\inc\winbase.h -FILE 3830 f:\sp\public\sdk\inc\pshpack4.h -FILE 3831 f:\sp\public\sdk\inc\poppack.h -FILE 3832 f:\sp\public\sdk\inc\winnt.h -FILE 3833 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3834 f:\sp\public\sdk\inc\winnetwk.h -FILE 3835 f:\sp\public\sdk\inc\imm.h -FILE 3836 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3837 f:\sp\public\sdk\inc\pshpack1.h -FILE 3838 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3839 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3840 f:\sp\public\sdk\inc\winver.h -FILE 3841 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3842 f:\sp\public\sdk\inc\guiddef.h -FILE 3843 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3844 f:\sp\public\sdk\inc\specstrings.h -FILE 3845 f:\sp\public\sdk\inc\basetsd.h -FILE 3846 f:\sp\public\sdk\inc\windows.h -FILE 3847 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3848 f:\sp\public\sdk\inc\winreg.h -FILE 3849 f:\sp\vctools\crt_bld\self_x86\crt\src\getqloc.c -FILE 3850 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3851 f:\sp\public\sdk\inc\winbase.h -FILE 3852 f:\sp\public\sdk\inc\winerror.h -FILE 3853 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3854 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3855 f:\sp\public\sdk\inc\pshpack8.h -FILE 3856 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3857 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3858 f:\sp\public\sdk\inc\reason.h -FILE 3859 f:\sp\public\sdk\inc\ddbanned.h -FILE 3860 f:\sp\public\sdk\inc\wincon.h -FILE 3861 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3862 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3863 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3864 f:\sp\public\sdk\inc\pshpack2.h -FILE 3865 f:\sp\public\sdk\inc\mcx.h -FILE 3866 f:\sp\public\sdk\inc\winuser.h -FILE 3867 f:\sp\public\sdk\inc\winnls.h -FILE 3868 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3869 f:\sp\public\sdk\inc\windef.h -FILE 3870 f:\sp\public\sdk\inc\stralign.h -FILE 3871 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3872 f:\sp\public\sdk\inc\tvout.h -FILE 3873 f:\sp\public\sdk\inc\winsvc.h -FILE 3874 f:\sp\public\sdk\inc\wingdi.h -FILE 3875 f:\sp\public\sdk\inc\reason.h -FILE 3876 f:\sp\public\sdk\inc\wincon.h -FILE 3877 f:\sp\public\sdk\inc\pshpack2.h -FILE 3878 f:\sp\public\sdk\inc\mcx.h -FILE 3879 f:\sp\public\sdk\inc\winuser.h -FILE 3880 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3881 f:\sp\public\sdk\inc\winnls.h -FILE 3882 f:\sp\public\sdk\inc\guiddef.h -FILE 3883 f:\sp\public\sdk\inc\windows.h -FILE 3884 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3885 f:\sp\public\sdk\inc\specstrings.h -FILE 3886 f:\sp\public\sdk\inc\basetsd.h -FILE 3887 f:\sp\public\sdk\inc\stralign.h -FILE 3888 f:\sp\public\sdk\inc\tvout.h -FILE 3889 f:\sp\public\sdk\inc\winsvc.h -FILE 3890 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3891 f:\sp\public\sdk\inc\wingdi.h -FILE 3892 f:\sp\public\sdk\inc\pshpack4.h -FILE 3893 f:\sp\public\sdk\inc\poppack.h -FILE 3894 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 3895 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3896 f:\sp\public\sdk\inc\winnetwk.h -FILE 3897 f:\sp\public\sdk\inc\imm.h -FILE 3898 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3899 f:\sp\public\sdk\inc\windef.h -FILE 3900 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 3901 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3902 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3903 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3904 f:\sp\vctools\crt_bld\self_x86\crt\src\getenv.c -FILE 3905 f:\sp\public\sdk\inc\pshpack1.h -FILE 3906 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3907 f:\sp\public\sdk\inc\winver.h -FILE 3908 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3909 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3910 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3911 f:\sp\public\sdk\inc\winnt.h -FILE 3912 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3913 f:\sp\public\sdk\inc\ddbanned.h -FILE 3914 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3915 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3916 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3917 f:\sp\public\sdk\inc\winreg.h -FILE 3918 f:\sp\public\sdk\inc\winbase.h -FILE 3919 f:\sp\public\sdk\inc\winerror.h -FILE 3920 f:\sp\public\sdk\inc\pshpack8.h -FILE 3921 f:\sp\public\sdk\inc\poppack.h -FILE 3922 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3923 f:\sp\public\sdk\inc\winnetwk.h -FILE 3924 f:\sp\public\sdk\inc\imm.h -FILE 3925 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3926 f:\sp\public\sdk\inc\windef.h -FILE 3927 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3928 f:\sp\public\sdk\inc\pshpack1.h -FILE 3929 f:\sp\public\sdk\inc\winver.h -FILE 3930 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3931 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3932 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3933 f:\sp\public\sdk\inc\winnt.h -FILE 3934 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3935 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3936 f:\sp\public\sdk\inc\winreg.h -FILE 3937 f:\sp\vctools\crt_bld\self_x86\crt\src\errmode.c -FILE 3938 f:\sp\public\sdk\inc\winbase.h -FILE 3939 f:\sp\public\sdk\inc\winerror.h -FILE 3940 f:\sp\public\sdk\inc\pshpack8.h -FILE 3941 f:\sp\public\sdk\inc\reason.h -FILE 3942 f:\sp\public\sdk\inc\wincon.h -FILE 3943 f:\sp\public\sdk\inc\ddbanned.h -FILE 3944 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3945 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3946 f:\sp\public\sdk\inc\pshpack2.h -FILE 3947 f:\sp\public\sdk\inc\mcx.h -FILE 3948 f:\sp\public\sdk\inc\winuser.h -FILE 3949 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3950 f:\sp\public\sdk\inc\winnls.h -FILE 3951 f:\sp\public\sdk\inc\guiddef.h -FILE 3952 f:\sp\public\sdk\inc\windows.h -FILE 3953 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3954 f:\sp\public\sdk\inc\specstrings.h -FILE 3955 f:\sp\public\sdk\inc\basetsd.h -FILE 3956 f:\sp\public\sdk\inc\stralign.h -FILE 3957 f:\sp\public\sdk\inc\tvout.h -FILE 3958 f:\sp\public\sdk\inc\winsvc.h -FILE 3959 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3960 f:\sp\public\sdk\inc\wingdi.h -FILE 3961 f:\sp\public\sdk\inc\pshpack4.h -FILE 3962 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3963 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3964 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3965 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3966 f:\sp\vctools\crt_bld\self_x86\crt\src\dbghook.c -FILE 3967 f:\sp\public\sdk\inc\ddbanned.h -FILE 3968 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3969 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3970 f:\sp\public\sdk\inc\poppack.h -FILE 3971 f:\sp\public\sdk\inc\winnetwk.h -FILE 3972 f:\sp\public\sdk\inc\imm.h -FILE 3973 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3974 f:\sp\public\sdk\inc\windef.h -FILE 3975 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3976 f:\sp\public\sdk\inc\pshpack1.h -FILE 3977 f:\sp\public\sdk\inc\winver.h -FILE 3978 f:\sp\public\sdk\inc\windows.h -FILE 3979 f:\sp\public\sdk\inc\winnt.h -FILE 3980 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3981 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3982 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3983 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3984 f:\sp\public\sdk\inc\winreg.h -FILE 3985 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 3986 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.c -FILE 3987 f:\sp\public\sdk\inc\winbase.h -FILE 3988 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 3989 f:\sp\public\sdk\inc\winerror.h -FILE 3990 f:\sp\public\sdk\inc\pshpack8.h -FILE 3991 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3992 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3993 f:\sp\public\sdk\inc\reason.h -FILE 3994 f:\sp\public\sdk\inc\wincon.h -FILE 3995 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3996 f:\sp\public\sdk\inc\ddbanned.h -FILE 3997 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3998 f:\sp\public\sdk\inc\pshpack2.h -FILE 3999 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4000 f:\sp\public\sdk\inc\mcx.h -FILE 4001 f:\sp\public\sdk\inc\winuser.h -FILE 4002 f:\sp\public\sdk\inc\winnls.h -FILE 4003 f:\sp\public\sdk\inc\guiddef.h -FILE 4004 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4005 f:\sp\public\sdk\inc\specstrings.h -FILE 4006 f:\sp\public\sdk\inc\basetsd.h -FILE 4007 f:\sp\public\sdk\inc\stralign.h -FILE 4008 f:\sp\public\sdk\inc\tvout.h -FILE 4009 f:\sp\public\sdk\inc\winsvc.h -FILE 4010 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4011 f:\sp\public\sdk\inc\wingdi.h -FILE 4012 f:\sp\public\sdk\inc\pshpack4.h -FILE 4013 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4014 f:\sp\public\sdk\inc\mcx.h -FILE 4015 f:\sp\public\sdk\inc\winuser.h -FILE 4016 f:\sp\public\sdk\inc\winnls.h -FILE 4017 f:\sp\public\sdk\inc\stralign.h -FILE 4018 f:\sp\public\sdk\inc\tvout.h -FILE 4019 f:\sp\public\sdk\inc\winsvc.h -FILE 4020 f:\sp\public\sdk\inc\wingdi.h -FILE 4021 f:\sp\public\sdk\inc\pshpack4.h -FILE 4022 f:\sp\public\sdk\inc\winnt.h -FILE 4023 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4024 f:\sp\public\sdk\inc\poppack.h -FILE 4025 f:\sp\public\sdk\inc\winnetwk.h -FILE 4026 f:\sp\public\sdk\inc\imm.h -FILE 4027 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 4028 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4029 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4030 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4031 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4032 f:\sp\public\sdk\inc\pshpack1.h -FILE 4033 f:\sp\vctools\crt_bld\self_x86\crt\src\crtmbox.c -FILE 4034 f:\sp\public\sdk\inc\winver.h -FILE 4035 f:\sp\public\sdk\inc\guiddef.h -FILE 4036 f:\sp\public\sdk\inc\windows.h -FILE 4037 f:\sp\public\sdk\inc\specstrings.h -FILE 4038 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4039 f:\sp\public\sdk\inc\basetsd.h -FILE 4040 f:\sp\public\sdk\inc\winreg.h -FILE 4041 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4042 f:\sp\public\sdk\inc\winbase.h -FILE 4043 f:\sp\public\sdk\inc\ddbanned.h -FILE 4044 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4045 f:\sp\public\sdk\inc\winerror.h -FILE 4046 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4047 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4048 f:\sp\public\sdk\inc\pshpack8.h -FILE 4049 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4050 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4051 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4052 f:\sp\public\sdk\inc\reason.h -FILE 4053 f:\sp\public\sdk\inc\wincon.h -FILE 4054 f:\sp\public\sdk\inc\pshpack2.h -FILE 4055 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4056 f:\sp\public\sdk\inc\windef.h -FILE 4057 f:\sp\public\sdk\inc\poppack.h -FILE 4058 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 4059 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4060 f:\sp\public\sdk\inc\winnetwk.h -FILE 4061 f:\sp\public\sdk\inc\imm.h -FILE 4062 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4063 f:\sp\public\sdk\inc\windef.h -FILE 4064 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4065 f:\sp\public\sdk\inc\pshpack1.h -FILE 4066 f:\sp\public\sdk\inc\winver.h -FILE 4067 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4068 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4069 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4070 f:\sp\public\sdk\inc\winnt.h -FILE 4071 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4072 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4073 f:\sp\public\sdk\inc\winreg.h -FILE 4074 f:\sp\vctools\crt_bld\self_x86\crt\src\cmiscdat.c -FILE 4075 f:\sp\public\sdk\inc\winbase.h -FILE 4076 f:\sp\public\sdk\inc\winerror.h -FILE 4077 f:\sp\public\sdk\inc\pshpack8.h -FILE 4078 f:\sp\public\sdk\inc\reason.h -FILE 4079 f:\sp\public\sdk\inc\wincon.h -FILE 4080 f:\sp\public\sdk\inc\ddbanned.h -FILE 4081 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4082 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4083 f:\sp\public\sdk\inc\pshpack2.h -FILE 4084 f:\sp\public\sdk\inc\mcx.h -FILE 4085 f:\sp\public\sdk\inc\winuser.h -FILE 4086 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4087 f:\sp\public\sdk\inc\winnls.h -FILE 4088 f:\sp\public\sdk\inc\guiddef.h -FILE 4089 f:\sp\public\sdk\inc\windows.h -FILE 4090 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4091 f:\sp\public\sdk\inc\specstrings.h -FILE 4092 f:\sp\public\sdk\inc\basetsd.h -FILE 4093 f:\sp\public\sdk\inc\stralign.h -FILE 4094 f:\sp\public\sdk\inc\tvout.h -FILE 4095 f:\sp\public\sdk\inc\winsvc.h -FILE 4096 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4097 f:\sp\public\sdk\inc\wingdi.h -FILE 4098 f:\sp\public\sdk\inc\pshpack4.h -FILE 4099 f:\sp\public\sdk\inc\pshpack4.h -FILE 4100 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 4101 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 4102 f:\sp\public\sdk\inc\poppack.h -FILE 4103 f:\sp\public\sdk\inc\winnetwk.h -FILE 4104 f:\sp\public\sdk\inc\imm.h -FILE 4105 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4106 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4107 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4108 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4109 f:\sp\public\sdk\inc\windef.h -FILE 4110 f:\sp\public\sdk\inc\pshpack1.h -FILE 4111 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4112 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4113 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4114 f:\sp\public\sdk\inc\winver.h -FILE 4115 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4116 f:\sp\public\sdk\inc\winnt.h -FILE 4117 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4118 f:\sp\public\sdk\inc\winreg.h -FILE 4119 f:\sp\vctools\crt_bld\self_x86\crt\src\abort.c -FILE 4120 f:\sp\public\sdk\inc\winbase.h -FILE 4121 f:\sp\public\sdk\inc\winerror.h -FILE 4122 f:\sp\public\sdk\inc\pshpack8.h -FILE 4123 f:\sp\public\sdk\inc\reason.h -FILE 4124 f:\sp\public\sdk\inc\ddbanned.h -FILE 4125 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4126 f:\sp\public\sdk\inc\wincon.h -FILE 4127 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4128 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4129 f:\sp\public\sdk\inc\pshpack2.h -FILE 4130 f:\sp\public\sdk\inc\mcx.h -FILE 4131 f:\sp\public\sdk\inc\winuser.h -FILE 4132 f:\sp\public\sdk\inc\winnls.h -FILE 4133 f:\sp\public\sdk\inc\guiddef.h -FILE 4134 f:\sp\public\sdk\inc\stralign.h -FILE 4135 f:\sp\public\sdk\inc\specstrings.h -FILE 4136 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4137 f:\sp\public\sdk\inc\basetsd.h -FILE 4138 f:\sp\public\sdk\inc\windows.h -FILE 4139 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4140 f:\sp\public\sdk\inc\tvout.h -FILE 4141 f:\sp\public\sdk\inc\winsvc.h -FILE 4142 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4143 f:\sp\public\sdk\inc\wingdi.h -FILE 4144 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4145 f:\sp\public\sdk\inc\wincon.h -FILE 4146 f:\sp\public\sdk\inc\imm.h -FILE 4147 f:\sp\public\sdk\inc\winbase.h -FILE 4148 f:\sp\public\sdk\inc\wingdi.h -FILE 4149 f:\sp\public\sdk\inc\winver.h -FILE 4150 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4151 f:\sp\public\sdk\inc\windows.h -FILE 4152 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4153 f:\sp\public\sdk\inc\pshpack2.h -FILE 4154 f:\sp\public\sdk\inc\reason.h -FILE 4155 f:\sp\vctools\crt_bld\self_x86\crt\src\a_str.c -FILE 4156 f:\sp\public\sdk\inc\specstrings.h -FILE 4157 f:\sp\public\sdk\inc\basetsd.h -FILE 4158 f:\sp\public\sdk\inc\pshpack4.h -FILE 4159 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4160 f:\sp\public\sdk\inc\winnetwk.h -FILE 4161 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4162 f:\sp\public\sdk\inc\stralign.h -FILE 4163 f:\sp\public\sdk\inc\poppack.h -FILE 4164 f:\sp\public\sdk\inc\winsvc.h -FILE 4165 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4166 f:\sp\public\sdk\inc\windef.h -FILE 4167 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4168 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4169 f:\sp\public\sdk\inc\winuser.h -FILE 4170 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4171 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4172 f:\sp\public\sdk\inc\mcx.h -FILE 4173 f:\sp\public\sdk\inc\pshpack8.h -FILE 4174 f:\sp\public\sdk\inc\guiddef.h -FILE 4175 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4176 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4177 f:\sp\public\sdk\inc\winnt.h -FILE 4178 f:\sp\public\sdk\inc\winnls.h -FILE 4179 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4180 f:\sp\public\sdk\inc\pshpack1.h -FILE 4181 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4182 f:\sp\public\sdk\inc\winerror.h -FILE 4183 f:\sp\public\sdk\inc\winreg.h -FILE 4184 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4185 f:\sp\public\sdk\inc\ddbanned.h -FILE 4186 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4187 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4188 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4189 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4190 f:\sp\public\sdk\inc\tvout.h -FILE 4191 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4192 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4193 f:\sp\public\sdk\inc\wincon.h -FILE 4194 f:\sp\public\sdk\inc\imm.h -FILE 4195 f:\sp\public\sdk\inc\winbase.h -FILE 4196 f:\sp\public\sdk\inc\wingdi.h -FILE 4197 f:\sp\public\sdk\inc\winver.h -FILE 4198 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4199 f:\sp\public\sdk\inc\windows.h -FILE 4200 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4201 f:\sp\public\sdk\inc\pshpack2.h -FILE 4202 f:\sp\public\sdk\inc\reason.h -FILE 4203 f:\sp\vctools\crt_bld\self_x86\crt\src\a_map.c -FILE 4204 f:\sp\public\sdk\inc\specstrings.h -FILE 4205 f:\sp\public\sdk\inc\basetsd.h -FILE 4206 f:\sp\public\sdk\inc\pshpack4.h -FILE 4207 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4208 f:\sp\public\sdk\inc\winnetwk.h -FILE 4209 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4210 f:\sp\public\sdk\inc\stralign.h -FILE 4211 f:\sp\public\sdk\inc\poppack.h -FILE 4212 f:\sp\public\sdk\inc\winsvc.h -FILE 4213 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4214 f:\sp\public\sdk\inc\windef.h -FILE 4215 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4216 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4217 f:\sp\public\sdk\inc\winuser.h -FILE 4218 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4219 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4220 f:\sp\public\sdk\inc\mcx.h -FILE 4221 f:\sp\public\sdk\inc\pshpack8.h -FILE 4222 f:\sp\public\sdk\inc\guiddef.h -FILE 4223 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4224 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4225 f:\sp\public\sdk\inc\winnt.h -FILE 4226 f:\sp\public\sdk\inc\winnls.h -FILE 4227 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4228 f:\sp\public\sdk\inc\pshpack1.h -FILE 4229 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4230 f:\sp\public\sdk\inc\winerror.h -FILE 4231 f:\sp\public\sdk\inc\winreg.h -FILE 4232 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4233 f:\sp\public\sdk\inc\ddbanned.h -FILE 4234 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4235 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4236 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4237 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4238 f:\sp\public\sdk\inc\tvout.h -FILE 4239 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4240 f:\sp\public\sdk\inc\wincon.h -FILE 4241 f:\sp\public\sdk\inc\imm.h -FILE 4242 f:\sp\public\sdk\inc\winbase.h -FILE 4243 f:\sp\public\sdk\inc\wingdi.h -FILE 4244 f:\sp\public\sdk\inc\winver.h -FILE 4245 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4246 f:\sp\public\sdk\inc\windows.h -FILE 4247 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4248 f:\sp\public\sdk\inc\pshpack2.h -FILE 4249 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4250 f:\sp\public\sdk\inc\reason.h -FILE 4251 f:\sp\vctools\crt_bld\self_x86\crt\src\a_loc.c -FILE 4252 f:\sp\public\sdk\inc\specstrings.h -FILE 4253 f:\sp\public\sdk\inc\basetsd.h -FILE 4254 f:\sp\public\sdk\inc\pshpack4.h -FILE 4255 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4256 f:\sp\public\sdk\inc\winnetwk.h -FILE 4257 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4258 f:\sp\public\sdk\inc\stralign.h -FILE 4259 f:\sp\public\sdk\inc\poppack.h -FILE 4260 f:\sp\public\sdk\inc\winsvc.h -FILE 4261 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4262 f:\sp\public\sdk\inc\windef.h -FILE 4263 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4264 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4265 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4266 f:\sp\public\sdk\inc\winuser.h -FILE 4267 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4268 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4269 f:\sp\public\sdk\inc\mcx.h -FILE 4270 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4271 f:\sp\public\sdk\inc\pshpack8.h -FILE 4272 f:\sp\public\sdk\inc\guiddef.h -FILE 4273 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4274 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4275 f:\sp\public\sdk\inc\winnt.h -FILE 4276 f:\sp\public\sdk\inc\winnls.h -FILE 4277 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4278 f:\sp\public\sdk\inc\pshpack1.h -FILE 4279 f:\sp\public\sdk\inc\winerror.h -FILE 4280 f:\sp\public\sdk\inc\winreg.h -FILE 4281 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4282 f:\sp\public\sdk\inc\ddbanned.h -FILE 4283 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4284 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4285 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4286 f:\sp\public\sdk\inc\tvout.h -FILE 4287 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4288 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4289 f:\sp\public\sdk\inc\poppack.h -FILE 4290 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4291 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4292 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4293 f:\sp\public\sdk\inc\winnetwk.h -FILE 4294 f:\sp\public\sdk\inc\imm.h -FILE 4295 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4296 f:\sp\public\sdk\inc\windef.h -FILE 4297 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4298 f:\sp\public\sdk\inc\pshpack1.h -FILE 4299 f:\sp\public\sdk\inc\winver.h -FILE 4300 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4301 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4302 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4303 f:\sp\public\sdk\inc\winnt.h -FILE 4304 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4305 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4306 f:\sp\public\sdk\inc\winreg.h -FILE 4307 f:\sp\vctools\crt_bld\self_x86\crt\src\a_env.c -FILE 4308 f:\sp\public\sdk\inc\winbase.h -FILE 4309 f:\sp\public\sdk\inc\winerror.h -FILE 4310 f:\sp\public\sdk\inc\pshpack8.h -FILE 4311 f:\sp\public\sdk\inc\reason.h -FILE 4312 f:\sp\public\sdk\inc\wincon.h -FILE 4313 f:\sp\public\sdk\inc\ddbanned.h -FILE 4314 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4315 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4316 f:\sp\public\sdk\inc\pshpack2.h -FILE 4317 f:\sp\public\sdk\inc\mcx.h -FILE 4318 f:\sp\public\sdk\inc\winuser.h -FILE 4319 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4320 f:\sp\public\sdk\inc\winnls.h -FILE 4321 f:\sp\public\sdk\inc\guiddef.h -FILE 4322 f:\sp\public\sdk\inc\windows.h -FILE 4323 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4324 f:\sp\public\sdk\inc\specstrings.h -FILE 4325 f:\sp\public\sdk\inc\basetsd.h -FILE 4326 f:\sp\public\sdk\inc\stralign.h -FILE 4327 f:\sp\public\sdk\inc\tvout.h -FILE 4328 f:\sp\public\sdk\inc\winsvc.h -FILE 4329 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4330 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4331 f:\sp\public\sdk\inc\wingdi.h -FILE 4332 f:\sp\public\sdk\inc\pshpack4.h -FILE 4333 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4334 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4335 f:\sp\public\sdk\inc\wincon.h -FILE 4336 f:\sp\public\sdk\inc\imm.h -FILE 4337 f:\sp\public\sdk\inc\winbase.h -FILE 4338 f:\sp\public\sdk\inc\wingdi.h -FILE 4339 f:\sp\public\sdk\inc\winver.h -FILE 4340 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4341 f:\sp\public\sdk\inc\windows.h -FILE 4342 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4343 f:\sp\public\sdk\inc\pshpack2.h -FILE 4344 f:\sp\public\sdk\inc\reason.h -FILE 4345 f:\sp\vctools\crt_bld\self_x86\crt\src\a_cmp.c -FILE 4346 f:\sp\public\sdk\inc\specstrings.h -FILE 4347 f:\sp\public\sdk\inc\basetsd.h -FILE 4348 f:\sp\public\sdk\inc\pshpack4.h -FILE 4349 f:\sp\public\sdk\inc\winnetwk.h -FILE 4350 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4351 f:\sp\public\sdk\inc\stralign.h -FILE 4352 f:\sp\public\sdk\inc\poppack.h -FILE 4353 f:\sp\public\sdk\inc\winsvc.h -FILE 4354 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4355 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4356 f:\sp\public\sdk\inc\windef.h -FILE 4357 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4358 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4359 f:\sp\public\sdk\inc\winuser.h -FILE 4360 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4361 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4362 f:\sp\public\sdk\inc\mcx.h -FILE 4363 f:\sp\public\sdk\inc\pshpack8.h -FILE 4364 f:\sp\public\sdk\inc\guiddef.h -FILE 4365 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4366 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4367 f:\sp\public\sdk\inc\winnt.h -FILE 4368 f:\sp\public\sdk\inc\winnls.h -FILE 4369 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4370 f:\sp\public\sdk\inc\pshpack1.h -FILE 4371 f:\sp\public\sdk\inc\winerror.h -FILE 4372 f:\sp\public\sdk\inc\winreg.h -FILE 4373 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4374 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4375 f:\sp\public\sdk\inc\ddbanned.h -FILE 4376 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4377 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4378 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4379 f:\sp\public\sdk\inc\tvout.h -FILE 4380 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4381 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\sehprolg4.asm -FILE 4382 f:\sp\public\sdk\inc\poppack.h -FILE 4383 f:\sp\public\sdk\inc\winnetwk.h -FILE 4384 f:\sp\public\sdk\inc\imm.h -FILE 4385 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4386 f:\sp\public\sdk\inc\windef.h -FILE 4387 f:\sp\public\sdk\inc\pshpack1.h -FILE 4388 f:\sp\public\sdk\inc\winver.h -FILE 4389 f:\sp\public\sdk\inc\windows.h -FILE 4390 f:\sp\public\sdk\inc\winnt.h -FILE 4391 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4392 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4393 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4394 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4395 f:\sp\public\sdk\inc\winreg.h -FILE 4396 f:\sp\public\sdk\inc\winbase.h -FILE 4397 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\secchk.c -FILE 4398 f:\sp\public\sdk\inc\winerror.h -FILE 4399 f:\sp\public\sdk\inc\pshpack8.h -FILE 4400 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 4401 f:\sp\public\sdk\inc\reason.h -FILE 4402 f:\sp\public\sdk\inc\wincon.h -FILE 4403 f:\sp\public\sdk\inc\ddbanned.h -FILE 4404 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4405 f:\sp\public\sdk\inc\pshpack2.h -FILE 4406 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4407 f:\sp\public\sdk\inc\mcx.h -FILE 4408 f:\sp\public\sdk\inc\winuser.h -FILE 4409 f:\sp\public\sdk\inc\winnls.h -FILE 4410 f:\sp\public\sdk\inc\guiddef.h -FILE 4411 f:\sp\public\sdk\inc\specstrings.h -FILE 4412 f:\sp\public\sdk\inc\basetsd.h -FILE 4413 f:\sp\public\sdk\inc\stralign.h -FILE 4414 f:\sp\public\sdk\inc\tvout.h -FILE 4415 f:\sp\public\sdk\inc\winsvc.h -FILE 4416 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4417 f:\sp\public\sdk\inc\wingdi.h -FILE 4418 f:\sp\public\sdk\inc\pshpack4.h -FILE 4419 f:\sp\public\sdk\inc\poppack.h -FILE 4420 f:\sp\public\sdk\inc\winnetwk.h -FILE 4421 f:\sp\public\sdk\inc\imm.h -FILE 4422 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4423 f:\sp\public\sdk\inc\windef.h -FILE 4424 f:\sp\public\sdk\inc\pshpack1.h -FILE 4425 f:\sp\public\sdk\inc\winver.h -FILE 4426 f:\sp\public\sdk\inc\windows.h -FILE 4427 f:\sp\public\sdk\inc\winnt.h -FILE 4428 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4429 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4430 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4431 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4432 f:\sp\public\sdk\inc\winreg.h -FILE 4433 f:\sp\public\sdk\inc\winbase.h -FILE 4434 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\loadcfg.c -FILE 4435 f:\sp\public\sdk\inc\winerror.h -FILE 4436 f:\sp\public\sdk\inc\pshpack8.h -FILE 4437 f:\sp\public\sdk\inc\reason.h -FILE 4438 f:\sp\public\sdk\inc\wincon.h -FILE 4439 f:\sp\public\sdk\inc\ddbanned.h -FILE 4440 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4441 f:\sp\public\sdk\inc\pshpack2.h -FILE 4442 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4443 f:\sp\public\sdk\inc\mcx.h -FILE 4444 f:\sp\public\sdk\inc\winuser.h -FILE 4445 f:\sp\public\sdk\inc\winnls.h -FILE 4446 f:\sp\public\sdk\inc\guiddef.h -FILE 4447 f:\sp\public\sdk\inc\specstrings.h -FILE 4448 f:\sp\public\sdk\inc\basetsd.h -FILE 4449 f:\sp\public\sdk\inc\stralign.h -FILE 4450 f:\sp\public\sdk\inc\tvout.h -FILE 4451 f:\sp\public\sdk\inc\winsvc.h -FILE 4452 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4453 f:\sp\public\sdk\inc\wingdi.h -FILE 4454 f:\sp\public\sdk\inc\pshpack4.h -FILE 4455 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup4.asm -FILE 4456 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 4457 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup.asm -FILE 4458 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\pversion.inc -FILE 4459 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\cmacros.inc -FILE 4460 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 4461 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\nlgsupp.asm -FILE 4462 f:\sp\public\sdk\inc\ntldr.h -FILE 4463 f:\sp\public\sdk\inc\ntpoapi.h -FILE 4464 f:\sp\public\sdk\inc\ntexapi.h -FILE 4465 f:\sp\public\sdk\inc\pshpack1.h -FILE 4466 f:\sp\public\sdk\inc\pshpack8.h -FILE 4467 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 4468 f:\sp\public\sdk\inc\ntdef.h -FILE 4469 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 4470 f:\sp\public\sdk\inc\mce.h -FILE 4471 f:\sp\public\sdk\inc\poppack.h -FILE 4472 f:\sp\public\sdk\inc\ntimage.h -FILE 4473 f:\sp\public\sdk\inc\pshpack2.h -FILE 4474 f:\sp\public\sdk\inc\ntpsapi.h -FILE 4475 f:\sp\public\sdk\inc\nti386.h -FILE 4476 f:\sp\public\sdk\inc\nt.h -FILE 4477 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 4478 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 4479 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 4480 f:\sp\public\sdk\inc\specstrings.h -FILE 4481 f:\sp\public\sdk\inc\basetsd.h -FILE 4482 f:\sp\public\sdk\inc\ntxcapi.h -FILE 4483 f:\sp\public\sdk\inc\guiddef.h -FILE 4484 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\misc\i386\chandler4.c -FILE 4485 f:\sp\public\sdk\inc\ntstatus.h -FILE 4486 f:\sp\public\sdk\inc\ntkeapi.h -FILE 4487 f:\sp\public\sdk\inc\ntconfig.h -FILE 4488 f:\sp\public\sdk\inc\ntregapi.h -FILE 4489 f:\sp\public\sdk\inc\ntmmapi.h -FILE 4490 f:\sp\public\sdk\inc\ntobapi.h -FILE 4491 f:\sp\public\sdk\inc\nxi386.h -FILE 4492 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\process.h -FILE 4493 f:\sp\public\sdk\inc\ntioapi.h -FILE 4494 f:\sp\public\sdk\inc\devioctl.h -FILE 4495 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 4496 f:\sp\public\sdk\inc\ntseapi.h -FILE 4497 f:\sp\public\sdk\inc\ddbanned.h -FILE 4498 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 4499 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 4500 f:\sp\public\sdk\inc\ntnls.h -FILE 4501 f:\sp\public\sdk\inc\ntelfapi.h -FILE 4502 f:\sp\public\sdk\inc\pshpack4.h -FILE 4503 f:\sp\public\sdk\inc\ntiolog.h -FILE 4504 f:\sp\public\sdk\inc\ntlpcapi.h -FILE 4505 f:\sp\public\sdk\inc\ntpnpapi.h -FILE 4506 f:\sp\public\sdk\inc\cfg.h -FILE 4507 f:\sp\public\sdk\inc\pebteb.h -FILE 4508 f:\sp\public\sdk\inc\wincon.h -FILE 4509 f:\sp\public\sdk\inc\imm.h -FILE 4510 f:\sp\public\sdk\inc\winbase.h -FILE 4511 f:\sp\public\sdk\inc\wingdi.h -FILE 4512 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4513 f:\sp\public\sdk\inc\winver.h -FILE 4514 f:\sp\public\sdk\inc\pshpack2.h -FILE 4515 f:\sp\public\sdk\inc\reason.h -FILE 4516 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 4517 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4518 f:\sp\vctools\crt_bld\self_x86\crt\src\mbsnbico.c -FILE 4519 f:\sp\public\sdk\inc\specstrings.h -FILE 4520 f:\sp\public\sdk\inc\basetsd.h -FILE 4521 f:\sp\public\sdk\inc\pshpack4.h -FILE 4522 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4523 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4524 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4525 f:\sp\public\sdk\inc\winnetwk.h -FILE 4526 f:\sp\public\sdk\inc\stralign.h -FILE 4527 f:\sp\public\sdk\inc\poppack.h -FILE 4528 f:\sp\public\sdk\inc\winsvc.h -FILE 4529 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4530 f:\sp\public\sdk\inc\windef.h -FILE 4531 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4532 f:\sp\public\sdk\inc\winuser.h -FILE 4533 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4534 f:\sp\public\sdk\inc\windows.h -FILE 4535 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4536 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4537 f:\sp\public\sdk\inc\mcx.h -FILE 4538 f:\sp\public\sdk\inc\pshpack8.h -FILE 4539 f:\sp\public\sdk\inc\guiddef.h -FILE 4540 f:\sp\public\sdk\inc\winnt.h -FILE 4541 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4542 f:\sp\public\sdk\inc\winnls.h -FILE 4543 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4544 f:\sp\public\sdk\inc\pshpack1.h -FILE 4545 f:\sp\public\sdk\inc\winerror.h -FILE 4546 f:\sp\public\sdk\inc\winreg.h -FILE 4547 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4548 f:\sp\public\sdk\inc\ddbanned.h -FILE 4549 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4550 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4551 f:\sp\public\sdk\inc\tvout.h -FILE 4552 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4553 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4554 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4555 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4556 f:\sp\public\sdk\inc\wincon.h -FILE 4557 f:\sp\public\sdk\inc\imm.h -FILE 4558 f:\sp\public\sdk\inc\winbase.h -FILE 4559 f:\sp\public\sdk\inc\wingdi.h -FILE 4560 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4561 f:\sp\public\sdk\inc\winver.h -FILE 4562 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4563 f:\sp\public\sdk\inc\windows.h -FILE 4564 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4565 f:\sp\public\sdk\inc\pshpack2.h -FILE 4566 f:\sp\public\sdk\inc\reason.h -FILE 4567 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4568 f:\sp\vctools\crt_bld\self_x86\crt\src\mbschr.c -FILE 4569 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4570 f:\sp\public\sdk\inc\specstrings.h -FILE 4571 f:\sp\public\sdk\inc\basetsd.h -FILE 4572 f:\sp\public\sdk\inc\pshpack4.h -FILE 4573 f:\sp\public\sdk\inc\winnetwk.h -FILE 4574 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4575 f:\sp\public\sdk\inc\stralign.h -FILE 4576 f:\sp\public\sdk\inc\poppack.h -FILE 4577 f:\sp\public\sdk\inc\winsvc.h -FILE 4578 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4579 f:\sp\public\sdk\inc\windef.h -FILE 4580 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4581 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4582 f:\sp\public\sdk\inc\winuser.h -FILE 4583 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4584 f:\sp\public\sdk\inc\mcx.h -FILE 4585 f:\sp\public\sdk\inc\pshpack8.h -FILE 4586 f:\sp\public\sdk\inc\guiddef.h -FILE 4587 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4588 f:\sp\public\sdk\inc\winnt.h -FILE 4589 f:\sp\public\sdk\inc\winnls.h -FILE 4590 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4591 f:\sp\public\sdk\inc\pshpack1.h -FILE 4592 f:\sp\public\sdk\inc\winerror.h -FILE 4593 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 4594 f:\sp\public\sdk\inc\winreg.h -FILE 4595 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4596 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4597 f:\sp\public\sdk\inc\ddbanned.h -FILE 4598 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4599 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4600 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4601 f:\sp\public\sdk\inc\tvout.h -FILE 4602 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4603 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 4604 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4605 f:\sp\public\sdk\inc\wincon.h -FILE 4606 f:\sp\public\sdk\inc\imm.h -FILE 4607 f:\sp\public\sdk\inc\winbase.h -FILE 4608 f:\sp\public\sdk\inc\wingdi.h -FILE 4609 f:\sp\public\sdk\inc\winver.h -FILE 4610 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4611 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4612 f:\sp\public\sdk\inc\pshpack2.h -FILE 4613 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4614 f:\sp\public\sdk\inc\reason.h -FILE 4615 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c -FILE 4616 f:\sp\public\sdk\inc\specstrings.h -FILE 4617 f:\sp\public\sdk\inc\basetsd.h -FILE 4618 f:\sp\public\sdk\inc\pshpack4.h -FILE 4619 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4620 f:\sp\public\sdk\inc\winnetwk.h -FILE 4621 f:\sp\public\sdk\inc\stralign.h -FILE 4622 f:\sp\public\sdk\inc\poppack.h -FILE 4623 f:\sp\public\sdk\inc\winsvc.h -FILE 4624 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4625 f:\sp\public\sdk\inc\windef.h -FILE 4626 f:\sp\public\sdk\inc\winuser.h -FILE 4627 f:\sp\public\sdk\inc\windows.h -FILE 4628 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4629 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4630 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4631 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4632 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4633 f:\sp\public\sdk\inc\mcx.h -FILE 4634 f:\sp\public\sdk\inc\pshpack8.h -FILE 4635 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4636 f:\sp\public\sdk\inc\guiddef.h -FILE 4637 f:\sp\public\sdk\inc\winnt.h -FILE 4638 f:\sp\public\sdk\inc\winnls.h -FILE 4639 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4640 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 4641 f:\sp\public\sdk\inc\pshpack1.h -FILE 4642 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4643 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4644 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4645 f:\sp\public\sdk\inc\winerror.h -FILE 4646 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 4647 f:\sp\public\sdk\inc\winreg.h -FILE 4648 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4649 f:\sp\public\sdk\inc\ddbanned.h -FILE 4650 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 4651 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4652 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4653 f:\sp\public\sdk\inc\tvout.h -FILE 4654 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4655 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4656 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4657 f:\sp\public\sdk\inc\wincon.h -FILE 4658 f:\sp\public\sdk\inc\imm.h -FILE 4659 f:\sp\public\sdk\inc\winbase.h -FILE 4660 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4661 f:\sp\public\sdk\inc\wingdi.h -FILE 4662 f:\sp\public\sdk\inc\windef.h -FILE 4663 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4664 f:\sp\public\sdk\inc\winver.h -FILE 4665 f:\sp\public\sdk\inc\pshpack2.h -FILE 4666 f:\sp\public\sdk\inc\reason.h -FILE 4667 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4668 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4669 f:\sp\vctools\crt_bld\self_x86\crt\src\ismbbyte.c -FILE 4670 f:\sp\public\sdk\inc\winnt.h -FILE 4671 f:\sp\public\sdk\inc\specstrings.h -FILE 4672 f:\sp\public\sdk\inc\basetsd.h -FILE 4673 f:\sp\public\sdk\inc\pshpack4.h -FILE 4674 f:\sp\public\sdk\inc\winnetwk.h -FILE 4675 f:\sp\public\sdk\inc\stralign.h -FILE 4676 f:\sp\public\sdk\inc\poppack.h -FILE 4677 f:\sp\public\sdk\inc\winsvc.h -FILE 4678 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4679 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4680 f:\sp\public\sdk\inc\winuser.h -FILE 4681 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4682 f:\sp\public\sdk\inc\mcx.h -FILE 4683 f:\sp\public\sdk\inc\pshpack8.h -FILE 4684 f:\sp\public\sdk\inc\guiddef.h -FILE 4685 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4686 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4687 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4688 f:\sp\public\sdk\inc\windows.h -FILE 4689 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4690 f:\sp\public\sdk\inc\winnls.h -FILE 4691 f:\sp\public\sdk\inc\pshpack1.h -FILE 4692 f:\sp\public\sdk\inc\winerror.h -FILE 4693 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4694 f:\sp\public\sdk\inc\winreg.h -FILE 4695 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4696 f:\sp\public\sdk\inc\ddbanned.h -FILE 4697 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4698 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4699 f:\sp\public\sdk\inc\tvout.h -FILE 4700 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 4701 f:\sp\public\sdk\inc\winnetwk.h -FILE 4702 f:\sp\public\sdk\inc\imm.h -FILE 4703 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 4704 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4705 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4706 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4707 f:\sp\public\sdk\inc\windef.h -FILE 4708 f:\sp\public\sdk\inc\pshpack1.h -FILE 4709 f:\sp\public\sdk\inc\winver.h -FILE 4710 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4711 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4712 f:\sp\public\sdk\inc\winnt.h -FILE 4713 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4714 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4715 f:\sp\public\sdk\inc\winreg.h -FILE 4716 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4717 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4718 f:\sp\public\sdk\inc\winbase.h -FILE 4719 f:\sp\public\sdk\inc\winerror.h -FILE 4720 f:\sp\public\sdk\inc\pshpack8.h -FILE 4721 f:\sp\vctools\crt_bld\self_x86\crt\src\putwch.c -FILE 4722 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4723 f:\sp\public\sdk\inc\reason.h -FILE 4724 f:\sp\public\sdk\inc\wincon.h -FILE 4725 f:\sp\public\sdk\inc\pshpack2.h -FILE 4726 f:\sp\public\sdk\inc\mcx.h -FILE 4727 f:\sp\public\sdk\inc\winuser.h -FILE 4728 f:\sp\public\sdk\inc\winnls.h -FILE 4729 f:\sp\public\sdk\inc\guiddef.h -FILE 4730 f:\sp\public\sdk\inc\stralign.h -FILE 4731 f:\sp\public\sdk\inc\ddbanned.h -FILE 4732 f:\sp\public\sdk\inc\specstrings.h -FILE 4733 f:\sp\vctools\crt_bld\self_x86\crt\src\file2.h -FILE 4734 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4735 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4736 f:\sp\public\sdk\inc\basetsd.h -FILE 4737 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4738 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4739 f:\sp\public\sdk\inc\windows.h -FILE 4740 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4741 f:\sp\public\sdk\inc\tvout.h -FILE 4742 f:\sp\public\sdk\inc\winsvc.h -FILE 4743 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4744 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4745 f:\sp\public\sdk\inc\wingdi.h -FILE 4746 f:\sp\public\sdk\inc\pshpack4.h -FILE 4747 f:\sp\vctools\crt_bld\self_x86\crt\src\conio.h -FILE 4748 f:\sp\public\sdk\inc\poppack.h -FILE 4749 f:\sp\public\sdk\inc\reason.h -FILE 4750 f:\sp\public\sdk\inc\wincon.h -FILE 4751 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 4752 f:\sp\public\sdk\inc\poppack.h -FILE 4753 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4754 f:\sp\public\sdk\inc\mcx.h -FILE 4755 f:\sp\public\sdk\inc\winuser.h -FILE 4756 f:\sp\public\sdk\inc\winnls.h -FILE 4757 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 4758 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4759 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4760 f:\sp\public\sdk\inc\stralign.h -FILE 4761 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4762 f:\sp\public\sdk\inc\windef.h -FILE 4763 f:\sp\public\sdk\inc\tvout.h -FILE 4764 f:\sp\public\sdk\inc\winsvc.h -FILE 4765 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 4766 f:\sp\public\sdk\inc\wingdi.h -FILE 4767 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4768 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4769 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4770 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4771 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4772 f:\sp\public\sdk\inc\winnt.h -FILE 4773 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4774 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4775 f:\sp\public\sdk\inc\winnetwk.h -FILE 4776 f:\sp\public\sdk\inc\imm.h -FILE 4777 f:\sp\vctools\crt_bld\self_x86\crt\src\write.c -FILE 4778 f:\sp\public\sdk\inc\winbase.h -FILE 4779 f:\sp\public\sdk\inc\winerror.h -FILE 4780 f:\sp\public\sdk\inc\pshpack1.h -FILE 4781 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4782 f:\sp\public\sdk\inc\pshpack8.h -FILE 4783 f:\sp\public\sdk\inc\winver.h -FILE 4784 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 4785 f:\sp\public\sdk\inc\ddbanned.h -FILE 4786 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4787 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4788 f:\sp\public\sdk\inc\pshpack2.h -FILE 4789 f:\sp\public\sdk\inc\winreg.h -FILE 4790 f:\sp\public\sdk\inc\guiddef.h -FILE 4791 f:\sp\public\sdk\inc\windows.h -FILE 4792 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4793 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4794 f:\sp\public\sdk\inc\specstrings.h -FILE 4795 f:\sp\public\sdk\inc\basetsd.h -FILE 4796 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4797 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4798 f:\sp\public\sdk\inc\pshpack4.h -FILE 4799 f:\sp\public\sdk\inc\reason.h -FILE 4800 f:\sp\public\sdk\inc\wincon.h -FILE 4801 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4802 f:\sp\public\sdk\inc\poppack.h -FILE 4803 f:\sp\public\sdk\inc\mcx.h -FILE 4804 f:\sp\public\sdk\inc\winuser.h -FILE 4805 f:\sp\public\sdk\inc\winnls.h -FILE 4806 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4807 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4808 f:\sp\public\sdk\inc\stralign.h -FILE 4809 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4810 f:\sp\public\sdk\inc\windef.h -FILE 4811 f:\sp\public\sdk\inc\tvout.h -FILE 4812 f:\sp\public\sdk\inc\winsvc.h -FILE 4813 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4814 f:\sp\public\sdk\inc\wingdi.h -FILE 4815 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4816 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4817 f:\sp\public\sdk\inc\winnt.h -FILE 4818 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4819 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4820 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 4821 f:\sp\public\sdk\inc\winnetwk.h -FILE 4822 f:\sp\public\sdk\inc\imm.h -FILE 4823 f:\sp\vctools\crt_bld\self_x86\crt\src\fcntl.h -FILE 4824 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4825 f:\sp\vctools\crt_bld\self_x86\crt\src\osfinfo.c -FILE 4826 f:\sp\public\sdk\inc\winbase.h -FILE 4827 f:\sp\public\sdk\inc\winerror.h -FILE 4828 f:\sp\public\sdk\inc\pshpack1.h -FILE 4829 f:\sp\public\sdk\inc\pshpack8.h -FILE 4830 f:\sp\public\sdk\inc\winver.h -FILE 4831 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4832 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 4833 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4834 f:\sp\public\sdk\inc\ddbanned.h -FILE 4835 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4836 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4837 f:\sp\public\sdk\inc\pshpack2.h -FILE 4838 f:\sp\public\sdk\inc\winreg.h -FILE 4839 f:\sp\public\sdk\inc\guiddef.h -FILE 4840 f:\sp\public\sdk\inc\windows.h -FILE 4841 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4842 f:\sp\public\sdk\inc\specstrings.h -FILE 4843 f:\sp\public\sdk\inc\basetsd.h -FILE 4844 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4845 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4846 f:\sp\public\sdk\inc\pshpack4.h -FILE 4847 f:\sp\public\sdk\inc\reason.h -FILE 4848 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4849 f:\sp\public\sdk\inc\wincon.h -FILE 4850 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4851 f:\sp\public\sdk\inc\poppack.h -FILE 4852 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4853 f:\sp\public\sdk\inc\mcx.h -FILE 4854 f:\sp\public\sdk\inc\winuser.h -FILE 4855 f:\sp\public\sdk\inc\winnls.h -FILE 4856 f:\sp\public\sdk\inc\stralign.h -FILE 4857 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4858 f:\sp\public\sdk\inc\windef.h -FILE 4859 f:\sp\public\sdk\inc\tvout.h -FILE 4860 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 4861 f:\sp\public\sdk\inc\winsvc.h -FILE 4862 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4863 f:\sp\public\sdk\inc\wingdi.h -FILE 4864 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4865 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4866 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4867 f:\sp\public\sdk\inc\winnt.h -FILE 4868 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4869 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4870 f:\sp\public\sdk\inc\winnetwk.h -FILE 4871 f:\sp\public\sdk\inc\imm.h -FILE 4872 f:\sp\vctools\crt_bld\self_x86\crt\src\lseeki64.c -FILE 4873 f:\sp\public\sdk\inc\winbase.h -FILE 4874 f:\sp\public\sdk\inc\winerror.h -FILE 4875 f:\sp\public\sdk\inc\pshpack1.h -FILE 4876 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 4877 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4878 f:\sp\public\sdk\inc\pshpack8.h -FILE 4879 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4880 f:\sp\public\sdk\inc\winver.h -FILE 4881 f:\sp\public\sdk\inc\ddbanned.h -FILE 4882 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4883 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4884 f:\sp\public\sdk\inc\pshpack2.h -FILE 4885 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4886 f:\sp\public\sdk\inc\winreg.h -FILE 4887 f:\sp\public\sdk\inc\guiddef.h -FILE 4888 f:\sp\public\sdk\inc\windows.h -FILE 4889 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4890 f:\sp\public\sdk\inc\specstrings.h -FILE 4891 f:\sp\public\sdk\inc\basetsd.h -FILE 4892 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4893 f:\sp\public\sdk\inc\pshpack4.h -FILE 4894 f:\sp\public\sdk\inc\pshpack4.h -FILE 4895 f:\sp\public\sdk\inc\poppack.h -FILE 4896 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 4897 f:\sp\public\sdk\inc\winnetwk.h -FILE 4898 f:\sp\public\sdk\inc\imm.h -FILE 4899 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4900 f:\sp\public\sdk\inc\windef.h -FILE 4901 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4902 f:\sp\public\sdk\inc\pshpack1.h -FILE 4903 f:\sp\public\sdk\inc\winver.h -FILE 4904 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 4905 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4906 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4907 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4908 f:\sp\public\sdk\inc\winnt.h -FILE 4909 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4910 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4911 f:\sp\public\sdk\inc\winreg.h -FILE 4912 f:\sp\vctools\crt_bld\self_x86\crt\src\isatty.c -FILE 4913 f:\sp\public\sdk\inc\winbase.h -FILE 4914 f:\sp\public\sdk\inc\winerror.h -FILE 4915 f:\sp\public\sdk\inc\pshpack8.h -FILE 4916 f:\sp\public\sdk\inc\reason.h -FILE 4917 f:\sp\public\sdk\inc\wincon.h -FILE 4918 f:\sp\public\sdk\inc\ddbanned.h -FILE 4919 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4920 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4921 f:\sp\public\sdk\inc\pshpack2.h -FILE 4922 f:\sp\public\sdk\inc\mcx.h -FILE 4923 f:\sp\public\sdk\inc\winuser.h -FILE 4924 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4925 f:\sp\public\sdk\inc\winnls.h -FILE 4926 f:\sp\public\sdk\inc\guiddef.h -FILE 4927 f:\sp\public\sdk\inc\windows.h -FILE 4928 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4929 f:\sp\public\sdk\inc\specstrings.h -FILE 4930 f:\sp\public\sdk\inc\basetsd.h -FILE 4931 f:\sp\public\sdk\inc\stralign.h -FILE 4932 f:\sp\public\sdk\inc\tvout.h -FILE 4933 f:\sp\public\sdk\inc\winsvc.h -FILE 4934 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4935 f:\sp\public\sdk\inc\wingdi.h -FILE 4936 f:\sp\public\sdk\inc\poppack.h -FILE 4937 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 4938 f:\sp\public\sdk\inc\winnetwk.h -FILE 4939 f:\sp\public\sdk\inc\imm.h -FILE 4940 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4941 f:\sp\public\sdk\inc\windef.h -FILE 4942 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4943 f:\sp\public\sdk\inc\pshpack1.h -FILE 4944 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 4945 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 4946 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 4947 f:\sp\public\sdk\inc\winver.h -FILE 4948 f:\sp\public\sdk\inc\windows.h -FILE 4949 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4950 f:\sp\public\sdk\inc\winnt.h -FILE 4951 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4952 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4953 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4954 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4955 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4956 f:\sp\public\sdk\inc\winreg.h -FILE 4957 f:\sp\public\sdk\inc\winbase.h -FILE 4958 f:\sp\vctools\crt_bld\self_x86\crt\src\ioinit.c -FILE 4959 f:\sp\public\sdk\inc\winerror.h -FILE 4960 f:\sp\public\sdk\inc\pshpack8.h -FILE 4961 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4962 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4963 f:\sp\public\sdk\inc\reason.h -FILE 4964 f:\sp\public\sdk\inc\wincon.h -FILE 4965 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4966 f:\sp\public\sdk\inc\ddbanned.h -FILE 4967 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4968 f:\sp\public\sdk\inc\pshpack2.h -FILE 4969 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4970 f:\sp\public\sdk\inc\mcx.h -FILE 4971 f:\sp\public\sdk\inc\winuser.h -FILE 4972 f:\sp\public\sdk\inc\winnls.h -FILE 4973 f:\sp\public\sdk\inc\guiddef.h -FILE 4974 f:\sp\public\sdk\inc\specstrings.h -FILE 4975 f:\sp\public\sdk\inc\basetsd.h -FILE 4976 f:\sp\public\sdk\inc\stralign.h -FILE 4977 f:\sp\public\sdk\inc\tvout.h -FILE 4978 f:\sp\public\sdk\inc\winsvc.h -FILE 4979 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4980 f:\sp\public\sdk\inc\wingdi.h -FILE 4981 f:\sp\public\sdk\inc\pshpack4.h -FILE 4982 f:\sp\public\sdk\inc\reason.h -FILE 4983 f:\sp\public\sdk\inc\wincon.h -FILE 4984 f:\sp\public\sdk\inc\pshpack2.h -FILE 4985 f:\sp\public\sdk\inc\mcx.h -FILE 4986 f:\sp\public\sdk\inc\winuser.h -FILE 4987 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4988 f:\sp\public\sdk\inc\winnls.h -FILE 4989 f:\sp\public\sdk\inc\guiddef.h -FILE 4990 f:\sp\public\sdk\inc\windows.h -FILE 4991 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4992 f:\sp\public\sdk\inc\specstrings.h -FILE 4993 f:\sp\public\sdk\inc\basetsd.h -FILE 4994 f:\sp\public\sdk\inc\stralign.h -FILE 4995 f:\sp\public\sdk\inc\tvout.h -FILE 4996 f:\sp\public\sdk\inc\winsvc.h -FILE 4997 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4998 f:\sp\public\sdk\inc\wingdi.h -FILE 4999 f:\sp\public\sdk\inc\pshpack4.h -FILE 5000 f:\sp\public\sdk\inc\poppack.h -FILE 5001 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 5002 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 5003 f:\sp\public\sdk\inc\winnetwk.h -FILE 5004 f:\sp\public\sdk\inc\imm.h -FILE 5005 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5006 f:\sp\public\sdk\inc\windef.h -FILE 5007 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5008 f:\sp\vctools\crt_bld\self_x86\crt\src\initcon.c -FILE 5009 f:\sp\public\sdk\inc\pshpack1.h -FILE 5010 f:\sp\public\sdk\inc\winver.h -FILE 5011 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5012 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5013 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5014 f:\sp\public\sdk\inc\winnt.h -FILE 5015 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5016 f:\sp\public\sdk\inc\ddbanned.h -FILE 5017 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5018 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5019 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5020 f:\sp\public\sdk\inc\winreg.h -FILE 5021 f:\sp\public\sdk\inc\winbase.h -FILE 5022 f:\sp\public\sdk\inc\winerror.h -FILE 5023 f:\sp\public\sdk\inc\pshpack8.h -FILE 5024 f:\sp\public\sdk\inc\poppack.h -FILE 5025 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 5026 f:\sp\public\sdk\inc\winnetwk.h -FILE 5027 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5028 f:\sp\public\sdk\inc\imm.h -FILE 5029 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5030 f:\sp\public\sdk\inc\windef.h -FILE 5031 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5032 f:\sp\public\sdk\inc\pshpack1.h -FILE 5033 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5034 f:\sp\public\sdk\inc\winver.h -FILE 5035 f:\sp\public\sdk\inc\windows.h -FILE 5036 f:\sp\public\sdk\inc\winnt.h -FILE 5037 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5038 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5039 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5040 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5041 f:\sp\public\sdk\inc\winreg.h -FILE 5042 f:\sp\public\sdk\inc\winbase.h -FILE 5043 f:\sp\vctools\crt_bld\self_x86\crt\src\commit.c -FILE 5044 f:\sp\public\sdk\inc\winerror.h -FILE 5045 f:\sp\public\sdk\inc\pshpack8.h -FILE 5046 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5047 f:\sp\public\sdk\inc\reason.h -FILE 5048 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 5049 f:\sp\public\sdk\inc\wincon.h -FILE 5050 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5051 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5052 f:\sp\public\sdk\inc\ddbanned.h -FILE 5053 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5054 f:\sp\public\sdk\inc\pshpack2.h -FILE 5055 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5056 f:\sp\public\sdk\inc\mcx.h -FILE 5057 f:\sp\public\sdk\inc\winuser.h -FILE 5058 f:\sp\public\sdk\inc\winnls.h -FILE 5059 f:\sp\public\sdk\inc\guiddef.h -FILE 5060 f:\sp\public\sdk\inc\specstrings.h -FILE 5061 f:\sp\public\sdk\inc\basetsd.h -FILE 5062 f:\sp\public\sdk\inc\stralign.h -FILE 5063 f:\sp\public\sdk\inc\tvout.h -FILE 5064 f:\sp\public\sdk\inc\winsvc.h -FILE 5065 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5066 f:\sp\public\sdk\inc\wingdi.h -FILE 5067 f:\sp\public\sdk\inc\pshpack4.h -FILE 5068 f:\sp\public\sdk\inc\reason.h -FILE 5069 f:\sp\public\sdk\inc\wincon.h -FILE 5070 f:\sp\vctools\crt_bld\self_x86\crt\src\io.h -FILE 5071 f:\sp\public\sdk\inc\poppack.h -FILE 5072 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5073 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5074 f:\sp\public\sdk\inc\mcx.h -FILE 5075 f:\sp\public\sdk\inc\winuser.h -FILE 5076 f:\sp\public\sdk\inc\winnls.h -FILE 5077 f:\sp\public\sdk\inc\stralign.h -FILE 5078 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5079 f:\sp\public\sdk\inc\windef.h -FILE 5080 f:\sp\public\sdk\inc\tvout.h -FILE 5081 f:\sp\public\sdk\inc\winsvc.h -FILE 5082 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5083 f:\sp\public\sdk\inc\wingdi.h -FILE 5084 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 5085 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5086 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5087 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 5088 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5089 f:\sp\public\sdk\inc\winnt.h -FILE 5090 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5091 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5092 f:\sp\public\sdk\inc\winnetwk.h -FILE 5093 f:\sp\public\sdk\inc\imm.h -FILE 5094 f:\sp\vctools\crt_bld\self_x86\crt\src\close.c -FILE 5095 f:\sp\public\sdk\inc\winbase.h -FILE 5096 f:\sp\public\sdk\inc\winerror.h -FILE 5097 f:\sp\public\sdk\inc\pshpack1.h -FILE 5098 f:\sp\public\sdk\inc\pshpack8.h -FILE 5099 f:\sp\public\sdk\inc\winver.h -FILE 5100 f:\sp\public\sdk\inc\ddbanned.h -FILE 5101 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5102 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5103 f:\sp\public\sdk\inc\pshpack2.h -FILE 5104 f:\sp\public\sdk\inc\winreg.h -FILE 5105 f:\sp\public\sdk\inc\guiddef.h -FILE 5106 f:\sp\public\sdk\inc\windows.h -FILE 5107 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5108 f:\sp\public\sdk\inc\specstrings.h -FILE 5109 f:\sp\public\sdk\inc\basetsd.h -FILE 5110 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5111 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5112 f:\sp\public\sdk\inc\pshpack4.h -FILE 5113 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\ulldvrm.asm -FILE 5114 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 5115 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 5116 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\llmul.asm -FILE 5117 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 5118 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 5119 f:\sp\vctools\crt_bld\self_x86\crt\src\use_ansi.h -FILE 5120 f:\sp\vctools\crt_bld\self_x86\crt\src\new -FILE 5121 f:\sp\vctools\crt_bld\self_x86\crt\src\exception -FILE 5122 f:\sp\vctools\crt_bld\self_x86\crt\src\xstddef -FILE 5123 f:\sp\vctools\crt_bld\self_x86\crt\src\new.cpp -FILE 5124 f:\sp\vctools\crt_bld\self_x86\crt\src\cstddef -FILE 5125 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 5126 f:\sp\vctools\crt_bld\self_x86\crt\src\eh.h -FILE 5127 f:\sp\vctools\crt_bld\self_x86\crt\src\cstdlib -FILE 5128 f:\sp\vctools\crt_bld\self_x86\crt\src\yvals.h -FILE 5129 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5130 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5131 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5132 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5133 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5134 f:\sp\public\sdk\inc\ddbanned.h -FILE 5135 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5136 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5137 f:\sp\public\sdk\inc\poppack.h -FILE 5138 f:\sp\public\sdk\inc\winnetwk.h -FILE 5139 f:\sp\public\sdk\inc\imm.h -FILE 5140 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5141 f:\sp\public\sdk\inc\windef.h -FILE 5142 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5143 f:\sp\public\sdk\inc\pshpack1.h -FILE 5144 f:\sp\public\sdk\inc\winver.h -FILE 5145 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5146 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5147 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5148 f:\sp\public\sdk\inc\winnt.h -FILE 5149 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5150 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5151 f:\sp\public\sdk\inc\winreg.h -FILE 5152 f:\sp\vctools\crt_bld\self_x86\crt\src\_newmode.c -FILE 5153 f:\sp\public\sdk\inc\winbase.h -FILE 5154 f:\sp\public\sdk\inc\winerror.h -FILE 5155 f:\sp\public\sdk\inc\pshpack8.h -FILE 5156 f:\sp\public\sdk\inc\reason.h -FILE 5157 f:\sp\public\sdk\inc\wincon.h -FILE 5158 f:\sp\public\sdk\inc\ddbanned.h -FILE 5159 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5160 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5161 f:\sp\public\sdk\inc\pshpack2.h -FILE 5162 f:\sp\public\sdk\inc\mcx.h -FILE 5163 f:\sp\public\sdk\inc\winuser.h -FILE 5164 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5165 f:\sp\public\sdk\inc\winnls.h -FILE 5166 f:\sp\public\sdk\inc\guiddef.h -FILE 5167 f:\sp\public\sdk\inc\windows.h -FILE 5168 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5169 f:\sp\public\sdk\inc\specstrings.h -FILE 5170 f:\sp\public\sdk\inc\basetsd.h -FILE 5171 f:\sp\public\sdk\inc\stralign.h -FILE 5172 f:\sp\public\sdk\inc\tvout.h -FILE 5173 f:\sp\public\sdk\inc\winsvc.h -FILE 5174 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5175 f:\sp\public\sdk\inc\wingdi.h -FILE 5176 f:\sp\public\sdk\inc\pshpack4.h -FILE 5177 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 5178 f:\sp\public\sdk\inc\winerror.h -FILE 5179 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 5180 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 5181 f:\sp\public\sdk\inc\winreg.h -FILE 5182 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5183 f:\sp\public\sdk\inc\tvout.h -FILE 5184 f:\sp\vctools\crt_bld\self_x86\crt\src\delete.cpp -FILE 5185 f:\sp\public\sdk\inc\wincon.h -FILE 5186 f:\sp\public\sdk\inc\imm.h -FILE 5187 f:\sp\public\sdk\inc\winbase.h -FILE 5188 f:\sp\public\sdk\inc\wingdi.h -FILE 5189 f:\sp\public\sdk\inc\winver.h -FILE 5190 f:\sp\public\sdk\inc\windows.h -FILE 5191 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5192 f:\sp\public\sdk\inc\pshpack2.h -FILE 5193 f:\sp\public\sdk\inc\reason.h -FILE 5194 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5195 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5196 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5197 f:\sp\public\sdk\inc\specstrings.h -FILE 5198 f:\sp\public\sdk\inc\basetsd.h -FILE 5199 f:\sp\public\sdk\inc\pshpack4.h -FILE 5200 f:\sp\public\sdk\inc\winnetwk.h -FILE 5201 f:\sp\public\sdk\inc\stralign.h -FILE 5202 f:\sp\public\sdk\inc\poppack.h -FILE 5203 f:\sp\public\sdk\inc\winsvc.h -FILE 5204 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5205 f:\sp\public\sdk\inc\windef.h -FILE 5206 f:\sp\public\sdk\inc\winuser.h -FILE 5207 f:\sp\public\sdk\inc\mcx.h -FILE 5208 f:\sp\public\sdk\inc\pshpack8.h -FILE 5209 f:\sp\public\sdk\inc\ddbanned.h -FILE 5210 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5211 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5212 f:\sp\public\sdk\inc\guiddef.h -FILE 5213 f:\sp\public\sdk\inc\winnt.h -FILE 5214 f:\sp\public\sdk\inc\winnls.h -FILE 5215 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5216 f:\sp\public\sdk\inc\pshpack1.h -FILE 5217 f:\sp\public\sdk\inc\tvout.h -FILE 5218 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5219 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 5220 f:\sp\public\sdk\inc\wincon.h -FILE 5221 f:\sp\public\sdk\inc\imm.h -FILE 5222 f:\sp\public\sdk\inc\winbase.h -FILE 5223 f:\sp\public\sdk\inc\wingdi.h -FILE 5224 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5225 f:\sp\public\sdk\inc\winver.h -FILE 5226 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5227 f:\sp\public\sdk\inc\windows.h -FILE 5228 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5229 f:\sp\public\sdk\inc\pshpack2.h -FILE 5230 f:\sp\vctools\crt_bld\self_x86\crt\src\handler.cpp -FILE 5231 f:\sp\public\sdk\inc\reason.h -FILE 5232 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5233 f:\sp\public\sdk\inc\specstrings.h -FILE 5234 f:\sp\public\sdk\inc\basetsd.h -FILE 5235 f:\sp\public\sdk\inc\pshpack4.h -FILE 5236 f:\sp\public\sdk\inc\winnetwk.h -FILE 5237 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 5238 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5239 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5240 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5241 f:\sp\public\sdk\inc\stralign.h -FILE 5242 f:\sp\public\sdk\inc\poppack.h -FILE 5243 f:\sp\public\sdk\inc\winsvc.h -FILE 5244 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5245 f:\sp\public\sdk\inc\windef.h -FILE 5246 f:\sp\public\sdk\inc\winuser.h -FILE 5247 f:\sp\public\sdk\inc\mcx.h -FILE 5248 f:\sp\public\sdk\inc\pshpack8.h -FILE 5249 f:\sp\public\sdk\inc\guiddef.h -FILE 5250 f:\sp\public\sdk\inc\winnt.h -FILE 5251 f:\sp\public\sdk\inc\winnls.h -FILE 5252 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5253 f:\sp\public\sdk\inc\pshpack1.h -FILE 5254 f:\sp\public\sdk\inc\winerror.h -FILE 5255 f:\sp\public\sdk\inc\ddbanned.h -FILE 5256 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5257 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5258 f:\sp\public\sdk\inc\winreg.h -FILE 5259 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5260 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5261 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 5262 f:\sp\public\sdk\inc\winsvc.h -FILE 5263 f:\sp\public\sdk\inc\wingdi.h -FILE 5264 f:\sp\public\sdk\inc\pshpack4.h -FILE 5265 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5266 f:\sp\public\sdk\inc\poppack.h -FILE 5267 f:\sp\public\sdk\inc\winnt.h -FILE 5268 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5269 f:\sp\public\sdk\inc\winnetwk.h -FILE 5270 f:\sp\public\sdk\inc\imm.h -FILE 5271 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5272 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 5273 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5274 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5275 f:\sp\public\sdk\inc\pshpack1.h -FILE 5276 f:\sp\public\sdk\inc\winver.h -FILE 5277 f:\sp\public\sdk\inc\guiddef.h -FILE 5278 f:\sp\public\sdk\inc\specstrings.h -FILE 5279 f:\sp\public\sdk\inc\basetsd.h -FILE 5280 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5281 f:\sp\vctools\crt_bld\self_x86\crt\src\sbheap.c -FILE 5282 f:\sp\public\sdk\inc\windows.h -FILE 5283 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5284 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5285 f:\sp\public\sdk\inc\winreg.h -FILE 5286 f:\sp\public\sdk\inc\winbase.h -FILE 5287 f:\sp\public\sdk\inc\winerror.h -FILE 5288 f:\sp\public\sdk\inc\pshpack8.h -FILE 5289 f:\sp\public\sdk\inc\ddbanned.h -FILE 5290 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5291 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5292 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5293 f:\sp\public\sdk\inc\reason.h -FILE 5294 f:\sp\public\sdk\inc\wincon.h -FILE 5295 f:\sp\public\sdk\inc\pshpack2.h -FILE 5296 f:\sp\public\sdk\inc\mcx.h -FILE 5297 f:\sp\public\sdk\inc\winuser.h -FILE 5298 f:\sp\public\sdk\inc\winnls.h -FILE 5299 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5300 f:\sp\public\sdk\inc\windef.h -FILE 5301 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5302 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5303 f:\sp\public\sdk\inc\stralign.h -FILE 5304 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5305 f:\sp\public\sdk\inc\tvout.h -FILE 5306 f:\sp\public\sdk\inc\winver.h -FILE 5307 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 5308 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 5309 f:\sp\public\sdk\inc\guiddef.h -FILE 5310 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5311 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5312 f:\sp\public\sdk\inc\specstrings.h -FILE 5313 f:\sp\public\sdk\inc\basetsd.h -FILE 5314 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5315 f:\sp\public\sdk\inc\windows.h -FILE 5316 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5317 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5318 f:\sp\public\sdk\inc\winreg.h -FILE 5319 f:\sp\public\sdk\inc\winbase.h -FILE 5320 f:\sp\public\sdk\inc\winerror.h -FILE 5321 f:\sp\public\sdk\inc\pshpack8.h -FILE 5322 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5323 f:\sp\public\sdk\inc\reason.h -FILE 5324 f:\sp\public\sdk\inc\wincon.h -FILE 5325 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5326 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5327 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5328 f:\sp\public\sdk\inc\pshpack2.h -FILE 5329 f:\sp\public\sdk\inc\mcx.h -FILE 5330 f:\sp\public\sdk\inc\winuser.h -FILE 5331 f:\sp\public\sdk\inc\winnls.h -FILE 5332 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5333 f:\sp\public\sdk\inc\windef.h -FILE 5334 f:\sp\public\sdk\inc\stralign.h -FILE 5335 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5336 f:\sp\public\sdk\inc\tvout.h -FILE 5337 f:\sp\public\sdk\inc\winsvc.h -FILE 5338 f:\sp\vctools\crt_bld\self_x86\crt\src\realloc.c -FILE 5339 f:\sp\public\sdk\inc\wingdi.h -FILE 5340 f:\sp\public\sdk\inc\pshpack4.h -FILE 5341 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5342 f:\sp\public\sdk\inc\poppack.h -FILE 5343 f:\sp\public\sdk\inc\winnt.h -FILE 5344 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5345 f:\sp\public\sdk\inc\winnetwk.h -FILE 5346 f:\sp\public\sdk\inc\ddbanned.h -FILE 5347 f:\sp\public\sdk\inc\imm.h -FILE 5348 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5349 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5350 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5351 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5352 f:\sp\public\sdk\inc\pshpack1.h -FILE 5353 f:\sp\public\sdk\inc\pshpack2.h -FILE 5354 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5355 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5356 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5357 f:\sp\public\sdk\inc\mcx.h -FILE 5358 f:\sp\public\sdk\inc\winuser.h -FILE 5359 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5360 f:\sp\public\sdk\inc\winnls.h -FILE 5361 f:\sp\public\sdk\inc\guiddef.h -FILE 5362 f:\sp\public\sdk\inc\windows.h -FILE 5363 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5364 f:\sp\public\sdk\inc\specstrings.h -FILE 5365 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5366 f:\sp\public\sdk\inc\basetsd.h -FILE 5367 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5368 f:\sp\public\sdk\inc\stralign.h -FILE 5369 f:\sp\public\sdk\inc\tvout.h -FILE 5370 f:\sp\public\sdk\inc\winsvc.h -FILE 5371 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5372 f:\sp\public\sdk\inc\wingdi.h -FILE 5373 f:\sp\public\sdk\inc\pshpack4.h -FILE 5374 f:\sp\public\sdk\inc\poppack.h -FILE 5375 f:\sp\public\sdk\inc\winnetwk.h -FILE 5376 f:\sp\public\sdk\inc\imm.h -FILE 5377 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5378 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5379 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5380 f:\sp\public\sdk\inc\windef.h -FILE 5381 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5382 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5383 f:\sp\vctools\crt_bld\self_x86\crt\src\msize.c -FILE 5384 f:\sp\public\sdk\inc\pshpack1.h -FILE 5385 f:\sp\public\sdk\inc\winver.h -FILE 5386 f:\sp\public\sdk\inc\winnt.h -FILE 5387 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5388 f:\sp\public\sdk\inc\winreg.h -FILE 5389 f:\sp\public\sdk\inc\ddbanned.h -FILE 5390 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5391 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5392 f:\sp\public\sdk\inc\winbase.h -FILE 5393 f:\sp\public\sdk\inc\winerror.h -FILE 5394 f:\sp\public\sdk\inc\pshpack8.h -FILE 5395 f:\sp\public\sdk\inc\reason.h -FILE 5396 f:\sp\public\sdk\inc\wincon.h -FILE 5397 f:\sp\public\sdk\inc\pshpack2.h -FILE 5398 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5399 f:\sp\public\sdk\inc\mcx.h -FILE 5400 f:\sp\public\sdk\inc\winuser.h -FILE 5401 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5402 f:\sp\public\sdk\inc\winnls.h -FILE 5403 f:\sp\public\sdk\inc\guiddef.h -FILE 5404 f:\sp\public\sdk\inc\windows.h -FILE 5405 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5406 f:\sp\public\sdk\inc\specstrings.h -FILE 5407 f:\sp\public\sdk\inc\basetsd.h -FILE 5408 f:\sp\public\sdk\inc\stralign.h -FILE 5409 f:\sp\public\sdk\inc\tvout.h -FILE 5410 f:\sp\public\sdk\inc\winsvc.h -FILE 5411 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5412 f:\sp\public\sdk\inc\wingdi.h -FILE 5413 f:\sp\public\sdk\inc\pshpack4.h -FILE 5414 f:\sp\public\sdk\inc\poppack.h -FILE 5415 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5416 f:\sp\public\sdk\inc\winnetwk.h -FILE 5417 f:\sp\public\sdk\inc\imm.h -FILE 5418 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5419 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5420 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5421 f:\sp\public\sdk\inc\windef.h -FILE 5422 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5423 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5424 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5425 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.c -FILE 5426 f:\sp\public\sdk\inc\pshpack1.h -FILE 5427 f:\sp\public\sdk\inc\winver.h -FILE 5428 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 5429 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 5430 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 5431 f:\sp\public\sdk\inc\winnt.h -FILE 5432 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5433 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5434 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5435 f:\sp\public\sdk\inc\winreg.h -FILE 5436 f:\sp\public\sdk\inc\ddbanned.h -FILE 5437 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5438 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5439 f:\sp\public\sdk\inc\winbase.h -FILE 5440 f:\sp\public\sdk\inc\winerror.h -FILE 5441 f:\sp\public\sdk\inc\pshpack8.h -FILE 5442 f:\sp\public\sdk\inc\reason.h -FILE 5443 f:\sp\public\sdk\inc\wincon.h -FILE 5444 f:\sp\public\sdk\inc\winver.h -FILE 5445 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 5446 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5447 f:\sp\public\sdk\inc\winnt.h -FILE 5448 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5449 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5450 f:\sp\public\sdk\inc\winreg.h -FILE 5451 f:\sp\public\sdk\inc\winbase.h -FILE 5452 f:\sp\public\sdk\inc\winerror.h -FILE 5453 f:\sp\public\sdk\inc\pshpack8.h -FILE 5454 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5455 f:\sp\public\sdk\inc\reason.h -FILE 5456 f:\sp\public\sdk\inc\wincon.h -FILE 5457 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5458 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5459 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5460 f:\sp\public\sdk\inc\pshpack2.h -FILE 5461 f:\sp\public\sdk\inc\mcx.h -FILE 5462 f:\sp\public\sdk\inc\winuser.h -FILE 5463 f:\sp\public\sdk\inc\winnls.h -FILE 5464 f:\sp\public\sdk\inc\guiddef.h -FILE 5465 f:\sp\public\sdk\inc\stralign.h -FILE 5466 f:\sp\public\sdk\inc\specstrings.h -FILE 5467 f:\sp\public\sdk\inc\basetsd.h -FILE 5468 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5469 f:\sp\public\sdk\inc\windows.h -FILE 5470 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5471 f:\sp\public\sdk\inc\tvout.h -FILE 5472 f:\sp\public\sdk\inc\winsvc.h -FILE 5473 f:\sp\vctools\crt_bld\self_x86\crt\src\heapinit.c -FILE 5474 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5475 f:\sp\public\sdk\inc\wingdi.h -FILE 5476 f:\sp\public\sdk\inc\pshpack4.h -FILE 5477 f:\sp\public\sdk\inc\poppack.h -FILE 5478 f:\sp\public\sdk\inc\winnetwk.h -FILE 5479 f:\sp\public\sdk\inc\ddbanned.h -FILE 5480 f:\sp\public\sdk\inc\imm.h -FILE 5481 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5482 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5483 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5484 f:\sp\public\sdk\inc\windef.h -FILE 5485 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5486 f:\sp\public\sdk\inc\pshpack1.h -FILE 5487 f:\sp\public\sdk\inc\pshpack2.h -FILE 5488 f:\sp\public\sdk\inc\mcx.h -FILE 5489 f:\sp\public\sdk\inc\winuser.h -FILE 5490 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5491 f:\sp\public\sdk\inc\winnls.h -FILE 5492 f:\sp\public\sdk\inc\guiddef.h -FILE 5493 f:\sp\public\sdk\inc\windows.h -FILE 5494 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5495 f:\sp\public\sdk\inc\specstrings.h -FILE 5496 f:\sp\public\sdk\inc\basetsd.h -FILE 5497 f:\sp\public\sdk\inc\stralign.h -FILE 5498 f:\sp\public\sdk\inc\tvout.h -FILE 5499 f:\sp\public\sdk\inc\winsvc.h -FILE 5500 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5501 f:\sp\public\sdk\inc\wingdi.h -FILE 5502 f:\sp\public\sdk\inc\pshpack4.h -FILE 5503 f:\sp\public\sdk\inc\poppack.h -FILE 5504 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5505 f:\sp\public\sdk\inc\winnetwk.h -FILE 5506 f:\sp\public\sdk\inc\imm.h -FILE 5507 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5508 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5509 f:\sp\public\sdk\inc\windef.h -FILE 5510 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5511 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5512 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5513 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5514 f:\sp\public\sdk\inc\pshpack1.h -FILE 5515 f:\sp\vctools\crt_bld\self_x86\crt\src\free.c -FILE 5516 f:\sp\public\sdk\inc\winver.h -FILE 5517 f:\sp\public\sdk\inc\winnt.h -FILE 5518 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5519 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 5520 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 5521 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5522 f:\sp\public\sdk\inc\winreg.h -FILE 5523 f:\sp\public\sdk\inc\ddbanned.h -FILE 5524 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5525 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5526 f:\sp\public\sdk\inc\winbase.h -FILE 5527 f:\sp\public\sdk\inc\winerror.h -FILE 5528 f:\sp\public\sdk\inc\pshpack8.h -FILE 5529 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5530 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5531 f:\sp\public\sdk\inc\reason.h -FILE 5532 f:\sp\public\sdk\inc\wincon.h -FILE 5533 f:\sp\public\sdk\inc\pshpack2.h -FILE 5534 f:\sp\public\sdk\inc\mcx.h -FILE 5535 f:\sp\public\sdk\inc\winuser.h -FILE 5536 f:\sp\public\sdk\inc\winnls.h -FILE 5537 f:\sp\public\sdk\inc\guiddef.h -FILE 5538 f:\sp\public\sdk\inc\windows.h -FILE 5539 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5540 f:\sp\public\sdk\inc\specstrings.h -FILE 5541 f:\sp\public\sdk\inc\basetsd.h -FILE 5542 f:\sp\public\sdk\inc\stralign.h -FILE 5543 f:\sp\public\sdk\inc\tvout.h -FILE 5544 f:\sp\public\sdk\inc\winsvc.h -FILE 5545 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5546 f:\sp\public\sdk\inc\wingdi.h -FILE 5547 f:\sp\public\sdk\inc\pshpack4.h -FILE 5548 f:\sp\public\sdk\inc\poppack.h -FILE 5549 f:\sp\public\sdk\inc\winnetwk.h -FILE 5550 f:\sp\public\sdk\inc\imm.h -FILE 5551 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5552 f:\sp\public\sdk\inc\windef.h -FILE 5553 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5554 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5555 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5556 f:\sp\public\sdk\inc\pshpack1.h -FILE 5557 f:\sp\vctools\crt_bld\self_x86\crt\src\crtheap.c -FILE 5558 f:\sp\public\sdk\inc\winver.h -FILE 5559 f:\sp\public\sdk\inc\winnt.h -FILE 5560 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5561 f:\sp\public\sdk\inc\winreg.h -FILE 5562 f:\sp\public\sdk\inc\ddbanned.h -FILE 5563 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5564 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5565 f:\sp\public\sdk\inc\winbase.h -FILE 5566 f:\sp\public\sdk\inc\winerror.h -FILE 5567 f:\sp\public\sdk\inc\pshpack8.h -FILE 5568 f:\sp\public\sdk\inc\reason.h -FILE 5569 f:\sp\public\sdk\inc\wincon.h -FILE 5570 f:\sp\public\sdk\inc\pshpack2.h -FILE 5571 f:\sp\public\sdk\inc\mcx.h -FILE 5572 f:\sp\public\sdk\inc\winuser.h -FILE 5573 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 5574 f:\sp\public\sdk\inc\winnls.h -FILE 5575 f:\sp\public\sdk\inc\stralign.h -FILE 5576 f:\sp\public\sdk\inc\tvout.h -FILE 5577 f:\sp\public\sdk\inc\winsvc.h -FILE 5578 f:\sp\public\sdk\inc\wingdi.h -FILE 5579 f:\sp\public\sdk\inc\winnt.h -FILE 5580 f:\sp\public\sdk\inc\pshpack4.h -FILE 5581 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 5582 f:\sp\public\sdk\inc\poppack.h -FILE 5583 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 5584 f:\sp\public\sdk\inc\winnetwk.h -FILE 5585 f:\sp\public\sdk\inc\imm.h -FILE 5586 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 5587 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 5588 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 5589 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 5590 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 5591 f:\sp\public\sdk\inc\pshpack1.h -FILE 5592 f:\sp\vctools\crt_bld\self_x86\crt\src\calloc.c -FILE 5593 f:\sp\public\sdk\inc\winver.h -FILE 5594 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 5595 f:\sp\public\sdk\inc\guiddef.h -FILE 5596 f:\sp\public\sdk\inc\windows.h -FILE 5597 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 5598 f:\sp\public\sdk\inc\specstrings.h -FILE 5599 f:\sp\public\sdk\inc\basetsd.h -FILE 5600 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 5601 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 5602 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 5603 f:\sp\public\sdk\inc\winreg.h -FILE 5604 f:\sp\public\sdk\inc\ddbanned.h -FILE 5605 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 5606 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 5607 f:\sp\public\sdk\inc\winbase.h -FILE 5608 f:\sp\public\sdk\inc\winerror.h -FILE 5609 f:\sp\public\sdk\inc\pshpack8.h -FILE 5610 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 5611 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 5612 f:\sp\public\sdk\inc\reason.h -FILE 5613 f:\sp\public\sdk\inc\wincon.h -FILE 5614 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 5615 f:\sp\public\sdk\inc\windef.h -FILE 5616 f:\sp\public\sdk\inc\wincon.h -FILE 5617 f:\sp\public\sdk\inc\imm.h -FILE 5618 f:\sp\public\sdk\inc\winbase.h -FILE 5619 f:\sp\public\sdk\inc\wingdi.h -FILE 5620 f:\sp\public\sdk\inc\winver.h -FILE 5621 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 5622 f:\sp\public\sdk\inc\pshpack2.h -FILE 5623 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 5624 f:\sp\public\sdk\inc\reason.h -FILE 5625 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 5626 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\setjmp.h -FILE 5627 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\i386\trnsctrl.cpp -FILE 5628 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\process.h -FILE 5629 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 5630 f:\sp\public\sdk\inc\specstrings.h -FILE 5631 f:\sp\public\sdk\inc\basetsd.h -FILE 5632 f:\sp\public\sdk\inc\pshpack4.h -FILE 5633 f:\sp\public\sdk\inc\winnetwk.h -FILE 5634 f:\sp\public\sdk\inc\stralign.h -FILE 5635 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\trnsctrl.h -FILE 5636 f:\sp\public\sdk\inc\poppack.h -FILE 5637 f:\sp\public\sdk\inc\winsvc.h -FILE 5638 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5639 f:\sp\public\sdk\inc\windef.h -FILE 5640 f:\sp\public\sdk\inc\winuser.h -FILE 5641 f:\sp\public\sdk\inc\windows.h -FILE 5642 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5643 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5644 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5645 f:\sp\public\sdk\inc\mcx.h -FILE 5646 f:\sp\public\sdk\inc\pshpack8.h -FILE 5647 f:\sp\public\sdk\inc\guiddef.h -FILE 5648 f:\sp\public\sdk\inc\winnt.h -FILE 5649 f:\sp\public\sdk\inc\winnls.h -FILE 5650 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5651 f:\sp\public\sdk\inc\pshpack1.h -FILE 5652 f:\sp\public\sdk\inc\winerror.h -FILE 5653 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5654 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5655 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 5656 f:\sp\public\sdk\inc\winreg.h -FILE 5657 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5658 f:\sp\public\sdk\inc\ddbanned.h -FILE 5659 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5660 f:\sp\public\sdk\inc\tvout.h -FILE 5661 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5662 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5663 f:\sp\vctools\langapi\include\ehdata.h -FILE 5664 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5665 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\eh\i386\lowhelpr.asm -FILE 5666 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\cruntime.inc -FILE 5667 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 5668 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\process.h -FILE 5669 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5670 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5671 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\i386\ehprolg3.c -FILE 5672 f:\sp\public\sdk\inc\ddbanned.h -FILE 5673 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5674 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5675 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 5676 f:\sp\public\sdk\inc\wincon.h -FILE 5677 f:\sp\public\sdk\inc\imm.h -FILE 5678 f:\sp\public\sdk\inc\winbase.h -FILE 5679 f:\sp\public\sdk\inc\wingdi.h -FILE 5680 f:\sp\public\sdk\inc\winver.h -FILE 5681 f:\sp\public\sdk\inc\pshpack2.h -FILE 5682 f:\sp\public\sdk\inc\reason.h -FILE 5683 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\validate.cpp -FILE 5684 f:\sp\public\sdk\inc\specstrings.h -FILE 5685 f:\sp\public\sdk\inc\basetsd.h -FILE 5686 f:\sp\public\sdk\inc\pshpack4.h -FILE 5687 f:\sp\public\sdk\inc\winnetwk.h -FILE 5688 f:\sp\public\sdk\inc\stralign.h -FILE 5689 f:\sp\public\sdk\inc\poppack.h -FILE 5690 f:\sp\public\sdk\inc\winsvc.h -FILE 5691 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5692 f:\sp\public\sdk\inc\windef.h -FILE 5693 f:\sp\public\sdk\inc\winuser.h -FILE 5694 f:\sp\public\sdk\inc\windows.h -FILE 5695 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5696 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5697 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5698 f:\sp\public\sdk\inc\mcx.h -FILE 5699 f:\sp\public\sdk\inc\pshpack8.h -FILE 5700 f:\sp\public\sdk\inc\guiddef.h -FILE 5701 f:\sp\public\sdk\inc\winnt.h -FILE 5702 f:\sp\public\sdk\inc\winnls.h -FILE 5703 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5704 f:\sp\public\sdk\inc\pshpack1.h -FILE 5705 f:\sp\public\sdk\inc\winerror.h -FILE 5706 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5707 f:\sp\public\sdk\inc\winreg.h -FILE 5708 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5709 f:\sp\public\sdk\inc\ddbanned.h -FILE 5710 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5711 f:\sp\public\sdk\inc\tvout.h -FILE 5712 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5713 f:\sp\public\sdk\inc\wincon.h -FILE 5714 f:\sp\public\sdk\inc\imm.h -FILE 5715 f:\sp\public\sdk\inc\winbase.h -FILE 5716 f:\sp\public\sdk\inc\wingdi.h -FILE 5717 f:\sp\public\sdk\inc\winver.h -FILE 5718 f:\sp\public\sdk\inc\pshpack2.h -FILE 5719 f:\sp\public\sdk\inc\reason.h -FILE 5720 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 5721 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\unhandld.cpp -FILE 5722 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5723 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 5724 f:\sp\public\sdk\inc\specstrings.h -FILE 5725 f:\sp\public\sdk\inc\basetsd.h -FILE 5726 f:\sp\public\sdk\inc\pshpack4.h -FILE 5727 f:\sp\public\sdk\inc\winnetwk.h -FILE 5728 f:\sp\public\sdk\inc\stralign.h -FILE 5729 f:\sp\public\sdk\inc\poppack.h -FILE 5730 f:\sp\public\sdk\inc\winsvc.h -FILE 5731 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5732 f:\sp\public\sdk\inc\windef.h -FILE 5733 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 5734 f:\sp\public\sdk\inc\winuser.h -FILE 5735 f:\sp\public\sdk\inc\windows.h -FILE 5736 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5737 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5738 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5739 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 5740 f:\sp\public\sdk\inc\mcx.h -FILE 5741 f:\sp\public\sdk\inc\pshpack8.h -FILE 5742 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 5743 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5744 f:\sp\public\sdk\inc\guiddef.h -FILE 5745 f:\sp\public\sdk\inc\winnt.h -FILE 5746 f:\sp\public\sdk\inc\winnls.h -FILE 5747 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5748 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5749 f:\sp\public\sdk\inc\pshpack1.h -FILE 5750 f:\sp\public\sdk\inc\winerror.h -FILE 5751 f:\sp\vctools\langapi\include\ehdata.h -FILE 5752 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5753 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 5754 f:\sp\public\sdk\inc\winreg.h -FILE 5755 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5756 f:\sp\public\sdk\inc\ddbanned.h -FILE 5757 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5758 f:\sp\public\sdk\inc\tvout.h -FILE 5759 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5760 f:\sp\public\sdk\inc\specstrings.h -FILE 5761 f:\sp\public\sdk\inc\basetsd.h -FILE 5762 f:\sp\public\sdk\inc\pshpack4.h -FILE 5763 f:\sp\public\sdk\inc\winnetwk.h -FILE 5764 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5765 f:\sp\public\sdk\inc\stralign.h -FILE 5766 f:\sp\public\sdk\inc\poppack.h -FILE 5767 f:\sp\public\sdk\inc\winsvc.h -FILE 5768 f:\sp\public\sdk\inc\winuser.h -FILE 5769 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5770 f:\sp\public\sdk\inc\windef.h -FILE 5771 f:\sp\vctools\langapi\undname\undname.cxx -FILE 5772 f:\sp\public\sdk\inc\mcx.h -FILE 5773 f:\sp\public\sdk\inc\pshpack8.h -FILE 5774 f:\sp\public\sdk\inc\guiddef.h -FILE 5775 f:\sp\vctools\langapi\undname\utf8.h -FILE 5776 f:\sp\public\sdk\inc\winnls.h -FILE 5777 f:\sp\public\sdk\inc\pshpack1.h -FILE 5778 f:\sp\public\sdk\inc\winnt.h -FILE 5779 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5780 f:\sp\public\sdk\inc\winerror.h -FILE 5781 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\swprintf.inl -FILE 5782 f:\sp\vctools\langapi\undname\undname.hxx -FILE 5783 f:\sp\vctools\langapi\undname\undname.h -FILE 5784 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5785 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5786 f:\sp\public\sdk\inc\winreg.h -FILE 5787 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5788 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5789 f:\sp\public\sdk\inc\tvout.h -FILE 5790 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdio.h -FILE 5791 f:\sp\public\sdk\inc\wincon.h -FILE 5792 f:\sp\public\sdk\inc\imm.h -FILE 5793 f:\sp\public\sdk\inc\winbase.h -FILE 5794 f:\sp\public\sdk\inc\wingdi.h -FILE 5795 f:\sp\public\sdk\inc\winver.h -FILE 5796 f:\sp\public\sdk\inc\pshpack2.h -FILE 5797 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5798 f:\sp\public\sdk\inc\windows.h -FILE 5799 f:\sp\public\sdk\inc\reason.h -FILE 5800 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5801 f:\sp\public\sdk\inc\ddbanned.h -FILE 5802 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5803 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5804 f:\sp\vctools\langapi\undname\undname.inl -FILE 5805 f:\sp\public\sdk\inc\guiddef.h -FILE 5806 f:\sp\public\sdk\inc\winnt.h -FILE 5807 f:\sp\public\sdk\inc\winnls.h -FILE 5808 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5809 f:\sp\public\sdk\inc\pshpack1.h -FILE 5810 f:\sp\public\sdk\inc\winerror.h -FILE 5811 f:\sp\public\sdk\inc\winreg.h -FILE 5812 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5813 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5814 f:\sp\public\sdk\inc\tvout.h -FILE 5815 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp -FILE 5816 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 5817 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 5818 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5819 f:\sp\public\sdk\inc\wincon.h -FILE 5820 f:\sp\public\sdk\inc\imm.h -FILE 5821 f:\sp\public\sdk\inc\winbase.h -FILE 5822 f:\sp\public\sdk\inc\wingdi.h -FILE 5823 f:\sp\public\sdk\inc\winver.h -FILE 5824 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5825 f:\sp\public\sdk\inc\windows.h -FILE 5826 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5827 f:\sp\public\sdk\inc\pshpack2.h -FILE 5828 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5829 f:\sp\public\sdk\inc\reason.h -FILE 5830 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 5831 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 5832 f:\sp\public\sdk\inc\specstrings.h -FILE 5833 f:\sp\public\sdk\inc\basetsd.h -FILE 5834 f:\sp\public\sdk\inc\pshpack4.h -FILE 5835 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\typeinfo.h -FILE 5836 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 5837 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 5838 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 5839 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5840 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 5841 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 5842 f:\sp\public\sdk\inc\winnetwk.h -FILE 5843 f:\sp\vctools\langapi\undname\undname.h -FILE 5844 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 5845 f:\sp\public\sdk\inc\stralign.h -FILE 5846 f:\sp\public\sdk\inc\poppack.h -FILE 5847 f:\sp\public\sdk\inc\winsvc.h -FILE 5848 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5849 f:\sp\public\sdk\inc\windef.h -FILE 5850 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 5851 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5852 f:\sp\public\sdk\inc\winuser.h -FILE 5853 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5854 f:\sp\public\sdk\inc\ddbanned.h -FILE 5855 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5856 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5857 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 5858 f:\sp\public\sdk\inc\mcx.h -FILE 5859 f:\sp\public\sdk\inc\pshpack8.h -FILE 5860 f:\sp\public\sdk\inc\winnls.h -FILE 5861 f:\sp\public\sdk\inc\pshpack1.h -FILE 5862 f:\sp\public\sdk\inc\winnt.h -FILE 5863 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5864 f:\sp\public\sdk\inc\winerror.h -FILE 5865 f:\sp\public\sdk\inc\winreg.h -FILE 5866 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5867 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5868 f:\sp\public\sdk\inc\tvout.h -FILE 5869 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 5870 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 5871 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 5872 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5873 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp -FILE 5874 f:\sp\public\sdk\inc\wincon.h -FILE 5875 f:\sp\public\sdk\inc\imm.h -FILE 5876 f:\sp\public\sdk\inc\winbase.h -FILE 5877 f:\sp\public\sdk\inc\wingdi.h -FILE 5878 f:\sp\public\sdk\inc\winver.h -FILE 5879 f:\sp\public\sdk\inc\pshpack2.h -FILE 5880 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5881 f:\sp\public\sdk\inc\reason.h -FILE 5882 f:\sp\public\sdk\inc\windows.h -FILE 5883 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5884 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5885 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5886 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5887 f:\sp\public\sdk\inc\specstrings.h -FILE 5888 f:\sp\public\sdk\inc\basetsd.h -FILE 5889 f:\sp\public\sdk\inc\pshpack4.h -FILE 5890 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 5891 f:\sp\public\sdk\inc\winnetwk.h -FILE 5892 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 5893 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 5894 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5895 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 5896 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 5897 f:\sp\public\sdk\inc\stralign.h -FILE 5898 f:\sp\public\sdk\inc\poppack.h -FILE 5899 f:\sp\public\sdk\inc\winsvc.h -FILE 5900 f:\sp\public\sdk\inc\winuser.h -FILE 5901 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5902 f:\sp\public\sdk\inc\windef.h -FILE 5903 f:\sp\vctools\langapi\undname\undname.h -FILE 5904 f:\sp\public\sdk\inc\ddbanned.h -FILE 5905 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 5906 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5907 f:\sp\public\sdk\inc\mcx.h -FILE 5908 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5909 f:\sp\public\sdk\inc\pshpack8.h -FILE 5910 f:\sp\public\sdk\inc\guiddef.h -FILE 5911 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5912 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 5913 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5914 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 5915 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 5916 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\stdexcpt.cpp -FILE 5917 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 5918 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 5919 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5920 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5921 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5922 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5923 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 5924 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5925 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 5926 f:\sp\public\sdk\inc\ddbanned.h -FILE 5927 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5928 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5929 f:\sp\vctools\langapi\include\ehdata.h -FILE 5930 f:\sp\public\sdk\inc\wincon.h -FILE 5931 f:\sp\public\sdk\inc\imm.h -FILE 5932 f:\sp\public\sdk\inc\winbase.h -FILE 5933 f:\sp\public\sdk\inc\wingdi.h -FILE 5934 f:\sp\public\sdk\inc\winver.h -FILE 5935 f:\sp\public\sdk\inc\windows.h -FILE 5936 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 5937 f:\sp\public\sdk\inc\pshpack2.h -FILE 5938 f:\sp\public\sdk\inc\reason.h -FILE 5939 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp -FILE 5940 f:\sp\public\sdk\inc\specstrings.h -FILE 5941 f:\sp\public\sdk\inc\basetsd.h -FILE 5942 f:\sp\public\sdk\inc\pshpack4.h -FILE 5943 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5944 f:\sp\public\sdk\inc\winnetwk.h -FILE 5945 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5946 f:\sp\public\sdk\inc\stralign.h -FILE 5947 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5948 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5949 f:\sp\public\sdk\inc\poppack.h -FILE 5950 f:\sp\public\sdk\inc\winsvc.h -FILE 5951 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5952 f:\sp\public\sdk\inc\windef.h -FILE 5953 f:\sp\public\sdk\inc\winuser.h -FILE 5954 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 5955 f:\sp\public\sdk\inc\mcx.h -FILE 5956 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 5957 f:\sp\public\sdk\inc\pshpack8.h -FILE 5958 f:\sp\public\sdk\inc\guiddef.h -FILE 5959 f:\sp\public\sdk\inc\winnt.h -FILE 5960 f:\sp\public\sdk\inc\winnls.h -FILE 5961 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5962 f:\sp\public\sdk\inc\pshpack1.h -FILE 5963 f:\sp\public\sdk\inc\winerror.h -FILE 5964 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5965 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5966 f:\sp\public\sdk\inc\ddbanned.h -FILE 5967 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 5968 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 5969 f:\sp\public\sdk\inc\winreg.h -FILE 5970 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5971 f:\sp\public\sdk\inc\tvout.h -FILE 5972 f:\sp\public\sdk\inc\poppack.h -FILE 5973 f:\sp\public\sdk\inc\winsvc.h -FILE 5974 f:\sp\public\sdk\inc\windows.h -FILE 5975 f:\sp\public\sdk\inc\winuser.h -FILE 5976 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 5977 f:\sp\public\sdk\inc\windef.h -FILE 5978 f:\sp\public\sdk\inc\mcx.h -FILE 5979 f:\sp\public\sdk\inc\pshpack8.h -FILE 5980 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 5981 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 5982 f:\sp\public\sdk\inc\guiddef.h -FILE 5983 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\hooks.cpp -FILE 5984 f:\sp\public\sdk\inc\winnls.h -FILE 5985 f:\sp\public\sdk\inc\pshpack1.h -FILE 5986 f:\sp\public\sdk\inc\winnt.h -FILE 5987 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 5988 f:\sp\public\sdk\inc\winerror.h -FILE 5989 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 5990 f:\sp\public\sdk\inc\winreg.h -FILE 5991 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 5992 f:\sp\public\sdk\inc\tvout.h -FILE 5993 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 5994 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 5995 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 5996 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 5997 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 5998 f:\sp\public\sdk\inc\wincon.h -FILE 5999 f:\sp\public\sdk\inc\imm.h -FILE 6000 f:\sp\public\sdk\inc\winbase.h -FILE 6001 f:\sp\public\sdk\inc\wingdi.h -FILE 6002 f:\sp\public\sdk\inc\winver.h -FILE 6003 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 6004 f:\sp\public\sdk\inc\pshpack2.h -FILE 6005 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 6006 f:\sp\public\sdk\inc\reason.h -FILE 6007 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 6008 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 6009 f:\sp\public\sdk\inc\specstrings.h -FILE 6010 f:\sp\public\sdk\inc\basetsd.h -FILE 6011 f:\sp\public\sdk\inc\pshpack4.h -FILE 6012 f:\sp\public\sdk\inc\ddbanned.h -FILE 6013 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 6014 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 6015 f:\sp\public\sdk\inc\winnetwk.h -FILE 6016 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 6017 f:\sp\public\sdk\inc\stralign.h -FILE 6018 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 6019 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 6020 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 6021 f:\sp\public\sdk\inc\wincon.h -FILE 6022 f:\sp\public\sdk\inc\imm.h -FILE 6023 f:\sp\public\sdk\inc\guiddef.h -FILE 6024 f:\sp\public\sdk\inc\winbase.h -FILE 6025 f:\sp\public\sdk\inc\wingdi.h -FILE 6026 f:\sp\vctools\langapi\include\ehdata.h -FILE 6027 f:\sp\public\sdk\inc\winver.h -FILE 6028 f:\sp\public\sdk\inc\winnt.h -FILE 6029 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 6030 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 6031 f:\sp\public\sdk\inc\pshpack2.h -FILE 6032 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 6033 f:\sp\public\sdk\inc\reason.h -FILE 6034 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\frame.cpp -FILE 6035 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 6036 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\typeinfo.h -FILE 6037 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 6038 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 6039 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 6040 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 6041 f:\sp\public\sdk\inc\pshpack4.h -FILE 6042 f:\sp\public\sdk\inc\winnetwk.h -FILE 6043 f:\sp\public\sdk\inc\stralign.h -FILE 6044 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 6045 f:\sp\public\sdk\inc\poppack.h -FILE 6046 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 6047 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 6048 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 6049 f:\sp\public\sdk\inc\winsvc.h -FILE 6050 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehstate.h -FILE 6051 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 6052 f:\sp\public\sdk\inc\winuser.h -FILE 6053 f:\sp\public\sdk\inc\windows.h -FILE 6054 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 6055 f:\sp\public\sdk\inc\mcx.h -FILE 6056 f:\sp\public\sdk\inc\pshpack8.h -FILE 6057 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 6058 f:\sp\public\sdk\inc\specstrings.h -FILE 6059 f:\sp\public\sdk\inc\basetsd.h -FILE 6060 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 6061 f:\sp\public\sdk\inc\winnls.h -FILE 6062 f:\sp\public\sdk\inc\pshpack1.h -FILE 6063 f:\sp\public\sdk\inc\winerror.h -FILE 6064 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\trnsctrl.h -FILE 6065 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 6066 f:\sp\public\sdk\inc\winreg.h -FILE 6067 f:\sp\public\sdk\inc\ddbanned.h -FILE 6068 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 6069 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 6070 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 6071 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 6072 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 6073 f:\sp\public\sdk\inc\windef.h -FILE 6074 f:\sp\public\sdk\inc\tvout.h -FILE 6075 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6076 f:\sp\public\sdk\inc\pshpack4.h -FILE 6077 f:\sp\public\sdk\inc\reason.h -FILE 6078 f:\sp\public\sdk\inc\wincon.h -FILE 6079 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6080 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6081 f:\sp\public\sdk\inc\poppack.h -FILE 6082 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6083 f:\sp\public\sdk\inc\mcx.h -FILE 6084 f:\sp\public\sdk\inc\winuser.h -FILE 6085 f:\sp\public\sdk\inc\winnls.h -FILE 6086 f:\sp\public\sdk\inc\stralign.h -FILE 6087 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6088 f:\sp\public\sdk\inc\windef.h -FILE 6089 f:\sp\public\sdk\inc\tvout.h -FILE 6090 f:\sp\public\sdk\inc\winsvc.h -FILE 6091 f:\sp\public\sdk\inc\wingdi.h -FILE 6092 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6093 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6094 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6095 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6096 f:\sp\public\sdk\inc\winnt.h -FILE 6097 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6098 f:\sp\public\sdk\inc\winnetwk.h -FILE 6099 f:\sp\public\sdk\inc\imm.h -FILE 6100 f:\sp\vctools\crt_bld\self_x86\crt\src\dosmap.c -FILE 6101 f:\sp\public\sdk\inc\winbase.h -FILE 6102 f:\sp\public\sdk\inc\winerror.h -FILE 6103 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6104 f:\sp\public\sdk\inc\pshpack1.h -FILE 6105 f:\sp\public\sdk\inc\pshpack8.h -FILE 6106 f:\sp\public\sdk\inc\winver.h -FILE 6107 f:\sp\public\sdk\inc\ddbanned.h -FILE 6108 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6109 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6110 f:\sp\public\sdk\inc\pshpack2.h -FILE 6111 f:\sp\public\sdk\inc\winreg.h -FILE 6112 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6113 f:\sp\public\sdk\inc\guiddef.h -FILE 6114 f:\sp\public\sdk\inc\windows.h -FILE 6115 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6116 f:\sp\public\sdk\inc\specstrings.h -FILE 6117 f:\sp\public\sdk\inc\basetsd.h -FILE 6118 f:\sp\public\sdk\inc\winver.h -FILE 6119 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6120 f:\sp\public\sdk\inc\pshpack2.h -FILE 6121 f:\sp\public\sdk\inc\windows.h -FILE 6122 f:\sp\public\sdk\inc\reason.h -FILE 6123 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6124 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6125 f:\sp\public\sdk\inc\specstrings.h -FILE 6126 f:\sp\public\sdk\inc\basetsd.h -FILE 6127 f:\sp\public\sdk\inc\pshpack4.h -FILE 6128 f:\sp\vctools\crt_bld\self_x86\crt\src\wctomb.c -FILE 6129 f:\sp\public\sdk\inc\winnetwk.h -FILE 6130 f:\sp\public\sdk\inc\stralign.h -FILE 6131 f:\sp\public\sdk\inc\poppack.h -FILE 6132 f:\sp\public\sdk\inc\winsvc.h -FILE 6133 f:\sp\public\sdk\inc\winuser.h -FILE 6134 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6135 f:\sp\public\sdk\inc\windef.h -FILE 6136 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6137 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6138 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6139 f:\sp\public\sdk\inc\mcx.h -FILE 6140 f:\sp\public\sdk\inc\pshpack8.h -FILE 6141 f:\sp\public\sdk\inc\guiddef.h -FILE 6142 f:\sp\public\sdk\inc\winnls.h -FILE 6143 f:\sp\public\sdk\inc\pshpack1.h -FILE 6144 f:\sp\public\sdk\inc\winnt.h -FILE 6145 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6146 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6147 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6148 f:\sp\public\sdk\inc\winerror.h -FILE 6149 f:\sp\public\sdk\inc\winreg.h -FILE 6150 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6151 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6152 f:\sp\public\sdk\inc\tvout.h -FILE 6153 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6154 f:\sp\public\sdk\inc\ddbanned.h -FILE 6155 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6156 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6157 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6158 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6159 f:\sp\public\sdk\inc\wincon.h -FILE 6160 f:\sp\public\sdk\inc\imm.h -FILE 6161 f:\sp\public\sdk\inc\winbase.h -FILE 6162 f:\sp\public\sdk\inc\wingdi.h -FILE 6163 f:\sp\public\sdk\inc\winsvc.h -FILE 6164 f:\sp\public\sdk\inc\winuser.h -FILE 6165 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6166 f:\sp\public\sdk\inc\mcx.h -FILE 6167 f:\sp\public\sdk\inc\pshpack8.h -FILE 6168 f:\sp\public\sdk\inc\guiddef.h -FILE 6169 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6170 f:\sp\public\sdk\inc\windows.h -FILE 6171 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6172 f:\sp\public\sdk\inc\winnls.h -FILE 6173 f:\sp\vctools\crt_bld\self_x86\crt\src\wcstol.c -FILE 6174 f:\sp\public\sdk\inc\pshpack1.h -FILE 6175 f:\sp\public\sdk\inc\winerror.h -FILE 6176 f:\sp\public\sdk\inc\winreg.h -FILE 6177 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6178 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6179 f:\sp\public\sdk\inc\tvout.h -FILE 6180 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6181 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6182 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6183 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6184 f:\sp\public\sdk\inc\wincon.h -FILE 6185 f:\sp\public\sdk\inc\imm.h -FILE 6186 f:\sp\public\sdk\inc\winbase.h -FILE 6187 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6188 f:\sp\public\sdk\inc\wingdi.h -FILE 6189 f:\sp\public\sdk\inc\windef.h -FILE 6190 f:\sp\public\sdk\inc\winver.h -FILE 6191 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6192 f:\sp\public\sdk\inc\pshpack2.h -FILE 6193 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6194 f:\sp\public\sdk\inc\reason.h -FILE 6195 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6196 f:\sp\public\sdk\inc\winnt.h -FILE 6197 f:\sp\public\sdk\inc\specstrings.h -FILE 6198 f:\sp\public\sdk\inc\basetsd.h -FILE 6199 f:\sp\public\sdk\inc\pshpack4.h -FILE 6200 f:\sp\public\sdk\inc\ddbanned.h -FILE 6201 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6202 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6203 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6204 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6205 f:\sp\public\sdk\inc\winnetwk.h -FILE 6206 f:\sp\public\sdk\inc\stralign.h -FILE 6207 f:\sp\public\sdk\inc\poppack.h -FILE 6208 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6209 f:\sp\public\sdk\inc\mcx.h -FILE 6210 f:\sp\public\sdk\inc\pshpack8.h -FILE 6211 f:\sp\public\sdk\inc\guiddef.h -FILE 6212 f:\sp\public\sdk\inc\winnt.h -FILE 6213 f:\sp\public\sdk\inc\winnls.h -FILE 6214 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6215 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6216 f:\sp\public\sdk\inc\pshpack1.h -FILE 6217 f:\sp\public\sdk\inc\winerror.h -FILE 6218 f:\sp\vctools\crt_bld\self_x86\crt\src\tolower.c -FILE 6219 f:\sp\public\sdk\inc\winreg.h -FILE 6220 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6221 f:\sp\public\sdk\inc\tvout.h -FILE 6222 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6223 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6224 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6225 f:\sp\public\sdk\inc\wincon.h -FILE 6226 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 6227 f:\sp\public\sdk\inc\imm.h -FILE 6228 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6229 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6230 f:\sp\public\sdk\inc\winbase.h -FILE 6231 f:\sp\public\sdk\inc\wingdi.h -FILE 6232 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6233 f:\sp\public\sdk\inc\winver.h -FILE 6234 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 6235 f:\sp\public\sdk\inc\windows.h -FILE 6236 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6237 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6238 f:\sp\public\sdk\inc\pshpack2.h -FILE 6239 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6240 f:\sp\public\sdk\inc\reason.h -FILE 6241 f:\sp\public\sdk\inc\specstrings.h -FILE 6242 f:\sp\public\sdk\inc\basetsd.h -FILE 6243 f:\sp\public\sdk\inc\pshpack4.h -FILE 6244 f:\sp\public\sdk\inc\winnetwk.h -FILE 6245 f:\sp\public\sdk\inc\ddbanned.h -FILE 6246 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6247 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6248 f:\sp\public\sdk\inc\stralign.h -FILE 6249 f:\sp\public\sdk\inc\poppack.h -FILE 6250 f:\sp\public\sdk\inc\winsvc.h -FILE 6251 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6252 f:\sp\public\sdk\inc\windef.h -FILE 6253 f:\sp\public\sdk\inc\winuser.h -FILE 6254 f:\sp\public\sdk\inc\winsvc.h -FILE 6255 f:\sp\public\sdk\inc\winuser.h -FILE 6256 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6257 f:\sp\public\sdk\inc\mcx.h -FILE 6258 f:\sp\public\sdk\inc\pshpack8.h -FILE 6259 f:\sp\public\sdk\inc\guiddef.h -FILE 6260 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6261 f:\sp\public\sdk\inc\windows.h -FILE 6262 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6263 f:\sp\public\sdk\inc\winnls.h -FILE 6264 f:\sp\vctools\crt_bld\self_x86\crt\src\strtoq.c -FILE 6265 f:\sp\public\sdk\inc\pshpack1.h -FILE 6266 f:\sp\public\sdk\inc\winerror.h -FILE 6267 f:\sp\public\sdk\inc\winreg.h -FILE 6268 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6269 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6270 f:\sp\public\sdk\inc\tvout.h -FILE 6271 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6272 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6273 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6274 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6275 f:\sp\public\sdk\inc\wincon.h -FILE 6276 f:\sp\public\sdk\inc\imm.h -FILE 6277 f:\sp\public\sdk\inc\winbase.h -FILE 6278 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6279 f:\sp\public\sdk\inc\wingdi.h -FILE 6280 f:\sp\public\sdk\inc\windef.h -FILE 6281 f:\sp\public\sdk\inc\winver.h -FILE 6282 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6283 f:\sp\public\sdk\inc\pshpack2.h -FILE 6284 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6285 f:\sp\public\sdk\inc\reason.h -FILE 6286 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6287 f:\sp\public\sdk\inc\winnt.h -FILE 6288 f:\sp\public\sdk\inc\specstrings.h -FILE 6289 f:\sp\public\sdk\inc\basetsd.h -FILE 6290 f:\sp\public\sdk\inc\pshpack4.h -FILE 6291 f:\sp\public\sdk\inc\ddbanned.h -FILE 6292 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6293 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6294 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6295 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6296 f:\sp\public\sdk\inc\winnetwk.h -FILE 6297 f:\sp\public\sdk\inc\stralign.h -FILE 6298 f:\sp\public\sdk\inc\poppack.h -FILE 6299 f:\sp\public\sdk\inc\winsvc.h -FILE 6300 f:\sp\public\sdk\inc\winuser.h -FILE 6301 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6302 f:\sp\public\sdk\inc\mcx.h -FILE 6303 f:\sp\public\sdk\inc\pshpack8.h -FILE 6304 f:\sp\public\sdk\inc\guiddef.h -FILE 6305 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6306 f:\sp\public\sdk\inc\windows.h -FILE 6307 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6308 f:\sp\public\sdk\inc\winnls.h -FILE 6309 f:\sp\vctools\crt_bld\self_x86\crt\src\strtol.c -FILE 6310 f:\sp\public\sdk\inc\pshpack1.h -FILE 6311 f:\sp\public\sdk\inc\winerror.h -FILE 6312 f:\sp\public\sdk\inc\winreg.h -FILE 6313 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6314 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6315 f:\sp\public\sdk\inc\tvout.h -FILE 6316 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6317 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6318 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6319 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6320 f:\sp\public\sdk\inc\wincon.h -FILE 6321 f:\sp\public\sdk\inc\imm.h -FILE 6322 f:\sp\public\sdk\inc\winbase.h -FILE 6323 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6324 f:\sp\public\sdk\inc\wingdi.h -FILE 6325 f:\sp\public\sdk\inc\windef.h -FILE 6326 f:\sp\public\sdk\inc\winver.h -FILE 6327 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6328 f:\sp\public\sdk\inc\pshpack2.h -FILE 6329 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6330 f:\sp\public\sdk\inc\reason.h -FILE 6331 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6332 f:\sp\public\sdk\inc\winnt.h -FILE 6333 f:\sp\public\sdk\inc\specstrings.h -FILE 6334 f:\sp\public\sdk\inc\basetsd.h -FILE 6335 f:\sp\public\sdk\inc\pshpack4.h -FILE 6336 f:\sp\public\sdk\inc\ddbanned.h -FILE 6337 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6338 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6339 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6340 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6341 f:\sp\public\sdk\inc\winnetwk.h -FILE 6342 f:\sp\public\sdk\inc\stralign.h -FILE 6343 f:\sp\public\sdk\inc\poppack.h -FILE 6344 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6345 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6346 f:\sp\public\sdk\inc\tvout.h -FILE 6347 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6348 f:\sp\public\sdk\inc\wincon.h -FILE 6349 f:\sp\public\sdk\inc\imm.h -FILE 6350 f:\sp\public\sdk\inc\winbase.h -FILE 6351 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6352 f:\sp\public\sdk\inc\wingdi.h -FILE 6353 f:\sp\public\sdk\inc\windef.h -FILE 6354 f:\sp\public\sdk\inc\winver.h -FILE 6355 f:\sp\vctools\crt_bld\self_x86\crt\src\mbtowc.c -FILE 6356 f:\sp\public\sdk\inc\pshpack2.h -FILE 6357 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6358 f:\sp\public\sdk\inc\reason.h -FILE 6359 f:\sp\public\sdk\inc\winnt.h -FILE 6360 f:\sp\public\sdk\inc\specstrings.h -FILE 6361 f:\sp\public\sdk\inc\basetsd.h -FILE 6362 f:\sp\public\sdk\inc\pshpack4.h -FILE 6363 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6364 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6365 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6366 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6367 f:\sp\public\sdk\inc\winnetwk.h -FILE 6368 f:\sp\public\sdk\inc\stralign.h -FILE 6369 f:\sp\public\sdk\inc\poppack.h -FILE 6370 f:\sp\public\sdk\inc\winsvc.h -FILE 6371 f:\sp\public\sdk\inc\winuser.h -FILE 6372 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6373 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 6374 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6375 f:\sp\public\sdk\inc\mcx.h -FILE 6376 f:\sp\public\sdk\inc\pshpack8.h -FILE 6377 f:\sp\public\sdk\inc\guiddef.h -FILE 6378 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6379 f:\sp\public\sdk\inc\windows.h -FILE 6380 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6381 f:\sp\public\sdk\inc\winnls.h -FILE 6382 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6383 f:\sp\public\sdk\inc\pshpack1.h -FILE 6384 f:\sp\public\sdk\inc\ddbanned.h -FILE 6385 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6386 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6387 f:\sp\public\sdk\inc\winerror.h -FILE 6388 f:\sp\public\sdk\inc\winreg.h -FILE 6389 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6390 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 6391 f:\sp\public\sdk\inc\winreg.h -FILE 6392 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6393 f:\sp\public\sdk\inc\tvout.h -FILE 6394 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 6395 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6396 f:\sp\public\sdk\inc\wincon.h -FILE 6397 f:\sp\public\sdk\inc\imm.h -FILE 6398 f:\sp\public\sdk\inc\winbase.h -FILE 6399 f:\sp\vctools\crt_bld\self_x86\crt\src\isctype.c -FILE 6400 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6401 f:\sp\public\sdk\inc\wingdi.h -FILE 6402 f:\sp\public\sdk\inc\windef.h -FILE 6403 f:\sp\public\sdk\inc\winver.h -FILE 6404 f:\sp\public\sdk\inc\pshpack2.h -FILE 6405 f:\sp\public\sdk\inc\reason.h -FILE 6406 f:\sp\public\sdk\inc\winnt.h -FILE 6407 f:\sp\public\sdk\inc\specstrings.h -FILE 6408 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6409 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 6410 f:\sp\public\sdk\inc\basetsd.h -FILE 6411 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6412 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6413 f:\sp\public\sdk\inc\pshpack4.h -FILE 6414 f:\sp\public\sdk\inc\winnetwk.h -FILE 6415 f:\sp\public\sdk\inc\stralign.h -FILE 6416 f:\sp\public\sdk\inc\poppack.h -FILE 6417 f:\sp\public\sdk\inc\winsvc.h -FILE 6418 f:\sp\public\sdk\inc\winuser.h -FILE 6419 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6420 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6421 f:\sp\public\sdk\inc\mcx.h -FILE 6422 f:\sp\public\sdk\inc\pshpack8.h -FILE 6423 f:\sp\public\sdk\inc\guiddef.h -FILE 6424 f:\sp\public\sdk\inc\ddbanned.h -FILE 6425 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6426 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 6427 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6428 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6429 f:\sp\public\sdk\inc\windows.h -FILE 6430 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6431 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6432 f:\sp\public\sdk\inc\winnls.h -FILE 6433 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6434 f:\sp\public\sdk\inc\pshpack1.h -FILE 6435 f:\sp\public\sdk\inc\winerror.h -FILE 6436 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 6437 f:\sp\public\sdk\inc\winreg.h -FILE 6438 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6439 f:\sp\public\sdk\inc\tvout.h -FILE 6440 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6441 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6442 f:\sp\public\sdk\inc\wincon.h -FILE 6443 f:\sp\public\sdk\inc\imm.h -FILE 6444 f:\sp\public\sdk\inc\winbase.h -FILE 6445 f:\sp\vctools\crt_bld\self_x86\crt\src\iswctype.c -FILE 6446 f:\sp\public\sdk\inc\wingdi.h -FILE 6447 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6448 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6449 f:\sp\public\sdk\inc\winver.h -FILE 6450 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 6451 f:\sp\public\sdk\inc\windows.h -FILE 6452 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6453 f:\sp\public\sdk\inc\pshpack2.h -FILE 6454 f:\sp\public\sdk\inc\reason.h -FILE 6455 f:\sp\public\sdk\inc\specstrings.h -FILE 6456 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 6457 f:\sp\public\sdk\inc\basetsd.h -FILE 6458 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6459 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6460 f:\sp\public\sdk\inc\pshpack4.h -FILE 6461 f:\sp\public\sdk\inc\winnetwk.h -FILE 6462 f:\sp\public\sdk\inc\stralign.h -FILE 6463 f:\sp\public\sdk\inc\poppack.h -FILE 6464 f:\sp\public\sdk\inc\winsvc.h -FILE 6465 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6466 f:\sp\public\sdk\inc\windef.h -FILE 6467 f:\sp\public\sdk\inc\winuser.h -FILE 6468 f:\sp\public\sdk\inc\mcx.h -FILE 6469 f:\sp\public\sdk\inc\pshpack8.h -FILE 6470 f:\sp\public\sdk\inc\guiddef.h -FILE 6471 f:\sp\public\sdk\inc\ddbanned.h -FILE 6472 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6473 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6474 f:\sp\public\sdk\inc\winnt.h -FILE 6475 f:\sp\public\sdk\inc\winnls.h -FILE 6476 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6477 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6478 f:\sp\public\sdk\inc\pshpack1.h -FILE 6479 f:\sp\public\sdk\inc\winerror.h -FILE 6480 f:\sp\public\sdk\inc\winsvc.h -FILE 6481 f:\sp\public\sdk\inc\winuser.h -FILE 6482 f:\sp\public\sdk\inc\mcx.h -FILE 6483 f:\sp\public\sdk\inc\pshpack8.h -FILE 6484 f:\sp\public\sdk\inc\guiddef.h -FILE 6485 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6486 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6487 f:\sp\public\sdk\inc\windows.h -FILE 6488 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6489 f:\sp\public\sdk\inc\winnls.h -FILE 6490 f:\sp\vctools\crt_bld\self_x86\crt\src\_wctype.c -FILE 6491 f:\sp\public\sdk\inc\pshpack1.h -FILE 6492 f:\sp\public\sdk\inc\winerror.h -FILE 6493 f:\sp\public\sdk\inc\winreg.h -FILE 6494 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6495 f:\sp\public\sdk\inc\tvout.h -FILE 6496 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6497 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6498 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6499 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6500 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6501 f:\sp\public\sdk\inc\wincon.h -FILE 6502 f:\sp\public\sdk\inc\imm.h -FILE 6503 f:\sp\public\sdk\inc\winbase.h -FILE 6504 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6505 f:\sp\public\sdk\inc\wingdi.h -FILE 6506 f:\sp\public\sdk\inc\windef.h -FILE 6507 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 6508 f:\sp\public\sdk\inc\winver.h -FILE 6509 f:\sp\public\sdk\inc\pshpack2.h -FILE 6510 f:\sp\public\sdk\inc\reason.h -FILE 6511 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6512 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6513 f:\sp\public\sdk\inc\winnt.h -FILE 6514 f:\sp\public\sdk\inc\specstrings.h -FILE 6515 f:\sp\public\sdk\inc\basetsd.h -FILE 6516 f:\sp\public\sdk\inc\pshpack4.h -FILE 6517 f:\sp\public\sdk\inc\ddbanned.h -FILE 6518 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6519 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6520 f:\sp\public\sdk\inc\winnetwk.h -FILE 6521 f:\sp\public\sdk\inc\stralign.h -FILE 6522 f:\sp\public\sdk\inc\poppack.h -FILE 6523 f:\sp\public\sdk\inc\mcx.h -FILE 6524 f:\sp\public\sdk\inc\pshpack8.h -FILE 6525 f:\sp\public\sdk\inc\guiddef.h -FILE 6526 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6527 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6528 f:\sp\public\sdk\inc\windows.h -FILE 6529 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6530 f:\sp\public\sdk\inc\winnls.h -FILE 6531 f:\sp\public\sdk\inc\pshpack1.h -FILE 6532 f:\sp\public\sdk\inc\winerror.h -FILE 6533 f:\sp\public\sdk\inc\winreg.h -FILE 6534 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6535 f:\sp\vctools\crt_bld\self_x86\crt\src\_ctype.c -FILE 6536 f:\sp\public\sdk\inc\tvout.h -FILE 6537 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6538 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6539 f:\sp\public\sdk\inc\wincon.h -FILE 6540 f:\sp\public\sdk\inc\imm.h -FILE 6541 f:\sp\public\sdk\inc\winbase.h -FILE 6542 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6543 f:\sp\public\sdk\inc\wingdi.h -FILE 6544 f:\sp\public\sdk\inc\windef.h -FILE 6545 f:\sp\public\sdk\inc\winver.h -FILE 6546 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6547 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6548 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6549 f:\sp\public\sdk\inc\pshpack2.h -FILE 6550 f:\sp\public\sdk\inc\reason.h -FILE 6551 f:\sp\public\sdk\inc\winnt.h -FILE 6552 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 6553 f:\sp\public\sdk\inc\specstrings.h -FILE 6554 f:\sp\public\sdk\inc\basetsd.h -FILE 6555 f:\sp\public\sdk\inc\pshpack4.h -FILE 6556 f:\sp\public\sdk\inc\winnetwk.h -FILE 6557 f:\sp\public\sdk\inc\stralign.h -FILE 6558 f:\sp\public\sdk\inc\poppack.h -FILE 6559 f:\sp\public\sdk\inc\winsvc.h -FILE 6560 f:\sp\public\sdk\inc\ddbanned.h -FILE 6561 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6562 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6563 f:\sp\public\sdk\inc\winuser.h -FILE 6564 f:\sp\public\sdk\inc\pshpack2.h -FILE 6565 f:\sp\public\sdk\inc\mcx.h -FILE 6566 f:\sp\public\sdk\inc\winuser.h -FILE 6567 f:\sp\public\sdk\inc\winnls.h -FILE 6568 f:\sp\public\sdk\inc\stralign.h -FILE 6569 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6570 f:\sp\public\sdk\inc\windef.h -FILE 6571 f:\sp\public\sdk\inc\tvout.h -FILE 6572 f:\sp\public\sdk\inc\winsvc.h -FILE 6573 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 6574 f:\sp\public\sdk\inc\wingdi.h -FILE 6575 f:\sp\public\sdk\inc\pshpack4.h -FILE 6576 f:\sp\public\sdk\inc\poppack.h -FILE 6577 f:\sp\public\sdk\inc\winnt.h -FILE 6578 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6579 f:\sp\public\sdk\inc\winnetwk.h -FILE 6580 f:\sp\public\sdk\inc\imm.h -FILE 6581 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoa.c -FILE 6582 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6583 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 6584 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6585 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6586 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 6587 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoas.c -FILE 6588 f:\sp\public\sdk\inc\pshpack1.h -FILE 6589 f:\sp\public\sdk\inc\winver.h -FILE 6590 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 6591 f:\sp\public\sdk\inc\guiddef.h -FILE 6592 f:\sp\public\sdk\inc\specstrings.h -FILE 6593 f:\sp\public\sdk\inc\basetsd.h -FILE 6594 f:\sp\public\sdk\inc\winreg.h -FILE 6595 f:\sp\public\sdk\inc\ddbanned.h -FILE 6596 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 6597 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6598 f:\sp\public\sdk\inc\windows.h -FILE 6599 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6600 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6601 f:\sp\public\sdk\inc\winbase.h -FILE 6602 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6603 f:\sp\public\sdk\inc\winerror.h -FILE 6604 f:\sp\public\sdk\inc\pshpack8.h -FILE 6605 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 6606 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6607 f:\sp\public\sdk\inc\reason.h -FILE 6608 f:\sp\public\sdk\inc\wincon.h -FILE 6609 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 6610 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 6611 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6612 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6613 f:\sp\vctools\crt_bld\self_x86\crt\src\wchtodig.c -FILE 6614 f:\sp\public\sdk\inc\ddbanned.h -FILE 6615 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6616 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6617 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 6618 f:\sp\public\sdk\inc\poppack.h -FILE 6619 f:\sp\public\sdk\inc\winnetwk.h -FILE 6620 f:\sp\public\sdk\inc\imm.h -FILE 6621 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 6622 f:\sp\public\sdk\inc\windef.h -FILE 6623 f:\sp\public\sdk\inc\pshpack1.h -FILE 6624 f:\sp\public\sdk\inc\winver.h -FILE 6625 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 6626 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 6627 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 6628 f:\sp\public\sdk\inc\winnt.h -FILE 6629 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 6630 f:\sp\public\sdk\inc\winreg.h -FILE 6631 f:\sp\vctools\crt_bld\self_x86\crt\src\atox.c -FILE 6632 f:\sp\public\sdk\inc\winbase.h -FILE 6633 f:\sp\public\sdk\inc\winerror.h -FILE 6634 f:\sp\public\sdk\inc\pshpack8.h -FILE 6635 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 6636 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 6637 f:\sp\public\sdk\inc\reason.h -FILE 6638 f:\sp\public\sdk\inc\wincon.h -FILE 6639 f:\sp\public\sdk\inc\ddbanned.h -FILE 6640 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 6641 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 6642 f:\sp\public\sdk\inc\pshpack2.h -FILE 6643 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 6644 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 6645 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 6646 f:\sp\public\sdk\inc\mcx.h -FILE 6647 f:\sp\public\sdk\inc\winuser.h -FILE 6648 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 6649 f:\sp\public\sdk\inc\winnls.h -FILE 6650 f:\sp\public\sdk\inc\guiddef.h -FILE 6651 f:\sp\public\sdk\inc\windows.h -FILE 6652 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 6653 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 6654 f:\sp\public\sdk\inc\specstrings.h -FILE 6655 f:\sp\public\sdk\inc\basetsd.h -FILE 6656 f:\sp\public\sdk\inc\stralign.h -FILE 6657 f:\sp\public\sdk\inc\tvout.h -FILE 6658 f:\sp\public\sdk\inc\winsvc.h -FILE 6659 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 6660 f:\sp\public\sdk\inc\wingdi.h -FILE 6661 f:\sp\public\sdk\inc\pshpack4.h -FUNC 1000 13 4 vswprintf -1000 0 50 71 -1000 12 51 71 -1012 1 52 71 -FUNC 1020 1b 10 wmemcpy_s -1020 0 1230 66 -1020 1b 1233 66 -FUNC 1040 1b 10 wmemmove_s -1040 0 1250 66 -1040 1b 1253 66 -FUNC 1060 19 4 std::bad_alloc::bad_alloc(char const *) -1060 13 371 83 -1073 6 372 83 -FUNC 1080 b 0 std::bad_alloc::~bad_alloc() -1080 6 380 83 -1086 5 381 83 -FUNC 1090 24 0 std::bad_alloc::`vector deleting destructor'(unsigned int) -FUNC 10c0 f 8 std::char_traits::assign(wchar_t &,wchar_t const &) -10c0 0 302 70 -10c0 e 303 70 -10ce 1 304 70 -FUNC 10d0 17 4 std::char_traits::length(wchar_t const *) -10d0 0 325 70 -10d0 16 327 70 -10e6 1 328 70 -FUNC 10f0 27 10 std::char_traits::_Copy_s(wchar_t *,unsigned int,wchar_t const *,unsigned int) -10f0 0 340 70 -10f0 23 343 70 -1113 3 344 70 -1116 1 345 70 -FUNC 1120 27 10 std::char_traits::_Move_s(wchar_t *,unsigned int,wchar_t const *,unsigned int) -1120 0 364 70 -1120 23 367 70 -1143 3 368 70 -1146 1 369 70 -FUNC 1150 d 8 std::char_traits::assign(char &,char const &) -1150 0 417 70 -1150 c 418 70 -115c 1 419 70 -FUNC 1160 13 4 std::char_traits::length(char const *) -1160 0 440 70 -1160 12 442 70 -1172 1 443 70 -FUNC 1180 21 10 std::char_traits::_Copy_s(char *,unsigned int,char const *,unsigned int) -1180 0 455 70 -1180 1d 458 70 -119d 3 459 70 -11a0 1 460 70 -FUNC 11b0 21 10 std::char_traits::_Move_s(char *,unsigned int,char const *,unsigned int) -11b0 0 479 70 -11b0 1d 482 70 -11cd 3 483 70 -11d0 1 484 70 -FUNC 11e0 7 0 std::_Iterator_base::_Iterator_base() -11e0 6 441 65 -11e6 1 442 65 -FUNC 11f0 6b 4 std::logic_error::logic_error(std::basic_string,std::allocator > const &) -11f0 56 27 82 -1246 15 28 82 -FUNC 1260 32 0 std::logic_error::~logic_error() -1260 9 31 82 -1269 29 32 82 -FUNC 12a0 e 0 std::logic_error::what() -12a0 0 35 82 -12a0 9 36 82 -12a9 1 37 82 -12aa 3 36 82 -12ad 1 37 82 -FUNC 12b0 47 0 std::logic_error::`scalar deleting destructor'(unsigned int) -FUNC 1300 19 4 std::length_error::length_error(std::basic_string,std::allocator > const &) -1300 13 106 82 -1313 6 107 82 -FUNC 1320 32 0 std::length_error::~length_error() -1320 3 110 82 -1323 2f 111 82 -FUNC 1360 47 0 std::length_error::`vector deleting destructor'(unsigned int) -FUNC 13b0 19 4 std::out_of_range::out_of_range(std::basic_string,std::allocator > const &) -13b0 13 130 82 -13c3 6 131 82 -FUNC 13d0 32 0 std::out_of_range::~out_of_range() -13d0 3 134 82 -13d3 2f 135 82 -FUNC 1410 47 0 std::out_of_range::`vector deleting destructor'(unsigned int) -FUNC 1460 19 4 std::out_of_range::out_of_range(std::out_of_range const &) -FUNC 1480 71 4 std::logic_error::logic_error(std::logic_error const &) -FUNC 1500 1b 8 google_breakpad::WindowsStringUtils::safe_swprintf(wchar_t *,unsigned int,wchar_t const *,...) -1500 0 94 63 -1500 1a 97 63 -151a 1 105 63 -FUNC 1520 35 0 google_breakpad::ExceptionHandler::set_dump_path(std::basic_string,std::allocator > const &) -1520 4 137 43 -1524 f 138 43 -1533 c 139 43 -153f 7 140 43 -1546 1 141 43 -1547 6 139 43 -154d 7 140 43 -1554 1 141 43 -FUNC 1560 20b 14 google_breakpad::ExceptionHandler::ExceptionHandler(std::basic_string,std::allocator > const &,bool (*)(void *,_EXCEPTION_POINTERS *,MDRawAssertionInfo *),bool (*)(wchar_t const *,wchar_t const *,void *,_EXCEPTION_POINTERS *,MDRawAssertionInfo *,bool),void *,bool) -1560 6d 75 12 -15cd 90 78 12 -165d 9 86 12 -1666 d 87 12 -1673 d 88 12 -1680 1e 96 12 -169e 11 98 12 -16af 7 99 12 -16b6 f 101 12 -16c5 a 104 12 -16cf 8 105 12 -16d7 7 106 12 -16de 7 107 12 -16e5 b 110 12 -16f0 8 114 12 -16f8 25 115 12 -171d d 117 12 -172a b 118 12 -1735 10 121 12 -1745 e 124 12 -1753 18 126 12 -FUNC 1770 274 0 google_breakpad::ExceptionHandler::~ExceptionHandler() -1770 e 128 12 -177e a 129 12 -1788 7 130 12 -178f a 133 12 -1799 b 134 12 -17a4 a 136 12 -17ae 9 139 12 -17b7 63 142 12 -181a 23 143 12 -183d 5 144 12 -1842 13 147 12 -1855 2b 149 12 -1880 2a 151 12 -18aa 17 152 12 -18c1 2c 153 12 -18ed 19 151 12 -1906 11 158 12 -1917 23 161 12 -193a 6 162 12 -1940 d 165 12 -194d f 169 12 -195c d 170 12 -1969 f 171 12 -1978 9 172 12 -1981 63 173 12 -FUNC 19f0 31 0 std::vector >::`scalar deleting destructor'(unsigned int) -FUNC 1a30 51 4 google_breakpad::ExceptionHandler::ExceptionHandlerThreadMain(void *) -1a30 13 176 12 -1a43 f 182 12 -1a52 1a 185 12 -1a6c 13 188 12 -1a7f 2 190 12 -FUNC 1a90 c7 4 google_breakpad::AutoExceptionHandler::AutoExceptionHandler() -1a90 7 204 12 -1a97 b 221 12 -1aa2 82 224 12 -1b24 d 225 12 -1b31 c 229 12 -1b3d e 231 12 -1b4b c 233 12 -FUNC 1b60 36 0 google_breakpad::AutoExceptionHandler::~AutoExceptionHandler() -1b60 0 235 12 -1b60 b 237 12 -1b6b d 239 12 -1b78 b 242 12 -1b83 7 243 12 -1b8a b 244 12 -1b95 1 245 12 -FUNC 1ba0 3 0 google_breakpad::AutoExceptionHandler::get_handler() -1ba0 3 247 12 -FUNC 1bb0 c4 4 google_breakpad::ExceptionHandler::HandleException(_EXCEPTION_POINTERS *) -1bb0 2b 254 12 -1bdb a 255 12 -1be5 f 262 12 -1bf4 1e 265 12 -1c12 5 273 12 -1c17 2 274 12 -1c19 7 283 12 -1c20 5 284 12 -1c25 2 285 12 -1c27 2 286 12 -1c29 37 290 12 -1c60 14 291 12 -FUNC 1c80 121 14 google_breakpad::ExceptionHandler::HandleInvalidParameter(wchar_t const *,wchar_t const *,wchar_t const *,unsigned int,unsigned int) -1c80 40 299 12 -1cc0 b7 319 12 -1d77 7 320 12 -1d7e 14 323 12 -1d92 2 324 12 -1d94 5 337 12 -1d99 8 345 12 -FUNC 1db0 81 8 google_breakpad::ExceptionHandler::WriteMinidumpOnHandlerThread(_EXCEPTION_POINTERS *,MDRawAssertionInfo *) -1db0 2 350 12 -1db2 d 351 12 -1dbf 6 354 12 -1dc5 2b 359 12 -1df0 f 362 12 -1dff 6 363 12 -1e05 26 370 12 -1e2b 3 372 12 -1e2e 3 373 12 -FUNC 1e40 1d 0 google_breakpad::ExceptionHandler::WriteMinidump() -1e40 3 375 12 -1e43 b 376 12 -1e4e b 377 12 -1e59 3 378 12 -1e5c 1 379 12 -FUNC 1e60 a2 4 google_breakpad::ExceptionHandler::WriteMinidump(std::basic_string,std::allocator > const &,bool (*)(wchar_t const *,wchar_t const *,void *,_EXCEPTION_POINTERS *,MDRawAssertionInfo *,bool),void *) -1e60 41 384 12 -1ea1 10 385 12 -1eb1 2a 386 12 -1edb 27 387 12 -FUNC 1f10 142 c google_breakpad::ExceptionHandler::WriteMinidumpWithException(unsigned long,_EXCEPTION_POINTERS *,MDRawAssertionInfo *) -1f10 0 392 12 -1f10 22 399 12 -1f32 7 466 12 -1f39 2 403 12 -1f3b e 404 12 -1f49 1f 411 12 -1f68 9 412 12 -1f71 8 414 12 -1f79 4 415 12 -1f7d 8 416 12 -1f85 8 426 12 -1f8d a 427 12 -1f97 34 440 12 -1fcb 8 441 12 -1fd3 8 442 12 -1fdb 4 443 12 -1fdf 8 444 12 -1fe7 30 454 12 -2017 c 456 12 -2023 7 460 12 -202a 1e 462 12 -2048 4 465 12 -204c 6 466 12 -FUNC 2060 138 0 google_breakpad::ExceptionHandler::UpdateNextID() -2060 38 468 12 -2098 b 470 12 -20a3 4a 471 12 -20ed 25 472 12 -2112 1c 477 12 -212e 31 478 12 -215f 14 479 12 -2173 25 480 12 -FUNC 21a0 3b 4 std::basic_string,std::allocator >::basic_string,std::allocator >(char const *) -21a0 0 650 17 -21a0 35 652 17 -21d5 6 653 17 -FUNC 21e0 25 4 std::basic_string,std::allocator >::basic_string,std::allocator >(std::basic_string,std::allocator > const &) -21e0 1 720 17 -21e1 4 721 17 -21e5 1a 722 17 -21ff 6 723 17 -FUNC 2210 26 0 std::basic_string,std::allocator >::~basic_string,std::allocator >() -2210 3 904 17 -2213 22 905 17 -2235 1 906 17 -FUNC 2240 e 0 std::basic_string,std::allocator >::c_str() -2240 0 1621 17 -2240 9 1622 17 -2249 1 1623 17 -224a 3 1622 17 -224d 1 1623 17 -FUNC 2250 4 0 std::basic_string,std::allocator >::size() -2250 0 1636 17 -2250 3 1637 17 -2253 1 1638 17 -FUNC 2260 11 0 std::basic_string,std::allocator >::basic_string,std::allocator >() -2260 0 564 17 -2260 10 565 17 -2270 1 566 17 -FUNC 2280 27 0 std::basic_string,std::allocator >::~basic_string,std::allocator >() -2280 3 904 17 -2283 23 905 17 -22a6 1 906 17 -FUNC 22b0 b 0 std::basic_string,std::allocator >::operator=(std::basic_string,std::allocator > const &) -22b0 0 914 17 -22b0 a 915 17 -22ba 1 916 17 -FUNC 22c0 24 4 std::basic_string,std::allocator >::operator=(wchar_t const *) -22c0 0 919 17 -22c0 21 920 17 -22e1 3 921 17 -FUNC 22f0 e 0 std::basic_string,std::allocator >::c_str() -22f0 0 1621 17 -22f0 9 1622 17 -22f9 1 1623 17 -22fa 3 1622 17 -22fd 1 1623 17 -FUNC 2300 c 0 std::vector >::vector >() -2300 0 457 23 -2300 b 458 23 -230b 1 459 23 -FUNC 2310 26 0 std::vector >::~vector >() -2310 0 545 23 -2310 25 546 23 -2335 1 547 23 -FUNC 2340 1d 0 std::vector >::begin() -2340 1 627 23 -2341 1b 628 23 -235c 1 629 23 -FUNC 2360 1d 0 std::vector >::end() -2360 1 637 23 -2361 1b 638 23 -237c 1 639 23 -FUNC 2380 13 0 std::vector >::size() -2380 0 702 23 -2380 9 703 23 -2389 1 704 23 -238a 8 703 23 -2392 1 704 23 -FUNC 23a0 23 0 std::vector >::empty() -23a0 0 712 23 -23a0 10 713 23 -23b0 1 714 23 -23b1 11 713 23 -23c2 1 714 23 -FUNC 23d0 56 0 std::vector >::at(unsigned int) -23d0 b 729 23 -23db 15 730 23 -23f0 5 731 23 -23f5 29 732 23 -241e 8 733 23 -FUNC 2430 47 0 std::vector >::back() -2430 c 776 23 -243c 32 777 23 -246e 9 778 23 -FUNC 2480 68 0 std::vector >::push_back(google_breakpad::ExceptionHandler * const &) -2480 10 786 23 -2490 24 787 23 -24b4 d 796 23 -24c1 6 801 23 -24c7 1b 800 23 -24e2 6 801 23 -FUNC 24f0 23 0 std::vector >::pop_back() -24f0 6 818 23 -24f6 15 819 23 -250b 6 822 23 -2511 2 824 23 -FUNC 2520 3f 8 std::vector >::erase(std::_Vector_iterator >) -2520 7 996 23 -2527 24 998 23 -254b 11 1001 23 -255c 3 1002 23 -FUNC 2560 20 0 std::_Vector_iterator >::operator*() -2560 0 325 23 -2560 1c 326 23 -257c 1 327 23 -257d 2 326 23 -257f 1 327 23 -FUNC 2580 20 0 std::_Vector_iterator >::operator++() -2580 0 335 23 -2580 1d 336 23 -259d 2 337 23 -259f 1 338 23 -FUNC 25a0 1d 0 std::_Vector_const_iterator >::operator!=(std::_Vector_const_iterator > const &) -25a0 0 202 23 -25a0 1c 203 23 -25bc 1 204 23 -FUNC 25c0 da c std::basic_string,std::allocator >::assign(std::basic_string,std::allocator > const &,unsigned int,unsigned int) -25c0 1 1038 17 -25c1 12 1039 17 -25d3 5 1040 17 -25d8 3 1041 17 -25db a 1042 17 -25e5 2 1043 17 -25e7 4 1045 17 -25eb 17 1046 17 -2602 5 1052 17 -2607 3 1053 17 -260a 21 1047 17 -262b b 1049 17 -2636 13 1047 17 -2649 5 1052 17 -264e 3 1053 17 -2651 7 1047 17 -2658 5 1052 17 -265d 3 1053 17 -2660 22 1049 17 -2682 10 1050 17 -2692 5 1052 17 -2697 3 1053 17 -FUNC 26a0 27 4 std::basic_string,std::allocator >::assign(char const *) -26a0 1 1069 17 -26a1 23 1070 17 -26c4 3 1071 17 -FUNC 26d0 4a 8 std::basic_string,std::allocator >::_Tidy(bool,unsigned int) -26d0 0 2066 17 -26d0 f 2067 17 -26df 6 2069 17 -26e5 a 2072 17 -26ef d 2073 17 -26fc a 2074 17 -2706 11 2077 17 -2717 3 2078 17 -FUNC 2720 e 0 std::basic_string,std::allocator >::_Myptr() -2720 0 2092 17 -2720 9 2093 17 -2729 1 2094 17 -272a 3 2093 17 -272d 1 2094 17 -FUNC 2730 5 4 std::_String_val >::_String_val >(std::allocator) -2730 2 471 17 -2732 3 472 17 -FUNC 2740 5 4 std::_String_val >::_String_val >(std::_String_val > const &) -2740 2 477 17 -2742 3 484 17 -FUNC 2750 3 0 std::allocator::allocator() -2750 2 120 19 -2752 1 122 19 -FUNC 2760 b 0 std::basic_string,std::allocator >::assign(std::basic_string,std::allocator > const &) -2760 0 1032 17 -2760 a 1033 17 -276a 1 1034 17 -FUNC 2770 ef c std::basic_string,std::allocator >::assign(std::basic_string,std::allocator > const &,unsigned int,unsigned int) -2770 1 1038 17 -2771 12 1039 17 -2783 5 1040 17 -2788 3 1041 17 -278b a 1042 17 -2795 2 1043 17 -2797 4 1045 17 -279b 17 1046 17 -27b2 5 1052 17 -27b7 3 1053 17 -27ba 24 1047 17 -27de b 1049 17 -27e9 13 1047 17 -27fc 5 1052 17 -2801 3 1053 17 -2804 9 1047 17 -280d 5 1052 17 -2812 3 1053 17 -2815 2f 1049 17 -2844 13 1050 17 -2857 5 1052 17 -285c 3 1053 17 -FUNC 2860 2b 4 std::basic_string,std::allocator >::assign(wchar_t const *) -2860 1 1069 17 -2861 27 1070 17 -2888 3 1071 17 -FUNC 2890 4f 8 std::basic_string,std::allocator >::_Tidy(bool,unsigned int) -2890 0 2066 17 -2890 f 2067 17 -289f 6 2069 17 -28a5 a 2072 17 -28af 10 2073 17 -28bf a 2074 17 -28c9 13 2077 17 -28dc 3 2078 17 -FUNC 28e0 e 0 std::basic_string,std::allocator >::_Myptr() -28e0 0 2092 17 -28e0 9 2093 17 -28e9 1 2094 17 -28ea 3 2093 17 -28ed 1 2094 17 -FUNC 28f0 5 4 std::_String_val >::_String_val >(std::allocator) -28f0 2 471 17 -28f2 3 472 17 -FUNC 2900 3 0 std::allocator::allocator() -2900 2 120 19 -2902 1 122 19 -FUNC 2910 13 0 std::vector >::capacity() -2910 0 621 23 -2910 9 622 23 -2919 1 623 23 -291a 8 622 23 -2922 1 623 23 -FUNC 2930 86 c std::vector >::insert(std::_Vector_iterator >,google_breakpad::ExceptionHandler * const &) -2930 3 852 23 -2933 3e 853 23 -2971 11 854 23 -2982 2a 855 23 -29ac a 856 23 -FUNC 29c0 23 0 std::vector >::_Buy(unsigned int) -29c0 0 1066 23 -29c0 8 1070 23 -29c8 5 1071 23 -29cd a 1074 23 -29d7 3 1075 23 -29da 6 1076 23 -29e0 2 1078 23 -29e2 1 1079 23 -FUNC 29f0 1 0 std::vector >::_Destroy(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *) -29f0 0 1082 23 -29f0 1 1084 23 -FUNC 2a00 26 0 std::vector >::_Tidy() -2a00 0 1087 23 -2a00 7 1088 23 -2a07 9 1096 23 -2a10 15 1098 23 -2a25 1 1099 23 -FUNC 2a30 23 0 std::vector >::_Ufill(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &) -2a30 0 1207 23 -2a30 1f 1208 23 -2a4f 3 1209 23 -2a52 1 1210 23 -FUNC 2a60 76 0 std::vector >::_Xran() -2a60 23 1218 23 -2a83 53 1219 23 -FUNC 2ae0 3 4 std::_Vector_val >::_Vector_val >(std::allocator) -2ae0 0 412 23 -2ae0 3 413 23 -FUNC 2af0 1 0 std::allocator::allocator() -2af0 0 120 19 -2af0 1 122 19 -FUNC 2b00 21 0 std::_Vector_iterator >::_Vector_iterator >(google_breakpad::ExceptionHandler * *,std::_Container_base const *) -2b00 1e 314 23 -2b1e 3 315 23 -FUNC 2b30 32 4 std::_Vector_iterator >::operator+(int) -2b30 1 367 23 -2b31 2 368 23 -2b33 26 369 23 -2b59 9 370 23 -FUNC 2b70 2f 0 std::_Vector_iterator >::operator-(int) -2b70 1 378 23 -2b71 2 379 23 -2b73 25 380 23 -2b98 7 381 23 -FUNC 2ba0 20 0 std::_Vector_const_iterator >::operator*() -2ba0 0 92 23 -2ba0 a 103 23 -2baa f 104 23 -2bb9 3 107 23 -2bbc 1 108 23 -2bbd 2 107 23 -2bbf 1 108 23 -FUNC 2bc0 20 0 std::_Vector_const_iterator >::operator++() -2bc0 0 116 23 -2bc0 a 117 23 -2bca f 118 23 -2bd9 4 119 23 -2bdd 2 120 23 -2bdf 1 121 23 -FUNC 2be0 1d 0 std::_Vector_const_iterator >::operator==(std::_Vector_const_iterator > const &) -2be0 0 190 23 -2be0 f 195 23 -2bef d 198 23 -2bfc 1 199 23 -FUNC 2c00 c1 8 std::basic_string,std::allocator >::assign(char const *,unsigned int) -2c00 5 1056 17 -2c05 2d 1057 17 -2c32 1a 1058 17 -2c4c 4 1066 17 -2c50 25 1060 17 -2c75 c 1062 17 -2c81 f 1060 17 -2c90 8 1065 17 -2c98 3 1066 17 -2c9b e 1062 17 -2ca9 10 1063 17 -2cb9 5 1065 17 -2cbe 3 1066 17 -FUNC 2cd0 83 8 std::basic_string,std::allocator >::erase(unsigned int,unsigned int) -2cd0 1 1240 17 -2cd1 d 1241 17 -2cde 5 1242 17 -2ce3 d 1243 17 -2cf0 2 1244 17 -2cf2 4 1245 17 -2cf6 3c 1248 17 -2d32 8 1249 17 -2d3a 12 1250 17 -2d4c 4 1252 17 -2d50 3 1253 17 -FUNC 2d60 1f 4 std::basic_string,std::allocator >::_Eos(unsigned int) -2d60 0 2030 17 -2d60 14 2031 17 -2d74 3 2032 17 -2d77 5 2031 17 -2d7c 3 2032 17 -FUNC 2d80 bc 8 std::basic_string,std::allocator >::_Grow(unsigned int,bool) -2d80 1 2036 17 -2d81 c 2037 17 -2d8d 5 2038 17 -2d92 7 2039 17 -2d99 c 2040 17 -2da5 a 2046 17 -2daf 3 2047 17 -2db2 d 2041 17 -2dbf 39 2043 17 -2df8 10 2046 17 -2e08 3 2047 17 -2e0b 4 2044 17 -2e0f b 2045 17 -2e1a c 2046 17 -2e26 3 2047 17 -2e29 6 2045 17 -2e2f a 2046 17 -2e39 3 2047 17 -FUNC 2e40 e 0 std::basic_string,std::allocator >::_Myptr() -2e40 0 2087 17 -2e40 9 2088 17 -2e49 1 2089 17 -2e4a 3 2088 17 -2e4d 1 2089 17 -FUNC 2e50 5 4 std::allocator::allocator(std::allocator const &) -2e50 2 124 19 -2e52 3 126 19 -FUNC 2e60 e 8 std::allocator::deallocate(char *,unsigned int) -2e60 0 140 19 -2e60 b 141 19 -2e6b 3 142 19 -FUNC 2e70 da 8 std::basic_string,std::allocator >::assign(wchar_t const *,unsigned int) -2e70 4 1056 17 -2e74 31 1057 17 -2ea5 1d 1058 17 -2ec2 3 1066 17 -2ec5 28 1060 17 -2eed d 1062 17 -2efa 10 1060 17 -2f0a a 1065 17 -2f14 3 1066 17 -2f17 18 1062 17 -2f2f 14 1063 17 -2f43 4 1065 17 -2f47 3 1066 17 -FUNC 2f50 97 8 std::basic_string,std::allocator >::erase(unsigned int,unsigned int) -2f50 1 1240 17 -2f51 d 1241 17 -2f5e 5 1242 17 -2f63 d 1243 17 -2f70 2 1244 17 -2f72 4 1245 17 -2f76 4d 1248 17 -2fc3 8 1249 17 -2fcb 15 1250 17 -2fe0 4 1252 17 -2fe4 3 1253 17 -FUNC 2ff0 4 0 std::basic_string,std::allocator >::size() -2ff0 0 1636 17 -2ff0 3 1637 17 -2ff3 1 1638 17 -FUNC 3000 23 4 std::basic_string,std::allocator >::_Eos(unsigned int) -3000 0 2030 17 -3000 16 2031 17 -3016 3 2032 17 -3019 7 2031 17 -3020 3 2032 17 -FUNC 3030 c7 8 std::basic_string,std::allocator >::_Grow(unsigned int,bool) -3030 1 2036 17 -3031 f 2037 17 -3040 5 2038 17 -3045 7 2039 17 -304c c 2040 17 -3058 a 2046 17 -3062 3 2047 17 -3065 d 2041 17 -3072 3c 2043 17 -30ae 12 2046 17 -30c0 3 2047 17 -30c3 4 2044 17 -30c7 b 2045 17 -30d2 d 2046 17 -30df 3 2047 17 -30e2 8 2045 17 -30ea a 2046 17 -30f4 3 2047 17 -FUNC 3100 e 0 std::basic_string,std::allocator >::_Myptr() -3100 0 2087 17 -3100 9 2088 17 -3109 1 2089 17 -310a 3 2088 17 -310d 1 2089 17 -FUNC 3110 5 4 std::allocator::allocator(std::allocator const &) -3110 2 124 19 -3112 3 126 19 -FUNC 3120 e 8 std::allocator::deallocate(wchar_t *,unsigned int) -3120 0 140 19 -3120 b 141 19 -312b 3 142 19 -FUNC 3130 6 0 std::vector >::max_size() -3130 0 707 23 -3130 5 708 23 -3135 1 709 23 -FUNC 3140 208 8 std::vector >::_Insert_n(std::_Vector_iterator >,unsigned int,google_breakpad::ExceptionHandler * const &) -3140 6 1117 23 -3146 2 1125 23 -3148 1c 1126 23 -3164 1c 1130 23 -3180 5 1131 23 -3185 1b 1132 23 -31a0 23 1135 23 -31c3 17 1136 23 -31da 19 1137 23 -31f3 7 1138 23 -31fa 25 1143 23 -321f 7 1144 23 -3226 1e 1145 23 -3244 13 1152 23 -3257 4 1153 23 -325b 9 1156 23 -3264 7 1163 23 -326b a 1164 23 -3275 3 1165 23 -3278 a 1204 23 -3282 13 1167 23 -3295 17 1170 23 -32ac 1a 1174 23 -32c6 7 1180 23 -32cd 16 1187 23 -32e3 a 1204 23 -32ed 2a 1193 23 -3317 e 1200 23 -3325 19 1202 23 -333e a 1204 23 -FUNC 3350 7c 0 std::vector >::_Xlen() -3350 29 1213 23 -3379 53 1214 23 -FUNC 33d0 1 0 std::allocator::allocator(std::allocator const &) -33d0 0 124 19 -33d0 1 126 19 -FUNC 33e0 8 0 std::allocator::deallocate(google_breakpad::ExceptionHandler * *,unsigned int) -33e0 0 140 19 -33e0 7 141 19 -33e7 1 142 19 -FUNC 33f0 56 0 std::allocator::allocate(unsigned int) -33f0 3 145 19 -33f3 16 146 19 -3409 4 147 19 -340d 39 146 19 -FUNC 3450 32 4 std::_Vector_iterator >::operator+=(int) -3450 0 361 23 -3450 2c 362 23 -347c 3 363 23 -347f 3 364 23 -FUNC 3490 28 0 std::_Vector_iterator >::operator-=(int) -3490 0 373 23 -3490 27 374 23 -34b7 1 375 23 -FUNC 34c0 19 0 std::_Vector_iterator >::operator-(std::_Vector_const_iterator > const &) -34c0 0 384 23 -34c0 18 385 23 -34d8 1 386 23 -FUNC 34e0 21 0 std::_Vector_const_iterator >::_Vector_const_iterator >(google_breakpad::ExceptionHandler * *,std::_Container_base const *) -34e0 0 77 23 -34e0 19 79 23 -34f9 2 80 23 -34fb 3 81 23 -34fe 3 82 23 -FUNC 3510 19 4 std::length_error::length_error(std::length_error const &) -FUNC 3530 7 0 std::_Ranit::_Ranit() -FUNC 3540 6 0 std::basic_string,std::allocator >::max_size() -3540 0 1641 17 -3540 5 1643 17 -3545 1 1644 17 -FUNC 3550 171 8 std::basic_string,std::allocator >::_Copy(unsigned int,unsigned int) -3550 30 2000 17 -3580 8 2001 17 -3588 5 2002 17 -358d 2 2003 17 -358f 2 2004 17 -3591 1f 2005 17 -35b0 3 2006 17 -35b3 2 2009 17 -35b5 18 2010 17 -35cd 2 2019 17 -35cf 30 2010 17 -35ff 3 2012 17 -3602 19 2014 17 -361b c 2019 17 -3627 7 2021 17 -362e 20 2022 17 -364e 12 2023 17 -3660 1c 2026 17 -367c 14 2027 17 -3690 15 2016 17 -36a5 1c 2017 17 -FUNC 36d0 39 4 std::basic_string,std::allocator >::_Inside(char const *) -36d0 1 2050 17 -36d1 2b 2052 17 -36fc 3 2055 17 -36ff 4 2056 17 -3703 3 2053 17 -3706 3 2056 17 -FUNC 3710 6 0 std::basic_string,std::allocator >::max_size() -3710 0 1641 17 -3710 5 1643 17 -3715 1 1644 17 -FUNC 3720 17b 8 std::basic_string,std::allocator >::_Copy(unsigned int,unsigned int) -3720 30 2000 17 -3750 8 2001 17 -3758 8 2002 17 -3760 2 2003 17 -3762 2 2004 17 -3764 1f 2005 17 -3783 3 2006 17 -3786 2 2009 17 -3788 1b 2010 17 -37a3 2 2019 17 -37a5 30 2010 17 -37d5 3 2012 17 -37d8 19 2014 17 -37f1 c 2019 17 -37fd 7 2021 17 -3804 24 2022 17 -3828 12 2023 17 -383a 20 2026 17 -385a 14 2027 17 -386e 17 2016 17 -3885 16 2017 17 -FUNC 38a0 3a 4 std::basic_string,std::allocator >::_Inside(wchar_t const *) -38a0 1 2050 17 -38a1 2c 2052 17 -38cd 3 2055 17 -38d0 4 2056 17 -38d4 3 2053 17 -38d7 3 2056 17 -FUNC 38e0 6 0 std::allocator::max_size() -38e0 0 165 19 -38e0 5 167 19 -38e5 1 168 19 -FUNC 38f0 32 4 std::_Vector_const_iterator >::operator+=(int) -38f0 0 146 23 -38f0 a 147 23 -38fa 1a 148 23 -3914 5 150 23 -3919 3 151 23 -391c 3 152 23 -391f 3 153 23 -FUNC 3930 19 0 std::_Vector_const_iterator >::operator-(std::_Vector_const_iterator > const &) -3930 0 173 23 -3930 f 178 23 -393f 9 181 23 -3948 1 182 23 -FUNC 3950 56 4 std::allocator::allocate(unsigned int) -3950 0 145 19 -3950 16 146 19 -3966 6 147 19 -396c 3a 146 19 -FUNC 39b0 4 0 std::allocator::max_size() -39b0 0 165 19 -39b0 3 167 19 -39b3 1 168 19 -FUNC 39c0 59 4 std::allocator::allocate(unsigned int) -39c0 0 145 19 -39c0 19 146 19 -39d9 6 147 19 -39df 3a 146 19 -FUNC 3a20 6 0 std::allocator::max_size() -3a20 0 165 19 -3a20 5 167 19 -3a25 1 168 19 -FUNC 3a30 21 10 std::_Traits_helper::copy_s >(char *,unsigned int,char const *,unsigned int) -3a30 0 581 70 -3a30 20 582 70 -3a50 1 583 70 -FUNC 3a60 27 10 std::_Traits_helper::copy_s >(wchar_t *,unsigned int,wchar_t const *,unsigned int) -3a60 0 581 70 -3a60 26 582 70 -3a86 1 583 70 -FUNC 3a90 24 0 stdext::unchecked_copy(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *) -3a90 0 3407 65 -3a90 23 3409 65 -3ab3 1 3410 65 -FUNC 3ac0 1 0 std::_Destroy_range >(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &) -3ac0 0 225 19 -3ac0 1 227 19 -FUNC 3ad0 15 0 stdext::unchecked_uninitialized_fill_n >(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &,std::allocator &) -3ad0 0 914 24 -3ad0 14 916 24 -3ae4 1 917 24 -FUNC 3af0 21 10 std::_Traits_helper::move_s >(char *,unsigned int,char const *,unsigned int) -3af0 0 608 70 -3af0 20 609 70 -3b10 1 610 70 -FUNC 3b20 27 10 std::_Traits_helper::move_s >(wchar_t *,unsigned int,wchar_t const *,unsigned int) -3b20 0 608 70 -3b20 26 609 70 -3b46 1 610 70 -FUNC 3b50 22 0 std::vector >::_Umove(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *) -3b50 0 1109 23 -3b50 21 1112 23 -3b71 1 1113 23 -FUNC 3b80 10 0 std::fill(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * const &) -3b80 0 2976 65 -3b80 f 2977 65 -3b8f 1 2978 65 -FUNC 3b90 25 0 stdext::_Unchecked_move_backward(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *) -3b90 0 3497 65 -3b90 24 3499 65 -3bb4 1 3500 65 -FUNC 3bc0 4f 0 std::_Allocate(unsigned int,google_breakpad::ExceptionHandler * *) -3bc0 0 37 19 -3bc0 f 40 19 -3bcf 2c 41 19 -3bfb 10 44 19 -3c0b 4 45 19 -FUNC 3c10 54 8 std::_Allocate(unsigned int,char *) -3c10 0 37 19 -3c10 b 38 19 -3c1b 2 39 19 -3c1d 9 44 19 -3c26 4 45 19 -3c2a c 40 19 -3c36 2e 41 19 -FUNC 3c70 57 8 std::_Allocate(unsigned int,wchar_t *) -3c70 0 37 19 -3c70 b 38 19 -3c7b 2 39 19 -3c7d c 44 19 -3c89 4 45 19 -3c8d c 40 19 -3c99 2e 41 19 -FUNC 3cd0 19 4 std::bad_alloc::bad_alloc(std::bad_alloc const &) -FUNC 3cf0 7 0 std::_Char_traits_cat >() -3cf0 1 568 70 -3cf1 4 570 70 -3cf5 2 571 70 -FUNC 3d00 21 14 std::_Traits_helper::copy_s >(char *,unsigned int,char const *,unsigned int,std::_Secure_char_traits_tag) -3d00 0 589 70 -3d00 20 590 70 -3d20 1 591 70 -FUNC 3d30 7 0 std::_Char_traits_cat >() -3d30 1 568 70 -3d31 4 570 70 -3d35 2 571 70 -FUNC 3d40 27 14 std::_Traits_helper::copy_s >(wchar_t *,unsigned int,wchar_t const *,unsigned int,std::_Secure_char_traits_tag) -3d40 0 589 70 -3d40 26 590 70 -3d66 1 591 70 -FUNC 3d70 3 0 std::_Checked_base(google_breakpad::ExceptionHandler * * &) -3d70 0 1009 65 -3d70 2 1011 65 -3d72 1 1012 65 -FUNC 3d80 1 0 std::_Iter_random(google_breakpad::ExceptionHandler * * const &,google_breakpad::ExceptionHandler * * const &) -3d80 0 839 65 -3d80 1 844 65 -FUNC 3d90 7 0 std::_Ptr_cat(google_breakpad::ExceptionHandler * * &,google_breakpad::ExceptionHandler * * &) -3d90 1 1329 65 -3d91 4 1331 65 -3d95 2 1332 65 -FUNC 3da0 15 4 std::_Copy_opt(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::random_access_iterator_tag,std::_Scalar_ptr_iterator_tag,std::_Range_checked_iterator_tag) -3da0 0 2288 65 -3da0 d 2300 65 -3dad 7 2301 65 -3db4 1 2302 65 -FUNC 3dc0 1 4 std::_Destroy_range >(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &,std::_Scalar_ptr_iterator_tag) -3dc0 0 242 19 -3dc0 1 243 19 -FUNC 3dd0 15 8 std::_Uninit_fill_n >(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &,std::allocator &,std::_Scalar_ptr_iterator_tag,std::_Range_checked_iterator_tag) -3dd0 0 415 24 -3dd0 14 416 24 -3de4 1 417 24 -FUNC 3df0 21 14 std::_Traits_helper::move_s >(char *,unsigned int,char const *,unsigned int,std::_Secure_char_traits_tag) -3df0 0 616 70 -3df0 20 617 70 -3e10 1 618 70 -FUNC 3e20 27 14 std::_Traits_helper::move_s >(wchar_t *,unsigned int,wchar_t const *,unsigned int,std::_Secure_char_traits_tag) -3e20 0 616 70 -3e20 26 617 70 -3e46 1 618 70 -FUNC 3e50 22 0 stdext::_Unchecked_uninitialized_move >(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &) -3e50 0 843 24 -3e50 21 845 24 -3e71 1 846 24 -FUNC 3e80 10 0 std::_Fill(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * const &) -3e80 0 2946 65 -3e80 6 2948 65 -3e86 9 2949 65 -3e8f 1 2950 65 -FUNC 3e90 7 0 std::_Move_cat(google_breakpad::ExceptionHandler * * const &) -3e90 1 1046 65 -3e91 4 1048 65 -3e95 2 1049 65 -FUNC 3ea0 25 c std::_Move_backward_opt(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::random_access_iterator_tag,std::_Undefined_move_tag,std::_Range_checked_iterator_tag) -3ea0 0 2546 65 -3ea0 24 2548 65 -3ec4 1 2549 65 -FUNC 3ed0 3 4 std::_Checked_base(google_breakpad::ExceptionHandler * * &,std::_Unchanged_checked_iterator_base_type_tag) -3ed0 0 992 65 -3ed0 2 993 65 -3ed2 1 994 65 -FUNC 3ee0 15 0 stdext::unchecked_fill_n(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &) -3ee0 0 3523 65 -3ee0 14 3524 65 -3ef4 1 3525 65 -FUNC 3f00 22 8 std::_Uninit_move,std::_Undefined_move_tag>(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &,std::_Undefined_move_tag,std::_Range_checked_iterator_tag) -3f00 0 205 24 -3f00 21 206 24 -3f21 1 207 24 -FUNC 3f30 13 0 std::_Copy_backward_opt(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::random_access_iterator_tag,std::_Scalar_ptr_iterator_tag,std::_Range_checked_iterator_tag) -3f30 0 2492 65 -3f30 10 2506 65 -3f40 2 2507 65 -3f42 1 2508 65 -FUNC 3f50 1 0 std::_Iter_cat(google_breakpad::ExceptionHandler * * const &) -3f50 0 798 65 -3f50 1 801 65 -FUNC 3f60 15 8 std::_Fill_n(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &,std::random_access_iterator_tag,std::_Range_checked_iterator_tag) -3f60 0 3040 65 -3f60 14 3044 65 -3f74 1 3045 65 -FUNC 3f80 22 0 stdext::unchecked_uninitialized_copy >(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &) -3f80 0 803 24 -3f80 21 805 24 -3fa1 1 806 24 -FUNC 3fb0 15 4 std::_Fill_n(google_breakpad::ExceptionHandler * *,unsigned int,google_breakpad::ExceptionHandler * const &,std::_Range_checked_iterator_tag) -3fb0 0 2986 65 -3fb0 5 2987 65 -3fb5 f 2988 65 -3fc4 1 2989 65 -FUNC 3fd0 15 4 std::_Uninit_copy >(google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,google_breakpad::ExceptionHandler * *,std::allocator &,std::_Scalar_ptr_iterator_tag,std::_Range_checked_iterator_tag) -3fd0 0 144 24 -3fd0 d 150 24 -3fdd 7 151 24 -3fe4 1 152 24 -FUNC 3ff0 13 4 vswprintf -3ff0 0 50 147 -3ff0 12 51 147 -4002 1 52 147 -FUNC 4010 ae 4 google_breakpad::GUIDString::GUIDToWString(_GUID *) -4010 12 43 126 -4022 51 51 126 -4073 3a 52 126 -40ad 11 53 126 -FUNC 40c0 ae 4 google_breakpad::GUIDString::GUIDToSymbolServerWString(_GUID *) -40c0 12 56 126 -40d2 51 64 126 -4123 3a 65 126 -415d 11 66 126 -FUNC 4170 40 4 std::basic_string,std::allocator >::basic_string,std::allocator >(wchar_t const *) -4170 0 650 143 -4170 3a 652 143 -41aa 6 653 143 -FUNC 41b0 86 8 main -41b0 13 63 178 -41c3 38 64 178 -41fb 5 65 178 -4200 d 66 178 -420d 1b 67 178 -4228 e 68 178 -FUNC 4240 41 18 `anonymous namespace'::callback -4240 3 45 178 -4243 8 46 178 -424b 11 47 178 -425c 2 48 178 -425e d 49 178 -426b 11 51 178 -427c 3 53 178 -427f 2 54 178 -FUNC 4290 18 0 `anonymous namespace'::CrashFunction -4290 4 56 178 -4294 7 57 178 -429b 9 58 178 -42a4 4 59 178 -FUNC 42ae 18 4 std::invalid_argument::invalid_argument(std::basic_string,std::allocator > const &) -42ae 12 82 298 -42c0 6 83 298 -FUNC 42c6 b 0 std::invalid_argument::~invalid_argument() -42c6 6 86 298 -42cc 5 87 298 -FUNC 42d1 22 0 std::invalid_argument::`vector deleting destructor'(unsigned int) -FUNC 42f3 3f 0 std::_String_base::_Xlen() -42f3 c 12 291 -42ff 33 13 291 -FUNC 4332 3f 0 std::_String_base::_Xran() -4332 c 17 291 -433e 33 18 291 -FUNC 4371 3f 0 std::_String_base::_Xinvarg() -4371 c 22 291 -437d 33 23 291 -FUNC 43b0 18 4 std::invalid_argument::invalid_argument(std::invalid_argument const &) -FUNC 43c8 af 4 printf -43c8 c 49 1601 -43d4 2b 54 1601 -43ff 14 58 1601 -4413 3 59 1601 -4416 10 61 1601 -4426 18 63 1601 -443e 11 65 1601 -444f c 68 1601 -445b 3 72 1601 -445e 6 73 1601 -4464 13 69 1601 -FUNC 4477 16 8 _printf_l -4477 0 80 1601 -4477 15 85 1601 -448c 1 86 1601 -FUNC 448d 16 8 _printf_s_l -448d 0 94 1601 -448d 15 99 1601 -44a2 1 100 1601 -FUNC 44a3 14 4 printf_s -44a3 0 106 1601 -44a3 13 111 1601 -44b6 1 112 1601 -FUNC 44b7 16 8 _printf_p_l -44b7 0 119 1601 -44b7 15 124 1601 -44cc 1 125 1601 -FUNC 44cd 14 4 _printf_p -44cd 0 131 1601 -44cd 13 136 1601 -44e0 1 137 1601 -FUNC 44e1 25 4 _set_printf_count_output -44e1 0 154 1601 -44e1 6 155 1601 -44e7 1e 156 1601 -4505 1 158 1601 -FUNC 4506 16 0 _get_printf_count_output -4506 0 167 1601 -4506 15 168 1601 -451b 1 169 1601 -FUNC 451c f 0 __security_check_cookie -451c 0 52 4397 -451c 6 55 4397 -4522 2 56 4397 -4524 2 57 4397 -4526 5 59 4397 -FUNC 452b 62 4 _flush -452b 2 142 1704 -452d 25 152 1704 -4552 16 154 1704 -4568 7 158 1704 -456f 6 159 1704 -4575 2 161 1704 -4577 4 162 1704 -457b 4 163 1704 -457f 3 167 1704 -4582 7 168 1704 -4589 3 170 1704 -458c 1 171 1704 -FUNC 458d 42 4 _fflush_nolock -458d 1 98 1704 -458e 8 102 1704 -4596 8 103 1704 -459e 1 116 1704 -459f b 106 1704 -45aa 4 108 1704 -45ae 1 116 1704 -45af 8 112 1704 -45b7 13 113 1704 -45ca 1 116 1704 -45cb 3 115 1704 -45ce 1 116 1704 -FUNC 45cf da 4 flsall -45cf c 228 1704 -45db 5 230 1704 -45e0 3 231 1704 -45e3 8 233 1704 -45eb 3 234 1704 -45ee 11 236 1704 -45ff 14 238 1704 -4613 9 246 1704 -461c 6 248 1704 -4622 10 254 1704 -4632 5 256 1704 -4637 c 262 1704 -4643 3 266 1704 -4646 2 268 1704 -4648 a 269 1704 -4652 c 275 1704 -465e 3 276 1704 -4661 8 281 1704 -4669 3 236 1704 -466c 5 281 1704 -4671 11 282 1704 -4682 c 288 1704 -468e 4 292 1704 -4692 3 293 1704 -4695 2 292 1704 -4697 3 295 1704 -469a 6 296 1704 -46a0 9 289 1704 -FUNC 46a9 53 4 fflush -46a9 c 57 1704 -46b5 7 62 1704 -46bc 9 63 1704 -46c5 9 65 1704 -46ce 3 67 1704 -46d1 c 68 1704 -46dd c 70 1704 -46e9 3 74 1704 -46ec 6 75 1704 -46f2 a 71 1704 -FUNC 46fc 9 0 _flushall -46fc 0 193 1704 -46fc 8 194 1704 -4704 1 195 1704 -FUNC 4705 6 0 __iob_func -4705 0 53 2087 -4705 5 54 2087 -470a 1 55 2087 -FUNC 470b b1 0 __initstdio -470b 0 113 2087 -470b d 122 2087 -4718 7 123 2087 -471f 4 124 2087 -4723 7 125 2087 -472a 13 134 2087 -473d 19 137 2087 -4756 4 138 2087 -475a 1 163 2087 -475b e 145 2087 -4769 11 146 2087 -477a b 148 2087 -4785 24 151 2087 -47a9 2 158 2087 -47ab d 148 2087 -47b8 3 162 2087 -47bb 1 163 2087 -FUNC 47bc 20 0 __endstdio -47bc 0 191 2087 -47bc 5 193 2087 -47c1 9 196 2087 -47ca 5 197 2087 -47cf c 198 2087 -47db 1 199 2087 -FUNC 47dc 3c 4 _lock_file -47dc 1 221 2087 -47dd 15 226 2087 -47f2 10 231 2087 -4802 9 233 2087 -480b 1 242 2087 -480c b 241 2087 -4817 1 242 2087 -FUNC 4818 2e 8 _lock_file2 -4818 0 264 2087 -4818 9 269 2087 -4821 9 274 2087 -482a c 276 2087 -4836 1 285 2087 -4837 e 284 2087 -4845 1 285 2087 -FUNC 4846 36 4 _unlock_file -4846 0 306 2087 -4846 14 311 2087 -485a 7 317 2087 -4861 f 318 2087 -4870 1 327 2087 -4871 a 326 2087 -487b 1 327 2087 -FUNC 487c 2a 8 _unlock_file2 -487c 0 349 2087 -487c 7 354 2087 -4883 d 360 2087 -4890 a 361 2087 -489a 1 370 2087 -489b a 369 2087 -48a5 1 370 2087 -FUNC 48a6 16 4 wcslen -48a6 0 41 731 -48a6 4 42 731 -48aa a 44 731 -48b4 7 46 731 -48bb 1 47 731 -FUNC 48bc 5 4 operator delete(void *) -48bc 0 20 5184 -48bc 5 23 5184 -FUNC 48c1 30 8 _JumpToContinuation(void *,EHRegistrationNode *) -48c1 5 77 5627 -48c6 9 84 5627 -48cf 7 93 5627 -48d6 2 94 5627 -48d8 6 95 5627 -48de 3 100 5627 -48e1 3 101 5627 -48e4 3 102 5627 -48e7 3 103 5627 -48ea 2 104 5627 -48ec 5 106 5627 -FUNC 48f1 7 8 _CallMemberFunction0(void *,void *) -48f1 0 118 5627 -48f1 1 120 5627 -48f2 1 121 5627 -48f3 3 122 5627 -48f6 2 123 5627 -FUNC 48f8 7 c _CallMemberFunction1(void *,void *,void *) -48f8 0 139 5627 -48f8 1 141 5627 -48f9 1 142 5627 -48fa 3 143 5627 -48fd 2 144 5627 -FUNC 48ff 7 10 _CallMemberFunction2(void *,void *,void *,int) -48ff 0 161 5627 -48ff 1 163 5627 -4900 1 164 5627 -4901 3 165 5627 -4904 2 166 5627 -FUNC 4906 52 8 _UnwindNestedFrames(EHRegistrationNode *,EHExceptionRecord *) -4906 8 218 5627 -490e 7 232 5627 -4915 3 233 5627 -4918 7 236 5627 -491f 10 237 5627 -492f f 241 5627 -493e 7 247 5627 -4945 3 248 5627 -4948 2 249 5627 -494a 7 250 5627 -4951 7 256 5627 -FUNC 4958 36 10 __CxxFrameHandler -4958 0 287 5627 -4958 1 295 5627 -4959 2 296 5627 -495b 3 297 5627 -495e 1 298 5627 -495f 1 299 5627 -4960 1 300 5627 -4961 1 301 5627 -4962 3 306 5627 -4965 1f 311 5627 -4984 1 316 5627 -4985 1 317 5627 -4986 1 318 5627 -4987 3 319 5627 -498a 2 320 5627 -498c 1 321 5627 -498d 1 322 5627 -FUNC 498e 36 10 __CxxFrameHandler3 -498e 0 341 5627 -498e 1 349 5627 -498f 2 350 5627 -4991 3 351 5627 -4994 1 352 5627 -4995 1 353 5627 -4996 1 354 5627 -4997 1 355 5627 -4998 3 360 5627 -499b 1f 365 5627 -49ba 1 370 5627 -49bb 1 371 5627 -49bc 1 372 5627 -49bd 3 373 5627 -49c0 2 374 5627 -49c2 1 375 5627 -49c3 1 376 5627 -FUNC 49c4 36 10 __CxxFrameHandler2 -49c4 0 391 5627 -49c4 1 399 5627 -49c5 2 400 5627 -49c7 3 401 5627 -49ca 1 402 5627 -49cb 1 403 5627 -49cc 1 404 5627 -49cd 1 405 5627 -49ce 3 410 5627 -49d1 1f 415 5627 -49f0 1 420 5627 -49f1 1 421 5627 -49f2 1 422 5627 -49f3 3 423 5627 -49f6 2 424 5627 -49f8 1 425 5627 -49f9 1 426 5627 -FUNC 49fa 1a 4 __CxxLongjmpUnwind -49fa 0 443 5627 -49fa 17 449 5627 -4a11 3 452 5627 -FUNC 4a14 30 10 CatchGuardHandler -4a14 1 545 5627 -4a15 1 551 5627 -4a16 e 557 5627 -4a24 1f 567 5627 -4a43 1 572 5627 -FUNC 4a44 d5 1c _CallSETranslator(EHExceptionRecord *,EHRegistrationNode *,void *,void *,_s_FuncInfo const *,int,EHRegistrationNode *) -4a44 7 637 5627 -4a4b 9 642 5627 -4a54 5 644 5627 -4a59 3 645 5627 -4a5c 2 646 5627 -4a5e 8 648 5627 -4a66 4 656 5627 -4a6a 7 657 5627 -4a71 d 658 5627 -4a7e 6 659 5627 -4a84 6 660 5627 -4a8a 6 661 5627 -4a90 6 662 5627 -4a96 4 663 5627 -4a9a 4 664 5627 -4a9e 4 669 5627 -4aa2 3 675 5627 -4aa5 3 676 5627 -4aa8 6 681 5627 -4aae 3 682 5627 -4ab1 3 683 5627 -4ab4 6 684 5627 -4aba 7 690 5627 -4ac1 6 692 5627 -4ac7 6 693 5627 -4acd e 697 5627 -4adb e 701 5627 -4ae9 4 707 5627 -4aed 6 715 5627 -4af3 7 724 5627 -4afa 2 725 5627 -4afc 3 726 5627 -4aff 2 727 5627 -4b01 7 728 5627 -4b08 2 731 5627 -4b0a 3 737 5627 -4b0d 6 738 5627 -4b13 3 744 5627 -4b16 3 745 5627 -FUNC 4b19 9d 10 TranslatorGuardHandler -4b19 5 770 5627 -4b1e 1 776 5627 -4b1f e 782 5627 -4b2d b 784 5627 -4b38 a 786 5627 -4b42 5 790 5627 -4b47 2 792 5627 -4b49 2a 796 5627 -4b73 9 798 5627 -4b7c b 802 5627 -4b87 1b 811 5627 -4ba2 3 818 5627 -4ba5 3 819 5627 -4ba8 3 820 5627 -4bab 3 821 5627 -4bae 2 822 5627 -4bb0 3 826 5627 -4bb3 3 828 5627 -FUNC 4bb6 73 14 _GetRangeOfTrysToCheck(_s_FuncInfo const *,int,int,unsigned int *,unsigned int *) -4bb6 7 848 5627 -4bbd 6 849 5627 -4bc3 6 850 5627 -4bc9 2 851 5627 -4bcb 2 852 5627 -4bcd a 855 5627 -4bd7 1d 859 5627 -4bf4 3 860 5627 -4bf7 3 861 5627 -4bfa 3 862 5627 -4bfd 6 854 5627 -4c03 6 866 5627 -4c09 5 867 5627 -4c0e e 869 5627 -4c1c b 871 5627 -4c27 2 872 5627 -FUNC 4c29 28 8 _CreateFrameInfo -4c29 0 889 5627 -4c29 b 890 5627 -4c34 e 891 5627 -4c42 b 892 5627 -4c4d 3 893 5627 -4c50 1 894 5627 -FUNC 4c51 21 4 _IsExceptionObjectToBeDestroyed -4c51 0 907 5627 -4c51 d 910 5627 -4c5e 8 911 5627 -4c66 7 910 5627 -4c6d 1 915 5627 -4c6e 1 916 5627 -4c6f 2 912 5627 -4c71 1 916 5627 -FUNC 4c72 4c 4 _FindAndUnlinkFrame -4c72 1 926 5627 -4c73 11 927 5627 -4c84 f 928 5627 -4c93 1 944 5627 -4c94 d 931 5627 -4ca1 7 935 5627 -4ca8 9 933 5627 -4cb1 5 943 5627 -4cb6 7 936 5627 -4cbd 1 944 5627 -FUNC 4cbe 5e 14 _CallCatchBlock2(EHRegistrationNode *,_s_FuncInfo const *,void *,int,unsigned long) -4cbe 6 485 5627 -4cc4 e 493 5627 -4cd2 c 495 5627 -4cde 11 500 5627 -4cef 6 503 5627 -4cf5 3 504 5627 -4cf8 3 505 5627 -4cfb 6 506 5627 -4d01 e 512 5627 -4d0f 3 518 5627 -4d12 6 519 5627 -4d18 2 524 5627 -4d1a 2 525 5627 -FUNC 4d1c 4a 8 _CxxThrowException -4d1c 6 95 5939 -4d22 15 117 5939 -4d37 3 118 5939 -4d3a 9 134 5939 -4d43 5 136 5939 -4d48 7 138 5939 -4d4f 13 159 5939 -4d62 4 161 5939 -FUNC 4d66 19 0 std::bad_alloc::bad_alloc() -4d66 15 382 5121 -4d7b 4 383 5121 -FUNC 4d7f 6a 4 operator new(unsigned int) -4d7f 6 57 5123 -4d85 2 59 5123 -4d87 d 60 5123 -4d94 d 59 5123 -4da1 2 67 5123 -4da3 27 62 5123 -4dca 1f 63 5123 -FUNC 4de9 f 4 type_info::name(__type_info_node *) -4de9 0 44 5873 -4de9 c 45 5873 -4df5 3 46 5873 -FUNC 4df8 e 0 type_info::~type_info() -4df8 0 49 5873 -4df8 d 50 5873 -4e05 1 51 5873 -FUNC 4e06 1c 0 type_info::`scalar deleting destructor'(unsigned int) -FUNC 4e22 f 4 type_info::_name_internal_method(__type_info_node *) -4e22 0 54 5873 -4e22 c 55 5873 -4e2e 3 56 5873 -FUNC 4e31 8 0 type_info::_type_info_dtor_internal_method() -4e31 0 59 5873 -4e31 7 60 5873 -4e38 1 61 5873 -FUNC 4e39 1b 4 type_info::operator==(type_info const &) -4e39 0 89 5873 -4e39 18 90 5873 -4e51 3 91 5873 -FUNC 4e54 1c 4 type_info::operator!=(type_info const &) -4e54 0 98 5873 -4e54 19 99 5873 -4e6d 3 100 5873 -FUNC 4e70 1f 4 type_info::before(type_info const &) -4e70 0 103 5873 -4e70 1c 104 5873 -4e8c 3 105 5873 -FUNC 4e8f 4 0 type_info::raw_name() -4e8f 0 108 5873 -4e8f 3 109 5873 -4e92 1 110 5873 -FUNC 4e93 b 4 type_info::type_info(type_info const &) -4e93 8 113 5873 -4e9b 3 123 5873 -FUNC 4e9e 5 4 type_info::operator=(type_info const &) -4e9e 2 127 5873 -4ea0 3 135 5873 -FUNC 4ea3 11 0 std::exception::exception() -4ea3 2 68 5916 -4ea5 4 69 5916 -4ea9 a 70 5916 -4eb3 1 71 5916 -FUNC 4eb4 4e 4 std::exception::exception(char const * const &) -4eb4 1 77 5916 -4eb5 14 78 5916 -4ec9 9 80 5916 -4ed2 6 81 5916 -4ed8 9 82 5916 -4ee1 c 84 5916 -4eed 2 87 5916 -4eef 4 89 5916 -4ef3 7 91 5916 -4efa 8 92 5916 -FUNC 4f02 18 8 std::exception::exception(char const * const &,int) -4f02 2 98 5916 -4f04 c 99 5916 -4f10 7 100 5916 -4f17 3 101 5916 -FUNC 4f1a 58 4 std::exception::exception(std::exception const &) -4f1a 1 107 5916 -4f1b 13 108 5916 -4f2e 2 109 5916 -4f30 a 111 5916 -4f3a 9 113 5916 -4f43 6 114 5916 -4f49 9 115 5916 -4f52 d 117 5916 -4f5f 2 120 5916 -4f61 4 122 5916 -4f65 2 125 5916 -4f67 4 126 5916 -4f6b 7 127 5916 -FUNC 4f72 56 4 std::exception::operator=(std::exception const &) -4f72 1 133 5916 -4f73 c 134 5916 -4f7f 6 136 5916 -4f85 2 137 5916 -4f87 9 139 5916 -4f90 9 141 5916 -4f99 6 144 5916 -4f9f 9 146 5916 -4fa8 d 148 5916 -4fb5 2 151 5916 -4fb7 4 153 5916 -4fbb 2 156 5916 -4fbd 3 157 5916 -4fc0 5 159 5916 -4fc5 3 160 5916 -FUNC 4fc8 16 0 std::exception::~exception() -4fc8 0 167 5916 -4fc8 c 168 5916 -4fd4 9 169 5916 -4fdd 1 170 5916 -FUNC 4fde d 0 std::exception::what() -4fde 0 180 5916 -4fde 5 181 5916 -4fe3 2 182 5916 -4fe5 5 184 5916 -4fea 1 185 5916 -FUNC 4feb 19 4 std::bad_cast::bad_cast(char const *) -4feb 13 194 5916 -4ffe 6 195 5916 -FUNC 5004 18 4 std::bad_cast::bad_cast(std::bad_cast const &) -5004 12 199 5916 -5016 6 200 5916 -FUNC 501c b 0 std::bad_cast::~bad_cast() -501c 6 203 5916 -5022 5 204 5916 -FUNC 5027 19 4 std::bad_typeid::bad_typeid(char const *) -5027 13 229 5916 -503a 6 230 5916 -FUNC 5040 18 4 std::bad_typeid::bad_typeid(std::bad_typeid const &) -5040 12 234 5916 -5052 6 235 5916 -FUNC 5058 b 0 std::bad_typeid::~bad_typeid() -5058 6 238 5916 -505e 5 239 5916 -FUNC 5063 18 4 std::__non_rtti_object::__non_rtti_object(char const *) -5063 12 248 5916 -5075 6 249 5916 -FUNC 507b 18 4 std::__non_rtti_object::__non_rtti_object(std::__non_rtti_object const &) -507b 12 253 5916 -508d 6 254 5916 -FUNC 5093 b 0 std::__non_rtti_object::~__non_rtti_object() -5093 0 257 5916 -5093 b 258 5916 -FUNC 509e 1c 0 std::exception::`vector deleting destructor'(unsigned int) -FUNC 50ba 22 0 std::bad_cast::`vector deleting destructor'(unsigned int) -FUNC 50dc 22 0 std::bad_typeid::`scalar deleting destructor'(unsigned int) -FUNC 50fe 22 0 std::__non_rtti_object::`scalar deleting destructor'(unsigned int) -FUNC 5120 7b 10 memcpy_s -5120 4 47 1002 -5124 a 48 1002 -512e 4 51 1002 -5132 20 55 1002 -5152 a 56 1002 -515c f 67 1002 -516b 2 68 1002 -516d f 59 1002 -517c 5 61 1002 -5181 13 62 1002 -5194 5 64 1002 -5199 2 69 1002 -FUNC 519b 5b 10 memmove_s -519b 3 46 955 -519e 9 47 955 -51a7 2 50 955 -51a9 20 54 955 -51c9 5 55 955 -51ce 13 56 955 -51e1 f 58 955 -51f0 4 59 955 -51f4 2 60 955 -FUNC 51f6 a 4 _set_osplatform -51f6 a 385 2595 -FUNC 5200 a 4 _set_osver -5200 a 386 2595 -FUNC 520a a 4 _set_winver -520a a 387 2595 -FUNC 5214 a 4 _set_winmajor -5214 a 388 2595 -FUNC 521e a 4 _set_winminor -521e a 389 2595 -FUNC 5228 24 4 fast_error_exit -5228 0 375 2608 -5228 9 384 2608 -5231 5 386 2608 -5236 9 388 2608 -523f c 389 2608 -524b 1 390 2608 -FUNC 524c 41 0 check_managed_app -524c 0 413 2608 -524c b 418 2608 -5257 5 422 2608 -525c a 424 2608 -5266 2 425 2608 -5268 9 427 2608 -5271 2 428 2608 -5273 7 433 2608 -527a 2 434 2608 -527c d 437 2608 -5289 1 438 2608 -528a 2 419 2608 -528c 1 438 2608 -FUNC 528d 1b6 0 __tmainCRTStartup -528d c 203 2608 -5299 19 233 2608 -52b2 4 234 2608 -52b6 8 235 2608 -52be a 236 2608 -52c8 2 242 2608 -52ca 7 243 2608 -52d1 3 244 2608 -52d4 4 243 2608 -52d8 9 244 2608 -52e1 2 245 2608 -52e3 6 248 2608 -52e9 6 249 2608 -52ef 6 250 2608 -52f5 9 256 2608 -52fe 9 257 2608 -5307 8 258 2608 -530f 6 259 2608 -5315 d 260 2608 -5322 6 262 2608 -5328 5 263 2608 -532d 6 264 2608 -5333 6 265 2608 -5339 6 266 2608 -533f 8 271 2608 -5347 c 273 2608 -5353 8 274 2608 -535b 9 276 2608 -5364 8 277 2608 -536c 5 286 2608 -5371 4 294 2608 -5375 9 296 2608 -537e 8 297 2608 -5386 b 300 2608 -5391 a 303 2608 -539b 9 305 2608 -53a4 8 306 2608 -53ac 9 307 2608 -53b5 8 308 2608 -53bd 8 310 2608 -53c5 4 311 2608 -53c9 7 312 2608 -53d0 a 326 2608 -53da 18 327 2608 -53f2 6 330 2608 -53f8 6 331 2608 -53fe 5 333 2608 -5403 2 335 2608 -5405 17 336 2608 -541c 6 342 2608 -5422 6 344 2608 -5428 6 345 2608 -542e 5 347 2608 -5433 7 349 2608 -543a 3 351 2608 -543d 6 352 2608 -FUNC 5443 a 0 mainCRTStartup -5443 0 186 2608 -5443 5 193 2608 -5448 5 195 2608 -FUNC 544d a 4 _initp_misc_invarg -544d 0 38 3328 -544d 9 39 3328 -5456 1 40 3328 -FUNC 5457 fc 14 _invoke_watson -5457 1c 111 3328 -5473 6 128 3328 -5479 6 129 3328 -547f 6 130 3328 -5485 3 131 3328 -5488 3 132 3328 -548b 3 133 3328 -548e 7 134 3328 -5495 7 135 3328 -549c 4 136 3328 -54a0 4 137 3328 -54a4 4 138 3328 -54a8 4 139 3328 -54ac 1 140 3328 -54ad 6 141 3328 -54b3 6 147 3328 -54b9 19 148 3328 -54d2 3 150 3328 -54d5 13 163 3328 -54e8 6 168 3328 -54ee 13 169 3328 -5501 6 171 3328 -5507 a 174 3328 -5511 a 176 3328 -551b 8 180 3328 -5523 8 181 3328 -552b 12 184 3328 -553d 16 185 3328 -FUNC 5553 22 4 _set_invalid_parameter_handler -5553 1 207 3328 -5554 b 211 3328 -555f d 212 3328 -556c 5 214 3328 -5571 3 216 3328 -5574 1 217 3328 -FUNC 5575 d 0 _get_invalid_parameter_handler -5575 0 221 3328 -5575 c 225 3328 -5581 1 228 3328 -FUNC 5582 9 14 _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -5582 3 266 3328 -5585 1 274 3328 -5586 5 273 3328 -FUNC 558b 24 14 _invalid_parameter -558b 3 70 3328 -558e b 77 3328 -5599 5 78 3328 -559e 1 89 3328 -559f 2 80 3328 -55a1 8 86 3328 -55a9 1 89 3328 -55aa 5 88 3328 -FUNC 55af 10 0 _invalid_parameter_noinfo -55af 0 98 3328 -55af f 99 3328 -55be 1 100 3328 -FUNC 55bf 9 14 _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -55bf 3 249 3328 -55c2 1 257 3328 -55c3 5 256 3328 -FUNC 55c8 96 8 _swprintf -55c8 7 122 1564 -55cf 24 128 1564 -55f3 8 133 1564 -55fb 6 138 1564 -5601 22 153 1564 -5623 1d 160 1564 -5640 18 161 1564 -5658 4 163 1564 -565c 2 171 1564 -FUNC 565e 1a c __swprintf_l -565e 0 181 1564 -565e 19 186 1564 -5677 1 188 1564 -FUNC 5678 1c c swprintf_s -5678 0 238 1564 -5678 1b 243 1564 -5693 1 244 1564 -FUNC 5694 1f 10 _snwprintf_s -5694 3 253 1564 -5697 1a 258 1564 -56b1 2 259 1564 -FUNC 56b3 1c c _swprintf_p -56b3 0 267 1564 -56b3 1b 272 1564 -56ce 1 273 1564 -FUNC 56cf 1d 10 _swprintf_s_l -56cf 3 282 1564 -56d2 18 287 1564 -56ea 2 288 1564 -FUNC 56ec 20 14 _snwprintf_s_l -56ec 3 298 1564 -56ef 1b 303 1564 -570a 2 304 1564 -FUNC 570c 1d 10 _swprintf_p_l -570c 3 313 1564 -570f 18 318 1564 -5727 2 319 1564 -FUNC 5729 11 4 _scwprintf -5729 0 347 1564 -5729 10 352 1564 -5739 1 353 1564 -FUNC 573a 11 4 _scwprintf_p -573a 0 359 1564 -573a 10 364 1564 -574a 1 365 1564 -FUNC 574b 16 8 _scwprintf_l -574b 0 372 1564 -574b 15 376 1564 -5760 1 377 1564 -FUNC 5761 16 8 _scwprintf_p_l -5761 0 384 1564 -5761 15 389 1564 -5776 1 390 1564 -FUNC 5777 14f 8 fprintf -5777 c 49 1648 -5783 5 53 1648 -5788 2e 55 1648 -57b6 c 56 1648 -57c2 3 61 1648 -57c5 7 63 1648 -57cc 3 64 1648 -57cf b0 66 1648 -587f 5 67 1648 -5884 8 69 1648 -588c 11 70 1648 -589d a 71 1648 -58a7 c 75 1648 -58b3 3 79 1648 -58b6 6 80 1648 -58bc a 76 1648 -FUNC 58c6 1a c _fprintf_l -58c6 0 88 1648 -58c6 19 93 1648 -58df 1 94 1648 -FUNC 58e0 1a c _fprintf_s_l -58e0 0 102 1648 -58e0 19 107 1648 -58f9 1 108 1648 -FUNC 58fa 18 8 fprintf_s -58fa 0 115 1648 -58fa 17 120 1648 -5911 1 121 1648 -FUNC 5912 1a c _fprintf_p_l -5912 0 129 1648 -5912 19 134 1648 -592b 1 135 1648 -FUNC 592c 18 8 _fprintf_p -592c 0 142 1648 -592c 17 147 1648 -5943 1 148 1648 -FUNC 5944 f6 18 _vswprintf_helper -5944 7 125 1380 -594b 28 130 1380 -5973 2f 133 1380 -59a2 15 143 1380 -59b7 7 146 1380 -59be 2 148 1380 -59c0 6 150 1380 -59c6 13 157 1380 -59d9 5 160 1380 -59de 2 162 1380 -59e0 41 171 1380 -5a21 5 172 1380 -5a26 12 175 1380 -5a38 2 183 1380 -FUNC 5a3a 27 10 _vswprintf_c -5a3a 0 241 1380 -5a3a 1f 242 1380 -5a59 7 243 1380 -5a60 1 244 1380 -FUNC 5a61 28 14 _vswprintf_c_l -5a61 3 253 1380 -5a64 1c 254 1380 -5a80 7 255 1380 -5a87 2 256 1380 -FUNC 5a89 87 14 _vswprintf_s_l -5a89 4 265 1380 -5a8d 25 269 1380 -5ab2 19 270 1380 -5acb 1a 272 1380 -5ae5 4 273 1380 -5ae9 3 275 1380 -5aec 5 278 1380 -5af1 1d 280 1380 -5b0e 2 288 1380 -FUNC 5b10 1b 10 vswprintf_s -5b10 0 296 1380 -5b10 1a 297 1380 -5b2a 1 298 1380 -FUNC 5b2b 107 18 _vsnwprintf_s_l -5b2b 5 308 1380 -5b30 27 313 1380 -5b57 13 314 1380 -5b6a 7 317 1380 -5b71 1b 319 1380 -5b8c 8 323 1380 -5b94 20 324 1380 -5bb4 5 325 1380 -5bb9 a 329 1380 -5bc3 7 331 1380 -5bca 2 333 1380 -5bcc 2 338 1380 -5bce 12 339 1380 -5be0 10 342 1380 -5bf0 a 344 1380 -5bfa a 346 1380 -5c04 2 348 1380 -5c06 4 352 1380 -5c0a 8 356 1380 -5c12 18 358 1380 -5c2a 6 360 1380 -5c30 2 366 1380 -FUNC 5c32 1e 14 _vsnwprintf_s -5c32 3 375 1380 -5c35 19 376 1380 -5c4e 2 377 1380 -FUNC 5c50 27 10 _vswprintf_p -5c50 0 385 1380 -5c50 1f 386 1380 -5c6f 7 387 1380 -5c76 1 388 1380 -FUNC 5c77 28 14 _vswprintf_p_l -5c77 3 397 1380 -5c7a 1c 398 1380 -5c96 7 399 1380 -5c9d 2 400 1380 -FUNC 5c9f 24 4 _amsg_exit -5c9f 0 446 2560 -5c9f 5 449 2560 -5ca4 9 450 2560 -5cad b 451 2560 -5cb8 a 452 2560 -5cc2 1 453 2560 -FUNC 5cc3 26 4 __crtCorExitProcess -5cc3 0 650 2560 -5cc3 b 654 2560 -5cce 4 655 2560 -5cd2 c 656 2560 -5cde 4 657 2560 -5ce2 6 658 2560 -5ce8 1 668 2560 -FUNC 5ce9 15 4 __crtExitProcess -5ce9 0 673 2560 -5ce9 a 674 2560 -5cf3 b 683 2560 -FUNC 5cfe 9 0 _lockexit -5cfe 0 733 2560 -5cfe 8 734 2560 -5d06 1 735 2560 -FUNC 5d07 9 0 _unlockexit -5d07 0 759 2560 -5d07 8 760 2560 -5d0f 1 761 2560 -FUNC 5d10 18 4 _initterm -5d10 3 841 2560 -5d13 2 855 2560 -5d15 6 853 2560 -5d1b 2 854 2560 -5d1d 3 855 2560 -5d20 7 848 2560 -5d27 1 857 2560 -FUNC 5d28 20 8 _initterm_e -5d28 1 890 2560 -5d29 c 899 2560 -5d35 6 904 2560 -5d3b 2 905 2560 -5d3d 3 906 2560 -5d40 7 899 2560 -5d47 1 910 2560 -FUNC 5d48 37 4 _get_osplatform -5d48 0 929 2560 -5d48 27 931 2560 -5d6f 1 939 2560 -5d70 9 934 2560 -5d79 2 936 2560 -5d7b 3 938 2560 -5d7e 1 939 2560 -FUNC 5d7f 3c 4 _get_osver -5d7f 0 958 2560 -5d7f 27 960 2560 -5da6 1 968 2560 -5da7 8 963 2560 -5daf 8 965 2560 -5db7 3 967 2560 -5dba 1 968 2560 -FUNC 5dbb 3c 4 _get_winver -5dbb 0 987 2560 -5dbb 27 989 2560 -5de2 1 997 2560 -5de3 8 992 2560 -5deb 8 994 2560 -5df3 3 996 2560 -5df6 1 997 2560 -FUNC 5df7 3c 4 _get_winmajor -5df7 0 1016 2560 -5df7 27 1018 2560 -5e1e 1 1026 2560 -5e1f 8 1021 2560 -5e27 8 1023 2560 -5e2f 3 1025 2560 -5e32 1 1026 2560 -FUNC 5e33 3c 4 _get_winminor -5e33 0 1045 2560 -5e33 27 1047 2560 -5e5a 1 1055 2560 -5e5b 8 1050 2560 -5e63 8 1052 2560 -5e6b 3 1054 2560 -5e6e 1 1055 2560 -FUNC 5e6f 37 4 _get_wpgmptr -5e6f 0 1074 2560 -5e6f 27 1076 2560 -5e96 1 1085 2560 -5e97 9 1080 2560 -5ea0 2 1082 2560 -5ea2 3 1084 2560 -5ea5 1 1085 2560 -FUNC 5ea6 37 4 _get_pgmptr -5ea6 0 1104 2560 -5ea6 27 1106 2560 -5ecd 1 1115 2560 -5ece 9 1110 2560 -5ed7 2 1112 2560 -5ed9 3 1114 2560 -5edc 1 1115 2560 -FUNC 5edd 92 4 _cinit -5edd 0 263 2560 -5edd 18 273 2560 -5ef5 b 275 2560 -5f00 5 277 2560 -5f05 f 283 2560 -5f14 4 284 2560 -5f18 4 285 2560 -5f1c a 288 2560 -5f26 20 293 2560 -5f46 1a 306 2560 -5f60 c 308 2560 -5f6c 2 312 2560 -5f6e 1 313 2560 -FUNC 5f6f e2 c doexit -5f6f c 499 2560 -5f7b 8 517 2560 -5f83 5 518 2560 -5f88 b 520 2560 -5f93 6 521 2560 -5f99 8 524 2560 -5fa1 5 526 2560 -5fa6 e 542 2560 -5fb4 12 543 2560 -5fc6 5 545 2560 -5fcb b 546 2560 -5fd6 10 551 2560 -5fe6 9 552 2560 -5fef 2 553 2560 -5ff1 10 558 2560 -6001 10 566 2560 -6011 c 584 2560 -601d 6 588 2560 -6023 6 592 2560 -6029 8 594 2560 -6031 8 596 2560 -6039 3 584 2560 -603c 6 585 2560 -6042 9 586 2560 -604b 6 597 2560 -FUNC 6051 11 4 exit -6051 0 397 2560 -6051 10 398 2560 -6061 1 399 2560 -FUNC 6062 11 4 _exit -6062 0 405 2560 -6062 10 406 2560 -6072 1 407 2560 -FUNC 6073 f 0 _cexit -6073 0 412 2560 -6073 e 413 2560 -6081 1 414 2560 -FUNC 6082 f 0 _c_exit -6082 0 419 2560 -6082 e 420 2560 -6090 1 421 2560 -FUNC 6091 4c 0 _init_pointers -6091 1 786 2560 -6092 7 787 2560 -6099 6 789 2560 -609f 6 790 2560 -60a5 6 791 2560 -60ab 6 792 2560 -60b1 6 793 2560 -60b7 6 794 2560 -60bd 6 795 2560 -60c3 6 796 2560 -60c9 13 799 2560 -60dc 1 800 2560 -FUNC 60e0 8b 4 strlen -60e0 0 54 880 -60e0 4 63 880 -60e4 6 64 880 -60ea 2 65 880 -60ec 2 69 880 -60ee 3 70 880 -60f1 2 71 880 -60f3 2 72 880 -60f5 6 73 880 -60fb 2 74 880 -60fd 13 76 880 -6110 2 81 880 -6112 5 82 880 -6117 2 83 880 -6119 3 84 880 -611c 2 85 880 -611e 3 86 880 -6121 5 87 880 -6126 2 88 880 -6128 3 90 880 -612b 2 91 880 -612d 2 92 880 -612f 2 93 880 -6131 2 94 880 -6133 5 95 880 -6138 2 96 880 -613a 5 97 880 -613f 2 98 880 -6141 2 99 880 -6143 3 103 880 -6146 4 104 880 -614a 2 105 880 -614c 1 106 880 -614d 3 108 880 -6150 4 109 880 -6154 2 110 880 -6156 1 111 880 -6157 3 113 880 -615a 4 114 880 -615e 2 115 880 -6160 1 116 880 -6161 3 118 880 -6164 4 119 880 -6168 2 120 880 -616a 1 121 880 -FUNC 616b 33 4 _EH_prolog3 -616b 0 93 5671 -616b 1 101 5671 -616c 7 103 5671 -6173 4 112 5671 -6177 4 113 5671 -617b 1 114 5671 -617c 1 115 5671 -617d 1 116 5671 -617e 2 117 5671 -6180 2 118 5671 -6182 5 131 5671 -6187 2 132 5671 -6189 1 133 5671 -618a 3 134 5671 -618d 7 135 5671 -6194 3 150 5671 -6197 6 151 5671 -619d 1 153 5671 -FUNC 619e 36 4 _EH_prolog3_catch -619e 0 206 5671 -619e 1 214 5671 -619f 7 216 5671 -61a6 4 225 5671 -61aa 4 226 5671 -61ae 1 228 5671 -61af 1 229 5671 -61b0 1 230 5671 -61b1 2 231 5671 -61b3 2 232 5671 -61b5 5 246 5671 -61ba 2 247 5671 -61bc 1 248 5671 -61bd 3 249 5671 -61c0 3 250 5671 -61c3 7 251 5671 -61ca 3 267 5671 -61cd 6 268 5671 -61d3 1 270 5671 -FUNC 61d4 36 4 _EH_prolog3_GS -61d4 0 322 5671 -61d4 1 330 5671 -61d5 7 332 5671 -61dc 4 341 5671 -61e0 4 342 5671 -61e4 1 344 5671 -61e5 1 345 5671 -61e6 1 346 5671 -61e7 2 347 5671 -61e9 2 348 5671 -61eb 5 362 5671 -61f0 2 363 5671 -61f2 1 364 5671 -61f3 3 365 5671 -61f6 3 366 5671 -61f9 7 367 5671 -6200 3 384 5671 -6203 6 385 5671 -6209 1 387 5671 -FUNC 620a 39 4 _EH_prolog3_catch_GS -620a 0 441 5671 -620a 1 449 5671 -620b 7 451 5671 -6212 4 460 5671 -6216 4 461 5671 -621a 1 463 5671 -621b 1 464 5671 -621c 1 465 5671 -621d 2 466 5671 -621f 2 467 5671 -6221 5 482 5671 -6226 2 483 5671 -6228 1 484 5671 -6229 3 485 5671 -622c 3 486 5671 -622f 3 487 5671 -6232 7 488 5671 -6239 3 505 5671 -623c 6 506 5671 -6242 1 508 5671 -FUNC 6243 14 0 _EH_epilog3 -6243 0 534 5671 -6243 3 537 5671 -6246 7 538 5671 -624d 1 539 5671 -624e 1 540 5671 -624f 1 541 5671 -6250 1 542 5671 -6251 1 543 5671 -6252 2 544 5671 -6254 1 545 5671 -6255 1 546 5671 -6256 1 547 5671 -FUNC 6257 f 0 _EH_epilog3_GS -6257 0 575 5671 -6257 3 578 5671 -625a 2 579 5671 -625c 5 580 5671 -6261 5 581 5671 -FUNC 6266 f 0 _EH_epilog3_catch_GS -6266 0 609 5671 -6266 3 612 5671 -6269 2 613 5671 -626b 5 614 5671 -6270 5 615 5671 -FUNC 6275 96 4 _stbuf -6275 1 59 1850 -6276 14 69 1850 -628a 2 70 1850 -628c c 73 1850 -6298 4 74 1850 -629c c 75 1850 -62a8 3 76 1850 -62ab 6 82 1850 -62b1 6 86 1850 -62b7 4 87 1850 -62bb 1e 91 1850 -62d9 3 93 1850 -62dc e 94 1850 -62ea 2 96 1850 -62ec 7 98 1850 -62f3 6 99 1850 -62f9 8 102 1850 -6301 5 104 1850 -6306 1 105 1850 -6307 3 78 1850 -630a 1 105 1850 -FUNC 630b 2f 8 _ftbuf -630b 0 138 1850 -630b 8 146 1850 -6313 c 148 1850 -631f 6 151 1850 -6325 7 152 1850 -632c 4 153 1850 -6330 9 154 1850 -6339 1 166 1850 -FUNC 633a 82 4 _LocaleUpdate::_LocaleUpdate(localeinfo_struct *) -633a 0 261 1343 -633a f 262 1343 -6349 8 264 1343 -6351 5 265 1343 -6356 6 266 1343 -635c 1c 268 1343 -6378 21 269 1343 -6399 9 270 1343 -63a2 4 272 1343 -63a6 4 273 1343 -63aa 2 276 1343 -63ac a 278 1343 -63b6 6 280 1343 -FUNC 63bc e 0 _LocaleUpdate::~_LocaleUpdate() -63bc 0 282 1343 -63bc 6 283 1343 -63c2 7 284 1343 -63c9 1 285 1343 -FUNC 63ca 3 0 _LocaleUpdate::GetLocaleT() -63ca 2 287 1343 -63cc 1 289 1343 -FUNC 63cd 33 0 write_char -63cd 0 2433 1312 -63cd a 2434 1312 -63d7 2 2437 1312 -63d9 21 2442 1312 -63fa 2 2444 1312 -63fc 1 2447 1312 -63fd 2 2446 1312 -63ff 1 2447 1312 -FUNC 6400 24 c write_multi_char -6400 6 2498 1312 -6406 2 2501 1312 -6408 e 2500 1312 -6416 5 2501 1312 -641b 7 2499 1312 -6422 2 2504 1312 -FUNC 6424 4a 4 write_string -6424 0 2563 1312 -6424 12 2564 1312 -6436 6 2566 1312 -643c 2 2567 1312 -643e e 2570 1312 -644c 5 2571 1312 -6451 a 2573 1312 -645b 9 2574 1312 -6464 9 2569 1312 -646d 1 2579 1312 -FUNC 646e d 4 get_int_arg -646e 0 2602 1312 -646e c 2603 1312 -647a 1 2604 1312 -FUNC 647b 10 4 get_int64_arg -647b 0 2644 1312 -647b f 2645 1312 -648a 1 2646 1312 -FUNC 648b e 4 get_short_arg -648b 0 2671 1312 -648b d 2672 1312 -6498 1 2673 1312 -FUNC 6499 994 10 _output_l -6499 1b 975 1312 -64b4 45 1036 1312 -64f9 2d 1031 1312 -6526 b1 1033 1312 -65d7 8 1036 1312 -65df 26 1073 1312 -6605 1d 1075 1312 -6622 8 1076 1312 -662a 18 1131 1312 -6642 13 1173 1312 -6655 3 1174 1312 -6658 5 1175 1312 -665d 1f 1179 1312 -667c 4 1193 1312 -6680 5 1194 1312 -6685 4 1181 1312 -6689 5 1182 1312 -668e 4 1184 1312 -6692 5 1185 1312 -6697 7 1190 1312 -669e 5 1191 1312 -66a3 4 1187 1312 -66a7 5 1196 1312 -66ac 5 1200 1312 -66b1 9 1206 1312 -66ba b 1233 1312 -66c5 4 1235 1312 -66c9 3 1236 1312 -66cc 5 1239 1312 -66d1 10 1241 1312 -66e1 5 1243 1312 -66e6 3 1248 1312 -66e9 5 1249 1312 -66ee 5 1253 1312 -66f3 9 1259 1312 -66fc b 1284 1312 -6707 4 1285 1312 -670b 5 1287 1312 -6710 10 1289 1312 -6720 5 1291 1312 -6725 18 1295 1312 -673d 7 1362 1312 -6744 5 1363 1312 -6749 5 1301 1312 -674e 1 1303 1312 -674f a 1304 1312 -6759 5 1306 1312 -675e 4 1308 1312 -6762 5 1310 1312 -6767 4 1358 1312 -676b 5 1359 1312 -6770 c 1322 1312 -677c 2 1324 1312 -677e f 1325 1312 -678d a 1327 1312 -6797 2 1329 1312 -6799 a 1330 1312 -67a3 5 1332 1312 -67a8 30 1337 1312 -67d8 3 1352 1312 -67db 13 1158 1312 -67ee 11 1160 1312 -67ff 3 1161 1312 -6802 b 1163 1312 -680d b 1166 1312 -6818 5 1167 1312 -681d 32 1378 1312 -684f d 1716 1312 -685c 4 1724 1312 -6860 17 1749 1312 -6877 c 1750 1312 -6883 8 1381 1312 -688b 9 1385 1312 -6894 8 1561 1312 -689c 7 1562 1312 -68a3 d 1584 1312 -68b0 3 1589 1312 -68b3 15 1635 1312 -68c8 4 1636 1312 -68cc 8 1637 1312 -68d4 f 1639 1312 -68e3 1d 1378 1312 -6900 12 1448 1312 -6912 16 1467 1312 -6928 4 1470 1312 -692c 7 1471 1312 -6933 2 1472 1312 -6935 6 1499 1312 -693b 7 1500 1312 -6942 6 1503 1312 -6948 5 1506 1312 -694d 5 1523 1312 -6952 e 1541 1312 -6960 6 1546 1312 -6966 d 1548 1312 -6973 7 1549 1312 -697a 5 1550 1312 -697f 3 1551 1312 -6982 5 1553 1312 -6987 8 1543 1312 -698f 7 1544 1312 -6996 5 1557 1312 -699b 34 1378 1312 -69cf d 1908 1312 -69dc 9 1910 1312 -69e5 8 1668 1312 -69ed d 1688 1312 -69fa 6 1702 1312 -6a00 7 1703 1312 -6a07 2 1704 1312 -6a09 5 1706 1312 -6a0e 7 1708 1312 -6a15 5 1710 1312 -6a1a 4 1864 1312 -6a1e 7 1869 1312 -6a25 c 1933 1312 -6a31 8 1939 1312 -6a39 5 1958 1312 -6a3e 7 1751 1312 -6a45 9 1752 1312 -6a4e 5 1753 1312 -6a53 3 1754 1312 -6a56 9 1756 1312 -6a5f f 1759 1312 -6a6e 2 1760 1312 -6a70 13 1765 1312 -6a83 9 1767 1312 -6a8c e 1809 1312 -6a9a 27 1828 1312 -6ac1 13 1838 1312 -6ad4 15 1840 1312 -6ae9 a 1844 1312 -6af3 15 1846 1312 -6b08 5 1852 1312 -6b0d 7 1853 1312 -6b14 4 1854 1312 -6b18 1 1857 1312 -6b19 5 1859 1312 -6b1e 7 1877 1312 -6b25 3 1887 1312 -6b28 2 1888 1312 -6b2a 1a 1378 1312 -6b44 7 1892 1312 -6b4b 11 1897 1312 -6b5c c 1900 1312 -6b68 7 1901 1312 -6b6f 5 1903 1312 -6b74 5 1961 1312 -6b79 6 1987 1312 -6b7f 14 2026 1312 -6b93 2 2045 1312 -6b95 5 2051 1312 -6b9a 2 2071 1312 -6b9c 3 2074 1312 -6b9f 6 2080 1312 -6ba5 2 2099 1312 -6ba7 5 2105 1312 -6bac f 2128 1312 -6bbb 7 2129 1312 -6bc2 7 2130 1312 -6bc9 c 2136 1312 -6bd5 2 2142 1312 -6bd7 6 2148 1312 -6bdd 7 2149 1312 -6be4 2 2150 1312 -6be6 4 2151 1312 -6bea a 2152 1312 -6bf4 3 2153 1312 -6bf7 6 2157 1312 -6bfd 3 2158 1312 -6c00 6 2163 1312 -6c06 10 2165 1312 -6c16 10 2166 1312 -6c26 c 2168 1312 -6c32 3 2170 1312 -6c35 3 2172 1312 -6c38 2 2173 1312 -6c3a 8 2175 1312 -6c42 1 2176 1312 -6c43 19 2180 1312 -6c5c 9 2181 1312 -6c65 1 2182 1312 -6c66 2 2185 1312 -6c68 6 1640 1312 -6c6e 2 1641 1312 -6c70 4 1640 1312 -6c74 5 1642 1312 -6c79 2 1644 1312 -6c7b 4 1645 1312 -6c7f 8 1646 1312 -6c87 5 1647 1312 -6c8c 6 1648 1312 -6c92 1 1649 1312 -6c93 4 1648 1312 -6c97 6 1650 1312 -6c9d a 2201 1312 -6ca7 7 2204 1312 -6cae 6 2205 1312 -6cb4 4 2207 1312 -6cb8 2 2208 1312 -6cba 4 2210 1312 -6cbe 4 2212 1312 -6cc2 2 2213 1312 -6cc4 4 2215 1312 -6cc8 4 2217 1312 -6ccc 7 2218 1312 -6cd3 9 2224 1312 -6cdc 6 2228 1312 -6ce2 11 2230 1312 -6cf3 11 2234 1312 -6d04 d 2236 1312 -6d11 f 2238 1312 -6d20 d 2243 1312 -6d2d 3 2249 1312 -6d30 3 2250 1312 -6d33 1e 2252 1312 -6d51 9 2253 1312 -6d5a 18 2257 1312 -6d72 2 1690 1312 -6d74 4 2254 1312 -6d78 2 2259 1312 -6d7a d 2260 1312 -6d87 c 2290 1312 -6d93 f 2292 1312 -6da2 6 2297 1312 -6da8 8 2298 1312 -6db0 1e 2299 1312 -6dce 17 1163 1312 -6de5 10 2376 1312 -6df5 38 2377 1312 -FUNC 6e2d 3b 4 _get_errno_from_oserr -6e2d 0 119 6100 -6e2d 6 123 6100 -6e33 f 124 6100 -6e42 8 133 6100 -6e4a 3 134 6100 -6e4d 1 139 6100 -6e4e 7 125 6100 -6e55 1 139 6100 -6e56 11 135 6100 -6e67 1 139 6100 -FUNC 6e68 13 0 _errno -6e68 0 280 6100 -6e68 5 281 6100 -6e6d 4 282 6100 -6e71 5 283 6100 -6e76 1 288 6100 -6e77 3 285 6100 -6e7a 1 288 6100 -FUNC 6e7b 13 0 __doserrno -6e7b 0 293 6100 -6e7b 5 294 6100 -6e80 4 295 6100 -6e84 5 296 6100 -6e89 1 300 6100 -6e8a 3 298 6100 -6e8d 1 300 6100 -FUNC 6e8e 1e 4 _dosmaperr -6e8e 1 110 6100 -6e8f 9 111 6100 -6e98 13 113 6100 -6eab 1 114 6100 -FUNC 6eac 1b 4 _set_errno -6eac 0 157 6100 -6eac 5 158 6100 -6eb1 4 159 6100 -6eb5 3 161 6100 -6eb8 1 168 6100 -6eb9 b 165 6100 -6ec4 2 166 6100 -6ec6 1 168 6100 -FUNC 6ec7 2a 4 _get_errno -6ec7 1 187 6100 -6ec8 1b 189 6100 -6ee3 1 195 6100 -6ee4 9 193 6100 -6eed 3 194 6100 -6ef0 1 195 6100 -FUNC 6ef1 1b 4 _set_doserrno -6ef1 0 213 6100 -6ef1 5 214 6100 -6ef6 4 215 6100 -6efa 3 217 6100 -6efd 1 224 6100 -6efe b 221 6100 -6f09 2 222 6100 -6f0b 1 224 6100 -FUNC 6f0c 2a 4 _get_doserrno -6f0c 1 243 6100 -6f0d 1b 245 6100 -6f28 1 251 6100 -6f29 9 249 6100 -6f32 3 250 6100 -6f35 1 251 6100 -FUNC 6f38 45 0 _SEH_prolog4 -FUNC 6f7d 14 0 _SEH_epilog4 -FUNC 6fa0 24 0 ValidateLocalCookies -FUNC 6fd0 196 10 _except_handler4 -FUNC 7166 90 10 vprintf_helper -7166 c 47 1507 -7172 d 48 1507 -717f 2b 52 1507 -71aa 7 55 1507 -71b1 3 56 1507 -71b4 8 58 1507 -71bc 10 59 1507 -71cc a 60 1507 -71d6 c 63 1507 -71e2 3 67 1507 -71e5 6 68 1507 -71eb 3 63 1507 -71ee 8 64 1507 -FUNC 71f6 1a c _vprintf_l -71f6 0 75 1507 -71f6 19 76 1507 -720f 1 77 1507 -FUNC 7210 1a c _vprintf_s_l -7210 0 84 1507 -7210 19 85 1507 -7229 1 86 1507 -FUNC 722a 1a c _vprintf_p_l -722a 0 93 1507 -722a 19 94 1507 -7243 1 95 1507 -FUNC 7244 18 8 vprintf -7244 0 101 1507 -7244 17 102 1507 -725b 1 103 1507 -FUNC 725c 18 8 vprintf_s -725c 0 109 1507 -725c 17 110 1507 -7273 1 111 1507 -FUNC 7274 18 8 _vprintf_p -7274 0 117 1507 -7274 17 118 1507 -728b 1 119 1507 -FUNC 728c 104 0 __report_gsfailure -728c 9 140 3731 -7295 5 170 3731 -729a 6 171 3731 -72a0 6 172 3731 -72a6 6 173 3731 -72ac 6 174 3731 -72b2 6 175 3731 -72b8 7 176 3731 -72bf 7 177 3731 -72c6 7 178 3731 -72cd 7 179 3731 -72d4 7 180 3731 -72db 7 181 3731 -72e2 1 182 3731 -72e3 6 183 3731 -72e9 3 190 3731 -72ec 5 191 3731 -72f1 3 192 3731 -72f4 5 193 3731 -72f9 3 194 3731 -72fc 5 195 3731 -7301 6 201 3731 -7307 a 204 3731 -7311 a 206 3731 -731b a 285 3731 -7325 a 286 3731 -732f b 293 3731 -733a b 294 3731 -7345 b 297 3731 -7350 8 298 3731 -7358 8 302 3731 -7360 b 304 3731 -736b 9 313 3731 -7374 8 315 3731 -737c 12 319 3731 -738e 2 320 3731 -FUNC 7390 5c6 c _write_nolock -7390 22 95 4777 -73b2 2 106 4777 -73b4 11 108 4777 -73c5 7 109 4777 -73cc 2b 111 4777 -73f7 27 113 4777 -741e 10 116 4777 -742e 33 119 4777 -7461 6 122 4777 -7467 f 126 4777 -7476 1c 143 4777 -7492 5 146 4777 -7497 8 147 4777 -749f 14 148 4777 -74b3 16 152 4777 -74c9 6 153 4777 -74cf 4 157 4777 -74d3 16 160 4777 -74e9 9 153 4777 -74f2 b 163 4777 -74fd 9 164 4777 -7506 11 170 4777 -7517 18 171 4777 -752f 2 173 4777 -7531 14 174 4777 -7545 18 175 4777 -755d 4 181 4777 -7561 2e 205 4777 -758f 21 212 4777 -75b0 6 213 4777 -75b6 8 214 4777 -75be a 222 4777 -75c8 29 229 4777 -75f1 a 230 4777 -75fb 3 232 4777 -75fe 3 233 4777 -7601 2 238 4777 -7603 8 186 4777 -760b 3 191 4777 -760e 9 192 4777 -7617 f 193 4777 -7626 8 240 4777 -762e 13 242 4777 -7641 3 244 4777 -7644 6 251 4777 -764a 3 254 4777 -764d 14 255 4777 -7661 3 257 4777 -7664 12 258 4777 -7676 5 236 4777 -767b e 268 4777 -7689 12 277 4777 -769b f 278 4777 -76aa d 279 4777 -76b7 8 283 4777 -76bf 9 284 4777 -76c8 5 285 4777 -76cd 3 286 4777 -76d0 7 287 4777 -76d7 f 289 4777 -76e6 25 297 4777 -770b 6 299 4777 -7711 16 300 4777 -7727 f 308 4777 -7736 f 314 4777 -7745 b 315 4777 -7750 8 319 4777 -7758 c 320 4777 -7764 6 321 4777 -776a 4 322 4777 -776e c 323 4777 -777a f 325 4777 -7789 25 333 4777 -77ae 6 335 4777 -77b4 1a 336 4777 -77ce 5 344 4777 -77d3 f 359 4777 -77e2 13 361 4777 -77f5 8 365 4777 -77fd b 366 4777 -7808 6 367 4777 -780e a 369 4777 -7818 11 371 4777 -7829 2f 382 4777 -7858 4 384 4777 -785c 25 406 4777 -7881 3 407 4777 -7884 6 412 4777 -788a 9 409 4777 -7893 4 419 4777 -7897 15 423 4777 -78ac 2 428 4777 -78ae 1b 434 4777 -78c9 a 437 4777 -78d3 2 439 4777 -78d5 9 440 4777 -78de a 443 4777 -78e8 7 447 4777 -78ef 8 449 4777 -78f7 b 452 4777 -7902 2 455 4777 -7904 9 456 4777 -790d 2 457 4777 -790f 11 459 4777 -7920 4 460 4777 -7924 b 462 4777 -792f 7 463 4777 -7936 5 464 4777 -793b 5 469 4777 -7940 16 470 4777 -FUNC 7956 dc c _write -7956 c 61 4777 -7962 23 66 4777 -7985 2f 67 4777 -79b4 20 68 4777 -79d4 7 70 4777 -79db 3 72 4777 -79de 9 73 4777 -79e7 14 74 4777 -79fb 2 75 4777 -79fd b 76 4777 -7a08 7 77 4777 -7a0f 4 78 4777 -7a13 c 82 4777 -7a1f 3 86 4777 -7a22 6 87 4777 -7a28 a 83 4777 -FUNC 7a32 2d 4 _fileno -7a32 0 40 2176 -7a32 27 41 2176 -7a59 1 43 2176 -7a5a 4 42 2176 -7a5e 1 43 2176 -FUNC 7a5f e1 4 _commit -7a5f c 39 5043 -7a6b 1b 43 5043 -7a86 28 44 5043 -7aae 20 45 5043 -7ace 7 47 5043 -7ad5 3 48 5043 -7ad8 9 49 5043 -7ae1 14 51 5043 -7af5 9 52 5043 -7afe 2 54 5043 -7b00 3 55 5043 -7b03 5 59 5043 -7b08 a 62 5043 -7b12 b 66 5043 -7b1d 4 67 5043 -7b21 c 72 5043 -7b2d 3 75 5043 -7b30 6 76 5043 -7b36 a 73 5043 -FUNC 7b40 49 0 _mtinitlocks -7b40 2 137 2371 -7b42 7 144 2371 -7b49 11 145 2371 -7b5a 2 146 2371 -7b5c 15 148 2371 -7b71 6 144 2371 -7b77 5 157 2371 -7b7c d 158 2371 -FUNC 7b89 55 0 _mtdeletelocks -7b89 1 188 2371 -7b8a d 194 2371 -7b97 c 196 2371 -7ba3 3 200 2371 -7ba6 6 206 2371 -7bac f 207 2371 -7bbb 6 215 2371 -7bc1 c 217 2371 -7bcd 10 221 2371 -7bdd 1 224 2371 -FUNC 7bde 15 4 _unlock -7bde 3 371 2371 -7be1 10 375 2371 -7bf1 2 376 2371 -FUNC 7bf3 18 4 _lockerr_exit -7bf3 0 403 2371 -7bf3 c 404 2371 -7bff b 405 2371 -7c0a 1 406 2371 -FUNC 7c0b c3 4 _mtinitlocknum -7c0b c 259 2371 -7c17 6 261 2371 -7c1d a 269 2371 -7c27 5 270 2371 -7c2c 7 271 2371 -7c33 c 272 2371 -7c3f e 276 2371 -7c4d 4 277 2371 -7c51 e 279 2371 -7c5f b 280 2371 -7c6a 4 281 2371 -7c6e 8 284 2371 -7c76 3 285 2371 -7c79 4 287 2371 -7c7d 11 288 2371 -7c8e 7 289 2371 -7c95 b 290 2371 -7ca0 3 291 2371 -7ca3 2 292 2371 -7ca5 2 293 2371 -7ca7 2 296 2371 -7ca9 7 297 2371 -7cb0 c 300 2371 -7cbc 3 304 2371 -7cbf 6 305 2371 -7cc5 9 301 2371 -FUNC 7cce 31 4 _lock -7cce 3 333 2371 -7cd1 10 338 2371 -7ce1 b 340 2371 -7cec 8 341 2371 -7cf4 9 348 2371 -7cfd 2 349 2371 -FUNC 7cff 240 0 _ioinit -7cff c 111 4958 -7d0b 5 122 4958 -7d10 a 127 4958 -7d1a 7 128 4958 -7d21 f 137 4958 -7d30 6 139 4958 -7d36 5 142 4958 -7d3b 6 143 4958 -7d41 8 145 4958 -7d49 4 146 4958 -7d4d 3 147 4958 -7d50 4 148 4958 -7d54 3 149 4958 -7d57 4 151 4958 -7d5b 4 152 4958 -7d5f 4 153 4958 -7d63 13 145 4958 -7d76 15 161 4958 -7d8b 2 166 4958 -7d8d 3 172 4958 -7d90 6 173 4958 -7d96 b 179 4958 -7da1 5 185 4958 -7da6 f 191 4958 -7db5 9 204 4958 -7dbe 7 205 4958 -7dc5 8 207 4958 -7dcd 4 208 4958 -7dd1 3 209 4958 -7dd4 4 210 4958 -7dd8 4 211 4958 -7ddc 4 212 4958 -7de0 4 213 4958 -7de4 4 214 4958 -7de8 f 207 4958 -7df7 9 185 4958 -7e00 2 284 4958 -7e02 6 197 4958 -7e08 8 221 4958 -7e10 24 234 4958 -7e34 15 236 4958 -7e49 7 237 4958 -7e50 5 238 4958 -7e55 18 241 4958 -7e6d 3 243 4958 -7e70 d 221 4958 -7e7d 2 253 4958 -7e7f b 255 4958 -7e8a c 258 4958 -7e96 6 306 4958 -7e9c 4 262 4958 -7ea0 30 266 4958 -7ed0 2 271 4958 -7ed2 a 277 4958 -7edc 6 278 4958 -7ee2 5 279 4958 -7ee7 4 280 4958 -7eeb 14 284 4958 -7eff 3 286 4958 -7f02 2 288 4958 -7f04 4 297 4958 -7f08 6 298 4958 -7f0e a 253 4958 -7f18 c 313 4958 -7f24 4 315 4958 -7f28 7 128 4958 -7f2f a 129 4958 -7f39 6 316 4958 -FUNC 7f3f 4c 0 _ioterm -7f3f 2 341 4958 -7f41 5 345 4958 -7f46 6 347 4958 -7f4c 8 353 4958 -7f54 9 355 4958 -7f5d 11 356 4958 -7f6e 4 353 4958 -7f72 7 361 4958 -7f79 11 362 4958 -7f8a 1 365 4958 -FUNC 7f8b 21 4 wait_a_bit -7f8b 1 18 5557 -7f8c b 19 5557 -7f97 6 20 5557 -7f9d 8 21 5557 -7fa5 3 22 5557 -7fa8 3 23 5557 -7fab 1 24 5557 -FUNC 7fac 10 4 _set_malloc_crt_max_wait -7fac 0 32 5557 -7fac f 34 5557 -7fbb 1 36 5557 -FUNC 7fbc 40 4 _malloc_crt -7fbc 2 39 5557 -7fbe 2 40 5557 -7fc0 b 44 5557 -7fcb d 45 5557 -7fd8 18 46 5557 -7ff0 7 47 5557 -7ff7 4 50 5557 -7ffb 1 51 5557 -FUNC 7ffc 48 8 _calloc_crt -7ffc 2 54 5557 -7ffe 2 55 5557 -8000 14 61 5557 -8014 c 62 5557 -8020 18 63 5557 -8038 7 64 5557 -803f 4 67 5557 -8043 1 68 5557 -FUNC 8044 4b 8 _realloc_crt -8044 2 71 5557 -8046 2 72 5557 -8048 f 76 5557 -8057 14 77 5557 -806b 18 78 5557 -8083 7 79 5557 -808a 4 82 5557 -808e 1 83 5557 -FUNC 808f 50 c _recalloc_crt -808f 2 86 5557 -8091 2 87 5557 -8093 16 91 5557 -80a9 12 92 5557 -80bb 18 94 5557 -80d3 7 95 5557 -80da 4 100 5557 -80de 1 101 5557 -FUNC 80df 8 0 _malloc_crt_fastcall -80df 0 105 5557 -80df 7 106 5557 -80e6 1 107 5557 -FUNC 80e7 a 0 _calloc_crt_fastcall -80e7 0 110 5557 -80e7 9 111 5557 -80f0 1 112 5557 -FUNC 80f1 a 0 _realloc_crt_fastcall -80f1 0 115 5557 -80f1 9 116 5557 -80fa 1 117 5557 -FUNC 80fb 8e 4 free -80fb c 42 5515 -8107 7 47 5515 -810e 9 53 5515 -8117 8 57 5515 -811f 4 58 5515 -8123 e 60 5515 -8131 9 61 5515 -813a c 64 5515 -8146 6 68 5515 -814c 3 70 5515 -814f 2 106 5515 -8151 9 65 5515 -815a f 109 5515 -8169 4 110 5515 -816d 16 112 5515 -8183 6 115 5515 -FUNC 8189 9f 0 _fcloseall -8189 c 43 1792 -8195 5 44 1792 -819a 8 47 1792 -81a2 3 48 1792 -81a5 e 50 1792 -81b3 10 52 1792 -81c3 14 57 1792 -81d7 3 58 1792 -81da 5 63 1792 -81df 12 65 1792 -81f1 e 66 1792 -81ff 8 67 1792 -8207 3 50 1792 -820a c 73 1792 -8216 3 77 1792 -8219 6 78 1792 -821f 9 74 1792 -FUNC 8228 19 4 std::bad_exception::bad_exception(char const *) -8228 13 351 6035 -823b 6 352 6035 -FUNC 8241 b 0 std::bad_exception::~bad_exception() -8241 6 355 6035 -8247 5 356 6035 -FUNC 824c 22 0 std::bad_exception::`vector deleting destructor'(unsigned int) -FUNC 826e 5c c __TypeMatch -826e 2 999 6034 -8270 13 1001 6034 -8283 1b 1008 6034 -829e 4 1009 6034 -82a2 22 1023 6034 -82c4 5 1002 6034 -82c9 1 1024 6034 -FUNC 82ca 44 4 __FrameUnwindFilter -82ca 0 1035 6034 -82ca 6 1038 6034 -82d0 e 1040 6034 -82de 13 1076 6034 -82f1 e 1068 6034 -82ff c 1070 6034 -830b 2 1072 6034 -830d 1 1078 6034 -FUNC 830e e1 10 __FrameUnwindToState -830e c 1105 6034 -831a 1b 1112 6034 -8335 c 1114 6034 -8341 4 1115 6034 -8345 5 1119 6034 -834a f 1123 6034 -8359 f 1126 6034 -8368 7 1128 6034 -836f 6 1131 6034 -8375 3 1138 6034 -8378 12 1145 6034 -838a 6 1149 6034 -8390 d 1151 6034 -839d d 1153 6034 -83aa 3 1155 6034 -83ad 2 1156 6034 -83af c 1157 6034 -83bb a 1169 6034 -83c5 3 1176 6034 -83c8 6 1180 6034 -83ce 6 1157 6034 -83d4 e 1158 6034 -83e2 d 1159 6034 -FUNC 83ef 45 0 ExFilterRethrow -83ef 0 1533 6034 -83ef 2 1535 6034 -83f1 2f 1538 6034 -8420 e 1542 6034 -842e 2 1543 6034 -8430 1 1547 6034 -8431 2 1545 6034 -8433 1 1547 6034 -FUNC 8434 54 8 __DestructExceptionObject -8434 c 1791 6034 -8440 f 1794 6034 -844f e 1801 6034 -845d 4 1803 6034 -8461 9 1810 6034 -846a 7 1814 6034 -8471 6 1824 6034 -8477 c 1815 6034 -8483 5 1819 6034 -FUNC 8488 25 8 __AdjustPointer -8488 0 1842 6034 -8488 d 1843 6034 -8495 6 1845 6034 -849b 3 1850 6034 -849e e 1852 6034 -84ac 1 1856 6034 -FUNC 84ad 13 0 __uncaught_exception() -84ad 0 1867 6034 -84ad 12 1868 6034 -84bf 1 1869 6034 -FUNC 84c0 b3 8 __CxxRegisterExceptionObject -84c0 0 2077 6034 -84c0 14 2085 6034 -84d4 26 2087 6034 -84fa 6 2088 6034 -8500 b 2090 6034 -850b b 2093 6034 -8516 e 2094 6034 -8524 e 2095 6034 -8532 b 2096 6034 -853d 2 2097 6034 -853f 4 2098 6034 -8543 4 2099 6034 -8547 c 2101 6034 -8553 10 2102 6034 -8563 c 2103 6034 -856f 3 2104 6034 -8572 1 2105 6034 -FUNC 8573 4c 4 __CxxDetectRethrow -8573 0 2117 6034 -8573 6 2119 6034 -8579 2 2120 6034 -857b 2 2121 6034 -857d 2f 2122 6034 -85ac c 2123 6034 -85b8 3 2124 6034 -85bb 1 2127 6034 -85bc 2 2126 6034 -85be 1 2127 6034 -FUNC 85bf 139 8 __CxxUnregisterExceptionObject -85bf 1 2139 6034 -85c0 4 2143 6034 -85c4 d 2145 6034 -85d1 6 2146 6034 -85d7 85 2149 6034 -865c 14 2150 6034 -8670 5b 2152 6034 -86cb c 2153 6034 -86d7 e 2154 6034 -86e5 12 2155 6034 -86f7 1 2157 6034 -FUNC 86f8 4 0 __CxxQueryExceptionSize -86f8 0 2167 6034 -86f8 3 2168 6034 -86fb 1 2169 6034 -FUNC 86fc 32 8 __CxxCallUnwindDtor -86fc c 2189 6034 -8708 4 2190 6034 -870c 6 2192 6034 -8712 2 2193 6034 -8714 d 2194 6034 -8721 7 2197 6034 -8728 6 2198 6034 -FUNC 872e 33 8 __CxxCallUnwindDelDtor -872e c 2218 6034 -873a 4 2219 6034 -873e 7 2221 6034 -8745 2 2222 6034 -8747 d 2223 6034 -8754 7 2226 6034 -875b 6 2227 6034 -FUNC 8761 32 8 __CxxCallUnwindStdDelDtor -8761 c 2247 6034 -876d 4 2248 6034 -8771 6 2250 6034 -8777 2 2251 6034 -8779 d 2252 6034 -8786 7 2255 6034 -878d 6 2256 6034 -FUNC 8793 3b 14 __CxxCallUnwindVecDtor -8793 c 2282 6034 -879f 4 2283 6034 -87a3 f 2285 6034 -87b2 2 2286 6034 -87b4 d 2287 6034 -87c1 7 2290 6034 -87c8 6 2291 6034 -FUNC 87ce 79 4 IsInExceptionSpec -87ce 6 2302 6034 -87d4 9 2303 6034 -87dd 5 2307 6034 -87e2 f 2323 6034 -87f1 9 2326 6034 -87fa 2 2327 6034 -87fc 10 2328 6034 -880c 26 2335 6034 -8832 4 2337 6034 -8836 c 2323 6034 -8842 3 2343 6034 -8845 2 2344 6034 -FUNC 8847 49 4 CallUnexpected -8847 c 2379 6034 -8853 13 2380 6034 -8866 4 2383 6034 -886a 5 2384 6034 -886f 4 2391 6034 -8873 5 2392 6034 -8878 8 2388 6034 -8880 10 2390 6034 -FUNC 8890 30 0 Is_bad_exception_allowed -8890 2 2399 6034 -8892 8 2400 6034 -889a 1d 2402 6034 -88b7 4 2408 6034 -88bb 1 2409 6034 -88bc 4 2404 6034 -FUNC 88c0 82 8 _is_exception_typeof(type_info const &,_EXCEPTION_POINTERS *) -88c0 1 2416 6034 -88c1 e 2417 6034 -88cf 2 2419 6034 -88d1 9 2422 6034 -88da 2b 2423 6034 -8905 6 2432 6034 -890b 7 2433 6034 -8912 2 2445 6034 -8914 20 2446 6034 -8934 4 2439 6034 -8938 4 2454 6034 -893c 6 2455 6034 -FUNC 8942 19c 18 CallCatchBlock -8942 14 1431 6034 -8956 3 1437 6034 -8959 4 1439 6034 -895d 6 1443 6034 -8963 11 1447 6034 -8974 e 1451 6034 -8982 e 1452 6034 -8990 b 1454 6034 -899b e 1455 6034 -89a9 a 1457 6034 -89b3 3 1458 6034 -89b6 16 1463 6034 -89cc 12 1464 6034 -89de c 1465 6034 -89ea 3 1470 6034 -89ed 15 1471 6034 -8a02 3 1472 6034 -8a05 c 1474 6034 -8a11 11 1476 6034 -8a22 7 1478 6034 -8a29 d 1482 6034 -8a36 b 1486 6034 -8a41 13 1488 6034 -8a54 3 1517 6034 -8a57 6 1518 6034 -8a5d 5 1474 6034 -8a62 6 1488 6034 -8a68 6 1494 6034 -8a6e 9 1497 6034 -8a77 e 1500 6034 -8a85 e 1501 6034 -8a93 3f 1510 6034 -8ad2 c 1511 6034 -FUNC 8ade 17f 10 __BuildCatchObjectHelper -8ade c 1575 6034 -8aea 5 1576 6034 -8aef 2a 1582 6034 -8b19 2 1588 6034 -8b1b 3 1590 6034 -8b1e 2 1588 6034 -8b20 2 1592 6034 -8b22 4 1611 6034 -8b26 3 1614 6034 -8b29 4 1622 6034 -8b2d 4 1615 6034 -8b31 26 1622 6034 -8b57 5 1623 6034 -8b5c 11 1625 6034 -8b6d 5 1628 6034 -8b72 3 1629 6034 -8b75 6 1636 6034 -8b7b 4 1629 6034 -8b7f 20 1636 6034 -8b9f 12 1637 6034 -8bb1 10 1639 6034 -8bc1 4 1641 6034 -8bc5 2 1646 6034 -8bc7 5 1649 6034 -8bcc 18 1654 6034 -8be4 1e 1656 6034 -8c02 2 1660 6034 -8c04 25 1668 6034 -8c29 d 1672 6034 -8c36 2 1677 6034 -8c38 5 1678 6034 -8c3d 7 1681 6034 -8c44 5 1688 6034 -8c49 7 1682 6034 -8c50 5 1684 6034 -8c55 2 1584 6034 -8c57 6 1689 6034 -FUNC 8c5d 91 10 __BuildCatchObject -8c5d c 1712 6034 -8c69 b 1716 6034 -8c74 3 1718 6034 -8c77 2 1720 6034 -8c79 a 1739 6034 -8c83 4 1743 6034 -8c87 1a 1744 6034 -8ca1 1a 1756 6034 -8cbb 2 1757 6034 -8cbd 18 1750 6034 -8cd5 7 1762 6034 -8cdc 6 1769 6034 -8ce2 7 1763 6034 -8ce9 5 1765 6034 -FUNC 8cee 143 10 __CxxExceptionFilter -8cee 3 1973 6034 -8cf1 a 1985 6034 -8cfb 3 2065 6034 -8cfe 2a 1993 6034 -8d28 32 2008 6034 -8d5a 6 2010 6034 -8d60 c 2011 6034 -8d6c 6 2012 6034 -8d72 b 2013 6034 -8d7d f 2040 6034 -8d8c a 2041 6034 -8d96 2 2047 6034 -8d98 1b 2050 6034 -8db3 4 2042 6034 -8db7 2 2050 6034 -8db9 c 2052 6034 -8dc5 6 2053 6034 -8dcb 13 2054 6034 -8dde 2 2055 6034 -8de0 25 1995 6034 -8e05 6 1997 6034 -8e0b e 1999 6034 -8e19 4 2000 6034 -8e1d c 2004 6034 -8e29 6 2005 6034 -8e2f 2 2065 6034 -FUNC 8e31 6c 20 CatchIt -8e31 3 1217 6034 -8e34 6 1233 6034 -8e3a 10 1234 6034 -8e4a 4 1253 6034 -8e4e 6 1254 6034 -8e54 2 1255 6034 -8e56 8 1256 6034 -8e5e e 1259 6034 -8e6c 3 1265 6034 -8e6f 21 1273 6034 -8e90 4 1278 6034 -8e94 7 1280 6034 -8e9b 2 1286 6034 -FUNC 8e9d f2 20 FindHandlerForForeignException -8e9d 6 913 6034 -8ea3 10 920 6034 -8eb3 2a 926 6034 -8edd 23 934 6034 -8f00 e 940 6034 -8f0e 17 945 6034 -8f25 c 948 6034 -8f31 29 954 6034 -8f5a 33 974 6034 -8f8d 2 984 6034 -FUNC 8f8f 356 20 FindHandler -8f8f 6 569 6034 -8f95 20 632 6034 -8fb5 11 634 6034 -8fc6 42 637 6034 -9008 12 639 6034 -901a e 645 6034 -9028 b 646 6034 -9033 16 652 6034 -9049 2a 653 6034 -9073 12 659 6034 -9085 b 661 6034 -9090 5 662 6034 -9095 15 666 6034 -90aa 23 676 6034 -90cd 5 692 6034 -90d2 c 686 6034 -90de 30 688 6034 -910e 2b 698 6034 -9139 d 707 6034 -9146 19 715 6034 -915f c 718 6034 -916b 10 729 6034 -917b 6 735 6034 -9181 3 736 6034 -9184 7 737 6034 -918b 9 740 6034 -9194 2 741 6034 -9196 7 742 6034 -919d 23 750 6034 -91c0 d 737 6034 -91cd 2 676 6034 -91cf 33 774 6034 -9202 3 718 6034 -9205 6 795 6034 -920b a 804 6034 -9215 27 812 6034 -923c f 814 6034 -924b 5 840 6034 -9250 5 841 6034 -9255 b 843 6034 -9260 5 844 6034 -9265 d 846 6034 -9272 6 847 6034 -9278 2 848 6034 -927a 8 849 6034 -9282 14 851 6034 -9296 b 853 6034 -92a1 6 863 6034 -92a7 a 864 6034 -92b1 1c 866 6034 -92cd 16 877 6034 -92e3 2 880 6034 -FUNC 92e5 18 4 std::bad_exception::bad_exception(std::bad_exception const &) -FUNC 92fd e4 20 __InternalCxxFrameHandler -92fd 6 412 6034 -9303 3d 426 6034 -9340 6 432 6034 -9346 6 435 6034 -934c 10 440 6034 -935c 11 479 6034 -936d 2 482 6034 -936f 18 489 6034 -9387 19 499 6034 -93a0 1d 513 6034 -93bd 1c 524 6034 -93d9 6 533 6034 -93df 2 535 6034 -FUNC 93e1 6c 0 _use_encode_pointer -93e1 7 66 2227 -93e8 2 72 2227 -93ea 12 75 2227 -93fc 7 76 2227 -9403 5 78 2227 -9408 7 82 2227 -940f 5 85 2227 -9414 e 91 2227 -9422 1f 93 2227 -9441 4 95 2227 -9445 6 100 2227 -944b 2 101 2227 -FUNC 944d 6e 4 _encode_pointer -944d 1 120 2227 -944e 2b 129 2227 -9479 8 145 2227 -9481 d 133 2227 -948e d 135 2227 -949b c 138 2227 -94a7 4 148 2227 -94ab a 150 2227 -94b5 5 153 2227 -94ba 1 154 2227 -FUNC 94bb 9 0 _encoded_null -94bb 0 173 2227 -94bb 8 174 2227 -94c3 1 175 2227 -FUNC 94c4 6e 4 _decode_pointer -94c4 1 194 2227 -94c5 2b 203 2227 -94f0 8 219 2227 -94f8 d 207 2227 -9505 d 209 2227 -9512 c 212 2227 -951e 4 222 2227 -9522 a 224 2227 -952c 5 227 2227 -9531 1 228 2227 -FUNC 9532 9 4 __crtTlsAlloc -9532 0 240 2227 -9532 6 241 2227 -9538 3 242 2227 -FUNC 953b 15 4 __fls_getvalue -953b 0 258 2227 -953b 12 259 2227 -954d 3 260 2227 -FUNC 9550 6 0 __get_flsindex -9550 0 272 2227 -9550 5 273 2227 -9555 1 274 2227 -FUNC 9556 32 0 __set_flsgetvalue -9556 1 286 2227 -9557 e 288 2227 -9565 4 289 2227 -9569 e 291 2227 -9577 d 292 2227 -9584 3 294 2227 -9587 1 298 2227 -FUNC 9588 19 8 __fls_setvalue -9588 0 315 2227 -9588 16 316 2227 -959e 3 317 2227 -FUNC 95a1 3d 0 _mtterm -95a1 0 473 2227 -95a1 a 480 2227 -95ab f 481 2227 -95ba 7 482 2227 -95c1 a 485 2227 -95cb 7 486 2227 -95d2 7 487 2227 -95d9 5 494 2227 -FUNC 95de bf 8 _initptd -95de c 521 2227 -95ea e 522 2227 -95f8 a 524 2227 -9602 6 525 2227 -9608 4 527 2227 -960c 9 529 2227 -9615 16 532 2227 -962b 10 533 2227 -963b 3 540 2227 -963e 7 544 2227 -9645 7 545 2227 -964c 8 546 2227 -9654 7 547 2227 -965b 8 551 2227 -9663 4 552 2227 -9667 6 553 2227 -966d 4 561 2227 -9671 8 562 2227 -9679 9 563 2227 -9682 c 565 2227 -968e 6 568 2227 -9694 9 566 2227 -FUNC 969d 77 0 _getptd_noexit -969d 2 588 2227 -969f 6 592 2227 -96a5 15 600 2227 -96ba 14 608 2227 -96ce 19 610 2227 -96e7 a 616 2227 -96f1 6 618 2227 -96f7 6 619 2227 -96fd 2 621 2227 -96ff 7 627 2227 -9706 2 628 2227 -9708 8 633 2227 -9710 3 635 2227 -9713 1 636 2227 -FUNC 9714 18 0 _getptd -9714 1 657 2227 -9715 7 658 2227 -971c 4 659 2227 -9720 8 660 2227 -9728 3 662 2227 -972b 1 663 2227 -FUNC 972c 121 4 _freefls -972c c 691 2227 -9738 b 702 2227 -9743 7 703 2227 -974a 7 704 2227 -9751 7 706 2227 -9758 7 707 2227 -975f 7 709 2227 -9766 7 710 2227 -976d 7 712 2227 -9774 7 713 2227 -977b 7 715 2227 -9782 7 716 2227 -9789 7 718 2227 -9790 7 719 2227 -9797 a 721 2227 -97a1 7 722 2227 -97a8 8 724 2227 -97b0 4 725 2227 -97b4 1a 728 2227 -97ce 7 729 2227 -97d5 c 731 2227 -97e1 8 735 2227 -97e9 7 737 2227 -97f0 7 738 2227 -97f7 7 740 2227 -97fe 15 743 2227 -9813 7 744 2227 -981a c 747 2227 -9826 7 751 2227 -982d 8 754 2227 -9835 3 731 2227 -9838 9 732 2227 -9841 3 747 2227 -9844 9 748 2227 -FUNC 984d 69 4 _freeptd -984d 0 778 2227 -984d a 783 2227 -9857 1b 795 2227 -9872 13 796 2227 -9885 16 802 2227 -989b 7 804 2227 -98a2 a 807 2227 -98ac 9 811 2227 -98b5 1 813 2227 -FUNC 98b6 6 0 __threadid -98b6 0 837 2227 -98b6 6 838 2227 -FUNC 98bc 6 0 __threadhandle -98bc 0 844 2227 -98bc 6 845 2227 -FUNC 98c2 184 0 _mtinit -98c2 1 346 2227 -98c3 d 355 2227 -98d0 4 356 2227 -98d4 5 357 2227 -98d9 3 358 2227 -98dc 2 444 2227 -98de e 362 2227 -98ec d 365 2227 -98f9 d 368 2227 -9906 d 371 2227 -9913 2a 372 2227 -993d a 375 2227 -9947 1a 379 2227 -9961 25 388 2227 -9986 5 393 2227 -998b b 400 2227 -9996 10 401 2227 -99a6 10 402 2227 -99b6 18 403 2227 -99ce 7 410 2227 -99d5 2 412 2227 -99d7 1b 418 2227 -99f2 2 420 2227 -99f4 2d 428 2227 -9a21 a 438 2227 -9a2b 6 440 2227 -9a31 6 441 2227 -9a37 5 443 2227 -9a3c 5 430 2227 -9a41 4 389 2227 -9a45 1 444 2227 -FUNC 9a46 39 0 terminate() -9a46 c 94 5983 -9a52 8 107 5983 -9a5a 4 111 5983 -9a5e 4 116 5983 -9a62 2 120 5983 -9a64 2 121 5983 -9a66 7 122 5983 -9a6d 7 127 5983 -9a74 5 135 5983 -9a79 6 136 5983 -FUNC 9a7f 13 0 unexpected() -9a7f 0 149 5983 -9a7f 8 159 5983 -9a87 4 163 5983 -9a8b 2 167 5983 -9a8d 5 173 5983 -FUNC 9a92 37 0 _inconsistency() -9a92 c 187 5983 -9a9e c 196 5983 -9aaa 4 197 5983 -9aae 4 202 5983 -9ab2 2 203 5983 -9ab4 2 204 5983 -9ab6 7 205 5983 -9abd 7 211 5983 -9ac4 5 217 5983 -FUNC 9ac9 11 4 _initp_eh_hooks -9ac9 0 74 5983 -9ac9 10 80 5983 -9ad9 1 81 5983 -FUNC 9ae0 4c c _CallSettingFrame -9ae0 3 48 5665 -9ae3 3 57 5665 -9ae6 1 58 5665 -9ae7 1 59 5665 -9ae8 3 60 5665 -9aeb 3 61 5665 -9aee 3 62 5665 -9af1 3 63 5665 -9af4 1 64 5665 -9af5 3 65 5665 -9af8 3 66 5665 -9afb 3 67 5665 -9afe 5 68 5665 -9b03 1 69 5665 -9b04 1 70 5665 -9b05 2 71 5665 -9b07 1 73 5665 -9b08 1 74 5665 -9b09 2 75 5665 -9b0b 1 76 5665 -9b0c 3 77 5665 -9b0f 1 78 5665 -9b10 2 79 5665 -9b12 6 80 5665 -9b18 2 81 5665 -9b1a 5 82 5665 -9b1f 1 84 5665 -9b20 5 85 5665 -9b25 1 86 5665 -9b26 1 87 5665 -9b27 1 88 5665 -9b28 4 89 5665 -PUBLIC 9b07 0 _NLG_Return -FUNC 9b2c b9 4 _onexit_nolock -9b2c 5 104 3259 -9b31 b 107 3259 -9b3c 13 108 3259 -9b4f 16 112 3259 -9b65 d 122 3259 -9b72 d 127 3259 -9b7f 14 129 3259 -9b93 3 134 3259 -9b96 14 136 3259 -9baa 3 147 3259 -9bad f 149 3259 -9bbc e 156 3259 -9bca c 157 3259 -9bd6 7 159 3259 -9bdd 6 114 3259 -9be3 2 160 3259 -FUNC 9be5 2f 0 __onexitinit -9be5 1 205 3259 -9be6 b 208 3259 -9bf1 9 209 3259 -9bfa e 211 3259 -9c08 4 216 3259 -9c0c 1 221 3259 -9c0d 3 218 3259 -9c10 3 220 3259 -9c13 1 221 3259 -FUNC 9c14 3c 4 _onexit -9c14 c 85 3259 -9c20 5 88 3259 -9c25 4 90 3259 -9c29 c 91 3259 -9c35 c 93 3259 -9c41 3 97 3259 -9c44 6 98 3259 -9c4a 6 94 3259 -FUNC 9c50 12 4 atexit -9c50 0 165 3259 -9c50 11 166 3259 -9c61 1 167 3259 -FUNC 9c62 4f 4 V6_HeapAlloc -9c62 c 27 5425 -9c6e 4 28 5425 -9c72 b 29 5425 -9c7d 8 31 5425 -9c85 4 32 5425 -9c89 a 33 5425 -9c93 c 35 5425 -9c9f 3 39 5425 -9ca2 6 40 5425 -9ca8 9 36 5425 -FUNC 9cb1 75 4 _heap_alloc -9cb1 0 90 5425 -9cb1 9 95 5425 -9cba 5 96 5425 -9cbf 7 97 5425 -9cc6 c 98 5425 -9cd2 a 104 5425 -9cdc 18 105 5425 -9cf4 1 129 5425 -9cf5 a 107 5425 -9cff 9 108 5425 -9d08 2 109 5425 -9d0a 4 121 5425 -9d0e 1 122 5425 -9d0f 6 124 5425 -9d15 10 126 5425 -9d25 1 129 5425 -FUNC 9d26 c3 4 malloc -9d26 1 155 5425 -9d27 16 159 5425 -9d3d 65 163 5425 -9da2 4 168 5425 -9da6 b 172 5425 -9db1 b 179 5425 -9dbc 2 183 5425 -9dbe 7 174 5425 -9dc5 8 193 5425 -9dcd 5 195 5425 -9dd2 1 196 5425 -9dd3 7 185 5425 -9dda b 186 5425 -9de5 3 187 5425 -9de8 1 196 5425 -FUNC 9de9 a 4 _initp_heap_handler -9de9 0 31 5230 -9de9 9 32 5230 -9df2 1 33 5230 -FUNC 9df3 31 4 _set_new_handler(int (*)(unsigned int)) -9df3 1 53 5230 -9df4 7 57 5230 -9dfb b 59 5230 -9e06 b 60 5230 -9e11 f 63 5230 -9e20 3 65 5230 -9e23 1 66 5230 -FUNC 9e24 9 4 _set_new_handler(int) -9e24 0 86 5230 -9e24 8 89 5230 -9e2c 1 90 5230 -FUNC 9e2d d 0 _query_new_handler() -9e2d 0 110 5230 -9e2d c 111 5230 -9e39 1 112 5230 -FUNC 9e3a 22 4 _callnewh -9e3a 0 131 5230 -9e3a b 133 5230 -9e45 10 135 5230 -9e55 3 138 5230 -9e58 1 139 5230 -9e59 2 136 5230 -9e5b 1 139 5230 -FUNC 9e5c 22 18 _invoke_watson_if_error -9e5c 3 754 5850 -9e5f 6 755 5850 -9e65 17 759 5850 -9e7c 2 760 5850 -FUNC 9e7e 70 4 type_info::_Type_info_dtor(type_info *) -9e7e c 62 5815 -9e8a 8 63 5815 -9e92 4 64 5815 -9e96 a 65 5815 -9ea0 d 70 5815 -9ead 4 72 5815 -9eb1 4 74 5815 -9eb5 6 79 5815 -9ebb 7 80 5815 -9ec2 9 94 5815 -9ecb 4 101 5815 -9ecf c 103 5815 -9edb 6 107 5815 -9ee1 2 83 5815 -9ee3 2 72 5815 -9ee5 9 104 5815 -FUNC 9eee f5 8 type_info::_Name_base(type_info const *,__type_info_node *) -9eee c 109 5815 -9efa e 113 5815 -9f08 24 124 5815 -9f2c 7 125 5815 -9f33 16 132 5815 -9f49 2 133 5815 -9f4b 5 132 5815 -9f50 b 136 5815 -9f5b 5 142 5815 -9f60 a 149 5815 -9f6a 4 150 5815 -9f6e 11 157 5815 -9f7f 20 158 5815 -9f9f 5 159 5815 -9fa4 9 165 5815 -9fad 3 166 5815 -9fb0 2 167 5815 -9fb2 7 173 5815 -9fb9 9 180 5815 -9fc2 c 181 5815 -9fce 3 188 5815 -9fd1 6 189 5815 -9fd7 3 181 5815 -9fda 9 182 5815 -FUNC 9fe3 70 4 type_info::_Type_info_dtor_internal(type_info *) -9fe3 c 197 5815 -9fef 8 198 5815 -9ff7 4 199 5815 -9ffb a 200 5815 -a005 d 205 5815 -a012 4 207 5815 -a016 4 209 5815 -a01a 6 214 5815 -a020 7 215 5815 -a027 9 229 5815 -a030 4 236 5815 -a034 c 238 5815 -a040 6 242 5815 -a046 2 218 5815 -a048 2 207 5815 -a04a 9 239 5815 -FUNC a053 31 10 __unDNameHelper -a053 3 249 5815 -a056 7 250 5815 -a05d 7 252 5815 -a064 1e 260 5815 -a082 2 261 5815 -FUNC a084 eb 8 type_info::_Name_base_internal(type_info const *,__type_info_node *) -a084 c 265 5815 -a090 e 269 5815 -a09e 1a 273 5815 -a0b8 7 274 5815 -a0bf 16 281 5815 -a0d5 2 282 5815 -a0d7 5 281 5815 -a0dc b 285 5815 -a0e7 5 291 5815 -a0ec a 298 5815 -a0f6 4 299 5815 -a0fa 11 306 5815 -a10b 20 307 5815 -a12b 5 308 5815 -a130 9 314 5815 -a139 3 315 5815 -a13c 2 316 5815 -a13e 7 322 5815 -a145 9 329 5815 -a14e c 330 5815 -a15a 3 337 5815 -a15d 6 338 5815 -a163 3 330 5815 -a166 9 331 5815 -FUNC a16f 53 4 __clean_type_info_names_internal -a16f c 346 5815 -a17b 8 347 5815 -a183 4 348 5815 -a187 6 352 5815 -a18d 4 354 5815 -a191 3 356 5815 -a194 7 357 5815 -a19b 8 358 5815 -a1a3 4 354 5815 -a1a7 c 359 5815 -a1b3 6 363 5815 -a1b9 9 361 5815 -FUNC a1d0 88 8 strcmp -a1d0 0 65 926 -a1d0 4 73 926 -a1d4 4 74 926 -a1d8 6 76 926 -a1de 2 77 926 -a1e0 2 81 926 -a1e2 2 83 926 -a1e4 2 84 926 -a1e6 2 85 926 -a1e8 2 86 926 -a1ea 3 87 926 -a1ed 2 88 926 -a1ef 2 89 926 -a1f1 2 90 926 -a1f3 3 92 926 -a1f6 3 94 926 -a1f9 2 95 926 -a1fb 2 96 926 -a1fd 2 97 926 -a1ff 3 98 926 -a202 2 99 926 -a204 3 100 926 -a207 3 101 926 -a20a 2 102 926 -a20c 4 103 926 -a210 2 107 926 -a212 2 108 926 -a214 2 115 926 -a216 2 116 926 -a218 3 117 926 -a21b 1 118 926 -a21c 6 122 926 -a222 2 123 926 -a224 2 125 926 -a226 3 126 926 -a229 2 127 926 -a22b 2 128 926 -a22d 3 129 926 -a230 2 130 926 -a232 2 131 926 -a234 6 133 926 -a23a 2 134 926 -a23c 3 139 926 -a23f 3 140 926 -a242 2 141 926 -a244 2 142 926 -a246 2 143 926 -a248 2 144 926 -a24a 3 145 926 -a24d 2 146 926 -a24f 2 147 926 -a251 2 148 926 -a253 3 149 926 -a256 2 150 926 -FUNC a258 65 c strcpy_s -a258 0 13 781 -a258 30 18 781 -a288 c 19 781 -a294 2 21 781 -a296 d 23 781 -a2a3 4 27 781 -a2a7 2 29 781 -a2a9 e 30 781 -a2b7 5 33 781 -a2bc 1 34 781 -FUNC a2c0 7a c memset -a2c0 0 59 934 -a2c0 4 68 934 -a2c4 4 69 934 -a2c8 2 71 934 -a2ca 2 72 934 -a2cc 2 74 934 -a2ce 4 75 934 -a2d2 2 78 934 -a2d4 2 79 934 -a2d6 6 80 934 -a2dc 2 81 934 -a2de 7 82 934 -a2e5 2 83 934 -a2e7 5 85 934 -a2ec 1 91 934 -a2ed 2 92 934 -a2ef 3 94 934 -a2f2 2 95 934 -a2f4 2 97 934 -a2f6 3 98 934 -a2f9 2 99 934 -a2fb 2 101 934 -a2fd 2 103 934 -a2ff 3 104 934 -a302 3 105 934 -a305 2 106 934 -a307 2 110 934 -a309 3 111 934 -a30c 2 113 934 -a30e 2 115 934 -a310 3 117 934 -a313 2 119 934 -a315 2 122 934 -a317 3 123 934 -a31a 3 124 934 -a31d 2 125 934 -a31f 2 127 934 -a321 2 129 934 -a323 2 130 934 -a325 2 134 934 -a327 3 135 934 -a32a 3 137 934 -a32d 2 138 934 -a32f 4 142 934 -a333 1 143 934 -a334 1 145 934 -a335 4 148 934 -a339 1 150 934 -FUNC a340 365 c memcpy -a340 3 101 1027 -a343 1 113 1027 -a344 1 114 1027 -a345 3 116 1027 -a348 3 117 1027 -a34b 3 119 1027 -a34e 2 129 1027 -a350 2 131 1027 -a352 2 132 1027 -a354 2 134 1027 -a356 2 135 1027 -a358 2 137 1027 -a35a 6 138 1027 -a360 6 147 1027 -a366 2 148 1027 -a368 7 150 1027 -a36f 2 151 1027 -a371 1 153 1027 -a372 1 154 1027 -a373 3 155 1027 -a376 3 156 1027 -a379 2 157 1027 -a37b 1 158 1027 -a37c 1 159 1027 -a37d 2 160 1027 -a37f 1 163 1027 -a380 1 164 1027 -a381 1 165 1027 -a382 5 166 1027 -a387 6 179 1027 -a38d 2 180 1027 -a38f 3 182 1027 -a392 3 183 1027 -a395 3 185 1027 -a398 2 186 1027 -a39a 2 188 1027 -a39c 8 190 1027 -a3a4 2 208 1027 -a3a6 5 209 1027 -a3ab 3 211 1027 -a3ae 2 212 1027 -a3b0 3 214 1027 -a3b3 2 215 1027 -a3b5 7 217 1027 -a3bc 8 221 1027 -a3c4 14 225 1027 -a3d8 2 232 1027 -a3da 2 233 1027 -a3dc 2 235 1027 -a3de 3 236 1027 -a3e1 3 238 1027 -a3e4 3 239 1027 -a3e7 3 241 1027 -a3ea 3 242 1027 -a3ed 3 244 1027 -a3f0 3 245 1027 -a3f3 3 247 1027 -a3f6 2 248 1027 -a3f8 2 250 1027 -a3fa a 252 1027 -a404 2 256 1027 -a406 2 257 1027 -a408 2 259 1027 -a40a 3 260 1027 -a40d 3 262 1027 -a410 3 263 1027 -a413 3 265 1027 -a416 3 266 1027 -a419 3 268 1027 -a41c 2 269 1027 -a41e 2 271 1027 -a420 8 273 1027 -a428 2 277 1027 -a42a 2 278 1027 -a42c 2 280 1027 -a42e 3 281 1027 -a431 3 283 1027 -a434 3 284 1027 -a437 3 286 1027 -a43a 2 287 1027 -a43c 2 289 1027 -a43e 2a 291 1027 -a468 4 298 1027 -a46c 4 300 1027 -a470 4 302 1027 -a474 4 304 1027 -a478 4 306 1027 -a47c 4 308 1027 -a480 4 310 1027 -a484 4 312 1027 -a488 4 314 1027 -a48c 4 316 1027 -a490 4 318 1027 -a494 4 320 1027 -a498 4 322 1027 -a49c 4 324 1027 -a4a0 7 326 1027 -a4a7 2 328 1027 -a4a9 2 329 1027 -a4ab 19 331 1027 -a4c4 3 340 1027 -a4c7 1 341 1027 -a4c8 1 342 1027 -a4c9 3 344 1027 -a4cc 2 348 1027 -a4ce 2 350 1027 -a4d0 3 351 1027 -a4d3 1 352 1027 -a4d4 1 353 1027 -a4d5 3 354 1027 -a4d8 2 358 1027 -a4da 2 360 1027 -a4dc 3 361 1027 -a4df 3 362 1027 -a4e2 3 363 1027 -a4e5 1 364 1027 -a4e6 1 365 1027 -a4e7 5 366 1027 -a4ec 2 370 1027 -a4ee 2 372 1027 -a4f0 3 373 1027 -a4f3 3 374 1027 -a4f6 3 375 1027 -a4f9 3 376 1027 -a4fc 3 377 1027 -a4ff 1 378 1027 -a500 1 379 1027 -a501 3 380 1027 -a504 4 391 1027 -a508 4 392 1027 -a50c 6 397 1027 -a512 2 398 1027 -a514 3 400 1027 -a517 3 401 1027 -a51a 3 403 1027 -a51d 2 404 1027 -a51f 1 406 1027 -a520 2 407 1027 -a522 1 408 1027 -a523 9 410 1027 -a52c 2 414 1027 -a52e a 417 1027 -a538 2 422 1027 -a53a 5 423 1027 -a53f 3 425 1027 -a542 2 426 1027 -a544 3 428 1027 -a547 2 429 1027 -a549 7 431 1027 -a550 14 435 1027 -a564 3 442 1027 -a567 2 443 1027 -a569 3 445 1027 -a56c 3 446 1027 -a56f 3 448 1027 -a572 3 449 1027 -a575 3 451 1027 -a578 2 452 1027 -a57a 1 454 1027 -a57b 2 455 1027 -a57d 1 456 1027 -a57e a 458 1027 -a588 3 462 1027 -a58b 2 463 1027 -a58d 3 465 1027 -a590 3 466 1027 -a593 3 468 1027 -a596 3 469 1027 -a599 3 471 1027 -a59c 3 472 1027 -a59f 3 474 1027 -a5a2 2 475 1027 -a5a4 1 477 1027 -a5a5 2 478 1027 -a5a7 1 479 1027 -a5a8 8 481 1027 -a5b0 3 485 1027 -a5b3 2 486 1027 -a5b5 3 488 1027 -a5b8 3 489 1027 -a5bb 3 491 1027 -a5be 3 492 1027 -a5c1 3 494 1027 -a5c4 3 495 1027 -a5c7 3 497 1027 -a5ca 3 498 1027 -a5cd 3 500 1027 -a5d0 6 501 1027 -a5d6 1 503 1027 -a5d7 2 504 1027 -a5d9 1 505 1027 -a5da 2a 507 1027 -a604 4 516 1027 -a608 4 518 1027 -a60c 4 520 1027 -a610 4 522 1027 -a614 4 524 1027 -a618 4 526 1027 -a61c 4 528 1027 -a620 4 530 1027 -a624 4 532 1027 -a628 4 534 1027 -a62c 4 536 1027 -a630 4 538 1027 -a634 4 540 1027 -a638 4 542 1027 -a63c 7 544 1027 -a643 2 546 1027 -a645 2 547 1027 -a647 19 549 1027 -a660 3 558 1027 -a663 1 560 1027 -a664 1 561 1027 -a665 3 562 1027 -a668 3 566 1027 -a66b 3 568 1027 -a66e 3 569 1027 -a671 1 570 1027 -a672 1 571 1027 -a673 5 572 1027 -a678 3 576 1027 -a67b 3 578 1027 -a67e 3 579 1027 -a681 3 580 1027 -a684 3 581 1027 -a687 1 582 1027 -a688 1 583 1027 -a689 3 584 1027 -a68c 3 588 1027 -a68f 3 590 1027 -a692 3 591 1027 -a695 3 592 1027 -a698 3 593 1027 -a69b 3 594 1027 -a69e 3 595 1027 -a6a1 1 596 1027 -a6a2 1 597 1027 -a6a3 2 598 1027 -FUNC a6b0 365 c memmove -a6b0 3 101 977 -a6b3 1 113 977 -a6b4 1 114 977 -a6b5 3 116 977 -a6b8 3 117 977 -a6bb 3 119 977 -a6be 2 129 977 -a6c0 2 131 977 -a6c2 2 132 977 -a6c4 2 134 977 -a6c6 2 135 977 -a6c8 2 137 977 -a6ca 6 138 977 -a6d0 6 147 977 -a6d6 2 148 977 -a6d8 7 150 977 -a6df 2 151 977 -a6e1 1 153 977 -a6e2 1 154 977 -a6e3 3 155 977 -a6e6 3 156 977 -a6e9 2 157 977 -a6eb 1 158 977 -a6ec 1 159 977 -a6ed 2 160 977 -a6ef 1 163 977 -a6f0 1 164 977 -a6f1 1 165 977 -a6f2 5 166 977 -a6f7 6 179 977 -a6fd 2 180 977 -a6ff 3 182 977 -a702 3 183 977 -a705 3 185 977 -a708 2 186 977 -a70a 2 188 977 -a70c 8 190 977 -a714 2 208 977 -a716 5 209 977 -a71b 3 211 977 -a71e 2 212 977 -a720 3 214 977 -a723 2 215 977 -a725 7 217 977 -a72c 8 221 977 -a734 14 225 977 -a748 2 232 977 -a74a 2 233 977 -a74c 2 235 977 -a74e 3 236 977 -a751 3 238 977 -a754 3 239 977 -a757 3 241 977 -a75a 3 242 977 -a75d 3 244 977 -a760 3 245 977 -a763 3 247 977 -a766 2 248 977 -a768 2 250 977 -a76a a 252 977 -a774 2 256 977 -a776 2 257 977 -a778 2 259 977 -a77a 3 260 977 -a77d 3 262 977 -a780 3 263 977 -a783 3 265 977 -a786 3 266 977 -a789 3 268 977 -a78c 2 269 977 -a78e 2 271 977 -a790 8 273 977 -a798 2 277 977 -a79a 2 278 977 -a79c 2 280 977 -a79e 3 281 977 -a7a1 3 283 977 -a7a4 3 284 977 -a7a7 3 286 977 -a7aa 2 287 977 -a7ac 2 289 977 -a7ae 2a 291 977 -a7d8 4 298 977 -a7dc 4 300 977 -a7e0 4 302 977 -a7e4 4 304 977 -a7e8 4 306 977 -a7ec 4 308 977 -a7f0 4 310 977 -a7f4 4 312 977 -a7f8 4 314 977 -a7fc 4 316 977 -a800 4 318 977 -a804 4 320 977 -a808 4 322 977 -a80c 4 324 977 -a810 7 326 977 -a817 2 328 977 -a819 2 329 977 -a81b 19 331 977 -a834 3 340 977 -a837 1 341 977 -a838 1 342 977 -a839 3 344 977 -a83c 2 348 977 -a83e 2 350 977 -a840 3 351 977 -a843 1 352 977 -a844 1 353 977 -a845 3 354 977 -a848 2 358 977 -a84a 2 360 977 -a84c 3 361 977 -a84f 3 362 977 -a852 3 363 977 -a855 1 364 977 -a856 1 365 977 -a857 5 366 977 -a85c 2 370 977 -a85e 2 372 977 -a860 3 373 977 -a863 3 374 977 -a866 3 375 977 -a869 3 376 977 -a86c 3 377 977 -a86f 1 378 977 -a870 1 379 977 -a871 3 380 977 -a874 4 391 977 -a878 4 392 977 -a87c 6 397 977 -a882 2 398 977 -a884 3 400 977 -a887 3 401 977 -a88a 3 403 977 -a88d 2 404 977 -a88f 1 406 977 -a890 2 407 977 -a892 1 408 977 -a893 9 410 977 -a89c 2 414 977 -a89e a 417 977 -a8a8 2 422 977 -a8aa 5 423 977 -a8af 3 425 977 -a8b2 2 426 977 -a8b4 3 428 977 -a8b7 2 429 977 -a8b9 7 431 977 -a8c0 14 435 977 -a8d4 3 442 977 -a8d7 2 443 977 -a8d9 3 445 977 -a8dc 3 446 977 -a8df 3 448 977 -a8e2 3 449 977 -a8e5 3 451 977 -a8e8 2 452 977 -a8ea 1 454 977 -a8eb 2 455 977 -a8ed 1 456 977 -a8ee a 458 977 -a8f8 3 462 977 -a8fb 2 463 977 -a8fd 3 465 977 -a900 3 466 977 -a903 3 468 977 -a906 3 469 977 -a909 3 471 977 -a90c 3 472 977 -a90f 3 474 977 -a912 2 475 977 -a914 1 477 977 -a915 2 478 977 -a917 1 479 977 -a918 8 481 977 -a920 3 485 977 -a923 2 486 977 -a925 3 488 977 -a928 3 489 977 -a92b 3 491 977 -a92e 3 492 977 -a931 3 494 977 -a934 3 495 977 -a937 3 497 977 -a93a 3 498 977 -a93d 3 500 977 -a940 6 501 977 -a946 1 503 977 -a947 2 504 977 -a949 1 505 977 -a94a 2a 507 977 -a974 4 516 977 -a978 4 518 977 -a97c 4 520 977 -a980 4 522 977 -a984 4 524 977 -a988 4 526 977 -a98c 4 528 977 -a990 4 530 977 -a994 4 532 977 -a998 4 534 977 -a99c 4 536 977 -a9a0 4 538 977 -a9a4 4 540 977 -a9a8 4 542 977 -a9ac 7 544 977 -a9b3 2 546 977 -a9b5 2 547 977 -a9b7 19 549 977 -a9d0 3 558 977 -a9d3 1 560 977 -a9d4 1 561 977 -a9d5 3 562 977 -a9d8 3 566 977 -a9db 3 568 977 -a9de 3 569 977 -a9e1 1 570 977 -a9e2 1 571 977 -a9e3 5 572 977 -a9e8 3 576 977 -a9eb 3 578 977 -a9ee 3 579 977 -a9f1 3 580 977 -a9f4 3 581 977 -a9f7 1 582 977 -a9f8 1 583 977 -a9f9 3 584 977 -a9fc 3 588 977 -a9ff 3 590 977 -aa02 3 591 977 -aa05 3 592 977 -aa08 3 593 977 -aa0b 3 594 977 -aa0e 3 595 977 -aa11 1 596 977 -aa12 1 597 977 -aa13 2 598 977 -FUNC aa15 3d 4 __CxxUnhandledExceptionFilter(_EXCEPTION_POINTERS *) -aa15 0 67 5721 -aa15 33 68 5721 -aa48 5 69 5721 -aa4d 2 72 5721 -aa4f 3 73 5721 -FUNC aa52 e 0 __CxxSetUnhandledExceptionFilter -aa52 0 86 5721 -aa52 b 89 5721 -aa5d 2 90 5721 -aa5f 1 91 5721 -FUNC aa60 1a0 4 _NMSG_WRITE -aa60 2 174 2418 -aa62 a 178 2418 -aa6c f 179 2418 -aa7b a 182 2418 -aa85 2a 203 2418 -aaaf c 215 2418 -aabb 2a 224 2418 -aae5 1e 227 2418 -ab03 26 228 2418 -ab29 d 231 2418 -ab36 b 233 2418 -ab41 2f 234 2418 -ab70 20 237 2418 -ab90 22 238 2418 -abb2 15 242 2418 -abc7 a 205 2418 -abd1 9 206 2418 -abda 24 212 2418 -abfe 2 245 2418 -FUNC ac00 20 4 _GET_RTERRMSG -ac00 0 268 2418 -ac00 2 271 2418 -ac02 13 272 2418 -ac15 2 275 2418 -ac17 1 276 2418 -ac18 7 273 2418 -ac1f 1 276 2418 -FUNC ac20 39 0 _FF_MSGBANNER -ac20 0 141 2418 -ac20 22 145 2418 -ac42 a 147 2418 -ac4c c 148 2418 -ac58 1 150 2418 -FUNC ac59 1 4 _initp_misc_winxfltr -ac59 0 105 2752 -ac59 1 106 2752 -FUNC ac5a 32 4 xcptlookup -ac5a 0 410 2752 -ac5a b 411 2752 -ac65 14 418 2752 -ac79 e 425 2752 -ac87 2 428 2752 -ac89 2 426 2752 -ac8b 1 429 2752 -FUNC ac8c 15e 8 _XcptFilter -ac8c 6 206 2752 -ac92 7 213 2752 -ac99 8 214 2752 -aca1 34 219 2752 -acd5 2 221 2752 -acd7 2 225 2752 -acd9 3 227 2752 -acdc 7 234 2752 -ace3 7 235 2752 -acea 5 243 2752 -acef 4 248 2752 -acf3 8 249 2752 -acfb 3 255 2752 -acfe 6 259 2752 -ad04 6 273 2752 -ad0a 6 274 2752 -ad10 c 283 2752 -ad1c 17 291 2752 -ad33 1e 294 2752 -ad51 3 291 2752 -ad54 c 321 2752 -ad60 9 323 2752 -ad69 7 325 2752 -ad70 9 327 2752 -ad79 7 329 2752 -ad80 9 331 2752 -ad89 7 333 2752 -ad90 9 335 2752 -ad99 7 337 2752 -ada0 9 339 2752 -ada9 7 341 2752 -adb0 9 343 2752 -adb9 7 345 2752 -adc0 7 347 2752 -adc7 8 356 2752 -adcf 3 361 2752 -add2 2 363 2752 -add4 4 368 2752 -add8 3 369 2752 -addb 7 375 2752 -ade2 6 377 2752 -ade8 2 379 2752 -FUNC adea 1b 8 __CppXcptFilter -adea 0 145 2752 -adea b 146 2752 -adf5 c 147 2752 -ae01 1 151 2752 -ae02 2 149 2752 -ae04 1 151 2752 -FUNC ae05 db 0 _setenvp -ae05 1 77 2280 -ae06 c 85 2280 -ae12 5 86 2280 -ae17 8 91 2280 -ae1f 4 98 2280 -ae23 8 99 2280 -ae2b 4 110 2280 -ae2f 1 111 2280 -ae30 11 112 2280 -ae41 15 117 2280 -ae56 2 118 2280 -ae58 9 121 2280 -ae61 9 123 2280 -ae6a 6 125 2280 -ae70 10 127 2280 -ae80 1c 133 2280 -ae9c 3 134 2280 -ae9f 6 121 2280 -aea5 b 138 2280 -aeb0 6 139 2280 -aeb6 2 142 2280 -aeb8 a 149 2280 -aec2 7 152 2280 -aec9 17 153 2280 -FUNC aee0 a 4 _set_pgmptr -aee0 a 334 2303 -FUNC aeea 198 c parse_cmdline -aeea 4 218 2322 -aeee 6 226 2322 -aef4 8 230 2322 -aefc 14 231 2322 -af10 3 250 2322 -af13 5 252 2322 -af18 5 254 2322 -af1d 9 255 2322 -af26 2 256 2322 -af28 2 258 2322 -af2a 4 259 2322 -af2e 8 260 2322 -af36 2 262 2322 -af38 f 264 2322 -af47 2 265 2322 -af49 6 266 2322 -af4f a 267 2322 -af59 1 268 2322 -af5a 1a 272 2322 -af74 4 277 2322 -af78 4 278 2322 -af7c 4 281 2322 -af80 9 286 2322 -af89 a 287 2322 -af93 3 288 2322 -af96 1 275 2322 -af97 2 276 2322 -af99 9 291 2322 -afa2 6 295 2322 -afa8 9 296 2322 -afb1 2 297 2322 -afb3 3 311 2322 -afb6 4 315 2322 -afba 1 318 2322 -afbb 1 319 2322 -afbc 5 316 2322 -afc1 5 321 2322 -afc6 5 324 2322 -afcb e 325 2322 -afd9 2 326 2322 -afdb 2 327 2322 -afdd d 329 2322 -afea 2 332 2322 -afec 5 336 2322 -aff1 4 337 2322 -aff5 4 338 2322 -aff9 6 339 2322 -afff 3 338 2322 -b002 14 343 2322 -b016 4 348 2322 -b01a 2 349 2322 -b01c 10 350 2322 -b02c b 351 2322 -b037 2 352 2322 -b039 a 354 2322 -b043 2 355 2322 -b045 a 356 2322 -b04f 1 357 2322 -b050 2 358 2322 -b052 5 361 2322 -b057 1 363 2322 -b058 5 372 2322 -b05d 4 376 2322 -b061 7 377 2322 -b068 2 378 2322 -b06a 8 379 2322 -b072 9 382 2322 -b07b 3 383 2322 -b07e 2 384 2322 -b080 2 385 2322 -FUNC b082 b9 0 _setargv -b082 7 88 2322 -b089 c 97 2322 -b095 5 98 2322 -b09a 18 104 2322 -b0b2 19 120 2322 -b0cb 11 127 2322 -b0dc 15 132 2322 -b0f1 a 136 2322 -b0fb 2 138 2322 -b0fd 8 140 2322 -b105 3 141 2322 -b108 2 142 2322 -b10a 13 149 2322 -b11d c 153 2322 -b129 6 157 2322 -b12f 4 172 2322 -b133 6 134 2322 -b139 2 173 2322 -FUNC b13b 135 0 __crtGetEnvironmentStringsA -b13b 2 43 4307 -b13d 1a 57 4307 -b157 8 59 4307 -b15f c 60 4307 -b16b b 62 4307 -b176 e 63 4307 -b184 9 68 4307 -b18d 4 71 4307 -b191 8 72 4307 -b199 7 73 4307 -b1a0 7 77 4307 -b1a7 7 78 4307 -b1ae 7 79 4307 -b1b5 1b 93 4307 -b1d0 13 97 4307 -b1e3 11 111 4307 -b1f4 a 113 4307 -b1fe 8 114 4307 -b206 7 99 4307 -b20d 4 100 4307 -b211 6 123 4307 -b217 2 152 4307 -b219 a 126 4307 -b223 6 127 4307 -b229 4 133 4307 -b22d 5 134 4307 -b232 5 135 4307 -b237 5 138 4307 -b23c d 140 4307 -b249 7 141 4307 -b250 5 142 4307 -b255 b 145 4307 -b260 7 147 4307 -b267 6 149 4307 -b26d 3 153 4307 -FUNC b270 24 0 _RTC_Initialize -FUNC b294 24 0 _RTC_Terminate -FUNC b2b8 5b 0 __heap_select -b2b8 6 70 5473 -b2be 23 143 5473 -b2e1 1b 144 5473 -b2fc d 145 5473 -b309 3 146 5473 -b30c 2 164 5473 -b30e 3 161 5473 -b311 2 164 5473 -FUNC b313 5a 4 _heap_init -b313 0 192 5473 -b313 20 199 5473 -b333 2 200 5473 -b335 1 240 5473 -b336 5 204 5473 -b33b a 206 5473 -b345 f 209 5473 -b354 c 211 5473 -b360 7 212 5473 -b367 2 213 5473 -b369 3 239 5473 -b36c 1 240 5473 -FUNC b36d 74 0 _heap_term -b36d 1 261 5473 -b36e c 264 5473 -b37a 1b 270 5473 -b395 f 273 5473 -b3a4 b 276 5473 -b3af d 278 5473 -b3bc 11 281 5473 -b3cd c 300 5473 -b3d9 7 301 5473 -b3e0 1 302 5473 -FUNC b3e1 6 0 _get_heap_handle -b3e1 0 320 5473 -b3e1 5 322 5473 -b3e6 1 323 5473 -FUNC b3e7 94 0 __security_init_cookie -b3e7 6 97 3689 -b3ed 21 114 3689 -b40e 7 116 3689 -b415 3 117 3689 -b418 a 127 3689 -b422 6 132 3689 -b428 8 135 3689 -b430 8 136 3689 -b438 8 137 3689 -b440 10 139 3689 -b450 2 144 3689 -b452 4 161 3689 -b456 7 163 3689 -b45d 4 166 3689 -b461 7 168 3689 -b468 6 172 3689 -b46e b 173 3689 -b479 2 175 3689 -FUNC b47b 8 4 _crt_debugger_hook -b47b 0 62 3966 -b47b 7 65 3966 -b482 1 66 3966 -FUNC b483 160 8 _flsbuf -b483 5 93 2041 -b488 c 104 2041 -b494 8 106 2041 -b49c b 107 2041 -b4a7 4 108 2041 -b4ab 8 109 2041 -b4b3 4 110 2041 -b4b7 b 111 2041 -b4c2 3 113 2041 -b4c5 6 124 2041 -b4cb b 126 2041 -b4d6 3 127 2041 -b4d9 8 128 2041 -b4e1 9 137 2041 -b4ea f 141 2041 -b4f9 25 151 2041 -b51e 7 153 2041 -b525 d 158 2041 -b532 5 162 2041 -b537 5 163 2041 -b53c 6 164 2041 -b542 7 166 2041 -b549 10 167 2041 -b559 2 168 2041 -b55b 6 131 2041 -b561 5 132 2041 -b566 2e 169 2041 -b594 12 171 2041 -b5a6 2 174 2041 -b5a8 8 179 2041 -b5b0 2 186 2041 -b5b2 3 187 2041 -b5b5 13 189 2041 -b5c8 5 201 2041 -b5cd 4 202 2041 -b5d1 5 203 2041 -b5d6 b 207 2041 -b5e1 2 212 2041 -FUNC b5e3 25 4 write_char -b5e3 0 2433 1163 -b5e3 a 2434 1163 -b5ed 2 2437 1163 -b5ef 12 2440 1163 -b601 3 2444 1163 -b604 1 2447 1163 -b605 2 2446 1163 -b607 1 2447 1163 -FUNC b608 25 c write_multi_char -b608 6 2498 1163 -b60e 2 2501 1163 -b610 e 2500 1163 -b61e 6 2501 1163 -b624 7 2499 1163 -b62b 2 2504 1163 -FUNC b62d 4f 4 write_string -b62d 0 2563 1163 -b62d 12 2564 1163 -b63f 6 2566 1163 -b645 2 2567 1163 -b647 11 2570 1163 -b658 6 2571 1163 -b65e a 2573 1163 -b668 a 2574 1163 -b672 9 2569 1163 -b67b 1 2579 1163 -FUNC b67c 910 10 _woutput_l -b67c 1b 975 1163 -b697 72 1031 1163 -b709 4 1036 1163 -b70d 2c 1073 1163 -b739 1a 1075 1163 -b753 8 1076 1163 -b75b 18 1131 1163 -b773 2 1171 1163 -b775 13 1173 1163 -b788 3 1174 1163 -b78b 5 1175 1163 -b790 1f 1179 1163 -b7af 4 1193 1163 -b7b3 5 1194 1163 -b7b8 4 1181 1163 -b7bc 5 1182 1163 -b7c1 4 1184 1163 -b7c5 5 1185 1163 -b7ca 7 1190 1163 -b7d1 5 1191 1163 -b7d6 3 1187 1163 -b7d9 5 1196 1163 -b7de 6 1200 1163 -b7e4 9 1206 1163 -b7ed b 1233 1163 -b7f8 4 1235 1163 -b7fc 3 1236 1163 -b7ff 5 1239 1163 -b804 10 1241 1163 -b814 5 1243 1163 -b819 4 1248 1163 -b81d 5 1249 1163 -b822 6 1253 1163 -b828 9 1259 1163 -b831 b 1284 1163 -b83c 4 1285 1163 -b840 5 1287 1163 -b845 10 1289 1163 -b855 5 1291 1163 -b85a 1b 1295 1163 -b875 7 1362 1163 -b87c 5 1363 1163 -b881 6 1301 1163 -b887 2 1303 1163 -b889 a 1304 1163 -b893 5 1306 1163 -b898 4 1308 1163 -b89c 5 1310 1163 -b8a1 4 1358 1163 -b8a5 5 1359 1163 -b8aa 10 1322 1163 -b8ba 3 1324 1163 -b8bd f 1325 1163 -b8cc d 1327 1163 -b8d9 3 1329 1163 -b8dc a 1330 1163 -b8e6 5 1332 1163 -b8eb 3c 1337 1163 -b927 4 1352 1163 -b92b 13 1166 1163 -b93e 5 1167 1163 -b943 32 1378 1163 -b975 d 1716 1163 -b982 4 1724 1163 -b986 18 1749 1163 -b99e c 1750 1163 -b9aa c 1381 1163 -b9b6 9 1383 1163 -b9bf 8 1564 1163 -b9c7 4 1565 1163 -b9cb d 1584 1163 -b9d8 3 1589 1163 -b9db 13 1610 1163 -b9ee 4 1611 1163 -b9f2 8 1612 1163 -b9fa 19 1614 1163 -ba13 13 1618 1163 -ba26 1 1620 1163 -ba27 9 1621 1163 -ba30 5 1622 1163 -ba35 1d 1378 1163 -ba52 9 1397 1163 -ba5b f 1415 1163 -ba6a 3 1420 1163 -ba6d 25 1430 1163 -ba92 3 1434 1163 -ba95 2 1436 1163 -ba97 4 1437 1163 -ba9b 6 1439 1163 -baa1 3 1440 1163 -baa4 5 1506 1163 -baa9 5 1523 1163 -baae e 1541 1163 -babc 6 1546 1163 -bac2 b 1548 1163 -bacd 7 1549 1163 -bad4 5 1550 1163 -bad9 4 1551 1163 -badd 5 1553 1163 -bae2 8 1543 1163 -baea 7 1544 1163 -baf1 5 1557 1163 -baf6 34 1378 1163 -bb2a d 1908 1163 -bb37 9 1910 1163 -bb40 8 1668 1163 -bb48 d 1688 1163 -bb55 6 1702 1163 -bb5b 7 1703 1163 -bb62 2 1704 1163 -bb64 5 1706 1163 -bb69 7 1708 1163 -bb70 5 1710 1163 -bb75 4 1864 1163 -bb79 7 1869 1163 -bb80 c 1933 1163 -bb8c 8 1939 1163 -bb94 5 1958 1163 -bb99 8 1751 1163 -bba1 9 1752 1163 -bbaa 5 1753 1163 -bbaf 3 1754 1163 -bbb2 9 1756 1163 -bbbb f 1759 1163 -bbca 2 1760 1163 -bbcc 13 1765 1163 -bbdf 7 1767 1163 -bbe6 e 1809 1163 -bbf4 27 1828 1163 -bc1b 14 1838 1163 -bc2f 15 1840 1163 -bc44 b 1844 1163 -bc4f 15 1846 1163 -bc64 5 1852 1163 -bc69 7 1853 1163 -bc70 4 1854 1163 -bc74 1 1857 1163 -bc75 5 1859 1163 -bc7a 7 1877 1163 -bc81 3 1887 1163 -bc84 2 1888 1163 -bc86 1a 1378 1163 -bca0 7 1892 1163 -bca7 11 1897 1163 -bcb8 10 1900 1163 -bcc8 3 1901 1163 -bccb 5 1903 1163 -bcd0 6 1961 1163 -bcd6 6 1987 1163 -bcdc 16 2026 1163 -bcf2 2 2045 1163 -bcf4 5 2051 1163 -bcf9 2 2071 1163 -bcfb 4 2074 1163 -bcff 6 2080 1163 -bd05 2 2099 1163 -bd07 5 2105 1163 -bd0c 10 2128 1163 -bd1c 7 2129 1163 -bd23 7 2130 1163 -bd2a c 2136 1163 -bd36 2 2142 1163 -bd38 6 2148 1163 -bd3e 7 2149 1163 -bd45 2 2150 1163 -bd47 4 2151 1163 -bd4b a 2152 1163 -bd55 3 2153 1163 -bd58 6 2157 1163 -bd5e 3 2158 1163 -bd61 6 2163 1163 -bd67 10 2165 1163 -bd77 10 2166 1163 -bd87 c 2168 1163 -bd93 3 2170 1163 -bd96 3 2172 1163 -bd99 2 2173 1163 -bd9b 8 2175 1163 -bda3 1 2176 1163 -bda4 19 2180 1163 -bdbd 9 2181 1163 -bdc6 1 2182 1163 -bdc7 2 2185 1163 -bdc9 4 1625 1163 -bdcd 8 1626 1163 -bdd5 c 1628 1163 -bde1 7 1629 1163 -bde8 2 1630 1163 -bdea 4 1629 1163 -bdee 8 1631 1163 -bdf6 a 2201 1163 -be00 7 2204 1163 -be07 6 2205 1163 -be0d 6 2207 1163 -be13 2 2208 1163 -be15 4 2210 1163 -be19 6 2212 1163 -be1f 2 2213 1163 -be21 4 2215 1163 -be25 6 2217 1163 -be2b 7 2218 1163 -be32 b 2224 1163 -be3d 6 2228 1163 -be43 11 2230 1163 -be54 11 2234 1163 -be65 d 2236 1163 -be72 f 2238 1163 -be81 a 2263 1163 -be8b 3 2267 1163 -be8e 3 2268 1163 -be91 3 2269 1163 -be94 1a 2276 1163 -beae 7 2278 1163 -beb5 e 2282 1163 -bec3 a 2283 1163 -becd 2 1690 1163 -becf 4 2279 1163 -bed3 2 2285 1163 -bed5 d 2286 1163 -bee2 c 2290 1163 -beee 11 2292 1163 -beff 6 2297 1163 -bf05 8 2298 1163 -bf0d 4 2299 1163 -bf11 1 2298 1163 -bf12 1b 1073 1163 -bf2d 17 1690 1163 -bf44 10 2376 1163 -bf54 38 2377 1163 -FUNC bf8c 97 10 _vswprintf_l -bf8c 7 125 1425 -bf93 24 130 1425 -bfb7 8 135 1425 -bfbf 29 155 1425 -bfe8 1d 166 1425 -c005 18 167 1425 -c01d 4 169 1425 -c021 2 183 1425 -FUNC c023 17 c _vswprintf -c023 0 192 1425 -c023 16 195 1425 -c039 1 197 1425 -FUNC c03a 5 10 __vswprintf_l -c03a 0 205 1425 -c03a 5 208 1425 -FUNC c03f 55 10 _vscwprintf_helper -c03f 7 430 1425 -c046 24 435 1425 -c06a 28 441 1425 -c092 2 443 1425 -FUNC c094 18 8 _vscwprintf -c094 0 449 1425 -c094 17 450 1425 -c0ab 1 451 1425 -FUNC c0ac 1a c _vscwprintf_l -c0ac 0 458 1425 -c0ac 19 459 1425 -c0c5 1 460 1425 -FUNC c0c6 18 8 _vscwprintf_p -c0c6 0 466 1425 -c0c6 17 467 1425 -c0dd 1 468 1425 -FUNC c0de 1a c _vscwprintf_p_l -c0de 0 475 1425 -c0de 19 476 1425 -c0f7 1 477 1425 -FUNC c0f8 14e 14 vfprintf_helper -c0f8 c 51 1462 -c104 5 54 1462 -c109 2e 56 1462 -c137 c 57 1462 -c143 3 60 1462 -c146 7 62 1462 -c14d 3 63 1462 -c150 b0 65 1462 -c200 5 66 1462 -c205 8 68 1462 -c20d 10 69 1462 -c21d a 70 1462 -c227 c 74 1462 -c233 3 78 1462 -c236 6 79 1462 -c23c a 75 1462 -FUNC c246 1e 10 _vfprintf_l -c246 0 87 1462 -c246 1d 88 1462 -c263 1 89 1462 -FUNC c264 1e 10 _vfprintf_s_l -c264 0 97 1462 -c264 1d 98 1462 -c281 1 99 1462 -FUNC c282 1e 10 _vfprintf_p_l -c282 0 107 1462 -c282 1d 108 1462 -c29f 1 109 1462 -FUNC c2a0 1c c vfprintf -c2a0 0 116 1462 -c2a0 1b 117 1462 -c2bb 1 118 1462 -FUNC c2bc 1c c vfprintf_s -c2bc 0 125 1462 -c2bc 1b 126 1462 -c2d7 1 127 1462 -FUNC c2d8 1c c _vfprintf_p -c2d8 0 134 1462 -c2d8 1b 135 1462 -c2f3 1 136 1462 -FUNC c2f4 25 4 write_char -c2f4 0 2433 1053 -c2f4 a 2434 1053 -c2fe 2 2437 1053 -c300 12 2440 1053 -c312 3 2444 1053 -c315 1 2447 1053 -c316 2 2446 1053 -c318 1 2447 1053 -FUNC c319 25 c write_multi_char -c319 6 2498 1053 -c31f 2 2501 1053 -c321 e 2500 1053 -c32f 6 2501 1053 -c335 7 2499 1053 -c33c 2 2504 1053 -FUNC c33e 4f 4 write_string -c33e 0 2563 1053 -c33e 12 2564 1053 -c350 6 2566 1053 -c356 2 2567 1053 -c358 11 2570 1053 -c369 6 2571 1053 -c36f a 2573 1053 -c379 a 2574 1053 -c383 9 2569 1053 -c38c 1 2579 1053 -FUNC c38d 91c 10 _woutput_s_l -c38d 29 975 1053 -c3b6 3 976 1053 -c3b9 f 1007 1053 -c3c8 24 2172 1053 -c3ec 2f 1031 1053 -c41b 18 1036 1053 -c433 2e 1073 1053 -c461 16 1078 1053 -c477 e 1079 1053 -c485 11 1124 1053 -c496 10 1131 1053 -c4a6 2 1171 1053 -c4a8 13 1173 1053 -c4bb 3 1174 1053 -c4be 5 1175 1053 -c4c3 1e 1179 1053 -c4e1 3 1193 1053 -c4e4 5 1194 1053 -c4e9 4 1181 1053 -c4ed 5 1182 1053 -c4f2 4 1184 1053 -c4f6 5 1185 1053 -c4fb 7 1190 1053 -c502 5 1191 1053 -c507 3 1187 1053 -c50a 5 1196 1053 -c50f 6 1200 1053 -c515 5 1206 1053 -c51a e 1233 1053 -c528 4 1235 1053 -c52c 3 1236 1053 -c52f 5 1239 1053 -c534 10 1241 1053 -c544 5 1243 1053 -c549 4 1248 1053 -c54d 5 1249 1053 -c552 6 1253 1053 -c558 5 1259 1053 -c55d e 1284 1053 -c56b 4 1285 1053 -c56f 5 1287 1053 -c574 10 1289 1053 -c584 5 1291 1053 -c589 1b 1295 1053 -c5a4 7 1362 1053 -c5ab 5 1363 1053 -c5b0 6 1301 1053 -c5b6 2 1303 1053 -c5b8 7 1304 1053 -c5bf 5 1306 1053 -c5c4 4 1308 1053 -c5c8 5 1310 1053 -c5cd 4 1358 1053 -c5d1 5 1359 1053 -c5d6 10 1322 1053 -c5e6 3 1324 1053 -c5e9 c 1325 1053 -c5f5 d 1327 1053 -c602 3 1329 1053 -c605 7 1330 1053 -c60c 5 1332 1053 -c611 3c 1337 1053 -c64d 4 1352 1053 -c651 14 1166 1053 -c665 5 1167 1053 -c66a 32 1378 1053 -c69c d 1716 1053 -c6a9 4 1724 1053 -c6ad 18 1749 1053 -c6c5 c 1750 1053 -c6d1 c 1381 1053 -c6dd 9 1383 1053 -c6e6 8 1564 1053 -c6ee 4 1565 1053 -c6f2 d 1584 1053 -c6ff 3 1589 1053 -c702 13 1610 1053 -c715 4 1611 1053 -c719 8 1612 1053 -c721 19 1614 1053 -c73a 13 1618 1053 -c74d 1 1620 1053 -c74e 9 1621 1053 -c757 5 1622 1053 -c75c 1e 1378 1053 -c77a 9 1397 1053 -c783 f 1415 1053 -c792 3 1420 1053 -c795 25 1430 1053 -c7ba 3 1434 1053 -c7bd 2 1436 1053 -c7bf 4 1437 1053 -c7c3 6 1439 1053 -c7c9 3 1440 1053 -c7cc 5 1506 1053 -c7d1 5 1523 1053 -c7d6 e 1541 1053 -c7e4 6 1546 1053 -c7ea b 1548 1053 -c7f5 7 1549 1053 -c7fc 5 1550 1053 -c801 4 1551 1053 -c805 5 1553 1053 -c80a 8 1543 1053 -c812 7 1544 1053 -c819 5 1557 1053 -c81e 34 1378 1053 -c852 9 1908 1053 -c85b 9 1910 1053 -c864 8 1668 1053 -c86c d 1688 1053 -c879 6 1702 1053 -c87f 7 1703 1053 -c886 2 1704 1053 -c888 5 1706 1053 -c88d 7 1708 1053 -c894 5 1710 1053 -c899 4 1864 1053 -c89d 7 1869 1053 -c8a4 c 1933 1053 -c8b0 8 1939 1053 -c8b8 5 1958 1053 -c8bd 8 1751 1053 -c8c5 9 1752 1053 -c8ce 5 1753 1053 -c8d3 3 1754 1053 -c8d6 9 1756 1053 -c8df f 1759 1053 -c8ee 3 1760 1053 -c8f1 15 1765 1053 -c906 7 1767 1053 -c90d e 1809 1053 -c91b 27 1828 1053 -c942 14 1838 1053 -c956 15 1840 1053 -c96b b 1844 1053 -c976 15 1846 1053 -c98b 5 1852 1053 -c990 7 1853 1053 -c997 4 1854 1053 -c99b 1 1857 1053 -c99c 5 1859 1053 -c9a1 3 1877 1053 -c9a4 7 1887 1053 -c9ab 2 1888 1053 -c9ad 1a 1378 1053 -c9c7 7 1892 1053 -c9ce 11 1897 1053 -c9df 10 1900 1053 -c9ef 3 1901 1053 -c9f2 5 1903 1053 -c9f7 6 1961 1053 -c9fd 6 1987 1053 -ca03 16 2026 1053 -ca19 2 2045 1053 -ca1b 5 2051 1053 -ca20 2 2071 1053 -ca22 4 2074 1053 -ca26 6 2080 1053 -ca2c 2 2099 1053 -ca2e 5 2105 1053 -ca33 10 2128 1053 -ca43 7 2129 1053 -ca4a 7 2130 1053 -ca51 c 2136 1053 -ca5d 2 2142 1053 -ca5f 6 2148 1053 -ca65 7 2149 1053 -ca6c 2 2150 1053 -ca6e 4 2151 1053 -ca72 a 2152 1053 -ca7c 3 2153 1053 -ca7f 6 2157 1053 -ca85 3 2158 1053 -ca88 6 2163 1053 -ca8e 10 2165 1053 -ca9e 10 2166 1053 -caae c 2168 1053 -caba 3 2170 1053 -cabd 3 2172 1053 -cac0 2 2173 1053 -cac2 8 2175 1053 -caca 1 2176 1053 -cacb 19 2180 1053 -cae4 9 2181 1053 -caed 1 2182 1053 -caee 2 2185 1053 -caf0 4 1625 1053 -caf4 8 1626 1053 -cafc c 1628 1053 -cb08 7 1629 1053 -cb0f 2 1630 1053 -cb11 4 1629 1053 -cb15 8 1631 1053 -cb1d a 2201 1053 -cb27 7 2204 1053 -cb2e 6 2205 1053 -cb34 6 2207 1053 -cb3a 2 2208 1053 -cb3c 4 2210 1053 -cb40 6 2212 1053 -cb46 2 2213 1053 -cb48 4 2215 1053 -cb4c 6 2217 1053 -cb52 7 2218 1053 -cb59 b 2224 1053 -cb64 6 2228 1053 -cb6a 11 2230 1053 -cb7b 11 2234 1053 -cb8c d 2236 1053 -cb99 f 2238 1053 -cba8 a 2263 1053 -cbb2 3 2267 1053 -cbb5 3 2268 1053 -cbb8 3 2269 1053 -cbbb 1a 2276 1053 -cbd5 7 2278 1053 -cbdc e 2282 1053 -cbea a 2283 1053 -cbf4 2 1690 1053 -cbf6 4 2279 1053 -cbfa 2 2285 1053 -cbfc d 2286 1053 -cc09 c 2290 1053 -cc15 11 2292 1053 -cc26 6 2297 1053 -cc2c 8 2298 1053 -cc34 16 2299 1053 -cc4a 7 1073 1053 -cc51 10 2310 1053 -cc61 10 2376 1053 -cc71 38 2377 1053 -FUNC cca9 154 10 _validate_param_reuseW -cca9 3 606 1108 -ccac 21 610 1108 -cccd 13 617 1108 -cce0 13 618 1108 -ccf3 10 620 1108 -cd03 4a 629 1108 -cd4d 54 632 1108 -cda1 2 633 1108 -cda3 1a 639 1108 -cdbd f 645 1108 -cdcc 23 626 1108 -cdef c 614 1108 -cdfb 2 646 1108 -FUNC cdfd 25 4 write_char -cdfd 0 2433 1108 -cdfd a 2434 1108 -ce07 2 2437 1108 -ce09 12 2440 1108 -ce1b 3 2444 1108 -ce1e 1 2447 1108 -ce1f 2 2446 1108 -ce21 1 2447 1108 -FUNC ce22 25 c write_multi_char -ce22 6 2498 1108 -ce28 2 2501 1108 -ce2a e 2500 1108 -ce38 6 2501 1108 -ce3e 7 2499 1108 -ce45 2 2504 1108 -FUNC ce47 4f 4 write_string -ce47 0 2563 1108 -ce47 12 2564 1108 -ce59 6 2566 1108 -ce5f 2 2567 1108 -ce61 11 2570 1108 -ce72 6 2571 1108 -ce78 a 2573 1108 -ce82 a 2574 1108 -ce8c 9 2569 1108 -ce95 1 2579 1108 -FUNC ce96 f60 10 _woutput_p_l -ce96 1b 975 1108 -ceb1 20 1013 1108 -ced1 28 2172 1108 -cef9 2c 1031 1108 -cf25 4 1036 1108 -cf29 3 1038 1108 -cf2c 3 1041 1108 -cf2f 3 1043 1108 -cf32 f 1046 1108 -cf41 44 1073 1108 -cf85 1a 1078 1108 -cf9f 11 1079 1108 -cfb0 16 1082 1108 -cfc6 6 1084 1108 -cfcc 1c 1087 1108 -cfe8 6 1089 1108 -cfee 16 1091 1108 -d004 7 1093 1108 -d00b 2 1095 1108 -d00d 7 1097 1108 -d014 6 1101 1108 -d01a c 1103 1108 -d026 7 1104 1108 -d02d f 1106 1108 -d03c 1d 1109 1108 -d059 8 1112 1108 -d061 5 1131 1108 -d066 3 1117 1108 -d069 7 1131 1108 -d070 9 1120 1108 -d079 b 1131 1108 -d084 24 1137 1108 -d0a8 5 1145 1108 -d0ad 2 1171 1108 -d0af 16 1173 1108 -d0c5 3 1174 1108 -d0c8 5 1175 1108 -d0cd 1f 1179 1108 -d0ec 7 1193 1108 -d0f3 5 1194 1108 -d0f8 7 1181 1108 -d0ff 5 1182 1108 -d104 7 1184 1108 -d10b 5 1185 1108 -d110 a 1190 1108 -d11a 5 1191 1108 -d11f 6 1187 1108 -d125 5 1196 1108 -d12a a 1200 1108 -d134 6 1203 1108 -d13a a 1206 1108 -d144 2 1209 1108 -d146 c 1211 1108 -d152 6 1212 1108 -d158 e 1214 1108 -d166 1c 1216 1108 -d182 8 1219 1108 -d18a 12 1221 1108 -d19c a 1274 1108 -d1a6 5 1275 1108 -d1ab c 1228 1108 -d1b7 b 1233 1108 -d1c2 7 1235 1108 -d1c9 3 1236 1108 -d1cc 5 1239 1108 -d1d1 10 1241 1108 -d1e1 5 1243 1108 -d1e6 4 1248 1108 -d1ea 5 1249 1108 -d1ef 6 1253 1108 -d1f5 6 1256 1108 -d1fb a 1259 1108 -d205 2 1262 1108 -d207 c 1264 1108 -d213 6 1265 1108 -d219 12 1267 1108 -d22b c 1280 1108 -d237 b 1284 1108 -d242 4 1285 1108 -d246 5 1287 1108 -d24b 22 1274 1108 -d26d 10 1289 1108 -d27d 5 1291 1108 -d282 1b 1295 1108 -d29d a 1362 1108 -d2a7 5 1363 1108 -d2ac 6 1301 1108 -d2b2 2 1303 1108 -d2b4 d 1304 1108 -d2c1 5 1306 1108 -d2c6 7 1308 1108 -d2cd 5 1310 1108 -d2d2 7 1358 1108 -d2d9 5 1359 1108 -d2de 10 1322 1108 -d2ee 3 1324 1108 -d2f1 12 1325 1108 -d303 d 1327 1108 -d310 3 1329 1108 -d313 d 1330 1108 -d320 5 1332 1108 -d325 24 1337 1108 -d349 4 1352 1108 -d34d 13 1166 1108 -d360 5 1167 1108 -d365 a 1342 1108 -d36f 5 1366 1108 -d374 36 1378 1108 -d3aa d 1716 1108 -d3b7 7 1724 1108 -d3be 14 1726 1108 -d3d2 9 1728 1108 -d3db 2a 1739 1108 -d405 b 1381 1108 -d410 9 1383 1108 -d419 b 1564 1108 -d424 7 1565 1108 -d42b d 1584 1108 -d438 b 1586 1108 -d443 a 1589 1108 -d44d 5 1592 1108 -d452 22 1378 1108 -d474 d 1394 1108 -d481 b 1397 1108 -d48c 2 1400 1108 -d48e 9 1402 1108 -d497 6 1404 1108 -d49d 24 1406 1108 -d4c1 5 1407 1108 -d4c6 d 1411 1108 -d4d3 c 1415 1108 -d4df 3 1420 1108 -d4e2 28 1430 1108 -d50a 7 1434 1108 -d511 2 1436 1108 -d513 7 1437 1108 -d51a 9 1439 1108 -d523 7 1440 1108 -d52a 5 1506 1108 -d52f 6 1520 1108 -d535 a 1523 1108 -d53f 2 1526 1108 -d541 9 1528 1108 -d54a 4 1530 1108 -d54e 6 1533 1108 -d554 c 1537 1108 -d560 b 1541 1108 -d56b 9 1546 1108 -d574 b 1548 1108 -d57f 7 1549 1108 -d586 5 1550 1108 -d58b 4 1551 1108 -d58f 5 1553 1108 -d594 8 1543 1108 -d59c 7 1544 1108 -d5a3 5 1557 1108 -d5a8 38 1378 1108 -d5e0 15 1908 1108 -d5f5 11 1910 1108 -d606 6 1665 1108 -d60c a 1668 1108 -d616 2 1671 1108 -d618 9 1673 1108 -d621 6 1675 1108 -d627 1f 1677 1108 -d646 5 1678 1108 -d64b c 1682 1108 -d657 d 1688 1108 -d664 9 1702 1108 -d66d 7 1703 1108 -d674 2 1704 1108 -d676 5 1706 1108 -d67b 7 1708 1108 -d682 5 1710 1108 -d687 7 1864 1108 -d68e 7 1869 1108 -d695 6 1910 1108 -d69b 9 1933 1108 -d6a4 a 1936 1108 -d6ae f 1939 1108 -d6bd 5 1942 1108 -d6c2 1a 1739 1108 -d6dc 21 1109 1108 -d6fd 17 1749 1108 -d714 9 1750 1108 -d71d 8 1751 1108 -d725 9 1752 1108 -d72e 5 1753 1108 -d733 3 1754 1108 -d736 a 1756 1108 -d740 f 1759 1108 -d74f 2 1760 1108 -d751 13 1765 1108 -d764 3 1767 1108 -d767 7 1806 1108 -d76e 9 1809 1108 -d777 2 1812 1108 -d779 a 1818 1108 -d783 6 1821 1108 -d789 16 1822 1108 -d79f 24 1828 1108 -d7c3 16 1838 1108 -d7d9 15 1840 1108 -d7ee b 1844 1108 -d7f9 15 1846 1108 -d80e 5 1852 1108 -d813 a 1853 1108 -d81d 4 1854 1108 -d821 1 1857 1108 -d822 5 1859 1108 -d827 7 1877 1108 -d82e 7 1887 1108 -d835 2 1888 1108 -d837 1a 1378 1108 -d851 7 1892 1108 -d858 14 1897 1108 -d86c 10 1900 1108 -d87c 3 1901 1108 -d87f 5 1903 1108 -d884 9 1944 1108 -d88d 28 1948 1108 -d8b5 5 1949 1108 -d8ba 7 1961 1108 -d8c1 4 1964 1108 -d8c5 6 1970 1108 -d8cb 9 1972 1108 -d8d4 28 1976 1108 -d8fc 5 1977 1108 -d901 c 1981 1108 -d90d 5 1987 1108 -d912 5 2019 1108 -d917 5 2020 1108 -d91c 6 2023 1108 -d922 b 2026 1108 -d92d 5 2029 1108 -d932 9 2031 1108 -d93b 4 2033 1108 -d93f 2 2036 1108 -d941 d 2040 1108 -d94e 5 2045 1108 -d953 6 2048 1108 -d959 b 2051 1108 -d964 5 2054 1108 -d969 9 2056 1108 -d972 4 2058 1108 -d976 2 2061 1108 -d978 d 2065 1108 -d985 2 2071 1108 -d987 5 2074 1108 -d98c 6 2077 1108 -d992 a 2080 1108 -d99c 2 2083 1108 -d99e 9 2085 1108 -d9a7 6 2087 1108 -d9ad 17 2089 1108 -d9c4 15 2114 1108 -d9d9 5 2115 1108 -d9de d 2094 1108 -d9eb 2 2099 1108 -d9ed 6 2102 1108 -d9f3 a 2105 1108 -d9fd 2 2108 1108 -d9ff 9 2110 1108 -da08 6 2112 1108 -da0e e 2119 1108 -da1c f 2128 1108 -da2b 7 2129 1108 -da32 c 2130 1108 -da3e c 2136 1108 -da4a 4 2142 1108 -da4e 6 2148 1108 -da54 7 2149 1108 -da5b 2 2150 1108 -da5d 1a 2114 1108 -da77 3 2151 1108 -da7a 10 2152 1108 -da8a 3 2153 1108 -da8d 7 2157 1108 -da94 3 2158 1108 -da97 6 2163 1108 -da9d 11 2165 1108 -daae 12 2166 1108 -dac0 d 2168 1108 -dacd 3 2170 1108 -dad0 b 2173 1108 -dadb 8 2175 1108 -dae3 1 2176 1108 -dae4 20 2180 1108 -db04 9 2181 1108 -db0d 1 2182 1108 -db0e 5 2185 1108 -db13 9 1594 1108 -db1c 9 1596 1108 -db25 c 1603 1108 -db31 c 1610 1108 -db3d 4 1611 1108 -db41 8 1612 1108 -db49 11 1614 1108 -db5a 13 1618 1108 -db6d 1 1620 1108 -db6e 9 1621 1108 -db77 2 1622 1108 -db79 19 1598 1108 -db92 5 1625 1108 -db97 8 1626 1108 -db9f c 1628 1108 -dbab 6 1629 1108 -dbb1 2 1630 1108 -dbb3 4 1629 1108 -dbb7 8 1631 1108 -dbbf 10 2189 1108 -dbcf a 2201 1108 -dbd9 a 2204 1108 -dbe3 6 2205 1108 -dbe9 6 2207 1108 -dbef 2 2208 1108 -dbf1 4 2210 1108 -dbf5 6 2212 1108 -dbfb 2 2213 1108 -dbfd 4 2215 1108 -dc01 6 2217 1108 -dc07 7 2218 1108 -dc0e b 2224 1108 -dc19 9 2228 1108 -dc22 11 2230 1108 -dc33 11 2234 1108 -dc44 13 2236 1108 -dc57 f 2238 1108 -dc66 a 2263 1108 -dc70 3 2267 1108 -dc73 3 2268 1108 -dc76 3 2269 1108 -dc79 1a 2276 1108 -dc93 7 2278 1108 -dc9a e 2282 1108 -dca8 a 2283 1108 -dcb2 2 2310 1108 -dcb4 4 2279 1108 -dcb8 2 2285 1108 -dcba d 2286 1108 -dcc7 f 2290 1108 -dcd6 11 2292 1108 -dce7 6 2297 1108 -dced 8 2298 1108 -dcf5 4 2299 1108 -dcf9 1 2298 1108 -dcfa 12 1073 1108 -dd0c c 2310 1108 -dd18 c 2314 1108 -dd24 10 2319 1108 -dd34 16 2321 1108 -dd4a 2 2360 1108 -dd4c 9 2361 1108 -dd55 6 2362 1108 -dd5b 2 2344 1108 -dd5d 3 2345 1108 -dd60 2 2346 1108 -dd62 2 2324 1108 -dd64 6 2325 1108 -dd6a 9 2319 1108 -dd73 13 1043 1108 -dd86 17 1121 1108 -dd9d f 1818 1108 -ddac 10 2376 1108 -ddbc 3a 2377 1108 -FUNC ddf6 1f 0 _initp_misc_cfltcvt_tab -ddf6 2 54 4074 -ddf8 8 56 4074 -de00 14 58 4074 -de14 1 60 4074 -FUNC de20 29 4 _ValidateImageBase -de20 0 44 3159 -de20 b 50 3159 -de2b 2 52 3159 -de2d 1 68 3159 -de2e 5 55 3159 -de33 6 56 3159 -de39 2 58 3159 -de3b d 62 3159 -de48 1 68 3159 -FUNC de50 42 8 _FindPESection -de50 0 92 3159 -de50 9 99 3159 -de59 19 108 3159 -de72 10 111 3159 -de82 a 108 3159 -de8c 5 123 3159 -de91 1 124 3159 -FUNC dea0 bb 4 _IsNonwritableInCurrentImage -dea0 33 149 3159 -ded3 7 156 3159 -deda f 164 3159 -dee9 2 166 3159 -deeb 8 174 3159 -def3 e 175 3159 -df01 2 176 3159 -df03 2 178 3159 -df05 12 185 3159 -df17 12 195 3159 -df29 17 187 3159 -df40 9 193 3159 -df49 12 195 3159 -FUNC df5b 19 4 _initp_misc_winsig -df5b 0 57 2785 -df5b 9 58 2785 -df64 5 59 2785 -df69 5 60 2785 -df6e 5 61 2785 -df73 1 62 2785 -FUNC df74 9b 4 ctrlevent_capture -df74 c 89 2785 -df80 9 94 2785 -df89 3 95 2785 -df8c 5 102 2785 -df91 5 103 2785 -df96 e 104 2785 -dfa4 7 105 2785 -dfab 2 107 2785 -dfad 5 108 2785 -dfb2 e 109 2785 -dfc0 7 110 2785 -dfc7 1 109 2785 -dfc8 9 113 2785 -dfd1 7 117 2785 -dfd8 c 120 2785 -dfe4 5 124 2785 -dfe9 4 128 2785 -dfed 2 120 2785 -dfef 8 121 2785 -dff7 6 130 2785 -dffd 7 131 2785 -e004 3 138 2785 -e007 8 139 2785 -FUNC e00f 34 4 siglookup -e00f 0 634 2785 -e00f b 635 2785 -e01a 15 645 2785 -e02f f 649 2785 -e03e 2 653 2785 -e040 2 658 2785 -e042 1 659 2785 -FUNC e043 d 0 __get_sigabrt -e043 0 676 2785 -e043 c 677 2785 -e04f 1 678 2785 -FUNC e050 9 0 __fpecode -e050 0 699 2785 -e050 8 700 2785 -e058 1 701 2785 -FUNC e059 9 0 __pxcptinfoptrs -e059 0 721 2785 -e059 8 722 2785 -e061 1 723 2785 -FUNC e062 23d 8 signal -e062 c 219 2785 -e06e 4 224 2785 -e072 3 230 2785 -e075 3 244 2785 -e078 12 230 2785 -e08a 2f 244 2785 -e0b9 13 327 2785 -e0cc 7 334 2785 -e0d3 8 335 2785 -e0db a 342 2785 -e0e5 17 346 2785 -e0fc 10 352 2785 -e10c 13 367 2785 -e11f 3 380 2785 -e122 e 382 2785 -e130 3 395 2785 -e133 17 401 2785 -e14a 5 390 2785 -e14f 5 401 2785 -e154 8 246 2785 -e15c 4 247 2785 -e160 12 254 2785 -e172 14 257 2785 -e186 6 259 2785 -e18c 2 261 2785 -e18e f 263 2785 -e19d a 264 2785 -e1a7 18 268 2785 -e1bf f 288 2785 -e1ce 4 289 2785 -e1d2 b 291 2785 -e1dd 2 293 2785 -e1df f 279 2785 -e1ee 4 280 2785 -e1f2 b 282 2785 -e1fd 2 284 2785 -e1ff f 296 2785 -e20e 4 297 2785 -e212 b 299 2785 -e21d 2 301 2785 -e21f f 271 2785 -e22e 4 272 2785 -e232 c 274 2785 -e23e c 305 2785 -e24a 9 309 2785 -e253 4 407 2785 -e257 3 305 2785 -e25a 9 306 2785 -e263 19 410 2785 -e27c 1a 419 2785 -e296 3 417 2785 -e299 6 423 2785 -FUNC e29f 1b0 4 raise -e29f c 452 2785 -e2ab 5 459 2785 -e2b0 3 460 2785 -e2b3 1f 462 2785 -e2d2 a 488 2785 -e2dc 4 489 2785 -e2e0 8 490 2785 -e2e8 a 465 2785 -e2f2 2 467 2785 -e2f4 11 492 2785 -e305 2 493 2785 -e307 f 462 2785 -e316 1c 500 2785 -e332 a 476 2785 -e33c 2 478 2785 -e33e a 470 2785 -e348 2 472 2785 -e34a a 481 2785 -e354 7 482 2785 -e35b a 502 2785 -e365 2 510 2785 -e367 4 509 2785 -e36b 6 510 2785 -e371 5 515 2785 -e376 7 520 2785 -e37d 5 527 2785 -e382 7 528 2785 -e389 5 530 2785 -e38e f 543 2785 -e39d 6 544 2785 -e3a3 3 545 2785 -e3a6 5 551 2785 -e3ab 6 552 2785 -e3b1 7 553 2785 -e3b8 5 561 2785 -e3bd 1c 568 2785 -e3d9 d 571 2785 -e3e6 5 568 2785 -e3eb 7 574 2785 -e3f2 c 577 2785 -e3fe 5 582 2785 -e403 8 588 2785 -e40b 2 589 2785 -e40d 6 577 2785 -e413 6 578 2785 -e419 9 579 2785 -e422 5 590 2785 -e427 f 597 2785 -e436 6 598 2785 -e43c 5 603 2785 -e441 6 604 2785 -e447 2 607 2785 -e449 6 608 2785 -FUNC e44f a 4 _initp_misc_rand_s -e44f 0 58 3075 -e44f 9 59 3075 -e458 1 60 3075 -FUNC e459 104 4 rand_s -e459 3 66 3075 -e45c b 67 3075 -e467 2b 68 3075 -e492 c 71 3075 -e49e d 77 3075 -e4ab 4 78 3075 -e4af 1e 80 3075 -e4cd e 83 3075 -e4db 4 84 3075 -e4df 2f 86 3075 -e50e 9 88 3075 -e517 5 89 3075 -e51c 16 94 3075 -e532 7 103 3075 -e539 9 107 3075 -e542 b 109 3075 -e54d 9 110 3075 -e556 6 112 3075 -e55c 1 113 3075 -FUNC e55d 15a 14 __getlocaleinfo -e55d 1d 70 3523 -e57a 7 76 3523 -e581 87 109 3523 -e608 13 103 3523 -e61b 5 114 3523 -e620 7 115 3523 -e627 3 141 3523 -e62a 12 142 3523 -e63c 20 106 3523 -e65c 5 108 3523 -e661 7 109 3523 -e668 4 111 3523 -e66c 5 118 3523 -e671 1a 126 3523 -e68b 2 127 3523 -e68d 2 129 3523 -e68f 10 134 3523 -e69f 16 135 3523 -e6b5 2 139 3523 -FUNC e6b7 a 4 _initp_misc_purevirt -e6b7 0 166 3523 -e6b7 9 167 3523 -e6c0 1 168 3523 -FUNC e6c1 a 4 _initp_misc_initcrit -e6c1 0 47 3609 -e6c1 9 48 3609 -e6ca 1 49 3609 -FUNC e6cb 10 8 __crtInitCritSecNoSpinCount -e6cb 0 76 3609 -e6cb a 77 3609 -e6d5 3 78 3609 -e6d8 3 79 3609 -FUNC e6db c5 8 __crtInitCritSecAndSpinCount -e6db c 109 3609 -e6e7 5 111 3609 -e6ec e 112 3609 -e6fa 4 114 3609 -e6fe 1b 120 3609 -e719 4 121 3609 -e71d 2 129 3609 -e71f b 130 3609 -e72a 4 131 3609 -e72e e 134 3609 -e73c 4 136 3609 -e740 5 149 3609 -e745 c 152 3609 -e751 3 155 3609 -e754 b 161 3609 -e75f 2 162 3609 -e761 1a 163 3609 -e77b 9 170 3609 -e784 8 171 3609 -e78c 4 173 3609 -e790 7 174 3609 -e797 3 176 3609 -e79a 6 177 3609 -FUNC e7a0 5e 4 _isatty -e7a0 0 37 4912 -e7a0 16 44 4912 -e7b6 2 59 4912 -e7b8 29 45 4912 -e7e1 1 59 4912 -e7e2 1b 58 4912 -e7fd 1 59 4912 -FUNC e7fe 2f 0 CPtoLCID -e7fe 0 329 4615 -e7fe 14 330 4615 -e812 2 345 4615 -e814 1 346 4615 -e815 5 342 4615 -e81a 1 346 4615 -e81b 5 339 4615 -e820 1 346 4615 -e821 5 336 4615 -e826 1 346 4615 -e827 5 333 4615 -e82c 1 346 4615 -FUNC e82d 55 0 setSBCS -e82d 4 363 4615 -e831 14 368 4615 -e845 3 371 4615 -e848 3 374 4615 -e84b 3 376 4615 -e84e 8 379 4615 -e856 a 381 4615 -e860 9 382 4615 -e869 b 384 4615 -e874 d 385 4615 -e881 1 386 4615 -FUNC e882 18a 0 setSBUpLow -e882 1d 402 4615 -e89f f 412 4615 -e8ae d 415 4615 -e8bb c 416 4615 -e8c7 e 420 4615 -e8d5 3 419 4615 -e8d8 28 421 4615 -e900 1d 427 4615 -e91d 23 432 4615 -e940 25 437 4615 -e965 2 442 4615 -e967 a 443 4615 -e971 5 445 4615 -e976 9 446 4615 -e97f 5 448 4615 -e984 5 450 4615 -e989 e 451 4615 -e997 2 453 4615 -e999 8 454 4615 -e9a1 5 442 4615 -e9a6 8 456 4615 -e9ae 2c 472 4615 -e9da 5 466 4615 -e9df 5 468 4615 -e9e4 7 469 4615 -e9eb 2 471 4615 -e9ed 3 472 4615 -e9f0 5 460 4615 -e9f5 17 474 4615 -FUNC ea0c a4 0 __updatetmbcinfo -ea0c c 496 4615 -ea18 7 499 4615 -ea1f 10 500 4615 -ea2f 3 533 4615 -ea32 4 536 4615 -ea36 8 538 4615 -ea3e 2 541 4615 -ea40 6 542 4615 -ea46 8 501 4615 -ea4e 4 503 4615 -ea52 e 506 4615 -ea60 17 512 4615 -ea77 7 517 4615 -ea7e 11 524 4615 -ea8f 7 525 4615 -ea96 11 528 4615 -eaa7 9 530 4615 -FUNC eab0 7a 0 getSystemCP -eab0 7 282 4615 -eab7 b 284 4615 -eac2 b 289 4615 -eacd a 291 4615 -ead7 14 292 4615 -eaeb 5 295 4615 -eaf0 a 297 4615 -eafa 8 298 4615 -eb02 5 302 4615 -eb07 12 305 4615 -eb19 f 308 4615 -eb28 2 309 4615 -FUNC eb2a 1d9 8 _setmbcp_nolock -eb2a 15 686 4615 -eb3f b 693 4615 -eb4a 9 696 4615 -eb53 7 698 4615 -eb5a 7 699 4615 -eb61 3 703 4615 -eb64 2 705 4615 -eb66 19 708 4615 -eb7f 2a 743 4615 -eba9 13 751 4615 -ebbc f 756 4615 -ebcb 15 761 4615 -ebe0 17 764 4615 -ebf7 c 766 4615 -ec03 f 712 4615 -ec12 15 715 4615 -ec27 9 720 4615 -ec30 8 723 4615 -ec38 12 724 4615 -ec4a 9 723 4615 -ec53 5 720 4615 -ec58 12 715 4615 -ec6a 20 731 4615 -ec8a d 733 4615 -ec97 7 736 4615 -ec9e 5 737 4615 -eca3 6 767 4615 -eca9 10 766 4615 -ecb9 8 771 4615 -ecc1 7 772 4615 -ecc8 b 775 4615 -ecd3 3 778 4615 -ecd6 2 780 4615 -ecd8 3 782 4615 -ecdb 8 785 4615 -ece3 2 789 4615 -ece5 6 794 4615 -eceb 6 797 4615 -ecf1 3 746 4615 -ecf4 f 802 4615 -FUNC ed03 3c 0 _getmbcp -ed03 6 819 4615 -ed09 a 821 4615 -ed13 9 822 4615 -ed1c 10 823 4615 -ed2c 2 826 4615 -ed2e f 825 4615 -ed3d 2 826 4615 -FUNC ed3f 19a 4 _setmbcp -ed3f c 574 4615 -ed4b 4 575 4615 -ed4f a 579 4615 -ed59 5 581 4615 -ed5e 3 582 4615 -ed61 b 585 4615 -ed6c 9 587 4615 -ed75 d 593 4615 -ed82 8 595 4615 -ed8a c 597 4615 -ed96 3 607 4615 -ed99 16 612 4615 -edaf 1a 614 4615 -edc9 7 615 4615 -edd0 3 619 4615 -edd3 9 620 4615 -eddc 17 622 4615 -edf3 8 624 4615 -edfb 4 625 4615 -edff 8 630 4615 -ee07 8 631 4615 -ee0f 8 632 4615 -ee17 a 633 4615 -ee21 d 634 4615 -ee2e 3 633 4615 -ee31 c 635 4615 -ee3d a 636 4615 -ee47 3 635 4615 -ee4a c 637 4615 -ee56 d 638 4615 -ee63 3 637 4615 -ee66 1c 640 4615 -ee82 7 641 4615 -ee89 6 645 4615 -ee8f 3 646 4615 -ee92 e 648 4615 -eea0 9 650 4615 -eea9 2 653 4615 -eeab 5 654 4615 -eeb0 8 660 4615 -eeb8 7 661 4615 -eebf b 662 4615 -eeca 2 668 4615 -eecc 4 673 4615 -eed0 3 682 4615 -eed3 6 683 4615 -FUNC eed9 1e 0 __initmbctable -eed9 0 843 4615 -eed9 9 853 4615 -eee2 8 854 4615 -eeea a 855 4615 -eef4 2 860 4615 -eef6 1 861 4615 -FUNC eef7 6 0 ___setlc_active_func -eef7 0 90 2995 -eef7 5 91 2995 -eefc 1 92 2995 -FUNC eefd 6 0 ___unguarded_readlc_active_add_func -eefd 0 104 2995 -eefd 5 105 2995 -ef02 1 106 2995 -FUNC ef03 140 4 __freetlocinfo -ef03 3 144 2995 -ef06 26 152 2995 -ef2c e 155 2995 -ef3a 6 157 2995 -ef40 d 158 2995 -ef4d e 162 2995 -ef5b 6 164 2995 -ef61 d 165 2995 -ef6e b 168 2995 -ef79 d 169 2995 -ef86 e 176 2995 -ef94 11 178 2995 -efa5 13 179 2995 -efb8 e 180 2995 -efc6 e 181 2995 -efd4 17 188 2995 -efeb 6 190 2995 -eff1 9 191 2995 -effa 6 194 2995 -f000 13 197 2995 -f013 7 199 2995 -f01a 10 205 2995 -f02a d 207 2995 -f037 b 214 2995 -f042 1 215 2995 -FUNC f043 86 4 __addlocaleref -f043 3 225 2995 -f046 e 227 2995 -f054 a 228 2995 -f05e 3 229 2995 -f061 a 231 2995 -f06b 3 232 2995 -f06e a 234 2995 -f078 3 235 2995 -f07b a 237 2995 -f085 3 238 2995 -f088 6 240 2995 -f08e f 242 2995 -f09d 3 243 2995 -f0a0 d 245 2995 -f0ad 9 246 2995 -f0b6 12 248 2995 -f0c8 1 249 2995 -FUNC f0c9 8c 4 __removelocaleref -f0c9 1 259 2995 -f0ca b 261 2995 -f0d5 9 263 2995 -f0de a 265 2995 -f0e8 3 266 2995 -f0eb a 268 2995 -f0f5 3 269 2995 -f0f8 a 271 2995 -f102 3 272 2995 -f105 a 274 2995 -f10f 3 275 2995 -f112 6 277 2995 -f118 f 279 2995 -f127 3 280 2995 -f12a d 282 2995 -f137 9 283 2995 -f140 11 285 2995 -f151 3 287 2995 -f154 1 288 2995 -FUNC f155 24 0 _copytlocinfo_nolock -f155 3 302 2995 -f158 d 303 2995 -f165 7 304 2995 -f16c 3 305 2995 -f16f 9 306 2995 -f178 1 308 2995 -FUNC f179 3e 0 _updatetlocinfoEx_nolock -f179 0 321 2995 -f179 9 324 2995 -f182 2 326 2995 -f184 4 327 2995 -f188 8 334 2995 -f190 5 339 2995 -f195 6 341 2995 -f19b e 350 2995 -f1a9 7 351 2995 -f1b0 3 355 2995 -f1b3 1 356 2995 -f1b4 2 325 2995 -f1b6 1 356 2995 -FUNC f1b7 76 0 __updatetlocinfo -f1b7 c 382 2995 -f1c3 7 384 2995 -f1ca 10 386 2995 -f1da 8 397 2995 -f1e2 4 399 2995 -f1e6 8 401 2995 -f1ee 2 404 2995 -f1f0 6 405 2995 -f1f6 8 387 2995 -f1fe 4 388 2995 -f202 11 390 2995 -f213 e 392 2995 -f221 8 394 2995 -f229 4 395 2995 -FUNC f22d 66 4 _configthreadlocale -f22d 2 420 2995 -f22f 5 434 2995 -f234 10 435 2995 -f244 19 437 2995 -f25d 1d 456 2995 -f27a 3 444 2995 -f27d 2 445 2995 -f27f 6 440 2995 -f285 2 441 2995 -f287 7 452 2995 -f28e 4 460 2995 -f292 1 462 2995 -FUNC f293 53 0 sync_legacy_variables_lk -f293 0 489 2995 -f293 e 490 2995 -f2a1 9 491 2995 -f2aa c 492 2995 -f2b6 c 493 2995 -f2c2 c 494 2995 -f2ce c 495 2995 -f2da b 496 2995 -f2e5 1 497 2995 -FUNC f2e6 96 4 _free_locale -f2e6 c 517 2995 -f2f2 9 518 2995 -f2fb 1c 522 2995 -f317 7 524 2995 -f31e 4 526 2995 -f322 8 534 2995 -f32a 3 535 2995 -f32d 8 537 2995 -f335 11 540 2995 -f346 7 541 2995 -f34d c 543 2995 -f359 7 552 2995 -f360 3 553 2995 -f363 7 554 2995 -f36a 6 556 2995 -f370 3 543 2995 -f373 9 545 2995 -FUNC f37c 5 4 __free_locale -f37c 0 562 2995 -f37c 5 563 2995 -FUNC f381 88 0 _get_current_locale -f381 c 687 2995 -f38d 7 689 2995 -f394 14 691 2995 -f3a8 b 693 2995 -f3b3 4 694 2995 -f3b7 5 697 2995 -f3bc 5 698 2995 -f3c1 5 706 2995 -f3c6 6 707 2995 -f3cc 8 708 2995 -f3d4 4 709 2995 -f3d8 8 710 2995 -f3e0 c 712 2995 -f3ec 9 715 2995 -f3f5 2 717 2995 -f3f7 6 718 2995 -f3fd 3 712 2995 -f400 9 713 2995 -FUNC f409 5 0 __get_current_locale -f409 0 722 2995 -f409 5 723 2995 -FUNC f40e 3 4 __init_dummy -f40e 0 1283 2995 -f40e 2 1284 2995 -f410 1 1285 2995 -FUNC f411 3e c _strcats -f411 2 1288 2995 -f413 f 1294 2995 -f422 26 1296 2995 -f448 6 1294 2995 -f44e 1 1299 2995 -FUNC f44f 129 8 __lc_strtolc -f44f 6 1302 2995 -f455 11 1307 2995 -f466 c 1309 2995 -f472 7 1310 2995 -f479 b 1313 2995 -f484 25 1315 2995 -f4a9 6 1317 2995 -f4af 2 1318 2995 -f4b1 15 1323 2995 -f4c6 1d 1328 2995 -f4e3 9 1329 2995 -f4ec 10 1331 2995 -f4fc c 1332 2995 -f508 14 1334 2995 -f51c 28 1335 2995 -f544 9 1340 2995 -f54d b 1348 2995 -f558 18 1350 2995 -f570 6 1338 2995 -f576 2 1353 2995 -FUNC f578 6b c __lc_lctostr -f578 5 1356 2995 -f57d 25 1357 2995 -f5a2 7 1358 2995 -f5a9 16 1359 2995 -f5bf c 1360 2995 -f5cb 16 1361 2995 -f5e1 2 1362 2995 -FUNC f5e3 171 0 _setlocale_get_all -f5e3 4 1124 2995 -f5e7 3 1126 2995 -f5ea 1d 1134 2995 -f607 3 1137 2995 -f60a 3 1139 2995 -f60d 2 1140 2995 -f60f 2f 1143 2995 -f63e 26 1146 2995 -f664 10 1147 2995 -f674 5 1148 2995 -f679 4 1141 2995 -f67d 2f 1143 2995 -f6ac a 1144 2995 -f6b6 8 1152 2995 -f6be 14 1154 2995 -f6d2 9 1156 2995 -f6db e 1159 2995 -f6e9 9 1161 2995 -f6f2 7 1165 2995 -f6f9 7 1166 2995 -f700 9 1168 2995 -f709 15 1170 2995 -f71e 9 1172 2995 -f727 e 1175 2995 -f735 9 1177 2995 -f73e 12 1183 2995 -f750 4 1187 2995 -FUNC f754 1d4 18 _expandlocale -f754 15 1198 2995 -f769 41 1230 2995 -f7aa 14 1211 2995 -f7be b 1216 2995 -f7c9 26 1219 2995 -f7ef 4 1220 2995 -f7f3 3 1222 2995 -f7f6 4 1223 2995 -f7fa 4 1224 2995 -f7fe 7 1226 2995 -f805 2 1228 2995 -f807 8 1230 2995 -f80f 6 1234 2995 -f815 2f 1236 2995 -f844 4 1241 2995 -f848 e 1243 2995 -f856 6 1244 2995 -f85c 10 1246 2995 -f86c 6 1247 2995 -f872 9 1251 2995 -f87b 10 1253 2995 -f88b a 1255 2995 -f895 2 1260 2995 -f897 8 1263 2995 -f89f 26 1267 2995 -f8c5 5 1271 2995 -f8ca e 1272 2995 -f8d8 5 1273 2995 -f8dd 10 1274 2995 -f8ed 22 1276 2995 -f90f 5 1277 2995 -f914 2 1212 2995 -f916 12 1278 2995 -FUNC f928 2f6 4 _setlocale_set_cat -f928 19 980 2995 -f941 5 993 2995 -f946 2f 998 2995 -f975 7 1000 2995 -f97c 19 1002 2995 -f995 6 1004 2995 -f99b c 1007 2995 -f9a7 16 1008 2995 -f9bd 2 1010 2995 -f9bf 3 1013 2995 -f9c2 d 1014 2995 -f9cf 2c 1015 2995 -f9fb 3 1016 2995 -f9fe 39 1019 2995 -fa37 6 1020 2995 -fa3d 15 1021 2995 -fa52 17 1022 2995 -fa69 a 1029 2995 -fa73 6 1031 2995 -fa79 18 1037 2995 -fa91 7 1039 2995 -fa98 8 1053 2995 -faa0 14 1054 2995 -fab4 18 1055 2995 -facc 2 1039 2995 -face a 1044 2995 -fad8 d 1046 2995 -fae5 b 1047 2995 -faf0 9 1058 2995 -faf9 26 1066 2995 -fb1f 2 1069 2995 -fb21 10 1071 2995 -fb31 22 1072 2995 -fb53 2 1081 2995 -fb55 4 1082 2995 -fb59 5 1083 2995 -fb5e 9 1085 2995 -fb67 6 1088 2995 -fb6d 9 1089 2995 -fb76 12 1091 2995 -fb88 6 1094 2995 -fb8e e 1095 2995 -fb9c f 1096 2995 -fbab 9 1097 2995 -fbb4 5 1099 2995 -fbb9 24 1106 2995 -fbdd 7 1109 2995 -fbe4 8 1110 2995 -fbec 6 1111 2995 -fbf2 18 1116 2995 -fc0a 3 1118 2995 -fc0d 11 1119 2995 -FUNC fc1e 1ce 4 _setlocale_nolock -fc1e 1a 873 2995 -fc38 7 877 2995 -fc3f 5 904 2995 -fc44 17 880 2995 -fc5b 5 882 2995 -fc60 12 888 2995 -fc72 1d 890 2995 -fc8f 2 894 2995 -fc91 d 898 2995 -fc9e 1e 900 2995 -fcbc 11 904 2995 -fccd 1d 907 2995 -fcea e 904 2995 -fcf8 1b 913 2995 -fd13 6 916 2995 -fd19 24 918 2995 -fd3d 18 922 2995 -fd55 3 923 2995 -fd58 7 925 2995 -fd5f 1 926 2995 -fd60 9 928 2995 -fd69 c 930 2995 -fd75 4 901 2995 -fd79 19 935 2995 -fd92 3 937 2995 -fd95 4 939 2995 -fd99 11 941 2995 -fdaa c 943 2995 -fdb6 2 947 2995 -fdb8 3 949 2995 -fdbb 2 952 2995 -fdbd 3 953 2995 -fdc0 9 937 2995 -fdc9 5 956 2995 -fdce 2 961 2995 -fdd0 3 962 2995 -fdd3 2 965 2995 -fdd5 5 966 2995 -fdda 12 972 2995 -FUNC fdec f3 8 _create_locale -fdec 0 605 2995 -fdec 10 609 2995 -fdfc 13 612 2995 -fe0f b 614 2995 -fe1a 4 610 2995 -fe1e c 658 2995 -fe2a 8 617 2995 -fe32 7 619 2995 -fe39 2 621 2995 -fe3b 14 623 2995 -fe4f 7 625 2995 -fe56 7 626 2995 -fe5d 2 628 2995 -fe5f c 630 2995 -fe6b 14 632 2995 -fe7f 7 634 2995 -fe86 7 635 2995 -fe8d 9 637 2995 -fe96 2 640 2995 -fe98 13 642 2995 -feab 8 644 2995 -feb3 7 645 2995 -feba 7 646 2995 -fec1 9 647 2995 -feca 2 648 2995 -fecc 2 650 2995 -fece 5 652 2995 -fed3 5 653 2995 -fed8 7 657 2995 -FUNC fedf 5 8 __create_locale -fedf 0 665 2995 -fedf 5 666 2995 -FUNC fee4 170 8 setlocale -fee4 c 791 2995 -fef0 5 792 2995 -fef5 25 797 2995 -ff1a a 799 2995 -ff24 5 801 2995 -ff29 4 806 2995 -ff2d 3 807 2995 -ff30 1b 808 2995 -ff4b 8 818 2995 -ff53 7 819 2995 -ff5a a 820 2995 -ff64 8 822 2995 -ff6c 19 826 2995 -ff85 18 834 2995 -ff9d a 836 2995 -ffa7 8 839 2995 -ffaf 7 840 2995 -ffb6 a 841 2995 -ffc0 7 842 2995 -ffc7 f 846 2995 -ffd6 c 847 2995 -ffe2 18 849 2995 -fffa 5 850 2995 -ffff b 852 2995 -1000a 8 822 2995 -10012 9 823 2995 -1001b 3 852 2995 -1001e 9 853 2995 -10027 2 855 2995 -10029 6 856 2995 -1002f 8 857 2995 -10037 c 860 2995 -10043 3 865 2995 -10046 6 866 2995 -1004c 3 860 2995 -1004f 5 862 2995 -FUNC 10054 15f 14 _wctomb_s_l -10054 8 56 6128 -1005c 11 57 6128 -1006d 7 60 6128 -10074 2 62 6128 -10076 4 64 6128 -1007a 7 67 6128 -10081 3 69 6128 -10084 23 74 6128 -100a7 b 77 6128 -100b2 c 79 6128 -100be a 81 6128 -100c8 8 83 6128 -100d0 b 85 6128 -100db b 125 6128 -100e6 13 126 6128 -100f9 5 136 6128 -100fe 4 91 6128 -10102 2c 93 6128 -1012e 2 94 6128 -10130 7 96 6128 -10137 6 98 6128 -1013d 15 100 6128 -10152 27 115 6128 -10179 7 129 6128 -10180 2 131 6128 -10182 2 133 6128 -10184 f 117 6128 -10193 10 119 6128 -101a3 b 121 6128 -101ae 5 123 6128 -FUNC 101b3 1b 10 wctomb_s -101b3 0 144 6128 -101b3 1a 145 6128 -101cd 1 146 6128 -FUNC 101ce 4f c _wctomb_l -101ce 6 178 6128 -101d4 f 181 6128 -101e3 1f 183 6128 -10202 19 184 6128 -1021b 2 185 6128 -FUNC 1021d 30 8 wctomb -1021d 4 191 6128 -10221 4 192 6128 -10225 1a 195 6128 -1023f 7 196 6128 -10246 2 197 6128 -10248 3 196 6128 -1024b 2 197 6128 -FUNC 1024d 36 8 _isleadbyte_l -1024d 6 55 6490 -10253 b 56 6490 -1025e 23 57 6490 -10281 2 58 6490 -FUNC 10283 e 4 isleadbyte -10283 0 63 6490 -10283 d 64 6490 -10290 1 65 6490 -FUNC 10291 16 8 _iswalpha_l -10291 0 71 6490 -10291 15 72 6490 -102a6 1 73 6490 -FUNC 102a7 11 4 iswalpha -102a7 0 78 6490 -102a7 10 79 6490 -102b7 1 80 6490 -FUNC 102b8 13 8 _iswupper_l -102b8 0 86 6490 -102b8 12 87 6490 -102ca 1 88 6490 -FUNC 102cb e 4 iswupper -102cb 0 93 6490 -102cb d 94 6490 -102d8 1 95 6490 -FUNC 102d9 13 8 _iswlower_l -102d9 0 101 6490 -102d9 12 102 6490 -102eb 1 103 6490 -FUNC 102ec e 4 iswlower -102ec 0 108 6490 -102ec d 109 6490 -102f9 1 110 6490 -FUNC 102fa 13 8 _iswdigit_l -102fa 0 116 6490 -102fa 12 117 6490 -1030c 1 118 6490 -FUNC 1030d e 4 iswdigit -1030d 0 123 6490 -1030d d 124 6490 -1031a 1 125 6490 -FUNC 1031b 16 8 _iswxdigit_l -1031b 0 131 6490 -1031b 15 132 6490 -10330 1 133 6490 -FUNC 10331 11 4 iswxdigit -10331 0 138 6490 -10331 10 139 6490 -10341 1 140 6490 -FUNC 10342 13 8 _iswspace_l -10342 0 146 6490 -10342 12 147 6490 -10354 1 148 6490 -FUNC 10355 e 4 iswspace -10355 0 153 6490 -10355 d 154 6490 -10362 1 155 6490 -FUNC 10363 13 8 _iswpunct_l -10363 0 161 6490 -10363 12 162 6490 -10375 1 163 6490 -FUNC 10376 e 4 iswpunct -10376 0 168 6490 -10376 d 169 6490 -10383 1 170 6490 -FUNC 10384 16 8 _iswalnum_l -10384 0 176 6490 -10384 15 177 6490 -10399 1 178 6490 -FUNC 1039a 11 4 iswalnum -1039a 0 183 6490 -1039a 10 184 6490 -103aa 1 185 6490 -FUNC 103ab 16 8 _iswprint_l -103ab 0 191 6490 -103ab 15 192 6490 -103c0 1 193 6490 -FUNC 103c1 11 4 iswprint -103c1 0 198 6490 -103c1 10 199 6490 -103d1 1 200 6490 -FUNC 103d2 16 8 _iswgraph_l -103d2 0 206 6490 -103d2 15 207 6490 -103e7 1 208 6490 -FUNC 103e8 11 4 iswgraph -103e8 0 213 6490 -103e8 10 214 6490 -103f8 1 215 6490 -FUNC 103f9 13 8 _iswcntrl_l -103f9 0 221 6490 -103f9 12 222 6490 -1040b 1 223 6490 -FUNC 1040c e 4 iswcntrl -1040c 0 228 6490 -1040c d 229 6490 -10419 1 230 6490 -FUNC 1041a c 4 iswascii -1041a 0 235 6490 -1041a b 236 6490 -10425 1 237 6490 -FUNC 10426 26 8 _iswcsym_l -10426 0 243 6490 -10426 21 244 6490 -10447 1 245 6490 -10448 3 244 6490 -1044b 1 245 6490 -FUNC 1044c 21 4 __iswcsym -1044c 0 250 6490 -1044c 1c 251 6490 -10468 1 252 6490 -10469 3 251 6490 -1046c 1 252 6490 -FUNC 1046d 26 8 _iswcsymf_l -1046d 0 258 6490 -1046d 21 259 6490 -1048e 1 260 6490 -1048f 3 259 6490 -10492 1 260 6490 -FUNC 10493 21 4 __iswcsymf -10493 0 265 6490 -10493 1c 266 6490 -104af 1 267 6490 -104b0 3 266 6490 -104b3 1 267 6490 -FUNC 104c0 95 0 _aulldvrm -104c0 0 45 5113 -104c0 1 47 5113 -104c1 4 79 5113 -104c5 2 80 5113 -104c7 2 81 5113 -104c9 4 82 5113 -104cd 4 83 5113 -104d1 2 84 5113 -104d3 2 85 5113 -104d5 2 86 5113 -104d7 4 87 5113 -104db 2 88 5113 -104dd 2 89 5113 -104df 2 94 5113 -104e1 4 95 5113 -104e5 2 96 5113 -104e7 2 97 5113 -104e9 4 98 5113 -104ed 2 99 5113 -104ef 2 100 5113 -104f1 2 107 5113 -104f3 4 108 5113 -104f7 4 109 5113 -104fb 4 110 5113 -104ff 2 112 5113 -10501 2 113 5113 -10503 2 114 5113 -10505 2 115 5113 -10507 2 116 5113 -10509 2 117 5113 -1050b 2 118 5113 -1050d 2 119 5113 -1050f 4 128 5113 -10513 2 129 5113 -10515 4 130 5113 -10519 2 131 5113 -1051b 2 132 5113 -1051d 2 133 5113 -1051f 4 141 5113 -10523 2 142 5113 -10525 2 143 5113 -10527 4 144 5113 -1052b 2 145 5113 -1052d 1 147 5113 -1052e 4 148 5113 -10532 4 149 5113 -10536 2 151 5113 -10538 4 160 5113 -1053c 4 161 5113 -10540 2 162 5113 -10542 2 163 5113 -10544 3 164 5113 -10547 2 169 5113 -10549 2 170 5113 -1054b 2 171 5113 -1054d 2 172 5113 -1054f 2 173 5113 -10551 1 179 5113 -10552 3 181 5113 -FUNC 10558 90 0 _local_unwind4 -FUNC 105e8 46 0 _unwind_handler4 -FUNC 1062e 1c 4 _seh_longjmp_unwind4 -FUNC 1064a 17 0 _EH4_CallFilterFunc -FUNC 10661 19 0 _EH4_TransferToHandler -FUNC 1067a 1a 0 _EH4_GlobalUnwind -FUNC 10694 17 8 _EH4_LocalUnwind -FUNC 106ab 33 0 write_char -106ab 0 2433 1218 -106ab a 2434 1218 -106b5 2 2437 1218 -106b7 21 2442 1218 -106d8 2 2444 1218 -106da 1 2447 1218 -106db 2 2446 1218 -106dd 1 2447 1218 -FUNC 106de 24 c write_multi_char -106de 6 2498 1218 -106e4 2 2501 1218 -106e6 e 2500 1218 -106f4 5 2501 1218 -106f9 7 2499 1218 -10700 2 2504 1218 -FUNC 10702 4a 4 write_string -10702 0 2563 1218 -10702 12 2564 1218 -10714 6 2566 1218 -1071a 2 2567 1218 -1071c e 2570 1218 -1072a 5 2571 1218 -1072f a 2573 1218 -10739 9 2574 1218 -10742 9 2569 1218 -1074b 1 2579 1218 -FUNC 1074c 9b0 10 _output_s_l -1074c 1b 975 1218 -10767 45 1036 1218 -107ac 2d 1031 1218 -107d9 b1 1033 1218 -1088a 8 1036 1218 -10892 28 1073 1218 -108ba 17 1078 1218 -108d1 e 1079 1218 -108df 11 1124 1218 -108f0 12 1131 1218 -10902 2 1171 1218 -10904 13 1173 1218 -10917 3 1174 1218 -1091a 5 1175 1218 -1091f 1e 1179 1218 -1093d 3 1193 1218 -10940 5 1194 1218 -10945 4 1181 1218 -10949 5 1182 1218 -1094e 4 1184 1218 -10952 5 1185 1218 -10957 7 1190 1218 -1095e 5 1191 1218 -10963 4 1187 1218 -10967 5 1196 1218 -1096c 5 1200 1218 -10971 9 1206 1218 -1097a b 1233 1218 -10985 4 1235 1218 -10989 3 1236 1218 -1098c 5 1239 1218 -10991 10 1241 1218 -109a1 5 1243 1218 -109a6 4 1248 1218 -109aa 5 1249 1218 -109af 5 1253 1218 -109b4 9 1259 1218 -109bd b 1284 1218 -109c8 4 1285 1218 -109cc 5 1287 1218 -109d1 10 1289 1218 -109e1 5 1291 1218 -109e6 18 1295 1218 -109fe 7 1362 1218 -10a05 5 1363 1218 -10a0a 5 1301 1218 -10a0f 1 1303 1218 -10a10 a 1304 1218 -10a1a 5 1306 1218 -10a1f 4 1308 1218 -10a23 5 1310 1218 -10a28 4 1358 1218 -10a2c 5 1359 1218 -10a31 c 1322 1218 -10a3d 2 1324 1218 -10a3f f 1325 1218 -10a4e a 1327 1218 -10a58 2 1329 1218 -10a5a a 1330 1218 -10a64 5 1332 1218 -10a69 30 1337 1218 -10a99 4 1352 1218 -10a9d 4 1154 1218 -10aa1 10 1158 1218 -10ab1 11 1160 1218 -10ac2 3 1161 1218 -10ac5 b 1163 1218 -10ad0 b 1166 1218 -10adb 5 1167 1218 -10ae0 32 1378 1218 -10b12 d 1716 1218 -10b1f 4 1724 1218 -10b23 18 1749 1218 -10b3b c 1750 1218 -10b47 8 1381 1218 -10b4f 9 1385 1218 -10b58 8 1561 1218 -10b60 7 1562 1218 -10b67 d 1584 1218 -10b74 3 1589 1218 -10b77 15 1635 1218 -10b8c 4 1636 1218 -10b90 8 1637 1218 -10b98 f 1639 1218 -10ba7 1d 1378 1218 -10bc4 12 1448 1218 -10bd6 16 1467 1218 -10bec 4 1470 1218 -10bf0 7 1471 1218 -10bf7 2 1472 1218 -10bf9 6 1499 1218 -10bff 7 1500 1218 -10c06 6 1503 1218 -10c0c 5 1506 1218 -10c11 5 1523 1218 -10c16 e 1541 1218 -10c24 6 1546 1218 -10c2a d 1548 1218 -10c37 7 1549 1218 -10c3e 5 1550 1218 -10c43 4 1551 1218 -10c47 5 1553 1218 -10c4c 8 1543 1218 -10c54 7 1544 1218 -10c5b 5 1557 1218 -10c60 34 1378 1218 -10c94 9 1908 1218 -10c9d 9 1910 1218 -10ca6 8 1668 1218 -10cae d 1688 1218 -10cbb 6 1702 1218 -10cc1 7 1703 1218 -10cc8 2 1704 1218 -10cca 5 1706 1218 -10ccf 7 1708 1218 -10cd6 5 1710 1218 -10cdb 4 1864 1218 -10cdf 7 1869 1218 -10ce6 c 1933 1218 -10cf2 8 1939 1218 -10cfa 5 1958 1218 -10cff 7 1751 1218 -10d06 9 1752 1218 -10d0f 5 1753 1218 -10d14 3 1754 1218 -10d17 9 1756 1218 -10d20 f 1759 1218 -10d2f 2 1760 1218 -10d31 15 1765 1218 -10d46 8 1767 1218 -10d4e e 1809 1218 -10d5c 27 1828 1218 -10d83 14 1838 1218 -10d97 15 1840 1218 -10dac a 1844 1218 -10db6 15 1846 1218 -10dcb 5 1852 1218 -10dd0 7 1853 1218 -10dd7 4 1854 1218 -10ddb 1 1857 1218 -10ddc 5 1859 1218 -10de1 3 1877 1218 -10de4 3 1887 1218 -10de7 2 1888 1218 -10de9 1a 1378 1218 -10e03 7 1892 1218 -10e0a 11 1897 1218 -10e1b c 1900 1218 -10e27 7 1901 1218 -10e2e 5 1903 1218 -10e33 5 1961 1218 -10e38 6 1987 1218 -10e3e 14 2026 1218 -10e52 2 2045 1218 -10e54 5 2051 1218 -10e59 2 2071 1218 -10e5b 3 2074 1218 -10e5e 6 2080 1218 -10e64 2 2099 1218 -10e66 5 2105 1218 -10e6b f 2128 1218 -10e7a 7 2129 1218 -10e81 7 2130 1218 -10e88 c 2136 1218 -10e94 2 2142 1218 -10e96 6 2148 1218 -10e9c 7 2149 1218 -10ea3 2 2150 1218 -10ea5 4 2151 1218 -10ea9 a 2152 1218 -10eb3 3 2153 1218 -10eb6 6 2157 1218 -10ebc 3 2158 1218 -10ebf 6 2163 1218 -10ec5 10 2165 1218 -10ed5 10 2166 1218 -10ee5 c 2168 1218 -10ef1 3 2170 1218 -10ef4 3 2172 1218 -10ef7 2 2173 1218 -10ef9 8 2175 1218 -10f01 1 2176 1218 -10f02 19 2180 1218 -10f1b 9 2181 1218 -10f24 1 2182 1218 -10f25 2 2185 1218 -10f27 7 1640 1218 -10f2e 2 1641 1218 -10f30 4 1640 1218 -10f34 5 1642 1218 -10f39 2 1644 1218 -10f3b 4 1645 1218 -10f3f 8 1646 1218 -10f47 5 1647 1218 -10f4c 6 1648 1218 -10f52 1 1649 1218 -10f53 4 1648 1218 -10f57 6 1650 1218 -10f5d a 2201 1218 -10f67 7 2204 1218 -10f6e 6 2205 1218 -10f74 4 2207 1218 -10f78 2 2208 1218 -10f7a 4 2210 1218 -10f7e 4 2212 1218 -10f82 2 2213 1218 -10f84 4 2215 1218 -10f88 4 2217 1218 -10f8c 7 2218 1218 -10f93 9 2224 1218 -10f9c 6 2228 1218 -10fa2 11 2230 1218 -10fb3 11 2234 1218 -10fc4 d 2236 1218 -10fd1 f 2238 1218 -10fe0 d 2243 1218 -10fed 3 2249 1218 -10ff0 3 2250 1218 -10ff3 1e 2252 1218 -11011 9 2253 1218 -1101a 18 2257 1218 -11032 2 1690 1218 -11034 4 2254 1218 -11038 2 2259 1218 -1103a d 2260 1218 -11047 c 2290 1218 -11053 f 2292 1218 -11062 6 2297 1218 -11068 8 2298 1218 -11070 1b 2299 1218 -1108b 17 1125 1218 -110a2 2 1690 1218 -110a4 f 2310 1218 -110b3 10 2376 1218 -110c3 39 2377 1218 -FUNC 110fc 129 10 _validate_param_reuseA -110fc 3 606 1271 -110ff 1c 610 1271 -1111b f 617 1271 -1112a 11 618 1271 -1113b 10 620 1271 -1114b 36 629 1271 -11181 46 632 1271 -111c7 2 633 1271 -111c9 17 639 1271 -111e0 c 645 1271 -111ec 2c 626 1271 -11218 b 614 1271 -11223 2 646 1271 -FUNC 11225 33 0 write_char -11225 0 2433 1271 -11225 a 2434 1271 -1122f 2 2437 1271 -11231 21 2442 1271 -11252 2 2444 1271 -11254 1 2447 1271 -11255 2 2446 1271 -11257 1 2447 1271 -FUNC 11258 24 c write_multi_char -11258 6 2498 1271 -1125e 2 2501 1271 -11260 e 2500 1271 -1126e 5 2501 1271 -11273 7 2499 1271 -1127a 2 2504 1271 -FUNC 1127c 4a 4 write_string -1127c 0 2563 1271 -1127c 12 2564 1271 -1128e 6 2566 1271 -11294 2 2567 1271 -11296 e 2570 1271 -112a4 5 2571 1271 -112a9 a 2573 1271 -112b3 9 2574 1271 -112bc 9 2569 1271 -112c5 1 2579 1271 -FUNC 112c6 10 4 get_crtdouble_arg -112c6 0 2684 1271 -112c6 f 2685 1271 -112d5 1 2686 1271 -FUNC 112d6 f88 10 _output_p_l -112d6 1b 975 1271 -112f1 15 986 1271 -11306 b 1007 1271 -11311 2b 2172 1271 -1133c 2c 1031 1271 -11368 9b 1033 1271 -11403 8 1036 1271 -1140b 3 1038 1271 -1140e 3 1041 1271 -11411 3 1043 1271 -11414 11 1046 1271 -11425 7 1061 1271 -1142c 4 1062 1271 -11430 7 1069 1271 -11437 32 1073 1271 -11469 19 1078 1271 -11482 e 1079 1271 -11490 1a 1082 1271 -114aa 6 1084 1271 -114b0 1b 1087 1271 -114cb 5 1089 1271 -114d0 15 1091 1271 -114e5 3 1093 1271 -114e8 2 1095 1271 -114ea 6 1097 1271 -114f0 5 1101 1271 -114f5 c 1103 1271 -11501 7 1104 1271 -11508 e 1106 1271 -11516 1a 1109 1271 -11530 8 1112 1271 -11538 f 1131 1271 -11547 9 1120 1271 -11550 b 1131 1271 -1155b 21 1137 1271 -1157c 5 1145 1271 -11581 16 1173 1271 -11597 3 1174 1271 -1159a 5 1175 1271 -1159f 1f 1179 1271 -115be 7 1193 1271 -115c5 5 1194 1271 -115ca 7 1181 1271 -115d1 5 1182 1271 -115d6 6 1184 1271 -115dc 5 1185 1271 -115e1 a 1190 1271 -115eb 5 1191 1271 -115f0 7 1187 1271 -115f7 5 1196 1271 -115fc 9 1200 1271 -11605 5 1203 1271 -1160a a 1206 1271 -11614 2 1209 1271 -11616 c 1211 1271 -11622 7 1212 1271 -11629 b 1214 1271 -11634 1b 1216 1271 -1164f 8 1219 1271 -11657 12 1221 1271 -11669 9 1274 1271 -11672 5 1275 1271 -11677 c 1228 1271 -11683 b 1233 1271 -1168e 7 1235 1271 -11695 3 1236 1271 -11698 5 1239 1271 -1169d 10 1241 1271 -116ad 5 1243 1271 -116b2 3 1248 1271 -116b5 5 1249 1271 -116ba 5 1253 1271 -116bf 5 1256 1271 -116c4 a 1259 1271 -116ce 2 1262 1271 -116d0 c 1264 1271 -116dc 7 1265 1271 -116e3 f 1267 1271 -116f2 c 1280 1271 -116fe b 1284 1271 -11709 4 1285 1271 -1170d 5 1287 1271 -11712 1c 1274 1271 -1172e 10 1289 1271 -1173e 5 1291 1271 -11743 18 1295 1271 -1175b a 1362 1271 -11765 5 1363 1271 -1176a 5 1301 1271 -1176f 1 1303 1271 -11770 d 1304 1271 -1177d 5 1306 1271 -11782 7 1308 1271 -11789 5 1310 1271 -1178e 7 1358 1271 -11795 5 1359 1271 -1179a c 1322 1271 -117a6 2 1324 1271 -117a8 12 1325 1271 -117ba a 1327 1271 -117c4 2 1329 1271 -117c6 d 1330 1271 -117d3 5 1332 1271 -117d8 18 1337 1271 -117f0 3 1352 1271 -117f3 13 1158 1271 -11806 11 1160 1271 -11817 8 1161 1271 -1181f 8 1163 1271 -11827 b 1166 1271 -11832 5 1167 1271 -11837 a 1342 1271 -11841 5 1366 1271 -11846 39 1378 1271 -1187f 9 1716 1271 -11888 7 1724 1271 -1188f 12 1726 1271 -118a1 a 1728 1271 -118ab 27 1739 1271 -118d2 b 1381 1271 -118dd c 1385 1271 -118e9 b 1561 1271 -118f4 a 1562 1271 -118fe d 1584 1271 -1190b 9 1586 1271 -11914 a 1589 1271 -1191e 5 1592 1271 -11923 25 1378 1271 -11948 b 1442 1271 -11953 5 1445 1271 -11958 b 1448 1271 -11963 2 1451 1271 -11965 a 1453 1271 -1196f 27 1457 1271 -11996 5 1458 1271 -1199b a 1462 1271 -119a5 19 1467 1271 -119be 4 1470 1271 -119c2 3 1471 1271 -119c5 2 1472 1271 -119c7 5 1477 1271 -119cc b 1480 1271 -119d7 2 1483 1271 -119d9 a 1485 1271 -119e3 f 1489 1271 -119f2 a 1494 1271 -119fc 6 1499 1271 -11a02 3 1500 1271 -11a05 9 1503 1271 -11a0e 5 1506 1271 -11a13 5 1520 1271 -11a18 a 1523 1271 -11a22 2 1526 1271 -11a24 a 1528 1271 -11a2e 9 1532 1271 -11a37 6 1533 1271 -11a3d 9 1537 1271 -11a46 b 1541 1271 -11a51 9 1546 1271 -11a5a d 1548 1271 -11a67 3 1549 1271 -11a6a 5 1550 1271 -11a6f 3 1551 1271 -11a72 5 1553 1271 -11a77 8 1543 1271 -11a7f 7 1544 1271 -11a86 5 1557 1271 -11a8b 38 1378 1271 -11ac3 14 1908 1271 -11ad7 f 1910 1271 -11ae6 5 1665 1271 -11aeb a 1668 1271 -11af5 2 1671 1271 -11af7 a 1673 1271 -11b01 25 1677 1271 -11b26 5 1678 1271 -11b2b 9 1682 1271 -11b34 9 1688 1271 -11b3d 9 1702 1271 -11b46 7 1703 1271 -11b4d 2 1704 1271 -11b4f 5 1706 1271 -11b54 3 1708 1271 -11b57 5 1710 1271 -11b5c 7 1864 1271 -11b63 7 1869 1271 -11b6a f 1933 1271 -11b79 9 1936 1271 -11b82 e 1939 1271 -11b90 5 1942 1271 -11b95 1c 1739 1271 -11bb1 21 1109 1271 -11bd2 16 1749 1271 -11be8 9 1750 1271 -11bf1 7 1751 1271 -11bf8 3 1767 1271 -11bfb 5 1806 1271 -11c00 9 1809 1271 -11c09 2 1812 1271 -11c0b 5 1753 1271 -11c10 3 1754 1271 -11c13 a 1756 1271 -11c1d f 1759 1271 -11c2c 2 1760 1271 -11c2e 11 1765 1271 -11c3f a 1818 1271 -11c49 6 1821 1271 -11c4f 16 1822 1271 -11c65 26 1828 1271 -11c8b 16 1838 1271 -11ca1 17 1840 1271 -11cb8 a 1844 1271 -11cc2 17 1846 1271 -11cd9 8 1852 1271 -11ce1 a 1853 1271 -11ceb 3 1854 1271 -11cee 3 1857 1271 -11cf1 5 1859 1271 -11cf6 7 1877 1271 -11cfd 7 1887 1271 -11d04 2 1888 1271 -11d06 1a 1378 1271 -11d20 7 1892 1271 -11d27 14 1897 1271 -11d3b c 1900 1271 -11d47 7 1901 1271 -11d4e 5 1903 1271 -11d53 a 1944 1271 -11d5d 2c 1948 1271 -11d89 5 1949 1271 -11d8e 6 1961 1271 -11d94 3 1964 1271 -11d97 6 1970 1271 -11d9d a 1972 1271 -11da7 2c 1976 1271 -11dd3 5 1977 1271 -11dd8 c 1981 1271 -11de4 5 1987 1271 -11de9 4 2019 1271 -11ded 4 2020 1271 -11df1 5 2023 1271 -11df6 b 2026 1271 -11e01 5 2029 1271 -11e06 a 2031 1271 -11e10 f 2035 1271 -11e1f a 2040 1271 -11e29 2 2045 1271 -11e2b 5 2048 1271 -11e30 b 2051 1271 -11e3b 2 2054 1271 -11e3d a 2056 1271 -11e47 b 2060 1271 -11e52 a 2065 1271 -11e5c 2 2071 1271 -11e5e 4 2074 1271 -11e62 5 2077 1271 -11e67 a 2080 1271 -11e71 2 2083 1271 -11e73 a 2085 1271 -11e7d b 2089 1271 -11e88 a 2094 1271 -11e92 2 2099 1271 -11e94 5 2102 1271 -11e99 a 2105 1271 -11ea3 2 2108 1271 -11ea5 a 2110 1271 -11eaf 38 2114 1271 -11ee7 5 2115 1271 -11eec b 2119 1271 -11ef7 13 2128 1271 -11f0a 7 2129 1271 -11f11 a 2130 1271 -11f1b f 2136 1271 -11f2a 2 2142 1271 -11f2c 6 2148 1271 -11f32 7 2149 1271 -11f39 2 2150 1271 -11f3b 7 2151 1271 -11f42 a 2152 1271 -11f4c 3 2153 1271 -11f4f 6 2157 1271 -11f55 3 2158 1271 -11f58 6 2163 1271 -11f5e 10 2165 1271 -11f6e 10 2166 1271 -11f7e c 2168 1271 -11f8a 3 2170 1271 -11f8d 3 2172 1271 -11f90 2 2173 1271 -11f92 8 2175 1271 -11f9a 1 2176 1271 -11f9b 24 2180 1271 -11fbf 9 2181 1271 -11fc8 1 2182 1271 -11fc9 5 2185 1271 -11fce c 1594 1271 -11fda c 1598 1271 -11fe6 9 1603 1271 -11fef e 1635 1271 -11ffd 4 1636 1271 -12001 8 1637 1271 -12009 8 1639 1271 -12011 1c 1598 1271 -1202d 6 1640 1271 -12033 2 1641 1271 -12035 4 1640 1271 -12039 5 1642 1271 -1203e 2 1644 1271 -12040 5 1645 1271 -12045 8 1646 1271 -1204d 5 1647 1271 -12052 6 1648 1271 -12058 1 1649 1271 -12059 4 1648 1271 -1205d 6 1650 1271 -12063 10 2189 1271 -12073 a 2201 1271 -1207d a 2204 1271 -12087 6 2205 1271 -1208d 4 2207 1271 -12091 2 2208 1271 -12093 4 2210 1271 -12097 4 2212 1271 -1209b 2 2213 1271 -1209d 4 2215 1271 -120a1 4 2217 1271 -120a5 7 2218 1271 -120ac 9 2224 1271 -120b5 4 2228 1271 -120b9 11 2230 1271 -120ca 11 2234 1271 -120db 13 2236 1271 -120ee f 2238 1271 -120fd d 2243 1271 -1210a 3 2249 1271 -1210d 3 2250 1271 -12110 1e 2252 1271 -1212e 9 2253 1271 -12137 18 2257 1271 -1214f 2 2310 1271 -12151 4 2254 1271 -12155 2 2259 1271 -12157 d 2260 1271 -12164 f 2290 1271 -12173 f 2292 1271 -12182 6 2297 1271 -12188 8 2298 1271 -12190 15 2299 1271 -121a5 2 1073 1271 -121a7 f 2310 1271 -121b6 b 2314 1271 -121c1 10 2319 1271 -121d1 1d 2321 1271 -121ee 2 2360 1271 -121f0 3 2361 1271 -121f3 2 2362 1271 -121f5 2 2324 1271 -121f7 f 2325 1271 -12206 10 1043 1271 -12216 10 2376 1271 -12226 38 2377 1271 -FUNC 1225e c2 4 _putwch_nolock -1225e 11 84 4721 -1226f a 89 4721 -12279 9 91 4721 -12282 5 92 4721 -12287 a 96 4721 -12291 6 97 4721 -12297 16 103 4721 -122ad 14 105 4721 -122c1 6 106 4721 -122c7 1c 123 4721 -122e3 1e 129 4721 -12301 2 131 4721 -12303 4 133 4721 -12307 d 134 4721 -12314 a 110 4721 -1231e 2 113 4721 -FUNC 12320 9b 4 _cputws -12320 c 151 4721 -1232c 5 153 4721 -12331 30 155 4721 -12361 b 157 4721 -1236c 9 158 4721 -12375 3 159 4721 -12378 a 160 4721 -12382 17 162 4721 -12399 4 164 4721 -1239d c 169 4721 -123a9 3 172 4721 -123ac 6 173 4721 -123b2 9 170 4721 -FUNC 123bb 46 4 _putwch -123bb c 49 4721 -123c7 8 52 4721 -123cf 4 53 4721 -123d3 f 55 4721 -123e2 c 58 4721 -123ee 4 62 4721 -123f2 6 63 4721 -123f8 9 59 4721 -FUNC 12401 113 10 _mbtowc_l -12401 8 55 6355 -12409 e 56 6355 -12417 4 61 6355 -1241b 7 64 6355 -12422 3 65 6355 -12425 4 59 6355 -12429 2 116 6355 -1242b b 70 6355 -12436 8 73 6355 -1243e 7 75 6355 -12445 7 76 6355 -1244c 11 77 6355 -1245d 13 80 6355 -12470 33 90 6355 -124a3 10 93 6355 -124b3 1b 99 6355 -124ce b 95 6355 -124d9 14 96 6355 -124ed 25 108 6355 -12512 2 111 6355 -FUNC 12514 17 c mbtowc -12514 0 123 6355 -12514 16 124 6355 -1252a 1 125 6355 -FUNC 1252b 83 10 _lseeki64_nolock -1252b 5 120 4872 -12530 4 126 4872 -12534 1b 134 4872 -1254f b 136 4872 -1255a 6 138 4872 -12560 22 146 4872 -12582 7 148 4872 -12589 2 149 4872 -1258b 19 152 4872 -125a4 8 153 4872 -125ac 2 154 4872 -FUNC 125ae 119 10 _lseeki64 -125ae c 73 4872 -125ba 9 74 4872 -125c3 24 77 4872 -125e7 2f 78 4872 -12616 46 79 4872 -1265c 7 81 4872 -12663 3 82 4872 -12666 9 84 4872 -1266f 1a 85 4872 -12689 2 86 4872 -1268b b 87 4872 -12696 7 88 4872 -1269d 8 89 4872 -126a5 c 93 4872 -126b1 6 97 4872 -126b7 6 98 4872 -126bd a 94 4872 -FUNC 126c7 7d 8 _set_osfhnd -126c7 0 213 4825 -126c7 2e 216 4825 -126f5 e 217 4825 -12703 b 218 4825 -1270e 3 226 4825 -12711 2 227 4825 -12713 3 223 4825 -12716 2 224 4825 -12718 9 220 4825 -12721 5 231 4825 -12726 5 232 4825 -1272b b 234 4825 -12736 8 235 4825 -1273e 5 236 4825 -12743 1 238 4825 -FUNC 12744 81 4 _free_osfhnd -12744 0 263 4825 -12744 38 266 4825 -1277c 9 268 4825 -12785 a 269 4825 -1278f 3 277 4825 -12792 2 278 4825 -12794 3 274 4825 -12797 2 275 4825 -12799 9 271 4825 -127a2 6 282 4825 -127a8 4 283 4825 -127ac b 285 4825 -127b7 7 286 4825 -127be 6 287 4825 -127c4 1 289 4825 -FUNC 127c5 71 4 _get_osfhandle -127c5 0 312 4825 -127c5 1f 313 4825 -127e4 2 318 4825 -127e6 e 314 4825 -127f4 3d 315 4825 -12831 1 318 4825 -12832 3 317 4825 -12835 1 318 4825 -FUNC 12836 a0 4 __lock_fhandle -12836 c 437 4825 -12842 17 438 4825 -12859 7 439 4825 -12860 7 444 4825 -12867 8 446 4825 -1286f 3 447 4825 -12872 5 448 4825 -12877 14 449 4825 -1288b 3 453 4825 -1288e 3 455 4825 -12891 c 457 4825 -1289d 5 462 4825 -128a2 1d 464 4825 -128bf 3 467 4825 -128c2 6 468 4825 -128c8 5 457 4825 -128cd 9 458 4825 -FUNC 128d6 22 4 _unlock_fhandle -128d6 0 489 4825 -128d6 21 490 4825 -128f7 1 491 4825 -FUNC 128f8 19f 0 _alloc_osfhnd -128f8 c 52 4825 -12904 4 53 4825 -12908 5 56 4825 -1290d c 58 4825 -12919 8 59 4825 -12921 8 61 4825 -12929 3 62 4825 -1292c c 71 4825 -12938 f 77 4825 -12947 17 83 4825 -1295e 6 85 4825 -12964 6 89 4825 -1296a 8 90 4825 -12972 6 91 4825 -12978 6 92 4825 -1297e 14 93 4825 -12992 3 99 4825 -12995 2 101 4825 -12997 3 103 4825 -1299a 9 106 4825 -129a3 6 111 4825 -129a9 a 113 4825 -129b3 6 119 4825 -129b9 7 120 4825 -129c0 5 83 4825 -129c5 6 106 4825 -129cb 9 107 4825 -129d4 6 124 4825 -129da 4 126 4825 -129de 3 127 4825 -129e1 19 128 4825 -129fa 6 137 4825 -12a00 6 71 4825 -12a06 12 145 4825 -12a18 9 151 4825 -12a21 7 152 4825 -12a28 c 154 4825 -12a34 4 155 4825 -12a38 3 156 4825 -12a3b 4 157 4825 -12a3f 4 158 4825 -12a43 8 154 4825 -12a4b 6 165 4825 -12a51 19 166 4825 -12a6a b 167 4825 -12a75 4 171 4825 -12a79 c 178 4825 -12a85 3 186 4825 -12a88 6 187 4825 -12a8e 9 179 4825 -FUNC 12a97 115 8 _open_osfhandle -12a97 c 343 4825 -12aa3 5 347 4825 -12aa8 2 351 4825 -12aaa 6 353 4825 -12ab0 3 354 4825 -12ab3 8 356 4825 -12abb 3 357 4825 -12abe 6 359 4825 -12ac4 3 360 4825 -12ac7 9 364 4825 -12ad0 4 365 4825 -12ad4 d 367 4825 -12ae1 3 409 4825 -12ae4 6 410 4825 -12aea 5 372 4825 -12aef 5 373 4825 -12af4 5 374 4825 -12af9 3 375 4825 -12afc f 380 4825 -12b0b b 381 4825 -12b16 7 382 4825 -12b1d 2 383 4825 -12b1f 3 385 4825 -12b22 b 391 4825 -12b2d 3 393 4825 -12b30 1a 395 4825 -12b4a 9 396 4825 -12b53 9 397 4825 -12b5c 7 399 4825 -12b63 c 401 4825 -12b6f 10 409 4825 -12b7f 5 401 4825 -12b84 5 402 4825 -12b89 1b 404 4825 -12ba4 8 406 4825 -FUNC 12bac 11e c _calloc_impl -12bac c 23 5592 -12bb8 9 28 5592 -12bc1 2e 30 5592 -12bef 9 32 5592 -12bf8 4 36 5592 -12bfc 3 37 5592 -12bff 5 41 5592 -12c04 5 43 5592 -12c09 9 46 5592 -12c12 9 50 5592 -12c1b b 52 5592 -12c26 8 56 5592 -12c2e 3 57 5592 -12c31 c 58 5592 -12c3d c 60 5592 -12c49 7 64 5592 -12c50 d 65 5592 -12c5d 4 93 5592 -12c61 11 94 5592 -12c72 c 97 5592 -12c7e f 109 5592 -12c8d b 111 5592 -12c98 6 112 5592 -12c9e 5 113 5592 -12ca3 5 60 5592 -12ca8 9 61 5592 -12cb1 4 100 5592 -12cb5 7 102 5592 -12cbc 6 103 5592 -12cc2 2 105 5592 -12cc4 6 119 5592 -FUNC 12cca 3f 8 calloc -12cca 4 145 5592 -12cce 5 146 5592 -12cd3 14 147 5592 -12ce7 15 149 5592 -12cfc 8 151 5592 -12d04 3 153 5592 -12d07 2 154 5592 -FUNC 12d09 21b 8 realloc -12d09 c 64 5338 -12d15 7 69 5338 -12d1c e 70 5338 -12d2a 7 73 5338 -12d31 7 75 5338 -12d38 5 76 5338 -12d3d d 81 5338 -12d4a 5 88 5338 -12d4f 9 89 5338 -12d58 8 91 5338 -12d60 3 92 5338 -12d63 12 96 5338 -12d75 8 100 5338 -12d7d f 102 5338 -12d8c 5 103 5338 -12d91 e 104 5338 -12d9f 4 107 5338 -12da3 10 108 5338 -12db3 9 110 5338 -12dbc a 111 5338 -12dc6 5 118 5338 -12dcb 4 120 5338 -12dcf 6 121 5338 -12dd5 9 123 5338 -12dde 15 124 5338 -12df3 4 127 5338 -12df7 10 128 5338 -12e07 c 129 5338 -12e13 c 135 5338 -12e1f 6 142 5338 -12e25 4 144 5338 -12e29 1 145 5338 -12e2a 9 147 5338 -12e33 14 148 5338 -12e47 6 135 5338 -12e4d 9 137 5338 -12e56 3 148 5338 -12e59 10 158 5338 -12e69 f 181 5338 -12e78 5 186 5338 -12e7d 5 183 5338 -12e82 11 186 5338 -12e93 2 188 5338 -12e95 8 160 5338 -12e9d 5 170 5338 -12ea2 3 167 5338 -12ea5 2 172 5338 -12ea7 6 174 5338 -12ead 2 155 5338 -12eaf 4 321 5338 -12eb3 1 322 5338 -12eb4 12 323 5338 -12ec6 c 332 5338 -12ed2 b 347 5338 -12edd 5 319 5338 -12ee2 7 327 5338 -12ee9 b 328 5338 -12ef4 2 329 5338 -12ef6 6 356 5338 -12efc 5 349 5338 -12f01 5 350 5338 -12f06 4 334 5338 -12f0a 16 341 5338 -12f20 4 343 5338 -FUNC 12f24 79 c _recalloc -12f24 3 744 5338 -12f27 a 749 5338 -12f31 28 751 5338 -12f59 4 753 5338 -12f5d 9 754 5338 -12f66 b 755 5338 -12f71 b 756 5338 -12f7c a 757 5338 -12f86 10 759 5338 -12f96 5 761 5338 -12f9b 2 762 5338 -FUNC 12f9d 21 0 _get_sbh_threshold -12f9d 0 61 5281 -12f9d 9 64 5281 -12fa6 2 66 5281 -12fa8 1 81 5281 -12fa9 14 69 5281 -12fbd 1 81 5281 -FUNC 12fbe 46 4 _set_amblksiz -12fbe 0 214 5281 -12fbe 2b 216 5281 -12fe9 1 224 5281 -12fea 11 217 5281 -12ffb 5 220 5281 -13000 3 223 5281 -13003 1 224 5281 -FUNC 13004 3c 4 _get_amblksiz -13004 0 243 5281 -13004 27 245 5281 -1302b 1 253 5281 -1302c 8 246 5281 -13034 8 249 5281 -1303c 3 252 5281 -1303f 1 253 5281 -FUNC 13040 48 4 __sbh_heap_init -13040 0 274 5281 -13040 1c 275 5281 -1305c 1 285 5281 -1305d 4 278 5281 -13061 7 280 5281 -13068 c 281 5281 -13074 13 284 5281 -13087 1 285 5281 -FUNC 13088 2b 4 __sbh_find_block -13088 0 306 5281 -13088 12 307 5281 -1309a 7 316 5281 -130a1 8 317 5281 -130a9 3 319 5281 -130ac 4 314 5281 -130b0 2 321 5281 -130b2 1 322 5281 -FUNC 130b3 314 8 __sbh_free_block -130b3 6 381 5281 -130b9 7 399 5281 -130c0 9 402 5281 -130c9 18 407 5281 -130e1 3 408 5281 -130e4 d 412 5281 -130f1 3 416 5281 -130f4 5 417 5281 -130f9 6 420 5281 -130ff b 424 5281 -1310a 4 429 5281 -1310e 5 430 5281 -13113 3 431 5281 -13116 8 434 5281 -1311e 3 439 5281 -13121 b 441 5281 -1312c e 442 5281 -1313a 5 443 5281 -1313f 2 445 5281 -13141 5 448 5281 -13146 11 449 5281 -13157 9 450 5281 -13160 9 455 5281 -13169 15 459 5281 -1317e 6 463 5281 -13184 5 464 5281 -13189 3 465 5281 -1318c f 468 5281 -1319b 3 474 5281 -1319e 6 477 5281 -131a4 b 478 5281 -131af 2 479 5281 -131b1 3 483 5281 -131b4 6 484 5281 -131ba 7 485 5281 -131c1 2 486 5281 -131c3 4 489 5281 -131c7 b 493 5281 -131d2 3 498 5281 -131d5 11 501 5281 -131e6 6 502 5281 -131ec 5 503 5281 -131f1 2 505 5281 -131f3 e 508 5281 -13201 6 509 5281 -13207 6 511 5281 -1320d c 516 5281 -13219 c 517 5281 -13225 8 520 5281 -1322d e 524 5281 -1323b 6 528 5281 -13241 3 529 5281 -13244 6 530 5281 -1324a 3 531 5281 -1324d 6 532 5281 -13253 8 535 5281 -1325b 18 541 5281 -13273 e 542 5281 -13281 f 543 5281 -13290 2 545 5281 -13292 6 547 5281 -13298 10 548 5281 -132a8 13 550 5281 -132bb 5 556 5281 -132c0 4 558 5281 -132c4 b 561 5281 -132cf d 564 5281 -132dc 6 568 5281 -132e2 1a 569 5281 -132fc 15 573 5281 -13311 16 577 5281 -13327 19 578 5281 -13340 9 579 5281 -13349 6 583 5281 -1334f 8 586 5281 -13357 16 589 5281 -1336d 25 595 5281 -13392 14 599 5281 -133a6 4 600 5281 -133aa a 603 5281 -133b4 8 608 5281 -133bc 9 609 5281 -133c5 2 611 5281 -FUNC 133c7 b0 0 __sbh_alloc_new_region -133c7 0 891 5281 -133c7 13 897 5281 -133da 1e 900 5281 -133f8 4 901 5281 -133fc 12 905 5281 -1340e 9 909 5281 -13417 18 913 5281 -1342f 2 914 5281 -13431 1a 918 5281 -1344b 10 920 5281 -1345b 2 921 5281 -1345d 9 927 5281 -13466 6 930 5281 -1346c 6 933 5281 -13472 4 935 5281 -13476 1 936 5281 -FUNC 13477 106 4 __sbh_alloc_new_group -13477 5 958 5281 -1347c 3 959 5281 -1347f 9 972 5281 -13488 4 973 5281 -1348c 2 976 5281 -1348e 1 977 5281 -1348f 4 974 5281 -13493 15 981 5281 -134a8 c 986 5281 -134b4 1f 993 5281 -134d3 8 994 5281 -134db 6 998 5281 -134e1 12 1001 5281 -134f3 4 1004 5281 -134f7 7 1005 5281 -134fe 8 1011 5281 -13506 10 1013 5281 -13516 12 1016 5281 -13528 3 1001 5281 -1352b 8 1021 5281 -13533 6 1023 5281 -13539 3 1024 5281 -1353c 6 1027 5281 -13542 3 1028 5281 -13545 5 1030 5281 -1354a a 1031 5281 -13554 9 1032 5281 -1355d b 1033 5281 -13568 e 1036 5281 -13576 5 1038 5281 -1357b 2 1039 5281 -FUNC 1357d 2df c __sbh_resize_block -1357d 6 1061 5281 -13583 c 1080 5281 -1358f b 1083 5281 -1359a 3 1084 5281 -1359d 12 1085 5281 -135af 7 1089 5281 -135b6 14 1096 5281 -135ca 13 1099 5281 -135dd 7 1105 5281 -135e4 8 1106 5281 -135ec 6 1107 5281 -135f2 8 1110 5281 -135fa 3 1115 5281 -135fd 9 1117 5281 -13606 11 1118 5281 -13617 5 1119 5281 -1361c 2 1121 5281 -1361e 5 1124 5281 -13623 14 1125 5281 -13637 6 1126 5281 -1363d 9 1131 5281 -13646 9 1132 5281 -1364f 12 1135 5281 -13661 a 1141 5281 -1366b 9 1142 5281 -13674 3 1143 5281 -13677 9 1147 5281 -13680 6 1148 5281 -13686 6 1149 5281 -1368c 3 1150 5281 -1368f 6 1151 5281 -13695 8 1154 5281 -1369d 18 1160 5281 -136b5 e 1161 5281 -136c3 6 1162 5281 -136c9 2 1164 5281 -136cb 6 1166 5281 -136d1 10 1167 5281 -136e1 13 1169 5281 -136f4 c 1174 5281 -13700 9 1176 5281 -13709 6 1180 5281 -1370f 9 1182 5281 -13718 7 1100 5281 -1371f 6 1186 5281 -13725 3 1189 5281 -13728 d 1195 5281 -13735 7 1198 5281 -1373c b 1199 5281 -13747 3 1200 5281 -1374a a 1203 5281 -13754 7 1208 5281 -1375b 5 1209 5281 -13760 3 1210 5281 -13763 8 1213 5281 -1376b 3 1218 5281 -1376e b 1221 5281 -13779 e 1222 5281 -13787 5 1223 5281 -1378c 2 1225 5281 -1378e 5 1228 5281 -13793 11 1229 5281 -137a4 9 1231 5281 -137ad 9 1236 5281 -137b6 9 1237 5281 -137bf 9 1240 5281 -137c8 4 1241 5281 -137cc 5 1242 5281 -137d1 3 1243 5281 -137d4 6 1249 5281 -137da 3 1250 5281 -137dd 6 1251 5281 -137e3 3 1252 5281 -137e6 6 1253 5281 -137ec 8 1256 5281 -137f4 18 1262 5281 -1380c e 1263 5281 -1381a 6 1264 5281 -13820 2 1266 5281 -13822 6 1268 5281 -13828 10 1269 5281 -13838 13 1271 5281 -1384b 5 1276 5281 -13850 4 1278 5281 -13854 6 1281 5281 -1385a 2 1282 5281 -FUNC 1385c cd 0 __sbh_heapmin -1385c 0 1302 5281 -1385c d 1306 5281 -13869 6 1310 5281 -1386f 17 1311 5281 -13886 15 1314 5281 -1389b 16 1318 5281 -138b1 19 1319 5281 -138ca 9 1320 5281 -138d3 f 1325 5281 -138e2 11 1328 5281 -138f3 28 1333 5281 -1391b 6 1334 5281 -13921 7 1338 5281 -13928 1 1340 5281 -FUNC 13929 2e2 0 __sbh_heap_check -13929 3 1361 5281 -1392c 12 1391 5281 -1393e 8 1393 5281 -13946 16 1398 5281 -1395c 3 1401 5281 -1395f 8 1402 5281 -13967 6 1406 5281 -1396d 9 1407 5281 -13976 c 1408 5281 -13982 3 1409 5281 -13985 3 1410 5281 -13988 6 1411 5281 -1398e 4 1418 5281 -13992 1b 1421 5281 -139ad 9 1424 5281 -139b6 9 1428 5281 -139bf 1c 1438 5281 -139db 2 1445 5281 -139dd 7 1446 5281 -139e4 1 1449 5281 -139e5 c 1452 5281 -139f1 3 1456 5281 -139f4 2 1458 5281 -139f6 6 1462 5281 -139fc 5 1463 5281 -13a01 3 1464 5281 -13a04 9 1465 5281 -13a0d 1e 1470 5281 -13a2b c 1475 5281 -13a37 2 1479 5281 -13a39 4 1481 5281 -13a3d 6 1484 5281 -13a43 10 1488 5281 -13a53 e 1492 5281 -13a61 2 1498 5281 -13a63 4 1502 5281 -13a67 20 1505 5281 -13a87 19 1509 5281 -13aa0 8 1514 5281 -13aa8 3 1518 5281 -13aab 6 1520 5281 -13ab1 8 1524 5281 -13ab9 4 1527 5281 -13abd e 1532 5281 -13acb 8 1536 5281 -13ad3 6 1541 5281 -13ad9 5 1542 5281 -13ade 3 1543 5281 -13ae1 8 1544 5281 -13ae9 c 1549 5281 -13af5 11 1554 5281 -13b06 6 1559 5281 -13b0c 3 1561 5281 -13b0f e 1563 5281 -13b1d 3 1564 5281 -13b20 2 1566 5281 -13b22 8 1568 5281 -13b2a 3 1569 5281 -13b2d 1c 1575 5281 -13b49 c 1580 5281 -13b55 10 1585 5281 -13b65 17 1591 5281 -13b7c 7 1595 5281 -13b83 7 1596 5281 -13b8a 16 1597 5281 -13ba0 f 1602 5281 -13baf 18 1606 5281 -13bc7 5 1608 5281 -13bcc 2 1609 5281 -13bce 4 1403 5281 -13bd2 4 1425 5281 -13bd6 4 1453 5281 -13bda 4 1485 5281 -13bde 4 1471 5281 -13be2 4 1439 5281 -13be6 4 1493 5281 -13bea 4 1537 5281 -13bee 4 1545 5281 -13bf2 4 1550 5281 -13bf6 4 1510 5281 -13bfa 4 1581 5281 -13bfe 4 1576 5281 -13c02 4 1592 5281 -13c06 5 1603 5281 -FUNC 13c0b a8 4 _set_sbh_threshold -13c0b 1 102 5281 -13c0c a 104 5281 -13c16 3 106 5281 -13c19 1 195 5281 -13c1a a 109 5281 -13c24 25 112 5281 -13c49 5 113 5281 -13c4e 4 114 5281 -13c52 2 195 5281 -13c54 6 173 5281 -13c5a 2 175 5281 -13c5c 5 179 5281 -13c61 2d 185 5281 -13c8e 6 186 5281 -13c94 a 187 5281 -13c9e 5 188 5281 -13ca3 b 193 5281 -13cae 4 194 5281 -13cb2 1 195 5281 -FUNC 13cb3 2e3 4 __sbh_alloc_block -13cb3 6 632 5281 -13cb9 5 633 5281 -13cbe 15 650 5281 -13cd3 5 668 5281 -13cd8 7 669 5281 -13cdf 5 671 5281 -13ce4 4 672 5281 -13ce8 2 674 5281 -13cea d 677 5281 -13cf7 a 682 5281 -13d01 e 686 5281 -13d0f 3 688 5281 -13d12 2 683 5281 -13d14 5 688 5281 -13d19 4 692 5281 -13d1d 8 694 5281 -13d25 e 698 5281 -13d33 3 700 5281 -13d36 2 695 5281 -13d38 5 700 5281 -13d3d 6 705 5281 -13d43 6 709 5281 -13d49 6 711 5281 -13d4f 4 707 5281 -13d53 4 715 5281 -13d57 8 717 5281 -13d5f 6 720 5281 -13d65 3 722 5281 -13d68 2 718 5281 -13d6a 5 722 5281 -13d6f 4 726 5281 -13d73 e 727 5281 -13d81 7 728 5281 -13d88 12 733 5281 -13d9a 2 734 5281 -13d9c 6 737 5281 -13da2 3 739 5281 -13da5 2 740 5281 -13da7 1c 745 5281 -13dc3 4 749 5281 -13dc7 14 751 5281 -13ddb e 752 5281 -13de9 3 751 5281 -13dec 12 754 5281 -13dfe a 760 5281 -13e08 d 763 5281 -13e15 2 768 5281 -13e17 2 767 5281 -13e19 1 768 5281 -13e1a 4 765 5281 -13e1e 7 770 5281 -13e25 5 775 5281 -13e2a 6 776 5281 -13e30 8 777 5281 -13e38 3 778 5281 -13e3b 8 781 5281 -13e43 8 784 5281 -13e4b 3 788 5281 -13e4e e 791 5281 -13e5c 15 792 5281 -13e71 8 793 5281 -13e79 2 795 5281 -13e7b f 798 5281 -13e8a f 799 5281 -13e99 e 800 5281 -13ea7 1c 809 5281 -13ec3 6 813 5281 -13ec9 3 814 5281 -13ecc 6 815 5281 -13ed2 3 816 5281 -13ed5 6 817 5281 -13edb 8 820 5281 -13ee3 18 826 5281 -13efb b 827 5281 -13f06 10 829 5281 -13f16 2 831 5281 -13f18 6 833 5281 -13f1e d 835 5281 -13f2b 16 837 5281 -13f41 3 831 5281 -13f44 4 844 5281 -13f48 2 846 5281 -13f4a 9 848 5281 -13f53 a 853 5281 -13f5d 4 855 5281 -13f61 e 858 5281 -13f6f 13 862 5281 -13f82 7 863 5281 -13f89 5 866 5281 -13f8e 6 868 5281 -13f94 2 869 5281 -FUNC 13f96 72 4 _fclose_nolock -13f96 2 86 1752 -13f98 2a 90 1752 -13fc2 6 96 1752 -13fc8 6 105 1752 -13fce 8 106 1752 -13fd6 13 108 1752 -13fe9 5 109 1752 -13fee 7 111 1752 -13ff5 7 120 1752 -13ffc 3 121 1752 -13fff 3 126 1752 -14002 5 127 1752 -14007 1 128 1752 -FUNC 14008 7c 4 fclose -14008 c 44 1752 -14014 4 45 1752 -14018 2d 47 1752 -14045 6 50 1752 -1404b 3 51 1752 -1404e 3 64 1752 -14051 6 65 1752 -14057 7 55 1752 -1405e 3 56 1752 -14061 a 57 1752 -1406b 11 59 1752 -1407c 8 60 1752 -FUNC 14084 d 8 _ValidateRead(void const *,unsigned int) -14084 0 63 5683 -14084 3 64 5683 -14087 7 65 5683 -1408e 2 68 5683 -14090 1 71 5683 -FUNC 14091 d 8 _ValidateWrite(void *,unsigned int) -14091 0 74 5683 -14091 3 75 5683 -14094 7 76 5683 -1409b 2 79 5683 -1409d 1 82 5683 -FUNC 1409e d 4 _ValidateExecute(int (*)(void)) -1409e 0 85 5683 -1409e 3 86 5683 -140a1 7 87 5683 -140a8 2 90 5683 -140aa 1 93 5683 -FUNC 140ab f3 0 abort -140ab 1b 53 4119 -140c6 a 56 4119 -140d0 8 59 4119 -140d8 5 68 4119 -140dd 4 69 4119 -140e1 8 71 4119 -140e9 d 78 4119 -140f6 6 87 4119 -140fc 6 88 4119 -14102 6 89 4119 -14108 3 90 4119 -1410b 3 91 4119 -1410e 3 92 4119 -14111 7 93 4119 -14118 7 94 4119 -1411f 4 95 4119 -14123 4 96 4119 -14127 4 97 4119 -1412b 4 98 4119 -1412f 1 99 4119 -14130 6 100 4119 -14136 6 106 4119 -1413c 19 107 4119 -14155 3 109 4119 -14158 13 117 4119 -1416b 9 122 4119 -14174 3 123 4119 -14177 15 126 4119 -1418c a 128 4119 -14196 8 137 4119 -FUNC 1419e 1e 8 _set_abort_behavior -1419e 0 158 4119 -1419e 1d 160 4119 -141bb 1 162 4119 -FUNC 141bc 20 0 _global_unwind2 -FUNC 141dc 45 0 __unwind_handler -FUNC 14221 84 0 _local_unwind2 -FUNC 142a5 23 0 _abnormal_termination -FUNC 142c8 9 0 _NLG_Notify1 -FUNC 142d1 1f 0 _NLG_Notify -PUBLIC 142e8 0 _NLG_Dispatch2 -FUNC 142f0 3 0 _NLG_Call -PUBLIC 142f2 0 _NLG_Return2 -FUNC 142f3 a3 4 _msize -142f3 c 43 5383 -142ff 2d 47 5383 -1432c 9 51 5383 -14335 8 55 5383 -1433d 3 56 5383 -14340 e 57 5383 -1434e e 59 5383 -1435c c 61 5383 -14368 5 64 5383 -1436d 10 88 5383 -1437d 2 91 5383 -1437f 6 93 5383 -14385 8 61 5383 -1438d 9 62 5383 -FUNC 14396 6 0 HeapManager::Block::Block() -14396 6 90 5771 -FUNC 1439c 1b 8 HeapManager::Constructor(void * (*)(unsigned int),void (*)(void *)) -1439c 6 100 5771 -143a2 7 101 5771 -143a9 5 102 5771 -143ae 3 103 5771 -143b1 3 104 5771 -143b4 3 105 5771 -FUNC 143b7 26 0 HeapManager::Destructor() -143b7 9 110 5771 -143c0 2 111 5771 -143c2 5 113 5771 -143c7 15 115 5771 -143dc 1 118 5771 -FUNC 143dd 63 0 UnDecorator::getNumberOfDimensions() -143dd 0 1663 5771 -143dd c 1664 5771 -143e9 2 1665 5771 -143eb 1 1696 5771 -143ec a 1666 5771 -143f6 d 1667 5771 -14403 1 1696 5771 -14404 4 1670 5771 -14408 4 1677 5771 -1440c a 1679 5771 -14416 6 1680 5771 -1441c d 1684 5771 -14429 5 1675 5771 -1442e e 1690 5771 -1443c 3 1691 5771 -1443f 1 1696 5771 -FUNC 14440 474 0 UnDecorator::getTypeEncoding() -14440 f 2335 5771 -1444f 2 2336 5771 -14451 5 2341 5771 -14456 9 2345 5771 -1445f c 2351 5771 -1446b 9 2423 5771 -14474 2 2426 5771 -14476 2a 2427 5771 -144a0 8 2450 5771 -144a8 2 2451 5771 -144aa 24 2454 5771 -144ce 7 2462 5771 -144d5 5 2463 5771 -144da 6 2353 5771 -144e0 8 2358 5771 -144e8 b 2362 5771 -144f3 5 2363 5771 -144f8 2 2364 5771 -144fa 5 2365 5771 -144ff 9 2369 5771 -14508 1b 2373 5771 -14523 11 2377 5771 -14534 a 2393 5771 -1453e 10 2388 5771 -1454e 2 2389 5771 -14550 18 2384 5771 -14568 2 2385 5771 -1456a 12 2380 5771 -1457c 16 2399 5771 -14592 11 2418 5771 -145a3 a 2406 5771 -145ad 5 2407 5771 -145b2 15 2410 5771 -145c7 5 2422 5771 -145cc 1b 2427 5771 -145e7 a 2430 5771 -145f1 5 2431 5771 -145f6 7 2472 5771 -145fd a 2478 5771 -14607 c 2483 5771 -14613 5 2485 5771 -14618 5 2486 5771 -1461d 5 2487 5771 -14622 5 2490 5771 -14627 5 2505 5771 -1462c 5 2508 5771 -14631 5 2509 5771 -14636 5 2434 5771 -1463b 5 2435 5771 -14640 1a 2427 5771 -1465a 30 2568 5771 -1468a 5 2529 5771 -1468f 4 2530 5771 -14693 a 2531 5771 -1469d 2 2532 5771 -1469f a 2533 5771 -146a9 5 2537 5771 -146ae 5 2538 5771 -146b3 2 2539 5771 -146b5 5 2540 5771 -146ba e 2544 5771 -146c8 6 2560 5771 -146ce 10 2555 5771 -146de 2 2556 5771 -146e0 18 2551 5771 -146f8 2 2552 5771 -146fa 12 2547 5771 -1470c 2 2564 5771 -1470e a 2442 5771 -14718 2 2443 5771 -1471a a 2438 5771 -14724 2 2439 5771 -14726 5 2445 5771 -1472b c 2574 5771 -14737 14 2577 5771 -1474b a 2579 5771 -14755 18 2586 5771 -1476d 1a 2589 5771 -14787 1b 2590 5771 -147a2 5 2591 5771 -147a7 1a 2594 5771 -147c1 1b 2595 5771 -147dc 5 2596 5771 -147e1 1a 2599 5771 -147fb 10 2600 5771 -1480b 2 2601 5771 -1480d 7 2604 5771 -14814 2 2605 5771 -14816 a 2608 5771 -14820 2 2609 5771 -14822 a 2612 5771 -1482c 2 2613 5771 -1482e a 2616 5771 -14838 2 2617 5771 -1483a a 2620 5771 -14844 2 2621 5771 -14846 a 2624 5771 -14850 7 2634 5771 -14857 7 2635 5771 -1485e 7 2637 5771 -14865 10 2639 5771 -14875 3f 2648 5771 -FUNC 148b4 b 0 UnDecorator::doUnderScore() -148b4 b 4259 5771 -FUNC 148bf d 0 UnDecorator::doMSKeywords() -148bf d 4260 5771 -FUNC 148cc e 0 UnDecorator::doPtr64() -148cc e 4261 5771 -FUNC 148da e 0 UnDecorator::doFunctionReturns() -148da e 4262 5771 -FUNC 148e8 e 0 UnDecorator::doAllocationModel() -148e8 e 4263 5771 -FUNC 148f6 e 0 UnDecorator::doAllocationLanguage() -148f6 e 4264 5771 -FUNC 14904 12 0 UnDecorator::doThisTypes() -14904 12 4271 5771 -FUNC 14916 e 0 UnDecorator::doAccessSpecifiers() -14916 e 4272 5771 -FUNC 14924 e 0 UnDecorator::doThrowTypes() -14924 e 4273 5771 -FUNC 14932 e 0 UnDecorator::doMemberTypes() -14932 e 4274 5771 -FUNC 14940 b 0 UnDecorator::doNameOnly() -14940 b 4279 5771 -FUNC 1494b b 0 UnDecorator::doTypeOnly() -1494b b 4280 5771 -FUNC 14956 b 0 UnDecorator::haveTemplateParameters() -14956 b 4281 5771 -FUNC 14961 e 0 UnDecorator::doEcsu() -14961 e 4282 5771 -FUNC 1496f b 0 UnDecorator::doNoIdentCharCheck() -1496f b 4283 5771 -FUNC 1497a e 0 UnDecorator::doEllipsis() -1497a e 4284 5771 -FUNC 14988 19 4 UnDecorator::UScore(Tokens) -14988 0 4288 5771 -14988 9 4293 5771 -14991 d 4294 5771 -1499e 2 4296 5771 -149a0 1 4298 5771 -FUNC 149a1 84 8 HeapManager::getMemory(unsigned int,int) -149a1 2 134 5804 -149a3 a 137 5804 -149ad 9 139 5804 -149b6 6 140 5804 -149bc 4 146 5804 -149c0 3 147 5804 -149c3 8 149 5804 -149cb 7 153 5804 -149d2 2 154 5804 -149d4 1c 159 5804 -149f0 4 164 5804 -149f4 7 168 5804 -149fb 2 169 5804 -149fd 2 170 5804 -149ff 3 171 5804 -14a02 8 175 5804 -14a0a 2 182 5804 -14a0c 4 179 5804 -14a10 5 183 5804 -14a15 d 187 5804 -14a22 3 190 5804 -FUNC 14a25 d 0 DName::DName() -14a25 2 210 5804 -14a27 3 211 5804 -14a2a 7 220 5804 -14a31 1 221 5804 -FUNC 14a32 12 4 DName::DName(DNameNode *) -14a32 2 224 5804 -14a34 4 225 5804 -14a38 9 234 5804 -14a41 3 235 5804 -FUNC 14a44 9c 4 DName::DName(DName const &) -14a44 2 259 5804 -14a46 17 260 5804 -14a5d 10 261 5804 -14a6d d 262 5804 -14a7a d 263 5804 -14a87 10 264 5804 -14a97 4 265 5804 -14a9b e 266 5804 -14aa9 13 267 5804 -14abc 10 268 5804 -14acc 11 269 5804 -14add 3 270 5804 -FUNC 14ae0 a 0 DName::status() -14ae0 a 481 5804 -FUNC 14aea 5 0 DName::clearStatus() -14aea 5 482 5804 -FUNC 14aef 7 0 DName::setPtrRef() -14aef 7 484 5804 -FUNC 14af6 a 0 DName::isPtrRef() -14af6 a 485 5804 -FUNC 14b00 8 0 DName::setIsArray() -14b00 8 490 5804 -FUNC 14b08 a 0 DName::isArray() -14b08 a 491 5804 -FUNC 14b12 a 0 DName::isNoTE() -14b12 a 492 5804 -FUNC 14b1c 8 0 DName::setIsNoTE() -14b1c 8 493 5804 -FUNC 14b24 a 0 DName::isPinPtr() -14b24 a 494 5804 -FUNC 14b2e 8 0 DName::setIsPinPtr() -14b2e 8 495 5804 -FUNC 14b36 a 0 DName::isComArray() -14b36 a 496 5804 -FUNC 14b40 8 0 DName::setIsComArray() -14b40 8 497 5804 -FUNC 14b48 a 0 DName::isVCallThunk() -14b48 a 498 5804 -FUNC 14b52 8 0 DName::setIsVCallThunk() -14b52 8 499 5804 -FUNC 14b5a 7b 4 DName::operator=(DName const &) -14b5a 3 879 5804 -14b5d 12 880 5804 -14b6f 17 882 5804 -14b86 d 883 5804 -14b93 d 884 5804 -14ba0 d 885 5804 -14bad 10 886 5804 -14bbd 10 887 5804 -14bcd 5 889 5804 -14bd2 3 897 5804 -FUNC 14bd5 9 0 Replicator::isFull() -14bd5 9 1001 5804 -FUNC 14bde 25 4 Replicator::operator[](int) -14bde 0 1028 5804 -14bde 9 1029 5804 -14be7 b 1031 5804 -14bf2 6 1034 5804 -14bf8 5 1032 5804 -14bfd 3 1030 5804 -14c00 3 1036 5804 -FUNC 14c03 d 0 DNameNode::DNameNode() -14c03 d 1048 5804 -FUNC 14c10 4 0 DNameNode::nextNode() -14c10 4 1052 5804 -FUNC 14c14 29 4 DNameNode::operator+=(DNameNode *) -14c14 2 1131 5804 -14c16 8 1132 5804 -14c1e 8 1134 5804 -14c26 b 1139 5804 -14c31 4 1144 5804 -14c35 2 1147 5804 -14c37 3 1148 5804 -14c3a 3 1156 5804 -FUNC 14c3d 16 4 charNode::charNode(char) -14c3d 16 1166 5804 -FUNC 14c53 4 0 charNode::length() -14c53 4 1168 5804 -FUNC 14c57 4 0 charNode::getLastChar() -14c57 4 1170 5804 -FUNC 14c5b 1b 8 charNode::getString(char *,int) -14c5b 0 1173 5804 -14c5b f 1174 5804 -14c6a 5 1175 5804 -14c6f 2 1176 5804 -14c71 2 1177 5804 -14c73 3 1183 5804 -FUNC 14c76 4 0 pcharNode::length() -14c76 4 1189 5804 -FUNC 14c7a 2f 4 pDNameNode::pDNameNode(DName *) -14c7a 2f 1244 5804 -FUNC 14ca9 25 4 DNameStatusNode::DNameStatusNode(DNameStatus) -14ca9 25 1261 5804 -FUNC 14cce 4 0 DNameStatusNode::length() -14cce 4 1263 5804 -FUNC 14cd2 d 0 DNameStatusNode::getLastChar() -14cd2 d 1266 5804 -FUNC 14cdf e 0 und_strlen -14cdf 0 1283 5804 -14cdf 6 1286 5804 -14ce5 7 1287 5804 -14cec 1 1291 5804 -FUNC 14ced 20 8 und_strncpy -14ced 0 1295 5804 -14ced 1b 1296 5804 -14d08 4 1299 5804 -14d0c 1 1301 5804 -FUNC 14d0d 25 4 und_strncmp -14d0d 0 1304 5804 -14d0d 7 1305 5804 -14d14 2 1306 5804 -14d16 1 1315 5804 -14d17 a 1308 5804 -14d21 1 1310 5804 -14d22 1 1311 5804 -14d23 6 1308 5804 -14d29 8 1314 5804 -14d31 1 1315 5804 -FUNC 14d32 33 0 UnDecorator::getDataIndirectType() -14d32 33 4033 5771 -FUNC 14d65 34 0 UnDecorator::getThisType() -14d65 34 4034 5771 -FUNC 14d99 13 c operator new(unsigned int,HeapManager &,int) -14d99 13 131 5804 -FUNC 14dac 56 4 DName::DName(DName *) -14dac 0 274 5804 -14dac a 275 5804 -14db6 23 277 5804 -14dd9 13 278 5804 -14dec 2 281 5804 -14dee 4 283 5804 -14df2 3 284 5804 -14df5 7 295 5804 -14dfc 6 296 5804 -FUNC 14e02 61 4 DName::DName(DNameStatus) -14e02 2 457 5804 -14e04 21 458 5804 -14e25 1e 459 5804 -14e43 7 467 5804 -14e4a 9 469 5804 -14e53 a 470 5804 -14e5d 6 472 5804 -FUNC 14e63 17 0 DName::isValid() -14e63 17 478 5804 -FUNC 14e7a 15 0 DName::isEmpty() -14e7a 15 479 5804 -FUNC 14e8f 14 0 DName::isUDC() -14e8f 14 486 5804 -FUNC 14ea3 e 0 DName::setIsUDC() -14ea3 e 487 5804 -FUNC 14eb1 14 0 DName::isUDTThunk() -14eb1 14 488 5804 -FUNC 14ec5 25 0 DName::length() -14ec5 1 502 5804 -14ec6 2 503 5804 -14ec8 a 506 5804 -14ed2 4 507 5804 -14ed6 b 508 5804 -14ee1 5 507 5804 -14ee6 3 510 5804 -14ee9 1 512 5804 -FUNC 14eea 38 0 DName::getLastChar() -14eea 2 516 5804 -14eec 2 517 5804 -14eee 9 519 5804 -14ef7 6 520 5804 -14efd a 521 5804 -14f07 2 522 5804 -14f09 7 520 5804 -14f10 11 524 5804 -14f21 1 526 5804 -FUNC 14f22 91 8 DName::getString(char *,int) -14f22 7 530 5804 -14f29 9 531 5804 -14f32 5 535 5804 -14f37 7 537 5804 -14f3e e 538 5804 -14f4c c 544 5804 -14f58 d 550 5804 -14f65 4 553 5804 -14f69 8 555 5804 -14f71 4 561 5804 -14f75 6 565 5804 -14f7b 2 566 5804 -14f7d b 570 5804 -14f88 4 574 5804 -14f8c 2 578 5804 -14f8e 3 579 5804 -14f91 3 586 5804 -14f94 4 553 5804 -14f98 4 590 5804 -14f9c 2 593 5804 -14f9e 6 594 5804 -14fa4 6 595 5804 -14faa 5 599 5804 -14faf 4 601 5804 -FUNC 14fb3 35 4 DName::operator|=(DName const &) -14fb3 3 832 5804 -14fb6 19 835 5804 -14fcf 13 836 5804 -14fe2 3 840 5804 -14fe5 3 842 5804 -FUNC 14fe8 81 4 DName::operator=(DNameStatus) -14fe8 2 928 5804 -14fea 10 929 5804 -14ffa 12 937 5804 -1500c 26 945 5804 -15032 6 947 5804 -15038 e 948 5804 -15046 10 933 5804 -15056 d 934 5804 -15063 3 954 5804 -15066 3 956 5804 -FUNC 15069 1e 0 Replicator::Replicator() -15069 1e 1004 5804 -FUNC 15087 47 4 Replicator::operator+=(DName const &) -15087 3 1009 5804 -1508a 12 1010 5804 -1509c 20 1012 5804 -150bc 4 1017 5804 -150c0 8 1018 5804 -150c8 3 1022 5804 -150cb 3 1024 5804 -FUNC 150ce 47 0 DNameNode::clone() -150ce 3 1055 5804 -150d1 43 1056 5804 -15114 1 1057 5804 -FUNC 15115 65 8 pcharNode::pcharNode(char const *,int) -15115 1 1197 5804 -15116 1f 1200 5804 -15135 c 1201 5804 -15141 8 1205 5804 -15149 c 1207 5804 -15155 a 1210 5804 -1515f b 1211 5804 -1516a 2 1214 5804 -1516c 3 1216 5804 -1516f 4 1217 5804 -15173 7 1220 5804 -FUNC 1517a 12 0 pcharNode::getLastChar() -1517a 12 1191 5804 -FUNC 1518c 31 8 pcharNode::getString(char *,int) -1518c 0 1224 5804 -1518c b 1227 5804 -15197 2 1228 5804 -15199 21 1232 5804 -151ba 3 1234 5804 -FUNC 151bd f 0 pDNameNode::length() -151bd f 1246 5804 -FUNC 151cc f 0 pDNameNode::getLastChar() -151cc f 1248 5804 -FUNC 151db 1d 8 pDNameNode::getString(char *,int) -151db 1d 1251 5804 -FUNC 151f8 33 8 DNameStatusNode::getString(char *,int) -151f8 0 1269 5804 -151f8 b 1272 5804 -15203 2 1273 5804 -15205 23 1277 5804 -15228 3 1279 5804 -FUNC 1522b 73 14 UnDecorator::UnDecorator(char *,char const *,int,char * (*)(long),unsigned long) -1522b 16 736 5771 -15241 8 737 5771 -15249 5 738 5771 -1524e 9 740 5771 -15257 a 741 5771 -15261 5 745 5771 -15266 2 747 5771 -15268 6 748 5771 -1526e 6 749 5771 -15274 8 754 5771 -1527c 15 755 5771 -15291 d 758 5771 -FUNC 1529e 2f 4 UnDecorator::getReturnType(DName *) -1529e 3 2906 5771 -152a1 8 2907 5771 -152a9 15 2911 5771 -152be d 2915 5771 -152cb 2 2917 5771 -FUNC 152cd f 0 UnDecorator::getStorageConvention() -152cd f 4032 5771 -FUNC 152dc 79 4 DName::operator+=(DNameStatus) -152dc 4 799 5804 -152e0 17 800 5804 -152f7 20 804 5804 -15317 4 807 5804 -1531b 7 809 5804 -15322 6 811 5804 -15328 8 812 5804 -15330 2 815 5804 -15332 3 816 5804 -15335 5 818 5804 -1533a e 819 5804 -15348 7 801 5804 -1534f 3 825 5804 -15352 3 827 5804 -FUNC 15355 68 4 DName::operator=(DName *) -15355 3 901 5804 -15358 12 902 5804 -1536a 7 903 5804 -15371 29 911 5804 -1539a 6 913 5804 -153a0 c 914 5804 -153ac 2 917 5804 -153ae 9 918 5804 -153b7 3 922 5804 -153ba 3 924 5804 -FUNC 153bd a6 8 DName::doPchar(char const *,int) -153bd 3 962 5804 -153c0 1e 963 5804 -153de 6 964 5804 -153e4 c 965 5804 -153f0 10 966 5804 -15400 5 970 5804 -15405 23 984 5804 -15428 6 986 5804 -1542e 9 987 5804 -15437 2 988 5804 -15439 1b 977 5804 -15454 c 993 5804 -15460 3 995 5804 -FUNC 15463 26 4 DName::DName(char) -15463 3 238 5804 -15466 3 244 5804 -15469 7 248 5804 -15470 7 252 5804 -15477 c 253 5804 -15483 6 255 5804 -FUNC 15489 31 4 DName::DName(char const *) -15489 0 300 5804 -15489 16 312 5804 -1549f 15 313 5804 -154b4 6 315 5804 -FUNC 154ba d0 8 DName::DName(char const * &,char) -154ba 7 319 5804 -154c1 d 329 5804 -154ce f 333 5804 -154dd 8 334 5804 -154e5 9 342 5804 -154ee 40 343 5804 -1552e b 344 5804 -15539 9 355 5804 -15542 8 359 5804 -1554a 8 361 5804 -15552 9 363 5804 -1555b 3 364 5804 -1555e 2 367 5804 -15560 3 347 5804 -15563 a 378 5804 -1556d 8 380 5804 -15575 6 368 5804 -1557b 7 371 5804 -15582 6 372 5804 -15588 2 375 5804 -FUNC 1558a 69 8 DName::DName(unsigned __int64) -1558a 15 384 5804 -1559f 3 390 5804 -155a2 a 398 5804 -155ac 4 402 5804 -155b0 13 406 5804 -155c3 3 407 5804 -155c6 c 409 5804 -155d2 e 411 5804 -155e0 13 413 5804 -FUNC 155f3 96 8 DName::DName(__int64) -155f3 10 416 5804 -15603 26 436 5804 -15629 15 438 5804 -1563e 10 443 5804 -1564e 5 444 5804 -15653 c 446 5804 -1565f 6 448 5804 -15665 4 449 5804 -15669 e 452 5804 -15677 12 453 5804 -FUNC 15689 2e 4 DName::operator+(DNameStatus) -15689 1 675 5804 -1568a c 676 5804 -15696 9 679 5804 -1569f b 680 5804 -156aa 2 681 5804 -156ac 5 682 5804 -156b1 3 686 5804 -156b4 3 688 5804 -FUNC 156b7 62 4 DName::operator+=(DName const &) -156b7 2 739 5804 -156b9 f 740 5804 -156c8 13 741 5804 -156db 2 742 5804 -156dd 9 743 5804 -156e6 6 744 5804 -156ec 2 745 5804 -156ee 7 747 5804 -156f5 6 749 5804 -156fb 9 750 5804 -15704 2 751 5804 -15706 d 752 5804 -15713 3 758 5804 -15716 3 760 5804 -FUNC 15719 8b 4 DName::operator+=(DName *) -15719 2 764 5804 -1571b a 765 5804 -15725 9 766 5804 -1572e 8 767 5804 -15736 10 768 5804 -15746 8 789 5804 -1574e 20 770 5804 -1576e 4 773 5804 -15772 7 775 5804 -15779 6 777 5804 -1577f 8 778 5804 -15787 2 781 5804 -15789 3 782 5804 -1578c 5 784 5804 -15791 d 785 5804 -1579e 3 793 5804 -157a1 3 795 5804 -FUNC 157a4 1c 4 DName::operator=(char) -157a4 1 847 5804 -157a5 15 854 5804 -157ba 3 856 5804 -157bd 3 858 5804 -FUNC 157c0 2a 4 DName::operator=(char const *) -157c0 0 862 5804 -157c0 24 869 5804 -157e4 3 873 5804 -157e7 3 875 5804 -FUNC 157ea a6 0 UnDecorator::getCallingConvention() -157ea 5 2825 5771 -157ef f 2826 5771 -157fe c 2828 5771 -1580a 5 2835 5771 -1580f 1a 2845 5771 -15829 20 2852 5771 -15849 2 2875 5771 -1584b 2 2876 5771 -1584d 2 2871 5771 -1584f 2 2872 5771 -15851 2 2867 5771 -15853 2 2868 5771 -15855 2 2863 5771 -15857 2 2864 5771 -15859 1 2859 5771 -1585a 2 2860 5771 -1585c 13 2855 5771 -1586f e 2891 5771 -1587d 4 2895 5771 -15881 d 2899 5771 -1588e 2 2901 5771 -FUNC 15890 37 0 UnDecorator::getVCallThunkType() -15890 3 4057 5771 -15893 9 4059 5771 -1589c 5 4066 5771 -158a1 4 4059 5771 -158a5 4 4066 5771 -158a9 6 4061 5771 -158af c 4062 5771 -158bb a 4064 5771 -158c5 2 4170 5771 -FUNC 158c7 51 4 DName::operator+(DName const &) -158c7 1 639 5804 -158c8 c 640 5804 -158d4 b 643 5804 -158df b 644 5804 -158ea d 645 5804 -158f7 11 646 5804 -15908 2 647 5804 -1590a 8 648 5804 -15912 3 652 5804 -15915 3 654 5804 -FUNC 15918 2e 4 DName::operator+(DName *) -15918 1 658 5804 -15919 c 659 5804 -15925 9 662 5804 -1592e b 663 5804 -15939 2 664 5804 -1593b 5 665 5804 -15940 3 669 5804 -15943 3 671 5804 -FUNC 15946 6a 4 DName::operator+=(char) -15946 1 693 5804 -15947 b 694 5804 -15952 9 695 5804 -1595b 6 696 5804 -15961 2 697 5804 -15963 7 699 5804 -1596a 6 701 5804 -15970 2b 702 5804 -1599b 2 703 5804 -1599d c 704 5804 -159a9 4 710 5804 -159ad 3 712 5804 -FUNC 159b0 6c 4 DName::operator+=(char const *) -159b0 2 716 5804 -159b2 f 717 5804 -159c1 9 718 5804 -159ca 6 719 5804 -159d0 2 720 5804 -159d2 7 722 5804 -159d9 6 724 5804 -159df 28 725 5804 -15a07 2 726 5804 -15a09 d 727 5804 -15a16 3 733 5804 -15a19 3 735 5804 -FUNC 15a1c e0 0 UnDecorator::getArgumentList() -15a1c 7 3076 5771 -15a23 12 3078 5771 -15a35 29 3081 5771 -15a5e 6 3085 5771 -15a64 4 3086 5771 -15a68 2 3087 5771 -15a6a e 3088 5771 -15a78 6 3093 5771 -15a7e 6 3095 5771 -15a84 5 3100 5771 -15a89 1 3102 5771 -15a8a 11 3106 5771 -15a9b 2 3109 5771 -15a9d 16 3116 5771 -15ab3 19 3121 5771 -15acc 9 3122 5771 -15ad5 17 3126 5771 -15aec b 3132 5771 -15af7 3 3141 5771 -15afa 2 3143 5771 -FUNC 15afc 4f 4 UnDecorator::getVdispMapType(DName const &) -15afc 6 4230 5771 -15b02 d 4231 5771 -15b0f c 4232 5771 -15b1b 12 4233 5771 -15b2d 9 4234 5771 -15b36 a 4236 5771 -15b40 6 4237 5771 -15b46 3 4238 5771 -15b49 2 4239 5771 -FUNC 15b4b 22 8 operator+(char,DName const &) -15b4b 22 198 5804 -FUNC 15b6d 22 8 operator+(DNameStatus,DName const &) -15b6d 22 201 5804 -FUNC 15b8f 22 8 operator+(char const *,DName const &) -15b8f 22 204 5804 -FUNC 15bb1 2e 4 DName::operator+(char) -15bb1 1 605 5804 -15bb2 c 606 5804 -15bbe 9 609 5804 -15bc7 b 610 5804 -15bd2 2 611 5804 -15bd4 5 612 5804 -15bd9 3 616 5804 -15bdc 3 618 5804 -FUNC 15bdf 2e 4 DName::operator+(char const *) -15bdf 1 622 5804 -15be0 c 623 5804 -15bec 9 626 5804 -15bf5 b 627 5804 -15c00 2 628 5804 -15c02 5 629 5804 -15c07 3 633 5804 -15c0a 3 635 5804 -FUNC 15c0d 141 4 UnDecorator::getDimension(bool) -15c0d 7 1616 5771 -15c14 10 1618 5771 -15c24 e 1620 5771 -15c32 6 1623 5771 -15c38 f 1624 5771 -15c47 8 1625 5771 -15c4f 47 1626 5771 -15c96 4 1629 5771 -15c9a 4 1636 5771 -15c9e 8 1638 5771 -15ca6 20 1639 5771 -15cc6 d 1643 5771 -15cd3 4 1634 5771 -15cd7 b 1649 5771 -15ce2 2 1650 5771 -15ce4 5 1652 5771 -15ce9 13 1653 5771 -15cfc c 1637 5771 -15d08 4 1641 5771 -15d0c a 1653 5771 -15d16 36 1655 5771 -15d4c 2 1659 5771 -FUNC 15d4e d4 0 UnDecorator::getEnumType() -15d4e 6 2762 5771 -15d54 1a 2766 5771 -15d6e 12 2770 5771 -15d80 5 2774 5771 -15d85 2 2775 5771 -15d87 5 2779 5771 -15d8c 2 2780 5771 -15d8e 5 2786 5771 -15d93 2 2787 5771 -15d95 d 2791 5771 -15da2 1f 2801 5771 -15dc1 1e 2807 5771 -15ddf e 2814 5771 -15ded 4 2795 5771 -15df1 d 2818 5771 -15dfe 24 2820 5771 -FUNC 15e22 c4 0 UnDecorator::getArgumentTypes() -15e22 3 3035 5771 -15e25 18 3036 5771 -15e3d 9 3046 5771 -15e46 7 3051 5771 -15e4d 13 3052 5771 -15e60 c 3064 5771 -15e6c 36 3058 5771 -15ea2 b 3061 5771 -15ead 21 3039 5771 -15ece 16 3042 5771 -15ee4 2 3072 5771 -FUNC 15ee6 7e 0 UnDecorator::getThrowTypes() -15ee6 3 3148 5771 -15ee9 e 3149 5771 -15ef7 2 3150 5771 -15ef9 21 3151 5771 -15f1a 1f 3153 5771 -15f39 29 3155 5771 -15f62 2 3157 5771 -FUNC 15f64 125 c UnDecorator::getExtendedDataIndirectType(char &,bool &,int) -15f64 6 3636 5771 -15f6a 1a 3641 5771 -15f84 1c 3643 5771 -15fa0 a 3669 5771 -15faa 6 3670 5771 -15fb0 b 3672 5771 -15fbb a 3674 5771 -15fc5 21 3675 5771 -15fe6 17 3678 5771 -15ffd a 3680 5771 -16007 6 3689 5771 -1600d 2 3691 5771 -1600f 17 3693 5771 -16026 1e 3700 5771 -16044 6 3663 5771 -1604a 2 3665 5771 -1604c 3 3656 5771 -1604f d 3657 5771 -1605c 2 3659 5771 -1605e 6 3647 5771 -16064 13 3649 5771 -16077 10 3703 5771 -16087 2 3704 5771 -FUNC 16089 15f 4 UnDecorator::getArrayType(DName const &) -16089 3 3986 5771 -1608c 12 3987 5771 -1609e 7 3989 5771 -160a5 4 3991 5771 -160a9 2 3992 5771 -160ab 4 3994 5771 -160af 9 3995 5771 -160b8 2a 4026 5771 -160e2 2 4028 5771 -160e4 c 3998 5771 -160f0 9 4000 5771 -160f9 d 4001 5771 -16106 35 4005 5771 -1613b b 4009 5771 -16146 4 4010 5771 -1614a 8 4011 5771 -16152 2 4012 5771 -16154 2c 4013 5771 -16180 d 4017 5771 -1618d 9 4018 5771 -16196 12 4019 5771 -161a8 a 4023 5771 -161b2 36 4024 5771 -FUNC 161e8 31 0 UnDecorator::getLexicalFrame() -161e8 31 4031 5771 -FUNC 16219 12 0 UnDecorator::getDisplacement() -16219 12 4048 5771 -FUNC 1622b 12 0 UnDecorator::getCallIndex() -1622b 12 4049 5771 -FUNC 1623d 12 0 UnDecorator::getGuardNumber() -1623d 12 4050 5771 -FUNC 1624f 150 4 UnDecorator::getVfTableType(DName const &) -1624f 7 4174 5771 -16256 d 4175 5771 -16263 1d 4178 5771 -16280 2c 4180 5771 -162ac f 4182 5771 -162bb e 4184 5771 -162c9 5 4186 5771 -162ce 11 4188 5771 -162df 2d 4190 5771 -1630c b 4194 5771 -16317 7 4195 5771 -1631e 10 4199 5771 -1632e a 4200 5771 -16338 b 4188 5771 -16343 b 4204 5771 -1634e a 4206 5771 -16358 7 4207 5771 -1635f 9 4209 5771 -16368 a 4216 5771 -16372 6 4217 5771 -16378 2 4220 5771 -1637a 9 4221 5771 -16383 17 4222 5771 -1639a 3 4224 5771 -1639d 2 4226 5771 -FUNC 1639f a0 8 UnDecorator::getStringEncoding(char *,int) -1639f 6 1447 5771 -163a5 b 1448 5771 -163b0 22 1451 5771 -163d2 6 1456 5771 -163d8 b 1459 5771 -163e3 b 1462 5771 -163ee 13 1464 5771 -16401 c 1466 5771 -1640d 5 1469 5771 -16412 6 1470 5771 -16418 4 1471 5771 -1641c 14 1477 5771 -16430 d 1452 5771 -1643d 2 1478 5771 -FUNC 1643f 50 0 UnDecorator::getSignedDimension() -1643f 5 1603 5771 -16444 b 1604 5771 -1644f c 1605 5771 -1645b 2 1606 5771 -1645d 23 1608 5771 -16480 d 1611 5771 -1648d 2 1612 5771 -FUNC 1648f 2bb 0 UnDecorator::getTemplateConstant() -1648f 15 1877 5771 -164a4 f 1884 5771 -164b3 32 1885 5771 -164e5 9 1921 5771 -164ee b 1922 5771 -164f9 20 1924 5771 -16519 12 1931 5771 -1652b e 1932 5771 -16539 3 1937 5771 -1653c 7 1939 5771 -16543 6 1941 5771 -16549 4 1942 5771 -1654d 2 1944 5771 -1654f 4 1945 5771 -16553 2a 1950 5771 -1657d a 1900 5771 -16587 6 1902 5771 -1658d 11 1903 5771 -1659e 1b 1906 5771 -165b9 b 1892 5771 -165c4 6 2034 5771 -165ca 7 1954 5771 -165d1 26 1885 5771 -165f7 b 1990 5771 -16602 c 1991 5771 -1660e 10 1992 5771 -1661e 9 1966 5771 -16627 c 1968 5771 -16633 e 1971 5771 -16641 10 1973 5771 -16651 6 1975 5771 -16657 6 1976 5771 -1665d 3 1980 5771 -16660 29 1981 5771 -16689 a 1983 5771 -16693 a 2001 5771 -1669d a 2003 5771 -166a7 13 2007 5771 -166ba a 2008 5771 -166c4 11 2012 5771 -166d5 13 2015 5771 -166e8 a 2016 5771 -166f2 13 2021 5771 -16705 a 2022 5771 -1670f 13 2026 5771 -16722 d 2029 5771 -1672f 7 1913 5771 -16736 14 2041 5771 -FUNC 1674a d9 8 UnDecorator::getPtrRefDataType(DName const &,int) -1674a 3 3937 5771 -1674d 11 3940 5771 -1675e b 3944 5771 -16769 12 3948 5771 -1677b 12 3949 5771 -1678d 10 3951 5771 -1679d 5 3957 5771 -167a2 16 3961 5771 -167b8 d 3967 5771 -167c5 c 3968 5771 -167d1 b 3970 5771 -167dc 6 3972 5771 -167e2 1e 3974 5771 -16800 e 3976 5771 -1680e 13 3980 5771 -16821 2 3982 5771 -FUNC 16823 14 4 UnDecorator::getVbTableType(DName const &) -16823 14 4053 5771 -FUNC 16837 1b8 0 UnDecorator::getTemplateArgumentList() -16837 14 1775 5771 -1684b c 1777 5771 -16857 7 1778 5771 -1685e 2a 1781 5771 -16888 6 1785 5771 -1688e 4 1786 5771 -16892 2 1787 5771 -16894 e 1788 5771 -168a2 8 1793 5771 -168aa 5 1798 5771 -168af 1 1800 5771 -168b0 11 1804 5771 -168c1 5 1807 5771 -168c6 7 1810 5771 -168cd 7 1816 5771 -168d4 6 1817 5771 -168da 12 1818 5771 -168ec a 1820 5771 -168f6 5 1821 5771 -168fb e 1822 5771 -16909 5 1824 5771 -1690e 9 1830 5771 -16917 c 1832 5771 -16923 e 1835 5771 -16931 10 1837 5771 -16941 6 1839 5771 -16947 1 1840 5771 -16948 2 1842 5771 -1694a 25 1843 5771 -1696f 2 1846 5771 -16971 10 1847 5771 -16981 2 1850 5771 -16983 1f 1851 5771 -169a2 17 1857 5771 -169b9 9 1858 5771 -169c2 16 1862 5771 -169d8 17 1873 5771 -FUNC 169ef 56f 8 UnDecorator::getOperatorName(bool,bool *) -169ef b 1095 5771 -169fa 53 1103 5771 -16a4d 13 1183 5771 -16a60 c 1439 5771 -16a6c 1d 1440 5771 -16a89 11 1442 5771 -16a9a 5 1444 5771 -16a9f 3 1124 5771 -16aa2 8 1126 5771 -16aaa 21 1127 5771 -16acb c 1129 5771 -16ad7 a 1130 5771 -16ae1 a 1133 5771 -16aeb 7 1135 5771 -16af2 3 1136 5771 -16af5 9 1144 5771 -16afe 5 1145 5771 -16b03 6 1148 5771 -16b09 2 1154 5771 -16b0b 15 1156 5771 -16b20 18 1160 5771 -16b38 1a 1161 5771 -16b52 10 1166 5771 -16b62 b 1167 5771 -16b6d 5 1170 5771 -16b72 6 1106 5771 -16b78 f 1108 5771 -16b87 21 1103 5771 -16ba8 3d 1220 5771 -16be5 18 1240 5771 -16bfd b 1234 5771 -16c08 5 1235 5771 -16c0d 13 1245 5771 -16c20 7 1247 5771 -16c27 8 1249 5771 -16c2f 18 1220 5771 -16c47 13 1255 5771 -16c5a 7 1256 5771 -16c61 2 1257 5771 -16c63 16 1335 5771 -16c79 7 1356 5771 -16c80 6 1350 5771 -16c86 2 1352 5771 -16c88 25 1220 5771 -16cad 13 1290 5771 -16cc0 17 1291 5771 -16cd7 24 1292 5771 -16cfb 14 1313 5771 -16d0f 6 1316 5771 -16d15 5 1317 5771 -16d1a 10 1302 5771 -16d2a 20 1303 5771 -16d4a 20 1304 5771 -16d6a 20 1305 5771 -16d8a 22 1306 5771 -16dac 12 1307 5771 -16dbe c 1296 5771 -16dca 2b 1297 5771 -16df5 13 1281 5771 -16e08 17 1282 5771 -16e1f 1a 1283 5771 -16e39 5 1284 5771 -16e3e 2d 1220 5771 -16e6b 25 1364 5771 -16e90 10 1373 5771 -16ea0 13 1378 5771 -16eb3 a 1397 5771 -16ebd 13 1399 5771 -16ed0 a 1403 5771 -16eda 6 1405 5771 -16ee0 2 1408 5771 -16ee2 13 1410 5771 -16ef5 d 1413 5771 -16f02 5 1415 5771 -16f07 10 1278 5771 -16f17 b 1330 5771 -16f22 5 1428 5771 -16f27 3 1187 5771 -16f2a 13 1216 5771 -16f3d 8 1437 5771 -16f45 19 1438 5771 -FUNC 16f5e 153 4 UnDecorator::getTemplateName(bool) -16f5e 5 1700 5771 -16f63 1f 1704 5771 -16f82 16 1714 5771 -16f98 1d 1716 5771 -16fb5 23 1725 5771 -16fd8 e 1729 5771 -16fe6 6 1730 5771 -16fec 12 1732 5771 -16ffe 2 1734 5771 -17000 16 1735 5771 -17016 c 1738 5771 -17022 7 1739 5771 -17029 6 1746 5771 -1702f 21 1747 5771 -17050 c 1749 5771 -1705c a 1750 5771 -17066 a 1753 5771 -17070 6 1755 5771 -17076 6 1756 5771 -1707c 23 1769 5771 -1709f d 1705 5771 -170ac 5 1771 5771 -FUNC 170b1 1ea 4 UnDecorator::getZName(bool) -170b1 10 1007 5771 -170c1 11 1008 5771 -170d2 3 1013 5771 -170d5 26 1043 5771 -170fb b 1024 5771 -17106 5 1026 5771 -1710b 16 1028 5771 -17121 16 1030 5771 -17137 17 1031 5771 -1714e 7 1033 5771 -17155 25 1040 5771 -1717a 5 1042 5771 -1717f 29 1043 5771 -171a8 8 1045 5771 -171b0 b 1051 5771 -171bb c 1053 5771 -171c7 e 1056 5771 -171d5 10 1058 5771 -171e5 4 1060 5771 -171e9 b 1061 5771 -171f4 2 1063 5771 -171f6 a 1064 5771 -17200 10 1065 5771 -17210 2 1068 5771 -17212 d 1069 5771 -1721f 2a 1070 5771 -17249 2 1073 5771 -1724b 1a 1076 5771 -17265 11 1083 5771 -17276 9 1084 5771 -1727f f 1087 5771 -1728e d 1090 5771 -FUNC 1729b e4 0 UnDecorator::getScopedName() -1729b 7 2727 5771 -172a2 e 2728 5771 -172b0 15 2733 5771 -172c5 1a 2737 5771 -172df 2a 2738 5771 -17309 b 2742 5771 -17314 8 2743 5771 -1731c 4 2744 5771 -17320 1b 2745 5771 -1733b b 2746 5771 -17346 7 2747 5771 -1734d 2 2748 5771 -1734f 2b 2749 5771 -1737a 3 2753 5771 -1737d 2 2755 5771 -FUNC 1737f f 0 UnDecorator::getECSUName() -1737f f 2758 5771 -FUNC 1738e 100 0 UnDecorator::getECSUDataType() -1738e 3 3392 5771 -17391 20 3395 5771 -173b1 37 3399 5771 -173e8 5 3424 5771 -173ed 2 3425 5771 -173ef 5 3420 5771 -173f4 2 3421 5771 -173f6 26 3431 5771 -1741c 2 3432 5771 -1741e 5 3415 5771 -17423 2 3416 5771 -17425 5 3411 5771 -1742a 2 3412 5771 -1742c d 3407 5771 -17439 7 3439 5771 -17440 4 3441 5771 -17444 c 3442 5771 -17450 16 3446 5771 -17466 e 3450 5771 -17474 18 3404 5771 -1748c 2 3452 5771 -FUNC 1748e 46 0 UnDecorator::getSymbolName() -1748e 3 989 5771 -17491 a 990 5771 -1749b 6 991 5771 -174a1 c 992 5771 -174ad 16 997 5771 -174c3 f 1001 5771 -174d2 2 1003 5771 -FUNC 174d4 92 0 UnDecorator::getBasedType() -174d4 6 2653 5771 -174da 13 2654 5771 -174ed a 2659 5771 -174f7 17 2661 5771 -1750e c 2707 5771 -1751a 13 2699 5771 -1752d 2 2700 5771 -1752f d 2674 5771 -1753c 2 2711 5771 -1753e a 2712 5771 -17548 d 2716 5771 -17555 f 2720 5771 -17564 2 2722 5771 -FUNC 17566 b42 4 UnDecorator::composeDeclaration(DName const &) -17566 6 2045 5771 -1756c e 2046 5771 -1757a 5 2047 5771 -1757f a 2048 5771 -17589 b 2053 5771 -17594 f 2054 5771 -175a3 8 2055 5771 -175ab 15 2056 5771 -175c0 8 2057 5771 -175c8 10 2058 5771 -175d8 83 2075 5771 -1765b 7 2081 5771 -17662 19 2082 5771 -1767b 21 2083 5771 -1769c 2 2084 5771 -1769e 15 2085 5771 -176b3 27 2090 5771 -176da 33 2092 5771 -1770d 9 2094 5771 -17716 9 2096 5771 -1771f 2b 2098 5771 -1774a d 2101 5771 -17757 9 2103 5771 -17760 2d 2105 5771 -1778d 2e 2107 5771 -177bb 5 2111 5771 -177c0 3 2114 5771 -177c3 3 2115 5771 -177c6 3 2116 5771 -177c9 3 2117 5771 -177cc 3 2118 5771 -177cf 26 2121 5771 -177f5 12 2123 5771 -17807 19 2125 5771 -17820 19 2126 5771 -17839 2 2127 5771 -1783b 12 2129 5771 -1784d 19 2131 5771 -17866 1b 2134 5771 -17881 13 2141 5771 -17894 a 2142 5771 -1789e 15 2143 5771 -178b3 2 2144 5771 -178b5 f 2145 5771 -178c4 10 2147 5771 -178d4 9 2151 5771 -178dd 22 2152 5771 -178ff 2 2153 5771 -17901 13 2168 5771 -17914 c 2172 5771 -17920 14 2173 5771 -17934 1a 2174 5771 -1794e 2 2175 5771 -17950 b 2176 5771 -1795b 5 2182 5771 -17960 6 2185 5771 -17966 27 2187 5771 -1798d b 2189 5771 -17998 5 2190 5771 -1799d 1b 2194 5771 -179b8 15 2195 5771 -179cd 1d 2202 5771 -179ea 16 2204 5771 -17a00 55 2205 5771 -17a55 12 2206 5771 -17a67 2b 2207 5771 -17a92 2 2208 5771 -17a94 d 2209 5771 -17aa1 1a 2211 5771 -17abb 2e 2218 5771 -17ae9 12 2222 5771 -17afb c 2223 5771 -17b07 c 2227 5771 -17b13 15 2228 5771 -17b28 2 2229 5771 -17b2a f 2230 5771 -17b39 1a 2235 5771 -17b53 b 2237 5771 -17b5e 3 2238 5771 -17b61 5 2243 5771 -17b66 b 2245 5771 -17b71 1c 2250 5771 -17b8d 13 2251 5771 -17ba0 e 2252 5771 -17bae 2 2253 5771 -17bb0 10 2254 5771 -17bc0 3d 2255 5771 -17bfd c 2256 5771 -17c09 e 2257 5771 -17c17 4c 2258 5771 -17c63 a 2259 5771 -17c6d 4b 2260 5771 -17cb8 7 2261 5771 -17cbf 4b 2262 5771 -17d0a f 2263 5771 -17d19 f 2264 5771 -17d28 6 2268 5771 -17d2e 61 2277 5771 -17d8f 15 2281 5771 -17da4 2 2283 5771 -17da6 18 2285 5771 -17dbe 2d 2292 5771 -17deb 12 2294 5771 -17dfd 37 2296 5771 -17e34 23 2297 5771 -17e57 b7 2299 5771 -17f0e 23 2300 5771 -17f31 12 2306 5771 -17f43 37 2307 5771 -17f7a b 2308 5771 -17f85 37 2309 5771 -17fbc b 2310 5771 -17fc7 30 2311 5771 -17ff7 23 2312 5771 -1801a 36 2319 5771 -18050 1e 2320 5771 -1806e 8 2325 5771 -18076 1e 2326 5771 -18094 12 2329 5771 -180a6 2 2331 5771 -FUNC 180a8 211 0 UnDecorator::getDecoratedName() -180a8 7 861 5771 -180af e 864 5771 -180bd a 868 5771 -180c7 b 873 5771 -180d2 8 874 5771 -180da 11 876 5771 -180eb 10 878 5771 -180fb 6 882 5771 -18101 9 903 5771 -1810a 9 906 5771 -18113 8 910 5771 -1811b 6 912 5771 -18121 5 910 5771 -18126 2 915 5771 -18128 a 918 5771 -18132 19 919 5771 -1814b 6 920 5771 -18151 f 924 5771 -18160 8 925 5771 -18168 17 929 5771 -1817f a 930 5771 -18189 c 932 5771 -18195 8 933 5771 -1819d 5 934 5771 -181a2 18 935 5771 -181ba a 936 5771 -181c4 13 937 5771 -181d7 b 938 5771 -181e2 2 940 5771 -181e4 29 941 5771 -1820d 4 945 5771 -18211 10 946 5771 -18221 9 948 5771 -1822a 3 950 5771 -1822d 1c 955 5771 -18249 f 959 5771 -18258 4 976 5771 -1825c 6 962 5771 -18262 14 964 5771 -18276 19 967 5771 -1828f 5 968 5771 -18294 10 971 5771 -182a4 2 979 5771 -182a6 2 980 5771 -182a8 f 982 5771 -182b7 2 984 5771 -FUNC 182b9 28b 0 UnDecorator::getScope() -182b9 d 1482 5771 -182c6 f 1483 5771 -182d5 2a 1489 5771 -182ff 14 1492 5771 -18313 b 1495 5771 -1831e 16 1496 5771 -18334 5 1498 5771 -18339 17 1499 5771 -18350 3 1500 5771 -18353 f 1506 5771 -18362 2a 1507 5771 -1838c 10 1566 5771 -1839c 5 1567 5771 -183a1 34 1561 5771 -183d5 4 1562 5771 -183d9 5 1563 5771 -183de e 1510 5771 -183ec 5 1514 5771 -183f1 22 1515 5771 -18413 e 1518 5771 -18421 6 1519 5771 -18427 5 1522 5771 -1842c 2a 1523 5771 -18456 2 1524 5771 -18458 f 1546 5771 -18467 1a 1548 5771 -18481 b 1550 5771 -1848c 9 1551 5771 -18495 2 1554 5771 -18497 f 1530 5771 -184a6 2 1570 5771 -184a8 21 1571 5771 -184c9 a 1489 5771 -184d3 f 1577 5771 -184e2 18 1590 5771 -184fa 2 1591 5771 -184fc b 1580 5771 -18507 7 1581 5771 -1850e 2 1582 5771 -18510 2b 1583 5771 -1853b 4 1597 5771 -1853f 5 1599 5771 -FUNC 18544 341 4 UnDecorator::getFunctionIndirectType(DName const &) -18544 3 3461 5771 -18547 e 3462 5771 -18555 15 3463 5771 -1856a f 3465 5771 -18579 10 3466 5771 -18589 7 3469 5771 -18590 a 3471 5771 -1859a 6 3473 5771 -185a0 7 3475 5771 -185a7 d 3477 5771 -185b4 17 3482 5771 -185cb 9 3485 5771 -185d4 3 3486 5771 -185d7 5 3490 5771 -185dc f 3491 5771 -185eb 6 3496 5771 -185f1 13 3497 5771 -18604 b 3501 5771 -1860f 1e 3503 5771 -1862d 8 3505 5771 -18635 29 3506 5771 -1865e 2 3507 5771 -18660 17 3508 5771 -18677 f 3510 5771 -18686 4 3511 5771 -1868a 10 3518 5771 -1869a 15 3519 5771 -186af 9 3527 5771 -186b8 d 3528 5771 -186c5 30 3529 5771 -186f5 2 3530 5771 -186f7 11 3521 5771 -18708 7 3514 5771 -1870f 16 3516 5771 -18725 13 3531 5771 -18738 d 3535 5771 -18745 22 3537 5771 -18767 2 3546 5771 -18769 13 3547 5771 -1877c c 3551 5771 -18788 28 3552 5771 -187b0 1e 3557 5771 -187ce c 3558 5771 -187da 2e 3561 5771 -18808 10 3563 5771 -18818 c 3564 5771 -18824 c 3566 5771 -18830 15 3567 5771 -18845 2 3568 5771 -18847 f 3569 5771 -18856 4 3573 5771 -1885a b 3574 5771 -18865 e 3580 5771 -18873 10 3576 5771 -18883 2 3581 5771 -FUNC 18885 4e4 10 UnDecorator::getDataIndirectType(DName const &,char,DName const &,int) -18885 6 3707 5771 -1888b 23 3711 5771 -188ae 4 3713 5771 -188b2 17 3715 5771 -188c9 c 3717 5771 -188d5 10 3719 5771 -188e5 e 3723 5771 -188f3 6 3725 5771 -188f9 15 3726 5771 -1890e 17 3732 5771 -18925 11 3751 5771 -18936 a 3752 5771 -18940 32 3753 5771 -18972 5 3754 5771 -18977 11 3743 5771 -18988 a 3744 5771 -18992 25 3745 5771 -189b7 2 3746 5771 -189b9 8 3747 5771 -189c1 2 3749 5771 -189c3 19 3735 5771 -189dc a 3736 5771 -189e6 14 3737 5771 -189fa 5 3738 5771 -189ff 11 3739 5771 -18a10 6 3766 5771 -18a16 a 3768 5771 -18a20 17 3770 5771 -18a37 10 3772 5771 -18a47 1a 3778 5771 -18a61 5 3780 5771 -18a66 6 3782 5771 -18a6c 9 3787 5771 -18a75 b 3789 5771 -18a80 19 3791 5771 -18a99 c 3793 5771 -18aa5 24 3794 5771 -18ac9 c 3796 5771 -18ad5 22 3797 5771 -18af7 9 3801 5771 -18b00 5 3805 5771 -18b05 7 3806 5771 -18b0c 6 3810 5771 -18b12 1e 3812 5771 -18b30 8 3814 5771 -18b38 1b 3815 5771 -18b53 2 3816 5771 -18b55 16 3817 5771 -18b6b a 3819 5771 -18b75 13 3828 5771 -18b88 b 3833 5771 -18b93 c 3834 5771 -18b9f 8 3835 5771 -18ba7 6 3836 5771 -18bad b 3842 5771 -18bb8 b 3843 5771 -18bc3 3 3863 5771 -18bc6 6 3864 5771 -18bcc 22 3866 5771 -18bee 9 3871 5771 -18bf7 13 3872 5771 -18c0a 5 3876 5771 -18c0f 1e 3877 5771 -18c2d 5 3879 5771 -18c32 1e 3880 5771 -18c50 5 3884 5771 -18c55 e 3885 5771 -18c63 14 3889 5771 -18c77 28 3895 5771 -18c9f 2 3890 5771 -18ca1 b 3891 5771 -18cac 2 3892 5771 -18cae c 3898 5771 -18cba 17 3899 5771 -18cd1 4 3902 5771 -18cd5 6 3904 5771 -18cdb 7 3906 5771 -18ce2 8 3774 5771 -18cea 13 3918 5771 -18cfd 12 3922 5771 -18d0f 29 3925 5771 -18d38 10 3923 5771 -18d48 c 3928 5771 -18d54 3 3929 5771 -18d57 10 3931 5771 -18d67 2 3933 5771 -FUNC 18d69 14c 0 UnDecorator::operator char *() -18d69 6 762 5771 -18d6f 4 763 5771 -18d73 f 764 5771 -18d82 9 770 5771 -18d8b c 772 5771 -18d97 7 775 5771 -18d9e 1d 776 5771 -18dbb 4 782 5771 -18dbf 16 783 5771 -18dd5 9 785 5771 -18dde 5 794 5771 -18de3 9 795 5771 -18dec 13 799 5771 -18dff e 808 5771 -18e0d 2 809 5771 -18e0f 2 848 5771 -18e11 1a 810 5771 -18e2b e 813 5771 -18e39 e 811 5771 -18e47 9 817 5771 -18e50 e 819 5771 -18e5e d 820 5771 -18e6b a 824 5771 -18e75 f 825 5771 -18e84 5 828 5771 -18e89 2 829 5771 -18e8b 2 830 5771 -18e8d 5 831 5771 -18e92 1 832 5771 -18e93 5 833 5771 -18e98 1 835 5771 -18e99 5 834 5771 -18e9e 2 838 5771 -18ea0 a 839 5771 -18eaa 9 841 5771 -18eb3 2 848 5771 -FUNC 18eb5 116 c UnDecorator::getPtrRefType(DName const &,DName const &,char) -18eb5 5 3585 5771 -18eba f 3588 5771 -18ec9 d 3589 5771 -18ed6 b 3591 5771 -18ee1 20 3594 5771 -18f01 b 3595 5771 -18f0c b 3597 5771 -18f17 9 3598 5771 -18f20 14 3600 5771 -18f34 14 3606 5771 -18f48 1b 3608 5771 -18f63 a 3612 5771 -18f6d b 3615 5771 -18f78 c 3617 5771 -18f84 9 3618 5771 -18f8d c 3620 5771 -18f99 c 3622 5771 -18fa5 a 3623 5771 -18faf b 3625 5771 -18fba f 3629 5771 -18fc9 2 3632 5771 -FUNC 18fcb 1b 8 UnDecorator::getPointerType(DName const &,DName const &) -18fcb 1b 4037 5771 -FUNC 18fe6 1b 8 UnDecorator::getPointerTypeArray(DName const &,DName const &) -18fe6 1b 4040 5771 -FUNC 19001 1b 8 UnDecorator::getReferenceType(DName const &,DName const &) -19001 1b 4043 5771 -FUNC 1901c a3 18 __unDName -1901c f 604 5771 -1902b 9 606 5771 -19034 4 607 5771 -19038 a 612 5771 -19042 2 613 5771 -19044 8 614 5771 -1904c 3 615 5771 -1904f 20 618 5771 -1906f 1a 627 5771 -19089 e 628 5771 -19097 a 633 5771 -190a1 c 636 5771 -190ad 3 643 5771 -190b0 6 645 5771 -190b6 9 637 5771 -FUNC 190bf a3 1c __unDNameEx -190bf f 684 5771 -190ce 9 687 5771 -190d7 4 688 5771 -190db a 693 5771 -190e5 2 694 5771 -190e7 8 695 5771 -190ef 3 696 5771 -190f2 20 699 5771 -19112 1a 708 5771 -1912c e 709 5771 -1913a a 714 5771 -19144 c 717 5771 -19150 3 724 5771 -19153 6 726 5771 -19159 9 718 5771 -FUNC 19162 387 4 UnDecorator::getBasicDataType(DName const &) -19162 3 3162 5771 -19165 15 3163 5771 -1917a 6 3165 5771 -19180 4 3168 5771 -19184 35 3173 5771 -191b9 5 3178 5771 -191be 5 3179 5771 -191c3 5 3183 5771 -191c8 5 3184 5771 -191cd 5 3188 5771 -191d2 5 3189 5771 -191d7 5 3193 5771 -191dc 5 3194 5771 -191e1 5 3203 5771 -191e6 5 3204 5771 -191eb 2a 3173 5771 -19215 3c 3222 5771 -19251 5 3231 5771 -19256 5 3232 5771 -1925b 22 3273 5771 -1927d 5 3235 5771 -19282 5 3236 5771 -19287 f 3222 5771 -19296 5 3243 5771 -1929b 5 3244 5771 -192a0 5 3239 5771 -192a5 5 3240 5771 -192aa 5 3247 5771 -192af 5 3248 5771 -192b4 1b 3222 5771 -192cf 3 3264 5771 -192d2 6 3262 5771 -192d8 10 3264 5771 -192e8 10 3266 5771 -192f8 11 3267 5771 -19309 5 3275 5771 -1930e 2 3276 5771 -19310 5 3255 5771 -19315 2 3257 5771 -19317 3 3224 5771 -1931a 12 3343 5771 -1932c 9 3345 5771 -19335 7 3347 5771 -1933c 16 3348 5771 -19352 6 3352 5771 -19358 d 3353 5771 -19365 5 3355 5771 -1936a 5 3227 5771 -1936f 2 3278 5771 -19371 d 3281 5771 -1937e 2 3282 5771 -19380 5 3219 5771 -19385 2 3220 5771 -19387 3 3287 5771 -1938a 5 3290 5771 -1938f d 3207 5771 -1939c d 3212 5771 -193a9 9 3297 5771 -193b2 1f 3301 5771 -193d1 19 3314 5771 -193ea c 3322 5771 -193f6 2 3326 5771 -193f8 c 3307 5771 -19404 2 3308 5771 -19406 1e 3311 5771 -19424 10 3332 5771 -19434 18 3333 5771 -1944c 5 3337 5771 -19451 c 3360 5771 -1945d 5 3367 5771 -19462 d 3369 5771 -1946f 5 3371 5771 -19474 d 3372 5771 -19481 2 3373 5771 -19483 5 3374 5771 -19488 d 3375 5771 -19495 17 3380 5771 -194ac 16 3385 5771 -194c2 27 3387 5771 -FUNC 194e9 13e 4 UnDecorator::getPrimaryDataType(DName const &) -194e9 7 2962 5771 -194f0 2b 2966 5771 -1951b 12 3027 5771 -1952d d 2972 5771 -1953a c 2974 5771 -19546 a 2975 5771 -19550 b 2981 5771 -1955b 6 2984 5771 -19561 1e 2986 5771 -1957f 7 2996 5771 -19586 2 2997 5771 -19588 6 2998 5771 -1958e f 3000 5771 -1959d 8 3002 5771 -195a5 10 3004 5771 -195b5 2f 3022 5771 -195e4 16 3012 5771 -195fa 17 3008 5771 -19611 14 2969 5771 -19625 2 3030 5771 -FUNC 19627 b1 4 UnDecorator::getDataType(DName *) -19627 6 2922 5771 -1962d b 2923 5771 -19638 15 2928 5771 -1964d 10 2954 5771 -1965d 6 2934 5771 -19663 c 2936 5771 -1966f f 2937 5771 -1967e 13 2939 5771 -19691 6 2944 5771 -19697 29 2946 5771 -196c0 2 2947 5771 -196c2 14 2931 5771 -196d6 2 2957 5771 -FUNC 196d8 64 4 UnDecorator::getExternalDataType(DName const &) -196d8 7 4244 5771 -196df 1e 4247 5771 -196fd 9 4248 5771 -19706 30 4253 5771 -19736 4 4255 5771 -1973a 2 4257 5771 -FUNC 1973c 57 8 fastzero_I -FUNC 19793 8f c _VEC_memzero -FUNC 19822 14 0 _sse2_mathfcns_init -FUNC 19836 14 4 _set_SSE2_enable -FUNC 1984a 87 c fastcopy_I -FUNC 198d1 e3 c _VEC_memcpy -FUNC 199b4 1bd c __crtMessageBoxA -199b4 9 41 4033 -199bd 5 49 4033 -199c2 2 56 4033 -199c4 18 64 4033 -199dc d 66 4033 -199e9 2 67 4033 -199eb 6 69 4033 -199f1 10 76 4033 -19a01 6 78 4033 -19a07 6 80 4033 -19a0d 15 83 4033 -19a22 1a 86 4033 -19a3c 1c 88 4033 -19a58 6 89 4033 -19a5e 8 95 4033 -19a66 6 98 4033 -19a6c a 100 4033 -19a76 14 102 4033 -19a8a 14 116 4033 -19a9e 6 119 4033 -19aa4 d 120 4033 -19ab1 c 122 4033 -19abd 1f 127 4033 -19adc 1b 136 4033 -19af7 6 137 4033 -19afd 7 138 4033 -19b04 2 139 4033 -19b06 7 140 4033 -19b0d 2 142 4033 -19b0f a 144 4033 -19b19 6 146 4033 -19b1f 5 147 4033 -19b24 2 149 4033 -19b26 11 153 4033 -19b37 6 155 4033 -19b3d 5 156 4033 -19b42 8 158 4033 -19b4a b 165 4033 -19b55 5 166 4033 -19b5a 10 168 4033 -19b6a 5 173 4033 -19b6f 2 176 4033 -FUNC 19b71 71 c strcat_s -19b71 0 13 823 -19b71 30 18 823 -19ba1 c 19 823 -19bad 2 21 823 -19baf 4 23 823 -19bb3 1 25 823 -19bb4 3 26 823 -19bb7 2 29 823 -19bb9 2 32 823 -19bbb d 35 823 -19bc8 4 39 823 -19bcc 2 41 823 -19bce e 42 823 -19bdc 5 45 823 -19be1 1 46 823 -FUNC 19be2 b3 10 strncpy_s -19be2 5 13 739 -19be7 14 17 739 -19bfb 5 65 739 -19c00 2 66 739 -19c02 26 24 739 -19c28 5 25 739 -19c2d 2 28 739 -19c2f 2 29 739 -19c31 b 31 739 -19c3c 8 35 739 -19c44 d 37 739 -19c51 2 41 739 -19c53 12 45 739 -19c65 5 48 739 -19c6a 2 50 739 -19c6c 4 54 739 -19c70 6 56 739 -19c76 3 58 739 -19c79 c 59 739 -19c85 2 61 739 -19c87 e 62 739 -FUNC 19c95 46 4 _set_error_mode -19c95 0 43 3937 -19c95 15 50 3937 -19caa 6 58 3937 -19cb0 1 65 3937 -19cb1 5 54 3937 -19cb6 7 55 3937 -19cbd 1 65 3937 -19cbe 1c 61 3937 -19cda 1 65 3937 -FUNC 19cdb a 4 __set_app_type -19cdb 0 91 3937 -19cdb 9 96 3937 -19ce4 1 97 3937 -FUNC 19ce5 6 0 __get_app_type -19ce5 0 120 3937 -19ce5 5 125 3937 -19cea 1 126 3937 -FUNC 19ceb 51 10 x_ismbbtype_l -19ceb 6 213 4669 -19cf1 b 214 4669 -19cfc 4 219 4669 -19d00 3a 222 4669 -19d3a 2 223 4669 -FUNC 19d3c 15 8 _ismbbkalnum_l -19d3c 0 80 4669 -19d3c 14 81 4669 -19d50 1 82 4669 -FUNC 19d51 13 4 _ismbbkalnum -19d51 0 85 4669 -19d51 12 86 4669 -19d63 1 87 4669 -FUNC 19d64 15 8 _ismbbkprint_l -19d64 0 90 4669 -19d64 14 91 4669 -19d78 1 92 4669 -FUNC 19d79 13 4 _ismbbkprint -19d79 0 95 4669 -19d79 12 96 4669 -19d8b 1 97 4669 -FUNC 19d8c 15 8 _ismbbkpunct_l -19d8c 0 100 4669 -19d8c 14 101 4669 -19da0 1 102 4669 -FUNC 19da1 13 4 _ismbbkpunct -19da1 0 105 4669 -19da1 12 106 4669 -19db3 1 107 4669 -FUNC 19db4 18 8 _ismbbalnum_l -19db4 0 113 4669 -19db4 17 114 4669 -19dcb 1 115 4669 -FUNC 19dcc 16 4 _ismbbalnum -19dcc 0 118 4669 -19dcc 15 119 4669 -19de1 1 120 4669 -FUNC 19de2 18 8 _ismbbalpha_l -19de2 0 123 4669 -19de2 17 124 4669 -19df9 1 125 4669 -FUNC 19dfa 16 4 _ismbbalpha -19dfa 0 128 4669 -19dfa 15 129 4669 -19e0f 1 130 4669 -FUNC 19e10 18 8 _ismbbgraph_l -19e10 0 133 4669 -19e10 17 134 4669 -19e27 1 135 4669 -FUNC 19e28 16 4 _ismbbgraph -19e28 0 138 4669 -19e28 15 139 4669 -19e3d 1 140 4669 -FUNC 19e3e 18 8 _ismbbprint_l -19e3e 0 143 4669 -19e3e 17 144 4669 -19e55 1 145 4669 -FUNC 19e56 16 4 _ismbbprint -19e56 0 148 4669 -19e56 15 149 4669 -19e6b 1 150 4669 -FUNC 19e6c 15 8 _ismbbpunct_l -19e6c 0 153 4669 -19e6c 14 154 4669 -19e80 1 155 4669 -FUNC 19e81 13 4 _ismbbpunct -19e81 0 158 4669 -19e81 12 159 4669 -19e93 1 160 4669 -FUNC 19e94 15 8 _ismbblead_l -19e94 0 166 4669 -19e94 14 167 4669 -19ea8 1 168 4669 -FUNC 19ea9 13 4 _ismbblead -19ea9 0 171 4669 -19ea9 12 172 4669 -19ebb 1 173 4669 -FUNC 19ebc 15 8 _ismbbtrail_l -19ebc 0 176 4669 -19ebc 14 177 4669 -19ed0 1 178 4669 -FUNC 19ed1 13 4 _ismbbtrail -19ed1 0 181 4669 -19ed1 12 182 4669 -19ee3 1 183 4669 -FUNC 19ee4 53 8 _ismbbkana_l -19ee4 6 189 4669 -19eea b 190 4669 -19ef5 10 192 4669 -19f05 1f 194 4669 -19f24 2 197 4669 -19f26 f 196 4669 -19f35 2 197 4669 -FUNC 19f37 e 4 _ismbbkana -19f37 0 200 4669 -19f37 d 201 4669 -19f44 1 202 4669 -FUNC 19f45 44 4 _getbuf -19f45 0 43 1893 -19f45 6 50 1893 -19f4b 16 58 1893 -19f61 4 61 1893 -19f65 7 62 1893 -19f6c 2 65 1893 -19f6e 4 69 1893 -19f72 6 70 1893 -19f78 7 71 1893 -19f7f 3 75 1893 -19f82 6 76 1893 -19f88 1 79 1893 -FUNC 19f89 1de 8 _fputwc_nolock -19f89 15 90 2124 -19f9e b 93 2124 -19fa9 48 95 2124 -19ff1 6 101 2124 -19ff7 45 104 2124 -1a03c 27 115 2124 -1a063 9 116 2124 -1a06c 22 120 2124 -1a08e 2 121 2124 -1a090 8 124 2124 -1a098 42 127 2124 -1a0da 17 133 2124 -1a0f1 6 139 2124 -1a0f7 7 141 2124 -1a0fe 34 143 2124 -1a132 6 146 2124 -1a138 6 150 2124 -1a13e d 151 2124 -1a14b d 153 2124 -1a158 f 154 2124 -FUNC 1a167 78 8 fputwc -1a167 c 48 2124 -1a173 2e 52 2124 -1a1a1 3 55 2124 -1a1a4 7 57 2124 -1a1ab 3 58 2124 -1a1ae 11 60 2124 -1a1bf c 63 2124 -1a1cb 4 67 2124 -1a1cf 6 68 2124 -1a1d5 a 64 2124 -FUNC 1a1df 5 8 putwc -1a1df 0 162 2124 -1a1df 5 163 2124 -FUNC 1a1e4 1f7 14 wcstoxl -1a1e4 8 82 6173 -1a1ec b 88 6173 -1a1f7 3 92 6173 -1a1fa b 95 6173 -1a205 2f 97 6173 -1a234 12 98 6173 -1a246 9 103 6173 -1a24f 2 105 6173 -1a251 18 106 6173 -1a269 6 108 6173 -1a26f 4 109 6173 -1a273 2 110 6173 -1a275 6 112 6173 -1a27b 5 113 6173 -1a280 5 115 6173 -1a285 b 118 6173 -1a290 9 119 6173 -1a299 f 120 6173 -1a2a8 9 123 6173 -1a2b1 7 121 6173 -1a2b8 6 126 6173 -1a2be 1a 128 6173 -1a2d8 2 129 6173 -1a2da 5 130 6173 -1a2df d 135 6173 -1a2ec c 141 6173 -1a2f8 15 143 6173 -1a30d 12 144 6173 -1a31f 5 148 6173 -1a324 4 152 6173 -1a328 c 159 6173 -1a334 4 165 6173 -1a338 6 166 6173 -1a33e 9 178 6173 -1a347 6 181 6173 -1a34d 3 183 6173 -1a350 4 184 6173 -1a354 2 186 6173 -1a356 c 161 6173 -1a362 5 173 6173 -1a367 2 174 6173 -1a369 24 189 6173 -1a38d 5 192 6173 -1a392 c 193 6173 -1a39e 6 194 6173 -1a3a4 10 195 6173 -1a3b4 8 201 6173 -1a3bc 2 203 6173 -1a3be 6 205 6173 -1a3c4 3 207 6173 -1a3c7 12 209 6173 -1a3d9 2 210 6173 -FUNC 1a3db 29 c wcstol -1a3db 3 217 6173 -1a3de 8 218 6173 -1a3e6 13 220 6173 -1a3f9 9 224 6173 -1a402 2 226 6173 -FUNC 1a404 1b 10 _wcstol_l -1a404 0 234 6173 -1a404 1a 235 6173 -1a41e 1 236 6173 -FUNC 1a41f 2a c wcstoul -1a41f 3 243 6173 -1a422 7 244 6173 -1a429 14 246 6173 -1a43d a 250 6173 -1a447 2 252 6173 -FUNC 1a449 1b 10 _wcstoul_l -1a449 0 260 6173 -1a449 1a 261 6173 -1a463 1 262 6173 -FUNC 1a464 9 0 _fptrap -1a464 0 46 2503 -1a464 8 47 2503 -1a46c 1 48 2503 -FUNC 1a46d 54 8 _isalpha_l -1a46d 6 57 6535 -1a473 b 58 6535 -1a47e 41 60 6535 -1a4bf 2 61 6535 -FUNC 1a4c1 2b 4 isalpha -1a4c1 0 66 6535 -1a4c1 9 67 6535 -1a4ca 13 69 6535 -1a4dd 1 75 6535 -1a4de d 73 6535 -1a4eb 1 75 6535 -FUNC 1a4ec 4f 8 _isupper_l -1a4ec 6 81 6535 -1a4f2 b 82 6535 -1a4fd 3c 84 6535 -1a539 2 85 6535 -FUNC 1a53b 29 4 isupper -1a53b 0 90 6535 -1a53b 9 91 6535 -1a544 11 93 6535 -1a555 1 99 6535 -1a556 d 97 6535 -1a563 1 99 6535 -FUNC 1a564 4f 8 _islower_l -1a564 6 105 6535 -1a56a b 106 6535 -1a575 3c 108 6535 -1a5b1 2 109 6535 -FUNC 1a5b3 29 4 islower -1a5b3 0 114 6535 -1a5b3 9 115 6535 -1a5bc 11 117 6535 -1a5cd 1 123 6535 -1a5ce d 121 6535 -1a5db 1 123 6535 -FUNC 1a5dc 4f 8 _isdigit_l -1a5dc 6 129 6535 -1a5e2 b 130 6535 -1a5ed 3c 132 6535 -1a629 2 133 6535 -FUNC 1a62b 29 4 isdigit -1a62b 0 138 6535 -1a62b 9 139 6535 -1a634 11 141 6535 -1a645 1 147 6535 -1a646 d 145 6535 -1a653 1 147 6535 -FUNC 1a654 54 8 _isxdigit_l -1a654 6 153 6535 -1a65a b 154 6535 -1a665 41 156 6535 -1a6a6 2 157 6535 -FUNC 1a6a8 2b 4 isxdigit -1a6a8 0 162 6535 -1a6a8 9 163 6535 -1a6b1 13 165 6535 -1a6c4 1 171 6535 -1a6c5 d 169 6535 -1a6d2 1 171 6535 -FUNC 1a6d3 4f 8 _isspace_l -1a6d3 6 177 6535 -1a6d9 b 178 6535 -1a6e4 3c 180 6535 -1a720 2 181 6535 -FUNC 1a722 29 4 isspace -1a722 0 186 6535 -1a722 9 187 6535 -1a72b 11 189 6535 -1a73c 1 195 6535 -1a73d d 193 6535 -1a74a 1 195 6535 -FUNC 1a74b 4f 8 _ispunct_l -1a74b 6 201 6535 -1a751 b 202 6535 -1a75c 3c 204 6535 -1a798 2 205 6535 -FUNC 1a79a 29 4 ispunct -1a79a 0 210 6535 -1a79a 9 211 6535 -1a7a3 11 213 6535 -1a7b4 1 219 6535 -1a7b5 d 217 6535 -1a7c2 1 219 6535 -FUNC 1a7c3 54 8 _isalnum_l -1a7c3 6 225 6535 -1a7c9 b 226 6535 -1a7d4 41 228 6535 -1a815 2 229 6535 -FUNC 1a817 2b 4 isalnum -1a817 0 234 6535 -1a817 9 235 6535 -1a820 13 237 6535 -1a833 1 243 6535 -1a834 d 241 6535 -1a841 1 243 6535 -FUNC 1a842 54 8 _isprint_l -1a842 6 249 6535 -1a848 b 250 6535 -1a853 41 252 6535 -1a894 2 253 6535 -FUNC 1a896 2b 4 isprint -1a896 0 258 6535 -1a896 9 259 6535 -1a89f 13 261 6535 -1a8b2 1 267 6535 -1a8b3 d 265 6535 -1a8c0 1 267 6535 -FUNC 1a8c1 54 8 _isgraph_l -1a8c1 6 273 6535 -1a8c7 b 274 6535 -1a8d2 41 276 6535 -1a913 2 277 6535 -FUNC 1a915 2b 4 isgraph -1a915 0 282 6535 -1a915 9 283 6535 -1a91e 13 285 6535 -1a931 1 291 6535 -1a932 d 289 6535 -1a93f 1 291 6535 -FUNC 1a940 4f 8 _iscntrl_l -1a940 6 297 6535 -1a946 b 298 6535 -1a951 3c 300 6535 -1a98d 2 301 6535 -FUNC 1a98f 29 4 iscntrl -1a98f 0 306 6535 -1a98f 9 307 6535 -1a998 11 309 6535 -1a9a9 1 315 6535 -1a9aa d 313 6535 -1a9b7 1 315 6535 -FUNC 1a9b8 d 4 __isascii -1a9b8 0 320 6535 -1a9b8 c 321 6535 -1a9c4 1 322 6535 -FUNC 1a9c5 8 4 __toascii -1a9c5 0 327 6535 -1a9c5 7 328 6535 -1a9cc 1 329 6535 -FUNC 1a9cd 1f 8 _iscsymf_l -1a9cd 0 335 6535 -1a9cd 1a 336 6535 -1a9e7 1 337 6535 -1a9e8 3 336 6535 -1a9eb 1 337 6535 -FUNC 1a9ec 1a 4 __iscsymf -1a9ec 0 341 6535 -1a9ec 15 342 6535 -1aa01 1 343 6535 -1aa02 3 342 6535 -1aa05 1 343 6535 -FUNC 1aa06 1f 8 _iscsym_l -1aa06 0 349 6535 -1aa06 1a 350 6535 -1aa20 1 351 6535 -1aa21 3 350 6535 -1aa24 1 351 6535 -FUNC 1aa25 1c 4 __iscsym -1aa25 0 356 6535 -1aa25 17 357 6535 -1aa3c 1 358 6535 -1aa3d 3 357 6535 -1aa40 1 358 6535 -FUNC 1aa41 12 8 _MarkAllocaS -1aa41 0 207 2895 -1aa41 8 208 2895 -1aa49 6 210 2895 -1aa4f 3 211 2895 -1aa52 1 214 2895 -FUNC 1aa53 1b 4 _freea -1aa53 0 249 2895 -1aa53 8 251 2895 -1aa5b 3 253 2895 -1aa5e 8 255 2895 -1aa66 7 257 2895 -1aa6d 1 266 2895 -FUNC 1aa6e 13b 18 __crtGetLocaleInfoW_stat -1aa6e f 60 2876 -1aa7d 14 68 2876 -1aa91 d 70 2876 -1aa9e 8 71 2876 -1aaa6 b 73 2876 -1aab1 f 74 2876 -1aac0 5 79 2876 -1aac5 13 81 2876 -1aad8 7 86 2876 -1aadf 2 140 2876 -1aae1 8 96 2876 -1aae9 b 97 2876 -1aaf4 16 100 2876 -1ab0a 7 101 2876 -1ab11 48 104 2876 -1ab59 2 105 2876 -1ab5b 2 106 2876 -1ab5d e 110 2876 -1ab6b 7 113 2876 -1ab72 2 121 2876 -1ab74 2 123 2876 -1ab76 17 130 2876 -1ab8d 6 134 2876 -1ab93 4 136 2876 -1ab97 12 141 2876 -FUNC 1aba9 3b 18 __crtGetLocaleInfoW -1aba9 6 151 2876 -1abaf b 152 2876 -1abba 28 161 2876 -1abe2 2 162 2876 -FUNC 1abe4 13d 18 __crtGetLocaleInfoA_stat -1abe4 f 60 4251 -1abf3 17 68 4251 -1ac0a a 70 4251 -1ac14 8 71 4251 -1ac1c b 73 4251 -1ac27 f 74 4251 -1ac36 11 79 4251 -1ac47 4 86 4251 -1ac4b 5 96 4251 -1ac50 b 97 4251 -1ac5b 13 100 4251 -1ac6e 7 101 4251 -1ac75 49 104 4251 -1acbe 2 105 4251 -1acc0 2 106 4251 -1acc2 10 110 4251 -1acd2 3 114 4251 -1acd5 6 124 4251 -1acdb 2 126 4251 -1acdd 15 135 4251 -1acf2 7 139 4251 -1acf9 4 141 4251 -1acfd 12 81 4251 -1ad0f 12 145 4251 -FUNC 1ad21 3b 18 __crtGetLocaleInfoA -1ad21 6 155 4251 -1ad27 b 156 4251 -1ad32 28 165 4251 -1ad5a 2 166 4251 -FUNC 1ad5c 1a 4 strncnt -1ad5c 0 48 4203 -1ad5c 6 49 4203 -1ad62 6 52 4203 -1ad68 1 53 4203 -1ad69 5 52 4203 -1ad6e 7 55 4203 -1ad75 1 56 4203 -FUNC 1ad76 3a2 20 __crtLCMapStringA_stat -1ad76 12 99 4203 -1ad88 d 108 4203 -1ad95 1b 109 4203 -1adb0 8 110 4203 -1adb8 b 111 4203 -1adc3 a 112 4203 -1adcd 5 119 4203 -1add2 19 120 4203 -1adeb 5 124 4203 -1adf0 1 125 4203 -1adf1 3 127 4203 -1adf4 16 133 4203 -1ae0a 9 213 4203 -1ae13 8 235 4203 -1ae1b 8 236 4203 -1ae23 27 247 4203 -1ae4a 6 248 4203 -1ae50 48 251 4203 -1ae98 3 252 4203 -1ae9b 6 253 4203 -1aea1 19 262 4203 -1aeba 21 271 4203 -1aedb 8 274 4203 -1aee3 9 277 4203 -1aeec 9 279 4203 -1aef5 12 288 4203 -1af07 5 292 4203 -1af0c 4b 298 4203 -1af57 4 299 4203 -1af5b 18 309 4203 -1af73 3 312 4203 -1af76 6 322 4203 -1af7c 2 325 4203 -1af7e 17 335 4203 -1af95 7 342 4203 -1af9c 8 344 4203 -1afa4 9 346 4203 -1afad b 141 4203 -1afb8 8 142 4203 -1afc0 5 143 4203 -1afc5 8 144 4203 -1afcd 11 146 4203 -1afde 7 147 4203 -1afe5 9 153 4203 -1afee 15 155 4203 -1b003 5 156 4203 -1b008 2 157 4203 -1b00a 1b 164 4203 -1b025 7 166 4203 -1b02c 41 169 4203 -1b06d 2 170 4203 -1b06f 28 196 4203 -1b097 2 183 4203 -1b099 2 184 4203 -1b09b 25 190 4203 -1b0c0 7 198 4203 -1b0c7 2 199 4203 -1b0c9 1a 202 4203 -1b0e3 5 204 4203 -1b0e8 9 205 4203 -1b0f1 c 206 4203 -1b0fd 7 207 4203 -1b104 2 208 4203 -1b106 12 350 4203 -FUNC 1b118 43 24 __crtLCMapStringA -1b118 6 363 4203 -1b11e b 364 4203 -1b129 30 376 4203 -1b159 2 377 4203 -FUNC 1b15b 1b8 1c __crtGetStringTypeA_stat -1b15b f 66 4155 -1b16a 10 75 4155 -1b17a 18 79 4155 -1b192 8 80 4155 -1b19a b 82 4155 -1b1a5 f 83 4155 -1b1b4 11 88 4155 -1b1c5 9 120 4155 -1b1ce 8 141 4155 -1b1d6 8 142 4155 -1b1de 27 153 4155 -1b205 6 154 4155 -1b20b 3e 157 4155 -1b249 2 158 4155 -1b24b 2 159 4155 -1b24d f 161 4155 -1b25c 13 169 4155 -1b26f 11 174 4155 -1b280 6 176 4155 -1b286 6 178 4155 -1b28c 2 90 4155 -1b28e 5 94 4155 -1b293 8 95 4155 -1b29b 5 96 4155 -1b2a0 8 97 4155 -1b2a8 e 99 4155 -1b2b6 4 100 4155 -1b2ba 5 104 4155 -1b2bf 17 106 4155 -1b2d6 2 107 4155 -1b2d8 2 108 4155 -1b2da 3 109 4155 -1b2dd 15 112 4155 -1b2f2 6 113 4155 -1b2f8 7 114 4155 -1b2ff 2 115 4155 -1b301 12 182 4155 -FUNC 1b313 40 20 __crtGetStringTypeA -1b313 6 194 4155 -1b319 b 195 4155 -1b324 2d 206 4155 -1b351 2 207 4155 -FUNC 1b353 6 0 __pwctype_func -1b353 0 24 3986 -1b353 5 25 3986 -1b358 1 26 3986 -FUNC 1b359 29 0 __pctype_func -1b359 0 29 3986 -1b359 7 35 3986 -1b360 3 36 3986 -1b363 18 38 3986 -1b37b 6 39 3986 -1b381 1 40 3986 -FUNC 1b382 419 0 _get_lc_time -1b382 6 94 3379 -1b388 12 104 3379 -1b39a 3 105 3379 -1b39d 2 170 3379 -1b39f 9 108 3379 -1b3a8 16 112 3379 -1b3be 15 113 3379 -1b3d3 15 114 3379 -1b3e8 18 115 3379 -1b400 15 116 3379 -1b415 13 117 3379 -1b428 14 118 3379 -1b43c 18 120 3379 -1b454 15 121 3379 -1b469 15 122 3379 -1b47e 15 123 3379 -1b493 18 124 3379 -1b4ab 15 125 3379 -1b4c0 15 126 3379 -1b4d5 15 128 3379 -1b4ea 18 129 3379 -1b502 15 130 3379 -1b517 15 131 3379 -1b52c 15 132 3379 -1b541 18 133 3379 -1b559 15 134 3379 -1b56e 15 135 3379 -1b583 15 136 3379 -1b598 18 137 3379 -1b5b0 15 138 3379 -1b5c5 15 139 3379 -1b5da 15 141 3379 -1b5ef 18 142 3379 -1b607 15 143 3379 -1b61c 15 144 3379 -1b631 15 145 3379 -1b646 18 146 3379 -1b65e 18 147 3379 -1b676 18 148 3379 -1b68e 18 149 3379 -1b6a6 1b 150 3379 -1b6c1 18 151 3379 -1b6d9 18 152 3379 -1b6f1 18 154 3379 -1b709 1b 155 3379 -1b724 18 160 3379 -1b73c 18 161 3379 -1b754 1b 163 3379 -1b76f 20 165 3379 -1b78f a 169 3379 -1b799 2 170 3379 -FUNC 1b79b 190 4 __free_lc_time -1b79b 1 179 3379 -1b79c c 180 3379 -1b7a8 8 183 3379 -1b7b0 8 184 3379 -1b7b8 8 185 3379 -1b7c0 8 186 3379 -1b7c8 8 187 3379 -1b7d0 8 188 3379 -1b7d8 7 189 3379 -1b7df 8 191 3379 -1b7e7 8 192 3379 -1b7ef 8 193 3379 -1b7f7 8 194 3379 -1b7ff 8 195 3379 -1b807 8 196 3379 -1b80f 8 197 3379 -1b817 8 199 3379 -1b81f b 200 3379 -1b82a 8 201 3379 -1b832 8 202 3379 -1b83a 8 203 3379 -1b842 8 204 3379 -1b84a 8 205 3379 -1b852 8 206 3379 -1b85a 8 207 3379 -1b862 8 208 3379 -1b86a 8 209 3379 -1b872 8 210 3379 -1b87a 8 212 3379 -1b882 8 213 3379 -1b88a 8 214 3379 -1b892 8 215 3379 -1b89a 8 216 3379 -1b8a2 b 217 3379 -1b8ad b 218 3379 -1b8b8 b 219 3379 -1b8c3 b 220 3379 -1b8ce b 221 3379 -1b8d9 b 222 3379 -1b8e4 b 223 3379 -1b8ef b 225 3379 -1b8fa b 226 3379 -1b905 b 228 3379 -1b910 b 229 3379 -1b91b f 230 3379 -1b92a 1 232 3379 -FUNC 1b92b 73 4 __init_time -1b92b 4 56 3379 -1b92f f 60 3379 -1b93e 16 64 3379 -1b954 4 65 3379 -1b958 b 67 3379 -1b963 6 69 3379 -1b969 8 70 3379 -1b971 2 71 3379 -1b973 6 73 3379 -1b979 2 74 3379 -1b97b 2 75 3379 -1b97d 18 78 3379 -1b995 2 82 3379 -1b997 6 83 3379 -1b99d 1 84 3379 -FUNC 1b99e 33 0 fix_grouping -1b99e 0 32 3427 -1b99e 8 40 3427 -1b9a6 a 43 3427 -1b9b0 4 45 3427 -1b9b4 1 61 3427 -1b9b5 6 40 3427 -1b9bb 1 63 3427 -1b9bc 4 50 3427 -1b9c0 2 52 3427 -1b9c2 7 55 3427 -1b9c9 6 56 3427 -1b9cf 2 60 3427 -FUNC 1b9d1 40 4 __free_lconv_num -1b9d1 1 211 3427 -1b9d2 8 212 3427 -1b9da a 215 3427 -1b9e4 7 216 3427 -1b9eb b 218 3427 -1b9f6 7 219 3427 -1b9fd b 221 3427 -1ba08 8 222 3427 -1ba10 1 223 3427 -FUNC 1ba11 1c8 4 __init_numeric -1ba11 7 84 3427 -1ba18 4 92 3427 -1ba1c 2 93 3427 -1ba1e 11 96 3427 -1ba2f 3 177 3427 -1ba32 3 178 3427 -1ba35 c 179 3427 -1ba41 14 102 3427 -1ba55 8 103 3427 -1ba5d 9 108 3427 -1ba66 13 113 3427 -1ba79 9 115 3427 -1ba82 2 116 3427 -1ba84 2 118 3427 -1ba86 9 120 3427 -1ba8f 12 125 3427 -1baa1 8 127 3427 -1baa9 a 128 3427 -1bab3 7 129 3427 -1baba 2 131 3427 -1babc 19 140 3427 -1bad5 15 142 3427 -1baea 1b 144 3427 -1bb05 2 146 3427 -1bb07 c 148 3427 -1bb13 1e 154 3427 -1bb31 2 156 3427 -1bb33 17 154 3427 -1bb4a b 164 3427 -1bb55 9 165 3427 -1bb5e c 166 3427 -1bb6a 8 168 3427 -1bb72 7 169 3427 -1bb79 2 170 3427 -1bb7b 13 186 3427 -1bb8e 11 191 3427 -1bb9f b 193 3427 -1bbaa d 194 3427 -1bbb7 9 197 3427 -1bbc0 9 198 3427 -1bbc9 9 200 3427 -1bbd2 5 201 3427 -1bbd7 2 202 3427 -FUNC 1bbd9 33 0 fix_grouping -1bbd9 0 214 3470 -1bbd9 8 222 3470 -1bbe1 a 225 3470 -1bbeb 4 227 3470 -1bbef 1 243 3470 -1bbf0 6 222 3470 -1bbf6 1 245 3470 -1bbf7 4 232 3470 -1bbfb 2 234 3470 -1bbfd 7 237 3470 -1bc04 6 238 3470 -1bc0a 2 242 3470 -FUNC 1bc0c 89 4 __free_lconv_mon -1bc0c 1 255 3470 -1bc0d 8 256 3470 -1bc15 b 259 3470 -1bc20 7 260 3470 -1bc27 b 262 3470 -1bc32 7 263 3470 -1bc39 b 265 3470 -1bc44 7 266 3470 -1bc4b b 268 3470 -1bc56 7 269 3470 -1bc5d b 271 3470 -1bc68 7 272 3470 -1bc6f b 274 3470 -1bc7a 7 275 3470 -1bc81 b 277 3470 -1bc8c 8 278 3470 -1bc94 1 279 3470 -FUNC 1bc95 2c4 4 __init_monetary -1bc95 8 65 3470 -1bc9d 6 73 3470 -1bca3 13 77 3470 -1bcb6 3 187 3470 -1bcb9 3 188 3470 -1bcbc a 189 3470 -1bcc6 11 83 3470 -1bcd7 8 84 3470 -1bcdf f 89 3470 -1bcee 7 91 3470 -1bcf5 2 92 3470 -1bcf7 2 94 3470 -1bcf9 9 96 3470 -1bd02 f 101 3470 -1bd11 6 103 3470 -1bd17 9 104 3470 -1bd20 2 105 3470 -1bd22 2 107 3470 -1bd24 4 112 3470 -1bd28 14 117 3470 -1bd3c 14 119 3470 -1bd50 14 121 3470 -1bd64 17 123 3470 -1bd7b 14 125 3470 -1bd8f 14 128 3470 -1bda3 14 130 3470 -1bdb7 17 133 3470 -1bdce 14 135 3470 -1bde2 14 137 3470 -1bdf6 14 139 3470 -1be0a 17 141 3470 -1be21 14 143 3470 -1be35 14 145 3470 -1be49 17 147 3470 -1be60 2 149 3470 -1be62 6 150 3470 -1be68 6 151 3470 -1be6e 8 152 3470 -1be76 b 153 3470 -1be81 5 154 3470 -1be86 1c 157 3470 -1bea2 2 159 3470 -1bea4 17 157 3470 -1bebb c 169 3470 -1bec7 3 175 3470 -1beca 32 181 3470 -1befc 11 194 3470 -1bf0d 15 199 3470 -1bf22 b 201 3470 -1bf2d d 202 3470 -1bf3a 9 204 3470 -1bf43 9 205 3470 -1bf4c 6 206 3470 -1bf52 5 208 3470 -1bf57 2 209 3470 -FUNC 1bf59 395 4 __init_ctype -1bf59 11 59 3562 -1bf6a 6 60 3562 -1bf70 1f 82 3562 -1bf8f 7 84 3562 -1bf96 20 89 3562 -1bfb6 7 94 3562 -1bfbd 10 98 3562 -1bfcd b 100 3562 -1bfd8 b 102 3562 -1bfe3 12 104 3562 -1bff5 2f 106 3562 -1c024 5 109 3562 -1c029 2 112 3562 -1c02b e 113 3562 -1c039 15 115 3562 -1c04e a 118 3562 -1c058 4 121 3562 -1c05c 8 124 3562 -1c064 e 126 3562 -1c072 9 128 3562 -1c07b b 129 3562 -1c086 b 128 3562 -1c091 2c 140 3562 -1c0bd 33 155 3562 -1c0f0 2d 166 3562 -1c11d 37 178 3562 -1c154 11 180 3562 -1c165 17 182 3562 -1c17c 15 183 3562 -1c191 d 180 3562 -1c19e 12 189 3562 -1c1b0 f 190 3562 -1c1bf 12 191 3562 -1c1d1 18 195 3562 -1c1e9 11 198 3562 -1c1fa 13 199 3562 -1c20d e 200 3562 -1c21b e 201 3562 -1c229 9 203 3562 -1c232 6 204 3562 -1c238 9 206 3562 -1c241 9 207 3562 -1c24a 9 208 3562 -1c253 9 209 3562 -1c25c 9 210 3562 -1c265 9 213 3562 -1c26e 4 214 3562 -1c272 8 217 3562 -1c27a 8 218 3562 -1c282 8 219 3562 -1c28a 10 220 3562 -1c29a 13 227 3562 -1c2ad 2 231 3562 -1c2af 6 232 3562 -1c2b5 a 233 3562 -1c2bf a 234 3562 -1c2c9 a 235 3562 -1c2d3 a 236 3562 -1c2dd 2 238 3562 -1c2df f 240 3562 -FUNC 1c2ee 29 0 ___mb_cur_max_func -1c2ee 0 248 3562 -1c2ee 7 254 3562 -1c2f5 3 255 3562 -1c2f8 18 257 3562 -1c310 6 259 3562 -1c316 1 260 3562 -FUNC 1c317 16 4 ___mb_cur_max_l_func -1c317 0 263 3562 -1c317 15 264 3562 -1c32c 1 265 3562 -FUNC 1c32d 26 0 ___lc_codepage_func -1c32d 0 268 3562 -1c32d 7 274 3562 -1c334 3 275 3562 -1c337 18 277 3562 -1c34f 3 279 3562 -1c352 1 280 3562 -FUNC 1c353 26 0 ___lc_collate_cp_func -1c353 0 284 3562 -1c353 7 290 3562 -1c35a 3 291 3562 -1c35d 18 293 3562 -1c375 3 295 3562 -1c378 1 296 3562 -FUNC 1c379 26 0 ___lc_handle_func -1c379 0 300 3562 -1c379 7 306 3562 -1c380 3 307 3562 -1c383 18 309 3562 -1c39b 3 311 3562 -1c39e 1 312 3562 -FUNC 1c39f 3 4 __init_collate -1c39f 0 41 3650 -1c39f 2 42 3650 -1c3a1 1 43 3650 -FUNC 1c3a2 fe 4 _Getdays_l -1c3a2 9 111 516 -1c3ab d 115 516 -1c3b8 9 117 516 -1c3c1 9 119 516 -1c3ca 28 120 516 -1c3f2 b 121 516 -1c3fd c 123 516 -1c409 4 126 516 -1c40d 30 128 516 -1c43d 8 129 516 -1c445 31 131 516 -1c476 12 132 516 -1c488 3 134 516 -1c48b 13 137 516 -1c49e 2 138 516 -FUNC 1c4a0 9 0 _Getdays -1c4a0 0 142 516 -1c4a0 8 143 516 -1c4a8 1 144 516 -FUNC 1c4a9 fe 4 _Getmonths_l -1c4a9 9 150 516 -1c4b2 d 154 516 -1c4bf 16 156 516 -1c4d5 2b 159 516 -1c500 b 160 516 -1c50b 8 162 516 -1c513 a 163 516 -1c51d 2d 167 516 -1c54a 8 168 516 -1c552 2c 170 516 -1c57e 11 171 516 -1c58f 3 173 516 -1c592 13 176 516 -1c5a5 2 177 516 -FUNC 1c5a7 9 0 _Getmonths -1c5a7 0 181 516 -1c5a7 8 182 516 -1c5af 1 183 516 -FUNC 1c5b0 355 4 _Gettnames_l -1c5b0 9 189 516 -1c5b9 d 193 516 -1c5c6 9 195 516 -1c5cf 9 197 516 -1c5d8 28 198 516 -1c600 d 199 516 -1c60d 29 200 516 -1c636 18 201 516 -1c64e 11 202 516 -1c65f f 203 516 -1c66e f 204 516 -1c67d 7 205 516 -1c684 e 206 516 -1c692 8 208 516 -1c69a 12 212 516 -1c6ac 13 213 516 -1c6bf 6 214 516 -1c6c5 2a 215 516 -1c6ef 6 216 516 -1c6f5 d 217 516 -1c702 26 218 516 -1c728 1c 219 516 -1c744 18 221 516 -1c75c 6 222 516 -1c762 26 223 516 -1c788 a 224 516 -1c792 5 225 516 -1c797 2a 226 516 -1c7c1 18 227 516 -1c7d9 30 230 516 -1c809 a 231 516 -1c813 30 233 516 -1c843 a 234 516 -1c84d 30 236 516 -1c87d a 237 516 -1c887 30 239 516 -1c8b7 a 240 516 -1c8c1 30 242 516 -1c8f1 12 245 516 -1c903 2 246 516 -FUNC 1c905 9 0 _Gettnames -1c905 0 250 516 -1c905 8 251 516 -1c90d 1 252 516 -FUNC 1c90e 20 0 _store_str -1c90e 0 869 516 -1c90e f 871 516 -1c91d 7 872 516 -1c924 9 873 516 -1c92d 1 875 516 -FUNC 1c92e 36 0 _store_number -1c92e 0 965 516 -1c92e 8 973 516 -1c936 c 976 516 -1c942 2 977 516 -1c944 b 978 516 -1c94f 2 981 516 -1c951 2 982 516 -1c953 1 983 516 -1c954 7 988 516 -1c95b 3 989 516 -1c95e 5 990 516 -1c963 1 991 516 -FUNC 1c964 79 4 _store_num -1c964 8 909 516 -1c96c 2 910 516 -1c96e 8 912 516 -1c976 33 913 516 -1c9a9 2 914 516 -1c9ab 4 917 516 -1c9af 8 918 516 -1c9b7 b 919 516 -1c9c2 c 921 516 -1c9ce 5 923 516 -1c9d3 2 924 516 -1c9d5 2 926 516 -1c9d7 4 927 516 -1c9db 2 928 516 -FUNC 1c9dd 3e6 10 _expandtime -1c9dd 5 548 516 -1c9e2 4f 558 516 -1ca31 16 659 516 -1ca47 5 662 516 -1ca4c 16 587 516 -1ca62 7 589 516 -1ca69 5 590 516 -1ca6e 16 571 516 -1ca84 7 573 516 -1ca8b 5 574 516 -1ca90 5 822 516 -1ca95 7 823 516 -1ca9c 5 824 516 -1caa1 16 667 516 -1cab7 10 668 516 -1cac7 2 669 516 -1cac9 5 672 516 -1cace 23 558 516 -1caf1 6 787 516 -1caf7 5 789 516 -1cafc 15 736 516 -1cb11 2 737 516 -1cb13 2 739 516 -1cb15 5 740 516 -1cb1a 15 722 516 -1cb2f 2 723 516 -1cb31 16 742 516 -1cb47 4 743 516 -1cb4b 2 744 516 -1cb4d 5 745 516 -1cb52 6 746 516 -1cb58 8 747 516 -1cb60 1 748 516 -1cb61 5 752 516 -1cb66 f 715 516 -1cb75 5 718 516 -1cb7a 3 696 516 -1cb7d 2 699 516 -1cb7f 1d 804 516 -1cb9c 6 806 516 -1cba2 d 808 516 -1cbaf 2 809 516 -1cbb1 37 558 516 -1cbe8 19 678 516 -1cc01 8 680 516 -1cc09 2 681 516 -1cc0b 15 650 516 -1cc20 13 652 516 -1cc33 5 653 516 -1cc38 1e 601 516 -1cc56 2 603 516 -1cc58 5 606 516 -1cc5d 2 607 516 -1cc5f 2 608 516 -1cc61 25 615 516 -1cc86 2 617 516 -1cc88 1 627 516 -1cc89 2 642 516 -1cc8b e 579 516 -1cc99 7 581 516 -1cca0 5 582 516 -1cca5 2d 562 516 -1ccd2 6 564 516 -1ccd8 5 565 516 -1ccdd e 687 516 -1cceb 3 689 516 -1ccee 5 690 516 -1ccf3 15 558 516 -1cd08 2 834 516 -1cd0a 5 814 516 -1cd0f 19 817 516 -1cd28 5 819 516 -1cd2d d 795 516 -1cd3a b 798 516 -1cd45 5 799 516 -1cd4a 11 762 516 -1cd5b 5 764 516 -1cd60 1 774 516 -1cd61 5 776 516 -1cd66 16 729 516 -1cd7c 6 731 516 -1cd82 5 732 516 -1cd87 16 704 516 -1cd9d 3 705 516 -1cda0 b 706 516 -1cdab 2 707 516 -1cdad e 708 516 -1cdbb 6 839 516 -1cdc1 2 840 516 -FUNC 1cdc3 45d 18 _store_winword -1cdc3 10 1035 516 -1cdd3 5 1043 516 -1cdd8 a 1053 516 -1cde2 3 1043 516 -1cde5 6 1053 516 -1cdeb 2 1054 516 -1cded 6 1049 516 -1cdf3 2 1050 516 -1cdf5 6 1046 516 -1cdfb 10 1057 516 -1ce0b 4 1066 516 -1ce0f 8 1067 516 -1ce17 6 1069 516 -1ce1d d 1075 516 -1ce2a a 1076 516 -1ce34 8 1077 516 -1ce3c 4 1078 516 -1ce40 2a 1085 516 -1ce6a b 1087 516 -1ce75 31 1092 516 -1cea6 7 1093 516 -1cead 3 1097 516 -1ceb0 13 1100 516 -1cec3 10 1101 516 -1ced3 b 1102 516 -1cede b 1103 516 -1cee9 9 1106 516 -1cef2 3 1291 516 -1cef5 12 1292 516 -1cf07 11 1114 516 -1cf18 5 1117 516 -1cf1d b 1120 516 -1cf28 37 1125 516 -1cf5f 14 1274 516 -1cf73 c 1277 516 -1cf7f 8 1283 516 -1cf87 4 1284 516 -1cf8b 9 1286 516 -1cf94 c 1287 516 -1cfa0 5 1277 516 -1cfa5 e 1128 516 -1cfb3 7 1133 516 -1cfba 7 1132 516 -1cfc1 7 1130 516 -1cfc8 2 1131 516 -1cfca 5 1134 516 -1cfcf a 1156 516 -1cfd9 7 1158 516 -1cfe0 2 1159 516 -1cfe2 5 1160 516 -1cfe7 11 1175 516 -1cff8 5 1176 516 -1cffd 11 1177 516 -1d00e 6 1178 516 -1d014 2 1179 516 -1d016 5 1180 516 -1d01b b 1225 516 -1d026 13 1226 516 -1d039 4 1228 516 -1d03d 1a 1233 516 -1d057 9 1236 516 -1d060 8 1242 516 -1d068 4 1243 516 -1d06c 9 1246 516 -1d075 8 1247 516 -1d07d 5 1277 516 -1d082 1 1230 516 -1d083 5 1250 516 -1d088 12 1136 516 -1d09a 7 1141 516 -1d0a1 7 1140 516 -1d0a8 7 1138 516 -1d0af 2 1139 516 -1d0b1 5 1142 516 -1d0b6 29 1125 516 -1d0df e 1144 516 -1d0ed 7 1147 516 -1d0f4 2 1146 516 -1d0f6 5 1148 516 -1d0fb 7 1182 516 -1d102 b 1183 516 -1d10d 2 1184 516 -1d10f 6 1185 516 -1d115 12 1187 516 -1d127 17 1188 516 -1d13e c 1191 516 -1d14a 8 1197 516 -1d152 4 1198 516 -1d156 8 1201 516 -1d15e 2 1202 516 -1d160 5 1203 516 -1d165 9 1204 516 -1d16e 1a 1205 516 -1d188 9 1207 516 -1d191 8 1212 516 -1d199 4 1213 516 -1d19d 9 1215 516 -1d1a6 8 1216 516 -1d1ae 2 1220 516 -1d1b0 d 1168 516 -1d1bd 7 1170 516 -1d1c4 2 1171 516 -1d1c6 2 1172 516 -1d1c8 d 1162 516 -1d1d5 7 1164 516 -1d1dc 2 1165 516 -1d1de 2 1166 516 -1d1e0 d 1150 516 -1d1ed 7 1152 516 -1d1f4 2 1153 516 -1d1f6 1b 1268 516 -1d211 3 1272 516 -1d214 5 1273 516 -1d219 7 1194 516 -FUNC 1d220 1af 18 _Strftime_l -1d220 6 356 516 -1d226 4 361 516 -1d22a 13 362 516 -1d23d 33 364 516 -1d270 33 365 516 -1d2a3 d 368 516 -1d2b0 10 375 516 -1d2c0 e 385 516 -1d2ce a 387 516 -1d2d8 1e 435 516 -1d2f6 4 438 516 -1d2fa a 446 516 -1d304 5 447 516 -1d309 b 452 516 -1d314 3 453 516 -1d317 2 454 516 -1d319 7 400 516 -1d320 1 405 516 -1d321 2 408 516 -1d323 5 409 516 -1d328 1 411 516 -1d329 1 412 516 -1d32a 1d 415 516 -1d347 1 428 516 -1d348 5 385 516 -1d34d 5 464 516 -1d352 5 469 516 -1d357 13 470 516 -1d36a 3 441 516 -1d36d f 478 516 -1d37c b 481 516 -1d387 2 483 516 -1d389 b 402 516 -1d394 2 403 516 -1d396 5 421 516 -1d39b 7 423 516 -1d3a2 2 464 516 -1d3a4 18 485 516 -1d3bc 11 488 516 -1d3cd 2 490 516 -FUNC 1d3cf 1e 14 _strftime_l -1d3cf 3 291 516 -1d3d2 19 292 516 -1d3eb 2 293 516 -FUNC 1d3ed 1d 10 strftime -1d3ed 0 300 516 -1d3ed 1c 301 516 -1d409 1 302 516 -FUNC 1d40a 1e 14 _Strftime -1d40a 3 343 516 -1d40d 19 345 516 -1d426 2 346 516 -FUNC 1d428 26 0 localeconv -1d428 0 69 3302 -1d428 5 75 3302 -1d42d 1b 78 3302 -1d448 5 79 3302 -1d44d 1 80 3302 -FUNC 1d450 46 8 strcspn -1d450 4 191 924 -1d454 2 198 924 -1d456 1 199 924 -1d457 1 200 924 -1d458 1 201 924 -1d459 1 202 924 -1d45a 1 203 924 -1d45b 1 204 924 -1d45c 1 205 924 -1d45d 1 206 924 -1d45e 6 212 924 -1d464 2 216 924 -1d466 2 217 924 -1d468 2 218 924 -1d46a 3 219 924 -1d46d 4 220 924 -1d471 2 221 924 -1d473 3 227 924 -1d476 6 229 924 -1d47c 3 234 924 -1d47f 2 236 924 -1d481 2 237 924 -1d483 2 238 924 -1d485 3 239 924 -1d488 4 240 924 -1d48c 2 245 924 -1d48e 2 255 924 -1d490 3 257 924 -1d493 3 259 924 -FUNC 1d496 60 c TranslateName -1d496 3 340 3849 -1d499 3 342 3849 -1d49c 3 343 3849 -1d49f b 346 3849 -1d4aa a 348 3849 -1d4b4 14 349 3849 -1d4c8 6 351 3849 -1d4ce a 352 3849 -1d4d8 2 353 3849 -1d4da 4 354 3849 -1d4de 2 355 3849 -1d4e0 3 356 3849 -1d4e3 7 346 3849 -1d4ea a 359 3849 -1d4f4 2 360 3849 -FUNC 1d4f6 14 0 GetLcidFromDefault -1d4f6 0 761 3849 -1d4f6 7 762 3849 -1d4fd c 763 3849 -1d509 1 764 3849 -FUNC 1d50a 77 0 ProcessCodePage -1d50a 13 784 3849 -1d51d 1a 787 3849 -1d537 11 795 3849 -1d548 8 799 3849 -1d550 2 801 3849 -1d552 18 791 3849 -1d56a 3 793 3849 -1d56d 7 805 3849 -1d574 d 806 3849 -FUNC 1d581 1e 4 TestDefaultCountry -1d581 0 826 3849 -1d581 2 830 3849 -1d583 15 832 3849 -1d598 3 835 3849 -1d59b 1 836 3849 -1d59c 2 833 3849 -1d59e 1 836 3849 -FUNC 1d59f 32 0 LcidFromHexString -1d59f 1 893 3849 -1d5a0 2 895 3849 -1d5a2 2 897 3849 -1d5a4 9 899 3849 -1d5ad 5 900 3849 -1d5b2 8 901 3849 -1d5ba 3 902 3849 -1d5bd 10 903 3849 -1d5cd 3 906 3849 -1d5d0 1 907 3849 -FUNC 1d5d1 1b 0 GetPrimaryLen -1d5d1 0 926 3849 -1d5d1 2 927 3849 -1d5d3 3 930 3849 -1d5d6 12 931 3849 -1d5e8 1 933 3849 -1d5e9 2 935 3849 -1d5eb 1 938 3849 -FUNC 1d5ec 96 4 CountryEnumProc -1d5ec 15 717 3849 -1d601 7 718 3849 -1d608 f 719 3849 -1d617 23 725 3849 -1d63a 3 728 3849 -1d63d 3 729 3849 -1d640 12 731 3849 -1d652 b 734 3849 -1d65d a 738 3849 -1d667 b 741 3849 -1d672 10 742 3849 -FUNC 1d682 72 8 TestDefaultLanguage -1d682 11 858 3849 -1d693 22 864 3849 -1d6b5 4 865 3849 -1d6b9 d 867 3849 -1d6c6 1c 871 3849 -1d6e2 2 872 3849 -1d6e4 3 874 3849 -1d6e7 d 875 3849 -FUNC 1d6f4 1d0 4 LangCountryEnumProc -1d6f4 16 435 3849 -1d70a 7 436 3849 -1d711 d 437 3849 -1d71e 27 444 3849 -1d745 4 447 3849 -1d749 8 448 3849 -1d751 16 450 3849 -1d767 1d 456 3849 -1d784 2 460 3849 -1d786 11 462 3849 -1d797 7 467 3849 -1d79e 5 468 3849 -1d7a3 6 472 3849 -1d7a9 1a 475 3849 -1d7c3 14 482 3849 -1d7d7 3 483 3849 -1d7da a 487 3849 -1d7e4 b 490 3849 -1d7ef 6 493 3849 -1d7f5 3 494 3849 -1d7f8 12 501 3849 -1d80a 1d 506 3849 -1d827 6 510 3849 -1d82d c 513 3849 -1d839 16 518 3849 -1d84f 8 522 3849 -1d857 14 528 3849 -1d86b 2 531 3849 -1d86d 2 540 3849 -1d86f 1b 550 3849 -1d88a f 553 3849 -1d899 7 557 3849 -1d8a0 5 558 3849 -1d8a5 3 559 3849 -1d8a8 b 566 3849 -1d8b3 11 567 3849 -FUNC 1d8c4 bf 4 LanguageEnumProc -1d8c4 15 624 3849 -1d8d9 7 625 3849 -1d8e0 f 626 3849 -1d8ef 23 632 3849 -1d912 3 635 3849 -1d915 3 636 3849 -1d918 11 639 3849 -1d929 7 643 3849 -1d930 2 650 3849 -1d932 1d 651 3849 -1d94f f 654 3849 -1d95e a 658 3849 -1d968 b 662 3849 -1d973 10 663 3849 -FUNC 1d983 2c 0 GetLcidFromCountry -1d983 0 686 3849 -1d983 10 687 3849 -1d993 11 689 3849 -1d9a4 6 693 3849 -1d9aa 4 694 3849 -1d9ae 1 695 3849 -FUNC 1d9af 65 0 GetLcidFromLangCountry -1d9af 0 386 3849 -1d9af 7 388 3849 -1d9b6 1a 389 3849 -1d9d0 5 390 3849 -1d9d5 17 392 3849 -1d9ec 10 394 3849 -1d9fc 13 402 3849 -1da0f 4 403 3849 -1da13 1 404 3849 -FUNC 1da14 3c 0 GetLcidFromLanguage -1da14 0 591 3849 -1da14 13 593 3849 -1da27 e 594 3849 -1da35 10 596 3849 -1da45 6 600 3849 -1da4b 4 601 3849 -1da4f 1 602 3849 -FUNC 1da50 1e3 c __get_qualified_locale -1da50 4 205 3849 -1da54 5 208 3849 -1da59 12 212 3849 -1da6b 7 215 3849 -1da72 5 217 3849 -1da77 3 222 3849 -1da7a f 223 3849 -1da89 10 226 3849 -1da99 d 230 3849 -1daa6 a 232 3849 -1dab0 5 235 3849 -1dab5 2 237 3849 -1dab7 5 240 3849 -1dabc 5 243 3849 -1dac1 14 248 3849 -1dad5 a 250 3849 -1dadf 5 252 3849 -1dae4 2 254 3849 -1dae6 5 256 3849 -1daeb 2 261 3849 -1daed a 263 3849 -1daf7 28 266 3849 -1db1f 2 268 3849 -1db21 13 271 3849 -1db34 3 277 3849 -1db37 6 278 3849 -1db3d 17 281 3849 -1db54 32 285 3849 -1db86 d 289 3849 -1db93 6 290 3849 -1db99 8 293 3849 -1dba1 7 295 3849 -1dba8 8 296 3849 -1dbb0 4 297 3849 -1dbb4 8 301 3849 -1dbbc d 305 3849 -1dbc9 23 306 3849 -1dbec 2 307 3849 -1dbee f 308 3849 -1dbfd 2 309 3849 -1dbff 12 311 3849 -1dc11 2 312 3849 -1dc13 14 313 3849 -1dc27 5 315 3849 -1dc2c 6 286 3849 -1dc32 1 316 3849 -FUNC 1dc33 12 0 cmpResult -FUNC 1dc45 18 0 cmpBYTE -FUNC 1dc5d 40 0 cmpWORD -FUNC 1dc9d 78 0 cmpDWORD -FUNC 1dd15 1490 0 unaligned_memcmp -FUNC 1f1a5 1680 c memcmp -FUNC 20825 be c strncmp -20825 4 42 876 -20829 5 43 876 -2082e 7 45 876 -20835 7 46 876 -2083c 6 48 876 -20842 d 51 876 -2084f 11 56 876 -20860 c 61 876 -2086c c 66 876 -20878 15 71 876 -2088d 2 81 876 -2088f a 73 876 -20899 a 68 876 -208a3 a 63 876 -208ad 10 58 876 -208bd 2 79 876 -208bf a 81 876 -208c9 1 85 876 -208ca 4 86 876 -208ce 5 79 876 -208d3 4 89 876 -208d7 2 90 876 -208d9 a 83 876 -FUNC 208f0 40 8 strpbrk -208f0 4 191 869 -208f4 2 198 869 -208f6 1 199 869 -208f7 1 200 869 -208f8 1 201 869 -208f9 1 202 869 -208fa 1 203 869 -208fb 1 204 869 -208fc 1 205 869 -208fd 1 206 869 -208fe 6 212 869 -20904 2 216 869 -20906 2 217 869 -20908 2 218 869 -2090a 3 219 869 -2090d 4 220 869 -20911 2 221 869 -20913 5 227 869 -20918 2 236 869 -2091a 2 237 869 -2091c 2 238 869 -2091e 3 239 869 -20921 4 240 869 -20925 2 247 869 -20927 3 248 869 -2092a 3 257 869 -2092d 3 259 869 -FUNC 20930 82 c _iswctype_l -20930 6 66 6445 -20936 8 69 6445 -2093e 6 70 6445 -20944 8 71 6445 -2094c 18 72 6445 -20964 2 73 6445 -20966 b 75 6445 -20971 25 85 6445 -20996 3 86 6445 -20999 d 87 6445 -209a6 a 89 6445 -209b0 2 90 6445 -FUNC 209b2 6e 8 iswctype -209b2 4 96 6445 -209b6 8 97 6445 -209be 2 99 6445 -209c0 2 122 6445 -209c2 8 101 6445 -209ca 14 103 6445 -209de 2 122 6445 -209e0 9 106 6445 -209e9 25 117 6445 -20a0e 10 121 6445 -20a1e 2 122 6445 -FUNC 20a20 5 8 is_wctype -20a20 0 148 6445 -20a20 5 149 6445 -FUNC 20a25 22b 14 strtoxl -20a25 8 80 6309 -20a2d b 86 6309 -20a38 3 89 6309 -20a3b b 92 6309 -20a46 30 94 6309 -20a76 11 95 6309 -20a87 c 100 6309 -20a93 34 101 6309 -20ac7 5 102 6309 -20acc 5 104 6309 -20ad1 4 105 6309 -20ad5 2 106 6309 -20ad7 5 108 6309 -20adc 3 109 6309 -20adf 1d 111 6309 -20afc 4 118 6309 -20b00 5 121 6309 -20b05 9 122 6309 -20b0e a 123 6309 -20b18 9 126 6309 -20b21 7 124 6309 -20b28 2 129 6309 -20b2a 5 140 6309 -20b2f f 142 6309 -20b3e 1 143 6309 -20b3f 9 144 6309 -20b48 8 149 6309 -20b50 c 154 6309 -20b5c 8 155 6309 -20b64 7 156 6309 -20b6b 13 157 6309 -20b7e 5 160 6309 -20b83 4 164 6309 -20b87 b 171 6309 -20b92 4 177 6309 -20b96 6 178 6309 -20b9c 8 190 6309 -20ba4 6 193 6309 -20baa 3 195 6309 -20bad 4 196 6309 -20bb1 2 198 6309 -20bb3 c 173 6309 -20bbf 3 185 6309 -20bc2 2 186 6309 -20bc4 24 201 6309 -20be8 5 204 6309 -20bed c 205 6309 -20bf9 6 206 6309 -20bff 10 207 6309 -20c0f 7 213 6309 -20c16 2 215 6309 -20c18 6 217 6309 -20c1e 3 219 6309 -20c21 12 221 6309 -20c33 7 113 6309 -20c3a 2 115 6309 -20c3c 12 116 6309 -20c4e 2 222 6309 -FUNC 20c50 29 c strtol -20c50 3 229 6309 -20c53 8 230 6309 -20c5b 13 232 6309 -20c6e 9 236 6309 -20c77 2 238 6309 -FUNC 20c79 1b 10 _strtol_l -20c79 0 246 6309 -20c79 1a 247 6309 -20c93 1 248 6309 -FUNC 20c94 2a c strtoul -20c94 3 255 6309 -20c97 7 256 6309 -20c9e 14 258 6309 -20cb2 a 262 6309 -20cbc 2 264 6309 -FUNC 20cbe 1b 10 _strtoul_l -20cbe 0 272 6309 -20cbe 1a 273 6309 -20cd8 1 274 6309 -FUNC 20cd9 1f 0 __initconin -20cd9 0 58 5008 -20cd9 1e 65 5008 -20cf7 1 67 5008 -FUNC 20cf8 1f 0 __initconout -20cf8 0 90 5008 -20cf8 1e 97 5008 -20d16 1 98 5008 -FUNC 20d17 2d 0 __termcon -20d17 0 120 5008 -20d17 16 121 5008 -20d2d 3 122 5008 -20d30 f 125 5008 -20d3f 4 126 5008 -20d43 1 128 5008 -FUNC 20d44 94 4 _close_nolock -20d44 1 72 5094 -20d45 54 93 5094 -20d99 a 99 5094 -20da3 2 96 5094 -20da5 6 101 5094 -20dab b 103 5094 -20db6 11 105 5094 -20dc7 7 107 5094 -20dce 5 108 5094 -20dd3 4 111 5094 -20dd7 1 112 5094 -FUNC 20dd8 cd 4 _close -20dd8 c 42 5094 -20de4 23 46 5094 -20e07 2f 47 5094 -20e36 20 48 5094 -20e56 7 50 5094 -20e5d 3 52 5094 -20e60 9 53 5094 -20e69 c 54 5094 -20e75 2 55 5094 -20e77 b 56 5094 -20e82 4 57 5094 -20e86 c 61 5094 -20e92 3 65 5094 -20e95 6 66 5094 -20e9b a 62 5094 -FUNC 20ea5 2c 4 _freebuf -20ea5 1 47 1927 -20ea6 f 50 1927 -20eb5 8 52 1927 -20ebd 7 54 1927 -20ec4 8 55 1927 -20ecc 4 56 1927 -20ed0 1 58 1927 -FUNC 20ed1 2a 0 _purecall -20ed1 0 43 3119 -20ed1 b 44 3119 -20edc 5 45 3119 -20ee1 2 47 3119 -20ee3 7 54 3119 -20eea c 56 3119 -20ef6 5 57 3119 -FUNC 20efb 22 4 _set_purecall_handler -20efb 1 82 3119 -20efc b 85 3119 -20f07 12 86 3119 -20f19 3 88 3119 -20f1c 1 89 3119 -FUNC 20f1d d 0 _get_purecall_handler -20f1d 0 92 3119 -20f1d c 93 3119 -20f29 1 94 3119 -FUNC 20f30 34 0 _allmul -20f30 0 47 5116 -20f30 4 62 5116 -20f34 4 63 5116 -20f38 2 64 5116 -20f3a 4 65 5116 -20f3e 2 66 5116 -20f40 4 68 5116 -20f44 2 69 5116 -20f46 3 71 5116 -20f49 1 74 5116 -20f4a 2 81 5116 -20f4c 2 82 5116 -20f4e 4 84 5116 -20f52 4 85 5116 -20f56 2 86 5116 -20f58 4 88 5116 -20f5c 2 89 5116 -20f5e 2 90 5116 -20f60 1 92 5116 -20f61 3 94 5116 -FUNC 20f64 11 4 atol -20f64 0 55 6631 -20f64 10 56 6631 -20f74 1 57 6631 -FUNC 20f75 15 8 _atol_l -20f75 0 64 6631 -20f75 14 65 6631 -20f89 1 66 6631 -FUNC 20f8a 5 4 atoi -20f8a 0 99 6631 -20f8a 5 100 6631 -FUNC 20f8f 5 8 _atoi_l -20f8f 0 107 6631 -20f8f 5 108 6631 -FUNC 20f94 11 4 _atoi64 -20f94 0 143 6631 -20f94 10 144 6631 -20fa4 1 145 6631 -FUNC 20fa5 15 8 _atoi64_l -20fa5 0 151 6631 -20fa5 14 152 6631 -20fb9 1 153 6631 -FUNC 20fba 50 0 has_osfxsr_set -FUNC 2100a 60 0 _get_sse2_info -FUNC 2106a d 0 __sse2_available_init -FUNC 21077 170 8 _flswbuf -21077 5 93 1980 -2107c c 104 1980 -21088 8 106 1980 -21090 b 107 1980 -2109b 4 108 1980 -2109f a 109 1980 -210a9 4 110 1980 -210ad b 111 1980 -210b8 2 113 1980 -210ba 4 124 1980 -210be 4 125 1980 -210c2 8 126 1980 -210ca 3 127 1980 -210cd 8 128 1980 -210d5 3 137 1980 -210d8 11 138 1980 -210e9 9 141 1980 -210f2 25 151 1980 -21117 7 153 1980 -2111e d 158 1980 -2112b 5 162 1980 -21130 5 163 1980 -21135 7 164 1980 -2113c 7 166 1980 -21143 10 167 1980 -21153 2 168 1980 -21155 6 131 1980 -2115b 5 132 1980 -21160 2e 169 1980 -2118e 13 171 1980 -211a1 2 174 1980 -211a3 9 181 1980 -211ac 2 186 1980 -211ae 1d 195 1980 -211cb 5 201 1980 -211d0 4 202 1980 -211d4 7 203 1980 -211db a 209 1980 -211e5 2 212 1980 -FUNC 211e7 182 4 _wchartodigit -211e7 0 32 6613 -211e7 1b 41 6613 -21202 1 73 6613 -21203 e 42 6613 -21211 19 44 6613 -2122a 1 73 6613 -2122b 14 45 6613 -2123f 14 46 6613 -21253 14 47 6613 -21267 14 48 6613 -2127b 14 49 6613 -2128f 14 50 6613 -212a3 18 51 6613 -212bb 18 52 6613 -212d3 18 53 6613 -212eb 14 54 6613 -212ff 14 55 6613 -21313 12 56 6613 -21325 14 57 6613 -21339 14 58 6613 -2134d c 59 6613 -21359 2 62 6613 -2135b 4 67 6613 -2135f 6 69 6613 -21365 3 71 6613 -21368 1 73 6613 -FUNC 21369 b6 c _isctype_l -21369 7 114 6399 -21370 b 118 6399 -2137b d 121 6399 -21388 f 122 6399 -21397 1f 124 6399 -213b6 3 126 6399 -213b9 d 129 6399 -213c6 2 130 6399 -213c8 a 133 6399 -213d2 26 144 6399 -213f8 10 146 6399 -21408 15 149 6399 -2141d 2 150 6399 -FUNC 2141f 2f 8 _isctype -2141f 0 156 6399 -2141f 9 157 6399 -21428 12 159 6399 -2143a 1 165 6399 -2143b 12 163 6399 -2144d 1 165 6399 -FUNC 21450 2c 0 _alloca_probe_16 -21450 0 44 2632 -21450 1 46 2632 -21451 4 47 2632 -21455 2 48 2632 -21457 3 49 2632 -2145a 2 50 2632 -2145c 2 51 2632 -2145e 2 52 2632 -21460 1 53 2632 -21461 5 54 2632 -21466 1 59 2632 -21467 4 60 2632 -2146b 2 61 2632 -2146d 3 62 2632 -21470 2 63 2632 -21472 2 64 2632 -21474 2 65 2632 -21476 1 66 2632 -21477 5 67 2632 -PUBLIC 21466 0 _alloca_probe_8 -FUNC 2147c 47 4 __ansicp -2147c 10 39 2934 -2148c 1c 44 2934 -214a8 3 45 2934 -214ab 2 46 2934 -214ad a 47 2934 -214b7 c 49 2934 -FUNC 214c3 1b2 18 __convertcp -214c3 16 79 2934 -214d9 10 83 2934 -214e9 18 85 2934 -21501 17 90 2934 -21518 13 92 2934 -2152b 6 93 2934 -21531 d 99 2934 -2153e 2 101 2934 -21540 c 103 2934 -2154c 2a 115 2934 -21576 15 111 2934 -2158b 7 112 2934 -21592 1c 115 2934 -215ae 3 116 2934 -215b1 2 117 2934 -215b3 10 119 2934 -215c3 15 127 2934 -215d8 7 129 2934 -215df 18 138 2934 -215f7 3 139 2934 -215fa 2 140 2934 -215fc 1f 149 2934 -2161b 11 151 2934 -2162c 12 160 2934 -2163e 9 162 2934 -21647 3 163 2934 -2164a 2 164 2934 -2164c 6 165 2934 -21652 5 166 2934 -21657 9 174 2934 -21660 3 177 2934 -21663 12 178 2934 -FUNC 21675 34 4 _get_daylight -21675 0 35 487 -21675 27 36 487 -2169c 1 41 487 -2169d 8 39 487 -216a5 3 40 487 -216a8 1 41 487 -FUNC 216a9 34 4 _get_dstbias -216a9 0 44 487 -216a9 27 45 487 -216d0 1 50 487 -216d1 8 48 487 -216d9 3 49 487 -216dc 1 50 487 -FUNC 216dd 34 4 _get_timezone -216dd 0 53 487 -216dd 27 54 487 -21704 1 59 487 -21705 8 57 487 -2170d 3 58 487 -21710 1 59 487 -FUNC 21711 a2 10 _get_tzname -21711 3 62 487 -21714 10 63 487 -21724 4 64 487 -21728 3 66 487 -2172b 7 68 487 -21732 27 69 487 -21759 20 63 487 -21779 f 72 487 -21788 8 73 487 -21790 4 76 487 -21794 5 78 487 -21799 5 80 487 -2179e 13 82 487 -217b1 2 83 487 -FUNC 217b3 6 0 __daylight -217b3 0 118 487 -217b3 5 119 487 -217b8 1 120 487 -FUNC 217b9 6 0 __dstbias -217b9 0 123 487 -217b9 5 124 487 -217be 1 125 487 -FUNC 217bf 6 0 __timezone -217bf 0 128 487 -217bf 5 129 487 -217c4 1 130 487 -FUNC 217c5 6 0 __tzname -217c5 0 133 487 -217c5 5 134 487 -217ca 1 135 487 -FUNC 217cb c 4 _set_daylight -217cb c 189 418 -FUNC 217d7 c 4 _set_dstbias -217d7 c 190 418 -FUNC 217e3 c 4 _set_timezone -217e3 c 191 418 -FUNC 217ef 349 0 _tzset_nolock -217ef c 124 440 -217fb 5 127 440 -21800 3 129 440 -21803 3 130 440 -21806 3 131 440 -21809 3 132 440 -2180c 3 133 440 -2180f 8 135 440 -21817 3 136 440 -2181a 8 139 440 -21822 1b 142 440 -2183d 1b 143 440 -21858 1b 144 440 -21873 8 149 440 -2187b 6 154 440 -21881 f 160 440 -21890 18 165 440 -218a8 14 260 440 -218bc b 268 440 -218c7 4 274 440 -218cb 7 275 440 -218d2 16 277 440 -218e8 6 281 440 -218ee 32 283 440 -21920 9 174 440 -21929 7 175 440 -21930 6 176 440 -21936 13 179 440 -21949 9 183 440 -21952 b 188 440 -2195d 9 190 440 -21966 e 191 440 -21974 12 199 440 -21986 3 201 440 -21989 c 203 440 -21995 2 205 440 -21997 3 206 440 -2199a 3 214 440 -2199d 27 234 440 -219c4 8 235 440 -219cc 2 236 440 -219ce 7 237 440 -219d5 23 247 440 -219f8 9 248 440 -21a01 2 249 440 -21a03 8 250 440 -21a0b 7 256 440 -21a12 a 288 440 -21a1c a 289 440 -21a26 a 290 440 -21a30 c 292 440 -21a3c 9 296 440 -21a45 23 301 440 -21a68 8 310 440 -21a70 7 311 440 -21a77 1 312 440 -21a78 10 318 440 -21a88 11 320 440 -21a99 5 292 440 -21a9e 9 293 440 -21aa7 5 325 440 -21aac e 329 440 -21aba d 330 440 -21ac7 5 335 440 -21acc b 339 440 -21ad7 d 340 440 -21ae4 5 344 440 -21ae9 3 345 440 -21aec 6 350 440 -21af2 4 351 440 -21af6 21 352 440 -21b17 2 354 440 -21b19 5 355 440 -21b1e a 357 440 -21b28 a 358 440 -21b32 6 360 440 -FUNC 21b38 1f5 24 cvtdate -21b38 6 409 440 -21b3e 4 412 440 -21b42 c 414 440 -21b4e 52 424 440 -21ba0 4c 430 440 -21bec 14 436 440 -21c00 2 437 440 -21c02 2 438 440 -21c04 46 447 440 -21c4a 3 449 440 -21c4d 2 452 440 -21c4f 3c 457 440 -21c8b 3 459 440 -21c8e 27 467 440 -21cb5 6 472 440 -21cbb 2 474 440 -21cbd 29 485 440 -21ce6 11 486 440 -21cf7 a 487 440 -21d01 8 488 440 -21d09 d 490 440 -21d16 6 491 440 -21d1c 6 492 440 -21d22 9 499 440 -21d2b 2 503 440 -FUNC 21d2d 1ae 0 _isindst_nolock -21d2d 5 554 440 -21d32 20 558 440 -21d52 5 560 440 -21d57 7 561 440 -21d5e 1b 568 440 -21d79 c 569 440 -21d85 7 573 440 -21d8c 34 584 440 -21dc0 2 585 440 -21dc2 19 596 440 -21ddb 40 611 440 -21e1b 2 612 440 -21e1d 1e 623 440 -21e3b 2 626 440 -21e3d 14 641 440 -21e51 1a 653 440 -21e6b d 660 440 -21e78 d 664 440 -21e85 8 666 440 -21e8d 4 674 440 -21e91 2 697 440 -21e93 8 673 440 -21e9b 8 675 440 -21ea3 4 676 440 -21ea7 14 679 440 -21ebb 4 681 440 -21ebf b 682 440 -21eca 2 685 440 -21ecc d 691 440 -21ed9 2 694 440 -FUNC 21edb 4f 0 __tzset -21edb c 85 440 -21ee7 a 88 440 -21ef1 8 90 440 -21ef9 3 91 440 -21efc 8 93 440 -21f04 5 94 440 -21f09 6 95 440 -21f0f c 98 440 -21f1b 6 103 440 -21f21 9 99 440 -FUNC 21f2a 38 0 _tzset -21f2a c 109 440 -21f36 8 110 440 -21f3e 4 111 440 -21f42 5 113 440 -21f47 c 115 440 -21f53 6 118 440 -21f59 9 116 440 -FUNC 21f62 41 4 _isindst -21f62 c 538 440 -21f6e 8 541 440 -21f76 4 542 440 -21f7a b 543 440 -21f85 c 544 440 -21f91 3 548 440 -21f94 6 549 440 -21f9a 9 545 440 -FUNC 21fa3 35 8 __ascii_stricmp -21fa3 a 75 693 -21fad c 80 693 -21fb9 3 81 693 -21fbc c 82 693 -21fc8 3 83 693 -21fcb 9 85 693 -21fd4 3 87 693 -21fd7 1 88 693 -FUNC 21fd8 d3 c _stricmp_l -21fd8 7 47 693 -21fdf b 49 693 -21fea 36 52 693 -22020 32 53 693 -22052 8 55 693 -2205a e 57 693 -22068 15 63 693 -2207d 11 64 693 -2208e 8 65 693 -22096 13 68 693 -220a9 2 69 693 -FUNC 220ab 50 8 _stricmp -220ab 4 94 693 -220af a 95 693 -220b9 24 98 693 -220dd 6 99 693 -220e3 1 107 693 -220e4 5 101 693 -220e9 10 105 693 -220f9 2 107 693 -FUNC 220fb f0 10 _strnicmp_l -220fb 7 51 650 -22102 d 54 650 -2210f b 56 650 -2211a 33 59 650 -2214d 7 60 650 -22154 32 61 650 -22186 8 63 650 -2218e 1d 65 650 -221ab 15 71 650 -221c0 11 72 650 -221d1 d 74 650 -221de 6 76 650 -221e4 5 79 650 -221e9 2 80 650 -FUNC 221eb 5c c _strnicmp -221eb 4 125 650 -221ef a 127 650 -221f9 24 130 650 -2221d 5 131 650 -22222 a 132 650 -2222c 1 141 650 -2222d 5 134 650 -22232 13 138 650 -22245 2 141 650 -FUNC 22247 db c xtoa_s -22247 8 93 6581 -2224f 24 102 6581 -22273 24 103 6581 -22297 19 105 6581 -222b0 b 106 6581 -222bb a 112 6581 -222c5 6 114 6581 -222cb 7 116 6581 -222d2 2 118 6581 -222d4 2 121 6581 -222d6 5 124 6581 -222db 5 128 6581 -222e0 3 129 6581 -222e3 2 130 6581 -222e5 6 131 6581 -222eb 3 135 6581 -222ee e 136 6581 -222fc 8 139 6581 -22304 2 141 6581 -22306 2 142 6581 -22308 3 148 6581 -2230b 6 152 6581 -22311 3 154 6581 -22314 1 155 6581 -22315 4 156 6581 -22319 5 158 6581 -2231e 4 160 6581 -FUNC 22322 28 10 _itoa_s -22322 3 172 6581 -22325 d 175 6581 -22332 4 176 6581 -22336 2 177 6581 -22338 10 178 6581 -22348 2 181 6581 -FUNC 2234a 25 10 _ltoa_s -2234a 3 189 6581 -2234d 20 190 6581 -2236d 2 191 6581 -FUNC 2236f 18 10 _ultoa_s -2236f 0 199 6581 -2236f 17 200 6581 -22386 1 201 6581 -FUNC 22387 f6 14 x64toa_s -22387 7 309 6581 -2238e 25 318 6581 -223b3 5 319 6581 -223b8 19 321 6581 -223d1 b 322 6581 -223dc 3 327 6581 -223df 20 333 6581 -223ff 3 336 6581 -22402 1e 352 6581 -22420 3 344 6581 -22423 2 345 6581 -22425 5 346 6581 -2242a 5 351 6581 -2242f 13 352 6581 -22442 5 355 6581 -22447 3 357 6581 -2244a 13 358 6581 -2245d 4 364 6581 -22461 9 368 6581 -2246a 3 370 6581 -2246d 1 371 6581 -2246e 7 372 6581 -22475 4 375 6581 -22479 4 377 6581 -FUNC 2247d 33 14 _i64toa_s -2247d 3 390 6581 -22480 2e 391 6581 -224ae 2 392 6581 -FUNC 224b0 1d 14 _ui64toa_s -224b0 4 400 6581 -224b4 17 401 6581 -224cb 2 402 6581 -FUNC 224cd 224 1c __crtGetStringTypeW_stat -224cd 10 64 2828 -224dd 9 72 2828 -224e6 7 73 2828 -224ed 14 75 2828 -22501 11 79 2828 -22512 8 80 2828 -2251a b 82 2828 -22525 f 83 2828 -22534 4 88 2828 -22538 13 90 2828 -2254b 7 95 2828 -22552 2 199 2828 -22554 8 119 2828 -2255c b 120 2828 -22567 5 121 2828 -2256c b 122 2828 -22577 e 128 2828 -22585 5 130 2828 -2258a 3 131 2828 -2258d 1d 142 2828 -225aa 6 143 2828 -225b0 40 146 2828 -225f0 3 147 2828 -225f3 6 148 2828 -225f9 d 150 2828 -22606 1a 160 2828 -22620 4d 164 2828 -2266d 4 165 2828 -22671 5 170 2828 -22676 b 171 2828 -22681 3 174 2828 -22684 23 178 2828 -226a7 12 186 2828 -226b9 f 189 2828 -226c8 4 187 2828 -226cc 7 191 2828 -226d3 8 194 2828 -226db 4 196 2828 -226df 12 200 2828 -FUNC 226f1 3e 1c __crtGetStringTypeW -226f1 6 211 2828 -226f7 b 212 2828 -22702 2b 222 2828 -2272d 2 223 2828 -FUNC 2272f 294 14 strtoxq -2272f 8 80 6264 -22737 b 86 6264 -22742 3 89 6264 -22745 b 92 6264 -22750 31 94 6264 -22781 12 95 6264 -22793 c 100 6264 -2279f 37 102 6264 -227d6 2 103 6264 -227d8 9 105 6264 -227e1 4 106 6264 -227e5 2 107 6264 -227e7 6 109 6264 -227ed 9 110 6264 -227f6 8 112 6264 -227fe 6 115 6264 -22804 9 116 6264 -2280d a 117 6264 -22817 9 120 6264 -22820 3 118 6264 -22823 5 123 6264 -22828 10 125 6264 -22838 1 126 6264 -22839 9 127 6264 -22842 26 132 6264 -22868 e 137 6264 -22876 8 138 6264 -2287e 6 139 6264 -22884 11 140 6264 -22895 5 143 6264 -2289a 31 154 6264 -228cb 4 160 6264 -228cf 6 161 6264 -228d5 a 173 6264 -228df 7 176 6264 -228e6 6 178 6264 -228ec 6 179 6264 -228f2 5 181 6264 -228f7 19 156 6264 -22910 b 168 6264 -2291b 5 169 6264 -22920 35 184 6264 -22955 5 187 6264 -2295a c 188 6264 -22966 a 189 6264 -22970 6 190 6264 -22976 7 191 6264 -2297d 2 192 6264 -2297f 7 193 6264 -22986 8 195 6264 -2298e 5 197 6264 -22993 6 199 6264 -22999 13 201 6264 -229ac 15 203 6264 -229c1 2 204 6264 -FUNC 229c3 29 c _strtoi64 -229c3 3 211 6264 -229c6 8 212 6264 -229ce 13 214 6264 -229e1 9 218 6264 -229ea 2 220 6264 -FUNC 229ec 1b 10 _strtoi64_l -229ec 0 227 6264 -229ec 1a 228 6264 -22a06 1 229 6264 -FUNC 22a07 2a c _strtoui64 -22a07 3 236 6264 -22a0a 7 237 6264 -22a11 14 239 6264 -22a25 a 243 6264 -22a2f 2 245 6264 -FUNC 22a31 1b 10 _strtoui64_l -22a31 0 253 6264 -22a31 1a 254 6264 -22a4b 1 255 6264 -FUNC 22a50 2b 0 _chkstk -22a50 0 65 2634 -22a50 1 69 2634 -22a51 4 73 2634 -22a55 2 74 2634 -22a57 2 79 2634 -22a59 2 80 2634 -22a5b 2 81 2634 -22a5d 2 83 2634 -22a5f 5 84 2634 -22a64 2 87 2634 -22a66 2 88 2634 -22a68 2 89 2634 -22a6a 1 90 2634 -22a6b 1 91 2634 -22a6c 2 92 2634 -22a6e 3 93 2634 -22a71 1 94 2634 -22a72 5 98 2634 -22a77 2 99 2634 -22a79 2 100 2634 -FUNC 22a7b 81 4 _getenv_helper_nolock -22a7b 0 95 3904 -22a7b 10 103 3904 -22a8b 3 104 3904 -22a8e 1 169 3904 -22a8f e 128 3904 -22a9d 7 131 3904 -22aa4 2 132 3904 -22aa6 6 135 3904 -22aac c 140 3904 -22ab8 9 142 3904 -22ac1 2 150 3904 -22ac3 22 154 3904 -22ae5 3 164 3904 -22ae8 6 150 3904 -22aee 5 168 3904 -22af3 9 169 3904 -FUNC 22afc 93 c _getenv_s_helper -22afc 7 220 3904 -22b03 21 224 3904 -22b24 15 226 3904 -22b39 4 227 3904 -22b3d 3 229 3904 -22b40 a 233 3904 -22b4a 3 234 3904 -22b4d 2 236 3904 -22b4f 7 239 3904 -22b56 6 240 3904 -22b5c 2 243 3904 -22b5e 5 246 3904 -22b63 5 251 3904 -22b68 20 254 3904 -22b88 5 256 3904 -22b8d 2 257 3904 -FUNC 22b8f a2 8 _dupenv_s_helper -22b8f 6 339 3904 -22b95 21 344 3904 -22bb6 9 346 3904 -22bbf 2 348 3904 -22bc1 5 350 3904 -22bc6 8 352 3904 -22bce 6 353 3904 -22bd4 2 355 3904 -22bd6 9 358 3904 -22bdf b 362 3904 -22bea 6 364 3904 -22bf0 b 366 3904 -22bfb 9 367 3904 -22c04 1e 370 3904 -22c22 7 371 3904 -22c29 2 373 3904 -22c2b 4 375 3904 -22c2f 2 376 3904 -FUNC 22c31 83 4 getenv -22c31 c 75 3904 -22c3d 2a 78 3904 -22c67 18 79 3904 -22c7f 8 81 3904 -22c87 3 82 3904 -22c8a c 83 3904 -22c96 c 85 3904 -22ca2 3 89 3904 -22ca5 6 90 3904 -22cab 9 86 3904 -FUNC 22cb4 d8 10 getenv_s -22cb4 c 198 3904 -22cc0 8 201 3904 -22cc8 5 202 3904 -22ccd a1 203 3904 -22d6e c 205 3904 -22d7a 3 209 3904 -22d7d 6 210 3904 -22d83 9 206 3904 -FUNC 22d8c e6 c _dupenv_s -22d8c c 303 3904 -22d98 8 306 3904 -22da0 5 307 3904 -22da5 af 311 3904 -22e54 c 314 3904 -22e60 3 318 3904 -22e63 6 319 3904 -22e69 9 315 3904 -FUNC 22e72 8 4 _tolower -22e72 0 48 6218 -22e72 7 49 6218 -22e79 1 50 6218 -FUNC 22e7a 117 8 _tolower_l -22e7a 8 70 6218 -22e82 b 74 6218 -22e8d c 77 6218 -22e99 31 79 6218 -22eca f 80 6218 -22ed9 14 82 6218 -22eed 2b 86 6218 -22f18 3 88 6218 -22f1b d 91 6218 -22f28 2 92 6218 -22f2a b 94 6218 -22f35 a 97 6218 -22f3f 25 110 6218 -22f64 6 112 6218 -22f6a 5 116 6218 -22f6f 6 117 6218 -22f75 1a 119 6218 -22f8f 2 120 6218 -FUNC 22f91 27 4 tolower -22f91 0 143 6218 -22f91 9 145 6218 -22f9a f 147 6218 -22fa9 1 153 6218 -22faa d 151 6218 -22fb7 1 153 6218 -FUNC 22fc0 61 c __ascii_strnicmp -22fc0 6 69 871 -22fc6 3 75 871 -22fc9 2 76 871 -22fcb 2 77 871 -22fcd 3 79 871 -22fd0 3 80 871 -22fd3 2 82 871 -22fd5 2 83 871 -22fd7 5 84 871 -22fdc 2 89 871 -22fde 2 91 871 -22fe0 2 93 871 -22fe2 2 95 871 -22fe4 2 97 871 -22fe6 2 98 871 -22fe8 3 100 871 -22feb 3 101 871 -22fee 2 103 871 -22ff0 2 104 871 -22ff2 2 106 871 -22ff4 2 107 871 -22ff6 2 109 871 -22ff8 2 112 871 -22ffa 2 113 871 -22ffc 2 115 871 -22ffe 2 116 871 -23000 2 118 871 -23002 2 121 871 -23004 2 122 871 -23006 3 124 871 -23009 2 125 871 -2300b 2 128 871 -2300d 2 129 871 -2300f 2 130 871 -23011 5 133 871 -23016 2 134 871 -23018 2 135 871 -2301a 2 138 871 -2301c 5 140 871 -FUNC 23021 ec 10 _mbsnbicoll_l -23021 7 53 4518 -23028 b 55 4518 -23033 9 57 4518 -2303c 13 58 4518 -2304f 33 61 4518 -23082 6 62 4518 -23088 23 63 4518 -230ab 8 65 4518 -230b3 14 66 4518 -230c7 23 74 4518 -230ea 10 75 4518 -230fa 11 77 4518 -2310b 2 79 4518 -FUNC 2310d 17 c _mbsnbicoll -2310d 0 85 4518 -2310d 16 86 4518 -23123 1 87 4518 -FUNC 23124 95 0 __wtomb_environ -23124 7 43 2699 -2312b 3 44 2699 -2312e 9 45 2699 -23137 c 52 2699 -23143 12 57 2699 -23155 11 61 2699 -23166 12 65 2699 -23178 10 72 2699 -23188 5 74 2699 -2318d 9 76 2699 -23196 3 77 2699 -23199 9 81 2699 -231a2 5 84 2699 -231a7 2 85 2699 -231a9 5 58 2699 -231ae 9 67 2699 -231b7 2 68 2699 -FUNC 231b9 1a 8 strnlen -231b9 0 38 864 -231b9 19 45 864 -231d2 1 49 864 -FUNC 231d3 1a 4 strncnt -231d3 0 50 4345 -231d3 6 51 4345 -231d9 6 54 4345 -231df 1 55 4345 -231e0 5 54 4345 -231e5 7 57 4345 -231ec 1 58 4345 -FUNC 231ed 389 18 __crtCompareStringA_stat -231ed 10 96 4345 -231fd 31 280 4345 -2322e c 107 4345 -2323a b 109 4345 -23245 a 110 4345 -2324f 5 118 4345 -23254 1b 119 4345 -2326f 7 122 4345 -23276 1f 123 4345 -23295 6 120 4345 -2329b 7 121 4345 -232a2 3 124 4345 -232a5 2 125 4345 -232a7 17 130 4345 -232be 7 189 4345 -232c5 8 201 4345 -232cd 8 202 4345 -232d5 d 208 4345 -232e2 5 214 4345 -232e7 8 215 4345 -232ef 2 218 4345 -232f1 6 219 4345 -232f7 5 222 4345 -232fc 4 223 4345 -23300 f 231 4345 -2330f 2 232 4345 -23311 5 237 4345 -23316 4 239 4345 -2331a 2 240 4345 -2331c 10 244 4345 -2332c a 246 4345 -23336 7 244 4345 -2333d 2 262 4345 -2333f 5 253 4345 -23344 6 255 4345 -2334a 8 256 4345 -23352 10 260 4345 -23362 11 262 4345 -23373 7 260 4345 -2337a 2 262 4345 -2337c 1a 280 4345 -23396 6 281 4345 -2339c 4d 284 4345 -233e9 4 285 4345 -233ed 6 286 4345 -233f3 19 295 4345 -2340c 17 305 4345 -23423 46 309 4345 -23469 4 310 4345 -2346d 13 320 4345 -23480 17 326 4345 -23497 7 328 4345 -2349e 8 331 4345 -234a6 9 333 4345 -234af 4 132 4345 -234b3 5 137 4345 -234b8 8 138 4345 -234c0 5 139 4345 -234c5 8 140 4345 -234cd e 142 4345 -234db 6 143 4345 -234e1 5 148 4345 -234e6 19 155 4345 -234ff 2 156 4345 -23501 6 157 4345 -23507 19 163 4345 -23520 4 164 4345 -23524 7 166 4345 -2352b 5 167 4345 -23530 3 169 4345 -23533 3 170 4345 -23536 18 178 4345 -2354e 6 179 4345 -23554 6 181 4345 -2355a 8 182 4345 -23562 2 184 4345 -23564 12 337 4345 -FUNC 23576 40 20 __crtCompareStringA -23576 6 349 4345 -2357c b 350 4345 -23587 2d 361 4345 -235b4 2 362 4345 -FUNC 235b6 f8 10 _strnicoll_l -235b6 7 55 603 -235bd b 57 603 -235c8 9 59 603 -235d1 13 60 603 -235e4 33 63 603 -23617 6 64 603 -2361d 23 65 603 -23640 a 67 603 -2364a 15 68 603 -2365f 21 78 603 -23680 b 80 603 -2368b 10 81 603 -2369b 11 84 603 -236ac 2 85 603 -FUNC 236ae 27 c _strnicoll -236ae 3 92 603 -236b1 9 93 603 -236ba 1 101 603 -236bb 5 95 603 -236c0 13 99 603 -236d3 2 101 603 -FUNC 236d5 4d 4 findenv -236d5 1 387 3036 -236d6 8 390 3036 -236de 12 394 3036 -236f0 d 399 3036 -236fd 9 390 3036 -23706 e 407 3036 -23714 1 408 3036 -23715 c 400 3036 -23721 1 408 3036 -FUNC 23722 5d 0 copy_environ -23722 4 428 3036 -23726 2 429 3036 -23728 6 434 3036 -2372e 2 464 3036 -23730 7 438 3036 -23737 8 439 3036 -2373f 14 443 3036 -23753 8 444 3036 -2375b 6 448 3036 -23761 11 458 3036 -23772 4 448 3036 -23776 2 461 3036 -23778 5 463 3036 -2377d 2 464 3036 -FUNC 2377f 24c 8 __crtsetenv -2377f 6 76 3036 -23785 2c 89 3036 -237b1 2 91 3036 -237b3 1c 98 3036 -237cf 5 114 3036 -237d4 13 125 3036 -237e7 c 126 3036 -237f3 4 130 3036 -237f7 d 153 3036 -23804 9 155 3036 -2380d b 100 3036 -23818 6 101 3036 -2381e 2 356 3036 -23820 3 164 3036 -23823 6 165 3036 -23829 f 171 3036 -23838 2 172 3036 -2383a 2 173 3036 -2383c 8 176 3036 -23844 f 178 3036 -23853 2 179 3036 -23855 2 180 3036 -23857 6 196 3036 -2385d 5 197 3036 -23862 2 200 3036 -23864 10 207 3036 -23874 9 210 3036 -2387d a 216 3036 -23887 6 218 3036 -2388d 5 235 3036 -23892 5 238 3036 -23897 5 241 3036 -2389c c 222 3036 -238a8 4 221 3036 -238ac 1d 230 3036 -238c9 2 233 3036 -238cb 9 245 3036 -238d4 4 250 3036 -238d8 2 251 3036 -238da 2f 255 3036 -23909 8 258 3036 -23911 3 259 3036 -23914 5 262 3036 -23919 5 264 3036 -2391e 21 287 3036 -2393f 25 289 3036 -23964 21 338 3036 -23985 4 339 3036 -23989 b 343 3036 -23994 7 346 3036 -2399b 5 349 3036 -239a0 8 351 3036 -239a8 6 352 3036 -239ae 8 355 3036 -239b6 8 271 3036 -239be 6 274 3036 -239c4 7 276 3036 -FUNC 239cb 50 4 _strdup -239cb 1 66 901 -239cc b 70 901 -239d7 6 71 901 -239dd 9 73 901 -239e6 e 77 901 -239f4 1c 80 901 -23a10 4 81 901 -23a14 6 84 901 -23a1a 1 85 901 -FUNC 23a1b ba c _mbschr_l -23a1b 7 53 4568 -23a22 b 55 4568 -23a2d 32 58 4568 -23a5f 8 60 4568 -23a67 d 61 4568 -23a74 a 65 4568 -23a7e 7 67 4568 -23a85 10 69 4568 -23a95 3 70 4568 -23a98 8 72 4568 -23aa0 d 63 4568 -23aad 8 76 4568 -23ab5 e 77 4568 -23ac3 10 79 4568 -23ad3 2 80 4568 -FUNC 23ad5 13 8 _mbschr -23ad5 0 86 4568 -23ad5 12 87 4568 -23ae7 1 88 4568 -FUNC 23b00 be 8 strchr -23b00 0 60 928 -23b00 2 68 928 -23b02 4 69 928 -23b06 1 73 928 -23b07 2 74 928 -23b09 3 75 928 -23b0c 4 76 928 -23b10 6 77 928 -23b16 2 78 928 -23b18 2 81 928 -23b1a 3 82 928 -23b1d 2 83 928 -23b1f 2 84 928 -23b21 2 85 928 -23b23 2 86 928 -23b25 6 87 928 -23b2b 2 88 928 -23b2d 2 91 928 -23b2f 1 92 928 -23b30 2 93 928 -23b32 3 94 928 -23b35 1 95 928 -23b36 2 96 928 -23b38 2 101 928 -23b3a 5 102 928 -23b3f 2 104 928 -23b41 2 105 928 -23b43 2 107 928 -23b45 2 108 928 -23b47 2 110 928 -23b49 3 111 928 -23b4c 3 113 928 -23b4f 2 114 928 -23b51 2 116 928 -23b53 3 117 928 -23b56 6 119 928 -23b5c 2 120 928 -23b5e 5 124 928 -23b63 2 125 928 -23b65 5 127 928 -23b6a 2 128 928 -23b6c 6 130 928 -23b72 2 131 928 -23b74 1 134 928 -23b75 1 135 928 -23b76 1 137 928 -23b77 2 138 928 -23b79 1 139 928 -23b7a 3 142 928 -23b7d 2 143 928 -23b7f 2 144 928 -23b81 2 145 928 -23b83 2 146 928 -23b85 2 147 928 -23b87 2 148 928 -23b89 2 149 928 -23b8b 2 150 928 -23b8d 3 151 928 -23b90 2 152 928 -23b92 2 153 928 -23b94 2 154 928 -23b96 2 155 928 -23b98 2 156 928 -23b9a 2 157 928 -23b9c 2 158 928 -23b9e 2 159 928 -23ba0 2 160 928 -23ba2 1 163 928 -23ba3 1 164 928 -23ba4 3 165 928 -23ba7 1 166 928 -23ba8 1 167 928 -23ba9 3 170 928 -23bac 1 171 928 -23bad 1 172 928 -23bae 1 173 928 -23baf 1 174 928 -23bb0 3 177 928 -23bb3 1 178 928 -23bb4 1 179 928 -23bb5 1 180 928 -23bb6 1 181 928 -23bb7 3 184 928 -23bba 1 185 928 -23bbb 1 186 928 -23bbc 1 187 928 -23bbd 1 188 928 -PUBLIC 23b06 0 __from_strstr_to_strchr -FUNC 240b9 14 0 `operator new'::`6'::`dynamic atexit destructor for 'nomem'' -STACK WIN 4 41b0 86 13 0 8 0 e0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4240 41 3 0 18 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4290 18 4 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 42ae 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42af 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42c6 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42d1 22 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42d2 1e 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42f3 3f c 0 0 c 50 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4332 3f c 0 0 c 50 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4371 3f c 0 0 c 50 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 43b0 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43b1 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43c8 af c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4464 12 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 4477 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 448d 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44a3 14 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44b7 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44cd 14 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44e1 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4506 16 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 451c f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 452b 62 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 452c 60 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 452d 5c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 454a 35 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 458d 42 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 458e 40 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45cf da c 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 466c 15 0 0 4 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 46a0 8 0 0 4 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 46a9 53 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 46f2 9 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 46fc 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4705 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 470b b1 8 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4713 a8 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4785 33 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47bc 20 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47dc 3c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47dd 3a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4818 2e 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4846 36 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 487c 2a 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48a6 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48bc 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48c1 30 5 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 48c6 2b 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 48f1 7 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48f8 7 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48ff 7 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4906 52 8 0 8 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 490c 4c 2 0 8 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 4958 36 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 498e 36 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 49c4 36 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 49fa 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4a14 30 1 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4a15 2e 0 0 10 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4a44 d5 7 0 1c 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4a4b ce 0 0 1c 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 4b19 9d 5 0 10 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4b1e 98 0 0 10 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 4bb6 73 7 0 14 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4bbb 6c 2 0 14 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 4bbc 6a 1 0 14 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 4bbd 68 0 0 14 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 4c29 28 5 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4c2e 22 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4c51 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4c72 4c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4c73 4a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4cbe 5e 6 0 14 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4d1c 4a b 0 8 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4d26 1b 1 0 8 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4d27 16 0 0 8 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4d66 19 a 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d67 17 9 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d7f 6a 6 0 4 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4de9 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4df8 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e06 1c 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e07 18 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e22 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e31 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e39 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e54 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e70 1f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e8f 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e93 b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e9e 5 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4ea3 11 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4eb4 4e 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4eb5 4a 8 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4eba 44 3 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4ebb 42 2 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f02 18 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4f1a 58 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4f1b 54 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f20 4e 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f34 37 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f72 56 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4f73 52 8 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f78 4c 3 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4f79 4a 2 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4fc8 16 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fde d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4feb 19 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fec 15 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5004 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5005 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 501c b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5027 19 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5028 15 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5040 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5041 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5058 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5063 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5064 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 507b 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 507c 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5093 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 509e 1c 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 509f 18 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50ba 22 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50bb 1e 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50dc 22 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50dd 1e 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50fe 22 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 50ff 1e 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5120 7b 8 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5124 75 4 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5128 70 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 519b 5b 8 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 51a2 52 1 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 51a3 50 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 51f6 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5200 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 520a a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5214 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 521e a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5228 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 524c 41 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 528d 1b6 c 0 0 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5405 14 0 0 0 c 2c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 5443 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 544d a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5457 fc 1c 0 14 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5553 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5554 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5575 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5582 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 558b 24 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 55af 10 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 55bf 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 55c8 96 7 0 8 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 55cf 8d 0 0 8 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 55fb 60 0 0 8 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 565e 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5678 1c 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5694 1f 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 56b3 1c 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 56cf 1d 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 56ec 20 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 570c 1d 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5729 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 573a 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 574b 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5761 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5777 14f c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 58bc 9 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 58c6 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 58e0 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 58fa 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5912 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 592c 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5944 f6 7 0 18 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 594b ed 0 0 18 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 5973 c4 0 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 5977 bf 0 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 5a3a 27 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5a61 28 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5a89 87 4 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5a8d 81 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5ab2 5b 0 0 14 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5b10 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5b2b 107 5 0 18 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5b30 100 0 0 18 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 5b5b d4 0 0 18 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 5b5f cf 0 0 18 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 5c32 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c50 27 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5c77 28 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c9f 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5cc3 26 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5ce9 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5cfe 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d07 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d10 18 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d11 16 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d28 20 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d29 1e 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d48 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d4d 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d7f 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5d84 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5dbb 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5dc0 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5df7 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5dfc 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5e33 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5e38 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5e6f 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5e74 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5ea6 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5eab 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5edd 92 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5f1b 34 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5f1c 32 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5f6f e2 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6039 11 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 6051 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6062 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6073 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6082 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6091 4c 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6092 4a 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 616b 33 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 619e 36 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 61d4 36 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 620a 39 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6243 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6257 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6266 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6275 96 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6276 94 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 62ba 4a 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 62bb 46 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 630b 2f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6313 26 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 633a 82 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6341 78 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 63bc e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 63ca 3 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 63cd 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6400 24 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6404 1e 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6424 4a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6429 44 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 642a 42 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 646e d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 647b 10 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 648b e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6499 994 2c 0 10 0 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 64bb 945 a 0 10 4 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 64c2 93b 3 0 10 8 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 64c5 937 0 0 10 c 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 6e2d 3b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6e68 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6e7b 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6e8e 1e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6e8f 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6eac 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6ec7 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6ec8 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6ef1 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6f0c 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6f0d 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6fa0 24 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6fd0 196 14 0 10 0 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6fd4 d3 10 0 10 4 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 24 - ^ = -STACK WIN 4 6fd9 cd b 0 10 8 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 6fda cb a 0 10 c 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 6fe4 c0 0 0 10 10 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 7166 90 c 0 10 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 71eb a 0 0 10 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 71f6 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7210 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 722a 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7244 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 725c 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7274 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 728c 104 9 0 0 0 328 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7390 5c6 22 0 c 0 594 0 1 $T0 $ebp 1304 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 73b2 597 0 0 c 4 594 0 1 $T0 $ebp 1304 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 73fe 542 0 0 c 8 594 0 1 $T0 $ebp 1304 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1436 - ^ = -STACK WIN 4 740c 533 0 0 c c 594 0 1 $T0 $ebp 1304 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1436 - ^ = -STACK WIN 4 7956 dc c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7a28 9 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 7a32 2d 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7a37 27 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7a5f e1 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7b36 9 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 7b40 49 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7b41 3b 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7b42 39 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7b89 55 8 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7b8a 53 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 7b91 4b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 7b97 2a 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 7bde 15 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7bf3 18 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7c0b c3 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7cc5 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 7cce 31 7 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7cd5 28 0 0 4 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7cff 240 c 0 0 c 64 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7f28 4 0 0 0 c 64 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 7f3f 4c 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7f40 4a 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7f41 48 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7f8b 21 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7f8c 1f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7fac 10 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7fbc 40 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7fbd 3e 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7fbe 3c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7ffc 48 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7ffd 46 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 7ffe 44 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8044 4b 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8045 49 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8046 47 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 808f 50 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8090 4e 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8091 4c 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 80df 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 80e7 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 80f1 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 80fb 8e c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8151 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8189 9f c 0 0 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 821f 8 0 0 0 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8228 19 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8229 15 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8241 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 824c 22 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 824d 1e 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 826e 5c 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 826f 5a 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8270 58 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 82ca 44 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 830e e1 c 0 10 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8390 a 0 0 10 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 83ce 20 0 0 10 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 83ef 45 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8434 54 c 0 8 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8477 9 0 0 8 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8488 25 7 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 848f 1d 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 84ad 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 84c0 b3 8 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 84c7 9a 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 84c8 98 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8573 4c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 85bf 139 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 85c0 137 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 85cf 127 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 85d0 11f 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 85d1 11d 0 0 8 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 86f8 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 86fc 32 c 0 8 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8714 a 0 0 8 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 872e 33 c 0 8 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8747 a 0 0 8 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8761 32 c 0 8 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8779 a 0 0 8 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8793 3b c 0 14 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 87b4 a 0 0 14 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 87ce 79 6 0 4 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 87f0 52 0 0 4 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 87f1 50 0 0 4 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 8847 49 c 0 4 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8890 30 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8891 2a 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 8892 28 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 88c0 82 8 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 88c1 7b 7 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 88c8 73 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8942 19c 14 0 18 c 3c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 89d2 9 0 0 18 c 3c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8a62 7b 0 0 18 c 3c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8ade 17f c 0 10 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8c49 4 0 0 10 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8c5d 91 c 0 10 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ce2 4 0 0 10 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8cee 143 9 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8cfe 131 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 8d02 12c 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 8d05 128 0 0 10 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 8e31 6c 3 0 1c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8e9d f2 6 0 20 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ea3 ea 0 0 20 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8eb3 d9 0 0 20 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8f31 5a 0 0 20 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 8f8f 356 17 0 20 0 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8f99 34a d 0 20 4 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 8fa5 33d 1 0 20 8 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 8fa6 33b 0 0 20 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 92e5 18 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 92e6 14 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 92fd e4 6 0 20 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9301 de 2 0 20 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 9302 dc 1 0 20 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 9303 da 0 0 20 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 93e1 6c 7 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 93e7 64 1 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 93e8 62 0 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 9408 41 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 944d 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 944e 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 94bb 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 94c4 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 94c5 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9532 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 953b 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9550 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9556 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9557 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9588 19 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 95a1 3d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 95de bf c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9694 8 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 969d 77 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 969e 75 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 969f 71 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9714 18 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9715 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 972c 121 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9835 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9841 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 984d 69 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9857 4b 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9860 25 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 98b6 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 98bc 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 98c2 184 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 98c3 182 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 98de 166 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a46 39 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9a66 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9a7f 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a92 37 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9ab6 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9ac9 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9b2c b9 5 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9b2e b5 3 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 9b2f b3 2 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9b30 b1 1 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9b31 af 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9be5 2f 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9be6 2d 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9c14 3c c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9c4a 5 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9c50 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9c62 4f c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9ca8 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9cb1 75 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9cf9 2c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9d26 c3 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9d27 c1 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 9d35 9c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9d3c 94 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9d3d 90 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9de9 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9df3 31 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9df4 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e24 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e2d d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e3a 22 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e5c 22 3 0 18 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9e7e 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9ee5 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9eee f5 c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9fd7 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9fe3 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a04a 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a053 31 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a084 eb c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a163 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a16f 53 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a1b9 8 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a258 65 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a25d 5f 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 a262 59 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 a263 57 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 aa15 3d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 aa52 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 aa60 1a0 8 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 aa62 19c 6 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 aa67 196 1 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 aa68 194 0 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 aa85 176 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 20 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 ac00 20 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac20 39 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac59 1 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac5a 32 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac65 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac8c 15e 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ac92 156 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 acaa 13d 0 0 8 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 acb0 136 0 0 8 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 adea 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae05 db b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae06 c3 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ae0f b9 1 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ae10 b7 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ae5f 67 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 aee0 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 aeea 198 e 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 aef2 187 6 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 aef8 180 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 b082 b9 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b089 b0 a 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 b092 a6 1 0 0 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 b093 a4 0 0 0 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 b13b 135 b 0 0 0 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b143 12a 3 0 0 4 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 b144 128 2 0 0 8 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 b145 126 1 0 0 c 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 b146 124 0 0 0 10 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 b270 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b271 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b272 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b294 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b295 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b296 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b2b8 5b 6 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b2be 43 0 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b313 5a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b36d 74 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b36e 72 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 b37a 53 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 b381 4b 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 b38c 30 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 b3e1 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b3e7 94 15 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b3fb 7e 1 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 b3fc 7c 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 b418 5f 0 0 0 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 b47b 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b483 160 5 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b488 159 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b4c5 11b 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 b52c b3 0 0 8 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 b5e3 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b608 25 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b60c 1f 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b62d 4f a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b632 49 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 b633 47 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 b67c 910 30 0 10 0 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b69e 8c1 e 0 10 4 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 b6a5 8b7 7 0 10 8 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 b6ac 8af 0 0 10 c 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 bf8c 97 7 0 10 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 bf93 8e 0 0 10 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 bfbf 61 0 0 10 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 c023 17 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c03a 5 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c03f 55 7 0 10 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c046 4c 0 0 10 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c094 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0ac 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0c6 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0de 1a 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0f8 14e c 0 14 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c23c 9 0 0 14 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 c246 1e 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c264 1e 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c282 1e 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c2a0 1c 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c2bc 1c 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c2d8 1c 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c2f4 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c319 25 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c31d 1f 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c33e 4f a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c343 49 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c344 47 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c38d 91c 2c 0 10 0 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c3a9 8d3 10 0 10 4 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 c3b0 8c9 9 0 10 8 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 c3b9 8bf 0 0 10 c 474 0 1 $T0 $ebp 1012 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1144 - ^ = -STACK WIN 4 cca9 154 9 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ccb1 14a 1 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ccb2 148 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 cdfd 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ce22 25 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ce26 1f 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ce47 4f a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ce4c 49 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ce4d 47 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ce96 f60 2a 0 10 0 ad4 0 1 $T0 $ebp 1160 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ceb8 f0f 8 0 10 4 ad4 0 1 $T0 $ebp 1160 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2776 - ^ = -STACK WIN 4 ceb9 f0b 7 0 10 8 ad4 0 1 $T0 $ebp 1160 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2776 - ^ = -STACK WIN 4 cec0 f03 0 0 10 c ad4 0 1 $T0 $ebp 1160 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2776 - ^ = -STACK WIN 4 ddf6 1f 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ddf7 1d 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ddf8 1b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 de20 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 de50 42 18 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 de5e 33 a 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 de5f 31 9 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 de68 27 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 dea0 bb 33 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 deba a1 19 0 4 10 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 df29 14 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 df5b 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 df74 9b c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfed 9 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e00f 34 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e01a 1d 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e043 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e050 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e059 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e062 23d c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e257 b 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e29f 1b0 c 0 4 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e40d 14 0 0 4 c 30 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e44f a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e459 104 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e45a 102 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 e45b 100 1 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 e45c fe 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 e495 c4 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 16 - ^ = -STACK WIN 4 e55d 15a 24 0 14 0 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e576 bc b 0 14 4 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 e577 b8 a 0 14 8 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 e581 ad 0 0 14 c 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 e6b7 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e6c1 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e6cb 10 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e6db c5 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e761 17 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e7a0 5e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e7b8 45 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e7fe 2f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e82d 55 b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e82e 53 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 e82f 51 9 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 e830 4f 8 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 e831 4d 7 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 e882 18a 1d 0 0 0 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e89e 161 1 0 0 4 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 e89f 15d 0 0 0 8 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 ea0c a4 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 eaa4 b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 eab0 7a 7 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 eab7 71 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 eb2a 1d9 19 0 8 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 eb3b 1c1 8 0 8 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 eb3f 1ba 4 0 8 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 eb43 1b5 0 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 ed03 3c 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ed3f 19a c 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 eea0 8 0 0 4 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 eed9 1e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 eef7 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 eefd 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ef03 140 12 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ef04 13e 11 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ef05 13c 10 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ef06 13a f 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ef15 12a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f043 86 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f044 84 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f045 82 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f046 80 5 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f04b 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f0c9 8c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f0ca 8a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f0d3 7e 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 f0d4 7c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 f0d5 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 f155 24 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f156 22 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f165 12 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f179 3e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f182 31 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f1b7 76 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f221 8 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 f22d 66 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f22e 64 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f22f 62 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f293 53 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f2e6 96 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f370 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 f37c 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f381 88 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f3fd b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 f409 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f40e 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f411 3e 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f412 3c 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f413 3a 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f41e 2e 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f44f 129 6 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f453 123 2 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 f454 121 1 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 f455 11f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 f578 6b 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f57c 4d 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 f57d 4b 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 f5e3 171 4 0 0 0 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f5e7 169 0 0 0 4 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 20 - ^ = -STACK WIN 4 f606 149 0 0 0 8 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 f607 141 0 0 0 c 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 f754 1d4 1e 0 18 0 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f76d 1b1 5 0 18 4 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 f76e 1ad 4 0 18 8 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 f772 1a8 0 0 18 c b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 f928 2f6 17 0 4 0 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f93e 2d6 1 0 4 4 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 f93f 2d2 0 0 4 8 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 fc1e 1ce 18 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fc37 1ab 0 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 fc38 1a7 0 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 fc3f 19f 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 fdec f3 7 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fdf2 2c 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fdf3 2a 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fedf 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fee4 170 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1000a 10 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1001b b 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1004c 7 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 10054 15f 10 0 14 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1005b a1 9 0 14 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1005c b2 8 0 14 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 10064 96 0 0 14 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 101b3 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 101ce 4f 6 0 c 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1021d 30 4 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1024d 36 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10283 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10291 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102a7 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102b8 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102cb e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102d9 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102ec e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 102fa 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1030d e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1031b 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10331 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10342 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10355 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10363 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10376 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10384 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1039a 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 103ab 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 103c1 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 103d2 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 103e8 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 103f9 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1040c e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1041a c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10426 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1044c 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1046d 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10493 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 106ab 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 106de 24 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 106e2 1e 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10702 4a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10707 44 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 10708 42 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1074c 9b0 2c 0 10 0 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1076e 960 a 0 10 4 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 10775 956 3 0 10 8 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 10778 952 0 0 10 c 278 0 1 $T0 $ebp 504 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 636 - ^ = -STACK WIN 4 110fc 129 8 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11103 120 1 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11104 11e 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11225 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11258 24 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1125c 1e 2 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1127c 4a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11281 44 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 11282 42 4 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 112c6 10 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 112d6 f88 2a 0 10 0 8d0 0 1 $T0 $ebp 656 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 112f8 f39 8 0 10 4 8d0 0 1 $T0 $ebp 656 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2260 - ^ = -STACK WIN 4 112f9 f35 7 0 10 8 8d0 0 1 $T0 $ebp 656 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2260 - ^ = -STACK WIN 4 11300 f2d 0 0 10 c 8d0 0 1 $T0 $ebp 656 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 2260 - ^ = -STACK WIN 4 1225e c2 11 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1226f 9e 0 0 4 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12320 9b c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 123b2 8 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 123bb 46 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 123f8 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12401 113 8 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12408 21 1 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 12409 1f 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 12514 17 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1252b 83 13 0 10 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12534 78 a 0 10 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1253e 6d 0 0 10 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 125ae 119 c 0 10 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 126bd 9 0 0 10 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 126c7 7d 8 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 126ce 75 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 126cf 73 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 126fd 2c 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 12744 81 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12749 7b 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1274e 75 1 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1274f 73 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 127c5 71 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 127e6 4f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12836 a0 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 128c8 d 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 128d6 22 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 128f8 19f c 0 0 c 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 129c5 e 0 0 0 c 28 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12a8e 8 0 0 0 c 28 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12a97 115 c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12b7f 2c 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12bac 11e c 0 c c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12ca3 d 0 0 c c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12cca 3f 9 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12cd3 34 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12cec 18 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12d09 21b c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12e47 e 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 12f24 79 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12f2b 70 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 12f61 39 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 12f62 37 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 12f9d 21 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12fbe 46 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12fc9 3a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13004 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13009 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13040 48 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13088 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 130b3 314 11 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 130c0 305 4 0 8 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 130c4 300 0 0 8 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 130f1 2d2 0 0 8 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 133c7 b0 d 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 133cd a9 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 133d4 a1 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13477 106 11 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 13483 f8 5 0 4 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 13484 f6 4 0 4 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 13488 f1 0 0 4 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1357d 2df 12 0 c 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1358a 2d0 5 0 c 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 1358b 2ce 4 0 c 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 1358f 2c9 0 0 c c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 1385c cd 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13929 2e2 f 0 0 0 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 13938 294 0 0 0 4 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 1394d 27e 0 0 0 8 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 13950 27a 0 0 0 c 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 13c0b a8 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13c0c a6 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13c54 5d 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13cb3 2e3 2a 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 13cd7 2bd 6 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 13cdc 2b7 1 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 13cdd 2b5 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 13f96 72 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 13f97 70 6 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 13f98 6e 5 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 13f9d 68 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 14008 7c c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14079 a 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 14084 d 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14091 d 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1409e d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 140ab f3 23 0 0 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1419e 1e 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 142f3 a3 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14385 10 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 14396 6 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1439c 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 143b7 26 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 143b8 24 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 143dd 63 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14440 474 a 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14447 42e 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 14448 42c 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 14449 42a 1 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1444a 428 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 148b4 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148bf d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148cc e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148da e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148e8 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148f6 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14904 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14916 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14924 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14932 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14940 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1494b b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14956 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14961 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1496f b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1497a e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14988 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149a1 84 13 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149a2 80 12 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149a3 7e 11 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149c9 57 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 14a25 d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14a32 12 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14a44 9c 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14a57 86 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ae0 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14aea 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14aef 7 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14af6 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b00 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b08 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b12 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b1c 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b24 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b2e 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b36 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b40 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b48 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b52 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b5a 7b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14b5d 75 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14bd5 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14bde 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c03 d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c10 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c14 29 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c26 f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c3d 16 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c53 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c57 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c5b 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c76 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14c7a 2f 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ca9 25 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cce 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cd2 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cdf e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ced 20 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d0d 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d32 33 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14d65 34 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14d99 13 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14dac 56 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14db2 4d 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e02 61 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e03 5d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e04 59 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e63 17 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e7a 15 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e8f 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ea3 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14eb1 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ec5 25 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ec6 23 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ed2 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14eea 38 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14eeb 36 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14eec 32 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14f22 91 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14f26 89 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14f27 87 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14f5c 40 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 14fb3 35 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14fb6 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14fe8 81 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14fe9 7d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14fea 79 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15069 1e 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1506a 1c 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15087 47 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15088 43 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 150ce 47 7 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 150cf 45 6 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 150d0 43 5 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 150d1 41 4 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 15115 65 11 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15116 61 10 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1511b 5b b 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1511c 57 a 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1517a 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1518c 31 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 151bd f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 151cc f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 151db 1d 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 151f8 33 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1522b 73 7 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1522f 6b 3 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15230 5b 2 0 14 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1529e 2f 3 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 152cd f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 152dc 79 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 152dd 75 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 152de 71 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15355 68 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15356 64 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 153bd a6 3 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 153be a2 2 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 153de 81 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 153f0 6e 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 15463 26 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15464 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15489 31 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1548e 29 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 154ba d0 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 154be b3 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 154bf b1 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 154ce 9f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 1558a 69 13 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1559b 4f 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 1559c 4b 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 1559d 49 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 155f3 96 22 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15607 79 e 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15615 66 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1563a 29 0 0 8 c 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 15689 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1568a 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 156b7 62 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 156b8 5e 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 156b9 5a 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15719 8b a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1571a 87 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1571b 83 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157a4 1c 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157a5 18 8 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157c0 2a 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157c5 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157ea a6 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15890 37 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 158c7 51 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158c8 4d 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15918 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15919 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15946 6a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15947 66 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1594e 5e 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 159b0 6c a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 159b1 68 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 159b2 64 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15a1c e0 e 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15a23 d7 7 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15a2a cd 0 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15a45 b1 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 15afc 4f 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15b02 47 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15b4b 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15b6d 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15b8f 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15bb1 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15bb2 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15bdf 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15be0 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15c0d 141 7 0 8 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c14 138 0 0 8 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c95 b3 0 0 8 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 15c96 b1 0 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 15d4e d4 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15e22 c4 e 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15ee6 7e d 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15f64 125 11 0 10 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15f75 112 0 0 10 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16089 15f f 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16098 4a 0 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 160f0 b3 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 161e8 31 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16219 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1622b 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1623d 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1624f 150 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16256 147 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1639f a0 6 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1643f 50 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1648f 2bb 2b 0 4 0 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 164aa 296 10 0 4 4 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 164b3 28a 7 0 4 8 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 164ba 282 0 0 4 c d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 1674a d9 b 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 167b8 17 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16823 14 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16837 1b8 18 0 4 0 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16848 1a0 7 0 4 4 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1684f 18d 0 0 4 8 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16870 168 0 0 4 c 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 108 - ^ = -STACK WIN 4 169ef 56f 22 0 c 0 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16a03 97 e 0 c 4 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 16a11 88 0 0 c 8 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 16f5e 153 10 0 8 0 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16f82 11b 0 0 8 4 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 16f89 113 0 0 8 8 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 16f92 109 0 0 8 c d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 170b1 1ea 1b 0 8 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 170cc 1c8 0 0 8 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 17154 111 0 0 8 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 17155 10f 0 0 8 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 1729b e4 15 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 172a2 db e 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 172b0 ca 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1737f f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1738e 100 19 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1739a f2 d 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 173a7 e4 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1748e 46 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 174d4 92 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 17566 b42 14 0 8 0 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 17571 b35 9 0 8 4 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1757a b2b 0 0 8 8 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 175e3 abe 0 0 8 c 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 120 - ^ = -STACK WIN 4 180a8 211 13 0 4 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 180af 208 c 0 4 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 180bb 1fb 0 0 4 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 182b9 28b 1f 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 182c5 27a 13 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 182c6 278 12 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 182d8 263 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 18544 341 d 0 8 0 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 18589 2f7 0 0 8 4 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 185f0 28f 0 0 8 8 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 185f1 28d 0 0 8 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 18885 4e4 18 0 14 0 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 18893 4d4 a 0 14 4 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 18894 4d2 9 0 14 8 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 1889d 4c8 0 0 14 c 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 18d69 14c 6 0 0 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 18eb5 116 5 0 10 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 18ed6 59 0 0 10 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 18fcb 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 18fe6 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19001 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1901c a3 f 0 18 c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 190b6 8 0 0 18 c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 190bf a3 f 0 1c c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19159 8 0 0 1c c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 19162 387 12 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19172 350 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 19173 34e 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 19174 34c 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 194e9 13e 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 194f0 135 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19627 b1 6 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 196d8 64 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 196df 5b 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1973c 57 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19793 8f 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19822 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19836 14 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1984a 87 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 198d1 e3 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 199b4 1bd 9 0 c 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 199bb 1b4 2 0 c 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 199bc 1b2 1 0 c 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 199bd 1b0 0 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 19b71 71 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19b76 6b 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 19b7b 65 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 19b7c 63 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 19be2 b3 e 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19be6 1a a 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 19be7 2e 9 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 19bf0 e 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 19c95 46 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19c9a 40 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19cdb a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ce5 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ceb 51 6 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19d3c 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d51 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d64 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d79 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d8c 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19da1 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19db4 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19dcc 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19de2 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19dfa 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e10 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e28 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e3e 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e56 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e6c 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e81 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e94 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ea9 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ebc 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ed1 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19ee4 53 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19f37 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19f45 44 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19f89 1de 1a 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 19f9a 1c6 9 0 8 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 19f9b 1c2 8 0 8 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 19fa3 1b9 0 0 8 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1a167 78 c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a1d5 9 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1a1df 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a1e4 1f7 8 0 14 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a1eb 1ee 1 0 14 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1a1ec 1ec 0 0 14 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1a246 174 0 0 14 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1a3db 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a404 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a41f 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a449 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a464 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a46d 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a4c1 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a4ec 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a53b 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a564 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a5b3 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a5dc 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a62b 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a654 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a6a8 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a6d3 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a722 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a74b 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a79a 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a7c3 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a817 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a842 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a896 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a8c1 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a915 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a940 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1a98f 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a9b8 d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a9c5 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a9cd 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a9ec 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1aa06 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1aa25 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1aa41 12 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1aa53 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1aa6e 13b 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1aa83 126 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1aba9 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1abe4 13d 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1abf9 128 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1ad21 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1ad5c 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ad76 3a2 1d 0 20 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1ad87 391 c 0 20 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 1b118 43 6 0 24 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1b15b 1b8 1d 0 1c 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1b170 1a3 8 0 1c c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1b313 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1b353 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b359 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b382 419 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1b3a4 3f5 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1b3a5 3ed 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1b79b 190 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b79c 18e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b92b 73 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b92c 71 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1b92d 6f 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1b92e 6d 1 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1b92f 6b 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1b99e 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b9a5 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1b9a6 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1b9d1 40 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b9d2 3e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ba11 1c8 11 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1ba18 1bf a 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1ba1c 1ba 6 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1ba22 1b3 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1bbd9 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bbe0 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1bbe1 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1bc0c 89 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bc0d 87 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bc95 2c4 c 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1bc9c 2bb 5 0 4 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1bc9d 2b9 4 0 4 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1bca1 2b4 0 0 4 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1bf59 395 1b 0 4 0 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1bf6a 37d a 0 4 4 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 1bf6d 377 7 0 4 8 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 1bf74 36f 0 0 4 c 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 1c2ee 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c317 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c32d 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c353 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c379 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c39f 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c3a2 fe 9 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1c3a9 e9 2 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1c3aa e7 1 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1c3ab e5 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 1c4a0 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c4a9 fe 9 0 4 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1c4b0 e9 2 0 4 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 1c4b1 e7 1 0 4 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 1c4b2 e5 0 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 1c5a7 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c5b0 355 9 0 4 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1c5b7 34c 2 0 4 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 1c5b8 348 1 0 4 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 1c5b9 346 0 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 1c905 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c90e 20 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c912 1b 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c917 15 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c92e 36 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c934 2f 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1c964 79 8 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1c969 72 3 0 4 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1c96a 70 2 0 4 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1c9dd 3e6 11 0 10 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1c9e2 3df c 0 10 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1c9e9 3d7 5 0 10 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1c9ea 3d5 4 0 10 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1cdc3 45d 1d 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1cdd7 449 9 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1d220 1af a 0 18 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d22a 1a3 0 0 18 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1d270 15c 0 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1d2a3 128 0 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1d3cf 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d3ed 1d 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d40a 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d428 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d496 60 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d49c 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 1d4a5 45 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 1d4a6 43 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 1d4f6 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d50a 77 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d51b 5f 0 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d581 1e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d59f 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d5a0 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d5d1 1b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d5ec 96 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d5fd 7c 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d5fe 78 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d682 72 11 0 8 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d693 5a 0 0 8 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d6cf 13 0 0 8 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d6f4 1d0 13 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d705 1b6 2 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 1d706 1b2 1 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 1d707 1b0 0 0 4 c 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 1d8c4 bf 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d8d5 a5 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d8d6 a1 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d983 2c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1d9af 65 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1da14 3c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1da50 1e3 4 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1da51 1e1 3 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1da52 1df 2 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1da53 1dd 1 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1da54 1db 0 0 c 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1dc33 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dc45 18 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dc5d 40 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dc9d 78 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd15 1490 4 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd16 83f 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd17 83d 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1f1a5 1680 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1f1a9 15f8 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1f1aa 15f6 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1f1db 86c 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 20825 be 9 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2082e a9 0 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 20840 96 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 20930 82 6 0 c 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 209b2 6e 4 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20a20 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20a25 22b 8 0 14 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20a2c 222 1 0 14 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20a2d 220 0 0 14 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20a8b 1c1 0 0 14 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 20c50 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20c79 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20c94 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20cbe 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20cd9 1f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20cf8 1f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20d17 2d 9 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20d20 23 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20d44 94 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20d45 92 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20d4a 8c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20dd8 cd c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20e9b 9 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 20ea5 2c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20ea6 2a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20ed1 2a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20efb 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20efc 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f1d d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f64 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f75 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f8a 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f8f 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20f94 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20fa5 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 20fba 50 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 20fd7 1c 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2100a 60 9 0 0 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21013 57 0 0 0 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 2106a d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21077 170 5 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2107c 169 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 210e1 103 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 21125 be 0 0 8 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 211e7 182 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21369 b6 7 0 c 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21370 ad 0 0 c 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 2141f 2f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2147c 47 10 0 4 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 214c3 1b2 2a 0 18 8 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 214e0 195 d 0 18 c 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 56 - ^ = -STACK WIN 4 21675 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2167a 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 216a9 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 216ae 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 216dd 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 216e2 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21711 a2 c 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21718 99 5 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 2171d 93 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 2172b 84 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 217b3 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217b9 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217bf 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217c5 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217cb c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217d7 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217e3 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 217ef 349 c 0 0 c 3c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21a99 d 0 0 0 c 3c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 21b38 1f5 14 0 24 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21b47 1e4 5 0 24 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 21b48 1e2 4 0 24 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 21b49 1e0 3 0 24 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 21d2d 1ae 5 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21d32 15f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21d62 12e 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 21edb 4f c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21f21 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 21f2a 38 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21f59 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 21f62 41 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21f9a 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 21fa3 35 a 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21fa8 2f 5 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21fad 27 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21fd8 d3 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 21fdf ca 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 22020 88 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 22068 33 0 0 c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 220ab 50 4 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 220af 4a 0 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 220fb f0 e 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22102 e7 7 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 22108 e0 1 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 22109 de 0 0 10 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 221eb 5c 4 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 221ef 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22247 db 8 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2224c d2 3 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 2224d d0 2 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 22277 a5 0 0 c c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 22322 28 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2234a 25 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2236f 18 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22387 f6 c 0 14 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2238e eb 5 0 14 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 22393 e5 0 0 14 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 2247d 33 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22498 16 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 224b0 1d 4 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 224b4 17 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 224cd 224 17 0 1c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 224e2 20f 2 0 1c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 226f1 3e 6 0 1c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2272f 294 8 0 14 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22736 28b 1 0 14 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 22737 289 0 0 14 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 22793 1f9 0 0 14 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 229c3 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 229ec 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a07 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22a31 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a7b 81 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a83 70 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a92 60 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 22a93 5e 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 22afc 93 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22b00 8d 3 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 22b01 8b 2 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 22b40 4b 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 22b8f a2 6 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22b94 9b 1 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22b95 99 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22c31 83 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22cab 8 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 22cb4 d8 c 0 10 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22d83 8 0 0 10 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 22d8c e6 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22e69 8 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 22e72 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22e7a 117 8 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22e81 10e 1 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 22e82 10c 0 0 8 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 22f91 27 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 23021 ec 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 23028 e3 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 23088 82 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 2310d 17 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 23124 95 a 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2312a 7d 4 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 2312b 7b 3 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 2312e 77 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 231b9 1a 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 231d3 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 231ed 389 16 0 18 8 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 23201 375 2 0 18 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 23576 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 235b6 f8 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 235bd ef 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 2361d 8e 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 236ae 27 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 236d5 4d 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 236d6 48 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 23722 5d 4 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2373e 3f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 2373f 3d 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 2377f 24c f 0 8 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 23789 95 5 0 8 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 2378e 8f 0 0 8 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 237b1 6b 0 0 8 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 239cb 50 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 239cc 4e 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 239d1 48 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 239dc 3c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 239dd 3a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 23a1b ba 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 23a22 b1 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 23a5f 73 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 23ad5 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 240b9 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 0 1000 13 0 0 4 0 0 0 0 0 -STACK WIN 0 1020 1b 0 0 10 0 0 0 0 0 -STACK WIN 0 1040 1b 0 0 10 0 0 0 0 0 -STACK WIN 0 1060 19 8 0 4 0 0 0 0 0 -STACK WIN 0 1080 b 0 0 0 0 0 0 0 0 -STACK WIN 0 1090 24 3 0 4 0 0 0 0 0 -STACK WIN 0 10c0 f 0 0 8 0 0 0 0 0 -STACK WIN 0 10d0 17 0 0 4 0 0 0 0 0 -STACK WIN 0 10f0 27 9 0 10 0 0 0 0 0 -STACK WIN 0 1120 27 9 0 10 0 0 0 0 0 -STACK WIN 0 1150 d 0 0 8 0 0 0 0 0 -STACK WIN 0 1160 13 0 0 4 0 0 0 0 0 -STACK WIN 0 1180 21 d 0 10 0 0 0 0 0 -STACK WIN 0 11b0 21 d 0 10 0 0 0 0 0 -STACK WIN 0 11e0 7 0 0 0 0 0 0 0 0 -STACK WIN 0 11f0 6b 28 0 4 8 10 0 0 0 -STACK WIN 0 1260 32 3 0 0 0 0 0 0 0 -STACK WIN 0 12a0 e 0 0 0 0 0 0 0 0 -STACK WIN 0 12b0 47 3 0 4 0 0 0 0 0 -STACK WIN 0 1300 19 8 0 4 0 0 0 0 0 -STACK WIN 0 1320 32 3 0 0 0 0 0 0 0 -STACK WIN 0 1360 47 3 0 4 0 0 0 0 0 -STACK WIN 0 13b0 19 8 0 4 0 0 0 0 0 -STACK WIN 0 13d0 32 3 0 0 0 0 0 0 0 -STACK WIN 0 1410 47 3 0 4 0 0 0 0 0 -STACK WIN 0 1460 19 8 0 4 0 0 0 0 0 -STACK WIN 0 1480 71 29 0 4 c 10 0 0 0 -STACK WIN 0 1500 1b 0 0 8 0 0 0 0 0 -STACK WIN 0 1520 35 4 0 0 0 0 0 0 0 -STACK WIN 0 1560 20b 2d 0 14 14 14 0 0 1 -STACK WIN 0 19f0 31 0 0 0 0 0 0 0 0 -STACK WIN 0 1a30 51 d 0 4 c 0 0 0 0 -STACK WIN 0 1a90 c7 7 0 4 10 8 0 0 1 -STACK WIN 0 1b60 36 0 0 0 0 0 0 0 0 -STACK WIN 0 1ba0 3 0 0 0 0 0 0 0 0 -STACK WIN 0 1db0 81 2 0 8 0 0 0 0 0 -STACK WIN 0 1e40 1d 7 0 0 0 0 0 0 0 -STACK WIN 0 1e60 a2 3a 0 4 10 c4 0 0 0 -STACK WIN 0 1f10 142 c 0 c 0 38 0 0 1 -STACK WIN 0 2060 138 38 0 0 8 244 0 0 0 -STACK WIN 0 21a0 3b 7 0 4 0 0 0 0 0 -STACK WIN 0 21e0 25 5 0 4 0 0 0 0 0 -STACK WIN 0 2210 26 3 0 0 0 0 0 0 0 -STACK WIN 0 2240 e 0 0 0 0 0 0 0 0 -STACK WIN 0 2250 4 0 0 0 0 0 0 0 0 -STACK WIN 0 2260 11 0 0 0 0 0 0 0 0 -STACK WIN 0 2280 27 3 0 0 0 0 0 0 0 -STACK WIN 0 22b0 b 0 0 0 0 0 0 0 0 -STACK WIN 0 22c0 24 3 0 4 0 0 0 0 0 -STACK WIN 0 22f0 e 0 0 0 0 0 0 0 0 -STACK WIN 0 2300 c 0 0 0 0 0 0 0 0 -STACK WIN 0 2310 26 0 0 0 0 0 0 0 0 -STACK WIN 0 2340 1d 1 0 0 0 0 0 0 0 -STACK WIN 0 2360 1d 1 0 0 0 0 0 0 0 -STACK WIN 0 2380 13 0 0 0 0 0 0 0 0 -STACK WIN 0 23a0 23 0 0 0 0 0 0 0 0 -STACK WIN 0 23d0 56 5 0 0 8 c 0 0 0 -STACK WIN 0 2430 47 c 0 0 c 8 0 0 0 -STACK WIN 0 24f0 23 1 0 0 0 4 0 0 0 -STACK WIN 0 2520 3f b 0 8 0 0 0 0 0 -STACK WIN 0 2560 20 0 0 0 0 0 0 0 0 -STACK WIN 0 2580 20 0 0 0 0 0 0 0 0 -STACK WIN 0 25a0 1d 0 0 0 0 0 0 0 0 -STACK WIN 0 25c0 da 11 0 c 0 0 0 0 1 -STACK WIN 0 26a0 27 8 0 4 0 0 0 0 0 -STACK WIN 0 26d0 4a d 0 8 0 0 0 0 0 -STACK WIN 0 2720 e 0 0 0 0 0 0 0 0 -STACK WIN 0 2730 5 2 0 4 0 0 0 0 0 -STACK WIN 0 2740 5 2 0 4 0 0 0 0 0 -STACK WIN 0 2750 3 2 0 0 0 0 0 0 0 -STACK WIN 0 2760 b 0 0 0 0 0 0 0 0 -STACK WIN 0 2770 ef 11 0 c 0 0 0 0 1 -STACK WIN 0 2860 2b 8 0 4 0 0 0 0 0 -STACK WIN 0 2890 4f d 0 8 0 0 0 0 0 -STACK WIN 0 28e0 e 0 0 0 0 0 0 0 0 -STACK WIN 0 28f0 5 2 0 4 0 0 0 0 0 -STACK WIN 0 2900 3 2 0 0 0 0 0 0 0 -STACK WIN 0 2910 13 0 0 0 0 0 0 0 0 -STACK WIN 0 2930 86 a 0 10 10 4 0 0 1 -STACK WIN 0 29c0 23 0 0 0 0 0 0 0 0 -STACK WIN 0 29f0 1 0 0 0 0 0 0 0 0 -STACK WIN 0 2a00 26 0 0 0 0 0 0 0 0 -STACK WIN 0 2a30 23 0 0 0 0 0 0 0 0 -STACK WIN 0 2a60 76 23 0 0 4 50 0 0 0 -STACK WIN 0 2ae0 3 0 0 4 0 0 0 0 0 -STACK WIN 0 2af0 1 0 0 0 0 0 0 0 0 -STACK WIN 0 2b00 21 0 0 0 0 0 0 0 0 -STACK WIN 0 2b30 32 6 0 4 8 0 0 0 0 -STACK WIN 0 2b70 2f 6 0 0 8 0 0 0 0 -STACK WIN 0 2ba0 20 0 0 0 0 0 0 0 0 -STACK WIN 0 2bc0 20 0 0 0 0 0 0 0 0 -STACK WIN 0 2be0 1d 0 0 0 0 0 0 0 0 -STACK WIN 0 2c00 c1 5 0 8 0 0 0 0 1 -STACK WIN 0 2cd0 83 8 0 8 0 0 0 0 1 -STACK WIN 0 2d60 1f 0 0 4 0 0 0 0 0 -STACK WIN 0 2d80 bc b 0 8 0 0 0 0 1 -STACK WIN 0 2e40 e 0 0 0 0 0 0 0 0 -STACK WIN 0 2e50 5 2 0 4 0 0 0 0 0 -STACK WIN 0 2e60 e 0 0 8 0 0 0 0 0 -STACK WIN 0 2e70 da 4 0 8 0 0 0 0 1 -STACK WIN 0 2f50 97 8 0 8 0 0 0 0 1 -STACK WIN 0 2ff0 4 0 0 0 0 0 0 0 0 -STACK WIN 0 3000 23 0 0 4 0 0 0 0 0 -STACK WIN 0 3030 c7 e 0 8 0 0 0 0 1 -STACK WIN 0 3100 e 0 0 0 0 0 0 0 0 -STACK WIN 0 3110 5 2 0 4 0 0 0 0 0 -STACK WIN 0 3120 e 0 0 8 0 0 0 0 0 -STACK WIN 0 3130 6 0 0 0 0 0 0 0 0 -STACK WIN 0 3140 208 6 0 8 10 8 0 0 1 -STACK WIN 0 33d0 1 0 0 0 0 0 0 0 0 -STACK WIN 0 33e0 8 0 0 0 0 0 0 0 0 -STACK WIN 0 33f0 56 3 0 0 0 10 0 0 0 -STACK WIN 0 3450 32 0 0 4 0 0 0 0 0 -STACK WIN 0 3490 28 0 0 0 0 0 0 0 0 -STACK WIN 0 34c0 19 0 0 0 0 0 0 0 0 -STACK WIN 0 34e0 21 0 0 0 0 0 0 0 0 -STACK WIN 0 3510 19 8 0 4 0 0 0 0 0 -STACK WIN 0 3530 7 0 0 0 0 0 0 0 0 -STACK WIN 0 3540 6 0 0 0 0 0 0 0 0 -STACK WIN 0 36d0 39 8 0 4 0 0 0 0 0 -STACK WIN 0 3710 6 0 0 0 0 0 0 0 0 -STACK WIN 0 38a0 3a 8 0 4 0 0 0 0 0 -STACK WIN 0 38e0 6 0 0 0 0 0 0 0 0 -STACK WIN 0 38f0 32 0 0 4 0 0 0 0 0 -STACK WIN 0 3930 19 0 0 0 0 0 0 0 0 -STACK WIN 0 3950 56 7 0 4 0 c 0 0 0 -STACK WIN 0 39b0 4 0 0 0 0 0 0 0 0 -STACK WIN 0 39c0 59 7 0 4 0 c 0 0 0 -STACK WIN 0 3a20 6 0 0 0 0 0 0 0 0 -STACK WIN 0 3a30 21 d 0 10 0 0 0 0 0 -STACK WIN 0 3a60 27 9 0 10 0 0 0 0 0 -STACK WIN 0 3a90 24 f 0 0 0 0 0 0 0 -STACK WIN 0 3ac0 1 0 0 0 0 0 0 0 0 -STACK WIN 0 3ad0 15 0 0 0 0 0 0 0 0 -STACK WIN 0 3af0 21 d 0 10 0 0 0 0 0 -STACK WIN 0 3b20 27 9 0 10 0 0 0 0 0 -STACK WIN 0 3b50 22 d 0 0 0 0 0 0 0 -STACK WIN 0 3b80 10 0 0 0 0 0 0 0 0 -STACK WIN 0 3b90 25 11 0 0 0 0 0 0 0 -STACK WIN 0 3bc0 4f a 0 0 0 10 0 0 0 -STACK WIN 0 3c10 54 7 0 8 0 c 0 0 0 -STACK WIN 0 3c70 57 7 0 8 0 c 0 0 0 -STACK WIN 0 3cd0 19 8 0 4 0 0 0 0 0 -STACK WIN 0 3cf0 7 1 0 0 0 4 0 0 0 -STACK WIN 0 3d00 21 d 0 14 0 0 0 0 0 -STACK WIN 0 3d30 7 1 0 0 0 4 0 0 0 -STACK WIN 0 3d40 27 9 0 14 0 0 0 0 0 -STACK WIN 0 3d70 3 0 0 0 0 0 0 0 0 -STACK WIN 0 3d80 1 0 0 0 0 0 0 0 0 -STACK WIN 0 3d90 7 1 0 0 0 4 0 0 0 -STACK WIN 0 3da0 15 0 0 4 0 0 0 0 0 -STACK WIN 0 3dc0 1 0 0 4 0 0 0 0 0 -STACK WIN 0 3dd0 15 0 0 8 0 0 0 0 0 -STACK WIN 0 3df0 21 d 0 14 0 0 0 0 0 -STACK WIN 0 3e20 27 9 0 14 0 0 0 0 0 -STACK WIN 0 3e50 22 d 0 0 0 0 0 0 0 -STACK WIN 0 3e80 10 0 0 0 0 0 0 0 0 -STACK WIN 0 3e90 7 1 0 0 0 4 0 0 0 -STACK WIN 0 3ea0 25 11 0 c 0 0 0 0 0 -STACK WIN 0 3ed0 3 0 0 4 0 0 0 0 0 -STACK WIN 0 3ee0 15 0 0 0 0 0 0 0 0 -STACK WIN 0 3f00 22 d 0 8 0 0 0 0 0 -STACK WIN 0 3f30 13 0 0 0 0 0 0 0 0 -STACK WIN 0 3f50 1 0 0 0 0 0 0 0 0 -STACK WIN 0 3f60 15 0 0 8 0 0 0 0 0 -STACK WIN 0 3f80 22 d 0 0 0 0 0 0 0 -STACK WIN 0 3fb0 15 0 0 4 0 0 0 0 0 -STACK WIN 0 3fd0 15 0 0 4 0 0 0 0 0 -STACK WIN 0 3ff0 13 0 0 4 0 0 0 0 0 -STACK WIN 0 4010 ae e 0 4 0 54 0 0 0 -STACK WIN 0 40c0 ae e 0 4 0 4c 0 0 0 -STACK WIN 0 4170 40 7 0 4 0 0 0 0 0 -STACK WIN 0 4464 13 0 0 0 0 0 0 0 0 -STACK WIN 0 466c 16 0 0 0 0 0 0 0 0 -STACK WIN 0 46a0 9 0 0 0 0 0 0 0 0 -STACK WIN 0 46f2 a 0 0 0 0 0 0 0 0 -STACK WIN 0 5405 14 0 0 0 0 0 0 0 0 -STACK WIN 0 58bc a 0 0 0 0 0 0 0 0 -STACK WIN 0 6039 12 0 0 0 0 0 0 0 0 -STACK WIN 0 60e0 8b 0 0 4 0 0 0 0 0 -STACK WIN 0 71eb b 0 0 0 0 0 0 0 0 -STACK WIN 0 7a28 a 0 0 0 0 0 0 0 0 -STACK WIN 0 7b36 a 0 0 0 0 0 0 0 0 -STACK WIN 0 7cc5 9 0 0 0 0 0 0 0 0 -STACK WIN 0 7f28 4 0 0 0 0 0 0 0 0 -STACK WIN 0 8151 9 0 0 0 0 0 0 0 0 -STACK WIN 0 821f 9 0 0 0 0 0 0 0 0 -STACK WIN 0 8390 a 0 0 0 0 0 0 0 0 -STACK WIN 0 83ce 21 0 0 0 0 0 0 0 0 -STACK WIN 0 8477 9 0 0 0 0 0 0 0 0 -STACK WIN 0 8714 a 0 0 0 0 0 0 0 0 -STACK WIN 0 8747 a 0 0 0 0 0 0 0 0 -STACK WIN 0 8779 a 0 0 0 0 0 0 0 0 -STACK WIN 0 87b4 a 0 0 0 0 0 0 0 0 -STACK WIN 0 89d2 9 0 0 0 0 0 0 0 0 -STACK WIN 0 8a62 7c 0 0 0 0 0 0 0 0 -STACK WIN 0 8c49 4 0 0 0 0 0 0 0 0 -STACK WIN 0 8ce2 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9694 9 0 0 0 0 0 0 0 0 -STACK WIN 0 9835 c 0 0 0 0 0 0 0 0 -STACK WIN 0 9841 c 0 0 0 0 0 0 0 0 -STACK WIN 0 9a66 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9ab6 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9ae0 4c 8 0 c 10 0 0 0 1 -STACK WIN 0 9c4a 6 0 0 0 0 0 0 0 0 -STACK WIN 0 9ca8 9 0 0 0 0 0 0 0 0 -STACK WIN 0 9ee5 9 0 0 0 0 0 0 0 0 -STACK WIN 0 9fd7 c 0 0 0 0 0 0 0 0 -STACK WIN 0 a04a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 a163 c 0 0 0 0 0 0 0 0 -STACK WIN 0 a1b9 9 0 0 0 0 0 0 0 0 -STACK WIN 0 a1d0 88 0 0 8 0 0 0 0 0 -STACK WIN 0 a2c0 7a 0 0 c 0 0 0 0 0 -STACK WIN 0 c23c a 0 0 0 0 0 0 0 0 -STACK WIN 0 df29 14 0 0 0 0 0 0 0 0 -STACK WIN 0 dfed a 0 0 0 0 0 0 0 0 -STACK WIN 0 e257 c 0 0 0 0 0 0 0 0 -STACK WIN 0 e40d 15 0 0 0 0 0 0 0 0 -STACK WIN 0 e761 17 0 0 0 0 0 0 0 0 -STACK WIN 0 eaa4 c 0 0 0 0 0 0 0 0 -STACK WIN 0 eea0 9 0 0 0 0 0 0 0 0 -STACK WIN 0 f221 9 0 0 0 0 0 0 0 0 -STACK WIN 0 f370 c 0 0 0 0 0 0 0 0 -STACK WIN 0 f3fd c 0 0 0 0 0 0 0 0 -STACK WIN 0 1000a 11 0 0 0 0 0 0 0 0 -STACK WIN 0 1001b c 0 0 0 0 0 0 0 0 -STACK WIN 0 1004c 8 0 0 0 0 0 0 0 0 -STACK WIN 0 10558 90 3 0 c c 0 0 0 0 -STACK WIN 0 105e8 46 0 0 10 4 0 0 0 1 -STACK WIN 0 1064a 17 4 0 0 10 0 0 0 1 -STACK WIN 0 10661 19 0 0 0 0 0 0 0 0 -STACK WIN 0 10694 17 1 0 8 4 0 0 0 1 -STACK WIN 0 123b2 9 0 0 0 0 0 0 0 0 -STACK WIN 0 123f8 9 0 0 0 0 0 0 0 0 -STACK WIN 0 126bd a 0 0 0 0 0 0 0 0 -STACK WIN 0 128c8 e 0 0 0 0 0 0 0 0 -STACK WIN 0 129c5 f 0 0 0 0 0 0 0 0 -STACK WIN 0 12a8e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 12b7f 2d 0 0 0 0 0 0 0 0 -STACK WIN 0 12ca3 e 0 0 0 0 0 0 0 0 -STACK WIN 0 12e47 f 0 0 0 0 0 0 0 0 -STACK WIN 0 14079 b 0 0 0 0 0 0 0 0 -STACK WIN 0 14221 84 3 0 8 c 0 0 0 0 -STACK WIN 0 142a5 23 0 0 0 0 0 0 0 0 -STACK WIN 0 142f0 3 0 0 0 0 0 0 0 0 -STACK WIN 0 14385 11 0 0 0 0 0 0 0 0 -STACK WIN 0 190b6 9 0 0 0 0 0 0 0 0 -STACK WIN 0 19159 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1a1d5 a 0 0 0 0 0 0 0 0 -STACK WIN 0 20e9b a 0 0 0 0 0 0 0 0 -STACK WIN 0 20fd7 1c 0 0 0 0 0 0 0 0 -STACK WIN 0 21a99 e 0 0 0 0 0 0 0 0 -STACK WIN 0 21f21 9 0 0 0 0 0 0 0 0 -STACK WIN 0 21f59 9 0 0 0 0 0 0 0 0 -STACK WIN 0 21f9a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 22cab 9 0 0 0 0 0 0 0 0 -STACK WIN 0 22d83 9 0 0 0 0 0 0 0 0 -STACK WIN 0 22e69 9 0 0 0 0 0 0 0 0 -STACK WIN 0 23b00 be 0 0 8 0 0 0 0 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module1.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module1.out deleted file mode 100644 index cd6e18d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module1.out +++ /dev/null @@ -1,29 +0,0 @@ -MODULE windows x86 111111111111111111111111111111111 module1.pdb -INFO CODE_ID FFFFFFFF module1.exe -FILE 1 file1_1.cc -FILE 2 file1_2.cc -FILE 3 file1_3.cc -FUNC 1000 c 0 Function1_1 -1000 4 44 1 -1004 4 45 1 -1008 4 46 1 -FUNC 1100 8 4 Function1_2 -1100 4 65 2 -1104 4 66 2 -FUNC 1200 100 8 Function1_3 -FUNC 1300 100 c Function1_4 -FUNC 2000 0 0 Test_Zero_Size_Function_Is_Ignored -2000 4 88 2 -PUBLIC 2800 0 PublicSymbol -FUNC 3000 7000 42 LargeFunction -3000 7000 4098359 3 -STACK WIN 4 1000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1100 8 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1100 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1300 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK CFI INIT 3d40 af .cfa: $esp 4 + .ra: .cfa 4 - ^ -STACK CFI 3d41 .cfa: $esp 8 + -STACK CFI 3d43 .cfa: $ebp 8 + $ebp: .cfa 8 - ^ -STACK CFI 3d54 $ebx: .cfa 20 - ^ -STACK CFI 3d5a $esi: .cfa 16 - ^ -STACK CFI 3d84 $edi: .cfa 12 - ^ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module2.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module2.out deleted file mode 100644 index 845212cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module2.out +++ /dev/null @@ -1,23 +0,0 @@ -MODULE windows x86 222222222 module2.pdb -FILE 1 file2_1.cc -FILE 2 file2_2.cc -FILE 3 file2_3.cc -FUNC 2000 c 4 Function2_1 -1000 4 54 1 -1004 4 55 1 -1008 4 56 1 -PUBLIC 2160 0 Public2_1 -FUNC 2170 14 4 Function2_2 -2170 6 10 2 -2176 4 12 2 -217a 6 13 2 -2180 4 21 2 -PUBLIC 21a0 0 Public2_2 -STACK WIN 4 2000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 2170 14 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK CFI INIT 3df0 af .cfa: $esp 4 + .ra: .cfa 4 - ^ -STACK CFI 3df1 .cfa: $esp 8 + -STACK CFI 3df3 .cfa: $ebp 8 + $ebp: .cfa 8 - ^ -STACK CFI 3e04 $ebx: .cfa 20 - ^ -STACK CFI 3e0a $esi: .cfa 16 - ^ -STACK CFI 3e34 $edi: .cfa 12 - ^ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module3_bad.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module3_bad.out deleted file mode 100644 index bb772486..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module3_bad.out +++ /dev/null @@ -1,3 +0,0 @@ -MODULE windows x86 333333333333333333333333333333333 module3.pdb -FILE 1 file1.cc -FUNC 1000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module4_bad.out b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module4_bad.out deleted file mode 100644 index d01fb2cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/module4_bad.out +++ /dev/null @@ -1,5 +0,0 @@ -MODULE windows x86 444444444444444444444444444444444 module4.pdb -FILE 1 file4_1.cc -FILE 2 file4_2.cc -1000 4 44 1 -1004 4 45 1 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_read_av.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_read_av.dmp deleted file mode 100755 index f146dc7f..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_read_av.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_write_av.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_write_av.dmp deleted file mode 100755 index 35c59335..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/null_write_av.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_clobber_write.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_clobber_write.dmp deleted file mode 100755 index 5deea8de..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_clobber_write.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_conditional.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_conditional.dmp deleted file mode 100755 index b3604233..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_conditional.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_non_null.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_non_null.dmp deleted file mode 100755 index 2d972a46..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/read_av_non_null.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/stack_exhaustion.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/stack_exhaustion.dmp deleted file mode 100755 index 4eb378b6..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/stack_exhaustion.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/test_app.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/test_app.cc deleted file mode 100644 index 7882a8bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/test_app.cc +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is used to generate minidump2.dmp and minidump2.sym. -// cl /Zi test_app.cc /Fetest_app.exe /I google_breakpad/src \ -// google_breakpad/src/client/windows/releasestaticcrt/exception_handler.lib -// Then run test_app to generate a dump, and dump_syms to create the .sym file. - -#include - -#include "client/windows/handler/exception_handler.h" - -namespace { - -static bool callback(const wchar_t *dump_path, const wchar_t *id, - void *context, EXCEPTION_POINTERS *exinfo, - MDRawAssertionInfo *assertion, - bool succeeded) { - if (succeeded) { - printf("dump guid is %ws\n", id); - } else { - printf("dump failed\n"); - } - fflush(stdout); - - return succeeded; -} - -static void CrashFunction() { - int *i = reinterpret_cast(0x45); - *i = 5; // crash! -} - -} // namespace - -int main(int argc, char **argv) { - google_breakpad::ExceptionHandler eh( - L".", NULL, callback, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - CrashFunction(); - printf("did not crash?\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/write_av_non_null.dmp b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/write_av_non_null.dmp deleted file mode 100755 index 1ec80ea2..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/testdata/write_av_non_null.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.cc deleted file mode 100644 index 85f77821..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -bool Tokenize(char *line, - const char *separators, - int max_tokens, - vector *tokens) { - tokens->clear(); - tokens->reserve(max_tokens); - - int remaining = max_tokens; - - // Split tokens on the separator character. - // strip them out before exhausting max_tokens. - char *save_ptr; - char *token = strtok_r(line, separators, &save_ptr); - while (token && --remaining > 0) { - tokens->push_back(token); - if (remaining > 1) - token = strtok_r(NULL, separators, &save_ptr); - } - - // If there's anything left, just add it as a single token. - if (!remaining > 0) { - if ((token = strtok_r(NULL, "\r\n", &save_ptr))) { - tokens->push_back(token); - } - } - - return tokens->size() == static_cast(max_tokens); -} - -void StringToVector(const string &str, vector &vec) { - vec.resize(str.length() + 1); - std::copy(str.begin(), str.end(), - vec.begin()); - vec[str.length()] = '\0'; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.h deleted file mode 100644 index 1562b823..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/tokenize.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Implements a Tokenize function for splitting up strings. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ -#define GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ - -#include -#include - -namespace google_breakpad { - -// Splits line into at most max_tokens tokens, separated by any of the -// characters in separators and placing them in the tokens vector. -// line is a 0-terminated string that optionally ends with a newline -// character or combination, which will be removed. -// If more tokens than max_tokens are present, the final token is placed -// into the vector without splitting it up at all. This modifies line as -// a side effect. Returns true if exactly max_tokens tokens are returned, -// and false if fewer are returned. This is not considered a failure of -// Tokenize, but may be treated as a failure if the caller expects an -// exact, as opposed to maximum, number of tokens. - -bool Tokenize(char *line, - const char *separators, - int max_tokens, - std::vector *tokens); -// For convenience, since you need a char* to pass to Tokenize. -// You can call StringToVector on a std::string, and use &vec[0]. -void StringToVector(const std::string &str, std::vector &vec); - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.cc deleted file mode 100644 index 0cb911e0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.cc +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "processor/udp_network.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "processor/logging.h" - -namespace google_breakpad { -using std::string; -using std::dec; - -UDPNetwork::~UDPNetwork() { - if (socket_ != -1) { - close(socket_); - socket_ = -1; - } -} - -bool UDPNetwork::Init(bool listen) { - struct addrinfo hints; - struct addrinfo *results; - memset(&hints, 0, sizeof(hints)); - if (ip4only_) - hints.ai_family = AF_INET; - else - // don't care if it's IPv4 or IPv6 - hints.ai_family = AF_UNSPEC; - // want a UDP socket - hints.ai_socktype = SOCK_DGRAM; - if (listen) - hints.ai_flags = AI_PASSIVE; - - const char *hostname = NULL; - if (!server_.empty()) - hostname = server_.c_str(); - char portname[6]; - sprintf(portname, "%u", port_); - if (!listen) { - BPLOG(INFO) << "Initializing network connection to " << server_ - << ":" << dec << port_; - } - if (getaddrinfo(hostname, portname, &hints, &results) != 0) { - BPLOG(ERROR) << "failed to get address info for address " << server_ - << ": " << strerror(errno); - return false; - } - // save the address of the first result. - //TODO(ted): could support multiple DNS entries, round-robin them for - // fail-over etc - memcpy(&address_, results->ai_addr, GET_SA_LEN(results->ai_addr)); - - socket_ = socket(results->ai_family, results->ai_socktype, - results->ai_protocol); - freeaddrinfo(results); - - if (socket_ == -1) { - BPLOG(ERROR) << "failed to create socket: " << strerror(errno); - return false; - } - - if (listen) { - char address_string[INET_ADDRSTRLEN]; - void *addr = NULL; - if (((struct sockaddr*)&address_)->sa_family == AF_INET) - addr = &((struct sockaddr_in*)&address_)->sin_addr; - else if (((struct sockaddr*)&address_)->sa_family == AF_INET6) - addr = &((struct sockaddr_in6*)&address_)->sin6_addr; - if (inet_ntop(((struct sockaddr*)&address_)->sa_family, addr, - address_string, sizeof(address_string)) != NULL) - BPLOG(INFO) << "Listening on address " << address_string; - - if (bind(socket_, - (struct sockaddr *)&address_, - GET_SA_LEN(address_)) == -1) { - BPLOG(ERROR) << "Failed to bind socket"; - close(socket_); - return false; - } - socklen_t bound_addr_len = GET_SA_LEN(address_); - if (getsockname(socket_, (struct sockaddr *)&address_, &bound_addr_len) - == 0) { - if (((struct sockaddr*)&address_)->sa_family == AF_INET) - port_ = ntohs(((struct sockaddr_in*)&address_)->sin_port); - else if (((struct sockaddr*)&address_)->sa_family == AF_INET6) - port_ = ntohs(((struct sockaddr_in6*)&address_)->sin6_port); - } - BPLOG(INFO) << "Listening on port " << port_; - } - return true; -} - -bool UDPNetwork::Send(const char *data, size_t length) { - int total_sent = 0; - while (total_sent < length) { - int bytes_sent = sendto(socket_, - data + total_sent, - length - total_sent, - 0, - (struct sockaddr *)&address_, - GET_SA_LEN(address_)); - if (bytes_sent < 0) { - BPLOG(ERROR) << "error sending message: " - << strerror(errno) << " (" << errno << ")"; - break; - } - total_sent += bytes_sent; - } - return total_sent == length; -} - -bool UDPNetwork::WaitToReceive(int wait_time) { - fd_set readfds; - FD_ZERO(&readfds); - FD_SET(socket_, &readfds); - struct timeval timeout; - - timeout.tv_sec = wait_time / 1000; - timeout.tv_usec = (wait_time % 1000) * 1000; - int ret = select(socket_+1, &readfds, NULL, NULL, &timeout); - if (ret == 0) { - return false; - } else if (ret == -1) { - if (errno != EINTR) - BPLOG(ERROR) << "error in select(): " << strerror(errno); - return false; - } else if (!FD_ISSET(socket_, &readfds)) { - BPLOG(ERROR) << "select returned, but our socket isn't ready?"; - return false; - } - - return true; -} - -bool UDPNetwork::Receive(char *buffer, size_t buffer_size, ssize_t &received) { - socklen_t fromlen = GET_SA_LEN(address_); - received = recvfrom(socket_, buffer, buffer_size, 0, - (struct sockaddr *)&address_, - &fromlen); - - if (received == -1) { - BPLOG(ERROR) << "Error in recvfrom reading response: " - << strerror(errno); - } - return received != -1; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.h deleted file mode 100644 index 6e8488bc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/udp_network.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// UDPNetwork implements NetworkInterface using UDP sockets. - -#ifndef _GOOGLE_BREAKPAD_PROCESSOR_UDP_NETWORK_H_ -#define _GOOGLE_BREAKPAD_PROCESSOR_UDP_NETWORK_H_ - -#include - -#include - -#include "processor/network_interface.h" - -namespace google_breakpad { - -class UDPNetwork : public NetworkInterface { - public: - // Initialize a UDP Network socket at this address and port. - // address can be empty to indicate that any local address is acceptable. - UDPNetwork(const std::string address, - unsigned short port, - bool ip4only = false) - : server_(address), - port_(port), - ip4only_(ip4only), - socket_(-1) {}; - - ~UDPNetwork(); - - virtual bool Init(bool listen); - virtual bool Send(const char *data, size_t length); - virtual bool WaitToReceive(int timeout); - virtual bool Receive(char *buffer, size_t buffer_size, ssize_t &received); - - unsigned short port() { return port_; } - - private: - std::string server_; - unsigned short port_; - bool ip4only_; - struct sockaddr_storage address_; - int socket_; -}; - -} // namespace google_breakpad -#endif // GOOGLE_BREAKPAD_PROCESSOR_UDP_NETWORK_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/windows_frame_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/processor/windows_frame_info.h deleted file mode 100644 index 067f3cfd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/processor/windows_frame_info.h +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// windows_frame_info.h: Holds debugging information about a stack frame. -// -// This structure is specific to Windows debugging information obtained -// from pdb files using the DIA API. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_WINDOWS_FRAME_INFO_H__ -#define PROCESSOR_WINDOWS_FRAME_INFO_H__ - -#include -#include - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "processor/logging.h" -#include "processor/tokenize.h" - -namespace google_breakpad { - -struct WindowsFrameInfo { - public: - enum Validity { - VALID_NONE = 0, - VALID_PARAMETER_SIZE = 1, - VALID_ALL = -1 - }; - - // The types for stack_info_. This is equivalent to MS DIA's - // StackFrameTypeEnum. Each identifies a different type of frame - // information, although all are represented in the symbol file in the - // same format. These are used as indices to the stack_info_ array. - enum StackInfoTypes { - STACK_INFO_FPO = 0, - STACK_INFO_TRAP, // not used here - STACK_INFO_TSS, // not used here - STACK_INFO_STANDARD, - STACK_INFO_FRAME_DATA, - STACK_INFO_LAST, // must be the last sequentially-numbered item - STACK_INFO_UNKNOWN = -1 - }; - - WindowsFrameInfo() : valid(VALID_NONE), - prolog_size(0), - epilog_size(0), - parameter_size(0), - saved_register_size(0), - local_size(0), - max_stack_size(0), - allocates_base_pointer(0), - program_string() {} - - WindowsFrameInfo(u_int32_t set_prolog_size, - u_int32_t set_epilog_size, - u_int32_t set_parameter_size, - u_int32_t set_saved_register_size, - u_int32_t set_local_size, - u_int32_t set_max_stack_size, - int set_allocates_base_pointer, - const std::string set_program_string) - : valid(VALID_ALL), - prolog_size(set_prolog_size), - epilog_size(set_epilog_size), - parameter_size(set_parameter_size), - saved_register_size(set_saved_register_size), - local_size(set_local_size), - max_stack_size(set_max_stack_size), - allocates_base_pointer(set_allocates_base_pointer), - program_string(set_program_string) {} - - // Parse a textual serialization of a WindowsFrameInfo object from - // a string. Returns NULL if parsing fails, or a new object - // otherwise. type, rva and code_size are present in the STACK line, - // but not the StackFrameInfo structure, so return them as outparams. - static WindowsFrameInfo *ParseFromString(const std::string string, - int &type, - u_int64_t &rva, - u_int64_t &code_size) { - // The format of a STACK WIN record is documented at: - // - // http://code.google.com/p/google-breakpad/wiki/SymbolFiles - - std::vector buffer; - StringToVector(string, buffer); - std::vector tokens; - if (!Tokenize(&buffer[0], " \r\n", 11, &tokens)) - return NULL; - - type = strtol(tokens[0], NULL, 16); - if (type < 0 || type > STACK_INFO_LAST - 1) - return NULL; - - rva = strtoull(tokens[1], NULL, 16); - code_size = strtoull(tokens[2], NULL, 16); - u_int32_t prolog_size = strtoul(tokens[3], NULL, 16); - u_int32_t epilog_size = strtoul(tokens[4], NULL, 16); - u_int32_t parameter_size = strtoul(tokens[5], NULL, 16); - u_int32_t saved_register_size = strtoul(tokens[6], NULL, 16); - u_int32_t local_size = strtoul(tokens[7], NULL, 16); - u_int32_t max_stack_size = strtoul(tokens[8], NULL, 16); - int has_program_string = strtoul(tokens[9], NULL, 16); - - const char *program_string = ""; - int allocates_base_pointer = 0; - if (has_program_string) { - program_string = tokens[10]; - } else { - allocates_base_pointer = strtoul(tokens[10], NULL, 16); - } - - return new WindowsFrameInfo(prolog_size, - epilog_size, - parameter_size, - saved_register_size, - local_size, - max_stack_size, - allocates_base_pointer, - program_string); - } - - // CopyFrom makes "this" WindowsFrameInfo object identical to "that". - void CopyFrom(const WindowsFrameInfo &that) { - valid = that.valid; - prolog_size = that.prolog_size; - epilog_size = that.epilog_size; - parameter_size = that.parameter_size; - saved_register_size = that.saved_register_size; - local_size = that.local_size; - max_stack_size = that.max_stack_size; - allocates_base_pointer = that.allocates_base_pointer; - program_string = that.program_string; - } - - // Clears the WindowsFrameInfo object so that users will see it as though - // it contains no information. - void Clear() { - valid = VALID_NONE; - program_string.erase(); - } - - // Identifies which fields in the structure are valid. This is of - // type Validity, but it is defined as an int because it's not - // possible to OR values into an enumerated type. Users must check - // this field before using any other. - int valid; - - // These values come from IDiaFrameData. - u_int32_t prolog_size; - u_int32_t epilog_size; - u_int32_t parameter_size; - u_int32_t saved_register_size; - u_int32_t local_size; - u_int32_t max_stack_size; - - // Only one of allocates_base_pointer or program_string will be valid. - // If program_string is empty, use allocates_base_pointer. - bool allocates_base_pointer; - std::string program_string; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_WINDOWS_FRAME_INFO_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CHANGES b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CHANGES deleted file mode 100644 index 8b62defa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CHANGES +++ /dev/null @@ -1,14 +0,0 @@ -Changes for 1.1.0: - - * New feature: ability to use Google Mock with any testing framework. - * New feature: macros for easily defining new matchers - * New feature: macros for easily defining new actions. - * New feature: more container matchers. - * New feature: actions for accessing function arguments and throwing - exceptions. - * Improved the Google Mock doctor script for diagnosing compiler errors. - * Bug fixes and implementation clean-up. - -Changes for 1.0.0: - - * Initial Open Source release of Google Mock diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CONTRIBUTORS b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CONTRIBUTORS deleted file mode 100644 index a661d8fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/CONTRIBUTORS +++ /dev/null @@ -1,38 +0,0 @@ -# This file contains a list of people who've made non-trivial -# contribution to the Google C++ Mocking Framework project. People -# who commit code to the project are encouraged to add their names -# here. Please keep the list sorted by first names. - -Benoit Sigoure -Bogdan Piloca -Chandler Carruth -Dave MacLachlan -David Anderson -Dean Sturtevant -Gene Volovich -Hal Burch -Jeffrey Yasskin -Jim Keller -Joe Walnes -Jon Wray -Keir Mierle -Keith Ray -Kostya Serebryany -Lev Makhlis -Mario Tanev -Mark Paskin -Markus Heule -Matthew Simmons -Mike Bland -Neal Norwitz -Nermin Ozkiranartli -Owen Carlsen -Paneendra Ba -Paul Menage -Piotr Kaminski -Russ Rufer -Takeshi Yoshino -Vadim Berman -Vlad Losev -Wolfgang Klier -Zhanyong Wan diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/COPYING deleted file mode 100644 index 1941a11f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/Makefile.am deleted file mode 100644 index 196b9271..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/Makefile.am +++ /dev/null @@ -1,232 +0,0 @@ -# Nonstandard package files for distribution. -EXTRA_DIST = - -# We may need to build our internally packaged gtest. If so, it will be -# included in the 'subdirs' variable. -SUBDIRS = $(subdirs) - -# Scripts and utilities to be installed by 'make install'. -dist_bin_SCRIPTS = scripts/gmock_doctor.py -bin_SCRIPTS = scripts/gmock-config - -# This is generated by the configure script, so clean it for distribution. -DISTCLEANFILES = scripts/gmock-config - -# We define the global AM_CPPFLAGS as everything we compile includes from these -# directories. -AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include - -# Build rules for libraries. -lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la - -lib_libgmock_la_SOURCES = src/gmock.cc \ - src/gmock-cardinalities.cc \ - src/gmock-internal-utils.cc \ - src/gmock-matchers.cc \ - src/gmock-printers.cc \ - src/gmock-spec-builders.cc - -pkginclude_HEADERS = include/gmock/gmock.h \ - include/gmock/gmock-actions.h \ - include/gmock/gmock-cardinalities.h \ - include/gmock/gmock-generated-actions.h \ - include/gmock/gmock-generated-function-mockers.h \ - include/gmock/gmock-generated-matchers.h \ - include/gmock/gmock-generated-nice-strict.h \ - include/gmock/gmock-matchers.h \ - include/gmock/gmock-printers.h \ - include/gmock/gmock-spec-builders.h - -pkginclude_internaldir = $(pkgincludedir)/internal -pkginclude_internal_HEADERS = \ - include/gmock/internal/gmock-generated-internal-utils.h \ - include/gmock/internal/gmock-internal-utils.h \ - include/gmock/internal/gmock-port.h - -lib_libgmock_main_la_SOURCES = src/gmock_main.cc -lib_libgmock_main_la_LIBADD = lib/libgmock.la - -# Build rules for tests. Automake's naming for some of these variables isn't -# terribly obvious, so this is a brief reference: -# -# TESTS -- Programs run automatically by "make check" -# check_PROGRAMS -- Programs built by "make check" but not necessarily run - -TESTS= -TESTS_ENVIRONMENT = GMOCK_SOURCE_DIR="$(srcdir)/test" \ - GMOCK_BUILD_DIR="$(top_builddir)/test" -check_PROGRAMS= -AM_LDFLAGS = $(GTEST_LDFLAGS) - -TESTS += test/gmock-actions_test -check_PROGRAMS += test/gmock-actions_test -test_gmock_actions_test_SOURCES = test/gmock-actions_test.cc -test_gmock_actions_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-cardinalities_test -check_PROGRAMS += test/gmock-cardinalities_test -test_gmock_cardinalities_test_SOURCES = test/gmock-cardinalities_test.cc -test_gmock_cardinalities_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-generated-actions_test -check_PROGRAMS += test/gmock-generated-actions_test -test_gmock_generated_actions_test_SOURCES = test/gmock-generated-actions_test.cc -test_gmock_generated_actions_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-generated-function-mockers_test -check_PROGRAMS += test/gmock-generated-function-mockers_test -test_gmock_generated_function_mockers_test_SOURCES = \ - test/gmock-generated-function-mockers_test.cc -test_gmock_generated_function_mockers_test_LDADD = $(GTEST_LIBS) \ - lib/libgmock_main.la - -TESTS += test/gmock-generated-internal-utils_test -check_PROGRAMS += test/gmock-generated-internal-utils_test -test_gmock_generated_internal_utils_test_SOURCES = \ - test/gmock-generated-internal-utils_test.cc -test_gmock_generated_internal_utils_test_LDADD = $(GTEST_LIBS) \ - lib/libgmock_main.la - -TESTS += test/gmock-generated-matchers_test -check_PROGRAMS += test/gmock-generated-matchers_test -test_gmock_generated_matchers_test_SOURCES = \ - test/gmock-generated-matchers_test.cc -test_gmock_generated_matchers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-internal-utils_test -check_PROGRAMS += test/gmock-internal-utils_test -test_gmock_internal_utils_test_SOURCES = test/gmock-internal-utils_test.cc -test_gmock_internal_utils_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock_link_test -check_PROGRAMS += test/gmock_link_test -test_gmock_link_test_SOURCES = test/gmock_link_test.cc \ - test/gmock_link2_test.cc \ - test/gmock_link_test.h -test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-matchers_test -check_PROGRAMS += test/gmock-matchers_test -test_gmock_matchers_test_SOURCES = test/gmock-matchers_test.cc -test_gmock_matchers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-nice-strict_test -check_PROGRAMS += test/gmock-nice-strict_test -test_gmock_nice_strict_test_SOURCES = test/gmock-nice-strict_test.cc -test_gmock_nice_strict_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-port_test -check_PROGRAMS += test/gmock-port_test -test_gmock_port_test_SOURCES = test/gmock-port_test.cc -test_gmock_port_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-printers_test -check_PROGRAMS += test/gmock-printers_test -test_gmock_printers_test_SOURCES = test/gmock-printers_test.cc -test_gmock_printers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -TESTS += test/gmock-spec-builders_test -check_PROGRAMS += test/gmock-spec-builders_test -test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc -test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la - -TESTS += test/gmock_test -check_PROGRAMS += test/gmock_test -test_gmock_test_SOURCES = test/gmock_test.cc -test_gmock_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la - -# A sanity test for verifying that Google Mock works when RTTI is -# disabled. We pick gmock-spec-builders_test.cc as it exercises all -# components of Google Mock. -TESTS += test/gmock_no_rtti_test -check_PROGRAMS += test/gmock_no_rtti_test -test_gmock_no_rtti_test_SOURCES = test/gmock-spec-builders_test.cc \ - src/gmock-all.cc -test_gmock_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0 -test_gmock_no_rtti_test_LDADD = $(GTEST_LIBS) - -# A sanity test for verifying that Google Mock works with Google -# Test's TR1 tuple implementation. We pick -# gmock-spec-builders_test.cc as it exercises all components of Google -# Mock. -TESTS += test/gmock_use_own_tuple_test -check_PROGRAMS += test/gmock_use_own_tuple_test -test_gmock_use_own_tuple_test_SOURCES = test/gmock-spec-builders_test.cc \ - src/gmock-all.cc -test_gmock_use_own_tuple_test_CXXFLAGS = \ - $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 -test_gmock_use_own_tuple_test_LDADD = $(GTEST_LIBS) - -# The following tests depend on the presence of a Python installation and are -# keyed off of it. We only add them to the TESTS variable when a Python -# interpreter is available. TODO(chandlerc@google.com): While we currently only -# attempt to build and execute these tests if Autoconf has found Python v2.3 on -# the system, we don't use the PYTHON variable it specified as the valid -# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and -# thus we cannot distinguish between C++ unit tests and Python unit tests. -dist_check_SCRIPTS = - -# Python modules used by multiple Python tests below. -dist_check_SCRIPTS += test/gmock_test_utils.py - -check_PROGRAMS += test/gmock_leak_test_ -test_gmock_leak_test__SOURCES = test/gmock_leak_test_.cc -test_gmock_leak_test__LDADD = $(GTEST_LIBS) lib/libgmock_main.la -dist_check_SCRIPTS += test/gmock_leak_test.py - -check_PROGRAMS += test/gmock_output_test_ -test_gmock_output_test__SOURCES = test/gmock_output_test_.cc -test_gmock_output_test__LDADD = $(GTEST_LIBS) lib/libgmock_main.la -dist_check_SCRIPTS += test/gmock_output_test.py -EXTRA_DIST += test/gmock_output_test_golden.txt - -# Enable all the python driven tests when we can run them. -if HAVE_PYTHON -TESTS += \ - test/gmock_leak_test.py \ - test/gmock_output_test.py -endif - -# Nonstandard package files for distribution. -EXTRA_DIST += \ - CHANGES \ - CONTRIBUTORS \ - make/Makefile \ - src/gmock-all.cc - -# Pump scripts for generating Google Mock headers. -# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump. -EXTRA_DIST += include/gmock/gmock-generated-actions.h.pump \ - include/gmock/gmock-generated-function-mockers.h.pump \ - include/gmock/gmock-generated-matchers.h.pump \ - include/gmock/gmock-generated-nice-strict.h.pump \ - include/gmock/internal/gmock-generated-internal-utils.h.pump - -# Script for fusing Google Mock and Google Test source files. -EXTRA_DIST += \ - scripts/fuse_gmock_files.py \ - scripts/test/Makefile - -# The Google Mock Generator tool from the cppclean project. -EXTRA_DIST += \ - scripts/generator/COPYING \ - scripts/generator/README \ - scripts/generator/README.cppclean \ - scripts/generator/cpp/__init__.py \ - scripts/generator/cpp/ast.py \ - scripts/generator/cpp/gmock_class.py \ - scripts/generator/cpp/keywords.py \ - scripts/generator/cpp/tokenize.py \ - scripts/generator/cpp/utils.py \ - scripts/generator/gmock_gen.py - -# Microsoft Visual Studio 2005 projects. -EXTRA_DIST += \ - msvc/gmock.sln \ - msvc/gmock.vcproj \ - msvc/gmock_config.vsprops \ - msvc/gmock_link_test.vcproj \ - msvc/gmock_main.vcproj \ - msvc/gmock_output_test_.vcproj \ - msvc/gmock-spec-builders_test.vcproj \ - msvc/gmock_test.vcproj diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/README b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/README deleted file mode 100644 index 9cbda5d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/README +++ /dev/null @@ -1,328 +0,0 @@ -Google C++ Mocking Framework -============================ -http://code.google.com/p/googlemock/ - -Overview --------- -Google's framework for writing and using C++ mock classes on Linux, -Mac OS X, and Windows. Inspired by jMock, EasyMock, and Hamcrest, and -designed with C++'s specifics in mind, it can help you derive better -designs of your system and write better tests. - -Google Mock: - -- provides a declarative syntax for defining mocks, -- can easily define partial (hybrid) mocks, which are a cross of real - and mock objects, -- handles functions of arbitrary types and overloaded functions, -- comes with a rich set of matchers for validating function arguments, -- uses an intuitive syntax for controlling the behavior of a mock, -- does automatic verification of expectations (no record-and-replay - needed), -- allows arbitrary (partial) ordering constraints on - function calls to be expressed, -- lets a user extend it by defining new matchers and actions. -- does not use exceptions, and -- is easy to learn and use. - -Please see the project page above for more information as well as mailing lists -for questions, discussions, and development. There is also an IRC channel on -OFTC (irc.oftc.net) #gtest available. Please join us! - -Please note that code under scripts/generator/ is from the cppclean -project (http://code.google.com/p/cppclean/) and under the Apache -License, which is different from Google Mock's license. - -Requirements ------------- -Google Mock is not a testing framework itself. Instead, it needs a -testing framework for writing tests. It works with Google Test -(http://code.google.com/p/googletest/) out of the box. You can use -either the copy of Google Test that comes with Google Mock, or a -compatible version you already have. This version of Google Mock -requires Google Test 1.4.0. - -You can also easily configure Google Mock to work with another testing -framework of your choice; although it will still need Google Test as -an internal dependency. Please read -http://code.google.com/p/googlemock/wiki/ForDummies#Using_Google_Mock_with_Any_Testing_Framework -for how to do it. - -Google Mock depends on advanced C++ features and thus requires a more -modern compiler. The following are needed to use Google Mock: - -### Linux Requirements ### -These are the base requirements to build and use Google Mock from a source -package (as described below): - * GNU-compatible Make or "gmake" - * POSIX-standard shell - * POSIX(-2) Regular Expressions (regex.h) - * gcc 3.4 or newer. - -Furthermore, if you are building Google Mock from a VCS Checkout (also -described below), there are further requirements: - * Automake version 1.9 or newer - * Autoconf version 2.59 or newer - * Libtool / Libtoolize - * Python version 2.3 or newer - -### Windows Requirements ### - * Microsoft Visual C++ 8.0 SP1 or newer - -### Mac OS X Requirements ### - * Mac OS X 10.4 Tiger or newer - * Developer Tools Installed - -Getting the Source ------------------- -There are two primary ways of getting Google Mock's source code: you can -download a source release in your preferred archive format, or directly check -out the source from a Version Control System (VCS, we use Google Code's -Subversion hosting). The VCS checkout requires a few extra steps and some extra -software packages on your system, but lets you track development, and make -patches to contribute much more easily, so we highly encourage it. - -### VCS Checkout: ### -The first step is to select whether you want to check out the main line of -development on Google Mock, or one of the released branches. The former will be -much more active and have the latest features, but the latter provides much -more stability and predictability. Choose whichever fits your needs best, and -proceed with the following Subversion commands: - - svn checkout http://googlemock.googlecode.com/svn/trunk/ gmock-svn - -or for a release version X.Y.*'s branch: - - svn checkout http://googlemock.googlecode.com/svn/branches/release-X.Y/ \ - gmock-X.Y-svn - -Next you will need to prepare the GNU Autotools build system, if you -are using Linux or Mac OS X. Enter the target directory of the -checkout command you used ('gmock-svn' or 'gmock-X.Y-svn' above) and -proceed with the following command: - - autoreconf -fvi - -Once you have completed this step, you are ready to build the library. Note -that you should only need to complete this step once. The subsequent `make' -invocations will automatically re-generate the bits of the build system that -need to be changed. - -If your system uses older versions of the autotools, the above command will -fail. You may need to explicitly specify a version to use. For instance, if you -have both GNU Automake 1.4 and 1.9 installed and `automake' would invoke the -1.4, use instead: - - AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi - -Make sure you're using the same version of automake and aclocal. - -### Source Package: ### -Google Mock is also released in source packages which can be downloaded from -its Google Code download page[1]. Several different archive formats are -provided, but the only difference is the tools needed to extract their -contents, and the size of the resulting file. Download whichever you are most -comfortable with. - - [1] Google Mock Downloads: http://code.google.com/p/googlemock/downloads/list - -Once downloaded expand the archive using whichever tools you prefer for that -type. This will always result in a new directory with the name "gmock-X.Y.Z" -which contains all of the source code. Here are some examples in Linux: - - tar -xvzf gmock-X.Y.Z.tar.gz - tar -xvjf gmock-X.Y.Z.tar.bz2 - unzip gmock-X.Y.Z.zip - -Choosing a TR1 Tuple Library ----------------------------- -Google Mock uses the C++ Technical Report 1 (TR1) tuple library -heavily. Unfortunately TR1 tuple is not yet widely available with all -compilers. The good news is that Google Test 1.4.0+ implements a -subset of TR1 tuple that's enough for Google Mock's need. Google Mock -will automatically use that implementation when the compiler doesn't -provide TR1 tuple. - -Usually you don't need to care about which tuple library Google Test -and Google Mock use. However, if your project already uses TR1 tuple, -you need to tell Google Test and Google Mock to use the same TR1 tuple -library the rest of your project uses (this requirement is new in -Google Test 1.4.0 and Google Mock 1.2.0, so you may need to take care -of it when upgrading from an earlier version), or the two tuple -implementations will clash. To do that, add - - -DGTEST_USE_OWN_TR1_TUPLE=0 - -to the compiler flags while compiling Google Test, Google Mock, and -your tests. - -If you want to use Boost's TR1 tuple library with Google Mock, please -refer to the Boost website (http://www.boost.org/) for how to obtain -it and set it up. - -Building the Source -------------------- -### Linux and Mac OS X (without Xcode) ### -There are two primary options for building the source at this point: build it -inside the source code tree, or in a separate directory. We recommend building -in a separate directory as that tends to produce both more consistent results -and be easier to clean up should anything go wrong, but both patterns are -supported. The only hard restriction is that while the build directory can be -a subdirectory of the source directory, the opposite is not possible and will -result in errors. Once you have selected where you wish to build Google Mock, -create the directory if necessary, and enter it. The following steps apply for -either approach by simply substituting the shell variable SRCDIR with "." for -building inside the source directory, and the relative path to the source -directory otherwise. - - ${SRCDIR}/configure # Standard GNU configure script, --help for more info - -The default behavior of the configure script with respect to locating and using -Google Test is to first search for a 'gtest-config' in the system path, and -lacking this, build an internal copy of Google Test. You may optionally specify -a custom Google Test you wish to build Google Mock against, provided it is -a new enough version. - - # Configure against an installation in '/opt' with '/opt/bin/gtest-config'. - ${SRCDIR}/configure --with-gtest=/opt - -This can also be used to specify a Google Test which hasn't yet been installed. -However, it must have been configured and built as described in the Google Test -README before you configure Google Mock. To enable this feature, simply pass -the directory where you configured and built Google Test (which is not -necessarily its source directory) to Google Mock's configure script. - - # Configure against a build of Google Test in an arbitrary directory. - ${SRCDIR}/configure --with-gtest=../../my_gtest_build - -Finally, if you have a version of Google Test installed but for some reason -wish to forcibly prevent it from being used, we provide a special option. -Typically this is not needed as we fall back to the internal Google Test -packaged with Google Mock if an installed version is either unavailable or too -old to build Google Mock. When using the internally packaged Google Test, the -user does *not* need to configure or build it, that is automatically handled by -Google Mock's build system. - - # Force the use of the internally packaged Google Test, despite - # 'gtest-config' being in your PATH. - ${SRCDIR}/configure --disable-external-gtest - -Once you have successfully configured Google Mock, the build steps are standard -for GNU-style OSS packages. - - make # Standard makefile following GNU conventions - make check # Builds and runs all tests - all should pass - -Other programs will only be able to use Google Mock's functionality if you -install it in a location which they can access, in Linux this is typically -under '/usr/local'. The following command will install all of the Google Mock -libraries, public headers, and utilities necessary for other programs and -libraries to leverage it. Note that if Google Mock was unable to find an -external Google Test to build against, it will also install the internally -packaged Google Test in order to allow the installed Google Mock to function -properly. This Google Test install will be fully functional, and if installed -will also be uninstalled by uninstalling Google Mock. - - sudo make install # Not necessary, but allows use by other programs - -Should you need to remove Google Mock from your system after having installed -it, run the following command, and it will back out its changes. However, note -carefully that you must run this command on the *same* Google Mock build that -you ran the install from, or the results are not predictable. If you install -Google Mock on your system, and are working from a VCS checkout, make sure you -run this *before* updating your checkout of the source in order to uninstall -the same version which you installed. - - sudo make uninstall # Must be run against the exact same build as "install" - -Your project can build against Google Mock and Google Test simply by leveraging -the 'gmock-config' script. This script can be invoked directly out of the -'scripts' subdirectory of the build tree, and it will be installed in the -binary directory specified during the 'configure'. Here are some examples of -its use, see 'gmock-config --help' for more detailed information. - - gmock-config --min-version=1.0 || echo "Insufficient Google Mock version." - - g++ $(gmock-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gmock-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Mock: - g++ $(../../my_gmock_build/scripts/gmock-config ...) ... - -Note that when building your project against Google Mock, you are building -against Google Test as well. There is no need to configure Google Test -separately. - -### Windows ### -The msvc/ directory contains VC++ 2005 projects for building Google -Mock and selected tests. - -If you want to use a version of Google Test other then the one bundled with -Google Mock, change the value of the GTestDir macro in gmock_config.vsprop -to point to the new location. - -Open msvc/gmock.sln and build the library and tests. If you want to -create your own project to use with Google Mock, you'll have to -configure it to use the gmock_config propety sheet. For that: - * Open the Property Manager window (View | Other Windows | Property Manager) - * Right-click on your project and select "Add Existing Property Sheet..." - * Navigate to gmock_config.vsprops and select it. - * In Project Properties | Configuration Properties | General | Additional - Include Directories, type /include. - -TODO(wan@google.com): update the .vsprops and .vcproj files such that the -last step is unnecessary. - -### Using GNU Make ### -The make/ directory contains a Makefile that you can use to build -Google Mock on systems where GNU make is available (e.g. Linux and Mac -OS X). It doesn't try to build Google Mock's own tests. Instead, it -just builds the Google Mock libraries and some sample tests. You can -use it as a starting point for your own Makefile. - -If the default settings are correct for your environment, the -following commands should succeed: - - cd ${SRCDIR}/make - make - ./gmock_test - -If you see errors, try to tweak the contents of make/Makefile to make -them go away. There are instructions in make/Makefile on how to do -it. - -### Using Your Own Build System ### -If none of the build solutions we provide works for you, or if you -prefer your own build system, you just need to compile -${GTEST_SRCDIR}/src/gtest-all.cc (where GTEST_SRCDIR is the root of -the Google Test source tree) and src/gmock-all.cc into a library and -link your tests with it. Assuming a Linux-like system and gcc, -something like the following will do: - - cd ${SRCDIR} - g++ -I. -I./include -I${GTEST_SRCDIR} -I${GTEST_SRCDIR}/include \ - -c {GTEST_SRCDIR}/src/gtest-all.cc - g++ -I. -I./include -I${GTEST_SRCDIR} -I${GTEST_SRCDIR}/include \ - -c src/gmock-all.cc - ar -rv libgmock.a gtest-all.o gmock-all.o - g++ -I. -I./include -I${GTEST_SRCDIR} -I${GTEST_SRCDIR}/include \ - path/to/your_test.cc libgmock.a -o your_test - -Regenerating Source Files -------------------------- -Some of Google Mock's source files are generated from templates (not -in the C++ sense) using a script. A template file is named FOO.pump, -where FOO is the name of the file it will generate. For example, the -file include/gmock/gmock-generated-actions.h.pump is used to generate -gmock-generated-actions.h in the same directory. - -Normally you don't need to worry about regenerating the source files, -unless you need to modify them (e.g. if you are working on a patch for -Google Mock). In that case, you should modify the corresponding .pump -files instead and run the 'pump' script (for Pump is Useful for Meta -Programming) to regenerate them. We are still working on releasing -the script and its documentation. If you need it now, please email -googlemock@googlegroups.com such that we know to make it happen -sooner. - -Happy testing! diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/build-aux/.keep b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/build-aux/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/configure.ac deleted file mode 100644 index 78ff30d8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/configure.ac +++ /dev/null @@ -1,125 +0,0 @@ -AC_INIT([Google C++ Mocking Framework], - [1.1.0], - [googlemock@googlegroups.com], - [gmock]) - -# Provide various options to initialize the Autoconf and configure processes. -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([./COPYING]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_HEADERS([build-aux/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config]) - -# Initialize Automake with various options. We require at least v1.9, prevent -# pedantic complaints about package files, and enable various distribution -# targets. -AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) - -# Check for programs used in building Google Test. -AC_PROG_CC -AC_PROG_CXX -AC_LANG([C++]) -AC_PROG_LIBTOOL - -# TODO(chandlerc@google.com): Currently we aren't running the Python tests -# against the interpreter detected by AM_PATH_PYTHON, and so we condition -# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's -# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" -# hashbang. -PYTHON= # We *do not* allow the user to specify a python interpreter -AC_PATH_PROG([PYTHON],[python],[:]) -AS_IF([test "$PYTHON" != ":"], - [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) -AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) - -# TODO(chandlerc@google.com) Check for the necessary system headers. - -# GoogleMock currently has hard dependencies upon GoogleTest above and beyond -# running its own test suite, so we both provide our own version in -# a subdirectory and provide some logic to use a custom version or a system -# installed version. -AC_ARG_WITH([gtest], - [AS_HELP_STRING([--with-gtest], - [Specifies how to find the gtest package. If no - arguments are given, the default behavior, a - system installed gtest will be used if present, - and an internal version built otherwise. If a - path is provided, the gtest built or installed at - that prefix will be used.])], - [], - [with_gtest=yes]) -AC_ARG_ENABLE([external-gtest], - [AS_HELP_STRING([--disable-external-gtest], - [Disables any detection or use of a system - installed or user provided gtest. Any option to - '--with-gtest' is ignored. (Default is enabled.)]) - ], [], [enable_external_gtest=yes]) -AS_IF([test "x$with_gtest" == "xno"], - [AC_MSG_ERROR([dnl -Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard -dependency upon GoogleTest to build, please provide a version, or allow -GoogleMock to use any installed version and fall back upon its internal -version.])]) - -# Setup various GTEST variables. TODO(chandlerc@google.com): When these are -# used below, they should be used such that any pre-existing values always -# trump values we set them to, so that they can be used to selectively override -# details of the detection process. -AC_ARG_VAR([GTEST_CONFIG], - [The exact path of Google Test's 'gtest-config' script.]) -AC_ARG_VAR([GTEST_CPPFLAGS], - [C-like preprocessor flags for Google Test.]) -AC_ARG_VAR([GTEST_CXXFLAGS], - [C++ compile flags for Google Test.]) -AC_ARG_VAR([GTEST_LDFLAGS], - [Linker path and option flags for Google Test.]) -AC_ARG_VAR([GTEST_LIBS], - [Library linking flags for Google Test.]) -AC_ARG_VAR([GTEST_VERSION], - [The version of Google Test available.]) -HAVE_BUILT_GTEST="no" - -GTEST_MIN_VERSION="1.3.0" - -AS_IF([test "x${enable_external_gtest}" = "xyes"], - [# Begin filling in variables as we are able. - AS_IF([test "x${with_gtest}" != "xyes"], - [AS_IF([test -x "${with_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${with_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${with_gtest}/bin/gtest-config"]) - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_MSG_ERROR([dnl -Unable to locate either a built or installed Google Test at '${with_gtest}'.]) - ])]) - - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])]) - AS_IF([test -x "${GTEST_CONFIG}"], - [AC_MSG_CHECKING([for Google Test version >= ${GTEST_MIN_VERSION}]) - AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}], - [AC_MSG_RESULT([yes]) - HAVE_BUILT_GTEST="yes"], - [AC_MSG_RESULT([no])])])]) - -AS_IF([test "x${HAVE_BUILT_GTEST}" = "xyes"], - [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` - GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` - GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` - GTEST_LIBS=`${GTEST_CONFIG} --libs` - GTEST_VERSION=`${GTEST_CONFIG} --version`], - [AC_CONFIG_SUBDIRS([gtest]) - # GTEST_CONFIG needs to be executable both in a Makefile environmont and - # in a shell script environment, so resolve an absolute path for it here. - GTEST_CONFIG="`pwd -P`/gtest/scripts/gtest-config" - GTEST_CPPFLAGS='-I$(top_srcdir)/gtest/include' - GTEST_CXXFLAGS='-g' - GTEST_LDFLAGS='' - GTEST_LIBS='$(top_builddir)/gtest/lib/libgtest.la' - GTEST_VERSION="${GTEST_MIN_VERSION}"]) - -# TODO(chandlerc@google.com) Check the types, structures, and other compiler -# and architecture characteristics. - -# Output the generated files. No further autoconf macros may be used. -AC_OUTPUT diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CHANGES b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CHANGES deleted file mode 100644 index 35655881..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CHANGES +++ /dev/null @@ -1,57 +0,0 @@ -Changes for 1.3.0: - - * New feature: death tests on Windows, Cygwin, and Mac. - * New feature: ability to use Google Test assertions in other testing - frameworks. - * New feature: ability to run disabled test via - --gtest_also_run_disabled_tests. - * New feature: the --help flag for printing the usage. - * New feature: access to Google Test flag values in user code. - * New feature: a script that packs Google Test into one .h and one - .cc file for easy deployment. - * New feature: support for distributing test functions to multiple - machines (requires support from the test runner). - * Bug fixes and implementation clean-up. - -Changes for 1.2.1: - - * Compatibility fixes for Linux IA-64 and IBM z/OS. - * Added support for using Boost and other TR1 implementations. - * Changes to the build scripts to support upcoming release of Google C++ - Mocking Framework. - * Added Makefile to the distribution package. - * Improved build instructions in README. - -Changes for 1.2.0: - - * New feature: value-parameterized tests. - * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS) - macros. - * Changed the XML report format to match JUnit/Ant's. - * Added tests to the Xcode project. - * Added scons/SConscript for building with SCons. - * Added src/gtest-all.cc for building Google Test from a single file. - * Fixed compatibility with Solaris and z/OS. - * Enabled running Python tests on systems with python 2.3 installed, - e.g. Mac OS X 10.4. - * Bug fixes. - -Changes for 1.1.0: - - * New feature: type-parameterized tests. - * New feature: exception assertions. - * New feature: printing elapsed time of tests. - * Improved the robustness of death tests. - * Added an Xcode project and samples. - * Adjusted the output format on Windows to be understandable by Visual Studio. - * Minor bug fixes. - -Changes for 1.0.1: - - * Added project files for Visual Studio 7.1. - * Fixed issues with compiling on Mac OS X. - * Fixed issues with compiling on Cygwin. - -Changes for 1.0.0: - - * Initial Open Source release of Google Test diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CONTRIBUTORS b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CONTRIBUTORS deleted file mode 100644 index ae912175..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/CONTRIBUTORS +++ /dev/null @@ -1,33 +0,0 @@ -# This file contains a list of people who've made non-trivial -# contribution to the Google C++ Testing Framework project. People -# who commit code to the project are encouraged to add their names -# here. Please keep the list sorted by first names. - -Ajay Joshi -Balázs Dán -Bharat Mediratta -Chandler Carruth -Chris Prince -Chris Taylor -Dan Egnor -Eric Roman -Jeffrey Yasskin -Jói Sigurðsson -Keir Mierle -Keith Ray -Kenton Varda -Markus Heule -Mika Raento -Patrick Hanna -Patrick Riley -Peter Kaminski -Preston Jackson -Rainer Klaffenboeck -Russ Cox -Russ Rufer -Sean Mcafee -Sigurður Ãsgeirsson -Tracy Bialik -Vadim Berman -Vlad Losev -Zhanyong Wan diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/COPYING deleted file mode 100644 index 1941a11f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/Makefile.am deleted file mode 100644 index eba27760..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/Makefile.am +++ /dev/null @@ -1,415 +0,0 @@ -# Automake file - -# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump. - -# Nonstandard package files for distribution -EXTRA_DIST = \ - CHANGES \ - CONTRIBUTORS \ - include/gtest/gtest-param-test.h.pump \ - include/gtest/internal/gtest-type-util.h.pump \ - include/gtest/internal/gtest-param-util-generated.h.pump \ - make/Makefile \ - scons/SConscript \ - scripts/fuse_gtest_files.py \ - scripts/gen_gtest_pred_impl.py \ - scripts/test/Makefile \ - test/gtest_all_test.cc - -# MSVC project files -EXTRA_DIST += \ - msvc/gtest.sln \ - msvc/gtest.vcproj \ - msvc/gtest_color_test_.vcproj \ - msvc/gtest_env_var_test_.vcproj \ - msvc/gtest_environment_test.vcproj \ - msvc/gtest_main.vcproj \ - msvc/gtest_output_test_.vcproj \ - msvc/gtest_prod_test.vcproj \ - msvc/gtest_uninitialized_test_.vcproj \ - msvc/gtest_unittest.vcproj - -# xcode project files -EXTRA_DIST += \ - xcode/Config/DebugProject.xcconfig \ - xcode/Config/FrameworkTarget.xcconfig \ - xcode/Config/General.xcconfig \ - xcode/Config/ReleaseProject.xcconfig \ - xcode/Config/TestTarget.xcconfig \ - xcode/Config/InternalTestTarget.xcconfig \ - xcode/Config/InternalPythonTestTarget.xcconfig \ - xcode/Resources/Info.plist \ - xcode/Scripts/versiongenerate.py \ - xcode/Scripts/runtests.sh \ - xcode/gtest.xcodeproj/project.pbxproj - -# xcode sample files -EXTRA_DIST += \ - xcode/Samples/FrameworkSample/Info.plist \ - xcode/Samples/FrameworkSample/widget_test.cc \ - xcode/Samples/FrameworkSample/widget.cc \ - xcode/Samples/FrameworkSample/widget.h \ - xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj - -# C++Builder project files -EXTRA_DIST += \ - codegear/gtest_all.cc \ - codegear/gtest_link.cc \ - codegear/gtest.cbproj \ - codegear/gtest_main.cbproj \ - codegear/gtest_unittest.cbproj \ - codegear/gtest.groupproj - -# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into -# the build system such that a user can specify the maximum predicate -# arity here and have the script automatically generate the -# corresponding .h and .cc files. - -# Scripts and utilities -bin_SCRIPTS = scripts/gtest-config -CLEANFILES = $(bin_SCRIPTS) - -# Distribute and install M4 macro -m4datadir = $(datadir)/aclocal -m4data_DATA = m4/gtest.m4 -EXTRA_DIST += $(m4data_DATA) - -# We define the global AM_CPPFLAGS as everything we compile includes from these -# directories. -AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include - -# Build rules for libraries. -lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la - -lib_libgtest_la_SOURCES = src/gtest.cc \ - src/gtest-death-test.cc \ - src/gtest-filepath.cc \ - src/gtest-internal-inl.h \ - src/gtest-port.cc \ - src/gtest-test-part.cc \ - src/gtest-typed-test.cc - -pkginclude_HEADERS = include/gtest/gtest.h \ - include/gtest/gtest-death-test.h \ - include/gtest/gtest-message.h \ - include/gtest/gtest-param-test.h \ - include/gtest/gtest_pred_impl.h \ - include/gtest/gtest_prod.h \ - include/gtest/gtest-spi.h \ - include/gtest/gtest-test-part.h \ - include/gtest/gtest-typed-test.h - -pkginclude_internaldir = $(pkgincludedir)/internal -pkginclude_internal_HEADERS = \ - include/gtest/internal/gtest-death-test-internal.h \ - include/gtest/internal/gtest-filepath.h \ - include/gtest/internal/gtest-internal.h \ - include/gtest/internal/gtest-linked_ptr.h \ - include/gtest/internal/gtest-param-util-generated.h \ - include/gtest/internal/gtest-param-util.h \ - include/gtest/internal/gtest-port.h \ - include/gtest/internal/gtest-string.h \ - include/gtest/internal/gtest-type-util.h - -lib_libgtest_main_la_SOURCES = src/gtest_main.cc -lib_libgtest_main_la_LIBADD = lib/libgtest.la - -# Bulid rules for samples and tests. Automake's naming for some of -# these variables isn't terribly obvious, so this is a brief -# reference: -# -# TESTS -- Programs run automatically by "make check" -# check_PROGRAMS -- Programs built by "make check" but not necessarily run - -noinst_LTLIBRARIES = samples/libsamples.la - -samples_libsamples_la_SOURCES = samples/sample1.cc \ - samples/sample1.h \ - samples/sample2.cc \ - samples/sample2.h \ - samples/sample3-inl.h \ - samples/sample4.cc \ - samples/sample4.h - -TESTS= -TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \ - GTEST_BUILD_DIR="$(top_builddir)/test" -check_PROGRAMS= - -TESTS += samples/sample1_unittest -check_PROGRAMS += samples/sample1_unittest -samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc -samples_sample1_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample2_unittest -check_PROGRAMS += samples/sample2_unittest -samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc -samples_sample2_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample3_unittest -check_PROGRAMS += samples/sample3_unittest -samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc -samples_sample3_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample4_unittest -check_PROGRAMS += samples/sample4_unittest -samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc -samples_sample4_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample5_unittest -check_PROGRAMS += samples/sample5_unittest -samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc -samples_sample5_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample6_unittest -check_PROGRAMS += samples/sample6_unittest -samples_sample6_unittest_SOURCES = samples/prime_tables.h \ - samples/sample6_unittest.cc -samples_sample6_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample7_unittest -check_PROGRAMS += samples/sample7_unittest -samples_sample7_unittest_SOURCES = samples/prime_tables.h \ - samples/sample7_unittest.cc -samples_sample7_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample8_unittest -check_PROGRAMS += samples/sample8_unittest -samples_sample8_unittest_SOURCES = samples/prime_tables.h \ - samples/sample8_unittest.cc -samples_sample8_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += test/gtest-death-test_test -check_PROGRAMS += test/gtest-death-test_test -test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc -test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) -test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \ - lib/libgtest_main.la - -TESTS += test/gtest_environment_test -check_PROGRAMS += test/gtest_environment_test -test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc -test_gtest_environment_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-filepath_test -check_PROGRAMS += test/gtest-filepath_test -test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc -test_gtest_filepath_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-linked_ptr_test -check_PROGRAMS += test/gtest-linked_ptr_test -test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc -test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_main_unittest -check_PROGRAMS += test/gtest_main_unittest -test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc -test_gtest_main_unittest_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-message_test -check_PROGRAMS += test/gtest-message_test -test_gtest_message_test_SOURCES = test/gtest-message_test.cc -test_gtest_message_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_no_test_unittest -check_PROGRAMS += test/gtest_no_test_unittest -test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc -test_gtest_no_test_unittest_LDADD = lib/libgtest.la - -TESTS += test/gtest-options_test -check_PROGRAMS += test/gtest-options_test -test_gtest_options_test_SOURCES = test/gtest-options_test.cc -test_gtest_options_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-param-test_test -check_PROGRAMS += test/gtest-param-test_test -test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \ - test/gtest-param-test2_test.cc \ - test/gtest-param-test_test.h -test_gtest_param_test_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-port_test -check_PROGRAMS += test/gtest-port_test -test_gtest_port_test_SOURCES = test/gtest-port_test.cc -test_gtest_port_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_pred_impl_unittest -check_PROGRAMS += test/gtest_pred_impl_unittest -test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc -test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_prod_test -check_PROGRAMS += test/gtest_prod_test -test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \ - test/production.cc \ - test/production.h -test_gtest_prod_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_repeat_test -check_PROGRAMS += test/gtest_repeat_test -test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc -test_gtest_repeat_test_LDADD = lib/libgtest.la - -TESTS += test/gtest_sole_header_test -check_PROGRAMS += test/gtest_sole_header_test -test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc -test_gtest_sole_header_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_stress_test -check_PROGRAMS += test/gtest_stress_test -test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc -test_gtest_stress_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-test-part_test -check_PROGRAMS += test/gtest-test-part_test -test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc -test_gtest_test_part_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_throw_on_failure_ex_test -check_PROGRAMS += test/gtest_throw_on_failure_ex_test -test_gtest_throw_on_failure_ex_test_SOURCES = \ - test/gtest_throw_on_failure_ex_test.cc \ - src/gtest-all.cc -test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions - -TESTS += test/gtest-typed-test_test -check_PROGRAMS += test/gtest-typed-test_test -test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \ - test/gtest-typed-test2_test.cc \ - test/gtest-typed-test_test.h -test_gtest_typed_test_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_unittest -check_PROGRAMS += test/gtest_unittest -test_gtest_unittest_SOURCES = test/gtest_unittest.cc -test_gtest_unittest_LDADD = lib/libgtest_main.la - -# Verifies that Google Test works when RTTI is disabled. -TESTS += test/gtest_no_rtti_test -check_PROGRAMS += test/gtest_no_rtti_test -test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \ - src/gtest-all.cc \ - src/gtest_main.cc -test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0 - -# Verifies that Google Test's own TR1 tuple implementation works. -TESTS += test/gtest-tuple_test -check_PROGRAMS += test/gtest-tuple_test -test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \ - src/gtest-all.cc \ - src/gtest_main.cc -test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 - -# Verifies that Google Test's features that use its own TR1 tuple work. -TESTS += test/gtest_use_own_tuple_test -check_PROGRAMS += test/gtest_use_own_tuple_test -test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \ - test/gtest-param-test2_test.cc \ - src/gtest-all.cc -test_gtest_use_own_tuple_test_CXXFLAGS = \ - $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 - -# The following tests depend on the presence of a Python installation and are -# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt -# to build and execute these tests if Autoconf has found Python v2.4 on the -# system, we don't use the PYTHON variable it specified as the valid -# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and -# thus we cannot distinguish between C++ unit tests and Python unit tests. -if HAVE_PYTHON -check_SCRIPTS = - -# These two Python modules are used by multiple Python tests below. -check_SCRIPTS += test/gtest_test_utils.py \ - test/gtest_xml_test_utils.py - -check_PROGRAMS += test/gtest_break_on_failure_unittest_ -test_gtest_break_on_failure_unittest__SOURCES = \ - test/gtest_break_on_failure_unittest_.cc -test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_break_on_failure_unittest.py -TESTS += test/gtest_break_on_failure_unittest.py - -check_PROGRAMS += test/gtest_color_test_ -test_gtest_color_test__SOURCES = test/gtest_color_test_.cc -test_gtest_color_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_color_test.py -TESTS += test/gtest_color_test.py - -check_PROGRAMS += test/gtest_env_var_test_ -test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc -test_gtest_env_var_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_env_var_test.py -TESTS += test/gtest_env_var_test.py - -check_PROGRAMS += test/gtest_filter_unittest_ -test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc -test_gtest_filter_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_filter_unittest.py -TESTS += test/gtest_filter_unittest.py - -check_PROGRAMS += test/gtest_help_test_ -test_gtest_help_test__SOURCES = test/gtest_help_test_.cc -test_gtest_help_test__LDADD = lib/libgtest_main.la -check_SCRIPTS += test/gtest_help_test.py -TESTS += test/gtest_help_test.py - -check_PROGRAMS += test/gtest_list_tests_unittest_ -test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc -test_gtest_list_tests_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_list_tests_unittest.py -TESTS += test/gtest_list_tests_unittest.py - -check_PROGRAMS += test/gtest_output_test_ -test_gtest_output_test__SOURCES = test/gtest_output_test_.cc -test_gtest_output_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_output_test.py -EXTRA_DIST += test/gtest_output_test_golden_lin.txt \ - test/gtest_output_test_golden_win.txt -TESTS += test/gtest_output_test.py - -check_PROGRAMS += test/gtest_throw_on_failure_test_ -test_gtest_throw_on_failure_test__SOURCES = \ - test/gtest_throw_on_failure_test_.cc \ - src/gtest-all.cc -test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions -check_SCRIPTS += test/gtest_throw_on_failure_test.py -TESTS += test/gtest_throw_on_failure_test.py - -check_PROGRAMS += test/gtest_uninitialized_test_ -test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc -test_gtest_uninitialized_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_uninitialized_test.py -TESTS += test/gtest_uninitialized_test.py - -check_PROGRAMS += test/gtest_xml_outfile1_test_ -test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc -test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la -check_PROGRAMS += test/gtest_xml_outfile2_test_ -test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc -test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la -check_SCRIPTS += test/gtest_xml_outfiles_test.py -TESTS += test/gtest_xml_outfiles_test.py - -check_PROGRAMS += test/gtest_xml_output_unittest_ -test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc -test_gtest_xml_output_unittest__LDADD = lib/libgtest_main.la -check_SCRIPTS += test/gtest_xml_output_unittest.py -TESTS += test/gtest_xml_output_unittest.py - -# TODO(wan@google.com): make the build script compile and run the -# negative-compilation tests. (The test/gtest_nc* files are unfinished -# implementation of tests for verifying that certain kinds of misuse -# of Google Test don't compile.) -EXTRA_DIST += $(check_SCRIPTS) \ - test/gtest_nc.cc \ - test/gtest_nc_test.py - -endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/README b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/README deleted file mode 100644 index cb8d4de8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/README +++ /dev/null @@ -1,300 +0,0 @@ -Google C++ Testing Framework -============================ -http://code.google.com/p/googletest/ - -Overview --------- -Google's framework for writing C++ tests on a variety of platforms (Linux, Mac -OS X, Windows, Windows CE, Symbian, and etc). Based on the xUnit architecture. -Supports automatic test discovery, a rich set of assertions, user-defined -assertions, death tests, fatal and non-fatal failures, various options for -running the tests, and XML test report generation. - -Please see the project page above for more information as well as mailing lists -for questions, discussions, and development. There is also an IRC channel on -OFTC (irc.oftc.net) #gtest available. Please join us! - -Requirements ------------- -Google Test is designed to have fairly minimal requirements to build -and use with your projects, but there are some. Currently, we support -building Google Test on Linux, Windows, Mac OS X, and Cygwin. We will -also make our best effort to support other platforms (e.g. Solaris and -IBM z/OS). However, since core members of the Google Test project -have no access to them, Google Test may have outstanding issues on -these platforms. If you notice any problems on your platform, please -notify googletestframework@googlegroups.com (patches for fixing them -are even more welcome!). - -### Linux Requirements ### -These are the base requirements to build and use Google Test from a source -package (as described below): - * GNU-compatible Make or "gmake" - * POSIX-standard shell - * POSIX(-2) Regular Expressions (regex.h) - * A C++98 standards compliant compiler - -Furthermore, if you are building Google Test from a VCS Checkout (also -described below), there are further requirements: - * Automake version 1.9 or newer - * Autoconf version 2.59 or newer - * Libtool / Libtoolize - * Python version 2.4 or newer - -### Windows Requirements ### - * Microsoft Visual Studio 7.1 or newer - -### Cygwin Requirements ### - * Cygwin 1.5.25-14 or newer - -### Mac OS X Requirements ### - * Mac OS X 10.4 Tiger or newer - * Developer Tools Installed - * Optional: Xcode 2.5 or later for univeral-binary framework; see note below. - -Getting the Source ------------------- -There are two primary ways of getting Google Test's source code: you can -download a source release in your preferred archive format, or directly check -out the source from a Version Control System (VCS, we use Google Code's -Subversion hosting). The VCS checkout requires a few extra steps and some extra -software packages on your system, but lets you track development, and make -patches to contribute much more easily, so we highly encourage it. - -### VCS Checkout: ### -The first step is to select whether you want to check out the main line of -development on Google Test, or one of the released branches. The former will be -much more active and have the latest features, but the latter provides much -more stability and predictability. Choose whichever fits your needs best, and -proceed with the following Subversion commands: - - svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn - -or for a release version X.Y.*'s branch: - - svn checkout http://googletest.googlecode.com/svn/branches/release-X.Y/ \ - gtest-X.Y-svn - -Next you will need to prepare the GNU Autotools build system, if you -are using Linux, Mac OS X, or Cygwin. Enter the target directory of -the checkout command you used ('gtest-svn' or 'gtest-X.Y-svn' above) -and proceed with the following command: - - autoreconf -fvi - -Once you have completed this step, you are ready to build the library. Note -that you should only need to complete this step once. The subsequent `make' -invocations will automatically re-generate the bits of the build system that -need to be changed. - -If your system uses older versions of the autotools, the above command will -fail. You may need to explicitly specify a version to use. For instance, if you -have both GNU Automake 1.4 and 1.9 installed and `automake' would invoke the -1.4, use instead: - - AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi - -Make sure you're using the same version of automake and aclocal. - -### Source Package: ### -Google Test is also released in source packages which can be downloaded from -its Google Code download page[1]. Several different archive formats are -provided, but the only difference is the tools used to manipulate them, and the -size of the resulting file. Download whichever you are most comfortable with. - - [1] Google Test Downloads: http://code.google.com/p/googletest/downloads/list - -Once downloaded expand the archive using whichever tools you prefer for that -type. This will always result in a new directory with the name "gtest-X.Y.Z" -which contains all of the source code. Here are some examples in Linux: - - tar -xvzf gtest-X.Y.Z.tar.gz - tar -xvjf gtest-X.Y.Z.tar.bz2 - unzip gtest-X.Y.Z.zip - -Choosing a TR1 Tuple Library ----------------------------- -Some Google Test features require the C++ Technical Report 1 (TR1) -tuple library, which is not yet widely available with all compilers. -The good news is that Google Test implements a subset of TR1 tuple -that's enough for its own need, and will automatically use this when -the compiler doesn't provide TR1 tuple. - -Usually you don't need to care about which tuple library Google Test -uses. However, if your project already uses TR1 tuple, you need to -tell Google Test to use the same TR1 tuple library the rest of your -project uses (this requirement is new in Google Test 1.4.0, so you may -need to take care of it when upgrading from an earlier version), or -the two tuple implementations will clash. To do that, add - - -DGTEST_USE_OWN_TR1_TUPLE=0 - -to the compiler flags while compiling Google Test and your tests. - -If you don't want Google Test to use tuple at all, add - - -DGTEST_HAS_TR1_TUPLE=0 - -to the compiler flags. All features using tuple will be disabled in -this mode. - -Building the Source -------------------- -### Linux, Mac OS X (without Xcode), and Cygwin ### -There are two primary options for building the source at this point: build it -inside the source code tree, or in a separate directory. We recommend building -in a separate directory as that tends to produce both more consistent results -and be easier to clean up should anything go wrong, but both patterns are -supported. The only hard restriction is that while the build directory can be -a subdirectory of the source directory, the opposite is not possible and will -result in errors. Once you have selected where you wish to build Google Test, -create the directory if necessary, and enter it. The following steps apply for -either approach by simply substituting the shell variable SRCDIR with "." for -building inside the source directory, and the relative path to the source -directory otherwise. - - ${SRCDIR}/configure # Standard GNU configure script, --help for more info - make # Standard makefile following GNU conventions - make check # Builds and runs all tests - all should pass - -Other programs will only be able to use Google Test's functionality if you -install it in a location which they can access, in Linux this is typically -under '/usr/local'. The following command will install all of the Google Test -libraries, public headers, and utilities necessary for other programs and -libraries to leverage it: - - sudo make install # Not necessary, but allows use by other programs - -Should you need to remove Google Test from your system after having installed -it, run the following command, and it will back out its changes. However, note -carefully that you must run this command on the *same* Google Test build that -you ran the install from, or the results are not predictable. If you install -Google Test on your system, and are working from a VCS checkout, make sure you -run this *before* updating your checkout of the source in order to uninstall -the same version which you installed. - - sudo make uninstall # Must be run against the exact same build as "install" - -Your project can build against Google Test simply by leveraging the -'gtest-config' script. This script can be invoked directly out of the 'scripts' -subdirectory of the build tree, and it will be installed in the binary -directory specified during the 'configure'. Here are some examples of its use, -see 'gtest-config --help' for more detailed information. - - gtest-config --min-version=1.0 || echo "Insufficient Google Test version." - - g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gtest-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Test: - g++ $(../../my_gtest_build/scripts/gtest-config ...) ... - -### Windows ### -Open the gtest.sln file in the msvc/ folder using Visual Studio, and -you are ready to build Google Test the same way you build any Visual -Studio project. - -### Mac OS X (universal-binary framework) ### -Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest" -target. The universal binary framework will end up in your selected build -directory (selected in the Xcode "Preferences..." -> "Building" pane and -defaults to xcode/build). Alternatively, at the command line, enter: - - xcodebuild - -This will build the "Release" configuration of the gtest.framework, but you can -select the "Debug" configuration with a command line option. See the -"xcodebuild" man page for more information. - -To test the gtest.framework in Xcode, change the active target to "Check" and -then build. This target builds all of the tests and then runs them. Don't worry -if you see some errors. Xcode reports all test failures (even the intentional -ones) as errors. However, you should see a "Build succeeded" message at the end -of the build log. To run all of the tests from the command line, enter: - - xcodebuid -target Check - -It is also possible to build and execute individual tests within Xcode. Each -test has its own Xcode "Target" and Xcode "Executable". To build any of the -tests, change the active target and the active executable to the test of -interest and then build and run. - -NOTE: Several tests use a Python script to run the test executable. These can be -run from Xcode by creating a "Custom Executable". For example, to run the Python -script which executes the gtest_color_test, select the Project->New Custom -Executable... menu item. When prompted, set the "Executable Name" to something -like "run_gtest_color_test" and set the "Executable Path" to the path of the -gtest_color_test.py script. Finally, choose "Run" from the Run menu and check -the Console for the results. - -Individual tests can be built from the command line using: - - xcodebuild -target - -These tests can be executed from the command line by moving to the build -directory and then (in bash) - - export DYLD_FRAMEWORK_PATH=`pwd` - ./ # (if it is not a python test, e.g. ./gtest_unittest) - # OR - ./.py # (if it is a python test, e.g. ./gtest_color_test.py) - -To use the gtest.framework for your own tests, first, add the framework to Xcode -project. Next, create a new executable target and add the framework to the -"Link Binary With Libraries" build phase. Select "Edit Active Executable" from -the "Project" menu. In the "Arguments" tab, add - - "DYLD_FRAMEWORK_PATH" : "/real/framework/path" - -in the "Variables to be set in the environment:" list, where you replace -"/real/framework/path" with the actual location of the gtest.framework. Now -when you run your executable, it will load the framework and your test will -run as expected. - -### Using GNU Make ### -The make/ directory contains a Makefile that you can use to build -Google Test on systems where GNU make is available (e.g. Linux, Mac OS -X, and Cygwin). It doesn't try to build Google Test's own tests. -Instead, it just builds the Google Test library and a sample test. -You can use it as a starting point for your own Makefile. - -If the default settings are correct for your environment, the -following commands should succeed: - - cd ${SRCDIR}/make - make - ./sample1_unittest - -If you see errors, try to tweak the contents of make/Makefile to make -them go away. There are instructions in make/Makefile on how to do -it. - -### Using Your Own Build System ### -If none of the build solutions we provide works for you, or if you -prefer your own build system, you just need to compile -src/gtest-all.cc into a library and link your tests with it. Assuming -a Linux-like system and gcc, something like the following will do: - - cd ${SRCDIR} - g++ -I. -I./include -c src/gtest-all.cc - ar -rv libgtest.a gtest-all.o - g++ -I. -I./include path/to/your_test.cc libgtest.a -o your_test - -Regenerating Source Files -------------------------- -Some of Google Test's source files are generated from templates (not -in the C++ sense) using a script. A template file is named FOO.pump, -where FOO is the name of the file it will generate. For example, the -file include/gtest/internal/gtest-type-util.h.pump is used to generate -gtest-type-util.h in the same directory. - -Normally you don't need to worry about regenerating the source files, -unless you need to modify them (e.g. if you are working on a patch for -Google Test). In that case, you should modify the corresponding .pump -files instead and run the 'pump' script (for Pump is Useful for Meta -Programming) to regenerate them. We are still working on releasing -the script and its documentation. If you need it now, please email -googletestframework@googlegroups.com such that we know to make it -happen sooner. - -Happy testing! diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/build-aux/.keep b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/build-aux/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.cbproj deleted file mode 100644 index 95c3054b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.cbproj +++ /dev/null @@ -1,138 +0,0 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 3 - - - 4 - - - 5 - - - 6 - - - 7 - - - 8 - - - 0 - - - 1 - - - 2 - - - 9 - - - 10 - - - 11 - - - 12 - - - 14 - - - 13 - - - 15 - - - 16 - - - 17 - - - 18 - - - Cfg_1 - - - Cfg_2 - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.groupproj b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.groupproj deleted file mode 100644 index 8b650f85..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest.groupproj +++ /dev/null @@ -1,54 +0,0 @@ - - - {c1d923e0-6cba-4332-9b6f-3420acbf5091} - - - - - - - - - Default.Personality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_all.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_all.cc deleted file mode 100644 index 121b2d80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_all.cc +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// C++Builder's IDE cannot build a static library from files with hyphens -// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . -// This file serves as a workaround. - -#include "src/gtest-all.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_link.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_link.cc deleted file mode 100644 index 918eccd1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_link.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// Links gtest.lib and gtest_main.lib into the current project in C++Builder. -// This means that these libraries can't be renamed, but it's the only way to -// ensure that Debug versus Release test builds are linked against the -// appropriate Debug or Release build of the libraries. - -#pragma link "gtest.lib" -#pragma link "gtest_main.lib" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_main.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_main.cbproj deleted file mode 100644 index d76ce139..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_main.cbproj +++ /dev/null @@ -1,82 +0,0 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 0 - - - Cfg_1 - - - Cfg_2 - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_unittest.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_unittest.cbproj deleted file mode 100644 index d3823c90..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/codegear/gtest_unittest.cbproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - {eea63393-5ac5-4b9c-8909-d75fef2daa41} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - exe - JPHNE - NO_STRICT - true - true - ..\test - true - CppConsoleApplication - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;.. - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test - true - - - false - false - _DEBUG;$(Defines) - true - true - false - true - None - DEBUG - true - Debug - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - true - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppConsoleApplication - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test2NO_STRICTSTRICT - - - - - 0 - - - 1 - - - Cfg_1 - - - Cfg_2 - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/configure.ac deleted file mode 100644 index 92670bf5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/configure.ac +++ /dev/null @@ -1,51 +0,0 @@ -m4_include(m4/acx_pthread.m4) - -# At this point, the Xcode project assumes the version string will be three -# integers separated by periods and surrounded by square brackets (e.g. -# "[1.0.1]"). It also asumes that there won't be any closing parenthesis -# between "AC_INIT(" and the closing ")" including comments and strings. -AC_INIT([Google C++ Testing Framework], - [1.3.0], - [googletestframework@googlegroups.com], - [gtest]) - -# Provide various options to initialize the Autoconf and configure processes. -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([./COPYING]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_HEADERS([build-aux/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config]) - -# Initialize Automake with various options. We require at least v1.9, prevent -# pedantic complaints about package files, and enable various distribution -# targets. -AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) - -# Check for programs used in building Google Test. -AC_PROG_CC -AC_PROG_CXX -AC_LANG([C++]) -AC_PROG_LIBTOOL - -# TODO(chandlerc@google.com): Currently we aren't running the Python tests -# against the interpreter detected by AM_PATH_PYTHON, and so we condition -# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's -# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" -# hashbang. -PYTHON= # We *do not* allow the user to specify a python interpreter -AC_PATH_PROG([PYTHON],[python],[:]) -AS_IF([test "$PYTHON" != ":"], - [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) -AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) - -# Check for pthreads. -ACX_PTHREAD - -# TODO(chandlerc@google.com) Check for the necessary system headers. - -# TODO(chandlerc@google.com) Check the types, structures, and other compiler -# and architecture characteristics. - -# Output the generated files. No further autoconf macros may be used. -AC_OUTPUT diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-death-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-death-test.h deleted file mode 100644 index dcb2b66e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-death-test.h +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for death tests. It is -// #included by gtest.h so a user doesn't need to include this -// directly. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ - -#include - -namespace testing { - -// This flag controls the style of death tests. Valid values are "threadsafe", -// meaning that the death test child process will re-execute the test binary -// from the start, running only a single death test, or "fast", -// meaning that the child process will execute the test logic immediately -// after forking. -GTEST_DECLARE_string_(death_test_style); - -#if GTEST_HAS_DEATH_TEST - -// The following macros are useful for writing death tests. - -// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is -// executed: -// -// 1. It generates a warning if there is more than one active -// thread. This is because it's safe to fork() or clone() only -// when there is a single thread. -// -// 2. The parent process clone()s a sub-process and runs the death -// test in it; the sub-process exits with code 0 at the end of the -// death test, if it hasn't exited already. -// -// 3. The parent process waits for the sub-process to terminate. -// -// 4. The parent process checks the exit code and error message of -// the sub-process. -// -// Examples: -// -// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number"); -// for (int i = 0; i < 5; i++) { -// EXPECT_DEATH(server.ProcessRequest(i), -// "Invalid request .* in ProcessRequest()") -// << "Failed to die on request " << i); -// } -// -// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting"); -// -// bool KilledBySIGHUP(int exit_code) { -// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP; -// } -// -// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!"); -// -// On the regular expressions used in death tests: -// -// On POSIX-compliant systems (*nix), we use the library, -// which uses the POSIX extended regex syntax. -// -// On other platforms (e.g. Windows), we only support a simple regex -// syntax implemented as part of Google Test. This limited -// implementation should be enough most of the time when writing -// death tests; though it lacks many features you can find in PCRE -// or POSIX extended regex syntax. For example, we don't support -// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and -// repetition count ("x{5,7}"), among others. -// -// Below is the syntax that we do support. We chose it to be a -// subset of both PCRE and POSIX extended regex, so it's easy to -// learn wherever you come from. In the following: 'A' denotes a -// literal character, period (.), or a single \\ escape sequence; -// 'x' and 'y' denote regular expressions; 'm' and 'n' are for -// natural numbers. -// -// c matches any literal character c -// \\d matches any decimal digit -// \\D matches any character that's not a decimal digit -// \\f matches \f -// \\n matches \n -// \\r matches \r -// \\s matches any ASCII whitespace, including \n -// \\S matches any character that's not a whitespace -// \\t matches \t -// \\v matches \v -// \\w matches any letter, _, or decimal digit -// \\W matches any character that \\w doesn't match -// \\c matches any literal character c, which must be a punctuation -// . matches any single character except \n -// A? matches 0 or 1 occurrences of A -// A* matches 0 or many occurrences of A -// A+ matches 1 or many occurrences of A -// ^ matches the beginning of a string (not that of each line) -// $ matches the end of a string (not that of each line) -// xy matches x followed by y -// -// If you accidentally use PCRE or POSIX extended regex features -// not implemented by us, you will get a run-time failure. In that -// case, please try to rewrite your regular expression within the -// above syntax. -// -// This implementation is *not* meant to be as highly tuned or robust -// as a compiled regex library, but should perform well enough for a -// death test, which already incurs significant overhead by launching -// a child process. -// -// Known caveats: -// -// A "threadsafe" style death test obtains the path to the test -// program from argv[0] and re-executes it in the sub-process. For -// simplicity, the current implementation doesn't search the PATH -// when launching the sub-process. This means that the user must -// invoke the test program via a path that contains at least one -// path separator (e.g. path/to/foo_test and -// /absolute/path/to/bar_test are fine, but foo_test is not). This -// is rarely a problem as people usually don't put the test binary -// directory in PATH. -// -// TODO(wan@google.com): make thread-safe death tests search the PATH. - -// Asserts that a given statement causes the program to exit, with an -// integer exit status that satisfies predicate, and emitting error output -// that matches regex. -#define ASSERT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) - -// Like ASSERT_EXIT, but continues on to successive tests in the -// test case, if any: -#define EXPECT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) - -// Asserts that a given statement causes the program to exit, either by -// explicitly exiting with a nonzero exit code or being killed by a -// signal, and emitting error output that matches regex. -#define ASSERT_DEATH(statement, regex) \ - ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Like ASSERT_DEATH, but continues on to successive tests in the -// test case, if any: -#define EXPECT_DEATH(statement, regex) \ - EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*: - -// Tests that an exit code describes a normal exit with a given exit code. -class ExitedWithCode { - public: - explicit ExitedWithCode(int exit_code); - bool operator()(int exit_status) const; - private: - const int exit_code_; -}; - -#if !GTEST_OS_WINDOWS -// Tests that an exit code describes an exit due to termination by a -// given signal. -class KilledBySignal { - public: - explicit KilledBySignal(int signum); - bool operator()(int exit_status) const; - private: - const int signum_; -}; -#endif // !GTEST_OS_WINDOWS - -// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode. -// The death testing framework causes this to have interesting semantics, -// since the sideeffects of the call are only visible in opt mode, and not -// in debug mode. -// -// In practice, this can be used to test functions that utilize the -// LOG(DFATAL) macro using the following style: -// -// int DieInDebugOr12(int* sideeffect) { -// if (sideeffect) { -// *sideeffect = 12; -// } -// LOG(DFATAL) << "death"; -// return 12; -// } -// -// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) { -// int sideeffect = 0; -// // Only asserts in dbg. -// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death"); -// -// #ifdef NDEBUG -// // opt-mode has sideeffect visible. -// EXPECT_EQ(12, sideeffect); -// #else -// // dbg-mode no visible sideeffect. -// EXPECT_EQ(0, sideeffect); -// #endif -// } -// -// This will assert that DieInDebugReturn12InOpt() crashes in debug -// mode, usually due to a DCHECK or LOG(DFATAL), but returns the -// appropriate fallback value (12 in this case) in opt mode. If you -// need to test that a function has appropriate side-effects in opt -// mode, include assertions against the side-effects. A general -// pattern for this is: -// -// EXPECT_DEBUG_DEATH({ -// // Side-effects here will have an effect after this statement in -// // opt mode, but none in debug mode. -// EXPECT_EQ(12, DieInDebugOr12(&sideeffect)); -// }, "death"); -// -#ifdef NDEBUG - -#define EXPECT_DEBUG_DEATH(statement, regex) \ - do { statement; } while (false) - -#define ASSERT_DEBUG_DEATH(statement, regex) \ - do { statement; } while (false) - -#else - -#define EXPECT_DEBUG_DEATH(statement, regex) \ - EXPECT_DEATH(statement, regex) - -#define ASSERT_DEBUG_DEATH(statement, regex) \ - ASSERT_DEATH(statement, regex) - -#endif // NDEBUG for EXPECT_DEBUG_DEATH -#endif // GTEST_HAS_DEATH_TEST -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-message.h deleted file mode 100644 index 99ae4546..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-message.h +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the Message class. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! - -#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ -#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ - -#include -#include - -namespace testing { - -// The Message class works like an ostream repeater. -// -// Typical usage: -// -// 1. You stream a bunch of values to a Message object. -// It will remember the text in a StrStream. -// 2. Then you stream the Message object to an ostream. -// This causes the text in the Message to be streamed -// to the ostream. -// -// For example; -// -// testing::Message foo; -// foo << 1 << " != " << 2; -// std::cout << foo; -// -// will print "1 != 2". -// -// Message is not intended to be inherited from. In particular, its -// destructor is not virtual. -// -// Note that StrStream behaves differently in gcc and in MSVC. You -// can stream a NULL char pointer to it in the former, but not in the -// latter (it causes an access violation if you do). The Message -// class hides this difference by treating a NULL char pointer as -// "(null)". -class Message { - private: - // The type of basic IO manipulators (endl, ends, and flush) for - // narrow streams. - typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&); - - public: - // Constructs an empty Message. - // We allocate the StrStream separately because it otherwise each use of - // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's - // stack frame leading to huge stack frames in some cases; gcc does not reuse - // the stack space. - Message() : ss_(new internal::StrStream) {} - - // Copy constructor. - Message(const Message& msg) : ss_(new internal::StrStream) { // NOLINT - *ss_ << msg.GetString(); - } - - // Constructs a Message from a C-string. - explicit Message(const char* str) : ss_(new internal::StrStream) { - *ss_ << str; - } - - ~Message() { delete ss_; } -#if GTEST_OS_SYMBIAN - // Streams a value (either a pointer or not) to this object. - template - inline Message& operator <<(const T& value) { - StreamHelper(typename internal::is_pointer::type(), value); - return *this; - } -#else - // Streams a non-pointer value to this object. - template - inline Message& operator <<(const T& val) { - ::GTestStreamToHelper(ss_, val); - return *this; - } - - // Streams a pointer value to this object. - // - // This function is an overload of the previous one. When you - // stream a pointer to a Message, this definition will be used as it - // is more specialized. (The C++ Standard, section - // [temp.func.order].) If you stream a non-pointer, then the - // previous definition will be used. - // - // The reason for this overload is that streaming a NULL pointer to - // ostream is undefined behavior. Depending on the compiler, you - // may get "0", "(nil)", "(null)", or an access violation. To - // ensure consistent result across compilers, we always treat NULL - // as "(null)". - template - inline Message& operator <<(T* const& pointer) { // NOLINT - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - ::GTestStreamToHelper(ss_, pointer); - } - return *this; - } -#endif // GTEST_OS_SYMBIAN - - // Since the basic IO manipulators are overloaded for both narrow - // and wide streams, we have to provide this specialized definition - // of operator <<, even though its body is the same as the - // templatized version above. Without this definition, streaming - // endl or other basic IO manipulators to Message will confuse the - // compiler. - Message& operator <<(BasicNarrowIoManip val) { - *ss_ << val; - return *this; - } - - // Instead of 1/0, we want to see true/false for bool values. - Message& operator <<(bool b) { - return *this << (b ? "true" : "false"); - } - - // These two overloads allow streaming a wide C string to a Message - // using the UTF-8 encoding. - Message& operator <<(const wchar_t* wide_c_str) { - return *this << internal::String::ShowWideCString(wide_c_str); - } - Message& operator <<(wchar_t* wide_c_str) { - return *this << internal::String::ShowWideCString(wide_c_str); - } - -#if GTEST_HAS_STD_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::std::wstring& wstr); -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::wstring& wstr); -#endif // GTEST_HAS_GLOBAL_WSTRING - - // Gets the text streamed to this object so far as a String. - // Each '\0' character in the buffer is replaced with "\\0". - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - internal::String GetString() const { - return internal::StrStreamToString(ss_); - } - - private: -#if GTEST_OS_SYMBIAN - // These are needed as the Nokia Symbian Compiler cannot decide between - // const T& and const T* in a function template. The Nokia compiler _can_ - // decide between class template specializations for T and T*, so a - // tr1::type_traits-like is_pointer works, and we can overload on that. - template - inline void StreamHelper(internal::true_type dummy, T* pointer) { - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - ::GTestStreamToHelper(ss_, pointer); - } - } - template - inline void StreamHelper(internal::false_type dummy, const T& value) { - ::GTestStreamToHelper(ss_, value); - } -#endif // GTEST_OS_SYMBIAN - - // We'll hold the text streamed to this object here. - internal::StrStream* const ss_; - - // We declare (but don't implement) this to prevent the compiler - // from implementing the assignment operator. - void operator=(const Message&); -}; - -// Streams a Message to an ostream. -inline std::ostream& operator <<(std::ostream& os, const Message& sb) { - return os << sb.GetString(); -} - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h deleted file mode 100644 index 421517d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h +++ /dev/null @@ -1,1385 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// Macros and functions for implementing parameterized tests -// in Google C++ Testing Framework (Google Test) -// -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ - - -// Value-parameterized tests allow you to test your code with different -// parameters without writing multiple copies of the same test. -// -// Here is how you use value-parameterized tests: - -#if 0 - -// To write value-parameterized tests, first you should define a fixture -// class. It must be derived from testing::TestWithParam, where T is -// the type of your parameter values. TestWithParam is itself derived -// from testing::Test. T can be any copyable type. If it's a raw pointer, -// you are responsible for managing the lifespan of the pointed values. - -class FooTest : public ::testing::TestWithParam { - // You can implement all the usual class fixture members here. -}; - -// Then, use the TEST_P macro to define as many parameterized tests -// for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. - -TEST_P(FooTest, DoesBlah) { - // Inside a test, access the test parameter with the GetParam() method - // of the TestWithParam class: - EXPECT_TRUE(foo.Blah(GetParam())); - ... -} - -TEST_P(FooTest, HasBlahBlah) { - ... -} - -// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test -// case with any set of parameters you want. Google Test defines a number -// of functions for generating test parameters. They return what we call -// (surprise!) parameter generators. Here is a summary of them, which -// are all in the testing namespace: -// -// -// Range(begin, end [, step]) - Yields values {begin, begin+step, -// begin+step+step, ...}. The values do not -// include end. step defaults to 1. -// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. -// ValuesIn(container) - Yields values from a C-style array, an STL -// ValuesIn(begin,end) container, or an iterator range [begin, end). -// Bool() - Yields sequence {false, true}. -// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product -// for the math savvy) of the values generated -// by the N generators. -// -// For more details, see comments at the definitions of these functions below -// in this file. -// -// The following statement will instantiate tests from the FooTest test case -// each with parameter values "meeny", "miny", and "moe". - -INSTANTIATE_TEST_CASE_P(InstantiationName, - FooTest, - Values("meeny", "miny", "moe")); - -// To distinguish different instances of the pattern, (yes, you -// can instantiate it more then once) the first argument to the -// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the -// actual test case name. Remember to pick unique prefixes for different -// instantiations. The tests from the instantiation above will have -// these names: -// -// * InstantiationName/FooTest.DoesBlah/0 for "meeny" -// * InstantiationName/FooTest.DoesBlah/1 for "miny" -// * InstantiationName/FooTest.DoesBlah/2 for "moe" -// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" -// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" -// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" -// -// You can use these names in --gtest_filter. -// -// This statement will instantiate all tests from FooTest again, each -// with parameter values "cat" and "dog": - -const char* pets[] = {"cat", "dog"}; -INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); - -// The tests from the instantiation above will have these names: -// -// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" -// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" -// -// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests -// in the given test case, whether their definitions come before or -// AFTER the INSTANTIATE_TEST_CASE_P statement. -// -// Please also note that generator expressions are evaluated in -// RUN_ALL_TESTS(), after main() has started. This allows evaluation of -// parameter list based on command line parameters. -// -// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc -// for more examples. -// -// In the future, we plan to publish the API for defining new parameter -// generators. But for now this interface remains part of the internal -// implementation and is subject to change. - -#endif // 0 - - -#include - -#include - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include - -namespace testing { - -// Functions producing parameter generators. -// -// Google Test uses these generators to produce parameters for value- -// parameterized tests. When a parameterized test case is instantiated -// with a particular generator, Google Test creates and runs tests -// for each element in the sequence produced by the generator. -// -// In the following sample, tests from test case FooTest are instantiated -// each three times with parameter values 3, 5, and 8: -// -// class FooTest : public TestWithParam { ... }; -// -// TEST_P(FooTest, TestThis) { -// } -// TEST_P(FooTest, TestThat) { -// } -// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); -// - -// Range() returns generators providing sequences of values in a range. -// -// Synopsis: -// Range(start, end) -// - returns a generator producing a sequence of values {start, start+1, -// start+2, ..., }. -// Range(start, end, step) -// - returns a generator producing a sequence of values {start, start+step, -// start+step+step, ..., }. -// Notes: -// * The generated sequences never include end. For example, Range(1, 5) -// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) -// returns a generator producing {1, 3, 5, 7}. -// * start and end must have the same type. That type may be any integral or -// floating-point type or a user defined type satisfying these conditions: -// * It must be assignable (have operator=() defined). -// * It must have operator+() (operator+(int-compatible type) for -// two-operand version). -// * It must have operator<() defined. -// Elements in the resulting sequences will also have that type. -// * Condition start < end must be satisfied in order for resulting sequences -// to contain any elements. -// -template -internal::ParamGenerator Range(T start, T end, IncrementT step) { - return internal::ParamGenerator( - new internal::RangeGenerator(start, end, step)); -} - -template -internal::ParamGenerator Range(T start, T end) { - return Range(start, end, 1); -} - -// ValuesIn() function allows generation of tests with parameters coming from -// a container. -// -// Synopsis: -// ValuesIn(const T (&array)[N]) -// - returns a generator producing sequences with elements from -// a C-style array. -// ValuesIn(const Container& container) -// - returns a generator producing sequences with elements from -// an STL-style container. -// ValuesIn(Iterator begin, Iterator end) -// - returns a generator producing sequences with elements from -// a range [begin, end) defined by a pair of STL-style iterators. These -// iterators can also be plain C pointers. -// -// Please note that ValuesIn copies the values from the containers -// passed in and keeps them to generate tests in RUN_ALL_TESTS(). -// -// Examples: -// -// This instantiates tests from test case StringTest -// each with C-string values of "foo", "bar", and "baz": -// -// const char* strings[] = {"foo", "bar", "baz"}; -// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); -// -// This instantiates tests from test case StlStringTest -// each with STL strings with values "a" and "b": -// -// ::std::vector< ::std::string> GetParameterStrings() { -// ::std::vector< ::std::string> v; -// v.push_back("a"); -// v.push_back("b"); -// return v; -// } -// -// INSTANTIATE_TEST_CASE_P(CharSequence, -// StlStringTest, -// ValuesIn(GetParameterStrings())); -// -// -// This will also instantiate tests from CharTest -// each with parameter values 'a' and 'b': -// -// ::std::list GetParameterChars() { -// ::std::list list; -// list.push_back('a'); -// list.push_back('b'); -// return list; -// } -// ::std::list l = GetParameterChars(); -// INSTANTIATE_TEST_CASE_P(CharSequence2, -// CharTest, -// ValuesIn(l.begin(), l.end())); -// -template -internal::ParamGenerator< - typename ::std::iterator_traits::value_type> ValuesIn( - ForwardIterator begin, - ForwardIterator end) { - typedef typename ::std::iterator_traits::value_type - ParamType; - return internal::ParamGenerator( - new internal::ValuesInIteratorRangeGenerator(begin, end)); -} - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]) { - return ValuesIn(array, array + N); -} - -template -internal::ParamGenerator ValuesIn( - const Container& container) { - return ValuesIn(container.begin(), container.end()); -} - -// Values() allows generating tests from explicitly specified list of -// parameters. -// -// Synopsis: -// Values(T v1, T v2, ..., T vN) -// - returns a generator producing sequences with elements v1, v2, ..., vN. -// -// For example, this instantiates tests from test case BarTest each -// with values "one", "two", and "three": -// -// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); -// -// This instantiates tests from test case BazTest each with values 1, 2, 3.5. -// The exact type of values will depend on the type of parameter in BazTest. -// -// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); -// -// Currently, Values() supports from 1 to 50 parameters. -// -template -internal::ValueArray1 Values(T1 v1) { - return internal::ValueArray1(v1); -} - -template -internal::ValueArray2 Values(T1 v1, T2 v2) { - return internal::ValueArray2(v1, v2); -} - -template -internal::ValueArray3 Values(T1 v1, T2 v2, T3 v3) { - return internal::ValueArray3(v1, v2, v3); -} - -template -internal::ValueArray4 Values(T1 v1, T2 v2, T3 v3, T4 v4) { - return internal::ValueArray4(v1, v2, v3, v4); -} - -template -internal::ValueArray5 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5) { - return internal::ValueArray5(v1, v2, v3, v4, v5); -} - -template -internal::ValueArray6 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6) { - return internal::ValueArray6(v1, v2, v3, v4, v5, v6); -} - -template -internal::ValueArray7 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7) { - return internal::ValueArray7(v1, v2, v3, v4, v5, - v6, v7); -} - -template -internal::ValueArray8 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) { - return internal::ValueArray8(v1, v2, v3, v4, - v5, v6, v7, v8); -} - -template -internal::ValueArray9 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) { - return internal::ValueArray9(v1, v2, v3, - v4, v5, v6, v7, v8, v9); -} - -template -internal::ValueArray10 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) { - return internal::ValueArray10(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10); -} - -template -internal::ValueArray11 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) { - return internal::ValueArray11(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); -} - -template -internal::ValueArray12 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) { - return internal::ValueArray12(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); -} - -template -internal::ValueArray13 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) { - return internal::ValueArray13(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); -} - -template -internal::ValueArray14 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) { - return internal::ValueArray14(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14); -} - -template -internal::ValueArray15 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) { - return internal::ValueArray15(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15); -} - -template -internal::ValueArray16 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16) { - return internal::ValueArray16(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16); -} - -template -internal::ValueArray17 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17) { - return internal::ValueArray17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17); -} - -template -internal::ValueArray18 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18) { - return internal::ValueArray18(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18); -} - -template -internal::ValueArray19 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) { - return internal::ValueArray19(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19); -} - -template -internal::ValueArray20 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) { - return internal::ValueArray20(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20); -} - -template -internal::ValueArray21 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) { - return internal::ValueArray21(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); -} - -template -internal::ValueArray22 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22) { - return internal::ValueArray22(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22); -} - -template -internal::ValueArray23 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23) { - return internal::ValueArray23(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23); -} - -template -internal::ValueArray24 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24) { - return internal::ValueArray24(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24); -} - -template -internal::ValueArray25 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) { - return internal::ValueArray25(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25); -} - -template -internal::ValueArray26 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) { - return internal::ValueArray26(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26); -} - -template -internal::ValueArray27 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) { - return internal::ValueArray27(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27); -} - -template -internal::ValueArray28 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) { - return internal::ValueArray28(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28); -} - -template -internal::ValueArray29 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) { - return internal::ValueArray29(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29); -} - -template -internal::ValueArray30 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) { - return internal::ValueArray30(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30); -} - -template -internal::ValueArray31 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) { - return internal::ValueArray31(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31); -} - -template -internal::ValueArray32 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32) { - return internal::ValueArray32(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32); -} - -template -internal::ValueArray33 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33) { - return internal::ValueArray33(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33); -} - -template -internal::ValueArray34 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34) { - return internal::ValueArray34(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34); -} - -template -internal::ValueArray35 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) { - return internal::ValueArray35(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35); -} - -template -internal::ValueArray36 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) { - return internal::ValueArray36(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36); -} - -template -internal::ValueArray37 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37) { - return internal::ValueArray37(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37); -} - -template -internal::ValueArray38 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38) { - return internal::ValueArray38(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, - v33, v34, v35, v36, v37, v38); -} - -template -internal::ValueArray39 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38, T39 v39) { - return internal::ValueArray39(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, - v32, v33, v34, v35, v36, v37, v38, v39); -} - -template -internal::ValueArray40 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, - T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, - T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) { - return internal::ValueArray40(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, - v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40); -} - -template -internal::ValueArray41 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) { - return internal::ValueArray41(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, - v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41); -} - -template -internal::ValueArray42 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) { - return internal::ValueArray42(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, - v42); -} - -template -internal::ValueArray43 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) { - return internal::ValueArray43(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, - v41, v42, v43); -} - -template -internal::ValueArray44 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) { - return internal::ValueArray44(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, - v40, v41, v42, v43, v44); -} - -template -internal::ValueArray45 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) { - return internal::ValueArray45(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, - v39, v40, v41, v42, v43, v44, v45); -} - -template -internal::ValueArray46 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) { - return internal::ValueArray46(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46); -} - -template -internal::ValueArray47 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) { - return internal::ValueArray47(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46, v47); -} - -template -internal::ValueArray48 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, - T48 v48) { - return internal::ValueArray48(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, - v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48); -} - -template -internal::ValueArray49 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, - T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, - T47 v47, T48 v48, T49 v49) { - return internal::ValueArray49(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, - v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49); -} - -template -internal::ValueArray50 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, - T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, - T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) { - return internal::ValueArray50(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, - v48, v49, v50); -} - -// Bool() allows generating tests with parameters in a set of (false, true). -// -// Synopsis: -// Bool() -// - returns a generator producing sequences with elements {false, true}. -// -// It is useful when testing code that depends on Boolean flags. Combinations -// of multiple flags can be tested when several Bool()'s are combined using -// Combine() function. -// -// In the following example all tests in the test case FlagDependentTest -// will be instantiated twice with parameters false and true. -// -// class FlagDependentTest : public testing::TestWithParam { -// virtual void SetUp() { -// external_flag = GetParam(); -// } -// } -// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); -// -inline internal::ParamGenerator Bool() { - return Values(false, true); -} - -#if GTEST_HAS_COMBINE -// Combine() allows the user to combine two or more sequences to produce -// values of a Cartesian product of those sequences' elements. -// -// Synopsis: -// Combine(gen1, gen2, ..., genN) -// - returns a generator producing sequences with elements coming from -// the Cartesian product of elements from the sequences generated by -// gen1, gen2, ..., genN. The sequence elements will have a type of -// tuple where T1, T2, ..., TN are the types -// of elements from sequences produces by gen1, gen2, ..., genN. -// -// Combine can have up to 10 arguments. This number is currently limited -// by the maximum number of elements in the tuple implementation used by Google -// Test. -// -// Example: -// -// This will instantiate tests in test case AnimalTest each one with -// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), -// tuple("dog", BLACK), and tuple("dog", WHITE): -// -// enum Color { BLACK, GRAY, WHITE }; -// class AnimalTest -// : public testing::TestWithParam > {...}; -// -// TEST_P(AnimalTest, AnimalLooksNice) {...} -// -// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, -// Combine(Values("cat", "dog"), -// Values(BLACK, WHITE))); -// -// This will instantiate tests in FlagDependentTest with all variations of two -// Boolean flags: -// -// class FlagDependentTest -// : public testing::TestWithParam > { -// virtual void SetUp() { -// // Assigns external_flag_1 and external_flag_2 values from the tuple. -// tie(external_flag_1, external_flag_2) = GetParam(); -// } -// }; -// -// TEST_P(FlagDependentTest, TestFeature1) { -// // Test your code using external_flag_1 and external_flag_2 here. -// } -// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, -// Combine(Bool(), Bool())); -// -template -internal::CartesianProductHolder2 Combine( - const Generator1& g1, const Generator2& g2) { - return internal::CartesianProductHolder2( - g1, g2); -} - -template -internal::CartesianProductHolder3 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3) { - return internal::CartesianProductHolder3( - g1, g2, g3); -} - -template -internal::CartesianProductHolder4 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4) { - return internal::CartesianProductHolder4( - g1, g2, g3, g4); -} - -template -internal::CartesianProductHolder5 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5) { - return internal::CartesianProductHolder5( - g1, g2, g3, g4, g5); -} - -template -internal::CartesianProductHolder6 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6) { - return internal::CartesianProductHolder6( - g1, g2, g3, g4, g5, g6); -} - -template -internal::CartesianProductHolder7 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7) { - return internal::CartesianProductHolder7( - g1, g2, g3, g4, g5, g6, g7); -} - -template -internal::CartesianProductHolder8 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8) { - return internal::CartesianProductHolder8( - g1, g2, g3, g4, g5, g6, g7, g8); -} - -template -internal::CartesianProductHolder9 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9) { - return internal::CartesianProductHolder9( - g1, g2, g3, g4, g5, g6, g7, g8, g9); -} - -template -internal::CartesianProductHolder10 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9, - const Generator10& g10) { - return internal::CartesianProductHolder10( - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10); -} -#endif // GTEST_HAS_COMBINE - - - -#define TEST_P(test_case_name, test_name) \ - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - : public test_case_name { \ - public: \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ - virtual void TestBody(); \ - private: \ - static int AddToRegistry() { \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ - #test_case_name, \ - #test_name, \ - new ::testing::internal::TestMetaFactory< \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ - return 0; \ - } \ - static int gtest_registering_dummy_; \ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ - }; \ - int GTEST_TEST_CLASS_NAME_(test_case_name, \ - test_name)::gtest_registering_dummy_ = \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ - void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ - ::testing::internal::ParamGenerator \ - gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - int gtest_##prefix##test_case_name##_dummy_ = \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ - #prefix, \ - >est_##prefix##test_case_name##_EvalGenerator_, \ - __FILE__, __LINE__) - -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h.pump deleted file mode 100644 index c761f125..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-param-test.h.pump +++ /dev/null @@ -1,453 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of Values arguments we want to support. -$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// Macros and functions for implementing parameterized tests -// in Google C++ Testing Framework (Google Test) -// -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ - - -// Value-parameterized tests allow you to test your code with different -// parameters without writing multiple copies of the same test. -// -// Here is how you use value-parameterized tests: - -#if 0 - -// To write value-parameterized tests, first you should define a fixture -// class. It must be derived from testing::TestWithParam, where T is -// the type of your parameter values. TestWithParam is itself derived -// from testing::Test. T can be any copyable type. If it's a raw pointer, -// you are responsible for managing the lifespan of the pointed values. - -class FooTest : public ::testing::TestWithParam { - // You can implement all the usual class fixture members here. -}; - -// Then, use the TEST_P macro to define as many parameterized tests -// for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. - -TEST_P(FooTest, DoesBlah) { - // Inside a test, access the test parameter with the GetParam() method - // of the TestWithParam class: - EXPECT_TRUE(foo.Blah(GetParam())); - ... -} - -TEST_P(FooTest, HasBlahBlah) { - ... -} - -// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test -// case with any set of parameters you want. Google Test defines a number -// of functions for generating test parameters. They return what we call -// (surprise!) parameter generators. Here is a summary of them, which -// are all in the testing namespace: -// -// -// Range(begin, end [, step]) - Yields values {begin, begin+step, -// begin+step+step, ...}. The values do not -// include end. step defaults to 1. -// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. -// ValuesIn(container) - Yields values from a C-style array, an STL -// ValuesIn(begin,end) container, or an iterator range [begin, end). -// Bool() - Yields sequence {false, true}. -// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product -// for the math savvy) of the values generated -// by the N generators. -// -// For more details, see comments at the definitions of these functions below -// in this file. -// -// The following statement will instantiate tests from the FooTest test case -// each with parameter values "meeny", "miny", and "moe". - -INSTANTIATE_TEST_CASE_P(InstantiationName, - FooTest, - Values("meeny", "miny", "moe")); - -// To distinguish different instances of the pattern, (yes, you -// can instantiate it more then once) the first argument to the -// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the -// actual test case name. Remember to pick unique prefixes for different -// instantiations. The tests from the instantiation above will have -// these names: -// -// * InstantiationName/FooTest.DoesBlah/0 for "meeny" -// * InstantiationName/FooTest.DoesBlah/1 for "miny" -// * InstantiationName/FooTest.DoesBlah/2 for "moe" -// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" -// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" -// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" -// -// You can use these names in --gtest_filter. -// -// This statement will instantiate all tests from FooTest again, each -// with parameter values "cat" and "dog": - -const char* pets[] = {"cat", "dog"}; -INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); - -// The tests from the instantiation above will have these names: -// -// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" -// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" -// -// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests -// in the given test case, whether their definitions come before or -// AFTER the INSTANTIATE_TEST_CASE_P statement. -// -// Please also note that generator expressions are evaluated in -// RUN_ALL_TESTS(), after main() has started. This allows evaluation of -// parameter list based on command line parameters. -// -// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc -// for more examples. -// -// In the future, we plan to publish the API for defining new parameter -// generators. But for now this interface remains part of the internal -// implementation and is subject to change. - -#endif // 0 - - -#include - -#include - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include - -namespace testing { - -// Functions producing parameter generators. -// -// Google Test uses these generators to produce parameters for value- -// parameterized tests. When a parameterized test case is instantiated -// with a particular generator, Google Test creates and runs tests -// for each element in the sequence produced by the generator. -// -// In the following sample, tests from test case FooTest are instantiated -// each three times with parameter values 3, 5, and 8: -// -// class FooTest : public TestWithParam { ... }; -// -// TEST_P(FooTest, TestThis) { -// } -// TEST_P(FooTest, TestThat) { -// } -// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); -// - -// Range() returns generators providing sequences of values in a range. -// -// Synopsis: -// Range(start, end) -// - returns a generator producing a sequence of values {start, start+1, -// start+2, ..., }. -// Range(start, end, step) -// - returns a generator producing a sequence of values {start, start+step, -// start+step+step, ..., }. -// Notes: -// * The generated sequences never include end. For example, Range(1, 5) -// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) -// returns a generator producing {1, 3, 5, 7}. -// * start and end must have the same type. That type may be any integral or -// floating-point type or a user defined type satisfying these conditions: -// * It must be assignable (have operator=() defined). -// * It must have operator+() (operator+(int-compatible type) for -// two-operand version). -// * It must have operator<() defined. -// Elements in the resulting sequences will also have that type. -// * Condition start < end must be satisfied in order for resulting sequences -// to contain any elements. -// -template -internal::ParamGenerator Range(T start, T end, IncrementT step) { - return internal::ParamGenerator( - new internal::RangeGenerator(start, end, step)); -} - -template -internal::ParamGenerator Range(T start, T end) { - return Range(start, end, 1); -} - -// ValuesIn() function allows generation of tests with parameters coming from -// a container. -// -// Synopsis: -// ValuesIn(const T (&array)[N]) -// - returns a generator producing sequences with elements from -// a C-style array. -// ValuesIn(const Container& container) -// - returns a generator producing sequences with elements from -// an STL-style container. -// ValuesIn(Iterator begin, Iterator end) -// - returns a generator producing sequences with elements from -// a range [begin, end) defined by a pair of STL-style iterators. These -// iterators can also be plain C pointers. -// -// Please note that ValuesIn copies the values from the containers -// passed in and keeps them to generate tests in RUN_ALL_TESTS(). -// -// Examples: -// -// This instantiates tests from test case StringTest -// each with C-string values of "foo", "bar", and "baz": -// -// const char* strings[] = {"foo", "bar", "baz"}; -// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); -// -// This instantiates tests from test case StlStringTest -// each with STL strings with values "a" and "b": -// -// ::std::vector< ::std::string> GetParameterStrings() { -// ::std::vector< ::std::string> v; -// v.push_back("a"); -// v.push_back("b"); -// return v; -// } -// -// INSTANTIATE_TEST_CASE_P(CharSequence, -// StlStringTest, -// ValuesIn(GetParameterStrings())); -// -// -// This will also instantiate tests from CharTest -// each with parameter values 'a' and 'b': -// -// ::std::list GetParameterChars() { -// ::std::list list; -// list.push_back('a'); -// list.push_back('b'); -// return list; -// } -// ::std::list l = GetParameterChars(); -// INSTANTIATE_TEST_CASE_P(CharSequence2, -// CharTest, -// ValuesIn(l.begin(), l.end())); -// -template -internal::ParamGenerator< - typename ::std::iterator_traits::value_type> ValuesIn( - ForwardIterator begin, - ForwardIterator end) { - typedef typename ::std::iterator_traits::value_type - ParamType; - return internal::ParamGenerator( - new internal::ValuesInIteratorRangeGenerator(begin, end)); -} - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]) { - return ValuesIn(array, array + N); -} - -template -internal::ParamGenerator ValuesIn( - const Container& container) { - return ValuesIn(container.begin(), container.end()); -} - -// Values() allows generating tests from explicitly specified list of -// parameters. -// -// Synopsis: -// Values(T v1, T v2, ..., T vN) -// - returns a generator producing sequences with elements v1, v2, ..., vN. -// -// For example, this instantiates tests from test case BarTest each -// with values "one", "two", and "three": -// -// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); -// -// This instantiates tests from test case BazTest each with values 1, 2, 3.5. -// The exact type of values will depend on the type of parameter in BazTest. -// -// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); -// -// Currently, Values() supports from 1 to $n parameters. -// -$range i 1..n -$for i [[ -$range j 1..i - -template <$for j, [[typename T$j]]> -internal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) { - return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]); -} - -]] - -// Bool() allows generating tests with parameters in a set of (false, true). -// -// Synopsis: -// Bool() -// - returns a generator producing sequences with elements {false, true}. -// -// It is useful when testing code that depends on Boolean flags. Combinations -// of multiple flags can be tested when several Bool()'s are combined using -// Combine() function. -// -// In the following example all tests in the test case FlagDependentTest -// will be instantiated twice with parameters false and true. -// -// class FlagDependentTest : public testing::TestWithParam { -// virtual void SetUp() { -// external_flag = GetParam(); -// } -// } -// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); -// -inline internal::ParamGenerator Bool() { - return Values(false, true); -} - -#if GTEST_HAS_COMBINE -// Combine() allows the user to combine two or more sequences to produce -// values of a Cartesian product of those sequences' elements. -// -// Synopsis: -// Combine(gen1, gen2, ..., genN) -// - returns a generator producing sequences with elements coming from -// the Cartesian product of elements from the sequences generated by -// gen1, gen2, ..., genN. The sequence elements will have a type of -// tuple where T1, T2, ..., TN are the types -// of elements from sequences produces by gen1, gen2, ..., genN. -// -// Combine can have up to $maxtuple arguments. This number is currently limited -// by the maximum number of elements in the tuple implementation used by Google -// Test. -// -// Example: -// -// This will instantiate tests in test case AnimalTest each one with -// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), -// tuple("dog", BLACK), and tuple("dog", WHITE): -// -// enum Color { BLACK, GRAY, WHITE }; -// class AnimalTest -// : public testing::TestWithParam > {...}; -// -// TEST_P(AnimalTest, AnimalLooksNice) {...} -// -// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, -// Combine(Values("cat", "dog"), -// Values(BLACK, WHITE))); -// -// This will instantiate tests in FlagDependentTest with all variations of two -// Boolean flags: -// -// class FlagDependentTest -// : public testing::TestWithParam > { -// virtual void SetUp() { -// // Assigns external_flag_1 and external_flag_2 values from the tuple. -// tie(external_flag_1, external_flag_2) = GetParam(); -// } -// }; -// -// TEST_P(FlagDependentTest, TestFeature1) { -// // Test your code using external_flag_1 and external_flag_2 here. -// } -// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, -// Combine(Bool(), Bool())); -// -$range i 2..maxtuple -$for i [[ -$range j 1..i - -template <$for j, [[typename Generator$j]]> -internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine( - $for j, [[const Generator$j& g$j]]) { - return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>( - $for j, [[g$j]]); -} - -]] -#endif // GTEST_HAS_COMBINE - - - -#define TEST_P(test_case_name, test_name) \ - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - : public test_case_name { \ - public: \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ - virtual void TestBody(); \ - private: \ - static int AddToRegistry() { \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ - #test_case_name, \ - #test_name, \ - new ::testing::internal::TestMetaFactory< \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ - return 0; \ - } \ - static int gtest_registering_dummy_; \ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ - }; \ - int GTEST_TEST_CLASS_NAME_(test_case_name, \ - test_name)::gtest_registering_dummy_ = \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ - void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ - ::testing::internal::ParamGenerator \ - gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - int gtest_##prefix##test_case_name##_dummy_ = \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ - #prefix, \ - >est_##prefix##test_case_name##_EvalGenerator_, \ - __FILE__, __LINE__) - -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-spi.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-spi.h deleted file mode 100644 index a4e387a3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-spi.h +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Utilities for testing Google Test itself and code that uses Google Test -// (e.g. frameworks built on top of Google Test). - -#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_ -#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_ - -#include - -namespace testing { - -// This helper class can be used to mock out Google Test failure reporting -// so that we can test Google Test or code that builds on Google Test. -// -// An object of this class appends a TestPartResult object to the -// TestPartResultArray object given in the constructor whenever a Google Test -// failure is reported. It can either intercept only failures that are -// generated in the same thread that created this object or it can intercept -// all generated failures. The scope of this mock object can be controlled with -// the second argument to the two arguments constructor. -class ScopedFakeTestPartResultReporter - : public TestPartResultReporterInterface { - public: - // The two possible mocking modes of this object. - enum InterceptMode { - INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures. - INTERCEPT_ALL_THREADS // Intercepts all failures. - }; - - // The c'tor sets this object as the test part result reporter used - // by Google Test. The 'result' parameter specifies where to report the - // results. This reporter will only catch failures generated in the current - // thread. DEPRECATED - explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result); - - // Same as above, but you can choose the interception scope of this object. - ScopedFakeTestPartResultReporter(InterceptMode intercept_mode, - TestPartResultArray* result); - - // The d'tor restores the previous test part result reporter. - virtual ~ScopedFakeTestPartResultReporter(); - - // Appends the TestPartResult object to the TestPartResultArray - // received in the constructor. - // - // This method is from the TestPartResultReporterInterface - // interface. - virtual void ReportTestPartResult(const TestPartResult& result); - private: - void Init(); - - const InterceptMode intercept_mode_; - TestPartResultReporterInterface* old_reporter_; - TestPartResultArray* const result_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter); -}; - -namespace internal { - -// A helper class for implementing EXPECT_FATAL_FAILURE() and -// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given -// TestPartResultArray contains exactly one failure that has the given -// type and contains the given substring. If that's not the case, a -// non-fatal failure will be generated. -class SingleFailureChecker { - public: - // The constructor remembers the arguments. - SingleFailureChecker(const TestPartResultArray* results, - TestPartResultType type, - const char* substr); - ~SingleFailureChecker(); - private: - const TestPartResultArray* const results_; - const TestPartResultType type_; - const String substr_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker); -}; - -} // namespace internal - -} // namespace testing - -// A set of macros for testing Google Test assertions or code that's expected -// to generate Google Test fatal failures. It verifies that the given -// statement will cause exactly one fatal Google Test failure with 'substr' -// being part of the failure message. -// -// There are two different versions of this macro. EXPECT_FATAL_FAILURE only -// affects and considers failures generated in the current thread and -// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. -// -// The verification of the assertion is done correctly even when the statement -// throws an exception or aborts the current function. -// -// Known restrictions: -// - 'statement' cannot reference local non-static variables or -// non-static members of the current object. -// - 'statement' cannot return a value. -// - You cannot stream a failure message to this macro. -// -// Note that even though the implementations of the following two -// macros are much alike, we cannot refactor them to use a common -// helper macro, due to some peculiarity in how the preprocessor -// works. The AcceptsMacroThatExpandsToUnprotectedComma test in -// gtest_unittest.cc will fail to compile if we do that. -#define EXPECT_FATAL_FAILURE(statement, substr) \ - do { \ - class GTestExpectFatalFailureHelper {\ - public:\ - static void Execute() { statement; }\ - };\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TPRT_FATAL_FAILURE, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ - GTestExpectFatalFailureHelper::Execute();\ - }\ - } while (false) - -#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ - do { \ - class GTestExpectFatalFailureHelper {\ - public:\ - static void Execute() { statement; }\ - };\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TPRT_FATAL_FAILURE, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ALL_THREADS, >est_failures);\ - GTestExpectFatalFailureHelper::Execute();\ - }\ - } while (false) - -// A macro for testing Google Test assertions or code that's expected to -// generate Google Test non-fatal failures. It asserts that the given -// statement will cause exactly one non-fatal Google Test failure with 'substr' -// being part of the failure message. -// -// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only -// affects and considers failures generated in the current thread and -// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. -// -// 'statement' is allowed to reference local variables and members of -// the current object. -// -// The verification of the assertion is done correctly even when the statement -// throws an exception or aborts the current function. -// -// Known restrictions: -// - You cannot stream a failure message to this macro. -// -// Note that even though the implementations of the following two -// macros are much alike, we cannot refactor them to use a common -// helper macro, due to some peculiarity in how the preprocessor -// works. The AcceptsMacroThatExpandsToUnprotectedComma test in -// gtest_unittest.cc will fail to compile if we do that. -#define EXPECT_NONFATAL_FAILURE(statement, substr) \ - do {\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TPRT_NONFATAL_FAILURE, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ - statement;\ - }\ - } while (false) - -#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ - do {\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TPRT_NONFATAL_FAILURE, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS,\ - >est_failures);\ - statement;\ - }\ - } while (false) - -#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-test-part.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-test-part.h deleted file mode 100644 index 1a281afb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-test-part.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ - -#include -#include -#include - -namespace testing { - -// The possible outcomes of a test part (i.e. an assertion or an -// explicit SUCCEED(), FAIL(), or ADD_FAILURE()). -enum TestPartResultType { - TPRT_SUCCESS, // Succeeded. - TPRT_NONFATAL_FAILURE, // Failed but the test can continue. - TPRT_FATAL_FAILURE // Failed and the test should be terminated. -}; - -// A copyable object representing the result of a test part (i.e. an -// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()). -// -// Don't inherit from TestPartResult as its destructor is not virtual. -class TestPartResult { - public: - // C'tor. TestPartResult does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestPartResult object. - TestPartResult(TestPartResultType type, - const char* file_name, - int line_number, - const char* message) - : type_(type), - file_name_(file_name), - line_number_(line_number), - summary_(ExtractSummary(message)), - message_(message) { - } - - // Gets the outcome of the test part. - TestPartResultType type() const { return type_; } - - // Gets the name of the source file where the test part took place, or - // NULL if it's unknown. - const char* file_name() const { return file_name_.c_str(); } - - // Gets the line in the source file where the test part took place, - // or -1 if it's unknown. - int line_number() const { return line_number_; } - - // Gets the summary of the failure message. - const char* summary() const { return summary_.c_str(); } - - // Gets the message associated with the test part. - const char* message() const { return message_.c_str(); } - - // Returns true iff the test part passed. - bool passed() const { return type_ == TPRT_SUCCESS; } - - // Returns true iff the test part failed. - bool failed() const { return type_ != TPRT_SUCCESS; } - - // Returns true iff the test part non-fatally failed. - bool nonfatally_failed() const { return type_ == TPRT_NONFATAL_FAILURE; } - - // Returns true iff the test part fatally failed. - bool fatally_failed() const { return type_ == TPRT_FATAL_FAILURE; } - private: - TestPartResultType type_; - - // Gets the summary of the failure message by omitting the stack - // trace in it. - static internal::String ExtractSummary(const char* message); - - // The name of the source file where the test part took place, or - // NULL if the source file is unknown. - internal::String file_name_; - // The line in the source file where the test part took place, or -1 - // if the line number is unknown. - int line_number_; - internal::String summary_; // The test failure summary. - internal::String message_; // The test failure message. -}; - -// Prints a TestPartResult object. -std::ostream& operator<<(std::ostream& os, const TestPartResult& result); - -// An array of TestPartResult objects. -// -// We define this class as we cannot use STL containers when compiling -// Google Test with MSVC 7.1 and exceptions disabled. -// -// Don't inherit from TestPartResultArray as its destructor is not -// virtual. -class TestPartResultArray { - public: - TestPartResultArray(); - ~TestPartResultArray(); - - // Appends the given TestPartResult to the array. - void Append(const TestPartResult& result); - - // Returns the TestPartResult at the given index (0-based). - const TestPartResult& GetTestPartResult(int index) const; - - // Returns the number of TestPartResult objects in the array. - int size() const; - private: - // Internally we use a list to simulate the array. Yes, this means - // that random access is O(N) in time, but it's OK for its purpose. - internal::List* const list_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); -}; - -// This interface knows how to report a test part result. -class TestPartResultReporterInterface { - public: - virtual ~TestPartResultReporterInterface() {} - - virtual void ReportTestPartResult(const TestPartResult& result) = 0; -}; - -namespace internal { - -// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a -// statement generates new fatal failures. To do so it registers itself as the -// current test part result reporter. Besides checking if fatal failures were -// reported, it only delegates the reporting to the former result reporter. -// The original result reporter is restored in the destructor. -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -class HasNewFatalFailureHelper : public TestPartResultReporterInterface { - public: - HasNewFatalFailureHelper(); - virtual ~HasNewFatalFailureHelper(); - virtual void ReportTestPartResult(const TestPartResult& result); - bool has_new_fatal_failure() const { return has_new_fatal_failure_; } - private: - bool has_new_fatal_failure_; - TestPartResultReporterInterface* original_reporter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper); -}; - -} // namespace internal - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-typed-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-typed-test.h deleted file mode 100644 index 519edfe9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest-typed-test.h +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ - -// This header implements typed tests and type-parameterized tests. - -// Typed (aka type-driven) tests repeat the same test for types in a -// list. You must know which types you want to test with when writing -// typed tests. Here's how you do it: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - public: - ... - typedef std::list List; - static T shared_; - T value_; -}; - -// Next, associate a list of types with the test case, which will be -// repeated for each type in the list. The typedef is necessary for -// the macro to parse correctly. -typedef testing::Types MyTypes; -TYPED_TEST_CASE(FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// TYPED_TEST_CASE(FooTest, int); - -// Then, use TYPED_TEST() instead of TEST_F() to define as many typed -// tests for this test case as you want. -TYPED_TEST(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - // Since we are inside a derived class template, C++ requires use to - // visit the members of FooTest via 'this'. - TypeParam n = this->value_; - - // To visit static members of the fixture, add the TestFixture:: - // prefix. - n += TestFixture::shared_; - - // To refer to typedefs in the fixture, add the "typename - // TestFixture::" prefix. - typename TestFixture::List values; - values.push_back(n); - ... -} - -TYPED_TEST(FooTest, HasPropertyA) { ... } - -#endif // 0 - -// Type-parameterized tests are abstract test patterns parameterized -// by a type. Compared with typed tests, type-parameterized tests -// allow you to define the test pattern without knowing what the type -// parameters are. The defined pattern can be instantiated with -// different types any number of times, in any number of translation -// units. -// -// If you are designing an interface or concept, you can define a -// suite of type-parameterized tests to verify properties that any -// valid implementation of the interface/concept should have. Then, -// each implementation can easily instantiate the test suite to verify -// that it conforms to the requirements, without having to write -// similar tests repeatedly. Here's an example: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - ... -}; - -// Next, declare that you will define a type-parameterized test case -// (the _P suffix is for "parameterized" or "pattern", whichever you -// prefer): -TYPED_TEST_CASE_P(FooTest); - -// Then, use TYPED_TEST_P() to define as many type-parameterized tests -// for this type-parameterized test case as you want. -TYPED_TEST_P(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - TypeParam n = 0; - ... -} - -TYPED_TEST_P(FooTest, HasPropertyA) { ... } - -// Now the tricky part: you need to register all test patterns before -// you can instantiate them. The first argument of the macro is the -// test case name; the rest are the names of the tests in this test -// case. -REGISTER_TYPED_TEST_CASE_P(FooTest, - DoesBlah, HasPropertyA); - -// Finally, you are free to instantiate the pattern with the types you -// want. If you put the above code in a header file, you can #include -// it in multiple C++ source files and instantiate it multiple times. -// -// To distinguish different instances of the pattern, the first -// argument to the INSTANTIATE_* macro is a prefix that will be added -// to the actual test case name. Remember to pick unique prefixes for -// different instances. -typedef testing::Types MyTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int); - -#endif // 0 - -#include -#include - -// Implements typed tests. - -#if GTEST_HAS_TYPED_TEST - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the typedef for the type parameters of the -// given test case. -#define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_ - -#define TYPED_TEST_CASE(CaseName, Types) \ - typedef ::testing::internal::TypeList::type \ - GTEST_TYPE_PARAMS_(CaseName) - -#define TYPED_TEST(CaseName, TestName) \ - template \ - class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \ - : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - bool gtest_##CaseName##_##TestName##_registered_ = \ - ::testing::internal::TypeParameterizedTest< \ - CaseName, \ - ::testing::internal::TemplateSel< \ - GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \ - GTEST_TYPE_PARAMS_(CaseName)>::Register(\ - "", #CaseName, #TestName, 0); \ - template \ - void GTEST_TEST_CLASS_NAME_(CaseName, TestName)::TestBody() - -#endif // GTEST_HAS_TYPED_TEST - -// Implements type-parameterized tests. - -#if GTEST_HAS_TYPED_TEST_P - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the namespace name that the type-parameterized tests for -// the given type-parameterized test case are defined in. The exact -// name of the namespace is subject to change without notice. -#define GTEST_CASE_NAMESPACE_(TestCaseName) \ - gtest_case_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the variable used to remember the names of -// the defined tests in the given test case. -#define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \ - gtest_typed_test_case_p_state_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY. -// -// Expands to the name of the variable used to remember the names of -// the registered tests in the given test case. -#define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \ - gtest_registered_test_names_##TestCaseName##_ - -// The variables defined in the type-parameterized test macros are -// static as typically these macros are used in a .h file that can be -// #included in multiple translation units linked together. -#define TYPED_TEST_CASE_P(CaseName) \ - static ::testing::internal::TypedTestCasePState \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName) - -#define TYPED_TEST_P(CaseName, TestName) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - template \ - class TestName : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - static bool gtest_##TestName##_defined_ = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\ - __FILE__, __LINE__, #CaseName, #TestName); \ - } \ - template \ - void GTEST_CASE_NAMESPACE_(CaseName)::TestName::TestBody() - -#define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \ - } \ - static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\ - __FILE__, __LINE__, #__VA_ARGS__) - -#define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \ - bool gtest_##Prefix##_##CaseName = \ - ::testing::internal::TypeParameterizedTestCase::type>::Register(\ - #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName)) - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest.h deleted file mode 100644 index f5437784..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest.h +++ /dev/null @@ -1,1420 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for Google Test. It should be -// included by any test program that uses Google Test. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! -// -// Acknowledgment: Google Test borrowed the idea of automatic test -// registration from Barthelemy Dagenais' (barthelemy@prologique.com) -// easyUnit framework. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_H_ - -// The following platform macro is used throughout Google Test: -// _WIN32_WCE Windows CE (set in project files) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Depending on the platform, different string classes are available. -// On Windows, ::std::string compiles only when exceptions are -// enabled. On Linux, in addition to ::std::string, Google also makes -// use of class ::string, which has the same interface as -// ::std::string, but has a different implementation. -// -// The user can tell us whether ::std::string is available in his -// environment by defining the macro GTEST_HAS_STD_STRING to either 1 -// or 0 on the compiler command line. He can also define -// GTEST_HAS_GLOBAL_STRING to 1 to indicate that ::string is available -// AND is a distinct type to ::std::string, or define it to 0 to -// indicate otherwise. -// -// If the user's ::std::string and ::string are the same class due to -// aliasing, he should define GTEST_HAS_STD_STRING to 1 and -// GTEST_HAS_GLOBAL_STRING to 0. -// -// If the user doesn't define GTEST_HAS_STD_STRING and/or -// GTEST_HAS_GLOBAL_STRING, they are defined heuristically. - -namespace testing { - -// Declares the flags. - -// This flag temporary enables the disabled tests. -GTEST_DECLARE_bool_(also_run_disabled_tests); - -// This flag brings the debugger on an assertion failure. -GTEST_DECLARE_bool_(break_on_failure); - -// This flag controls whether Google Test catches all test-thrown exceptions -// and logs them as failures. -GTEST_DECLARE_bool_(catch_exceptions); - -// This flag enables using colors in terminal output. Available values are -// "yes" to enable colors, "no" (disable colors), or "auto" (the default) -// to let Google Test decide. -GTEST_DECLARE_string_(color); - -// This flag sets up the filter to select by name using a glob pattern -// the tests to run. If the filter is not given all tests are executed. -GTEST_DECLARE_string_(filter); - -// This flag causes the Google Test to list tests. None of the tests listed -// are actually run if the flag is provided. -GTEST_DECLARE_bool_(list_tests); - -// This flag controls whether Google Test emits a detailed XML report to a file -// in addition to its normal textual output. -GTEST_DECLARE_string_(output); - -// This flags control whether Google Test prints the elapsed time for each -// test. -GTEST_DECLARE_bool_(print_time); - -// This flag sets how many times the tests are repeated. The default value -// is 1. If the value is -1 the tests are repeating forever. -GTEST_DECLARE_int32_(repeat); - -// This flag controls whether Google Test includes Google Test internal -// stack frames in failure stack traces. -GTEST_DECLARE_bool_(show_internal_stack_frames); - -// This flag specifies the maximum number of stack frames to be -// printed in a failure message. -GTEST_DECLARE_int32_(stack_trace_depth); - -// When this flag is specified, a failed assertion will throw an -// exception if exceptions are enabled, or exit the program with a -// non-zero code otherwise. -GTEST_DECLARE_bool_(throw_on_failure); - -// The upper limit for valid stack trace depths. -const int kMaxStackTraceDepth = 100; - -namespace internal { - -class GTestFlagSaver; - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". -// Declared in gtest-internal.h but defined here, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable) { - return (Message() << streamable).GetString(); -} - -} // namespace internal - -// A class for indicating whether an assertion was successful. When -// the assertion wasn't successful, the AssertionResult object -// remembers a non-empty message that described how it failed. -// -// This class is useful for defining predicate-format functions to be -// used with predicate assertions (ASSERT_PRED_FORMAT*, etc). -// -// The constructor of AssertionResult is private. To create an -// instance of this class, use one of the factory functions -// (AssertionSuccess() and AssertionFailure()). -// -// For example, in order to be able to write: -// -// // Verifies that Foo() returns an even number. -// EXPECT_PRED_FORMAT1(IsEven, Foo()); -// -// you just need to define: -// -// testing::AssertionResult IsEven(const char* expr, int n) { -// if ((n % 2) == 0) return testing::AssertionSuccess(); -// -// Message msg; -// msg << "Expected: " << expr << " is even\n" -// << " Actual: it's " << n; -// return testing::AssertionFailure(msg); -// } -// -// If Foo() returns 5, you will see the following message: -// -// Expected: Foo() is even -// Actual: it's 5 -class AssertionResult { - public: - // Declares factory functions for making successful and failed - // assertion results as friends. - friend AssertionResult AssertionSuccess(); - friend AssertionResult AssertionFailure(const Message&); - - // Returns true iff the assertion succeeded. - operator bool() const { return failure_message_.c_str() == NULL; } // NOLINT - - // Returns the assertion's failure message. - const char* failure_message() const { return failure_message_.c_str(); } - - private: - // The default constructor. It is used when the assertion succeeded. - AssertionResult() {} - - // The constructor used when the assertion failed. - explicit AssertionResult(const internal::String& failure_message); - - // Stores the assertion's failure message. - internal::String failure_message_; -}; - -// Makes a successful assertion result. -AssertionResult AssertionSuccess(); - -// Makes a failed assertion result with the given failure message. -AssertionResult AssertionFailure(const Message& msg); - -// The abstract class that all tests inherit from. -// -// In Google Test, a unit test program contains one or many TestCases, and -// each TestCase contains one or many Tests. -// -// When you define a test using the TEST macro, you don't need to -// explicitly derive from Test - the TEST macro automatically does -// this for you. -// -// The only time you derive from Test is when defining a test fixture -// to be used a TEST_F. For example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { ... } -// virtual void TearDown() { ... } -// ... -// }; -// -// TEST_F(FooTest, Bar) { ... } -// TEST_F(FooTest, Baz) { ... } -// -// Test is not copyable. -class Test { - public: - friend class internal::TestInfoImpl; - - // Defines types for pointers to functions that set up and tear down - // a test case. - typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc; - typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc; - - // The d'tor is virtual as we intend to inherit from Test. - virtual ~Test(); - - // Sets up the stuff shared by all tests in this test case. - // - // Google Test will call Foo::SetUpTestCase() before running the first - // test in test case Foo. Hence a sub-class can define its own - // SetUpTestCase() method to shadow the one defined in the super - // class. - static void SetUpTestCase() {} - - // Tears down the stuff shared by all tests in this test case. - // - // Google Test will call Foo::TearDownTestCase() after running the last - // test in test case Foo. Hence a sub-class can define its own - // TearDownTestCase() method to shadow the one defined in the super - // class. - static void TearDownTestCase() {} - - // Returns true iff the current test has a fatal failure. - static bool HasFatalFailure(); - - // Returns true iff the current test has a non-fatal failure. - static bool HasNonfatalFailure(); - - // Returns true iff the current test has a (either fatal or - // non-fatal) failure. - static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } - - // Logs a property for the current test. Only the last value for a given - // key is remembered. - // These are public static so they can be called from utility functions - // that are not members of the test fixture. - // The arguments are const char* instead strings, as Google Test is used - // on platforms where string doesn't compile. - // - // Note that a driving consideration for these RecordProperty methods - // was to produce xml output suited to the Greenspan charting utility, - // which at present will only chart values that fit in a 32-bit int. It - // is the user's responsibility to restrict their values to 32-bit ints - // if they intend them to be used with Greenspan. - static void RecordProperty(const char* key, const char* value); - static void RecordProperty(const char* key, int value); - - protected: - // Creates a Test object. - Test(); - - // Sets up the test fixture. - virtual void SetUp(); - - // Tears down the test fixture. - virtual void TearDown(); - - private: - // Returns true iff the current test has the same fixture class as - // the first test in the current test case. - static bool HasSameFixtureClass(); - - // Runs the test after the test fixture has been set up. - // - // A sub-class must implement this to define the test logic. - // - // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM. - // Instead, use the TEST or TEST_F macro. - virtual void TestBody() = 0; - - // Sets up, executes, and tears down the test. - void Run(); - - // Uses a GTestFlagSaver to save and restore all Google Test flags. - const internal::GTestFlagSaver* const gtest_flag_saver_; - - // Often a user mis-spells SetUp() as Setup() and spends a long time - // wondering why it is never called by Google Test. The declaration of - // the following method is solely for catching such an error at - // compile time: - // - // - The return type is deliberately chosen to be not void, so it - // will be a conflict if a user declares void Setup() in his test - // fixture. - // - // - This method is private, so it will be another compiler error - // if a user calls it from his test fixture. - // - // DO NOT OVERRIDE THIS FUNCTION. - // - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } - - // We disallow copying Tests. - GTEST_DISALLOW_COPY_AND_ASSIGN_(Test); -}; - - -// A TestInfo object stores the following information about a test: -// -// Test case name -// Test name -// Whether the test should be run -// A function pointer that creates the test object when invoked -// Test result -// -// The constructor of TestInfo registers itself with the UnitTest -// singleton such that the RUN_ALL_TESTS() macro knows which tests to -// run. -class TestInfo { - public: - // Destructs a TestInfo object. This function is not virtual, so - // don't inherit from TestInfo. - ~TestInfo(); - - // Returns the test case name. - const char* test_case_name() const; - - // Returns the test name. - const char* name() const; - - // Returns the test case comment. - const char* test_case_comment() const; - - // Returns the test comment. - const char* comment() const; - - // Returns true if this test matches the user-specified filter. - bool matches_filter() const; - - // Returns true if this test should run, that is if the test is not disabled - // (or it is disabled but the also_run_disabled_tests flag has been specified) - // and its full name matches the user-specified filter. - // - // Google Test allows the user to filter the tests by their full names. - // The full name of a test Bar in test case Foo is defined as - // "Foo.Bar". Only the tests that match the filter will run. - // - // A filter is a colon-separated list of glob (not regex) patterns, - // optionally followed by a '-' and a colon-separated list of - // negative patterns (tests to exclude). A test is run if it - // matches one of the positive patterns and does not match any of - // the negative patterns. - // - // For example, *A*:Foo.* is a filter that matches any string that - // contains the character 'A' or starts with "Foo.". - bool should_run() const; - - // Returns the result of the test. - const internal::TestResult* result() const; - private: -#if GTEST_HAS_DEATH_TEST - friend class internal::DefaultDeathTestFactory; -#endif // GTEST_HAS_DEATH_TEST - friend class internal::TestInfoImpl; - friend class internal::UnitTestImpl; - friend class Test; - friend class TestCase; - friend TestInfo* internal::MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - internal::TypeId fixture_class_id, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc, - internal::TestFactoryBase* factory); - - // Increments the number of death tests encountered in this test so - // far. - int increment_death_test_count(); - - // Accessors for the implementation object. - internal::TestInfoImpl* impl() { return impl_; } - const internal::TestInfoImpl* impl() const { return impl_; } - - // Constructs a TestInfo object. The newly constructed instance assumes - // ownership of the factory object. - TestInfo(const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - internal::TypeId fixture_class_id, - internal::TestFactoryBase* factory); - - // An opaque implementation object. - internal::TestInfoImpl* impl_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo); -}; - -// An Environment object is capable of setting up and tearing down an -// environment. The user should subclass this to define his own -// environment(s). -// -// An Environment object does the set-up and tear-down in virtual -// methods SetUp() and TearDown() instead of the constructor and the -// destructor, as: -// -// 1. You cannot safely throw from a destructor. This is a problem -// as in some cases Google Test is used where exceptions are enabled, and -// we may want to implement ASSERT_* using exceptions where they are -// available. -// 2. You cannot use ASSERT_* directly in a constructor or -// destructor. -class Environment { - public: - // The d'tor is virtual as we need to subclass Environment. - virtual ~Environment() {} - - // Override this to define how to set up the environment. - virtual void SetUp() {} - - // Override this to define how to tear down the environment. - virtual void TearDown() {} - private: - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } -}; - -// A UnitTest consists of a list of TestCases. -// -// This is a singleton class. The only instance of UnitTest is -// created when UnitTest::GetInstance() is first called. This -// instance is never deleted. -// -// UnitTest is not copyable. -// -// This class is thread-safe as long as the methods are called -// according to their specification. -class UnitTest { - public: - // Gets the singleton UnitTest object. The first time this method - // is called, a UnitTest object is constructed and returned. - // Consecutive calls will return the same object. - static UnitTest* GetInstance(); - - // Registers and returns a global test environment. When a test - // program is run, all global test environments will be set-up in - // the order they were registered. After all tests in the program - // have finished, all global test environments will be torn-down in - // the *reverse* order they were registered. - // - // The UnitTest object takes ownership of the given environment. - // - // This method can only be called from the main thread. - Environment* AddEnvironment(Environment* env); - - // Adds a TestPartResult to the current TestResult object. All - // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) - // eventually call this to report their results. The user code - // should use the assertion macros instead of calling this directly. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - void AddTestPartResult(TestPartResultType result_type, - const char* file_name, - int line_number, - const internal::String& message, - const internal::String& os_stack_trace); - - // Adds a TestProperty to the current TestResult object. If the result already - // contains a property with the same key, the value will be updated. - void RecordPropertyForCurrentTest(const char* key, const char* value); - - // Runs all tests in this UnitTest object and prints the result. - // Returns 0 if successful, or 1 otherwise. - // - // This method can only be called from the main thread. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - int Run() GTEST_MUST_USE_RESULT_; - - // Returns the working directory when the first TEST() or TEST_F() - // was executed. The UnitTest object owns the string. - const char* original_working_dir() const; - - // Returns the TestCase object for the test that's currently running, - // or NULL if no test is running. - const TestCase* current_test_case() const; - - // Returns the TestInfo object for the test that's currently running, - // or NULL if no test is running. - const TestInfo* current_test_info() const; - -#if GTEST_HAS_PARAM_TEST - // Returns the ParameterizedTestCaseRegistry object used to keep track of - // value-parameterized tests and instantiate and register them. - internal::ParameterizedTestCaseRegistry& parameterized_test_registry(); -#endif // GTEST_HAS_PARAM_TEST - - // Accessors for the implementation object. - internal::UnitTestImpl* impl() { return impl_; } - const internal::UnitTestImpl* impl() const { return impl_; } - private: - // ScopedTrace is a friend as it needs to modify the per-thread - // trace stack, which is a private member of UnitTest. - friend class internal::ScopedTrace; - - // Creates an empty UnitTest. - UnitTest(); - - // D'tor - virtual ~UnitTest(); - - // Pushes a trace defined by SCOPED_TRACE() on to the per-thread - // Google Test trace stack. - void PushGTestTrace(const internal::TraceInfo& trace); - - // Pops a trace from the per-thread Google Test trace stack. - void PopGTestTrace(); - - // Protects mutable state in *impl_. This is mutable as some const - // methods need to lock it too. - mutable internal::Mutex mutex_; - - // Opaque implementation object. This field is never changed once - // the object is constructed. We don't mark it as const here, as - // doing so will cause a warning in the constructor of UnitTest. - // Mutable state in *impl_ is protected by mutex_. - internal::UnitTestImpl* impl_; - - // We disallow copying UnitTest. - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest); -}; - -// A convenient wrapper for adding an environment for the test -// program. -// -// You should call this before RUN_ALL_TESTS() is called, probably in -// main(). If you use gtest_main, you need to call this before main() -// starts for it to take effect. For example, you can define a global -// variable like this: -// -// testing::Environment* const foo_env = -// testing::AddGlobalTestEnvironment(new FooEnvironment); -// -// However, we strongly recommend you to write your own main() and -// call AddGlobalTestEnvironment() there, as relying on initialization -// of global variables makes the code harder to read and may cause -// problems when you register multiple environments from different -// translation units and the environments have dependencies among them -// (remember that the compiler doesn't guarantee the order in which -// global variables from different translation units are initialized). -inline Environment* AddGlobalTestEnvironment(Environment* env) { - return UnitTest::GetInstance()->AddEnvironment(env); -} - -// Initializes Google Test. This must be called before calling -// RUN_ALL_TESTS(). In particular, it parses a command line for the -// flags that Google Test recognizes. Whenever a Google Test flag is -// seen, it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Test flag variables are -// updated. -// -// Calling the function for the second time has no user-visible effect. -void InitGoogleTest(int* argc, char** argv); - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleTest(int* argc, wchar_t** argv); - -namespace internal { - -// These overloaded versions handle ::std::string and ::std::wstring. -#if GTEST_HAS_STD_STRING -inline String FormatForFailureMessage(const ::std::string& str) { - return (Message() << '"' << str << '"').GetString(); -} -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -inline String FormatForFailureMessage(const ::std::wstring& wstr) { - return (Message() << "L\"" << wstr << '"').GetString(); -} -#endif // GTEST_HAS_STD_WSTRING - -// These overloaded versions handle ::string and ::wstring. -#if GTEST_HAS_GLOBAL_STRING -inline String FormatForFailureMessage(const ::string& str) { - return (Message() << '"' << str << '"').GetString(); -} -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING -inline String FormatForFailureMessage(const ::wstring& wstr) { - return (Message() << "L\"" << wstr << '"').GetString(); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc) -// operand to be used in a failure message. The type (but not value) -// of the other operand may affect the format. This allows us to -// print a char* as a raw pointer when it is compared against another -// char*, and print it as a C string when it is compared against an -// std::string object, for example. -// -// The default implementation ignores the type of the other operand. -// Some specialized versions are used to handle formatting wide or -// narrow C strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -String FormatForComparisonFailureMessage(const T1& value, - const T2& /* other_operand */) { - return FormatForFailureMessage(value); -} - -// The helper function for {ASSERT|EXPECT}_EQ. -template -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4389) // Temporarily disables warning on - // signed/unsigned mismatch. -#endif - - if (expected == actual) { - return AssertionSuccess(); - } - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif - - return EqFailure(expected_expression, - actual_expression, - FormatForComparisonFailureMessage(expected, actual), - FormatForComparisonFailureMessage(actual, expected), - false); -} - -// With this overloaded version, we allow anonymous enums to be used -// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums -// can be implicitly cast to BiggestInt. -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual); - -// The helper class for {ASSERT|EXPECT}_EQ. The template argument -// lhs_is_null_literal is true iff the first argument to ASSERT_EQ() -// is a null pointer literal. The following default implementation is -// for lhs_is_null_literal being false. -template -class EqHelper { - public: - // This templatized version is for the general case. - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // With this overloaded version, we allow anonymous enums to be used - // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous - // enums can be implicitly cast to BiggestInt. - // - // Even though its body looks the same as the above version, we - // cannot merge the two, as it will make anonymous enums unhappy. - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } -}; - -// This specialization is used when the first argument to ASSERT_EQ() -// is a null pointer literal. -template <> -class EqHelper { - public: - // We define two overloaded versions of Compare(). The first - // version will be picked when the second argument to ASSERT_EQ() is - // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or - // EXPECT_EQ(false, a_bool). - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // This version will be picked when the second argument to - // ASSERT_EQ() is a pointer, e.g. ASSERT_EQ(NULL, a_pointer). - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& /* expected */, - T2* actual) { - // We already know that 'expected' is a null pointer. - return CmpHelperEQ(expected_expression, actual_expression, - static_cast(NULL), actual); - } -}; - -// A macro for implementing the helper functions needed to implement -// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste -// of similar code. -// -// For each templatized helper function, we also define an overloaded -// version for BiggestInt in order to reduce code bloat and allow -// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled -// with gcc 4. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ -template \ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - const T1& val1, const T2& val2) {\ - if (val1 op val2) {\ - return AssertionSuccess();\ - } else {\ - Message msg;\ - msg << "Expected: (" << expr1 << ") " #op " (" << expr2\ - << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ - << " vs " << FormatForComparisonFailureMessage(val2, val1);\ - return AssertionFailure(msg);\ - }\ -}\ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - BiggestInt val1, BiggestInt val2); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - -// Implements the helper function for {ASSERT|EXPECT}_NE -GTEST_IMPL_CMP_HELPER_(NE, !=) -// Implements the helper function for {ASSERT|EXPECT}_LE -GTEST_IMPL_CMP_HELPER_(LE, <=) -// Implements the helper function for {ASSERT|EXPECT}_LT -GTEST_IMPL_CMP_HELPER_(LT, < ) -// Implements the helper function for {ASSERT|EXPECT}_GE -GTEST_IMPL_CMP_HELPER_(GE, >=) -// Implements the helper function for {ASSERT|EXPECT}_GT -GTEST_IMPL_CMP_HELPER_(GT, > ) - -#undef GTEST_IMPL_CMP_HELPER_ - -// The helper function for {ASSERT|EXPECT}_STREQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRCASEEQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRNE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - -// The helper function for {ASSERT|EXPECT}_STRCASENE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRCASENE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - - -// Helper function for *_STREQ on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const wchar_t* expected, - const wchar_t* actual); - -// Helper function for *_STRNE on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const wchar_t* s1, - const wchar_t* s2); - -} // namespace internal - -// IsSubstring() and IsNotSubstring() are intended to be used as the -// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by -// themselves. They check whether needle is a substring of haystack -// (NULL is considered a substring of itself only), and return an -// appropriate error message when they fail. -// -// The {needle,haystack}_expr arguments are the stringified -// expressions that generated the two real arguments. -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -#if GTEST_HAS_STD_STRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -#endif // GTEST_HAS_STD_WSTRING - -namespace internal { - -// Helper template function for comparing floating-points. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression, - const char* actual_expression, - RawType expected, - RawType actual) { - const FloatingPoint lhs(expected), rhs(actual); - - if (lhs.AlmostEquals(rhs)) { - return AssertionSuccess(); - } - - StrStream expected_ss; - expected_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << expected; - - StrStream actual_ss; - actual_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << actual; - - return EqFailure(expected_expression, - actual_expression, - StrStreamToString(&expected_ss), - StrStreamToString(&actual_ss), - false); -} - -// Helper function for implementing ASSERT_NEAR. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult DoubleNearPredFormat(const char* expr1, - const char* expr2, - const char* abs_error_expr, - double val1, - double val2, - double abs_error); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// A class that enables one to stream messages to assertion macros -class AssertHelper { - public: - // Constructor. - AssertHelper(TestPartResultType type, const char* file, int line, - const char* message); - // Message assignment is a semantic trick to enable assertion - // streaming; see the GTEST_MESSAGE_ macro below. - void operator=(const Message& message) const; - private: - TestPartResultType const type_; - const char* const file_; - int const line_; - String const message_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper); -}; - -} // namespace internal - -#if GTEST_HAS_PARAM_TEST -// The abstract base class that all value-parameterized tests inherit from. -// -// This class adds support for accessing the test parameter value via -// the GetParam() method. -// -// Use it with one of the parameter generator defining functions, like Range(), -// Values(), ValuesIn(), Bool(), and Combine(). -// -// class FooTest : public ::testing::TestWithParam { -// protected: -// FooTest() { -// // Can use GetParam() here. -// } -// virtual ~FooTest() { -// // Can use GetParam() here. -// } -// virtual void SetUp() { -// // Can use GetParam() here. -// } -// virtual void TearDown { -// // Can use GetParam() here. -// } -// }; -// TEST_P(FooTest, DoesBar) { -// // Can use GetParam() method here. -// Foo foo; -// ASSERT_TRUE(foo.DoesBar(GetParam())); -// } -// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10)); - -template -class TestWithParam : public Test { - public: - typedef T ParamType; - - // The current parameter value. Is also available in the test fixture's - // constructor. - const ParamType& GetParam() const { return *parameter_; } - - private: - // Sets parameter value. The caller is responsible for making sure the value - // remains alive and unchanged throughout the current test. - static void SetParam(const ParamType* parameter) { - parameter_ = parameter; - } - - // Static value used for accessing parameter during a test lifetime. - static const ParamType* parameter_; - - // TestClass must be a subclass of TestWithParam. - template friend class internal::ParameterizedTestFactory; -}; - -template -const T* TestWithParam::parameter_ = NULL; - -#endif // GTEST_HAS_PARAM_TEST - -// Macros for indicating success/failure in test code. - -// ADD_FAILURE unconditionally adds a failure to the current test. -// SUCCEED generates a success - it doesn't automatically make the -// current test successful, as a test is only successful when it has -// no failure. -// -// EXPECT_* verifies that a certain condition is satisfied. If not, -// it behaves like ADD_FAILURE. In particular: -// -// EXPECT_TRUE verifies that a Boolean condition is true. -// EXPECT_FALSE verifies that a Boolean condition is false. -// -// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except -// that they will also abort the current function on failure. People -// usually want the fail-fast behavior of FAIL and ASSERT_*, but those -// writing data-driven tests often find themselves using ADD_FAILURE -// and EXPECT_* more. -// -// Examples: -// -// EXPECT_TRUE(server.StatusIsOK()); -// ASSERT_FALSE(server.HasPendingRequest(port)) -// << "There are still pending requests " << "on port " << port; - -// Generates a nonfatal failure with a generic message. -#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed") - -// Generates a fatal failure with a generic message. -#define FAIL() GTEST_FATAL_FAILURE_("Failed") - -// Generates a success with a generic message. -#define SUCCEED() GTEST_SUCCESS_("Succeeded") - -// Macros for testing exceptions. -// -// * {ASSERT|EXPECT}_THROW(statement, expected_exception): -// Tests that the statement throws the expected exception. -// * {ASSERT|EXPECT}_NO_THROW(statement): -// Tests that the statement doesn't throw any exception. -// * {ASSERT|EXPECT}_ANY_THROW(statement): -// Tests that the statement throws an exception. - -#define EXPECT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_) -#define EXPECT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define EXPECT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define ASSERT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_) -#define ASSERT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_) -#define ASSERT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_) - -// Boolean assertions. -#define EXPECT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_NONFATAL_FAILURE_) -#define EXPECT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_NONFATAL_FAILURE_) -#define ASSERT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_FATAL_FAILURE_) -#define ASSERT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_FATAL_FAILURE_) - -// Includes the auto-generated header that implements a family of -// generic predicate assertion macros. -#include - -// Macros for testing equalities and inequalities. -// -// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual -// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2 -// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2 -// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2 -// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2 -// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2 -// -// When they are not, Google Test prints both the tested expressions and -// their actual values. The values must be compatible built-in types, -// or you will get a compiler error. By "compatible" we mean that the -// values can be compared by the respective operator. -// -// Note: -// -// 1. It is possible to make a user-defined type work with -// {ASSERT|EXPECT}_??(), but that requires overloading the -// comparison operators and is thus discouraged by the Google C++ -// Usage Guide. Therefore, you are advised to use the -// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are -// equal. -// -// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on -// pointers (in particular, C strings). Therefore, if you use it -// with two C strings, you are testing how their locations in memory -// are related, not how their content is related. To compare two C -// strings by content, use {ASSERT|EXPECT}_STR*(). -// -// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to -// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you -// what the actual value is when it fails, and similarly for the -// other comparisons. -// -// 4. Do not depend on the order in which {ASSERT|EXPECT}_??() -// evaluate their arguments, which is undefined. -// -// 5. These macros evaluate their arguments exactly once. -// -// Examples: -// -// EXPECT_NE(5, Foo()); -// EXPECT_EQ(NULL, a_pointer); -// ASSERT_LT(i, array_size); -// ASSERT_GT(records.size(), 0) << "There is no record left."; - -#define EXPECT_EQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define EXPECT_NE(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual) -#define EXPECT_LE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define EXPECT_LT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define EXPECT_GE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define EXPECT_GT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -#define ASSERT_EQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define ASSERT_NE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) -#define ASSERT_LE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define ASSERT_LT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define ASSERT_GE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define ASSERT_GT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -// C String Comparisons. All tests treat NULL and any non-NULL string -// as different. Two NULLs are equal. -// -// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2 -// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2 -// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case -// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case -// -// For wide or narrow string objects, you can use the -// {ASSERT|EXPECT}_??() macros. -// -// Don't depend on the order in which the arguments are evaluated, -// which is undefined. -// -// These macros evaluate their arguments exactly once. - -#define EXPECT_STREQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define EXPECT_STRNE(s1, s2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define EXPECT_STRCASEEQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define EXPECT_STRCASENE(s1, s2)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -#define ASSERT_STREQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define ASSERT_STRNE(s1, s2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define ASSERT_STRCASEEQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define ASSERT_STRCASENE(s1, s2)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -// Macros for comparing floating-point numbers. -// -// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual): -// Tests that two float values are almost equal. -// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual): -// Tests that two double values are almost equal. -// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): -// Tests that v1 and v2 are within the given distance to each other. -// -// Google Test uses ULP-based comparison to automatically pick a default -// error bound that is appropriate for the operands. See the -// FloatingPoint template class in gtest-internal.h if you are -// interested in the implementation details. - -#define EXPECT_FLOAT_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_DOUBLE_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_FLOAT_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_DOUBLE_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_NEAR(val1, val2, abs_error)\ - EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -#define ASSERT_NEAR(val1, val2, abs_error)\ - ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -// These predicate format functions work on floating-point values, and -// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g. -// -// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0); - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult FloatLE(const char* expr1, const char* expr2, - float val1, float val2); -AssertionResult DoubleLE(const char* expr1, const char* expr2, - double val1, double val2); - - -#if GTEST_OS_WINDOWS - -// Macros that test for HRESULT failure and success, these are only useful -// on Windows, and rely on Windows SDK macros and APIs to compile. -// -// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr) -// -// When expr unexpectedly fails or succeeds, Google Test prints the -// expected result and the actual result with both a human-readable -// string representation of the error, if available, as well as the -// hex result code. -#define EXPECT_HRESULT_SUCCEEDED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -#define ASSERT_HRESULT_SUCCEEDED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -#define EXPECT_HRESULT_FAILED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -#define ASSERT_HRESULT_FAILED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -#endif // GTEST_OS_WINDOWS - -// Macros that execute statement and check that it doesn't generate new fatal -// failures in the current thread. -// -// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement); -// -// Examples: -// -// EXPECT_NO_FATAL_FAILURE(Process()); -// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed"; -// -#define ASSERT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_) -#define EXPECT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_) - -// Causes a trace (including the source file path, the current line -// number, and the given message) to be included in every test failure -// message generated by code in the current scope. The effect is -// undone when the control leaves the current scope. -// -// The message argument can be anything streamable to std::ostream. -// -// In the implementation, we include the current line number as part -// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s -// to appear in the same block - as long as they are on different -// lines. -#define SCOPED_TRACE(message) \ - ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\ - __FILE__, __LINE__, ::testing::Message() << (message)) - -namespace internal { - -// This template is declared, but intentionally undefined. -template -struct StaticAssertTypeEqHelper; - -template -struct StaticAssertTypeEqHelper {}; - -} // namespace internal - -// Compile-time assertion for type equality. -// StaticAssertTypeEq() compiles iff type1 and type2 are -// the same type. The value it returns is not interesting. -// -// Instead of making StaticAssertTypeEq a class template, we make it a -// function template that invokes a helper class template. This -// prevents a user from misusing StaticAssertTypeEq by -// defining objects of that type. -// -// CAVEAT: -// -// When used inside a method of a class template, -// StaticAssertTypeEq() is effective ONLY IF the method is -// instantiated. For example, given: -// -// template class Foo { -// public: -// void Bar() { testing::StaticAssertTypeEq(); } -// }; -// -// the code: -// -// void Test1() { Foo foo; } -// -// will NOT generate a compiler error, as Foo::Bar() is never -// actually instantiated. Instead, you need: -// -// void Test2() { Foo foo; foo.Bar(); } -// -// to cause a compiler error. -template -bool StaticAssertTypeEq() { - internal::StaticAssertTypeEqHelper(); - return true; -} - -// Defines a test. -// -// The first parameter is the name of the test case, and the second -// parameter is the name of the test within the test case. -// -// The convention is to end the test case name with "Test". For -// example, a test case for the Foo class can be named FooTest. -// -// The user should put his test code between braces after using this -// macro. Example: -// -// TEST(FooTest, InitializesCorrectly) { -// Foo foo; -// EXPECT_TRUE(foo.StatusIsOK()); -// } - -// Note that we call GetTestTypeId() instead of GetTypeId< -// ::testing::Test>() here to get the type ID of testing::Test. This -// is to work around a suspected linker bug when using Google Test as -// a framework on Mac OS X. The bug causes GetTypeId< -// ::testing::Test>() to return different values depending on whether -// the call is from the Google Test framework itself or from user test -// code. GetTestTypeId() is guaranteed to always return the same -// value, as it always calls GetTypeId<>() from the Google Test -// framework. -#define TEST(test_case_name, test_name)\ - GTEST_TEST_(test_case_name, test_name, \ - ::testing::Test, ::testing::internal::GetTestTypeId()) - - -// Defines a test that uses a test fixture. -// -// The first parameter is the name of the test fixture class, which -// also doubles as the test case name. The second parameter is the -// name of the test within the test case. -// -// A test fixture class must be declared earlier. The user should put -// his test code between braces after using this macro. Example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { b_.AddElement(3); } -// -// Foo a_; -// Foo b_; -// }; -// -// TEST_F(FooTest, InitializesCorrectly) { -// EXPECT_TRUE(a_.StatusIsOK()); -// } -// -// TEST_F(FooTest, ReturnsElementCountCorrectly) { -// EXPECT_EQ(0, a_.size()); -// EXPECT_EQ(1, b_.size()); -// } - -#define TEST_F(test_fixture, test_name)\ - GTEST_TEST_(test_fixture, test_name, test_fixture, \ - ::testing::internal::GetTypeId()) - -// Use this macro in main() to run all tests. It returns 0 if all -// tests are successful, or 1 otherwise. -// -// RUN_ALL_TESTS() should be invoked after the command line has been -// parsed by InitGoogleTest(). - -#define RUN_ALL_TESTS()\ - (::testing::UnitTest::GetInstance()->Run()) - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_pred_impl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_pred_impl.h deleted file mode 100644 index e1e2f8c4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_pred_impl.h +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on 10/02/2008 by command -// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! -// -// Implements a family of generic predicate assertion macros. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ - -// This header implements a family of generic predicate assertion -// macros: -// -// ASSERT_PRED_FORMAT1(pred_format, v1) -// ASSERT_PRED_FORMAT2(pred_format, v1, v2) -// ... -// -// where pred_format is a function or functor that takes n (in the -// case of ASSERT_PRED_FORMATn) values and their source expression -// text, and returns a testing::AssertionResult. See the definition -// of ASSERT_EQ in gtest.h for an example. -// -// If you don't care about formatting, you can use the more -// restrictive version: -// -// ASSERT_PRED1(pred, v1) -// ASSERT_PRED2(pred, v1, v2) -// ... -// -// where pred is an n-ary function or functor that returns bool, -// and the values v1, v2, ..., must support the << operator for -// streaming to std::ostream. -// -// We also define the EXPECT_* variations. -// -// For now we only support predicates whose arity is at most 5. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. - -// GTEST_ASSERT_ is the basic statement to which all of the assertions -// in this file reduce. Don't use this in your code. - -#define GTEST_ASSERT_(expression, on_failure) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const ::testing::AssertionResult gtest_ar = (expression)) \ - ; \ - else \ - on_failure(gtest_ar.failure_message()) - - -// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -template -AssertionResult AssertPred1Helper(const char* pred_text, - const char* e1, - Pred pred, - const T1& v1) { - if (pred(v1)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1. -// Don't use this in your code. -#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, v1),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -#define GTEST_PRED1_(pred, v1, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \ - #v1, \ - pred, \ - v1), on_failure) - -// Unary predicate assertion macros. -#define EXPECT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -template -AssertionResult AssertPred2Helper(const char* pred_text, - const char* e1, - const char* e2, - Pred pred, - const T1& v1, - const T2& v2) { - if (pred(v1, v2)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2. -// Don't use this in your code. -#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -#define GTEST_PRED2_(pred, v1, v2, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \ - #v1, \ - #v2, \ - pred, \ - v1, \ - v2), on_failure) - -// Binary predicate assertion macros. -#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -template -AssertionResult AssertPred3Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3) { - if (pred(v1, v2, v3)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3. -// Don't use this in your code. -#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - pred, \ - v1, \ - v2, \ - v3), on_failure) - -// Ternary predicate assertion macros. -#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -template -AssertionResult AssertPred4Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - if (pred(v1, v2, v3, v4)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4. -// Don't use this in your code. -#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4), on_failure) - -// 4-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -template -AssertionResult AssertPred5Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ", " - << e5 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4 - << "\n" << e5 << " evaluates to " << v5; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5. -// Don't use this in your code. -#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - #v5, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5), on_failure) - -// 5-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) - - - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_prod.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_prod.h deleted file mode 100644 index da80ddc6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/gtest_prod.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Google C++ Testing Framework definitions useful in production code. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ - -// When you need to test the private or protected members of a class, -// use the FRIEND_TEST macro to declare your tests as friends of the -// class. For example: -// -// class MyClass { -// private: -// void MyMethod(); -// FRIEND_TEST(MyClassTest, MyMethod); -// }; -// -// class MyClassTest : public testing::Test { -// // ... -// }; -// -// TEST_F(MyClassTest, MyMethod) { -// // Can call MyClass::MyMethod() here. -// } - -#define FRIEND_TEST(test_case_name, test_name)\ -friend class test_case_name##_##test_name##_Test - -#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-death-test-internal.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-death-test-internal.h deleted file mode 100644 index 143e58a9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-death-test-internal.h +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines internal utilities needed for implementing -// death tests. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ - -#include - -namespace testing { -namespace internal { - -GTEST_DECLARE_string_(internal_run_death_test); - -// Names of the flags (needed for parsing Google Test flags). -const char kDeathTestStyleFlag[] = "death_test_style"; -const char kDeathTestUseFork[] = "death_test_use_fork"; -const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; - -#if GTEST_HAS_DEATH_TEST - -// DeathTest is a class that hides much of the complexity of the -// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method -// returns a concrete class that depends on the prevailing death test -// style, as defined by the --gtest_death_test_style and/or -// --gtest_internal_run_death_test flags. - -// In describing the results of death tests, these terms are used with -// the corresponding definitions: -// -// exit status: The integer exit information in the format specified -// by wait(2) -// exit code: The integer code passed to exit(3), _exit(2), or -// returned from main() -class DeathTest { - public: - // Create returns false if there was an error determining the - // appropriate action to take for the current death test; for example, - // if the gtest_death_test_style flag is set to an invalid value. - // The LastMessage method will return a more detailed message in that - // case. Otherwise, the DeathTest pointer pointed to by the "test" - // argument is set. If the death test should be skipped, the pointer - // is set to NULL; otherwise, it is set to the address of a new concrete - // DeathTest object that controls the execution of the current test. - static bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); - DeathTest(); - virtual ~DeathTest() { } - - // A helper class that aborts a death test when it's deleted. - class ReturnSentinel { - public: - explicit ReturnSentinel(DeathTest* test) : test_(test) { } - ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); } - private: - DeathTest* const test_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel); - } GTEST_ATTRIBUTE_UNUSED_; - - // An enumeration of possible roles that may be taken when a death - // test is encountered. EXECUTE means that the death test logic should - // be executed immediately. OVERSEE means that the program should prepare - // the appropriate environment for a child process to execute the death - // test, then wait for it to complete. - enum TestRole { OVERSEE_TEST, EXECUTE_TEST }; - - // An enumeration of the two reasons that a test might be aborted. - enum AbortReason { TEST_ENCOUNTERED_RETURN_STATEMENT, TEST_DID_NOT_DIE }; - - // Assumes one of the above roles. - virtual TestRole AssumeRole() = 0; - - // Waits for the death test to finish and returns its status. - virtual int Wait() = 0; - - // Returns true if the death test passed; that is, the test process - // exited during the test, its exit status matches a user-supplied - // predicate, and its stderr output matches a user-supplied regular - // expression. - // The user-supplied predicate may be a macro expression rather - // than a function pointer or functor, or else Wait and Passed could - // be combined. - virtual bool Passed(bool exit_status_ok) = 0; - - // Signals that the death test did not die as expected. - virtual void Abort(AbortReason reason) = 0; - - // Returns a human-readable outcome message regarding the outcome of - // the last death test. - static const char* LastMessage(); - - static void set_last_death_test_message(const String& message); - - private: - // A string containing a description of the outcome of the last death test. - static String last_death_test_message_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); -}; - -// Factory interface for death tests. May be mocked out for testing. -class DeathTestFactory { - public: - virtual ~DeathTestFactory() { } - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test) = 0; -}; - -// A concrete DeathTestFactory implementation for normal use. -class DefaultDeathTestFactory : public DeathTestFactory { - public: - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); -}; - -// Returns true if exit_status describes a process that was terminated -// by a signal, or exited normally with a nonzero exit code. -bool ExitedUnsuccessfully(int exit_status); - -// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*, -// ASSERT_EXIT*, and EXPECT_EXIT*. -#define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (true) { \ - const ::testing::internal::RE& gtest_regex = (regex); \ - ::testing::internal::DeathTest* gtest_dt; \ - if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \ - __FILE__, __LINE__, >est_dt)) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - if (gtest_dt != NULL) { \ - ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \ - gtest_dt_ptr(gtest_dt); \ - switch (gtest_dt->AssumeRole()) { \ - case ::testing::internal::DeathTest::OVERSEE_TEST: \ - if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - break; \ - case ::testing::internal::DeathTest::EXECUTE_TEST: { \ - ::testing::internal::DeathTest::ReturnSentinel \ - gtest_sentinel(gtest_dt); \ - GTEST_HIDE_UNREACHABLE_CODE_(statement); \ - gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ - break; \ - } \ - } \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \ - fail(::testing::internal::DeathTest::LastMessage()) -// The symbol "fail" here expands to something into which a message -// can be streamed. - -// A class representing the parsed contents of the -// --gtest_internal_run_death_test flag, as it existed when -// RUN_ALL_TESTS was called. -class InternalRunDeathTestFlag { - public: - InternalRunDeathTestFlag(const String& file, - int line, - int index, - int write_fd) - : file_(file), line_(line), index_(index), write_fd_(write_fd) {} - - ~InternalRunDeathTestFlag() { - if (write_fd_ >= 0) - posix::Close(write_fd_); - } - - String file() const { return file_; } - int line() const { return line_; } - int index() const { return index_; } - int write_fd() const { return write_fd_; } - - private: - String file_; - int line_; - int index_; - int write_fd_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag); -}; - -// Returns a newly created InternalRunDeathTestFlag object with fields -// initialized from the GTEST_FLAG(internal_run_death_test) flag if -// the flag is specified; otherwise returns NULL. -InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); - -#endif // GTEST_HAS_DEATH_TEST - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-filepath.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-filepath.h deleted file mode 100644 index 1b2f5869..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-filepath.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// Google Test filepath utilities -// -// This header file declares classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included in . -// Do not include this header file separately! - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ - -#include - -namespace testing { -namespace internal { - -// FilePath - a class for file and directory pathname manipulation which -// handles platform-specific conventions (like the pathname separator). -// Used for helper functions for naming files in a directory for xml output. -// Except for Set methods, all methods are const or static, which provides an -// "immutable value object" -- useful for peace of mind. -// A FilePath with a value ending in a path separator ("like/this/") represents -// a directory, otherwise it is assumed to represent a file. In either case, -// it may or may not represent an actual file or directory in the file system. -// Names are NOT checked for syntax correctness -- no checking for illegal -// characters, malformed paths, etc. - -class FilePath { - public: - FilePath() : pathname_("") { } - FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } - - explicit FilePath(const char* pathname) : pathname_(pathname) { - Normalize(); - } - - explicit FilePath(const String& pathname) : pathname_(pathname) { - Normalize(); - } - - FilePath& operator=(const FilePath& rhs) { - Set(rhs); - return *this; - } - - void Set(const FilePath& rhs) { - pathname_ = rhs.pathname_; - } - - String ToString() const { return pathname_; } - const char* c_str() const { return pathname_.c_str(); } - - // Returns the current working directory, or "" if unsuccessful. - static FilePath GetCurrentDir(); - - // Given directory = "dir", base_name = "test", number = 0, - // extension = "xml", returns "dir/test.xml". If number is greater - // than zero (e.g., 12), returns "dir/test_12.xml". - // On Windows platform, uses \ as the separator rather than /. - static FilePath MakeFileName(const FilePath& directory, - const FilePath& base_name, - int number, - const char* extension); - - // Given directory = "dir", relative_path = "test.xml", - // returns "dir/test.xml". - // On Windows, uses \ as the separator rather than /. - static FilePath ConcatPaths(const FilePath& directory, - const FilePath& relative_path); - - // Returns a pathname for a file that does not currently exist. The pathname - // will be directory/base_name.extension or - // directory/base_name_.extension if directory/base_name.extension - // already exists. The number will be incremented until a pathname is found - // that does not already exist. - // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. - // There could be a race condition if two or more processes are calling this - // function at the same time -- they could both pick the same filename. - static FilePath GenerateUniqueFileName(const FilePath& directory, - const FilePath& base_name, - const char* extension); - - // Returns true iff the path is NULL or "". - bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; } - - // If input name has a trailing separator character, removes it and returns - // the name, otherwise return the name string unmodified. - // On Windows platform, uses \ as the separator, other platforms use /. - FilePath RemoveTrailingPathSeparator() const; - - // Returns a copy of the FilePath with the directory part removed. - // Example: FilePath("path/to/file").RemoveDirectoryName() returns - // FilePath("file"). If there is no directory part ("just_a_file"), it returns - // the FilePath unmodified. If there is no file part ("just_a_dir/") it - // returns an empty FilePath (""). - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveDirectoryName() const; - - // RemoveFileName returns the directory path with the filename removed. - // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". - // If the FilePath is "a_file" or "/a_file", RemoveFileName returns - // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does - // not have a file, like "just/a/dir/", it returns the FilePath unmodified. - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveFileName() const; - - // Returns a copy of the FilePath with the case-insensitive extension removed. - // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns - // FilePath("dir/file"). If a case-insensitive extension is not - // found, returns a copy of the original FilePath. - FilePath RemoveExtension(const char* extension) const; - - // Creates directories so that path exists. Returns true if successful or if - // the directories already exist; returns false if unable to create - // directories for any reason. Will also return false if the FilePath does - // not represent a directory (that is, it doesn't end with a path separator). - bool CreateDirectoriesRecursively() const; - - // Create the directory so that path exists. Returns true if successful or - // if the directory already exists; returns false if unable to create the - // directory for any reason, including if the parent directory does not - // exist. Not named "CreateDirectory" because that's a macro on Windows. - bool CreateFolder() const; - - // Returns true if FilePath describes something in the file-system, - // either a file, directory, or whatever, and that something exists. - bool FileOrDirectoryExists() const; - - // Returns true if pathname describes a directory in the file-system - // that exists. - bool DirectoryExists() const; - - // Returns true if FilePath ends with a path separator, which indicates that - // it is intended to represent a directory. Returns false otherwise. - // This does NOT check that a directory (or file) actually exists. - bool IsDirectory() const; - - // Returns true if pathname describes a root directory. (Windows has one - // root directory per disk drive.) - bool IsRootDirectory() const; - - // Returns true if pathname describes an absolute path. - bool IsAbsolutePath() const; - - private: - // Replaces multiple consecutive separators with a single separator. - // For example, "bar///foo" becomes "bar/foo". Does not eliminate other - // redundancies that might be in a pathname involving "." or "..". - // - // A pathname with multiple consecutive separators may occur either through - // user error or as a result of some scripts or APIs that generate a pathname - // with a trailing separator. On other platforms the same API or script - // may NOT generate a pathname with a trailing "/". Then elsewhere that - // pathname may have another "/" and pathname components added to it, - // without checking for the separator already being there. - // The script language and operating system may allow paths like "foo//bar" - // but some of the functions in FilePath will not handle that correctly. In - // particular, RemoveTrailingPathSeparator() only removes one separator, and - // it is called in CreateDirectoriesRecursively() assuming that it will change - // a pathname from directory syntax (trailing separator) to filename syntax. - - void Normalize(); - - String pathname_; -}; // class FilePath - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-internal.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-internal.h deleted file mode 100644 index d596b3a6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-internal.h +++ /dev/null @@ -1,890 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares functions and macros used internally by -// Google Test. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ - -#include - -#if GTEST_OS_LINUX -#include -#include -#include -#include -#endif // GTEST_OS_LINUX - -#include -#include -#include -#include -#include - -#include -#include -#include - -// Due to C++ preprocessor weirdness, we need double indirection to -// concatenate two tokens when one of them is __LINE__. Writing -// -// foo ## __LINE__ -// -// will result in the token foo__LINE__, instead of foo followed by -// the current line number. For more details, see -// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 -#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) -#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar - -// Google Test defines the testing::Message class to allow construction of -// test messages via the << operator. The idea is that anything -// streamable to std::ostream can be streamed to a testing::Message. -// This allows a user to use his own types in Google Test assertions by -// overloading the << operator. -// -// util/gtl/stl_logging-inl.h overloads << for STL containers. These -// overloads cannot be defined in the std namespace, as that will be -// undefined behavior. Therefore, they are defined in the global -// namespace instead. -// -// C++'s symbol lookup rule (i.e. Koenig lookup) says that these -// overloads are visible in either the std namespace or the global -// namespace, but not other namespaces, including the testing -// namespace which Google Test's Message class is in. -// -// To allow STL containers (and other types that has a << operator -// defined in the global namespace) to be used in Google Test assertions, -// testing::Message must access the custom << operator from the global -// namespace. Hence this helper function. -// -// Note: Jeffrey Yasskin suggested an alternative fix by "using -// ::operator<<;" in the definition of Message's operator<<. That fix -// doesn't require a helper function, but unfortunately doesn't -// compile with MSVC. -template -inline void GTestStreamToHelper(std::ostream* os, const T& val) { - *os << val; -} - -namespace testing { - -// Forward declaration of classes. - -class Message; // Represents a failure message. -class Test; // Represents a test. -class TestCase; // A collection of related tests. -class TestPartResult; // Result of a test part. -class TestInfo; // Information about a test. -class UnitTest; // A collection of test cases. -class UnitTestEventListenerInterface; // Listens to Google Test events. -class AssertionResult; // Result of an assertion. - -namespace internal { - -struct TraceInfo; // Information about a trace point. -class ScopedTrace; // Implements scoped trace. -class TestInfoImpl; // Opaque implementation of TestInfo -class TestResult; // Result of a single Test. -class UnitTestImpl; // Opaque implementation of UnitTest - -template class List; // A generic list. -template class ListNode; // A node in a generic list. - -// How many times InitGoogleTest() has been called. -extern int g_init_gtest_count; - -// The text used in failure messages to indicate the start of the -// stack trace. -extern const char kStackTraceMarker[]; - -// A secret type that Google Test users don't know about. It has no -// definition on purpose. Therefore it's impossible to create a -// Secret object, which is what we want. -class Secret; - -// Two overloaded helpers for checking at compile time whether an -// expression is a null pointer literal (i.e. NULL or any 0-valued -// compile-time integral constant). Their return values have -// different sizes, so we can use sizeof() to test which version is -// picked by the compiler. These helpers have no implementations, as -// we only need their signatures. -// -// Given IsNullLiteralHelper(x), the compiler will pick the first -// version if x can be implicitly converted to Secret*, and pick the -// second version otherwise. Since Secret is a secret and incomplete -// type, the only expression a user can write that has type Secret* is -// a null pointer literal. Therefore, we know that x is a null -// pointer literal if and only if the first version is picked by the -// compiler. -char IsNullLiteralHelper(Secret* p); -char (&IsNullLiteralHelper(...))[2]; // NOLINT - -// A compile-time bool constant that is true if and only if x is a -// null pointer literal (i.e. NULL or any 0-valued compile-time -// integral constant). -#ifdef GTEST_ELLIPSIS_NEEDS_COPY_ -// Passing non-POD classes through ellipsis (...) crashes the ARM -// compiler. The Nokia Symbian and the IBM XL C/C++ compiler try to -// instantiate a copy constructor for objects passed through ellipsis -// (...), failing for uncopyable objects. Hence we define this to -// false (and lose support for NULL detection). -#define GTEST_IS_NULL_LITERAL_(x) false -#else -#define GTEST_IS_NULL_LITERAL_(x) \ - (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1) -#endif // GTEST_ELLIPSIS_NEEDS_COPY_ - -// Appends the user-supplied message to the Google-Test-generated message. -String AppendUserMessage(const String& gtest_msg, - const Message& user_msg); - -// A helper class for creating scoped traces in user programs. -class ScopedTrace { - public: - // The c'tor pushes the given source file location and message onto - // a trace stack maintained by Google Test. - ScopedTrace(const char* file, int line, const Message& message); - - // The d'tor pops the info pushed by the c'tor. - // - // Note that the d'tor is not virtual in order to be efficient. - // Don't inherit from ScopedTrace! - ~ScopedTrace(); - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace); -} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its - // c'tor and d'tor. Therefore it doesn't - // need to be used otherwise. - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". -// Declared here but defined in gtest.h, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable); - -// Formats a value to be used in a failure message. - -#ifdef GTEST_NEEDS_IS_POINTER_ - -// These are needed as the Nokia Symbian and IBM XL C/C++ compilers -// cannot decide between const T& and const T* in a function template. -// These compilers _can_ decide between class template specializations -// for T and T*, so a tr1::type_traits-like is_pointer works, and we -// can overload on that. - -// This overload makes sure that all pointers (including -// those to char or wchar_t) are printed as raw pointers. -template -inline String FormatValueForFailureMessage(internal::true_type dummy, - T* pointer) { - return StreamableToString(static_cast(pointer)); -} - -template -inline String FormatValueForFailureMessage(internal::false_type dummy, - const T& value) { - return StreamableToString(value); -} - -template -inline String FormatForFailureMessage(const T& value) { - return FormatValueForFailureMessage( - typename internal::is_pointer::type(), value); -} - -#else - -// These are needed as the above solution using is_pointer has the -// limitation that T cannot be a type without external linkage, when -// compiled using MSVC. - -template -inline String FormatForFailureMessage(const T& value) { - return StreamableToString(value); -} - -// This overload makes sure that all pointers (including -// those to char or wchar_t) are printed as raw pointers. -template -inline String FormatForFailureMessage(T* pointer) { - return StreamableToString(static_cast(pointer)); -} - -#endif // GTEST_NEEDS_IS_POINTER_ - -// These overloaded versions handle narrow and wide characters. -String FormatForFailureMessage(char ch); -String FormatForFailureMessage(wchar_t wchar); - -// When this operand is a const char* or char*, and the other operand -// is a ::std::string or ::string, we print this operand as a C string -// rather than a pointer. We do the same for wide strings. - -// This internal macro is used to avoid duplicated code. -#define GTEST_FORMAT_IMPL_(operand2_type, operand1_printer)\ -inline String FormatForComparisonFailureMessage(\ - operand2_type::value_type* str, const operand2_type& /*operand2*/) {\ - return operand1_printer(str);\ -}\ -inline String FormatForComparisonFailureMessage(\ - const operand2_type::value_type* str, const operand2_type& /*operand2*/) {\ - return operand1_printer(str);\ -} - -#if GTEST_HAS_STD_STRING -GTEST_FORMAT_IMPL_(::std::string, String::ShowCStringQuoted) -#endif // GTEST_HAS_STD_STRING -#if GTEST_HAS_STD_WSTRING -GTEST_FORMAT_IMPL_(::std::wstring, String::ShowWideCStringQuoted) -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_STRING -GTEST_FORMAT_IMPL_(::string, String::ShowCStringQuoted) -#endif // GTEST_HAS_GLOBAL_STRING -#if GTEST_HAS_GLOBAL_WSTRING -GTEST_FORMAT_IMPL_(::wstring, String::ShowWideCStringQuoted) -#endif // GTEST_HAS_GLOBAL_WSTRING - -#undef GTEST_FORMAT_IMPL_ - -// Constructs and returns the message for an equality assertion -// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. -// -// The first four parameters are the expressions used in the assertion -// and their values, as strings. For example, for ASSERT_EQ(foo, bar) -// where foo is 5 and bar is 6, we have: -// -// expected_expression: "foo" -// actual_expression: "bar" -// expected_value: "5" -// actual_value: "6" -// -// The ignoring_case parameter is true iff the assertion is a -// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will -// be inserted into the message. -AssertionResult EqFailure(const char* expected_expression, - const char* actual_expression, - const String& expected_value, - const String& actual_value, - bool ignoring_case); - - -// This template class represents an IEEE floating-point number -// (either single-precision or double-precision, depending on the -// template parameters). -// -// The purpose of this class is to do more sophisticated number -// comparison. (Due to round-off error, etc, it's very unlikely that -// two floating-points will be equal exactly. Hence a naive -// comparison by the == operation often doesn't work.) -// -// Format of IEEE floating-point: -// -// The most-significant bit being the leftmost, an IEEE -// floating-point looks like -// -// sign_bit exponent_bits fraction_bits -// -// Here, sign_bit is a single bit that designates the sign of the -// number. -// -// For float, there are 8 exponent bits and 23 fraction bits. -// -// For double, there are 11 exponent bits and 52 fraction bits. -// -// More details can be found at -// http://en.wikipedia.org/wiki/IEEE_floating-point_standard. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -template -class FloatingPoint { - public: - // Defines the unsigned integer type that has the same size as the - // floating point number. - typedef typename TypeWithSize::UInt Bits; - - // Constants. - - // # of bits in a number. - static const size_t kBitCount = 8*sizeof(RawType); - - // # of fraction bits in a number. - static const size_t kFractionBitCount = - std::numeric_limits::digits - 1; - - // # of exponent bits in a number. - static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount; - - // The mask for the sign bit. - static const Bits kSignBitMask = static_cast(1) << (kBitCount - 1); - - // The mask for the fraction bits. - static const Bits kFractionBitMask = - ~static_cast(0) >> (kExponentBitCount + 1); - - // The mask for the exponent bits. - static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask); - - // How many ULP's (Units in the Last Place) we want to tolerate when - // comparing two numbers. The larger the value, the more error we - // allow. A 0 value means that two numbers must be exactly the same - // to be considered equal. - // - // The maximum error of a single floating-point operation is 0.5 - // units in the last place. On Intel CPU's, all floating-point - // calculations are done with 80-bit precision, while double has 64 - // bits. Therefore, 4 should be enough for ordinary use. - // - // See the following article for more details on ULP: - // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm. - static const size_t kMaxUlps = 4; - - // Constructs a FloatingPoint from a raw floating-point number. - // - // On an Intel CPU, passing a non-normalized NAN (Not a Number) - // around may change its bits, although the new value is guaranteed - // to be also a NAN. Therefore, don't expect this constructor to - // preserve the bits in x when x is a NAN. - explicit FloatingPoint(const RawType& x) { u_.value_ = x; } - - // Static methods - - // Reinterprets a bit pattern as a floating-point number. - // - // This function is needed to test the AlmostEquals() method. - static RawType ReinterpretBits(const Bits bits) { - FloatingPoint fp(0); - fp.u_.bits_ = bits; - return fp.u_.value_; - } - - // Returns the floating-point number that represent positive infinity. - static RawType Infinity() { - return ReinterpretBits(kExponentBitMask); - } - - // Non-static methods - - // Returns the bits that represents this number. - const Bits &bits() const { return u_.bits_; } - - // Returns the exponent bits of this number. - Bits exponent_bits() const { return kExponentBitMask & u_.bits_; } - - // Returns the fraction bits of this number. - Bits fraction_bits() const { return kFractionBitMask & u_.bits_; } - - // Returns the sign bit of this number. - Bits sign_bit() const { return kSignBitMask & u_.bits_; } - - // Returns true iff this is NAN (not a number). - bool is_nan() const { - // It's a NAN if the exponent bits are all ones and the fraction - // bits are not entirely zeros. - return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); - } - - // Returns true iff this number is at most kMaxUlps ULP's away from - // rhs. In particular, this function: - // - // - returns false if either number is (or both are) NAN. - // - treats really large numbers as almost equal to infinity. - // - thinks +0.0 and -0.0 are 0 DLP's apart. - bool AlmostEquals(const FloatingPoint& rhs) const { - // The IEEE standard says that any comparison operation involving - // a NAN must return false. - if (is_nan() || rhs.is_nan()) return false; - - return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) - <= kMaxUlps; - } - - private: - // The data type used to store the actual floating-point number. - union FloatingPointUnion { - RawType value_; // The raw floating-point number. - Bits bits_; // The bits that represent the number. - }; - - // Converts an integer from the sign-and-magnitude representation to - // the biased representation. More precisely, let N be 2 to the - // power of (kBitCount - 1), an integer x is represented by the - // unsigned number x + N. - // - // For instance, - // - // -N + 1 (the most negative number representable using - // sign-and-magnitude) is represented by 1; - // 0 is represented by N; and - // N - 1 (the biggest number representable using - // sign-and-magnitude) is represented by 2N - 1. - // - // Read http://en.wikipedia.org/wiki/Signed_number_representations - // for more details on signed number representations. - static Bits SignAndMagnitudeToBiased(const Bits &sam) { - if (kSignBitMask & sam) { - // sam represents a negative number. - return ~sam + 1; - } else { - // sam represents a positive number. - return kSignBitMask | sam; - } - } - - // Given two numbers in the sign-and-magnitude representation, - // returns the distance between them as an unsigned number. - static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, - const Bits &sam2) { - const Bits biased1 = SignAndMagnitudeToBiased(sam1); - const Bits biased2 = SignAndMagnitudeToBiased(sam2); - return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1); - } - - FloatingPointUnion u_; -}; - -// Typedefs the instances of the FloatingPoint template class that we -// care to use. -typedef FloatingPoint Float; -typedef FloatingPoint Double; - -// In order to catch the mistake of putting tests that use different -// test fixture classes in the same test case, we need to assign -// unique IDs to fixture classes and compare them. The TypeId type is -// used to hold such IDs. The user should treat TypeId as an opaque -// type: the only operation allowed on TypeId values is to compare -// them for equality using the == operator. -typedef const void* TypeId; - -template -class TypeIdHelper { - public: - // dummy_ must not have a const type. Otherwise an overly eager - // compiler (e.g. MSVC 7.1 & 8.0) may try to merge - // TypeIdHelper::dummy_ for different Ts as an "optimization". - static bool dummy_; -}; - -template -bool TypeIdHelper::dummy_ = false; - -// GetTypeId() returns the ID of type T. Different values will be -// returned for different types. Calling the function twice with the -// same type argument is guaranteed to return the same ID. -template -TypeId GetTypeId() { - // The compiler is required to allocate a different - // TypeIdHelper::dummy_ variable for each T used to instantiate - // the template. Therefore, the address of dummy_ is guaranteed to - // be unique. - return &(TypeIdHelper::dummy_); -} - -// Returns the type ID of ::testing::Test. Always call this instead -// of GetTypeId< ::testing::Test>() to get the type ID of -// ::testing::Test, as the latter may give the wrong result due to a -// suspected linker bug when compiling Google Test as a Mac OS X -// framework. -TypeId GetTestTypeId(); - -// Defines the abstract factory interface that creates instances -// of a Test object. -class TestFactoryBase { - public: - virtual ~TestFactoryBase() {} - - // Creates a test instance to run. The instance is both created and destroyed - // within TestInfoImpl::Run() - virtual Test* CreateTest() = 0; - - protected: - TestFactoryBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); -}; - -// This class provides implementation of TeastFactoryBase interface. -// It is used in TEST and TEST_F macros. -template -class TestFactoryImpl : public TestFactoryBase { - public: - virtual Test* CreateTest() { return new TestClass; } -}; - -#if GTEST_OS_WINDOWS - -// Predicate-formatters for implementing the HRESULT checking macros -// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED} -// We pass a long instead of HRESULT to avoid causing an -// include dependency for the HRESULT type. -AssertionResult IsHRESULTSuccess(const char* expr, long hr); // NOLINT -AssertionResult IsHRESULTFailure(const char* expr, long hr); // NOLINT - -#endif // GTEST_OS_WINDOWS - -// Formats a source file path and a line number as they would appear -// in a compiler error message. -inline String FormatFileLocation(const char* file, int line) { - const char* const file_name = file == NULL ? "unknown file" : file; - if (line < 0) { - return String::Format("%s:", file_name); - } -#ifdef _MSC_VER - return String::Format("%s(%d):", file_name, line); -#else - return String::Format("%s:%d:", file_name, line); -#endif // _MSC_VER -} - -// Types of SetUpTestCase() and TearDownTestCase() functions. -typedef void (*SetUpTestCaseFunc)(); -typedef void (*TearDownTestCaseFunc)(); - -// Creates a new TestInfo object and registers it with Google Test; -// returns the created object. -// -// Arguments: -// -// test_case_name: name of the test case -// name: name of the test -// test_case_comment: a comment on the test case that will be included in -// the test output -// comment: a comment on the test that will be included in the -// test output -// fixture_class_id: ID of the test fixture class -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -// factory: pointer to the factory that creates a test object. -// The newly created TestInfo instance will assume -// ownership of the factory object. -TestInfo* MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - TypeId fixture_class_id, - SetUpTestCaseFunc set_up_tc, - TearDownTestCaseFunc tear_down_tc, - TestFactoryBase* factory); - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// State of the definition of a type-parameterized test case. -class TypedTestCasePState { - public: - TypedTestCasePState() : registered_(false) {} - - // Adds the given test name to defined_test_names_ and return true - // if the test case hasn't been registered; otherwise aborts the - // program. - bool AddTestName(const char* file, int line, const char* case_name, - const char* test_name) { - if (registered_) { - fprintf(stderr, "%s Test %s must be defined before " - "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n", - FormatFileLocation(file, line).c_str(), test_name, case_name); - fflush(stderr); - abort(); - } - defined_test_names_.insert(test_name); - return true; - } - - // Verifies that registered_tests match the test names in - // defined_test_names_; returns registered_tests if successful, or - // aborts the program otherwise. - const char* VerifyRegisteredTestNames( - const char* file, int line, const char* registered_tests); - - private: - bool registered_; - ::std::set defined_test_names_; -}; - -// Skips to the first non-space char after the first comma in 'str'; -// returns NULL if no comma is found in 'str'. -inline const char* SkipComma(const char* str) { - const char* comma = strchr(str, ','); - if (comma == NULL) { - return NULL; - } - while (isspace(*(++comma))) {} - return comma; -} - -// Returns the prefix of 'str' before the first comma in it; returns -// the entire string if it contains no comma. -inline String GetPrefixUntilComma(const char* str) { - const char* comma = strchr(str, ','); - return comma == NULL ? String(str) : String(str, comma - str); -} - -// TypeParameterizedTest::Register() -// registers a list of type-parameterized tests with Google Test. The -// return value is insignificant - we just need to return something -// such that we can call this function in a namespace scope. -// -// Implementation note: The GTEST_TEMPLATE_ macro declares a template -// template parameter. It's defined in gtest-type-util.h. -template -class TypeParameterizedTest { - public: - // 'index' is the index of the test in the type list 'Types' - // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase, - // Types). Valid values for 'index' are [0, N - 1] where N is the - // length of Types. - static bool Register(const char* prefix, const char* case_name, - const char* test_names, int index) { - typedef typename Types::Head Type; - typedef Fixture FixtureClass; - typedef typename GTEST_BIND_(TestSel, Type) TestClass; - - // First, registers the first type-parameterized test in the type - // list. - MakeAndRegisterTestInfo( - String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/", - case_name, index).c_str(), - GetPrefixUntilComma(test_names).c_str(), - String::Format("TypeParam = %s", GetTypeName().c_str()).c_str(), - "", - GetTypeId(), - TestClass::SetUpTestCase, - TestClass::TearDownTestCase, - new TestFactoryImpl); - - // Next, recurses (at compile time) with the tail of the type list. - return TypeParameterizedTest - ::Register(prefix, case_name, test_names, index + 1); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTest { - public: - static bool Register(const char* /*prefix*/, const char* /*case_name*/, - const char* /*test_names*/, int /*index*/) { - return true; - } -}; - -// TypeParameterizedTestCase::Register() -// registers *all combinations* of 'Tests' and 'Types' with Google -// Test. The return value is insignificant - we just need to return -// something such that we can call this function in a namespace scope. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* prefix, const char* case_name, - const char* test_names) { - typedef typename Tests::Head Head; - - // First, register the first test in 'Test' for each type in 'Types'. - TypeParameterizedTest::Register( - prefix, case_name, test_names, 0); - - // Next, recurses (at compile time) with the tail of the test list. - return TypeParameterizedTestCase - ::Register(prefix, case_name, SkipComma(test_names)); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* prefix, const char* case_name, - const char* test_names) { - return true; - } -}; - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in -// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, int skip_count); - -// Returns the number of failed test parts in the given test result object. -int GetFailedPartCount(const TestResult* result); - -// A helper for suppressing warnings on unreachable code in some macros. -bool AlwaysTrue(); - -} // namespace internal -} // namespace testing - -#define GTEST_MESSAGE_(message, result_type) \ - ::testing::internal::AssertHelper(result_type, __FILE__, __LINE__, message) \ - = ::testing::Message() - -#define GTEST_FATAL_FAILURE_(message) \ - return GTEST_MESSAGE_(message, ::testing::TPRT_FATAL_FAILURE) - -#define GTEST_NONFATAL_FAILURE_(message) \ - GTEST_MESSAGE_(message, ::testing::TPRT_NONFATAL_FAILURE) - -#define GTEST_SUCCESS_(message) \ - GTEST_MESSAGE_(message, ::testing::TPRT_SUCCESS) - -// Suppresses MSVC warnings 4072 (unreachable code) for the code following -// statement if it returns or throws (or doesn't return or throw in some -// situations). -#define GTEST_HIDE_UNREACHABLE_CODE_(statement) \ - if (::testing::internal::AlwaysTrue()) { statement; } - -#define GTEST_TEST_THROW_(statement, expected_exception, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - bool gtest_caught_expected = false; \ - try { \ - GTEST_HIDE_UNREACHABLE_CODE_(statement); \ - } \ - catch (expected_exception const&) { \ - gtest_caught_expected = true; \ - } \ - catch (...) { \ - gtest_msg = "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws a different " \ - "type."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - if (!gtest_caught_expected) { \ - gtest_msg = "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws nothing."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \ - fail(gtest_msg) - -#define GTEST_TEST_NO_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - try { \ - GTEST_HIDE_UNREACHABLE_CODE_(statement); \ - } \ - catch (...) { \ - gtest_msg = "Expected: " #statement " doesn't throw an exception.\n" \ - " Actual: it throws."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \ - fail(gtest_msg) - -#define GTEST_TEST_ANY_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - bool gtest_caught_any = false; \ - try { \ - GTEST_HIDE_UNREACHABLE_CODE_(statement); \ - } \ - catch (...) { \ - gtest_caught_any = true; \ - } \ - if (!gtest_caught_any) { \ - gtest_msg = "Expected: " #statement " throws an exception.\n" \ - " Actual: it doesn't."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \ - fail(gtest_msg) - - -#define GTEST_TEST_BOOLEAN_(boolexpr, booltext, actual, expected, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (boolexpr) \ - ; \ - else \ - fail("Value of: " booltext "\n Actual: " #actual "\nExpected: " #expected) - -#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ - GTEST_HIDE_UNREACHABLE_CODE_(statement); \ - if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ - gtest_msg = "Expected: " #statement " doesn't generate new fatal " \ - "failures in the current thread.\n" \ - " Actual: it does."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \ - fail(gtest_msg) - -// Expands to the name of the class that implements the given test. -#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - test_case_name##_##test_name##_Test - -// Helper macro for defining tests. -#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\ -class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\ - public:\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\ - private:\ - virtual void TestBody();\ - static ::testing::TestInfo* const test_info_;\ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\ -};\ -\ -::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\ - ::test_info_ =\ - ::testing::internal::MakeAndRegisterTestInfo(\ - #test_case_name, #test_name, "", "", \ - (parent_id), \ - parent_class::SetUpTestCase, \ - parent_class::TearDownTestCase, \ - new ::testing::internal::TestFactoryImpl<\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ -void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-linked_ptr.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-linked_ptr.h deleted file mode 100644 index f98af0b1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-linked_ptr.h +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2003 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). -// -// Bill Gibbons suggested we use something like this. -// -// Thread Safety: -// Unlike other linked_ptr implementations, in this implementation -// a linked_ptr object is thread-safe in the sense that: -// - it's safe to copy linked_ptr objects concurrently, -// - it's safe to copy *from* a linked_ptr and read its underlying -// raw pointer (e.g. via get()) concurrently, and -// - it's safe to write to two linked_ptrs that point to the same -// shared object concurrently. -// TODO(wan@google.com): rename this to safe_linked_ptr to avoid -// confusion with normal linked_ptr. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ - -#include -#include - -#include - -namespace testing { -namespace internal { - -// Protects copying of all linked_ptr objects. -extern Mutex g_linked_ptr_mutex; - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Many linked_ptr operations may change p.link_ for some linked_ptr - // variable p in the same circle as this object. Therefore we need - // to prevent two such operations from occurring concurrently. - // - // Note that different types of linked_ptr objects can coexist in a - // circle (e.g. linked_ptr, linked_ptr, and - // linked_ptr). Therefore we must use a single mutex to - // protect all linked_ptr objects. This can create serious - // contention in production code, but is acceptable in a testing - // framework. - - // Join an existing circle. - // L < g_linked_ptr_mutex - void join(linked_ptr_internal const* ptr) { - MutexLock lock(&g_linked_ptr_mutex); - - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true if we were the - // last member of the circle. Once this is done, you can join() another. - // L < g_linked_ptr_mutex - bool depart() { - MutexLock lock(&g_linked_ptr_mutex); - - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { // NOLINT - assert(&ptr != this); - copy(&ptr); - } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { - depart(); - capture(ptr); - } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - // Release ownership of the pointed object and returns it. - // Sole ownership by this linked_ptr object is required. - T* release() { - bool last = link_.depart(); - assert(last); - T* v = value_; - value_ = NULL; - return v; - } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h deleted file mode 100644 index ad06e024..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h +++ /dev/null @@ -1,4572 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently Google Test supports at most 50 arguments in Values, -// and at most 10 arguments in Combine. Please contact -// googletestframework@googlegroups.com if you need more. -// Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is -// currently set at 10. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -#include - -namespace testing { -namespace internal { - -// Used in the Values() function to provide polymorphic capabilities. -template -class ValueArray1 { - public: - explicit ValueArray1(T1 v1) : v1_(v1) {} - - template - operator ParamGenerator() const { return ValuesIn(&v1_, &v1_ + 1); } - - private: - const T1 v1_; -}; - -template -class ValueArray2 { - public: - ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; -}; - -template -class ValueArray3 { - public: - ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; -}; - -template -class ValueArray4 { - public: - ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; -}; - -template -class ValueArray5 { - public: - ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; -}; - -template -class ValueArray6 { - public: - ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; -}; - -template -class ValueArray7 { - public: - ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; -}; - -template -class ValueArray8 { - public: - ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; -}; - -template -class ValueArray9 { - public: - ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; -}; - -template -class ValueArray10 { - public: - ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; -}; - -template -class ValueArray11 { - public: - ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; -}; - -template -class ValueArray12 { - public: - ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; -}; - -template -class ValueArray13 { - public: - ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; -}; - -template -class ValueArray14 { - public: - ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; -}; - -template -class ValueArray15 { - public: - ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; -}; - -template -class ValueArray16 { - public: - ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; -}; - -template -class ValueArray17 { - public: - ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; -}; - -template -class ValueArray18 { - public: - ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; -}; - -template -class ValueArray19 { - public: - ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; -}; - -template -class ValueArray20 { - public: - ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; -}; - -template -class ValueArray21 { - public: - ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; -}; - -template -class ValueArray22 { - public: - ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; -}; - -template -class ValueArray23 { - public: - ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, - v23_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; -}; - -template -class ValueArray24 { - public: - ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; -}; - -template -class ValueArray25 { - public: - ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; -}; - -template -class ValueArray26 { - public: - ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; -}; - -template -class ValueArray27 { - public: - ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; -}; - -template -class ValueArray28 { - public: - ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; -}; - -template -class ValueArray29 { - public: - ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; -}; - -template -class ValueArray30 { - public: - ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; -}; - -template -class ValueArray31 { - public: - ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; -}; - -template -class ValueArray32 { - public: - ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; -}; - -template -class ValueArray33 { - public: - ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; -}; - -template -class ValueArray34 { - public: - ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; -}; - -template -class ValueArray35 { - public: - ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, - v35_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; -}; - -template -class ValueArray36 { - public: - ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; -}; - -template -class ValueArray37 { - public: - ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; -}; - -template -class ValueArray38 { - public: - ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; -}; - -template -class ValueArray39 { - public: - ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; -}; - -template -class ValueArray40 { - public: - ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; -}; - -template -class ValueArray41 { - public: - ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; -}; - -template -class ValueArray42 { - public: - ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; -}; - -template -class ValueArray43 { - public: - ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), - v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; -}; - -template -class ValueArray44 { - public: - ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), - v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), - v43_(v43), v44_(v44) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; -}; - -template -class ValueArray45 { - public: - ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), - v42_(v42), v43_(v43), v44_(v44), v45_(v45) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; -}; - -template -class ValueArray46 { - public: - ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; -}; - -template -class ValueArray47 { - public: - ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46), - v47_(v47) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, - v47_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; -}; - -template -class ValueArray48 { - public: - ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), - v46_(v46), v47_(v47), v48_(v48) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; -}; - -template -class ValueArray49 { - public: - ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, - T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_, v49_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; -}; - -template -class ValueArray50 { - public: - ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49, - T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_, v49_, v50_}; - return ValuesIn(array); - } - - private: - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; - const T50 v50_; -}; - -#if GTEST_HAS_COMBINE -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Generates values from the Cartesian product of values produced -// by the argument generators. -// -template -class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator2(const ParamGenerator& g1, - const ParamGenerator& g2) - : g1_(g1), g2_(g2) {} - virtual ~CartesianProductGenerator2() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current2_; - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; -}; - - -template -class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator3(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - virtual ~CartesianProductGenerator3() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current3_; - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; -}; - - -template -class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator4(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - virtual ~CartesianProductGenerator4() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current4_; - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; -}; - - -template -class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator5(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - virtual ~CartesianProductGenerator5() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current5_; - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; -}; - - -template -class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator6(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - virtual ~CartesianProductGenerator6() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current6_; - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; -}; - - -template -class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator7(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - virtual ~CartesianProductGenerator7() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current7_; - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; -}; - - -template -class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator8(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - virtual ~CartesianProductGenerator8() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current8_; - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; -}; - - -template -class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator9(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - virtual ~CartesianProductGenerator9() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current9_; - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; -}; - - -template -class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator10(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9, - const ParamGenerator& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - virtual ~CartesianProductGenerator10() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end(), g10_, g10_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9, - const ParamGenerator& g10, - const typename ParamGenerator::iterator& current10) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9), - begin10_(g10.begin()), end10_(g10.end()), current10_(current10) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current10_; - if (current10_ == end10_) { - current10_ = begin10_; - ++current9_; - } - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_ && - current10_ == typed_other->current10_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_), - begin10_(other.begin10_), - end10_(other.end10_), - current10_(other.current10_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_, *current10_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_ || - current10_ == end10_; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - const typename ParamGenerator::iterator begin10_; - const typename ParamGenerator::iterator end10_; - typename ParamGenerator::iterator current10_; - ParamType current_value_; - }; - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; - const ParamGenerator g10_; -}; - - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Helper classes providing Combine() with polymorphic features. They allow -// casting CartesianProductGeneratorN to ParamGenerator if T is -// convertible to U. -// -template -class CartesianProductHolder2 { - public: -CartesianProductHolder2(const Generator1& g1, const Generator2& g2) - : g1_(g1), g2_(g2) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator2( - static_cast >(g1_), - static_cast >(g2_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; -}; - -template -class CartesianProductHolder3 { - public: -CartesianProductHolder3(const Generator1& g1, const Generator2& g2, - const Generator3& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator3( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; -}; - -template -class CartesianProductHolder4 { - public: -CartesianProductHolder4(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator4( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; -}; - -template -class CartesianProductHolder5 { - public: -CartesianProductHolder5(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator5( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; -}; - -template -class CartesianProductHolder6 { - public: -CartesianProductHolder6(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator6( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; -}; - -template -class CartesianProductHolder7 { - public: -CartesianProductHolder7(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator7( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; -}; - -template -class CartesianProductHolder8 { - public: -CartesianProductHolder8(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator8( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; -}; - -template -class CartesianProductHolder9 { - public: -CartesianProductHolder9(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator9( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; -}; - -template -class CartesianProductHolder10 { - public: -CartesianProductHolder10(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9, const Generator10& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator10( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_), - static_cast >(g10_))); - } - - private: - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; - const Generator10 g10_; -}; - -#endif // GTEST_HAS_COMBINE - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump deleted file mode 100644 index 54b2dc1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump +++ /dev/null @@ -1,269 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of Values arguments we want to support. -$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently Google Test supports at most $n arguments in Values, -// and at most $maxtuple arguments in Combine. Please contact -// googletestframework@googlegroups.com if you need more. -// Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is -// currently set at $maxtuple. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -#include - -namespace testing { -namespace internal { - -// Used in the Values() function to provide polymorphic capabilities. -template -class ValueArray1 { - public: - explicit ValueArray1(T1 v1) : v1_(v1) {} - - template - operator ParamGenerator() const { return ValuesIn(&v1_, &v1_ + 1); } - - private: - const T1 v1_; -}; - -$range i 2..n -$for i [[ -$range j 1..i - -template <$for j, [[typename T$j]]> -class ValueArray$i { - public: - ValueArray$i($for j, [[T$j v$j]]) : $for j, [[v$(j)_(v$j)]] {} - - template - operator ParamGenerator() const { - const T array[] = {$for j, [[v$(j)_]]}; - return ValuesIn(array); - } - - private: -$for j [[ - - const T$j v$(j)_; -]] - -}; - -]] - -#if GTEST_HAS_COMBINE -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Generates values from the Cartesian product of values produced -// by the argument generators. -// -$range i 2..maxtuple -$for i [[ -$range j 1..i -$range k 2..i - -template <$for j, [[typename T$j]]> -class CartesianProductGenerator$i - : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > { - public: - typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType; - - CartesianProductGenerator$i($for j, [[const ParamGenerator& g$j]]) - : $for j, [[g$(j)_(g$j)]] {} - virtual ~CartesianProductGenerator$i() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, $for j, [[g$(j)_, g$(j)_.begin()]]); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, $for j, [[g$(j)_, g$(j)_.end()]]); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, $for j, [[ - - const ParamGenerator& g$j, - const typename ParamGenerator::iterator& current$(j)]]) - : base_(base), -$for j, [[ - - begin$(j)_(g$j.begin()), end$(j)_(g$j.end()), current$(j)_(current$j) -]] { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current$(i)_; - -$for k [[ - if (current$(i+2-k)_ == end$(i+2-k)_) { - current$(i+2-k)_ = begin$(i+2-k)_; - ++current$(i+2-k-1)_; - } - -]] - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ($for j && [[ - - current$(j)_ == typed_other->current$(j)_ -]]); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), $for j, [[ - - begin$(j)_(other.begin$(j)_), - end$(j)_(other.end$(j)_), - current$(j)_(other.current$(j)_) -]] { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType($for j, [[*current$(j)_]]); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return -$for j || [[ - - current$(j)_ == end$(j)_ -]]; - } - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. -$for j [[ - - const typename ParamGenerator::iterator begin$(j)_; - const typename ParamGenerator::iterator end$(j)_; - typename ParamGenerator::iterator current$(j)_; -]] - - ParamType current_value_; - }; - - -$for j [[ - const ParamGenerator g$(j)_; - -]] -}; - - -]] - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Helper classes providing Combine() with polymorphic features. They allow -// casting CartesianProductGeneratorN to ParamGenerator if T is -// convertible to U. -// -$range i 2..maxtuple -$for i [[ -$range j 1..i - -template <$for j, [[class Generator$j]]> -class CartesianProductHolder$i { - public: -CartesianProductHolder$i($for j, [[const Generator$j& g$j]]) - : $for j, [[g$(j)_(g$j)]] {} - template <$for j, [[typename T$j]]> - operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const { - return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >( - new CartesianProductGenerator$i<$for j, [[T$j]]>( -$for j,[[ - - static_cast >(g$(j)_) -]])); - } - - private: - -$for j [[ - const Generator$j g$(j)_; - -]] -}; - -]] - -#endif // GTEST_HAS_COMBINE - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util.h deleted file mode 100644 index 34361ab1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-param-util.h +++ /dev/null @@ -1,629 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ - -#include -#include -#include - -#include - -#if GTEST_HAS_PARAM_TEST - -#if GTEST_HAS_RTTI -#include -#endif // GTEST_HAS_RTTI - -#include -#include - -namespace testing { -namespace internal { - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Outputs a message explaining invalid registration of different -// fixture class for the same test case. This may happen when -// TEST_P macro is used to define two tests with the same name -// but in different namespaces. -void ReportInvalidTestCaseType(const char* test_case_name, - const char* file, int line); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Downcasts the pointer of type Base to Derived. -// Derived must be a subclass of Base. The parameter MUST -// point to a class of type Derived, not any subclass of it. -// When RTTI is available, the function performs a runtime -// check to enforce this. -template -Derived* CheckedDowncastToActualType(Base* base) { -#if GTEST_HAS_RTTI - GTEST_CHECK_(typeid(*base) == typeid(Derived)); - Derived* derived = dynamic_cast(base); // NOLINT -#else - Derived* derived = static_cast(base); // Poor man's downcast. -#endif // GTEST_HAS_RTTI - return derived; -} - -template class ParamGeneratorInterface; -template class ParamGenerator; - -// Interface for iterating over elements provided by an implementation -// of ParamGeneratorInterface. -template -class ParamIteratorInterface { - public: - virtual ~ParamIteratorInterface() {} - // A pointer to the base generator instance. - // Used only for the purposes of iterator comparison - // to make sure that two iterators belong to the same generator. - virtual const ParamGeneratorInterface* BaseGenerator() const = 0; - // Advances iterator to point to the next element - // provided by the generator. The caller is responsible - // for not calling Advance() on an iterator equal to - // BaseGenerator()->End(). - virtual void Advance() = 0; - // Clones the iterator object. Used for implementing copy semantics - // of ParamIterator. - virtual ParamIteratorInterface* Clone() const = 0; - // Dereferences the current iterator and provides (read-only) access - // to the pointed value. It is the caller's responsibility not to call - // Current() on an iterator equal to BaseGenerator()->End(). - // Used for implementing ParamGenerator::operator*(). - virtual const T* Current() const = 0; - // Determines whether the given iterator and other point to the same - // element in the sequence generated by the generator. - // Used for implementing ParamGenerator::operator==(). - virtual bool Equals(const ParamIteratorInterface& other) const = 0; -}; - -// Class iterating over elements provided by an implementation of -// ParamGeneratorInterface. It wraps ParamIteratorInterface -// and implements the const forward iterator concept. -template -class ParamIterator { - public: - typedef T value_type; - typedef const T& reference; - typedef ptrdiff_t difference_type; - - // ParamIterator assumes ownership of the impl_ pointer. - ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {} - ParamIterator& operator=(const ParamIterator& other) { - if (this != &other) - impl_.reset(other.impl_->Clone()); - return *this; - } - - const T& operator*() const { return *impl_->Current(); } - const T* operator->() const { return impl_->Current(); } - // Prefix version of operator++. - ParamIterator& operator++() { - impl_->Advance(); - return *this; - } - // Postfix version of operator++. - ParamIterator operator++(int /*unused*/) { - ParamIteratorInterface* clone = impl_->Clone(); - impl_->Advance(); - return ParamIterator(clone); - } - bool operator==(const ParamIterator& other) const { - return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); - } - bool operator!=(const ParamIterator& other) const { - return !(*this == other); - } - - private: - friend class ParamGenerator; - explicit ParamIterator(ParamIteratorInterface* impl) : impl_(impl) {} - scoped_ptr > impl_; -}; - -// ParamGeneratorInterface is the binary interface to access generators -// defined in other translation units. -template -class ParamGeneratorInterface { - public: - typedef T ParamType; - - virtual ~ParamGeneratorInterface() {} - - // Generator interface definition - virtual ParamIteratorInterface* Begin() const = 0; - virtual ParamIteratorInterface* End() const = 0; -}; - -// Wraps ParamGeneratorInetrface and provides general generator syntax -// compatible with the STL Container concept. -// This class implements copy initialization semantics and the contained -// ParamGeneratorInterface instance is shared among all copies -// of the original object. This is possible because that instance is immutable. -template -class ParamGenerator { - public: - typedef ParamIterator iterator; - - explicit ParamGenerator(ParamGeneratorInterface* impl) : impl_(impl) {} - ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {} - - ParamGenerator& operator=(const ParamGenerator& other) { - impl_ = other.impl_; - return *this; - } - - iterator begin() const { return iterator(impl_->Begin()); } - iterator end() const { return iterator(impl_->End()); } - - private: - ::testing::internal::linked_ptr > impl_; -}; - -// Generates values from a range of two comparable values. Can be used to -// generate sequences of user-defined types that implement operator+() and -// operator<(). -// This class is used in the Range() function. -template -class RangeGenerator : public ParamGeneratorInterface { - public: - RangeGenerator(T begin, T end, IncrementT step) - : begin_(begin), end_(end), - step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} - virtual ~RangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, begin_, 0, step_); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, end_, end_index_, step_); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, T value, int index, - IncrementT step) - : base_(base), value_(value), index_(index), step_(step) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - value_ = value_ + step_; - index_++; - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const T* Current() const { return &value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const int other_index = - CheckedDowncastToActualType(&other)->index_; - return index_ == other_index; - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), value_(other.value_), index_(other.index_), - step_(other.step_) {} - - const ParamGeneratorInterface* const base_; - T value_; - int index_; - const IncrementT step_; - }; // class RangeGenerator::Iterator - - static int CalculateEndIndex(const T& begin, - const T& end, - const IncrementT& step) { - int end_index = 0; - for (T i = begin; i < end; i = i + step) - end_index++; - return end_index; - } - - const T begin_; - const T end_; - const IncrementT step_; - // The index for the end() iterator. All the elements in the generated - // sequence are indexed (0-based) to aid iterator comparison. - const int end_index_; -}; // class RangeGenerator - - -// Generates values from a pair of STL-style iterators. Used in the -// ValuesIn() function. The elements are copied from the source range -// since the source can be located on the stack, and the generator -// is likely to persist beyond that stack frame. -template -class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface { - public: - template - ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) - : container_(begin, end) {} - virtual ~ValuesInIteratorRangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, container_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, container_.end()); - } - - private: - typedef typename ::std::vector ContainerType; - - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - typename ContainerType::const_iterator iterator) - : base_(base), iterator_(iterator) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - ++iterator_; - value_.reset(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - // We need to use cached value referenced by iterator_ because *iterator_ - // can return a temporary object (and of type other then T), so just - // having "return &*iterator_;" doesn't work. - // value_ is updated here and not in Advance() because Advance() - // can advance iterator_ beyond the end of the range, and we cannot - // detect that fact. The client code, on the other hand, is - // responsible for not calling Current() on an out-of-range iterator. - virtual const T* Current() const { - if (value_.get() == NULL) - value_.reset(new T(*iterator_)); - return value_.get(); - } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - return iterator_ == - CheckedDowncastToActualType(&other)->iterator_; - } - - private: - Iterator(const Iterator& other) - // The explicit constructor call suppresses a false warning - // emitted by gcc when supplied with the -Wextra option. - : ParamIteratorInterface(), - base_(other.base_), - iterator_(other.iterator_) {} - - const ParamGeneratorInterface* const base_; - typename ContainerType::const_iterator iterator_; - // A cached value of *iterator_. We keep it here to allow access by - // pointer in the wrapping iterator's operator->(). - // value_ needs to be mutable to be accessed in Current(). - // Use of scoped_ptr helps manage cached value's lifetime, - // which is bound by the lifespan of the iterator itself. - mutable scoped_ptr value_; - }; - - const ContainerType container_; -}; // class ValuesInIteratorRangeGenerator - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Stores a parameter value and later creates tests parameterized with that -// value. -template -class ParameterizedTestFactory : public TestFactoryBase { - public: - typedef typename TestClass::ParamType ParamType; - explicit ParameterizedTestFactory(ParamType parameter) : - parameter_(parameter) {} - virtual Test* CreateTest() { - TestClass::SetParam(¶meter_); - return new TestClass(); - } - - private: - const ParamType parameter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactoryBase is a base class for meta-factories that create -// test factories for passing into MakeAndRegisterTestInfo function. -template -class TestMetaFactoryBase { - public: - virtual ~TestMetaFactoryBase() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactory creates test factories for passing into -// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives -// ownership of test factory pointer, same factory object cannot be passed -// into that method twice. But ParameterizedTestCaseInfo is going to call -// it for each Test/Parameter value combination. Thus it needs meta factory -// creator class. -template -class TestMetaFactory - : public TestMetaFactoryBase { - public: - typedef typename TestCase::ParamType ParamType; - - TestMetaFactory() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) { - return new ParameterizedTestFactory(parameter); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfoBase is a generic interface -// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase -// accumulates test information provided by TEST_P macro invocations -// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations -// and uses that information to register all resulting test instances -// in RegisterTests method. The ParameterizeTestCaseRegistry class holds -// a collection of pointers to the ParameterizedTestCaseInfo objects -// and calls RegisterTests() on each of them when asked. -class ParameterizedTestCaseInfoBase { - public: - virtual ~ParameterizedTestCaseInfoBase() {} - - // Base part of test case name for display purposes. - virtual const String& GetTestCaseName() const = 0; - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const = 0; - // UnitTest class invokes this method to register tests in this - // test case right before running them in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - virtual void RegisterTests() = 0; - - protected: - ParameterizedTestCaseInfoBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P -// macro invocations for a particular test case and generators -// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that -// test case. It registers tests with all values generated by all -// generators when asked. -template -class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase { - public: - // ParamType and GeneratorCreationFunc are private types but are required - // for declarations of public methods AddTestPattern() and - // AddTestCaseInstantiation(). - typedef typename TestCase::ParamType ParamType; - // A function that returns an instance of appropriate generator type. - typedef ParamGenerator(GeneratorCreationFunc)(); - - explicit ParameterizedTestCaseInfo(const char* name) - : test_case_name_(name) {} - - // Test case base name for display purposes. - virtual const String& GetTestCaseName() const { return test_case_name_; } - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const { return GetTypeId(); } - // TEST_P macro uses AddTestPattern() to record information - // about a single test in a LocalTestInfo structure. - // test_case_name is the base name of the test case (without invocation - // prefix). test_base_name is the name of an individual test without - // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is - // test case base name and DoBar is test base name. - void AddTestPattern(const char* test_case_name, - const char* test_base_name, - TestMetaFactoryBase* meta_factory) { - tests_.push_back(linked_ptr(new TestInfo(test_case_name, - test_base_name, - meta_factory))); - } - // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information - // about a generator. - int AddTestCaseInstantiation(const char* instantiation_name, - GeneratorCreationFunc* func, - const char* /* file */, - int /* line */) { - instantiations_.push_back(::std::make_pair(instantiation_name, func)); - return 0; // Return value used only to run this method in namespace scope. - } - // UnitTest class invokes this method to register tests in this test case - // test cases right before running tests in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - // UnitTest has a guard to prevent from calling this method more then once. - virtual void RegisterTests() { - for (typename TestInfoContainer::iterator test_it = tests_.begin(); - test_it != tests_.end(); ++test_it) { - linked_ptr test_info = *test_it; - for (typename InstantiationContainer::iterator gen_it = - instantiations_.begin(); gen_it != instantiations_.end(); - ++gen_it) { - const String& instantiation_name = gen_it->first; - ParamGenerator generator((*gen_it->second)()); - - Message test_case_name_stream; - if ( !instantiation_name.empty() ) - test_case_name_stream << instantiation_name.c_str() << "/"; - test_case_name_stream << test_info->test_case_base_name.c_str(); - - int i = 0; - for (typename ParamGenerator::iterator param_it = - generator.begin(); - param_it != generator.end(); ++param_it, ++i) { - Message test_name_stream; - test_name_stream << test_info->test_base_name.c_str() << "/" << i; - ::testing::internal::MakeAndRegisterTestInfo( - test_case_name_stream.GetString().c_str(), - test_name_stream.GetString().c_str(), - "", // test_case_comment - "", // comment; TODO(vladl@google.com): provide parameter value - // representation. - GetTestCaseTypeId(), - TestCase::SetUpTestCase, - TestCase::TearDownTestCase, - test_info->test_meta_factory->CreateTestFactory(*param_it)); - } // for param_it - } // for gen_it - } // for test_it - } // RegisterTests - - private: - // LocalTestInfo structure keeps information about a single test registered - // with TEST_P macro. - struct TestInfo { - TestInfo(const char* test_case_base_name, - const char* test_base_name, - TestMetaFactoryBase* test_meta_factory) : - test_case_base_name(test_case_base_name), - test_base_name(test_base_name), - test_meta_factory(test_meta_factory) {} - - const String test_case_base_name; - const String test_base_name; - const scoped_ptr > test_meta_factory; - }; - typedef ::std::vector > TestInfoContainer; - // Keeps pairs of - // received from INSTANTIATE_TEST_CASE_P macros. - typedef ::std::vector > - InstantiationContainer; - - const String test_case_name_; - TestInfoContainer tests_; - InstantiationContainer instantiations_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo); -}; // class ParameterizedTestCaseInfo - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase -// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P -// macros use it to locate their corresponding ParameterizedTestCaseInfo -// descriptors. -class ParameterizedTestCaseRegistry { - public: - ParameterizedTestCaseRegistry() {} - ~ParameterizedTestCaseRegistry() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - delete *it; - } - } - - // Looks up or creates and returns a structure containing information about - // tests and instantiations of a particular test case. - template - ParameterizedTestCaseInfo* GetTestCasePatternHolder( - const char* test_case_name, - const char* file, - int line) { - ParameterizedTestCaseInfo* typed_test_info = NULL; - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - if ((*it)->GetTestCaseName() == test_case_name) { - if ((*it)->GetTestCaseTypeId() != GetTypeId()) { - // Complain about incorrect usage of Google Test facilities - // and terminate the program since we cannot guaranty correct - // test case setup and tear-down in this case. - ReportInvalidTestCaseType(test_case_name, file, line); - abort(); - } else { - // At this point we are sure that the object we found is of the same - // type we are looking for, so we downcast it to that type - // without further checks. - typed_test_info = CheckedDowncastToActualType< - ParameterizedTestCaseInfo >(*it); - } - break; - } - } - if (typed_test_info == NULL) { - typed_test_info = new ParameterizedTestCaseInfo(test_case_name); - test_case_infos_.push_back(typed_test_info); - } - return typed_test_info; - } - void RegisterTests() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - (*it)->RegisterTests(); - } - } - - private: - typedef ::std::vector TestCaseInfoContainer; - - TestCaseInfoContainer test_case_infos_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry); -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-port.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-port.h deleted file mode 100644 index e1a3597c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-port.h +++ /dev/null @@ -1,1055 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan) -// -// Low-level types and utilities for porting Google Test to various -// platforms. They are subject to change without notice. DO NOT USE -// THEM IN USER CODE. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ - -// The user can define the following macros in the build script to -// control Google Test's behavior. If the user doesn't define a macro -// in this list, Google Test will define it. -// -// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2) -// is/isn't available. -// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::string, which is different to std::string). -// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::wstring, which is different to std::wstring). -// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that -// is/isn't available. -// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't -// enabled. -// GTEST_HAS_STD_STRING - Define it to 1/0 to indicate that -// std::string does/doesn't work (Google Test can -// be used where std::string is unavailable). -// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that -// std::wstring does/doesn't work (Google Test can -// be used where std::wstring is unavailable). -// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple -// is/isn't available. -// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the -// compiler supports Microsoft's "Structured -// Exception Handling". -// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google -// Test's own tr1 tuple implementation should be -// used. Unused when the user sets -// GTEST_HAS_TR1_TUPLE to 0. - -// This header defines the following utilities: -// -// Macros indicating the current platform (defined to 1 if compiled on -// the given platform; otherwise undefined): -// GTEST_OS_CYGWIN - Cygwin -// GTEST_OS_LINUX - Linux -// GTEST_OS_MAC - Mac OS X -// GTEST_OS_SOLARIS - Sun Solaris -// GTEST_OS_SYMBIAN - Symbian -// GTEST_OS_WINDOWS - Windows -// GTEST_OS_ZOS - z/OS -// -// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the -// most stable support. Since core members of the Google Test project -// don't have access to other platforms, support for them may be less -// stable. If you notice any problems on your platform, please notify -// googletestframework@googlegroups.com (patches for fixing them are -// even more welcome!). -// -// Note that it is possible that none of the GTEST_OS_* macros are defined. -// -// Macros indicating available Google Test features (defined to 1 if -// the corresponding feature is supported; otherwise undefined): -// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized -// tests) -// GTEST_HAS_DEATH_TEST - death tests -// GTEST_HAS_PARAM_TEST - value-parameterized tests -// GTEST_HAS_TYPED_TEST - typed tests -// GTEST_HAS_TYPED_TEST_P - type-parameterized tests -// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. -// GTEST_USES_SIMPLE_RE - our own simple regex is used; -// the above two are mutually exclusive. -// -// Macros for basic C++ coding: -// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. -// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a -// variable don't have to be used. -// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=. -// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used. -// -// Synchronization: -// Mutex, MutexLock, ThreadLocal, GetThreadCount() -// - synchronization primitives. -// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above -// synchronization primitives have real implementations -// and Google Test is thread-safe; or 0 otherwise. -// -// Template meta programming: -// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only. -// -// Smart pointers: -// scoped_ptr - as in TR2. -// -// Regular expressions: -// RE - a simple regular expression class using the POSIX -// Extended Regular Expression syntax. Not available on -// Windows. -// -// Logging: -// GTEST_LOG_() - logs messages at the specified severity level. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. -// -// Stderr capturing: -// CaptureStderr() - starts capturing stderr. -// GetCapturedStderr() - stops capturing stderr and returns the captured -// string. -// -// Integer types: -// TypeWithSize - maps an integer to a int type. -// Int32, UInt32, Int64, UInt64, TimeInMillis -// - integers of known sizes. -// BiggestInt - the biggest signed integer type. -// -// Command-line utilities: -// GTEST_FLAG() - references a flag. -// GTEST_DECLARE_*() - declares a flag. -// GTEST_DEFINE_*() - defines a flag. -// GetArgvs() - returns the command line as a vector of strings. -// -// Environment variable utilities: -// GetEnv() - gets the value of an environment variable. -// BoolFromGTestEnv() - parses a bool environment variable. -// Int32FromGTestEnv() - parses an Int32 environment variable. -// StringFromGTestEnv() - parses a string environment variable. - -#include -#include -#include -#include - -#include // NOLINT - -#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" -#define GTEST_FLAG_PREFIX_ "gtest_" -#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" -#define GTEST_NAME_ "Google Test" -#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" - -// Determines the version of gcc that is used to compile this. -#ifdef __GNUC__ -// 40302 means version 4.3.2. -#define GTEST_GCC_VER_ \ - (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) -#endif // __GNUC__ - -// Determines the platform on which Google Test is compiled. -#ifdef __CYGWIN__ -#define GTEST_OS_CYGWIN 1 -#elif __SYMBIAN32__ -#define GTEST_OS_SYMBIAN 1 -#elif defined _WIN32 -#define GTEST_OS_WINDOWS 1 -#elif defined __APPLE__ -#define GTEST_OS_MAC 1 -#elif defined __linux__ -#define GTEST_OS_LINUX 1 -#elif defined __MVS__ -#define GTEST_OS_ZOS 1 -#elif defined(__sun) && defined(__SVR4) -#define GTEST_OS_SOLARIS 1 -#endif // __CYGWIN__ - -#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC - -// On some platforms, needs someone to define size_t, and -// won't compile otherwise. We can #include it here as we already -// included , which is guaranteed to define size_t through -// . -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT - -#define GTEST_USES_POSIX_RE 1 - -#elif GTEST_OS_WINDOWS - -#include // NOLINT -#include // NOLINT - -// is not available on Windows. Use our own simple regex -// implementation instead. -#define GTEST_USES_SIMPLE_RE 1 - -#else - -// may not be available on this platform. Use our own -// simple regex implementation instead. -#define GTEST_USES_SIMPLE_RE 1 - -#endif // GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC - -// Defines GTEST_HAS_EXCEPTIONS to 1 if exceptions are enabled, or 0 -// otherwise. - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS -// macro to enable exceptions, so we'll do the same. -// Assumes that exceptions are enabled by default. -#ifndef _HAS_EXCEPTIONS -#define _HAS_EXCEPTIONS 1 -#endif // _HAS_EXCEPTIONS -#define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS -#else // The compiler is not MSVC or C++Builder. -// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. For -// other compilers, we assume exceptions are disabled to be -// conservative. -#if defined(__GNUC__) && __EXCEPTIONS -#define GTEST_HAS_EXCEPTIONS 1 -#else -#define GTEST_HAS_EXCEPTIONS 0 -#endif // defined(__GNUC__) && __EXCEPTIONS -#endif // defined(_MSC_VER) || defined(__BORLANDC__) - -// Determines whether ::std::string and ::string are available. - -#ifndef GTEST_HAS_STD_STRING -// The user didn't tell us whether ::std::string is available, so we -// need to figure it out. The only environment that we know -// ::std::string is not available is MSVC 7.1 or lower with exceptions -// disabled. -#if defined(_MSC_VER) && (_MSC_VER < 1400) && !GTEST_HAS_EXCEPTIONS -#define GTEST_HAS_STD_STRING 0 -#else -#define GTEST_HAS_STD_STRING 1 -#endif -#endif // GTEST_HAS_STD_STRING - -#ifndef GTEST_HAS_GLOBAL_STRING -// The user didn't tell us whether ::string is available, so we need -// to figure it out. - -#define GTEST_HAS_GLOBAL_STRING 0 - -#endif // GTEST_HAS_GLOBAL_STRING - -#ifndef GTEST_HAS_STD_WSTRING -// The user didn't tell us whether ::std::wstring is available, so we need -// to figure it out. -// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring -// is available. - -#if GTEST_OS_CYGWIN || GTEST_OS_SOLARIS -// Cygwin 1.5 and below doesn't support ::std::wstring. -// Cygwin 1.7 might add wstring support; this should be updated when clear. -// Solaris' libc++ doesn't support it either. -#define GTEST_HAS_STD_WSTRING 0 -#else -#define GTEST_HAS_STD_WSTRING GTEST_HAS_STD_STRING -#endif // GTEST_OS_CYGWIN || GTEST_OS_SOLARIS - -#endif // GTEST_HAS_STD_WSTRING - -#ifndef GTEST_HAS_GLOBAL_WSTRING -// The user didn't tell us whether ::wstring is available, so we need -// to figure it out. -#define GTEST_HAS_GLOBAL_WSTRING \ - (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING) -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_STRING || GTEST_HAS_GLOBAL_STRING || \ - GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING -#include // NOLINT -#endif // GTEST_HAS_STD_STRING || GTEST_HAS_GLOBAL_STRING || - // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_STRING -#include // NOLINT -#else -#include // NOLINT -#endif // GTEST_HAS_STD_STRING - -// Determines whether RTTI is available. -#ifndef GTEST_HAS_RTTI -// The user didn't tell us whether RTTI is enabled, so we need to -// figure it out. - -#ifdef _MSC_VER - -#ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#else -#define GTEST_HAS_RTTI 0 -#endif // _CPPRTTI - -#elif defined(__GNUC__) - -// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. -#if GTEST_GCC_VER_ >= 40302 -#ifdef __GXX_RTTI -#define GTEST_HAS_RTTI 1 -#else -#define GTEST_HAS_RTTI 0 -#endif // __GXX_RTTI -#else -// For gcc versions smaller than 4.3.2, we assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#endif // GTEST_GCC_VER >= 40302 - -#else - -// Unknown compiler - assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 - -#endif // _MSC_VER - -#endif // GTEST_HAS_RTTI - -// Determines whether is available. -#ifndef GTEST_HAS_PTHREAD -// The user didn't tell us, so we need to figure it out. -#define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC) -#endif // GTEST_HAS_PTHREAD - -// Determines whether Google Test can use tr1/tuple. You can define -// this macro to 0 to prevent Google Test from using tuple (any -// feature depending on tuple with be disabled in this mode). -#ifndef GTEST_HAS_TR1_TUPLE -// The user didn't tell us not to do it, so we assume it's OK. -#define GTEST_HAS_TR1_TUPLE 1 -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether Google Test's own tr1 tuple implementation -// should be used. -#ifndef GTEST_USE_OWN_TR1_TUPLE -// The user didn't tell us, so we need to figure it out. - -// We use our own tr1 tuple if we aren't sure the user has an -// implementation of it already. At this time, GCC 4.0.0+ is the only -// mainstream compiler that comes with a TR1 tuple implementation. -// MSVC 2008 (9.0) provides TR1 tuple in a 323 MB Feature Pack -// download, which we cannot assume the user has. MSVC 2010 isn't -// released yet. -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -#define GTEST_USE_OWN_TR1_TUPLE 0 -#else -#define GTEST_USE_OWN_TR1_TUPLE 1 -#endif // defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) - -#endif // GTEST_USE_OWN_TR1_TUPLE - -// To avoid conditional compilation everywhere, we make it -// gtest-port.h's responsibility to #include the header implementing -// tr1/tuple. -#if GTEST_HAS_TR1_TUPLE - -#if GTEST_USE_OWN_TR1_TUPLE -#include -#elif GTEST_OS_SYMBIAN - -// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to -// use STLport's tuple implementation, which unfortunately doesn't -// work as the copy of STLport distributed with Symbian is incomplete. -// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to -// use its own tuple implementation. -#ifdef BOOST_HAS_TR1_TUPLE -#undef BOOST_HAS_TR1_TUPLE -#endif // BOOST_HAS_TR1_TUPLE - -// This prevents , which defines -// BOOST_HAS_TR1_TUPLE, from being #included by Boost's . -#define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED -#include - -#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -// GCC 4.0+ implements tr1/tuple in the header. This does -// not conform to the TR1 spec, which requires the header to be . - -#if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 -// Until version 4.3.2, gcc has a bug that causes , -// which is #included by , to not compile when RTTI is -// disabled. _TR1_FUNCTIONAL is the header guard for -// . Hence the following #define is a hack to prevent -// from being included. -#define _TR1_FUNCTIONAL 1 -#include -#undef _TR1_FUNCTIONAL // Allows the user to #include - // if he chooses to. -#else -#include -#endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 - -#else -// If the compiler is not GCC 4.0+, we assume the user is using a -// spec-conforming TR1 implementation. -#include -#endif // GTEST_USE_OWN_TR1_TUPLE - -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether clone(2) is supported. -// Usually it will only be available on Linux, excluding -// Linux on the Itanium architecture. -// Also see http://linux.die.net/man/2/clone. -#ifndef GTEST_HAS_CLONE -// The user didn't tell us, so we need to figure it out. - -#if GTEST_OS_LINUX && !defined(__ia64__) -#define GTEST_HAS_CLONE 1 -#else -#define GTEST_HAS_CLONE 0 -#endif // GTEST_OS_LINUX && !defined(__ia64__) - -#endif // GTEST_HAS_CLONE - -// Determines whether to support death tests. -// Google Test does not support death tests for VC 7.1 and earlier for -// these reasons: -// 1. std::vector does not build in VC 7.1 when exceptions are disabled. -// 2. std::string does not build in VC 7.1 when exceptions are disabled -// (this is covered by GTEST_HAS_STD_STRING guard). -// 3. abort() in a VC 7.1 application compiled as GUI in debug config -// pops up a dialog window that cannot be suppressed programmatically. -#if GTEST_HAS_STD_STRING && (GTEST_OS_LINUX || \ - GTEST_OS_MAC || \ - GTEST_OS_CYGWIN || \ - (GTEST_OS_WINDOWS && _MSC_VER >= 1400)) -#define GTEST_HAS_DEATH_TEST 1 -#include // NOLINT -#endif - -// Determines whether to support value-parameterized tests. - -#if defined(__GNUC__) || (_MSC_VER >= 1400) -// TODO(vladl@google.com): get the implementation rid of vector and list -// to compile on MSVC 7.1. -#define GTEST_HAS_PARAM_TEST 1 -#endif // defined(__GNUC__) || (_MSC_VER >= 1400) - -// Determines whether to support type-driven tests. - -// Typed tests need and variadic macros, which gcc and VC -// 8.0+ support. -#if defined(__GNUC__) || (_MSC_VER >= 1400) -#define GTEST_HAS_TYPED_TEST 1 -#define GTEST_HAS_TYPED_TEST_P 1 -#endif // defined(__GNUC__) || (_MSC_VER >= 1400) - -// Determines whether to support Combine(). This only makes sense when -// value-parameterized tests are enabled. -#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE -#define GTEST_HAS_COMBINE 1 -#endif // GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE - -// Determines whether the system compiler uses UTF-16 for encoding wide strings. -#define GTEST_WIDE_STRING_USES_UTF16_ \ - (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN) - -// Defines some utility macros. - -// The GNU compiler emits a warning if nested "if" statements are followed by -// an "else" statement and braces are not used to explicitly disambiguate the -// "else" binding. This leads to problems with code like: -// -// if (gate) -// ASSERT_*(condition) << "Some message"; -// -// The "switch (0) case 0:" idiom is used to suppress this. -#ifdef __INTEL_COMPILER -#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ -#else -#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: // NOLINT -#endif - -// Use this annotation at the end of a struct/class definition to -// prevent the compiler from optimizing away instances that are never -// used. This is useful when all interesting logic happens inside the -// c'tor and / or d'tor. Example: -// -// struct Foo { -// Foo() { ... } -// } GTEST_ATTRIBUTE_UNUSED_; -// -// Also use it after a variable or parameter declaration to tell the -// compiler the variable/parameter does not have to be used. -#if defined(__GNUC__) && !defined(COMPILER_ICC) -#define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) -#else -#define GTEST_ATTRIBUTE_UNUSED_ -#endif - -// A macro to disallow the evil copy constructor and operator= functions -// This should be used in the private: declarations for a class. -#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ - type(const type &);\ - void operator=(const type &) - -// Tell the compiler to warn about unused return values for functions declared -// with this macro. The macro should be used on function declarations -// following the argument list: -// -// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_; -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC) -#define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) -#else -#define GTEST_MUST_USE_RESULT_ -#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC - -// Determine whether the compiler supports Microsoft's Structured Exception -// Handling. This is supported by several Windows compilers but generally -// does not exist on any other system. -#ifndef GTEST_HAS_SEH -// The user didn't tell us, so we need to figure it out. - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// These two compilers are known to support SEH. -#define GTEST_HAS_SEH 1 -#else -// Assume no SEH. -#define GTEST_HAS_SEH 0 -#endif - -#endif // GTEST_HAS_SEH - -namespace testing { - -class Message; - -namespace internal { - -class String; - -// std::strstream is deprecated. However, we have to use it on -// Windows as std::stringstream won't compile on Windows when -// exceptions are disabled. We use std::stringstream on other -// platforms to avoid compiler warnings there. -#if GTEST_HAS_STD_STRING -typedef ::std::stringstream StrStream; -#else -typedef ::std::strstream StrStream; -#endif // GTEST_HAS_STD_STRING - -// Defines scoped_ptr. - -// This implementation of scoped_ptr is PARTIAL - it only contains -// enough stuff to satisfy Google Test's need. -template -class scoped_ptr { - public: - explicit scoped_ptr(T* p = NULL) : ptr_(p) {} - ~scoped_ptr() { reset(); } - - T& operator*() const { return *ptr_; } - T* operator->() const { return ptr_; } - T* get() const { return ptr_; } - - T* release() { - T* const ptr = ptr_; - ptr_ = NULL; - return ptr; - } - - void reset(T* p = NULL) { - if (p != ptr_) { - if (sizeof(T) > 0) { // Makes sure T is a complete type. - delete ptr_; - } - ptr_ = p; - } - } - private: - T* ptr_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr); -}; - -// Defines RE. - -// A simple C++ wrapper for . It uses the POSIX Enxtended -// Regular Expression syntax. -class RE { - public: - // Constructs an RE from a string. -#if GTEST_HAS_STD_STRING - RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - RE(const char* regex) { Init(regex); } // NOLINT - ~RE(); - - // Returns the string representation of the regex. - const char* pattern() const { return pattern_; } - - // FullMatch(str, re) returns true iff regular expression re matches - // the entire str. - // PartialMatch(str, re) returns true iff regular expression re - // matches a substring of str (including str itself). - // - // TODO(wan@google.com): make FullMatch() and PartialMatch() work - // when str contains NUL characters. -#if GTEST_HAS_STD_STRING - static bool FullMatch(const ::std::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::std::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - static bool FullMatch(const ::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } -#endif // GTEST_HAS_GLOBAL_STRING - - static bool FullMatch(const char* str, const RE& re); - static bool PartialMatch(const char* str, const RE& re); - - private: - void Init(const char* regex); - - // We use a const char* instead of a string, as Google Test may be used - // where string is not available. We also do not use Google Test's own - // String type here, in order to simplify dependencies between the - // files. - const char* pattern_; - bool is_valid_; -#if GTEST_USES_POSIX_RE - regex_t full_regex_; // For FullMatch(). - regex_t partial_regex_; // For PartialMatch(). -#else // GTEST_USES_SIMPLE_RE - const char* full_pattern_; // For FullMatch(); -#endif - - GTEST_DISALLOW_COPY_AND_ASSIGN_(RE); -}; - -// Defines logging utilities: -// GTEST_LOG_() - logs messages at the specified severity level. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. - -enum GTestLogSeverity { - GTEST_INFO, - GTEST_WARNING, - GTEST_ERROR, - GTEST_FATAL -}; - -void GTestLog(GTestLogSeverity severity, const char* file, - int line, const char* msg); - -#define GTEST_LOG_(severity, msg)\ - ::testing::internal::GTestLog(\ - ::testing::internal::GTEST_##severity, __FILE__, __LINE__, \ - (::testing::Message() << (msg)).GetString().c_str()) - -inline void LogToStderr() {} -inline void FlushInfoLog() { fflush(NULL); } - -// Defines the stderr capturer: -// CaptureStderr - starts capturing stderr. -// GetCapturedStderr - stops capturing stderr and returns the captured string. - -#if GTEST_HAS_STD_STRING -void CaptureStderr(); -::std::string GetCapturedStderr(); -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_DEATH_TEST - -// A copy of all command line arguments. Set by InitGoogleTest(). -extern ::std::vector g_argvs; - -// GTEST_HAS_DEATH_TEST implies we have ::std::string. -const ::std::vector& GetArgvs(); - -#endif // GTEST_HAS_DEATH_TEST - -// Defines synchronization primitives. - -// A dummy implementation of synchronization primitives (mutex, lock, -// and thread-local variable). Necessary for compiling Google Test where -// mutex is not supported - using Google Test in multiple threads is not -// supported on such platforms. - -class Mutex { - public: - Mutex() {} - explicit Mutex(int /*unused*/) {} - void AssertHeld() const {} - enum { NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX = 0 }; -}; - -// We cannot call it MutexLock directly as the ctor declaration would -// conflict with a macro named MutexLock, which is defined on some -// platforms. Hence the typedef trick below. -class GTestMutexLock { - public: - explicit GTestMutexLock(Mutex*) {} // NOLINT -}; - -typedef GTestMutexLock MutexLock; - -template -class ThreadLocal { - public: - ThreadLocal() : value_() {} - explicit ThreadLocal(const T& value) : value_(value) {} - T* pointer() { return &value_; } - const T* pointer() const { return &value_; } - const T& get() const { return value_; } - void set(const T& value) { value_ = value; } - private: - T value_; -}; - -// Returns the number of threads running in the process, or 0 to indicate that -// we cannot detect it. -size_t GetThreadCount(); - -// The above synchronization primitives have dummy implementations. -// Therefore Google Test is not thread-safe. -#define GTEST_IS_THREADSAFE 0 - -#if defined(__SYMBIAN32__) || defined(__IBMCPP__) - -// Passing non-POD classes through ellipsis (...) crashes the ARM -// compiler. The Nokia Symbian and the IBM XL C/C++ compiler try to -// instantiate a copy constructor for objects passed through ellipsis -// (...), failing for uncopyable objects. We define this to indicate -// the fact. -#define GTEST_ELLIPSIS_NEEDS_COPY_ 1 - -// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between -// const T& and const T* in a function template. These compilers -// _can_ decide between class template specializations for T and T*, -// so a tr1::type_traits-like is_pointer works. -#define GTEST_NEEDS_IS_POINTER_ 1 - -#endif // defined(__SYMBIAN32__) || defined(__IBMCPP__) - -template -struct bool_constant { - typedef bool_constant type; - static const bool value = bool_value; -}; -template const bool bool_constant::value; - -typedef bool_constant false_type; -typedef bool_constant true_type; - -template -struct is_pointer : public false_type {}; - -template -struct is_pointer : public true_type {}; - -#if GTEST_OS_WINDOWS -#define GTEST_PATH_SEP_ "\\" -// The biggest signed integer type the compiler supports. -typedef __int64 BiggestInt; -#else -#define GTEST_PATH_SEP_ "/" -typedef long long BiggestInt; // NOLINT -#endif // GTEST_OS_WINDOWS - -// The testing::internal::posix namespace holds wrappers for common -// POSIX functions. These wrappers hide the differences between -// Windows/MSVC and POSIX systems. Since some compilers define these -// standard functions as macros, the wrapper cannot have the same name -// as the wrapped function. - -namespace posix { - -// Functions with a different name on Windows. - -#if GTEST_OS_WINDOWS - -typedef struct _stat StatStruct; - -#ifdef __BORLANDC__ -inline int IsATTY(int fd) { return isatty(fd); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -#else -inline int IsATTY(int fd) { return _isatty(fd); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return _stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return _strdup(src); } -#endif // __BORLANDC__ - -inline int FileNo(FILE* file) { return _fileno(file); } -inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); } -inline int RmDir(const char* dir) { return _rmdir(dir); } -inline bool IsDir(const StatStruct& st) { - return (_S_IFDIR & st.st_mode) != 0; -} - -#else - -typedef struct stat StatStruct; - -inline int FileNo(FILE* file) { return fileno(file); } -inline int IsATTY(int fd) { return isatty(fd); } -inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return strcasecmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -inline int RmDir(const char* dir) { return rmdir(dir); } -inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } - -#endif // GTEST_OS_WINDOWS - -// Functions deprecated by MSVC 8.0. - -#ifdef _MSC_VER -// Temporarily disable warning 4996 (deprecated function). -#pragma warning(push) -#pragma warning(disable:4996) -#endif - -inline const char* StrNCpy(char* dest, const char* src, size_t n) { - return strncpy(dest, src, n); -} -inline int ChDir(const char* dir) { return chdir(dir); } -inline FILE* FOpen(const char* path, const char* mode) { - return fopen(path, mode); -} -inline FILE *FReopen(const char* path, const char* mode, FILE* stream) { - return freopen(path, mode, stream); -} -inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); } -inline int FClose(FILE* fp) { return fclose(fp); } -inline int Read(int fd, void* buf, unsigned int count) { - return static_cast(read(fd, buf, count)); -} -inline int Write(int fd, const void* buf, unsigned int count) { - return static_cast(write(fd, buf, count)); -} -inline int Close(int fd) { return close(fd); } -inline const char* StrError(int errnum) { return strerror(errnum); } -inline const char* GetEnv(const char* name) { -#ifdef _WIN32_WCE // We are on Windows CE, which has no environment variables. - return NULL; -#elif defined(__BORLANDC__) - // Environment variables which we programmatically clear will be set to the - // empty string rather than unset (NULL). Handle that case. - const char* const env = getenv(name); - return (env != NULL && env[0] != '\0') ? env : NULL; -#else - return getenv(name); -#endif -} - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif - -#ifdef _WIN32_WCE -// Windows CE has no C library. The abort() function is used in -// several places in Google Test. This implementation provides a reasonable -// imitation of standard behaviour. -void Abort(); -#else -inline void Abort() { abort(); } -#endif // _WIN32_WCE - -} // namespace posix - -// The maximum number a BiggestInt can represent. This definition -// works no matter BiggestInt is represented in one's complement or -// two's complement. -// -// We cannot rely on numeric_limits in STL, as __int64 and long long -// are not part of standard C++ and numeric_limits doesn't need to be -// defined for them. -const BiggestInt kMaxBiggestInt = - ~(static_cast(1) << (8*sizeof(BiggestInt) - 1)); - -// This template class serves as a compile-time function from size to -// type. It maps a size in bytes to a primitive type with that -// size. e.g. -// -// TypeWithSize<4>::UInt -// -// is typedef-ed to be unsigned int (unsigned integer made up of 4 -// bytes). -// -// Such functionality should belong to STL, but I cannot find it -// there. -// -// Google Test uses this class in the implementation of floating-point -// comparison. -// -// For now it only handles UInt (unsigned int) as that's all Google Test -// needs. Other types can be easily added in the future if need -// arises. -template -class TypeWithSize { - public: - // This prevents the user from using TypeWithSize with incorrect - // values of N. - typedef void UInt; -}; - -// The specialization for size 4. -template <> -class TypeWithSize<4> { - public: - // unsigned int has size 4 in both gcc and MSVC. - // - // As base/basictypes.h doesn't compile on Windows, we cannot use - // uint32, uint64, and etc here. - typedef int Int; - typedef unsigned int UInt; -}; - -// The specialization for size 8. -template <> -class TypeWithSize<8> { - public: -#if GTEST_OS_WINDOWS - typedef __int64 Int; - typedef unsigned __int64 UInt; -#else - typedef long long Int; // NOLINT - typedef unsigned long long UInt; // NOLINT -#endif // GTEST_OS_WINDOWS -}; - -// Integer types of known sizes. -typedef TypeWithSize<4>::Int Int32; -typedef TypeWithSize<4>::UInt UInt32; -typedef TypeWithSize<8>::Int Int64; -typedef TypeWithSize<8>::UInt UInt64; -typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. - -// Utilities for command line flags and environment variables. - -// INTERNAL IMPLEMENTATION - DO NOT USE. -// -// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition -// is not satisfied. -// Synopsys: -// GTEST_CHECK_(boolean_condition); -// or -// GTEST_CHECK_(boolean_condition) << "Additional message"; -// -// This checks the condition and if the condition is not satisfied -// it prints message about the condition violation, including the -// condition itself, plus additional message streamed into it, if any, -// and then it aborts the program. It aborts the program irrespective of -// whether it is built in the debug mode or not. -class GTestCheckProvider { - public: - GTestCheckProvider(const char* condition, const char* file, int line) { - FormatFileLocation(file, line); - ::std::cerr << " ERROR: Condition " << condition << " failed. "; - } - ~GTestCheckProvider() { - ::std::cerr << ::std::endl; - abort(); - } - void FormatFileLocation(const char* file, int line) { - if (file == NULL) - file = "unknown file"; - if (line < 0) { - ::std::cerr << file << ":"; - } else { -#if _MSC_VER - ::std::cerr << file << "(" << line << "):"; -#else - ::std::cerr << file << ":" << line << ":"; -#endif - } - } - ::std::ostream& GetStream() { return ::std::cerr; } -}; -#define GTEST_CHECK_(condition) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (condition) \ - ; \ - else \ - ::testing::internal::GTestCheckProvider(\ - #condition, __FILE__, __LINE__).GetStream() - -// Macro for referencing flags. -#define GTEST_FLAG(name) FLAGS_gtest_##name - -// Macros for declaring flags. -#define GTEST_DECLARE_bool_(name) extern bool GTEST_FLAG(name) -#define GTEST_DECLARE_int32_(name) \ - extern ::testing::internal::Int32 GTEST_FLAG(name) -#define GTEST_DECLARE_string_(name) \ - extern ::testing::internal::String GTEST_FLAG(name) - -// Macros for defining flags. -#define GTEST_DEFINE_bool_(name, default_val, doc) \ - bool GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_int32_(name, default_val, doc) \ - ::testing::internal::Int32 GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_string_(name, default_val, doc) \ - ::testing::internal::String GTEST_FLAG(name) = (default_val) - -// Parses 'str' for a 32-bit signed integer. If successful, writes the result -// to *value and returns true; otherwise leaves *value unchanged and returns -// false. -// TODO(chandlerc): Find a better way to refactor flag and environment parsing -// out of both gtest-port.cc and gtest.cc to avoid exporting this utility -// function. -bool ParseInt32(const Message& src_text, const char* str, Int32* value); - -// Parses a bool/Int32/string from the environment variable -// corresponding to the given Google Test flag. -bool BoolFromGTestEnv(const char* flag, bool default_val); -Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); -const char* StringFromGTestEnv(const char* flag, const char* default_val); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-string.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-string.h deleted file mode 100644 index 566a6b57..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-string.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares the String class and functions used internally by -// Google Test. They are subject to change without notice. They should not used -// by code external to Google Test. -// -// This header file is #included by . -// It should not be #included by other files. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ - -#include -#include - -#if GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRING -#include -#endif // GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRING - -namespace testing { -namespace internal { - -// String - a UTF-8 string class. -// -// We cannot use std::string as Microsoft's STL implementation in -// Visual C++ 7.1 has problems when exception is disabled. There is a -// hack to work around this, but we've seen cases where the hack fails -// to work. -// -// Also, String is different from std::string in that it can represent -// both NULL and the empty string, while std::string cannot represent -// NULL. -// -// NULL and the empty string are considered different. NULL is less -// than anything (including the empty string) except itself. -// -// This class only provides minimum functionality necessary for -// implementing Google Test. We do not intend to implement a full-fledged -// string class here. -// -// Since the purpose of this class is to provide a substitute for -// std::string on platforms where it cannot be used, we define a copy -// constructor and assignment operators such that we don't need -// conditional compilation in a lot of places. -// -// In order to make the representation efficient, the d'tor of String -// is not virtual. Therefore DO NOT INHERIT FROM String. -class String { - public: - // Static utility methods - - // Returns the input if it's not NULL, otherwise returns "(null)". - // This function serves two purposes: - // - // 1. ShowCString(NULL) has type 'const char *', instead of the - // type of NULL (which is int). - // - // 2. In MSVC, streaming a null char pointer to StrStream generates - // an access violation, so we need to convert NULL to "(null)" - // before streaming it. - static inline const char* ShowCString(const char* c_str) { - return c_str ? c_str : "(null)"; - } - - // Returns the input enclosed in double quotes if it's not NULL; - // otherwise returns "(null)". For example, "\"Hello\"" is returned - // for input "Hello". - // - // This is useful for printing a C string in the syntax of a literal. - // - // Known issue: escape sequences are not handled yet. - static String ShowCStringQuoted(const char* c_str); - - // Clones a 0-terminated C string, allocating memory using new. The - // caller is responsible for deleting the return value using - // delete[]. Returns the cloned string, or NULL if the input is - // NULL. - // - // This is different from strdup() in string.h, which allocates - // memory using malloc(). - static const char* CloneCString(const char* c_str); - -#ifdef _WIN32_WCE - // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be - // able to pass strings to Win32 APIs on CE we need to convert them - // to 'Unicode', UTF-16. - - // Creates a UTF-16 wide string from the given ANSI string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the wide string, or NULL if the - // input is NULL. - // - // The wide string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static LPCWSTR AnsiToUtf16(const char* c_str); - - // Creates an ANSI string from the given wide string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the ANSI string, or NULL if the - // input is NULL. - // - // The returned string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static const char* Utf16ToAnsi(LPCWSTR utf16_str); -#endif - - // Compares two C strings. Returns true iff they have the same content. - // - // Unlike strcmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CStringEquals(const char* lhs, const char* rhs); - - // Converts a wide C string to a String using the UTF-8 encoding. - // NULL will be converted to "(null)". If an error occurred during - // the conversion, "(failed to convert from wide string)" is - // returned. - static String ShowWideCString(const wchar_t* wide_c_str); - - // Similar to ShowWideCString(), except that this function encloses - // the converted string in double quotes. - static String ShowWideCStringQuoted(const wchar_t* wide_c_str); - - // Compares two wide C strings. Returns true iff they have the same - // content. - // - // Unlike wcscmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); - - // Compares two C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike strcasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CaseInsensitiveCStringEquals(const char* lhs, - const char* rhs); - - // Compares two wide C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike wcscasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL wide C string, - // including the empty string. - // NB: The implementations on different platforms slightly differ. - // On windows, this method uses _wcsicmp which compares according to LC_CTYPE - // environment variable. On GNU platform this method uses wcscasecmp - // which compares according to LC_CTYPE category of the current locale. - // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the - // current locale. - static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, - const wchar_t* rhs); - - // Formats a list of arguments to a String, using the same format - // spec string as for printf. - // - // We do not use the StringPrintf class as it is not universally - // available. - // - // The result is limited to 4096 characters (including the tailing - // 0). If 4096 characters are not enough to format the input, - // "" is returned. - static String Format(const char* format, ...); - - // C'tors - - // The default c'tor constructs a NULL string. - String() : c_str_(NULL) {} - - // Constructs a String by cloning a 0-terminated C string. - String(const char* c_str) : c_str_(NULL) { // NOLINT - *this = c_str; - } - - // Constructs a String by copying a given number of chars from a - // buffer. E.g. String("hello", 3) will create the string "hel". - String(const char* buffer, size_t len); - - // The copy c'tor creates a new copy of the string. The two - // String objects do not share content. - String(const String& str) : c_str_(NULL) { - *this = str; - } - - // D'tor. String is intended to be a final class, so the d'tor - // doesn't need to be virtual. - ~String() { delete[] c_str_; } - - // Allows a String to be implicitly converted to an ::std::string or - // ::string, and vice versa. Converting a String containing a NULL - // pointer to ::std::string or ::string is undefined behavior. - // Converting a ::std::string or ::string containing an embedded NUL - // character to a String will result in the prefix up to the first - // NUL character. -#if GTEST_HAS_STD_STRING - String(const ::std::string& str) : c_str_(NULL) { *this = str.c_str(); } - - operator ::std::string() const { return ::std::string(c_str_); } -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - String(const ::string& str) : c_str_(NULL) { *this = str.c_str(); } - - operator ::string() const { return ::string(c_str_); } -#endif // GTEST_HAS_GLOBAL_STRING - - // Returns true iff this is an empty string (i.e. ""). - bool empty() const { - return (c_str_ != NULL) && (*c_str_ == '\0'); - } - - // Compares this with another String. - // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0 - // if this is greater than rhs. - int Compare(const String& rhs) const; - - // Returns true iff this String equals the given C string. A NULL - // string and a non-NULL string are considered not equal. - bool operator==(const char* c_str) const { - return CStringEquals(c_str_, c_str); - } - - // Returns true iff this String is less than the given C string. A NULL - // string is considered less than "". - bool operator<(const String& rhs) const { return Compare(rhs) < 0; } - - // Returns true iff this String doesn't equal the given C string. A NULL - // string and a non-NULL string are considered not equal. - bool operator!=(const char* c_str) const { - return !CStringEquals(c_str_, c_str); - } - - // Returns true iff this String ends with the given suffix. *Any* - // String is considered to end with a NULL or empty suffix. - bool EndsWith(const char* suffix) const; - - // Returns true iff this String ends with the given suffix, not considering - // case. Any String is considered to end with a NULL or empty suffix. - bool EndsWithCaseInsensitive(const char* suffix) const; - - // Returns the length of the encapsulated string, or -1 if the - // string is NULL. - int GetLength() const { - return c_str_ ? static_cast(strlen(c_str_)) : -1; - } - - // Gets the 0-terminated C string this String object represents. - // The String object still owns the string. Therefore the caller - // should NOT delete the return value. - const char* c_str() const { return c_str_; } - - // Sets the 0-terminated C string this String object represents. - // The old string in this object is deleted, and this object will - // own a clone of the input string. This function copies only up to - // length bytes (plus a terminating null byte), or until the first - // null byte, whichever comes first. - // - // This function works even when the c_str parameter has the same - // value as that of the c_str_ field. - void Set(const char* c_str, size_t length); - - // Assigns a C string to this object. Self-assignment works. - const String& operator=(const char* c_str); - - // Assigns a String object to this object. Self-assignment works. - const String& operator=(const String &rhs) { - *this = rhs.c_str_; - return *this; - } - - private: - const char* c_str_; -}; - -// Streams a String to an ostream. -inline ::std::ostream& operator <<(::std::ostream& os, const String& str) { - // We call String::ShowCString() to convert NULL to "(null)". - // Otherwise we'll get an access violation on Windows. - return os << String::ShowCString(str.c_str()); -} - -// Gets the content of the StrStream's buffer as a String. Each '\0' -// character in the buffer is replaced with "\\0". -String StrStreamToString(StrStream* stream); - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". - -// Declared here but defined in gtest.h, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h deleted file mode 100644 index 1c2034a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h +++ /dev/null @@ -1,945 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2009 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements a subset of TR1 tuple needed by Google Test and Google Mock. - -#ifndef GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ -#define GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ - -#include // For ::std::pair. - -// GTEST_n_TUPLE_(T) is the type of an n-tuple. -#define GTEST_0_TUPLE_(T) tuple<> -#define GTEST_1_TUPLE_(T) tuple -#define GTEST_2_TUPLE_(T) tuple -#define GTEST_3_TUPLE_(T) tuple -#define GTEST_4_TUPLE_(T) tuple -#define GTEST_5_TUPLE_(T) tuple -#define GTEST_6_TUPLE_(T) tuple -#define GTEST_7_TUPLE_(T) tuple -#define GTEST_8_TUPLE_(T) tuple -#define GTEST_9_TUPLE_(T) tuple -#define GTEST_10_TUPLE_(T) tuple - -// GTEST_n_TYPENAMES_(T) declares a list of n typenames. -#define GTEST_0_TYPENAMES_(T) -#define GTEST_1_TYPENAMES_(T) typename T##0 -#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1 -#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2 -#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3 -#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4 -#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5 -#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6 -#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, typename T##7 -#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8 -#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8, typename T##9 - -// In theory, defining stuff in the ::std namespace is undefined -// behavior. We can do this as we are playing the role of a standard -// library vendor. -namespace std { -namespace tr1 { - -template -class tuple; - -// Anything in namespace gtest_internal is Google Test's INTERNAL -// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. -namespace gtest_internal { - -// ByRef::type is T if T is a reference; otherwise it's const T&. -template -struct ByRef { typedef const T& type; }; // NOLINT -template -struct ByRef { typedef T& type; }; // NOLINT - -// A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type - -// AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. -template -struct AddRef { typedef T& type; }; // NOLINT -template -struct AddRef { typedef T& type; }; // NOLINT - -// A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type - -// A helper for implementing get(). -template class Get; - -// A helper for implementing tuple_element. kIndexValid is true -// iff k < the number of fields in tuple type T. -template -struct TupleElement; - -template -struct TupleElement { typedef T0 type; }; - -template -struct TupleElement { typedef T1 type; }; - -template -struct TupleElement { typedef T2 type; }; - -template -struct TupleElement { typedef T3 type; }; - -template -struct TupleElement { typedef T4 type; }; - -template -struct TupleElement { typedef T5 type; }; - -template -struct TupleElement { typedef T6 type; }; - -template -struct TupleElement { typedef T7 type; }; - -template -struct TupleElement { typedef T8 type; }; - -template -struct TupleElement { typedef T9 type; }; - -} // namespace gtest_internal - -template <> -class tuple<> { - public: - tuple() {} - tuple(const tuple& /* t */) {} - tuple& operator=(const tuple& /* t */) { return *this; } -}; - -template -class GTEST_1_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {} - - tuple(const tuple& t) : f0_(t.f0_) {} - - template - tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_1_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) { - f0_ = t.f0_; - return *this; - } - - T0 f0_; -}; - -template -class GTEST_2_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0), - f1_(f1) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {} - - template - tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {} - template - tuple(const ::std::pair& p) : f0_(p.first), f1_(p.second) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_2_TUPLE_(U)& t) { - return CopyFrom(t); - } - template - tuple& operator=(const ::std::pair& p) { - f0_ = p.first; - f1_ = p.second; - return *this; - } - - private: - template - tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - return *this; - } - - T0 f0_; - T1 f1_; -}; - -template -class GTEST_3_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - template - tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_3_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; -}; - -template -class GTEST_4_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {} - - template - tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_4_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; -}; - -template -class GTEST_5_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, - GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_) {} - - template - tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_5_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; -}; - -template -class GTEST_6_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_) {} - - template - tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_6_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; -}; - -template -class GTEST_7_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - template - tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_7_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; -}; - -template -class GTEST_8_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, - GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - template - tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_8_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; -}; - -template -class GTEST_9_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7), f8_(f8) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - template - tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_9_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; -}; - -template -class tuple { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {} - - template - tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), - f9_(t.f9_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_10_TUPLE_(U)& t) { - return CopyFrom(t); - } - - private: - template - tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - f9_ = t.f9_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; - T9 f9_; -}; - -// 6.1.3.2 Tuple creation functions. - -// Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't -// implement tie(). - -inline tuple<> make_tuple() { return tuple<>(); } - -template -inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) { - return GTEST_1_TUPLE_(T)(f0); -} - -template -inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) { - return GTEST_2_TUPLE_(T)(f0, f1); -} - -template -inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) { - return GTEST_3_TUPLE_(T)(f0, f1, f2); -} - -template -inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3) { - return GTEST_4_TUPLE_(T)(f0, f1, f2, f3); -} - -template -inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4) { - return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4); -} - -template -inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5) { - return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5); -} - -template -inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6) { - return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6); -} - -template -inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) { - return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7); -} - -template -inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8) { - return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8); -} - -template -inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8, const T9& f9) { - return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9); -} - -// 6.1.3.3 Tuple helper classes. - -template struct tuple_size; - -template -struct tuple_size { static const int value = 0; }; - -template -struct tuple_size { static const int value = 1; }; - -template -struct tuple_size { static const int value = 2; }; - -template -struct tuple_size { static const int value = 3; }; - -template -struct tuple_size { static const int value = 4; }; - -template -struct tuple_size { static const int value = 5; }; - -template -struct tuple_size { static const int value = 6; }; - -template -struct tuple_size { static const int value = 7; }; - -template -struct tuple_size { static const int value = 8; }; - -template -struct tuple_size { static const int value = 9; }; - -template -struct tuple_size { static const int value = 10; }; - -template -struct tuple_element { - typedef typename gtest_internal::TupleElement< - k < (tuple_size::value), k, Tuple>::type type; -}; - -#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element::type - -// 6.1.3.4 Element access. - -namespace gtest_internal { - -template <> -class Get<0> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - Field(Tuple& t) { return t.f0_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - ConstField(const Tuple& t) { return t.f0_; } -}; - -template <> -class Get<1> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - Field(Tuple& t) { return t.f1_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - ConstField(const Tuple& t) { return t.f1_; } -}; - -template <> -class Get<2> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - Field(Tuple& t) { return t.f2_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - ConstField(const Tuple& t) { return t.f2_; } -}; - -template <> -class Get<3> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - Field(Tuple& t) { return t.f3_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - ConstField(const Tuple& t) { return t.f3_; } -}; - -template <> -class Get<4> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - Field(Tuple& t) { return t.f4_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - ConstField(const Tuple& t) { return t.f4_; } -}; - -template <> -class Get<5> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - Field(Tuple& t) { return t.f5_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - ConstField(const Tuple& t) { return t.f5_; } -}; - -template <> -class Get<6> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - Field(Tuple& t) { return t.f6_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - ConstField(const Tuple& t) { return t.f6_; } -}; - -template <> -class Get<7> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - Field(Tuple& t) { return t.f7_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - ConstField(const Tuple& t) { return t.f7_; } -}; - -template <> -class Get<8> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - Field(Tuple& t) { return t.f8_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - ConstField(const Tuple& t) { return t.f8_; } -}; - -template <> -class Get<9> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - Field(Tuple& t) { return t.f9_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - ConstField(const Tuple& t) { return t.f9_; } -}; - -} // namespace gtest_internal - -template -GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::Field(t); -} - -template -GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(const GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::ConstField(t); -} - -// 6.1.3.5 Relational operators - -// We only implement == and !=, as we don't have a need for the rest yet. - -namespace gtest_internal { - -// SameSizeTuplePrefixComparator::Eq(t1, t2) returns true if the -// first k fields of t1 equals the first k fields of t2. -// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if -// k1 != k2. -template -struct SameSizeTuplePrefixComparator; - -template <> -struct SameSizeTuplePrefixComparator<0, 0> { - template - static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { - return true; - } -}; - -template -struct SameSizeTuplePrefixComparator { - template - static bool Eq(const Tuple1& t1, const Tuple2& t2) { - return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); - } -}; - -} // namespace gtest_internal - -template -inline bool operator==(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { - return gtest_internal::SameSizeTuplePrefixComparator< - tuple_size::value, - tuple_size::value>::Eq(t, u); -} - -template -inline bool operator!=(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { return !(t == u); } - -// 6.1.4 Pairs. -// Unimplemented. - -} // namespace tr1 -} // namespace std - -#undef GTEST_0_TUPLE_ -#undef GTEST_1_TUPLE_ -#undef GTEST_2_TUPLE_ -#undef GTEST_3_TUPLE_ -#undef GTEST_4_TUPLE_ -#undef GTEST_5_TUPLE_ -#undef GTEST_6_TUPLE_ -#undef GTEST_7_TUPLE_ -#undef GTEST_8_TUPLE_ -#undef GTEST_9_TUPLE_ -#undef GTEST_10_TUPLE_ - -#undef GTEST_0_TYPENAMES_ -#undef GTEST_1_TYPENAMES_ -#undef GTEST_2_TYPENAMES_ -#undef GTEST_3_TYPENAMES_ -#undef GTEST_4_TYPENAMES_ -#undef GTEST_5_TYPENAMES_ -#undef GTEST_6_TYPENAMES_ -#undef GTEST_7_TYPENAMES_ -#undef GTEST_8_TYPENAMES_ -#undef GTEST_9_TYPENAMES_ -#undef GTEST_10_TYPENAMES_ - -#undef GTEST_BY_REF_ -#undef GTEST_ADD_REF_ -#undef GTEST_TUPLE_ELEMENT_ - -#endif // GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h.pump deleted file mode 100644 index 1ea70859..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-tuple.h.pump +++ /dev/null @@ -1,320 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 10 $$ Maximum number of tuple fields we want to support. -$$ This meta comment fixes auto-indentation in Emacs. }} -// Copyright 2009 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements a subset of TR1 tuple needed by Google Test and Google Mock. - -#ifndef GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ -#define GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ - -#include // For ::std::pair. - - -$range i 0..n-1 -$range j 0..n -$range k 1..n -// GTEST_n_TUPLE_(T) is the type of an n-tuple. - -$for j [[ -$range m 0..j-1 -#define GTEST_$(j)_TUPLE_(T) tuple<$for m, [[T##$m]]> - -]] - -// GTEST_n_TYPENAMES_(T) declares a list of n typenames. - -$for j [[ -$range m 0..j-1 -#define GTEST_$(j)_TYPENAMES_(T) $for m, [[typename T##$m]] - - -]] - -// In theory, defining stuff in the ::std namespace is undefined -// behavior. We can do this as we are playing the role of a standard -// library vendor. -namespace std { -namespace tr1 { - -template <$for i, [[typename T$i = void]]> -class tuple; - -// Anything in namespace gtest_internal is Google Test's INTERNAL -// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. -namespace gtest_internal { - -// ByRef::type is T if T is a reference; otherwise it's const T&. -template -struct ByRef { typedef const T& type; }; // NOLINT -template -struct ByRef { typedef T& type; }; // NOLINT - -// A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type - -// AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. -template -struct AddRef { typedef T& type; }; // NOLINT -template -struct AddRef { typedef T& type; }; // NOLINT - -// A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type - -// A helper for implementing get(). -template class Get; - -// A helper for implementing tuple_element. kIndexValid is true -// iff k < the number of fields in tuple type T. -template -struct TupleElement; - - -$for i [[ -template -struct TupleElement [[]] -{ typedef T$i type; }; - - -]] -} // namespace gtest_internal - -template <> -class tuple<> { - public: - tuple() {} - tuple(const tuple& /* t */) {} - tuple& operator=(const tuple& /* t */) { return *this; } -}; - - -$for k [[ -$range m 0..k-1 -template -class $if k < n [[GTEST_$(k)_TUPLE_(T)]] $else [[tuple]] { - public: - template friend class gtest_internal::Get; - template friend class tuple; - - tuple() {} - - explicit tuple($for m, [[GTEST_BY_REF_(T$m) f$m]]) : [[]] -$for m, [[f$(m)_(f$m)]] {} - - tuple(const tuple& t) : $for m, [[f$(m)_(t.f$(m)_)]] {} - - template - tuple(const GTEST_$(k)_TUPLE_(U)& t) : $for m, [[f$(m)_(t.f$(m)_)]] {} - -$if k == 2 [[ - template - tuple(const ::std::pair& p) : f0_(p.first), f1_(p.second) {} - -]] - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_$(k)_TUPLE_(U)& t) { - return CopyFrom(t); - } - -$if k == 2 [[ - template - tuple& operator=(const ::std::pair& p) { - f0_ = p.first; - f1_ = p.second; - return *this; - } - -]] - - private: - template - tuple& CopyFrom(const GTEST_$(k)_TUPLE_(U)& t) { - -$for m [[ - f$(m)_ = t.f$(m)_; - -]] - return *this; - } - - -$for m [[ - T$m f$(m)_; - -]] -}; - - -]] -// 6.1.3.2 Tuple creation functions. - -// Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't -// implement tie(). - -inline tuple<> make_tuple() { return tuple<>(); } - -$for k [[ -$range m 0..k-1 - -template -inline GTEST_$(k)_TUPLE_(T) make_tuple($for m, [[const T$m& f$m]]) { - return GTEST_$(k)_TUPLE_(T)($for m, [[f$m]]); -} - -]] - -// 6.1.3.3 Tuple helper classes. - -template struct tuple_size; - - -$for j [[ -template -struct tuple_size { static const int value = $j; }; - - -]] -template -struct tuple_element { - typedef typename gtest_internal::TupleElement< - k < (tuple_size::value), k, Tuple>::type type; -}; - -#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element::type - -// 6.1.3.4 Element access. - -namespace gtest_internal { - - -$for i [[ -template <> -class Get<$i> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple)) - Field(Tuple& t) { return t.f$(i)_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple)) - ConstField(const Tuple& t) { return t.f$(i)_; } -}; - - -]] -} // namespace gtest_internal - -template -GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T))) -get(GTEST_$(n)_TUPLE_(T)& t) { - return gtest_internal::Get::Field(t); -} - -template -GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T))) -get(const GTEST_$(n)_TUPLE_(T)& t) { - return gtest_internal::Get::ConstField(t); -} - -// 6.1.3.5 Relational operators - -// We only implement == and !=, as we don't have a need for the rest yet. - -namespace gtest_internal { - -// SameSizeTuplePrefixComparator::Eq(t1, t2) returns true if the -// first k fields of t1 equals the first k fields of t2. -// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if -// k1 != k2. -template -struct SameSizeTuplePrefixComparator; - -template <> -struct SameSizeTuplePrefixComparator<0, 0> { - template - static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { - return true; - } -}; - -template -struct SameSizeTuplePrefixComparator { - template - static bool Eq(const Tuple1& t1, const Tuple2& t2) { - return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); - } -}; - -} // namespace gtest_internal - -template -inline bool operator==(const GTEST_$(n)_TUPLE_(T)& t, - const GTEST_$(n)_TUPLE_(U)& u) { - return gtest_internal::SameSizeTuplePrefixComparator< - tuple_size::value, - tuple_size::value>::Eq(t, u); -} - -template -inline bool operator!=(const GTEST_$(n)_TUPLE_(T)& t, - const GTEST_$(n)_TUPLE_(U)& u) { return !(t == u); } - -// 6.1.4 Pairs. -// Unimplemented. - -} // namespace tr1 -} // namespace std - - -$for j [[ -#undef GTEST_$(j)_TUPLE_ - -]] - - -$for j [[ -#undef GTEST_$(j)_TYPENAMES_ - -]] - -#undef GTEST_BY_REF_ -#undef GTEST_ADD_REF_ -#undef GTEST_TUPLE_ELEMENT_ - -#endif // GTEST_INCLUDE_GTEST_INTERAL_GTEST_TUPLE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h deleted file mode 100644 index f1b1bedd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h +++ /dev/null @@ -1,3321 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Type utilities needed for implementing typed and type-parameterized -// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently we support at most 50 types in a list, and at most 50 -// type-parameterized tests in one type-parameterized test case. -// Please contact googletestframework@googlegroups.com if you need -// more. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - -#include -#include - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// #ifdef __GNUC__ is too general here. It is possible to use gcc without using -// libstdc++ (which is where cxxabi.h comes from). -#ifdef __GLIBCXX__ -#include -#endif // __GLIBCXX__ - -#include - -namespace testing { -namespace internal { - -// AssertyTypeEq::type is defined iff T1 and T2 are the same -// type. This can be used as a compile-time assertion to ensure that -// two types are equal. - -template -struct AssertTypeEq; - -template -struct AssertTypeEq { - typedef bool type; -}; - -// GetTypeName() returns a human-readable name of type T. -template -String GetTypeName() { -#if GTEST_HAS_RTTI - - const char* const name = typeid(T).name(); -#ifdef __GLIBCXX__ - int status = 0; - // gcc's implementation of typeid(T).name() mangles the type name, - // so we have to demangle it. - char* const readable_name = abi::__cxa_demangle(name, 0, 0, &status); - const String name_str(status == 0 ? readable_name : name); - free(readable_name); - return name_str; -#else - return name; -#endif // __GLIBCXX__ - -#else - return ""; -#endif // GTEST_HAS_RTTI -} - -// A unique type used as the default value for the arguments of class -// template Types. This allows us to simulate variadic templates -// (e.g. Types, Type, and etc), which C++ doesn't -// support directly. -struct None {}; - -// The following family of struct and struct templates are used to -// represent type lists. In particular, TypesN -// represents a type list with N types (T1, T2, ..., and TN) in it. -// Except for Types0, every struct in the family has two member types: -// Head for the first type in the list, and Tail for the rest of the -// list. - -// The empty type list. -struct Types0 {}; - -// Type lists of length 1, 2, 3, and so on. - -template -struct Types1 { - typedef T1 Head; - typedef Types0 Tail; -}; -template -struct Types2 { - typedef T1 Head; - typedef Types1 Tail; -}; - -template -struct Types3 { - typedef T1 Head; - typedef Types2 Tail; -}; - -template -struct Types4 { - typedef T1 Head; - typedef Types3 Tail; -}; - -template -struct Types5 { - typedef T1 Head; - typedef Types4 Tail; -}; - -template -struct Types6 { - typedef T1 Head; - typedef Types5 Tail; -}; - -template -struct Types7 { - typedef T1 Head; - typedef Types6 Tail; -}; - -template -struct Types8 { - typedef T1 Head; - typedef Types7 Tail; -}; - -template -struct Types9 { - typedef T1 Head; - typedef Types8 Tail; -}; - -template -struct Types10 { - typedef T1 Head; - typedef Types9 Tail; -}; - -template -struct Types11 { - typedef T1 Head; - typedef Types10 Tail; -}; - -template -struct Types12 { - typedef T1 Head; - typedef Types11 Tail; -}; - -template -struct Types13 { - typedef T1 Head; - typedef Types12 Tail; -}; - -template -struct Types14 { - typedef T1 Head; - typedef Types13 Tail; -}; - -template -struct Types15 { - typedef T1 Head; - typedef Types14 Tail; -}; - -template -struct Types16 { - typedef T1 Head; - typedef Types15 Tail; -}; - -template -struct Types17 { - typedef T1 Head; - typedef Types16 Tail; -}; - -template -struct Types18 { - typedef T1 Head; - typedef Types17 Tail; -}; - -template -struct Types19 { - typedef T1 Head; - typedef Types18 Tail; -}; - -template -struct Types20 { - typedef T1 Head; - typedef Types19 Tail; -}; - -template -struct Types21 { - typedef T1 Head; - typedef Types20 Tail; -}; - -template -struct Types22 { - typedef T1 Head; - typedef Types21 Tail; -}; - -template -struct Types23 { - typedef T1 Head; - typedef Types22 Tail; -}; - -template -struct Types24 { - typedef T1 Head; - typedef Types23 Tail; -}; - -template -struct Types25 { - typedef T1 Head; - typedef Types24 Tail; -}; - -template -struct Types26 { - typedef T1 Head; - typedef Types25 Tail; -}; - -template -struct Types27 { - typedef T1 Head; - typedef Types26 Tail; -}; - -template -struct Types28 { - typedef T1 Head; - typedef Types27 Tail; -}; - -template -struct Types29 { - typedef T1 Head; - typedef Types28 Tail; -}; - -template -struct Types30 { - typedef T1 Head; - typedef Types29 Tail; -}; - -template -struct Types31 { - typedef T1 Head; - typedef Types30 Tail; -}; - -template -struct Types32 { - typedef T1 Head; - typedef Types31 Tail; -}; - -template -struct Types33 { - typedef T1 Head; - typedef Types32 Tail; -}; - -template -struct Types34 { - typedef T1 Head; - typedef Types33 Tail; -}; - -template -struct Types35 { - typedef T1 Head; - typedef Types34 Tail; -}; - -template -struct Types36 { - typedef T1 Head; - typedef Types35 Tail; -}; - -template -struct Types37 { - typedef T1 Head; - typedef Types36 Tail; -}; - -template -struct Types38 { - typedef T1 Head; - typedef Types37 Tail; -}; - -template -struct Types39 { - typedef T1 Head; - typedef Types38 Tail; -}; - -template -struct Types40 { - typedef T1 Head; - typedef Types39 Tail; -}; - -template -struct Types41 { - typedef T1 Head; - typedef Types40 Tail; -}; - -template -struct Types42 { - typedef T1 Head; - typedef Types41 Tail; -}; - -template -struct Types43 { - typedef T1 Head; - typedef Types42 Tail; -}; - -template -struct Types44 { - typedef T1 Head; - typedef Types43 Tail; -}; - -template -struct Types45 { - typedef T1 Head; - typedef Types44 Tail; -}; - -template -struct Types46 { - typedef T1 Head; - typedef Types45 Tail; -}; - -template -struct Types47 { - typedef T1 Head; - typedef Types46 Tail; -}; - -template -struct Types48 { - typedef T1 Head; - typedef Types47 Tail; -}; - -template -struct Types49 { - typedef T1 Head; - typedef Types48 Tail; -}; - -template -struct Types50 { - typedef T1 Head; - typedef Types49 Tail; -}; - - -} // namespace internal - -// We don't want to require the users to write TypesN<...> directly, -// as that would require them to count the length. Types<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Types -// will appear as Types in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Types, and Google Test will translate -// that to TypesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Types template. -template -struct Types { - typedef internal::Types50 type; -}; - -template <> -struct Types { - typedef internal::Types0 type; -}; -template -struct Types { - typedef internal::Types1 type; -}; -template -struct Types { - typedef internal::Types2 type; -}; -template -struct Types { - typedef internal::Types3 type; -}; -template -struct Types { - typedef internal::Types4 type; -}; -template -struct Types { - typedef internal::Types5 type; -}; -template -struct Types { - typedef internal::Types6 type; -}; -template -struct Types { - typedef internal::Types7 type; -}; -template -struct Types { - typedef internal::Types8 type; -}; -template -struct Types { - typedef internal::Types9 type; -}; -template -struct Types { - typedef internal::Types10 type; -}; -template -struct Types { - typedef internal::Types11 type; -}; -template -struct Types { - typedef internal::Types12 type; -}; -template -struct Types { - typedef internal::Types13 type; -}; -template -struct Types { - typedef internal::Types14 type; -}; -template -struct Types { - typedef internal::Types15 type; -}; -template -struct Types { - typedef internal::Types16 type; -}; -template -struct Types { - typedef internal::Types17 type; -}; -template -struct Types { - typedef internal::Types18 type; -}; -template -struct Types { - typedef internal::Types19 type; -}; -template -struct Types { - typedef internal::Types20 type; -}; -template -struct Types { - typedef internal::Types21 type; -}; -template -struct Types { - typedef internal::Types22 type; -}; -template -struct Types { - typedef internal::Types23 type; -}; -template -struct Types { - typedef internal::Types24 type; -}; -template -struct Types { - typedef internal::Types25 type; -}; -template -struct Types { - typedef internal::Types26 type; -}; -template -struct Types { - typedef internal::Types27 type; -}; -template -struct Types { - typedef internal::Types28 type; -}; -template -struct Types { - typedef internal::Types29 type; -}; -template -struct Types { - typedef internal::Types30 type; -}; -template -struct Types { - typedef internal::Types31 type; -}; -template -struct Types { - typedef internal::Types32 type; -}; -template -struct Types { - typedef internal::Types33 type; -}; -template -struct Types { - typedef internal::Types34 type; -}; -template -struct Types { - typedef internal::Types35 type; -}; -template -struct Types { - typedef internal::Types36 type; -}; -template -struct Types { - typedef internal::Types37 type; -}; -template -struct Types { - typedef internal::Types38 type; -}; -template -struct Types { - typedef internal::Types39 type; -}; -template -struct Types { - typedef internal::Types40 type; -}; -template -struct Types { - typedef internal::Types41 type; -}; -template -struct Types { - typedef internal::Types42 type; -}; -template -struct Types { - typedef internal::Types43 type; -}; -template -struct Types { - typedef internal::Types44 type; -}; -template -struct Types { - typedef internal::Types45 type; -}; -template -struct Types { - typedef internal::Types46 type; -}; -template -struct Types { - typedef internal::Types47 type; -}; -template -struct Types { - typedef internal::Types48 type; -}; -template -struct Types { - typedef internal::Types49 type; -}; - -namespace internal { - -#define GTEST_TEMPLATE_ template class - -// The template "selector" struct TemplateSel is used to -// represent Tmpl, which must be a class template with one type -// parameter, as a type. TemplateSel::Bind::type is defined -// as the type Tmpl. This allows us to actually instantiate the -// template "selected" by TemplateSel. -// -// This trick is necessary for simulating typedef for class templates, -// which C++ doesn't support directly. -template -struct TemplateSel { - template - struct Bind { - typedef Tmpl type; - }; -}; - -#define GTEST_BIND_(TmplSel, T) \ - TmplSel::template Bind::type - -// A unique struct template used as the default value for the -// arguments of class template Templates. This allows us to simulate -// variadic templates (e.g. Templates, Templates, -// and etc), which C++ doesn't support directly. -template -struct NoneT {}; - -// The following family of struct and struct templates are used to -// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except -// for Templates0, every struct in the family has two member types: -// Head for the selector of the first template in the list, and Tail -// for the rest of the list. - -// The empty template list. -struct Templates0 {}; - -// Template lists of length 1, 2, 3, and so on. - -template -struct Templates1 { - typedef TemplateSel Head; - typedef Templates0 Tail; -}; -template -struct Templates2 { - typedef TemplateSel Head; - typedef Templates1 Tail; -}; - -template -struct Templates3 { - typedef TemplateSel Head; - typedef Templates2 Tail; -}; - -template -struct Templates4 { - typedef TemplateSel Head; - typedef Templates3 Tail; -}; - -template -struct Templates5 { - typedef TemplateSel Head; - typedef Templates4 Tail; -}; - -template -struct Templates6 { - typedef TemplateSel Head; - typedef Templates5 Tail; -}; - -template -struct Templates7 { - typedef TemplateSel Head; - typedef Templates6 Tail; -}; - -template -struct Templates8 { - typedef TemplateSel Head; - typedef Templates7 Tail; -}; - -template -struct Templates9 { - typedef TemplateSel Head; - typedef Templates8 Tail; -}; - -template -struct Templates10 { - typedef TemplateSel Head; - typedef Templates9 Tail; -}; - -template -struct Templates11 { - typedef TemplateSel Head; - typedef Templates10 Tail; -}; - -template -struct Templates12 { - typedef TemplateSel Head; - typedef Templates11 Tail; -}; - -template -struct Templates13 { - typedef TemplateSel Head; - typedef Templates12 Tail; -}; - -template -struct Templates14 { - typedef TemplateSel Head; - typedef Templates13 Tail; -}; - -template -struct Templates15 { - typedef TemplateSel Head; - typedef Templates14 Tail; -}; - -template -struct Templates16 { - typedef TemplateSel Head; - typedef Templates15 Tail; -}; - -template -struct Templates17 { - typedef TemplateSel Head; - typedef Templates16 Tail; -}; - -template -struct Templates18 { - typedef TemplateSel Head; - typedef Templates17 Tail; -}; - -template -struct Templates19 { - typedef TemplateSel Head; - typedef Templates18 Tail; -}; - -template -struct Templates20 { - typedef TemplateSel Head; - typedef Templates19 Tail; -}; - -template -struct Templates21 { - typedef TemplateSel Head; - typedef Templates20 Tail; -}; - -template -struct Templates22 { - typedef TemplateSel Head; - typedef Templates21 Tail; -}; - -template -struct Templates23 { - typedef TemplateSel Head; - typedef Templates22 Tail; -}; - -template -struct Templates24 { - typedef TemplateSel Head; - typedef Templates23 Tail; -}; - -template -struct Templates25 { - typedef TemplateSel Head; - typedef Templates24 Tail; -}; - -template -struct Templates26 { - typedef TemplateSel Head; - typedef Templates25 Tail; -}; - -template -struct Templates27 { - typedef TemplateSel Head; - typedef Templates26 Tail; -}; - -template -struct Templates28 { - typedef TemplateSel Head; - typedef Templates27 Tail; -}; - -template -struct Templates29 { - typedef TemplateSel Head; - typedef Templates28 Tail; -}; - -template -struct Templates30 { - typedef TemplateSel Head; - typedef Templates29 Tail; -}; - -template -struct Templates31 { - typedef TemplateSel Head; - typedef Templates30 Tail; -}; - -template -struct Templates32 { - typedef TemplateSel Head; - typedef Templates31 Tail; -}; - -template -struct Templates33 { - typedef TemplateSel Head; - typedef Templates32 Tail; -}; - -template -struct Templates34 { - typedef TemplateSel Head; - typedef Templates33 Tail; -}; - -template -struct Templates35 { - typedef TemplateSel Head; - typedef Templates34 Tail; -}; - -template -struct Templates36 { - typedef TemplateSel Head; - typedef Templates35 Tail; -}; - -template -struct Templates37 { - typedef TemplateSel Head; - typedef Templates36 Tail; -}; - -template -struct Templates38 { - typedef TemplateSel Head; - typedef Templates37 Tail; -}; - -template -struct Templates39 { - typedef TemplateSel Head; - typedef Templates38 Tail; -}; - -template -struct Templates40 { - typedef TemplateSel Head; - typedef Templates39 Tail; -}; - -template -struct Templates41 { - typedef TemplateSel Head; - typedef Templates40 Tail; -}; - -template -struct Templates42 { - typedef TemplateSel Head; - typedef Templates41 Tail; -}; - -template -struct Templates43 { - typedef TemplateSel Head; - typedef Templates42 Tail; -}; - -template -struct Templates44 { - typedef TemplateSel Head; - typedef Templates43 Tail; -}; - -template -struct Templates45 { - typedef TemplateSel Head; - typedef Templates44 Tail; -}; - -template -struct Templates46 { - typedef TemplateSel Head; - typedef Templates45 Tail; -}; - -template -struct Templates47 { - typedef TemplateSel Head; - typedef Templates46 Tail; -}; - -template -struct Templates48 { - typedef TemplateSel Head; - typedef Templates47 Tail; -}; - -template -struct Templates49 { - typedef TemplateSel Head; - typedef Templates48 Tail; -}; - -template -struct Templates50 { - typedef TemplateSel Head; - typedef Templates49 Tail; -}; - - -// We don't want to require the users to write TemplatesN<...> directly, -// as that would require them to count the length. Templates<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Templates -// will appear as Templates in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Templates, and Google Test will translate -// that to TemplatesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Templates template. -template -struct Templates { - typedef Templates50 type; -}; - -template <> -struct Templates { - typedef Templates0 type; -}; -template -struct Templates { - typedef Templates1 type; -}; -template -struct Templates { - typedef Templates2 type; -}; -template -struct Templates { - typedef Templates3 type; -}; -template -struct Templates { - typedef Templates4 type; -}; -template -struct Templates { - typedef Templates5 type; -}; -template -struct Templates { - typedef Templates6 type; -}; -template -struct Templates { - typedef Templates7 type; -}; -template -struct Templates { - typedef Templates8 type; -}; -template -struct Templates { - typedef Templates9 type; -}; -template -struct Templates { - typedef Templates10 type; -}; -template -struct Templates { - typedef Templates11 type; -}; -template -struct Templates { - typedef Templates12 type; -}; -template -struct Templates { - typedef Templates13 type; -}; -template -struct Templates { - typedef Templates14 type; -}; -template -struct Templates { - typedef Templates15 type; -}; -template -struct Templates { - typedef Templates16 type; -}; -template -struct Templates { - typedef Templates17 type; -}; -template -struct Templates { - typedef Templates18 type; -}; -template -struct Templates { - typedef Templates19 type; -}; -template -struct Templates { - typedef Templates20 type; -}; -template -struct Templates { - typedef Templates21 type; -}; -template -struct Templates { - typedef Templates22 type; -}; -template -struct Templates { - typedef Templates23 type; -}; -template -struct Templates { - typedef Templates24 type; -}; -template -struct Templates { - typedef Templates25 type; -}; -template -struct Templates { - typedef Templates26 type; -}; -template -struct Templates { - typedef Templates27 type; -}; -template -struct Templates { - typedef Templates28 type; -}; -template -struct Templates { - typedef Templates29 type; -}; -template -struct Templates { - typedef Templates30 type; -}; -template -struct Templates { - typedef Templates31 type; -}; -template -struct Templates { - typedef Templates32 type; -}; -template -struct Templates { - typedef Templates33 type; -}; -template -struct Templates { - typedef Templates34 type; -}; -template -struct Templates { - typedef Templates35 type; -}; -template -struct Templates { - typedef Templates36 type; -}; -template -struct Templates { - typedef Templates37 type; -}; -template -struct Templates { - typedef Templates38 type; -}; -template -struct Templates { - typedef Templates39 type; -}; -template -struct Templates { - typedef Templates40 type; -}; -template -struct Templates { - typedef Templates41 type; -}; -template -struct Templates { - typedef Templates42 type; -}; -template -struct Templates { - typedef Templates43 type; -}; -template -struct Templates { - typedef Templates44 type; -}; -template -struct Templates { - typedef Templates45 type; -}; -template -struct Templates { - typedef Templates46 type; -}; -template -struct Templates { - typedef Templates47 type; -}; -template -struct Templates { - typedef Templates48 type; -}; -template -struct Templates { - typedef Templates49 type; -}; - -// The TypeList template makes it possible to use either a single type -// or a Types<...> list in TYPED_TEST_CASE() and -// INSTANTIATE_TYPED_TEST_CASE_P(). - -template -struct TypeList { typedef Types1 type; }; - -template -struct TypeList > { - typedef typename Types::type type; -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h.pump deleted file mode 100644 index 3eb5dcee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/include/gtest/internal/gtest-type-util.h.pump +++ /dev/null @@ -1,289 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of type lists we want to support. -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Type utilities needed for implementing typed and type-parameterized -// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently we support at most $n types in a list, and at most $n -// type-parameterized tests in one type-parameterized test case. -// Please contact googletestframework@googlegroups.com if you need -// more. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - -#include -#include - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// #ifdef __GNUC__ is too general here. It is possible to use gcc without using -// libstdc++ (which is where cxxabi.h comes from). -#ifdef __GLIBCXX__ -#include -#endif // __GLIBCXX__ - -#include - -namespace testing { -namespace internal { - -// AssertyTypeEq::type is defined iff T1 and T2 are the same -// type. This can be used as a compile-time assertion to ensure that -// two types are equal. - -template -struct AssertTypeEq; - -template -struct AssertTypeEq { - typedef bool type; -}; - -// GetTypeName() returns a human-readable name of type T. -template -String GetTypeName() { -#if GTEST_HAS_RTTI - - const char* const name = typeid(T).name(); -#ifdef __GLIBCXX__ - int status = 0; - // gcc's implementation of typeid(T).name() mangles the type name, - // so we have to demangle it. - char* const readable_name = abi::__cxa_demangle(name, 0, 0, &status); - const String name_str(status == 0 ? readable_name : name); - free(readable_name); - return name_str; -#else - return name; -#endif // __GLIBCXX__ - -#else - return ""; -#endif // GTEST_HAS_RTTI -} - -// A unique type used as the default value for the arguments of class -// template Types. This allows us to simulate variadic templates -// (e.g. Types, Type, and etc), which C++ doesn't -// support directly. -struct None {}; - -// The following family of struct and struct templates are used to -// represent type lists. In particular, TypesN -// represents a type list with N types (T1, T2, ..., and TN) in it. -// Except for Types0, every struct in the family has two member types: -// Head for the first type in the list, and Tail for the rest of the -// list. - -// The empty type list. -struct Types0 {}; - -// Type lists of length 1, 2, 3, and so on. - -template -struct Types1 { - typedef T1 Head; - typedef Types0 Tail; -}; - -$range i 2..n - -$for i [[ -$range j 1..i -$range k 2..i -template <$for j, [[typename T$j]]> -struct Types$i { - typedef T1 Head; - typedef Types$(i-1)<$for k, [[T$k]]> Tail; -}; - - -]] - -} // namespace internal - -// We don't want to require the users to write TypesN<...> directly, -// as that would require them to count the length. Types<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Types -// will appear as Types in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Types, and Google Test will translate -// that to TypesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Types template. - -$range i 1..n -template <$for i, [[typename T$i = internal::None]]> -struct Types { - typedef internal::Types$n<$for i, [[T$i]]> type; -}; - -template <> -struct Types<$for i, [[internal::None]]> { - typedef internal::Types0 type; -}; - -$range i 1..n-1 -$for i [[ -$range j 1..i -$range k i+1..n -template <$for j, [[typename T$j]]> -struct Types<$for j, [[T$j]]$for k[[, internal::None]]> { - typedef internal::Types$i<$for j, [[T$j]]> type; -}; - -]] - -namespace internal { - -#define GTEST_TEMPLATE_ template class - -// The template "selector" struct TemplateSel is used to -// represent Tmpl, which must be a class template with one type -// parameter, as a type. TemplateSel::Bind::type is defined -// as the type Tmpl. This allows us to actually instantiate the -// template "selected" by TemplateSel. -// -// This trick is necessary for simulating typedef for class templates, -// which C++ doesn't support directly. -template -struct TemplateSel { - template - struct Bind { - typedef Tmpl type; - }; -}; - -#define GTEST_BIND_(TmplSel, T) \ - TmplSel::template Bind::type - -// A unique struct template used as the default value for the -// arguments of class template Templates. This allows us to simulate -// variadic templates (e.g. Templates, Templates, -// and etc), which C++ doesn't support directly. -template -struct NoneT {}; - -// The following family of struct and struct templates are used to -// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except -// for Templates0, every struct in the family has two member types: -// Head for the selector of the first template in the list, and Tail -// for the rest of the list. - -// The empty template list. -struct Templates0 {}; - -// Template lists of length 1, 2, 3, and so on. - -template -struct Templates1 { - typedef TemplateSel Head; - typedef Templates0 Tail; -}; - -$range i 2..n - -$for i [[ -$range j 1..i -$range k 2..i -template <$for j, [[GTEST_TEMPLATE_ T$j]]> -struct Templates$i { - typedef TemplateSel Head; - typedef Templates$(i-1)<$for k, [[T$k]]> Tail; -}; - - -]] - -// We don't want to require the users to write TemplatesN<...> directly, -// as that would require them to count the length. Templates<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Templates -// will appear as Templates in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Templates, and Google Test will translate -// that to TemplatesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Templates template. - -$range i 1..n -template <$for i, [[GTEST_TEMPLATE_ T$i = NoneT]]> -struct Templates { - typedef Templates$n<$for i, [[T$i]]> type; -}; - -template <> -struct Templates<$for i, [[NoneT]]> { - typedef Templates0 type; -}; - -$range i 1..n-1 -$for i [[ -$range j 1..i -$range k i+1..n -template <$for j, [[GTEST_TEMPLATE_ T$j]]> -struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> { - typedef Templates$i<$for j, [[T$j]]> type; -}; - -]] - -// The TypeList template makes it possible to use either a single type -// or a Types<...> list in TYPED_TEST_CASE() and -// INSTANTIATE_TYPED_TEST_CASE_P(). - -template -struct TypeList { typedef Types1 type; }; - - -$range i 1..n -template <$for i, [[typename T$i]]> -struct TypeList > { - typedef typename Types<$for i, [[T$i]]>::type type; -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/acx_pthread.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/acx_pthread.m4 deleted file mode 100644 index 2cf20de1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/acx_pthread.m4 +++ /dev/null @@ -1,363 +0,0 @@ -# This was retrieved from -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi -# See also (perhaps for new versions?) -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi -# -# We've rewritten the inconsistency check code (from avahi), to work -# more broadly. In particular, it no longer assumes ld accepts -zdefs. -# This caused a restructing of the code, but the functionality has only -# changed a little. - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl @summary figure out how to build C programs using POSIX threads -dnl -dnl This macro figures out how to build C programs using POSIX threads. -dnl It sets the PTHREAD_LIBS output variable to the threads library and -dnl linker flags, and the PTHREAD_CFLAGS output variable to any special -dnl C compiler flags that are needed. (The user can also force certain -dnl compiler flags/libs to be tested by setting these environment -dnl variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. e.g. you should link -dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS -dnl $LIBS -dnl -dnl If you are only building threads programs, you may wish to use -dnl these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to -dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to -dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the -dnl default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, or -dnl if you have any other suggestions or comments. This macro was based -dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with -dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros -dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. -dnl We are also grateful for the helpful feedback of numerous users. -dnl -dnl @category InstalledPackages -dnl @author Steven G. Johnson -dnl @version 2006-05-29 -dnl @license GPLWithACException -dnl -dnl Checks for GCC shared/pthread inconsistency based on work by -dnl Marcin Owsiany - - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi - - # The next part tries to detect GCC inconsistency with -shared on some - # architectures and systems. The problem is that in certain - # configurations, when -shared is specified, GCC "forgets" to - # internally use various flags which are still necessary. - - # - # Prepare the flags - # - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - save_CC="$CC" - - # Try with the flags determined by the earlier checks. - # - # -Wl,-z,defs forces link-time symbol resolution, so that the - # linking checks with -shared actually have any value - # - # FIXME: -fPIC is required for -shared on many architectures, - # so we specify it here, but the right way would probably be to - # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CC="$PTHREAD_CC" - - # In order not to create several levels of indentation, we test - # the value of "$done" until we find the cure or run out of ideas. - done="no" - - # First, make sure the CFLAGS we added are actually accepted by our - # compiler. If not (and OS X's ld, for instance, does not accept -z), - # then we can't do this test. - if test x"$done" = xno; then - AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies]) - AC_TRY_LINK(,, , [done=yes]) - - if test "x$done" = xyes ; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi - fi - - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -pthread is sufficient with -shared]) - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - - # - # Linux gcc on some architectures such as mips/mipsel forgets - # about -lpthread - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lpthread fixes that]) - LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - # - # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lc_r fixes that]) - LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - if test x"$done" = xno; then - # OK, we have run out of ideas - AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries]) - - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/gtest.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/gtest.m4 deleted file mode 100644 index 6598ba75..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/m4/gtest.m4 +++ /dev/null @@ -1,74 +0,0 @@ -dnl GTEST_LIB_CHECK([minimum version [, -dnl action if found [,action if not found]]]) -dnl -dnl Check for the presence of the Google Test library, optionally at a minimum -dnl version, and indicate a viable version with the HAVE_GTEST flag. It defines -dnl standard variables for substitution including GTEST_CPPFLAGS, -dnl GTEST_CXXFLAGS, GTEST_LDFLAGS, and GTEST_LIBS. It also defines -dnl GTEST_VERSION as the version of Google Test found. Finally, it provides -dnl optional custom action slots in the event GTEST is found or not. -AC_DEFUN([GTEST_LIB_CHECK], -[ -dnl Provide a flag to enable or disable Google Test usage. -AC_ARG_ENABLE([gtest], - [AS_HELP_STRING([--enable-gtest], - [Enable tests using the Google C++ Testing Framework. - (Default is enabled.)])], - [], - [enable_gtest=]) -AC_ARG_VAR([GTEST_CONFIG], - [The exact path of Google Test's 'gtest-config' script.]) -AC_ARG_VAR([GTEST_CPPFLAGS], - [C-like preprocessor flags for Google Test.]) -AC_ARG_VAR([GTEST_CXXFLAGS], - [C++ compile flags for Google Test.]) -AC_ARG_VAR([GTEST_LDFLAGS], - [Linker path and option flags for Google Test.]) -AC_ARG_VAR([GTEST_LIBS], - [Library linking flags for Google Test.]) -AC_ARG_VAR([GTEST_VERSION], - [The version of Google Test available.]) -HAVE_GTEST="no" -AS_IF([test "x${enable_gtest}" != "xno"], - [AC_MSG_CHECKING([for 'gtest-config']) - AS_IF([test "x${enable_gtest}" != "xyes"], - [AS_IF([test -x "${enable_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${enable_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${enable_gtest}/bin/gtest-config"]) - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([dnl -Unable to locate either a built or installed Google Test. -The specific location '${enable_gtest}' was provided for a built or installed -Google Test, but no 'gtest-config' script could be found at this location.]) - ])], - [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])]) - AS_IF([test -x "${GTEST_CONFIG}"], - [AC_MSG_RESULT([${GTEST_CONFIG}]) - m4_ifval([$1], - [_gtest_min_version="--min-version=$1" - AC_MSG_CHECKING([for Google Test at least version >= $1])], - [_gtest_min_version="--min-version=0" - AC_MSG_CHECKING([for Google Test])]) - AS_IF([${GTEST_CONFIG} ${_gtest_min_version}], - [AC_MSG_RESULT([yes]) - HAVE_GTEST='yes'], - [AC_MSG_RESULT([no])])], - [AC_MSG_RESULT([no])]) - AS_IF([test "x${HAVE_GTEST}" = "xyes"], - [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` - GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` - GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` - GTEST_LIBS=`${GTEST_CONFIG} --libs` - GTEST_VERSION=`${GTEST_CONFIG} --version` - AC_DEFINE([HAVE_GTEST],[1],[Defined when Google Test is available.])], - [AS_IF([test "x${enable_gtest}" = "xyes"], - [AC_MSG_ERROR([dnl -Google Test was enabled, but no viable version could be found.]) - ])])]) -AC_SUBST([HAVE_GTEST]) -AM_CONDITIONAL([HAVE_GTEST],[test "x$HAVE_GTEST" = "xyes"]) -AS_IF([test "x$HAVE_GTEST" = "xyes"], - [m4_ifval([$2], [$2])], - [m4_ifval([$3], [$3])]) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/make/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/make/Makefile deleted file mode 100644 index 2d8806eb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/make/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# A sample Makefile for building Google Test and using it in user -# tests. Please tweak it to suit your environment and project. You -# may want to move it to your project's root directory. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make clean - removes all files generated by make. - -# Please tweak the following variable definitions as needed by your -# project, except GTEST_HEADERS, which you can use in your own targets -# but shouldn't modify. - -# Points to the root of Google Test, relative to where this file is. -# Remember to tweak this if you move this file. -GTEST_DIR = .. - -# Where to find user code. -USER_DIR = ../samples - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(GTEST_DIR) -I$(GTEST_DIR)/include - -# Flags passed to the C++ compiler. -CXXFLAGS += -g -Wall -Wextra - -# All tests produced by this Makefile. Remember to add new tests you -# created to the list. -TESTS = sample1_unittest - -# All Google Test headers. Usually you shouldn't change this -# definition. -GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \ - $(GTEST_DIR)/include/gtest/internal/*.h - -# House-keeping build targets. - -all : $(TESTS) - -clean : - rm -f $(TESTS) gtest.a gtest_main.a *.o - -# Builds gtest.a and gtest_main.a. - -# Usually you shouldn't tweak such internal variables, indicated by a -# trailing _. -GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) - -# For simplicity and to avoid depending on Google Test's -# implementation details, the dependencies specified below are -# conservative and not optimized. This is fine as Google Test -# compiles fast and for ordinary users its source rarely changes. -gtest-all.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc - -gtest_main.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest_main.cc - -gtest.a : gtest-all.o - $(AR) $(ARFLAGS) $@ $^ - -gtest_main.a : gtest-all.o gtest_main.o - $(AR) $(ARFLAGS) $@ $^ - -# Builds a sample test. A test should link with either gtest.a or -# gtest_main.a, depending on whether it defines its own main() -# function. - -sample1.o : $(USER_DIR)/sample1.cc $(USER_DIR)/sample1.h $(GTEST_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1.cc - -sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \ - $(USER_DIR)/sample1.h $(GTEST_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc - -sample1_unittest : sample1.o sample1_unittest.o gtest_main.a - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/run_tests.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/run_tests.py deleted file mode 100755 index 2aa3ddb7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/run_tests.py +++ /dev/null @@ -1,436 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Runs specified tests for Google Test. - -SYNOPSIS - run_tests.py [OPTION]... [BUILD_DIR]... [TEST]... - -DESCRIPTION - Runs the specified tests (either binary or Python), and prints a - summary of the results. BUILD_DIRS will be used to search for the - binaries. If no TESTs are specified, all binary tests found in - BUILD_DIRs and all Python tests found in the directory test/ (in the - gtest root) are run. - - TEST is a name of either a binary or a Python test. A binary test is - an executable file named *_test or *_unittest (with the .exe - extension on Windows) A Python test is a script named *_test.py or - *_unittest.py. - -OPTIONS - -c CONFIGURATIONS - Specify build directories via build configurations. - CONFIGURATIONS is either a comma-separated list of build - configurations or 'all'. Each configuration is equivalent to - adding 'scons/build//scons' to BUILD_DIRs. - Specifying -c=all is equivalent to providing all directories - listed in KNOWN BUILD DIRECTORIES section below. - - -a - Equivalent to -c=all - - -b - Equivalent to -c=all with the exception that the script will not - fail if some of the KNOWN BUILD DIRECTORIES do not exists; the - script will simply not run the tests there. 'b' stands for - 'built directories'. - -RETURN VALUE - Returns 0 if all tests are successful; otherwise returns 1. - -EXAMPLES - run_tests.py - Runs all tests for the default build configuration. - - run_tests.py -a - Runs all tests with binaries in KNOWN BUILD DIRECTORIES. - - run_tests.py -b - Runs all tests in KNOWN BUILD DIRECTORIES that have been - built. - - run_tests.py foo/ - Runs all tests in the foo/ directory and all Python tests in - the directory test. The Python tests are instructed to look - for binaries in foo/. - - run_tests.py bar_test.exe test/baz_test.exe foo/ bar/ - Runs foo/bar_test.exe, bar/bar_test.exe, foo/baz_test.exe, and - bar/baz_test.exe. - - run_tests.py foo bar test/foo_test.py - Runs test/foo_test.py twice instructing it to look for its - test binaries in the directories foo and bar, - correspondingly. - -KNOWN BUILD DIRECTORIES - run_tests.py knows about directories where the SCons build script - deposits its products. These are the directories where run_tests.py - will be looking for its binaries. Currently, gtest's SConstruct file - defines them as follows (the default build directory is the first one - listed in each group): - On Windows: - /scons/build/win-dbg/scons/ - /scons/build/win-opt/scons/ - /scons/build/win-dbg8/scons/ - /scons/build/win-opt8/scons/ - On Mac: - /scons/build/mac-dbg/scons/ - /scons/build/mac-opt/scons/ - On other platforms: - /scons/build/dbg/scons/ - /scons/build/opt/scons/ - -AUTHOR - Written by Zhanyong Wan (wan@google.com) - and Vlad Losev(vladl@google.com). - -REQUIREMENTS - This script requires Python 2.3 or higher. -""" - -import optparse -import os -import re -import sets -import sys - -try: - # subrocess module is a preferable way to invoke subprocesses but it may - # not be available on MacOS X 10.4. - import subprocess -except ImportError: - subprocess = None - -IS_WINDOWS = os.name == 'nt' -IS_MAC = os.name == 'posix' and os.uname()[0] == 'Darwin' - -# Definition of CONFIGS must match that of the build directory names in the -# SConstruct script. The first list item is the default build configuration. -if IS_WINDOWS: - CONFIGS = ('win-dbg', 'win-dbg8', 'win-opt', 'win-opt8') -elif IS_MAC: - CONFIGS = ('mac-dbg', 'mac-opt') -else: - CONFIGS = ('dbg', 'opt') - -if IS_WINDOWS: - PYTHON_TEST_REGEX = re.compile(r'_(unit)?test\.py$', re.IGNORECASE) - BINARY_TEST_REGEX = re.compile(r'_(unit)?test(\.exe)?$', re.IGNORECASE) -else: - PYTHON_TEST_REGEX = re.compile(r'_(unit)?test\.py$') - BINARY_TEST_REGEX = re.compile(r'_(unit)?test$') - -GTEST_BUILD_DIR = 'GTEST_BUILD_DIR' - - -# All paths in this script are either absolute or relative to the current -# working directory, unless otherwise specified. -class TestRunner(object): - """Provides facilities for running Python and binary tests for Google Test.""" - - def __init__(self, - injected_os=os, - injected_subprocess=subprocess, - injected_script_dir=os.path.dirname(__file__)): - self.os = injected_os - self.subprocess = injected_subprocess - # If a program using this file is invoked via a relative path, the - # script directory will be relative to the path of the main program - # file. It may be '.' when this script is invoked directly or '..' when - # it is imported for testing. To simplify testing we inject the script - # directory into TestRunner. - self.script_dir = injected_script_dir - - def GetBuildDirForConfig(self, config): - """Returns the build directory for a given configuration.""" - - return self.os.path.normpath( - self.os.path.join(self.script_dir, 'scons/build/%s/scons' % config)) - - def Run(self, args): - """Runs the executable with given args (args[0] is the executable name). - - Args: - args: Command line arguments for the process. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - if self.subprocess: - return self.subprocess.Popen(args).wait() - else: - return self.os.spawnv(self.os.P_WAIT, args[0], args) - - def RunBinaryTest(self, test): - """Runs the binary test given its path. - - Args: - test: Path to the test binary. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - return self.Run([test]) - - def RunPythonTest(self, test, build_dir): - """Runs the Python test script with the specified build directory. - - Args: - test: Path to the test's Python script. - build_dir: Path to the directory where the test binary is to be found. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - old_build_dir = self.os.environ.get(GTEST_BUILD_DIR) - - try: - self.os.environ[GTEST_BUILD_DIR] = build_dir - - # If this script is run on a Windows machine that has no association - # between the .py extension and a python interpreter, simply passing - # the script name into subprocess.Popen/os.spawn will not work. - print 'Running %s . . .' % (test,) - return self.Run([sys.executable, test]) - - finally: - if old_build_dir is None: - del self.os.environ[GTEST_BUILD_DIR] - else: - self.os.environ[GTEST_BUILD_DIR] = old_build_dir - - def FindFilesByRegex(self, directory, regex): - """Returns files in a directory whose names match a regular expression. - - Args: - directory: Path to the directory to search for files. - regex: Regular expression to filter file names. - - Returns: - The list of the paths to the files in the directory. - """ - - return [self.os.path.join(directory, file_name) - for file_name in self.os.listdir(directory) - if re.search(regex, file_name)] - - # TODO(vladl@google.com): Implement parsing of scons/SConscript to run all - # tests defined there when no tests are specified. - # TODO(vladl@google.com): Update the docstring after the code is changed to - # try to test all builds defined in scons/SConscript. - def GetTestsToRun(self, - args, - named_configurations, - built_configurations, - available_configurations=CONFIGS): - """Determines what tests should be run. - - Args: - args: The list of non-option arguments from the command line. - named_configurations: The list of configurations specified via -c or -a. - built_configurations: True if -b has been specified. - available_configurations: a list of configurations available on the - current platform, injectable for testing. - - Returns: - A tuple with 2 elements: the list of Python tests to run and the list of - binary tests to run. - """ - - if named_configurations == 'all': - named_configurations = ','.join(available_configurations) - - normalized_args = [self.os.path.normpath(arg) for arg in args] - - # A final list of build directories which will be searched for the test - # binaries. First, add directories specified directly on the command - # line. - build_dirs = filter(self.os.path.isdir, normalized_args) - - # Adds build directories specified via their build configurations using - # the -c or -a options. - if named_configurations: - build_dirs += [self.GetBuildDirForConfig(config) - for config in named_configurations.split(',')] - - # Adds KNOWN BUILD DIRECTORIES if -b is specified. - if built_configurations: - build_dirs += [self.GetBuildDirForConfig(config) - for config in available_configurations - if self.os.path.isdir(self.GetBuildDirForConfig(config))] - - # If no directories were specified either via -a, -b, -c, or directly, use - # the default configuration. - elif not build_dirs: - build_dirs = [self.GetBuildDirForConfig(available_configurations[0])] - - # Makes sure there are no duplications. - build_dirs = sets.Set(build_dirs) - - errors_found = False - listed_python_tests = [] # All Python tests listed on the command line. - listed_binary_tests = [] # All binary tests listed on the command line. - - # Sifts through non-directory arguments fishing for any Python or binary - # tests and detecting errors. - for argument in sets.Set(normalized_args) - build_dirs: - if re.search(PYTHON_TEST_REGEX, argument): - python_path = self.os.path.join(self.script_dir, - 'test', - self.os.path.basename(argument)) - if self.os.path.isfile(python_path): - listed_python_tests.append(python_path) - else: - sys.stderr.write('Unable to find Python test %s' % argument) - errors_found = True - elif re.search(BINARY_TEST_REGEX, argument): - # This script also accepts binary test names prefixed with test/ for - # the convenience of typing them (can use path completions in the - # shell). Strips test/ prefix from the binary test names. - listed_binary_tests.append(self.os.path.basename(argument)) - else: - sys.stderr.write('%s is neither test nor build directory' % argument) - errors_found = True - - if errors_found: - return None - - user_has_listed_tests = listed_python_tests or listed_binary_tests - - if user_has_listed_tests: - selected_python_tests = listed_python_tests - else: - selected_python_tests = self.FindFilesByRegex( - self.os.path.join(self.script_dir, 'test'), - PYTHON_TEST_REGEX) - - # TODO(vladl@google.com): skip unbuilt Python tests when -b is specified. - python_test_pairs = [] - for directory in build_dirs: - for test in selected_python_tests: - python_test_pairs.append((directory, test)) - - binary_test_pairs = [] - for directory in build_dirs: - if user_has_listed_tests: - binary_test_pairs.extend( - [(directory, self.os.path.join(directory, test)) - for test in listed_binary_tests]) - else: - tests = self.FindFilesByRegex(directory, BINARY_TEST_REGEX) - binary_test_pairs.extend([(directory, test) for test in tests]) - - return (python_test_pairs, binary_test_pairs) - - def RunTests(self, python_tests, binary_tests): - """Runs Python and binary tests and reports results to the standard output. - - Args: - python_tests: List of Python tests to run in the form of tuples - (build directory, Python test script). - binary_tests: List of binary tests to run in the form of tuples - (build directory, binary file). - - Returns: - The exit code the program should pass into sys.exit(). - """ - - if python_tests or binary_tests: - results = [] - for directory, test in python_tests: - results.append((directory, - test, - self.RunPythonTest(test, directory) == 0)) - for directory, test in binary_tests: - results.append((directory, - self.os.path.basename(test), - self.RunBinaryTest(test) == 0)) - - failed = [(directory, test) - for (directory, test, success) in results - if not success] - print - print '%d tests run.' % len(results) - if failed: - print 'The following %d tests failed:' % len(failed) - for (directory, test) in failed: - print '%s in %s' % (test, directory) - return 1 - else: - print 'All tests passed!' - else: # No tests defined - print 'Nothing to test - no tests specified!' - - return 0 - - -def _Main(): - """Runs all tests for Google Test.""" - - parser = optparse.OptionParser() - parser.add_option('-c', - action='store', - dest='configurations', - default=None, - help='Test in the specified build directories') - parser.add_option('-a', - action='store_const', - dest='configurations', - default=None, - const='all', - help='Test in all default build directories') - parser.add_option('-b', - action='store_const', - dest='built_configurations', - default=False, - const=True, - help=('Test in all default build directories, do not fail' - 'if some of them do not exist')) - (options, args) = parser.parse_args() - - test_runner = TestRunner() - tests = test_runner.GetTestsToRun(args, - options.configurations, - options.built_configurations) - if not tests: - sys.exit(1) # Incorrect parameters given, abort execution. - - sys.exit(test_runner.RunTests(tests[0], tests[1])) - -if __name__ == '__main__': - _Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/prime_tables.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/prime_tables.h deleted file mode 100644 index 236e84c3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/prime_tables.h +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// Author: vladl@google.com (Vlad Losev) - -// This provides interface PrimeTable that determines whether a number is a -// prime and determines a next prime number. This interface is used -// in Google Test samples demonstrating use of parameterized tests. - -#ifndef GTEST_SAMPLES_PRIME_TABLES_H_ -#define GTEST_SAMPLES_PRIME_TABLES_H_ - -#include - -// The prime table interface. -class PrimeTable { - public: - virtual ~PrimeTable() {} - - // Returns true iff n is a prime number. - virtual bool IsPrime(int n) const = 0; - - // Returns the smallest prime number greater than p; or returns -1 - // if the next prime is beyond the capacity of the table. - virtual int GetNextPrime(int p) const = 0; -}; - -// Implementation #1 calculates the primes on-the-fly. -class OnTheFlyPrimeTable : public PrimeTable { - public: - virtual bool IsPrime(int n) const { - if (n <= 1) return false; - - for (int i = 2; i*i <= n; i++) { - // n is divisible by an integer other than 1 and itself. - if ((n % i) == 0) return false; - } - - return true; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n > 0; n++) { - if (IsPrime(n)) return n; - } - - return -1; - } -}; - -// Implementation #2 pre-calculates the primes and stores the result -// in an array. -class PreCalculatedPrimeTable : public PrimeTable { - public: - // 'max' specifies the maximum number the prime table holds. - explicit PreCalculatedPrimeTable(int max) - : is_prime_size_(max + 1), is_prime_(new bool[max + 1]) { - CalculatePrimesUpTo(max); - } - virtual ~PreCalculatedPrimeTable() { delete[] is_prime_; } - - virtual bool IsPrime(int n) const { - return 0 <= n && n < is_prime_size_ && is_prime_[n]; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n < is_prime_size_; n++) { - if (is_prime_[n]) return n; - } - - return -1; - } - - private: - void CalculatePrimesUpTo(int max) { - ::std::fill(is_prime_, is_prime_ + is_prime_size_, true); - is_prime_[0] = is_prime_[1] = false; - - for (int i = 2; i <= max; i++) { - if (!is_prime_[i]) continue; - - // Marks all multiples of i (except i itself) as non-prime. - for (int j = 2*i; j <= max; j += i) { - is_prime_[j] = false; - } - } - } - - const int is_prime_size_; - bool* const is_prime_; -}; - -#endif // GTEST_SAMPLES_PRIME_TABLES_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.cc deleted file mode 100644 index f171e260..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include "sample1.h" - -// Returns n! (the factorial of n). For negative n, n! is defined to be 1. -int Factorial(int n) { - int result = 1; - for (int i = 1; i <= n; i++) { - result *= i; - } - - return result; -} - -// Returns true iff n is a prime number. -bool IsPrime(int n) { - // Trivial case 1: small numbers - if (n <= 1) return false; - - // Trivial case 2: even numbers - if (n % 2 == 0) return n == 2; - - // Now, we have that n is odd and n >= 3. - - // Try to divide n by every odd number i, starting from 3 - for (int i = 3; ; i += 2) { - // We only have to try i up to the squre root of n - if (i > n/i) break; - - // Now, we have i <= n/i < n. - // If n is divisible by i, n is not prime. - if (n % i == 0) return false; - } - - // n has no integer factor in the range (1, n), and thus is prime. - return true; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.h deleted file mode 100644 index 3dfeb98c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE1_H_ -#define GTEST_SAMPLES_SAMPLE1_H_ - -// Returns n! (the factorial of n). For negative n, n! is defined to be 1. -int Factorial(int n); - -// Returns true iff n is a prime number. -bool IsPrime(int n); - -#endif // GTEST_SAMPLES_SAMPLE1_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1_unittest.cc deleted file mode 100644 index 01eb5462..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample1_unittest.cc +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// This sample shows how to write a simple unit test for a function, -// using Google C++ testing framework. -// -// Writing a unit test using Google C++ testing framework is easy as 1-2-3: - - -// Step 1. Include necessary header files such that the stuff your -// test logic needs is declared. -// -// Don't forget gtest.h, which declares the testing framework. - -#include -#include "sample1.h" -#include - - -// Step 2. Use the TEST macro to define your tests. -// -// TEST has two parameters: the test case name and the test name. -// After using the macro, you should define your test logic between a -// pair of braces. You can use a bunch of macros to indicate the -// success or failure of a test. EXPECT_TRUE and EXPECT_EQ are -// examples of such macros. For a complete list, see gtest.h. -// -// -// -// In Google Test, tests are grouped into test cases. This is how we -// keep test code organized. You should put logically related tests -// into the same test case. -// -// The test case name and the test name should both be valid C++ -// identifiers. And you should not use underscore (_) in the names. -// -// Google Test guarantees that each test you define is run exactly -// once, but it makes no guarantee on the order the tests are -// executed. Therefore, you should write your tests in such a way -// that their results don't depend on their order. -// -// - - -// Tests Factorial(). - -// Tests factorial of negative numbers. -TEST(FactorialTest, Negative) { - // This test is named "Negative", and belongs to the "FactorialTest" - // test case. - EXPECT_EQ(1, Factorial(-5)); - EXPECT_EQ(1, Factorial(-1)); - EXPECT_TRUE(Factorial(-10) > 0); - - // - // - // EXPECT_EQ(expected, actual) is the same as - // - // EXPECT_TRUE((expected) == (actual)) - // - // except that it will print both the expected value and the actual - // value when the assertion fails. This is very helpful for - // debugging. Therefore in this case EXPECT_EQ is preferred. - // - // On the other hand, EXPECT_TRUE accepts any Boolean expression, - // and is thus more general. - // - // -} - -// Tests factorial of 0. -TEST(FactorialTest, Zero) { - EXPECT_EQ(1, Factorial(0)); -} - -// Tests factorial of positive numbers. -TEST(FactorialTest, Positive) { - EXPECT_EQ(1, Factorial(1)); - EXPECT_EQ(2, Factorial(2)); - EXPECT_EQ(6, Factorial(3)); - EXPECT_EQ(40320, Factorial(8)); -} - - -// Tests IsPrime() - -// Tests negative input. -TEST(IsPrimeTest, Negative) { - // This test belongs to the IsPrimeTest test case. - - EXPECT_FALSE(IsPrime(-1)); - EXPECT_FALSE(IsPrime(-2)); - EXPECT_FALSE(IsPrime(INT_MIN)); -} - -// Tests some trivial cases. -TEST(IsPrimeTest, Trivial) { - EXPECT_FALSE(IsPrime(0)); - EXPECT_FALSE(IsPrime(1)); - EXPECT_TRUE(IsPrime(2)); - EXPECT_TRUE(IsPrime(3)); -} - -// Tests positive input. -TEST(IsPrimeTest, Positive) { - EXPECT_FALSE(IsPrime(4)); - EXPECT_TRUE(IsPrime(5)); - EXPECT_FALSE(IsPrime(6)); - EXPECT_TRUE(IsPrime(23)); -} - -// Step 3. Call RUN_ALL_TESTS() in main(). -// -// We do this by linking in src/gtest_main.cc file, which consists of -// a main() function which calls RUN_ALL_TESTS() for us. -// -// This runs all the tests you've defined, prints the result, and -// returns 0 if successful, or 1 otherwise. -// -// Did you notice that we didn't register the tests? The -// RUN_ALL_TESTS() macro magically knows about all the tests we -// defined. Isn't this convenient? diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.cc deleted file mode 100644 index 53857c0e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include "sample2.h" - -#include - -// Clones a 0-terminated C string, allocating memory using new. -const char * MyString::CloneCString(const char * c_string) { - if (c_string == NULL) return NULL; - - const size_t len = strlen(c_string); - char * const clone = new char[ len + 1 ]; - memcpy(clone, c_string, len + 1); - - return clone; -} - -// Sets the 0-terminated C string this MyString object -// represents. -void MyString::Set(const char * c_string) { - // Makes sure this works when c_string == c_string_ - const char * const temp = MyString::CloneCString(c_string); - delete[] c_string_; - c_string_ = temp; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.h deleted file mode 100644 index c5f3b8c5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE2_H_ -#define GTEST_SAMPLES_SAMPLE2_H_ - -#include - - -// A simple string class. -class MyString { - private: - const char * c_string_; - const MyString& operator=(const MyString& rhs); - - public: - - // Clones a 0-terminated C string, allocating memory using new. - static const char * CloneCString(const char * c_string); - - //////////////////////////////////////////////////////////// - // - // C'tors - - // The default c'tor constructs a NULL string. - MyString() : c_string_(NULL) {} - - // Constructs a MyString by cloning a 0-terminated C string. - explicit MyString(const char * c_string) : c_string_(NULL) { - Set(c_string); - } - - // Copy c'tor - MyString(const MyString& string) : c_string_(NULL) { - Set(string.c_string_); - } - - //////////////////////////////////////////////////////////// - // - // D'tor. MyString is intended to be a final class, so the d'tor - // doesn't need to be virtual. - ~MyString() { delete[] c_string_; } - - // Gets the 0-terminated C string this MyString object represents. - const char * c_string() const { return c_string_; } - - size_t Length() const { - return c_string_ == NULL ? 0 : strlen(c_string_); - } - - // Sets the 0-terminated C string this MyString object represents. - void Set(const char * c_string); -}; - - -#endif // GTEST_SAMPLES_SAMPLE2_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2_unittest.cc deleted file mode 100644 index e1d79108..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample2_unittest.cc +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// This sample shows how to write a more complex unit test for a class -// that has multiple member functions. -// -// Usually, it's a good idea to have one test for each method in your -// class. You don't have to do that exactly, but it helps to keep -// your tests organized. You may also throw in additional tests as -// needed. - -#include "sample2.h" -#include - -// In this example, we test the MyString class (a simple string). - -// Tests the default c'tor. -TEST(MyString, DefaultConstructor) { - const MyString s; - - // Asserts that s.c_string() returns NULL. - // - // - // - // If we write NULL instead of - // - // static_cast(NULL) - // - // in this assertion, it will generate a warning on gcc 3.4. The - // reason is that EXPECT_EQ needs to know the types of its - // arguments in order to print them when it fails. Since NULL is - // #defined as 0, the compiler will use the formatter function for - // int to print it. However, gcc thinks that NULL should be used as - // a pointer, not an int, and therefore complains. - // - // The root of the problem is C++'s lack of distinction between the - // integer number 0 and the null pointer constant. Unfortunately, - // we have to live with this fact. - // - // - EXPECT_STREQ(NULL, s.c_string()); - - EXPECT_EQ(0, s.Length()); -} - -const char kHelloString[] = "Hello, world!"; - -// Tests the c'tor that accepts a C string. -TEST(MyString, ConstructorFromCString) { - const MyString s(kHelloString); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - EXPECT_EQ(sizeof(kHelloString)/sizeof(kHelloString[0]) - 1, - s.Length()); -} - -// Tests the copy c'tor. -TEST(MyString, CopyConstructor) { - const MyString s1(kHelloString); - const MyString s2 = s1; - EXPECT_TRUE(strcmp(s2.c_string(), kHelloString) == 0); -} - -// Tests the Set method. -TEST(MyString, Set) { - MyString s; - - s.Set(kHelloString); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - - // Set should work when the input pointer is the same as the one - // already in the MyString object. - s.Set(s.c_string()); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - - // Can we set the MyString to NULL? - s.Set(NULL); - EXPECT_STREQ(NULL, s.c_string()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3-inl.h deleted file mode 100644 index 630e950c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3-inl.h +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE3_INL_H_ -#define GTEST_SAMPLES_SAMPLE3_INL_H_ - -#include - - -// Queue is a simple queue implemented as a singled-linked list. -// -// The element type must support copy constructor. -template // E is the element type -class Queue; - -// QueueNode is a node in a Queue, which consists of an element of -// type E and a pointer to the next node. -template // E is the element type -class QueueNode { - friend class Queue; - - public: - // Gets the element in this node. - const E & element() const { return element_; } - - // Gets the next node in the queue. - QueueNode * next() { return next_; } - const QueueNode * next() const { return next_; } - - private: - // Creates a node with a given element value. The next pointer is - // set to NULL. - QueueNode(const E & element) : element_(element), next_(NULL) {} - - // We disable the default assignment operator and copy c'tor. - const QueueNode & operator = (const QueueNode &); - QueueNode(const QueueNode &); - - E element_; - QueueNode * next_; -}; - -template // E is the element type. -class Queue { -public: - - // Creates an empty queue. - Queue() : head_(NULL), last_(NULL), size_(0) {} - - // D'tor. Clears the queue. - ~Queue() { Clear(); } - - // Clears the queue. - void Clear() { - if (size_ > 0) { - // 1. Deletes every node. - QueueNode * node = head_; - QueueNode * next = node->next(); - for (; ;) { - delete node; - node = next; - if (node == NULL) break; - next = node->next(); - } - - // 2. Resets the member variables. - head_ = last_ = NULL; - size_ = 0; - } - } - - // Gets the number of elements. - size_t Size() const { return size_; } - - // Gets the first element of the queue, or NULL if the queue is empty. - QueueNode * Head() { return head_; } - const QueueNode * Head() const { return head_; } - - // Gets the last element of the queue, or NULL if the queue is empty. - QueueNode * Last() { return last_; } - const QueueNode * Last() const { return last_; } - - // Adds an element to the end of the queue. A copy of the element is - // created using the copy constructor, and then stored in the queue. - // Changes made to the element in the queue doesn't affect the source - // object, and vice versa. - void Enqueue(const E & element) { - QueueNode * new_node = new QueueNode(element); - - if (size_ == 0) { - head_ = last_ = new_node; - size_ = 1; - } else { - last_->next_ = new_node; - last_ = new_node; - size_++; - } - } - - // Removes the head of the queue and returns it. Returns NULL if - // the queue is empty. - E * Dequeue() { - if (size_ == 0) { - return NULL; - } - - const QueueNode * const old_head = head_; - head_ = head_->next_; - size_--; - if (size_ == 0) { - last_ = NULL; - } - - E * element = new E(old_head->element()); - delete old_head; - - return element; - } - - // Applies a function/functor on each element of the queue, and - // returns the result in a new queue. The original queue is not - // affected. - template - Queue * Map(F function) const { - Queue * new_queue = new Queue(); - for (const QueueNode * node = head_; node != NULL; node = node->next_) { - new_queue->Enqueue(function(node->element())); - } - - return new_queue; - } - - private: - QueueNode * head_; // The first node of the queue. - QueueNode * last_; // The last node of the queue. - size_t size_; // The number of elements in the queue. - - // We disallow copying a queue. - Queue(const Queue &); - const Queue & operator = (const Queue &); - }; - -#endif // GTEST_SAMPLES_SAMPLE3_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3_unittest.cc deleted file mode 100644 index a3d26da2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample3_unittest.cc +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// In this example, we use a more advanced feature of Google Test called -// test fixture. -// -// A test fixture is a place to hold objects and functions shared by -// all tests in a test case. Using a test fixture avoids duplicating -// the test code necessary to initialize and cleanup those common -// objects for each test. It is also useful for defining sub-routines -// that your tests need to invoke a lot. -// -// -// -// The tests share the test fixture in the sense of code sharing, not -// data sharing. Each test is given its own fresh copy of the -// fixture. You cannot expect the data modified by one test to be -// passed on to another test, which is a bad idea. -// -// The reason for this design is that tests should be independent and -// repeatable. In particular, a test should not fail as the result of -// another test's failure. If one test depends on info produced by -// another test, then the two tests should really be one big test. -// -// The macros for indicating the success/failure of a test -// (EXPECT_TRUE, FAIL, etc) need to know what the current test is -// (when Google Test prints the test result, it tells you which test -// each failure belongs to). Technically, these macros invoke a -// member function of the Test class. Therefore, you cannot use them -// in a global function. That's why you should put test sub-routines -// in a test fixture. -// -// - -#include "sample3-inl.h" -#include - -// To use a test fixture, derive a class from testing::Test. -class QueueTest : public testing::Test { - protected: // You should make the members protected s.t. they can be - // accessed from sub-classes. - - // virtual void SetUp() will be called before each test is run. You - // should define it if you need to initialize the varaibles. - // Otherwise, this can be skipped. - virtual void SetUp() { - q1_.Enqueue(1); - q2_.Enqueue(2); - q2_.Enqueue(3); - } - - // virtual void TearDown() will be called after each test is run. - // You should define it if there is cleanup work to do. Otherwise, - // you don't have to provide it. - // - // virtual void TearDown() { - // } - - // A helper function that some test uses. - static int Double(int n) { - return 2*n; - } - - // A helper function for testing Queue::Map(). - void MapTester(const Queue * q) { - // Creates a new queue, where each element is twice as big as the - // corresponding one in q. - const Queue * const new_q = q->Map(Double); - - // Verifies that the new queue has the same size as q. - ASSERT_EQ(q->Size(), new_q->Size()); - - // Verifies the relationship between the elements of the two queues. - for ( const QueueNode * n1 = q->Head(), * n2 = new_q->Head(); - n1 != NULL; n1 = n1->next(), n2 = n2->next() ) { - EXPECT_EQ(2 * n1->element(), n2->element()); - } - - delete new_q; - } - - // Declares the variables your tests want to use. - Queue q0_; - Queue q1_; - Queue q2_; -}; - -// When you have a test fixture, you define a test using TEST_F -// instead of TEST. - -// Tests the default c'tor. -TEST_F(QueueTest, DefaultConstructor) { - // You can access data in the test fixture here. - EXPECT_EQ(0, q0_.Size()); -} - -// Tests Dequeue(). -TEST_F(QueueTest, Dequeue) { - int * n = q0_.Dequeue(); - EXPECT_TRUE(n == NULL); - - n = q1_.Dequeue(); - ASSERT_TRUE(n != NULL); - EXPECT_EQ(1, *n); - EXPECT_EQ(0, q1_.Size()); - delete n; - - n = q2_.Dequeue(); - ASSERT_TRUE(n != NULL); - EXPECT_EQ(2, *n); - EXPECT_EQ(1, q2_.Size()); - delete n; -} - -// Tests the Queue::Map() function. -TEST_F(QueueTest, Map) { - MapTester(&q0_); - MapTester(&q1_); - MapTester(&q2_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.cc deleted file mode 100644 index ae44bda6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include "sample4.h" - -// Returns the current counter value, and increments it. -int Counter::Increment() { - return counter_++; -} - -// Prints the current counter value to STDOUT. -void Counter::Print() const { - printf("%d", counter_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.h deleted file mode 100644 index cd60f0dd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE4_H_ -#define GTEST_SAMPLES_SAMPLE4_H_ - -// A simple monotonic counter. -class Counter { - private: - int counter_; - - public: - // Creates a counter that starts at 0. - Counter() : counter_(0) {} - - // Returns the current counter value, and increments it. - int Increment(); - - // Prints the current counter value to STDOUT. - void Print() const; -}; - -#endif // GTEST_SAMPLES_SAMPLE4_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4_unittest.cc deleted file mode 100644 index b4fb3736..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample4_unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include "sample4.h" - -// Tests the Increment() method. -TEST(Counter, Increment) { - Counter c; - - // EXPECT_EQ() evaluates its arguments exactly once, so they - // can have side effects. - - EXPECT_EQ(0, c.Increment()); - EXPECT_EQ(1, c.Increment()); - EXPECT_EQ(2, c.Increment()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample5_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample5_unittest.cc deleted file mode 100644 index be5df90d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample5_unittest.cc +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This sample teaches how to reuse a test fixture in multiple test -// cases by deriving sub-fixtures from it. -// -// When you define a test fixture, you specify the name of the test -// case that will use this fixture. Therefore, a test fixture can -// be used by only one test case. -// -// Sometimes, more than one test cases may want to use the same or -// slightly different test fixtures. For example, you may want to -// make sure that all tests for a GUI library don't leak important -// system resources like fonts and brushes. In Google Test, you do -// this by putting the shared logic in a super (as in "super class") -// test fixture, and then have each test case use a fixture derived -// from this super fixture. - -#include -#include -#include "sample3-inl.h" -#include -#include "sample1.h" - -// In this sample, we want to ensure that every test finishes within -// ~5 seconds. If a test takes longer to run, we consider it a -// failure. -// -// We put the code for timing a test in a test fixture called -// "QuickTest". QuickTest is intended to be the super fixture that -// other fixtures derive from, therefore there is no test case with -// the name "QuickTest". This is OK. -// -// Later, we will derive multiple test fixtures from QuickTest. -class QuickTest : public testing::Test { - protected: - // Remember that SetUp() is run immediately before a test starts. - // This is a good place to record the start time. - virtual void SetUp() { - start_time_ = time(NULL); - } - - // TearDown() is invoked immediately after a test finishes. Here we - // check if the test was too slow. - virtual void TearDown() { - // Gets the time when the test finishes - const time_t end_time = time(NULL); - - // Asserts that the test took no more than ~5 seconds. Did you - // know that you can use assertions in SetUp() and TearDown() as - // well? - EXPECT_TRUE(end_time - start_time_ <= 5) << "The test took too long."; - } - - // The UTC time (in seconds) when the test starts - time_t start_time_; -}; - - -// We derive a fixture named IntegerFunctionTest from the QuickTest -// fixture. All tests using this fixture will be automatically -// required to be quick. -class IntegerFunctionTest : public QuickTest { - // We don't need any more logic than already in the QuickTest fixture. - // Therefore the body is empty. -}; - - -// Now we can write tests in the IntegerFunctionTest test case. - -// Tests Factorial() -TEST_F(IntegerFunctionTest, Factorial) { - // Tests factorial of negative numbers. - EXPECT_EQ(1, Factorial(-5)); - EXPECT_EQ(1, Factorial(-1)); - EXPECT_TRUE(Factorial(-10) > 0); - - // Tests factorial of 0. - EXPECT_EQ(1, Factorial(0)); - - // Tests factorial of positive numbers. - EXPECT_EQ(1, Factorial(1)); - EXPECT_EQ(2, Factorial(2)); - EXPECT_EQ(6, Factorial(3)); - EXPECT_EQ(40320, Factorial(8)); -} - - -// Tests IsPrime() -TEST_F(IntegerFunctionTest, IsPrime) { - // Tests negative input. - EXPECT_TRUE(!IsPrime(-1)); - EXPECT_TRUE(!IsPrime(-2)); - EXPECT_TRUE(!IsPrime(INT_MIN)); - - // Tests some trivial cases. - EXPECT_TRUE(!IsPrime(0)); - EXPECT_TRUE(!IsPrime(1)); - EXPECT_TRUE(IsPrime(2)); - EXPECT_TRUE(IsPrime(3)); - - // Tests positive input. - EXPECT_TRUE(!IsPrime(4)); - EXPECT_TRUE(IsPrime(5)); - EXPECT_TRUE(!IsPrime(6)); - EXPECT_TRUE(IsPrime(23)); -} - - -// The next test case (named "QueueTest") also needs to be quick, so -// we derive another fixture from QuickTest. -// -// The QueueTest test fixture has some logic and shared objects in -// addition to what's in QuickTest already. We define the additional -// stuff inside the body of the test fixture, as usual. -class QueueTest : public QuickTest { - protected: - virtual void SetUp() { - // First, we need to set up the super fixture (QuickTest). - QuickTest::SetUp(); - - // Second, some additional setup for this fixture. - q1_.Enqueue(1); - q2_.Enqueue(2); - q2_.Enqueue(3); - } - - // By default, TearDown() inherits the behavior of - // QuickTest::TearDown(). As we have no additional cleaning work - // for QueueTest, we omit it here. - // - // virtual void TearDown() { - // QuickTest::TearDown(); - // } - - Queue q0_; - Queue q1_; - Queue q2_; -}; - - -// Now, let's write tests using the QueueTest fixture. - -// Tests the default constructor. -TEST_F(QueueTest, DefaultConstructor) { - EXPECT_EQ(0, q0_.Size()); -} - -// Tests Dequeue(). -TEST_F(QueueTest, Dequeue) { - int * n = q0_.Dequeue(); - EXPECT_TRUE(n == NULL); - - n = q1_.Dequeue(); - EXPECT_TRUE(n != NULL); - EXPECT_EQ(1, *n); - EXPECT_EQ(0, q1_.Size()); - delete n; - - n = q2_.Dequeue(); - EXPECT_TRUE(n != NULL); - EXPECT_EQ(2, *n); - EXPECT_EQ(1, q2_.Size()); - delete n; -} - -// If necessary, you can derive further test fixtures from a derived -// fixture itself. For example, you can derive another fixture from -// QueueTest. Google Test imposes no limit on how deep the hierarchy -// can be. In practice, however, you probably don't want it to be too -// deep as to be confusing. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample6_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample6_unittest.cc deleted file mode 100644 index dd0df31f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample6_unittest.cc +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This sample shows how to test common properties of multiple -// implementations of the same interface (aka interface tests). - -// The interface and its implementations are in this header. -#include "prime_tables.h" - -#include - -// First, we define some factory functions for creating instances of -// the implementations. You may be able to skip this step if all your -// implementations can be constructed the same way. - -template -PrimeTable* CreatePrimeTable(); - -template <> -PrimeTable* CreatePrimeTable() { - return new OnTheFlyPrimeTable; -} - -template <> -PrimeTable* CreatePrimeTable() { - return new PreCalculatedPrimeTable(10000); -} - -// Then we define a test fixture class template. -template -class PrimeTableTest : public testing::Test { - protected: - // The ctor calls the factory function to create a prime table - // implemented by T. - PrimeTableTest() : table_(CreatePrimeTable()) {} - - virtual ~PrimeTableTest() { delete table_; } - - // Note that we test an implementation via the base interface - // instead of the actual implementation class. This is important - // for keeping the tests close to the real world scenario, where the - // implementation is invoked via the base interface. It avoids - // got-yas where the implementation class has a method that shadows - // a method with the same name (but slightly different argument - // types) in the base interface, for example. - PrimeTable* const table_; -}; - -#if GTEST_HAS_TYPED_TEST - -using testing::Types; - -// Google Test offers two ways for reusing tests for different types. -// The first is called "typed tests". You should use it if you -// already know *all* the types you are gonna exercise when you write -// the tests. - -// To write a typed test case, first use -// -// TYPED_TEST_CASE(TestCaseName, TypeList); -// -// to declare it and specify the type parameters. As with TEST_F, -// TestCaseName must match the test fixture name. - -// The list of types we want to test. -typedef Types Implementations; - -TYPED_TEST_CASE(PrimeTableTest, Implementations); - -// Then use TYPED_TEST(TestCaseName, TestName) to define a typed test, -// similar to TEST_F. -TYPED_TEST(PrimeTableTest, ReturnsFalseForNonPrimes) { - // Inside the test body, you can refer to the type parameter by - // TypeParam, and refer to the fixture class by TestFixture. We - // don't need them in this example. - - // Since we are in the template world, C++ requires explicitly - // writing 'this->' when referring to members of the fixture class. - // This is something you have to learn to live with. - EXPECT_FALSE(this->table_->IsPrime(-5)); - EXPECT_FALSE(this->table_->IsPrime(0)); - EXPECT_FALSE(this->table_->IsPrime(1)); - EXPECT_FALSE(this->table_->IsPrime(4)); - EXPECT_FALSE(this->table_->IsPrime(6)); - EXPECT_FALSE(this->table_->IsPrime(100)); -} - -TYPED_TEST(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(this->table_->IsPrime(2)); - EXPECT_TRUE(this->table_->IsPrime(3)); - EXPECT_TRUE(this->table_->IsPrime(5)); - EXPECT_TRUE(this->table_->IsPrime(7)); - EXPECT_TRUE(this->table_->IsPrime(11)); - EXPECT_TRUE(this->table_->IsPrime(131)); -} - -TYPED_TEST(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, this->table_->GetNextPrime(0)); - EXPECT_EQ(3, this->table_->GetNextPrime(2)); - EXPECT_EQ(5, this->table_->GetNextPrime(3)); - EXPECT_EQ(7, this->table_->GetNextPrime(5)); - EXPECT_EQ(11, this->table_->GetNextPrime(7)); - EXPECT_EQ(131, this->table_->GetNextPrime(128)); -} - -// That's it! Google Test will repeat each TYPED_TEST for each type -// in the type list specified in TYPED_TEST_CASE. Sit back and be -// happy that you don't have to define them multiple times. - -#endif // GTEST_HAS_TYPED_TEST - -#if GTEST_HAS_TYPED_TEST_P - -using testing::Types; - -// Sometimes, however, you don't yet know all the types that you want -// to test when you write the tests. For example, if you are the -// author of an interface and expect other people to implement it, you -// might want to write a set of tests to make sure each implementation -// conforms to some basic requirements, but you don't know what -// implementations will be written in the future. -// -// How can you write the tests without committing to the type -// parameters? That's what "type-parameterized tests" can do for you. -// It is a bit more involved than typed tests, but in return you get a -// test pattern that can be reused in many contexts, which is a big -// win. Here's how you do it: - -// First, define a test fixture class template. Here we just reuse -// the PrimeTableTest fixture defined earlier: - -template -class PrimeTableTest2 : public PrimeTableTest { -}; - -// Then, declare the test case. The argument is the name of the test -// fixture, and also the name of the test case (as usual). The _P -// suffix is for "parameterized" or "pattern". -TYPED_TEST_CASE_P(PrimeTableTest2); - -// Next, use TYPED_TEST_P(TestCaseName, TestName) to define a test, -// similar to what you do with TEST_F. -TYPED_TEST_P(PrimeTableTest2, ReturnsFalseForNonPrimes) { - EXPECT_FALSE(this->table_->IsPrime(-5)); - EXPECT_FALSE(this->table_->IsPrime(0)); - EXPECT_FALSE(this->table_->IsPrime(1)); - EXPECT_FALSE(this->table_->IsPrime(4)); - EXPECT_FALSE(this->table_->IsPrime(6)); - EXPECT_FALSE(this->table_->IsPrime(100)); -} - -TYPED_TEST_P(PrimeTableTest2, ReturnsTrueForPrimes) { - EXPECT_TRUE(this->table_->IsPrime(2)); - EXPECT_TRUE(this->table_->IsPrime(3)); - EXPECT_TRUE(this->table_->IsPrime(5)); - EXPECT_TRUE(this->table_->IsPrime(7)); - EXPECT_TRUE(this->table_->IsPrime(11)); - EXPECT_TRUE(this->table_->IsPrime(131)); -} - -TYPED_TEST_P(PrimeTableTest2, CanGetNextPrime) { - EXPECT_EQ(2, this->table_->GetNextPrime(0)); - EXPECT_EQ(3, this->table_->GetNextPrime(2)); - EXPECT_EQ(5, this->table_->GetNextPrime(3)); - EXPECT_EQ(7, this->table_->GetNextPrime(5)); - EXPECT_EQ(11, this->table_->GetNextPrime(7)); - EXPECT_EQ(131, this->table_->GetNextPrime(128)); -} - -// Type-parameterized tests involve one extra step: you have to -// enumerate the tests you defined: -REGISTER_TYPED_TEST_CASE_P( - PrimeTableTest2, // The first argument is the test case name. - // The rest of the arguments are the test names. - ReturnsFalseForNonPrimes, ReturnsTrueForPrimes, CanGetNextPrime); - -// At this point the test pattern is done. However, you don't have -// any real test yet as you haven't said which types you want to run -// the tests with. - -// To turn the abstract test pattern into real tests, you instantiate -// it with a list of types. Usually the test pattern will be defined -// in a .h file, and anyone can #include and instantiate it. You can -// even instantiate it more than once in the same program. To tell -// different instances apart, you give each of them a name, which will -// become part of the test case name and can be used in test filters. - -// The list of types we want to test. Note that it doesn't have to be -// defined at the time we write the TYPED_TEST_P()s. -typedef Types - PrimeTableImplementations; -INSTANTIATE_TYPED_TEST_CASE_P(OnTheFlyAndPreCalculated, // Instance name - PrimeTableTest2, // Test case name - PrimeTableImplementations); // Type list - -#endif // GTEST_HAS_TYPED_TEST_P diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample7_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample7_unittest.cc deleted file mode 100644 index b5d507a9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample7_unittest.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to test common properties of multiple -// implementations of an interface (aka interface tests) using -// value-parameterized tests. Each test in the test case has -// a parameter that is an interface pointer to an implementation -// tested. - -// The interface and its implementations are in this header. -#include "prime_tables.h" - -#include - -#if GTEST_HAS_PARAM_TEST - -using ::testing::TestWithParam; -using ::testing::Values; - -// As a general rule, tested objects should not be reused between tests. -// Also, their constructors and destructors of tested objects can have -// side effects. Thus you should create and destroy them for each test. -// In this sample we will define a simple factory function for PrimeTable -// objects. We will instantiate objects in test's SetUp() method and -// delete them in TearDown() method. -typedef PrimeTable* CreatePrimeTableFunc(); - -PrimeTable* CreateOnTheFlyPrimeTable() { - return new OnTheFlyPrimeTable(); -} - -template -PrimeTable* CreatePreCalculatedPrimeTable() { - return new PreCalculatedPrimeTable(max_precalculated); -} - -// Inside the test body, fixture constructor, SetUp(), and TearDown() -// you can refer to the test parameter by GetParam(). -// In this case, the test parameter is a PrimeTableFactory interface pointer -// which we use in fixture's SetUp() to create and store an instance of -// PrimeTable. -class PrimeTableTest : public TestWithParam { - public: - virtual ~PrimeTableTest() { delete table_; } - virtual void SetUp() { table_ = (*GetParam())(); } - virtual void TearDown() { - delete table_; - table_ = NULL; - } - - protected: - PrimeTable* table_; -}; - -TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) { - EXPECT_FALSE(table_->IsPrime(-5)); - EXPECT_FALSE(table_->IsPrime(0)); - EXPECT_FALSE(table_->IsPrime(1)); - EXPECT_FALSE(table_->IsPrime(4)); - EXPECT_FALSE(table_->IsPrime(6)); - EXPECT_FALSE(table_->IsPrime(100)); -} - -TEST_P(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(table_->IsPrime(2)); - EXPECT_TRUE(table_->IsPrime(3)); - EXPECT_TRUE(table_->IsPrime(5)); - EXPECT_TRUE(table_->IsPrime(7)); - EXPECT_TRUE(table_->IsPrime(11)); - EXPECT_TRUE(table_->IsPrime(131)); -} - -TEST_P(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, table_->GetNextPrime(0)); - EXPECT_EQ(3, table_->GetNextPrime(2)); - EXPECT_EQ(5, table_->GetNextPrime(3)); - EXPECT_EQ(7, table_->GetNextPrime(5)); - EXPECT_EQ(11, table_->GetNextPrime(7)); - EXPECT_EQ(131, table_->GetNextPrime(128)); -} - -// In order to run value-parameterized tests, you need to instantiate them, -// or bind them to a list of values which will be used as test parameters. -// You can instantiate them in a different translation module, or even -// instantiate them several times. -// -// Here, we instantiate our tests with a list of two PrimeTable object -// factory functions: -INSTANTIATE_TEST_CASE_P( - OnTheFlyAndPreCalculated, - PrimeTableTest, - Values(&CreateOnTheFlyPrimeTable, &CreatePreCalculatedPrimeTable<1000>)); - -#else - -// Google Test doesn't support value-parameterized tests on some platforms -// and compilers, such as MSVC 7.1. If we use conditional compilation to -// compile out all code referring to the gtest_main library, MSVC linker -// will not link that library at all and consequently complain about -// missing entry point defined in that library (fatal error LNK1561: -// entry point must be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {} - -#endif // GTEST_HAS_PARAM_TEST diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample8_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample8_unittest.cc deleted file mode 100644 index d76136a7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/samples/sample8_unittest.cc +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to test code relying on some global flag variables. -// Combine() helps with generating all possible combinations of such flags, -// and each test is given one combination as a parameter. - -// Use class definitions to test from this header. -#include "prime_tables.h" - -#include - -#if GTEST_HAS_COMBINE - -// Suppose we want to introduce a new, improved implementation of PrimeTable -// which combines speed of PrecalcPrimeTable and versatility of -// OnTheFlyPrimeTable (see prime_tables.h). Inside it instantiates both -// PrecalcPrimeTable and OnTheFlyPrimeTable and uses the one that is more -// appropriate under the circumstances. But in low memory conditions, it can be -// told to instantiate without PrecalcPrimeTable instance at all and use only -// OnTheFlyPrimeTable. -class HybridPrimeTable : public PrimeTable { - public: - HybridPrimeTable(bool force_on_the_fly, int max_precalculated) - : on_the_fly_impl_(new OnTheFlyPrimeTable), - precalc_impl_(force_on_the_fly ? NULL : - new PreCalculatedPrimeTable(max_precalculated)), - max_precalculated_(max_precalculated) {} - virtual ~HybridPrimeTable() { - delete on_the_fly_impl_; - delete precalc_impl_; - } - - virtual bool IsPrime(int n) const { - if (precalc_impl_ != NULL && n < max_precalculated_) - return precalc_impl_->IsPrime(n); - else - return on_the_fly_impl_->IsPrime(n); - } - - virtual int GetNextPrime(int p) const { - int next_prime = -1; - if (precalc_impl_ != NULL && p < max_precalculated_) - next_prime = precalc_impl_->GetNextPrime(p); - - return next_prime != -1 ? next_prime : on_the_fly_impl_->GetNextPrime(p); - } - - private: - OnTheFlyPrimeTable* on_the_fly_impl_; - PreCalculatedPrimeTable* precalc_impl_; - int max_precalculated_; -}; - -using ::testing::TestWithParam; -using ::testing::Bool; -using ::testing::Values; -using ::testing::Combine; - -// To test all code paths for HybridPrimeTable we must test it with numbers -// both within and outside PreCalculatedPrimeTable's capacity and also with -// PreCalculatedPrimeTable disabled. We do this by defining fixture which will -// accept different combinations of parameters for instantiating a -// HybridPrimeTable instance. -class PrimeTableTest : public TestWithParam< ::std::tr1::tuple > { - protected: - virtual void SetUp() { - // This can be written as - // - // bool force_on_the_fly; - // int max_precalculated; - // tie(force_on_the_fly, max_precalculated) = GetParam(); - // - // once the Google C++ Style Guide allows use of ::std::tr1::tie. - // - bool force_on_the_fly = ::std::tr1::get<0>(GetParam()); - int max_precalculated = ::std::tr1::get<1>(GetParam()); - table_ = new HybridPrimeTable(force_on_the_fly, max_precalculated); - } - virtual void TearDown() { - delete table_; - table_ = NULL; - } - HybridPrimeTable* table_; -}; - -TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) { - // Inside the test body, you can refer to the test parameter by GetParam(). - // In this case, the test parameter is a PrimeTable interface pointer which - // we can use directly. - // Please note that you can also save it in the fixture's SetUp() method - // or constructor and use saved copy in the tests. - - EXPECT_FALSE(table_->IsPrime(-5)); - EXPECT_FALSE(table_->IsPrime(0)); - EXPECT_FALSE(table_->IsPrime(1)); - EXPECT_FALSE(table_->IsPrime(4)); - EXPECT_FALSE(table_->IsPrime(6)); - EXPECT_FALSE(table_->IsPrime(100)); -} - -TEST_P(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(table_->IsPrime(2)); - EXPECT_TRUE(table_->IsPrime(3)); - EXPECT_TRUE(table_->IsPrime(5)); - EXPECT_TRUE(table_->IsPrime(7)); - EXPECT_TRUE(table_->IsPrime(11)); - EXPECT_TRUE(table_->IsPrime(131)); -} - -TEST_P(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, table_->GetNextPrime(0)); - EXPECT_EQ(3, table_->GetNextPrime(2)); - EXPECT_EQ(5, table_->GetNextPrime(3)); - EXPECT_EQ(7, table_->GetNextPrime(5)); - EXPECT_EQ(11, table_->GetNextPrime(7)); - EXPECT_EQ(131, table_->GetNextPrime(128)); -} - -// In order to run value-parameterized tests, you need to instantiate them, -// or bind them to a list of values which will be used as test parameters. -// You can instantiate them in a different translation module, or even -// instantiate them several times. -// -// Here, we instantiate our tests with a list of parameters. We must combine -// all variations of the boolean flag suppressing PrecalcPrimeTable and some -// meaningful values for tests. We choose a small value (1), and a value that -// will put some of the tested numbers beyond the capability of the -// PrecalcPrimeTable instance and some inside it (10). Combine will produce all -// possible combinations. -INSTANTIATE_TEST_CASE_P(MeaningfulTestParameters, - PrimeTableTest, - Combine(Bool(), Values(1, 10))); - -#else - -// Google Test doesn't support Combine() on some platforms and compilers, -// such as MSVC 7.1. If we use conditional compilation to compile out -// all code referring to the gtest_main library, MSVC linker will not -// link that library at all and consequently complain about missing entry -// point defined in that library (fatal error LNK1561: entry point must -// be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {} - -#endif // GTEST_HAS_COMBINE diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scons/SConscript b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scons/SConscript deleted file mode 100644 index 0d384996..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scons/SConscript +++ /dev/null @@ -1,347 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -"""Builds the Google Test (gtest) lib; this is for Windows projects -using SCons and can probably be easily extended for cross-platform -SCons builds. The compilation settings from your project will be used, -with some specific flags required for gtest added. - -You should be able to call this file from more or less any SConscript -file. - -You can optionally set a variable on the construction environment to -have the unit test executables copied to your output directory. The -variable should be env['EXE_OUTPUT']. - -Another optional variable is env['LIB_OUTPUT']. If set, the generated -libraries are copied to the folder indicated by the variable. - -If you place the gtest sources within your own project's source -directory, you should be able to call this SConscript file simply as -follows: - -# -- cut here -- -# Build gtest library; first tell it where to copy executables. -env['EXE_OUTPUT'] = '#/mybuilddir/mybuildmode' # example, optional -env['LIB_OUTPUT'] = '#/mybuilddir/mybuildmode/lib' -env.SConscript('whateverpath/gtest/scons/SConscript') -# -- cut here -- - -If on the other hand you place the gtest sources in a directory -outside of your project's source tree, you would use a snippet similar -to the following: - -# -- cut here -- - -# The following assumes that $BUILD_DIR refers to the root of the -# directory for your current build mode, e.g. "#/mybuilddir/mybuildmode" - -# Build gtest library; as it is outside of our source root, we need to -# tell SCons that the directory it will refer to as -# e.g. $BUILD_DIR/gtest is actually on disk in original form as -# ../../gtest (relative to your project root directory). Recall that -# SCons by default copies all source files into the build directory -# before building. -gtest_dir = env.Dir('$BUILD_DIR/gtest') - -# Modify this part to point to gtest relative to the current -# SConscript or SConstruct file's directory. The ../.. path would -# be different per project, to locate the base directory for gtest. -gtest_dir.addRepository(env.Dir('../../gtest')) - -# Tell the gtest SCons file where to copy executables. -env['EXE_OUTPUT'] = '$BUILD_DIR' # example, optional - -# Call the gtest SConscript to build gtest.lib and unit tests. The -# location of the library should end up as -# '$BUILD_DIR/gtest/scons/gtest.lib' -env.SConscript(env.File('scons/SConscript', gtest_dir)) - -# -- cut here -- -""" - - -__author__ = 'joi@google.com (Joi Sigurdsson)' - - -Import('env') -env = env.Clone() - -# Include paths to gtest headers are relative to either the gtest -# directory or the 'include' subdirectory of it, and this SConscript -# file is one directory deeper than the gtest directory. -env.Prepend(CPPPATH = ['#/..', - '#/../include']) - -# Sources used by base library and library that includes main. -gtest_source = '../src/gtest-all.cc' -gtest_main_source = '../src/gtest_main.cc' - -# gtest.lib to be used by most apps (if you have your own main -# function) -gtest = env.StaticLibrary(target='gtest', - source=[gtest_source]) - -# gtest_main.lib can be used if you just want a basic main function; -# it is also used by the tests for Google Test itself. -gtest_main = env.StaticLibrary(target='gtest_main', - source=[gtest_source, gtest_main_source]) - -env_with_exceptions = env.Clone() -if env_with_exceptions['PLATFORM'] == 'win32': - env_with_exceptions.Append(CCFLAGS = ['/EHsc']) - env_with_exceptions.Append(CPPDEFINES = '_HAS_EXCEPTIONS=1') - # Undoes the _TYPEINFO_ hack, which is unnecessary and only creates - # trouble when exceptions are enabled. - cppdefines = env_with_exceptions['CPPDEFINES'] - if '_TYPEINFO_' in cppdefines: - cppdefines.remove('_TYPEINFO_') -else: - env_with_exceptions.Append(CCFLAGS='-fexceptions') - ccflags = env_with_exceptions['CCFLAGS'] - if '-fno-exceptions' in ccflags: - ccflags.remove('-fno-exceptions') - -env_without_rtti = env.Clone() -if env_without_rtti['PLATFORM'] == 'win32': - env_without_rtti.Append(CCFLAGS = ['/GR-']) -else: - env_without_rtti.Append(CCFLAGS = ['-fno-rtti']) - env_without_rtti.Append(CPPDEFINES = 'GTEST_HAS_RTTI=0') - -env_use_own_tuple = env.Clone() -env_use_own_tuple.Append(CPPDEFINES = 'GTEST_USE_OWN_TR1_TUPLE=1') - -gtest_ex_obj = env_with_exceptions.Object(target='gtest_ex', - source=gtest_source) -gtest_main_ex_obj = env_with_exceptions.Object(target='gtest_main_ex', - source=gtest_main_source) - -gtest_ex = env_with_exceptions.StaticLibrary( - target='gtest_ex', - source=gtest_ex_obj) - -gtest_ex_main = env_with_exceptions.StaticLibrary( - target='gtest_ex_main', - source=gtest_ex_obj + gtest_main_ex_obj) - -# Install the libraries if needed. -if 'LIB_OUTPUT' in env.Dictionary(): - env.Install('$LIB_OUTPUT', source=[gtest, gtest_main, gtest_ex_main]) - - -def ConstructSourceList(target, dir_prefix, additional_sources=None): - """Helper to create source file list for gtest binaries. - - Args: - target: The basename of the target's main source file. - dir_prefix: The path to prefix the main source file. - gtest_lib: The gtest lib to use. - additional_sources: A list of additional source files in the target. - """ - source = [env.File('%s.cc' % target, env.Dir(dir_prefix))] - if additional_sources: - source += additional_sources - return source - -def GtestBinary(env, target, gtest_libs, sources): - """Helper to create gtest binaries: tests, samples, etc. - - Args: - env: The SCons construction environment to use to build. - target: The basename of the target's main source file, also used as target - name. - gtest_libs: A list of gtest libraries to use. - sources: A list of source files in the target. - """ - binary = env.Program(target=target, source=sources, LIBS=gtest_libs) - if 'EXE_OUTPUT' in env.Dictionary(): - env.Install('$EXE_OUTPUT', source=[binary]) - -def GtestUnitTest(env, target, gtest_lib, additional_sources=None): - """Helper to create gtest unit tests. - - Args: - env: The SCons construction environment to use to build. - target: The basename of the target unit test .cc file. - gtest_lib: The gtest lib to use. - additional_sources: A list of additional source files in the target. - """ - GtestBinary(env, - target, - [gtest_lib], - ConstructSourceList(target, "../test", - additional_sources=additional_sources)) - -GtestUnitTest(env, 'gtest-filepath_test', gtest_main) -GtestUnitTest(env, 'gtest-message_test', gtest_main) -GtestUnitTest(env, 'gtest-options_test', gtest_main) -GtestUnitTest(env, 'gtest_environment_test', gtest) -GtestUnitTest(env, 'gtest_main_unittest', gtest_main) -GtestUnitTest(env, 'gtest_no_test_unittest', gtest) -GtestUnitTest(env, 'gtest_pred_impl_unittest', gtest_main) -GtestUnitTest(env, 'gtest_prod_test', gtest_main, - additional_sources=['../test/production.cc']) -GtestUnitTest(env, 'gtest_repeat_test', gtest) -GtestUnitTest(env, 'gtest_sole_header_test', gtest_main) -GtestUnitTest(env, 'gtest-test-part_test', gtest_main) -GtestUnitTest(env, 'gtest-typed-test_test', gtest_main, - additional_sources=['../test/gtest-typed-test2_test.cc']) -GtestUnitTest(env, 'gtest-param-test_test', gtest, - additional_sources=['../test/gtest-param-test2_test.cc']) -GtestUnitTest(env, 'gtest_unittest', gtest_main) -GtestUnitTest(env, 'gtest_output_test_', gtest) -GtestUnitTest(env, 'gtest_color_test_', gtest) -GtestUnitTest(env, 'gtest-linked_ptr_test', gtest_main) -GtestUnitTest(env, 'gtest-port_test', gtest_main) -GtestUnitTest(env, 'gtest_break_on_failure_unittest_', gtest) -GtestUnitTest(env, 'gtest_filter_unittest_', gtest) -GtestUnitTest(env, 'gtest_help_test_', gtest_main) -GtestUnitTest(env, 'gtest_list_tests_unittest_', gtest) -GtestUnitTest(env, 'gtest_throw_on_failure_test_', gtest) -GtestUnitTest(env_with_exceptions, 'gtest_throw_on_failure_ex_test', gtest_ex) -GtestUnitTest(env, 'gtest_xml_outfile1_test_', gtest_main) -GtestUnitTest(env, 'gtest_xml_outfile2_test_', gtest_main) -GtestUnitTest(env, 'gtest_xml_output_unittest_', gtest_main) - -# Assuming POSIX-like environment with GCC. -# TODO(vladl@google.com): sniff presence of pthread_atfork instead of -# selecting on a platform. -env_with_threads = env.Clone() -if env_with_threads['PLATFORM'] != 'win32': - env_with_threads.Append(CCFLAGS = ['-pthread']) - env_with_threads.Append(LINKFLAGS = ['-pthread']) -GtestUnitTest(env_with_threads, 'gtest-death-test_test', gtest_main) - -gtest_unittest_ex_obj = env_with_exceptions.Object( - target='gtest_unittest_ex', - source='../test/gtest_unittest.cc') -GtestBinary(env_with_exceptions, - 'gtest_ex_unittest', - [gtest_ex_main], - gtest_unittest_ex_obj) - -gtest_unittest_no_rtti_obj = env_without_rtti.Object( - target='gtest_unittest_no_rtti', - source='../test/gtest_unittest.cc') -gtest_all_no_rtti_obj = env_without_rtti.Object( - target='gtest_all_no_rtti', - source='../src/gtest-all.cc') -gtest_main_no_rtti_obj = env_without_rtti.Object( - target='gtest_main_no_rtti', - source='../src/gtest_main.cc') -GtestBinary(env_without_rtti, - 'gtest_no_rtti_test', - [], - gtest_unittest_no_rtti_obj + - gtest_all_no_rtti_obj + - gtest_main_no_rtti_obj) - -# Builds a test for gtest's own TR1 tuple implementation. -gtest_all_use_own_tuple_obj = env_use_own_tuple.Object( - target='gtest_all_use_own_tuple', - source='../src/gtest-all.cc') -gtest_main_use_own_tuple_obj = env_use_own_tuple.Object( - target='gtest_main_use_own_tuple', - source='../src/gtest_main.cc') -GtestBinary(env_use_own_tuple, - 'gtest-tuple_test', - [], - ['../test/gtest-tuple_test.cc', - gtest_all_use_own_tuple_obj, - gtest_main_use_own_tuple_obj]) - -# Builds a test for gtest features that use tuple. -gtest_param_test_test_use_own_tuple_obj = env_use_own_tuple.Object( - target='gtest_param_test_test_use_own_tuple', - source='../test/gtest-param-test_test.cc') -gtest_param_test2_test_use_own_tuple_obj = env_use_own_tuple.Object( - target='gtest_param_test2_test_use_own_tuple', - source='../test/gtest-param-test2_test.cc') -GtestBinary(env_use_own_tuple, - 'gtest_use_own_tuple_test', - [], - gtest_param_test_test_use_own_tuple_obj + - gtest_param_test2_test_use_own_tuple_obj + - gtest_all_use_own_tuple_obj) - -# TODO(wan@google.com): simplify the definition of build targets that -# use alternative environments. - -# We need to disable some optimization flags for some tests on -# Windows; otherwise the redirection of stdout does not work -# (apparently because of a compiler bug). -env_with_less_optimization = env.Clone() -if env_with_less_optimization['PLATFORM'] == 'win32': - linker_flags = env_with_less_optimization['LINKFLAGS'] - for flag in ["/O1", "/Os", "/Og", "/Oy"]: - if flag in linker_flags: - linker_flags.remove(flag) -GtestUnitTest(env_with_less_optimization, 'gtest_env_var_test_', gtest) -GtestUnitTest(env_with_less_optimization, 'gtest_uninitialized_test_', gtest) - -def GtestSample(env, target, gtest_lib, additional_sources=None): - """Helper to create gtest samples. - - Args: - env: The SCons construction environment to use to build. - target: The basename of the target unit test .cc file. - gtest_lib: The gtest lib to use. - additional_sources: A list of additional source files in the target. - """ - GtestBinary(env, - target, - [gtest_lib], - ConstructSourceList(target, "../samples", - additional_sources=additional_sources)) - -# Use the GTEST_BUILD_SAMPLES build variable to control building of samples. -# In your SConstruct file, add -# vars = Variables() -# vars.Add(BoolVariable('GTEST_BUILD_SAMPLES', 'Build samples', True)) -# my_environment = Environment(variables = vars, ...) -# Then, in the command line use GTEST_BUILD_SAMPLES=true to enable them. -# -if env.get('GTEST_BUILD_SAMPLES', False): - sample1_obj = env.Object('../samples/sample1.cc') - GtestSample(env, 'sample1_unittest', gtest_main, - additional_sources=[sample1_obj]) - GtestSample(env, 'sample2_unittest', gtest_main, - additional_sources=['../samples/sample2.cc']) - GtestSample(env, 'sample3_unittest', gtest_main) - GtestSample(env, 'sample4_unittest', gtest_main, - additional_sources=['../samples/sample4.cc']) - GtestSample(env, 'sample5_unittest', gtest_main, - additional_sources=[sample1_obj]) - GtestSample(env, 'sample6_unittest', gtest_main) - GtestSample(env, 'sample7_unittest', gtest_main) - GtestSample(env, 'sample8_unittest', gtest_main) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/fuse_gtest_files.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/fuse_gtest_files.py deleted file mode 100755 index 148444ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/fuse_gtest_files.py +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""fuse_gtest_files.py v0.2.0 -Fuses Google Test source code into a .h file and a .cc file. - -SYNOPSIS - fuse_gtest_files.py [GTEST_ROOT_DIR] OUTPUT_DIR - - Scans GTEST_ROOT_DIR for Google Test source code, and generates - two files: OUTPUT_DIR/gtest/gtest.h and OUTPUT_DIR/gtest/gtest-all.cc. - Then you can build your tests by adding OUTPUT_DIR to the include - search path and linking with OUTPUT_DIR/gtest/gtest-all.cc. These - two files contain everything you need to use Google Test. Hence - you can "install" Google Test by copying them to wherever you want. - - GTEST_ROOT_DIR can be omitted and defaults to the parent - directory of the directory holding this script. - -EXAMPLES - ./fuse_gtest_files.py fused_gtest - ./fuse_gtest_files.py path/to/unpacked/gtest fused_gtest - -This tool is experimental. In particular, it assumes that there is no -conditional inclusion of Google Test headers. Please report any -problems to googletestframework@googlegroups.com. You can read -http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for -more information. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sets -import sys - -# We assume that this file is in the scripts/ directory in the Google -# Test root directory. -DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') - -# Regex for matching '#include '. -INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gtest/.+)>') - -# Regex for matching '#include "src/..."'. -INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"') - -# Where to find the source seed files. -GTEST_H_SEED = 'include/gtest/gtest.h' -GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h' -GTEST_ALL_CC_SEED = 'src/gtest-all.cc' - -# Where to put the generated files. -GTEST_H_OUTPUT = 'gtest/gtest.h' -GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc' - - -def VerifyFileExists(directory, relative_path): - """Verifies that the given file exists; aborts on failure. - - relative_path is the file path relative to the given directory. - """ - - if not os.path.isfile(os.path.join(directory, relative_path)): - print 'ERROR: Cannot find %s in directory %s.' % (relative_path, - directory) - print ('Please either specify a valid project root directory ' - 'or omit it on the command line.') - sys.exit(1) - - -def ValidateGTestRootDir(gtest_root): - """Makes sure gtest_root points to a valid gtest root directory. - - The function aborts the program on failure. - """ - - VerifyFileExists(gtest_root, GTEST_H_SEED) - VerifyFileExists(gtest_root, GTEST_ALL_CC_SEED) - - -def VerifyOutputFile(output_dir, relative_path): - """Verifies that the given output file path is valid. - - relative_path is relative to the output_dir directory. - """ - - # Makes sure the output file either doesn't exist or can be overwritten. - output_file = os.path.join(output_dir, relative_path) - if os.path.exists(output_file): - # TODO(wan@google.com): The following user-interaction doesn't - # work with automated processes. We should provide a way for the - # Makefile to force overwriting the files. - print ('%s already exists in directory %s - overwrite it? (y/N) ' % - (relative_path, output_dir)) - answer = sys.stdin.readline().strip() - if answer not in ['y', 'Y']: - print 'ABORTED.' - sys.exit(1) - - # Makes sure the directory holding the output file exists; creates - # it and all its ancestors if necessary. - parent_directory = os.path.dirname(output_file) - if not os.path.isdir(parent_directory): - os.makedirs(parent_directory) - - -def ValidateOutputDir(output_dir): - """Makes sure output_dir points to a valid output directory. - - The function aborts the program on failure. - """ - - VerifyOutputFile(output_dir, GTEST_H_OUTPUT) - VerifyOutputFile(output_dir, GTEST_ALL_CC_OUTPUT) - - -def FuseGTestH(gtest_root, output_dir): - """Scans folder gtest_root to generate gtest/gtest.h in output_dir.""" - - output_file = file(os.path.join(output_dir, GTEST_H_OUTPUT), 'w') - processed_files = sets.Set() # Holds all gtest headers we've processed. - - def ProcessFile(gtest_header_path): - """Processes the given gtest header file.""" - - # We don't process the same header twice. - if gtest_header_path in processed_files: - return - - processed_files.add(gtest_header_path) - - # Reads each line in the given gtest header. - for line in file(os.path.join(gtest_root, gtest_header_path), 'r'): - m = INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - # It's '#include ' - let's process it recursively. - ProcessFile('include/' + m.group(1)) - else: - # Otherwise we copy the line unchanged to the output file. - output_file.write(line) - - ProcessFile(GTEST_H_SEED) - output_file.close() - - -def FuseGTestAllCcToFile(gtest_root, output_file): - """Scans folder gtest_root to generate gtest/gtest-all.cc in output_file.""" - - processed_files = sets.Set() - - def ProcessFile(gtest_source_file): - """Processes the given gtest source file.""" - - # We don't process the same #included file twice. - if gtest_source_file in processed_files: - return - - processed_files.add(gtest_source_file) - - # Reads each line in the given gtest source file. - for line in file(os.path.join(gtest_root, gtest_source_file), 'r'): - m = INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - if 'include/' + m.group(1) == GTEST_SPI_H_SEED: - # It's '#include '. This file is not - # #included by , so we need to process it. - ProcessFile(GTEST_SPI_H_SEED) - else: - # It's '#include ' where foo is not gtest-spi. - # We treat it as '#include ', as all other - # gtest headers are being fused into gtest.h and cannot be - # #included directly. - - # There is no need to #include more than once. - if not GTEST_H_SEED in processed_files: - processed_files.add(GTEST_H_SEED) - output_file.write('#include <%s>\n' % (GTEST_H_OUTPUT,)) - else: - m = INCLUDE_SRC_FILE_REGEX.match(line) - if m: - # It's '#include "src/foo"' - let's process it recursively. - ProcessFile(m.group(1)) - else: - output_file.write(line) - - ProcessFile(GTEST_ALL_CC_SEED) - - -def FuseGTestAllCc(gtest_root, output_dir): - """Scans folder gtest_root to generate gtest/gtest-all.cc in output_dir.""" - - output_file = file(os.path.join(output_dir, GTEST_ALL_CC_OUTPUT), 'w') - FuseGTestAllCcToFile(gtest_root, output_file) - output_file.close() - - -def FuseGTest(gtest_root, output_dir): - """Fuses gtest.h and gtest-all.cc.""" - - ValidateGTestRootDir(gtest_root) - ValidateOutputDir(output_dir) - - FuseGTestH(gtest_root, output_dir) - FuseGTestAllCc(gtest_root, output_dir) - - -def main(): - argc = len(sys.argv) - if argc == 2: - # fuse_gtest_files.py OUTPUT_DIR - FuseGTest(DEFAULT_GTEST_ROOT_DIR, sys.argv[1]) - elif argc == 3: - # fuse_gtest_files.py GTEST_ROOT_DIR OUTPUT_DIR - FuseGTest(sys.argv[1], sys.argv[2]) - else: - print __doc__ - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gen_gtest_pred_impl.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gen_gtest_pred_impl.py deleted file mode 100755 index d1b2f253..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gen_gtest_pred_impl.py +++ /dev/null @@ -1,733 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""gen_gtest_pred_impl.py v0.1 - -Generates the implementation of Google Test predicate assertions and -accompanying tests. - -Usage: - - gen_gtest_pred_impl.py MAX_ARITY - -where MAX_ARITY is a positive integer. - -The command generates the implementation of up-to MAX_ARITY-ary -predicate assertions, and writes it to file gtest_pred_impl.h in the -directory where the script is. It also generates the accompanying -unit test in file gtest_pred_impl_unittest.cc. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys -import time - -# Where this script is. -SCRIPT_DIR = os.path.dirname(sys.argv[0]) - -# Where to store the generated header. -HEADER = os.path.join(SCRIPT_DIR, '../include/gtest/gtest_pred_impl.h') - -# Where to store the generated unit test. -UNIT_TEST = os.path.join(SCRIPT_DIR, '../test/gtest_pred_impl_unittest.cc') - - -def HeaderPreamble(n): - """Returns the preamble for the header file. - - Args: - n: the maximum arity of the predicate macros to be generated. - """ - - # A map that defines the values used in the preamble template. - DEFS = { - 'today' : time.strftime('%m/%d/%Y'), - 'year' : time.strftime('%Y'), - 'command' : '%s %s' % (os.path.basename(sys.argv[0]), n), - 'n' : n - } - - return ( -"""// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on %(today)s by command -// '%(command)s'. DO NOT EDIT BY HAND! -// -// Implements a family of generic predicate assertion macros. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ - -// This header implements a family of generic predicate assertion -// macros: -// -// ASSERT_PRED_FORMAT1(pred_format, v1) -// ASSERT_PRED_FORMAT2(pred_format, v1, v2) -// ... -// -// where pred_format is a function or functor that takes n (in the -// case of ASSERT_PRED_FORMATn) values and their source expression -// text, and returns a testing::AssertionResult. See the definition -// of ASSERT_EQ in gtest.h for an example. -// -// If you don't care about formatting, you can use the more -// restrictive version: -// -// ASSERT_PRED1(pred, v1) -// ASSERT_PRED2(pred, v1, v2) -// ... -// -// where pred is an n-ary function or functor that returns bool, -// and the values v1, v2, ..., must support the << operator for -// streaming to std::ostream. -// -// We also define the EXPECT_* variations. -// -// For now we only support predicates whose arity is at most %(n)s. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. - -// GTEST_ASSERT_ is the basic statement to which all of the assertions -// in this file reduce. Don't use this in your code. - -#define GTEST_ASSERT_(expression, on_failure) \\ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\ - if (const ::testing::AssertionResult gtest_ar = (expression)) \\ - ; \\ - else \\ - on_failure(gtest_ar.failure_message()) -""" % DEFS) - - -def Arity(n): - """Returns the English name of the given arity.""" - - if n < 0: - return None - elif n <= 3: - return ['nullary', 'unary', 'binary', 'ternary'][n] - else: - return '%s-ary' % n - - -def Title(word): - """Returns the given word in title case. The difference between - this and string's title() method is that Title('4-ary') is '4-ary' - while '4-ary'.title() is '4-Ary'.""" - - return word[0].upper() + word[1:] - - -def OneTo(n): - """Returns the list [1, 2, 3, ..., n].""" - - return range(1, n + 1) - - -def Iter(n, format, sep=''): - """Given a positive integer n, a format string that contains 0 or - more '%s' format specs, and optionally a separator string, returns - the join of n strings, each formatted with the format string on an - iterator ranged from 1 to n. - - Example: - - Iter(3, 'v%s', sep=', ') returns 'v1, v2, v3'. - """ - - # How many '%s' specs are in format? - spec_count = len(format.split('%s')) - 1 - return sep.join([format % (spec_count * (i,)) for i in OneTo(n)]) - - -def ImplementationForArity(n): - """Returns the implementation of n-ary predicate assertions.""" - - # A map the defines the values used in the implementation template. - DEFS = { - 'n' : str(n), - 'vs' : Iter(n, 'v%s', sep=', '), - 'vts' : Iter(n, '#v%s', sep=', '), - 'arity' : Arity(n), - 'Arity' : Title(Arity(n)) - } - - impl = """ - -// Helper function for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use -// this in your code. -template -AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS - - impl += Iter(n, """, - const char* e%s""") - - impl += """, - Pred pred""" - - impl += Iter(n, """, - const T%s& v%s""") - - impl += """) { - if (pred(%(vs)s)) return AssertionSuccess(); - - Message msg; -""" % DEFS - - impl += ' msg << pred_text << "("' - - impl += Iter(n, """ - << e%s""", sep=' << ", "') - - impl += ' << ") evaluates to false, where"' - - impl += Iter(n, """ - << "\\n" << e%s << " evaluates to " << v%s""") - - impl += """; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT%(n)s. -// Don't use this in your code. -#define GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, on_failure)\\ - GTEST_ASSERT_(pred_format(%(vts)s, %(vs)s),\\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use -// this in your code. -#define GTEST_PRED%(n)s_(pred, %(vs)s, on_failure)\\ - GTEST_ASSERT_(::testing::AssertPred%(n)sHelper(#pred""" % DEFS - - impl += Iter(n, """, \\ - #v%s""") - - impl += """, \\ - pred""" - - impl += Iter(n, """, \\ - v%s""") - - impl += """), on_failure) - -// %(Arity)s predicate assertion macros. -#define EXPECT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\ - GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED%(n)s(pred, %(vs)s) \\ - GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\ - GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED%(n)s(pred, %(vs)s) \\ - GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_FATAL_FAILURE_) - -""" % DEFS - - return impl - - -def HeaderPostamble(): - """Returns the postamble for the header file.""" - - return """ - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -""" - - -def GenerateFile(path, content): - """Given a file path and a content string, overwrites it with the - given content.""" - - print 'Updating file %s . . .' % path - - f = file(path, 'w+') - print >>f, content, - f.close() - - print 'File %s has been updated.' % path - - -def GenerateHeader(n): - """Given the maximum arity n, updates the header file that implements - the predicate assertions.""" - - GenerateFile(HEADER, - HeaderPreamble(n) - + ''.join([ImplementationForArity(i) for i in OneTo(n)]) - + HeaderPostamble()) - - -def UnitTestPreamble(): - """Returns the preamble for the unit test file.""" - - # A map that defines the values used in the preamble template. - DEFS = { - 'today' : time.strftime('%m/%d/%Y'), - 'year' : time.strftime('%Y'), - 'command' : '%s %s' % (os.path.basename(sys.argv[0]), sys.argv[1]), - } - - return ( -"""// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on %(today)s by command -// '%(command)s'. DO NOT EDIT BY HAND! - -// Regression test for gtest_pred_impl.h -// -// This file is generated by a script and quite long. If you intend to -// learn how Google Test works by reading its unit tests, read -// gtest_unittest.cc instead. -// -// This is intended as a regression test for the Google Test predicate -// assertions. We compile it as part of the gtest_unittest target -// only to keep the implementation tidy and compact, as it is quite -// involved to set up the stage for testing Google Test using Google -// Test itself. -// -// Currently, gtest_unittest takes ~11 seconds to run in the testing -// daemon. In the future, if it grows too large and needs much more -// time to finish, we should consider separating this file into a -// stand-alone regression test. - -#include - -#include -#include - -// A user-defined data type. -struct Bool { - explicit Bool(int val) : value(val != 0) {} - - bool operator>(int n) const { return value > Bool(n).value; } - - Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); } - - bool operator==(const Bool& rhs) const { return value == rhs.value; } - - bool value; -}; - -// Enables Bool to be used in assertions. -std::ostream& operator<<(std::ostream& os, const Bool& x) { - return os << (x.value ? "true" : "false"); -} - -""" % DEFS) - - -def TestsForArity(n): - """Returns the tests for n-ary predicate assertions.""" - - # A map that defines the values used in the template for the tests. - DEFS = { - 'n' : n, - 'es' : Iter(n, 'e%s', sep=', '), - 'vs' : Iter(n, 'v%s', sep=', '), - 'vts' : Iter(n, '#v%s', sep=', '), - 'tvs' : Iter(n, 'T%s v%s', sep=', '), - 'int_vs' : Iter(n, 'int v%s', sep=', '), - 'Bool_vs' : Iter(n, 'Bool v%s', sep=', '), - 'types' : Iter(n, 'typename T%s', sep=', '), - 'v_sum' : Iter(n, 'v%s', sep=' + '), - 'arity' : Arity(n), - 'Arity' : Title(Arity(n)), - } - - tests = ( -"""// Sample functions/functors for testing %(arity)s predicate assertions. - -// A %(arity)s predicate function. -template <%(types)s> -bool PredFunction%(n)s(%(tvs)s) { - return %(v_sum)s > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction%(n)sInt(%(int_vs)s) { - return %(v_sum)s > 0; -} -bool PredFunction%(n)sBool(%(Bool_vs)s) { - return %(v_sum)s > 0; -} -""" % DEFS) - - tests += """ -// A %(arity)s predicate functor. -struct PredFunctor%(n)s { - template <%(types)s> - bool operator()(""" % DEFS - - tests += Iter(n, 'const T%s& v%s', sep=""", - """) - - tests += """) { - return %(v_sum)s > 0; - } -}; -""" % DEFS - - tests += """ -// A %(arity)s predicate-formatter function. -template <%(types)s> -testing::AssertionResult PredFormatFunction%(n)s(""" % DEFS - - tests += Iter(n, 'const char* e%s', sep=""", - """) - - tests += Iter(n, """, - const T%s& v%s""") - - tests += """) { - if (PredFunction%(n)s(%(vs)s)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << """ % DEFS - - tests += Iter(n, 'e%s', sep=' << " + " << ') - - tests += """ - << " is expected to be positive, but evaluates to " - << %(v_sum)s << "."; - return testing::AssertionFailure(msg); -} -""" % DEFS - - tests += """ -// A %(arity)s predicate-formatter functor. -struct PredFormatFunctor%(n)s { - template <%(types)s> - testing::AssertionResult operator()(""" % DEFS - - tests += Iter(n, 'const char* e%s', sep=""", - """) - - tests += Iter(n, """, - const T%s& v%s""") - - tests += """) const { - return PredFormatFunction%(n)s(%(es)s, %(vs)s); - } -}; -""" % DEFS - - tests += """ -// Tests for {EXPECT|ASSERT}_PRED_FORMAT%(n)s. - -class Predicate%(n)sTest : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false;""" % DEFS - - tests += """ - """ + Iter(n, 'n%s_ = ') + """0; - } -""" - - tests += """ - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once.""" - - tests += ''.join([""" - EXPECT_EQ(1, n%s_) << - "The predicate assertion didn't evaluate argument %s " - "exactly once.";""" % (i, i + 1) for i in OneTo(n)]) - - tests += """ - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; -""" % DEFS - - tests += Iter(n, """ - static int n%s_;""") - - tests += """ -}; - -bool Predicate%(n)sTest::expected_to_finish_; -bool Predicate%(n)sTest::finished_; -""" % DEFS - - tests += Iter(n, """int Predicate%%(n)sTest::n%s_; -""") % DEFS - - tests += """ -typedef Predicate%(n)sTest EXPECT_PRED_FORMAT%(n)sTest; -typedef Predicate%(n)sTest ASSERT_PRED_FORMAT%(n)sTest; -typedef Predicate%(n)sTest EXPECT_PRED%(n)sTest; -typedef Predicate%(n)sTest ASSERT_PRED%(n)sTest; -""" % DEFS - - def GenTest(use_format, use_assert, expect_failure, - use_functor, use_user_type): - """Returns the test for a predicate assertion macro. - - Args: - use_format: true iff the assertion is a *_PRED_FORMAT*. - use_assert: true iff the assertion is a ASSERT_*. - expect_failure: true iff the assertion is expected to fail. - use_functor: true iff the first argument of the assertion is - a functor (as opposed to a function) - use_user_type: true iff the predicate functor/function takes - argument(s) of a user-defined type. - - Example: - - GenTest(1, 0, 0, 1, 0) returns a test that tests the behavior - of a successful EXPECT_PRED_FORMATn() that takes a functor - whose arguments have built-in types.""" - - if use_assert: - assrt = 'ASSERT' # 'assert' is reserved, so we cannot use - # that identifier here. - else: - assrt = 'EXPECT' - - assertion = assrt + '_PRED' - - if use_format: - pred_format = 'PredFormat' - assertion += '_FORMAT' - else: - pred_format = 'Pred' - - assertion += '%(n)s' % DEFS - - if use_functor: - pred_format_type = 'functor' - pred_format += 'Functor%(n)s()' - else: - pred_format_type = 'function' - pred_format += 'Function%(n)s' - if not use_format: - if use_user_type: - pred_format += 'Bool' - else: - pred_format += 'Int' - - test_name = pred_format_type.title() - - if use_user_type: - arg_type = 'user-defined type (Bool)' - test_name += 'OnUserType' - if expect_failure: - arg = 'Bool(n%s_++)' - else: - arg = 'Bool(++n%s_)' - else: - arg_type = 'built-in type (int)' - test_name += 'OnBuiltInType' - if expect_failure: - arg = 'n%s_++' - else: - arg = '++n%s_' - - if expect_failure: - successful_or_failed = 'failed' - expected_or_not = 'expected.' - test_name += 'Failure' - else: - successful_or_failed = 'successful' - expected_or_not = 'UNEXPECTED!' - test_name += 'Success' - - # A map that defines the values used in the test template. - defs = DEFS.copy() - defs.update({ - 'assert' : assrt, - 'assertion' : assertion, - 'test_name' : test_name, - 'pf_type' : pred_format_type, - 'pf' : pred_format, - 'arg_type' : arg_type, - 'arg' : arg, - 'successful' : successful_or_failed, - 'expected' : expected_or_not, - }) - - test = """ -// Tests a %(successful)s %(assertion)s where the -// predicate-formatter is a %(pf_type)s on a %(arg_type)s. -TEST_F(%(assertion)sTest, %(test_name)s) {""" % defs - - indent = (len(assertion) + 3)*' ' - extra_indent = '' - - if expect_failure: - extra_indent = ' ' - if use_assert: - test += """ - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT""" - else: - test += """ - EXPECT_NONFATAL_FAILURE({ // NOLINT""" - - test += '\n' + extra_indent + """ %(assertion)s(%(pf)s""" % defs - - test = test % defs - test += Iter(n, ',\n' + indent + extra_indent + '%(arg)s' % defs) - test += ');\n' + extra_indent + ' finished_ = true;\n' - - if expect_failure: - test += ' }, "");\n' - - test += '}\n' - return test - - # Generates tests for all 2**6 = 64 combinations. - tests += ''.join([GenTest(use_format, use_assert, expect_failure, - use_functor, use_user_type) - for use_format in [0, 1] - for use_assert in [0, 1] - for expect_failure in [0, 1] - for use_functor in [0, 1] - for use_user_type in [0, 1] - ]) - - return tests - - -def UnitTestPostamble(): - """Returns the postamble for the tests.""" - - return '' - - -def GenerateUnitTest(n): - """Returns the tests for up-to n-ary predicate assertions.""" - - GenerateFile(UNIT_TEST, - UnitTestPreamble() - + ''.join([TestsForArity(i) for i in OneTo(n)]) - + UnitTestPostamble()) - - -def _Main(): - """The entry point of the script. Generates the header file and its - unit test.""" - - if len(sys.argv) != 2: - print __doc__ - print 'Author: ' + __author__ - sys.exit(1) - - n = int(sys.argv[1]) - GenerateHeader(n) - GenerateUnitTest(n) - - -if __name__ == '__main__': - _Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gtest-config.in b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gtest-config.in deleted file mode 100755 index b82d5a17..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/gtest-config.in +++ /dev/null @@ -1,274 +0,0 @@ -#!/bin/sh - -# These variables are automatically filled in by the configure script. -name="@PACKAGE_TARNAME@" -version="@PACKAGE_VERSION@" - -show_usage() -{ - echo "Usage: gtest-config [OPTIONS...]" -} - -show_help() -{ - show_usage - cat <<\EOF - -The `gtest-config' script provides access to the necessary compile and linking -flags to connect with Google C++ Testing Framework, both in a build prior to -installation, and on the system proper after installation. The installation -overrides may be issued in combination with any other queries, but will only -affect installation queries if called on a built but not installed gtest. The -installation queries may not be issued with any other types of queries, and -only one installation query may be made at a time. The version queries and -compiler flag queries may be combined as desired but not mixed. Different -version queries are always combined with logical "and" semantics, and only the -last of any particular query is used while all previous ones ignored. All -versions must be specified as a sequence of numbers separated by periods. -Compiler flag queries output the union of the sets of flags when combined. - - Examples: - gtest-config --min-version=1.0 || echo "Insufficient Google Test version." - - g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gtest-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Test: - g++ $(../../my_gtest_build/scripts/gtest-config ...) ... - - # When using an installed Google Test, but with installation overrides: - export GTEST_PREFIX="/opt" - g++ $(gtest-config --libdir="/opt/lib64" ...) ... - - Help: - --usage brief usage information - --help display this help message - - Installation Overrides: - --prefix= overrides the installation prefix - --exec-prefix= overrides the executable installation prefix - --libdir= overrides the library installation prefix - --includedir= overrides the header file installation prefix - - Installation Queries: - --prefix installation prefix - --exec-prefix executable installation prefix - --libdir library installation directory - --includedir header file installation directory - --version the version of the Google Test installation - - Version Queries: - --min-version=VERSION return 0 if the version is at least VERSION - --exact-version=VERSION return 0 if the version is exactly VERSION - --max-version=VERSION return 0 if the version is at most VERSION - - Compilation Flag Queries: - --cppflags compile flags specific to the C-like preprocessors - --cxxflags compile flags appropriate for C++ programs - --ldflags linker flags - --libs libraries for linking - -EOF -} - -# This function bounds our version with a min and a max. It uses some clever -# POSIX-compliant variable expansion to portably do all the work in the shell -# and avoid any dependency on a particular "sed" or "awk" implementation. -# Notable is that it will only ever compare the first 3 components of versions. -# Further components will be cleanly stripped off. All versions must be -# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and -# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should -# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than -# continuing to maintain our own shell version. -check_versions() -{ - major_version=${version%%.*} - minor_version="0" - point_version="0" - if test "${version#*.}" != "${version}"; then - minor_version=${version#*.} - minor_version=${minor_version%%.*} - fi - if test "${version#*.*.}" != "${version}"; then - point_version=${version#*.*.} - point_version=${point_version%%.*} - fi - - min_version="$1" - min_major_version=${min_version%%.*} - min_minor_version="0" - min_point_version="0" - if test "${min_version#*.}" != "${min_version}"; then - min_minor_version=${min_version#*.} - min_minor_version=${min_minor_version%%.*} - fi - if test "${min_version#*.*.}" != "${min_version}"; then - min_point_version=${min_version#*.*.} - min_point_version=${min_point_version%%.*} - fi - - max_version="$2" - max_major_version=${max_version%%.*} - max_minor_version="0" - max_point_version="0" - if test "${max_version#*.}" != "${max_version}"; then - max_minor_version=${max_version#*.} - max_minor_version=${max_minor_version%%.*} - fi - if test "${max_version#*.*.}" != "${max_version}"; then - max_point_version=${max_version#*.*.} - max_point_version=${max_point_version%%.*} - fi - - test $(($major_version)) -lt $(($min_major_version)) && exit 1 - if test $(($major_version)) -eq $(($min_major_version)); then - test $(($minor_version)) -lt $(($min_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($min_minor_version)); then - test $(($point_version)) -lt $(($min_point_version)) && exit 1 - fi - fi - - test $(($major_version)) -gt $(($max_major_version)) && exit 1 - if test $(($major_version)) -eq $(($max_major_version)); then - test $(($minor_version)) -gt $(($max_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($max_minor_version)); then - test $(($point_version)) -gt $(($max_point_version)) && exit 1 - fi - fi - - exit 0 -} - -# Show the usage line when no arguments are specified. -if test $# -eq 0; then - show_usage - exit 1 -fi - -while test $# -gt 0; do - case $1 in - --usage) show_usage; exit 0;; - --help) show_help; exit 0;; - - # Installation overrides - --prefix=*) GTEST_PREFIX=${1#--prefix=};; - --exec-prefix=*) GTEST_EXEC_PREFIX=${1#--exec-prefix=};; - --libdir=*) GTEST_LIBDIR=${1#--libdir=};; - --includedir=*) GTEST_INCLUDEDIR=${1#--includedir=};; - - # Installation queries - --prefix|--exec-prefix|--libdir|--includedir|--version) - if test -n "${do_query}"; then - show_usage - exit 1 - fi - do_query=${1#--} - ;; - - # Version checking - --min-version=*) - do_check_versions=yes - min_version=${1#--min-version=} - ;; - --max-version=*) - do_check_versions=yes - max_version=${1#--max-version=} - ;; - --exact-version=*) - do_check_versions=yes - exact_version=${1#--exact-version=} - ;; - - # Compiler flag output - --cppflags) echo_cppflags=yes;; - --cxxflags) echo_cxxflags=yes;; - --ldflags) echo_ldflags=yes;; - --libs) echo_libs=yes;; - - # Everything else is an error - *) show_usage; exit 1;; - esac - shift -done - -# These have defaults filled in by the configure script but can also be -# overridden by environment variables or command line parameters. -prefix="${GTEST_PREFIX:-@prefix@}" -exec_prefix="${GTEST_EXEC_PREFIX:-@exec_prefix@}" -libdir="${GTEST_LIBDIR:-@libdir@}" -includedir="${GTEST_INCLUDEDIR:-@includedir@}" - -# We try and detect if our binary is not located at its installed location. If -# it's not, we provide variables pointing to the source and build tree rather -# than to the install tree. This allows building against a just-built gtest -# rather than an installed gtest. -bindir="@bindir@" -this_relative_bindir=`dirname $0` -this_bindir=`cd ${this_relative_bindir}; pwd -P` -if test "${this_bindir}" = "${this_bindir%${bindir}}"; then - # The path to the script doesn't end in the bindir sequence from Autoconf, - # assume that we are in a build tree. - build_dir=`dirname ${this_bindir}` - src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P` - - # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we - # should work to remove it, and/or remove libtool altogether, replacing it - # with direct references to the library and a link path. - gtest_libs="${build_dir}/lib/libgtest.la" - gtest_ldflags="" - - # We provide hooks to include from either the source or build dir, where the - # build dir is always preferred. This will potentially allow us to write - # build rules for generated headers and have them automatically be preferred - # over provided versions. - gtest_cppflags="-I${build_dir}/include -I${src_dir}/include" - gtest_cxxflags="" -else - # We're using an installed gtest, although it may be staged under some - # prefix. Assume (as our own libraries do) that we can resolve the prefix, - # and are present in the dynamic link paths. - gtest_ldflags="-L${libdir}" - gtest_libs="-l${name}" - gtest_cppflags="-I${includedir}" - gtest_cxxflags="" -fi - -# Do an installation query if requested. -if test -n "$do_query"; then - case $do_query in - prefix) echo $prefix; exit 0;; - exec-prefix) echo $exec_prefix; exit 0;; - libdir) echo $libdir; exit 0;; - includedir) echo $includedir; exit 0;; - version) echo $version; exit 0;; - *) show_usage; exit 1;; - esac -fi - -# Do a version check if requested. -if test "$do_check_versions" = "yes"; then - # Make sure we didn't receive a bad combination of parameters. - test "$echo_cppflags" = "yes" && show_usage && exit 1 - test "$echo_cxxflags" = "yes" && show_usage && exit 1 - test "$echo_ldflags" = "yes" && show_usage && exit 1 - test "$echo_libs" = "yes" && show_usage && exit 1 - - if test "$exact_version" != ""; then - check_versions $exact_version $exact_version - # unreachable - else - check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999} - # unreachable - fi -fi - -# Do the output in the correct order so that these can be used in-line of -# a compiler invocation. -output="" -test "$echo_cppflags" = "yes" && output="$output $gtest_cppflags" -test "$echo_cxxflags" = "yes" && output="$output $gtest_cxxflags" -test "$echo_ldflags" = "yes" && output="$output $gtest_ldflags" -test "$echo_libs" = "yes" && output="$output $gtest_libs" -echo $output - -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/test/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/test/Makefile deleted file mode 100644 index ffc0c90a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/test/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# A Makefile for fusing Google Test and building a sample test against it. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make check - makes everything and runs the built sample test. -# make clean - removes all files generated by make. - -# Points to the root of fused Google Test, relative to where this file is. -FUSED_GTEST_DIR = output - -# Paths to the fused gtest files. -FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h -FUSED_GTEST_ALL_CC = $(FUSED_GTEST_DIR)/gtest/gtest-all.cc - -# Where to find the sample test. -SAMPLE_DIR = ../../samples - -# Where to find gtest_main.cc. -GTEST_MAIN_CC = ../../src/gtest_main.cc - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(FUSED_GTEST_DIR) - -# Flags passed to the C++ compiler. -CXXFLAGS += -g - -all : sample1_unittest - -check : all - ./sample1_unittest - -clean : - rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o - -$(FUSED_GTEST_H) : - ../fuse_gtest_files.py $(FUSED_GTEST_DIR) - -$(FUSED_GTEST_ALL_CC) : - ../fuse_gtest_files.py $(FUSED_GTEST_DIR) - -gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GTEST_DIR)/gtest/gtest-all.cc - -gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_MAIN_CC) - -sample1.o : $(SAMPLE_DIR)/sample1.cc $(SAMPLE_DIR)/sample1.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1.cc - -sample1_unittest.o : $(SAMPLE_DIR)/sample1_unittest.cc \ - $(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1_unittest.cc - -sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload.py deleted file mode 100755 index 6e6f9a14..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload.py +++ /dev/null @@ -1,1387 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tool for uploading diffs from a version control system to the codereview app. - -Usage summary: upload.py [options] [-- diff_options] - -Diff options are passed to the diff command of the underlying system. - -Supported version control systems: - Git - Mercurial - Subversion - -It is important for Git/Mercurial users to specify a tree/node/branch to diff -against by using the '--rev' option. -""" -# This code is derived from appcfg.py in the App Engine SDK (open source), -# and from ASPN recipe #146306. - -import cookielib -import getpass -import logging -import md5 -import mimetypes -import optparse -import os -import re -import socket -import subprocess -import sys -import urllib -import urllib2 -import urlparse - -try: - import readline -except ImportError: - pass - -# The logging verbosity: -# 0: Errors only. -# 1: Status messages. -# 2: Info logs. -# 3: Debug logs. -verbosity = 1 - -# Max size of patch or base file. -MAX_UPLOAD_SIZE = 900 * 1024 - - -def GetEmail(prompt): - """Prompts the user for their email address and returns it. - - The last used email address is saved to a file and offered up as a suggestion - to the user. If the user presses enter without typing in anything the last - used email address is used. If the user enters a new address, it is saved - for next time we prompt. - - """ - last_email_file_name = os.path.expanduser("~/.last_codereview_email_address") - last_email = "" - if os.path.exists(last_email_file_name): - try: - last_email_file = open(last_email_file_name, "r") - last_email = last_email_file.readline().strip("\n") - last_email_file.close() - prompt += " [%s]" % last_email - except IOError, e: - pass - email = raw_input(prompt + ": ").strip() - if email: - try: - last_email_file = open(last_email_file_name, "w") - last_email_file.write(email) - last_email_file.close() - except IOError, e: - pass - else: - email = last_email - return email - - -def StatusUpdate(msg): - """Print a status message to stdout. - - If 'verbosity' is greater than 0, print the message. - - Args: - msg: The string to print. - """ - if verbosity > 0: - print msg - - -def ErrorExit(msg): - """Print an error message to stderr and exit.""" - print >>sys.stderr, msg - sys.exit(1) - - -class ClientLoginError(urllib2.HTTPError): - """Raised to indicate there was an error authenticating with ClientLogin.""" - - def __init__(self, url, code, msg, headers, args): - urllib2.HTTPError.__init__(self, url, code, msg, headers, None) - self.args = args - self.reason = args["Error"] - - -class AbstractRpcServer(object): - """Provides a common interface for a simple RPC server.""" - - def __init__(self, host, auth_function, host_override=None, extra_headers={}, - save_cookies=False): - """Creates a new HttpRpcServer. - - Args: - host: The host to send requests to. - auth_function: A function that takes no arguments and returns an - (email, password) tuple when called. Will be called if authentication - is required. - host_override: The host header to send to the server (defaults to host). - extra_headers: A dict of extra headers to append to every request. - save_cookies: If True, save the authentication cookies to local disk. - If False, use an in-memory cookiejar instead. Subclasses must - implement this functionality. Defaults to False. - """ - self.host = host - self.host_override = host_override - self.auth_function = auth_function - self.authenticated = False - self.extra_headers = extra_headers - self.save_cookies = save_cookies - self.opener = self._GetOpener() - if self.host_override: - logging.info("Server: %s; Host: %s", self.host, self.host_override) - else: - logging.info("Server: %s", self.host) - - def _GetOpener(self): - """Returns an OpenerDirector for making HTTP requests. - - Returns: - A urllib2.OpenerDirector object. - """ - raise NotImplementedError() - - def _CreateRequest(self, url, data=None): - """Creates a new urllib request.""" - logging.debug("Creating request for: '%s' with payload:\n%s", url, data) - req = urllib2.Request(url, data=data) - if self.host_override: - req.add_header("Host", self.host_override) - for key, value in self.extra_headers.iteritems(): - req.add_header(key, value) - return req - - def _GetAuthToken(self, email, password): - """Uses ClientLogin to authenticate the user, returning an auth token. - - Args: - email: The user's email address - password: The user's password - - Raises: - ClientLoginError: If there was an error authenticating with ClientLogin. - HTTPError: If there was some other form of HTTP error. - - Returns: - The authentication token returned by ClientLogin. - """ - account_type = "GOOGLE" - if self.host.endswith(".google.com"): - # Needed for use inside Google. - account_type = "HOSTED" - req = self._CreateRequest( - url="https://www.google.com/accounts/ClientLogin", - data=urllib.urlencode({ - "Email": email, - "Passwd": password, - "service": "ah", - "source": "rietveld-codereview-upload", - "accountType": account_type, - }), - ) - try: - response = self.opener.open(req) - response_body = response.read() - response_dict = dict(x.split("=") - for x in response_body.split("\n") if x) - return response_dict["Auth"] - except urllib2.HTTPError, e: - if e.code == 403: - body = e.read() - response_dict = dict(x.split("=", 1) for x in body.split("\n") if x) - raise ClientLoginError(req.get_full_url(), e.code, e.msg, - e.headers, response_dict) - else: - raise - - def _GetAuthCookie(self, auth_token): - """Fetches authentication cookies for an authentication token. - - Args: - auth_token: The authentication token returned by ClientLogin. - - Raises: - HTTPError: If there was an error fetching the authentication cookies. - """ - # This is a dummy value to allow us to identify when we're successful. - continue_location = "http://localhost/" - args = {"continue": continue_location, "auth": auth_token} - req = self._CreateRequest("http://%s/_ah/login?%s" % - (self.host, urllib.urlencode(args))) - try: - response = self.opener.open(req) - except urllib2.HTTPError, e: - response = e - if (response.code != 302 or - response.info()["location"] != continue_location): - raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg, - response.headers, response.fp) - self.authenticated = True - - def _Authenticate(self): - """Authenticates the user. - - The authentication process works as follows: - 1) We get a username and password from the user - 2) We use ClientLogin to obtain an AUTH token for the user - (see http://code.google.com/apis/accounts/AuthForInstalledApps.html). - 3) We pass the auth token to /_ah/login on the server to obtain an - authentication cookie. If login was successful, it tries to redirect - us to the URL we provided. - - If we attempt to access the upload API without first obtaining an - authentication cookie, it returns a 401 response and directs us to - authenticate ourselves with ClientLogin. - """ - for i in range(3): - credentials = self.auth_function() - try: - auth_token = self._GetAuthToken(credentials[0], credentials[1]) - except ClientLoginError, e: - if e.reason == "BadAuthentication": - print >>sys.stderr, "Invalid username or password." - continue - if e.reason == "CaptchaRequired": - print >>sys.stderr, ( - "Please go to\n" - "https://www.google.com/accounts/DisplayUnlockCaptcha\n" - "and verify you are a human. Then try again.") - break - if e.reason == "NotVerified": - print >>sys.stderr, "Account not verified." - break - if e.reason == "TermsNotAgreed": - print >>sys.stderr, "User has not agreed to TOS." - break - if e.reason == "AccountDeleted": - print >>sys.stderr, "The user account has been deleted." - break - if e.reason == "AccountDisabled": - print >>sys.stderr, "The user account has been disabled." - break - if e.reason == "ServiceDisabled": - print >>sys.stderr, ("The user's access to the service has been " - "disabled.") - break - if e.reason == "ServiceUnavailable": - print >>sys.stderr, "The service is not available; try again later." - break - raise - self._GetAuthCookie(auth_token) - return - - def Send(self, request_path, payload=None, - content_type="application/octet-stream", - timeout=None, - **kwargs): - """Sends an RPC and returns the response. - - Args: - request_path: The path to send the request to, eg /api/appversion/create. - payload: The body of the request, or None to send an empty request. - content_type: The Content-Type header to use. - timeout: timeout in seconds; default None i.e. no timeout. - (Note: for large requests on OS X, the timeout doesn't work right.) - kwargs: Any keyword arguments are converted into query string parameters. - - Returns: - The response body, as a string. - """ - # TODO: Don't require authentication. Let the server say - # whether it is necessary. - if not self.authenticated: - self._Authenticate() - - old_timeout = socket.getdefaulttimeout() - socket.setdefaulttimeout(timeout) - try: - tries = 0 - while True: - tries += 1 - args = dict(kwargs) - url = "http://%s%s" % (self.host, request_path) - if args: - url += "?" + urllib.urlencode(args) - req = self._CreateRequest(url=url, data=payload) - req.add_header("Content-Type", content_type) - try: - f = self.opener.open(req) - response = f.read() - f.close() - return response - except urllib2.HTTPError, e: - if tries > 3: - raise - elif e.code == 401: - self._Authenticate() -## elif e.code >= 500 and e.code < 600: -## # Server Error - try again. -## continue - else: - raise - finally: - socket.setdefaulttimeout(old_timeout) - - -class HttpRpcServer(AbstractRpcServer): - """Provides a simplified RPC-style interface for HTTP requests.""" - - def _Authenticate(self): - """Save the cookie jar after authentication.""" - super(HttpRpcServer, self)._Authenticate() - if self.save_cookies: - StatusUpdate("Saving authentication cookies to %s" % self.cookie_file) - self.cookie_jar.save() - - def _GetOpener(self): - """Returns an OpenerDirector that supports cookies and ignores redirects. - - Returns: - A urllib2.OpenerDirector object. - """ - opener = urllib2.OpenerDirector() - opener.add_handler(urllib2.ProxyHandler()) - opener.add_handler(urllib2.UnknownHandler()) - opener.add_handler(urllib2.HTTPHandler()) - opener.add_handler(urllib2.HTTPDefaultErrorHandler()) - opener.add_handler(urllib2.HTTPSHandler()) - opener.add_handler(urllib2.HTTPErrorProcessor()) - if self.save_cookies: - self.cookie_file = os.path.expanduser("~/.codereview_upload_cookies") - self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file) - if os.path.exists(self.cookie_file): - try: - self.cookie_jar.load() - self.authenticated = True - StatusUpdate("Loaded authentication cookies from %s" % - self.cookie_file) - except (cookielib.LoadError, IOError): - # Failed to load cookies - just ignore them. - pass - else: - # Create an empty cookie file with mode 600 - fd = os.open(self.cookie_file, os.O_CREAT, 0600) - os.close(fd) - # Always chmod the cookie file - os.chmod(self.cookie_file, 0600) - else: - # Don't save cookies across runs of update.py. - self.cookie_jar = cookielib.CookieJar() - opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar)) - return opener - - -parser = optparse.OptionParser(usage="%prog [options] [-- diff_options]") -parser.add_option("-y", "--assume_yes", action="store_true", - dest="assume_yes", default=False, - help="Assume that the answer to yes/no questions is 'yes'.") -# Logging -group = parser.add_option_group("Logging options") -group.add_option("-q", "--quiet", action="store_const", const=0, - dest="verbose", help="Print errors only.") -group.add_option("-v", "--verbose", action="store_const", const=2, - dest="verbose", default=1, - help="Print info level logs (default).") -group.add_option("--noisy", action="store_const", const=3, - dest="verbose", help="Print all logs.") -# Review server -group = parser.add_option_group("Review server options") -group.add_option("-s", "--server", action="store", dest="server", - default="codereview.appspot.com", - metavar="SERVER", - help=("The server to upload to. The format is host[:port]. " - "Defaults to 'codereview.appspot.com'.")) -group.add_option("-e", "--email", action="store", dest="email", - metavar="EMAIL", default=None, - help="The username to use. Will prompt if omitted.") -group.add_option("-H", "--host", action="store", dest="host", - metavar="HOST", default=None, - help="Overrides the Host header sent with all RPCs.") -group.add_option("--no_cookies", action="store_false", - dest="save_cookies", default=True, - help="Do not save authentication cookies to local disk.") -# Issue -group = parser.add_option_group("Issue options") -group.add_option("-d", "--description", action="store", dest="description", - metavar="DESCRIPTION", default=None, - help="Optional description when creating an issue.") -group.add_option("-f", "--description_file", action="store", - dest="description_file", metavar="DESCRIPTION_FILE", - default=None, - help="Optional path of a file that contains " - "the description when creating an issue.") -group.add_option("-r", "--reviewers", action="store", dest="reviewers", - metavar="REVIEWERS", default=None, - help="Add reviewers (comma separated email addresses).") -group.add_option("--cc", action="store", dest="cc", - metavar="CC", default=None, - help="Add CC (comma separated email addresses).") -# Upload options -group = parser.add_option_group("Patch options") -group.add_option("-m", "--message", action="store", dest="message", - metavar="MESSAGE", default=None, - help="A message to identify the patch. " - "Will prompt if omitted.") -group.add_option("-i", "--issue", type="int", action="store", - metavar="ISSUE", default=None, - help="Issue number to which to add. Defaults to new issue.") -group.add_option("--download_base", action="store_true", - dest="download_base", default=False, - help="Base files will be downloaded by the server " - "(side-by-side diffs may not work on files with CRs).") -group.add_option("--rev", action="store", dest="revision", - metavar="REV", default=None, - help="Branch/tree/revision to diff against (used by DVCS).") -group.add_option("--send_mail", action="store_true", - dest="send_mail", default=False, - help="Send notification email to reviewers.") - - -def GetRpcServer(options): - """Returns an instance of an AbstractRpcServer. - - Returns: - A new AbstractRpcServer, on which RPC calls can be made. - """ - - rpc_server_class = HttpRpcServer - - def GetUserCredentials(): - """Prompts the user for a username and password.""" - email = options.email - if email is None: - email = GetEmail("Email (login for uploading to %s)" % options.server) - password = getpass.getpass("Password for %s: " % email) - return (email, password) - - # If this is the dev_appserver, use fake authentication. - host = (options.host or options.server).lower() - if host == "localhost" or host.startswith("localhost:"): - email = options.email - if email is None: - email = "test@example.com" - logging.info("Using debug user %s. Override with --email" % email) - server = rpc_server_class( - options.server, - lambda: (email, "password"), - host_override=options.host, - extra_headers={"Cookie": - 'dev_appserver_login="%s:False"' % email}, - save_cookies=options.save_cookies) - # Don't try to talk to ClientLogin. - server.authenticated = True - return server - - return rpc_server_class(options.server, GetUserCredentials, - host_override=options.host, - save_cookies=options.save_cookies) - - -def EncodeMultipartFormData(fields, files): - """Encode form fields for multipart/form-data. - - Args: - fields: A sequence of (name, value) elements for regular form fields. - files: A sequence of (name, filename, value) elements for data to be - uploaded as files. - Returns: - (content_type, body) ready for httplib.HTTP instance. - - Source: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 - """ - BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-' - CRLF = '\r\n' - lines = [] - for (key, value) in fields: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"' % key) - lines.append('') - lines.append(value) - for (key, filename, value) in files: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % - (key, filename)) - lines.append('Content-Type: %s' % GetContentType(filename)) - lines.append('') - lines.append(value) - lines.append('--' + BOUNDARY + '--') - lines.append('') - body = CRLF.join(lines) - content_type = 'multipart/form-data; boundary=%s' % BOUNDARY - return content_type, body - - -def GetContentType(filename): - """Helper to guess the content-type from the filename.""" - return mimetypes.guess_type(filename)[0] or 'application/octet-stream' - - -# Use a shell for subcommands on Windows to get a PATH search. -use_shell = sys.platform.startswith("win") - -def RunShellWithReturnCode(command, print_output=False, - universal_newlines=True): - """Executes a command and returns the output from stdout and the return code. - - Args: - command: Command to execute. - print_output: If True, the output is printed to stdout. - If False, both stdout and stderr are ignored. - universal_newlines: Use universal_newlines flag (default: True). - - Returns: - Tuple (output, return code) - """ - logging.info("Running %s", command) - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - shell=use_shell, universal_newlines=universal_newlines) - if print_output: - output_array = [] - while True: - line = p.stdout.readline() - if not line: - break - print line.strip("\n") - output_array.append(line) - output = "".join(output_array) - else: - output = p.stdout.read() - p.wait() - errout = p.stderr.read() - if print_output and errout: - print >>sys.stderr, errout - p.stdout.close() - p.stderr.close() - return output, p.returncode - - -def RunShell(command, silent_ok=False, universal_newlines=True, - print_output=False): - data, retcode = RunShellWithReturnCode(command, print_output, - universal_newlines) - if retcode: - ErrorExit("Got error status from %s:\n%s" % (command, data)) - if not silent_ok and not data: - ErrorExit("No output from %s" % command) - return data - - -class VersionControlSystem(object): - """Abstract base class providing an interface to the VCS.""" - - def __init__(self, options): - """Constructor. - - Args: - options: Command line options. - """ - self.options = options - - def GenerateDiff(self, args): - """Return the current diff as a string. - - Args: - args: Extra arguments to pass to the diff command. - """ - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def CheckForUnknownFiles(self): - """Show an "are you sure?" prompt if there are unknown files.""" - unknown_files = self.GetUnknownFiles() - if unknown_files: - print "The following files are not added to version control:" - for line in unknown_files: - print line - prompt = "Are you sure to continue?(y/N) " - answer = raw_input(prompt).strip() - if answer != "y": - ErrorExit("User aborted") - - def GetBaseFile(self, filename): - """Get the content of the upstream version of a file. - - Returns: - A tuple (base_content, new_content, is_binary, status) - base_content: The contents of the base file. - new_content: For text files, this is empty. For binary files, this is - the contents of the new file, since the diff output won't contain - information to reconstruct the current file. - is_binary: True iff the file is binary. - status: The status of the file. - """ - - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - - def GetBaseFiles(self, diff): - """Helper that calls GetBase file for each file in the patch. - - Returns: - A dictionary that maps from filename to GetBaseFile's tuple. Filenames - are retrieved based on lines that start with "Index:" or - "Property changes on:". - """ - files = {} - for line in diff.splitlines(True): - if line.startswith('Index:') or line.startswith('Property changes on:'): - unused, filename = line.split(':', 1) - # On Windows if a file has property changes its filename uses '\' - # instead of '/'. - filename = filename.strip().replace('\\', '/') - files[filename] = self.GetBaseFile(filename) - return files - - - def UploadBaseFiles(self, issue, rpc_server, patch_list, patchset, options, - files): - """Uploads the base files (and if necessary, the current ones as well).""" - - def UploadFile(filename, file_id, content, is_binary, status, is_base): - """Uploads a file to the server.""" - file_too_large = False - if is_base: - type = "base" - else: - type = "current" - if len(content) > MAX_UPLOAD_SIZE: - print ("Not uploading the %s file for %s because it's too large." % - (type, filename)) - file_too_large = True - content = "" - checksum = md5.new(content).hexdigest() - if options.verbose > 0 and not file_too_large: - print "Uploading %s file for %s" % (type, filename) - url = "/%d/upload_content/%d/%d" % (int(issue), int(patchset), file_id) - form_fields = [("filename", filename), - ("status", status), - ("checksum", checksum), - ("is_binary", str(is_binary)), - ("is_current", str(not is_base)), - ] - if file_too_large: - form_fields.append(("file_too_large", "1")) - if options.email: - form_fields.append(("user", options.email)) - ctype, body = EncodeMultipartFormData(form_fields, - [("data", filename, content)]) - response_body = rpc_server.Send(url, body, - content_type=ctype) - if not response_body.startswith("OK"): - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - - patches = dict() - [patches.setdefault(v, k) for k, v in patch_list] - for filename in patches.keys(): - base_content, new_content, is_binary, status = files[filename] - file_id_str = patches.get(filename) - if file_id_str.find("nobase") != -1: - base_content = None - file_id_str = file_id_str[file_id_str.rfind("_") + 1:] - file_id = int(file_id_str) - if base_content != None: - UploadFile(filename, file_id, base_content, is_binary, status, True) - if new_content != None: - UploadFile(filename, file_id, new_content, is_binary, status, False) - - def IsImage(self, filename): - """Returns true if the filename has an image extension.""" - mimetype = mimetypes.guess_type(filename)[0] - if not mimetype: - return False - return mimetype.startswith("image/") - - -class SubversionVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Subversion.""" - - def __init__(self, options): - super(SubversionVCS, self).__init__(options) - if self.options.revision: - match = re.match(r"(\d+)(:(\d+))?", self.options.revision) - if not match: - ErrorExit("Invalid Subversion revision %s." % self.options.revision) - self.rev_start = match.group(1) - self.rev_end = match.group(3) - else: - self.rev_start = self.rev_end = None - # Cache output from "svn list -r REVNO dirname". - # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev). - self.svnls_cache = {} - # SVN base URL is required to fetch files deleted in an older revision. - # Result is cached to not guess it over and over again in GetBaseFile(). - required = self.options.download_base or self.options.revision is not None - self.svn_base = self._GuessBase(required) - - def GuessBase(self, required): - """Wrapper for _GuessBase.""" - return self.svn_base - - def _GuessBase(self, required): - """Returns the SVN base URL. - - Args: - required: If true, exits if the url can't be guessed, otherwise None is - returned. - """ - info = RunShell(["svn", "info"]) - for line in info.splitlines(): - words = line.split() - if len(words) == 2 and words[0] == "URL:": - url = words[1] - scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) - username, netloc = urllib.splituser(netloc) - if username: - logging.info("Removed username from base URL") - if netloc.endswith("svn.python.org"): - if netloc == "svn.python.org": - if path.startswith("/projects/"): - path = path[9:] - elif netloc != "pythondev@svn.python.org": - ErrorExit("Unrecognized Python URL: %s" % url) - base = "http://svn.python.org/view/*checkout*%s/" % path - logging.info("Guessed Python base = %s", base) - elif netloc.endswith("svn.collab.net"): - if path.startswith("/repos/"): - path = path[6:] - base = "http://svn.collab.net/viewvc/*checkout*%s/" % path - logging.info("Guessed CollabNet base = %s", base) - elif netloc.endswith(".googlecode.com"): - path = path + "/" - base = urlparse.urlunparse(("http", netloc, path, params, - query, fragment)) - logging.info("Guessed Google Code base = %s", base) - else: - path = path + "/" - base = urlparse.urlunparse((scheme, netloc, path, params, - query, fragment)) - logging.info("Guessed base = %s", base) - return base - if required: - ErrorExit("Can't find URL in output from svn info") - return None - - def GenerateDiff(self, args): - cmd = ["svn", "diff"] - if self.options.revision: - cmd += ["-r", self.options.revision] - cmd.extend(args) - data = RunShell(cmd) - count = 0 - for line in data.splitlines(): - if line.startswith("Index:") or line.startswith("Property changes on:"): - count += 1 - logging.info(line) - if not count: - ErrorExit("No valid patches found in output from svn diff") - return data - - def _CollapseKeywords(self, content, keyword_str): - """Collapses SVN keywords.""" - # svn cat translates keywords but svn diff doesn't. As a result of this - # behavior patching.PatchChunks() fails with a chunk mismatch error. - # This part was originally written by the Review Board development team - # who had the same problem (http://reviews.review-board.org/r/276/). - # Mapping of keywords to known aliases - svn_keywords = { - # Standard keywords - 'Date': ['Date', 'LastChangedDate'], - 'Revision': ['Revision', 'LastChangedRevision', 'Rev'], - 'Author': ['Author', 'LastChangedBy'], - 'HeadURL': ['HeadURL', 'URL'], - 'Id': ['Id'], - - # Aliases - 'LastChangedDate': ['LastChangedDate', 'Date'], - 'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'], - 'LastChangedBy': ['LastChangedBy', 'Author'], - 'URL': ['URL', 'HeadURL'], - } - - def repl(m): - if m.group(2): - return "$%s::%s$" % (m.group(1), " " * len(m.group(3))) - return "$%s$" % m.group(1) - keywords = [keyword - for name in keyword_str.split(" ") - for keyword in svn_keywords.get(name, [])] - return re.sub(r"\$(%s):(:?)([^\$]+)\$" % '|'.join(keywords), repl, content) - - def GetUnknownFiles(self): - status = RunShell(["svn", "status", "--ignore-externals"], silent_ok=True) - unknown_files = [] - for line in status.split("\n"): - if line and line[0] == "?": - unknown_files.append(line) - return unknown_files - - def ReadFile(self, filename): - """Returns the contents of a file.""" - file = open(filename, 'rb') - result = "" - try: - result = file.read() - finally: - file.close() - return result - - def GetStatus(self, filename): - """Returns the status of a file.""" - if not self.options.revision: - status = RunShell(["svn", "status", "--ignore-externals", filename]) - if not status: - ErrorExit("svn status returned no output for %s" % filename) - status_lines = status.splitlines() - # If file is in a cl, the output will begin with - # "\n--- Changelist 'cl_name':\n". See - # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt - if (len(status_lines) == 3 and - not status_lines[0] and - status_lines[1].startswith("--- Changelist")): - status = status_lines[2] - else: - status = status_lines[0] - # If we have a revision to diff against we need to run "svn list" - # for the old and the new revision and compare the results to get - # the correct status for a file. - else: - dirname, relfilename = os.path.split(filename) - if dirname not in self.svnls_cache: - cmd = ["svn", "list", "-r", self.rev_start, dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to get status for %s." % filename) - old_files = out.splitlines() - args = ["svn", "list"] - if self.rev_end: - args += ["-r", self.rev_end] - cmd = args + [dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to run command %s" % cmd) - self.svnls_cache[dirname] = (old_files, out.splitlines()) - old_files, new_files = self.svnls_cache[dirname] - if relfilename in old_files and relfilename not in new_files: - status = "D " - elif relfilename in old_files and relfilename in new_files: - status = "M " - else: - status = "A " - return status - - def GetBaseFile(self, filename): - status = self.GetStatus(filename) - base_content = None - new_content = None - - # If a file is copied its status will be "A +", which signifies - # "addition-with-history". See "svn st" for more information. We need to - # upload the original file or else diff parsing will fail if the file was - # edited. - if status[0] == "A" and status[3] != "+": - # We'll need to upload the new content if we're adding a binary file - # since diff's output won't contain it. - mimetype = RunShell(["svn", "propget", "svn:mime-type", filename], - silent_ok=True) - base_content = "" - is_binary = mimetype and not mimetype.startswith("text/") - if is_binary and self.IsImage(filename): - new_content = self.ReadFile(filename) - elif (status[0] in ("M", "D", "R") or - (status[0] == "A" and status[3] == "+") or # Copied file. - (status[0] == " " and status[1] == "M")): # Property change. - args = [] - if self.options.revision: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - # Don't change filename, it's needed later. - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:mime-type", url] - mimetype, returncode = RunShellWithReturnCode(cmd) - if returncode: - # File does not exist in the requested revision. - # Reset mimetype, it contains an error message. - mimetype = "" - get_base = False - is_binary = mimetype and not mimetype.startswith("text/") - if status[0] == " ": - # Empty base content just to force an upload. - base_content = "" - elif is_binary: - if self.IsImage(filename): - get_base = True - if status[0] == "M": - if not self.rev_end: - new_content = self.ReadFile(filename) - else: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_end) - new_content = RunShell(["svn", "cat", url], - universal_newlines=True, silent_ok=True) - else: - base_content = "" - else: - get_base = True - - if get_base: - if is_binary: - universal_newlines = False - else: - universal_newlines = True - if self.rev_start: - # "svn cat -r REV delete_file.txt" doesn't work. cat requires - # the full URL with "@REV" appended instead of using "-r" option. - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - base_content = RunShell(["svn", "cat", url], - universal_newlines=universal_newlines, - silent_ok=True) - else: - base_content = RunShell(["svn", "cat", filename], - universal_newlines=universal_newlines, - silent_ok=True) - if not is_binary: - args = [] - if self.rev_start: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:keywords", url] - keywords, returncode = RunShellWithReturnCode(cmd) - if keywords and not returncode: - base_content = self._CollapseKeywords(base_content, keywords) - else: - StatusUpdate("svn status returned unexpected output: %s" % status) - sys.exit(1) - return base_content, new_content, is_binary, status[0:5] - - -class GitVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Git.""" - - def __init__(self, options): - super(GitVCS, self).__init__(options) - # Map of filename -> hash of base file. - self.base_hashes = {} - - def GenerateDiff(self, extra_args): - # This is more complicated than svn's GenerateDiff because we must convert - # the diff output to include an svn-style "Index:" line as well as record - # the hashes of the base files, so we can upload them along with our diff. - if self.options.revision: - extra_args = [self.options.revision] + extra_args - gitdiff = RunShell(["git", "diff", "--full-index"] + extra_args) - svndiff = [] - filecount = 0 - filename = None - for line in gitdiff.splitlines(): - match = re.match(r"diff --git a/(.*) b/.*$", line) - if match: - filecount += 1 - filename = match.group(1) - svndiff.append("Index: %s\n" % filename) - else: - # The "index" line in a git diff looks like this (long hashes elided): - # index 82c0d44..b2cee3f 100755 - # We want to save the left hash, as that identifies the base file. - match = re.match(r"index (\w+)\.\.", line) - if match: - self.base_hashes[filename] = match.group(1) - svndiff.append(line + "\n") - if not filecount: - ErrorExit("No valid patches found in output from git diff") - return "".join(svndiff) - - def GetUnknownFiles(self): - status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], - silent_ok=True) - return status.splitlines() - - def GetBaseFile(self, filename): - hash = self.base_hashes[filename] - base_content = None - new_content = None - is_binary = False - if hash == "0" * 40: # All-zero hash indicates no base file. - status = "A" - base_content = "" - else: - status = "M" - base_content, returncode = RunShellWithReturnCode(["git", "show", hash]) - if returncode: - ErrorExit("Got error status from 'git show %s'" % hash) - return (base_content, new_content, is_binary, status) - - -class MercurialVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Mercurial.""" - - def __init__(self, options, repo_dir): - super(MercurialVCS, self).__init__(options) - # Absolute path to repository (we can be in a subdir) - self.repo_dir = os.path.normpath(repo_dir) - # Compute the subdir - cwd = os.path.normpath(os.getcwd()) - assert cwd.startswith(self.repo_dir) - self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/") - if self.options.revision: - self.base_rev = self.options.revision - else: - self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip() - - def _GetRelPath(self, filename): - """Get relative path of a file according to the current directory, - given its logical path in the repo.""" - assert filename.startswith(self.subdir), filename - return filename[len(self.subdir):].lstrip(r"\/") - - def GenerateDiff(self, extra_args): - # If no file specified, restrict to the current subdir - extra_args = extra_args or ["."] - cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args - data = RunShell(cmd, silent_ok=True) - svndiff = [] - filecount = 0 - for line in data.splitlines(): - m = re.match("diff --git a/(\S+) b/(\S+)", line) - if m: - # Modify line to make it look like as it comes from svn diff. - # With this modification no changes on the server side are required - # to make upload.py work with Mercurial repos. - # NOTE: for proper handling of moved/copied files, we have to use - # the second filename. - filename = m.group(2) - svndiff.append("Index: %s" % filename) - svndiff.append("=" * 67) - filecount += 1 - logging.info(line) - else: - svndiff.append(line) - if not filecount: - ErrorExit("No valid patches found in output from hg diff") - return "\n".join(svndiff) + "\n" - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - args = [] - status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."], - silent_ok=True) - unknown_files = [] - for line in status.splitlines(): - st, fn = line.split(" ", 1) - if st == "?": - unknown_files.append(fn) - return unknown_files - - def GetBaseFile(self, filename): - # "hg status" and "hg cat" both take a path relative to the current subdir - # rather than to the repo root, but "hg diff" has given us the full path - # to the repo root. - base_content = "" - new_content = None - is_binary = False - oldrelpath = relpath = self._GetRelPath(filename) - # "hg status -C" returns two lines for moved/copied files, one otherwise - out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath]) - out = out.splitlines() - # HACK: strip error message about missing file/directory if it isn't in - # the working copy - if out[0].startswith('%s: ' % relpath): - out = out[1:] - if len(out) > 1: - # Moved/copied => considered as modified, use old filename to - # retrieve base contents - oldrelpath = out[1].strip() - status = "M" - else: - status, _ = out[0].split(' ', 1) - if status != "A": - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True) - is_binary = "\0" in base_content # Mercurial's heuristic - if status != "R": - new_content = open(relpath, "rb").read() - is_binary = is_binary or "\0" in new_content - if is_binary and base_content: - # Fetch again without converting newlines - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True, universal_newlines=False) - if not is_binary or not self.IsImage(relpath): - new_content = None - return base_content, new_content, is_binary, status - - -# NOTE: The SplitPatch function is duplicated in engine.py, keep them in sync. -def SplitPatch(data): - """Splits a patch into separate pieces for each file. - - Args: - data: A string containing the output of svn diff. - - Returns: - A list of 2-tuple (filename, text) where text is the svn diff output - pertaining to filename. - """ - patches = [] - filename = None - diff = [] - for line in data.splitlines(True): - new_filename = None - if line.startswith('Index:'): - unused, new_filename = line.split(':', 1) - new_filename = new_filename.strip() - elif line.startswith('Property changes on:'): - unused, temp_filename = line.split(':', 1) - # When a file is modified, paths use '/' between directories, however - # when a property is modified '\' is used on Windows. Make them the same - # otherwise the file shows up twice. - temp_filename = temp_filename.strip().replace('\\', '/') - if temp_filename != filename: - # File has property changes but no modifications, create a new diff. - new_filename = temp_filename - if new_filename: - if filename and diff: - patches.append((filename, ''.join(diff))) - filename = new_filename - diff = [line] - continue - if diff is not None: - diff.append(line) - if filename and diff: - patches.append((filename, ''.join(diff))) - return patches - - -def UploadSeparatePatches(issue, rpc_server, patchset, data, options): - """Uploads a separate patch for each file in the diff output. - - Returns a list of [patch_key, filename] for each file. - """ - patches = SplitPatch(data) - rv = [] - for patch in patches: - if len(patch[1]) > MAX_UPLOAD_SIZE: - print ("Not uploading the patch for " + patch[0] + - " because the file is too large.") - continue - form_fields = [("filename", patch[0])] - if not options.download_base: - form_fields.append(("content_upload", "1")) - files = [("data", "data.diff", patch[1])] - ctype, body = EncodeMultipartFormData(form_fields, files) - url = "/%d/upload_patch/%d" % (int(issue), int(patchset)) - print "Uploading patch for " + patch[0] - response_body = rpc_server.Send(url, body, content_type=ctype) - lines = response_body.splitlines() - if not lines or lines[0] != "OK": - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - rv.append([lines[1], patch[0]]) - return rv - - -def GuessVCS(options): - """Helper to guess the version control system. - - This examines the current directory, guesses which VersionControlSystem - we're using, and returns an instance of the appropriate class. Exit with an - error if we can't figure it out. - - Returns: - A VersionControlSystem instance. Exits if the VCS can't be guessed. - """ - # Mercurial has a command to get the base directory of a repository - # Try running it, but don't die if we don't have hg installed. - # NOTE: we try Mercurial first as it can sit on top of an SVN working copy. - try: - out, returncode = RunShellWithReturnCode(["hg", "root"]) - if returncode == 0: - return MercurialVCS(options, out.strip()) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have hg installed. - raise - - # Subversion has a .svn in all working directories. - if os.path.isdir('.svn'): - logging.info("Guessed VCS = Subversion") - return SubversionVCS(options) - - # Git has a command to test if you're in a git tree. - # Try running it, but don't die if we don't have git installed. - try: - out, returncode = RunShellWithReturnCode(["git", "rev-parse", - "--is-inside-work-tree"]) - if returncode == 0: - return GitVCS(options) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have git installed. - raise - - ErrorExit(("Could not guess version control system. " - "Are you in a working copy directory?")) - - -def RealMain(argv, data=None): - """The real main function. - - Args: - argv: Command line arguments. - data: Diff contents. If None (default) the diff is generated by - the VersionControlSystem implementation returned by GuessVCS(). - - Returns: - A 2-tuple (issue id, patchset id). - The patchset id is None if the base files are not uploaded by this - script (applies only to SVN checkouts). - """ - logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" - "%(lineno)s %(message)s ")) - os.environ['LC_ALL'] = 'C' - options, args = parser.parse_args(argv[1:]) - global verbosity - verbosity = options.verbose - if verbosity >= 3: - logging.getLogger().setLevel(logging.DEBUG) - elif verbosity >= 2: - logging.getLogger().setLevel(logging.INFO) - vcs = GuessVCS(options) - if isinstance(vcs, SubversionVCS): - # base field is only allowed for Subversion. - # Note: Fetching base files may become deprecated in future releases. - base = vcs.GuessBase(options.download_base) - else: - base = None - if not base and options.download_base: - options.download_base = True - logging.info("Enabled upload of base file") - if not options.assume_yes: - vcs.CheckForUnknownFiles() - if data is None: - data = vcs.GenerateDiff(args) - files = vcs.GetBaseFiles(data) - if verbosity >= 1: - print "Upload server:", options.server, "(change with -s/--server)" - if options.issue: - prompt = "Message describing this patch set: " - else: - prompt = "New issue subject: " - message = options.message or raw_input(prompt).strip() - if not message: - ErrorExit("A non-empty message is required") - rpc_server = GetRpcServer(options) - form_fields = [("subject", message)] - if base: - form_fields.append(("base", base)) - if options.issue: - form_fields.append(("issue", str(options.issue))) - if options.email: - form_fields.append(("user", options.email)) - if options.reviewers: - for reviewer in options.reviewers.split(','): - if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % reviewer) - form_fields.append(("reviewers", options.reviewers)) - if options.cc: - for cc in options.cc.split(','): - if "@" in cc and not cc.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % cc) - form_fields.append(("cc", options.cc)) - description = options.description - if options.description_file: - if options.description: - ErrorExit("Can't specify description and description_file") - file = open(options.description_file, 'r') - description = file.read() - file.close() - if description: - form_fields.append(("description", description)) - # Send a hash of all the base file so the server can determine if a copy - # already exists in an earlier patchset. - base_hashes = "" - for file, info in files.iteritems(): - if not info[0] is None: - checksum = md5.new(info[0]).hexdigest() - if base_hashes: - base_hashes += "|" - base_hashes += checksum + ":" + file - form_fields.append(("base_hashes", base_hashes)) - # If we're uploading base files, don't send the email before the uploads, so - # that it contains the file status. - if options.send_mail and options.download_base: - form_fields.append(("send_mail", "1")) - if not options.download_base: - form_fields.append(("content_upload", "1")) - if len(data) > MAX_UPLOAD_SIZE: - print "Patch is large, so uploading file patches separately." - uploaded_diff_file = [] - form_fields.append(("separate_patches", "1")) - else: - uploaded_diff_file = [("data", "data.diff", data)] - ctype, body = EncodeMultipartFormData(form_fields, uploaded_diff_file) - response_body = rpc_server.Send("/upload", body, content_type=ctype) - patchset = None - if not options.download_base or not uploaded_diff_file: - lines = response_body.splitlines() - if len(lines) >= 2: - msg = lines[0] - patchset = lines[1].strip() - patches = [x.split(" ", 1) for x in lines[2:]] - else: - msg = response_body - else: - msg = response_body - StatusUpdate(msg) - if not response_body.startswith("Issue created.") and \ - not response_body.startswith("Issue updated."): - sys.exit(0) - issue = msg[msg.rfind("/")+1:] - - if not uploaded_diff_file: - result = UploadSeparatePatches(issue, rpc_server, patchset, data, options) - if not options.download_base: - patches = result - - if not options.download_base: - vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files) - if options.send_mail: - rpc_server.Send("/" + issue + "/mail", payload="") - return issue, patchset - - -def main(): - try: - RealMain(sys.argv) - except KeyboardInterrupt: - print - StatusUpdate("Interrupted.") - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload_gtest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload_gtest.py deleted file mode 100755 index be19ae80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/scripts/upload_gtest.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""upload_gtest.py v0.1.0 -- uploads a Google Test patch for review. - -This simple wrapper passes all command line flags and ---cc=googletestframework@googlegroups.com to upload.py. - -USAGE: upload_gtest.py [options for upload.py] -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys - -CC_FLAG = '--cc=' -GTEST_GROUP = 'googletestframework@googlegroups.com' - - -def main(): - # Finds the path to upload.py, assuming it is in the same directory - # as this file. - my_dir = os.path.dirname(os.path.abspath(__file__)) - upload_py_path = os.path.join(my_dir, 'upload.py') - - # Adds Google Test discussion group to the cc line if it's not there - # already. - upload_py_argv = [upload_py_path] - found_cc_flag = False - for arg in sys.argv[1:]: - if arg.startswith(CC_FLAG): - found_cc_flag = True - cc_line = arg[len(CC_FLAG):] - cc_list = [addr for addr in cc_line.split(',') if addr] - if GTEST_GROUP not in cc_list: - cc_list.append(GTEST_GROUP) - upload_py_argv.append(CC_FLAG + ','.join(cc_list)) - else: - upload_py_argv.append(arg) - - if not found_cc_flag: - upload_py_argv.append(CC_FLAG + GTEST_GROUP) - - # Invokes upload.py with the modified command line flags. - os.execv(upload_py_path, upload_py_argv) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-all.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-all.cc deleted file mode 100644 index a67ea0fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-all.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// Google C++ Testing Framework (Google Test) -// -// Sometimes it's desirable to build Google Test by compiling a single file. -// This file serves this purpose. -#include "src/gtest.cc" -#include "src/gtest-death-test.cc" -#include "src/gtest-filepath.cc" -#include "src/gtest-port.cc" -#include "src/gtest-test-part.cc" -#include "src/gtest-typed-test.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-death-test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-death-test.cc deleted file mode 100644 index 0d4110bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-death-test.cc +++ /dev/null @@ -1,1177 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) -// -// This file implements death tests. - -#include -#include - -#if GTEST_HAS_DEATH_TEST - -#if GTEST_OS_MAC -#include -#endif // GTEST_OS_MAC - -#include -#include -#include -#include - -#if GTEST_OS_WINDOWS -#include -#else -#include -#include -#endif // GTEST_OS_WINDOWS - -#endif // GTEST_HAS_DEATH_TEST - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -// Constants. - -// The default death test style. -static const char kDefaultDeathTestStyle[] = "fast"; - -GTEST_DEFINE_string_( - death_test_style, - internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), - "Indicates how to run a death test in a forked child process: " - "\"threadsafe\" (child process re-executes the test binary " - "from the beginning, running only the specific death test) or " - "\"fast\" (child process runs the death test immediately " - "after forking)."); - -GTEST_DEFINE_bool_( - death_test_use_fork, - internal::BoolFromGTestEnv("death_test_use_fork", false), - "Instructs to use fork()/_exit() instead of clone() in death tests. " - "Ignored and always uses fork() on POSIX systems where clone() is not " - "implemented. Useful when running under valgrind or similar tools if " - "those do not support clone(). Valgrind 3.3.1 will just fail if " - "it sees an unsupported combination of clone() flags. " - "It is not recommended to use this flag w/o valgrind though it will " - "work in 99% of the cases. Once valgrind is fixed, this flag will " - "most likely be removed."); - -namespace internal { -GTEST_DEFINE_string_( - internal_run_death_test, "", - "Indicates the file, line number, temporal index of " - "the single death test to run, and a file descriptor to " - "which a success code may be sent, all separated by " - "colons. This flag is specified if and only if the current " - "process is a sub-process launched for running a thread-safe " - "death test. FOR INTERNAL USE ONLY."); -} // namespace internal - -#if GTEST_HAS_DEATH_TEST - -// ExitedWithCode constructor. -ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) { -} - -// ExitedWithCode function-call operator. -bool ExitedWithCode::operator()(int exit_status) const { -#if GTEST_OS_WINDOWS - return exit_status == exit_code_; -#else - return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_; -#endif // GTEST_OS_WINDOWS -} - -#if !GTEST_OS_WINDOWS -// KilledBySignal constructor. -KilledBySignal::KilledBySignal(int signum) : signum_(signum) { -} - -// KilledBySignal function-call operator. -bool KilledBySignal::operator()(int exit_status) const { - return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; -} -#endif // !GTEST_OS_WINDOWS - -namespace internal { - -// Utilities needed for death tests. - -// Generates a textual description of a given exit code, in the format -// specified by wait(2). -static String ExitSummary(int exit_code) { - Message m; -#if GTEST_OS_WINDOWS - m << "Exited with exit status " << exit_code; -#else - if (WIFEXITED(exit_code)) { - m << "Exited with exit status " << WEXITSTATUS(exit_code); - } else if (WIFSIGNALED(exit_code)) { - m << "Terminated by signal " << WTERMSIG(exit_code); - } -#ifdef WCOREDUMP - if (WCOREDUMP(exit_code)) { - m << " (core dumped)"; - } -#endif -#endif // GTEST_OS_WINDOWS - return m.GetString(); -} - -// Returns true if exit_status describes a process that was terminated -// by a signal, or exited normally with a nonzero exit code. -bool ExitedUnsuccessfully(int exit_status) { - return !ExitedWithCode(0)(exit_status); -} - -#if !GTEST_OS_WINDOWS -// Generates a textual failure message when a death test finds more than -// one thread running, or cannot determine the number of threads, prior -// to executing the given statement. It is the responsibility of the -// caller not to pass a thread_count of 1. -static String DeathTestThreadWarning(size_t thread_count) { - Message msg; - msg << "Death tests use fork(), which is unsafe particularly" - << " in a threaded context. For this test, " << GTEST_NAME_ << " "; - if (thread_count == 0) - msg << "couldn't detect the number of threads."; - else - msg << "detected " << thread_count << " threads."; - return msg.GetString(); -} -#endif // !GTEST_OS_WINDOWS - -// Flag characters for reporting a death test that did not die. -static const char kDeathTestLived = 'L'; -static const char kDeathTestReturned = 'R'; -static const char kDeathTestInternalError = 'I'; - -// An enumeration describing all of the possible ways that a death test -// can conclude. DIED means that the process died while executing the -// test code; LIVED means that process lived beyond the end of the test -// code; and RETURNED means that the test statement attempted a "return," -// which is not allowed. IN_PROGRESS means the test has not yet -// concluded. -enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED }; - -// Routine for aborting the program which is safe to call from an -// exec-style death test child process, in which case the error -// message is propagated back to the parent process. Otherwise, the -// message is simply printed to stderr. In either case, the program -// then exits with status 1. -void DeathTestAbort(const String& message) { - // On a POSIX system, this function may be called from a threadsafe-style - // death test child process, which operates on a very small stack. Use - // the heap for any additional non-minuscule memory requirements. - const InternalRunDeathTestFlag* const flag = - GetUnitTestImpl()->internal_run_death_test_flag(); - if (flag != NULL) { - FILE* parent = posix::FDOpen(flag->write_fd(), "w"); - fputc(kDeathTestInternalError, parent); - fprintf(parent, "%s", message.c_str()); - fflush(parent); - _exit(1); - } else { - fprintf(stderr, "%s", message.c_str()); - fflush(stderr); - abort(); - } -} - -// A replacement for CHECK that calls DeathTestAbort if the assertion -// fails. -#define GTEST_DEATH_TEST_CHECK_(expression) \ - do { \ - if (!(expression)) { \ - DeathTestAbort(::testing::internal::String::Format(\ - "CHECK failed: File %s, line %d: %s", \ - __FILE__, __LINE__, #expression)); \ - } \ - } while (0) - -// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for -// evaluating any system call that fulfills two conditions: it must return -// -1 on failure, and set errno to EINTR when it is interrupted and -// should be tried again. The macro expands to a loop that repeatedly -// evaluates the expression as long as it evaluates to -1 and sets -// errno to EINTR. If the expression evaluates to -1 but errno is -// something other than EINTR, DeathTestAbort is called. -#define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \ - do { \ - int gtest_retval; \ - do { \ - gtest_retval = (expression); \ - } while (gtest_retval == -1 && errno == EINTR); \ - if (gtest_retval == -1) { \ - DeathTestAbort(::testing::internal::String::Format(\ - "CHECK failed: File %s, line %d: %s != -1", \ - __FILE__, __LINE__, #expression)); \ - } \ - } while (0) - -// Returns the message describing the last system error in errno. -String GetLastErrnoDescription() { - return String(errno == 0 ? "" : posix::StrError(errno)); -} - -// This is called from a death test parent process to read a failure -// message from the death test child process and log it with the FATAL -// severity. On Windows, the message is read from a pipe handle. On other -// platforms, it is read from a file descriptor. -static void FailFromInternalError(int fd) { - Message error; - char buffer[256]; - int num_read; - - do { - while ((num_read = posix::Read(fd, buffer, 255)) > 0) { - buffer[num_read] = '\0'; - error << buffer; - } - } while (num_read == -1 && errno == EINTR); - - if (num_read == 0) { - GTEST_LOG_(FATAL, error); - } else { - const int last_error = errno; - const String message = GetLastErrnoDescription(); - GTEST_LOG_(FATAL, - Message() << "Error while reading death test internal: " - << message << " [" << last_error << "]"); - } -} - -// Death test constructor. Increments the running death test count -// for the current test. -DeathTest::DeathTest() { - TestInfo* const info = GetUnitTestImpl()->current_test_info(); - if (info == NULL) { - DeathTestAbort("Cannot run a death test outside of a TEST or " - "TEST_F construct"); - } -} - -// Creates and returns a death test by dispatching to the current -// death test factory. -bool DeathTest::Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test) { - return GetUnitTestImpl()->death_test_factory()->Create( - statement, regex, file, line, test); -} - -const char* DeathTest::LastMessage() { - return last_death_test_message_.c_str(); -} - -void DeathTest::set_last_death_test_message(const String& message) { - last_death_test_message_ = message; -} - -String DeathTest::last_death_test_message_; - -// Provides cross platform implementation for some death functionality. -class DeathTestImpl : public DeathTest { - protected: - DeathTestImpl(const char* statement, const RE* regex) - : statement_(statement), - regex_(regex), - spawned_(false), - status_(-1), - outcome_(IN_PROGRESS), - read_fd_(-1), - write_fd_(-1) {} - - // read_fd_ is expected to be closed and cleared by a derived class. - ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } - - void Abort(AbortReason reason); - virtual bool Passed(bool status_ok); - - const char* statement() const { return statement_; } - const RE* regex() const { return regex_; } - bool spawned() const { return spawned_; } - void set_spawned(bool spawned) { spawned_ = spawned; } - int status() const { return status_; } - void set_status(int status) { status_ = status; } - DeathTestOutcome outcome() const { return outcome_; } - void set_outcome(DeathTestOutcome outcome) { outcome_ = outcome; } - int read_fd() const { return read_fd_; } - void set_read_fd(int fd) { read_fd_ = fd; } - int write_fd() const { return write_fd_; } - void set_write_fd(int fd) { write_fd_ = fd; } - - // Called in the parent process only. Reads the result code of the death - // test child process via a pipe, interprets it to set the outcome_ - // member, and closes read_fd_. Outputs diagnostics and terminates in - // case of unexpected codes. - void ReadAndInterpretStatusByte(); - - private: - // The textual content of the code this object is testing. This class - // doesn't own this string and should not attempt to delete it. - const char* const statement_; - // The regular expression which test output must match. DeathTestImpl - // doesn't own this object and should not attempt to delete it. - const RE* const regex_; - // True if the death test child process has been successfully spawned. - bool spawned_; - // The exit status of the child process. - int status_; - // How the death test concluded. - DeathTestOutcome outcome_; - // Descriptor to the read end of the pipe to the child process. It is - // always -1 in the child process. The child keeps its write end of the - // pipe in write_fd_. - int read_fd_; - // Descriptor to the child's write end of the pipe to the parent process. - // It is always -1 in the parent process. The parent keeps its end of the - // pipe in read_fd_. - int write_fd_; -}; - -// Called in the parent process only. Reads the result code of the death -// test child process via a pipe, interprets it to set the outcome_ -// member, and closes read_fd_. Outputs diagnostics and terminates in -// case of unexpected codes. -void DeathTestImpl::ReadAndInterpretStatusByte() { - char flag; - int bytes_read; - - // The read() here blocks until data is available (signifying the - // failure of the death test) or until the pipe is closed (signifying - // its success), so it's okay to call this in the parent before - // the child process has exited. - do { - bytes_read = posix::Read(read_fd(), &flag, 1); - } while (bytes_read == -1 && errno == EINTR); - - if (bytes_read == 0) { - set_outcome(DIED); - } else if (bytes_read == 1) { - switch (flag) { - case kDeathTestReturned: - set_outcome(RETURNED); - break; - case kDeathTestLived: - set_outcome(LIVED); - break; - case kDeathTestInternalError: - FailFromInternalError(read_fd()); // Does not return. - break; - default: - GTEST_LOG_(FATAL, - Message() << "Death test child process reported " - << "unexpected status byte (" - << static_cast(flag) << ")"); - } - } else { - GTEST_LOG_(FATAL, - Message() << "Read from death test child process failed: " - << GetLastErrnoDescription()); - } - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd())); - set_read_fd(-1); -} - -// Signals that the death test code which should have exited, didn't. -// Should be called only in a death test child process. -// Writes a status byte to the child's status file descriptor, then -// calls _exit(1). -void DeathTestImpl::Abort(AbortReason reason) { - // The parent process considers the death test to be a failure if - // it finds any data in our pipe. So, here we write a single flag byte - // to the pipe, then exit. - const char status_ch = - reason == TEST_DID_NOT_DIE ? kDeathTestLived : kDeathTestReturned; - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1)); - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(write_fd())); - _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash) -} - -// Assesses the success or failure of a death test, using both private -// members which have previously been set, and one argument: -// -// Private data members: -// outcome: An enumeration describing how the death test -// concluded: DIED, LIVED, or RETURNED. The death test fails -// in the latter two cases. -// status: The exit status of the child process. On *nix, it is in the -// in the format specified by wait(2). On Windows, this is the -// value supplied to the ExitProcess() API or a numeric code -// of the exception that terminated the program. -// regex: A regular expression object to be applied to -// the test's captured standard error output; the death test -// fails if it does not match. -// -// Argument: -// status_ok: true if exit_status is acceptable in the context of -// this particular death test, which fails if it is false -// -// Returns true iff all of the above conditions are met. Otherwise, the -// first failing condition, in the order given above, is the one that is -// reported. Also sets the last death test message string. -bool DeathTestImpl::Passed(bool status_ok) { - if (!spawned()) - return false; - -#if GTEST_HAS_GLOBAL_STRING - const ::string error_message = GetCapturedStderr(); -#else - const ::std::string error_message = GetCapturedStderr(); -#endif // GTEST_HAS_GLOBAL_STRING - - bool success = false; - Message buffer; - - buffer << "Death test: " << statement() << "\n"; - switch (outcome()) { - case LIVED: - buffer << " Result: failed to die.\n" - << " Error msg: " << error_message; - break; - case RETURNED: - buffer << " Result: illegal return in test statement.\n" - << " Error msg: " << error_message; - break; - case DIED: - if (status_ok) { - if (RE::PartialMatch(error_message, *regex())) { - success = true; - } else { - buffer << " Result: died but not with expected error.\n" - << " Expected: " << regex()->pattern() << "\n" - << "Actual msg: " << error_message; - } - } else { - buffer << " Result: died but not with expected exit code:\n" - << " " << ExitSummary(status()) << "\n"; - } - break; - case IN_PROGRESS: - default: - GTEST_LOG_(FATAL, - "DeathTest::Passed somehow called before conclusion of test"); - } - - DeathTest::set_last_death_test_message(buffer.GetString()); - return success; -} - -#if GTEST_OS_WINDOWS -// WindowsDeathTest implements death tests on Windows. Due to the -// specifics of starting new processes on Windows, death tests there are -// always threadsafe, and Google Test considers the -// --gtest_death_test_style=fast setting to be equivalent to -// --gtest_death_test_style=threadsafe there. -// -// A few implementation notes: Like the Linux version, the Windows -// implementation uses pipes for child-to-parent communication. But due to -// the specifics of pipes on Windows, some extra steps are required: -// -// 1. The parent creates a communication pipe and stores handles to both -// ends of it. -// 2. The parent starts the child and provides it with the information -// necessary to acquire the handle to the write end of the pipe. -// 3. The child acquires the write end of the pipe and signals the parent -// using a Windows event. -// 4. Now the parent can release the write end of the pipe on its side. If -// this is done before step 3, the object's reference count goes down to -// 0 and it is destroyed, preventing the child from acquiring it. The -// parent now has to release it, or read operations on the read end of -// the pipe will not return when the child terminates. -// 5. The parent reads child's output through the pipe (outcome code and -// any possible error messages) from the pipe, and its stderr and then -// determines whether to fail the test. -// -// Note: to distinguish Win32 API calls from the local method and function -// calls, the former are explicitly resolved in the global namespace. -// -class WindowsDeathTest : public DeathTestImpl { - public: - WindowsDeathTest(const char* statement, - const RE* regex, - const char* file, - int line) - : DeathTestImpl(statement, regex), file_(file), line_(line) {} - - // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); - virtual TestRole AssumeRole(); - - private: - // The name of the file in which the death test is located. - const char* const file_; - // The line number on which the death test is located. - const int line_; - // Handle to the write end of the pipe to the child process. - AutoHandle write_handle_; - // Child process handle. - AutoHandle child_handle_; - // Event the child process uses to signal the parent that it has - // acquired the handle to the write end of the pipe. After seeing this - // event the parent can release its own handles to make sure its - // ReadFile() calls return when the child terminates. - AutoHandle event_handle_; -}; - -// Waits for the child in a death test to exit, returning its exit -// status, or 0 if no child process exists. As a side effect, sets the -// outcome data member. -int WindowsDeathTest::Wait() { - if (!spawned()) - return 0; - - // Wait until the child either signals that it has acquired the write end - // of the pipe or it dies. - const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; - switch (::WaitForMultipleObjects(2, - wait_handles, - FALSE, // Waits for any of the handles. - INFINITE)) { - case WAIT_OBJECT_0: - case WAIT_OBJECT_0 + 1: - break; - default: - GTEST_DEATH_TEST_CHECK_(false); // Should not get here. - } - - // The child has acquired the write end of the pipe or exited. - // We release the handle on our side and continue. - write_handle_.Reset(); - event_handle_.Reset(); - - ReadAndInterpretStatusByte(); - - // Waits for the child process to exit if it haven't already. This - // returns immediately if the child has already exited, regardless of - // whether previous calls to WaitForMultipleObjects synchronized on this - // handle or not. - GTEST_DEATH_TEST_CHECK_( - WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(), - INFINITE)); - DWORD status; - GTEST_DEATH_TEST_CHECK_(::GetExitCodeProcess(child_handle_.Get(), - &status)); - child_handle_.Reset(); - set_status(static_cast(status)); - return this->status(); -} - -// The AssumeRole process for a Windows death test. It creates a child -// process with the same executable as the current process to run the -// death test. The child process is given the --gtest_filter and -// --gtest_internal_run_death_test flags such that it knows to run the -// current death test only. -DeathTest::TestRole WindowsDeathTest::AssumeRole() { - const UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const TestInfo* const info = impl->current_test_info(); - const int death_test_index = info->result()->death_test_count(); - - if (flag != NULL) { - // ParseInternalRunDeathTestFlag() has performed all the necessary - // processing. - set_write_fd(flag->write_fd()); - return EXECUTE_TEST; - } - - // WindowsDeathTest uses an anonymous pipe to communicate results of - // a death test. - SECURITY_ATTRIBUTES handles_are_inheritable = { - sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; - HANDLE read_handle, write_handle; - GTEST_DEATH_TEST_CHECK_(::CreatePipe(&read_handle, &write_handle, - &handles_are_inheritable, - 0)); // Default buffer size. - set_read_fd(::_open_osfhandle(reinterpret_cast(read_handle), - O_RDONLY)); - write_handle_.Reset(write_handle); - event_handle_.Reset(::CreateEvent( - &handles_are_inheritable, - TRUE, // The event will automatically reset to non-signaled state. - FALSE, // The initial state is non-signalled. - NULL)); // The even is unnamed. - GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL); - const String filter_flag = String::Format("--%s%s=%s.%s", - GTEST_FLAG_PREFIX_, kFilterFlag, - info->test_case_name(), - info->name()); - const String internal_flag = String::Format( - "--%s%s=%s|%d|%d|%u|%Iu|%Iu", - GTEST_FLAG_PREFIX_, - kInternalRunDeathTestFlag, - file_, line_, - death_test_index, - static_cast(::GetCurrentProcessId()), - // size_t has the same with as pointers on both 32-bit and 64-bit - // Windows platforms. - // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. - reinterpret_cast(write_handle), - reinterpret_cast(event_handle_.Get())); - - char executable_path[_MAX_PATH + 1]; // NOLINT - GTEST_DEATH_TEST_CHECK_( - _MAX_PATH + 1 != ::GetModuleFileNameA(NULL, - executable_path, - _MAX_PATH)); - - String command_line = String::Format("%s %s \"%s\"", - ::GetCommandLineA(), - filter_flag.c_str(), - internal_flag.c_str()); - - DeathTest::set_last_death_test_message(""); - - CaptureStderr(); - // Flush the log buffers since the log streams are shared with the child. - FlushInfoLog(); - - // The child process will share the standard handles with the parent. - STARTUPINFOA startup_info; - memset(&startup_info, 0, sizeof(STARTUPINFO)); - startup_info.dwFlags = STARTF_USESTDHANDLES; - startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE); - startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE); - startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE); - - PROCESS_INFORMATION process_info; - GTEST_DEATH_TEST_CHECK_(::CreateProcessA( - executable_path, - const_cast(command_line.c_str()), - NULL, // Retuned process handle is not inheritable. - NULL, // Retuned thread handle is not inheritable. - TRUE, // Child inherits all inheritable handles (for write_handle_). - 0x0, // Default creation flags. - NULL, // Inherit the parent's environment. - UnitTest::GetInstance()->original_working_dir(), - &startup_info, - &process_info)); - child_handle_.Reset(process_info.hProcess); - ::CloseHandle(process_info.hThread); - set_spawned(true); - return OVERSEE_TEST; -} -#else // We are not on Windows. - -// ForkingDeathTest provides implementations for most of the abstract -// methods of the DeathTest interface. Only the AssumeRole method is -// left undefined. -class ForkingDeathTest : public DeathTestImpl { - public: - ForkingDeathTest(const char* statement, const RE* regex); - - // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); - - protected: - void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } - - private: - // PID of child process during death test; 0 in the child process itself. - pid_t child_pid_; -}; - -// Constructs a ForkingDeathTest. -ForkingDeathTest::ForkingDeathTest(const char* statement, const RE* regex) - : DeathTestImpl(statement, regex), - child_pid_(-1) {} - -// Waits for the child in a death test to exit, returning its exit -// status, or 0 if no child process exists. As a side effect, sets the -// outcome data member. -int ForkingDeathTest::Wait() { - if (!spawned()) - return 0; - - ReadAndInterpretStatusByte(); - - int status; - GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status, 0)); - set_status(status); - return status; -} - -// A concrete death test class that forks, then immediately runs the test -// in the child process. -class NoExecDeathTest : public ForkingDeathTest { - public: - NoExecDeathTest(const char* statement, const RE* regex) : - ForkingDeathTest(statement, regex) { } - virtual TestRole AssumeRole(); -}; - -// The AssumeRole process for a fork-and-run death test. It implements a -// straightforward fork, with a simple pipe to transmit the status byte. -DeathTest::TestRole NoExecDeathTest::AssumeRole() { - const size_t thread_count = GetThreadCount(); - if (thread_count != 1) { - GTEST_LOG_(WARNING, DeathTestThreadWarning(thread_count)); - } - - int pipe_fd[2]; - GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); - - DeathTest::set_last_death_test_message(""); - CaptureStderr(); - // When we fork the process below, the log file buffers are copied, but the - // file descriptors are shared. We flush all log files here so that closing - // the file descriptors in the child process doesn't throw off the - // synchronization between descriptors and buffers in the parent process. - // This is as close to the fork as possible to avoid a race condition in case - // there are multiple threads running before the death test, and another - // thread writes to the log file. - FlushInfoLog(); - - const pid_t child_pid = fork(); - GTEST_DEATH_TEST_CHECK_(child_pid != -1); - set_child_pid(child_pid); - if (child_pid == 0) { - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); - set_write_fd(pipe_fd[1]); - // Redirects all logging to stderr in the child process to prevent - // concurrent writes to the log files. We capture stderr in the parent - // process and append the child process' output to a log. - LogToStderr(); - return EXECUTE_TEST; - } else { - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); - set_read_fd(pipe_fd[0]); - set_spawned(true); - return OVERSEE_TEST; - } -} - -// A concrete death test class that forks and re-executes the main -// program from the beginning, with command-line flags set that cause -// only this specific death test to be run. -class ExecDeathTest : public ForkingDeathTest { - public: - ExecDeathTest(const char* statement, const RE* regex, - const char* file, int line) : - ForkingDeathTest(statement, regex), file_(file), line_(line) { } - virtual TestRole AssumeRole(); - private: - // The name of the file in which the death test is located. - const char* const file_; - // The line number on which the death test is located. - const int line_; -}; - -// Utility class for accumulating command-line arguments. -class Arguments { - public: - Arguments() { - args_.push_back(NULL); - } - - ~Arguments() { - for (std::vector::iterator i = args_.begin(); i != args_.end(); - ++i) { - free(*i); - } - } - void AddArgument(const char* argument) { - args_.insert(args_.end() - 1, posix::StrDup(argument)); - } - - template - void AddArguments(const ::std::vector& arguments) { - for (typename ::std::vector::const_iterator i = arguments.begin(); - i != arguments.end(); - ++i) { - args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); - } - } - char* const* Argv() { - return &args_[0]; - } - private: - std::vector args_; -}; - -// A struct that encompasses the arguments to the child process of a -// threadsafe-style death test process. -struct ExecDeathTestArgs { - char* const* argv; // Command-line arguments for the child's call to exec - int close_fd; // File descriptor to close; the read end of a pipe -}; - -#if GTEST_OS_MAC -inline char** GetEnviron() { - // When Google Test is built as a framework on MacOS X, the environ variable - // is unavailable. Apple's documentation (man environ) recommends using - // _NSGetEnviron() instead. - return *_NSGetEnviron(); -} -#else -// Some POSIX platforms expect you to declare environ. extern "C" makes -// it reside in the global namespace. -extern "C" char** environ; -inline char** GetEnviron() { return environ; } -#endif // GTEST_OS_MAC - -// The main function for a threadsafe-style death test child process. -// This function is called in a clone()-ed process and thus must avoid -// any potentially unsafe operations like malloc or libc functions. -static int ExecDeathTestChildMain(void* child_arg) { - ExecDeathTestArgs* const args = static_cast(child_arg); - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd)); - - // We need to execute the test program in the same environment where - // it was originally invoked. Therefore we change to the original - // working directory first. - const char* const original_dir = - UnitTest::GetInstance()->original_working_dir(); - // We can safely call chdir() as it's a direct system call. - if (chdir(original_dir) != 0) { - DeathTestAbort(String::Format("chdir(\"%s\") failed: %s", - original_dir, - GetLastErrnoDescription().c_str())); - return EXIT_FAILURE; - } - - // We can safely call execve() as it's a direct system call. We - // cannot use execvp() as it's a libc function and thus potentially - // unsafe. Since execve() doesn't search the PATH, the user must - // invoke the test program via a valid path that contains at least - // one path separator. - execve(args->argv[0], args->argv, GetEnviron()); - DeathTestAbort(String::Format("execve(%s, ...) in %s failed: %s", - args->argv[0], - original_dir, - GetLastErrnoDescription().c_str())); - return EXIT_FAILURE; -} - -// Two utility routines that together determine the direction the stack -// grows. -// This could be accomplished more elegantly by a single recursive -// function, but we want to guard against the unlikely possibility of -// a smart compiler optimizing the recursion away. -bool StackLowerThanAddress(const void* ptr) { - int dummy; - return &dummy < ptr; -} - -bool StackGrowsDown() { - int dummy; - return StackLowerThanAddress(&dummy); -} - -// A threadsafe implementation of fork(2) for threadsafe-style death tests -// that uses clone(2). It dies with an error message if anything goes -// wrong. -static pid_t ExecDeathTestFork(char* const* argv, int close_fd) { - ExecDeathTestArgs args = { argv, close_fd }; - pid_t child_pid = -1; - -#if GTEST_HAS_CLONE - const bool use_fork = GTEST_FLAG(death_test_use_fork); - - if (!use_fork) { - static const bool stack_grows_down = StackGrowsDown(); - const size_t stack_size = getpagesize(); - // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. - void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); - void* const stack_top = - static_cast(stack) + (stack_grows_down ? stack_size : 0); - - child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); - - GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1); - } -#else - const bool use_fork = true; -#endif // GTEST_HAS_CLONE - - if (use_fork && (child_pid = fork()) == 0) { - ExecDeathTestChildMain(&args); - _exit(0); - } - - GTEST_DEATH_TEST_CHECK_(child_pid != -1); - return child_pid; -} - -// The AssumeRole process for a fork-and-exec death test. It re-executes the -// main program from the beginning, setting the --gtest_filter -// and --gtest_internal_run_death_test flags to cause only the current -// death test to be re-run. -DeathTest::TestRole ExecDeathTest::AssumeRole() { - const UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const TestInfo* const info = impl->current_test_info(); - const int death_test_index = info->result()->death_test_count(); - - if (flag != NULL) { - set_write_fd(flag->write_fd()); - return EXECUTE_TEST; - } - - int pipe_fd[2]; - GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); - // Clear the close-on-exec flag on the write end of the pipe, lest - // it be closed when the child process does an exec: - GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); - - const String filter_flag = - String::Format("--%s%s=%s.%s", - GTEST_FLAG_PREFIX_, kFilterFlag, - info->test_case_name(), info->name()); - const String internal_flag = - String::Format("--%s%s=%s|%d|%d|%d", - GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag, - file_, line_, death_test_index, pipe_fd[1]); - Arguments args; - args.AddArguments(GetArgvs()); - args.AddArgument(filter_flag.c_str()); - args.AddArgument(internal_flag.c_str()); - - DeathTest::set_last_death_test_message(""); - - CaptureStderr(); - // See the comment in NoExecDeathTest::AssumeRole for why the next line - // is necessary. - FlushInfoLog(); - - const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]); - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); - set_child_pid(child_pid); - set_read_fd(pipe_fd[0]); - set_spawned(true); - return OVERSEE_TEST; -} - -#endif // !GTEST_OS_WINDOWS - -// Creates a concrete DeathTest-derived class that depends on the -// --gtest_death_test_style flag, and sets the pointer pointed to -// by the "test" argument to its address. If the test should be -// skipped, sets that pointer to NULL. Returns true, unless the -// flag is set to an invalid value. -bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex, - const char* file, int line, - DeathTest** test) { - UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const int death_test_index = impl->current_test_info() - ->increment_death_test_count(); - - if (flag != NULL) { - if (death_test_index > flag->index()) { - DeathTest::set_last_death_test_message(String::Format( - "Death test count (%d) somehow exceeded expected maximum (%d)", - death_test_index, flag->index())); - return false; - } - - if (!(flag->file() == file && flag->line() == line && - flag->index() == death_test_index)) { - *test = NULL; - return true; - } - } - -#if GTEST_OS_WINDOWS - if (GTEST_FLAG(death_test_style) == "threadsafe" || - GTEST_FLAG(death_test_style) == "fast") { - *test = new WindowsDeathTest(statement, regex, file, line); - } -#else - if (GTEST_FLAG(death_test_style) == "threadsafe") { - *test = new ExecDeathTest(statement, regex, file, line); - } else if (GTEST_FLAG(death_test_style) == "fast") { - *test = new NoExecDeathTest(statement, regex); - } -#endif // GTEST_OS_WINDOWS - else { // NOLINT - this is more readable than unbalanced brackets inside #if. - DeathTest::set_last_death_test_message(String::Format( - "Unknown death test style \"%s\" encountered", - GTEST_FLAG(death_test_style).c_str())); - return false; - } - - return true; -} - -// Splits a given string on a given delimiter, populating a given -// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have -// ::std::string, so we can use it here. -// TODO(vladl@google.com): Get rid of std::vector to be able to build on -// Visual C++ 7.1 with exceptions disabled. -static void SplitString(const ::std::string& str, char delimiter, - ::std::vector< ::std::string>* dest) { - ::std::vector< ::std::string> parsed; - ::std::string::size_type pos = 0; - while (true) { - const ::std::string::size_type colon = str.find(delimiter, pos); - if (colon == ::std::string::npos) { - parsed.push_back(str.substr(pos)); - break; - } else { - parsed.push_back(str.substr(pos, colon - pos)); - pos = colon + 1; - } - } - dest->swap(parsed); -} - -#if GTEST_OS_WINDOWS -// Recreates the pipe and event handles from the provided parameters, -// signals the event, and returns a file descriptor wrapped around the pipe -// handle. This function is called in the child process only. -int GetStatusFileDescriptor(unsigned int parent_process_id, - size_t write_handle_as_size_t, - size_t event_handle_as_size_t) { - AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE, - FALSE, // Non-inheritable. - parent_process_id)); - if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) { - DeathTestAbort(String::Format("Unable to open parent process %u", - parent_process_id)); - } - - // TODO(vladl@google.com): Replace the following check with a - // compile-time assertion when available. - GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); - - const HANDLE write_handle = - reinterpret_cast(write_handle_as_size_t); - HANDLE dup_write_handle; - - // The newly initialized handle is accessible only in in the parent - // process. To obtain one accessible within the child, we need to use - // DuplicateHandle. - if (!::DuplicateHandle(parent_process_handle.Get(), write_handle, - ::GetCurrentProcess(), &dup_write_handle, - 0x0, // Requested privileges ignored since - // DUPLICATE_SAME_ACCESS is used. - FALSE, // Request non-inheritable handler. - DUPLICATE_SAME_ACCESS)) { - DeathTestAbort(String::Format( - "Unable to duplicate the pipe handle %Iu from the parent process %u", - write_handle_as_size_t, parent_process_id)); - } - - const HANDLE event_handle = reinterpret_cast(event_handle_as_size_t); - HANDLE dup_event_handle; - - if (!::DuplicateHandle(parent_process_handle.Get(), event_handle, - ::GetCurrentProcess(), &dup_event_handle, - 0x0, - FALSE, - DUPLICATE_SAME_ACCESS)) { - DeathTestAbort(String::Format( - "Unable to duplicate the event handle %Iu from the parent process %u", - event_handle_as_size_t, parent_process_id)); - } - - const int write_fd = - ::_open_osfhandle(reinterpret_cast(dup_write_handle), O_APPEND); - if (write_fd == -1) { - DeathTestAbort(String::Format( - "Unable to convert pipe handle %Iu to a file descriptor", - write_handle_as_size_t)); - } - - // Signals the parent that the write end of the pipe has been acquired - // so the parent can release its own write end. - ::SetEvent(dup_event_handle); - - return write_fd; -} -#endif // GTEST_OS_WINDOWS - -// Returns a newly created InternalRunDeathTestFlag object with fields -// initialized from the GTEST_FLAG(internal_run_death_test) flag if -// the flag is specified; otherwise returns NULL. -InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() { - if (GTEST_FLAG(internal_run_death_test) == "") return NULL; - - // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we - // can use it here. - int line = -1; - int index = -1; - ::std::vector< ::std::string> fields; - SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields); - int write_fd = -1; - -#if GTEST_OS_WINDOWS - unsigned int parent_process_id = 0; - size_t write_handle_as_size_t = 0; - size_t event_handle_as_size_t = 0; - - if (fields.size() != 6 - || !ParseNaturalNumber(fields[1], &line) - || !ParseNaturalNumber(fields[2], &index) - || !ParseNaturalNumber(fields[3], &parent_process_id) - || !ParseNaturalNumber(fields[4], &write_handle_as_size_t) - || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) { - DeathTestAbort(String::Format( - "Bad --gtest_internal_run_death_test flag: %s", - GTEST_FLAG(internal_run_death_test).c_str())); - } - write_fd = GetStatusFileDescriptor(parent_process_id, - write_handle_as_size_t, - event_handle_as_size_t); -#else - if (fields.size() != 4 - || !ParseNaturalNumber(fields[1], &line) - || !ParseNaturalNumber(fields[2], &index) - || !ParseNaturalNumber(fields[3], &write_fd)) { - DeathTestAbort(String::Format( - "Bad --gtest_internal_run_death_test flag: %s", - GTEST_FLAG(internal_run_death_test).c_str())); - } -#endif // GTEST_OS_WINDOWS - return new InternalRunDeathTestFlag(fields[0], line, index, write_fd); -} - -} // namespace internal - -#endif // GTEST_HAS_DEATH_TEST - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-filepath.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-filepath.cc deleted file mode 100644 index f966352b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-filepath.cc +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) - -#include -#include - -#include - -#ifdef _WIN32_WCE -#include -#elif GTEST_OS_WINDOWS -#include -#include -#elif GTEST_OS_SYMBIAN -// Symbian OpenC has PATH_MAX in sys/syslimits.h -#include -#else -#include -#include // Some Linux distributions define PATH_MAX here. -#endif // _WIN32_WCE or _WIN32 - -#if GTEST_OS_WINDOWS -#define GTEST_PATH_MAX_ _MAX_PATH -#elif defined(PATH_MAX) -#define GTEST_PATH_MAX_ PATH_MAX -#elif defined(_XOPEN_PATH_MAX) -#define GTEST_PATH_MAX_ _XOPEN_PATH_MAX -#else -#define GTEST_PATH_MAX_ _POSIX_PATH_MAX -#endif // GTEST_OS_WINDOWS - -#include - -namespace testing { -namespace internal { - -#if GTEST_OS_WINDOWS -const char kPathSeparator = '\\'; -const char kPathSeparatorString[] = "\\"; -#ifdef _WIN32_WCE -// Windows CE doesn't have a current directory. You should not use -// the current directory in tests on Windows CE, but this at least -// provides a reasonable fallback. -const char kCurrentDirectoryString[] = "\\"; -// Windows CE doesn't define INVALID_FILE_ATTRIBUTES -const DWORD kInvalidFileAttributes = 0xffffffff; -#else -const char kCurrentDirectoryString[] = ".\\"; -#endif // _WIN32_WCE -#else -const char kPathSeparator = '/'; -const char kPathSeparatorString[] = "/"; -const char kCurrentDirectoryString[] = "./"; -#endif // GTEST_OS_WINDOWS - -// Returns the current working directory, or "" if unsuccessful. -FilePath FilePath::GetCurrentDir() { -#ifdef _WIN32_WCE -// Windows CE doesn't have a current directory, so we just return -// something reasonable. - return FilePath(kCurrentDirectoryString); -#elif GTEST_OS_WINDOWS - char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; - return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); -#else - char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; - return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); -#endif -} - -// Returns a copy of the FilePath with the case-insensitive extension removed. -// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns -// FilePath("dir/file"). If a case-insensitive extension is not -// found, returns a copy of the original FilePath. -FilePath FilePath::RemoveExtension(const char* extension) const { - String dot_extension(String::Format(".%s", extension)); - if (pathname_.EndsWithCaseInsensitive(dot_extension.c_str())) { - return FilePath(String(pathname_.c_str(), pathname_.GetLength() - 4)); - } - return *this; -} - -// Returns a copy of the FilePath with the directory part removed. -// Example: FilePath("path/to/file").RemoveDirectoryName() returns -// FilePath("file"). If there is no directory part ("just_a_file"), it returns -// the FilePath unmodified. If there is no file part ("just_a_dir/") it -// returns an empty FilePath (""). -// On Windows platform, '\' is the path separator, otherwise it is '/'. -FilePath FilePath::RemoveDirectoryName() const { - const char* const last_sep = strrchr(c_str(), kPathSeparator); - return last_sep ? FilePath(String(last_sep + 1)) : *this; -} - -// RemoveFileName returns the directory path with the filename removed. -// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". -// If the FilePath is "a_file" or "/a_file", RemoveFileName returns -// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does -// not have a file, like "just/a/dir/", it returns the FilePath unmodified. -// On Windows platform, '\' is the path separator, otherwise it is '/'. -FilePath FilePath::RemoveFileName() const { - const char* const last_sep = strrchr(c_str(), kPathSeparator); - String dir; - if (last_sep) { - dir = String(c_str(), last_sep + 1 - c_str()); - } else { - dir = kCurrentDirectoryString; - } - return FilePath(dir); -} - -// Helper functions for naming files in a directory for xml output. - -// Given directory = "dir", base_name = "test", number = 0, -// extension = "xml", returns "dir/test.xml". If number is greater -// than zero (e.g., 12), returns "dir/test_12.xml". -// On Windows platform, uses \ as the separator rather than /. -FilePath FilePath::MakeFileName(const FilePath& directory, - const FilePath& base_name, - int number, - const char* extension) { - String file; - if (number == 0) { - file = String::Format("%s.%s", base_name.c_str(), extension); - } else { - file = String::Format("%s_%d.%s", base_name.c_str(), number, extension); - } - return ConcatPaths(directory, FilePath(file)); -} - -// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". -// On Windows, uses \ as the separator rather than /. -FilePath FilePath::ConcatPaths(const FilePath& directory, - const FilePath& relative_path) { - if (directory.IsEmpty()) - return relative_path; - const FilePath dir(directory.RemoveTrailingPathSeparator()); - return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator, - relative_path.c_str())); -} - -// Returns true if pathname describes something findable in the file-system, -// either a file, directory, or whatever. -bool FilePath::FileOrDirectoryExists() const { -#ifdef _WIN32_WCE - LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str()); - const DWORD attributes = GetFileAttributes(unicode); - delete [] unicode; - return attributes != kInvalidFileAttributes; -#else - posix::StatStruct file_stat; - return posix::Stat(pathname_.c_str(), &file_stat) == 0; -#endif // _WIN32_WCE -} - -// Returns true if pathname describes a directory in the file-system -// that exists. -bool FilePath::DirectoryExists() const { - bool result = false; -#if GTEST_OS_WINDOWS - // Don't strip off trailing separator if path is a root directory on - // Windows (like "C:\\"). - const FilePath& path(IsRootDirectory() ? *this : - RemoveTrailingPathSeparator()); -#else - const FilePath& path(*this); -#endif - -#ifdef _WIN32_WCE - LPCWSTR unicode = String::AnsiToUtf16(path.c_str()); - const DWORD attributes = GetFileAttributes(unicode); - delete [] unicode; - if ((attributes != kInvalidFileAttributes) && - (attributes & FILE_ATTRIBUTE_DIRECTORY)) { - result = true; - } -#else - posix::StatStruct file_stat; - result = posix::Stat(path.c_str(), &file_stat) == 0 && - posix::IsDir(file_stat); -#endif // _WIN32_WCE - - return result; -} - -// Returns true if pathname describes a root directory. (Windows has one -// root directory per disk drive.) -bool FilePath::IsRootDirectory() const { -#if GTEST_OS_WINDOWS - // TODO(wan@google.com): on Windows a network share like - // \\server\share can be a root directory, although it cannot be the - // current directory. Handle this properly. - return pathname_.GetLength() == 3 && IsAbsolutePath(); -#else - return pathname_ == kPathSeparatorString; -#endif -} - -// Returns true if pathname describes an absolute path. -bool FilePath::IsAbsolutePath() const { - const char* const name = pathname_.c_str(); -#if GTEST_OS_WINDOWS - return pathname_.GetLength() >= 3 && - ((name[0] >= 'a' && name[0] <= 'z') || - (name[0] >= 'A' && name[0] <= 'Z')) && - name[1] == ':' && - name[2] == kPathSeparator; -#else - return name[0] == kPathSeparator; -#endif -} - -// Returns a pathname for a file that does not currently exist. The pathname -// will be directory/base_name.extension or -// directory/base_name_.extension if directory/base_name.extension -// already exists. The number will be incremented until a pathname is found -// that does not already exist. -// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. -// There could be a race condition if two or more processes are calling this -// function at the same time -- they could both pick the same filename. -FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, - const FilePath& base_name, - const char* extension) { - FilePath full_pathname; - int number = 0; - do { - full_pathname.Set(MakeFileName(directory, base_name, number++, extension)); - } while (full_pathname.FileOrDirectoryExists()); - return full_pathname; -} - -// Returns true if FilePath ends with a path separator, which indicates that -// it is intended to represent a directory. Returns false otherwise. -// This does NOT check that a directory (or file) actually exists. -bool FilePath::IsDirectory() const { - return pathname_.EndsWith(kPathSeparatorString); -} - -// Create directories so that path exists. Returns true if successful or if -// the directories already exist; returns false if unable to create directories -// for any reason. -bool FilePath::CreateDirectoriesRecursively() const { - if (!this->IsDirectory()) { - return false; - } - - if (pathname_.GetLength() == 0 || this->DirectoryExists()) { - return true; - } - - const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); - return parent.CreateDirectoriesRecursively() && this->CreateFolder(); -} - -// Create the directory so that path exists. Returns true if successful or -// if the directory already exists; returns false if unable to create the -// directory for any reason, including if the parent directory does not -// exist. Not named "CreateDirectory" because that's a macro on Windows. -bool FilePath::CreateFolder() const { -#if GTEST_OS_WINDOWS -#ifdef _WIN32_WCE - FilePath removed_sep(this->RemoveTrailingPathSeparator()); - LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str()); - int result = CreateDirectory(unicode, NULL) ? 0 : -1; - delete [] unicode; -#else - int result = _mkdir(pathname_.c_str()); -#endif // !WIN32_WCE -#else - int result = mkdir(pathname_.c_str(), 0777); -#endif // _WIN32 - if (result == -1) { - return this->DirectoryExists(); // An error is OK if the directory exists. - } - return true; // No error. -} - -// If input name has a trailing separator character, remove it and return the -// name, otherwise return the name string unmodified. -// On Windows platform, uses \ as the separator, other platforms use /. -FilePath FilePath::RemoveTrailingPathSeparator() const { - return pathname_.EndsWith(kPathSeparatorString) - ? FilePath(String(pathname_.c_str(), pathname_.GetLength() - 1)) - : *this; -} - -// Normalize removes any redundant separators that might be in the pathname. -// For example, "bar///foo" becomes "bar/foo". Does not eliminate other -// redundancies that might be in a pathname involving "." or "..". -void FilePath::Normalize() { - if (pathname_.c_str() == NULL) { - pathname_ = ""; - return; - } - const char* src = pathname_.c_str(); - char* const dest = new char[pathname_.GetLength() + 1]; - char* dest_ptr = dest; - memset(dest_ptr, 0, pathname_.GetLength() + 1); - - while (*src != '\0') { - *dest_ptr++ = *src; - if (*src != kPathSeparator) - src++; - else - while (*src == kPathSeparator) - src++; - } - *dest_ptr = '\0'; - pathname_ = dest; - delete[] dest; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-internal-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-internal-inl.h deleted file mode 100644 index 26d1bd1d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-internal-inl.h +++ /dev/null @@ -1,1417 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Utility functions and classes used by the Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This file contains purely Google Test's internal implementation. Please -// DO NOT #INCLUDE IT IN A USER PROGRAM. - -#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_ -#define GTEST_SRC_GTEST_INTERNAL_INL_H_ - -// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is -// part of Google Test's implementation; otherwise it's undefined. -#if !GTEST_IMPLEMENTATION_ -// A user is trying to include this from his code - just say no. -#error "gtest-internal-inl.h is part of Google Test's internal implementation." -#error "It must not be included except by Google Test itself." -#endif // GTEST_IMPLEMENTATION_ - -#include -#include -#include // For strtoll/_strtoul64. - -#include - -#include - -#if GTEST_OS_WINDOWS -#include // For DWORD. -#endif // GTEST_OS_WINDOWS - -#include -#include - -namespace testing { - -// Declares the flags. -// -// We don't want the users to modify this flag in the code, but want -// Google Test's own unit tests to be able to access it. Therefore we -// declare it here as opposed to in gtest.h. -GTEST_DECLARE_bool_(death_test_use_fork); - -namespace internal { - -// The value of GetTestTypeId() as seen from within the Google Test -// library. This is solely for testing GetTestTypeId(). -extern const TypeId kTestTypeIdInGoogleTest; - -// Names of the flags (needed for parsing Google Test flags). -const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests"; -const char kBreakOnFailureFlag[] = "break_on_failure"; -const char kCatchExceptionsFlag[] = "catch_exceptions"; -const char kColorFlag[] = "color"; -const char kFilterFlag[] = "filter"; -const char kListTestsFlag[] = "list_tests"; -const char kOutputFlag[] = "output"; -const char kPrintTimeFlag[] = "print_time"; -const char kRepeatFlag[] = "repeat"; -const char kThrowOnFailureFlag[] = "throw_on_failure"; - -// This class saves the values of all Google Test flags in its c'tor, and -// restores them in its d'tor. -class GTestFlagSaver { - public: - // The c'tor. - GTestFlagSaver() { - also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests); - break_on_failure_ = GTEST_FLAG(break_on_failure); - catch_exceptions_ = GTEST_FLAG(catch_exceptions); - color_ = GTEST_FLAG(color); - death_test_style_ = GTEST_FLAG(death_test_style); - death_test_use_fork_ = GTEST_FLAG(death_test_use_fork); - filter_ = GTEST_FLAG(filter); - internal_run_death_test_ = GTEST_FLAG(internal_run_death_test); - list_tests_ = GTEST_FLAG(list_tests); - output_ = GTEST_FLAG(output); - print_time_ = GTEST_FLAG(print_time); - repeat_ = GTEST_FLAG(repeat); - throw_on_failure_ = GTEST_FLAG(throw_on_failure); - } - - // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS. - ~GTestFlagSaver() { - GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_; - GTEST_FLAG(break_on_failure) = break_on_failure_; - GTEST_FLAG(catch_exceptions) = catch_exceptions_; - GTEST_FLAG(color) = color_; - GTEST_FLAG(death_test_style) = death_test_style_; - GTEST_FLAG(death_test_use_fork) = death_test_use_fork_; - GTEST_FLAG(filter) = filter_; - GTEST_FLAG(internal_run_death_test) = internal_run_death_test_; - GTEST_FLAG(list_tests) = list_tests_; - GTEST_FLAG(output) = output_; - GTEST_FLAG(print_time) = print_time_; - GTEST_FLAG(repeat) = repeat_; - GTEST_FLAG(throw_on_failure) = throw_on_failure_; - } - private: - // Fields for saving the original values of flags. - bool also_run_disabled_tests_; - bool break_on_failure_; - bool catch_exceptions_; - String color_; - String death_test_style_; - bool death_test_use_fork_; - String filter_; - String internal_run_death_test_; - bool list_tests_; - String output_; - bool print_time_; - bool pretty_; - internal::Int32 repeat_; - bool throw_on_failure_; -} GTEST_ATTRIBUTE_UNUSED_; - -// Converts a Unicode code point to a narrow string in UTF-8 encoding. -// code_point parameter is of type UInt32 because wchar_t may not be -// wide enough to contain a code point. -// The output buffer str must containt at least 32 characters. -// The function returns the address of the output buffer. -// If the code_point is not a valid Unicode code point -// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. -char* CodePointToUtf8(UInt32 code_point, char* str); - -// Converts a wide string to a narrow string in UTF-8 encoding. -// The wide string is assumed to have the following encoding: -// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) -// UTF-32 if sizeof(wchar_t) == 4 (on Linux) -// Parameter str points to a null-terminated wide string. -// Parameter num_chars may additionally limit the number -// of wchar_t characters processed. -1 is used when the entire string -// should be processed. -// If the string contains code points that are not valid Unicode code points -// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding -// and contains invalid UTF-16 surrogate pairs, values in those pairs -// will be encoded as individual Unicode characters from Basic Normal Plane. -String WideStringToUtf8(const wchar_t* str, int num_chars); - -// Returns the number of active threads, or 0 when there is an error. -size_t GetThreadCount(); - -// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file -// if the variable is present. If a file already exists at this location, this -// function will write over it. If the variable is present, but the file cannot -// be created, prints an error and exits. -void WriteToShardStatusFileIfNeeded(); - -// Checks whether sharding is enabled by examining the relevant -// environment variable values. If the variables are present, -// but inconsistent (e.g., shard_index >= total_shards), prints -// an error and exits. If in_subprocess_for_death_test, sharding is -// disabled because it must only be applied to the original test -// process. Otherwise, we could filter out death tests we intended to execute. -bool ShouldShard(const char* total_shards_str, const char* shard_index_str, - bool in_subprocess_for_death_test); - -// Parses the environment variable var as an Int32. If it is unset, -// returns default_val. If it is not an Int32, prints an error and -// and aborts. -Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val); - -// Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is -// some arbitrary but unique non-negative integer assigned to each test -// method. Assumes that 0 <= shard_index < total_shards. -bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id); - -// List is a simple singly-linked list container. -// -// We cannot use std::list as Microsoft's implementation of STL has -// problems when exception is disabled. There is a hack to work -// around this, but we've seen cases where the hack fails to work. -// -// TODO(wan): switch to std::list when we have a reliable fix for the -// STL problem, e.g. when we upgrade to the next version of Visual -// C++, or (more likely) switch to STLport. -// -// The element type must support copy constructor. - -// Forward declare List -template // E is the element type. -class List; - -// ListNode is a node in a singly-linked list. It consists of an -// element and a pointer to the next node. The last node in the list -// has a NULL value for its next pointer. -template // E is the element type. -class ListNode { - friend class List; - - private: - - E element_; - ListNode * next_; - - // The c'tor is private s.t. only in the ListNode class and in its - // friend class List we can create a ListNode object. - // - // Creates a node with a given element value. The next pointer is - // set to NULL. - // - // ListNode does NOT have a default constructor. Always use this - // constructor (with parameter) to create a ListNode object. - explicit ListNode(const E & element) : element_(element), next_(NULL) {} - - // We disallow copying ListNode - GTEST_DISALLOW_COPY_AND_ASSIGN_(ListNode); - - public: - - // Gets the element in this node. - E & element() { return element_; } - const E & element() const { return element_; } - - // Gets the next node in the list. - ListNode * next() { return next_; } - const ListNode * next() const { return next_; } -}; - - -// List is a simple singly-linked list container. -template // E is the element type. -class List { - public: - - // Creates an empty list. - List() : head_(NULL), last_(NULL), size_(0) {} - - // D'tor. - virtual ~List(); - - // Clears the list. - void Clear() { - if ( size_ > 0 ) { - // 1. Deletes every node. - ListNode * node = head_; - ListNode * next = node->next(); - for ( ; ; ) { - delete node; - node = next; - if ( node == NULL ) break; - next = node->next(); - } - - // 2. Resets the member variables. - head_ = last_ = NULL; - size_ = 0; - } - } - - // Gets the number of elements. - int size() const { return size_; } - - // Returns true if the list is empty. - bool IsEmpty() const { return size() == 0; } - - // Gets the first element of the list, or NULL if the list is empty. - ListNode * Head() { return head_; } - const ListNode * Head() const { return head_; } - - // Gets the last element of the list, or NULL if the list is empty. - ListNode * Last() { return last_; } - const ListNode * Last() const { return last_; } - - // Adds an element to the end of the list. A copy of the element is - // created using the copy constructor, and then stored in the list. - // Changes made to the element in the list doesn't affect the source - // object, and vice versa. - void PushBack(const E & element) { - ListNode * new_node = new ListNode(element); - - if ( size_ == 0 ) { - head_ = last_ = new_node; - size_ = 1; - } else { - last_->next_ = new_node; - last_ = new_node; - size_++; - } - } - - // Adds an element to the beginning of this list. - void PushFront(const E& element) { - ListNode* const new_node = new ListNode(element); - - if ( size_ == 0 ) { - head_ = last_ = new_node; - size_ = 1; - } else { - new_node->next_ = head_; - head_ = new_node; - size_++; - } - } - - // Removes an element from the beginning of this list. If the - // result argument is not NULL, the removed element is stored in the - // memory it points to. Otherwise the element is thrown away. - // Returns true iff the list wasn't empty before the operation. - bool PopFront(E* result) { - if (size_ == 0) return false; - - if (result != NULL) { - *result = head_->element_; - } - - ListNode* const old_head = head_; - size_--; - if (size_ == 0) { - head_ = last_ = NULL; - } else { - head_ = head_->next_; - } - delete old_head; - - return true; - } - - // Inserts an element after a given node in the list. It's the - // caller's responsibility to ensure that the given node is in the - // list. If the given node is NULL, inserts the element at the - // front of the list. - ListNode* InsertAfter(ListNode* node, const E& element) { - if (node == NULL) { - PushFront(element); - return Head(); - } - - ListNode* const new_node = new ListNode(element); - new_node->next_ = node->next_; - node->next_ = new_node; - size_++; - if (node == last_) { - last_ = new_node; - } - - return new_node; - } - - // Returns the number of elements that satisfy a given predicate. - // The parameter 'predicate' is a Boolean function or functor that - // accepts a 'const E &', where E is the element type. - template // P is the type of the predicate function/functor - int CountIf(P predicate) const { - int count = 0; - for ( const ListNode * node = Head(); - node != NULL; - node = node->next() ) { - if ( predicate(node->element()) ) { - count++; - } - } - - return count; - } - - // Applies a function/functor to each element in the list. The - // parameter 'functor' is a function/functor that accepts a 'const - // E &', where E is the element type. This method does not change - // the elements. - template // F is the type of the function/functor - void ForEach(F functor) const { - for ( const ListNode * node = Head(); - node != NULL; - node = node->next() ) { - functor(node->element()); - } - } - - // Returns the first node whose element satisfies a given predicate, - // or NULL if none is found. The parameter 'predicate' is a - // function/functor that accepts a 'const E &', where E is the - // element type. This method does not change the elements. - template // P is the type of the predicate function/functor. - const ListNode * FindIf(P predicate) const { - for ( const ListNode * node = Head(); - node != NULL; - node = node->next() ) { - if ( predicate(node->element()) ) { - return node; - } - } - - return NULL; - } - - template - ListNode * FindIf(P predicate) { - for ( ListNode * node = Head(); - node != NULL; - node = node->next() ) { - if ( predicate(node->element() ) ) { - return node; - } - } - - return NULL; - } - - private: - ListNode* head_; // The first node of the list. - ListNode* last_; // The last node of the list. - int size_; // The number of elements in the list. - - // We disallow copying List. - GTEST_DISALLOW_COPY_AND_ASSIGN_(List); -}; - -// The virtual destructor of List. -template -List::~List() { - Clear(); -} - -// A function for deleting an object. Handy for being used as a -// functor. -template -static void Delete(T * x) { - delete x; -} - -// A copyable object representing a user specified test property which can be -// output as a key/value string pair. -// -// Don't inherit from TestProperty as its destructor is not virtual. -class TestProperty { - public: - // C'tor. TestProperty does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestProperty object. - TestProperty(const char* key, const char* value) : - key_(key), value_(value) { - } - - // Gets the user supplied key. - const char* key() const { - return key_.c_str(); - } - - // Gets the user supplied value. - const char* value() const { - return value_.c_str(); - } - - // Sets a new value, overriding the one supplied in the constructor. - void SetValue(const char* new_value) { - value_ = new_value; - } - - private: - // The key supplied by the user. - String key_; - // The value supplied by the user. - String value_; -}; - -// A predicate that checks the key of a TestProperty against a known key. -// -// TestPropertyKeyIs is copyable. -class TestPropertyKeyIs { - public: - // Constructor. - // - // TestPropertyKeyIs has NO default constructor. - explicit TestPropertyKeyIs(const char* key) - : key_(key) {} - - // Returns true iff the test name of test property matches on key_. - bool operator()(const TestProperty& test_property) const { - return String(test_property.key()).Compare(key_) == 0; - } - - private: - String key_; -}; - -// The result of a single Test. This includes a list of -// TestPartResults, a list of TestProperties, a count of how many -// death tests there are in the Test, and how much time it took to run -// the Test. -// -// TestResult is not copyable. -class TestResult { - public: - // Creates an empty TestResult. - TestResult(); - - // D'tor. Do not inherit from TestResult. - ~TestResult(); - - // Gets the list of TestPartResults. - const internal::List & test_part_results() const { - return test_part_results_; - } - - // Gets the list of TestProperties. - const internal::List & test_properties() const { - return test_properties_; - } - - // Gets the number of successful test parts. - int successful_part_count() const; - - // Gets the number of failed test parts. - int failed_part_count() const; - - // Gets the number of all test parts. This is the sum of the number - // of successful test parts and the number of failed test parts. - int total_part_count() const; - - // Returns true iff the test passed (i.e. no test part failed). - bool Passed() const { return !Failed(); } - - // Returns true iff the test failed. - bool Failed() const { return failed_part_count() > 0; } - - // Returns true iff the test fatally failed. - bool HasFatalFailure() const; - - // Returns true iff the test has a non-fatal failure. - bool HasNonfatalFailure() const; - - // Returns the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Sets the elapsed time. - void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; } - - // Adds a test part result to the list. - void AddTestPartResult(const TestPartResult& test_part_result); - - // Adds a test property to the list. The property is validated and may add - // a non-fatal failure if invalid (e.g., if it conflicts with reserved - // key names). If a property is already recorded for the same key, the - // value will be updated, rather than storing multiple values for the same - // key. - void RecordProperty(const internal::TestProperty& test_property); - - // Adds a failure if the key is a reserved attribute of Google Test - // testcase tags. Returns true if the property is valid. - // TODO(russr): Validate attribute names are legal and human readable. - static bool ValidateTestProperty(const internal::TestProperty& test_property); - - // Returns the death test count. - int death_test_count() const { return death_test_count_; } - - // Increments the death test count, returning the new count. - int increment_death_test_count() { return ++death_test_count_; } - - // Clears the test part results. - void ClearTestPartResults() { test_part_results_.Clear(); } - - // Clears the object. - void Clear(); - private: - // Protects mutable state of the property list and of owned properties, whose - // values may be updated. - internal::Mutex test_properites_mutex_; - - // The list of TestPartResults - internal::List test_part_results_; - // The list of TestProperties - internal::List test_properties_; - // Running count of death tests. - int death_test_count_; - // The elapsed time, in milliseconds. - TimeInMillis elapsed_time_; - - // We disallow copying TestResult. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult); -}; // class TestResult - -class TestInfoImpl { - public: - TestInfoImpl(TestInfo* parent, const char* test_case_name, - const char* name, const char* test_case_comment, - const char* comment, TypeId fixture_class_id, - internal::TestFactoryBase* factory); - ~TestInfoImpl(); - - // Returns true if this test should run. - bool should_run() const { return should_run_; } - - // Sets the should_run member. - void set_should_run(bool should) { should_run_ = should; } - - // Returns true if this test is disabled. Disabled tests are not run. - bool is_disabled() const { return is_disabled_; } - - // Sets the is_disabled member. - void set_is_disabled(bool is) { is_disabled_ = is; } - - // Returns true if this test matches the filter specified by the user. - bool matches_filter() const { return matches_filter_; } - - // Sets the matches_filter member. - void set_matches_filter(bool matches) { matches_filter_ = matches; } - - // Returns the test case name. - const char* test_case_name() const { return test_case_name_.c_str(); } - - // Returns the test name. - const char* name() const { return name_.c_str(); } - - // Returns the test case comment. - const char* test_case_comment() const { return test_case_comment_.c_str(); } - - // Returns the test comment. - const char* comment() const { return comment_.c_str(); } - - // Returns the ID of the test fixture class. - TypeId fixture_class_id() const { return fixture_class_id_; } - - // Returns the test result. - internal::TestResult* result() { return &result_; } - const internal::TestResult* result() const { return &result_; } - - // Creates the test object, runs it, records its result, and then - // deletes it. - void Run(); - - // Calls the given TestInfo object's Run() method. - static void RunTest(TestInfo * test_info) { - test_info->impl()->Run(); - } - - // Clears the test result. - void ClearResult() { result_.Clear(); } - - // Clears the test result in the given TestInfo object. - static void ClearTestResult(TestInfo * test_info) { - test_info->impl()->ClearResult(); - } - - private: - // These fields are immutable properties of the test. - TestInfo* const parent_; // The owner of this object - const String test_case_name_; // Test case name - const String name_; // Test name - const String test_case_comment_; // Test case comment - const String comment_; // Test comment - const TypeId fixture_class_id_; // ID of the test fixture class - bool should_run_; // True iff this test should run - bool is_disabled_; // True iff this test is disabled - bool matches_filter_; // True if this test matches the - // user-specified filter. - internal::TestFactoryBase* const factory_; // The factory that creates - // the test object - - // This field is mutable and needs to be reset before running the - // test for the second time. - internal::TestResult result_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfoImpl); -}; - -} // namespace internal - -// A test case, which consists of a list of TestInfos. -// -// TestCase is not copyable. -class TestCase { - public: - // Creates a TestCase with the given name. - // - // TestCase does NOT have a default constructor. Always use this - // constructor to create a TestCase object. - // - // Arguments: - // - // name: name of the test case - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - TestCase(const char* name, const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc); - - // Destructor of TestCase. - virtual ~TestCase(); - - // Gets the name of the TestCase. - const char* name() const { return name_.c_str(); } - - // Returns the test case comment. - const char* comment() const { return comment_.c_str(); } - - // Returns true if any test in this test case should run. - bool should_run() const { return should_run_; } - - // Sets the should_run member. - void set_should_run(bool should) { should_run_ = should; } - - // Gets the (mutable) list of TestInfos in this TestCase. - internal::List& test_info_list() { return *test_info_list_; } - - // Gets the (immutable) list of TestInfos in this TestCase. - const internal::List & test_info_list() const { - return *test_info_list_; - } - - // Gets the number of successful tests in this test case. - int successful_test_count() const; - - // Gets the number of failed tests in this test case. - int failed_test_count() const; - - // Gets the number of disabled tests in this test case. - int disabled_test_count() const; - - // Get the number of tests in this test case that should run. - int test_to_run_count() const; - - // Gets the number of all tests in this test case. - int total_test_count() const; - - // Returns true iff the test case passed. - bool Passed() const { return !Failed(); } - - // Returns true iff the test case failed. - bool Failed() const { return failed_test_count() > 0; } - - // Returns the elapsed time, in milliseconds. - internal::TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Adds a TestInfo to this test case. Will delete the TestInfo upon - // destruction of the TestCase object. - void AddTestInfo(TestInfo * test_info); - - // Finds and returns a TestInfo with the given name. If one doesn't - // exist, returns NULL. - TestInfo* GetTestInfo(const char* test_name); - - // Clears the results of all tests in this test case. - void ClearResult(); - - // Clears the results of all tests in the given test case. - static void ClearTestCaseResult(TestCase* test_case) { - test_case->ClearResult(); - } - - // Runs every test in this TestCase. - void Run(); - - // Runs every test in the given TestCase. - static void RunTestCase(TestCase * test_case) { test_case->Run(); } - - // Returns true iff test passed. - static bool TestPassed(const TestInfo * test_info) { - const internal::TestInfoImpl* const impl = test_info->impl(); - return impl->should_run() && impl->result()->Passed(); - } - - // Returns true iff test failed. - static bool TestFailed(const TestInfo * test_info) { - const internal::TestInfoImpl* const impl = test_info->impl(); - return impl->should_run() && impl->result()->Failed(); - } - - // Returns true iff test is disabled. - static bool TestDisabled(const TestInfo * test_info) { - return test_info->impl()->is_disabled(); - } - - // Returns true if the given test should run. - static bool ShouldRunTest(const TestInfo *test_info) { - return test_info->impl()->should_run(); - } - - private: - // Name of the test case. - internal::String name_; - // Comment on the test case. - internal::String comment_; - // List of TestInfos. - internal::List* test_info_list_; - // Pointer to the function that sets up the test case. - Test::SetUpTestCaseFunc set_up_tc_; - // Pointer to the function that tears down the test case. - Test::TearDownTestCaseFunc tear_down_tc_; - // True iff any test in this test case should run. - bool should_run_; - // Elapsed time, in milliseconds. - internal::TimeInMillis elapsed_time_; - - // We disallow copying TestCases. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase); -}; - -namespace internal { - -// Class UnitTestOptions. -// -// This class contains functions for processing options the user -// specifies when running the tests. It has only static members. -// -// In most cases, the user can specify an option using either an -// environment variable or a command line flag. E.g. you can set the -// test filter using either GTEST_FILTER or --gtest_filter. If both -// the variable and the flag are present, the latter overrides the -// former. -class UnitTestOptions { - public: - // Functions for processing the gtest_output flag. - - // Returns the output format, or "" for normal printed output. - static String GetOutputFormat(); - - // Returns the absolute path of the requested output file, or the - // default (test_detail.xml in the original working directory) if - // none was explicitly specified. - static String GetAbsolutePathToOutputFile(); - - // Functions for processing the gtest_filter flag. - - // Returns true iff the wildcard pattern matches the string. The - // first ':' or '\0' character in pattern marks the end of it. - // - // This recursive algorithm isn't very efficient, but is clear and - // works well enough for matching test names, which are short. - static bool PatternMatchesString(const char *pattern, const char *str); - - // Returns true iff the user-specified filter matches the test case - // name and the test name. - static bool FilterMatchesTest(const String &test_case_name, - const String &test_name); - -#if GTEST_OS_WINDOWS - // Function for supporting the gtest_catch_exception flag. - - // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the - // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. - // This function is useful as an __except condition. - static int GTestShouldProcessSEH(DWORD exception_code); -#endif // GTEST_OS_WINDOWS - - // Returns true if "name" matches the ':' separated list of glob-style - // filters in "filter". - static bool MatchesFilter(const String& name, const char* filter); -}; - -// Returns the current application's name, removing directory path if that -// is present. Used by UnitTestOptions::GetOutputFile. -FilePath GetCurrentExecutableName(); - -// The role interface for getting the OS stack trace as a string. -class OsStackTraceGetterInterface { - public: - OsStackTraceGetterInterface() {} - virtual ~OsStackTraceGetterInterface() {} - - // Returns the current OS stack trace as a String. Parameters: - // - // max_depth - the maximum number of stack frames to be included - // in the trace. - // skip_count - the number of top frames to be skipped; doesn't count - // against max_depth. - virtual String CurrentStackTrace(int max_depth, int skip_count) = 0; - - // UponLeavingGTest() should be called immediately before Google Test calls - // user code. It saves some information about the current stack that - // CurrentStackTrace() will use to find and hide Google Test stack frames. - virtual void UponLeavingGTest() = 0; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface); -}; - -// A working implementation of the OsStackTraceGetterInterface interface. -class OsStackTraceGetter : public OsStackTraceGetterInterface { - public: - OsStackTraceGetter() {} - virtual String CurrentStackTrace(int max_depth, int skip_count); - virtual void UponLeavingGTest(); - - // This string is inserted in place of stack frames that are part of - // Google Test's implementation. - static const char* const kElidedFramesMarker; - - private: - Mutex mutex_; // protects all internal state - - // We save the stack frame below the frame that calls user code. - // We do this because the address of the frame immediately below - // the user code changes between the call to UponLeavingGTest() - // and any calls to CurrentStackTrace() from within the user code. - void* caller_frame_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter); -}; - -// Information about a Google Test trace point. -struct TraceInfo { - const char* file; - int line; - String message; -}; - -// This is the default global test part result reporter used in UnitTestImpl. -// This class should only be used by UnitTestImpl. -class DefaultGlobalTestPartResultReporter - : public TestPartResultReporterInterface { - public: - explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. Reports the test part - // result in the current test. - virtual void ReportTestPartResult(const TestPartResult& result); - - private: - UnitTestImpl* const unit_test_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter); -}; - -// This is the default per thread test part result reporter used in -// UnitTestImpl. This class should only be used by UnitTestImpl. -class DefaultPerThreadTestPartResultReporter - : public TestPartResultReporterInterface { - public: - explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. The implementation just - // delegates to the current global test part result reporter of *unit_test_. - virtual void ReportTestPartResult(const TestPartResult& result); - - private: - UnitTestImpl* const unit_test_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter); -}; - -// The private implementation of the UnitTest class. We don't protect -// the methods under a mutex, as this class is not accessible by a -// user and the UnitTest class that delegates work to this class does -// proper locking. -class UnitTestImpl { - public: - explicit UnitTestImpl(UnitTest* parent); - virtual ~UnitTestImpl(); - - // There are two different ways to register your own TestPartResultReporter. - // You can register your own repoter to listen either only for test results - // from the current thread or for results from all threads. - // By default, each per-thread test result repoter just passes a new - // TestPartResult to the global test result reporter, which registers the - // test part result for the currently running test. - - // Returns the global test part result reporter. - TestPartResultReporterInterface* GetGlobalTestPartResultReporter(); - - // Sets the global test part result reporter. - void SetGlobalTestPartResultReporter( - TestPartResultReporterInterface* reporter); - - // Returns the test part result reporter for the current thread. - TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread(); - - // Sets the test part result reporter for the current thread. - void SetTestPartResultReporterForCurrentThread( - TestPartResultReporterInterface* reporter); - - // Gets the number of successful test cases. - int successful_test_case_count() const; - - // Gets the number of failed test cases. - int failed_test_case_count() const; - - // Gets the number of all test cases. - int total_test_case_count() const; - - // Gets the number of all test cases that contain at least one test - // that should run. - int test_case_to_run_count() const; - - // Gets the number of successful tests. - int successful_test_count() const; - - // Gets the number of failed tests. - int failed_test_count() const; - - // Gets the number of disabled tests. - int disabled_test_count() const; - - // Gets the number of all tests. - int total_test_count() const; - - // Gets the number of tests that should run. - int test_to_run_count() const; - - // Gets the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns true iff the unit test passed (i.e. all test cases passed). - bool Passed() const { return !Failed(); } - - // Returns true iff the unit test failed (i.e. some test case failed - // or something outside of all tests failed). - bool Failed() const { - return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); - } - - // Returns the TestResult for the test that's currently running, or - // the TestResult for the ad hoc test if no test is running. - internal::TestResult* current_test_result(); - - // Returns the TestResult for the ad hoc test. - const internal::TestResult* ad_hoc_test_result() const { - return &ad_hoc_test_result_; - } - - // Sets the unit test result printer. - // - // Does nothing if the input and the current printer object are the - // same; otherwise, deletes the old printer object and makes the - // input the current printer. - void set_result_printer(UnitTestEventListenerInterface * result_printer); - - // Returns the current unit test result printer if it is not NULL; - // otherwise, creates an appropriate result printer, makes it the - // current printer, and returns it. - UnitTestEventListenerInterface* result_printer(); - - // Sets the OS stack trace getter. - // - // Does nothing if the input and the current OS stack trace getter - // are the same; otherwise, deletes the old getter and makes the - // input the current getter. - void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter); - - // Returns the current OS stack trace getter if it is not NULL; - // otherwise, creates an OsStackTraceGetter, makes it the current - // getter, and returns it. - OsStackTraceGetterInterface* os_stack_trace_getter(); - - // Returns the current OS stack trace as a String. - // - // The maximum number of stack frames to be included is specified by - // the gtest_stack_trace_depth flag. The skip_count parameter - // specifies the number of top frames to be skipped, which doesn't - // count against the number of frames to be included. - // - // For example, if Foo() calls Bar(), which in turn calls - // CurrentOsStackTraceExceptTop(1), Foo() will be included in the - // trace but Bar() and CurrentOsStackTraceExceptTop() won't. - String CurrentOsStackTraceExceptTop(int skip_count); - - // Finds and returns a TestCase with the given name. If one doesn't - // exist, creates one and returns it. - // - // Arguments: - // - // test_case_name: name of the test case - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - TestCase* GetTestCase(const char* test_case_name, - const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc); - - // Adds a TestInfo to the unit test. - // - // Arguments: - // - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - // test_info: the TestInfo object - void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc, - TestInfo * test_info) { - // In order to support thread-safe death tests, we need to - // remember the original working directory when the test program - // was first invoked. We cannot do this in RUN_ALL_TESTS(), as - // the user may have changed the current directory before calling - // RUN_ALL_TESTS(). Therefore we capture the current directory in - // AddTestInfo(), which is called to register a TEST or TEST_F - // before main() is reached. - if (original_working_dir_.IsEmpty()) { - original_working_dir_.Set(FilePath::GetCurrentDir()); - if (original_working_dir_.IsEmpty()) { - printf("%s\n", "Failed to get the current working directory."); - abort(); - } - } - - GetTestCase(test_info->test_case_name(), - test_info->test_case_comment(), - set_up_tc, - tear_down_tc)->AddTestInfo(test_info); - } - -#if GTEST_HAS_PARAM_TEST - // Returns ParameterizedTestCaseRegistry object used to keep track of - // value-parameterized tests and instantiate and register them. - internal::ParameterizedTestCaseRegistry& parameterized_test_registry() { - return parameterized_test_registry_; - } -#endif // GTEST_HAS_PARAM_TEST - - // Sets the TestCase object for the test that's currently running. - void set_current_test_case(TestCase* current_test_case) { - current_test_case_ = current_test_case; - } - - // Sets the TestInfo object for the test that's currently running. If - // current_test_info is NULL, the assertion results will be stored in - // ad_hoc_test_result_. - void set_current_test_info(TestInfo* current_test_info) { - current_test_info_ = current_test_info; - } - - // Registers all parameterized tests defined using TEST_P and - // INSTANTIATE_TEST_P, creating regular tests for each test/parameter - // combination. This method can be called more then once; it has - // guards protecting from registering the tests more then once. - // If value-parameterized tests are disabled, RegisterParameterizedTests - // is present but does nothing. - void RegisterParameterizedTests(); - - // Runs all tests in this UnitTest object, prints the result, and - // returns 0 if all tests are successful, or 1 otherwise. If any - // exception is thrown during a test on Windows, this test is - // considered to be failed, but the rest of the tests will still be - // run. (We disable exceptions on Linux and Mac OS X, so the issue - // doesn't apply there.) - int RunAllTests(); - - // Clears the results of all tests, including the ad hoc test. - void ClearResult() { - test_cases_.ForEach(TestCase::ClearTestCaseResult); - ad_hoc_test_result_.Clear(); - } - - enum ReactionToSharding { - HONOR_SHARDING_PROTOCOL, - IGNORE_SHARDING_PROTOCOL - }; - - // Matches the full name of each test against the user-specified - // filter to decide whether the test should run, then records the - // result in each TestCase and TestInfo object. - // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests - // based on sharding variables in the environment. - // Returns the number of tests that should run. - int FilterTests(ReactionToSharding shard_tests); - - // Prints the names of the tests matching the user-specified filter flag. - void ListTestsMatchingFilter(); - - const TestCase* current_test_case() const { return current_test_case_; } - TestInfo* current_test_info() { return current_test_info_; } - const TestInfo* current_test_info() const { return current_test_info_; } - - // Returns the list of environments that need to be set-up/torn-down - // before/after the tests are run. - internal::List* environments() { return &environments_; } - internal::List* environments_in_reverse_order() { - return &environments_in_reverse_order_; - } - - internal::List* test_cases() { return &test_cases_; } - const internal::List* test_cases() const { return &test_cases_; } - - // Getters for the per-thread Google Test trace stack. - internal::List* gtest_trace_stack() { - return gtest_trace_stack_.pointer(); - } - const internal::List* gtest_trace_stack() const { - return gtest_trace_stack_.pointer(); - } - -#if GTEST_HAS_DEATH_TEST - // Returns a pointer to the parsed --gtest_internal_run_death_test - // flag, or NULL if that flag was not specified. - // This information is useful only in a death test child process. - const InternalRunDeathTestFlag* internal_run_death_test_flag() const { - return internal_run_death_test_flag_.get(); - } - - // Returns a pointer to the current death test factory. - internal::DeathTestFactory* death_test_factory() { - return death_test_factory_.get(); - } - - friend class ReplaceDeathTestFactory; -#endif // GTEST_HAS_DEATH_TEST - - private: - friend class ::testing::UnitTest; - - // The UnitTest object that owns this implementation object. - UnitTest* const parent_; - - // The working directory when the first TEST() or TEST_F() was - // executed. - internal::FilePath original_working_dir_; - - // The default test part result reporters. - DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_; - DefaultPerThreadTestPartResultReporter - default_per_thread_test_part_result_reporter_; - - // Points to (but doesn't own) the global test part result reporter. - TestPartResultReporterInterface* global_test_part_result_repoter_; - - // Protects read and write access to global_test_part_result_reporter_. - internal::Mutex global_test_part_result_reporter_mutex_; - - // Points to (but doesn't own) the per-thread test part result reporter. - internal::ThreadLocal - per_thread_test_part_result_reporter_; - - // The list of environments that need to be set-up/torn-down - // before/after the tests are run. environments_in_reverse_order_ - // simply mirrors environments_ in reverse order. - internal::List environments_; - internal::List environments_in_reverse_order_; - - internal::List test_cases_; // The list of TestCases. - -#if GTEST_HAS_PARAM_TEST - // ParameterizedTestRegistry object used to register value-parameterized - // tests. - internal::ParameterizedTestCaseRegistry parameterized_test_registry_; - - // Indicates whether RegisterParameterizedTests() has been called already. - bool parameterized_tests_registered_; -#endif // GTEST_HAS_PARAM_TEST - - // Points to the last death test case registered. Initially NULL. - internal::ListNode* last_death_test_case_; - - // This points to the TestCase for the currently running test. It - // changes as Google Test goes through one test case after another. - // When no test is running, this is set to NULL and Google Test - // stores assertion results in ad_hoc_test_result_. Initally NULL. - TestCase* current_test_case_; - - // This points to the TestInfo for the currently running test. It - // changes as Google Test goes through one test after another. When - // no test is running, this is set to NULL and Google Test stores - // assertion results in ad_hoc_test_result_. Initially NULL. - TestInfo* current_test_info_; - - // Normally, a user only writes assertions inside a TEST or TEST_F, - // or inside a function called by a TEST or TEST_F. Since Google - // Test keeps track of which test is current running, it can - // associate such an assertion with the test it belongs to. - // - // If an assertion is encountered when no TEST or TEST_F is running, - // Google Test attributes the assertion result to an imaginary "ad hoc" - // test, and records the result in ad_hoc_test_result_. - internal::TestResult ad_hoc_test_result_; - - // The unit test result printer. Will be deleted when the UnitTest - // object is destructed. By default, a plain text printer is used, - // but the user can set this field to use a custom printer if that - // is desired. - UnitTestEventListenerInterface* result_printer_; - - // The OS stack trace getter. Will be deleted when the UnitTest - // object is destructed. By default, an OsStackTraceGetter is used, - // but the user can set this field to use a custom getter if that is - // desired. - OsStackTraceGetterInterface* os_stack_trace_getter_; - - // How long the test took to run, in milliseconds. - TimeInMillis elapsed_time_; - -#if GTEST_HAS_DEATH_TEST - // The decomposed components of the gtest_internal_run_death_test flag, - // parsed when RUN_ALL_TESTS is called. - internal::scoped_ptr internal_run_death_test_flag_; - internal::scoped_ptr death_test_factory_; -#endif // GTEST_HAS_DEATH_TEST - - // A per-thread stack of traces created by the SCOPED_TRACE() macro. - internal::ThreadLocal > gtest_trace_stack_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl); -}; // class UnitTestImpl - -// Convenience function for accessing the global UnitTest -// implementation object. -inline UnitTestImpl* GetUnitTestImpl() { - return UnitTest::GetInstance()->impl(); -} - -// Clears all test part results of the current test. -inline void ClearCurrentTestPartResults() { - GetUnitTestImpl()->current_test_result()->ClearTestPartResults(); -} - -// Internal helper functions for implementing the simple regular -// expression matcher. -bool IsInSet(char ch, const char* str); -bool IsDigit(char ch); -bool IsPunct(char ch); -bool IsRepeat(char ch); -bool IsWhiteSpace(char ch); -bool IsWordChar(char ch); -bool IsValidEscape(char ch); -bool AtomMatchesChar(bool escaped, char pattern, char ch); -bool ValidateRegex(const char* regex); -bool MatchRegexAtHead(const char* regex, const char* str); -bool MatchRepetitionAndRegexAtHead( - bool escaped, char ch, char repeat, const char* regex, const char* str); -bool MatchRegexAnywhere(const char* regex, const char* str); - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. -void ParseGoogleTestFlagsOnly(int* argc, char** argv); -void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv); - -#if GTEST_HAS_DEATH_TEST - -// Returns the message describing the last system error, regardless of the -// platform. -String GetLastErrnoDescription(); - -#if GTEST_OS_WINDOWS -// Provides leak-safe Windows kernel handle ownership. -class AutoHandle { - public: - AutoHandle() : handle_(INVALID_HANDLE_VALUE) {} - explicit AutoHandle(HANDLE handle) : handle_(handle) {} - - ~AutoHandle() { Reset(); } - - HANDLE Get() const { return handle_; } - void Reset() { Reset(INVALID_HANDLE_VALUE); } - void Reset(HANDLE handle) { - if (handle != handle_) { - if (handle_ != INVALID_HANDLE_VALUE) - ::CloseHandle(handle_); - handle_ = handle; - } - } - - private: - HANDLE handle_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle); -}; -#endif // GTEST_OS_WINDOWS - -// Attempts to parse a string into a positive integer pointed to by the -// number parameter. Returns true if that is possible. -// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use -// it here. -template -bool ParseNaturalNumber(const ::std::string& str, Integer* number) { - // Fail fast if the given string does not begin with a digit; - // this bypasses strtoXXX's "optional leading whitespace and plus - // or minus sign" semantics, which are undesirable here. - if (str.empty() || !isdigit(str[0])) { - return false; - } - errno = 0; - - char* end; - // BiggestConvertible is the largest integer type that system-provided - // string-to-number conversion routines can return. -#if GTEST_OS_WINDOWS - typedef unsigned __int64 BiggestConvertible; - const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10); -#else - typedef unsigned long long BiggestConvertible; // NOLINT - const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10); -#endif // GTEST_OS_WINDOWS - const bool parse_success = *end == '\0' && errno == 0; - - // TODO(vladl@google.com): Convert this to compile time assertion when it is - // available. - GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); - - const Integer result = static_cast(parsed); - if (parse_success && static_cast(result) == parsed) { - *number = result; - return true; - } - return false; -} -#endif // GTEST_HAS_DEATH_TEST - -} // namespace internal -} // namespace testing - -#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-port.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-port.cc deleted file mode 100644 index 7f6db79f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-port.cc +++ /dev/null @@ -1,672 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include -#include -#include - -#if GTEST_OS_WINDOWS -#include -#include -#else -#include -#endif // GTEST_OS_WINDOWS - -#if GTEST_OS_MAC -#include -#include -#include -#endif // GTEST_OS_MAC - -#ifdef _WIN32_WCE -#include // For TerminateProcess() -#endif // _WIN32_WCE - -#include -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC and C++Builder do not provide a definition of STDERR_FILENO. -const int kStdErrFileno = 2; -#else -const int kStdErrFileno = STDERR_FILENO; -#endif // _MSC_VER - -#if GTEST_OS_MAC - -// Returns the number of threads running in the process, or 0 to indicate that -// we cannot detect it. -size_t GetThreadCount() { - const task_t task = mach_task_self(); - mach_msg_type_number_t thread_count; - thread_act_array_t thread_list; - const kern_return_t status = task_threads(task, &thread_list, &thread_count); - if (status == KERN_SUCCESS) { - // task_threads allocates resources in thread_list and we need to free them - // to avoid leaks. - vm_deallocate(task, - reinterpret_cast(thread_list), - sizeof(thread_t) * thread_count); - return static_cast(thread_count); - } else { - return 0; - } -} - -#else - -size_t GetThreadCount() { - // There's no portable way to detect the number of threads, so we just - // return 0 to indicate that we cannot detect it. - return 0; -} - -#endif // GTEST_OS_MAC - -#if GTEST_USES_POSIX_RE - -// Implements RE. Currently only needed for death tests. - -RE::~RE() { - regfree(&partial_regex_); - regfree(&full_regex_); - free(const_cast(pattern_)); -} - -// Returns true iff regular expression re matches the entire str. -bool RE::FullMatch(const char* str, const RE& re) { - if (!re.is_valid_) return false; - - regmatch_t match; - return regexec(&re.full_regex_, str, 1, &match, 0) == 0; -} - -// Returns true iff regular expression re matches a substring of str -// (including str itself). -bool RE::PartialMatch(const char* str, const RE& re) { - if (!re.is_valid_) return false; - - regmatch_t match; - return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; -} - -// Initializes an RE from its string representation. -void RE::Init(const char* regex) { - pattern_ = posix::StrDup(regex); - - // Reserves enough bytes to hold the regular expression used for a - // full match. - const size_t full_regex_len = strlen(regex) + 10; - char* const full_pattern = new char[full_regex_len]; - - snprintf(full_pattern, full_regex_len, "^(%s)$", regex); - is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0; - // We want to call regcomp(&partial_regex_, ...) even if the - // previous expression returns false. Otherwise partial_regex_ may - // not be properly initialized can may cause trouble when it's - // freed. - // - // Some implementation of POSIX regex (e.g. on at least some - // versions of Cygwin) doesn't accept the empty string as a valid - // regex. We change it to an equivalent form "()" to be safe. - const char* const partial_regex = (*regex == '\0') ? "()" : regex; - is_valid_ = (regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0) - && is_valid_; - EXPECT_TRUE(is_valid_) - << "Regular expression \"" << regex - << "\" is not a valid POSIX Extended regular expression."; - - delete[] full_pattern; -} - -#elif GTEST_USES_SIMPLE_RE - -// Returns true iff ch appears anywhere in str (excluding the -// terminating '\0' character). -bool IsInSet(char ch, const char* str) { - return ch != '\0' && strchr(str, ch) != NULL; -} - -// Returns true iff ch belongs to the given classification. Unlike -// similar functions in , these aren't affected by the -// current locale. -bool IsDigit(char ch) { return '0' <= ch && ch <= '9'; } -bool IsPunct(char ch) { - return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"); -} -bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); } -bool IsWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); } -bool IsWordChar(char ch) { - return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || - ('0' <= ch && ch <= '9') || ch == '_'; -} - -// Returns true iff "\\c" is a supported escape sequence. -bool IsValidEscape(char c) { - return (IsPunct(c) || IsInSet(c, "dDfnrsStvwW")); -} - -// Returns true iff the given atom (specified by escaped and pattern) -// matches ch. The result is undefined if the atom is invalid. -bool AtomMatchesChar(bool escaped, char pattern_char, char ch) { - if (escaped) { // "\\p" where p is pattern_char. - switch (pattern_char) { - case 'd': return IsDigit(ch); - case 'D': return !IsDigit(ch); - case 'f': return ch == '\f'; - case 'n': return ch == '\n'; - case 'r': return ch == '\r'; - case 's': return IsWhiteSpace(ch); - case 'S': return !IsWhiteSpace(ch); - case 't': return ch == '\t'; - case 'v': return ch == '\v'; - case 'w': return IsWordChar(ch); - case 'W': return !IsWordChar(ch); - } - return IsPunct(pattern_char) && pattern_char == ch; - } - - return (pattern_char == '.' && ch != '\n') || pattern_char == ch; -} - -// Helper function used by ValidateRegex() to format error messages. -String FormatRegexSyntaxError(const char* regex, int index) { - return (Message() << "Syntax error at index " << index - << " in simple regular expression \"" << regex << "\": ").GetString(); -} - -// Generates non-fatal failures and returns false if regex is invalid; -// otherwise returns true. -bool ValidateRegex(const char* regex) { - if (regex == NULL) { - // TODO(wan@google.com): fix the source file location in the - // assertion failures to match where the regex is used in user - // code. - ADD_FAILURE() << "NULL is not a valid simple regular expression."; - return false; - } - - bool is_valid = true; - - // True iff ?, *, or + can follow the previous atom. - bool prev_repeatable = false; - for (int i = 0; regex[i]; i++) { - if (regex[i] == '\\') { // An escape sequence - i++; - if (regex[i] == '\0') { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) - << "'\\' cannot appear at the end."; - return false; - } - - if (!IsValidEscape(regex[i])) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) - << "invalid escape sequence \"\\" << regex[i] << "\"."; - is_valid = false; - } - prev_repeatable = true; - } else { // Not an escape sequence. - const char ch = regex[i]; - - if (ch == '^' && i > 0) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'^' can only appear at the beginning."; - is_valid = false; - } else if (ch == '$' && regex[i + 1] != '\0') { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'$' can only appear at the end."; - is_valid = false; - } else if (IsInSet(ch, "()[]{}|")) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'" << ch << "' is unsupported."; - is_valid = false; - } else if (IsRepeat(ch) && !prev_repeatable) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'" << ch << "' can only follow a repeatable token."; - is_valid = false; - } - - prev_repeatable = !IsInSet(ch, "^$?*+"); - } - } - - return is_valid; -} - -// Matches a repeated regex atom followed by a valid simple regular -// expression. The regex atom is defined as c if escaped is false, -// or \c otherwise. repeat is the repetition meta character (?, *, -// or +). The behavior is undefined if str contains too many -// characters to be indexable by size_t, in which case the test will -// probably time out anyway. We are fine with this limitation as -// std::string has it too. -bool MatchRepetitionAndRegexAtHead( - bool escaped, char c, char repeat, const char* regex, - const char* str) { - const size_t min_count = (repeat == '+') ? 1 : 0; - const size_t max_count = (repeat == '?') ? 1 : - static_cast(-1) - 1; - // We cannot call numeric_limits::max() as it conflicts with the - // max() macro on Windows. - - for (size_t i = 0; i <= max_count; ++i) { - // We know that the atom matches each of the first i characters in str. - if (i >= min_count && MatchRegexAtHead(regex, str + i)) { - // We have enough matches at the head, and the tail matches too. - // Since we only care about *whether* the pattern matches str - // (as opposed to *how* it matches), there is no need to find a - // greedy match. - return true; - } - if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i])) - return false; - } - return false; -} - -// Returns true iff regex matches a prefix of str. regex must be a -// valid simple regular expression and not start with "^", or the -// result is undefined. -bool MatchRegexAtHead(const char* regex, const char* str) { - if (*regex == '\0') // An empty regex matches a prefix of anything. - return true; - - // "$" only matches the end of a string. Note that regex being - // valid guarantees that there's nothing after "$" in it. - if (*regex == '$') - return *str == '\0'; - - // Is the first thing in regex an escape sequence? - const bool escaped = *regex == '\\'; - if (escaped) - ++regex; - if (IsRepeat(regex[1])) { - // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so - // here's an indirect recursion. It terminates as the regex gets - // shorter in each recursion. - return MatchRepetitionAndRegexAtHead( - escaped, regex[0], regex[1], regex + 2, str); - } else { - // regex isn't empty, isn't "$", and doesn't start with a - // repetition. We match the first atom of regex with the first - // character of str and recurse. - return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) && - MatchRegexAtHead(regex + 1, str + 1); - } -} - -// Returns true iff regex matches any substring of str. regex must be -// a valid simple regular expression, or the result is undefined. -// -// The algorithm is recursive, but the recursion depth doesn't exceed -// the regex length, so we won't need to worry about running out of -// stack space normally. In rare cases the time complexity can be -// exponential with respect to the regex length + the string length, -// but usually it's must faster (often close to linear). -bool MatchRegexAnywhere(const char* regex, const char* str) { - if (regex == NULL || str == NULL) - return false; - - if (*regex == '^') - return MatchRegexAtHead(regex + 1, str); - - // A successful match can be anywhere in str. - do { - if (MatchRegexAtHead(regex, str)) - return true; - } while (*str++ != '\0'); - return false; -} - -// Implements the RE class. - -RE::~RE() { - free(const_cast(pattern_)); - free(const_cast(full_pattern_)); -} - -// Returns true iff regular expression re matches the entire str. -bool RE::FullMatch(const char* str, const RE& re) { - return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str); -} - -// Returns true iff regular expression re matches a substring of str -// (including str itself). -bool RE::PartialMatch(const char* str, const RE& re) { - return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str); -} - -// Initializes an RE from its string representation. -void RE::Init(const char* regex) { - pattern_ = full_pattern_ = NULL; - if (regex != NULL) { - pattern_ = posix::StrDup(regex); - } - - is_valid_ = ValidateRegex(regex); - if (!is_valid_) { - // No need to calculate the full pattern when the regex is invalid. - return; - } - - const size_t len = strlen(regex); - // Reserves enough bytes to hold the regular expression used for a - // full match: we need space to prepend a '^', append a '$', and - // terminate the string with '\0'. - char* buffer = static_cast(malloc(len + 3)); - full_pattern_ = buffer; - - if (*regex != '^') - *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'. - - // We don't use snprintf or strncpy, as they trigger a warning when - // compiled with VC++ 8.0. - memcpy(buffer, regex, len); - buffer += len; - - if (len == 0 || regex[len - 1] != '$') - *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'. - - *buffer = '\0'; -} - -#endif // GTEST_USES_POSIX_RE - -// Logs a message at the given severity level. -void GTestLog(GTestLogSeverity severity, const char* file, - int line, const char* msg) { - const char* const marker = - severity == GTEST_INFO ? "[ INFO ]" : - severity == GTEST_WARNING ? "[WARNING]" : - severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; - fprintf(stderr, "\n%s %s:%d: %s\n", marker, file, line, msg); - if (severity == GTEST_FATAL) { - fflush(NULL); // abort() is not guaranteed to flush open file streams. - abort(); - } -} - -#if GTEST_HAS_STD_STRING - -// Disable Microsoft deprecation warnings for POSIX functions called from -// this class (creat, dup, dup2, and close) -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4996) -#endif // _MSC_VER - -// Defines the stderr capturer. - -class CapturedStderr { - public: - // The ctor redirects stderr to a temporary file. - CapturedStderr() { - uncaptured_fd_ = dup(kStdErrFileno); - -#if GTEST_OS_WINDOWS - char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT - char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT - - ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); - ::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, temp_file_path); - const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); - filename_ = temp_file_path; -#else - // There's no guarantee that a test has write access to the - // current directory, so we create the temporary file in the /tmp - // directory instead. - char name_template[] = "/tmp/captured_stderr.XXXXXX"; - const int captured_fd = mkstemp(name_template); - filename_ = name_template; -#endif // GTEST_OS_WINDOWS - fflush(NULL); - dup2(captured_fd, kStdErrFileno); - close(captured_fd); - } - - ~CapturedStderr() { - remove(filename_.c_str()); - } - - // Stops redirecting stderr. - void StopCapture() { - // Restores the original stream. - fflush(NULL); - dup2(uncaptured_fd_, kStdErrFileno); - close(uncaptured_fd_); - uncaptured_fd_ = -1; - } - - // Returns the name of the temporary file holding the stderr output. - // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we - // can use it here. - ::std::string filename() const { return filename_; } - - private: - int uncaptured_fd_; - ::std::string filename_; -}; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER - -static CapturedStderr* g_captured_stderr = NULL; - -// Returns the size (in bytes) of a file. -static size_t GetFileSize(FILE * file) { - fseek(file, 0, SEEK_END); - return static_cast(ftell(file)); -} - -// Reads the entire content of a file as a string. -static ::std::string ReadEntireFile(FILE * file) { - const size_t file_size = GetFileSize(file); - char* const buffer = new char[file_size]; - - size_t bytes_last_read = 0; // # of bytes read in the last fread() - size_t bytes_read = 0; // # of bytes read so far - - fseek(file, 0, SEEK_SET); - - // Keeps reading the file until we cannot read further or the - // pre-determined file size is reached. - do { - bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file); - bytes_read += bytes_last_read; - } while (bytes_last_read > 0 && bytes_read < file_size); - - const ::std::string content(buffer, buffer+bytes_read); - delete[] buffer; - - return content; -} - -// Starts capturing stderr. -void CaptureStderr() { - if (g_captured_stderr != NULL) { - GTEST_LOG_(FATAL, "Only one stderr capturer can exist at one time."); - } - g_captured_stderr = new CapturedStderr; -} - -// Stops capturing stderr and returns the captured string. -// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can -// use it here. -::std::string GetCapturedStderr() { - g_captured_stderr->StopCapture(); - - FILE* const file = posix::FOpen(g_captured_stderr->filename().c_str(), "r"); - const ::std::string content = ReadEntireFile(file); - posix::FClose(file); - - delete g_captured_stderr; - g_captured_stderr = NULL; - - return content; -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_DEATH_TEST - -// A copy of all command line arguments. Set by InitGoogleTest(). -::std::vector g_argvs; - -// Returns the command line as a vector of strings. -const ::std::vector& GetArgvs() { return g_argvs; } - -#endif // GTEST_HAS_DEATH_TEST - -#ifdef _WIN32_WCE -namespace posix { -void Abort() { - DebugBreak(); - TerminateProcess(GetCurrentProcess(), 1); -} -} // namespace posix -#endif // _WIN32_WCE - -// Returns the name of the environment variable corresponding to the -// given flag. For example, FlagToEnvVar("foo") will return -// "GTEST_FOO" in the open-source version. -static String FlagToEnvVar(const char* flag) { - const String full_flag = - (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); - - Message env_var; - for (int i = 0; i != full_flag.GetLength(); i++) { - env_var << static_cast(toupper(full_flag.c_str()[i])); - } - - return env_var.GetString(); -} - -// Parses 'str' for a 32-bit signed integer. If successful, writes -// the result to *value and returns true; otherwise leaves *value -// unchanged and returns false. -bool ParseInt32(const Message& src_text, const char* str, Int32* value) { - // Parses the environment variable as a decimal integer. - char* end = NULL; - const long long_value = strtol(str, &end, 10); // NOLINT - - // Has strtol() consumed all characters in the string? - if (*end != '\0') { - // No - an invalid character was encountered. - Message msg; - msg << "WARNING: " << src_text - << " is expected to be a 32-bit integer, but actually" - << " has value \"" << str << "\".\n"; - printf("%s", msg.GetString().c_str()); - fflush(stdout); - return false; - } - - // Is the parsed value in the range of an Int32? - const Int32 result = static_cast(long_value); - if (long_value == LONG_MAX || long_value == LONG_MIN || - // The parsed value overflows as a long. (strtol() returns - // LONG_MAX or LONG_MIN when the input overflows.) - result != long_value - // The parsed value overflows as an Int32. - ) { - Message msg; - msg << "WARNING: " << src_text - << " is expected to be a 32-bit integer, but actually" - << " has value " << str << ", which overflows.\n"; - printf("%s", msg.GetString().c_str()); - fflush(stdout); - return false; - } - - *value = result; - return true; -} - -// Reads and returns the Boolean environment variable corresponding to -// the given flag; if it's not set, returns default_value. -// -// The value is considered true iff it's not "0". -bool BoolFromGTestEnv(const char* flag, bool default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const string_value = posix::GetEnv(env_var.c_str()); - return string_value == NULL ? - default_value : strcmp(string_value, "0") != 0; -} - -// Reads and returns a 32-bit integer stored in the environment -// variable corresponding to the given flag; if it isn't set or -// doesn't represent a valid 32-bit integer, returns default_value. -Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const string_value = posix::GetEnv(env_var.c_str()); - if (string_value == NULL) { - // The environment variable is not set. - return default_value; - } - - Int32 result = default_value; - if (!ParseInt32(Message() << "Environment variable " << env_var, - string_value, &result)) { - printf("The default value %s is used.\n", - (Message() << default_value).GetString().c_str()); - fflush(stdout); - return default_value; - } - - return result; -} - -// Reads and returns the string environment variable corresponding to -// the given flag; if it's not set, returns default_value. -const char* StringFromGTestEnv(const char* flag, const char* default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const value = posix::GetEnv(env_var.c_str()); - return value == NULL ? default_value : value; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-test-part.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-test-part.cc deleted file mode 100644 index 9aacd2be..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-test-part.cc +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// The Google C++ Testing Framework (Google Test) - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -// Gets the summary of the failure message by omitting the stack trace -// in it. -internal::String TestPartResult::ExtractSummary(const char* message) { - const char* const stack_trace = strstr(message, internal::kStackTraceMarker); - return stack_trace == NULL ? internal::String(message) : - internal::String(message, stack_trace - message); -} - -// Prints a TestPartResult object. -std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { - return os << result.file_name() << ":" - << result.line_number() << ": " - << (result.type() == TPRT_SUCCESS ? "Success" : - result.type() == TPRT_FATAL_FAILURE ? "Fatal failure" : - "Non-fatal failure") << ":\n" - << result.message() << std::endl; -} - -// Constructs an empty TestPartResultArray. -TestPartResultArray::TestPartResultArray() - : list_(new internal::List) { -} - -// Destructs a TestPartResultArray. -TestPartResultArray::~TestPartResultArray() { - delete list_; -} - -// Appends a TestPartResult to the array. -void TestPartResultArray::Append(const TestPartResult& result) { - list_->PushBack(result); -} - -// Returns the TestPartResult at the given index (0-based). -const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { - if (index < 0 || index >= size()) { - printf("\nInvalid index (%d) into TestPartResultArray.\n", index); - internal::posix::Abort(); - } - - const internal::ListNode* p = list_->Head(); - for (int i = 0; i < index; i++) { - p = p->next(); - } - - return p->element(); -} - -// Returns the number of TestPartResult objects in the array. -int TestPartResultArray::size() const { - return list_->size(); -} - -namespace internal { - -HasNewFatalFailureHelper::HasNewFatalFailureHelper() - : has_new_fatal_failure_(false), - original_reporter_(UnitTest::GetInstance()->impl()-> - GetTestPartResultReporterForCurrentThread()) { - UnitTest::GetInstance()->impl()->SetTestPartResultReporterForCurrentThread( - this); -} - -HasNewFatalFailureHelper::~HasNewFatalFailureHelper() { - UnitTest::GetInstance()->impl()->SetTestPartResultReporterForCurrentThread( - original_reporter_); -} - -void HasNewFatalFailureHelper::ReportTestPartResult( - const TestPartResult& result) { - if (result.fatally_failed()) - has_new_fatal_failure_ = true; - original_reporter_->ReportTestPartResult(result); -} - -} // namespace internal - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-typed-test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-typed-test.cc deleted file mode 100644 index e45e2abb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest-typed-test.cc +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -namespace testing { -namespace internal { - -#if GTEST_HAS_TYPED_TEST_P - -// Verifies that registered_tests match the test names in -// defined_test_names_; returns registered_tests if successful, or -// aborts the program otherwise. -const char* TypedTestCasePState::VerifyRegisteredTestNames( - const char* file, int line, const char* registered_tests) { - typedef ::std::set::const_iterator DefinedTestIter; - registered_ = true; - - Message errors; - ::std::set tests; - for (const char* names = registered_tests; names != NULL; - names = SkipComma(names)) { - const String name = GetPrefixUntilComma(names); - if (tests.count(name) != 0) { - errors << "Test " << name << " is listed more than once.\n"; - continue; - } - - bool found = false; - for (DefinedTestIter it = defined_test_names_.begin(); - it != defined_test_names_.end(); - ++it) { - if (name == *it) { - found = true; - break; - } - } - - if (found) { - tests.insert(name); - } else { - errors << "No test named " << name - << " can be found in this test case.\n"; - } - } - - for (DefinedTestIter it = defined_test_names_.begin(); - it != defined_test_names_.end(); - ++it) { - if (tests.count(*it) == 0) { - errors << "You forgot to list test " << *it << ".\n"; - } - } - - const String& errors_str = errors.GetString(); - if (errors_str != "") { - fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), - errors_str.c_str()); - fflush(stderr); - abort(); - } - - return registered_tests; -} - -#endif // GTEST_HAS_TYPED_TEST_P - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest.cc deleted file mode 100644 index c093bce9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest.cc +++ /dev/null @@ -1,4322 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if GTEST_OS_LINUX - -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -#define GTEST_HAS_GETTIMEOFDAY_ 1 - -#include -#include -#include -// Declares vsnprintf(). This header is not available on Windows. -#include -#include -#include -#include -#include -#include - -#elif GTEST_OS_SYMBIAN -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT - -#elif GTEST_OS_ZOS -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT - -// On z/OS we additionally need strings.h for strcasecmp. -#include // NOLINT - -#elif defined(_WIN32_WCE) // We are on Windows CE. - -#include // NOLINT - -#elif GTEST_OS_WINDOWS // We are on Windows proper. - -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT - -#if defined(__MINGW__) || defined(__MINGW32__) -// MinGW has gettimeofday() but not _ftime64(). -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -// TODO(kenton@google.com): There are other ways to get the time on -// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW -// supports these. consider using them instead. -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT -#endif // defined(__MINGW__) || defined(__MINGW32__) - -// cpplint thinks that the header is already included, so we want to -// silence it. -#include // NOLINT - -#else - -// Assume other platforms have gettimeofday(). -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -#define GTEST_HAS_GETTIMEOFDAY_ 1 - -// cpplint thinks that the header is already included, so we want to -// silence it. -#include // NOLINT -#include // NOLINT - -#endif // GTEST_OS_LINUX - -#if GTEST_HAS_EXCEPTIONS -#include -#endif - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#if GTEST_OS_WINDOWS -#define vsnprintf _vsnprintf -#endif // GTEST_OS_WINDOWS - -namespace testing { - -// Constants. - -// A test whose test case name or test name matches this filter is -// disabled and not run. -static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*"; - -// A test case whose name matches this filter is considered a death -// test case and will be run before test cases whose name doesn't -// match this filter. -static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*"; - -// A test filter that matches everything. -static const char kUniversalFilter[] = "*"; - -// The default output file for XML output. -static const char kDefaultOutputFile[] = "test_detail.xml"; - -// The environment variable name for the test shard index. -static const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; -// The environment variable name for the total number of test shards. -static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS"; -// The environment variable name for the test shard status file. -static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE"; - -namespace internal { - -// The text used in failure messages to indicate the start of the -// stack trace. -const char kStackTraceMarker[] = "\nStack trace:\n"; - -} // namespace internal - -GTEST_DEFINE_bool_( - also_run_disabled_tests, - internal::BoolFromGTestEnv("also_run_disabled_tests", false), - "Run disabled tests too, in addition to the tests normally being run."); - -GTEST_DEFINE_bool_( - break_on_failure, - internal::BoolFromGTestEnv("break_on_failure", false), - "True iff a failed assertion should be a debugger break-point."); - -GTEST_DEFINE_bool_( - catch_exceptions, - internal::BoolFromGTestEnv("catch_exceptions", false), - "True iff " GTEST_NAME_ - " should catch exceptions and treat them as test failures."); - -GTEST_DEFINE_string_( - color, - internal::StringFromGTestEnv("color", "auto"), - "Whether to use colors in the output. Valid values: yes, no, " - "and auto. 'auto' means to use colors if the output is " - "being sent to a terminal and the TERM environment variable " - "is set to xterm, xterm-color, xterm-256color or cygwin."); - -GTEST_DEFINE_string_( - filter, - internal::StringFromGTestEnv("filter", kUniversalFilter), - "A colon-separated list of glob (not regex) patterns " - "for filtering the tests to run, optionally followed by a " - "'-' and a : separated list of negative patterns (tests to " - "exclude). A test is run if it matches one of the positive " - "patterns and does not match any of the negative patterns."); - -GTEST_DEFINE_bool_(list_tests, false, - "List all tests without running them."); - -GTEST_DEFINE_string_( - output, - internal::StringFromGTestEnv("output", ""), - "A format (currently must be \"xml\"), optionally followed " - "by a colon and an output file name or directory. A directory " - "is indicated by a trailing pathname separator. " - "Examples: \"xml:filename.xml\", \"xml::directoryname/\". " - "If a directory is specified, output files will be created " - "within that directory, with file-names based on the test " - "executable's name and, if necessary, made unique by adding " - "digits."); - -GTEST_DEFINE_bool_( - print_time, - internal::BoolFromGTestEnv("print_time", true), - "True iff " GTEST_NAME_ - " should display elapsed time in text output."); - -GTEST_DEFINE_int32_( - repeat, - internal::Int32FromGTestEnv("repeat", 1), - "How many times to repeat each test. Specify a negative number " - "for repeating forever. Useful for shaking out flaky tests."); - -GTEST_DEFINE_int32_( - stack_trace_depth, - internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth), - "The maximum number of stack frames to print when an " - "assertion fails. The valid range is 0 through 100, inclusive."); - -GTEST_DEFINE_bool_( - show_internal_stack_frames, false, - "True iff " GTEST_NAME_ " should include internal stack frames when " - "printing test failure stack traces."); - -GTEST_DEFINE_bool_( - throw_on_failure, - internal::BoolFromGTestEnv("throw_on_failure", false), - "When this flag is specified, a failed assertion will throw an exception " - "if exceptions are enabled or exit the program with a non-zero code " - "otherwise."); - -namespace internal { - -// g_help_flag is true iff the --help flag or an equivalent form is -// specified on the command line. -static bool g_help_flag = false; - -// GTestIsInitialized() returns true iff the user has initialized -// Google Test. Useful for catching the user mistake of not initializing -// Google Test before calling RUN_ALL_TESTS(). -// -// A user must call testing::InitGoogleTest() to initialize Google -// Test. g_init_gtest_count is set to the number of times -// InitGoogleTest() has been called. We don't protect this variable -// under a mutex as it is only accessed in the main thread. -int g_init_gtest_count = 0; -static bool GTestIsInitialized() { return g_init_gtest_count != 0; } - -// Iterates over a list of TestCases, keeping a running sum of the -// results of calling a given int-returning method on each. -// Returns the sum. -static int SumOverTestCaseList(const internal::List& case_list, - int (TestCase::*method)() const) { - int sum = 0; - for (const internal::ListNode* node = case_list.Head(); - node != NULL; - node = node->next()) { - sum += (node->element()->*method)(); - } - return sum; -} - -// Returns true iff the test case passed. -static bool TestCasePassed(const TestCase* test_case) { - return test_case->should_run() && test_case->Passed(); -} - -// Returns true iff the test case failed. -static bool TestCaseFailed(const TestCase* test_case) { - return test_case->should_run() && test_case->Failed(); -} - -// Returns true iff test_case contains at least one test that should -// run. -static bool ShouldRunTestCase(const TestCase* test_case) { - return test_case->should_run(); -} - -// AssertHelper constructor. -AssertHelper::AssertHelper(TestPartResultType type, const char* file, - int line, const char* message) - : type_(type), file_(file), line_(line), message_(message) { -} - -// Message assignment, for assertion streaming support. -void AssertHelper::operator=(const Message& message) const { - UnitTest::GetInstance()-> - AddTestPartResult(type_, file_, line_, - AppendUserMessage(message_, message), - UnitTest::GetInstance()->impl() - ->CurrentOsStackTraceExceptTop(1) - // Skips the stack frame for this function itself. - ); // NOLINT -} - -// Mutex for linked pointers. -Mutex g_linked_ptr_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX); - -// Application pathname gotten in InitGoogleTest. -String g_executable_path; - -// Returns the current application's name, removing directory path if that -// is present. -FilePath GetCurrentExecutableName() { - FilePath result; - -#if defined(_WIN32_WCE) || GTEST_OS_WINDOWS - result.Set(FilePath(g_executable_path).RemoveExtension("exe")); -#else - result.Set(FilePath(g_executable_path)); -#endif // _WIN32_WCE || GTEST_OS_WINDOWS - - return result.RemoveDirectoryName(); -} - -// Functions for processing the gtest_output flag. - -// Returns the output format, or "" for normal printed output. -String UnitTestOptions::GetOutputFormat() { - const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) return String(""); - - const char* const colon = strchr(gtest_output_flag, ':'); - return (colon == NULL) ? - String(gtest_output_flag) : - String(gtest_output_flag, colon - gtest_output_flag); -} - -// Returns the name of the requested output file, or the default if none -// was explicitly specified. -String UnitTestOptions::GetAbsolutePathToOutputFile() { - const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) - return String(""); - - const char* const colon = strchr(gtest_output_flag, ':'); - if (colon == NULL) - return String(internal::FilePath::ConcatPaths( - internal::FilePath( - UnitTest::GetInstance()->original_working_dir()), - internal::FilePath(kDefaultOutputFile)).ToString() ); - - internal::FilePath output_name(colon + 1); - if (!output_name.IsAbsolutePath()) - // TODO(wan@google.com): on Windows \some\path is not an absolute - // path (as its meaning depends on the current drive), yet the - // following logic for turning it into an absolute path is wrong. - // Fix it. - output_name = internal::FilePath::ConcatPaths( - internal::FilePath(UnitTest::GetInstance()->original_working_dir()), - internal::FilePath(colon + 1)); - - if (!output_name.IsDirectory()) - return output_name.ToString(); - - internal::FilePath result(internal::FilePath::GenerateUniqueFileName( - output_name, internal::GetCurrentExecutableName(), - GetOutputFormat().c_str())); - return result.ToString(); -} - -// Returns true iff the wildcard pattern matches the string. The -// first ':' or '\0' character in pattern marks the end of it. -// -// This recursive algorithm isn't very efficient, but is clear and -// works well enough for matching test names, which are short. -bool UnitTestOptions::PatternMatchesString(const char *pattern, - const char *str) { - switch (*pattern) { - case '\0': - case ':': // Either ':' or '\0' marks the end of the pattern. - return *str == '\0'; - case '?': // Matches any single character. - return *str != '\0' && PatternMatchesString(pattern + 1, str + 1); - case '*': // Matches any string (possibly empty) of characters. - return (*str != '\0' && PatternMatchesString(pattern, str + 1)) || - PatternMatchesString(pattern + 1, str); - default: // Non-special character. Matches itself. - return *pattern == *str && - PatternMatchesString(pattern + 1, str + 1); - } -} - -bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) { - const char *cur_pattern = filter; - for (;;) { - if (PatternMatchesString(cur_pattern, name.c_str())) { - return true; - } - - // Finds the next pattern in the filter. - cur_pattern = strchr(cur_pattern, ':'); - - // Returns if no more pattern can be found. - if (cur_pattern == NULL) { - return false; - } - - // Skips the pattern separater (the ':' character). - cur_pattern++; - } -} - -// TODO(keithray): move String function implementations to gtest-string.cc. - -// Returns true iff the user-specified filter matches the test case -// name and the test name. -bool UnitTestOptions::FilterMatchesTest(const String &test_case_name, - const String &test_name) { - const String& full_name = String::Format("%s.%s", - test_case_name.c_str(), - test_name.c_str()); - - // Split --gtest_filter at '-', if there is one, to separate into - // positive filter and negative filter portions - const char* const p = GTEST_FLAG(filter).c_str(); - const char* const dash = strchr(p, '-'); - String positive; - String negative; - if (dash == NULL) { - positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter - negative = String(""); - } else { - positive.Set(p, dash - p); // Everything up to the dash - negative = String(dash+1); // Everything after the dash - if (positive.empty()) { - // Treat '-test1' as the same as '*-test1' - positive = kUniversalFilter; - } - } - - // A filter is a colon-separated list of patterns. It matches a - // test if any pattern in it matches the test. - return (MatchesFilter(full_name, positive.c_str()) && - !MatchesFilter(full_name, negative.c_str())); -} - -#if GTEST_OS_WINDOWS -// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the -// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. -// This function is useful as an __except condition. -int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) { - // Google Test should handle an exception if: - // 1. the user wants it to, AND - // 2. this is not a breakpoint exception. - return (GTEST_FLAG(catch_exceptions) && - exception_code != EXCEPTION_BREAKPOINT) ? - EXCEPTION_EXECUTE_HANDLER : - EXCEPTION_CONTINUE_SEARCH; -} -#endif // GTEST_OS_WINDOWS - -} // namespace internal - -// The interface for printing the result of a UnitTest -class UnitTestEventListenerInterface { - public: - // The d'tor is pure virtual as this is an abstract class. - virtual ~UnitTestEventListenerInterface() = 0; - - // Called before the unit test starts. - virtual void OnUnitTestStart(const UnitTest*) {} - - // Called after the unit test ends. - virtual void OnUnitTestEnd(const UnitTest*) {} - - // Called before the test case starts. - virtual void OnTestCaseStart(const TestCase*) {} - - // Called after the test case ends. - virtual void OnTestCaseEnd(const TestCase*) {} - - // Called before the global set-up starts. - virtual void OnGlobalSetUpStart(const UnitTest*) {} - - // Called after the global set-up ends. - virtual void OnGlobalSetUpEnd(const UnitTest*) {} - - // Called before the global tear-down starts. - virtual void OnGlobalTearDownStart(const UnitTest*) {} - - // Called after the global tear-down ends. - virtual void OnGlobalTearDownEnd(const UnitTest*) {} - - // Called before the test starts. - virtual void OnTestStart(const TestInfo*) {} - - // Called after the test ends. - virtual void OnTestEnd(const TestInfo*) {} - - // Called after an assertion. - virtual void OnNewTestPartResult(const TestPartResult*) {} -}; - -// The c'tor sets this object as the test part result reporter used by -// Google Test. The 'result' parameter specifies where to report the -// results. Intercepts only failures from the current thread. -ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( - TestPartResultArray* result) - : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD), - result_(result) { - Init(); -} - -// The c'tor sets this object as the test part result reporter used by -// Google Test. The 'result' parameter specifies where to report the -// results. -ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( - InterceptMode intercept_mode, TestPartResultArray* result) - : intercept_mode_(intercept_mode), - result_(result) { - Init(); -} - -void ScopedFakeTestPartResultReporter::Init() { - internal::UnitTestImpl* const impl = UnitTest::GetInstance()->impl(); - if (intercept_mode_ == INTERCEPT_ALL_THREADS) { - old_reporter_ = impl->GetGlobalTestPartResultReporter(); - impl->SetGlobalTestPartResultReporter(this); - } else { - old_reporter_ = impl->GetTestPartResultReporterForCurrentThread(); - impl->SetTestPartResultReporterForCurrentThread(this); - } -} - -// The d'tor restores the test part result reporter used by Google Test -// before. -ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() { - internal::UnitTestImpl* const impl = UnitTest::GetInstance()->impl(); - if (intercept_mode_ == INTERCEPT_ALL_THREADS) { - impl->SetGlobalTestPartResultReporter(old_reporter_); - } else { - impl->SetTestPartResultReporterForCurrentThread(old_reporter_); - } -} - -// Increments the test part result count and remembers the result. -// This method is from the TestPartResultReporterInterface interface. -void ScopedFakeTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - result_->Append(result); -} - -namespace internal { - -// Returns the type ID of ::testing::Test. We should always call this -// instead of GetTypeId< ::testing::Test>() to get the type ID of -// testing::Test. This is to work around a suspected linker bug when -// using Google Test as a framework on Mac OS X. The bug causes -// GetTypeId< ::testing::Test>() to return different values depending -// on whether the call is from the Google Test framework itself or -// from user test code. GetTestTypeId() is guaranteed to always -// return the same value, as it always calls GetTypeId<>() from the -// gtest.cc, which is within the Google Test framework. -TypeId GetTestTypeId() { - return GetTypeId(); -} - -// The value of GetTestTypeId() as seen from within the Google Test -// library. This is solely for testing GetTestTypeId(). -extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId(); - -// This predicate-formatter checks that 'results' contains a test part -// failure of the given type and that the failure message contains the -// given substring. -AssertionResult HasOneFailure(const char* /* results_expr */, - const char* /* type_expr */, - const char* /* substr_expr */, - const TestPartResultArray& results, - TestPartResultType type, - const char* substr) { - const String expected( - type == TPRT_FATAL_FAILURE ? "1 fatal failure" : - "1 non-fatal failure"); - Message msg; - if (results.size() != 1) { - msg << "Expected: " << expected << "\n" - << " Actual: " << results.size() << " failures"; - for (int i = 0; i < results.size(); i++) { - msg << "\n" << results.GetTestPartResult(i); - } - return AssertionFailure(msg); - } - - const TestPartResult& r = results.GetTestPartResult(0); - if (r.type() != type) { - msg << "Expected: " << expected << "\n" - << " Actual:\n" - << r; - return AssertionFailure(msg); - } - - if (strstr(r.message(), substr) == NULL) { - msg << "Expected: " << expected << " containing \"" - << substr << "\"\n" - << " Actual:\n" - << r; - return AssertionFailure(msg); - } - - return AssertionSuccess(); -} - -// The constructor of SingleFailureChecker remembers where to look up -// test part results, what type of failure we expect, and what -// substring the failure message should contain. -SingleFailureChecker:: SingleFailureChecker( - const TestPartResultArray* results, - TestPartResultType type, - const char* substr) - : results_(results), - type_(type), - substr_(substr) {} - -// The destructor of SingleFailureChecker verifies that the given -// TestPartResultArray contains exactly one failure that has the given -// type and contains the given substring. If that's not the case, a -// non-fatal failure will be generated. -SingleFailureChecker::~SingleFailureChecker() { - EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_.c_str()); -} - -DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter( - UnitTestImpl* unit_test) : unit_test_(unit_test) {} - -void DefaultGlobalTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - unit_test_->current_test_result()->AddTestPartResult(result); - unit_test_->result_printer()->OnNewTestPartResult(&result); -} - -DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter( - UnitTestImpl* unit_test) : unit_test_(unit_test) {} - -void DefaultPerThreadTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result); -} - -// Returns the global test part result reporter. -TestPartResultReporterInterface* -UnitTestImpl::GetGlobalTestPartResultReporter() { - internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - return global_test_part_result_repoter_; -} - -// Sets the global test part result reporter. -void UnitTestImpl::SetGlobalTestPartResultReporter( - TestPartResultReporterInterface* reporter) { - internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - global_test_part_result_repoter_ = reporter; -} - -// Returns the test part result reporter for the current thread. -TestPartResultReporterInterface* -UnitTestImpl::GetTestPartResultReporterForCurrentThread() { - return per_thread_test_part_result_reporter_.get(); -} - -// Sets the test part result reporter for the current thread. -void UnitTestImpl::SetTestPartResultReporterForCurrentThread( - TestPartResultReporterInterface* reporter) { - per_thread_test_part_result_reporter_.set(reporter); -} - -// Gets the number of successful test cases. -int UnitTestImpl::successful_test_case_count() const { - return test_cases_.CountIf(TestCasePassed); -} - -// Gets the number of failed test cases. -int UnitTestImpl::failed_test_case_count() const { - return test_cases_.CountIf(TestCaseFailed); -} - -// Gets the number of all test cases. -int UnitTestImpl::total_test_case_count() const { - return test_cases_.size(); -} - -// Gets the number of all test cases that contain at least one test -// that should run. -int UnitTestImpl::test_case_to_run_count() const { - return test_cases_.CountIf(ShouldRunTestCase); -} - -// Gets the number of successful tests. -int UnitTestImpl::successful_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count); -} - -// Gets the number of failed tests. -int UnitTestImpl::failed_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count); -} - -// Gets the number of disabled tests. -int UnitTestImpl::disabled_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count); -} - -// Gets the number of all tests. -int UnitTestImpl::total_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::total_test_count); -} - -// Gets the number of tests that should run. -int UnitTestImpl::test_to_run_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count); -} - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// CurrentOsStackTraceExceptTop(1), Foo() will be included in the -// trace but Bar() and CurrentOsStackTraceExceptTop() won't. -String UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) { - (void)skip_count; - return String(""); -} - -static TimeInMillis GetTimeInMillis() { -#if defined(_WIN32_WCE) || defined(__BORLANDC__) - // Difference between 1970-01-01 and 1601-01-01 in miliseconds. - // http://analogous.blogspot.com/2005/04/epoch.html - const TimeInMillis kJavaEpochToWinFileTimeDelta = - static_cast(116444736UL) * 100000UL; - const DWORD kTenthMicrosInMilliSecond = 10000; - - SYSTEMTIME now_systime; - FILETIME now_filetime; - ULARGE_INTEGER now_int64; - // TODO(kenton@google.com): Shouldn't this just use - // GetSystemTimeAsFileTime()? - GetSystemTime(&now_systime); - if (SystemTimeToFileTime(&now_systime, &now_filetime)) { - now_int64.LowPart = now_filetime.dwLowDateTime; - now_int64.HighPart = now_filetime.dwHighDateTime; - now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) - - kJavaEpochToWinFileTimeDelta; - return now_int64.QuadPart; - } - return 0; -#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_ - __timeb64 now; -#ifdef _MSC_VER - // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 - // (deprecated function) there. - // TODO(kenton@google.com): Use GetTickCount()? Or use - // SystemTimeToFileTime() -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. - _ftime64(&now); -#pragma warning(pop) // Restores the warning state. -#else - _ftime64(&now); -#endif // _MSC_VER - return static_cast(now.time) * 1000 + now.millitm; -#elif GTEST_HAS_GETTIMEOFDAY_ - struct timeval now; - gettimeofday(&now, NULL); - return static_cast(now.tv_sec) * 1000 + now.tv_usec / 1000; -#else -#error "Don't know how to get the current time on your system." -#endif -} - -// Utilities - -// class String - -// Returns the input enclosed in double quotes if it's not NULL; -// otherwise returns "(null)". For example, "\"Hello\"" is returned -// for input "Hello". -// -// This is useful for printing a C string in the syntax of a literal. -// -// Known issue: escape sequences are not handled yet. -String String::ShowCStringQuoted(const char* c_str) { - return c_str ? String::Format("\"%s\"", c_str) : String("(null)"); -} - -// Copies at most length characters from str into a newly-allocated -// piece of memory of size length+1. The memory is allocated with new[]. -// A terminating null byte is written to the memory, and a pointer to it -// is returned. If str is NULL, NULL is returned. -static char* CloneString(const char* str, size_t length) { - if (str == NULL) { - return NULL; - } else { - char* const clone = new char[length + 1]; - posix::StrNCpy(clone, str, length); - clone[length] = '\0'; - return clone; - } -} - -// Clones a 0-terminated C string, allocating memory using new. The -// caller is responsible for deleting[] the return value. Returns the -// cloned string, or NULL if the input is NULL. -const char * String::CloneCString(const char* c_str) { - return (c_str == NULL) ? - NULL : CloneString(c_str, strlen(c_str)); -} - -#ifdef _WIN32_WCE -// Creates a UTF-16 wide string from the given ANSI string, allocating -// memory using new. The caller is responsible for deleting the return -// value using delete[]. Returns the wide string, or NULL if the -// input is NULL. -LPCWSTR String::AnsiToUtf16(const char* ansi) { - if (!ansi) return NULL; - const int length = strlen(ansi); - const int unicode_length = - MultiByteToWideChar(CP_ACP, 0, ansi, length, - NULL, 0); - WCHAR* unicode = new WCHAR[unicode_length + 1]; - MultiByteToWideChar(CP_ACP, 0, ansi, length, - unicode, unicode_length); - unicode[unicode_length] = 0; - return unicode; -} - -// Creates an ANSI string from the given wide string, allocating -// memory using new. The caller is responsible for deleting the return -// value using delete[]. Returns the ANSI string, or NULL if the -// input is NULL. -const char* String::Utf16ToAnsi(LPCWSTR utf16_str) { - if (!utf16_str) return NULL; - const int ansi_length = - WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, - NULL, 0, NULL, NULL); - char* ansi = new char[ansi_length + 1]; - WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, - ansi, ansi_length, NULL, NULL); - ansi[ansi_length] = 0; - return ansi; -} - -#endif // _WIN32_WCE - -// Compares two C strings. Returns true iff they have the same content. -// -// Unlike strcmp(), this function can handle NULL argument(s). A NULL -// C string is considered different to any non-NULL C string, -// including the empty string. -bool String::CStringEquals(const char * lhs, const char * rhs) { - if ( lhs == NULL ) return rhs == NULL; - - if ( rhs == NULL ) return false; - - return strcmp(lhs, rhs) == 0; -} - -#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -// Converts an array of wide chars to a narrow string using the UTF-8 -// encoding, and streams the result to the given Message object. -static void StreamWideCharsToMessage(const wchar_t* wstr, size_t len, - Message* msg) { - // TODO(wan): consider allowing a testing::String object to - // contain '\0'. This will make it behave more like std::string, - // and will allow ToUtf8String() to return the correct encoding - // for '\0' s.t. we can get rid of the conditional here (and in - // several other places). - for (size_t i = 0; i != len; ) { // NOLINT - if (wstr[i] != L'\0') { - *msg << WideStringToUtf8(wstr + i, static_cast(len - i)); - while (i != len && wstr[i] != L'\0') - i++; - } else { - *msg << '\0'; - i++; - } - } -} - -#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -} // namespace internal - -#if GTEST_HAS_STD_WSTRING -// Converts the given wide string to a narrow string using the UTF-8 -// encoding, and streams the result to this Message object. -Message& Message::operator <<(const ::std::wstring& wstr) { - internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); - return *this; -} -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING -// Converts the given wide string to a narrow string using the UTF-8 -// encoding, and streams the result to this Message object. -Message& Message::operator <<(const ::wstring& wstr) { - internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); - return *this; -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -namespace internal { - -// Formats a value to be used in a failure message. - -// For a char value, we print it as a C++ char literal and as an -// unsigned integer (both in decimal and in hexadecimal). -String FormatForFailureMessage(char ch) { - const unsigned int ch_as_uint = ch; - // A String object cannot contain '\0', so we print "\\0" when ch is - // '\0'. - return String::Format("'%s' (%u, 0x%X)", - ch ? String::Format("%c", ch).c_str() : "\\0", - ch_as_uint, ch_as_uint); -} - -// For a wchar_t value, we print it as a C++ wchar_t literal and as an -// unsigned integer (both in decimal and in hexidecimal). -String FormatForFailureMessage(wchar_t wchar) { - // The C++ standard doesn't specify the exact size of the wchar_t - // type. It just says that it shall have the same size as another - // integral type, called its underlying type. - // - // Therefore, in order to print a wchar_t value in the numeric form, - // we first convert it to the largest integral type (UInt64) and - // then print the converted value. - // - // We use streaming to print the value as "%llu" doesn't work - // correctly with MSVC 7.1. - const UInt64 wchar_as_uint64 = wchar; - Message msg; - // A String object cannot contain '\0', so we print "\\0" when wchar is - // L'\0'. - char buffer[32]; // CodePointToUtf8 requires a buffer that big. - msg << "L'" - << (wchar ? CodePointToUtf8(static_cast(wchar), buffer) : "\\0") - << "' (" << wchar_as_uint64 << ", 0x" << ::std::setbase(16) - << wchar_as_uint64 << ")"; - return msg.GetString(); -} - -} // namespace internal - -// AssertionResult constructor. -AssertionResult::AssertionResult(const internal::String& failure_message) - : failure_message_(failure_message) { -} - - -// Makes a successful assertion result. -AssertionResult AssertionSuccess() { - return AssertionResult(); -} - - -// Makes a failed assertion result with the given failure message. -AssertionResult AssertionFailure(const Message& message) { - return AssertionResult(message.GetString()); -} - -namespace internal { - -// Constructs and returns the message for an equality assertion -// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. -// -// The first four parameters are the expressions used in the assertion -// and their values, as strings. For example, for ASSERT_EQ(foo, bar) -// where foo is 5 and bar is 6, we have: -// -// expected_expression: "foo" -// actual_expression: "bar" -// expected_value: "5" -// actual_value: "6" -// -// The ignoring_case parameter is true iff the assertion is a -// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will -// be inserted into the message. -AssertionResult EqFailure(const char* expected_expression, - const char* actual_expression, - const String& expected_value, - const String& actual_value, - bool ignoring_case) { - Message msg; - msg << "Value of: " << actual_expression; - if (actual_value != actual_expression) { - msg << "\n Actual: " << actual_value; - } - - msg << "\nExpected: " << expected_expression; - if (ignoring_case) { - msg << " (ignoring case)"; - } - if (expected_value != expected_expression) { - msg << "\nWhich is: " << expected_value; - } - - return AssertionFailure(msg); -} - - -// Helper function for implementing ASSERT_NEAR. -AssertionResult DoubleNearPredFormat(const char* expr1, - const char* expr2, - const char* abs_error_expr, - double val1, - double val2, - double abs_error) { - const double diff = fabs(val1 - val2); - if (diff <= abs_error) return AssertionSuccess(); - - // TODO(wan): do not print the value of an expression if it's - // already a literal. - Message msg; - msg << "The difference between " << expr1 << " and " << expr2 - << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" - << expr1 << " evaluates to " << val1 << ",\n" - << expr2 << " evaluates to " << val2 << ", and\n" - << abs_error_expr << " evaluates to " << abs_error << "."; - return AssertionFailure(msg); -} - - -// Helper template for implementing FloatLE() and DoubleLE(). -template -AssertionResult FloatingPointLE(const char* expr1, - const char* expr2, - RawType val1, - RawType val2) { - // Returns success if val1 is less than val2, - if (val1 < val2) { - return AssertionSuccess(); - } - - // or if val1 is almost equal to val2. - const FloatingPoint lhs(val1), rhs(val2); - if (lhs.AlmostEquals(rhs)) { - return AssertionSuccess(); - } - - // Note that the above two checks will both fail if either val1 or - // val2 is NaN, as the IEEE floating-point standard requires that - // any predicate involving a NaN must return false. - - StrStream val1_ss; - val1_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << val1; - - StrStream val2_ss; - val2_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << val2; - - Message msg; - msg << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" - << " Actual: " << StrStreamToString(&val1_ss) << " vs " - << StrStreamToString(&val2_ss); - - return AssertionFailure(msg); -} - -} // namespace internal - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult FloatLE(const char* expr1, const char* expr2, - float val1, float val2) { - return internal::FloatingPointLE(expr1, expr2, val1, val2); -} - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult DoubleLE(const char* expr1, const char* expr2, - double val1, double val2) { - return internal::FloatingPointLE(expr1, expr2, val1, val2); -} - -namespace internal { - -// The helper function for {ASSERT|EXPECT}_EQ with int or enum -// arguments. -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual) { - if (expected == actual) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - FormatForComparisonFailureMessage(expected, actual), - FormatForComparisonFailureMessage(actual, expected), - false); -} - -// A macro for implementing the helper functions needed to implement -// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here -// just to avoid copy-and-paste of similar code. -#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - BiggestInt val1, BiggestInt val2) {\ - if (val1 op val2) {\ - return AssertionSuccess();\ - } else {\ - Message msg;\ - msg << "Expected: (" << expr1 << ") " #op " (" << expr2\ - << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ - << " vs " << FormatForComparisonFailureMessage(val2, val1);\ - return AssertionFailure(msg);\ - }\ -} - -// Implements the helper function for {ASSERT|EXPECT}_NE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(NE, !=) -// Implements the helper function for {ASSERT|EXPECT}_LE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(LE, <=) -// Implements the helper function for {ASSERT|EXPECT}_LT with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(LT, < ) -// Implements the helper function for {ASSERT|EXPECT}_GE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(GE, >=) -// Implements the helper function for {ASSERT|EXPECT}_GT with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(GT, > ) - -#undef GTEST_IMPL_CMP_HELPER_ - -// The helper function for {ASSERT|EXPECT}_STREQ. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual) { - if (String::CStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowCStringQuoted(expected), - String::ShowCStringQuoted(actual), - false); -} - -// The helper function for {ASSERT|EXPECT}_STRCASEEQ. -AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual) { - if (String::CaseInsensitiveCStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowCStringQuoted(expected), - String::ShowCStringQuoted(actual), - true); -} - -// The helper function for {ASSERT|EXPECT}_STRNE. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2) { - if (!String::CStringEquals(s1, s2)) { - return AssertionSuccess(); - } else { - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << "), actual: \"" - << s1 << "\" vs \"" << s2 << "\""; - return AssertionFailure(msg); - } -} - -// The helper function for {ASSERT|EXPECT}_STRCASENE. -AssertionResult CmpHelperSTRCASENE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2) { - if (!String::CaseInsensitiveCStringEquals(s1, s2)) { - return AssertionSuccess(); - } else { - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << ") (ignoring case), actual: \"" - << s1 << "\" vs \"" << s2 << "\""; - return AssertionFailure(msg); - } -} - -} // namespace internal - -namespace { - -// Helper functions for implementing IsSubString() and IsNotSubstring(). - -// This group of overloaded functions return true iff needle is a -// substring of haystack. NULL is considered a substring of itself -// only. - -bool IsSubstringPred(const char* needle, const char* haystack) { - if (needle == NULL || haystack == NULL) - return needle == haystack; - - return strstr(haystack, needle) != NULL; -} - -bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { - if (needle == NULL || haystack == NULL) - return needle == haystack; - - return wcsstr(haystack, needle) != NULL; -} - -// StringType here can be either ::std::string or ::std::wstring. -template -bool IsSubstringPred(const StringType& needle, - const StringType& haystack) { - return haystack.find(needle) != StringType::npos; -} - -// This function implements either IsSubstring() or IsNotSubstring(), -// depending on the value of the expected_to_be_substring parameter. -// StringType here can be const char*, const wchar_t*, ::std::string, -// or ::std::wstring. -template -AssertionResult IsSubstringImpl( - bool expected_to_be_substring, - const char* needle_expr, const char* haystack_expr, - const StringType& needle, const StringType& haystack) { - if (IsSubstringPred(needle, haystack) == expected_to_be_substring) - return AssertionSuccess(); - - const bool is_wide_string = sizeof(needle[0]) > 1; - const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; - return AssertionFailure( - Message() - << "Value of: " << needle_expr << "\n" - << " Actual: " << begin_string_quote << needle << "\"\n" - << "Expected: " << (expected_to_be_substring ? "" : "not ") - << "a substring of " << haystack_expr << "\n" - << "Which is: " << begin_string_quote << haystack << "\""); -} - -} // namespace - -// IsSubstring() and IsNotSubstring() check whether needle is a -// substring of haystack (NULL is considered a substring of itself -// only), and return an appropriate error message when they fail. - -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} - -#if GTEST_HAS_STD_STRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} -#endif // GTEST_HAS_STD_WSTRING - -namespace internal { - -#if GTEST_OS_WINDOWS - -namespace { - -// Helper function for IsHRESULT{SuccessFailure} predicates -AssertionResult HRESULTFailureHelper(const char* expr, - const char* expected, - long hr) { // NOLINT -#ifdef _WIN32_WCE - // Windows CE doesn't support FormatMessage. - const char error_text[] = ""; -#else - // Looks up the human-readable system message for the HRESULT code - // and since we're not passing any params to FormatMessage, we don't - // want inserts expanded. - const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS; - const DWORD kBufSize = 4096; // String::Format can't exceed this length. - // Gets the system's human readable message string for this HRESULT. - char error_text[kBufSize] = { '\0' }; - DWORD message_length = ::FormatMessageA(kFlags, - 0, // no source, we're asking system - hr, // the error - 0, // no line width restrictions - error_text, // output buffer - kBufSize, // buf size - NULL); // no arguments for inserts - // Trims tailing white space (FormatMessage leaves a trailing cr-lf) - for (; message_length && isspace(error_text[message_length - 1]); - --message_length) { - error_text[message_length - 1] = '\0'; - } -#endif // _WIN32_WCE - - const String error_hex(String::Format("0x%08X ", hr)); - Message msg; - msg << "Expected: " << expr << " " << expected << ".\n" - << " Actual: " << error_hex << error_text << "\n"; - - return ::testing::AssertionFailure(msg); -} - -} // namespace - -AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT - if (SUCCEEDED(hr)) { - return AssertionSuccess(); - } - return HRESULTFailureHelper(expr, "succeeds", hr); -} - -AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT - if (FAILED(hr)) { - return AssertionSuccess(); - } - return HRESULTFailureHelper(expr, "fails", hr); -} - -#endif // GTEST_OS_WINDOWS - -// Utility functions for encoding Unicode text (wide strings) in -// UTF-8. - -// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8 -// like this: -// -// Code-point length Encoding -// 0 - 7 bits 0xxxxxxx -// 8 - 11 bits 110xxxxx 10xxxxxx -// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx -// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - -// The maximum code-point a one-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint1 = (static_cast(1) << 7) - 1; - -// The maximum code-point a two-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint2 = (static_cast(1) << (5 + 6)) - 1; - -// The maximum code-point a three-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint3 = (static_cast(1) << (4 + 2*6)) - 1; - -// The maximum code-point a four-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint4 = (static_cast(1) << (3 + 3*6)) - 1; - -// Chops off the n lowest bits from a bit pattern. Returns the n -// lowest bits. As a side effect, the original bit pattern will be -// shifted to the right by n bits. -inline UInt32 ChopLowBits(UInt32* bits, int n) { - const UInt32 low_bits = *bits & ((static_cast(1) << n) - 1); - *bits >>= n; - return low_bits; -} - -// Converts a Unicode code point to a narrow string in UTF-8 encoding. -// code_point parameter is of type UInt32 because wchar_t may not be -// wide enough to contain a code point. -// The output buffer str must containt at least 32 characters. -// The function returns the address of the output buffer. -// If the code_point is not a valid Unicode code point -// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. -char* CodePointToUtf8(UInt32 code_point, char* str) { - if (code_point <= kMaxCodePoint1) { - str[1] = '\0'; - str[0] = static_cast(code_point); // 0xxxxxxx - } else if (code_point <= kMaxCodePoint2) { - str[2] = '\0'; - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xC0 | code_point); // 110xxxxx - } else if (code_point <= kMaxCodePoint3) { - str[3] = '\0'; - str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xE0 | code_point); // 1110xxxx - } else if (code_point <= kMaxCodePoint4) { - str[4] = '\0'; - str[3] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xF0 | code_point); // 11110xxx - } else { - // The longest string String::Format can produce when invoked - // with these parameters is 28 character long (not including - // the terminating nul character). We are asking for 32 character - // buffer just in case. This is also enough for strncpy to - // null-terminate the destination string. - posix::StrNCpy( - str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32); - str[31] = '\0'; // Makes sure no change in the format to strncpy leaves - // the result unterminated. - } - return str; -} - -// The following two functions only make sense if the the system -// uses UTF-16 for wide string encoding. All supported systems -// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16. - -// Determines if the arguments constitute UTF-16 surrogate pair -// and thus should be combined into a single Unicode code point -// using CreateCodePointFromUtf16SurrogatePair. -inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) { - return sizeof(wchar_t) == 2 && - (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00; -} - -// Creates a Unicode code point from UTF16 surrogate pair. -inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first, - wchar_t second) { - const UInt32 mask = (1 << 10) - 1; - return (sizeof(wchar_t) == 2) ? - (((first & mask) << 10) | (second & mask)) + 0x10000 : - // This function should not be called when the condition is - // false, but we provide a sensible default in case it is. - static_cast(first); -} - -// Converts a wide string to a narrow string in UTF-8 encoding. -// The wide string is assumed to have the following encoding: -// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) -// UTF-32 if sizeof(wchar_t) == 4 (on Linux) -// Parameter str points to a null-terminated wide string. -// Parameter num_chars may additionally limit the number -// of wchar_t characters processed. -1 is used when the entire string -// should be processed. -// If the string contains code points that are not valid Unicode code points -// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding -// and contains invalid UTF-16 surrogate pairs, values in those pairs -// will be encoded as individual Unicode characters from Basic Normal Plane. -String WideStringToUtf8(const wchar_t* str, int num_chars) { - if (num_chars == -1) - num_chars = static_cast(wcslen(str)); - - StrStream stream; - for (int i = 0; i < num_chars; ++i) { - UInt32 unicode_code_point; - - if (str[i] == L'\0') { - break; - } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) { - unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i], - str[i + 1]); - i++; - } else { - unicode_code_point = static_cast(str[i]); - } - - char buffer[32]; // CodePointToUtf8 requires a buffer this big. - stream << CodePointToUtf8(unicode_code_point, buffer); - } - return StrStreamToString(&stream); -} - -// Converts a wide C string to a String using the UTF-8 encoding. -// NULL will be converted to "(null)". -String String::ShowWideCString(const wchar_t * wide_c_str) { - if (wide_c_str == NULL) return String("(null)"); - - return String(internal::WideStringToUtf8(wide_c_str, -1).c_str()); -} - -// Similar to ShowWideCString(), except that this function encloses -// the converted string in double quotes. -String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) { - if (wide_c_str == NULL) return String("(null)"); - - return String::Format("L\"%s\"", - String::ShowWideCString(wide_c_str).c_str()); -} - -// Compares two wide C strings. Returns true iff they have the same -// content. -// -// Unlike wcscmp(), this function can handle NULL argument(s). A NULL -// C string is considered different to any non-NULL C string, -// including the empty string. -bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) { - if (lhs == NULL) return rhs == NULL; - - if (rhs == NULL) return false; - - return wcscmp(lhs, rhs) == 0; -} - -// Helper function for *_STREQ on wide strings. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const wchar_t* expected, - const wchar_t* actual) { - if (String::WideCStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowWideCStringQuoted(expected), - String::ShowWideCStringQuoted(actual), - false); -} - -// Helper function for *_STRNE on wide strings. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const wchar_t* s1, - const wchar_t* s2) { - if (!String::WideCStringEquals(s1, s2)) { - return AssertionSuccess(); - } - - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << "), actual: " - << String::ShowWideCStringQuoted(s1) - << " vs " << String::ShowWideCStringQuoted(s2); - return AssertionFailure(msg); -} - -// Compares two C strings, ignoring case. Returns true iff they have -// the same content. -// -// Unlike strcasecmp(), this function can handle NULL argument(s). A -// NULL C string is considered different to any non-NULL C string, -// including the empty string. -bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { - if (lhs == NULL) - return rhs == NULL; - if (rhs == NULL) - return false; - return posix::StrCaseCmp(lhs, rhs) == 0; -} - - // Compares two wide C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike wcscasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL wide C string, - // including the empty string. - // NB: The implementations on different platforms slightly differ. - // On windows, this method uses _wcsicmp which compares according to LC_CTYPE - // environment variable. On GNU platform this method uses wcscasecmp - // which compares according to LC_CTYPE category of the current locale. - // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the - // current locale. -bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, - const wchar_t* rhs) { - if ( lhs == NULL ) return rhs == NULL; - - if ( rhs == NULL ) return false; - -#if GTEST_OS_WINDOWS - return _wcsicmp(lhs, rhs) == 0; -#elif GTEST_OS_LINUX - return wcscasecmp(lhs, rhs) == 0; -#else - // Mac OS X and Cygwin don't define wcscasecmp. Other unknown OSes - // may not define it either. - wint_t left, right; - do { - left = towlower(*lhs++); - right = towlower(*rhs++); - } while (left && left == right); - return left == right; -#endif // OS selector -} - -// Constructs a String by copying a given number of chars from a -// buffer. E.g. String("hello", 3) will create the string "hel". -String::String(const char * buffer, size_t len) { - char * const temp = new char[ len + 1 ]; - memcpy(temp, buffer, len); - temp[ len ] = '\0'; - c_str_ = temp; -} - -// Compares this with another String. -// Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0 -// if this is greater than rhs. -int String::Compare(const String & rhs) const { - if ( c_str_ == NULL ) { - return rhs.c_str_ == NULL ? 0 : -1; // NULL < anything except NULL - } - - return rhs.c_str_ == NULL ? 1 : strcmp(c_str_, rhs.c_str_); -} - -// Returns true iff this String ends with the given suffix. *Any* -// String is considered to end with a NULL or empty suffix. -bool String::EndsWith(const char* suffix) const { - if (suffix == NULL || CStringEquals(suffix, "")) return true; - - if (c_str_ == NULL) return false; - - const size_t this_len = strlen(c_str_); - const size_t suffix_len = strlen(suffix); - return (this_len >= suffix_len) && - CStringEquals(c_str_ + this_len - suffix_len, suffix); -} - -// Returns true iff this String ends with the given suffix, ignoring case. -// Any String is considered to end with a NULL or empty suffix. -bool String::EndsWithCaseInsensitive(const char* suffix) const { - if (suffix == NULL || CStringEquals(suffix, "")) return true; - - if (c_str_ == NULL) return false; - - const size_t this_len = strlen(c_str_); - const size_t suffix_len = strlen(suffix); - return (this_len >= suffix_len) && - CaseInsensitiveCStringEquals(c_str_ + this_len - suffix_len, suffix); -} - -// Sets the 0-terminated C string this String object represents. The -// old string in this object is deleted, and this object will own a -// clone of the input string. This function copies only up to length -// bytes (plus a terminating null byte), or until the first null byte, -// whichever comes first. -// -// This function works even when the c_str parameter has the same -// value as that of the c_str_ field. -void String::Set(const char * c_str, size_t length) { - // Makes sure this works when c_str == c_str_ - const char* const temp = CloneString(c_str, length); - delete[] c_str_; - c_str_ = temp; -} - -// Assigns a C string to this object. Self-assignment works. -const String& String::operator=(const char* c_str) { - // Makes sure this works when c_str == c_str_ - if (c_str != c_str_) { - delete[] c_str_; - c_str_ = CloneCString(c_str); - } - return *this; -} - -// Formats a list of arguments to a String, using the same format -// spec string as for printf. -// -// We do not use the StringPrintf class as it is not universally -// available. -// -// The result is limited to 4096 characters (including the tailing 0). -// If 4096 characters are not enough to format the input, -// "" is returned. -String String::Format(const char * format, ...) { - va_list args; - va_start(args, format); - - char buffer[4096]; - // MSVC 8 deprecates vsnprintf(), so we want to suppress warning - // 4996 (deprecated function) there. -#ifdef _MSC_VER // We are using MSVC. -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. - const int size = - vsnprintf(buffer, sizeof(buffer)/sizeof(buffer[0]) - 1, format, args); -#pragma warning(pop) // Restores the warning state. -#else // We are not using MSVC. - const int size = - vsnprintf(buffer, sizeof(buffer)/sizeof(buffer[0]) - 1, format, args); -#endif // _MSC_VER - va_end(args); - - return String(size >= 0 ? buffer : ""); -} - -// Converts the buffer in a StrStream to a String, converting NUL -// bytes to "\\0" along the way. -String StrStreamToString(StrStream* ss) { -#if GTEST_HAS_STD_STRING - const ::std::string& str = ss->str(); - const char* const start = str.c_str(); - const char* const end = start + str.length(); -#else - const char* const start = ss->str(); - const char* const end = start + ss->pcount(); -#endif // GTEST_HAS_STD_STRING - - // We need to use a helper StrStream to do this transformation - // because String doesn't support push_back(). - StrStream helper; - for (const char* ch = start; ch != end; ++ch) { - if (*ch == '\0') { - helper << "\\0"; // Replaces NUL with "\\0"; - } else { - helper.put(*ch); - } - } - -#if GTEST_HAS_STD_STRING - return String(helper.str().c_str()); -#else - const String str(helper.str(), helper.pcount()); - helper.freeze(false); - ss->freeze(false); - return str; -#endif // GTEST_HAS_STD_STRING -} - -// Appends the user-supplied message to the Google-Test-generated message. -String AppendUserMessage(const String& gtest_msg, - const Message& user_msg) { - // Appends the user message if it's non-empty. - const String user_msg_string = user_msg.GetString(); - if (user_msg_string.empty()) { - return gtest_msg; - } - - Message msg; - msg << gtest_msg << "\n" << user_msg_string; - - return msg.GetString(); -} - -// class TestResult - -// Creates an empty TestResult. -TestResult::TestResult() - : death_test_count_(0), - elapsed_time_(0) { -} - -// D'tor. -TestResult::~TestResult() { -} - -// Adds a test part result to the list. -void TestResult::AddTestPartResult(const TestPartResult& test_part_result) { - test_part_results_.PushBack(test_part_result); -} - -// Adds a test property to the list. If a property with the same key as the -// supplied property is already represented, the value of this test_property -// replaces the old value for that key. -void TestResult::RecordProperty(const TestProperty& test_property) { - if (!ValidateTestProperty(test_property)) { - return; - } - MutexLock lock(&test_properites_mutex_); - ListNode* const node_with_matching_key = - test_properties_.FindIf(TestPropertyKeyIs(test_property.key())); - if (node_with_matching_key == NULL) { - test_properties_.PushBack(test_property); - return; - } - TestProperty& property_with_matching_key = node_with_matching_key->element(); - property_with_matching_key.SetValue(test_property.value()); -} - -// Adds a failure if the key is a reserved attribute of Google Test -// testcase tags. Returns true if the property is valid. -bool TestResult::ValidateTestProperty(const TestProperty& test_property) { - String key(test_property.key()); - if (key == "name" || key == "status" || key == "time" || key == "classname") { - ADD_FAILURE() - << "Reserved key used in RecordProperty(): " - << key - << " ('name', 'status', 'time', and 'classname' are reserved by " - << GTEST_NAME_ << ")"; - return false; - } - return true; -} - -// Clears the object. -void TestResult::Clear() { - test_part_results_.Clear(); - test_properties_.Clear(); - death_test_count_ = 0; - elapsed_time_ = 0; -} - -// Returns true iff the test part passed. -static bool TestPartPassed(const TestPartResult & result) { - return result.passed(); -} - -// Gets the number of successful test parts. -int TestResult::successful_part_count() const { - return test_part_results_.CountIf(TestPartPassed); -} - -// Returns true iff the test part failed. -static bool TestPartFailed(const TestPartResult & result) { - return result.failed(); -} - -// Gets the number of failed test parts. -int TestResult::failed_part_count() const { - return test_part_results_.CountIf(TestPartFailed); -} - -// Returns true iff the test part fatally failed. -static bool TestPartFatallyFailed(const TestPartResult& result) { - return result.fatally_failed(); -} - -// Returns true iff the test fatally failed. -bool TestResult::HasFatalFailure() const { - return test_part_results_.CountIf(TestPartFatallyFailed) > 0; -} - -// Returns true iff the test part non-fatally failed. -static bool TestPartNonfatallyFailed(const TestPartResult& result) { - return result.nonfatally_failed(); -} - -// Returns true iff the test has a non-fatal failure. -bool TestResult::HasNonfatalFailure() const { - return test_part_results_.CountIf(TestPartNonfatallyFailed) > 0; -} - -// Gets the number of all test parts. This is the sum of the number -// of successful test parts and the number of failed test parts. -int TestResult::total_part_count() const { - return test_part_results_.size(); -} - -} // namespace internal - -// class Test - -// Creates a Test object. - -// The c'tor saves the values of all Google Test flags. -Test::Test() - : gtest_flag_saver_(new internal::GTestFlagSaver) { -} - -// The d'tor restores the values of all Google Test flags. -Test::~Test() { - delete gtest_flag_saver_; -} - -// Sets up the test fixture. -// -// A sub-class may override this. -void Test::SetUp() { -} - -// Tears down the test fixture. -// -// A sub-class may override this. -void Test::TearDown() { -} - -// Allows user supplied key value pairs to be recorded for later output. -void Test::RecordProperty(const char* key, const char* value) { - UnitTest::GetInstance()->RecordPropertyForCurrentTest(key, value); -} - -// Allows user supplied key value pairs to be recorded for later output. -void Test::RecordProperty(const char* key, int value) { - Message value_message; - value_message << value; - RecordProperty(key, value_message.GetString().c_str()); -} - -#if GTEST_OS_WINDOWS -// We are on Windows. - -// Adds an "exception thrown" fatal failure to the current test. -static void AddExceptionThrownFailure(DWORD exception_code, - const char* location) { - Message message; - message << "Exception thrown with code 0x" << std::setbase(16) << - exception_code << std::setbase(10) << " in " << location << "."; - - UnitTest* const unit_test = UnitTest::GetInstance(); - unit_test->AddTestPartResult( - TPRT_FATAL_FAILURE, - static_cast(NULL), - // We have no info about the source file where the exception - // occurred. - -1, // We have no info on which line caused the exception. - message.GetString(), - internal::String("")); -} - -#endif // GTEST_OS_WINDOWS - -// Google Test requires all tests in the same test case to use the same test -// fixture class. This function checks if the current test has the -// same fixture class as the first test in the current test case. If -// yes, it returns true; otherwise it generates a Google Test failure and -// returns false. -bool Test::HasSameFixtureClass() { - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - const TestCase* const test_case = impl->current_test_case(); - - // Info about the first test in the current test case. - const internal::TestInfoImpl* const first_test_info = - test_case->test_info_list().Head()->element()->impl(); - const internal::TypeId first_fixture_id = first_test_info->fixture_class_id(); - const char* const first_test_name = first_test_info->name(); - - // Info about the current test. - const internal::TestInfoImpl* const this_test_info = - impl->current_test_info()->impl(); - const internal::TypeId this_fixture_id = this_test_info->fixture_class_id(); - const char* const this_test_name = this_test_info->name(); - - if (this_fixture_id != first_fixture_id) { - // Is the first test defined using TEST? - const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId(); - // Is this test defined using TEST? - const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId(); - - if (first_is_TEST || this_is_TEST) { - // The user mixed TEST and TEST_F in this test case - we'll tell - // him/her how to fix it. - - // Gets the name of the TEST and the name of the TEST_F. Note - // that first_is_TEST and this_is_TEST cannot both be true, as - // the fixture IDs are different for the two tests. - const char* const TEST_name = - first_is_TEST ? first_test_name : this_test_name; - const char* const TEST_F_name = - first_is_TEST ? this_test_name : first_test_name; - - ADD_FAILURE() - << "All tests in the same test case must use the same test fixture\n" - << "class, so mixing TEST_F and TEST in the same test case is\n" - << "illegal. In test case " << this_test_info->test_case_name() - << ",\n" - << "test " << TEST_F_name << " is defined using TEST_F but\n" - << "test " << TEST_name << " is defined using TEST. You probably\n" - << "want to change the TEST to TEST_F or move it to another test\n" - << "case."; - } else { - // The user defined two fixture classes with the same name in - // two namespaces - we'll tell him/her how to fix it. - ADD_FAILURE() - << "All tests in the same test case must use the same test fixture\n" - << "class. However, in test case " - << this_test_info->test_case_name() << ",\n" - << "you defined test " << first_test_name - << " and test " << this_test_name << "\n" - << "using two different test fixture classes. This can happen if\n" - << "the two classes are from different namespaces or translation\n" - << "units and have the same name. You should probably rename one\n" - << "of the classes to put the tests into different test cases."; - } - return false; - } - - return true; -} - -// Runs the test and updates the test result. -void Test::Run() { - if (!HasSameFixtureClass()) return; - - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - SetUp(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "SetUp()"); - } - - // We will run the test only if SetUp() had no fatal failure. - if (!HasFatalFailure()) { - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - TestBody(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "the test body"); - } - } - - // However, we want to clean up as much as possible. Hence we will - // always call TearDown(), even if SetUp() or the test body has - // failed. - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - TearDown(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "TearDown()"); - } - -#else // We are on a compiler or platform that doesn't support SEH. - impl->os_stack_trace_getter()->UponLeavingGTest(); - SetUp(); - - // We will run the test only if SetUp() was successful. - if (!HasFatalFailure()) { - impl->os_stack_trace_getter()->UponLeavingGTest(); - TestBody(); - } - - // However, we want to clean up as much as possible. Hence we will - // always call TearDown(), even if SetUp() or the test body has - // failed. - impl->os_stack_trace_getter()->UponLeavingGTest(); - TearDown(); -#endif // GTEST_HAS_SEH -} - - -// Returns true iff the current test has a fatal failure. -bool Test::HasFatalFailure() { - return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure(); -} - -// Returns true iff the current test has a non-fatal failure. -bool Test::HasNonfatalFailure() { - return internal::GetUnitTestImpl()->current_test_result()-> - HasNonfatalFailure(); -} - -// class TestInfo - -// Constructs a TestInfo object. It assumes ownership of the test factory -// object via impl_. -TestInfo::TestInfo(const char* test_case_name, - const char* name, - const char* test_case_comment, - const char* comment, - internal::TypeId fixture_class_id, - internal::TestFactoryBase* factory) { - impl_ = new internal::TestInfoImpl(this, test_case_name, name, - test_case_comment, comment, - fixture_class_id, factory); -} - -// Destructs a TestInfo object. -TestInfo::~TestInfo() { - delete impl_; -} - -namespace internal { - -// Creates a new TestInfo object and registers it with Google Test; -// returns the created object. -// -// Arguments: -// -// test_case_name: name of the test case -// name: name of the test -// test_case_comment: a comment on the test case that will be included in -// the test output -// comment: a comment on the test that will be included in the -// test output -// fixture_class_id: ID of the test fixture class -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -// factory: pointer to the factory that creates a test object. -// The newly created TestInfo instance will assume -// ownership of the factory object. -TestInfo* MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - TypeId fixture_class_id, - SetUpTestCaseFunc set_up_tc, - TearDownTestCaseFunc tear_down_tc, - TestFactoryBase* factory) { - TestInfo* const test_info = - new TestInfo(test_case_name, name, test_case_comment, comment, - fixture_class_id, factory); - GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info); - return test_info; -} - -#if GTEST_HAS_PARAM_TEST -void ReportInvalidTestCaseType(const char* test_case_name, - const char* file, int line) { - Message errors; - errors - << "Attempted redefinition of test case " << test_case_name << ".\n" - << "All tests in the same test case must use the same test fixture\n" - << "class. However, in test case " << test_case_name << ", you tried\n" - << "to define a test using a fixture class different from the one\n" - << "used earlier. This can happen if the two fixture classes are\n" - << "from different namespaces and have the same name. You should\n" - << "probably rename one of the classes to put the tests into different\n" - << "test cases."; - - fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), - errors.GetString().c_str()); -} -#endif // GTEST_HAS_PARAM_TEST - -} // namespace internal - -// Returns the test case name. -const char* TestInfo::test_case_name() const { - return impl_->test_case_name(); -} - -// Returns the test name. -const char* TestInfo::name() const { - return impl_->name(); -} - -// Returns the test case comment. -const char* TestInfo::test_case_comment() const { - return impl_->test_case_comment(); -} - -// Returns the test comment. -const char* TestInfo::comment() const { - return impl_->comment(); -} - -// Returns true if this test should run. -bool TestInfo::should_run() const { return impl_->should_run(); } - -// Returns true if this test matches the user-specified filter. -bool TestInfo::matches_filter() const { return impl_->matches_filter(); } - -// Returns the result of the test. -const internal::TestResult* TestInfo::result() const { return impl_->result(); } - -// Increments the number of death tests encountered in this test so -// far. -int TestInfo::increment_death_test_count() { - return impl_->result()->increment_death_test_count(); -} - -namespace { - -// A predicate that checks the test name of a TestInfo against a known -// value. -// -// This is used for implementation of the TestCase class only. We put -// it in the anonymous namespace to prevent polluting the outer -// namespace. -// -// TestNameIs is copyable. -class TestNameIs { - public: - // Constructor. - // - // TestNameIs has NO default constructor. - explicit TestNameIs(const char* name) - : name_(name) {} - - // Returns true iff the test name of test_info matches name_. - bool operator()(const TestInfo * test_info) const { - return test_info && internal::String(test_info->name()).Compare(name_) == 0; - } - - private: - internal::String name_; -}; - -} // namespace - -// Finds and returns a TestInfo with the given name. If one doesn't -// exist, returns NULL. -TestInfo * TestCase::GetTestInfo(const char* test_name) { - // Can we find a TestInfo with the given name? - internal::ListNode * const node = test_info_list_->FindIf( - TestNameIs(test_name)); - - // Returns the TestInfo found. - return node ? node->element() : NULL; -} - -namespace internal { - -// This method expands all parameterized tests registered with macros TEST_P -// and INSTANTIATE_TEST_CASE_P into regular tests and registers those. -// This will be done just once during the program runtime. -void UnitTestImpl::RegisterParameterizedTests() { -#if GTEST_HAS_PARAM_TEST - if (!parameterized_tests_registered_) { - parameterized_test_registry_.RegisterTests(); - parameterized_tests_registered_ = true; - } -#endif -} - -// Creates the test object, runs it, records its result, and then -// deletes it. -void TestInfoImpl::Run() { - if (!should_run_) return; - - // Tells UnitTest where to store test result. - UnitTestImpl* const impl = internal::GetUnitTestImpl(); - impl->set_current_test_info(parent_); - - // Notifies the unit test event listener that a test is about to - // start. - UnitTestEventListenerInterface* const result_printer = - impl->result_printer(); - result_printer->OnTestStart(parent_); - - const TimeInMillis start = GetTimeInMillis(); - - impl->os_stack_trace_getter()->UponLeavingGTest(); -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - Test* test = NULL; - - __try { - // Creates the test object. - test = factory_->CreateTest(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), - "the test fixture's constructor"); - return; - } -#else // We are on a compiler or platform that doesn't support SEH. - - // TODO(wan): If test->Run() throws, test won't be deleted. This is - // not a problem now as we don't use exceptions. If we were to - // enable exceptions, we should revise the following to be - // exception-safe. - - // Creates the test object. - Test* test = factory_->CreateTest(); -#endif // GTEST_HAS_SEH - - // Runs the test only if the constructor of the test fixture didn't - // generate a fatal failure. - if (!Test::HasFatalFailure()) { - test->Run(); - } - - // Deletes the test object. - impl->os_stack_trace_getter()->UponLeavingGTest(); - delete test; - test = NULL; - - result_.set_elapsed_time(GetTimeInMillis() - start); - - // Notifies the unit test event listener that a test has just finished. - result_printer->OnTestEnd(parent_); - - // Tells UnitTest to stop associating assertion results to this - // test. - impl->set_current_test_info(NULL); -} - -} // namespace internal - -// class TestCase - -// Gets the number of successful tests in this test case. -int TestCase::successful_test_count() const { - return test_info_list_->CountIf(TestPassed); -} - -// Gets the number of failed tests in this test case. -int TestCase::failed_test_count() const { - return test_info_list_->CountIf(TestFailed); -} - -int TestCase::disabled_test_count() const { - return test_info_list_->CountIf(TestDisabled); -} - -// Get the number of tests in this test case that should run. -int TestCase::test_to_run_count() const { - return test_info_list_->CountIf(ShouldRunTest); -} - -// Gets the number of all tests. -int TestCase::total_test_count() const { - return test_info_list_->size(); -} - -// Creates a TestCase with the given name. -// -// Arguments: -// -// name: name of the test case -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -TestCase::TestCase(const char* name, const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc) - : name_(name), - comment_(comment), - set_up_tc_(set_up_tc), - tear_down_tc_(tear_down_tc), - should_run_(false), - elapsed_time_(0) { - test_info_list_ = new internal::List; -} - -// Destructor of TestCase. -TestCase::~TestCase() { - // Deletes every Test in the collection. - test_info_list_->ForEach(internal::Delete); - - // Then deletes the Test collection. - delete test_info_list_; - test_info_list_ = NULL; -} - -// Adds a test to this test case. Will delete the test upon -// destruction of the TestCase object. -void TestCase::AddTestInfo(TestInfo * test_info) { - test_info_list_->PushBack(test_info); -} - -// Runs every test in this TestCase. -void TestCase::Run() { - if (!should_run_) return; - - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - impl->set_current_test_case(this); - - UnitTestEventListenerInterface * const result_printer = - impl->result_printer(); - - result_printer->OnTestCaseStart(this); - impl->os_stack_trace_getter()->UponLeavingGTest(); - set_up_tc_(); - - const internal::TimeInMillis start = internal::GetTimeInMillis(); - test_info_list_->ForEach(internal::TestInfoImpl::RunTest); - elapsed_time_ = internal::GetTimeInMillis() - start; - - impl->os_stack_trace_getter()->UponLeavingGTest(); - tear_down_tc_(); - result_printer->OnTestCaseEnd(this); - impl->set_current_test_case(NULL); -} - -// Clears the results of all tests in this test case. -void TestCase::ClearResult() { - test_info_list_->ForEach(internal::TestInfoImpl::ClearTestResult); -} - - -// class UnitTestEventListenerInterface - -// The virtual d'tor. -UnitTestEventListenerInterface::~UnitTestEventListenerInterface() { -} - -// A result printer that never prints anything. Used in the child process -// of an exec-style death test to avoid needless output clutter. -class NullUnitTestResultPrinter : public UnitTestEventListenerInterface {}; - -// Formats a countable noun. Depending on its quantity, either the -// singular form or the plural form is used. e.g. -// -// FormatCountableNoun(1, "formula", "formuli") returns "1 formula". -// FormatCountableNoun(5, "book", "books") returns "5 books". -static internal::String FormatCountableNoun(int count, - const char * singular_form, - const char * plural_form) { - return internal::String::Format("%d %s", count, - count == 1 ? singular_form : plural_form); -} - -// Formats the count of tests. -static internal::String FormatTestCount(int test_count) { - return FormatCountableNoun(test_count, "test", "tests"); -} - -// Formats the count of test cases. -static internal::String FormatTestCaseCount(int test_case_count) { - return FormatCountableNoun(test_case_count, "test case", "test cases"); -} - -// Converts a TestPartResultType enum to human-friendly string -// representation. Both TPRT_NONFATAL_FAILURE and TPRT_FATAL_FAILURE -// are translated to "Failure", as the user usually doesn't care about -// the difference between the two when viewing the test result. -static const char * TestPartResultTypeToString(TestPartResultType type) { - switch (type) { - case TPRT_SUCCESS: - return "Success"; - - case TPRT_NONFATAL_FAILURE: - case TPRT_FATAL_FAILURE: -#ifdef _MSC_VER - return "error: "; -#else - return "Failure\n"; -#endif - } - - return "Unknown result type"; -} - -// Prints a TestPartResult to a String. -static internal::String PrintTestPartResultToString( - const TestPartResult& test_part_result) { - return (Message() - << internal::FormatFileLocation(test_part_result.file_name(), - test_part_result.line_number()) - << " " << TestPartResultTypeToString(test_part_result.type()) - << test_part_result.message()).GetString(); -} - -// Prints a TestPartResult. -static void PrintTestPartResult( - const TestPartResult& test_part_result) { - printf("%s\n", PrintTestPartResultToString(test_part_result).c_str()); - fflush(stdout); -} - -// class PrettyUnitTestResultPrinter - -namespace internal { - -enum GTestColor { - COLOR_DEFAULT, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW -}; - -#if GTEST_OS_WINDOWS && !defined(_WIN32_WCE) - -// Returns the character attribute for the given color. -WORD GetColorAttribute(GTestColor color) { - switch (color) { - case COLOR_RED: return FOREGROUND_RED; - case COLOR_GREEN: return FOREGROUND_GREEN; - case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN; - default: return 0; - } -} - -#else - -// Returns the ANSI color code for the given color. COLOR_DEFAULT is -// an invalid input. -const char* GetAnsiColorCode(GTestColor color) { - switch (color) { - case COLOR_RED: return "1"; - case COLOR_GREEN: return "2"; - case COLOR_YELLOW: return "3"; - default: return NULL; - }; -} - -#endif // GTEST_OS_WINDOWS && !_WIN32_WCE - -// Returns true iff Google Test should use colors in the output. -bool ShouldUseColor(bool stdout_is_tty) { - const char* const gtest_color = GTEST_FLAG(color).c_str(); - - if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { -#if GTEST_OS_WINDOWS - // On Windows the TERM variable is usually not set, but the - // console there does support colors. - return stdout_is_tty; -#else - // On non-Windows platforms, we rely on the TERM variable. - const char* const term = posix::GetEnv("TERM"); - const bool term_supports_color = - String::CStringEquals(term, "xterm") || - String::CStringEquals(term, "xterm-color") || - String::CStringEquals(term, "xterm-256color") || - String::CStringEquals(term, "cygwin"); - return stdout_is_tty && term_supports_color; -#endif // GTEST_OS_WINDOWS - } - - return String::CaseInsensitiveCStringEquals(gtest_color, "yes") || - String::CaseInsensitiveCStringEquals(gtest_color, "true") || - String::CaseInsensitiveCStringEquals(gtest_color, "t") || - String::CStringEquals(gtest_color, "1"); - // We take "yes", "true", "t", and "1" as meaning "yes". If the - // value is neither one of these nor "auto", we treat it as "no" to - // be conservative. -} - -// Helpers for printing colored strings to stdout. Note that on Windows, we -// cannot simply emit special characters and have the terminal change colors. -// This routine must actually emit the characters rather than return a string -// that would be colored when printed, as can be done on Linux. -void ColoredPrintf(GTestColor color, const char* fmt, ...) { - va_list args; - va_start(args, fmt); - -#if defined(_WIN32_WCE) || GTEST_OS_SYMBIAN || GTEST_OS_ZOS - const bool use_color = false; -#else - static const bool in_color_mode = - ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0); - const bool use_color = in_color_mode && (color != COLOR_DEFAULT); -#endif // defined(_WIN32_WCE) || GTEST_OS_SYMBIAN || GTEST_OS_ZOS - // The '!= 0' comparison is necessary to satisfy MSVC 7.1. - - if (!use_color) { - vprintf(fmt, args); - va_end(args); - return; - } - -#if GTEST_OS_WINDOWS && !defined(_WIN32_WCE) - const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); - - // Gets the current text color. - CONSOLE_SCREEN_BUFFER_INFO buffer_info; - GetConsoleScreenBufferInfo(stdout_handle, &buffer_info); - const WORD old_color_attrs = buffer_info.wAttributes; - - SetConsoleTextAttribute(stdout_handle, - GetColorAttribute(color) | FOREGROUND_INTENSITY); - vprintf(fmt, args); - - // Restores the text color. - SetConsoleTextAttribute(stdout_handle, old_color_attrs); -#else - printf("\033[0;3%sm", GetAnsiColorCode(color)); - vprintf(fmt, args); - printf("\033[m"); // Resets the terminal to default. -#endif // GTEST_OS_WINDOWS && !defined(_WIN32_WCE) - va_end(args); -} - -} // namespace internal - -using internal::ColoredPrintf; -using internal::COLOR_DEFAULT; -using internal::COLOR_RED; -using internal::COLOR_GREEN; -using internal::COLOR_YELLOW; - -// This class implements the UnitTestEventListenerInterface interface. -// -// Class PrettyUnitTestResultPrinter is copyable. -class PrettyUnitTestResultPrinter : public UnitTestEventListenerInterface { - public: - PrettyUnitTestResultPrinter() {} - static void PrintTestName(const char * test_case, const char * test) { - printf("%s.%s", test_case, test); - } - - // The following methods override what's in the - // UnitTestEventListenerInterface class. - virtual void OnUnitTestStart(const UnitTest * unit_test); - virtual void OnGlobalSetUpStart(const UnitTest*); - virtual void OnTestCaseStart(const TestCase * test_case); - virtual void OnTestCaseEnd(const TestCase * test_case); - virtual void OnTestStart(const TestInfo * test_info); - virtual void OnNewTestPartResult(const TestPartResult * result); - virtual void OnTestEnd(const TestInfo * test_info); - virtual void OnGlobalTearDownStart(const UnitTest*); - virtual void OnUnitTestEnd(const UnitTest * unit_test); - - private: - internal::String test_case_name_; -}; - -// Called before the unit test starts. -void PrettyUnitTestResultPrinter::OnUnitTestStart( - const UnitTest * unit_test) { - const char * const filter = GTEST_FLAG(filter).c_str(); - - // Prints the filter if it's not *. This reminds the user that some - // tests may be skipped. - if (!internal::String::CStringEquals(filter, kUniversalFilter)) { - ColoredPrintf(COLOR_YELLOW, - "Note: %s filter = %s\n", GTEST_NAME_, filter); - } - - if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { - ColoredPrintf(COLOR_YELLOW, - "Note: This is test shard %s of %s.\n", - internal::posix::GetEnv(kTestShardIndex), - internal::posix::GetEnv(kTestTotalShards)); - } - - const internal::UnitTestImpl* const impl = unit_test->impl(); - ColoredPrintf(COLOR_GREEN, "[==========] "); - printf("Running %s from %s.\n", - FormatTestCount(impl->test_to_run_count()).c_str(), - FormatTestCaseCount(impl->test_case_to_run_count()).c_str()); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnGlobalSetUpStart(const UnitTest*) { - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("Global test environment set-up.\n"); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestCaseStart( - const TestCase * test_case) { - test_case_name_ = test_case->name(); - const internal::String counts = - FormatCountableNoun(test_case->test_to_run_count(), "test", "tests"); - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("%s from %s", counts.c_str(), test_case_name_.c_str()); - if (test_case->comment()[0] == '\0') { - printf("\n"); - } else { - printf(", where %s\n", test_case->comment()); - } - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestCaseEnd( - const TestCase * test_case) { - if (!GTEST_FLAG(print_time)) return; - - test_case_name_ = test_case->name(); - const internal::String counts = - FormatCountableNoun(test_case->test_to_run_count(), "test", "tests"); - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("%s from %s (%s ms total)\n\n", - counts.c_str(), test_case_name_.c_str(), - internal::StreamableToString(test_case->elapsed_time()).c_str()); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo * test_info) { - ColoredPrintf(COLOR_GREEN, "[ RUN ] "); - PrintTestName(test_case_name_.c_str(), test_info->name()); - if (test_info->comment()[0] == '\0') { - printf("\n"); - } else { - printf(", where %s\n", test_info->comment()); - } - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo * test_info) { - if (test_info->result()->Passed()) { - ColoredPrintf(COLOR_GREEN, "[ OK ] "); - } else { - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - } - PrintTestName(test_case_name_.c_str(), test_info->name()); - if (GTEST_FLAG(print_time)) { - printf(" (%s ms)\n", internal::StreamableToString( - test_info->result()->elapsed_time()).c_str()); - } else { - printf("\n"); - } - fflush(stdout); -} - -// Called after an assertion failure. -void PrettyUnitTestResultPrinter::OnNewTestPartResult( - const TestPartResult * result) { - // If the test part succeeded, we don't need to do anything. - if (result->type() == TPRT_SUCCESS) - return; - - // Print failure message from the assertion (e.g. expected this and got that). - PrintTestPartResult(*result); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnGlobalTearDownStart(const UnitTest*) { - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("Global test environment tear-down\n"); - fflush(stdout); -} - -namespace internal { - -// Internal helper for printing the list of failed tests. -static void PrintFailedTestsPretty(const UnitTestImpl* impl) { - const int failed_test_count = impl->failed_test_count(); - if (failed_test_count == 0) { - return; - } - - for (const internal::ListNode* node = impl->test_cases()->Head(); - node != NULL; node = node->next()) { - const TestCase* const tc = node->element(); - if (!tc->should_run() || (tc->failed_test_count() == 0)) { - continue; - } - for (const internal::ListNode* tinode = - tc->test_info_list().Head(); - tinode != NULL; tinode = tinode->next()) { - const TestInfo* const ti = tinode->element(); - if (!tc->ShouldRunTest(ti) || tc->TestPassed(ti)) { - continue; - } - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - printf("%s.%s", ti->test_case_name(), ti->name()); - if (ti->test_case_comment()[0] != '\0' || - ti->comment()[0] != '\0') { - printf(", where %s", ti->test_case_comment()); - if (ti->test_case_comment()[0] != '\0' && - ti->comment()[0] != '\0') { - printf(" and "); - } - } - printf("%s\n", ti->comment()); - } - } -} - -} // namespace internal - -void PrettyUnitTestResultPrinter::OnUnitTestEnd( - const UnitTest * unit_test) { - const internal::UnitTestImpl* const impl = unit_test->impl(); - - ColoredPrintf(COLOR_GREEN, "[==========] "); - printf("%s from %s ran.", - FormatTestCount(impl->test_to_run_count()).c_str(), - FormatTestCaseCount(impl->test_case_to_run_count()).c_str()); - if (GTEST_FLAG(print_time)) { - printf(" (%s ms total)", - internal::StreamableToString(impl->elapsed_time()).c_str()); - } - printf("\n"); - ColoredPrintf(COLOR_GREEN, "[ PASSED ] "); - printf("%s.\n", FormatTestCount(impl->successful_test_count()).c_str()); - - int num_failures = impl->failed_test_count(); - if (!impl->Passed()) { - const int failed_test_count = impl->failed_test_count(); - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str()); - internal::PrintFailedTestsPretty(impl); - printf("\n%2d FAILED %s\n", num_failures, - num_failures == 1 ? "TEST" : "TESTS"); - } - - int num_disabled = impl->disabled_test_count(); - if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) { - if (!num_failures) { - printf("\n"); // Add a spacer if no FAILURE banner is displayed. - } - ColoredPrintf(COLOR_YELLOW, - " YOU HAVE %d DISABLED %s\n\n", - num_disabled, - num_disabled == 1 ? "TEST" : "TESTS"); - } - // Ensure that Google Test output is printed before, e.g., heapchecker output. - fflush(stdout); -} - -// End PrettyUnitTestResultPrinter - -// class UnitTestEventsRepeater -// -// This class forwards events to other event listeners. -class UnitTestEventsRepeater : public UnitTestEventListenerInterface { - public: - typedef internal::List Listeners; - typedef internal::ListNode ListenersNode; - UnitTestEventsRepeater() {} - virtual ~UnitTestEventsRepeater(); - void AddListener(UnitTestEventListenerInterface *listener); - - virtual void OnUnitTestStart(const UnitTest* unit_test); - virtual void OnUnitTestEnd(const UnitTest* unit_test); - virtual void OnGlobalSetUpStart(const UnitTest* unit_test); - virtual void OnGlobalSetUpEnd(const UnitTest* unit_test); - virtual void OnGlobalTearDownStart(const UnitTest* unit_test); - virtual void OnGlobalTearDownEnd(const UnitTest* unit_test); - virtual void OnTestCaseStart(const TestCase* test_case); - virtual void OnTestCaseEnd(const TestCase* test_case); - virtual void OnTestStart(const TestInfo* test_info); - virtual void OnTestEnd(const TestInfo* test_info); - virtual void OnNewTestPartResult(const TestPartResult* result); - - private: - Listeners listeners_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestEventsRepeater); -}; - -UnitTestEventsRepeater::~UnitTestEventsRepeater() { - for (ListenersNode* listener = listeners_.Head(); - listener != NULL; - listener = listener->next()) { - delete listener->element(); - } -} - -void UnitTestEventsRepeater::AddListener( - UnitTestEventListenerInterface *listener) { - listeners_.PushBack(listener); -} - -// Since the methods are identical, use a macro to reduce boilerplate. -// This defines a member that repeats the call to all listeners. -#define GTEST_REPEATER_METHOD_(Name, Type) \ -void UnitTestEventsRepeater::Name(const Type* parameter) { \ - for (ListenersNode* listener = listeners_.Head(); \ - listener != NULL; \ - listener = listener->next()) { \ - listener->element()->Name(parameter); \ - } \ -} - -GTEST_REPEATER_METHOD_(OnUnitTestStart, UnitTest) -GTEST_REPEATER_METHOD_(OnUnitTestEnd, UnitTest) -GTEST_REPEATER_METHOD_(OnGlobalSetUpStart, UnitTest) -GTEST_REPEATER_METHOD_(OnGlobalSetUpEnd, UnitTest) -GTEST_REPEATER_METHOD_(OnGlobalTearDownStart, UnitTest) -GTEST_REPEATER_METHOD_(OnGlobalTearDownEnd, UnitTest) -GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase) -GTEST_REPEATER_METHOD_(OnTestCaseEnd, TestCase) -GTEST_REPEATER_METHOD_(OnTestStart, TestInfo) -GTEST_REPEATER_METHOD_(OnTestEnd, TestInfo) -GTEST_REPEATER_METHOD_(OnNewTestPartResult, TestPartResult) - -#undef GTEST_REPEATER_METHOD_ - -// End PrettyUnitTestResultPrinter - -// This class generates an XML output file. -class XmlUnitTestResultPrinter : public UnitTestEventListenerInterface { - public: - explicit XmlUnitTestResultPrinter(const char* output_file); - - virtual void OnUnitTestEnd(const UnitTest* unit_test); - - private: - // Is c a whitespace character that is normalized to a space character - // when it appears in an XML attribute value? - static bool IsNormalizableWhitespace(char c) { - return c == 0x9 || c == 0xA || c == 0xD; - } - - // May c appear in a well-formed XML document? - static bool IsValidXmlCharacter(char c) { - return IsNormalizableWhitespace(c) || c >= 0x20; - } - - // Returns an XML-escaped copy of the input string str. If - // is_attribute is true, the text is meant to appear as an attribute - // value, and normalizable whitespace is preserved by replacing it - // with character references. - static internal::String EscapeXml(const char* str, - bool is_attribute); - - // Convenience wrapper around EscapeXml when str is an attribute value. - static internal::String EscapeXmlAttribute(const char* str) { - return EscapeXml(str, true); - } - - // Convenience wrapper around EscapeXml when str is not an attribute value. - static internal::String EscapeXmlText(const char* str) { - return EscapeXml(str, false); - } - - // Prints an XML representation of a TestInfo object. - static void PrintXmlTestInfo(FILE* out, - const char* test_case_name, - const TestInfo* test_info); - - // Prints an XML representation of a TestCase object - static void PrintXmlTestCase(FILE* out, const TestCase* test_case); - - // Prints an XML summary of unit_test to output stream out. - static void PrintXmlUnitTest(FILE* out, const UnitTest* unit_test); - - // Produces a string representing the test properties in a result as space - // delimited XML attributes based on the property key="value" pairs. - // When the String is not empty, it includes a space at the beginning, - // to delimit this attribute from prior attributes. - static internal::String TestPropertiesAsXmlAttributes( - const internal::TestResult* result); - - // The output file. - const internal::String output_file_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter); -}; - -// Creates a new XmlUnitTestResultPrinter. -XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file) - : output_file_(output_file) { - if (output_file_.c_str() == NULL || output_file_.empty()) { - fprintf(stderr, "XML output file may not be null\n"); - fflush(stderr); - exit(EXIT_FAILURE); - } -} - -// Called after the unit test ends. -void XmlUnitTestResultPrinter::OnUnitTestEnd(const UnitTest* unit_test) { - FILE* xmlout = NULL; - internal::FilePath output_file(output_file_); - internal::FilePath output_dir(output_file.RemoveFileName()); - - if (output_dir.CreateDirectoriesRecursively()) { - xmlout = internal::posix::FOpen(output_file_.c_str(), "w"); - } - if (xmlout == NULL) { - // TODO(wan): report the reason of the failure. - // - // We don't do it for now as: - // - // 1. There is no urgent need for it. - // 2. It's a bit involved to make the errno variable thread-safe on - // all three operating systems (Linux, Windows, and Mac OS). - // 3. To interpret the meaning of errno in a thread-safe way, - // we need the strerror_r() function, which is not available on - // Windows. - fprintf(stderr, - "Unable to open file \"%s\"\n", - output_file_.c_str()); - fflush(stderr); - exit(EXIT_FAILURE); - } - PrintXmlUnitTest(xmlout, unit_test); - fclose(xmlout); -} - -// Returns an XML-escaped copy of the input string str. If is_attribute -// is true, the text is meant to appear as an attribute value, and -// normalizable whitespace is preserved by replacing it with character -// references. -// -// Invalid XML characters in str, if any, are stripped from the output. -// It is expected that most, if not all, of the text processed by this -// module will consist of ordinary English text. -// If this module is ever modified to produce version 1.1 XML output, -// most invalid characters can be retained using character references. -// TODO(wan): It might be nice to have a minimally invasive, human-readable -// escaping scheme for invalid characters, rather than dropping them. -internal::String XmlUnitTestResultPrinter::EscapeXml(const char* str, - bool is_attribute) { - Message m; - - if (str != NULL) { - for (const char* src = str; *src; ++src) { - switch (*src) { - case '<': - m << "<"; - break; - case '>': - m << ">"; - break; - case '&': - m << "&"; - break; - case '\'': - if (is_attribute) - m << "'"; - else - m << '\''; - break; - case '"': - if (is_attribute) - m << """; - else - m << '"'; - break; - default: - if (IsValidXmlCharacter(*src)) { - if (is_attribute && IsNormalizableWhitespace(*src)) - m << internal::String::Format("&#x%02X;", unsigned(*src)); - else - m << *src; - } - break; - } - } - } - - return m.GetString(); -} - - -// The following routines generate an XML representation of a UnitTest -// object. -// -// This is how Google Test concepts map to the DTD: -// -// <-- corresponds to a UnitTest object -// <-- corresponds to a TestCase object -// <-- corresponds to a TestInfo object -// ... -// ... -// ... -// <-- individual assertion failures -// -// -// - -namespace internal { - -// Formats the given time in milliseconds as seconds. The returned -// C-string is owned by this function and cannot be released by the -// caller. Calling the function again invalidates the previous -// result. -const char* FormatTimeInMillisAsSeconds(TimeInMillis ms) { - static String str; - str = (Message() << (ms/1000.0)).GetString(); - return str.c_str(); -} - -} // namespace internal - -// Prints an XML representation of a TestInfo object. -// TODO(wan): There is also value in printing properties with the plain printer. -void XmlUnitTestResultPrinter::PrintXmlTestInfo(FILE* out, - const char* test_case_name, - const TestInfo* test_info) { - const internal::TestResult * const result = test_info->result(); - const internal::List &results = result->test_part_results(); - fprintf(out, - " name()).c_str(), - test_info->should_run() ? "run" : "notrun", - internal::FormatTimeInMillisAsSeconds(result->elapsed_time()), - EscapeXmlAttribute(test_case_name).c_str(), - TestPropertiesAsXmlAttributes(result).c_str()); - - int failures = 0; - for (const internal::ListNode* part_node = results.Head(); - part_node != NULL; - part_node = part_node->next()) { - const TestPartResult& part = part_node->element(); - if (part.failed()) { - const internal::String message = - internal::String::Format("%s:%d\n%s", part.file_name(), - part.line_number(), part.message()); - if (++failures == 1) - fprintf(out, ">\n"); - fprintf(out, - " " - "\n", - EscapeXmlAttribute(part.summary()).c_str(), message.c_str()); - } - } - - if (failures == 0) - fprintf(out, " />\n"); - else - fprintf(out, " \n"); -} - -// Prints an XML representation of a TestCase object -void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out, - const TestCase* test_case) { - fprintf(out, - " name()).c_str(), - test_case->total_test_count(), - test_case->failed_test_count(), - test_case->disabled_test_count()); - fprintf(out, - "errors=\"0\" time=\"%s\">\n", - internal::FormatTimeInMillisAsSeconds(test_case->elapsed_time())); - for (const internal::ListNode* info_node = - test_case->test_info_list().Head(); - info_node != NULL; - info_node = info_node->next()) { - PrintXmlTestInfo(out, test_case->name(), info_node->element()); - } - fprintf(out, " \n"); -} - -// Prints an XML summary of unit_test to output stream out. -void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out, - const UnitTest* unit_test) { - const internal::UnitTestImpl* const impl = unit_test->impl(); - fprintf(out, "\n"); - fprintf(out, - "total_test_count(), - impl->failed_test_count(), - impl->disabled_test_count(), - internal::FormatTimeInMillisAsSeconds(impl->elapsed_time())); - fprintf(out, "name=\"AllTests\">\n"); - for (const internal::ListNode* case_node = - impl->test_cases()->Head(); - case_node != NULL; - case_node = case_node->next()) { - PrintXmlTestCase(out, case_node->element()); - } - fprintf(out, "\n"); -} - -// Produces a string representing the test properties in a result as space -// delimited XML attributes based on the property key="value" pairs. -internal::String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes( - const internal::TestResult* result) { - using internal::TestProperty; - Message attributes; - const internal::List& properties = result->test_properties(); - for (const internal::ListNode* property_node = - properties.Head(); - property_node != NULL; - property_node = property_node->next()) { - const TestProperty& property = property_node->element(); - attributes << " " << property.key() << "=" - << "\"" << EscapeXmlAttribute(property.value()) << "\""; - } - return attributes.GetString(); -} - -// End XmlUnitTestResultPrinter - -namespace internal { - -// Class ScopedTrace - -// Pushes the given source file location and message onto a per-thread -// trace stack maintained by Google Test. -// L < UnitTest::mutex_ -ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) { - TraceInfo trace; - trace.file = file; - trace.line = line; - trace.message = message.GetString(); - - UnitTest::GetInstance()->PushGTestTrace(trace); -} - -// Pops the info pushed by the c'tor. -// L < UnitTest::mutex_ -ScopedTrace::~ScopedTrace() { - UnitTest::GetInstance()->PopGTestTrace(); -} - - -// class OsStackTraceGetter - -// Returns the current OS stack trace as a String. Parameters: -// -// max_depth - the maximum number of stack frames to be included -// in the trace. -// skip_count - the number of top frames to be skipped; doesn't count -// against max_depth. -// -// L < mutex_ -// We use "L < mutex_" to denote that the function may acquire mutex_. -String OsStackTraceGetter::CurrentStackTrace(int, int) { - return String(""); -} - -// L < mutex_ -void OsStackTraceGetter::UponLeavingGTest() { -} - -const char* const -OsStackTraceGetter::kElidedFramesMarker = - "... " GTEST_NAME_ " internal frames ..."; - -} // namespace internal - -// class UnitTest - -// Gets the singleton UnitTest object. The first time this method is -// called, a UnitTest object is constructed and returned. Consecutive -// calls will return the same object. -// -// We don't protect this under mutex_ as a user is not supposed to -// call this before main() starts, from which point on the return -// value will never change. -UnitTest * UnitTest::GetInstance() { - // When compiled with MSVC 7.1 in optimized mode, destroying the - // UnitTest object upon exiting the program messes up the exit code, - // causing successful tests to appear failed. We have to use a - // different implementation in this case to bypass the compiler bug. - // This implementation makes the compiler happy, at the cost of - // leaking the UnitTest object. - - // CodeGear C++Builder insists on a public destructor for the - // default implementation. Use this implementation to keep good OO - // design with private destructor. - -#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) - static UnitTest* const instance = new UnitTest; - return instance; -#else - static UnitTest instance; - return &instance; -#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) -} - -// Registers and returns a global test environment. When a test -// program is run, all global test environments will be set-up in the -// order they were registered. After all tests in the program have -// finished, all global test environments will be torn-down in the -// *reverse* order they were registered. -// -// The UnitTest object takes ownership of the given environment. -// -// We don't protect this under mutex_, as we only support calling it -// from the main thread. -Environment* UnitTest::AddEnvironment(Environment* env) { - if (env == NULL) { - return NULL; - } - - impl_->environments()->PushBack(env); - impl_->environments_in_reverse_order()->PushFront(env); - return env; -} - -#if GTEST_HAS_EXCEPTIONS -// A failed Google Test assertion will throw an exception of this type -// when exceptions are enabled. We derive it from std::runtime_error, -// which is for errors presumably detectable only at run time. Since -// std::runtime_error inherits from std::exception, many testing -// frameworks know how to extract and print the message inside it. -class GoogleTestFailureException : public ::std::runtime_error { - public: - explicit GoogleTestFailureException(const TestPartResult& failure) - : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {} -}; -#endif - -// Adds a TestPartResult to the current TestResult object. All Google Test -// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call -// this to report their results. The user code should use the -// assertion macros instead of calling this directly. -// L < mutex_ -void UnitTest::AddTestPartResult(TestPartResultType result_type, - const char* file_name, - int line_number, - const internal::String& message, - const internal::String& os_stack_trace) { - Message msg; - msg << message; - - internal::MutexLock lock(&mutex_); - if (impl_->gtest_trace_stack()->size() > 0) { - msg << "\n" << GTEST_NAME_ << " trace:"; - - for (internal::ListNode* node = - impl_->gtest_trace_stack()->Head(); - node != NULL; - node = node->next()) { - const internal::TraceInfo& trace = node->element(); - msg << "\n" << trace.file << ":" << trace.line << ": " << trace.message; - } - } - - if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) { - msg << internal::kStackTraceMarker << os_stack_trace; - } - - const TestPartResult result = - TestPartResult(result_type, file_name, line_number, - msg.GetString().c_str()); - impl_->GetTestPartResultReporterForCurrentThread()-> - ReportTestPartResult(result); - - if (result_type != TPRT_SUCCESS) { - // gtest_break_on_failure takes precedence over - // gtest_throw_on_failure. This allows a user to set the latter - // in the code (perhaps in order to use Google Test assertions - // with another testing framework) and specify the former on the - // command line for debugging. - if (GTEST_FLAG(break_on_failure)) { -#if GTEST_OS_WINDOWS - // Using DebugBreak on Windows allows gtest to still break into a debugger - // when a failure happens and both the --gtest_break_on_failure and - // the --gtest_catch_exceptions flags are specified. - DebugBreak(); -#else - *static_cast(NULL) = 1; -#endif // GTEST_OS_WINDOWS - } else if (GTEST_FLAG(throw_on_failure)) { -#if GTEST_HAS_EXCEPTIONS - throw GoogleTestFailureException(result); -#else - // We cannot call abort() as it generates a pop-up in debug mode - // that cannot be suppressed in VC 7.1 or below. - exit(1); -#endif - } - } -} - -// Creates and adds a property to the current TestResult. If a property matching -// the supplied value already exists, updates its value instead. -void UnitTest::RecordPropertyForCurrentTest(const char* key, - const char* value) { - const internal::TestProperty test_property(key, value); - impl_->current_test_result()->RecordProperty(test_property); -} - -// Runs all tests in this UnitTest object and prints the result. -// Returns 0 if successful, or 1 otherwise. -// -// We don't protect this under mutex_, as we only support calling it -// from the main thread. -int UnitTest::Run() { -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - - const bool in_death_test_child_process = - internal::GTEST_FLAG(internal_run_death_test).GetLength() > 0; - - // Either the user wants Google Test to catch exceptions thrown by the - // tests or this is executing in the context of death test child - // process. In either case the user does not want to see pop-up dialogs - // about crashes - they are expected.. - if (GTEST_FLAG(catch_exceptions) || in_death_test_child_process) { -#if !defined(_WIN32_WCE) - // SetErrorMode doesn't exist on CE. - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | - SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); -#endif // _WIN32_WCE - -#if defined(_MSC_VER) || defined(__MINGW32__) - // Death test children can be terminated with _abort(). On Windows, - // _abort() can show a dialog with a warning message. This forces the - // abort message to go to stderr instead. - _set_error_mode(_OUT_TO_STDERR); -#endif - -#if _MSC_VER >= 1400 - // In the debug version, Visual Studio pops up a separate dialog - // offering a choice to debug the aborted program. We need to suppress - // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement - // executed. Google Test will notify the user of any unexpected - // failure via stderr. - // - // VC++ doesn't define _set_abort_behavior() prior to the version 8.0. - // Users of prior VC versions shall suffer the agony and pain of - // clicking through the countless debug dialogs. - // TODO(vladl@google.com): find a way to suppress the abort dialog() in the - // debug mode when compiled with VC 7.1 or lower. - if (!GTEST_FLAG(break_on_failure)) - _set_abort_behavior( - 0x0, // Clear the following flags: - _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. -#endif // _MSC_VER >= 1400 - } - - __try { - return impl_->RunAllTests(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - printf("Exception thrown with code 0x%x.\nFAIL\n", GetExceptionCode()); - fflush(stdout); - return 1; - } - -#else // We are on a compiler or platform that doesn't support SEH. - - return impl_->RunAllTests(); -#endif // GTEST_HAS_SEH -} - -// Returns the working directory when the first TEST() or TEST_F() was -// executed. -const char* UnitTest::original_working_dir() const { - return impl_->original_working_dir_.c_str(); -} - -// Returns the TestCase object for the test that's currently running, -// or NULL if no test is running. -// L < mutex_ -const TestCase* UnitTest::current_test_case() const { - internal::MutexLock lock(&mutex_); - return impl_->current_test_case(); -} - -// Returns the TestInfo object for the test that's currently running, -// or NULL if no test is running. -// L < mutex_ -const TestInfo* UnitTest::current_test_info() const { - internal::MutexLock lock(&mutex_); - return impl_->current_test_info(); -} - -#if GTEST_HAS_PARAM_TEST -// Returns ParameterizedTestCaseRegistry object used to keep track of -// value-parameterized tests and instantiate and register them. -// L < mutex_ -internal::ParameterizedTestCaseRegistry& - UnitTest::parameterized_test_registry() { - return impl_->parameterized_test_registry(); -} -#endif // GTEST_HAS_PARAM_TEST - -// Creates an empty UnitTest. -UnitTest::UnitTest() { - impl_ = new internal::UnitTestImpl(this); -} - -// Destructor of UnitTest. -UnitTest::~UnitTest() { - delete impl_; -} - -// Pushes a trace defined by SCOPED_TRACE() on to the per-thread -// Google Test trace stack. -// L < mutex_ -void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) { - internal::MutexLock lock(&mutex_); - impl_->gtest_trace_stack()->PushFront(trace); -} - -// Pops a trace from the per-thread Google Test trace stack. -// L < mutex_ -void UnitTest::PopGTestTrace() { - internal::MutexLock lock(&mutex_); - impl_->gtest_trace_stack()->PopFront(NULL); -} - -namespace internal { - -UnitTestImpl::UnitTestImpl(UnitTest* parent) - : parent_(parent), -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4355) // Temporarily disables warning 4355 - // (using this in initializer). - default_global_test_part_result_reporter_(this), - default_per_thread_test_part_result_reporter_(this), -#pragma warning(pop) // Restores the warning state again. -#else - default_global_test_part_result_reporter_(this), - default_per_thread_test_part_result_reporter_(this), -#endif // _MSC_VER - global_test_part_result_repoter_( - &default_global_test_part_result_reporter_), - per_thread_test_part_result_reporter_( - &default_per_thread_test_part_result_reporter_), - test_cases_(), -#if GTEST_HAS_PARAM_TEST - parameterized_test_registry_(), - parameterized_tests_registered_(false), -#endif // GTEST_HAS_PARAM_TEST - last_death_test_case_(NULL), - current_test_case_(NULL), - current_test_info_(NULL), - ad_hoc_test_result_(), - result_printer_(NULL), - os_stack_trace_getter_(NULL), -#if GTEST_HAS_DEATH_TEST - elapsed_time_(0), - internal_run_death_test_flag_(NULL), - death_test_factory_(new DefaultDeathTestFactory) { -#else - elapsed_time_(0) { -#endif // GTEST_HAS_DEATH_TEST -} - -UnitTestImpl::~UnitTestImpl() { - // Deletes every TestCase. - test_cases_.ForEach(internal::Delete); - - // Deletes every Environment. - environments_.ForEach(internal::Delete); - - // Deletes the current test result printer. - delete result_printer_; - - delete os_stack_trace_getter_; -} - -// A predicate that checks the name of a TestCase against a known -// value. -// -// This is used for implementation of the UnitTest class only. We put -// it in the anonymous namespace to prevent polluting the outer -// namespace. -// -// TestCaseNameIs is copyable. -class TestCaseNameIs { - public: - // Constructor. - explicit TestCaseNameIs(const String& name) - : name_(name) {} - - // Returns true iff the name of test_case matches name_. - bool operator()(const TestCase* test_case) const { - return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0; - } - - private: - String name_; -}; - -// Finds and returns a TestCase with the given name. If one doesn't -// exist, creates one and returns it. -// -// Arguments: -// -// test_case_name: name of the test case -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -TestCase* UnitTestImpl::GetTestCase(const char* test_case_name, - const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc) { - // Can we find a TestCase with the given name? - internal::ListNode* node = test_cases_.FindIf( - TestCaseNameIs(test_case_name)); - - if (node == NULL) { - // No. Let's create one. - TestCase* const test_case = - new TestCase(test_case_name, comment, set_up_tc, tear_down_tc); - - // Is this a death test case? - if (internal::UnitTestOptions::MatchesFilter(String(test_case_name), - kDeathTestCaseFilter)) { - // Yes. Inserts the test case after the last death test case - // defined so far. - node = test_cases_.InsertAfter(last_death_test_case_, test_case); - last_death_test_case_ = node; - } else { - // No. Appends to the end of the list. - test_cases_.PushBack(test_case); - node = test_cases_.Last(); - } - } - - // Returns the TestCase found. - return node->element(); -} - -// Helpers for setting up / tearing down the given environment. They -// are for use in the List::ForEach() method. -static void SetUpEnvironment(Environment* env) { env->SetUp(); } -static void TearDownEnvironment(Environment* env) { env->TearDown(); } - -// Runs all tests in this UnitTest object, prints the result, and -// returns 0 if all tests are successful, or 1 otherwise. If any -// exception is thrown during a test on Windows, this test is -// considered to be failed, but the rest of the tests will still be -// run. (We disable exceptions on Linux and Mac OS X, so the issue -// doesn't apply there.) -// When parameterized tests are enabled, it explands and registers -// parameterized tests first in RegisterParameterizedTests(). -// All other functions called from RunAllTests() may safely assume that -// parameterized tests are ready to be counted and run. -int UnitTestImpl::RunAllTests() { - // Makes sure InitGoogleTest() was called. - if (!GTestIsInitialized()) { - printf("%s", - "\nThis test program did NOT call ::testing::InitGoogleTest " - "before calling RUN_ALL_TESTS(). Please fix it.\n"); - return 1; - } - - // Do not run any test if the --help flag was specified. - if (g_help_flag) - return 0; - - RegisterParameterizedTests(); - - // Even if sharding is not on, test runners may want to use the - // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding - // protocol. - internal::WriteToShardStatusFileIfNeeded(); - - // True iff we are in a subprocess for running a thread-safe-style - // death test. - bool in_subprocess_for_death_test = false; - -#if GTEST_HAS_DEATH_TEST - internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag()); - in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL); -#endif // GTEST_HAS_DEATH_TEST - - UnitTestEventListenerInterface * const printer = result_printer(); - - const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex, - in_subprocess_for_death_test); - - // Compares the full test names with the filter to decide which - // tests to run. - const bool has_tests_to_run = FilterTests(should_shard - ? HONOR_SHARDING_PROTOCOL - : IGNORE_SHARDING_PROTOCOL) > 0; - - // List the tests and exit if the --gtest_list_tests flag was specified. - if (GTEST_FLAG(list_tests)) { - // This must be called *after* FilterTests() has been called. - ListTestsMatchingFilter(); - return 0; - } - - // True iff at least one test has failed. - bool failed = false; - - // How many times to repeat the tests? We don't want to repeat them - // when we are inside the subprocess of a death test. - const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat); - // Repeats forever if the repeat count is negative. - const bool forever = repeat < 0; - for (int i = 0; forever || i != repeat; i++) { - if (repeat != 1) { - printf("\nRepeating all tests (iteration %d) . . .\n\n", i + 1); - } - - // Tells the unit test event listener that the tests are about to - // start. - printer->OnUnitTestStart(parent_); - - const TimeInMillis start = GetTimeInMillis(); - - // Runs each test case if there is at least one test to run. - if (has_tests_to_run) { - // Sets up all environments beforehand. - printer->OnGlobalSetUpStart(parent_); - environments_.ForEach(SetUpEnvironment); - printer->OnGlobalSetUpEnd(parent_); - - // Runs the tests only if there was no fatal failure during global - // set-up. - if (!Test::HasFatalFailure()) { - test_cases_.ForEach(TestCase::RunTestCase); - } - - // Tears down all environments in reverse order afterwards. - printer->OnGlobalTearDownStart(parent_); - environments_in_reverse_order_.ForEach(TearDownEnvironment); - printer->OnGlobalTearDownEnd(parent_); - } - - elapsed_time_ = GetTimeInMillis() - start; - - // Tells the unit test event listener that the tests have just - // finished. - printer->OnUnitTestEnd(parent_); - - // Gets the result and clears it. - if (!Passed()) { - failed = true; - } - ClearResult(); - } - - // Returns 0 if all tests passed, or 1 other wise. - return failed ? 1 : 0; -} - -// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file -// if the variable is present. If a file already exists at this location, this -// function will write over it. If the variable is present, but the file cannot -// be created, prints an error and exits. -void WriteToShardStatusFileIfNeeded() { - const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile); - if (test_shard_file != NULL) { - FILE* const file = posix::FOpen(test_shard_file, "w"); - if (file == NULL) { - ColoredPrintf(COLOR_RED, - "Could not write to the test shard status file \"%s\" " - "specified by the %s environment variable.\n", - test_shard_file, kTestShardStatusFile); - fflush(stdout); - exit(EXIT_FAILURE); - } - fclose(file); - } -} - -// Checks whether sharding is enabled by examining the relevant -// environment variable values. If the variables are present, -// but inconsistent (i.e., shard_index >= total_shards), prints -// an error and exits. If in_subprocess_for_death_test, sharding is -// disabled because it must only be applied to the original test -// process. Otherwise, we could filter out death tests we intended to execute. -bool ShouldShard(const char* total_shards_env, - const char* shard_index_env, - bool in_subprocess_for_death_test) { - if (in_subprocess_for_death_test) { - return false; - } - - const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1); - const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); - - if (total_shards == -1 && shard_index == -1) { - return false; - } else if (total_shards == -1 && shard_index != -1) { - const Message msg = Message() - << "Invalid environment variables: you have " - << kTestShardIndex << " = " << shard_index - << ", but have left " << kTestTotalShards << " unset.\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } else if (total_shards != -1 && shard_index == -1) { - const Message msg = Message() - << "Invalid environment variables: you have " - << kTestTotalShards << " = " << total_shards - << ", but have left " << kTestShardIndex << " unset.\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } else if (shard_index < 0 || shard_index >= total_shards) { - const Message msg = Message() - << "Invalid environment variables: we require 0 <= " - << kTestShardIndex << " < " << kTestTotalShards - << ", but you have " << kTestShardIndex << "=" << shard_index - << ", " << kTestTotalShards << "=" << total_shards << ".\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } - - return total_shards > 1; -} - -// Parses the environment variable var as an Int32. If it is unset, -// returns default_val. If it is not an Int32, prints an error -// and aborts. -Int32 Int32FromEnvOrDie(const char* const var, Int32 default_val) { - const char* str_val = posix::GetEnv(var); - if (str_val == NULL) { - return default_val; - } - - Int32 result; - if (!ParseInt32(Message() << "The value of environment variable " << var, - str_val, &result)) { - exit(EXIT_FAILURE); - } - return result; -} - -// Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is -// some arbitrary but unique non-negative integer assigned to each test -// method. Assumes that 0 <= shard_index < total_shards. -bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { - return (test_id % total_shards) == shard_index; -} - -// Compares the name of each test with the user-specified filter to -// decide whether the test should be run, then records the result in -// each TestCase and TestInfo object. -// If shard_tests == true, further filters tests based on sharding -// variables in the environment - see -// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide. -// Returns the number of tests that should run. -int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) { - const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ? - Int32FromEnvOrDie(kTestTotalShards, -1) : -1; - const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ? - Int32FromEnvOrDie(kTestShardIndex, -1) : -1; - - // num_runnable_tests are the number of tests that will - // run across all shards (i.e., match filter and are not disabled). - // num_selected_tests are the number of tests to be run on - // this shard. - int num_runnable_tests = 0; - int num_selected_tests = 0; - for (const internal::ListNode *test_case_node = - test_cases_.Head(); - test_case_node != NULL; - test_case_node = test_case_node->next()) { - TestCase * const test_case = test_case_node->element(); - const String &test_case_name = test_case->name(); - test_case->set_should_run(false); - - for (const internal::ListNode *test_info_node = - test_case->test_info_list().Head(); - test_info_node != NULL; - test_info_node = test_info_node->next()) { - TestInfo * const test_info = test_info_node->element(); - const String test_name(test_info->name()); - // A test is disabled if test case name or test name matches - // kDisableTestFilter. - const bool is_disabled = - internal::UnitTestOptions::MatchesFilter(test_case_name, - kDisableTestFilter) || - internal::UnitTestOptions::MatchesFilter(test_name, - kDisableTestFilter); - test_info->impl()->set_is_disabled(is_disabled); - - const bool matches_filter = - internal::UnitTestOptions::FilterMatchesTest(test_case_name, - test_name); - test_info->impl()->set_matches_filter(matches_filter); - - const bool is_runnable = - (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) && - matches_filter; - - const bool is_selected = is_runnable && - (shard_tests == IGNORE_SHARDING_PROTOCOL || - ShouldRunTestOnShard(total_shards, shard_index, - num_runnable_tests)); - - num_runnable_tests += is_runnable; - num_selected_tests += is_selected; - - test_info->impl()->set_should_run(is_selected); - test_case->set_should_run(test_case->should_run() || is_selected); - } - } - return num_selected_tests; -} - -// Prints the names of the tests matching the user-specified filter flag. -void UnitTestImpl::ListTestsMatchingFilter() { - for (const internal::ListNode* test_case_node = test_cases_.Head(); - test_case_node != NULL; - test_case_node = test_case_node->next()) { - const TestCase* const test_case = test_case_node->element(); - bool printed_test_case_name = false; - - for (const internal::ListNode* test_info_node = - test_case->test_info_list().Head(); - test_info_node != NULL; - test_info_node = test_info_node->next()) { - const TestInfo* const test_info = test_info_node->element(); - if (test_info->matches_filter()) { - if (!printed_test_case_name) { - printed_test_case_name = true; - printf("%s.\n", test_case->name()); - } - printf(" %s\n", test_info->name()); - } - } - } - fflush(stdout); -} - -// Sets the unit test result printer. -// -// Does nothing if the input and the current printer object are the -// same; otherwise, deletes the old printer object and makes the -// input the current printer. -void UnitTestImpl::set_result_printer( - UnitTestEventListenerInterface* result_printer) { - if (result_printer_ != result_printer) { - delete result_printer_; - result_printer_ = result_printer; - } -} - -// Returns the current unit test result printer if it is not NULL; -// otherwise, creates an appropriate result printer, makes it the -// current printer, and returns it. -UnitTestEventListenerInterface* UnitTestImpl::result_printer() { - if (result_printer_ != NULL) { - return result_printer_; - } - -#if GTEST_HAS_DEATH_TEST - if (internal_run_death_test_flag_.get() != NULL) { - result_printer_ = new NullUnitTestResultPrinter; - return result_printer_; - } -#endif // GTEST_HAS_DEATH_TEST - - UnitTestEventsRepeater *repeater = new UnitTestEventsRepeater; - const String& output_format = internal::UnitTestOptions::GetOutputFormat(); - if (output_format == "xml") { - repeater->AddListener(new XmlUnitTestResultPrinter( - internal::UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); - } else if (output_format != "") { - printf("WARNING: unrecognized output format \"%s\" ignored.\n", - output_format.c_str()); - fflush(stdout); - } - repeater->AddListener(new PrettyUnitTestResultPrinter); - result_printer_ = repeater; - return result_printer_; -} - -// Sets the OS stack trace getter. -// -// Does nothing if the input and the current OS stack trace getter are -// the same; otherwise, deletes the old getter and makes the input the -// current getter. -void UnitTestImpl::set_os_stack_trace_getter( - OsStackTraceGetterInterface* getter) { - if (os_stack_trace_getter_ != getter) { - delete os_stack_trace_getter_; - os_stack_trace_getter_ = getter; - } -} - -// Returns the current OS stack trace getter if it is not NULL; -// otherwise, creates an OsStackTraceGetter, makes it the current -// getter, and returns it. -OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() { - if (os_stack_trace_getter_ == NULL) { - os_stack_trace_getter_ = new OsStackTraceGetter; - } - - return os_stack_trace_getter_; -} - -// Returns the TestResult for the test that's currently running, or -// the TestResult for the ad hoc test if no test is running. -internal::TestResult* UnitTestImpl::current_test_result() { - return current_test_info_ ? - current_test_info_->impl()->result() : &ad_hoc_test_result_; -} - -// TestInfoImpl constructor. The new instance assumes ownership of the test -// factory object. -TestInfoImpl::TestInfoImpl(TestInfo* parent, - const char* test_case_name, - const char* name, - const char* test_case_comment, - const char* comment, - TypeId fixture_class_id, - internal::TestFactoryBase* factory) : - parent_(parent), - test_case_name_(String(test_case_name)), - name_(String(name)), - test_case_comment_(String(test_case_comment)), - comment_(String(comment)), - fixture_class_id_(fixture_class_id), - should_run_(false), - is_disabled_(false), - matches_filter_(false), - factory_(factory) { -} - -// TestInfoImpl destructor. -TestInfoImpl::~TestInfoImpl() { - delete factory_; -} - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in -// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, int skip_count) { - // We pass skip_count + 1 to skip this wrapper function in addition - // to what the user really wants to skip. - return unit_test->impl()->CurrentOsStackTraceExceptTop(skip_count + 1); -} - -// Returns the number of failed test parts in the given test result object. -int GetFailedPartCount(const TestResult* result) { - return result->failed_part_count(); -} - -// Used by the GTEST_HIDE_UNREACHABLE_CODE_ macro to suppress unreachable -// code warnings. -namespace { -class ClassUniqueToAlwaysTrue {}; -} - -bool AlwaysTrue() { -#if GTEST_HAS_EXCEPTIONS - // This condition is always false so AlwaysTrue() never actually throws, - // but it makes the compiler think that it may throw. - if (atoi("42") == 36) // NOLINT - throw ClassUniqueToAlwaysTrue(); -#endif // GTEST_HAS_EXCEPTIONS - return true; -} - -// Parses a string as a command line flag. The string should have -// the format "--flag=value". When def_optional is true, the "=value" -// part can be omitted. -// -// Returns the value of the flag, or NULL if the parsing failed. -const char* ParseFlagValue(const char* str, - const char* flag, - bool def_optional) { - // str and flag must not be NULL. - if (str == NULL || flag == NULL) return NULL; - - // The flag must start with "--" followed by GTEST_FLAG_PREFIX_. - const String flag_str = String::Format("--%s%s", GTEST_FLAG_PREFIX_, flag); - const size_t flag_len = flag_str.GetLength(); - if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL; - - // Skips the flag name. - const char* flag_end = str + flag_len; - - // When def_optional is true, it's OK to not have a "=value" part. - if (def_optional && (flag_end[0] == '\0')) { - return flag_end; - } - - // If def_optional is true and there are more characters after the - // flag name, or if def_optional is false, there must be a '=' after - // the flag name. - if (flag_end[0] != '=') return NULL; - - // Returns the string after "=". - return flag_end + 1; -} - -// Parses a string for a bool flag, in the form of either -// "--flag=value" or "--flag". -// -// In the former case, the value is taken as true as long as it does -// not start with '0', 'f', or 'F'. -// -// In the latter case, the value is taken as true. -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseBoolFlag(const char* str, const char* flag, bool* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, true); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Converts the string value to a bool. - *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); - return true; -} - -// Parses a string for an Int32 flag, in the form of -// "--flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseInt32Flag(const char* str, const char* flag, Int32* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, false); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Sets *value to the value of the flag. - return ParseInt32(Message() << "The value of flag --" << flag, - value_str, value); -} - -// Parses a string for a string flag, in the form of -// "--flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseStringFlag(const char* str, const char* flag, String* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, false); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Sets *value to the value of the flag. - *value = value_str; - return true; -} - -// Prints a string containing code-encoded text. The following escape -// sequences can be used in the string to control the text color: -// -// @@ prints a single '@' character. -// @R changes the color to red. -// @G changes the color to green. -// @Y changes the color to yellow. -// @D changes to the default terminal text color. -// -// TODO(wan@google.com): Write tests for this once we add stdout -// capturing to Google Test. -static void PrintColorEncoded(const char* str) { - GTestColor color = COLOR_DEFAULT; // The current color. - - // Conceptually, we split the string into segments divided by escape - // sequences. Then we print one segment at a time. At the end of - // each iteration, the str pointer advances to the beginning of the - // next segment. - for (;;) { - const char* p = strchr(str, '@'); - if (p == NULL) { - ColoredPrintf(color, "%s", str); - return; - } - - ColoredPrintf(color, "%s", String(str, p - str).c_str()); - - const char ch = p[1]; - str = p + 2; - if (ch == '@') { - ColoredPrintf(color, "@"); - } else if (ch == 'D') { - color = COLOR_DEFAULT; - } else if (ch == 'R') { - color = COLOR_RED; - } else if (ch == 'G') { - color = COLOR_GREEN; - } else if (ch == 'Y') { - color = COLOR_YELLOW; - } else { - --str; - } - } -} - -static const char kColorEncodedHelpMessage[] = -"This program contains tests written using " GTEST_NAME_ ". You can use the\n" -"following command line flags to control its behavior:\n" -"\n" -"Test Selection:\n" -" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n" -" List the names of all tests instead of running them. The name of\n" -" TEST(Foo, Bar) is \"Foo.Bar\".\n" -" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS" - "[@G-@YNEGATIVE_PATTERNS]@D\n" -" Run only the tests whose name matches one of the positive patterns but\n" -" none of the negative patterns. '?' matches any single character; '*'\n" -" matches any substring; ':' separates two patterns.\n" -" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n" -" Run all disabled tests too.\n" -" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n" -" Run the tests repeatedly; use a negative count to repeat forever.\n" -"\n" -"Test Output:\n" -" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n" -" Enable/disable colored output. The default is @Gauto@D.\n" -" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n" -" Don't print the elapsed time of each test.\n" -" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G" - GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n" -" Generate an XML report in the given directory or with the given file\n" -" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n" -"\n" -"Assertion Behavior:\n" -#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n" -" Set the default death test style.\n" -#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n" -" Turn assertion failures into debugger break-points.\n" -" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n" -" Turn assertion failures into C++ exceptions.\n" -#if GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions@D\n" -" Suppress pop-ups caused by exceptions.\n" -#endif // GTEST_OS_WINDOWS -"\n" -"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set " - "the corresponding\n" -"environment variable of a flag (all letters in upper-case). For example, to\n" -"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_ - "color=no@D or set\n" -"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n" -"\n" -"For more information, please read the " GTEST_NAME_ " documentation at\n" -"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n" -"(not one in your own code or tests), please report it to\n" -"@G<" GTEST_DEV_EMAIL_ ">@D.\n"; - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. The type parameter CharType can be -// instantiated to either char or wchar_t. -template -void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { - for (int i = 1; i < *argc; i++) { - const String arg_string = StreamableToString(argv[i]); - const char* const arg = arg_string.c_str(); - - using internal::ParseBoolFlag; - using internal::ParseInt32Flag; - using internal::ParseStringFlag; - - // Do we see a Google Test flag? - if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag, - >EST_FLAG(also_run_disabled_tests)) || - ParseBoolFlag(arg, kBreakOnFailureFlag, - >EST_FLAG(break_on_failure)) || - ParseBoolFlag(arg, kCatchExceptionsFlag, - >EST_FLAG(catch_exceptions)) || - ParseStringFlag(arg, kColorFlag, >EST_FLAG(color)) || - ParseStringFlag(arg, kDeathTestStyleFlag, - >EST_FLAG(death_test_style)) || - ParseBoolFlag(arg, kDeathTestUseFork, - >EST_FLAG(death_test_use_fork)) || - ParseStringFlag(arg, kFilterFlag, >EST_FLAG(filter)) || - ParseStringFlag(arg, kInternalRunDeathTestFlag, - >EST_FLAG(internal_run_death_test)) || - ParseBoolFlag(arg, kListTestsFlag, >EST_FLAG(list_tests)) || - ParseStringFlag(arg, kOutputFlag, >EST_FLAG(output)) || - ParseBoolFlag(arg, kPrintTimeFlag, >EST_FLAG(print_time)) || - ParseInt32Flag(arg, kRepeatFlag, >EST_FLAG(repeat)) || - ParseBoolFlag(arg, kThrowOnFailureFlag, >EST_FLAG(throw_on_failure)) - ) { - // Yes. Shift the remainder of the argv list left by one. Note - // that argv has (*argc + 1) elements, the last one always being - // NULL. The following loop moves the trailing NULL element as - // well. - for (int j = i; j != *argc; j++) { - argv[j] = argv[j + 1]; - } - - // Decrements the argument count. - (*argc)--; - - // We also need to decrement the iterator as we just removed - // an element. - i--; - } else if (arg_string == "--help" || arg_string == "-h" || - arg_string == "-?" || arg_string == "/?") { - g_help_flag = true; - } - } - - if (g_help_flag) { - // We print the help here instead of in RUN_ALL_TESTS(), as the - // latter may not be called at all if the user is using Google - // Test with another testing framework. - PrintColorEncoded(kColorEncodedHelpMessage); - } -} - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. -void ParseGoogleTestFlagsOnly(int* argc, char** argv) { - ParseGoogleTestFlagsOnlyImpl(argc, argv); -} -void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { - ParseGoogleTestFlagsOnlyImpl(argc, argv); -} - -// The internal implementation of InitGoogleTest(). -// -// The type parameter CharType can be instantiated to either char or -// wchar_t. -template -void InitGoogleTestImpl(int* argc, CharType** argv) { - g_init_gtest_count++; - - // We don't want to run the initialization code twice. - if (g_init_gtest_count != 1) return; - - if (*argc <= 0) return; - - internal::g_executable_path = internal::StreamableToString(argv[0]); - -#if GTEST_HAS_DEATH_TEST - g_argvs.clear(); - for (int i = 0; i != *argc; i++) { - g_argvs.push_back(StreamableToString(argv[i])); - } -#endif // GTEST_HAS_DEATH_TEST - - ParseGoogleTestFlagsOnly(argc, argv); -} - -} // namespace internal - -// Initializes Google Test. This must be called before calling -// RUN_ALL_TESTS(). In particular, it parses a command line for the -// flags that Google Test recognizes. Whenever a Google Test flag is -// seen, it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Test flag variables are -// updated. -// -// Calling the function for the second time has no user-visible effect. -void InitGoogleTest(int* argc, char** argv) { - internal::InitGoogleTestImpl(argc, argv); -} - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleTest(int* argc, wchar_t** argv) { - internal::InitGoogleTestImpl(argc, argv); -} - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest_main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest_main.cc deleted file mode 100644 index d20c02fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/src/gtest_main.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include - -int main(int argc, char **argv) { - std::cout << "Running main() from gtest_main.cc\n"; - - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-death-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-death-test_test.cc deleted file mode 100644 index 9dd477b2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-death-test_test.cc +++ /dev/null @@ -1,1133 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for death tests. - -#include -#include -#include - -#if GTEST_HAS_DEATH_TEST - -#if GTEST_OS_WINDOWS -#include // For chdir(). -#else -#include -#include // For waitpid. -#include // For std::numeric_limits. -#endif // GTEST_OS_WINDOWS - -#include -#include -#include - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace posix = ::testing::internal::posix; - -using testing::Message; -using testing::internal::DeathTest; -using testing::internal::DeathTestFactory; -using testing::internal::FilePath; -using testing::internal::GetLastErrnoDescription; -using testing::internal::ParseNaturalNumber; -using testing::internal::String; - -namespace testing { -namespace internal { - -// A helper class whose objects replace the death test factory for a -// single UnitTest object during their lifetimes. -class ReplaceDeathTestFactory { - public: - ReplaceDeathTestFactory(UnitTest* parent, DeathTestFactory* new_factory) - : parent_impl_(parent->impl()) { - old_factory_ = parent_impl_->death_test_factory_.release(); - parent_impl_->death_test_factory_.reset(new_factory); - } - - ~ReplaceDeathTestFactory() { - parent_impl_->death_test_factory_.release(); - parent_impl_->death_test_factory_.reset(old_factory_); - } - private: - // Prevents copying ReplaceDeathTestFactory objects. - ReplaceDeathTestFactory(const ReplaceDeathTestFactory&); - void operator=(const ReplaceDeathTestFactory&); - - UnitTestImpl* parent_impl_; - DeathTestFactory* old_factory_; -}; - -} // namespace internal -} // namespace testing - -// Tests that death tests work. - -class TestForDeathTest : public testing::Test { - protected: - TestForDeathTest() : original_dir_(FilePath::GetCurrentDir()) {} - - virtual ~TestForDeathTest() { - posix::ChDir(original_dir_.c_str()); - } - - // A static member function that's expected to die. - static void StaticMemberFunction() { - fprintf(stderr, "%s", "death inside StaticMemberFunction()."); - fflush(stderr); - // We call _exit() instead of exit(), as the former is a direct - // system call and thus safer in the presence of threads. exit() - // will invoke user-defined exit-hooks, which may do dangerous - // things that conflict with death tests. - _exit(1); - } - - // A method of the test fixture that may die. - void MemberFunction() { - if (should_die_) { - fprintf(stderr, "%s", "death inside MemberFunction()."); - fflush(stderr); - _exit(1); - } - } - - // True iff MemberFunction() should die. - bool should_die_; - const FilePath original_dir_; -}; - -// A class with a member function that may die. -class MayDie { - public: - explicit MayDie(bool should_die) : should_die_(should_die) {} - - // A member function that may die. - void MemberFunction() const { - if (should_die_) { - GTEST_LOG_(FATAL, "death inside MayDie::MemberFunction()."); - } - } - - private: - // True iff MemberFunction() should die. - bool should_die_; -}; - -// A global function that's expected to die. -void GlobalFunction() { - GTEST_LOG_(FATAL, "death inside GlobalFunction()."); -} - -// A non-void function that's expected to die. -int NonVoidFunction() { - GTEST_LOG_(FATAL, "death inside NonVoidFunction()."); - return 1; -} - -// A unary function that may die. -void DieIf(bool should_die) { - if (should_die) { - GTEST_LOG_(FATAL, "death inside DieIf()."); - } -} - -// A binary function that may die. -bool DieIfLessThan(int x, int y) { - if (x < y) { - GTEST_LOG_(FATAL, "death inside DieIfLessThan()."); - } - return true; -} - -// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture. -void DeathTestSubroutine() { - EXPECT_DEATH(GlobalFunction(), "death.*GlobalFunction"); - ASSERT_DEATH(GlobalFunction(), "death.*GlobalFunction"); -} - -// Death in dbg, not opt. -int DieInDebugElse12(int* sideeffect) { - if (sideeffect) *sideeffect = 12; -#ifndef NDEBUG - GTEST_LOG_(FATAL, "debug death inside DieInDebugElse12()"); -#endif // NDEBUG - return 12; -} - -#if GTEST_OS_WINDOWS - -// Tests the ExitedWithCode predicate. -TEST(ExitStatusPredicateTest, ExitedWithCode) { - // On Windows, the process's exit code is the same as its exit status, - // so the predicate just compares the its input with its parameter. - EXPECT_TRUE(testing::ExitedWithCode(0)(0)); - EXPECT_TRUE(testing::ExitedWithCode(1)(1)); - EXPECT_TRUE(testing::ExitedWithCode(42)(42)); - EXPECT_FALSE(testing::ExitedWithCode(0)(1)); - EXPECT_FALSE(testing::ExitedWithCode(1)(0)); -} - -#else - -// Returns the exit status of a process that calls _exit(2) with a -// given exit code. This is a helper function for the -// ExitStatusPredicateTest test suite. -static int NormalExitStatus(int exit_code) { - pid_t child_pid = fork(); - if (child_pid == 0) { - _exit(exit_code); - } - int status; - waitpid(child_pid, &status, 0); - return status; -} - -// Returns the exit status of a process that raises a given signal. -// If the signal does not cause the process to die, then it returns -// instead the exit status of a process that exits normally with exit -// code 1. This is a helper function for the ExitStatusPredicateTest -// test suite. -static int KilledExitStatus(int signum) { - pid_t child_pid = fork(); - if (child_pid == 0) { - raise(signum); - _exit(1); - } - int status; - waitpid(child_pid, &status, 0); - return status; -} - -// Tests the ExitedWithCode predicate. -TEST(ExitStatusPredicateTest, ExitedWithCode) { - const int status0 = NormalExitStatus(0); - const int status1 = NormalExitStatus(1); - const int status42 = NormalExitStatus(42); - const testing::ExitedWithCode pred0(0); - const testing::ExitedWithCode pred1(1); - const testing::ExitedWithCode pred42(42); - EXPECT_PRED1(pred0, status0); - EXPECT_PRED1(pred1, status1); - EXPECT_PRED1(pred42, status42); - EXPECT_FALSE(pred0(status1)); - EXPECT_FALSE(pred42(status0)); - EXPECT_FALSE(pred1(status42)); -} - -// Tests the KilledBySignal predicate. -TEST(ExitStatusPredicateTest, KilledBySignal) { - const int status_segv = KilledExitStatus(SIGSEGV); - const int status_kill = KilledExitStatus(SIGKILL); - const testing::KilledBySignal pred_segv(SIGSEGV); - const testing::KilledBySignal pred_kill(SIGKILL); - EXPECT_PRED1(pred_segv, status_segv); - EXPECT_PRED1(pred_kill, status_kill); - EXPECT_FALSE(pred_segv(status_kill)); - EXPECT_FALSE(pred_kill(status_segv)); -} - -#endif // GTEST_OS_WINDOWS - -// Tests that the death test macros expand to code which may or may not -// be followed by operator<<, and that in either case the complete text -// comprises only a single C++ statement. -TEST_F(TestForDeathTest, SingleStatement) { - if (false) - // This would fail if executed; this is a compilation test only - ASSERT_DEATH(return, ""); - - if (true) - EXPECT_DEATH(_exit(1), ""); - else - // This empty "else" branch is meant to ensure that EXPECT_DEATH - // doesn't expand into an "if" statement without an "else" - ; - - if (false) - ASSERT_DEATH(return, "") << "did not die"; - - if (false) - ; - else - EXPECT_DEATH(_exit(1), "") << 1 << 2 << 3; -} - -void DieWithEmbeddedNul() { - fprintf(stderr, "Hello%cworld.\n", '\0'); - fflush(stderr); - _exit(1); -} - -#if GTEST_USES_PCRE -// Tests that EXPECT_DEATH and ASSERT_DEATH work when the error -// message has a NUL character in it. -TEST_F(TestForDeathTest, EmbeddedNulInMessage) { - // TODO(wan@google.com): doesn't support matching strings - // with embedded NUL characters - find a way to workaround it. - EXPECT_DEATH(DieWithEmbeddedNul(), "w.*ld"); - ASSERT_DEATH(DieWithEmbeddedNul(), "w.*ld"); -} -#endif // GTEST_USES_PCRE - -// Tests that death test macros expand to code which interacts well with switch -// statements. -TEST_F(TestForDeathTest, SwitchStatement) { -// Microsoft compiler usually complains about switch statements without -// case labels. We suppress that warning for this test. -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4065) -#endif // _MSC_VER - - switch (0) - default: - ASSERT_DEATH(_exit(1), "") << "exit in default switch handler"; - - switch (0) - case 0: - EXPECT_DEATH(_exit(1), "") << "exit in switch case"; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER -} - -// Tests that a static member function can be used in a "fast" style -// death test. -TEST_F(TestForDeathTest, StaticMemberFunctionFastStyle) { - testing::GTEST_FLAG(death_test_style) = "fast"; - ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember"); -} - -// Tests that a method of the test fixture can be used in a "fast" -// style death test. -TEST_F(TestForDeathTest, MemberFunctionFastStyle) { - testing::GTEST_FLAG(death_test_style) = "fast"; - should_die_ = true; - EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction"); -} - -void ChangeToRootDir() { posix::ChDir(GTEST_PATH_SEP_); } - -// Tests that death tests work even if the current directory has been -// changed. -TEST_F(TestForDeathTest, FastDeathTestInChangedDir) { - testing::GTEST_FLAG(death_test_style) = "fast"; - - ChangeToRootDir(); - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - - ChangeToRootDir(); - ASSERT_DEATH(_exit(1), ""); -} - -// Repeats a representative sample of death tests in the "threadsafe" style: - -TEST_F(TestForDeathTest, StaticMemberFunctionThreadsafeStyle) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember"); -} - -TEST_F(TestForDeathTest, MemberFunctionThreadsafeStyle) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - should_die_ = true; - EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction"); -} - -TEST_F(TestForDeathTest, ThreadsafeDeathTestInLoop) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - - for (int i = 0; i < 3; ++i) - EXPECT_EXIT(_exit(i), testing::ExitedWithCode(i), "") << ": i = " << i; -} - -TEST_F(TestForDeathTest, ThreadsafeDeathTestInChangedDir) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - - ChangeToRootDir(); - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - - ChangeToRootDir(); - ASSERT_DEATH(_exit(1), ""); -} - -TEST_F(TestForDeathTest, MixedStyles) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - EXPECT_DEATH(_exit(1), ""); - testing::GTEST_FLAG(death_test_style) = "fast"; - EXPECT_DEATH(_exit(1), ""); -} - -namespace { - -bool pthread_flag; - -void SetPthreadFlag() { - pthread_flag = true; -} - -} // namespace - -#if GTEST_HAS_CLONE - -TEST_F(TestForDeathTest, DoesNotExecuteAtforkHooks) { - if (!testing::GTEST_FLAG(death_test_use_fork)) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - pthread_flag = false; - ASSERT_EQ(0, pthread_atfork(&SetPthreadFlag, NULL, NULL)); - ASSERT_DEATH(_exit(1), ""); - ASSERT_FALSE(pthread_flag); - } -} - -#endif // GTEST_HAS_CLONE - -// Tests that a method of another class can be used in a death test. -TEST_F(TestForDeathTest, MethodOfAnotherClass) { - const MayDie x(true); - ASSERT_DEATH(x.MemberFunction(), "MayDie\\:\\:MemberFunction"); -} - -// Tests that a global function can be used in a death test. -TEST_F(TestForDeathTest, GlobalFunction) { - EXPECT_DEATH(GlobalFunction(), "GlobalFunction"); -} - -// Tests that any value convertible to an RE works as a second -// argument to EXPECT_DEATH. -TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) { - static const char regex_c_str[] = "GlobalFunction"; - EXPECT_DEATH(GlobalFunction(), regex_c_str); - - const testing::internal::RE regex(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex); - -#if GTEST_HAS_GLOBAL_STRING - const string regex_str(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex_str); -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING - const ::std::string regex_std_str(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex_std_str); -#endif // GTEST_HAS_STD_STRING -} - -// Tests that a non-void function can be used in a death test. -TEST_F(TestForDeathTest, NonVoidFunction) { - ASSERT_DEATH(NonVoidFunction(), "NonVoidFunction"); -} - -// Tests that functions that take parameter(s) can be used in a death test. -TEST_F(TestForDeathTest, FunctionWithParameter) { - EXPECT_DEATH(DieIf(true), "DieIf\\(\\)"); - EXPECT_DEATH(DieIfLessThan(2, 3), "DieIfLessThan"); -} - -// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture. -TEST_F(TestForDeathTest, OutsideFixture) { - DeathTestSubroutine(); -} - -// Tests that death tests can be done inside a loop. -TEST_F(TestForDeathTest, InsideLoop) { - for (int i = 0; i < 5; i++) { - EXPECT_DEATH(DieIfLessThan(-1, i), "DieIfLessThan") << "where i == " << i; - } -} - -// Tests that a compound statement can be used in a death test. -TEST_F(TestForDeathTest, CompoundStatement) { - EXPECT_DEATH({ // NOLINT - const int x = 2; - const int y = x + 1; - DieIfLessThan(x, y); - }, - "DieIfLessThan"); -} - -// Tests that code that doesn't die causes a death test to fail. -TEST_F(TestForDeathTest, DoesNotDie) { - EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(DieIf(false), "DieIf"), - "failed to die"); -} - -// Tests that a death test fails when the error message isn't expected. -TEST_F(TestForDeathTest, ErrorMessageMismatch) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(DieIf(true), "DieIfLessThan") << "End of death test message."; - }, "died but not with expected error"); -} - -// On exit, *aborted will be true iff the EXPECT_DEATH() statement -// aborted the function. -void ExpectDeathTestHelper(bool* aborted) { - *aborted = true; - EXPECT_DEATH(DieIf(false), "DieIf"); // This assertion should fail. - *aborted = false; -} - -// Tests that EXPECT_DEATH doesn't abort the test on failure. -TEST_F(TestForDeathTest, EXPECT_DEATH) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(ExpectDeathTestHelper(&aborted), - "failed to die"); - EXPECT_FALSE(aborted); -} - -// Tests that ASSERT_DEATH does abort the test on failure. -TEST_F(TestForDeathTest, ASSERT_DEATH) { - static bool aborted; - EXPECT_FATAL_FAILURE({ // NOLINT - aborted = true; - ASSERT_DEATH(DieIf(false), "DieIf"); // This assertion should fail. - aborted = false; - }, "failed to die"); - EXPECT_TRUE(aborted); -} - -// Tests that EXPECT_DEATH evaluates the arguments exactly once. -TEST_F(TestForDeathTest, SingleEvaluation) { - int x = 3; - EXPECT_DEATH(DieIf((++x) == 4), "DieIf"); - - const char* regex = "DieIf"; - const char* regex_save = regex; - EXPECT_DEATH(DieIfLessThan(3, 4), regex++); - EXPECT_EQ(regex_save + 1, regex); -} - -// Tests that run-away death tests are reported as failures. -TEST_F(TestForDeathTest, Runaway) { - EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(static_cast(0), "Foo"), - "failed to die."); - - EXPECT_FATAL_FAILURE(ASSERT_DEATH(return, "Bar"), - "illegal return in test statement."); -} - - -// Tests that EXPECT_DEBUG_DEATH works as expected, -// that is, in debug mode, it: -// 1. Asserts on death. -// 2. Has no side effect. -// -// And in opt mode, it: -// 1. Has side effects but does not assert. -TEST_F(TestForDeathTest, TestExpectDebugDeath) { - int sideeffect = 0; - - EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), - "death.*DieInDebugElse12"); - -#ifdef NDEBUG - // Checks that the assignment occurs in opt mode (sideeffect). - EXPECT_EQ(12, sideeffect); -#else - // Checks that the assignment does not occur in dbg mode (no sideeffect). - EXPECT_EQ(0, sideeffect); -#endif -} - -// Tests that ASSERT_DEBUG_DEATH works as expected -// In debug mode: -// 1. Asserts on debug death. -// 2. Has no side effect. -// -// In opt mode: -// 1. Has side effects and returns the expected value (12). -TEST_F(TestForDeathTest, TestAssertDebugDeath) { - int sideeffect = 0; - - ASSERT_DEBUG_DEATH({ // NOLINT - // Tests that the return value is 12 in opt mode. - EXPECT_EQ(12, DieInDebugElse12(&sideeffect)); - // Tests that the side effect occurred in opt mode. - EXPECT_EQ(12, sideeffect); - }, "death.*DieInDebugElse12"); - -#ifdef NDEBUG - // Checks that the assignment occurs in opt mode (sideeffect). - EXPECT_EQ(12, sideeffect); -#else - // Checks that the assignment does not occur in dbg mode (no sideeffect). - EXPECT_EQ(0, sideeffect); -#endif -} - -#ifndef NDEBUG - -void ExpectDebugDeathHelper(bool* aborted) { - *aborted = true; - EXPECT_DEBUG_DEATH(return, "") << "This is expected to fail."; - *aborted = false; -} - -#if GTEST_OS_WINDOWS -TEST(PopUpDeathTest, DoesNotShowPopUpOnAbort) { - printf("This test should be considered failing if it shows " - "any pop-up dialogs.\n"); - fflush(stdout); - - EXPECT_DEATH({ - testing::GTEST_FLAG(catch_exceptions) = false; - abort(); - }, ""); -} - -TEST(PopUpDeathTest, DoesNotShowPopUpOnThrow) { - printf("This test should be considered failing if it shows " - "any pop-up dialogs.\n"); - fflush(stdout); - - EXPECT_DEATH({ - testing::GTEST_FLAG(catch_exceptions) = false; - throw 1; - }, ""); -} -#endif // GTEST_OS_WINDOWS - -// Tests that EXPECT_DEBUG_DEATH in debug mode does not abort -// the function. -TEST_F(TestForDeathTest, ExpectDebugDeathDoesNotAbort) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(ExpectDebugDeathHelper(&aborted), ""); - EXPECT_FALSE(aborted); -} - -void AssertDebugDeathHelper(bool* aborted) { - *aborted = true; - ASSERT_DEBUG_DEATH(return, "") << "This is expected to fail."; - *aborted = false; -} - -// Tests that ASSERT_DEBUG_DEATH in debug mode aborts the function on -// failure. -TEST_F(TestForDeathTest, AssertDebugDeathAborts) { - static bool aborted; - aborted = false; - EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), ""); - EXPECT_TRUE(aborted); -} - -#endif // _NDEBUG - -// Tests the *_EXIT family of macros, using a variety of predicates. -static void TestExitMacros() { - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - ASSERT_EXIT(_exit(42), testing::ExitedWithCode(42), ""); - -#if GTEST_OS_WINDOWS - EXPECT_EXIT({ - testing::GTEST_FLAG(catch_exceptions) = false; - *static_cast(NULL) = 1; - }, testing::ExitedWithCode(0xC0000005), "") << "foo"; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EXIT({ - testing::GTEST_FLAG(catch_exceptions) = false; - *static_cast(NULL) = 1; - }, testing::ExitedWithCode(0), "") << "This failure is expected."; - }, "This failure is expected."); - - // Of all signals effects on the process exit code, only those of SIGABRT - // are documented on Windows. - // See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx. - EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), ""); -#else - EXPECT_EXIT(raise(SIGKILL), testing::KilledBySignal(SIGKILL), "") << "foo"; - ASSERT_EXIT(raise(SIGUSR2), testing::KilledBySignal(SIGUSR2), "") << "bar"; - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EXIT(_exit(0), testing::KilledBySignal(SIGSEGV), "") - << "This failure is expected, too."; - }, "This failure is expected, too."); -#endif // GTEST_OS_WINDOWS - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EXIT(raise(SIGSEGV), testing::ExitedWithCode(0), "") - << "This failure is expected."; - }, "This failure is expected."); -} - -TEST_F(TestForDeathTest, ExitMacros) { - TestExitMacros(); -} - -TEST_F(TestForDeathTest, ExitMacrosUsingFork) { - testing::GTEST_FLAG(death_test_use_fork) = true; - TestExitMacros(); -} - -TEST_F(TestForDeathTest, InvalidStyle) { - testing::GTEST_FLAG(death_test_style) = "rococo"; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(_exit(0), "") << "This failure is expected."; - }, "This failure is expected."); -} - -// A DeathTestFactory that returns MockDeathTests. -class MockDeathTestFactory : public DeathTestFactory { - public: - MockDeathTestFactory(); - virtual bool Create(const char* statement, - const ::testing::internal::RE* regex, - const char* file, int line, DeathTest** test); - - // Sets the parameters for subsequent calls to Create. - void SetParameters(bool create, DeathTest::TestRole role, - int status, bool passed); - - // Accessors. - int AssumeRoleCalls() const { return assume_role_calls_; } - int WaitCalls() const { return wait_calls_; } - int PassedCalls() const { return passed_args_.size(); } - bool PassedArgument(int n) const { return passed_args_[n]; } - int AbortCalls() const { return abort_args_.size(); } - DeathTest::AbortReason AbortArgument(int n) const { - return abort_args_[n]; - } - bool TestDeleted() const { return test_deleted_; } - - private: - friend class MockDeathTest; - // If true, Create will return a MockDeathTest; otherwise it returns - // NULL. - bool create_; - // The value a MockDeathTest will return from its AssumeRole method. - DeathTest::TestRole role_; - // The value a MockDeathTest will return from its Wait method. - int status_; - // The value a MockDeathTest will return from its Passed method. - bool passed_; - - // Number of times AssumeRole was called. - int assume_role_calls_; - // Number of times Wait was called. - int wait_calls_; - // The arguments to the calls to Passed since the last call to - // SetParameters. - std::vector passed_args_; - // The arguments to the calls to Abort since the last call to - // SetParameters. - std::vector abort_args_; - // True if the last MockDeathTest returned by Create has been - // deleted. - bool test_deleted_; -}; - - -// A DeathTest implementation useful in testing. It returns values set -// at its creation from its various inherited DeathTest methods, and -// reports calls to those methods to its parent MockDeathTestFactory -// object. -class MockDeathTest : public DeathTest { - public: - MockDeathTest(MockDeathTestFactory *parent, - TestRole role, int status, bool passed) : - parent_(parent), role_(role), status_(status), passed_(passed) { - } - virtual ~MockDeathTest() { - parent_->test_deleted_ = true; - } - virtual TestRole AssumeRole() { - ++parent_->assume_role_calls_; - return role_; - } - virtual int Wait() { - ++parent_->wait_calls_; - return status_; - } - virtual bool Passed(bool exit_status_ok) { - parent_->passed_args_.push_back(exit_status_ok); - return passed_; - } - virtual void Abort(AbortReason reason) { - parent_->abort_args_.push_back(reason); - } - private: - MockDeathTestFactory* const parent_; - const TestRole role_; - const int status_; - const bool passed_; -}; - - -// MockDeathTestFactory constructor. -MockDeathTestFactory::MockDeathTestFactory() - : create_(true), - role_(DeathTest::OVERSEE_TEST), - status_(0), - passed_(true), - assume_role_calls_(0), - wait_calls_(0), - passed_args_(), - abort_args_() { -} - - -// Sets the parameters for subsequent calls to Create. -void MockDeathTestFactory::SetParameters(bool create, - DeathTest::TestRole role, - int status, bool passed) { - create_ = create; - role_ = role; - status_ = status; - passed_ = passed; - - assume_role_calls_ = 0; - wait_calls_ = 0; - passed_args_.clear(); - abort_args_.clear(); -} - - -// Sets test to NULL (if create_ is false) or to the address of a new -// MockDeathTest object with parameters taken from the last call -// to SetParameters (if create_ is true). Always returns true. -bool MockDeathTestFactory::Create(const char* statement, - const ::testing::internal::RE* regex, - const char* file, int line, - DeathTest** test) { - test_deleted_ = false; - if (create_) { - *test = new MockDeathTest(this, role_, status_, passed_); - } else { - *test = NULL; - } - return true; -} - -// A test fixture for testing the logic of the GTEST_DEATH_TEST_ macro. -// It installs a MockDeathTestFactory that is used for the duration -// of the test case. -class MacroLogicDeathTest : public testing::Test { - protected: - static testing::internal::ReplaceDeathTestFactory* replacer_; - static MockDeathTestFactory* factory_; - - static void SetUpTestCase() { - factory_ = new MockDeathTestFactory; - replacer_ = new testing::internal::ReplaceDeathTestFactory( - testing::UnitTest::GetInstance(), factory_); - } - - static void TearDownTestCase() { - delete replacer_; - replacer_ = NULL; - delete factory_; - factory_ = NULL; - } - - // Runs a death test that breaks the rules by returning. Such a death - // test cannot be run directly from a test routine that uses a - // MockDeathTest, or the remainder of the routine will not be executed. - static void RunReturningDeathTest(bool* flag) { - ASSERT_DEATH({ // NOLINT - *flag = true; - return; - }, ""); - } -}; - -testing::internal::ReplaceDeathTestFactory* MacroLogicDeathTest::replacer_ - = NULL; -MockDeathTestFactory* MacroLogicDeathTest::factory_ = NULL; - - -// Test that nothing happens when the factory doesn't return a DeathTest: -TEST_F(MacroLogicDeathTest, NothingHappens) { - bool flag = false; - factory_->SetParameters(false, DeathTest::OVERSEE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(0, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_FALSE(factory_->TestDeleted()); -} - -// Test that the parent process doesn't run the death test code, -// and that the Passed method returns false when the (simulated) -// child process exits with status 0: -TEST_F(MacroLogicDeathTest, ChildExitsSuccessfully) { - bool flag = false; - factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(1, factory_->WaitCalls()); - ASSERT_EQ(1, factory_->PassedCalls()); - EXPECT_FALSE(factory_->PassedArgument(0)); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the Passed method was given the argument "true" when -// the (simulated) child process exits with status 1: -TEST_F(MacroLogicDeathTest, ChildExitsUnsuccessfully) { - bool flag = false; - factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 1, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(1, factory_->WaitCalls()); - ASSERT_EQ(1, factory_->PassedCalls()); - EXPECT_TRUE(factory_->PassedArgument(0)); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the (simulated) child process executes the death test -// code, and is aborted with the correct AbortReason if it -// executes a return statement. -TEST_F(MacroLogicDeathTest, ChildPerformsReturn) { - bool flag = false; - factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true); - RunReturningDeathTest(&flag); - EXPECT_TRUE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - EXPECT_EQ(1, factory_->AbortCalls()); - EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT, - factory_->AbortArgument(0)); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the (simulated) child process is aborted with the -// correct AbortReason if it does not die. -TEST_F(MacroLogicDeathTest, ChildDoesNotDie) { - bool flag = false; - factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_TRUE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - // This time there are two calls to Abort: one since the test didn't - // die, and another from the ReturnSentinel when it's destroyed. The - // sentinel normally isn't destroyed if a test doesn't die, since - // _exit(2) is called in that case by ForkingDeathTest, but not by - // our MockDeathTest. - ASSERT_EQ(2, factory_->AbortCalls()); - EXPECT_EQ(DeathTest::TEST_DID_NOT_DIE, - factory_->AbortArgument(0)); - EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT, - factory_->AbortArgument(1)); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Returns the number of successful parts in the current test. -static size_t GetSuccessfulTestPartCount() { - return testing::UnitTest::GetInstance()->impl()->current_test_result()-> - successful_part_count(); -} - -// Tests that a successful death test does not register a successful -// test part. -TEST(SuccessRegistrationDeathTest, NoSuccessPart) { - EXPECT_DEATH(_exit(1), ""); - EXPECT_EQ(0u, GetSuccessfulTestPartCount()); -} - -TEST(StreamingAssertionsDeathTest, DeathTest) { - EXPECT_DEATH(_exit(1), "") << "unexpected failure"; - ASSERT_DEATH(_exit(1), "") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(_exit(0), "") << "expected failure"; - }, "expected failure"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_DEATH(_exit(0), "") << "expected failure"; - }, "expected failure"); -} - -// Tests that GetLastErrnoDescription returns an empty string when the -// last error is 0 and non-empty string when it is non-zero. -TEST(GetLastErrnoDescription, GetLastErrnoDescriptionWorks) { - errno = ENOENT; - EXPECT_STRNE("", GetLastErrnoDescription().c_str()); - errno = 0; - EXPECT_STREQ("", GetLastErrnoDescription().c_str()); -} - -#if GTEST_OS_WINDOWS -TEST(AutoHandleTest, AutoHandleWorks) { - HANDLE handle = ::CreateEvent(NULL, FALSE, FALSE, NULL); - ASSERT_NE(INVALID_HANDLE_VALUE, handle); - - // Tests that the AutoHandle is correctly initialized with a handle. - testing::internal::AutoHandle auto_handle(handle); - EXPECT_EQ(handle, auto_handle.Get()); - - // Tests that Reset assigns INVALID_HANDLE_VALUE. - // Note that this cannot verify whether the original handle is closed. - auto_handle.Reset(); - EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle.Get()); - - // Tests that Reset assigns the new handle. - // Note that this cannot verify whether the original handle is closed. - handle = ::CreateEvent(NULL, FALSE, FALSE, NULL); - ASSERT_NE(INVALID_HANDLE_VALUE, handle); - auto_handle.Reset(handle); - EXPECT_EQ(handle, auto_handle.Get()); - - // Tests that AutoHandle contains INVALID_HANDLE_VALUE by default. - testing::internal::AutoHandle auto_handle2; - EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle2.Get()); -} -#endif // GTEST_OS_WINDOWS - -#if GTEST_OS_WINDOWS -typedef unsigned __int64 BiggestParsable; -typedef signed __int64 BiggestSignedParsable; -const BiggestParsable kBiggestParsableMax = ULLONG_MAX; -const BiggestParsable kBiggestSignedParsableMax = LLONG_MAX; -#else -typedef unsigned long long BiggestParsable; -typedef signed long long BiggestSignedParsable; -const BiggestParsable kBiggestParsableMax = - ::std::numeric_limits::max(); -const BiggestSignedParsable kBiggestSignedParsableMax = - ::std::numeric_limits::max(); -#endif // GTEST_OS_WINDOWS - -TEST(ParseNaturalNumberTest, RejectsInvalidFormat) { - BiggestParsable result = 0; - - // Rejects non-numbers. - EXPECT_FALSE(ParseNaturalNumber(String("non-number string"), &result)); - - // Rejects numbers with whitespace prefix. - EXPECT_FALSE(ParseNaturalNumber(String(" 123"), &result)); - - // Rejects negative numbers. - EXPECT_FALSE(ParseNaturalNumber(String("-123"), &result)); - - // Rejects numbers starting with a plus sign. - EXPECT_FALSE(ParseNaturalNumber(String("+123"), &result)); - errno = 0; -} - -TEST(ParseNaturalNumberTest, RejectsOverflownNumbers) { - BiggestParsable result = 0; - - EXPECT_FALSE(ParseNaturalNumber(String("99999999999999999999999"), &result)); - - signed char char_result = 0; - EXPECT_FALSE(ParseNaturalNumber(String("200"), &char_result)); - errno = 0; -} - -TEST(ParseNaturalNumberTest, AcceptsValidNumbers) { - BiggestParsable result = 0; - - result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &result)); - EXPECT_EQ(123, result); - - // Check 0 as an edge case. - result = 1; - ASSERT_TRUE(ParseNaturalNumber(String("0"), &result)); - EXPECT_EQ(0, result); - - result = 1; - ASSERT_TRUE(ParseNaturalNumber(String("00000"), &result)); - EXPECT_EQ(0, result); -} - -TEST(ParseNaturalNumberTest, AcceptsTypeLimits) { - Message msg; - msg << kBiggestParsableMax; - - BiggestParsable result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg.GetString(), &result)); - EXPECT_EQ(kBiggestParsableMax, result); - - Message msg2; - msg2 << kBiggestSignedParsableMax; - - BiggestSignedParsable signed_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg2.GetString(), &signed_result)); - EXPECT_EQ(kBiggestSignedParsableMax, signed_result); - - Message msg3; - msg3 << INT_MAX; - - int int_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg3.GetString(), &int_result)); - EXPECT_EQ(INT_MAX, int_result); - - Message msg4; - msg4 << UINT_MAX; - - unsigned int uint_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg4.GetString(), &uint_result)); - EXPECT_EQ(UINT_MAX, uint_result); -} - -TEST(ParseNaturalNumberTest, WorksForShorterIntegers) { - short short_result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &short_result)); - EXPECT_EQ(123, short_result); - - signed char char_result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &char_result)); - EXPECT_EQ(123, char_result); -} - -#if GTEST_OS_WINDOWS -TEST(EnvironmentTest, HandleFitsIntoSizeT) { - // TODO(vladl@google.com): Remove this test after this condition is verified - // in a static assertion in gtest-death-test.cc in the function - // GetStatusFileDescriptor. - ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t)); -} -#endif // GTEST_OS_WINDOWS - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that a test case whose name ends with "DeathTest" works fine -// on Windows. -TEST(NotADeathTest, Test) { - SUCCEED(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-filepath_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-filepath_test.cc deleted file mode 100644 index b6d950dd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-filepath_test.cc +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) -// -// Google Test filepath utilities -// -// This file tests classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included from gtest_unittest.cc, to avoid changing -// build or make-files for some existing Google Test clients. Do not -// #include this file anywhere else! - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#ifdef _WIN32_WCE -#include // NOLINT -#elif GTEST_OS_WINDOWS -#include // NOLINT -#endif // _WIN32_WCE - -namespace testing { -namespace internal { -namespace { - -#ifdef _WIN32_WCE -// Windows CE doesn't have the remove C function. -int remove(const char* path) { - LPCWSTR wpath = String::AnsiToUtf16(path); - int ret = DeleteFile(wpath) ? 0 : -1; - delete [] wpath; - return ret; -} -// Windows CE doesn't have the _rmdir C function. -int _rmdir(const char* path) { - FilePath filepath(path); - LPCWSTR wpath = String::AnsiToUtf16( - filepath.RemoveTrailingPathSeparator().c_str()); - int ret = RemoveDirectory(wpath) ? 0 : -1; - delete [] wpath; - return ret; -} - -#endif // _WIN32_WCE - -#ifndef _WIN32_WCE - -TEST(GetCurrentDirTest, ReturnsCurrentDir) { - const FilePath original_dir = FilePath::GetCurrentDir(); - EXPECT_FALSE(original_dir.IsEmpty()); - - posix::ChDir(GTEST_PATH_SEP_); - const FilePath cwd = FilePath::GetCurrentDir(); - posix::ChDir(original_dir.c_str()); - -#if GTEST_OS_WINDOWS - // Skips the ":". - const char* const cwd_without_drive = strchr(cwd.c_str(), ':'); - ASSERT_TRUE(cwd_without_drive != NULL); - EXPECT_STREQ(GTEST_PATH_SEP_, cwd_without_drive + 1); -#else - EXPECT_STREQ(GTEST_PATH_SEP_, cwd.c_str()); -#endif -} - -#endif // _WIN32_WCE - -TEST(IsEmptyTest, ReturnsTrueForEmptyPath) { - EXPECT_TRUE(FilePath("").IsEmpty()); - EXPECT_TRUE(FilePath(NULL).IsEmpty()); -} - -TEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) { - EXPECT_FALSE(FilePath("a").IsEmpty()); - EXPECT_FALSE(FilePath(".").IsEmpty()); - EXPECT_FALSE(FilePath("a/b").IsEmpty()); - EXPECT_FALSE(FilePath("a\\b\\").IsEmpty()); -} - -// RemoveDirectoryName "" -> "" -TEST(RemoveDirectoryNameTest, WhenEmptyName) { - EXPECT_STREQ("", FilePath("").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "afile" -> "afile" -TEST(RemoveDirectoryNameTest, ButNoDirectory) { - EXPECT_STREQ("afile", - FilePath("afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "/afile" -> "afile" -TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) { - EXPECT_STREQ("afile", - FilePath(GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/" -> "" -TEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) { - EXPECT_STREQ("", - FilePath("adir" GTEST_PATH_SEP_).RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/afile" -> "afile" -TEST(RemoveDirectoryNameTest, ShouldGiveFileName) { - EXPECT_STREQ("afile", - FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/subdir/afile" -> "afile" -TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) { - EXPECT_STREQ("afile", - FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") - .RemoveDirectoryName().c_str()); -} - - -// RemoveFileName "" -> "./" -TEST(RemoveFileNameTest, EmptyName) { -#ifdef _WIN32_WCE - // On Windows CE, we use the root as the current directory. - EXPECT_STREQ(GTEST_PATH_SEP_, - FilePath("").RemoveFileName().c_str()); -#else - EXPECT_STREQ("." GTEST_PATH_SEP_, - FilePath("").RemoveFileName().c_str()); -#endif -} - -// RemoveFileName "adir/" -> "adir/" -TEST(RemoveFileNameTest, ButNoFile) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_).RemoveFileName().c_str()); -} - -// RemoveFileName "adir/afile" -> "adir/" -TEST(RemoveFileNameTest, GivesDirName) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_ "afile") - .RemoveFileName().c_str()); -} - -// RemoveFileName "adir/subdir/afile" -> "adir/subdir/" -TEST(RemoveFileNameTest, GivesDirAndSubDirName) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") - .RemoveFileName().c_str()); -} - -// RemoveFileName "/afile" -> "/" -TEST(RemoveFileNameTest, GivesRootDir) { - EXPECT_STREQ(GTEST_PATH_SEP_, - FilePath(GTEST_PATH_SEP_ "afile").RemoveFileName().c_str()); -} - - -TEST(MakeFileNameTest, GenerateWhenNumberIsZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), - 0, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameNumberGtZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), - 12, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberIsZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar"), 0, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberGtZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar"), 12, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateWhenNumberIsZeroAndDirIsEmpty) { - FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), - 0, "xml"); - EXPECT_STREQ("bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateWhenNumberIsNotZeroAndDirIsEmpty) { - FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), - 14, "xml"); - EXPECT_STREQ("bar_14.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, WorksWhenDirDoesNotEndWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, WorksWhenPath1EndsWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, Path1BeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath(""), - FilePath("bar.xml")); - EXPECT_STREQ("bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, Path2BeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, actual.c_str()); -} - -TEST(ConcatPathsTest, BothPathBeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath(""), - FilePath("")); - EXPECT_STREQ("", actual.c_str()); -} - -TEST(ConcatPathsTest, Path1ContainsPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_ "bar"), - FilePath("foobar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "foobar.xml", - actual.c_str()); -} - -TEST(ConcatPathsTest, Path2ContainsPathSep) { - FilePath actual = FilePath::ConcatPaths( - FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar" GTEST_PATH_SEP_ "bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "bar.xml", - actual.c_str()); -} - -TEST(ConcatPathsTest, Path2EndsWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("bar" GTEST_PATH_SEP_)); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_, actual.c_str()); -} - -// RemoveTrailingPathSeparator "" -> "" -TEST(RemoveTrailingPathSeparatorTest, EmptyString) { - EXPECT_STREQ("", - FilePath("").RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo" -> "foo" -TEST(RemoveTrailingPathSeparatorTest, FileNoSlashString) { - EXPECT_STREQ("foo", - FilePath("foo").RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/" -> "foo" -TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveTrailingSeparator) { - EXPECT_STREQ( - "foo", - FilePath("foo" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/bar/" -> "foo/bar/" -TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveLastSeparator) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_) - .RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/bar" -> "foo/bar" -TEST(RemoveTrailingPathSeparatorTest, ShouldReturnUnmodified) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar") - .RemoveTrailingPathSeparator().c_str()); -} - -TEST(DirectoryTest, RootDirectoryExists) { -#if GTEST_OS_WINDOWS // We are on Windows. - char current_drive[_MAX_PATH]; // NOLINT - current_drive[0] = static_cast(_getdrive() + 'A' - 1); - current_drive[1] = ':'; - current_drive[2] = '\\'; - current_drive[3] = '\0'; - EXPECT_TRUE(FilePath(current_drive).DirectoryExists()); -#else - EXPECT_TRUE(FilePath("/").DirectoryExists()); -#endif // GTEST_OS_WINDOWS -} - -#if GTEST_OS_WINDOWS -TEST(DirectoryTest, RootOfWrongDriveDoesNotExists) { - const int saved_drive_ = _getdrive(); - // Find a drive that doesn't exist. Start with 'Z' to avoid common ones. - for (char drive = 'Z'; drive >= 'A'; drive--) - if (_chdrive(drive - 'A' + 1) == -1) { - char non_drive[_MAX_PATH]; // NOLINT - non_drive[0] = drive; - non_drive[1] = ':'; - non_drive[2] = '\\'; - non_drive[3] = '\0'; - EXPECT_FALSE(FilePath(non_drive).DirectoryExists()); - break; - } - _chdrive(saved_drive_); -} -#endif // GTEST_OS_WINDOWS - -#ifndef _WIN32_WCE -// Windows CE _does_ consider an empty directory to exist. -TEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) { - EXPECT_FALSE(FilePath("").DirectoryExists()); -} -#endif // ! _WIN32_WCE - -TEST(DirectoryTest, CurrentDirectoryExists) { -#if GTEST_OS_WINDOWS // We are on Windows. -#ifndef _WIN32_CE // Windows CE doesn't have a current directory. - EXPECT_TRUE(FilePath(".").DirectoryExists()); - EXPECT_TRUE(FilePath(".\\").DirectoryExists()); -#endif // _WIN32_CE -#else - EXPECT_TRUE(FilePath(".").DirectoryExists()); - EXPECT_TRUE(FilePath("./").DirectoryExists()); -#endif // GTEST_OS_WINDOWS -} - -TEST(NormalizeTest, NullStringsEqualEmptyDirectory) { - EXPECT_STREQ("", FilePath(NULL).c_str()); - EXPECT_STREQ("", FilePath(String(NULL)).c_str()); -} - -// "foo/bar" == foo//bar" == "foo///bar" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsInMidstring) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ - GTEST_PATH_SEP_ "bar").c_str()); -} - -// "/bar" == //bar" == "///bar" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringStart) { - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); -} - -// "foo/" == foo//" == "foo///" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringEnd) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_).c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str()); -} - -TEST(AssignmentOperatorTest, DefaultAssignedToNonDefault) { - FilePath default_path; - FilePath non_default_path("path"); - non_default_path = default_path; - EXPECT_STREQ("", non_default_path.c_str()); - EXPECT_STREQ("", default_path.c_str()); // RHS var is unchanged. -} - -TEST(AssignmentOperatorTest, NonDefaultAssignedToDefault) { - FilePath non_default_path("path"); - FilePath default_path; - default_path = non_default_path; - EXPECT_STREQ("path", default_path.c_str()); - EXPECT_STREQ("path", non_default_path.c_str()); // RHS var is unchanged. -} - -TEST(AssignmentOperatorTest, ConstAssignedToNonConst) { - const FilePath const_default_path("const_path"); - FilePath non_default_path("path"); - non_default_path = const_default_path; - EXPECT_STREQ("const_path", non_default_path.c_str()); -} - -class DirectoryCreationTest : public Test { - protected: - virtual void SetUp() { - testdata_path_.Set(FilePath(String::Format("%s%s%s", - TempDir().c_str(), GetCurrentExecutableName().c_str(), - "_directory_creation" GTEST_PATH_SEP_ "test" GTEST_PATH_SEP_))); - testdata_file_.Set(testdata_path_.RemoveTrailingPathSeparator()); - - unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), - 0, "txt")); - unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), - 1, "txt")); - - remove(testdata_file_.c_str()); - remove(unique_file0_.c_str()); - remove(unique_file1_.c_str()); - posix::RmDir(testdata_path_.c_str()); - } - - virtual void TearDown() { - remove(testdata_file_.c_str()); - remove(unique_file0_.c_str()); - remove(unique_file1_.c_str()); - posix::RmDir(testdata_path_.c_str()); - } - - String TempDir() const { -#ifdef _WIN32_WCE - return String("\\temp\\"); - -#elif GTEST_OS_WINDOWS - const char* temp_dir = posix::GetEnv("TEMP"); - if (temp_dir == NULL || temp_dir[0] == '\0') - return String("\\temp\\"); - else if (String(temp_dir).EndsWith("\\")) - return String(temp_dir); - else - return String::Format("%s\\", temp_dir); -#else - return String("/tmp/"); -#endif - } - - void CreateTextFile(const char* filename) { - FILE* f = posix::FOpen(filename, "w"); - fprintf(f, "text\n"); - fclose(f); - } - - // Strings representing a directory and a file, with identical paths - // except for the trailing separator character that distinquishes - // a directory named 'test' from a file named 'test'. Example names: - FilePath testdata_path_; // "/tmp/directory_creation/test/" - FilePath testdata_file_; // "/tmp/directory_creation/test" - FilePath unique_file0_; // "/tmp/directory_creation/test/unique.txt" - FilePath unique_file1_; // "/tmp/directory_creation/test/unique_1.txt" -}; - -TEST_F(DirectoryCreationTest, CreateDirectoriesRecursively) { - EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str(); - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); - EXPECT_TRUE(testdata_path_.DirectoryExists()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesForAlreadyExistingPath) { - EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str(); - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); - // Call 'create' again... should still succeed. - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesAndUniqueFilename) { - FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_, - FilePath("unique"), "txt")); - EXPECT_STREQ(unique_file0_.c_str(), file_path.c_str()); - EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file not there - - testdata_path_.CreateDirectoriesRecursively(); - EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file still not there - CreateTextFile(file_path.c_str()); - EXPECT_TRUE(file_path.FileOrDirectoryExists()); - - FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_, - FilePath("unique"), "txt")); - EXPECT_STREQ(unique_file1_.c_str(), file_path2.c_str()); - EXPECT_FALSE(file_path2.FileOrDirectoryExists()); // file not there - CreateTextFile(file_path2.c_str()); - EXPECT_TRUE(file_path2.FileOrDirectoryExists()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesFail) { - // force a failure by putting a file where we will try to create a directory. - CreateTextFile(testdata_file_.c_str()); - EXPECT_TRUE(testdata_file_.FileOrDirectoryExists()); - EXPECT_FALSE(testdata_file_.DirectoryExists()); - EXPECT_FALSE(testdata_file_.CreateDirectoriesRecursively()); -} - -TEST(NoDirectoryCreationTest, CreateNoDirectoriesForDefaultXmlFile) { - const FilePath test_detail_xml("test_detail.xml"); - EXPECT_FALSE(test_detail_xml.CreateDirectoriesRecursively()); -} - -TEST(FilePathTest, DefaultConstructor) { - FilePath fp; - EXPECT_STREQ("", fp.c_str()); -} - -TEST(FilePathTest, CharAndCopyConstructors) { - const FilePath fp("spicy"); - EXPECT_STREQ("spicy", fp.c_str()); - - const FilePath fp_copy(fp); - EXPECT_STREQ("spicy", fp_copy.c_str()); -} - -TEST(FilePathTest, StringConstructor) { - const FilePath fp(String("cider")); - EXPECT_STREQ("cider", fp.c_str()); -} - -TEST(FilePathTest, Set) { - const FilePath apple("apple"); - FilePath mac("mac"); - mac.Set(apple); // Implement Set() since overloading operator= is forbidden. - EXPECT_STREQ("apple", mac.c_str()); - EXPECT_STREQ("apple", apple.c_str()); -} - -TEST(FilePathTest, ToString) { - const FilePath file("drink"); - String str(file.ToString()); - EXPECT_STREQ("drink", str.c_str()); -} - -TEST(FilePathTest, RemoveExtension) { - EXPECT_STREQ("app", FilePath("app.exe").RemoveExtension("exe").c_str()); - EXPECT_STREQ("APP", FilePath("APP.EXE").RemoveExtension("exe").c_str()); -} - -TEST(FilePathTest, RemoveExtensionWhenThereIsNoExtension) { - EXPECT_STREQ("app", FilePath("app").RemoveExtension("exe").c_str()); -} - -TEST(FilePathTest, IsDirectory) { - EXPECT_FALSE(FilePath("cola").IsDirectory()); - EXPECT_TRUE(FilePath("koala" GTEST_PATH_SEP_).IsDirectory()); -} - -TEST(FilePathTest, IsAbsolutePath) { - EXPECT_FALSE(FilePath("is" GTEST_PATH_SEP_ "relative").IsAbsolutePath()); - EXPECT_FALSE(FilePath("").IsAbsolutePath()); -#if GTEST_OS_WINDOWS - EXPECT_TRUE(FilePath("c:\\" GTEST_PATH_SEP_ "is_not" - GTEST_PATH_SEP_ "relative").IsAbsolutePath()); - EXPECT_FALSE(FilePath("c:foo" GTEST_PATH_SEP_ "bar").IsAbsolutePath()); -#else - EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ "is_not" GTEST_PATH_SEP_ "relative") - .IsAbsolutePath()); -#endif // GTEST_OS_WINDOWS -} - -} // namespace -} // namespace internal -} // namespace testing - -#undef GTEST_PATH_SEP_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-linked_ptr_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-linked_ptr_test.cc deleted file mode 100644 index eae82296..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-linked_ptr_test.cc +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2003, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// Ported to Windows: Vadim Berman (vadimb@google.com) - -#include - -#include -#include - -namespace { - -using testing::Message; -using testing::internal::linked_ptr; - -int num; -Message* history = NULL; - -// Class which tracks allocation/deallocation -class A { - public: - A(): mynum(num++) { *history << "A" << mynum << " ctor\n"; } - virtual ~A() { *history << "A" << mynum << " dtor\n"; } - virtual void Use() { *history << "A" << mynum << " use\n"; } - protected: - int mynum; -}; - -// Subclass -class B : public A { - public: - B() { *history << "B" << mynum << " ctor\n"; } - ~B() { *history << "B" << mynum << " dtor\n"; } - virtual void Use() { *history << "B" << mynum << " use\n"; } -}; - -class LinkedPtrTest : public testing::Test { - public: - LinkedPtrTest() { - num = 0; - history = new Message; - } - - virtual ~LinkedPtrTest() { - delete history; - history = NULL; - } -}; - -TEST_F(LinkedPtrTest, GeneralTest) { - { - linked_ptr a0, a1, a2; - a0 = a0; - a1 = a2; - ASSERT_EQ(a0.get(), static_cast(NULL)); - ASSERT_EQ(a1.get(), static_cast(NULL)); - ASSERT_EQ(a2.get(), static_cast(NULL)); - ASSERT_TRUE(a0 == NULL); - ASSERT_TRUE(a1 == NULL); - ASSERT_TRUE(a2 == NULL); - - { - linked_ptr a3(new A); - a0 = a3; - ASSERT_TRUE(a0 == a3); - ASSERT_TRUE(a0 != NULL); - ASSERT_TRUE(a0.get() == a3); - ASSERT_TRUE(a0 == a3.get()); - linked_ptr a4(a0); - a1 = a4; - linked_ptr a5(new A); - ASSERT_TRUE(a5.get() != a3); - ASSERT_TRUE(a5 != a3.get()); - a2 = a5; - linked_ptr b0(new B); - linked_ptr a6(b0); - ASSERT_TRUE(b0 == a6); - ASSERT_TRUE(a6 == b0); - ASSERT_TRUE(b0 != NULL); - a5 = b0; - a5 = b0; - a3->Use(); - a4->Use(); - a5->Use(); - a6->Use(); - b0->Use(); - (*b0).Use(); - b0.get()->Use(); - } - - a0->Use(); - a1->Use(); - a2->Use(); - - a1 = a2; - a2.reset(new A); - a0.reset(); - - linked_ptr a7; - } - - ASSERT_STREQ( - "A0 ctor\n" - "A1 ctor\n" - "A2 ctor\n" - "B2 ctor\n" - "A0 use\n" - "A0 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 dtor\n" - "A2 dtor\n" - "A0 use\n" - "A0 use\n" - "A1 use\n" - "A3 ctor\n" - "A0 dtor\n" - "A3 dtor\n" - "A1 dtor\n", - history->GetString().c_str() - ); -} - -} // Unnamed namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-message_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-message_test.cc deleted file mode 100644 index 6c43c33d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-message_test.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for the Message class. - -#include - -#include - -namespace { - -using ::testing::Message; -using ::testing::internal::StrStream; - -// A helper function that turns a Message into a C string. -const char* ToCString(const Message& msg) { - static testing::internal::String result; - result = msg.GetString(); - return result.c_str(); -} - -// Tests the testing::Message class - -// Tests the default constructor. -TEST(MessageTest, DefaultConstructor) { - const Message msg; - EXPECT_STREQ("", ToCString(msg)); -} - -// Tests the copy constructor. -TEST(MessageTest, CopyConstructor) { - const Message msg1("Hello"); - const Message msg2(msg1); - EXPECT_STREQ("Hello", ToCString(msg2)); -} - -// Tests constructing a Message from a C-string. -TEST(MessageTest, ConstructsFromCString) { - Message msg("Hello"); - EXPECT_STREQ("Hello", ToCString(msg)); -} - -// Tests streaming a non-char pointer. -TEST(MessageTest, StreamsPointer) { - int n = 0; - int* p = &n; - EXPECT_STRNE("(null)", ToCString(Message() << p)); -} - -// Tests streaming a NULL non-char pointer. -TEST(MessageTest, StreamsNullPointer) { - int* p = NULL; - EXPECT_STREQ("(null)", ToCString(Message() << p)); -} - -// Tests streaming a C string. -TEST(MessageTest, StreamsCString) { - EXPECT_STREQ("Foo", ToCString(Message() << "Foo")); -} - -// Tests streaming a NULL C string. -TEST(MessageTest, StreamsNullCString) { - char* p = NULL; - EXPECT_STREQ("(null)", ToCString(Message() << p)); -} - -#if GTEST_HAS_STD_STRING - -// Tests streaming std::string. -// -// As std::string has problem in MSVC when exception is disabled, we only -// test this where std::string can be used. -TEST(MessageTest, StreamsString) { - const ::std::string str("Hello"); - EXPECT_STREQ("Hello", ToCString(Message() << str)); -} - -// Tests that we can output strings containing embedded NULs. -TEST(MessageTest, StreamsStringWithEmbeddedNUL) { - const char char_array_with_nul[] = - "Here's a NUL\0 and some more string"; - const ::std::string string_with_nul(char_array_with_nul, - sizeof(char_array_with_nul) - 1); - EXPECT_STREQ("Here's a NUL\\0 and some more string", - ToCString(Message() << string_with_nul)); -} - -#endif // GTEST_HAS_STD_STRING - -// Tests streaming a NUL char. -TEST(MessageTest, StreamsNULChar) { - EXPECT_STREQ("\\0", ToCString(Message() << '\0')); -} - -// Tests streaming int. -TEST(MessageTest, StreamsInt) { - EXPECT_STREQ("123", ToCString(Message() << 123)); -} - -// Tests that basic IO manipulators (endl, ends, and flush) can be -// streamed to Message. -TEST(MessageTest, StreamsBasicIoManip) { - EXPECT_STREQ("Line 1.\nA NUL char \\0 in line 2.", - ToCString(Message() << "Line 1." << std::endl - << "A NUL char " << std::ends << std::flush - << " in line 2.")); -} - -// Tests Message::GetString() -TEST(MessageTest, GetString) { - Message msg; - msg << 1 << " lamb"; - EXPECT_STREQ("1 lamb", msg.GetString().c_str()); -} - -// Tests streaming a Message object to an ostream. -TEST(MessageTest, StreamsToOStream) { - Message msg("Hello"); - StrStream ss; - ss << msg; - EXPECT_STREQ("Hello", testing::internal::StrStreamToString(&ss).c_str()); -} - -// Tests that a Message object doesn't take up too much stack space. -TEST(MessageTest, DoesNotTakeUpMuchStackSpace) { - EXPECT_LE(sizeof(Message), 16U); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-options_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-options_test.cc deleted file mode 100644 index 43c6d22d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-options_test.cc +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) -// -// Google Test UnitTestOptions tests -// -// This file tests classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included from gtest.cc, to avoid changing build or -// make-files on Windows and other platforms. Do not #include this file -// anywhere else! - -#include - -#ifdef _WIN32_WCE -#include -#elif GTEST_OS_WINDOWS -#include -#endif // _WIN32_WCE - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { -namespace { - -// Turns the given relative path into an absolute path. -FilePath GetAbsolutePathOf(const FilePath& relative_path) { - return FilePath::ConcatPaths(FilePath::GetCurrentDir(), relative_path); -} - -// Testing UnitTestOptions::GetOutputFormat/GetOutputFile. - -TEST(XmlOutputTest, GetOutputFormatDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ("", UnitTestOptions::GetOutputFormat().c_str()); -} - -TEST(XmlOutputTest, GetOutputFormat) { - GTEST_FLAG(output) = "xml:filename"; - EXPECT_STREQ("xml", UnitTestOptions::GetOutputFormat().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ(GetAbsolutePathOf(FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileSingleFile) { - GTEST_FLAG(output) = "xml:filename.abc"; - EXPECT_STREQ(GetAbsolutePathOf(FilePath("filename.abc")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:path\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest-options_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest-options-ex_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest_all_test.xml")).c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:path/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == - GetAbsolutePathOf( - FilePath("path/gtest-options_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/lt-gtest-options_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/gtest_all_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/lt-gtest_all_test.xml")).c_str()) - << " output_file = " << output_file; -#endif -} - -TEST(OutputFileHelpersTest, GetCurrentExecutableName) { - const FilePath executable = GetCurrentExecutableName(); - const char* const exe_str = executable.c_str(); -#if defined(_WIN32_WCE) || GTEST_OS_WINDOWS - ASSERT_TRUE(_strcmpi("gtest-options_test", exe_str) == 0 || - _strcmpi("gtest-options-ex_test", exe_str) == 0 || - _strcmpi("gtest_all_test", exe_str) == 0) - << "GetCurrentExecutableName() returns " << exe_str; -#else - // TODO(wan@google.com): remove the hard-coded "lt-" prefix when - // Chandler Carruth's libtool replacement is ready. - EXPECT_TRUE(String(exe_str) == "gtest-options_test" || - String(exe_str) == "lt-gtest-options_test" || - String(exe_str) == "gtest_all_test" || - String(exe_str) == "lt-gtest_all_test") - << "GetCurrentExecutableName() returns " << exe_str; -#endif -} - -class XmlOutputChangeDirTest : public Test { - protected: - virtual void SetUp() { - original_working_dir_ = FilePath::GetCurrentDir(); - posix::ChDir(".."); - // This will make the test fail if run from the root directory. - EXPECT_STRNE(original_working_dir_.c_str(), - FilePath::GetCurrentDir().c_str()); - } - - virtual void TearDown() { - posix::ChDir(original_working_dir_.c_str()); - } - - FilePath original_working_dir_; -}; - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefaultXML) { - GTEST_FLAG(output) = "xml"; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativeFile) { - GTEST_FLAG(output) = "xml:filename.abc"; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("filename.abc")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativePath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:path\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest-options_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest-options-ex_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest_all_test.xml")).c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:path/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/gtest-options_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/lt-gtest-options_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/gtest_all_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/lt-gtest_all_test.xml")).c_str()) - << " output_file = " << output_file; -#endif -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsoluteFile) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:c:\\tmp\\filename.abc"; - EXPECT_STREQ(FilePath("c:\\tmp\\filename.abc").c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -#else - GTEST_FLAG(output) ="xml:/tmp/filename.abc"; - EXPECT_STREQ(FilePath("/tmp/filename.abc").c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -#endif -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsolutePath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:c:\\tmp\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest-options_test.xml").c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest-options-ex_test.xml").c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest_all_test.xml").c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:/tmp/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == "/tmp/gtest-options_test.xml" || - output_file == "/tmp/lt-gtest-options_test.xml" || - output_file == "/tmp/gtest_all_test.xml" || - output_file == "/tmp/lt-gtest_all_test.xml") - << " output_file = " << output_file; -#endif -} - -} // namespace -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test2_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test2_test.cc deleted file mode 100644 index ccb6cfac..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test2_test.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// Tests for Google Test itself. This verifies that the basic constructs of -// Google Test work. - -#include - -#include "test/gtest-param-test_test.h" - -#if GTEST_HAS_PARAM_TEST - -using ::testing::Values; -using ::testing::internal::ParamGenerator; - -// Tests that generators defined in a different translation unit -// are functional. The test using extern_gen is defined -// in gtest-param-test_test.cc. -ParamGenerator extern_gen = Values(33); - -// Tests that a parameterized test case can be defined in one translation unit -// and instantiated in another. The test is defined in gtest-param-test_test.cc -// and ExternalInstantiationTest fixture class is defined in -// gtest-param-test_test.h. -INSTANTIATE_TEST_CASE_P(MultiplesOf33, - ExternalInstantiationTest, - Values(33, 66)); - -// Tests that a parameterized test case can be instantiated -// in multiple translation units. Another instantiation is defined -// in gtest-param-test_test.cc and InstantiationInMultipleTranslaionUnitsTest -// fixture is defined in gtest-param-test_test.h -INSTANTIATE_TEST_CASE_P(Sequence2, - InstantiationInMultipleTranslaionUnitsTest, - Values(42*3, 42*4, 42*5)); - -#endif // GTEST_HAS_PARAM_TEST diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.cc deleted file mode 100644 index ecb5fdbb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.cc +++ /dev/null @@ -1,792 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// Tests for Google Test itself. This file verifies that the parameter -// generators objects produce correct parameter sequences and that -// Google Test runtime instantiates correct tests from those sequences. - -#include - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include -#include - -// To include gtest-internal-inl.h. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" // for UnitTestOptions -#undef GTEST_IMPLEMENTATION_ - -#include "test/gtest-param-test_test.h" - -using ::std::vector; -using ::std::sort; - -using ::testing::AddGlobalTestEnvironment; -using ::testing::Bool; -using ::testing::Message; -using ::testing::Range; -using ::testing::TestWithParam; -using ::testing::Values; -using ::testing::ValuesIn; - -#if GTEST_HAS_COMBINE -using ::testing::Combine; -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -#endif // GTEST_HAS_COMBINE - -using ::testing::internal::ParamGenerator; -using ::testing::internal::UnitTestOptions; - -// Verifies that a sequence generated by the generator and accessed -// via the iterator object matches the expected one using Google Test -// assertions. -template -void VerifyGenerator(const ParamGenerator& generator, - const T (&expected_values)[N]) { - typename ParamGenerator::iterator it = generator.begin(); - for (size_t i = 0; i < N; ++i) { - ASSERT_FALSE(it == generator.end()) - << "At element " << i << " when accessing via an iterator " - << "created with the copy constructor." << std::endl; - EXPECT_EQ(expected_values[i], *it) - << "At element " << i << " when accessing via an iterator " - << "created with the copy constructor." << std::endl; - it++; - } - EXPECT_TRUE(it == generator.end()) - << "At the presumed end of sequence when accessing via an iterator " - << "created with the copy constructor." << std::endl; - - // Test the iterator assignment. The following lines verify that - // the sequence accessed via an iterator initialized via the - // assignment operator (as opposed to a copy constructor) matches - // just the same. - it = generator.begin(); - for (size_t i = 0; i < N; ++i) { - ASSERT_FALSE(it == generator.end()) - << "At element " << i << " when accessing via an iterator " - << "created with the assignment operator." << std::endl; - EXPECT_EQ(expected_values[i], *it) - << "At element " << i << " when accessing via an iterator " - << "created with the assignment operator." << std::endl; - it++; - } - EXPECT_TRUE(it == generator.end()) - << "At the presumed end of sequence when accessing via an iterator " - << "created with the assignment operator." << std::endl; -} - -template -void VerifyGeneratorIsEmpty(const ParamGenerator& generator) { - typename ParamGenerator::iterator it = generator.begin(); - EXPECT_TRUE(it == generator.end()); - - it = generator.begin(); - EXPECT_TRUE(it == generator.end()); -} - -// Generator tests. They test that each of the provided generator functions -// generates an expected sequence of values. The general test pattern -// instantiates a generator using one of the generator functions, -// checks the sequence produced by the generator using its iterator API, -// and then resets the iterator back to the beginning of the sequence -// and checks the sequence again. - -// Tests that iterators produced by generator functions conform to the -// ForwardIterator concept. -TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) { - const ParamGenerator gen = Range(0, 10); - ParamGenerator::iterator it = gen.begin(); - - // Verifies that iterator initialization works as expected. - ParamGenerator::iterator it2 = it; - EXPECT_TRUE(*it == *it2) << "Initialized iterators must point to the " - << "element same as its source points to"; - - // Verifies that iterator assignment works as expected. - it++; - EXPECT_FALSE(*it == *it2); - it2 = it; - EXPECT_TRUE(*it == *it2) << "Assigned iterators must point to the " - << "element same as its source points to"; - - // Verifies that prefix operator++() returns *this. - EXPECT_EQ(&it, &(++it)) << "Result of the prefix operator++ must be " - << "refer to the original object"; - - // Verifies that the result of the postfix operator++ points to the value - // pointed to by the original iterator. - int original_value = *it; // Have to compute it outside of macro call to be - // unaffected by the parameter evaluation order. - EXPECT_EQ(original_value, *(it++)); - - // Verifies that prefix and postfix operator++() advance an iterator - // all the same. - it2 = it; - it++; - ++it2; - EXPECT_TRUE(*it == *it2); -} - -// Tests that Range() generates the expected sequence. -TEST(RangeTest, IntRangeWithDefaultStep) { - const ParamGenerator gen = Range(0, 3); - const int expected_values[] = {0, 1, 2}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that Range() generates the single element sequence -// as expected when provided with range limits that are equal. -TEST(RangeTest, IntRangeSingleValue) { - const ParamGenerator gen = Range(0, 1); - const int expected_values[] = {0}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that Range() with generates empty sequence when -// supplied with an empty range. -TEST(RangeTest, IntRangeEmpty) { - const ParamGenerator gen = Range(0, 0); - VerifyGeneratorIsEmpty(gen); -} - -// Tests that Range() with custom step (greater then one) generates -// the expected sequence. -TEST(RangeTest, IntRangeWithCustomStep) { - const ParamGenerator gen = Range(0, 9, 3); - const int expected_values[] = {0, 3, 6}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Range() with custom step (greater then one) generates -// the expected sequence when the last element does not fall on the -// upper range limit. Sequences generated by Range() must not have -// elements beyond the range limits. -TEST(RangeTest, IntRangeWithCustomStepOverUpperBound) { - const ParamGenerator gen = Range(0, 4, 3); - const int expected_values[] = {0, 3}; - VerifyGenerator(gen, expected_values); -} - -// Verifies that Range works with user-defined types that define -// copy constructor, operator=(), operator+(), and operator<(). -class DogAdder { - public: - explicit DogAdder(const char* value) : value_(value) {} - DogAdder(const DogAdder& other) : value_(other.value_.c_str()) {} - - DogAdder operator=(const DogAdder& other) { - if (this != &other) - value_ = other.value_; - return *this; - } - DogAdder operator+(const DogAdder& other) const { - Message msg; - msg << value_.c_str() << other.value_.c_str(); - return DogAdder(msg.GetString().c_str()); - } - bool operator<(const DogAdder& other) const { - return value_ < other.value_; - } - const ::testing::internal::String& value() const { return value_; } - - private: - ::testing::internal::String value_; -}; - -TEST(RangeTest, WorksWithACustomType) { - const ParamGenerator gen = - Range(DogAdder("cat"), DogAdder("catdogdog"), DogAdder("dog")); - ParamGenerator::iterator it = gen.begin(); - - ASSERT_FALSE(it == gen.end()); - EXPECT_STREQ("cat", it->value().c_str()); - - ASSERT_FALSE(++it == gen.end()); - EXPECT_STREQ("catdog", it->value().c_str()); - - EXPECT_TRUE(++it == gen.end()); -} - -class IntWrapper { - public: - explicit IntWrapper(int value) : value_(value) {} - IntWrapper(const IntWrapper& other) : value_(other.value_) {} - - IntWrapper operator=(const IntWrapper& other) { - value_ = other.value_; - return *this; - } - // operator+() adds a different type. - IntWrapper operator+(int other) const { return IntWrapper(value_ + other); } - bool operator<(const IntWrapper& other) const { - return value_ < other.value_; - } - int value() const { return value_; } - - private: - int value_; -}; - -TEST(RangeTest, WorksWithACustomTypeWithDifferentIncrementType) { - const ParamGenerator gen = Range(IntWrapper(0), IntWrapper(2)); - ParamGenerator::iterator it = gen.begin(); - - ASSERT_FALSE(it == gen.end()); - EXPECT_EQ(0, it->value()); - - ASSERT_FALSE(++it == gen.end()); - EXPECT_EQ(1, it->value()); - - EXPECT_TRUE(++it == gen.end()); -} - -// Tests that ValuesIn() with an array parameter generates -// the expected sequence. -TEST(ValuesInTest, ValuesInArray) { - int array[] = {3, 5, 8}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Tests that ValuesIn() with a const array parameter generates -// the expected sequence. -TEST(ValuesInTest, ValuesInConstArray) { - const int array[] = {3, 5, 8}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Edge case. Tests that ValuesIn() with an array parameter containing a -// single element generates the single element sequence. -TEST(ValuesInTest, ValuesInSingleElementArray) { - int array[] = {42}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Tests that ValuesIn() generates the expected sequence for an STL -// container (vector). -TEST(ValuesInTest, ValuesInVector) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(3); - values.push_back(5); - values.push_back(8); - const ParamGenerator gen = ValuesIn(values); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Tests that ValuesIn() generates the expected sequence. -TEST(ValuesInTest, ValuesInIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(3); - values.push_back(5); - values.push_back(8); - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that ValuesIn() provided with an iterator range specifying a -// single value generates a single-element sequence. -TEST(ValuesInTest, ValuesInSingleElementIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(42); - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - const int expected_values[] = {42}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that ValuesIn() provided with an empty iterator range -// generates an empty sequence. -TEST(ValuesInTest, ValuesInEmptyIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - VerifyGeneratorIsEmpty(gen); -} - -// Tests that the Values() generates the expected sequence. -TEST(ValuesTest, ValuesWorks) { - const ParamGenerator gen = Values(3, 5, 8); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Values() generates the expected sequences from elements of -// different types convertible to ParamGenerator's parameter type. -TEST(ValuesTest, ValuesWorksForValuesOfCompatibleTypes) { - const ParamGenerator gen = Values(3, 5.0f, 8.0); - - const double expected_values[] = {3.0, 5.0, 8.0}; - VerifyGenerator(gen, expected_values); -} - -TEST(ValuesTest, ValuesWorksForMaxLengthList) { - const ParamGenerator gen = Values( - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, - 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, - 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, - 410, 420, 430, 440, 450, 460, 470, 480, 490, 500); - - const int expected_values[] = { - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, - 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, - 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, - 410, 420, 430, 440, 450, 460, 470, 480, 490, 500}; - VerifyGenerator(gen, expected_values); -} - -// Edge case test. Tests that single-parameter Values() generates the sequence -// with the single value. -TEST(ValuesTest, ValuesWithSingleParameter) { - const ParamGenerator gen = Values(42); - - const int expected_values[] = {42}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Bool() generates sequence (false, true). -TEST(BoolTest, BoolWorks) { - const ParamGenerator gen = Bool(); - - const bool expected_values[] = {false, true}; - VerifyGenerator(gen, expected_values); -} - -#if GTEST_HAS_COMBINE - -template -::std::ostream& operator<<(::std::ostream& stream, const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) << ")"; - return stream; -} - -template -::std::ostream& operator<<(::std::ostream& stream, - const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) - << ", "<< get<2>(value) << ")"; - return stream; -} - -template -::std::ostream& operator<<( - ::std::ostream& stream, - const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) - << ", "<< get<2>(value) << ", " << get<3>(value) - << ", "<< get<4>(value) << ", " << get<5>(value) - << ", "<< get<6>(value) << ", " << get<7>(value) - << ", "<< get<8>(value) << ", " << get<9>(value) << ")"; - return stream; -} - -// Tests that Combine() with two parameters generates the expected sequence. -TEST(CombineTest, CombineWithTwoParameters) { - const char* foo = "foo"; - const char* bar = "bar"; - const ParamGenerator > gen = - Combine(Values(foo, bar), Values(3, 4)); - - tuple expected_values[] = { - make_tuple(foo, 3), make_tuple(foo, 4), - make_tuple(bar, 3), make_tuple(bar, 4)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Combine() with three parameters generates the expected sequence. -TEST(CombineTest, CombineWithThreeParameters) { - const ParamGenerator > gen = Combine(Values(0, 1), - Values(3, 4), - Values(5, 6)); - tuple expected_values[] = { - make_tuple(0, 3, 5), make_tuple(0, 3, 6), - make_tuple(0, 4, 5), make_tuple(0, 4, 6), - make_tuple(1, 3, 5), make_tuple(1, 3, 6), - make_tuple(1, 4, 5), make_tuple(1, 4, 6)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that the Combine() with the first parameter generating a single value -// sequence generates a sequence with the number of elements equal to the -// number of elements in the sequence generated by the second parameter. -TEST(CombineTest, CombineWithFirstParameterSingleValue) { - const ParamGenerator > gen = Combine(Values(42), - Values(0, 1)); - - tuple expected_values[] = {make_tuple(42, 0), make_tuple(42, 1)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that the Combine() with the second parameter generating a single value -// sequence generates a sequence with the number of elements equal to the -// number of elements in the sequence generated by the first parameter. -TEST(CombineTest, CombineWithSecondParameterSingleValue) { - const ParamGenerator > gen = Combine(Values(0, 1), - Values(42)); - - tuple expected_values[] = {make_tuple(0, 42), make_tuple(1, 42)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that when the first parameter produces an empty sequence, -// Combine() produces an empty sequence, too. -TEST(CombineTest, CombineWithFirstParameterEmptyRange) { - const ParamGenerator > gen = Combine(Range(0, 0), - Values(0, 1)); - VerifyGeneratorIsEmpty(gen); -} - -// Tests that when the second parameter produces an empty sequence, -// Combine() produces an empty sequence, too. -TEST(CombineTest, CombineWithSecondParameterEmptyRange) { - const ParamGenerator > gen = Combine(Values(0, 1), - Range(1, 1)); - VerifyGeneratorIsEmpty(gen); -} - -// Edge case. Tests that combine works with the maximum number -// of parameters supported by Google Test (currently 10). -TEST(CombineTest, CombineWithMaxNumberOfParameters) { - const char* foo = "foo"; - const char* bar = "bar"; - const ParamGenerator > gen = Combine(Values(foo, bar), - Values(1), Values(2), - Values(3), Values(4), - Values(5), Values(6), - Values(7), Values(8), - Values(9)); - - tuple - expected_values[] = {make_tuple(foo, 1, 2, 3, 4, 5, 6, 7, 8, 9), - make_tuple(bar, 1, 2, 3, 4, 5, 6, 7, 8, 9)}; - VerifyGenerator(gen, expected_values); -} - -#endif // GTEST_HAS_COMBINE - -// Tests that an generator produces correct sequence after being -// assigned from another generator. -TEST(ParamGeneratorTest, AssignmentWorks) { - ParamGenerator gen = Values(1, 2); - const ParamGenerator gen2 = Values(3, 4); - gen = gen2; - - const int expected_values[] = {3, 4}; - VerifyGenerator(gen, expected_values); -} - -// This test verifies that the tests are expanded and run as specified: -// one test per element from the sequence produced by the generator -// specified in INSTANTIATE_TEST_CASE_P. It also verifies that the test's -// fixture constructor, SetUp(), and TearDown() have run and have been -// supplied with the correct parameters. - -// The use of environment object allows detection of the case where no test -// case functionality is run at all. In this case TestCaseTearDown will not -// be able to detect missing tests, naturally. -template -class TestGenerationEnvironment : public ::testing::Environment { - public: - static TestGenerationEnvironment* Instance() { - static TestGenerationEnvironment* instance = new TestGenerationEnvironment; - return instance; - } - - void FixtureConstructorExecuted() { fixture_constructor_count_++; } - void SetUpExecuted() { set_up_count_++; } - void TearDownExecuted() { tear_down_count_++; } - void TestBodyExecuted() { test_body_count_++; } - - virtual void TearDown() { - // If all MultipleTestGenerationTest tests have been de-selected - // by the filter flag, the following checks make no sense. - bool perform_check = false; - - for (int i = 0; i < kExpectedCalls; ++i) { - Message msg; - msg << "TestsExpandedAndRun/" << i; - if (UnitTestOptions::FilterMatchesTest( - "TestExpansionModule/MultipleTestGenerationTest", - msg.GetString().c_str())) { - perform_check = true; - } - } - if (perform_check) { - EXPECT_EQ(kExpectedCalls, fixture_constructor_count_) - << "Fixture constructor of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, set_up_count_) - << "Fixture SetUp method of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, tear_down_count_) - << "Fixture TearDown method of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, test_body_count_) - << "Test in ParamTestGenerationTest test case " - << "has not been run as expected."; - } - } - private: - TestGenerationEnvironment() : fixture_constructor_count_(0), set_up_count_(0), - tear_down_count_(0), test_body_count_(0) {} - - int fixture_constructor_count_; - int set_up_count_; - int tear_down_count_; - int test_body_count_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationEnvironment); -}; - -const int test_generation_params[] = {36, 42, 72}; - -class TestGenerationTest : public TestWithParam { - public: - enum { - PARAMETER_COUNT = - sizeof(test_generation_params)/sizeof(test_generation_params[0]) - }; - - typedef TestGenerationEnvironment Environment; - - TestGenerationTest() { - Environment::Instance()->FixtureConstructorExecuted(); - current_parameter_ = GetParam(); - } - virtual void SetUp() { - Environment::Instance()->SetUpExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - } - virtual void TearDown() { - Environment::Instance()->TearDownExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - } - - static void SetUpTestCase() { - bool all_tests_in_test_case_selected = true; - - for (int i = 0; i < PARAMETER_COUNT; ++i) { - Message test_name; - test_name << "TestsExpandedAndRun/" << i; - if ( !UnitTestOptions::FilterMatchesTest( - "TestExpansionModule/MultipleTestGenerationTest", - test_name.GetString())) { - all_tests_in_test_case_selected = false; - } - } - EXPECT_TRUE(all_tests_in_test_case_selected) - << "When running the TestGenerationTest test case all of its tests\n" - << "must be selected by the filter flag for the test case to pass.\n" - << "If not all of them are enabled, we can't reliably conclude\n" - << "that the correct number of tests have been generated."; - - collected_parameters_.clear(); - } - - static void TearDownTestCase() { - vector expected_values(test_generation_params, - test_generation_params + PARAMETER_COUNT); - // Test execution order is not guaranteed by Google Test, - // so the order of values in collected_parameters_ can be - // different and we have to sort to compare. - sort(expected_values.begin(), expected_values.end()); - sort(collected_parameters_.begin(), collected_parameters_.end()); - - EXPECT_TRUE(collected_parameters_ == expected_values); - } - protected: - int current_parameter_; - static vector collected_parameters_; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationTest); -}; -vector TestGenerationTest::collected_parameters_; - -TEST_P(TestGenerationTest, TestsExpandedAndRun) { - Environment::Instance()->TestBodyExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - collected_parameters_.push_back(GetParam()); -} -INSTANTIATE_TEST_CASE_P(TestExpansionModule, TestGenerationTest, - ValuesIn(test_generation_params)); - -// This test verifies that the element sequence (third parameter of -// INSTANTIATE_TEST_CASE_P) is evaluated in RUN_ALL_TESTS and not at the call -// site of INSTANTIATE_TEST_CASE_P. -// For that, we declare param_value_ to be a static member of -// GeneratorEvaluationTest and initialize it to 0. We set it to 1 in main(), -// just before invocation of RUN_ALL_TESTS. If the sequence is evaluated -// before that moment, INSTANTIATE_TEST_CASE_P will create a test with -// parameter 0, and the test body will fail the assertion. -class GeneratorEvaluationTest : public TestWithParam { - public: - static int param_value() { return param_value_; } - static void set_param_value(int param_value) { param_value_ = param_value; } - - private: - static int param_value_; -}; -int GeneratorEvaluationTest::param_value_ = 0; - -TEST_P(GeneratorEvaluationTest, GeneratorsEvaluatedInMain) { - EXPECT_EQ(1, GetParam()); -} -INSTANTIATE_TEST_CASE_P(GenEvalModule, - GeneratorEvaluationTest, - Values(GeneratorEvaluationTest::param_value())); - -// Tests that generators defined in a different translation unit are -// functional. Generator extern_gen is defined in gtest-param-test_test2.cc. -extern ParamGenerator extern_gen; -class ExternalGeneratorTest : public TestWithParam {}; -TEST_P(ExternalGeneratorTest, ExternalGenerator) { - // Sequence produced by extern_gen contains only a single value - // which we verify here. - EXPECT_EQ(GetParam(), 33); -} -INSTANTIATE_TEST_CASE_P(ExternalGeneratorModule, - ExternalGeneratorTest, - extern_gen); - -// Tests that a parameterized test case can be defined in one translation -// unit and instantiated in another. This test will be instantiated in -// gtest-param-test_test2.cc. ExternalInstantiationTest fixture class is -// defined in gtest-param-test_test.h. -TEST_P(ExternalInstantiationTest, IsMultipleOf33) { - EXPECT_EQ(0, GetParam() % 33); -} - -// Tests that a parameterized test case can be instantiated with multiple -// generators. -class MultipleInstantiationTest : public TestWithParam {}; -TEST_P(MultipleInstantiationTest, AllowsMultipleInstances) { -} -INSTANTIATE_TEST_CASE_P(Sequence1, MultipleInstantiationTest, Values(1, 2)); -INSTANTIATE_TEST_CASE_P(Sequence2, MultipleInstantiationTest, Range(3, 5)); - -// Tests that a parameterized test case can be instantiated -// in multiple translation units. This test will be instantiated -// here and in gtest-param-test_test2.cc. -// InstantiationInMultipleTranslationUnitsTest fixture class -// is defined in gtest-param-test_test.h. -TEST_P(InstantiationInMultipleTranslaionUnitsTest, IsMultipleOf42) { - EXPECT_EQ(0, GetParam() % 42); -} -INSTANTIATE_TEST_CASE_P(Sequence1, - InstantiationInMultipleTranslaionUnitsTest, - Values(42, 42*2)); - -// Tests that each iteration of parameterized test runs in a separate test -// object. -class SeparateInstanceTest : public TestWithParam { - public: - SeparateInstanceTest() : count_(0) {} - - static void TearDownTestCase() { - EXPECT_GE(global_count_, 2) - << "If some (but not all) SeparateInstanceTest tests have been " - << "filtered out this test will fail. Make sure that all " - << "GeneratorEvaluationTest are selected or de-selected together " - << "by the test filter."; - } - - protected: - int count_; - static int global_count_; -}; -int SeparateInstanceTest::global_count_ = 0; - -TEST_P(SeparateInstanceTest, TestsRunInSeparateInstances) { - EXPECT_EQ(0, count_++); - global_count_++; -} -INSTANTIATE_TEST_CASE_P(FourElemSequence, SeparateInstanceTest, Range(1, 4)); - -// Tests that all instantiations of a test have named appropriately. Test -// defined with TEST_P(TestCaseName, TestName) and instantiated with -// INSTANTIATE_TEST_CASE_P(SequenceName, TestCaseName, generator) must be named -// SequenceName/TestCaseName.TestName/i, where i is the 0-based index of the -// sequence element used to instantiate the test. -class NamingTest : public TestWithParam {}; - -TEST_P(NamingTest, TestsAreNamedAppropriately) { - const ::testing::TestInfo* const test_info = - ::testing::UnitTest::GetInstance()->current_test_info(); - - EXPECT_STREQ("ZeroToFiveSequence/NamingTest", test_info->test_case_name()); - - Message msg; - msg << "TestsAreNamedAppropriately/" << GetParam(); - EXPECT_STREQ(msg.GetString().c_str(), test_info->name()); -} - -INSTANTIATE_TEST_CASE_P(ZeroToFiveSequence, NamingTest, Range(0, 5)); - -#endif // GTEST_HAS_PARAM_TEST - -TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined) { -#if GTEST_HAS_COMBINE && !GTEST_HAS_PARAM_TEST - FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n" -#endif -} - -int main(int argc, char **argv) { -#if GTEST_HAS_PARAM_TEST - // Used in TestGenerationTest test case. - AddGlobalTestEnvironment(TestGenerationTest::Environment::Instance()); - // Used in GeneratorEvaluationTest test case. - GeneratorEvaluationTest::set_param_value(1); -#endif // GTEST_HAS_PARAM_TEST - - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.h deleted file mode 100644 index b7f94936..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-param-test_test.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file provides classes and functions used internally -// for testing Google Test itself. - -#ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ -#define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -// Test fixture for testing definition and instantiation of a test -// in separate translation units. -class ExternalInstantiationTest : public ::testing::TestWithParam {}; - -// Test fixture for testing instantiation of a test in multiple -// translation units. -class InstantiationInMultipleTranslaionUnitsTest - : public ::testing::TestWithParam {}; - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-port_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-port_test.cc deleted file mode 100644 index f4560f19..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-port_test.cc +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev), wan@google.com (Zhanyong Wan) -// -// This file tests the internal cross-platform support utilities. - -#include - -#if GTEST_OS_MAC -#include -#endif // GTEST_OS_MAC - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { - -TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) { - if (false) - GTEST_CHECK_(false) << "This should never be executed; " - "It's a compilation test only."; - - if (true) - GTEST_CHECK_(true); - else - ; // NOLINT - - if (false) - ; // NOLINT - else - GTEST_CHECK_(true) << ""; -} - -TEST(GtestCheckSyntaxTest, WorksWithSwitch) { - switch (0) { - case 1: - break; - default: - GTEST_CHECK_(true); - } - - switch(0) - case 0: - GTEST_CHECK_(true) << "Check failed in switch case"; -} - -#if GTEST_OS_MAC -void* ThreadFunc(void* data) { - pthread_mutex_t* mutex = reinterpret_cast(data); - pthread_mutex_lock(mutex); - pthread_mutex_unlock(mutex); - return NULL; -} - -TEST(GetThreadCountTest, ReturnsCorrectValue) { - EXPECT_EQ(1, GetThreadCount()); - pthread_mutex_t mutex; - pthread_attr_t attr; - pthread_t thread_id; - - // TODO(vladl@google.com): turn mutex into internal::Mutex for automatic - // destruction. - pthread_mutex_init(&mutex, NULL); - pthread_mutex_lock(&mutex); - ASSERT_EQ(0, pthread_attr_init(&attr)); - ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE)); - - const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex); - ASSERT_EQ(0, pthread_attr_destroy(&attr)); - ASSERT_EQ(0, status); - EXPECT_EQ(2, GetThreadCount()); - pthread_mutex_unlock(&mutex); - - void* dummy; - ASSERT_EQ(0, pthread_join(thread_id, &dummy)); - EXPECT_EQ(1, GetThreadCount()); - pthread_mutex_destroy(&mutex); -} -#else -TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) { - EXPECT_EQ(0, GetThreadCount()); -} -#endif // GTEST_OS_MAC - -#if GTEST_HAS_DEATH_TEST - -TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) { - const bool a_false_condition = false; - const char regex[] = -#ifdef _MSC_VER - "gtest-port_test\\.cc\\(\\d+\\):" -#else - "gtest-port_test\\.cc:[0-9]+" -#endif // _MSC_VER - ".*a_false_condition.*Extra info.*"; - - EXPECT_DEATH(GTEST_CHECK_(a_false_condition) << "Extra info", regex); -} - -TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) { - EXPECT_EXIT({ - GTEST_CHECK_(true) << "Extra info"; - ::std::cerr << "Success\n"; - exit(0); }, - ::testing::ExitedWithCode(0), "Success"); -} - -#endif // GTEST_HAS_DEATH_TEST - -#if GTEST_USES_POSIX_RE - -template -class RETest : public ::testing::Test {}; - -// Defines StringTypes as the list of all string types that class RE -// supports. -typedef testing::Types< -#if GTEST_HAS_STD_STRING - ::std::string, -#endif // GTEST_HAS_STD_STRING -#if GTEST_HAS_GLOBAL_STRING - ::string, -#endif // GTEST_HAS_GLOBAL_STRING - const char*> StringTypes; - -TYPED_TEST_CASE(RETest, StringTypes); - -// Tests RE's implicit constructors. -TYPED_TEST(RETest, ImplicitConstructorWorks) { - const RE empty(TypeParam("")); - EXPECT_STREQ("", empty.pattern()); - - const RE simple(TypeParam("hello")); - EXPECT_STREQ("hello", simple.pattern()); - - const RE normal(TypeParam(".*(\\w+)")); - EXPECT_STREQ(".*(\\w+)", normal.pattern()); -} - -// Tests that RE's constructors reject invalid regular expressions. -TYPED_TEST(RETest, RejectsInvalidRegex) { - EXPECT_NONFATAL_FAILURE({ - const RE invalid(TypeParam("?")); - }, "\"?\" is not a valid POSIX Extended regular expression."); -} - -// Tests RE::FullMatch(). -TYPED_TEST(RETest, FullMatchWorks) { - const RE empty(TypeParam("")); - EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty)); - EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty)); - - const RE re(TypeParam("a.*z")); - EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re)); - EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re)); - EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re)); - EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re)); -} - -// Tests RE::PartialMatch(). -TYPED_TEST(RETest, PartialMatchWorks) { - const RE empty(TypeParam("")); - EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty)); - - const RE re(TypeParam("a.*z")); - EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re)); - EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re)); -} - -#elif GTEST_USES_SIMPLE_RE - -TEST(IsInSetTest, NulCharIsNotInAnySet) { - EXPECT_FALSE(IsInSet('\0', "")); - EXPECT_FALSE(IsInSet('\0', "\0")); - EXPECT_FALSE(IsInSet('\0', "a")); -} - -TEST(IsInSetTest, WorksForNonNulChars) { - EXPECT_FALSE(IsInSet('a', "Ab")); - EXPECT_FALSE(IsInSet('c', "")); - - EXPECT_TRUE(IsInSet('b', "bcd")); - EXPECT_TRUE(IsInSet('b', "ab")); -} - -TEST(IsDigitTest, IsFalseForNonDigit) { - EXPECT_FALSE(IsDigit('\0')); - EXPECT_FALSE(IsDigit(' ')); - EXPECT_FALSE(IsDigit('+')); - EXPECT_FALSE(IsDigit('-')); - EXPECT_FALSE(IsDigit('.')); - EXPECT_FALSE(IsDigit('a')); -} - -TEST(IsDigitTest, IsTrueForDigit) { - EXPECT_TRUE(IsDigit('0')); - EXPECT_TRUE(IsDigit('1')); - EXPECT_TRUE(IsDigit('5')); - EXPECT_TRUE(IsDigit('9')); -} - -TEST(IsPunctTest, IsFalseForNonPunct) { - EXPECT_FALSE(IsPunct('\0')); - EXPECT_FALSE(IsPunct(' ')); - EXPECT_FALSE(IsPunct('\n')); - EXPECT_FALSE(IsPunct('a')); - EXPECT_FALSE(IsPunct('0')); -} - -TEST(IsPunctTest, IsTrueForPunct) { - for (const char* p = "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; *p; p++) { - EXPECT_PRED1(IsPunct, *p); - } -} - -TEST(IsRepeatTest, IsFalseForNonRepeatChar) { - EXPECT_FALSE(IsRepeat('\0')); - EXPECT_FALSE(IsRepeat(' ')); - EXPECT_FALSE(IsRepeat('a')); - EXPECT_FALSE(IsRepeat('1')); - EXPECT_FALSE(IsRepeat('-')); -} - -TEST(IsRepeatTest, IsTrueForRepeatChar) { - EXPECT_TRUE(IsRepeat('?')); - EXPECT_TRUE(IsRepeat('*')); - EXPECT_TRUE(IsRepeat('+')); -} - -TEST(IsWhiteSpaceTest, IsFalseForNonWhiteSpace) { - EXPECT_FALSE(IsWhiteSpace('\0')); - EXPECT_FALSE(IsWhiteSpace('a')); - EXPECT_FALSE(IsWhiteSpace('1')); - EXPECT_FALSE(IsWhiteSpace('+')); - EXPECT_FALSE(IsWhiteSpace('_')); -} - -TEST(IsWhiteSpaceTest, IsTrueForWhiteSpace) { - EXPECT_TRUE(IsWhiteSpace(' ')); - EXPECT_TRUE(IsWhiteSpace('\n')); - EXPECT_TRUE(IsWhiteSpace('\r')); - EXPECT_TRUE(IsWhiteSpace('\t')); - EXPECT_TRUE(IsWhiteSpace('\v')); - EXPECT_TRUE(IsWhiteSpace('\f')); -} - -TEST(IsWordCharTest, IsFalseForNonWordChar) { - EXPECT_FALSE(IsWordChar('\0')); - EXPECT_FALSE(IsWordChar('+')); - EXPECT_FALSE(IsWordChar('.')); - EXPECT_FALSE(IsWordChar(' ')); - EXPECT_FALSE(IsWordChar('\n')); -} - -TEST(IsWordCharTest, IsTrueForLetter) { - EXPECT_TRUE(IsWordChar('a')); - EXPECT_TRUE(IsWordChar('b')); - EXPECT_TRUE(IsWordChar('A')); - EXPECT_TRUE(IsWordChar('Z')); -} - -TEST(IsWordCharTest, IsTrueForDigit) { - EXPECT_TRUE(IsWordChar('0')); - EXPECT_TRUE(IsWordChar('1')); - EXPECT_TRUE(IsWordChar('7')); - EXPECT_TRUE(IsWordChar('9')); -} - -TEST(IsWordCharTest, IsTrueForUnderscore) { - EXPECT_TRUE(IsWordChar('_')); -} - -TEST(IsValidEscapeTest, IsFalseForNonPrintable) { - EXPECT_FALSE(IsValidEscape('\0')); - EXPECT_FALSE(IsValidEscape('\007')); -} - -TEST(IsValidEscapeTest, IsFalseForDigit) { - EXPECT_FALSE(IsValidEscape('0')); - EXPECT_FALSE(IsValidEscape('9')); -} - -TEST(IsValidEscapeTest, IsFalseForWhiteSpace) { - EXPECT_FALSE(IsValidEscape(' ')); - EXPECT_FALSE(IsValidEscape('\n')); -} - -TEST(IsValidEscapeTest, IsFalseForSomeLetter) { - EXPECT_FALSE(IsValidEscape('a')); - EXPECT_FALSE(IsValidEscape('Z')); -} - -TEST(IsValidEscapeTest, IsTrueForPunct) { - EXPECT_TRUE(IsValidEscape('.')); - EXPECT_TRUE(IsValidEscape('-')); - EXPECT_TRUE(IsValidEscape('^')); - EXPECT_TRUE(IsValidEscape('$')); - EXPECT_TRUE(IsValidEscape('(')); - EXPECT_TRUE(IsValidEscape(']')); - EXPECT_TRUE(IsValidEscape('{')); - EXPECT_TRUE(IsValidEscape('|')); -} - -TEST(IsValidEscapeTest, IsTrueForSomeLetter) { - EXPECT_TRUE(IsValidEscape('d')); - EXPECT_TRUE(IsValidEscape('D')); - EXPECT_TRUE(IsValidEscape('s')); - EXPECT_TRUE(IsValidEscape('S')); - EXPECT_TRUE(IsValidEscape('w')); - EXPECT_TRUE(IsValidEscape('W')); -} - -TEST(AtomMatchesCharTest, EscapedPunct) { - EXPECT_FALSE(AtomMatchesChar(true, '\\', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, '\\', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, '_', '.')); - EXPECT_FALSE(AtomMatchesChar(true, '.', 'a')); - - EXPECT_TRUE(AtomMatchesChar(true, '\\', '\\')); - EXPECT_TRUE(AtomMatchesChar(true, '_', '_')); - EXPECT_TRUE(AtomMatchesChar(true, '+', '+')); - EXPECT_TRUE(AtomMatchesChar(true, '.', '.')); -} - -TEST(AtomMatchesCharTest, Escaped_d) { - EXPECT_FALSE(AtomMatchesChar(true, 'd', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'd', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 'd', '.')); - - EXPECT_TRUE(AtomMatchesChar(true, 'd', '0')); - EXPECT_TRUE(AtomMatchesChar(true, 'd', '9')); -} - -TEST(AtomMatchesCharTest, Escaped_D) { - EXPECT_FALSE(AtomMatchesChar(true, 'D', '0')); - EXPECT_FALSE(AtomMatchesChar(true, 'D', '9')); - - EXPECT_TRUE(AtomMatchesChar(true, 'D', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'D', 'a')); - EXPECT_TRUE(AtomMatchesChar(true, 'D', '-')); -} - -TEST(AtomMatchesCharTest, Escaped_s) { - EXPECT_FALSE(AtomMatchesChar(true, 's', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 's', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 's', '.')); - EXPECT_FALSE(AtomMatchesChar(true, 's', '9')); - - EXPECT_TRUE(AtomMatchesChar(true, 's', ' ')); - EXPECT_TRUE(AtomMatchesChar(true, 's', '\n')); - EXPECT_TRUE(AtomMatchesChar(true, 's', '\t')); -} - -TEST(AtomMatchesCharTest, Escaped_S) { - EXPECT_FALSE(AtomMatchesChar(true, 'S', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, 'S', '\r')); - - EXPECT_TRUE(AtomMatchesChar(true, 'S', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'S', 'a')); - EXPECT_TRUE(AtomMatchesChar(true, 'S', '9')); -} - -TEST(AtomMatchesCharTest, Escaped_w) { - EXPECT_FALSE(AtomMatchesChar(true, 'w', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', '+')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', '\n')); - - EXPECT_TRUE(AtomMatchesChar(true, 'w', '0')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', 'b')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', 'C')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', '_')); -} - -TEST(AtomMatchesCharTest, Escaped_W) { - EXPECT_FALSE(AtomMatchesChar(true, 'W', 'A')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', 'b')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', '9')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', '_')); - - EXPECT_TRUE(AtomMatchesChar(true, 'W', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'W', '*')); - EXPECT_TRUE(AtomMatchesChar(true, 'W', '\n')); -} - -TEST(AtomMatchesCharTest, EscapedWhiteSpace) { - EXPECT_FALSE(AtomMatchesChar(true, 'f', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'f', '\n')); - EXPECT_FALSE(AtomMatchesChar(true, 'n', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'n', '\r')); - EXPECT_FALSE(AtomMatchesChar(true, 'r', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'r', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 't', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 't', 't')); - EXPECT_FALSE(AtomMatchesChar(true, 'v', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'v', '\f')); - - EXPECT_TRUE(AtomMatchesChar(true, 'f', '\f')); - EXPECT_TRUE(AtomMatchesChar(true, 'n', '\n')); - EXPECT_TRUE(AtomMatchesChar(true, 'r', '\r')); - EXPECT_TRUE(AtomMatchesChar(true, 't', '\t')); - EXPECT_TRUE(AtomMatchesChar(true, 'v', '\v')); -} - -TEST(AtomMatchesCharTest, UnescapedDot) { - EXPECT_FALSE(AtomMatchesChar(false, '.', '\n')); - - EXPECT_TRUE(AtomMatchesChar(false, '.', '\0')); - EXPECT_TRUE(AtomMatchesChar(false, '.', '.')); - EXPECT_TRUE(AtomMatchesChar(false, '.', 'a')); - EXPECT_TRUE(AtomMatchesChar(false, '.', ' ')); -} - -TEST(AtomMatchesCharTest, UnescapedChar) { - EXPECT_FALSE(AtomMatchesChar(false, 'a', '\0')); - EXPECT_FALSE(AtomMatchesChar(false, 'a', 'b')); - EXPECT_FALSE(AtomMatchesChar(false, '$', 'a')); - - EXPECT_TRUE(AtomMatchesChar(false, '$', '$')); - EXPECT_TRUE(AtomMatchesChar(false, '5', '5')); - EXPECT_TRUE(AtomMatchesChar(false, 'Z', 'Z')); -} - -TEST(ValidateRegexTest, GeneratesFailureAndReturnsFalseForInvalid) { - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(NULL)), - "NULL is not a valid simple regular expression"); - EXPECT_NONFATAL_FAILURE( - ASSERT_FALSE(ValidateRegex("a\\")), - "Syntax error at index 1 in simple regular expression \"a\\\": "); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a\\")), - "'\\' cannot appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\n\\")), - "'\\' cannot appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\s\\hb")), - "invalid escape sequence \"\\h\""); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^^")), - "'^' can only appear at the beginning"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(".*^b")), - "'^' can only appear at the beginning"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("$$")), - "'$' can only appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^$a")), - "'$' can only appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a(b")), - "'(' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("ab)")), - "')' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("[ab")), - "'[' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a{2")), - "'{' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("?")), - "'?' can only follow a repeatable token"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^*")), - "'*' can only follow a repeatable token"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("5*+")), - "'+' can only follow a repeatable token"); -} - -TEST(ValidateRegexTest, ReturnsTrueForValid) { - EXPECT_TRUE(ValidateRegex("")); - EXPECT_TRUE(ValidateRegex("a")); - EXPECT_TRUE(ValidateRegex(".*")); - EXPECT_TRUE(ValidateRegex("^a_+")); - EXPECT_TRUE(ValidateRegex("^a\\t\\&?")); - EXPECT_TRUE(ValidateRegex("09*$")); - EXPECT_TRUE(ValidateRegex("^Z$")); - EXPECT_TRUE(ValidateRegex("a\\^Z\\$\\(\\)\\|\\[\\]\\{\\}")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrOne) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "a", "ba")); - // Repeating more than once. - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "aab")); - - // Repeating zero times. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ba")); - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ab")); - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '#', '?', ".", "##")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrMany) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '*', "a$", "baab")); - - // Repeating zero times. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "bc")); - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "abc")); - // Repeating more than once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '*', "-", "ab_1-g")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForOneOrMany) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "a$", "baab")); - // Repeating zero times. - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "bc")); - - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "abc")); - // Repeating more than once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '+', "-", "ab_1-g")); -} - -TEST(MatchRegexAtHeadTest, ReturnsTrueForEmptyRegex) { - EXPECT_TRUE(MatchRegexAtHead("", "")); - EXPECT_TRUE(MatchRegexAtHead("", "ab")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenDollarIsInRegex) { - EXPECT_FALSE(MatchRegexAtHead("$", "a")); - - EXPECT_TRUE(MatchRegexAtHead("$", "")); - EXPECT_TRUE(MatchRegexAtHead("a$", "a")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithEscapeSequence) { - EXPECT_FALSE(MatchRegexAtHead("\\w", "+")); - EXPECT_FALSE(MatchRegexAtHead("\\W", "ab")); - - EXPECT_TRUE(MatchRegexAtHead("\\sa", "\nab")); - EXPECT_TRUE(MatchRegexAtHead("\\d", "1a")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) { - EXPECT_FALSE(MatchRegexAtHead(".+a", "abc")); - EXPECT_FALSE(MatchRegexAtHead("a?b", "aab")); - - EXPECT_TRUE(MatchRegexAtHead(".*a", "bc12-ab")); - EXPECT_TRUE(MatchRegexAtHead("a?b", "b")); - EXPECT_TRUE(MatchRegexAtHead("a?b", "ab")); -} - -TEST(MatchRegexAtHeadTest, - WorksWhenRegexStartsWithRepetionOfEscapeSequence) { - EXPECT_FALSE(MatchRegexAtHead("\\.+a", "abc")); - EXPECT_FALSE(MatchRegexAtHead("\\s?b", " b")); - - EXPECT_TRUE(MatchRegexAtHead("\\(*a", "((((ab")); - EXPECT_TRUE(MatchRegexAtHead("\\^?b", "^b")); - EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "b")); - EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "\\b")); -} - -TEST(MatchRegexAtHeadTest, MatchesSequentially) { - EXPECT_FALSE(MatchRegexAtHead("ab.*c", "acabc")); - - EXPECT_TRUE(MatchRegexAtHead("ab.*c", "ab-fsc")); -} - -TEST(MatchRegexAnywhereTest, ReturnsFalseWhenStringIsNull) { - EXPECT_FALSE(MatchRegexAnywhere("", NULL)); -} - -TEST(MatchRegexAnywhereTest, WorksWhenRegexStartsWithCaret) { - EXPECT_FALSE(MatchRegexAnywhere("^a", "ba")); - EXPECT_FALSE(MatchRegexAnywhere("^$", "a")); - - EXPECT_TRUE(MatchRegexAnywhere("^a", "ab")); - EXPECT_TRUE(MatchRegexAnywhere("^", "ab")); - EXPECT_TRUE(MatchRegexAnywhere("^$", "")); -} - -TEST(MatchRegexAnywhereTest, ReturnsFalseWhenNoMatch) { - EXPECT_FALSE(MatchRegexAnywhere("a", "bcde123")); - EXPECT_FALSE(MatchRegexAnywhere("a.+a", "--aa88888888")); -} - -TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingPrefix) { - EXPECT_TRUE(MatchRegexAnywhere("\\w+", "ab1_ - 5")); - EXPECT_TRUE(MatchRegexAnywhere(".*=", "=")); - EXPECT_TRUE(MatchRegexAnywhere("x.*ab?.*bc", "xaaabc")); -} - -TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) { - EXPECT_TRUE(MatchRegexAnywhere("\\w+", "$$$ ab1_ - 5")); - EXPECT_TRUE(MatchRegexAnywhere("\\.+=", "= ...=")); -} - -// Tests RE's implicit constructors. -TEST(RETest, ImplicitConstructorWorks) { - const RE empty(""); - EXPECT_STREQ("", empty.pattern()); - - const RE simple("hello"); - EXPECT_STREQ("hello", simple.pattern()); -} - -// Tests that RE's constructors reject invalid regular expressions. -TEST(RETest, RejectsInvalidRegex) { - EXPECT_NONFATAL_FAILURE({ - const RE normal(NULL); - }, "NULL is not a valid simple regular expression"); - - EXPECT_NONFATAL_FAILURE({ - const RE normal(".*(\\w+"); - }, "'(' is unsupported"); - - EXPECT_NONFATAL_FAILURE({ - const RE invalid("^?"); - }, "'?' can only follow a repeatable token"); -} - -// Tests RE::FullMatch(). -TEST(RETest, FullMatchWorks) { - const RE empty(""); - EXPECT_TRUE(RE::FullMatch("", empty)); - EXPECT_FALSE(RE::FullMatch("a", empty)); - - const RE re1("a"); - EXPECT_TRUE(RE::FullMatch("a", re1)); - - const RE re("a.*z"); - EXPECT_TRUE(RE::FullMatch("az", re)); - EXPECT_TRUE(RE::FullMatch("axyz", re)); - EXPECT_FALSE(RE::FullMatch("baz", re)); - EXPECT_FALSE(RE::FullMatch("azy", re)); -} - -// Tests RE::PartialMatch(). -TEST(RETest, PartialMatchWorks) { - const RE empty(""); - EXPECT_TRUE(RE::PartialMatch("", empty)); - EXPECT_TRUE(RE::PartialMatch("a", empty)); - - const RE re("a.*z"); - EXPECT_TRUE(RE::PartialMatch("az", re)); - EXPECT_TRUE(RE::PartialMatch("axyz", re)); - EXPECT_TRUE(RE::PartialMatch("baz", re)); - EXPECT_TRUE(RE::PartialMatch("azy", re)); - EXPECT_FALSE(RE::PartialMatch("zza", re)); -} - -#endif // GTEST_USES_POSIX_RE - -#if GTEST_HAS_STD_STRING - -TEST(CaptureStderrTest, CapturesStdErr) { - CaptureStderr(); - fprintf(stderr, "abc"); - ASSERT_EQ("abc", GetCapturedStderr()); -} - -#endif // GTEST_HAS_STD_STRING - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-test-part_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-test-part_test.cc deleted file mode 100644 index 93fe156e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-test-part_test.cc +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// - -#include - -#include - -using testing::Test; -using testing::TestPartResult; -using testing::TestPartResultArray; - -using testing::TPRT_FATAL_FAILURE; -using testing::TPRT_NONFATAL_FAILURE; -using testing::TPRT_SUCCESS; - -namespace { - -// Tests the TestPartResult class. - -// The test fixture for testing TestPartResult. -class TestPartResultTest : public Test { - protected: - TestPartResultTest() - : r1_(TPRT_SUCCESS, "foo/bar.cc", 10, "Success!"), - r2_(TPRT_NONFATAL_FAILURE, "foo/bar.cc", -1, "Failure!"), - r3_(TPRT_FATAL_FAILURE, NULL, -1, "Failure!") {} - - TestPartResult r1_, r2_, r3_; -}; - -// Tests TestPartResult::type(). -TEST_F(TestPartResultTest, type) { - EXPECT_EQ(TPRT_SUCCESS, r1_.type()); - EXPECT_EQ(TPRT_NONFATAL_FAILURE, r2_.type()); - EXPECT_EQ(TPRT_FATAL_FAILURE, r3_.type()); -} - -// Tests TestPartResult::file_name(). -TEST_F(TestPartResultTest, file_name) { - EXPECT_STREQ("foo/bar.cc", r1_.file_name()); - EXPECT_STREQ(NULL, r3_.file_name()); -} - -// Tests TestPartResult::line_number(). -TEST_F(TestPartResultTest, line_number) { - EXPECT_EQ(10, r1_.line_number()); - EXPECT_EQ(-1, r2_.line_number()); -} - -// Tests TestPartResult::message(). -TEST_F(TestPartResultTest, message) { - EXPECT_STREQ("Success!", r1_.message()); -} - -// Tests TestPartResult::passed(). -TEST_F(TestPartResultTest, Passed) { - EXPECT_TRUE(r1_.passed()); - EXPECT_FALSE(r2_.passed()); - EXPECT_FALSE(r3_.passed()); -} - -// Tests TestPartResult::failed(). -TEST_F(TestPartResultTest, Failed) { - EXPECT_FALSE(r1_.failed()); - EXPECT_TRUE(r2_.failed()); - EXPECT_TRUE(r3_.failed()); -} - -// Tests TestPartResult::fatally_failed(). -TEST_F(TestPartResultTest, FatallyFailed) { - EXPECT_FALSE(r1_.fatally_failed()); - EXPECT_FALSE(r2_.fatally_failed()); - EXPECT_TRUE(r3_.fatally_failed()); -} - -// Tests TestPartResult::nonfatally_failed(). -TEST_F(TestPartResultTest, NonfatallyFailed) { - EXPECT_FALSE(r1_.nonfatally_failed()); - EXPECT_TRUE(r2_.nonfatally_failed()); - EXPECT_FALSE(r3_.nonfatally_failed()); -} - -// Tests the TestPartResultArray class. - -class TestPartResultArrayTest : public Test { - protected: - TestPartResultArrayTest() - : r1_(TPRT_NONFATAL_FAILURE, "foo/bar.cc", -1, "Failure 1"), - r2_(TPRT_FATAL_FAILURE, "foo/bar.cc", -1, "Failure 2") {} - - const TestPartResult r1_, r2_; -}; - -// Tests that TestPartResultArray initially has size 0. -TEST_F(TestPartResultArrayTest, InitialSizeIsZero) { - TestPartResultArray results; - EXPECT_EQ(0, results.size()); -} - -// Tests that TestPartResultArray contains the given TestPartResult -// after one Append() operation. -TEST_F(TestPartResultArrayTest, ContainsGivenResultAfterAppend) { - TestPartResultArray results; - results.Append(r1_); - EXPECT_EQ(1, results.size()); - EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message()); -} - -// Tests that TestPartResultArray contains the given TestPartResults -// after two Append() operations. -TEST_F(TestPartResultArrayTest, ContainsGivenResultsAfterTwoAppends) { - TestPartResultArray results; - results.Append(r1_); - results.Append(r2_); - EXPECT_EQ(2, results.size()); - EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message()); - EXPECT_STREQ("Failure 2", results.GetTestPartResult(1).message()); -} - -#if GTEST_HAS_DEATH_TEST - -typedef TestPartResultArrayTest TestPartResultArrayDeathTest; - -// Tests that the program dies when GetTestPartResult() is called with -// an invalid index. -TEST_F(TestPartResultArrayDeathTest, DiesWhenIndexIsOutOfBound) { - TestPartResultArray results; - results.Append(r1_); - - EXPECT_DEATH(results.GetTestPartResult(-1), ""); - EXPECT_DEATH(results.GetTestPartResult(1), ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -// TODO(mheule@google.com): Add a test for the class HasNewFatalFailureHelper. - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-tuple_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-tuple_test.cc deleted file mode 100644 index 3829118e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-tuple_test.cc +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include -#include - -namespace { - -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::tr1::tuple_element; -using ::std::tr1::tuple_size; -using ::testing::StaticAssertTypeEq; - -// Tests that tuple_element >::type returns TK. -TEST(tuple_element_Test, ReturnsElementType) { - StaticAssertTypeEq >::type>(); - StaticAssertTypeEq >::type>(); - StaticAssertTypeEq >::type>(); -} - -// Tests that tuple_size::value gives the number of fields in tuple -// type T. -TEST(tuple_size_Test, ReturnsNumberOfFields) { - EXPECT_EQ(0, +tuple_size >::value); - EXPECT_EQ(1, +tuple_size >::value); - EXPECT_EQ(1, +tuple_size >::value); - EXPECT_EQ(1, +(tuple_size > >::value)); - EXPECT_EQ(2, +(tuple_size >::value)); - EXPECT_EQ(3, +(tuple_size >::value)); -} - -// Tests comparing a tuple with itself. -TEST(ComparisonTest, ComparesWithSelf) { - const tuple a(5, 'a', false); - - EXPECT_TRUE(a == a); - EXPECT_FALSE(a != a); -} - -// Tests comparing two tuples with the same value. -TEST(ComparisonTest, ComparesEqualTuples) { - const tuple a(5, true), b(5, true); - - EXPECT_TRUE(a == b); - EXPECT_FALSE(a != b); -} - -// Tests comparing two different tuples that have no reference fields. -TEST(ComparisonTest, ComparesUnequalTuplesWithoutReferenceFields) { - typedef tuple FooTuple; - - const FooTuple a(0, 'x'); - const FooTuple b(1, 'a'); - - EXPECT_TRUE(a != b); - EXPECT_FALSE(a == b); - - const FooTuple c(1, 'b'); - - EXPECT_TRUE(b != c); - EXPECT_FALSE(b == c); -} - -// Tests comparing two different tuples that have reference fields. -TEST(ComparisonTest, ComparesUnequalTuplesWithReferenceFields) { - typedef tuple FooTuple; - - int i = 5; - const char ch = 'a'; - const FooTuple a(i, ch); - - int j = 6; - const FooTuple b(j, ch); - - EXPECT_TRUE(a != b); - EXPECT_FALSE(a == b); - - j = 5; - const char ch2 = 'b'; - const FooTuple c(j, ch2); - - EXPECT_TRUE(b != c); - EXPECT_FALSE(b == c); -} - -// Tests that a tuple field with a reference type is an alias of the -// variable it's supposed to reference. -TEST(ReferenceFieldTest, IsAliasOfReferencedVariable) { - int n = 0; - tuple t(true, n); - - n = 1; - EXPECT_EQ(n, get<1>(t)) - << "Changing a underlying variable should update the reference field."; - - // Makes sure that the implementation doesn't do anything funny with - // the & operator for the return type of get<>(). - EXPECT_EQ(&n, &(get<1>(t))) - << "The address of a reference field should equal the address of " - << "the underlying variable."; - - get<1>(t) = 2; - EXPECT_EQ(2, n) - << "Changing a reference field should update the underlying variable."; -} - -// Tests tuple's default constructor. -TEST(TupleConstructorTest, DefaultConstructor) { - // We are just testing that the following compiles. - tuple<> empty; - tuple one_field; - tuple three_fields; -} - -// Tests constructing a tuple from its fields. -TEST(TupleConstructorTest, ConstructsFromFields) { - int n = 1; - // Reference field. - tuple a(n); - EXPECT_EQ(&n, &(get<0>(a))); - - // Non-reference fields. - tuple b(5, 'a'); - EXPECT_EQ(5, get<0>(b)); - EXPECT_EQ('a', get<1>(b)); - - // Const reference field. - const int m = 2; - tuple c(true, m); - EXPECT_TRUE(get<0>(c)); - EXPECT_EQ(&m, &(get<1>(c))); -} - -// Tests tuple's copy constructor. -TEST(TupleConstructorTest, CopyConstructor) { - tuple a(0.0, true); - tuple b(a); - - EXPECT_DOUBLE_EQ(0.0, get<0>(b)); - EXPECT_TRUE(get<1>(b)); -} - -// Tests constructing a tuple from another tuple that has a compatible -// but different type. -TEST(TupleConstructorTest, ConstructsFromDifferentTupleType) { - tuple a(0, 1, 'a'); - tuple b(a); - - EXPECT_DOUBLE_EQ(0.0, get<0>(b)); - EXPECT_EQ(1, get<1>(b)); - EXPECT_EQ('a', get<2>(b)); -} - -// Tests constructing a 2-tuple from an std::pair. -TEST(TupleConstructorTest, ConstructsFromPair) { - ::std::pair a(1, 'a'); - tuple b(a); - tuple c(a); -} - -// Tests assigning a tuple to another tuple with the same type. -TEST(TupleAssignmentTest, AssignsToSameTupleType) { - const tuple a(5, 7L); - tuple b; - b = a; - EXPECT_EQ(5, get<0>(b)); - EXPECT_EQ(7L, get<1>(b)); -} - -// Tests assigning a tuple to another tuple with a different but -// compatible type. -TEST(TupleAssignmentTest, AssignsToDifferentTupleType) { - const tuple a(1, 7L, true); - tuple b; - b = a; - EXPECT_EQ(1L, get<0>(b)); - EXPECT_EQ(7, get<1>(b)); - EXPECT_TRUE(get<2>(b)); -} - -// Tests assigning an std::pair to a 2-tuple. -TEST(TupleAssignmentTest, AssignsFromPair) { - const ::std::pair a(5, true); - tuple b; - b = a; - EXPECT_EQ(5, get<0>(b)); - EXPECT_TRUE(get<1>(b)); - - tuple c; - c = a; - EXPECT_EQ(5L, get<0>(c)); - EXPECT_TRUE(get<1>(c)); -} - -// A fixture for testing big tuples. -class BigTupleTest : public testing::Test { - protected: - typedef tuple BigTuple; - - BigTupleTest() : - a_(1, 0, 0, 0, 0, 0, 0, 0, 0, 2), - b_(1, 0, 0, 0, 0, 0, 0, 0, 0, 3) {} - - BigTuple a_, b_; -}; - -// Tests constructing big tuples. -TEST_F(BigTupleTest, Construction) { - BigTuple a; - BigTuple b(b_); -} - -// Tests that get(t) returns the N-th (0-based) field of tuple t. -TEST_F(BigTupleTest, get) { - EXPECT_EQ(1, get<0>(a_)); - EXPECT_EQ(2, get<9>(a_)); - - // Tests that get() works on a const tuple too. - const BigTuple a(a_); - EXPECT_EQ(1, get<0>(a)); - EXPECT_EQ(2, get<9>(a)); -} - -// Tests comparing big tuples. -TEST_F(BigTupleTest, Comparisons) { - EXPECT_TRUE(a_ == a_); - EXPECT_FALSE(a_ != a_); - - EXPECT_TRUE(a_ != b_); - EXPECT_FALSE(a_ == b_); -} - -TEST(MakeTupleTest, WorksForScalarTypes) { - tuple a; - a = make_tuple(true, 5); - EXPECT_TRUE(get<0>(a)); - EXPECT_EQ(5, get<1>(a)); - - tuple b; - b = make_tuple('a', 'b', 5); - EXPECT_EQ('a', get<0>(b)); - EXPECT_EQ('b', get<1>(b)); - EXPECT_EQ(5, get<2>(b)); -} - -TEST(MakeTupleTest, WorksForPointers) { - int a[] = { 1, 2, 3, 4 }; - const char* const str = "hi"; - int* const p = a; - - tuple t; - t = make_tuple(str, p); - EXPECT_EQ(str, get<0>(t)); - EXPECT_EQ(p, get<1>(t)); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test2_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test2_test.cc deleted file mode 100644 index 79a8a87d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test2_test.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include "test/gtest-typed-test_test.h" -#include - -#if GTEST_HAS_TYPED_TEST_P - -// Tests that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// (ContainerTest is also instantiated in gtest-typed-test_test.cc.) -INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest, - testing::Types >); - -#endif // GTEST_HAS_TYPED_TEST_P diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.cc deleted file mode 100644 index eb921a06..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.cc +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -#include "test/gtest-typed-test_test.h" -#include - -using testing::Test; - -// Used for testing that SetUpTestCase()/TearDownTestCase(), fixture -// ctor/dtor, and SetUp()/TearDown() work correctly in typed tests and -// type-parameterized test. -template -class CommonTest : public Test { - // For some technical reason, SetUpTestCase() and TearDownTestCase() - // must be public. - public: - static void SetUpTestCase() { - shared_ = new T(5); - } - - static void TearDownTestCase() { - delete shared_; - shared_ = NULL; - } - - // This 'protected:' is optional. There's no harm in making all - // members of this fixture class template public. - protected: - typedef std::list List; - typedef std::set IntSet; - - CommonTest() : value_(1) {} - - virtual ~CommonTest() { EXPECT_EQ(3, value_); } - - virtual void SetUp() { - EXPECT_EQ(1, value_); - value_++; - } - - virtual void TearDown() { - EXPECT_EQ(2, value_); - value_++; - } - - T value_; - static T* shared_; -}; - -template -T* CommonTest::shared_ = NULL; - -// This #ifdef block tests typed tests. -#if GTEST_HAS_TYPED_TEST - -using testing::Types; - -// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor, -// and SetUp()/TearDown() work correctly in typed tests - -typedef Types TwoTypes; -TYPED_TEST_CASE(CommonTest, TwoTypes); - -TYPED_TEST(CommonTest, ValuesAreCorrect) { - // Static members of the fixture class template can be visited via - // the TestFixture:: prefix. - EXPECT_EQ(5, *TestFixture::shared_); - - // Typedefs in the fixture class template can be visited via the - // "typename TestFixture::" prefix. - typename TestFixture::List empty; - EXPECT_EQ(0, empty.size()); - - typename TestFixture::IntSet empty2; - EXPECT_EQ(0, empty2.size()); - - // Non-static members of the fixture class must be visited via - // 'this', as required by C++ for class templates. - EXPECT_EQ(2, this->value_); -} - -// The second test makes sure shared_ is not deleted after the first -// test. -TYPED_TEST(CommonTest, ValuesAreStillCorrect) { - // Static members of the fixture class template can also be visited - // via 'this'. - ASSERT_TRUE(this->shared_ != NULL); - EXPECT_EQ(5, *this->shared_); - - // TypeParam can be used to refer to the type parameter. - EXPECT_EQ(static_cast(2), this->value_); -} - -// Tests that multiple TYPED_TEST_CASE's can be defined in the same -// translation unit. - -template -class TypedTest1 : public Test { -}; - -// Verifies that the second argument of TYPED_TEST_CASE can be a -// single type. -TYPED_TEST_CASE(TypedTest1, int); -TYPED_TEST(TypedTest1, A) {} - -template -class TypedTest2 : public Test { -}; - -// Verifies that the second argument of TYPED_TEST_CASE can be a -// Types<...> type list. -TYPED_TEST_CASE(TypedTest2, Types); - -// This also verifies that tests from different typed test cases can -// share the same name. -TYPED_TEST(TypedTest2, A) {} - -// Tests that a typed test case can be defined in a namespace. - -namespace library1 { - -template -class NumericTest : public Test { -}; - -typedef Types NumericTypes; -TYPED_TEST_CASE(NumericTest, NumericTypes); - -TYPED_TEST(NumericTest, DefaultIsZero) { - EXPECT_EQ(0, TypeParam()); -} - -} // namespace library1 - -#endif // GTEST_HAS_TYPED_TEST - -// This #ifdef block tests type-parameterized tests. -#if GTEST_HAS_TYPED_TEST_P - -using testing::Types; -using testing::internal::TypedTestCasePState; - -// Tests TypedTestCasePState. - -class TypedTestCasePStateTest : public Test { - protected: - virtual void SetUp() { - state_.AddTestName("foo.cc", 0, "FooTest", "A"); - state_.AddTestName("foo.cc", 0, "FooTest", "B"); - state_.AddTestName("foo.cc", 0, "FooTest", "C"); - } - - TypedTestCasePState state_; -}; - -TEST_F(TypedTestCasePStateTest, SucceedsForMatchingList) { - const char* tests = "A, B, C"; - EXPECT_EQ(tests, - state_.VerifyRegisteredTestNames("foo.cc", 1, tests)); -} - -// Makes sure that the order of the tests and spaces around the names -// don't matter. -TEST_F(TypedTestCasePStateTest, IgnoresOrderAndSpaces) { - const char* tests = "A,C, B"; - EXPECT_EQ(tests, - state_.VerifyRegisteredTestNames("foo.cc", 1, tests)); -} - -#if GTEST_HAS_DEATH_TEST - -typedef TypedTestCasePStateTest TypedTestCasePStateDeathTest; - -TEST_F(TypedTestCasePStateDeathTest, DetectsDuplicates) { - EXPECT_DEATH( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, A, C"), - "foo\\.cc.1.?: Test A is listed more than once\\."); -} - -TEST_F(TypedTestCasePStateDeathTest, DetectsExtraTest) { - EXPECT_DEATH( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C, D"), - "foo\\.cc.1.?: No test named D can be found in this test case\\."); -} - -TEST_F(TypedTestCasePStateDeathTest, DetectsMissedTest) { - EXPECT_DEATH( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, C"), - "foo\\.cc.1.?: You forgot to list test B\\."); -} - -// Tests that defining a test for a parameterized test case generates -// a run-time error if the test case has been registered. -TEST_F(TypedTestCasePStateDeathTest, DetectsTestAfterRegistration) { - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C"); - EXPECT_DEATH( - state_.AddTestName("foo.cc", 2, "FooTest", "D"), - "foo\\.cc.2.?: Test D must be defined before REGISTER_TYPED_TEST_CASE_P" - "\\(FooTest, \\.\\.\\.\\)\\."); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor, -// and SetUp()/TearDown() work correctly in type-parameterized tests. - -template -class DerivedTest : public CommonTest { -}; - -TYPED_TEST_CASE_P(DerivedTest); - -TYPED_TEST_P(DerivedTest, ValuesAreCorrect) { - // Static members of the fixture class template can be visited via - // the TestFixture:: prefix. - EXPECT_EQ(5, *TestFixture::shared_); - - // Non-static members of the fixture class must be visited via - // 'this', as required by C++ for class templates. - EXPECT_EQ(2, this->value_); -} - -// The second test makes sure shared_ is not deleted after the first -// test. -TYPED_TEST_P(DerivedTest, ValuesAreStillCorrect) { - // Static members of the fixture class template can also be visited - // via 'this'. - ASSERT_TRUE(this->shared_ != NULL); - EXPECT_EQ(5, *this->shared_); - EXPECT_EQ(2, this->value_); -} - -REGISTER_TYPED_TEST_CASE_P(DerivedTest, - ValuesAreCorrect, ValuesAreStillCorrect); - -typedef Types MyTwoTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, DerivedTest, MyTwoTypes); - -// Tests that multiple TYPED_TEST_CASE_P's can be defined in the same -// translation unit. - -template -class TypedTestP1 : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP1); - -// For testing that the code between TYPED_TEST_CASE_P() and -// TYPED_TEST_P() is not enclosed in a namespace. -typedef int IntAfterTypedTestCaseP; - -TYPED_TEST_P(TypedTestP1, A) {} -TYPED_TEST_P(TypedTestP1, B) {} - -// For testing that the code between TYPED_TEST_P() and -// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace. -typedef int IntBeforeRegisterTypedTestCaseP; - -REGISTER_TYPED_TEST_CASE_P(TypedTestP1, A, B); - -template -class TypedTestP2 : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP2); - -// This also verifies that tests from different type-parameterized -// test cases can share the same name. -TYPED_TEST_P(TypedTestP2, A) {} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP2, A); - -// Verifies that the code between TYPED_TEST_CASE_P() and -// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace. -IntAfterTypedTestCaseP after = 0; -IntBeforeRegisterTypedTestCaseP before = 0; - -// Verifies that the last argument of INSTANTIATE_TYPED_TEST_CASE_P() -// can be either a single type or a Types<...> type list. -INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP1, int); -INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP2, Types); - -// Tests that the same type-parameterized test case can be -// instantiated more than once in the same translation unit. -INSTANTIATE_TYPED_TEST_CASE_P(Double, TypedTestP2, Types); - -// Tests that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// (ContainerTest is also instantiated in gtest-typed-test_test.cc.) -typedef Types, std::set > MyContainers; -INSTANTIATE_TYPED_TEST_CASE_P(My, ContainerTest, MyContainers); - -// Tests that a type-parameterized test case can be defined and -// instantiated in a namespace. - -namespace library2 { - -template -class NumericTest : public Test { -}; - -TYPED_TEST_CASE_P(NumericTest); - -TYPED_TEST_P(NumericTest, DefaultIsZero) { - EXPECT_EQ(0, TypeParam()); -} - -TYPED_TEST_P(NumericTest, ZeroIsLessThanOne) { - EXPECT_LT(TypeParam(0), TypeParam(1)); -} - -REGISTER_TYPED_TEST_CASE_P(NumericTest, - DefaultIsZero, ZeroIsLessThanOne); -typedef Types NumericTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, NumericTest, NumericTypes); - -} // namespace library2 - -#endif // GTEST_HAS_TYPED_TEST_P - -#if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P) - -// Google Test doesn't support type-parameterized tests on some platforms -// and compilers, such as MSVC 7.1. If we use conditional compilation to -// compile out all code referring to the gtest_main library, MSVC linker -// will not link that library at all and consequently complain about -// missing entry point defined in that library (fatal error LNK1561: -// entry point must be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, TypedTestsAreNotSupportedOnThisPlatform) {} - -#endif // #if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.h deleted file mode 100644 index ecbe5b31..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest-typed-test_test.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ -#define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ - -#include - -#if GTEST_HAS_TYPED_TEST_P - -using testing::Test; - -// For testing that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// ContainerTest will be instantiated in both gtest-typed-test_test.cc -// and gtest-typed-test2_test.cc. - -template -class ContainerTest : public Test { -}; - -TYPED_TEST_CASE_P(ContainerTest); - -TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) { - TypeParam container; -} - -TYPED_TEST_P(ContainerTest, InitialSizeIsZero) { - TypeParam container; - EXPECT_EQ(0, container.size()); -} - -REGISTER_TYPED_TEST_CASE_P(ContainerTest, - CanBeDefaultConstructed, InitialSizeIsZero); - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_all_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_all_test.cc deleted file mode 100644 index 955aa628..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_all_test.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for Google C++ Testing Framework (Google Test) -// -// Sometimes it's desirable to build most of Google Test's own tests -// by compiling a single file. This file serves this purpose. -#include "test/gtest-filepath_test.cc" -#include "test/gtest-linked_ptr_test.cc" -#include "test/gtest-message_test.cc" -#include "test/gtest-options_test.cc" -#include "test/gtest-port_test.cc" -#include "test/gtest_pred_impl_unittest.cc" -#include "test/gtest_prod_test.cc" -#include "test/gtest-test-part_test.cc" -#include "test/gtest-typed-test_test.cc" -#include "test/gtest-typed-test2_test.cc" -#include "test/gtest_unittest.cc" -#include "test/production.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest.py deleted file mode 100755 index 218d3713..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test's break-on-failure mode. - -A user can ask Google Test to seg-fault when an assertion fails, using -either the GTEST_BREAK_ON_FAILURE environment variable or the ---gtest_break_on_failure flag. This script tests such functionality -by invoking gtest_break_on_failure_unittest_ (a program written with -Google Test) with different environments and command line flags. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gtest_test_utils -import os -import sys - - -# Constants. - -IS_WINDOWS = os.name == 'nt' - -# The environment variable for enabling/disabling the break-on-failure mode. -BREAK_ON_FAILURE_ENV_VAR = 'GTEST_BREAK_ON_FAILURE' - -# The command line flag for enabling/disabling the break-on-failure mode. -BREAK_ON_FAILURE_FLAG = 'gtest_break_on_failure' - -# The environment variable for enabling/disabling the throw-on-failure mode. -THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE' - -# The environment variable for enabling/disabling the catch-exceptions mode. -CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS' - -# Path to the gtest_break_on_failure_unittest_ program. -EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_break_on_failure_unittest_') - - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets an environment variable to a given value; unsets it when the - given value is None. - """ - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def Run(command): - """Runs a command; returns 1 if it was killed by a signal, or 0 otherwise.""" - - p = gtest_test_utils.Subprocess(command) - if p.terminated_by_signal: - return 1 - else: - return 0 - - -# The tests. - - -class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase): - """Tests using the GTEST_BREAK_ON_FAILURE environment variable or - the --gtest_break_on_failure flag to turn assertion failures into - segmentation faults. - """ - - def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault): - """Runs gtest_break_on_failure_unittest_ and verifies that it does - (or does not) have a seg-fault. - - Args: - env_var_value: value of the GTEST_BREAK_ON_FAILURE environment - variable; None if the variable should be unset. - flag_value: value of the --gtest_break_on_failure flag; - None if the flag should not be present. - expect_seg_fault: 1 if the program is expected to generate a seg-fault; - 0 otherwise. - """ - - SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value) - - if env_var_value is None: - env_var_value_msg = ' is not set' - else: - env_var_value_msg = '=' + env_var_value - - if flag_value is None: - flag = '' - elif flag_value == '0': - flag = '--%s=0' % BREAK_ON_FAILURE_FLAG - else: - flag = '--%s' % BREAK_ON_FAILURE_FLAG - - command = [EXE_PATH] - if flag: - command.append(flag) - - if expect_seg_fault: - should_or_not = 'should' - else: - should_or_not = 'should not' - - has_seg_fault = Run(command) - - SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None) - - msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' % - (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command), - should_or_not)) - self.assert_(has_seg_fault == expect_seg_fault, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(env_var_value=None, - flag_value=None, - expect_seg_fault=0) - - def testEnvVar(self): - """Tests using the GTEST_BREAK_ON_FAILURE environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value=None, - expect_seg_fault=0) - self.RunAndVerify(env_var_value='1', - flag_value=None, - expect_seg_fault=1) - - def testFlag(self): - """Tests using the --gtest_break_on_failure flag.""" - - self.RunAndVerify(env_var_value=None, - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value=None, - flag_value='1', - expect_seg_fault=1) - - def testFlagOverridesEnvVar(self): - """Tests that the flag overrides the environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value='0', - flag_value='1', - expect_seg_fault=1) - self.RunAndVerify(env_var_value='1', - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value='1', - flag_value='1', - expect_seg_fault=1) - - def testBreakOnFailureOverridesThrowOnFailure(self): - """Tests that gtest_break_on_failure overrides gtest_throw_on_failure.""" - - SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1') - try: - self.RunAndVerify(env_var_value=None, - flag_value='1', - expect_seg_fault=1) - finally: - SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None) - - if IS_WINDOWS: - def testCatchExceptionsDoesNotInterfere(self): - """Tests that gtest_catch_exceptions doesn't interfere.""" - - SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1') - try: - self.RunAndVerify(env_var_value='1', - flag_value='1', - expect_seg_fault=1) - finally: - SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest_.cc deleted file mode 100644 index 10a1203b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_break_on_failure_unittest_.cc +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Unit test for Google Test's break-on-failure mode. -// -// A user can ask Google Test to seg-fault when an assertion fails, using -// either the GTEST_BREAK_ON_FAILURE environment variable or the -// --gtest_break_on_failure flag. This file is used for testing such -// functionality. -// -// This program will be invoked from a Python unit test. It is -// expected to fail. Don't run it directly. - -#include - -#if GTEST_OS_WINDOWS -#include -#endif - -namespace { - -// A test that's expected to fail. -TEST(Foo, Bar) { - EXPECT_EQ(2, 3); -} - -} // namespace - -int main(int argc, char **argv) { -#if GTEST_OS_WINDOWS - // Suppresses display of the Windows error dialog upon encountering - // a general protection fault (segment violation). - SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS); -#endif - testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test.py deleted file mode 100755 index f617dc5c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test correctly determines whether to use colors.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -IS_WINDOWS = os.name = 'nt' - -COLOR_ENV_VAR = 'GTEST_COLOR' -COLOR_FLAG = 'gtest_color' -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_color_test_') - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def UsesColor(term, color_env_var, color_flag): - """Runs gtest_color_test_ and returns its exit code.""" - - SetEnvVar('TERM', term) - SetEnvVar(COLOR_ENV_VAR, color_env_var) - cmd = COMMAND - if color_flag is not None: - cmd += ' --%s=%s' % (COLOR_FLAG, color_flag) - return gtest_test_utils.GetExitStatus(os.system(cmd)) - - -class GTestColorTest(gtest_test_utils.TestCase): - def testNoEnvVarNoFlag(self): - """Tests the case when there's neither GTEST_COLOR nor --gtest_color.""" - - if not IS_WINDOWS: - self.assert_(not UsesColor('dumb', None, None)) - self.assert_(not UsesColor('emacs', None, None)) - self.assert_(not UsesColor('xterm-mono', None, None)) - self.assert_(not UsesColor('unknown', None, None)) - self.assert_(not UsesColor(None, None, None)) - self.assert_(UsesColor('cygwin', None, None)) - self.assert_(UsesColor('xterm', None, None)) - self.assert_(UsesColor('xterm-color', None, None)) - self.assert_(UsesColor('xterm-256color', None, None)) - - def testFlagOnly(self): - """Tests the case when there's --gtest_color but not GTEST_COLOR.""" - - self.assert_(not UsesColor('dumb', None, 'no')) - self.assert_(not UsesColor('xterm-color', None, 'no')) - if not IS_WINDOWS: - self.assert_(not UsesColor('emacs', None, 'auto')) - self.assert_(UsesColor('xterm', None, 'auto')) - self.assert_(UsesColor('dumb', None, 'yes')) - self.assert_(UsesColor('xterm', None, 'yes')) - - def testEnvVarOnly(self): - """Tests the case when there's GTEST_COLOR but not --gtest_color.""" - - self.assert_(not UsesColor('dumb', 'no', None)) - self.assert_(not UsesColor('xterm-color', 'no', None)) - if not IS_WINDOWS: - self.assert_(not UsesColor('dumb', 'auto', None)) - self.assert_(UsesColor('xterm-color', 'auto', None)) - self.assert_(UsesColor('dumb', 'yes', None)) - self.assert_(UsesColor('xterm-color', 'yes', None)) - - def testEnvVarAndFlag(self): - """Tests the case when there are both GTEST_COLOR and --gtest_color.""" - - self.assert_(not UsesColor('xterm-color', 'no', 'no')) - self.assert_(UsesColor('dumb', 'no', 'yes')) - self.assert_(UsesColor('xterm-color', 'no', 'auto')) - - def testAliasesOfYesAndNo(self): - """Tests using aliases in specifying --gtest_color.""" - - self.assert_(UsesColor('dumb', None, 'true')) - self.assert_(UsesColor('dumb', None, 'YES')) - self.assert_(UsesColor('dumb', None, 'T')) - self.assert_(UsesColor('dumb', None, '1')) - - self.assert_(not UsesColor('xterm', None, 'f')) - self.assert_(not UsesColor('xterm', None, 'false')) - self.assert_(not UsesColor('xterm', None, '0')) - self.assert_(not UsesColor('xterm', None, 'unknown')) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test_.cc deleted file mode 100644 index 305aeb96..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_color_test_.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// A helper program for testing how Google Test determines whether to use -// colors in the output. It prints "YES" and returns 1 if Google Test -// decides to use colors, and prints "NO" and returns 0 otherwise. - -#include - -#include - -namespace testing { -namespace internal { -bool ShouldUseColor(bool stdout_is_tty); -} // namespace internal -} // namespace testing - -using testing::internal::ShouldUseColor; - -// The purpose of this is to ensure that the UnitTest singleton is -// created before main() is entered, and thus that ShouldUseColor() -// works the same way as in a real Google-Test-based test. We don't actual -// run the TEST itself. -TEST(GTestColorTest, Dummy) { -} - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - if (ShouldUseColor(true)) { - // Google Test decides to use colors in the output (assuming it - // goes to a TTY). - printf("YES\n"); - return 1; - } else { - // Google Test decides not to use colors in the output. - printf("NO\n"); - return 0; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test.py deleted file mode 100755 index 54719fac..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test.py +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test correctly parses environment variables.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -IS_WINDOWS = os.name == 'nt' -IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' - -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_') - - -def AssertEq(expected, actual): - if expected != actual: - print 'Expected: %s' % (expected,) - print ' Actual: %s' % (actual,) - raise AssertionError - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def GetFlag(command, flag): - """Runs gtest_env_var_test_ and returns its output.""" - - cmd = command - if flag is not None: - cmd += ' %s' % (flag,) - stdin, stdout = os.popen2(cmd, 'b') - stdin.close() - line = stdout.readline() - stdout.close() - return line - - -def TestFlag(command, flag, test_val, default_val): - """Verifies that the given flag is affected by the corresponding env var.""" - - env_var = 'GTEST_' + flag.upper() - SetEnvVar(env_var, test_val) - AssertEq(test_val, GetFlag(command, flag)) - SetEnvVar(env_var, None) - AssertEq(default_val, GetFlag(command, flag)) - - -def TestEnvVarAffectsFlag(command): - """An environment variable should affect the corresponding flag.""" - - TestFlag(command, 'break_on_failure', '1', '0') - TestFlag(command, 'color', 'yes', 'auto') - TestFlag(command, 'filter', 'FooTest.Bar', '*') - TestFlag(command, 'output', 'tmp/foo.xml', '') - TestFlag(command, 'print_time', '0', '1') - TestFlag(command, 'repeat', '999', '1') - TestFlag(command, 'throw_on_failure', '1', '0') - TestFlag(command, 'death_test_style', 'threadsafe', 'fast') - - if IS_WINDOWS: - TestFlag(command, 'catch_exceptions', '1', '0') - - if IS_LINUX: - TestFlag(command, 'death_test_use_fork', '1', '0') - TestFlag(command, 'stack_trace_depth', '0', '100') - - -class GTestEnvVarTest(gtest_test_utils.TestCase): - def testEnvVarAffectsFlag(self): - TestEnvVarAffectsFlag(COMMAND) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test_.cc deleted file mode 100644 index f7c78fcf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_env_var_test_.cc +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// A helper program for testing that Google Test parses the environment -// variables correctly. - -#include - -#include - -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -using ::std::cout; - -namespace testing { - -// The purpose of this is to make the test more realistic by ensuring -// that the UnitTest singleton is created before main() is entered. -// We don't actual run the TEST itself. -TEST(GTestEnvVarTest, Dummy) { -} - -void PrintFlag(const char* flag) { - if (strcmp(flag, "break_on_failure") == 0) { - cout << GTEST_FLAG(break_on_failure); - return; - } - - if (strcmp(flag, "catch_exceptions") == 0) { - cout << GTEST_FLAG(catch_exceptions); - return; - } - - if (strcmp(flag, "color") == 0) { - cout << GTEST_FLAG(color); - return; - } - - if (strcmp(flag, "death_test_style") == 0) { - cout << GTEST_FLAG(death_test_style); - return; - } - - if (strcmp(flag, "death_test_use_fork") == 0) { - cout << GTEST_FLAG(death_test_use_fork); - return; - } - - if (strcmp(flag, "filter") == 0) { - cout << GTEST_FLAG(filter); - return; - } - - if (strcmp(flag, "output") == 0) { - cout << GTEST_FLAG(output); - return; - } - - if (strcmp(flag, "print_time") == 0) { - cout << GTEST_FLAG(print_time); - return; - } - - if (strcmp(flag, "repeat") == 0) { - cout << GTEST_FLAG(repeat); - return; - } - - if (strcmp(flag, "stack_trace_depth") == 0) { - cout << GTEST_FLAG(stack_trace_depth); - return; - } - - if (strcmp(flag, "throw_on_failure") == 0) { - cout << GTEST_FLAG(throw_on_failure); - return; - } - - cout << "Invalid flag name " << flag - << ". Valid names are break_on_failure, color, filter, etc.\n"; - exit(1); -} - -} // namespace testing - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - if (argc != 2) { - cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n"; - return 1; - } - - testing::PrintFlag(argv[1]); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_environment_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_environment_test.cc deleted file mode 100644 index c9392614..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_environment_test.cc +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests using global test environments. - -#include -#include -#include - -namespace testing { -GTEST_DECLARE_string_(filter); -} - -namespace { - -enum FailureType { - NO_FAILURE, NON_FATAL_FAILURE, FATAL_FAILURE -}; - -// For testing using global test environments. -class MyEnvironment : public testing::Environment { - public: - MyEnvironment() { Reset(); } - - // Depending on the value of failure_in_set_up_, SetUp() will - // generate a non-fatal failure, generate a fatal failure, or - // succeed. - virtual void SetUp() { - set_up_was_run_ = true; - - switch (failure_in_set_up_) { - case NON_FATAL_FAILURE: - ADD_FAILURE() << "Expected non-fatal failure in global set-up."; - break; - case FATAL_FAILURE: - FAIL() << "Expected fatal failure in global set-up."; - break; - default: - break; - } - } - - // Generates a non-fatal failure. - virtual void TearDown() { - tear_down_was_run_ = true; - ADD_FAILURE() << "Expected non-fatal failure in global tear-down."; - } - - // Resets the state of the environment s.t. it can be reused. - void Reset() { - failure_in_set_up_ = NO_FAILURE; - set_up_was_run_ = false; - tear_down_was_run_ = false; - } - - // We call this function to set the type of failure SetUp() should - // generate. - void set_failure_in_set_up(FailureType type) { - failure_in_set_up_ = type; - } - - // Was SetUp() run? - bool set_up_was_run() const { return set_up_was_run_; } - - // Was TearDown() run? - bool tear_down_was_run() const { return tear_down_was_run_; } - private: - FailureType failure_in_set_up_; - bool set_up_was_run_; - bool tear_down_was_run_; -}; - -// Was the TEST run? -bool test_was_run; - -// The sole purpose of this TEST is to enable us to check whether it -// was run. -TEST(FooTest, Bar) { - test_was_run = true; -} - -// Prints the message and aborts the program if condition is false. -void Check(bool condition, const char* msg) { - if (!condition) { - printf("FAILED: %s\n", msg); - abort(); - } -} - -// Runs the tests. Return true iff successful. -// -// The 'failure' parameter specifies the type of failure that should -// be generated by the global set-up. -int RunAllTests(MyEnvironment* env, FailureType failure) { - env->Reset(); - env->set_failure_in_set_up(failure); - test_was_run = false; - return RUN_ALL_TESTS(); -} - -} // namespace - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - // Registers a global test environment, and verifies that the - // registration function returns its argument. - MyEnvironment* const env = new MyEnvironment; - Check(testing::AddGlobalTestEnvironment(env) == env, - "AddGlobalTestEnvironment() should return its argument."); - - // Verifies that RUN_ALL_TESTS() runs the tests when the global - // set-up is successful. - Check(RunAllTests(env, NO_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as the global tear-down " - "should generate a failure."); - Check(test_was_run, - "The tests should run, as the global set-up should generate no " - "failure"); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() runs the tests when the global - // set-up generates no fatal failure. - Check(RunAllTests(env, NON_FATAL_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as both the global set-up " - "and the global tear-down should generate a non-fatal failure."); - Check(test_was_run, - "The tests should run, as the global set-up should generate no " - "fatal failure."); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() runs no test when the global set-up - // generates a fatal failure. - Check(RunAllTests(env, FATAL_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as the global set-up " - "should generate a fatal failure."); - Check(!test_was_run, - "The tests should not run, as the global set-up should generate " - "a fatal failure."); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() doesn't do global set-up or - // tear-down when there is no test to run. - testing::GTEST_FLAG(filter) = "-*"; - Check(RunAllTests(env, NO_FAILURE) == 0, - "RUN_ALL_TESTS() should return zero, as there is no test to run."); - Check(!env->set_up_was_run(), - "The global set-up should not run, as there is no test to run."); - Check(!env->tear_down_was_run(), - "The global tear-down should not run, " - "as the global set-up was not run."); - - printf("PASS\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest.py deleted file mode 100755 index 4e9556b7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest.py +++ /dev/null @@ -1,592 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2005 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test test filters. - -A user can specify which test(s) in a Google Test program to run via either -the GTEST_FILTER environment variable or the --gtest_filter flag. -This script tests such functionality by invoking -gtest_filter_unittest_ (a program written with Google Test) with different -environments and command line flags. - -Note that test sharding may also influence which tests are filtered. Therefore, -we test that here also. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sets -import gtest_test_utils - -# Constants. - -IS_WINDOWS = os.name == 'nt' - -# The environment variable for specifying the test filters. -FILTER_ENV_VAR = 'GTEST_FILTER' - -# The environment variables for test sharding. -TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS' -SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX' -SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE' - -# The command line flag for specifying the test filters. -FILTER_FLAG = 'gtest_filter' - -# The command line flag for including disabled tests. -ALSO_RUN_DISABED_TESTS_FLAG = 'gtest_also_run_disabled_tests' - -# Command to run the gtest_filter_unittest_ program. -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_') - -# Regex for determining whether parameterized tests are enabled in the binary. -PARAM_TEST_REGEX = re.compile(r'/ParamTest') - -# Regex for parsing test case names from Google Test's output. -TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)') - -# Regex for parsing test names from Google Test's output. -TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)') - -# Full names of all tests in gtest_filter_unittests_. -PARAM_TESTS = [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - 'SeqQ/ParamTest.TestX/0', - 'SeqQ/ParamTest.TestX/1', - 'SeqQ/ParamTest.TestY/0', - 'SeqQ/ParamTest.TestY/1', - ] - -DISABLED_TESTS = [ - 'BarTest.DISABLED_TestFour', - 'BarTest.DISABLED_TestFive', - 'BazTest.DISABLED_TestC', - 'DISABLED_FoobarTest.Test1', - 'DISABLED_FoobarTest.DISABLED_Test2', - 'DISABLED_FoobarbazTest.TestA', - ] - -# All the non-disabled tests. -ACTIVE_TESTS = [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', - ] + PARAM_TESTS - -param_tests_present = None - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def Run(command): - """Runs a test program and returns its exit code and a list of tests run.""" - - stdout_file = os.popen(command, 'r') - tests_run = [] - test_case = '' - test = '' - for line in stdout_file: - match = TEST_CASE_REGEX.match(line) - if match is not None: - test_case = match.group(1) - else: - match = TEST_REGEX.match(line) - if match is not None: - test = match.group(1) - tests_run += [test_case + '.' + test] - exit_code = stdout_file.close() - return (tests_run, exit_code) - - -def InvokeWithModifiedEnv(extra_env, function, *args, **kwargs): - """Runs the given function and arguments in a modified environment.""" - try: - original_env = os.environ.copy() - os.environ.update(extra_env) - return function(*args, **kwargs) - finally: - for key in extra_env.iterkeys(): - if key in original_env: - os.environ[key] = original_env[key] - else: - del os.environ[key] - - -def RunWithSharding(total_shards, shard_index, command): - """Runs a test program shard and returns exit code and a list of tests run.""" - - extra_env = {SHARD_INDEX_ENV_VAR: str(shard_index), - TOTAL_SHARDS_ENV_VAR: str(total_shards)} - return InvokeWithModifiedEnv(extra_env, Run, command) - -# The unit test. - - -class GTestFilterUnitTest(gtest_test_utils.TestCase): - """Tests GTEST_FILTER env variable or --gtest_filter flag to filter tests.""" - - # Utilities. - - def AssertSetEqual(self, lhs, rhs): - """Asserts that two sets are equal.""" - - for elem in lhs: - self.assert_(elem in rhs, '%s in %s' % (elem, rhs)) - - for elem in rhs: - self.assert_(elem in lhs, '%s in %s' % (elem, lhs)) - - def AssertPartitionIsValid(self, set_var, list_of_sets): - """Asserts that list_of_sets is a valid partition of set_var.""" - - full_partition = [] - for slice_var in list_of_sets: - full_partition.extend(slice_var) - self.assertEqual(len(set_var), len(full_partition)) - self.assertEqual(sets.Set(set_var), sets.Set(full_partition)) - - def AdjustForParameterizedTests(self, tests_to_run): - """Adjust tests_to_run in case value parameterized tests are disabled.""" - - global param_tests_present - if not param_tests_present: - return list(sets.Set(tests_to_run) - sets.Set(PARAM_TESTS)) - else: - return tests_to_run - - def RunAndVerify(self, gtest_filter, tests_to_run): - """Checks that the binary runs correct set of tests for the given filter.""" - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # First, tests using GTEST_FILTER. - - # Windows removes empty variables from the environment when passing it - # to a new process. This means it is impossible to pass an empty filter - # into a process using the GTEST_FILTER environment variable. However, - # we can still test the case when the variable is not supplied (i.e., - # gtest_filter is None). - # pylint: disable-msg=C6403 - if not IS_WINDOWS or gtest_filter != '': - SetEnvVar(FILTER_ENV_VAR, gtest_filter) - tests_run = Run(COMMAND)[0] - SetEnvVar(FILTER_ENV_VAR, None) - self.AssertSetEqual(tests_run, tests_to_run) - # pylint: enable-msg=C6403 - - # Next, tests using --gtest_filter. - - if gtest_filter is None: - command = COMMAND - else: - command = '%s --%s=%s' % (COMMAND, FILTER_FLAG, gtest_filter) - - tests_run = Run(command)[0] - self.AssertSetEqual(tests_run, tests_to_run) - - def RunAndVerifyWithSharding(self, gtest_filter, total_shards, tests_to_run, - command=COMMAND, check_exit_0=False): - """Checks that binary runs correct tests for the given filter and shard. - - Runs all shards of gtest_filter_unittest_ with the given filter, and - verifies that the right set of tests were run. The union of tests run - on each shard should be identical to tests_to_run, without duplicates. - - Args: - gtest_filter: A filter to apply to the tests. - total_shards: A total number of shards to split test run into. - tests_to_run: A set of tests expected to run. - command: A command to invoke the test binary. - check_exit_0: When set to a true value, make sure that all shards - return 0. - """ - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # Windows removes empty variables from the environment when passing it - # to a new process. This means it is impossible to pass an empty filter - # into a process using the GTEST_FILTER environment variable. However, - # we can still test the case when the variable is not supplied (i.e., - # gtest_filter is None). - # pylint: disable-msg=C6403 - if not IS_WINDOWS or gtest_filter != '': - SetEnvVar(FILTER_ENV_VAR, gtest_filter) - partition = [] - for i in range(0, total_shards): - (tests_run, exit_code) = RunWithSharding(total_shards, i, command) - if check_exit_0: - self.assert_(exit_code is None) - partition.append(tests_run) - - self.AssertPartitionIsValid(tests_to_run, partition) - SetEnvVar(FILTER_ENV_VAR, None) - # pylint: enable-msg=C6403 - - def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run): - """Checks that the binary runs correct set of tests for the given filter. - - Runs gtest_filter_unittest_ with the given filter, and enables - disabled tests. Verifies that the right set of tests were run. - - Args: - gtest_filter: A filter to apply to the tests. - tests_to_run: A set of tests expected to run. - """ - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # Construct the command line. - command = '%s --%s' % (COMMAND, ALSO_RUN_DISABED_TESTS_FLAG) - if gtest_filter is not None: - command = '%s --%s=%s' % (command, FILTER_FLAG, gtest_filter) - - tests_run = Run(command)[0] - self.AssertSetEqual(tests_run, tests_to_run) - - def setUp(self): - """Sets up test case. - - Determines whether value-parameterized tests are enabled in the binary and - sets the flags accordingly. - """ - - global param_tests_present - if param_tests_present is None: - param_tests_present = PARAM_TEST_REGEX.search( - '\n'.join(os.popen(COMMAND, 'r').readlines())) is not None - - def testDefaultBehavior(self): - """Tests the behavior of not specifying the filter.""" - - self.RunAndVerify(None, ACTIVE_TESTS) - - def testDefaultBehaviorWithShards(self): - """Tests the behavior without the filter, with sharding enabled.""" - - self.RunAndVerifyWithSharding(None, 1, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, 2, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) - 1, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS), ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) + 1, ACTIVE_TESTS) - - def testEmptyFilter(self): - """Tests an empty filter.""" - - self.RunAndVerify('', []) - self.RunAndVerifyWithSharding('', 1, []) - self.RunAndVerifyWithSharding('', 2, []) - - def testBadFilter(self): - """Tests a filter that matches nothing.""" - - self.RunAndVerify('BadFilter', []) - self.RunAndVerifyAllowingDisabled('BadFilter', []) - - def testFullName(self): - """Tests filtering by full name.""" - - self.RunAndVerify('FooTest.Xyz', ['FooTest.Xyz']) - self.RunAndVerifyAllowingDisabled('FooTest.Xyz', ['FooTest.Xyz']) - self.RunAndVerifyWithSharding('FooTest.Xyz', 5, ['FooTest.Xyz']) - - def testUniversalFilters(self): - """Tests filters that match everything.""" - - self.RunAndVerify('*', ACTIVE_TESTS) - self.RunAndVerify('*.*', ACTIVE_TESTS) - self.RunAndVerifyWithSharding('*.*', len(ACTIVE_TESTS) - 3, ACTIVE_TESTS) - self.RunAndVerifyAllowingDisabled('*', ACTIVE_TESTS + DISABLED_TESTS) - self.RunAndVerifyAllowingDisabled('*.*', ACTIVE_TESTS + DISABLED_TESTS) - - def testFilterByTestCase(self): - """Tests filtering by test case name.""" - - self.RunAndVerify('FooTest.*', ['FooTest.Abc', 'FooTest.Xyz']) - - BAZ_TESTS = ['BazTest.TestOne', 'BazTest.TestA', 'BazTest.TestB'] - self.RunAndVerify('BazTest.*', BAZ_TESTS) - self.RunAndVerifyAllowingDisabled('BazTest.*', - BAZ_TESTS + ['BazTest.DISABLED_TestC']) - - def testFilterByTest(self): - """Tests filtering by test name.""" - - self.RunAndVerify('*.TestOne', ['BarTest.TestOne', 'BazTest.TestOne']) - - def testFilterDisabledTests(self): - """Select only the disabled tests to run.""" - - self.RunAndVerify('DISABLED_FoobarTest.Test1', []) - self.RunAndVerifyAllowingDisabled('DISABLED_FoobarTest.Test1', - ['DISABLED_FoobarTest.Test1']) - - self.RunAndVerify('*DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('*DISABLED_*', DISABLED_TESTS) - - self.RunAndVerify('*.DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('*.DISABLED_*', [ - 'BarTest.DISABLED_TestFour', - 'BarTest.DISABLED_TestFive', - 'BazTest.DISABLED_TestC', - 'DISABLED_FoobarTest.DISABLED_Test2', - ]) - - self.RunAndVerify('DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('DISABLED_*', [ - 'DISABLED_FoobarTest.Test1', - 'DISABLED_FoobarTest.DISABLED_Test2', - 'DISABLED_FoobarbazTest.TestA', - ]) - - def testWildcardInTestCaseName(self): - """Tests using wildcard in the test case name.""" - - self.RunAndVerify('*a*.*', [ - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', ] + PARAM_TESTS) - - def testWildcardInTestName(self): - """Tests using wildcard in the test name.""" - - self.RunAndVerify('*.*A*', ['FooTest.Abc', 'BazTest.TestA']) - - def testFilterWithoutDot(self): - """Tests a filter that has no '.' in it.""" - - self.RunAndVerify('*z*', [ - 'FooTest.Xyz', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ]) - - def testTwoPatterns(self): - """Tests filters that consist of two patterns.""" - - self.RunAndVerify('Foo*.*:*A*', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BazTest.TestA', - ]) - - # An empty pattern + a non-empty one - self.RunAndVerify(':*A*', ['FooTest.Abc', 'BazTest.TestA']) - - def testThreePatterns(self): - """Tests filters that consist of three patterns.""" - - self.RunAndVerify('*oo*:*A*:*One', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - - 'BazTest.TestOne', - 'BazTest.TestA', - ]) - - # The 2nd pattern is empty. - self.RunAndVerify('*oo*::*One', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - - 'BazTest.TestOne', - ]) - - # The last 2 patterns are empty. - self.RunAndVerify('*oo*::', [ - 'FooTest.Abc', - 'FooTest.Xyz', - ]) - - def testNegativeFilters(self): - self.RunAndVerify('*-HasDeathTest.Test1', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test2', - ] + PARAM_TESTS) - - self.RunAndVerify('*-FooTest.Abc:HasDeathTest.*', [ - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ] + PARAM_TESTS) - - self.RunAndVerify('BarTest.*-BarTest.TestOne', [ - 'BarTest.TestTwo', - 'BarTest.TestThree', - ]) - - # Tests without leading '*'. - self.RunAndVerify('-FooTest.Abc:FooTest.Xyz:HasDeathTest.*', [ - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ] + PARAM_TESTS) - - # Value parameterized tests. - self.RunAndVerify('*/*', PARAM_TESTS) - - # Value parameterized tests filtering by the sequence name. - self.RunAndVerify('SeqP/*', [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - ]) - - # Value parameterized tests filtering by the test name. - self.RunAndVerify('*/0', [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestY/0', - 'SeqQ/ParamTest.TestX/0', - 'SeqQ/ParamTest.TestY/0', - ]) - - def testFlagOverridesEnvVar(self): - """Tests that the filter flag overrides the filtering env. variable.""" - - SetEnvVar(FILTER_ENV_VAR, 'Foo*') - command = '%s --%s=%s' % (COMMAND, FILTER_FLAG, '*One') - tests_run = Run(command)[0] - SetEnvVar(FILTER_ENV_VAR, None) - - self.AssertSetEqual(tests_run, ['BarTest.TestOne', 'BazTest.TestOne']) - - def testShardStatusFileIsCreated(self): - """Tests that the shard file is created if specified in the environment.""" - - shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), - 'shard_status_file') - self.assert_(not os.path.exists(shard_status_file)) - - extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} - stdout_file = InvokeWithModifiedEnv(extra_env, os.popen, COMMAND, 'r') - try: - stdout_file.readlines() - finally: - stdout_file.close() - self.assert_(os.path.exists(shard_status_file)) - os.remove(shard_status_file) - - def testShardStatusFileIsCreatedWithListTests(self): - """Tests that the shard file is created with --gtest_list_tests.""" - - shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), - 'shard_status_file2') - self.assert_(not os.path.exists(shard_status_file)) - - extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} - stdout_file = InvokeWithModifiedEnv(extra_env, os.popen, - '%s --gtest_list_tests' % COMMAND, 'r') - try: - stdout_file.readlines() - finally: - stdout_file.close() - self.assert_(os.path.exists(shard_status_file)) - os.remove(shard_status_file) - - def testShardingWorksWithDeathTests(self): - """Tests integration with death tests and sharding.""" - gtest_filter = 'HasDeathTest.*:SeqP/*' - expected_tests = [ - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', - - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - ] - - for command in (COMMAND + ' --gtest_death_test_style=threadsafe', - COMMAND + ' --gtest_death_test_style=fast'): - self.RunAndVerifyWithSharding(gtest_filter, 3, expected_tests, - check_exit_0=True, command=command) - self.RunAndVerifyWithSharding(gtest_filter, 5, expected_tests, - check_exit_0=True, command=command) - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest_.cc deleted file mode 100644 index 3cbddcf6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_filter_unittest_.cc +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Unit test for Google Test test filters. -// -// A user can specify which test(s) in a Google Test program to run via -// either the GTEST_FILTER environment variable or the --gtest_filter -// flag. This is used for testing such functionality. -// -// The program will be invoked from a Python unit test. Don't run it -// directly. - -#include - -namespace { - -// Test case FooTest. - -class FooTest : public testing::Test { -}; - -TEST_F(FooTest, Abc) { -} - -TEST_F(FooTest, Xyz) { - FAIL() << "Expected failure."; -} - -// Test case BarTest. - -TEST(BarTest, TestOne) { -} - -TEST(BarTest, TestTwo) { -} - -TEST(BarTest, TestThree) { -} - -TEST(BarTest, DISABLED_TestFour) { - FAIL() << "Expected failure."; -} - -TEST(BarTest, DISABLED_TestFive) { - FAIL() << "Expected failure."; -} - -// Test case BazTest. - -TEST(BazTest, TestOne) { - FAIL() << "Expected failure."; -} - -TEST(BazTest, TestA) { -} - -TEST(BazTest, TestB) { -} - -TEST(BazTest, DISABLED_TestC) { - FAIL() << "Expected failure."; -} - -// Test case HasDeathTest - -TEST(HasDeathTest, Test1) { -#if GTEST_HAS_DEATH_TEST - EXPECT_DEATH({exit(1);}, - ".*"); -#endif // GTEST_HAS_DEATH_TEST -} - -// We need at least two death tests to make sure that the all death tests -// aren't on the first shard. -TEST(HasDeathTest, Test2) { -#if GTEST_HAS_DEATH_TEST - EXPECT_DEATH({exit(1);}, - ".*"); -#endif // GTEST_HAS_DEATH_TEST -} - -// Test case FoobarTest - -TEST(DISABLED_FoobarTest, Test1) { - FAIL() << "Expected failure."; -} - -TEST(DISABLED_FoobarTest, DISABLED_Test2) { - FAIL() << "Expected failure."; -} - -// Test case FoobarbazTest - -TEST(DISABLED_FoobarbazTest, TestA) { - FAIL() << "Expected failure."; -} - -#if GTEST_HAS_PARAM_TEST -class ParamTest : public testing::TestWithParam { -}; - -TEST_P(ParamTest, TestX) { -} - -TEST_P(ParamTest, TestY) { -} - -INSTANTIATE_TEST_CASE_P(SeqP, ParamTest, testing::Values(1, 2)); -INSTANTIATE_TEST_CASE_P(SeqQ, ParamTest, testing::Values(5, 6)); -#endif // GTEST_HAS_PARAM_TEST - -} // namespace - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test.py deleted file mode 100755 index 0a2a07b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the --help flag of Google C++ Testing Framework. - -SYNOPSIS - gtest_help_test.py --gtest_build_dir=BUILD/DIR - # where BUILD/DIR contains the built gtest_help_test_ file. - gtest_help_test.py -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import gtest_test_utils - - -IS_WINDOWS = os.name == 'nt' - -PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_help_test_') -FLAG_PREFIX = '--gtest_' -CATCH_EXCEPTIONS_FLAG = FLAG_PREFIX + 'catch_exceptions' -DEATH_TEST_STYLE_FLAG = FLAG_PREFIX + 'death_test_style' - -# The help message must match this regex. -HELP_REGEX = re.compile( - FLAG_PREFIX + r'list_tests.*' + - FLAG_PREFIX + r'filter=.*' + - FLAG_PREFIX + r'also_run_disabled_tests.*' + - FLAG_PREFIX + r'repeat=.*' + - FLAG_PREFIX + r'color=.*' + - FLAG_PREFIX + r'print_time.*' + - FLAG_PREFIX + r'output=.*' + - FLAG_PREFIX + r'break_on_failure.*' + - FLAG_PREFIX + r'throw_on_failure.*', - re.DOTALL) - - -def RunWithFlag(flag): - """Runs gtest_help_test_ with the given flag. - - Returns: - the exit code and the text output as a tuple. - Args: - flag: the command-line flag to pass to gtest_help_test_, or None. - """ - - if flag is None: - command = [PROGRAM_PATH] - else: - command = [PROGRAM_PATH, flag] - child = gtest_test_utils.Subprocess(command) - return child.exit_code, child.output - - -class GTestHelpTest(gtest_test_utils.TestCase): - """Tests the --help flag and its equivalent forms.""" - - def TestHelpFlag(self, flag): - """Verifies that the right message is printed and the tests are - skipped when the given flag is specified.""" - - exit_code, output = RunWithFlag(flag) - self.assertEquals(0, exit_code) - self.assert_(HELP_REGEX.search(output), output) - if IS_WINDOWS: - self.assert_(CATCH_EXCEPTIONS_FLAG in output, output) - self.assert_(DEATH_TEST_STYLE_FLAG not in output, output) - else: - self.assert_(CATCH_EXCEPTIONS_FLAG not in output, output) - self.assert_(DEATH_TEST_STYLE_FLAG in output, output) - - def testPrintsHelpWithFullFlag(self): - self.TestHelpFlag('--help') - - def testPrintsHelpWithShortFlag(self): - self.TestHelpFlag('-h') - - def testPrintsHelpWithQuestionFlag(self): - self.TestHelpFlag('-?') - - def testPrintsHelpWithWindowsStyleQuestionFlag(self): - self.TestHelpFlag('/?') - - def testRunsTestsWithoutHelpFlag(self): - """Verifies that when no help flag is specified, the tests are run - and the help message is not printed.""" - - exit_code, output = RunWithFlag(None) - self.assert_(exit_code != 0) - self.assert_(not HELP_REGEX.search(output), output) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test_.cc deleted file mode 100644 index 0282bc88..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_help_test_.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This program is meant to be run by gtest_help_test.py. Do not run -// it directly. - -#include - -// When a help flag is specified, this program should skip the tests -// and exit with 0; otherwise the following test will be executed, -// causing this program to exit with a non-zero code. -TEST(HelpFlagTest, ShouldNotBeRun) { - ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified."; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest.py deleted file mode 100755 index 7dca0b87..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest.py +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test's --gtest_list_tests flag. - -A user can ask Google Test to list all tests by specifying the ---gtest_list_tests flag. This script tests such functionality -by invoking gtest_list_tests_unittest_ (a program written with -Google Test) the command line flags. -""" - -__author__ = 'phanna@google.com (Patrick Hanna)' - -import os -import gtest_test_utils - - -# Constants. - -# The command line flag for enabling/disabling listing all tests. -LIST_TESTS_FLAG = 'gtest_list_tests' - -# Path to the gtest_list_tests_unittest_ program. -EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_') - -# The expected output when running gtest_list_tests_unittest_ with -# --gtest_list_tests -EXPECTED_OUTPUT_NO_FILTER = """FooDeathTest. - Test1 -Foo. - Bar1 - Bar2 - DISABLED_Bar3 -Abc. - Xyz - Def -FooBar. - Baz -FooTest. - Test1 - DISABLED_Test2 - Test3 -""" - -# The expected output when running gtest_list_tests_unittest_ with -# --gtest_list_tests and --gtest_filter=Foo*. -EXPECTED_OUTPUT_FILTER_FOO = """FooDeathTest. - Test1 -Foo. - Bar1 - Bar2 - DISABLED_Bar3 -FooBar. - Baz -FooTest. - Test1 - DISABLED_Test2 - Test3 -""" - -# Utilities. - - -def Run(command): - """Runs a command and returns the list of tests printed.""" - - stdout_file = os.popen(command, 'r') - - output = stdout_file.read() - - stdout_file.close() - return output - - -# The unit test. - -class GTestListTestsUnitTest(gtest_test_utils.TestCase): - """Tests using the --gtest_list_tests flag to list all tests.""" - - def RunAndVerify(self, flag_value, expected_output, other_flag): - """Runs gtest_list_tests_unittest_ and verifies that it prints - the correct tests. - - Args: - flag_value: value of the --gtest_list_tests flag; - None if the flag should not be present. - - expected_output: the expected output after running command; - - other_flag: a different flag to be passed to command - along with gtest_list_tests; - None if the flag should not be present. - """ - - if flag_value is None: - flag = '' - flag_expression = "not set" - elif flag_value == '0': - flag = ' --%s=0' % LIST_TESTS_FLAG - flag_expression = "0" - else: - flag = ' --%s' % LIST_TESTS_FLAG - flag_expression = "1" - - command = EXE_PATH + flag - - if other_flag is not None: - command += " " + other_flag - - output = Run(command) - - msg = ('when %s is %s, the output of "%s" is "%s".' % - (LIST_TESTS_FLAG, flag_expression, command, output)) - - if expected_output is not None: - self.assert_(output == expected_output, msg) - else: - self.assert_(output != EXPECTED_OUTPUT_NO_FILTER, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(flag_value=None, - expected_output=None, - other_flag=None) - - def testFlag(self): - """Tests using the --gtest_list_tests flag.""" - - self.RunAndVerify(flag_value='0', - expected_output=None, - other_flag=None) - self.RunAndVerify(flag_value='1', - expected_output=EXPECTED_OUTPUT_NO_FILTER, - other_flag=None) - - def testOverrideNonFilterFlags(self): - """Tests that --gtest_list_tests overrides the non-filter flags.""" - - self.RunAndVerify(flag_value="1", - expected_output=EXPECTED_OUTPUT_NO_FILTER, - other_flag="--gtest_break_on_failure") - - def testWithFilterFlags(self): - """Tests that --gtest_list_tests takes into account the - --gtest_filter flag.""" - - self.RunAndVerify(flag_value="1", - expected_output=EXPECTED_OUTPUT_FILTER_FOO, - other_flag="--gtest_filter=Foo*") - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest_.cc deleted file mode 100644 index a0ed0825..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_list_tests_unittest_.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: phanna@google.com (Patrick Hanna) - -// Unit test for Google Test's --gtest_list_tests flag. -// -// A user can ask Google Test to list all tests that will run -// so that when using a filter, a user will know what -// tests to look for. The tests will not be run after listing. -// -// This program will be invoked from a Python unit test. -// Don't run it directly. - -#include - -namespace { - -// Several different test cases and tests that will be listed. -TEST(Foo, Bar1) { -} - -TEST(Foo, Bar2) { -} - -TEST(Foo, DISABLED_Bar3) { -} - -TEST(Abc, Xyz) { -} - -TEST(Abc, Def) { -} - -TEST(FooBar, Baz) { -} - -class FooTest : public testing::Test { -}; - -TEST_F(FooTest, Test1) { -} - -TEST_F(FooTest, DISABLED_Test2) { -} - -TEST_F(FooTest, Test3) { -} - -TEST(FooDeathTest, Test1) { -} - -} // namespace - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_main_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_main_unittest.cc deleted file mode 100644 index 7a3f0adf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_main_unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -// Tests that we don't have to define main() when we link to -// gtest_main instead of gtest. - -namespace { - -TEST(GTestMainTest, ShouldSucceed) { -} - -} // namespace - -// We are using the main() function defined in src/gtest_main.cc, so -// we don't define it here. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc.cc deleted file mode 100644 index 73b5db6d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc.cc +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This file is the input to a negative-compilation test for Google -// Test. Code here is NOT supposed to compile. Its purpose is to -// verify that certain incorrect usages of the Google Test API are -// indeed rejected by the compiler. -// -// We still need to write the negative-compilation test itself, which -// will be tightly coupled with the build environment. -// -// TODO(wan@google.com): finish the negative-compilation test. - -#ifdef TEST_CANNOT_IGNORE_RUN_ALL_TESTS_RESULT -// Tests that the result of RUN_ALL_TESTS() cannot be ignored. - -#include - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - RUN_ALL_TESTS(); // This line shouldn't compile. -} - -#elif defined(TEST_USER_CANNOT_INCLUDE_GTEST_INTERNAL_INL_H) -// Tests that a user cannot include gtest-internal-inl.h in his code. - -#include "src/gtest-internal-inl.h" - -#elif defined(TEST_CATCHES_DECLARING_SETUP_IN_TEST_FIXTURE_WITH_TYPO) -// Tests that the compiler catches the typo when a user declares a -// Setup() method in a test fixture. - -#include - -class MyTest : public testing::Test { - protected: - void Setup() {} -}; - -#elif defined(TEST_CATCHES_CALLING_SETUP_IN_TEST_WITH_TYPO) -// Tests that the compiler catches the typo when a user calls Setup() -// from a test fixture. - -#include - -class MyTest : public testing::Test { - protected: - virtual void SetUp() { - testing::Test::Setup(); // Tries to call SetUp() in the parent class. - } -}; - -#elif defined(TEST_CATCHES_DECLARING_SETUP_IN_ENVIRONMENT_WITH_TYPO) -// Tests that the compiler catches the typo when a user declares a -// Setup() method in a subclass of Environment. - -#include - -class MyEnvironment : public testing::Environment { - public: - void Setup() {} -}; - -#elif defined(TEST_CATCHES_CALLING_SETUP_IN_ENVIRONMENT_WITH_TYPO) -// Tests that the compiler catches the typo when a user calls Setup() -// in an Environment. - -#include - -class MyEnvironment : public testing::Environment { - protected: - virtual void SetUp() { - // Tries to call SetUp() in the parent class. - testing::Environment::Setup(); - } -}; - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_TYPED_TEST_P) -// Tests that the compiler catches using the wrong test case name in -// TYPED_TEST_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(BarTest, A) {} // Wrong test case name. -REGISTER_TYPED_TEST_CASE_P(FooTest, A); -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_REGISTER_TYPED_TEST_CASE_P) -// Tests that the compiler catches using the wrong test case name in -// REGISTER_TYPED_TEST_CASE_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(BarTest, A); // Wrong test case name. -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_INSTANTIATE_TYPED_TEST_CASE_P) -// Tests that the compiler catches using the wrong test case name in -// INSTANTIATE_TYPED_TEST_CASE_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(FooTest, A); - -// Wrong test case name. -INSTANTIATE_TYPED_TEST_CASE_P(My, BarTest, testing::Types); - -#elif defined(TEST_CATCHES_INSTANTIATE_TYPED_TESET_CASE_P_WITH_SAME_NAME_PREFIX) -// Tests that the compiler catches instantiating TYPED_TEST_CASE_P -// twice with the same name prefix. - -#include - -template -class FooTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(FooTest, A); - -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -// Wrong name prefix: "My" has been used. -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE) - -#include - -// Tests that StaticAssertTypeEq cannot be used as a type. -testing::StaticAssertTypeEq dummy; - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE) - -#include - -// Tests that StaticAssertTypeEq works in a namespace scope. -static bool dummy = testing::StaticAssertTypeEq(); - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS) - -#include - -template -class Helper { - public: - // Tests that StaticAssertTypeEq works in a class. - Helper() { testing::StaticAssertTypeEq(); } - - void DoSomething() {} -}; - -void Test() { - Helper h; - h.DoSomething(); // To avoid the "unused variable" warning. -} - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION) - -#include - -void Test() { - // Tests that StaticAssertTypeEq works inside a function. - testing::StaticAssertTypeEq(); -} - -#else -// A sanity test. This should compile. - -#include - -int main() { - return RUN_ALL_TESTS(); -} - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc_test.py deleted file mode 100755 index 06ffb3f8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_nc_test.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Negative compilation test for Google Test.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys -import unittest - - -IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' -if not IS_LINUX: - sys.exit(0) # Negative compilation tests are not supported on Windows & Mac. - - -class GTestNCTest(unittest.TestCase): - """Negative compilation test for Google Test.""" - - def testCompilerError(self): - """Verifies that erroneous code leads to expected compiler - messages.""" - - # Defines a list of test specs, where each element is a tuple - # (test name, list of regexes for matching the compiler errors). - test_specs = [ - ('CANNOT_IGNORE_RUN_ALL_TESTS_RESULT', - [r'ignoring return value']), - - ('USER_CANNOT_INCLUDE_GTEST_INTERNAL_INL_H', - [r'must not be included except by Google Test itself']), - - ('CATCHES_DECLARING_SETUP_IN_TEST_FIXTURE_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_CALLING_SETUP_IN_TEST_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_DECLARING_SETUP_IN_ENVIRONMENT_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_CALLING_SETUP_IN_ENVIRONMENT_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_WRONG_CASE_IN_TYPED_TEST_P', - [r'BarTest.*was not declared']), - - ('CATCHES_WRONG_CASE_IN_REGISTER_TYPED_TEST_CASE_P', - [r'BarTest.*was not declared']), - - ('CATCHES_WRONG_CASE_IN_INSTANTIATE_TYPED_TEST_CASE_P', - [r'BarTest.*not declared']), - - ('CATCHES_INSTANTIATE_TYPED_TESET_CASE_P_WITH_SAME_NAME_PREFIX', - [r'redefinition of.*My.*FooTest']), - - ('STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE', - [r'StaticAssertTypeEq.* does not name a type']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE', - [r'StaticAssertTypeEq.*int.*const int']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS', - [r'StaticAssertTypeEq.*int.*bool']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION', - [r'StaticAssertTypeEq.*const int.*int']), - - ('SANITY', - None) - ] - - # TODO(wan@google.com): verify that the test specs are satisfied. - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_no_test_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_no_test_unittest.cc deleted file mode 100644 index afe2dc0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_no_test_unittest.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Tests that a Google Test program that has no test defined can run -// successfully. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - // An ad-hoc assertion outside of all tests. - // - // This serves two purposes: - // - // 1. It verifies that an ad-hoc assertion can be executed even if - // no test is defined. - // 2. We had a bug where the XML output won't be generated if an - // assertion is executed before RUN_ALL_TESTS() is called, even - // though --gtest_output=xml is specified. This makes sure the - // bug is fixed and doesn't regress. - EXPECT_EQ(1, 1); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test.py deleted file mode 100755 index 91cf9153..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test.py +++ /dev/null @@ -1,332 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the text output of Google C++ Testing Framework. - -SYNOPSIS - gtest_output_test.py --gtest_build_dir=BUILD/DIR --gengolden - # where BUILD/DIR contains the built gtest_output_test_ file. - gtest_output_test.py --gengolden - gtest_output_test.py -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import string -import sys -import gtest_test_utils - - -# The flag for generating the golden file -GENGOLDEN_FLAG = '--gengolden' - -IS_WINDOWS = os.name == 'nt' - -if IS_WINDOWS: - GOLDEN_NAME = 'gtest_output_test_golden_win.txt' -else: - GOLDEN_NAME = 'gtest_output_test_golden_lin.txt' - -PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_') - -# At least one command we exercise must not have the -# --gtest_internal_skip_environment_and_ad_hoc_tests flag. -COMMAND_LIST_TESTS = ({}, PROGRAM_PATH + ' --gtest_list_tests') -COMMAND_WITH_COLOR = ({}, PROGRAM_PATH + ' --gtest_color=yes') -COMMAND_WITH_TIME = ({}, PROGRAM_PATH + ' --gtest_print_time ' - '--gtest_internal_skip_environment_and_ad_hoc_tests ' - '--gtest_filter="FatalFailureTest.*:LoggingTest.*"') -COMMAND_WITH_DISABLED = ({}, PROGRAM_PATH + ' --gtest_also_run_disabled_tests ' - '--gtest_internal_skip_environment_and_ad_hoc_tests ' - '--gtest_filter="*DISABLED_*"') -COMMAND_WITH_SHARDING = ({'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'}, - PROGRAM_PATH + - ' --gtest_internal_skip_environment_and_ad_hoc_tests ' - ' --gtest_filter="PassingTest.*"') - -GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) - - -def ToUnixLineEnding(s): - """Changes all Windows/Mac line endings in s to UNIX line endings.""" - - return s.replace('\r\n', '\n').replace('\r', '\n') - - -def RemoveLocations(test_output): - """Removes all file location info from a Google Test program's output. - - Args: - test_output: the output of a Google Test program. - - Returns: - output with all file location info (in the form of - 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or - 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by - 'FILE_NAME:#: '. - """ - - return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\: ', r'\1:#: ', test_output) - - -def RemoveStackTraceDetails(output): - """Removes all stack traces from a Google Test program's output.""" - - # *? means "find the shortest string that matches". - return re.sub(r'Stack trace:(.|\n)*?\n\n', - 'Stack trace: (omitted)\n\n', output) - - -def RemoveStackTraces(output): - """Removes all traces of stack traces from a Google Test program's output.""" - - # *? means "find the shortest string that matches". - return re.sub(r'Stack trace:(.|\n)*?\n\n', '', output) - - -def RemoveTime(output): - """Removes all time information from a Google Test program's output.""" - - return re.sub(r'\(\d+ ms', '(? ms', output) - - -def RemoveTestCounts(output): - """Removes test counts from a Google Test program's output.""" - - output = re.sub(r'\d+ tests, listed below', - '? tests, listed below', output) - output = re.sub(r'\d+ FAILED TESTS', - '? FAILED TESTS', output) - output = re.sub(r'\d+ tests from \d+ test cases', - '? tests from ? test cases', output) - output = re.sub(r'\d+ tests from ([a-zA-Z_])', - r'? tests from \1', output) - return re.sub(r'\d+ tests\.', '? tests.', output) - - -def RemoveMatchingTests(test_output, pattern): - """Removes output of specified tests from a Google Test program's output. - - This function strips not only the beginning and the end of a test but also - all output in between. - - Args: - test_output: A string containing the test output. - pattern: A regex string that matches names of test cases or - tests to remove. - - Returns: - Contents of test_output with tests whose names match pattern removed. - """ - - test_output = re.sub( - r'.*\[ RUN \] .*%s(.|\n)*?\[( FAILED | OK )\] .*%s.*\n' % ( - pattern, pattern), - '', - test_output) - return re.sub(r'.*%s.*\n' % pattern, '', test_output) - - -def NormalizeOutput(output): - """Normalizes output (the output of gtest_output_test_.exe).""" - - output = ToUnixLineEnding(output) - output = RemoveLocations(output) - output = RemoveStackTraceDetails(output) - output = RemoveTime(output) - return output - - -def IterShellCommandOutput(env_cmd, stdin_string=None): - """Runs a command in a sub-process, and iterates the lines in its STDOUT. - - Args: - - env_cmd: The shell command. A 2-tuple where element 0 is a dict - of extra environment variables to set, and element 1 - is a string with the command and any flags. - stdin_string: The string to be fed to the STDIN of the sub-process; - If None, the sub-process will inherit the STDIN - from the parent process. - """ - - # Spawns cmd in a sub-process, and gets its standard I/O file objects. - # Set and save the environment properly. - old_env_vars = dict(os.environ) - os.environ.update(env_cmd[0]) - stdin_file, stdout_file = os.popen2(env_cmd[1], 'b') - os.environ.clear() - os.environ.update(old_env_vars) - - # If the caller didn't specify a string for STDIN, gets it from the - # parent process. - if stdin_string is None: - stdin_string = sys.stdin.read() - - # Feeds the STDIN string to the sub-process. - stdin_file.write(stdin_string) - stdin_file.close() - - while True: - line = stdout_file.readline() - if not line: # EOF - stdout_file.close() - break - - yield line - - -def GetShellCommandOutput(env_cmd, stdin_string=None): - """Runs a command in a sub-process, and returns its STDOUT in a string. - - Args: - - env_cmd: The shell command. A 2-tuple where element 0 is a dict - of extra environment variables to set, and element 1 - is a string with the command and any flags. - stdin_string: The string to be fed to the STDIN of the sub-process; - If None, the sub-process will inherit the STDIN - from the parent process. - """ - - lines = list(IterShellCommandOutput(env_cmd, stdin_string)) - return string.join(lines, '') - - -def GetCommandOutput(env_cmd): - """Runs a command and returns its output with all file location - info stripped off. - - Args: - env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra - environment variables to set, and element 1 is a string with - the command and any flags. - """ - - # Disables exception pop-ups on Windows. - os.environ['GTEST_CATCH_EXCEPTIONS'] = '1' - return NormalizeOutput(GetShellCommandOutput(env_cmd, '')) - - -def GetOutputOfAllCommands(): - """Returns concatenated output from several representative commands.""" - - return (GetCommandOutput(COMMAND_WITH_COLOR) + - GetCommandOutput(COMMAND_WITH_TIME) + - GetCommandOutput(COMMAND_WITH_DISABLED) + - GetCommandOutput(COMMAND_WITH_SHARDING)) - - -test_list = GetShellCommandOutput(COMMAND_LIST_TESTS, '') -SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list -SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list -SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list -SUPPORTS_STACK_TRACES = False - -CAN_GENERATE_GOLDEN_FILE = SUPPORTS_DEATH_TESTS and SUPPORTS_TYPED_TESTS - - -class GTestOutputTest(gtest_test_utils.TestCase): - def RemoveUnsupportedTests(self, test_output): - if not SUPPORTS_DEATH_TESTS: - test_output = RemoveMatchingTests(test_output, 'DeathTest') - if not SUPPORTS_TYPED_TESTS: - test_output = RemoveMatchingTests(test_output, 'TypedTest') - if not SUPPORTS_THREADS: - test_output = RemoveMatchingTests(test_output, - 'ExpectFailureWithThreadsTest') - test_output = RemoveMatchingTests(test_output, - 'ScopedFakeTestPartResultReporterTest') - test_output = RemoveMatchingTests(test_output, - 'WorksConcurrently') - if not SUPPORTS_STACK_TRACES: - test_output = RemoveStackTraces(test_output) - - return test_output - - def testOutput(self): - output = GetOutputOfAllCommands() - - golden_file = open(GOLDEN_PATH, 'rb') - # A mis-configured source control system can cause \r appear in EOL - # sequences when we read the golden file irrespective of an operating - # system used. Therefore, we need to strip those \r's from newlines - # unconditionally. - golden = ToUnixLineEnding(golden_file.read()) - golden_file.close() - - # We want the test to pass regardless of certain features being - # supported or not. - if CAN_GENERATE_GOLDEN_FILE: - self.assert_(golden == output) - else: - normalized_actual = RemoveTestCounts(output) - normalized_golden = RemoveTestCounts(self.RemoveUnsupportedTests(golden)) - - # This code is very handy when debugging test differences so I left it - # here, commented. - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_actual.txt'), 'wb').write( - # normalized_actual) - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_golden.txt'), 'wb').write( - # normalized_golden) - - self.assert_(normalized_golden == normalized_actual) - - -if __name__ == '__main__': - if sys.argv[1:] == [GENGOLDEN_FLAG]: - if CAN_GENERATE_GOLDEN_FILE: - output = GetOutputOfAllCommands() - golden_file = open(GOLDEN_PATH, 'wb') - golden_file.write(output) - golden_file.close() - else: - message = ( - """Unable to write a golden file when compiled in an environment -that does not support all the required features (death tests""") - if IS_WINDOWS: - message += ( - """\nand typed tests). Please check that you are using VC++ 8.0 SP1 -or higher as your compiler.""") - else: - message += """\nand typed tests). Please generate the golden file -using a binary built with those features enabled.""" - - sys.stderr.write(message) - sys.exit(1) - else: - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_.cc deleted file mode 100644 index 693df3f5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_.cc +++ /dev/null @@ -1,1009 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// A unit test for Google Test itself. This verifies that the basic -// constructs of Google Test work. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#include - -#if GTEST_HAS_PTHREAD -#include -#endif // GTEST_HAS_PTHREAD - -using testing::ScopedFakeTestPartResultReporter; -using testing::TestPartResultArray; - -namespace posix = ::testing::internal::posix; -using testing::internal::String; - -// Tests catching fatal failures. - -// A subroutine used by the following test. -void TestEq1(int x) { - ASSERT_EQ(1, x); -} - -// This function calls a test subroutine, catches the fatal failure it -// generates, and then returns early. -void TryTestSubroutine() { - // Calls a subrountine that yields a fatal failure. - TestEq1(2); - - // Catches the fatal failure and aborts the test. - // - // The testing::Test:: prefix is necessary when calling - // HasFatalFailure() outside of a TEST, TEST_F, or test fixture. - if (testing::Test::HasFatalFailure()) return; - - // If we get here, something is wrong. - FAIL() << "This should never be reached."; -} - -TEST(PassingTest, PassingTest1) { -} - -TEST(PassingTest, PassingTest2) { -} - -// Tests catching a fatal failure in a subroutine. -TEST(FatalFailureTest, FatalFailureInSubroutine) { - printf("(expecting a failure that x should be 1)\n"); - - TryTestSubroutine(); -} - -// Tests catching a fatal failure in a nested subroutine. -TEST(FatalFailureTest, FatalFailureInNestedSubroutine) { - printf("(expecting a failure that x should be 1)\n"); - - // Calls a subrountine that yields a fatal failure. - TryTestSubroutine(); - - // Catches the fatal failure and aborts the test. - // - // When calling HasFatalFailure() inside a TEST, TEST_F, or test - // fixture, the testing::Test:: prefix is not needed. - if (HasFatalFailure()) return; - - // If we get here, something is wrong. - FAIL() << "This should never be reached."; -} - -// Tests HasFatalFailure() after a failed EXPECT check. -TEST(FatalFailureTest, NonfatalFailureInSubroutine) { - printf("(expecting a failure on false)\n"); - EXPECT_TRUE(false); // Generates a nonfatal failure - ASSERT_FALSE(HasFatalFailure()); // This should succeed. -} - -// Tests interleaving user logging and Google Test assertions. -TEST(LoggingTest, InterleavingLoggingAndAssertions) { - static const int a[4] = { - 3, 9, 2, 6 - }; - - printf("(expecting 2 failures on (3) >= (a[i]))\n"); - for (int i = 0; i < static_cast(sizeof(a)/sizeof(*a)); i++) { - printf("i == %d\n", i); - EXPECT_GE(3, a[i]); - } -} - -// Tests the SCOPED_TRACE macro. - -// A helper function for testing SCOPED_TRACE. -void SubWithoutTrace(int n) { - EXPECT_EQ(1, n); - ASSERT_EQ(2, n); -} - -// Another helper function for testing SCOPED_TRACE. -void SubWithTrace(int n) { - SCOPED_TRACE(testing::Message() << "n = " << n); - - SubWithoutTrace(n); -} - -// Tests that SCOPED_TRACE() obeys lexical scopes. -TEST(SCOPED_TRACETest, ObeysScopes) { - printf("(expected to fail)\n"); - - // There should be no trace before SCOPED_TRACE() is invoked. - ADD_FAILURE() << "This failure is expected, and shouldn't have a trace."; - - { - SCOPED_TRACE("Expected trace"); - // After SCOPED_TRACE(), a failure in the current scope should contain - // the trace. - ADD_FAILURE() << "This failure is expected, and should have a trace."; - } - - // Once the control leaves the scope of the SCOPED_TRACE(), there - // should be no trace again. - ADD_FAILURE() << "This failure is expected, and shouldn't have a trace."; -} - -// Tests that SCOPED_TRACE works inside a loop. -TEST(SCOPED_TRACETest, WorksInLoop) { - printf("(expected to fail)\n"); - - for (int i = 1; i <= 2; i++) { - SCOPED_TRACE(testing::Message() << "i = " << i); - - SubWithoutTrace(i); - } -} - -// Tests that SCOPED_TRACE works in a subroutine. -TEST(SCOPED_TRACETest, WorksInSubroutine) { - printf("(expected to fail)\n"); - - SubWithTrace(1); - SubWithTrace(2); -} - -// Tests that SCOPED_TRACE can be nested. -TEST(SCOPED_TRACETest, CanBeNested) { - printf("(expected to fail)\n"); - - SCOPED_TRACE(""); // A trace without a message. - - SubWithTrace(2); -} - -// Tests that multiple SCOPED_TRACEs can be used in the same scope. -TEST(SCOPED_TRACETest, CanBeRepeated) { - printf("(expected to fail)\n"); - - SCOPED_TRACE("A"); - ADD_FAILURE() - << "This failure is expected, and should contain trace point A."; - - SCOPED_TRACE("B"); - ADD_FAILURE() - << "This failure is expected, and should contain trace point A and B."; - - { - SCOPED_TRACE("C"); - ADD_FAILURE() << "This failure is expected, and should contain " - << "trace point A, B, and C."; - } - - SCOPED_TRACE("D"); - ADD_FAILURE() << "This failure is expected, and should contain " - << "trace point A, B, and D."; -} - -TEST(DisabledTestsWarningTest, - DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning) { - // This test body is intentionally empty. Its sole purpose is for - // verifying that the --gtest_also_run_disabled_tests flag - // suppresses the "YOU HAVE 12 DISABLED TESTS" warning at the end of - // the test output. -} - -// Tests using assertions outside of TEST and TEST_F. -// -// This function creates two failures intentionally. -void AdHocTest() { - printf("The non-test part of the code is expected to have 2 failures.\n\n"); - EXPECT_TRUE(false); - EXPECT_EQ(2, 3); -} - -// Runs all TESTs, all TEST_Fs, and the ad hoc test. -int RunAllTests() { - AdHocTest(); - return RUN_ALL_TESTS(); -} - -// Tests non-fatal failures in the fixture constructor. -class NonFatalFailureInFixtureConstructorTest : public testing::Test { - protected: - NonFatalFailureInFixtureConstructorTest() { - printf("(expecting 5 failures)\n"); - ADD_FAILURE() << "Expected failure #1, in the test fixture c'tor."; - } - - ~NonFatalFailureInFixtureConstructorTest() { - ADD_FAILURE() << "Expected failure #5, in the test fixture d'tor."; - } - - virtual void SetUp() { - ADD_FAILURE() << "Expected failure #2, in SetUp()."; - } - - virtual void TearDown() { - ADD_FAILURE() << "Expected failure #4, in TearDown."; - } -}; - -TEST_F(NonFatalFailureInFixtureConstructorTest, FailureInConstructor) { - ADD_FAILURE() << "Expected failure #3, in the test body."; -} - -// Tests fatal failures in the fixture constructor. -class FatalFailureInFixtureConstructorTest : public testing::Test { - protected: - FatalFailureInFixtureConstructorTest() { - printf("(expecting 2 failures)\n"); - Init(); - } - - ~FatalFailureInFixtureConstructorTest() { - ADD_FAILURE() << "Expected failure #2, in the test fixture d'tor."; - } - - virtual void SetUp() { - ADD_FAILURE() << "UNEXPECTED failure in SetUp(). " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; - } - - virtual void TearDown() { - ADD_FAILURE() << "UNEXPECTED failure in TearDown(). " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; - } - private: - void Init() { - FAIL() << "Expected failure #1, in the test fixture c'tor."; - } -}; - -TEST_F(FatalFailureInFixtureConstructorTest, FailureInConstructor) { - ADD_FAILURE() << "UNEXPECTED failure in the test body. " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; -} - -// Tests non-fatal failures in SetUp(). -class NonFatalFailureInSetUpTest : public testing::Test { - protected: - virtual ~NonFatalFailureInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 4 failures)\n"); - ADD_FAILURE() << "Expected failure #1, in SetUp()."; - } - - virtual void TearDown() { - FAIL() << "Expected failure #3, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #4, in the test fixture d'tor."; - } -}; - -TEST_F(NonFatalFailureInSetUpTest, FailureInSetUp) { - FAIL() << "Expected failure #2, in the test function."; -} - -// Tests fatal failures in SetUp(). -class FatalFailureInSetUpTest : public testing::Test { - protected: - virtual ~FatalFailureInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 3 failures)\n"); - FAIL() << "Expected failure #1, in SetUp()."; - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -TEST_F(FatalFailureInSetUpTest, FailureInSetUp) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as SetUp() failed."; -} - -#if GTEST_OS_WINDOWS - -// This group of tests verifies that Google Test handles SEH and C++ -// exceptions correctly. - -// A function that throws an SEH exception. -static void ThrowSEH() { - int* p = NULL; - *p = 0; // Raises an access violation. -} - -// Tests exceptions thrown in the test fixture constructor. -class ExceptionInFixtureCtorTest : public testing::Test { - protected: - ExceptionInFixtureCtorTest() { - printf("(expecting a failure on thrown exception " - "in the test fixture's constructor)\n"); - - ThrowSEH(); - } - - virtual ~ExceptionInFixtureCtorTest() { - Deinit(); - } - - virtual void SetUp() { - FAIL() << "UNEXPECTED failure in SetUp(). " - << "We should never get here, as the test fixture c'tor threw."; - } - - virtual void TearDown() { - FAIL() << "UNEXPECTED failure in TearDown(). " - << "We should never get here, as the test fixture c'tor threw."; - } - private: - void Deinit() { - FAIL() << "UNEXPECTED failure in the d'tor. " - << "We should never get here, as the test fixture c'tor threw."; - } -}; - -TEST_F(ExceptionInFixtureCtorTest, ExceptionInFixtureCtor) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as the test fixture c'tor threw."; -} - -// Tests exceptions thrown in SetUp(). -class ExceptionInSetUpTest : public testing::Test { - protected: - virtual ~ExceptionInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 3 failures)\n"); - - ThrowSEH(); - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -TEST_F(ExceptionInSetUpTest, ExceptionInSetUp) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as SetUp() threw."; -} - -// Tests that TearDown() and the test fixture d'tor are always called, -// even when the test function throws an exception. -class ExceptionInTestFunctionTest : public testing::Test { - protected: - virtual ~ExceptionInTestFunctionTest() { - Deinit(); - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -// Tests that the test fixture d'tor is always called, even when the -// test function throws an SEH exception. -TEST_F(ExceptionInTestFunctionTest, SEH) { - printf("(expecting 3 failures)\n"); - - ThrowSEH(); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that the test fixture d'tor is always called, even when the -// test function throws a C++ exception. We do this only when -// GTEST_HAS_EXCEPTIONS is non-zero, i.e. C++ exceptions are enabled. -TEST_F(ExceptionInTestFunctionTest, CppException) { - throw 1; -} - -// Tests exceptions thrown in TearDown(). -class ExceptionInTearDownTest : public testing::Test { - protected: - virtual ~ExceptionInTearDownTest() { - Deinit(); - } - - virtual void TearDown() { - throw 1; - } - private: - void Deinit() { - FAIL() << "Expected failure #2, in the test fixture d'tor."; - } -}; - -TEST_F(ExceptionInTearDownTest, ExceptionInTearDown) { - printf("(expecting 2 failures)\n"); -} - -#endif // GTEST_HAS_EXCEPTIONS - -#endif // GTEST_OS_WINDOWS - -// The MixedUpTestCaseTest test case verifies that Google Test will fail a -// test if it uses a different fixture class than what other tests in -// the same test case use. It deliberately contains two fixture -// classes with the same name but defined in different namespaces. - -// The MixedUpTestCaseWithSameTestNameTest test case verifies that -// when the user defines two tests with the same test case name AND -// same test name (but in different namespaces), the second test will -// fail. - -namespace foo { - -class MixedUpTestCaseTest : public testing::Test { -}; - -TEST_F(MixedUpTestCaseTest, FirstTestFromNamespaceFoo) {} -TEST_F(MixedUpTestCaseTest, SecondTestFromNamespaceFoo) {} - -class MixedUpTestCaseWithSameTestNameTest : public testing::Test { -}; - -TEST_F(MixedUpTestCaseWithSameTestNameTest, - TheSecondTestWithThisNameShouldFail) {} - -} // namespace foo - -namespace bar { - -class MixedUpTestCaseTest : public testing::Test { -}; - -// The following two tests are expected to fail. We rely on the -// golden file to check that Google Test generates the right error message. -TEST_F(MixedUpTestCaseTest, ThisShouldFail) {} -TEST_F(MixedUpTestCaseTest, ThisShouldFailToo) {} - -class MixedUpTestCaseWithSameTestNameTest : public testing::Test { -}; - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST_F(MixedUpTestCaseWithSameTestNameTest, - TheSecondTestWithThisNameShouldFail) {} - -} // namespace bar - -// The following two test cases verify that Google Test catches the user -// error of mixing TEST and TEST_F in the same test case. The first -// test case checks the scenario where TEST_F appears before TEST, and -// the second one checks where TEST appears before TEST_F. - -class TEST_F_before_TEST_in_same_test_case : public testing::Test { -}; - -TEST_F(TEST_F_before_TEST_in_same_test_case, DefinedUsingTEST_F) {} - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST(TEST_F_before_TEST_in_same_test_case, DefinedUsingTESTAndShouldFail) {} - -class TEST_before_TEST_F_in_same_test_case : public testing::Test { -}; - -TEST(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST) {} - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST_F(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST_FAndShouldFail) { -} - -// Used for testing EXPECT_NONFATAL_FAILURE() and EXPECT_FATAL_FAILURE(). -int global_integer = 0; - -// Tests that EXPECT_NONFATAL_FAILURE() can reference global variables. -TEST(ExpectNonfatalFailureTest, CanReferenceGlobalVariables) { - global_integer = 0; - EXPECT_NONFATAL_FAILURE({ - EXPECT_EQ(1, global_integer) << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() can reference local variables -// (static or not). -TEST(ExpectNonfatalFailureTest, CanReferenceLocalVariables) { - int m = 0; - static int n; - n = 1; - EXPECT_NONFATAL_FAILURE({ - EXPECT_EQ(m, n) << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() succeeds when there is exactly -// one non-fatal failure and no fatal failure. -TEST(ExpectNonfatalFailureTest, SucceedsWhenThereIsOneNonfatalFailure) { - EXPECT_NONFATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there is no -// non-fatal failure. -TEST(ExpectNonfatalFailureTest, FailsWhenThereIsNoNonfatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there are two -// non-fatal failures. -TEST(ExpectNonfatalFailureTest, FailsWhenThereAreTwoNonfatalFailures) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure 1."; - ADD_FAILURE() << "Expected non-fatal failure 2."; - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there is one fatal -// failure. -TEST(ExpectNonfatalFailureTest, FailsWhenThereIsOneFatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - FAIL() << "Expected fatal failure."; - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being -// tested returns. -TEST(ExpectNonfatalFailureTest, FailsWhenStatementReturns) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - return; - }, ""); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being -// tested throws. -TEST(ExpectNonfatalFailureTest, FailsWhenStatementThrows) { - printf("(expecting a failure)\n"); - try { - EXPECT_NONFATAL_FAILURE({ - throw 0; - }, ""); - } catch(int) { // NOLINT - } -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_FATAL_FAILURE() can reference global variables. -TEST(ExpectFatalFailureTest, CanReferenceGlobalVariables) { - global_integer = 0; - EXPECT_FATAL_FAILURE({ - ASSERT_EQ(1, global_integer) << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() can reference local static -// variables. -TEST(ExpectFatalFailureTest, CanReferenceLocalStaticVariables) { - static int n; - n = 1; - EXPECT_FATAL_FAILURE({ - ASSERT_EQ(0, n) << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() succeeds when there is exactly -// one fatal failure and no non-fatal failure. -TEST(ExpectFatalFailureTest, SucceedsWhenThereIsOneFatalFailure) { - EXPECT_FATAL_FAILURE({ - FAIL() << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there is no fatal -// failure. -TEST(ExpectFatalFailureTest, FailsWhenThereIsNoFatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - }, ""); -} - -// A helper for generating a fatal failure. -void FatalFailure() { - FAIL() << "Expected fatal failure."; -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there are two -// fatal failures. -TEST(ExpectFatalFailureTest, FailsWhenThereAreTwoFatalFailures) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - FatalFailure(); - FatalFailure(); - }, ""); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there is one non-fatal -// failure. -TEST(ExpectFatalFailureTest, FailsWhenThereIsOneNonfatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure."; - }, ""); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when the statement being -// tested returns. -TEST(ExpectFatalFailureTest, FailsWhenStatementReturns) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - return; - }, ""); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_FATAL_FAILURE() fails when the statement being -// tested throws. -TEST(ExpectFatalFailureTest, FailsWhenStatementThrows) { - printf("(expecting a failure)\n"); - try { - EXPECT_FATAL_FAILURE({ - throw 0; - }, ""); - } catch(int) { // NOLINT - } -} - -#endif // GTEST_HAS_EXCEPTIONS - -// This #ifdef block tests the output of typed tests. -#if GTEST_HAS_TYPED_TEST - -template -class TypedTest : public testing::Test { -}; - -TYPED_TEST_CASE(TypedTest, testing::Types); - -TYPED_TEST(TypedTest, Success) { - EXPECT_EQ(0, TypeParam()); -} - -TYPED_TEST(TypedTest, Failure) { - EXPECT_EQ(1, TypeParam()) << "Expected failure"; -} - -#endif // GTEST_HAS_TYPED_TEST - -// This #ifdef block tests the output of type-parameterized tests. -#if GTEST_HAS_TYPED_TEST_P - -template -class TypedTestP : public testing::Test { -}; - -TYPED_TEST_CASE_P(TypedTestP); - -TYPED_TEST_P(TypedTestP, Success) { - EXPECT_EQ(0, TypeParam()); -} - -TYPED_TEST_P(TypedTestP, Failure) { - EXPECT_EQ(1, TypeParam()) << "Expected failure"; -} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP, Success, Failure); - -typedef testing::Types UnsignedTypes; -INSTANTIATE_TYPED_TEST_CASE_P(Unsigned, TypedTestP, UnsignedTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -#if GTEST_HAS_DEATH_TEST - -// We rely on the golden file to verify that tests whose test case -// name ends with DeathTest are run first. - -TEST(ADeathTest, ShouldRunFirst) { -} - -#if GTEST_HAS_TYPED_TEST - -// We rely on the golden file to verify that typed tests whose test -// case name ends with DeathTest are run first. - -template -class ATypedDeathTest : public testing::Test { -}; - -typedef testing::Types NumericTypes; -TYPED_TEST_CASE(ATypedDeathTest, NumericTypes); - -TYPED_TEST(ATypedDeathTest, ShouldRunFirst) { -} - -#endif // GTEST_HAS_TYPED_TEST - -#if GTEST_HAS_TYPED_TEST_P - - -// We rely on the golden file to verify that type-parameterized tests -// whose test case name ends with DeathTest are run first. - -template -class ATypeParamDeathTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(ATypeParamDeathTest); - -TYPED_TEST_P(ATypeParamDeathTest, ShouldRunFirst) { -} - -REGISTER_TYPED_TEST_CASE_P(ATypeParamDeathTest, ShouldRunFirst); - -INSTANTIATE_TYPED_TEST_CASE_P(My, ATypeParamDeathTest, NumericTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_HAS_DEATH_TEST - -// Tests various failure conditions of -// EXPECT_{,NON}FATAL_FAILURE{,_ON_ALL_THREADS}. -class ExpectFailureTest : public testing::Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - enum FailureMode { - FATAL_FAILURE, - NONFATAL_FAILURE - }; - static void AddFailure(FailureMode failure) { - if (failure == FATAL_FAILURE) { - FAIL() << "Expected fatal failure."; - } else { - ADD_FAILURE() << "Expected non-fatal failure."; - } - } -}; - -TEST_F(ExpectFailureTest, ExpectFatalFailure) { - // Expected fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(SUCCEED(), "Expected fatal failure."); - // Expected fatal failure, but got a non-fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Expected non-fatal " - "failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(AddFailure(FATAL_FAILURE), "Some other fatal failure " - "expected."); -} - -TEST_F(ExpectFailureTest, ExpectNonFatalFailure) { - // Expected non-fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(SUCCEED(), "Expected non-fatal failure."); - // Expected non-fatal failure, but got a fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(AddFailure(FATAL_FAILURE), "Expected fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Some other non-fatal " - "failure."); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -class ExpectFailureWithThreadsTest : public ExpectFailureTest { - protected: - static void AddFailureInOtherThread(FailureMode failure) { - pthread_t tid; - pthread_create(&tid, - NULL, - ExpectFailureWithThreadsTest::FailureThread, - &failure); - pthread_join(tid, NULL); - } - private: - static void* FailureThread(void* attr) { - FailureMode* failure = static_cast(attr); - AddFailure(*failure); - return NULL; - } -}; - -TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailure) { - // We only intercept the current thread. - printf("(expecting 2 failures)\n"); - EXPECT_FATAL_FAILURE(AddFailureInOtherThread(FATAL_FAILURE), - "Expected fatal failure."); -} - -TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailure) { - // We only intercept the current thread. - printf("(expecting 2 failures)\n"); - EXPECT_NONFATAL_FAILURE(AddFailureInOtherThread(NONFATAL_FAILURE), - "Expected non-fatal failure."); -} - -typedef ExpectFailureWithThreadsTest ScopedFakeTestPartResultReporterTest; - -// Tests that the ScopedFakeTestPartResultReporter only catches failures from -// the current thread if it is instantiated with INTERCEPT_ONLY_CURRENT_THREAD. -TEST_F(ScopedFakeTestPartResultReporterTest, InterceptOnlyCurrentThread) { - printf("(expecting 2 failures)\n"); - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD, - &results); - AddFailureInOtherThread(FATAL_FAILURE); - AddFailureInOtherThread(NONFATAL_FAILURE); - } - // The two failures should not have been intercepted. - EXPECT_EQ(0, results.size()) << "This shouldn't fail."; -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -TEST_F(ExpectFailureTest, ExpectFatalFailureOnAllThreads) { - // Expected fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected fatal failure."); - // Expected fatal failure, but got a non-fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE), - "Expected non-fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE), - "Some other fatal failure expected."); -} - -TEST_F(ExpectFailureTest, ExpectNonFatalFailureOnAllThreads) { - // Expected non-fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected non-fatal " - "failure."); - // Expected non-fatal failure, but got a fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE), - "Expected fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE), - "Some other non-fatal failure."); -} - - -// Two test environments for testing testing::AddGlobalTestEnvironment(). - -class FooEnvironment : public testing::Environment { - public: - virtual void SetUp() { - printf("%s", "FooEnvironment::SetUp() called.\n"); - } - - virtual void TearDown() { - printf("%s", "FooEnvironment::TearDown() called.\n"); - FAIL() << "Expected fatal failure."; - } -}; - -class BarEnvironment : public testing::Environment { - public: - virtual void SetUp() { - printf("%s", "BarEnvironment::SetUp() called.\n"); - } - - virtual void TearDown() { - printf("%s", "BarEnvironment::TearDown() called.\n"); - ADD_FAILURE() << "Expected non-fatal failure."; - } -}; - -GTEST_DEFINE_bool_(internal_skip_environment_and_ad_hoc_tests, false, - "This flag causes the program to skip test environment " - "tests and ad hoc tests."); - -// The main function. -// -// The idea is to use Google Test to run all the tests we have defined (some -// of them are intended to fail), and then compare the test results -// with the "golden" file. -int main(int argc, char **argv) { - testing::GTEST_FLAG(print_time) = false; - - // We just run the tests, knowing some of them are intended to fail. - // We will use a separate Python script to compare the output of - // this program with the golden file. - - // It's hard to test InitGoogleTest() directly, as it has many - // global side effects. The following line serves as a sanity test - // for it. - testing::InitGoogleTest(&argc, argv); - if (argc >= 2 && - String(argv[1]) == "--gtest_internal_skip_environment_and_ad_hoc_tests") - GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests) = true; - -#if GTEST_HAS_DEATH_TEST - if (testing::internal::GTEST_FLAG(internal_run_death_test) != "") { - // Skip the usual output capturing if we're running as the child - // process of an threadsafe-style death test. -#if GTEST_OS_WINDOWS - posix::FReopen("nul:", "w", stdout); -#else - posix::FReopen("/dev/null", "w", stdout); -#endif // GTEST_OS_WINDOWS - return RUN_ALL_TESTS(); - } -#endif // GTEST_HAS_DEATH_TEST - - if (GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests)) - return RUN_ALL_TESTS(); - - // Registers two global test environments. - // The golden file verifies that they are set up in the order they - // are registered, and torn down in the reverse order. - testing::AddGlobalTestEnvironment(new FooEnvironment); - testing::AddGlobalTestEnvironment(new BarEnvironment); - - return RunAllTests(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_lin.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_lin.txt deleted file mode 100644 index 46a90fb5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_lin.txt +++ /dev/null @@ -1,632 +0,0 @@ -The non-test part of the code is expected to have 2 failures. - -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -gtest_output_test_.cc:#: Failure -Value of: 3 -Expected: 2 -[==========] Running 56 tests from 23 test cases. -[----------] Global test environment set-up. -FooEnvironment::SetUp() called. -BarEnvironment::SetUp() called. -[----------] 1 test from ADeathTest -[ RUN ] ADeathTest.ShouldRunFirst -[ OK ] ADeathTest.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/0, where TypeParam = int -[ RUN ] ATypedDeathTest/0.ShouldRunFirst -[ OK ] ATypedDeathTest/0.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/1, where TypeParam = double -[ RUN ] ATypedDeathTest/1.ShouldRunFirst -[ OK ] ATypedDeathTest/1.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int -[ RUN ] My/ATypeParamDeathTest/0.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/0.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double -[ RUN ] My/ATypeParamDeathTest/1.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/1.ShouldRunFirst -[----------] 2 tests from PassingTest -[ RUN ] PassingTest.PassingTest1 -[ OK ] PassingTest.PassingTest1 -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[----------] 5 tests from SCOPED_TRACETest -[ RUN ] SCOPED_TRACETest.ObeysScopes -(expected to fail) -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and shouldn't have a trace. -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should have a trace. -Google Test trace: -gtest_output_test_.cc:#: Expected trace -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and shouldn't have a trace. -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ RUN ] SCOPED_TRACETest.WorksInLoop -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: i = 1 -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: i = 2 -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ RUN ] SCOPED_TRACETest.WorksInSubroutine -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: n = 1 -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ RUN ] SCOPED_TRACETest.CanBeNested -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -gtest_output_test_.cc:#: -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ RUN ] SCOPED_TRACETest.CanBeRepeated -(expected to fail) -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A. -Google Test trace: -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A and B. -Google Test trace: -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A, B, and C. -Google Test trace: -gtest_output_test_.cc:#: C -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A, B, and D. -Google Test trace: -gtest_output_test_.cc:#: D -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[----------] 1 test from NonFatalFailureInFixtureConstructorTest -[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 5 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in the test body. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #4, in TearDown. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #5, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from FatalFailureInFixtureConstructorTest -[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 2 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in the test fixture d'tor. -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from NonFatalFailureInSetUpTest -[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp -(expecting 4 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in the test function. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in TearDown(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #4, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from FatalFailureInSetUpTest -[ RUN ] FatalFailureInSetUpTest.FailureInSetUp -(expecting 3 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[----------] 4 tests from MixedUpTestCaseTest -[ RUN ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.ThisShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseWithSameTestNameTest, -you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[----------] 2 tests from TEST_F_before_TEST_in_same_test_case -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_F_before_TEST_in_same_test_case, -test DefinedUsingTEST_F is defined using TEST_F but -test DefinedUsingTESTAndShouldFail is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[----------] 2 tests from TEST_before_TEST_F_in_same_test_case -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_before_TEST_F_in_same_test_case, -test DefinedUsingTEST_FAndShouldFail is defined using TEST_F but -test DefinedUsingTEST is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[----------] 8 tests from ExpectNonfatalFailureTest -[ RUN ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ RUN ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 1. - -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 2. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[----------] 8 tests from ExpectFatalFailureTest -[ RUN ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ RUN ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[----------] 2 tests from TypedTest/0, where TypeParam = int -[ RUN ] TypedTest/0.Success -[ OK ] TypedTest/0.Success -[ RUN ] TypedTest/0.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] TypedTest/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char -[ RUN ] Unsigned/TypedTestP/0.Success -[ OK ] Unsigned/TypedTestP/0.Success -[ RUN ] Unsigned/TypedTestP/0.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: \0 -Expected: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int -[ RUN ] Unsigned/TypedTestP/1.Success -[ OK ] Unsigned/TypedTestP/1.Success -[ RUN ] Unsigned/TypedTestP/1.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/1.Failure -[----------] 4 tests from ExpectFailureTest -[ RUN ] ExpectFailureTest.ExpectFatalFailure -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ RUN ] ExpectFailureTest.ExpectNonFatalFailure -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ RUN ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ RUN ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -[----------] Global test environment tear-down -BarEnvironment::TearDown() called. -gtest_output_test_.cc:#: Failure -Failed -Expected non-fatal failure. -FooEnvironment::TearDown() called. -gtest_output_test_.cc:#: Failure -Failed -Expected fatal failure. -[==========] 56 tests from 23 test cases ran. -[ PASSED ] 21 tests. -[ FAILED ] 35 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[ FAILED ] TypedTest/0.Failure, where TypeParam = int -[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char -[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads - -35 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = FatalFailureTest.*:LoggingTest.* -[==========] Running 4 tests from 2 test cases. -[----------] Global test environment set-up. -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms) -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms) -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine (? ms) -[----------] 3 tests from FatalFailureTest (? ms total) - -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions (? ms) -[----------] 1 test from LoggingTest (? ms total) - -[----------] Global test environment tear-down -[==========] 4 tests from 2 test cases ran. (? ms total) -[ PASSED ] 0 tests. -[ FAILED ] 4 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions - - 4 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = *DISABLED_* -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from DisabledTestsWarningTest -[ RUN ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[ OK ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. -Note: Google Test filter = PassingTest.* -Note: This is test shard 1 of 2. -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from PassingTest -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. - - YOU HAVE 1 DISABLED TEST - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_win.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_win.txt deleted file mode 100644 index d8bb622b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_output_test_golden_win.txt +++ /dev/null @@ -1,575 +0,0 @@ -The non-test part of the code is expected to have 2 failures. - -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -gtest_output_test_.cc:#: error: Value of: 3 -Expected: 2 -[==========] Running 57 tests from 26 test cases. -[----------] Global test environment set-up. -FooEnvironment::SetUp() called. -BarEnvironment::SetUp() called. -[----------] 1 test from ADeathTest -[ RUN ] ADeathTest.ShouldRunFirst -[ OK ] ADeathTest.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/0, where TypeParam = int -[ RUN ] ATypedDeathTest/0.ShouldRunFirst -[ OK ] ATypedDeathTest/0.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/1, where TypeParam = double -[ RUN ] ATypedDeathTest/1.ShouldRunFirst -[ OK ] ATypedDeathTest/1.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int -[ RUN ] My/ATypeParamDeathTest/0.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/0.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double -[ RUN ] My/ATypeParamDeathTest/1.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/1.ShouldRunFirst -[----------] 2 tests from PassingTest -[ RUN ] PassingTest.PassingTest1 -[ OK ] PassingTest.PassingTest1 -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[----------] 5 tests from SCOPED_TRACETest -[ RUN ] SCOPED_TRACETest.ObeysScopes -(expected to fail) -gtest_output_test_.cc:#: error: Failed -This failure is expected, and shouldn't have a trace. -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should have a trace. -Google Test trace: -gtest_output_test_.cc:#: Expected trace -gtest_output_test_.cc:#: error: Failed -This failure is expected, and shouldn't have a trace. -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ RUN ] SCOPED_TRACETest.WorksInLoop -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: i = 1 -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: i = 2 -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ RUN ] SCOPED_TRACETest.WorksInSubroutine -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: n = 1 -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ RUN ] SCOPED_TRACETest.CanBeNested -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -gtest_output_test_.cc:#: -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ RUN ] SCOPED_TRACETest.CanBeRepeated -(expected to fail) -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A. -Google Test trace: -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A and B. -Google Test trace: -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A, B, and C. -Google Test trace: -gtest_output_test_.cc:#: C -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A, B, and D. -Google Test trace: -gtest_output_test_.cc:#: D -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[----------] 1 test from NonFatalFailureInFixtureConstructorTest -[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 5 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test body. -gtest_output_test_.cc:#: error: Failed -Expected failure #4, in TearDown. -gtest_output_test_.cc:#: error: Failed -Expected failure #5, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from FatalFailureInFixtureConstructorTest -[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 2 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in the test fixture d'tor. -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from NonFatalFailureInSetUpTest -[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp -(expecting 4 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in the test function. -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #4, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from FatalFailureInSetUpTest -[ RUN ] FatalFailureInSetUpTest.FailureInSetUp -(expecting 3 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from ExceptionInFixtureCtorTest -[ RUN ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor -(expecting a failure on thrown exception in the test fixture's constructor) -unknown file: error: Exception thrown with code 0xc0000005 in the test fixture's constructor. -[----------] 1 test from ExceptionInSetUpTest -[ RUN ] ExceptionInSetUpTest.ExceptionInSetUp -(expecting 3 failures) -unknown file: error: Exception thrown with code 0xc0000005 in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp -[----------] 1 test from ExceptionInTestFunctionTest -[ RUN ] ExceptionInTestFunctionTest.SEH -(expecting 3 failures) -unknown file: error: Exception thrown with code 0xc0000005 in the test body. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] ExceptionInTestFunctionTest.SEH -[----------] 4 tests from MixedUpTestCaseTest -[ RUN ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.ThisShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseWithSameTestNameTest, -you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[----------] 2 tests from TEST_F_before_TEST_in_same_test_case -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_F_before_TEST_in_same_test_case, -test DefinedUsingTEST_F is defined using TEST_F but -test DefinedUsingTESTAndShouldFail is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[----------] 2 tests from TEST_before_TEST_F_in_same_test_case -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_before_TEST_F_in_same_test_case, -test DefinedUsingTEST_FAndShouldFail is defined using TEST_F but -test DefinedUsingTEST is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[----------] 7 tests from ExpectNonfatalFailureTest -[ RUN ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ RUN ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 1. - -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 2. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[----------] 7 tests from ExpectFatalFailureTest -[ RUN ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ RUN ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[----------] 2 tests from TypedTest/0, where TypeParam = int -[ RUN ] TypedTest/0.Success -[ OK ] TypedTest/0.Success -[ RUN ] TypedTest/0.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] TypedTest/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char -[ RUN ] Unsigned/TypedTestP/0.Success -[ OK ] Unsigned/TypedTestP/0.Success -[ RUN ] Unsigned/TypedTestP/0.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: \0 -Expected: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int -[ RUN ] Unsigned/TypedTestP/1.Success -[ OK ] Unsigned/TypedTestP/1.Success -[ RUN ] Unsigned/TypedTestP/1.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/1.Failure -[----------] 4 tests from ExpectFailureTest -[ RUN ] ExpectFailureTest.ExpectFatalFailure -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ RUN ] ExpectFailureTest.ExpectNonFatalFailure -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ RUN ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ RUN ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -[----------] Global test environment tear-down -BarEnvironment::TearDown() called. -gtest_output_test_.cc:#: error: Failed -Expected non-fatal failure. -FooEnvironment::TearDown() called. -gtest_output_test_.cc:#: error: Failed -Expected fatal failure. -[==========] 57 tests from 26 test cases ran. -[ PASSED ] 21 tests. -[ FAILED ] 36 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor -[ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp -[ FAILED ] ExceptionInTestFunctionTest.SEH -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ FAILED ] TypedTest/0.Failure, where TypeParam = int -[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char -[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads - -36 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = FatalFailureTest.*:LoggingTest.* -[==========] Running 4 tests from 2 test cases. -[----------] Global test environment set-up. -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms) -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms) -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine (? ms) -[----------] 3 tests from FatalFailureTest (? ms total) - -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions (? ms) -[----------] 1 test from LoggingTest (? ms total) - -[----------] Global test environment tear-down -[==========] 4 tests from 2 test cases ran. (? ms total) -[ PASSED ] 0 tests. -[ FAILED ] 4 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions - - 4 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = *DISABLED_* -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from DisabledTestsWarningTest -[ RUN ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[ OK ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. -Note: Google Test filter = PassingTest.* -Note: This is test shard 1 of 2. -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from PassingTest -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. - - YOU HAVE 1 DISABLED TEST - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_pred_impl_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_pred_impl_unittest.cc deleted file mode 100644 index e7ee54b5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_pred_impl_unittest.cc +++ /dev/null @@ -1,2432 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on 10/02/2008 by command -// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! - -// Regression test for gtest_pred_impl.h -// -// This file is generated by a script and quite long. If you intend to -// learn how Google Test works by reading its unit tests, read -// gtest_unittest.cc instead. -// -// This is intended as a regression test for the Google Test predicate -// assertions. We compile it as part of the gtest_unittest target -// only to keep the implementation tidy and compact, as it is quite -// involved to set up the stage for testing Google Test using Google -// Test itself. -// -// Currently, gtest_unittest takes ~11 seconds to run in the testing -// daemon. In the future, if it grows too large and needs much more -// time to finish, we should consider separating this file into a -// stand-alone regression test. - -#include - -#include -#include - -// A user-defined data type. -struct Bool { - explicit Bool(int val) : value(val != 0) {} - - bool operator>(int n) const { return value > Bool(n).value; } - - Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); } - - bool operator==(const Bool& rhs) const { return value == rhs.value; } - - bool value; -}; - -// Enables Bool to be used in assertions. -std::ostream& operator<<(std::ostream& os, const Bool& x) { - return os << (x.value ? "true" : "false"); -} - -// Sample functions/functors for testing unary predicate assertions. - -// A unary predicate function. -template -bool PredFunction1(T1 v1) { - return v1 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction1Int(int v1) { - return v1 > 0; -} -bool PredFunction1Bool(Bool v1) { - return v1 > 0; -} - -// A unary predicate functor. -struct PredFunctor1 { - template - bool operator()(const T1& v1) { - return v1 > 0; - } -}; - -// A unary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction1(const char* e1, - const T1& v1) { - if (PredFunction1(v1)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 - << " is expected to be positive, but evaluates to " - << v1 << "."; - return testing::AssertionFailure(msg); -} - -// A unary predicate-formatter functor. -struct PredFormatFunctor1 { - template - testing::AssertionResult operator()(const char* e1, - const T1& v1) const { - return PredFormatFunction1(e1, v1); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT1. - -class Predicate1Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; -}; - -bool Predicate1Test::expected_to_finish_; -bool Predicate1Test::finished_; -int Predicate1Test::n1_; - -typedef Predicate1Test EXPECT_PRED_FORMAT1Test; -typedef Predicate1Test ASSERT_PRED_FORMAT1Test; -typedef Predicate1Test EXPECT_PRED1Test; -typedef Predicate1Test ASSERT_PRED1Test; - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED1(PredFunction1Int, - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED1(PredFunction1Bool, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED1(PredFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED1(PredFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunction1Int, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunction1Bool, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED1(PredFunction1Int, - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED1(PredFunction1Bool, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED1(PredFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED1(PredFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunction1Int, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunction1Bool, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunction1, - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunction1, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunction1, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunction1, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunction1, - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunction1, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunction1, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunction1, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing binary predicate assertions. - -// A binary predicate function. -template -bool PredFunction2(T1 v1, T2 v2) { - return v1 + v2 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction2Int(int v1, int v2) { - return v1 + v2 > 0; -} -bool PredFunction2Bool(Bool v1, Bool v2) { - return v1 + v2 > 0; -} - -// A binary predicate functor. -struct PredFunctor2 { - template - bool operator()(const T1& v1, - const T2& v2) { - return v1 + v2 > 0; - } -}; - -// A binary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction2(const char* e1, - const char* e2, - const T1& v1, - const T2& v2) { - if (PredFunction2(v1, v2)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 - << " is expected to be positive, but evaluates to " - << v1 + v2 << "."; - return testing::AssertionFailure(msg); -} - -// A binary predicate-formatter functor. -struct PredFormatFunctor2 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const T1& v1, - const T2& v2) const { - return PredFormatFunction2(e1, e2, v1, v2); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT2. - -class Predicate2Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; -}; - -bool Predicate2Test::expected_to_finish_; -bool Predicate2Test::finished_; -int Predicate2Test::n1_; -int Predicate2Test::n2_; - -typedef Predicate2Test EXPECT_PRED_FORMAT2Test; -typedef Predicate2Test ASSERT_PRED_FORMAT2Test; -typedef Predicate2Test EXPECT_PRED2Test; -typedef Predicate2Test ASSERT_PRED2Test; - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED2(PredFunction2Int, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED2(PredFunction2Bool, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED2(PredFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED2(PredFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunction2Int, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunction2Bool, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED2(PredFunction2Int, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED2(PredFunction2Bool, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED2(PredFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED2(PredFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunction2Int, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunction2Bool, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunction2, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunction2, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunction2, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunction2, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunction2, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunction2, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunction2, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunction2, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing ternary predicate assertions. - -// A ternary predicate function. -template -bool PredFunction3(T1 v1, T2 v2, T3 v3) { - return v1 + v2 + v3 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction3Int(int v1, int v2, int v3) { - return v1 + v2 + v3 > 0; -} -bool PredFunction3Bool(Bool v1, Bool v2, Bool v3) { - return v1 + v2 + v3 > 0; -} - -// A ternary predicate functor. -struct PredFunctor3 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3) { - return v1 + v2 + v3 > 0; - } -}; - -// A ternary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction3(const char* e1, - const char* e2, - const char* e3, - const T1& v1, - const T2& v2, - const T3& v3) { - if (PredFunction3(v1, v2, v3)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 << "."; - return testing::AssertionFailure(msg); -} - -// A ternary predicate-formatter functor. -struct PredFormatFunctor3 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const T1& v1, - const T2& v2, - const T3& v3) const { - return PredFormatFunction3(e1, e2, e3, v1, v2, v3); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT3. - -class Predicate3Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; -}; - -bool Predicate3Test::expected_to_finish_; -bool Predicate3Test::finished_; -int Predicate3Test::n1_; -int Predicate3Test::n2_; -int Predicate3Test::n3_; - -typedef Predicate3Test EXPECT_PRED_FORMAT3Test; -typedef Predicate3Test ASSERT_PRED_FORMAT3Test; -typedef Predicate3Test EXPECT_PRED3Test; -typedef Predicate3Test ASSERT_PRED3Test; - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED3(PredFunction3Int, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED3(PredFunction3Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED3(PredFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED3(PredFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunction3Int, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunction3Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED3(PredFunction3Int, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED3(PredFunction3Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED3(PredFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED3(PredFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunction3Int, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunction3Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunction3, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunction3, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunction3, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunction3, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunction3, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunction3, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunction3, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunction3, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing 4-ary predicate assertions. - -// A 4-ary predicate function. -template -bool PredFunction4(T1 v1, T2 v2, T3 v3, T4 v4) { - return v1 + v2 + v3 + v4 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction4Int(int v1, int v2, int v3, int v4) { - return v1 + v2 + v3 + v4 > 0; -} -bool PredFunction4Bool(Bool v1, Bool v2, Bool v3, Bool v4) { - return v1 + v2 + v3 + v4 > 0; -} - -// A 4-ary predicate functor. -struct PredFunctor4 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - return v1 + v2 + v3 + v4 > 0; - } -}; - -// A 4-ary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction4(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - if (PredFunction4(v1, v2, v3, v4)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 + v4 << "."; - return testing::AssertionFailure(msg); -} - -// A 4-ary predicate-formatter functor. -struct PredFormatFunctor4 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) const { - return PredFormatFunction4(e1, e2, e3, e4, v1, v2, v3, v4); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT4. - -class Predicate4Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = n4_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - EXPECT_EQ(1, n4_) << - "The predicate assertion didn't evaluate argument 5 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; - static int n4_; -}; - -bool Predicate4Test::expected_to_finish_; -bool Predicate4Test::finished_; -int Predicate4Test::n1_; -int Predicate4Test::n2_; -int Predicate4Test::n3_; -int Predicate4Test::n4_; - -typedef Predicate4Test EXPECT_PRED_FORMAT4Test; -typedef Predicate4Test ASSERT_PRED_FORMAT4Test; -typedef Predicate4Test EXPECT_PRED4Test; -typedef Predicate4Test ASSERT_PRED4Test; - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED4(PredFunction4Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED4(PredFunction4Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED4(PredFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED4(PredFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunction4Int, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunction4Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED4(PredFunction4Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED4(PredFunction4Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED4(PredFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED4(PredFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunction4Int, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunction4Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunction4, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunction4, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunction4, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunction4, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunction4, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunction4, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunction4, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunction4, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing 5-ary predicate assertions. - -// A 5-ary predicate function. -template -bool PredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction5Int(int v1, int v2, int v3, int v4, int v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} -bool PredFunction5Bool(Bool v1, Bool v2, Bool v3, Bool v4, Bool v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} - -// A 5-ary predicate functor. -struct PredFunctor5 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - return v1 + v2 + v3 + v4 + v5 > 0; - } -}; - -// A 5-ary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction5(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - if (PredFunction5(v1, v2, v3, v4, v5)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 + v4 + v5 << "."; - return testing::AssertionFailure(msg); -} - -// A 5-ary predicate-formatter functor. -struct PredFormatFunctor5 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) const { - return PredFormatFunction5(e1, e2, e3, e4, e5, v1, v2, v3, v4, v5); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT5. - -class Predicate5Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = n4_ = n5_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - EXPECT_EQ(1, n4_) << - "The predicate assertion didn't evaluate argument 5 " - "exactly once."; - EXPECT_EQ(1, n5_) << - "The predicate assertion didn't evaluate argument 6 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; - static int n4_; - static int n5_; -}; - -bool Predicate5Test::expected_to_finish_; -bool Predicate5Test::finished_; -int Predicate5Test::n1_; -int Predicate5Test::n2_; -int Predicate5Test::n3_; -int Predicate5Test::n4_; -int Predicate5Test::n5_; - -typedef Predicate5Test EXPECT_PRED_FORMAT5Test; -typedef Predicate5Test ASSERT_PRED_FORMAT5Test; -typedef Predicate5Test EXPECT_PRED5Test; -typedef Predicate5Test ASSERT_PRED5Test; - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED5(PredFunction5Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED5(PredFunction5Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED5(PredFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED5(PredFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunction5Int, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunction5Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED5(PredFunction5Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED5(PredFunction5Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED5(PredFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED5(PredFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunction5Int, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunction5Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunction5, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunction5, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunction5, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunction5, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunction5, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunction5, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunction5, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunction5, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_prod_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_prod_test.cc deleted file mode 100644 index bc3201d0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_prod_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Unit test for include/gtest/gtest_prod.h. - -#include -#include "test/production.h" - -// Tests that private members can be accessed from a TEST declared as -// a friend of the class. -TEST(PrivateCodeTest, CanAccessPrivateMembers) { - PrivateCode a; - EXPECT_EQ(0, a.x_); - - a.set_x(1); - EXPECT_EQ(1, a.x_); -} - -typedef testing::Test PrivateCodeFixtureTest; - -// Tests that private members can be accessed from a TEST_F declared -// as a friend of the class. -TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) { - PrivateCode a; - EXPECT_EQ(0, a.x_); - - a.set_x(2); - EXPECT_EQ(2, a.x_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_repeat_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_repeat_test.cc deleted file mode 100644 index 39a0601d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_repeat_test.cc +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests the --gtest_repeat=number flag. - -#include -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -GTEST_DECLARE_string_(death_test_style); -GTEST_DECLARE_string_(filter); -GTEST_DECLARE_int32_(repeat); - -} // namespace testing - -using testing::GTEST_FLAG(death_test_style); -using testing::GTEST_FLAG(filter); -using testing::GTEST_FLAG(repeat); - -namespace { - -// We need this when we are testing Google Test itself and therefore -// cannot use Google Test assertions. -#define GTEST_CHECK_INT_EQ_(expected, actual) \ - do {\ - const int expected_val = (expected);\ - const int actual_val = (actual);\ - if (expected_val != actual_val) {\ - ::std::cout << "Value of: " #actual "\n"\ - << " Actual: " << actual_val << "\n"\ - << "Expected: " #expected "\n"\ - << "Which is: " << expected_val << "\n";\ - abort();\ - }\ - } while(false) - - -// Used for verifying that global environment set-up and tear-down are -// inside the gtest_repeat loop. - -int g_environment_set_up_count = 0; -int g_environment_tear_down_count = 0; - -class MyEnvironment : public testing::Environment { - public: - MyEnvironment() {} - virtual void SetUp() { g_environment_set_up_count++; } - virtual void TearDown() { g_environment_tear_down_count++; } -}; - -// A test that should fail. - -int g_should_fail_count = 0; - -TEST(FooTest, ShouldFail) { - g_should_fail_count++; - EXPECT_EQ(0, 1) << "Expected failure."; -} - -// A test that should pass. - -int g_should_pass_count = 0; - -TEST(FooTest, ShouldPass) { - g_should_pass_count++; -} - -// A test that contains a thread-safe death test and a fast death -// test. It should pass. - -int g_death_test_count = 0; - -TEST(BarDeathTest, ThreadSafeAndFast) { - g_death_test_count++; - -#if GTEST_HAS_DEATH_TEST - GTEST_FLAG(death_test_style) = "threadsafe"; - EXPECT_DEATH(abort(), ""); - - GTEST_FLAG(death_test_style) = "fast"; - EXPECT_DEATH(abort(), ""); -#endif // GTEST_HAS_DEATH_TEST -} - -#if GTEST_HAS_PARAM_TEST -int g_param_test_count = 0; - -const int kNumberOfParamTests = 10; - -class MyParamTest : public testing::TestWithParam {}; - -TEST_P(MyParamTest, ShouldPass) { - // TODO(vladl@google.com): Make parameter value checking robust - // WRT order of tests. - GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); - g_param_test_count++; -} -INSTANTIATE_TEST_CASE_P(MyParamSequence, - MyParamTest, - testing::Range(0, kNumberOfParamTests)); -#endif // GTEST_HAS_PARAM_TEST - -// Resets the count for each test. -void ResetCounts() { - g_environment_set_up_count = 0; - g_environment_tear_down_count = 0; - g_should_fail_count = 0; - g_should_pass_count = 0; - g_death_test_count = 0; -#if GTEST_HAS_PARAM_TEST - g_param_test_count = 0; -#endif // GTEST_HAS_PARAM_TEST -} - -// Checks that the count for each test is expected. -void CheckCounts(int expected) { - GTEST_CHECK_INT_EQ_(expected, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(expected, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(expected, g_should_fail_count); - GTEST_CHECK_INT_EQ_(expected, g_should_pass_count); - GTEST_CHECK_INT_EQ_(expected, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(expected * kNumberOfParamTests, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -// Tests the behavior of Google Test when --gtest_repeat is not specified. -void TestRepeatUnspecified() { - ResetCounts(); - GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS()); - CheckCounts(1); -} - -// Tests the behavior of Google Test when --gtest_repeat has the given value. -void TestRepeat(int repeat) { - GTEST_FLAG(repeat) = repeat; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(repeat > 0 ? 1 : 0, RUN_ALL_TESTS()); - CheckCounts(repeat); -} - -// Tests using --gtest_repeat when --gtest_filter specifies an empty -// set of tests. -void TestRepeatWithEmptyFilter(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "None"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS()); - CheckCounts(0); -} - -// Tests using --gtest_repeat when --gtest_filter specifies a set of -// successful tests. -void TestRepeatWithFilterForSuccessfulTests(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "*-*ShouldFail"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS()); - GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(0, g_should_fail_count); - GTEST_CHECK_INT_EQ_(repeat, g_should_pass_count); - GTEST_CHECK_INT_EQ_(repeat, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(repeat * kNumberOfParamTests, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -// Tests using --gtest_repeat when --gtest_filter specifies a set of -// failed tests. -void TestRepeatWithFilterForFailedTests(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "*ShouldFail"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS()); - GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(repeat, g_should_fail_count); - GTEST_CHECK_INT_EQ_(0, g_should_pass_count); - GTEST_CHECK_INT_EQ_(0, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(0, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -} // namespace - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - testing::AddGlobalTestEnvironment(new MyEnvironment); - - TestRepeatUnspecified(); - TestRepeat(0); - TestRepeat(1); - TestRepeat(5); - - TestRepeatWithEmptyFilter(2); - TestRepeatWithEmptyFilter(3); - - TestRepeatWithFilterForSuccessfulTests(3); - - TestRepeatWithFilterForFailedTests(4); - - // It would be nice to verify that the tests indeed loop forever - // when GTEST_FLAG(repeat) is negative, but this test will be quite - // complicated to write. Since this flag is for interactive - // debugging only and doesn't affect the normal test result, such a - // test would be an overkill. - - printf("PASS\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_sole_header_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_sole_header_test.cc deleted file mode 100644 index de91e800..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_sole_header_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// This test verifies that it's possible to use Google Test by including -// the gtest.h header file alone. - -#include - -namespace { - -void Subroutine() { - EXPECT_EQ(42, 42); -} - -TEST(NoFatalFailureTest, ExpectNoFatalFailure) { - EXPECT_NO_FATAL_FAILURE(;); - EXPECT_NO_FATAL_FAILURE(SUCCEED()); - EXPECT_NO_FATAL_FAILURE(Subroutine()); - EXPECT_NO_FATAL_FAILURE({ SUCCEED(); }); -} - -TEST(NoFatalFailureTest, AssertNoFatalFailure) { - ASSERT_NO_FATAL_FAILURE(;); - ASSERT_NO_FATAL_FAILURE(SUCCEED()); - ASSERT_NO_FATAL_FAILURE(Subroutine()); - ASSERT_NO_FATAL_FAILURE({ SUCCEED(); }); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_stress_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_stress_test.cc deleted file mode 100644 index 55e8bf42..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_stress_test.cc +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests that SCOPED_TRACE() and various Google Test assertions can be -// used in a large number of threads concurrently. - -#include -#include - -// We must define this macro in order to #include -// gtest-internal-inl.h. This is how Google Test prevents a user from -// accidentally depending on its internal implementation. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace { - -using internal::List; -using internal::ListNode; -using internal::String; -using internal::TestProperty; -using internal::TestPropertyKeyIs; - -// How many threads to create? -const int kThreadCount = 50; - -String IdToKey(int id, const char* suffix) { - Message key; - key << "key_" << id << "_" << suffix; - return key.GetString(); -} - -String IdToString(int id) { - Message id_message; - id_message << id; - return id_message.GetString(); -} - -void ExpectKeyAndValueWereRecordedForId(const List& properties, - int id, - const char* suffix) { - TestPropertyKeyIs matches_key(IdToKey(id, suffix).c_str()); - const ListNode* node = properties.FindIf(matches_key); - EXPECT_TRUE(node != NULL) << "expecting " << suffix << " node for id " << id; - EXPECT_STREQ(IdToString(id).c_str(), node->element().value()); -} - -// Calls a large number of Google Test assertions, where exactly one of them -// will fail. -void ManyAsserts(int id) { - ::std::cout << "Thread #" << id << " running...\n"; - - SCOPED_TRACE(Message() << "Thread #" << id); - - for (int i = 0; i < kThreadCount; i++) { - SCOPED_TRACE(Message() << "Iteration #" << i); - - // A bunch of assertions that should succeed. - EXPECT_TRUE(true); - ASSERT_FALSE(false) << "This shouldn't fail."; - EXPECT_STREQ("a", "a"); - ASSERT_LE(5, 6); - EXPECT_EQ(i, i) << "This shouldn't fail."; - - // RecordProperty() should interact safely with other threads as well. - // The shared_key forces property updates. - Test::RecordProperty(IdToKey(id, "string").c_str(), IdToString(id).c_str()); - Test::RecordProperty(IdToKey(id, "int").c_str(), id); - Test::RecordProperty("shared_key", IdToString(id).c_str()); - - // This assertion should fail kThreadCount times per thread. It - // is for testing whether Google Test can handle failed assertions in a - // multi-threaded context. - EXPECT_LT(i, 0) << "This should always fail."; - } -} - -// Tests using SCOPED_TRACE() and Google Test assertions in many threads -// concurrently. -TEST(StressTest, CanUseScopedTraceAndAssertionsInManyThreads) { - // TODO(wan): when Google Test is made thread-safe, run - // ManyAsserts() in many threads here. -} - -TEST(NoFatalFailureTest, ExpectNoFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(NoFatalFailureTest, AssertNoFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(FatalFailureTest, ExpectFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(FatalFailureOnAllThreadsTest, ExpectFatalFailureOnAllThreads) { - // TODO(wan@google.com): Test this works correctly when Google Test - // is made thread-safe. -} - -TEST(NonFatalFailureTest, ExpectNonFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(NonFatalFailureOnAllThreadsTest, ExpectNonFatalFailureOnAllThreads) { - // TODO(wan@google.com): Test this works correctly when Google Test - // is made thread-safe. -} - -} // namespace -} // namespace testing - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_test_utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_test_utils.py deleted file mode 100755 index 45b25cd6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_test_utils.py +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test utilities for Google C++ Testing Framework.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import atexit -import os -import shutil -import sys -import tempfile -import unittest -_test_module = unittest - -# Suppresses the 'Import not at the top of the file' lint complaint. -# pylint: disable-msg=C6204 -try: - import subprocess - _SUBPROCESS_MODULE_AVAILABLE = True -except: - import popen2 - _SUBPROCESS_MODULE_AVAILABLE = False -# pylint: enable-msg=C6204 - - -IS_WINDOWS = os.name == 'nt' - -# Here we expose a class from a particular module, depending on the -# environment. The comment suppresses the 'Invalid variable name' lint -# complaint. -TestCase = _test_module.TestCase # pylint: disable-msg=C6409 - -# Initially maps a flag to its default value. After -# _ParseAndStripGTestFlags() is called, maps a flag to its actual value. -_flag_map = {'gtest_source_dir': os.path.dirname(sys.argv[0]), - 'gtest_build_dir': os.path.dirname(sys.argv[0])} -_gtest_flags_are_parsed = False - - -def _ParseAndStripGTestFlags(argv): - """Parses and strips Google Test flags from argv. This is idempotent.""" - - # Suppresses the lint complaint about a global variable since we need it - # here to maintain module-wide state. - global _gtest_flags_are_parsed # pylint: disable-msg=W0603 - if _gtest_flags_are_parsed: - return - - _gtest_flags_are_parsed = True - for flag in _flag_map: - # The environment variable overrides the default value. - if flag.upper() in os.environ: - _flag_map[flag] = os.environ[flag.upper()] - - # The command line flag overrides the environment variable. - i = 1 # Skips the program name. - while i < len(argv): - prefix = '--' + flag + '=' - if argv[i].startswith(prefix): - _flag_map[flag] = argv[i][len(prefix):] - del argv[i] - break - else: - # We don't increment i in case we just found a --gtest_* flag - # and removed it from argv. - i += 1 - - -def GetFlag(flag): - """Returns the value of the given flag.""" - - # In case GetFlag() is called before Main(), we always call - # _ParseAndStripGTestFlags() here to make sure the --gtest_* flags - # are parsed. - _ParseAndStripGTestFlags(sys.argv) - - return _flag_map[flag] - - -def GetSourceDir(): - """Returns the absolute path of the directory where the .py files are.""" - - return os.path.abspath(GetFlag('gtest_source_dir')) - - -def GetBuildDir(): - """Returns the absolute path of the directory where the test binaries are.""" - - return os.path.abspath(GetFlag('gtest_build_dir')) - - -_temp_dir = None - -def _RemoveTempDir(): - if _temp_dir: - shutil.rmtree(_temp_dir, ignore_errors=True) - -atexit.register(_RemoveTempDir) - - -def GetTempDir(): - """Returns a directory for temporary files.""" - - global _temp_dir - if not _temp_dir: - _temp_dir = tempfile.mkdtemp() - return _temp_dir - - -def GetTestExecutablePath(executable_name): - """Returns the absolute path of the test binary given its name. - - The function will print a message and abort the program if the resulting file - doesn't exist. - - Args: - executable_name: name of the test binary that the test script runs. - - Returns: - The absolute path of the test binary. - """ - - path = os.path.abspath(os.path.join(GetBuildDir(), executable_name)) - if IS_WINDOWS and not path.endswith('.exe'): - path += '.exe' - - if not os.path.exists(path): - message = ( - 'Unable to find the test binary. Please make sure to provide path\n' - 'to the binary via the --gtest_build_dir flag or the GTEST_BUILD_DIR\n' - 'environment variable. For convenient use, invoke this script via\n' - 'mk_test.py.\n' - # TODO(vladl@google.com): change mk_test.py to test.py after renaming - # the file. - 'Please run mk_test.py -h for help.') - print >> sys.stderr, message - sys.exit(1) - - return path - - -def GetExitStatus(exit_code): - """Returns the argument to exit(), or -1 if exit() wasn't called. - - Args: - exit_code: the result value of os.system(command). - """ - - if os.name == 'nt': - # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns - # the argument to exit() directly. - return exit_code - else: - # On Unix, os.WEXITSTATUS() must be used to extract the exit status - # from the result of os.system(). - if os.WIFEXITED(exit_code): - return os.WEXITSTATUS(exit_code) - else: - return -1 - - -class Subprocess: - def __init__(self, command, working_dir=None): - """Changes into a specified directory, if provided, and executes a command. - Restores the old directory afterwards. Execution results are returned - via the following attributes: - terminated_by_sygnal True iff the child process has been terminated - by a signal. - signal Sygnal that terminated the child process. - exited True iff the child process exited normally. - exit_code The code with which the child proces exited. - output Child process's stdout and stderr output - combined in a string. - - Args: - command: A command to run, in the form of sys.argv. - working_dir: A directory to change into. - """ - - # The subprocess module is the preferrable way of running programs - # since it is available and behaves consistently on all platforms, - # including Windows. But it is only available starting in python 2.4. - # In earlier python versions, we revert to the popen2 module, which is - # available in python 2.0 and later but doesn't provide required - # functionality (Popen4) under Windows. This allows us to support Mac - # OS X 10.4 Tiger, which has python 2.3 installed. - if _SUBPROCESS_MODULE_AVAILABLE: - p = subprocess.Popen(command, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - cwd=working_dir, universal_newlines=True) - # communicate returns a tuple with the file obect for the child's - # output. - self.output = p.communicate()[0] - self._return_code = p.returncode - else: - old_dir = os.getcwd() - try: - if working_dir is not None: - os.chdir(working_dir) - p = popen2.Popen4(command) - p.tochild.close() - self.output = p.fromchild.read() - ret_code = p.wait() - finally: - os.chdir(old_dir) - # Converts ret_code to match the semantics of - # subprocess.Popen.returncode. - if os.WIFSIGNALED(ret_code): - self._return_code = -os.WTERMSIG(ret_code) - else: # os.WIFEXITED(ret_code) should return True here. - self._return_code = os.WEXITSTATUS(ret_code) - - if self._return_code < 0: - self.terminated_by_signal = True - self.exited = False - self.signal = -self._return_code - else: - self.terminated_by_signal = False - self.exited = True - self.exit_code = self._return_code - - -def Main(): - """Runs the unit test.""" - - # We must call _ParseAndStripGTestFlags() before calling - # unittest.main(). Otherwise the latter will be confused by the - # --gtest_* flags. - _ParseAndStripGTestFlags(sys.argv) - _test_module.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_ex_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_ex_test.cc deleted file mode 100644 index 8bf9dc90..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_ex_test.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests Google Test's throw-on-failure mode with exceptions enabled. - -#include - -#include -#include -#include -#include - -// Prints the given failure message and exits the program with -// non-zero. We use this instead of a Google Test assertion to -// indicate a failure, as the latter is been tested and cannot be -// relied on. -void Fail(const char* msg) { - printf("FAILURE: %s\n", msg); - fflush(stdout); - exit(1); -} - -// Tests that an assertion failure throws a subclass of -// std::runtime_error. -void TestFailureThrowsRuntimeError() { - testing::GTEST_FLAG(throw_on_failure) = true; - - // A successful assertion shouldn't throw. - try { - EXPECT_EQ(3, 3); - } catch(...) { - Fail("A successful assertion wrongfully threw."); - } - - // A failed assertion should throw a subclass of std::runtime_error. - try { - EXPECT_EQ(2, 3) << "Expected failure"; - } catch(const std::runtime_error& e) { - if (strstr(e.what(), "Expected failure") != NULL) - return; - - printf("%s", - "A failed assertion did throw an exception of the right type, " - "but the message is incorrect. Instead of containing \"Expected " - "failure\", it is:\n"); - Fail(e.what()); - } catch(...) { - Fail("A failed assertion threw the wrong type of exception."); - } - Fail("A failed assertion should've thrown but didn't."); -} - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - // We want to ensure that people can use Google Test assertions in - // other testing frameworks, as long as they initialize Google Test - // properly and set the thrown-on-failure mode. Therefore, we don't - // use Google Test's constructs for defining and running tests - // (e.g. TEST and RUN_ALL_TESTS) here. - - TestFailureThrowsRuntimeError(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test.py deleted file mode 100755 index 5678ffea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests Google Test's throw-on-failure mode with exceptions disabled. - -This script invokes gtest_throw_on_failure_test_ (a program written with -Google Test) with different environments and command line flags. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -# Constants. - -# The command line flag for enabling/disabling the throw-on-failure mode. -THROW_ON_FAILURE = 'gtest_throw_on_failure' - -# Path to the gtest_throw_on_failure_test_ program, compiled with -# exceptions disabled. -EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_throw_on_failure_test_') - - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets an environment variable to a given value; unsets it when the - given value is None. - """ - - env_var = env_var.upper() - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def Run(command): - """Runs a command; returns True/False if its exit code is/isn't 0.""" - - print 'Running "%s". . .' % ' '.join(command) - p = gtest_test_utils.Subprocess(command) - return p.exited and p.exit_code == 0 - - -# The tests. TODO(wan@google.com): refactor the class to share common -# logic with code in gtest_break_on_failure_unittest.py. -class ThrowOnFailureTest(gtest_test_utils.TestCase): - """Tests the throw-on-failure mode.""" - - def RunAndVerify(self, env_var_value, flag_value, should_fail): - """Runs gtest_throw_on_failure_test_ and verifies that it does - (or does not) exit with a non-zero code. - - Args: - env_var_value: value of the GTEST_BREAK_ON_FAILURE environment - variable; None if the variable should be unset. - flag_value: value of the --gtest_break_on_failure flag; - None if the flag should not be present. - should_fail: True iff the program is expected to fail. - """ - - SetEnvVar(THROW_ON_FAILURE, env_var_value) - - if env_var_value is None: - env_var_value_msg = ' is not set' - else: - env_var_value_msg = '=' + env_var_value - - if flag_value is None: - flag = '' - elif flag_value == '0': - flag = '--%s=0' % THROW_ON_FAILURE - else: - flag = '--%s' % THROW_ON_FAILURE - - command = [EXE_PATH] - if flag: - command.append(flag) - - if should_fail: - should_or_not = 'should' - else: - should_or_not = 'should not' - - failed = not Run(command) - - SetEnvVar(THROW_ON_FAILURE, None) - - msg = ('when %s%s, an assertion failure in "%s" %s cause a non-zero ' - 'exit code.' % - (THROW_ON_FAILURE, env_var_value_msg, ' '.join(command), - should_or_not)) - self.assert_(failed == should_fail, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(env_var_value=None, flag_value=None, should_fail=False) - - def testThrowOnFailureEnvVar(self): - """Tests using the GTEST_THROW_ON_FAILURE environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value=None, - should_fail=False) - self.RunAndVerify(env_var_value='1', - flag_value=None, - should_fail=True) - - def testThrowOnFailureFlag(self): - """Tests using the --gtest_throw_on_failure flag.""" - - self.RunAndVerify(env_var_value=None, - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value=None, - flag_value='1', - should_fail=True) - - def testThrowOnFailureFlagOverridesEnvVar(self): - """Tests that --gtest_throw_on_failure overrides GTEST_THROW_ON_FAILURE.""" - - self.RunAndVerify(env_var_value='0', - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value='0', - flag_value='1', - should_fail=True) - self.RunAndVerify(env_var_value='1', - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value='1', - flag_value='1', - should_fail=True) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test_.cc deleted file mode 100644 index 88fbd5a7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_throw_on_failure_test_.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests Google Test's throw-on-failure mode with exceptions disabled. -// -// This program must be compiled with exceptions disabled. It will be -// invoked by gtest_throw_on_failure_test.py, and is expected to exit -// with non-zero in the throw-on-failure mode or 0 otherwise. - -#include - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - // We want to ensure that people can use Google Test assertions in - // other testing frameworks, as long as they initialize Google Test - // properly and set the thrown-on-failure mode. Therefore, we don't - // use Google Test's constructs for defining and running tests - // (e.g. TEST and RUN_ALL_TESTS) here. - - // In the throw-on-failure mode with exceptions disabled, this - // assertion will cause the program to exit with a non-zero code. - EXPECT_EQ(2, 3); - - // When not in the throw-on-failure mode, the control will reach - // here. - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test.py deleted file mode 100755 index 6ae57eee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test warns the user when not initialized properly.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gtest_test_utils - - -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_') - - -def Assert(condition): - if not condition: - raise AssertionError - - -def AssertEq(expected, actual): - if expected != actual: - print 'Expected: %s' % (expected,) - print ' Actual: %s' % (actual,) - raise AssertionError - - -def TestExitCodeAndOutput(command): - """Runs the given command and verifies its exit code and output.""" - - # Verifies that 'command' exits with code 1. - p = gtest_test_utils.Subprocess(command) - Assert(p.exited) - AssertEq(1, p.exit_code) - Assert('InitGoogleTest' in p.output) - - -class GTestUninitializedTest(gtest_test_utils.TestCase): - def testExitCodeAndOutput(self): - TestExitCodeAndOutput(COMMAND) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test_.cc deleted file mode 100644 index e8b2aa81..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_uninitialized_test_.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -TEST(DummyTest, Dummy) { - // This test doesn't verify anything. We just need it to create a - // realistic stage for testing the behavior of Google Test when - // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being - // called first. -} - -int main() { - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_unittest.cc deleted file mode 100644 index 878aa23c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_unittest.cc +++ /dev/null @@ -1,5665 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for Google Test itself. This verifies that the basic constructs of -// Google Test work. - -#include - -// Verifies that the command line flag variables can be accessed -// in code once has been #included. -// Do not move it after other #includes. -TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) { - bool dummy = testing::GTEST_FLAG(also_run_disabled_tests) - || testing::GTEST_FLAG(break_on_failure) - || testing::GTEST_FLAG(catch_exceptions) - || testing::GTEST_FLAG(color) != "unknown" - || testing::GTEST_FLAG(filter) != "unknown" - || testing::GTEST_FLAG(list_tests) - || testing::GTEST_FLAG(output) != "unknown" - || testing::GTEST_FLAG(print_time) - || testing::GTEST_FLAG(repeat) > 0 - || testing::GTEST_FLAG(show_internal_stack_frames) - || testing::GTEST_FLAG(stack_trace_depth) > 0 - || testing::GTEST_FLAG(throw_on_failure); - EXPECT_TRUE(dummy || !dummy); // Suppresses warning that dummy is unused. -} - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#include -#include - -#if GTEST_HAS_PTHREAD -#include -#endif // GTEST_HAS_PTHREAD - -#if GTEST_OS_LINUX -#include -#include -#include -#include -#include -#include -#endif // GTEST_OS_LINUX - -#ifdef __BORLANDC__ -#include -#endif - -namespace testing { -namespace internal { -const char* FormatTimeInMillisAsSeconds(TimeInMillis ms); -bool ParseInt32Flag(const char* str, const char* flag, Int32* value); -} // namespace internal -} // namespace testing - -using testing::internal::FormatTimeInMillisAsSeconds; -using testing::internal::ParseInt32Flag; - -namespace testing { - -GTEST_DECLARE_string_(output); -GTEST_DECLARE_string_(color); - -namespace internal { -bool ShouldUseColor(bool stdout_is_tty); -} // namespace internal -} // namespace testing - -using testing::AssertionFailure; -using testing::AssertionResult; -using testing::AssertionSuccess; -using testing::DoubleLE; -using testing::FloatLE; -using testing::GTEST_FLAG(also_run_disabled_tests); -using testing::GTEST_FLAG(break_on_failure); -using testing::GTEST_FLAG(catch_exceptions); -using testing::GTEST_FLAG(death_test_use_fork); -using testing::GTEST_FLAG(color); -using testing::GTEST_FLAG(filter); -using testing::GTEST_FLAG(list_tests); -using testing::GTEST_FLAG(output); -using testing::GTEST_FLAG(print_time); -using testing::GTEST_FLAG(repeat); -using testing::GTEST_FLAG(show_internal_stack_frames); -using testing::GTEST_FLAG(stack_trace_depth); -using testing::GTEST_FLAG(throw_on_failure); -using testing::IsNotSubstring; -using testing::IsSubstring; -using testing::Message; -using testing::ScopedFakeTestPartResultReporter; -using testing::StaticAssertTypeEq; -using testing::Test; -using testing::TestPartResult; -using testing::TestPartResultArray; -using testing::TPRT_FATAL_FAILURE; -using testing::TPRT_NONFATAL_FAILURE; -using testing::TPRT_SUCCESS; -using testing::UnitTest; -using testing::internal::kTestTypeIdInGoogleTest; -using testing::internal::AppendUserMessage; -using testing::internal::ClearCurrentTestPartResults; -using testing::internal::CodePointToUtf8; -using testing::internal::EqFailure; -using testing::internal::FloatingPoint; -using testing::internal::GetCurrentOsStackTraceExceptTop; -using testing::internal::GetFailedPartCount; -using testing::internal::GetTestTypeId; -using testing::internal::GetTypeId; -using testing::internal::GTestFlagSaver; -using testing::internal::Int32; -using testing::internal::Int32FromEnvOrDie; -using testing::internal::List; -using testing::internal::ShouldRunTestOnShard; -using testing::internal::ShouldShard; -using testing::internal::ShouldUseColor; -using testing::internal::StreamableToString; -using testing::internal::String; -using testing::internal::TestProperty; -using testing::internal::TestResult; -using testing::internal::ThreadLocal; -using testing::internal::UnitTestImpl; -using testing::internal::WideStringToUtf8; - -// This line tests that we can define tests in an unnamed namespace. -namespace { - -// Tests GetTypeId. - -TEST(GetTypeIdTest, ReturnsSameValueForSameType) { - EXPECT_EQ(GetTypeId(), GetTypeId()); - EXPECT_EQ(GetTypeId(), GetTypeId()); -} - -class SubClassOfTest : public Test {}; -class AnotherSubClassOfTest : public Test {}; - -TEST(GetTypeIdTest, ReturnsDifferentValuesForDifferentTypes) { - EXPECT_NE(GetTypeId(), GetTypeId()); - EXPECT_NE(GetTypeId(), GetTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTypeId()); -} - -// Verifies that GetTestTypeId() returns the same value, no matter it -// is called from inside Google Test or outside of it. -TEST(GetTestTypeIdTest, ReturnsTheSameValueInsideOrOutsideOfGoogleTest) { - EXPECT_EQ(kTestTypeIdInGoogleTest, GetTestTypeId()); -} - -// Tests FormatTimeInMillisAsSeconds(). - -TEST(FormatTimeInMillisAsSecondsTest, FormatsZero) { - EXPECT_STREQ("0", FormatTimeInMillisAsSeconds(0)); -} - -TEST(FormatTimeInMillisAsSecondsTest, FormatsPositiveNumber) { - EXPECT_STREQ("0.003", FormatTimeInMillisAsSeconds(3)); - EXPECT_STREQ("0.01", FormatTimeInMillisAsSeconds(10)); - EXPECT_STREQ("0.2", FormatTimeInMillisAsSeconds(200)); - EXPECT_STREQ("1.2", FormatTimeInMillisAsSeconds(1200)); - EXPECT_STREQ("3", FormatTimeInMillisAsSeconds(3000)); -} - -TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) { - EXPECT_STREQ("-0.003", FormatTimeInMillisAsSeconds(-3)); - EXPECT_STREQ("-0.01", FormatTimeInMillisAsSeconds(-10)); - EXPECT_STREQ("-0.2", FormatTimeInMillisAsSeconds(-200)); - EXPECT_STREQ("-1.2", FormatTimeInMillisAsSeconds(-1200)); - EXPECT_STREQ("-3", FormatTimeInMillisAsSeconds(-3000)); -} - -#if !GTEST_OS_SYMBIAN -// NULL testing does not work with Symbian compilers. - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests that GTEST_IS_NULL_LITERAL_(x) is true when x is a null -// pointer literal. -TEST(NullLiteralTest, IsTrueForNullLiterals) { - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(NULL)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0U)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0L)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(false)); -#ifndef __BORLANDC__ - // Some compilers may fail to detect some null pointer literals; - // as long as users of the framework don't use such literals, this - // is harmless. - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(1 - 1)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(true && false)); -#endif -} - -// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null -// pointer literal. -TEST(NullLiteralTest, IsFalseForNonNullLiterals) { - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(1)); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(0.0)); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_('a')); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(static_cast(NULL))); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -#endif // !GTEST_OS_SYMBIAN -// -// Tests CodePointToUtf8(). - -// Tests that the NUL character L'\0' is encoded correctly. -TEST(CodePointToUtf8Test, CanEncodeNul) { - char buffer[32]; - EXPECT_STREQ("", CodePointToUtf8(L'\0', buffer)); -} - -// Tests that ASCII characters are encoded correctly. -TEST(CodePointToUtf8Test, CanEncodeAscii) { - char buffer[32]; - EXPECT_STREQ("a", CodePointToUtf8(L'a', buffer)); - EXPECT_STREQ("Z", CodePointToUtf8(L'Z', buffer)); - EXPECT_STREQ("&", CodePointToUtf8(L'&', buffer)); - EXPECT_STREQ("\x7F", CodePointToUtf8(L'\x7F', buffer)); -} - -// Tests that Unicode code-points that have 8 to 11 bits are encoded -// as 110xxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode8To11Bits) { - char buffer[32]; - // 000 1101 0011 => 110-00011 10-010011 - EXPECT_STREQ("\xC3\x93", CodePointToUtf8(L'\xD3', buffer)); - - // 101 0111 0110 => 110-10101 10-110110 - EXPECT_STREQ("\xD5\xB6", CodePointToUtf8(L'\x576', buffer)); -} - -// Tests that Unicode code-points that have 12 to 16 bits are encoded -// as 1110xxxx 10xxxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode12To16Bits) { - char buffer[32]; - // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011 - EXPECT_STREQ("\xE0\xA3\x93", CodePointToUtf8(L'\x8D3', buffer)); - - // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101 - EXPECT_STREQ("\xEC\x9D\x8D", CodePointToUtf8(L'\xC74D', buffer)); -} - -#if !GTEST_WIDE_STRING_USES_UTF16_ -// Tests in this group require a wchar_t to hold > 16 bits, and thus -// are skipped on Windows, Cygwin, and Symbian, where a wchar_t is -// 16-bit wide. This code may not compile on those systems. - -// Tests that Unicode code-points that have 17 to 21 bits are encoded -// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode17To21Bits) { - char buffer[32]; - // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011 - EXPECT_STREQ("\xF0\x90\xA3\x93", CodePointToUtf8(L'\x108D3', buffer)); - - // 0 0001 0000 0100 0000 0000 => 11110-000 10-010000 10-010000 10-000000 - EXPECT_STREQ("\xF0\x90\x90\x80", CodePointToUtf8(L'\x10400', buffer)); - - // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100 - EXPECT_STREQ("\xF4\x88\x98\xB4", CodePointToUtf8(L'\x108634', buffer)); -} - -// Tests that encoding an invalid code-point generates the expected result. -TEST(CodePointToUtf8Test, CanEncodeInvalidCodePoint) { - char buffer[32]; - EXPECT_STREQ("(Invalid Unicode 0x1234ABCD)", - CodePointToUtf8(L'\x1234ABCD', buffer)); -} - -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests WideStringToUtf8(). - -// Tests that the NUL character L'\0' is encoded correctly. -TEST(WideStringToUtf8Test, CanEncodeNul) { - EXPECT_STREQ("", WideStringToUtf8(L"", 0).c_str()); - EXPECT_STREQ("", WideStringToUtf8(L"", -1).c_str()); -} - -// Tests that ASCII strings are encoded correctly. -TEST(WideStringToUtf8Test, CanEncodeAscii) { - EXPECT_STREQ("a", WideStringToUtf8(L"a", 1).c_str()); - EXPECT_STREQ("ab", WideStringToUtf8(L"ab", 2).c_str()); - EXPECT_STREQ("a", WideStringToUtf8(L"a", -1).c_str()); - EXPECT_STREQ("ab", WideStringToUtf8(L"ab", -1).c_str()); -} - -// Tests that Unicode code-points that have 8 to 11 bits are encoded -// as 110xxxxx 10xxxxxx. -TEST(WideStringToUtf8Test, CanEncode8To11Bits) { - // 000 1101 0011 => 110-00011 10-010011 - EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", 1).c_str()); - EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", -1).c_str()); - - // 101 0111 0110 => 110-10101 10-110110 - EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(L"\x576", 1).c_str()); - EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(L"\x576", -1).c_str()); -} - -// Tests that Unicode code-points that have 12 to 16 bits are encoded -// as 1110xxxx 10xxxxxx 10xxxxxx. -TEST(WideStringToUtf8Test, CanEncode12To16Bits) { - // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011 - EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(L"\x8D3", 1).c_str()); - EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(L"\x8D3", -1).c_str()); - - // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101 - EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(L"\xC74D", 1).c_str()); - EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(L"\xC74D", -1).c_str()); -} - -// Tests that the conversion stops when the function encounters \0 character. -TEST(WideStringToUtf8Test, StopsOnNulCharacter) { - EXPECT_STREQ("ABC", WideStringToUtf8(L"ABC\0XYZ", 100).c_str()); -} - -// Tests that the conversion stops when the function reaches the limit -// specified by the 'length' parameter. -TEST(WideStringToUtf8Test, StopsWhenLengthLimitReached) { - EXPECT_STREQ("ABC", WideStringToUtf8(L"ABCDEF", 3).c_str()); -} - - -#if !GTEST_WIDE_STRING_USES_UTF16_ -// Tests that Unicode code-points that have 17 to 21 bits are encoded -// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx. This code may not compile -// on the systems using UTF-16 encoding. -TEST(WideStringToUtf8Test, CanEncode17To21Bits) { - // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011 - EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", 1).c_str()); - EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", -1).c_str()); - - // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100 - EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", 1).c_str()); - EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", -1).c_str()); -} - -// Tests that encoding an invalid code-point generates the expected result. -TEST(WideStringToUtf8Test, CanEncodeInvalidCodePoint) { - EXPECT_STREQ("(Invalid Unicode 0xABCDFF)", - WideStringToUtf8(L"\xABCDFF", -1).c_str()); -} -#else // !GTEST_WIDE_STRING_USES_UTF16_ -// Tests that surrogate pairs are encoded correctly on the systems using -// UTF-16 encoding in the wide strings. -TEST(WideStringToUtf8Test, CanEncodeValidUtf16SUrrogatePairs) { - EXPECT_STREQ("\xF0\x90\x90\x80", - WideStringToUtf8(L"\xD801\xDC00", -1).c_str()); -} - -// Tests that encoding an invalid UTF-16 surrogate pair -// generates the expected result. -TEST(WideStringToUtf8Test, CanEncodeInvalidUtf16SurrogatePair) { - // Leading surrogate is at the end of the string. - EXPECT_STREQ("\xED\xA0\x80", WideStringToUtf8(L"\xD800", -1).c_str()); - // Leading surrogate is not followed by the trailing surrogate. - EXPECT_STREQ("\xED\xA0\x80$", WideStringToUtf8(L"\xD800$", -1).c_str()); - // Trailing surrogate appearas without a leading surrogate. - EXPECT_STREQ("\xED\xB0\x80PQR", WideStringToUtf8(L"\xDC00PQR", -1).c_str()); -} -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests that codepoint concatenation works correctly. -#if !GTEST_WIDE_STRING_USES_UTF16_ -TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) { - EXPECT_STREQ( - "\xF4\x88\x98\xB4" - "\xEC\x9D\x8D" - "\n" - "\xD5\xB6" - "\xE0\xA3\x93" - "\xF4\x88\x98\xB4", - WideStringToUtf8(L"\x108634\xC74D\n\x576\x8D3\x108634", -1).c_str()); -} -#else -TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) { - EXPECT_STREQ( - "\xEC\x9D\x8D" "\n" "\xD5\xB6" "\xE0\xA3\x93", - WideStringToUtf8(L"\xC74D\n\x576\x8D3", -1).c_str()); -} -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests the List template class. - -// Tests List::PushFront(). -TEST(ListTest, PushFront) { - List a; - ASSERT_EQ(0u, a.size()); - - // Calls PushFront() on an empty list. - a.PushFront(1); - ASSERT_EQ(1u, a.size()); - EXPECT_EQ(1, a.Head()->element()); - ASSERT_EQ(a.Head(), a.Last()); - - // Calls PushFront() on a singleton list. - a.PushFront(2); - ASSERT_EQ(2u, a.size()); - EXPECT_EQ(2, a.Head()->element()); - EXPECT_EQ(1, a.Last()->element()); - - // Calls PushFront() on a list with more than one elements. - a.PushFront(3); - ASSERT_EQ(3u, a.size()); - EXPECT_EQ(3, a.Head()->element()); - EXPECT_EQ(2, a.Head()->next()->element()); - EXPECT_EQ(1, a.Last()->element()); -} - -// Tests List::PopFront(). -TEST(ListTest, PopFront) { - List a; - - // Popping on an empty list should fail. - EXPECT_FALSE(a.PopFront(NULL)); - - // Popping again on an empty list should fail, and the result element - // shouldn't be overwritten. - int element = 1; - EXPECT_FALSE(a.PopFront(&element)); - EXPECT_EQ(1, element); - - a.PushFront(2); - a.PushFront(3); - - // PopFront() should pop the element in the front of the list. - EXPECT_TRUE(a.PopFront(&element)); - EXPECT_EQ(3, element); - - // After popping the last element, the list should be empty. - EXPECT_TRUE(a.PopFront(NULL)); - EXPECT_EQ(0u, a.size()); -} - -// Tests inserting at the beginning using List::InsertAfter(). -TEST(ListTest, InsertAfterAtBeginning) { - List a; - ASSERT_EQ(0u, a.size()); - - // Inserts into an empty list. - a.InsertAfter(NULL, 1); - ASSERT_EQ(1u, a.size()); - EXPECT_EQ(1, a.Head()->element()); - ASSERT_EQ(a.Head(), a.Last()); - - // Inserts at the beginning of a singleton list. - a.InsertAfter(NULL, 2); - ASSERT_EQ(2u, a.size()); - EXPECT_EQ(2, a.Head()->element()); - EXPECT_EQ(1, a.Last()->element()); - - // Inserts at the beginning of a list with more than one elements. - a.InsertAfter(NULL, 3); - ASSERT_EQ(3u, a.size()); - EXPECT_EQ(3, a.Head()->element()); - EXPECT_EQ(2, a.Head()->next()->element()); - EXPECT_EQ(1, a.Last()->element()); -} - -// Tests inserting at a location other than the beginning using -// List::InsertAfter(). -TEST(ListTest, InsertAfterNotAtBeginning) { - // Prepares a singleton list. - List a; - a.PushBack(1); - - // Inserts at the end of a singleton list. - a.InsertAfter(a.Last(), 2); - ASSERT_EQ(2u, a.size()); - EXPECT_EQ(1, a.Head()->element()); - EXPECT_EQ(2, a.Last()->element()); - - // Inserts at the end of a list with more than one elements. - a.InsertAfter(a.Last(), 3); - ASSERT_EQ(3u, a.size()); - EXPECT_EQ(1, a.Head()->element()); - EXPECT_EQ(2, a.Head()->next()->element()); - EXPECT_EQ(3, a.Last()->element()); - - // Inserts in the middle of a list. - a.InsertAfter(a.Head(), 4); - ASSERT_EQ(4u, a.size()); - EXPECT_EQ(1, a.Head()->element()); - EXPECT_EQ(4, a.Head()->next()->element()); - EXPECT_EQ(2, a.Head()->next()->next()->element()); - EXPECT_EQ(3, a.Last()->element()); -} - - -// Tests the String class. - -// Tests String's constructors. -TEST(StringTest, Constructors) { - // Default ctor. - String s1; - // We aren't using EXPECT_EQ(NULL, s1.c_str()) because comparing - // pointers with NULL isn't supported on all platforms. - EXPECT_TRUE(NULL == s1.c_str()); - - // Implicitly constructs from a C-string. - String s2 = "Hi"; - EXPECT_STREQ("Hi", s2.c_str()); - - // Constructs from a C-string and a length. - String s3("hello", 3); - EXPECT_STREQ("hel", s3.c_str()); - - // Copy ctor. - String s4 = s3; - EXPECT_STREQ("hel", s4.c_str()); -} - -#if GTEST_HAS_STD_STRING - -TEST(StringTest, ConvertsFromStdString) { - // An empty std::string. - const std::string src1(""); - const String dest1 = src1; - EXPECT_STREQ("", dest1.c_str()); - - // A normal std::string. - const std::string src2("Hi"); - const String dest2 = src2; - EXPECT_STREQ("Hi", dest2.c_str()); - - // An std::string with an embedded NUL character. - const char src3[] = "Hello\0world."; - const String dest3 = std::string(src3, sizeof(src3)); - EXPECT_STREQ("Hello", dest3.c_str()); -} - -TEST(StringTest, ConvertsToStdString) { - // An empty String. - const String src1(""); - const std::string dest1 = src1; - EXPECT_EQ("", dest1); - - // A normal String. - const String src2("Hi"); - const std::string dest2 = src2; - EXPECT_EQ("Hi", dest2); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - -TEST(StringTest, ConvertsFromGlobalString) { - // An empty ::string. - const ::string src1(""); - const String dest1 = src1; - EXPECT_STREQ("", dest1.c_str()); - - // A normal ::string. - const ::string src2("Hi"); - const String dest2 = src2; - EXPECT_STREQ("Hi", dest2.c_str()); - - // An ::string with an embedded NUL character. - const char src3[] = "Hello\0world."; - const String dest3 = ::string(src3, sizeof(src3)); - EXPECT_STREQ("Hello", dest3.c_str()); -} - -TEST(StringTest, ConvertsToGlobalString) { - // An empty String. - const String src1(""); - const ::string dest1 = src1; - EXPECT_EQ("", dest1); - - // A normal String. - const String src2("Hi"); - const ::string dest2 = src2; - EXPECT_EQ("Hi", dest2); -} - -#endif // GTEST_HAS_GLOBAL_STRING - -// Tests String::ShowCString(). -TEST(StringTest, ShowCString) { - EXPECT_STREQ("(null)", String::ShowCString(NULL)); - EXPECT_STREQ("", String::ShowCString("")); - EXPECT_STREQ("foo", String::ShowCString("foo")); -} - -// Tests String::ShowCStringQuoted(). -TEST(StringTest, ShowCStringQuoted) { - EXPECT_STREQ("(null)", - String::ShowCStringQuoted(NULL).c_str()); - EXPECT_STREQ("\"\"", - String::ShowCStringQuoted("").c_str()); - EXPECT_STREQ("\"foo\"", - String::ShowCStringQuoted("foo").c_str()); -} - -// Tests String::operator==(). -TEST(StringTest, Equals) { - const String null(NULL); - EXPECT_TRUE(null == NULL); // NOLINT - EXPECT_FALSE(null == ""); // NOLINT - EXPECT_FALSE(null == "bar"); // NOLINT - - const String empty(""); - EXPECT_FALSE(empty == NULL); // NOLINT - EXPECT_TRUE(empty == ""); // NOLINT - EXPECT_FALSE(empty == "bar"); // NOLINT - - const String foo("foo"); - EXPECT_FALSE(foo == NULL); // NOLINT - EXPECT_FALSE(foo == ""); // NOLINT - EXPECT_FALSE(foo == "bar"); // NOLINT - EXPECT_TRUE(foo == "foo"); // NOLINT -} - -// Tests String::operator!=(). -TEST(StringTest, NotEquals) { - const String null(NULL); - EXPECT_FALSE(null != NULL); // NOLINT - EXPECT_TRUE(null != ""); // NOLINT - EXPECT_TRUE(null != "bar"); // NOLINT - - const String empty(""); - EXPECT_TRUE(empty != NULL); // NOLINT - EXPECT_FALSE(empty != ""); // NOLINT - EXPECT_TRUE(empty != "bar"); // NOLINT - - const String foo("foo"); - EXPECT_TRUE(foo != NULL); // NOLINT - EXPECT_TRUE(foo != ""); // NOLINT - EXPECT_TRUE(foo != "bar"); // NOLINT - EXPECT_FALSE(foo != "foo"); // NOLINT -} - -// Tests String::EndsWith(). -TEST(StringTest, EndsWith) { - EXPECT_TRUE(String("foobar").EndsWith("bar")); - EXPECT_TRUE(String("foobar").EndsWith("")); - EXPECT_TRUE(String("").EndsWith("")); - - EXPECT_FALSE(String("foobar").EndsWith("foo")); - EXPECT_FALSE(String("").EndsWith("foo")); -} - -// Tests String::EndsWithCaseInsensitive(). -TEST(StringTest, EndsWithCaseInsensitive) { - EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive("BAR")); - EXPECT_TRUE(String("foobaR").EndsWithCaseInsensitive("bar")); - EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive("")); - EXPECT_TRUE(String("").EndsWithCaseInsensitive("")); - - EXPECT_FALSE(String("Foobar").EndsWithCaseInsensitive("foo")); - EXPECT_FALSE(String("foobar").EndsWithCaseInsensitive("Foo")); - EXPECT_FALSE(String("").EndsWithCaseInsensitive("foo")); -} - -// C++Builder's preprocessor is buggy; it fails to expand macros that -// appear in macro parameters after wide char literals. Provide an alias -// for NULL as a workaround. -static const wchar_t* const kNull = NULL; - -// Tests String::CaseInsensitiveWideCStringEquals -TEST(StringTest, CaseInsensitiveWideCStringEquals) { - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(NULL, NULL)); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L"")); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"", kNull)); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L"foobar")); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"foobar", kNull)); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"foobar")); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"FOOBAR")); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"FOOBAR", L"foobar")); -} - -// Tests that NULL can be assigned to a String. -TEST(StringTest, CanBeAssignedNULL) { - const String src(NULL); - String dest; - - dest = src; - EXPECT_STREQ(NULL, dest.c_str()); -} - -// Tests that the empty string "" can be assigned to a String. -TEST(StringTest, CanBeAssignedEmpty) { - const String src(""); - String dest; - - dest = src; - EXPECT_STREQ("", dest.c_str()); -} - -// Tests that a non-empty string can be assigned to a String. -TEST(StringTest, CanBeAssignedNonEmpty) { - const String src("hello"); - String dest; - - dest = src; - EXPECT_STREQ("hello", dest.c_str()); -} - -// Tests that a String can be assigned to itself. -TEST(StringTest, CanBeAssignedSelf) { - String dest("hello"); - - dest = dest; - EXPECT_STREQ("hello", dest.c_str()); -} - -#if GTEST_OS_WINDOWS - -// Tests String::ShowWideCString(). -TEST(StringTest, ShowWideCString) { - EXPECT_STREQ("(null)", - String::ShowWideCString(NULL).c_str()); - EXPECT_STREQ("", String::ShowWideCString(L"").c_str()); - EXPECT_STREQ("foo", String::ShowWideCString(L"foo").c_str()); -} - -// Tests String::ShowWideCStringQuoted(). -TEST(StringTest, ShowWideCStringQuoted) { - EXPECT_STREQ("(null)", - String::ShowWideCStringQuoted(NULL).c_str()); - EXPECT_STREQ("L\"\"", - String::ShowWideCStringQuoted(L"").c_str()); - EXPECT_STREQ("L\"foo\"", - String::ShowWideCStringQuoted(L"foo").c_str()); -} - -#ifdef _WIN32_WCE -TEST(StringTest, AnsiAndUtf16Null) { - EXPECT_EQ(NULL, String::AnsiToUtf16(NULL)); - EXPECT_EQ(NULL, String::Utf16ToAnsi(NULL)); -} - -TEST(StringTest, AnsiAndUtf16ConvertBasic) { - const char* ansi = String::Utf16ToAnsi(L"str"); - EXPECT_STREQ("str", ansi); - delete [] ansi; - const WCHAR* utf16 = String::AnsiToUtf16("str"); - EXPECT_TRUE(wcsncmp(L"str", utf16, 3) == 0); - delete [] utf16; -} - -TEST(StringTest, AnsiAndUtf16ConvertPathChars) { - const char* ansi = String::Utf16ToAnsi(L".:\\ \"*?"); - EXPECT_STREQ(".:\\ \"*?", ansi); - delete [] ansi; - const WCHAR* utf16 = String::AnsiToUtf16(".:\\ \"*?"); - EXPECT_TRUE(wcsncmp(L".:\\ \"*?", utf16, 3) == 0); - delete [] utf16; -} -#endif // _WIN32_WCE - -#endif // GTEST_OS_WINDOWS - -// Tests TestProperty construction. -TEST(TestPropertyTest, StringValue) { - TestProperty property("key", "1"); - EXPECT_STREQ("key", property.key()); - EXPECT_STREQ("1", property.value()); -} - -// Tests TestProperty replacing a value. -TEST(TestPropertyTest, ReplaceStringValue) { - TestProperty property("key", "1"); - EXPECT_STREQ("1", property.value()); - property.SetValue("2"); - EXPECT_STREQ("2", property.value()); -} - -// AddFatalFailure() and AddNonfatalFailure() must be stand-alone -// functions (i.e. their definitions cannot be inlined at the call -// sites), or C++Builder won't compile the code. -static void AddFatalFailure() { - FAIL() << "Expected fatal failure."; -} - -static void AddNonfatalFailure() { - ADD_FAILURE() << "Expected non-fatal failure."; -} - -class ScopedFakeTestPartResultReporterTest : public Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - enum FailureMode { - FATAL_FAILURE, - NONFATAL_FAILURE - }; - static void AddFailure(FailureMode failure) { - if (failure == FATAL_FAILURE) { - AddFatalFailure(); - } else { - AddNonfatalFailure(); - } - } -}; - -// Tests that ScopedFakeTestPartResultReporter intercepts test -// failures. -TEST_F(ScopedFakeTestPartResultReporterTest, InterceptsTestFailures) { - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD, - &results); - AddFailure(NONFATAL_FAILURE); - AddFailure(FATAL_FAILURE); - } - - EXPECT_EQ(2, results.size()); - EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed()); -} - -TEST_F(ScopedFakeTestPartResultReporterTest, DeprecatedConstructor) { - TestPartResultArray results; - { - // Tests, that the deprecated constructor still works. - ScopedFakeTestPartResultReporter reporter(&results); - AddFailure(NONFATAL_FAILURE); - } - EXPECT_EQ(1, results.size()); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -class ScopedFakeTestPartResultReporterWithThreadsTest - : public ScopedFakeTestPartResultReporterTest { - protected: - static void AddFailureInOtherThread(FailureMode failure) { - pthread_t tid; - pthread_create(&tid, - NULL, - ScopedFakeTestPartResultReporterWithThreadsTest:: - FailureThread, - &failure); - pthread_join(tid, NULL); - } - private: - static void* FailureThread(void* attr) { - FailureMode* failure = static_cast(attr); - AddFailure(*failure); - return NULL; - } -}; - -TEST_F(ScopedFakeTestPartResultReporterWithThreadsTest, - InterceptsTestFailuresInAllThreads) { - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, &results); - AddFailure(NONFATAL_FAILURE); - AddFailure(FATAL_FAILURE); - AddFailureInOtherThread(NONFATAL_FAILURE); - AddFailureInOtherThread(FATAL_FAILURE); - } - - EXPECT_EQ(4, results.size()); - EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(2).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(3).fatally_failed()); -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -// Tests EXPECT_FATAL_FAILURE{,ON_ALL_THREADS}. Makes sure that they -// work even if the failure is generated in a called function rather than -// the current context. - -typedef ScopedFakeTestPartResultReporterTest ExpectFatalFailureTest; - -TEST_F(ExpectFatalFailureTest, CatchesFatalFaliure) { - EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure."); -} - -TEST_F(ExpectFatalFailureTest, CatchesFatalFailureOnAllThreads) { - // We have another test below to verify that the macro catches fatal - // failures generated on another thread. - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFatalFailure(), - "Expected fatal failure."); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true" -#pragma option push -w-ccc -#endif - -// Tests that EXPECT_FATAL_FAILURE() can be used in a non-void -// function even when the statement in it contains ASSERT_*. - -int NonVoidFunction() { - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), ""); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), ""); - return 0; -} - -TEST_F(ExpectFatalFailureTest, CanBeUsedInNonVoidFunction) { - NonVoidFunction(); -} - -// Tests that EXPECT_FATAL_FAILURE(statement, ...) doesn't abort the -// current function even though 'statement' generates a fatal failure. - -void DoesNotAbortHelper(bool* aborted) { - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), ""); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), ""); - - *aborted = false; -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -TEST_F(ExpectFatalFailureTest, DoesNotAbort) { - bool aborted = true; - DoesNotAbortHelper(&aborted); - EXPECT_FALSE(aborted); -} - -// Tests that the EXPECT_FATAL_FAILURE{,_ON_ALL_THREADS} accepts a -// statement that contains a macro which expands to code containing an -// unprotected comma. - -static int global_var = 0; -#define GTEST_USE_UNPROTECTED_COMMA_ global_var++, global_var++ - -TEST_F(ExpectFatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) { -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007. - EXPECT_FATAL_FAILURE({ - GTEST_USE_UNPROTECTED_COMMA_; - AddFatalFailure(); - }, ""); -#endif - - EXPECT_FATAL_FAILURE_ON_ALL_THREADS({ - GTEST_USE_UNPROTECTED_COMMA_; - AddFatalFailure(); - }, ""); -} - -// Tests EXPECT_NONFATAL_FAILURE{,ON_ALL_THREADS}. - -typedef ScopedFakeTestPartResultReporterTest ExpectNonfatalFailureTest; - -TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailure) { - EXPECT_NONFATAL_FAILURE(AddNonfatalFailure(), - "Expected non-fatal failure."); -} - -TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailureOnAllThreads) { - // We have another test below to verify that the macro catches - // non-fatal failures generated on another thread. - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddNonfatalFailure(), - "Expected non-fatal failure."); -} - -// Tests that the EXPECT_NONFATAL_FAILURE{,_ON_ALL_THREADS} accepts a -// statement that contains a macro which expands to code containing an -// unprotected comma. -TEST_F(ExpectNonfatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) { - EXPECT_NONFATAL_FAILURE({ - GTEST_USE_UNPROTECTED_COMMA_; - AddNonfatalFailure(); - }, ""); - - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS({ - GTEST_USE_UNPROTECTED_COMMA_; - AddNonfatalFailure(); - }, ""); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -typedef ScopedFakeTestPartResultReporterWithThreadsTest - ExpectFailureWithThreadsTest; - -TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailureOnAllThreads) { - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailureInOtherThread(FATAL_FAILURE), - "Expected fatal failure."); -} - -TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailureOnAllThreads) { - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS( - AddFailureInOtherThread(NONFATAL_FAILURE), "Expected non-fatal failure."); -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -// Tests the TestResult class - -// The test fixture for testing TestResult. -class TestResultTest : public Test { - protected: - typedef List TPRList; - - // We make use of 2 TestPartResult objects, - TestPartResult * pr1, * pr2; - - // ... and 3 TestResult objects. - TestResult * r0, * r1, * r2; - - virtual void SetUp() { - // pr1 is for success. - pr1 = new TestPartResult(TPRT_SUCCESS, "foo/bar.cc", 10, "Success!"); - - // pr2 is for fatal failure. - pr2 = new TestPartResult(TPRT_FATAL_FAILURE, "foo/bar.cc", - -1, // This line number means "unknown" - "Failure!"); - - // Creates the TestResult objects. - r0 = new TestResult(); - r1 = new TestResult(); - r2 = new TestResult(); - - // In order to test TestResult, we need to modify its internal - // state, in particular the TestPartResult list it holds. - // test_part_results() returns a const reference to this list. - // We cast it to a non-const object s.t. it can be modified (yes, - // this is a hack). - TPRList * list1, * list2; - list1 = const_cast *>( - & r1->test_part_results()); - list2 = const_cast *>( - & r2->test_part_results()); - - // r0 is an empty TestResult. - - // r1 contains a single SUCCESS TestPartResult. - list1->PushBack(*pr1); - - // r2 contains a SUCCESS, and a FAILURE. - list2->PushBack(*pr1); - list2->PushBack(*pr2); - } - - virtual void TearDown() { - delete pr1; - delete pr2; - - delete r0; - delete r1; - delete r2; - } -}; - -// Tests TestResult::test_part_results() -TEST_F(TestResultTest, test_part_results) { - ASSERT_EQ(0u, r0->test_part_results().size()); - ASSERT_EQ(1u, r1->test_part_results().size()); - ASSERT_EQ(2u, r2->test_part_results().size()); -} - -// Tests TestResult::successful_part_count() -TEST_F(TestResultTest, successful_part_count) { - ASSERT_EQ(0u, r0->successful_part_count()); - ASSERT_EQ(1u, r1->successful_part_count()); - ASSERT_EQ(1u, r2->successful_part_count()); -} - -// Tests TestResult::failed_part_count() -TEST_F(TestResultTest, failed_part_count) { - ASSERT_EQ(0u, r0->failed_part_count()); - ASSERT_EQ(0u, r1->failed_part_count()); - ASSERT_EQ(1u, r2->failed_part_count()); -} - -// Tests testing::internal::GetFailedPartCount(). -TEST_F(TestResultTest, GetFailedPartCount) { - ASSERT_EQ(0u, GetFailedPartCount(r0)); - ASSERT_EQ(0u, GetFailedPartCount(r1)); - ASSERT_EQ(1u, GetFailedPartCount(r2)); -} - -// Tests TestResult::total_part_count() -TEST_F(TestResultTest, total_part_count) { - ASSERT_EQ(0u, r0->total_part_count()); - ASSERT_EQ(1u, r1->total_part_count()); - ASSERT_EQ(2u, r2->total_part_count()); -} - -// Tests TestResult::Passed() -TEST_F(TestResultTest, Passed) { - ASSERT_TRUE(r0->Passed()); - ASSERT_TRUE(r1->Passed()); - ASSERT_FALSE(r2->Passed()); -} - -// Tests TestResult::Failed() -TEST_F(TestResultTest, Failed) { - ASSERT_FALSE(r0->Failed()); - ASSERT_FALSE(r1->Failed()); - ASSERT_TRUE(r2->Failed()); -} - -// Tests TestResult::test_properties() has no properties when none are added. -TEST(TestResultPropertyTest, NoPropertiesFoundWhenNoneAreAdded) { - TestResult test_result; - ASSERT_EQ(0u, test_result.test_properties().size()); -} - -// Tests TestResult::test_properties() has the expected property when added. -TEST(TestResultPropertyTest, OnePropertyFoundWhenAdded) { - TestResult test_result; - TestProperty property("key_1", "1"); - test_result.RecordProperty(property); - const List& properties = test_result.test_properties(); - ASSERT_EQ(1u, properties.size()); - TestProperty actual_property = properties.Head()->element(); - EXPECT_STREQ("key_1", actual_property.key()); - EXPECT_STREQ("1", actual_property.value()); -} - -// Tests TestResult::test_properties() has multiple properties when added. -TEST(TestResultPropertyTest, MultiplePropertiesFoundWhenAdded) { - TestResult test_result; - TestProperty property_1("key_1", "1"); - TestProperty property_2("key_2", "2"); - test_result.RecordProperty(property_1); - test_result.RecordProperty(property_2); - const List& properties = test_result.test_properties(); - ASSERT_EQ(2u, properties.size()); - TestProperty actual_property_1 = properties.Head()->element(); - EXPECT_STREQ("key_1", actual_property_1.key()); - EXPECT_STREQ("1", actual_property_1.value()); - - TestProperty actual_property_2 = properties.Last()->element(); - EXPECT_STREQ("key_2", actual_property_2.key()); - EXPECT_STREQ("2", actual_property_2.value()); -} - -// Tests TestResult::test_properties() overrides values for duplicate keys. -TEST(TestResultPropertyTest, OverridesValuesForDuplicateKeys) { - TestResult test_result; - TestProperty property_1_1("key_1", "1"); - TestProperty property_2_1("key_2", "2"); - TestProperty property_1_2("key_1", "12"); - TestProperty property_2_2("key_2", "22"); - test_result.RecordProperty(property_1_1); - test_result.RecordProperty(property_2_1); - test_result.RecordProperty(property_1_2); - test_result.RecordProperty(property_2_2); - - const List& properties = test_result.test_properties(); - ASSERT_EQ(2u, properties.size()); - TestProperty actual_property_1 = properties.Head()->element(); - EXPECT_STREQ("key_1", actual_property_1.key()); - EXPECT_STREQ("12", actual_property_1.value()); - - TestProperty actual_property_2 = properties.Last()->element(); - EXPECT_STREQ("key_2", actual_property_2.key()); - EXPECT_STREQ("22", actual_property_2.value()); -} - -// When a property using a reserved key is supplied to this function, it tests -// that a non-fatal failure is added, a fatal failure is not added, and that the -// property is not recorded. -void ExpectNonFatalFailureRecordingPropertyWithReservedKey(const char* key) { - TestResult test_result; - TestProperty property(key, "1"); - EXPECT_NONFATAL_FAILURE(test_result.RecordProperty(property), "Reserved key"); - ASSERT_TRUE(test_result.test_properties().IsEmpty()) << "Not recorded"; -} - -// Attempting to recording a property with the Reserved literal "name" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledName) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("name"); -} - -// Attempting to recording a property with the Reserved literal "status" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledStatus) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("status"); -} - -// Attempting to recording a property with the Reserved literal "time" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledTime) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("time"); -} - -// Attempting to recording a property with the Reserved literal "classname" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledClassname) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("classname"); -} - -// Tests that GTestFlagSaver works on Windows and Mac. - -class GTestFlagSaverTest : public Test { - protected: - // Saves the Google Test flags such that we can restore them later, and - // then sets them to their default values. This will be called - // before the first test in this test case is run. - static void SetUpTestCase() { - saver_ = new GTestFlagSaver; - - GTEST_FLAG(also_run_disabled_tests) = false; - GTEST_FLAG(break_on_failure) = false; - GTEST_FLAG(catch_exceptions) = false; - GTEST_FLAG(death_test_use_fork) = false; - GTEST_FLAG(color) = "auto"; - GTEST_FLAG(filter) = ""; - GTEST_FLAG(list_tests) = false; - GTEST_FLAG(output) = ""; - GTEST_FLAG(print_time) = true; - GTEST_FLAG(repeat) = 1; - GTEST_FLAG(throw_on_failure) = false; - } - - // Restores the Google Test flags that the tests have modified. This will - // be called after the last test in this test case is run. - static void TearDownTestCase() { - delete saver_; - saver_ = NULL; - } - - // Verifies that the Google Test flags have their default values, and then - // modifies each of them. - void VerifyAndModifyFlags() { - EXPECT_FALSE(GTEST_FLAG(also_run_disabled_tests)); - EXPECT_FALSE(GTEST_FLAG(break_on_failure)); - EXPECT_FALSE(GTEST_FLAG(catch_exceptions)); - EXPECT_STREQ("auto", GTEST_FLAG(color).c_str()); - EXPECT_FALSE(GTEST_FLAG(death_test_use_fork)); - EXPECT_STREQ("", GTEST_FLAG(filter).c_str()); - EXPECT_FALSE(GTEST_FLAG(list_tests)); - EXPECT_STREQ("", GTEST_FLAG(output).c_str()); - EXPECT_TRUE(GTEST_FLAG(print_time)); - EXPECT_EQ(1, GTEST_FLAG(repeat)); - EXPECT_FALSE(GTEST_FLAG(throw_on_failure)); - - GTEST_FLAG(also_run_disabled_tests) = true; - GTEST_FLAG(break_on_failure) = true; - GTEST_FLAG(catch_exceptions) = true; - GTEST_FLAG(color) = "no"; - GTEST_FLAG(death_test_use_fork) = true; - GTEST_FLAG(filter) = "abc"; - GTEST_FLAG(list_tests) = true; - GTEST_FLAG(output) = "xml:foo.xml"; - GTEST_FLAG(print_time) = false; - GTEST_FLAG(repeat) = 100; - GTEST_FLAG(throw_on_failure) = true; - } - private: - // For saving Google Test flags during this test case. - static GTestFlagSaver* saver_; -}; - -GTestFlagSaver* GTestFlagSaverTest::saver_ = NULL; - -// Google Test doesn't guarantee the order of tests. The following two -// tests are designed to work regardless of their order. - -// Modifies the Google Test flags in the test body. -TEST_F(GTestFlagSaverTest, ModifyGTestFlags) { - VerifyAndModifyFlags(); -} - -// Verifies that the Google Test flags in the body of the previous test were -// restored to their original values. -TEST_F(GTestFlagSaverTest, VerifyGTestFlags) { - VerifyAndModifyFlags(); -} - -// Sets an environment variable with the given name to the given -// value. If the value argument is "", unsets the environment -// variable. The caller must ensure that both arguments are not NULL. -static void SetEnv(const char* name, const char* value) { -#ifdef _WIN32_WCE - // Environment variables are not supported on Windows CE. - return; -#elif defined(__BORLANDC__) - // C++Builder's putenv only stores a pointer to its parameter; we have to - // ensure that the string remains valid as long as it might be needed. - // We use an std::map to do so. - static std::map added_env; - - // Because putenv stores a pointer to the string buffer, we can't delete the - // previous string (if present) until after it's replaced. - String *prev_env = NULL; - if (added_env.find(name) != added_env.end()) { - prev_env = added_env[name]; - } - added_env[name] = new String((Message() << name << "=" << value).GetString()); - putenv(added_env[name]->c_str()); - delete prev_env; - -#elif GTEST_OS_WINDOWS // If we are on Windows proper. - _putenv((Message() << name << "=" << value).GetString().c_str()); -#else - if (*value == '\0') { - unsetenv(name); - } else { - setenv(name, value, 1); - } -#endif -} - -#ifndef _WIN32_WCE -// Environment variables are not supported on Windows CE. - -using testing::internal::Int32FromGTestEnv; - -// Tests Int32FromGTestEnv(). - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable is not set. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenVariableIsNotSet) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", ""); - EXPECT_EQ(10, Int32FromGTestEnv("temp", 10)); -} - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable overflows as an Int32. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueOverflows) { - printf("(expecting 2 warnings)\n"); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12345678987654321"); - EXPECT_EQ(20, Int32FromGTestEnv("temp", 20)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-12345678987654321"); - EXPECT_EQ(30, Int32FromGTestEnv("temp", 30)); -} - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable does not represent a valid decimal integer. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueIsInvalid) { - printf("(expecting 2 warnings)\n"); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "A1"); - EXPECT_EQ(40, Int32FromGTestEnv("temp", 40)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12X"); - EXPECT_EQ(50, Int32FromGTestEnv("temp", 50)); -} - -// Tests that Int32FromGTestEnv() parses and returns the value of the -// environment variable when it represents a valid decimal integer in -// the range of an Int32. -TEST(Int32FromGTestEnvTest, ParsesAndReturnsValidValue) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "123"); - EXPECT_EQ(123, Int32FromGTestEnv("temp", 0)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-321"); - EXPECT_EQ(-321, Int32FromGTestEnv("temp", 0)); -} -#endif // !defined(_WIN32_WCE) - -// Tests ParseInt32Flag(). - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag has wrong format -TEST(ParseInt32FlagTest, ReturnsFalseForInvalidFlag) { - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--a=100", "b", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("a=100", "a", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag overflows as an Int32. -TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueOverflows) { - printf("(expecting 2 warnings)\n"); - - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--abc=12345678987654321", "abc", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("--abc=-12345678987654321", "abc", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag does not represent a valid decimal -// integer. -TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueIsInvalid) { - printf("(expecting 2 warnings)\n"); - - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--abc=A1", "abc", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("--abc=12X", "abc", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() parses the value of the flag and -// returns true when the flag represents a valid decimal integer in -// the range of an Int32. -TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) { - Int32 value = 123; - EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=456", "abc", &value)); - EXPECT_EQ(456, value); - - EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=-789", - "abc", &value)); - EXPECT_EQ(-789, value); -} - -// Tests that Int32FromEnvOrDie() parses the value of the var or -// returns the correct default. -TEST(Int32FromEnvOrDieTest, ParsesAndReturnsValidValue) { - EXPECT_EQ(333, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "123"); - EXPECT_EQ(123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "-123"); - EXPECT_EQ(-123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that Int32FromEnvOrDie() aborts with an error message -// if the variable is not an Int32. -TEST(Int32FromEnvOrDieDeathTest, AbortsOnFailure) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "xxx"); - EXPECT_DEATH({Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123);}, - ".*"); -} - -// Tests that Int32FromEnvOrDie() aborts with an error message -// if the variable cannot be represnted by an Int32. -TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "1234567891234567891234"); - EXPECT_DEATH({Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123);}, - ".*"); -} - -#endif // GTEST_HAS_DEATH_TEST - - -// Tests that ShouldRunTestOnShard() selects all tests -// where there is 1 shard. -TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereIsOneShard) { - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 0)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 1)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 2)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 3)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 4)); -} - -class ShouldShardTest : public testing::Test { - protected: - virtual void SetUp() { - index_var_ = GTEST_FLAG_PREFIX_UPPER_ "INDEX"; - total_var_ = GTEST_FLAG_PREFIX_UPPER_ "TOTAL"; - } - - virtual void TearDown() { - SetEnv(index_var_, ""); - SetEnv(total_var_, ""); - } - - const char* index_var_; - const char* total_var_; -}; - -// Tests that sharding is disabled if neither of the environment variables -// are set. -TEST_F(ShouldShardTest, ReturnsFalseWhenNeitherEnvVarIsSet) { - SetEnv(index_var_, ""); - SetEnv(total_var_, ""); - - EXPECT_FALSE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} - -// Tests that sharding is not enabled if total_shards == 1. -TEST_F(ShouldShardTest, ReturnsFalseWhenTotalShardIsOne) { - SetEnv(index_var_, "0"); - SetEnv(total_var_, "1"); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} - -// Tests that sharding is enabled if total_shards > 1 and -// we are not in a death test subprocess. -TEST_F(ShouldShardTest, WorksWhenShardEnvVarsAreValid) { - SetEnv(index_var_, "4"); - SetEnv(total_var_, "22"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); - - SetEnv(index_var_, "8"); - SetEnv(total_var_, "9"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); - - SetEnv(index_var_, "0"); - SetEnv(total_var_, "9"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that we exit in error if the sharding values are not valid. -TEST_F(ShouldShardTest, AbortsWhenShardingEnvVarsAreInvalid) { - SetEnv(index_var_, "4"); - SetEnv(total_var_, "4"); - EXPECT_DEATH({ShouldShard(total_var_, index_var_, false);}, - ".*"); - - SetEnv(index_var_, "4"); - SetEnv(total_var_, "-2"); - EXPECT_DEATH({ShouldShard(total_var_, index_var_, false);}, - ".*"); - - SetEnv(index_var_, "5"); - SetEnv(total_var_, ""); - EXPECT_DEATH({ShouldShard(total_var_, index_var_, false);}, - ".*"); - - SetEnv(index_var_, ""); - SetEnv(total_var_, "5"); - EXPECT_DEATH({ShouldShard(total_var_, index_var_, false);}, - ".*"); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that ShouldRunTestOnShard is a partition when 5 -// shards are used. -TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereAreFiveShards) { - // Choose an arbitrary number of tests and shards. - const int num_tests = 17; - const int num_shards = 5; - - // Check partitioning: each test should be on exactly 1 shard. - for (int test_id = 0; test_id < num_tests; test_id++) { - int prev_selected_shard_index = -1; - for (int shard_index = 0; shard_index < num_shards; shard_index++) { - if (ShouldRunTestOnShard(num_shards, shard_index, test_id)) { - if (prev_selected_shard_index < 0) { - prev_selected_shard_index = shard_index; - } else { - ADD_FAILURE() << "Shard " << prev_selected_shard_index << " and " - << shard_index << " are both selected to run test " << test_id; - } - } - } - } - - // Check balance: This is not required by the sharding protocol, but is a - // desirable property for performance. - for (int shard_index = 0; shard_index < num_shards; shard_index++) { - int num_tests_on_shard = 0; - for (int test_id = 0; test_id < num_tests; test_id++) { - num_tests_on_shard += - ShouldRunTestOnShard(num_shards, shard_index, test_id); - } - EXPECT_GE(num_tests_on_shard, num_tests / num_shards); - } -} - -// For the same reason we are not explicitly testing everything in the -// Test class, there are no separate tests for the following classes -// (except for some trivial cases): -// -// TestCase, UnitTest, UnitTestResultPrinter. -// -// Similarly, there are no separate tests for the following macros: -// -// TEST, TEST_F, RUN_ALL_TESTS - -TEST(UnitTestTest, CanGetOriginalWorkingDir) { - ASSERT_TRUE(UnitTest::GetInstance()->original_working_dir() != NULL); - EXPECT_STRNE(UnitTest::GetInstance()->original_working_dir(), ""); -} - -// This group of tests is for predicate assertions (ASSERT_PRED*, etc) -// of various arities. They do not attempt to be exhaustive. Rather, -// view them as smoke tests that can be easily reviewed and verified. -// A more complete set of tests for predicate assertions can be found -// in gtest_pred_impl_unittest.cc. - -// First, some predicates and predicate-formatters needed by the tests. - -// Returns true iff the argument is an even number. -bool IsEven(int n) { - return (n % 2) == 0; -} - -// A functor that returns true iff the argument is an even number. -struct IsEvenFunctor { - bool operator()(int n) { return IsEven(n); } -}; - -// A predicate-formatter function that asserts the argument is an even -// number. -AssertionResult AssertIsEven(const char* expr, int n) { - if (IsEven(n)) { - return AssertionSuccess(); - } - - Message msg; - msg << expr << " evaluates to " << n << ", which is not even."; - return AssertionFailure(msg); -} - -// A predicate-formatter functor that asserts the argument is an even -// number. -struct AssertIsEvenFunctor { - AssertionResult operator()(const char* expr, int n) { - return AssertIsEven(expr, n); - } -}; - -// Returns true iff the sum of the arguments is an even number. -bool SumIsEven2(int n1, int n2) { - return IsEven(n1 + n2); -} - -// A functor that returns true iff the sum of the arguments is an even -// number. -struct SumIsEven3Functor { - bool operator()(int n1, int n2, int n3) { - return IsEven(n1 + n2 + n3); - } -}; - -// A predicate-formatter function that asserts the sum of the -// arguments is an even number. -AssertionResult AssertSumIsEven4( - const char* e1, const char* e2, const char* e3, const char* e4, - int n1, int n2, int n3, int n4) { - const int sum = n1 + n2 + n3 + n4; - if (IsEven(sum)) { - return AssertionSuccess(); - } - - Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 - << " (" << n1 << " + " << n2 << " + " << n3 << " + " << n4 - << ") evaluates to " << sum << ", which is not even."; - return AssertionFailure(msg); -} - -// A predicate-formatter functor that asserts the sum of the arguments -// is an even number. -struct AssertSumIsEven5Functor { - AssertionResult operator()( - const char* e1, const char* e2, const char* e3, const char* e4, - const char* e5, int n1, int n2, int n3, int n4, int n5) { - const int sum = n1 + n2 + n3 + n4 + n5; - if (IsEven(sum)) { - return AssertionSuccess(); - } - - Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5 - << " (" - << n1 << " + " << n2 << " + " << n3 << " + " << n4 << " + " << n5 - << ") evaluates to " << sum << ", which is not even."; - return AssertionFailure(msg); - } -}; - - -// Tests unary predicate assertions. - -// Tests unary predicate assertions that don't use a custom formatter. -TEST(Pred1Test, WithoutFormat) { - // Success cases. - EXPECT_PRED1(IsEvenFunctor(), 2) << "This failure is UNEXPECTED!"; - ASSERT_PRED1(IsEven, 4); - - // Failure cases. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(IsEven, 5) << "This failure is expected."; - }, "This failure is expected."); - EXPECT_FATAL_FAILURE(ASSERT_PRED1(IsEvenFunctor(), 5), - "evaluates to false"); -} - -// Tests unary predicate assertions that use a custom formatter. -TEST(Pred1Test, WithFormat) { - // Success cases. - EXPECT_PRED_FORMAT1(AssertIsEven, 2); - ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), 4) - << "This failure is UNEXPECTED!"; - - // Failure cases. - const int n = 5; - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT1(AssertIsEvenFunctor(), n), - "n evaluates to 5, which is not even."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(AssertIsEven, 5) << "This failure is expected."; - }, "This failure is expected."); -} - -// Tests that unary predicate assertions evaluates their arguments -// exactly once. -TEST(Pred1Test, SingleEvaluationOnFailure) { - // A success case. - static int n = 0; - EXPECT_PRED1(IsEven, n++); - EXPECT_EQ(1, n) << "The argument is not evaluated exactly once."; - - // A failure case. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), n++) - << "This failure is expected."; - }, "This failure is expected."); - EXPECT_EQ(2, n) << "The argument is not evaluated exactly once."; -} - - -// Tests predicate assertions whose arity is >= 2. - -// Tests predicate assertions that don't use a custom formatter. -TEST(PredTest, WithoutFormat) { - // Success cases. - ASSERT_PRED2(SumIsEven2, 2, 4) << "This failure is UNEXPECTED!"; - EXPECT_PRED3(SumIsEven3Functor(), 4, 6, 8); - - // Failure cases. - const int n1 = 1; - const int n2 = 2; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(SumIsEven2, n1, n2) << "This failure is expected."; - }, "This failure is expected."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(SumIsEven3Functor(), 1, 2, 4); - }, "evaluates to false"); -} - -// Tests predicate assertions that use a custom formatter. -TEST(PredTest, WithFormat) { - // Success cases. - ASSERT_PRED_FORMAT4(AssertSumIsEven4, 4, 6, 8, 10) << - "This failure is UNEXPECTED!"; - EXPECT_PRED_FORMAT5(AssertSumIsEven5Functor(), 2, 4, 6, 8, 10); - - // Failure cases. - const int n1 = 1; - const int n2 = 2; - const int n3 = 4; - const int n4 = 6; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(AssertSumIsEven4, n1, n2, n3, n4); - }, "evaluates to 13, which is not even."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(), 1, 2, 4, 6, 8) - << "This failure is expected."; - }, "This failure is expected."); -} - -// Tests that predicate assertions evaluates their arguments -// exactly once. -TEST(PredTest, SingleEvaluationOnFailure) { - // A success case. - int n1 = 0; - int n2 = 0; - EXPECT_PRED2(SumIsEven2, n1++, n2++); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - - // Another success case. - n1 = n2 = 0; - int n3 = 0; - int n4 = 0; - int n5 = 0; - ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(), - n1++, n2++, n3++, n4++, n5++) - << "This failure is UNEXPECTED!"; - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once."; - EXPECT_EQ(1, n5) << "Argument 5 is not evaluated exactly once."; - - // A failure case. - n1 = n2 = n3 = 0; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(SumIsEven3Functor(), ++n1, n2++, n3++) - << "This failure is expected."; - }, "This failure is expected."); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - - // Another failure case. - n1 = n2 = n3 = n4 = 0; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(AssertSumIsEven4, ++n1, n2++, n3++, n4++); - }, "evaluates to 1, which is not even."); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once."; -} - - -// Some helper functions for testing using overloaded/template -// functions with ASSERT_PREDn and EXPECT_PREDn. - -bool IsPositive(int n) { - return n > 0; -} - -bool IsPositive(double x) { - return x > 0; -} - -template -bool IsNegative(T x) { - return x < 0; -} - -template -bool GreaterThan(T1 x1, T2 x2) { - return x1 > x2; -} - -// Tests that overloaded functions can be used in *_PRED* as long as -// their types are explicitly specified. -TEST(PredicateAssertionTest, AcceptsOverloadedFunction) { - // C++Builder requires C-style casts rather than static_cast. - EXPECT_PRED1((bool (*)(int))(IsPositive), 5); // NOLINT - ASSERT_PRED1((bool (*)(double))(IsPositive), 6.0); // NOLINT -} - -// Tests that template functions can be used in *_PRED* as long as -// their types are explicitly specified. -TEST(PredicateAssertionTest, AcceptsTemplateFunction) { - EXPECT_PRED1(IsNegative, -5); - // Makes sure that we can handle templates with more than one - // parameter. - ASSERT_PRED2((GreaterThan), 5, 0); -} - - -// Some helper functions for testing using overloaded/template -// functions with ASSERT_PRED_FORMATn and EXPECT_PRED_FORMATn. - -AssertionResult IsPositiveFormat(const char* /* expr */, int n) { - return n > 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -AssertionResult IsPositiveFormat(const char* /* expr */, double x) { - return x > 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -template -AssertionResult IsNegativeFormat(const char* /* expr */, T x) { - return x < 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -template -AssertionResult EqualsFormat(const char* /* expr1 */, const char* /* expr2 */, - const T1& x1, const T2& x2) { - return x1 == x2 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -// Tests that overloaded functions can be used in *_PRED_FORMAT* -// without explicitly specifying their types. -TEST(PredicateFormatAssertionTest, AcceptsOverloadedFunction) { - EXPECT_PRED_FORMAT1(IsPositiveFormat, 5); - ASSERT_PRED_FORMAT1(IsPositiveFormat, 6.0); -} - -// Tests that template functions can be used in *_PRED_FORMAT* without -// explicitly specifying their types. -TEST(PredicateFormatAssertionTest, AcceptsTemplateFunction) { - EXPECT_PRED_FORMAT1(IsNegativeFormat, -5); - ASSERT_PRED_FORMAT2(EqualsFormat, 3, 3); -} - - -// Tests string assertions. - -// Tests ASSERT_STREQ with non-NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ) { - const char * const p1 = "good"; - ASSERT_STREQ(p1, p1); - - // Let p2 have the same content as p1, but be at a different address. - const char p2[] = "good"; - ASSERT_STREQ(p1, p2); - - EXPECT_FATAL_FAILURE(ASSERT_STREQ("bad", "good"), - "Expected: \"bad\""); -} - -// Tests ASSERT_STREQ with NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ_Null) { - ASSERT_STREQ(static_cast(NULL), NULL); - EXPECT_FATAL_FAILURE(ASSERT_STREQ(NULL, "non-null"), - "non-null"); -} - -// Tests ASSERT_STREQ with NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ_Null2) { - EXPECT_FATAL_FAILURE(ASSERT_STREQ("non-null", NULL), - "non-null"); -} - -// Tests ASSERT_STRNE. -TEST(StringAssertionTest, ASSERT_STRNE) { - ASSERT_STRNE("hi", "Hi"); - ASSERT_STRNE("Hi", NULL); - ASSERT_STRNE(NULL, "Hi"); - ASSERT_STRNE("", NULL); - ASSERT_STRNE(NULL, ""); - ASSERT_STRNE("", "Hi"); - ASSERT_STRNE("Hi", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRNE("Hi", "Hi"), - "\"Hi\" vs \"Hi\""); -} - -// Tests ASSERT_STRCASEEQ. -TEST(StringAssertionTest, ASSERT_STRCASEEQ) { - ASSERT_STRCASEEQ("hi", "Hi"); - ASSERT_STRCASEEQ(static_cast(NULL), NULL); - - ASSERT_STRCASEEQ("", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("Hi", "hi2"), - "(ignoring case)"); -} - -// Tests ASSERT_STRCASENE. -TEST(StringAssertionTest, ASSERT_STRCASENE) { - ASSERT_STRCASENE("hi1", "Hi2"); - ASSERT_STRCASENE("Hi", NULL); - ASSERT_STRCASENE(NULL, "Hi"); - ASSERT_STRCASENE("", NULL); - ASSERT_STRCASENE(NULL, ""); - ASSERT_STRCASENE("", "Hi"); - ASSERT_STRCASENE("Hi", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("Hi", "hi"), - "(ignoring case)"); -} - -// Tests *_STREQ on wide strings. -TEST(StringAssertionTest, STREQ_Wide) { - // NULL strings. - ASSERT_STREQ(static_cast(NULL), NULL); - - // Empty strings. - ASSERT_STREQ(L"", L""); - - // Non-null vs NULL. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"non-null", NULL), - "non-null"); - - // Equal strings. - EXPECT_STREQ(L"Hi", L"Hi"); - - // Unequal strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc", L"Abc"), - "Abc"); - - // Strings containing wide characters. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc\x8119", L"abc\x8120"), - "abc"); -} - -// Tests *_STRNE on wide strings. -TEST(StringAssertionTest, STRNE_Wide) { - // NULL strings. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_STRNE(static_cast(NULL), NULL); - }, ""); - - // Empty strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"", L""), - "L\"\""); - - // Non-null vs NULL. - ASSERT_STRNE(L"non-null", NULL); - - // Equal strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"Hi", L"Hi"), - "L\"Hi\""); - - // Unequal strings. - EXPECT_STRNE(L"abc", L"Abc"); - - // Strings containing wide characters. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"abc\x8119", L"abc\x8119"), - "abc"); -} - -// Tests for ::testing::IsSubstring(). - -// Tests that IsSubstring() returns the correct result when the input -// argument type is const char*. -TEST(IsSubstringTest, ReturnsCorrectResultForCString) { - EXPECT_FALSE(IsSubstring("", "", NULL, "a")); - EXPECT_FALSE(IsSubstring("", "", "b", NULL)); - EXPECT_FALSE(IsSubstring("", "", "needle", "haystack")); - - EXPECT_TRUE(IsSubstring("", "", static_cast(NULL), NULL)); - EXPECT_TRUE(IsSubstring("", "", "needle", "two needles")); -} - -// Tests that IsSubstring() returns the correct result when the input -// argument type is const wchar_t*. -TEST(IsSubstringTest, ReturnsCorrectResultForWideCString) { - EXPECT_FALSE(IsSubstring("", "", kNull, L"a")); - EXPECT_FALSE(IsSubstring("", "", L"b", kNull)); - EXPECT_FALSE(IsSubstring("", "", L"needle", L"haystack")); - - EXPECT_TRUE(IsSubstring("", "", static_cast(NULL), NULL)); - EXPECT_TRUE(IsSubstring("", "", L"needle", L"two needles")); -} - -// Tests that IsSubstring() generates the correct message when the input -// argument type is const char*. -TEST(IsSubstringTest, GeneratesCorrectMessageForCString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: \"needle\"\n" - "Expected: a substring of haystack_expr\n" - "Which is: \"haystack\"", - IsSubstring("needle_expr", "haystack_expr", - "needle", "haystack").failure_message()); -} - -#if GTEST_HAS_STD_STRING - -// Tests that IsSubstring returns the correct result when the input -// argument type is ::std::string. -TEST(IsSubstringTest, ReturnsCorrectResultsForStdString) { - EXPECT_TRUE(IsSubstring("", "", std::string("hello"), "ahellob")); - EXPECT_FALSE(IsSubstring("", "", "hello", std::string("world"))); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -// Tests that IsSubstring returns the correct result when the input -// argument type is ::std::wstring. -TEST(IsSubstringTest, ReturnsCorrectResultForStdWstring) { - EXPECT_TRUE(IsSubstring("", "", ::std::wstring(L"needle"), L"two needles")); - EXPECT_FALSE(IsSubstring("", "", L"needle", ::std::wstring(L"haystack"))); -} - -// Tests that IsSubstring() generates the correct message when the input -// argument type is ::std::wstring. -TEST(IsSubstringTest, GeneratesCorrectMessageForWstring) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: L\"needle\"\n" - "Expected: a substring of haystack_expr\n" - "Which is: L\"haystack\"", - IsSubstring( - "needle_expr", "haystack_expr", - ::std::wstring(L"needle"), L"haystack").failure_message()); -} - -#endif // GTEST_HAS_STD_WSTRING - -// Tests for ::testing::IsNotSubstring(). - -// Tests that IsNotSubstring() returns the correct result when the input -// argument type is const char*. -TEST(IsNotSubstringTest, ReturnsCorrectResultForCString) { - EXPECT_TRUE(IsNotSubstring("", "", "needle", "haystack")); - EXPECT_FALSE(IsNotSubstring("", "", "needle", "two needles")); -} - -// Tests that IsNotSubstring() returns the correct result when the input -// argument type is const wchar_t*. -TEST(IsNotSubstringTest, ReturnsCorrectResultForWideCString) { - EXPECT_TRUE(IsNotSubstring("", "", L"needle", L"haystack")); - EXPECT_FALSE(IsNotSubstring("", "", L"needle", L"two needles")); -} - -// Tests that IsNotSubstring() generates the correct message when the input -// argument type is const wchar_t*. -TEST(IsNotSubstringTest, GeneratesCorrectMessageForWideCString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: L\"needle\"\n" - "Expected: not a substring of haystack_expr\n" - "Which is: L\"two needles\"", - IsNotSubstring( - "needle_expr", "haystack_expr", - L"needle", L"two needles").failure_message()); -} - -#if GTEST_HAS_STD_STRING - -// Tests that IsNotSubstring returns the correct result when the input -// argument type is ::std::string. -TEST(IsNotSubstringTest, ReturnsCorrectResultsForStdString) { - EXPECT_FALSE(IsNotSubstring("", "", std::string("hello"), "ahellob")); - EXPECT_TRUE(IsNotSubstring("", "", "hello", std::string("world"))); -} - -// Tests that IsNotSubstring() generates the correct message when the input -// argument type is ::std::string. -TEST(IsNotSubstringTest, GeneratesCorrectMessageForStdString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: \"needle\"\n" - "Expected: not a substring of haystack_expr\n" - "Which is: \"two needles\"", - IsNotSubstring( - "needle_expr", "haystack_expr", - ::std::string("needle"), "two needles").failure_message()); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING - -// Tests that IsNotSubstring returns the correct result when the input -// argument type is ::std::wstring. -TEST(IsNotSubstringTest, ReturnsCorrectResultForStdWstring) { - EXPECT_FALSE( - IsNotSubstring("", "", ::std::wstring(L"needle"), L"two needles")); - EXPECT_TRUE(IsNotSubstring("", "", L"needle", ::std::wstring(L"haystack"))); -} - -#endif // GTEST_HAS_STD_WSTRING - -// Tests floating-point assertions. - -template -class FloatingPointTest : public Test { - protected: - - // Pre-calculated numbers to be used by the tests. - struct TestValues { - RawType close_to_positive_zero; - RawType close_to_negative_zero; - RawType further_from_negative_zero; - - RawType close_to_one; - RawType further_from_one; - - RawType infinity; - RawType close_to_infinity; - RawType further_from_infinity; - - RawType nan1; - RawType nan2; - }; - - typedef typename testing::internal::FloatingPoint Floating; - typedef typename Floating::Bits Bits; - - virtual void SetUp() { - const size_t max_ulps = Floating::kMaxUlps; - - // The bits that represent 0.0. - const Bits zero_bits = Floating(0).bits(); - - // Makes some numbers close to 0.0. - values_.close_to_positive_zero = Floating::ReinterpretBits( - zero_bits + max_ulps/2); - values_.close_to_negative_zero = -Floating::ReinterpretBits( - zero_bits + max_ulps - max_ulps/2); - values_.further_from_negative_zero = -Floating::ReinterpretBits( - zero_bits + max_ulps + 1 - max_ulps/2); - - // The bits that represent 1.0. - const Bits one_bits = Floating(1).bits(); - - // Makes some numbers close to 1.0. - values_.close_to_one = Floating::ReinterpretBits(one_bits + max_ulps); - values_.further_from_one = Floating::ReinterpretBits( - one_bits + max_ulps + 1); - - // +infinity. - values_.infinity = Floating::Infinity(); - - // The bits that represent +infinity. - const Bits infinity_bits = Floating(values_.infinity).bits(); - - // Makes some numbers close to infinity. - values_.close_to_infinity = Floating::ReinterpretBits( - infinity_bits - max_ulps); - values_.further_from_infinity = Floating::ReinterpretBits( - infinity_bits - max_ulps - 1); - - // Makes some NAN's. Sets the most significant bit of the fraction so that - // our NaN's are quiet; trying to process a signaling NaN would raise an - // exception if our environment enables floating point exceptions. - values_.nan1 = Floating::ReinterpretBits(Floating::kExponentBitMask - | (static_cast(1) << (Floating::kFractionBitCount - 1)) | 1); - values_.nan2 = Floating::ReinterpretBits(Floating::kExponentBitMask - | (static_cast(1) << (Floating::kFractionBitCount - 1)) | 200); - } - - void TestSize() { - EXPECT_EQ(sizeof(RawType), sizeof(Bits)); - } - - static TestValues values_; -}; - -template -typename FloatingPointTest::TestValues - FloatingPointTest::values_; - -// Instantiates FloatingPointTest for testing *_FLOAT_EQ. -typedef FloatingPointTest FloatTest; - -// Tests that the size of Float::Bits matches the size of float. -TEST_F(FloatTest, Size) { - TestSize(); -} - -// Tests comparing with +0 and -0. -TEST_F(FloatTest, Zeros) { - EXPECT_FLOAT_EQ(0.0, -0.0); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(-0.0, 1.0), - "1.0"); - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.5), - "1.5"); -} - -// Tests comparing numbers close to 0. -// -// This ensures that *_FLOAT_EQ handles the sign correctly and no -// overflow occurs when comparing numbers whose absolute value is very -// small. -TEST_F(FloatTest, AlmostZeros) { - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const FloatTest::TestValues& v(this->values_); - - EXPECT_FLOAT_EQ(0.0, v.close_to_positive_zero); - EXPECT_FLOAT_EQ(-0.0, v.close_to_negative_zero); - EXPECT_FLOAT_EQ(v.close_to_positive_zero, v.close_to_negative_zero); - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_FLOAT_EQ(v.close_to_positive_zero, - v.further_from_negative_zero); - }, "v.further_from_negative_zero"); -} - -// Tests comparing numbers close to each other. -TEST_F(FloatTest, SmallDiff) { - EXPECT_FLOAT_EQ(1.0, values_.close_to_one); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, values_.further_from_one), - "values_.further_from_one"); -} - -// Tests comparing numbers far apart. -TEST_F(FloatTest, LargeDiff) { - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(2.5, 3.0), - "3.0"); -} - -// Tests comparing with infinity. -// -// This ensures that no overflow occurs when comparing numbers whose -// absolute value is very large. -TEST_F(FloatTest, Infinity) { - EXPECT_FLOAT_EQ(values_.infinity, values_.close_to_infinity); - EXPECT_FLOAT_EQ(-values_.infinity, -values_.close_to_infinity); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, -values_.infinity), - "-values_.infinity"); - - // This is interesting as the representations of infinity and nan1 - // are only 1 DLP apart. - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, values_.nan1), - "values_.nan1"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that comparing with NAN always returns false. -TEST_F(FloatTest, NaN) { -#if !GTEST_OS_SYMBIAN -// Nokia's STLport crashes if we try to output infinity or NaN. - - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const FloatTest::TestValues& v(this->values_); - - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan1), - "v.nan1"); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan2), - "v.nan2"); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, v.nan1), - "v.nan1"); - - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(v.nan1, v.infinity), - "v.infinity"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_FLOAT_EQ are reflexive. -TEST_F(FloatTest, Reflexive) { - EXPECT_FLOAT_EQ(0.0, 0.0); - EXPECT_FLOAT_EQ(1.0, 1.0); - ASSERT_FLOAT_EQ(values_.infinity, values_.infinity); -} - -// Tests that *_FLOAT_EQ are commutative. -TEST_F(FloatTest, Commutative) { - // We already tested EXPECT_FLOAT_EQ(1.0, values_.close_to_one). - EXPECT_FLOAT_EQ(values_.close_to_one, 1.0); - - // We already tested EXPECT_FLOAT_EQ(1.0, values_.further_from_one). - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.further_from_one, 1.0), - "1.0"); -} - -// Tests EXPECT_NEAR. -TEST_F(FloatTest, EXPECT_NEAR) { - EXPECT_NEAR(-1.0f, -1.1f, 0.2f); - EXPECT_NEAR(2.0f, 3.0f, 1.0f); - EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0f,1.2f, 0.1f), // NOLINT - "The difference between 1.0f and 1.2f is 0.2, " - "which exceeds 0.1f"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous line. -} - -// Tests ASSERT_NEAR. -TEST_F(FloatTest, ASSERT_NEAR) { - ASSERT_NEAR(-1.0f, -1.1f, 0.2f); - ASSERT_NEAR(2.0f, 3.0f, 1.0f); - EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0f,1.2f, 0.1f), // NOLINT - "The difference between 1.0f and 1.2f is 0.2, " - "which exceeds 0.1f"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous line. -} - -// Tests the cases where FloatLE() should succeed. -TEST_F(FloatTest, FloatLESucceeds) { - EXPECT_PRED_FORMAT2(FloatLE, 1.0f, 2.0f); // When val1 < val2, - ASSERT_PRED_FORMAT2(FloatLE, 1.0f, 1.0f); // val1 == val2, - - // or when val1 is greater than, but almost equals to, val2. - EXPECT_PRED_FORMAT2(FloatLE, values_.close_to_positive_zero, 0.0f); -} - -// Tests the cases where FloatLE() should fail. -TEST_F(FloatTest, FloatLEFails) { - // When val1 is greater than val2 by a large margin, - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(FloatLE, 2.0f, 1.0f), - "(2.0f) <= (1.0f)"); - - // or by a small yet non-negligible margin, - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, values_.further_from_one, 1.0f); - }, "(values_.further_from_one) <= (1.0f)"); - -#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) - // Nokia's STLport crashes if we try to output infinity or NaN. - // C++Builder gives bad results for ordered comparisons involving NaNs - // due to compiler bugs. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, values_.nan1, values_.infinity); - }, "(values_.nan1) <= (values_.infinity)"); - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, -values_.infinity, values_.nan1); - }, "(-values_.infinity) <= (values_.nan1)"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(FloatLE, values_.nan1, values_.nan1); - }, "(values_.nan1) <= (values_.nan1)"); -#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) -} - -// Instantiates FloatingPointTest for testing *_DOUBLE_EQ. -typedef FloatingPointTest DoubleTest; - -// Tests that the size of Double::Bits matches the size of double. -TEST_F(DoubleTest, Size) { - TestSize(); -} - -// Tests comparing with +0 and -0. -TEST_F(DoubleTest, Zeros) { - EXPECT_DOUBLE_EQ(0.0, -0.0); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(-0.0, 1.0), - "1.0"); - EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(0.0, 1.0), - "1.0"); -} - -// Tests comparing numbers close to 0. -// -// This ensures that *_DOUBLE_EQ handles the sign correctly and no -// overflow occurs when comparing numbers whose absolute value is very -// small. -TEST_F(DoubleTest, AlmostZeros) { - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const DoubleTest::TestValues& v(this->values_); - - EXPECT_DOUBLE_EQ(0.0, v.close_to_positive_zero); - EXPECT_DOUBLE_EQ(-0.0, v.close_to_negative_zero); - EXPECT_DOUBLE_EQ(v.close_to_positive_zero, v.close_to_negative_zero); - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_DOUBLE_EQ(v.close_to_positive_zero, - v.further_from_negative_zero); - }, "v.further_from_negative_zero"); -} - -// Tests comparing numbers close to each other. -TEST_F(DoubleTest, SmallDiff) { - EXPECT_DOUBLE_EQ(1.0, values_.close_to_one); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, values_.further_from_one), - "values_.further_from_one"); -} - -// Tests comparing numbers far apart. -TEST_F(DoubleTest, LargeDiff) { - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(2.0, 3.0), - "3.0"); -} - -// Tests comparing with infinity. -// -// This ensures that no overflow occurs when comparing numbers whose -// absolute value is very large. -TEST_F(DoubleTest, Infinity) { - EXPECT_DOUBLE_EQ(values_.infinity, values_.close_to_infinity); - EXPECT_DOUBLE_EQ(-values_.infinity, -values_.close_to_infinity); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, -values_.infinity), - "-values_.infinity"); - - // This is interesting as the representations of infinity_ and nan1_ - // are only 1 DLP apart. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, values_.nan1), - "values_.nan1"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that comparing with NAN always returns false. -TEST_F(DoubleTest, NaN) { -#if !GTEST_OS_SYMBIAN - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const DoubleTest::TestValues& v(this->values_); - - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan1), - "v.nan1"); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan2), "v.nan2"); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, v.nan1), "v.nan1"); - EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(v.nan1, v.infinity), - "v.infinity"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_DOUBLE_EQ are reflexive. -TEST_F(DoubleTest, Reflexive) { - EXPECT_DOUBLE_EQ(0.0, 0.0); - EXPECT_DOUBLE_EQ(1.0, 1.0); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - ASSERT_DOUBLE_EQ(values_.infinity, values_.infinity); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_DOUBLE_EQ are commutative. -TEST_F(DoubleTest, Commutative) { - // We already tested EXPECT_DOUBLE_EQ(1.0, values_.close_to_one). - EXPECT_DOUBLE_EQ(values_.close_to_one, 1.0); - - // We already tested EXPECT_DOUBLE_EQ(1.0, values_.further_from_one). - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.further_from_one, 1.0), - "1.0"); -} - -// Tests EXPECT_NEAR. -TEST_F(DoubleTest, EXPECT_NEAR) { - EXPECT_NEAR(-1.0, -1.1, 0.2); - EXPECT_NEAR(2.0, 3.0, 1.0); - EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0, 1.2, 0.1), // NOLINT - "The difference between 1.0 and 1.2 is 0.2, " - "which exceeds 0.1"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous statement. -} - -// Tests ASSERT_NEAR. -TEST_F(DoubleTest, ASSERT_NEAR) { - ASSERT_NEAR(-1.0, -1.1, 0.2); - ASSERT_NEAR(2.0, 3.0, 1.0); - EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0, 1.2, 0.1), // NOLINT - "The difference between 1.0 and 1.2 is 0.2, " - "which exceeds 0.1"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous statement. -} - -// Tests the cases where DoubleLE() should succeed. -TEST_F(DoubleTest, DoubleLESucceeds) { - EXPECT_PRED_FORMAT2(DoubleLE, 1.0, 2.0); // When val1 < val2, - ASSERT_PRED_FORMAT2(DoubleLE, 1.0, 1.0); // val1 == val2, - - // or when val1 is greater than, but almost equals to, val2. - EXPECT_PRED_FORMAT2(DoubleLE, values_.close_to_positive_zero, 0.0); -} - -// Tests the cases where DoubleLE() should fail. -TEST_F(DoubleTest, DoubleLEFails) { - // When val1 is greater than val2 by a large margin, - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(DoubleLE, 2.0, 1.0), - "(2.0) <= (1.0)"); - - // or by a small yet non-negligible margin, - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, values_.further_from_one, 1.0); - }, "(values_.further_from_one) <= (1.0)"); - -#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) - // Nokia's STLport crashes if we try to output infinity or NaN. - // C++Builder gives bad results for ordered comparisons involving NaNs - // due to compiler bugs. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.infinity); - }, "(values_.nan1) <= (values_.infinity)"); - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, -values_.infinity, values_.nan1); - }, " (-values_.infinity) <= (values_.nan1)"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.nan1); - }, "(values_.nan1) <= (values_.nan1)"); -#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) -} - - -// Verifies that a test or test case whose name starts with DISABLED_ is -// not run. - -// A test whose name starts with DISABLED_. -// Should not run. -TEST(DisabledTest, DISABLED_TestShouldNotRun) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -// A test whose name does not start with DISABLED_. -// Should run. -TEST(DisabledTest, NotDISABLED_TestShouldRun) { - EXPECT_EQ(1, 1); -} - -// A test case whose name starts with DISABLED_. -// Should not run. -TEST(DISABLED_TestCase, TestShouldNotRun) { - FAIL() << "Unexpected failure: Test in disabled test case should not be run."; -} - -// A test case and test whose names start with DISABLED_. -// Should not run. -TEST(DISABLED_TestCase, DISABLED_TestShouldNotRun) { - FAIL() << "Unexpected failure: Test in disabled test case should not be run."; -} - -// Check that when all tests in a test case are disabled, SetupTestCase() and -// TearDownTestCase() are not called. -class DisabledTestsTest : public Test { - protected: - static void SetUpTestCase() { - FAIL() << "Unexpected failure: All tests disabled in test case. " - "SetupTestCase() should not be called."; - } - - static void TearDownTestCase() { - FAIL() << "Unexpected failure: All tests disabled in test case. " - "TearDownTestCase() should not be called."; - } -}; - -TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_1) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_2) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -// Tests that disabled typed tests aren't run. - -#if GTEST_HAS_TYPED_TEST - -template -class TypedTest : public Test { -}; - -typedef testing::Types NumericTypes; -TYPED_TEST_CASE(TypedTest, NumericTypes); - -TYPED_TEST(TypedTest, DISABLED_ShouldNotRun) { - FAIL() << "Unexpected failure: Disabled typed test should not run."; -} - -template -class DISABLED_TypedTest : public Test { -}; - -TYPED_TEST_CASE(DISABLED_TypedTest, NumericTypes); - -TYPED_TEST(DISABLED_TypedTest, ShouldNotRun) { - FAIL() << "Unexpected failure: Disabled typed test should not run."; -} - -#endif // GTEST_HAS_TYPED_TEST - -// Tests that disabled type-parameterized tests aren't run. - -#if GTEST_HAS_TYPED_TEST_P - -template -class TypedTestP : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP); - -TYPED_TEST_P(TypedTestP, DISABLED_ShouldNotRun) { - FAIL() << "Unexpected failure: " - << "Disabled type-parameterized test should not run."; -} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP, DISABLED_ShouldNotRun); - -INSTANTIATE_TYPED_TEST_CASE_P(My, TypedTestP, NumericTypes); - -template -class DISABLED_TypedTestP : public Test { -}; - -TYPED_TEST_CASE_P(DISABLED_TypedTestP); - -TYPED_TEST_P(DISABLED_TypedTestP, ShouldNotRun) { - FAIL() << "Unexpected failure: " - << "Disabled type-parameterized test should not run."; -} - -REGISTER_TYPED_TEST_CASE_P(DISABLED_TypedTestP, ShouldNotRun); - -INSTANTIATE_TYPED_TEST_CASE_P(My, DISABLED_TypedTestP, NumericTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -// Tests that assertion macros evaluate their arguments exactly once. - -class SingleEvaluationTest : public Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - // This helper function is needed by the FailedASSERT_STREQ test - // below. It's public to work around C++Builder's bug with scoping local - // classes. - static void CompareAndIncrementCharPtrs() { - ASSERT_STREQ(p1_++, p2_++); - } - - // This helper function is needed by the FailedASSERT_NE test below. It's - // public to work around C++Builder's bug with scoping local classes. - static void CompareAndIncrementInts() { - ASSERT_NE(a_++, b_++); - } - - protected: - SingleEvaluationTest() { - p1_ = s1_; - p2_ = s2_; - a_ = 0; - b_ = 0; - } - - static const char* const s1_; - static const char* const s2_; - static const char* p1_; - static const char* p2_; - - static int a_; - static int b_; -}; - -const char* const SingleEvaluationTest::s1_ = "01234"; -const char* const SingleEvaluationTest::s2_ = "abcde"; -const char* SingleEvaluationTest::p1_; -const char* SingleEvaluationTest::p2_; -int SingleEvaluationTest::a_; -int SingleEvaluationTest::b_; - -// Tests that when ASSERT_STREQ fails, it evaluates its arguments -// exactly once. -TEST_F(SingleEvaluationTest, FailedASSERT_STREQ) { - EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementCharPtrs(), - "p2_++"); - EXPECT_EQ(s1_ + 1, p1_); - EXPECT_EQ(s2_ + 1, p2_); -} - -// Tests that string assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, ASSERT_STR) { - // successful EXPECT_STRNE - EXPECT_STRNE(p1_++, p2_++); - EXPECT_EQ(s1_ + 1, p1_); - EXPECT_EQ(s2_ + 1, p2_); - - // failed EXPECT_STRCASEEQ - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ(p1_++, p2_++), - "ignoring case"); - EXPECT_EQ(s1_ + 2, p1_); - EXPECT_EQ(s2_ + 2, p2_); -} - -// Tests that when ASSERT_NE fails, it evaluates its arguments exactly -// once. -TEST_F(SingleEvaluationTest, FailedASSERT_NE) { - EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementInts(), - "(a_++) != (b_++)"); - EXPECT_EQ(1, a_); - EXPECT_EQ(1, b_); -} - -// Tests that assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, OtherCases) { - // successful EXPECT_TRUE - EXPECT_TRUE(0 == a_++); // NOLINT - EXPECT_EQ(1, a_); - - // failed EXPECT_TRUE - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(-1 == a_++), "-1 == a_++"); - EXPECT_EQ(2, a_); - - // successful EXPECT_GT - EXPECT_GT(a_++, b_++); - EXPECT_EQ(3, a_); - EXPECT_EQ(1, b_); - - // failed EXPECT_LT - EXPECT_NONFATAL_FAILURE(EXPECT_LT(a_++, b_++), "(a_++) < (b_++)"); - EXPECT_EQ(4, a_); - EXPECT_EQ(2, b_); - - // successful ASSERT_TRUE - ASSERT_TRUE(0 < a_++); // NOLINT - EXPECT_EQ(5, a_); - - // successful ASSERT_GT - ASSERT_GT(a_++, b_++); - EXPECT_EQ(6, a_); - EXPECT_EQ(3, b_); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowAnInteger() { - throw 1; -} - -// Tests that assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, ExceptionTests) { - // successful EXPECT_THROW - EXPECT_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }, int); - EXPECT_EQ(1, a_); - - // failed EXPECT_THROW, throws different - EXPECT_NONFATAL_FAILURE(EXPECT_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }, bool), "throws a different type"); - EXPECT_EQ(2, a_); - - // failed EXPECT_THROW, throws nothing - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(a_++, bool), "throws nothing"); - EXPECT_EQ(3, a_); - - // successful EXPECT_NO_THROW - EXPECT_NO_THROW(a_++); - EXPECT_EQ(4, a_); - - // failed EXPECT_NO_THROW - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }), "it throws"); - EXPECT_EQ(5, a_); - - // successful EXPECT_ANY_THROW - EXPECT_ANY_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }); - EXPECT_EQ(6, a_); - - // failed EXPECT_ANY_THROW - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(a_++), "it doesn't"); - EXPECT_EQ(7, a_); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests {ASSERT|EXPECT}_NO_FATAL_FAILURE. -class NoFatalFailureTest : public Test { - protected: - void Succeeds() {} - void FailsNonFatal() { - ADD_FAILURE() << "some non-fatal failure"; - } - void Fails() { - FAIL() << "some fatal failure"; - } - - void DoAssertNoFatalFailureOnFails() { - ASSERT_NO_FATAL_FAILURE(Fails()); - ADD_FAILURE() << "shold not reach here."; - } - - void DoExpectNoFatalFailureOnFails() { - EXPECT_NO_FATAL_FAILURE(Fails()); - ADD_FAILURE() << "other failure"; - } -}; - -TEST_F(NoFatalFailureTest, NoFailure) { - EXPECT_NO_FATAL_FAILURE(Succeeds()); - ASSERT_NO_FATAL_FAILURE(Succeeds()); -} - -TEST_F(NoFatalFailureTest, NonFatalIsNoFailure) { - EXPECT_NONFATAL_FAILURE( - EXPECT_NO_FATAL_FAILURE(FailsNonFatal()), - "some non-fatal failure"); - EXPECT_NONFATAL_FAILURE( - ASSERT_NO_FATAL_FAILURE(FailsNonFatal()), - "some non-fatal failure"); -} - -TEST_F(NoFatalFailureTest, AssertNoFatalFailureOnFatalFailure) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - DoAssertNoFatalFailureOnFails(); - } - ASSERT_EQ(2, gtest_failures.size()); - EXPECT_EQ(testing::TPRT_FATAL_FAILURE, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(testing::TPRT_FATAL_FAILURE, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does", - gtest_failures.GetTestPartResult(1).message()); -} - -TEST_F(NoFatalFailureTest, ExpectNoFatalFailureOnFatalFailure) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - DoExpectNoFatalFailureOnFails(); - } - ASSERT_EQ(3, gtest_failures.size()); - EXPECT_EQ(testing::TPRT_FATAL_FAILURE, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(testing::TPRT_NONFATAL_FAILURE, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_EQ(testing::TPRT_NONFATAL_FAILURE, - gtest_failures.GetTestPartResult(2).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does", - gtest_failures.GetTestPartResult(1).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "other failure", - gtest_failures.GetTestPartResult(2).message()); -} - -TEST_F(NoFatalFailureTest, MessageIsStreamable) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - EXPECT_NO_FATAL_FAILURE(FAIL() << "foo") << "my message"; - } - ASSERT_EQ(2, gtest_failures.size()); - EXPECT_EQ(testing::TPRT_NONFATAL_FAILURE, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(testing::TPRT_NONFATAL_FAILURE, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "foo", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "my message", - gtest_failures.GetTestPartResult(1).message()); -} - -// Tests non-string assertions. - -// Tests EqFailure(), used for implementing *EQ* assertions. -TEST(AssertionTest, EqFailure) { - const String foo_val("5"), bar_val("6"); - const String msg1( - EqFailure("foo", "bar", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: 6\n" - "Expected: foo\n" - "Which is: 5", - msg1.c_str()); - - const String msg2( - EqFailure("foo", "6", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: 6\n" - "Expected: foo\n" - "Which is: 5", - msg2.c_str()); - - const String msg3( - EqFailure("5", "bar", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: 6\n" - "Expected: 5", - msg3.c_str()); - - const String msg4( - EqFailure("5", "6", foo_val, bar_val, false).failure_message()); - EXPECT_STREQ( - "Value of: 6\n" - "Expected: 5", - msg4.c_str()); - - const String msg5( - EqFailure("foo", "bar", - String("\"x\""), String("\"y\""), - true).failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: \"y\"\n" - "Expected: foo (ignoring case)\n" - "Which is: \"x\"", - msg5.c_str()); -} - -// Tests AppendUserMessage(), used for implementing the *EQ* macros. -TEST(AssertionTest, AppendUserMessage) { - const String foo("foo"); - - Message msg; - EXPECT_STREQ("foo", - AppendUserMessage(foo, msg).c_str()); - - msg << "bar"; - EXPECT_STREQ("foo\nbar", - AppendUserMessage(foo, msg).c_str()); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests ASSERT_TRUE. -TEST(AssertionTest, ASSERT_TRUE) { - ASSERT_TRUE(2 > 1); // NOLINT - EXPECT_FATAL_FAILURE(ASSERT_TRUE(2 < 1), - "2 < 1"); -} - -// Tests ASSERT_FALSE. -TEST(AssertionTest, ASSERT_FALSE) { - ASSERT_FALSE(2 < 1); // NOLINT - EXPECT_FATAL_FAILURE(ASSERT_FALSE(2 > 1), - "Value of: 2 > 1\n" - " Actual: true\n" - "Expected: false"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -// Tests using ASSERT_EQ on double values. The purpose is to make -// sure that the specialization we did for integer and anonymous enums -// isn't used for double arguments. -TEST(ExpectTest, ASSERT_EQ_Double) { - // A success. - ASSERT_EQ(5.6, 5.6); - - // A failure. - EXPECT_FATAL_FAILURE(ASSERT_EQ(5.1, 5.2), - "5.1"); -} - -// Tests ASSERT_EQ. -TEST(AssertionTest, ASSERT_EQ) { - ASSERT_EQ(5, 2 + 3); - EXPECT_FATAL_FAILURE(ASSERT_EQ(5, 2*3), - "Value of: 2*3\n" - " Actual: 6\n" - "Expected: 5"); -} - -// Tests ASSERT_EQ(NULL, pointer). -#if !GTEST_OS_SYMBIAN -// The NULL-detection template magic fails to compile with -// the Nokia compiler and crashes the ARM compiler, hence -// not testing on Symbian. -TEST(AssertionTest, ASSERT_EQ_NULL) { - // A success. - const char* p = NULL; - ASSERT_EQ(NULL, p); - - // A failure. - static int n = 0; - EXPECT_FATAL_FAILURE(ASSERT_EQ(NULL, &n), - "Value of: &n\n"); -} -#endif // !GTEST_OS_SYMBIAN - -// Tests ASSERT_EQ(0, non_pointer). Since the literal 0 can be -// treated as a null pointer by the compiler, we need to make sure -// that ASSERT_EQ(0, non_pointer) isn't interpreted by Google Test as -// ASSERT_EQ(static_cast(NULL), non_pointer). -TEST(ExpectTest, ASSERT_EQ_0) { - int n = 0; - - // A success. - ASSERT_EQ(0, n); - - // A failure. - EXPECT_FATAL_FAILURE(ASSERT_EQ(0, 5.6), - "Expected: 0"); -} - -// Tests ASSERT_NE. -TEST(AssertionTest, ASSERT_NE) { - ASSERT_NE(6, 7); - EXPECT_FATAL_FAILURE(ASSERT_NE('a', 'a'), - "Expected: ('a') != ('a'), " - "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)"); -} - -// Tests ASSERT_LE. -TEST(AssertionTest, ASSERT_LE) { - ASSERT_LE(2, 3); - ASSERT_LE(2, 2); - EXPECT_FATAL_FAILURE(ASSERT_LE(2, 0), - "Expected: (2) <= (0), actual: 2 vs 0"); -} - -// Tests ASSERT_LT. -TEST(AssertionTest, ASSERT_LT) { - ASSERT_LT(2, 3); - EXPECT_FATAL_FAILURE(ASSERT_LT(2, 2), - "Expected: (2) < (2), actual: 2 vs 2"); -} - -// Tests ASSERT_GE. -TEST(AssertionTest, ASSERT_GE) { - ASSERT_GE(2, 1); - ASSERT_GE(2, 2); - EXPECT_FATAL_FAILURE(ASSERT_GE(2, 3), - "Expected: (2) >= (3), actual: 2 vs 3"); -} - -// Tests ASSERT_GT. -TEST(AssertionTest, ASSERT_GT) { - ASSERT_GT(2, 1); - EXPECT_FATAL_FAILURE(ASSERT_GT(2, 2), - "Expected: (2) > (2), actual: 2 vs 2"); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowNothing() {} - -// Tests ASSERT_THROW. -TEST(AssertionTest, ASSERT_THROW) { - ASSERT_THROW(ThrowAnInteger(), int); -#if !defined(__BORLANDC__) || __BORLANDC__ >= 0x600 || defined(_DEBUG) - // ICE's in C++Builder 2007 (Release build). - EXPECT_FATAL_FAILURE( - ASSERT_THROW(ThrowAnInteger(), bool), - "Expected: ThrowAnInteger() throws an exception of type bool.\n" - " Actual: it throws a different type."); -#endif - EXPECT_FATAL_FAILURE( - ASSERT_THROW(ThrowNothing(), bool), - "Expected: ThrowNothing() throws an exception of type bool.\n" - " Actual: it throws nothing."); -} - -// Tests ASSERT_NO_THROW. -TEST(AssertionTest, ASSERT_NO_THROW) { - ASSERT_NO_THROW(ThrowNothing()); - EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()), - "Expected: ThrowAnInteger() doesn't throw an exception." - "\n Actual: it throws."); -} - -// Tests ASSERT_ANY_THROW. -TEST(AssertionTest, ASSERT_ANY_THROW) { - ASSERT_ANY_THROW(ThrowAnInteger()); - EXPECT_FATAL_FAILURE( - ASSERT_ANY_THROW(ThrowNothing()), - "Expected: ThrowNothing() throws an exception.\n" - " Actual: it doesn't."); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Makes sure we deal with the precedence of <<. This test should -// compile. -TEST(AssertionTest, AssertPrecedence) { - ASSERT_EQ(1 < 2, true); - ASSERT_EQ(true && false, false); -} - -// A subroutine used by the following test. -void TestEq1(int x) { - ASSERT_EQ(1, x); -} - -// Tests calling a test subroutine that's not part of a fixture. -TEST(AssertionTest, NonFixtureSubroutine) { - EXPECT_FATAL_FAILURE(TestEq1(2), - "Value of: x"); -} - -// An uncopyable class. -class Uncopyable { - public: - explicit Uncopyable(int value) : value_(value) {} - - int value() const { return value_; } - bool operator==(const Uncopyable& rhs) const { - return value() == rhs.value(); - } - private: - // This constructor deliberately has no implementation, as we don't - // want this class to be copyable. - Uncopyable(const Uncopyable&); // NOLINT - - int value_; -}; - -::std::ostream& operator<<(::std::ostream& os, const Uncopyable& value) { - return os << value.value(); -} - - -bool IsPositiveUncopyable(const Uncopyable& x) { - return x.value() > 0; -} - -// A subroutine used by the following test. -void TestAssertNonPositive() { - Uncopyable y(-1); - ASSERT_PRED1(IsPositiveUncopyable, y); -} -// A subroutine used by the following test. -void TestAssertEqualsUncopyable() { - Uncopyable x(5); - Uncopyable y(-1); - ASSERT_EQ(x, y); -} - -// Tests that uncopyable objects can be used in assertions. -TEST(AssertionTest, AssertWorksWithUncopyableObject) { - Uncopyable x(5); - ASSERT_PRED1(IsPositiveUncopyable, x); - ASSERT_EQ(x, x); - EXPECT_FATAL_FAILURE(TestAssertNonPositive(), - "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1"); - EXPECT_FATAL_FAILURE(TestAssertEqualsUncopyable(), - "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5"); -} - -// Tests that uncopyable objects can be used in expects. -TEST(AssertionTest, ExpectWorksWithUncopyableObject) { - Uncopyable x(5); - EXPECT_PRED1(IsPositiveUncopyable, x); - Uncopyable y(-1); - EXPECT_NONFATAL_FAILURE(EXPECT_PRED1(IsPositiveUncopyable, y), - "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1"); - EXPECT_EQ(x, x); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(x, y), - "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5"); -} - - -// The version of gcc used in XCode 2.2 has a bug and doesn't allow -// anonymous enums in assertions. Therefore the following test is not -// done on Mac. -#if !GTEST_OS_MAC - -// Tests using assertions with anonymous enums. -enum { - CASE_A = -1, -#if GTEST_OS_LINUX - // We want to test the case where the size of the anonymous enum is - // larger than sizeof(int), to make sure our implementation of the - // assertions doesn't truncate the enums. However, MSVC - // (incorrectly) doesn't allow an enum value to exceed the range of - // an int, so this has to be conditionally compiled. - // - // On Linux, CASE_B and CASE_A have the same value when truncated to - // int size. We want to test whether this will confuse the - // assertions. - CASE_B = testing::internal::kMaxBiggestInt, -#else - CASE_B = INT_MAX, -#endif // GTEST_OS_LINUX -}; - -TEST(AssertionTest, AnonymousEnum) { -#if GTEST_OS_LINUX - EXPECT_EQ(static_cast(CASE_A), static_cast(CASE_B)); -#endif // GTEST_OS_LINUX - - EXPECT_EQ(CASE_A, CASE_A); - EXPECT_NE(CASE_A, CASE_B); - EXPECT_LT(CASE_A, CASE_B); - EXPECT_LE(CASE_A, CASE_B); - EXPECT_GT(CASE_B, CASE_A); - EXPECT_GE(CASE_A, CASE_A); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(CASE_A, CASE_B), - "(CASE_A) >= (CASE_B)"); - - ASSERT_EQ(CASE_A, CASE_A); - ASSERT_NE(CASE_A, CASE_B); - ASSERT_LT(CASE_A, CASE_B); - ASSERT_LE(CASE_A, CASE_B); - ASSERT_GT(CASE_B, CASE_A); - ASSERT_GE(CASE_A, CASE_A); - EXPECT_FATAL_FAILURE(ASSERT_EQ(CASE_A, CASE_B), - "Value of: CASE_B"); -} - -#endif // !GTEST_OS_MAC - -#if GTEST_OS_WINDOWS - -static HRESULT UnexpectedHRESULTFailure() { - return E_UNEXPECTED; -} - -static HRESULT OkHRESULTSuccess() { - return S_OK; -} - -static HRESULT FalseHRESULTSuccess() { - return S_FALSE; -} - -// HRESULT assertion tests test both zero and non-zero -// success codes as well as failure message for each. -// -// Windows CE doesn't support message texts. -TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) { - EXPECT_HRESULT_SUCCEEDED(S_OK); - EXPECT_HRESULT_SUCCEEDED(S_FALSE); - - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"); -} - -TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) { - ASSERT_HRESULT_SUCCEEDED(S_OK); - ASSERT_HRESULT_SUCCEEDED(S_FALSE); - - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"); -} - -TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) { - EXPECT_HRESULT_FAILED(E_UNEXPECTED); - - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(OkHRESULTSuccess()), - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"); - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()), - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"); -} - -TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) { - ASSERT_HRESULT_FAILED(E_UNEXPECTED); - -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007 and 2009. - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(OkHRESULTSuccess()), - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"); -#endif - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()), - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"); -} - -// Tests that streaming to the HRESULT macros works. -TEST(HRESULTAssertionTest, Streaming) { - EXPECT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure"; - ASSERT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure"; - EXPECT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure"; - ASSERT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure"; - - EXPECT_NONFATAL_FAILURE( - EXPECT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure", - "expected failure"); - -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007 and 2009. - EXPECT_FATAL_FAILURE( - ASSERT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure", - "expected failure"); -#endif - - EXPECT_NONFATAL_FAILURE( - EXPECT_HRESULT_FAILED(S_OK) << "expected failure", - "expected failure"); - - EXPECT_FATAL_FAILURE( - ASSERT_HRESULT_FAILED(S_OK) << "expected failure", - "expected failure"); -} - -#endif // GTEST_OS_WINDOWS - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests that the assertion macros behave like single statements. -TEST(AssertionSyntaxTest, BasicAssertionsBehavesLikeSingleStatement) { - if (false) - ASSERT_TRUE(false) << "This should never be executed; " - "It's a compilation test only."; - - if (true) - EXPECT_FALSE(false); - else - ; - - if (false) - ASSERT_LT(1, 3); - - if (false) - ; - else - EXPECT_GT(3, 2) << ""; -} - -#if GTEST_HAS_EXCEPTIONS -// Tests that the compiler will not complain about unreachable code in the -// EXPECT_THROW/EXPECT_ANY_THROW/EXPECT_NO_THROW macros. -TEST(ExpectThrowTest, DoesNotGenerateUnreachableCodeWarning) { - int n = 0; - - EXPECT_THROW(throw 1, int); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(n++, int), ""); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(throw 1, const char*), ""); - EXPECT_NO_THROW(n++); - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(throw 1), ""); - EXPECT_ANY_THROW(throw 1); - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(n++), ""); -} - -TEST(AssertionSyntaxTest, ExceptionAssertionsBehavesLikeSingleStatement) { - if (false) - EXPECT_THROW(ThrowNothing(), bool); - - if (true) - EXPECT_THROW(ThrowAnInteger(), int); - else - ; - - if (false) - EXPECT_NO_THROW(ThrowAnInteger()); - - if (true) - EXPECT_NO_THROW(ThrowNothing()); - else - ; - - if (false) - EXPECT_ANY_THROW(ThrowNothing()); - - if (true) - EXPECT_ANY_THROW(ThrowAnInteger()); - else - ; -} -#endif // GTEST_HAS_EXCEPTIONS - -TEST(AssertionSyntaxTest, NoFatalFailureAssertionsBehavesLikeSingleStatement) { - if (false) - EXPECT_NO_FATAL_FAILURE(FAIL()) << "This should never be executed. " - << "It's a compilation test only."; - else - ; - - if (false) - ASSERT_NO_FATAL_FAILURE(FAIL()) << ""; - else - ; - - if (true) - EXPECT_NO_FATAL_FAILURE(SUCCEED()); - else - ; - - if (false) - ; - else - ASSERT_NO_FATAL_FAILURE(SUCCEED()); -} - -// Tests that the assertion macros work well with switch statements. -TEST(AssertionSyntaxTest, WorksWithSwitch) { - switch (0) { - case 1: - break; - default: - ASSERT_TRUE(true); - } - - switch (0) - case 0: - EXPECT_FALSE(false) << "EXPECT_FALSE failed in switch case"; - - // Binary assertions are implemented using a different code path - // than the Boolean assertions. Hence we test them separately. - switch (0) { - case 1: - default: - ASSERT_EQ(1, 1) << "ASSERT_EQ failed in default switch handler"; - } - - switch (0) - case 0: - EXPECT_NE(1, 2); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowAString() { - throw "String"; -} - -// Test that the exception assertion macros compile and work with const -// type qualifier. -TEST(AssertionSyntaxTest, WorksWithConst) { - ASSERT_THROW(ThrowAString(), const char*); - - EXPECT_THROW(ThrowAString(), const char*); -} - -#endif // GTEST_HAS_EXCEPTIONS - -} // namespace - -// Returns the number of successful parts in the current test. -static size_t GetSuccessfulPartCount() { - return UnitTest::GetInstance()->impl()->current_test_result()-> - successful_part_count(); -} - -namespace testing { - -// Tests that Google Test tracks SUCCEED*. -TEST(SuccessfulAssertionTest, SUCCEED) { - SUCCEED(); - SUCCEED() << "OK"; - EXPECT_EQ(2u, GetSuccessfulPartCount()); -} - -// Tests that Google Test doesn't track successful EXPECT_*. -TEST(SuccessfulAssertionTest, EXPECT) { - EXPECT_TRUE(true); - EXPECT_EQ(0u, GetSuccessfulPartCount()); -} - -// Tests that Google Test doesn't track successful EXPECT_STR*. -TEST(SuccessfulAssertionTest, EXPECT_STR) { - EXPECT_STREQ("", ""); - EXPECT_EQ(0u, GetSuccessfulPartCount()); -} - -// Tests that Google Test doesn't track successful ASSERT_*. -TEST(SuccessfulAssertionTest, ASSERT) { - ASSERT_TRUE(true); - EXPECT_EQ(0u, GetSuccessfulPartCount()); -} - -// Tests that Google Test doesn't track successful ASSERT_STR*. -TEST(SuccessfulAssertionTest, ASSERT_STR) { - ASSERT_STREQ("", ""); - EXPECT_EQ(0u, GetSuccessfulPartCount()); -} - -} // namespace testing - -namespace { - -// Tests EXPECT_TRUE. -TEST(ExpectTest, EXPECT_TRUE) { - EXPECT_TRUE(2 > 1); // NOLINT - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 < 1), - "Value of: 2 < 1\n" - " Actual: false\n" - "Expected: true"); - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 > 3), - "2 > 3"); -} - -// Tests EXPECT_FALSE. -TEST(ExpectTest, EXPECT_FALSE) { - EXPECT_FALSE(2 < 1); // NOLINT - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 > 1), - "Value of: 2 > 1\n" - " Actual: true\n" - "Expected: false"); - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 < 3), - "2 < 3"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -// Tests EXPECT_EQ. -TEST(ExpectTest, EXPECT_EQ) { - EXPECT_EQ(5, 2 + 3); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2*3), - "Value of: 2*3\n" - " Actual: 6\n" - "Expected: 5"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2 - 3), - "2 - 3"); -} - -// Tests using EXPECT_EQ on double values. The purpose is to make -// sure that the specialization we did for integer and anonymous enums -// isn't used for double arguments. -TEST(ExpectTest, EXPECT_EQ_Double) { - // A success. - EXPECT_EQ(5.6, 5.6); - - // A failure. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5.1, 5.2), - "5.1"); -} - -#if !GTEST_OS_SYMBIAN -// Tests EXPECT_EQ(NULL, pointer). -TEST(ExpectTest, EXPECT_EQ_NULL) { - // A success. - const char* p = NULL; - EXPECT_EQ(NULL, p); - - // A failure. - int n = 0; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(NULL, &n), - "Value of: &n\n"); -} -#endif // !GTEST_OS_SYMBIAN - -// Tests EXPECT_EQ(0, non_pointer). Since the literal 0 can be -// treated as a null pointer by the compiler, we need to make sure -// that EXPECT_EQ(0, non_pointer) isn't interpreted by Google Test as -// EXPECT_EQ(static_cast(NULL), non_pointer). -TEST(ExpectTest, EXPECT_EQ_0) { - int n = 0; - - // A success. - EXPECT_EQ(0, n); - - // A failure. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(0, 5.6), - "Expected: 0"); -} - -// Tests EXPECT_NE. -TEST(ExpectTest, EXPECT_NE) { - EXPECT_NE(6, 7); - - EXPECT_NONFATAL_FAILURE(EXPECT_NE('a', 'a'), - "Expected: ('a') != ('a'), " - "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)"); - EXPECT_NONFATAL_FAILURE(EXPECT_NE(2, 2), - "2"); - char* const p0 = NULL; - EXPECT_NONFATAL_FAILURE(EXPECT_NE(p0, p0), - "p0"); - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - char* const p1 = reinterpret_cast(pv1); - EXPECT_NONFATAL_FAILURE(EXPECT_NE(p1, p1), - "p1"); -} - -// Tests EXPECT_LE. -TEST(ExpectTest, EXPECT_LE) { - EXPECT_LE(2, 3); - EXPECT_LE(2, 2); - EXPECT_NONFATAL_FAILURE(EXPECT_LE(2, 0), - "Expected: (2) <= (0), actual: 2 vs 0"); - EXPECT_NONFATAL_FAILURE(EXPECT_LE(1.1, 0.9), - "(1.1) <= (0.9)"); -} - -// Tests EXPECT_LT. -TEST(ExpectTest, EXPECT_LT) { - EXPECT_LT(2, 3); - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 2), - "Expected: (2) < (2), actual: 2 vs 2"); - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1), - "(2) < (1)"); -} - -// Tests EXPECT_GE. -TEST(ExpectTest, EXPECT_GE) { - EXPECT_GE(2, 1); - EXPECT_GE(2, 2); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(2, 3), - "Expected: (2) >= (3), actual: 2 vs 3"); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(0.9, 1.1), - "(0.9) >= (1.1)"); -} - -// Tests EXPECT_GT. -TEST(ExpectTest, EXPECT_GT) { - EXPECT_GT(2, 1); - EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 2), - "Expected: (2) > (2), actual: 2 vs 2"); - EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 3), - "(2) > (3)"); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests EXPECT_THROW. -TEST(ExpectTest, EXPECT_THROW) { - EXPECT_THROW(ThrowAnInteger(), int); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool), - "Expected: ThrowAnInteger() throws an exception of " - "type bool.\n Actual: it throws a different type."); - EXPECT_NONFATAL_FAILURE( - EXPECT_THROW(ThrowNothing(), bool), - "Expected: ThrowNothing() throws an exception of type bool.\n" - " Actual: it throws nothing."); -} - -// Tests EXPECT_NO_THROW. -TEST(ExpectTest, EXPECT_NO_THROW) { - EXPECT_NO_THROW(ThrowNothing()); - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()), - "Expected: ThrowAnInteger() doesn't throw an " - "exception.\n Actual: it throws."); -} - -// Tests EXPECT_ANY_THROW. -TEST(ExpectTest, EXPECT_ANY_THROW) { - EXPECT_ANY_THROW(ThrowAnInteger()); - EXPECT_NONFATAL_FAILURE( - EXPECT_ANY_THROW(ThrowNothing()), - "Expected: ThrowNothing() throws an exception.\n" - " Actual: it doesn't."); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Make sure we deal with the precedence of <<. -TEST(ExpectTest, ExpectPrecedence) { - EXPECT_EQ(1 < 2, true); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(true, true && false), - "Value of: true && false"); -} - - -// Tests the StreamableToString() function. - -// Tests using StreamableToString() on a scalar. -TEST(StreamableToStringTest, Scalar) { - EXPECT_STREQ("5", StreamableToString(5).c_str()); -} - -// Tests using StreamableToString() on a non-char pointer. -TEST(StreamableToStringTest, Pointer) { - int n = 0; - int* p = &n; - EXPECT_STRNE("(null)", StreamableToString(p).c_str()); -} - -// Tests using StreamableToString() on a NULL non-char pointer. -TEST(StreamableToStringTest, NullPointer) { - int* p = NULL; - EXPECT_STREQ("(null)", StreamableToString(p).c_str()); -} - -// Tests using StreamableToString() on a C string. -TEST(StreamableToStringTest, CString) { - EXPECT_STREQ("Foo", StreamableToString("Foo").c_str()); -} - -// Tests using StreamableToString() on a NULL C string. -TEST(StreamableToStringTest, NullCString) { - char* p = NULL; - EXPECT_STREQ("(null)", StreamableToString(p).c_str()); -} - -// Tests using streamable values as assertion messages. - -#if GTEST_HAS_STD_STRING -// Tests using std::string as an assertion message. -TEST(StreamableTest, string) { - static const std::string str( - "This failure message is a std::string, and is expected."); - EXPECT_FATAL_FAILURE(FAIL() << str, - str.c_str()); -} - -// Tests that we can output strings containing embedded NULs. -// Limited to Linux because we can only do this with std::string's. -TEST(StreamableTest, stringWithEmbeddedNUL) { - static const char char_array_with_nul[] = - "Here's a NUL\0 and some more string"; - static const std::string string_with_nul(char_array_with_nul, - sizeof(char_array_with_nul) - - 1); // drops the trailing NUL - EXPECT_FATAL_FAILURE(FAIL() << string_with_nul, - "Here's a NUL\\0 and some more string"); -} - -#endif // GTEST_HAS_STD_STRING - -// Tests that we can output a NUL char. -TEST(StreamableTest, NULChar) { - EXPECT_FATAL_FAILURE({ // NOLINT - FAIL() << "A NUL" << '\0' << " and some more string"; - }, "A NUL\\0 and some more string"); -} - -// Tests using int as an assertion message. -TEST(StreamableTest, int) { - EXPECT_FATAL_FAILURE(FAIL() << 900913, - "900913"); -} - -// Tests using NULL char pointer as an assertion message. -// -// In MSVC, streaming a NULL char * causes access violation. Google Test -// implemented a workaround (substituting "(null)" for NULL). This -// tests whether the workaround works. -TEST(StreamableTest, NullCharPtr) { - EXPECT_FATAL_FAILURE(FAIL() << static_cast(NULL), - "(null)"); -} - -// Tests that basic IO manipulators (endl, ends, and flush) can be -// streamed to testing::Message. -TEST(StreamableTest, BasicIoManip) { - EXPECT_FATAL_FAILURE({ // NOLINT - FAIL() << "Line 1." << std::endl - << "A NUL char " << std::ends << std::flush << " in line 2."; - }, "Line 1.\nA NUL char \\0 in line 2."); -} - -// Tests the macros that haven't been covered so far. - -void AddFailureHelper(bool* aborted) { - *aborted = true; - ADD_FAILURE() << "Failure"; - *aborted = false; -} - -// Tests ADD_FAILURE. -TEST(MacroTest, ADD_FAILURE) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(AddFailureHelper(&aborted), - "Failure"); - EXPECT_FALSE(aborted); -} - -// Tests FAIL. -TEST(MacroTest, FAIL) { - EXPECT_FATAL_FAILURE(FAIL(), - "Failed"); - EXPECT_FATAL_FAILURE(FAIL() << "Intentional failure.", - "Intentional failure."); -} - -// Tests SUCCEED -TEST(MacroTest, SUCCEED) { - SUCCEED(); - SUCCEED() << "Explicit success."; -} - - -// Tests for EXPECT_EQ() and ASSERT_EQ(). -// -// These tests fail *intentionally*, s.t. the failure messages can be -// generated and tested. -// -// We have different tests for different argument types. - -// Tests using bool values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Bool) { - EXPECT_EQ(true, true); - EXPECT_FATAL_FAILURE(ASSERT_EQ(false, true), - "Value of: true"); -} - -// Tests using int values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Int) { - ASSERT_EQ(32, 32); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(32, 33), - "33"); -} - -// Tests using time_t values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Time_T) { - EXPECT_EQ(static_cast(0), - static_cast(0)); - EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast(0), - static_cast(1234)), - "1234"); -} - -// Tests using char values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Char) { - ASSERT_EQ('z', 'z'); - const char ch = 'b'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ('\0', ch), - "ch"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ('a', ch), - "ch"); -} - -// Tests using wchar_t values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, WideChar) { - EXPECT_EQ(L'b', L'b'); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'\0', L'x'), - "Value of: L'x'\n" - " Actual: L'x' (120, 0x78)\n" - "Expected: L'\0'\n" - "Which is: L'\0' (0, 0x0)"); - - static wchar_t wchar; - wchar = L'b'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'a', wchar), - "wchar"); - wchar = L'\x8119'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(L'\x8120', wchar), - "Value of: wchar"); -} - -#if GTEST_HAS_STD_STRING -// Tests using ::std::string values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, StdString) { - // Compares a const char* to an std::string that has identical - // content. - ASSERT_EQ("Test", ::std::string("Test")); - - // Compares two identical std::strings. - static const ::std::string str1("A * in the middle"); - static const ::std::string str2(str1); - EXPECT_EQ(str1, str2); - - // Compares a const char* to an std::string that has different - // content - EXPECT_NONFATAL_FAILURE(EXPECT_EQ("Test", ::std::string("test")), - "::std::string(\"test\")"); - - // Compares an std::string to a char* that has different content. - char* const p1 = const_cast("foo"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::std::string("bar"), p1), - "p1"); - - // Compares two std::strings that have different contents, one of - // which having a NUL character in the middle. This should fail. - static ::std::string str3(str1); - str3.at(2) = '\0'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(str1, str3), - "Value of: str3\n" - " Actual: \"A \\0 in the middle\""); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING - -// Tests using ::std::wstring values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, StdWideString) { - // Compares an std::wstring to a const wchar_t* that has identical - // content. - EXPECT_EQ(::std::wstring(L"Test\x8119"), L"Test\x8119"); - - // Compares two identical std::wstrings. - const ::std::wstring wstr1(L"A * in the middle"); - const ::std::wstring wstr2(wstr1); - ASSERT_EQ(wstr1, wstr2); - - // Compares an std::wstring to a const wchar_t* that has different - // content. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EQ(::std::wstring(L"Test\x8119"), L"Test\x8120"); - }, "L\"Test\\x8120\""); - - // Compares two std::wstrings that have different contents, one of - // which having a NUL character in the middle. - ::std::wstring wstr3(wstr1); - wstr3.at(2) = L'\0'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(wstr1, wstr3), - "wstr3"); - - // Compares a wchar_t* to an std::wstring that has different - // content. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EQ(const_cast(L"foo"), ::std::wstring(L"bar")); - }, ""); -} - -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_STRING -// Tests using ::string values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, GlobalString) { - // Compares a const char* to a ::string that has identical content. - EXPECT_EQ("Test", ::string("Test")); - - // Compares two identical ::strings. - const ::string str1("A * in the middle"); - const ::string str2(str1); - ASSERT_EQ(str1, str2); - - // Compares a ::string to a const char* that has different content. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::string("Test"), "test"), - "test"); - - // Compares two ::strings that have different contents, one of which - // having a NUL character in the middle. - ::string str3(str1); - str3.at(2) = '\0'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(str1, str3), - "str3"); - - // Compares a ::string to a char* that has different content. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EQ(::string("bar"), const_cast("foo")); - }, ""); -} - -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING - -// Tests using ::wstring values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, GlobalWideString) { - // Compares a const wchar_t* to a ::wstring that has identical content. - ASSERT_EQ(L"Test\x8119", ::wstring(L"Test\x8119")); - - // Compares two identical ::wstrings. - static const ::wstring wstr1(L"A * in the middle"); - static const ::wstring wstr2(wstr1); - EXPECT_EQ(wstr1, wstr2); - - // Compares a const wchar_t* to a ::wstring that has different - // content. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EQ(L"Test\x8120", ::wstring(L"Test\x8119")); - }, "Test\\x8119"); - - // Compares a wchar_t* to a ::wstring that has different content. - wchar_t* const p1 = const_cast(L"foo"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, ::wstring(L"bar")), - "bar"); - - // Compares two ::wstrings that have different contents, one of which - // having a NUL character in the middle. - static ::wstring wstr3; - wstr3 = wstr1; - wstr3.at(2) = L'\0'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(wstr1, wstr3), - "wstr3"); -} - -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Tests using char pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, CharPointer) { - char* const p0 = NULL; - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - void* pv2 = (void*)0xABC0; // NOLINT - char* const p1 = reinterpret_cast(pv1); - char* const p2 = reinterpret_cast(pv2); - ASSERT_EQ(p1, p1); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2), - "Value of: p2"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2), - "p2"); - EXPECT_FATAL_FAILURE(ASSERT_EQ(reinterpret_cast(0x1234), - reinterpret_cast(0xABC0)), - "ABC0"); -} - -// Tests using wchar_t pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, WideCharPointer) { - wchar_t* const p0 = NULL; - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - void* pv2 = (void*)0xABC0; // NOLINT - wchar_t* const p1 = reinterpret_cast(pv1); - wchar_t* const p2 = reinterpret_cast(pv2); - EXPECT_EQ(p0, p0); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2), - "Value of: p2"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2), - "p2"); - void* pv3 = (void*)0x1234; // NOLINT - void* pv4 = (void*)0xABC0; // NOLINT - const wchar_t* p3 = reinterpret_cast(pv3); - const wchar_t* p4 = reinterpret_cast(pv4); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p3, p4), - "p4"); -} - -// Tests using other types of pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, OtherPointer) { - ASSERT_EQ(static_cast(NULL), - static_cast(NULL)); - EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast(NULL), - reinterpret_cast(0x1234)), - "0x1234"); -} - -// Tests the FRIEND_TEST macro. - -// This class has a private member we want to test. We will test it -// both in a TEST and in a TEST_F. -class Foo { - public: - Foo() {} - - private: - int Bar() const { return 1; } - - // Declares the friend tests that can access the private member - // Bar(). - FRIEND_TEST(FRIEND_TEST_Test, TEST); - FRIEND_TEST(FRIEND_TEST_Test2, TEST_F); -}; - -// Tests that the FRIEND_TEST declaration allows a TEST to access a -// class's private members. This should compile. -TEST(FRIEND_TEST_Test, TEST) { - ASSERT_EQ(1, Foo().Bar()); -} - -// The fixture needed to test using FRIEND_TEST with TEST_F. -class FRIEND_TEST_Test2 : public Test { - protected: - Foo foo; -}; - -// Tests that the FRIEND_TEST declaration allows a TEST_F to access a -// class's private members. This should compile. -TEST_F(FRIEND_TEST_Test2, TEST_F) { - ASSERT_EQ(1, foo.Bar()); -} - -// Tests the life cycle of Test objects. - -// The test fixture for testing the life cycle of Test objects. -// -// This class counts the number of live test objects that uses this -// fixture. -class TestLifeCycleTest : public Test { - protected: - // Constructor. Increments the number of test objects that uses - // this fixture. - TestLifeCycleTest() { count_++; } - - // Destructor. Decrements the number of test objects that uses this - // fixture. - ~TestLifeCycleTest() { count_--; } - - // Returns the number of live test objects that uses this fixture. - int count() const { return count_; } - - private: - static int count_; -}; - -int TestLifeCycleTest::count_ = 0; - -// Tests the life cycle of test objects. -TEST_F(TestLifeCycleTest, Test1) { - // There should be only one test object in this test case that's - // currently alive. - ASSERT_EQ(1, count()); -} - -// Tests the life cycle of test objects. -TEST_F(TestLifeCycleTest, Test2) { - // After Test1 is done and Test2 is started, there should still be - // only one live test object, as the object for Test1 should've been - // deleted. - ASSERT_EQ(1, count()); -} - -} // namespace - -// Tests streaming a user type whose definition and operator << are -// both in the global namespace. -class Base { - public: - explicit Base(int x) : x_(x) {} - int x() const { return x_; } - private: - int x_; -}; -std::ostream& operator<<(std::ostream& os, - const Base& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const Base* pointer) { - return os << "(" << pointer->x() << ")"; -} - -TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace) { - Message msg; - Base a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition and operator<< are -// both in an unnamed namespace. -namespace { -class MyTypeInUnnamedNameSpace : public Base { - public: - explicit MyTypeInUnnamedNameSpace(int x): Base(x) {} -}; -std::ostream& operator<<(std::ostream& os, - const MyTypeInUnnamedNameSpace& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const MyTypeInUnnamedNameSpace* pointer) { - return os << "(" << pointer->x() << ")"; -} -} // namespace - -TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace) { - Message msg; - MyTypeInUnnamedNameSpace a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition and operator<< are -// both in a user namespace. -namespace namespace1 { -class MyTypeInNameSpace1 : public Base { - public: - explicit MyTypeInNameSpace1(int x): Base(x) {} -}; -std::ostream& operator<<(std::ostream& os, - const MyTypeInNameSpace1& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const MyTypeInNameSpace1* pointer) { - return os << "(" << pointer->x() << ")"; -} -} // namespace namespace1 - -TEST(MessageTest, CanStreamUserTypeInUserNameSpace) { - Message msg; - namespace1::MyTypeInNameSpace1 a(1); - - msg << a << &a; // Uses namespace1::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition is in a user namespace -// but whose operator<< is in the global namespace. -namespace namespace2 { -class MyTypeInNameSpace2 : public ::Base { - public: - explicit MyTypeInNameSpace2(int x): Base(x) {} -}; -} // namespace namespace2 -std::ostream& operator<<(std::ostream& os, - const namespace2::MyTypeInNameSpace2& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const namespace2::MyTypeInNameSpace2* pointer) { - return os << "(" << pointer->x() << ")"; -} - -TEST(MessageTest, CanStreamUserTypeInUserNameSpaceWithStreamOperatorInGlobal) { - Message msg; - namespace2::MyTypeInNameSpace2 a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming NULL pointers to testing::Message. -TEST(MessageTest, NullPointers) { - Message msg; - char* const p1 = NULL; - unsigned char* const p2 = NULL; - int* p3 = NULL; - double* p4 = NULL; - bool* p5 = NULL; - Message* p6 = NULL; - - msg << p1 << p2 << p3 << p4 << p5 << p6; - ASSERT_STREQ("(null)(null)(null)(null)(null)(null)", - msg.GetString().c_str()); -} - -// Tests streaming wide strings to testing::Message. -TEST(MessageTest, WideStrings) { - // Streams a NULL of type const wchar_t*. - const wchar_t* const_wstr = NULL; - EXPECT_STREQ("(null)", - (Message() << const_wstr).GetString().c_str()); - - // Streams a NULL of type wchar_t*. - wchar_t* wstr = NULL; - EXPECT_STREQ("(null)", - (Message() << wstr).GetString().c_str()); - - // Streams a non-NULL of type const wchar_t*. - const_wstr = L"abc\x8119"; - EXPECT_STREQ("abc\xe8\x84\x99", - (Message() << const_wstr).GetString().c_str()); - - // Streams a non-NULL of type wchar_t*. - wstr = const_cast(const_wstr); - EXPECT_STREQ("abc\xe8\x84\x99", - (Message() << wstr).GetString().c_str()); -} - - -// This line tests that we can define tests in the testing namespace. -namespace testing { - -// Tests the TestInfo class. - -class TestInfoTest : public Test { - protected: - static TestInfo * GetTestInfo(const char* test_name) { - return UnitTest::GetInstance()->impl()-> - GetTestCase("TestInfoTest", "", NULL, NULL)-> - GetTestInfo(test_name); - } - - static const TestResult* GetTestResult( - const TestInfo* test_info) { - return test_info->result(); - } -}; - -// Tests TestInfo::test_case_name() and TestInfo::name(). -TEST_F(TestInfoTest, Names) { - TestInfo * const test_info = GetTestInfo("Names"); - - ASSERT_STREQ("TestInfoTest", test_info->test_case_name()); - ASSERT_STREQ("Names", test_info->name()); -} - -// Tests TestInfo::result(). -TEST_F(TestInfoTest, result) { - TestInfo * const test_info = GetTestInfo("result"); - - // Initially, there is no TestPartResult for this test. - ASSERT_EQ(0u, GetTestResult(test_info)->total_part_count()); - - // After the previous assertion, there is still none. - ASSERT_EQ(0u, GetTestResult(test_info)->total_part_count()); -} - -// Tests setting up and tearing down a test case. - -class SetUpTestCaseTest : public Test { - protected: - // This will be called once before the first test in this test case - // is run. - static void SetUpTestCase() { - printf("Setting up the test case . . .\n"); - - // Initializes some shared resource. In this simple example, we - // just create a C string. More complex stuff can be done if - // desired. - shared_resource_ = "123"; - - // Increments the number of test cases that have been set up. - counter_++; - - // SetUpTestCase() should be called only once. - EXPECT_EQ(1, counter_); - } - - // This will be called once after the last test in this test case is - // run. - static void TearDownTestCase() { - printf("Tearing down the test case . . .\n"); - - // Decrements the number of test cases that have been set up. - counter_--; - - // TearDownTestCase() should be called only once. - EXPECT_EQ(0, counter_); - - // Cleans up the shared resource. - shared_resource_ = NULL; - } - - // This will be called before each test in this test case. - virtual void SetUp() { - // SetUpTestCase() should be called only once, so counter_ should - // always be 1. - EXPECT_EQ(1, counter_); - } - - // Number of test cases that have been set up. - static int counter_; - - // Some resource to be shared by all tests in this test case. - static const char* shared_resource_; -}; - -int SetUpTestCaseTest::counter_ = 0; -const char* SetUpTestCaseTest::shared_resource_ = NULL; - -// A test that uses the shared resource. -TEST_F(SetUpTestCaseTest, Test1) { - EXPECT_STRNE(NULL, shared_resource_); -} - -// Another test that uses the shared resource. -TEST_F(SetUpTestCaseTest, Test2) { - EXPECT_STREQ("123", shared_resource_); -} - -// The InitGoogleTestTest test case tests testing::InitGoogleTest(). - -// The Flags struct stores a copy of all Google Test flags. -struct Flags { - // Constructs a Flags struct where each flag has its default value. - Flags() : also_run_disabled_tests(false), - break_on_failure(false), - catch_exceptions(false), - death_test_use_fork(false), - filter(""), - list_tests(false), - output(""), - print_time(true), - repeat(1), - throw_on_failure(false) {} - - // Factory methods. - - // Creates a Flags struct where the gtest_also_run_disabled_tests flag has - // the given value. - static Flags AlsoRunDisabledTests(bool also_run_disabled_tests) { - Flags flags; - flags.also_run_disabled_tests = also_run_disabled_tests; - return flags; - } - - // Creates a Flags struct where the gtest_break_on_failure flag has - // the given value. - static Flags BreakOnFailure(bool break_on_failure) { - Flags flags; - flags.break_on_failure = break_on_failure; - return flags; - } - - // Creates a Flags struct where the gtest_catch_exceptions flag has - // the given value. - static Flags CatchExceptions(bool catch_exceptions) { - Flags flags; - flags.catch_exceptions = catch_exceptions; - return flags; - } - - // Creates a Flags struct where the gtest_death_test_use_fork flag has - // the given value. - static Flags DeathTestUseFork(bool death_test_use_fork) { - Flags flags; - flags.death_test_use_fork = death_test_use_fork; - return flags; - } - - // Creates a Flags struct where the gtest_filter flag has the given - // value. - static Flags Filter(const char* filter) { - Flags flags; - flags.filter = filter; - return flags; - } - - // Creates a Flags struct where the gtest_list_tests flag has the - // given value. - static Flags ListTests(bool list_tests) { - Flags flags; - flags.list_tests = list_tests; - return flags; - } - - // Creates a Flags struct where the gtest_output flag has the given - // value. - static Flags Output(const char* output) { - Flags flags; - flags.output = output; - return flags; - } - - // Creates a Flags struct where the gtest_print_time flag has the given - // value. - static Flags PrintTime(bool print_time) { - Flags flags; - flags.print_time = print_time; - return flags; - } - - // Creates a Flags struct where the gtest_repeat flag has the given - // value. - static Flags Repeat(Int32 repeat) { - Flags flags; - flags.repeat = repeat; - return flags; - } - - // Creates a Flags struct where the gtest_throw_on_failure flag has - // the given value. - static Flags ThrowOnFailure(bool throw_on_failure) { - Flags flags; - flags.throw_on_failure = throw_on_failure; - return flags; - } - - // These fields store the flag values. - bool also_run_disabled_tests; - bool break_on_failure; - bool catch_exceptions; - bool death_test_use_fork; - const char* filter; - bool list_tests; - const char* output; - bool print_time; - Int32 repeat; - bool throw_on_failure; -}; - -// Fixture for testing InitGoogleTest(). -class InitGoogleTestTest : public Test { - protected: - // Clears the flags before each test. - virtual void SetUp() { - GTEST_FLAG(also_run_disabled_tests) = false; - GTEST_FLAG(break_on_failure) = false; - GTEST_FLAG(catch_exceptions) = false; - GTEST_FLAG(death_test_use_fork) = false; - GTEST_FLAG(filter) = ""; - GTEST_FLAG(list_tests) = false; - GTEST_FLAG(output) = ""; - GTEST_FLAG(print_time) = true; - GTEST_FLAG(repeat) = 1; - GTEST_FLAG(throw_on_failure) = false; - } - - // Asserts that two narrow or wide string arrays are equal. - template - static void AssertStringArrayEq(size_t size1, CharType** array1, - size_t size2, CharType** array2) { - ASSERT_EQ(size1, size2) << " Array sizes different."; - - for (size_t i = 0; i != size1; i++) { - ASSERT_STREQ(array1[i], array2[i]) << " where i == " << i; - } - } - - // Verifies that the flag values match the expected values. - static void CheckFlags(const Flags& expected) { - EXPECT_EQ(expected.also_run_disabled_tests, - GTEST_FLAG(also_run_disabled_tests)); - EXPECT_EQ(expected.break_on_failure, GTEST_FLAG(break_on_failure)); - EXPECT_EQ(expected.catch_exceptions, GTEST_FLAG(catch_exceptions)); - EXPECT_EQ(expected.death_test_use_fork, GTEST_FLAG(death_test_use_fork)); - EXPECT_STREQ(expected.filter, GTEST_FLAG(filter).c_str()); - EXPECT_EQ(expected.list_tests, GTEST_FLAG(list_tests)); - EXPECT_STREQ(expected.output, GTEST_FLAG(output).c_str()); - EXPECT_EQ(expected.print_time, GTEST_FLAG(print_time)); - EXPECT_EQ(expected.repeat, GTEST_FLAG(repeat)); - EXPECT_EQ(expected.throw_on_failure, GTEST_FLAG(throw_on_failure)); - } - - // Parses a command line (specified by argc1 and argv1), then - // verifies that the flag values are expected and that the - // recognized flags are removed from the command line. - template - static void TestParsingFlags(int argc1, const CharType** argv1, - int argc2, const CharType** argv2, - const Flags& expected) { - // Parses the command line. - internal::ParseGoogleTestFlagsOnly(&argc1, const_cast(argv1)); - - // Verifies the flag values. - CheckFlags(expected); - - // Verifies that the recognized flags are removed from the command - // line. - AssertStringArrayEq(argc1 + 1, argv1, argc2 + 1, argv2); - } - - // This macro wraps TestParsingFlags s.t. the user doesn't need - // to specify the array sizes. -#define GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected) \ - TestParsingFlags(sizeof(argv1)/sizeof(*argv1) - 1, argv1, \ - sizeof(argv2)/sizeof(*argv2) - 1, argv2, expected) -}; - -// Tests parsing an empty command line. -TEST_F(InitGoogleTestTest, Empty) { - const char* argv[] = { - NULL - }; - - const char* argv2[] = { - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing a command line that has no flag. -TEST_F(InitGoogleTestTest, NoFlag) { - const char* argv[] = { - "foo.exe", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing a bad --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterBad) { - const char* argv[] = { - "foo.exe", - "--gtest_filter", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "--gtest_filter", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("")); -} - -// Tests parsing an empty --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("")); -} - -// Tests parsing a non-empty --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterNonEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=abc", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("abc")); -} - -// Tests parsing --gtest_break_on_failure. -TEST_F(InitGoogleTestTest, BreakOnFailureNoDef) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure", - NULL -}; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true)); -} - -// Tests parsing --gtest_break_on_failure=0. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_0) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing --gtest_break_on_failure=f. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing --gtest_break_on_failure=F. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing a --gtest_break_on_failure flag that has a "true" -// definition. -TEST_F(InitGoogleTestTest, BreakOnFailureTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true)); -} - -// Tests parsing --gtest_catch_exceptions. -TEST_F(InitGoogleTestTest, CatchExceptions) { - const char* argv[] = { - "foo.exe", - "--gtest_catch_exceptions", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::CatchExceptions(true)); -} - -// Tests parsing --gtest_death_test_use_fork. -TEST_F(InitGoogleTestTest, DeathTestUseFork) { - const char* argv[] = { - "foo.exe", - "--gtest_death_test_use_fork", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::DeathTestUseFork(true)); -} - -// Tests having the same flag twice with different values. The -// expected behavior is that the one coming last takes precedence. -TEST_F(InitGoogleTestTest, DuplicatedFlags) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=a", - "--gtest_filter=b", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("b")); -} - -// Tests having an unrecognized flag on the command line. -TEST_F(InitGoogleTestTest, UnrecognizedFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure", - "bar", // Unrecognized by Google Test. - "--gtest_filter=b", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "bar", - NULL - }; - - Flags flags; - flags.break_on_failure = true; - flags.filter = "b"; - GTEST_TEST_PARSING_FLAGS_(argv, argv2, flags); -} - -// Tests having a --gtest_list_tests flag -TEST_F(InitGoogleTestTest, ListTestsFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true)); -} - -// Tests having a --gtest_list_tests flag with a "true" value -TEST_F(InitGoogleTestTest, ListTestsTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true)); -} - -// Tests having a --gtest_list_tests flag with a "false" value -TEST_F(InitGoogleTestTest, ListTestsFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_list_tests=f. -TEST_F(InitGoogleTestTest, ListTestsFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_break_on_failure=F. -TEST_F(InitGoogleTestTest, ListTestsFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_output (invalid). -TEST_F(InitGoogleTestTest, OutputEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_output", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "--gtest_output", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing --gtest_output=xml -TEST_F(InitGoogleTestTest, OutputXml) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml")); -} - -// Tests parsing --gtest_output=xml:file -TEST_F(InitGoogleTestTest, OutputXmlFile) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml:file", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:file")); -} - -// Tests parsing --gtest_output=xml:directory/path/ -TEST_F(InitGoogleTestTest, OutputXmlDirectory) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml:directory/path/", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:directory/path/")); -} - -// Tests having a --gtest_print_time flag -TEST_F(InitGoogleTestTest, PrintTimeFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true)); -} - -// Tests having a --gtest_print_time flag with a "true" value -TEST_F(InitGoogleTestTest, PrintTimeTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true)); -} - -// Tests having a --gtest_print_time flag with a "false" value -TEST_F(InitGoogleTestTest, PrintTimeFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_print_time=f. -TEST_F(InitGoogleTestTest, PrintTimeFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_print_time=F. -TEST_F(InitGoogleTestTest, PrintTimeFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_repeat=number -TEST_F(InitGoogleTestTest, Repeat) { - const char* argv[] = { - "foo.exe", - "--gtest_repeat=1000", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Repeat(1000)); -} - -// Tests having a --gtest_also_run_disabled_tests flag -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true)); -} - -// Tests having a --gtest_also_run_disabled_tests flag with a "true" value -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true)); -} - -// Tests having a --gtest_also_run_disabled_tests flag with a "false" value -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(false)); -} - - -// Tests parsing --gtest_throw_on_failure. -TEST_F(InitGoogleTestTest, ThrowOnFailureNoDef) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure", - NULL -}; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true)); -} - -// Tests parsing --gtest_throw_on_failure=0. -TEST_F(InitGoogleTestTest, ThrowOnFailureFalse_0) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(false)); -} - -// Tests parsing a --gtest_throw_on_failure flag that has a "true" -// definition. -TEST_F(InitGoogleTestTest, ThrowOnFailureTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true)); -} - -#if GTEST_OS_WINDOWS -// Tests parsing wide strings. -TEST_F(InitGoogleTestTest, WideStrings) { - const wchar_t* argv[] = { - L"foo.exe", - L"--gtest_filter=Foo*", - L"--gtest_list_tests=1", - L"--gtest_break_on_failure", - L"--non_gtest_flag", - NULL - }; - - const wchar_t* argv2[] = { - L"foo.exe", - L"--non_gtest_flag", - NULL - }; - - Flags expected_flags; - expected_flags.break_on_failure = true; - expected_flags.filter = "Foo*"; - expected_flags.list_tests = true; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, expected_flags); -} -#endif // GTEST_OS_WINDOWS - -// Tests current_test_info() in UnitTest. -class CurrentTestInfoTest : public Test { - protected: - // Tests that current_test_info() returns NULL before the first test in - // the test case is run. - static void SetUpTestCase() { - // There should be no tests running at this point. - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - EXPECT_EQ(NULL, test_info) - << "There should be no tests running at this point."; - } - - // Tests that current_test_info() returns NULL after the last test in - // the test case has run. - static void TearDownTestCase() { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - EXPECT_EQ(NULL, test_info) - << "There should be no tests running at this point."; - } -}; - -// Tests that current_test_info() returns TestInfo for currently running -// test by checking the expected test name against the actual one. -TEST_F(CurrentTestInfoTest, WorksForFirstTestInATestCase) { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - ASSERT_TRUE(NULL != test_info) - << "There is a test running so we should have a valid TestInfo."; - EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name()) - << "Expected the name of the currently running test case."; - EXPECT_STREQ("WorksForFirstTestInATestCase", test_info->name()) - << "Expected the name of the currently running test."; -} - -// Tests that current_test_info() returns TestInfo for currently running -// test by checking the expected test name against the actual one. We -// use this test to see that the TestInfo object actually changed from -// the previous invocation. -TEST_F(CurrentTestInfoTest, WorksForSecondTestInATestCase) { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - ASSERT_TRUE(NULL != test_info) - << "There is a test running so we should have a valid TestInfo."; - EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name()) - << "Expected the name of the currently running test case."; - EXPECT_STREQ("WorksForSecondTestInATestCase", test_info->name()) - << "Expected the name of the currently running test."; -} - -} // namespace testing - -// These two lines test that we can define tests in a namespace that -// has the name "testing" and is nested in another namespace. -namespace my_namespace { -namespace testing { - -// Makes sure that TEST knows to use ::testing::Test instead of -// ::my_namespace::testing::Test. -class Test {}; - -// Makes sure that an assertion knows to use ::testing::Message instead of -// ::my_namespace::testing::Message. -class Message {}; - -// Makes sure that an assertion knows to use -// ::testing::AssertionResult instead of -// ::my_namespace::testing::AssertionResult. -class AssertionResult {}; - -// Tests that an assertion that should succeed works as expected. -TEST(NestedTestingNamespaceTest, Success) { - EXPECT_EQ(1, 1) << "This shouldn't fail."; -} - -// Tests that an assertion that should fail works as expected. -TEST(NestedTestingNamespaceTest, Failure) { - EXPECT_FATAL_FAILURE(FAIL() << "This failure is expected.", - "This failure is expected."); -} - -} // namespace testing -} // namespace my_namespace - -// Tests that one can call superclass SetUp and TearDown methods-- -// that is, that they are not private. -// No tests are based on this fixture; the test "passes" if it compiles -// successfully. -class ProtectedFixtureMethodsTest : public Test { - protected: - virtual void SetUp() { - Test::SetUp(); - } - virtual void TearDown() { - Test::TearDown(); - } -}; - -// StreamingAssertionsTest tests the streaming versions of a representative -// sample of assertions. -TEST(StreamingAssertionsTest, Unconditional) { - SUCCEED() << "expected success"; - EXPECT_NONFATAL_FAILURE(ADD_FAILURE() << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(FAIL() << "expected failure", - "expected failure"); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -TEST(StreamingAssertionsTest, Truth) { - EXPECT_TRUE(true) << "unexpected failure"; - ASSERT_TRUE(true) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(false) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, Truth2) { - EXPECT_FALSE(false) << "unexpected failure"; - ASSERT_FALSE(false) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(true) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_FALSE(true) << "expected failure", - "expected failure"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -TEST(StreamingAssertionsTest, IntegerEquals) { - EXPECT_EQ(1, 1) << "unexpected failure"; - ASSERT_EQ(1, 1) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(1, 2) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_EQ(1, 2) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, IntegerLessThan) { - EXPECT_LT(1, 2) << "unexpected failure"; - ASSERT_LT(1, 2) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_LT(2, 1) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsEqual) { - EXPECT_STREQ("foo", "foo") << "unexpected failure"; - ASSERT_STREQ("foo", "foo") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ("foo", "bar") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STREQ("foo", "bar") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsNotEqual) { - EXPECT_STRNE("foo", "bar") << "unexpected failure"; - ASSERT_STRNE("foo", "bar") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE("foo", "foo") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRNE("foo", "foo") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsEqualIgnoringCase) { - EXPECT_STRCASEEQ("foo", "FOO") << "unexpected failure"; - ASSERT_STRCASEEQ("foo", "FOO") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ("foo", "bar") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("foo", "bar") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringNotEqualIgnoringCase) { - EXPECT_STRCASENE("foo", "bar") << "unexpected failure"; - ASSERT_STRCASENE("foo", "bar") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASENE("foo", "FOO") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("bar", "BAR") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, FloatingPointEquals) { - EXPECT_FLOAT_EQ(1.0, 1.0) << "unexpected failure"; - ASSERT_FLOAT_EQ(1.0, 1.0) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(0.0, 1.0) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.0) << "expected failure", - "expected failure"); -} - -#if GTEST_HAS_EXCEPTIONS - -TEST(StreamingAssertionsTest, Throw) { - EXPECT_THROW(ThrowAnInteger(), int) << "unexpected failure"; - ASSERT_THROW(ThrowAnInteger(), int) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_THROW(ThrowAnInteger(), bool) << - "expected failure", "expected failure"); -} - -TEST(StreamingAssertionsTest, NoThrow) { - EXPECT_NO_THROW(ThrowNothing()) << "unexpected failure"; - ASSERT_NO_THROW(ThrowNothing()) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()) << - "expected failure", "expected failure"); -} - -TEST(StreamingAssertionsTest, AnyThrow) { - EXPECT_ANY_THROW(ThrowAnInteger()) << "unexpected failure"; - ASSERT_ANY_THROW(ThrowAnInteger()) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(ThrowNothing()) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_ANY_THROW(ThrowNothing()) << - "expected failure", "expected failure"); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests that Google Test correctly decides whether to use colors in the output. - -TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsYes) { - GTEST_FLAG(color) = "yes"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsAliasOfYes) { - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - - GTEST_FLAG(color) = "True"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - GTEST_FLAG(color) = "t"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - GTEST_FLAG(color) = "1"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsNo) { - GTEST_FLAG(color) = "no"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsInvalid) { - SetEnv("TERM", "xterm"); // TERM supports colors. - - GTEST_FLAG(color) = "F"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - GTEST_FLAG(color) = "0"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - GTEST_FLAG(color) = "unknown"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) { - GTEST_FLAG(color) = "auto"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { - GTEST_FLAG(color) = "auto"; - -#if GTEST_OS_WINDOWS - // On Windows, we ignore the TERM variable as it's usually not set. - - SetEnv("TERM", "dumb"); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", ""); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm"); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -#else - // On non-Windows platforms, we rely on TERM to determine if the - // terminal supports colors. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "emacs"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "vt100"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm-mono"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm-color"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -#endif // GTEST_OS_WINDOWS -} - -// Verifies that StaticAssertTypeEq works in a namespace scope. - -static bool dummy1 = StaticAssertTypeEq(); -static bool dummy2 = StaticAssertTypeEq(); - -// Verifies that StaticAssertTypeEq works in a class. - -template -class StaticAssertTypeEqTestHelper { - public: - StaticAssertTypeEqTestHelper() { StaticAssertTypeEq(); } -}; - -TEST(StaticAssertTypeEqTest, WorksInClass) { - StaticAssertTypeEqTestHelper(); -} - -// Verifies that StaticAssertTypeEq works inside a function. - -typedef int IntAlias; - -TEST(StaticAssertTypeEqTest, CompilesForEqualTypes) { - StaticAssertTypeEq(); - StaticAssertTypeEq(); -} - -TEST(ThreadLocalTest, DefaultConstructor) { - ThreadLocal t1; - EXPECT_EQ(0, t1.get()); - - ThreadLocal t2; - EXPECT_TRUE(t2.get() == NULL); -} - -TEST(ThreadLocalTest, Init) { - ThreadLocal t1(123); - EXPECT_EQ(123, t1.get()); - - int i = 0; - ThreadLocal t2(&i); - EXPECT_EQ(&i, t2.get()); -} - -TEST(GetCurrentOsStackTraceExceptTopTest, ReturnsTheStackTrace) { - testing::UnitTest* const unit_test = testing::UnitTest::GetInstance(); - - // We don't have a stack walker in Google Test yet. - EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 0).c_str()); - EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 1).c_str()); -} - -TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsNoFailure) { - EXPECT_FALSE(HasNonfatalFailure()); -} - -static void FailFatally() { FAIL(); } - -TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsOnlyFatalFailure) { - FailFatally(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_FALSE(has_nonfatal_failure); -} - -TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) { - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) { - FailFatally(); - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -// A wrapper for calling HasNonfatalFailure outside of a test body. -static bool HasNonfatalFailureHelper() { - return testing::Test::HasNonfatalFailure(); -} - -TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody) { - EXPECT_FALSE(HasNonfatalFailureHelper()); -} - -TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody2) { - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailureHelper(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -TEST(HasFailureTest, ReturnsFalseWhenThereIsNoFailure) { - EXPECT_FALSE(HasFailure()); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereIsFatalFailure) { - FailFatally(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) { - ADD_FAILURE(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) { - FailFatally(); - ADD_FAILURE(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -// A wrapper for calling HasFailure outside of a test body. -static bool HasFailureHelper() { return testing::Test::HasFailure(); } - -TEST(HasFailureTest, WorksOutsideOfTestBody) { - EXPECT_FALSE(HasFailureHelper()); -} - -TEST(HasFailureTest, WorksOutsideOfTestBody2) { - ADD_FAILURE(); - const bool has_failure = HasFailureHelper(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile1_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile1_test_.cc deleted file mode 100644 index 664baad2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile1_test_.cc +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// gtest_xml_outfile1_test_ writes some xml via TestProperty used by -// gtest_xml_outfiles_test.py - -#include - -class PropertyOne : public testing::Test { - protected: - virtual void SetUp() { - RecordProperty("SetUpProp", 1); - } - virtual void TearDown() { - RecordProperty("TearDownProp", 1); - } -}; - -TEST_F(PropertyOne, TestSomeProperties) { - RecordProperty("TestSomeProperty", 1); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile2_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile2_test_.cc deleted file mode 100644 index 3411a3d3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfile2_test_.cc +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// gtest_xml_outfile2_test_ writes some xml via TestProperty used by -// gtest_xml_outfiles_test.py - -#include - -class PropertyTwo : public testing::Test { - protected: - virtual void SetUp() { - RecordProperty("SetUpProp", 2); - } - virtual void TearDown() { - RecordProperty("TearDownProp", 2); - } -}; - -TEST_F(PropertyTwo, TestSomeProperties) { - RecordProperty("TestSomeProperty", 2); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfiles_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfiles_test.py deleted file mode 100755 index 0fe947f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_outfiles_test.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for the gtest_xml_output module.""" - -__author__ = "keith.ray@gmail.com (Keith Ray)" - -import os -from xml.dom import minidom, Node - -import gtest_test_utils -import gtest_xml_test_utils - - -GTEST_OUTPUT_SUBDIR = "xml_outfiles" -GTEST_OUTPUT_1_TEST = "gtest_xml_outfile1_test_" -GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_" - -EXPECTED_XML_1 = """ - - - - - -""" - -EXPECTED_XML_2 = """ - - - - - -""" - - -class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): - """Unit test for Google Test's XML output functionality.""" - - def setUp(self): - # We want the trailing '/' that the last "" provides in os.path.join, for - # telling Google Test to create an output directory instead of a single file - # for xml output. - self.output_dir_ = os.path.join(gtest_test_utils.GetTempDir(), - GTEST_OUTPUT_SUBDIR, "") - self.DeleteFilesAndDir() - - def tearDown(self): - self.DeleteFilesAndDir() - - def DeleteFilesAndDir(self): - try: - os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_1_TEST + ".xml")) - except os.error: - pass - try: - os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_2_TEST + ".xml")) - except os.error: - pass - try: - os.rmdir(self.output_dir_) - except os.error: - pass - - def testOutfile1(self): - self._TestOutFile(GTEST_OUTPUT_1_TEST, EXPECTED_XML_1) - - def testOutfile2(self): - self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_XML_2) - - def _TestOutFile(self, test_name, expected_xml): - gtest_prog_path = gtest_test_utils.GetTestExecutablePath(test_name) - command = [gtest_prog_path, "--gtest_output=xml:%s" % self.output_dir_] - p = gtest_test_utils.Subprocess(command, - working_dir=gtest_test_utils.GetTempDir()) - self.assert_(p.exited) - self.assertEquals(0, p.exit_code) - - # TODO(wan@google.com): libtool causes the built test binary to be - # named lt-gtest_xml_outfiles_test_ instead of - # gtest_xml_outfiles_test_. To account for this possibillity, we - # allow both names in the following code. We should remove this - # hack when Chandler Carruth's libtool replacement tool is ready. - output_file_name1 = test_name + ".xml" - output_file1 = os.path.join(self.output_dir_, output_file_name1) - output_file_name2 = 'lt-' + output_file_name1 - output_file2 = os.path.join(self.output_dir_, output_file_name2) - self.assert_(os.path.isfile(output_file1) or os.path.isfile(output_file2), - output_file1) - - expected = minidom.parseString(expected_xml) - if os.path.isfile(output_file1): - actual = minidom.parse(output_file1) - else: - actual = minidom.parse(output_file2) - self.NormalizeXml(actual.documentElement) - self.AssertEquivalentNodes(expected.documentElement, - actual.documentElement) - expected.unlink() - actual.unlink() - - -if __name__ == "__main__": - os.environ["GTEST_STACK_TRACE_DEPTH"] = "0" - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest.py deleted file mode 100755 index a0cd4d09..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest.py +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for the gtest_xml_output module""" - -__author__ = 'eefacm@gmail.com (Sean Mcafee)' - -import errno -import os -import sys -from xml.dom import minidom, Node - -import gtest_test_utils -import gtest_xml_test_utils - - -GTEST_OUTPUT_FLAG = "--gtest_output" -GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" - -SUPPORTS_STACK_TRACES = False - -if SUPPORTS_STACK_TRACES: - STACK_TRACE_TEMPLATE = "\nStack trace:\n*" -else: - STACK_TRACE_TEMPLATE = "" - -EXPECTED_NON_EMPTY_XML = """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -""" % {'stack': STACK_TRACE_TEMPLATE} - - -EXPECTED_EMPTY_XML = """ - -""" - - -class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): - """ - Unit test for Google Test's XML output functionality. - """ - - def testNonEmptyXmlOutput(self): - """ - Runs a test program that generates a non-empty XML output, and - tests that the XML output is expected. - """ - self._TestXmlOutput("gtest_xml_output_unittest_", - EXPECTED_NON_EMPTY_XML, 1) - - def testEmptyXmlOutput(self): - """ - Runs a test program that generates an empty XML output, and - tests that the XML output is expected. - """ - - self._TestXmlOutput("gtest_no_test_unittest", - EXPECTED_EMPTY_XML, 0) - - def testDefaultOutputFile(self): - """ - Confirms that Google Test produces an XML output file with the expected - default name if no name is explicitly specified. - """ - output_file = os.path.join(gtest_test_utils.GetTempDir(), - GTEST_DEFAULT_OUTPUT_FILE) - gtest_prog_path = gtest_test_utils.GetTestExecutablePath( - "gtest_no_test_unittest") - try: - os.remove(output_file) - except OSError, e: - if e.errno != errno.ENOENT: - raise - - p = gtest_test_utils.Subprocess( - [gtest_prog_path, "%s=xml" % GTEST_OUTPUT_FLAG], - working_dir=gtest_test_utils.GetTempDir()) - self.assert_(p.exited) - self.assertEquals(0, p.exit_code) - self.assert_(os.path.isfile(output_file)) - - - def _TestXmlOutput(self, gtest_prog_name, expected_xml, expected_exit_code): - """ - Asserts that the XML document generated by running the program - gtest_prog_name matches expected_xml, a string containing another - XML document. Furthermore, the program's exit code must be - expected_exit_code. - """ - xml_path = os.path.join(gtest_test_utils.GetTempDir(), - gtest_prog_name + "out.xml") - gtest_prog_path = gtest_test_utils.GetTestExecutablePath(gtest_prog_name) - - command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)] - p = gtest_test_utils.Subprocess(command) - if p.terminated_by_signal: - self.assert_(False, - "%s was killed by signal %d" % (gtest_prog_name, p.signal)) - else: - self.assert_(p.exited) - self.assertEquals(expected_exit_code, p.exit_code, - "'%s' exited with code %s, which doesn't match " - "the expected exit code %s." - % (command, p.exit_code, expected_exit_code)) - - expected = minidom.parseString(expected_xml) - actual = minidom.parse(xml_path) - self.NormalizeXml(actual.documentElement) - self.AssertEquivalentNodes(expected.documentElement, - actual.documentElement) - expected.unlink() - actual .unlink() - - - -if __name__ == '__main__': - os.environ['GTEST_STACK_TRACE_DEPTH'] = '1' - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest_.cc deleted file mode 100644 index d7ce2c6f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_output_unittest_.cc +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: eefacm@gmail.com (Sean Mcafee) - -// Unit test for Google Test XML output. -// -// A user can specify XML output in a Google Test program to run via -// either the GTEST_OUTPUT environment variable or the --gtest_output -// flag. This is used for testing such functionality. -// -// This program will be invoked from a Python unit test. Don't run it -// directly. - -#include - -class SuccessfulTest : public testing::Test { -}; - -TEST_F(SuccessfulTest, Succeeds) { - SUCCEED() << "This is a success."; - ASSERT_EQ(1, 1); -} - -class FailedTest : public testing::Test { -}; - -TEST_F(FailedTest, Fails) { - ASSERT_EQ(1, 2); -} - -class DisabledTest : public testing::Test { -}; - -TEST_F(DisabledTest, DISABLED_test_not_run) { - FAIL() << "Unexpected failure: Disabled test should not be run"; -} - -TEST(MixedResultTest, Succeeds) { - EXPECT_EQ(1, 1); - ASSERT_EQ(1, 1); -} - -TEST(MixedResultTest, Fails) { - EXPECT_EQ(1, 2); - ASSERT_EQ(2, 3); -} - -TEST(MixedResultTest, DISABLED_test) { - FAIL() << "Unexpected failure: Disabled test should not be run"; -} - -class PropertyRecordingTest : public testing::Test { -}; - -TEST_F(PropertyRecordingTest, OneProperty) { - RecordProperty("key_1", "1"); -} - -TEST_F(PropertyRecordingTest, IntValuedProperty) { - RecordProperty("key_int", 1); -} - -TEST_F(PropertyRecordingTest, ThreeProperties) { - RecordProperty("key_1", "1"); - RecordProperty("key_2", "2"); - RecordProperty("key_3", "3"); -} - -TEST_F(PropertyRecordingTest, TwoValuesForOneKeyUsesLastValue) { - RecordProperty("key_1", "1"); - RecordProperty("key_1", "2"); -} - -TEST(NoFixtureTest, RecordProperty) { - RecordProperty("key", "1"); -} - -void ExternalUtilityThatCallsRecordProperty(const char* key, int value) { - testing::Test::RecordProperty(key, value); -} - -void ExternalUtilityThatCallsRecordProperty(const char* key, - const char* value) { - testing::Test::RecordProperty(key, value); -} - -TEST(NoFixtureTest, ExternalUtilityThatCallsRecordIntValuedProperty) { - ExternalUtilityThatCallsRecordProperty("key_for_utility_int", 1); -} - -TEST(NoFixtureTest, ExternalUtilityThatCallsRecordStringValuedProperty) { - ExternalUtilityThatCallsRecordProperty("key_for_utility_string", "1"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_test_utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_test_utils.py deleted file mode 100755 index 1811c408..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/gtest_xml_test_utils.py +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test utilities for gtest_xml_output""" - -__author__ = 'eefacm@gmail.com (Sean Mcafee)' - -import re -from xml.dom import minidom, Node - -import gtest_test_utils - - -GTEST_OUTPUT_FLAG = "--gtest_output" -GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" - -class GTestXMLTestCase(gtest_test_utils.TestCase): - """ - Base class for tests of Google Test's XML output functionality. - """ - - - def AssertEquivalentNodes(self, expected_node, actual_node): - """ - Asserts that actual_node (a DOM node object) is equivalent to - expected_node (another DOM node object), in that either both of - them are CDATA nodes and have the same value, or both are DOM - elements and actual_node meets all of the following conditions: - - * It has the same tag name as expected_node. - * It has the same set of attributes as expected_node, each with - the same value as the corresponding attribute of expected_node. - An exception is any attribute named "time", which needs only be - convertible to a floating-point number. - * It has an equivalent set of child nodes (including elements and - CDATA sections) as expected_node. Note that we ignore the - order of the children as they are not guaranteed to be in any - particular order. - """ - - if expected_node.nodeType == Node.CDATA_SECTION_NODE: - self.assertEquals(Node.CDATA_SECTION_NODE, actual_node.nodeType) - self.assertEquals(expected_node.nodeValue, actual_node.nodeValue) - return - - self.assertEquals(Node.ELEMENT_NODE, actual_node.nodeType) - self.assertEquals(Node.ELEMENT_NODE, expected_node.nodeType) - self.assertEquals(expected_node.tagName, actual_node.tagName) - - expected_attributes = expected_node.attributes - actual_attributes = actual_node .attributes - self.assertEquals(expected_attributes.length, actual_attributes.length) - for i in range(expected_attributes.length): - expected_attr = expected_attributes.item(i) - actual_attr = actual_attributes.get(expected_attr.name) - self.assert_(actual_attr is not None) - self.assertEquals(expected_attr.value, actual_attr.value) - - expected_children = self._GetChildren(expected_node) - actual_children = self._GetChildren(actual_node) - self.assertEquals(len(expected_children), len(actual_children)) - for child_id, child in expected_children.iteritems(): - self.assert_(child_id in actual_children, - '<%s> is not in <%s>' % (child_id, actual_children)) - self.AssertEquivalentNodes(child, actual_children[child_id]) - - identifying_attribute = { - "testsuites": "name", - "testsuite": "name", - "testcase": "name", - "failure": "message", - } - - def _GetChildren(self, element): - """ - Fetches all of the child nodes of element, a DOM Element object. - Returns them as the values of a dictionary keyed by the IDs of the - children. For , and elements, - the ID is the value of their "name" attribute; for - elements, it is the value of the "message" attribute; for CDATA - section node, it is "detail". An exception is raised if any - element other than the above four is encountered, if two child - elements with the same identifying attributes are encountered, or - if any other type of node is encountered, other than Text nodes - containing only whitespace. - """ - - children = {} - for child in element.childNodes: - if child.nodeType == Node.ELEMENT_NODE: - self.assert_(child.tagName in self.identifying_attribute, - "Encountered unknown element <%s>" % child.tagName) - childID = child.getAttribute(self.identifying_attribute[child.tagName]) - self.assert_(childID not in children) - children[childID] = child - elif child.nodeType == Node.TEXT_NODE: - self.assert_(child.nodeValue.isspace()) - elif child.nodeType == Node.CDATA_SECTION_NODE: - self.assert_("detail" not in children) - children["detail"] = child - else: - self.fail("Encountered unexpected node type %d" % child.nodeType) - return children - - def NormalizeXml(self, element): - """ - Normalizes Google Test's XML output to eliminate references to transient - information that may change from run to run. - - * The "time" attribute of , and - elements is replaced with a single asterisk, if it contains - only digit characters. - * The line number reported in the first line of the "message" - attribute of elements is replaced with a single asterisk. - * The directory names in file paths are removed. - * The stack traces are removed. - """ - - if element.tagName in ("testsuites", "testsuite", "testcase"): - time = element.getAttributeNode("time") - time.value = re.sub(r"^\d+(\.\d+)?$", "*", time.value) - elif element.tagName == "failure": - for child in element.childNodes: - if child.nodeType == Node.CDATA_SECTION_NODE: - # Removes the source line number. - cdata = re.sub(r"^.*[/\\](.*:)\d+\n", "\\1*\n", child.nodeValue) - # Removes the actual stack trace. - child.nodeValue = re.sub(r"\nStack trace:\n(.|\n)*", - "", cdata) - for child in element.childNodes: - if child.nodeType == Node.ELEMENT_NODE: - self.NormalizeXml(child) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.cc deleted file mode 100644 index 8b8a40b4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This is part of the unit test for include/gtest/gtest_prod.h. - -#include "production.h" - -PrivateCode::PrivateCode() : x_(0) {} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.h deleted file mode 100644 index 59970da0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/production.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This is part of the unit test for include/gtest/gtest_prod.h. - -#ifndef GTEST_TEST_PRODUCTION_H_ -#define GTEST_TEST_PRODUCTION_H_ - -#include - -class PrivateCode { - public: - // Declares a friend test that does not use a fixture. - FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers); - - // Declares a friend test that uses a fixture. - FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers); - - PrivateCode(); - - int x() const { return x_; } - private: - void set_x(int x) { x_ = x; } - int x_; -}; - -#endif // GTEST_TEST_PRODUCTION_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/run_tests_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/run_tests_test.py deleted file mode 100755 index b55739ea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/test/run_tests_test.py +++ /dev/null @@ -1,571 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests for run_tests.py test runner script.""" - -__author__ = 'vladl@google.com (Vlad Losev)' - -import os -import sys -import unittest - -sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), os.pardir)) -import run_tests - - -class FakePath(object): - """A fake os.path module for testing.""" - - def __init__(self, current_dir=os.getcwd(), known_paths=None): - self.current_dir = current_dir - self.tree = {} - self.path_separator = os.sep - - # known_paths contains either absolute or relative paths. Relative paths - # are absolutized with self.current_dir. - if known_paths: - self._AddPaths(known_paths) - - def _AddPath(self, path): - ends_with_slash = path.endswith('/') - path = self.abspath(path) - if ends_with_slash: - path += self.path_separator - name_list = path.split(self.path_separator) - tree = self.tree - for name in name_list[:-1]: - if not name: - continue - if name in tree: - tree = tree[name] - else: - tree[name] = {} - tree = tree[name] - - name = name_list[-1] - if name: - if name in tree: - assert tree[name] == 1 - else: - tree[name] = 1 - - def _AddPaths(self, paths): - for path in paths: - self._AddPath(path) - - def PathElement(self, path): - """Returns an internal representation of directory tree entry for path.""" - tree = self.tree - name_list = self.abspath(path).split(self.path_separator) - for name in name_list: - if not name: - continue - tree = tree.get(name, None) - if tree is None: - break - - return tree - - def normpath(self, path): - return os.path.normpath(path) - - def abspath(self, path): - return self.normpath(os.path.join(self.current_dir, path)) - - def isfile(self, path): - return self.PathElement(self.abspath(path)) == 1 - - def isdir(self, path): - return type(self.PathElement(self.abspath(path))) == type(dict()) - - def basename(self, path): - return os.path.basename(path) - - def dirname(self, path): - return os.path.dirname(path) - - def join(self, *kargs): - return os.path.join(*kargs) - - -class FakeOs(object): - """A fake os module for testing.""" - P_WAIT = os.P_WAIT - - def __init__(self, fake_path_module): - self.path = fake_path_module - - # Some methods/attributes are delegated to the real os module. - self.environ = os.environ - - def listdir(self, path): - assert self.path.isdir(path) - return self.path.PathElement(path).iterkeys() - - def spawnv(self, wait, executable, *kargs): - assert wait == FakeOs.P_WAIT - return self.spawn_impl(executable, kargs) - - -class GetTestsToRunTest(unittest.TestCase): - """Exercises TestRunner.GetTestsToRun.""" - - def AssertResultsEqual(self, results, expected): - """Asserts results returned by GetTestsToRun equal to expected results.""" - - def NormalizeResultPaths(paths): - """Normalizes values returned by GetTestsToRun for comparison.""" - - def NormalizeResultPair(pair): - return (os.path.normpath(pair[0]), os.path.normpath(pair[1])) - - return (sorted(map(NormalizeResultPair, paths[0])), - sorted(map(NormalizeResultPair, paths[1]))) - - self.assertEqual(NormalizeResultPaths(results), - NormalizeResultPaths(expected), - 'Incorrect set of tests %s returned vs %s expected' % - (results, expected)) - - def setUp(self): - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=['scons/build/dbg/scons/gtest_unittest', - 'scons/build/opt/scons/gtest_unittest', - 'test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='.') - - def testBinaryTestsOnly(self): - """Exercises GetTestsToRun with parameters designating binary tests only.""" - - # A default build. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # An explicitly specified directory. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # A particular configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - 'other', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/other/scons', - 'scons/build/other/scons/gtest_unittest')])) - - # All available configurations - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - 'all', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest'), - ('scons/build/opt/scons', 'scons/build/opt/scons/gtest_unittest')])) - - # All built configurations (unbuilt don't cause failure). - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - True, - available_configurations=self.fake_configurations + ['unbuilt']), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest'), - ('scons/build/opt/scons', 'scons/build/opt/scons/gtest_unittest')])) - - # A combination of an explicit directory and a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_unittest'], - 'opt', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest'), - ('scons/build/opt/scons', 'scons/build/opt/scons/gtest_unittest')])) - - # Same test specified in an explicit directory and via a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_unittest'], - 'dbg', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # All built configurations + explicit directory + explicit configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_unittest'], - 'opt', - True, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest'), - ('scons/build/opt/scons', 'scons/build/opt/scons/gtest_unittest')])) - - def testPythonTestsOnly(self): - """Exercises GetTestsToRun with parameters designating Python tests only.""" - - # A default build. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [])) - - # An explicitly specified directory. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'test/gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [])) - - # A particular configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - 'other', - False, - available_configurations=self.fake_configurations), - ([('scons/build/other/scons', 'test/gtest_color_test.py')], - [])) - - # All available configurations - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['test/gtest_color_test.py'], - 'all', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/scons', 'test/gtest_color_test.py')], - [])) - - # All built configurations (unbuilt don't cause failure). - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - True, - available_configurations=self.fake_configurations + ['unbuilt']), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/scons', 'test/gtest_color_test.py')], - [])) - - # A combination of an explicit directory and a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_color_test.py'], - 'opt', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/scons', 'test/gtest_color_test.py')], - [])) - - # Same test specified in an explicit directory and via a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_color_test.py'], - 'dbg', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [])) - - # All built configurations + explicit directory + explicit configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['scons/build/dbg/scons', 'gtest_color_test.py'], - 'opt', - True, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/scons', 'test/gtest_color_test.py')], - [])) - - def testCombinationOfBinaryAndPythonTests(self): - """Exercises GetTestsToRun with mixed binary/Python tests.""" - - # Use only default configuration for this test. - - # Neither binary nor Python tests are specified so find all. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [], - '', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # Specifying both binary and Python tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest', 'gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # Specifying binary tests suppresses Python tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')])) - - # Specifying Python tests suppresses binary tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('scons/build/dbg/scons', 'test/gtest_color_test.py')], - [])) - - def testIgnoresNonTestFiles(self): - """Verifies that GetTestsToRun ignores non-test files in the filesystem.""" - - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=['scons/build/dbg/scons/gtest_nontest', - 'scons/build/opt/scons/gtest_nontest.exe', - 'test/'])) - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='.') - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [], - '', - True, - available_configurations=self.fake_configurations), - ([], [])) - - def testWorksFromDifferentDir(self): - """Exercises GetTestsToRun from a directory different from run_test.py's.""" - - # Here we simulate an test script in directory /d/ called from the - # directory /a/b/c/. - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath('/a/b/c'), - known_paths=['/a/b/c/', - '/d/scons/build/dbg/scons/gtest_unittest', - '/d/scons/build/opt/scons/gtest_unittest', - '/d/test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='/d/') - # A binary test. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [('/d/scons/build/dbg/scons', - '/d/scons/build/dbg/scons/gtest_unittest')])) - - # A Python test. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('/d/scons/build/dbg/scons', '/d/test/gtest_color_test.py')], - [])) - - - def testNonTestBinary(self): - """Exercises GetTestsToRun with a non-test parameter.""" - - self.assert_( - not self.test_runner.GetTestsToRun( - ['gtest_unittest_not_really'], - '', - False, - available_configurations=self.fake_configurations)) - - def testNonExistingPythonTest(self): - """Exercises GetTestsToRun with a non-existent Python test parameter.""" - - self.assert_( - not self.test_runner.GetTestsToRun( - ['nonexistent_test.py'], - '', - False, - available_configurations=self.fake_configurations)) - - -class RunTestsTest(unittest.TestCase): - """Exercises TestRunner.RunTests.""" - - def SpawnSuccess(self, unused_executable, unused_argv): - """Fakes test success by returning 0 as an exit code.""" - - self.num_spawn_calls += 1 - return 0 - - def SpawnFailure(self, unused_executable, unused_argv): - """Fakes test success by returning 1 as an exit code.""" - - self.num_spawn_calls += 1 - return 1 - - def setUp(self): - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=['scons/build/dbg/scons/gtest_unittest', - 'scons/build/opt/scons/gtest_unittest', - 'test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None) - self.num_spawn_calls = 0 # A number of calls to spawn. - - def testRunPythonTestSuccess(self): - """Exercises RunTests to handle a Python test success.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [('scons/build/dbg/scons', 'test/gtest_color_test.py')], - []), - 0) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunBinaryTestSuccess(self): - """Exercises RunTests to handle a binary test success.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [], - [('scons/build/dbg/scons', - 'scons/build/dbg/scons/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunPythonTestFauilure(self): - """Exercises RunTests to handle a Python test failure.""" - - self.fake_os.spawn_impl = self.SpawnFailure - self.assertEqual( - self.test_runner.RunTests( - [('scons/build/dbg/scons', 'test/gtest_color_test.py')], - []), - 1) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunBinaryTestFailure(self): - """Exercises RunTests to handle a binary test failure.""" - - self.fake_os.spawn_impl = self.SpawnFailure - self.assertEqual( - self.test_runner.RunTests( - [], - [('scons/build/dbg/scons', - 'scons/build/dbg/scons/gtest_unittest')]), - 1) - self.assertEqual(self.num_spawn_calls, 1) - - def testCombinedTestSuccess(self): - """Exercises RunTests to handle a success of both Python and binary test.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')], - [('scons/build/dbg/scons', - 'scons/build/dbg/scons/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 2) - - def testCombinedTestSuccessAndFailure(self): - """Exercises RunTests to handle a success of both Python and binary test.""" - - def SpawnImpl(executable, argv): - self.num_spawn_calls += 1 - # Simulates failure of a Python test and success of a binary test. - if '.py' in executable or '.py' in argv[0]: - return 1 - else: - return 0 - - self.fake_os.spawn_impl = SpawnImpl - self.assertEqual( - self.test_runner.RunTests( - [('scons/build/dbg/scons', 'scons/build/dbg/scons/gtest_unittest')], - [('scons/build/dbg/scons', - 'scons/build/dbg/scons/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 2) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/DebugProject.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/DebugProject.xcconfig deleted file mode 100644 index 3d68157d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/DebugProject.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// DebugProject.xcconfig -// -// These are Debug Configuration project settings for the gtest framework and -// examples. It is set in the "Based On:" dropdown in the "Project" info -// dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -#include "General.xcconfig" - -// No optimization -GCC_OPTIMIZATION_LEVEL = 0 - -// Deployment postprocessing is what triggers Xcode to strip, turn it off -DEPLOYMENT_POSTPROCESSING = NO - -// Dead code stripping off -DEAD_CODE_STRIPPING = NO - -// Debug symbols should be on obviously -GCC_GENERATE_DEBUGGING_SYMBOLS = YES - -// Define the DEBUG macro in all debug builds -OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 - -// These are turned off to avoid STL incompatibilities with client code -// // Turns on special C++ STL checks to "encourage" good STL use -// GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/FrameworkTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/FrameworkTarget.xcconfig deleted file mode 100644 index 3deadcdb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/FrameworkTarget.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// FrameworkTarget.xcconfig -// -// These are Framework target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -// Dynamic libs need to be position independent -GCC_DYNAMIC_NO_PIC = NO - -// Dynamic libs should not have their external symbols stripped. -STRIP_STYLE = non-global - -// Installation Directory -INSTALL_PATH = @loader_path/../Frameworks diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/General.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/General.xcconfig deleted file mode 100644 index 9fcada16..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/General.xcconfig +++ /dev/null @@ -1,41 +0,0 @@ -// -// General.xcconfig -// -// These are General configuration settings for the gtest framework and -// examples. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -// Build for PPC and Intel, 32- and 64-bit -ARCHS = i386 x86_64 ppc ppc64 - -// Zerolink prevents link warnings so turn it off -ZERO_LINK = NO - -// Prebinding considered unhelpful in 10.3 and later -PREBINDING = NO - -// Strictest warning policy -WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare - -// Work around Xcode bugs by using external strip. See: -// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -SEPARATE_STRIP = YES - -// Force C99 dialect -GCC_C_LANGUAGE_STANDARD = c99 - -// not sure why apple defaults this on, but it's pretty risky -ALWAYS_SEARCH_USER_PATHS = NO - -// Turn on position dependent code for most cases (overridden where appropriate) -GCC_DYNAMIC_NO_PIC = YES - -// Default SDK and minimum OS version is 10.4 -SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk -MACOSX_DEPLOYMENT_TARGET = 10.4 -GCC_VERSION = 4.0 - -// VERSIONING BUILD SETTINGS (used in Info.plist) -GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalPythonTestTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalPythonTestTarget.xcconfig deleted file mode 100644 index e0044453..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalPythonTestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// InternalPythonTestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME)_ -HEADER_SEARCH_PATHS = ../ ../include diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalTestTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalTestTarget.xcconfig deleted file mode 100644 index c50fd9c5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/InternalTestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// InternalTestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME) -HEADER_SEARCH_PATHS = ../ ../include diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/ReleaseProject.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/ReleaseProject.xcconfig deleted file mode 100644 index 5349f0a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/ReleaseProject.xcconfig +++ /dev/null @@ -1,32 +0,0 @@ -// -// ReleaseProject.xcconfig -// -// These are Release Configuration project settings for the gtest framework -// and examples. It is set in the "Based On:" dropdown in the "Project" info -// dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -#include "General.xcconfig" - -// subconfig/Release.xcconfig - -// Optimize for space and size (Apple recommendation) -GCC_OPTIMIZATION_LEVEL = s - -// Deploment postprocessing is what triggers Xcode to strip -DEPLOYMENT_POSTPROCESSING = YES - -// No symbols -GCC_GENERATE_DEBUGGING_SYMBOLS = NO - -// Dead code strip does not affect ObjC code but can help for C -DEAD_CODE_STRIPPING = YES - -// NDEBUG is used by things like assert.h, so define it for general compat. -// ASSERT going away in release tends to create unused vars. -OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable - -// When we strip we want to strip all symbols in release, but save externals. -STRIP_STYLE = all diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/TestTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/TestTarget.xcconfig deleted file mode 100644 index e6652ba8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Config/TestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// TestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME) -HEADER_SEARCH_PATHS = ../include diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Resources/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Resources/Info.plist deleted file mode 100644 index 9dd28ea1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Resources/Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.${PRODUCT_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - GTEST_VERSIONINFO_LONG - CFBundleShortVersionString - GTEST_VERSIONINFO_SHORT - CFBundleGetInfoString - ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} - NSHumanReadableCopyright - ${GTEST_VERSIONINFO_ABOUT} - CSResourcesFileMapped - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/Info.plist deleted file mode 100644 index f3852ede..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.gtest.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - CSResourcesFileMapped - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.cc deleted file mode 100644 index d03ca00c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.cc +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget.cc -// - -// Widget is a very simple class used for demonstrating the use of gtest - -#include "widget.h" - -Widget::Widget(int number, const std::string& name) - : number_(number), - name_(name) {} - -Widget::~Widget() {} - -float Widget::GetFloatValue() const { - return number_; -} - -int Widget::GetIntValue() const { - return static_cast(number_); -} - -std::string Widget::GetStringValue() const { - return name_; -} - -void Widget::GetCharPtrValue(char* buffer, size_t max_size) const { - // Copy the char* representation of name_ into buffer, up to max_size. - strncpy(buffer, name_.c_str(), max_size-1); - buffer[max_size-1] = '\0'; - return; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.h deleted file mode 100644 index 59cc82cd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget.h -// - -// Widget is a very simple class used for demonstrating the use of gtest. It -// simply stores two values a string and an integer, which are returned via -// public accessors in multiple forms. - -#import - -class Widget { - public: - Widget(int number, const std::string& name); - ~Widget(); - - // Public accessors to number data - float GetFloatValue() const; - int GetIntValue() const; - - // Public accessors to the string data - std::string GetStringValue() const; - void GetCharPtrValue(char* buffer, size_t max_size) const; - - private: - // Data members - float number_; - std::string name_; -}; diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget_test.cc deleted file mode 100644 index 0a7c4f0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Samples/FrameworkSample/widget_test.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget_test.cc -// - -// This is a simple test file for the Widget class in the Widget.framework - -#include -#include - -#include - -// This test verifies that the constructor sets the internal state of the -// Widget class correctly. -TEST(WidgetInitializerTest, TestConstructor) { - Widget widget(1.0f, "name"); - EXPECT_FLOAT_EQ(1.0f, widget.GetFloatValue()); - EXPECT_EQ(std::string("name"), widget.GetStringValue()); -} - -// This test verifies the conversion of the float and string values to int and -// char*, respectively. -TEST(WidgetInitializerTest, TestConversion) { - Widget widget(1.0f, "name"); - EXPECT_EQ(1, widget.GetIntValue()); - - size_t max_size = 128; - char buffer[max_size]; - widget.GetCharPtrValue(buffer, max_size); - EXPECT_STREQ("name", buffer); -} - -// Use the Google Test main that is linked into the framework. It does something -// like this: -// int main(int argc, char** argv) { -// testing::InitGoogleTest(&argc, argv); -// return RUN_ALL_TESTS(); -// } diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/runtests.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/runtests.sh deleted file mode 100644 index 168da487..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/runtests.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# Executes the samples and tests for the Google Test Framework - -# Help the dynamic linker find the path to the framework -export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR - -# Create an array of test executables -test_executables=("$BUILT_PRODUCTS_DIR/sample1_unittest" - "$BUILT_PRODUCTS_DIR/sample2_unittest" - "$BUILT_PRODUCTS_DIR/sample3_unittest" - "$BUILT_PRODUCTS_DIR/sample4_unittest" - "$BUILT_PRODUCTS_DIR/sample5_unittest" - "$BUILT_PRODUCTS_DIR/sample6_unittest" - "$BUILT_PRODUCTS_DIR/sample7_unittest" - "$BUILT_PRODUCTS_DIR/sample8_unittest" - - "$BUILT_PRODUCTS_DIR/gtest-death-test_test" - "$BUILT_PRODUCTS_DIR/gtest_environment_test" - "$BUILT_PRODUCTS_DIR/gtest-filepath_test" - "$BUILT_PRODUCTS_DIR/gtest-linked_ptr_test" - "$BUILT_PRODUCTS_DIR/gtest_main_unittest" - "$BUILT_PRODUCTS_DIR/gtest-message_test" - "$BUILT_PRODUCTS_DIR/gtest_no_test_unittest" - "$BUILT_PRODUCTS_DIR/gtest-options_test" - "$BUILT_PRODUCTS_DIR/gtest-param-test_test" - "$BUILT_PRODUCTS_DIR/gtest-port_test" - "$BUILT_PRODUCTS_DIR/gtest_pred_impl_unittest" - "$BUILT_PRODUCTS_DIR/gtest_prod_test" - "$BUILT_PRODUCTS_DIR/gtest_repeat_test" - "$BUILT_PRODUCTS_DIR/gtest_sole_header_test" - "$BUILT_PRODUCTS_DIR/gtest_stress_test" - "$BUILT_PRODUCTS_DIR/gtest_test_part_test" - "$BUILT_PRODUCTS_DIR/gtest-typed-test_test" - "$BUILT_PRODUCTS_DIR/gtest_unittest" - - "$BUILT_PRODUCTS_DIR/gtest_break_on_failure_unittest.py" - "$BUILT_PRODUCTS_DIR/gtest_color_test.py" - "$BUILT_PRODUCTS_DIR/gtest_env_var_test.py" - "$BUILT_PRODUCTS_DIR/gtest_filter_unittest.py" - "$BUILT_PRODUCTS_DIR/gtest_list_tests_unittest.py" - "$BUILT_PRODUCTS_DIR/gtest_output_test.py" - "$BUILT_PRODUCTS_DIR/gtest_xml_outfiles_test.py" - "$BUILT_PRODUCTS_DIR/gtest_xml_output_unittest.py" - "$BUILT_PRODUCTS_DIR/gtest_uninitialized_test.py" -) - -# Now execute each one in turn keeping track of how many succeeded and failed. -succeeded=0 -failed=0 -failed_list=() -for test in ${test_executables[*]}; do - "$test" - result=$? - if [ $result -eq 0 ]; then - succeeded=$(( $succeeded + 1 )) - else - failed=$(( failed + 1 )) - failed_list="$failed_list $test" - fi -done - -# Report the successes and failures to the console -echo "Tests complete with $succeeded successes and $failed failures." -if [ $failed -ne 0 ]; then - echo "The following tests failed:" - echo $failed_list -fi -exit $failed diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/versiongenerate.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/versiongenerate.py deleted file mode 100644 index 3b19a96b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/gtest/xcode/Scripts/versiongenerate.py +++ /dev/null @@ -1,71 +0,0 @@ -#/usr/bin/python - -"""A script to prepare version informtion for use the gtest Info.plist file. - - This script extracts the version information from the configure.ac file and - uses it to generate a header file containing the same information. The - #defines in this header file will be included in during the generation of - the Info.plist of the framework, giving the correct value to the version - shown in the Finder. - - This script makes the following assumptions (these are faults of the script, - not problems with the Autoconf): - 1. The AC_INIT macro will be contained within the first 1024 characters - of configure.ac - 2. The version string will be 3 integers separated by periods and will be - surrounded by squre brackets, "[" and "]" (e.g. [1.0.1]). The first - segment represents the major version, the second represents the minor - version and the third represents the fix version. - 3. No ")" character exists between the opening "(" and closing ")" of - AC_INIT, including in comments and character strings. -""" - -import sys -import re - -# Read the command line argument (the output directory for Version.h) -if (len(sys.argv) < 3): - print "Usage: /usr/bin/python versiongenerate.py input_dir output_dir" - sys.exit(1) -else: - input_dir = sys.argv[1] - output_dir = sys.argv[2] - -# Read the first 1024 characters of the configure.ac file -config_file = open("%s/configure.ac" % input_dir, 'r') -buffer_size = 1024 -opening_string = config_file.read(buffer_size) -config_file.close() - -# Extract the version string from the AC_INIT macro -# The following init_expression means: -# Extract three integers separated by periods and surrounded by squre -# brackets(e.g. "[1.0.1]") between "AC_INIT(" and ")". Do not be greedy -# (*? is the non-greedy flag) since that would pull in everything between -# the first "(" and the last ")" in the file. -version_expression = re.compile(r"AC_INIT\(.*?\[(\d+)\.(\d+)\.(\d+)\].*?\)", - re.DOTALL) -version_values = version_expression.search(opening_string) -major_version = version_values.group(1) -minor_version = version_values.group(2) -fix_version = version_values.group(3) - -# Write the version information to a header file to be included in the -# Info.plist file. -file_data = """// -// DO NOT MODIFY THIS FILE (but you can delete it) -// -// This file is autogenerated by the versiongenerate.py script. This script -// is executed in a "Run Script" build phase when creating gtest.framework. This -// header file is not used during compilation of C-source. Rather, it simply -// defines some version strings for substitution in the Info.plist. Because of -// this, we are not not restricted to C-syntax nor are we using include guards. -// - -#define GTEST_VERSIONINFO_SHORT %s.%s -#define GTEST_VERSIONINFO_LONG %s.%s.%s - -""" % (major_version, minor_version, major_version, minor_version, fix_version) -version_file = open("%s/Version.h" % output_dir, 'w') -version_file.write(file_data) -version_file.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-actions.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-actions.h deleted file mode 100644 index a283ed73..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-actions.h +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used actions. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ - -#include -#include - -#ifndef _WIN32_WCE -#include -#endif - -#include -#include - -namespace testing { - -// To implement an action Foo, define: -// 1. a class FooAction that implements the ActionInterface interface, and -// 2. a factory function that creates an Action object from a -// const FooAction*. -// -// The two-level delegation design follows that of Matcher, providing -// consistency for extension developers. It also eases ownership -// management as Action objects can now be copied like plain values. - -namespace internal { - -template -class MonomorphicDoDefaultActionImpl; - -template -class ActionAdaptor; - -// BuiltInDefaultValue::Get() returns the "built-in" default -// value for type T, which is NULL when T is a pointer type, 0 when T -// is a numeric type, false when T is bool, or "" when T is string or -// std::string. For any other type T, this value is undefined and the -// function will abort the process. -template -class BuiltInDefaultValue { - public: - // This function returns true iff type T has a built-in default value. - static bool Exists() { return false; } - static T Get() { - Assert(false, __FILE__, __LINE__, - "Default action undefined for the function return type."); - return internal::Invalid(); - // The above statement will never be reached, but is required in - // order for this function to compile. - } -}; - -// This partial specialization says that we use the same built-in -// default value for T and const T. -template -class BuiltInDefaultValue { - public: - static bool Exists() { return BuiltInDefaultValue::Exists(); } - static T Get() { return BuiltInDefaultValue::Get(); } -}; - -// This partial specialization defines the default values for pointer -// types. -template -class BuiltInDefaultValue { - public: - static bool Exists() { return true; } - static T* Get() { return NULL; } -}; - -// The following specializations define the default values for -// specific types we care about. -#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \ - template <> \ - class BuiltInDefaultValue { \ - public: \ - static bool Exists() { return true; } \ - static type Get() { return value; } \ - } - -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT -#if GTEST_HAS_GLOBAL_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, ""); -#endif // GTEST_HAS_GLOBAL_STRING -#if GTEST_HAS_STD_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, ""); -#endif // GTEST_HAS_STD_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0'); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0'); - -// signed wchar_t and unsigned wchar_t are NOT in the C++ standard. -// Using them is a bad practice and not portable. So don't use them. -// -// Still, Google Mock is designed to work even if the user uses signed -// wchar_t or unsigned wchar_t (obviously, assuming the compiler -// supports them). -// -// To gcc, -// -// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int -// -// MSVC does not recognize signed wchar_t or unsigned wchar_t. It -// treats wchar_t as a native type usually, but treats it as the same -// as unsigned short when the compiler option /Zc:wchar_t- is -// specified. -// -// Therefore we provide a default action for wchar_t when compiled -// with gcc or _NATIVE_WCHAR_T_DEFINED is defined. -// -// There's no need for a default action for signed wchar_t, as that -// type is the same as wchar_t for gcc, and invalid for MSVC. -// -// There's also no need for a default action for unsigned wchar_t, as -// that type is the same as unsigned int for gcc, and invalid for -// MSVC. -#if defined(__GNUC__) || defined(_NATIVE_WCHAR_T_DEFINED) -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT -#endif - -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); - -#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ - -} // namespace internal - -// When an unexpected function call is encountered, Google Mock will -// let it return a default value if the user has specified one for its -// return type, or if the return type has a built-in default value; -// otherwise Google Mock won't know what value to return and will have -// to abort the process. -// -// The DefaultValue class allows a user to specify the -// default value for a type T that is both copyable and publicly -// destructible (i.e. anything that can be used as a function return -// type). The usage is: -// -// // Sets the default value for type T to be foo. -// DefaultValue::Set(foo); -template -class DefaultValue { - public: - // Sets the default value for type T; requires T to be - // copy-constructable and have a public destructor. - static void Set(T x) { - delete value_; - value_ = new T(x); - } - - // Unsets the default value for type T. - static void Clear() { - delete value_; - value_ = NULL; - } - - // Returns true iff the user has set the default value for type T. - static bool IsSet() { return value_ != NULL; } - - // Returns true if T has a default return value set by the user or there - // exists a built-in default value. - static bool Exists() { - return IsSet() || internal::BuiltInDefaultValue::Exists(); - } - - // Returns the default value for type T if the user has set one; - // otherwise returns the built-in default value if there is one; - // otherwise aborts the process. - static T Get() { - return value_ == NULL ? - internal::BuiltInDefaultValue::Get() : *value_; - } - private: - static const T* value_; -}; - -// This partial specialization allows a user to set default values for -// reference types. -template -class DefaultValue { - public: - // Sets the default value for type T&. - static void Set(T& x) { // NOLINT - address_ = &x; - } - - // Unsets the default value for type T&. - static void Clear() { - address_ = NULL; - } - - // Returns true iff the user has set the default value for type T&. - static bool IsSet() { return address_ != NULL; } - - // Returns true if T has a default return value set by the user or there - // exists a built-in default value. - static bool Exists() { - return IsSet() || internal::BuiltInDefaultValue::Exists(); - } - - // Returns the default value for type T& if the user has set one; - // otherwise returns the built-in default value if there is one; - // otherwise aborts the process. - static T& Get() { - return address_ == NULL ? - internal::BuiltInDefaultValue::Get() : *address_; - } - private: - static T* address_; -}; - -// This specialization allows DefaultValue::Get() to -// compile. -template <> -class DefaultValue { - public: - static bool Exists() { return true; } - static void Get() {} -}; - -// Points to the user-set default value for type T. -template -const T* DefaultValue::value_ = NULL; - -// Points to the user-set default value for type T&. -template -T* DefaultValue::address_ = NULL; - -// Implement this interface to define an action for function type F. -template -class ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - ActionInterface() : is_do_default_(false) {} - - virtual ~ActionInterface() {} - - // Performs the action. This method is not const, as in general an - // action can have side effects and be stateful. For example, a - // get-the-next-element-from-the-collection action will need to - // remember the current element. - virtual Result Perform(const ArgumentTuple& args) = 0; - - // Returns true iff this is the DoDefault() action. - bool IsDoDefault() const { return is_do_default_; } - private: - template - friend class internal::MonomorphicDoDefaultActionImpl; - - // This private constructor is reserved for implementing - // DoDefault(), the default action for a given mock function. - explicit ActionInterface(bool is_do_default) - : is_do_default_(is_do_default) {} - - // True iff this action is DoDefault(). - const bool is_do_default_; -}; - -// An Action is a copyable and IMMUTABLE (except by assignment) -// object that represents an action to be taken when a mock function -// of type F is called. The implementation of Action is just a -// linked_ptr to const ActionInterface, so copying is fairly cheap. -// Don't inherit from Action! -// -// You can view an object implementing ActionInterface as a -// concrete action (including its current state), and an Action -// object as a handle to it. -template -class Action { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - // Constructs a null Action. Needed for storing Action objects in - // STL containers. - Action() : impl_(NULL) {} - - // Constructs an Action from its implementation. - explicit Action(ActionInterface* impl) : impl_(impl) {} - - // Copy constructor. - Action(const Action& action) : impl_(action.impl_) {} - - // This constructor allows us to turn an Action object into an - // Action, as long as F's arguments can be implicitly converted - // to Func's and Func's return type cann be implicitly converted to - // F's. - template - explicit Action(const Action& action); - - // Returns true iff this is the DoDefault() action. - bool IsDoDefault() const { return impl_->IsDoDefault(); } - - // Performs the action. Note that this method is const even though - // the corresponding method in ActionInterface is not. The reason - // is that a const Action means that it cannot be re-bound to - // another concrete action, not that the concrete action it binds to - // cannot change state. (Think of the difference between a const - // pointer and a pointer to const.) - Result Perform(const ArgumentTuple& args) const { - return impl_->Perform(args); - } - private: - template - friend class internal::ActionAdaptor; - - internal::linked_ptr > impl_; -}; - -// The PolymorphicAction class template makes it easy to implement a -// polymorphic action (i.e. an action that can be used in mock -// functions of than one type, e.g. Return()). -// -// To define a polymorphic action, a user first provides a COPYABLE -// implementation class that has a Perform() method template: -// -// class FooAction { -// public: -// template -// Result Perform(const ArgumentTuple& args) const { -// // Processes the arguments and returns a result, using -// // tr1::get(args) to get the N-th (0-based) argument in the tuple. -// } -// ... -// }; -// -// Then the user creates the polymorphic action using -// MakePolymorphicAction(object) where object has type FooAction. See -// the definition of Return(void) and SetArgumentPointee(value) for -// complete examples. -template -class PolymorphicAction { - public: - explicit PolymorphicAction(const Impl& impl) : impl_(impl) {} - - template - operator Action() const { - return Action(new MonomorphicImpl(impl_)); - } - private: - template - class MonomorphicImpl : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} - - virtual Result Perform(const ArgumentTuple& args) { - return impl_.template Perform(args); - } - - private: - Impl impl_; - }; - - Impl impl_; -}; - -// Creates an Action from its implementation and returns it. The -// created Action object owns the implementation. -template -Action MakeAction(ActionInterface* impl) { - return Action(impl); -} - -// Creates a polymorphic action from its implementation. This is -// easier to use than the PolymorphicAction constructor as it -// doesn't require you to explicitly write the template argument, e.g. -// -// MakePolymorphicAction(foo); -// vs -// PolymorphicAction(foo); -template -inline PolymorphicAction MakePolymorphicAction(const Impl& impl) { - return PolymorphicAction(impl); -} - -namespace internal { - -// Allows an Action object to pose as an Action, as long as F2 -// and F1 are compatible. -template -class ActionAdaptor : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit ActionAdaptor(const Action& from) : impl_(from.impl_) {} - - virtual Result Perform(const ArgumentTuple& args) { - return impl_->Perform(args); - } - private: - const internal::linked_ptr > impl_; -}; - -// Implements the polymorphic Return(x) action, which can be used in -// any function that returns the type of x, regardless of the argument -// types. -template -class ReturnAction { - public: - // Constructs a ReturnAction object from the value to be returned. - // 'value' is passed by value instead of by const reference in order - // to allow Return("string literal") to compile. - explicit ReturnAction(R value) : value_(value) {} - - // This template type conversion operator allows Return(x) to be - // used in ANY function that returns x's type. - template - operator Action() const { - // Assert statement belongs here because this is the best place to verify - // conditions on F. It produces the clearest error messages - // in most compilers. - // Impl really belongs in this scope as a local class but can't - // because MSVC produces duplicate symbols in different translation units - // in this case. Until MS fixes that bug we put Impl into the class scope - // and put the typedef both here (for use in assert statement) and - // in the Impl class. But both definitions must be the same. - typedef typename Function::Result Result; - GMOCK_COMPILE_ASSERT_( - !internal::is_reference::value, - use_ReturnRef_instead_of_Return_to_return_a_reference); - return Action(new Impl(value_)); - } - private: - // Implements the Return(x) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(R value) : value_(value) {} - - virtual Result Perform(const ArgumentTuple&) { return value_; } - - private: - R value_; - }; - - R value_; -}; - -// Implements the ReturnNull() action. -class ReturnNullAction { - public: - // Allows ReturnNull() to be used in any pointer-returning function. - template - static Result Perform(const ArgumentTuple&) { - GMOCK_COMPILE_ASSERT_(internal::is_pointer::value, - ReturnNull_can_be_used_to_return_a_pointer_only); - return NULL; - } -}; - -// Implements the Return() action. -class ReturnVoidAction { - public: - // Allows Return() to be used in any void-returning function. - template - static void Perform(const ArgumentTuple&) { - CompileAssertTypesEqual(); - } -}; - -// Implements the polymorphic ReturnRef(x) action, which can be used -// in any function that returns a reference to the type of x, -// regardless of the argument types. -template -class ReturnRefAction { - public: - // Constructs a ReturnRefAction object from the reference to be returned. - explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT - - // This template type conversion operator allows ReturnRef(x) to be - // used in ANY function that returns a reference to x's type. - template - operator Action() const { - typedef typename Function::Result Result; - // Asserts that the function return type is a reference. This - // catches the user error of using ReturnRef(x) when Return(x) - // should be used, and generates some helpful error message. - GMOCK_COMPILE_ASSERT_(internal::is_reference::value, - use_Return_instead_of_ReturnRef_to_return_a_value); - return Action(new Impl(ref_)); - } - private: - // Implements the ReturnRef(x) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(T& ref) : ref_(ref) {} // NOLINT - - virtual Result Perform(const ArgumentTuple&) { - return ref_; - } - private: - T& ref_; - }; - - T& ref_; -}; - -// Implements the DoDefault() action for a particular function type F. -template -class MonomorphicDoDefaultActionImpl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - MonomorphicDoDefaultActionImpl() : ActionInterface(true) {} - - // For technical reasons, DoDefault() cannot be used inside a - // composite action (e.g. DoAll(...)). It can only be used at the - // top level in an EXPECT_CALL(). If this function is called, the - // user must be using DoDefault() inside a composite action, and we - // have to generate a run-time error. - virtual Result Perform(const ArgumentTuple&) { - Assert(false, __FILE__, __LINE__, - "You are using DoDefault() inside a composite action like " - "DoAll() or WithArgs(). This is not supported for technical " - "reasons. Please instead spell out the default action, or " - "assign the default action to an Action variable and use " - "the variable in various places."); - return internal::Invalid(); - // The above statement will never be reached, but is required in - // order for this function to compile. - } -}; - -// Implements the polymorphic DoDefault() action. -class DoDefaultAction { - public: - // This template type conversion operator allows DoDefault() to be - // used in any function. - template - operator Action() const { - return Action(new MonomorphicDoDefaultActionImpl); - } -}; - -// Implements the Assign action to set a given pointer referent to a -// particular value. -template -class AssignAction { - public: - AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {} - - template - void Perform(const ArgumentTuple& /* args */) const { - *ptr_ = value_; - } - private: - T1* const ptr_; - const T2 value_; -}; - -#ifndef _WIN32_WCE - -// Implements the SetErrnoAndReturn action to simulate return from -// various system calls and libc functions. -template -class SetErrnoAndReturnAction { - public: - SetErrnoAndReturnAction(int errno_value, T result) - : errno_(errno_value), - result_(result) {} - template - Result Perform(const ArgumentTuple& /* args */) const { - errno = errno_; - return result_; - } - private: - const int errno_; - const T result_; -}; - -#endif // _WIN32_WCE - -// Implements the SetArgumentPointee(x) action for any function -// whose N-th argument (0-based) is a pointer to x's type. The -// template parameter kIsProto is true iff type A is ProtocolMessage, -// proto2::Message, or a sub-class of those. -template -class SetArgumentPointeeAction { - public: - // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'value'. - explicit SetArgumentPointeeAction(const A& value) : value_(value) {} - - template - void Perform(const ArgumentTuple& args) const { - CompileAssertTypesEqual(); - *::std::tr1::get(args) = value_; - } - - private: - const A value_; -}; - -template -class SetArgumentPointeeAction { - public: - // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'proto'. Both ProtocolMessage and - // proto2::Message have the CopyFrom() method, so the same - // implementation works for both. - explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) { - proto_->CopyFrom(proto); - } - - template - void Perform(const ArgumentTuple& args) const { - CompileAssertTypesEqual(); - ::std::tr1::get(args)->CopyFrom(*proto_); - } - private: - const internal::linked_ptr proto_; -}; - -// Implements the SetArrayArgument(first, last) action for any function -// whose N-th argument (0-based) is a pointer or iterator to a type that can be -// implicitly converted from *first. -template -class SetArrayArgumentAction { - public: - // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'value'. - explicit SetArrayArgumentAction(InputIterator first, InputIterator last) - : first_(first), last_(last) { - } - - template - void Perform(const ArgumentTuple& args) const { - CompileAssertTypesEqual(); - - // Microsoft compiler deprecates ::std::copy, so we want to suppress warning - // 4996 (Function call with parameters that may be unsafe) there. -#if GTEST_OS_WINDOWS -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. -#endif // GTEST_OS_WINDOWS - ::std::copy(first_, last_, ::std::tr1::get(args)); -#if GTEST_OS_WINDOWS -#pragma warning(pop) // Restores the warning state. -#endif // GTEST_OS_WINDOWS - } - - private: - const InputIterator first_; - const InputIterator last_; -}; - -// Implements the InvokeWithoutArgs(f) action. The template argument -// FunctionImpl is the implementation type of f, which can be either a -// function pointer or a functor. InvokeWithoutArgs(f) can be used as an -// Action as long as f's type is compatible with F (i.e. f can be -// assigned to a tr1::function). -template -class InvokeWithoutArgsAction { - public: - // The c'tor makes a copy of function_impl (either a function - // pointer or a functor). - explicit InvokeWithoutArgsAction(FunctionImpl function_impl) - : function_impl_(function_impl) {} - - // Allows InvokeWithoutArgs(f) to be used as any action whose type is - // compatible with f. - template - Result Perform(const ArgumentTuple&) { return function_impl_(); } - private: - FunctionImpl function_impl_; -}; - -// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action. -template -class InvokeMethodWithoutArgsAction { - public: - InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr) - : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} - - template - Result Perform(const ArgumentTuple&) const { - return (obj_ptr_->*method_ptr_)(); - } - private: - Class* const obj_ptr_; - const MethodPtr method_ptr_; -}; - -// Implements the IgnoreResult(action) action. -template -class IgnoreResultAction { - public: - explicit IgnoreResultAction(const A& action) : action_(action) {} - - template - operator Action() const { - // Assert statement belongs here because this is the best place to verify - // conditions on F. It produces the clearest error messages - // in most compilers. - // Impl really belongs in this scope as a local class but can't - // because MSVC produces duplicate symbols in different translation units - // in this case. Until MS fixes that bug we put Impl into the class scope - // and put the typedef both here (for use in assert statement) and - // in the Impl class. But both definitions must be the same. - typedef typename internal::Function::Result Result; - - // Asserts at compile time that F returns void. - CompileAssertTypesEqual(); - - return Action(new Impl(action_)); - } - private: - template - class Impl : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const A& action) : action_(action) {} - - virtual void Perform(const ArgumentTuple& args) { - // Performs the action and ignores its result. - action_.Perform(args); - } - - private: - // Type OriginalFunction is the same as F except that its return - // type is IgnoredValue. - typedef typename internal::Function::MakeResultIgnoredValue - OriginalFunction; - - const Action action_; - }; - - const A action_; -}; - -} // namespace internal - -// An Unused object can be implicitly constructed from ANY value. -// This is handy when defining actions that ignore some or all of the -// mock function arguments. For example, given -// -// MOCK_METHOD3(Foo, double(const string& label, double x, double y)); -// MOCK_METHOD3(Bar, double(int index, double x, double y)); -// -// instead of -// -// double DistanceToOriginWithLabel(const string& label, double x, double y) { -// return sqrt(x*x + y*y); -// } -// double DistanceToOriginWithIndex(int index, double x, double y) { -// return sqrt(x*x + y*y); -// } -// ... -// EXEPCT_CALL(mock, Foo("abc", _, _)) -// .WillOnce(Invoke(DistanceToOriginWithLabel)); -// EXEPCT_CALL(mock, Bar(5, _, _)) -// .WillOnce(Invoke(DistanceToOriginWithIndex)); -// -// you could write -// -// // We can declare any uninteresting argument as Unused. -// double DistanceToOrigin(Unused, double x, double y) { -// return sqrt(x*x + y*y); -// } -// ... -// EXEPCT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); -// EXEPCT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); -typedef internal::IgnoredValue Unused; - -// This constructor allows us to turn an Action object into an -// Action, as long as To's arguments can be implicitly converted -// to From's and From's return type cann be implicitly converted to -// To's. -template -template -Action::Action(const Action& from) - : impl_(new internal::ActionAdaptor(from)) {} - -// Creates an action that returns 'value'. 'value' is passed by value -// instead of const reference - otherwise Return("string literal") -// will trigger a compiler error about using array as initializer. -template -internal::ReturnAction Return(R value) { - return internal::ReturnAction(value); -} - -// Creates an action that returns NULL. -inline PolymorphicAction ReturnNull() { - return MakePolymorphicAction(internal::ReturnNullAction()); -} - -// Creates an action that returns from a void function. -inline PolymorphicAction Return() { - return MakePolymorphicAction(internal::ReturnVoidAction()); -} - -// Creates an action that returns the reference to a variable. -template -inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT - return internal::ReturnRefAction(x); -} - -// Creates an action that does the default action for the give mock function. -inline internal::DoDefaultAction DoDefault() { - return internal::DoDefaultAction(); -} - -// Creates an action that sets the variable pointed by the N-th -// (0-based) function argument to 'value'. -template -PolymorphicAction< - internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value> > -SetArgumentPointee(const T& x) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value>(x)); -} - -// Creates an action that sets the elements of the array pointed to by the N-th -// (0-based) function argument, which can be either a pointer or an iterator, -// to the values of the elements in the source range [first, last). -template -PolymorphicAction > -SetArrayArgument(InputIterator first, InputIterator last) { - return MakePolymorphicAction(internal::SetArrayArgumentAction< - N, InputIterator>(first, last)); -} - -// Creates an action that sets a pointer referent to a given value. -template -PolymorphicAction > Assign(T1* ptr, T2 val) { - return MakePolymorphicAction(internal::AssignAction(ptr, val)); -} - -#ifndef _WIN32_WCE - -// Creates an action that sets errno and returns the appropriate error. -template -PolymorphicAction > -SetErrnoAndReturn(int errval, T result) { - return MakePolymorphicAction( - internal::SetErrnoAndReturnAction(errval, result)); -} - -#endif // _WIN32_WCE - -// Various overloads for InvokeWithoutArgs(). - -// Creates an action that invokes 'function_impl' with no argument. -template -PolymorphicAction > -InvokeWithoutArgs(FunctionImpl function_impl) { - return MakePolymorphicAction( - internal::InvokeWithoutArgsAction(function_impl)); -} - -// Creates an action that invokes the given method on the given object -// with no argument. -template -PolymorphicAction > -InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) { - return MakePolymorphicAction( - internal::InvokeMethodWithoutArgsAction( - obj_ptr, method_ptr)); -} - -// Creates an action that performs an_action and throws away its -// result. In other words, it changes the return type of an_action to -// void. an_action MUST NOT return void, or the code won't compile. -template -inline internal::IgnoreResultAction IgnoreResult(const A& an_action) { - return internal::IgnoreResultAction(an_action); -} - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-cardinalities.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-cardinalities.h deleted file mode 100644 index ae4cb641..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-cardinalities.h +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used cardinalities. More -// cardinalities can be defined by the user implementing the -// CardinalityInterface interface if necessary. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ - -#include -#include // NOLINT -#include -#include - -namespace testing { - -// To implement a cardinality Foo, define: -// 1. a class FooCardinality that implements the -// CardinalityInterface interface, and -// 2. a factory function that creates a Cardinality object from a -// const FooCardinality*. -// -// The two-level delegation design follows that of Matcher, providing -// consistency for extension developers. It also eases ownership -// management as Cardinality objects can now be copied like plain values. - -// The implementation of a cardinality. -class CardinalityInterface { - public: - virtual ~CardinalityInterface() {} - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. - virtual int ConservativeLowerBound() const { return 0; } - virtual int ConservativeUpperBound() const { return INT_MAX; } - - // Returns true iff call_count calls will satisfy this cardinality. - virtual bool IsSatisfiedByCallCount(int call_count) const = 0; - - // Returns true iff call_count calls will saturate this cardinality. - virtual bool IsSaturatedByCallCount(int call_count) const = 0; - - // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; -}; - -// A Cardinality is a copyable and IMMUTABLE (except by assignment) -// object that specifies how many times a mock function is expected to -// be called. The implementation of Cardinality is just a linked_ptr -// to const CardinalityInterface, so copying is fairly cheap. -// Don't inherit from Cardinality! -class Cardinality { - public: - // Constructs a null cardinality. Needed for storing Cardinality - // objects in STL containers. - Cardinality() {} - - // Constructs a Cardinality from its implementation. - explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {} - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. - int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); } - int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } - - // Returns true iff call_count calls will satisfy this cardinality. - bool IsSatisfiedByCallCount(int call_count) const { - return impl_->IsSatisfiedByCallCount(call_count); - } - - // Returns true iff call_count calls will saturate this cardinality. - bool IsSaturatedByCallCount(int call_count) const { - return impl_->IsSaturatedByCallCount(call_count); - } - - // Returns true iff call_count calls will over-saturate this - // cardinality, i.e. exceed the maximum number of allowed calls. - bool IsOverSaturatedByCallCount(int call_count) const { - return impl_->IsSaturatedByCallCount(call_count) && - !impl_->IsSatisfiedByCallCount(call_count); - } - - // Describes self to an ostream - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } - - // Describes the given actual call count to an ostream. - static void DescribeActualCallCountTo(int actual_call_count, - ::std::ostream* os); - private: - internal::linked_ptr impl_; -}; - -// Creates a cardinality that allows at least n calls. -Cardinality AtLeast(int n); - -// Creates a cardinality that allows at most n calls. -Cardinality AtMost(int n); - -// Creates a cardinality that allows any number of calls. -Cardinality AnyNumber(); - -// Creates a cardinality that allows between min and max calls. -Cardinality Between(int min, int max); - -// Creates a cardinality that allows exactly n calls. -Cardinality Exactly(int n); - -// Creates a cardinality from its implementation. -inline Cardinality MakeCardinality(const CardinalityInterface* c) { - return Cardinality(c); -} - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h deleted file mode 100644 index fa02faaa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h +++ /dev/null @@ -1,2562 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic actions. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ - -#include -#include - -namespace testing { -namespace internal { - -// InvokeHelper knows how to unpack an N-tuple and invoke an N-ary -// function or method with the unpacked values, where F is a function -// type that takes N arguments. -template -class InvokeHelper; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple<>&) { - return function(); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple<>&) { - return (obj_ptr->*method_ptr)(); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), - get<8>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - get<9>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), - get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), - get<8>(args), get<9>(args)); - } -}; - - -// Implements the Invoke(f) action. The template argument -// FunctionImpl is the implementation type of f, which can be either a -// function pointer or a functor. Invoke(f) can be used as an -// Action as long as f's type is compatible with F (i.e. f can be -// assigned to a tr1::function). -template -class InvokeAction { - public: - // The c'tor makes a copy of function_impl (either a function - // pointer or a functor). - explicit InvokeAction(FunctionImpl function_impl) - : function_impl_(function_impl) {} - - template - Result Perform(const ArgumentTuple& args) { - return InvokeHelper::Invoke(function_impl_, args); - } - private: - FunctionImpl function_impl_; -}; - -// Implements the Invoke(object_ptr, &Class::Method) action. -template -class InvokeMethodAction { - public: - InvokeMethodAction(Class* obj_ptr, MethodPtr method_ptr) - : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} - - template - Result Perform(const ArgumentTuple& args) const { - return InvokeHelper::InvokeMethod( - obj_ptr_, method_ptr_, args); - } - private: - Class* const obj_ptr_; - const MethodPtr method_ptr_; -}; - -// A ReferenceWrapper object represents a reference to type T, -// which can be either const or not. It can be explicitly converted -// from, and implicitly converted to, a T&. Unlike a reference, -// ReferenceWrapper can be copied and can survive template type -// inference. This is used to support by-reference arguments in the -// InvokeArgument(...) action. The idea was from "reference -// wrappers" in tr1, which we don't have in our source tree yet. -template -class ReferenceWrapper { - public: - // Constructs a ReferenceWrapper object from a T&. - explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT - - // Allows a ReferenceWrapper object to be implicitly converted to - // a T&. - operator T&() const { return *pointer_; } - private: - T* pointer_; -}; - -// CallableHelper has static methods for invoking "callables", -// i.e. function pointers and functors. It uses overloading to -// provide a uniform interface for invoking different kinds of -// callables. In particular, you can use: -// -// CallableHelper::Call(callable, a1, a2, ..., an) -// -// to invoke an n-ary callable, where R is its return type. If an -// argument, say a2, needs to be passed by reference, you should write -// ByRef(a2) instead of a2 in the above expression. -template -class CallableHelper { - public: - // Calls a nullary callable. - template - static R Call(Function function) { return function(); } - - // Calls a unary callable. - - // We deliberately pass a1 by value instead of const reference here - // in case it is a C-string literal. If we had declared the - // parameter as 'const A1& a1' and write Call(function, "Hi"), the - // compiler would've thought A1 is 'char[3]', which causes trouble - // when you need to copy a value of type A1. By declaring the - // parameter as 'A1 a1', the compiler will correctly infer that A1 - // is 'const char*' when it sees Call(function, "Hi"). - // - // Since this function is defined inline, the compiler can get rid - // of the copying of the arguments. Therefore the performance won't - // be hurt. - template - static R Call(Function function, A1 a1) { return function(a1); } - - // Calls a binary callable. - template - static R Call(Function function, A1 a1, A2 a2) { - return function(a1, a2); - } - - // Calls a ternary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3) { - return function(a1, a2, a3); - } - - // Calls a 4-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4) { - return function(a1, a2, a3, a4); - } - - // Calls a 5-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - return function(a1, a2, a3, a4, a5); - } - - // Calls a 6-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - return function(a1, a2, a3, a4, a5, a6); - } - - // Calls a 7-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7) { - return function(a1, a2, a3, a4, a5, a6, a7); - } - - // Calls a 8-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8) { - return function(a1, a2, a3, a4, a5, a6, a7, a8); - } - - // Calls a 9-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9) { - return function(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - - // Calls a 10-ary callable. - template - static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9, A10 a10) { - return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - } - -}; // class CallableHelper - -// An INTERNAL macro for extracting the type of a tuple field. It's -// subject to change without notice - DO NOT USE IN USER CODE! -#define GMOCK_FIELD_(Tuple, N) \ - typename ::std::tr1::tuple_element::type - -// SelectArgs::type is the -// type of an n-ary function whose i-th (1-based) argument type is the -// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple -// type, and whose return type is Result. For example, -// SelectArgs, 0, 3>::type -// is int(bool, long). -// -// SelectArgs::Select(args) -// returns the selected fields (k1, k2, ..., k_n) of args as a tuple. -// For example, -// SelectArgs, 2, 0>::Select( -// ::std::tr1::make_tuple(true, 'a', 2.5)) -// returns ::std::tr1::tuple (2.5, true). -// -// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be -// in the range [0, 10]. Duplicates are allowed and they don't have -// to be in an ascending or descending order. - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), - GMOCK_FIELD_(ArgumentTuple, k10)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args), get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& /* args */) { - using ::std::tr1::get; - return SelectedArgs(); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs(get(args), get(args), get(args), - get(args), get(args), get(args), get(args), - get(args), get(args)); - } -}; - -#undef GMOCK_FIELD_ - -// Implements the WithArgs action. -template -class WithArgsAction { - public: - explicit WithArgsAction(const InnerAction& action) : action_(action) {} - - template - operator Action() const { return MakeAction(new Impl(action_)); } - - private: - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const InnerAction& action) : action_(action) {} - - virtual Result Perform(const ArgumentTuple& args) { - return action_.Perform(SelectArgs::Select(args)); - } - - private: - typedef typename SelectArgs::type InnerFunctionType; - - Action action_; - }; - - const InnerAction action_; -}; - -// Does two actions sequentially. Used for implementing the DoAll(a1, -// a2, ...) action. -template -class DoBothAction { - public: - DoBothAction(Action1 action1, Action2 action2) - : action1_(action1), action2_(action2) {} - - // This template type conversion operator allows DoAll(a1, ..., a_n) - // to be used in ANY function of compatible type. - template - operator Action() const { - return Action(new Impl(action1_, action2_)); - } - - private: - // Implements the DoAll(...) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::MakeResultVoid VoidResult; - - Impl(const Action& action1, const Action& action2) - : action1_(action1), action2_(action2) {} - - virtual Result Perform(const ArgumentTuple& args) { - action1_.Perform(args); - return action2_.Perform(args); - } - - private: - const Action action1_; - const Action action2_; - }; - - Action1 action1_; - Action2 action2_; -}; - -// A macro from the ACTION* family (defined later in this file) -// defines an action that can be used in a mock function. Typically, -// these actions only care about a subset of the arguments of the mock -// function. For example, if such an action only uses the second -// argument, it can be used in any mock function that takes >= 2 -// arguments where the type of the second argument is compatible. -// -// Therefore, the action implementation must be prepared to take more -// arguments than it needs. The ExcessiveArg type is used to -// represent those excessive arguments. In order to keep the compiler -// error messages tractable, we define it in the testing namespace -// instead of testing::internal. However, this is an INTERNAL TYPE -// and subject to change without notice, so a user MUST NOT USE THIS -// TYPE DIRECTLY. -struct ExcessiveArg {}; - -// A helper class needed for implementing the ACTION* macros. -template -class ActionHelper { - public: - static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl<>(args, ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), - get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), - get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), - get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, - get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, - get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), - get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, - get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), - get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), - get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - get<9>(args)); - } -}; - -} // namespace internal - -// Various overloads for Invoke(). - -// Creates an action that invokes 'function_impl' with the mock -// function's arguments. -template -PolymorphicAction > Invoke( - FunctionImpl function_impl) { - return MakePolymorphicAction( - internal::InvokeAction(function_impl)); -} - -// Creates an action that invokes the given method on the given object -// with the mock function's arguments. -template -PolymorphicAction > Invoke( - Class* obj_ptr, MethodPtr method_ptr) { - return MakePolymorphicAction( - internal::InvokeMethodAction(obj_ptr, method_ptr)); -} - -// Creates a reference wrapper for the given L-value. If necessary, -// you can explicitly specify the type of the reference. For example, -// suppose 'derived' is an object of type Derived, ByRef(derived) -// would wrap a Derived&. If you want to wrap a const Base& instead, -// where Base is a base class of Derived, just write: -// -// ByRef(derived) -template -inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT - return internal::ReferenceWrapper(l_value); -} - -// WithoutArgs(inner_action) can be used in a mock function with a -// non-empty argument list to perform inner_action, which takes no -// argument. In other words, it adapts an action accepting no -// argument to one that accepts (and ignores) arguments. -template -inline internal::WithArgsAction -WithoutArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// WithArg(an_action) creates an action that passes the k-th -// (0-based) argument of the mock function to an_action and performs -// it. It adapts an action accepting one argument to one that accepts -// multiple arguments. For convenience, we also provide -// WithArgs(an_action) (defined below) as a synonym. -template -inline internal::WithArgsAction -WithArg(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// WithArgs(an_action) creates an action that passes -// the selected arguments of the mock function to an_action and -// performs it. It serves as an adaptor between actions with -// different argument lists. C++ doesn't support default arguments for -// function templates, so we have to overload it. -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// Creates an action that does actions a1, a2, ..., sequentially in -// each invocation. -template -inline internal::DoBothAction -DoAll(Action1 a1, Action2 a2) { - return internal::DoBothAction(a1, a2); -} - -template -inline internal::DoBothAction > -DoAll(Action1 a1, Action2 a2, Action3 a3) { - return DoAll(a1, DoAll(a2, a3)); -} - -template -inline internal::DoBothAction > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) { - return DoAll(a1, DoAll(a2, a3, a4)); -} - -template -inline internal::DoBothAction > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) { - return DoAll(a1, DoAll(a2, a3, a4, a5)); -} - -template -inline internal::DoBothAction > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6)); -} - -template -inline internal::DoBothAction > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7)); -} - -template -inline internal::DoBothAction > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8)); -} - -template -inline internal::DoBothAction > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template -inline internal::DoBothAction > > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9, Action10 a10) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10)); -} - -} // namespace testing - -// The ACTION* family of macros can be used in a namespace scope to -// define custom actions easily. The syntax: -// -// ACTION(name) { statements; } -// -// will define an action with the given name that executes the -// statements. The value returned by the statements will be used as -// the return value of the action. Inside the statements, you can -// refer to the K-th (0-based) argument of the mock function by -// 'argK', and refer to its type by 'argK_type'. For example: -// -// ACTION(IncrementArg1) { -// arg1_type temp = arg1; -// return ++(*temp); -// } -// -// allows you to write -// -// ...WillOnce(IncrementArg1()); -// -// You can also refer to the entire argument tuple and its type by -// 'args' and 'args_type', and refer to the mock function type and its -// return type by 'function_type' and 'return_type'. -// -// Note that you don't need to specify the types of the mock function -// arguments. However rest assured that your code is still type-safe: -// you'll get a compiler error if *arg1 doesn't support the ++ -// operator, or if the type of ++(*arg1) isn't compatible with the -// mock function's return type, for example. -// -// Sometimes you'll want to parameterize the action. For that you can use -// another macro: -// -// ACTION_P(name, param_name) { statements; } -// -// For example: -// -// ACTION_P(Add, n) { return arg0 + n; } -// -// will allow you to write: -// -// ...WillOnce(Add(5)); -// -// Note that you don't need to provide the type of the parameter -// either. If you need to reference the type of a parameter named -// 'foo', you can write 'foo_type'. For example, in the body of -// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type -// of 'n'. -// -// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support -// multi-parameter actions. -// -// For the purpose of typing, you can view -// -// ACTION_Pk(Foo, p1, ..., pk) { ... } -// -// as shorthand for -// -// template -// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } -// -// In particular, you can provide the template type arguments -// explicitly when invoking Foo(), as in Foo(5, false); -// although usually you can rely on the compiler to infer the types -// for you automatically. You can assign the result of expression -// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. -// -// You can also overload actions with different numbers of parameters: -// -// ACTION_P(Plus, a) { ... } -// ACTION_P2(Plus, a, b) { ... } -// -// While it's tempting to always use the ACTION* macros when defining -// a new action, you should also consider implementing ActionInterface -// or using MakePolymorphicAction() instead, especially if you need to -// use the action a lot. While these approaches require more work, -// they give you more control on the types of the mock function -// arguments and the action parameters, which in general leads to -// better compiler error messages that pay off in the long run. They -// also allow overloading actions based on parameter types (as opposed -// to just based on the number of parameters). -// -// CAVEAT: -// -// ACTION*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using ACTION*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'ACTION' -// on http://code.google.com/p/googlemock/wiki/CookBook. - -// An internal macro needed for implementing ACTION*(). -#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ - const args_type& args GTEST_ATTRIBUTE_UNUSED_,\ - arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_,\ - arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_,\ - arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_,\ - arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_,\ - arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_,\ - arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_,\ - arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_,\ - arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_,\ - arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_,\ - arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_ - -// Sometimes you want to give an action explicit template parameters -// that cannot be inferred from its value parameters. ACTION() and -// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that -// and can be viewed as an extension to ACTION() and ACTION_P*(). -// -// The syntax: -// -// ACTION_TEMPLATE(ActionName, -// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), -// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } -// -// defines an action template that takes m explicit template -// parameters and n value parameters. name_i is the name of the i-th -// template parameter, and kind_i specifies whether it's a typename, -// an integral constant, or a template. p_i is the name of the i-th -// value parameter. -// -// Example: -// -// // DuplicateArg(output) converts the k-th argument of the mock -// // function to type T and copies it to *output. -// ACTION_TEMPLATE(DuplicateArg, -// HAS_2_TEMPLATE_PARAMS(int, k, typename, T), -// AND_1_VALUE_PARAMS(output)) { -// *output = T(std::tr1::get(args)); -// } -// ... -// int n; -// EXPECT_CALL(mock, Foo(_, _)) -// .WillOnce(DuplicateArg<1, unsigned char>(&n)); -// -// To create an instance of an action template, write: -// -// ActionName(v1, ..., v_n) -// -// where the ts are the template arguments and the vs are the value -// arguments. The value argument types are inferred by the compiler. -// If you want to explicitly specify the value argument types, you can -// provide additional template arguments: -// -// ActionName(v1, ..., v_n) -// -// where u_i is the desired type of v_i. -// -// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the -// number of value parameters, but not on the number of template -// parameters. Without the restriction, the meaning of the following -// is unclear: -// -// OverloadedAction(x); -// -// Are we using a single-template-parameter action where 'bool' refers -// to the type of x, or are we using a two-template-parameter action -// where the compiler is asked to infer the type of x? -// -// Implementation notes: -// -// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and -// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for -// implementing ACTION_TEMPLATE. The main trick we use is to create -// new macro invocations when expanding a macro. For example, we have -// -// #define ACTION_TEMPLATE(name, template_params, value_params) -// ... GMOCK_INTERNAL_DECL_##template_params ... -// -// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...) -// to expand to -// -// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ... -// -// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the -// preprocessor will continue to expand it to -// -// ... typename T ... -// -// This technique conforms to the C++ standard and is portable. It -// allows us to implement action templates using O(N) code, where N is -// the maximum number of template/value parameters supported. Without -// using it, we'd have to devote O(N^2) amount of code to implement all -// combinations of m and n. - -// Declares the template parameters. -#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0 -#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1) kind0 name0, kind1 name1 -#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2) kind0 name0, kind1 name1, kind2 name2 -#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \ - kind3 name3 -#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \ - kind2 name2, kind3 name3, kind4 name4 -#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \ - kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5 -#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \ - kind5 name5, kind6 name6 -#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \ - kind4 name4, kind5 name5, kind6 name6, kind7 name7 -#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \ - kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \ - kind8 name8 -#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \ - kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \ - kind6 name6, kind7 name7, kind8 name8, kind9 name9 - -// Lists the template parameters. -#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0 -#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1) name0, name1 -#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2) name0, name1, name2 -#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3) name0, name1, name2, name3 -#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \ - name4 -#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \ - name2, name3, name4, name5 -#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6) name0, name1, name2, name3, name4, name5, name6 -#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7 -#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \ - name6, name7, name8 -#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \ - name3, name4, name5, name6, name7, name8, name9 - -// Declares the types of value parameters. -#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \ - typename p0##_type, typename p1##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \ - typename p0##_type, typename p1##_type, typename p2##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type, typename p7##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type, typename p7##_type, typename p8##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \ - typename p2##_type, typename p3##_type, typename p4##_type, \ - typename p5##_type, typename p6##_type, typename p7##_type, \ - typename p8##_type, typename p9##_type - -// Initializes the value parameters. -#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\ - () -#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\ - (p0##_type gmock_p0) : p0(gmock_p0) -#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\ - (p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), p1(gmock_p1) -#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\ - (p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) -#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3) -#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) -#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) -#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) -#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7) -#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8) -#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8), p9(gmock_p9) - -// Declares the fields for storing the value parameters. -#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0; -#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \ - p1##_type p1; -#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \ - p1##_type p1; p2##_type p2; -#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \ - p1##_type p1; p2##_type p2; p3##_type p3; -#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ - p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; -#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ - p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; -#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; p6##_type p6; -#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; p6##_type p6; p7##_type p7; -#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ - p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; -#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ - p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \ - p9##_type p9; - -// Lists the value parameters. -#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0 -#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1 -#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2 -#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3 -#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \ - p2, p3, p4 -#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \ - p1, p2, p3, p4, p5 -#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0, p1, p2, p3, p4, p5, p6 -#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0, p1, p2, p3, p4, p5, p6, p7 -#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8 -#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9 - -// Lists the value parameter types. -#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \ - p1##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \ - p1##_type, p2##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ - p0##_type, p1##_type, p2##_type, p3##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ - p0##_type, p1##_type, p2##_type, p3##_type, p4##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ - p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \ - p6##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type, p8##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type, p8##_type, p9##_type - -// Declares the value parameters. -#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0 -#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \ - p1##_type p1 -#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \ - p1##_type p1, p2##_type p2 -#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3 -#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ - p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4 -#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ - p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5 -#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5, p6##_type p6 -#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5, p6##_type p6, p7##_type p7 -#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8 -#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9 - -// The suffix of the class template implementing the action template. -#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P -#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2 -#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3 -#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4 -#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5 -#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6 -#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7 -#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) P8 -#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) P9 -#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) P10 - -// The name of the class template implementing the action template. -#define GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) - -#define ACTION_TEMPLATE(name, template_params, value_params)\ - template \ - class GMOCK_ACTION_CLASS_(name, value_params) {\ - public:\ - GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_INTERNAL_INIT_##value_params {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - GMOCK_INTERNAL_DEFN_##value_params\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(\ - new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ - }\ - GMOCK_INTERNAL_DEFN_##value_params\ - };\ - template \ - inline GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\ - GMOCK_INTERNAL_DECL_##value_params) {\ - return GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>(\ - GMOCK_INTERNAL_LIST_##value_params);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::\ - gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION(name)\ - class name##Action {\ - public:\ - name##Action() {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl() {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl());\ - }\ - };\ - inline name##Action name() {\ - return name##Action();\ - }\ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##Action::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P(name, p0)\ - template \ - class name##ActionP {\ - public:\ - name##ActionP(p0##_type gmock_p0) : p0(gmock_p0) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl(p0##_type gmock_p0) : p0(gmock_p0) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0));\ - }\ - p0##_type p0;\ - };\ - template \ - inline name##ActionP name(p0##_type p0) {\ - return name##ActionP(p0);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P2(name, p0, p1)\ - template \ - class name##ActionP2 {\ - public:\ - name##ActionP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ - p1(gmock_p1) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ - p1(gmock_p1) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - };\ - template \ - inline name##ActionP2 name(p0##_type p0, \ - p1##_type p1) {\ - return name##ActionP2(p0, p1);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP2::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P3(name, p0, p1, p2)\ - template \ - class name##ActionP3 {\ - public:\ - name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - };\ - template \ - inline name##ActionP3 name(p0##_type p0, \ - p1##_type p1, p2##_type p2) {\ - return name##ActionP3(p0, p1, p2);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP3::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P4(name, p0, p1, p2, p3)\ - template \ - class name##ActionP4 {\ - public:\ - name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - };\ - template \ - inline name##ActionP4 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3) {\ - return name##ActionP4(p0, p1, \ - p2, p3);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP4::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P5(name, p0, p1, p2, p3, p4)\ - template \ - class name##ActionP5 {\ - public:\ - name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4) : p0(gmock_p0), \ - p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - };\ - template \ - inline name##ActionP5 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4) {\ - return name##ActionP5(p0, p1, p2, p3, p4);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP5::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\ - template \ - class name##ActionP6 {\ - public:\ - name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - };\ - template \ - inline name##ActionP6 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3, p4##_type p4, p5##_type p5) {\ - return name##ActionP6(p0, p1, p2, p3, p4, p5);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP6::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\ - template \ - class name##ActionP7 {\ - public:\ - name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \ - p6(gmock_p6) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - };\ - template \ - inline name##ActionP7 name(p0##_type p0, p1##_type p1, \ - p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6) {\ - return name##ActionP7(p0, p1, p2, p3, p4, p5, p6);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP7::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\ - template \ - class name##ActionP8 {\ - public:\ - name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7) : p0(gmock_p0), \ - p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \ - p5(gmock_p5), p6(gmock_p6), p7(gmock_p7) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - };\ - template \ - inline name##ActionP8 name(p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6, p7##_type p7) {\ - return name##ActionP8(p0, p1, p2, p3, p4, p5, \ - p6, p7);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP8::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\ - template \ - class name##ActionP9 {\ - public:\ - name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7), p8(gmock_p8) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - };\ - template \ - inline name##ActionP9 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ - p8##_type p8) {\ - return name##ActionP9(p0, p1, p2, \ - p3, p4, p5, p6, p7, p8);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP9::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\ - template \ - class name##ActionP10 {\ - public:\ - name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - };\ - template \ - inline name##ActionP10 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9) {\ - return name##ActionP10(p0, \ - p1, p2, p3, p4, p5, p6, p7, p8, p9);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP10::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -// TODO(wan@google.com): move the following to a different .h file -// such that we don't have to run 'pump' every time the code is -// updated. -namespace testing { - -// Various overloads for InvokeArgument(). -// -// The InvokeArgument(a1, a2, ..., a_k) action invokes the N-th -// (0-based) argument, which must be a k-ary callable, of the mock -// function, with arguments a1, a2, ..., a_k. -// -// Notes: -// -// 1. The arguments are passed by value by default. If you need to -// pass an argument by reference, wrap it inside ByRef(). For -// example, -// -// InvokeArgument<1>(5, string("Hello"), ByRef(foo)) -// -// passes 5 and string("Hello") by value, and passes foo by -// reference. -// -// 2. If the callable takes an argument by reference but ByRef() is -// not used, it will receive the reference to a copy of the value, -// instead of the original value. For example, when the 0-th -// argument of the mock function takes a const string&, the action -// -// InvokeArgument<0>(string("Hello")) -// -// makes a copy of the temporary string("Hello") object and passes a -// reference of the copy, instead of the original temporary object, -// to the callable. This makes it easy for a user to define an -// InvokeArgument action from temporary values and have it performed -// later. - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { - return internal::CallableHelper::Call( - ::std::tr1::get(args)); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(p0)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_2_VALUE_PARAMS(p0, p1)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_3_VALUE_PARAMS(p0, p1, p2)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { - return internal::CallableHelper::Call( - ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - -// Action SaveArg(pointer) saves the k-th (0-based) argument of the -// mock function to *pointer. -ACTION_TEMPLATE(SaveArg, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(pointer)) { - *pointer = ::std::tr1::get(args); -} - -// Action SetArgReferee(value) assigns 'value' to the variable -// referenced by the k-th (0-based) argument of the mock function. -ACTION_TEMPLATE(SetArgReferee, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(value)) { - typedef typename ::std::tr1::tuple_element::type argk_type; - // Ensures that argument #k is a reference. If you get a compiler - // error on the next line, you are using SetArgReferee(value) in - // a mock function whose k-th (0-based) argument is not a reference. - GMOCK_COMPILE_ASSERT_(internal::is_reference::value, - SetArgReferee_must_be_used_with_a_reference_argument); - ::std::tr1::get(args) = value; -} - -// Action SetArrayArgument(first, last) copies the elements in -// source range [first, last) to the array pointed to by the k-th -// (0-based) argument, which can be either a pointer or an -// iterator. The action does not take ownership of the elements in the -// source range. -ACTION_TEMPLATE(SetArrayArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_2_VALUE_PARAMS(first, last)) { - // Microsoft compiler deprecates ::std::copy, so we want to suppress warning - // 4996 (Function call with parameters that may be unsafe) there. -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. -#endif - ::std::copy(first, last, ::std::tr1::get(args)); -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif -} - -// Various overloads for ReturnNew(). -// -// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new -// instance of type T, constructed on the heap with constructor arguments -// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_0_VALUE_PARAMS()) { - return new T(); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_1_VALUE_PARAMS(p0)) { - return new T(p0); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_2_VALUE_PARAMS(p0, p1)) { - return new T(p0, p1); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_3_VALUE_PARAMS(p0, p1, p2)) { - return new T(p0, p1, p2); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { - return new T(p0, p1, p2, p3); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { - return new T(p0, p1, p2, p3, p4); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { - return new T(p0, p1, p2, p3, p4, p5); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { - return new T(p0, p1, p2, p3, p4, p5, p6); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - -// Action DeleteArg() deletes the k-th (0-based) argument of the mock -// function. -ACTION_TEMPLATE(DeleteArg, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { - delete ::std::tr1::get(args); -} - -// Action Throw(exception) can be used in a mock function of any type -// to throw the given exception. Any copyable value can be thrown. -#if GTEST_HAS_EXCEPTIONS -ACTION_P(Throw, exception) { throw exception; } -#endif // GTEST_HAS_EXCEPTIONS - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h.pump deleted file mode 100644 index b5223a34..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-actions.h.pump +++ /dev/null @@ -1,1008 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-variadic-actions.h. -$$ -$var n = 10 $$ The maximum arity we support. -$$}} This meta comment fixes auto-indentation in editors. -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic actions. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ - -#include -#include - -namespace testing { -namespace internal { - -// InvokeHelper knows how to unpack an N-tuple and invoke an N-ary -// function or method with the unpacked values, where F is a function -// type that takes N arguments. -template -class InvokeHelper; - - -$range i 0..n -$for i [[ -$range j 1..i -$var types = [[$for j [[, typename A$j]]]] -$var as = [[$for j, [[A$j]]]] -$var args = [[$if i==0 [[]] $else [[ args]]]] -$var import = [[$if i==0 [[]] $else [[ - using ::std::tr1::get; - -]]]] -$var gets = [[$for j, [[get<$(j - 1)>(args)]]]] -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tr1::tuple<$as>&$args) { -$import return function($gets); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tr1::tuple<$as>&$args) { -$import return (obj_ptr->*method_ptr)($gets); - } -}; - - -]] - -// Implements the Invoke(f) action. The template argument -// FunctionImpl is the implementation type of f, which can be either a -// function pointer or a functor. Invoke(f) can be used as an -// Action as long as f's type is compatible with F (i.e. f can be -// assigned to a tr1::function). -template -class InvokeAction { - public: - // The c'tor makes a copy of function_impl (either a function - // pointer or a functor). - explicit InvokeAction(FunctionImpl function_impl) - : function_impl_(function_impl) {} - - template - Result Perform(const ArgumentTuple& args) { - return InvokeHelper::Invoke(function_impl_, args); - } - private: - FunctionImpl function_impl_; -}; - -// Implements the Invoke(object_ptr, &Class::Method) action. -template -class InvokeMethodAction { - public: - InvokeMethodAction(Class* obj_ptr, MethodPtr method_ptr) - : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} - - template - Result Perform(const ArgumentTuple& args) const { - return InvokeHelper::InvokeMethod( - obj_ptr_, method_ptr_, args); - } - private: - Class* const obj_ptr_; - const MethodPtr method_ptr_; -}; - -// A ReferenceWrapper object represents a reference to type T, -// which can be either const or not. It can be explicitly converted -// from, and implicitly converted to, a T&. Unlike a reference, -// ReferenceWrapper can be copied and can survive template type -// inference. This is used to support by-reference arguments in the -// InvokeArgument(...) action. The idea was from "reference -// wrappers" in tr1, which we don't have in our source tree yet. -template -class ReferenceWrapper { - public: - // Constructs a ReferenceWrapper object from a T&. - explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT - - // Allows a ReferenceWrapper object to be implicitly converted to - // a T&. - operator T&() const { return *pointer_; } - private: - T* pointer_; -}; - -// CallableHelper has static methods for invoking "callables", -// i.e. function pointers and functors. It uses overloading to -// provide a uniform interface for invoking different kinds of -// callables. In particular, you can use: -// -// CallableHelper::Call(callable, a1, a2, ..., an) -// -// to invoke an n-ary callable, where R is its return type. If an -// argument, say a2, needs to be passed by reference, you should write -// ByRef(a2) instead of a2 in the above expression. -template -class CallableHelper { - public: - // Calls a nullary callable. - template - static R Call(Function function) { return function(); } - - // Calls a unary callable. - - // We deliberately pass a1 by value instead of const reference here - // in case it is a C-string literal. If we had declared the - // parameter as 'const A1& a1' and write Call(function, "Hi"), the - // compiler would've thought A1 is 'char[3]', which causes trouble - // when you need to copy a value of type A1. By declaring the - // parameter as 'A1 a1', the compiler will correctly infer that A1 - // is 'const char*' when it sees Call(function, "Hi"). - // - // Since this function is defined inline, the compiler can get rid - // of the copying of the arguments. Therefore the performance won't - // be hurt. - template - static R Call(Function function, A1 a1) { return function(a1); } - -$range i 2..n -$for i -[[ -$var arity = [[$if i==2 [[binary]] $elif i==3 [[ternary]] $else [[$i-ary]]]] - - // Calls a $arity callable. - -$range j 1..i -$var typename_As = [[$for j, [[typename A$j]]]] -$var Aas = [[$for j, [[A$j a$j]]]] -$var as = [[$for j, [[a$j]]]] -$var typename_Ts = [[$for j, [[typename T$j]]]] -$var Ts = [[$for j, [[T$j]]]] - template - static R Call(Function function, $Aas) { - return function($as); - } - -]] - -}; // class CallableHelper - -// An INTERNAL macro for extracting the type of a tuple field. It's -// subject to change without notice - DO NOT USE IN USER CODE! -#define GMOCK_FIELD_(Tuple, N) \ - typename ::std::tr1::tuple_element::type - -$range i 1..n - -// SelectArgs::type is the -// type of an n-ary function whose i-th (1-based) argument type is the -// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple -// type, and whose return type is Result. For example, -// SelectArgs, 0, 3>::type -// is int(bool, long). -// -// SelectArgs::Select(args) -// returns the selected fields (k1, k2, ..., k_n) of args as a tuple. -// For example, -// SelectArgs, 2, 0>::Select( -// ::std::tr1::make_tuple(true, 'a', 2.5)) -// returns ::std::tr1::tuple (2.5, true). -// -// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be -// in the range [0, $n]. Duplicates are allowed and they don't have -// to be in an ascending or descending order. - -template -class SelectArgs { - public: - typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - using ::std::tr1::get; - return SelectedArgs($for i, [[get(args)]]); - } -}; - - -$for i [[ -$range j 1..n -$range j1 1..i-1 -template -class SelectArgs { - public: - typedef Result type($for j1, [[GMOCK_FIELD_(ArgumentTuple, k$j1)]]); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& [[]] -$if i == 1 [[/* args */]] $else [[args]]) { - using ::std::tr1::get; - return SelectedArgs($for j1, [[get(args)]]); - } -}; - - -]] -#undef GMOCK_FIELD_ - -$var ks = [[$for i, [[k$i]]]] - -// Implements the WithArgs action. -template -class WithArgsAction { - public: - explicit WithArgsAction(const InnerAction& action) : action_(action) {} - - template - operator Action() const { return MakeAction(new Impl(action_)); } - - private: - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const InnerAction& action) : action_(action) {} - - virtual Result Perform(const ArgumentTuple& args) { - return action_.Perform(SelectArgs::Select(args)); - } - - private: - typedef typename SelectArgs::type InnerFunctionType; - - Action action_; - }; - - const InnerAction action_; -}; - -// Does two actions sequentially. Used for implementing the DoAll(a1, -// a2, ...) action. -template -class DoBothAction { - public: - DoBothAction(Action1 action1, Action2 action2) - : action1_(action1), action2_(action2) {} - - // This template type conversion operator allows DoAll(a1, ..., a_n) - // to be used in ANY function of compatible type. - template - operator Action() const { - return Action(new Impl(action1_, action2_)); - } - - private: - // Implements the DoAll(...) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::MakeResultVoid VoidResult; - - Impl(const Action& action1, const Action& action2) - : action1_(action1), action2_(action2) {} - - virtual Result Perform(const ArgumentTuple& args) { - action1_.Perform(args); - return action2_.Perform(args); - } - - private: - const Action action1_; - const Action action2_; - }; - - Action1 action1_; - Action2 action2_; -}; - -// A macro from the ACTION* family (defined later in this file) -// defines an action that can be used in a mock function. Typically, -// these actions only care about a subset of the arguments of the mock -// function. For example, if such an action only uses the second -// argument, it can be used in any mock function that takes >= 2 -// arguments where the type of the second argument is compatible. -// -// Therefore, the action implementation must be prepared to take more -// arguments than it needs. The ExcessiveArg type is used to -// represent those excessive arguments. In order to keep the compiler -// error messages tractable, we define it in the testing namespace -// instead of testing::internal. However, this is an INTERNAL TYPE -// and subject to change without notice, so a user MUST NOT USE THIS -// TYPE DIRECTLY. -struct ExcessiveArg {}; - -// A helper class needed for implementing the ACTION* macros. -template -class ActionHelper { - public: -$range i 0..n -$for i - -[[ -$var template = [[$if i==0 [[]] $else [[ -$range j 0..i-1 - template <$for j, [[typename A$j]]> -]]]] -$range j 0..i-1 -$var As = [[$for j, [[A$j]]]] -$var as = [[$for j, [[get<$j>(args)]]]] -$range k 1..n-i -$var eas = [[$for k, [[ExcessiveArg()]]]] -$var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]] -$template - static Result Perform(Impl* impl, const ::std::tr1::tuple<$As>& args) { - using ::std::tr1::get; - return impl->template gmock_PerformImpl<$As>(args, $arg_list); - } - -]] -}; - -} // namespace internal - -// Various overloads for Invoke(). - -// Creates an action that invokes 'function_impl' with the mock -// function's arguments. -template -PolymorphicAction > Invoke( - FunctionImpl function_impl) { - return MakePolymorphicAction( - internal::InvokeAction(function_impl)); -} - -// Creates an action that invokes the given method on the given object -// with the mock function's arguments. -template -PolymorphicAction > Invoke( - Class* obj_ptr, MethodPtr method_ptr) { - return MakePolymorphicAction( - internal::InvokeMethodAction(obj_ptr, method_ptr)); -} - -// Creates a reference wrapper for the given L-value. If necessary, -// you can explicitly specify the type of the reference. For example, -// suppose 'derived' is an object of type Derived, ByRef(derived) -// would wrap a Derived&. If you want to wrap a const Base& instead, -// where Base is a base class of Derived, just write: -// -// ByRef(derived) -template -inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT - return internal::ReferenceWrapper(l_value); -} - -// WithoutArgs(inner_action) can be used in a mock function with a -// non-empty argument list to perform inner_action, which takes no -// argument. In other words, it adapts an action accepting no -// argument to one that accepts (and ignores) arguments. -template -inline internal::WithArgsAction -WithoutArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// WithArg(an_action) creates an action that passes the k-th -// (0-based) argument of the mock function to an_action and performs -// it. It adapts an action accepting one argument to one that accepts -// multiple arguments. For convenience, we also provide -// WithArgs(an_action) (defined below) as a synonym. -template -inline internal::WithArgsAction -WithArg(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// WithArgs(an_action) creates an action that passes -// the selected arguments of the mock function to an_action and -// performs it. It serves as an adaptor between actions with -// different argument lists. C++ doesn't support default arguments for -// function templates, so we have to overload it. - -$range i 1..n -$for i [[ -$range j 1..i -template <$for j [[int k$j, ]]typename InnerAction> -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - - -]] -// Creates an action that does actions a1, a2, ..., sequentially in -// each invocation. -$range i 2..n -$for i [[ -$range j 2..i -$var types = [[$for j, [[typename Action$j]]]] -$var Aas = [[$for j [[, Action$j a$j]]]] - -template -$range k 1..i-1 - -inline $for k [[internal::DoBothAction]] - -DoAll(Action1 a1$Aas) { -$if i==2 [[ - - return internal::DoBothAction(a1, a2); -]] $else [[ -$range j2 2..i - - return DoAll(a1, DoAll($for j2, [[a$j2]])); -]] - -} - -]] - -} // namespace testing - -// The ACTION* family of macros can be used in a namespace scope to -// define custom actions easily. The syntax: -// -// ACTION(name) { statements; } -// -// will define an action with the given name that executes the -// statements. The value returned by the statements will be used as -// the return value of the action. Inside the statements, you can -// refer to the K-th (0-based) argument of the mock function by -// 'argK', and refer to its type by 'argK_type'. For example: -// -// ACTION(IncrementArg1) { -// arg1_type temp = arg1; -// return ++(*temp); -// } -// -// allows you to write -// -// ...WillOnce(IncrementArg1()); -// -// You can also refer to the entire argument tuple and its type by -// 'args' and 'args_type', and refer to the mock function type and its -// return type by 'function_type' and 'return_type'. -// -// Note that you don't need to specify the types of the mock function -// arguments. However rest assured that your code is still type-safe: -// you'll get a compiler error if *arg1 doesn't support the ++ -// operator, or if the type of ++(*arg1) isn't compatible with the -// mock function's return type, for example. -// -// Sometimes you'll want to parameterize the action. For that you can use -// another macro: -// -// ACTION_P(name, param_name) { statements; } -// -// For example: -// -// ACTION_P(Add, n) { return arg0 + n; } -// -// will allow you to write: -// -// ...WillOnce(Add(5)); -// -// Note that you don't need to provide the type of the parameter -// either. If you need to reference the type of a parameter named -// 'foo', you can write 'foo_type'. For example, in the body of -// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type -// of 'n'. -// -// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P$n to support -// multi-parameter actions. -// -// For the purpose of typing, you can view -// -// ACTION_Pk(Foo, p1, ..., pk) { ... } -// -// as shorthand for -// -// template -// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } -// -// In particular, you can provide the template type arguments -// explicitly when invoking Foo(), as in Foo(5, false); -// although usually you can rely on the compiler to infer the types -// for you automatically. You can assign the result of expression -// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. -// -// You can also overload actions with different numbers of parameters: -// -// ACTION_P(Plus, a) { ... } -// ACTION_P2(Plus, a, b) { ... } -// -// While it's tempting to always use the ACTION* macros when defining -// a new action, you should also consider implementing ActionInterface -// or using MakePolymorphicAction() instead, especially if you need to -// use the action a lot. While these approaches require more work, -// they give you more control on the types of the mock function -// arguments and the action parameters, which in general leads to -// better compiler error messages that pay off in the long run. They -// also allow overloading actions based on parameter types (as opposed -// to just based on the number of parameters). -// -// CAVEAT: -// -// ACTION*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using ACTION*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'ACTION' -// on http://code.google.com/p/googlemock/wiki/CookBook. - -$range i 0..n -$range k 0..n-1 - -// An internal macro needed for implementing ACTION*(). -#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ - const args_type& args GTEST_ATTRIBUTE_UNUSED_ -$for k [[,\ - arg$k[[]]_type arg$k GTEST_ATTRIBUTE_UNUSED_]] - - -// Sometimes you want to give an action explicit template parameters -// that cannot be inferred from its value parameters. ACTION() and -// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that -// and can be viewed as an extension to ACTION() and ACTION_P*(). -// -// The syntax: -// -// ACTION_TEMPLATE(ActionName, -// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), -// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } -// -// defines an action template that takes m explicit template -// parameters and n value parameters. name_i is the name of the i-th -// template parameter, and kind_i specifies whether it's a typename, -// an integral constant, or a template. p_i is the name of the i-th -// value parameter. -// -// Example: -// -// // DuplicateArg(output) converts the k-th argument of the mock -// // function to type T and copies it to *output. -// ACTION_TEMPLATE(DuplicateArg, -// HAS_2_TEMPLATE_PARAMS(int, k, typename, T), -// AND_1_VALUE_PARAMS(output)) { -// *output = T(std::tr1::get(args)); -// } -// ... -// int n; -// EXPECT_CALL(mock, Foo(_, _)) -// .WillOnce(DuplicateArg<1, unsigned char>(&n)); -// -// To create an instance of an action template, write: -// -// ActionName(v1, ..., v_n) -// -// where the ts are the template arguments and the vs are the value -// arguments. The value argument types are inferred by the compiler. -// If you want to explicitly specify the value argument types, you can -// provide additional template arguments: -// -// ActionName(v1, ..., v_n) -// -// where u_i is the desired type of v_i. -// -// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the -// number of value parameters, but not on the number of template -// parameters. Without the restriction, the meaning of the following -// is unclear: -// -// OverloadedAction(x); -// -// Are we using a single-template-parameter action where 'bool' refers -// to the type of x, or are we using a two-template-parameter action -// where the compiler is asked to infer the type of x? -// -// Implementation notes: -// -// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and -// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for -// implementing ACTION_TEMPLATE. The main trick we use is to create -// new macro invocations when expanding a macro. For example, we have -// -// #define ACTION_TEMPLATE(name, template_params, value_params) -// ... GMOCK_INTERNAL_DECL_##template_params ... -// -// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...) -// to expand to -// -// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ... -// -// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the -// preprocessor will continue to expand it to -// -// ... typename T ... -// -// This technique conforms to the C++ standard and is portable. It -// allows us to implement action templates using O(N) code, where N is -// the maximum number of template/value parameters supported. Without -// using it, we'd have to devote O(N^2) amount of code to implement all -// combinations of m and n. - -// Declares the template parameters. - -$range j 1..n -$for j [[ -$range m 0..j-1 -#define GMOCK_INTERNAL_DECL_HAS_$j[[]] -_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[kind$m name$m]] - - -]] - -// Lists the template parameters. - -$for j [[ -$range m 0..j-1 -#define GMOCK_INTERNAL_LIST_HAS_$j[[]] -_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[name$m]] - - -]] - -// Declares the types of value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DECL_TYPE_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[, typename p$j##_type]] - - -]] - -// Initializes the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_INIT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])\ - ($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(gmock_p$j)]] - - -]] - -// Declares the fields for storing the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DEFN_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[p$j##_type p$j; ]] - - -]] - -// Lists the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_LIST_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j, [[p$j]] - - -]] - -// Lists the value parameter types. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_LIST_TYPE_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[, p$j##_type]] - - -]] - -// Declares the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DECL_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]] -$for j, [[p$j##_type p$j]] - - -]] - -// The suffix of the class template implementing the action template. -$for i [[ - - -$range j 0..i-1 -#define GMOCK_INTERNAL_COUNT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]] -$if i==1 [[P]] $elif i>=2 [[P$i]] -]] - - -// The name of the class template implementing the action template. -#define GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) - -$range k 0..n-1 - -#define ACTION_TEMPLATE(name, template_params, value_params)\ - template \ - class GMOCK_ACTION_CLASS_(name, value_params) {\ - public:\ - GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_INTERNAL_INIT_##value_params {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template <$for k, [[typename arg$k[[]]_type]]>\ - return_type gmock_PerformImpl(const args_type& args[[]] -$for k [[, arg$k[[]]_type arg$k]]) const;\ - GMOCK_INTERNAL_DEFN_##value_params\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(\ - new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ - }\ - GMOCK_INTERNAL_DEFN_##value_params\ - };\ - template \ - inline GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\ - GMOCK_INTERNAL_DECL_##value_params) {\ - return GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>(\ - GMOCK_INTERNAL_LIST_##value_params);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::\ - gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -$for i - -[[ -$var template = [[$if i==0 [[]] $else [[ -$range j 0..i-1 - - template <$for j, [[typename p$j##_type]]>\ -]]]] -$var class_name = [[name##Action[[$if i==0 [[]] $elif i==1 [[P]] - $else [[P$i]]]]]] -$range j 0..i-1 -$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]] -$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]] -$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]] -$var param_field_decls = [[$for j -[[ - - p$j##_type p$j;\ -]]]] -$var param_field_decls2 = [[$for j -[[ - - p$j##_type p$j;\ -]]]] -$var params = [[$for j, [[p$j]]]] -$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]] -$var typename_arg_types = [[$for k, [[typename arg$k[[]]_type]]]] -$var arg_types_and_names = [[$for k, [[arg$k[[]]_type arg$k]]]] -$var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]] - $else [[ACTION_P$i]]]] - -#define $macro_name(name$for j [[, p$j]])\$template - class $class_name {\ - public:\ - $class_name($ctor_param_list)$inits {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - [[$if i==1 [[explicit ]]]]gmock_Impl($ctor_param_list)$inits {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template <$typename_arg_types>\ - return_type gmock_PerformImpl(const args_type& args, [[]] -$arg_types_and_names) const;\$param_field_decls - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl($params));\ - }\$param_field_decls2 - };\$template - inline $class_name$param_types name($param_types_and_names) {\ - return $class_name$param_types($params);\ - }\$template - template \ - template <$typename_arg_types>\ - typename ::testing::internal::Function::Result\ - $class_name$param_types::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const -]] -$$ } // This meta comment fixes auto-indentation in Emacs. It won't -$$ // show up in the generated code. - - -// TODO(wan@google.com): move the following to a different .h file -// such that we don't have to run 'pump' every time the code is -// updated. -namespace testing { - -// Various overloads for InvokeArgument(). -// -// The InvokeArgument(a1, a2, ..., a_k) action invokes the N-th -// (0-based) argument, which must be a k-ary callable, of the mock -// function, with arguments a1, a2, ..., a_k. -// -// Notes: -// -// 1. The arguments are passed by value by default. If you need to -// pass an argument by reference, wrap it inside ByRef(). For -// example, -// -// InvokeArgument<1>(5, string("Hello"), ByRef(foo)) -// -// passes 5 and string("Hello") by value, and passes foo by -// reference. -// -// 2. If the callable takes an argument by reference but ByRef() is -// not used, it will receive the reference to a copy of the value, -// instead of the original value. For example, when the 0-th -// argument of the mock function takes a const string&, the action -// -// InvokeArgument<0>(string("Hello")) -// -// makes a copy of the temporary string("Hello") object and passes a -// reference of the copy, instead of the original temporary object, -// to the callable. This makes it easy for a user to define an -// InvokeArgument action from temporary values and have it performed -// later. - -$range i 0..n -$for i [[ -$range j 0..i-1 - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) { - return internal::CallableHelper::Call( - ::std::tr1::get(args)$for j [[, p$j]]); -} - -]] - -// Action SaveArg(pointer) saves the k-th (0-based) argument of the -// mock function to *pointer. -ACTION_TEMPLATE(SaveArg, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(pointer)) { - *pointer = ::std::tr1::get(args); -} - -// Action SetArgReferee(value) assigns 'value' to the variable -// referenced by the k-th (0-based) argument of the mock function. -ACTION_TEMPLATE(SetArgReferee, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(value)) { - typedef typename ::std::tr1::tuple_element::type argk_type; - // Ensures that argument #k is a reference. If you get a compiler - // error on the next line, you are using SetArgReferee(value) in - // a mock function whose k-th (0-based) argument is not a reference. - GMOCK_COMPILE_ASSERT_(internal::is_reference::value, - SetArgReferee_must_be_used_with_a_reference_argument); - ::std::tr1::get(args) = value; -} - -// Action SetArrayArgument(first, last) copies the elements in -// source range [first, last) to the array pointed to by the k-th -// (0-based) argument, which can be either a pointer or an -// iterator. The action does not take ownership of the elements in the -// source range. -ACTION_TEMPLATE(SetArrayArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_2_VALUE_PARAMS(first, last)) { - // Microsoft compiler deprecates ::std::copy, so we want to suppress warning - // 4996 (Function call with parameters that may be unsafe) there. -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. -#endif - ::std::copy(first, last, ::std::tr1::get(args)); -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif -} - -// Various overloads for ReturnNew(). -// -// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new -// instance of type T, constructed on the heap with constructor arguments -// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. -$range i 0..n -$for i [[ -$range j 0..i-1 -$var ps = [[$for j, [[p$j]]]] - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_$i[[]]_VALUE_PARAMS($ps)) { - return new T($ps); -} - -]] - -// Action DeleteArg() deletes the k-th (0-based) argument of the mock -// function. -ACTION_TEMPLATE(DeleteArg, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { - delete ::std::tr1::get(args); -} - -// Action Throw(exception) can be used in a mock function of any type -// to throw the given exception. Any copyable value can be thrown. -#if GTEST_HAS_EXCEPTIONS -ACTION_P(Throw, exception) { throw exception; } -#endif // GTEST_HAS_EXCEPTIONS - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h deleted file mode 100644 index b6c1d82e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h +++ /dev/null @@ -1,717 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements function mockers of various arities. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ - -#include -#include - -namespace testing { - -template -class MockSpec; - -namespace internal { - -template -class FunctionMockerBase; - -// Note: class FunctionMocker really belongs to the ::testing -// namespace. However if we define it in ::testing, MSVC will -// complain when classes in ::testing::internal declare it as a -// friend class template. To workaround this compiler bug, we define -// FunctionMocker in ::testing::internal and import it into ::testing. -template -class FunctionMocker; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With() { - return this->current_spec(); - } - - R Invoke() { - return InvokeWith(ArgumentTuple()); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1)); - return this->current_spec(); - } - - R Invoke(A1 a1) { - return InvokeWith(ArgumentTuple(a1)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2) { - return InvokeWith(ArgumentTuple(a1, a2)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3) { - return InvokeWith(ArgumentTuple(a1, a2, a3)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, - m5)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, - m6)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, - m6, m7)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, - m6, m7, m8)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8, - const Matcher& m9) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, - m6, m7, m8, m9)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9)); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8, - const Matcher& m9, const Matcher& m10) { - this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, - m6, m7, m8, m9, m10)); - return this->current_spec(); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, - A10 a10) { - return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)); - } -}; - -} // namespace internal - -// The style guide prohibits "using" statements in a namespace scope -// inside a header file. However, the FunctionMocker class template -// is meant to be defined in the ::testing namespace. The following -// line is just a trick for working around a bug in MSVC 8.0, which -// cannot handle it if we define FunctionMocker in ::testing. -using internal::FunctionMocker; - -// The result type of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function::Result - -// The type of argument N of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function::Argument##N - -// The matcher type for argument N of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher& - -// The variable for mocking the given method. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MOCKER_(arity, constness, Method) \ - GMOCK_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD0_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method() constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 0, \ - this_method_does_not_take_0_arguments); \ - GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(0, constness, Method).Invoke(); \ - } \ - ::testing::MockSpec& \ - gmock_##Method() constness { \ - return GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this).With(); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(0, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD1_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 1, \ - this_method_does_not_take_1_argument); \ - GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(1, constness, Method).Invoke(gmock_a1); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1) constness { \ - return GMOCK_MOCKER_(1, constness, \ - Method).RegisterOwner(this).With(gmock_a1); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(1, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD2_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 2, \ - this_method_does_not_take_2_arguments); \ - GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(2, constness, Method).Invoke(gmock_a1, gmock_a2); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2) constness { \ - return GMOCK_MOCKER_(2, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(2, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD3_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 3, \ - this_method_does_not_take_3_arguments); \ - GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(3, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3) constness { \ - return GMOCK_MOCKER_(3, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(3, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD4_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 4, \ - this_method_does_not_take_4_arguments); \ - GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(4, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4) constness { \ - return GMOCK_MOCKER_(4, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(4, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD5_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 5, \ - this_method_does_not_take_5_arguments); \ - GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(5, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5) constness { \ - return GMOCK_MOCKER_(5, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(5, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD6_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5, \ - GMOCK_ARG_(tn, F, 6) gmock_a6) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 6, \ - this_method_does_not_take_6_arguments); \ - GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(6, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ - GMOCK_MATCHER_(tn, F, 6) gmock_a6) constness { \ - return GMOCK_MOCKER_(6, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5, gmock_a6); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(6, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD7_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5, \ - GMOCK_ARG_(tn, F, 6) gmock_a6, \ - GMOCK_ARG_(tn, F, 7) gmock_a7) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 7, \ - this_method_does_not_take_7_arguments); \ - GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(7, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ - GMOCK_MATCHER_(tn, F, 6) gmock_a6, \ - GMOCK_MATCHER_(tn, F, 7) gmock_a7) constness { \ - return GMOCK_MOCKER_(7, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5, gmock_a6, gmock_a7); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(7, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD8_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5, \ - GMOCK_ARG_(tn, F, 6) gmock_a6, \ - GMOCK_ARG_(tn, F, 7) gmock_a7, \ - GMOCK_ARG_(tn, F, 8) gmock_a8) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 8, \ - this_method_does_not_take_8_arguments); \ - GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(8, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ - GMOCK_MATCHER_(tn, F, 6) gmock_a6, \ - GMOCK_MATCHER_(tn, F, 7) gmock_a7, \ - GMOCK_MATCHER_(tn, F, 8) gmock_a8) constness { \ - return GMOCK_MOCKER_(8, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(8, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD9_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5, \ - GMOCK_ARG_(tn, F, 6) gmock_a6, \ - GMOCK_ARG_(tn, F, 7) gmock_a7, \ - GMOCK_ARG_(tn, F, 8) gmock_a8, \ - GMOCK_ARG_(tn, F, 9) gmock_a9) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 9, \ - this_method_does_not_take_9_arguments); \ - GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(9, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \ - gmock_a9); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ - GMOCK_MATCHER_(tn, F, 6) gmock_a6, \ - GMOCK_MATCHER_(tn, F, 7) gmock_a7, \ - GMOCK_MATCHER_(tn, F, 8) gmock_a8, \ - GMOCK_MATCHER_(tn, F, 9) gmock_a9) constness { \ - return GMOCK_MOCKER_(9, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(9, constness, Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD10_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method(GMOCK_ARG_(tn, F, 1) gmock_a1, \ - GMOCK_ARG_(tn, F, 2) gmock_a2, \ - GMOCK_ARG_(tn, F, 3) gmock_a3, \ - GMOCK_ARG_(tn, F, 4) gmock_a4, \ - GMOCK_ARG_(tn, F, 5) gmock_a5, \ - GMOCK_ARG_(tn, F, 6) gmock_a6, \ - GMOCK_ARG_(tn, F, 7) gmock_a7, \ - GMOCK_ARG_(tn, F, 8) gmock_a8, \ - GMOCK_ARG_(tn, F, 9) gmock_a9, \ - GMOCK_ARG_(tn, F, 10) gmock_a10) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == 10, \ - this_method_does_not_take_10_arguments); \ - GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(10, constness, Method).Invoke(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ - gmock_a10); \ - } \ - ::testing::MockSpec& \ - gmock_##Method(GMOCK_MATCHER_(tn, F, 1) gmock_a1, \ - GMOCK_MATCHER_(tn, F, 2) gmock_a2, \ - GMOCK_MATCHER_(tn, F, 3) gmock_a3, \ - GMOCK_MATCHER_(tn, F, 4) gmock_a4, \ - GMOCK_MATCHER_(tn, F, 5) gmock_a5, \ - GMOCK_MATCHER_(tn, F, 6) gmock_a6, \ - GMOCK_MATCHER_(tn, F, 7) gmock_a7, \ - GMOCK_MATCHER_(tn, F, 8) gmock_a8, \ - GMOCK_MATCHER_(tn, F, 9) gmock_a9, \ - GMOCK_MATCHER_(tn, F, 10) gmock_a10) constness { \ - return GMOCK_MOCKER_(10, constness, \ - Method).RegisterOwner(this).With(gmock_a1, gmock_a2, gmock_a3, \ - gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ - gmock_a10); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_(10, constness, Method) - -#define MOCK_METHOD0(m, F) GMOCK_METHOD0_(, , , m, F) -#define MOCK_METHOD1(m, F) GMOCK_METHOD1_(, , , m, F) -#define MOCK_METHOD2(m, F) GMOCK_METHOD2_(, , , m, F) -#define MOCK_METHOD3(m, F) GMOCK_METHOD3_(, , , m, F) -#define MOCK_METHOD4(m, F) GMOCK_METHOD4_(, , , m, F) -#define MOCK_METHOD5(m, F) GMOCK_METHOD5_(, , , m, F) -#define MOCK_METHOD6(m, F) GMOCK_METHOD6_(, , , m, F) -#define MOCK_METHOD7(m, F) GMOCK_METHOD7_(, , , m, F) -#define MOCK_METHOD8(m, F) GMOCK_METHOD8_(, , , m, F) -#define MOCK_METHOD9(m, F) GMOCK_METHOD9_(, , , m, F) -#define MOCK_METHOD10(m, F) GMOCK_METHOD10_(, , , m, F) - -#define MOCK_CONST_METHOD0(m, F) GMOCK_METHOD0_(, const, , m, F) -#define MOCK_CONST_METHOD1(m, F) GMOCK_METHOD1_(, const, , m, F) -#define MOCK_CONST_METHOD2(m, F) GMOCK_METHOD2_(, const, , m, F) -#define MOCK_CONST_METHOD3(m, F) GMOCK_METHOD3_(, const, , m, F) -#define MOCK_CONST_METHOD4(m, F) GMOCK_METHOD4_(, const, , m, F) -#define MOCK_CONST_METHOD5(m, F) GMOCK_METHOD5_(, const, , m, F) -#define MOCK_CONST_METHOD6(m, F) GMOCK_METHOD6_(, const, , m, F) -#define MOCK_CONST_METHOD7(m, F) GMOCK_METHOD7_(, const, , m, F) -#define MOCK_CONST_METHOD8(m, F) GMOCK_METHOD8_(, const, , m, F) -#define MOCK_CONST_METHOD9(m, F) GMOCK_METHOD9_(, const, , m, F) -#define MOCK_CONST_METHOD10(m, F) GMOCK_METHOD10_(, const, , m, F) - -#define MOCK_METHOD0_T(m, F) GMOCK_METHOD0_(typename, , , m, F) -#define MOCK_METHOD1_T(m, F) GMOCK_METHOD1_(typename, , , m, F) -#define MOCK_METHOD2_T(m, F) GMOCK_METHOD2_(typename, , , m, F) -#define MOCK_METHOD3_T(m, F) GMOCK_METHOD3_(typename, , , m, F) -#define MOCK_METHOD4_T(m, F) GMOCK_METHOD4_(typename, , , m, F) -#define MOCK_METHOD5_T(m, F) GMOCK_METHOD5_(typename, , , m, F) -#define MOCK_METHOD6_T(m, F) GMOCK_METHOD6_(typename, , , m, F) -#define MOCK_METHOD7_T(m, F) GMOCK_METHOD7_(typename, , , m, F) -#define MOCK_METHOD8_T(m, F) GMOCK_METHOD8_(typename, , , m, F) -#define MOCK_METHOD9_T(m, F) GMOCK_METHOD9_(typename, , , m, F) -#define MOCK_METHOD10_T(m, F) GMOCK_METHOD10_(typename, , , m, F) - -#define MOCK_CONST_METHOD0_T(m, F) GMOCK_METHOD0_(typename, const, , m, F) -#define MOCK_CONST_METHOD1_T(m, F) GMOCK_METHOD1_(typename, const, , m, F) -#define MOCK_CONST_METHOD2_T(m, F) GMOCK_METHOD2_(typename, const, , m, F) -#define MOCK_CONST_METHOD3_T(m, F) GMOCK_METHOD3_(typename, const, , m, F) -#define MOCK_CONST_METHOD4_T(m, F) GMOCK_METHOD4_(typename, const, , m, F) -#define MOCK_CONST_METHOD5_T(m, F) GMOCK_METHOD5_(typename, const, , m, F) -#define MOCK_CONST_METHOD6_T(m, F) GMOCK_METHOD6_(typename, const, , m, F) -#define MOCK_CONST_METHOD7_T(m, F) GMOCK_METHOD7_(typename, const, , m, F) -#define MOCK_CONST_METHOD8_T(m, F) GMOCK_METHOD8_(typename, const, , m, F) -#define MOCK_CONST_METHOD9_T(m, F) GMOCK_METHOD9_(typename, const, , m, F) -#define MOCK_CONST_METHOD10_T(m, F) GMOCK_METHOD10_(typename, const, , m, F) - -#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD0_(, , ct, m, F) -#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD1_(, , ct, m, F) -#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD2_(, , ct, m, F) -#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD3_(, , ct, m, F) -#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD4_(, , ct, m, F) -#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD5_(, , ct, m, F) -#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD6_(, , ct, m, F) -#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD7_(, , ct, m, F) -#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD8_(, , ct, m, F) -#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD9_(, , ct, m, F) -#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD10_(, , ct, m, F) - -#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD0_(, const, ct, m, F) -#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD1_(, const, ct, m, F) -#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD2_(, const, ct, m, F) -#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD3_(, const, ct, m, F) -#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD4_(, const, ct, m, F) -#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD5_(, const, ct, m, F) -#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD6_(, const, ct, m, F) -#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD7_(, const, ct, m, F) -#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD8_(, const, ct, m, F) -#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD9_(, const, ct, m, F) -#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD10_(, const, ct, m, F) - -#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD0_(typename, , ct, m, F) -#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD1_(typename, , ct, m, F) -#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD2_(typename, , ct, m, F) -#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD3_(typename, , ct, m, F) -#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD4_(typename, , ct, m, F) -#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD5_(typename, , ct, m, F) -#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD6_(typename, , ct, m, F) -#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD7_(typename, , ct, m, F) -#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD8_(typename, , ct, m, F) -#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD9_(typename, , ct, m, F) -#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD10_(typename, , ct, m, F) - -#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD0_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD1_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD2_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD3_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD4_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD5_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD6_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD7_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD8_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD9_(typename, const, ct, m, F) -#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD10_(typename, const, ct, m, F) - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h.pump deleted file mode 100644 index 54b848f6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-function-mockers.h.pump +++ /dev/null @@ -1,203 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-function-mockers.h. -$$ -$var n = 10 $$ The maximum arity we support. -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements function mockers of various arities. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ - -#include -#include - -namespace testing { - -template -class MockSpec; - -namespace internal { - -template -class FunctionMockerBase; - -// Note: class FunctionMocker really belongs to the ::testing -// namespace. However if we define it in ::testing, MSVC will -// complain when classes in ::testing::internal declare it as a -// friend class template. To workaround this compiler bug, we define -// FunctionMocker in ::testing::internal and import it into ::testing. -template -class FunctionMocker; - - -$range i 0..n -$for i [[ -$range j 1..i -$var typename_As = [[$for j [[, typename A$j]]]] -$var As = [[$for j, [[A$j]]]] -$var as = [[$for j, [[a$j]]]] -$var Aas = [[$for j, [[A$j a$j]]]] -$var ms = [[$for j, [[m$j]]]] -$var matchers = [[$for j, [[const Matcher& m$j]]]] -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F($As); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec& With($matchers) { - -$if i >= 1 [[ - this->current_spec().SetMatchers(::std::tr1::make_tuple($ms)); - -]] - return this->current_spec(); - } - - R Invoke($Aas) { - return InvokeWith(ArgumentTuple($as)); - } -}; - - -]] -} // namespace internal - -// The style guide prohibits "using" statements in a namespace scope -// inside a header file. However, the FunctionMocker class template -// is meant to be defined in the ::testing namespace. The following -// line is just a trick for working around a bug in MSVC 8.0, which -// cannot handle it if we define FunctionMocker in ::testing. -using internal::FunctionMocker; - -// The result type of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function::Result - -// The type of argument N of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function::Argument##N - -// The matcher type for argument N of function type F. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher& - -// The variable for mocking the given method. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MOCKER_(arity, constness, Method) \ - GMOCK_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) - - -$for i [[ -$range j 1..i -$var arg_as = [[$for j, \ - [[GMOCK_ARG_(tn, F, $j) gmock_a$j]]]] -$var as = [[$for j, [[gmock_a$j]]]] -$var matcher_as = [[$for j, \ - [[GMOCK_MATCHER_(tn, F, $j) gmock_a$j]]]] -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, F) \ - GMOCK_RESULT_(tn, F) ct Method($arg_as) constness { \ - GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \ - tn ::testing::internal::Function::ArgumentTuple>::value == $i, \ - this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \ - GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \ - } \ - ::testing::MockSpec& \ - gmock_##Method($matcher_as) constness { \ - return GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this).With($as); \ - } \ - mutable ::testing::FunctionMocker GMOCK_MOCKER_($i, constness, Method) - - -]] -$for i [[ -#define MOCK_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, , , m, F) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, const, , m, F) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_T(m, F) GMOCK_METHOD$i[[]]_(typename, , , m, F) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_T(m, F) [[]] -GMOCK_METHOD$i[[]]_(typename, const, , m, F) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) [[]] -GMOCK_METHOD$i[[]]_(, , ct, m, F) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD$i[[]]_(, const, ct, m, F) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD$i[[]]_(typename, , ct, m, F) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \ - GMOCK_METHOD$i[[]]_(typename, const, ct, m, F) - -]] - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h deleted file mode 100644 index 1a3e60b3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h +++ /dev/null @@ -1,1916 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic matchers. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ - -#include -#include -#include -#include -#include - -namespace testing { -namespace internal { - -// The type of the i-th (0-based) field of Tuple. -#define GMOCK_FIELD_TYPE_(Tuple, i) \ - typename ::std::tr1::tuple_element::type - -// TupleFields is for selecting fields from a -// tuple of type Tuple. It has two members: -// -// type: a tuple type whose i-th field is the ki-th field of Tuple. -// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple. -// -// For example, in class TupleFields, 2, 0>, we have: -// -// type is tuple, and -// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true). - -template -class TupleFields; - -// This generic version is used when there are 10 selectors. -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t), - get(t), get(t), get(t), get(t), get(t)); - } -}; - -// The following specialization is used for 0 ~ 9 selectors. - -template -class TupleFields { - public: - typedef ::std::tr1::tuple<> type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t), - get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t), - get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t), - get(t), get(t), get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tr1::tuple type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type(get(t), get(t), get(t), get(t), get(t), - get(t), get(t), get(t), get(t)); - } -}; - -#undef GMOCK_FIELD_TYPE_ - -// Implements the Args() matcher. -template -class ArgsMatcherImpl : public MatcherInterface { - public: - // ArgsTuple may have top-level const or reference modifiers. - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(ArgsTuple)) RawArgsTuple; - typedef typename internal::TupleFields::type SelectedArgs; - typedef Matcher MonomorphicInnerMatcher; - - template - explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher) - : inner_matcher_(SafeMatcherCast(inner_matcher)) {} - - virtual bool Matches(ArgsTuple args) const { - return inner_matcher_.Matches(GetSelectedArgs(args)); - } - - virtual void DescribeTo(::std::ostream* os) const { - PrintIndices(os); - inner_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - PrintIndices(os); - inner_matcher_.DescribeNegationTo(os); - } - - virtual void ExplainMatchResultTo(ArgsTuple args, - ::std::ostream* os) const { - inner_matcher_.ExplainMatchResultTo(GetSelectedArgs(args), os); - } - - private: - static SelectedArgs GetSelectedArgs(ArgsTuple args) { - return TupleFields::GetSelectedFields(args); - } - - // Prints the indices of the selected fields. - static void PrintIndices(::std::ostream* os) { - *os << "are a tuple whose fields ("; - const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 }; - for (int i = 0; i < 10; i++) { - if (indices[i] < 0) - break; - - if (i >= 1) - *os << ", "; - - *os << "#" << indices[i]; - } - *os << ") "; - } - - const MonomorphicInnerMatcher inner_matcher_; -}; - -template -class ArgsMatcher { - public: - explicit ArgsMatcher(const InnerMatcher& inner_matcher) - : inner_matcher_(inner_matcher) {} - - template - operator Matcher() const { - return MakeMatcher(new ArgsMatcherImpl(inner_matcher_)); - } - - const InnerMatcher inner_matcher_; -}; - -// Implements ElementsAre() and ElementsAreArray(). -template -class ElementsAreMatcherImpl : public MatcherInterface { - public: - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) RawContainer; - typedef internal::StlContainerView View; - typedef typename View::type StlContainer; - typedef typename View::const_reference StlContainerReference; - typedef typename StlContainer::value_type Element; - - // Constructs the matcher from a sequence of element values or - // element matchers. - template - ElementsAreMatcherImpl(InputIter first, size_t count) { - matchers_.reserve(count); - InputIter it = first; - for (size_t i = 0; i != count; ++i, ++it) { - matchers_.push_back(MatcherCast(*it)); - } - } - - // Returns true iff 'container' matches. - virtual bool Matches(Container container) const { - StlContainerReference stl_container = View::ConstReference(container); - if (stl_container.size() != count()) - return false; - - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - if (!matchers_[i].Matches(*it)) - return false; - } - - return true; - } - - // Describes what this matcher does. - virtual void DescribeTo(::std::ostream* os) const { - if (count() == 0) { - *os << "is empty"; - } else if (count() == 1) { - *os << "has 1 element that "; - matchers_[0].DescribeTo(os); - } else { - *os << "has " << Elements(count()) << " where\n"; - for (size_t i = 0; i != count(); ++i) { - *os << "element " << i << " "; - matchers_[i].DescribeTo(os); - if (i + 1 < count()) { - *os << ",\n"; - } - } - } - } - - // Describes what the negation of this matcher does. - virtual void DescribeNegationTo(::std::ostream* os) const { - if (count() == 0) { - *os << "is not empty"; - return; - } - - *os << "does not have " << Elements(count()) << ", or\n"; - for (size_t i = 0; i != count(); ++i) { - *os << "element " << i << " "; - matchers_[i].DescribeNegationTo(os); - if (i + 1 < count()) { - *os << ", or\n"; - } - } - } - - // Explains why 'container' matches, or doesn't match, this matcher. - virtual void ExplainMatchResultTo(Container container, - ::std::ostream* os) const { - StlContainerReference stl_container = View::ConstReference(container); - if (Matches(container)) { - // We need to explain why *each* element matches (the obvious - // ones can be skipped). - - bool reason_printed = false; - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - ::std::stringstream ss; - matchers_[i].ExplainMatchResultTo(*it, &ss); - - const string s = ss.str(); - if (!s.empty()) { - if (reason_printed) { - *os << ",\n"; - } - *os << "element " << i << " " << s; - reason_printed = true; - } - } - } else { - // We need to explain why the container doesn't match. - const size_t actual_count = stl_container.size(); - if (actual_count != count()) { - // The element count doesn't match. If the container is - // empty, there's no need to explain anything as Google Mock - // already prints the empty container. Otherwise we just need - // to show how many elements there actually are. - if (actual_count != 0) { - *os << "has " << Elements(actual_count); - } - return; - } - - // The container has the right size but at least one element - // doesn't match expectation. We need to find this element and - // explain why it doesn't match. - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - if (matchers_[i].Matches(*it)) { - continue; - } - - *os << "element " << i << " doesn't match"; - - ::std::stringstream ss; - matchers_[i].ExplainMatchResultTo(*it, &ss); - const string s = ss.str(); - if (!s.empty()) { - *os << " (" << s << ")"; - } - return; - } - } - } - - private: - static Message Elements(size_t count) { - return Message() << count << (count == 1 ? " element" : " elements"); - } - - size_t count() const { return matchers_.size(); } - std::vector > matchers_; -}; - -// Implements ElementsAre() of 0-10 arguments. - -class ElementsAreMatcher0 { - public: - ElementsAreMatcher0() {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher* const matchers = NULL; - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 0)); - } -}; - -template -class ElementsAreMatcher1 { - public: - explicit ElementsAreMatcher1(const T1& e1) : e1_(e1) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 1)); - } - - private: - const T1& e1_; -}; - -template -class ElementsAreMatcher2 { - public: - ElementsAreMatcher2(const T1& e1, const T2& e2) : e1_(e1), e2_(e2) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 2)); - } - - private: - const T1& e1_; - const T2& e2_; -}; - -template -class ElementsAreMatcher3 { - public: - ElementsAreMatcher3(const T1& e1, const T2& e2, const T3& e3) : e1_(e1), - e2_(e2), e3_(e3) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 3)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; -}; - -template -class ElementsAreMatcher4 { - public: - ElementsAreMatcher4(const T1& e1, const T2& e2, const T3& e3, - const T4& e4) : e1_(e1), e2_(e2), e3_(e3), e4_(e4) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 4)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; -}; - -template -class ElementsAreMatcher5 { - public: - ElementsAreMatcher5(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 5)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; -}; - -template -class ElementsAreMatcher6 { - public: - ElementsAreMatcher6(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), - e5_(e5), e6_(e6) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - MatcherCast(e6_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 6)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; - const T6& e6_; -}; - -template -class ElementsAreMatcher7 { - public: - ElementsAreMatcher7(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7) : e1_(e1), e2_(e2), e3_(e3), - e4_(e4), e5_(e5), e6_(e6), e7_(e7) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - MatcherCast(e6_), - MatcherCast(e7_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 7)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; - const T6& e6_; - const T7& e7_; -}; - -template -class ElementsAreMatcher8 { - public: - ElementsAreMatcher8(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8) : e1_(e1), - e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6), e7_(e7), e8_(e8) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - MatcherCast(e6_), - MatcherCast(e7_), - MatcherCast(e8_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 8)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; - const T6& e6_; - const T7& e7_; - const T8& e8_; -}; - -template -class ElementsAreMatcher9 { - public: - ElementsAreMatcher9(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8, - const T9& e9) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6), - e7_(e7), e8_(e8), e9_(e9) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - MatcherCast(e6_), - MatcherCast(e7_), - MatcherCast(e8_), - MatcherCast(e9_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 9)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; - const T6& e6_; - const T7& e7_; - const T8& e8_; - const T9& e9_; -}; - -template -class ElementsAreMatcher10 { - public: - ElementsAreMatcher10(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9, - const T10& e10) : e1_(e1), e2_(e2), e3_(e3), e4_(e4), e5_(e5), e6_(e6), - e7_(e7), e8_(e8), e9_(e9), e10_(e10) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - MatcherCast(e1_), - MatcherCast(e2_), - MatcherCast(e3_), - MatcherCast(e4_), - MatcherCast(e5_), - MatcherCast(e6_), - MatcherCast(e7_), - MatcherCast(e8_), - MatcherCast(e9_), - MatcherCast(e10_), - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 10)); - } - - private: - const T1& e1_; - const T2& e2_; - const T3& e3_; - const T4& e4_; - const T5& e5_; - const T6& e6_; - const T7& e7_; - const T8& e8_; - const T9& e9_; - const T10& e10_; -}; - -// Implements ElementsAreArray(). -template -class ElementsAreArrayMatcher { - public: - ElementsAreArrayMatcher(const T* first, size_t count) : - first_(first), count_(count) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - return MakeMatcher(new ElementsAreMatcherImpl(first_, count_)); - } - - private: - const T* const first_; - const size_t count_; -}; - -} // namespace internal - -// Args(a_matcher) matches a tuple if the selected -// fields of it matches a_matcher. C++ doesn't support default -// arguments for function templates, so we have to overload it. -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -// ElementsAre(e0, e1, ..., e_n) matches an STL-style container with -// (n + 1) elements, where the i-th element in the container must -// match the i-th argument in the list. Each argument of -// ElementsAre() can be either a value or a matcher. We support up to -// 10 arguments. -// -// NOTE: Since ElementsAre() cares about the order of the elements, it -// must not be used with containers whose elements's order is -// undefined (e.g. hash_map). - -inline internal::ElementsAreMatcher0 ElementsAre() { - return internal::ElementsAreMatcher0(); -} - -template -inline internal::ElementsAreMatcher1 ElementsAre(const T1& e1) { - return internal::ElementsAreMatcher1(e1); -} - -template -inline internal::ElementsAreMatcher2 ElementsAre(const T1& e1, - const T2& e2) { - return internal::ElementsAreMatcher2(e1, e2); -} - -template -inline internal::ElementsAreMatcher3 ElementsAre(const T1& e1, - const T2& e2, const T3& e3) { - return internal::ElementsAreMatcher3(e1, e2, e3); -} - -template -inline internal::ElementsAreMatcher4 ElementsAre(const T1& e1, - const T2& e2, const T3& e3, const T4& e4) { - return internal::ElementsAreMatcher4(e1, e2, e3, e4); -} - -template -inline internal::ElementsAreMatcher5 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5) { - return internal::ElementsAreMatcher5(e1, e2, e3, e4, e5); -} - -template -inline internal::ElementsAreMatcher6 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6) { - return internal::ElementsAreMatcher6(e1, e2, e3, e4, - e5, e6); -} - -template -inline internal::ElementsAreMatcher7 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7) { - return internal::ElementsAreMatcher7(e1, e2, e3, - e4, e5, e6, e7); -} - -template -inline internal::ElementsAreMatcher8 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8) { - return internal::ElementsAreMatcher8(e1, e2, - e3, e4, e5, e6, e7, e8); -} - -template -inline internal::ElementsAreMatcher9 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) { - return internal::ElementsAreMatcher9(e1, - e2, e3, e4, e5, e6, e7, e8, e9); -} - -template -inline internal::ElementsAreMatcher10 ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, - const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9, - const T10& e10) { - return internal::ElementsAreMatcher10(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10); -} - -// ElementsAreArray(array) and ElementAreArray(array, count) are like -// ElementsAre(), except that they take an array of values or -// matchers. The former form infers the size of 'array', which must -// be a static C-style array. In the latter form, 'array' can either -// be a static array or a pointer to a dynamically created array. - -template -inline internal::ElementsAreArrayMatcher ElementsAreArray( - const T* first, size_t count) { - return internal::ElementsAreArrayMatcher(first, count); -} - -template -inline internal::ElementsAreArrayMatcher -ElementsAreArray(const T (&array)[N]) { - return internal::ElementsAreArrayMatcher(array, N); -} - -} // namespace testing - -// The MATCHER* family of macros can be used in a namespace scope to -// define custom matchers easily. The syntax: -// -// MATCHER(name, description_string) { statements; } -// -// will define a matcher with the given name that executes the -// statements, which must return a bool to indicate if the match -// succeeds. Inside the statements, you can refer to the value being -// matched by 'arg', and refer to its type by 'arg_type'. -// -// The description string documents what the matcher does, and is used -// to generate the failure message when the match fails. Since a -// MATCHER() is usually defined in a header file shared by multiple -// C++ source files, we require the description to be a C-string -// literal to avoid possible side effects. It can be empty, in which -// case we'll use the sequence of words in the matcher name as the -// description. -// -// For example: -// -// MATCHER(IsEven, "") { return (arg % 2) == 0; } -// -// allows you to write -// -// // Expects mock_foo.Bar(n) to be called where n is even. -// EXPECT_CALL(mock_foo, Bar(IsEven())); -// -// or, -// -// // Verifies that the value of some_expression is even. -// EXPECT_THAT(some_expression, IsEven()); -// -// If the above assertion fails, it will print something like: -// -// Value of: some_expression -// Expected: is even -// Actual: 7 -// -// where the description "is even" is automatically calculated from the -// matcher name IsEven. -// -// Note that the type of the value being matched (arg_type) is -// determined by the context in which you use the matcher and is -// supplied to you by the compiler, so you don't need to worry about -// declaring it (nor can you). This allows the matcher to be -// polymorphic. For example, IsEven() can be used to match any type -// where the value of "(arg % 2) == 0" can be implicitly converted to -// a bool. In the "Bar(IsEven())" example above, if method Bar() -// takes an int, 'arg_type' will be int; if it takes an unsigned long, -// 'arg_type' will be unsigned long; and so on. -// -// Sometimes you'll want to parameterize the matcher. For that you -// can use another macro: -// -// MATCHER_P(name, param_name, description_string) { statements; } -// -// For example: -// -// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } -// -// will allow you to write: -// -// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); -// -// which may lead to this message (assuming n is 10): -// -// Value of: Blah("a") -// Expected: has absolute value 10 -// Actual: -9 -// -// Note that both the matcher description and its parameter are -// printed, making the message human-friendly. -// -// In the matcher definition body, you can write 'foo_type' to -// reference the type of a parameter named 'foo'. For example, in the -// body of MATCHER_P(HasAbsoluteValue, value) above, you can write -// 'value_type' to refer to the type of 'value'. -// -// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to -// support multi-parameter matchers. -// -// When defining a parameterized matcher, you can use Python-style -// interpolations in the description string to refer to the parameter -// values. We support the following syntax currently: -// -// %% a single '%' character -// %(*)s all parameters of the matcher printed as a tuple -// %(foo)s value of the matcher parameter named 'foo' -// -// For example, -// -// MATCHER_P2(InClosedRange, low, hi, "is in range [%(low)s, %(hi)s]") { -// return low <= arg && arg <= hi; -// } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// -// would generate a failure that contains the message: -// -// Expected: is in range [4, 6] -// -// If you specify "" as the description, the failure message will -// contain the sequence of words in the matcher name followed by the -// parameter values printed as a tuple. For example, -// -// MATCHER_P2(InClosedRange, low, hi, "") { ... } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// -// would generate a failure that contains the text: -// -// Expected: in closed range (4, 6) -// -// For the purpose of typing, you can view -// -// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } -// -// as shorthand for -// -// template -// FooMatcherPk -// Foo(p1_type p1, ..., pk_type pk) { ... } -// -// When you write Foo(v1, ..., vk), the compiler infers the types of -// the parameters v1, ..., and vk for you. If you are not happy with -// the result of the type inference, you can specify the types by -// explicitly instantiating the template, as in Foo(5, -// false). As said earlier, you don't get to (or need to) specify -// 'arg_type' as that's determined by the context in which the matcher -// is used. You can assign the result of expression Foo(p1, ..., pk) -// to a variable of type FooMatcherPk. This -// can be useful when composing matchers. -// -// While you can instantiate a matcher template with reference types, -// passing the parameters by pointer usually makes your code more -// readable. If, however, you still want to pass a parameter by -// reference, be aware that in the failure message generated by the -// matcher you will see the value of the referenced object but not its -// address. -// -// You can overload matchers with different numbers of parameters: -// -// MATCHER_P(Blah, a, description_string1) { ... } -// MATCHER_P2(Blah, a, b, description_string2) { ... } -// -// While it's tempting to always use the MATCHER* macros when defining -// a new matcher, you should also consider implementing -// MatcherInterface or using MakePolymorphicMatcher() instead, -// especially if you need to use the matcher a lot. While these -// approaches require more work, they give you more control on the -// types of the value being matched and the matcher parameters, which -// in general leads to better compiler error messages that pay off in -// the long run. They also allow overloading matchers based on -// parameter types (as opposed to just based on the number of -// parameters). -// -// CAVEAT: -// -// MATCHER*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using MATCHER*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'MATCHER' -// on http://code.google.com/p/googlemock/wiki/CookBook. - -namespace testing { -namespace internal { - -// Constants denoting interpolations in a matcher description string. -const int kTupleInterpolation = -1; // "%(*)s" -const int kPercentInterpolation = -2; // "%%" -const int kInvalidInterpolation = -3; // "%" followed by invalid text - -// Records the location and content of an interpolation. -struct Interpolation { - Interpolation(const char* start, const char* end, int param) - : start_pos(start), end_pos(end), param_index(param) {} - - // Points to the start of the interpolation (the '%' character). - const char* start_pos; - // Points to the first character after the interpolation. - const char* end_pos; - // 0-based index of the interpolated matcher parameter; - // kTupleInterpolation for "%(*)s"; kPercentInterpolation for "%%". - int param_index; -}; - -typedef ::std::vector Interpolations; - -// Parses a matcher description string and returns a vector of -// interpolations that appear in the string; generates non-fatal -// failures iff 'description' is an invalid matcher description. -// 'param_names' is a NULL-terminated array of parameter names in the -// order they appear in the MATCHER_P*() parameter list. -Interpolations ValidateMatcherDescription( - const char* param_names[], const char* description); - -// Returns the actual matcher description, given the matcher name, -// user-supplied description template string, interpolations in the -// string, and the printed values of the matcher parameters. -string FormatMatcherDescription( - const char* matcher_name, const char* description, - const Interpolations& interp, const Strings& param_values); - -} // namespace internal -} // namespace testing - -#define MATCHER(name, description)\ - class name##Matcher {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(const ::testing::internal::Interpolations& gmock_interp)\ - : gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple<>());\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(gmock_interp_));\ - }\ - name##Matcher() {\ - const char* gmock_param_names[] = { NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - inline name##Matcher name() {\ - return name##Matcher();\ - }\ - template \ - bool name##Matcher::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P(name, p0, description)\ - template \ - class name##MatcherP {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - explicit gmock_Impl(p0##_type gmock_p0, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, gmock_interp_));\ - }\ - name##MatcherP(p0##_type gmock_p0) : p0(gmock_p0) {\ - const char* gmock_param_names[] = { #p0, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP name(p0##_type p0) {\ - return name##MatcherP(p0);\ - }\ - template \ - template \ - bool name##MatcherP::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P2(name, p0, p1, description)\ - template \ - class name##MatcherP2 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, gmock_interp_));\ - }\ - name##MatcherP2(p0##_type gmock_p0, p1##_type gmock_p1) : p0(gmock_p0), \ - p1(gmock_p1) {\ - const char* gmock_param_names[] = { #p0, #p1, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP2 name(p0##_type p0, \ - p1##_type p1) {\ - return name##MatcherP2(p0, p1);\ - }\ - template \ - template \ - bool name##MatcherP2::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P3(name, p0, p1, p2, description)\ - template \ - class name##MatcherP3 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, \ - p2));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, gmock_interp_));\ - }\ - name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP3 name(p0##_type p0, \ - p1##_type p1, p2##_type p2) {\ - return name##MatcherP3(p0, p1, p2);\ - }\ - template \ - template \ - bool name##MatcherP3::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P4(name, p0, p1, p2, p3, description)\ - template \ - class name##MatcherP4 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, gmock_interp_));\ - }\ - name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP4 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3) {\ - return name##MatcherP4(p0, \ - p1, p2, p3);\ - }\ - template \ - template \ - bool name##MatcherP4::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\ - template \ - class name##MatcherP5 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3, p4));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, gmock_interp_));\ - }\ - name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP5 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4) {\ - return name##MatcherP5(p0, p1, p2, p3, p4);\ - }\ - template \ - template \ - bool name##MatcherP5::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\ - template \ - class name##MatcherP6 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), p5(gmock_p5), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3, p4, p5));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, gmock_interp_));\ - }\ - name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, #p5, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP6 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3, p4##_type p4, p5##_type p5) {\ - return name##MatcherP6(p0, p1, p2, p3, p4, p5);\ - }\ - template \ - template \ - bool name##MatcherP6::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\ - template \ - class name##MatcherP7 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3, p4, p5, \ - p6));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, gmock_interp_));\ - }\ - name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \ - p6(gmock_p6) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, #p5, #p6, \ - NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP7 name(p0##_type p0, p1##_type p1, \ - p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6) {\ - return name##MatcherP7(p0, p1, p2, p3, p4, p5, p6);\ - }\ - template \ - template \ - bool name##MatcherP7::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\ - template \ - class name##MatcherP8 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, \ - p3, p4, p5, p6, p7));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, \ - gmock_interp_));\ - }\ - name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, #p5, #p6, \ - #p7, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP8 name(p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6, p7##_type p7) {\ - return name##MatcherP8(p0, p1, p2, p3, p4, p5, \ - p6, p7);\ - }\ - template \ - template \ - bool name##MatcherP8::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\ - template \ - class name##MatcherP9 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3, p4, p5, p6, p7, p8));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, p8, \ - gmock_interp_));\ - }\ - name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ - p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, #p5, #p6, \ - #p7, #p8, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP9 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ - p8##_type p8) {\ - return name##MatcherP9(p0, p1, p2, \ - p3, p4, p5, p6, p7, p8);\ - }\ - template \ - template \ - bool name##MatcherP9::\ - gmock_Impl::Matches(arg_type arg) const - -#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\ - template \ - class name##MatcherP10 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9, \ - const ::testing::internal::Interpolations& gmock_interp)\ - : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ - p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ - p8(gmock_p8), p9(gmock_p9), gmock_interp_(gmock_interp) {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, \ - gmock_interp_));\ - }\ - name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), \ - p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), \ - p7(gmock_p7), p8(gmock_p8), p9(gmock_p9) {\ - const char* gmock_param_names[] = { #p0, #p1, #p2, #p3, #p4, #p5, #p6, \ - #p7, #p8, #p9, NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - inline name##MatcherP10 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9) {\ - return name##MatcherP10(p0, \ - p1, p2, p3, p4, p5, p6, p7, p8, p9);\ - }\ - template \ - template \ - bool name##MatcherP10::\ - gmock_Impl::Matches(arg_type arg) const - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h.pump deleted file mode 100644 index 653a2e87..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-matchers.h.pump +++ /dev/null @@ -1,742 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-variadic-actions.h. -$$ -$var n = 10 $$ The maximum arity we support. -$$ }} This line fixes auto-indentation of the following code in Emacs. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic matchers. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ - -#include -#include -#include -#include -#include - -namespace testing { -namespace internal { - -$range i 0..n-1 - -// The type of the i-th (0-based) field of Tuple. -#define GMOCK_FIELD_TYPE_(Tuple, i) \ - typename ::std::tr1::tuple_element::type - -// TupleFields is for selecting fields from a -// tuple of type Tuple. It has two members: -// -// type: a tuple type whose i-th field is the ki-th field of Tuple. -// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple. -// -// For example, in class TupleFields, 2, 0>, we have: -// -// type is tuple, and -// GetSelectedFields(make_tuple(true, 'a', 42)) is (42, true). - -template -class TupleFields; - -// This generic version is used when there are $n selectors. -template -class TupleFields { - public: - typedef ::std::tr1::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type($for i, [[get(t)]]); - } -}; - -// The following specialization is used for 0 ~ $(n-1) selectors. - -$for i [[ -$$ }}} -$range j 0..i-1 -$range k 0..n-1 - -template -class TupleFields { - public: - typedef ::std::tr1::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type; - static type GetSelectedFields(const Tuple& t) { - using ::std::tr1::get; - return type($for j, [[get(t)]]); - } -}; - -]] - -#undef GMOCK_FIELD_TYPE_ - -// Implements the Args() matcher. - -$var ks = [[$for i, [[k$i]]]] -template -class ArgsMatcherImpl : public MatcherInterface { - public: - // ArgsTuple may have top-level const or reference modifiers. - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(ArgsTuple)) RawArgsTuple; - typedef typename internal::TupleFields::type SelectedArgs; - typedef Matcher MonomorphicInnerMatcher; - - template - explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher) - : inner_matcher_(SafeMatcherCast(inner_matcher)) {} - - virtual bool Matches(ArgsTuple args) const { - return inner_matcher_.Matches(GetSelectedArgs(args)); - } - - virtual void DescribeTo(::std::ostream* os) const { - PrintIndices(os); - inner_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - PrintIndices(os); - inner_matcher_.DescribeNegationTo(os); - } - - virtual void ExplainMatchResultTo(ArgsTuple args, - ::std::ostream* os) const { - inner_matcher_.ExplainMatchResultTo(GetSelectedArgs(args), os); - } - - private: - static SelectedArgs GetSelectedArgs(ArgsTuple args) { - return TupleFields::GetSelectedFields(args); - } - - // Prints the indices of the selected fields. - static void PrintIndices(::std::ostream* os) { - *os << "are a tuple whose fields ("; - const int indices[$n] = { $ks }; - for (int i = 0; i < $n; i++) { - if (indices[i] < 0) - break; - - if (i >= 1) - *os << ", "; - - *os << "#" << indices[i]; - } - *os << ") "; - } - - const MonomorphicInnerMatcher inner_matcher_; -}; - -template -class ArgsMatcher { - public: - explicit ArgsMatcher(const InnerMatcher& inner_matcher) - : inner_matcher_(inner_matcher) {} - - template - operator Matcher() const { - return MakeMatcher(new ArgsMatcherImpl(inner_matcher_)); - } - - const InnerMatcher inner_matcher_; -}; - -// Implements ElementsAre() and ElementsAreArray(). -template -class ElementsAreMatcherImpl : public MatcherInterface { - public: - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) RawContainer; - typedef internal::StlContainerView View; - typedef typename View::type StlContainer; - typedef typename View::const_reference StlContainerReference; - typedef typename StlContainer::value_type Element; - - // Constructs the matcher from a sequence of element values or - // element matchers. - template - ElementsAreMatcherImpl(InputIter first, size_t count) { - matchers_.reserve(count); - InputIter it = first; - for (size_t i = 0; i != count; ++i, ++it) { - matchers_.push_back(MatcherCast(*it)); - } - } - - // Returns true iff 'container' matches. - virtual bool Matches(Container container) const { - StlContainerReference stl_container = View::ConstReference(container); - if (stl_container.size() != count()) - return false; - - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - if (!matchers_[i].Matches(*it)) - return false; - } - - return true; - } - - // Describes what this matcher does. - virtual void DescribeTo(::std::ostream* os) const { - if (count() == 0) { - *os << "is empty"; - } else if (count() == 1) { - *os << "has 1 element that "; - matchers_[0].DescribeTo(os); - } else { - *os << "has " << Elements(count()) << " where\n"; - for (size_t i = 0; i != count(); ++i) { - *os << "element " << i << " "; - matchers_[i].DescribeTo(os); - if (i + 1 < count()) { - *os << ",\n"; - } - } - } - } - - // Describes what the negation of this matcher does. - virtual void DescribeNegationTo(::std::ostream* os) const { - if (count() == 0) { - *os << "is not empty"; - return; - } - - *os << "does not have " << Elements(count()) << ", or\n"; - for (size_t i = 0; i != count(); ++i) { - *os << "element " << i << " "; - matchers_[i].DescribeNegationTo(os); - if (i + 1 < count()) { - *os << ", or\n"; - } - } - } - - // Explains why 'container' matches, or doesn't match, this matcher. - virtual void ExplainMatchResultTo(Container container, - ::std::ostream* os) const { - StlContainerReference stl_container = View::ConstReference(container); - if (Matches(container)) { - // We need to explain why *each* element matches (the obvious - // ones can be skipped). - - bool reason_printed = false; - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - ::std::stringstream ss; - matchers_[i].ExplainMatchResultTo(*it, &ss); - - const string s = ss.str(); - if (!s.empty()) { - if (reason_printed) { - *os << ",\n"; - } - *os << "element " << i << " " << s; - reason_printed = true; - } - } - } else { - // We need to explain why the container doesn't match. - const size_t actual_count = stl_container.size(); - if (actual_count != count()) { - // The element count doesn't match. If the container is - // empty, there's no need to explain anything as Google Mock - // already prints the empty container. Otherwise we just need - // to show how many elements there actually are. - if (actual_count != 0) { - *os << "has " << Elements(actual_count); - } - return; - } - - // The container has the right size but at least one element - // doesn't match expectation. We need to find this element and - // explain why it doesn't match. - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; i != count(); ++it, ++i) { - if (matchers_[i].Matches(*it)) { - continue; - } - - *os << "element " << i << " doesn't match"; - - ::std::stringstream ss; - matchers_[i].ExplainMatchResultTo(*it, &ss); - const string s = ss.str(); - if (!s.empty()) { - *os << " (" << s << ")"; - } - return; - } - } - } - - private: - static Message Elements(size_t count) { - return Message() << count << (count == 1 ? " element" : " elements"); - } - - size_t count() const { return matchers_.size(); } - std::vector > matchers_; -}; - -// Implements ElementsAre() of 0-10 arguments. - -class ElementsAreMatcher0 { - public: - ElementsAreMatcher0() {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher* const matchers = NULL; - return MakeMatcher(new ElementsAreMatcherImpl(matchers, 0)); - } -}; - - -$range i 1..n -$for i [[ -$range j 1..i -template <$for j, [[typename T$j]]> -class ElementsAreMatcher$i { - public: - $if i==1 [[explicit ]]ElementsAreMatcher$i($for j, [[const T$j& e$j]])$if i > 0 [[ : ]] - $for j, [[e$j[[]]_(e$j)]] {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - const Matcher matchers[] = { - -$for j [[ - MatcherCast(e$j[[]]_), - -]] - }; - - return MakeMatcher(new ElementsAreMatcherImpl(matchers, $i)); - } - - private: - -$for j [[ - const T$j& e$j[[]]_; - -]] -}; - - -]] -// Implements ElementsAreArray(). -template -class ElementsAreArrayMatcher { - public: - ElementsAreArrayMatcher(const T* first, size_t count) : - first_(first), count_(count) {} - - template - operator Matcher() const { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) - RawContainer; - typedef typename internal::StlContainerView::type::value_type - Element; - - return MakeMatcher(new ElementsAreMatcherImpl(first_, count_)); - } - - private: - const T* const first_; - const size_t count_; -}; - -} // namespace internal - -// Args(a_matcher) matches a tuple if the selected -// fields of it matches a_matcher. C++ doesn't support default -// arguments for function templates, so we have to overload it. - -$range i 0..n -$for i [[ -$range j 1..i -template <$for j [[int k$j, ]]typename InnerMatcher> -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - - -]] -// ElementsAre(e0, e1, ..., e_n) matches an STL-style container with -// (n + 1) elements, where the i-th element in the container must -// match the i-th argument in the list. Each argument of -// ElementsAre() can be either a value or a matcher. We support up to -// $n arguments. -// -// NOTE: Since ElementsAre() cares about the order of the elements, it -// must not be used with containers whose elements's order is -// undefined (e.g. hash_map). - -inline internal::ElementsAreMatcher0 ElementsAre() { - return internal::ElementsAreMatcher0(); -} - -$range i 1..n -$for i [[ -$range j 1..i - -template <$for j, [[typename T$j]]> -inline internal::ElementsAreMatcher$i<$for j, [[T$j]]> ElementsAre($for j, [[const T$j& e$j]]) { - return internal::ElementsAreMatcher$i<$for j, [[T$j]]>($for j, [[e$j]]); -} - -]] - -// ElementsAreArray(array) and ElementAreArray(array, count) are like -// ElementsAre(), except that they take an array of values or -// matchers. The former form infers the size of 'array', which must -// be a static C-style array. In the latter form, 'array' can either -// be a static array or a pointer to a dynamically created array. - -template -inline internal::ElementsAreArrayMatcher ElementsAreArray( - const T* first, size_t count) { - return internal::ElementsAreArrayMatcher(first, count); -} - -template -inline internal::ElementsAreArrayMatcher -ElementsAreArray(const T (&array)[N]) { - return internal::ElementsAreArrayMatcher(array, N); -} - -} // namespace testing -$$ } // This Pump meta comment fixes auto-indentation in Emacs. It will not -$$ // show up in the generated code. - - -// The MATCHER* family of macros can be used in a namespace scope to -// define custom matchers easily. The syntax: -// -// MATCHER(name, description_string) { statements; } -// -// will define a matcher with the given name that executes the -// statements, which must return a bool to indicate if the match -// succeeds. Inside the statements, you can refer to the value being -// matched by 'arg', and refer to its type by 'arg_type'. -// -// The description string documents what the matcher does, and is used -// to generate the failure message when the match fails. Since a -// MATCHER() is usually defined in a header file shared by multiple -// C++ source files, we require the description to be a C-string -// literal to avoid possible side effects. It can be empty, in which -// case we'll use the sequence of words in the matcher name as the -// description. -// -// For example: -// -// MATCHER(IsEven, "") { return (arg % 2) == 0; } -// -// allows you to write -// -// // Expects mock_foo.Bar(n) to be called where n is even. -// EXPECT_CALL(mock_foo, Bar(IsEven())); -// -// or, -// -// // Verifies that the value of some_expression is even. -// EXPECT_THAT(some_expression, IsEven()); -// -// If the above assertion fails, it will print something like: -// -// Value of: some_expression -// Expected: is even -// Actual: 7 -// -// where the description "is even" is automatically calculated from the -// matcher name IsEven. -// -// Note that the type of the value being matched (arg_type) is -// determined by the context in which you use the matcher and is -// supplied to you by the compiler, so you don't need to worry about -// declaring it (nor can you). This allows the matcher to be -// polymorphic. For example, IsEven() can be used to match any type -// where the value of "(arg % 2) == 0" can be implicitly converted to -// a bool. In the "Bar(IsEven())" example above, if method Bar() -// takes an int, 'arg_type' will be int; if it takes an unsigned long, -// 'arg_type' will be unsigned long; and so on. -// -// Sometimes you'll want to parameterize the matcher. For that you -// can use another macro: -// -// MATCHER_P(name, param_name, description_string) { statements; } -// -// For example: -// -// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } -// -// will allow you to write: -// -// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); -// -// which may lead to this message (assuming n is 10): -// -// Value of: Blah("a") -// Expected: has absolute value 10 -// Actual: -9 -// -// Note that both the matcher description and its parameter are -// printed, making the message human-friendly. -// -// In the matcher definition body, you can write 'foo_type' to -// reference the type of a parameter named 'foo'. For example, in the -// body of MATCHER_P(HasAbsoluteValue, value) above, you can write -// 'value_type' to refer to the type of 'value'. -// -// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P$n to -// support multi-parameter matchers. -// -// When defining a parameterized matcher, you can use Python-style -// interpolations in the description string to refer to the parameter -// values. We support the following syntax currently: -// -// %% a single '%' character -// %(*)s all parameters of the matcher printed as a tuple -// %(foo)s value of the matcher parameter named 'foo' -// -// For example, -// -// MATCHER_P2(InClosedRange, low, hi, "is in range [%(low)s, %(hi)s]") { -// return low <= arg && arg <= hi; -// } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// -// would generate a failure that contains the message: -// -// Expected: is in range [4, 6] -// -// If you specify "" as the description, the failure message will -// contain the sequence of words in the matcher name followed by the -// parameter values printed as a tuple. For example, -// -// MATCHER_P2(InClosedRange, low, hi, "") { ... } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// -// would generate a failure that contains the text: -// -// Expected: in closed range (4, 6) -// -// For the purpose of typing, you can view -// -// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } -// -// as shorthand for -// -// template -// FooMatcherPk -// Foo(p1_type p1, ..., pk_type pk) { ... } -// -// When you write Foo(v1, ..., vk), the compiler infers the types of -// the parameters v1, ..., and vk for you. If you are not happy with -// the result of the type inference, you can specify the types by -// explicitly instantiating the template, as in Foo(5, -// false). As said earlier, you don't get to (or need to) specify -// 'arg_type' as that's determined by the context in which the matcher -// is used. You can assign the result of expression Foo(p1, ..., pk) -// to a variable of type FooMatcherPk. This -// can be useful when composing matchers. -// -// While you can instantiate a matcher template with reference types, -// passing the parameters by pointer usually makes your code more -// readable. If, however, you still want to pass a parameter by -// reference, be aware that in the failure message generated by the -// matcher you will see the value of the referenced object but not its -// address. -// -// You can overload matchers with different numbers of parameters: -// -// MATCHER_P(Blah, a, description_string1) { ... } -// MATCHER_P2(Blah, a, b, description_string2) { ... } -// -// While it's tempting to always use the MATCHER* macros when defining -// a new matcher, you should also consider implementing -// MatcherInterface or using MakePolymorphicMatcher() instead, -// especially if you need to use the matcher a lot. While these -// approaches require more work, they give you more control on the -// types of the value being matched and the matcher parameters, which -// in general leads to better compiler error messages that pay off in -// the long run. They also allow overloading matchers based on -// parameter types (as opposed to just based on the number of -// parameters). -// -// CAVEAT: -// -// MATCHER*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using MATCHER*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'MATCHER' -// on http://code.google.com/p/googlemock/wiki/CookBook. - -namespace testing { -namespace internal { - -// Constants denoting interpolations in a matcher description string. -const int kTupleInterpolation = -1; // "%(*)s" -const int kPercentInterpolation = -2; // "%%" -const int kInvalidInterpolation = -3; // "%" followed by invalid text - -// Records the location and content of an interpolation. -struct Interpolation { - Interpolation(const char* start, const char* end, int param) - : start_pos(start), end_pos(end), param_index(param) {} - - // Points to the start of the interpolation (the '%' character). - const char* start_pos; - // Points to the first character after the interpolation. - const char* end_pos; - // 0-based index of the interpolated matcher parameter; - // kTupleInterpolation for "%(*)s"; kPercentInterpolation for "%%". - int param_index; -}; - -typedef ::std::vector Interpolations; - -// Parses a matcher description string and returns a vector of -// interpolations that appear in the string; generates non-fatal -// failures iff 'description' is an invalid matcher description. -// 'param_names' is a NULL-terminated array of parameter names in the -// order they appear in the MATCHER_P*() parameter list. -Interpolations ValidateMatcherDescription( - const char* param_names[], const char* description); - -// Returns the actual matcher description, given the matcher name, -// user-supplied description template string, interpolations in the -// string, and the printed values of the matcher parameters. -string FormatMatcherDescription( - const char* matcher_name, const char* description, - const Interpolations& interp, const Strings& param_values); - -} // namespace internal -} // namespace testing - -$range i 0..n -$for i - -[[ -$var macro_name = [[$if i==0 [[MATCHER]] $elif i==1 [[MATCHER_P]] - $else [[MATCHER_P$i]]]] -$var class_name = [[name##Matcher[[$if i==0 [[]] $elif i==1 [[P]] - $else [[P$i]]]]]] -$range j 0..i-1 -$var template = [[$if i==0 [[]] $else [[ - - template <$for j, [[typename p$j##_type]]>\ -]]]] -$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]] -$var impl_ctor_param_list = [[$for j [[p$j##_type gmock_p$j, ]] -const ::testing::internal::Interpolations& gmock_interp]] -$var impl_inits = [[ : $for j [[p$j(gmock_p$j), ]]gmock_interp_(gmock_interp)]] -$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(gmock_p$j)]]]]]] -$var params_and_interp = [[$for j [[p$j, ]]gmock_interp_]] -$var params = [[$for j, [[p$j]]]] -$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]] -$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]] -$var param_field_decls = [[$for j -[[ - - p$j##_type p$j;\ -]]]] -$var param_field_decls2 = [[$for j -[[ - - p$j##_type p$j;\ -]]]] - -#define $macro_name(name$for j [[, p$j]], description)\$template - class $class_name {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface {\ - public:\ - [[$if i==1 [[explicit ]]]]gmock_Impl($impl_ctor_param_list)\ - $impl_inits {}\ - virtual bool Matches(arg_type arg) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - const ::testing::internal::Strings& gmock_printed_params = \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tr1::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]]));\ - *gmock_os << ::testing::internal::FormatMatcherDescription(\ - #name, description, gmock_interp_, gmock_printed_params);\ - }\$param_field_decls - const ::testing::internal::Interpolations gmock_interp_;\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl($params_and_interp));\ - }\ - $class_name($ctor_param_list)$inits {\ - const char* gmock_param_names[] = { $for j [[#p$j, ]]NULL };\ - gmock_interp_ = ::testing::internal::ValidateMatcherDescription(\ - gmock_param_names, ("" description ""));\ - }\$param_field_decls2 - ::testing::internal::Interpolations gmock_interp_;\ - };\$template - inline $class_name$param_types name($param_types_and_names) {\ - return $class_name$param_types($params);\ - }\$template - template \ - bool $class_name$param_types::\ - gmock_Impl::Matches(arg_type arg) const -]] - - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h deleted file mode 100644 index f961d796..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h +++ /dev/null @@ -1,244 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements class templates NiceMock and StrictMock. -// -// Given a mock class MockFoo that is created using Google Mock, -// NiceMock is a subclass of MockFoo that allows -// uninteresting calls (i.e. calls to mock methods that have no -// EXPECT_CALL specs), and StrictMock is a subclass of -// MockFoo that treats all uninteresting calls as errors. -// -// NiceMock and StrictMock "inherits" the constructors of their -// respective base class, with up-to 10 arguments. Therefore you can -// write NiceMock(5, "a") to construct a nice mock where -// MockFoo has a constructor that accepts (int, const char*), for -// example. -// -// A known limitation is that NiceMock and -// StrictMock only works for mock methods defined using the -// MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. If a -// mock method is defined in a base class of MockFoo, the "nice" or -// "strict" modifier may not affect it, depending on the compiler. In -// particular, nesting NiceMock and StrictMock is NOT supported. -// -// Another known limitation is that the constructors of the base mock -// cannot have arguments passed by non-const reference, which are -// banned by the Google C++ style guide anyway. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ - -#include -#include - -namespace testing { - -template -class NiceMock : public MockClass { - public: - // We don't factor out the constructor body to a common method, as - // we have to avoid a possible clash with members of MockClass. - NiceMock() { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - // C++ doesn't (yet) allow inheritance of constructors, so we have - // to define it for each arity. - template - explicit NiceMock(const A1& a1) : MockClass(a1) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - template - NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) : MockClass(a1, a2, a3, a4) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5) : MockClass(a1, a2, a3, a4, a5) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5, - a6, a7) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1, - a2, a3, a4, a5, a6, a7, a8) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, - const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, - const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - virtual ~NiceMock() { - Mock::UnregisterCallReaction(internal::implicit_cast(this)); - } -}; - -template -class StrictMock : public MockClass { - public: - // We don't factor out the constructor body to a common method, as - // we have to avoid a possible clash with members of MockClass. - StrictMock() { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - explicit StrictMock(const A1& a1) : MockClass(a1) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - template - StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) : MockClass(a1, a2, a3, a4) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5) : MockClass(a1, a2, a3, a4, a5) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5, - a6, a7) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1, - a2, a3, a4, a5, a6, a7, a8) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, - const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, - const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - virtual ~StrictMock() { - Mock::UnregisterCallReaction(internal::implicit_cast(this)); - } -}; - -// The following specializations catch some (relatively more common) -// user errors of nesting nice and strict mocks. They do NOT catch -// all possible errors. - -// These specializations are declared but not defined, as NiceMock and -// StrictMock cannot be nested. -template -class NiceMock >; -template -class NiceMock >; -template -class StrictMock >; -template -class StrictMock >; - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h.pump deleted file mode 100644 index 580e79f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-generated-nice-strict.h.pump +++ /dev/null @@ -1,146 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-nice-strict.h. -$$ -$var n = 10 $$ The maximum arity we support. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements class templates NiceMock and StrictMock. -// -// Given a mock class MockFoo that is created using Google Mock, -// NiceMock is a subclass of MockFoo that allows -// uninteresting calls (i.e. calls to mock methods that have no -// EXPECT_CALL specs), and StrictMock is a subclass of -// MockFoo that treats all uninteresting calls as errors. -// -// NiceMock and StrictMock "inherits" the constructors of their -// respective base class, with up-to $n arguments. Therefore you can -// write NiceMock(5, "a") to construct a nice mock where -// MockFoo has a constructor that accepts (int, const char*), for -// example. -// -// A known limitation is that NiceMock and -// StrictMock only works for mock methods defined using the -// MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. If a -// mock method is defined in a base class of MockFoo, the "nice" or -// "strict" modifier may not affect it, depending on the compiler. In -// particular, nesting NiceMock and StrictMock is NOT supported. -// -// Another known limitation is that the constructors of the base mock -// cannot have arguments passed by non-const reference, which are -// banned by the Google C++ style guide anyway. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ - -#include -#include - -namespace testing { - -template -class NiceMock : public MockClass { - public: - // We don't factor out the constructor body to a common method, as - // we have to avoid a possible clash with members of MockClass. - NiceMock() { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - // C++ doesn't (yet) allow inheritance of constructors, so we have - // to define it for each arity. - template - explicit NiceMock(const A1& a1) : MockClass(a1) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - -$range i 2..n -$for i [[ -$range j 1..i - template <$for j, [[typename A$j]]> - NiceMock($for j, [[const A$j& a$j]]) : MockClass($for j, [[a$j]]) { - Mock::AllowUninterestingCalls(internal::implicit_cast(this)); - } - - -]] - virtual ~NiceMock() { - Mock::UnregisterCallReaction(internal::implicit_cast(this)); - } -}; - -template -class StrictMock : public MockClass { - public: - // We don't factor out the constructor body to a common method, as - // we have to avoid a possible clash with members of MockClass. - StrictMock() { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - template - explicit StrictMock(const A1& a1) : MockClass(a1) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - -$for i [[ -$range j 1..i - template <$for j, [[typename A$j]]> - StrictMock($for j, [[const A$j& a$j]]) : MockClass($for j, [[a$j]]) { - Mock::FailUninterestingCalls(internal::implicit_cast(this)); - } - - -]] - virtual ~StrictMock() { - Mock::UnregisterCallReaction(internal::implicit_cast(this)); - } -}; - -// The following specializations catch some (relatively more common) -// user errors of nesting nice and strict mocks. They do NOT catch -// all possible errors. - -// These specializations are declared but not defined, as NiceMock and -// StrictMock cannot be nested. -template -class NiceMock >; -template -class NiceMock >; -template -class StrictMock >; -template -class StrictMock >; - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-matchers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-matchers.h deleted file mode 100644 index dc252e3e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-matchers.h +++ /dev/null @@ -1,2378 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used argument matchers. More -// matchers can be defined by the user implementing the -// MatcherInterface interface if necessary. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ - -#include -#include -#include // NOLINT -#include -#include -#include - -#include -#include -#include -#include - -namespace testing { - -// To implement a matcher Foo for type T, define: -// 1. a class FooMatcherImpl that implements the -// MatcherInterface interface, and -// 2. a factory function that creates a Matcher object from a -// FooMatcherImpl*. -// -// The two-level delegation design makes it possible to allow a user -// to write "v" instead of "Eq(v)" where a Matcher is expected, which -// is impossible if we pass matchers by pointers. It also eases -// ownership management as Matcher objects can now be copied like -// plain values. - -// The implementation of a matcher. -template -class MatcherInterface { - public: - virtual ~MatcherInterface() {} - - // Returns true iff the matcher matches x. - virtual bool Matches(T x) const = 0; - - // Describes this matcher to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; - - // Describes the negation of this matcher to an ostream. For - // example, if the description of this matcher is "is greater than - // 7", the negated description could be "is not greater than 7". - // You are not required to override this when implementing - // MatcherInterface, but it is highly advised so that your matcher - // can produce good error messages. - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "not ("; - DescribeTo(os); - *os << ")"; - } - - // Explains why x matches, or doesn't match, the matcher. Override - // this to provide any additional information that helps a user - // understand the match result. - virtual void ExplainMatchResultTo(T /* x */, ::std::ostream* /* os */) const { - // By default, nothing more needs to be explained, as Google Mock - // has already printed the value of x when this function is - // called. - } -}; - -namespace internal { - -// An internal class for implementing Matcher, which will derive -// from it. We put functionalities common to all Matcher -// specializations here to avoid code duplication. -template -class MatcherBase { - public: - // Returns true iff this matcher matches x. - bool Matches(T x) const { return impl_->Matches(x); } - - // Describes this matcher to an ostream. - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } - - // Describes the negation of this matcher to an ostream. - void DescribeNegationTo(::std::ostream* os) const { - impl_->DescribeNegationTo(os); - } - - // Explains why x matches, or doesn't match, the matcher. - void ExplainMatchResultTo(T x, ::std::ostream* os) const { - impl_->ExplainMatchResultTo(x, os); - } - protected: - MatcherBase() {} - - // Constructs a matcher from its implementation. - explicit MatcherBase(const MatcherInterface* impl) - : impl_(impl) {} - - virtual ~MatcherBase() {} - private: - // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar - // interfaces. The former dynamically allocates a chunk of memory - // to hold the reference count, while the latter tracks all - // references using a circular linked list without allocating - // memory. It has been observed that linked_ptr performs better in - // typical scenarios. However, shared_ptr can out-perform - // linked_ptr when there are many more uses of the copy constructor - // than the default constructor. - // - // If performance becomes a problem, we should see if using - // shared_ptr helps. - ::testing::internal::linked_ptr > impl_; -}; - -// The default implementation of ExplainMatchResultTo() for -// polymorphic matchers. -template -inline void ExplainMatchResultTo(const PolymorphicMatcherImpl& /* impl */, - const T& /* x */, - ::std::ostream* /* os */) { - // By default, nothing more needs to be said, as Google Mock already - // prints the value of x elsewhere. -} - -} // namespace internal - -// A Matcher is a copyable and IMMUTABLE (except by assignment) -// object that can check whether a value of type T matches. The -// implementation of Matcher is just a linked_ptr to const -// MatcherInterface, so copying is fairly cheap. Don't inherit -// from Matcher! -template -class Matcher : public internal::MatcherBase { - public: - // Constructs a null matcher. Needed for storing Matcher objects in - // STL containers. - Matcher() {} - - // Constructs a matcher from its implementation. - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Implicit constructor here allows people to write - // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes - Matcher(T value); // NOLINT -}; - -// The following two specializations allow the user to write str -// instead of Eq(str) and "foo" instead of Eq("foo") when a string -// matcher is expected. -template <> -class Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a string object. - Matcher(const internal::string& s); // NOLINT - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; - -template <> -class Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a string object. - Matcher(const internal::string& s); // NOLINT - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; - -// The PolymorphicMatcher class template makes it easy to implement a -// polymorphic matcher (i.e. a matcher that can match values of more -// than one type, e.g. Eq(n) and NotNull()). -// -// To define a polymorphic matcher, a user first provides a Impl class -// that has a Matches() method, a DescribeTo() method, and a -// DescribeNegationTo() method. The Matches() method is usually a -// method template (such that it works with multiple types). Then the -// user creates the polymorphic matcher using -// MakePolymorphicMatcher(). To provide additional explanation to the -// match result, define a FREE function (or function template) -// -// void ExplainMatchResultTo(const Impl& matcher, const Value& value, -// ::std::ostream* os); -// -// in the SAME NAME SPACE where Impl is defined. See the definition -// of NotNull() for a complete example. -template -class PolymorphicMatcher { - public: - explicit PolymorphicMatcher(const Impl& impl) : impl_(impl) {} - - template - operator Matcher() const { - return Matcher(new MonomorphicImpl(impl_)); - } - private: - template - class MonomorphicImpl : public MatcherInterface { - public: - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} - - virtual bool Matches(T x) const { return impl_.Matches(x); } - - virtual void DescribeTo(::std::ostream* os) const { - impl_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - impl_.DescribeNegationTo(os); - } - - virtual void ExplainMatchResultTo(T x, ::std::ostream* os) const { - using ::testing::internal::ExplainMatchResultTo; - - // C++ uses Argument-Dependent Look-up (aka Koenig Look-up) to - // resolve the call to ExplainMatchResultTo() here. This - // means that if there's a ExplainMatchResultTo() function - // defined in the name space where class Impl is defined, it - // will be picked by the compiler as the better match. - // Otherwise the default implementation of it in - // ::testing::internal will be picked. - // - // This look-up rule lets a writer of a polymorphic matcher - // customize the behavior of ExplainMatchResultTo() when he - // cares to. Nothing needs to be done by the writer if he - // doesn't need to customize it. - ExplainMatchResultTo(impl_, x, os); - } - private: - const Impl impl_; - }; - - const Impl impl_; -}; - -// Creates a matcher from its implementation. This is easier to use -// than the Matcher constructor as it doesn't require you to -// explicitly write the template argument, e.g. -// -// MakeMatcher(foo); -// vs -// Matcher(foo); -template -inline Matcher MakeMatcher(const MatcherInterface* impl) { - return Matcher(impl); -}; - -// Creates a polymorphic matcher from its implementation. This is -// easier to use than the PolymorphicMatcher constructor as it -// doesn't require you to explicitly write the template argument, e.g. -// -// MakePolymorphicMatcher(foo); -// vs -// PolymorphicMatcher(foo); -template -inline PolymorphicMatcher MakePolymorphicMatcher(const Impl& impl) { - return PolymorphicMatcher(impl); -} - -// In order to be safe and clear, casting between different matcher -// types is done explicitly via MatcherCast(m), which takes a -// matcher m and returns a Matcher. It compiles only when T can be -// statically converted to the argument type of m. -template -Matcher MatcherCast(M m); - -// TODO(vladl@google.com): Modify the implementation to reject casting -// Matcher to Matcher. -// Implements SafeMatcherCast(). -// -// This overload handles polymorphic matchers only since monomorphic -// matchers are handled by the next one. -template -inline Matcher SafeMatcherCast(M polymorphic_matcher) { - return Matcher(polymorphic_matcher); -} - -// This overload handles monomorphic matchers. -// -// In general, if type T can be implicitly converted to type U, we can -// safely convert a Matcher to a Matcher (i.e. Matcher is -// contravariant): just keep a copy of the original Matcher, convert the -// argument from type T to U, and then pass it to the underlying Matcher. -// The only exception is when U is a reference and T is not, as the -// underlying Matcher may be interested in the argument's address, which -// is not preserved in the conversion from T to U. -template -Matcher SafeMatcherCast(const Matcher& matcher) { - // Enforce that T can be implicitly converted to U. - GMOCK_COMPILE_ASSERT_((internal::ImplicitlyConvertible::value), - T_must_be_implicitly_convertible_to_U); - // Enforce that we are not converting a non-reference type T to a reference - // type U. - GMOCK_COMPILE_ASSERT_( - internal::is_reference::value || !internal::is_reference::value, - cannot_convert_non_referentce_arg_to_reference); - // In case both T and U are arithmetic types, enforce that the - // conversion is not lossy. - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(T)) RawT; - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(U)) RawU; - const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther; - const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther; - GMOCK_COMPILE_ASSERT_( - kTIsOther || kUIsOther || - (internal::LosslessArithmeticConvertible::value), - conversion_of_arithmetic_types_must_be_lossless); - return MatcherCast(matcher); -} - -// A() returns a matcher that matches any value of type T. -template -Matcher A(); - -// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION -// and MUST NOT BE USED IN USER CODE!!! -namespace internal { - -// Appends the explanation on the result of matcher.Matches(value) to -// os iff the explanation is not empty. -template -void ExplainMatchResultAsNeededTo(const Matcher& matcher, T value, - ::std::ostream* os) { - ::std::stringstream reason; - matcher.ExplainMatchResultTo(value, &reason); - const internal::string s = reason.str(); - if (s != "") { - *os << " (" << s << ")"; - } -} - -// An internal helper class for doing compile-time loop on a tuple's -// fields. -template -class TuplePrefix { - public: - // TuplePrefix::Matches(matcher_tuple, value_tuple) returns true - // iff the first N fields of matcher_tuple matches the first N - // fields of value_tuple, respectively. - template - static bool Matches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { - using ::std::tr1::get; - return TuplePrefix::Matches(matcher_tuple, value_tuple) - && get(matcher_tuple).Matches(get(value_tuple)); - } - - // TuplePrefix::DescribeMatchFailuresTo(matchers, values, os) - // describes failures in matching the first N fields of matchers - // against the first N fields of values. If there is no failure, - // nothing will be streamed to os. - template - static void DescribeMatchFailuresTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { - using ::std::tr1::tuple_element; - using ::std::tr1::get; - - // First, describes failures in the first N - 1 fields. - TuplePrefix::DescribeMatchFailuresTo(matchers, values, os); - - // Then describes the failure (if any) in the (N - 1)-th (0-based) - // field. - typename tuple_element::type matcher = - get(matchers); - typedef typename tuple_element::type Value; - Value value = get(values); - if (!matcher.Matches(value)) { - // TODO(wan): include in the message the name of the parameter - // as used in MOCK_METHOD*() when possible. - *os << " Expected arg #" << N - 1 << ": "; - get(matchers).DescribeTo(os); - *os << "\n Actual: "; - // We remove the reference in type Value to prevent the - // universal printer from printing the address of value, which - // isn't interesting to the user most of the time. The - // matcher's ExplainMatchResultTo() method handles the case when - // the address is interesting. - internal::UniversalPrinter:: - Print(value, os); - ExplainMatchResultAsNeededTo(matcher, value, os); - *os << "\n"; - } - } -}; - -// The base case. -template <> -class TuplePrefix<0> { - public: - template - static bool Matches(const MatcherTuple& /* matcher_tuple */, - const ValueTuple& /* value_tuple */) { - return true; - } - - template - static void DescribeMatchFailuresTo(const MatcherTuple& /* matchers */, - const ValueTuple& /* values */, - ::std::ostream* /* os */) {} -}; - -// TupleMatches(matcher_tuple, value_tuple) returns true iff all -// matchers in matcher_tuple match the corresponding fields in -// value_tuple. It is a compiler error if matcher_tuple and -// value_tuple have different number of fields or incompatible field -// types. -template -bool TupleMatches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { - using ::std::tr1::tuple_size; - // Makes sure that matcher_tuple and value_tuple have the same - // number of fields. - GMOCK_COMPILE_ASSERT_(tuple_size::value == - tuple_size::value, - matcher_and_value_have_different_numbers_of_fields); - return TuplePrefix::value>:: - Matches(matcher_tuple, value_tuple); -} - -// Describes failures in matching matchers against values. If there -// is no failure, nothing will be streamed to os. -template -void DescribeMatchFailureTupleTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { - using ::std::tr1::tuple_size; - TuplePrefix::value>::DescribeMatchFailuresTo( - matchers, values, os); -} - -// The MatcherCastImpl class template is a helper for implementing -// MatcherCast(). We need this helper in order to partially -// specialize the implementation of MatcherCast() (C++ allows -// class/struct templates to be partially specialized, but not -// function templates.). - -// This general version is used when MatcherCast()'s argument is a -// polymorphic matcher (i.e. something that can be converted to a -// Matcher but is not one yet; for example, Eq(value)). -template -class MatcherCastImpl { - public: - static Matcher Cast(M polymorphic_matcher) { - return Matcher(polymorphic_matcher); - } -}; - -// This more specialized version is used when MatcherCast()'s argument -// is already a Matcher. This only compiles when type T can be -// statically converted to type U. -template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& source_matcher) { - return Matcher(new Impl(source_matcher)); - } - private: - class Impl : public MatcherInterface { - public: - explicit Impl(const Matcher& source_matcher) - : source_matcher_(source_matcher) {} - - // We delegate the matching logic to the source matcher. - virtual bool Matches(T x) const { - return source_matcher_.Matches(static_cast(x)); - } - - virtual void DescribeTo(::std::ostream* os) const { - source_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - source_matcher_.DescribeNegationTo(os); - } - - virtual void ExplainMatchResultTo(T x, ::std::ostream* os) const { - source_matcher_.ExplainMatchResultTo(static_cast(x), os); - } - private: - const Matcher source_matcher_; - }; -}; - -// This even more specialized version is used for efficiently casting -// a matcher to its own type. -template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& matcher) { return matcher; } -}; - -// Implements A(). -template -class AnyMatcherImpl : public MatcherInterface { - public: - virtual bool Matches(T /* x */) const { return true; } - virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; } - virtual void DescribeNegationTo(::std::ostream* os) const { - // This is mostly for completeness' safe, as it's not very useful - // to write Not(A()). However we cannot completely rule out - // such a possibility, and it doesn't hurt to be prepared. - *os << "never matches"; - } -}; - -// Implements _, a matcher that matches any value of any -// type. This is a polymorphic matcher, so we need a template type -// conversion operator to make it appearing as a Matcher for any -// type T. -class AnythingMatcher { - public: - template - operator Matcher() const { return A(); } -}; - -// Implements a matcher that compares a given value with a -// pre-supplied value using one of the ==, <=, <, etc, operators. The -// two values being compared don't have to have the same type. -// -// The matcher defined here is polymorphic (for example, Eq(5) can be -// used to match an int, a short, a double, etc). Therefore we use -// a template type conversion operator in the implementation. -// -// We define this as a macro in order to eliminate duplicated source -// code. -// -// The following template definition assumes that the Rhs parameter is -// a "bare" type (i.e. neither 'const T' nor 'T&'). -#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_(name, op, relation) \ - template class name##Matcher { \ - public: \ - explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \ - template \ - operator Matcher() const { \ - return MakeMatcher(new Impl(rhs_)); \ - } \ - private: \ - template \ - class Impl : public MatcherInterface { \ - public: \ - explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \ - virtual bool Matches(Lhs lhs) const { return lhs op rhs_; } \ - virtual void DescribeTo(::std::ostream* os) const { \ - *os << "is " relation " "; \ - UniversalPrinter::Print(rhs_, os); \ - } \ - virtual void DescribeNegationTo(::std::ostream* os) const { \ - *os << "is not " relation " "; \ - UniversalPrinter::Print(rhs_, os); \ - } \ - private: \ - Rhs rhs_; \ - }; \ - Rhs rhs_; \ - } - -// Implements Eq(v), Ge(v), Gt(v), Le(v), Lt(v), and Ne(v) -// respectively. -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Eq, ==, "equal to"); -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ge, >=, "greater than or equal to"); -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Gt, >, "greater than"); -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Le, <=, "less than or equal to"); -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Lt, <, "less than"); -GMOCK_IMPLEMENT_COMPARISON_MATCHER_(Ne, !=, "not equal to"); - -#undef GMOCK_IMPLEMENT_COMPARISON_MATCHER_ - -// Implements the polymorphic NotNull() matcher, which matches any -// pointer that is not NULL. -class NotNullMatcher { - public: - template - bool Matches(T* p) const { return p != NULL; } - - void DescribeTo(::std::ostream* os) const { *os << "is not NULL"; } - void DescribeNegationTo(::std::ostream* os) const { - *os << "is NULL"; - } -}; - -// Ref(variable) matches any argument that is a reference to -// 'variable'. This matcher is polymorphic as it can match any -// super type of the type of 'variable'. -// -// The RefMatcher template class implements Ref(variable). It can -// only be instantiated with a reference type. This prevents a user -// from mistakenly using Ref(x) to match a non-reference function -// argument. For example, the following will righteously cause a -// compiler error: -// -// int n; -// Matcher m1 = Ref(n); // This won't compile. -// Matcher m2 = Ref(n); // This will compile. -template -class RefMatcher; - -template -class RefMatcher { - // Google Mock is a generic framework and thus needs to support - // mocking any function types, including those that take non-const - // reference arguments. Therefore the template parameter T (and - // Super below) can be instantiated to either a const type or a - // non-const type. - public: - // RefMatcher() takes a T& instead of const T&, as we want the - // compiler to catch using Ref(const_value) as a matcher for a - // non-const reference. - explicit RefMatcher(T& x) : object_(x) {} // NOLINT - - template - operator Matcher() const { - // By passing object_ (type T&) to Impl(), which expects a Super&, - // we make sure that Super is a super type of T. In particular, - // this catches using Ref(const_value) as a matcher for a - // non-const reference, as you cannot implicitly convert a const - // reference to a non-const reference. - return MakeMatcher(new Impl(object_)); - } - private: - template - class Impl : public MatcherInterface { - public: - explicit Impl(Super& x) : object_(x) {} // NOLINT - - // Matches() takes a Super& (as opposed to const Super&) in - // order to match the interface MatcherInterface. - virtual bool Matches(Super& x) const { return &x == &object_; } // NOLINT - - virtual void DescribeTo(::std::ostream* os) const { - *os << "references the variable "; - UniversalPrinter::Print(object_, os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "does not reference the variable "; - UniversalPrinter::Print(object_, os); - } - - virtual void ExplainMatchResultTo(Super& x, // NOLINT - ::std::ostream* os) const { - *os << "is located @" << static_cast(&x); - } - private: - const Super& object_; - }; - - T& object_; -}; - -// Polymorphic helper functions for narrow and wide string matchers. -inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) { - return String::CaseInsensitiveCStringEquals(lhs, rhs); -} - -inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs, - const wchar_t* rhs) { - return String::CaseInsensitiveWideCStringEquals(lhs, rhs); -} - -// String comparison for narrow or wide strings that can have embedded NUL -// characters. -template -bool CaseInsensitiveStringEquals(const StringType& s1, - const StringType& s2) { - // Are the heads equal? - if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) { - return false; - } - - // Skip the equal heads. - const typename StringType::value_type nul = 0; - const size_t i1 = s1.find(nul), i2 = s2.find(nul); - - // Are we at the end of either s1 or s2? - if (i1 == StringType::npos || i2 == StringType::npos) { - return i1 == i2; - } - - // Are the tails equal? - return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1)); -} - -// String matchers. - -// Implements equality-based string matchers like StrEq, StrCaseNe, and etc. -template -class StrEqualityMatcher { - public: - typedef typename StringType::const_pointer ConstCharPointer; - - StrEqualityMatcher(const StringType& str, bool expect_eq, - bool case_sensitive) - : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {} - - // When expect_eq_ is true, returns true iff s is equal to string_; - // otherwise returns true iff s is not equal to string_. - bool Matches(ConstCharPointer s) const { - if (s == NULL) { - return !expect_eq_; - } - return Matches(StringType(s)); - } - - bool Matches(const StringType& s) const { - const bool eq = case_sensitive_ ? s == string_ : - CaseInsensitiveStringEquals(s, string_); - return expect_eq_ == eq; - } - - void DescribeTo(::std::ostream* os) const { - DescribeToHelper(expect_eq_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - DescribeToHelper(!expect_eq_, os); - } - private: - void DescribeToHelper(bool expect_eq, ::std::ostream* os) const { - *os << "is "; - if (!expect_eq) { - *os << "not "; - } - *os << "equal to "; - if (!case_sensitive_) { - *os << "(ignoring case) "; - } - UniversalPrinter::Print(string_, os); - } - - const StringType string_; - const bool expect_eq_; - const bool case_sensitive_; -}; - -// Implements the polymorphic HasSubstr(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class HasSubstrMatcher { - public: - typedef typename StringType::const_pointer ConstCharPointer; - - explicit HasSubstrMatcher(const StringType& substring) - : substring_(substring) {} - - // These overloaded methods allow HasSubstr(substring) to be used as a - // Matcher as long as T can be converted to string. Returns true - // iff s contains substring_ as a substring. - bool Matches(ConstCharPointer s) const { - return s != NULL && Matches(StringType(s)); - } - - bool Matches(const StringType& s) const { - return s.find(substring_) != StringType::npos; - } - - // Describes what this matcher matches. - void DescribeTo(::std::ostream* os) const { - *os << "has substring "; - UniversalPrinter::Print(substring_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "has no substring "; - UniversalPrinter::Print(substring_, os); - } - private: - const StringType substring_; -}; - -// Implements the polymorphic StartsWith(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class StartsWithMatcher { - public: - typedef typename StringType::const_pointer ConstCharPointer; - - explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) { - } - - // These overloaded methods allow StartsWith(prefix) to be used as a - // Matcher as long as T can be converted to string. Returns true - // iff s starts with prefix_. - bool Matches(ConstCharPointer s) const { - return s != NULL && Matches(StringType(s)); - } - - bool Matches(const StringType& s) const { - return s.length() >= prefix_.length() && - s.substr(0, prefix_.length()) == prefix_; - } - - void DescribeTo(::std::ostream* os) const { - *os << "starts with "; - UniversalPrinter::Print(prefix_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't start with "; - UniversalPrinter::Print(prefix_, os); - } - private: - const StringType prefix_; -}; - -// Implements the polymorphic EndsWith(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class EndsWithMatcher { - public: - typedef typename StringType::const_pointer ConstCharPointer; - - explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {} - - // These overloaded methods allow EndsWith(suffix) to be used as a - // Matcher as long as T can be converted to string. Returns true - // iff s ends with suffix_. - bool Matches(ConstCharPointer s) const { - return s != NULL && Matches(StringType(s)); - } - - bool Matches(const StringType& s) const { - return s.length() >= suffix_.length() && - s.substr(s.length() - suffix_.length()) == suffix_; - } - - void DescribeTo(::std::ostream* os) const { - *os << "ends with "; - UniversalPrinter::Print(suffix_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't end with "; - UniversalPrinter::Print(suffix_, os); - } - private: - const StringType suffix_; -}; - -#if GMOCK_HAS_REGEX - -// Implements polymorphic matchers MatchesRegex(regex) and -// ContainsRegex(regex), which can be used as a Matcher as long as -// T can be converted to a string. -class MatchesRegexMatcher { - public: - MatchesRegexMatcher(const RE* regex, bool full_match) - : regex_(regex), full_match_(full_match) {} - - // These overloaded methods allow MatchesRegex(regex) to be used as - // a Matcher as long as T can be converted to string. Returns - // true iff s matches regular expression regex. When full_match_ is - // true, a full match is done; otherwise a partial match is done. - bool Matches(const char* s) const { - return s != NULL && Matches(internal::string(s)); - } - - bool Matches(const internal::string& s) const { - return full_match_ ? RE::FullMatch(s, *regex_) : - RE::PartialMatch(s, *regex_); - } - - void DescribeTo(::std::ostream* os) const { - *os << (full_match_ ? "matches" : "contains") - << " regular expression "; - UniversalPrinter::Print(regex_->pattern(), os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't " << (full_match_ ? "match" : "contain") - << " regular expression "; - UniversalPrinter::Print(regex_->pattern(), os); - } - private: - const internal::linked_ptr regex_; - const bool full_match_; -}; - -#endif // GMOCK_HAS_REGEX - -// Implements a matcher that compares the two fields of a 2-tuple -// using one of the ==, <=, <, etc, operators. The two fields being -// compared don't have to have the same type. -// -// The matcher defined here is polymorphic (for example, Eq() can be -// used to match a tuple, a tuple, -// etc). Therefore we use a template type conversion operator in the -// implementation. -// -// We define this as a macro in order to eliminate duplicated source -// code. -#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op) \ - class name##2Matcher { \ - public: \ - template \ - operator Matcher&>() const { \ - return MakeMatcher(new Impl); \ - } \ - private: \ - template \ - class Impl : public MatcherInterface&> { \ - public: \ - virtual bool Matches(const ::std::tr1::tuple& args) const { \ - return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \ - } \ - virtual void DescribeTo(::std::ostream* os) const { \ - *os << "are a pair (x, y) where x " #op " y"; \ - } \ - virtual void DescribeNegationTo(::std::ostream* os) const { \ - *os << "are a pair (x, y) where x " #op " y is false"; \ - } \ - }; \ - } - -// Implements Eq(), Ge(), Gt(), Le(), Lt(), and Ne() respectively. -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Eq, ==); -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ge, >=); -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Gt, >); -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Le, <=); -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Lt, <); -GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(Ne, !=); - -#undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_ - -// Implements the Not(...) matcher for a particular argument type T. -// We do not nest it inside the NotMatcher class template, as that -// will prevent different instantiations of NotMatcher from sharing -// the same NotMatcherImpl class. -template -class NotMatcherImpl : public MatcherInterface { - public: - explicit NotMatcherImpl(const Matcher& matcher) - : matcher_(matcher) {} - - virtual bool Matches(T x) const { - return !matcher_.Matches(x); - } - - virtual void DescribeTo(::std::ostream* os) const { - matcher_.DescribeNegationTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - matcher_.DescribeTo(os); - } - - virtual void ExplainMatchResultTo(T x, ::std::ostream* os) const { - matcher_.ExplainMatchResultTo(x, os); - } - private: - const Matcher matcher_; -}; - -// Implements the Not(m) matcher, which matches a value that doesn't -// match matcher m. -template -class NotMatcher { - public: - explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {} - - // This template type conversion operator allows Not(m) to be used - // to match any type m can match. - template - operator Matcher() const { - return Matcher(new NotMatcherImpl(SafeMatcherCast(matcher_))); - } - private: - InnerMatcher matcher_; -}; - -// Implements the AllOf(m1, m2) matcher for a particular argument type -// T. We do not nest it inside the BothOfMatcher class template, as -// that will prevent different instantiations of BothOfMatcher from -// sharing the same BothOfMatcherImpl class. -template -class BothOfMatcherImpl : public MatcherInterface { - public: - BothOfMatcherImpl(const Matcher& matcher1, const Matcher& matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - virtual bool Matches(T x) const { - return matcher1_.Matches(x) && matcher2_.Matches(x); - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "("; - matcher1_.DescribeTo(os); - *os << ") and ("; - matcher2_.DescribeTo(os); - *os << ")"; - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "not "; - DescribeTo(os); - } - - virtual void ExplainMatchResultTo(T x, ::std::ostream* os) const { - if (Matches(x)) { - // When both matcher1_ and matcher2_ match x, we need to - // explain why *both* of them match. - ::std::stringstream ss1; - matcher1_.ExplainMatchResultTo(x, &ss1); - const internal::string s1 = ss1.str(); - - ::std::stringstream ss2; - matcher2_.ExplainMatchResultTo(x, &ss2); - const internal::string s2 = ss2.str(); - - if (s1 == "") { - *os << s2; - } else { - *os << s1; - if (s2 != "") { - *os << "; " << s2; - } - } - } else { - // Otherwise we only need to explain why *one* of them fails - // to match. - if (!matcher1_.Matches(x)) { - matcher1_.ExplainMatchResultTo(x, os); - } else { - matcher2_.ExplainMatchResultTo(x, os); - } - } - } - private: - const Matcher matcher1_; - const Matcher matcher2_; -}; - -// Used for implementing the AllOf(m_1, ..., m_n) matcher, which -// matches a value that matches all of the matchers m_1, ..., and m_n. -template -class BothOfMatcher { - public: - BothOfMatcher(Matcher1 matcher1, Matcher2 matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - // This template type conversion operator allows a - // BothOfMatcher object to match any type that - // both Matcher1 and Matcher2 can match. - template - operator Matcher() const { - return Matcher(new BothOfMatcherImpl(SafeMatcherCast(matcher1_), - SafeMatcherCast(matcher2_))); - } - private: - Matcher1 matcher1_; - Matcher2 matcher2_; -}; - -// Implements the AnyOf(m1, m2) matcher for a particular argument type -// T. We do not nest it inside the AnyOfMatcher class template, as -// that will prevent different instantiations of AnyOfMatcher from -// sharing the same EitherOfMatcherImpl class. -template -class EitherOfMatcherImpl : public MatcherInterface { - public: - EitherOfMatcherImpl(const Matcher& matcher1, const Matcher& matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - virtual bool Matches(T x) const { - return matcher1_.Matches(x) || matcher2_.Matches(x); - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "("; - matcher1_.DescribeTo(os); - *os << ") or ("; - matcher2_.DescribeTo(os); - *os << ")"; - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "not "; - DescribeTo(os); - } - - virtual void ExplainMatchResultTo(T x, ::std::ostream* os) const { - if (Matches(x)) { - // If either matcher1_ or matcher2_ matches x, we just need - // to explain why *one* of them matches. - if (matcher1_.Matches(x)) { - matcher1_.ExplainMatchResultTo(x, os); - } else { - matcher2_.ExplainMatchResultTo(x, os); - } - } else { - // Otherwise we need to explain why *neither* matches. - ::std::stringstream ss1; - matcher1_.ExplainMatchResultTo(x, &ss1); - const internal::string s1 = ss1.str(); - - ::std::stringstream ss2; - matcher2_.ExplainMatchResultTo(x, &ss2); - const internal::string s2 = ss2.str(); - - if (s1 == "") { - *os << s2; - } else { - *os << s1; - if (s2 != "") { - *os << "; " << s2; - } - } - } - } - private: - const Matcher matcher1_; - const Matcher matcher2_; -}; - -// Used for implementing the AnyOf(m_1, ..., m_n) matcher, which -// matches a value that matches at least one of the matchers m_1, ..., -// and m_n. -template -class EitherOfMatcher { - public: - EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2) - : matcher1_(matcher1), matcher2_(matcher2) {} - - // This template type conversion operator allows a - // EitherOfMatcher object to match any type that - // both Matcher1 and Matcher2 can match. - template - operator Matcher() const { - return Matcher(new EitherOfMatcherImpl( - SafeMatcherCast(matcher1_), SafeMatcherCast(matcher2_))); - } - private: - Matcher1 matcher1_; - Matcher2 matcher2_; -}; - -// Used for implementing Truly(pred), which turns a predicate into a -// matcher. -template -class TrulyMatcher { - public: - explicit TrulyMatcher(Predicate pred) : predicate_(pred) {} - - // This method template allows Truly(pred) to be used as a matcher - // for type T where T is the argument type of predicate 'pred'. The - // argument is passed by reference as the predicate may be - // interested in the address of the argument. - template - bool Matches(T& x) const { // NOLINT -#if GTEST_OS_WINDOWS - // MSVC warns about converting a value into bool (warning 4800). -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4800) // Temporarily disables warning 4800. -#endif // GTEST_OS_WINDOWS - return predicate_(x); -#if GTEST_OS_WINDOWS -#pragma warning(pop) // Restores the warning state. -#endif // GTEST_OS_WINDOWS - } - - void DescribeTo(::std::ostream* os) const { - *os << "satisfies the given predicate"; - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't satisfy the given predicate"; - } - private: - Predicate predicate_; -}; - -// Used for implementing Matches(matcher), which turns a matcher into -// a predicate. -template -class MatcherAsPredicate { - public: - explicit MatcherAsPredicate(M matcher) : matcher_(matcher) {} - - // This template operator() allows Matches(m) to be used as a - // predicate on type T where m is a matcher on type T. - // - // The argument x is passed by reference instead of by value, as - // some matcher may be interested in its address (e.g. as in - // Matches(Ref(n))(x)). - template - bool operator()(const T& x) const { - // We let matcher_ commit to a particular type here instead of - // when the MatcherAsPredicate object was constructed. This - // allows us to write Matches(m) where m is a polymorphic matcher - // (e.g. Eq(5)). - // - // If we write Matcher(matcher_).Matches(x) here, it won't - // compile when matcher_ has type Matcher; if we write - // Matcher(matcher_).Matches(x) here, it won't compile - // when matcher_ has type Matcher; if we just write - // matcher_.Matches(x), it won't compile when matcher_ is - // polymorphic, e.g. Eq(5). - // - // MatcherCast() is necessary for making the code work - // in all of the above situations. - return MatcherCast(matcher_).Matches(x); - } - private: - M matcher_; -}; - -// For implementing ASSERT_THAT() and EXPECT_THAT(). The template -// argument M must be a type that can be converted to a matcher. -template -class PredicateFormatterFromMatcher { - public: - explicit PredicateFormatterFromMatcher(const M& m) : matcher_(m) {} - - // This template () operator allows a PredicateFormatterFromMatcher - // object to act as a predicate-formatter suitable for using with - // Google Test's EXPECT_PRED_FORMAT1() macro. - template - AssertionResult operator()(const char* value_text, const T& x) const { - // We convert matcher_ to a Matcher *now* instead of - // when the PredicateFormatterFromMatcher object was constructed, - // as matcher_ may be polymorphic (e.g. NotNull()) and we won't - // know which type to instantiate it to until we actually see the - // type of x here. - // - // We write MatcherCast(matcher_) instead of - // Matcher(matcher_), as the latter won't compile when - // matcher_ has type Matcher (e.g. An()). - const Matcher matcher = MatcherCast(matcher_); - if (matcher.Matches(x)) { - return AssertionSuccess(); - } else { - ::std::stringstream ss; - ss << "Value of: " << value_text << "\n" - << "Expected: "; - matcher.DescribeTo(&ss); - ss << "\n Actual: "; - UniversalPrinter::Print(x, &ss); - ExplainMatchResultAsNeededTo(matcher, x, &ss); - return AssertionFailure(Message() << ss.str()); - } - } - private: - const M matcher_; -}; - -// A helper function for converting a matcher to a predicate-formatter -// without the user needing to explicitly write the type. This is -// used for implementing ASSERT_THAT() and EXPECT_THAT(). -template -inline PredicateFormatterFromMatcher -MakePredicateFormatterFromMatcher(const M& matcher) { - return PredicateFormatterFromMatcher(matcher); -} - -// Implements the polymorphic floating point equality matcher, which -// matches two float values using ULP-based approximation. The -// template is meant to be instantiated with FloatType being either -// float or double. -template -class FloatingEqMatcher { - public: - // Constructor for FloatingEqMatcher. - // The matcher's input will be compared with rhs. The matcher treats two - // NANs as equal if nan_eq_nan is true. Otherwise, under IEEE standards, - // equality comparisons between NANs will always return false. - FloatingEqMatcher(FloatType rhs, bool nan_eq_nan) : - rhs_(rhs), nan_eq_nan_(nan_eq_nan) {} - - // Implements floating point equality matcher as a Matcher. - template - class Impl : public MatcherInterface { - public: - Impl(FloatType rhs, bool nan_eq_nan) : - rhs_(rhs), nan_eq_nan_(nan_eq_nan) {} - - virtual bool Matches(T value) const { - const FloatingPoint lhs(value), rhs(rhs_); - - // Compares NaNs first, if nan_eq_nan_ is true. - if (nan_eq_nan_ && lhs.is_nan()) { - return rhs.is_nan(); - } - - return lhs.AlmostEquals(rhs); - } - - virtual void DescribeTo(::std::ostream* os) const { - // os->precision() returns the previously set precision, which we - // store to restore the ostream to its original configuration - // after outputting. - const ::std::streamsize old_precision = os->precision( - ::std::numeric_limits::digits10 + 2); - if (FloatingPoint(rhs_).is_nan()) { - if (nan_eq_nan_) { - *os << "is NaN"; - } else { - *os << "never matches"; - } - } else { - *os << "is approximately " << rhs_; - } - os->precision(old_precision); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - // As before, get original precision. - const ::std::streamsize old_precision = os->precision( - ::std::numeric_limits::digits10 + 2); - if (FloatingPoint(rhs_).is_nan()) { - if (nan_eq_nan_) { - *os << "is not NaN"; - } else { - *os << "is anything"; - } - } else { - *os << "is not approximately " << rhs_; - } - // Restore original precision. - os->precision(old_precision); - } - - private: - const FloatType rhs_; - const bool nan_eq_nan_; - }; - - // The following 3 type conversion operators allow FloatEq(rhs) and - // NanSensitiveFloatEq(rhs) to be used as a Matcher, a - // Matcher, or a Matcher, but nothing else. - // (While Google's C++ coding style doesn't allow arguments passed - // by non-const reference, we may see them in code not conforming to - // the style. Therefore Google Mock needs to support them.) - operator Matcher() const { - return MakeMatcher(new Impl(rhs_, nan_eq_nan_)); - } - - operator Matcher() const { - return MakeMatcher(new Impl(rhs_, nan_eq_nan_)); - } - - operator Matcher() const { - return MakeMatcher(new Impl(rhs_, nan_eq_nan_)); - } - private: - const FloatType rhs_; - const bool nan_eq_nan_; -}; - -// Implements the Pointee(m) matcher for matching a pointer whose -// pointee matches matcher m. The pointer can be either raw or smart. -template -class PointeeMatcher { - public: - explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {} - - // This type conversion operator template allows Pointee(m) to be - // used as a matcher for any pointer type whose pointee type is - // compatible with the inner matcher, where type Pointer can be - // either a raw pointer or a smart pointer. - // - // The reason we do this instead of relying on - // MakePolymorphicMatcher() is that the latter is not flexible - // enough for implementing the DescribeTo() method of Pointee(). - template - operator Matcher() const { - return MakeMatcher(new Impl(matcher_)); - } - private: - // The monomorphic implementation that works for a particular pointer type. - template - class Impl : public MatcherInterface { - public: - typedef typename PointeeOf::type Pointee; - - explicit Impl(const InnerMatcher& matcher) - : matcher_(MatcherCast(matcher)) {} - - virtual bool Matches(Pointer p) const { - return GetRawPointer(p) != NULL && matcher_.Matches(*p); - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "points to a value that "; - matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "does not point to a value that "; - matcher_.DescribeTo(os); - } - - virtual void ExplainMatchResultTo(Pointer pointer, - ::std::ostream* os) const { - if (GetRawPointer(pointer) == NULL) - return; - - ::std::stringstream ss; - matcher_.ExplainMatchResultTo(*pointer, &ss); - const internal::string s = ss.str(); - if (s != "") { - *os << "points to a value that " << s; - } - } - private: - const Matcher matcher_; - }; - - const InnerMatcher matcher_; -}; - -// Implements the Field() matcher for matching a field (i.e. member -// variable) of an object. -template -class FieldMatcher { - public: - FieldMatcher(FieldType Class::*field, - const Matcher& matcher) - : field_(field), matcher_(matcher) {} - - // Returns true iff the inner matcher matches obj.field. - bool Matches(const Class& obj) const { - return matcher_.Matches(obj.*field_); - } - - // Returns true iff the inner matcher matches obj->field. - bool Matches(const Class* p) const { - return (p != NULL) && matcher_.Matches(p->*field_); - } - - void DescribeTo(::std::ostream* os) const { - *os << "the given field "; - matcher_.DescribeTo(os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "the given field "; - matcher_.DescribeNegationTo(os); - } - - // The first argument of ExplainMatchResultTo() is needed to help - // Symbian's C++ compiler choose which overload to use. Its type is - // true_type iff the Field() matcher is used to match a pointer. - void ExplainMatchResultTo(false_type /* is_not_pointer */, const Class& obj, - ::std::ostream* os) const { - ::std::stringstream ss; - matcher_.ExplainMatchResultTo(obj.*field_, &ss); - const internal::string s = ss.str(); - if (s != "") { - *os << "the given field " << s; - } - } - - void ExplainMatchResultTo(true_type /* is_pointer */, const Class* p, - ::std::ostream* os) const { - if (p != NULL) { - // Since *p has a field, it must be a class/struct/union type - // and thus cannot be a pointer. Therefore we pass false_type() - // as the first argument. - ExplainMatchResultTo(false_type(), *p, os); - } - } - private: - const FieldType Class::*field_; - const Matcher matcher_; -}; - -// Explains the result of matching an object or pointer against a field matcher. -template -void ExplainMatchResultTo(const FieldMatcher& matcher, - const T& value, ::std::ostream* os) { - matcher.ExplainMatchResultTo( - typename ::testing::internal::is_pointer::type(), value, os); -} - -// Implements the Property() matcher for matching a property -// (i.e. return value of a getter method) of an object. -template -class PropertyMatcher { - public: - // The property may have a reference type, so 'const PropertyType&' - // may cause double references and fail to compile. That's why we - // need GMOCK_REFERENCE_TO_CONST, which works regardless of - // PropertyType being a reference or not. - typedef GMOCK_REFERENCE_TO_CONST_(PropertyType) RefToConstProperty; - - PropertyMatcher(PropertyType (Class::*property)() const, - const Matcher& matcher) - : property_(property), matcher_(matcher) {} - - // Returns true iff obj.property() matches the inner matcher. - bool Matches(const Class& obj) const { - return matcher_.Matches((obj.*property_)()); - } - - // Returns true iff p->property() matches the inner matcher. - bool Matches(const Class* p) const { - return (p != NULL) && matcher_.Matches((p->*property_)()); - } - - void DescribeTo(::std::ostream* os) const { - *os << "the given property "; - matcher_.DescribeTo(os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "the given property "; - matcher_.DescribeNegationTo(os); - } - - // The first argument of ExplainMatchResultTo() is needed to help - // Symbian's C++ compiler choose which overload to use. Its type is - // true_type iff the Property() matcher is used to match a pointer. - void ExplainMatchResultTo(false_type /* is_not_pointer */, const Class& obj, - ::std::ostream* os) const { - ::std::stringstream ss; - matcher_.ExplainMatchResultTo((obj.*property_)(), &ss); - const internal::string s = ss.str(); - if (s != "") { - *os << "the given property " << s; - } - } - - void ExplainMatchResultTo(true_type /* is_pointer */, const Class* p, - ::std::ostream* os) const { - if (p != NULL) { - // Since *p has a property method, it must be a - // class/struct/union type and thus cannot be a pointer. - // Therefore we pass false_type() as the first argument. - ExplainMatchResultTo(false_type(), *p, os); - } - } - private: - PropertyType (Class::*property_)() const; - const Matcher matcher_; -}; - -// Explains the result of matching an object or pointer against a -// property matcher. -template -void ExplainMatchResultTo(const PropertyMatcher& matcher, - const T& value, ::std::ostream* os) { - matcher.ExplainMatchResultTo( - typename ::testing::internal::is_pointer::type(), value, os); -} - -// Type traits specifying various features of different functors for ResultOf. -// The default template specifies features for functor objects. -// Functor classes have to typedef argument_type and result_type -// to be compatible with ResultOf. -template -struct CallableTraits { - typedef typename Functor::result_type ResultType; - typedef Functor StorageType; - - static void CheckIsValid(Functor functor) {} - template - static ResultType Invoke(Functor f, T arg) { return f(arg); } -}; - -// Specialization for function pointers. -template -struct CallableTraits { - typedef ResType ResultType; - typedef ResType(*StorageType)(ArgType); - - static void CheckIsValid(ResType(*f)(ArgType)) { - GMOCK_CHECK_(f != NULL) - << "NULL function pointer is passed into ResultOf()."; - } - template - static ResType Invoke(ResType(*f)(ArgType), T arg) { - return (*f)(arg); - } -}; - -// Implements the ResultOf() matcher for matching a return value of a -// unary function of an object. -template -class ResultOfMatcher { - public: - typedef typename CallableTraits::ResultType ResultType; - - ResultOfMatcher(Callable callable, const Matcher& matcher) - : callable_(callable), matcher_(matcher) { - CallableTraits::CheckIsValid(callable_); - } - - template - operator Matcher() const { - return Matcher(new Impl(callable_, matcher_)); - } - - private: - typedef typename CallableTraits::StorageType CallableStorageType; - - template - class Impl : public MatcherInterface { - public: - Impl(CallableStorageType callable, const Matcher& matcher) - : callable_(callable), matcher_(matcher) {} - // Returns true iff callable_(obj) matches the inner matcher. - // The calling syntax is different for different types of callables - // so we abstract it in CallableTraits::Invoke(). - virtual bool Matches(T obj) const { - return matcher_.Matches( - CallableTraits::template Invoke(callable_, obj)); - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "result of the given callable "; - matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "result of the given callable "; - matcher_.DescribeNegationTo(os); - } - - virtual void ExplainMatchResultTo(T obj, ::std::ostream* os) const { - ::std::stringstream ss; - matcher_.ExplainMatchResultTo( - CallableTraits::template Invoke(callable_, obj), - &ss); - const internal::string s = ss.str(); - if (s != "") - *os << "result of the given callable " << s; - } - private: - // Functors often define operator() as non-const method even though - // they are actualy stateless. But we need to use them even when - // 'this' is a const pointer. It's the user's responsibility not to - // use stateful callables with ResultOf(), which does't guarantee - // how many times the callable will be invoked. - mutable CallableStorageType callable_; - const Matcher matcher_; - }; // class Impl - - const CallableStorageType callable_; - const Matcher matcher_; -}; - -// Explains the result of matching a value against a functor matcher. -template -void ExplainMatchResultTo(const ResultOfMatcher& matcher, - T obj, ::std::ostream* os) { - matcher.ExplainMatchResultTo(obj, os); -} - -// Implements an equality matcher for any STL-style container whose elements -// support ==. This matcher is like Eq(), but its failure explanations provide -// more detailed information that is useful when the container is used as a set. -// The failure message reports elements that are in one of the operands but not -// the other. The failure messages do not report duplicate or out-of-order -// elements in the containers (which don't properly matter to sets, but can -// occur if the containers are vectors or lists, for example). -// -// Uses the container's const_iterator, value_type, operator ==, -// begin(), and end(). -template -class ContainerEqMatcher { - public: - typedef internal::StlContainerView View; - typedef typename View::type StlContainer; - typedef typename View::const_reference StlContainerReference; - - // We make a copy of rhs in case the elements in it are modified - // after this matcher is created. - explicit ContainerEqMatcher(const Container& rhs) : rhs_(View::Copy(rhs)) { - // Makes sure the user doesn't instantiate this class template - // with a const or reference type. - testing::StaticAssertTypeEq(); - } - - template - bool Matches(const LhsContainer& lhs) const { - // GMOCK_REMOVE_CONST_() is needed to work around an MSVC 8.0 bug - // that causes LhsContainer to be a const type sometimes. - typedef internal::StlContainerView - LhsView; - StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs); - return lhs_stl_container == rhs_; - } - void DescribeTo(::std::ostream* os) const { - *os << "equals "; - UniversalPrinter::Print(rhs_, os); - } - void DescribeNegationTo(::std::ostream* os) const { - *os << "does not equal "; - UniversalPrinter::Print(rhs_, os); - } - - template - void ExplainMatchResultTo(const LhsContainer& lhs, - ::std::ostream* os) const { - // GMOCK_REMOVE_CONST_() is needed to work around an MSVC 8.0 bug - // that causes LhsContainer to be a const type sometimes. - typedef internal::StlContainerView - LhsView; - typedef typename LhsView::type LhsStlContainer; - StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs); - - // Something is different. Check for missing values first. - bool printed_header = false; - for (typename LhsStlContainer::const_iterator it = - lhs_stl_container.begin(); - it != lhs_stl_container.end(); ++it) { - if (internal::ArrayAwareFind(rhs_.begin(), rhs_.end(), *it) == - rhs_.end()) { - if (printed_header) { - *os << ", "; - } else { - *os << "Only in actual: "; - printed_header = true; - } - UniversalPrinter::Print(*it, os); - } - } - - // Now check for extra values. - bool printed_header2 = false; - for (typename StlContainer::const_iterator it = rhs_.begin(); - it != rhs_.end(); ++it) { - if (internal::ArrayAwareFind( - lhs_stl_container.begin(), lhs_stl_container.end(), *it) == - lhs_stl_container.end()) { - if (printed_header2) { - *os << ", "; - } else { - *os << (printed_header ? "; not" : "Not") << " in actual: "; - printed_header2 = true; - } - UniversalPrinter::Print(*it, os); - } - } - } - private: - const StlContainer rhs_; -}; - -template -void ExplainMatchResultTo(const ContainerEqMatcher& matcher, - const LhsContainer& lhs, - ::std::ostream* os) { - matcher.ExplainMatchResultTo(lhs, os); -} - -// Implements Contains(element_matcher) for the given argument type Container. -template -class ContainsMatcherImpl : public MatcherInterface { - public: - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(Container)) RawContainer; - typedef StlContainerView View; - typedef typename View::type StlContainer; - typedef typename View::const_reference StlContainerReference; - typedef typename StlContainer::value_type Element; - - template - explicit ContainsMatcherImpl(InnerMatcher inner_matcher) - : inner_matcher_( - testing::SafeMatcherCast(inner_matcher)) {} - - // Returns true iff 'container' matches. - virtual bool Matches(Container container) const { - StlContainerReference stl_container = View::ConstReference(container); - for (typename StlContainer::const_iterator it = stl_container.begin(); - it != stl_container.end(); ++it) { - if (inner_matcher_.Matches(*it)) - return true; - } - return false; - } - - // Describes what this matcher does. - virtual void DescribeTo(::std::ostream* os) const { - *os << "contains at least one element that "; - inner_matcher_.DescribeTo(os); - } - - // Describes what the negation of this matcher does. - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't contain any element that "; - inner_matcher_.DescribeTo(os); - } - - // Explains why 'container' matches, or doesn't match, this matcher. - virtual void ExplainMatchResultTo(Container container, - ::std::ostream* os) const { - StlContainerReference stl_container = View::ConstReference(container); - - // We need to explain which (if any) element matches inner_matcher_. - typename StlContainer::const_iterator it = stl_container.begin(); - for (size_t i = 0; it != stl_container.end(); ++it, ++i) { - if (inner_matcher_.Matches(*it)) { - *os << "element " << i << " matches"; - return; - } - } - } - - private: - const Matcher inner_matcher_; -}; - -// Implements polymorphic Contains(element_matcher). -template -class ContainsMatcher { - public: - explicit ContainsMatcher(M m) : inner_matcher_(m) {} - - template - operator Matcher() const { - return MakeMatcher(new ContainsMatcherImpl(inner_matcher_)); - } - - private: - const M inner_matcher_; -}; - -} // namespace internal - -// Implements MatcherCast(). -template -inline Matcher MatcherCast(M matcher) { - return internal::MatcherCastImpl::Cast(matcher); -} - -// _ is a matcher that matches anything of any type. -// -// This definition is fine as: -// -// 1. The C++ standard permits using the name _ in a namespace that -// is not the global namespace or ::std. -// 2. The AnythingMatcher class has no data member or constructor, -// so it's OK to create global variables of this type. -// 3. c-style has approved of using _ in this case. -const internal::AnythingMatcher _ = {}; -// Creates a matcher that matches any value of the given type T. -template -inline Matcher A() { return MakeMatcher(new internal::AnyMatcherImpl()); } - -// Creates a matcher that matches any value of the given type T. -template -inline Matcher An() { return A(); } - -// Creates a polymorphic matcher that matches anything equal to x. -// Note: if the parameter of Eq() were declared as const T&, Eq("foo") -// wouldn't compile. -template -inline internal::EqMatcher Eq(T x) { return internal::EqMatcher(x); } - -// Constructs a Matcher from a 'value' of type T. The constructed -// matcher matches any value that's equal to 'value'. -template -Matcher::Matcher(T value) { *this = Eq(value); } - -// Creates a monomorphic matcher that matches anything with type Lhs -// and equal to rhs. A user may need to use this instead of Eq(...) -// in order to resolve an overloading ambiguity. -// -// TypedEq(x) is just a convenient short-hand for Matcher(Eq(x)) -// or Matcher(x), but more readable than the latter. -// -// We could define similar monomorphic matchers for other comparison -// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do -// it yet as those are used much less than Eq() in practice. A user -// can always write Matcher(Lt(5)) to be explicit about the type, -// for example. -template -inline Matcher TypedEq(const Rhs& rhs) { return Eq(rhs); } - -// Creates a polymorphic matcher that matches anything >= x. -template -inline internal::GeMatcher Ge(Rhs x) { - return internal::GeMatcher(x); -} - -// Creates a polymorphic matcher that matches anything > x. -template -inline internal::GtMatcher Gt(Rhs x) { - return internal::GtMatcher(x); -} - -// Creates a polymorphic matcher that matches anything <= x. -template -inline internal::LeMatcher Le(Rhs x) { - return internal::LeMatcher(x); -} - -// Creates a polymorphic matcher that matches anything < x. -template -inline internal::LtMatcher Lt(Rhs x) { - return internal::LtMatcher(x); -} - -// Creates a polymorphic matcher that matches anything != x. -template -inline internal::NeMatcher Ne(Rhs x) { - return internal::NeMatcher(x); -} - -// Creates a polymorphic matcher that matches any non-NULL pointer. -// This is convenient as Not(NULL) doesn't compile (the compiler -// thinks that that expression is comparing a pointer with an integer). -inline PolymorphicMatcher NotNull() { - return MakePolymorphicMatcher(internal::NotNullMatcher()); -} - -// Creates a polymorphic matcher that matches any argument that -// references variable x. -template -inline internal::RefMatcher Ref(T& x) { // NOLINT - return internal::RefMatcher(x); -} - -// Creates a matcher that matches any double argument approximately -// equal to rhs, where two NANs are considered unequal. -inline internal::FloatingEqMatcher DoubleEq(double rhs) { - return internal::FloatingEqMatcher(rhs, false); -} - -// Creates a matcher that matches any double argument approximately -// equal to rhs, including NaN values when rhs is NaN. -inline internal::FloatingEqMatcher NanSensitiveDoubleEq(double rhs) { - return internal::FloatingEqMatcher(rhs, true); -} - -// Creates a matcher that matches any float argument approximately -// equal to rhs, where two NANs are considered unequal. -inline internal::FloatingEqMatcher FloatEq(float rhs) { - return internal::FloatingEqMatcher(rhs, false); -} - -// Creates a matcher that matches any double argument approximately -// equal to rhs, including NaN values when rhs is NaN. -inline internal::FloatingEqMatcher NanSensitiveFloatEq(float rhs) { - return internal::FloatingEqMatcher(rhs, true); -} - -// Creates a matcher that matches a pointer (raw or smart) that points -// to a value that matches inner_matcher. -template -inline internal::PointeeMatcher Pointee( - const InnerMatcher& inner_matcher) { - return internal::PointeeMatcher(inner_matcher); -} - -// Creates a matcher that matches an object whose given field matches -// 'matcher'. For example, -// Field(&Foo::number, Ge(5)) -// matches a Foo object x iff x.number >= 5. -template -inline PolymorphicMatcher< - internal::FieldMatcher > Field( - FieldType Class::*field, const FieldMatcher& matcher) { - return MakePolymorphicMatcher( - internal::FieldMatcher( - field, MatcherCast(matcher))); - // The call to MatcherCast() is required for supporting inner - // matchers of compatible types. For example, it allows - // Field(&Foo::bar, m) - // to compile where bar is an int32 and m is a matcher for int64. -} - -// Creates a matcher that matches an object whose given property -// matches 'matcher'. For example, -// Property(&Foo::str, StartsWith("hi")) -// matches a Foo object x iff x.str() starts with "hi". -template -inline PolymorphicMatcher< - internal::PropertyMatcher > Property( - PropertyType (Class::*property)() const, const PropertyMatcher& matcher) { - return MakePolymorphicMatcher( - internal::PropertyMatcher( - property, - MatcherCast(matcher))); - // The call to MatcherCast() is required for supporting inner - // matchers of compatible types. For example, it allows - // Property(&Foo::bar, m) - // to compile where bar() returns an int32 and m is a matcher for int64. -} - -// Creates a matcher that matches an object iff the result of applying -// a callable to x matches 'matcher'. -// For example, -// ResultOf(f, StartsWith("hi")) -// matches a Foo object x iff f(x) starts with "hi". -// callable parameter can be a function, function pointer, or a functor. -// Callable has to satisfy the following conditions: -// * It is required to keep no state affecting the results of -// the calls on it and make no assumptions about how many calls -// will be made. Any state it keeps must be protected from the -// concurrent access. -// * If it is a function object, it has to define type result_type. -// We recommend deriving your functor classes from std::unary_function. -template -internal::ResultOfMatcher ResultOf( - Callable callable, const ResultOfMatcher& matcher) { - return internal::ResultOfMatcher( - callable, - MatcherCast::ResultType>( - matcher)); - // The call to MatcherCast() is required for supporting inner - // matchers of compatible types. For example, it allows - // ResultOf(Function, m) - // to compile where Function() returns an int32 and m is a matcher for int64. -} - -// String matchers. - -// Matches a string equal to str. -inline PolymorphicMatcher > - StrEq(const internal::string& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, true, true)); -} - -// Matches a string not equal to str. -inline PolymorphicMatcher > - StrNe(const internal::string& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, false, true)); -} - -// Matches a string equal to str, ignoring case. -inline PolymorphicMatcher > - StrCaseEq(const internal::string& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, true, false)); -} - -// Matches a string not equal to str, ignoring case. -inline PolymorphicMatcher > - StrCaseNe(const internal::string& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, false, false)); -} - -// Creates a matcher that matches any string, std::string, or C string -// that contains the given substring. -inline PolymorphicMatcher > - HasSubstr(const internal::string& substring) { - return MakePolymorphicMatcher(internal::HasSubstrMatcher( - substring)); -} - -// Matches a string that starts with 'prefix' (case-sensitive). -inline PolymorphicMatcher > - StartsWith(const internal::string& prefix) { - return MakePolymorphicMatcher(internal::StartsWithMatcher( - prefix)); -} - -// Matches a string that ends with 'suffix' (case-sensitive). -inline PolymorphicMatcher > - EndsWith(const internal::string& suffix) { - return MakePolymorphicMatcher(internal::EndsWithMatcher( - suffix)); -} - -#ifdef GMOCK_HAS_REGEX - -// Matches a string that fully matches regular expression 'regex'. -// The matcher takes ownership of 'regex'. -inline PolymorphicMatcher MatchesRegex( - const internal::RE* regex) { - return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true)); -} -inline PolymorphicMatcher MatchesRegex( - const internal::string& regex) { - return MatchesRegex(new internal::RE(regex)); -} - -// Matches a string that contains regular expression 'regex'. -// The matcher takes ownership of 'regex'. -inline PolymorphicMatcher ContainsRegex( - const internal::RE* regex) { - return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false)); -} -inline PolymorphicMatcher ContainsRegex( - const internal::string& regex) { - return ContainsRegex(new internal::RE(regex)); -} - -#endif // GMOCK_HAS_REGEX - -#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING -// Wide string matchers. - -// Matches a string equal to str. -inline PolymorphicMatcher > - StrEq(const internal::wstring& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, true, true)); -} - -// Matches a string not equal to str. -inline PolymorphicMatcher > - StrNe(const internal::wstring& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, false, true)); -} - -// Matches a string equal to str, ignoring case. -inline PolymorphicMatcher > - StrCaseEq(const internal::wstring& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, true, false)); -} - -// Matches a string not equal to str, ignoring case. -inline PolymorphicMatcher > - StrCaseNe(const internal::wstring& str) { - return MakePolymorphicMatcher(internal::StrEqualityMatcher( - str, false, false)); -} - -// Creates a matcher that matches any wstring, std::wstring, or C wide string -// that contains the given substring. -inline PolymorphicMatcher > - HasSubstr(const internal::wstring& substring) { - return MakePolymorphicMatcher(internal::HasSubstrMatcher( - substring)); -} - -// Matches a string that starts with 'prefix' (case-sensitive). -inline PolymorphicMatcher > - StartsWith(const internal::wstring& prefix) { - return MakePolymorphicMatcher(internal::StartsWithMatcher( - prefix)); -} - -// Matches a string that ends with 'suffix' (case-sensitive). -inline PolymorphicMatcher > - EndsWith(const internal::wstring& suffix) { - return MakePolymorphicMatcher(internal::EndsWithMatcher( - suffix)); -} - -#endif // GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field == the second field. -inline internal::Eq2Matcher Eq() { return internal::Eq2Matcher(); } - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field >= the second field. -inline internal::Ge2Matcher Ge() { return internal::Ge2Matcher(); } - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field > the second field. -inline internal::Gt2Matcher Gt() { return internal::Gt2Matcher(); } - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field <= the second field. -inline internal::Le2Matcher Le() { return internal::Le2Matcher(); } - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field < the second field. -inline internal::Lt2Matcher Lt() { return internal::Lt2Matcher(); } - -// Creates a polymorphic matcher that matches a 2-tuple where the -// first field != the second field. -inline internal::Ne2Matcher Ne() { return internal::Ne2Matcher(); } - -// Creates a matcher that matches any value of type T that m doesn't -// match. -template -inline internal::NotMatcher Not(InnerMatcher m) { - return internal::NotMatcher(m); -} - -// Creates a matcher that matches any value that matches all of the -// given matchers. -// -// For now we only support up to 5 matchers. Support for more -// matchers can be added as needed, or the user can use nested -// AllOf()s. -template -inline internal::BothOfMatcher -AllOf(Matcher1 m1, Matcher2 m2) { - return internal::BothOfMatcher(m1, m2); -} - -template -inline internal::BothOfMatcher > -AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) { - return AllOf(m1, AllOf(m2, m3)); -} - -template -inline internal::BothOfMatcher > > -AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) { - return AllOf(m1, AllOf(m2, m3, m4)); -} - -template -inline internal::BothOfMatcher > > > -AllOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) { - return AllOf(m1, AllOf(m2, m3, m4, m5)); -} - -// Creates a matcher that matches any value that matches at least one -// of the given matchers. -// -// For now we only support up to 5 matchers. Support for more -// matchers can be added as needed, or the user can use nested -// AnyOf()s. -template -inline internal::EitherOfMatcher -AnyOf(Matcher1 m1, Matcher2 m2) { - return internal::EitherOfMatcher(m1, m2); -} - -template -inline internal::EitherOfMatcher > -AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3) { - return AnyOf(m1, AnyOf(m2, m3)); -} - -template -inline internal::EitherOfMatcher > > -AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4) { - return AnyOf(m1, AnyOf(m2, m3, m4)); -} - -template -inline internal::EitherOfMatcher > > > -AnyOf(Matcher1 m1, Matcher2 m2, Matcher3 m3, Matcher4 m4, Matcher5 m5) { - return AnyOf(m1, AnyOf(m2, m3, m4, m5)); -} - -// Returns a matcher that matches anything that satisfies the given -// predicate. The predicate can be any unary function or functor -// whose return type can be implicitly converted to bool. -template -inline PolymorphicMatcher > -Truly(Predicate pred) { - return MakePolymorphicMatcher(internal::TrulyMatcher(pred)); -} - -// Returns a matcher that matches an equal container. -// This matcher behaves like Eq(), but in the event of mismatch lists the -// values that are included in one container but not the other. (Duplicate -// values and order differences are not explained.) -template -inline PolymorphicMatcher > - ContainerEq(const Container& rhs) { - // This following line is for working around a bug in MSVC 8.0, - // which causes Container to be a const type sometimes. - typedef GMOCK_REMOVE_CONST_(Container) RawContainer; - return MakePolymorphicMatcher(internal::ContainerEqMatcher(rhs)); -} - -// Matches an STL-style container or a native array that contains at -// least one element matching the given value or matcher. -// -// Examples: -// ::std::set page_ids; -// page_ids.insert(3); -// page_ids.insert(1); -// EXPECT_THAT(page_ids, Contains(1)); -// EXPECT_THAT(page_ids, Contains(Gt(2))); -// EXPECT_THAT(page_ids, Not(Contains(4))); -// -// ::std::map page_lengths; -// page_lengths[1] = 100; -// EXPECT_THAT(map_int, Contains(::std::pair(1, 100))); -// -// const char* user_ids[] = { "joe", "mike", "tom" }; -// EXPECT_THAT(user_ids, Contains(Eq(::std::string("tom")))); -template -inline internal::ContainsMatcher Contains(M matcher) { - return internal::ContainsMatcher(matcher); -} - -// Returns a predicate that is satisfied by anything that matches the -// given matcher. -template -inline internal::MatcherAsPredicate Matches(M matcher) { - return internal::MatcherAsPredicate(matcher); -} - -// Returns true iff the value matches the matcher. -template -inline bool Value(const T& value, M matcher) { - return testing::Matches(matcher)(value); -} - -// AllArgs(m) is a synonym of m. This is useful in -// -// EXPECT_CALL(foo, Bar(_, _)).With(AllArgs(Eq())); -// -// which is easier to read than -// -// EXPECT_CALL(foo, Bar(_, _)).With(Eq()); -template -inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; } - -// These macros allow using matchers to check values in Google Test -// tests. ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher) -// succeed iff the value matches the matcher. If the assertion fails, -// the value and the description of the matcher will be printed. -#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\ - ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value) -#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\ - ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value) - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-printers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-printers.h deleted file mode 100644 index 561de3d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-printers.h +++ /dev/null @@ -1,732 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements a universal value printer that can print a -// value of any type T: -// -// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); -// -// A user can teach this function how to print a class type T by -// defining either operator<<() or PrintTo() in the namespace that -// defines T. More specifically, the FIRST defined function in the -// following list will be used (assuming T is defined in namespace -// foo): -// -// 1. foo::PrintTo(const T&, ostream*) -// 2. operator<<(ostream&, const T&) defined in either foo or the -// global namespace. -// -// If none of the above is defined, it will print the debug string of -// the value if it is a protocol buffer, or print the raw bytes in the -// value otherwise. -// -// To aid debugging: when T is a reference type, the address of the -// value is also printed; when T is a (const) char pointer, both the -// pointer value and the NUL-terminated string it points to are -// printed. -// -// We also provide some convenient wrappers: -// -// // Prints a value as the given type to a string. -// string ::testing::internal::UniversalPrinter::PrintToString(value); -// -// // Prints a value tersely: for a reference type, the referenced -// // value (but not the address) is printed; for a (const) char -// // pointer, the NUL-terminated string (but not the pointer) is -// // printed. -// void ::testing::internal::UniversalTersePrint(const T& value, ostream*); -// -// // Prints value using the type inferred by the compiler. The difference -// // from UniversalTersePrint() is that this function prints both the -// // pointer and the NUL-terminated string for a (const) char pointer. -// void ::testing::internal::UniversalPrint(const T& value, ostream*); -// -// // Prints the fields of a tuple tersely to a string vector, one -// // element for each field. -// std::vector UniversalTersePrintTupleFieldsToStrings( -// const Tuple& value); -// -// Known limitation: -// -// The print primitives print the elements of an STL-style container -// using the compiler-inferred type of *iter where iter is a -// const_iterator of the container. When const_iterator is an input -// iterator but not a forward iterator, this inferred type may not -// match value_type, and the print output may be incorrect. In -// practice, this is rarely a problem as for most containers -// const_iterator is a forward iterator. We'll fix this if there's an -// actual need for it. Note that this fix cannot rely on value_type -// being defined as many user-defined container types don't have -// value_type. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_PRINTERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_PRINTERS_H_ - -#include // NOLINT -#include -#include -#include -#include - -#include -#include -#include - -namespace testing { - -// Definitions in the 'internal' and 'internal2' name spaces are -// subject to change without notice. DO NOT USE THEM IN USER CODE! -namespace internal2 { - -// Prints the given number of bytes in the given object to the given -// ostream. -void PrintBytesInObjectTo(const unsigned char* obj_bytes, - size_t count, - ::std::ostream* os); - -// TypeWithoutFormatter::PrintValue(value, os) is called -// by the universal printer to print a value of type T when neither -// operator<< nor PrintTo() is defined for type T. When T is -// ProtocolMessage, proto2::Message, or a subclass of those, kIsProto -// will be true and the short debug string of the protocol message -// value will be printed; otherwise kIsProto will be false and the -// bytes in the value will be printed. -template -class TypeWithoutFormatter { - public: - static void PrintValue(const T& value, ::std::ostream* os) { - PrintBytesInObjectTo(reinterpret_cast(&value), - sizeof(value), os); - } -}; -template -class TypeWithoutFormatter { - public: - static void PrintValue(const T& value, ::std::ostream* os) { - // Both ProtocolMessage and proto2::Message have the - // ShortDebugString() method, so the same implementation works for - // both. - ::std::operator<<(*os, "<" + value.ShortDebugString() + ">"); - } -}; - -// Prints the given value to the given ostream. If the value is a -// protocol message, its short debug string is printed; otherwise the -// bytes in the value are printed. This is what -// UniversalPrinter::Print() does when it knows nothing about type -// T and T has no << operator. -// -// A user can override this behavior for a class type Foo by defining -// a << operator in the namespace where Foo is defined. -// -// We put this operator in namespace 'internal2' instead of 'internal' -// to simplify the implementation, as much code in 'internal' needs to -// use << in STL, which would conflict with our own << were it defined -// in 'internal'. -// -// Note that this operator<< takes a generic std::basic_ostream type instead of the more restricted std::ostream. If -// we define it to take an std::ostream instead, we'll get an -// "ambiguous overloads" compiler error when trying to print a type -// Foo that supports streaming to std::basic_ostream, as the compiler cannot tell whether -// operator<<(std::ostream&, const T&) or -// operator<<(std::basic_stream, const Foo&) is more -// specific. -template -::std::basic_ostream& operator<<( - ::std::basic_ostream& os, const T& x) { - TypeWithoutFormatter::value>:: - PrintValue(x, &os); - return os; -} - -} // namespace internal2 -} // namespace testing - -// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up -// magic needed for implementing UniversalPrinter won't work. -namespace testing_internal { - -// Used to print a value that is not an STL-style container when the -// user doesn't define PrintTo() for it. -template -void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) { - // With the following statement, during unqualified name lookup, - // testing::internal2::operator<< appears as if it was declared in - // the nearest enclosing namespace that contains both - // ::testing_internal and ::testing::internal2, i.e. the global - // namespace. For more details, refer to the C++ Standard section - // 7.3.4-1 [namespace.udir]. This allows us to fall back onto - // testing::internal2::operator<< in case T doesn't come with a << - // operator. - // - // We cannot write 'using ::testing::internal2::operator<<;', which - // gcc 3.3 fails to compile due to a compiler bug. - using namespace ::testing::internal2; // NOLINT - - // Assuming T is defined in namespace foo, in the next statement, - // the compiler will consider all of: - // - // 1. foo::operator<< (thanks to Koenig look-up), - // 2. ::operator<< (as the current namespace is enclosed in ::), - // 3. testing::internal2::operator<< (thanks to the using statement above). - // - // The operator<< whose type matches T best will be picked. - // - // We deliberately allow #2 to be a candidate, as sometimes it's - // impossible to define #1 (e.g. when foo is ::std, defining - // anything in it is undefined behavior unless you are a compiler - // vendor.). - *os << value; -} - -} // namespace testing_internal - -namespace testing { -namespace internal { - -// UniversalPrinter::Print(value, ostream_ptr) prints the given -// value to the given ostream. The caller must ensure that -// 'ostream_ptr' is not NULL, or the behavior is undefined. -// -// We define UniversalPrinter as a class template (as opposed to a -// function template), as we need to partially specialize it for -// reference types, which cannot be done with function templates. -template -class UniversalPrinter; - -template -void UniversalPrint(const T& value, ::std::ostream* os); - -// Used to print an STL-style container when the user doesn't define -// a PrintTo() for it. -template -void DefaultPrintTo(IsContainer /* dummy */, - false_type /* is not a pointer */, - const C& container, ::std::ostream* os) { - const size_t kMaxCount = 32; // The maximum number of elements to print. - *os << '{'; - size_t count = 0; - for (typename C::const_iterator it = container.begin(); - it != container.end(); ++it, ++count) { - if (count > 0) { - *os << ','; - if (count == kMaxCount) { // Enough has been printed. - *os << " ..."; - break; - } - } - *os << ' '; - // We cannot call PrintTo(*it, os) here as PrintTo() doesn't - // handle *it being a native array. - internal::UniversalPrint(*it, os); - } - - if (count > 0) { - *os << ' '; - } - *os << '}'; -} - -// Used to print a pointer that is neither a char pointer nor a member -// pointer, when the user doesn't define PrintTo() for it. (A member -// variable pointer or member function pointer doesn't really point to -// a location in the address space. Their representation is -// implementation-defined. Therefore they will be printed as raw -// bytes.) -template -void DefaultPrintTo(IsNotContainer /* dummy */, - true_type /* is a pointer */, - T* p, ::std::ostream* os) { - if (p == NULL) { - *os << "NULL"; - } else { - // We cannot use implicit_cast or static_cast here, as they don't - // work when p is a function pointer. - *os << reinterpret_cast(p); - } -} - -// Used to print a non-container, non-pointer value when the user -// doesn't define PrintTo() for it. -template -void DefaultPrintTo(IsNotContainer /* dummy */, - false_type /* is not a pointer */, - const T& value, ::std::ostream* os) { - ::testing_internal::DefaultPrintNonContainerTo(value, os); -} - -// Prints the given value using the << operator if it has one; -// otherwise prints the bytes in it. This is what -// UniversalPrinter::Print() does when PrintTo() is not specialized -// or overloaded for type T. -// -// A user can override this behavior for a class type Foo by defining -// an overload of PrintTo() in the namespace where Foo is defined. We -// give the user this option as sometimes defining a << operator for -// Foo is not desirable (e.g. the coding style may prevent doing it, -// or there is already a << operator but it doesn't do what the user -// wants). -template -void PrintTo(const T& value, ::std::ostream* os) { - // DefaultPrintTo() is overloaded. The type of its first two - // arguments determine which version will be picked. If T is an - // STL-style container, the version for container will be called; if - // T is a pointer, the pointer version will be called; otherwise the - // generic version will be called. - // - // Note that we check for container types here, prior to we check - // for protocol message types in our operator<<. The rationale is: - // - // For protocol messages, we want to give people a chance to - // override Google Mock's format by defining a PrintTo() or - // operator<<. For STL containers, other formats can be - // incompatible with Google Mock's format for the container - // elements; therefore we check for container types here to ensure - // that our format is used. - // - // The second argument of DefaultPrintTo() is needed to bypass a bug - // in Symbian's C++ compiler that prevents it from picking the right - // overload between: - // - // PrintTo(const T& x, ...); - // PrintTo(T* x, ...); - DefaultPrintTo(IsContainerTest(0), is_pointer(), value, os); -} - -// The following list of PrintTo() overloads tells -// UniversalPrinter::Print() how to print standard types (built-in -// types, strings, plain arrays, and pointers). - -// Overloads for various char types. -void PrintCharTo(char c, int char_code, ::std::ostream* os); -inline void PrintTo(unsigned char c, ::std::ostream* os) { - PrintCharTo(c, c, os); -} -inline void PrintTo(signed char c, ::std::ostream* os) { - PrintCharTo(c, c, os); -} -inline void PrintTo(char c, ::std::ostream* os) { - // When printing a plain char, we always treat it as unsigned. This - // way, the output won't be affected by whether the compiler thinks - // char is signed or not. - PrintTo(static_cast(c), os); -} - -// Overloads for other simple built-in types. -inline void PrintTo(bool x, ::std::ostream* os) { - *os << (x ? "true" : "false"); -} - -// Overload for wchar_t type. -// Prints a wchar_t as a symbol if it is printable or as its internal -// code otherwise and also as its decimal code (except for L'\0'). -// The L'\0' char is printed as "L'\\0'". The decimal code is printed -// as signed integer when wchar_t is implemented by the compiler -// as a signed type and is printed as an unsigned integer when wchar_t -// is implemented as an unsigned type. -void PrintTo(wchar_t wc, ::std::ostream* os); - -// Overloads for C strings. -void PrintTo(const char* s, ::std::ostream* os); -inline void PrintTo(char* s, ::std::ostream* os) { - PrintTo(implicit_cast(s), os); -} - -// MSVC can be configured to define wchar_t as a typedef of unsigned -// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native -// type. When wchar_t is a typedef, defining an overload for const -// wchar_t* would cause unsigned short* be printed as a wide string, -// possibly causing invalid memory accesses. -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) -// Overloads for wide C strings -void PrintTo(const wchar_t* s, ::std::ostream* os); -inline void PrintTo(wchar_t* s, ::std::ostream* os) { - PrintTo(implicit_cast(s), os); -} -#endif - -// Overload for C arrays. Multi-dimensional arrays are printed -// properly. - -// Prints the given number of elements in an array, without printing -// the curly braces. -template -void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) { - UniversalPrinter::Print(a[0], os); - for (size_t i = 1; i != count; i++) { - *os << ", "; - UniversalPrinter::Print(a[i], os); - } -} - -// Overloads for ::string and ::std::string. -#if GTEST_HAS_GLOBAL_STRING -void PrintStringTo(const ::string&s, ::std::ostream* os); -inline void PrintTo(const ::string& s, ::std::ostream* os) { - PrintStringTo(s, os); -} -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING -void PrintStringTo(const ::std::string&s, ::std::ostream* os); -inline void PrintTo(const ::std::string& s, ::std::ostream* os) { - PrintStringTo(s, os); -} -#endif // GTEST_HAS_STD_STRING - -// Overloads for ::wstring and ::std::wstring. -#if GTEST_HAS_GLOBAL_WSTRING -void PrintWideStringTo(const ::wstring&s, ::std::ostream* os); -inline void PrintTo(const ::wstring& s, ::std::ostream* os) { - PrintWideStringTo(s, os); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_WSTRING -void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os); -inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { - PrintWideStringTo(s, os); -} -#endif // GTEST_HAS_STD_WSTRING - -// Overload for ::std::tr1::tuple. Needed for printing function -// arguments, which are packed as tuples. - -typedef ::std::vector Strings; - -// This helper template allows PrintTo() for tuples and -// UniversalTersePrintTupleFieldsToStrings() to be defined by -// induction on the number of tuple fields. The idea is that -// TuplePrefixPrinter::PrintPrefixTo(t, os) prints the first N -// fields in tuple t, and can be defined in terms of -// TuplePrefixPrinter. - -// The inductive case. -template -struct TuplePrefixPrinter { - // Prints the first N fields of a tuple. - template - static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - TuplePrefixPrinter::PrintPrefixTo(t, os); - *os << ", "; - UniversalPrinter::type> - ::Print(::std::tr1::get(t), os); - } - - // Tersely prints the first N fields of a tuple to a string vector, - // one element for each field. - template - static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { - TuplePrefixPrinter::TersePrintPrefixToStrings(t, strings); - ::std::stringstream ss; - UniversalTersePrint(::std::tr1::get(t), &ss); - strings->push_back(ss.str()); - } -}; - -// Base cases. -template <> -struct TuplePrefixPrinter<0> { - template - static void PrintPrefixTo(const Tuple&, ::std::ostream*) {} - - template - static void TersePrintPrefixToStrings(const Tuple&, Strings*) {} -}; -template <> -template -void TuplePrefixPrinter<1>::PrintPrefixTo(const Tuple& t, ::std::ostream* os) { - UniversalPrinter::type>:: - Print(::std::tr1::get<0>(t), os); -} - -// Helper function for printing a tuple. T must be instantiated with -// a tuple type. -template -void PrintTupleTo(const T& t, ::std::ostream* os) { - *os << "("; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: - PrintPrefixTo(t, os); - *os << ")"; -} - -// Overloaded PrintTo() for tuples of various arities. We support -// tuples of up-to 10 fields. The following implementation works -// regardless of whether tr1::tuple is implemented using the -// non-standard variadic template feature or not. - -inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo(const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -template -void PrintTo( - const ::std::tr1::tuple& t, - ::std::ostream* os) { - PrintTupleTo(t, os); -} - -// Overload for std::pair. -template -void PrintTo(const ::std::pair& value, ::std::ostream* os) { - *os << '('; - UniversalPrinter::Print(value.first, os); - *os << ", "; - UniversalPrinter::Print(value.second, os); - *os << ')'; -} - -// Implements printing a non-reference type T by letting the compiler -// pick the right overload of PrintTo() for T. -template -class UniversalPrinter { - public: - // MSVC warns about adding const to a function type, so we want to - // disable the warning. -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4180) // Temporarily disables warning 4180. -#endif // _MSC_VER - - // Note: we deliberately don't call this PrintTo(), as that name - // conflicts with ::testing::internal::PrintTo in the body of the - // function. - static void Print(const T& value, ::std::ostream* os) { - // By default, ::testing::internal::PrintTo() is used for printing - // the value. - // - // Thanks to Koenig look-up, if T is a class and has its own - // PrintTo() function defined in its namespace, that function will - // be visible here. Since it is more specific than the generic ones - // in ::testing::internal, it will be picked by the compiler in the - // following statement - exactly what we want. - PrintTo(value, os); - } - - // A convenient wrapper for Print() that returns the print-out as a - // string. - static string PrintToString(const T& value) { - ::std::stringstream ss; - Print(value, &ss); - return ss.str(); - } - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif // _MSC_VER -}; - -// UniversalPrintArray(begin, len, os) prints an array of 'len' -// elements, starting at address 'begin'. -template -void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) { - if (len == 0) { - *os << "{}"; - } else { - *os << "{ "; - const size_t kThreshold = 18; - const size_t kChunkSize = 8; - // If the array has more than kThreshold elements, we'll have to - // omit some details by printing only the first and the last - // kChunkSize elements. - // TODO(wan@google.com): let the user control the threshold using a flag. - if (len <= kThreshold) { - PrintRawArrayTo(begin, len, os); - } else { - PrintRawArrayTo(begin, kChunkSize, os); - *os << ", ..., "; - PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os); - } - *os << " }"; - } -} -// This overload prints a (const) char array compactly. -void UniversalPrintArray(const char* begin, size_t len, ::std::ostream* os); - -// Prints an array of 'len' elements, starting at address 'begin', to a string. -template -string UniversalPrintArrayToString(const T* begin, size_t len) { - ::std::stringstream ss; - UniversalPrintArray(begin, len, &ss); - return ss.str(); -} - -// Implements printing an array type T[N]. -template -class UniversalPrinter { - public: - // Prints the given array, omitting some elements when there are too - // many. - static void Print(const T (&a)[N], ::std::ostream* os) { - UniversalPrintArray(a, N, os); - } - - // A convenient wrapper for Print() that returns the print-out as a - // string. - static string PrintToString(const T (&a)[N]) { - return UniversalPrintArrayToString(a, N); - } -}; - -// Implements printing a reference type T&. -template -class UniversalPrinter { - public: - // MSVC warns about adding const to a function type, so we want to - // disable the warning. -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4180) // Temporarily disables warning 4180. -#endif // _MSC_VER - - static void Print(const T& value, ::std::ostream* os) { - // Prints the address of the value. We use reinterpret_cast here - // as static_cast doesn't compile when T is a function type. - *os << "@" << reinterpret_cast(&value) << " "; - - // Then prints the value itself. - UniversalPrinter::Print(value, os); - } - - // A convenient wrapper for Print() that returns the print-out as a - // string. - static string PrintToString(const T& value) { - ::std::stringstream ss; - Print(value, &ss); - return ss.str(); - } - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif // _MSC_VER -}; - -// Prints a value tersely: for a reference type, the referenced value -// (but not the address) is printed; for a (const) char pointer, the -// NUL-terminated string (but not the pointer) is printed. -template -void UniversalTersePrint(const T& value, ::std::ostream* os) { - UniversalPrinter::Print(value, os); -} -inline void UniversalTersePrint(const char* str, ::std::ostream* os) { - if (str == NULL) { - *os << "NULL"; - } else { - UniversalPrinter::Print(string(str), os); - } -} -inline void UniversalTersePrint(char* str, ::std::ostream* os) { - UniversalTersePrint(static_cast(str), os); -} - -// Prints a value using the type inferred by the compiler. The -// difference between this and UniversalTersePrint() is that for a -// (const) char pointer, this prints both the pointer and the -// NUL-terminated string. -template -void UniversalPrint(const T& value, ::std::ostream* os) { - UniversalPrinter::Print(value, os); -} - -// Prints the fields of a tuple tersely to a string vector, one -// element for each field. See the comment before -// UniversalTersePrint() for how we define "tersely". -template -Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { - Strings result; - TuplePrefixPrinter< ::std::tr1::tuple_size::value>:: - TersePrintPrefixToStrings(value, &result); - return result; -} - -} // namespace internal -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_PRINTERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-spec-builders.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-spec-builders.h deleted file mode 100644 index a22bcd11..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock-spec-builders.h +++ /dev/null @@ -1,1623 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements the ON_CALL() and EXPECT_CALL() macros. -// -// A user can use the ON_CALL() macro to specify the default action of -// a mock method. The syntax is: -// -// ON_CALL(mock_object, Method(argument-matchers)) -// .With(multi-argument-matcher) -// .WillByDefault(action); -// -// where the .With() clause is optional. -// -// A user can use the EXPECT_CALL() macro to specify an expectation on -// a mock method. The syntax is: -// -// EXPECT_CALL(mock_object, Method(argument-matchers)) -// .With(multi-argument-matchers) -// .Times(cardinality) -// .InSequence(sequences) -// .WillOnce(action) -// .WillRepeatedly(action) -// .RetiresOnSaturation(); -// -// where all clauses are optional, .InSequence() and .WillOnce() can -// appear any number of times, and .Times() can be omitted only if -// .WillOnce() or .WillRepeatedly() is present. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace testing { - -// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION -// and MUST NOT BE USED IN USER CODE!!! -namespace internal { - -template -class FunctionMocker; - -// Base class for expectations. -class ExpectationBase; - -// Helper class for testing the Expectation class template. -class ExpectationTester; - -// Base class for function mockers. -template -class FunctionMockerBase; - -// Protects the mock object registry (in class Mock), all function -// mockers, and all expectations. -// -// The reason we don't use more fine-grained protection is: when a -// mock function Foo() is called, it needs to consult its expectations -// to see which one should be picked. If another thread is allowed to -// call a mock function (either Foo() or a different one) at the same -// time, it could affect the "retired" attributes of Foo()'s -// expectations when InSequence() is used, and thus affect which -// expectation gets picked. Therefore, we sequence all mock function -// calls to ensure the integrity of the mock objects' states. -extern Mutex g_gmock_mutex; - -// Abstract base class of FunctionMockerBase. This is the -// type-agnostic part of the function mocker interface. Its pure -// virtual methods are implemented by FunctionMockerBase. -class UntypedFunctionMockerBase { - public: - virtual ~UntypedFunctionMockerBase() {} - - // Verifies that all expectations on this mock function have been - // satisfied. Reports one or more Google Test non-fatal failures - // and returns false if not. - // L >= g_gmock_mutex - virtual bool VerifyAndClearExpectationsLocked() = 0; - - // Clears the ON_CALL()s set on this mock function. - // L >= g_gmock_mutex - virtual void ClearDefaultActionsLocked() = 0; -}; // class UntypedFunctionMockerBase - -// This template class implements a default action spec (i.e. an -// ON_CALL() statement). -template -class DefaultActionSpec { - public: - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::ArgumentMatcherTuple ArgumentMatcherTuple; - - // Constructs a DefaultActionSpec object from the information inside - // the parenthesis of an ON_CALL() statement. - DefaultActionSpec(const char* file, int line, - const ArgumentMatcherTuple& matchers) - : file_(file), - line_(line), - matchers_(matchers), - // By default, extra_matcher_ should match anything. However, - // we cannot initialize it with _ as that triggers a compiler - // bug in Symbian's C++ compiler (cannot decide between two - // overloaded constructors of Matcher). - extra_matcher_(A()), - last_clause_(kNone) { - } - - // Where in the source file was the default action spec defined? - const char* file() const { return file_; } - int line() const { return line_; } - - // Implements the .With() clause. - DefaultActionSpec& With(const Matcher& m) { - // Makes sure this is called at most once. - ExpectSpecProperty(last_clause_ < kWith, - ".With() cannot appear " - "more than once in an ON_CALL()."); - last_clause_ = kWith; - - extra_matcher_ = m; - return *this; - } - - // Implements the .WillByDefault() clause. - DefaultActionSpec& WillByDefault(const Action& action) { - ExpectSpecProperty(last_clause_ < kWillByDefault, - ".WillByDefault() must appear " - "exactly once in an ON_CALL()."); - last_clause_ = kWillByDefault; - - ExpectSpecProperty(!action.IsDoDefault(), - "DoDefault() cannot be used in ON_CALL()."); - action_ = action; - return *this; - } - - // Returns true iff the given arguments match the matchers. - bool Matches(const ArgumentTuple& args) const { - return TupleMatches(matchers_, args) && extra_matcher_.Matches(args); - } - - // Returns the action specified by the user. - const Action& GetAction() const { - AssertSpecProperty(last_clause_ == kWillByDefault, - ".WillByDefault() must appear exactly " - "once in an ON_CALL()."); - return action_; - } - private: - // Gives each clause in the ON_CALL() statement a name. - enum Clause { - // Do not change the order of the enum members! The run-time - // syntax checking relies on it. - kNone, - kWith, - kWillByDefault, - }; - - // Asserts that the ON_CALL() statement has a certain property. - void AssertSpecProperty(bool property, const string& failure_message) const { - Assert(property, file_, line_, failure_message); - } - - // Expects that the ON_CALL() statement has a certain property. - void ExpectSpecProperty(bool property, const string& failure_message) const { - Expect(property, file_, line_, failure_message); - } - - // The information in statement - // - // ON_CALL(mock_object, Method(matchers)) - // .With(multi-argument-matcher) - // .WillByDefault(action); - // - // is recorded in the data members like this: - // - // source file that contains the statement => file_ - // line number of the statement => line_ - // matchers => matchers_ - // multi-argument-matcher => extra_matcher_ - // action => action_ - const char* file_; - int line_; - ArgumentMatcherTuple matchers_; - Matcher extra_matcher_; - Action action_; - - // The last clause in the ON_CALL() statement as seen so far. - // Initially kNone and changes as the statement is parsed. - Clause last_clause_; -}; // class DefaultActionSpec - -// Possible reactions on uninteresting calls. -enum CallReaction { - ALLOW, - WARN, - FAIL, -}; - -} // namespace internal - -// Utilities for manipulating mock objects. -class Mock { - public: - // The following public methods can be called concurrently. - - // Tells Google Mock to ignore mock_obj when checking for leaked - // mock objects. - static void AllowLeak(const void* mock_obj); - - // Verifies and clears all expectations on the given mock object. - // If the expectations aren't satisfied, generates one or more - // Google Test non-fatal failures and returns false. - static bool VerifyAndClearExpectations(void* mock_obj); - - // Verifies all expectations on the given mock object and clears its - // default actions and expectations. Returns true iff the - // verification was successful. - static bool VerifyAndClear(void* mock_obj); - private: - // Needed for a function mocker to register itself (so that we know - // how to clear a mock object). - template - friend class internal::FunctionMockerBase; - - template - friend class NiceMock; - - template - friend class StrictMock; - - // Tells Google Mock to allow uninteresting calls on the given mock - // object. - // L < g_gmock_mutex - static void AllowUninterestingCalls(const void* mock_obj); - - // Tells Google Mock to warn the user about uninteresting calls on - // the given mock object. - // L < g_gmock_mutex - static void WarnUninterestingCalls(const void* mock_obj); - - // Tells Google Mock to fail uninteresting calls on the given mock - // object. - // L < g_gmock_mutex - static void FailUninterestingCalls(const void* mock_obj); - - // Tells Google Mock the given mock object is being destroyed and - // its entry in the call-reaction table should be removed. - // L < g_gmock_mutex - static void UnregisterCallReaction(const void* mock_obj); - - // Returns the reaction Google Mock will have on uninteresting calls - // made on the given mock object. - // L < g_gmock_mutex - static internal::CallReaction GetReactionOnUninterestingCalls( - const void* mock_obj); - - // Verifies that all expectations on the given mock object have been - // satisfied. Reports one or more Google Test non-fatal failures - // and returns false if not. - // L >= g_gmock_mutex - static bool VerifyAndClearExpectationsLocked(void* mock_obj); - - // Clears all ON_CALL()s set on the given mock object. - // L >= g_gmock_mutex - static void ClearDefaultActionsLocked(void* mock_obj); - - // Registers a mock object and a mock method it owns. - // L < g_gmock_mutex - static void Register(const void* mock_obj, - internal::UntypedFunctionMockerBase* mocker); - - // Tells Google Mock where in the source code mock_obj is used in an - // ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this - // information helps the user identify which object it is. - // L < g_gmock_mutex - static void RegisterUseByOnCallOrExpectCall( - const void* mock_obj, const char* file, int line); - - // Unregisters a mock method; removes the owning mock object from - // the registry when the last mock method associated with it has - // been unregistered. This is called only in the destructor of - // FunctionMockerBase. - // L >= g_gmock_mutex - static void UnregisterLocked(internal::UntypedFunctionMockerBase* mocker); -}; // class Mock - -// Sequence objects are used by a user to specify the relative order -// in which the expectations should match. They are copyable (we rely -// on the compiler-defined copy constructor and assignment operator). -class Sequence { - public: - // Constructs an empty sequence. - Sequence() - : last_expectation_( - new internal::linked_ptr(NULL)) {} - - // Adds an expectation to this sequence. The caller must ensure - // that no other thread is accessing this Sequence object. - void AddExpectation( - const internal::linked_ptr& expectation) const; - private: - // The last expectation in this sequence. We use a nested - // linked_ptr here because: - // - Sequence objects are copyable, and we want the copies to act - // as aliases. The outer linked_ptr allows the copies to co-own - // and share the same state. - // - An Expectation object is co-owned (via linked_ptr) by its - // FunctionMocker and its successors (other Expectation objects). - // Hence the inner linked_ptr. - internal::linked_ptr > - last_expectation_; -}; // class Sequence - -// An object of this type causes all EXPECT_CALL() statements -// encountered in its scope to be put in an anonymous sequence. The -// work is done in the constructor and destructor. You should only -// create an InSequence object on the stack. -// -// The sole purpose for this class is to support easy definition of -// sequential expectations, e.g. -// -// { -// InSequence dummy; // The name of the object doesn't matter. -// -// // The following expectations must match in the order they appear. -// EXPECT_CALL(a, Bar())...; -// EXPECT_CALL(a, Baz())...; -// ... -// EXPECT_CALL(b, Xyz())...; -// } -// -// You can create InSequence objects in multiple threads, as long as -// they are used to affect different mock objects. The idea is that -// each thread can create and set up its own mocks as if it's the only -// thread. However, for clarity of your tests we recommend you to set -// up mocks in the main thread unless you have a good reason not to do -// so. -class InSequence { - public: - InSequence(); - ~InSequence(); - private: - bool sequence_created_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence); // NOLINT -} GMOCK_ATTRIBUTE_UNUSED_; - -namespace internal { - -// Points to the implicit sequence introduced by a living InSequence -// object (if any) in the current thread or NULL. -extern ThreadLocal g_gmock_implicit_sequence; - -// Base class for implementing expectations. -// -// There are two reasons for having a type-agnostic base class for -// Expectation: -// -// 1. We need to store collections of expectations of different -// types (e.g. all pre-requisites of a particular expectation, all -// expectations in a sequence). Therefore these expectation objects -// must share a common base class. -// -// 2. We can avoid binary code bloat by moving methods not depending -// on the template argument of Expectation to the base class. -// -// This class is internal and mustn't be used by user code directly. -class ExpectationBase { - public: - ExpectationBase(const char* file, int line); - - virtual ~ExpectationBase(); - - // Where in the source file was the expectation spec defined? - const char* file() const { return file_; } - int line() const { return line_; } - - // Returns the cardinality specified in the expectation spec. - const Cardinality& cardinality() const { return cardinality_; } - - // Describes the source file location of this expectation. - void DescribeLocationTo(::std::ostream* os) const { - *os << file() << ":" << line() << ": "; - } - - // Describes how many times a function call matching this - // expectation has occurred. - // L >= g_gmock_mutex - virtual void DescribeCallCountTo(::std::ostream* os) const = 0; - protected: - typedef std::set, - LinkedPtrLessThan > - ExpectationBaseSet; - - enum Clause { - // Don't change the order of the enum members! - kNone, - kWith, - kTimes, - kInSequence, - kWillOnce, - kWillRepeatedly, - kRetiresOnSaturation, - }; - - // Asserts that the EXPECT_CALL() statement has the given property. - void AssertSpecProperty(bool property, const string& failure_message) const { - Assert(property, file_, line_, failure_message); - } - - // Expects that the EXPECT_CALL() statement has the given property. - void ExpectSpecProperty(bool property, const string& failure_message) const { - Expect(property, file_, line_, failure_message); - } - - // Explicitly specifies the cardinality of this expectation. Used - // by the subclasses to implement the .Times() clause. - void SpecifyCardinality(const Cardinality& cardinality); - - // Returns true iff the user specified the cardinality explicitly - // using a .Times(). - bool cardinality_specified() const { return cardinality_specified_; } - - // Sets the cardinality of this expectation spec. - void set_cardinality(const Cardinality& cardinality) { - cardinality_ = cardinality; - } - - // The following group of methods should only be called after the - // EXPECT_CALL() statement, and only when g_gmock_mutex is held by - // the current thread. - - // Retires all pre-requisites of this expectation. - // L >= g_gmock_mutex - void RetireAllPreRequisites(); - - // Returns true iff this expectation is retired. - // L >= g_gmock_mutex - bool is_retired() const { - g_gmock_mutex.AssertHeld(); - return retired_; - } - - // Retires this expectation. - // L >= g_gmock_mutex - void Retire() { - g_gmock_mutex.AssertHeld(); - retired_ = true; - } - - // Returns true iff this expectation is satisfied. - // L >= g_gmock_mutex - bool IsSatisfied() const { - g_gmock_mutex.AssertHeld(); - return cardinality().IsSatisfiedByCallCount(call_count_); - } - - // Returns true iff this expectation is saturated. - // L >= g_gmock_mutex - bool IsSaturated() const { - g_gmock_mutex.AssertHeld(); - return cardinality().IsSaturatedByCallCount(call_count_); - } - - // Returns true iff this expectation is over-saturated. - // L >= g_gmock_mutex - bool IsOverSaturated() const { - g_gmock_mutex.AssertHeld(); - return cardinality().IsOverSaturatedByCallCount(call_count_); - } - - // Returns true iff all pre-requisites of this expectation are satisfied. - // L >= g_gmock_mutex - bool AllPrerequisitesAreSatisfied() const; - - // Adds unsatisfied pre-requisites of this expectation to 'result'. - // L >= g_gmock_mutex - void FindUnsatisfiedPrerequisites(ExpectationBaseSet* result) const; - - // Returns the number this expectation has been invoked. - // L >= g_gmock_mutex - int call_count() const { - g_gmock_mutex.AssertHeld(); - return call_count_; - } - - // Increments the number this expectation has been invoked. - // L >= g_gmock_mutex - void IncrementCallCount() { - g_gmock_mutex.AssertHeld(); - call_count_++; - } - - private: - friend class ::testing::Sequence; - friend class ::testing::internal::ExpectationTester; - - template - friend class Expectation; - - // This group of fields are part of the spec and won't change after - // an EXPECT_CALL() statement finishes. - const char* file_; // The file that contains the expectation. - int line_; // The line number of the expectation. - // True iff the cardinality is specified explicitly. - bool cardinality_specified_; - Cardinality cardinality_; // The cardinality of the expectation. - // The immediate pre-requisites of this expectation. We use - // linked_ptr in the set because we want an Expectation object to be - // co-owned by its FunctionMocker and its successors. This allows - // multiple mock objects to be deleted at different times. - ExpectationBaseSet immediate_prerequisites_; - - // This group of fields are the current state of the expectation, - // and can change as the mock function is called. - int call_count_; // How many times this expectation has been invoked. - bool retired_; // True iff this expectation has retired. -}; // class ExpectationBase - -// Impements an expectation for the given function type. -template -class Expectation : public ExpectationBase { - public: - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::ArgumentMatcherTuple ArgumentMatcherTuple; - typedef typename Function::Result Result; - - Expectation(FunctionMockerBase* owner, const char* file, int line, - const ArgumentMatcherTuple& m) - : ExpectationBase(file, line), - owner_(owner), - matchers_(m), - // By default, extra_matcher_ should match anything. However, - // we cannot initialize it with _ as that triggers a compiler - // bug in Symbian's C++ compiler (cannot decide between two - // overloaded constructors of Matcher). - extra_matcher_(A()), - repeated_action_specified_(false), - repeated_action_(DoDefault()), - retires_on_saturation_(false), - last_clause_(kNone), - action_count_checked_(false) {} - - virtual ~Expectation() { - // Check the validity of the action count if it hasn't been done - // yet (for example, if the expectation was never used). - CheckActionCountIfNotDone(); - } - - // Implements the .With() clause. - Expectation& With(const Matcher& m) { - if (last_clause_ == kWith) { - ExpectSpecProperty(false, - ".With() cannot appear " - "more than once in an EXPECT_CALL()."); - } else { - ExpectSpecProperty(last_clause_ < kWith, - ".With() must be the first " - "clause in an EXPECT_CALL()."); - } - last_clause_ = kWith; - - extra_matcher_ = m; - return *this; - } - - // Implements the .Times() clause. - Expectation& Times(const Cardinality& cardinality) { - if (last_clause_ ==kTimes) { - ExpectSpecProperty(false, - ".Times() cannot appear " - "more than once in an EXPECT_CALL()."); - } else { - ExpectSpecProperty(last_clause_ < kTimes, - ".Times() cannot appear after " - ".InSequence(), .WillOnce(), .WillRepeatedly(), " - "or .RetiresOnSaturation()."); - } - last_clause_ = kTimes; - - ExpectationBase::SpecifyCardinality(cardinality); - return *this; - } - - // Implements the .Times() clause. - Expectation& Times(int n) { - return Times(Exactly(n)); - } - - // Implements the .InSequence() clause. - Expectation& InSequence(const Sequence& s) { - ExpectSpecProperty(last_clause_ <= kInSequence, - ".InSequence() cannot appear after .WillOnce()," - " .WillRepeatedly(), or " - ".RetiresOnSaturation()."); - last_clause_ = kInSequence; - - s.AddExpectation(owner_->GetLinkedExpectationBase(this)); - return *this; - } - Expectation& InSequence(const Sequence& s1, const Sequence& s2) { - return InSequence(s1).InSequence(s2); - } - Expectation& InSequence(const Sequence& s1, const Sequence& s2, - const Sequence& s3) { - return InSequence(s1, s2).InSequence(s3); - } - Expectation& InSequence(const Sequence& s1, const Sequence& s2, - const Sequence& s3, const Sequence& s4) { - return InSequence(s1, s2, s3).InSequence(s4); - } - Expectation& InSequence(const Sequence& s1, const Sequence& s2, - const Sequence& s3, const Sequence& s4, - const Sequence& s5) { - return InSequence(s1, s2, s3, s4).InSequence(s5); - } - - // Implements the .WillOnce() clause. - Expectation& WillOnce(const Action& action) { - ExpectSpecProperty(last_clause_ <= kWillOnce, - ".WillOnce() cannot appear after " - ".WillRepeatedly() or .RetiresOnSaturation()."); - last_clause_ = kWillOnce; - - actions_.push_back(action); - if (!cardinality_specified()) { - set_cardinality(Exactly(static_cast(actions_.size()))); - } - return *this; - } - - // Implements the .WillRepeatedly() clause. - Expectation& WillRepeatedly(const Action& action) { - if (last_clause_ == kWillRepeatedly) { - ExpectSpecProperty(false, - ".WillRepeatedly() cannot appear " - "more than once in an EXPECT_CALL()."); - } else { - ExpectSpecProperty(last_clause_ < kWillRepeatedly, - ".WillRepeatedly() cannot appear " - "after .RetiresOnSaturation()."); - } - last_clause_ = kWillRepeatedly; - repeated_action_specified_ = true; - - repeated_action_ = action; - if (!cardinality_specified()) { - set_cardinality(AtLeast(static_cast(actions_.size()))); - } - - // Now that no more action clauses can be specified, we check - // whether their count makes sense. - CheckActionCountIfNotDone(); - return *this; - } - - // Implements the .RetiresOnSaturation() clause. - Expectation& RetiresOnSaturation() { - ExpectSpecProperty(last_clause_ < kRetiresOnSaturation, - ".RetiresOnSaturation() cannot appear " - "more than once."); - last_clause_ = kRetiresOnSaturation; - retires_on_saturation_ = true; - - // Now that no more action clauses can be specified, we check - // whether their count makes sense. - CheckActionCountIfNotDone(); - return *this; - } - - // Returns the matchers for the arguments as specified inside the - // EXPECT_CALL() macro. - const ArgumentMatcherTuple& matchers() const { - return matchers_; - } - - // Returns the matcher specified by the .With() clause. - const Matcher& extra_matcher() const { - return extra_matcher_; - } - - // Returns the sequence of actions specified by the .WillOnce() clause. - const std::vector >& actions() const { return actions_; } - - // Returns the action specified by the .WillRepeatedly() clause. - const Action& repeated_action() const { return repeated_action_; } - - // Returns true iff the .RetiresOnSaturation() clause was specified. - bool retires_on_saturation() const { return retires_on_saturation_; } - - // Describes how many times a function call matching this - // expectation has occurred (implements - // ExpectationBase::DescribeCallCountTo()). - // L >= g_gmock_mutex - virtual void DescribeCallCountTo(::std::ostream* os) const { - g_gmock_mutex.AssertHeld(); - - // Describes how many times the function is expected to be called. - *os << " Expected: to be "; - cardinality().DescribeTo(os); - *os << "\n Actual: "; - Cardinality::DescribeActualCallCountTo(call_count(), os); - - // Describes the state of the expectation (e.g. is it satisfied? - // is it active?). - *os << " - " << (IsOverSaturated() ? "over-saturated" : - IsSaturated() ? "saturated" : - IsSatisfied() ? "satisfied" : "unsatisfied") - << " and " - << (is_retired() ? "retired" : "active"); - } - private: - template - friend class FunctionMockerBase; - - // The following methods will be called only after the EXPECT_CALL() - // statement finishes and when the current thread holds - // g_gmock_mutex. - - // Returns true iff this expectation matches the given arguments. - // L >= g_gmock_mutex - bool Matches(const ArgumentTuple& args) const { - g_gmock_mutex.AssertHeld(); - return TupleMatches(matchers_, args) && extra_matcher_.Matches(args); - } - - // Returns true iff this expectation should handle the given arguments. - // L >= g_gmock_mutex - bool ShouldHandleArguments(const ArgumentTuple& args) const { - g_gmock_mutex.AssertHeld(); - - // In case the action count wasn't checked when the expectation - // was defined (e.g. if this expectation has no WillRepeatedly() - // or RetiresOnSaturation() clause), we check it when the - // expectation is used for the first time. - CheckActionCountIfNotDone(); - return !is_retired() && AllPrerequisitesAreSatisfied() && Matches(args); - } - - // Describes the result of matching the arguments against this - // expectation to the given ostream. - // L >= g_gmock_mutex - void DescribeMatchResultTo(const ArgumentTuple& args, - ::std::ostream* os) const { - g_gmock_mutex.AssertHeld(); - - if (is_retired()) { - *os << " Expected: the expectation is active\n" - << " Actual: it is retired\n"; - } else if (!Matches(args)) { - if (!TupleMatches(matchers_, args)) { - DescribeMatchFailureTupleTo(matchers_, args, os); - } - if (!extra_matcher_.Matches(args)) { - *os << " Expected args: "; - extra_matcher_.DescribeTo(os); - *os << "\n Actual: don't match"; - - internal::ExplainMatchResultAsNeededTo( - extra_matcher_, args, os); - *os << "\n"; - } - } else if (!AllPrerequisitesAreSatisfied()) { - *os << " Expected: all pre-requisites are satisfied\n" - << " Actual: the following immediate pre-requisites " - << "are not satisfied:\n"; - ExpectationBaseSet unsatisfied_prereqs; - FindUnsatisfiedPrerequisites(&unsatisfied_prereqs); - int i = 0; - for (ExpectationBaseSet::const_iterator it = unsatisfied_prereqs.begin(); - it != unsatisfied_prereqs.end(); ++it) { - (*it)->DescribeLocationTo(os); - *os << "pre-requisite #" << i++ << "\n"; - } - *os << " (end of pre-requisites)\n"; - } else { - // This line is here just for completeness' sake. It will never - // be executed as currently the DescribeMatchResultTo() function - // is called only when the mock function call does NOT match the - // expectation. - *os << "The call matches the expectation.\n"; - } - } - - // Returns the action that should be taken for the current invocation. - // L >= g_gmock_mutex - const Action& GetCurrentAction(const FunctionMockerBase* mocker, - const ArgumentTuple& args) const { - g_gmock_mutex.AssertHeld(); - const int count = call_count(); - Assert(count >= 1, __FILE__, __LINE__, - "call_count() is <= 0 when GetCurrentAction() is " - "called - this should never happen."); - - const int action_count = static_cast(actions().size()); - if (action_count > 0 && !repeated_action_specified_ && - count > action_count) { - // If there is at least one WillOnce() and no WillRepeatedly(), - // we warn the user when the WillOnce() clauses ran out. - ::std::stringstream ss; - DescribeLocationTo(&ss); - ss << "Actions ran out.\n" - << "Called " << count << " times, but only " - << action_count << " WillOnce()" - << (action_count == 1 ? " is" : "s are") << " specified - "; - mocker->DescribeDefaultActionTo(args, &ss); - Log(WARNING, ss.str(), 1); - } - - return count <= action_count ? actions()[count - 1] : repeated_action(); - } - - // Given the arguments of a mock function call, if the call will - // over-saturate this expectation, returns the default action; - // otherwise, returns the next action in this expectation. Also - // describes *what* happened to 'what', and explains *why* Google - // Mock does it to 'why'. This method is not const as it calls - // IncrementCallCount(). - // L >= g_gmock_mutex - Action GetActionForArguments(const FunctionMockerBase* mocker, - const ArgumentTuple& args, - ::std::ostream* what, - ::std::ostream* why) { - g_gmock_mutex.AssertHeld(); - if (IsSaturated()) { - // We have an excessive call. - IncrementCallCount(); - *what << "Mock function called more times than expected - "; - mocker->DescribeDefaultActionTo(args, what); - DescribeCallCountTo(why); - - // TODO(wan): allow the user to control whether unexpected calls - // should fail immediately or continue using a flag - // --gmock_unexpected_calls_are_fatal. - return DoDefault(); - } - - IncrementCallCount(); - RetireAllPreRequisites(); - - if (retires_on_saturation() && IsSaturated()) { - Retire(); - } - - // Must be done after IncrementCount()! - *what << "Expected mock function call.\n"; - return GetCurrentAction(mocker, args); - } - - // Checks the action count (i.e. the number of WillOnce() and - // WillRepeatedly() clauses) against the cardinality if this hasn't - // been done before. Prints a warning if there are too many or too - // few actions. - // L < mutex_ - void CheckActionCountIfNotDone() const { - bool should_check = false; - { - MutexLock l(&mutex_); - if (!action_count_checked_) { - action_count_checked_ = true; - should_check = true; - } - } - - if (should_check) { - if (!cardinality_specified_) { - // The cardinality was inferred - no need to check the action - // count against it. - return; - } - - // The cardinality was explicitly specified. - const int action_count = static_cast(actions_.size()); - const int upper_bound = cardinality().ConservativeUpperBound(); - const int lower_bound = cardinality().ConservativeLowerBound(); - bool too_many; // True if there are too many actions, or false - // if there are too few. - if (action_count > upper_bound || - (action_count == upper_bound && repeated_action_specified_)) { - too_many = true; - } else if (0 < action_count && action_count < lower_bound && - !repeated_action_specified_) { - too_many = false; - } else { - return; - } - - ::std::stringstream ss; - DescribeLocationTo(&ss); - ss << "Too " << (too_many ? "many" : "few") - << " actions specified.\n" - << "Expected to be "; - cardinality().DescribeTo(&ss); - ss << ", but has " << (too_many ? "" : "only ") - << action_count << " WillOnce()" - << (action_count == 1 ? "" : "s"); - if (repeated_action_specified_) { - ss << " and a WillRepeatedly()"; - } - ss << "."; - Log(WARNING, ss.str(), -1); // -1 means "don't print stack trace". - } - } - - // All the fields below won't change once the EXPECT_CALL() - // statement finishes. - FunctionMockerBase* const owner_; - ArgumentMatcherTuple matchers_; - Matcher extra_matcher_; - std::vector > actions_; - bool repeated_action_specified_; // True if a WillRepeatedly() was specified. - Action repeated_action_; - bool retires_on_saturation_; - Clause last_clause_; - mutable bool action_count_checked_; // Under mutex_. - mutable Mutex mutex_; // Protects action_count_checked_. -}; // class Expectation - -// A MockSpec object is used by ON_CALL() or EXPECT_CALL() for -// specifying the default behavior of, or expectation on, a mock -// function. - -// Note: class MockSpec really belongs to the ::testing namespace. -// However if we define it in ::testing, MSVC will complain when -// classes in ::testing::internal declare it as a friend class -// template. To workaround this compiler bug, we define MockSpec in -// ::testing::internal and import it into ::testing. - -template -class MockSpec { - public: - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - typedef typename internal::Function::ArgumentMatcherTuple - ArgumentMatcherTuple; - - // Constructs a MockSpec object, given the function mocker object - // that the spec is associated with. - explicit MockSpec(internal::FunctionMockerBase* function_mocker) - : function_mocker_(function_mocker) {} - - // Adds a new default action spec to the function mocker and returns - // the newly created spec. - internal::DefaultActionSpec& InternalDefaultActionSetAt( - const char* file, int line, const char* obj, const char* call) { - LogWithLocation(internal::INFO, file, line, - string("ON_CALL(") + obj + ", " + call + ") invoked"); - return function_mocker_->AddNewDefaultActionSpec(file, line, matchers_); - } - - // Adds a new expectation spec to the function mocker and returns - // the newly created spec. - internal::Expectation& InternalExpectedAt( - const char* file, int line, const char* obj, const char* call) { - LogWithLocation(internal::INFO, file, line, - string("EXPECT_CALL(") + obj + ", " + call + ") invoked"); - return function_mocker_->AddNewExpectation(file, line, matchers_); - } - - private: - template - friend class internal::FunctionMocker; - - void SetMatchers(const ArgumentMatcherTuple& matchers) { - matchers_ = matchers; - } - - // Logs a message including file and line number information. - void LogWithLocation(testing::internal::LogSeverity severity, - const char* file, int line, - const string& message) { - ::std::ostringstream s; - s << file << ":" << line << ": " << message << ::std::endl; - Log(severity, s.str(), 0); - } - - // The function mocker that owns this spec. - internal::FunctionMockerBase* const function_mocker_; - // The argument matchers specified in the spec. - ArgumentMatcherTuple matchers_; -}; // class MockSpec - -// MSVC warns about using 'this' in base member initializer list, so -// we need to temporarily disable the warning. We have to do it for -// the entire class to suppress the warning, even though it's about -// the constructor only. - -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4355) // Temporarily disables warning 4355. -#endif // _MSV_VER - -// C++ treats the void type specially. For example, you cannot define -// a void-typed variable or pass a void value to a function. -// ActionResultHolder holds a value of type T, where T must be a -// copyable type or void (T doesn't need to be default-constructable). -// It hides the syntactic difference between void and other types, and -// is used to unify the code for invoking both void-returning and -// non-void-returning mock functions. This generic definition is used -// when T is not void. -template -class ActionResultHolder { - public: - explicit ActionResultHolder(T value) : value_(value) {} - - // The compiler-generated copy constructor and assignment operator - // are exactly what we need, so we don't need to define them. - - T value() const { return value_; } - - // Prints the held value as an action's result to os. - void PrintAsActionResult(::std::ostream* os) const { - *os << "\n Returns: "; - UniversalPrinter::Print(value_, os); - } - - // Performs the given mock function's default action and returns the - // result in a ActionResultHolder. - template - static ActionResultHolder PerformDefaultAction( - const FunctionMockerBase* func_mocker, - const Arguments& args, - const string& call_description) { - return ActionResultHolder( - func_mocker->PerformDefaultAction(args, call_description)); - } - - // Performs the given action and returns the result in a - // ActionResultHolder. - template - static ActionResultHolder PerformAction(const Action& action, - const Arguments& args) { - return ActionResultHolder(action.Perform(args)); - } - - private: - T value_; -}; - -// Specialization for T = void. -template <> -class ActionResultHolder { - public: - ActionResultHolder() {} - void value() const {} - void PrintAsActionResult(::std::ostream* /* os */) const {} - - template - static ActionResultHolder PerformDefaultAction( - const FunctionMockerBase* func_mocker, - const Arguments& args, - const string& call_description) { - func_mocker->PerformDefaultAction(args, call_description); - return ActionResultHolder(); - } - - template - static ActionResultHolder PerformAction(const Action& action, - const Arguments& args) { - action.Perform(args); - return ActionResultHolder(); - } -}; - -// The base of the function mocker class for the given function type. -// We put the methods in this class instead of its child to avoid code -// bloat. -template -class FunctionMockerBase : public UntypedFunctionMockerBase { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::ArgumentMatcherTuple ArgumentMatcherTuple; - - FunctionMockerBase() : mock_obj_(NULL), name_(""), current_spec_(this) {} - - // The destructor verifies that all expectations on this mock - // function have been satisfied. If not, it will report Google Test - // non-fatal failures for the violations. - // L < g_gmock_mutex - virtual ~FunctionMockerBase() { - MutexLock l(&g_gmock_mutex); - VerifyAndClearExpectationsLocked(); - Mock::UnregisterLocked(this); - } - - // Returns the ON_CALL spec that matches this mock function with the - // given arguments; returns NULL if no matching ON_CALL is found. - // L = * - const DefaultActionSpec* FindDefaultActionSpec( - const ArgumentTuple& args) const { - for (typename std::vector >::const_reverse_iterator it - = default_actions_.rbegin(); - it != default_actions_.rend(); ++it) { - const DefaultActionSpec& spec = *it; - if (spec.Matches(args)) - return &spec; - } - - return NULL; - } - - // Performs the default action of this mock function on the given arguments - // and returns the result. Asserts with a helpful call descrption if there is - // no valid return value. This method doesn't depend on the mutable state of - // this object, and thus can be called concurrently without locking. - // L = * - Result PerformDefaultAction(const ArgumentTuple& args, - const string& call_description) const { - const DefaultActionSpec* const spec = FindDefaultActionSpec(args); - if (spec != NULL) { - return spec->GetAction().Perform(args); - } - Assert(DefaultValue::Exists(), "", -1, - call_description + "\n The mock function has no default action " - "set, and its return type has no default value set."); - return DefaultValue::Get(); - } - - // Registers this function mocker and the mock object owning it; - // returns a reference to the function mocker object. This is only - // called by the ON_CALL() and EXPECT_CALL() macros. - // L < g_gmock_mutex - FunctionMocker& RegisterOwner(const void* mock_obj) { - { - MutexLock l(&g_gmock_mutex); - mock_obj_ = mock_obj; - } - Mock::Register(mock_obj, this); - return *::testing::internal::down_cast*>(this); - } - - // The following two functions are from UntypedFunctionMockerBase. - - // Verifies that all expectations on this mock function have been - // satisfied. Reports one or more Google Test non-fatal failures - // and returns false if not. - // L >= g_gmock_mutex - virtual bool VerifyAndClearExpectationsLocked(); - - // Clears the ON_CALL()s set on this mock function. - // L >= g_gmock_mutex - virtual void ClearDefaultActionsLocked() { - g_gmock_mutex.AssertHeld(); - default_actions_.clear(); - } - - // Sets the name of the function being mocked. Will be called upon - // each invocation of this mock function. - // L < g_gmock_mutex - void SetOwnerAndName(const void* mock_obj, const char* name) { - // We protect name_ under g_gmock_mutex in case this mock function - // is called from two threads concurrently. - MutexLock l(&g_gmock_mutex); - mock_obj_ = mock_obj; - name_ = name; - } - - // Returns the address of the mock object this method belongs to. - // Must be called after SetOwnerAndName() has been called. - // L < g_gmock_mutex - const void* MockObject() const { - const void* mock_obj; - { - // We protect mock_obj_ under g_gmock_mutex in case this mock - // function is called from two threads concurrently. - MutexLock l(&g_gmock_mutex); - mock_obj = mock_obj_; - } - return mock_obj; - } - - // Returns the name of the function being mocked. Must be called - // after SetOwnerAndName() has been called. - // L < g_gmock_mutex - const char* Name() const { - const char* name; - { - // We protect name_ under g_gmock_mutex in case this mock - // function is called from two threads concurrently. - MutexLock l(&g_gmock_mutex); - name = name_; - } - return name; - } - protected: - template - friend class MockSpec; - - // Returns the result of invoking this mock function with the given - // arguments. This function can be safely called from multiple - // threads concurrently. - // L < g_gmock_mutex - Result InvokeWith(const ArgumentTuple& args); - - // Adds and returns a default action spec for this mock function. - // L < g_gmock_mutex - DefaultActionSpec& AddNewDefaultActionSpec( - const char* file, int line, - const ArgumentMatcherTuple& m) { - Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line); - default_actions_.push_back(DefaultActionSpec(file, line, m)); - return default_actions_.back(); - } - - // Adds and returns an expectation spec for this mock function. - // L < g_gmock_mutex - Expectation& AddNewExpectation( - const char* file, int line, - const ArgumentMatcherTuple& m) { - Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line); - const linked_ptr > expectation( - new Expectation(this, file, line, m)); - expectations_.push_back(expectation); - - // Adds this expectation into the implicit sequence if there is one. - Sequence* const implicit_sequence = g_gmock_implicit_sequence.get(); - if (implicit_sequence != NULL) { - implicit_sequence->AddExpectation(expectation); - } - - return *expectation; - } - - // The current spec (either default action spec or expectation spec) - // being described on this function mocker. - MockSpec& current_spec() { return current_spec_; } - private: - template friend class Expectation; - - typedef std::vector > > Expectations; - - // Gets the internal::linked_ptr object that co-owns 'exp'. - internal::linked_ptr GetLinkedExpectationBase( - Expectation* exp) { - for (typename Expectations::const_iterator it = expectations_.begin(); - it != expectations_.end(); ++it) { - if (it->get() == exp) { - return *it; - } - } - - Assert(false, __FILE__, __LINE__, "Cannot find expectation."); - return internal::linked_ptr(NULL); - // The above statement is just to make the code compile, and will - // never be executed. - } - - // Some utilities needed for implementing InvokeWith(). - - // Describes what default action will be performed for the given - // arguments. - // L = * - void DescribeDefaultActionTo(const ArgumentTuple& args, - ::std::ostream* os) const { - const DefaultActionSpec* const spec = FindDefaultActionSpec(args); - - if (spec == NULL) { - *os << (internal::type_equals::value ? - "returning directly.\n" : - "returning default value.\n"); - } else { - *os << "taking default action specified at:\n" - << spec->file() << ":" << spec->line() << ":\n"; - } - } - - // Writes a message that the call is uninteresting (i.e. neither - // explicitly expected nor explicitly unexpected) to the given - // ostream. - // L < g_gmock_mutex - void DescribeUninterestingCall(const ArgumentTuple& args, - ::std::ostream* os) const { - *os << "Uninteresting mock function call - "; - DescribeDefaultActionTo(args, os); - *os << " Function call: " << Name(); - UniversalPrinter::Print(args, os); - } - - // Critical section: We must find the matching expectation and the - // corresponding action that needs to be taken in an ATOMIC - // transaction. Otherwise another thread may call this mock - // method in the middle and mess up the state. - // - // However, performing the action has to be left out of the critical - // section. The reason is that we have no control on what the - // action does (it can invoke an arbitrary user function or even a - // mock function) and excessive locking could cause a dead lock. - // L < g_gmock_mutex - bool FindMatchingExpectationAndAction( - const ArgumentTuple& args, Expectation** exp, Action* action, - bool* is_excessive, ::std::ostream* what, ::std::ostream* why) { - MutexLock l(&g_gmock_mutex); - *exp = this->FindMatchingExpectationLocked(args); - if (*exp == NULL) { // A match wasn't found. - *action = DoDefault(); - this->FormatUnexpectedCallMessageLocked(args, what, why); - return false; - } - - // This line must be done before calling GetActionForArguments(), - // which will increment the call count for *exp and thus affect - // its saturation status. - *is_excessive = (*exp)->IsSaturated(); - *action = (*exp)->GetActionForArguments(this, args, what, why); - return true; - } - - // Returns the expectation that matches the arguments, or NULL if no - // expectation matches them. - // L >= g_gmock_mutex - Expectation* FindMatchingExpectationLocked( - const ArgumentTuple& args) const { - g_gmock_mutex.AssertHeld(); - for (typename Expectations::const_reverse_iterator it = - expectations_.rbegin(); - it != expectations_.rend(); ++it) { - Expectation* const exp = it->get(); - if (exp->ShouldHandleArguments(args)) { - return exp; - } - } - return NULL; - } - - // Returns a message that the arguments don't match any expectation. - // L >= g_gmock_mutex - void FormatUnexpectedCallMessageLocked(const ArgumentTuple& args, - ::std::ostream* os, - ::std::ostream* why) const { - g_gmock_mutex.AssertHeld(); - *os << "\nUnexpected mock function call - "; - DescribeDefaultActionTo(args, os); - PrintTriedExpectationsLocked(args, why); - } - - // Prints a list of expectations that have been tried against the - // current mock function call. - // L >= g_gmock_mutex - void PrintTriedExpectationsLocked(const ArgumentTuple& args, - ::std::ostream* why) const { - g_gmock_mutex.AssertHeld(); - const int count = static_cast(expectations_.size()); - *why << "Google Mock tried the following " << count << " " - << (count == 1 ? "expectation, but it didn't match" : - "expectations, but none matched") - << ":\n"; - for (int i = 0; i < count; i++) { - *why << "\n"; - expectations_[i]->DescribeLocationTo(why); - if (count > 1) { - *why << "tried expectation #" << i; - } - *why << "\n"; - expectations_[i]->DescribeMatchResultTo(args, why); - expectations_[i]->DescribeCallCountTo(why); - } - } - - // Address of the mock object this mock method belongs to. Only - // valid after this mock method has been called or - // ON_CALL/EXPECT_CALL has been invoked on it. - const void* mock_obj_; // Protected by g_gmock_mutex. - - // Name of the function being mocked. Only valid after this mock - // method has been called. - const char* name_; // Protected by g_gmock_mutex. - - // The current spec (either default action spec or expectation spec) - // being described on this function mocker. - MockSpec current_spec_; - - // All default action specs for this function mocker. - std::vector > default_actions_; - // All expectations for this function mocker. - Expectations expectations_; - - // There is no generally useful and implementable semantics of - // copying a mock object, so copying a mock is usually a user error. - // Thus we disallow copying function mockers. If the user really - // wants to copy a mock object, he should implement his own copy - // operation, for example: - // - // class MockFoo : public Foo { - // public: - // // Defines a copy constructor explicitly. - // MockFoo(const MockFoo& src) {} - // ... - // }; - GTEST_DISALLOW_COPY_AND_ASSIGN_(FunctionMockerBase); -}; // class FunctionMockerBase - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif // _MSV_VER - -// Implements methods of FunctionMockerBase. - -// Verifies that all expectations on this mock function have been -// satisfied. Reports one or more Google Test non-fatal failures and -// returns false if not. -// L >= g_gmock_mutex -template -bool FunctionMockerBase::VerifyAndClearExpectationsLocked() { - g_gmock_mutex.AssertHeld(); - bool expectations_met = true; - for (typename Expectations::const_iterator it = expectations_.begin(); - it != expectations_.end(); ++it) { - Expectation* const exp = it->get(); - - if (exp->IsOverSaturated()) { - // There was an upper-bound violation. Since the error was - // already reported when it occurred, there is no need to do - // anything here. - expectations_met = false; - } else if (!exp->IsSatisfied()) { - expectations_met = false; - ::std::stringstream ss; - ss << "Actual function call count doesn't match this expectation.\n"; - // No need to show the source file location of the expectation - // in the description, as the Expect() call that follows already - // takes care of it. - exp->DescribeCallCountTo(&ss); - Expect(false, exp->file(), exp->line(), ss.str()); - } - } - expectations_.clear(); - return expectations_met; -} - -// Reports an uninteresting call (whose description is in msg) in the -// manner specified by 'reaction'. -void ReportUninterestingCall(CallReaction reaction, const string& msg); - -// Calculates the result of invoking this mock function with the given -// arguments, prints it, and returns it. -// L < g_gmock_mutex -template -typename Function::Result FunctionMockerBase::InvokeWith( - const typename Function::ArgumentTuple& args) { - typedef ActionResultHolder ResultHolder; - - if (expectations_.size() == 0) { - // No expectation is set on this mock method - we have an - // uninteresting call. - - // We must get Google Mock's reaction on uninteresting calls - // made on this mock object BEFORE performing the action, - // because the action may DELETE the mock object and make the - // following expression meaningless. - const CallReaction reaction = - Mock::GetReactionOnUninterestingCalls(MockObject()); - - // True iff we need to print this call's arguments and return - // value. This definition must be kept in sync with - // the behavior of ReportUninterestingCall(). - const bool need_to_report_uninteresting_call = - // If the user allows this uninteresting call, we print it - // only when he wants informational messages. - reaction == ALLOW ? LogIsVisible(INFO) : - // If the user wants this to be a warning, we print it only - // when he wants to see warnings. - reaction == WARN ? LogIsVisible(WARNING) : - // Otherwise, the user wants this to be an error, and we - // should always print detailed information in the error. - true; - - if (!need_to_report_uninteresting_call) { - // Perform the action without printing the call information. - return PerformDefaultAction(args, ""); - } - - // Warns about the uninteresting call. - ::std::stringstream ss; - DescribeUninterestingCall(args, &ss); - - // Calculates the function result. - const ResultHolder result = - ResultHolder::PerformDefaultAction(this, args, ss.str()); - - // Prints the function result. - result.PrintAsActionResult(&ss); - - ReportUninterestingCall(reaction, ss.str()); - return result.value(); - } - - bool is_excessive = false; - ::std::stringstream ss; - ::std::stringstream why; - ::std::stringstream loc; - Action action; - Expectation* exp; - - // The FindMatchingExpectationAndAction() function acquires and - // releases g_gmock_mutex. - const bool found = FindMatchingExpectationAndAction( - args, &exp, &action, &is_excessive, &ss, &why); - - // True iff we need to print the call's arguments and return value. - // This definition must be kept in sync with the uses of Expect() - // and Log() in this function. - const bool need_to_report_call = !found || is_excessive || LogIsVisible(INFO); - if (!need_to_report_call) { - // Perform the action without printing the call information. - return action.IsDoDefault() ? PerformDefaultAction(args, "") : - action.Perform(args); - } - - ss << " Function call: " << Name(); - UniversalPrinter::Print(args, &ss); - - // In case the action deletes a piece of the expectation, we - // generate the message beforehand. - if (found && !is_excessive) { - exp->DescribeLocationTo(&loc); - } - - const ResultHolder result = action.IsDoDefault() ? - ResultHolder::PerformDefaultAction(this, args, ss.str()) : - ResultHolder::PerformAction(action, args); - result.PrintAsActionResult(&ss); - ss << "\n" << why.str(); - - if (!found) { - // No expectation matches this call - reports a failure. - Expect(false, NULL, -1, ss.str()); - } else if (is_excessive) { - // We had an upper-bound violation and the failure message is in ss. - Expect(false, exp->file(), exp->line(), ss.str()); - } else { - // We had an expected call and the matching expectation is - // described in ss. - Log(INFO, loc.str() + ss.str(), 2); - } - return result.value(); -} - -} // namespace internal - -// The style guide prohibits "using" statements in a namespace scope -// inside a header file. However, the MockSpec class template is -// meant to be defined in the ::testing namespace. The following line -// is just a trick for working around a bug in MSVC 8.0, which cannot -// handle it if we define MockSpec in ::testing. -using internal::MockSpec; - -// Const(x) is a convenient function for obtaining a const reference -// to x. This is useful for setting expectations on an overloaded -// const mock method, e.g. -// -// class MockFoo : public FooInterface { -// public: -// MOCK_METHOD0(Bar, int()); -// MOCK_CONST_METHOD0(Bar, int&()); -// }; -// -// MockFoo foo; -// // Expects a call to non-const MockFoo::Bar(). -// EXPECT_CALL(foo, Bar()); -// // Expects a call to const MockFoo::Bar(). -// EXPECT_CALL(Const(foo), Bar()); -template -inline const T& Const(const T& x) { return x; } - -} // namespace testing - -// A separate macro is required to avoid compile errors when the name -// of the method used in call is a result of macro expansion. -// See CompilesWithMethodNameExpandedFromMacro tests in -// internal/gmock-spec-builders_test.cc for more details. -#define GMOCK_ON_CALL_IMPL_(obj, call) \ - ((obj).gmock_##call).InternalDefaultActionSetAt(__FILE__, __LINE__, \ - #obj, #call) -#define ON_CALL(obj, call) GMOCK_ON_CALL_IMPL_(obj, call) - -#define GMOCK_EXPECT_CALL_IMPL_(obj, call) \ - ((obj).gmock_##call).InternalExpectedAt(__FILE__, __LINE__, #obj, #call) -#define EXPECT_CALL(obj, call) GMOCK_EXPECT_CALL_IMPL_(obj, call) - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock.h deleted file mode 100644 index 29d9727c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/gmock.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This is the main header file a user should include. - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_H_ - -// This file implements the following syntax: -// -// ON_CALL(mock_object.Method(...)) -// .With(...) ? -// .WillByDefault(...); -// -// where With() is optional and WillByDefault() must appear exactly -// once. -// -// EXPECT_CALL(mock_object.Method(...)) -// .With(...) ? -// .Times(...) ? -// .InSequence(...) * -// .WillOnce(...) * -// .WillRepeatedly(...) ? -// .RetiresOnSaturation() ? ; -// -// where all clauses are optional and WillOnce() can be repeated. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testing { - -// Declares Google Mock flags that we want a user to use programmatically. -GMOCK_DECLARE_bool_(catch_leaked_mocks); -GMOCK_DECLARE_string_(verbose); - -// Initializes Google Mock. This must be called before running the -// tests. In particular, it parses the command line for the flags -// that Google Mock recognizes. Whenever a Google Mock flag is seen, -// it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Mock flag variables are -// updated. -// -// Since Google Test is needed for Google Mock to work, this function -// also initializes Google Test and parses its flags, if that hasn't -// been done. -void InitGoogleMock(int* argc, char** argv); - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleMock(int* argc, wchar_t** argv); - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h deleted file mode 100644 index 6386b05a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h +++ /dev/null @@ -1,277 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file contains template meta-programming utility classes needed -// for implementing Google Mock. - -#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ -#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ - -#include - -namespace testing { - -template -class Matcher; - -namespace internal { - -// An IgnoredValue object can be implicitly constructed from ANY value. -// This is used in implementing the IgnoreResult(a) action. -class IgnoredValue { - public: - // This constructor template allows any value to be implicitly - // converted to IgnoredValue. The object has no data member and - // doesn't try to remember anything about the argument. We - // deliberately omit the 'explicit' keyword in order to allow the - // conversion to be implicit. - template - IgnoredValue(const T&) {} -}; - -// MatcherTuple::type is a tuple type where each field is a Matcher -// for the corresponding field in tuple type T. -template -struct MatcherTuple; - -template <> -struct MatcherTuple< ::std::tr1::tuple<> > { - typedef ::std::tr1::tuple< > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, - Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher, Matcher > type; -}; - -template -struct MatcherTuple< ::std::tr1::tuple > { - typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, - Matcher, Matcher, Matcher, Matcher, Matcher, - Matcher > type; -}; - -// Template struct Function, where F must be a function type, contains -// the following typedefs: -// -// Result: the function's return type. -// ArgumentN: the type of the N-th argument, where N starts with 1. -// ArgumentTuple: the tuple type consisting of all parameters of F. -// ArgumentMatcherTuple: the tuple type consisting of Matchers for all -// parameters of F. -// MakeResultVoid: the function type obtained by substituting void -// for the return type of F. -// MakeResultIgnoredValue: -// the function type obtained by substituting Something -// for the return type of F. -template -struct Function; - -template -struct Function { - typedef R Result; - typedef ::std::tr1::tuple<> ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(); - typedef IgnoredValue MakeResultIgnoredValue(); -}; - -template -struct Function - : Function { - typedef A1 Argument1; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1); - typedef IgnoredValue MakeResultIgnoredValue(A1); -}; - -template -struct Function - : Function { - typedef A2 Argument2; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2); -}; - -template -struct Function - : Function { - typedef A3 Argument3; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3); -}; - -template -struct Function - : Function { - typedef A4 Argument4; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4); -}; - -template -struct Function - : Function { - typedef A5 Argument5; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5); -}; - -template -struct Function - : Function { - typedef A6 Argument6; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6); -}; - -template -struct Function - : Function { - typedef A7 Argument7; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7); -}; - -template -struct Function - : Function { - typedef A8 Argument8; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8); -}; - -template -struct Function - : Function { - typedef A9 Argument9; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, - A9); -}; - -template -struct Function - : Function { - typedef A10 Argument10; - typedef ::std::tr1::tuple ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); - typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, - A9, A10); -}; - -} // namespace internal - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h.pump deleted file mode 100644 index f3128b04..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-generated-internal-utils.h.pump +++ /dev/null @@ -1,136 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-function-mockers.h. -$$ -$var n = 10 $$ The maximum arity we support. -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file contains template meta-programming utility classes needed -// for implementing Google Mock. - -#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ -#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ - -#include - -namespace testing { - -template -class Matcher; - -namespace internal { - -// An IgnoredValue object can be implicitly constructed from ANY value. -// This is used in implementing the IgnoreResult(a) action. -class IgnoredValue { - public: - // This constructor template allows any value to be implicitly - // converted to IgnoredValue. The object has no data member and - // doesn't try to remember anything about the argument. We - // deliberately omit the 'explicit' keyword in order to allow the - // conversion to be implicit. - template - IgnoredValue(const T&) {} -}; - -// MatcherTuple::type is a tuple type where each field is a Matcher -// for the corresponding field in tuple type T. -template -struct MatcherTuple; - - -$range i 0..n -$for i [[ -$range j 1..i -$var typename_As = [[$for j, [[typename A$j]]]] -$var As = [[$for j, [[A$j]]]] -$var matcher_As = [[$for j, [[Matcher]]]] -template <$typename_As> -struct MatcherTuple< ::std::tr1::tuple<$As> > { - typedef ::std::tr1::tuple<$matcher_As > type; -}; - - -]] -// Template struct Function, where F must be a function type, contains -// the following typedefs: -// -// Result: the function's return type. -// ArgumentN: the type of the N-th argument, where N starts with 1. -// ArgumentTuple: the tuple type consisting of all parameters of F. -// ArgumentMatcherTuple: the tuple type consisting of Matchers for all -// parameters of F. -// MakeResultVoid: the function type obtained by substituting void -// for the return type of F. -// MakeResultIgnoredValue: -// the function type obtained by substituting Something -// for the return type of F. -template -struct Function; - -template -struct Function { - typedef R Result; - typedef ::std::tr1::tuple<> ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid(); - typedef IgnoredValue MakeResultIgnoredValue(); -}; - - -$range i 1..n -$for i [[ -$range j 1..i -$var typename_As = [[$for j [[, typename A$j]]]] -$var As = [[$for j, [[A$j]]]] -$var matcher_As = [[$for j, [[Matcher]]]] -$range k 1..i-1 -$var prev_As = [[$for k, [[A$k]]]] -template -struct Function - : Function { - typedef A$i Argument$i; - typedef ::std::tr1::tuple<$As> ArgumentTuple; - typedef typename MatcherTuple::type ArgumentMatcherTuple; - typedef void MakeResultVoid($As); - typedef IgnoredValue MakeResultIgnoredValue($As); -}; - - -]] -} // namespace internal - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-internal-utils.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-internal-utils.h deleted file mode 100644 index ee6aa1e2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-internal-utils.h +++ /dev/null @@ -1,727 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file defines some utilities useful for implementing Google -// Mock. They are subject to change without notice, so please DO NOT -// USE THEM IN USER CODE. - -#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ -#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ - -#include -#include // NOLINT -#include - -#include -#include -#include - -// Concatenates two pre-processor symbols; works for concatenating -// built-in macros like __FILE__ and __LINE__. -#define GMOCK_CONCAT_TOKEN_IMPL_(foo, bar) foo##bar -#define GMOCK_CONCAT_TOKEN_(foo, bar) GMOCK_CONCAT_TOKEN_IMPL_(foo, bar) - -#ifdef __GNUC__ -#define GMOCK_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) -#else -#define GMOCK_ATTRIBUTE_UNUSED_ -#endif // __GNUC__ - -class ProtocolMessage; -namespace proto2 { class Message; } - -namespace testing { -namespace internal { - -// Converts an identifier name to a space-separated list of lower-case -// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is -// treated as one word. For example, both "FooBar123" and -// "foo_bar_123" are converted to "foo bar 123". -string ConvertIdentifierNameToWords(const char* id_name); - -// Defining a variable of type CompileAssertTypesEqual will cause a -// compiler error iff T1 and T2 are different types. -template -struct CompileAssertTypesEqual; - -template -struct CompileAssertTypesEqual { -}; - -// Removes the reference from a type if it is a reference type, -// otherwise leaves it unchanged. This is the same as -// tr1::remove_reference, which is not widely available yet. -template -struct RemoveReference { typedef T type; }; // NOLINT -template -struct RemoveReference { typedef T type; }; // NOLINT - -// A handy wrapper around RemoveReference that works when the argument -// T depends on template parameters. -#define GMOCK_REMOVE_REFERENCE_(T) \ - typename ::testing::internal::RemoveReference::type - -// Removes const from a type if it is a const type, otherwise leaves -// it unchanged. This is the same as tr1::remove_const, which is not -// widely available yet. -template -struct RemoveConst { typedef T type; }; // NOLINT -template -struct RemoveConst { typedef T type; }; // NOLINT - -// MSVC 8.0 has a bug which causes the above definition to fail to -// remove the const in 'const int[3]'. The following specialization -// works around the bug. However, it causes trouble with gcc and thus -// needs to be conditionally compiled. -#ifdef _MSC_VER -template -struct RemoveConst { - typedef typename RemoveConst::type type[N]; -}; -#endif // _MSC_VER - -// A handy wrapper around RemoveConst that works when the argument -// T depends on template parameters. -#define GMOCK_REMOVE_CONST_(T) \ - typename ::testing::internal::RemoveConst::type - -// Adds reference to a type if it is not a reference type, -// otherwise leaves it unchanged. This is the same as -// tr1::add_reference, which is not widely available yet. -template -struct AddReference { typedef T& type; }; // NOLINT -template -struct AddReference { typedef T& type; }; // NOLINT - -// A handy wrapper around AddReference that works when the argument T -// depends on template parameters. -#define GMOCK_ADD_REFERENCE_(T) \ - typename ::testing::internal::AddReference::type - -// Adds a reference to const on top of T as necessary. For example, -// it transforms -// -// char ==> const char& -// const char ==> const char& -// char& ==> const char& -// const char& ==> const char& -// -// The argument T must depend on some template parameters. -#define GMOCK_REFERENCE_TO_CONST_(T) \ - GMOCK_ADD_REFERENCE_(const GMOCK_REMOVE_REFERENCE_(T)) - -// PointeeOf::type is the type of a value pointed to by a -// Pointer, which can be either a smart pointer or a raw pointer. The -// following default implementation is for the case where Pointer is a -// smart pointer. -template -struct PointeeOf { - // Smart pointer classes define type element_type as the type of - // their pointees. - typedef typename Pointer::element_type type; -}; -// This specialization is for the raw pointer case. -template -struct PointeeOf { typedef T type; }; // NOLINT - -// GetRawPointer(p) returns the raw pointer underlying p when p is a -// smart pointer, or returns p itself when p is already a raw pointer. -// The following default implementation is for the smart pointer case. -template -inline typename Pointer::element_type* GetRawPointer(const Pointer& p) { - return p.get(); -} -// This overloaded version is for the raw pointer case. -template -inline Element* GetRawPointer(Element* p) { return p; } - -// This comparator allows linked_ptr to be stored in sets. -template -struct LinkedPtrLessThan { - bool operator()(const ::testing::internal::linked_ptr& lhs, - const ::testing::internal::linked_ptr& rhs) const { - return lhs.get() < rhs.get(); - } -}; - -// ImplicitlyConvertible::value is a compile-time bool -// constant that's true iff type From can be implicitly converted to -// type To. -template -class ImplicitlyConvertible { - private: - // We need the following helper functions only for their types. - // They have no implementations. - - // MakeFrom() is an expression whose type is From. We cannot simply - // use From(), as the type From may not have a public default - // constructor. - static From MakeFrom(); - - // These two functions are overloaded. Given an expression - // Helper(x), the compiler will pick the first version if x can be - // implicitly converted to type To; otherwise it will pick the - // second version. - // - // The first version returns a value of size 1, and the second - // version returns a value of size 2. Therefore, by checking the - // size of Helper(x), which can be done at compile time, we can tell - // which version of Helper() is used, and hence whether x can be - // implicitly converted to type To. - static char Helper(To); - static char (&Helper(...))[2]; // NOLINT - - // We have to put the 'public' section after the 'private' section, - // or MSVC refuses to compile the code. - public: - // MSVC warns about implicitly converting from double to int for - // possible loss of data, so we need to temporarily disable the - // warning. -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4244) // Temporarily disables warning 4244. - static const bool value = - sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; -#pragma warning(pop) // Restores the warning state. -#else - static const bool value = - sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; -#endif // _MSV_VER -}; -template -const bool ImplicitlyConvertible::value; - -// In what follows, we use the term "kind" to indicate whether a type -// is bool, an integer type (excluding bool), a floating-point type, -// or none of them. This categorization is useful for determining -// when a matcher argument type can be safely converted to another -// type in the implementation of SafeMatcherCast. -enum TypeKind { - kBool, kInteger, kFloatingPoint, kOther -}; - -// KindOf::value is the kind of type T. -template struct KindOf { - enum { value = kOther }; // The default kind. -}; - -// This macro declares that the kind of 'type' is 'kind'. -#define GMOCK_DECLARE_KIND_(type, kind) \ - template <> struct KindOf { enum { value = kind }; } - -GMOCK_DECLARE_KIND_(bool, kBool); - -// All standard integer types. -GMOCK_DECLARE_KIND_(char, kInteger); -GMOCK_DECLARE_KIND_(signed char, kInteger); -GMOCK_DECLARE_KIND_(unsigned char, kInteger); -GMOCK_DECLARE_KIND_(short, kInteger); // NOLINT -GMOCK_DECLARE_KIND_(unsigned short, kInteger); // NOLINT -GMOCK_DECLARE_KIND_(int, kInteger); -GMOCK_DECLARE_KIND_(unsigned int, kInteger); -GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT -GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT - -// MSVC can be configured to define wchar_t as a typedef of unsigned -// short. It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t is a -// native type. -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) -GMOCK_DECLARE_KIND_(wchar_t, kInteger); -#endif - -// Non-standard integer types. -GMOCK_DECLARE_KIND_(Int64, kInteger); -GMOCK_DECLARE_KIND_(UInt64, kInteger); - -// All standard floating-point types. -GMOCK_DECLARE_KIND_(float, kFloatingPoint); -GMOCK_DECLARE_KIND_(double, kFloatingPoint); -GMOCK_DECLARE_KIND_(long double, kFloatingPoint); - -#undef GMOCK_DECLARE_KIND_ - -// Evaluates to the kind of 'type'. -#define GMOCK_KIND_OF_(type) \ - static_cast< ::testing::internal::TypeKind>( \ - ::testing::internal::KindOf::value) - -// Evaluates to true iff integer type T is signed. -#define GMOCK_IS_SIGNED_(T) (static_cast(-1) < 0) - -// LosslessArithmeticConvertibleImpl::value -// is true iff arithmetic type From can be losslessly converted to -// arithmetic type To. -// -// It's the user's responsibility to ensure that both From and To are -// raw (i.e. has no CV modifier, is not a pointer, and is not a -// reference) built-in arithmetic types, kFromKind is the kind of -// From, and kToKind is the kind of To; the value is -// implementation-defined when the above pre-condition is violated. -template -struct LosslessArithmeticConvertibleImpl : public false_type {}; - -// Converting bool to bool is lossless. -template <> -struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT - -// Converting bool to any integer type is lossless. -template -struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT - -// Converting bool to any floating-point type is lossless. -template -struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT - -// Converting an integer to bool is lossy. -template -struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT - -// Converting an integer to another non-bool integer is lossless iff -// the target type's range encloses the source type's range. -template -struct LosslessArithmeticConvertibleImpl - : public bool_constant< - // When converting from a smaller size to a larger size, we are - // fine as long as we are not converting from signed to unsigned. - ((sizeof(From) < sizeof(To)) && - (!GMOCK_IS_SIGNED_(From) || GMOCK_IS_SIGNED_(To))) || - // When converting between the same size, the signedness must match. - ((sizeof(From) == sizeof(To)) && - (GMOCK_IS_SIGNED_(From) == GMOCK_IS_SIGNED_(To)))> {}; // NOLINT - -#undef GMOCK_IS_SIGNED_ - -// Converting an integer to a floating-point type may be lossy, since -// the format of a floating-point number is implementation-defined. -template -struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT - -// Converting a floating-point to bool is lossy. -template -struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT - -// Converting a floating-point to an integer is lossy. -template -struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT - -// Converting a floating-point to another floating-point is lossless -// iff the target type is at least as big as the source type. -template -struct LosslessArithmeticConvertibleImpl< - kFloatingPoint, From, kFloatingPoint, To> - : public bool_constant {}; // NOLINT - -// LosslessArithmeticConvertible::value is true iff arithmetic -// type From can be losslessly converted to arithmetic type To. -// -// It's the user's responsibility to ensure that both From and To are -// raw (i.e. has no CV modifier, is not a pointer, and is not a -// reference) built-in arithmetic types; the value is -// implementation-defined when the above pre-condition is violated. -template -struct LosslessArithmeticConvertible - : public LosslessArithmeticConvertibleImpl< - GMOCK_KIND_OF_(From), From, GMOCK_KIND_OF_(To), To> {}; // NOLINT - -// IsAProtocolMessage::value is a compile-time bool constant that's -// true iff T is type ProtocolMessage, proto2::Message, or a subclass -// of those. -template -struct IsAProtocolMessage - : public bool_constant< - ImplicitlyConvertible::value || - ImplicitlyConvertible::value> { -}; - -// When the compiler sees expression IsContainerTest(0), the first -// overload of IsContainerTest will be picked if C is an STL-style -// container class (since C::const_iterator* is a valid type and 0 can -// be converted to it), while the second overload will be picked -// otherwise (since C::const_iterator will be an invalid type in this -// case). Therefore, we can determine whether C is a container class -// by checking the type of IsContainerTest(0). The value of the -// expression is insignificant. -typedef int IsContainer; -template -IsContainer IsContainerTest(typename C::const_iterator*) { return 0; } - -typedef char IsNotContainer; -template -IsNotContainer IsContainerTest(...) { return '\0'; } - -// This interface knows how to report a Google Mock failure (either -// non-fatal or fatal). -class FailureReporterInterface { - public: - // The type of a failure (either non-fatal or fatal). - enum FailureType { - NONFATAL, FATAL - }; - - virtual ~FailureReporterInterface() {} - - // Reports a failure that occurred at the given source file location. - virtual void ReportFailure(FailureType type, const char* file, int line, - const string& message) = 0; -}; - -// Returns the failure reporter used by Google Mock. -FailureReporterInterface* GetFailureReporter(); - -// Asserts that condition is true; aborts the process with the given -// message if condition is false. We cannot use LOG(FATAL) or CHECK() -// as Google Mock might be used to mock the log sink itself. We -// inline this function to prevent it from showing up in the stack -// trace. -inline void Assert(bool condition, const char* file, int line, - const string& msg) { - if (!condition) { - GetFailureReporter()->ReportFailure(FailureReporterInterface::FATAL, - file, line, msg); - } -} -inline void Assert(bool condition, const char* file, int line) { - Assert(condition, file, line, "Assertion failed."); -} - -// Verifies that condition is true; generates a non-fatal failure if -// condition is false. -inline void Expect(bool condition, const char* file, int line, - const string& msg) { - if (!condition) { - GetFailureReporter()->ReportFailure(FailureReporterInterface::NONFATAL, - file, line, msg); - } -} -inline void Expect(bool condition, const char* file, int line) { - Expect(condition, file, line, "Expectation failed."); -} - -// Severity level of a log. -enum LogSeverity { - INFO = 0, - WARNING = 1, -}; - -// Valid values for the --gmock_verbose flag. - -// All logs (informational and warnings) are printed. -const char kInfoVerbosity[] = "info"; -// Only warnings are printed. -const char kWarningVerbosity[] = "warning"; -// No logs are printed. -const char kErrorVerbosity[] = "error"; - -// Returns true iff a log with the given severity is visible according -// to the --gmock_verbose flag. -bool LogIsVisible(LogSeverity severity); - -// Prints the given message to stdout iff 'severity' >= the level -// specified by the --gmock_verbose flag. If stack_frames_to_skip >= -// 0, also prints the stack trace excluding the top -// stack_frames_to_skip frames. In opt mode, any positive -// stack_frames_to_skip is treated as 0, since we don't know which -// function calls will be inlined by the compiler and need to be -// conservative. -void Log(LogSeverity severity, const string& message, int stack_frames_to_skip); - -// TODO(wan@google.com): group all type utilities together. - -// Type traits. - -// is_reference::value is non-zero iff T is a reference type. -template struct is_reference : public false_type {}; -template struct is_reference : public true_type {}; - -// type_equals::value is non-zero iff T1 and T2 are the same type. -template struct type_equals : public false_type {}; -template struct type_equals : public true_type {}; - -// remove_reference::type removes the reference from type T, if any. -template struct remove_reference { typedef T type; }; // NOLINT -template struct remove_reference { typedef T type; }; // NOLINT - -// Invalid() returns an invalid value of type T. This is useful -// when a value of type T is needed for compilation, but the statement -// will not really be executed (or we don't care if the statement -// crashes). -template -inline T Invalid() { - return *static_cast::type*>(NULL); -} -template <> -inline void Invalid() {} - -// Utilities for native arrays. - -// ArrayEq() compares two k-dimensional native arrays using the -// elements' operator==, where k can be any integer >= 0. When k is -// 0, ArrayEq() degenerates into comparing a single pair of values. - -template -bool ArrayEq(const T* lhs, size_t size, const U* rhs); - -// This generic version is used when k is 0. -template -inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; } - -// This overload is used when k >= 1. -template -inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) { - return internal::ArrayEq(lhs, N, rhs); -} - -// This helper reduces code bloat. If we instead put its logic inside -// the previous ArrayEq() function, arrays with different sizes would -// lead to different copies of the template code. -template -bool ArrayEq(const T* lhs, size_t size, const U* rhs) { - for (size_t i = 0; i != size; i++) { - if (!internal::ArrayEq(lhs[i], rhs[i])) - return false; - } - return true; -} - -// Finds the first element in the iterator range [begin, end) that -// equals elem. Element may be a native array type itself. -template -Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) { - for (Iter it = begin; it != end; ++it) { - if (internal::ArrayEq(*it, elem)) - return it; - } - return end; -} - -// CopyArray() copies a k-dimensional native array using the elements' -// operator=, where k can be any integer >= 0. When k is 0, -// CopyArray() degenerates into copying a single value. - -template -void CopyArray(const T* from, size_t size, U* to); - -// This generic version is used when k is 0. -template -inline void CopyArray(const T& from, U* to) { *to = from; } - -// This overload is used when k >= 1. -template -inline void CopyArray(const T(&from)[N], U(*to)[N]) { - internal::CopyArray(from, N, *to); -} - -// This helper reduces code bloat. If we instead put its logic inside -// the previous CopyArray() function, arrays with different sizes -// would lead to different copies of the template code. -template -void CopyArray(const T* from, size_t size, U* to) { - for (size_t i = 0; i != size; i++) { - internal::CopyArray(from[i], to + i); - } -} - -// The relation between an NativeArray object (see below) and the -// native array it represents. -enum RelationToSource { - kReference, // The NativeArray references the native array. - kCopy // The NativeArray makes a copy of the native array and - // owns the copy. -}; - -// Adapts a native array to a read-only STL-style container. Instead -// of the complete STL container concept, this adaptor only implements -// members useful for Google Mock's container matchers. New members -// should be added as needed. To simplify the implementation, we only -// support Element being a raw type (i.e. having no top-level const or -// reference modifier). It's the client's responsibility to satisfy -// this requirement. Element can be an array type itself (hence -// multi-dimensional arrays are supported). -template -class NativeArray { - public: - // STL-style container typedefs. - typedef Element value_type; - typedef const Element* const_iterator; - - // Constructs from a native array passed by reference. - template - NativeArray(const Element (&array)[N], RelationToSource relation) { - Init(array, N, relation); - } - - // Constructs from a native array passed by a pointer and a size. - // For generality we don't artificially restrict the types of the - // pointer and the size. - template - NativeArray(const ::std::tr1::tuple& array, - RelationToSource relation) { - Init(internal::GetRawPointer(::std::tr1::get<0>(array)), - ::std::tr1::get<1>(array), - relation); - } - - // Copy constructor. - NativeArray(const NativeArray& rhs) { - Init(rhs.array_, rhs.size_, rhs.relation_to_source_); - } - - ~NativeArray() { - // Ensures that the user doesn't instantiate NativeArray with a - // const or reference type. - testing::StaticAssertTypeEq(); - if (relation_to_source_ == kCopy) - delete[] array_; - } - - // STL-style container methods. - size_t size() const { return size_; } - const_iterator begin() const { return array_; } - const_iterator end() const { return array_ + size_; } - bool operator==(const NativeArray& rhs) const { - return size() == rhs.size() && - ArrayEq(begin(), size(), rhs.begin()); - } - - private: - // Not implemented as we don't want to support assignment. - void operator=(const NativeArray& rhs); - - // Initializes this object; makes a copy of the input array if - // 'relation' is kCopy. - void Init(const Element* array, size_t size, RelationToSource relation) { - if (relation == kReference) { - array_ = array; - } else { - Element* const copy = new Element[size]; - CopyArray(array, size, copy); - array_ = copy; - } - size_ = size; - relation_to_source_ = relation; - } - - const Element* array_; - size_t size_; - RelationToSource relation_to_source_; -}; - -// Given a raw type (i.e. having no top-level reference or const -// modifier) RawContainer that's either an STL-style container or a -// native array, class StlContainerView has the -// following members: -// -// - type is a type that provides an STL-style container view to -// (i.e. implements the STL container concept for) RawContainer; -// - const_reference is a type that provides a reference to a const -// RawContainer; -// - ConstReference(raw_container) returns a const reference to an STL-style -// container view to raw_container, which is a RawContainer. -// - Copy(raw_container) returns an STL-style container view of a -// copy of raw_container, which is a RawContainer. -// -// This generic version is used when RawContainer itself is already an -// STL-style container. -template -class StlContainerView { - public: - typedef RawContainer type; - typedef const type& const_reference; - - static const_reference ConstReference(const RawContainer& container) { - // Ensures that RawContainer is not a const type. - testing::StaticAssertTypeEq(); - return container; - } - static type Copy(const RawContainer& container) { return container; } -}; - -// This specialization is used when RawContainer is a native array type. -template -class StlContainerView { - public: - typedef GMOCK_REMOVE_CONST_(Element) RawElement; - typedef internal::NativeArray type; - // NativeArray can represent a native array either by value or by - // reference (selected by a constructor argument), so 'const type' - // can be used to reference a const native array. We cannot - // 'typedef const type& const_reference' here, as that would mean - // ConstReference() has to return a reference to a local variable. - typedef const type const_reference; - - static const_reference ConstReference(const Element (&array)[N]) { - // Ensures that Element is not a const type. - testing::StaticAssertTypeEq(); - return type(array, kReference); - } - static type Copy(const Element (&array)[N]) { - return type(array, kCopy); - } -}; - -// This specialization is used when RawContainer is a native array -// represented as a (pointer, size) tuple. -template -class StlContainerView< ::std::tr1::tuple > { - public: - typedef GMOCK_REMOVE_CONST_( - typename internal::PointeeOf::type) RawElement; - typedef internal::NativeArray type; - typedef const type const_reference; - - static const_reference ConstReference( - const ::std::tr1::tuple& array) { - return type(array, kReference); - } - static type Copy(const ::std::tr1::tuple& array) { - return type(array, kCopy); - } -}; - -// The following specialization prevents the user from instantiating -// StlContainer with a reference type. -template class StlContainerView; - -} // namespace internal -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-port.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-port.h deleted file mode 100644 index 9ee8f728..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/include/gmock/internal/gmock-port.h +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vadimb@google.com (Vadim Berman) -// -// Low-level types and utilities for porting Google Mock to various -// platforms. They are subject to change without notice. DO NOT USE -// THEM IN USER CODE. - -#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ -#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ - -#include -#include -#include - -// Most of the types needed for porting Google Mock are also required -// for Google Test and are defined in gtest-port.h. -#include -#include - -// To avoid conditional compilation everywhere, we make it -// gmock-port.h's responsibility to #include the header implementing -// tr1/tuple. gmock-port.h does this via gtest-port.h, which is -// guaranteed to pull in the tuple header. - -#if GTEST_OS_LINUX - -// On some platforms, needs someone to define size_t, and -// won't compile otherwise. We can #include it here as we already -// included , which is guaranteed to define size_t through -// . -#include // NOLINT - -// Defines this iff Google Mock uses the enhanced POSIX regular -// expression syntax. This is public as it affects how a user uses -// regular expression matchers. -#define GMOCK_USES_POSIX_RE 1 - -#endif // GTEST_OS_LINUX - -#if defined(GMOCK_USES_PCRE) || defined(GMOCK_USES_POSIX_RE) -// Defines this iff regular expression matchers are supported. This -// is public as it tells a user whether he can use regular expression -// matchers. -#define GMOCK_HAS_REGEX 1 -#endif // defined(GMOCK_USES_PCRE) || defined(GMOCK_USES_POSIX_RE) - -namespace testing { -namespace internal { - -// For Windows, check the compiler version. At least VS 2005 SP1 is -// required to compile Google Mock. -#if GTEST_OS_WINDOWS - -#if _MSC_VER < 1400 -#error "At least Visual Studio 2005 SP1 is required to compile Google Mock." -#elif _MSC_VER == 1400 - -// Unfortunately there is no unique _MSC_VER number for SP1. So for VS 2005 -// we have to check if it has SP1 by checking whether a bug fixed in SP1 -// is present. The bug in question is -// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101702 -// where the compiler incorrectly reports sizeof(poiter to an array). - -class TestForSP1 { - private: // GCC complains if x_ is used by sizeof before defining it. - static char x_[100]; - // VS 2005 RTM incorrectly reports sizeof(&x) as 100, and that value - // is used to trigger 'invalid negative array size' error. If you - // see this error, upgrade to VS 2005 SP1 since Google Mock will not - // compile in VS 2005 RTM. - static char Google_Mock_requires_Visual_Studio_2005_SP1_or_later_to_compile_[ - sizeof(&x_) != 100 ? 1 : -1]; -}; - -#endif // _MSC_VER -#endif // GTEST_OS_WINDOWS - -// Use implicit_cast as a safe version of static_cast or const_cast -// for upcasting in the type hierarchy (i.e. casting a pointer to Foo -// to a pointer to SuperclassOfFoo or casting a pointer to Foo to -// a const pointer to Foo). -// When you use implicit_cast, the compiler checks that the cast is safe. -// Such explicit implicit_casts are necessary in surprisingly many -// situations where C++ demands an exact type match instead of an -// argument type convertable to a target type. -// -// The From type can be inferred, so the preferred syntax for using -// implicit_cast is the same as for static_cast etc.: -// -// implicit_cast(expr) -// -// implicit_cast would have been part of the C++ standard library, -// but the proposal was submitted too late. It will probably make -// its way into the language in the future. -template -inline To implicit_cast(From const &f) { - return f; -} - -// When you upcast (that is, cast a pointer from type Foo to type -// SuperclassOfFoo), it's fine to use implicit_cast<>, since upcasts -// always succeed. When you downcast (that is, cast a pointer from -// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because -// how do you know the pointer is really of type SubclassOfFoo? It -// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, -// when you downcast, you should use this macro. In debug mode, we -// use dynamic_cast<> to double-check the downcast is legal (we die -// if it's not). In normal mode, we do the efficient static_cast<> -// instead. Thus, it's important to test in debug mode to make sure -// the cast is legal! -// This is the only place in the code we should use dynamic_cast<>. -// In particular, you SHOULDN'T be using dynamic_cast<> in order to -// do RTTI (eg code like this: -// if (dynamic_cast(foo)) HandleASubclass1Object(foo); -// if (dynamic_cast(foo)) HandleASubclass2Object(foo); -// You should design the code some other way not to need this. -template // use like this: down_cast(foo); -inline To down_cast(From* f) { // so we only accept pointers - // Ensures that To is a sub-type of From *. This test is here only - // for compile-time type checking, and has no overhead in an - // optimized build at run-time, as it will be optimized away - // completely. - if (false) { - implicit_cast(0); - } - -#if GTEST_HAS_RTTI - assert(f == NULL || dynamic_cast(f) != NULL); // RTTI: debug mode only! -#endif - return static_cast(f); -} - -// The GMOCK_COMPILE_ASSERT_ macro can be used to verify that a compile time -// expression is true. For example, you could use it to verify the -// size of a static array: -// -// GMOCK_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, -// content_type_names_incorrect_size); -// -// or to make sure a struct is smaller than a certain size: -// -// GMOCK_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large); -// -// The second argument to the macro is the name of the variable. If -// the expression is false, most compilers will issue a warning/error -// containing the name of the variable. - -template -struct CompileAssert { -}; - -#define GMOCK_COMPILE_ASSERT_(expr, msg) \ - typedef ::testing::internal::CompileAssert<(bool(expr))> \ - msg[bool(expr) ? 1 : -1] - -// Implementation details of GMOCK_COMPILE_ASSERT_: -// -// - GMOCK_COMPILE_ASSERT_ works by defining an array type that has -1 -// elements (and thus is invalid) when the expression is false. -// -// - The simpler definition -// -// #define GMOCK_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1] -// -// does not work, as gcc supports variable-length arrays whose sizes -// are determined at run-time (this is gcc's extension and not part -// of the C++ standard). As a result, gcc fails to reject the -// following code with the simple definition: -// -// int foo; -// GMOCK_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is -// // not a compile-time constant. -// -// - By using the type CompileAssert<(bool(expr))>, we ensures that -// expr is a compile-time constant. (Template arguments must be -// determined at compile-time.) -// -// - The outter parentheses in CompileAssert<(bool(expr))> are necessary -// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written -// -// CompileAssert -// -// instead, these compilers will refuse to compile -// -// GMOCK_COMPILE_ASSERT_(5 > 0, some_message); -// -// (They seem to think the ">" in "5 > 0" marks the end of the -// template argument list.) -// -// - The array size is (bool(expr) ? 1 : -1), instead of simply -// -// ((expr) ? 1 : -1). -// -// This is to avoid running into a bug in MS VC 7.1, which -// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. - -#if GTEST_HAS_GLOBAL_STRING -typedef ::string string; -#elif GTEST_HAS_STD_STRING -typedef ::std::string string; -#else -#error "Google Mock requires ::std::string to compile." -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING -typedef ::wstring wstring; -#elif GTEST_HAS_STD_WSTRING -typedef ::std::wstring wstring; -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Prints the file location in the format native to the compiler. -inline void FormatFileLocation(const char* file, int line, ::std::ostream* os) { - if (file == NULL) - file = "unknown file"; - if (line < 0) { - *os << file << ":"; - } else { -#if _MSC_VER - *os << file << "(" << line << "):"; -#else - *os << file << ":" << line << ":"; -#endif - } -} - -// INTERNAL IMPLEMENTATION - DO NOT USE. -// -// GMOCK_CHECK_ is an all mode assert. It aborts the program if the condition -// is not satisfied. -// Synopsys: -// GMOCK_CHECK_(boolean_condition); -// or -// GMOCK_CHECK_(boolean_condition) << "Additional message"; -// -// This checks the condition and if the condition is not satisfied -// it prints message about the condition violation, including the -// condition itself, plus additional message streamed into it, if any, -// and then it aborts the program. It aborts the program irrespective of -// whether it is built in the debug mode or not. - -class GMockCheckProvider { - public: - GMockCheckProvider(const char* condition, const char* file, int line) { - FormatFileLocation(file, line, &::std::cerr); - ::std::cerr << " ERROR: Condition " << condition << " failed. "; - } - ~GMockCheckProvider() { - ::std::cerr << ::std::endl; - abort(); - } - ::std::ostream& GetStream() { return ::std::cerr; } -}; -#define GMOCK_CHECK_(condition) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (condition) \ - ; \ - else \ - ::testing::internal::GMockCheckProvider(\ - #condition, __FILE__, __LINE__).GetStream() - -} // namespace internal -} // namespace testing - -// Macro for referencing flags. This is public as we want the user to -// use this syntax to reference Google Mock flags. -#define GMOCK_FLAG(name) FLAGS_gmock_##name - -// Macros for declaring flags. -#define GMOCK_DECLARE_bool_(name) extern bool GMOCK_FLAG(name) -#define GMOCK_DECLARE_int32_(name) \ - extern ::testing::internal::Int32 GMOCK_FLAG(name) -#define GMOCK_DECLARE_string_(name) \ - extern ::testing::internal::String GMOCK_FLAG(name) - -// Macros for defining flags. -#define GMOCK_DEFINE_bool_(name, default_val, doc) \ - bool GMOCK_FLAG(name) = (default_val) -#define GMOCK_DEFINE_int32_(name, default_val, doc) \ - ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val) -#define GMOCK_DEFINE_string_(name, default_val, doc) \ - ::testing::internal::String GMOCK_FLAG(name) = (default_val) - -#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/make/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/make/Makefile deleted file mode 100644 index ee0527e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/make/Makefile +++ /dev/null @@ -1,109 +0,0 @@ -# A sample Makefile for building both Google Mock and Google Test and -# using them in user tests. This file is self-contained, so you don't -# need to use the Makefile in Google Test's source tree. Please tweak -# it to suit your environment and project. You may want to move it to -# your project's root directory. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make clean - removes all files generated by make. - -# Please tweak the following variable definitions as needed by your -# project, except GMOCK_HEADERS and GTEST_HEADERS, which you can use -# in your own targets but shouldn't modify. - -# Points to the root of Google Test, relative to where this file is. -# Remember to tweak this if you move this file, or if you want to use -# a copy of Google Test at a different location. -GTEST_DIR = ../gtest - -# Points to the root of Google Mock, relative to where this file is. -# Remember to tweak this if you move this file. -GMOCK_DIR = .. - -# Where to find user code. -USER_DIR = ../test - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(GMOCK_DIR) -I$(GMOCK_DIR)/include \ - -I$(GTEST_DIR) -I$(GTEST_DIR)/include - -# Flags passed to the C++ compiler. -CXXFLAGS += -g -Wall -Wextra - -# All tests produced by this Makefile. Remember to add new tests you -# created to the list. -TESTS = gmock_link_test gmock_test - -# All Google Test headers. Usually you shouldn't change this -# definition. -GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \ - $(GTEST_DIR)/include/gtest/internal/*.h - -# All Google Mock headers. Note that all Google Test headers are -# included here too, as they are #included by Google Mock headers. -# Usually you shouldn't change this definition. -GMOCK_HEADERS = $(GMOCK_DIR)/include/gmock/*.h \ - $(GMOCK_DIR)/include/gmock/internal/*.h \ - $(GTEST_HEADERS) - -# House-keeping build targets. - -all : $(TESTS) - -clean : - rm -f $(TESTS) gmock.a gmock_main.a *.o - -# Builds gmock.a and gmock_main.a. These libraries contain both -# Google Mock and Google Test. A test should link with either gmock.a -# or gmock_main.a, depending on whether it defines its own main() -# function. It's fine if your test only uses features from Google -# Test (and not Google Mock). - -# Usually you shouldn't tweak such internal variables, indicated by a -# trailing _. -GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) -GMOCK_SRCS_ = $(GMOCK_DIR)/src/*.cc $(GMOCK_HEADERS) - -# For simplicity and to avoid depending on implementation details of -# Google Mock and Google Test, the dependencies specified below are -# conservative and not optimized. This is fine as Google Mock and -# Google Test compile fast and for ordinary users their source rarely -# changes. -gtest-all.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc - -gmock-all.o : $(GMOCK_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GMOCK_DIR)/src/gmock-all.cc - -gmock_main.o : $(GMOCK_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GMOCK_DIR)/src/gmock_main.cc - -gmock.a : gmock-all.o gtest-all.o - $(AR) $(ARFLAGS) $@ $^ - -gmock_main.a : gmock-all.o gtest-all.o gmock_main.o - $(AR) $(ARFLAGS) $@ $^ - -# Builds a sample test. - -gmock_link_test.o : $(USER_DIR)/gmock_link_test.cc \ - $(USER_DIR)/gmock_link_test.h $(GMOCK_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/gmock_link_test.cc - -gmock_link2_test.o : $(USER_DIR)/gmock_link2_test.cc \ - $(USER_DIR)/gmock_link_test.h $(GMOCK_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/gmock_link2_test.cc - -gmock_link_test : gmock_link_test.o gmock_link2_test.o gmock_main.a - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ - -# Builds another sample test. - -gmock_test.o : $(USER_DIR)/gmock_test.cc $(GMOCK_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/gmock_test.cc - -gmock_test : gmock_test.o gmock_main.a - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/msvc/gmock_config.vsprops b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/msvc/gmock_config.vsprops deleted file mode 100644 index a68c32e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/msvc/gmock_config.vsprops +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/fuse_gmock_files.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/fuse_gmock_files.py deleted file mode 100755 index 4e892e9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/fuse_gmock_files.py +++ /dev/null @@ -1,240 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""fuse_gmock_files.py v0.1.0 -Fuses Google Mock and Google Test source code into two .h files and a .cc file. - -SYNOPSIS - fuse_gmock_files.py [GMOCK_ROOT_DIR] OUTPUT_DIR - - Scans GMOCK_ROOT_DIR for Google Mock and Google Test source - code, assuming Google Test is in the GMOCK_ROOT_DIR/gtest - sub-directory, and generates three files: - OUTPUT_DIR/gtest/gtest.h, OUTPUT_DIR/gmock/gmock.h, and - OUTPUT_DIR/gmock-gtest-all.cc. Then you can build your tests - by adding OUTPUT_DIR to the include search path and linking - with OUTPUT_DIR/gmock-gtest-all.cc. These three files contain - everything you need to use Google Mock. Hence you can - "install" Google Mock by copying them to wherever you want. - - GMOCK_ROOT_DIR can be omitted and defaults to the parent - directory of the directory holding this script. - -EXAMPLES - ./fuse_gmock_files.py fused_gmock - ./fuse_gmock_files.py path/to/unpacked/gmock fused_gmock - -This tool is experimental. In particular, it assumes that there is no -conditional inclusion of Google Mock or Google Test headers. Please -report any problems to googlemock@googlegroups.com. You can read -http://code.google.com/p/googlemock/wiki/CookBook for more -information. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sets -import sys - -# We assume that this file is in the scripts/ directory in the Google -# Mock root directory. -DEFAULT_GMOCK_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') - -# We need to call into gtest/scripts/fuse_gtest_files.py. -sys.path.append(os.path.join(DEFAULT_GMOCK_ROOT_DIR, 'gtest/scripts')) -import fuse_gtest_files -gtest = fuse_gtest_files - -# Regex for matching '#include '. -INCLUDE_GMOCK_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gmock/.+)>') - -# Where to find the source seed files. -GMOCK_H_SEED = 'include/gmock/gmock.h' -GMOCK_ALL_CC_SEED = 'src/gmock-all.cc' - -# Where to put the generated files. -GTEST_H_OUTPUT = 'gtest/gtest.h' -GMOCK_H_OUTPUT = 'gmock/gmock.h' -GMOCK_GTEST_ALL_CC_OUTPUT = 'gmock-gtest-all.cc' - - -def GetGTestRootDir(gmock_root): - """Returns the root directory of Google Test.""" - - return os.path.join(gmock_root, 'gtest') - - -def ValidateGMockRootDir(gmock_root): - """Makes sure gmock_root points to a valid gmock root directory. - - The function aborts the program on failure. - """ - - gtest.ValidateGTestRootDir(GetGTestRootDir(gmock_root)) - gtest.VerifyFileExists(gmock_root, GMOCK_H_SEED) - gtest.VerifyFileExists(gmock_root, GMOCK_ALL_CC_SEED) - - -def ValidateOutputDir(output_dir): - """Makes sure output_dir points to a valid output directory. - - The function aborts the program on failure. - """ - - gtest.VerifyOutputFile(output_dir, gtest.GTEST_H_OUTPUT) - gtest.VerifyOutputFile(output_dir, GMOCK_H_OUTPUT) - gtest.VerifyOutputFile(output_dir, GMOCK_GTEST_ALL_CC_OUTPUT) - - -def FuseGMockH(gmock_root, output_dir): - """Scans folder gmock_root to generate gmock/gmock.h in output_dir.""" - - output_file = file(os.path.join(output_dir, GMOCK_H_OUTPUT), 'w') - processed_files = sets.Set() # Holds all gmock headers we've processed. - - def ProcessFile(gmock_header_path): - """Processes the given gmock header file.""" - - # We don't process the same header twice. - if gmock_header_path in processed_files: - return - - processed_files.add(gmock_header_path) - - # Reads each line in the given gmock header. - for line in file(os.path.join(gmock_root, gmock_header_path), 'r'): - m = INCLUDE_GMOCK_FILE_REGEX.match(line) - if m: - # It's '#include ' - let's process it recursively. - ProcessFile('include/' + m.group(1)) - else: - m = gtest.INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - # It's '#include '. We translate it to - # , regardless of what foo is, since all - # gtest headers are fused into gtest/gtest.h. - - # There is no need to #include gtest.h twice. - if not gtest.GTEST_H_SEED in processed_files: - processed_files.add(gtest.GTEST_H_SEED) - output_file.write('#include <%s>\n' % (gtest.GTEST_H_OUTPUT,)) - else: - # Otherwise we copy the line unchanged to the output file. - output_file.write(line) - - ProcessFile(GMOCK_H_SEED) - output_file.close() - - -def FuseGMockAllCcToFile(gmock_root, output_file): - """Scans folder gmock_root to fuse gmock-all.cc into output_file.""" - - processed_files = sets.Set() - - def ProcessFile(gmock_source_file): - """Processes the given gmock source file.""" - - # We don't process the same #included file twice. - if gmock_source_file in processed_files: - return - - processed_files.add(gmock_source_file) - - # Reads each line in the given gmock source file. - for line in file(os.path.join(gmock_root, gmock_source_file), 'r'): - m = INCLUDE_GMOCK_FILE_REGEX.match(line) - if m: - # It's '#include '. We treat it as '#include - # ', as all other gmock headers are being fused - # into gmock.h and cannot be #included directly. - - # There is no need to #include more than once. - if not GMOCK_H_SEED in processed_files: - processed_files.add(GMOCK_H_SEED) - output_file.write('#include <%s>\n' % (GMOCK_H_OUTPUT,)) - else: - m = gtest.INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - # It's '#include '. - # There is no need to #include gtest.h as it has been - # #included by gtest-all.cc. - pass - else: - m = gtest.INCLUDE_SRC_FILE_REGEX.match(line) - if m: - # It's '#include "src/foo"' - let's process it recursively. - ProcessFile(m.group(1)) - else: - # Otherwise we copy the line unchanged to the output file. - output_file.write(line) - - ProcessFile(GMOCK_ALL_CC_SEED) - - -def FuseGMockGTestAllCc(gmock_root, output_dir): - """Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir.""" - - output_file = file(os.path.join(output_dir, GMOCK_GTEST_ALL_CC_OUTPUT), 'w') - # First, fuse gtest-all.cc into gmock-gtest-all.cc. - gtest.FuseGTestAllCcToFile(GetGTestRootDir(gmock_root), output_file) - # Next, append fused gmock-all.cc to gmock-gtest-all.cc. - FuseGMockAllCcToFile(gmock_root, output_file) - output_file.close() - - -def FuseGMock(gmock_root, output_dir): - """Fuses gtest.h, gmock.h, and gmock-gtest-all.h.""" - - ValidateGMockRootDir(gmock_root) - ValidateOutputDir(output_dir) - - gtest.FuseGTestH(GetGTestRootDir(gmock_root), output_dir) - FuseGMockH(gmock_root, output_dir) - FuseGMockGTestAllCc(gmock_root, output_dir) - - -def main(): - argc = len(sys.argv) - if argc == 2: - # fuse_gmock_files.py OUTPUT_DIR - FuseGMock(DEFAULT_GMOCK_ROOT_DIR, sys.argv[1]) - elif argc == 3: - # fuse_gmock_files.py GMOCK_ROOT_DIR OUTPUT_DIR - FuseGMock(sys.argv[1], sys.argv[2]) - else: - print __doc__ - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/COPYING deleted file mode 100644 index 87ea0636..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/COPYING +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2007] Neal Norwitz - Portions Copyright [2007] Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README deleted file mode 100644 index d6f95974..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README +++ /dev/null @@ -1,35 +0,0 @@ - -The Google Mock class generator is an application that is part of cppclean. -For more information about cppclean, see the README.cppclean file or -visit http://code.google.com/p/cppclean/ - -cppclean requires Python 2.3.5 or later. If you don't have Python installed -on your system, you will also need to install it. You can download Python -from: http://www.python.org/download/releases/ - -To use the Google Mock class generator, you need to call it -on the command line passing the header file and class for which you want -to generate a Google Mock class. - -Make sure to install the scripts somewhere in your path. Then you can -run the program. - - gmock_gen.py header-file.h [ClassName]... - -If no ClassNames are specified, all classes in the file are emitted. - -To change the indentation from the default of 2, set INDENT in -the environment. For example to use an indent of 4 spaces: - -INDENT=4 gmock_gen.py header-file.h ClassName - -This version was made from SVN revision 281 in the cppclean repository. - -Known Limitations ------------------ -Not all code will be generated properly. For example, when mocking templated -classes, the template information is lost. You will need to add the template -information manually. - -Not all permutations of using multiple pointers/references will be rendered -properly. These will also have to be fixed manually. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README.cppclean b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README.cppclean deleted file mode 100644 index 65431b61..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/README.cppclean +++ /dev/null @@ -1,115 +0,0 @@ -Goal: ------ - CppClean attempts to find problems in C++ source that slow development - in large code bases, for example various forms of unused code. - Unused code can be unused functions, methods, data members, types, etc - to unnecessary #include directives. Unnecessary #includes can cause - considerable extra compiles increasing the edit-compile-run cycle. - - The project home page is: http://code.google.com/p/cppclean/ - - -Features: ---------- - * Find and print C++ language constructs: classes, methods, functions, etc. - * Find classes with virtual methods, no virtual destructor, and no bases - * Find global/static data that are potential problems when using threads - * Unnecessary forward class declarations - * Unnecessary function declarations - * Undeclared function definitions - * (planned) Find unnecessary header files #included - - No direct reference to anything in the header - - Header is unnecessary if classes were forward declared instead - * (planned) Source files that reference headers not directly #included, - ie, files that rely on a transitive #include from another header - * (planned) Unused members (private, protected, & public) methods and data - * (planned) Store AST in a SQL database so relationships can be queried - -AST is Abstract Syntax Tree, a representation of parsed source code. -http://en.wikipedia.org/wiki/Abstract_syntax_tree - - -System Requirements: --------------------- - * Python 2.4 or later (2.3 probably works too) - * Works on Windows (untested), Mac OS X, and Unix - - -How to Run: ------------ - For all examples, it is assumed that cppclean resides in a directory called - /cppclean. - - To print warnings for classes with virtual methods, no virtual destructor and - no base classes: - - /cppclean/run.sh nonvirtual_dtors.py file1.h file2.h file3.cc ... - - To print all the functions defined in header file(s): - - /cppclean/run.sh functions.py file1.h file2.h ... - - All the commands take multiple files on the command line. Other programs - include: find_warnings, headers, methods, and types. Some other programs - are available, but used primarily for debugging. - - run.sh is a simple wrapper that sets PYTHONPATH to /cppclean and then - runs the program in /cppclean/cpp/PROGRAM.py. There is currently - no equivalent for Windows. Contributions for a run.bat file - would be greatly appreciated. - - -How to Configure: ------------------ - You can add a siteheaders.py file in /cppclean/cpp to configure where - to look for other headers (typically -I options passed to a compiler). - Currently two values are supported: _TRANSITIVE and GetIncludeDirs. - _TRANSITIVE should be set to a boolean value (True or False) indicating - whether to transitively process all header files. The default is False. - - GetIncludeDirs is a function that takes a single argument and returns - a sequence of directories to include. This can be a generator or - return a static list. - - def GetIncludeDirs(filename): - return ['/some/path/with/other/headers'] - - # Here is a more complicated example. - def GetIncludeDirs(filename): - yield '/path1' - yield os.path.join('/path2', os.path.dirname(filename)) - yield '/path3' - - -How to Test: ------------- - For all examples, it is assumed that cppclean resides in a directory called - /cppclean. The tests require - - cd /cppclean - make test - # To generate expected results after a change: - make expected - - -Current Status: ---------------- - The parser works pretty well for header files, parsing about 99% of Google's - header files. Anything which inspects structure of C++ source files should - work reasonably well. Function bodies are not transformed to an AST, - but left as tokens. Much work is still needed on finding unused header files - and storing an AST in a database. - - -Non-goals: ----------- - * Parsing all valid C++ source - * Handling invalid C++ source gracefully - * Compiling to machine code (or anything beyond an AST) - - -Contact: --------- - If you used cppclean, I would love to hear about your experiences - cppclean@googlegroups.com. Even if you don't use cppclean, I'd like to - hear from you. :-) (You can contact me directly at: nnorwitz@gmail.com) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/__init__.py deleted file mode 100755 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/ast.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/ast.py deleted file mode 100755 index 47dc9a07..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/ast.py +++ /dev/null @@ -1,1717 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Neal Norwitz -# Portions Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Generate an Abstract Syntax Tree (AST) for C++.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -# TODO: -# * Tokens should never be exported, need to convert to Nodes -# (return types, parameters, etc.) -# * Handle static class data for templatized classes -# * Handle casts (both C++ and C-style) -# * Handle conditions and loops (if/else, switch, for, while/do) -# -# TODO much, much later: -# * Handle #define -# * exceptions - - -try: - # Python 3.x - import builtins -except ImportError: - # Python 2.x - import __builtin__ as builtins - -import sys -import traceback - -from cpp import keywords -from cpp import tokenize -from cpp import utils - - -if not hasattr(builtins, 'reversed'): - # Support Python 2.3 and earlier. - def reversed(seq): - for i in range(len(seq)-1, -1, -1): - yield seq[i] - -if not hasattr(builtins, 'next'): - # Support Python 2.5 and earlier. - def next(obj): - return obj.next() - - -VISIBILITY_PUBLIC, VISIBILITY_PROTECTED, VISIBILITY_PRIVATE = range(3) - -FUNCTION_NONE = 0x00 -FUNCTION_CONST = 0x01 -FUNCTION_VIRTUAL = 0x02 -FUNCTION_PURE_VIRTUAL = 0x04 -FUNCTION_CTOR = 0x08 -FUNCTION_DTOR = 0x10 -FUNCTION_ATTRIBUTE = 0x20 -FUNCTION_UNKNOWN_ANNOTATION = 0x40 -FUNCTION_THROW = 0x80 - -""" -These are currently unused. Should really handle these properly at some point. - -TYPE_MODIFIER_INLINE = 0x010000 -TYPE_MODIFIER_EXTERN = 0x020000 -TYPE_MODIFIER_STATIC = 0x040000 -TYPE_MODIFIER_CONST = 0x080000 -TYPE_MODIFIER_REGISTER = 0x100000 -TYPE_MODIFIER_VOLATILE = 0x200000 -TYPE_MODIFIER_MUTABLE = 0x400000 - -TYPE_MODIFIER_MAP = { - 'inline': TYPE_MODIFIER_INLINE, - 'extern': TYPE_MODIFIER_EXTERN, - 'static': TYPE_MODIFIER_STATIC, - 'const': TYPE_MODIFIER_CONST, - 'register': TYPE_MODIFIER_REGISTER, - 'volatile': TYPE_MODIFIER_VOLATILE, - 'mutable': TYPE_MODIFIER_MUTABLE, - } -""" - -_INTERNAL_TOKEN = 'internal' -_NAMESPACE_POP = 'ns-pop' - - -# TODO(nnorwitz): use this as a singleton for templated_types, etc -# where we don't want to create a new empty dict each time. It is also const. -class _NullDict(object): - __contains__ = lambda self: False - keys = values = items = iterkeys = itervalues = iteritems = lambda self: () - - -# TODO(nnorwitz): move AST nodes into a separate module. -class Node(object): - """Base AST node.""" - - def __init__(self, start, end): - self.start = start - self.end = end - - def IsDeclaration(self): - """Returns bool if this node is a declaration.""" - return False - - def IsDefinition(self): - """Returns bool if this node is a definition.""" - return False - - def IsExportable(self): - """Returns bool if this node exportable from a header file.""" - return False - - def Requires(self, node): - """Does this AST node require the definition of the node passed in?""" - return False - - def XXX__str__(self): - return self._StringHelper(self.__class__.__name__, '') - - def _StringHelper(self, name, suffix): - if not utils.DEBUG: - return '%s(%s)' % (name, suffix) - return '%s(%d, %d, %s)' % (name, self.start, self.end, suffix) - - def __repr__(self): - return str(self) - - -class Define(Node): - def __init__(self, start, end, name, definition): - Node.__init__(self, start, end) - self.name = name - self.definition = definition - - def __str__(self): - value = '%s %s' % (self.name, self.definition) - return self._StringHelper(self.__class__.__name__, value) - - -class Include(Node): - def __init__(self, start, end, filename, system): - Node.__init__(self, start, end) - self.filename = filename - self.system = system - - def __str__(self): - fmt = '"%s"' - if self.system: - fmt = '<%s>' - return self._StringHelper(self.__class__.__name__, fmt % self.filename) - - -class Goto(Node): - def __init__(self, start, end, label): - Node.__init__(self, start, end) - self.label = label - - def __str__(self): - return self._StringHelper(self.__class__.__name__, str(self.label)) - - -class Expr(Node): - def __init__(self, start, end, expr): - Node.__init__(self, start, end) - self.expr = expr - - def Requires(self, node): - # TODO(nnorwitz): impl. - return False - - def __str__(self): - return self._StringHelper(self.__class__.__name__, str(self.expr)) - - -class Return(Expr): - pass - - -class Delete(Expr): - pass - - -class Friend(Expr): - def __init__(self, start, end, expr, namespace): - Expr.__init__(self, start, end, expr) - self.namespace = namespace[:] - - -class Using(Node): - def __init__(self, start, end, names): - Node.__init__(self, start, end) - self.names = names - - def __str__(self): - return self._StringHelper(self.__class__.__name__, str(self.names)) - - -class Parameter(Node): - def __init__(self, start, end, name, parameter_type, default): - Node.__init__(self, start, end) - self.name = name - self.type = parameter_type - self.default = default - - def Requires(self, node): - # TODO(nnorwitz): handle namespaces, etc. - return self.type.name == node.name - - def __str__(self): - name = str(self.type) - suffix = '%s %s' % (name, self.name) - if self.default: - suffix += ' = ' + ''.join([d.name for d in self.default]) - return self._StringHelper(self.__class__.__name__, suffix) - - -class _GenericDeclaration(Node): - def __init__(self, start, end, name, namespace): - Node.__init__(self, start, end) - self.name = name - self.namespace = namespace[:] - - def FullName(self): - prefix = '' - if self.namespace and self.namespace[-1]: - prefix = '::'.join(self.namespace) + '::' - return prefix + self.name - - def _TypeStringHelper(self, suffix): - if self.namespace: - names = [n or '' for n in self.namespace] - suffix += ' in ' + '::'.join(names) - return self._StringHelper(self.__class__.__name__, suffix) - - -# TODO(nnorwitz): merge with Parameter in some way? -class VariableDeclaration(_GenericDeclaration): - def __init__(self, start, end, name, var_type, initial_value, namespace): - _GenericDeclaration.__init__(self, start, end, name, namespace) - self.type = var_type - self.initial_value = initial_value - - def Requires(self, node): - # TODO(nnorwitz): handle namespaces, etc. - return self.type.name == node.name - - def ToString(self): - """Return a string that tries to reconstitute the variable decl.""" - suffix = '%s %s' % (self.type, self.name) - if self.initial_value: - suffix += ' = ' + self.initial_value - return suffix - - def __str__(self): - return self._StringHelper(self.__class__.__name__, self.ToString()) - - -class Typedef(_GenericDeclaration): - def __init__(self, start, end, name, alias, namespace): - _GenericDeclaration.__init__(self, start, end, name, namespace) - self.alias = alias - - def IsDefinition(self): - return True - - def IsExportable(self): - return True - - def Requires(self, node): - # TODO(nnorwitz): handle namespaces, etc. - name = node.name - for token in self.alias: - if token is not None and name == token.name: - return True - return False - - def __str__(self): - suffix = '%s, %s' % (self.name, self.alias) - return self._TypeStringHelper(suffix) - - -class _NestedType(_GenericDeclaration): - def __init__(self, start, end, name, fields, namespace): - _GenericDeclaration.__init__(self, start, end, name, namespace) - self.fields = fields - - def IsDefinition(self): - return True - - def IsExportable(self): - return True - - def __str__(self): - suffix = '%s, {%s}' % (self.name, self.fields) - return self._TypeStringHelper(suffix) - - -class Union(_NestedType): - pass - - -class Enum(_NestedType): - pass - - -class Class(_GenericDeclaration): - def __init__(self, start, end, name, bases, templated_types, body, namespace): - _GenericDeclaration.__init__(self, start, end, name, namespace) - self.bases = bases - self.body = body - self.templated_types = templated_types - - def IsDeclaration(self): - return self.bases is None and self.body is None - - def IsDefinition(self): - return not self.IsDeclaration() - - def IsExportable(self): - return not self.IsDeclaration() - - def Requires(self, node): - # TODO(nnorwitz): handle namespaces, etc. - if self.bases: - for token_list in self.bases: - # TODO(nnorwitz): bases are tokens, do name comparision. - for token in token_list: - if token.name == node.name: - return True - # TODO(nnorwitz): search in body too. - return False - - def __str__(self): - name = self.name - if self.templated_types: - name += '<%s>' % self.templated_types - suffix = '%s, %s, %s' % (name, self.bases, self.body) - return self._TypeStringHelper(suffix) - - -class Struct(Class): - pass - - -class Function(_GenericDeclaration): - def __init__(self, start, end, name, return_type, parameters, - modifiers, templated_types, body, namespace): - _GenericDeclaration.__init__(self, start, end, name, namespace) - converter = TypeConverter(namespace) - self.return_type = converter.CreateReturnType(return_type) - self.parameters = converter.ToParameters(parameters) - self.modifiers = modifiers - self.body = body - self.templated_types = templated_types - - def IsDeclaration(self): - return self.body is None - - def IsDefinition(self): - return self.body is not None - - def IsExportable(self): - if self.return_type and 'static' in self.return_type.modifiers: - return False - return None not in self.namespace - - def Requires(self, node): - if self.parameters: - # TODO(nnorwitz): parameters are tokens, do name comparision. - for p in self.parameters: - if p.name == node.name: - return True - # TODO(nnorwitz): search in body too. - return False - - def __str__(self): - # TODO(nnorwitz): add templated_types. - suffix = ('%s %s(%s), 0x%02x, %s' % - (self.return_type, self.name, self.parameters, - self.modifiers, self.body)) - return self._TypeStringHelper(suffix) - - -class Method(Function): - def __init__(self, start, end, name, in_class, return_type, parameters, - modifiers, templated_types, body, namespace): - Function.__init__(self, start, end, name, return_type, parameters, - modifiers, templated_types, body, namespace) - # TODO(nnorwitz): in_class could also be a namespace which can - # mess up finding functions properly. - self.in_class = in_class - - -class Type(_GenericDeclaration): - """Type used for any variable (eg class, primitive, struct, etc).""" - - def __init__(self, start, end, name, templated_types, modifiers, - reference, pointer, array): - """ - Args: - name: str name of main type - templated_types: [Class (Type?)] template type info between <> - modifiers: [str] type modifiers (keywords) eg, const, mutable, etc. - reference, pointer, array: bools - """ - _GenericDeclaration.__init__(self, start, end, name, []) - self.templated_types = templated_types - if not name and modifiers: - self.name = modifiers.pop() - self.modifiers = modifiers - self.reference = reference - self.pointer = pointer - self.array = array - - def __str__(self): - prefix = '' - if self.modifiers: - prefix = ' '.join(self.modifiers) + ' ' - name = str(self.name) - if self.templated_types: - name += '<%s>' % self.templated_types - suffix = prefix + name - if self.reference: - suffix += '&' - if self.pointer: - suffix += '*' - if self.array: - suffix += '[]' - return self._TypeStringHelper(suffix) - - # By definition, Is* are always False. A Type can only exist in - # some sort of variable declaration, parameter, or return value. - def IsDeclaration(self): - return False - - def IsDefinition(self): - return False - - def IsExportable(self): - return False - - -class TypeConverter(object): - - def __init__(self, namespace_stack): - self.namespace_stack = namespace_stack - - def _GetTemplateEnd(self, tokens, start): - count = 1 - end = start - while 1: - token = tokens[end] - end += 1 - if token.name == '<': - count += 1 - elif token.name == '>': - count -= 1 - if count == 0: - break - return tokens[start:end-1], end - - def ToType(self, tokens): - """Convert [Token,...] to [Class(...), ] useful for base classes. - For example, code like class Foo : public Bar { ... }; - the "Bar" portion gets converted to an AST. - - Returns: - [Class(...), ...] - """ - result = [] - name_tokens = [] - reference = pointer = array = False - - def AddType(templated_types): - # Partition tokens into name and modifier tokens. - names = [] - modifiers = [] - for t in name_tokens: - if keywords.IsKeyword(t.name): - modifiers.append(t.name) - else: - names.append(t.name) - name = ''.join(names) - result.append(Type(name_tokens[0].start, name_tokens[-1].end, - name, templated_types, modifiers, - reference, pointer, array)) - del name_tokens[:] - - i = 0 - end = len(tokens) - while i < end: - token = tokens[i] - if token.name == '<': - new_tokens, new_end = self._GetTemplateEnd(tokens, i+1) - AddType(self.ToType(new_tokens)) - # If there is a comma after the template, we need to consume - # that here otherwise it becomes part of the name. - i = new_end - reference = pointer = array = False - elif token.name == ',': - AddType([]) - reference = pointer = array = False - elif token.name == '*': - pointer = True - elif token.name == '&': - reference = True - elif token.name == '[': - pointer = True - elif token.name == ']': - pass - else: - name_tokens.append(token) - i += 1 - - if name_tokens: - # No '<' in the tokens, just a simple name and no template. - AddType([]) - return result - - def DeclarationToParts(self, parts, needs_name_removed): - name = None - default = [] - if needs_name_removed: - # Handle default (initial) values properly. - for i, t in enumerate(parts): - if t.name == '=': - default = parts[i+1:] - name = parts[i-1].name - if name == ']' and parts[i-2].name == '[': - name = parts[i-3].name - i -= 1 - parts = parts[:i-1] - break - else: - if parts[-1].token_type == tokenize.NAME: - name = parts.pop().name - else: - # TODO(nnorwitz): this is a hack that happens for code like - # Register(Foo); where it thinks this is a function call - # but it's actually a declaration. - name = '???' - modifiers = [] - type_name = [] - other_tokens = [] - templated_types = [] - i = 0 - end = len(parts) - while i < end: - p = parts[i] - if keywords.IsKeyword(p.name): - modifiers.append(p.name) - elif p.name == '<': - templated_tokens, new_end = self._GetTemplateEnd(parts, i+1) - templated_types = self.ToType(templated_tokens) - i = new_end - 1 - # Don't add a spurious :: to data members being initialized. - next_index = i + 1 - if next_index < end and parts[next_index].name == '::': - i += 1 - elif p.name in ('[', ']', '='): - # These are handled elsewhere. - other_tokens.append(p) - elif p.name not in ('*', '&', '>'): - # Ensure that names have a space between them. - if (type_name and type_name[-1].token_type == tokenize.NAME and - p.token_type == tokenize.NAME): - type_name.append(tokenize.Token(tokenize.SYNTAX, ' ', 0, 0)) - type_name.append(p) - else: - other_tokens.append(p) - i += 1 - type_name = ''.join([t.name for t in type_name]) - return name, type_name, templated_types, modifiers, default, other_tokens - - def ToParameters(self, tokens): - if not tokens: - return [] - - result = [] - name = type_name = '' - type_modifiers = [] - pointer = reference = array = False - first_token = None - default = [] - - def AddParameter(): - if default: - del default[0] # Remove flag. - end = type_modifiers[-1].end - parts = self.DeclarationToParts(type_modifiers, True) - (name, type_name, templated_types, modifiers, - unused_default, unused_other_tokens) = parts - parameter_type = Type(first_token.start, first_token.end, - type_name, templated_types, modifiers, - reference, pointer, array) - p = Parameter(first_token.start, end, name, - parameter_type, default) - result.append(p) - - template_count = 0 - for s in tokens: - if not first_token: - first_token = s - if s.name == '<': - template_count += 1 - elif s.name == '>': - template_count -= 1 - if template_count > 0: - type_modifiers.append(s) - continue - - if s.name == ',': - AddParameter() - name = type_name = '' - type_modifiers = [] - pointer = reference = array = False - first_token = None - default = [] - elif s.name == '*': - pointer = True - elif s.name == '&': - reference = True - elif s.name == '[': - array = True - elif s.name == ']': - pass # Just don't add to type_modifiers. - elif s.name == '=': - # Got a default value. Add any value (None) as a flag. - default.append(None) - elif default: - default.append(s) - else: - type_modifiers.append(s) - AddParameter() - return result - - def CreateReturnType(self, return_type_seq): - if not return_type_seq: - return None - start = return_type_seq[0].start - end = return_type_seq[-1].end - _, name, templated_types, modifiers, default, other_tokens = \ - self.DeclarationToParts(return_type_seq, False) - names = [n.name for n in other_tokens] - reference = '&' in names - pointer = '*' in names - array = '[' in names - return Type(start, end, name, templated_types, modifiers, - reference, pointer, array) - - def GetTemplateIndices(self, names): - # names is a list of strings. - start = names.index('<') - end = len(names) - 1 - while end > 0: - if names[end] == '>': - break - end -= 1 - return start, end+1 - -class AstBuilder(object): - def __init__(self, token_stream, filename, in_class='', visibility=None, - namespace_stack=[]): - self.tokens = token_stream - self.filename = filename - # TODO(nnorwitz): use a better data structure (deque) for the queue. - # Switching directions of the "queue" improved perf by about 25%. - # Using a deque should be even better since we access from both sides. - self.token_queue = [] - self.namespace_stack = namespace_stack[:] - self.in_class = in_class - if in_class is None: - self.in_class_name_only = None - else: - self.in_class_name_only = in_class.split('::')[-1] - self.visibility = visibility - self.in_function = False - self.current_token = None - # Keep the state whether we are currently handling a typedef or not. - self._handling_typedef = False - - self.converter = TypeConverter(self.namespace_stack) - - def HandleError(self, msg, token): - printable_queue = list(reversed(self.token_queue[-20:])) - sys.stderr.write('Got %s in %s @ %s %s\n' % - (msg, self.filename, token, printable_queue)) - - def Generate(self): - while 1: - token = self._GetNextToken() - if not token: - break - - # Get the next token. - self.current_token = token - - # Dispatch on the next token type. - if token.token_type == _INTERNAL_TOKEN: - if token.name == _NAMESPACE_POP: - self.namespace_stack.pop() - continue - - try: - result = self._GenerateOne(token) - if result is not None: - yield result - except: - self.HandleError('exception', token) - raise - - def _CreateVariable(self, pos_token, name, type_name, type_modifiers, - ref_pointer_name_seq, templated_types, value=None): - reference = '&' in ref_pointer_name_seq - pointer = '*' in ref_pointer_name_seq - array = '[' in ref_pointer_name_seq - var_type = Type(pos_token.start, pos_token.end, type_name, - templated_types, type_modifiers, - reference, pointer, array) - return VariableDeclaration(pos_token.start, pos_token.end, - name, var_type, value, self.namespace_stack) - - def _GenerateOne(self, token): - if token.token_type == tokenize.NAME: - if (keywords.IsKeyword(token.name) and - not keywords.IsBuiltinType(token.name)): - method = getattr(self, 'handle_' + token.name) - return method() - elif token.name == self.in_class_name_only: - # The token name is the same as the class, must be a ctor if - # there is a paren. Otherwise, it's the return type. - # Peek ahead to get the next token to figure out which. - next = self._GetNextToken() - self._AddBackToken(next) - if next.token_type == tokenize.SYNTAX and next.name == '(': - return self._GetMethod([token], FUNCTION_CTOR, None, True) - # Fall through--handle like any other method. - - # Handle data or function declaration/definition. - syntax = tokenize.SYNTAX - temp_tokens, last_token = \ - self._GetVarTokensUpTo(syntax, '(', ';', '{', '[') - temp_tokens.insert(0, token) - if last_token.name == '(': - # If there is an assignment before the paren, - # this is an expression, not a method. - expr = bool([e for e in temp_tokens if e.name == '=']) - if expr: - new_temp = self._GetTokensUpTo(tokenize.SYNTAX, ';') - temp_tokens.append(last_token) - temp_tokens.extend(new_temp) - last_token = tokenize.Token(tokenize.SYNTAX, ';', 0, 0) - - if last_token.name == '[': - # Handle array, this isn't a method, unless it's an operator. - # TODO(nnorwitz): keep the size somewhere. - # unused_size = self._GetTokensUpTo(tokenize.SYNTAX, ']') - temp_tokens.append(last_token) - if temp_tokens[-2].name == 'operator': - temp_tokens.append(self._GetNextToken()) - else: - temp_tokens2, last_token = \ - self._GetVarTokensUpTo(tokenize.SYNTAX, ';') - temp_tokens.extend(temp_tokens2) - - if last_token.name == ';': - # Handle data, this isn't a method. - parts = self.converter.DeclarationToParts(temp_tokens, True) - (name, type_name, templated_types, modifiers, default, - unused_other_tokens) = parts - - t0 = temp_tokens[0] - names = [t.name for t in temp_tokens] - if templated_types: - start, end = self.converter.GetTemplateIndices(names) - names = names[:start] + names[end:] - default = ''.join([t.name for t in default]) - return self._CreateVariable(t0, name, type_name, modifiers, - names, templated_types, default) - if last_token.name == '{': - self._AddBackTokens(temp_tokens[1:]) - self._AddBackToken(last_token) - method_name = temp_tokens[0].name - method = getattr(self, 'handle_' + method_name, None) - if not method: - # Must be declaring a variable. - # TODO(nnorwitz): handle the declaration. - return None - return method() - return self._GetMethod(temp_tokens, 0, None, False) - elif token.token_type == tokenize.SYNTAX: - if token.name == '~' and self.in_class: - # Must be a dtor (probably not in method body). - token = self._GetNextToken() - # self.in_class can contain A::Name, but the dtor will only - # be Name. Make sure to compare against the right value. - if (token.token_type == tokenize.NAME and - token.name == self.in_class_name_only): - return self._GetMethod([token], FUNCTION_DTOR, None, True) - # TODO(nnorwitz): handle a lot more syntax. - elif token.token_type == tokenize.PREPROCESSOR: - # TODO(nnorwitz): handle more preprocessor directives. - # token starts with a #, so remove it and strip whitespace. - name = token.name[1:].lstrip() - if name.startswith('include'): - # Remove "include". - name = name[7:].strip() - assert name - # Handle #include \ "header-on-second-line.h". - if name.startswith('\\'): - name = name[1:].strip() - assert name[0] in '<"', token - assert name[-1] in '>"', token - system = name[0] == '<' - filename = name[1:-1] - return Include(token.start, token.end, filename, system) - if name.startswith('define'): - # Remove "define". - name = name[6:].strip() - assert name - value = '' - for i, c in enumerate(name): - if c.isspace(): - value = name[i:].lstrip() - name = name[:i] - break - return Define(token.start, token.end, name, value) - if name.startswith('if') and name[2:3].isspace(): - condition = name[3:].strip() - if condition.startswith('0') or condition.startswith('(0)'): - self._SkipIf0Blocks() - return None - - def _GetTokensUpTo(self, expected_token_type, expected_token): - return self._GetVarTokensUpTo(expected_token_type, expected_token)[0] - - def _GetVarTokensUpTo(self, expected_token_type, *expected_tokens): - last_token = self._GetNextToken() - tokens = [] - while (last_token.token_type != expected_token_type or - last_token.name not in expected_tokens): - tokens.append(last_token) - last_token = self._GetNextToken() - return tokens, last_token - - # TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necesary. - def _IgnoreUpTo(self, token_type, token): - unused_tokens = self._GetTokensUpTo(token_type, token) - - def _SkipIf0Blocks(self): - count = 1 - while 1: - token = self._GetNextToken() - if token.token_type != tokenize.PREPROCESSOR: - continue - - name = token.name[1:].lstrip() - if name.startswith('endif'): - count -= 1 - if count == 0: - break - elif name.startswith('if'): - count += 1 - - def _GetMatchingChar(self, open_paren, close_paren, GetNextToken=None): - if GetNextToken is None: - GetNextToken = self._GetNextToken - # Assumes the current token is open_paren and we will consume - # and return up to the close_paren. - count = 1 - token = GetNextToken() - while 1: - if token.token_type == tokenize.SYNTAX: - if token.name == open_paren: - count += 1 - elif token.name == close_paren: - count -= 1 - if count == 0: - break - yield token - token = GetNextToken() - yield token - - def _GetParameters(self): - return self._GetMatchingChar('(', ')') - - def GetScope(self): - return self._GetMatchingChar('{', '}') - - def _GetNextToken(self): - if self.token_queue: - return self.token_queue.pop() - return next(self.tokens) - - def _AddBackToken(self, token): - if token.whence == tokenize.WHENCE_STREAM: - token.whence = tokenize.WHENCE_QUEUE - self.token_queue.insert(0, token) - else: - assert token.whence == tokenize.WHENCE_QUEUE, token - self.token_queue.append(token) - - def _AddBackTokens(self, tokens): - if tokens: - if tokens[-1].whence == tokenize.WHENCE_STREAM: - for token in tokens: - token.whence = tokenize.WHENCE_QUEUE - self.token_queue[:0] = reversed(tokens) - else: - assert tokens[-1].whence == tokenize.WHENCE_QUEUE, tokens - self.token_queue.extend(reversed(tokens)) - - def GetName(self, seq=None): - """Returns ([tokens], next_token_info).""" - GetNextToken = self._GetNextToken - if seq is not None: - it = iter(seq) - GetNextToken = lambda: next(it) - next_token = GetNextToken() - tokens = [] - last_token_was_name = False - while (next_token.token_type == tokenize.NAME or - (next_token.token_type == tokenize.SYNTAX and - next_token.name in ('::', '<'))): - # Two NAMEs in a row means the identifier should terminate. - # It's probably some sort of variable declaration. - if last_token_was_name and next_token.token_type == tokenize.NAME: - break - last_token_was_name = next_token.token_type == tokenize.NAME - tokens.append(next_token) - # Handle templated names. - if next_token.name == '<': - tokens.extend(self._GetMatchingChar('<', '>', GetNextToken)) - last_token_was_name = True - next_token = GetNextToken() - return tokens, next_token - - def GetMethod(self, modifiers, templated_types): - return_type_and_name = self._GetTokensUpTo(tokenize.SYNTAX, '(') - assert len(return_type_and_name) >= 1 - return self._GetMethod(return_type_and_name, modifiers, templated_types, - False) - - def _GetMethod(self, return_type_and_name, modifiers, templated_types, - get_paren): - template_portion = None - if get_paren: - token = self._GetNextToken() - assert token.token_type == tokenize.SYNTAX, token - if token.name == '<': - # Handle templatized dtors. - template_portion = [token] - template_portion.extend(self._GetMatchingChar('<', '>')) - token = self._GetNextToken() - assert token.token_type == tokenize.SYNTAX, token - assert token.name == '(', token - - name = return_type_and_name.pop() - # Handle templatized ctors. - if name.name == '>': - index = 1 - while return_type_and_name[index].name != '<': - index += 1 - template_portion = return_type_and_name[index:] + [name] - del return_type_and_name[index:] - name = return_type_and_name.pop() - elif name.name == ']': - rt = return_type_and_name - assert rt[-1].name == '[', return_type_and_name - assert rt[-2].name == 'operator', return_type_and_name - name_seq = return_type_and_name[-2:] - del return_type_and_name[-2:] - name = tokenize.Token(tokenize.NAME, 'operator[]', - name_seq[0].start, name.end) - # Get the open paren so _GetParameters() below works. - unused_open_paren = self._GetNextToken() - - # TODO(nnorwitz): store template_portion. - return_type = return_type_and_name - indices = name - if return_type: - indices = return_type[0] - - # Force ctor for templatized ctors. - if name.name == self.in_class and not modifiers: - modifiers |= FUNCTION_CTOR - parameters = list(self._GetParameters()) - del parameters[-1] # Remove trailing ')'. - - # Handling operator() is especially weird. - if name.name == 'operator' and not parameters: - token = self._GetNextToken() - assert token.name == '(', token - parameters = list(self._GetParameters()) - del parameters[-1] # Remove trailing ')'. - - token = self._GetNextToken() - while token.token_type == tokenize.NAME: - modifier_token = token - token = self._GetNextToken() - if modifier_token.name == 'const': - modifiers |= FUNCTION_CONST - elif modifier_token.name == '__attribute__': - # TODO(nnorwitz): handle more __attribute__ details. - modifiers |= FUNCTION_ATTRIBUTE - assert token.name == '(', token - # Consume everything between the (parens). - unused_tokens = list(self._GetMatchingChar('(', ')')) - token = self._GetNextToken() - elif modifier_token.name == 'throw': - modifiers |= FUNCTION_THROW - assert token.name == '(', token - # Consume everything between the (parens). - unused_tokens = list(self._GetMatchingChar('(', ')')) - token = self._GetNextToken() - elif modifier_token.name == modifier_token.name.upper(): - # HACK(nnorwitz): assume that all upper-case names - # are some macro we aren't expanding. - modifiers |= FUNCTION_UNKNOWN_ANNOTATION - else: - self.HandleError('unexpected token', modifier_token) - - assert token.token_type == tokenize.SYNTAX, token - # Handle ctor initializers. - if token.name == ':': - # TODO(nnorwitz): anything else to handle for initializer list? - while token.name != ';' and token.name != '{': - token = self._GetNextToken() - - # Handle pointer to functions that are really data but look - # like method declarations. - if token.name == '(': - if parameters[0].name == '*': - # name contains the return type. - name = parameters.pop() - # parameters contains the name of the data. - modifiers = [p.name for p in parameters] - # Already at the ( to open the parameter list. - function_parameters = list(self._GetMatchingChar('(', ')')) - del function_parameters[-1] # Remove trailing ')'. - # TODO(nnorwitz): store the function_parameters. - token = self._GetNextToken() - assert token.token_type == tokenize.SYNTAX, token - assert token.name == ';', token - return self._CreateVariable(indices, name.name, indices.name, - modifiers, '', None) - # At this point, we got something like: - # return_type (type::*name_)(params); - # This is a data member called name_ that is a function pointer. - # With this code: void (sq_type::*field_)(string&); - # We get: name=void return_type=[] parameters=sq_type ... field_ - # TODO(nnorwitz): is return_type always empty? - # TODO(nnorwitz): this isn't even close to being correct. - # Just put in something so we don't crash and can move on. - real_name = parameters[-1] - modifiers = [p.name for p in self._GetParameters()] - del modifiers[-1] # Remove trailing ')'. - return self._CreateVariable(indices, real_name.name, indices.name, - modifiers, '', None) - - if token.name == '{': - body = list(self.GetScope()) - del body[-1] # Remove trailing '}'. - else: - body = None - if token.name == '=': - token = self._GetNextToken() - assert token.token_type == tokenize.CONSTANT, token - assert token.name == '0', token - modifiers |= FUNCTION_PURE_VIRTUAL - token = self._GetNextToken() - - if token.name == '[': - # TODO(nnorwitz): store tokens and improve parsing. - # template char (&ASH(T (&seq)[N]))[N]; - tokens = list(self._GetMatchingChar('[', ']')) - token = self._GetNextToken() - - assert token.name == ';', (token, return_type_and_name, parameters) - - # Looks like we got a method, not a function. - if len(return_type) > 2 and return_type[-1].name == '::': - return_type, in_class = \ - self._GetReturnTypeAndClassName(return_type) - return Method(indices.start, indices.end, name.name, in_class, - return_type, parameters, modifiers, templated_types, - body, self.namespace_stack) - return Function(indices.start, indices.end, name.name, return_type, - parameters, modifiers, templated_types, body, - self.namespace_stack) - - def _GetReturnTypeAndClassName(self, token_seq): - # Splitting the return type from the class name in a method - # can be tricky. For example, Return::Type::Is::Hard::To::Find(). - # Where is the return type and where is the class name? - # The heuristic used is to pull the last name as the class name. - # This includes all the templated type info. - # TODO(nnorwitz): if there is only One name like in the - # example above, punt and assume the last bit is the class name. - - # Ignore a :: prefix, if exists so we can find the first real name. - i = 0 - if token_seq[0].name == '::': - i = 1 - # Ignore a :: suffix, if exists. - end = len(token_seq) - 1 - if token_seq[end-1].name == '::': - end -= 1 - - # Make a copy of the sequence so we can append a sentinel - # value. This is required for GetName will has to have some - # terminating condition beyond the last name. - seq_copy = token_seq[i:end] - seq_copy.append(tokenize.Token(tokenize.SYNTAX, '', 0, 0)) - names = [] - while i < end: - # Iterate through the sequence parsing out each name. - new_name, next = self.GetName(seq_copy[i:]) - assert new_name, 'Got empty new_name, next=%s' % next - # We got a pointer or ref. Add it to the name. - if next and next.token_type == tokenize.SYNTAX: - new_name.append(next) - names.append(new_name) - i += len(new_name) - - # Now that we have the names, it's time to undo what we did. - - # Remove the sentinel value. - names[-1].pop() - # Flatten the token sequence for the return type. - return_type = [e for seq in names[:-1] for e in seq] - # The class name is the last name. - class_name = names[-1] - return return_type, class_name - - def handle_bool(self): - pass - - def handle_char(self): - pass - - def handle_int(self): - pass - - def handle_long(self): - pass - - def handle_short(self): - pass - - def handle_double(self): - pass - - def handle_float(self): - pass - - def handle_void(self): - pass - - def handle_wchar_t(self): - pass - - def handle_unsigned(self): - pass - - def handle_signed(self): - pass - - def _GetNestedType(self, ctor): - name = None - name_tokens, token = self.GetName() - if name_tokens: - name = ''.join([t.name for t in name_tokens]) - - # Handle forward declarations. - if token.token_type == tokenize.SYNTAX and token.name == ';': - return ctor(token.start, token.end, name, None, - self.namespace_stack) - - if token.token_type == tokenize.NAME and self._handling_typedef: - self._AddBackToken(token) - return ctor(token.start, token.end, name, None, - self.namespace_stack) - - # Must be the type declaration. - fields = list(self._GetMatchingChar('{', '}')) - del fields[-1] # Remove trailing '}'. - if token.token_type == tokenize.SYNTAX and token.name == '{': - next = self._GetNextToken() - new_type = ctor(token.start, token.end, name, fields, - self.namespace_stack) - # A name means this is an anonymous type and the name - # is the variable declaration. - if next.token_type != tokenize.NAME: - return new_type - name = new_type - token = next - - # Must be variable declaration using the type prefixed with keyword. - assert token.token_type == tokenize.NAME, token - return self._CreateVariable(token, token.name, name, [], '', None) - - def handle_struct(self): - # Special case the handling typedef/aliasing of structs here. - # It would be a pain to handle in the class code. - name_tokens, var_token = self.GetName() - if name_tokens: - next_token = self._GetNextToken() - is_syntax = (var_token.token_type == tokenize.SYNTAX and - var_token.name[0] in '*&') - is_variable = (var_token.token_type == tokenize.NAME and - next_token.name == ';') - variable = var_token - if is_syntax and not is_variable: - variable = next_token - temp = self._GetNextToken() - if temp.token_type == tokenize.SYNTAX and temp.name == '(': - # Handle methods declared to return a struct. - t0 = name_tokens[0] - struct = tokenize.Token(tokenize.NAME, 'struct', - t0.start-7, t0.start-2) - type_and_name = [struct] - type_and_name.extend(name_tokens) - type_and_name.extend((var_token, next_token)) - return self._GetMethod(type_and_name, 0, None, False) - assert temp.name == ';', (temp, name_tokens, var_token) - if is_syntax or (is_variable and not self._handling_typedef): - modifiers = ['struct'] - type_name = ''.join([t.name for t in name_tokens]) - position = name_tokens[0] - return self._CreateVariable(position, variable.name, type_name, - modifiers, var_token.name, None) - name_tokens.extend((var_token, next_token)) - self._AddBackTokens(name_tokens) - else: - self._AddBackToken(var_token) - return self._GetClass(Struct, VISIBILITY_PUBLIC, None) - - def handle_union(self): - return self._GetNestedType(Union) - - def handle_enum(self): - return self._GetNestedType(Enum) - - def handle_auto(self): - # TODO(nnorwitz): warn about using auto? Probably not since it - # will be reclaimed and useful for C++0x. - pass - - def handle_register(self): - pass - - def handle_const(self): - pass - - def handle_inline(self): - pass - - def handle_extern(self): - pass - - def handle_static(self): - pass - - def handle_virtual(self): - # What follows must be a method. - token = token2 = self._GetNextToken() - if token.name == 'inline': - # HACK(nnorwitz): handle inline dtors by ignoring 'inline'. - token2 = self._GetNextToken() - if token2.token_type == tokenize.SYNTAX and token2.name == '~': - return self.GetMethod(FUNCTION_VIRTUAL + FUNCTION_DTOR, None) - assert token.token_type == tokenize.NAME or token.name == '::', token - return_type_and_name = self._GetTokensUpTo(tokenize.SYNTAX, '(') - return_type_and_name.insert(0, token) - if token2 is not token: - return_type_and_name.insert(1, token2) - return self._GetMethod(return_type_and_name, FUNCTION_VIRTUAL, - None, False) - - def handle_volatile(self): - pass - - def handle_mutable(self): - pass - - def handle_public(self): - assert self.in_class - self.visibility = VISIBILITY_PUBLIC - - def handle_protected(self): - assert self.in_class - self.visibility = VISIBILITY_PROTECTED - - def handle_private(self): - assert self.in_class - self.visibility = VISIBILITY_PRIVATE - - def handle_friend(self): - tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';') - assert tokens - t0 = tokens[0] - return Friend(t0.start, t0.end, tokens, self.namespace_stack) - - def handle_static_cast(self): - pass - - def handle_const_cast(self): - pass - - def handle_dynamic_cast(self): - pass - - def handle_reinterpret_cast(self): - pass - - def handle_new(self): - pass - - def handle_delete(self): - tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';') - assert tokens - return Delete(tokens[0].start, tokens[0].end, tokens) - - def handle_typedef(self): - token = self._GetNextToken() - if (token.token_type == tokenize.NAME and - keywords.IsKeyword(token.name)): - # Token must be struct/enum/union/class. - method = getattr(self, 'handle_' + token.name) - self._handling_typedef = True - tokens = [method()] - self._handling_typedef = False - else: - tokens = [token] - - # Get the remainder of the typedef up to the semi-colon. - tokens.extend(self._GetTokensUpTo(tokenize.SYNTAX, ';')) - - # TODO(nnorwitz): clean all this up. - assert tokens - name = tokens.pop() - indices = name - if tokens: - indices = tokens[0] - if not indices: - indices = token - if name.name == ')': - # HACK(nnorwitz): Handle pointers to functions "properly". - if (len(tokens) >= 4 and - tokens[1].name == '(' and tokens[2].name == '*'): - tokens.append(name) - name = tokens[3] - elif name.name == ']': - # HACK(nnorwitz): Handle arrays properly. - if len(tokens) >= 2: - tokens.append(name) - name = tokens[1] - new_type = tokens - if tokens and isinstance(tokens[0], tokenize.Token): - new_type = self.converter.ToType(tokens)[0] - return Typedef(indices.start, indices.end, name.name, - new_type, self.namespace_stack) - - def handle_typeid(self): - pass # Not needed yet. - - def handle_typename(self): - pass # Not needed yet. - - def _GetTemplatedTypes(self): - result = {} - tokens = list(self._GetMatchingChar('<', '>')) - len_tokens = len(tokens) - 1 # Ignore trailing '>'. - i = 0 - while i < len_tokens: - key = tokens[i].name - i += 1 - if keywords.IsKeyword(key) or key == ',': - continue - type_name = default = None - if i < len_tokens: - i += 1 - if tokens[i-1].name == '=': - assert i < len_tokens, '%s %s' % (i, tokens) - default, unused_next_token = self.GetName(tokens[i:]) - i += len(default) - else: - if tokens[i-1].name != ',': - # We got something like: Type variable. - # Re-adjust the key (variable) and type_name (Type). - key = tokens[i-1].name - type_name = tokens[i-2] - - result[key] = (type_name, default) - return result - - def handle_template(self): - token = self._GetNextToken() - assert token.token_type == tokenize.SYNTAX, token - assert token.name == '<', token - templated_types = self._GetTemplatedTypes() - # TODO(nnorwitz): for now, just ignore the template params. - token = self._GetNextToken() - if token.token_type == tokenize.NAME: - if token.name == 'class': - return self._GetClass(Class, VISIBILITY_PRIVATE, templated_types) - elif token.name == 'struct': - return self._GetClass(Struct, VISIBILITY_PUBLIC, templated_types) - elif token.name == 'friend': - return self.handle_friend() - self._AddBackToken(token) - tokens, last = self._GetVarTokensUpTo(tokenize.SYNTAX, '(', ';') - tokens.append(last) - self._AddBackTokens(tokens) - if last.name == '(': - return self.GetMethod(FUNCTION_NONE, templated_types) - # Must be a variable definition. - return None - - def handle_true(self): - pass # Nothing to do. - - def handle_false(self): - pass # Nothing to do. - - def handle_asm(self): - pass # Not needed yet. - - def handle_class(self): - return self._GetClass(Class, VISIBILITY_PRIVATE, None) - - def _GetBases(self): - # Get base classes. - bases = [] - while 1: - token = self._GetNextToken() - assert token.token_type == tokenize.NAME, token - # TODO(nnorwitz): store kind of inheritance...maybe. - if token.name not in ('public', 'protected', 'private'): - # If inheritance type is not specified, it is private. - # Just put the token back so we can form a name. - # TODO(nnorwitz): it would be good to warn about this. - self._AddBackToken(token) - else: - # Check for virtual inheritance. - token = self._GetNextToken() - if token.name != 'virtual': - self._AddBackToken(token) - else: - # TODO(nnorwitz): store that we got virtual for this base. - pass - base, next_token = self.GetName() - bases_ast = self.converter.ToType(base) - assert len(bases_ast) == 1, bases_ast - bases.append(bases_ast[0]) - assert next_token.token_type == tokenize.SYNTAX, next_token - if next_token.name == '{': - token = next_token - break - # Support multiple inheritance. - assert next_token.name == ',', next_token - return bases, token - - def _GetClass(self, class_type, visibility, templated_types): - class_name = None - class_token = self._GetNextToken() - if class_token.token_type != tokenize.NAME: - assert class_token.token_type == tokenize.SYNTAX, class_token - token = class_token - else: - self._AddBackToken(class_token) - name_tokens, token = self.GetName() - class_name = ''.join([t.name for t in name_tokens]) - bases = None - if token.token_type == tokenize.SYNTAX: - if token.name == ';': - # Forward declaration. - return class_type(class_token.start, class_token.end, - class_name, None, templated_types, None, - self.namespace_stack) - if token.name in '*&': - # Inline forward declaration. Could be method or data. - name_token = self._GetNextToken() - next_token = self._GetNextToken() - if next_token.name == ';': - # Handle data - modifiers = ['class'] - return self._CreateVariable(class_token, name_token.name, - class_name, - modifiers, token.name, None) - else: - # Assume this is a method. - tokens = (class_token, token, name_token, next_token) - self._AddBackTokens(tokens) - return self.GetMethod(FUNCTION_NONE, None) - if token.name == ':': - bases, token = self._GetBases() - - body = None - if token.token_type == tokenize.SYNTAX and token.name == '{': - assert token.token_type == tokenize.SYNTAX, token - assert token.name == '{', token - - ast = AstBuilder(self.GetScope(), self.filename, class_name, - visibility, self.namespace_stack) - body = list(ast.Generate()) - - if not self._handling_typedef: - token = self._GetNextToken() - if token.token_type != tokenize.NAME: - assert token.token_type == tokenize.SYNTAX, token - assert token.name == ';', token - else: - new_class = class_type(class_token.start, class_token.end, - class_name, bases, None, - body, self.namespace_stack) - - modifiers = [] - return self._CreateVariable(class_token, - token.name, new_class, - modifiers, token.name, None) - else: - if not self._handling_typedef: - self.HandleError('non-typedef token', token) - self._AddBackToken(token) - - return class_type(class_token.start, class_token.end, class_name, - bases, None, body, self.namespace_stack) - - def handle_namespace(self): - token = self._GetNextToken() - # Support anonymous namespaces. - name = None - if token.token_type == tokenize.NAME: - name = token.name - token = self._GetNextToken() - self.namespace_stack.append(name) - assert token.token_type == tokenize.SYNTAX, token - # Create an internal token that denotes when the namespace is complete. - internal_token = tokenize.Token(_INTERNAL_TOKEN, _NAMESPACE_POP, - None, None) - internal_token.whence = token.whence - if token.name == '=': - # TODO(nnorwitz): handle aliasing namespaces. - name, next_token = self.GetName() - assert next_token.name == ';', next_token - self._AddBackToken(internal_token) - else: - assert token.name == '{', token - tokens = list(self.GetScope()) - # Replace the trailing } with the internal namespace pop token. - tokens[-1] = internal_token - # Handle namespace with nothing in it. - self._AddBackTokens(tokens) - return None - - def handle_using(self): - tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';') - assert tokens - return Using(tokens[0].start, tokens[0].end, tokens) - - def handle_explicit(self): - assert self.in_class - # Nothing much to do. - # TODO(nnorwitz): maybe verify the method name == class name. - # This must be a ctor. - return self.GetMethod(FUNCTION_CTOR, None) - - def handle_this(self): - pass # Nothing to do. - - def handle_operator(self): - # Pull off the next token(s?) and make that part of the method name. - pass - - def handle_sizeof(self): - pass - - def handle_case(self): - pass - - def handle_switch(self): - pass - - def handle_default(self): - token = self._GetNextToken() - assert token.token_type == tokenize.SYNTAX - assert token.name == ':' - - def handle_if(self): - pass - - def handle_else(self): - pass - - def handle_return(self): - tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';') - if not tokens: - return Return(self.current_token.start, self.current_token.end, None) - return Return(tokens[0].start, tokens[0].end, tokens) - - def handle_goto(self): - tokens = self._GetTokensUpTo(tokenize.SYNTAX, ';') - assert len(tokens) == 1, str(tokens) - return Goto(tokens[0].start, tokens[0].end, tokens[0].name) - - def handle_try(self): - pass # Not needed yet. - - def handle_catch(self): - pass # Not needed yet. - - def handle_throw(self): - pass # Not needed yet. - - def handle_while(self): - pass - - def handle_do(self): - pass - - def handle_for(self): - pass - - def handle_break(self): - self._IgnoreUpTo(tokenize.SYNTAX, ';') - - def handle_continue(self): - self._IgnoreUpTo(tokenize.SYNTAX, ';') - - -def BuilderFromSource(source, filename): - """Utility method that returns an AstBuilder from source code. - - Args: - source: 'C++ source code' - filename: 'file1' - - Returns: - AstBuilder - """ - return AstBuilder(tokenize.GetTokens(source), filename) - - -def PrintIndentifiers(filename, should_print): - """Prints all identifiers for a C++ source file. - - Args: - filename: 'file1' - should_print: predicate with signature: bool Function(token) - """ - source = utils.ReadFile(filename, False) - if source is None: - sys.stderr.write('Unable to find: %s\n' % filename) - return - - #print('Processing %s' % actual_filename) - builder = BuilderFromSource(source, filename) - try: - for node in builder.Generate(): - if should_print(node): - print(node.name) - except KeyboardInterrupt: - return - except: - pass - - -def PrintAllIndentifiers(filenames, should_print): - """Prints all identifiers for each C++ source file in filenames. - - Args: - filenames: ['file1', 'file2', ...] - should_print: predicate with signature: bool Function(token) - """ - for path in filenames: - PrintIndentifiers(path, should_print) - - -def main(argv): - for filename in argv[1:]: - source = utils.ReadFile(filename) - if source is None: - continue - - print('Processing %s' % filename) - builder = BuilderFromSource(source, filename) - try: - entire_ast = filter(None, builder.Generate()) - except KeyboardInterrupt: - return - except: - # Already printed a warning, print the traceback and continue. - traceback.print_exc() - else: - if utils.DEBUG: - for ast in entire_ast: - print(ast) - - -if __name__ == '__main__': - main(sys.argv) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class.py deleted file mode 100755 index 3ad0bcdd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Generate Google Mock classes from base classes. - -This program will read in a C++ source file and output the Google Mock -classes for the specified classes. If no class is specified, all -classes in the source file are emitted. - -Usage: - gmock_class.py header-file.h [ClassName]... - -Output is sent to stdout. -""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -import os -import re -import sets -import sys - -from cpp import ast -from cpp import utils - -_VERSION = (1, 0, 1) # The version of this script. -# How many spaces to indent. Can set me with the INDENT environment variable. -_INDENT = 2 - - -def _GenerateMethods(output_lines, source, class_node): - function_type = ast.FUNCTION_VIRTUAL | ast.FUNCTION_PURE_VIRTUAL - ctor_or_dtor = ast.FUNCTION_CTOR | ast.FUNCTION_DTOR - - for node in class_node.body: - # We only care about virtual functions. - if (isinstance(node, ast.Function) and - node.modifiers & function_type and - not node.modifiers & ctor_or_dtor): - # Pick out all the elements we need from the original function. - const = '' - if node.modifiers & ast.FUNCTION_CONST: - const = 'CONST_' - return_type = 'void' - if node.return_type: - # Add modifiers like 'const'. - modifiers = '' - if node.return_type.modifiers: - modifiers = ' '.join(node.return_type.modifiers) + ' ' - return_type = modifiers + node.return_type.name - if node.return_type.pointer: - return_type += '*' - if node.return_type.reference: - return_type += '&' - prefix = 'MOCK_%sMETHOD%d' % (const, len(node.parameters)) - args = '' - if node.parameters: - # Get the full text of the parameters from the start - # of the first parameter to the end of the last parameter. - start = node.parameters[0].start - end = node.parameters[-1].end - # Remove // comments. - args_strings = re.sub(r'//.*', '', source[start:end]) - # Condense multiple spaces and eliminate newlines putting the - # parameters together on a single line. Ensure there is a - # space in an argument which is split by a newline without - # intervening whitespace, e.g.: int\nBar - args = re.sub(' +', ' ', args_strings.replace('\n', ' ')) - - # Create the prototype. - indent = ' ' * _INDENT - line = ('%s%s(%s,\n%s%s(%s));' % - (indent, prefix, node.name, indent*3, return_type, args)) - output_lines.append(line) - - -def _GenerateMocks(filename, source, ast_list, desired_class_names): - processed_class_names = sets.Set() - lines = [] - for node in ast_list: - if (isinstance(node, ast.Class) and node.body and - # desired_class_names being None means that all classes are selected. - (not desired_class_names or node.name in desired_class_names)): - class_name = node.name - processed_class_names.add(class_name) - class_node = node - # Add namespace before the class. - if class_node.namespace: - lines.extend(['namespace %s {' % n for n in class_node.namespace]) # } - lines.append('') - - # Add the class prolog. - lines.append('class Mock%s : public %s {' % (class_name, class_name)) # } - lines.append('%spublic:' % (' ' * (_INDENT // 2))) - - # Add all the methods. - _GenerateMethods(lines, source, class_node) - - # Close the class. - if lines: - # If there are no virtual methods, no need for a public label. - if len(lines) == 2: - del lines[-1] - - # Only close the class if there really is a class. - lines.append('};') - lines.append('') # Add an extra newline. - - # Close the namespace. - if class_node.namespace: - for i in range(len(class_node.namespace)-1, -1, -1): - lines.append('} // namespace %s' % class_node.namespace[i]) - lines.append('') # Add an extra newline. - - if desired_class_names: - missing_class_name_list = list(desired_class_names - processed_class_names) - if missing_class_name_list: - missing_class_name_list.sort() - sys.stderr.write('Class(es) not found in %s: %s\n' % - (filename, ', '.join(missing_class_name_list))) - elif not processed_class_names: - sys.stderr.write('No class found in %s\n' % filename) - - return lines - - -def main(argv=sys.argv): - if len(argv) < 2: - sys.stderr.write('Google Mock Class Generator v%s\n\n' % - '.'.join(map(str, _VERSION))) - sys.stderr.write(__doc__) - return 1 - - global _INDENT - try: - _INDENT = int(os.environ['INDENT']) - except KeyError: - pass - except: - sys.stderr.write('Unable to use indent of %s\n' % os.environ.get('INDENT')) - - filename = argv[1] - desired_class_names = None # None means all classes in the source file. - if len(argv) >= 3: - desired_class_names = sets.Set(argv[2:]) - source = utils.ReadFile(filename) - if source is None: - return 1 - - builder = ast.BuilderFromSource(source, filename) - try: - entire_ast = filter(None, builder.Generate()) - except KeyboardInterrupt: - return - except: - # An error message was already printed since we couldn't parse. - pass - else: - lines = _GenerateMocks(filename, source, entire_ast, desired_class_names) - sys.stdout.write('\n'.join(lines)) - - -if __name__ == '__main__': - main(sys.argv) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class_test.py deleted file mode 100755 index ae00800f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/gmock_class_test.py +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 Neal Norwitz All Rights Reserved. -# Portions Copyright 2009 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tests for gmock.scripts.generator.cpp.gmock_class.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -import os -import sys -import unittest - -# Allow the cpp imports below to work when run as a standalone script. -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) - -from cpp import ast -from cpp import gmock_class - - -class TestCase(unittest.TestCase): - """Helper class that adds assert methods.""" - - def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines): - """Specialized assert that ignores the indent level.""" - stripped_lines = '\n'.join([s.lstrip() for s in lines.split('\n')]) - self.assertEqual(expected_lines, stripped_lines) - - -class GenerateMethodsTest(TestCase): - - def GenerateMethodSource(self, cpp_source): - """Helper method to convert C++ source to gMock output source lines.""" - method_source_lines = [] - # is a pseudo-filename, it is not read or written. - builder = ast.BuilderFromSource(cpp_source, '') - ast_list = list(builder.Generate()) - gmock_class._GenerateMethods(method_source_lines, cpp_source, ast_list[0]) - return ''.join(method_source_lines) - - def testStrangeNewlineInParameter(self): - source = """ -class Foo { - public: - virtual void Bar(int -a) = 0; -}; -""" - self.assertEqualIgnoreLeadingWhitespace( - 'MOCK_METHOD1(Bar,\nvoid(int a));', - self.GenerateMethodSource(source)) - - def testDoubleSlashCommentsInParameterListAreRemoved(self): - source = """ -class Foo { - public: - virtual void Bar(int a, // inline comments should be elided. - int b // inline comments should be elided. - ) const = 0; -}; -""" - self.assertEqualIgnoreLeadingWhitespace( - 'MOCK_CONST_METHOD2(Bar,\nvoid(int a, int b));', - self.GenerateMethodSource(source)) - - def testCStyleCommentsInParameterListAreNotRemoved(self): - # NOTE(nnorwitz): I'm not sure if it's the best behavior to keep these - # comments. Also note that C style comments after the last parameter - # are still elided. - source = """ -class Foo { - public: - virtual const string& Bar(int /* keeper */, int b); -}; -""" - self.assertEqualIgnoreLeadingWhitespace( - 'MOCK_METHOD2(Bar,\nconst string&(int /* keeper */, int b));', - self.GenerateMethodSource(source)) - - -class GenerateMocksTest(TestCase): - - def GenerateMocks(self, cpp_source): - """Helper method to convert C++ source to complete gMock output source.""" - # is a pseudo-filename, it is not read or written. - filename = '' - builder = ast.BuilderFromSource(cpp_source, filename) - ast_list = list(builder.Generate()) - lines = gmock_class._GenerateMocks(filename, cpp_source, ast_list, None) - return '\n'.join(lines) - - def testNamespaces(self): - source = """ -namespace Foo { -namespace Bar { class Forward; } -namespace Baz { - -class Test { - public: - virtual void Foo(); -}; - -} // namespace Baz -} // namespace Foo -""" - expected = """\ -namespace Foo { -namespace Baz { - -class MockTest : public Test { -public: -MOCK_METHOD0(Foo, -void()); -}; - -} // namespace Baz -} // namespace Foo -""" - self.assertEqualIgnoreLeadingWhitespace( - expected, self.GenerateMocks(source)) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/keywords.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/keywords.py deleted file mode 100755 index f694450e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/keywords.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Neal Norwitz -# Portions Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""C++ keywords and helper utilities for determining keywords.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -try: - # Python 3.x - import builtins -except ImportError: - # Python 2.x - import __builtin__ as builtins - - -if not hasattr(builtins, 'set'): - # Nominal support for Python 2.3. - from sets import Set as set - - -TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split()) -TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split()) -ACCESS = set('public protected private friend'.split()) - -CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split()) - -OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split()) -OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split()) - -CONTROL = set('case switch default if else return goto'.split()) -EXCEPTION = set('try catch throw'.split()) -LOOP = set('while do for break continue'.split()) - -ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP - - -def IsKeyword(token): - return token in ALL - -def IsBuiltinType(token): - if token in ('virtual', 'inline'): - # These only apply to methods, they can't be types by themselves. - return False - return token in TYPES or token in TYPE_MODIFIERS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/tokenize.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/tokenize.py deleted file mode 100755 index 28c33452..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/tokenize.py +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Neal Norwitz -# Portions Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tokenize C++ source code.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -try: - # Python 3.x - import builtins -except ImportError: - # Python 2.x - import __builtin__ as builtins - - -import sys - -from cpp import utils - - -if not hasattr(builtins, 'set'): - # Nominal support for Python 2.3. - from sets import Set as set - - -# Add $ as a valid identifier char since so much code uses it. -_letters = 'abcdefghijklmnopqrstuvwxyz' -VALID_IDENTIFIER_CHARS = set(_letters + _letters.upper() + '_0123456789$') -HEX_DIGITS = set('0123456789abcdefABCDEF') -INT_OR_FLOAT_DIGITS = set('01234567890eE-+') - - -# C++0x string preffixes. -_STR_PREFIXES = set(('R', 'u8', 'u8R', 'u', 'uR', 'U', 'UR', 'L', 'LR')) - - -# Token types. -UNKNOWN = 'UNKNOWN' -SYNTAX = 'SYNTAX' -CONSTANT = 'CONSTANT' -NAME = 'NAME' -PREPROCESSOR = 'PREPROCESSOR' - -# Where the token originated from. This can be used for backtracking. -# It is always set to WHENCE_STREAM in this code. -WHENCE_STREAM, WHENCE_QUEUE = range(2) - - -class Token(object): - """Data container to represent a C++ token. - - Tokens can be identifiers, syntax char(s), constants, or - pre-processor directives. - - start contains the index of the first char of the token in the source - end contains the index of the last char of the token in the source - """ - - def __init__(self, token_type, name, start, end): - self.token_type = token_type - self.name = name - self.start = start - self.end = end - self.whence = WHENCE_STREAM - - def __str__(self): - if not utils.DEBUG: - return 'Token(%r)' % self.name - return 'Token(%r, %s, %s)' % (self.name, self.start, self.end) - - __repr__ = __str__ - - -def _GetString(source, start, i): - i = source.find('"', i+1) - while source[i-1] == '\\': - # Count the trailing backslashes. - backslash_count = 1 - j = i - 2 - while source[j] == '\\': - backslash_count += 1 - j -= 1 - # When trailing backslashes are even, they escape each other. - if (backslash_count % 2) == 0: - break - i = source.find('"', i+1) - return i + 1 - - -def _GetChar(source, start, i): - # NOTE(nnorwitz): may not be quite correct, should be good enough. - i = source.find("'", i+1) - while source[i-1] == '\\': - # Need to special case '\\'. - if (i - 2) > start and source[i-2] == '\\': - break - i = source.find("'", i+1) - # Try to handle unterminated single quotes (in a #if 0 block). - if i < 0: - i = start - return i + 1 - - -def GetTokens(source): - """Returns a sequence of Tokens. - - Args: - source: string of C++ source code. - - Yields: - Token that represents the next token in the source. - """ - # Cache various valid character sets for speed. - valid_identifier_chars = VALID_IDENTIFIER_CHARS - hex_digits = HEX_DIGITS - int_or_float_digits = INT_OR_FLOAT_DIGITS - int_or_float_digits2 = int_or_float_digits | set('.') - - # Only ignore errors while in a #if 0 block. - ignore_errors = False - count_ifs = 0 - - i = 0 - end = len(source) - while i < end: - # Skip whitespace. - while i < end and source[i].isspace(): - i += 1 - if i >= end: - return - - token_type = UNKNOWN - start = i - c = source[i] - if c.isalpha() or c == '_': # Find a string token. - token_type = NAME - while source[i] in valid_identifier_chars: - i += 1 - # String and character constants can look like a name if - # they are something like L"". - if (source[i] == "'" and (i - start) == 1 and - source[start:i] in 'uUL'): - # u, U, and L are valid C++0x character preffixes. - token_type = CONSTANT - i = _GetChar(source, start, i) - elif source[i] == "'" and source[start:i] in _STR_PREFIXES: - token_type = CONSTANT - i = _GetString(source, start, i) - elif c == '/' and source[i+1] == '/': # Find // comments. - i = source.find('\n', i) - if i == -1: # Handle EOF. - i = end - continue - elif c == '/' and source[i+1] == '*': # Find /* comments. */ - i = source.find('*/', i) + 2 - continue - elif c in ':+-<>&|*=': # : or :: (plus other chars). - token_type = SYNTAX - i += 1 - new_ch = source[i] - if new_ch == c: - i += 1 - elif c == '-' and new_ch == '>': - i += 1 - elif new_ch == '=': - i += 1 - elif c in '()[]{}~!?^%;/.,': # Handle single char tokens. - token_type = SYNTAX - i += 1 - if c == '.' and source[i].isdigit(): - token_type = CONSTANT - i += 1 - while source[i] in int_or_float_digits: - i += 1 - # Handle float suffixes. - for suffix in ('l', 'f'): - if suffix == source[i:i+1].lower(): - i += 1 - break - elif c.isdigit(): # Find integer. - token_type = CONSTANT - if c == '0' and source[i+1] in 'xX': - # Handle hex digits. - i += 2 - while source[i] in hex_digits: - i += 1 - else: - while source[i] in int_or_float_digits2: - i += 1 - # Handle integer (and float) suffixes. - for suffix in ('ull', 'll', 'ul', 'l', 'f', 'u'): - size = len(suffix) - if suffix == source[i:i+size].lower(): - i += size - break - elif c == '"': # Find string. - token_type = CONSTANT - i = _GetString(source, start, i) - elif c == "'": # Find char. - token_type = CONSTANT - i = _GetChar(source, start, i) - elif c == '#': # Find pre-processor command. - token_type = PREPROCESSOR - got_if = source[i:i+3] == '#if' and source[i+3:i+4].isspace() - if got_if: - count_ifs += 1 - elif source[i:i+6] == '#endif': - count_ifs -= 1 - if count_ifs == 0: - ignore_errors = False - - # TODO(nnorwitz): handle preprocessor statements (\ continuations). - while 1: - i1 = source.find('\n', i) - i2 = source.find('//', i) - i3 = source.find('/*', i) - i4 = source.find('"', i) - # NOTE(nnorwitz): doesn't handle comments in #define macros. - # Get the first important symbol (newline, comment, EOF/end). - i = min([x for x in (i1, i2, i3, i4, end) if x != -1]) - - # Handle #include "dir//foo.h" properly. - if source[i] == '"': - i = source.find('"', i+1) + 1 - assert i > 0 - continue - # Keep going if end of the line and the line ends with \. - if not (i == i1 and source[i-1] == '\\'): - if got_if: - condition = source[start+4:i].lstrip() - if (condition.startswith('0') or - condition.startswith('(0)')): - ignore_errors = True - break - i += 1 - elif c == '\\': # Handle \ in code. - # This is different from the pre-processor \ handling. - i += 1 - continue - elif ignore_errors: - # The tokenizer seems to be in pretty good shape. This - # raise is conditionally disabled so that bogus code - # in an #if 0 block can be handled. Since we will ignore - # it anyways, this is probably fine. So disable the - # exception and return the bogus char. - i += 1 - else: - sys.stderr.write('Got invalid token in %s @ %d token:%s: %r\n' % - ('?', i, c, source[i-10:i+10])) - raise RuntimeError('unexpected token') - - if i <= 0: - print('Invalid index, exiting now.') - return - yield Token(token_type, source[start:i], start, i) - - -if __name__ == '__main__': - def main(argv): - """Driver mostly for testing purposes.""" - for filename in argv[1:]: - source = utils.ReadFile(filename) - if source is None: - continue - - for token in GetTokens(source): - print('%-12s: %s' % (token.token_type, token.name)) - # print('\r%6.2f%%' % (100.0 * index / token.end),) - sys.stdout.write('\n') - - - main(sys.argv) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/utils.py deleted file mode 100755 index eab36eec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/cpp/utils.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Neal Norwitz -# Portions Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Generic utilities for C++ parsing.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - - -import sys - - -# Set to True to see the start/end token indices. -DEBUG = True - - -def ReadFile(filename, print_error=True): - """Returns the contents of a file.""" - try: - fp = open(filename) - try: - return fp.read() - finally: - fp.close() - except IOError: - if print_error: - print('Error reading %s: %s' % (filename, sys.exc_info()[1])) - return None diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/gmock_gen.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/gmock_gen.py deleted file mode 100755 index 8cc0d135..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/generator/gmock_gen.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Driver for starting up Google Mock class generator.""" - -__author__ = 'nnorwitz@google.com (Neal Norwitz)' - -import os -import sys - -if __name__ == '__main__': - # Add the directory of this script to the path so we can import gmock_class. - sys.path.append(os.path.dirname(__file__)) - - from cpp import gmock_class - # Fix the docstring in case they require the usage. - gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__) - gmock_class.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock-config.in b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock-config.in deleted file mode 100755 index 9ce17a25..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock-config.in +++ /dev/null @@ -1,303 +0,0 @@ -#!/bin/sh - -# These variables are automatically filled in by the configure script. -name="@PACKAGE_TARNAME@" -version="@PACKAGE_VERSION@" - -show_usage() -{ - echo "Usage: gmock-config [OPTIONS...]" -} - -show_help() -{ - show_usage - cat <<\EOF - -The `gmock-config' script provides access to the necessary compile and linking -flags to connect with Google C++ Mocking Framework, both in a build prior to -installation, and on the system proper after installation. The installation -overrides may be issued in combination with any other queries, but will only -affect installation queries if called on a built but not installed gmock. The -installation queries may not be issued with any other types of queries, and -only one installation query may be made at a time. The version queries and -compiler flag queries may be combined as desired but not mixed. Different -version queries are always combined with logical "and" semantics, and only the -last of any particular query is used while all previous ones ignored. All -versions must be specified as a sequence of numbers separated by periods. -Compiler flag queries output the union of the sets of flags when combined. - - Examples: - gmock-config --min-version=1.0 || echo "Insufficient Google Mock version." - - g++ $(gmock-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gmock-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Mock: - g++ $(../../my_gmock_build/scripts/gmock-config ...) ... - - # When using an installed Google Mock, but with installation overrides: - export GMOCK_PREFIX="/opt" - g++ $(gmock-config --libdir="/opt/lib64" ...) ... - - Help: - --usage brief usage information - --help display this help message - - Installation Overrides: - --prefix= overrides the installation prefix - --exec-prefix= overrides the executable installation prefix - --libdir= overrides the library installation prefix - --includedir= overrides the header file installation prefix - - Installation Queries: - --prefix installation prefix - --exec-prefix executable installation prefix - --libdir library installation directory - --includedir header file installation directory - --version the version of the Google Mock installation - - Version Queries: - --min-version=VERSION return 0 if the version is at least VERSION - --exact-version=VERSION return 0 if the version is exactly VERSION - --max-version=VERSION return 0 if the version is at most VERSION - - Compilation Flag Queries: - --cppflags compile flags specific to the C-like preprocessors - --cxxflags compile flags appropriate for C++ programs - --ldflags linker flags - --libs libraries for linking - -EOF -} - -# This function bounds our version with a min and a max. It uses some clever -# POSIX-compliant variable expansion to portably do all the work in the shell -# and avoid any dependency on a particular "sed" or "awk" implementation. -# Notable is that it will only ever compare the first 3 components of versions. -# Further components will be cleanly stripped off. All versions must be -# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and -# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should -# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than -# continuing to maintain our own shell version. -check_versions() -{ - major_version=${version%%.*} - minor_version="0" - point_version="0" - if test "${version#*.}" != "${version}"; then - minor_version=${version#*.} - minor_version=${minor_version%%.*} - fi - if test "${version#*.*.}" != "${version}"; then - point_version=${version#*.*.} - point_version=${point_version%%.*} - fi - - min_version="$1" - min_major_version=${min_version%%.*} - min_minor_version="0" - min_point_version="0" - if test "${min_version#*.}" != "${min_version}"; then - min_minor_version=${min_version#*.} - min_minor_version=${min_minor_version%%.*} - fi - if test "${min_version#*.*.}" != "${min_version}"; then - min_point_version=${min_version#*.*.} - min_point_version=${min_point_version%%.*} - fi - - max_version="$2" - max_major_version=${max_version%%.*} - max_minor_version="0" - max_point_version="0" - if test "${max_version#*.}" != "${max_version}"; then - max_minor_version=${max_version#*.} - max_minor_version=${max_minor_version%%.*} - fi - if test "${max_version#*.*.}" != "${max_version}"; then - max_point_version=${max_version#*.*.} - max_point_version=${max_point_version%%.*} - fi - - test $(($major_version)) -lt $(($min_major_version)) && exit 1 - if test $(($major_version)) -eq $(($min_major_version)); then - test $(($minor_version)) -lt $(($min_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($min_minor_version)); then - test $(($point_version)) -lt $(($min_point_version)) && exit 1 - fi - fi - - test $(($major_version)) -gt $(($max_major_version)) && exit 1 - if test $(($major_version)) -eq $(($max_major_version)); then - test $(($minor_version)) -gt $(($max_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($max_minor_version)); then - test $(($point_version)) -gt $(($max_point_version)) && exit 1 - fi - fi - - exit 0 -} - -# Show the usage line when no arguments are specified. -if test $# -eq 0; then - show_usage - exit 1 -fi - -while test $# -gt 0; do - case $1 in - --usage) show_usage; exit 0;; - --help) show_help; exit 0;; - - # Installation overrides - --prefix=*) GMOCK_PREFIX=${1#--prefix=};; - --exec-prefix=*) GMOCK_EXEC_PREFIX=${1#--exec-prefix=};; - --libdir=*) GMOCK_LIBDIR=${1#--libdir=};; - --includedir=*) GMOCK_INCLUDEDIR=${1#--includedir=};; - - # Installation queries - --prefix|--exec-prefix|--libdir|--includedir|--version) - if test -n "${do_query}"; then - show_usage - exit 1 - fi - do_query=${1#--} - ;; - - # Version checking - --min-version=*) - do_check_versions=yes - min_version=${1#--min-version=} - ;; - --max-version=*) - do_check_versions=yes - max_version=${1#--max-version=} - ;; - --exact-version=*) - do_check_versions=yes - exact_version=${1#--exact-version=} - ;; - - # Compiler flag output - --cppflags) echo_cppflags=yes;; - --cxxflags) echo_cxxflags=yes;; - --ldflags) echo_ldflags=yes;; - --libs) echo_libs=yes;; - - # Everything else is an error - *) show_usage; exit 1;; - esac - shift -done - -# These have defaults filled in by the configure script but can also be -# overridden by environment variables or command line parameters. -prefix="${GMOCK_PREFIX:-@prefix@}" -exec_prefix="${GMOCK_EXEC_PREFIX:-@exec_prefix@}" -libdir="${GMOCK_LIBDIR:-@libdir@}" -includedir="${GMOCK_INCLUDEDIR:-@includedir@}" - -# We try and detect if our binary is not located at its installed location. If -# it's not, we provide variables pointing to the source and build tree rather -# than to the install tree. We also locate Google Test using the configured -# gtest-config script rather than searching the PATH and our bindir for one. -# This allows building against a just-built gmock rather than an installed -# gmock. -bindir="@bindir@" -this_relative_bindir=`dirname $0` -this_bindir=`cd ${this_relative_bindir}; pwd -P` -if test "${this_bindir}" = "${this_bindir%${bindir}}"; then - # The path to the script doesn't end in the bindir sequence from Autoconf, - # assume that we are in a build tree. - build_dir=`dirname ${this_bindir}` - src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P` - - # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we - # should work to remove it, and/or remove libtool altogether, replacing it - # with direct references to the library and a link path. - gmock_libs="${build_dir}/lib/libgtest.la" - gmock_ldflags="" - - # We provide hooks to include from either the source or build dir, where the - # build dir is always preferred. This will potentially allow us to write - # build rules for generated headers and have them automatically be preferred - # over provided versions. - gmock_cppflags="-I${build_dir}/include -I${src_dir}/include" - gmock_cxxflags="" - - # Directly invoke the gtest-config script used during the build process. - gtest_config="@GTEST_CONFIG@" -else - # We're using an installed gmock, although it may be staged under some - # prefix. Assume (as our own libraries do) that we can resolve the prefix, - # and are present in the dynamic link paths. - gmock_ldflags="-L${libdir}" - gmock_libs="-l${name}" - gmock_cppflags="-I${includedir}" - gmock_cxxflags="" - - # We also prefer any gtest-config script installed in our prefix. Lacking - # one, we look in the PATH for one. - gtest_config="${bindir}/gtest-config" - if test ! -x "${gtest_config}"; then - gtest_config=`which gtest-config` - fi -fi - -# Ensure that we have located a Google Test to link against. -if ! test -x "${gtest_config}"; then - echo "Unable to locate Google Test, check your Google Mock configuration" \ - "and installation" >&2 - exit 1 -elif ! "${gtest_config}" "--exact-version=@GTEST_VERSION@"; then - echo "The Google Test found is not the same version as Google Mock was " \ - "built against" >&2 - exit 1 -fi - -# Add the necessary Google Test bits into the various flag variables -gmock_cppflags="${gmock_cppflags} `${gtest_config} --cppflags`" -gmock_cxxflags="${gmock_cxxflags} `${gtest_config} --cxxflags`" -gmock_ldflags="${gmock_ldflags} `${gtest_config} --ldflags`" -gmock_libs="${gmock_libs} `${gtest_config} --libs`" - -# Do an installation query if requested. -if test -n "$do_query"; then - case $do_query in - prefix) echo $prefix; exit 0;; - exec-prefix) echo $exec_prefix; exit 0;; - libdir) echo $libdir; exit 0;; - includedir) echo $includedir; exit 0;; - version) echo $version; exit 0;; - *) show_usage; exit 1;; - esac -fi - -# Do a version check if requested. -if test "$do_check_versions" = "yes"; then - # Make sure we didn't receive a bad combination of parameters. - test "$echo_cppflags" = "yes" && show_usage && exit 1 - test "$echo_cxxflags" = "yes" && show_usage && exit 1 - test "$echo_ldflags" = "yes" && show_usage && exit 1 - test "$echo_libs" = "yes" && show_usage && exit 1 - - if test "$exact_version" != ""; then - check_versions $exact_version $exact_version - # unreachable - else - check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999} - # unreachable - fi -fi - -# Do the output in the correct order so that these can be used in-line of -# a compiler invocation. -output="" -test "$echo_cppflags" = "yes" && output="$output $gmock_cppflags" -test "$echo_cxxflags" = "yes" && output="$output $gmock_cxxflags" -test "$echo_ldflags" = "yes" && output="$output $gmock_ldflags" -test "$echo_libs" = "yes" && output="$output $gmock_libs" -echo $output - -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock_doctor.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock_doctor.py deleted file mode 100755 index 05e42585..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/gmock_doctor.py +++ /dev/null @@ -1,508 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Converts gcc errors in code using Google Mock to plain English.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import re -import sys - -_VERSION = '1.0.3' - -_COMMON_GMOCK_SYMBOLS = [ - # Matchers - '_', - 'A', - 'AddressSatisfies', - 'AllOf', - 'An', - 'AnyOf', - 'ContainerEq', - 'Contains', - 'ContainsRegex', - 'DoubleEq', - 'ElementsAre', - 'ElementsAreArray', - 'EndsWith', - 'Eq', - 'Field', - 'FloatEq', - 'Ge', - 'Gt', - 'HasSubstr', - 'IsInitializedProto', - 'Le', - 'Lt', - 'MatcherCast', - 'Matches', - 'MatchesRegex', - 'NanSensitiveDoubleEq', - 'NanSensitiveFloatEq', - 'Ne', - 'Not', - 'NotNull', - 'Pointee', - 'PointeeIsInitializedProto', - 'Property', - 'Ref', - 'ResultOf', - 'SafeMatcherCast', - 'StartsWith', - 'StrCaseEq', - 'StrCaseNe', - 'StrEq', - 'StrNe', - 'Truly', - 'TypedEq', - 'Value', - - # Actions - 'Assign', - 'ByRef', - 'DeleteArg', - 'DoAll', - 'DoDefault', - 'IgnoreResult', - 'Invoke', - 'InvokeArgument', - 'InvokeWithoutArgs', - 'Return', - 'ReturnNew', - 'ReturnNull', - 'ReturnRef', - 'SaveArg', - 'SetArgReferee', - 'SetArgumentPointee', - 'SetArrayArgument', - 'SetErrnoAndReturn', - 'Throw', - 'WithArg', - 'WithArgs', - 'WithoutArgs', - - # Cardinalities - 'AnyNumber', - 'AtLeast', - 'AtMost', - 'Between', - 'Exactly', - - # Sequences - 'InSequence', - 'Sequence', - - # Misc - 'DefaultValue', - 'Mock', - ] - -# Regex for matching source file path and line number in gcc's errors. -_FILE_LINE_RE = r'(?P.*):(?P\d+):\s+' - - -def _FindAllMatches(regex, s): - """Generates all matches of regex in string s.""" - - r = re.compile(regex) - return r.finditer(s) - - -def _GenericDiagnoser(short_name, long_name, regex, diagnosis, msg): - """Diagnoses the given disease by pattern matching. - - Args: - short_name: Short name of the disease. - long_name: Long name of the disease. - regex: Regex for matching the symptoms. - diagnosis: Pattern for formatting the diagnosis. - msg: Gcc's error messages. - Yields: - Tuples of the form - (short name of disease, long name of disease, diagnosis). - """ - - diagnosis = '%(file)s:%(line)s:' + diagnosis - for m in _FindAllMatches(regex, msg): - yield (short_name, long_name, diagnosis % m.groupdict()) - - -def _NeedToReturnReferenceDiagnoser(msg): - """Diagnoses the NRR disease, given the error messages by gcc.""" - - regex = (r'In member function \'testing::internal::ReturnAction.*\n' - + _FILE_LINE_RE + r'instantiated from here\n' - r'.*gmock-actions\.h.*error: creating array with negative size') - diagnosis = """ -You are using an Return() action in a function that returns a reference. -Please use ReturnRef() instead.""" - return _GenericDiagnoser('NRR', 'Need to Return Reference', - regex, diagnosis, msg) - - -def _NeedToReturnSomethingDiagnoser(msg): - """Diagnoses the NRS disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + - r'(instantiated from here\n.' - r'*gmock.*actions\.h.*error: void value not ignored)' - r'|(error: control reaches end of non-void function)') - diagnosis = """ -You are using an action that returns void, but it needs to return -*something*. Please tell it *what* to return. Perhaps you can use -the pattern DoAll(some_action, Return(some_value))?""" - return _GenericDiagnoser('NRS', 'Need to Return Something', - regex, diagnosis, msg) - - -def _NeedToReturnNothingDiagnoser(msg): - """Diagnoses the NRN disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'instantiated from here\n' - r'.*gmock-actions\.h.*error: return-statement with a value, ' - r'in function returning \'void\'') - diagnosis = """ -You are using an action that returns *something*, but it needs to return -void. Please use a void-returning action instead. - -All actions but the last in DoAll(...) must return void. Perhaps you need -to re-arrange the order of actions in a DoAll(), if you are using one?""" - return _GenericDiagnoser('NRN', 'Need to Return Nothing', - regex, diagnosis, msg) - - -def _IncompleteByReferenceArgumentDiagnoser(msg): - """Diagnoses the IBRA disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'instantiated from here\n' - r'.*gmock-printers\.h.*error: invalid application of ' - r'\'sizeof\' to incomplete type \'(?P.*)\'') - diagnosis = """ -In order to mock this function, Google Mock needs to see the definition -of type "%(type)s" - declaration alone is not enough. Either #include -the header that defines it, or change the argument to be passed -by pointer.""" - return _GenericDiagnoser('IBRA', 'Incomplete By-Reference Argument Type', - regex, diagnosis, msg) - - -def _OverloadedFunctionMatcherDiagnoser(msg): - """Diagnoses the OFM disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: no matching function for ' - r'call to \'Truly\(\)') - diagnosis = """ -The argument you gave to Truly() is an overloaded function. Please tell -gcc which overloaded version you want to use. - -For example, if you want to use the version whose signature is - bool Foo(int n); -you should write - Truly(static_cast(Foo))""" - return _GenericDiagnoser('OFM', 'Overloaded Function Matcher', - regex, diagnosis, msg) - - -def _OverloadedFunctionActionDiagnoser(msg): - """Diagnoses the OFA disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: no matching function for call to \'Invoke\(' - r'') - diagnosis = """ -You are passing an overloaded function to Invoke(). Please tell gcc -which overloaded version you want to use. - -For example, if you want to use the version whose signature is - bool MyFunction(int n, double x); -you should write something like - Invoke(static_cast(MyFunction))""" - return _GenericDiagnoser('OFA', 'Overloaded Function Action', - regex, diagnosis, msg) - - -def _OverloadedMethodActionDiagnoser1(msg): - """Diagnoses the OMA disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: ' - r'.*no matching function for call to \'Invoke\(.*, ' - r'unresolved overloaded function type>') - diagnosis = """ -The second argument you gave to Invoke() is an overloaded method. Please -tell gcc which overloaded version you want to use. - -For example, if you want to use the version whose signature is - class Foo { - ... - bool Bar(int n, double x); - }; -you should write something like - Invoke(foo, static_cast(&Foo::Bar))""" - return _GenericDiagnoser('OMA', 'Overloaded Method Action', - regex, diagnosis, msg) - - -def _MockObjectPointerDiagnoser(msg): - """Diagnoses the MOP disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: request for member ' - r'\'gmock_(?P.+)\' in \'(?P.+)\', ' - r'which is of non-class type \'(.*::)*(?P.+)\*\'') - diagnosis = """ -The first argument to ON_CALL() and EXPECT_CALL() must be a mock *object*, -not a *pointer* to it. Please write '*(%(mock_object)s)' instead of -'%(mock_object)s' as your first argument. - -For example, given the mock class: - - class %(class_name)s : public ... { - ... - MOCK_METHOD0(%(method)s, ...); - }; - -and the following mock instance: - - %(class_name)s* mock_ptr = ... - -you should use the EXPECT_CALL like this: - - EXPECT_CALL(*mock_ptr, %(method)s(...));""" - return _GenericDiagnoser('MOP', 'Mock Object Pointer', - regex, diagnosis, msg) - - -def _OverloadedMethodActionDiagnoser2(msg): - """Diagnoses the OMA disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: no matching function for ' - r'call to \'Invoke\(.+, \)') - diagnosis = """ -The second argument you gave to Invoke() is an overloaded method. Please -tell gcc which overloaded version you want to use. - -For example, if you want to use the version whose signature is - class Foo { - ... - bool Bar(int n, double x); - }; -you should write something like - Invoke(foo, static_cast(&Foo::Bar))""" - return _GenericDiagnoser('OMA', 'Overloaded Method Action', - regex, diagnosis, msg) - - -def _NeedToUseSymbolDiagnoser(msg): - """Diagnoses the NUS disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'error: \'(?P.+)\' ' - r'(was not declared in this scope|has not been declared)') - diagnosis = """ -'%(symbol)s' is defined by Google Mock in the testing namespace. -Did you forget to write - using testing::%(symbol)s; -?""" - for m in _FindAllMatches(regex, msg): - symbol = m.groupdict()['symbol'] - if symbol in _COMMON_GMOCK_SYMBOLS: - yield ('NUS', 'Need to Use Symbol', diagnosis % m.groupdict()) - - -def _NeedToUseReturnNullDiagnoser(msg): - """Diagnoses the NRNULL disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + r'instantiated from here\n' - r'.*gmock-actions\.h.*error: invalid conversion from ' - r'\'long int\' to \'(?P.+\*)') - diagnosis = """ -You are probably calling Return(NULL) and the compiler isn't sure how to turn -NULL into a %(type)s*. Use ReturnNull() instead. -Note: the line number may be off; please fix all instances of Return(NULL).""" - return _GenericDiagnoser('NRNULL', 'Need to use ReturnNull', - regex, diagnosis, msg) - - -_TTB_DIAGNOSIS = """ -In a mock class template, types or typedefs defined in the base class -template are *not* automatically visible. This is how C++ works. Before -you can use a type or typedef named %(type)s defined in base class Base, you -need to make it visible. One way to do it is: - - typedef typename Base::%(type)s %(type)s;""" - - -def _TypeInTemplatedBaseDiagnoser1(msg): - """Diagnoses the TTB disease, given the error messages by gcc. - - This version works when the type is used as the mock function's return - type. - """ - - regex = (r'In member function \'int .*\n' + _FILE_LINE_RE + - r'error: a function call cannot appear in a constant-expression') - diagnosis = _TTB_DIAGNOSIS % {'type': 'Foo'} - return _GenericDiagnoser('TTB', 'Type in Template Base', - regex, diagnosis, msg) - - -def _TypeInTemplatedBaseDiagnoser2(msg): - """Diagnoses the TTB disease, given the error messages by gcc. - - This version works when the type is used as the mock function's sole - parameter type. - """ - - regex = (r'In member function \'int .*\n' - + _FILE_LINE_RE + - r'error: \'(?P.+)\' was not declared in this scope\n' - r'.*error: template argument 1 is invalid\n') - return _GenericDiagnoser('TTB', 'Type in Template Base', - regex, _TTB_DIAGNOSIS, msg) - - -def _TypeInTemplatedBaseDiagnoser3(msg): - """Diagnoses the TTB disease, given the error messages by gcc. - - This version works when the type is used as a parameter of a mock - function that has multiple parameters. - """ - - regex = (r'error: expected `;\' before \'::\' token\n' - + _FILE_LINE_RE + - r'error: \'(?P.+)\' was not declared in this scope\n' - r'.*error: template argument 1 is invalid\n' - r'.*error: \'.+\' was not declared in this scope') - return _GenericDiagnoser('TTB', 'Type in Template Base', - regex, _TTB_DIAGNOSIS, msg) - - -def _WrongMockMethodMacroDiagnoser(msg): - """Diagnoses the WMM disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + - r'.*this_method_does_not_take_(?P\d+)_argument.*\n' - r'.*\n' - r'.*candidates are.*FunctionMocker<[^>]+A(?P\d+)\)>') - diagnosis = """ -You are using MOCK_METHOD%(wrong_args)s to define a mock method that has -%(args)s arguments. Use MOCK_METHOD%(args)s (or MOCK_CONST_METHOD%(args)s, -MOCK_METHOD%(args)s_T, MOCK_CONST_METHOD%(args)s_T as appropriate) instead.""" - return _GenericDiagnoser('WMM', 'Wrong MOCK_METHODn Macro', - regex, diagnosis, msg) - - -def _WrongParenPositionDiagnoser(msg): - """Diagnoses the WPP disease, given the error messages by gcc.""" - - regex = (_FILE_LINE_RE + - r'error:.*testing::internal::MockSpec<.* has no member named \'' - r'(?P\w+)\'') - diagnosis = """ -The closing parenthesis of ON_CALL or EXPECT_CALL should be *before* -".%(method)s". For example, you should write: - EXPECT_CALL(my_mock, Foo(_)).%(method)s(...); -instead of: - EXPECT_CALL(my_mock, Foo(_).%(method)s(...));""" - return _GenericDiagnoser('WPP', 'Wrong Parenthesis Position', - regex, diagnosis, msg) - - -_DIAGNOSERS = [ - _IncompleteByReferenceArgumentDiagnoser, - _MockObjectPointerDiagnoser, - _NeedToReturnNothingDiagnoser, - _NeedToReturnReferenceDiagnoser, - _NeedToReturnSomethingDiagnoser, - _NeedToUseReturnNullDiagnoser, - _NeedToUseSymbolDiagnoser, - _OverloadedFunctionActionDiagnoser, - _OverloadedFunctionMatcherDiagnoser, - _OverloadedMethodActionDiagnoser1, - _OverloadedMethodActionDiagnoser2, - _TypeInTemplatedBaseDiagnoser1, - _TypeInTemplatedBaseDiagnoser2, - _TypeInTemplatedBaseDiagnoser3, - _WrongMockMethodMacroDiagnoser, - _WrongParenPositionDiagnoser, - ] - - -def Diagnose(msg): - """Generates all possible diagnoses given the gcc error message.""" - - for diagnoser in _DIAGNOSERS: - for diagnosis in diagnoser(msg): - yield '[%s - %s]\n%s' % diagnosis - - -def main(): - print ('Google Mock Doctor v%s - ' - 'diagnoses problems in code using Google Mock.' % _VERSION) - - if sys.stdin.isatty(): - print ('Please copy and paste the compiler errors here. Press c-D when ' - 'you are done:') - else: - print 'Waiting for compiler errors on stdin . . .' - - msg = sys.stdin.read().strip() - diagnoses = list(Diagnose(msg)) - count = len(diagnoses) - if not count: - print '\nGcc complained:' - print '8<------------------------------------------------------------' - print msg - print '------------------------------------------------------------>8' - print """ -Uh-oh, I'm not smart enough to figure out what the problem is. :-( -However... -If you send your source code and gcc's error messages to -googlemock@googlegroups.com, you can be helped and I can get smarter -- -win-win for us!""" - else: - print '------------------------------------------------------------' - print 'Your code appears to have the following', - if count > 1: - print '%s diseases:' % (count,) - else: - print 'disease:' - i = 0 - for d in diagnoses: - i += 1 - if count > 1: - print '\n#%s:' % (i,) - print d - print """ -How did I do? If you think I'm wrong or unhelpful, please send your -source code and gcc's error messages to googlemock@googlegroups.com. Then -you can be helped and I can get smarter -- I promise I won't be upset!""" - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/test/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/test/Makefile deleted file mode 100644 index 8edaea06..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/test/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# A Makefile for fusing Google Mock and building a sample test against it. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make check - makes everything and runs the built sample test. -# make clean - removes all files generated by make. - -# Points to the root of fused Google Mock, relative to where this file is. -FUSED_GMOCK_DIR = output - -# Paths to the fused gmock files. -FUSED_GTEST_H = $(FUSED_GMOCK_DIR)/gtest/gtest.h -FUSED_GMOCK_H = $(FUSED_GMOCK_DIR)/gmock/gmock.h -FUSED_GMOCK_GTEST_ALL_CC = $(FUSED_GMOCK_DIR)/gmock-gtest-all.cc - -# Where to find the gmock_test.cc. -GMOCK_TEST_CC = ../../test/gmock_test.cc - -# Where to find gmock_main.cc. -GMOCK_MAIN_CC = ../../src/gmock_main.cc - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(FUSED_GMOCK_DIR) - -# Flags passed to the C++ compiler. -CXXFLAGS += -g - -all : gmock_test - -check : all - ./gmock_test - -clean : - rm -rf $(FUSED_GMOCK_DIR) gmock_test *.o - -$(FUSED_GTEST_H) : - ../fuse_gmock_files.py $(FUSED_GMOCK_DIR) - -$(FUSED_GMOCK_H) : - ../fuse_gmock_files.py $(FUSED_GMOCK_DIR) - -$(FUSED_GMOCK_GTEST_ALL_CC) : - ../fuse_gmock_files.py $(FUSED_GMOCK_DIR) - -gmock-gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GMOCK_H) $(FUSED_GMOCK_GTEST_ALL_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GMOCK_GTEST_ALL_CC) - -gmock_main.o : $(FUSED_GTEST_H) $(FUSED_GMOCK_H) $(GMOCK_MAIN_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GMOCK_MAIN_CC) - -gmock_test.o : $(FUSED_GTEST_H) $(FUSED_GMOCK_H) $(GMOCK_TEST_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GMOCK_TEST_CC) - -gmock_test : gmock_test.o gmock-gtest-all.o gmock_main.o - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload.py deleted file mode 100755 index 6e6f9a14..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload.py +++ /dev/null @@ -1,1387 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tool for uploading diffs from a version control system to the codereview app. - -Usage summary: upload.py [options] [-- diff_options] - -Diff options are passed to the diff command of the underlying system. - -Supported version control systems: - Git - Mercurial - Subversion - -It is important for Git/Mercurial users to specify a tree/node/branch to diff -against by using the '--rev' option. -""" -# This code is derived from appcfg.py in the App Engine SDK (open source), -# and from ASPN recipe #146306. - -import cookielib -import getpass -import logging -import md5 -import mimetypes -import optparse -import os -import re -import socket -import subprocess -import sys -import urllib -import urllib2 -import urlparse - -try: - import readline -except ImportError: - pass - -# The logging verbosity: -# 0: Errors only. -# 1: Status messages. -# 2: Info logs. -# 3: Debug logs. -verbosity = 1 - -# Max size of patch or base file. -MAX_UPLOAD_SIZE = 900 * 1024 - - -def GetEmail(prompt): - """Prompts the user for their email address and returns it. - - The last used email address is saved to a file and offered up as a suggestion - to the user. If the user presses enter without typing in anything the last - used email address is used. If the user enters a new address, it is saved - for next time we prompt. - - """ - last_email_file_name = os.path.expanduser("~/.last_codereview_email_address") - last_email = "" - if os.path.exists(last_email_file_name): - try: - last_email_file = open(last_email_file_name, "r") - last_email = last_email_file.readline().strip("\n") - last_email_file.close() - prompt += " [%s]" % last_email - except IOError, e: - pass - email = raw_input(prompt + ": ").strip() - if email: - try: - last_email_file = open(last_email_file_name, "w") - last_email_file.write(email) - last_email_file.close() - except IOError, e: - pass - else: - email = last_email - return email - - -def StatusUpdate(msg): - """Print a status message to stdout. - - If 'verbosity' is greater than 0, print the message. - - Args: - msg: The string to print. - """ - if verbosity > 0: - print msg - - -def ErrorExit(msg): - """Print an error message to stderr and exit.""" - print >>sys.stderr, msg - sys.exit(1) - - -class ClientLoginError(urllib2.HTTPError): - """Raised to indicate there was an error authenticating with ClientLogin.""" - - def __init__(self, url, code, msg, headers, args): - urllib2.HTTPError.__init__(self, url, code, msg, headers, None) - self.args = args - self.reason = args["Error"] - - -class AbstractRpcServer(object): - """Provides a common interface for a simple RPC server.""" - - def __init__(self, host, auth_function, host_override=None, extra_headers={}, - save_cookies=False): - """Creates a new HttpRpcServer. - - Args: - host: The host to send requests to. - auth_function: A function that takes no arguments and returns an - (email, password) tuple when called. Will be called if authentication - is required. - host_override: The host header to send to the server (defaults to host). - extra_headers: A dict of extra headers to append to every request. - save_cookies: If True, save the authentication cookies to local disk. - If False, use an in-memory cookiejar instead. Subclasses must - implement this functionality. Defaults to False. - """ - self.host = host - self.host_override = host_override - self.auth_function = auth_function - self.authenticated = False - self.extra_headers = extra_headers - self.save_cookies = save_cookies - self.opener = self._GetOpener() - if self.host_override: - logging.info("Server: %s; Host: %s", self.host, self.host_override) - else: - logging.info("Server: %s", self.host) - - def _GetOpener(self): - """Returns an OpenerDirector for making HTTP requests. - - Returns: - A urllib2.OpenerDirector object. - """ - raise NotImplementedError() - - def _CreateRequest(self, url, data=None): - """Creates a new urllib request.""" - logging.debug("Creating request for: '%s' with payload:\n%s", url, data) - req = urllib2.Request(url, data=data) - if self.host_override: - req.add_header("Host", self.host_override) - for key, value in self.extra_headers.iteritems(): - req.add_header(key, value) - return req - - def _GetAuthToken(self, email, password): - """Uses ClientLogin to authenticate the user, returning an auth token. - - Args: - email: The user's email address - password: The user's password - - Raises: - ClientLoginError: If there was an error authenticating with ClientLogin. - HTTPError: If there was some other form of HTTP error. - - Returns: - The authentication token returned by ClientLogin. - """ - account_type = "GOOGLE" - if self.host.endswith(".google.com"): - # Needed for use inside Google. - account_type = "HOSTED" - req = self._CreateRequest( - url="https://www.google.com/accounts/ClientLogin", - data=urllib.urlencode({ - "Email": email, - "Passwd": password, - "service": "ah", - "source": "rietveld-codereview-upload", - "accountType": account_type, - }), - ) - try: - response = self.opener.open(req) - response_body = response.read() - response_dict = dict(x.split("=") - for x in response_body.split("\n") if x) - return response_dict["Auth"] - except urllib2.HTTPError, e: - if e.code == 403: - body = e.read() - response_dict = dict(x.split("=", 1) for x in body.split("\n") if x) - raise ClientLoginError(req.get_full_url(), e.code, e.msg, - e.headers, response_dict) - else: - raise - - def _GetAuthCookie(self, auth_token): - """Fetches authentication cookies for an authentication token. - - Args: - auth_token: The authentication token returned by ClientLogin. - - Raises: - HTTPError: If there was an error fetching the authentication cookies. - """ - # This is a dummy value to allow us to identify when we're successful. - continue_location = "http://localhost/" - args = {"continue": continue_location, "auth": auth_token} - req = self._CreateRequest("http://%s/_ah/login?%s" % - (self.host, urllib.urlencode(args))) - try: - response = self.opener.open(req) - except urllib2.HTTPError, e: - response = e - if (response.code != 302 or - response.info()["location"] != continue_location): - raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg, - response.headers, response.fp) - self.authenticated = True - - def _Authenticate(self): - """Authenticates the user. - - The authentication process works as follows: - 1) We get a username and password from the user - 2) We use ClientLogin to obtain an AUTH token for the user - (see http://code.google.com/apis/accounts/AuthForInstalledApps.html). - 3) We pass the auth token to /_ah/login on the server to obtain an - authentication cookie. If login was successful, it tries to redirect - us to the URL we provided. - - If we attempt to access the upload API without first obtaining an - authentication cookie, it returns a 401 response and directs us to - authenticate ourselves with ClientLogin. - """ - for i in range(3): - credentials = self.auth_function() - try: - auth_token = self._GetAuthToken(credentials[0], credentials[1]) - except ClientLoginError, e: - if e.reason == "BadAuthentication": - print >>sys.stderr, "Invalid username or password." - continue - if e.reason == "CaptchaRequired": - print >>sys.stderr, ( - "Please go to\n" - "https://www.google.com/accounts/DisplayUnlockCaptcha\n" - "and verify you are a human. Then try again.") - break - if e.reason == "NotVerified": - print >>sys.stderr, "Account not verified." - break - if e.reason == "TermsNotAgreed": - print >>sys.stderr, "User has not agreed to TOS." - break - if e.reason == "AccountDeleted": - print >>sys.stderr, "The user account has been deleted." - break - if e.reason == "AccountDisabled": - print >>sys.stderr, "The user account has been disabled." - break - if e.reason == "ServiceDisabled": - print >>sys.stderr, ("The user's access to the service has been " - "disabled.") - break - if e.reason == "ServiceUnavailable": - print >>sys.stderr, "The service is not available; try again later." - break - raise - self._GetAuthCookie(auth_token) - return - - def Send(self, request_path, payload=None, - content_type="application/octet-stream", - timeout=None, - **kwargs): - """Sends an RPC and returns the response. - - Args: - request_path: The path to send the request to, eg /api/appversion/create. - payload: The body of the request, or None to send an empty request. - content_type: The Content-Type header to use. - timeout: timeout in seconds; default None i.e. no timeout. - (Note: for large requests on OS X, the timeout doesn't work right.) - kwargs: Any keyword arguments are converted into query string parameters. - - Returns: - The response body, as a string. - """ - # TODO: Don't require authentication. Let the server say - # whether it is necessary. - if not self.authenticated: - self._Authenticate() - - old_timeout = socket.getdefaulttimeout() - socket.setdefaulttimeout(timeout) - try: - tries = 0 - while True: - tries += 1 - args = dict(kwargs) - url = "http://%s%s" % (self.host, request_path) - if args: - url += "?" + urllib.urlencode(args) - req = self._CreateRequest(url=url, data=payload) - req.add_header("Content-Type", content_type) - try: - f = self.opener.open(req) - response = f.read() - f.close() - return response - except urllib2.HTTPError, e: - if tries > 3: - raise - elif e.code == 401: - self._Authenticate() -## elif e.code >= 500 and e.code < 600: -## # Server Error - try again. -## continue - else: - raise - finally: - socket.setdefaulttimeout(old_timeout) - - -class HttpRpcServer(AbstractRpcServer): - """Provides a simplified RPC-style interface for HTTP requests.""" - - def _Authenticate(self): - """Save the cookie jar after authentication.""" - super(HttpRpcServer, self)._Authenticate() - if self.save_cookies: - StatusUpdate("Saving authentication cookies to %s" % self.cookie_file) - self.cookie_jar.save() - - def _GetOpener(self): - """Returns an OpenerDirector that supports cookies and ignores redirects. - - Returns: - A urllib2.OpenerDirector object. - """ - opener = urllib2.OpenerDirector() - opener.add_handler(urllib2.ProxyHandler()) - opener.add_handler(urllib2.UnknownHandler()) - opener.add_handler(urllib2.HTTPHandler()) - opener.add_handler(urllib2.HTTPDefaultErrorHandler()) - opener.add_handler(urllib2.HTTPSHandler()) - opener.add_handler(urllib2.HTTPErrorProcessor()) - if self.save_cookies: - self.cookie_file = os.path.expanduser("~/.codereview_upload_cookies") - self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file) - if os.path.exists(self.cookie_file): - try: - self.cookie_jar.load() - self.authenticated = True - StatusUpdate("Loaded authentication cookies from %s" % - self.cookie_file) - except (cookielib.LoadError, IOError): - # Failed to load cookies - just ignore them. - pass - else: - # Create an empty cookie file with mode 600 - fd = os.open(self.cookie_file, os.O_CREAT, 0600) - os.close(fd) - # Always chmod the cookie file - os.chmod(self.cookie_file, 0600) - else: - # Don't save cookies across runs of update.py. - self.cookie_jar = cookielib.CookieJar() - opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar)) - return opener - - -parser = optparse.OptionParser(usage="%prog [options] [-- diff_options]") -parser.add_option("-y", "--assume_yes", action="store_true", - dest="assume_yes", default=False, - help="Assume that the answer to yes/no questions is 'yes'.") -# Logging -group = parser.add_option_group("Logging options") -group.add_option("-q", "--quiet", action="store_const", const=0, - dest="verbose", help="Print errors only.") -group.add_option("-v", "--verbose", action="store_const", const=2, - dest="verbose", default=1, - help="Print info level logs (default).") -group.add_option("--noisy", action="store_const", const=3, - dest="verbose", help="Print all logs.") -# Review server -group = parser.add_option_group("Review server options") -group.add_option("-s", "--server", action="store", dest="server", - default="codereview.appspot.com", - metavar="SERVER", - help=("The server to upload to. The format is host[:port]. " - "Defaults to 'codereview.appspot.com'.")) -group.add_option("-e", "--email", action="store", dest="email", - metavar="EMAIL", default=None, - help="The username to use. Will prompt if omitted.") -group.add_option("-H", "--host", action="store", dest="host", - metavar="HOST", default=None, - help="Overrides the Host header sent with all RPCs.") -group.add_option("--no_cookies", action="store_false", - dest="save_cookies", default=True, - help="Do not save authentication cookies to local disk.") -# Issue -group = parser.add_option_group("Issue options") -group.add_option("-d", "--description", action="store", dest="description", - metavar="DESCRIPTION", default=None, - help="Optional description when creating an issue.") -group.add_option("-f", "--description_file", action="store", - dest="description_file", metavar="DESCRIPTION_FILE", - default=None, - help="Optional path of a file that contains " - "the description when creating an issue.") -group.add_option("-r", "--reviewers", action="store", dest="reviewers", - metavar="REVIEWERS", default=None, - help="Add reviewers (comma separated email addresses).") -group.add_option("--cc", action="store", dest="cc", - metavar="CC", default=None, - help="Add CC (comma separated email addresses).") -# Upload options -group = parser.add_option_group("Patch options") -group.add_option("-m", "--message", action="store", dest="message", - metavar="MESSAGE", default=None, - help="A message to identify the patch. " - "Will prompt if omitted.") -group.add_option("-i", "--issue", type="int", action="store", - metavar="ISSUE", default=None, - help="Issue number to which to add. Defaults to new issue.") -group.add_option("--download_base", action="store_true", - dest="download_base", default=False, - help="Base files will be downloaded by the server " - "(side-by-side diffs may not work on files with CRs).") -group.add_option("--rev", action="store", dest="revision", - metavar="REV", default=None, - help="Branch/tree/revision to diff against (used by DVCS).") -group.add_option("--send_mail", action="store_true", - dest="send_mail", default=False, - help="Send notification email to reviewers.") - - -def GetRpcServer(options): - """Returns an instance of an AbstractRpcServer. - - Returns: - A new AbstractRpcServer, on which RPC calls can be made. - """ - - rpc_server_class = HttpRpcServer - - def GetUserCredentials(): - """Prompts the user for a username and password.""" - email = options.email - if email is None: - email = GetEmail("Email (login for uploading to %s)" % options.server) - password = getpass.getpass("Password for %s: " % email) - return (email, password) - - # If this is the dev_appserver, use fake authentication. - host = (options.host or options.server).lower() - if host == "localhost" or host.startswith("localhost:"): - email = options.email - if email is None: - email = "test@example.com" - logging.info("Using debug user %s. Override with --email" % email) - server = rpc_server_class( - options.server, - lambda: (email, "password"), - host_override=options.host, - extra_headers={"Cookie": - 'dev_appserver_login="%s:False"' % email}, - save_cookies=options.save_cookies) - # Don't try to talk to ClientLogin. - server.authenticated = True - return server - - return rpc_server_class(options.server, GetUserCredentials, - host_override=options.host, - save_cookies=options.save_cookies) - - -def EncodeMultipartFormData(fields, files): - """Encode form fields for multipart/form-data. - - Args: - fields: A sequence of (name, value) elements for regular form fields. - files: A sequence of (name, filename, value) elements for data to be - uploaded as files. - Returns: - (content_type, body) ready for httplib.HTTP instance. - - Source: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 - """ - BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-' - CRLF = '\r\n' - lines = [] - for (key, value) in fields: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"' % key) - lines.append('') - lines.append(value) - for (key, filename, value) in files: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % - (key, filename)) - lines.append('Content-Type: %s' % GetContentType(filename)) - lines.append('') - lines.append(value) - lines.append('--' + BOUNDARY + '--') - lines.append('') - body = CRLF.join(lines) - content_type = 'multipart/form-data; boundary=%s' % BOUNDARY - return content_type, body - - -def GetContentType(filename): - """Helper to guess the content-type from the filename.""" - return mimetypes.guess_type(filename)[0] or 'application/octet-stream' - - -# Use a shell for subcommands on Windows to get a PATH search. -use_shell = sys.platform.startswith("win") - -def RunShellWithReturnCode(command, print_output=False, - universal_newlines=True): - """Executes a command and returns the output from stdout and the return code. - - Args: - command: Command to execute. - print_output: If True, the output is printed to stdout. - If False, both stdout and stderr are ignored. - universal_newlines: Use universal_newlines flag (default: True). - - Returns: - Tuple (output, return code) - """ - logging.info("Running %s", command) - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - shell=use_shell, universal_newlines=universal_newlines) - if print_output: - output_array = [] - while True: - line = p.stdout.readline() - if not line: - break - print line.strip("\n") - output_array.append(line) - output = "".join(output_array) - else: - output = p.stdout.read() - p.wait() - errout = p.stderr.read() - if print_output and errout: - print >>sys.stderr, errout - p.stdout.close() - p.stderr.close() - return output, p.returncode - - -def RunShell(command, silent_ok=False, universal_newlines=True, - print_output=False): - data, retcode = RunShellWithReturnCode(command, print_output, - universal_newlines) - if retcode: - ErrorExit("Got error status from %s:\n%s" % (command, data)) - if not silent_ok and not data: - ErrorExit("No output from %s" % command) - return data - - -class VersionControlSystem(object): - """Abstract base class providing an interface to the VCS.""" - - def __init__(self, options): - """Constructor. - - Args: - options: Command line options. - """ - self.options = options - - def GenerateDiff(self, args): - """Return the current diff as a string. - - Args: - args: Extra arguments to pass to the diff command. - """ - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def CheckForUnknownFiles(self): - """Show an "are you sure?" prompt if there are unknown files.""" - unknown_files = self.GetUnknownFiles() - if unknown_files: - print "The following files are not added to version control:" - for line in unknown_files: - print line - prompt = "Are you sure to continue?(y/N) " - answer = raw_input(prompt).strip() - if answer != "y": - ErrorExit("User aborted") - - def GetBaseFile(self, filename): - """Get the content of the upstream version of a file. - - Returns: - A tuple (base_content, new_content, is_binary, status) - base_content: The contents of the base file. - new_content: For text files, this is empty. For binary files, this is - the contents of the new file, since the diff output won't contain - information to reconstruct the current file. - is_binary: True iff the file is binary. - status: The status of the file. - """ - - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - - def GetBaseFiles(self, diff): - """Helper that calls GetBase file for each file in the patch. - - Returns: - A dictionary that maps from filename to GetBaseFile's tuple. Filenames - are retrieved based on lines that start with "Index:" or - "Property changes on:". - """ - files = {} - for line in diff.splitlines(True): - if line.startswith('Index:') or line.startswith('Property changes on:'): - unused, filename = line.split(':', 1) - # On Windows if a file has property changes its filename uses '\' - # instead of '/'. - filename = filename.strip().replace('\\', '/') - files[filename] = self.GetBaseFile(filename) - return files - - - def UploadBaseFiles(self, issue, rpc_server, patch_list, patchset, options, - files): - """Uploads the base files (and if necessary, the current ones as well).""" - - def UploadFile(filename, file_id, content, is_binary, status, is_base): - """Uploads a file to the server.""" - file_too_large = False - if is_base: - type = "base" - else: - type = "current" - if len(content) > MAX_UPLOAD_SIZE: - print ("Not uploading the %s file for %s because it's too large." % - (type, filename)) - file_too_large = True - content = "" - checksum = md5.new(content).hexdigest() - if options.verbose > 0 and not file_too_large: - print "Uploading %s file for %s" % (type, filename) - url = "/%d/upload_content/%d/%d" % (int(issue), int(patchset), file_id) - form_fields = [("filename", filename), - ("status", status), - ("checksum", checksum), - ("is_binary", str(is_binary)), - ("is_current", str(not is_base)), - ] - if file_too_large: - form_fields.append(("file_too_large", "1")) - if options.email: - form_fields.append(("user", options.email)) - ctype, body = EncodeMultipartFormData(form_fields, - [("data", filename, content)]) - response_body = rpc_server.Send(url, body, - content_type=ctype) - if not response_body.startswith("OK"): - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - - patches = dict() - [patches.setdefault(v, k) for k, v in patch_list] - for filename in patches.keys(): - base_content, new_content, is_binary, status = files[filename] - file_id_str = patches.get(filename) - if file_id_str.find("nobase") != -1: - base_content = None - file_id_str = file_id_str[file_id_str.rfind("_") + 1:] - file_id = int(file_id_str) - if base_content != None: - UploadFile(filename, file_id, base_content, is_binary, status, True) - if new_content != None: - UploadFile(filename, file_id, new_content, is_binary, status, False) - - def IsImage(self, filename): - """Returns true if the filename has an image extension.""" - mimetype = mimetypes.guess_type(filename)[0] - if not mimetype: - return False - return mimetype.startswith("image/") - - -class SubversionVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Subversion.""" - - def __init__(self, options): - super(SubversionVCS, self).__init__(options) - if self.options.revision: - match = re.match(r"(\d+)(:(\d+))?", self.options.revision) - if not match: - ErrorExit("Invalid Subversion revision %s." % self.options.revision) - self.rev_start = match.group(1) - self.rev_end = match.group(3) - else: - self.rev_start = self.rev_end = None - # Cache output from "svn list -r REVNO dirname". - # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev). - self.svnls_cache = {} - # SVN base URL is required to fetch files deleted in an older revision. - # Result is cached to not guess it over and over again in GetBaseFile(). - required = self.options.download_base or self.options.revision is not None - self.svn_base = self._GuessBase(required) - - def GuessBase(self, required): - """Wrapper for _GuessBase.""" - return self.svn_base - - def _GuessBase(self, required): - """Returns the SVN base URL. - - Args: - required: If true, exits if the url can't be guessed, otherwise None is - returned. - """ - info = RunShell(["svn", "info"]) - for line in info.splitlines(): - words = line.split() - if len(words) == 2 and words[0] == "URL:": - url = words[1] - scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) - username, netloc = urllib.splituser(netloc) - if username: - logging.info("Removed username from base URL") - if netloc.endswith("svn.python.org"): - if netloc == "svn.python.org": - if path.startswith("/projects/"): - path = path[9:] - elif netloc != "pythondev@svn.python.org": - ErrorExit("Unrecognized Python URL: %s" % url) - base = "http://svn.python.org/view/*checkout*%s/" % path - logging.info("Guessed Python base = %s", base) - elif netloc.endswith("svn.collab.net"): - if path.startswith("/repos/"): - path = path[6:] - base = "http://svn.collab.net/viewvc/*checkout*%s/" % path - logging.info("Guessed CollabNet base = %s", base) - elif netloc.endswith(".googlecode.com"): - path = path + "/" - base = urlparse.urlunparse(("http", netloc, path, params, - query, fragment)) - logging.info("Guessed Google Code base = %s", base) - else: - path = path + "/" - base = urlparse.urlunparse((scheme, netloc, path, params, - query, fragment)) - logging.info("Guessed base = %s", base) - return base - if required: - ErrorExit("Can't find URL in output from svn info") - return None - - def GenerateDiff(self, args): - cmd = ["svn", "diff"] - if self.options.revision: - cmd += ["-r", self.options.revision] - cmd.extend(args) - data = RunShell(cmd) - count = 0 - for line in data.splitlines(): - if line.startswith("Index:") or line.startswith("Property changes on:"): - count += 1 - logging.info(line) - if not count: - ErrorExit("No valid patches found in output from svn diff") - return data - - def _CollapseKeywords(self, content, keyword_str): - """Collapses SVN keywords.""" - # svn cat translates keywords but svn diff doesn't. As a result of this - # behavior patching.PatchChunks() fails with a chunk mismatch error. - # This part was originally written by the Review Board development team - # who had the same problem (http://reviews.review-board.org/r/276/). - # Mapping of keywords to known aliases - svn_keywords = { - # Standard keywords - 'Date': ['Date', 'LastChangedDate'], - 'Revision': ['Revision', 'LastChangedRevision', 'Rev'], - 'Author': ['Author', 'LastChangedBy'], - 'HeadURL': ['HeadURL', 'URL'], - 'Id': ['Id'], - - # Aliases - 'LastChangedDate': ['LastChangedDate', 'Date'], - 'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'], - 'LastChangedBy': ['LastChangedBy', 'Author'], - 'URL': ['URL', 'HeadURL'], - } - - def repl(m): - if m.group(2): - return "$%s::%s$" % (m.group(1), " " * len(m.group(3))) - return "$%s$" % m.group(1) - keywords = [keyword - for name in keyword_str.split(" ") - for keyword in svn_keywords.get(name, [])] - return re.sub(r"\$(%s):(:?)([^\$]+)\$" % '|'.join(keywords), repl, content) - - def GetUnknownFiles(self): - status = RunShell(["svn", "status", "--ignore-externals"], silent_ok=True) - unknown_files = [] - for line in status.split("\n"): - if line and line[0] == "?": - unknown_files.append(line) - return unknown_files - - def ReadFile(self, filename): - """Returns the contents of a file.""" - file = open(filename, 'rb') - result = "" - try: - result = file.read() - finally: - file.close() - return result - - def GetStatus(self, filename): - """Returns the status of a file.""" - if not self.options.revision: - status = RunShell(["svn", "status", "--ignore-externals", filename]) - if not status: - ErrorExit("svn status returned no output for %s" % filename) - status_lines = status.splitlines() - # If file is in a cl, the output will begin with - # "\n--- Changelist 'cl_name':\n". See - # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt - if (len(status_lines) == 3 and - not status_lines[0] and - status_lines[1].startswith("--- Changelist")): - status = status_lines[2] - else: - status = status_lines[0] - # If we have a revision to diff against we need to run "svn list" - # for the old and the new revision and compare the results to get - # the correct status for a file. - else: - dirname, relfilename = os.path.split(filename) - if dirname not in self.svnls_cache: - cmd = ["svn", "list", "-r", self.rev_start, dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to get status for %s." % filename) - old_files = out.splitlines() - args = ["svn", "list"] - if self.rev_end: - args += ["-r", self.rev_end] - cmd = args + [dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to run command %s" % cmd) - self.svnls_cache[dirname] = (old_files, out.splitlines()) - old_files, new_files = self.svnls_cache[dirname] - if relfilename in old_files and relfilename not in new_files: - status = "D " - elif relfilename in old_files and relfilename in new_files: - status = "M " - else: - status = "A " - return status - - def GetBaseFile(self, filename): - status = self.GetStatus(filename) - base_content = None - new_content = None - - # If a file is copied its status will be "A +", which signifies - # "addition-with-history". See "svn st" for more information. We need to - # upload the original file or else diff parsing will fail if the file was - # edited. - if status[0] == "A" and status[3] != "+": - # We'll need to upload the new content if we're adding a binary file - # since diff's output won't contain it. - mimetype = RunShell(["svn", "propget", "svn:mime-type", filename], - silent_ok=True) - base_content = "" - is_binary = mimetype and not mimetype.startswith("text/") - if is_binary and self.IsImage(filename): - new_content = self.ReadFile(filename) - elif (status[0] in ("M", "D", "R") or - (status[0] == "A" and status[3] == "+") or # Copied file. - (status[0] == " " and status[1] == "M")): # Property change. - args = [] - if self.options.revision: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - # Don't change filename, it's needed later. - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:mime-type", url] - mimetype, returncode = RunShellWithReturnCode(cmd) - if returncode: - # File does not exist in the requested revision. - # Reset mimetype, it contains an error message. - mimetype = "" - get_base = False - is_binary = mimetype and not mimetype.startswith("text/") - if status[0] == " ": - # Empty base content just to force an upload. - base_content = "" - elif is_binary: - if self.IsImage(filename): - get_base = True - if status[0] == "M": - if not self.rev_end: - new_content = self.ReadFile(filename) - else: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_end) - new_content = RunShell(["svn", "cat", url], - universal_newlines=True, silent_ok=True) - else: - base_content = "" - else: - get_base = True - - if get_base: - if is_binary: - universal_newlines = False - else: - universal_newlines = True - if self.rev_start: - # "svn cat -r REV delete_file.txt" doesn't work. cat requires - # the full URL with "@REV" appended instead of using "-r" option. - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - base_content = RunShell(["svn", "cat", url], - universal_newlines=universal_newlines, - silent_ok=True) - else: - base_content = RunShell(["svn", "cat", filename], - universal_newlines=universal_newlines, - silent_ok=True) - if not is_binary: - args = [] - if self.rev_start: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:keywords", url] - keywords, returncode = RunShellWithReturnCode(cmd) - if keywords and not returncode: - base_content = self._CollapseKeywords(base_content, keywords) - else: - StatusUpdate("svn status returned unexpected output: %s" % status) - sys.exit(1) - return base_content, new_content, is_binary, status[0:5] - - -class GitVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Git.""" - - def __init__(self, options): - super(GitVCS, self).__init__(options) - # Map of filename -> hash of base file. - self.base_hashes = {} - - def GenerateDiff(self, extra_args): - # This is more complicated than svn's GenerateDiff because we must convert - # the diff output to include an svn-style "Index:" line as well as record - # the hashes of the base files, so we can upload them along with our diff. - if self.options.revision: - extra_args = [self.options.revision] + extra_args - gitdiff = RunShell(["git", "diff", "--full-index"] + extra_args) - svndiff = [] - filecount = 0 - filename = None - for line in gitdiff.splitlines(): - match = re.match(r"diff --git a/(.*) b/.*$", line) - if match: - filecount += 1 - filename = match.group(1) - svndiff.append("Index: %s\n" % filename) - else: - # The "index" line in a git diff looks like this (long hashes elided): - # index 82c0d44..b2cee3f 100755 - # We want to save the left hash, as that identifies the base file. - match = re.match(r"index (\w+)\.\.", line) - if match: - self.base_hashes[filename] = match.group(1) - svndiff.append(line + "\n") - if not filecount: - ErrorExit("No valid patches found in output from git diff") - return "".join(svndiff) - - def GetUnknownFiles(self): - status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], - silent_ok=True) - return status.splitlines() - - def GetBaseFile(self, filename): - hash = self.base_hashes[filename] - base_content = None - new_content = None - is_binary = False - if hash == "0" * 40: # All-zero hash indicates no base file. - status = "A" - base_content = "" - else: - status = "M" - base_content, returncode = RunShellWithReturnCode(["git", "show", hash]) - if returncode: - ErrorExit("Got error status from 'git show %s'" % hash) - return (base_content, new_content, is_binary, status) - - -class MercurialVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Mercurial.""" - - def __init__(self, options, repo_dir): - super(MercurialVCS, self).__init__(options) - # Absolute path to repository (we can be in a subdir) - self.repo_dir = os.path.normpath(repo_dir) - # Compute the subdir - cwd = os.path.normpath(os.getcwd()) - assert cwd.startswith(self.repo_dir) - self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/") - if self.options.revision: - self.base_rev = self.options.revision - else: - self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip() - - def _GetRelPath(self, filename): - """Get relative path of a file according to the current directory, - given its logical path in the repo.""" - assert filename.startswith(self.subdir), filename - return filename[len(self.subdir):].lstrip(r"\/") - - def GenerateDiff(self, extra_args): - # If no file specified, restrict to the current subdir - extra_args = extra_args or ["."] - cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args - data = RunShell(cmd, silent_ok=True) - svndiff = [] - filecount = 0 - for line in data.splitlines(): - m = re.match("diff --git a/(\S+) b/(\S+)", line) - if m: - # Modify line to make it look like as it comes from svn diff. - # With this modification no changes on the server side are required - # to make upload.py work with Mercurial repos. - # NOTE: for proper handling of moved/copied files, we have to use - # the second filename. - filename = m.group(2) - svndiff.append("Index: %s" % filename) - svndiff.append("=" * 67) - filecount += 1 - logging.info(line) - else: - svndiff.append(line) - if not filecount: - ErrorExit("No valid patches found in output from hg diff") - return "\n".join(svndiff) + "\n" - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - args = [] - status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."], - silent_ok=True) - unknown_files = [] - for line in status.splitlines(): - st, fn = line.split(" ", 1) - if st == "?": - unknown_files.append(fn) - return unknown_files - - def GetBaseFile(self, filename): - # "hg status" and "hg cat" both take a path relative to the current subdir - # rather than to the repo root, but "hg diff" has given us the full path - # to the repo root. - base_content = "" - new_content = None - is_binary = False - oldrelpath = relpath = self._GetRelPath(filename) - # "hg status -C" returns two lines for moved/copied files, one otherwise - out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath]) - out = out.splitlines() - # HACK: strip error message about missing file/directory if it isn't in - # the working copy - if out[0].startswith('%s: ' % relpath): - out = out[1:] - if len(out) > 1: - # Moved/copied => considered as modified, use old filename to - # retrieve base contents - oldrelpath = out[1].strip() - status = "M" - else: - status, _ = out[0].split(' ', 1) - if status != "A": - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True) - is_binary = "\0" in base_content # Mercurial's heuristic - if status != "R": - new_content = open(relpath, "rb").read() - is_binary = is_binary or "\0" in new_content - if is_binary and base_content: - # Fetch again without converting newlines - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True, universal_newlines=False) - if not is_binary or not self.IsImage(relpath): - new_content = None - return base_content, new_content, is_binary, status - - -# NOTE: The SplitPatch function is duplicated in engine.py, keep them in sync. -def SplitPatch(data): - """Splits a patch into separate pieces for each file. - - Args: - data: A string containing the output of svn diff. - - Returns: - A list of 2-tuple (filename, text) where text is the svn diff output - pertaining to filename. - """ - patches = [] - filename = None - diff = [] - for line in data.splitlines(True): - new_filename = None - if line.startswith('Index:'): - unused, new_filename = line.split(':', 1) - new_filename = new_filename.strip() - elif line.startswith('Property changes on:'): - unused, temp_filename = line.split(':', 1) - # When a file is modified, paths use '/' between directories, however - # when a property is modified '\' is used on Windows. Make them the same - # otherwise the file shows up twice. - temp_filename = temp_filename.strip().replace('\\', '/') - if temp_filename != filename: - # File has property changes but no modifications, create a new diff. - new_filename = temp_filename - if new_filename: - if filename and diff: - patches.append((filename, ''.join(diff))) - filename = new_filename - diff = [line] - continue - if diff is not None: - diff.append(line) - if filename and diff: - patches.append((filename, ''.join(diff))) - return patches - - -def UploadSeparatePatches(issue, rpc_server, patchset, data, options): - """Uploads a separate patch for each file in the diff output. - - Returns a list of [patch_key, filename] for each file. - """ - patches = SplitPatch(data) - rv = [] - for patch in patches: - if len(patch[1]) > MAX_UPLOAD_SIZE: - print ("Not uploading the patch for " + patch[0] + - " because the file is too large.") - continue - form_fields = [("filename", patch[0])] - if not options.download_base: - form_fields.append(("content_upload", "1")) - files = [("data", "data.diff", patch[1])] - ctype, body = EncodeMultipartFormData(form_fields, files) - url = "/%d/upload_patch/%d" % (int(issue), int(patchset)) - print "Uploading patch for " + patch[0] - response_body = rpc_server.Send(url, body, content_type=ctype) - lines = response_body.splitlines() - if not lines or lines[0] != "OK": - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - rv.append([lines[1], patch[0]]) - return rv - - -def GuessVCS(options): - """Helper to guess the version control system. - - This examines the current directory, guesses which VersionControlSystem - we're using, and returns an instance of the appropriate class. Exit with an - error if we can't figure it out. - - Returns: - A VersionControlSystem instance. Exits if the VCS can't be guessed. - """ - # Mercurial has a command to get the base directory of a repository - # Try running it, but don't die if we don't have hg installed. - # NOTE: we try Mercurial first as it can sit on top of an SVN working copy. - try: - out, returncode = RunShellWithReturnCode(["hg", "root"]) - if returncode == 0: - return MercurialVCS(options, out.strip()) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have hg installed. - raise - - # Subversion has a .svn in all working directories. - if os.path.isdir('.svn'): - logging.info("Guessed VCS = Subversion") - return SubversionVCS(options) - - # Git has a command to test if you're in a git tree. - # Try running it, but don't die if we don't have git installed. - try: - out, returncode = RunShellWithReturnCode(["git", "rev-parse", - "--is-inside-work-tree"]) - if returncode == 0: - return GitVCS(options) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have git installed. - raise - - ErrorExit(("Could not guess version control system. " - "Are you in a working copy directory?")) - - -def RealMain(argv, data=None): - """The real main function. - - Args: - argv: Command line arguments. - data: Diff contents. If None (default) the diff is generated by - the VersionControlSystem implementation returned by GuessVCS(). - - Returns: - A 2-tuple (issue id, patchset id). - The patchset id is None if the base files are not uploaded by this - script (applies only to SVN checkouts). - """ - logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" - "%(lineno)s %(message)s ")) - os.environ['LC_ALL'] = 'C' - options, args = parser.parse_args(argv[1:]) - global verbosity - verbosity = options.verbose - if verbosity >= 3: - logging.getLogger().setLevel(logging.DEBUG) - elif verbosity >= 2: - logging.getLogger().setLevel(logging.INFO) - vcs = GuessVCS(options) - if isinstance(vcs, SubversionVCS): - # base field is only allowed for Subversion. - # Note: Fetching base files may become deprecated in future releases. - base = vcs.GuessBase(options.download_base) - else: - base = None - if not base and options.download_base: - options.download_base = True - logging.info("Enabled upload of base file") - if not options.assume_yes: - vcs.CheckForUnknownFiles() - if data is None: - data = vcs.GenerateDiff(args) - files = vcs.GetBaseFiles(data) - if verbosity >= 1: - print "Upload server:", options.server, "(change with -s/--server)" - if options.issue: - prompt = "Message describing this patch set: " - else: - prompt = "New issue subject: " - message = options.message or raw_input(prompt).strip() - if not message: - ErrorExit("A non-empty message is required") - rpc_server = GetRpcServer(options) - form_fields = [("subject", message)] - if base: - form_fields.append(("base", base)) - if options.issue: - form_fields.append(("issue", str(options.issue))) - if options.email: - form_fields.append(("user", options.email)) - if options.reviewers: - for reviewer in options.reviewers.split(','): - if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % reviewer) - form_fields.append(("reviewers", options.reviewers)) - if options.cc: - for cc in options.cc.split(','): - if "@" in cc and not cc.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % cc) - form_fields.append(("cc", options.cc)) - description = options.description - if options.description_file: - if options.description: - ErrorExit("Can't specify description and description_file") - file = open(options.description_file, 'r') - description = file.read() - file.close() - if description: - form_fields.append(("description", description)) - # Send a hash of all the base file so the server can determine if a copy - # already exists in an earlier patchset. - base_hashes = "" - for file, info in files.iteritems(): - if not info[0] is None: - checksum = md5.new(info[0]).hexdigest() - if base_hashes: - base_hashes += "|" - base_hashes += checksum + ":" + file - form_fields.append(("base_hashes", base_hashes)) - # If we're uploading base files, don't send the email before the uploads, so - # that it contains the file status. - if options.send_mail and options.download_base: - form_fields.append(("send_mail", "1")) - if not options.download_base: - form_fields.append(("content_upload", "1")) - if len(data) > MAX_UPLOAD_SIZE: - print "Patch is large, so uploading file patches separately." - uploaded_diff_file = [] - form_fields.append(("separate_patches", "1")) - else: - uploaded_diff_file = [("data", "data.diff", data)] - ctype, body = EncodeMultipartFormData(form_fields, uploaded_diff_file) - response_body = rpc_server.Send("/upload", body, content_type=ctype) - patchset = None - if not options.download_base or not uploaded_diff_file: - lines = response_body.splitlines() - if len(lines) >= 2: - msg = lines[0] - patchset = lines[1].strip() - patches = [x.split(" ", 1) for x in lines[2:]] - else: - msg = response_body - else: - msg = response_body - StatusUpdate(msg) - if not response_body.startswith("Issue created.") and \ - not response_body.startswith("Issue updated."): - sys.exit(0) - issue = msg[msg.rfind("/")+1:] - - if not uploaded_diff_file: - result = UploadSeparatePatches(issue, rpc_server, patchset, data, options) - if not options.download_base: - patches = result - - if not options.download_base: - vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files) - if options.send_mail: - rpc_server.Send("/" + issue + "/mail", payload="") - return issue, patchset - - -def main(): - try: - RealMain(sys.argv) - except KeyboardInterrupt: - print - StatusUpdate("Interrupted.") - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload_gmock.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload_gmock.py deleted file mode 100755 index 5dc484b3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/scripts/upload_gmock.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""upload_gmock.py v0.1.0 -- uploads a Google Mock patch for review. - -This simple wrapper passes all command line flags and ---cc=googlemock@googlegroups.com to upload.py. - -USAGE: upload_gmock.py [options for upload.py] -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys - -CC_FLAG = '--cc=' -GMOCK_GROUP = 'googlemock@googlegroups.com' - - -def main(): - # Finds the path to upload.py, assuming it is in the same directory - # as this file. - my_dir = os.path.dirname(os.path.abspath(__file__)) - upload_py_path = os.path.join(my_dir, 'upload.py') - - # Adds Google Mock discussion group to the cc line if it's not there - # already. - upload_py_argv = [upload_py_path] - found_cc_flag = False - for arg in sys.argv[1:]: - if arg.startswith(CC_FLAG): - found_cc_flag = True - cc_line = arg[len(CC_FLAG):] - cc_list = [addr for addr in cc_line.split(',') if addr] - if GMOCK_GROUP not in cc_list: - cc_list.append(GMOCK_GROUP) - upload_py_argv.append(CC_FLAG + ','.join(cc_list)) - else: - upload_py_argv.append(arg) - - if not found_cc_flag: - upload_py_argv.append(CC_FLAG + GMOCK_GROUP) - - # Invokes upload.py with the modified command line flags. - os.execv(upload_py_path, upload_py_argv) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-all.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-all.cc deleted file mode 100644 index a14c397d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-all.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Google C++ Mocking Framework (Google Mock) -// -// This file #includes all Google Mock implementation .cc files. The -// purpose is to allow a user to build Google Mock by compiling this -// file alone. - -#include "src/gmock-cardinalities.cc" -#include "src/gmock-internal-utils.cc" -#include "src/gmock-matchers.cc" -#include "src/gmock-printers.cc" -#include "src/gmock-spec-builders.cc" -#include "src/gmock.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-cardinalities.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-cardinalities.cc deleted file mode 100644 index 07eed469..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-cardinalities.cc +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements cardinalities. - -#include - -#include -#include // NOLINT -#include -#include -#include -#include - -namespace testing { - -namespace { - -// Implements the Between(m, n) cardinality. -class BetweenCardinalityImpl : public CardinalityInterface { - public: - BetweenCardinalityImpl(int min, int max) - : min_(min >= 0 ? min : 0), - max_(max >= min_ ? max : min_) { - std::stringstream ss; - if (min < 0) { - ss << "The invocation lower bound must be >= 0, " - << "but is actually " << min << "."; - internal::Expect(false, __FILE__, __LINE__, ss.str()); - } else if (max < 0) { - ss << "The invocation upper bound must be >= 0, " - << "but is actually " << max << "."; - internal::Expect(false, __FILE__, __LINE__, ss.str()); - } else if (min > max) { - ss << "The invocation upper bound (" << max - << ") must be >= the invocation lower bound (" << min - << ")."; - internal::Expect(false, __FILE__, __LINE__, ss.str()); - } - } - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. - virtual int ConservativeLowerBound() const { return min_; } - virtual int ConservativeUpperBound() const { return max_; } - - virtual bool IsSatisfiedByCallCount(int call_count) const { - return min_ <= call_count && call_count <= max_ ; - } - - virtual bool IsSaturatedByCallCount(int call_count) const { - return call_count >= max_; - } - - virtual void DescribeTo(::std::ostream* os) const; - private: - const int min_; - const int max_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl); -}; - -// Formats "n times" in a human-friendly way. -inline internal::string FormatTimes(int n) { - if (n == 1) { - return "once"; - } else if (n == 2) { - return "twice"; - } else { - std::stringstream ss; - ss << n << " times"; - return ss.str(); - } -} - -// Describes the Between(m, n) cardinality in human-friendly text. -void BetweenCardinalityImpl::DescribeTo(::std::ostream* os) const { - if (min_ == 0) { - if (max_ == 0) { - *os << "never called"; - } else if (max_ == INT_MAX) { - *os << "called any number of times"; - } else { - *os << "called at most " << FormatTimes(max_); - } - } else if (min_ == max_) { - *os << "called " << FormatTimes(min_); - } else if (max_ == INT_MAX) { - *os << "called at least " << FormatTimes(min_); - } else { - // 0 < min_ < max_ < INT_MAX - *os << "called between " << min_ << " and " << max_ << " times"; - } -} - -} // Unnamed namespace - -// Describes the given call count to an ostream. -void Cardinality::DescribeActualCallCountTo(int actual_call_count, - ::std::ostream* os) { - if (actual_call_count > 0) { - *os << "called " << FormatTimes(actual_call_count); - } else { - *os << "never called"; - } -} - -// Creates a cardinality that allows at least n calls. -Cardinality AtLeast(int n) { return Between(n, INT_MAX); } - -// Creates a cardinality that allows at most n calls. -Cardinality AtMost(int n) { return Between(0, n); } - -// Creates a cardinality that allows any number of calls. -Cardinality AnyNumber() { return AtLeast(0); } - -// Creates a cardinality that allows between min and max calls. -Cardinality Between(int min, int max) { - return Cardinality(new BetweenCardinalityImpl(min, max)); -} - -// Creates a cardinality that allows exactly n calls. -Cardinality Exactly(int n) { return Between(n, n); } - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-internal-utils.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-internal-utils.cc deleted file mode 100644 index 0e693c70..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-internal-utils.cc +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file defines some utilities useful for implementing Google -// Mock. They are subject to change without notice, so please DO NOT -// USE THEM IN USER CODE. - -#include - -#include -#include // NOLINT -#include -#include -#include -#include - -namespace testing { -namespace internal { - -// Converts an identifier name to a space-separated list of lower-case -// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is -// treated as one word. For example, both "FooBar123" and -// "foo_bar_123" are converted to "foo bar 123". -string ConvertIdentifierNameToWords(const char* id_name) { - string result; - char prev_char = '\0'; - for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) { - // We don't care about the current locale as the input is - // guaranteed to be a valid C++ identifier name. - const bool starts_new_word = isupper(*p) || - (!isalpha(prev_char) && islower(*p)) || - (!isdigit(prev_char) && isdigit(*p)); - - if (isalnum(*p)) { - if (starts_new_word && result != "") - result += ' '; - result += tolower(*p); - } - } - return result; -} - -// This class reports Google Mock failures as Google Test failures. A -// user can define another class in a similar fashion if he intends to -// use Google Mock with a testing framework other than Google Test. -class GoogleTestFailureReporter : public FailureReporterInterface { - public: - virtual void ReportFailure(FailureType type, const char* file, int line, - const string& message) { - AssertHelper(type == FATAL ? TPRT_FATAL_FAILURE : TPRT_NONFATAL_FAILURE, - file, line, message.c_str()) = Message(); - if (type == FATAL) { - abort(); - } - } -}; - -// Returns the global failure reporter. Will create a -// GoogleTestFailureReporter and return it the first time called. -FailureReporterInterface* GetFailureReporter() { - // Points to the global failure reporter used by Google Mock. gcc - // guarantees that the following use of failure_reporter is - // thread-safe. We may need to add additional synchronization to - // protect failure_reporter if we port Google Mock to other - // compilers. - static FailureReporterInterface* const failure_reporter = - new GoogleTestFailureReporter(); - return failure_reporter; -} - -// Protects global resources (stdout in particular) used by Log(). -static Mutex g_log_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX); - -// Returns true iff a log with the given severity is visible according -// to the --gmock_verbose flag. -bool LogIsVisible(LogSeverity severity) { - if (GMOCK_FLAG(verbose) == kInfoVerbosity) { - // Always show the log if --gmock_verbose=info. - return true; - } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) { - // Always hide it if --gmock_verbose=error. - return false; - } else { - // If --gmock_verbose is neither "info" nor "error", we treat it - // as "warning" (its default value). - return severity == WARNING; - } -} - -// Prints the given message to stdout iff 'severity' >= the level -// specified by the --gmock_verbose flag. If stack_frames_to_skip >= -// 0, also prints the stack trace excluding the top -// stack_frames_to_skip frames. In opt mode, any positive -// stack_frames_to_skip is treated as 0, since we don't know which -// function calls will be inlined by the compiler and need to be -// conservative. -void Log(LogSeverity severity, const string& message, - int stack_frames_to_skip) { - if (!LogIsVisible(severity)) - return; - - // Ensures that logs from different threads don't interleave. - MutexLock l(&g_log_mutex); - - // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a - // macro. - - if (severity == WARNING) { - // Prints a GMOCK WARNING marker to make the warnings easily searchable. - std::cout << "\nGMOCK WARNING:"; - } - // Pre-pends a new-line to message if it doesn't start with one. - if (message.empty() || message[0] != '\n') { - std::cout << "\n"; - } - std::cout << message; - if (stack_frames_to_skip >= 0) { -#ifdef NDEBUG - // In opt mode, we have to be conservative and skip no stack frame. - const int actual_to_skip = 0; -#else - // In dbg mode, we can do what the caller tell us to do (plus one - // for skipping this function's stack frame). - const int actual_to_skip = stack_frames_to_skip + 1; -#endif // NDEBUG - - // Appends a new-line to message if it doesn't end with one. - if (!message.empty() && *message.rbegin() != '\n') { - std::cout << "\n"; - } - std::cout << "Stack trace:\n" - << ::testing::internal::GetCurrentOsStackTraceExceptTop( - ::testing::UnitTest::GetInstance(), actual_to_skip); - } - std::cout << ::std::flush; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-matchers.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-matchers.cc deleted file mode 100644 index 79b525d3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-matchers.cc +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements Matcher, Matcher, and -// utilities for defining matchers. - -#include -#include - -#include -#include -#include - -namespace testing { - -// Constructs a matcher that matches a const string& whose value is -// equal to s. -Matcher::Matcher(const internal::string& s) { - *this = Eq(s); -} - -// Constructs a matcher that matches a const string& whose value is -// equal to s. -Matcher::Matcher(const char* s) { - *this = Eq(internal::string(s)); -} - -// Constructs a matcher that matches a string whose value is equal to s. -Matcher::Matcher(const internal::string& s) { *this = Eq(s); } - -// Constructs a matcher that matches a string whose value is equal to s. -Matcher::Matcher(const char* s) { - *this = Eq(internal::string(s)); -} - -namespace internal { - -// Utilities for validating and formatting description strings in the -// MATCHER*() macros. - -// Returns the 0-based index of the given parameter in the -// NULL-terminated parameter array; if the parameter is "*", returns -// kTupleInterpolation; if it's not found in the list, returns -// kInvalidInterpolation. -int GetParamIndex(const char* param_names[], const string& param_name) { - if (param_name == "*") - return kTupleInterpolation; - - for (int i = 0; param_names[i] != NULL; i++) { - if (param_name == param_names[i]) - return i; - } - return kInvalidInterpolation; -} - -// If *pstr starts with the given prefix, modifies *pstr to be right -// past the prefix and returns true; otherwise leaves *pstr unchanged -// and returns false. None of pstr, *pstr, and prefix can be NULL. -bool SkipPrefix(const char* prefix, const char** pstr) { - const size_t prefix_len = strlen(prefix); - if (strncmp(*pstr, prefix, prefix_len) == 0) { - *pstr += prefix_len; - return true; - } - return false; -} - -// Helper function used by ValidateMatcherDescription() to format -// error messages. -string FormatMatcherDescriptionSyntaxError(const char* description, - const char* error_pos) { - ::std::stringstream ss; - ss << "Syntax error at index " << (error_pos - description) - << " in matcher description \"" << description << "\": "; - return ss.str(); -} - -// Parses a matcher description string and returns a vector of -// interpolations that appear in the string; generates non-fatal -// failures iff 'description' is an invalid matcher description. -// 'param_names' is a NULL-terminated array of parameter names in the -// order they appear in the MATCHER_P*() parameter list. -Interpolations ValidateMatcherDescription( - const char* param_names[], const char* description) { - Interpolations interps; - for (const char* p = description; *p != '\0';) { - if (SkipPrefix("%%", &p)) { - interps.push_back(Interpolation(p - 2, p, kPercentInterpolation)); - } else if (SkipPrefix("%(", &p)) { - const char* const q = strstr(p, ")s"); - if (q == NULL) { - // TODO(wan@google.com): change the source file location in - // the failure to point to where the MATCHER*() macro is used. - ADD_FAILURE() << FormatMatcherDescriptionSyntaxError(description, p - 2) - << "an interpolation must end with \")s\", " - << "but \"" << (p - 2) << "\" does not."; - } else { - const string param_name(p, q); - const int param_index = GetParamIndex(param_names, param_name); - if (param_index == kInvalidInterpolation) { - ADD_FAILURE() << FormatMatcherDescriptionSyntaxError(description, p) - << "\"" << param_name - << "\" is an invalid parameter name."; - } else { - interps.push_back(Interpolation(p - 2, q + 2, param_index)); - p = q + 2; - } - } - } else { - EXPECT_NE(*p, '%') << FormatMatcherDescriptionSyntaxError(description, p) - << "use \"%%\" instead of \"%\" to print \"%\"."; - ++p; - } - } - return interps; -} - -// Joins a vector of strings as if they are fields of a tuple; returns -// the joined string. -string JoinAsTuple(const Strings& fields) { - switch (fields.size()) { - case 0: - return ""; - case 1: - return fields[0]; - default: - string result = "(" + fields[0]; - for (size_t i = 1; i < fields.size(); i++) { - result += ", "; - result += fields[i]; - } - result += ")"; - return result; - } -} - -// Returns the actual matcher description, given the matcher name, -// user-supplied description template string, interpolations in the -// string, and the printed values of the matcher parameters. -string FormatMatcherDescription( - const char* matcher_name, const char* description, - const Interpolations& interp, const Strings& param_values) { - string result; - if (*description == '\0') { - // When the user supplies an empty description, we calculate one - // from the matcher name. - result = ConvertIdentifierNameToWords(matcher_name); - if (param_values.size() >= 1) - result += " " + JoinAsTuple(param_values); - } else { - // The end position of the last interpolation. - const char* last_interp_end = description; - for (size_t i = 0; i < interp.size(); i++) { - result.append(last_interp_end, interp[i].start_pos); - const int param_index = interp[i].param_index; - if (param_index == kTupleInterpolation) { - result += JoinAsTuple(param_values); - } else if (param_index == kPercentInterpolation) { - result += '%'; - } else if (param_index != kInvalidInterpolation) { - result += param_values[param_index]; - } - last_interp_end = interp[i].end_pos; - } - result += last_interp_end; - } - - return result; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-printers.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-printers.cc deleted file mode 100644 index 922a7b2d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-printers.cc +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements a universal value printer that can print a -// value of any type T: -// -// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); -// -// It uses the << operator when possible, and prints the bytes in the -// object otherwise. A user can override its behavior for a class -// type Foo by defining either operator<<(::std::ostream&, const Foo&) -// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that -// defines Foo. - -#include -#include -#include -#include // NOLINT -#include -#include - -namespace testing { - -namespace { - -using ::std::ostream; - -#ifdef _WIN32_WCE -#define snprintf _snprintf -#elif GTEST_OS_WINDOWS -#define snprintf _snprintf_s -#endif - -// Prints a segment of bytes in the given object. -void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, - size_t count, ostream* os) { - char text[5] = ""; - for (size_t i = 0; i != count; i++) { - const size_t j = start + i; - if (i != 0) { - // Organizes the bytes into groups of 2 for easy parsing by - // human. - if ((j % 2) == 0) { - *os << " "; - } - } - snprintf(text, sizeof(text), "%02X", obj_bytes[j]); - *os << text; - } -} - -// Prints the bytes in the given value to the given ostream. -void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, - ostream* os) { - // Tells the user how big the object is. - *os << count << "-byte object <"; - - const size_t kThreshold = 132; - const size_t kChunkSize = 64; - // If the object size is bigger than kThreshold, we'll have to omit - // some details by printing only the first and the last kChunkSize - // bytes. - // TODO(wan): let the user control the threshold using a flag. - if (count < kThreshold) { - PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); - } else { - PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os); - *os << " ... "; - // Rounds up to 2-byte boundary. - const size_t resume_pos = (count - kChunkSize + 1)/2*2; - PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os); - } - *os << ">"; -} - -} // namespace - -namespace internal2 { - -// Delegates to PrintBytesInObjectToImpl() to print the bytes in the -// given object. The delegation simplifies the implementation, which -// uses the << operator and thus is easier done outside of the -// ::testing::internal namespace, which contains a << operator that -// sometimes conflicts with the one in STL. -void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count, - ostream* os) { - PrintBytesInObjectToImpl(obj_bytes, count, os); -} - -} // namespace internal2 - -namespace internal { - -// Prints a wide char as a char literal without the quotes, escaping it -// when necessary. -static void PrintAsWideCharLiteralTo(wchar_t c, ostream* os) { - switch (c) { - case L'\0': - *os << "\\0"; - break; - case L'\'': - *os << "\\'"; - break; - case L'\?': - *os << "\\?"; - break; - case L'\\': - *os << "\\\\"; - break; - case L'\a': - *os << "\\a"; - break; - case L'\b': - *os << "\\b"; - break; - case L'\f': - *os << "\\f"; - break; - case L'\n': - *os << "\\n"; - break; - case L'\r': - *os << "\\r"; - break; - case L'\t': - *os << "\\t"; - break; - case L'\v': - *os << "\\v"; - break; - default: - // Checks whether c is printable or not. Printable characters are in - // the range [0x20,0x7E]. - // We test the value of c directly instead of calling isprint(), as - // isprint() is buggy on Windows mobile. - if (0x20 <= c && c <= 0x7E) { - *os << static_cast(c); - } else { - // Buffer size enough for the maximum number of digits and \0. - char text[2 * sizeof(unsigned long) + 1] = ""; - snprintf(text, sizeof(text), "%lX", static_cast(c)); - *os << "\\x" << text; - } - } -} - -// Prints a char as if it's part of a string literal, escaping it when -// necessary. -static void PrintAsWideStringLiteralTo(wchar_t c, ostream* os) { - switch (c) { - case L'\'': - *os << "'"; - break; - case L'"': - *os << "\\\""; - break; - default: - PrintAsWideCharLiteralTo(c, os); - } -} - -// Prints a char as a char literal without the quotes, escaping it -// when necessary. -static void PrintAsCharLiteralTo(char c, ostream* os) { - PrintAsWideCharLiteralTo(static_cast(c), os); -} - -// Prints a char as if it's part of a string literal, escaping it when -// necessary. -static void PrintAsStringLiteralTo(char c, ostream* os) { - PrintAsWideStringLiteralTo(static_cast(c), os); -} - -// Prints a char and its code. The '\0' char is printed as "'\\0'", -// other unprintable characters are also properly escaped using the -// standard C++ escape sequence. -void PrintCharTo(char c, int char_code, ostream* os) { - *os << "'"; - PrintAsCharLiteralTo(c, os); - *os << "'"; - if (c != '\0') - *os << " (" << char_code << ")"; -} - -// Prints a wchar_t as a symbol if it is printable or as its internal -// code otherwise and also as its decimal code (except for L'\0'). -// The L'\0' char is printed as "L'\\0'". The decimal code is printed -// as signed integer when wchar_t is implemented by the compiler -// as a signed type and is printed as an unsigned integer when wchar_t -// is implemented as an unsigned type. -void PrintTo(wchar_t wc, ostream* os) { - *os << "L'"; - PrintAsWideCharLiteralTo(wc, os); - *os << "'"; - if (wc != L'\0') { - // Type Int64 is used because it provides more storage than wchar_t thus - // when the compiler converts signed or unsigned implementation of wchar_t - // to Int64 it fills higher bits with either zeros or the sign bit - // passing it to operator <<() as either signed or unsigned integer. - *os << " (" << static_cast(wc) << ")"; - } -} - -// Prints the given array of characters to the ostream. -// The array starts at *begin, the length is len, it may include '\0' characters -// and may not be null-terminated. -static void PrintCharsAsStringTo(const char* begin, size_t len, ostream* os) { - *os << "\""; - for (size_t index = 0; index < len; ++index) { - PrintAsStringLiteralTo(begin[index], os); - } - *os << "\""; -} - -// Prints a (const) char array of 'len' elements, starting at address 'begin'. -void UniversalPrintArray(const char* begin, size_t len, ostream* os) { - PrintCharsAsStringTo(begin, len, os); -} - -// Prints the given array of wide characters to the ostream. -// The array starts at *begin, the length is len, it may include L'\0' -// characters and may not be null-terminated. -static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len, - ostream* os) { - *os << "L\""; - for (size_t index = 0; index < len; ++index) { - PrintAsWideStringLiteralTo(begin[index], os); - } - *os << "\""; -} - -// Prints the given C string to the ostream. -void PrintTo(const char* s, ostream* os) { - if (s == NULL) { - *os << "NULL"; - } else { - *os << implicit_cast(s) << " pointing to "; - PrintCharsAsStringTo(s, strlen(s), os); - } -} - -// MSVC compiler can be configured to define whar_t as a typedef -// of unsigned short. Defining an overload for const wchar_t* in that case -// would cause pointers to unsigned shorts be printed as wide strings, -// possibly accessing more memory than intended and causing invalid -// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when -// wchar_t is implemented as a native type. -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) -// Prints the given wide C string to the ostream. -void PrintTo(const wchar_t* s, ostream* os) { - if (s == NULL) { - *os << "NULL"; - } else { - *os << implicit_cast(s) << " pointing to "; - PrintWideCharsAsStringTo(s, wcslen(s), os); - } -} -#endif // wchar_t is native - -// Prints a ::string object. -#if GTEST_HAS_GLOBAL_STRING -void PrintStringTo(const ::string& s, ostream* os) { - PrintCharsAsStringTo(s.data(), s.size(), os); -} -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING -void PrintStringTo(const ::std::string& s, ostream* os) { - PrintCharsAsStringTo(s.data(), s.size(), os); -} -#endif // GTEST_HAS_STD_STRING - -// Prints a ::wstring object. -#if GTEST_HAS_GLOBAL_WSTRING -void PrintWideStringTo(const ::wstring& s, ostream* os) { - PrintWideCharsAsStringTo(s.data(), s.size(), os); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_WSTRING -void PrintWideStringTo(const ::std::wstring& s, ostream* os) { - PrintWideCharsAsStringTo(s.data(), s.size(), os); -} -#endif // GTEST_HAS_STD_WSTRING - -} // namespace internal - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-spec-builders.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-spec-builders.cc deleted file mode 100644 index 465e4d63..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock-spec-builders.cc +++ /dev/null @@ -1,453 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements the spec builder syntax (ON_CALL and -// EXPECT_CALL). - -#include - -#include -#include // NOLINT -#include -#include -#include -#include - -#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC -#include // NOLINT -#endif - -namespace testing { -namespace internal { - -// Protects the mock object registry (in class Mock), all function -// mockers, and all expectations. -Mutex g_gmock_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX); - -// Constructs an ExpectationBase object. -ExpectationBase::ExpectationBase(const char* file, int line) - : file_(file), - line_(line), - cardinality_specified_(false), - cardinality_(Exactly(1)), - call_count_(0), - retired_(false) { -} - -// Destructs an ExpectationBase object. -ExpectationBase::~ExpectationBase() {} - -// Explicitly specifies the cardinality of this expectation. Used by -// the subclasses to implement the .Times() clause. -void ExpectationBase::SpecifyCardinality(const Cardinality& cardinality) { - cardinality_specified_ = true; - cardinality_ = cardinality; -} - -// Retires all pre-requisites of this expectation. -void ExpectationBase::RetireAllPreRequisites() { - if (is_retired()) { - // We can take this short-cut as we never retire an expectation - // until we have retired all its pre-requisites. - return; - } - - for (ExpectationBaseSet::const_iterator it = - immediate_prerequisites_.begin(); - it != immediate_prerequisites_.end(); - ++it) { - ExpectationBase* const prerequisite = (*it).get(); - if (!prerequisite->is_retired()) { - prerequisite->RetireAllPreRequisites(); - prerequisite->Retire(); - } - } -} - -// Returns true iff all pre-requisites of this expectation have been -// satisfied. -// L >= g_gmock_mutex -bool ExpectationBase::AllPrerequisitesAreSatisfied() const { - g_gmock_mutex.AssertHeld(); - for (ExpectationBaseSet::const_iterator it = immediate_prerequisites_.begin(); - it != immediate_prerequisites_.end(); ++it) { - if (!(*it)->IsSatisfied() || - !(*it)->AllPrerequisitesAreSatisfied()) - return false; - } - return true; -} - -// Adds unsatisfied pre-requisites of this expectation to 'result'. -// L >= g_gmock_mutex -void ExpectationBase::FindUnsatisfiedPrerequisites( - ExpectationBaseSet* result) const { - g_gmock_mutex.AssertHeld(); - for (ExpectationBaseSet::const_iterator it = immediate_prerequisites_.begin(); - it != immediate_prerequisites_.end(); ++it) { - if ((*it)->IsSatisfied()) { - // If *it is satisfied and has a call count of 0, some of its - // pre-requisites may not be satisfied yet. - if ((*it)->call_count_ == 0) { - (*it)->FindUnsatisfiedPrerequisites(result); - } - } else { - // Now that we know *it is unsatisfied, we are not so interested - // in whether its pre-requisites are satisfied. Therefore we - // don't recursively call FindUnsatisfiedPrerequisites() here. - result->insert(*it); - } - } -} - -// Points to the implicit sequence introduced by a living InSequence -// object (if any) in the current thread or NULL. -ThreadLocal g_gmock_implicit_sequence; - -// Reports an uninteresting call (whose description is in msg) in the -// manner specified by 'reaction'. -void ReportUninterestingCall(CallReaction reaction, const string& msg) { - switch (reaction) { - case ALLOW: - Log(INFO, msg, 3); - break; - case WARN: - Log(WARNING, msg, 3); - break; - default: // FAIL - Expect(false, NULL, -1, msg); - } -} - -} // namespace internal - -// Class Mock. - -namespace { - -typedef std::set FunctionMockers; - -// The current state of a mock object. Such information is needed for -// detecting leaked mock objects and explicitly verifying a mock's -// expectations. -struct MockObjectState { - MockObjectState() - : first_used_file(NULL), first_used_line(-1), leakable(false) {} - - // Where in the source file an ON_CALL or EXPECT_CALL is first - // invoked on this mock object. - const char* first_used_file; - int first_used_line; - ::std::string first_used_test_case; - ::std::string first_used_test; - bool leakable; // true iff it's OK to leak the object. - FunctionMockers function_mockers; // All registered methods of the object. -}; - -// A global registry holding the state of all mock objects that are -// alive. A mock object is added to this registry the first time -// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It -// is removed from the registry in the mock object's destructor. -class MockObjectRegistry { - public: - // Maps a mock object (identified by its address) to its state. - typedef std::map StateMap; - - // This destructor will be called when a program exits, after all - // tests in it have been run. By then, there should be no mock - // object alive. Therefore we report any living object as test - // failure, unless the user explicitly asked us to ignore it. - ~MockObjectRegistry() { - using ::std::cout; - - if (!GMOCK_FLAG(catch_leaked_mocks)) - return; - - int leaked_count = 0; - for (StateMap::const_iterator it = states_.begin(); it != states_.end(); - ++it) { - if (it->second.leakable) // The user said it's fine to leak this object. - continue; - - // TODO(wan@google.com): Print the type of the leaked object. - // This can help the user identify the leaked object. - cout << "\n"; - const MockObjectState& state = it->second; - internal::FormatFileLocation( - state.first_used_file, state.first_used_line, &cout); - cout << " ERROR: this mock object"; - if (state.first_used_test != "") { - cout << " (used in test " << state.first_used_test_case << "." - << state.first_used_test << ")"; - } - cout << " should be deleted but never is. Its address is @" - << it->first << "."; - leaked_count++; - } - if (leaked_count > 0) { - cout << "\nERROR: " << leaked_count - << " leaked mock " << (leaked_count == 1 ? "object" : "objects") - << " found at program exit.\n"; - cout.flush(); - ::std::cerr.flush(); - // RUN_ALL_TESTS() has already returned when this destructor is - // called. Therefore we cannot use the normal Google Test - // failure reporting mechanism. - _exit(1); // We cannot call exit() as it is not reentrant and - // may already have been called. - } - } - - StateMap& states() { return states_; } - private: - StateMap states_; -}; - -// Protected by g_gmock_mutex. -MockObjectRegistry g_mock_object_registry; - -// Maps a mock object to the reaction Google Mock should have when an -// uninteresting method is called. Protected by g_gmock_mutex. -std::map g_uninteresting_call_reaction; - -// Sets the reaction Google Mock should have when an uninteresting -// method of the given mock object is called. -// L < g_gmock_mutex -void SetReactionOnUninterestingCalls(const void* mock_obj, - internal::CallReaction reaction) { - internal::MutexLock l(&internal::g_gmock_mutex); - g_uninteresting_call_reaction[mock_obj] = reaction; -} - -} // namespace - -// Tells Google Mock to allow uninteresting calls on the given mock -// object. -// L < g_gmock_mutex -void Mock::AllowUninterestingCalls(const void* mock_obj) { - SetReactionOnUninterestingCalls(mock_obj, internal::ALLOW); -} - -// Tells Google Mock to warn the user about uninteresting calls on the -// given mock object. -// L < g_gmock_mutex -void Mock::WarnUninterestingCalls(const void* mock_obj) { - SetReactionOnUninterestingCalls(mock_obj, internal::WARN); -} - -// Tells Google Mock to fail uninteresting calls on the given mock -// object. -// L < g_gmock_mutex -void Mock::FailUninterestingCalls(const void* mock_obj) { - SetReactionOnUninterestingCalls(mock_obj, internal::FAIL); -} - -// Tells Google Mock the given mock object is being destroyed and its -// entry in the call-reaction table should be removed. -// L < g_gmock_mutex -void Mock::UnregisterCallReaction(const void* mock_obj) { - internal::MutexLock l(&internal::g_gmock_mutex); - g_uninteresting_call_reaction.erase(mock_obj); -} - -// Returns the reaction Google Mock will have on uninteresting calls -// made on the given mock object. -// L < g_gmock_mutex -internal::CallReaction Mock::GetReactionOnUninterestingCalls( - const void* mock_obj) { - internal::MutexLock l(&internal::g_gmock_mutex); - return (g_uninteresting_call_reaction.count(mock_obj) == 0) ? - internal::WARN : g_uninteresting_call_reaction[mock_obj]; -} - -// Tells Google Mock to ignore mock_obj when checking for leaked mock -// objects. -// L < g_gmock_mutex -void Mock::AllowLeak(const void* mock_obj) { - internal::MutexLock l(&internal::g_gmock_mutex); - g_mock_object_registry.states()[mock_obj].leakable = true; -} - -// Verifies and clears all expectations on the given mock object. If -// the expectations aren't satisfied, generates one or more Google -// Test non-fatal failures and returns false. -// L < g_gmock_mutex -bool Mock::VerifyAndClearExpectations(void* mock_obj) { - internal::MutexLock l(&internal::g_gmock_mutex); - return VerifyAndClearExpectationsLocked(mock_obj); -} - -// Verifies all expectations on the given mock object and clears its -// default actions and expectations. Returns true iff the -// verification was successful. -// L < g_gmock_mutex -bool Mock::VerifyAndClear(void* mock_obj) { - internal::MutexLock l(&internal::g_gmock_mutex); - ClearDefaultActionsLocked(mock_obj); - return VerifyAndClearExpectationsLocked(mock_obj); -} - -// Verifies and clears all expectations on the given mock object. If -// the expectations aren't satisfied, generates one or more Google -// Test non-fatal failures and returns false. -// L >= g_gmock_mutex -bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) { - internal::g_gmock_mutex.AssertHeld(); - if (g_mock_object_registry.states().count(mock_obj) == 0) { - // No EXPECT_CALL() was set on the given mock object. - return true; - } - - // Verifies and clears the expectations on each mock method in the - // given mock object. - bool expectations_met = true; - FunctionMockers& mockers = - g_mock_object_registry.states()[mock_obj].function_mockers; - for (FunctionMockers::const_iterator it = mockers.begin(); - it != mockers.end(); ++it) { - if (!(*it)->VerifyAndClearExpectationsLocked()) { - expectations_met = false; - } - } - - // We don't clear the content of mockers, as they may still be - // needed by ClearDefaultActionsLocked(). - return expectations_met; -} - -// Registers a mock object and a mock method it owns. -// L < g_gmock_mutex -void Mock::Register(const void* mock_obj, - internal::UntypedFunctionMockerBase* mocker) { - internal::MutexLock l(&internal::g_gmock_mutex); - g_mock_object_registry.states()[mock_obj].function_mockers.insert(mocker); -} - -// Tells Google Mock where in the source code mock_obj is used in an -// ON_CALL or EXPECT_CALL. In case mock_obj is leaked, this -// information helps the user identify which object it is. -// L < g_gmock_mutex -void Mock::RegisterUseByOnCallOrExpectCall( - const void* mock_obj, const char* file, int line) { - internal::MutexLock l(&internal::g_gmock_mutex); - MockObjectState& state = g_mock_object_registry.states()[mock_obj]; - if (state.first_used_file == NULL) { - state.first_used_file = file; - state.first_used_line = line; - const TestInfo* const test_info = - UnitTest::GetInstance()->current_test_info(); - if (test_info != NULL) { - // TODO(wan@google.com): record the test case name when the - // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or - // TearDownTestCase(). - state.first_used_test_case = test_info->test_case_name(); - state.first_used_test = test_info->name(); - } - } -} - -// Unregisters a mock method; removes the owning mock object from the -// registry when the last mock method associated with it has been -// unregistered. This is called only in the destructor of -// FunctionMockerBase. -// L >= g_gmock_mutex -void Mock::UnregisterLocked(internal::UntypedFunctionMockerBase* mocker) { - internal::g_gmock_mutex.AssertHeld(); - for (MockObjectRegistry::StateMap::iterator it = - g_mock_object_registry.states().begin(); - it != g_mock_object_registry.states().end(); ++it) { - FunctionMockers& mockers = it->second.function_mockers; - if (mockers.erase(mocker) > 0) { - // mocker was in mockers and has been just removed. - if (mockers.empty()) { - g_mock_object_registry.states().erase(it); - } - return; - } - } -} - -// Clears all ON_CALL()s set on the given mock object. -// L >= g_gmock_mutex -void Mock::ClearDefaultActionsLocked(void* mock_obj) { - internal::g_gmock_mutex.AssertHeld(); - - if (g_mock_object_registry.states().count(mock_obj) == 0) { - // No ON_CALL() was set on the given mock object. - return; - } - - // Clears the default actions for each mock method in the given mock - // object. - FunctionMockers& mockers = - g_mock_object_registry.states()[mock_obj].function_mockers; - for (FunctionMockers::const_iterator it = mockers.begin(); - it != mockers.end(); ++it) { - (*it)->ClearDefaultActionsLocked(); - } - - // We don't clear the content of mockers, as they may still be - // needed by VerifyAndClearExpectationsLocked(). -} - -// Adds an expectation to a sequence. -void Sequence::AddExpectation( - const internal::linked_ptr& expectation) const { - if (*last_expectation_ != expectation) { - if (*last_expectation_ != NULL) { - expectation->immediate_prerequisites_.insert(*last_expectation_); - } - *last_expectation_ = expectation; - } -} - -// Creates the implicit sequence if there isn't one. -InSequence::InSequence() { - if (internal::g_gmock_implicit_sequence.get() == NULL) { - internal::g_gmock_implicit_sequence.set(new Sequence); - sequence_created_ = true; - } else { - sequence_created_ = false; - } -} - -// Deletes the implicit sequence if it was created by the constructor -// of this object. -InSequence::~InSequence() { - if (sequence_created_) { - delete internal::g_gmock_implicit_sequence.get(); - internal::g_gmock_implicit_sequence.set(NULL); - } -} - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock.cc deleted file mode 100644 index caafb015..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock.cc +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -namespace testing { - -// TODO(wan@google.com): support using environment variables to -// control the flag values, like what Google Test does. - -GMOCK_DEFINE_bool_(catch_leaked_mocks, true, - "true iff Google Mock should report leaked mock objects " - "as failures."); - -GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity, - "Controls how verbose Google Mock's output is." - " Valid values:\n" - " info - prints all messages.\n" - " warning - prints warnings and errors.\n" - " error - prints errors only."); - -namespace internal { - -// Parses a string as a command line flag. The string should have the -// format "--gmock_flag=value". When def_optional is true, the -// "=value" part can be omitted. -// -// Returns the value of the flag, or NULL if the parsing failed. -static const char* ParseGoogleMockFlagValue(const char* str, - const char* flag, - bool def_optional) { - // str and flag must not be NULL. - if (str == NULL || flag == NULL) return NULL; - - // The flag must start with "--gmock_". - const String flag_str = String::Format("--gmock_%s", flag); - const size_t flag_len = flag_str.GetLength(); - if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL; - - // Skips the flag name. - const char* flag_end = str + flag_len; - - // When def_optional is true, it's OK to not have a "=value" part. - if (def_optional && (flag_end[0] == '\0')) { - return flag_end; - } - - // If def_optional is true and there are more characters after the - // flag name, or if def_optional is false, there must be a '=' after - // the flag name. - if (flag_end[0] != '=') return NULL; - - // Returns the string after "=". - return flag_end + 1; -} - -// Parses a string for a Google Mock bool flag, in the form of -// "--gmock_flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -static bool ParseGoogleMockBoolFlag(const char* str, const char* flag, - bool* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseGoogleMockFlagValue(str, flag, true); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Converts the string value to a bool. - *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); - return true; -} - -// Parses a string for a Google Mock string flag, in the form of -// "--gmock_flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -static bool ParseGoogleMockStringFlag(const char* str, const char* flag, - String* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseGoogleMockFlagValue(str, flag, false); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Sets *value to the value of the flag. - *value = value_str; - return true; -} - -// The internal implementation of InitGoogleMock(). -// -// The type parameter CharType can be instantiated to either char or -// wchar_t. -template -void InitGoogleMockImpl(int* argc, CharType** argv) { - // Makes sure Google Test is initialized. InitGoogleTest() is - // idempotent, so it's fine if the user has already called it. - InitGoogleTest(argc, argv); - if (*argc <= 0) return; - - for (int i = 1; i != *argc; i++) { - const String arg_string = StreamableToString(argv[i]); - const char* const arg = arg_string.c_str(); - - // Do we see a Google Mock flag? - if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks", - &GMOCK_FLAG(catch_leaked_mocks)) || - ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose))) { - // Yes. Shift the remainder of the argv list left by one. Note - // that argv has (*argc + 1) elements, the last one always being - // NULL. The following loop moves the trailing NULL element as - // well. - for (int j = i; j != *argc; j++) { - argv[j] = argv[j + 1]; - } - - // Decrements the argument count. - (*argc)--; - - // We also need to decrement the iterator as we just removed - // an element. - i--; - } - } -} - -} // namespace internal - -// Initializes Google Mock. This must be called before running the -// tests. In particular, it parses a command line for the flags that -// Google Mock recognizes. Whenever a Google Mock flag is seen, it is -// removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Mock flag variables are -// updated. -// -// Since Google Test is needed for Google Mock to work, this function -// also initializes Google Test and parses its flags, if that hasn't -// been done. -void InitGoogleMock(int* argc, char** argv) { - internal::InitGoogleMockImpl(argc, argv); -} - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleMock(int* argc, wchar_t** argv) { - internal::InitGoogleMockImpl(argc, argv); -} - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock_main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock_main.cc deleted file mode 100644 index 85689d5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/src/gmock_main.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include -#include - -// MS C++ compiler/linker has a bug on Windows (not on Windows CE), which -// causes a link error when _tmain is defined in a static library and UNICODE -// is enabled. For this reason instead of _tmain, main function is used on -// Windows. See the following link to track the current status of this bug: -// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464 // NOLINT -#ifdef _WIN32_WCE -#include // NOLINT - -int _tmain(int argc, TCHAR** argv) { -#else -int main(int argc, char** argv) { -#endif // _WIN32_WCE - std::cout << "Running main() from gmock_main.cc\n"; - // Since Google Mock depends on Google Test, InitGoogleMock() is - // also responsible for initializing Google Test. Therefore there's - // no need for calling testing::InitGoogleTest() separately. - testing::InitGoogleMock(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-actions_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-actions_test.cc deleted file mode 100644 index 24462609..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-actions_test.cc +++ /dev/null @@ -1,1034 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the built-in actions. - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace { - -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::tr1::tuple_element; -using testing::internal::BuiltInDefaultValue; -using testing::internal::Int64; -using testing::internal::UInt64; -// This list should be kept sorted. -using testing::_; -using testing::Action; -using testing::ActionInterface; -using testing::Assign; -using testing::DefaultValue; -using testing::DoDefault; -using testing::IgnoreResult; -using testing::Invoke; -using testing::InvokeWithoutArgs; -using testing::MakePolymorphicAction; -using testing::Ne; -using testing::PolymorphicAction; -using testing::Return; -using testing::ReturnNull; -using testing::ReturnRef; -using testing::SetArgumentPointee; -using testing::SetArrayArgument; - -#ifndef _WIN32_WCE -using testing::SetErrnoAndReturn; -#endif // _WIN32_WCE - -#if GMOCK_HAS_PROTOBUF_ -using testing::internal::TestMessage; -#endif // GMOCK_HAS_PROTOBUF_ - -// Tests that BuiltInDefaultValue::Get() returns NULL. -TEST(BuiltInDefaultValueTest, IsNullForPointerTypes) { - EXPECT_TRUE(BuiltInDefaultValue::Get() == NULL); - EXPECT_TRUE(BuiltInDefaultValue::Get() == NULL); - EXPECT_TRUE(BuiltInDefaultValue::Get() == NULL); -} - -// Tests that BuiltInDefaultValue::Exists() return true. -TEST(BuiltInDefaultValueTest, ExistsForPointerTypes) { - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); -} - -// Tests that BuiltInDefaultValue::Get() returns 0 when T is a -// built-in numeric type. -TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) { - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); -#if !GTEST_OS_WINDOWS - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); -#endif // !GTEST_OS_WINDOWS - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); -} - -// Tests that BuiltInDefaultValue::Exists() returns true when T is a -// built-in numeric type. -TEST(BuiltInDefaultValueTest, ExistsForNumericTypes) { - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); -#if !GTEST_OS_WINDOWS - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); -#endif // !GTEST_OS_WINDOWS - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); - EXPECT_TRUE(BuiltInDefaultValue::Exists()); -} - -// Tests that BuiltInDefaultValue::Get() returns false. -TEST(BuiltInDefaultValueTest, IsFalseForBool) { - EXPECT_FALSE(BuiltInDefaultValue::Get()); -} - -// Tests that BuiltInDefaultValue::Exists() returns true. -TEST(BuiltInDefaultValueTest, BoolExists) { - EXPECT_TRUE(BuiltInDefaultValue::Exists()); -} - -// Tests that BuiltInDefaultValue::Get() returns "" when T is a -// string type. -TEST(BuiltInDefaultValueTest, IsEmptyStringForString) { -#if GTEST_HAS_GLOBAL_STRING - EXPECT_EQ("", BuiltInDefaultValue< ::string>::Get()); -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING - EXPECT_EQ("", BuiltInDefaultValue< ::std::string>::Get()); -#endif // GTEST_HAS_STD_STRING -} - -// Tests that BuiltInDefaultValue::Exists() returns true when T is a -// string type. -TEST(BuiltInDefaultValueTest, ExistsForString) { -#if GTEST_HAS_GLOBAL_STRING - EXPECT_TRUE(BuiltInDefaultValue< ::string>::Exists()); -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING - EXPECT_TRUE(BuiltInDefaultValue< ::std::string>::Exists()); -#endif // GTEST_HAS_STD_STRING -} - -// Tests that BuiltInDefaultValue::Get() returns the same -// value as BuiltInDefaultValue::Get() does. -TEST(BuiltInDefaultValueTest, WorksForConstTypes) { - EXPECT_EQ("", BuiltInDefaultValue::Get()); - EXPECT_EQ(0, BuiltInDefaultValue::Get()); - EXPECT_TRUE(BuiltInDefaultValue::Get() == NULL); - EXPECT_FALSE(BuiltInDefaultValue::Get()); -} - -// Tests that BuiltInDefaultValue::Get() aborts the program with -// the correct error message when T is a user-defined type. -struct UserType { - UserType() : value(0) {} - - int value; -}; - -TEST(BuiltInDefaultValueTest, UserTypeHasNoDefault) { - EXPECT_FALSE(BuiltInDefaultValue::Exists()); -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that BuiltInDefaultValue::Get() aborts the program. -TEST(BuiltInDefaultValueDeathTest, IsUndefinedForReferences) { - EXPECT_DEATH({ // NOLINT - BuiltInDefaultValue::Get(); - }, ""); - EXPECT_DEATH({ // NOLINT - BuiltInDefaultValue::Get(); - }, ""); -} - -TEST(BuiltInDefaultValueDeathTest, IsUndefinedForUserTypes) { - EXPECT_DEATH({ // NOLINT - BuiltInDefaultValue::Get(); - }, ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that DefaultValue::IsSet() is false initially. -TEST(DefaultValueTest, IsInitiallyUnset) { - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::IsSet()); -} - -// Tests that DefaultValue can be set and then unset. -TEST(DefaultValueTest, CanBeSetAndUnset) { - EXPECT_TRUE(DefaultValue::Exists()); - EXPECT_FALSE(DefaultValue::Exists()); - - DefaultValue::Set(1); - DefaultValue::Set(UserType()); - - EXPECT_EQ(1, DefaultValue::Get()); - EXPECT_EQ(0, DefaultValue::Get().value); - - EXPECT_TRUE(DefaultValue::Exists()); - EXPECT_TRUE(DefaultValue::Exists()); - - DefaultValue::Clear(); - DefaultValue::Clear(); - - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::IsSet()); - - EXPECT_TRUE(DefaultValue::Exists()); - EXPECT_FALSE(DefaultValue::Exists()); -} - -// Tests that DefaultValue::Get() returns the -// BuiltInDefaultValue::Get() when DefaultValue::IsSet() is -// false. -TEST(DefaultValueDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) { - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_TRUE(DefaultValue::Exists()); - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::Exists()); - - EXPECT_EQ(0, DefaultValue::Get()); - -#if GTEST_HAS_DEATH_TEST - EXPECT_DEATH({ // NOLINT - DefaultValue::Get(); - }, ""); -#endif // GTEST_HAS_DEATH_TEST -} - -// Tests that DefaultValue::Get() returns void. -TEST(DefaultValueTest, GetWorksForVoid) { - return DefaultValue::Get(); -} - -// Tests using DefaultValue with a reference type. - -// Tests that DefaultValue::IsSet() is false initially. -TEST(DefaultValueOfReferenceTest, IsInitiallyUnset) { - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::IsSet()); -} - -// Tests that DefaultValue::Exists is false initiallly. -TEST(DefaultValueOfReferenceTest, IsInitiallyNotExisting) { - EXPECT_FALSE(DefaultValue::Exists()); - EXPECT_FALSE(DefaultValue::Exists()); -} - -// Tests that DefaultValue can be set and then unset. -TEST(DefaultValueOfReferenceTest, CanBeSetAndUnset) { - int n = 1; - DefaultValue::Set(n); - UserType u; - DefaultValue::Set(u); - - EXPECT_TRUE(DefaultValue::Exists()); - EXPECT_TRUE(DefaultValue::Exists()); - - EXPECT_EQ(&n, &(DefaultValue::Get())); - EXPECT_EQ(&u, &(DefaultValue::Get())); - - DefaultValue::Clear(); - DefaultValue::Clear(); - - EXPECT_FALSE(DefaultValue::Exists()); - EXPECT_FALSE(DefaultValue::Exists()); - - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::IsSet()); -} - -// Tests that DefaultValue::Get() returns the -// BuiltInDefaultValue::Get() when DefaultValue::IsSet() is -// false. -TEST(DefaultValueOfReferenceDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) { - EXPECT_FALSE(DefaultValue::IsSet()); - EXPECT_FALSE(DefaultValue::IsSet()); - -#if GTEST_HAS_DEATH_TEST - EXPECT_DEATH({ // NOLINT - DefaultValue::Get(); - }, ""); - EXPECT_DEATH({ // NOLINT - DefaultValue::Get(); - }, ""); -#endif // GTEST_HAS_DEATH_TEST -} - -// Tests that ActionInterface can be implemented by defining the -// Perform method. - -typedef int MyFunction(bool, int); - -class MyActionImpl : public ActionInterface { - public: - virtual int Perform(const tuple& args) { - return get<0>(args) ? get<1>(args) : 0; - } -}; - -TEST(ActionInterfaceTest, CanBeImplementedByDefiningPerform) { - MyActionImpl my_action_impl; - - EXPECT_FALSE(my_action_impl.IsDoDefault()); -} - -TEST(ActionInterfaceTest, MakeAction) { - Action action = MakeAction(new MyActionImpl); - - // When exercising the Perform() method of Action, we must pass - // it a tuple whose size and type are compatible with F's argument - // types. For example, if F is int(), then Perform() takes a - // 0-tuple; if F is void(bool, int), then Perform() takes a - // tuple, and so on. - EXPECT_EQ(5, action.Perform(make_tuple(true, 5))); -} - -// Tests that Action can be contructed from a pointer to -// ActionInterface. -TEST(ActionTest, CanBeConstructedFromActionInterface) { - Action action(new MyActionImpl); -} - -// Tests that Action delegates actual work to ActionInterface. -TEST(ActionTest, DelegatesWorkToActionInterface) { - const Action action(new MyActionImpl); - - EXPECT_EQ(5, action.Perform(make_tuple(true, 5))); - EXPECT_EQ(0, action.Perform(make_tuple(false, 1))); -} - -// Tests that Action can be copied. -TEST(ActionTest, IsCopyable) { - Action a1(new MyActionImpl); - Action a2(a1); // Tests the copy constructor. - - // a1 should continue to work after being copied from. - EXPECT_EQ(5, a1.Perform(make_tuple(true, 5))); - EXPECT_EQ(0, a1.Perform(make_tuple(false, 1))); - - // a2 should work like the action it was copied from. - EXPECT_EQ(5, a2.Perform(make_tuple(true, 5))); - EXPECT_EQ(0, a2.Perform(make_tuple(false, 1))); - - a2 = a1; // Tests the assignment operator. - - // a1 should continue to work after being copied from. - EXPECT_EQ(5, a1.Perform(make_tuple(true, 5))); - EXPECT_EQ(0, a1.Perform(make_tuple(false, 1))); - - // a2 should work like the action it was copied from. - EXPECT_EQ(5, a2.Perform(make_tuple(true, 5))); - EXPECT_EQ(0, a2.Perform(make_tuple(false, 1))); -} - -// Tests that an Action object can be converted to a -// compatible Action object. - -class IsNotZero : public ActionInterface { // NOLINT - public: - virtual bool Perform(const tuple& arg) { - return get<0>(arg) != 0; - } -}; - -TEST(ActionTest, CanBeConvertedToOtherActionType) { - const Action a1(new IsNotZero); // NOLINT - const Action a2 = Action(a1); // NOLINT - EXPECT_EQ(1, a2.Perform(make_tuple('a'))); - EXPECT_EQ(0, a2.Perform(make_tuple('\0'))); -} - -// The following two classes are for testing MakePolymorphicAction(). - -// Implements a polymorphic action that returns the second of the -// arguments it receives. -class ReturnSecondArgumentAction { - public: - // We want to verify that MakePolymorphicAction() can work with a - // polymorphic action whose Perform() method template is either - // const or not. This lets us verify the non-const case. - template - Result Perform(const ArgumentTuple& args) { return get<1>(args); } -}; - -// Implements a polymorphic action that can be used in a nullary -// function to return 0. -class ReturnZeroFromNullaryFunctionAction { - public: - // For testing that MakePolymorphicAction() works when the - // implementation class' Perform() method template takes only one - // template parameter. - // - // We want to verify that MakePolymorphicAction() can work with a - // polymorphic action whose Perform() method template is either - // const or not. This lets us verify the const case. - template - Result Perform(const tuple<>&) const { return 0; } -}; - -// These functions verify that MakePolymorphicAction() returns a -// PolymorphicAction where T is the argument's type. - -PolymorphicAction ReturnSecondArgument() { - return MakePolymorphicAction(ReturnSecondArgumentAction()); -} - -PolymorphicAction -ReturnZeroFromNullaryFunction() { - return MakePolymorphicAction(ReturnZeroFromNullaryFunctionAction()); -} - -// Tests that MakePolymorphicAction() turns a polymorphic action -// implementation class into a polymorphic action. -TEST(MakePolymorphicActionTest, ConstructsActionFromImpl) { - Action a1 = ReturnSecondArgument(); // NOLINT - EXPECT_EQ(5, a1.Perform(make_tuple(false, 5, 2.0))); -} - -// Tests that MakePolymorphicAction() works when the implementation -// class' Perform() method template has only one template parameter. -TEST(MakePolymorphicActionTest, WorksWhenPerformHasOneTemplateParameter) { - Action a1 = ReturnZeroFromNullaryFunction(); - EXPECT_EQ(0, a1.Perform(make_tuple())); - - Action a2 = ReturnZeroFromNullaryFunction(); - EXPECT_TRUE(a2.Perform(make_tuple()) == NULL); -} - -// Tests that Return() works as an action for void-returning -// functions. -TEST(ReturnTest, WorksForVoid) { - const Action ret = Return(); // NOLINT - return ret.Perform(make_tuple(1)); -} - -// Tests that Return(v) returns v. -TEST(ReturnTest, ReturnsGivenValue) { - Action ret = Return(1); // NOLINT - EXPECT_EQ(1, ret.Perform(make_tuple())); - - ret = Return(-5); - EXPECT_EQ(-5, ret.Perform(make_tuple())); -} - -// Tests that Return("string literal") works. -TEST(ReturnTest, AcceptsStringLiteral) { - Action a1 = Return("Hello"); - EXPECT_STREQ("Hello", a1.Perform(make_tuple())); - - Action a2 = Return("world"); - EXPECT_EQ("world", a2.Perform(make_tuple())); -} - -// Tests that Return(v) is covaraint. - -struct Base { - bool operator==(const Base&) { return true; } -}; - -struct Derived : public Base { - bool operator==(const Derived&) { return true; } -}; - -TEST(ReturnTest, IsCovariant) { - Base base; - Derived derived; - Action ret = Return(&base); - EXPECT_EQ(&base, ret.Perform(make_tuple())); - - ret = Return(&derived); - EXPECT_EQ(&derived, ret.Perform(make_tuple())); -} - -// Tests that ReturnNull() returns NULL in a pointer-returning function. -TEST(ReturnNullTest, WorksInPointerReturningFunction) { - const Action a1 = ReturnNull(); - EXPECT_TRUE(a1.Perform(make_tuple()) == NULL); - - const Action a2 = ReturnNull(); // NOLINT - EXPECT_TRUE(a2.Perform(make_tuple(true)) == NULL); -} - -// Tests that ReturnRef(v) works for reference types. -TEST(ReturnRefTest, WorksForReference) { - const int n = 0; - const Action ret = ReturnRef(n); // NOLINT - - EXPECT_EQ(&n, &ret.Perform(make_tuple(true))); -} - -// Tests that ReturnRef(v) is covariant. -TEST(ReturnRefTest, IsCovariant) { - Base base; - Derived derived; - Action a = ReturnRef(base); - EXPECT_EQ(&base, &a.Perform(make_tuple())); - - a = ReturnRef(derived); - EXPECT_EQ(&derived, &a.Perform(make_tuple())); -} - -// Tests that DoDefault() does the default action for the mock method. - -class MyClass {}; - -class MockClass { - public: - MOCK_METHOD1(IntFunc, int(bool flag)); // NOLINT - MOCK_METHOD0(Foo, MyClass()); -}; - -// Tests that DoDefault() returns the built-in default value for the -// return type by default. -TEST(DoDefaultTest, ReturnsBuiltInDefaultValueByDefault) { - MockClass mock; - EXPECT_CALL(mock, IntFunc(_)) - .WillOnce(DoDefault()); - EXPECT_EQ(0, mock.IntFunc(true)); -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that DoDefault() aborts the process when there is no built-in -// default value for the return type. -TEST(DoDefaultDeathTest, DiesForUnknowType) { - MockClass mock; - EXPECT_CALL(mock, Foo()) - .WillRepeatedly(DoDefault()); - EXPECT_DEATH({ // NOLINT - mock.Foo(); - }, ""); -} - -// Tests that using DoDefault() inside a composite action leads to a -// run-time error. - -void VoidFunc(bool flag) {} - -TEST(DoDefaultDeathTest, DiesIfUsedInCompositeAction) { - MockClass mock; - EXPECT_CALL(mock, IntFunc(_)) - .WillRepeatedly(DoAll(Invoke(VoidFunc), - DoDefault())); - - // Ideally we should verify the error message as well. Sadly, - // EXPECT_DEATH() can only capture stderr, while Google Mock's - // errors are printed on stdout. Therefore we have to settle for - // not verifying the message. - EXPECT_DEATH({ // NOLINT - mock.IntFunc(true); - }, ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that DoDefault() returns the default value set by -// DefaultValue::Set() when it's not overriden by an ON_CALL(). -TEST(DoDefaultTest, ReturnsUserSpecifiedPerTypeDefaultValueWhenThereIsOne) { - DefaultValue::Set(1); - MockClass mock; - EXPECT_CALL(mock, IntFunc(_)) - .WillOnce(DoDefault()); - EXPECT_EQ(1, mock.IntFunc(false)); - DefaultValue::Clear(); -} - -// Tests that DoDefault() does the action specified by ON_CALL(). -TEST(DoDefaultTest, DoesWhatOnCallSpecifies) { - MockClass mock; - ON_CALL(mock, IntFunc(_)) - .WillByDefault(Return(2)); - EXPECT_CALL(mock, IntFunc(_)) - .WillOnce(DoDefault()); - EXPECT_EQ(2, mock.IntFunc(false)); -} - -// Tests that using DoDefault() in ON_CALL() leads to a run-time failure. -TEST(DoDefaultTest, CannotBeUsedInOnCall) { - MockClass mock; - EXPECT_NONFATAL_FAILURE({ // NOLINT - ON_CALL(mock, IntFunc(_)) - .WillByDefault(DoDefault()); - }, "DoDefault() cannot be used in ON_CALL()"); -} - -// Tests that SetArgumentPointee(v) sets the variable pointed to by -// the N-th (0-based) argument to v. -TEST(SetArgumentPointeeTest, SetsTheNthPointee) { - typedef void MyFunction(bool, int*, char*); - Action a = SetArgumentPointee<1>(2); - - int n = 0; - char ch = '\0'; - a.Perform(make_tuple(true, &n, &ch)); - EXPECT_EQ(2, n); - EXPECT_EQ('\0', ch); - - a = SetArgumentPointee<2>('a'); - n = 0; - ch = '\0'; - a.Perform(make_tuple(true, &n, &ch)); - EXPECT_EQ(0, n); - EXPECT_EQ('a', ch); -} - -#if GMOCK_HAS_PROTOBUF_ - -// Tests that SetArgumentPointee(proto_buffer) sets the v1 protobuf -// variable pointed to by the N-th (0-based) argument to proto_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, &dest)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgumentPointee(proto_buffer) sets the -// ::ProtocolMessage variable pointed to by the N-th (0-based) -// argument to proto_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) { - TestMessage* const msg = new TestMessage; - msg->set_member("yes"); - TestMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto_buffer) makes a copy of proto_buffer - // s.t. the action works even when the original proto_buffer has - // died. We ensure this behavior by deleting msg before using the - // action. - delete msg; - - TestMessage dest; - ::ProtocolMessage* const dest_base = &dest; - EXPECT_FALSE(orig_msg.Equals(dest)); - a.Perform(make_tuple(true, dest_base)); - EXPECT_TRUE(orig_msg.Equals(dest)); -} - -// Tests that SetArgumentPointee(proto2_buffer) sets the v2 -// protobuf variable pointed to by the N-th (0-based) argument to -// proto2_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - a.Perform(make_tuple(true, &dest)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -// Tests that SetArgumentPointee(proto2_buffer) sets the -// proto2::Message variable pointed to by the N-th (0-based) argument -// to proto2_buffer. -TEST(SetArgumentPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) { - using testing::internal::FooMessage; - FooMessage* const msg = new FooMessage; - msg->set_int_field(2); - msg->set_string_field("hi"); - FooMessage orig_msg; - orig_msg.CopyFrom(*msg); - - Action a = SetArgumentPointee<1>(*msg); - // SetArgumentPointee(proto2_buffer) makes a copy of - // proto2_buffer s.t. the action works even when the original - // proto2_buffer has died. We ensure this behavior by deleting msg - // before using the action. - delete msg; - - FooMessage dest; - dest.set_int_field(0); - ::proto2::Message* const dest_base = &dest; - a.Perform(make_tuple(true, dest_base)); - EXPECT_EQ(2, dest.int_field()); - EXPECT_EQ("hi", dest.string_field()); -} - -#endif // GMOCK_HAS_PROTOBUF_ - -// Tests that SetArrayArgument(first, last) sets the elements of the array -// pointed to by the N-th (0-based) argument to values in range [first, last). -TEST(SetArrayArgumentTest, SetsTheNthArray) { - typedef void MyFunction(bool, int*, char*); - int numbers[] = { 1, 2, 3 }; - Action a = SetArrayArgument<1>(numbers, numbers + 3); - - int n[4] = {}; - int* pn = n; - char ch[4] = {}; - char* pch = ch; - a.Perform(make_tuple(true, pn, pch)); - EXPECT_EQ(1, n[0]); - EXPECT_EQ(2, n[1]); - EXPECT_EQ(3, n[2]); - EXPECT_EQ(0, n[3]); - EXPECT_EQ('\0', ch[0]); - EXPECT_EQ('\0', ch[1]); - EXPECT_EQ('\0', ch[2]); - EXPECT_EQ('\0', ch[3]); - - // Tests first and last are iterators. - std::string letters = "abc"; - a = SetArrayArgument<2>(letters.begin(), letters.end()); - std::fill_n(n, 4, 0); - std::fill_n(ch, 4, '\0'); - a.Perform(make_tuple(true, pn, pch)); - EXPECT_EQ(0, n[0]); - EXPECT_EQ(0, n[1]); - EXPECT_EQ(0, n[2]); - EXPECT_EQ(0, n[3]); - EXPECT_EQ('a', ch[0]); - EXPECT_EQ('b', ch[1]); - EXPECT_EQ('c', ch[2]); - EXPECT_EQ('\0', ch[3]); -} - -// Tests SetArrayArgument(first, last) where first == last. -TEST(SetArrayArgumentTest, SetsTheNthArrayWithEmptyRange) { - typedef void MyFunction(bool, int*); - int numbers[] = { 1, 2, 3 }; - Action a = SetArrayArgument<1>(numbers, numbers); - - int n[4] = {}; - int* pn = n; - a.Perform(make_tuple(true, pn)); - EXPECT_EQ(0, n[0]); - EXPECT_EQ(0, n[1]); - EXPECT_EQ(0, n[2]); - EXPECT_EQ(0, n[3]); -} - -// Tests SetArrayArgument(first, last) where *first is convertible -// (but not equal) to the argument type. -TEST(SetArrayArgumentTest, SetsTheNthArrayWithConvertibleType) { - typedef void MyFunction(bool, char*); - int codes[] = { 97, 98, 99 }; - Action a = SetArrayArgument<1>(codes, codes + 3); - - char ch[4] = {}; - char* pch = ch; - a.Perform(make_tuple(true, pch)); - EXPECT_EQ('a', ch[0]); - EXPECT_EQ('b', ch[1]); - EXPECT_EQ('c', ch[2]); - EXPECT_EQ('\0', ch[3]); -} - -// Test SetArrayArgument(first, last) with iterator as argument. -TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument) { - typedef void MyFunction(bool, std::back_insert_iterator); - std::string letters = "abc"; - Action a = SetArrayArgument<1>(letters.begin(), letters.end()); - - std::string s; - a.Perform(make_tuple(true, back_inserter(s))); - EXPECT_EQ(letters, s); -} - -// Sample functions and functors for testing Invoke() and etc. -int Nullary() { return 1; } - -class NullaryFunctor { - public: - int operator()() { return 2; } -}; - -bool g_done = false; -void VoidNullary() { g_done = true; } - -class VoidNullaryFunctor { - public: - void operator()() { g_done = true; } -}; - -bool Unary(int x) { return x < 0; } - -const char* Plus1(const char* s) { return s + 1; } - -void VoidUnary(int n) { g_done = true; } - -bool ByConstRef(const std::string& s) { return s == "Hi"; } - -const double g_double = 0; -bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; } - -std::string ByNonConstRef(std::string& s) { return s += "+"; } // NOLINT - -struct UnaryFunctor { - int operator()(bool x) { return x ? 1 : -1; } -}; - -const char* Binary(const char* input, short n) { return input + n; } // NOLINT - -void VoidBinary(int, char) { g_done = true; } - -int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT - -void VoidTernary(int, char, bool) { g_done = true; } - -int SumOf4(int a, int b, int c, int d) { return a + b + c + d; } - -void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; } - -int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; } - -struct SumOf5Functor { - int operator()(int a, int b, int c, int d, int e) { - return a + b + c + d + e; - } -}; - -int SumOf6(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; -} - -struct SumOf6Functor { - int operator()(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; - } -}; - -class Foo { - public: - Foo() : value_(123) {} - - int Nullary() const { return value_; } - short Unary(long x) { return static_cast(value_ + x); } // NOLINT - std::string Binary(const std::string& str, char c) const { return str + c; } - int Ternary(int x, bool y, char z) { return value_ + x + y*z; } - int SumOf4(int a, int b, int c, int d) const { - return a + b + c + d + value_; - } - int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; } - int SumOf6(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; - } - private: - int value_; -}; - -// Tests InvokeWithoutArgs(function). -TEST(InvokeWithoutArgsTest, Function) { - // As an action that takes one argument. - Action a = InvokeWithoutArgs(Nullary); // NOLINT - EXPECT_EQ(1, a.Perform(make_tuple(2))); - - // As an action that takes two arguments. - Action a2 = InvokeWithoutArgs(Nullary); // NOLINT - EXPECT_EQ(1, a2.Perform(make_tuple(2, 3.5))); - - // As an action that returns void. - Action a3 = InvokeWithoutArgs(VoidNullary); // NOLINT - g_done = false; - a3.Perform(make_tuple(1)); - EXPECT_TRUE(g_done); -} - -// Tests InvokeWithoutArgs(functor). -TEST(InvokeWithoutArgsTest, Functor) { - // As an action that takes no argument. - Action a = InvokeWithoutArgs(NullaryFunctor()); // NOLINT - EXPECT_EQ(2, a.Perform(make_tuple())); - - // As an action that takes three arguments. - Action a2 = // NOLINT - InvokeWithoutArgs(NullaryFunctor()); - EXPECT_EQ(2, a2.Perform(make_tuple(3, 3.5, 'a'))); - - // As an action that returns void. - Action a3 = InvokeWithoutArgs(VoidNullaryFunctor()); - g_done = false; - a3.Perform(make_tuple()); - EXPECT_TRUE(g_done); -} - -// Tests InvokeWithoutArgs(obj_ptr, method). -TEST(InvokeWithoutArgsTest, Method) { - Foo foo; - Action a = // NOLINT - InvokeWithoutArgs(&foo, &Foo::Nullary); - EXPECT_EQ(123, a.Perform(make_tuple(true, 'a'))); -} - -// Tests using IgnoreResult() on a polymorphic action. -TEST(IgnoreResultTest, PolymorphicAction) { - Action a = IgnoreResult(Return(5)); // NOLINT - a.Perform(make_tuple(1)); -} - -// Tests using IgnoreResult() on a monomorphic action. - -int ReturnOne() { - g_done = true; - return 1; -} - -TEST(IgnoreResultTest, MonomorphicAction) { - g_done = false; - Action a = IgnoreResult(Invoke(ReturnOne)); - a.Perform(make_tuple()); - EXPECT_TRUE(g_done); -} - -// Tests using IgnoreResult() on an action that returns a class type. - -MyClass ReturnMyClass(double x) { - g_done = true; - return MyClass(); -} - -TEST(IgnoreResultTest, ActionReturningClass) { - g_done = false; - Action a = IgnoreResult(Invoke(ReturnMyClass)); // NOLINT - a.Perform(make_tuple(2)); - EXPECT_TRUE(g_done); -} - -TEST(AssignTest, Int) { - int x = 0; - Action a = Assign(&x, 5); - a.Perform(make_tuple(0)); - EXPECT_EQ(5, x); -} - -TEST(AssignTest, String) { - ::std::string x; - Action a = Assign(&x, "Hello, world"); - a.Perform(make_tuple()); - EXPECT_EQ("Hello, world", x); -} - -TEST(AssignTest, CompatibleTypes) { - double x = 0; - Action a = Assign(&x, 5); - a.Perform(make_tuple(0)); - EXPECT_DOUBLE_EQ(5, x); -} - -#ifndef _WIN32_WCE - -class SetErrnoAndReturnTest : public testing::Test { - protected: - virtual void SetUp() { errno = 0; } - virtual void TearDown() { errno = 0; } -}; - -TEST_F(SetErrnoAndReturnTest, Int) { - Action a = SetErrnoAndReturn(ENOTTY, -5); - EXPECT_EQ(-5, a.Perform(make_tuple())); - EXPECT_EQ(ENOTTY, errno); -} - -TEST_F(SetErrnoAndReturnTest, Ptr) { - int x; - Action a = SetErrnoAndReturn(ENOTTY, &x); - EXPECT_EQ(&x, a.Perform(make_tuple())); - EXPECT_EQ(ENOTTY, errno); -} - -TEST_F(SetErrnoAndReturnTest, CompatibleTypes) { - Action a = SetErrnoAndReturn(EINVAL, 5); - EXPECT_DOUBLE_EQ(5.0, a.Perform(make_tuple())); - EXPECT_EQ(EINVAL, errno); -} - -#endif // _WIN32_WCE - -} // Unnamed namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-cardinalities_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-cardinalities_test.cc deleted file mode 100644 index f3f1e106..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-cardinalities_test.cc +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the built-in cardinalities. - -#include -#include -#include - -namespace { - -using std::stringstream; -using testing::AnyNumber; -using testing::AtLeast; -using testing::AtMost; -using testing::Between; -using testing::Cardinality; -using testing::CardinalityInterface; -using testing::Exactly; -using testing::IsSubstring; -using testing::MakeCardinality; - -class MockFoo { - public: - MOCK_METHOD0(Bar, int()); // NOLINT -}; - -// Tests that Cardinality objects can be default constructed. -TEST(CardinalityTest, IsDefaultConstructable) { - Cardinality c; -} - -// Tests that Cardinality objects are copyable. -TEST(CardinalityTest, IsCopyable) { - // Tests the copy constructor. - Cardinality c = Exactly(1); - EXPECT_FALSE(c.IsSatisfiedByCallCount(0)); - EXPECT_TRUE(c.IsSatisfiedByCallCount(1)); - EXPECT_TRUE(c.IsSaturatedByCallCount(1)); - - // Tests the assignment operator. - c = Exactly(2); - EXPECT_FALSE(c.IsSatisfiedByCallCount(1)); - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_TRUE(c.IsSaturatedByCallCount(2)); -} - -TEST(CardinalityTest, IsOverSaturatedByCallCountWorks) { - const Cardinality c = AtMost(5); - EXPECT_FALSE(c.IsOverSaturatedByCallCount(4)); - EXPECT_FALSE(c.IsOverSaturatedByCallCount(5)); - EXPECT_TRUE(c.IsOverSaturatedByCallCount(6)); -} - -// Tests that Cardinality::DescribeActualCallCountTo() creates the -// correct description. -TEST(CardinalityTest, CanDescribeActualCallCount) { - stringstream ss0; - Cardinality::DescribeActualCallCountTo(0, &ss0); - EXPECT_EQ("never called", ss0.str()); - - stringstream ss1; - Cardinality::DescribeActualCallCountTo(1, &ss1); - EXPECT_EQ("called once", ss1.str()); - - stringstream ss2; - Cardinality::DescribeActualCallCountTo(2, &ss2); - EXPECT_EQ("called twice", ss2.str()); - - stringstream ss3; - Cardinality::DescribeActualCallCountTo(3, &ss3); - EXPECT_EQ("called 3 times", ss3.str()); -} - -// Tests AnyNumber() -TEST(AnyNumber, Works) { - const Cardinality c = AnyNumber(); - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(1)); - EXPECT_FALSE(c.IsSaturatedByCallCount(1)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(9)); - EXPECT_FALSE(c.IsSaturatedByCallCount(9)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "called any number of times", - ss.str()); -} - -TEST(AnyNumberTest, HasCorrectBounds) { - const Cardinality c = AnyNumber(); - EXPECT_EQ(0, c.ConservativeLowerBound()); - EXPECT_EQ(INT_MAX, c.ConservativeUpperBound()); -} - -// Tests AtLeast(n). - -TEST(AtLeastTest, OnNegativeNumber) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - AtLeast(-1); - }, "The invocation lower bound must be >= 0"); -} - -TEST(AtLeastTest, OnZero) { - const Cardinality c = AtLeast(0); - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(1)); - EXPECT_FALSE(c.IsSaturatedByCallCount(1)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "any number of times", - ss.str()); -} - -TEST(AtLeastTest, OnPositiveNumber) { - const Cardinality c = AtLeast(2); - EXPECT_FALSE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(1)); - EXPECT_FALSE(c.IsSaturatedByCallCount(1)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_FALSE(c.IsSaturatedByCallCount(2)); - - stringstream ss1; - AtLeast(1).DescribeTo(&ss1); - EXPECT_PRED_FORMAT2(IsSubstring, "at least once", - ss1.str()); - - stringstream ss2; - c.DescribeTo(&ss2); - EXPECT_PRED_FORMAT2(IsSubstring, "at least twice", - ss2.str()); - - stringstream ss3; - AtLeast(3).DescribeTo(&ss3); - EXPECT_PRED_FORMAT2(IsSubstring, "at least 3 times", - ss3.str()); -} - -TEST(AtLeastTest, HasCorrectBounds) { - const Cardinality c = AtLeast(2); - EXPECT_EQ(2, c.ConservativeLowerBound()); - EXPECT_EQ(INT_MAX, c.ConservativeUpperBound()); -} - -// Tests AtMost(n). - -TEST(AtMostTest, OnNegativeNumber) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - AtMost(-1); - }, "The invocation upper bound must be >= 0"); -} - -TEST(AtMostTest, OnZero) { - const Cardinality c = AtMost(0); - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_TRUE(c.IsSaturatedByCallCount(0)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(1)); - EXPECT_TRUE(c.IsSaturatedByCallCount(1)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "never called", - ss.str()); -} - -TEST(AtMostTest, OnPositiveNumber) { - const Cardinality c = AtMost(2); - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(1)); - EXPECT_FALSE(c.IsSaturatedByCallCount(1)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_TRUE(c.IsSaturatedByCallCount(2)); - - stringstream ss1; - AtMost(1).DescribeTo(&ss1); - EXPECT_PRED_FORMAT2(IsSubstring, "called at most once", - ss1.str()); - - stringstream ss2; - c.DescribeTo(&ss2); - EXPECT_PRED_FORMAT2(IsSubstring, "called at most twice", - ss2.str()); - - stringstream ss3; - AtMost(3).DescribeTo(&ss3); - EXPECT_PRED_FORMAT2(IsSubstring, "called at most 3 times", - ss3.str()); -} - -TEST(AtMostTest, HasCorrectBounds) { - const Cardinality c = AtMost(2); - EXPECT_EQ(0, c.ConservativeLowerBound()); - EXPECT_EQ(2, c.ConservativeUpperBound()); -} - -// Tests Between(m, n). - -TEST(BetweenTest, OnNegativeStart) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - Between(-1, 2); - }, "The invocation lower bound must be >= 0, but is actually -1"); -} - -TEST(BetweenTest, OnNegativeEnd) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - Between(1, -2); - }, "The invocation upper bound must be >= 0, but is actually -2"); -} - -TEST(BetweenTest, OnStartBiggerThanEnd) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - Between(2, 1); - }, "The invocation upper bound (1) must be >= " - "the invocation lower bound (2)"); -} - -TEST(BetweenTest, OnZeroStartAndZeroEnd) { - const Cardinality c = Between(0, 0); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_TRUE(c.IsSaturatedByCallCount(0)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(1)); - EXPECT_TRUE(c.IsSaturatedByCallCount(1)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "never called", - ss.str()); -} - -TEST(BetweenTest, OnZeroStartAndNonZeroEnd) { - const Cardinality c = Between(0, 2); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_TRUE(c.IsSaturatedByCallCount(2)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(4)); - EXPECT_TRUE(c.IsSaturatedByCallCount(4)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "called at most twice", - ss.str()); -} - -TEST(BetweenTest, OnSameStartAndEnd) { - const Cardinality c = Between(3, 3); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(2)); - EXPECT_FALSE(c.IsSaturatedByCallCount(2)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(3)); - EXPECT_TRUE(c.IsSaturatedByCallCount(3)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(4)); - EXPECT_TRUE(c.IsSaturatedByCallCount(4)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "called 3 times", - ss.str()); -} - -TEST(BetweenTest, OnDifferentStartAndEnd) { - const Cardinality c = Between(3, 5); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(2)); - EXPECT_FALSE(c.IsSaturatedByCallCount(2)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(3)); - EXPECT_FALSE(c.IsSaturatedByCallCount(3)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(5)); - EXPECT_TRUE(c.IsSaturatedByCallCount(5)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(6)); - EXPECT_TRUE(c.IsSaturatedByCallCount(6)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "called between 3 and 5 times", - ss.str()); -} - -TEST(BetweenTest, HasCorrectBounds) { - const Cardinality c = Between(3, 5); - EXPECT_EQ(3, c.ConservativeLowerBound()); - EXPECT_EQ(5, c.ConservativeUpperBound()); -} - -// Tests Exactly(n). - -TEST(ExactlyTest, OnNegativeNumber) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - Exactly(-1); - }, "The invocation lower bound must be >= 0"); -} - -TEST(ExactlyTest, OnZero) { - const Cardinality c = Exactly(0); - EXPECT_TRUE(c.IsSatisfiedByCallCount(0)); - EXPECT_TRUE(c.IsSaturatedByCallCount(0)); - - EXPECT_FALSE(c.IsSatisfiedByCallCount(1)); - EXPECT_TRUE(c.IsSaturatedByCallCount(1)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_PRED_FORMAT2(IsSubstring, "never called", - ss.str()); -} - -TEST(ExactlyTest, OnPositiveNumber) { - const Cardinality c = Exactly(2); - EXPECT_FALSE(c.IsSatisfiedByCallCount(0)); - EXPECT_FALSE(c.IsSaturatedByCallCount(0)); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_TRUE(c.IsSaturatedByCallCount(2)); - - stringstream ss1; - Exactly(1).DescribeTo(&ss1); - EXPECT_PRED_FORMAT2(IsSubstring, "called once", - ss1.str()); - - stringstream ss2; - c.DescribeTo(&ss2); - EXPECT_PRED_FORMAT2(IsSubstring, "called twice", - ss2.str()); - - stringstream ss3; - Exactly(3).DescribeTo(&ss3); - EXPECT_PRED_FORMAT2(IsSubstring, "called 3 times", - ss3.str()); -} - -TEST(ExactlyTest, HasCorrectBounds) { - const Cardinality c = Exactly(3); - EXPECT_EQ(3, c.ConservativeLowerBound()); - EXPECT_EQ(3, c.ConservativeUpperBound()); -} - -// Tests that a user can make his own cardinality by implementing -// CardinalityInterface and calling MakeCardinality(). - -class EvenCardinality : public CardinalityInterface { - public: - // Returns true iff call_count calls will satisfy this cardinality. - virtual bool IsSatisfiedByCallCount(int call_count) const { - return (call_count % 2 == 0); - } - - // Returns true iff call_count calls will saturate this cardinality. - virtual bool IsSaturatedByCallCount(int call_count) const { return false; } - - // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* ss) const { - *ss << "called even number of times"; - } -}; - -TEST(MakeCardinalityTest, ConstructsCardinalityFromInterface) { - const Cardinality c = MakeCardinality(new EvenCardinality); - - EXPECT_TRUE(c.IsSatisfiedByCallCount(2)); - EXPECT_FALSE(c.IsSatisfiedByCallCount(3)); - - EXPECT_FALSE(c.IsSaturatedByCallCount(10000)); - - stringstream ss; - c.DescribeTo(&ss); - EXPECT_EQ("called even number of times", ss.str()); -} - -} // Unnamed namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-actions_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-actions_test.cc deleted file mode 100644 index d0b2ddc9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-actions_test.cc +++ /dev/null @@ -1,1685 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the built-in actions generated by a script. - -#include - -#include -#include -#include -#include - -namespace testing { -namespace gmock_generated_actions_test { - -using ::std::plus; -using ::std::string; -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::tr1::tuple_element; -using testing::_; -using testing::Action; -using testing::ActionInterface; -using testing::ByRef; -using testing::DeleteArg; -using testing::DoAll; -using testing::Invoke; -using testing::InvokeArgument; -using testing::Return; -using testing::ReturnNew; -using testing::SaveArg; -using testing::SetArgReferee; -using testing::SetArgumentPointee; -using testing::StaticAssertTypeEq; -using testing::Unused; -using testing::WithArg; -using testing::WithArgs; -using testing::WithoutArgs; - -// Sample functions and functors for testing Invoke() and etc. -int Nullary() { return 1; } - -class NullaryFunctor { - public: - int operator()() { return 2; } -}; - -bool g_done = false; -void VoidNullary() { g_done = true; } - -class VoidNullaryFunctor { - public: - void operator()() { g_done = true; } -}; - -bool Unary(int x) { return x < 0; } - -const char* Plus1(const char* s) { return s + 1; } - -void VoidUnary(int n) { g_done = true; } - -bool ByConstRef(const string& s) { return s == "Hi"; } - -const double g_double = 0; -bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; } - -string ByNonConstRef(string& s) { return s += "+"; } // NOLINT - -struct UnaryFunctor { - int operator()(bool x) { return x ? 1 : -1; } -}; - -const char* Binary(const char* input, short n) { return input + n; } // NOLINT - -void VoidBinary(int, char) { g_done = true; } - -int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT - -void VoidTernary(int, char, bool) { g_done = true; } - -int SumOf4(int a, int b, int c, int d) { return a + b + c + d; } - -int SumOfFirst2(int a, int b, Unused, Unused) { return a + b; } - -void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; } - -string Concat4(const char* s1, const char* s2, const char* s3, - const char* s4) { - return string(s1) + s2 + s3 + s4; -} - -int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; } - -struct SumOf5Functor { - int operator()(int a, int b, int c, int d, int e) { - return a + b + c + d + e; - } -}; - -string Concat5(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5) { - return string(s1) + s2 + s3 + s4 + s5; -} - -int SumOf6(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; -} - -struct SumOf6Functor { - int operator()(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; - } -}; - -string Concat6(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6) { - return string(s1) + s2 + s3 + s4 + s5 + s6; -} - -string Concat7(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7; -} - -string Concat8(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8; -} - -string Concat9(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8, const char* s9) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9; -} - -string Concat10(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8, const char* s9, - const char* s10) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10; -} - -class Foo { - public: - Foo() : value_(123) {} - - int Nullary() const { return value_; } - - short Unary(long x) { return static_cast(value_ + x); } // NOLINT - - string Binary(const string& str, char c) const { return str + c; } - - int Ternary(int x, bool y, char z) { return value_ + x + y*z; } - - int SumOf4(int a, int b, int c, int d) const { - return a + b + c + d + value_; - } - - int SumOfLast2(Unused, Unused, int a, int b) const { return a + b; } - - int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; } - - int SumOf6(int a, int b, int c, int d, int e, int f) { - return a + b + c + d + e + f; - } - - string Concat7(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7; - } - - string Concat8(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8; - } - - string Concat9(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8, const char* s9) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9; - } - - string Concat10(const char* s1, const char* s2, const char* s3, - const char* s4, const char* s5, const char* s6, - const char* s7, const char* s8, const char* s9, - const char* s10) { - return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10; - } - private: - int value_; -}; - -// Tests using Invoke() with a nullary function. -TEST(InvokeTest, Nullary) { - Action a = Invoke(Nullary); // NOLINT - EXPECT_EQ(1, a.Perform(make_tuple())); -} - -// Tests using Invoke() with a unary function. -TEST(InvokeTest, Unary) { - Action a = Invoke(Unary); // NOLINT - EXPECT_FALSE(a.Perform(make_tuple(1))); - EXPECT_TRUE(a.Perform(make_tuple(-1))); -} - -// Tests using Invoke() with a binary function. -TEST(InvokeTest, Binary) { - Action a = Invoke(Binary); // NOLINT - const char* p = "Hello"; - EXPECT_EQ(p + 2, a.Perform(make_tuple(p, 2))); -} - -// Tests using Invoke() with a ternary function. -TEST(InvokeTest, Ternary) { - Action a = Invoke(Ternary); // NOLINT - EXPECT_EQ(6, a.Perform(make_tuple(1, '\2', 3))); -} - -// Tests using Invoke() with a 4-argument function. -TEST(InvokeTest, FunctionThatTakes4Arguments) { - Action a = Invoke(SumOf4); // NOLINT - EXPECT_EQ(1234, a.Perform(make_tuple(1000, 200, 30, 4))); -} - -// Tests using Invoke() with a 5-argument function. -TEST(InvokeTest, FunctionThatTakes5Arguments) { - Action a = Invoke(SumOf5); // NOLINT - EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5))); -} - -// Tests using Invoke() with a 6-argument function. -TEST(InvokeTest, FunctionThatTakes6Arguments) { - Action a = Invoke(SumOf6); // NOLINT - EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6))); -} - -// A helper that turns the type of a C-string literal from const -// char[N] to const char*. -inline const char* CharPtr(const char* s) { return s; } - -// Tests using Invoke() with a 7-argument function. -TEST(InvokeTest, FunctionThatTakes7Arguments) { - Action a = - Invoke(Concat7); - EXPECT_EQ("1234567", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7")))); -} - -// Tests using Invoke() with a 8-argument function. -TEST(InvokeTest, FunctionThatTakes8Arguments) { - Action a = - Invoke(Concat8); - EXPECT_EQ("12345678", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8")))); -} - -// Tests using Invoke() with a 9-argument function. -TEST(InvokeTest, FunctionThatTakes9Arguments) { - Action a = Invoke(Concat9); - EXPECT_EQ("123456789", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8"), CharPtr("9")))); -} - -// Tests using Invoke() with a 10-argument function. -TEST(InvokeTest, FunctionThatTakes10Arguments) { - Action a = Invoke(Concat10); - EXPECT_EQ("1234567890", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8"), CharPtr("9"), - CharPtr("0")))); -} - -// Tests using Invoke() with functions with parameters declared as Unused. -TEST(InvokeTest, FunctionWithUnusedParameters) { - Action a1 = - Invoke(SumOfFirst2); - EXPECT_EQ(12, a1.Perform(make_tuple(10, 2, 5.6, CharPtr("hi")))); - - Action a2 = - Invoke(SumOfFirst2); - EXPECT_EQ(23, a2.Perform(make_tuple(20, 3, true, static_cast(NULL)))); -} - -// Tests using Invoke() with methods with parameters declared as Unused. -TEST(InvokeTest, MethodWithUnusedParameters) { - Foo foo; - Action a1 = - Invoke(&foo, &Foo::SumOfLast2); - EXPECT_EQ(12, a1.Perform(make_tuple(CharPtr("hi"), true, 10, 2))); - - Action a2 = - Invoke(&foo, &Foo::SumOfLast2); - EXPECT_EQ(23, a2.Perform(make_tuple('a', 2.5, 20, 3))); -} - -// Tests using Invoke() with a functor. -TEST(InvokeTest, Functor) { - Action a = Invoke(plus()); // NOLINT - EXPECT_EQ(3, a.Perform(make_tuple(1, 2))); -} - -// Tests using Invoke(f) as an action of a compatible type. -TEST(InvokeTest, FunctionWithCompatibleType) { - Action a = Invoke(SumOf4); // NOLINT - EXPECT_EQ(4321, a.Perform(make_tuple(4000, 300, 20, true))); -} - -// Tests using Invoke() with an object pointer and a method pointer. - -// Tests using Invoke() with a nullary method. -TEST(InvokeMethodTest, Nullary) { - Foo foo; - Action a = Invoke(&foo, &Foo::Nullary); // NOLINT - EXPECT_EQ(123, a.Perform(make_tuple())); -} - -// Tests using Invoke() with a unary method. -TEST(InvokeMethodTest, Unary) { - Foo foo; - Action a = Invoke(&foo, &Foo::Unary); // NOLINT - EXPECT_EQ(4123, a.Perform(make_tuple(4000))); -} - -// Tests using Invoke() with a binary method. -TEST(InvokeMethodTest, Binary) { - Foo foo; - Action a = Invoke(&foo, &Foo::Binary); - string s("Hell"); - EXPECT_EQ("Hello", a.Perform(make_tuple(s, 'o'))); -} - -// Tests using Invoke() with a ternary method. -TEST(InvokeMethodTest, Ternary) { - Foo foo; - Action a = Invoke(&foo, &Foo::Ternary); // NOLINT - EXPECT_EQ(1124, a.Perform(make_tuple(1000, true, 1))); -} - -// Tests using Invoke() with a 4-argument method. -TEST(InvokeMethodTest, MethodThatTakes4Arguments) { - Foo foo; - Action a = Invoke(&foo, &Foo::SumOf4); // NOLINT - EXPECT_EQ(1357, a.Perform(make_tuple(1000, 200, 30, 4))); -} - -// Tests using Invoke() with a 5-argument method. -TEST(InvokeMethodTest, MethodThatTakes5Arguments) { - Foo foo; - Action a = Invoke(&foo, &Foo::SumOf5); // NOLINT - EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5))); -} - -// Tests using Invoke() with a 6-argument method. -TEST(InvokeMethodTest, MethodThatTakes6Arguments) { - Foo foo; - Action a = // NOLINT - Invoke(&foo, &Foo::SumOf6); - EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6))); -} - -// Tests using Invoke() with a 7-argument method. -TEST(InvokeMethodTest, MethodThatTakes7Arguments) { - Foo foo; - Action a = - Invoke(&foo, &Foo::Concat7); - EXPECT_EQ("1234567", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7")))); -} - -// Tests using Invoke() with a 8-argument method. -TEST(InvokeMethodTest, MethodThatTakes8Arguments) { - Foo foo; - Action a = - Invoke(&foo, &Foo::Concat8); - EXPECT_EQ("12345678", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8")))); -} - -// Tests using Invoke() with a 9-argument method. -TEST(InvokeMethodTest, MethodThatTakes9Arguments) { - Foo foo; - Action a = Invoke(&foo, &Foo::Concat9); - EXPECT_EQ("123456789", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8"), CharPtr("9")))); -} - -// Tests using Invoke() with a 10-argument method. -TEST(InvokeMethodTest, MethodThatTakes10Arguments) { - Foo foo; - Action a = Invoke(&foo, &Foo::Concat10); - EXPECT_EQ("1234567890", - a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"), - CharPtr("4"), CharPtr("5"), CharPtr("6"), - CharPtr("7"), CharPtr("8"), CharPtr("9"), - CharPtr("0")))); -} - -// Tests using Invoke(f) as an action of a compatible type. -TEST(InvokeMethodTest, MethodWithCompatibleType) { - Foo foo; - Action a = // NOLINT - Invoke(&foo, &Foo::SumOf4); - EXPECT_EQ(4444, a.Perform(make_tuple(4000, 300, 20, true))); -} - -// Tests ByRef(). - -// Tests that ReferenceWrapper is copyable. -TEST(ByRefTest, IsCopyable) { - const string s1 = "Hi"; - const string s2 = "Hello"; - - ::testing::internal::ReferenceWrapper ref_wrapper = ByRef(s1); - const string& r1 = ref_wrapper; - EXPECT_EQ(&s1, &r1); - - // Assigns a new value to ref_wrapper. - ref_wrapper = ByRef(s2); - const string& r2 = ref_wrapper; - EXPECT_EQ(&s2, &r2); - - ::testing::internal::ReferenceWrapper ref_wrapper1 = ByRef(s1); - // Copies ref_wrapper1 to ref_wrapper. - ref_wrapper = ref_wrapper1; - const string& r3 = ref_wrapper; - EXPECT_EQ(&s1, &r3); -} - -// Tests using ByRef() on a const value. -TEST(ByRefTest, ConstValue) { - const int n = 0; - // int& ref = ByRef(n); // This shouldn't compile - we have a - // negative compilation test to catch it. - const int& const_ref = ByRef(n); - EXPECT_EQ(&n, &const_ref); -} - -// Tests using ByRef() on a non-const value. -TEST(ByRefTest, NonConstValue) { - int n = 0; - - // ByRef(n) can be used as either an int&, - int& ref = ByRef(n); - EXPECT_EQ(&n, &ref); - - // or a const int&. - const int& const_ref = ByRef(n); - EXPECT_EQ(&n, &const_ref); -} - -struct Base { - bool operator==(const Base&) { return true; } -}; - -struct Derived : public Base { - bool operator==(const Derived&) { return true; } -}; - -// Tests explicitly specifying the type when using ByRef(). -TEST(ByRefTest, ExplicitType) { - int n = 0; - const int& r1 = ByRef(n); - EXPECT_EQ(&n, &r1); - - // ByRef(n); // This shouldn't compile - we have a negative - // compilation test to catch it. - - - Derived d; - Derived& r2 = ByRef(d); - EXPECT_EQ(&d, &r2); - - const Derived& r3 = ByRef(d); - EXPECT_EQ(&d, &r3); - - Base& r4 = ByRef(d); - EXPECT_EQ(&d, &r4); - - const Base& r5 = ByRef(d); - EXPECT_EQ(&d, &r5); - - // The following shouldn't compile - we have a negative compilation - // test for it. - // - // Base b; - // ByRef(b); -} - -// Tests InvokeArgument(...). - -// Tests using InvokeArgument with a nullary function. -TEST(InvokeArgumentTest, Function0) { - Action a = InvokeArgument<1>(); // NOLINT - EXPECT_EQ(1, a.Perform(make_tuple(2, &Nullary))); -} - -// Tests using InvokeArgument with a unary function. -TEST(InvokeArgumentTest, Functor1) { - Action a = InvokeArgument<0>(true); // NOLINT - EXPECT_EQ(1, a.Perform(make_tuple(UnaryFunctor()))); -} - -// Tests using InvokeArgument with a 5-ary function. -TEST(InvokeArgumentTest, Function5) { - Action a = // NOLINT - InvokeArgument<0>(10000, 2000, 300, 40, 5); - EXPECT_EQ(12345, a.Perform(make_tuple(&SumOf5))); -} - -// Tests using InvokeArgument with a 5-ary functor. -TEST(InvokeArgumentTest, Functor5) { - Action a = // NOLINT - InvokeArgument<0>(10000, 2000, 300, 40, 5); - EXPECT_EQ(12345, a.Perform(make_tuple(SumOf5Functor()))); -} - -// Tests using InvokeArgument with a 6-ary function. -TEST(InvokeArgumentTest, Function6) { - Action a = // NOLINT - InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6); - EXPECT_EQ(123456, a.Perform(make_tuple(&SumOf6))); -} - -// Tests using InvokeArgument with a 6-ary functor. -TEST(InvokeArgumentTest, Functor6) { - Action a = // NOLINT - InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6); - EXPECT_EQ(123456, a.Perform(make_tuple(SumOf6Functor()))); -} - -// Tests using InvokeArgument with a 7-ary function. -TEST(InvokeArgumentTest, Function7) { - Action a = - InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7"); - EXPECT_EQ("1234567", a.Perform(make_tuple(&Concat7))); -} - -// Tests using InvokeArgument with a 8-ary function. -TEST(InvokeArgumentTest, Function8) { - Action a = - InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8"); - EXPECT_EQ("12345678", a.Perform(make_tuple(&Concat8))); -} - -// Tests using InvokeArgument with a 9-ary function. -TEST(InvokeArgumentTest, Function9) { - Action a = - InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9"); - EXPECT_EQ("123456789", a.Perform(make_tuple(&Concat9))); -} - -// Tests using InvokeArgument with a 10-ary function. -TEST(InvokeArgumentTest, Function10) { - Action a = - InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0"); - EXPECT_EQ("1234567890", a.Perform(make_tuple(&Concat10))); -} - -// Tests using InvokeArgument with a function that takes a pointer argument. -TEST(InvokeArgumentTest, ByPointerFunction) { - Action a = // NOLINT - InvokeArgument<0>(static_cast("Hi"), 1); - EXPECT_STREQ("i", a.Perform(make_tuple(&Binary))); -} - -// Tests using InvokeArgument with a function that takes a const char* -// by passing it a C-string literal. -TEST(InvokeArgumentTest, FunctionWithCStringLiteral) { - Action a = // NOLINT - InvokeArgument<0>("Hi", 1); - EXPECT_STREQ("i", a.Perform(make_tuple(&Binary))); -} - -// Tests using InvokeArgument with a function that takes a const reference. -TEST(InvokeArgumentTest, ByConstReferenceFunction) { - Action a = // NOLINT - InvokeArgument<0>(string("Hi")); - // When action 'a' is constructed, it makes a copy of the temporary - // string object passed to it, so it's OK to use 'a' later, when the - // temporary object has already died. - EXPECT_TRUE(a.Perform(make_tuple(&ByConstRef))); -} - -// Tests using InvokeArgument with ByRef() and a function that takes a -// const reference. -TEST(InvokeArgumentTest, ByExplicitConstReferenceFunction) { - Action a = // NOLINT - InvokeArgument<0>(ByRef(g_double)); - // The above line calls ByRef() on a const value. - EXPECT_TRUE(a.Perform(make_tuple(&ReferencesGlobalDouble))); - - double x = 0; - a = InvokeArgument<0>(ByRef(x)); // This calls ByRef() on a non-const. - EXPECT_FALSE(a.Perform(make_tuple(&ReferencesGlobalDouble))); -} - -// Tests using WithoutArgs with an action that takes no argument. -TEST(WithoutArgsTest, NoArg) { - Action a = WithoutArgs(Invoke(Nullary)); // NOLINT - EXPECT_EQ(1, a.Perform(make_tuple(2))); -} - -// Tests using WithArgs and WithArg with an action that takes 1 argument. -TEST(WithArgsTest, OneArg) { - Action a = WithArgs<1>(Invoke(Unary)); // NOLINT - EXPECT_TRUE(a.Perform(make_tuple(1.5, -1))); - EXPECT_FALSE(a.Perform(make_tuple(1.5, 1))); - - // Also tests the synonym WithArg. - Action b = WithArg<1>(Invoke(Unary)); // NOLINT - EXPECT_TRUE(a.Perform(make_tuple(1.5, -1))); - EXPECT_FALSE(a.Perform(make_tuple(1.5, 1))); - -} - -// Tests using WithArgs with an action that takes 2 arguments. -TEST(WithArgsTest, TwoArgs) { - Action a = - WithArgs<0, 2>(Invoke(Binary)); - const char s[] = "Hello"; - EXPECT_EQ(s + 2, a.Perform(make_tuple(CharPtr(s), 0.5, 2))); -} - -// Tests using WithArgs with an action that takes 3 arguments. -TEST(WithArgsTest, ThreeArgs) { - Action a = // NOLINT - WithArgs<0, 2, 3>(Invoke(Ternary)); - EXPECT_EQ(123, a.Perform(make_tuple(100, 6.5, 20, 3))); -} - -// Tests using WithArgs with an action that takes 4 arguments. -TEST(WithArgsTest, FourArgs) { - Action a = - WithArgs<4, 3, 1, 0>(Invoke(Concat4)); - EXPECT_EQ("4310", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), 2.5, - CharPtr("3"), CharPtr("4")))); -} - -// Tests using WithArgs with an action that takes 5 arguments. -TEST(WithArgsTest, FiveArgs) { - Action a = - WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5)); - EXPECT_EQ("43210", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), - CharPtr("3"), CharPtr("4")))); -} - -// Tests using WithArgs with an action that takes 6 arguments. -TEST(WithArgsTest, SixArgs) { - Action a = - WithArgs<0, 1, 2, 2, 1, 0>(Invoke(Concat6)); - EXPECT_EQ("012210", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2")))); -} - -// Tests using WithArgs with an action that takes 7 arguments. -TEST(WithArgsTest, SevenArgs) { - Action a = - WithArgs<0, 1, 2, 3, 2, 1, 0>(Invoke(Concat7)); - EXPECT_EQ("0123210", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), - CharPtr("3")))); -} - -// Tests using WithArgs with an action that takes 8 arguments. -TEST(WithArgsTest, EightArgs) { - Action a = - WithArgs<0, 1, 2, 3, 0, 1, 2, 3>(Invoke(Concat8)); - EXPECT_EQ("01230123", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), - CharPtr("3")))); -} - -// Tests using WithArgs with an action that takes 9 arguments. -TEST(WithArgsTest, NineArgs) { - Action a = - WithArgs<0, 1, 2, 3, 1, 2, 3, 2, 3>(Invoke(Concat9)); - EXPECT_EQ("012312323", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), - CharPtr("3")))); -} - -// Tests using WithArgs with an action that takes 10 arguments. -TEST(WithArgsTest, TenArgs) { - Action a = - WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(Concat10)); - EXPECT_EQ("0123210123", - a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), - CharPtr("3")))); -} - -// Tests using WithArgs with an action that is not Invoke(). -class SubstractAction : public ActionInterface { // NOLINT - public: - virtual int Perform(const tuple& args) { - return get<0>(args) - get<1>(args); - } -}; - -TEST(WithArgsTest, NonInvokeAction) { - Action a = // NOLINT - WithArgs<2, 1>(MakeAction(new SubstractAction)); - EXPECT_EQ(8, a.Perform(make_tuple(CharPtr("hi"), 2, 10))); -} - -// Tests using WithArgs to pass all original arguments in the original order. -TEST(WithArgsTest, Identity) { - Action a = // NOLINT - WithArgs<0, 1, 2>(Invoke(Ternary)); - EXPECT_EQ(123, a.Perform(make_tuple(100, 20, 3))); -} - -// Tests using WithArgs with repeated arguments. -TEST(WithArgsTest, RepeatedArguments) { - Action a = // NOLINT - WithArgs<1, 1, 1, 1>(Invoke(SumOf4)); - EXPECT_EQ(4, a.Perform(make_tuple(false, 1, 10))); -} - -// Tests using WithArgs with reversed argument order. -TEST(WithArgsTest, ReversedArgumentOrder) { - Action a = // NOLINT - WithArgs<1, 0>(Invoke(Binary)); - const char s[] = "Hello"; - EXPECT_EQ(s + 2, a.Perform(make_tuple(2, CharPtr(s)))); -} - -// Tests using WithArgs with compatible, but not identical, argument types. -TEST(WithArgsTest, ArgsOfCompatibleTypes) { - Action a = // NOLINT - WithArgs<0, 1, 3>(Invoke(Ternary)); - EXPECT_EQ(123, a.Perform(make_tuple(100, 20, 5.6, 3))); -} - -// Tests using WithArgs with an action that returns void. -TEST(WithArgsTest, VoidAction) { - Action a = WithArgs<2, 1>(Invoke(VoidBinary)); - g_done = false; - a.Perform(make_tuple(1.5, 'a', 3)); - EXPECT_TRUE(g_done); -} - -// Tests DoAll(a1, a2). -TEST(DoAllTest, TwoActions) { - int n = 0; - Action a = DoAll(SetArgumentPointee<0>(1), // NOLINT - Return(2)); - EXPECT_EQ(2, a.Perform(make_tuple(&n))); - EXPECT_EQ(1, n); -} - -// Tests DoAll(a1, a2, a3). -TEST(DoAllTest, ThreeActions) { - int m = 0, n = 0; - Action a = DoAll(SetArgumentPointee<0>(1), // NOLINT - SetArgumentPointee<1>(2), - Return(3)); - EXPECT_EQ(3, a.Perform(make_tuple(&m, &n))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); -} - -// Tests DoAll(a1, a2, a3, a4). -TEST(DoAllTest, FourActions) { - int m = 0, n = 0; - char ch = '\0'; - Action a = // NOLINT - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - Return(3)); - EXPECT_EQ(3, a.Perform(make_tuple(&m, &n, &ch))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', ch); -} - -// Tests DoAll(a1, a2, a3, a4, a5). -TEST(DoAllTest, FiveActions) { - int m = 0, n = 0; - char a = '\0', b = '\0'; - Action action = // NOLINT - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); -} - -// Tests DoAll(a1, a2, ..., a6). -TEST(DoAllTest, SixActions) { - int m = 0, n = 0; - char a = '\0', b = '\0', c = '\0'; - Action action = // NOLINT - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - SetArgumentPointee<4>('c'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); -} - -// Tests DoAll(a1, a2, ..., a7). -TEST(DoAllTest, SevenActions) { - int m = 0, n = 0; - char a = '\0', b = '\0', c = '\0', d = '\0'; - Action action = // NOLINT - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - SetArgumentPointee<4>('c'), - SetArgumentPointee<5>('d'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); -} - -// Tests DoAll(a1, a2, ..., a8). -TEST(DoAllTest, EightActions) { - int m = 0, n = 0; - char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0'; - Action action = - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - SetArgumentPointee<4>('c'), - SetArgumentPointee<5>('d'), - SetArgumentPointee<6>('e'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); - EXPECT_EQ('e', e); -} - -// Tests DoAll(a1, a2, ..., a9). -TEST(DoAllTest, NineActions) { - int m = 0, n = 0; - char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0', f = '\0'; - Action action = - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - SetArgumentPointee<4>('c'), - SetArgumentPointee<5>('d'), - SetArgumentPointee<6>('e'), - SetArgumentPointee<7>('f'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); - EXPECT_EQ('e', e); - EXPECT_EQ('f', f); -} - -// Tests DoAll(a1, a2, ..., a10). -TEST(DoAllTest, TenActions) { - int m = 0, n = 0; - char a = '\0', b = '\0', c = '\0', d = '\0'; - char e = '\0', f = '\0', g = '\0'; - Action action = - DoAll(SetArgumentPointee<0>(1), - SetArgumentPointee<1>(2), - SetArgumentPointee<2>('a'), - SetArgumentPointee<3>('b'), - SetArgumentPointee<4>('c'), - SetArgumentPointee<5>('d'), - SetArgumentPointee<6>('e'), - SetArgumentPointee<7>('f'), - SetArgumentPointee<8>('g'), - Return(3)); - EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f, &g))); - EXPECT_EQ(1, m); - EXPECT_EQ(2, n); - EXPECT_EQ('a', a); - EXPECT_EQ('b', b); - EXPECT_EQ('c', c); - EXPECT_EQ('d', d); - EXPECT_EQ('e', e); - EXPECT_EQ('f', f); - EXPECT_EQ('g', g); -} - -// Tests the ACTION*() macro family. - -// Tests that ACTION() can define an action that doesn't reference the -// mock function arguments. -ACTION(Return5) { return 5; } - -TEST(ActionMacroTest, WorksWhenNotReferencingArguments) { - Action a1 = Return5(); - EXPECT_DOUBLE_EQ(5, a1.Perform(make_tuple())); - - Action a2 = Return5(); - EXPECT_EQ(5, a2.Perform(make_tuple(1, true))); -} - -// Tests that ACTION() can define an action that returns void. -ACTION(IncrementArg1) { (*arg1)++; } - -TEST(ActionMacroTest, WorksWhenReturningVoid) { - Action a1 = IncrementArg1(); - int n = 0; - a1.Perform(make_tuple(5, &n)); - EXPECT_EQ(1, n); -} - -// Tests that the body of ACTION() can reference the type of the -// argument. -ACTION(IncrementArg2) { - StaticAssertTypeEq(); - arg2_type temp = arg2; - (*temp)++; -} - -TEST(ActionMacroTest, CanReferenceArgumentType) { - Action a1 = IncrementArg2(); - int n = 0; - a1.Perform(make_tuple(5, false, &n)); - EXPECT_EQ(1, n); -} - -// Tests that the body of ACTION() can reference the argument tuple -// via args_type and args. -ACTION(Sum2) { - StaticAssertTypeEq< ::std::tr1::tuple, args_type>(); - args_type args_copy = args; - return get<0>(args_copy) + get<1>(args_copy); -} - -TEST(ActionMacroTest, CanReferenceArgumentTuple) { - Action a1 = Sum2(); - int dummy = 0; - EXPECT_EQ(11, a1.Perform(make_tuple(5, static_cast(6), &dummy))); -} - -// Tests that the body of ACTION() can reference the mock function -// type. -int Dummy(bool flag) { return flag? 1 : 0; } - -ACTION(InvokeDummy) { - StaticAssertTypeEq(); - function_type* fp = &Dummy; - return (*fp)(true); -} - -TEST(ActionMacroTest, CanReferenceMockFunctionType) { - Action a1 = InvokeDummy(); - EXPECT_EQ(1, a1.Perform(make_tuple(true))); - EXPECT_EQ(1, a1.Perform(make_tuple(false))); -} - -// Tests that the body of ACTION() can reference the mock function's -// return type. -ACTION(InvokeDummy2) { - StaticAssertTypeEq(); - return_type result = Dummy(true); - return result; -} - -TEST(ActionMacroTest, CanReferenceMockFunctionReturnType) { - Action a1 = InvokeDummy2(); - EXPECT_EQ(1, a1.Perform(make_tuple(true))); - EXPECT_EQ(1, a1.Perform(make_tuple(false))); -} - -// Tests that ACTION() works for arguments passed by const reference. -ACTION(ReturnAddrOfConstBoolReferenceArg) { - StaticAssertTypeEq(); - return &arg1; -} - -TEST(ActionMacroTest, WorksForConstReferenceArg) { - Action a = ReturnAddrOfConstBoolReferenceArg(); - const bool b = false; - EXPECT_EQ(&b, a.Perform(tuple(0, b))); -} - -// Tests that ACTION() works for arguments passed by non-const reference. -ACTION(ReturnAddrOfIntReferenceArg) { - StaticAssertTypeEq(); - return &arg0; -} - -TEST(ActionMacroTest, WorksForNonConstReferenceArg) { - Action a = ReturnAddrOfIntReferenceArg(); - int n = 0; - EXPECT_EQ(&n, a.Perform(tuple(n, true, 1))); -} - -// Tests that ACTION() can be used in a namespace. -namespace action_test { -ACTION(Sum) { return arg0 + arg1; } -} // namespace action_test - -TEST(ActionMacroTest, WorksInNamespace) { - Action a1 = action_test::Sum(); - EXPECT_EQ(3, a1.Perform(make_tuple(1, 2))); -} - -// Tests that the same ACTION definition works for mock functions with -// different argument numbers. -ACTION(PlusTwo) { return arg0 + 2; } - -TEST(ActionMacroTest, WorksForDifferentArgumentNumbers) { - Action a1 = PlusTwo(); - EXPECT_EQ(4, a1.Perform(make_tuple(2))); - - Action a2 = PlusTwo(); - int dummy; - EXPECT_DOUBLE_EQ(6, a2.Perform(make_tuple(4.0f, &dummy))); -} - -// Tests that ACTION_P can define a parameterized action. -ACTION_P(Plus, n) { return arg0 + n; } - -TEST(ActionPMacroTest, DefinesParameterizedAction) { - Action a1 = Plus(9); - EXPECT_EQ(10, a1.Perform(make_tuple(1, true))); -} - -// Tests that the body of ACTION_P can reference the argument types -// and the parameter type. -ACTION_P(TypedPlus, n) { - arg0_type t1 = arg0; - n_type t2 = n; - return t1 + t2; -} - -TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) { - Action a1 = TypedPlus(9); - EXPECT_EQ(10, a1.Perform(make_tuple(static_cast(1), true))); -} - -// Tests that a parameterized action can be used in any mock function -// whose type is compatible. -TEST(ActionPMacroTest, WorksInCompatibleMockFunction) { - Action a1 = Plus("tail"); - const std::string re = "re"; - EXPECT_EQ("retail", a1.Perform(make_tuple(re))); -} - -// Tests that we can use ACTION*() to define actions overloaded on the -// number of parameters. - -ACTION(OverloadedAction) { return arg0 ? arg1 : "hello"; } - -ACTION_P(OverloadedAction, default_value) { - return arg0 ? arg1 : default_value; -} - -ACTION_P2(OverloadedAction, true_value, false_value) { - return arg0 ? true_value : false_value; -} - -TEST(ActionMacroTest, CanDefineOverloadedActions) { - typedef Action MyAction; - - const MyAction a1 = OverloadedAction(); - EXPECT_STREQ("hello", a1.Perform(make_tuple(false, CharPtr("world")))); - EXPECT_STREQ("world", a1.Perform(make_tuple(true, CharPtr("world")))); - - const MyAction a2 = OverloadedAction("hi"); - EXPECT_STREQ("hi", a2.Perform(make_tuple(false, CharPtr("world")))); - EXPECT_STREQ("world", a2.Perform(make_tuple(true, CharPtr("world")))); - - const MyAction a3 = OverloadedAction("hi", "you"); - EXPECT_STREQ("hi", a3.Perform(make_tuple(true, CharPtr("world")))); - EXPECT_STREQ("you", a3.Perform(make_tuple(false, CharPtr("world")))); -} - -// Tests ACTION_Pn where n >= 3. - -ACTION_P3(Plus, m, n, k) { return arg0 + m + n + k; } - -TEST(ActionPnMacroTest, WorksFor3Parameters) { - Action a1 = Plus(100, 20, 3.4); - EXPECT_DOUBLE_EQ(3123.4, a1.Perform(make_tuple(3000, true))); - - Action a2 = Plus("tail", "-", ">"); - const std::string re = "re"; - EXPECT_EQ("retail->", a2.Perform(make_tuple(re))); -} - -ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; } - -TEST(ActionPnMacroTest, WorksFor4Parameters) { - Action a1 = Plus(1, 2, 3, 4); - EXPECT_EQ(10 + 1 + 2 + 3 + 4, a1.Perform(make_tuple(10))); -} - -ACTION_P5(Plus, p0, p1, p2, p3, p4) { return arg0 + p0 + p1 + p2 + p3 + p4; } - -TEST(ActionPnMacroTest, WorksFor5Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5, a1.Perform(make_tuple(10))); -} - -ACTION_P6(Plus, p0, p1, p2, p3, p4, p5) { - return arg0 + p0 + p1 + p2 + p3 + p4 + p5; -} - -TEST(ActionPnMacroTest, WorksFor6Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5, 6); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6, a1.Perform(make_tuple(10))); -} - -ACTION_P7(Plus, p0, p1, p2, p3, p4, p5, p6) { - return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6; -} - -TEST(ActionPnMacroTest, WorksFor7Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5, 6, 7); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7, a1.Perform(make_tuple(10))); -} - -ACTION_P8(Plus, p0, p1, p2, p3, p4, p5, p6, p7) { - return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7; -} - -TEST(ActionPnMacroTest, WorksFor8Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, a1.Perform(make_tuple(10))); -} - -ACTION_P9(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8) { - return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8; -} - -TEST(ActionPnMacroTest, WorksFor9Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, a1.Perform(make_tuple(10))); -} - -ACTION_P10(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param) { - arg0_type t0 = arg0; - last_param_type t9 = last_param; - return t0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + t9; -} - -TEST(ActionPnMacroTest, WorksFor10Parameters) { - Action a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10, - a1.Perform(make_tuple(10))); -} - -// Tests that the action body can promote the parameter types. - -ACTION_P2(PadArgument, prefix, suffix) { - // The following lines promote the two parameters to desired types. - std::string prefix_str(prefix); - char suffix_char(suffix); - return prefix_str + arg0 + suffix_char; -} - -TEST(ActionPnMacroTest, SimpleTypePromotion) { - Action no_promo = - PadArgument(std::string("foo"), 'r'); - Action promo = - PadArgument("foo", static_cast('r')); - EXPECT_EQ("foobar", no_promo.Perform(make_tuple(CharPtr("ba")))); - EXPECT_EQ("foobar", promo.Perform(make_tuple(CharPtr("ba")))); -} - -// Tests that we can partially restrict parameter types using a -// straight-forward pattern. - -// Defines a generic action that doesn't restrict the types of its -// parameters. -ACTION_P3(ConcatImpl, a, b, c) { - std::stringstream ss; - ss << a << b << c; - return ss.str(); -} - -// Next, we try to restrict that either the first parameter is a -// string, or the second parameter is an int. - -// Defines a partially specialized wrapper that restricts the first -// parameter to std::string. -template -// ConcatImplActionP3 is the class template ACTION_P3 uses to -// implement ConcatImpl. We shouldn't change the name as this -// pattern requires the user to use it directly. -ConcatImplActionP3 -Concat(const std::string& a, T1 b, T2 c) { - if (true) { - // This branch verifies that ConcatImpl() can be invoked without - // explicit template arguments. - return ConcatImpl(a, b, c); - } else { - // This branch verifies that ConcatImpl() can also be invoked with - // explicit template arguments. It doesn't really need to be - // executed as this is a compile-time verification. - return ConcatImpl(a, b, c); - } -} - -// Defines another partially specialized wrapper that restricts the -// second parameter to int. -template -ConcatImplActionP3 -Concat(T1 a, int b, T2 c) { - return ConcatImpl(a, b, c); -} - -TEST(ActionPnMacroTest, CanPartiallyRestrictParameterTypes) { - Action a1 = Concat("Hello", "1", 2); - EXPECT_EQ("Hello12", a1.Perform(make_tuple())); - - a1 = Concat(1, 2, 3); - EXPECT_EQ("123", a1.Perform(make_tuple())); -} - -// Verifies the type of an ACTION*. - -ACTION(DoFoo) {} -ACTION_P(DoFoo, p) {} -ACTION_P2(DoFoo, p0, p1) {} - -TEST(ActionPnMacroTest, TypesAreCorrect) { - // DoFoo() must be assignable to a DoFooAction variable. - DoFooAction a0 = DoFoo(); - - // DoFoo(1) must be assignable to a DoFooActionP variable. - DoFooActionP a1 = DoFoo(1); - - // DoFoo(p1, ..., pk) must be assignable to a DoFooActionPk - // variable, and so on. - DoFooActionP2 a2 = DoFoo(1, '2'); - PlusActionP3 a3 = Plus(1, 2, '3'); - PlusActionP4 a4 = Plus(1, 2, 3, '4'); - PlusActionP5 a5 = Plus(1, 2, 3, 4, '5'); - PlusActionP6 a6 = Plus(1, 2, 3, 4, 5, '6'); - PlusActionP7 a7 = - Plus(1, 2, 3, 4, 5, 6, '7'); - PlusActionP8 a8 = - Plus(1, 2, 3, 4, 5, 6, 7, '8'); - PlusActionP9 a9 = - Plus(1, 2, 3, 4, 5, 6, 7, 8, '9'); - PlusActionP10 a10 = - Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, '0'); -} - -// Tests that an ACTION_P*() action can be explicitly instantiated -// with reference-typed parameters. - -ACTION_P(Plus1, x) { return x; } -ACTION_P2(Plus2, x, y) { return x + y; } -ACTION_P3(Plus3, x, y, z) { return x + y + z; } -ACTION_P10(Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9; -} - -TEST(ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes) { - int x = 1, y = 2, z = 3; - const tuple<> empty = make_tuple(); - - Action a = Plus1(x); - EXPECT_EQ(1, a.Perform(empty)); - - a = Plus2(x, y); - EXPECT_EQ(3, a.Perform(empty)); - - a = Plus3(x, y, z); - EXPECT_EQ(6, a.Perform(empty)); - - int n[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - a = Plus10(n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7], - n[8], n[9]); - EXPECT_EQ(55, a.Perform(empty)); -} - -TEST(SaveArgActionTest, WorksForSameType) { - int result = 0; - const Action a1 = SaveArg<0>(&result); - a1.Perform(make_tuple(5)); - EXPECT_EQ(5, result); -} - -TEST(SaveArgActionTest, WorksForCompatibleType) { - int result = 0; - const Action a1 = SaveArg<1>(&result); - a1.Perform(make_tuple(true, 'a')); - EXPECT_EQ('a', result); -} - -TEST(SetArgRefereeActionTest, WorksForSameType) { - int value = 0; - const Action a1 = SetArgReferee<0>(1); - a1.Perform(tuple(value)); - EXPECT_EQ(1, value); -} - -TEST(SetArgRefereeActionTest, WorksForCompatibleType) { - int value = 0; - const Action a1 = SetArgReferee<1>('a'); - a1.Perform(tuple(0, value)); - EXPECT_EQ('a', value); -} - -TEST(SetArgRefereeActionTest, WorksWithExtraArguments) { - int value = 0; - const Action a1 = SetArgReferee<2>('a'); - a1.Perform(tuple(true, 0, value, "hi")); - EXPECT_EQ('a', value); -} - -class NullaryConstructorClass { - public: - NullaryConstructorClass() : value_(123) {} - int value_; -}; - -// Tests using ReturnNew() with a nullary constructor. -TEST(ReturnNewTest, NoArgs) { - Action a = ReturnNew(); - NullaryConstructorClass* c = a.Perform(make_tuple()); - EXPECT_EQ(123, c->value_); - delete c; -} - -class UnaryConstructorClass { - public: - explicit UnaryConstructorClass(int value) : value_(value) {} - int value_; -}; - -// Tests using ReturnNew() with a unary constructor. -TEST(ReturnNewTest, Unary) { - Action a = ReturnNew(4000); - UnaryConstructorClass* c = a.Perform(make_tuple()); - EXPECT_EQ(4000, c->value_); - delete c; -} - -TEST(ReturnNewTest, UnaryWorksWhenMockMethodHasArgs) { - Action a = - ReturnNew(4000); - UnaryConstructorClass* c = a.Perform(make_tuple(false, 5)); - EXPECT_EQ(4000, c->value_); - delete c; -} - -TEST(ReturnNewTest, UnaryWorksWhenMockMethodReturnsPointerToConst) { - Action a = - ReturnNew(4000); - const UnaryConstructorClass* c = a.Perform(make_tuple()); - EXPECT_EQ(4000, c->value_); - delete c; -} - -class TenArgConstructorClass { - public: - TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5, - int a6, int a7, int a8, int a9, int a10) - : value_(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10) { - } - int value_; -}; - -// Tests using ReturnNew() with a 10-argument constructor. -TEST(ReturnNewTest, ConstructorThatTakes10Arguments) { - Action a = - ReturnNew(1000000000, 200000000, 30000000, - 4000000, 500000, 60000, - 7000, 800, 90, 0); - TenArgConstructorClass* c = a.Perform(make_tuple()); - EXPECT_EQ(1234567890, c->value_); - delete c; -} - -// A class that can be used to verify that its destructor is called: it will set -// the bool provided to the constructor to true when destroyed. -class DeletionTester { - public: - explicit DeletionTester(bool* is_deleted) - : is_deleted_(is_deleted) { - // Make sure the bit is set to false. - *is_deleted_ = false; - } - - ~DeletionTester() { - *is_deleted_ = true; - } - - private: - bool* is_deleted_; -}; - -TEST(DeleteArgActionTest, OneArg) { - bool is_deleted = false; - DeletionTester* t = new DeletionTester(&is_deleted); - const Action a1 = DeleteArg<0>(); // NOLINT - EXPECT_FALSE(is_deleted); - a1.Perform(make_tuple(t)); - EXPECT_TRUE(is_deleted); -} - -TEST(DeleteArgActionTest, TenArgs) { - bool is_deleted = false; - DeletionTester* t = new DeletionTester(&is_deleted); - const Action a1 = DeleteArg<9>(); - EXPECT_FALSE(is_deleted); - a1.Perform(make_tuple(true, 5, 6, CharPtr("hi"), false, 7, 8, 9, 10, t)); - EXPECT_TRUE(is_deleted); -} - -#if GTEST_HAS_EXCEPTIONS - -TEST(ThrowActionTest, ThrowsGivenExceptionInVoidFunction) { - const Action a = Throw('a'); - EXPECT_THROW(a.Perform(make_tuple(0)), char); -} - -class MyException {}; - -TEST(ThrowActionTest, ThrowsGivenExceptionInNonVoidFunction) { - const Action a = Throw(MyException()); - EXPECT_THROW(a.Perform(make_tuple('0')), MyException); -} - -TEST(ThrowActionTest, ThrowsGivenExceptionInNullaryFunction) { - const Action a = Throw(MyException()); - EXPECT_THROW(a.Perform(make_tuple()), MyException); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests that ACTION_TEMPLATE works when there is no value parameter. -ACTION_TEMPLATE(CreateNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_0_VALUE_PARAMS()) { - return new T; -} - -TEST(ActionTemplateTest, WorksWithoutValueParam) { - const Action a = CreateNew(); - int* p = a.Perform(make_tuple()); - delete p; -} - -// Tests that ACTION_TEMPLATE works when there are value parameters. -ACTION_TEMPLATE(CreateNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_1_VALUE_PARAMS(a0)) { - return new T(a0); -} - -TEST(ActionTemplateTest, WorksWithValueParams) { - const Action a = CreateNew(42); - int* p = a.Perform(make_tuple()); - EXPECT_EQ(42, *p); - delete p; -} - -// Tests that ACTION_TEMPLATE works for integral template parameters. -ACTION_TEMPLATE(MyDeleteArg, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { - delete std::tr1::get(args); -} - -// Resets a bool variable in the destructor. -class BoolResetter { - public: - explicit BoolResetter(bool* value) : value_(value) {} - ~BoolResetter() { *value_ = false; } - private: - bool* const value_; -}; - -TEST(ActionTemplateTest, WorksForIntegralTemplateParams) { - const Action a = MyDeleteArg<1>(); - int n = 0; - bool b = true; - BoolResetter* resetter = new BoolResetter(&b); - a.Perform(make_tuple(&n, resetter)); - EXPECT_FALSE(b); // Verifies that resetter is deleted. -} - -// Tests that ACTION_TEMPLATES works for template template parameters. -ACTION_TEMPLATE(ReturnSmartPointer, - HAS_1_TEMPLATE_PARAMS(template class, - Pointer), - AND_1_VALUE_PARAMS(pointee)) { - return Pointer(new pointee_type(pointee)); -} - -TEST(ActionTemplateTest, WorksForTemplateTemplateParameters) { - using ::testing::internal::linked_ptr; - const Action()> a = ReturnSmartPointer(42); - linked_ptr p = a.Perform(make_tuple()); - EXPECT_EQ(42, *p); -} - -// Tests that ACTION_TEMPLATE works for 10 template parameters. -template -struct GiantTemplate { - public: - explicit GiantTemplate(int a_value) : value(a_value) {} - int value; -}; - -ACTION_TEMPLATE(ReturnGiant, - HAS_10_TEMPLATE_PARAMS( - typename, T1, - typename, T2, - typename, T3, - int, k4, - bool, k5, - unsigned int, k6, - class, T7, - class, T8, - class, T9, - template class, T10), - AND_1_VALUE_PARAMS(value)) { - return GiantTemplate, T2, T3, k4, k5, k6, T7, T8, T9>(value); -} - -TEST(ActionTemplateTest, WorksFor10TemplateParameters) { - using ::testing::internal::linked_ptr; - typedef GiantTemplate, bool, double, 5, - true, 6, char, unsigned, int> Giant; - const Action a = ReturnGiant< - int, bool, double, 5, true, 6, char, unsigned, int, linked_ptr>(42); - Giant giant = a.Perform(make_tuple()); - EXPECT_EQ(42, giant.value); -} - -// Tests that ACTION_TEMPLATE works for 10 value parameters. -ACTION_TEMPLATE(ReturnSum, - HAS_1_TEMPLATE_PARAMS(typename, Number), - AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)) { - return static_cast(v1) + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10; -} - -TEST(ActionTemplateTest, WorksFor10ValueParameters) { - const Action a = ReturnSum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - EXPECT_EQ(55, a.Perform(make_tuple())); -} - -// Tests that ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded -// on the number of value parameters. - -ACTION(ReturnSum) { return 0; } - -ACTION_P(ReturnSum, x) { return x; } - -ACTION_TEMPLATE(ReturnSum, - HAS_1_TEMPLATE_PARAMS(typename, Number), - AND_2_VALUE_PARAMS(v1, v2)) { - return static_cast(v1) + v2; -} - -ACTION_TEMPLATE(ReturnSum, - HAS_1_TEMPLATE_PARAMS(typename, Number), - AND_3_VALUE_PARAMS(v1, v2, v3)) { - return static_cast(v1) + v2 + v3; -} - -ACTION_TEMPLATE(ReturnSum, - HAS_2_TEMPLATE_PARAMS(typename, Number, int, k), - AND_4_VALUE_PARAMS(v1, v2, v3, v4)) { - return static_cast(v1) + v2 + v3 + v4 + k; -} - -TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) { - const Action a0 = ReturnSum(); - const Action a1 = ReturnSum(1); - const Action a2 = ReturnSum(1, 2); - const Action a3 = ReturnSum(1, 2, 3); - const Action a4 = ReturnSum(2000, 300, 40, 5); - EXPECT_EQ(0, a0.Perform(make_tuple())); - EXPECT_EQ(1, a1.Perform(make_tuple())); - EXPECT_EQ(3, a2.Perform(make_tuple())); - EXPECT_EQ(6, a3.Perform(make_tuple())); - EXPECT_EQ(12345, a4.Perform(make_tuple())); -} - -} // namespace gmock_generated_actions_test -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-function-mockers_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-function-mockers_test.cc deleted file mode 100644 index 7267c10e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-function-mockers_test.cc +++ /dev/null @@ -1,466 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the function mocker classes. - -#include - -#include -#include -#include -#include - -#if GTEST_OS_WINDOWS -// MSDN says the header file to be included for STDMETHOD is BaseTyps.h but -// we are getting compiler errors if we use basetyps.h, hence including -// objbase.h for definition of STDMETHOD. -#include -#endif // GTEST_OS_WINDOWS - -// There is a bug in MSVC (fixed in VS 2008) that prevents creating a -// mock for a function with const arguments, so we don't test such -// cases for MSVC versions older than 2008. -#if !GTEST_OS_WINDOWS || (_MSC_VER >= 1500) -#define GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS -#endif // !GTEST_OS_WINDOWS || (_MSC_VER >= 1500) - -namespace testing { -namespace gmock_generated_function_mockers_test { - -using testing::internal::string; -using testing::_; -using testing::A; -using testing::An; -using testing::AnyNumber; -using testing::Const; -using testing::DoDefault; -using testing::Eq; -using testing::Lt; -using testing::Ref; -using testing::Return; -using testing::ReturnRef; -using testing::TypedEq; - -class FooInterface { - public: - virtual ~FooInterface() {} - - virtual void VoidReturning(int x) = 0; - - virtual int Nullary() = 0; - virtual bool Unary(int x) = 0; - virtual long Binary(short x, int y) = 0; // NOLINT - virtual int Decimal(bool b, char c, short d, int e, long f, // NOLINT - float g, double h, unsigned i, char* j, const string& k) - = 0; - - virtual bool TakesNonConstReference(int& n) = 0; // NOLINT - virtual string TakesConstReference(const int& n) = 0; -#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS - virtual bool TakesConst(const int x) = 0; -#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS - - virtual int OverloadedOnArgumentNumber() = 0; - virtual int OverloadedOnArgumentNumber(int n) = 0; - - virtual int OverloadedOnArgumentType(int n) = 0; - virtual char OverloadedOnArgumentType(char c) = 0; - - virtual int OverloadedOnConstness() = 0; - virtual char OverloadedOnConstness() const = 0; - - virtual int TypeWithHole(int (*func)()) = 0; - virtual int TypeWithComma(const std::map& a_map) = 0; - -#if GTEST_OS_WINDOWS - STDMETHOD_(int, CTNullary)() = 0; - STDMETHOD_(bool, CTUnary)(int x) = 0; - STDMETHOD_(int, CTDecimal)(bool b, char c, short d, int e, long f, // NOLINT - float g, double h, unsigned i, char* j, const string& k) = 0; - STDMETHOD_(char, CTConst)(int x) const = 0; -#endif // GTEST_OS_WINDOWS -}; - -class MockFoo : public FooInterface { - public: - // Makes sure that a mock function parameter can be named. - MOCK_METHOD1(VoidReturning, void(int n)); // NOLINT - - MOCK_METHOD0(Nullary, int()); // NOLINT - - // Makes sure that a mock function parameter can be unnamed. - MOCK_METHOD1(Unary, bool(int)); // NOLINT - MOCK_METHOD2(Binary, long(short, int)); // NOLINT - MOCK_METHOD10(Decimal, int(bool, char, short, int, long, float, // NOLINT - double, unsigned, char*, const string& str)); - - MOCK_METHOD1(TakesNonConstReference, bool(int&)); // NOLINT - MOCK_METHOD1(TakesConstReference, string(const int&)); -#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS - MOCK_METHOD1(TakesConst, bool(const int)); // NOLINT -#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS - MOCK_METHOD0(OverloadedOnArgumentNumber, int()); // NOLINT - MOCK_METHOD1(OverloadedOnArgumentNumber, int(int)); // NOLINT - - MOCK_METHOD1(OverloadedOnArgumentType, int(int)); // NOLINT - MOCK_METHOD1(OverloadedOnArgumentType, char(char)); // NOLINT - - MOCK_METHOD0(OverloadedOnConstness, int()); // NOLINT - MOCK_CONST_METHOD0(OverloadedOnConstness, char()); // NOLINT - - MOCK_METHOD1(TypeWithHole, int(int (*)())); // NOLINT - MOCK_METHOD1(TypeWithComma, int(const std::map&)); // NOLINT -#if GTEST_OS_WINDOWS - MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, CTNullary, int()); - MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTUnary, bool(int)); - MOCK_METHOD10_WITH_CALLTYPE(STDMETHODCALLTYPE, CTDecimal, int(bool b, char c, - short d, int e, long f, float g, double h, unsigned i, char* j, - const string& k)); - MOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, CTConst, char(int)); -#endif // GTEST_OS_WINDOWS -}; - -class FunctionMockerTest : public testing::Test { - protected: - FunctionMockerTest() : foo_(&mock_foo_) {} - - FooInterface* const foo_; - MockFoo mock_foo_; -}; - -// Tests mocking a void-returning function. -TEST_F(FunctionMockerTest, MocksVoidFunction) { - EXPECT_CALL(mock_foo_, VoidReturning(Lt(100))); - foo_->VoidReturning(0); -} - -// Tests mocking a nullary function. -TEST_F(FunctionMockerTest, MocksNullaryFunction) { - EXPECT_CALL(mock_foo_, Nullary()) - .WillOnce(DoDefault()) - .WillOnce(Return(1)); - - EXPECT_EQ(0, foo_->Nullary()); - EXPECT_EQ(1, foo_->Nullary()); -} - -// Tests mocking a unary function. -TEST_F(FunctionMockerTest, MocksUnaryFunction) { - EXPECT_CALL(mock_foo_, Unary(Eq(2))) - .Times(2) - .WillOnce(Return(true)); - - EXPECT_TRUE(foo_->Unary(2)); - EXPECT_FALSE(foo_->Unary(2)); -} - -// Tests mocking a binary function. -TEST_F(FunctionMockerTest, MocksBinaryFunction) { - EXPECT_CALL(mock_foo_, Binary(2, _)) - .WillOnce(Return(3)); - - EXPECT_EQ(3, foo_->Binary(2, 1)); -} - -// Tests mocking a decimal function. -TEST_F(FunctionMockerTest, MocksDecimalFunction) { - EXPECT_CALL(mock_foo_, Decimal(true, 'a', 0, 0, 1L, A(), - Lt(100), 5U, NULL, "hi")) - .WillOnce(Return(5)); - - EXPECT_EQ(5, foo_->Decimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi")); -} - -// Tests mocking a function that takes a non-const reference. -TEST_F(FunctionMockerTest, MocksFunctionWithNonConstReferenceArgument) { - int a = 0; - EXPECT_CALL(mock_foo_, TakesNonConstReference(Ref(a))) - .WillOnce(Return(true)); - - EXPECT_TRUE(foo_->TakesNonConstReference(a)); -} - -// Tests mocking a function that takes a const reference. -TEST_F(FunctionMockerTest, MocksFunctionWithConstReferenceArgument) { - int a = 0; - EXPECT_CALL(mock_foo_, TakesConstReference(Ref(a))) - .WillOnce(Return("Hello")); - - EXPECT_EQ("Hello", foo_->TakesConstReference(a)); -} - -#ifdef GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS -// Tests mocking a function that takes a const variable. -TEST_F(FunctionMockerTest, MocksFunctionWithConstArgument) { - EXPECT_CALL(mock_foo_, TakesConst(Lt(10))) - .WillOnce(DoDefault()); - - EXPECT_FALSE(foo_->TakesConst(5)); -} -#endif // GMOCK_ALLOWS_CONST_PARAM_FUNCTIONS - -// Tests mocking functions overloaded on the number of arguments. -TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNumber) { - EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber()) - .WillOnce(Return(1)); - EXPECT_CALL(mock_foo_, OverloadedOnArgumentNumber(_)) - .WillOnce(Return(2)); - - EXPECT_EQ(2, foo_->OverloadedOnArgumentNumber(1)); - EXPECT_EQ(1, foo_->OverloadedOnArgumentNumber()); -} - -// Tests mocking functions overloaded on the types of argument. -TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType) { - EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(An())) - .WillOnce(Return(1)); - EXPECT_CALL(mock_foo_, OverloadedOnArgumentType(TypedEq('a'))) - .WillOnce(Return('b')); - - EXPECT_EQ(1, foo_->OverloadedOnArgumentType(0)); - EXPECT_EQ('b', foo_->OverloadedOnArgumentType('a')); -} - -// Tests mocking functions overloaded on the const-ness of this object. -TEST_F(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) { - EXPECT_CALL(mock_foo_, OverloadedOnConstness()); - EXPECT_CALL(Const(mock_foo_), OverloadedOnConstness()) - .WillOnce(Return('a')); - - EXPECT_EQ(0, foo_->OverloadedOnConstness()); - EXPECT_EQ('a', Const(*foo_).OverloadedOnConstness()); -} - -#if GTEST_OS_WINDOWS -// Tests mocking a nullary function with calltype. -TEST_F(FunctionMockerTest, MocksNullaryFunctionWithCallType) { - EXPECT_CALL(mock_foo_, CTNullary()) - .WillOnce(Return(-1)) - .WillOnce(Return(0)); - - EXPECT_EQ(-1, foo_->CTNullary()); - EXPECT_EQ(0, foo_->CTNullary()); -} - -// Tests mocking a unary function with calltype. -TEST_F(FunctionMockerTest, MocksUnaryFunctionWithCallType) { - EXPECT_CALL(mock_foo_, CTUnary(Eq(2))) - .Times(2) - .WillOnce(Return(true)) - .WillOnce(Return(false)); - - EXPECT_TRUE(foo_->CTUnary(2)); - EXPECT_FALSE(foo_->CTUnary(2)); -} - -// Tests mocking a decimal function with calltype. -TEST_F(FunctionMockerTest, MocksDecimalFunctionWithCallType) { - EXPECT_CALL(mock_foo_, CTDecimal(true, 'a', 0, 0, 1L, A(), - Lt(100), 5U, NULL, "hi")) - .WillOnce(Return(10)); - - EXPECT_EQ(10, foo_->CTDecimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi")); -} - -// Tests mocking functions overloaded on the const-ness of this object. -TEST_F(FunctionMockerTest, MocksFunctionsConstFunctionWithCallType) { - EXPECT_CALL(Const(mock_foo_), CTConst(_)) - .WillOnce(Return('a')); - - EXPECT_EQ('a', Const(*foo_).CTConst(0)); -} - -#endif // GTEST_OS_WINDOWS - -class MockB { - public: - MOCK_METHOD0(DoB, void()); -}; - -// Tests that functions with no EXPECT_CALL() ruls can be called any -// number of times. -TEST(ExpectCallTest, UnmentionedFunctionCanBeCalledAnyNumberOfTimes) { - { - MockB b; - } - - { - MockB b; - b.DoB(); - } - - { - MockB b; - b.DoB(); - b.DoB(); - } -} - -// Tests mocking template interfaces. - -template -class StackInterface { - public: - virtual ~StackInterface() {} - - // Template parameter appears in function parameter. - virtual void Push(const T& value) = 0; - virtual void Pop() = 0; - virtual int GetSize() const = 0; - // Template parameter appears in function return type. - virtual const T& GetTop() const = 0; -}; - -template -class MockStack : public StackInterface { - public: - MOCK_METHOD1_T(Push, void(const T& elem)); - MOCK_METHOD0_T(Pop, void()); - MOCK_CONST_METHOD0_T(GetSize, int()); // NOLINT - MOCK_CONST_METHOD0_T(GetTop, const T&()); -}; - -// Tests that template mock works. -TEST(TemplateMockTest, Works) { - MockStack mock; - - EXPECT_CALL(mock, GetSize()) - .WillOnce(Return(0)) - .WillOnce(Return(1)) - .WillOnce(Return(0)); - EXPECT_CALL(mock, Push(_)); - int n = 5; - EXPECT_CALL(mock, GetTop()) - .WillOnce(ReturnRef(n)); - EXPECT_CALL(mock, Pop()) - .Times(AnyNumber()); - - EXPECT_EQ(0, mock.GetSize()); - mock.Push(5); - EXPECT_EQ(1, mock.GetSize()); - EXPECT_EQ(5, mock.GetTop()); - mock.Pop(); - EXPECT_EQ(0, mock.GetSize()); -} - -#if GTEST_OS_WINDOWS -// Tests mocking template interfaces with calltype. - -template -class StackInterfaceWithCallType { - public: - virtual ~StackInterfaceWithCallType() {} - - // Template parameter appears in function parameter. - STDMETHOD_(void, Push)(const T& value) = 0; - STDMETHOD_(void, Pop)() = 0; - STDMETHOD_(int, GetSize)() const = 0; - // Template parameter appears in function return type. - STDMETHOD_(const T&, GetTop)() const = 0; -}; - -template -class MockStackWithCallType : public StackInterfaceWithCallType { - public: - MOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Push, void(const T& elem)); - MOCK_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Pop, void()); - MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetSize, int()); - MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetTop, const T&()); -}; - -// Tests that template mock with calltype works. -TEST(TemplateMockTestWithCallType, Works) { - MockStackWithCallType mock; - - EXPECT_CALL(mock, GetSize()) - .WillOnce(Return(0)) - .WillOnce(Return(1)) - .WillOnce(Return(0)); - EXPECT_CALL(mock, Push(_)); - int n = 5; - EXPECT_CALL(mock, GetTop()) - .WillOnce(ReturnRef(n)); - EXPECT_CALL(mock, Pop()) - .Times(AnyNumber()); - - EXPECT_EQ(0, mock.GetSize()); - mock.Push(5); - EXPECT_EQ(1, mock.GetSize()); - EXPECT_EQ(5, mock.GetTop()); - mock.Pop(); - EXPECT_EQ(0, mock.GetSize()); -} -#endif // GTEST_OS_WINDOWS - -#define MY_MOCK_METHODS1_ \ - MOCK_METHOD0(Overloaded, void()); \ - MOCK_CONST_METHOD1(Overloaded, int(int n)); \ - MOCK_METHOD2(Overloaded, bool(bool f, int n)) - -class MockOverloadedOnArgNumber { - public: - MY_MOCK_METHODS1_; -}; - -TEST(OverloadedMockMethodTest, CanOverloadOnArgNumberInMacroBody) { - MockOverloadedOnArgNumber mock; - EXPECT_CALL(mock, Overloaded()); - EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2)); - EXPECT_CALL(mock, Overloaded(true, 1)).WillOnce(Return(true)); - - mock.Overloaded(); - EXPECT_EQ(2, mock.Overloaded(1)); - EXPECT_TRUE(mock.Overloaded(true, 1)); -} - -#define MY_MOCK_METHODS2_ \ - MOCK_CONST_METHOD1(Overloaded, int(int n)); \ - MOCK_METHOD1(Overloaded, int(int n)); - -class MockOverloadedOnConstness { - public: - MY_MOCK_METHODS2_; -}; - -TEST(OverloadedMockMethodTest, CanOverloadOnConstnessInMacroBody) { - MockOverloadedOnConstness mock; - const MockOverloadedOnConstness* const_mock = &mock; - EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2)); - EXPECT_CALL(*const_mock, Overloaded(1)).WillOnce(Return(3)); - - EXPECT_EQ(2, mock.Overloaded(1)); - EXPECT_EQ(3, const_mock->Overloaded(1)); -} - -} // namespace gmock_generated_function_mockers_test -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-internal-utils_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-internal-utils_test.cc deleted file mode 100644 index 13b4c5cf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-internal-utils_test.cc +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the internal utilities. - -#include -#include -#include - -namespace { - -using ::std::tr1::tuple; -using ::testing::Matcher; -using ::testing::internal::CompileAssertTypesEqual; -using ::testing::internal::MatcherTuple; -using ::testing::internal::Function; -using ::testing::internal::IgnoredValue; - -// Tests the MatcherTuple template struct. - -TEST(MatcherTupleTest, ForSize0) { - CompileAssertTypesEqual, MatcherTuple >::type>(); -} - -TEST(MatcherTupleTest, ForSize1) { - CompileAssertTypesEqual >, - MatcherTuple >::type>(); -} - -TEST(MatcherTupleTest, ForSize2) { - CompileAssertTypesEqual, Matcher >, - MatcherTuple >::type>(); -} - -TEST(MatcherTupleTest, ForSize5) { - CompileAssertTypesEqual, Matcher, Matcher, - Matcher, Matcher >, - MatcherTuple - >::type>(); -} - -// Tests the Function template struct. - -TEST(FunctionTest, Nullary) { - typedef Function F; // NOLINT - CompileAssertTypesEqual(); - CompileAssertTypesEqual, F::ArgumentTuple>(); - CompileAssertTypesEqual, F::ArgumentMatcherTuple>(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); -} - -TEST(FunctionTest, Unary) { - typedef Function F; // NOLINT - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual, F::ArgumentTuple>(); - CompileAssertTypesEqual >, F::ArgumentMatcherTuple>(); - CompileAssertTypesEqual(); // NOLINT - CompileAssertTypesEqual(); -} - -TEST(FunctionTest, Binary) { - typedef Function F; // NOLINT - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); // NOLINT - CompileAssertTypesEqual, F::ArgumentTuple>(); // NOLINT - CompileAssertTypesEqual, Matcher >, // NOLINT - F::ArgumentMatcherTuple>(); - CompileAssertTypesEqual(); // NOLINT - CompileAssertTypesEqual(); -} - -TEST(FunctionTest, LongArgumentList) { - typedef Function F; // NOLINT - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); // NOLINT - CompileAssertTypesEqual, // NOLINT - F::ArgumentTuple>(); - CompileAssertTypesEqual, Matcher, Matcher, - Matcher, Matcher >, // NOLINT - F::ArgumentMatcherTuple>(); - CompileAssertTypesEqual(); - CompileAssertTypesEqual< - IgnoredValue(bool, int, char*, int&, const long&), // NOLINT - F::MakeResultIgnoredValue>(); -} - -} // Unnamed namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-matchers_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-matchers_test.cc deleted file mode 100644 index 19024d0d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-generated-matchers_test.cc +++ /dev/null @@ -1,1046 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the built-in matchers generated by a script. - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace { - -using std::list; -using std::map; -using std::pair; -using std::set; -using std::stringstream; -using std::vector; -using std::tr1::get; -using std::tr1::make_tuple; -using std::tr1::tuple; -using testing::_; -using testing::Args; -using testing::Contains; -using testing::ElementsAre; -using testing::ElementsAreArray; -using testing::Eq; -using testing::Ge; -using testing::Gt; -using testing::Lt; -using testing::MakeMatcher; -using testing::Matcher; -using testing::MatcherInterface; -using testing::Ne; -using testing::Not; -using testing::Pointee; -using testing::Ref; -using testing::StaticAssertTypeEq; -using testing::StrEq; -using testing::Value; -using testing::internal::string; - -// Returns the description of the given matcher. -template -string Describe(const Matcher& m) { - stringstream ss; - m.DescribeTo(&ss); - return ss.str(); -} - -// Returns the description of the negation of the given matcher. -template -string DescribeNegation(const Matcher& m) { - stringstream ss; - m.DescribeNegationTo(&ss); - return ss.str(); -} - -// Returns the reason why x matches, or doesn't match, m. -template -string Explain(const MatcherType& m, const Value& x) { - stringstream ss; - m.ExplainMatchResultTo(x, &ss); - return ss.str(); -} - -// Tests Args(m). - -TEST(ArgsTest, AcceptsZeroTemplateArg) { - const tuple t(5, true); - EXPECT_THAT(t, Args<>(Eq(tuple<>()))); - EXPECT_THAT(t, Not(Args<>(Ne(tuple<>())))); -} - -TEST(ArgsTest, AcceptsOneTemplateArg) { - const tuple t(5, true); - EXPECT_THAT(t, Args<0>(Eq(make_tuple(5)))); - EXPECT_THAT(t, Args<1>(Eq(make_tuple(true)))); - EXPECT_THAT(t, Not(Args<1>(Eq(make_tuple(false))))); -} - -TEST(ArgsTest, AcceptsTwoTemplateArgs) { - const tuple t(4, 5, 6L); // NOLINT - - EXPECT_THAT(t, (Args<0, 1>(Lt()))); - EXPECT_THAT(t, (Args<1, 2>(Lt()))); - EXPECT_THAT(t, Not(Args<0, 2>(Gt()))); -} - -TEST(ArgsTest, AcceptsRepeatedTemplateArgs) { - const tuple t(4, 5, 6L); // NOLINT - EXPECT_THAT(t, (Args<0, 0>(Eq()))); - EXPECT_THAT(t, Not(Args<1, 1>(Ne()))); -} - -TEST(ArgsTest, AcceptsDecreasingTemplateArgs) { - const tuple t(4, 5, 6L); // NOLINT - EXPECT_THAT(t, (Args<2, 0>(Gt()))); - EXPECT_THAT(t, Not(Args<2, 1>(Lt()))); -} - -MATCHER(SumIsZero, "") { - return get<0>(arg) + get<1>(arg) + get<2>(arg) == 0; -} - -TEST(ArgsTest, AcceptsMoreTemplateArgsThanArityOfOriginalTuple) { - EXPECT_THAT(make_tuple(-1, 2), (Args<0, 0, 1>(SumIsZero()))); - EXPECT_THAT(make_tuple(1, 2), Not(Args<0, 0, 1>(SumIsZero()))); -} - -TEST(ArgsTest, CanBeNested) { - const tuple t(4, 5, 6L, 6); // NOLINT - EXPECT_THAT(t, (Args<1, 2, 3>(Args<1, 2>(Eq())))); - EXPECT_THAT(t, (Args<0, 1, 3>(Args<0, 2>(Lt())))); -} - -TEST(ArgsTest, CanMatchTupleByValue) { - typedef tuple Tuple3; - const Matcher m = Args<1, 2>(Lt()); - EXPECT_TRUE(m.Matches(Tuple3('a', 1, 2))); - EXPECT_FALSE(m.Matches(Tuple3('b', 2, 2))); -} - -TEST(ArgsTest, CanMatchTupleByReference) { - typedef tuple Tuple3; - const Matcher m = Args<0, 1>(Lt()); - EXPECT_TRUE(m.Matches(Tuple3('a', 'b', 2))); - EXPECT_FALSE(m.Matches(Tuple3('b', 'b', 2))); -} - -// Validates that arg is printed as str. -MATCHER_P(PrintsAs, str, "") { - typedef GMOCK_REMOVE_CONST_(GMOCK_REMOVE_REFERENCE_(arg_type)) RawTuple; - return - testing::internal::UniversalPrinter::PrintToString(arg) == str; -} - -TEST(ArgsTest, AcceptsTenTemplateArgs) { - EXPECT_THAT(make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9), - (Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>( - PrintsAs("(9, 8, 7, 6, 5, 4, 3, 2, 1, 0)")))); - EXPECT_THAT(make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9), - Not(Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>( - PrintsAs("(0, 8, 7, 6, 5, 4, 3, 2, 1, 0)")))); -} - -TEST(ArgsTest, DescirbesSelfCorrectly) { - const Matcher > m = Args<2, 0>(Lt()); - EXPECT_EQ("are a tuple whose fields (#2, #0) are a pair (x, y) where x < y", - Describe(m)); -} - -TEST(ArgsTest, DescirbesNestedArgsCorrectly) { - const Matcher&> m = - Args<0, 2, 3>(Args<2, 0>(Lt())); - EXPECT_EQ("are a tuple whose fields (#0, #2, #3) are a tuple " - "whose fields (#2, #0) are a pair (x, y) where x < y", - Describe(m)); -} - -TEST(ArgsTest, DescribesNegationCorrectly) { - const Matcher > m = Args<1, 0>(Gt()); - EXPECT_EQ("are a tuple whose fields (#1, #0) are a pair (x, y) " - "where x > y is false", - DescribeNegation(m)); -} - -// For testing ExplainMatchResultTo(). -class GreaterThanMatcher : public MatcherInterface { - public: - explicit GreaterThanMatcher(int rhs) : rhs_(rhs) {} - - virtual bool Matches(int lhs) const { return lhs > rhs_; } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "is greater than " << rhs_; - } - - virtual void ExplainMatchResultTo(int lhs, ::std::ostream* os) const { - const int diff = lhs - rhs_; - if (diff > 0) { - *os << "is " << diff << " more than " << rhs_; - } else if (diff == 0) { - *os << "is the same as " << rhs_; - } else { - *os << "is " << -diff << " less than " << rhs_; - } - } - private: - const int rhs_; -}; - -Matcher GreaterThan(int n) { - return MakeMatcher(new GreaterThanMatcher(n)); -} - -// Tests for ElementsAre(). - -// Evaluates to the number of elements in 'array'. -#define GMOCK_ARRAY_SIZE_(array) (sizeof(array)/sizeof(array[0])) - -TEST(ElementsAreTest, CanDescribeExpectingNoElement) { - Matcher&> m = ElementsAre(); - EXPECT_EQ("is empty", Describe(m)); -} - -TEST(ElementsAreTest, CanDescribeExpectingOneElement) { - Matcher > m = ElementsAre(Gt(5)); - EXPECT_EQ("has 1 element that is greater than 5", Describe(m)); -} - -TEST(ElementsAreTest, CanDescribeExpectingManyElements) { - Matcher > m = ElementsAre(StrEq("one"), "two"); - EXPECT_EQ("has 2 elements where\n" - "element 0 is equal to \"one\",\n" - "element 1 is equal to \"two\"", Describe(m)); -} - -TEST(ElementsAreTest, CanDescribeNegationOfExpectingNoElement) { - Matcher > m = ElementsAre(); - EXPECT_EQ("is not empty", DescribeNegation(m)); -} - -TEST(ElementsAreTest, CanDescribeNegationOfExpectingOneElment) { - Matcher& > m = ElementsAre(Gt(5)); - EXPECT_EQ("does not have 1 element, or\n" - "element 0 is not greater than 5", DescribeNegation(m)); -} - -TEST(ElementsAreTest, CanDescribeNegationOfExpectingManyElements) { - Matcher& > m = ElementsAre("one", "two"); - EXPECT_EQ("does not have 2 elements, or\n" - "element 0 is not equal to \"one\", or\n" - "element 1 is not equal to \"two\"", DescribeNegation(m)); -} - -TEST(ElementsAreTest, DoesNotExplainTrivialMatch) { - Matcher& > m = ElementsAre(1, Ne(2)); - - list test_list; - test_list.push_back(1); - test_list.push_back(3); - EXPECT_EQ("", Explain(m, test_list)); // No need to explain anything. -} - -TEST(ElementsAreTest, ExplainsNonTrivialMatch) { - Matcher& > m = - ElementsAre(GreaterThan(1), 0, GreaterThan(2)); - - const int a[] = { 10, 0, 100 }; - vector test_vector(a, a + GMOCK_ARRAY_SIZE_(a)); - EXPECT_EQ("element 0 is 9 more than 1,\n" - "element 2 is 98 more than 2", Explain(m, test_vector)); -} - -TEST(ElementsAreTest, CanExplainMismatchWrongSize) { - Matcher& > m = ElementsAre(1, 3); - - list test_list; - // No need to explain when the container is empty. - EXPECT_EQ("", Explain(m, test_list)); - - test_list.push_back(1); - EXPECT_EQ("has 1 element", Explain(m, test_list)); -} - -TEST(ElementsAreTest, CanExplainMismatchRightSize) { - Matcher& > m = ElementsAre(1, GreaterThan(5)); - - vector v; - v.push_back(2); - v.push_back(1); - EXPECT_EQ("element 0 doesn't match", Explain(m, v)); - - v[0] = 1; - EXPECT_EQ("element 1 doesn't match (is 4 less than 5)", Explain(m, v)); -} - -TEST(ElementsAreTest, MatchesOneElementVector) { - vector test_vector; - test_vector.push_back("test string"); - - EXPECT_THAT(test_vector, ElementsAre(StrEq("test string"))); -} - -TEST(ElementsAreTest, MatchesOneElementList) { - list test_list; - test_list.push_back("test string"); - - EXPECT_THAT(test_list, ElementsAre("test string")); -} - -TEST(ElementsAreTest, MatchesThreeElementVector) { - vector test_vector; - test_vector.push_back("one"); - test_vector.push_back("two"); - test_vector.push_back("three"); - - EXPECT_THAT(test_vector, ElementsAre("one", StrEq("two"), _)); -} - -TEST(ElementsAreTest, MatchesOneElementEqMatcher) { - vector test_vector; - test_vector.push_back(4); - - EXPECT_THAT(test_vector, ElementsAre(Eq(4))); -} - -TEST(ElementsAreTest, MatchesOneElementAnyMatcher) { - vector test_vector; - test_vector.push_back(4); - - EXPECT_THAT(test_vector, ElementsAre(_)); -} - -TEST(ElementsAreTest, MatchesOneElementValue) { - vector test_vector; - test_vector.push_back(4); - - EXPECT_THAT(test_vector, ElementsAre(4)); -} - -TEST(ElementsAreTest, MatchesThreeElementsMixedMatchers) { - vector test_vector; - test_vector.push_back(1); - test_vector.push_back(2); - test_vector.push_back(3); - - EXPECT_THAT(test_vector, ElementsAre(1, Eq(2), _)); -} - -TEST(ElementsAreTest, MatchesTenElementVector) { - const int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - vector test_vector(a, a + GMOCK_ARRAY_SIZE_(a)); - - EXPECT_THAT(test_vector, - // The element list can contain values and/or matchers - // of different types. - ElementsAre(0, Ge(0), _, 3, 4, Ne(2), Eq(6), 7, 8, _)); -} - -TEST(ElementsAreTest, DoesNotMatchWrongSize) { - vector test_vector; - test_vector.push_back("test string"); - test_vector.push_back("test string"); - - Matcher > m = ElementsAre(StrEq("test string")); - EXPECT_FALSE(m.Matches(test_vector)); -} - -TEST(ElementsAreTest, DoesNotMatchWrongValue) { - vector test_vector; - test_vector.push_back("other string"); - - Matcher > m = ElementsAre(StrEq("test string")); - EXPECT_FALSE(m.Matches(test_vector)); -} - -TEST(ElementsAreTest, DoesNotMatchWrongOrder) { - vector test_vector; - test_vector.push_back("one"); - test_vector.push_back("three"); - test_vector.push_back("two"); - - Matcher > m = ElementsAre( - StrEq("one"), StrEq("two"), StrEq("three")); - EXPECT_FALSE(m.Matches(test_vector)); -} - -TEST(ElementsAreTest, WorksForNestedContainer) { - const char* strings[] = { - "Hi", - "world" - }; - - vector > nested; - for (int i = 0; i < GMOCK_ARRAY_SIZE_(strings); i++) { - nested.push_back(list(strings[i], strings[i] + strlen(strings[i]))); - } - - EXPECT_THAT(nested, ElementsAre(ElementsAre('H', Ne('e')), - ElementsAre('w', 'o', _, _, 'd'))); - EXPECT_THAT(nested, Not(ElementsAre(ElementsAre('H', 'e'), - ElementsAre('w', 'o', _, _, 'd')))); -} - -TEST(ElementsAreTest, WorksWithByRefElementMatchers) { - int a[] = { 0, 1, 2 }; - vector v(a, a + GMOCK_ARRAY_SIZE_(a)); - - EXPECT_THAT(v, ElementsAre(Ref(v[0]), Ref(v[1]), Ref(v[2]))); - EXPECT_THAT(v, Not(ElementsAre(Ref(v[0]), Ref(v[1]), Ref(a[2])))); -} - -TEST(ElementsAreTest, WorksWithContainerPointerUsingPointee) { - int a[] = { 0, 1, 2 }; - vector v(a, a + GMOCK_ARRAY_SIZE_(a)); - - EXPECT_THAT(&v, Pointee(ElementsAre(0, 1, _))); - EXPECT_THAT(&v, Not(Pointee(ElementsAre(0, _, 3)))); -} - -TEST(ElementsAreTest, WorksWithNativeArrayPassedByReference) { - int array[] = { 0, 1, 2 }; - EXPECT_THAT(array, ElementsAre(0, 1, _)); - EXPECT_THAT(array, Not(ElementsAre(1, _, _))); - EXPECT_THAT(array, Not(ElementsAre(0, _))); -} - -class NativeArrayPassedAsPointerAndSize { - public: - MOCK_METHOD2(Helper, void(int* array, int size)); -}; - -TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) { - int array[] = { 0, 1 }; - ::std::tr1::tuple array_as_tuple(array, 2); - EXPECT_THAT(array_as_tuple, ElementsAre(0, 1)); - EXPECT_THAT(array_as_tuple, Not(ElementsAre(0))); - - NativeArrayPassedAsPointerAndSize helper; - EXPECT_CALL(helper, Helper(_, _)) - .With(ElementsAre(0, 1)); - helper.Helper(array, 2); -} - -TEST(ElementsAreTest, WorksWithTwoDimensionalNativeArray) { - const char a2[][3] = { "hi", "lo" }; - EXPECT_THAT(a2, ElementsAre(ElementsAre('h', 'i', '\0'), - ElementsAre('l', 'o', '\0'))); - EXPECT_THAT(a2, ElementsAre(StrEq("hi"), StrEq("lo"))); - EXPECT_THAT(a2, ElementsAre(Not(ElementsAre('h', 'o', '\0')), - ElementsAre('l', 'o', '\0'))); -} - -// Tests for ElementsAreArray(). Since ElementsAreArray() shares most -// of the implementation with ElementsAre(), we don't test it as -// thoroughly here. - -TEST(ElementsAreArrayTest, CanBeCreatedWithValueArray) { - const int a[] = { 1, 2, 3 }; - - vector test_vector(a, a + GMOCK_ARRAY_SIZE_(a)); - EXPECT_THAT(test_vector, ElementsAreArray(a)); - - test_vector[2] = 0; - EXPECT_THAT(test_vector, Not(ElementsAreArray(a))); -} - -TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) { - const char* a[] = { "one", "two", "three" }; - - vector test_vector(a, a + GMOCK_ARRAY_SIZE_(a)); - EXPECT_THAT(test_vector, ElementsAreArray(a, GMOCK_ARRAY_SIZE_(a))); - - const char** p = a; - test_vector[0] = "1"; - EXPECT_THAT(test_vector, Not(ElementsAreArray(p, GMOCK_ARRAY_SIZE_(a)))); -} - -TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) { - const char* a[] = { "one", "two", "three" }; - - vector test_vector(a, a + GMOCK_ARRAY_SIZE_(a)); - EXPECT_THAT(test_vector, ElementsAreArray(a)); - - test_vector[0] = "1"; - EXPECT_THAT(test_vector, Not(ElementsAreArray(a))); -} - -TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherArray) { - const Matcher kMatcherArray[] = - { StrEq("one"), StrEq("two"), StrEq("three") }; - - vector test_vector; - test_vector.push_back("one"); - test_vector.push_back("two"); - test_vector.push_back("three"); - EXPECT_THAT(test_vector, ElementsAreArray(kMatcherArray)); - - test_vector.push_back("three"); - EXPECT_THAT(test_vector, Not(ElementsAreArray(kMatcherArray))); -} - -// Since ElementsAre() and ElementsAreArray() share much of the -// implementation, we only do a sanity test for native arrays here. -TEST(ElementsAreArrayTest, WorksWithNativeArray) { - ::std::string a[] = { "hi", "ho" }; - ::std::string b[] = { "hi", "ho" }; - - EXPECT_THAT(a, ElementsAreArray(b)); - EXPECT_THAT(a, ElementsAreArray(b, 2)); - EXPECT_THAT(a, Not(ElementsAreArray(b, 1))); -} - -// Tests for the MATCHER*() macro family. - -// Tests that a simple MATCHER() definition works. - -MATCHER(IsEven, "") { return (arg % 2) == 0; } - -TEST(MatcherMacroTest, Works) { - const Matcher m = IsEven(); - EXPECT_TRUE(m.Matches(6)); - EXPECT_FALSE(m.Matches(7)); - - EXPECT_EQ("is even", Describe(m)); - EXPECT_EQ("not (is even)", DescribeNegation(m)); - EXPECT_EQ("", Explain(m, 6)); - EXPECT_EQ("", Explain(m, 7)); -} - -// Tests that the description string supplied to MATCHER() must be -// valid. - -MATCHER(HasBadDescription, "Invalid%") { return true; } - -TEST(MatcherMacroTest, - CreatingMatcherWithBadDescriptionGeneratesNonfatalFailure) { - EXPECT_NONFATAL_FAILURE( - HasBadDescription(), - "Syntax error at index 7 in matcher description \"Invalid%\": " - "use \"%%\" instead of \"%\" to print \"%\"."); -} - -MATCHER(HasGoodDescription, "good") { return true; } - -TEST(MatcherMacroTest, AcceptsValidDescription) { - const Matcher m = HasGoodDescription(); - EXPECT_EQ("good", Describe(m)); -} - -// Tests that the body of MATCHER() can reference the type of the -// value being matched. - -MATCHER(IsEmptyString, "") { - StaticAssertTypeEq< ::std::string, arg_type>(); - return arg == ""; -} - -MATCHER(IsEmptyStringByRef, "") { - StaticAssertTypeEq(); - return arg == ""; -} - -TEST(MatcherMacroTest, CanReferenceArgType) { - const Matcher< ::std::string> m1 = IsEmptyString(); - EXPECT_TRUE(m1.Matches("")); - - const Matcher m2 = IsEmptyStringByRef(); - EXPECT_TRUE(m2.Matches("")); -} - -// Tests that MATCHER() can be used in a namespace. - -namespace matcher_test { -MATCHER(IsOdd, "") { return (arg % 2) != 0; } -} // namespace matcher_test - -TEST(MatcherMacroTest, WorksInNamespace) { - Matcher m = matcher_test::IsOdd(); - EXPECT_FALSE(m.Matches(4)); - EXPECT_TRUE(m.Matches(5)); -} - -// Tests that Value() can be used to compose matchers. -MATCHER(IsPositiveOdd, "") { - return Value(arg, matcher_test::IsOdd()) && arg > 0; -} - -TEST(MatcherMacroTest, CanBeComposedUsingValue) { - EXPECT_THAT(3, IsPositiveOdd()); - EXPECT_THAT(4, Not(IsPositiveOdd())); - EXPECT_THAT(-1, Not(IsPositiveOdd())); -} - -// Tests that a simple MATCHER_P() definition works. - -MATCHER_P(IsGreaterThan32And, n, "") { return arg > 32 && arg > n; } - -TEST(MatcherPMacroTest, Works) { - const Matcher m = IsGreaterThan32And(5); - EXPECT_TRUE(m.Matches(36)); - EXPECT_FALSE(m.Matches(5)); - - EXPECT_EQ("is greater than 32 and 5", Describe(m)); - EXPECT_EQ("not (is greater than 32 and 5)", DescribeNegation(m)); - EXPECT_EQ("", Explain(m, 36)); - EXPECT_EQ("", Explain(m, 5)); -} - -// Tests that the description string supplied to MATCHER_P() must be -// valid. - -MATCHER_P(HasBadDescription1, n, "not %(m)s good") { - return arg > n; -} - -TEST(MatcherPMacroTest, - CreatingMatcherWithBadDescriptionGeneratesNonfatalFailure) { - EXPECT_NONFATAL_FAILURE( - HasBadDescription1(2), - "Syntax error at index 6 in matcher description \"not %(m)s good\": " - "\"m\" is an invalid parameter name."); -} - - -MATCHER_P(HasGoodDescription1, n, "good %(n)s") { return true; } - -TEST(MatcherPMacroTest, AcceptsValidDescription) { - const Matcher m = HasGoodDescription1(5); - EXPECT_EQ("good 5", Describe(m)); -} - -// Tests that the description is calculated correctly from the matcher name. -MATCHER_P(_is_Greater_Than32and_, n, "") { return arg > 32 && arg > n; } - -TEST(MatcherPMacroTest, GeneratesCorrectDescription) { - const Matcher m = _is_Greater_Than32and_(5); - - EXPECT_EQ("is greater than 32 and 5", Describe(m)); - EXPECT_EQ("not (is greater than 32 and 5)", DescribeNegation(m)); - EXPECT_EQ("", Explain(m, 36)); - EXPECT_EQ("", Explain(m, 5)); -} - -// Tests that a MATCHER_P matcher can be explicitly instantiated with -// a reference parameter type. - -class UncopyableFoo { - public: - explicit UncopyableFoo(char value) : value_(value) {} - private: - UncopyableFoo(const UncopyableFoo&); - void operator=(const UncopyableFoo&); - - char value_; -}; - -MATCHER_P(ReferencesUncopyable, variable, "") { return &arg == &variable; } - -TEST(MatcherPMacroTest, WorksWhenExplicitlyInstantiatedWithReference) { - UncopyableFoo foo1('1'), foo2('2'); - const Matcher m = - ReferencesUncopyable(foo1); - - EXPECT_TRUE(m.Matches(foo1)); - EXPECT_FALSE(m.Matches(foo2)); - - // We don't want the address of the parameter printed, as most - // likely it will just annoy the user. If the address is - // interesting, the user should consider passing the parameter by - // pointer instead. - EXPECT_EQ("references uncopyable 1-byte object <31>", Describe(m)); -} - - -// Tests that the description string supplied to MATCHER_Pn() must be -// valid. - -MATCHER_P2(HasBadDescription2, m, n, "not %(good") { - return arg > m + n; -} - -TEST(MatcherPnMacroTest, - CreatingMatcherWithBadDescriptionGeneratesNonfatalFailure) { - EXPECT_NONFATAL_FAILURE( - HasBadDescription2(3, 4), - "Syntax error at index 4 in matcher description \"not %(good\": " - "an interpolation must end with \")s\", but \"%(good\" does not."); -} - -MATCHER_P2(HasComplexDescription, foo, bar, - "is as complex as %(foo)s %(bar)s (i.e. %(*)s or %%%(foo)s!)") { - return true; -} - -TEST(MatcherPnMacroTest, AcceptsValidDescription) { - Matcher m = HasComplexDescription(100, "ducks"); - EXPECT_EQ("is as complex as 100 \"ducks\" (i.e. (100, \"ducks\") or %100!)", - Describe(m)); -} - -// Tests that the body of MATCHER_Pn() can reference the parameter -// types. - -MATCHER_P3(ParamTypesAreIntLongAndChar, foo, bar, baz, "") { - StaticAssertTypeEq(); - StaticAssertTypeEq(); // NOLINT - StaticAssertTypeEq(); - return arg == 0; -} - -TEST(MatcherPnMacroTest, CanReferenceParamTypes) { - EXPECT_THAT(0, ParamTypesAreIntLongAndChar(10, 20L, 'a')); -} - -// Tests that a MATCHER_Pn matcher can be explicitly instantiated with -// reference parameter types. - -MATCHER_P2(ReferencesAnyOf, variable1, variable2, "") { - return &arg == &variable1 || &arg == &variable2; -} - -TEST(MatcherPnMacroTest, WorksWhenExplicitlyInstantiatedWithReferences) { - UncopyableFoo foo1('1'), foo2('2'), foo3('3'); - const Matcher m = - ReferencesAnyOf(foo1, foo2); - - EXPECT_TRUE(m.Matches(foo1)); - EXPECT_TRUE(m.Matches(foo2)); - EXPECT_FALSE(m.Matches(foo3)); -} - -TEST(MatcherPnMacroTest, - GeneratesCorretDescriptionWhenExplicitlyInstantiatedWithReferences) { - UncopyableFoo foo1('1'), foo2('2'); - const Matcher m = - ReferencesAnyOf(foo1, foo2); - - // We don't want the addresses of the parameters printed, as most - // likely they will just annoy the user. If the addresses are - // interesting, the user should consider passing the parameters by - // pointers instead. - EXPECT_EQ("references any of (1-byte object <31>, 1-byte object <32>)", - Describe(m)); -} - -// Tests that a simple MATCHER_P2() definition works. - -MATCHER_P2(IsNotInClosedRange, low, hi, "") { return arg < low || arg > hi; } - -TEST(MatcherPnMacroTest, Works) { - const Matcher m = IsNotInClosedRange(10, 20); // NOLINT - EXPECT_TRUE(m.Matches(36L)); - EXPECT_FALSE(m.Matches(15L)); - - EXPECT_EQ("is not in closed range (10, 20)", Describe(m)); - EXPECT_EQ("not (is not in closed range (10, 20))", DescribeNegation(m)); - EXPECT_EQ("", Explain(m, 36L)); - EXPECT_EQ("", Explain(m, 15L)); -} - -// Tests that MATCHER*() definitions can be overloaded on the number -// of parameters; also tests MATCHER_Pn() where n >= 3. - -MATCHER(EqualsSumOf, "") { return arg == 0; } -MATCHER_P(EqualsSumOf, a, "") { return arg == a; } -MATCHER_P2(EqualsSumOf, a, b, "") { return arg == a + b; } -MATCHER_P3(EqualsSumOf, a, b, c, "") { return arg == a + b + c; } -MATCHER_P4(EqualsSumOf, a, b, c, d, "") { return arg == a + b + c + d; } -MATCHER_P5(EqualsSumOf, a, b, c, d, e, "") { return arg == a + b + c + d + e; } -MATCHER_P6(EqualsSumOf, a, b, c, d, e, f, "") { - return arg == a + b + c + d + e + f; -} -MATCHER_P7(EqualsSumOf, a, b, c, d, e, f, g, "") { - return arg == a + b + c + d + e + f + g; -} -MATCHER_P8(EqualsSumOf, a, b, c, d, e, f, g, h, "") { - return arg == a + b + c + d + e + f + g + h; -} -MATCHER_P9(EqualsSumOf, a, b, c, d, e, f, g, h, i, "") { - return arg == a + b + c + d + e + f + g + h + i; -} -MATCHER_P10(EqualsSumOf, a, b, c, d, e, f, g, h, i, j, "") { - return arg == a + b + c + d + e + f + g + h + i + j; -} - -TEST(MatcherPnMacroTest, CanBeOverloadedOnNumberOfParameters) { - EXPECT_THAT(0, EqualsSumOf()); - EXPECT_THAT(1, EqualsSumOf(1)); - EXPECT_THAT(12, EqualsSumOf(10, 2)); - EXPECT_THAT(123, EqualsSumOf(100, 20, 3)); - EXPECT_THAT(1234, EqualsSumOf(1000, 200, 30, 4)); - EXPECT_THAT(12345, EqualsSumOf(10000, 2000, 300, 40, 5)); - EXPECT_THAT("abcdef", - EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f')); - EXPECT_THAT("abcdefg", - EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g')); - EXPECT_THAT("abcdefgh", - EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h")); - EXPECT_THAT("abcdefghi", - EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h", 'i')); - EXPECT_THAT("abcdefghij", - EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h", 'i', ::std::string("j"))); - - EXPECT_THAT(1, Not(EqualsSumOf())); - EXPECT_THAT(-1, Not(EqualsSumOf(1))); - EXPECT_THAT(-12, Not(EqualsSumOf(10, 2))); - EXPECT_THAT(-123, Not(EqualsSumOf(100, 20, 3))); - EXPECT_THAT(-1234, Not(EqualsSumOf(1000, 200, 30, 4))); - EXPECT_THAT(-12345, Not(EqualsSumOf(10000, 2000, 300, 40, 5))); - EXPECT_THAT("abcdef ", - Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f'))); - EXPECT_THAT("abcdefg ", - Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', - 'g'))); - EXPECT_THAT("abcdefgh ", - Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h"))); - EXPECT_THAT("abcdefghi ", - Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h", 'i'))); - EXPECT_THAT("abcdefghij ", - Not(EqualsSumOf(::std::string("a"), 'b', 'c', "d", "e", 'f', 'g', - "h", 'i', ::std::string("j")))); -} - -// Tests that a MATCHER_Pn() definition can be instantiated with any -// compatible parameter types. -TEST(MatcherPnMacroTest, WorksForDifferentParameterTypes) { - EXPECT_THAT(123, EqualsSumOf(100L, 20, static_cast(3))); - EXPECT_THAT("abcd", EqualsSumOf(::std::string("a"), "b", 'c', "d")); - - EXPECT_THAT(124, Not(EqualsSumOf(100L, 20, static_cast(3)))); - EXPECT_THAT("abcde", Not(EqualsSumOf(::std::string("a"), "b", 'c', "d"))); -} - -// Tests that the matcher body can promote the parameter types. - -MATCHER_P2(EqConcat, prefix, suffix, "") { - // The following lines promote the two parameters to desired types. - std::string prefix_str(prefix); - char suffix_char(suffix); - return arg == prefix_str + suffix_char; -} - -TEST(MatcherPnMacroTest, SimpleTypePromotion) { - Matcher no_promo = - EqConcat(std::string("foo"), 't'); - Matcher promo = - EqConcat("foo", static_cast('t')); - EXPECT_FALSE(no_promo.Matches("fool")); - EXPECT_FALSE(promo.Matches("fool")); - EXPECT_TRUE(no_promo.Matches("foot")); - EXPECT_TRUE(promo.Matches("foot")); -} - -// Verifies the type of a MATCHER*. - -TEST(MatcherPnMacroTest, TypesAreCorrect) { - // EqualsSumOf() must be assignable to a EqualsSumOfMatcher variable. - EqualsSumOfMatcher a0 = EqualsSumOf(); - - // EqualsSumOf(1) must be assignable to a EqualsSumOfMatcherP variable. - EqualsSumOfMatcherP a1 = EqualsSumOf(1); - - // EqualsSumOf(p1, ..., pk) must be assignable to a EqualsSumOfMatcherPk - // variable, and so on. - EqualsSumOfMatcherP2 a2 = EqualsSumOf(1, '2'); - EqualsSumOfMatcherP3 a3 = EqualsSumOf(1, 2, '3'); - EqualsSumOfMatcherP4 a4 = EqualsSumOf(1, 2, 3, '4'); - EqualsSumOfMatcherP5 a5 = - EqualsSumOf(1, 2, 3, 4, '5'); - EqualsSumOfMatcherP6 a6 = - EqualsSumOf(1, 2, 3, 4, 5, '6'); - EqualsSumOfMatcherP7 a7 = - EqualsSumOf(1, 2, 3, 4, 5, 6, '7'); - EqualsSumOfMatcherP8 a8 = - EqualsSumOf(1, 2, 3, 4, 5, 6, 7, '8'); - EqualsSumOfMatcherP9 a9 = - EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8, '9'); - EqualsSumOfMatcherP10 a10 = - EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8, 9, '0'); -} - -// Tests that matcher-typed parameters can be used in Value() inside a -// MATCHER_Pn definition. - -// Succeeds if arg matches exactly 2 of the 3 matchers. -MATCHER_P3(TwoOf, m1, m2, m3, "") { - const int count = static_cast(Value(arg, m1)) - + static_cast(Value(arg, m2)) + static_cast(Value(arg, m3)); - return count == 2; -} - -TEST(MatcherPnMacroTest, CanUseMatcherTypedParameterInValue) { - EXPECT_THAT(42, TwoOf(Gt(0), Lt(50), Eq(10))); - EXPECT_THAT(0, Not(TwoOf(Gt(-1), Lt(1), Eq(0)))); -} - -// Tests Contains(). - -TEST(ContainsTest, ListMatchesWhenElementIsInContainer) { - list some_list; - some_list.push_back(3); - some_list.push_back(1); - some_list.push_back(2); - EXPECT_THAT(some_list, Contains(1)); - EXPECT_THAT(some_list, Contains(Gt(2.5))); - EXPECT_THAT(some_list, Contains(Eq(2.0f))); - - list another_list; - another_list.push_back("fee"); - another_list.push_back("fie"); - another_list.push_back("foe"); - another_list.push_back("fum"); - EXPECT_THAT(another_list, Contains(string("fee"))); -} - -TEST(ContainsTest, ListDoesNotMatchWhenElementIsNotInContainer) { - list some_list; - some_list.push_back(3); - some_list.push_back(1); - EXPECT_THAT(some_list, Not(Contains(4))); -} - -TEST(ContainsTest, SetMatchesWhenElementIsInContainer) { - set some_set; - some_set.insert(3); - some_set.insert(1); - some_set.insert(2); - EXPECT_THAT(some_set, Contains(Eq(1.0))); - EXPECT_THAT(some_set, Contains(Eq(3.0f))); - EXPECT_THAT(some_set, Contains(2)); - - set another_set; - another_set.insert("fee"); - another_set.insert("fie"); - another_set.insert("foe"); - another_set.insert("fum"); - EXPECT_THAT(another_set, Contains(Eq(string("fum")))); -} - -TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) { - set some_set; - some_set.insert(3); - some_set.insert(1); - EXPECT_THAT(some_set, Not(Contains(4))); - - set c_string_set; - c_string_set.insert("hello"); - EXPECT_THAT(c_string_set, Not(Contains(string("hello").c_str()))); -} - -TEST(ContainsTest, DescribesItselfCorrectly) { - const int a[2] = { 1, 2 }; - Matcher m = Contains(2); - EXPECT_EQ("element 1 matches", Explain(m, a)); - - m = Contains(3); - EXPECT_EQ("", Explain(m, a)); -} - -TEST(ContainsTest, ExplainsMatchResultCorrectly) { - Matcher > m = Contains(1); - EXPECT_EQ("contains at least one element that is equal to 1", Describe(m)); - - Matcher > m2 = Not(m); - EXPECT_EQ("doesn't contain any element that is equal to 1", Describe(m2)); -} - -TEST(ContainsTest, MapMatchesWhenElementIsInContainer) { - map my_map; - const char* bar = "a string"; - my_map[bar] = 2; - EXPECT_THAT(my_map, Contains(pair(bar, 2))); - - map another_map; - another_map["fee"] = 1; - another_map["fie"] = 2; - another_map["foe"] = 3; - another_map["fum"] = 4; - EXPECT_THAT(another_map, Contains(pair(string("fee"), 1))); - EXPECT_THAT(another_map, Contains(pair("fie", 2))); -} - -TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) { - map some_map; - some_map[1] = 11; - some_map[2] = 22; - EXPECT_THAT(some_map, Not(Contains(pair(2, 23)))); -} - -TEST(ContainsTest, ArrayMatchesWhenElementIsInContainer) { - const char* string_array[] = { "fee", "fie", "foe", "fum" }; - EXPECT_THAT(string_array, Contains(Eq(string("fum")))); -} - -TEST(ContainsTest, ArrayDoesNotMatchWhenElementIsNotInContainer) { - int int_array[] = { 1, 2, 3, 4 }; - EXPECT_THAT(int_array, Not(Contains(5))); -} - -TEST(ContainsTest, AcceptsMatcher) { - const int a[] = { 1, 2, 3 }; - EXPECT_THAT(a, Contains(Gt(2))); - EXPECT_THAT(a, Not(Contains(Gt(4)))); -} - -TEST(ContainsTest, WorksForNativeArrayAsTuple) { - const int a[] = { 1, 2 }; - const int* const pointer = a; - EXPECT_THAT(make_tuple(pointer, 2), Contains(1)); - EXPECT_THAT(make_tuple(pointer, 2), Not(Contains(Gt(3)))); -} - -TEST(ContainsTest, WorksForTwoDimensionalNativeArray) { - int a[][3] = { { 1, 2, 3 }, { 4, 5, 6 } }; - EXPECT_THAT(a, Contains(ElementsAre(4, 5, 6))); - EXPECT_THAT(a, Contains(Contains(5))); - EXPECT_THAT(a, Not(Contains(ElementsAre(3, 4, 5)))); - EXPECT_THAT(a, Contains(Not(Contains(5)))); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-internal-utils_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-internal-utils_test.cc deleted file mode 100644 index 20289288..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-internal-utils_test.cc +++ /dev/null @@ -1,968 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the internal utilities. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if GTEST_OS_CYGWIN -#include // For ssize_t. NOLINT -#endif - -namespace testing { -namespace internal { - -namespace { - -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; - -TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsNoWord) { - EXPECT_EQ("", ConvertIdentifierNameToWords("")); - EXPECT_EQ("", ConvertIdentifierNameToWords("_")); - EXPECT_EQ("", ConvertIdentifierNameToWords("__")); -} - -TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsDigits) { - EXPECT_EQ("1", ConvertIdentifierNameToWords("_1")); - EXPECT_EQ("2", ConvertIdentifierNameToWords("2_")); - EXPECT_EQ("34", ConvertIdentifierNameToWords("_34_")); - EXPECT_EQ("34 56", ConvertIdentifierNameToWords("_34_56")); -} - -TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsCamelCaseWords) { - EXPECT_EQ("a big word", ConvertIdentifierNameToWords("ABigWord")); - EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("FooBar")); - EXPECT_EQ("foo", ConvertIdentifierNameToWords("Foo_")); - EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("_Foo_Bar_")); - EXPECT_EQ("foo and bar", ConvertIdentifierNameToWords("_Foo__And_Bar")); -} - -TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContains_SeparatedWords) { - EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("foo_bar")); - EXPECT_EQ("foo", ConvertIdentifierNameToWords("_foo_")); - EXPECT_EQ("foo bar", ConvertIdentifierNameToWords("_foo_bar_")); - EXPECT_EQ("foo and bar", ConvertIdentifierNameToWords("_foo__and_bar")); -} - -TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameIsMixture) { - EXPECT_EQ("foo bar 123", ConvertIdentifierNameToWords("Foo_bar123")); - EXPECT_EQ("chapter 11 section 1", - ConvertIdentifierNameToWords("_Chapter11Section_1_")); -} - -// Tests that CompileAssertTypesEqual compiles when the type arguments are -// equal. -TEST(CompileAssertTypesEqual, CompilesWhenTypesAreEqual) { - CompileAssertTypesEqual(); - CompileAssertTypesEqual(); -} - -// Tests that RemoveReference does not affect non-reference types. -TEST(RemoveReferenceTest, DoesNotAffectNonReferenceType) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests that RemoveReference removes reference from reference types. -TEST(RemoveReferenceTest, RemovesReference) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests GMOCK_REMOVE_REFERENCE_. - -template -void TestGMockRemoveReference() { - CompileAssertTypesEqual(); -} - -TEST(RemoveReferenceTest, MacroVersion) { - TestGMockRemoveReference(); - TestGMockRemoveReference(); -} - - -// Tests that RemoveConst does not affect non-const types. -TEST(RemoveConstTest, DoesNotAffectNonConstType) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests that RemoveConst removes const from const types. -TEST(RemoveConstTest, RemovesConst) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests GMOCK_REMOVE_CONST_. - -template -void TestGMockRemoveConst() { - CompileAssertTypesEqual(); -} - -TEST(RemoveConstTest, MacroVersion) { - TestGMockRemoveConst(); - TestGMockRemoveConst(); - TestGMockRemoveConst(); -} - -// Tests that AddReference does not affect reference types. -TEST(AddReferenceTest, DoesNotAffectReferenceType) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests that AddReference adds reference to non-reference types. -TEST(AddReferenceTest, AddsReference) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -// Tests GMOCK_ADD_REFERENCE_. - -template -void TestGMockAddReference() { - CompileAssertTypesEqual(); -} - -TEST(AddReferenceTest, MacroVersion) { - TestGMockAddReference(); - TestGMockAddReference(); -} - -// Tests GMOCK_REFERENCE_TO_CONST_. - -template -void TestGMockReferenceToConst() { - CompileAssertTypesEqual(); -} - -TEST(GMockReferenceToConstTest, Works) { - TestGMockReferenceToConst(); - TestGMockReferenceToConst(); - TestGMockReferenceToConst(); - TestGMockReferenceToConst(); -} - -TEST(PointeeOfTest, WorksForSmartPointers) { - CompileAssertTypesEqual >::type>(); -} - -TEST(PointeeOfTest, WorksForRawPointers) { - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); - CompileAssertTypesEqual::type>(); -} - -TEST(GetRawPointerTest, WorksForSmartPointers) { - const char* const raw_p4 = new const char('a'); // NOLINT - const internal::linked_ptr p4(raw_p4); - EXPECT_EQ(raw_p4, GetRawPointer(p4)); -} - -TEST(GetRawPointerTest, WorksForRawPointers) { - int* p = NULL; - EXPECT_EQ(NULL, GetRawPointer(p)); - int n = 1; - EXPECT_EQ(&n, GetRawPointer(&n)); -} - -class Base {}; -class Derived : public Base {}; - -// Tests that ImplicitlyConvertible::value is a compile-time constant. -TEST(ImplicitlyConvertibleTest, ValueIsCompileTimeConstant) { - GMOCK_COMPILE_ASSERT_((ImplicitlyConvertible::value), const_true); - GMOCK_COMPILE_ASSERT_((!ImplicitlyConvertible::value), - const_false); -} - -// Tests that ImplicitlyConvertible::value is true when T1 can -// be implicitly converted to T2. -TEST(ImplicitlyConvertibleTest, ValueIsTrueWhenConvertible) { - EXPECT_TRUE((ImplicitlyConvertible::value)); - EXPECT_TRUE((ImplicitlyConvertible::value)); - EXPECT_TRUE((ImplicitlyConvertible::value)); - EXPECT_TRUE((ImplicitlyConvertible::value)); - EXPECT_TRUE((ImplicitlyConvertible::value)); - EXPECT_TRUE((ImplicitlyConvertible::value)); -} - -// Tests that ImplicitlyConvertible::value is false when T1 -// cannot be implicitly converted to T2. -TEST(ImplicitlyConvertibleTest, ValueIsFalseWhenNotConvertible) { - EXPECT_FALSE((ImplicitlyConvertible::value)); - EXPECT_FALSE((ImplicitlyConvertible::value)); - EXPECT_FALSE((ImplicitlyConvertible::value)); - EXPECT_FALSE((ImplicitlyConvertible::value)); -} - -// Tests KindOf. - -TEST(KindOfTest, Bool) { - EXPECT_EQ(kBool, GMOCK_KIND_OF_(bool)); // NOLINT -} - -TEST(KindOfTest, Integer) { - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(char)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(signed char)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned char)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(short)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned short)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(int)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned int)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(long)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned long)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(wchar_t)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(Int64)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(UInt64)); // NOLINT - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(size_t)); // NOLINT -#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN - // ssize_t is not defined on Windows and possibly some other OSes. - EXPECT_EQ(kInteger, GMOCK_KIND_OF_(ssize_t)); // NOLINT -#endif -} - -TEST(KindOfTest, FloatingPoint) { - EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(float)); // NOLINT - EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(double)); // NOLINT - EXPECT_EQ(kFloatingPoint, GMOCK_KIND_OF_(long double)); // NOLINT -} - -TEST(KindOfTest, Other) { - EXPECT_EQ(kOther, GMOCK_KIND_OF_(void*)); // NOLINT - EXPECT_EQ(kOther, GMOCK_KIND_OF_(char**)); // NOLINT - EXPECT_EQ(kOther, GMOCK_KIND_OF_(Base)); // NOLINT -} - -// Tests LosslessArithmeticConvertible. - -TEST(LosslessArithmeticConvertibleTest, BoolToBool) { - EXPECT_TRUE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, BoolToInteger) { - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE( - (LosslessArithmeticConvertible::value)); // NOLINT -} - -TEST(LosslessArithmeticConvertibleTest, BoolToFloatingPoint) { - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, IntegerToBool) { - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, IntegerToInteger) { - // Unsigned => larger signed is fine. - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - - // Unsigned => larger unsigned is fine. - EXPECT_TRUE( - (LosslessArithmeticConvertible::value)); // NOLINT - - // Signed => unsigned is not fine. - EXPECT_FALSE((LosslessArithmeticConvertible::value)); // NOLINT - EXPECT_FALSE((LosslessArithmeticConvertible< - signed char, unsigned int>::value)); // NOLINT - - // Same size and same signedness: fine too. - EXPECT_TRUE((LosslessArithmeticConvertible< - unsigned char, unsigned char>::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible< - unsigned long, unsigned long>::value)); // NOLINT - - // Same size, different signedness: not fine. - EXPECT_FALSE((LosslessArithmeticConvertible< - unsigned char, signed char>::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - - // Larger size => smaller size is not fine. - EXPECT_FALSE((LosslessArithmeticConvertible::value)); // NOLINT - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, IntegerToFloatingPoint) { - // Integers cannot be losslessly converted to floating-points, as - // the format of the latter is implementation-defined. - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible< - short, long double>::value)); // NOLINT -} - -TEST(LosslessArithmeticConvertibleTest, FloatingPointToBool) { - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, FloatingPointToInteger) { - EXPECT_FALSE((LosslessArithmeticConvertible::value)); // NOLINT - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - EXPECT_FALSE((LosslessArithmeticConvertible::value)); -} - -TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) { - // Smaller size => larger size is fine. - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - - // Same size: fine. - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - - // Larger size => smaller size is not fine. - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - if (sizeof(double) == sizeof(long double)) { // NOLINT - // In some implementations (e.g. MSVC), double and long double - // have the same size. - EXPECT_TRUE((LosslessArithmeticConvertible::value)); - } else { - EXPECT_FALSE((LosslessArithmeticConvertible::value)); - } -} - -// Tests that IsAProtocolMessage::value is a compile-time constant. -TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) { - GMOCK_COMPILE_ASSERT_(IsAProtocolMessage::value, const_true); - GMOCK_COMPILE_ASSERT_(!IsAProtocolMessage::value, const_false); -} - -// Tests that IsAProtocolMessage::value is true when T is -// ProtocolMessage or a sub-class of it. -TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) { - EXPECT_TRUE(IsAProtocolMessage::value); -#if GMOCK_HAS_PROTOBUF_ - EXPECT_TRUE(IsAProtocolMessage::value); -#endif // GMOCK_HAS_PROTOBUF_ -} - -// Tests that IsAProtocolMessage::value is false when T is neither -// ProtocolMessage nor a sub-class of it. -TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) { - EXPECT_FALSE(IsAProtocolMessage::value); - EXPECT_FALSE(IsAProtocolMessage::value); -} - -// Tests IsContainerTest. - -class NonContainer {}; - -TEST(IsContainerTestTest, WorksForNonContainer) { - EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest(0))); - EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest(0))); - EXPECT_EQ(sizeof(IsNotContainer), sizeof(IsContainerTest(0))); -} - -TEST(IsContainerTestTest, WorksForContainer) { - EXPECT_EQ(sizeof(IsContainer), - sizeof(IsContainerTest >(0))); - EXPECT_EQ(sizeof(IsContainer), - sizeof(IsContainerTest >(0))); -} - -// Tests the TupleMatches() template function. - -TEST(TupleMatchesTest, WorksForSize0) { - tuple<> matchers; - tuple<> values; - - EXPECT_TRUE(TupleMatches(matchers, values)); -} - -TEST(TupleMatchesTest, WorksForSize1) { - tuple > matchers(Eq(1)); - tuple values1(1), - values2(2); - - EXPECT_TRUE(TupleMatches(matchers, values1)); - EXPECT_FALSE(TupleMatches(matchers, values2)); -} - -TEST(TupleMatchesTest, WorksForSize2) { - tuple, Matcher > matchers(Eq(1), Eq('a')); - tuple values1(1, 'a'), - values2(1, 'b'), - values3(2, 'a'), - values4(2, 'b'); - - EXPECT_TRUE(TupleMatches(matchers, values1)); - EXPECT_FALSE(TupleMatches(matchers, values2)); - EXPECT_FALSE(TupleMatches(matchers, values3)); - EXPECT_FALSE(TupleMatches(matchers, values4)); -} - -TEST(TupleMatchesTest, WorksForSize5) { - tuple, Matcher, Matcher, Matcher, // NOLINT - Matcher > - matchers(Eq(1), Eq('a'), Eq(true), Eq(2L), Eq("hi")); - tuple // NOLINT - values1(1, 'a', true, 2L, "hi"), - values2(1, 'a', true, 2L, "hello"), - values3(2, 'a', true, 2L, "hi"); - - EXPECT_TRUE(TupleMatches(matchers, values1)); - EXPECT_FALSE(TupleMatches(matchers, values2)); - EXPECT_FALSE(TupleMatches(matchers, values3)); -} - -// Tests that Assert(true, ...) succeeds. -TEST(AssertTest, SucceedsOnTrue) { - Assert(true, __FILE__, __LINE__, "This should succeed."); - Assert(true, __FILE__, __LINE__); // This should succeed too. -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that Assert(false, ...) generates a fatal failure. -TEST(AssertTest, FailsFatallyOnFalse) { - EXPECT_DEATH({ // NOLINT - Assert(false, __FILE__, __LINE__, "This should fail."); - }, ""); - - EXPECT_DEATH({ // NOLINT - Assert(false, __FILE__, __LINE__); - }, ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that Expect(true, ...) succeeds. -TEST(ExpectTest, SucceedsOnTrue) { - Expect(true, __FILE__, __LINE__, "This should succeed."); - Expect(true, __FILE__, __LINE__); // This should succeed too. -} - -// Tests that Expect(false, ...) generates a non-fatal failure. -TEST(ExpectTest, FailsNonfatallyOnFalse) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - Expect(false, __FILE__, __LINE__, "This should fail."); - }, "This should fail"); - - EXPECT_NONFATAL_FAILURE({ // NOLINT - Expect(false, __FILE__, __LINE__); - }, "Expectation failed"); -} - -// Tests LogIsVisible(). - -class LogIsVisibleTest : public ::testing::Test { - protected: - virtual void SetUp() { - // The code needs to work when both ::string and ::std::string are - // defined and the flag is implemented as a - // testing::internal::String. In this case, without the call to - // c_str(), the compiler will complain that it cannot figure out - // whether the String flag should be converted to a ::string or an - // ::std::string before being assigned to original_verbose_. - original_verbose_ = GMOCK_FLAG(verbose).c_str(); - } - - virtual void TearDown() { GMOCK_FLAG(verbose) = original_verbose_; } - - string original_verbose_; -}; - -TEST_F(LogIsVisibleTest, AlwaysReturnsTrueIfVerbosityIsInfo) { - GMOCK_FLAG(verbose) = kInfoVerbosity; - EXPECT_TRUE(LogIsVisible(INFO)); - EXPECT_TRUE(LogIsVisible(WARNING)); -} - -TEST_F(LogIsVisibleTest, AlwaysReturnsFalseIfVerbosityIsError) { - GMOCK_FLAG(verbose) = kErrorVerbosity; - EXPECT_FALSE(LogIsVisible(INFO)); - EXPECT_FALSE(LogIsVisible(WARNING)); -} - -TEST_F(LogIsVisibleTest, WorksWhenVerbosityIsWarning) { - GMOCK_FLAG(verbose) = kWarningVerbosity; - EXPECT_FALSE(LogIsVisible(INFO)); - EXPECT_TRUE(LogIsVisible(WARNING)); -} - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Tests the Log() function. - -// Verifies that Log() behaves correctly for the given verbosity level -// and log severity. -void TestLogWithSeverity(const string& verbosity, LogSeverity severity, - bool should_print) { - const string old_flag = GMOCK_FLAG(verbose); - GMOCK_FLAG(verbose) = verbosity; - CaptureTestStdout(); - Log(severity, "Test log.\n", 0); - if (should_print) { - EXPECT_PRED2(RE::FullMatch, - GetCapturedTestStdout(), - severity == WARNING ? - "\nGMOCK WARNING:\nTest log\\.\nStack trace:\n[\\s\\S]*" : - "\nTest log\\.\nStack trace:\n[\\s\\S]*"); - } else { - EXPECT_EQ("", GetCapturedTestStdout()); - } - GMOCK_FLAG(verbose) = old_flag; -} - -// Tests that when the stack_frames_to_skip parameter is negative, -// Log() doesn't include the stack trace in the output. -TEST(LogTest, NoStackTraceWhenStackFramesToSkipIsNegative) { - GMOCK_FLAG(verbose) = kInfoVerbosity; - CaptureTestStdout(); - Log(INFO, "Test log.\n", -1); - EXPECT_EQ("\nTest log.\n", GetCapturedTestStdout()); -} - -// Tests that in opt mode, a positive stack_frames_to_skip argument is -// treated as 0. -TEST(LogTest, NoSkippingStackFrameInOptMode) { - CaptureTestStdout(); - Log(WARNING, "Test log.\n", 100); - const string log = GetCapturedTestStdout(); -#ifdef NDEBUG - // In opt mode, no stack frame should be skipped. - EXPECT_THAT(log, ContainsRegex("\nGMOCK WARNING:\n" - "Test log\\.\n" - "Stack trace:\n" - ".+")); -#else - // In dbg mode, the stack frames should be skipped. - EXPECT_EQ("\nGMOCK WARNING:\n" - "Test log.\n" - "Stack trace:\n", log); -#endif // NDEBUG -} - -// Tests that all logs are printed when the value of the -// --gmock_verbose flag is "info". -TEST(LogTest, AllLogsArePrintedWhenVerbosityIsInfo) { - TestLogWithSeverity(kInfoVerbosity, INFO, true); - TestLogWithSeverity(kInfoVerbosity, WARNING, true); -} - -// Tests that only warnings are printed when the value of the -// --gmock_verbose flag is "warning". -TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsWarning) { - TestLogWithSeverity(kWarningVerbosity, INFO, false); - TestLogWithSeverity(kWarningVerbosity, WARNING, true); -} - -// Tests that no logs are printed when the value of the -// --gmock_verbose flag is "error". -TEST(LogTest, NoLogsArePrintedWhenVerbosityIsError) { - TestLogWithSeverity(kErrorVerbosity, INFO, false); - TestLogWithSeverity(kErrorVerbosity, WARNING, false); -} - -// Tests that only warnings are printed when the value of the -// --gmock_verbose flag is invalid. -TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) { - TestLogWithSeverity("invalid", INFO, false); - TestLogWithSeverity("invalid", WARNING, true); -} - -#endif // 0 - -TEST(TypeTraitsTest, true_type) { - EXPECT_TRUE(true_type::value); -} - -TEST(TypeTraitsTest, false_type) { - EXPECT_FALSE(false_type::value); -} - -TEST(TypeTraitsTest, is_reference) { - EXPECT_FALSE(is_reference::value); - EXPECT_FALSE(is_reference::value); - EXPECT_TRUE(is_reference::value); -} - -TEST(TypeTraitsTest, is_pointer) { - EXPECT_FALSE(is_pointer::value); - EXPECT_FALSE(is_pointer::value); - EXPECT_TRUE(is_pointer::value); -} - -TEST(TypeTraitsTest, type_equals) { - EXPECT_FALSE((type_equals::value)); - EXPECT_FALSE((type_equals::value)); - EXPECT_FALSE((type_equals::value)); - EXPECT_TRUE((type_equals::value)); -} - -TEST(TypeTraitsTest, remove_reference) { - EXPECT_TRUE((type_equals::type>::value)); - EXPECT_TRUE((type_equals::type>::value)); - EXPECT_TRUE((type_equals::type>::value)); - EXPECT_TRUE((type_equals::type>::value)); -} - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Verifies that Log() behaves correctly for the given verbosity level -// and log severity. -string GrabOutput(void(*logger)(), const char* verbosity) { - const string saved_flag = GMOCK_FLAG(verbose); - GMOCK_FLAG(verbose) = verbosity; - CaptureTestStdout(); - logger(); - GMOCK_FLAG(verbose) = saved_flag; - return GetCapturedTestStdout(); -} - -class DummyMock { - public: - MOCK_METHOD0(TestMethod, void()); - MOCK_METHOD1(TestMethodArg, void(int dummy)); -}; - -void ExpectCallLogger() { - DummyMock mock; - EXPECT_CALL(mock, TestMethod()); - mock.TestMethod(); -}; - -// Verifies that EXPECT_CALL logs if the --gmock_verbose flag is set to "info". -TEST(ExpectCallTest, LogsWhenVerbosityIsInfo) { - EXPECT_THAT(GrabOutput(ExpectCallLogger, kInfoVerbosity), - HasSubstr("EXPECT_CALL(mock, TestMethod())")); -} - -// Verifies that EXPECT_CALL doesn't log -// if the --gmock_verbose flag is set to "warning". -TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsWarning) { - EXPECT_EQ("", GrabOutput(ExpectCallLogger, kWarningVerbosity)); -} - -// Verifies that EXPECT_CALL doesn't log -// if the --gmock_verbose flag is set to "error". -TEST(ExpectCallTest, DoesNotLogWhenVerbosityIsError) { - EXPECT_EQ("", GrabOutput(ExpectCallLogger, kErrorVerbosity)); -} - -void OnCallLogger() { - DummyMock mock; - ON_CALL(mock, TestMethod()); -}; - -// Verifies that ON_CALL logs if the --gmock_verbose flag is set to "info". -TEST(OnCallTest, LogsWhenVerbosityIsInfo) { - EXPECT_THAT(GrabOutput(OnCallLogger, kInfoVerbosity), - HasSubstr("ON_CALL(mock, TestMethod())")); -} - -// Verifies that ON_CALL doesn't log -// if the --gmock_verbose flag is set to "warning". -TEST(OnCallTest, DoesNotLogWhenVerbosityIsWarning) { - EXPECT_EQ("", GrabOutput(OnCallLogger, kWarningVerbosity)); -} - -// Verifies that ON_CALL doesn't log if -// the --gmock_verbose flag is set to "error". -TEST(OnCallTest, DoesNotLogWhenVerbosityIsError) { - EXPECT_EQ("", GrabOutput(OnCallLogger, kErrorVerbosity)); -} - -void OnCallAnyArgumentLogger() { - DummyMock mock; - ON_CALL(mock, TestMethodArg(_)); -} - -// Verifies that ON_CALL prints provided _ argument. -TEST(OnCallTest, LogsAnythingArgument) { - EXPECT_THAT(GrabOutput(OnCallAnyArgumentLogger, kInfoVerbosity), - HasSubstr("ON_CALL(mock, TestMethodArg(_)")); -} - -#endif // 0 - -// Tests ArrayEq(). - -TEST(ArrayEqTest, WorksForDegeneratedArrays) { - EXPECT_TRUE(ArrayEq(5, 5L)); - EXPECT_FALSE(ArrayEq('a', 0)); -} - -TEST(ArrayEqTest, WorksForOneDimensionalArrays) { - const int a[] = { 0, 1 }; - long b[] = { 0, 1 }; - EXPECT_TRUE(ArrayEq(a, b)); - EXPECT_TRUE(ArrayEq(a, 2, b)); - - b[0] = 2; - EXPECT_FALSE(ArrayEq(a, b)); - EXPECT_FALSE(ArrayEq(a, 1, b)); -} - -TEST(ArrayEqTest, WorksForTwoDimensionalArrays) { - const char a[][3] = { "hi", "lo" }; - const char b[][3] = { "hi", "lo" }; - const char c[][3] = { "hi", "li" }; - - EXPECT_TRUE(ArrayEq(a, b)); - EXPECT_TRUE(ArrayEq(a, 2, b)); - - EXPECT_FALSE(ArrayEq(a, c)); - EXPECT_FALSE(ArrayEq(a, 2, c)); -} - -// Tests ArrayAwareFind(). - -TEST(ArrayAwareFindTest, WorksForOneDimensionalArray) { - const char a[] = "hello"; - EXPECT_EQ(a + 4, ArrayAwareFind(a, a + 5, 'o')); - EXPECT_EQ(a + 5, ArrayAwareFind(a, a + 5, 'x')); -} - -TEST(ArrayAwareFindTest, WorksForTwoDimensionalArray) { - int a[][2] = { { 0, 1 }, { 2, 3 }, { 4, 5 } }; - const int b[2] = { 2, 3 }; - EXPECT_EQ(a + 1, ArrayAwareFind(a, a + 3, b)); - - const int c[2] = { 6, 7 }; - EXPECT_EQ(a + 3, ArrayAwareFind(a, a + 3, c)); -} - -// Tests CopyArray(). - -TEST(CopyArrayTest, WorksForDegeneratedArrays) { - int n = 0; - CopyArray('a', &n); - EXPECT_EQ('a', n); -} - -TEST(CopyArrayTest, WorksForOneDimensionalArrays) { - const char a[3] = "hi"; - int b[3]; - CopyArray(a, &b); - EXPECT_TRUE(ArrayEq(a, b)); - - int c[3]; - CopyArray(a, 3, c); - EXPECT_TRUE(ArrayEq(a, c)); -} - -TEST(CopyArrayTest, WorksForTwoDimensionalArrays) { - const int a[2][3] = { { 0, 1, 2 }, { 3, 4, 5 } }; - int b[2][3]; - CopyArray(a, &b); - EXPECT_TRUE(ArrayEq(a, b)); - - int c[2][3]; - CopyArray(a, 2, c); - EXPECT_TRUE(ArrayEq(a, c)); -} - -// Tests NativeArray. - -TEST(NativeArrayTest, ConstructorFromArrayReferenceWorks) { - const int a[3] = { 0, 1, 2 }; - NativeArray na(a, kReference); - EXPECT_EQ(3, na.size()); - EXPECT_EQ(a, na.begin()); -} - -TEST(NativeArrayTest, ConstructorFromTupleWorks) { - int a[3] = { 0, 1, 2 }; - int* const p = a; - // Tests with a plain pointer. - NativeArray na(make_tuple(p, 3U), kReference); - EXPECT_EQ(a, na.begin()); - - const linked_ptr b(new char); - *b = 'a'; - // Tests with a smart pointer. - NativeArray nb(make_tuple(b, 1), kCopy); - EXPECT_NE(b.get(), nb.begin()); - EXPECT_EQ('a', nb.begin()[0]); -} - -TEST(NativeArrayTest, CreatesAndDeletesCopyOfArrayWhenAskedTo) { - typedef int Array[2]; - Array* a = new Array[1]; - (*a)[0] = 0; - (*a)[1] = 1; - NativeArray na(*a, kCopy); - EXPECT_NE(*a, na.begin()); - delete[] a; - EXPECT_EQ(0, na.begin()[0]); - EXPECT_EQ(1, na.begin()[1]); - - // We rely on the heap checker to verify that na deletes the copy of - // array. -} - -TEST(NativeArrayTest, TypeMembersAreCorrect) { - StaticAssertTypeEq::value_type>(); - StaticAssertTypeEq::value_type>(); - - StaticAssertTypeEq::const_iterator>(); - StaticAssertTypeEq::const_iterator>(); -} - -TEST(NativeArrayTest, MethodsWork) { - const int a[] = { 0, 1, 2 }; - NativeArray na(a, kCopy); - ASSERT_EQ(3, na.size()); - EXPECT_EQ(3, na.end() - na.begin()); - - NativeArray::const_iterator it = na.begin(); - EXPECT_EQ(0, *it); - ++it; - EXPECT_EQ(1, *it); - it++; - EXPECT_EQ(2, *it); - ++it; - EXPECT_EQ(na.end(), it); - - EXPECT_THAT(na, Eq(na)); - - NativeArray na2(a, kReference); - EXPECT_THAT(na, Eq(na2)); - - const int b1[] = { 0, 1, 1 }; - const int b2[] = { 0, 1, 2, 3 }; - EXPECT_THAT(na, Not(Eq(NativeArray(b1, kReference)))); - EXPECT_THAT(na, Not(Eq(NativeArray(b2, kCopy)))); -} - -TEST(NativeArrayTest, WorksForTwoDimensionalArray) { - const char a[2][3] = { "hi", "lo" }; - NativeArray na(a, kReference); - ASSERT_EQ(2, na.size()); - EXPECT_EQ(a, na.begin()); -} - -// Tests StlContainerView. - -TEST(StlContainerViewTest, WorksForStlContainer) { - StaticAssertTypeEq, - StlContainerView >::type>(); - StaticAssertTypeEq&, - StlContainerView >::const_reference>(); - - typedef std::vector Chars; - Chars v1; - const Chars& v2(StlContainerView::ConstReference(v1)); - EXPECT_EQ(&v1, &v2); - - v1.push_back('a'); - Chars v3 = StlContainerView::Copy(v1); - EXPECT_THAT(v3, Eq(v3)); -} - -TEST(StlContainerViewTest, WorksForStaticNativeArray) { - StaticAssertTypeEq, - StlContainerView::type>(); - StaticAssertTypeEq, - StlContainerView::type>(); - StaticAssertTypeEq, - StlContainerView::type>(); - - StaticAssertTypeEq, - StlContainerView::const_reference>(); - - int a1[3] = { 0, 1, 2 }; - NativeArray a2 = StlContainerView::ConstReference(a1); - EXPECT_EQ(3, a2.size()); - EXPECT_EQ(a1, a2.begin()); - - const NativeArray a3 = StlContainerView::Copy(a1); - ASSERT_EQ(3, a3.size()); - EXPECT_EQ(0, a3.begin()[0]); - EXPECT_EQ(1, a3.begin()[1]); - EXPECT_EQ(2, a3.begin()[2]); - - // Makes sure a1 and a3 aren't aliases. - a1[0] = 3; - EXPECT_EQ(0, a3.begin()[0]); -} - -TEST(StlContainerViewTest, WorksForDynamicNativeArray) { - StaticAssertTypeEq, - StlContainerView >::type>(); - StaticAssertTypeEq, - StlContainerView, int> >::type>(); - - StaticAssertTypeEq, - StlContainerView >::const_reference>(); - - int a1[3] = { 0, 1, 2 }; - const int* const p1 = a1; - NativeArray a2 = StlContainerView >:: - ConstReference(make_tuple(p1, 3)); - EXPECT_EQ(3, a2.size()); - EXPECT_EQ(a1, a2.begin()); - - const NativeArray a3 = StlContainerView >:: - Copy(make_tuple(static_cast(a1), 3)); - ASSERT_EQ(3, a3.size()); - EXPECT_EQ(0, a3.begin()[0]); - EXPECT_EQ(1, a3.begin()[1]); - EXPECT_EQ(2, a3.begin()[2]); - - // Makes sure a1 and a3 aren't aliases. - a1[0] = 3; - EXPECT_EQ(0, a3.begin()[0]); -} - -} // namespace -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-matchers_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-matchers_test.cc deleted file mode 100644 index 3541eef7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-matchers_test.cc +++ /dev/null @@ -1,3300 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests some commonly used argument matchers. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace testing { - -namespace internal { -string FormatMatcherDescriptionSyntaxError(const char* description, - const char* error_pos); -int GetParamIndex(const char* param_names[], const string& param_name); -string JoinAsTuple(const Strings& fields); -bool SkipPrefix(const char* prefix, const char** pstr); -} // namespace internal - -namespace gmock_matchers_test { - -using std::stringstream; -using std::tr1::make_tuple; -using testing::A; -using testing::AllArgs; -using testing::AllOf; -using testing::An; -using testing::AnyOf; -using testing::ByRef; -using testing::DoubleEq; -using testing::EndsWith; -using testing::Eq; -using testing::Field; -using testing::FloatEq; -using testing::Ge; -using testing::Gt; -using testing::HasSubstr; -using testing::Le; -using testing::Lt; -using testing::MakeMatcher; -using testing::MakePolymorphicMatcher; -using testing::Matcher; -using testing::MatcherCast; -using testing::MatcherInterface; -using testing::Matches; -using testing::NanSensitiveDoubleEq; -using testing::NanSensitiveFloatEq; -using testing::Ne; -using testing::Not; -using testing::NotNull; -using testing::Pointee; -using testing::PolymorphicMatcher; -using testing::Property; -using testing::Ref; -using testing::ResultOf; -using testing::StartsWith; -using testing::StrCaseEq; -using testing::StrCaseNe; -using testing::StrEq; -using testing::StrNe; -using testing::Truly; -using testing::TypedEq; -using testing::Value; -using testing::_; -using testing::internal::FloatingEqMatcher; -using testing::internal::FormatMatcherDescriptionSyntaxError; -using testing::internal::GetParamIndex; -using testing::internal::Interpolation; -using testing::internal::Interpolations; -using testing::internal::JoinAsTuple; -using testing::internal::SkipPrefix; -using testing::internal::String; -using testing::internal::Strings; -using testing::internal::ValidateMatcherDescription; -using testing::internal::kInvalidInterpolation; -using testing::internal::kPercentInterpolation; -using testing::internal::kTupleInterpolation; -using testing::internal::string; - -#ifdef GMOCK_HAS_REGEX -using testing::ContainsRegex; -using testing::MatchesRegex; -using testing::internal::RE; -#endif // GMOCK_HAS_REGEX - -// Returns the description of the given matcher. -template -string Describe(const Matcher& m) { - stringstream ss; - m.DescribeTo(&ss); - return ss.str(); -} - -// Returns the description of the negation of the given matcher. -template -string DescribeNegation(const Matcher& m) { - stringstream ss; - m.DescribeNegationTo(&ss); - return ss.str(); -} - -// Returns the reason why x matches, or doesn't match, m. -template -string Explain(const MatcherType& m, const Value& x) { - stringstream ss; - m.ExplainMatchResultTo(x, &ss); - return ss.str(); -} - -// Makes sure that the MatcherInterface interface doesn't -// change. -class EvenMatcherImpl : public MatcherInterface { - public: - virtual bool Matches(int x) const { return x % 2 == 0; } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "is an even number"; - } - - // We deliberately don't define DescribeNegationTo() and - // ExplainMatchResultTo() here, to make sure the definition of these - // two methods is optional. -}; - -TEST(MatcherInterfaceTest, CanBeImplemented) { - EvenMatcherImpl m; -} - -// Tests default-constructing a matcher. -TEST(MatcherTest, CanBeDefaultConstructed) { - Matcher m; -} - -// Tests that Matcher can be constructed from a MatcherInterface*. -TEST(MatcherTest, CanBeConstructedFromMatcherInterface) { - const MatcherInterface* impl = new EvenMatcherImpl; - Matcher m(impl); - EXPECT_TRUE(m.Matches(4)); - EXPECT_FALSE(m.Matches(5)); -} - -// Tests that value can be used in place of Eq(value). -TEST(MatcherTest, CanBeImplicitlyConstructedFromValue) { - Matcher m1 = 5; - EXPECT_TRUE(m1.Matches(5)); - EXPECT_FALSE(m1.Matches(6)); -} - -// Tests that NULL can be used in place of Eq(NULL). -TEST(MatcherTest, CanBeImplicitlyConstructedFromNULL) { - Matcher m1 = NULL; - EXPECT_TRUE(m1.Matches(NULL)); - int n = 0; - EXPECT_FALSE(m1.Matches(&n)); -} - -// Tests that matchers are copyable. -TEST(MatcherTest, IsCopyable) { - // Tests the copy constructor. - Matcher m1 = Eq(false); - EXPECT_TRUE(m1.Matches(false)); - EXPECT_FALSE(m1.Matches(true)); - - // Tests the assignment operator. - m1 = Eq(true); - EXPECT_TRUE(m1.Matches(true)); - EXPECT_FALSE(m1.Matches(false)); -} - -// Tests that Matcher::DescribeTo() calls -// MatcherInterface::DescribeTo(). -TEST(MatcherTest, CanDescribeItself) { - EXPECT_EQ("is an even number", - Describe(Matcher(new EvenMatcherImpl))); -} - -// Tests that a C-string literal can be implicitly converted to a -// Matcher or Matcher. -TEST(StringMatcherTest, CanBeImplicitlyConstructedFromCStringLiteral) { - Matcher m1 = "hi"; - EXPECT_TRUE(m1.Matches("hi")); - EXPECT_FALSE(m1.Matches("hello")); - - Matcher m2 = "hi"; - EXPECT_TRUE(m2.Matches("hi")); - EXPECT_FALSE(m2.Matches("hello")); -} - -// Tests that a string object can be implicitly converted to a -// Matcher or Matcher. -TEST(StringMatcherTest, CanBeImplicitlyConstructedFromString) { - Matcher m1 = string("hi"); - EXPECT_TRUE(m1.Matches("hi")); - EXPECT_FALSE(m1.Matches("hello")); - - Matcher m2 = string("hi"); - EXPECT_TRUE(m2.Matches("hi")); - EXPECT_FALSE(m2.Matches("hello")); -} - -// Tests that MakeMatcher() constructs a Matcher from a -// MatcherInterface* without requiring the user to explicitly -// write the type. -TEST(MakeMatcherTest, ConstructsMatcherFromMatcherInterface) { - const MatcherInterface* dummy_impl = NULL; - Matcher m = MakeMatcher(dummy_impl); -} - -// Tests that MakePolymorphicMatcher() constructs a polymorphic -// matcher from its implementation. -const int bar = 1; -class ReferencesBarOrIsZeroImpl { - public: - template - bool Matches(const T& x) const { - const void* p = &x; - return p == &bar || x == 0; - } - - void DescribeTo(::std::ostream* os) const { *os << "bar or zero"; } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't reference bar and is not zero"; - } -}; - -// This function verifies that MakePolymorphicMatcher() returns a -// PolymorphicMatcher where T is the argument's type. -PolymorphicMatcher ReferencesBarOrIsZero() { - return MakePolymorphicMatcher(ReferencesBarOrIsZeroImpl()); -} - -TEST(MakePolymorphicMatcherTest, ConstructsMatcherFromImpl) { - // Using a polymorphic matcher to match a reference type. - Matcher m1 = ReferencesBarOrIsZero(); - EXPECT_TRUE(m1.Matches(0)); - // Verifies that the identity of a by-reference argument is preserved. - EXPECT_TRUE(m1.Matches(bar)); - EXPECT_FALSE(m1.Matches(1)); - EXPECT_EQ("bar or zero", Describe(m1)); - - // Using a polymorphic matcher to match a value type. - Matcher m2 = ReferencesBarOrIsZero(); - EXPECT_TRUE(m2.Matches(0.0)); - EXPECT_FALSE(m2.Matches(0.1)); - EXPECT_EQ("bar or zero", Describe(m2)); -} - -// Tests that MatcherCast(m) works when m is a polymorphic matcher. -TEST(MatcherCastTest, FromPolymorphicMatcher) { - Matcher m = MatcherCast(Eq(5)); - EXPECT_TRUE(m.Matches(5)); - EXPECT_FALSE(m.Matches(6)); -} - -// For testing casting matchers between compatible types. -class IntValue { - public: - // An int can be statically (although not implicitly) cast to a - // IntValue. - explicit IntValue(int value) : value_(value) {} - - int value() const { return value_; } - private: - int value_; -}; - -// For testing casting matchers between compatible types. -bool IsPositiveIntValue(const IntValue& foo) { - return foo.value() > 0; -} - -// Tests that MatcherCast(m) works when m is a Matcher where T -// can be statically converted to U. -TEST(MatcherCastTest, FromCompatibleType) { - Matcher m1 = Eq(2.0); - Matcher m2 = MatcherCast(m1); - EXPECT_TRUE(m2.Matches(2)); - EXPECT_FALSE(m2.Matches(3)); - - Matcher m3 = Truly(IsPositiveIntValue); - Matcher m4 = MatcherCast(m3); - // In the following, the arguments 1 and 0 are statically converted - // to IntValue objects, and then tested by the IsPositiveIntValue() - // predicate. - EXPECT_TRUE(m4.Matches(1)); - EXPECT_FALSE(m4.Matches(0)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(MatcherCastTest, FromConstReferenceToNonReference) { - Matcher m1 = Eq(0); - Matcher m2 = MatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(MatcherCastTest, FromReferenceToNonReference) { - Matcher m1 = Eq(0); - Matcher m2 = MatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(MatcherCastTest, FromNonReferenceToConstReference) { - Matcher m1 = Eq(0); - Matcher m2 = MatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(MatcherCastTest, FromNonReferenceToReference) { - Matcher m1 = Eq(0); - Matcher m2 = MatcherCast(m1); - int n = 0; - EXPECT_TRUE(m2.Matches(n)); - n = 1; - EXPECT_FALSE(m2.Matches(n)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(MatcherCastTest, FromSameType) { - Matcher m1 = Eq(0); - Matcher m2 = MatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -class Base {}; -class Derived : public Base {}; - -// Tests that SafeMatcherCast(m) works when m is a polymorphic matcher. -TEST(SafeMatcherCastTest, FromPolymorphicMatcher) { - Matcher m2 = SafeMatcherCast(Eq(32)); - EXPECT_TRUE(m2.Matches(' ')); - EXPECT_FALSE(m2.Matches('\n')); -} - -// Tests that SafeMatcherCast(m) works when m is a Matcher where -// T and U are arithmetic types and T can be losslessly converted to -// U. -TEST(SafeMatcherCastTest, FromLosslesslyConvertibleArithmeticType) { - Matcher m1 = DoubleEq(1.0); - Matcher m2 = SafeMatcherCast(m1); - EXPECT_TRUE(m2.Matches(1.0f)); - EXPECT_FALSE(m2.Matches(2.0f)); - - Matcher m3 = SafeMatcherCast(TypedEq('a')); - EXPECT_TRUE(m3.Matches('a')); - EXPECT_FALSE(m3.Matches('b')); -} - -// Tests that SafeMatcherCast(m) works when m is a Matcher where T and U -// are pointers or references to a derived and a base class, correspondingly. -TEST(SafeMatcherCastTest, FromBaseClass) { - Derived d, d2; - Matcher m1 = Eq(&d); - Matcher m2 = SafeMatcherCast(m1); - EXPECT_TRUE(m2.Matches(&d)); - EXPECT_FALSE(m2.Matches(&d2)); - - Matcher m3 = Ref(d); - Matcher m4 = SafeMatcherCast(m3); - EXPECT_TRUE(m4.Matches(d)); - EXPECT_FALSE(m4.Matches(d2)); -} - -// Tests that SafeMatcherCast(m) works when m is a Matcher. -TEST(SafeMatcherCastTest, FromConstReferenceToReference) { - int n = 0; - Matcher m1 = Ref(n); - Matcher m2 = SafeMatcherCast(m1); - int n1 = 0; - EXPECT_TRUE(m2.Matches(n)); - EXPECT_FALSE(m2.Matches(n1)); -} - -// Tests that MatcherCast(m) works when m is a Matcher. -TEST(SafeMatcherCastTest, FromNonReferenceToConstReference) { - Matcher m1 = Eq(0); - Matcher m2 = SafeMatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -// Tests that SafeMatcherCast(m) works when m is a Matcher. -TEST(SafeMatcherCastTest, FromNonReferenceToReference) { - Matcher m1 = Eq(0); - Matcher m2 = SafeMatcherCast(m1); - int n = 0; - EXPECT_TRUE(m2.Matches(n)); - n = 1; - EXPECT_FALSE(m2.Matches(n)); -} - -// Tests that SafeMatcherCast(m) works when m is a Matcher. -TEST(SafeMatcherCastTest, FromSameType) { - Matcher m1 = Eq(0); - Matcher m2 = SafeMatcherCast(m1); - EXPECT_TRUE(m2.Matches(0)); - EXPECT_FALSE(m2.Matches(1)); -} - -// Tests that A() matches any value of type T. -TEST(ATest, MatchesAnyValue) { - // Tests a matcher for a value type. - Matcher m1 = A(); - EXPECT_TRUE(m1.Matches(91.43)); - EXPECT_TRUE(m1.Matches(-15.32)); - - // Tests a matcher for a reference type. - int a = 2; - int b = -6; - Matcher m2 = A(); - EXPECT_TRUE(m2.Matches(a)); - EXPECT_TRUE(m2.Matches(b)); -} - -// Tests that A() describes itself properly. -TEST(ATest, CanDescribeSelf) { - EXPECT_EQ("is anything", Describe(A())); -} - -// Tests that An() matches any value of type T. -TEST(AnTest, MatchesAnyValue) { - // Tests a matcher for a value type. - Matcher m1 = An(); - EXPECT_TRUE(m1.Matches(9143)); - EXPECT_TRUE(m1.Matches(-1532)); - - // Tests a matcher for a reference type. - int a = 2; - int b = -6; - Matcher m2 = An(); - EXPECT_TRUE(m2.Matches(a)); - EXPECT_TRUE(m2.Matches(b)); -} - -// Tests that An() describes itself properly. -TEST(AnTest, CanDescribeSelf) { - EXPECT_EQ("is anything", Describe(An())); -} - -// Tests that _ can be used as a matcher for any type and matches any -// value of that type. -TEST(UnderscoreTest, MatchesAnyValue) { - // Uses _ as a matcher for a value type. - Matcher m1 = _; - EXPECT_TRUE(m1.Matches(123)); - EXPECT_TRUE(m1.Matches(-242)); - - // Uses _ as a matcher for a reference type. - bool a = false; - const bool b = true; - Matcher m2 = _; - EXPECT_TRUE(m2.Matches(a)); - EXPECT_TRUE(m2.Matches(b)); -} - -// Tests that _ describes itself properly. -TEST(UnderscoreTest, CanDescribeSelf) { - Matcher m = _; - EXPECT_EQ("is anything", Describe(m)); -} - -// Tests that Eq(x) matches any value equal to x. -TEST(EqTest, MatchesEqualValue) { - // 2 C-strings with same content but different addresses. - const char a1[] = "hi"; - const char a2[] = "hi"; - - Matcher m1 = Eq(a1); - EXPECT_TRUE(m1.Matches(a1)); - EXPECT_FALSE(m1.Matches(a2)); -} - -// Tests that Eq(v) describes itself properly. - -class Unprintable { - public: - Unprintable() : c_('a') {} - - bool operator==(const Unprintable& rhs) { return true; } - private: - char c_; -}; - -TEST(EqTest, CanDescribeSelf) { - Matcher m = Eq(Unprintable()); - EXPECT_EQ("is equal to 1-byte object <61>", Describe(m)); -} - -// Tests that Eq(v) can be used to match any type that supports -// comparing with type T, where T is v's type. -TEST(EqTest, IsPolymorphic) { - Matcher m1 = Eq(1); - EXPECT_TRUE(m1.Matches(1)); - EXPECT_FALSE(m1.Matches(2)); - - Matcher m2 = Eq(1); - EXPECT_TRUE(m2.Matches('\1')); - EXPECT_FALSE(m2.Matches('a')); -} - -// Tests that TypedEq(v) matches values of type T that's equal to v. -TEST(TypedEqTest, ChecksEqualityForGivenType) { - Matcher m1 = TypedEq('a'); - EXPECT_TRUE(m1.Matches('a')); - EXPECT_FALSE(m1.Matches('b')); - - Matcher m2 = TypedEq(6); - EXPECT_TRUE(m2.Matches(6)); - EXPECT_FALSE(m2.Matches(7)); -} - -// Tests that TypedEq(v) describes itself properly. -TEST(TypedEqTest, CanDescribeSelf) { - EXPECT_EQ("is equal to 2", Describe(TypedEq(2))); -} - -// Tests that TypedEq(v) has type Matcher. - -// Type::IsTypeOf(v) compiles iff the type of value v is T, where T -// is a "bare" type (i.e. not in the form of const U or U&). If v's -// type is not T, the compiler will generate a message about -// "undefined referece". -template -struct Type { - static bool IsTypeOf(const T& v) { return true; } - - template - static void IsTypeOf(T2 v); -}; - -TEST(TypedEqTest, HasSpecifiedType) { - // Verfies that the type of TypedEq(v) is Matcher. - Type >::IsTypeOf(TypedEq(5)); - Type >::IsTypeOf(TypedEq(5)); -} - -// Tests that Ge(v) matches anything >= v. -TEST(GeTest, ImplementsGreaterThanOrEqual) { - Matcher m1 = Ge(0); - EXPECT_TRUE(m1.Matches(1)); - EXPECT_TRUE(m1.Matches(0)); - EXPECT_FALSE(m1.Matches(-1)); -} - -// Tests that Ge(v) describes itself properly. -TEST(GeTest, CanDescribeSelf) { - Matcher m = Ge(5); - EXPECT_EQ("is greater than or equal to 5", Describe(m)); -} - -// Tests that Gt(v) matches anything > v. -TEST(GtTest, ImplementsGreaterThan) { - Matcher m1 = Gt(0); - EXPECT_TRUE(m1.Matches(1.0)); - EXPECT_FALSE(m1.Matches(0.0)); - EXPECT_FALSE(m1.Matches(-1.0)); -} - -// Tests that Gt(v) describes itself properly. -TEST(GtTest, CanDescribeSelf) { - Matcher m = Gt(5); - EXPECT_EQ("is greater than 5", Describe(m)); -} - -// Tests that Le(v) matches anything <= v. -TEST(LeTest, ImplementsLessThanOrEqual) { - Matcher m1 = Le('b'); - EXPECT_TRUE(m1.Matches('a')); - EXPECT_TRUE(m1.Matches('b')); - EXPECT_FALSE(m1.Matches('c')); -} - -// Tests that Le(v) describes itself properly. -TEST(LeTest, CanDescribeSelf) { - Matcher m = Le(5); - EXPECT_EQ("is less than or equal to 5", Describe(m)); -} - -// Tests that Lt(v) matches anything < v. -TEST(LtTest, ImplementsLessThan) { - Matcher m1 = Lt("Hello"); - EXPECT_TRUE(m1.Matches("Abc")); - EXPECT_FALSE(m1.Matches("Hello")); - EXPECT_FALSE(m1.Matches("Hello, world!")); -} - -// Tests that Lt(v) describes itself properly. -TEST(LtTest, CanDescribeSelf) { - Matcher m = Lt(5); - EXPECT_EQ("is less than 5", Describe(m)); -} - -// Tests that Ne(v) matches anything != v. -TEST(NeTest, ImplementsNotEqual) { - Matcher m1 = Ne(0); - EXPECT_TRUE(m1.Matches(1)); - EXPECT_TRUE(m1.Matches(-1)); - EXPECT_FALSE(m1.Matches(0)); -} - -// Tests that Ne(v) describes itself properly. -TEST(NeTest, CanDescribeSelf) { - Matcher m = Ne(5); - EXPECT_EQ("is not equal to 5", Describe(m)); -} - -// Tests that NotNull() matches any non-NULL pointer of any type. -TEST(NotNullTest, MatchesNonNullPointer) { - Matcher m1 = NotNull(); - int* p1 = NULL; - int n = 0; - EXPECT_FALSE(m1.Matches(p1)); - EXPECT_TRUE(m1.Matches(&n)); - - Matcher m2 = NotNull(); - const char* p2 = NULL; - EXPECT_FALSE(m2.Matches(p2)); - EXPECT_TRUE(m2.Matches("hi")); -} - -// Tests that NotNull() describes itself properly. -TEST(NotNullTest, CanDescribeSelf) { - Matcher m = NotNull(); - EXPECT_EQ("is not NULL", Describe(m)); -} - -// Tests that Ref(variable) matches an argument that references -// 'variable'. -TEST(RefTest, MatchesSameVariable) { - int a = 0; - int b = 0; - Matcher m = Ref(a); - EXPECT_TRUE(m.Matches(a)); - EXPECT_FALSE(m.Matches(b)); -} - -// Tests that Ref(variable) describes itself properly. -TEST(RefTest, CanDescribeSelf) { - int n = 5; - Matcher m = Ref(n); - stringstream ss; - ss << "references the variable @" << &n << " 5"; - EXPECT_EQ(string(ss.str()), Describe(m)); -} - -// Test that Ref(non_const_varialbe) can be used as a matcher for a -// const reference. -TEST(RefTest, CanBeUsedAsMatcherForConstReference) { - int a = 0; - int b = 0; - Matcher m = Ref(a); - EXPECT_TRUE(m.Matches(a)); - EXPECT_FALSE(m.Matches(b)); -} - -// Tests that Ref(variable) is covariant, i.e. Ref(derived) can be -// used wherever Ref(base) can be used (Ref(derived) is a sub-type -// of Ref(base), but not vice versa. - -TEST(RefTest, IsCovariant) { - Base base, base2; - Derived derived; - Matcher m1 = Ref(base); - EXPECT_TRUE(m1.Matches(base)); - EXPECT_FALSE(m1.Matches(base2)); - EXPECT_FALSE(m1.Matches(derived)); - - m1 = Ref(derived); - EXPECT_TRUE(m1.Matches(derived)); - EXPECT_FALSE(m1.Matches(base)); - EXPECT_FALSE(m1.Matches(base2)); -} - -// Tests string comparison matchers. - -TEST(StrEqTest, MatchesEqualString) { - Matcher m = StrEq(string("Hello")); - EXPECT_TRUE(m.Matches("Hello")); - EXPECT_FALSE(m.Matches("hello")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrEq("Hello"); - EXPECT_TRUE(m2.Matches("Hello")); - EXPECT_FALSE(m2.Matches("Hi")); -} - -TEST(StrEqTest, CanDescribeSelf) { - Matcher m = StrEq("Hi-\'\"\?\\\a\b\f\n\r\t\v\xD3"); - EXPECT_EQ("is equal to \"Hi-\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v\\xD3\"", - Describe(m)); - - string str("01204500800"); - str[3] = '\0'; - Matcher m2 = StrEq(str); - EXPECT_EQ("is equal to \"012\\04500800\"", Describe(m2)); - str[0] = str[6] = str[7] = str[9] = str[10] = '\0'; - Matcher m3 = StrEq(str); - EXPECT_EQ("is equal to \"\\012\\045\\0\\08\\0\\0\"", Describe(m3)); -} - -TEST(StrNeTest, MatchesUnequalString) { - Matcher m = StrNe("Hello"); - EXPECT_TRUE(m.Matches("")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches("Hello")); - - Matcher m2 = StrNe(string("Hello")); - EXPECT_TRUE(m2.Matches("hello")); - EXPECT_FALSE(m2.Matches("Hello")); -} - -TEST(StrNeTest, CanDescribeSelf) { - Matcher m = StrNe("Hi"); - EXPECT_EQ("is not equal to \"Hi\"", Describe(m)); -} - -TEST(StrCaseEqTest, MatchesEqualStringIgnoringCase) { - Matcher m = StrCaseEq(string("Hello")); - EXPECT_TRUE(m.Matches("Hello")); - EXPECT_TRUE(m.Matches("hello")); - EXPECT_FALSE(m.Matches("Hi")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrCaseEq("Hello"); - EXPECT_TRUE(m2.Matches("hello")); - EXPECT_FALSE(m2.Matches("Hi")); -} - -TEST(StrCaseEqTest, MatchesEqualStringWith0IgnoringCase) { - string str1("oabocdooeoo"); - string str2("OABOCDOOEOO"); - Matcher m0 = StrCaseEq(str1); - EXPECT_FALSE(m0.Matches(str2 + string(1, '\0'))); - - str1[3] = str2[3] = '\0'; - Matcher m1 = StrCaseEq(str1); - EXPECT_TRUE(m1.Matches(str2)); - - str1[0] = str1[6] = str1[7] = str1[10] = '\0'; - str2[0] = str2[6] = str2[7] = str2[10] = '\0'; - Matcher m2 = StrCaseEq(str1); - str1[9] = str2[9] = '\0'; - EXPECT_FALSE(m2.Matches(str2)); - - Matcher m3 = StrCaseEq(str1); - EXPECT_TRUE(m3.Matches(str2)); - - EXPECT_FALSE(m3.Matches(str2 + "x")); - str2.append(1, '\0'); - EXPECT_FALSE(m3.Matches(str2)); - EXPECT_FALSE(m3.Matches(string(str2, 0, 9))); -} - -TEST(StrCaseEqTest, CanDescribeSelf) { - Matcher m = StrCaseEq("Hi"); - EXPECT_EQ("is equal to (ignoring case) \"Hi\"", Describe(m)); -} - -TEST(StrCaseNeTest, MatchesUnequalStringIgnoringCase) { - Matcher m = StrCaseNe("Hello"); - EXPECT_TRUE(m.Matches("Hi")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches("Hello")); - EXPECT_FALSE(m.Matches("hello")); - - Matcher m2 = StrCaseNe(string("Hello")); - EXPECT_TRUE(m2.Matches("")); - EXPECT_FALSE(m2.Matches("Hello")); -} - -TEST(StrCaseNeTest, CanDescribeSelf) { - Matcher m = StrCaseNe("Hi"); - EXPECT_EQ("is not equal to (ignoring case) \"Hi\"", Describe(m)); -} - -// Tests that HasSubstr() works for matching string-typed values. -TEST(HasSubstrTest, WorksForStringClasses) { - const Matcher m1 = HasSubstr("foo"); - EXPECT_TRUE(m1.Matches(string("I love food."))); - EXPECT_FALSE(m1.Matches(string("tofo"))); - - const Matcher m2 = HasSubstr("foo"); - EXPECT_TRUE(m2.Matches(std::string("I love food."))); - EXPECT_FALSE(m2.Matches(std::string("tofo"))); -} - -// Tests that HasSubstr() works for matching C-string-typed values. -TEST(HasSubstrTest, WorksForCStrings) { - const Matcher m1 = HasSubstr("foo"); - EXPECT_TRUE(m1.Matches(const_cast("I love food."))); - EXPECT_FALSE(m1.Matches(const_cast("tofo"))); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = HasSubstr("foo"); - EXPECT_TRUE(m2.Matches("I love food.")); - EXPECT_FALSE(m2.Matches("tofo")); - EXPECT_FALSE(m2.Matches(NULL)); -} - -// Tests that HasSubstr(s) describes itself properly. -TEST(HasSubstrTest, CanDescribeSelf) { - Matcher m = HasSubstr("foo\n\""); - EXPECT_EQ("has substring \"foo\\n\\\"\"", Describe(m)); -} - -// Tests StartsWith(s). - -TEST(StartsWithTest, MatchesStringWithGivenPrefix) { - const Matcher m1 = StartsWith(string("")); - EXPECT_TRUE(m1.Matches("Hi")); - EXPECT_TRUE(m1.Matches("")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = StartsWith("Hi"); - EXPECT_TRUE(m2.Matches("Hi")); - EXPECT_TRUE(m2.Matches("Hi Hi!")); - EXPECT_TRUE(m2.Matches("High")); - EXPECT_FALSE(m2.Matches("H")); - EXPECT_FALSE(m2.Matches(" Hi")); -} - -TEST(StartsWithTest, CanDescribeSelf) { - Matcher m = StartsWith("Hi"); - EXPECT_EQ("starts with \"Hi\"", Describe(m)); -} - -// Tests EndsWith(s). - -TEST(EndsWithTest, MatchesStringWithGivenSuffix) { - const Matcher m1 = EndsWith(""); - EXPECT_TRUE(m1.Matches("Hi")); - EXPECT_TRUE(m1.Matches("")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = EndsWith(string("Hi")); - EXPECT_TRUE(m2.Matches("Hi")); - EXPECT_TRUE(m2.Matches("Wow Hi Hi")); - EXPECT_TRUE(m2.Matches("Super Hi")); - EXPECT_FALSE(m2.Matches("i")); - EXPECT_FALSE(m2.Matches("Hi ")); -} - -TEST(EndsWithTest, CanDescribeSelf) { - Matcher m = EndsWith("Hi"); - EXPECT_EQ("ends with \"Hi\"", Describe(m)); -} - -#ifdef GMOCK_HAS_REGEX - -// Tests MatchesRegex(). - -TEST(MatchesRegexTest, MatchesStringMatchingGivenRegex) { - const Matcher m1 = MatchesRegex("a.*z"); - EXPECT_TRUE(m1.Matches("az")); - EXPECT_TRUE(m1.Matches("abcz")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = MatchesRegex(new RE("a.*z")); - EXPECT_TRUE(m2.Matches("azbz")); - EXPECT_FALSE(m2.Matches("az1")); - EXPECT_FALSE(m2.Matches("1az")); -} - -TEST(MatchesRegexTest, CanDescribeSelf) { - Matcher m1 = MatchesRegex(string("Hi.*")); - EXPECT_EQ("matches regular expression \"Hi.*\"", Describe(m1)); - - Matcher m2 = MatchesRegex(new RE("[a-z].*")); - EXPECT_EQ("matches regular expression \"[a-z].*\"", Describe(m2)); -} - -// Tests ContainsRegex(). - -TEST(ContainsRegexTest, MatchesStringContainingGivenRegex) { - const Matcher m1 = ContainsRegex(string("a.*z")); - EXPECT_TRUE(m1.Matches("az")); - EXPECT_TRUE(m1.Matches("0abcz1")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = ContainsRegex(new RE("a.*z")); - EXPECT_TRUE(m2.Matches("azbz")); - EXPECT_TRUE(m2.Matches("az1")); - EXPECT_FALSE(m2.Matches("1a")); -} - -TEST(ContainsRegexTest, CanDescribeSelf) { - Matcher m1 = ContainsRegex("Hi.*"); - EXPECT_EQ("contains regular expression \"Hi.*\"", Describe(m1)); - - Matcher m2 = ContainsRegex(new RE("[a-z].*")); - EXPECT_EQ("contains regular expression \"[a-z].*\"", Describe(m2)); -} -#endif // GMOCK_HAS_REGEX - -// Tests for wide strings. -#if GTEST_HAS_STD_WSTRING -TEST(StdWideStrEqTest, MatchesEqual) { - Matcher m = StrEq(::std::wstring(L"Hello")); - EXPECT_TRUE(m.Matches(L"Hello")); - EXPECT_FALSE(m.Matches(L"hello")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrEq(L"Hello"); - EXPECT_TRUE(m2.Matches(L"Hello")); - EXPECT_FALSE(m2.Matches(L"Hi")); - - Matcher m3 = StrEq(L"\xD3\x576\x8D3\xC74D"); - EXPECT_TRUE(m3.Matches(L"\xD3\x576\x8D3\xC74D")); - EXPECT_FALSE(m3.Matches(L"\xD3\x576\x8D3\xC74E")); - - ::std::wstring str(L"01204500800"); - str[3] = L'\0'; - Matcher m4 = StrEq(str); - EXPECT_TRUE(m4.Matches(str)); - str[0] = str[6] = str[7] = str[9] = str[10] = L'\0'; - Matcher m5 = StrEq(str); - EXPECT_TRUE(m5.Matches(str)); -} - -TEST(StdWideStrEqTest, CanDescribeSelf) { - Matcher< ::std::wstring> m = StrEq(L"Hi-\'\"\?\\\a\b\f\n\r\t\v"); - EXPECT_EQ("is equal to L\"Hi-\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v\"", - Describe(m)); - - Matcher< ::std::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D"); - EXPECT_EQ("is equal to L\"\\xD3\\x576\\x8D3\\xC74D\"", - Describe(m2)); - - ::std::wstring str(L"01204500800"); - str[3] = L'\0'; - Matcher m4 = StrEq(str); - EXPECT_EQ("is equal to L\"012\\04500800\"", Describe(m4)); - str[0] = str[6] = str[7] = str[9] = str[10] = L'\0'; - Matcher m5 = StrEq(str); - EXPECT_EQ("is equal to L\"\\012\\045\\0\\08\\0\\0\"", Describe(m5)); -} - -TEST(StdWideStrNeTest, MatchesUnequalString) { - Matcher m = StrNe(L"Hello"); - EXPECT_TRUE(m.Matches(L"")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches(L"Hello")); - - Matcher< ::std::wstring> m2 = StrNe(::std::wstring(L"Hello")); - EXPECT_TRUE(m2.Matches(L"hello")); - EXPECT_FALSE(m2.Matches(L"Hello")); -} - -TEST(StdWideStrNeTest, CanDescribeSelf) { - Matcher m = StrNe(L"Hi"); - EXPECT_EQ("is not equal to L\"Hi\"", Describe(m)); -} - -TEST(StdWideStrCaseEqTest, MatchesEqualStringIgnoringCase) { - Matcher m = StrCaseEq(::std::wstring(L"Hello")); - EXPECT_TRUE(m.Matches(L"Hello")); - EXPECT_TRUE(m.Matches(L"hello")); - EXPECT_FALSE(m.Matches(L"Hi")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrCaseEq(L"Hello"); - EXPECT_TRUE(m2.Matches(L"hello")); - EXPECT_FALSE(m2.Matches(L"Hi")); -} - -TEST(StdWideStrCaseEqTest, MatchesEqualStringWith0IgnoringCase) { - ::std::wstring str1(L"oabocdooeoo"); - ::std::wstring str2(L"OABOCDOOEOO"); - Matcher m0 = StrCaseEq(str1); - EXPECT_FALSE(m0.Matches(str2 + ::std::wstring(1, L'\0'))); - - str1[3] = str2[3] = L'\0'; - Matcher m1 = StrCaseEq(str1); - EXPECT_TRUE(m1.Matches(str2)); - - str1[0] = str1[6] = str1[7] = str1[10] = L'\0'; - str2[0] = str2[6] = str2[7] = str2[10] = L'\0'; - Matcher m2 = StrCaseEq(str1); - str1[9] = str2[9] = L'\0'; - EXPECT_FALSE(m2.Matches(str2)); - - Matcher m3 = StrCaseEq(str1); - EXPECT_TRUE(m3.Matches(str2)); - - EXPECT_FALSE(m3.Matches(str2 + L"x")); - str2.append(1, L'\0'); - EXPECT_FALSE(m3.Matches(str2)); - EXPECT_FALSE(m3.Matches(::std::wstring(str2, 0, 9))); -} - -TEST(StdWideStrCaseEqTest, CanDescribeSelf) { - Matcher< ::std::wstring> m = StrCaseEq(L"Hi"); - EXPECT_EQ("is equal to (ignoring case) L\"Hi\"", Describe(m)); -} - -TEST(StdWideStrCaseNeTest, MatchesUnequalStringIgnoringCase) { - Matcher m = StrCaseNe(L"Hello"); - EXPECT_TRUE(m.Matches(L"Hi")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches(L"Hello")); - EXPECT_FALSE(m.Matches(L"hello")); - - Matcher< ::std::wstring> m2 = StrCaseNe(::std::wstring(L"Hello")); - EXPECT_TRUE(m2.Matches(L"")); - EXPECT_FALSE(m2.Matches(L"Hello")); -} - -TEST(StdWideStrCaseNeTest, CanDescribeSelf) { - Matcher m = StrCaseNe(L"Hi"); - EXPECT_EQ("is not equal to (ignoring case) L\"Hi\"", Describe(m)); -} - -// Tests that HasSubstr() works for matching wstring-typed values. -TEST(StdWideHasSubstrTest, WorksForStringClasses) { - const Matcher< ::std::wstring> m1 = HasSubstr(L"foo"); - EXPECT_TRUE(m1.Matches(::std::wstring(L"I love food."))); - EXPECT_FALSE(m1.Matches(::std::wstring(L"tofo"))); - - const Matcher m2 = HasSubstr(L"foo"); - EXPECT_TRUE(m2.Matches(::std::wstring(L"I love food."))); - EXPECT_FALSE(m2.Matches(::std::wstring(L"tofo"))); -} - -// Tests that HasSubstr() works for matching C-wide-string-typed values. -TEST(StdWideHasSubstrTest, WorksForCStrings) { - const Matcher m1 = HasSubstr(L"foo"); - EXPECT_TRUE(m1.Matches(const_cast(L"I love food."))); - EXPECT_FALSE(m1.Matches(const_cast(L"tofo"))); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = HasSubstr(L"foo"); - EXPECT_TRUE(m2.Matches(L"I love food.")); - EXPECT_FALSE(m2.Matches(L"tofo")); - EXPECT_FALSE(m2.Matches(NULL)); -} - -// Tests that HasSubstr(s) describes itself properly. -TEST(StdWideHasSubstrTest, CanDescribeSelf) { - Matcher< ::std::wstring> m = HasSubstr(L"foo\n\""); - EXPECT_EQ("has substring L\"foo\\n\\\"\"", Describe(m)); -} - -// Tests StartsWith(s). - -TEST(StdWideStartsWithTest, MatchesStringWithGivenPrefix) { - const Matcher m1 = StartsWith(::std::wstring(L"")); - EXPECT_TRUE(m1.Matches(L"Hi")); - EXPECT_TRUE(m1.Matches(L"")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = StartsWith(L"Hi"); - EXPECT_TRUE(m2.Matches(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Hi Hi!")); - EXPECT_TRUE(m2.Matches(L"High")); - EXPECT_FALSE(m2.Matches(L"H")); - EXPECT_FALSE(m2.Matches(L" Hi")); -} - -TEST(StdWideStartsWithTest, CanDescribeSelf) { - Matcher m = StartsWith(L"Hi"); - EXPECT_EQ("starts with L\"Hi\"", Describe(m)); -} - -// Tests EndsWith(s). - -TEST(StdWideEndsWithTest, MatchesStringWithGivenSuffix) { - const Matcher m1 = EndsWith(L""); - EXPECT_TRUE(m1.Matches(L"Hi")); - EXPECT_TRUE(m1.Matches(L"")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = EndsWith(::std::wstring(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Wow Hi Hi")); - EXPECT_TRUE(m2.Matches(L"Super Hi")); - EXPECT_FALSE(m2.Matches(L"i")); - EXPECT_FALSE(m2.Matches(L"Hi ")); -} - -TEST(StdWideEndsWithTest, CanDescribeSelf) { - Matcher m = EndsWith(L"Hi"); - EXPECT_EQ("ends with L\"Hi\"", Describe(m)); -} - -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING -TEST(GlobalWideStrEqTest, MatchesEqual) { - Matcher m = StrEq(::wstring(L"Hello")); - EXPECT_TRUE(m.Matches(L"Hello")); - EXPECT_FALSE(m.Matches(L"hello")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrEq(L"Hello"); - EXPECT_TRUE(m2.Matches(L"Hello")); - EXPECT_FALSE(m2.Matches(L"Hi")); - - Matcher m3 = StrEq(L"\xD3\x576\x8D3\xC74D"); - EXPECT_TRUE(m3.Matches(L"\xD3\x576\x8D3\xC74D")); - EXPECT_FALSE(m3.Matches(L"\xD3\x576\x8D3\xC74E")); - - ::wstring str(L"01204500800"); - str[3] = L'\0'; - Matcher m4 = StrEq(str); - EXPECT_TRUE(m4.Matches(str)); - str[0] = str[6] = str[7] = str[9] = str[10] = L'\0'; - Matcher m5 = StrEq(str); - EXPECT_TRUE(m5.Matches(str)); -} - -TEST(GlobalWideStrEqTest, CanDescribeSelf) { - Matcher< ::wstring> m = StrEq(L"Hi-\'\"\?\\\a\b\f\n\r\t\v"); - EXPECT_EQ("is equal to L\"Hi-\'\\\"\\?\\\\\\a\\b\\f\\n\\r\\t\\v\"", - Describe(m)); - - Matcher< ::wstring> m2 = StrEq(L"\xD3\x576\x8D3\xC74D"); - EXPECT_EQ("is equal to L\"\\xD3\\x576\\x8D3\\xC74D\"", - Describe(m2)); - - ::wstring str(L"01204500800"); - str[3] = L'\0'; - Matcher m4 = StrEq(str); - EXPECT_EQ("is equal to L\"012\\04500800\"", Describe(m4)); - str[0] = str[6] = str[7] = str[9] = str[10] = L'\0'; - Matcher m5 = StrEq(str); - EXPECT_EQ("is equal to L\"\\012\\045\\0\\08\\0\\0\"", Describe(m5)); -} - -TEST(GlobalWideStrNeTest, MatchesUnequalString) { - Matcher m = StrNe(L"Hello"); - EXPECT_TRUE(m.Matches(L"")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches(L"Hello")); - - Matcher< ::wstring> m2 = StrNe(::wstring(L"Hello")); - EXPECT_TRUE(m2.Matches(L"hello")); - EXPECT_FALSE(m2.Matches(L"Hello")); -} - -TEST(GlobalWideStrNeTest, CanDescribeSelf) { - Matcher m = StrNe(L"Hi"); - EXPECT_EQ("is not equal to L\"Hi\"", Describe(m)); -} - -TEST(GlobalWideStrCaseEqTest, MatchesEqualStringIgnoringCase) { - Matcher m = StrCaseEq(::wstring(L"Hello")); - EXPECT_TRUE(m.Matches(L"Hello")); - EXPECT_TRUE(m.Matches(L"hello")); - EXPECT_FALSE(m.Matches(L"Hi")); - EXPECT_FALSE(m.Matches(NULL)); - - Matcher m2 = StrCaseEq(L"Hello"); - EXPECT_TRUE(m2.Matches(L"hello")); - EXPECT_FALSE(m2.Matches(L"Hi")); -} - -TEST(GlobalWideStrCaseEqTest, MatchesEqualStringWith0IgnoringCase) { - ::wstring str1(L"oabocdooeoo"); - ::wstring str2(L"OABOCDOOEOO"); - Matcher m0 = StrCaseEq(str1); - EXPECT_FALSE(m0.Matches(str2 + ::wstring(1, L'\0'))); - - str1[3] = str2[3] = L'\0'; - Matcher m1 = StrCaseEq(str1); - EXPECT_TRUE(m1.Matches(str2)); - - str1[0] = str1[6] = str1[7] = str1[10] = L'\0'; - str2[0] = str2[6] = str2[7] = str2[10] = L'\0'; - Matcher m2 = StrCaseEq(str1); - str1[9] = str2[9] = L'\0'; - EXPECT_FALSE(m2.Matches(str2)); - - Matcher m3 = StrCaseEq(str1); - EXPECT_TRUE(m3.Matches(str2)); - - EXPECT_FALSE(m3.Matches(str2 + L"x")); - str2.append(1, L'\0'); - EXPECT_FALSE(m3.Matches(str2)); - EXPECT_FALSE(m3.Matches(::wstring(str2, 0, 9))); -} - -TEST(GlobalWideStrCaseEqTest, CanDescribeSelf) { - Matcher< ::wstring> m = StrCaseEq(L"Hi"); - EXPECT_EQ("is equal to (ignoring case) L\"Hi\"", Describe(m)); -} - -TEST(GlobalWideStrCaseNeTest, MatchesUnequalStringIgnoringCase) { - Matcher m = StrCaseNe(L"Hello"); - EXPECT_TRUE(m.Matches(L"Hi")); - EXPECT_TRUE(m.Matches(NULL)); - EXPECT_FALSE(m.Matches(L"Hello")); - EXPECT_FALSE(m.Matches(L"hello")); - - Matcher< ::wstring> m2 = StrCaseNe(::wstring(L"Hello")); - EXPECT_TRUE(m2.Matches(L"")); - EXPECT_FALSE(m2.Matches(L"Hello")); -} - -TEST(GlobalWideStrCaseNeTest, CanDescribeSelf) { - Matcher m = StrCaseNe(L"Hi"); - EXPECT_EQ("is not equal to (ignoring case) L\"Hi\"", Describe(m)); -} - -// Tests that HasSubstr() works for matching wstring-typed values. -TEST(GlobalWideHasSubstrTest, WorksForStringClasses) { - const Matcher< ::wstring> m1 = HasSubstr(L"foo"); - EXPECT_TRUE(m1.Matches(::wstring(L"I love food."))); - EXPECT_FALSE(m1.Matches(::wstring(L"tofo"))); - - const Matcher m2 = HasSubstr(L"foo"); - EXPECT_TRUE(m2.Matches(::wstring(L"I love food."))); - EXPECT_FALSE(m2.Matches(::wstring(L"tofo"))); -} - -// Tests that HasSubstr() works for matching C-wide-string-typed values. -TEST(GlobalWideHasSubstrTest, WorksForCStrings) { - const Matcher m1 = HasSubstr(L"foo"); - EXPECT_TRUE(m1.Matches(const_cast(L"I love food."))); - EXPECT_FALSE(m1.Matches(const_cast(L"tofo"))); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = HasSubstr(L"foo"); - EXPECT_TRUE(m2.Matches(L"I love food.")); - EXPECT_FALSE(m2.Matches(L"tofo")); - EXPECT_FALSE(m2.Matches(NULL)); -} - -// Tests that HasSubstr(s) describes itself properly. -TEST(GlobalWideHasSubstrTest, CanDescribeSelf) { - Matcher< ::wstring> m = HasSubstr(L"foo\n\""); - EXPECT_EQ("has substring L\"foo\\n\\\"\"", Describe(m)); -} - -// Tests StartsWith(s). - -TEST(GlobalWideStartsWithTest, MatchesStringWithGivenPrefix) { - const Matcher m1 = StartsWith(::wstring(L"")); - EXPECT_TRUE(m1.Matches(L"Hi")); - EXPECT_TRUE(m1.Matches(L"")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = StartsWith(L"Hi"); - EXPECT_TRUE(m2.Matches(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Hi Hi!")); - EXPECT_TRUE(m2.Matches(L"High")); - EXPECT_FALSE(m2.Matches(L"H")); - EXPECT_FALSE(m2.Matches(L" Hi")); -} - -TEST(GlobalWideStartsWithTest, CanDescribeSelf) { - Matcher m = StartsWith(L"Hi"); - EXPECT_EQ("starts with L\"Hi\"", Describe(m)); -} - -// Tests EndsWith(s). - -TEST(GlobalWideEndsWithTest, MatchesStringWithGivenSuffix) { - const Matcher m1 = EndsWith(L""); - EXPECT_TRUE(m1.Matches(L"Hi")); - EXPECT_TRUE(m1.Matches(L"")); - EXPECT_FALSE(m1.Matches(NULL)); - - const Matcher m2 = EndsWith(::wstring(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Hi")); - EXPECT_TRUE(m2.Matches(L"Wow Hi Hi")); - EXPECT_TRUE(m2.Matches(L"Super Hi")); - EXPECT_FALSE(m2.Matches(L"i")); - EXPECT_FALSE(m2.Matches(L"Hi ")); -} - -TEST(GlobalWideEndsWithTest, CanDescribeSelf) { - Matcher m = EndsWith(L"Hi"); - EXPECT_EQ("ends with L\"Hi\"", Describe(m)); -} - -#endif // GTEST_HAS_GLOBAL_WSTRING - - -typedef ::std::tr1::tuple Tuple2; // NOLINT - -// Tests that Eq() matches a 2-tuple where the first field == the -// second field. -TEST(Eq2Test, MatchesEqualArguments) { - Matcher m = Eq(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 5))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 6))); -} - -// Tests that Eq() describes itself properly. -TEST(Eq2Test, CanDescribeSelf) { - Matcher m = Eq(); - EXPECT_EQ("are a pair (x, y) where x == y", Describe(m)); -} - -// Tests that Ge() matches a 2-tuple where the first field >= the -// second field. -TEST(Ge2Test, MatchesGreaterThanOrEqualArguments) { - Matcher m = Ge(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 4))); - EXPECT_TRUE(m.Matches(Tuple2(5L, 5))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 6))); -} - -// Tests that Ge() describes itself properly. -TEST(Ge2Test, CanDescribeSelf) { - Matcher m = Ge(); - EXPECT_EQ("are a pair (x, y) where x >= y", Describe(m)); -} - -// Tests that Gt() matches a 2-tuple where the first field > the -// second field. -TEST(Gt2Test, MatchesGreaterThanArguments) { - Matcher m = Gt(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 4))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 5))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 6))); -} - -// Tests that Gt() describes itself properly. -TEST(Gt2Test, CanDescribeSelf) { - Matcher m = Gt(); - EXPECT_EQ("are a pair (x, y) where x > y", Describe(m)); -} - -// Tests that Le() matches a 2-tuple where the first field <= the -// second field. -TEST(Le2Test, MatchesLessThanOrEqualArguments) { - Matcher m = Le(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 6))); - EXPECT_TRUE(m.Matches(Tuple2(5L, 5))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 4))); -} - -// Tests that Le() describes itself properly. -TEST(Le2Test, CanDescribeSelf) { - Matcher m = Le(); - EXPECT_EQ("are a pair (x, y) where x <= y", Describe(m)); -} - -// Tests that Lt() matches a 2-tuple where the first field < the -// second field. -TEST(Lt2Test, MatchesLessThanArguments) { - Matcher m = Lt(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 6))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 5))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 4))); -} - -// Tests that Lt() describes itself properly. -TEST(Lt2Test, CanDescribeSelf) { - Matcher m = Lt(); - EXPECT_EQ("are a pair (x, y) where x < y", Describe(m)); -} - -// Tests that Ne() matches a 2-tuple where the first field != the -// second field. -TEST(Ne2Test, MatchesUnequalArguments) { - Matcher m = Ne(); - EXPECT_TRUE(m.Matches(Tuple2(5L, 6))); - EXPECT_TRUE(m.Matches(Tuple2(5L, 4))); - EXPECT_FALSE(m.Matches(Tuple2(5L, 5))); -} - -// Tests that Ne() describes itself properly. -TEST(Ne2Test, CanDescribeSelf) { - Matcher m = Ne(); - EXPECT_EQ("are a pair (x, y) where x != y", Describe(m)); -} - -// Tests that Not(m) matches any value that doesn't match m. -TEST(NotTest, NegatesMatcher) { - Matcher m; - m = Not(Eq(2)); - EXPECT_TRUE(m.Matches(3)); - EXPECT_FALSE(m.Matches(2)); -} - -// Tests that Not(m) describes itself properly. -TEST(NotTest, CanDescribeSelf) { - Matcher m = Not(Eq(5)); - EXPECT_EQ("is not equal to 5", Describe(m)); -} - -// Tests that monomorphic matchers are safely cast by the Not matcher. -TEST(NotTest, NotMatcherSafelyCastsMonomorphicMatchers) { - // greater_than_5 is a monomorphic matcher. - Matcher greater_than_5 = Gt(5); - - Matcher m = Not(greater_than_5); - Matcher m2 = Not(greater_than_5); - Matcher m3 = Not(m); -} - -// Tests that AllOf(m1, ..., mn) matches any value that matches all of -// the given matchers. -TEST(AllOfTest, MatchesWhenAllMatch) { - Matcher m; - m = AllOf(Le(2), Ge(1)); - EXPECT_TRUE(m.Matches(1)); - EXPECT_TRUE(m.Matches(2)); - EXPECT_FALSE(m.Matches(0)); - EXPECT_FALSE(m.Matches(3)); - - m = AllOf(Gt(0), Ne(1), Ne(2)); - EXPECT_TRUE(m.Matches(3)); - EXPECT_FALSE(m.Matches(2)); - EXPECT_FALSE(m.Matches(1)); - EXPECT_FALSE(m.Matches(0)); - - m = AllOf(Gt(0), Ne(1), Ne(2), Ne(3)); - EXPECT_TRUE(m.Matches(4)); - EXPECT_FALSE(m.Matches(3)); - EXPECT_FALSE(m.Matches(2)); - EXPECT_FALSE(m.Matches(1)); - EXPECT_FALSE(m.Matches(0)); - - m = AllOf(Ge(0), Lt(10), Ne(3), Ne(5), Ne(7)); - EXPECT_TRUE(m.Matches(0)); - EXPECT_TRUE(m.Matches(1)); - EXPECT_FALSE(m.Matches(3)); -} - -// Tests that AllOf(m1, ..., mn) describes itself properly. -TEST(AllOfTest, CanDescribeSelf) { - Matcher m; - m = AllOf(Le(2), Ge(1)); - EXPECT_EQ("(is less than or equal to 2) and " - "(is greater than or equal to 1)", - Describe(m)); - - m = AllOf(Gt(0), Ne(1), Ne(2)); - EXPECT_EQ("(is greater than 0) and " - "((is not equal to 1) and " - "(is not equal to 2))", - Describe(m)); - - - m = AllOf(Gt(0), Ne(1), Ne(2), Ne(3)); - EXPECT_EQ("(is greater than 0) and " - "((is not equal to 1) and " - "((is not equal to 2) and " - "(is not equal to 3)))", - Describe(m)); - - - m = AllOf(Ge(0), Lt(10), Ne(3), Ne(5), Ne(7)); - EXPECT_EQ("(is greater than or equal to 0) and " - "((is less than 10) and " - "((is not equal to 3) and " - "((is not equal to 5) and " - "(is not equal to 7))))", Describe(m)); -} - -// Tests that monomorphic matchers are safely cast by the AllOf matcher. -TEST(AllOfTest, AllOfMatcherSafelyCastsMonomorphicMatchers) { - // greater_than_5 and less_than_10 are monomorphic matchers. - Matcher greater_than_5 = Gt(5); - Matcher less_than_10 = Lt(10); - - Matcher m = AllOf(greater_than_5, less_than_10); - Matcher m2 = AllOf(greater_than_5, less_than_10); - Matcher m3 = AllOf(greater_than_5, m2); - - // Tests that BothOf works when composing itself. - Matcher m4 = AllOf(greater_than_5, less_than_10, less_than_10); - Matcher m5 = AllOf(greater_than_5, less_than_10, less_than_10); -} - -// Tests that AnyOf(m1, ..., mn) matches any value that matches at -// least one of the given matchers. -TEST(AnyOfTest, MatchesWhenAnyMatches) { - Matcher m; - m = AnyOf(Le(1), Ge(3)); - EXPECT_TRUE(m.Matches(1)); - EXPECT_TRUE(m.Matches(4)); - EXPECT_FALSE(m.Matches(2)); - - m = AnyOf(Lt(0), Eq(1), Eq(2)); - EXPECT_TRUE(m.Matches(-1)); - EXPECT_TRUE(m.Matches(1)); - EXPECT_TRUE(m.Matches(2)); - EXPECT_FALSE(m.Matches(0)); - - m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3)); - EXPECT_TRUE(m.Matches(-1)); - EXPECT_TRUE(m.Matches(1)); - EXPECT_TRUE(m.Matches(2)); - EXPECT_TRUE(m.Matches(3)); - EXPECT_FALSE(m.Matches(0)); - - m = AnyOf(Le(0), Gt(10), 3, 5, 7); - EXPECT_TRUE(m.Matches(0)); - EXPECT_TRUE(m.Matches(11)); - EXPECT_TRUE(m.Matches(3)); - EXPECT_FALSE(m.Matches(2)); -} - -// Tests that AnyOf(m1, ..., mn) describes itself properly. -TEST(AnyOfTest, CanDescribeSelf) { - Matcher m; - m = AnyOf(Le(1), Ge(3)); - EXPECT_EQ("(is less than or equal to 1) or " - "(is greater than or equal to 3)", - Describe(m)); - - m = AnyOf(Lt(0), Eq(1), Eq(2)); - EXPECT_EQ("(is less than 0) or " - "((is equal to 1) or (is equal to 2))", - Describe(m)); - - m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3)); - EXPECT_EQ("(is less than 0) or " - "((is equal to 1) or " - "((is equal to 2) or " - "(is equal to 3)))", - Describe(m)); - - m = AnyOf(Le(0), Gt(10), 3, 5, 7); - EXPECT_EQ("(is less than or equal to 0) or " - "((is greater than 10) or " - "((is equal to 3) or " - "((is equal to 5) or " - "(is equal to 7))))", - Describe(m)); -} - -// Tests that monomorphic matchers are safely cast by the AnyOf matcher. -TEST(AnyOfTest, AnyOfMatcherSafelyCastsMonomorphicMatchers) { - // greater_than_5 and less_than_10 are monomorphic matchers. - Matcher greater_than_5 = Gt(5); - Matcher less_than_10 = Lt(10); - - Matcher m = AnyOf(greater_than_5, less_than_10); - Matcher m2 = AnyOf(greater_than_5, less_than_10); - Matcher m3 = AnyOf(greater_than_5, m2); - - // Tests that EitherOf works when composing itself. - Matcher m4 = AnyOf(greater_than_5, less_than_10, less_than_10); - Matcher m5 = AnyOf(greater_than_5, less_than_10, less_than_10); -} - -// The following predicate function and predicate functor are for -// testing the Truly(predicate) matcher. - -// Returns non-zero if the input is positive. Note that the return -// type of this function is not bool. It's OK as Truly() accepts any -// unary function or functor whose return type can be implicitly -// converted to bool. -int IsPositive(double x) { - return x > 0 ? 1 : 0; -} - -// This functor returns true if the input is greater than the given -// number. -class IsGreaterThan { - public: - explicit IsGreaterThan(int threshold) : threshold_(threshold) {} - - bool operator()(int n) const { return n > threshold_; } - private: - const int threshold_; -}; - -// For testing Truly(). -const int foo = 0; - -// This predicate returns true iff the argument references foo and has -// a zero value. -bool ReferencesFooAndIsZero(const int& n) { - return (&n == &foo) && (n == 0); -} - -// Tests that Truly(predicate) matches what satisfies the given -// predicate. -TEST(TrulyTest, MatchesWhatSatisfiesThePredicate) { - Matcher m = Truly(IsPositive); - EXPECT_TRUE(m.Matches(2.0)); - EXPECT_FALSE(m.Matches(-1.5)); -} - -// Tests that Truly(predicate_functor) works too. -TEST(TrulyTest, CanBeUsedWithFunctor) { - Matcher m = Truly(IsGreaterThan(5)); - EXPECT_TRUE(m.Matches(6)); - EXPECT_FALSE(m.Matches(4)); -} - -// Tests that Truly(predicate) can describe itself properly. -TEST(TrulyTest, CanDescribeSelf) { - Matcher m = Truly(IsPositive); - EXPECT_EQ("satisfies the given predicate", - Describe(m)); -} - -// Tests that Truly(predicate) works when the matcher takes its -// argument by reference. -TEST(TrulyTest, WorksForByRefArguments) { - Matcher m = Truly(ReferencesFooAndIsZero); - EXPECT_TRUE(m.Matches(foo)); - int n = 0; - EXPECT_FALSE(m.Matches(n)); -} - -// Tests that Matches(m) is a predicate satisfied by whatever that -// matches matcher m. -TEST(MatchesTest, IsSatisfiedByWhatMatchesTheMatcher) { - EXPECT_TRUE(Matches(Ge(0))(1)); - EXPECT_FALSE(Matches(Eq('a'))('b')); -} - -// Tests that Matches(m) works when the matcher takes its argument by -// reference. -TEST(MatchesTest, WorksOnByRefArguments) { - int m = 0, n = 0; - EXPECT_TRUE(Matches(AllOf(Ref(n), Eq(0)))(n)); - EXPECT_FALSE(Matches(Ref(m))(n)); -} - -// Tests that a Matcher on non-reference type can be used in -// Matches(). -TEST(MatchesTest, WorksWithMatcherOnNonRefType) { - Matcher eq5 = Eq(5); - EXPECT_TRUE(Matches(eq5)(5)); - EXPECT_FALSE(Matches(eq5)(2)); -} - -// Tests Value(value, matcher). Since Value() is a simple wrapper for -// Matches(), which has been tested already, we don't spend a lot of -// effort on testing Value(). -TEST(ValueTest, WorksWithPolymorphicMatcher) { - EXPECT_TRUE(Value("hi", StartsWith("h"))); - EXPECT_FALSE(Value(5, Gt(10))); -} - -TEST(ValueTest, WorksWithMonomorphicMatcher) { - const Matcher is_zero = Eq(0); - EXPECT_TRUE(Value(0, is_zero)); - EXPECT_FALSE(Value('a', is_zero)); - - int n = 0; - const Matcher ref_n = Ref(n); - EXPECT_TRUE(Value(n, ref_n)); - EXPECT_FALSE(Value(1, ref_n)); -} - -TEST(AllArgsTest, WorksForTuple) { - EXPECT_THAT(make_tuple(1, 2L), AllArgs(Lt())); - EXPECT_THAT(make_tuple(2L, 1), Not(AllArgs(Lt()))); -} - -TEST(AllArgsTest, WorksForNonTuple) { - EXPECT_THAT(42, AllArgs(Gt(0))); - EXPECT_THAT('a', Not(AllArgs(Eq('b')))); -} - -class AllArgsHelper { - public: - MOCK_METHOD2(Helper, int(char x, int y)); -}; - -TEST(AllArgsTest, WorksInWithClause) { - AllArgsHelper helper; - ON_CALL(helper, Helper(_, _)) - .With(AllArgs(Lt())) - .WillByDefault(Return(1)); - EXPECT_CALL(helper, Helper(_, _)); - EXPECT_CALL(helper, Helper(_, _)) - .With(AllArgs(Gt())) - .WillOnce(Return(2)); - - EXPECT_EQ(1, helper.Helper('\1', 2)); - EXPECT_EQ(2, helper.Helper('a', 1)); -} - -// Tests that ASSERT_THAT() and EXPECT_THAT() work when the value -// matches the matcher. -TEST(MatcherAssertionTest, WorksWhenMatcherIsSatisfied) { - ASSERT_THAT(5, Ge(2)) << "This should succeed."; - ASSERT_THAT("Foo", EndsWith("oo")); - EXPECT_THAT(2, AllOf(Le(7), Ge(0))) << "This should succeed too."; - EXPECT_THAT("Hello", StartsWith("Hell")); -} - -// Tests that ASSERT_THAT() and EXPECT_THAT() work when the value -// doesn't match the matcher. -TEST(MatcherAssertionTest, WorksWhenMatcherIsNotSatisfied) { - // 'n' must be static as it is used in an EXPECT_FATAL_FAILURE(), - // which cannot reference auto variables. - static int n; - n = 5; - EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Gt(10)) << "This should fail.", - "Value of: n\n" - "Expected: is greater than 10\n" - " Actual: 5\n" - "This should fail."); - n = 0; - EXPECT_NONFATAL_FAILURE(EXPECT_THAT(n, AllOf(Le(7), Ge(5))), - "Value of: n\n" - "Expected: (is less than or equal to 7) and " - "(is greater than or equal to 5)\n" - " Actual: 0"); -} - -// Tests that ASSERT_THAT() and EXPECT_THAT() work when the argument -// has a reference type. -TEST(MatcherAssertionTest, WorksForByRefArguments) { - // We use a static variable here as EXPECT_FATAL_FAILURE() cannot - // reference auto variables. - static int n; - n = 0; - EXPECT_THAT(n, AllOf(Le(7), Ref(n))); - EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Not(Ref(n))), - "Value of: n\n" - "Expected: does not reference the variable @"); - // Tests the "Actual" part. - EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Not(Ref(n))), - "Actual: 0 (is located @"); -} - -// Tests that ASSERT_THAT() and EXPECT_THAT() work when the matcher is -// monomorphic. -TEST(MatcherAssertionTest, WorksForMonomorphicMatcher) { - Matcher starts_with_he = StartsWith("he"); - ASSERT_THAT("hello", starts_with_he); - - Matcher ends_with_ok = EndsWith("ok"); - ASSERT_THAT("book", ends_with_ok); - - Matcher is_greater_than_5 = Gt(5); - EXPECT_NONFATAL_FAILURE(EXPECT_THAT(5, is_greater_than_5), - "Value of: 5\n" - "Expected: is greater than 5\n" - " Actual: 5"); -} - -// Tests floating-point matchers. -template -class FloatingPointTest : public testing::Test { - protected: - typedef typename testing::internal::FloatingPoint Floating; - typedef typename Floating::Bits Bits; - - virtual void SetUp() { - const size_t max_ulps = Floating::kMaxUlps; - - // The bits that represent 0.0. - const Bits zero_bits = Floating(0).bits(); - - // Makes some numbers close to 0.0. - close_to_positive_zero_ = Floating::ReinterpretBits(zero_bits + max_ulps/2); - close_to_negative_zero_ = -Floating::ReinterpretBits( - zero_bits + max_ulps - max_ulps/2); - further_from_negative_zero_ = -Floating::ReinterpretBits( - zero_bits + max_ulps + 1 - max_ulps/2); - - // The bits that represent 1.0. - const Bits one_bits = Floating(1).bits(); - - // Makes some numbers close to 1.0. - close_to_one_ = Floating::ReinterpretBits(one_bits + max_ulps); - further_from_one_ = Floating::ReinterpretBits(one_bits + max_ulps + 1); - - // +infinity. - infinity_ = Floating::Infinity(); - - // The bits that represent +infinity. - const Bits infinity_bits = Floating(infinity_).bits(); - - // Makes some numbers close to infinity. - close_to_infinity_ = Floating::ReinterpretBits(infinity_bits - max_ulps); - further_from_infinity_ = Floating::ReinterpretBits( - infinity_bits - max_ulps - 1); - - // Makes some NAN's. - nan1_ = Floating::ReinterpretBits(Floating::kExponentBitMask | 1); - nan2_ = Floating::ReinterpretBits(Floating::kExponentBitMask | 200); - } - - void TestSize() { - EXPECT_EQ(sizeof(RawType), sizeof(Bits)); - } - - // A battery of tests for FloatingEqMatcher::Matches. - // matcher_maker is a pointer to a function which creates a FloatingEqMatcher. - void TestMatches( - testing::internal::FloatingEqMatcher (*matcher_maker)(RawType)) { - Matcher m1 = matcher_maker(0.0); - EXPECT_TRUE(m1.Matches(-0.0)); - EXPECT_TRUE(m1.Matches(close_to_positive_zero_)); - EXPECT_TRUE(m1.Matches(close_to_negative_zero_)); - EXPECT_FALSE(m1.Matches(1.0)); - - Matcher m2 = matcher_maker(close_to_positive_zero_); - EXPECT_FALSE(m2.Matches(further_from_negative_zero_)); - - Matcher m3 = matcher_maker(1.0); - EXPECT_TRUE(m3.Matches(close_to_one_)); - EXPECT_FALSE(m3.Matches(further_from_one_)); - - // Test commutativity: matcher_maker(0.0).Matches(1.0) was tested above. - EXPECT_FALSE(m3.Matches(0.0)); - - Matcher m4 = matcher_maker(-infinity_); - EXPECT_TRUE(m4.Matches(-close_to_infinity_)); - - Matcher m5 = matcher_maker(infinity_); - EXPECT_TRUE(m5.Matches(close_to_infinity_)); - - // This is interesting as the representations of infinity_ and nan1_ - // are only 1 DLP apart. - EXPECT_FALSE(m5.Matches(nan1_)); - - // matcher_maker can produce a Matcher, which is needed in - // some cases. - Matcher m6 = matcher_maker(0.0); - EXPECT_TRUE(m6.Matches(-0.0)); - EXPECT_TRUE(m6.Matches(close_to_positive_zero_)); - EXPECT_FALSE(m6.Matches(1.0)); - - // matcher_maker can produce a Matcher, which is needed in some - // cases. - Matcher m7 = matcher_maker(0.0); - RawType x = 0.0; - EXPECT_TRUE(m7.Matches(x)); - x = 0.01f; - EXPECT_FALSE(m7.Matches(x)); - } - - // Pre-calculated numbers to be used by the tests. - - static RawType close_to_positive_zero_; - static RawType close_to_negative_zero_; - static RawType further_from_negative_zero_; - - static RawType close_to_one_; - static RawType further_from_one_; - - static RawType infinity_; - static RawType close_to_infinity_; - static RawType further_from_infinity_; - - static RawType nan1_; - static RawType nan2_; -}; - -template -RawType FloatingPointTest::close_to_positive_zero_; - -template -RawType FloatingPointTest::close_to_negative_zero_; - -template -RawType FloatingPointTest::further_from_negative_zero_; - -template -RawType FloatingPointTest::close_to_one_; - -template -RawType FloatingPointTest::further_from_one_; - -template -RawType FloatingPointTest::infinity_; - -template -RawType FloatingPointTest::close_to_infinity_; - -template -RawType FloatingPointTest::further_from_infinity_; - -template -RawType FloatingPointTest::nan1_; - -template -RawType FloatingPointTest::nan2_; - -// Instantiate FloatingPointTest for testing floats. -typedef FloatingPointTest FloatTest; - -TEST_F(FloatTest, FloatEqApproximatelyMatchesFloats) { - TestMatches(&FloatEq); -} - -TEST_F(FloatTest, NanSensitiveFloatEqApproximatelyMatchesFloats) { - TestMatches(&NanSensitiveFloatEq); -} - -TEST_F(FloatTest, FloatEqCannotMatchNaN) { - // FloatEq never matches NaN. - Matcher m = FloatEq(nan1_); - EXPECT_FALSE(m.Matches(nan1_)); - EXPECT_FALSE(m.Matches(nan2_)); - EXPECT_FALSE(m.Matches(1.0)); -} - -TEST_F(FloatTest, NanSensitiveFloatEqCanMatchNaN) { - // NanSensitiveFloatEq will match NaN. - Matcher m = NanSensitiveFloatEq(nan1_); - EXPECT_TRUE(m.Matches(nan1_)); - EXPECT_TRUE(m.Matches(nan2_)); - EXPECT_FALSE(m.Matches(1.0)); -} - -TEST_F(FloatTest, FloatEqCanDescribeSelf) { - Matcher m1 = FloatEq(2.0f); - EXPECT_EQ("is approximately 2", Describe(m1)); - EXPECT_EQ("is not approximately 2", DescribeNegation(m1)); - - Matcher m2 = FloatEq(0.5f); - EXPECT_EQ("is approximately 0.5", Describe(m2)); - EXPECT_EQ("is not approximately 0.5", DescribeNegation(m2)); - - Matcher m3 = FloatEq(nan1_); - EXPECT_EQ("never matches", Describe(m3)); - EXPECT_EQ("is anything", DescribeNegation(m3)); -} - -TEST_F(FloatTest, NanSensitiveFloatEqCanDescribeSelf) { - Matcher m1 = NanSensitiveFloatEq(2.0f); - EXPECT_EQ("is approximately 2", Describe(m1)); - EXPECT_EQ("is not approximately 2", DescribeNegation(m1)); - - Matcher m2 = NanSensitiveFloatEq(0.5f); - EXPECT_EQ("is approximately 0.5", Describe(m2)); - EXPECT_EQ("is not approximately 0.5", DescribeNegation(m2)); - - Matcher m3 = NanSensitiveFloatEq(nan1_); - EXPECT_EQ("is NaN", Describe(m3)); - EXPECT_EQ("is not NaN", DescribeNegation(m3)); -} - -// Instantiate FloatingPointTest for testing doubles. -typedef FloatingPointTest DoubleTest; - -TEST_F(DoubleTest, DoubleEqApproximatelyMatchesDoubles) { - TestMatches(&DoubleEq); -} - -TEST_F(DoubleTest, NanSensitiveDoubleEqApproximatelyMatchesDoubles) { - TestMatches(&NanSensitiveDoubleEq); -} - -TEST_F(DoubleTest, DoubleEqCannotMatchNaN) { - // DoubleEq never matches NaN. - Matcher m = DoubleEq(nan1_); - EXPECT_FALSE(m.Matches(nan1_)); - EXPECT_FALSE(m.Matches(nan2_)); - EXPECT_FALSE(m.Matches(1.0)); -} - -TEST_F(DoubleTest, NanSensitiveDoubleEqCanMatchNaN) { - // NanSensitiveDoubleEq will match NaN. - Matcher m = NanSensitiveDoubleEq(nan1_); - EXPECT_TRUE(m.Matches(nan1_)); - EXPECT_TRUE(m.Matches(nan2_)); - EXPECT_FALSE(m.Matches(1.0)); -} - -TEST_F(DoubleTest, DoubleEqCanDescribeSelf) { - Matcher m1 = DoubleEq(2.0); - EXPECT_EQ("is approximately 2", Describe(m1)); - EXPECT_EQ("is not approximately 2", DescribeNegation(m1)); - - Matcher m2 = DoubleEq(0.5); - EXPECT_EQ("is approximately 0.5", Describe(m2)); - EXPECT_EQ("is not approximately 0.5", DescribeNegation(m2)); - - Matcher m3 = DoubleEq(nan1_); - EXPECT_EQ("never matches", Describe(m3)); - EXPECT_EQ("is anything", DescribeNegation(m3)); -} - -TEST_F(DoubleTest, NanSensitiveDoubleEqCanDescribeSelf) { - Matcher m1 = NanSensitiveDoubleEq(2.0); - EXPECT_EQ("is approximately 2", Describe(m1)); - EXPECT_EQ("is not approximately 2", DescribeNegation(m1)); - - Matcher m2 = NanSensitiveDoubleEq(0.5); - EXPECT_EQ("is approximately 0.5", Describe(m2)); - EXPECT_EQ("is not approximately 0.5", DescribeNegation(m2)); - - Matcher m3 = NanSensitiveDoubleEq(nan1_); - EXPECT_EQ("is NaN", Describe(m3)); - EXPECT_EQ("is not NaN", DescribeNegation(m3)); -} - -TEST(PointeeTest, RawPointer) { - const Matcher m = Pointee(Ge(0)); - - int n = 1; - EXPECT_TRUE(m.Matches(&n)); - n = -1; - EXPECT_FALSE(m.Matches(&n)); - EXPECT_FALSE(m.Matches(NULL)); -} - -TEST(PointeeTest, RawPointerToConst) { - const Matcher m = Pointee(Ge(0)); - - double x = 1; - EXPECT_TRUE(m.Matches(&x)); - x = -1; - EXPECT_FALSE(m.Matches(&x)); - EXPECT_FALSE(m.Matches(NULL)); -} - -TEST(PointeeTest, ReferenceToConstRawPointer) { - const Matcher m = Pointee(Ge(0)); - - int n = 1; - EXPECT_TRUE(m.Matches(&n)); - n = -1; - EXPECT_FALSE(m.Matches(&n)); - EXPECT_FALSE(m.Matches(NULL)); -} - -TEST(PointeeTest, ReferenceToNonConstRawPointer) { - const Matcher m = Pointee(Ge(0)); - - double x = 1.0; - double* p = &x; - EXPECT_TRUE(m.Matches(p)); - x = -1; - EXPECT_FALSE(m.Matches(p)); - p = NULL; - EXPECT_FALSE(m.Matches(p)); -} - -TEST(PointeeTest, NeverMatchesNull) { - const Matcher m = Pointee(_); - EXPECT_FALSE(m.Matches(NULL)); -} - -// Tests that we can write Pointee(value) instead of Pointee(Eq(value)). -TEST(PointeeTest, MatchesAgainstAValue) { - const Matcher m = Pointee(5); - - int n = 5; - EXPECT_TRUE(m.Matches(&n)); - n = -1; - EXPECT_FALSE(m.Matches(&n)); - EXPECT_FALSE(m.Matches(NULL)); -} - -TEST(PointeeTest, CanDescribeSelf) { - const Matcher m = Pointee(Gt(3)); - EXPECT_EQ("points to a value that is greater than 3", Describe(m)); - EXPECT_EQ("does not point to a value that is greater than 3", - DescribeNegation(m)); -} - -// For testing ExplainMatchResultTo(). -class GreaterThanMatcher : public MatcherInterface { - public: - explicit GreaterThanMatcher(int rhs) : rhs_(rhs) {} - - virtual bool Matches(int lhs) const { return lhs > rhs_; } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "is greater than " << rhs_; - } - - virtual void ExplainMatchResultTo(int lhs, ::std::ostream* os) const { - const int diff = lhs - rhs_; - if (diff > 0) { - *os << "is " << diff << " more than " << rhs_; - } else if (diff == 0) { - *os << "is the same as " << rhs_; - } else { - *os << "is " << -diff << " less than " << rhs_; - } - } - private: - const int rhs_; -}; - -Matcher GreaterThan(int n) { - return MakeMatcher(new GreaterThanMatcher(n)); -} - -TEST(PointeeTest, CanExplainMatchResult) { - const Matcher m = Pointee(StartsWith("Hi")); - - EXPECT_EQ("", Explain(m, static_cast(NULL))); - - const Matcher m2 = Pointee(GreaterThan(1)); - int n = 3; - EXPECT_EQ("points to a value that is 2 more than 1", Explain(m2, &n)); -} - -// An uncopyable class. -class Uncopyable { - public: - explicit Uncopyable(int value) : value_(value) {} - - int value() const { return value_; } - private: - const int value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Uncopyable); -}; - -// Returns true iff x.value() is positive. -bool ValueIsPositive(const Uncopyable& x) { return x.value() > 0; } - -// A user-defined struct for testing Field(). -struct AStruct { - AStruct() : x(0), y(1.0), z(5), p(NULL) {} - AStruct(const AStruct& rhs) - : x(rhs.x), y(rhs.y), z(rhs.z.value()), p(rhs.p) {} - - int x; // A non-const field. - const double y; // A const field. - Uncopyable z; // An uncopyable field. - const char* p; // A pointer field. -}; - -// A derived struct for testing Field(). -struct DerivedStruct : public AStruct { - char ch; -}; - -// Tests that Field(&Foo::field, ...) works when field is non-const. -TEST(FieldTest, WorksForNonConstField) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - EXPECT_TRUE(m.Matches(a)); - a.x = -1; - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field(&Foo::field, ...) works when field is const. -TEST(FieldTest, WorksForConstField) { - AStruct a; - - Matcher m = Field(&AStruct::y, Ge(0.0)); - EXPECT_TRUE(m.Matches(a)); - m = Field(&AStruct::y, Le(0.0)); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field(&Foo::field, ...) works when field is not copyable. -TEST(FieldTest, WorksForUncopyableField) { - AStruct a; - - Matcher m = Field(&AStruct::z, Truly(ValueIsPositive)); - EXPECT_TRUE(m.Matches(a)); - m = Field(&AStruct::z, Not(Truly(ValueIsPositive))); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field(&Foo::field, ...) works when field is a pointer. -TEST(FieldTest, WorksForPointerField) { - // Matching against NULL. - Matcher m = Field(&AStruct::p, static_cast(NULL)); - AStruct a; - EXPECT_TRUE(m.Matches(a)); - a.p = "hi"; - EXPECT_FALSE(m.Matches(a)); - - // Matching a pointer that is not NULL. - m = Field(&AStruct::p, StartsWith("hi")); - a.p = "hill"; - EXPECT_TRUE(m.Matches(a)); - a.p = "hole"; - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field() works when the object is passed by reference. -TEST(FieldTest, WorksForByRefArgument) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - EXPECT_TRUE(m.Matches(a)); - a.x = -1; - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field(&Foo::field, ...) works when the argument's type -// is a sub-type of Foo. -TEST(FieldTest, WorksForArgumentOfSubType) { - // Note that the matcher expects DerivedStruct but we say AStruct - // inside Field(). - Matcher m = Field(&AStruct::x, Ge(0)); - - DerivedStruct d; - EXPECT_TRUE(m.Matches(d)); - d.x = -1; - EXPECT_FALSE(m.Matches(d)); -} - -// Tests that Field(&Foo::field, m) works when field's type and m's -// argument type are compatible but not the same. -TEST(FieldTest, WorksForCompatibleMatcherType) { - // The field is an int, but the inner matcher expects a signed char. - Matcher m = Field(&AStruct::x, - Matcher(Ge(0))); - - AStruct a; - EXPECT_TRUE(m.Matches(a)); - a.x = -1; - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Field() can describe itself. -TEST(FieldTest, CanDescribeSelf) { - Matcher m = Field(&AStruct::x, Ge(0)); - - EXPECT_EQ("the given field is greater than or equal to 0", Describe(m)); - EXPECT_EQ("the given field is not greater than or equal to 0", - DescribeNegation(m)); -} - -// Tests that Field() can explain the match result. -TEST(FieldTest, CanExplainMatchResult) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - a.x = 1; - EXPECT_EQ("", Explain(m, a)); - - m = Field(&AStruct::x, GreaterThan(0)); - EXPECT_EQ("the given field is 1 more than 0", Explain(m, a)); -} - -// Tests that Field() works when the argument is a pointer to const. -TEST(FieldForPointerTest, WorksForPointerToConst) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - EXPECT_TRUE(m.Matches(&a)); - a.x = -1; - EXPECT_FALSE(m.Matches(&a)); -} - -// Tests that Field() works when the argument is a pointer to non-const. -TEST(FieldForPointerTest, WorksForPointerToNonConst) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - EXPECT_TRUE(m.Matches(&a)); - a.x = -1; - EXPECT_FALSE(m.Matches(&a)); -} - -// Tests that Field() does not match the NULL pointer. -TEST(FieldForPointerTest, DoesNotMatchNull) { - Matcher m = Field(&AStruct::x, _); - EXPECT_FALSE(m.Matches(NULL)); -} - -// Tests that Field(&Foo::field, ...) works when the argument's type -// is a sub-type of const Foo*. -TEST(FieldForPointerTest, WorksForArgumentOfSubType) { - // Note that the matcher expects DerivedStruct but we say AStruct - // inside Field(). - Matcher m = Field(&AStruct::x, Ge(0)); - - DerivedStruct d; - EXPECT_TRUE(m.Matches(&d)); - d.x = -1; - EXPECT_FALSE(m.Matches(&d)); -} - -// Tests that Field() can describe itself when used to match a pointer. -TEST(FieldForPointerTest, CanDescribeSelf) { - Matcher m = Field(&AStruct::x, Ge(0)); - - EXPECT_EQ("the given field is greater than or equal to 0", Describe(m)); - EXPECT_EQ("the given field is not greater than or equal to 0", - DescribeNegation(m)); -} - -// Tests that Field() can explain the result of matching a pointer. -TEST(FieldForPointerTest, CanExplainMatchResult) { - Matcher m = Field(&AStruct::x, Ge(0)); - - AStruct a; - a.x = 1; - EXPECT_EQ("", Explain(m, static_cast(NULL))); - EXPECT_EQ("", Explain(m, &a)); - - m = Field(&AStruct::x, GreaterThan(0)); - EXPECT_EQ("the given field is 1 more than 0", Explain(m, &a)); -} - -// A user-defined class for testing Property(). -class AClass { - public: - AClass() : n_(0) {} - - // A getter that returns a non-reference. - int n() const { return n_; } - - void set_n(int new_n) { n_ = new_n; } - - // A getter that returns a reference to const. - const string& s() const { return s_; } - - void set_s(const string& new_s) { s_ = new_s; } - - // A getter that returns a reference to non-const. - double& x() const { return x_; } - private: - int n_; - string s_; - - static double x_; -}; - -double AClass::x_ = 0.0; - -// A derived class for testing Property(). -class DerivedClass : public AClass { - private: - int k_; -}; - -// Tests that Property(&Foo::property, ...) works when property() -// returns a non-reference. -TEST(PropertyTest, WorksForNonReferenceProperty) { - Matcher m = Property(&AClass::n, Ge(0)); - - AClass a; - a.set_n(1); - EXPECT_TRUE(m.Matches(a)); - - a.set_n(-1); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Property(&Foo::property, ...) works when property() -// returns a reference to const. -TEST(PropertyTest, WorksForReferenceToConstProperty) { - Matcher m = Property(&AClass::s, StartsWith("hi")); - - AClass a; - a.set_s("hill"); - EXPECT_TRUE(m.Matches(a)); - - a.set_s("hole"); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Property(&Foo::property, ...) works when property() -// returns a reference to non-const. -TEST(PropertyTest, WorksForReferenceToNonConstProperty) { - double x = 0.0; - AClass a; - - Matcher m = Property(&AClass::x, Ref(x)); - EXPECT_FALSE(m.Matches(a)); - - m = Property(&AClass::x, Not(Ref(x))); - EXPECT_TRUE(m.Matches(a)); -} - -// Tests that Property(&Foo::property, ...) works when the argument is -// passed by value. -TEST(PropertyTest, WorksForByValueArgument) { - Matcher m = Property(&AClass::s, StartsWith("hi")); - - AClass a; - a.set_s("hill"); - EXPECT_TRUE(m.Matches(a)); - - a.set_s("hole"); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Property(&Foo::property, ...) works when the argument's -// type is a sub-type of Foo. -TEST(PropertyTest, WorksForArgumentOfSubType) { - // The matcher expects a DerivedClass, but inside the Property() we - // say AClass. - Matcher m = Property(&AClass::n, Ge(0)); - - DerivedClass d; - d.set_n(1); - EXPECT_TRUE(m.Matches(d)); - - d.set_n(-1); - EXPECT_FALSE(m.Matches(d)); -} - -// Tests that Property(&Foo::property, m) works when property()'s type -// and m's argument type are compatible but different. -TEST(PropertyTest, WorksForCompatibleMatcherType) { - // n() returns an int but the inner matcher expects a signed char. - Matcher m = Property(&AClass::n, - Matcher(Ge(0))); - - AClass a; - EXPECT_TRUE(m.Matches(a)); - a.set_n(-1); - EXPECT_FALSE(m.Matches(a)); -} - -// Tests that Property() can describe itself. -TEST(PropertyTest, CanDescribeSelf) { - Matcher m = Property(&AClass::n, Ge(0)); - - EXPECT_EQ("the given property is greater than or equal to 0", Describe(m)); - EXPECT_EQ("the given property is not greater than or equal to 0", - DescribeNegation(m)); -} - -// Tests that Property() can explain the match result. -TEST(PropertyTest, CanExplainMatchResult) { - Matcher m = Property(&AClass::n, Ge(0)); - - AClass a; - a.set_n(1); - EXPECT_EQ("", Explain(m, a)); - - m = Property(&AClass::n, GreaterThan(0)); - EXPECT_EQ("the given property is 1 more than 0", Explain(m, a)); -} - -// Tests that Property() works when the argument is a pointer to const. -TEST(PropertyForPointerTest, WorksForPointerToConst) { - Matcher m = Property(&AClass::n, Ge(0)); - - AClass a; - a.set_n(1); - EXPECT_TRUE(m.Matches(&a)); - - a.set_n(-1); - EXPECT_FALSE(m.Matches(&a)); -} - -// Tests that Property() works when the argument is a pointer to non-const. -TEST(PropertyForPointerTest, WorksForPointerToNonConst) { - Matcher m = Property(&AClass::s, StartsWith("hi")); - - AClass a; - a.set_s("hill"); - EXPECT_TRUE(m.Matches(&a)); - - a.set_s("hole"); - EXPECT_FALSE(m.Matches(&a)); -} - -// Tests that Property() does not match the NULL pointer. -TEST(PropertyForPointerTest, WorksForReferenceToNonConstProperty) { - Matcher m = Property(&AClass::x, _); - EXPECT_FALSE(m.Matches(NULL)); -} - -// Tests that Property(&Foo::property, ...) works when the argument's -// type is a sub-type of const Foo*. -TEST(PropertyForPointerTest, WorksForArgumentOfSubType) { - // The matcher expects a DerivedClass, but inside the Property() we - // say AClass. - Matcher m = Property(&AClass::n, Ge(0)); - - DerivedClass d; - d.set_n(1); - EXPECT_TRUE(m.Matches(&d)); - - d.set_n(-1); - EXPECT_FALSE(m.Matches(&d)); -} - -// Tests that Property() can describe itself when used to match a pointer. -TEST(PropertyForPointerTest, CanDescribeSelf) { - Matcher m = Property(&AClass::n, Ge(0)); - - EXPECT_EQ("the given property is greater than or equal to 0", Describe(m)); - EXPECT_EQ("the given property is not greater than or equal to 0", - DescribeNegation(m)); -} - -// Tests that Property() can explain the result of matching a pointer. -TEST(PropertyForPointerTest, CanExplainMatchResult) { - Matcher m = Property(&AClass::n, Ge(0)); - - AClass a; - a.set_n(1); - EXPECT_EQ("", Explain(m, static_cast(NULL))); - EXPECT_EQ("", Explain(m, &a)); - - m = Property(&AClass::n, GreaterThan(0)); - EXPECT_EQ("the given property is 1 more than 0", Explain(m, &a)); -} - -// Tests ResultOf. - -// Tests that ResultOf(f, ...) compiles and works as expected when f is a -// function pointer. -string IntToStringFunction(int input) { return input == 1 ? "foo" : "bar"; } - -TEST(ResultOfTest, WorksForFunctionPointers) { - Matcher matcher = ResultOf(&IntToStringFunction, Eq(string("foo"))); - - EXPECT_TRUE(matcher.Matches(1)); - EXPECT_FALSE(matcher.Matches(2)); -} - -// Tests that ResultOf() can describe itself. -TEST(ResultOfTest, CanDescribeItself) { - Matcher matcher = ResultOf(&IntToStringFunction, StrEq("foo")); - - EXPECT_EQ("result of the given callable is equal to \"foo\"", - Describe(matcher)); - EXPECT_EQ("result of the given callable is not equal to \"foo\"", - DescribeNegation(matcher)); -} - -// Tests that ResultOf() can explain the match result. -int IntFunction(int input) { return input == 42 ? 80 : 90; } - -TEST(ResultOfTest, CanExplainMatchResult) { - Matcher matcher = ResultOf(&IntFunction, Ge(85)); - EXPECT_EQ("", Explain(matcher, 36)); - - matcher = ResultOf(&IntFunction, GreaterThan(85)); - EXPECT_EQ("result of the given callable is 5 more than 85", - Explain(matcher, 36)); -} - -// Tests that ResultOf(f, ...) compiles and works as expected when f(x) -// returns a non-reference. -TEST(ResultOfTest, WorksForNonReferenceResults) { - Matcher matcher = ResultOf(&IntFunction, Eq(80)); - - EXPECT_TRUE(matcher.Matches(42)); - EXPECT_FALSE(matcher.Matches(36)); -} - -// Tests that ResultOf(f, ...) compiles and works as expected when f(x) -// returns a reference to non-const. -double& DoubleFunction(double& input) { return input; } - -Uncopyable& RefUncopyableFunction(Uncopyable& obj) { - return obj; -} - -TEST(ResultOfTest, WorksForReferenceToNonConstResults) { - double x = 3.14; - double x2 = x; - Matcher matcher = ResultOf(&DoubleFunction, Ref(x)); - - EXPECT_TRUE(matcher.Matches(x)); - EXPECT_FALSE(matcher.Matches(x2)); - - // Test that ResultOf works with uncopyable objects - Uncopyable obj(0); - Uncopyable obj2(0); - Matcher matcher2 = - ResultOf(&RefUncopyableFunction, Ref(obj)); - - EXPECT_TRUE(matcher2.Matches(obj)); - EXPECT_FALSE(matcher2.Matches(obj2)); -} - -// Tests that ResultOf(f, ...) compiles and works as expected when f(x) -// returns a reference to const. -const string& StringFunction(const string& input) { return input; } - -TEST(ResultOfTest, WorksForReferenceToConstResults) { - string s = "foo"; - string s2 = s; - Matcher matcher = ResultOf(&StringFunction, Ref(s)); - - EXPECT_TRUE(matcher.Matches(s)); - EXPECT_FALSE(matcher.Matches(s2)); -} - -// Tests that ResultOf(f, m) works when f(x) and m's -// argument types are compatible but different. -TEST(ResultOfTest, WorksForCompatibleMatcherTypes) { - // IntFunction() returns int but the inner matcher expects a signed char. - Matcher matcher = ResultOf(IntFunction, Matcher(Ge(85))); - - EXPECT_TRUE(matcher.Matches(36)); - EXPECT_FALSE(matcher.Matches(42)); -} - -#if GTEST_HAS_DEATH_TEST -// Tests that the program aborts when ResultOf is passed -// a NULL function pointer. -TEST(ResultOfDeathTest, DiesOnNullFunctionPointers) { - EXPECT_DEATH( - ResultOf(static_cast(NULL), Eq(string("foo"))), - "NULL function pointer is passed into ResultOf\\(\\)\\."); -} -#endif // GTEST_HAS_DEATH_TEST - -// Tests that ResultOf(f, ...) compiles and works as expected when f is a -// function reference. -TEST(ResultOfTest, WorksForFunctionReferences) { - Matcher matcher = ResultOf(IntToStringFunction, StrEq("foo")); - EXPECT_TRUE(matcher.Matches(1)); - EXPECT_FALSE(matcher.Matches(2)); -} - -// Tests that ResultOf(f, ...) compiles and works as expected when f is a -// function object. -struct Functor : public ::std::unary_function { - result_type operator()(argument_type input) const { - return IntToStringFunction(input); - } -}; - -TEST(ResultOfTest, WorksForFunctors) { - Matcher matcher = ResultOf(Functor(), Eq(string("foo"))); - - EXPECT_TRUE(matcher.Matches(1)); - EXPECT_FALSE(matcher.Matches(2)); -} - -// Tests that ResultOf(f, ...) compiles and works as expected when f is a -// functor with more then one operator() defined. ResultOf() must work -// for each defined operator(). -struct PolymorphicFunctor { - typedef int result_type; - int operator()(int n) { return n; } - int operator()(const char* s) { return static_cast(strlen(s)); } -}; - -TEST(ResultOfTest, WorksForPolymorphicFunctors) { - Matcher matcher_int = ResultOf(PolymorphicFunctor(), Ge(5)); - - EXPECT_TRUE(matcher_int.Matches(10)); - EXPECT_FALSE(matcher_int.Matches(2)); - - Matcher matcher_string = ResultOf(PolymorphicFunctor(), Ge(5)); - - EXPECT_TRUE(matcher_string.Matches("long string")); - EXPECT_FALSE(matcher_string.Matches("shrt")); -} - -const int* ReferencingFunction(const int& n) { return &n; } - -struct ReferencingFunctor { - typedef const int* result_type; - result_type operator()(const int& n) { return &n; } -}; - -TEST(ResultOfTest, WorksForReferencingCallables) { - const int n = 1; - const int n2 = 1; - Matcher matcher2 = ResultOf(ReferencingFunction, Eq(&n)); - EXPECT_TRUE(matcher2.Matches(n)); - EXPECT_FALSE(matcher2.Matches(n2)); - - Matcher matcher3 = ResultOf(ReferencingFunctor(), Eq(&n)); - EXPECT_TRUE(matcher3.Matches(n)); - EXPECT_FALSE(matcher3.Matches(n2)); -} - - -class DivisibleByImpl { - public: - explicit DivisibleByImpl(int divider) : divider_(divider) {} - - template - bool Matches(const T& n) const { - return (n % divider_) == 0; - } - - void DescribeTo(::std::ostream* os) const { - *os << "is divisible by " << divider_; - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "is not divisible by " << divider_; - } - - int divider() const { return divider_; } - private: - const int divider_; -}; - -// For testing using ExplainMatchResultTo() with polymorphic matchers. -template -void ExplainMatchResultTo(const DivisibleByImpl& impl, const T& n, - ::std::ostream* os) { - *os << "is " << (n % impl.divider()) << " modulo " - << impl.divider(); -} - -PolymorphicMatcher DivisibleBy(int n) { - return MakePolymorphicMatcher(DivisibleByImpl(n)); -} - -// Tests that when AllOf() fails, only the first failing matcher is -// asked to explain why. -TEST(ExplainMatchResultTest, AllOf_False_False) { - const Matcher m = AllOf(DivisibleBy(4), DivisibleBy(3)); - EXPECT_EQ("is 1 modulo 4", Explain(m, 5)); -} - -// Tests that when AllOf() fails, only the first failing matcher is -// asked to explain why. -TEST(ExplainMatchResultTest, AllOf_False_True) { - const Matcher m = AllOf(DivisibleBy(4), DivisibleBy(3)); - EXPECT_EQ("is 2 modulo 4", Explain(m, 6)); -} - -// Tests that when AllOf() fails, only the first failing matcher is -// asked to explain why. -TEST(ExplainMatchResultTest, AllOf_True_False) { - const Matcher m = AllOf(Ge(1), DivisibleBy(3)); - EXPECT_EQ("is 2 modulo 3", Explain(m, 5)); -} - -// Tests that when AllOf() succeeds, all matchers are asked to explain -// why. -TEST(ExplainMatchResultTest, AllOf_True_True) { - const Matcher m = AllOf(DivisibleBy(2), DivisibleBy(3)); - EXPECT_EQ("is 0 modulo 2; is 0 modulo 3", Explain(m, 6)); -} - -TEST(ExplainMatchResultTest, AllOf_True_True_2) { - const Matcher m = AllOf(Ge(2), Le(3)); - EXPECT_EQ("", Explain(m, 2)); -} - -TEST(ExplainmatcherResultTest, MonomorphicMatcher) { - const Matcher m = GreaterThan(5); - EXPECT_EQ("is 1 more than 5", Explain(m, 6)); -} - -// The following two tests verify that values without a public copy -// ctor can be used as arguments to matchers like Eq(), Ge(), and etc -// with the help of ByRef(). - -class NotCopyable { - public: - explicit NotCopyable(int value) : value_(value) {} - - int value() const { return value_; } - - bool operator==(const NotCopyable& rhs) const { - return value() == rhs.value(); - } - - bool operator>=(const NotCopyable& rhs) const { - return value() >= rhs.value(); - } - private: - int value_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(NotCopyable); -}; - -TEST(ByRefTest, AllowsNotCopyableConstValueInMatchers) { - const NotCopyable const_value1(1); - const Matcher m = Eq(ByRef(const_value1)); - - const NotCopyable n1(1), n2(2); - EXPECT_TRUE(m.Matches(n1)); - EXPECT_FALSE(m.Matches(n2)); -} - -TEST(ByRefTest, AllowsNotCopyableValueInMatchers) { - NotCopyable value2(2); - const Matcher m = Ge(ByRef(value2)); - - NotCopyable n1(1), n2(2); - EXPECT_FALSE(m.Matches(n1)); - EXPECT_TRUE(m.Matches(n2)); -} - -// Tests ContainerEq with different container types, and -// different element types. - -template -class ContainerEqTest : public testing::Test {}; - -typedef testing::Types< - std::set, - std::vector, - std::multiset, - std::list > - ContainerEqTestTypes; - -TYPED_TEST_CASE(ContainerEqTest, ContainerEqTestTypes); - -// Tests that the filled container is equal to itself. -TYPED_TEST(ContainerEqTest, EqualsSelf) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - TypeParam my_set(vals, vals + 6); - const Matcher m = ContainerEq(my_set); - EXPECT_TRUE(m.Matches(my_set)); - EXPECT_EQ("", Explain(m, my_set)); -} - -// Tests that missing values are reported. -TYPED_TEST(ContainerEqTest, ValueMissing) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {2, 1, 8, 5}; - TypeParam my_set(vals, vals + 6); - TypeParam test_set(test_vals, test_vals + 4); - const Matcher m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Not in actual: 3", Explain(m, test_set)); -} - -// Tests that added values are reported. -TYPED_TEST(ContainerEqTest, ValueAdded) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 3, 5, 8, 46}; - TypeParam my_set(vals, vals + 6); - TypeParam test_set(test_vals, test_vals + 6); - const Matcher m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Only in actual: 46", Explain(m, test_set)); -} - -// Tests that added and missing values are reported together. -TYPED_TEST(ContainerEqTest, ValueAddedAndRemoved) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 3, 8, 46}; - TypeParam my_set(vals, vals + 6); - TypeParam test_set(test_vals, test_vals + 5); - const Matcher m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Only in actual: 46; not in actual: 5", Explain(m, test_set)); -} - -// Tests duplicated value -- expect no explanation. -TYPED_TEST(ContainerEqTest, DuplicateDifference) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 3, 5, 8}; - TypeParam my_set(vals, vals + 6); - TypeParam test_set(test_vals, test_vals + 5); - const Matcher m = ContainerEq(my_set); - // Depending on the container, match may be true or false - // But in any case there should be no explanation. - EXPECT_EQ("", Explain(m, test_set)); -} - -// Tests that mutliple missing values are reported. -// Using just vector here, so order is predicatble. -TEST(ContainerEqExtraTest, MultipleValuesMissing) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {2, 1, 5}; - std::vector my_set(vals, vals + 6); - std::vector test_set(test_vals, test_vals + 3); - const Matcher > m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Not in actual: 3, 8", Explain(m, test_set)); -} - -// Tests that added values are reported. -// Using just vector here, so order is predicatble. -TEST(ContainerEqExtraTest, MultipleValuesAdded) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 92, 3, 5, 8, 46}; - std::list my_set(vals, vals + 6); - std::list test_set(test_vals, test_vals + 7); - const Matcher&> m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Only in actual: 92, 46", Explain(m, test_set)); -} - -// Tests that added and missing values are reported together. -TEST(ContainerEqExtraTest, MultipleValuesAddedAndRemoved) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 3, 92, 46}; - std::list my_set(vals, vals + 6); - std::list test_set(test_vals, test_vals + 5); - const Matcher > m = ContainerEq(my_set); - EXPECT_FALSE(m.Matches(test_set)); - EXPECT_EQ("Only in actual: 92, 46; not in actual: 5, 8", - Explain(m, test_set)); -} - -// Tests to see that duplicate elements are detected, -// but (as above) not reported in the explanation. -TEST(ContainerEqExtraTest, MultiSetOfIntDuplicateDifference) { - static const int vals[] = {1, 1, 2, 3, 5, 8}; - static const int test_vals[] = {1, 2, 3, 5, 8}; - std::vector my_set(vals, vals + 6); - std::vector test_set(test_vals, test_vals + 5); - const Matcher > m = ContainerEq(my_set); - EXPECT_TRUE(m.Matches(my_set)); - EXPECT_FALSE(m.Matches(test_set)); - // There is nothing to report when both sets contain all the same values. - EXPECT_EQ("", Explain(m, test_set)); -} - -// Tests that ContainerEq works for non-trivial associative containers, -// like maps. -TEST(ContainerEqExtraTest, WorksForMaps) { - std::map my_map; - my_map[0] = "a"; - my_map[1] = "b"; - - std::map test_map; - test_map[0] = "aa"; - test_map[1] = "b"; - - const Matcher&> m = ContainerEq(my_map); - EXPECT_TRUE(m.Matches(my_map)); - EXPECT_FALSE(m.Matches(test_map)); - - EXPECT_EQ("Only in actual: (0, \"aa\"); not in actual: (0, \"a\")", - Explain(m, test_map)); -} - -TEST(ContainerEqExtraTest, WorksForNativeArray) { - int a1[] = { 1, 2, 3 }; - int a2[] = { 1, 2, 3 }; - int b[] = { 1, 2, 4 }; - - EXPECT_THAT(a1, ContainerEq(a2)); - EXPECT_THAT(a1, Not(ContainerEq(b))); -} - -TEST(ContainerEqExtraTest, WorksForTwoDimensionalNativeArray) { - const char a1[][3] = { "hi", "lo" }; - const char a2[][3] = { "hi", "lo" }; - const char b[][3] = { "lo", "hi" }; - - // Tests using ContainerEq() in the first dimension. - EXPECT_THAT(a1, ContainerEq(a2)); - EXPECT_THAT(a1, Not(ContainerEq(b))); - - // Tests using ContainerEq() in the second dimension. - EXPECT_THAT(a1, ElementsAre(ContainerEq(a2[0]), ContainerEq(a2[1]))); - EXPECT_THAT(a1, ElementsAre(Not(ContainerEq(b[0])), ContainerEq(a2[1]))); -} - -TEST(ContainerEqExtraTest, WorksForNativeArrayAsTuple) { - const int a1[] = { 1, 2, 3 }; - const int a2[] = { 1, 2, 3 }; - const int b[] = { 1, 2, 3, 4 }; - - const int* const p1 = a1; - EXPECT_THAT(make_tuple(p1, 3), ContainerEq(a2)); - EXPECT_THAT(make_tuple(p1, 3), Not(ContainerEq(b))); - - const int c[] = { 1, 3, 2 }; - EXPECT_THAT(make_tuple(p1, 3), Not(ContainerEq(c))); -} - -TEST(ContainerEqExtraTest, CopiesNativeArrayParameter) { - std::string a1[][3] = { - { "hi", "hello", "ciao" }, - { "bye", "see you", "ciao" } - }; - - std::string a2[][3] = { - { "hi", "hello", "ciao" }, - { "bye", "see you", "ciao" } - }; - - const Matcher m = ContainerEq(a2); - EXPECT_THAT(a1, m); - - a2[0][0] = "ha"; - EXPECT_THAT(a1, m); -} - -// Tests GetParamIndex(). - -TEST(GetParamIndexTest, WorksForEmptyParamList) { - const char* params[] = { NULL }; - EXPECT_EQ(kTupleInterpolation, GetParamIndex(params, "*")); - EXPECT_EQ(kInvalidInterpolation, GetParamIndex(params, "a")); -} - -TEST(GetParamIndexTest, RecognizesStar) { - const char* params[] = { "a", "b", NULL }; - EXPECT_EQ(kTupleInterpolation, GetParamIndex(params, "*")); -} - -TEST(GetParamIndexTest, RecognizesKnownParam) { - const char* params[] = { "foo", "bar", NULL }; - EXPECT_EQ(0, GetParamIndex(params, "foo")); - EXPECT_EQ(1, GetParamIndex(params, "bar")); -} - -TEST(GetParamIndexTest, RejectsUnknownParam) { - const char* params[] = { "foo", "bar", NULL }; - EXPECT_EQ(kInvalidInterpolation, GetParamIndex(params, "foobar")); -} - -// Tests SkipPrefix(). - -TEST(SkipPrefixTest, SkipsWhenPrefixMatches) { - const char* const str = "hello"; - - const char* p = str; - EXPECT_TRUE(SkipPrefix("", &p)); - EXPECT_EQ(str, p); - - p = str; - EXPECT_TRUE(SkipPrefix("hell", &p)); - EXPECT_EQ(str + 4, p); -} - -TEST(SkipPrefixTest, DoesNotSkipWhenPrefixDoesNotMatch) { - const char* const str = "world"; - - const char* p = str; - EXPECT_FALSE(SkipPrefix("W", &p)); - EXPECT_EQ(str, p); - - p = str; - EXPECT_FALSE(SkipPrefix("world!", &p)); - EXPECT_EQ(str, p); -} - -// Tests FormatMatcherDescriptionSyntaxError(). -TEST(FormatMatcherDescriptionSyntaxErrorTest, FormatsCorrectly) { - const char* const description = "hello%world"; - EXPECT_EQ("Syntax error at index 5 in matcher description \"hello%world\": ", - FormatMatcherDescriptionSyntaxError(description, description + 5)); -} - -// Tests ValidateMatcherDescription(). - -TEST(ValidateMatcherDescriptionTest, AcceptsEmptyDescription) { - const char* params[] = { "foo", "bar", NULL }; - EXPECT_THAT(ValidateMatcherDescription(params, ""), - ElementsAre()); -} - -TEST(ValidateMatcherDescriptionTest, - AcceptsNonEmptyDescriptionWithNoInterpolation) { - const char* params[] = { "foo", "bar", NULL }; - EXPECT_THAT(ValidateMatcherDescription(params, "a simple description"), - ElementsAre()); -} - -// We use MATCHER_P3() to define a matcher for testing -// ValidateMatcherDescription(); otherwise we'll end up with much -// plumbing code. This is not circular as -// ValidateMatcherDescription() doesn't affect whether the matcher -// matches a value or not. -MATCHER_P3(EqInterpolation, start, end, index, "equals Interpolation%(*)s") { - return arg.start_pos == start && arg.end_pos == end && - arg.param_index == index; -} - -TEST(ValidateMatcherDescriptionTest, AcceptsPercentInterpolation) { - const char* params[] = { "foo", NULL }; - const char* const desc = "one %%"; - EXPECT_THAT(ValidateMatcherDescription(params, desc), - ElementsAre(EqInterpolation(desc + 4, desc + 6, - kPercentInterpolation))); -} - -TEST(ValidateMatcherDescriptionTest, AcceptsTupleInterpolation) { - const char* params[] = { "foo", "bar", "baz", NULL }; - const char* const desc = "%(*)s after"; - EXPECT_THAT(ValidateMatcherDescription(params, desc), - ElementsAre(EqInterpolation(desc, desc + 5, - kTupleInterpolation))); -} - -TEST(ValidateMatcherDescriptionTest, AcceptsParamInterpolation) { - const char* params[] = { "foo", "bar", "baz", NULL }; - const char* const desc = "a %(bar)s."; - EXPECT_THAT(ValidateMatcherDescription(params, desc), - ElementsAre(EqInterpolation(desc + 2, desc + 9, 1))); -} - -TEST(ValidateMatcherDescriptionTest, AcceptsMultiplenterpolations) { - const char* params[] = { "foo", "bar", "baz", NULL }; - const char* const desc = "%(baz)s %(foo)s %(bar)s"; - EXPECT_THAT(ValidateMatcherDescription(params, desc), - ElementsAre(EqInterpolation(desc, desc + 7, 2), - EqInterpolation(desc + 8, desc + 15, 0), - EqInterpolation(desc + 16, desc + 23, 1))); -} - -TEST(ValidateMatcherDescriptionTest, AcceptsRepeatedParams) { - const char* params[] = { "foo", "bar", NULL }; - const char* const desc = "%(foo)s and %(foo)s"; - EXPECT_THAT(ValidateMatcherDescription(params, desc), - ElementsAre(EqInterpolation(desc, desc + 7, 0), - EqInterpolation(desc + 12, desc + 19, 0))); -} - -TEST(ValidateMatcherDescriptionTest, RejectsUnknownParam) { - const char* params[] = { "a", "bar", NULL }; - EXPECT_NONFATAL_FAILURE({ - EXPECT_THAT(ValidateMatcherDescription(params, "%(foo)s"), - ElementsAre()); - }, "Syntax error at index 2 in matcher description \"%(foo)s\": " - "\"foo\" is an invalid parameter name."); -} - -TEST(ValidateMatcherDescriptionTest, RejectsUnfinishedParam) { - const char* params[] = { "a", "bar", NULL }; - EXPECT_NONFATAL_FAILURE({ - EXPECT_THAT(ValidateMatcherDescription(params, "%(foo)"), - ElementsAre()); - }, "Syntax error at index 0 in matcher description \"%(foo)\": " - "an interpolation must end with \")s\", but \"%(foo)\" does not."); - - EXPECT_NONFATAL_FAILURE({ - EXPECT_THAT(ValidateMatcherDescription(params, "x%(a"), - ElementsAre()); - }, "Syntax error at index 1 in matcher description \"x%(a\": " - "an interpolation must end with \")s\", but \"%(a\" does not."); -} - -TEST(ValidateMatcherDescriptionTest, RejectsSinglePercent) { - const char* params[] = { "a", NULL }; - EXPECT_NONFATAL_FAILURE({ - EXPECT_THAT(ValidateMatcherDescription(params, "a %."), - ElementsAre()); - }, "Syntax error at index 2 in matcher description \"a %.\": " - "use \"%%\" instead of \"%\" to print \"%\"."); - -} - -// Tests JoinAsTuple(). - -TEST(JoinAsTupleTest, JoinsEmptyTuple) { - EXPECT_EQ("", JoinAsTuple(Strings())); -} - -TEST(JoinAsTupleTest, JoinsOneTuple) { - const char* fields[] = { "1" }; - EXPECT_EQ("1", JoinAsTuple(Strings(fields, fields + 1))); -} - -TEST(JoinAsTupleTest, JoinsTwoTuple) { - const char* fields[] = { "1", "a" }; - EXPECT_EQ("(1, a)", JoinAsTuple(Strings(fields, fields + 2))); -} - -TEST(JoinAsTupleTest, JoinsTenTuple) { - const char* fields[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; - EXPECT_EQ("(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)", - JoinAsTuple(Strings(fields, fields + 10))); -} - -// Tests FormatMatcherDescription(). - -TEST(FormatMatcherDescriptionTest, WorksForEmptyDescription) { - EXPECT_EQ("is even", - FormatMatcherDescription("IsEven", "", Interpolations(), - Strings())); - - const char* params[] = { "5" }; - EXPECT_EQ("equals 5", - FormatMatcherDescription("Equals", "", Interpolations(), - Strings(params, params + 1))); - - const char* params2[] = { "5", "8" }; - EXPECT_EQ("is in range (5, 8)", - FormatMatcherDescription("IsInRange", "", Interpolations(), - Strings(params2, params2 + 2))); -} - -TEST(FormatMatcherDescriptionTest, WorksForDescriptionWithNoInterpolation) { - EXPECT_EQ("is positive", - FormatMatcherDescription("Gt0", "is positive", Interpolations(), - Strings())); - - const char* params[] = { "5", "6" }; - EXPECT_EQ("is negative", - FormatMatcherDescription("Lt0", "is negative", Interpolations(), - Strings(params, params + 2))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionStartsWithInterpolation) { - const char* params[] = { "5" }; - const char* const desc = "%(num)s times bigger"; - const Interpolation interp[] = { Interpolation(desc, desc + 7, 0) }; - EXPECT_EQ("5 times bigger", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 1), - Strings(params, params + 1))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionEndsWithInterpolation) { - const char* params[] = { "5", "6" }; - const char* const desc = "is bigger than %(y)s"; - const Interpolation interp[] = { Interpolation(desc + 15, desc + 20, 1) }; - EXPECT_EQ("is bigger than 6", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 1), - Strings(params, params + 2))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionStartsAndEndsWithInterpolation) { - const char* params[] = { "5", "6" }; - const char* const desc = "%(x)s <= arg <= %(y)s"; - const Interpolation interp[] = { - Interpolation(desc, desc + 5, 0), - Interpolation(desc + 16, desc + 21, 1) - }; - EXPECT_EQ("5 <= arg <= 6", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 2), - Strings(params, params + 2))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionDoesNotStartOrEndWithInterpolation) { - const char* params[] = { "5.2" }; - const char* const desc = "has %(x)s cents"; - const Interpolation interp[] = { Interpolation(desc + 4, desc + 9, 0) }; - EXPECT_EQ("has 5.2 cents", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 1), - Strings(params, params + 1))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionContainsMultipleInterpolations) { - const char* params[] = { "5", "6" }; - const char* const desc = "in %(*)s or [%(x)s, %(y)s]"; - const Interpolation interp[] = { - Interpolation(desc + 3, desc + 8, kTupleInterpolation), - Interpolation(desc + 13, desc + 18, 0), - Interpolation(desc + 20, desc + 25, 1) - }; - EXPECT_EQ("in (5, 6) or [5, 6]", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 3), - Strings(params, params + 2))); -} - -TEST(FormatMatcherDescriptionTest, - WorksWhenDescriptionContainsRepeatedParams) { - const char* params[] = { "9" }; - const char* const desc = "in [-%(x)s, %(x)s]"; - const Interpolation interp[] = { - Interpolation(desc + 5, desc + 10, 0), - Interpolation(desc + 12, desc + 17, 0) - }; - EXPECT_EQ("in [-9, 9]", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 2), - Strings(params, params + 1))); -} - -TEST(FormatMatcherDescriptionTest, - WorksForDescriptionWithInvalidInterpolation) { - const char* params[] = { "9" }; - const char* const desc = "> %(x)s %(x)"; - const Interpolation interp[] = { Interpolation(desc + 2, desc + 7, 0) }; - EXPECT_EQ("> 9 %(x)", - FormatMatcherDescription("Foo", desc, - Interpolations(interp, interp + 1), - Strings(params, params + 1))); -} - -} // namespace gmock_matchers_test -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-nice-strict_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-nice-strict_test.cc deleted file mode 100644 index 955961c5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-nice-strict_test.cc +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include -#include -#include -#include - -namespace testing { -namespace gmock_nice_strict_test { - -using testing::internal::string; -using testing::GMOCK_FLAG(verbose); -using testing::HasSubstr; -using testing::NiceMock; -using testing::StrictMock; - -// Defines some mock classes needed by the tests. - -class Foo { - public: - virtual ~Foo() {} - - virtual void DoThis() = 0; - virtual int DoThat(bool flag) = 0; -}; - -class MockFoo : public Foo { - public: - void Delete() { delete this; } - - MOCK_METHOD0(DoThis, void()); - MOCK_METHOD1(DoThat, int(bool flag)); -}; - -class MockBar { - public: - explicit MockBar(const string& s) : str_(s) {} - - MockBar(char a1, char a2, string a3, string a4, int a5, int a6, - const string& a7, const string& a8, bool a9, bool a10) { - str_ = string() + a1 + a2 + a3 + a4 + static_cast(a5) + - static_cast(a6) + a7 + a8 + (a9 ? 'T' : 'F') + (a10 ? 'T' : 'F'); - } - - virtual ~MockBar() {} - - const string& str() const { return str_; } - - MOCK_METHOD0(This, int()); - MOCK_METHOD2(That, string(int, bool)); - - private: - string str_; -}; - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Tests that a nice mock generates no warning for uninteresting calls. -TEST(NiceMockTest, NoWarningForUninterestingCall) { - NiceMock nice_foo; - - CaptureTestStdout(); - nice_foo.DoThis(); - nice_foo.DoThat(true); - EXPECT_EQ("", GetCapturedTestStdout()); -} - -// Tests that a nice mock generates no warning for uninteresting calls -// that delete the mock object. -TEST(NiceMockTest, NoWarningForUninterestingCallAfterDeath) { - NiceMock* const nice_foo = new NiceMock; - - ON_CALL(*nice_foo, DoThis()) - .WillByDefault(Invoke(nice_foo, &MockFoo::Delete)); - - CaptureTestStdout(); - nice_foo->DoThis(); - EXPECT_EQ("", GetCapturedTestStdout()); -} - -// Tests that a nice mock generates informational logs for -// uninteresting calls. -TEST(NiceMockTest, InfoForUninterestingCall) { - NiceMock nice_foo; - - GMOCK_FLAG(verbose) = "info"; - CaptureTestStdout(); - nice_foo.DoThis(); - EXPECT_THAT(GetCapturedTestStdout(), - HasSubstr("Uninteresting mock function call")); - - CaptureTestStdout(); - nice_foo.DoThat(true); - EXPECT_THAT(GetCapturedTestStdout(), - HasSubstr("Uninteresting mock function call")); -} - -#endif // 0 - -// Tests that a nice mock allows expected calls. -TEST(NiceMockTest, AllowsExpectedCall) { - NiceMock nice_foo; - - EXPECT_CALL(nice_foo, DoThis()); - nice_foo.DoThis(); -} - -// Tests that an unexpected call on a nice mock fails. -TEST(NiceMockTest, UnexpectedCallFails) { - NiceMock nice_foo; - - EXPECT_CALL(nice_foo, DoThis()).Times(0); - EXPECT_NONFATAL_FAILURE(nice_foo.DoThis(), "called more times than expected"); -} - -// Tests that NiceMock works with a mock class that has a non-default -// constructor. -TEST(NiceMockTest, NonDefaultConstructor) { - NiceMock nice_bar("hi"); - EXPECT_EQ("hi", nice_bar.str()); - - nice_bar.This(); - nice_bar.That(5, true); -} - -// Tests that NiceMock works with a mock class that has a 10-ary -// non-default constructor. -TEST(NiceMockTest, NonDefaultConstructor10) { - NiceMock nice_bar('a', 'b', "c", "d", 'e', 'f', - "g", "h", true, false); - EXPECT_EQ("abcdefghTF", nice_bar.str()); - - nice_bar.This(); - nice_bar.That(5, true); -} - -// Tests that a strict mock allows expected calls. -TEST(StrictMockTest, AllowsExpectedCall) { - StrictMock strict_foo; - - EXPECT_CALL(strict_foo, DoThis()); - strict_foo.DoThis(); -} - -// Tests that an unexpected call on a strict mock fails. -TEST(StrictMockTest, UnexpectedCallFails) { - StrictMock strict_foo; - - EXPECT_CALL(strict_foo, DoThis()).Times(0); - EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(), - "called more times than expected"); -} - -// Tests that an uninteresting call on a strict mock fails. -TEST(StrictMockTest, UninterestingCallFails) { - StrictMock strict_foo; - - EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(), - "Uninteresting mock function call"); -} - -// Tests that an uninteresting call on a strict mock fails, even if -// the call deletes the mock object. -TEST(StrictMockTest, UninterestingCallFailsAfterDeath) { - StrictMock* const strict_foo = new StrictMock; - - ON_CALL(*strict_foo, DoThis()) - .WillByDefault(Invoke(strict_foo, &MockFoo::Delete)); - - EXPECT_NONFATAL_FAILURE(strict_foo->DoThis(), - "Uninteresting mock function call"); -} - -// Tests that StrictMock works with a mock class that has a -// non-default constructor. -TEST(StrictMockTest, NonDefaultConstructor) { - StrictMock strict_bar("hi"); - EXPECT_EQ("hi", strict_bar.str()); - - EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true), - "Uninteresting mock function call"); -} - -// Tests that StrictMock works with a mock class that has a 10-ary -// non-default constructor. -TEST(StrictMockTest, NonDefaultConstructor10) { - StrictMock strict_bar('a', 'b', "c", "d", 'e', 'f', - "g", "h", true, false); - EXPECT_EQ("abcdefghTF", strict_bar.str()); - - EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true), - "Uninteresting mock function call"); -} - -} // namespace gmock_nice_strict_test -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-port_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-port_test.cc deleted file mode 100644 index 2e85bccd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-port_test.cc +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the internal cross-platform support utilities. - -#include -#include - -TEST(GmockCheckSyntaxTest, BehavesLikeASingleStatement) { - if (false) - GMOCK_CHECK_(false) << "This should never be executed; " - "It's a compilation test only."; - - if (true) - GMOCK_CHECK_(true); - else - ; - - if (false) - ; - else - GMOCK_CHECK_(true) << ""; -} - -TEST(GmockCheckSyntaxTest, WorksWithSwitch) { - switch (0) { - case 1: - break; - default: - GMOCK_CHECK_(true); - } - - switch(0) - case 0: - GMOCK_CHECK_(true) << "Check failed in switch case"; -} - -#if GTEST_HAS_DEATH_TEST - -TEST(GmockCheckDeathTest, DiesWithCorrectOutputOnFailure) { - const bool a_false_condition = false; - // MSVC and gcc use different formats to print source file locations. - // Google Mock's failure messages use the same format as used by the - // compiler, in order for the IDE to recognize them. Therefore we look - // for different patterns here depending on the compiler. - const char regex[] = -#ifdef _MSC_VER - "gmock-port_test\\.cc\\(\\d+\\):" -#else - "gmock-port_test\\.cc:[0-9]+" -#endif // _MSC_VER - ".*a_false_condition.*Extra info"; - - EXPECT_DEATH(GMOCK_CHECK_(a_false_condition) << "Extra info", regex); -} - -TEST(GmockCheckDeathTest, LivesSilentlyOnSuccess) { - EXPECT_EXIT({ - GMOCK_CHECK_(true) << "Extra info"; - ::std::cerr << "Success\n"; - exit(0); }, - ::testing::ExitedWithCode(0), "Success"); -} - -#endif // GTEST_HAS_DEATH_TEST diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-printers_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-printers_test.cc deleted file mode 100644 index 8c03ec46..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-printers_test.cc +++ /dev/null @@ -1,1084 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the universal value printer. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// hash_map and hash_set are available on Windows. -#if GTEST_OS_WINDOWS -#define GMOCK_HAS_HASH_MAP_ 1 // Indicates that hash_map is available. -#include // NOLINT -#define GMOCK_HAS_HASH_SET_ 1 // Indicates that hash_set is available. -#include // NOLINT -#endif // GTEST_OS_WINDOWS - -// Some user-defined types for testing the universal value printer. - -// A user-defined unprintable class template in the global namespace. -template -class UnprintableTemplateInGlobal { - public: - UnprintableTemplateInGlobal() : value_() {} - private: - T value_; -}; - -// A user-defined streamable type in the global namespace. -class StreamableInGlobal { - public: - virtual ~StreamableInGlobal() {} -}; - -inline void operator<<(::std::ostream& os, const StreamableInGlobal& x) { - os << "StreamableInGlobal"; -} - -namespace foo { - -// A user-defined unprintable type in a user namespace. -class UnprintableInFoo { - public: - UnprintableInFoo() : x_(0x12EF), y_(0xAB34), z_(0) {} - private: - testing::internal::Int32 x_; - testing::internal::Int32 y_; - double z_; -}; - -// A user-defined printable type in a user-chosen namespace. -struct PrintableViaPrintTo { - PrintableViaPrintTo() : value() {} - int value; -}; - -void PrintTo(const PrintableViaPrintTo& x, ::std::ostream* os) { - *os << "PrintableViaPrintTo: " << x.value; -} - -// A user-defined printable class template in a user-chosen namespace. -template -class PrintableViaPrintToTemplate { - public: - explicit PrintableViaPrintToTemplate(const T& value) : value_(value) {} - - const T& value() const { return value_; } - private: - T value_; -}; - -template -void PrintTo(const PrintableViaPrintToTemplate& x, ::std::ostream* os) { - *os << "PrintableViaPrintToTemplate: " << x.value(); -} - -// A user-defined streamable class template in a user namespace. -template -class StreamableTemplateInFoo { - public: - StreamableTemplateInFoo() : value_() {} - - const T& value() const { return value_; } - private: - T value_; -}; - -template -inline ::std::ostream& operator<<(::std::ostream& os, - const StreamableTemplateInFoo& x) { - return os << "StreamableTemplateInFoo: " << x.value(); -} - -} // namespace foo - -namespace testing { -namespace gmock_printers_test { - -using ::std::deque; -using ::std::list; -using ::std::make_pair; -using ::std::map; -using ::std::multimap; -using ::std::multiset; -using ::std::pair; -using ::std::set; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::vector; -using ::testing::ElementsAre; -using ::testing::StartsWith; -using ::testing::internal::NativeArray; -using ::testing::internal::Strings; -using ::testing::internal::UniversalTersePrint; -using ::testing::internal::UniversalPrint; -using ::testing::internal::UniversalTersePrintTupleFieldsToStrings; -using ::testing::internal::UniversalPrinter; -using ::testing::internal::kReference; -using ::testing::internal::string; - -#if GTEST_OS_WINDOWS -// MSVC defines the following classes in the ::stdext namespace while -// gcc defines them in the :: namespace. Note that they are not part -// of the C++ standard. - -using ::stdext::hash_map; -using ::stdext::hash_set; -using ::stdext::hash_multimap; -using ::stdext::hash_multiset; - -#endif // GTEST_OS_WINDOWS - -// Prints a value to a string using the universal value printer. This -// is a helper for testing UniversalPrinter::Print() for various types. -template -string Print(const T& value) { - ::std::stringstream ss; - UniversalPrinter::Print(value, &ss); - return ss.str(); -} - -// Prints a value passed by reference to a string, using the universal -// value printer. This is a helper for testing -// UniversalPrinter::Print() for various types. -template -string PrintByRef(const T& value) { - ::std::stringstream ss; - UniversalPrinter::Print(value, &ss); - return ss.str(); -} - -// Tests printing various char types. - -// char. -TEST(PrintCharTest, PlainChar) { - EXPECT_EQ("'\\0'", Print('\0')); - EXPECT_EQ("'\\'' (39)", Print('\'')); - EXPECT_EQ("'\"' (34)", Print('"')); - EXPECT_EQ("'\\?' (63)", Print('\?')); - EXPECT_EQ("'\\\\' (92)", Print('\\')); - EXPECT_EQ("'\\a' (7)", Print('\a')); - EXPECT_EQ("'\\b' (8)", Print('\b')); - EXPECT_EQ("'\\f' (12)", Print('\f')); - EXPECT_EQ("'\\n' (10)", Print('\n')); - EXPECT_EQ("'\\r' (13)", Print('\r')); - EXPECT_EQ("'\\t' (9)", Print('\t')); - EXPECT_EQ("'\\v' (11)", Print('\v')); - EXPECT_EQ("'\\x7F' (127)", Print('\x7F')); - EXPECT_EQ("'\\xFF' (255)", Print('\xFF')); - EXPECT_EQ("' ' (32)", Print(' ')); - EXPECT_EQ("'a' (97)", Print('a')); -} - -// signed char. -TEST(PrintCharTest, SignedChar) { - EXPECT_EQ("'\\0'", Print(static_cast('\0'))); - EXPECT_EQ("'\\xCE' (-50)", - Print(static_cast(-50))); -} - -// unsigned char. -TEST(PrintCharTest, UnsignedChar) { - EXPECT_EQ("'\\0'", Print(static_cast('\0'))); - EXPECT_EQ("'b' (98)", - Print(static_cast('b'))); -} - -// Tests printing other simple, built-in types. - -// bool. -TEST(PrintBuiltInTypeTest, Bool) { - EXPECT_EQ("false", Print(false)); - EXPECT_EQ("true", Print(true)); -} - -// wchar_t. -TEST(PrintBuiltInTypeTest, Wchar_t) { - EXPECT_EQ("L'\\0'", Print(L'\0')); - EXPECT_EQ("L'\\'' (39)", Print(L'\'')); - EXPECT_EQ("L'\"' (34)", Print(L'"')); - EXPECT_EQ("L'\\?' (63)", Print(L'\?')); - EXPECT_EQ("L'\\\\' (92)", Print(L'\\')); - EXPECT_EQ("L'\\a' (7)", Print(L'\a')); - EXPECT_EQ("L'\\b' (8)", Print(L'\b')); - EXPECT_EQ("L'\\f' (12)", Print(L'\f')); - EXPECT_EQ("L'\\n' (10)", Print(L'\n')); - EXPECT_EQ("L'\\r' (13)", Print(L'\r')); - EXPECT_EQ("L'\\t' (9)", Print(L'\t')); - EXPECT_EQ("L'\\v' (11)", Print(L'\v')); - EXPECT_EQ("L'\\x7F' (127)", Print(L'\x7F')); - EXPECT_EQ("L'\\xFF' (255)", Print(L'\xFF')); - EXPECT_EQ("L' ' (32)", Print(L' ')); - EXPECT_EQ("L'a' (97)", Print(L'a')); - EXPECT_EQ("L'\\x576' (1398)", Print(L'\x576')); - EXPECT_EQ("L'\\xC74D' (51021)", Print(L'\xC74D')); -} - -// Test that Int64 provides more storage than wchar_t. -TEST(PrintTypeSizeTest, Wchar_t) { - EXPECT_LT(sizeof(wchar_t), sizeof(testing::internal::Int64)); -} - -// Various integer types. -TEST(PrintBuiltInTypeTest, Integer) { - EXPECT_EQ("'\\xFF' (255)", Print(static_cast(255))); // uint8 - EXPECT_EQ("'\\x80' (-128)", Print(static_cast(-128))); // int8 - EXPECT_EQ("65535", Print(USHRT_MAX)); // uint16 - EXPECT_EQ("-32768", Print(SHRT_MIN)); // int16 - EXPECT_EQ("4294967295", Print(UINT_MAX)); // uint32 - EXPECT_EQ("-2147483648", Print(INT_MIN)); // int32 - EXPECT_EQ("18446744073709551615", - Print(static_cast(-1))); // uint64 - EXPECT_EQ("-9223372036854775808", - Print(static_cast(1) << 63)); // int64 -} - -// Size types. -TEST(PrintBuiltInTypeTest, Size_t) { - EXPECT_EQ("1", Print(sizeof('a'))); // size_t. -#if !GTEST_OS_WINDOWS - // Windows has no ssize_t type. - EXPECT_EQ("-2", Print(static_cast(-2))); // ssize_t. -#endif // !GTEST_OS_WINDOWS -} - -// Floating-points. -TEST(PrintBuiltInTypeTest, FloatingPoints) { - EXPECT_EQ("1.5", Print(1.5f)); // float - EXPECT_EQ("-2.5", Print(-2.5)); // double -} - -// Since ::std::stringstream::operator<<(const void *) formats the pointer -// output differently with different compilers, we have to create the expected -// output first and use it as our expectation. -static string PrintPointer(const void *p) { - ::std::stringstream expected_result_stream; - expected_result_stream << p; - return expected_result_stream.str(); -} - -// Tests printing C strings. - -// const char*. -TEST(PrintCStringTest, Const) { - const char* p = "World"; - EXPECT_EQ(PrintPointer(p) + " pointing to \"World\"", Print(p)); -} - -// char*. -TEST(PrintCStringTest, NonConst) { - char p[] = "Hi"; - EXPECT_EQ(PrintPointer(p) + " pointing to \"Hi\"", - Print(static_cast(p))); -} - -// NULL C string. -TEST(PrintCStringTest, Null) { - const char* p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// Tests that C strings are escaped properly. -TEST(PrintCStringTest, EscapesProperly) { - const char* p = "'\"\?\\\a\b\f\n\r\t\v\x7F\xFF a"; - EXPECT_EQ(PrintPointer(p) + " pointing to \"'\\\"\\?\\\\\\a\\b\\f" - "\\n\\r\\t\\v\\x7F\\xFF a\"", - Print(p)); -} - - - -// MSVC compiler can be configured to define whar_t as a typedef -// of unsigned short. Defining an overload for const wchar_t* in that case -// would cause pointers to unsigned shorts be printed as wide strings, -// possibly accessing more memory than intended and causing invalid -// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when -// wchar_t is implemented as a native type. -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) - -// const wchar_t*. -TEST(PrintWideCStringTest, Const) { - const wchar_t* p = L"World"; - EXPECT_EQ(PrintPointer(p) + " pointing to L\"World\"", Print(p)); -} - -// wchar_t*. -TEST(PrintWideCStringTest, NonConst) { - wchar_t p[] = L"Hi"; - EXPECT_EQ(PrintPointer(p) + " pointing to L\"Hi\"", - Print(static_cast(p))); -} - -// NULL wide C string. -TEST(PrintWideCStringTest, Null) { - const wchar_t* p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// Tests that wide C strings are escaped properly. -TEST(PrintWideCStringTest, EscapesProperly) { - const wchar_t* p = L"'\"\?\\\a\b\f\n\r\t\v\xD3\x576\x8D3\xC74D a"; - EXPECT_EQ(PrintPointer(p) + " pointing to L\"'\\\"\\?\\\\\\a\\b\\f" - "\\n\\r\\t\\v\\xD3\\x576\\x8D3\\xC74D a\"", - Print(p)); -} -#endif // native wchar_t - -// Tests printing pointers to other char types. - -// signed char*. -TEST(PrintCharPointerTest, SignedChar) { - signed char* p = reinterpret_cast(0x1234); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// const signed char*. -TEST(PrintCharPointerTest, ConstSignedChar) { - signed char* p = reinterpret_cast(0x1234); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// unsigned char*. -TEST(PrintCharPointerTest, UnsignedChar) { - unsigned char* p = reinterpret_cast(0x1234); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// const unsigned char*. -TEST(PrintCharPointerTest, ConstUnsignedChar) { - const unsigned char* p = reinterpret_cast(0x1234); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// Tests printing pointers to simple, built-in types. - -// bool*. -TEST(PrintPointerToBuiltInTypeTest, Bool) { - bool* p = reinterpret_cast(0xABCD); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// void*. -TEST(PrintPointerToBuiltInTypeTest, Void) { - void* p = reinterpret_cast(0xABCD); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// const void*. -TEST(PrintPointerToBuiltInTypeTest, ConstVoid) { - const void* p = reinterpret_cast(0xABCD); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// Tests printing pointers to pointers. -TEST(PrintPointerToPointerTest, IntPointerPointer) { - int** p = reinterpret_cast(0xABCD); - EXPECT_EQ(PrintPointer(p), Print(p)); - p = NULL; - EXPECT_EQ("NULL", Print(p)); -} - -// Tests printing (non-member) function pointers. - -void MyFunction(int n) {} - -TEST(PrintPointerTest, NonMemberFunctionPointer) { - EXPECT_EQ(PrintPointer(reinterpret_cast(&MyFunction)), - Print(&MyFunction)); - int (*p)(bool) = NULL; // NOLINT - EXPECT_EQ("NULL", Print(p)); -} - -// Tests printing member variable pointers. Although they are called -// pointers, they don't point to a location in the address space. -// Their representation is implementation-defined. Thus they will be -// printed as raw bytes. - -struct Foo { - public: - virtual ~Foo() {} - int MyMethod(char x) { return x + 1; } - virtual char MyVirtualMethod(int n) { return 'a'; } - - int value; -}; - -TEST(PrintPointerTest, MemberVariablePointer) { - EXPECT_THAT(Print(&Foo::value), - StartsWith(Print(sizeof(&Foo::value)) + "-byte object ")); - int (Foo::*p) = NULL; // NOLINT - EXPECT_THAT(Print(p), - StartsWith(Print(sizeof(p)) + "-byte object ")); -} - -// Tests printing member function pointers. Although they are called -// pointers, they don't point to a location in the address space. -// Their representation is implementation-defined. Thus they will be -// printed as raw bytes. -TEST(PrintPointerTest, MemberFunctionPointer) { - EXPECT_THAT(Print(&Foo::MyMethod), - StartsWith(Print(sizeof(&Foo::MyMethod)) + "-byte object ")); - EXPECT_THAT(Print(&Foo::MyVirtualMethod), - StartsWith(Print(sizeof((&Foo::MyVirtualMethod))) - + "-byte object ")); - int (Foo::*p)(char) = NULL; // NOLINT - EXPECT_THAT(Print(p), - StartsWith(Print(sizeof(p)) + "-byte object ")); -} - -// Tests printing C arrays. - -// The difference between this and Print() is that it ensures that the -// argument is a reference to an array. -template -string PrintArrayHelper(T (&a)[N]) { - return Print(a); -} - -// One-dimensional array. -TEST(PrintArrayTest, OneDimensionalArray) { - int a[5] = { 1, 2, 3, 4, 5 }; - EXPECT_EQ("{ 1, 2, 3, 4, 5 }", PrintArrayHelper(a)); -} - -// Two-dimensional array. -TEST(PrintArrayTest, TwoDimensionalArray) { - int a[2][5] = { - { 1, 2, 3, 4, 5 }, - { 6, 7, 8, 9, 0 } - }; - EXPECT_EQ("{ { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 0 } }", PrintArrayHelper(a)); -} - -// Array of const elements. -TEST(PrintArrayTest, ConstArray) { - const bool a[1] = { false }; - EXPECT_EQ("{ false }", PrintArrayHelper(a)); -} - -// Char array. -TEST(PrintArrayTest, CharArray) { - // Array a contains '\0' in the middle and doesn't end with '\0'. - char a[3] = { 'H', '\0', 'i' }; - EXPECT_EQ("\"H\\0i\"", PrintArrayHelper(a)); -} - -// Const char array. -TEST(PrintArrayTest, ConstCharArray) { - const char a[4] = "\0Hi"; - EXPECT_EQ("\"\\0Hi\\0\"", PrintArrayHelper(a)); -} - -// Array of objects. -TEST(PrintArrayTest, ObjectArray) { - string a[3] = { "Hi", "Hello", "Ni hao" }; - EXPECT_EQ("{ \"Hi\", \"Hello\", \"Ni hao\" }", PrintArrayHelper(a)); -} - -// Array with many elements. -TEST(PrintArrayTest, BigArray) { - int a[100] = { 1, 2, 3 }; - EXPECT_EQ("{ 1, 2, 3, 0, 0, 0, 0, 0, ..., 0, 0, 0, 0, 0, 0, 0, 0 }", - PrintArrayHelper(a)); -} - -// Tests printing ::string and ::std::string. - -#if GTEST_HAS_GLOBAL_STRING -// ::string. -TEST(PrintStringTest, StringInGlobalNamespace) { - const char s[] = "'\"\?\\\a\b\f\n\0\r\t\v\x7F\xFF a"; - const ::string str(s, sizeof(s)); - EXPECT_EQ("\"'\\\"\\?\\\\\\a\\b\\f\\n\\0\\r\\t\\v\\x7F\\xFF a\\0\"", - Print(str)); -} -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING -// ::std::string. -TEST(PrintStringTest, StringInStdNamespace) { - const char s[] = "'\"\?\\\a\b\f\n\0\r\t\v\x7F\xFF a"; - const ::std::string str(s, sizeof(s)); - EXPECT_EQ("\"'\\\"\\?\\\\\\a\\b\\f\\n\\0\\r\\t\\v\\x7F\\xFF a\\0\"", - Print(str)); -} -#endif // GTEST_HAS_STD_STRING - -// Tests printing ::wstring and ::std::wstring. - -#if GTEST_HAS_GLOBAL_WSTRING -// ::wstring. -TEST(PrintWideStringTest, StringInGlobalNamespace) { - const wchar_t s[] = L"'\"\?\\\a\b\f\n\0\r\t\v\xD3\x576\x8D3\xC74D a"; - const ::wstring str(s, sizeof(s)/sizeof(wchar_t)); - EXPECT_EQ("L\"'\\\"\\?\\\\\\a\\b\\f\\n\\0\\r\\t\\v" - "\\xD3\\x576\\x8D3\\xC74D a\\0\"", - Print(str)); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_WSTRING -// ::std::wstring. -TEST(PrintWideStringTest, StringInStdNamespace) { - const wchar_t s[] = L"'\"\?\\\a\b\f\n\0\r\t\v\xD3\x576\x8D3\xC74D a"; - const ::std::wstring str(s, sizeof(s)/sizeof(wchar_t)); - EXPECT_EQ("L\"'\\\"\\?\\\\\\a\\b\\f\\n\\0\\r\\t\\v" - "\\xD3\\x576\\x8D3\\xC74D a\\0\"", - Print(str)); -} -#endif // GTEST_HAS_STD_WSTRING - -// Tests printing types that support generic streaming (i.e. streaming -// to std::basic_ostream for any valid Char and -// CharTraits types). - -// Tests printing a non-template type that supports generic streaming. - -class AllowsGenericStreaming {}; - -template -std::basic_ostream& operator<<( - std::basic_ostream& os, - const AllowsGenericStreaming& a) { - return os << "AllowsGenericStreaming"; -} - -TEST(PrintTypeWithGenericStreamingTest, NonTemplateType) { - AllowsGenericStreaming a; - EXPECT_EQ("AllowsGenericStreaming", Print(a)); -} - -// Tests printing a template type that supports generic streaming. - -template -class AllowsGenericStreamingTemplate {}; - -template -std::basic_ostream& operator<<( - std::basic_ostream& os, - const AllowsGenericStreamingTemplate& a) { - return os << "AllowsGenericStreamingTemplate"; -} - -TEST(PrintTypeWithGenericStreamingTest, TemplateType) { - AllowsGenericStreamingTemplate a; - EXPECT_EQ("AllowsGenericStreamingTemplate", Print(a)); -} - -// Tests printing a type that supports generic streaming and can be -// implicitly converted to another printable type. - -template -class AllowsGenericStreamingAndImplicitConversionTemplate { - public: - operator bool() const { return false; } -}; - -template -std::basic_ostream& operator<<( - std::basic_ostream& os, - const AllowsGenericStreamingAndImplicitConversionTemplate& a) { - return os << "AllowsGenericStreamingAndImplicitConversionTemplate"; -} - -TEST(PrintTypeWithGenericStreamingTest, TypeImplicitlyConvertible) { - AllowsGenericStreamingAndImplicitConversionTemplate a; - EXPECT_EQ("AllowsGenericStreamingAndImplicitConversionTemplate", Print(a)); -} - -// Tests printing STL containers. - -TEST(PrintStlContainerTest, EmptyDeque) { - deque empty; - EXPECT_EQ("{}", Print(empty)); -} - -TEST(PrintStlContainerTest, NonEmptyDeque) { - deque non_empty; - non_empty.push_back(1); - non_empty.push_back(3); - EXPECT_EQ("{ 1, 3 }", Print(non_empty)); -} - -#if GMOCK_HAS_HASH_MAP_ - -TEST(PrintStlContainerTest, OneElementHashMap) { - hash_map map1; - map1[1] = 'a'; - EXPECT_EQ("{ (1, 'a' (97)) }", Print(map1)); -} - -TEST(PrintStlContainerTest, HashMultiMap) { - hash_multimap map1; - map1.insert(make_pair(5, true)); - map1.insert(make_pair(5, false)); - - // Elements of hash_multimap can be printed in any order. - const string result = Print(map1); - EXPECT_TRUE(result == "{ (5, true), (5, false) }" || - result == "{ (5, false), (5, true) }") - << " where Print(map1) returns \"" << result << "\"."; -} - -#endif // GMOCK_HAS_HASH_MAP_ - -#if GMOCK_HAS_HASH_SET_ - -TEST(PrintStlContainerTest, HashSet) { - hash_set set1; - set1.insert("hello"); - EXPECT_EQ("{ \"hello\" }", Print(set1)); -} - -TEST(PrintStlContainerTest, HashMultiSet) { - const int kSize = 5; - int a[kSize] = { 1, 1, 2, 5, 1 }; - hash_multiset set1(a, a + kSize); - - // Elements of hash_multiset can be printed in any order. - const string result = Print(set1); - const string expected_pattern = "{ d, d, d, d, d }"; // d means a digit. - - // Verifies the result matches the expected pattern; also extracts - // the numbers in the result. - ASSERT_EQ(expected_pattern.length(), result.length()); - std::vector numbers; - for (size_t i = 0; i != result.length(); i++) { - if (expected_pattern[i] == 'd') { - ASSERT_TRUE(isdigit(result[i])); - numbers.push_back(result[i] - '0'); - } else { - EXPECT_EQ(expected_pattern[i], result[i]) << " where result is " - << result; - } - } - - // Makes sure the result contains the right numbers. - std::sort(numbers.begin(), numbers.end()); - std::sort(a, a + kSize); - EXPECT_TRUE(std::equal(a, a + kSize, numbers.begin())); -} - -#endif // GMOCK_HAS_HASH_SET_ - -TEST(PrintStlContainerTest, List) { - const char* a[] = { - "hello", - "world" - }; - const list strings(a, a + 2); - EXPECT_EQ("{ \"hello\", \"world\" }", Print(strings)); -} - -TEST(PrintStlContainerTest, Map) { - map map1; - map1[1] = true; - map1[5] = false; - map1[3] = true; - EXPECT_EQ("{ (1, true), (3, true), (5, false) }", Print(map1)); -} - -TEST(PrintStlContainerTest, MultiMap) { - multimap map1; - map1.insert(make_pair(true, 0)); - map1.insert(make_pair(true, 1)); - map1.insert(make_pair(false, 2)); - EXPECT_EQ("{ (false, 2), (true, 0), (true, 1) }", Print(map1)); -} - -TEST(PrintStlContainerTest, Set) { - const unsigned int a[] = { 3, 0, 5 }; - set set1(a, a + 3); - EXPECT_EQ("{ 0, 3, 5 }", Print(set1)); -} - -TEST(PrintStlContainerTest, MultiSet) { - const int a[] = { 1, 1, 2, 5, 1 }; - multiset set1(a, a + 5); - EXPECT_EQ("{ 1, 1, 1, 2, 5 }", Print(set1)); -} - -TEST(PrintStlContainerTest, Pair) { - pair p(true, 5); - EXPECT_EQ("(true, 5)", Print(p)); -} - -TEST(PrintStlContainerTest, Vector) { - vector v; - v.push_back(1); - v.push_back(2); - EXPECT_EQ("{ 1, 2 }", Print(v)); -} - -TEST(PrintStlContainerTest, LongSequence) { - const int a[100] = { 1, 2, 3 }; - const vector v(a, a + 100); - EXPECT_EQ("{ 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " - "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... }", Print(v)); -} - -TEST(PrintStlContainerTest, NestedContainer) { - const int a1[] = { 1, 2 }; - const int a2[] = { 3, 4, 5 }; - const list l1(a1, a1 + 2); - const list l2(a2, a2 + 3); - - vector > v; - v.push_back(l1); - v.push_back(l2); - EXPECT_EQ("{ { 1, 2 }, { 3, 4, 5 } }", Print(v)); -} - -TEST(PrintStlContainerTest, OneDimensionalNativeArray) { - const int a[] = { 1, 2, 3 }; - NativeArray b(a, kReference); - EXPECT_EQ("{ 1, 2, 3 }", Print(b)); -} - -TEST(PrintStlContainerTest, TwoDimensionalNativeArray) { - const int a[][3] = { { 1, 2, 3 }, { 4, 5, 6 } }; - NativeArray b(a, kReference); - EXPECT_EQ("{ { 1, 2, 3 }, { 4, 5, 6 } }", Print(b)); -} - -// Tests printing tuples. - -// Tuples of various arities. -TEST(PrintTupleTest, VariousSizes) { - tuple<> t0; - EXPECT_EQ("()", Print(t0)); - - tuple t1(5); - EXPECT_EQ("(5)", Print(t1)); - - tuple t2('a', true); - EXPECT_EQ("('a' (97), true)", Print(t2)); - - tuple t3(false, 2, 3); - EXPECT_EQ("(false, 2, 3)", Print(t3)); - - tuple t4(false, 2, 3, 4); - EXPECT_EQ("(false, 2, 3, 4)", Print(t4)); - - tuple t5(false, 2, 3, 4, true); - EXPECT_EQ("(false, 2, 3, 4, true)", Print(t5)); - - tuple t6(false, 2, 3, 4, true, 6); - EXPECT_EQ("(false, 2, 3, 4, true, 6)", Print(t6)); - - tuple t7(false, 2, 3, 4, true, 6, 7); - EXPECT_EQ("(false, 2, 3, 4, true, 6, 7)", Print(t7)); - - tuple t8( - false, 2, 3, 4, true, 6, 7, true); - EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true)", Print(t8)); - - tuple t9( - false, 2, 3, 4, true, 6, 7, true, 9); - EXPECT_EQ("(false, 2, 3, 4, true, 6, 7, true, 9)", Print(t9)); - - const char* const str = "8"; - tuple - t10(false, 'a', 3, 4, 5, 6.5F, 7.5, str, NULL, "10"); - EXPECT_EQ("(false, 'a' (97), 3, 4, 5, 6.5, 7.5, " + PrintPointer(str) + - " pointing to \"8\", NULL, \"10\")", - Print(t10)); -} - -// Nested tuples. -TEST(PrintTupleTest, NestedTuple) { - tuple, char> nested(make_tuple(5, 9.5), 'a'); - EXPECT_EQ("((5, 9.5), 'a' (97))", Print(nested)); -} - -// Tests printing user-defined unprintable types. - -// Unprintable types in the global namespace. -TEST(PrintUnprintableTypeTest, InGlobalNamespace) { - EXPECT_EQ("1-byte object <00>", - Print(UnprintableTemplateInGlobal())); -} - -// Unprintable types in a user namespace. -TEST(PrintUnprintableTypeTest, InUserNamespace) { - EXPECT_EQ("16-byte object ", - Print(::foo::UnprintableInFoo())); -} - -// Unprintable types are that too big to be printed completely. - -struct Big { - Big() { memset(array, 0, sizeof(array)); } - char array[257]; -}; - -TEST(PrintUnpritableTypeTest, BigObject) { - EXPECT_EQ("257-byte object <0000 0000 0000 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 ... 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 " - "0000 0000 0000 0000 0000 0000 0000 0000 00>", - Print(Big())); -} - -// Tests printing user-defined streamable types. - -// Streamable types in the global namespace. -TEST(PrintStreamableTypeTest, InGlobalNamespace) { - EXPECT_EQ("StreamableInGlobal", - Print(StreamableInGlobal())); -} - -// Printable template types in a user namespace. -TEST(PrintStreamableTypeTest, TemplateTypeInUserNamespace) { - EXPECT_EQ("StreamableTemplateInFoo: 0", - Print(::foo::StreamableTemplateInFoo())); -} - -// Tests printing user-defined types that have a PrintTo() function. -TEST(PrintPrintableTypeTest, InUserNamespace) { - EXPECT_EQ("PrintableViaPrintTo: 0", - Print(::foo::PrintableViaPrintTo())); -} - -// Tests printing user-defined class template that have a PrintTo() function. -TEST(PrintPrintableTypeTest, TemplateInUserNamespace) { - EXPECT_EQ("PrintableViaPrintToTemplate: 5", - Print(::foo::PrintableViaPrintToTemplate(5))); -} - -#if GMOCK_HAS_PROTOBUF_ - -// Tests printing a protocol message. -TEST(PrintProtocolMessageTest, PrintsShortDebugString) { - testing::internal::TestMessage msg; - msg.set_member("yes"); - EXPECT_EQ("", Print(msg)); -} - -// Tests printing a proto2 message. -TEST(PrintProto2MessageTest, PrintsShortDebugString) { - testing::internal::FooMessage msg; - msg.set_int_field(2); - EXPECT_PRED2(RE::FullMatch, Print(msg), - ""); -} - -#endif // GMOCK_HAS_PROTOBUF_ - -// Tests that the universal printer prints both the address and the -// value of a reference. -TEST(PrintReferenceTest, PrintsAddressAndValue) { - int n = 5; - EXPECT_EQ("@" + PrintPointer(&n) + " 5", PrintByRef(n)); - - int a[2][3] = { - { 0, 1, 2 }, - { 3, 4, 5 } - }; - EXPECT_EQ("@" + PrintPointer(a) + " { { 0, 1, 2 }, { 3, 4, 5 } }", - PrintByRef(a)); - - const ::foo::UnprintableInFoo x; - EXPECT_EQ("@" + PrintPointer(&x) + " 16-byte object " - "", - PrintByRef(x)); -} - -// Tests that the universal printer prints a function pointer passed by -// reference. -TEST(PrintReferenceTest, HandlesFunctionPointer) { - void (*fp)(int n) = &MyFunction; - const string fp_pointer_string = - PrintPointer(reinterpret_cast(&fp)); - const string fp_string = PrintPointer(reinterpret_cast(fp)); - EXPECT_EQ("@" + fp_pointer_string + " " + fp_string, - PrintByRef(fp)); -} - -// Tests that the universal printer prints a member function pointer -// passed by reference. -TEST(PrintReferenceTest, HandlesMemberFunctionPointer) { - int (Foo::*p)(char ch) = &Foo::MyMethod; - EXPECT_THAT(PrintByRef(p), - StartsWith("@" + PrintPointer(reinterpret_cast(&p)) - + " " + Print(sizeof(p)) + "-byte object ")); - - char (Foo::*p2)(int n) = &Foo::MyVirtualMethod; - EXPECT_THAT(PrintByRef(p2), - StartsWith("@" + PrintPointer(reinterpret_cast(&p2)) - + " " + Print(sizeof(p2)) + "-byte object ")); -} - -// Tests that the universal printer prints a member variable pointer -// passed by reference. -TEST(PrintReferenceTest, HandlesMemberVariablePointer) { - int (Foo::*p) = &Foo::value; // NOLINT - EXPECT_THAT(PrintByRef(p), - StartsWith("@" + PrintPointer(&p) - + " " + Print(sizeof(p)) + "-byte object ")); -} - -TEST(PrintToStringTest, WorksForNonReference) { - EXPECT_EQ("123", UniversalPrinter::PrintToString(123)); -} - -TEST(PrintToStringTest, WorksForReference) { - int n = 123; - EXPECT_EQ("@" + PrintPointer(&n) + " 123", - UniversalPrinter::PrintToString(n)); -} - -TEST(PrintToStringTest, WorksForArray) { - int n[3] = { 1, 2, 3 }; - EXPECT_EQ("{ 1, 2, 3 }", UniversalPrinter::PrintToString(n)); -} - -TEST(UniversalTersePrintTest, WorksForNonReference) { - ::std::stringstream ss; - UniversalTersePrint(123, &ss); - EXPECT_EQ("123", ss.str()); -} - -TEST(UniversalTersePrintTest, WorksForReference) { - const int& n = 123; - ::std::stringstream ss; - UniversalTersePrint(n, &ss); - EXPECT_EQ("123", ss.str()); -} - -TEST(UniversalTersePrintTest, WorksForCString) { - const char* s1 = "abc"; - ::std::stringstream ss1; - UniversalTersePrint(s1, &ss1); - EXPECT_EQ("\"abc\"", ss1.str()); - - char* s2 = const_cast(s1); - ::std::stringstream ss2; - UniversalTersePrint(s2, &ss2); - EXPECT_EQ("\"abc\"", ss2.str()); - - const char* s3 = NULL; - ::std::stringstream ss3; - UniversalTersePrint(s3, &ss3); - EXPECT_EQ("NULL", ss3.str()); -} - -TEST(UniversalPrintTest, WorksForNonReference) { - ::std::stringstream ss; - UniversalPrint(123, &ss); - EXPECT_EQ("123", ss.str()); -} - -TEST(UniversalPrintTest, WorksForReference) { - const int& n = 123; - ::std::stringstream ss; - UniversalPrint(n, &ss); - EXPECT_EQ("123", ss.str()); -} - -TEST(UniversalPrintTest, WorksForCString) { - const char* s1 = "abc"; - ::std::stringstream ss1; - UniversalPrint(s1, &ss1); - EXPECT_EQ(PrintPointer(s1) + " pointing to \"abc\"", string(ss1.str())); - - char* s2 = const_cast(s1); - ::std::stringstream ss2; - UniversalPrint(s2, &ss2); - EXPECT_EQ(PrintPointer(s2) + " pointing to \"abc\"", string(ss2.str())); - - const char* s3 = NULL; - ::std::stringstream ss3; - UniversalPrint(s3, &ss3); - EXPECT_EQ("NULL", ss3.str()); -} - - -TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsEmptyTuple) { - EXPECT_THAT(UniversalTersePrintTupleFieldsToStrings(make_tuple()), - ElementsAre()); -} - -TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsOneTuple) { - EXPECT_THAT(UniversalTersePrintTupleFieldsToStrings(make_tuple(1)), - ElementsAre("1")); -} - -TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsTwoTuple) { - EXPECT_THAT(UniversalTersePrintTupleFieldsToStrings(make_tuple(1, 'a')), - ElementsAre("1", "'a' (97)")); -} - -TEST(UniversalTersePrintTupleFieldsToStringsTest, PrintsTersely) { - const int n = 1; - EXPECT_THAT(UniversalTersePrintTupleFieldsToStrings( - tuple(n, "a")), - ElementsAre("1", "\"a\"")); -} - -} // namespace gmock_printers_test -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-spec-builders_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-spec-builders_test.cc deleted file mode 100644 index 614e4ab5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock-spec-builders_test.cc +++ /dev/null @@ -1,2021 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests the spec builder syntax. - -#include - -#include // NOLINT -#include -#include - -#include -#include -#include -#include - -namespace testing { -namespace internal { - -// Helper class for testing the Expectation class template. -class ExpectationTester { - public: - // Sets the call count of the given expectation to the given number. - void SetCallCount(int n, ExpectationBase* exp) { - exp->call_count_ = n; - } -}; - -} // namespace internal -} // namespace testing - -namespace { - -using testing::_; -using testing::AnyNumber; -using testing::AtLeast; -using testing::AtMost; -using testing::Between; -using testing::Cardinality; -using testing::CardinalityInterface; -using testing::Const; -using testing::DoAll; -using testing::DoDefault; -using testing::GMOCK_FLAG(verbose); -using testing::Gt; -using testing::InSequence; -using testing::Invoke; -using testing::InvokeWithoutArgs; -using testing::IsSubstring; -using testing::Lt; -using testing::Message; -using testing::Mock; -using testing::Return; -using testing::Sequence; -using testing::internal::g_gmock_mutex; -using testing::internal::kErrorVerbosity; -using testing::internal::kInfoVerbosity; -using testing::internal::kWarningVerbosity; -using testing::internal::Expectation; -using testing::internal::ExpectationTester; -using testing::internal::string; - -class Result {}; - -class MockA { - public: - MOCK_METHOD1(DoA, void(int n)); // NOLINT - MOCK_METHOD1(ReturnResult, Result(int n)); // NOLINT - MOCK_METHOD2(Binary, bool(int x, int y)); // NOLINT - MOCK_METHOD2(ReturnInt, int(int x, int y)); // NOLINT -}; - -class MockB { - public: - MOCK_CONST_METHOD0(DoB, int()); // NOLINT - MOCK_METHOD1(DoB, int(int n)); // NOLINT -}; - -// Tests that EXPECT_CALL and ON_CALL compile in a presence of macro -// redefining a mock method name. This could happen, for example, when -// the tested code #includes Win32 API headers which define many APIs -// as macros, e.g. #define TextOut TextOutW. - -#define Method MethodW - -class CC { - public: - virtual ~CC() {} - virtual int Method() = 0; -}; -class MockCC : public CC { - public: - MOCK_METHOD0(Method, int()); -}; - -// Tests that a method with expanded name compiles. -TEST(OnCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) { - MockCC cc; - ON_CALL(cc, Method()); -} - -// Tests that the method with expanded name not only compiles but runs -// and returns a correct value, too. -TEST(OnCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) { - MockCC cc; - ON_CALL(cc, Method()).WillByDefault(Return(42)); - EXPECT_EQ(42, cc.Method()); -} - -// Tests that a method with expanded name compiles. -TEST(ExpectCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) { - MockCC cc; - EXPECT_CALL(cc, Method()); - cc.Method(); -} - -// Tests that it works, too. -TEST(ExpectCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) { - MockCC cc; - EXPECT_CALL(cc, Method()).WillOnce(Return(42)); - EXPECT_EQ(42, cc.Method()); -} - -#undef Method // Done with macro redefinition tests. - -// Tests that ON_CALL evaluates its arguments exactly once as promised -// by Google Mock. -TEST(OnCallSyntaxTest, EvaluatesFirstArgumentOnce) { - MockA a; - MockA* pa = &a; - - ON_CALL(*pa++, DoA(_)); - EXPECT_EQ(&a + 1, pa); -} - -TEST(OnCallSyntaxTest, EvaluatesSecondArgumentOnce) { - MockA a; - int n = 0; - - ON_CALL(a, DoA(n++)); - EXPECT_EQ(1, n); -} - -// Tests that the syntax of ON_CALL() is enforced at run time. - -TEST(OnCallSyntaxTest, WithIsOptional) { - MockA a; - - ON_CALL(a, DoA(5)) - .WillByDefault(Return()); - ON_CALL(a, DoA(_)) - .With(_) - .WillByDefault(Return()); -} - -TEST(OnCallSyntaxTest, WithCanAppearAtMostOnce) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - ON_CALL(a, ReturnResult(_)) - .With(_) - .With(_) - .WillByDefault(Return(Result())); - }, ".With() cannot appear more than once in an ON_CALL()"); -} - -#if GTEST_HAS_DEATH_TEST - -TEST(OnCallSyntaxTest, WillByDefaultIsMandatory) { - MockA a; - - EXPECT_DEATH({ // NOLINT - ON_CALL(a, DoA(5)); - a.DoA(5); - }, ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -TEST(OnCallSyntaxTest, WillByDefaultCanAppearAtMostOnce) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - ON_CALL(a, DoA(5)) - .WillByDefault(Return()) - .WillByDefault(Return()); - }, ".WillByDefault() must appear exactly once in an ON_CALL()"); -} - -// Tests that EXPECT_CALL evaluates its arguments exactly once as -// promised by Google Mock. -TEST(ExpectCallSyntaxTest, EvaluatesFirstArgumentOnce) { - MockA a; - MockA* pa = &a; - - EXPECT_CALL(*pa++, DoA(_)); - a.DoA(0); - EXPECT_EQ(&a + 1, pa); -} - -TEST(ExpectCallSyntaxTest, EvaluatesSecondArgumentOnce) { - MockA a; - int n = 0; - - EXPECT_CALL(a, DoA(n++)); - a.DoA(0); - EXPECT_EQ(1, n); -} - -// Tests that the syntax of EXPECT_CALL() is enforced at run time. - -TEST(ExpectCallSyntaxTest, WithIsOptional) { - MockA a; - - EXPECT_CALL(a, DoA(5)) - .Times(0); - EXPECT_CALL(a, DoA(6)) - .With(_) - .Times(0); -} - -TEST(ExpectCallSyntaxTest, WithCanAppearAtMostOnce) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(6)) - .With(_) - .With(_); - }, ".With() cannot appear more than once in an EXPECT_CALL()"); - - a.DoA(6); -} - -TEST(ExpectCallSyntaxTest, WithMustBeFirstClause) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .Times(1) - .With(_); - }, ".With() must be the first clause in an EXPECT_CALL()"); - - a.DoA(1); - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(2)) - .WillOnce(Return()) - .With(_); - }, ".With() must be the first clause in an EXPECT_CALL()"); - - a.DoA(2); -} - -TEST(ExpectCallSyntaxTest, TimesCanBeInferred) { - MockA a; - - EXPECT_CALL(a, DoA(1)) - .WillOnce(Return()); - - EXPECT_CALL(a, DoA(2)) - .WillOnce(Return()) - .WillRepeatedly(Return()); - - a.DoA(1); - a.DoA(2); - a.DoA(2); -} - -TEST(ExpectCallSyntaxTest, TimesCanAppearAtMostOnce) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .Times(1) - .Times(2); - }, ".Times() cannot appear more than once in an EXPECT_CALL()"); - - a.DoA(1); - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, TimesMustBeBeforeInSequence) { - MockA a; - Sequence s; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .InSequence(s) - .Times(1); - }, ".Times() cannot appear after "); - - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, InSequenceIsOptional) { - MockA a; - Sequence s; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(a, DoA(2)) - .InSequence(s); - - a.DoA(1); - a.DoA(2); -} - -TEST(ExpectCallSyntaxTest, InSequenceCanAppearMultipleTimes) { - MockA a; - Sequence s1, s2; - - EXPECT_CALL(a, DoA(1)) - .InSequence(s1, s2) - .InSequence(s1); - - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeWill) { - MockA a; - Sequence s; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .WillOnce(Return()) - .InSequence(s); - }, ".InSequence() cannot appear after "); - - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, WillIsOptional) { - MockA a; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(a, DoA(2)) - .WillOnce(Return()); - - a.DoA(1); - a.DoA(2); -} - -TEST(ExpectCallSyntaxTest, WillCanAppearMultipleTimes) { - MockA a; - - EXPECT_CALL(a, DoA(1)) - .Times(AnyNumber()) - .WillOnce(Return()) - .WillOnce(Return()) - .WillOnce(Return()); -} - -TEST(ExpectCallSyntaxTest, WillMustBeBeforeWillRepeatedly) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .WillRepeatedly(Return()) - .WillOnce(Return()); - }, ".WillOnce() cannot appear after "); - - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, WillRepeatedlyIsOptional) { - MockA a; - - EXPECT_CALL(a, DoA(1)) - .WillOnce(Return()); - EXPECT_CALL(a, DoA(2)) - .WillOnce(Return()) - .WillRepeatedly(Return()); - - a.DoA(1); - a.DoA(2); - a.DoA(2); -} - -TEST(ExpectCallSyntaxTest, WillRepeatedlyCannotAppearMultipleTimes) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .WillRepeatedly(Return()) - .WillRepeatedly(Return()); - }, ".WillRepeatedly() cannot appear more than once in an " - "EXPECT_CALL()"); -} - -TEST(ExpectCallSyntaxTest, WillRepeatedlyMustBeBeforeRetiresOnSaturation) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .RetiresOnSaturation() - .WillRepeatedly(Return()); - }, ".WillRepeatedly() cannot appear after "); -} - -TEST(ExpectCallSyntaxTest, RetiresOnSaturationIsOptional) { - MockA a; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(a, DoA(1)) - .RetiresOnSaturation(); - - a.DoA(1); - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, RetiresOnSaturationCannotAppearMultipleTimes) { - MockA a; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_CALL(a, DoA(1)) - .RetiresOnSaturation() - .RetiresOnSaturation(); - }, ".RetiresOnSaturation() cannot appear more than once"); - - a.DoA(1); -} - -TEST(ExpectCallSyntaxTest, DefaultCardinalityIsOnce) { - { - MockA a; - EXPECT_CALL(a, DoA(1)); - a.DoA(1); - } - EXPECT_NONFATAL_FAILURE({ // NOLINT - MockA a; - EXPECT_CALL(a, DoA(1)); - }, "to be called once"); - EXPECT_NONFATAL_FAILURE({ // NOLINT - MockA a; - EXPECT_CALL(a, DoA(1)); - a.DoA(1); - a.DoA(1); - }, "to be called once"); -} - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Tests that Google Mock doesn't print a warning when the number of -// WillOnce() is adequate. -TEST(ExpectCallSyntaxTest, DoesNotWarnOnAdequateActionCount) { - CaptureTestStdout(); - { - MockB b; - - // It's always fine to omit WillOnce() entirely. - EXPECT_CALL(b, DoB()) - .Times(0); - EXPECT_CALL(b, DoB(1)) - .Times(AtMost(1)); - EXPECT_CALL(b, DoB(2)) - .Times(1) - .WillRepeatedly(Return(1)); - - // It's fine for the number of WillOnce()s to equal the upper bound. - EXPECT_CALL(b, DoB(3)) - .Times(Between(1, 2)) - .WillOnce(Return(1)) - .WillOnce(Return(2)); - - // It's fine for the number of WillOnce()s to be smaller than the - // upper bound when there is a WillRepeatedly(). - EXPECT_CALL(b, DoB(4)) - .Times(AtMost(3)) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); - - // Satisfies the above expectations. - b.DoB(2); - b.DoB(3); - } - const string& output = GetCapturedTestStdout(); - EXPECT_EQ("", output); -} - -// Tests that Google Mock warns on having too many actions in an -// expectation compared to its cardinality. -TEST(ExpectCallSyntaxTest, WarnsOnTooManyActions) { - CaptureTestStdout(); - { - MockB b; - - // Warns when the number of WillOnce()s is larger than the upper bound. - EXPECT_CALL(b, DoB()) - .Times(0) - .WillOnce(Return(1)); // #1 - EXPECT_CALL(b, DoB()) - .Times(AtMost(1)) - .WillOnce(Return(1)) - .WillOnce(Return(2)); // #2 - EXPECT_CALL(b, DoB(1)) - .Times(1) - .WillOnce(Return(1)) - .WillOnce(Return(2)) - .RetiresOnSaturation(); // #3 - - // Warns when the number of WillOnce()s equals the upper bound and - // there is a WillRepeatedly(). - EXPECT_CALL(b, DoB()) - .Times(0) - .WillRepeatedly(Return(1)); // #4 - EXPECT_CALL(b, DoB(2)) - .Times(1) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); // #5 - - // Satisfies the above expectations. - b.DoB(1); - b.DoB(2); - } - const string& output = GetCapturedTestStdout(); - EXPECT_PRED_FORMAT2(IsSubstring, - "Too many actions specified.\n" - "Expected to be never called, but has 1 WillOnce().", - output); // #1 - EXPECT_PRED_FORMAT2(IsSubstring, - "Too many actions specified.\n" - "Expected to be called at most once, " - "but has 2 WillOnce()s.", - output); // #2 - EXPECT_PRED_FORMAT2(IsSubstring, - "Too many actions specified.\n" - "Expected to be called once, but has 2 WillOnce()s.", - output); // #3 - EXPECT_PRED_FORMAT2(IsSubstring, - "Too many actions specified.\n" - "Expected to be never called, but has 0 WillOnce()s " - "and a WillRepeatedly().", - output); // #4 - EXPECT_PRED_FORMAT2(IsSubstring, - "Too many actions specified.\n" - "Expected to be called once, but has 1 WillOnce() " - "and a WillRepeatedly().", - output); // #5 -} - -// Tests that Google Mock warns on having too few actions in an -// expectation compared to its cardinality. -TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) { - MockB b; - - EXPECT_CALL(b, DoB()) - .Times(Between(2, 3)) - .WillOnce(Return(1)); - - CaptureTestStdout(); - b.DoB(); - const string& output = GetCapturedTestStdout(); - EXPECT_PRED_FORMAT2(IsSubstring, - "Too few actions specified.\n" - "Expected to be called between 2 and 3 times, " - "but has only 1 WillOnce().", - output); - b.DoB(); -} - -#endif // 0 - -// Tests the semantics of ON_CALL(). - -// Tests that the built-in default action is taken when no ON_CALL() -// is specified. -TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCall) { - MockB b; - EXPECT_CALL(b, DoB()); - - EXPECT_EQ(0, b.DoB()); -} - -// Tests that the built-in default action is taken when no ON_CALL() -// matches the invocation. -TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCallMatches) { - MockB b; - ON_CALL(b, DoB(1)) - .WillByDefault(Return(1)); - EXPECT_CALL(b, DoB(_)); - - EXPECT_EQ(0, b.DoB(2)); -} - -// Tests that the last matching ON_CALL() action is taken. -TEST(OnCallTest, PicksLastMatchingOnCall) { - MockB b; - ON_CALL(b, DoB(_)) - .WillByDefault(Return(3)); - ON_CALL(b, DoB(2)) - .WillByDefault(Return(2)); - ON_CALL(b, DoB(1)) - .WillByDefault(Return(1)); - EXPECT_CALL(b, DoB(_)); - - EXPECT_EQ(2, b.DoB(2)); -} - -// Tests the semantics of EXPECT_CALL(). - -// Tests that any call is allowed when no EXPECT_CALL() is specified. -TEST(ExpectCallTest, AllowsAnyCallWhenNoSpec) { - MockB b; - EXPECT_CALL(b, DoB()); - // There is no expectation on DoB(int). - - b.DoB(); - - // DoB(int) can be called any number of times. - b.DoB(1); - b.DoB(2); -} - -// Tests that the last matching EXPECT_CALL() fires. -TEST(ExpectCallTest, PicksLastMatchingExpectCall) { - MockB b; - EXPECT_CALL(b, DoB(_)) - .WillRepeatedly(Return(2)); - EXPECT_CALL(b, DoB(1)) - .WillRepeatedly(Return(1)); - - EXPECT_EQ(1, b.DoB(1)); -} - -// Tests lower-bound violation. -TEST(ExpectCallTest, CatchesTooFewCalls) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - MockB b; - EXPECT_CALL(b, DoB(5)) - .Times(AtLeast(2)); - - b.DoB(5); - }, "Actual function call count doesn't match this expectation.\n" - " Expected: to be called at least twice\n" - " Actual: called once - unsatisfied and active"); -} - -// Tests that the cardinality can be inferred when no Times(...) is -// specified. -TEST(ExpectCallTest, InfersCardinalityWhenThereIsNoWillRepeatedly) { - { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillOnce(Return(2)); - - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - } - - EXPECT_NONFATAL_FAILURE({ // NOLINT - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillOnce(Return(2)); - - EXPECT_EQ(1, b.DoB()); - }, "to be called twice"); - - { // NOLINT - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillOnce(Return(2)); - - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - EXPECT_NONFATAL_FAILURE(b.DoB(), "to be called twice"); - } -} - -TEST(ExpectCallTest, InfersCardinality1WhenThereIsWillRepeatedly) { - { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); - - EXPECT_EQ(1, b.DoB()); - } - - { // NOLINT - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); - - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - EXPECT_EQ(2, b.DoB()); - } - - EXPECT_NONFATAL_FAILURE({ // NOLINT - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); - }, "to be called at least once"); -} - -// Tests that the n-th action is taken for the n-th matching -// invocation. -TEST(ExpectCallTest, NthMatchTakesNthAction) { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillOnce(Return(2)) - .WillOnce(Return(3)); - - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - EXPECT_EQ(3, b.DoB()); -} - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Tests that the default action is taken when the WillOnce(...) list is -// exhausted and there is no WillRepeatedly(). -TEST(ExpectCallTest, TakesDefaultActionWhenWillListIsExhausted) { - MockB b; - EXPECT_CALL(b, DoB(_)) - .Times(1); - EXPECT_CALL(b, DoB()) - .Times(AnyNumber()) - .WillOnce(Return(1)) - .WillOnce(Return(2)); - - CaptureTestStdout(); - EXPECT_EQ(0, b.DoB(1)); // Shouldn't generate a warning as the - // expectation has no action clause at all. - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - const string& output1 = GetCapturedTestStdout(); - EXPECT_EQ("", output1); - - CaptureTestStdout(); - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB()); - const string& output2 = GetCapturedTestStdout(); - EXPECT_PRED2(RE::PartialMatch, output2, - "Actions ran out\\.\n" - "Called 3 times, but only 2 WillOnce\\(\\)s are specified - " - "returning default value\\."); - EXPECT_PRED2(RE::PartialMatch, output2, - "Actions ran out\\.\n" - "Called 4 times, but only 2 WillOnce\\(\\)s are specified - " - "returning default value\\."); -} - -#endif // 0 - -// Tests that the WillRepeatedly() action is taken when the WillOnce(...) -// list is exhausted. -TEST(ExpectCallTest, TakesRepeatedActionWhenWillListIsExhausted) { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)) - .WillRepeatedly(Return(2)); - - EXPECT_EQ(1, b.DoB()); - EXPECT_EQ(2, b.DoB()); - EXPECT_EQ(2, b.DoB()); -} - -// Tests that an uninteresting call performs the default action. -TEST(UninterestingCallTest, DoesDefaultAction) { - // When there is an ON_CALL() statement, the action specified by it - // should be taken. - MockA a; - ON_CALL(a, Binary(_, _)) - .WillByDefault(Return(true)); - EXPECT_TRUE(a.Binary(1, 2)); - - // When there is no ON_CALL(), the default value for the return type - // should be returned. - MockB b; - EXPECT_EQ(0, b.DoB()); -} - -// Tests that an unexpected call performs the default action. -TEST(UnexpectedCallTest, DoesDefaultAction) { - // When there is an ON_CALL() statement, the action specified by it - // should be taken. - MockA a; - ON_CALL(a, Binary(_, _)) - .WillByDefault(Return(true)); - EXPECT_CALL(a, Binary(0, 0)); - a.Binary(0, 0); - bool result = false; - EXPECT_NONFATAL_FAILURE(result = a.Binary(1, 2), - "Unexpected mock function call"); - EXPECT_TRUE(result); - - // When there is no ON_CALL(), the default value for the return type - // should be returned. - MockB b; - EXPECT_CALL(b, DoB(0)) - .Times(0); - int n = -1; - EXPECT_NONFATAL_FAILURE(n = b.DoB(1), - "Unexpected mock function call"); - EXPECT_EQ(0, n); -} - -// Tests that when an unexpected void function generates the right -// failure message. -TEST(UnexpectedCallTest, GeneratesFailureForVoidFunction) { - // First, tests the message when there is only one EXPECT_CALL(). - MockA a1; - EXPECT_CALL(a1, DoA(1)); - a1.DoA(1); - // Ideally we should match the failure message against a regex, but - // EXPECT_NONFATAL_FAILURE doesn't support that, so we test for - // multiple sub-strings instead. - EXPECT_NONFATAL_FAILURE( - a1.DoA(9), - "Unexpected mock function call - returning directly.\n" - " Function call: DoA(9)\n" - "Google Mock tried the following 1 expectation, but it didn't match:"); - EXPECT_NONFATAL_FAILURE( - a1.DoA(9), - " Expected arg #0: is equal to 1\n" - " Actual: 9\n" - " Expected: to be called once\n" - " Actual: called once - saturated and active"); - - // Next, tests the message when there are more than one EXPECT_CALL(). - MockA a2; - EXPECT_CALL(a2, DoA(1)); - EXPECT_CALL(a2, DoA(3)); - a2.DoA(1); - EXPECT_NONFATAL_FAILURE( - a2.DoA(2), - "Unexpected mock function call - returning directly.\n" - " Function call: DoA(2)\n" - "Google Mock tried the following 2 expectations, but none matched:"); - EXPECT_NONFATAL_FAILURE( - a2.DoA(2), - "tried expectation #0\n" - " Expected arg #0: is equal to 1\n" - " Actual: 2\n" - " Expected: to be called once\n" - " Actual: called once - saturated and active"); - EXPECT_NONFATAL_FAILURE( - a2.DoA(2), - "tried expectation #1\n" - " Expected arg #0: is equal to 3\n" - " Actual: 2\n" - " Expected: to be called once\n" - " Actual: never called - unsatisfied and active"); - a2.DoA(3); -} - -// Tests that an unexpected non-void function generates the right -// failure message. -TEST(UnexpectedCallTest, GeneartesFailureForNonVoidFunction) { - MockB b1; - EXPECT_CALL(b1, DoB(1)); - b1.DoB(1); - EXPECT_NONFATAL_FAILURE( - b1.DoB(2), - "Unexpected mock function call - returning default value.\n" - " Function call: DoB(2)\n" - " Returns: 0\n" - "Google Mock tried the following 1 expectation, but it didn't match:"); - EXPECT_NONFATAL_FAILURE( - b1.DoB(2), - " Expected arg #0: is equal to 1\n" - " Actual: 2\n" - " Expected: to be called once\n" - " Actual: called once - saturated and active"); -} - -// Tests that Google Mock explains that an retired expectation doesn't -// match the call. -TEST(UnexpectedCallTest, RetiredExpectation) { - MockB b; - EXPECT_CALL(b, DoB(1)) - .RetiresOnSaturation(); - - b.DoB(1); - EXPECT_NONFATAL_FAILURE( - b.DoB(1), - " Expected: the expectation is active\n" - " Actual: it is retired"); -} - -// Tests that Google Mock explains that an expectation that doesn't -// match the arguments doesn't match the call. -TEST(UnexpectedCallTest, UnmatchedArguments) { - MockB b; - EXPECT_CALL(b, DoB(1)); - - EXPECT_NONFATAL_FAILURE( - b.DoB(2), - " Expected arg #0: is equal to 1\n" - " Actual: 2\n"); - b.DoB(1); -} - -#ifdef GMOCK_HAS_REGEX - -// Tests that Google Mock explains that an expectation with -// unsatisfied pre-requisites doesn't match the call. -TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) { - Sequence s1, s2; - MockB b; - EXPECT_CALL(b, DoB(1)) - .InSequence(s1); - EXPECT_CALL(b, DoB(2)) - .Times(AnyNumber()) - .InSequence(s1); - EXPECT_CALL(b, DoB(3)) - .InSequence(s2); - EXPECT_CALL(b, DoB(4)) - .InSequence(s1, s2); - - ::testing::TestPartResultArray failures; - { - ::testing::ScopedFakeTestPartResultReporter reporter(&failures); - b.DoB(4); - // Now 'failures' contains the Google Test failures generated by - // the above statement. - } - - // There should be one non-fatal failure. - ASSERT_EQ(1, failures.size()); - const ::testing::TestPartResult& r = failures.GetTestPartResult(0); - EXPECT_EQ(::testing::TPRT_NONFATAL_FAILURE, r.type()); - - // Verifies that the failure message contains the two unsatisfied - // pre-requisites but not the satisfied one. - const char* const pattern = -#if GMOCK_USES_PCRE - // PCRE has trouble using (.|\n) to match any character, but - // supports the (?s) prefix for using . to match any character. - "(?s)the following immediate pre-requisites are not satisfied:\n" - ".*: pre-requisite #0\n" - ".*: pre-requisite #1"; -#else - // POSIX RE doesn't understand the (?s) prefix, but has no trouble - // with (.|\n). - "the following immediate pre-requisites are not satisfied:\n" - "(.|\n)*: pre-requisite #0\n" - "(.|\n)*: pre-requisite #1"; -#endif // GMOCK_USES_PCRE - - EXPECT_TRUE( - ::testing::internal::RE::PartialMatch(r.message(), pattern)) - << " where the message is " << r.message(); - b.DoB(1); - b.DoB(3); - b.DoB(4); -} - -#endif // GMOCK_HAS_REGEX - -#if GTEST_HAS_DEATH_TEST - -TEST(UndefinedReturnValueTest, ReturnValueIsMandatory) { - MockA a; - // TODO(wan@google.com): We should really verify the output message, - // but we cannot yet due to that EXPECT_DEATH only captures stderr - // while Google Mock logs to stdout. - EXPECT_DEATH(a.ReturnResult(1), ""); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Tests that an excessive call (one whose arguments match the -// matchers but is called too many times) performs the default action. -TEST(ExcessiveCallTest, DoesDefaultAction) { - // When there is an ON_CALL() statement, the action specified by it - // should be taken. - MockA a; - ON_CALL(a, Binary(_, _)) - .WillByDefault(Return(true)); - EXPECT_CALL(a, Binary(0, 0)); - a.Binary(0, 0); - bool result = false; - EXPECT_NONFATAL_FAILURE(result = a.Binary(0, 0), - "Mock function called more times than expected"); - EXPECT_TRUE(result); - - // When there is no ON_CALL(), the default value for the return type - // should be returned. - MockB b; - EXPECT_CALL(b, DoB(0)) - .Times(0); - int n = -1; - EXPECT_NONFATAL_FAILURE(n = b.DoB(0), - "Mock function called more times than expected"); - EXPECT_EQ(0, n); -} - -// Tests that when a void function is called too many times, -// the failure message contains the argument values. -TEST(ExcessiveCallTest, GeneratesFailureForVoidFunction) { - MockA a; - EXPECT_CALL(a, DoA(_)) - .Times(0); - EXPECT_NONFATAL_FAILURE( - a.DoA(9), - "Mock function called more times than expected - returning directly.\n" - " Function call: DoA(9)\n" - " Expected: to be never called\n" - " Actual: called once - over-saturated and active"); -} - -// Tests that when a non-void function is called too many times, the -// failure message contains the argument values and the return value. -TEST(ExcessiveCallTest, GeneratesFailureForNonVoidFunction) { - MockB b; - EXPECT_CALL(b, DoB(_)); - b.DoB(1); - EXPECT_NONFATAL_FAILURE( - b.DoB(2), - "Mock function called more times than expected - " - "returning default value.\n" - " Function call: DoB(2)\n" - " Returns: 0\n" - " Expected: to be called once\n" - " Actual: called twice - over-saturated and active"); -} - -// Tests using sequences. - -TEST(InSequenceTest, AllExpectationInScopeAreInSequence) { - MockA a; - { - InSequence dummy; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(a, DoA(2)); - } - - EXPECT_NONFATAL_FAILURE({ // NOLINT - a.DoA(2); - }, "Unexpected mock function call"); - - a.DoA(1); - a.DoA(2); -} - -TEST(InSequenceTest, NestedInSequence) { - MockA a; - { - InSequence dummy; - - EXPECT_CALL(a, DoA(1)); - { - InSequence dummy2; - - EXPECT_CALL(a, DoA(2)); - EXPECT_CALL(a, DoA(3)); - } - } - - EXPECT_NONFATAL_FAILURE({ // NOLINT - a.DoA(1); - a.DoA(3); - }, "Unexpected mock function call"); - - a.DoA(2); - a.DoA(3); -} - -TEST(InSequenceTest, ExpectationsOutOfScopeAreNotAffected) { - MockA a; - { - InSequence dummy; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(a, DoA(2)); - } - EXPECT_CALL(a, DoA(3)); - - EXPECT_NONFATAL_FAILURE({ // NOLINT - a.DoA(2); - }, "Unexpected mock function call"); - - a.DoA(3); - a.DoA(1); - a.DoA(2); -} - -// Tests that any order is allowed when no sequence is used. -TEST(SequenceTest, AnyOrderIsOkByDefault) { - { - MockA a; - MockB b; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(b, DoB()) - .Times(AnyNumber()); - - a.DoA(1); - b.DoB(); - } - - { // NOLINT - MockA a; - MockB b; - - EXPECT_CALL(a, DoA(1)); - EXPECT_CALL(b, DoB()) - .Times(AnyNumber()); - - b.DoB(); - a.DoA(1); - } -} - -#if GTEST_HAS_DEATH_TEST - -// Tests that the calls must be in strict order when a complete order -// is specified. -TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo) { - MockA a; - Sequence s; - - EXPECT_CALL(a, ReturnResult(1)) - .InSequence(s) - .WillOnce(Return(Result())); - - EXPECT_CALL(a, ReturnResult(2)) - .InSequence(s) - .WillOnce(Return(Result())); - - EXPECT_CALL(a, ReturnResult(3)) - .InSequence(s) - .WillOnce(Return(Result())); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(1); - a.ReturnResult(3); - a.ReturnResult(2); - }, ""); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(2); - a.ReturnResult(1); - a.ReturnResult(3); - }, ""); - - a.ReturnResult(1); - a.ReturnResult(2); - a.ReturnResult(3); -} - -// Tests specifying a DAG using multiple sequences. -TEST(SequenceTest, CallsMustConformToSpecifiedDag) { - MockA a; - MockB b; - Sequence x, y; - - EXPECT_CALL(a, ReturnResult(1)) - .InSequence(x) - .WillOnce(Return(Result())); - - EXPECT_CALL(b, DoB()) - .Times(2) - .InSequence(y); - - EXPECT_CALL(a, ReturnResult(2)) - .InSequence(x, y) - .WillRepeatedly(Return(Result())); - - EXPECT_CALL(a, ReturnResult(3)) - .InSequence(x) - .WillOnce(Return(Result())); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(1); - b.DoB(); - a.ReturnResult(2); - }, ""); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(2); - }, ""); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(3); - }, ""); - - EXPECT_DEATH({ // NOLINT - a.ReturnResult(1); - b.DoB(); - b.DoB(); - a.ReturnResult(3); - a.ReturnResult(2); - }, ""); - - b.DoB(); - a.ReturnResult(1); - b.DoB(); - a.ReturnResult(3); -} - -#endif // GTEST_HAS_DEATH_TEST - -TEST(SequenceTest, Retirement) { - MockA a; - Sequence s; - - EXPECT_CALL(a, DoA(1)) - .InSequence(s); - EXPECT_CALL(a, DoA(_)) - .InSequence(s) - .RetiresOnSaturation(); - EXPECT_CALL(a, DoA(1)) - .InSequence(s); - - a.DoA(1); - a.DoA(2); - a.DoA(1); -} - -// Tests that Google Mock correctly handles calls to mock functions -// after a mock object owning one of their pre-requisites has died. - -// Tests that calls that satisfy the original spec are successful. -TEST(DeletingMockEarlyTest, Success1) { - MockB* const b1 = new MockB; - MockA* const a = new MockA; - MockB* const b2 = new MockB; - - { - InSequence dummy; - EXPECT_CALL(*b1, DoB(_)) - .WillOnce(Return(1)); - EXPECT_CALL(*a, Binary(_, _)) - .Times(AnyNumber()) - .WillRepeatedly(Return(true)); - EXPECT_CALL(*b2, DoB(_)) - .Times(AnyNumber()) - .WillRepeatedly(Return(2)); - } - - EXPECT_EQ(1, b1->DoB(1)); - delete b1; - // a's pre-requisite has died. - EXPECT_TRUE(a->Binary(0, 1)); - delete b2; - // a's successor has died. - EXPECT_TRUE(a->Binary(1, 2)); - delete a; -} - -// Tests that calls that satisfy the original spec are successful. -TEST(DeletingMockEarlyTest, Success2) { - MockB* const b1 = new MockB; - MockA* const a = new MockA; - MockB* const b2 = new MockB; - - { - InSequence dummy; - EXPECT_CALL(*b1, DoB(_)) - .WillOnce(Return(1)); - EXPECT_CALL(*a, Binary(_, _)) - .Times(AnyNumber()); - EXPECT_CALL(*b2, DoB(_)) - .Times(AnyNumber()) - .WillRepeatedly(Return(2)); - } - - delete a; // a is trivially satisfied. - EXPECT_EQ(1, b1->DoB(1)); - EXPECT_EQ(2, b2->DoB(2)); - delete b1; - delete b2; -} - -// Tests that it's OK to delete a mock object itself in its action. - -ACTION_P(Delete, ptr) { delete ptr; } - -TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningVoid) { - MockA* const a = new MockA; - EXPECT_CALL(*a, DoA(_)).WillOnce(Delete(a)); - a->DoA(42); // This will cause a to be deleted. -} - -TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningValue) { - MockA* const a = new MockA; - EXPECT_CALL(*a, ReturnResult(_)) - .WillOnce(DoAll(Delete(a), Return(Result()))); - a->ReturnResult(42); // This will cause a to be deleted. -} - -// Tests that calls that violate the original spec yield failures. -TEST(DeletingMockEarlyTest, Failure1) { - MockB* const b1 = new MockB; - MockA* const a = new MockA; - MockB* const b2 = new MockB; - - { - InSequence dummy; - EXPECT_CALL(*b1, DoB(_)) - .WillOnce(Return(1)); - EXPECT_CALL(*a, Binary(_, _)) - .Times(AnyNumber()); - EXPECT_CALL(*b2, DoB(_)) - .Times(AnyNumber()) - .WillRepeatedly(Return(2)); - } - - delete a; // a is trivially satisfied. - EXPECT_NONFATAL_FAILURE({ - b2->DoB(2); - }, "Unexpected mock function call"); - EXPECT_EQ(1, b1->DoB(1)); - delete b1; - delete b2; -} - -// Tests that calls that violate the original spec yield failures. -TEST(DeletingMockEarlyTest, Failure2) { - MockB* const b1 = new MockB; - MockA* const a = new MockA; - MockB* const b2 = new MockB; - - { - InSequence dummy; - EXPECT_CALL(*b1, DoB(_)); - EXPECT_CALL(*a, Binary(_, _)) - .Times(AnyNumber()); - EXPECT_CALL(*b2, DoB(_)) - .Times(AnyNumber()); - } - - EXPECT_NONFATAL_FAILURE(delete b1, - "Actual: never called"); - EXPECT_NONFATAL_FAILURE(a->Binary(0, 1), - "Unexpected mock function call"); - EXPECT_NONFATAL_FAILURE(b2->DoB(1), - "Unexpected mock function call"); - delete a; - delete b2; -} - -class EvenNumberCardinality : public CardinalityInterface { - public: - // Returns true iff call_count calls will satisfy this cardinality. - virtual bool IsSatisfiedByCallCount(int call_count) const { - return call_count % 2 == 0; - } - - // Returns true iff call_count calls will saturate this cardinality. - virtual bool IsSaturatedByCallCount(int call_count) const { return false; } - - // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* os) const { - *os << "called even number of times"; - } -}; - -Cardinality EvenNumber() { - return Cardinality(new EvenNumberCardinality); -} - -TEST(ExpectationBaseTest, - AllPrerequisitesAreSatisfiedWorksForNonMonotonicCardinality) { - MockA* a = new MockA; - Sequence s; - - EXPECT_CALL(*a, DoA(1)) - .Times(EvenNumber()) - .InSequence(s); - EXPECT_CALL(*a, DoA(2)) - .Times(AnyNumber()) - .InSequence(s); - EXPECT_CALL(*a, DoA(3)) - .Times(AnyNumber()); - - a->DoA(3); - a->DoA(1); - EXPECT_NONFATAL_FAILURE(a->DoA(2), "Unexpected mock function call"); - EXPECT_NONFATAL_FAILURE(delete a, "to be called even number of times"); -} - -// The following tests verify the message generated when a mock -// function is called. - -struct Printable { -}; - -inline void operator<<(::std::ostream& os, const Printable&) { - os << "Printable"; -} - -struct Unprintable { - Unprintable() : value(0) {} - int value; -}; - -class MockC { - public: - MOCK_METHOD6(VoidMethod, void(bool cond, int n, string s, void* p, - const Printable& x, Unprintable y)); - MOCK_METHOD0(NonVoidMethod, int()); // NOLINT -}; - -// TODO(wan@google.com): find a way to re-enable these tests. -#if 0 - -// Tests that an uninteresting mock function call generates a warning -// containing the stack trace. -TEST(FunctionCallMessageTest, UninterestingCallGeneratesFyiWithStackTrace) { - MockC c; - CaptureTestStdout(); - c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable()); - const string& output = GetCapturedTestStdout(); - EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output); - EXPECT_PRED_FORMAT2(IsSubstring, "Stack trace:", output); -#ifndef NDEBUG - // We check the stack trace content in dbg-mode only, as opt-mode - // may inline the call we are interested in seeing. - - // Verifies that a void mock function's name appears in the stack - // trace. - EXPECT_PRED_FORMAT2(IsSubstring, "::MockC::VoidMethod(", output); - - // Verifies that a non-void mock function's name appears in the - // stack trace. - CaptureTestStdout(); - c.NonVoidMethod(); - const string& output2 = GetCapturedTestStdout(); - EXPECT_PRED_FORMAT2(IsSubstring, "::MockC::NonVoidMethod(", output2); -#endif // NDEBUG -} - -// Tests that an uninteresting mock function call causes the function -// arguments and return value to be printed. -TEST(FunctionCallMessageTest, UninterestingCallPrintsArgumentsAndReturnValue) { - // A non-void mock function. - MockB b; - CaptureTestStdout(); - b.DoB(); - const string& output1 = GetCapturedTestStdout(); - EXPECT_PRED_FORMAT2( - IsSubstring, - "Uninteresting mock function call - returning default value.\n" - " Function call: DoB()\n" - " Returns: 0\n", output1); - // Makes sure the return value is printed. - - // A void mock function. - MockC c; - CaptureTestStdout(); - c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable()); - const string& output2 = GetCapturedTestStdout(); - EXPECT_PRED2(RE::PartialMatch, output2, - "Uninteresting mock function call - returning directly\\.\n" - " Function call: VoidMethod" - "\\(false, 5, \"Hi\", NULL, @0x\\w+ " - "Printable, 4-byte object <0000 0000>\\)"); - // A void function has no return value to print. -} - -// Tests how the --gmock_verbose flag affects Google Mock's output. - -class GMockVerboseFlagTest : public testing::Test { - public: - // Verifies that the given Google Mock output is correct. (When - // should_print is true, the output should match the given regex and - // contain the given function name in the stack trace. When it's - // false, the output should be empty.) - void VerifyOutput(const string& output, bool should_print, - const string& regex, - const string& function_name) { - if (should_print) { - EXPECT_PRED2(RE::PartialMatch, output, regex); -#ifndef NDEBUG - // We check the stack trace content in dbg-mode only, as opt-mode - // may inline the call we are interested in seeing. - EXPECT_PRED_FORMAT2(IsSubstring, function_name, output); -#endif // NDEBUG - } else { - EXPECT_EQ("", output); - } - } - - // Tests how the flag affects expected calls. - void TestExpectedCall(bool should_print) { - MockA a; - EXPECT_CALL(a, DoA(5)); - EXPECT_CALL(a, Binary(_, 1)) - .WillOnce(Return(true)); - - // A void-returning function. - CaptureTestStdout(); - a.DoA(5); - VerifyOutput( - GetCapturedTestStdout(), - should_print, - "Expected mock function call\\.\n" - " Function call: DoA\\(5\\)\n" - "Stack trace:", - "MockA::DoA"); - - // A non-void-returning function. - CaptureTestStdout(); - a.Binary(2, 1); - VerifyOutput( - GetCapturedTestStdout(), - should_print, - "Expected mock function call\\.\n" - " Function call: Binary\\(2, 1\\)\n" - " Returns: true\n" - "Stack trace:", - "MockA::Binary"); - } - - // Tests how the flag affects uninteresting calls. - void TestUninterestingCall(bool should_print) { - MockA a; - - // A void-returning function. - CaptureTestStdout(); - a.DoA(5); - VerifyOutput( - GetCapturedTestStdout(), - should_print, - "\nGMOCK WARNING:\n" - "Uninteresting mock function call - returning directly\\.\n" - " Function call: DoA\\(5\\)\n" - "Stack trace:\n" - "[\\s\\S]*", - "MockA::DoA"); - - // A non-void-returning function. - CaptureTestStdout(); - a.Binary(2, 1); - VerifyOutput( - GetCapturedTestStdout(), - should_print, - "\nGMOCK WARNING:\n" - "Uninteresting mock function call - returning default value\\.\n" - " Function call: Binary\\(2, 1\\)\n" - " Returns: false\n" - "Stack trace:\n" - "[\\s\\S]*", - "MockA::Binary"); - } -}; - -// Tests that --gmock_verbose=info causes both expected and -// uninteresting calls to be reported. -TEST_F(GMockVerboseFlagTest, Info) { - GMOCK_FLAG(verbose) = kInfoVerbosity; - TestExpectedCall(true); - TestUninterestingCall(true); -} - -// Tests that --gmock_verbose=warning causes uninteresting calls to be -// reported. -TEST_F(GMockVerboseFlagTest, Warning) { - GMOCK_FLAG(verbose) = kWarningVerbosity; - TestExpectedCall(false); - TestUninterestingCall(true); -} - -// Tests that --gmock_verbose=warning causes neither expected nor -// uninteresting calls to be reported. -TEST_F(GMockVerboseFlagTest, Error) { - GMOCK_FLAG(verbose) = kErrorVerbosity; - TestExpectedCall(false); - TestUninterestingCall(false); -} - -// Tests that --gmock_verbose=SOME_INVALID_VALUE has the same effect -// as --gmock_verbose=warning. -TEST_F(GMockVerboseFlagTest, InvalidFlagIsTreatedAsWarning) { - GMOCK_FLAG(verbose) = "invalid"; // Treated as "warning". - TestExpectedCall(false); - TestUninterestingCall(true); -} - -#endif // 0 - -// A helper class that generates a failure when printed. We use it to -// ensure that Google Mock doesn't print a value (even to an internal -// buffer) when it is not supposed to do so. -class PrintMeNot {}; - -void PrintTo(PrintMeNot /* dummy */, ::std::ostream* /* os */) { - ADD_FAILURE() << "Google Mock is printing a value that shouldn't be " - << "printed even to an internal buffer."; -} - -class LogTestHelper { - public: - MOCK_METHOD1(Foo, PrintMeNot(PrintMeNot)); -}; - -class GMockLogTest : public ::testing::Test { - protected: - virtual void SetUp() { - // The code needs to work when both ::string and ::std::string are - // defined and the flag is implemented as a - // testing::internal::String. In this case, without the call to - // c_str(), the compiler will complain that it cannot figure out - // whether the String flag should be converted to a ::string or an - // ::std::string before being assigned to original_verbose_. - original_verbose_ = GMOCK_FLAG(verbose).c_str(); - } - - virtual void TearDown() { GMOCK_FLAG(verbose) = original_verbose_; } - - LogTestHelper helper_; - string original_verbose_; -}; - -TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsWarning) { - GMOCK_FLAG(verbose) = kWarningVerbosity; - EXPECT_CALL(helper_, Foo(_)) - .WillOnce(Return(PrintMeNot())); - helper_.Foo(PrintMeNot()); // This is an expected call. -} - -TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsError) { - GMOCK_FLAG(verbose) = kErrorVerbosity; - EXPECT_CALL(helper_, Foo(_)) - .WillOnce(Return(PrintMeNot())); - helper_.Foo(PrintMeNot()); // This is an expected call. -} - -TEST_F(GMockLogTest, DoesNotPrintWarningInternallyIfVerbosityIsError) { - GMOCK_FLAG(verbose) = kErrorVerbosity; - ON_CALL(helper_, Foo(_)) - .WillByDefault(Return(PrintMeNot())); - helper_.Foo(PrintMeNot()); // This should generate a warning. -} - -// Tests Mock::AllowLeak(). - -TEST(AllowLeakTest, AllowsLeakingUnusedMockObject) { - MockA* a = new MockA; - Mock::AllowLeak(a); -} - -TEST(AllowLeakTest, CanBeCalledBeforeOnCall) { - MockA* a = new MockA; - Mock::AllowLeak(a); - ON_CALL(*a, DoA(_)).WillByDefault(Return()); - a->DoA(0); -} - -TEST(AllowLeakTest, CanBeCalledAfterOnCall) { - MockA* a = new MockA; - ON_CALL(*a, DoA(_)).WillByDefault(Return()); - Mock::AllowLeak(a); -} - -TEST(AllowLeakTest, CanBeCalledBeforeExpectCall) { - MockA* a = new MockA; - Mock::AllowLeak(a); - EXPECT_CALL(*a, DoA(_)); - a->DoA(0); -} - -TEST(AllowLeakTest, CanBeCalledAfterExpectCall) { - MockA* a = new MockA; - EXPECT_CALL(*a, DoA(_)).Times(AnyNumber()); - Mock::AllowLeak(a); -} - -TEST(AllowLeakTest, WorksWhenBothOnCallAndExpectCallArePresent) { - MockA* a = new MockA; - ON_CALL(*a, DoA(_)).WillByDefault(Return()); - EXPECT_CALL(*a, DoA(_)).Times(AnyNumber()); - Mock::AllowLeak(a); -} - -// Tests that we can verify and clear a mock object's expectations -// when none of its methods has expectations. -TEST(VerifyAndClearExpectationsTest, NoMethodHasExpectations) { - MockB b; - ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b)); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can verify and clear a mock object's expectations -// when some, but not all, of its methods have expectations *and* the -// verification succeeds. -TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndSucceed) { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)); - b.DoB(); - ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b)); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can verify and clear a mock object's expectations -// when some, but not all, of its methods have expectations *and* the -// verification fails. -TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndFail) { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)); - bool result; - EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b), - "Actual: never called"); - ASSERT_FALSE(result); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can verify and clear a mock object's expectations -// when all of its methods have expectations. -TEST(VerifyAndClearExpectationsTest, AllMethodsHaveExpectations) { - MockB b; - EXPECT_CALL(b, DoB()) - .WillOnce(Return(1)); - EXPECT_CALL(b, DoB(_)) - .WillOnce(Return(2)); - b.DoB(); - b.DoB(1); - ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b)); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can verify and clear a mock object's expectations -// when a method has more than one expectation. -TEST(VerifyAndClearExpectationsTest, AMethodHasManyExpectations) { - MockB b; - EXPECT_CALL(b, DoB(0)) - .WillOnce(Return(1)); - EXPECT_CALL(b, DoB(_)) - .WillOnce(Return(2)); - b.DoB(1); - bool result; - EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b), - "Actual: never called"); - ASSERT_FALSE(result); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can call VerifyAndClearExpectations() on the same -// mock object multiple times. -TEST(VerifyAndClearExpectationsTest, CanCallManyTimes) { - MockB b; - EXPECT_CALL(b, DoB()); - b.DoB(); - Mock::VerifyAndClearExpectations(&b); - - EXPECT_CALL(b, DoB(_)) - .WillOnce(Return(1)); - b.DoB(1); - Mock::VerifyAndClearExpectations(&b); - Mock::VerifyAndClearExpectations(&b); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can clear a mock object's default actions when none -// of its methods has default actions. -TEST(VerifyAndClearTest, NoMethodHasDefaultActions) { - MockB b; - // If this crashes or generates a failure, the test will catch it. - Mock::VerifyAndClear(&b); - EXPECT_EQ(0, b.DoB()); -} - -// Tests that we can clear a mock object's default actions when some, -// but not all of its methods have default actions. -TEST(VerifyAndClearTest, SomeMethodsHaveDefaultActions) { - MockB b; - ON_CALL(b, DoB()) - .WillByDefault(Return(1)); - - Mock::VerifyAndClear(&b); - - // Verifies that the default action of int DoB() was removed. - EXPECT_EQ(0, b.DoB()); -} - -// Tests that we can clear a mock object's default actions when all of -// its methods have default actions. -TEST(VerifyAndClearTest, AllMethodsHaveDefaultActions) { - MockB b; - ON_CALL(b, DoB()) - .WillByDefault(Return(1)); - ON_CALL(b, DoB(_)) - .WillByDefault(Return(2)); - - Mock::VerifyAndClear(&b); - - // Verifies that the default action of int DoB() was removed. - EXPECT_EQ(0, b.DoB()); - - // Verifies that the default action of int DoB(int) was removed. - EXPECT_EQ(0, b.DoB(0)); -} - -// Tests that we can clear a mock object's default actions when a -// method has more than one ON_CALL() set on it. -TEST(VerifyAndClearTest, AMethodHasManyDefaultActions) { - MockB b; - ON_CALL(b, DoB(0)) - .WillByDefault(Return(1)); - ON_CALL(b, DoB(_)) - .WillByDefault(Return(2)); - - Mock::VerifyAndClear(&b); - - // Verifies that the default actions (there are two) of int DoB(int) - // were removed. - EXPECT_EQ(0, b.DoB(0)); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can call VerifyAndClear() on a mock object multiple -// times. -TEST(VerifyAndClearTest, CanCallManyTimes) { - MockB b; - ON_CALL(b, DoB()) - .WillByDefault(Return(1)); - Mock::VerifyAndClear(&b); - Mock::VerifyAndClear(&b); - - ON_CALL(b, DoB(_)) - .WillByDefault(Return(1)); - Mock::VerifyAndClear(&b); - - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that VerifyAndClear() works when the verification succeeds. -TEST(VerifyAndClearTest, Success) { - MockB b; - ON_CALL(b, DoB()) - .WillByDefault(Return(1)); - EXPECT_CALL(b, DoB(1)) - .WillOnce(Return(2)); - - b.DoB(); - b.DoB(1); - ASSERT_TRUE(Mock::VerifyAndClear(&b)); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that VerifyAndClear() works when the verification fails. -TEST(VerifyAndClearTest, Failure) { - MockB b; - ON_CALL(b, DoB(_)) - .WillByDefault(Return(1)); - EXPECT_CALL(b, DoB()) - .WillOnce(Return(2)); - - b.DoB(1); - bool result; - EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClear(&b), - "Actual: never called"); - ASSERT_FALSE(result); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that VerifyAndClear() works when the default actions and -// expectations are set on a const mock object. -TEST(VerifyAndClearTest, Const) { - MockB b; - ON_CALL(Const(b), DoB()) - .WillByDefault(Return(1)); - - EXPECT_CALL(Const(b), DoB()) - .WillOnce(DoDefault()) - .WillOnce(Return(2)); - - b.DoB(); - b.DoB(); - ASSERT_TRUE(Mock::VerifyAndClear(&b)); - - // There should be no expectations on the methods now, so we can - // freely call them. - EXPECT_EQ(0, b.DoB()); - EXPECT_EQ(0, b.DoB(1)); -} - -// Tests that we can set default actions and expectations on a mock -// object after VerifyAndClear() has been called on it. -TEST(VerifyAndClearTest, CanSetDefaultActionsAndExpectationsAfterwards) { - MockB b; - ON_CALL(b, DoB()) - .WillByDefault(Return(1)); - EXPECT_CALL(b, DoB(_)) - .WillOnce(Return(2)); - b.DoB(1); - - Mock::VerifyAndClear(&b); - - EXPECT_CALL(b, DoB()) - .WillOnce(Return(3)); - ON_CALL(b, DoB(_)) - .WillByDefault(Return(4)); - - EXPECT_EQ(3, b.DoB()); - EXPECT_EQ(4, b.DoB(1)); -} - -// Tests that calling VerifyAndClear() on one mock object does not -// affect other mock objects (either of the same type or not). -TEST(VerifyAndClearTest, DoesNotAffectOtherMockObjects) { - MockA a; - MockB b1; - MockB b2; - - ON_CALL(a, Binary(_, _)) - .WillByDefault(Return(true)); - EXPECT_CALL(a, Binary(_, _)) - .WillOnce(DoDefault()) - .WillOnce(Return(false)); - - ON_CALL(b1, DoB()) - .WillByDefault(Return(1)); - EXPECT_CALL(b1, DoB(_)) - .WillOnce(Return(2)); - - ON_CALL(b2, DoB()) - .WillByDefault(Return(3)); - EXPECT_CALL(b2, DoB(_)); - - b2.DoB(0); - Mock::VerifyAndClear(&b2); - - // Verifies that the default actions and expectations of a and b1 - // are still in effect. - EXPECT_TRUE(a.Binary(0, 0)); - EXPECT_FALSE(a.Binary(0, 0)); - - EXPECT_EQ(1, b1.DoB()); - EXPECT_EQ(2, b1.DoB(0)); -} - -// Tests that a mock function's action can call a mock function -// (either the same function or a different one) either as an explicit -// action or as a default action without causing a dead lock. It -// verifies that the action is not performed inside the critical -// section. - -void Helper(MockC* c) { - c->NonVoidMethod(); -} - -} // namespace - -int main(int argc, char **argv) { - testing::InitGoogleMock(&argc, argv); - - // Ensures that the tests pass no matter what value of - // --gmock_catch_leaked_mocks and --gmock_verbose the user specifies. - testing::GMOCK_FLAG(catch_leaked_mocks) = true; - testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity; - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test.py deleted file mode 100755 index 1337e0b0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests that leaked mock objects can be caught be Google Mock.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gmock_test_utils -import os -import unittest - -IS_WINDOWS = os.name == 'nt' - -if IS_WINDOWS: - # TODO(wan@google.com): test the opt build too. We should do it - # when Vlad Losev's work on Google Test's Python test driver is - # done, such that we can reuse the work. - PROGRAM = r'..\build.dbg\gmock_leak_test_.exe' -else: - PROGRAM = 'gmock_leak_test_' - -PROGRAM_PATH = os.path.join(gmock_test_utils.GetBuildDir(), PROGRAM) -TEST_WITH_EXPECT_CALL = PROGRAM_PATH + ' --gtest_filter=*ExpectCall*' -TEST_WITH_ON_CALL = PROGRAM_PATH + ' --gtest_filter=*OnCall*' -TEST_MULTIPLE_LEAKS = PROGRAM_PATH + ' --gtest_filter=*MultipleLeaked*' - - -class GMockLeakTest(unittest.TestCase): - - def testCatchesLeakedMockByDefault(self): - self.assertNotEqual(os.system(TEST_WITH_EXPECT_CALL), 0) - self.assertNotEqual(os.system(TEST_WITH_ON_CALL), 0) - - def testDoesNotCatchLeakedMockWhenDisabled(self): - self.assertEquals( - 0, os.system(TEST_WITH_EXPECT_CALL + ' --gmock_catch_leaked_mocks=0')) - self.assertEquals( - 0, os.system(TEST_WITH_ON_CALL + ' --gmock_catch_leaked_mocks=0')) - - def testCatchesLeakedMockWhenEnabled(self): - self.assertNotEqual( - os.system(TEST_WITH_EXPECT_CALL + ' --gmock_catch_leaked_mocks'), 0) - self.assertNotEqual( - os.system(TEST_WITH_ON_CALL + ' --gmock_catch_leaked_mocks'), 0) - - def testCatchesLeakedMockWhenEnabledWithExplictFlagValue(self): - self.assertNotEqual( - os.system(TEST_WITH_EXPECT_CALL + ' --gmock_catch_leaked_mocks=1'), 0) - - def testCatchesMultipleLeakedMocks(self): - self.assertNotEqual( - os.system(TEST_MULTIPLE_LEAKS + ' --gmock_catch_leaked_mocks'), 0) - - -if __name__ == '__main__': - gmock_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test_.cc deleted file mode 100644 index 157bd7ec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_leak_test_.cc +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This program is for verifying that a leaked mock object can be -// caught by Google Mock's leak detector. - -#include - -namespace { - -using ::testing::Return; - -class FooInterface { - public: - virtual ~FooInterface() {} - virtual void DoThis() = 0; -}; - -class MockFoo : public FooInterface { - public: - MOCK_METHOD0(DoThis, void()); -}; - -TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEnabled) { - MockFoo* foo = new MockFoo; - - EXPECT_CALL(*foo, DoThis()); - foo->DoThis(); - - // In order to test the leak detector, we deliberately leak foo. - - // Makes sure Google Mock's leak detector can change the exit code - // to 1 even when the code is already exiting with 0. - exit(0); -} - -TEST(LeakTest, LeakedMockWithOnCallCausesFailureWhenLeakCheckingIsEnabled) { - MockFoo* foo = new MockFoo; - - ON_CALL(*foo, DoThis()).WillByDefault(Return()); - - // In order to test the leak detector, we deliberately leak foo. - - // Makes sure Google Mock's leak detector can change the exit code - // to 1 even when the code is already exiting with 0. - exit(0); -} - -TEST(LeakTest, CatchesMultipleLeakedMockObjects) { - MockFoo* foo1 = new MockFoo; - MockFoo* foo2 = new MockFoo; - - ON_CALL(*foo1, DoThis()).WillByDefault(Return()); - EXPECT_CALL(*foo2, DoThis()); - foo2->DoThis(); - - // In order to test the leak detector, we deliberately leak foo1 and - // foo2. - - // Makes sure Google Mock's leak detector can change the exit code - // to 1 even when the code is already exiting with 0. - exit(0); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link2_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link2_test.cc deleted file mode 100644 index 4c310c3d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link2_test.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file is for verifying that various Google Mock constructs do not -// produce linker errors when instantiated in different translation units. -// Please see gmock_link_test.h for details. - -#define LinkTest LinkTest2 - -#include "test/gmock_link_test.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.cc deleted file mode 100644 index 61e97d10..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file is for verifying that various Google Mock constructs do not -// produce linker errors when instantiated in different translation units. -// Please see gmock_link_test.h for details. - -#define LinkTest LinkTest1 - -#include "test/gmock_link_test.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.h deleted file mode 100644 index b903f3cb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_link_test.h +++ /dev/null @@ -1,646 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests that: -// a. A header file defining a mock class can be included in multiple -// translation units without causing a link error. -// b. Actions and matchers can be instantiated with identical template -// arguments in different translation units without causing link -// errors. -// The following constructs are currently tested: -// Actions: -// Return() -// Return(value) -// ReturnNull -// ReturnRef -// Assign -// SetArgumentPointee -// SetArrayArgument -// SetErrnoAndReturn -// Invoke(function) -// Invoke(object, method) -// InvokeWithoutArgs(function) -// InvokeWithoutArgs(object, method) -// InvokeArgument -// WithArg -// WithArgs -// WithoutArgs -// DoAll -// DoDefault -// IgnoreResult -// Throw -// ACTION()-generated -// ACTION_P()-generated -// ACTION_P2()-generated -// Matchers: -// _ -// A -// An -// Eq -// Gt, Lt, Ge, Le, Ne -// NotNull -// Ref -// TypedEq -// DoubleEq -// FloatEq -// NanSensitiveDoubleEq -// NanSensitiveFloatEq -// ContainsRegex -// MatchesRegex -// EndsWith -// HasSubstr -// StartsWith -// StrCaseEq -// StrCaseNe -// StrEq -// StrNe -// ElementsAre -// ElementsAreArray -// ContainerEq -// Field -// Property -// ResultOf(function) -// Pointee -// Truly(predicate) -// AllOf -// AnyOf -// Not -// MatcherCast -// -// Please note: this test does not verify the functioning of these -// constructs, only that the programs using them will link successfully. -// -// Implementation note: -// This test requires identical definitions of Interface and Mock to be -// included in different translation units. We achieve this by writing -// them in this header and #including it in gmock_link_test.cc and -// gmock_link2_test.cc. Because the symbols generated by the compiler for -// those constructs must be identical in both translation units, -// definitions of Interface and Mock tests MUST be kept in the SAME -// NON-ANONYMOUS namespace in this file. The test fixture class LinkTest -// is defined as LinkTest1 in gmock_link_test.cc and as LinkTest2 in -// gmock_link2_test.cc to avoid producing linker errors. - -#ifndef GMOCK_TEST_GMOCK_LINK_TEST_H_ -#define GMOCK_TEST_GMOCK_LINK_TEST_H_ - -#include - -#ifndef _WIN32_WCE -#include -#endif - -#include -#include -#include -#include - -using testing::_; -using testing::A; -using testing::AllOf; -using testing::AnyOf; -using testing::Assign; -using testing::ContainerEq; -using testing::DoAll; -using testing::DoDefault; -using testing::DoubleEq; -using testing::ElementsAre; -using testing::ElementsAreArray; -using testing::EndsWith; -using testing::Eq; -using testing::Field; -using testing::FloatEq; -using testing::Ge; -using testing::Gt; -using testing::HasSubstr; -using testing::IgnoreResult; -using testing::Invoke; -using testing::InvokeArgument; -using testing::InvokeWithoutArgs; -using testing::Le; -using testing::Lt; -using testing::Matcher; -using testing::MatcherCast; -using testing::NanSensitiveDoubleEq; -using testing::NanSensitiveFloatEq; -using testing::Ne; -using testing::Not; -using testing::NotNull; -using testing::Pointee; -using testing::Property; -using testing::Ref; -using testing::ResultOf; -using testing::Return; -using testing::ReturnNull; -using testing::ReturnRef; -using testing::SetArgumentPointee; -using testing::SetArrayArgument; -using testing::StartsWith; -using testing::StrCaseEq; -using testing::StrCaseNe; -using testing::StrEq; -using testing::StrNe; -using testing::Truly; -using testing::TypedEq; -using testing::WithArg; -using testing::WithArgs; -using testing::WithoutArgs; - -#ifndef _WIN32_WCE -using testing::SetErrnoAndReturn; -#endif // _WIN32_WCE - -#if GTEST_HAS_EXCEPTIONS -using testing::Throw; -#endif // GTEST_HAS_EXCEPTIONS - -#if GMOCK_HAS_REGEX -using testing::ContainsRegex; -using testing::MatchesRegex; -#endif // GMOCK_HAS_REGEX - -class Interface { - public: - virtual ~Interface() {} - virtual void VoidFromString(char* str) = 0; - virtual char* StringFromString(char* str) = 0; - virtual int IntFromString(char* str) = 0; - virtual int& IntRefFromString(char* str) = 0; - virtual void VoidFromFunc(void(*)(char*)) = 0; - virtual void VoidFromIntRef(int& n) = 0; - virtual void VoidFromFloat(float n) = 0; - virtual void VoidFromDouble(double n) = 0; - virtual void VoidFromVector(const std::vector& v) = 0; -}; - -class Mock: public Interface { - public: - MOCK_METHOD1(VoidFromString, void(char* str)); - MOCK_METHOD1(StringFromString, char*(char* str)); - MOCK_METHOD1(IntFromString, int(char* str)); - MOCK_METHOD1(IntRefFromString, int&(char* str)); - MOCK_METHOD1(VoidFromFunc, void(void(*func)(char* str))); - MOCK_METHOD1(VoidFromIntRef, void(int& n)); - MOCK_METHOD1(VoidFromFloat, void(float n)); - MOCK_METHOD1(VoidFromDouble, void(double n)); - MOCK_METHOD1(VoidFromVector, void(const std::vector& v)); -}; - -class InvokeHelper { - public: - static void StaticVoidFromVoid() {} - void VoidFromVoid() {} - static void StaticVoidFromString(char*) {} - void VoidFromString(char*) {} - static int StaticIntFromString(char*) { return 1; } - static bool StaticBoolFromString(const char*) { return true; } -}; - -class FieldHelper { - public: - FieldHelper(int field) : field_(field) {} - int field() const { return field_; } - int field_; // NOLINT -- need external access to field_ to test - // the Field matcher. -}; - -// Tests the linkage of the ReturnVoid action. -TEST(LinkTest, TestReturnVoid) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the Return action. -TEST(LinkTest, TestReturn) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch)); - mock.StringFromString(NULL); -} - -// Tests the linkage of the ReturnNull action. -TEST(LinkTest, TestReturnNull) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return()); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the ReturnRef action. -TEST(LinkTest, TestReturnRef) { - Mock mock; - int n = 42; - - EXPECT_CALL(mock, IntRefFromString(_)).WillOnce(ReturnRef(n)); - mock.IntRefFromString(NULL); -} - -// Tests the linkage of the Assign action. -TEST(LinkTest, TestAssign) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Assign(&ch, 'y')); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the SetArgumentPointee action. -TEST(LinkTest, TestSetArgumentPointee) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgumentPointee<0>('y')); - mock.VoidFromString(&ch); -} - -// Tests the linkage of the SetArrayArgument action. -TEST(LinkTest, TestSetArrayArgument) { - Mock mock; - char ch = 'x'; - char ch2 = 'y'; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArrayArgument<0>(&ch2, - &ch2 + 1)); - mock.VoidFromString(&ch); -} - -#ifndef _WIN32_WCE - -// Tests the linkage of the SetErrnoAndReturn action. -TEST(LinkTest, TestSetErrnoAndReturn) { - Mock mock; - - int saved_errno = errno; - EXPECT_CALL(mock, IntFromString(_)).WillOnce(SetErrnoAndReturn(1, -1)); - mock.IntFromString(NULL); - errno = saved_errno; -} - -#endif // _WIN32_WCE - -// Tests the linkage of the Invoke(function) and Invoke(object, method) actions. -TEST(LinkTest, TestInvoke) { - Mock mock; - InvokeHelper test_invoke_helper; - - EXPECT_CALL(mock, VoidFromString(_)) - .WillOnce(Invoke(&InvokeHelper::StaticVoidFromString)) - .WillOnce(Invoke(&test_invoke_helper, &InvokeHelper::VoidFromString)); - mock.VoidFromString(NULL); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the InvokeWithoutArgs action. -TEST(LinkTest, TestInvokeWithoutArgs) { - Mock mock; - InvokeHelper test_invoke_helper; - - EXPECT_CALL(mock, VoidFromString(_)) - .WillOnce(InvokeWithoutArgs(&InvokeHelper::StaticVoidFromVoid)) - .WillOnce(InvokeWithoutArgs(&test_invoke_helper, - &InvokeHelper::VoidFromVoid)); - mock.VoidFromString(NULL); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the InvokeArgument action. -TEST(LinkTest, TestInvokeArgument) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, VoidFromFunc(_)).WillOnce(InvokeArgument<0>(&ch)); - mock.VoidFromFunc(InvokeHelper::StaticVoidFromString); -} - -// Tests the linkage of the WithArg action. -TEST(LinkTest, TestWithArg) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)) - .WillOnce(WithArg<0>(Invoke(&InvokeHelper::StaticVoidFromString))); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the WithArgs action. -TEST(LinkTest, TestWithArgs) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)) - .WillOnce(WithArgs<0>(Invoke(&InvokeHelper::StaticVoidFromString))); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the WithoutArgs action. -TEST(LinkTest, TestWithoutArgs) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(WithoutArgs(Return())); - mock.VoidFromString(NULL); -} - -// Tests the linkage of the DoAll action. -TEST(LinkTest, TestDoAll) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, VoidFromString(_)) - .WillOnce(DoAll(SetArgumentPointee<0>('y'), Return())); - mock.VoidFromString(&ch); -} - -// Tests the linkage of the DoDefault action. -TEST(LinkTest, TestDoDefault) { - Mock mock; - char ch = 'x'; - - ON_CALL(mock, VoidFromString(_)).WillByDefault(Return()); - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(DoDefault()); - mock.VoidFromString(&ch); -} - -// Tests the linkage of the IgnoreResult action. -TEST(LinkTest, TestIgnoreResult) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(IgnoreResult(Return(42))); - mock.VoidFromString(NULL); -} - -#if GTEST_HAS_EXCEPTIONS -// Tests the linkage of the Throw action. -TEST(LinkTest, TestThrow) { - Mock mock; - - EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Throw(42)); - EXPECT_THROW(mock.VoidFromString(NULL), int); -} -#endif // GTEST_HAS_EXCEPTIONS - -// Tests the linkage of actions created using ACTION macro. -namespace { -ACTION(Return1) { return 1; } -} - -TEST(LinkTest, TestActionMacro) { - Mock mock; - - EXPECT_CALL(mock, IntFromString(_)).WillOnce(Return1()); - mock.IntFromString(NULL); -} - -// Tests the linkage of actions created using ACTION_P macro. -namespace { -ACTION_P(ReturnArgument, ret_value) { return ret_value; } -} - -TEST(LinkTest, TestActionPMacro) { - Mock mock; - - EXPECT_CALL(mock, IntFromString(_)).WillOnce(ReturnArgument(42)); - mock.IntFromString(NULL); -} - -// Tests the linkage of actions created using ACTION_P2 macro. -namespace { -ACTION_P2(ReturnEqualsEitherOf, first, second) { - return arg0 == first || arg0 == second; -} -} - -TEST(LinkTest, TestActionP2Macro) { - Mock mock; - char ch = 'x'; - - EXPECT_CALL(mock, IntFromString(_)) - .WillOnce(ReturnEqualsEitherOf("one", "two")); - mock.IntFromString(&ch); -} - -// Tests the linkage of the "_" matcher. -TEST(LinkTest, TestMatcherAnything) { - Mock mock; - - ON_CALL(mock, VoidFromString(_)).WillByDefault(Return()); -} - -// Tests the linkage of the A matcher. -TEST(LinkTest, TestMatcherA) { - Mock mock; - - ON_CALL(mock, VoidFromString(A())).WillByDefault(Return()); -} - -// Tests the linkage of the Eq and the "bare value" matcher. -TEST(LinkTest, TestMatchersEq) { - Mock mock; - const char* p = "x"; - - ON_CALL(mock, VoidFromString(Eq(p))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(const_cast("y"))) - .WillByDefault(Return()); -} - -// Tests the linkage of the Lt, Gt, Le, Ge, and Ne matchers. -TEST(LinkTest, TestMatchersRelations) { - Mock mock; - - ON_CALL(mock, VoidFromFloat(Lt(1.0f))).WillByDefault(Return()); - ON_CALL(mock, VoidFromFloat(Gt(1.0f))).WillByDefault(Return()); - ON_CALL(mock, VoidFromFloat(Le(1.0f))).WillByDefault(Return()); - ON_CALL(mock, VoidFromFloat(Ge(1.0f))).WillByDefault(Return()); - ON_CALL(mock, VoidFromFloat(Ne(1.0f))).WillByDefault(Return()); -} - -// Tests the linkage of the NotNull matcher. -TEST(LinkTest, TestMatcherNotNull) { - Mock mock; - - ON_CALL(mock, VoidFromString(NotNull())).WillByDefault(Return()); -} - -// Tests the linkage of the Ref matcher. -TEST(LinkTest, TestMatcherRef) { - Mock mock; - int a = 0; - - ON_CALL(mock, VoidFromIntRef(Ref(a))).WillByDefault(Return()); -} - -// Tests the linkage of the TypedEq matcher. -TEST(LinkTest, TestMatcherTypedEq) { - Mock mock; - long a = 0; - - ON_CALL(mock, VoidFromIntRef(TypedEq(a))).WillByDefault(Return()); -} - -// Tests the linkage of the FloatEq, DoubleEq, NanSensitiveFloatEq and -// NanSensitiveDoubleEq matchers. -TEST(LinkTest, TestMatchersFloatingPoint) { - Mock mock; - float a = 0; - - ON_CALL(mock, VoidFromFloat(FloatEq(a))).WillByDefault(Return()); - ON_CALL(mock, VoidFromDouble(DoubleEq(a))).WillByDefault(Return()); - ON_CALL(mock, VoidFromFloat(NanSensitiveFloatEq(a))).WillByDefault(Return()); - ON_CALL(mock, VoidFromDouble(NanSensitiveDoubleEq(a))) - .WillByDefault(Return()); -} - -#if GMOCK_HAS_REGEX -// Tests the linkage of the ContainsRegex matcher. -TEST(LinkTest, TestMatcherContainsRegex) { - Mock mock; - - ON_CALL(mock, VoidFromString(ContainsRegex(".*"))).WillByDefault(Return()); -} - -// Tests the linkage of the MatchesRegex matcher. -TEST(LinkTest, TestMatcherMatchesRegex) { - Mock mock; - - ON_CALL(mock, VoidFromString(MatchesRegex(".*"))).WillByDefault(Return()); -} -#endif // GMOCK_HAS_REGEX - -// Tests the linkage of the StartsWith, EndsWith, and HasSubstr matchers. -TEST(LinkTest, TestMatchersSubstrings) { - Mock mock; - - ON_CALL(mock, VoidFromString(StartsWith("a"))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(EndsWith("c"))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(HasSubstr("b"))).WillByDefault(Return()); -} - -// Tests the linkage of the StrEq, StrNe, StrCaseEq, and StrCaseNe matchers. -TEST(LinkTest, TestMatchersStringEquality) { - Mock mock; - ON_CALL(mock, VoidFromString(StrEq("a"))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(StrNe("a"))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(StrCaseEq("a"))).WillByDefault(Return()); - ON_CALL(mock, VoidFromString(StrCaseNe("a"))).WillByDefault(Return()); -} - -// Tests the linkage of the ElementsAre matcher. -TEST(LinkTest, TestMatcherElementsAre) { - Mock mock; - - ON_CALL(mock, VoidFromVector(ElementsAre('a', _))).WillByDefault(Return()); -} - -// Tests the linkage of the ElementsAreArray matcher. -TEST(LinkTest, TestMatcherElementsAreArray) { - Mock mock; - char arr[] = { 'a', 'b' }; - - ON_CALL(mock, VoidFromVector(ElementsAreArray(arr))).WillByDefault(Return()); -} - -// Tests the linkage of the ContainerEq matcher. -TEST(LinkTest, TestMatcherContainerEq) { - Mock mock; - std::vector v; - - ON_CALL(mock, VoidFromVector(ContainerEq(v))).WillByDefault(Return()); -} - -// Tests the linkage of the Field matcher. -TEST(LinkTest, TestMatcherField) { - FieldHelper helper(0); - - Matcher m = Field(&FieldHelper::field_, Eq(0)); - EXPECT_TRUE(m.Matches(helper)); - - Matcher m2 = Field(&FieldHelper::field_, Eq(0)); - EXPECT_TRUE(m2.Matches(&helper)); -} - -// Tests the linkage of the Property matcher. -TEST(LinkTest, TestMatcherProperty) { - FieldHelper helper(0); - - Matcher m = Property(&FieldHelper::field, Eq(0)); - EXPECT_TRUE(m.Matches(helper)); - - Matcher m2 = Property(&FieldHelper::field, Eq(0)); - EXPECT_TRUE(m2.Matches(&helper)); -} - -// Tests the linkage of the ResultOf matcher. -TEST(LinkTest, TestMatcherResultOf) { - Matcher m = ResultOf(&InvokeHelper::StaticIntFromString, Eq(1)); - EXPECT_TRUE(m.Matches(NULL)); -} - -// Tests the linkage of the ResultOf matcher. -TEST(LinkTest, TestMatcherPointee) { - int n = 1; - - Matcher m = Pointee(Eq(1)); - EXPECT_TRUE(m.Matches(&n)); -} - -// Tests the linkage of the Truly matcher. -TEST(LinkTest, TestMatcherTruly) { - Matcher m = Truly(&InvokeHelper::StaticBoolFromString); - EXPECT_TRUE(m.Matches(NULL)); -} - -// Tests the linkage of the AllOf matcher. -TEST(LinkTest, TestMatcherAllOf) { - Matcher m = AllOf(_, Eq(1)); - EXPECT_TRUE(m.Matches(1)); -} - -// Tests the linkage of the AnyOf matcher. -TEST(LinkTest, TestMatcherAnyOf) { - Matcher m = AnyOf(_, Eq(1)); - EXPECT_TRUE(m.Matches(1)); -} - -// Tests the linkage of the Not matcher. -TEST(LinkTest, TestMatcherNot) { - Matcher m = Not(_); - EXPECT_FALSE(m.Matches(1)); -} - -// Tests the linkage of the MatcherCast() function. -TEST(LinkTest, TestMatcherCast) { - Matcher m = MatcherCast(_); - EXPECT_TRUE(m.Matches(NULL)); -} - -#endif // GMOCK_TEST_GMOCK_LINK_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test.py deleted file mode 100755 index f43f7074..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test.py +++ /dev/null @@ -1,230 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the text output of Google C++ Mocking Framework. - -SYNOPSIS - gmock_output_test.py --gmock_build_dir=BUILD/DIR --gengolden - # where BUILD/DIR contains the built gmock_output_test_ file. - gmock_output_test.py --gengolden - gmock_output_test.py -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gmock_test_utils -import os -import re -import string -import sys -import unittest - - -# The flag for generating the golden file -GENGOLDEN_FLAG = '--gengolden' - -IS_WINDOWS = os.name == 'nt' - -if IS_WINDOWS: - PROGRAM = r'..\build.dbg\gmock_output_test_.exe' -else: - PROGRAM = 'gmock_output_test_' - -PROGRAM_PATH = os.path.join(gmock_test_utils.GetBuildDir(), PROGRAM) -COMMAND = PROGRAM_PATH + ' --gtest_stack_trace_depth=0 --gtest_print_time=0' -GOLDEN_NAME = 'gmock_output_test_golden.txt' -GOLDEN_PATH = os.path.join(gmock_test_utils.GetSourceDir(), - GOLDEN_NAME) - - -def ToUnixLineEnding(s): - """Changes all Windows/Mac line endings in s to UNIX line endings.""" - - return s.replace('\r\n', '\n').replace('\r', '\n') - - -def RemoveReportHeaderAndFooter(output): - """Removes Google Test result report's header and footer from the output.""" - - output = re.sub(r'.*gtest_main.*\n', '', output) - output = re.sub(r'\[.*\d+ tests.*\n', '', output) - output = re.sub(r'\[.* test environment .*\n', '', output) - output = re.sub(r'\[=+\] \d+ tests .* ran.*', '', output) - output = re.sub(r'.* FAILED TESTS\n', '', output) - return output - - -def RemoveLocations(output): - """Removes all file location info from a Google Test program's output. - - Args: - output: the output of a Google Test program. - - Returns: - output with all file location info (in the form of - 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or - 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by - 'FILE:#: '. - """ - - return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\:', 'FILE:#:', output) - - -def NormalizeErrorMarker(output): - """Normalizes the error marker, which is different on Windows vs on Linux.""" - - return re.sub(r' error: ', ' Failure\n', output) - - -def RemoveMemoryAddresses(output): - """Removes memory addresses from the test output.""" - - return re.sub(r'@\w+', '@0x#', output) - - -def RemoveTestNamesOfLeakedMocks(output): - """Removes the test names of leaked mock objects from the test output.""" - - return re.sub(r'\(used in test .+\) ', '', output) - - -def GetLeakyTests(output): - """Returns a list of test names that leak mock objects.""" - - # findall() returns a list of all matches of the regex in output. - # For example, if '(used in test FooTest.Bar)' is in output, the - # list will contain 'FooTest.Bar'. - return re.findall(r'\(used in test (.+)\)', output) - - -def GetNormalizedOutputAndLeakyTests(output): - """Normalizes the output of gmock_output_test_. - - Args: - output: The test output. - - Returns: - A tuple (the normalized test output, the list of test names that have - leaked mocks). - """ - - output = ToUnixLineEnding(output) - output = RemoveReportHeaderAndFooter(output) - output = NormalizeErrorMarker(output) - output = RemoveLocations(output) - output = RemoveMemoryAddresses(output) - return (RemoveTestNamesOfLeakedMocks(output), GetLeakyTests(output)) - - -def IterShellCommandOutput(cmd, stdin_string=None): - """Runs a command in a sub-process, and iterates the lines in its STDOUT. - - Args: - - cmd: The shell command. - stdin_string: The string to be fed to the STDIN of the sub-process; - If None, the sub-process will inherit the STDIN - from the parent process. - """ - - # Spawns cmd in a sub-process, and gets its standard I/O file objects. - stdin_file, stdout_file = os.popen2(cmd, 'b') - - # If the caller didn't specify a string for STDIN, gets it from the - # parent process. - if stdin_string is None: - stdin_string = sys.stdin.read() - - # Feeds the STDIN string to the sub-process. - stdin_file.write(stdin_string) - stdin_file.close() - - while True: - line = stdout_file.readline() - if not line: # EOF - stdout_file.close() - break - - yield line - - -def GetShellCommandOutput(cmd, stdin_string=None): - """Runs a command in a sub-process, and returns its STDOUT in a string. - - Args: - - cmd: The shell command. - stdin_string: The string to be fed to the STDIN of the sub-process; - If None, the sub-process will inherit the STDIN - from the parent process. - """ - - lines = list(IterShellCommandOutput(cmd, stdin_string)) - return string.join(lines, '') - - -def GetNormalizedCommandOutputAndLeakyTests(cmd): - """Runs a command and returns its normalized output and a list of leaky tests. - - Args: - cmd: the shell command. - """ - - # Disables exception pop-ups on Windows. - os.environ['GTEST_CATCH_EXCEPTIONS'] = '1' - return GetNormalizedOutputAndLeakyTests(GetShellCommandOutput(cmd, '')) - - -class GMockOutputTest(unittest.TestCase): - def testOutput(self): - (output, leaky_tests) = GetNormalizedCommandOutputAndLeakyTests(COMMAND) - golden_file = open(GOLDEN_PATH, 'rb') - golden = golden_file.read() - golden_file.close() - - # The normalized output should match the golden file. - self.assertEquals(golden, output) - - # The raw output should contain 2 leaked mock object errors for - # test GMockOutputTest.CatchesLeakedMocks. - self.assertEquals(['GMockOutputTest.CatchesLeakedMocks', - 'GMockOutputTest.CatchesLeakedMocks'], - leaky_tests) - - -if __name__ == '__main__': - if sys.argv[1:] == [GENGOLDEN_FLAG]: - (output, _) = GetNormalizedCommandOutputAndLeakyTests(COMMAND) - golden_file = open(GOLDEN_PATH, 'wb') - golden_file.write(output) - golden_file.close() - else: - gmock_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_.cc deleted file mode 100644 index 8244f10b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_.cc +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests Google Mock's output in various scenarios. This ensures that -// Google Mock's messages are readable and useful. - -#include - -#include -#include - -#include - -using testing::_; -using testing::AnyNumber; -using testing::Ge; -using testing::InSequence; -using testing::Ref; -using testing::Return; -using testing::Sequence; - -class MockFoo { - public: - MOCK_METHOD3(Bar, char(const std::string& s, int i, double x)); - MOCK_METHOD2(Bar2, bool(int x, int y)); - MOCK_METHOD2(Bar3, void(int x, int y)); -}; - -class GMockOutputTest : public testing::Test { - protected: - MockFoo foo_; -}; - -TEST_F(GMockOutputTest, ExpectedCall) { - testing::GMOCK_FLAG(verbose) = "info"; - - EXPECT_CALL(foo_, Bar2(0, _)); - foo_.Bar2(0, 0); // Expected call - - testing::GMOCK_FLAG(verbose) = "warning"; -} - -TEST_F(GMockOutputTest, ExpectedCallToVoidFunction) { - testing::GMOCK_FLAG(verbose) = "info"; - - EXPECT_CALL(foo_, Bar3(0, _)); - foo_.Bar3(0, 0); // Expected call - - testing::GMOCK_FLAG(verbose) = "warning"; -} - -TEST_F(GMockOutputTest, ExplicitActionsRunOut) { - EXPECT_CALL(foo_, Bar2(_, _)) - .Times(2) - .WillOnce(Return(false)); - foo_.Bar2(2, 2); - foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out. -} - -TEST_F(GMockOutputTest, UnexpectedCall) { - EXPECT_CALL(foo_, Bar2(0, _)); - - foo_.Bar2(1, 0); // Unexpected call - foo_.Bar2(0, 0); // Expected call -} - -TEST_F(GMockOutputTest, UnexpectedCallToVoidFunction) { - EXPECT_CALL(foo_, Bar3(0, _)); - - foo_.Bar3(1, 0); // Unexpected call - foo_.Bar3(0, 0); // Expected call -} - -TEST_F(GMockOutputTest, ExcessiveCall) { - EXPECT_CALL(foo_, Bar2(0, _)); - - foo_.Bar2(0, 0); // Expected call - foo_.Bar2(0, 1); // Excessive call -} - -TEST_F(GMockOutputTest, ExcessiveCallToVoidFunction) { - EXPECT_CALL(foo_, Bar3(0, _)); - - foo_.Bar3(0, 0); // Expected call - foo_.Bar3(0, 1); // Excessive call -} - -TEST_F(GMockOutputTest, UninterestingCall) { - foo_.Bar2(0, 1); // Uninteresting call -} - -TEST_F(GMockOutputTest, UninterestingCallToVoidFunction) { - foo_.Bar3(0, 1); // Uninteresting call -} - -TEST_F(GMockOutputTest, RetiredExpectation) { - EXPECT_CALL(foo_, Bar2(_, _)) - .RetiresOnSaturation(); - EXPECT_CALL(foo_, Bar2(0, 0)); - - foo_.Bar2(1, 1); - foo_.Bar2(1, 1); // Matches a retired expectation - foo_.Bar2(0, 0); -} - -TEST_F(GMockOutputTest, UnsatisfiedPrerequisite) { - { - InSequence s; - EXPECT_CALL(foo_, Bar(_, 0, _)); - EXPECT_CALL(foo_, Bar2(0, 0)); - EXPECT_CALL(foo_, Bar2(1, _)); - } - - foo_.Bar2(1, 0); // Has one immediate unsatisfied pre-requisite - foo_.Bar("Hi", 0, 0); - foo_.Bar2(0, 0); - foo_.Bar2(1, 0); -} - -TEST_F(GMockOutputTest, UnsatisfiedPrerequisites) { - Sequence s1, s2; - - EXPECT_CALL(foo_, Bar(_, 0, _)) - .InSequence(s1); - EXPECT_CALL(foo_, Bar2(0, 0)) - .InSequence(s2); - EXPECT_CALL(foo_, Bar2(1, _)) - .InSequence(s1, s2); - - foo_.Bar2(1, 0); // Has two immediate unsatisfied pre-requisites - foo_.Bar("Hi", 0, 0); - foo_.Bar2(0, 0); - foo_.Bar2(1, 0); -} - -TEST_F(GMockOutputTest, UnsatisfiedExpectation) { - EXPECT_CALL(foo_, Bar(_, _, _)); - EXPECT_CALL(foo_, Bar2(0, _)) - .Times(2); - - foo_.Bar2(0, 1); -} - -TEST_F(GMockOutputTest, MismatchArguments) { - const std::string s = "Hi"; - EXPECT_CALL(foo_, Bar(Ref(s), _, Ge(0))); - - foo_.Bar("Ho", 0, -0.1); // Mismatch arguments - foo_.Bar(s, 0, 0); -} - -TEST_F(GMockOutputTest, MismatchWith) { - EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1))) - .With(Ge()); - - foo_.Bar2(2, 3); // Mismatch With() - foo_.Bar2(2, 1); -} - -TEST_F(GMockOutputTest, MismatchArgumentsAndWith) { - EXPECT_CALL(foo_, Bar2(Ge(2), Ge(1))) - .With(Ge()); - - foo_.Bar2(1, 3); // Mismatch arguments and mismatch With() - foo_.Bar2(2, 1); -} - -TEST_F(GMockOutputTest, UnexpectedCallWithDefaultAction) { - ON_CALL(foo_, Bar2(_, _)) - .WillByDefault(Return(true)); // Default action #1 - ON_CALL(foo_, Bar2(1, _)) - .WillByDefault(Return(false)); // Default action #2 - - EXPECT_CALL(foo_, Bar2(2, 2)); - foo_.Bar2(1, 0); // Unexpected call, takes default action #2. - foo_.Bar2(0, 0); // Unexpected call, takes default action #1. - foo_.Bar2(2, 2); // Expected call. -} - -TEST_F(GMockOutputTest, ExcessiveCallWithDefaultAction) { - ON_CALL(foo_, Bar2(_, _)) - .WillByDefault(Return(true)); // Default action #1 - ON_CALL(foo_, Bar2(1, _)) - .WillByDefault(Return(false)); // Default action #2 - - EXPECT_CALL(foo_, Bar2(2, 2)); - EXPECT_CALL(foo_, Bar2(1, 1)); - - foo_.Bar2(2, 2); // Expected call. - foo_.Bar2(2, 2); // Excessive call, takes default action #1. - foo_.Bar2(1, 1); // Expected call. - foo_.Bar2(1, 1); // Excessive call, takes default action #2. -} - -TEST_F(GMockOutputTest, UninterestingCallWithDefaultAction) { - ON_CALL(foo_, Bar2(_, _)) - .WillByDefault(Return(true)); // Default action #1 - ON_CALL(foo_, Bar2(1, _)) - .WillByDefault(Return(false)); // Default action #2 - - foo_.Bar2(2, 2); // Uninteresting call, takes default action #1. - foo_.Bar2(1, 1); // Uninteresting call, takes default action #2. -} - -TEST_F(GMockOutputTest, ExplicitActionsRunOutWithDefaultAction) { - ON_CALL(foo_, Bar2(_, _)) - .WillByDefault(Return(true)); // Default action #1 - - EXPECT_CALL(foo_, Bar2(_, _)) - .Times(2) - .WillOnce(Return(false)); - foo_.Bar2(2, 2); - foo_.Bar2(1, 1); // Explicit actions in EXPECT_CALL run out. -} - -TEST_F(GMockOutputTest, CatchesLeakedMocks) { - MockFoo* foo1 = new MockFoo; - MockFoo* foo2 = new MockFoo; - - // Invokes ON_CALL on foo1. - ON_CALL(*foo1, Bar(_, _, _)).WillByDefault(Return('a')); - - // Invokes EXPECT_CALL on foo2. - EXPECT_CALL(*foo2, Bar2(_, _)); - EXPECT_CALL(*foo2, Bar2(1, _)); - EXPECT_CALL(*foo2, Bar3(_, _)).Times(AnyNumber()); - foo2->Bar2(2, 1); - foo2->Bar2(1, 1); - - // Both foo1 and foo2 are deliberately leaked. -} - -void TestCatchesLeakedMocksInAdHocTests() { - MockFoo* foo = new MockFoo; - - // Invokes EXPECT_CALL on foo. - EXPECT_CALL(*foo, Bar2(_, _)); - foo->Bar2(2, 1); - - // foo is deliberately leaked. -} - -int main(int argc, char **argv) { - testing::InitGoogleMock(&argc, argv); - - // Ensures that the tests pass no matter what value of - // --gmock_catch_leaked_mocks and --gmock_verbose the user specifies. - testing::GMOCK_FLAG(catch_leaked_mocks) = true; - testing::GMOCK_FLAG(verbose) = "warning"; - - TestCatchesLeakedMocksInAdHocTests(); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_golden.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_golden.txt deleted file mode 100644 index aeec660f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_output_test_golden.txt +++ /dev/null @@ -1,302 +0,0 @@ -[ RUN ] GMockOutputTest.ExpectedCall - -FILE:#: EXPECT_CALL(foo_, Bar2(0, _)) invoked -Stack trace: - -FILE:#: Expected mock function call. - Function call: Bar2(0, 0) - Returns: false -Stack trace: -[ OK ] GMockOutputTest.ExpectedCall -[ RUN ] GMockOutputTest.ExpectedCallToVoidFunction - -FILE:#: EXPECT_CALL(foo_, Bar3(0, _)) invoked -Stack trace: - -FILE:#: Expected mock function call. - Function call: Bar3(0, 0) -Stack trace: -[ OK ] GMockOutputTest.ExpectedCallToVoidFunction -[ RUN ] GMockOutputTest.ExplicitActionsRunOut - -GMOCK WARNING: -FILE:#: Too few actions specified. -Expected to be called twice, but has only 1 WillOnce(). -GMOCK WARNING: -FILE:#: Actions ran out. -Called 2 times, but only 1 WillOnce() is specified - returning default value. -Stack trace: -[ OK ] GMockOutputTest.ExplicitActionsRunOut -[ RUN ] GMockOutputTest.UnexpectedCall -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(1, 0) - Returns: false -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: is equal to 0 - Actual: 1 - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnexpectedCall -[ RUN ] GMockOutputTest.UnexpectedCallToVoidFunction -unknown file: Failure - -Unexpected mock function call - returning directly. - Function call: Bar3(1, 0) -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: is equal to 0 - Actual: 1 - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction -[ RUN ] GMockOutputTest.ExcessiveCall -FILE:#: Failure -Mock function called more times than expected - returning default value. - Function call: Bar2(0, 1) - Returns: false - Expected: to be called once - Actual: called twice - over-saturated and active -[ FAILED ] GMockOutputTest.ExcessiveCall -[ RUN ] GMockOutputTest.ExcessiveCallToVoidFunction -FILE:#: Failure -Mock function called more times than expected - returning directly. - Function call: Bar3(0, 1) - Expected: to be called once - Actual: called twice - over-saturated and active -[ FAILED ] GMockOutputTest.ExcessiveCallToVoidFunction -[ RUN ] GMockOutputTest.UninterestingCall - -GMOCK WARNING: -Uninteresting mock function call - returning default value. - Function call: Bar2(0, 1) - Returns: false -Stack trace: -[ OK ] GMockOutputTest.UninterestingCall -[ RUN ] GMockOutputTest.UninterestingCallToVoidFunction - -GMOCK WARNING: -Uninteresting mock function call - returning directly. - Function call: Bar3(0, 1) -Stack trace: -[ OK ] GMockOutputTest.UninterestingCallToVoidFunction -[ RUN ] GMockOutputTest.RetiredExpectation -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(1, 1) - Returns: false -Google Mock tried the following 2 expectations, but none matched: - -FILE:#: tried expectation #0 - Expected: the expectation is active - Actual: it is retired - Expected: to be called once - Actual: called once - saturated and retired -FILE:#: tried expectation #1 - Expected arg #0: is equal to 0 - Actual: 1 - Expected arg #1: is equal to 0 - Actual: 1 - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.RetiredExpectation -[ RUN ] GMockOutputTest.UnsatisfiedPrerequisite -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(1, 0) - Returns: false -Google Mock tried the following 2 expectations, but none matched: - -FILE:#: tried expectation #0 - Expected arg #0: is equal to 0 - Actual: 1 - Expected: to be called once - Actual: never called - unsatisfied and active -FILE:#: tried expectation #1 - Expected: all pre-requisites are satisfied - Actual: the following immediate pre-requisites are not satisfied: -FILE:#: pre-requisite #0 - (end of pre-requisites) - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisite -[ RUN ] GMockOutputTest.UnsatisfiedPrerequisites -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(1, 0) - Returns: false -Google Mock tried the following 2 expectations, but none matched: - -FILE:#: tried expectation #0 - Expected arg #0: is equal to 0 - Actual: 1 - Expected: to be called once - Actual: never called - unsatisfied and active -FILE:#: tried expectation #1 - Expected: all pre-requisites are satisfied - Actual: the following immediate pre-requisites are not satisfied: -FILE:#: pre-requisite #0 -FILE:#: pre-requisite #1 - (end of pre-requisites) - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisites -[ RUN ] GMockOutputTest.UnsatisfiedExpectation -FILE:#: Failure -Actual function call count doesn't match this expectation. - Expected: to be called twice - Actual: called once - unsatisfied and active -FILE:#: Failure -Actual function call count doesn't match this expectation. - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnsatisfiedExpectation -[ RUN ] GMockOutputTest.MismatchArguments -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar(@0x# "Ho", 0, -0.1) - Returns: '\0' -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: references the variable @0x# "Hi" - Actual: "Ho" (is located @0x#) - Expected arg #2: is greater than or equal to 0 - Actual: -0.1 - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.MismatchArguments -[ RUN ] GMockOutputTest.MismatchWith -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(2, 3) - Returns: false -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected args: are a pair (x, y) where x >= y - Actual: don't match - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.MismatchWith -[ RUN ] GMockOutputTest.MismatchArgumentsAndWith -unknown file: Failure - -Unexpected mock function call - returning default value. - Function call: Bar2(1, 3) - Returns: false -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: is greater than or equal to 2 - Actual: 1 - Expected args: are a pair (x, y) where x >= y - Actual: don't match - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.MismatchArgumentsAndWith -[ RUN ] GMockOutputTest.UnexpectedCallWithDefaultAction -unknown file: Failure - -Unexpected mock function call - taking default action specified at: -FILE:#: - Function call: Bar2(1, 0) - Returns: false -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: is equal to 2 - Actual: 1 - Expected arg #1: is equal to 2 - Actual: 0 - Expected: to be called once - Actual: never called - unsatisfied and active -unknown file: Failure - -Unexpected mock function call - taking default action specified at: -FILE:#: - Function call: Bar2(0, 0) - Returns: true -Google Mock tried the following 1 expectation, but it didn't match: - -FILE:#: - Expected arg #0: is equal to 2 - Actual: 0 - Expected arg #1: is equal to 2 - Actual: 0 - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] GMockOutputTest.UnexpectedCallWithDefaultAction -[ RUN ] GMockOutputTest.ExcessiveCallWithDefaultAction -FILE:#: Failure -Mock function called more times than expected - taking default action specified at: -FILE:#: - Function call: Bar2(2, 2) - Returns: true - Expected: to be called once - Actual: called twice - over-saturated and active -FILE:#: Failure -Mock function called more times than expected - taking default action specified at: -FILE:#: - Function call: Bar2(1, 1) - Returns: false - Expected: to be called once - Actual: called twice - over-saturated and active -[ FAILED ] GMockOutputTest.ExcessiveCallWithDefaultAction -[ RUN ] GMockOutputTest.UninterestingCallWithDefaultAction - -GMOCK WARNING: -Uninteresting mock function call - taking default action specified at: -FILE:#: - Function call: Bar2(2, 2) - Returns: true -Stack trace: - -GMOCK WARNING: -Uninteresting mock function call - taking default action specified at: -FILE:#: - Function call: Bar2(1, 1) - Returns: false -Stack trace: -[ OK ] GMockOutputTest.UninterestingCallWithDefaultAction -[ RUN ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction - -GMOCK WARNING: -FILE:#: Too few actions specified. -Expected to be called twice, but has only 1 WillOnce(). -GMOCK WARNING: -FILE:#: Actions ran out. -Called 2 times, but only 1 WillOnce() is specified - taking default action specified at: -FILE:#: -Stack trace: -[ OK ] GMockOutputTest.ExplicitActionsRunOutWithDefaultAction -[ RUN ] GMockOutputTest.CatchesLeakedMocks -[ OK ] GMockOutputTest.CatchesLeakedMocks -[ FAILED ] GMockOutputTest.UnexpectedCall -[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction -[ FAILED ] GMockOutputTest.ExcessiveCall -[ FAILED ] GMockOutputTest.ExcessiveCallToVoidFunction -[ FAILED ] GMockOutputTest.RetiredExpectation -[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisite -[ FAILED ] GMockOutputTest.UnsatisfiedPrerequisites -[ FAILED ] GMockOutputTest.UnsatisfiedExpectation -[ FAILED ] GMockOutputTest.MismatchArguments -[ FAILED ] GMockOutputTest.MismatchWith -[ FAILED ] GMockOutputTest.MismatchArgumentsAndWith -[ FAILED ] GMockOutputTest.UnexpectedCallWithDefaultAction -[ FAILED ] GMockOutputTest.ExcessiveCallWithDefaultAction - - -FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#. -FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#. -FILE:#: ERROR: this mock object should be deleted but never is. Its address is @0x#. -ERROR: 3 leaked mock objects found at program exit. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test.cc deleted file mode 100644 index 0c832607..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test.cc +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Google Mock - a framework for writing C++ mock classes. -// -// This file tests code in gmock.cc. - -#include - -#include -#include - -using testing::GMOCK_FLAG(verbose); -using testing::InitGoogleMock; -using testing::internal::g_init_gtest_count; - -// Verifies that calling InitGoogleMock() on argv results in new_argv, -// and the gmock_verbose flag's value is set to expected_gmock_verbose. -template -void TestInitGoogleMock(const Char* (&argv)[M], const Char* (&new_argv)[N], - const ::std::string& expected_gmock_verbose) { - const ::std::string old_verbose = GMOCK_FLAG(verbose); - - int argc = M; - InitGoogleMock(&argc, const_cast(argv)); - ASSERT_EQ(N, argc) << "The new argv has wrong number of elements."; - - for (int i = 0; i < N; i++) { - EXPECT_STREQ(new_argv[i], argv[i]); - } - - EXPECT_EQ(expected_gmock_verbose, GMOCK_FLAG(verbose).c_str()); - GMOCK_FLAG(verbose) = old_verbose; // Restores the gmock_verbose flag. -} - -TEST(InitGoogleMockTest, ParsesInvalidCommandLine) { - const char* argv[] = { - NULL - }; - - const char* new_argv[] = { - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(InitGoogleMockTest, ParsesEmptyCommandLine) { - const char* argv[] = { - "foo.exe", - NULL - }; - - const char* new_argv[] = { - "foo.exe", - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(InitGoogleMockTest, ParsesSingleFlag) { - const char* argv[] = { - "foo.exe", - "--gmock_verbose=info", - NULL - }; - - const char* new_argv[] = { - "foo.exe", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "info"); -} - -TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) { - const char* argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - NULL - }; - - const char* new_argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(InitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) { - const char* argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - "--gmock_verbose=error", - NULL - }; - - const char* new_argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "error"); -} - -TEST(InitGoogleMockTest, CallsInitGoogleTest) { - const int old_init_gtest_count = g_init_gtest_count; - const char* argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - "--gmock_verbose=error", - NULL - }; - - const char* new_argv[] = { - "foo.exe", - "--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "error"); - EXPECT_EQ(old_init_gtest_count + 1, g_init_gtest_count); -} - -TEST(WideInitGoogleMockTest, ParsesInvalidCommandLine) { - const wchar_t* argv[] = { - NULL - }; - - const wchar_t* new_argv[] = { - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(WideInitGoogleMockTest, ParsesEmptyCommandLine) { - const wchar_t* argv[] = { - L"foo.exe", - NULL - }; - - const wchar_t* new_argv[] = { - L"foo.exe", - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(WideInitGoogleMockTest, ParsesSingleFlag) { - const wchar_t* argv[] = { - L"foo.exe", - L"--gmock_verbose=info", - NULL - }; - - const wchar_t* new_argv[] = { - L"foo.exe", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "info"); -} - -TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) { - const wchar_t* argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - NULL - }; - - const wchar_t* new_argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, GMOCK_FLAG(verbose)); -} - -TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) { - const wchar_t* argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - L"--gmock_verbose=error", - NULL - }; - - const wchar_t* new_argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "error"); -} - -TEST(WideInitGoogleMockTest, CallsInitGoogleTest) { - const int old_init_gtest_count = g_init_gtest_count; - const wchar_t* argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - L"--gmock_verbose=error", - NULL - }; - - const wchar_t* new_argv[] = { - L"foo.exe", - L"--non_gmock_flag=blah", - NULL - }; - - TestInitGoogleMock(argv, new_argv, "error"); - EXPECT_EQ(old_init_gtest_count + 1, g_init_gtest_count); -} - -// Makes sure Google Mock flags can be accessed in code. -TEST(FlagTest, IsAccessibleInCode) { - bool dummy = testing::GMOCK_FLAG(catch_leaked_mocks) && - testing::GMOCK_FLAG(verbose) == ""; - dummy = dummy; // Avoids the "unused local variable" warning. -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test_utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test_utils.py deleted file mode 100755 index 4c09e39d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/testing/test/gmock_test_utils.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test utilities for Google C++ Mocking Framework.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys -import unittest - - -# Initially maps a flag to its default value. After -# _ParseAndStripGMockFlags() is called, maps a flag to its actual -# value. -_flag_map = {'gmock_source_dir': os.path.dirname(sys.argv[0]), - 'gmock_build_dir': os.path.dirname(sys.argv[0])} -_gmock_flags_are_parsed = False - - -def _ParseAndStripGMockFlags(argv): - """Parses and strips Google Test flags from argv. This is idempotent.""" - - global _gmock_flags_are_parsed - if _gmock_flags_are_parsed: - return - - _gmock_flags_are_parsed = True - for flag in _flag_map: - # The environment variable overrides the default value. - if flag.upper() in os.environ: - _flag_map[flag] = os.environ[flag.upper()] - - # The command line flag overrides the environment variable. - i = 1 # Skips the program name. - while i < len(argv): - prefix = '--' + flag + '=' - if argv[i].startswith(prefix): - _flag_map[flag] = argv[i][len(prefix):] - del argv[i] - break - else: - # We don't increment i in case we just found a --gmock_* flag - # and removed it from argv. - i += 1 - - -def GetFlag(flag): - """Returns the value of the given flag.""" - - # In case GetFlag() is called before Main(), we always call - # _ParseAndStripGMockFlags() here to make sure the --gmock_* flags - # are parsed. - _ParseAndStripGMockFlags(sys.argv) - - return _flag_map[flag] - - -def GetSourceDir(): - """Returns the absolute path of the directory where the .py files are.""" - - return os.path.abspath(GetFlag('gmock_source_dir')) - - -def GetBuildDir(): - """Returns the absolute path of the directory where the test binaries are.""" - - return os.path.abspath(GetFlag('gmock_build_dir')) - - -def GetExitStatus(exit_code): - """Returns the argument to exit(), or -1 if exit() wasn't called. - - Args: - exit_code: the result value of os.system(command). - """ - - if os.name == 'nt': - # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns - # the argument to exit() directly. - return exit_code - else: - # On Unix, os.WEXITSTATUS() must be used to extract the exit status - # from the result of os.system(). - if os.WIFEXITED(exit_code): - return os.WEXITSTATUS(exit_code) - else: - return -1 - - -def Main(): - """Runs the unit test.""" - - # We must call _ParseAndStripGMockFlags() before calling - # unittest.main(). Otherwise the latter will be confused by the - # --gmock_* flags. - _ParseAndStripGMockFlags(sys.argv) - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curl.h deleted file mode 100644 index 160cd98a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curl.h +++ /dev/null @@ -1,1936 +0,0 @@ -#ifndef __CURL_CURL_H -#define __CURL_CURL_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: curl.h,v 1.396 2009-10-16 13:30:31 yangtse Exp $ - ***************************************************************************/ - -/* - * If you have libcurl problems, all docs and details are found here: - * http://curl.haxx.se/libcurl/ - * - * curl-library mailing list subscription and unsubscription web interface: - * http://cool.haxx.se/mailman/listinfo/curl-library/ - */ - -/* - * Leading 'curl' path on the 'curlbuild.h' include statement is - * required to properly allow building outside of the source tree, - * due to the fact that in this case 'curlbuild.h' is generated in - * a subdirectory of the build tree while 'curl.h actually remains - * in a subdirectory of the source tree. - */ - -#include "third_party/curl/curlver.h" /* libcurl version defines */ -#include "third_party/curl/curlbuild.h" /* libcurl build definitions */ -#include "third_party/curl/curlrules.h" /* libcurl rules enforcement */ - -/* - * Define WIN32 when build target is Win32 API - */ - -#if (defined(_WIN32) || defined(__WIN32__)) && \ - !defined(WIN32) && !defined(__SYMBIAN32__) -#define WIN32 -#endif - -#include -#include - -/* The include stuff here below is mainly for time_t! */ -#include -#include - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#include -#endif -#else - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on system that are known to - require it! */ -#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ - defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) -#include -#endif - -#ifndef _WIN32_WCE -#include -#endif -#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) -#include -#endif -#include -#endif - -#ifdef __BEOS__ -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void CURL; - -/* - * Decorate exportable functions for Win32 and Symbian OS DLL linking. - * This avoids using a .def file for building libcurl.dll. - */ -#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ - !defined(CURL_STATICLIB) -#if defined(BUILDING_LIBCURL) -#define CURL_EXTERN __declspec(dllexport) -#else -#define CURL_EXTERN __declspec(dllimport) -#endif -#else - -#ifdef CURL_HIDDEN_SYMBOLS -/* - * This definition is used to make external definitions visible in the - * shared library when symbols are hidden by default. It makes no - * difference when compiling applications whether this is set or not, - * only when compiling the library. - */ -#define CURL_EXTERN CURL_EXTERN_SYMBOL -#else -#define CURL_EXTERN -#endif -#endif - -#ifndef curl_socket_typedef -/* socket typedef */ -#ifdef WIN32 -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - -struct curl_httppost { - struct curl_httppost *next; /* next entry in the list */ - char *name; /* pointer to allocated name */ - long namelength; /* length of name length */ - char *contents; /* pointer to allocated data contents */ - long contentslength; /* length of contents field */ - char *buffer; /* pointer to allocated buffer contents */ - long bufferlength; /* length of buffer field */ - char *contenttype; /* Content-Type */ - struct curl_slist* contentheader; /* list of extra headers for this form */ - struct curl_httppost *more; /* if one field name has more than one - file, this link should link to following - files */ - long flags; /* as defined below */ -#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ -#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */ -#define HTTPPOST_PTRNAME (1<<2) /* name is only stored pointer - do not free in formfree */ -#define HTTPPOST_PTRCONTENTS (1<<3) /* contents is only stored pointer - do not free in formfree */ -#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ -#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ -#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the - regular read callback to get the data - and pass the given pointer as custom - pointer */ - - char *showfilename; /* The file name to show. If not set, the - actual file name will be used (if this - is a file part) */ - void *userp; /* custom pointer used for - HTTPPOST_CALLBACK posts */ -}; - -typedef int (*curl_progress_callback)(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow); - -#ifndef CURL_MAX_WRITE_SIZE - /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. - We do the ifndef check to allow this value to easier be changed at build - time for those who feel adventurous. */ -#define CURL_MAX_WRITE_SIZE 16384 -#endif - -#ifndef CURL_MAX_HTTP_HEADER -/* The only reason to have a max limit for this is to avoid the risk of a bad - server feeding libcurl with a never-ending header that will cause reallocs - infinitely */ -#define CURL_MAX_HTTP_HEADER (100*1024) -#endif - - -/* This is a magic return code for the write callback that, when returned, - will signal libcurl to pause receiving on the current transfer. */ -#define CURL_WRITEFUNC_PAUSE 0x10000001 -typedef size_t (*curl_write_callback)(char *buffer, - size_t size, - size_t nitems, - void *outstream); - -/* These are the return codes for the seek callbacks */ -#define CURL_SEEKFUNC_OK 0 -#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ -#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so - libcurl might try other means instead */ -typedef int (*curl_seek_callback)(void *instream, - curl_off_t offset, - int origin); /* 'whence' */ - -/* This is a return code for the read callback that, when returned, will - signal libcurl to immediately abort the current transfer. */ -#define CURL_READFUNC_ABORT 0x10000000 -/* This is a return code for the read callback that, when returned, will - signal libcurl to pause sending data on the current transfer. */ -#define CURL_READFUNC_PAUSE 0x10000001 - -typedef size_t (*curl_read_callback)(char *buffer, - size_t size, - size_t nitems, - void *instream); - -typedef enum { - CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ - CURLSOCKTYPE_LAST /* never use */ -} curlsocktype; - -typedef int (*curl_sockopt_callback)(void *clientp, - curl_socket_t curlfd, - curlsocktype purpose); - -struct curl_sockaddr { - int family; - int socktype; - int protocol; - unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it - turned really ugly and painful on the systems that - lack this type */ - struct sockaddr addr; -}; - -typedef curl_socket_t -(*curl_opensocket_callback)(void *clientp, - curlsocktype purpose, - struct curl_sockaddr *address); - -#ifndef CURL_NO_OLDIES - /* not used since 7.10.8, will be removed in a future release */ -typedef int (*curl_passwd_callback)(void *clientp, - const char *prompt, - char *buffer, - int buflen); -#endif - -typedef enum { - CURLIOE_OK, /* I/O operation successful */ - CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ - CURLIOE_FAILRESTART, /* failed to restart the read */ - CURLIOE_LAST /* never use */ -} curlioerr; - -typedef enum { - CURLIOCMD_NOP, /* no operation */ - CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ - CURLIOCMD_LAST /* never use */ -} curliocmd; - -typedef curlioerr (*curl_ioctl_callback)(CURL *handle, - int cmd, - void *clientp); - -/* - * The following typedef's are signatures of malloc, free, realloc, strdup and - * calloc respectively. Function pointers of these types can be passed to the - * curl_global_init_mem() function to set user defined memory management - * callback routines. - */ -typedef void *(*curl_malloc_callback)(size_t size); -typedef void (*curl_free_callback)(void *ptr); -typedef void *(*curl_realloc_callback)(void *ptr, size_t size); -typedef char *(*curl_strdup_callback)(const char *str); -typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); - -/* the kind of data that is passed to information_callback*/ -typedef enum { - CURLINFO_TEXT = 0, - CURLINFO_HEADER_IN, /* 1 */ - CURLINFO_HEADER_OUT, /* 2 */ - CURLINFO_DATA_IN, /* 3 */ - CURLINFO_DATA_OUT, /* 4 */ - CURLINFO_SSL_DATA_IN, /* 5 */ - CURLINFO_SSL_DATA_OUT, /* 6 */ - CURLINFO_END -} curl_infotype; - -typedef int (*curl_debug_callback) - (CURL *handle, /* the handle/transfer this concerns */ - curl_infotype type, /* what kind of data */ - char *data, /* points to the data */ - size_t size, /* size of the data pointed to */ - void *userptr); /* whatever the user please */ - -/* All possible error codes from all sorts of curl functions. Future versions - may return other values, stay prepared. - - Always add new return codes last. Never *EVER* remove any. The return - codes must remain the same! - */ - -typedef enum { - CURLE_OK = 0, - CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ - CURLE_FAILED_INIT, /* 2 */ - CURLE_URL_MALFORMAT, /* 3 */ - CURLE_OBSOLETE4, /* 4 - NOT USED */ - CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ - CURLE_COULDNT_RESOLVE_HOST, /* 6 */ - CURLE_COULDNT_CONNECT, /* 7 */ - CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server - due to lack of access - when login fails - this is not returned. */ - CURLE_OBSOLETE10, /* 10 - NOT USED */ - CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_OBSOLETE12, /* 12 - NOT USED */ - CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ - CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ - CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_OBSOLETE16, /* 16 - NOT USED */ - CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ - CURLE_PARTIAL_FILE, /* 18 */ - CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_OBSOLETE20, /* 20 - NOT USED */ - CURLE_QUOTE_ERROR, /* 21 - quote command failure */ - CURLE_HTTP_RETURNED_ERROR, /* 22 */ - CURLE_WRITE_ERROR, /* 23 */ - CURLE_OBSOLETE24, /* 24 - NOT USED */ - CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ - CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ - CURLE_OUT_OF_MEMORY, /* 27 */ - /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error - instead of a memory allocation error if CURL_DOES_CONVERSIONS - is defined - */ - CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ - CURLE_OBSOLETE29, /* 29 - NOT USED */ - CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ - CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_OBSOLETE32, /* 32 - NOT USED */ - CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ - CURLE_HTTP_POST_ERROR, /* 34 */ - CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ - CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ - CURLE_FILE_COULDNT_READ_FILE, /* 37 */ - CURLE_LDAP_CANNOT_BIND, /* 38 */ - CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_OBSOLETE40, /* 40 - NOT USED */ - CURLE_FUNCTION_NOT_FOUND, /* 41 */ - CURLE_ABORTED_BY_CALLBACK, /* 42 */ - CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_OBSOLETE44, /* 44 - NOT USED */ - CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_OBSOLETE46, /* 46 - NOT USED */ - CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ - CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_OBSOLETE50, /* 50 - NOT USED */ - CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint - wasn't verified fine */ - CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ - CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ - CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as - default */ - CURLE_SEND_ERROR, /* 55 - failed sending network data */ - CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_OBSOLETE57, /* 57 - NOT IN USE */ - CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ - CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ - CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ - CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ - CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ - CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind - that failed */ - CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ - CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not - accepted and we failed to login */ - CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ - CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ - CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ - CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ - CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ - CURLE_CONV_FAILED, /* 75 - conversion failed */ - CURLE_CONV_REQD, /* 76 - caller must register conversion - callbacks using curl_easy_setopt options - CURLOPT_CONV_FROM_NETWORK_FUNCTION, - CURLOPT_CONV_TO_NETWORK_FUNCTION, and - CURLOPT_CONV_FROM_UTF8_FUNCTION */ - CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing - or wrong format */ - CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ - CURLE_SSH, /* 79 - error from the SSH layer, somewhat - generic so the error message will be of - interest when this has happened */ - - CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL - connection */ - CURLE_AGAIN, /* 81 - socket is not ready for send/recv, - wait till it's ready and try again (Added - in 7.18.2) */ - CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or - wrong format (Added in 7.19.0) */ - CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in - 7.19.0) */ - CURL_LAST /* never use! */ -} CURLcode; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ - -/* The following were added in 7.17.1 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION - -/* The following were added in 7.17.0 */ -/* These are scheduled to disappear by 2009 */ -#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ -#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 -#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 -#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 -#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 -#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 -#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 -#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 -#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 -#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 -#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 -#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 -#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 - -#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED -#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE -#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR -#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL -#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS -#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR -#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED - -/* The following were added earlier */ - -#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT - -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED - -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME - -/* This was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 - -#endif /*!CURL_NO_OLDIES*/ - -/* This prototype applies to all conversion callbacks */ -typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); - -typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ - void *ssl_ctx, /* actually an - OpenSSL SSL_CTX */ - void *userptr); - -typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use - CONNECT HTTP/1.1 */ - CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT - HTTP/1.0 */ - CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already - in 7.10 */ - CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ - CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ - CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the - host name rather than the IP address. added - in 7.18.0 */ -} curl_proxytype; /* this enum was added in 7.10 */ - -#define CURLAUTH_NONE 0 /* nothing */ -#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ -#define CURLAUTH_DIGEST (1<<1) /* Digest */ -#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ -#define CURLAUTH_NTLM (1<<3) /* NTLM */ -#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ -#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ -#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) - -#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ -#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ -#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ -#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ -#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ -#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ -#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY - -#define CURL_ERROR_SIZE 256 - -struct curl_khkey { - const char *key; /* points to a zero-terminated string encoded with base64 - if len is zero, otherwise to the "raw" data */ - size_t len; - enum type { - CURLKHTYPE_UNKNOWN, - CURLKHTYPE_RSA1, - CURLKHTYPE_RSA, - CURLKHTYPE_DSS - } keytype; -}; - -/* this is the set of return values expected from the curl_sshkeycallback - callback */ -enum curl_khstat { - CURLKHSTAT_FINE_ADD_TO_FILE, - CURLKHSTAT_FINE, - CURLKHSTAT_REJECT, /* reject the connection, return an error */ - CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so - this causes a CURLE_DEFER error but otherwise the - connection will be left intact etc */ - CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ -}; - -/* this is the set of status codes pass in to the callback */ -enum curl_khmatch { - CURLKHMATCH_OK, /* match */ - CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ - CURLKHMATCH_MISSING, /* no matching host/key found */ - CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ -}; - -typedef int - (*curl_sshkeycallback) (CURL *easy, /* easy handle */ - const struct curl_khkey *knownkey, /* known */ - const struct curl_khkey *foundkey, /* found */ - enum curl_khmatch, /* libcurl's view on the keys */ - void *clientp); /* custom pointer passed from app */ - -/* parameter for the CURLOPT_USE_SSL option */ -typedef enum { - CURLUSESSL_NONE, /* do not attempt to use SSL */ - CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ - CURLUSESSL_ALL, /* SSL for all communication or fail */ - CURLUSESSL_LAST /* not an option, never use */ -} curl_usessl; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2009 */ - -#define CURLFTPSSL_NONE CURLUSESSL_NONE -#define CURLFTPSSL_TRY CURLUSESSL_TRY -#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL -#define CURLFTPSSL_ALL CURLUSESSL_ALL -#define CURLFTPSSL_LAST CURLUSESSL_LAST -#define curl_ftpssl curl_usessl -#endif /*!CURL_NO_OLDIES*/ - -/* parameter for the CURLOPT_FTP_SSL_CCC option */ -typedef enum { - CURLFTPSSL_CCC_NONE, /* do not send CCC */ - CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ - CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ - CURLFTPSSL_CCC_LAST /* not an option, never use */ -} curl_ftpccc; - -/* parameter for the CURLOPT_FTPSSLAUTH option */ -typedef enum { - CURLFTPAUTH_DEFAULT, /* let libcurl decide */ - CURLFTPAUTH_SSL, /* use "AUTH SSL" */ - CURLFTPAUTH_TLS, /* use "AUTH TLS" */ - CURLFTPAUTH_LAST /* not an option, never use */ -} curl_ftpauth; - -/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ -typedef enum { - CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ - CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD - again if MKD succeeded, for SFTP this does - similar magic */ - CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD - again even if MKD failed! */ - CURLFTP_CREATE_DIR_LAST /* not an option, never use */ -} curl_ftpcreatedir; - -/* parameter for the CURLOPT_FTP_FILEMETHOD option */ -typedef enum { - CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ - CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ - CURLFTPMETHOD_NOCWD, /* no CWD at all */ - CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ - CURLFTPMETHOD_LAST /* not an option, never use */ -} curl_ftpmethod; - -/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ -#define CURLPROTO_HTTP (1<<0) -#define CURLPROTO_HTTPS (1<<1) -#define CURLPROTO_FTP (1<<2) -#define CURLPROTO_FTPS (1<<3) -#define CURLPROTO_SCP (1<<4) -#define CURLPROTO_SFTP (1<<5) -#define CURLPROTO_TELNET (1<<6) -#define CURLPROTO_LDAP (1<<7) -#define CURLPROTO_LDAPS (1<<8) -#define CURLPROTO_DICT (1<<9) -#define CURLPROTO_FILE (1<<10) -#define CURLPROTO_TFTP (1<<11) -#define CURLPROTO_ALL (~0) /* enable everything */ - -/* long may be 32 or 64 bits, but we should never depend on anything else - but 32 */ -#define CURLOPTTYPE_LONG 0 -#define CURLOPTTYPE_OBJECTPOINT 10000 -#define CURLOPTTYPE_FUNCTIONPOINT 20000 -#define CURLOPTTYPE_OFF_T 30000 - -/* name is uppercase CURLOPT_, - type is one of the defined CURLOPTTYPE_ - number is unique identifier */ -#ifdef CINIT -#undef CINIT -#endif - -#ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLOPT_/**/name = type + number -#endif - -/* - * This macro-mania below setups the CURLOPT_[what] enum, to be used with - * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] - * word. - */ - -typedef enum { - /* This is the FILE * or void * the regular output should be written to. */ - CINIT(FILE, OBJECTPOINT, 1), - - /* The full URL to get/put */ - CINIT(URL, OBJECTPOINT, 2), - - /* Port number to connect to, if other than default. */ - CINIT(PORT, LONG, 3), - - /* Name of proxy to use. */ - CINIT(PROXY, OBJECTPOINT, 4), - - /* "name:password" to use when fetching. */ - CINIT(USERPWD, OBJECTPOINT, 5), - - /* "name:password" to use with proxy. */ - CINIT(PROXYUSERPWD, OBJECTPOINT, 6), - - /* Range to get, specified as an ASCII string. */ - CINIT(RANGE, OBJECTPOINT, 7), - - /* not used */ - - /* Specified file stream to upload from (use as input): */ - CINIT(INFILE, OBJECTPOINT, 9), - - /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE - * bytes big. If this is not used, error messages go to stderr instead: */ - CINIT(ERRORBUFFER, OBJECTPOINT, 10), - - /* Function that will be called to store the output (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), - - /* Function that will be called to read the input (instead of fread). The - * parameters will use fread() syntax, make sure to follow them. */ - CINIT(READFUNCTION, FUNCTIONPOINT, 12), - - /* Time-out the read operation after this amount of seconds */ - CINIT(TIMEOUT, LONG, 13), - - /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about - * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was successful. -1 means - * unknown size. - * - * For large file support, there is also a _LARGE version of the key - * which takes an off_t type, allowing platforms with larger off_t - * sizes to handle larger files. See below for INFILESIZE_LARGE. - */ - CINIT(INFILESIZE, LONG, 14), - - /* POST static input fields. */ - CINIT(POSTFIELDS, OBJECTPOINT, 15), - - /* Set the referrer page (needed by some CGIs) */ - CINIT(REFERER, OBJECTPOINT, 16), - - /* Set the FTP PORT string (interface name, named or numerical IP address) - Use i.e '-' to use default address. */ - CINIT(FTPPORT, OBJECTPOINT, 17), - - /* Set the User-Agent string (examined by some CGIs) */ - CINIT(USERAGENT, OBJECTPOINT, 18), - - /* If the download receives less than "low speed limit" bytes/second - * during "low speed time" seconds, the operations is aborted. - * You could i.e if you have a pretty high speed connection, abort if - * it is less than 2000 bytes/sec during 20 seconds. - */ - - /* Set the "low speed limit" */ - CINIT(LOW_SPEED_LIMIT, LONG, 19), - - /* Set the "low speed time" */ - CINIT(LOW_SPEED_TIME, LONG, 20), - - /* Set the continuation offset. - * - * Note there is also a _LARGE version of this key which uses - * off_t types, allowing for large file offsets on platforms which - * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. - */ - CINIT(RESUME_FROM, LONG, 21), - - /* Set cookie in request: */ - CINIT(COOKIE, OBJECTPOINT, 22), - - /* This points to a linked list of headers, struct curl_slist kind */ - CINIT(HTTPHEADER, OBJECTPOINT, 23), - - /* This points to a linked list of post entries, struct curl_httppost */ - CINIT(HTTPPOST, OBJECTPOINT, 24), - - /* name of the file keeping your private SSL-certificate */ - CINIT(SSLCERT, OBJECTPOINT, 25), - - /* password for the SSL or SSH private key */ - CINIT(KEYPASSWD, OBJECTPOINT, 26), - - /* send TYPE parameter? */ - CINIT(CRLF, LONG, 27), - - /* send linked-list of QUOTE commands */ - CINIT(QUOTE, OBJECTPOINT, 28), - - /* send FILE * or void * to store headers to, if you use a callback it - is simply passed to the callback unmodified */ - CINIT(WRITEHEADER, OBJECTPOINT, 29), - - /* point to a file to read the initial cookies from, also enables - "cookie awareness" */ - CINIT(COOKIEFILE, OBJECTPOINT, 31), - - /* What version to specifically try to use. - See CURL_SSLVERSION defines below. */ - CINIT(SSLVERSION, LONG, 32), - - /* What kind of HTTP time condition to use, see defines */ - CINIT(TIMECONDITION, LONG, 33), - - /* Time to use with the above condition. Specified in number of seconds - since 1 Jan 1970 */ - CINIT(TIMEVALUE, LONG, 34), - - /* 35 = OBSOLETE */ - - /* Custom request, for customizing the get command like - HTTP: DELETE, TRACE and others - FTP: to use a different list command - */ - CINIT(CUSTOMREQUEST, OBJECTPOINT, 36), - - /* HTTP request, for odd commands like DELETE, TRACE and others */ - CINIT(STDERR, OBJECTPOINT, 37), - - /* 38 is not used */ - - /* send linked-list of post-transfer QUOTE commands */ - CINIT(POSTQUOTE, OBJECTPOINT, 39), - - /* Pass a pointer to string of the output using full variable-replacement - as described elsewhere. */ - CINIT(WRITEINFO, OBJECTPOINT, 40), - - CINIT(VERBOSE, LONG, 41), /* talk a lot */ - CINIT(HEADER, LONG, 42), /* throw the header out too */ - CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ - CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ - CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ - CINIT(UPLOAD, LONG, 46), /* this is an upload */ - CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ - - CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ - - /* Specify whether to read the user+password from the .netrc or the URL. - * This must be one of the CURL_NETRC_* enums below. */ - CINIT(NETRC, LONG, 51), - - CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ - - CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ - CINIT(PUT, LONG, 54), /* HTTP PUT */ - - /* 55 = OBSOLETE */ - - /* Function that will be called instead of the internal progress display - * function. This function should be defined as the curl_progress_callback - * prototype defines. */ - CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), - - /* Data passed to the progress callback */ - CINIT(PROGRESSDATA, OBJECTPOINT, 57), - - /* We want the referrer field set automatically when following locations */ - CINIT(AUTOREFERER, LONG, 58), - - /* Port of the proxy, can be set in the proxy string as well with: - "[host]:[port]" */ - CINIT(PROXYPORT, LONG, 59), - - /* size of the POST input data, if strlen() is not good to use */ - CINIT(POSTFIELDSIZE, LONG, 60), - - /* tunnel non-http operations through a HTTP proxy */ - CINIT(HTTPPROXYTUNNEL, LONG, 61), - - /* Set the interface string to use as outgoing network interface */ - CINIT(INTERFACE, OBJECTPOINT, 62), - - /* Set the krb4/5 security level, this also enables krb4/5 awareness. This - * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string - * is set but doesn't match one of these, 'private' will be used. */ - CINIT(KRBLEVEL, OBJECTPOINT, 63), - - /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ - CINIT(SSL_VERIFYPEER, LONG, 64), - - /* The CApath or CAfile used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAINFO, OBJECTPOINT, 65), - - /* 66 = OBSOLETE */ - /* 67 = OBSOLETE */ - - /* Maximum number of http redirects to follow */ - CINIT(MAXREDIRS, LONG, 68), - - /* Pass a long set to 1 to get the date of the requested document (if - possible)! Pass a zero to shut it off. */ - CINIT(FILETIME, LONG, 69), - - /* This points to a linked list of telnet options */ - CINIT(TELNETOPTIONS, OBJECTPOINT, 70), - - /* Max amount of cached alive connections */ - CINIT(MAXCONNECTS, LONG, 71), - - /* What policy to use when closing connections when the cache is filled - up */ - CINIT(CLOSEPOLICY, LONG, 72), - - /* 73 = OBSOLETE */ - - /* Set to explicitly use a new connection for the upcoming transfer. - Do not use this unless you're absolutely sure of this, as it makes the - operation slower and is less friendly for the network. */ - CINIT(FRESH_CONNECT, LONG, 74), - - /* Set to explicitly forbid the upcoming transfer's connection to be re-used - when done. Do not use this unless you're absolutely sure of this, as it - makes the operation slower and is less friendly for the network. */ - CINIT(FORBID_REUSE, LONG, 75), - - /* Set to a file name that contains random data for libcurl to use to - seed the random engine when doing SSL connects. */ - CINIT(RANDOM_FILE, OBJECTPOINT, 76), - - /* Set to the Entropy Gathering Daemon socket pathname */ - CINIT(EGDSOCKET, OBJECTPOINT, 77), - - /* Time-out connect operations after this amount of seconds, if connects - are OK within this time, then fine... This only aborts the connect - phase. [Only works on unix-style/SIGALRM operating systems] */ - CINIT(CONNECTTIMEOUT, LONG, 78), - - /* Function that will be called to store headers (instead of fwrite). The - * parameters will use fwrite() syntax, make sure to follow them. */ - CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), - - /* Set this to force the HTTP request to get back to GET. Only really usable - if POST, PUT or a custom request have been used first. - */ - CINIT(HTTPGET, LONG, 80), - - /* Set if we should verify the Common name from the peer certificate in ssl - * handshake, set 1 to check existence, 2 to ensure that it matches the - * provided hostname. */ - CINIT(SSL_VERIFYHOST, LONG, 81), - - /* Specify which file name to write all known cookies in after completed - operation. Set file name to "-" (dash) to make it go to stdout. */ - CINIT(COOKIEJAR, OBJECTPOINT, 82), - - /* Specify which SSL ciphers to use */ - CINIT(SSL_CIPHER_LIST, OBJECTPOINT, 83), - - /* Specify which HTTP version to use! This must be set to one of the - CURL_HTTP_VERSION* enums set below. */ - CINIT(HTTP_VERSION, LONG, 84), - - /* Specifically switch on or off the FTP engine's use of the EPSV command. By - default, that one will always be attempted before the more traditional - PASV command. */ - CINIT(FTP_USE_EPSV, LONG, 85), - - /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ - CINIT(SSLCERTTYPE, OBJECTPOINT, 86), - - /* name of the file keeping your private SSL-key */ - CINIT(SSLKEY, OBJECTPOINT, 87), - - /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ - CINIT(SSLKEYTYPE, OBJECTPOINT, 88), - - /* crypto engine for the SSL-sub system */ - CINIT(SSLENGINE, OBJECTPOINT, 89), - - /* set the crypto engine for the SSL-sub system as default - the param has no meaning... - */ - CINIT(SSLENGINE_DEFAULT, LONG, 90), - - /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ - - /* DNS cache timeout */ - CINIT(DNS_CACHE_TIMEOUT, LONG, 92), - - /* send linked-list of pre-transfer QUOTE commands */ - CINIT(PREQUOTE, OBJECTPOINT, 93), - - /* set the debug function */ - CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), - - /* set the data for the debug function */ - CINIT(DEBUGDATA, OBJECTPOINT, 95), - - /* mark this as start of a cookie session */ - CINIT(COOKIESESSION, LONG, 96), - - /* The CApath directory used to validate the peer certificate - this option is used only if SSL_VERIFYPEER is true */ - CINIT(CAPATH, OBJECTPOINT, 97), - - /* Instruct libcurl to use a smaller receive buffer */ - CINIT(BUFFERSIZE, LONG, 98), - - /* Instruct libcurl to not use any signal/alarm handlers, even when using - timeouts. This option is useful for multi-threaded applications. - See libcurl-the-guide for more background information. */ - CINIT(NOSIGNAL, LONG, 99), - - /* Provide a CURLShare for mutexing non-ts data */ - CINIT(SHARE, OBJECTPOINT, 100), - - /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ - CINIT(PROXYTYPE, LONG, 101), - - /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. */ - CINIT(ENCODING, OBJECTPOINT, 102), - - /* Set pointer to private data */ - CINIT(PRIVATE, OBJECTPOINT, 103), - - /* Set aliases for HTTP 200 in the HTTP Response header */ - CINIT(HTTP200ALIASES, OBJECTPOINT, 104), - - /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentially send off the name - and password to whatever host the server decides. */ - CINIT(UNRESTRICTED_AUTH, LONG, 105), - - /* Specifically switch on or off the FTP engine's use of the EPRT command ( it - also disables the LPRT attempt). By default, those ones will always be - attempted before the good old traditional PORT command. */ - CINIT(FTP_USE_EPRT, LONG, 106), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_USERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(HTTPAUTH, LONG, 107), - - /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx - in second argument. The function must be matching the - curl_ssl_ctx_callback proto. */ - CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), - - /* Set the userdata for the ssl context callback function's third - argument */ - CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), - - /* FTP Option that causes missing dirs to be created on the remote server. - In 7.19.4 we introduced the convenience enums for this option using the - CURLFTP_CREATE_DIR prefix. - */ - CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), - - /* Set this to a bitmask value to enable the particular authentications - methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. - Note that setting multiple bits may cause extra network round-trips. */ - CINIT(PROXYAUTH, LONG, 111), - - /* FTP option that changes the timeout, in seconds, associated with - getting a response. This is different from transfer timeout time and - essentially places a demand on the FTP server to acknowledge commands - in a timely manner. */ - CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), - - /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to - tell libcurl to resolve names to those IP versions only. This only has - affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ - CINIT(IPRESOLVE, LONG, 113), - - /* Set this option to limit the size of a file that will be downloaded from - an HTTP or FTP server. - - Note there is also _LARGE version which adds large file support for - platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ - CINIT(MAXFILESIZE, LONG, 114), - - /* See the comment for INFILESIZE above, but in short, specifies - * the size of the file being uploaded. -1 means unknown. - */ - CINIT(INFILESIZE_LARGE, OFF_T, 115), - - /* Sets the continuation offset. There is also a LONG version of this; - * look above for RESUME_FROM. - */ - CINIT(RESUME_FROM_LARGE, OFF_T, 116), - - /* Sets the maximum size of data that will be downloaded from - * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. - */ - CINIT(MAXFILESIZE_LARGE, OFF_T, 117), - - /* Set this option to the file name of your .netrc file you want libcurl - to parse (using the CURLOPT_NETRC option). If not set, libcurl will do - a poor attempt to find the user's home directory and check for a .netrc - file in there. */ - CINIT(NETRC_FILE, OBJECTPOINT, 118), - - /* Enable SSL/TLS for FTP, pick one of: - CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise - CURLFTPSSL_CONTROL - SSL for the control connection or fail - CURLFTPSSL_ALL - SSL for all communication or fail - */ - CINIT(USE_SSL, LONG, 119), - - /* The _LARGE version of the standard POSTFIELDSIZE option */ - CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), - - /* Enable/disable the TCP Nagle algorithm */ - CINIT(TCP_NODELAY, LONG, 121), - - /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 123 OBSOLETE. Gone in 7.16.0 */ - /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - /* 127 OBSOLETE. Gone in 7.16.0 */ - /* 128 OBSOLETE. Gone in 7.16.0 */ - - /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option - can be used to change libcurl's default action which is to first try - "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK - response has been received. - - Available parameters are: - CURLFTPAUTH_DEFAULT - let libcurl decide - CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS - CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL - */ - CINIT(FTPSSLAUTH, LONG, 129), - - CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), - CINIT(IOCTLDATA, OBJECTPOINT, 131), - - /* 132 OBSOLETE. Gone in 7.16.0 */ - /* 133 OBSOLETE. Gone in 7.16.0 */ - - /* zero terminated string for pass on to the FTP server when asked for - "account" info */ - CINIT(FTP_ACCOUNT, OBJECTPOINT, 134), - - /* feed cookies into cookie engine */ - CINIT(COOKIELIST, OBJECTPOINT, 135), - - /* ignore Content-Length */ - CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), - - /* Set to non-zero to skip the IP address received in a 227 PASV FTP server - response. Typically used for FTP-SSL purposes but is not restricted to - that. libcurl will then instead use the same IP address it used for the - control connection. */ - CINIT(FTP_SKIP_PASV_IP, LONG, 137), - - /* Select "file method" to use when doing FTP, see the curl_ftpmethod - above. */ - CINIT(FTP_FILEMETHOD, LONG, 138), - - /* Local port number to bind the socket to */ - CINIT(LOCALPORT, LONG, 139), - - /* Number of ports to try, including the first one set with LOCALPORT. - Thus, setting it to 1 will make no additional attempts but the first. - */ - CINIT(LOCALPORTRANGE, LONG, 140), - - /* no transfer, set up connection and let application use the socket by - extracting it with CURLINFO_LASTSOCKET */ - CINIT(CONNECT_ONLY, LONG, 141), - - /* Function that will be called to convert from the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), - - /* Function that will be called to convert to the - network encoding (instead of using the iconv calls in libcurl) */ - CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), - - /* Function that will be called to convert from UTF8 - (instead of using the iconv calls in libcurl) - Note that this is used only for SSL certificate processing */ - CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), - - /* if the connection proceeds too quickly then need to slow it down */ - /* limit-rate: maximum number of bytes per second to send or receive */ - CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), - CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), - - /* Pointer to command string to send if USER/PASS fails. */ - CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), - - /* callback function for setting socket options */ - CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), - CINIT(SOCKOPTDATA, OBJECTPOINT, 149), - - /* set to 0 to disable session ID re-use for this transfer, default is - enabled (== 1) */ - CINIT(SSL_SESSIONID_CACHE, LONG, 150), - - /* allowed SSH authentication methods */ - CINIT(SSH_AUTH_TYPES, LONG, 151), - - /* Used by scp/sftp to do public/private key authentication */ - CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), - CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), - - /* Send CCC (Clear Command Channel) after authentication */ - CINIT(FTP_SSL_CCC, LONG, 154), - - /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ - CINIT(TIMEOUT_MS, LONG, 155), - CINIT(CONNECTTIMEOUT_MS, LONG, 156), - - /* set to zero to disable the libcurl's decoding and thus pass the raw body - data to the application even when it is encoded/compressed */ - CINIT(HTTP_TRANSFER_DECODING, LONG, 157), - CINIT(HTTP_CONTENT_DECODING, LONG, 158), - - /* Permission used when creating new files and directories on the remote - server for protocols that support it, SFTP/SCP/FILE */ - CINIT(NEW_FILE_PERMS, LONG, 159), - CINIT(NEW_DIRECTORY_PERMS, LONG, 160), - - /* Set the behaviour of POST when redirecting. Values must be set to one - of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ - CINIT(POSTREDIR, LONG, 161), - - /* used by scp/sftp to verify the host's public key */ - CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), - - /* Callback function for opening socket (instead of socket(2)). Optionally, - callback is able change the address or refuse to connect returning - CURL_SOCKET_BAD. The callback should have type - curl_opensocket_callback */ - CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), - CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), - - /* POST volatile input fields. */ - CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), - - /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ - CINIT(PROXY_TRANSFER_MODE, LONG, 166), - - /* Callback function for seeking in the input stream */ - CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), - CINIT(SEEKDATA, OBJECTPOINT, 168), - - /* CRL file */ - CINIT(CRLFILE, OBJECTPOINT, 169), - - /* Issuer certificate */ - CINIT(ISSUERCERT, OBJECTPOINT, 170), - - /* (IPv6) Address scope */ - CINIT(ADDRESS_SCOPE, LONG, 171), - - /* Collect certificate chain info and allow it to get retrievable with - CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only - working with OpenSSL-powered builds. */ - CINIT(CERTINFO, LONG, 172), - - /* "name" and "pwd" to use when fetching. */ - CINIT(USERNAME, OBJECTPOINT, 173), - CINIT(PASSWORD, OBJECTPOINT, 174), - - /* "name" and "pwd" to use with Proxy when fetching. */ - CINIT(PROXYUSERNAME, OBJECTPOINT, 175), - CINIT(PROXYPASSWORD, OBJECTPOINT, 176), - - /* Comma separated list of hostnames defining no-proxy zones. These should - match both hostnames directly, and hostnames within a domain. For - example, local.com will match local.com and www.local.com, but NOT - notlocal.com or www.notlocal.com. For compatibility with other - implementations of this, .local.com will be considered to be the same as - local.com. A single * is the only valid wildcard, and effectively - disables the use of proxy. */ - CINIT(NOPROXY, OBJECTPOINT, 177), - - /* block size for TFTP transfers */ - CINIT(TFTP_BLKSIZE, LONG, 178), - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), - - /* Socks Service */ - CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), - - /* set the bitmask for the protocols that are allowed to be used for the - transfer, which thus helps the app which takes URLs from users or other - external inputs and want to restrict what protocol(s) to deal - with. Defaults to CURLPROTO_ALL. */ - CINIT(PROTOCOLS, LONG, 181), - - /* set the bitmask for the protocols that libcurl is allowed to follow to, - as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs - to be set in both bitmasks to be allowed to get redirected to. Defaults - to all protocols except FILE and SCP. */ - CINIT(REDIR_PROTOCOLS, LONG, 182), - - /* set the SSH knownhost file name to use */ - CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), - - /* set the SSH host key callback, must point to a curl_sshkeycallback - function */ - CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), - - /* set the SSH host key callback custom pointer */ - CINIT(SSH_KEYDATA, OBJECTPOINT, 185), - - CURLOPT_LASTENTRY /* the last unused */ -} CURLoption; - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ - -/* Backwards compatibility with older names */ -/* These are scheduled to disappear by 2011 */ - -/* This was added in version 7.19.1 */ -#define CURLOPT_POST301 CURLOPT_POSTREDIR - -/* These are scheduled to disappear by 2009 */ - -/* The following were added in 7.17.0 */ -#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_FTPAPPEND CURLOPT_APPEND -#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY -#define CURLOPT_FTP_SSL CURLOPT_USE_SSL - -/* The following were added earlier */ - -#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD -#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL - -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - - - /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host - name resolves addresses using more than one IP protocol version, this - option might be handy to force libcurl to use a specific IP version. */ -#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP - versions that your system allows */ -#define CURL_IPRESOLVE_V4 1 /* resolve to ipv4 addresses */ -#define CURL_IPRESOLVE_V6 2 /* resolve to ipv6 addresses */ - - /* three convenient "aliases" that follow the name scheme better */ -#define CURLOPT_WRITEDATA CURLOPT_FILE -#define CURLOPT_READDATA CURLOPT_INFILE -#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER - - /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ -enum { - CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd - like the library to choose the best possible - for us! */ - CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ - CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ - - CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ -}; - - /* These enums are for use with the CURLOPT_NETRC option. */ -enum CURL_NETRC_OPTION { - CURL_NETRC_IGNORED, /* The .netrc will never be read. - * This is the default. */ - CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred - * to one in the .netrc. */ - CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. - * Unless one is set programmatically, the .netrc - * will be queried. */ - CURL_NETRC_LAST -}; - -enum { - CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, - CURL_SSLVERSION_SSLv2, - CURL_SSLVERSION_SSLv3, - - CURL_SSLVERSION_LAST /* never use, keep last */ -}; - -/* symbols to use with CURLOPT_POSTREDIR. - CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that - CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ - -#define CURL_REDIR_GET_ALL 0 -#define CURL_REDIR_POST_301 1 -#define CURL_REDIR_POST_302 2 -#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) - -typedef enum { - CURL_TIMECOND_NONE, - - CURL_TIMECOND_IFMODSINCE, - CURL_TIMECOND_IFUNMODSINCE, - CURL_TIMECOND_LASTMOD, - - CURL_TIMECOND_LAST -} curl_TimeCond; - - -/* curl_strequal() and curl_strnequal() are subject for removal in a future - libcurl, see lib/README.curlx for details */ -CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); -CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); - -/* name is uppercase CURLFORM_ */ -#ifdef CFINIT -#undef CFINIT -#endif - -#ifdef CURL_ISOCPP -#define CFINIT(name) CURLFORM_ ## name -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define CFINIT(name) CURLFORM_/**/name -#endif - -typedef enum { - CFINIT(NOTHING), /********* the first one is unused ************/ - - /* */ - CFINIT(COPYNAME), - CFINIT(PTRNAME), - CFINIT(NAMELENGTH), - CFINIT(COPYCONTENTS), - CFINIT(PTRCONTENTS), - CFINIT(CONTENTSLENGTH), - CFINIT(FILECONTENT), - CFINIT(ARRAY), - CFINIT(OBSOLETE), - CFINIT(FILE), - - CFINIT(BUFFER), - CFINIT(BUFFERPTR), - CFINIT(BUFFERLENGTH), - - CFINIT(CONTENTTYPE), - CFINIT(CONTENTHEADER), - CFINIT(FILENAME), - CFINIT(END), - CFINIT(OBSOLETE2), - - CFINIT(STREAM), - - CURLFORM_LASTENTRY /* the last unused */ -} CURLformoption; - -#undef CFINIT /* done */ - -/* structure to be used as parameter for CURLFORM_ARRAY */ -struct curl_forms { - CURLformoption option; - const char *value; -}; - -/* use this for multipart formpost building */ -/* Returns code for curl_formadd() - * - * Returns: - * CURL_FORMADD_OK on success - * CURL_FORMADD_MEMORY if the FormInfo allocation fails - * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form - * CURL_FORMADD_NULL if a null pointer was given for a char - * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed - * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used - * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated - * CURL_FORMADD_MEMORY if some allocation for string copying failed. - * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array - * - ***************************************************************************/ -typedef enum { - CURL_FORMADD_OK, /* first, no error */ - - CURL_FORMADD_MEMORY, - CURL_FORMADD_OPTION_TWICE, - CURL_FORMADD_NULL, - CURL_FORMADD_UNKNOWN_OPTION, - CURL_FORMADD_INCOMPLETE, - CURL_FORMADD_ILLEGAL_ARRAY, - CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ - - CURL_FORMADD_LAST /* last */ -} CURLFORMcode; - -/* - * NAME curl_formadd() - * - * DESCRIPTION - * - * Pretty advanced function for building multi-part formposts. Each invoke - * adds one part that together construct a full post. Then use - * CURLOPT_HTTPPOST to send it off to libcurl. - */ -CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, - struct curl_httppost **last_post, - ...); - -/* - * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to - * curl_formget(). - * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on - * success. - */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); - -/* - * NAME curl_formget() - * - * DESCRIPTION - * - * Serialize a curl_httppost struct built with curl_formadd(). - * Accepts a void pointer as second argument which will be passed to - * the curl_formget_callback function. - * Returns 0 on success. - */ -CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, - curl_formget_callback append); -/* - * NAME curl_formfree() - * - * DESCRIPTION - * - * Free a multipart formpost previously built with curl_formadd(). - */ -CURL_EXTERN void curl_formfree(struct curl_httppost *form); - -/* - * NAME curl_getenv() - * - * DESCRIPTION - * - * Returns a malloc()'ed string that MUST be curl_free()ed after usage is - * complete. DEPRECATED - see lib/README.curlx - */ -CURL_EXTERN char *curl_getenv(const char *variable); - -/* - * NAME curl_version() - * - * DESCRIPTION - * - * Returns a static ascii string of the libcurl version. - */ -CURL_EXTERN char *curl_version(void); - -/* - * NAME curl_easy_escape() - * - * DESCRIPTION - * - * Escapes URL strings (converts all letters consider illegal in URLs to their - * %XX versions). This function returns a new allocated string or NULL if an - * error occurred. - */ -CURL_EXTERN char *curl_easy_escape(CURL *handle, - const char *string, - int length); - -/* the previous version: */ -CURL_EXTERN char *curl_escape(const char *string, - int length); - - -/* - * NAME curl_easy_unescape() - * - * DESCRIPTION - * - * Unescapes URL encoding in strings (converts all %XX codes to their 8bit - * versions). This function returns a new allocated string or NULL if an error - * occurred. - * Conversion Note: On non-ASCII platforms the ASCII %XX codes are - * converted into the host encoding. - */ -CURL_EXTERN char *curl_easy_unescape(CURL *handle, - const char *string, - int length, - int *outlength); - -/* the previous version */ -CURL_EXTERN char *curl_unescape(const char *string, - int length); - -/* - * NAME curl_free() - * - * DESCRIPTION - * - * Provided for de-allocation in the same translation unit that did the - * allocation. Added in libcurl 7.10 - */ -CURL_EXTERN void curl_free(void *p); - -/* - * NAME curl_global_init() - * - * DESCRIPTION - * - * curl_global_init() should be invoked exactly once for each application that - * uses libcurl and before any call of other libcurl functions. - * - * This function is not thread-safe! - */ -CURL_EXTERN CURLcode curl_global_init(long flags); - -/* - * NAME curl_global_init_mem() - * - * DESCRIPTION - * - * curl_global_init() or curl_global_init_mem() should be invoked exactly once - * for each application that uses libcurl. This function can be used to - * initialize libcurl and set user defined memory management callback - * functions. Users can implement memory management routines to check for - * memory leaks, check for mis-use of the curl library etc. User registered - * callback routines with be invoked by this library instead of the system - * memory management routines like malloc, free etc. - */ -CURL_EXTERN CURLcode curl_global_init_mem(long flags, - curl_malloc_callback m, - curl_free_callback f, - curl_realloc_callback r, - curl_strdup_callback s, - curl_calloc_callback c); - -/* - * NAME curl_global_cleanup() - * - * DESCRIPTION - * - * curl_global_cleanup() should be invoked exactly once for each application - * that uses libcurl - */ -CURL_EXTERN void curl_global_cleanup(void); - -/* linked-list structure for the CURLOPT_QUOTE option (and other) */ -struct curl_slist { - char *data; - struct curl_slist *next; -}; - -/* - * NAME curl_slist_append() - * - * DESCRIPTION - * - * Appends a string to a linked list. If no list exists, it will be created - * first. Returns the new list, after appending. - */ -CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, - const char *); - -/* - * NAME curl_slist_free_all() - * - * DESCRIPTION - * - * free a previously built curl_slist. - */ -CURL_EXTERN void curl_slist_free_all(struct curl_slist *); - -/* - * NAME curl_getdate() - * - * DESCRIPTION - * - * Returns the time, in seconds since 1 Jan 1970 of the time string given in - * the first argument. The time argument in the second parameter is unused - * and should be set to NULL. - */ -CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); - -/* info about the certificate chain, only for OpenSSL builds. Asked - for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ -struct curl_certinfo { - int num_of_certs; /* number of certificates with information */ - struct curl_slist **certinfo; /* for each index in this array, there's a - linked list with textual information in the - format "name: value" */ -}; - -#define CURLINFO_STRING 0x100000 -#define CURLINFO_LONG 0x200000 -#define CURLINFO_DOUBLE 0x300000 -#define CURLINFO_SLIST 0x400000 -#define CURLINFO_MASK 0x0fffff -#define CURLINFO_TYPEMASK 0xf00000 - -typedef enum { - CURLINFO_NONE, /* first, never use this */ - CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, - CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, - CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, - CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, - CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, - CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, - CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, - CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, - CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, - CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, - CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, - CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, - CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, - CURLINFO_FILETIME = CURLINFO_LONG + 14, - CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, - CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, - CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, - CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, - CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, - CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, - CURLINFO_PRIVATE = CURLINFO_STRING + 21, - CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, - CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, - CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, - CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, - CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, - CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, - CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, - CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, - CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, - CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, - CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, - CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, - CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, - /* Fill in new entries below here! */ - - CURLINFO_LASTONE = 35 -} CURLINFO; - -/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as - CURLINFO_HTTP_CODE */ -#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE - -typedef enum { - CURLCLOSEPOLICY_NONE, /* first, never use this */ - - CURLCLOSEPOLICY_OLDEST, - CURLCLOSEPOLICY_LEAST_RECENTLY_USED, - CURLCLOSEPOLICY_LEAST_TRAFFIC, - CURLCLOSEPOLICY_SLOWEST, - CURLCLOSEPOLICY_CALLBACK, - - CURLCLOSEPOLICY_LAST /* last, never use this */ -} curl_closepolicy; - -#define CURL_GLOBAL_SSL (1<<0) -#define CURL_GLOBAL_WIN32 (1<<1) -#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) -#define CURL_GLOBAL_NOTHING 0 -#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL - - -/***************************************************************************** - * Setup defines, protos etc for the sharing stuff. - */ - -/* Different data locks for a single share */ -typedef enum { - CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internally to say that - * the locking is just made to change the internal state of the share - * itself. - */ - CURL_LOCK_DATA_SHARE, - CURL_LOCK_DATA_COOKIE, - CURL_LOCK_DATA_DNS, - CURL_LOCK_DATA_SSL_SESSION, - CURL_LOCK_DATA_CONNECT, - CURL_LOCK_DATA_LAST -} curl_lock_data; - -/* Different lock access types */ -typedef enum { - CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ - CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ - CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ - CURL_LOCK_ACCESS_LAST /* never use */ -} curl_lock_access; - -typedef void (*curl_lock_function)(CURL *handle, - curl_lock_data data, - curl_lock_access locktype, - void *userptr); -typedef void (*curl_unlock_function)(CURL *handle, - curl_lock_data data, - void *userptr); - -typedef void CURLSH; - -typedef enum { - CURLSHE_OK, /* all is fine */ - CURLSHE_BAD_OPTION, /* 1 */ - CURLSHE_IN_USE, /* 2 */ - CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* out of memory */ - CURLSHE_LAST /* never use */ -} CURLSHcode; - -typedef enum { - CURLSHOPT_NONE, /* don't use */ - CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ - CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ - CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ - CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock - callback functions */ - CURLSHOPT_LAST /* never use */ -} CURLSHoption; - -CURL_EXTERN CURLSH *curl_share_init(void); -CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); -CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); - -/**************************************************************************** - * Structures for querying information about the curl library at runtime. - */ - -typedef enum { - CURLVERSION_FIRST, - CURLVERSION_SECOND, - CURLVERSION_THIRD, - CURLVERSION_FOURTH, - CURLVERSION_LAST /* never actually use this */ -} CURLversion; - -/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basically all programs ever that want to get version information. It is - meant to be a built-in version number for what kind of struct the caller - expects. If the struct ever changes, we redefine the NOW to another enum - from above. */ -#define CURLVERSION_NOW CURLVERSION_FOURTH - -typedef struct { - CURLversion age; /* age of the returned struct */ - const char *version; /* LIBCURL_VERSION */ - unsigned int version_num; /* LIBCURL_VERSION_NUM */ - const char *host; /* OS/host/cpu/machine when configured */ - int features; /* bitmask, see defines below */ - const char *ssl_version; /* human readable string */ - long ssl_version_num; /* not used anymore, always 0 */ - const char *libz_version; /* human readable string */ - /* protocols is terminated by an entry with a NULL protoname */ - const char * const *protocols; - - /* The fields below this were added in CURLVERSION_SECOND */ - const char *ares; - int ares_num; - - /* This field was added in CURLVERSION_THIRD */ - const char *libidn; - - /* These field were added in CURLVERSION_FOURTH */ - - /* Same as '_libiconv_version' if built with HAVE_ICONV */ - int iconv_ver_num; - - const char *libssh_version; /* human readable string */ - -} curl_version_info_data; - -#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ -#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */ -#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ -#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ -#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ -#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */ -#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */ -#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */ -#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */ -#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ -#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ -#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ -#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ -#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ - -/* - * NAME curl_version_info() - * - * DESCRIPTION - * - * This function returns a pointer to a static copy of the version info - * struct. See above. - */ -CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); - -/* - * NAME curl_easy_strerror() - * - * DESCRIPTION - * - * The curl_easy_strerror function may be used to turn a CURLcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_easy_strerror(CURLcode); - -/* - * NAME curl_share_strerror() - * - * DESCRIPTION - * - * The curl_share_strerror function may be used to turn a CURLSHcode value - * into the equivalent human readable error string. This is useful - * for printing meaningful error messages. - */ -CURL_EXTERN const char *curl_share_strerror(CURLSHcode); - -/* - * NAME curl_easy_pause() - * - * DESCRIPTION - * - * The curl_easy_pause function pauses or unpauses transfers. Select the new - * state by setting the bitmask, use the convenience defines below. - * - */ -CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); - -#define CURLPAUSE_RECV (1<<0) -#define CURLPAUSE_RECV_CONT (0) - -#define CURLPAUSE_SEND (1<<2) -#define CURLPAUSE_SEND_CONT (0) - -#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) -#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) - -#ifdef __cplusplus -} -#endif - -/* unfortunately, the easy.h and multi.h include files need options and info - stuff before they can be included! */ -#include "easy.h" /* nothing in curl is fun without the easy stuff */ -#include "multi.h" - -/* the typechecker doesn't work in C++ (yet) */ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ - !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) -#include "typecheck-gcc.h" -#else -#if defined(__STDC__) && (__STDC__ >= 1) -/* This preprocessor magic that replaces a call with the exact same call is - only done to make sure application authors pass exactly three arguments - to these functions. */ -#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) -#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) -#endif /* __STDC__ >= 1 */ -#endif /* gcc >= 4.3 && !__cplusplus */ - -#endif /* __CURL_CURL_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlbuild.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlbuild.h deleted file mode 100644 index bab11ac9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlbuild.h +++ /dev/null @@ -1,200 +0,0 @@ -/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ -#ifndef __CURL_CURLBUILD_H -#define __CURL_CURLBUILD_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: curlbuild.h.in,v 1.8 2009-04-29 15:15:38 yangtse Exp $ - ***************************************************************************/ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the libcurl development - * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ - * - * This header file shall only export symbols which are 'curl' or 'CURL' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file include/curl/curlbuild.h.in or - * at file include/curl/curlbuild.h, this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed include/curl/curlbuild.h file with one that - * is suitable and specific to the library being configured and built, which - * is generated from the include/curl/curlbuild.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined -#endif - -#ifdef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined -#endif - -#ifdef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined -#endif - -#ifdef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined -#endif - -#ifdef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CURL_PULL_WS2TCPIP_H */ -#ifdef CURL_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CURL_PULL_SYS_TYPES_H 1 -#ifdef CURL_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file stdint.h must be included by the external interface. */ -/* #undef CURL_PULL_STDINT_H */ -#ifdef CURL_PULL_STDINT_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file inttypes.h must be included by the external interface. */ -/* #undef CURL_PULL_INTTYPES_H */ -#ifdef CURL_PULL_INTTYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CURL_PULL_SYS_SOCKET_H 1 -#ifdef CURL_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#if defined(_M_X64) || defined(__x86_64__) -#define CURL_SIZEOF_LONG 8 -#else -#define CURL_SIZEOF_LONG 4 -#endif - -/* Integral data type used for curl_socklen_t. */ -#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t - -/* The size of `curl_socklen_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_SOCKLEN_T 4 - -/* Data type definition of curl_socklen_t. */ -typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; - -/* Signed integral data type used for curl_off_t. */ -#if defined(_M_X64) || defined(__x86_64__) -#define CURL_TYPEOF_CURL_OFF_T long -#else -#define CURL_TYPEOF_CURL_OFF_T int64_t -#endif - -/* Data type definition of curl_off_t. */ -typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; - -/* curl_off_t formatting string directive without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_T "ld" - -/* unsigned curl_off_t formatting string without "%" conversion specifier. */ -#define CURL_FORMAT_CURL_OFF_TU "lu" - -/* curl_off_t formatting string directive with "%" conversion specifier. */ -#define CURL_FORMAT_OFF_T "%ld" - -/* The size of `curl_off_t', as computed by sizeof. */ -#define CURL_SIZEOF_CURL_OFF_T 8 - -/* curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_T L - -/* unsigned curl_off_t constant suffix. */ -#define CURL_SUFFIX_CURL_OFF_TU UL - -#endif /* __CURL_CURLBUILD_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlrules.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlrules.h deleted file mode 100644 index abac4397..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlrules.h +++ /dev/null @@ -1,249 +0,0 @@ -#ifndef __CURL_CURLRULES_H -#define __CURL_CURLRULES_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: curlrules.h,v 1.7 2009-10-27 16:56:20 yangtse Exp $ - ***************************************************************************/ - -/* ================================================================ */ -/* COMPILE TIME SANITY CHECKS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * All checks done in this file are intentionally placed in a public - * header file which is pulled by curl/curl.h when an application is - * being built using an already built libcurl library. Additionally - * this file is also included and used when building the library. - * - * If compilation fails on this file it is certainly sure that the - * problem is elsewhere. It could be a problem in the curlbuild.h - * header file, or simply that you are using different compilation - * settings than those used to build the library. - * - * Nothing in this file is intended to be modified or adjusted by the - * curl library user nor by the curl library builder. - * - * Do not deactivate any check, these are done to make sure that the - * library is properly built and used. - * - * You can find further help on the libcurl development mailing list: - * http://cool.haxx.se/mailman/listinfo/curl-library/ - * - * NOTE 2 - * ------ - * - * Some of the following compile time checks are based on the fact - * that the dimension of a constant array can not be a negative one. - * In this way if the compile time verification fails, the compilation - * will fail issuing an error. The error description wording is compiler - * dependent but it will be quite similar to one of the following: - * - * "negative subscript or subscript is too large" - * "array must have at least one element" - * "-1 is an illegal array size" - * "size of array is negative" - * - * If you are building an application which tries to use an already - * built libcurl library and you are getting this kind of errors on - * this file, it is a clear indication that there is a mismatch between - * how the library was built and how you are trying to use it for your - * application. Your already compiled or binary library provider is the - * only one who can give you the details you need to properly use it. - */ - -/* - * Verify that some macros are actually defined. - */ - -#ifndef CURL_SIZEOF_LONG -# error "CURL_SIZEOF_LONG definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_SOCKLEN_T -# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_SOCKLEN_T -# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing -#endif - -#ifndef CURL_TYPEOF_CURL_OFF_T -# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_T -# error "CURL_FORMAT_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_FORMAT_CURL_OFF_TU -# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing -#endif - -#ifndef CURL_FORMAT_OFF_T -# error "CURL_FORMAT_OFF_T definition is missing!" - Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing -#endif - -#ifndef CURL_SIZEOF_CURL_OFF_T -# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_T -# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing -#endif - -#ifndef CURL_SUFFIX_CURL_OFF_TU -# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" - Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing -#endif - -/* - * Macros private to this header file. - */ - -#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 - -#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 - -/* - * Verify that the size previously defined and expected for long - * is the same as the one reported by sizeof() at compile time. - */ - -typedef char - __curl_rule_01__ - [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; - -/* - * Verify that the size previously defined and expected for - * curl_off_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_02__ - [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; - -/* - * Verify at compile time that the size of curl_off_t as reported - * by sizeof() is greater or equal than the one reported for long - * for the current compilation. - */ - -typedef char - __curl_rule_03__ - [CurlchkszGE(curl_off_t, long)]; - -/* - * Verify that the size previously defined and expected for - * curl_socklen_t is actually the the same as the one reported - * by sizeof() at compile time. - */ - -typedef char - __curl_rule_04__ - [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; - -/* - * Verify at compile time that the size of curl_socklen_t as reported - * by sizeof() is greater or equal than the one reported for int for - * the current compilation. - */ - -typedef char - __curl_rule_05__ - [CurlchkszGE(curl_socklen_t, int)]; - -/* ================================================================ */ -/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ -/* ================================================================ */ - -/* - * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow - * these to be visible and exported by the external libcurl interface API, - * while also making them visible to the library internals, simply including - * setup.h, without actually needing to include curl.h internally. - * If some day this section would grow big enough, all this should be moved - * to its own header file. - */ - -/* - * Figure out if we can use the ## preprocessor operator, which is supported - * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ - * or __cplusplus so we need to carefully check for them too. - */ - -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ - defined(__ILEC400__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif - -/* - * Macros for minimum-width signed and unsigned curl_off_t integer constants. - */ - -#ifdef CURL_ISOCPP -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix -#else -# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix -#endif -#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix) -#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T) -#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU) - -/* - * Get rid of macros private to this header file. - */ - -#undef CurlchkszEQ -#undef CurlchkszGE - -/* - * Get rid of macros not intended to exist beyond this point. - */ - -#undef CURL_PULL_WS2TCPIP_H -#undef CURL_PULL_SYS_TYPES_H -#undef CURL_PULL_SYS_SOCKET_H -#undef CURL_PULL_STDINT_H -#undef CURL_PULL_INTTYPES_H - -#undef CURL_TYPEOF_CURL_SOCKLEN_T -#undef CURL_TYPEOF_CURL_OFF_T - -#endif /* __CURL_CURLRULES_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlver.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlver.h deleted file mode 100644 index afa85c15..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/curlver.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef __CURL_CURLVER_H -#define __CURL_CURLVER_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: curlver.h,v 1.48 2009-08-12 11:24:52 bagder Exp $ - ***************************************************************************/ - -/* This header file contains nothing but libcurl version info, generated by - a script at release-time. This was made its own header file in 7.11.2 */ - -/* This is the global package copyright */ -#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, ." - -/* This is the version number of the libcurl package from which this header - file origins: */ -#define LIBCURL_VERSION "7.19.7" - -/* The numeric version number is also available "in parts" by using these - defines: */ -#define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 19 -#define LIBCURL_VERSION_PATCH 7 - -/* This is the numeric version of the libcurl version number, meant for easier - parsing and comparions by programs. The LIBCURL_VERSION_NUM define will - always follow this syntax: - - 0xXXYYZZ - - Where XX, YY and ZZ are the main version, release and patch numbers in - hexadecimal (using 8 bits each). All three numbers are always represented - using two digits. 1.2 would appear as "0x010200" while version 9.11.7 - appears as "0x090b07". - - This 6-digit (24 bits) hexadecimal number does not show pre-release number, - and it is always a greater number in a more recent release. It makes - comparisons with greater than and less than work. -*/ -#define LIBCURL_VERSION_NUM 0x071307 - -/* - * This is the date and time when the full source package was created. The - * timestamp is not stored in CVS, as the timestamp is properly set in the - * tarballs by the maketgz script. - * - * The format of the date should follow this template: - * - * "Mon Feb 12 11:35:33 UTC 2007" - */ -#define LIBCURL_TIMESTAMP "Wed Nov 4 12:34:59 UTC 2009" - -#endif /* __CURL_CURLVER_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/easy.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/easy.h deleted file mode 100644 index 40449c3e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/easy.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef __CURL_EASY_H -#define __CURL_EASY_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: easy.h,v 1.14 2008-05-12 21:43:28 bagder Exp $ - ***************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN CURL *curl_easy_init(void); -CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); -CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); -CURL_EXTERN void curl_easy_cleanup(CURL *curl); - -/* - * NAME curl_easy_getinfo() - * - * DESCRIPTION - * - * Request internal information from the curl session with this function. The - * third argument MUST be a pointer to a long, a pointer to a char * or a - * pointer to a double (as the documentation describes elsewhere). The data - * pointed to will be filled in accordingly and can be relied upon only if the - * function returns CURLE_OK. This function is intended to get used *AFTER* a - * performed transfer, all results from this function are undefined until the - * transfer is completed. - */ -CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); - - -/* - * NAME curl_easy_duphandle() - * - * DESCRIPTION - * - * Creates a new curl session handle with the same options set for the handle - * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistant connections cannot - * be transfered. It is useful in multithreaded applications when you can run - * curl_easy_duphandle() for each new thread to avoid a series of identical - * curl_easy_setopt() invokes in every thread. - */ -CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); - -/* - * NAME curl_easy_reset() - * - * DESCRIPTION - * - * Re-initializes a CURL handle to the default values. This puts back the - * handle to the same state as it was in when it was just created. - * - * It does keep: live connections, the Session ID cache, the DNS cache and the - * cookies. - */ -CURL_EXTERN void curl_easy_reset(CURL *curl); - -/* - * NAME curl_easy_recv() - * - * DESCRIPTION - * - * Receives data from the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, - size_t *n); - -/* - * NAME curl_easy_send() - * - * DESCRIPTION - * - * Sends data over the connected socket. Use after successful - * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. - */ -CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, - size_t buflen, size_t *n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/mprintf.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/mprintf.h deleted file mode 100644 index d7202de1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/mprintf.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __CURL_MPRINTF_H -#define __CURL_MPRINTF_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: mprintf.h,v 1.16 2008-05-20 10:21:50 patrickm Exp $ - ***************************************************************************/ - -#include -#include /* needed for FILE */ - -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -CURL_EXTERN int curl_mprintf(const char *format, ...); -CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); -CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, - const char *format, ...); -CURL_EXTERN int curl_mvprintf(const char *format, va_list args); -CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); -CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, - const char *format, va_list args); -CURL_EXTERN char *curl_maprintf(const char *format, ...); -CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); - -#ifdef _MPRINTF_REPLACE -# undef printf -# undef fprintf -# undef sprintf -# undef vsprintf -# undef snprintf -# undef vprintf -# undef vfprintf -# undef vsnprintf -# undef aprintf -# undef vaprintf -# define printf curl_mprintf -# define fprintf curl_mfprintf -#ifdef CURLDEBUG -/* When built with CURLDEBUG we define away the sprintf() functions since we - don't want internal code to be using them */ -# define sprintf sprintf_was_used -# define vsprintf vsprintf_was_used -#else -# define sprintf curl_msprintf -# define vsprintf curl_mvsprintf -#endif -# define snprintf curl_msnprintf -# define vprintf curl_mvprintf -# define vfprintf curl_mvfprintf -# define vsnprintf curl_mvsnprintf -# define aprintf curl_maprintf -# define vaprintf curl_mvaprintf -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __CURL_MPRINTF_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/multi.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/multi.h deleted file mode 100644 index 153f7721..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/multi.h +++ /dev/null @@ -1,346 +0,0 @@ -#ifndef __CURL_MULTI_H -#define __CURL_MULTI_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: multi.h,v 1.45 2008-05-20 10:21:50 patrickm Exp $ - ***************************************************************************/ -/* - This is an "external" header file. Don't give away any internals here! - - GOALS - - o Enable a "pull" interface. The application that uses libcurl decides where - and when to ask libcurl to get/send data. - - o Enable multiple simultaneous transfers in the same thread without making it - complicated for the application. - - o Enable the application to select() on its own file descriptors and curl's - file descriptors simultaneous easily. - -*/ - -/* - * This header file should not really need to include "curl.h" since curl.h - * itself includes this file and we expect user applications to do #include - * without the need for especially including multi.h. - * - * For some reason we added this include here at one point, and rather than to - * break existing (wrongly written) libcurl applications, we leave it as-is - * but with this warning attached. - */ -#include "curl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void CURLM; - -typedef enum { - CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or - curl_multi_socket*() soon */ - CURLM_OK, - CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ - CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ - CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ - CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ - CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ - CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ - CURLM_LAST -} CURLMcode; - -/* just to make code nicer when using curl_multi_socket() you can now check - for CURLM_CALL_MULTI_SOCKET too in the same style it works for - curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ -#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM - -typedef enum { - CURLMSG_NONE, /* first, not used */ - CURLMSG_DONE, /* This easy handle has completed. 'result' contains - the CURLcode of the transfer */ - CURLMSG_LAST /* last, not used */ -} CURLMSG; - -struct CURLMsg { - CURLMSG msg; /* what this message means */ - CURL *easy_handle; /* the handle it concerns */ - union { - void *whatever; /* message-specific data */ - CURLcode result; /* return code for transfer */ - } data; -}; -typedef struct CURLMsg CURLMsg; - -/* - * Name: curl_multi_init() - * - * Desc: inititalize multi-style curl usage - * - * Returns: a new CURLM handle to use in all 'curl_multi' functions. - */ -CURL_EXTERN CURLM *curl_multi_init(void); - -/* - * Name: curl_multi_add_handle() - * - * Desc: add a standard curl handle to the multi stack - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_remove_handle() - * - * Desc: removes a curl handle from the multi stack again - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, - CURL *curl_handle); - - /* - * Name: curl_multi_fdset() - * - * Desc: Ask curl for its fd_set sets. The app can use these to select() or - * poll() on. We want curl_multi_perform() called as soon as one of - * them are ready. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, - fd_set *read_fd_set, - fd_set *write_fd_set, - fd_set *exc_fd_set, - int *max_fd); - - /* - * Name: curl_multi_perform() - * - * Desc: When the app thinks there's data available for curl it calls this - * function to read/write whatever there is right now. This returns - * as soon as the reads and writes are done. This function does not - * require that there actually is data available for reading or that - * data can be written, it can be called just in case. It returns - * the number of handles that still transfer data in the second - * argument's integer-pointer. - * - * Returns: CURLMcode type, general multi error code. *NOTE* that this only - * returns errors etc regarding the whole multi stack. There might - * still have occurred problems on invidual transfers even when this - * returns OK. - */ -CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, - int *running_handles); - - /* - * Name: curl_multi_cleanup() - * - * Desc: Cleans up and removes a whole multi stack. It does not free or - * touch any individual easy handles in any way. We need to define - * in what state those handles will be if this function is called - * in the middle of a transfer. - * - * Returns: CURLMcode type, general multi error code. - */ -CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); - -/* - * Name: curl_multi_info_read() - * - * Desc: Ask the multi handle if there's any messages/informationals from - * the individual transfers. Messages include informationals such as - * error code from the transfer or just the fact that a transfer is - * completed. More details on these should be written down as well. - * - * Repeated calls to this function will return a new struct each - * time, until a special "end of msgs" struct is returned as a signal - * that there is no more to get at this point. - * - * The data the returned pointer points to will not survive calling - * curl_multi_cleanup(). - * - * The 'CURLMsg' struct is meant to be very simple and only contain - * very basic informations. If more involved information is wanted, - * we will provide the particular "transfer handle" in that struct - * and that should/could/would be used in subsequent - * curl_easy_getinfo() calls (or similar). The point being that we - * must never expose complex structs to applications, as then we'll - * undoubtably get backwards compatibility problems in the future. - * - * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out - * of structs. It also writes the number of messages left in the - * queue (after this read) in the integer the second argument points - * to. - */ -CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, - int *msgs_in_queue); - -/* - * Name: curl_multi_strerror() - * - * Desc: The curl_multi_strerror function may be used to turn a CURLMcode - * value into the equivalent human readable error string. This is - * useful for printing meaningful error messages. - * - * Returns: A pointer to a zero-terminated error message. - */ -CURL_EXTERN const char *curl_multi_strerror(CURLMcode); - -/* - * Name: curl_multi_socket() and - * curl_multi_socket_all() - * - * Desc: An alternative version of curl_multi_perform() that allows the - * application to pass in one of the file descriptors that have been - * detected to have "action" on them and let libcurl perform. - * See man page for details. - */ -#define CURL_POLL_NONE 0 -#define CURL_POLL_IN 1 -#define CURL_POLL_OUT 2 -#define CURL_POLL_INOUT 3 -#define CURL_POLL_REMOVE 4 - -#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD - -#define CURL_CSELECT_IN 0x01 -#define CURL_CSELECT_OUT 0x02 -#define CURL_CSELECT_ERR 0x04 - -typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ - curl_socket_t s, /* socket */ - int what, /* see above */ - void *userp, /* private callback - pointer */ - void *socketp); /* private socket - pointer */ -/* - * Name: curl_multi_timer_callback - * - * Desc: Called by libcurl whenever the library detects a change in the - * maximum number of milliseconds the app is allowed to wait before - * curl_multi_socket() or curl_multi_perform() must be called - * (to allow libcurl's timed events to take place). - * - * Returns: The callback should return zero. - */ -typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ - long timeout_ms, /* see above */ - void *userp); /* private callback - pointer */ - -CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t s, - int ev_bitmask, - int *running_handles); - -CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, - int *running_handles); - -#ifndef CURL_ALLOW_OLD_MULTI_SOCKET -/* This macro below was added in 7.16.3 to push users who recompile to use - the new curl_multi_socket_action() instead of the old curl_multi_socket() -*/ -#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) -#endif - -/* - * Name: curl_multi_timeout() - * - * Desc: Returns the maximum number of milliseconds the app is allowed to - * wait before curl_multi_socket() or curl_multi_perform() must be - * called (to allow libcurl's timed events to take place). - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, - long *milliseconds); - -#undef CINIT /* re-using the same name as in curl.h */ - -#ifdef CURL_ISOCPP -#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num -#else -/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ -#define LONG CURLOPTTYPE_LONG -#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT -#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT -#define OFF_T CURLOPTTYPE_OFF_T -#define CINIT(name,type,number) CURLMOPT_/**/name = type + number -#endif - -typedef enum { - /* This is the socket callback function pointer */ - CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), - - /* This is the argument passed to the socket callback */ - CINIT(SOCKETDATA, OBJECTPOINT, 2), - - /* set to 1 to enable pipelining for this multi handle */ - CINIT(PIPELINING, LONG, 3), - - /* This is the timer callback function pointer */ - CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), - - /* This is the argument passed to the timer callback */ - CINIT(TIMERDATA, OBJECTPOINT, 5), - - /* maximum number of entries in the connection cache */ - CINIT(MAXCONNECTS, LONG, 6), - - CURLMOPT_LASTENTRY /* the last unused */ -} CURLMoption; - - -/* - * Name: curl_multi_setopt() - * - * Desc: Sets options for the multi handle. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, - CURLMoption option, ...); - - -/* - * Name: curl_multi_assign() - * - * Desc: This function sets an association in the multi handle between the - * given socket and a private pointer of the application. This is - * (only) useful for curl_multi_socket uses. - * - * Returns: CURLM error code. - */ -CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, - curl_socket_t sockfd, void *sockp); - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/stdcheaders.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/stdcheaders.h deleted file mode 100644 index f739d7f9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/stdcheaders.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef __STDC_HEADERS_H -#define __STDC_HEADERS_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: stdcheaders.h,v 1.9 2009-05-18 12:25:45 yangtse Exp $ - ***************************************************************************/ - -#include - -size_t fread (void *, size_t, size_t, FILE *); -size_t fwrite (const void *, size_t, size_t, FILE *); - -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/typecheck-gcc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/typecheck-gcc.h deleted file mode 100644 index 97883058..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/typecheck-gcc.h +++ /dev/null @@ -1,551 +0,0 @@ -#ifndef __CURL_TYPECHECK_GCC_H -#define __CURL_TYPECHECK_GCC_H -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. - * - * You may opt to use, copy, modify, merge, publish, distribute and/or sell - * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the COPYING file. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - * $Id: typecheck-gcc.h,v 1.9 2009-01-25 23:26:31 bagder Exp $ - ***************************************************************************/ - -/* wraps curl_easy_setopt() with typechecking */ - -/* To add a new kind of warning, add an - * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value)) - * _curl_easy_setopt_err_sometype(); - * block and define _curl_is_sometype_option, _curl_is_sometype and - * _curl_easy_setopt_err_sometype below - * - * To add an option that uses the same type as an existing option, you'll just - * need to extend the appropriate _curl_*_option macro - */ -#define curl_easy_setopt(handle, option, value) \ -__extension__ ({ \ - __typeof__ (option) _curl_opt = option; \ - if (__builtin_constant_p(_curl_opt)) { \ - if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \ - _curl_easy_setopt_err_long(); \ - if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \ - _curl_easy_setopt_err_curl_off_t(); \ - if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \ - _curl_easy_setopt_err_string(); \ - if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \ - _curl_easy_setopt_err_write_callback(); \ - if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \ - _curl_easy_setopt_err_read_cb(); \ - if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \ - _curl_easy_setopt_err_ioctl_cb(); \ - if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\ - _curl_easy_setopt_err_sockopt_cb(); \ - if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \ - !_curl_is_opensocket_cb(value)) \ - _curl_easy_setopt_err_opensocket_cb(); \ - if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \ - !_curl_is_progress_cb(value)) \ - _curl_easy_setopt_err_progress_cb(); \ - if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \ - _curl_easy_setopt_err_debug_cb(); \ - if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \ - !_curl_is_ssl_ctx_cb(value)) \ - _curl_easy_setopt_err_ssl_ctx_cb(); \ - if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \ - _curl_easy_setopt_err_conv_cb(); \ - if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \ - _curl_easy_setopt_err_seek_cb(); \ - if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \ - _curl_easy_setopt_err_cb_data(); \ - if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \ - _curl_easy_setopt_err_error_buffer(); \ - if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \ - _curl_easy_setopt_err_FILE(); \ - if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \ - _curl_easy_setopt_err_postfields(); \ - if ((_curl_opt) == CURLOPT_HTTPPOST && \ - !_curl_is_arr((value), struct curl_httppost)) \ - _curl_easy_setopt_err_curl_httpost(); \ - if (_curl_is_slist_option(_curl_opt) && \ - !_curl_is_arr((value), struct curl_slist)) \ - _curl_easy_setopt_err_curl_slist(); \ - if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \ - _curl_easy_setopt_err_CURLSH(); \ - } \ - curl_easy_setopt(handle, _curl_opt, value); \ -}) - -/* wraps curl_easy_getinfo() with typechecking */ -/* FIXME: don't allow const pointers */ -#define curl_easy_getinfo(handle, info, arg) \ -__extension__ ({ \ - __typeof__ (info) _curl_info = info; \ - if (__builtin_constant_p(_curl_info)) { \ - if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \ - _curl_easy_getinfo_err_string(); \ - if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \ - _curl_easy_getinfo_err_long(); \ - if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \ - _curl_easy_getinfo_err_double(); \ - if (_curl_is_slist_info(_curl_info) && \ - !_curl_is_arr((arg), struct curl_slist *)) \ - _curl_easy_getinfo_err_curl_slist(); \ - } \ - curl_easy_getinfo(handle, _curl_info, arg); \ -}) - -/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), - * for now just make sure that the functions are called with three - * arguments - */ -#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) -#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) - - -/* the actual warnings, triggered by calling the _curl_easy_setopt_err* - * functions */ - -/* To define a new warning, use _CURL_WARNING(identifier, "message") */ -#define _CURL_WARNING(id, message) \ - static void __attribute__((warning(message))) __attribute__((unused)) \ - __attribute__((noinline)) id(void) { __asm__(""); } - -_CURL_WARNING(_curl_easy_setopt_err_long, - "curl_easy_setopt expects a long argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, - "curl_easy_setopt expects a curl_off_t argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_string, - "curl_easy_setopt expects a string (char* or char[]) argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_write_callback, - "curl_easy_setopt expects a curl_write_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_read_cb, - "curl_easy_setopt expects a curl_read_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, - "curl_easy_setopt expects a curl_ioctl_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, - "curl_easy_setopt expects a curl_sockopt_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, - "curl_easy_setopt expects a curl_opensocket_callback argument for this option" - ) -_CURL_WARNING(_curl_easy_setopt_err_progress_cb, - "curl_easy_setopt expects a curl_progress_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_debug_cb, - "curl_easy_setopt expects a curl_debug_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, - "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_conv_cb, - "curl_easy_setopt expects a curl_conv_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_seek_cb, - "curl_easy_setopt expects a curl_seek_callback argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_cb_data, - "curl_easy_setopt expects a private data pointer as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_error_buffer, - "curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_FILE, - "curl_easy_setopt expects a FILE* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_postfields, - "curl_easy_setopt expects a void* or char* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, - "curl_easy_setopt expects a struct curl_httppost* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_curl_slist, - "curl_easy_setopt expects a struct curl_slist* argument for this option") -_CURL_WARNING(_curl_easy_setopt_err_CURLSH, - "curl_easy_setopt expects a CURLSH* argument for this option") - -_CURL_WARNING(_curl_easy_getinfo_err_string, - "curl_easy_getinfo expects a pointer to char * for this info") -_CURL_WARNING(_curl_easy_getinfo_err_long, - "curl_easy_getinfo expects a pointer to long for this info") -_CURL_WARNING(_curl_easy_getinfo_err_double, - "curl_easy_getinfo expects a pointer to double for this info") -_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, - "curl_easy_getinfo expects a pointer to struct curl_slist * for this info") - -/* groups of curl_easy_setops options that take the same type of argument */ - -/* To add a new option to one of the groups, just add - * (option) == CURLOPT_SOMETHING - * to the or-expression. If the option takes a long or curl_off_t, you don't - * have to do anything - */ - -/* evaluates to true if option takes a long argument */ -#define _curl_is_long_option(option) \ - (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) - -#define _curl_is_off_t_option(option) \ - ((option) > CURLOPTTYPE_OFF_T) - -/* evaluates to true if option takes a char* argument */ -#define _curl_is_string_option(option) \ - ((option) == CURLOPT_URL || \ - (option) == CURLOPT_PROXY || \ - (option) == CURLOPT_INTERFACE || \ - (option) == CURLOPT_NETRC_FILE || \ - (option) == CURLOPT_USERPWD || \ - (option) == CURLOPT_USERNAME || \ - (option) == CURLOPT_PASSWORD || \ - (option) == CURLOPT_PROXYUSERPWD || \ - (option) == CURLOPT_PROXYUSERNAME || \ - (option) == CURLOPT_PROXYPASSWORD || \ - (option) == CURLOPT_NOPROXY || \ - (option) == CURLOPT_ENCODING || \ - (option) == CURLOPT_REFERER || \ - (option) == CURLOPT_USERAGENT || \ - (option) == CURLOPT_COOKIE || \ - (option) == CURLOPT_COOKIEFILE || \ - (option) == CURLOPT_COOKIEJAR || \ - (option) == CURLOPT_COOKIELIST || \ - (option) == CURLOPT_FTPPORT || \ - (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ - (option) == CURLOPT_FTP_ACCOUNT || \ - (option) == CURLOPT_RANGE || \ - (option) == CURLOPT_CUSTOMREQUEST || \ - (option) == CURLOPT_SSLCERT || \ - (option) == CURLOPT_SSLCERTTYPE || \ - (option) == CURLOPT_SSLKEY || \ - (option) == CURLOPT_SSLKEYTYPE || \ - (option) == CURLOPT_KEYPASSWD || \ - (option) == CURLOPT_SSLENGINE || \ - (option) == CURLOPT_CAINFO || \ - (option) == CURLOPT_CAPATH || \ - (option) == CURLOPT_RANDOM_FILE || \ - (option) == CURLOPT_EGDSOCKET || \ - (option) == CURLOPT_SSL_CIPHER_LIST || \ - (option) == CURLOPT_KRBLEVEL || \ - (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ - (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ - (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ - (option) == CURLOPT_CRLFILE || \ - (option) == CURLOPT_ISSUERCERT || \ - 0) - -/* evaluates to true if option takes a curl_write_callback argument */ -#define _curl_is_write_cb_option(option) \ - ((option) == CURLOPT_HEADERFUNCTION || \ - (option) == CURLOPT_WRITEFUNCTION) - -/* evaluates to true if option takes a curl_conv_callback argument */ -#define _curl_is_conv_cb_option(option) \ - ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ - (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) - -/* evaluates to true if option takes a data argument to pass to a callback */ -#define _curl_is_cb_data_option(option) \ - ((option) == CURLOPT_WRITEDATA || \ - (option) == CURLOPT_READDATA || \ - (option) == CURLOPT_IOCTLDATA || \ - (option) == CURLOPT_SOCKOPTDATA || \ - (option) == CURLOPT_OPENSOCKETDATA || \ - (option) == CURLOPT_PROGRESSDATA || \ - (option) == CURLOPT_WRITEHEADER || \ - (option) == CURLOPT_DEBUGDATA || \ - (option) == CURLOPT_SSL_CTX_DATA || \ - (option) == CURLOPT_SEEKDATA || \ - (option) == CURLOPT_PRIVATE || \ - 0) - -/* evaluates to true if option takes a POST data argument (void* or char*) */ -#define _curl_is_postfields_option(option) \ - ((option) == CURLOPT_POSTFIELDS || \ - (option) == CURLOPT_COPYPOSTFIELDS || \ - 0) - -/* evaluates to true if option takes a struct curl_slist * argument */ -#define _curl_is_slist_option(option) \ - ((option) == CURLOPT_HTTPHEADER || \ - (option) == CURLOPT_HTTP200ALIASES || \ - (option) == CURLOPT_QUOTE || \ - (option) == CURLOPT_POSTQUOTE || \ - (option) == CURLOPT_PREQUOTE || \ - (option) == CURLOPT_TELNETOPTIONS || \ - 0) - -/* groups of curl_easy_getinfo infos that take the same type of argument */ - -/* evaluates to true if info expects a pointer to char * argument */ -#define _curl_is_string_info(info) \ - (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) - -/* evaluates to true if info expects a pointer to long argument */ -#define _curl_is_long_info(info) \ - (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) - -/* evaluates to true if info expects a pointer to double argument */ -#define _curl_is_double_info(info) \ - (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) - -/* true if info expects a pointer to struct curl_slist * argument */ -#define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) - - -/* typecheck helpers -- check whether given expression has requested type*/ - -/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, - * otherwise define a new macro. Search for __builtin_types_compatible_p - * in the GCC manual. - * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is - * the actual expression passed to the curl_easy_setopt macro. This - * means that you can only apply the sizeof and __typeof__ operators, no - * == or whatsoever. - */ - -/* XXX: should evaluate to true iff expr is a pointer */ -#define _curl_is_any_ptr(expr) \ - (sizeof(expr) == sizeof(void*)) - -/* evaluates to true if expr is NULL */ -/* XXX: must not evaluate expr, so this check is not accurate */ -#define _curl_is_NULL(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) - -/* evaluates to true if expr is type*, const type* or NULL */ -#define _curl_is_ptr(expr, type) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), type *) || \ - __builtin_types_compatible_p(__typeof__(expr), const type *)) - -/* evaluates to true if expr is one of type[], type*, NULL or const type* */ -#define _curl_is_arr(expr, type) \ - (_curl_is_ptr((expr), type) || \ - __builtin_types_compatible_p(__typeof__(expr), type [])) - -/* evaluates to true if expr is a string */ -#define _curl_is_string(expr) \ - (_curl_is_arr((expr), char) || \ - _curl_is_arr((expr), signed char) || \ - _curl_is_arr((expr), unsigned char)) - -/* evaluates to true if expr is a long (no matter the signedness) - * XXX: for now, int is also accepted (and therefore short and char, which - * are promoted to int when passed to a variadic function) */ -#define _curl_is_long(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), long) || \ - __builtin_types_compatible_p(__typeof__(expr), signed long) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ - __builtin_types_compatible_p(__typeof__(expr), int) || \ - __builtin_types_compatible_p(__typeof__(expr), signed int) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ - __builtin_types_compatible_p(__typeof__(expr), short) || \ - __builtin_types_compatible_p(__typeof__(expr), signed short) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ - __builtin_types_compatible_p(__typeof__(expr), char) || \ - __builtin_types_compatible_p(__typeof__(expr), signed char) || \ - __builtin_types_compatible_p(__typeof__(expr), unsigned char)) - -/* evaluates to true if expr is of type curl_off_t */ -#define _curl_is_off_t(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) - -/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ -/* XXX: also check size of an char[] array? */ -#define _curl_is_error_buffer(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), char *) || \ - __builtin_types_compatible_p(__typeof__(expr), char[])) - -/* evaluates to true if expr is of type (const) void* or (const) FILE* */ -#if 0 -#define _curl_is_cb_data(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_ptr((expr), FILE)) -#else /* be less strict */ -#define _curl_is_cb_data(expr) \ - _curl_is_any_ptr(expr) -#endif - -/* evaluates to true if expr is of type FILE* */ -#define _curl_is_FILE(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *)) - -/* evaluates to true if expr can be passed as POST data (void* or char*) */ -#define _curl_is_postfields(expr) \ - (_curl_is_ptr((expr), void) || \ - _curl_is_arr((expr), char)) - -/* FIXME: the whole callback checking is messy... - * The idea is to tolerate char vs. void and const vs. not const - * pointers in arguments at least - */ -/* helper: __builtin_types_compatible_p distinguishes between functions and - * function pointers, hide it */ -#define _curl_callback_compatible(func, type) \ - (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func), type*)) - -/* evaluates to true if expr is of type curl_read_callback or "similar" */ -#define _curl_is_read_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ - _curl_callback_compatible((expr), _curl_read_callback1) || \ - _curl_callback_compatible((expr), _curl_read_callback2) || \ - _curl_callback_compatible((expr), _curl_read_callback3) || \ - _curl_callback_compatible((expr), _curl_read_callback4) || \ - _curl_callback_compatible((expr), _curl_read_callback5) || \ - _curl_callback_compatible((expr), _curl_read_callback6)) -typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*); -typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*); -typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*); -typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*); -typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*); -typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); - -/* evaluates to true if expr is of type curl_write_callback or "similar" */ -#define _curl_is_write_cb(expr) \ - (_curl_is_read_cb(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ - _curl_callback_compatible((expr), _curl_write_callback1) || \ - _curl_callback_compatible((expr), _curl_write_callback2) || \ - _curl_callback_compatible((expr), _curl_write_callback3) || \ - _curl_callback_compatible((expr), _curl_write_callback4) || \ - _curl_callback_compatible((expr), _curl_write_callback5) || \ - _curl_callback_compatible((expr), _curl_write_callback6)) -typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, - const void*); -typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); -typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, - const void*); -typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); - -/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ -#define _curl_is_ioctl_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ - _curl_callback_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*); -typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*); -typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*); -typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); - -/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ -#define _curl_is_sockopt_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ - _curl_callback_compatible((expr), _curl_sockopt_callback2)) -typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, - curlsocktype); - -/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ -#define _curl_is_opensocket_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ - _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ - _curl_callback_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (_curl_opensocket_callback1) - (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback2) - (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback3) - (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback4) - (const void *, curlsocktype, const struct curl_sockaddr *); - -/* evaluates to true if expr is of type curl_progress_callback or "similar" */ -#define _curl_is_progress_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ - _curl_callback_compatible((expr), _curl_progress_callback1) || \ - _curl_callback_compatible((expr), _curl_progress_callback2)) -typedef int (_curl_progress_callback1)(void *, - double, double, double, double); -typedef int (_curl_progress_callback2)(const void *, - double, double, double, double); - -/* evaluates to true if expr is of type curl_debug_callback or "similar" */ -#define _curl_is_debug_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ - _curl_callback_compatible((expr), _curl_debug_callback1) || \ - _curl_callback_compatible((expr), _curl_debug_callback2) || \ - _curl_callback_compatible((expr), _curl_debug_callback3) || \ - _curl_callback_compatible((expr), _curl_debug_callback4)) -typedef int (_curl_debug_callback1) (CURL *, - curl_infotype, char *, size_t, void *); -typedef int (_curl_debug_callback2) (CURL *, - curl_infotype, char *, size_t, const void *); -typedef int (_curl_debug_callback3) (CURL *, - curl_infotype, const char *, size_t, void *); -typedef int (_curl_debug_callback4) (CURL *, - curl_infotype, const char *, size_t, const void *); - -/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ -/* this is getting even messier... */ -#define _curl_is_ssl_ctx_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ - _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); -#ifdef HEADER_SSL_H -/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX - * this will of course break if we're included before OpenSSL headers... - */ -typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); -#else -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; -typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; -#endif - -/* evaluates to true if expr is of type curl_conv_callback or "similar" */ -#define _curl_is_conv_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ - _curl_callback_compatible((expr), _curl_conv_callback1) || \ - _curl_callback_compatible((expr), _curl_conv_callback2) || \ - _curl_callback_compatible((expr), _curl_conv_callback3) || \ - _curl_callback_compatible((expr), _curl_conv_callback4)) -typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); -typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); -typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); -typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); - -/* evaluates to true if expr is of type curl_seek_callback or "similar" */ -#define _curl_is_seek_cb(expr) \ - (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ - _curl_callback_compatible((expr), _curl_seek_callback1) || \ - _curl_callback_compatible((expr), _curl_seek_callback2)) -typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); -typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); - - -#endif /* __CURL_TYPECHECK_GCC_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/types.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/types.h deleted file mode 100644 index d37d6ae9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/curl/types.h +++ /dev/null @@ -1 +0,0 @@ -/* not used */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/AUTHORS b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/AUTHORS deleted file mode 100644 index ee92be88..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -opensource@google.com - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/COPYING deleted file mode 100644 index 38396b58..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/COPYING +++ /dev/null @@ -1,65 +0,0 @@ -Copyright (c) 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -A function gettimeofday in utilities.cc is based on - -http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/COPYING&q=GetSystemTimeAsFileTime%20license:bsd - -The license of this code is: - -Copyright (c) 2003-2008, Jouni Malinen and contributors -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name(s) of the above-listed copyright holder(s) nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ChangeLog b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ChangeLog deleted file mode 100644 index 350fee92..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ChangeLog +++ /dev/null @@ -1,59 +0,0 @@ -2010-06-15 Google Inc. - - * google-glog: version 0.3.1 - * GLOG_* environment variables now work even when gflags is installed. - * Snow leopard support. - * Now we can build and test from out side tree. - * Add DCHECK_NOTNULL. - * Add ShutdownGoogleLogging to close syslog (thanks DGunchev) - * Fix --enable-frame-pointers option (thanks kazuki.ohta) - * Fix libunwind detection (thanks giantchen) - -2009-07-30 Google Inc. - - * google-glog: version 0.3.0 - * Fix a deadlock happened when user uses glog with recent gflags. - * Suppress several unnecessary warnings (thanks keir). - * NetBSD and OpenBSD support. - * Use Win32API GetComputeNameA properly (thanks magila). - * Fix user name detection for Windows (thanks ademin). - * Fix several minor bugs. - -2009-04-10 Google Inc. - * google-glog: version 0.2.1 - * Fix timestamps of VC++ version. - * Add pkg-config support (thanks Tomasz) - * Fix build problem when building with gtest (thanks Michael) - * Add --with-gflags option for configure (thanks Michael) - * Fixes for GCC 4.4 (thanks John) - -2009-01-23 Google Inc. - * google-glog: version 0.2 - * Add initial Windows VC++ support. - * Google testing/mocking frameworks integration. - * Link pthread library automatically. - * Flush logs in signal handlers. - * Add macros LOG_TO_STRING, LOG_AT_LEVEL, DVLOG, and LOG_TO_SINK_ONLY. - * Log microseconds. - * Add --log_backtrace_at option. - * Fix some minor bugs. - -2008-11-18 Google Inc. - * google-glog: version 0.1.2 - * Add InstallFailureSignalHandler(). (satorux) - * Re-organize the way to produce stacktraces. - * Don't define unnecessary macro DISALLOW_EVIL_CONSTRUCTORS. - -2008-10-15 Google Inc. - * google-glog: version 0.1.1 - * Support symbolize for MacOSX 10.5. - * BUG FIX: --vmodule didn't work with gflags. - * BUG FIX: symbolize_unittest failed with GCC 4.3. - * Several fixes on the document. - -2008-10-07 Google Inc. - - * google-glog: initial release: - The glog package contains a library that implements application-level - logging. This library provides logging APIs based on C++-style - streams and various helper macros. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/INSTALL b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/INSTALL deleted file mode 100644 index 0babe243..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/INSTALL +++ /dev/null @@ -1,297 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Glog-Specific Install Notes -================================ - -*** NOTE FOR 64-BIT LINUX SYSTEMS - -The glibc built-in stack-unwinder on 64-bit systems has some problems -with the glog libraries. (In particular, if you are using -InstallFailureSignalHandler(), the signal may be raised in the middle -of malloc, holding some malloc-related locks when they invoke the -stack unwinder. The built-in stack unwinder may call malloc -recursively, which may require the thread to acquire a lock it already -holds: deadlock.) - -For that reason, if you use a 64-bit system and you need -InstallFailureSignalHandler(), we strongly recommend you install -libunwind before trying to configure or install google glog. -libunwind can be found at - - http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz - -Even if you already have libunwind installed, you will probably still -need to install from the snapshot to get the latest version. - -CAUTION: if you install libunwind from the URL above, be aware that -you may have trouble if you try to statically link your binary with -glog: that is, if you link with 'gcc -static -lgcc_eh ...'. This -is because both libunwind and libgcc implement the same C++ exception -handling APIs, but they implement them differently on some platforms. -This is not likely to be a problem on ia64, but may be on x86-64. - -Also, if you link binaries statically, make sure that you add --Wl,--eh-frame-hdr to your linker options. This is required so that -libunwind can find the information generated by the compiler required -for stack unwinding. - -Using -static is rare, though, so unless you know this will affect you -it probably won't. - -If you cannot or do not wish to install libunwind, you can still try -to use two kinds of stack-unwinder: 1. glibc built-in stack-unwinder -and 2. frame pointer based stack-unwinder. - -1. As we already mentioned, glibc's unwinder has a deadlock issue. -However, if you don't use InstallFailureSignalHandler() or you don't -worry about the rare possibilities of deadlocks, you can use this -stack-unwinder. If you specify no options and libunwind isn't -detected on your system, the configure script chooses this unwinder by -default. - -2. The frame pointer based stack unwinder requires that your -application, the glog library, and system libraries like libc, all be -compiled with a frame pointer. This is *not* the default for x86-64. - -If you are on x86-64 system, know that you have a set of system -libraries with frame-pointers enabled, and compile all your -applications with -fno-omit-frame-pointer, then you can enable the -frame pointer based stack unwinder by passing the ---enable-frame-pointers flag to configure. - - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 6. Often, you can also type `make uninstall' to remove the installed - files again. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.am deleted file mode 100644 index 772228f5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.am +++ /dev/null @@ -1,237 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# Make sure that when we re-make ./configure, we get the macros we need -ACLOCAL_AMFLAGS = -I m4 - -# This is so we can #include -AM_CPPFLAGS = -I$(top_srcdir)/src - -# This is mostly based on configure options -AM_CXXFLAGS = - -# These are good warnings to turn on by default -if GCC - AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -endif - -# These are x86-specific, having to do with frame-pointers -if X86_64 -if ENABLE_FRAME_POINTERS - AM_CXXFLAGS += -fno-omit-frame-pointer -else - # TODO(csilvers): check if -fomit-frame-pointer might be in $(CXXFLAGS), - # before setting this. - AM_CXXFLAGS += -DNO_FRAME_POINTER -endif -endif - -glogincludedir = $(includedir)/glog -## The .h files you want to install (that is, .h files that people -## who install this package can include in their own applications.) -## We have to include both the .h and .h.in forms. The latter we -## put in noinst_HEADERS. -gloginclude_HEADERS = src/glog/log_severity.h -nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h -noinst_HEADERS = src/glog/logging.h.in src/glog/raw_logging.h.in src/glog/vlog_is_on.h.in src/glog/stl_logging.h.in - -docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) -## This is for HTML and other documentation you want to install. -## Add your documentation files (in doc/) in addition to these -## top-level boilerplate files. Also add a TODO file if you have one. -dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \ - doc/designstyle.css doc/glog.html - -## The libraries (.so's) you want to install -lib_LTLIBRARIES = - -# The libraries libglog depends on. -COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS) -# Compile switches for our unittest. -TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -# Libraries for our unittest. -TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS) - -## unittests you want to run when people type 'make check'. -## TESTS is for binary unittests, check_SCRIPTS for script-based unittests. -## TESTS_ENVIRONMENT sets environment variables for when you run unittest, -## but it only seems to take effect for *binary* unittests (argh!) -TESTS = -TESTS_ENVIRONMENT = -check_SCRIPTS = -# Every time you add a unittest to check_SCRIPTS, add it here too -noinst_SCRIPTS = -# Binaries used for script-based unittests. -TEST_BINARIES = - -TESTS += logging_unittest -logging_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/logging_unittest.cc \ - src/config_for_unittests.h \ - src/mock-log.h -nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -check_SCRIPTS += logging_striplog_test_sh -noinst_SCRIPTS += src/logging_striplog_test.sh -logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptest10 - $(top_srcdir)/src/logging_striplog_test.sh - -check_SCRIPTS += demangle_unittest_sh -noinst_SCRIPTS += src/demangle_unittest.sh -demangle_unittest_sh: demangle_unittest - $(builddir)/demangle_unittest # force to create lt-demangle_unittest - $(top_srcdir)/src/demangle_unittest.sh - -check_SCRIPTS += signalhandler_unittest_sh -noinst_SCRIPTS += src/signalhandler_unittest.sh -signalhandler_unittest_sh: signalhandler_unittest - $(builddir)/signalhandler_unittest # force to create lt-signalhandler_unittest - $(top_srcdir)/src/signalhandler_unittest.sh - -TEST_BINARIES += logging_striptest0 -logging_striptest0_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest_main.cc -nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest0_LDADD = libglog.la $(COMMON_LIBS) - -TEST_BINARIES += logging_striptest2 -logging_striptest2_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest2.cc -nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest2_LDADD = libglog.la $(COMMON_LIBS) - -TEST_BINARIES += logging_striptest10 -logging_striptest10_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest10.cc -nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest10_LDADD = libglog.la $(COMMON_LIBS) - -TESTS += demangle_unittest -demangle_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/demangle_unittest.cc -nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -demangle_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -TESTS += stacktrace_unittest -stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/stacktrace_unittest.cc -nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS) - -TESTS += symbolize_unittest -symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/symbolize_unittest.cc -nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -TESTS += stl_logging_unittest -stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/stl_logging_unittest.cc -nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -TEST_BINARIES += signalhandler_unittest -signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/signalhandler_unittest.cc -nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -TESTS += utilities_unittest -utilities_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/utilities_unittest.cc -nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -utilities_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) - -if HAVE_GMOCK -TESTS += mock_log_test -mock_log_test_SOURCES = $(gloginclude_HEADERS) \ - src/mock-log_test.cc -nodist_mock_log_test_SOURCES = $(nodist_gloginclude_HEADERS) -mock_log_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -mock_log_test_LDFLAGS = $(PTHREAD_CFLAGS) -mock_log_test_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -endif - -## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS - -lib_LTLIBRARIES += libglog.la -libglog_la_SOURCES = $(gloginclude_HEADERS) \ - src/logging.cc src/raw_logging.cc src/vlog_is_on.cc \ - src/utilities.cc src/utilities.h \ - src/demangle.cc src/demangle.h \ - src/stacktrace.h \ - src/stacktrace_generic-inl.h \ - src/stacktrace_libunwind-inl.h \ - src/stacktrace_powerpc-inl.h \ - src/stacktrace_x86-inl.h \ - src/stacktrace_x86_64-inl.h \ - src/symbolize.cc src/symbolize.h \ - src/signalhandler.cc \ - src/base/mutex.h src/base/googleinit.h \ - src/base/commandlineflags.h src/googletest.h -nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS) - -libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -DNDEBUG -libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS) -libglog_la_LIBADD = $(COMMON_LIBS) - -## The location of the windows project file for each binary we make -WINDOWS_PROJECTS = google-glog.sln -WINDOWS_PROJECTS += vsprojects/libglog/libglog.vcproj -WINDOWS_PROJECTS += vsprojects/logging_unittest/logging_unittest.vcproj -WINDOWS_PROJECTS += vsprojects/libglog_static/libglog_static.vcproj -WINDOWS_PROJECTS += vsprojects/logging_unittest_static/logging_unittest_static.vcproj - -## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS - - -## This should always include $(TESTS), but may also include other -## binaries that you compile but don't want automatically installed. -noinst_PROGRAMS = $(TESTS) $(TEST_BINARIES) - -rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec - @cd packages && ./rpm.sh ${PACKAGE} ${VERSION} - -deb: dist-gzip packages/deb.sh packages/deb/* - @cd packages && ./deb.sh ${PACKAGE} ${VERSION} - -# Windows wants write permission to .vcproj files and maybe even sln files. -dist-hook: - test -e "$(distdir)/vsprojects" \ - && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck - -EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ - $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt \ - src/windows/config.h src/windows/port.h src/windows/port.cc \ - src/windows/preprocess.sh \ - src/windows/glog/log_severity.h src/windows/glog/logging.h \ - src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \ - src/windows/glog/vlog_is_on.h \ - $(WINDOWS_PROJECTS) - -# Add pkgconfig file -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libglog.pc diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.in deleted file mode 100644 index 9a73fcab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/Makefile.in +++ /dev/null @@ -1,1450 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ - -# These are good warnings to turn on by default -@GCC_TRUE@am__append_1 = -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare - -# These are x86-specific, having to do with frame-pointers -@ENABLE_FRAME_POINTERS_TRUE@@X86_64_TRUE@am__append_2 = -fno-omit-frame-pointer -@ENABLE_FRAME_POINTERS_FALSE@@X86_64_TRUE@am__append_3 = -DNO_FRAME_POINTER -TESTS = logging_unittest$(EXEEXT) demangle_unittest$(EXEEXT) \ - stacktrace_unittest$(EXEEXT) symbolize_unittest$(EXEEXT) \ - stl_logging_unittest$(EXEEXT) utilities_unittest$(EXEEXT) \ - $(am__EXEEXT_1) -@HAVE_GMOCK_TRUE@am__append_4 = mock_log_test -noinst_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ - $(gloginclude_HEADERS) $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/libglog.pc.in \ - $(top_srcdir)/configure $(top_srcdir)/src/config.h.in \ - $(top_srcdir)/src/glog/logging.h.in \ - $(top_srcdir)/src/glog/raw_logging.h.in \ - $(top_srcdir)/src/glog/stl_logging.h.in \ - $(top_srcdir)/src/glog/vlog_is_on.h.in AUTHORS COPYING \ - ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ - install-sh ltmain.sh missing mkinstalldirs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ac_have_attribute.m4 \ - $(top_srcdir)/m4/ac_have_builtin_expect.m4 \ - $(top_srcdir)/m4/ac_have_sync_val_compare_and_swap.m4 \ - $(top_srcdir)/m4/ac_rwlock.m4 $(top_srcdir)/m4/acx_pthread.m4 \ - $(top_srcdir)/m4/google_namespace.m4 \ - $(top_srcdir)/m4/namespaces.m4 \ - $(top_srcdir)/m4/pc_from_ucontext.m4 \ - $(top_srcdir)/m4/stl_namespace.m4 \ - $(top_srcdir)/m4/using_operator.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = src/glog/logging.h src/glog/raw_logging.h \ - src/glog/vlog_is_on.h src/glog/stl_logging.h libglog.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(glogincludedir)" \ - "$(DESTDIR)$(glogincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -libglog_la_DEPENDENCIES = $(am__DEPENDENCIES_2) -am__objects_1 = -am_libglog_la_OBJECTS = $(am__objects_1) libglog_la-logging.lo \ - libglog_la-raw_logging.lo libglog_la-vlog_is_on.lo \ - libglog_la-utilities.lo libglog_la-demangle.lo \ - libglog_la-symbolize.lo libglog_la-signalhandler.lo -nodist_libglog_la_OBJECTS = $(am__objects_1) -libglog_la_OBJECTS = $(am_libglog_la_OBJECTS) \ - $(nodist_libglog_la_OBJECTS) -libglog_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libglog_la_CXXFLAGS) \ - $(CXXFLAGS) $(libglog_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_GMOCK_TRUE@am__EXEEXT_1 = mock_log_test$(EXEEXT) -am__EXEEXT_2 = logging_unittest$(EXEEXT) demangle_unittest$(EXEEXT) \ - stacktrace_unittest$(EXEEXT) symbolize_unittest$(EXEEXT) \ - stl_logging_unittest$(EXEEXT) utilities_unittest$(EXEEXT) \ - $(am__EXEEXT_1) -am__EXEEXT_3 = logging_striptest0$(EXEEXT) logging_striptest2$(EXEEXT) \ - logging_striptest10$(EXEEXT) signalhandler_unittest$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_demangle_unittest_OBJECTS = $(am__objects_1) \ - demangle_unittest-demangle_unittest.$(OBJEXT) -nodist_demangle_unittest_OBJECTS = $(am__objects_1) -demangle_unittest_OBJECTS = $(am_demangle_unittest_OBJECTS) \ - $(nodist_demangle_unittest_OBJECTS) -demangle_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -demangle_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(demangle_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(demangle_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am_logging_striptest0_OBJECTS = $(am__objects_1) \ - logging_striptest0-logging_striptest_main.$(OBJEXT) -nodist_logging_striptest0_OBJECTS = $(am__objects_1) -logging_striptest0_OBJECTS = $(am_logging_striptest0_OBJECTS) \ - $(nodist_logging_striptest0_OBJECTS) -logging_striptest0_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) -logging_striptest0_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(logging_striptest0_CXXFLAGS) $(CXXFLAGS) \ - $(logging_striptest0_LDFLAGS) $(LDFLAGS) -o $@ -am_logging_striptest10_OBJECTS = $(am__objects_1) \ - logging_striptest10-logging_striptest10.$(OBJEXT) -nodist_logging_striptest10_OBJECTS = $(am__objects_1) -logging_striptest10_OBJECTS = $(am_logging_striptest10_OBJECTS) \ - $(nodist_logging_striptest10_OBJECTS) -logging_striptest10_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) -logging_striptest10_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(logging_striptest10_CXXFLAGS) $(CXXFLAGS) \ - $(logging_striptest10_LDFLAGS) $(LDFLAGS) -o $@ -am_logging_striptest2_OBJECTS = $(am__objects_1) \ - logging_striptest2-logging_striptest2.$(OBJEXT) -nodist_logging_striptest2_OBJECTS = $(am__objects_1) -logging_striptest2_OBJECTS = $(am_logging_striptest2_OBJECTS) \ - $(nodist_logging_striptest2_OBJECTS) -logging_striptest2_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) -logging_striptest2_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(logging_striptest2_CXXFLAGS) $(CXXFLAGS) \ - $(logging_striptest2_LDFLAGS) $(LDFLAGS) -o $@ -am_logging_unittest_OBJECTS = $(am__objects_1) \ - logging_unittest-logging_unittest.$(OBJEXT) -nodist_logging_unittest_OBJECTS = $(am__objects_1) -logging_unittest_OBJECTS = $(am_logging_unittest_OBJECTS) \ - $(nodist_logging_unittest_OBJECTS) -logging_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -logging_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(logging_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(logging_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am__mock_log_test_SOURCES_DIST = src/glog/log_severity.h \ - src/mock-log_test.cc -@HAVE_GMOCK_TRUE@am_mock_log_test_OBJECTS = $(am__objects_1) \ -@HAVE_GMOCK_TRUE@ mock_log_test-mock-log_test.$(OBJEXT) -@HAVE_GMOCK_TRUE@nodist_mock_log_test_OBJECTS = $(am__objects_1) -mock_log_test_OBJECTS = $(am_mock_log_test_OBJECTS) \ - $(nodist_mock_log_test_OBJECTS) -@HAVE_GMOCK_TRUE@mock_log_test_DEPENDENCIES = libglog.la \ -@HAVE_GMOCK_TRUE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) -mock_log_test_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(mock_log_test_CXXFLAGS) \ - $(CXXFLAGS) $(mock_log_test_LDFLAGS) $(LDFLAGS) -o $@ -am_signalhandler_unittest_OBJECTS = $(am__objects_1) \ - signalhandler_unittest-signalhandler_unittest.$(OBJEXT) -nodist_signalhandler_unittest_OBJECTS = $(am__objects_1) -signalhandler_unittest_OBJECTS = $(am_signalhandler_unittest_OBJECTS) \ - $(nodist_signalhandler_unittest_OBJECTS) -signalhandler_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -signalhandler_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(signalhandler_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am_stacktrace_unittest_OBJECTS = $(am__objects_1) \ - stacktrace_unittest-stacktrace_unittest.$(OBJEXT) -nodist_stacktrace_unittest_OBJECTS = $(am__objects_1) -stacktrace_unittest_OBJECTS = $(am_stacktrace_unittest_OBJECTS) \ - $(nodist_stacktrace_unittest_OBJECTS) -stacktrace_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) -stacktrace_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(stacktrace_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(stacktrace_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am_stl_logging_unittest_OBJECTS = $(am__objects_1) \ - stl_logging_unittest-stl_logging_unittest.$(OBJEXT) -nodist_stl_logging_unittest_OBJECTS = $(am__objects_1) -stl_logging_unittest_OBJECTS = $(am_stl_logging_unittest_OBJECTS) \ - $(nodist_stl_logging_unittest_OBJECTS) -stl_logging_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -stl_logging_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(stl_logging_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am_symbolize_unittest_OBJECTS = $(am__objects_1) \ - symbolize_unittest-symbolize_unittest.$(OBJEXT) -nodist_symbolize_unittest_OBJECTS = $(am__objects_1) -symbolize_unittest_OBJECTS = $(am_symbolize_unittest_OBJECTS) \ - $(nodist_symbolize_unittest_OBJECTS) -symbolize_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -symbolize_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(symbolize_unittest_LDFLAGS) $(LDFLAGS) -o $@ -am_utilities_unittest_OBJECTS = $(am__objects_1) \ - utilities_unittest-utilities_unittest.$(OBJEXT) -nodist_utilities_unittest_OBJECTS = $(am__objects_1) -utilities_unittest_OBJECTS = $(am_utilities_unittest_OBJECTS) \ - $(nodist_utilities_unittest_OBJECTS) -utilities_unittest_DEPENDENCIES = libglog.la $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_2) -utilities_unittest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(utilities_unittest_CXXFLAGS) $(CXXFLAGS) \ - $(utilities_unittest_LDFLAGS) $(LDFLAGS) -o $@ -SCRIPTS = $(noinst_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libglog_la_SOURCES) $(nodist_libglog_la_SOURCES) \ - $(demangle_unittest_SOURCES) \ - $(nodist_demangle_unittest_SOURCES) \ - $(logging_striptest0_SOURCES) \ - $(nodist_logging_striptest0_SOURCES) \ - $(logging_striptest10_SOURCES) \ - $(nodist_logging_striptest10_SOURCES) \ - $(logging_striptest2_SOURCES) \ - $(nodist_logging_striptest2_SOURCES) \ - $(logging_unittest_SOURCES) $(nodist_logging_unittest_SOURCES) \ - $(mock_log_test_SOURCES) $(nodist_mock_log_test_SOURCES) \ - $(signalhandler_unittest_SOURCES) \ - $(nodist_signalhandler_unittest_SOURCES) \ - $(stacktrace_unittest_SOURCES) \ - $(nodist_stacktrace_unittest_SOURCES) \ - $(stl_logging_unittest_SOURCES) \ - $(nodist_stl_logging_unittest_SOURCES) \ - $(symbolize_unittest_SOURCES) \ - $(nodist_symbolize_unittest_SOURCES) \ - $(utilities_unittest_SOURCES) \ - $(nodist_utilities_unittest_SOURCES) -DIST_SOURCES = $(libglog_la_SOURCES) $(demangle_unittest_SOURCES) \ - $(logging_striptest0_SOURCES) $(logging_striptest10_SOURCES) \ - $(logging_striptest2_SOURCES) $(logging_unittest_SOURCES) \ - $(am__mock_log_test_SOURCES_DIST) \ - $(signalhandler_unittest_SOURCES) \ - $(stacktrace_unittest_SOURCES) $(stl_logging_unittest_SOURCES) \ - $(symbolize_unittest_SOURCES) $(utilities_unittest_SOURCES) -dist_docDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(dist_doc_DATA) $(pkgconfig_DATA) -glogincludeHEADERS_INSTALL = $(INSTALL_HEADER) -nodist_glogincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(gloginclude_HEADERS) $(nodist_gloginclude_HEADERS) \ - $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GFLAGS_CFLAGS = @GFLAGS_CFLAGS@ -GFLAGS_LIBS = @GFLAGS_LIBS@ -GMOCK_CFLAGS = @GMOCK_CFLAGS@ -GMOCK_CONFIG = @GMOCK_CONFIG@ -GMOCK_LIBS = @GMOCK_LIBS@ -GREP = @GREP@ -GTEST_CFLAGS = @GTEST_CFLAGS@ -GTEST_CONFIG = @GTEST_CONFIG@ -GTEST_LIBS = @GTEST_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -UNWIND_LIBS = @UNWIND_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_cv___attribute___noreturn = @ac_cv___attribute___noreturn@ -ac_cv___attribute___printf_4_5 = @ac_cv___attribute___printf_4_5@ -ac_cv_cxx_using_operator = @ac_cv_cxx_using_operator@ -ac_cv_have___builtin_expect = @ac_cv_have___builtin_expect@ -ac_cv_have___uint16 = @ac_cv_have___uint16@ -ac_cv_have_inttypes_h = @ac_cv_have_inttypes_h@ -ac_cv_have_libgflags = @ac_cv_have_libgflags@ -ac_cv_have_stdint_h = @ac_cv_have_stdint_h@ -ac_cv_have_systypes_h = @ac_cv_have_systypes_h@ -ac_cv_have_u_int16_t = @ac_cv_have_u_int16_t@ -ac_cv_have_uint16_t = @ac_cv_have_uint16_t@ -ac_cv_have_unistd_h = @ac_cv_have_unistd_h@ -ac_google_end_namespace = @ac_google_end_namespace@ -ac_google_namespace = @ac_google_namespace@ -ac_google_start_namespace = @ac_google_start_namespace@ -acx_pthread_config = @acx_pthread_config@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Make sure that when we re-make ./configure, we get the macros we need -ACLOCAL_AMFLAGS = -I m4 - -# This is so we can #include -AM_CPPFLAGS = -I$(top_srcdir)/src - -# This is mostly based on configure options -AM_CXXFLAGS = $(am__append_1) $(am__append_2) $(am__append_3) -glogincludedir = $(includedir)/glog -gloginclude_HEADERS = src/glog/log_severity.h -nodist_gloginclude_HEADERS = src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h -noinst_HEADERS = src/glog/logging.h.in src/glog/raw_logging.h.in src/glog/vlog_is_on.h.in src/glog/stl_logging.h.in -dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README.windows \ - doc/designstyle.css doc/glog.html - -lib_LTLIBRARIES = libglog.la - -# The libraries libglog depends on. -COMMON_LIBS = $(PTHREAD_LIBS) $(GFLAGS_LIBS) $(UNWIND_LIBS) -# Compile switches for our unittest. -TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -# Libraries for our unittest. -TEST_LIBS = $(GTEST_LIBS) $(GMOCK_LIBS) $(GFLAGS_LIBS) -TESTS_ENVIRONMENT = -check_SCRIPTS = logging_striplog_test_sh demangle_unittest_sh \ - signalhandler_unittest_sh -# Every time you add a unittest to check_SCRIPTS, add it here too -noinst_SCRIPTS = src/logging_striplog_test.sh src/demangle_unittest.sh \ - src/signalhandler_unittest.sh -# Binaries used for script-based unittests. -TEST_BINARIES = logging_striptest0 logging_striptest2 \ - logging_striptest10 signalhandler_unittest -logging_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/logging_unittest.cc \ - src/config_for_unittests.h \ - src/mock-log.h - -nodist_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -logging_striptest0_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest_main.cc - -nodist_logging_striptest0_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest0_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest0_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest0_LDADD = libglog.la $(COMMON_LIBS) -logging_striptest2_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest2.cc - -nodist_logging_striptest2_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest2_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest2_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest2_LDADD = libglog.la $(COMMON_LIBS) -logging_striptest10_SOURCES = $(gloginclude_HEADERS) \ - src/logging_striptest10.cc - -nodist_logging_striptest10_SOURCES = $(nodist_gloginclude_HEADERS) -logging_striptest10_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -logging_striptest10_LDFLAGS = $(PTHREAD_CFLAGS) -logging_striptest10_LDADD = libglog.la $(COMMON_LIBS) -demangle_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/demangle_unittest.cc - -nodist_demangle_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -demangle_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -demangle_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -demangle_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -stacktrace_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/stacktrace_unittest.cc - -nodist_stacktrace_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stacktrace_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -stacktrace_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -stacktrace_unittest_LDADD = libglog.la $(COMMON_LIBS) -symbolize_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/symbolize_unittest.cc - -nodist_symbolize_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -symbolize_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -symbolize_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -symbolize_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/stl_logging_unittest.cc - -nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -signalhandler_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/signalhandler_unittest.cc - -nodist_signalhandler_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -signalhandler_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -signalhandler_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -signalhandler_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -utilities_unittest_SOURCES = $(gloginclude_HEADERS) \ - src/utilities_unittest.cc - -nodist_utilities_unittest_SOURCES = $(nodist_gloginclude_HEADERS) -utilities_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -utilities_unittest_LDFLAGS = $(PTHREAD_CFLAGS) -utilities_unittest_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -@HAVE_GMOCK_TRUE@mock_log_test_SOURCES = $(gloginclude_HEADERS) \ -@HAVE_GMOCK_TRUE@ src/mock-log_test.cc - -@HAVE_GMOCK_TRUE@nodist_mock_log_test_SOURCES = $(nodist_gloginclude_HEADERS) -@HAVE_GMOCK_TRUE@mock_log_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS) -@HAVE_GMOCK_TRUE@mock_log_test_LDFLAGS = $(PTHREAD_CFLAGS) -@HAVE_GMOCK_TRUE@mock_log_test_LDADD = libglog.la $(COMMON_LIBS) $(TEST_LIBS) -libglog_la_SOURCES = $(gloginclude_HEADERS) \ - src/logging.cc src/raw_logging.cc src/vlog_is_on.cc \ - src/utilities.cc src/utilities.h \ - src/demangle.cc src/demangle.h \ - src/stacktrace.h \ - src/stacktrace_generic-inl.h \ - src/stacktrace_libunwind-inl.h \ - src/stacktrace_powerpc-inl.h \ - src/stacktrace_x86-inl.h \ - src/stacktrace_x86_64-inl.h \ - src/symbolize.cc src/symbolize.h \ - src/signalhandler.cc \ - src/base/mutex.h src/base/googleinit.h \ - src/base/commandlineflags.h src/googletest.h - -nodist_libglog_la_SOURCES = $(nodist_gloginclude_HEADERS) -libglog_la_CXXFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_CFLAGS) $(AM_CXXFLAGS) -DNDEBUG -libglog_la_LDFLAGS = $(PTRHEAD_CFLAGS) $(GFLAGS_LDFLAGS) -libglog_la_LIBADD = $(COMMON_LIBS) -WINDOWS_PROJECTS = google-glog.sln vsprojects/libglog/libglog.vcproj \ - vsprojects/logging_unittest/logging_unittest.vcproj \ - vsprojects/libglog_static/libglog_static.vcproj \ - vsprojects/logging_unittest_static/logging_unittest_static.vcproj -EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ - $(SCRIPTS) src/logging_unittest.err src/demangle_unittest.txt \ - src/windows/config.h src/windows/port.h src/windows/port.cc \ - src/windows/preprocess.sh \ - src/windows/glog/log_severity.h src/windows/glog/logging.h \ - src/windows/glog/raw_logging.h src/windows/glog/stl_logging.h \ - src/windows/glog/vlog_is_on.h \ - $(WINDOWS_PROJECTS) - - -# Add pkgconfig file -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libglog.pc -all: all-am - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -src/config.h: src/stamp-h1 - @if test ! -f $@; then \ - rm -f src/stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1; \ - else :; fi - -src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status - @rm -f src/stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status src/config.h -$(top_srcdir)/src/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f src/stamp-h1 - touch $@ - -distclean-hdr: - -rm -f src/config.h src/stamp-h1 -src/glog/logging.h: $(top_builddir)/config.status $(top_srcdir)/src/glog/logging.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -src/glog/raw_logging.h: $(top_builddir)/config.status $(top_srcdir)/src/glog/raw_logging.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -src/glog/vlog_is_on.h: $(top_builddir)/config.status $(top_srcdir)/src/glog/vlog_is_on.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -src/glog/stl_logging.h: $(top_builddir)/config.status $(top_srcdir)/src/glog/stl_logging.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -libglog.pc: $(top_builddir)/config.status $(srcdir)/libglog.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libglog.la: $(libglog_la_OBJECTS) $(libglog_la_DEPENDENCIES) - $(libglog_la_LINK) -rpath $(libdir) $(libglog_la_OBJECTS) $(libglog_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -demangle_unittest$(EXEEXT): $(demangle_unittest_OBJECTS) $(demangle_unittest_DEPENDENCIES) - @rm -f demangle_unittest$(EXEEXT) - $(demangle_unittest_LINK) $(demangle_unittest_OBJECTS) $(demangle_unittest_LDADD) $(LIBS) -logging_striptest0$(EXEEXT): $(logging_striptest0_OBJECTS) $(logging_striptest0_DEPENDENCIES) - @rm -f logging_striptest0$(EXEEXT) - $(logging_striptest0_LINK) $(logging_striptest0_OBJECTS) $(logging_striptest0_LDADD) $(LIBS) -logging_striptest10$(EXEEXT): $(logging_striptest10_OBJECTS) $(logging_striptest10_DEPENDENCIES) - @rm -f logging_striptest10$(EXEEXT) - $(logging_striptest10_LINK) $(logging_striptest10_OBJECTS) $(logging_striptest10_LDADD) $(LIBS) -logging_striptest2$(EXEEXT): $(logging_striptest2_OBJECTS) $(logging_striptest2_DEPENDENCIES) - @rm -f logging_striptest2$(EXEEXT) - $(logging_striptest2_LINK) $(logging_striptest2_OBJECTS) $(logging_striptest2_LDADD) $(LIBS) -logging_unittest$(EXEEXT): $(logging_unittest_OBJECTS) $(logging_unittest_DEPENDENCIES) - @rm -f logging_unittest$(EXEEXT) - $(logging_unittest_LINK) $(logging_unittest_OBJECTS) $(logging_unittest_LDADD) $(LIBS) -mock_log_test$(EXEEXT): $(mock_log_test_OBJECTS) $(mock_log_test_DEPENDENCIES) - @rm -f mock_log_test$(EXEEXT) - $(mock_log_test_LINK) $(mock_log_test_OBJECTS) $(mock_log_test_LDADD) $(LIBS) -signalhandler_unittest$(EXEEXT): $(signalhandler_unittest_OBJECTS) $(signalhandler_unittest_DEPENDENCIES) - @rm -f signalhandler_unittest$(EXEEXT) - $(signalhandler_unittest_LINK) $(signalhandler_unittest_OBJECTS) $(signalhandler_unittest_LDADD) $(LIBS) -stacktrace_unittest$(EXEEXT): $(stacktrace_unittest_OBJECTS) $(stacktrace_unittest_DEPENDENCIES) - @rm -f stacktrace_unittest$(EXEEXT) - $(stacktrace_unittest_LINK) $(stacktrace_unittest_OBJECTS) $(stacktrace_unittest_LDADD) $(LIBS) -stl_logging_unittest$(EXEEXT): $(stl_logging_unittest_OBJECTS) $(stl_logging_unittest_DEPENDENCIES) - @rm -f stl_logging_unittest$(EXEEXT) - $(stl_logging_unittest_LINK) $(stl_logging_unittest_OBJECTS) $(stl_logging_unittest_LDADD) $(LIBS) -symbolize_unittest$(EXEEXT): $(symbolize_unittest_OBJECTS) $(symbolize_unittest_DEPENDENCIES) - @rm -f symbolize_unittest$(EXEEXT) - $(symbolize_unittest_LINK) $(symbolize_unittest_OBJECTS) $(symbolize_unittest_LDADD) $(LIBS) -utilities_unittest$(EXEEXT): $(utilities_unittest_OBJECTS) $(utilities_unittest_DEPENDENCIES) - @rm -f utilities_unittest$(EXEEXT) - $(utilities_unittest_LINK) $(utilities_unittest_OBJECTS) $(utilities_unittest_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demangle_unittest-demangle_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-demangle.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-logging.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-raw_logging.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-signalhandler.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-symbolize.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-utilities.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglog_la-vlog_is_on.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging_striptest0-logging_striptest_main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging_striptest10-logging_striptest10.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging_striptest2-logging_striptest2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging_unittest-logging_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_log_test-mock-log_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbolize_unittest-symbolize_unittest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities_unittest-utilities_unittest.Po@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -libglog_la-logging.lo: src/logging.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-logging.lo -MD -MP -MF $(DEPDIR)/libglog_la-logging.Tpo -c -o libglog_la-logging.lo `test -f 'src/logging.cc' || echo '$(srcdir)/'`src/logging.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-logging.Tpo $(DEPDIR)/libglog_la-logging.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging.cc' object='libglog_la-logging.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-logging.lo `test -f 'src/logging.cc' || echo '$(srcdir)/'`src/logging.cc - -libglog_la-raw_logging.lo: src/raw_logging.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-raw_logging.lo -MD -MP -MF $(DEPDIR)/libglog_la-raw_logging.Tpo -c -o libglog_la-raw_logging.lo `test -f 'src/raw_logging.cc' || echo '$(srcdir)/'`src/raw_logging.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-raw_logging.Tpo $(DEPDIR)/libglog_la-raw_logging.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/raw_logging.cc' object='libglog_la-raw_logging.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-raw_logging.lo `test -f 'src/raw_logging.cc' || echo '$(srcdir)/'`src/raw_logging.cc - -libglog_la-vlog_is_on.lo: src/vlog_is_on.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-vlog_is_on.lo -MD -MP -MF $(DEPDIR)/libglog_la-vlog_is_on.Tpo -c -o libglog_la-vlog_is_on.lo `test -f 'src/vlog_is_on.cc' || echo '$(srcdir)/'`src/vlog_is_on.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-vlog_is_on.Tpo $(DEPDIR)/libglog_la-vlog_is_on.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vlog_is_on.cc' object='libglog_la-vlog_is_on.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-vlog_is_on.lo `test -f 'src/vlog_is_on.cc' || echo '$(srcdir)/'`src/vlog_is_on.cc - -libglog_la-utilities.lo: src/utilities.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-utilities.lo -MD -MP -MF $(DEPDIR)/libglog_la-utilities.Tpo -c -o libglog_la-utilities.lo `test -f 'src/utilities.cc' || echo '$(srcdir)/'`src/utilities.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-utilities.Tpo $(DEPDIR)/libglog_la-utilities.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/utilities.cc' object='libglog_la-utilities.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-utilities.lo `test -f 'src/utilities.cc' || echo '$(srcdir)/'`src/utilities.cc - -libglog_la-demangle.lo: src/demangle.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-demangle.lo -MD -MP -MF $(DEPDIR)/libglog_la-demangle.Tpo -c -o libglog_la-demangle.lo `test -f 'src/demangle.cc' || echo '$(srcdir)/'`src/demangle.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-demangle.Tpo $(DEPDIR)/libglog_la-demangle.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/demangle.cc' object='libglog_la-demangle.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-demangle.lo `test -f 'src/demangle.cc' || echo '$(srcdir)/'`src/demangle.cc - -libglog_la-symbolize.lo: src/symbolize.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-symbolize.lo -MD -MP -MF $(DEPDIR)/libglog_la-symbolize.Tpo -c -o libglog_la-symbolize.lo `test -f 'src/symbolize.cc' || echo '$(srcdir)/'`src/symbolize.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-symbolize.Tpo $(DEPDIR)/libglog_la-symbolize.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/symbolize.cc' object='libglog_la-symbolize.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-symbolize.lo `test -f 'src/symbolize.cc' || echo '$(srcdir)/'`src/symbolize.cc - -libglog_la-signalhandler.lo: src/signalhandler.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -MT libglog_la-signalhandler.lo -MD -MP -MF $(DEPDIR)/libglog_la-signalhandler.Tpo -c -o libglog_la-signalhandler.lo `test -f 'src/signalhandler.cc' || echo '$(srcdir)/'`src/signalhandler.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglog_la-signalhandler.Tpo $(DEPDIR)/libglog_la-signalhandler.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/signalhandler.cc' object='libglog_la-signalhandler.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglog_la_CXXFLAGS) $(CXXFLAGS) -c -o libglog_la-signalhandler.lo `test -f 'src/signalhandler.cc' || echo '$(srcdir)/'`src/signalhandler.cc - -demangle_unittest-demangle_unittest.o: src/demangle_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demangle_unittest_CXXFLAGS) $(CXXFLAGS) -MT demangle_unittest-demangle_unittest.o -MD -MP -MF $(DEPDIR)/demangle_unittest-demangle_unittest.Tpo -c -o demangle_unittest-demangle_unittest.o `test -f 'src/demangle_unittest.cc' || echo '$(srcdir)/'`src/demangle_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/demangle_unittest-demangle_unittest.Tpo $(DEPDIR)/demangle_unittest-demangle_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/demangle_unittest.cc' object='demangle_unittest-demangle_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demangle_unittest_CXXFLAGS) $(CXXFLAGS) -c -o demangle_unittest-demangle_unittest.o `test -f 'src/demangle_unittest.cc' || echo '$(srcdir)/'`src/demangle_unittest.cc - -demangle_unittest-demangle_unittest.obj: src/demangle_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demangle_unittest_CXXFLAGS) $(CXXFLAGS) -MT demangle_unittest-demangle_unittest.obj -MD -MP -MF $(DEPDIR)/demangle_unittest-demangle_unittest.Tpo -c -o demangle_unittest-demangle_unittest.obj `if test -f 'src/demangle_unittest.cc'; then $(CYGPATH_W) 'src/demangle_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/demangle_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/demangle_unittest-demangle_unittest.Tpo $(DEPDIR)/demangle_unittest-demangle_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/demangle_unittest.cc' object='demangle_unittest-demangle_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demangle_unittest_CXXFLAGS) $(CXXFLAGS) -c -o demangle_unittest-demangle_unittest.obj `if test -f 'src/demangle_unittest.cc'; then $(CYGPATH_W) 'src/demangle_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/demangle_unittest.cc'; fi` - -logging_striptest0-logging_striptest_main.o: src/logging_striptest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest0_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest0-logging_striptest_main.o -MD -MP -MF $(DEPDIR)/logging_striptest0-logging_striptest_main.Tpo -c -o logging_striptest0-logging_striptest_main.o `test -f 'src/logging_striptest_main.cc' || echo '$(srcdir)/'`src/logging_striptest_main.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest0-logging_striptest_main.Tpo $(DEPDIR)/logging_striptest0-logging_striptest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest_main.cc' object='logging_striptest0-logging_striptest_main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest0_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest0-logging_striptest_main.o `test -f 'src/logging_striptest_main.cc' || echo '$(srcdir)/'`src/logging_striptest_main.cc - -logging_striptest0-logging_striptest_main.obj: src/logging_striptest_main.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest0_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest0-logging_striptest_main.obj -MD -MP -MF $(DEPDIR)/logging_striptest0-logging_striptest_main.Tpo -c -o logging_striptest0-logging_striptest_main.obj `if test -f 'src/logging_striptest_main.cc'; then $(CYGPATH_W) 'src/logging_striptest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest_main.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest0-logging_striptest_main.Tpo $(DEPDIR)/logging_striptest0-logging_striptest_main.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest_main.cc' object='logging_striptest0-logging_striptest_main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest0_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest0-logging_striptest_main.obj `if test -f 'src/logging_striptest_main.cc'; then $(CYGPATH_W) 'src/logging_striptest_main.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest_main.cc'; fi` - -logging_striptest10-logging_striptest10.o: src/logging_striptest10.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest10_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest10-logging_striptest10.o -MD -MP -MF $(DEPDIR)/logging_striptest10-logging_striptest10.Tpo -c -o logging_striptest10-logging_striptest10.o `test -f 'src/logging_striptest10.cc' || echo '$(srcdir)/'`src/logging_striptest10.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest10-logging_striptest10.Tpo $(DEPDIR)/logging_striptest10-logging_striptest10.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest10.cc' object='logging_striptest10-logging_striptest10.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest10_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest10-logging_striptest10.o `test -f 'src/logging_striptest10.cc' || echo '$(srcdir)/'`src/logging_striptest10.cc - -logging_striptest10-logging_striptest10.obj: src/logging_striptest10.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest10_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest10-logging_striptest10.obj -MD -MP -MF $(DEPDIR)/logging_striptest10-logging_striptest10.Tpo -c -o logging_striptest10-logging_striptest10.obj `if test -f 'src/logging_striptest10.cc'; then $(CYGPATH_W) 'src/logging_striptest10.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest10.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest10-logging_striptest10.Tpo $(DEPDIR)/logging_striptest10-logging_striptest10.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest10.cc' object='logging_striptest10-logging_striptest10.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest10_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest10-logging_striptest10.obj `if test -f 'src/logging_striptest10.cc'; then $(CYGPATH_W) 'src/logging_striptest10.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest10.cc'; fi` - -logging_striptest2-logging_striptest2.o: src/logging_striptest2.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest2_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest2-logging_striptest2.o -MD -MP -MF $(DEPDIR)/logging_striptest2-logging_striptest2.Tpo -c -o logging_striptest2-logging_striptest2.o `test -f 'src/logging_striptest2.cc' || echo '$(srcdir)/'`src/logging_striptest2.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest2-logging_striptest2.Tpo $(DEPDIR)/logging_striptest2-logging_striptest2.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest2.cc' object='logging_striptest2-logging_striptest2.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest2_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest2-logging_striptest2.o `test -f 'src/logging_striptest2.cc' || echo '$(srcdir)/'`src/logging_striptest2.cc - -logging_striptest2-logging_striptest2.obj: src/logging_striptest2.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest2_CXXFLAGS) $(CXXFLAGS) -MT logging_striptest2-logging_striptest2.obj -MD -MP -MF $(DEPDIR)/logging_striptest2-logging_striptest2.Tpo -c -o logging_striptest2-logging_striptest2.obj `if test -f 'src/logging_striptest2.cc'; then $(CYGPATH_W) 'src/logging_striptest2.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest2.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_striptest2-logging_striptest2.Tpo $(DEPDIR)/logging_striptest2-logging_striptest2.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_striptest2.cc' object='logging_striptest2-logging_striptest2.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_striptest2_CXXFLAGS) $(CXXFLAGS) -c -o logging_striptest2-logging_striptest2.obj `if test -f 'src/logging_striptest2.cc'; then $(CYGPATH_W) 'src/logging_striptest2.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_striptest2.cc'; fi` - -logging_unittest-logging_unittest.o: src/logging_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_unittest_CXXFLAGS) $(CXXFLAGS) -MT logging_unittest-logging_unittest.o -MD -MP -MF $(DEPDIR)/logging_unittest-logging_unittest.Tpo -c -o logging_unittest-logging_unittest.o `test -f 'src/logging_unittest.cc' || echo '$(srcdir)/'`src/logging_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_unittest-logging_unittest.Tpo $(DEPDIR)/logging_unittest-logging_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_unittest.cc' object='logging_unittest-logging_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_unittest_CXXFLAGS) $(CXXFLAGS) -c -o logging_unittest-logging_unittest.o `test -f 'src/logging_unittest.cc' || echo '$(srcdir)/'`src/logging_unittest.cc - -logging_unittest-logging_unittest.obj: src/logging_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_unittest_CXXFLAGS) $(CXXFLAGS) -MT logging_unittest-logging_unittest.obj -MD -MP -MF $(DEPDIR)/logging_unittest-logging_unittest.Tpo -c -o logging_unittest-logging_unittest.obj `if test -f 'src/logging_unittest.cc'; then $(CYGPATH_W) 'src/logging_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/logging_unittest-logging_unittest.Tpo $(DEPDIR)/logging_unittest-logging_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/logging_unittest.cc' object='logging_unittest-logging_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(logging_unittest_CXXFLAGS) $(CXXFLAGS) -c -o logging_unittest-logging_unittest.obj `if test -f 'src/logging_unittest.cc'; then $(CYGPATH_W) 'src/logging_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/logging_unittest.cc'; fi` - -mock_log_test-mock-log_test.o: src/mock-log_test.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mock_log_test_CXXFLAGS) $(CXXFLAGS) -MT mock_log_test-mock-log_test.o -MD -MP -MF $(DEPDIR)/mock_log_test-mock-log_test.Tpo -c -o mock_log_test-mock-log_test.o `test -f 'src/mock-log_test.cc' || echo '$(srcdir)/'`src/mock-log_test.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/mock_log_test-mock-log_test.Tpo $(DEPDIR)/mock_log_test-mock-log_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/mock-log_test.cc' object='mock_log_test-mock-log_test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mock_log_test_CXXFLAGS) $(CXXFLAGS) -c -o mock_log_test-mock-log_test.o `test -f 'src/mock-log_test.cc' || echo '$(srcdir)/'`src/mock-log_test.cc - -mock_log_test-mock-log_test.obj: src/mock-log_test.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mock_log_test_CXXFLAGS) $(CXXFLAGS) -MT mock_log_test-mock-log_test.obj -MD -MP -MF $(DEPDIR)/mock_log_test-mock-log_test.Tpo -c -o mock_log_test-mock-log_test.obj `if test -f 'src/mock-log_test.cc'; then $(CYGPATH_W) 'src/mock-log_test.cc'; else $(CYGPATH_W) '$(srcdir)/src/mock-log_test.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/mock_log_test-mock-log_test.Tpo $(DEPDIR)/mock_log_test-mock-log_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/mock-log_test.cc' object='mock_log_test-mock-log_test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mock_log_test_CXXFLAGS) $(CXXFLAGS) -c -o mock_log_test-mock-log_test.obj `if test -f 'src/mock-log_test.cc'; then $(CYGPATH_W) 'src/mock-log_test.cc'; else $(CYGPATH_W) '$(srcdir)/src/mock-log_test.cc'; fi` - -signalhandler_unittest-signalhandler_unittest.o: src/signalhandler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) -MT signalhandler_unittest-signalhandler_unittest.o -MD -MP -MF $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Tpo -c -o signalhandler_unittest-signalhandler_unittest.o `test -f 'src/signalhandler_unittest.cc' || echo '$(srcdir)/'`src/signalhandler_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Tpo $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/signalhandler_unittest.cc' object='signalhandler_unittest-signalhandler_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) -c -o signalhandler_unittest-signalhandler_unittest.o `test -f 'src/signalhandler_unittest.cc' || echo '$(srcdir)/'`src/signalhandler_unittest.cc - -signalhandler_unittest-signalhandler_unittest.obj: src/signalhandler_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) -MT signalhandler_unittest-signalhandler_unittest.obj -MD -MP -MF $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Tpo -c -o signalhandler_unittest-signalhandler_unittest.obj `if test -f 'src/signalhandler_unittest.cc'; then $(CYGPATH_W) 'src/signalhandler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/signalhandler_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Tpo $(DEPDIR)/signalhandler_unittest-signalhandler_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/signalhandler_unittest.cc' object='signalhandler_unittest-signalhandler_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(signalhandler_unittest_CXXFLAGS) $(CXXFLAGS) -c -o signalhandler_unittest-signalhandler_unittest.obj `if test -f 'src/signalhandler_unittest.cc'; then $(CYGPATH_W) 'src/signalhandler_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/signalhandler_unittest.cc'; fi` - -stacktrace_unittest-stacktrace_unittest.o: src/stacktrace_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stacktrace_unittest_CXXFLAGS) $(CXXFLAGS) -MT stacktrace_unittest-stacktrace_unittest.o -MD -MP -MF $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Tpo -c -o stacktrace_unittest-stacktrace_unittest.o `test -f 'src/stacktrace_unittest.cc' || echo '$(srcdir)/'`src/stacktrace_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Tpo $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/stacktrace_unittest.cc' object='stacktrace_unittest-stacktrace_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stacktrace_unittest_CXXFLAGS) $(CXXFLAGS) -c -o stacktrace_unittest-stacktrace_unittest.o `test -f 'src/stacktrace_unittest.cc' || echo '$(srcdir)/'`src/stacktrace_unittest.cc - -stacktrace_unittest-stacktrace_unittest.obj: src/stacktrace_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stacktrace_unittest_CXXFLAGS) $(CXXFLAGS) -MT stacktrace_unittest-stacktrace_unittest.obj -MD -MP -MF $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Tpo -c -o stacktrace_unittest-stacktrace_unittest.obj `if test -f 'src/stacktrace_unittest.cc'; then $(CYGPATH_W) 'src/stacktrace_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/stacktrace_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Tpo $(DEPDIR)/stacktrace_unittest-stacktrace_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/stacktrace_unittest.cc' object='stacktrace_unittest-stacktrace_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stacktrace_unittest_CXXFLAGS) $(CXXFLAGS) -c -o stacktrace_unittest-stacktrace_unittest.obj `if test -f 'src/stacktrace_unittest.cc'; then $(CYGPATH_W) 'src/stacktrace_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/stacktrace_unittest.cc'; fi` - -stl_logging_unittest-stl_logging_unittest.o: src/stl_logging_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) -MT stl_logging_unittest-stl_logging_unittest.o -MD -MP -MF $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Tpo -c -o stl_logging_unittest-stl_logging_unittest.o `test -f 'src/stl_logging_unittest.cc' || echo '$(srcdir)/'`src/stl_logging_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Tpo $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/stl_logging_unittest.cc' object='stl_logging_unittest-stl_logging_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) -c -o stl_logging_unittest-stl_logging_unittest.o `test -f 'src/stl_logging_unittest.cc' || echo '$(srcdir)/'`src/stl_logging_unittest.cc - -stl_logging_unittest-stl_logging_unittest.obj: src/stl_logging_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) -MT stl_logging_unittest-stl_logging_unittest.obj -MD -MP -MF $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Tpo -c -o stl_logging_unittest-stl_logging_unittest.obj `if test -f 'src/stl_logging_unittest.cc'; then $(CYGPATH_W) 'src/stl_logging_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/stl_logging_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Tpo $(DEPDIR)/stl_logging_unittest-stl_logging_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/stl_logging_unittest.cc' object='stl_logging_unittest-stl_logging_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stl_logging_unittest_CXXFLAGS) $(CXXFLAGS) -c -o stl_logging_unittest-stl_logging_unittest.obj `if test -f 'src/stl_logging_unittest.cc'; then $(CYGPATH_W) 'src/stl_logging_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/stl_logging_unittest.cc'; fi` - -symbolize_unittest-symbolize_unittest.o: src/symbolize_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) -MT symbolize_unittest-symbolize_unittest.o -MD -MP -MF $(DEPDIR)/symbolize_unittest-symbolize_unittest.Tpo -c -o symbolize_unittest-symbolize_unittest.o `test -f 'src/symbolize_unittest.cc' || echo '$(srcdir)/'`src/symbolize_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/symbolize_unittest-symbolize_unittest.Tpo $(DEPDIR)/symbolize_unittest-symbolize_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/symbolize_unittest.cc' object='symbolize_unittest-symbolize_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) -c -o symbolize_unittest-symbolize_unittest.o `test -f 'src/symbolize_unittest.cc' || echo '$(srcdir)/'`src/symbolize_unittest.cc - -symbolize_unittest-symbolize_unittest.obj: src/symbolize_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) -MT symbolize_unittest-symbolize_unittest.obj -MD -MP -MF $(DEPDIR)/symbolize_unittest-symbolize_unittest.Tpo -c -o symbolize_unittest-symbolize_unittest.obj `if test -f 'src/symbolize_unittest.cc'; then $(CYGPATH_W) 'src/symbolize_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/symbolize_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/symbolize_unittest-symbolize_unittest.Tpo $(DEPDIR)/symbolize_unittest-symbolize_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/symbolize_unittest.cc' object='symbolize_unittest-symbolize_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(symbolize_unittest_CXXFLAGS) $(CXXFLAGS) -c -o symbolize_unittest-symbolize_unittest.obj `if test -f 'src/symbolize_unittest.cc'; then $(CYGPATH_W) 'src/symbolize_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/symbolize_unittest.cc'; fi` - -utilities_unittest-utilities_unittest.o: src/utilities_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utilities_unittest_CXXFLAGS) $(CXXFLAGS) -MT utilities_unittest-utilities_unittest.o -MD -MP -MF $(DEPDIR)/utilities_unittest-utilities_unittest.Tpo -c -o utilities_unittest-utilities_unittest.o `test -f 'src/utilities_unittest.cc' || echo '$(srcdir)/'`src/utilities_unittest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utilities_unittest-utilities_unittest.Tpo $(DEPDIR)/utilities_unittest-utilities_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/utilities_unittest.cc' object='utilities_unittest-utilities_unittest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utilities_unittest_CXXFLAGS) $(CXXFLAGS) -c -o utilities_unittest-utilities_unittest.o `test -f 'src/utilities_unittest.cc' || echo '$(srcdir)/'`src/utilities_unittest.cc - -utilities_unittest-utilities_unittest.obj: src/utilities_unittest.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utilities_unittest_CXXFLAGS) $(CXXFLAGS) -MT utilities_unittest-utilities_unittest.obj -MD -MP -MF $(DEPDIR)/utilities_unittest-utilities_unittest.Tpo -c -o utilities_unittest-utilities_unittest.obj `if test -f 'src/utilities_unittest.cc'; then $(CYGPATH_W) 'src/utilities_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/utilities_unittest.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/utilities_unittest-utilities_unittest.Tpo $(DEPDIR)/utilities_unittest-utilities_unittest.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/utilities_unittest.cc' object='utilities_unittest-utilities_unittest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utilities_unittest_CXXFLAGS) $(CXXFLAGS) -c -o utilities_unittest-utilities_unittest.obj `if test -f 'src/utilities_unittest.cc'; then $(CYGPATH_W) 'src/utilities_unittest.cc'; else $(CYGPATH_W) '$(srcdir)/src/utilities_unittest.cc'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -install-dist_docDATA: $(dist_doc_DATA) - @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(dist_doc_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ - $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ - done - -uninstall-dist_docDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_doc_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docdir)/$$f"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-glogincludeHEADERS: $(gloginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(glogincludedir)" || $(MKDIR_P) "$(DESTDIR)$(glogincludedir)" - @list='$(gloginclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(glogincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(glogincludedir)/$$f'"; \ - $(glogincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(glogincludedir)/$$f"; \ - done - -uninstall-glogincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(gloginclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(glogincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(glogincludedir)/$$f"; \ - done -install-nodist_glogincludeHEADERS: $(nodist_gloginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(glogincludedir)" || $(MKDIR_P) "$(DESTDIR)$(glogincludedir)" - @list='$(nodist_gloginclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(nodist_glogincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(glogincludedir)/$$f'"; \ - $(nodist_glogincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(glogincludedir)/$$f"; \ - done - -uninstall-nodist_glogincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_gloginclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(glogincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(glogincludedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ - $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(glogincludedir)" "$(DESTDIR)$(glogincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-dist_docDATA install-glogincludeHEADERS \ - install-nodist_glogincludeHEADERS install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-dist_docDATA uninstall-glogincludeHEADERS \ - uninstall-libLTLIBRARIES uninstall-nodist_glogincludeHEADERS \ - uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS ctags dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-glogincludeHEADERS install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nodist_glogincludeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dist_docDATA \ - uninstall-glogincludeHEADERS uninstall-libLTLIBRARIES \ - uninstall-nodist_glogincludeHEADERS uninstall-pkgconfigDATA - -@ENABLE_FRAME_POINTERS_FALSE@@X86_64_TRUE@ # TODO(csilvers): check if -fomit-frame-pointer might be in $(CXXFLAGS), -@ENABLE_FRAME_POINTERS_FALSE@@X86_64_TRUE@ # before setting this. -logging_striplog_test_sh: logging_striptest0 logging_striptest2 logging_striptest10 - $(top_srcdir)/src/logging_striplog_test.sh -demangle_unittest_sh: demangle_unittest - $(builddir)/demangle_unittest # force to create lt-demangle_unittest - $(top_srcdir)/src/demangle_unittest.sh -signalhandler_unittest_sh: signalhandler_unittest - $(builddir)/signalhandler_unittest # force to create lt-signalhandler_unittest - $(top_srcdir)/src/signalhandler_unittest.sh - -rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec - @cd packages && ./rpm.sh ${PACKAGE} ${VERSION} - -deb: dist-gzip packages/deb.sh packages/deb/* - @cd packages && ./deb.sh ${PACKAGE} ${VERSION} - -# Windows wants write permission to .vcproj files and maybe even sln files. -dist-hook: - test -e "$(distdir)/vsprojects" \ - && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/NEWS b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/NEWS deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README deleted file mode 100644 index 77efd375..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README +++ /dev/null @@ -1,5 +0,0 @@ -This repository contains a C++ implementation of the Google logging -module. Documentation for the implementation is in doc/. - -See INSTALL for (generic) installation instructions for C++: basically - ./configure && make && make install diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README.windows b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README.windows deleted file mode 100644 index 74ff6904..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/README.windows +++ /dev/null @@ -1,26 +0,0 @@ -This project has begun being ported to Windows. A working solution -file exists in this directory: - google-glog.sln - -You can load this solution file into VC++ 9.0 (Visual Studio -2008). You may also be able to use this solution file with older -Visual Studios by converting the solution file. - -Note that stack tracing and some unittests are not ported -yet. - -You can also link glog code in statically -- see the example project -libglog_static and logging_unittest_static, which does this. For this -to work, you'll need to add "/D GOOGLE_GLOG_DLL_DECL=" to the compile -line of every glog's .cc file. - -I have little experience with Windows programming, so there may be -better ways to set this up than I've done! If you run across any -problems, please post to the google-glog Google Group, or report -them on the google-glog Google Code site: - http://groups.google.com/group/google-glog - http://code.google.com/p/google-glog/issues/list - --- Shinichiro Hamaji - -Last modified: 23 January 2009 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/aclocal.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/aclocal.m4 deleted file mode 100644 index 5515306d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/aclocal.m4 +++ /dev/null @@ -1,7542 +0,0 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.61],, -[m4_warning([this file was generated for autoconf 2.61. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -_LT_REQUIRED_DARWIN_CHECKS - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# -------------------------- -# Check for some things on darwin -AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[0123]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil="~$DSYMUTIL \$lib || :" - else - _lt_dsymutil= - fi - ;; - esac -]) - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], -[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], -[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= -_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GXX" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 13 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ac_have_attribute.m4]) -m4_include([m4/ac_have_builtin_expect.m4]) -m4_include([m4/ac_have_sync_val_compare_and_swap.m4]) -m4_include([m4/ac_rwlock.m4]) -m4_include([m4/acx_pthread.m4]) -m4_include([m4/google_namespace.m4]) -m4_include([m4/namespaces.m4]) -m4_include([m4/pc_from_ucontext.m4]) -m4_include([m4/stl_namespace.m4]) -m4_include([m4/using_operator.m4]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/autogen.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/autogen.sh deleted file mode 100755 index 4d535922..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/autogen.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Before using, you should figure out all the .m4 macros that your -# configure.m4 script needs and make sure they exist in the autoconf/ -# directory. -# -# These are the files that this script might edit: -# aclocal.m4 configure Makefile.in src/config.h.in \ -# depcomp config.guess config.sub install-sh missing mkinstalldirs \ -# ltmain.sh -# -# Here's a command you can run to see what files aclocal will import: -# aclocal -I ../autoconf --output=- | sed -n 's/^m4_include..\([^]]*\).*/\1/p' - -set -ex -rm -rf autom4te.cache - -aclocal --force -I m4 -grep -q LIBTOOL configure.ac && libtoolize -c -f -autoconf -f -W all,no-obsolete -autoheader -f -W all -automake -a -c -f -W all - -rm -rf autom4te.cache -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/compile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/compile deleted file mode 100755 index 9bb997a6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/compile +++ /dev/null @@ -1,99 +0,0 @@ -#! /bin/sh - -# Wrapper for compilers which do not understand `-c -o'. - -# Copyright 1999, 2000 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Usage: -# compile PROGRAM [ARGS]... -# `-o FOO.o' is removed from the args passed to the actual compile. - -prog=$1 -shift - -ofile= -cfile= -args= -while test $# -gt 0; do - case "$1" in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we do something ugly here. - ofile=$2 - shift - case "$ofile" in - *.o | *.obj) - ;; - *) - args="$args -o $ofile" - ofile= - ;; - esac - ;; - *.c) - cfile=$1 - args="$args $1" - ;; - *) - args="$args $1" - ;; - esac - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$prog" $args -fi - -# Name of file we expect compiler to create. -cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir $lockdir > /dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir $lockdir; exit 1" 1 2 15 - -# Run the compile. -"$prog" $args -status=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -fi - -rmdir $lockdir -exit $status diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.guess b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.guess deleted file mode 100755 index 278f9e9e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.guess +++ /dev/null @@ -1,1516 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-07-22' - -# This file 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.sub b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.sub deleted file mode 100755 index 1761d8bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/config.sub +++ /dev/null @@ -1,1626 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-06-28' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure deleted file mode 100755 index e8760a64..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure +++ /dev/null @@ -1,26565 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for glog 0.3.1. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='glog' -PACKAGE_TARNAME='glog' -PACKAGE_VERSION='0.3.1' -PACKAGE_STRING='glog 0.3.1' -PACKAGE_BUGREPORT='opensource@google.com' - -ac_unique_file="README" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -GCC_TRUE -GCC_FALSE -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -SED -GREP -EGREP -LN_S -ECHO -AR -RANLIB -DSYMUTIL -NMEDIT -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -LIBTOOL_DEPS -ENABLE_FRAME_POINTERS_TRUE -ENABLE_FRAME_POINTERS_FALSE -X86_64_TRUE -X86_64_FALSE -acx_pthread_config -PTHREAD_CC -PTHREAD_LIBS -PTHREAD_CFLAGS -GTEST_CONFIG -GMOCK_CONFIG -HAVE_GMOCK_TRUE -HAVE_GMOCK_FALSE -UNWIND_LIBS -ac_google_start_namespace -ac_google_end_namespace -ac_google_namespace -ac_cv_cxx_using_operator -ac_cv___attribute___noreturn -ac_cv___attribute___printf_4_5 -ac_cv_have___builtin_expect -ac_cv_have_stdint_h -ac_cv_have_systypes_h -ac_cv_have_inttypes_h -ac_cv_have_unistd_h -ac_cv_have_uint16_t -ac_cv_have_u_int16_t -ac_cv_have___uint16 -ac_cv_have_libgflags -GFLAGS_CFLAGS -GTEST_CFLAGS -GMOCK_CFLAGS -GFLAGS_LIBS -GTEST_LIBS -GMOCK_LIBS -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures glog 0.3.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/glog] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of glog 0.3.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-frame-pointers On x86_64 systems, compile with - -fno-omit-frame-pointer (see INSTALL) - --enable-namespace=FOO to define these Google - classes in the FOO namespace. --disable-namespace - to define them in the global namespace. Default - is to define them in namespace google. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] include additional configurations [automatic] - --with-gflags=GFLAGS_DIR - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -glog configure 0.3.1 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by glog $as_me 0.3.1, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# The argument here is just something that should be in the current directory -# (for sanity checking) - -am__api_version='1.10' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='glog' - VERSION='0.3.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_config_headers="$ac_config_headers src/config.h" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -# Checks for programs. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - if test "$GCC" = yes; then - GCC_TRUE= - GCC_FALSE='#' -else - GCC_TRUE='#' - GCC_FALSE= -fi - # let the Makefile know if we're gcc - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 5085 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_f77_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi - - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { echo "$as_me:$LINENO: result: $NMEDIT" >&5 -echo "${ECHO_T}$NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - - { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } - { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_ld_exported_symbols_list=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[0123]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil="~$DSYMUTIL \$lib || :" - else - _lt_dsymutil= - fi - ;; - esac - - -enable_dlopen=no -enable_win32_dll=no - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7439: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7443: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7729: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7733: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7833: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7837: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs=no - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - compiler_lib_search_dirs \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= -compiler_lib_search_dirs_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - if test "$GXX" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -compiler_lib_search_dirs_CXX= -if test -n "$compiler_lib_search_path_CXX"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12711: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12715: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12815: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:12819: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - compiler_lib_search_dirs_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14413: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14417: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_F77=yes - fi - else - lt_cv_prog_compiler_static_works_F77=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14517: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14521: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs_F77=no - else - ld_shlibs_F77=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - compiler_lib_search_dirs_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16737: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16741: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17027: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17031: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_GCJ=yes - fi - else - lt_cv_prog_compiler_static_works_GCJ=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17131: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:17135: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - link_all_deplibs_GCJ=no - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - compiler_lib_search_dirs_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - compiler_lib_search_dirs_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - -# Check whether some low-level functions/files are available - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - -# These are tested for by AC_HEADER_STDC, but I check again to set the var -if test "${ac_cv_header_stdint_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdint_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdint.h usability" >&5 -echo $ECHO_N "checking stdint.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking stdint.h presence" >&5 -echo $ECHO_N "checking stdint.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_stdint_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdint_h" >&6; } - -fi -if test $ac_cv_header_stdint_h = yes; then - ac_cv_have_stdint_h=1 -else - ac_cv_have_stdint_h=0 -fi - - -if test "${ac_cv_header_sys_types_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/types.h usability" >&5 -echo $ECHO_N "checking sys/types.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/types.h presence" >&5 -echo $ECHO_N "checking sys/types.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_types_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6; } - -fi -if test $ac_cv_header_sys_types_h = yes; then - ac_cv_have_systypes_h=1 -else - ac_cv_have_systypes_h=0 -fi - - -if test "${ac_cv_header_inttypes_h+set}" = set; then - { echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } -if test "${ac_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking inttypes.h usability" >&5 -echo $ECHO_N "checking inttypes.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking inttypes.h presence" >&5 -echo $ECHO_N "checking inttypes.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: inttypes.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: inttypes.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: inttypes.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: inttypes.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: inttypes.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: inttypes.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: inttypes.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: inttypes.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } -if test "${ac_cv_header_inttypes_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_inttypes_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6; } - -fi -if test $ac_cv_header_inttypes_h = yes; then - ac_cv_have_inttypes_h=1 -else - ac_cv_have_inttypes_h=0 -fi - - - -for ac_header in unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ac_cv_have_unistd_h=1 -else - ac_cv_have_unistd_h=0 -fi - -done - - -for ac_header in syscall.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/syscall.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -# For backtrace with glibc. - -for ac_header in execinfo.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -# For backtrace with libunwind. - -for ac_header in libunwind.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - ac_cv_have_libunwind_h=1 -else - ac_cv_have_libunwind_h=0 -fi - -done - - -for ac_header in ucontext.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/utsname.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in pwd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in syslog.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/time.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in glob.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6; } -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef void * ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_void_p=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef void * ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_void_p=0 - fi -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - - -# These are the types I need. We look for them in either stdint.h, -# sys/types.h, or inttypes.h, all of which are part of the default-includes. -{ echo "$as_me:$LINENO: checking for uint16_t" >&5 -echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6; } -if test "${ac_cv_type_uint16_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef uint16_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_uint16_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uint16_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 -echo "${ECHO_T}$ac_cv_type_uint16_t" >&6; } -if test $ac_cv_type_uint16_t = yes; then - ac_cv_have_uint16_t=1 -else - ac_cv_have_uint16_t=0 -fi - -{ echo "$as_me:$LINENO: checking for u_int16_t" >&5 -echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; } -if test "${ac_cv_type_u_int16_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef u_int16_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_u_int16_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_u_int16_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5 -echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6; } -if test $ac_cv_type_u_int16_t = yes; then - ac_cv_have_u_int16_t=1 -else - ac_cv_have_u_int16_t=0 -fi - -{ echo "$as_me:$LINENO: checking for __uint16" >&5 -echo $ECHO_N "checking for __uint16... $ECHO_C" >&6; } -if test "${ac_cv_type___uint16+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef __uint16 ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type___uint16=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type___uint16=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type___uint16" >&5 -echo "${ECHO_T}$ac_cv_type___uint16" >&6; } -if test $ac_cv_type___uint16 = yes; then - ac_cv_have___uint16=1 -else - ac_cv_have___uint16=0 -fi - - -{ echo "$as_me:$LINENO: checking for sigaltstack" >&5 -echo $ECHO_N "checking for sigaltstack... $ECHO_C" >&6; } -if test "${ac_cv_func_sigaltstack+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define sigaltstack to an innocuous variant, in case declares sigaltstack. - For example, HP-UX 11i declares gettimeofday. */ -#define sigaltstack innocuous_sigaltstack - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char sigaltstack (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef sigaltstack - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sigaltstack (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_sigaltstack || defined __stub___sigaltstack -choke me -#endif - -int -main () -{ -return sigaltstack (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_sigaltstack=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_sigaltstack=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sigaltstack" >&5 -echo "${ECHO_T}$ac_cv_func_sigaltstack" >&6; } -if test $ac_cv_func_sigaltstack = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SIGALTSTACK 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for dladdr" >&5 -echo $ECHO_N "checking for dladdr... $ECHO_C" >&6; } -if test "${ac_cv_func_dladdr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dladdr to an innocuous variant, in case declares dladdr. - For example, HP-UX 11i declares gettimeofday. */ -#define dladdr innocuous_dladdr - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dladdr (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dladdr - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dladdr (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dladdr || defined __stub___dladdr -choke me -#endif - -int -main () -{ -return dladdr (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dladdr=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dladdr=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dladdr" >&5 -echo "${ECHO_T}$ac_cv_func_dladdr" >&6; } -if test $ac_cv_func_dladdr = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DLADDR 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for fcntl" >&5 -echo $ECHO_N "checking for fcntl... $ECHO_C" >&6; } -if test "${ac_cv_func_fcntl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define fcntl to an innocuous variant, in case declares fcntl. - For example, HP-UX 11i declares gettimeofday. */ -#define fcntl innocuous_fcntl - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char fcntl (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef fcntl - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fcntl (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_fcntl || defined __stub___fcntl -choke me -#endif - -int -main () -{ -return fcntl (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_fcntl=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_fcntl=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5 -echo "${ECHO_T}$ac_cv_func_fcntl" >&6; } -if test $ac_cv_func_fcntl = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FCNTL 1 -_ACEOF - -fi - - - - { echo "$as_me:$LINENO: checking for __attribute__" >&5 -echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; } - if test "${ac_cv___attribute__+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - static void foo(void) __attribute__ ((unused)); - void foo(void) { exit(1); } -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv___attribute__=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv___attribute__=no - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "$ac_cv___attribute__" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE___ATTRIBUTE__ 1 -_ACEOF - - fi - { echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5 -echo "${ECHO_T}$ac_cv___attribute__" >&6; } - -# We only care about these two attributes. -if test x"$ac_cv___attribute__" = x"yes"; then - ac_cv___attribute___noreturn="__attribute__ ((noreturn))" - ac_cv___attribute___printf_4_5="__attribute__((__format__ (__printf__, 4, 5)))" -else - ac_cv___attribute___noreturn= - ac_cv___attribute___printf_4_5= -fi - - - { echo "$as_me:$LINENO: checking for __builtin_expect" >&5 -echo $ECHO_N "checking for __builtin_expect... $ECHO_C" >&6; } - if test "${ac_cv___builtin_expect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int foo(void) { if (__builtin_expect(0, 0)) return 1; return 0; } -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv___builtin_expect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv___builtin_expect=no - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "$ac_cv___builtin_expect" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE___BUILTIN_EXPECT 1 -_ACEOF - - fi - { echo "$as_me:$LINENO: result: $ac_cv___builtin_expect" >&5 -echo "${ECHO_T}$ac_cv___builtin_expect" >&6; } - -if test x"$ac_cv___builtin_expect" = x"yes"; then - ac_cv_have___builtin_expect=1 -else - ac_cv_have___builtin_expect=0 -fi - - - { echo "$as_me:$LINENO: checking for __sync_val_compare_and_swap" >&5 -echo $ECHO_N "checking for __sync_val_compare_and_swap... $ECHO_C" >&6; } - if test "${ac_cv___sync_val_compare_and_swap+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int main() { int a; if (__sync_val_compare_and_swap(&a, 0, 1)) return 1; return 0; } -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv___sync_val_compare_and_swap=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv___sync_val_compare_and_swap=no - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - - if test "$ac_cv___sync_val_compare_and_swap" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE___SYNC_VAL_COMPARE_AND_SWAP 1 -_ACEOF - - fi - { echo "$as_me:$LINENO: result: $ac_cv___sync_val_compare_and_swap" >&5 -echo "${ECHO_T}$ac_cv___sync_val_compare_and_swap" >&6; } - - -# On x86_64, instead of libunwind, we can choose to compile with frame-pointers -# (This isn't needed on i386, where -fno-omit-frame-pointer is the default). -# Check whether --enable-frame_pointers was given. -if test "${enable_frame_pointers+set}" = set; then - enableval=$enable_frame_pointers; -else - enable_frame_pointers=no -fi - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -return __x86_64__ == 1 ? 0 : 1 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - is_x86_64=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - is_x86_64=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$enable_frame_pointers" = yes; then - ENABLE_FRAME_POINTERS_TRUE= - ENABLE_FRAME_POINTERS_FALSE='#' -else - ENABLE_FRAME_POINTERS_TRUE='#' - ENABLE_FRAME_POINTERS_FALSE= -fi - - if test "$is_x86_64" = yes; then - X86_64_TRUE= - X86_64_FALSE='#' -else - X86_64_TRUE='#' - X86_64_FALSE= -fi - - -# Some of the code in this directory depends on pthreads - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_join (); -int -main () -{ -return pthread_join (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - acx_pthread_ok=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 -echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } - ;; - - -*) - { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 -echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$acx_pthread_config"; then - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_acx_pthread_config="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" -fi -fi -acx_pthread_config=$ac_cv_prog_acx_pthread_config -if test -n "$acx_pthread_config"; then - { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 -echo "${ECHO_T}$acx_pthread_config" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 -echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - acx_pthread_ok=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -echo "${ECHO_T}$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 -echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -int attr=$attr; return attr; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - attr_name=$attr; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - done - { echo "$as_me:$LINENO: result: $attr_name" >&5 -echo "${ECHO_T}$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 -echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - { echo "$as_me:$LINENO: result: ${flag}" >&5 -echo "${ECHO_T}${flag}" >&6; } - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - for ac_prog in xlc_r cc_r -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PTHREAD_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 -echo "${ECHO_T}$PTHREAD_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$PTHREAD_CC" && break -done -test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" - - else - PTHREAD_CC=$CC - fi - - # The next part tries to detect GCC inconsistency with -shared on some - # architectures and systems. The problem is that in certain - # configurations, when -shared is specified, GCC "forgets" to - # internally use various flags which are still necessary. - - # - # Prepare the flags - # - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - save_CC="$CC" - - # Try with the flags determined by the earlier checks. - # - # -Wl,-z,defs forces link-time symbol resolution, so that the - # linking checks with -shared actually have any value - # - # FIXME: -fPIC is required for -shared on many architectures, - # so we specify it here, but the right way would probably be to - # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CC="$PTHREAD_CC" - - # In order not to create several levels of indentation, we test - # the value of "$done" until we find the cure or run out of ideas. - done="no" - - # First, make sure the CFLAGS we added are actually accepted by our - # compiler. If not (and OS X's ld, for instance, does not accept -z), - # then we can't do this test. - if test x"$done" = xno; then - { echo "$as_me:$LINENO: checking whether to check for GCC pthread/shared inconsistencies" >&5 -echo $ECHO_N "checking whether to check for GCC pthread/shared inconsistencies... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - done=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$done" = xyes ; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - fi - fi - - if test x"$done" = xno; then - { echo "$as_me:$LINENO: checking whether -pthread is sufficient with -shared" >&5 -echo $ECHO_N "checking whether -pthread is sufficient with -shared... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - done=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$done" = xyes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # - # Linux gcc on some architectures such as mips/mipsel forgets - # about -lpthread - # - if test x"$done" = xno; then - { echo "$as_me:$LINENO: checking whether -lpthread fixes that" >&5 -echo $ECHO_N "checking whether -lpthread fixes that... $ECHO_C" >&6; } - LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - done=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$done" = xyes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - # - # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc - # - if test x"$done" = xno; then - { echo "$as_me:$LINENO: checking whether -lc_r fixes that" >&5 -echo $ECHO_N "checking whether -lc_r fixes that... $ECHO_C" >&6; } - LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - done=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - if test "x$done" = xyes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - if test x"$done" = xno; then - # OK, we have run out of ideas - { echo "$as_me:$LINENO: WARNING: Impossible to determine how to use pthreads with shared libraries" >&5 -echo "$as_me: WARNING: Impossible to determine how to use pthreads with shared libraries" >&2;} - - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" -else - PTHREAD_CC="$CC" -fi - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD 1 -_ACEOF - - : -else - acx_pthread_ok=no - -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -if test x"$acx_pthread_ok" = x"yes"; then - # To make libglog depend on libpthread on Linux, we need to add - # -lpthread in addition to -pthread. - -{ echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5 -echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_self (); -int -main () -{ -return pthread_self (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread_pthread_self=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_self=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; } -if test $ac_cv_lib_pthread_pthread_self = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 -_ACEOF - - LIBS="-lpthread $LIBS" - -fi - -fi - -# Check if there is google-gflags library installed. -SAVE_CFLAGS="$CFLAGS" -SAVE_LIBS="$LIBS" - -# Check whether --with-gflags was given. -if test "${with_gflags+set}" = set; then - withval=$with_gflags; GFLAGS_CFLAGS="-I${with_gflags}/include" - GFLAGS_LIBS="-L${with_gflags}/lib -lgflags" - CFLAGS="$CFLAGS $GFLAGS_CFLAGS" - LIBS="$LIBS $GFLAGS_LIBS" - -fi - -{ echo "$as_me:$LINENO: checking for main in -lgflags" >&5 -echo $ECHO_N "checking for main in -lgflags... $ECHO_C" >&6; } -if test "${ac_cv_lib_gflags_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgflags $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_gflags_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_gflags_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_gflags_main" >&5 -echo "${ECHO_T}$ac_cv_lib_gflags_main" >&6; } -if test $ac_cv_lib_gflags_main = yes; then - ac_cv_have_libgflags=1 -else - ac_cv_have_libgflags=0 -fi - -if test x"$ac_cv_have_libgflags" = x"1"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIB_GFLAGS 1 -_ACEOF - - if test x"$GFLAGS_LIBS" = x""; then - GFLAGS_LIBS="-lgflags" - fi -else - GFLAGS_CFLAGS= - GFLAGS_LIBS= -fi -CFLAGS="$SAVE_CFLAGS" -LIBS="$SAVE_LIBS" - -# TODO(hamaji): Use official m4 macros provided by testing libraries -# once the m4 macro of Google Mocking becomes ready. -# Check if there is Google Test library installed. -# Extract the first word of "gtest-config", so it can be a program name with args. -set dummy gtest-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_GTEST_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$GTEST_CONFIG"; then - ac_cv_prog_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_GTEST_CONFIG=""yes"" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -GTEST_CONFIG=$ac_cv_prog_GTEST_CONFIG -if test -n "$GTEST_CONFIG"; then - { echo "$as_me:$LINENO: result: $GTEST_CONFIG" >&5 -echo "${ECHO_T}$GTEST_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -if test x"$GTEST_CONFIG" = "xyes"; then - GTEST_CFLAGS=`gtest-config --cppflags --cxxflags` - GTEST_LIBS=`gtest-config --ldflags --libs` - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIB_GTEST 1 -_ACEOF - - - # Check if there is Google Mocking library installed. - # Extract the first word of "gmock-config", so it can be a program name with args. -set dummy gmock-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_GMOCK_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$GMOCK_CONFIG"; then - ac_cv_prog_GMOCK_CONFIG="$GMOCK_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_GMOCK_CONFIG=""yes"" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -GMOCK_CONFIG=$ac_cv_prog_GMOCK_CONFIG -if test -n "$GMOCK_CONFIG"; then - { echo "$as_me:$LINENO: result: $GMOCK_CONFIG" >&5 -echo "${ECHO_T}$GMOCK_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test x"$GMOCK_CONFIG" = "xyes"; then - GMOCK_CFLAGS=`gmock-config --cppflags --cxxflags` - GMOCK_LIBS=`gmock-config --ldflags --libs` - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIB_GMOCK 1 -_ACEOF - - else - # We don't run test cases which use Google Mocking framework. - GMOCK_CFLAGS= - GMOCK_LIBS= - fi -else - # We'll use src/googletest.h for our unittests. - GTEST_CFLAGS= - GTEST_LIBS= -fi - if test x"$GMOCK_CONFIG" = "xyes"; then - HAVE_GMOCK_TRUE= - HAVE_GMOCK_FALSE='#' -else - HAVE_GMOCK_TRUE='#' - HAVE_GMOCK_FALSE= -fi - - -# We want to link in libunwind if it exists -UNWIND_LIBS= -# Unfortunately, we need to check the header file in addition to the -# lib file to check if libunwind is available since libunwind-0.98 -# doesn't install all necessary header files. -if test x"$ac_cv_have_libunwind_h" = x"1"; then - { echo "$as_me:$LINENO: checking for backtrace in -lunwind" >&5 -echo $ECHO_N "checking for backtrace in -lunwind... $ECHO_C" >&6; } -if test "${ac_cv_lib_unwind_backtrace+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lunwind $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char backtrace (); -int -main () -{ -return backtrace (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_unwind_backtrace=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_unwind_backtrace=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_backtrace" >&5 -echo "${ECHO_T}$ac_cv_lib_unwind_backtrace" >&6; } -if test $ac_cv_lib_unwind_backtrace = yes; then - UNWIND_LIBS=-lunwind -fi - -fi - -if test x"$UNWIND_LIBS" != x""; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIB_UNWIND 1 -_ACEOF - -fi - -# We'd like to use read/write locks in several places in the code. -# See if our pthreads support extends to that. Note: for linux, it -# does as long as you define _XOPEN_SOURCE appropriately. -{ echo "$as_me:$LINENO: checking support for pthread_rwlock_* functions" >&5 -echo $ECHO_N "checking support for pthread_rwlock_* functions... $ECHO_C" >&6; } -if test "${ac_rwlock+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _XOPEN_SOURCE 500 - #include -int -main () -{ -pthread_rwlock_t l; pthread_rwlock_init(&l, NULL); - pthread_rwlock_rdlock(&l); - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_rwlock=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_rwlock=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi -{ echo "$as_me:$LINENO: result: $ac_rwlock" >&5 -echo "${ECHO_T}$ac_rwlock" >&6; } -if test "$ac_rwlock" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_RWLOCK 1 -_ACEOF - -fi - - -# Find out what namespace 'normal' STL code lives in, and also what namespace -# the user wants our classes to be defined in -{ echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5 -echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6; } -if test "${ac_cv_cxx_namespaces+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -namespace Outer { - namespace Inner { int i = 0; }} -int -main () -{ -using namespace Outer::Inner; return i; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_cxx_namespaces=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_cxx_namespaces=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5 -echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6; } - if test "$ac_cv_cxx_namespaces" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NAMESPACES 1 -_ACEOF - - fi -{ echo "$as_me:$LINENO: checking what namespace STL code is in" >&5 -echo $ECHO_N "checking what namespace STL code is in... $ECHO_C" >&6; } -if test "${ac_cv_cxx_stl_namespace+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -vector t; return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_cxx_stl_namespace=none -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -std::vector t; return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_cxx_stl_namespace=std -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_stl_namespace" >&5 -echo "${ECHO_T}$ac_cv_cxx_stl_namespace" >&6; } - if test "$ac_cv_cxx_stl_namespace" = none; then - -cat >>confdefs.h <<\_ACEOF -#define STL_NAMESPACE -_ACEOF - - fi - if test "$ac_cv_cxx_stl_namespace" = std; then - -cat >>confdefs.h <<\_ACEOF -#define STL_NAMESPACE std -_ACEOF - - fi - -google_namespace_default=google - # Check whether --enable-namespace was given. -if test "${enable_namespace+set}" = set; then - enableval=$enable_namespace; case "$enableval" in - yes) google_namespace="$google_namespace_default" ;; - no) google_namespace="" ;; - *) google_namespace="$enableval" ;; - esac -else - google_namespace="$google_namespace_default" -fi - - if test -n "$google_namespace"; then - ac_google_namespace="$google_namespace" - ac_google_start_namespace="namespace $google_namespace {" - ac_google_end_namespace="}" - else - ac_google_namespace="" - ac_google_start_namespace="" - ac_google_end_namespace="" - fi - -cat >>confdefs.h <<_ACEOF -#define GOOGLE_NAMESPACE $ac_google_namespace -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define _START_GOOGLE_NAMESPACE_ $ac_google_start_namespace -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define _END_GOOGLE_NAMESPACE_ $ac_google_end_namespace -_ACEOF - - - -{ echo "$as_me:$LINENO: checking whether compiler supports using ::operator<<" >&5 -echo $ECHO_N "checking whether compiler supports using ::operator<<... $ECHO_C" >&6; } -if test "${ac_cv_cxx_using_operator+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - std::ostream& operator<<(std::ostream&, struct s); -int -main () -{ -using ::operator<<; return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_cxx_using_operator=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_cxx_using_operator=0 -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_using_operator" >&5 -echo "${ECHO_T}$ac_cv_cxx_using_operator" >&6; } - if test "$ac_cv_cxx_using_operator" = 1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_USING_OPERATOR 1 -_ACEOF - - fi - - -for ac_header in ucontext.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/ucontext.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to opensource@google.com ## -## ------------------------------------ ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - # ucontext on OS X 10.6 (at least) - { echo "$as_me:$LINENO: checking how to access the program counter from a struct ucontext" >&5 -echo $ECHO_N "checking how to access the program counter from a struct ucontext... $ECHO_C" >&6; } - pc_fields=" uc_mcontext.gregs[REG_PC]" # Solaris x86 (32 + 64 bit) - pc_fields="$pc_fields uc_mcontext.gregs[REG_EIP]" # Linux (i386) - pc_fields="$pc_fields uc_mcontext.gregs[REG_RIP]" # Linux (x86_64) - pc_fields="$pc_fields uc_mcontext.sc_ip" # Linux (ia64) - pc_fields="$pc_fields uc_mcontext.uc_regs->gregs[PT_NIP]" # Linux (ppc) - pc_fields="$pc_fields uc_mcontext.gregs[R15]" # Linux (arm old [untested]) - pc_fields="$pc_fields uc_mcontext.arm_pc" # Linux (arm new [untested]) - pc_fields="$pc_fields uc_mcontext.mc_eip" # FreeBSD (i386) - pc_fields="$pc_fields uc_mcontext.mc_rip" # FreeBSD (x86_64 [untested]) - pc_fields="$pc_fields uc_mcontext.__gregs[_REG_EIP]" # NetBSD (i386) - pc_fields="$pc_fields uc_mcontext.__gregs[_REG_RIP]" # NetBSD (x86_64) - pc_fields="$pc_fields uc_mcontext->ss.eip" # OS X (i386, <=10.4) - pc_fields="$pc_fields uc_mcontext->__ss.__eip" # OS X (i386, >=10.5) - pc_fields="$pc_fields uc_mcontext->ss.rip" # OS X (x86_64) - pc_fields="$pc_fields uc_mcontext->__ss.__rip" # OS X (>=10.5 [untested]) - pc_fields="$pc_fields uc_mcontext->ss.srr0" # OS X (ppc, ppc64 [untested]) - pc_fields="$pc_fields uc_mcontext->__ss.__srr0" # OS X (>=10.5 [untested]) - pc_field_found=false - for pc_field in $pc_fields; do - if ! $pc_field_found; then - if test "x$ac_cv_header_sys_ucontext_h" = xyes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _GNU_SOURCE 1 - #include -int -main () -{ -ucontext_t u; return u.$pc_field == 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - -cat >>confdefs.h <<_ACEOF -#define PC_FROM_UCONTEXT $pc_field -_ACEOF - - { echo "$as_me:$LINENO: result: $pc_field" >&5 -echo "${ECHO_T}$pc_field" >&6; } - pc_field_found=true -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _GNU_SOURCE 1 - #include -int -main () -{ -ucontext_t u; return u.$pc_field == 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - -cat >>confdefs.h <<_ACEOF -#define PC_FROM_UCONTEXT $pc_field -_ACEOF - - { echo "$as_me:$LINENO: result: $pc_field" >&5 -echo "${ECHO_T}$pc_field" >&6; } - pc_field_found=true -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - fi - done - if ! $pc_field_found; then - pc_fields=" sc_eip" # OpenBSD (i386) - pc_fields="$pc_fields sc_rip" # OpenBSD (x86_64) - for pc_field in $pc_fields; do - if ! $pc_field_found; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -ucontext_t u; return u.$pc_field == 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - -cat >>confdefs.h <<_ACEOF -#define PC_FROM_UCONTEXT $pc_field -_ACEOF - - { echo "$as_me:$LINENO: result: $pc_field" >&5 -echo "${ECHO_T}$pc_field" >&6; } - pc_field_found=true -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - done - fi - if ! $pc_field_found; then - { echo "$as_me:$LINENO: WARNING: Could not find the PC. Will not output failed addresses..." >&5 -echo "$as_me: WARNING: Could not find the PC. Will not output failed addresses..." >&2;} - fi - - -cat >>confdefs.h <<_ACEOF -#define TEST_SRC_DIR "$srcdir" -_ACEOF - - -# These are what's needed by logging.h.in and raw_logging.h.in - - - - - - - - - - - - - - - - - - - - - - -# Write generated configuration file -ac_config_files="$ac_config_files Makefile src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h" - -ac_config_files="$ac_config_files libglog.pc" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${GCC_TRUE}" && test -z "${GCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"GCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"GCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_FRAME_POINTERS_TRUE}" && test -z "${ENABLE_FRAME_POINTERS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_FRAME_POINTERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_FRAME_POINTERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${X86_64_TRUE}" && test -z "${X86_64_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"X86_64\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"X86_64\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GMOCK_TRUE}" && test -z "${HAVE_GMOCK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GMOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GMOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by glog $as_me 0.3.1, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -glog config.status 0.3.1 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/glog/logging.h") CONFIG_FILES="$CONFIG_FILES src/glog/logging.h" ;; - "src/glog/raw_logging.h") CONFIG_FILES="$CONFIG_FILES src/glog/raw_logging.h" ;; - "src/glog/vlog_is_on.h") CONFIG_FILES="$CONFIG_FILES src/glog/vlog_is_on.h" ;; - "src/glog/stl_logging.h") CONFIG_FILES="$CONFIG_FILES src/glog/stl_logging.h" ;; - "libglog.pc") CONFIG_FILES="$CONFIG_FILES libglog.pc" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -GCC_TRUE!$GCC_TRUE$ac_delim -GCC_FALSE!$GCC_FALSE$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -SED!$SED$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -DSYMUTIL!$DSYMUTIL$ac_delim -NMEDIT!$NMEDIT$ac_delim -CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim -ENABLE_FRAME_POINTERS_TRUE!$ENABLE_FRAME_POINTERS_TRUE$ac_delim -ENABLE_FRAME_POINTERS_FALSE!$ENABLE_FRAME_POINTERS_FALSE$ac_delim -X86_64_TRUE!$X86_64_TRUE$ac_delim -X86_64_FALSE!$X86_64_FALSE$ac_delim -acx_pthread_config!$acx_pthread_config$ac_delim -PTHREAD_CC!$PTHREAD_CC$ac_delim -PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim -PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim -GTEST_CONFIG!$GTEST_CONFIG$ac_delim -GMOCK_CONFIG!$GMOCK_CONFIG$ac_delim -HAVE_GMOCK_TRUE!$HAVE_GMOCK_TRUE$ac_delim -HAVE_GMOCK_FALSE!$HAVE_GMOCK_FALSE$ac_delim -UNWIND_LIBS!$UNWIND_LIBS$ac_delim -ac_google_start_namespace!$ac_google_start_namespace$ac_delim -ac_google_end_namespace!$ac_google_end_namespace$ac_delim -ac_google_namespace!$ac_google_namespace$ac_delim -ac_cv_cxx_using_operator!$ac_cv_cxx_using_operator$ac_delim -ac_cv___attribute___noreturn!$ac_cv___attribute___noreturn$ac_delim -ac_cv___attribute___printf_4_5!$ac_cv___attribute___printf_4_5$ac_delim -ac_cv_have___builtin_expect!$ac_cv_have___builtin_expect$ac_delim -ac_cv_have_stdint_h!$ac_cv_have_stdint_h$ac_delim -ac_cv_have_systypes_h!$ac_cv_have_systypes_h$ac_delim -ac_cv_have_inttypes_h!$ac_cv_have_inttypes_h$ac_delim -ac_cv_have_unistd_h!$ac_cv_have_unistd_h$ac_delim -ac_cv_have_uint16_t!$ac_cv_have_uint16_t$ac_delim -ac_cv_have_u_int16_t!$ac_cv_have_u_int16_t$ac_delim -ac_cv_have___uint16!$ac_cv_have___uint16$ac_delim -ac_cv_have_libgflags!$ac_cv_have_libgflags$ac_delim -GFLAGS_CFLAGS!$GFLAGS_CFLAGS$ac_delim -GTEST_CFLAGS!$GTEST_CFLAGS$ac_delim -GMOCK_CFLAGS!$GMOCK_CFLAGS$ac_delim -GFLAGS_LIBS!$GFLAGS_LIBS$ac_delim -GTEST_LIBS!$GTEST_LIBS$ac_delim -GMOCK_LIBS!$GMOCK_LIBS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. -_am_arg=$ac_file -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure.ac deleted file mode 100644 index c912d1f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/configure.ac +++ /dev/null @@ -1,206 +0,0 @@ -## Process this file with autoconf to produce configure. -## In general, the safest way to proceed is to run the following: -## % aclocal -I . -I `pwd`/../autoconf && autoheader && autoconf && automake - -# make sure we're interpreted by some minimal autoconf -AC_PREREQ(2.57) - -AC_INIT(glog, 0.3.1, opensource@google.com) -# The argument here is just something that should be in the current directory -# (for sanity checking) -AC_CONFIG_SRCDIR(README) -AM_INIT_AUTOMAKE -AM_CONFIG_HEADER(src/config.h) - -AC_LANG(C++) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc - -AC_PROG_LIBTOOL -AC_SUBST(LIBTOOL_DEPS) - -# Check whether some low-level functions/files are available -AC_HEADER_STDC - -# These are tested for by AC_HEADER_STDC, but I check again to set the var -AC_CHECK_HEADER(stdint.h, ac_cv_have_stdint_h=1, ac_cv_have_stdint_h=0) -AC_CHECK_HEADER(sys/types.h, ac_cv_have_systypes_h=1, ac_cv_have_systypes_h=0) -AC_CHECK_HEADER(inttypes.h, ac_cv_have_inttypes_h=1, ac_cv_have_inttypes_h=0) -AC_CHECK_HEADERS(unistd.h, ac_cv_have_unistd_h=1, ac_cv_have_unistd_h=0) -AC_CHECK_HEADERS(syscall.h) -AC_CHECK_HEADERS(sys/syscall.h) -# For backtrace with glibc. -AC_CHECK_HEADERS(execinfo.h) -# For backtrace with libunwind. -AC_CHECK_HEADERS(libunwind.h, ac_cv_have_libunwind_h=1, ac_cv_have_libunwind_h=0) -AC_CHECK_HEADERS(ucontext.h) -AC_CHECK_HEADERS(sys/utsname.h) -AC_CHECK_HEADERS(pwd.h) -AC_CHECK_HEADERS(syslog.h) -AC_CHECK_HEADERS(sys/time.h) -AC_CHECK_HEADERS(glob.h) - -AC_CHECK_SIZEOF(void *) - -# These are the types I need. We look for them in either stdint.h, -# sys/types.h, or inttypes.h, all of which are part of the default-includes. -AC_CHECK_TYPE(uint16_t, ac_cv_have_uint16_t=1, ac_cv_have_uint16_t=0) -AC_CHECK_TYPE(u_int16_t, ac_cv_have_u_int16_t=1, ac_cv_have_u_int16_t=0) -AC_CHECK_TYPE(__uint16, ac_cv_have___uint16=1, ac_cv_have___uint16=0) - -AC_CHECK_FUNC(sigaltstack, - AC_DEFINE(HAVE_SIGALTSTACK, 1, - [Define if you have the `sigaltstack' function])) -AC_CHECK_FUNC(dladdr, - AC_DEFINE(HAVE_DLADDR, 1, - [Define if you have the `dladdr' function])) -AC_CHECK_FUNC(fcntl, - AC_DEFINE(HAVE_FCNTL, 1, - [Define if you have the `fcntl' function])) - -AX_C___ATTRIBUTE__ -# We only care about these two attributes. -if test x"$ac_cv___attribute__" = x"yes"; then - ac_cv___attribute___noreturn="__attribute__ ((noreturn))" - ac_cv___attribute___printf_4_5="__attribute__((__format__ (__printf__, 4, 5)))" -else - ac_cv___attribute___noreturn= - ac_cv___attribute___printf_4_5= -fi - -AX_C___BUILTIN_EXPECT -if test x"$ac_cv___builtin_expect" = x"yes"; then - ac_cv_have___builtin_expect=1 -else - ac_cv_have___builtin_expect=0 -fi - -AX_C___SYNC_VAL_COMPARE_AND_SWAP - -# On x86_64, instead of libunwind, we can choose to compile with frame-pointers -# (This isn't needed on i386, where -fno-omit-frame-pointer is the default). -AC_ARG_ENABLE(frame_pointers, - AS_HELP_STRING([--enable-frame-pointers], - [On x86_64 systems, compile with -fno-omit-frame-pointer (see INSTALL)]),, - enable_frame_pointers=no) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])], - [is_x86_64=yes], [is_x86_64=no]) -AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes) -AM_CONDITIONAL(X86_64, test "$is_x86_64" = yes) - -# Some of the code in this directory depends on pthreads -ACX_PTHREAD -if test x"$acx_pthread_ok" = x"yes"; then - # To make libglog depend on libpthread on Linux, we need to add - # -lpthread in addition to -pthread. - AC_CHECK_LIB(pthread, pthread_self) -fi - -# Check if there is google-gflags library installed. -SAVE_CFLAGS="$CFLAGS" -SAVE_LIBS="$LIBS" -AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR], - GFLAGS_CFLAGS="-I${with_gflags}/include" - GFLAGS_LIBS="-L${with_gflags}/lib -lgflags" - CFLAGS="$CFLAGS $GFLAGS_CFLAGS" - LIBS="$LIBS $GFLAGS_LIBS" -) -AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0) -if test x"$ac_cv_have_libgflags" = x"1"; then - AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library]) - if test x"$GFLAGS_LIBS" = x""; then - GFLAGS_LIBS="-lgflags" - fi -else - GFLAGS_CFLAGS= - GFLAGS_LIBS= -fi -CFLAGS="$SAVE_CFLAGS" -LIBS="$SAVE_LIBS" - -# TODO(hamaji): Use official m4 macros provided by testing libraries -# once the m4 macro of Google Mocking becomes ready. -# Check if there is Google Test library installed. -AC_CHECK_PROG(GTEST_CONFIG, gtest-config, "yes") -if test x"$GTEST_CONFIG" = "xyes"; then - GTEST_CFLAGS=`gtest-config --cppflags --cxxflags` - GTEST_LIBS=`gtest-config --ldflags --libs` - AC_DEFINE(HAVE_LIB_GTEST, 1, [define if you have google gtest library]) - - # Check if there is Google Mocking library installed. - AC_CHECK_PROG(GMOCK_CONFIG, gmock-config, "yes") - if test x"$GMOCK_CONFIG" = "xyes"; then - GMOCK_CFLAGS=`gmock-config --cppflags --cxxflags` - GMOCK_LIBS=`gmock-config --ldflags --libs` - AC_DEFINE(HAVE_LIB_GMOCK, 1, [define if you have google gmock library]) - else - # We don't run test cases which use Google Mocking framework. - GMOCK_CFLAGS= - GMOCK_LIBS= - fi -else - # We'll use src/googletest.h for our unittests. - GTEST_CFLAGS= - GTEST_LIBS= -fi -AM_CONDITIONAL(HAVE_GMOCK, test x"$GMOCK_CONFIG" = "xyes") - -# We want to link in libunwind if it exists -UNWIND_LIBS= -# Unfortunately, we need to check the header file in addition to the -# lib file to check if libunwind is available since libunwind-0.98 -# doesn't install all necessary header files. -if test x"$ac_cv_have_libunwind_h" = x"1"; then - AC_CHECK_LIB(unwind, backtrace, UNWIND_LIBS=-lunwind) -fi -AC_SUBST(UNWIND_LIBS) -if test x"$UNWIND_LIBS" != x""; then - AC_DEFINE(HAVE_LIB_UNWIND, 1, [define if you have libunwind]) -fi - -# We'd like to use read/write locks in several places in the code. -# See if our pthreads support extends to that. Note: for linux, it -# does as long as you define _XOPEN_SOURCE appropriately. -AC_RWLOCK - -# Find out what namespace 'normal' STL code lives in, and also what namespace -# the user wants our classes to be defined in -AC_CXX_STL_NAMESPACE -AC_DEFINE_GOOGLE_NAMESPACE(google) - -AC_CXX_USING_OPERATOR - -AC_PC_FROM_UCONTEXT(AC_MSG_WARN(Could not find the PC. Will not output failed addresses...)) - -AC_DEFINE_UNQUOTED(TEST_SRC_DIR, "$srcdir", [location of source code]) - -# These are what's needed by logging.h.in and raw_logging.h.in -AC_SUBST(ac_google_start_namespace) -AC_SUBST(ac_google_end_namespace) -AC_SUBST(ac_google_namespace) -AC_SUBST(ac_cv_cxx_using_operator) -AC_SUBST(ac_cv___attribute___noreturn) -AC_SUBST(ac_cv___attribute___printf_4_5) -AC_SUBST(ac_cv_have___builtin_expect) -AC_SUBST(ac_cv_have_stdint_h) -AC_SUBST(ac_cv_have_systypes_h) -AC_SUBST(ac_cv_have_inttypes_h) -AC_SUBST(ac_cv_have_unistd_h) -AC_SUBST(ac_cv_have_uint16_t) -AC_SUBST(ac_cv_have_u_int16_t) -AC_SUBST(ac_cv_have___uint16) -AC_SUBST(ac_cv_have_libgflags) -AC_SUBST(GFLAGS_CFLAGS) -AC_SUBST(GTEST_CFLAGS) -AC_SUBST(GMOCK_CFLAGS) -AC_SUBST(GFLAGS_LIBS) -AC_SUBST(GTEST_LIBS) -AC_SUBST(GMOCK_LIBS) - -# Write generated configuration file -AC_CONFIG_FILES([Makefile src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h]) -AC_OUTPUT(libglog.pc) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/depcomp b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/depcomp deleted file mode 100755 index e5f9736c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/depcomp +++ /dev/null @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. - -# 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, 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. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/designstyle.css b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/designstyle.css deleted file mode 100644 index f5d1ec2f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/designstyle.css +++ /dev/null @@ -1,115 +0,0 @@ -body { - background-color: #ffffff; - color: black; - margin-right: 1in; - margin-left: 1in; -} - - -h1, h2, h3, h4, h5, h6 { - color: #3366ff; - font-family: sans-serif; -} -@media print { - /* Darker version for printing */ - h1, h2, h3, h4, h5, h6 { - color: #000080; - font-family: helvetica, sans-serif; - } -} - -h1 { - text-align: center; - font-size: 18pt; -} -h2 { - margin-left: -0.5in; -} -h3 { - margin-left: -0.25in; -} -h4 { - margin-left: -0.125in; -} -hr { - margin-left: -1in; -} - -/* Definition lists: definition term bold */ -dt { - font-weight: bold; -} - -address { - text-align: right; -} -/* Use the tag for bits of code and for variables and objects. */ -code,pre,samp,var { - color: #006000; -} -/* Use the tag for file and directory paths and names. */ -file { - color: #905050; - font-family: monospace; -} -/* Use the tag for stuff the user should type. */ -kbd { - color: #600000; -} -div.note p { - float: right; - width: 3in; - margin-right: 0%; - padding: 1px; - border: 2px solid #6060a0; - background-color: #fffff0; -} - -UL.nobullets { - list-style-type: none; - list-style-image: none; - margin-left: -1em; -} - -/* -body:after { - content: "Google Confidential"; -} -*/ - -/* pretty printing styles. See prettify.js */ -.str { color: #080; } -.kwd { color: #008; } -.com { color: #800; } -.typ { color: #606; } -.lit { color: #066; } -.pun { color: #660; } -.pln { color: #000; } -.tag { color: #008; } -.atn { color: #606; } -.atv { color: #080; } -pre.prettyprint { padding: 2px; border: 1px solid #888; } - -.embsrc { background: #eee; } - -@media print { - .str { color: #060; } - .kwd { color: #006; font-weight: bold; } - .com { color: #600; font-style: italic; } - .typ { color: #404; font-weight: bold; } - .lit { color: #044; } - .pun { color: #440; } - .pln { color: #000; } - .tag { color: #006; font-weight: bold; } - .atn { color: #404; } - .atv { color: #060; } -} - -/* Table Column Headers */ -.hdr { - color: #006; - font-weight: bold; - background-color: #dddddd; } -.hdr2 { - color: #006; - background-color: #eeeeee; } \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/glog.html b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/glog.html deleted file mode 100644 index 4dce0dde..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/doc/glog.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - -How To Use Google Logging Library (glog) - - - - - - - - - -

How To Use Google Logging Library (glog)

-(as of -) - -
- -
- -

Google glog is a library that implements application-level -logging. This library provides logging APIs based on C++-style -streams and various helper macros. -You can log a message by simply streaming things to LOG(<a -particular severity level>), e.g. - -

-   #include <glog/logging.h>
-
-   int main(int argc, char* argv[]) {
-     // Initialize Google's logging library.
-     google::InitGoogleLogging(argv[0]);
-
-     // ...
-     LOG(INFO) << "Found " << num_cookies << " cookies";
-   }
-
- -

Google glog defines a series of macros that simplify many common logging -tasks. You can log messages by severity level, control logging -behavior from the command line, log based on conditionals, abort the -program when expected conditions are not met, introduce your own -verbose logging levels, and more. This document describes the -functionality supported by glog. Please note that this document -doesn't describe all features in this library, but the most useful -ones. If you want to find less common features, please check -header files under src/glog directory. - -

Severity Level

- -

-You can specify one of the following severity levels (in -increasing order of severity): INFO, WARNING, -ERROR, and FATAL. -Logging a FATAL message terminates the program (after the -message is logged). -Note that messages of a given severity are logged not only in the -logfile for that severity, but also in all logfiles of lower severity. -E.g., a message of severity FATAL will be logged to the -logfiles of severity FATAL, ERROR, -WARNING, and INFO. - -

-The DFATAL severity logs a FATAL error in -debug mode (i.e., there is no NDEBUG macro defined), but -avoids halting the program in production by automatically reducing the -severity to ERROR. - -

Unless otherwise specified, glog writes to the filename -"/tmp/<program name>.<hostname>.<user name>.log.<severity level>.<date>.<time>.<pid>" -(e.g., "/tmp/hello_world.example.com.hamaji.log.INFO.20080709-222411.10474"). -By default, glog copies the log messages of severity level -ERROR or FATAL to standard error (stderr) -in addition to log files. - -

Setting Flags

- -

Several flags influence glog's output behavior. -If the Google -gflags library is installed on your machine, the -configure script (see the INSTALL file in the package for -detail of this script) will automatically detect and use it, -allowing you to pass flags on the command line. For example, if you -want to turn the flag --logtostderr on, you can start -your application with the following command line: - -

-   ./your_application --logtostderr=1
-
- -If the Google gflags library isn't installed, you set flags via -environment variables, prefixing the flag name with "GLOG_", e.g. - -
-   GLOG_logtostderr=1 ./your_application
-
- - - -

The following flags are most commonly used: - -

-
logtostderr (bool, default=false) -
Log messages to stderr instead of logfiles.
-Note: you can set binary flags to true by specifying -1, true, or yes (case -insensitive). -Also, you can set binary flags to false by specifying -0, false, or no (again, case -insensitive). -
stderrthreshold (int, default=2, which -is ERROR) -
Copy log messages at or above this level to stderr in -addition to logfiles. The numbers of severity levels -INFO, WARNING, ERROR, and -FATAL are 0, 1, 2, and 3, respectively. -
minloglevel (int, default=0, which -is INFO) -
Log messages at or above this level. Again, the numbers of -severity levels INFO, WARNING, -ERROR, and FATAL are 0, 1, 2, and 3, -respectively. -
log_dir (string, default="") -
If specified, logfiles are written into this directory instead -of the default logging directory. -
v (int, default=0) -
Show all VLOG(m) messages for m less or -equal the value of this flag. Overridable by --vmodule. -See the section about verbose logging for more -detail. -
vmodule (string, default="") -
Per-module verbose level. The argument has to contain a -comma-separated list of <module name>=<log level>. -<module name> -is a glob pattern (e.g., gfs* for all modules whose name -starts with "gfs"), matched against the filename base -(that is, name ignoring .cc/.h./-inl.h). -<log level> overrides any value given by --v. -See also the section about verbose logging. -
- -

There are some other flags defined in logging.cc. Please grep the -source code for "DEFINE_" to see a complete list of all flags. - -

Conditional / Occasional Logging

- -

Sometimes, you may only want to log a message under certain -conditions. You can use the following macros to perform conditional -logging: - -

-   LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-
- -The "Got lots of cookies" message is logged only when the variable -num_cookies exceeds 10. - -If a line of code is executed many times, it may be useful to only log -a message at certain intervals. This kind of logging is most useful -for informational messages. - -
-   LOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie";
-
- -

The above line outputs a log messages on the 1st, 11th, -21st, ... times it is executed. Note that the special -COUNTER value is used to identify which repetition is -happening. - -

You can combine conditional and occasional logging with the -following macro. - -

-   LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << COUNTER
-                                           << "th big cookie";
-
- -

Instead of outputting a message every nth time, you can also limit -the output to the first n occurrences: - -

-   LOG_FIRST_N(INFO, 20) << "Got the " << COUNTER << "th cookie";
-
- -

Outputs log messages for the first 20 times it is executed. Again, -the COUNTER identifier indicates which repetition is -happening. - -

Debug Mode Support

- -

Special "debug mode" logging macros only have an effect in debug -mode and are compiled away to nothing for non-debug mode -compiles. Use these macros to avoid slowing down your production -application due to excessive logging. - -

-   DLOG(INFO) << "Found cookies";
-
-   DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
-
-   DLOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie";
-
- -

CHECK Macros

- -

It is a good practice to check expected conditions in your program -frequently to detect errors as early as possible. The -CHECK macro provides the ability to abort the application -when a condition is not met, similar to the assert macro -defined in the standard C library. - -

CHECK aborts the application if a condition is not -true. Unlike assert, it is *not* controlled by -NDEBUG, so the check will be executed regardless of -compilation mode. Therefore, fp->Write(x) in the -following example is always executed: - -

-   CHECK(fp->Write(x) == 4) << "Write failed!";
-
- -

There are various helper macros for -equality/inequality checks - CHECK_EQ, -CHECK_NE, CHECK_LE, CHECK_LT, -CHECK_GE, and CHECK_GT. -They compare two values, and log a -FATAL message including the two values when the result is -not as expected. The values must have operator<<(ostream, -...) defined. - -

You may append to the error message like so: - -

-   CHECK_NE(1, 2) << ": The world must be ending!";
-
- -

We are very careful to ensure that each argument is evaluated exactly -once, and that anything which is legal to pass as a function argument is -legal here. In particular, the arguments may be temporary expressions -which will end up being destroyed at the end of the apparent statement, -for example: - -

-   CHECK_EQ(string("abc")[1], 'b');
-
- -

The compiler reports an error if one of the arguments is a -pointer and the other is NULL. To work around this, simply static_cast -NULL to the type of the desired pointer. - -

-   CHECK_EQ(some_ptr, static_cast<SomeType*>(NULL));
-
- -

Better yet, use the CHECK_NOTNULL macro: - -

-   CHECK_NOTNULL(some_ptr);
-   some_ptr->DoSomething();
-
- -

Since this macro returns the given pointer, this is very useful in -constructor initializer lists. - -

-   struct S {
-     S(Something* ptr) : ptr_(CHECK_NOTNULL(ptr)) {}
-     Something* ptr_;
-   };
-
- -

Note that you cannot use this macro as a C++ stream due to this -feature. Please use CHECK_EQ described above to log a -custom message before aborting the application. - -

If you are comparing C strings (char *), a handy set of macros -performs case sensitive as well as case insensitive comparisons - -CHECK_STREQ, CHECK_STRNE, -CHECK_STRCASEEQ, and CHECK_STRCASENE. The -CASE versions are case-insensitive. You can safely pass NULL -pointers for this macro. They treat NULL and any -non-NULL string as not equal. Two NULLs are -equal. - -

Note that both arguments may be temporary strings which are -destructed at the end of the current "full expression" -(e.g., CHECK_STREQ(Foo().c_str(), Bar().c_str()) where -Foo and Bar return C++'s -std::string). - -

The CHECK_DOUBLE_EQ macro checks the equality of two -floating point values, accepting a small error margin. -CHECK_NEAR accepts a third floating point argument, which -specifies the acceptable error margin. - -

Verbose Logging

- -

When you are chasing difficult bugs, thorough log messages are very -useful. However, you may want to ignore too verbose messages in usual -development. For such verbose logging, glog provides the -VLOG macro, which allows you to define your own numeric -logging levels. The --v command line option controls -which verbose messages are logged: - -

-   VLOG(1) << "I'm printed when you run the program with --v=1 or higher";
-   VLOG(2) << "I'm printed when you run the program with --v=2 or higher";
-
- -

With VLOG, the lower the verbose level, the more -likely messages are to be logged. For example, if ---v==1, VLOG(1) will log, but -VLOG(2) will not log. This is opposite of the severity -level, where INFO is 0, and ERROR is 2. ---minloglevel of 1 will log WARNING and -above. Though you can specify any integers for both VLOG -macro and --v flag, the common values for them are small -positive integers. For example, if you write VLOG(0), -you should specify --v=-1 or lower to silence it. This -is less useful since we may not want verbose logs by default in most -cases. The VLOG macros always log at the -INFO log level (when they log at all). - -

Verbose logging can be controlled from the command line on a -per-module basis: - -

-   --vmodule=mapreduce=2,file=1,gfs*=3 --v=0
-
- -

will: - -

    -
  • a. Print VLOG(2) and lower messages from mapreduce.{h,cc} -
  • b. Print VLOG(1) and lower messages from file.{h,cc} -
  • c. Print VLOG(3) and lower messages from files prefixed with "gfs" -
  • d. Print VLOG(0) and lower messages from elsewhere -
- -

The wildcarding functionality shown by (c) supports both '*' -(matches 0 or more characters) and '?' (matches any single character) -wildcards. Please also check the section about command line flags. - -

There's also VLOG_IS_ON(n) "verbose level" condition -macro. This macro returns true when the --v is equal or -greater than n. To be used as - -

-   if (VLOG_IS_ON(2)) {
-     // do some logging preparation and logging
-     // that can't be accomplished with just VLOG(2) << ...;
-   }
-
- -

Verbose level condition macros VLOG_IF, -VLOG_EVERY_N and VLOG_IF_EVERY_N behave -analogous to LOG_IF, LOG_EVERY_N, -LOF_IF_EVERY, but accept a numeric verbosity level as -opposed to a severity level. - -

-   VLOG_IF(1, (size > 1024))
-      << "I'm printed when size is more than 1024 and when you run the "
-         "program with --v=1 or more";
-   VLOG_EVERY_N(1, 10)
-      << "I'm printed every 10th occurrence, and when you run the program "
-         "with --v=1 or more. Present occurence is " << COUNTER;
-   VLOG_IF_EVERY_N(1, (size > 1024), 10)
-      << "I'm printed on every 10th occurence of case when size is more "
-         " than 1024, when you run the program with --v=1 or more. ";
-         "Present occurence is " << COUNTER;
-
- -

Failure Signal Handler

- -

-The library provides a convenient signal handler that will dump useful -information when the program crashes on certain signals such as SIGSEGV. -The signal handler can be installed by -google::InstallFailureSignalHandler(). The following is an example of output -from the signal handler. - -

-*** Aborted at 1225095260 (unix time) try "date -d @1225095260" if you are using GNU date ***
-*** SIGSEGV (@0x0) received by PID 17711 (TID 0x7f893090a6f0) from PID 0; stack trace: ***
-PC: @           0x412eb1 TestWaitingLogSink::send()
-    @     0x7f892fb417d0 (unknown)
-    @           0x412eb1 TestWaitingLogSink::send()
-    @     0x7f89304f7f06 google::LogMessage::SendToLog()
-    @     0x7f89304f35af google::LogMessage::Flush()
-    @     0x7f89304f3739 google::LogMessage::~LogMessage()
-    @           0x408cf4 TestLogSinkWaitTillSent()
-    @           0x4115de main
-    @     0x7f892f7ef1c4 (unknown)
-    @           0x4046f9 (unknown)
-
- -

-By default, the signal handler writes the failure dump to the standard -error. You can customize the destination by InstallFailureWriter(). - -

Miscellaneous Notes

- -

Performance of Messages

- -

The conditional logging macros provided by glog (e.g., -CHECK, LOG_IF, VLOG, ...) are -carefully implemented and don't execute the right hand side -expressions when the conditions are false. So, the following check -may not sacrifice the performance of your application. - -

-   CHECK(obj.ok) << obj.CreatePrettyFormattedStringButVerySlow();
-
- -

User-defined Failure Function

- -

FATAL severity level messages or unsatisfied -CHECK condition terminate your program. You can change -the behavior of the termination by -InstallFailureFunction. - -

-   void YourFailureFunction() {
-     // Reports something...
-     exit(1);
-   }
-
-   int main(int argc, char* argv[]) {
-     google::InstallFailureFunction(&YourFailureFunction);
-   }
-
- -

By default, glog tries to dump stacktrace and makes the program -exit with status 1. The stacktrace is produced only when you run the -program on an architecture for which glog supports stack tracing (as -of September 2008, glog supports stack tracing for x86 and x86_64). - -

Raw Logging

- -

The header file <glog/raw_logging.h> can be -used for thread-safe logging, which does not allocate any memory or -acquire any locks. Therefore, the macros defined in this -header file can be used by low-level memory allocation and -synchronization code. -Please check src/glog/raw_logging.h.in for detail. -

- -

Google Style perror()

- -

PLOG() and PLOG_IF() and -PCHECK() behave exactly like their LOG* and -CHECK equivalents with the addition that they append a -description of the current state of errno to their output lines. -E.g. - -

-   PCHECK(write(1, NULL, 2) >= 0) << "Write NULL failed";
-
- -

This check fails with the following error message. - -

-   F0825 185142 test.cc:22] Check failed: write(1, NULL, 2) >= 0 Write NULL failed: Bad address [14]
-
- -

Syslog

- -

SYSLOG, SYSLOG_IF, and -SYSLOG_EVERY_N macros are available. -These log to syslog in addition to the normal logs. Be aware that -logging to syslog can drastically impact performance, especially if -syslog is configured for remote logging! Make sure you understand the -implications of outputting to syslog before you use these macros. In -general, it's wise to use these macros sparingly. - -

Strip Logging Messages

- -

Strings used in log messages can increase the size of your binary -and present a privacy concern. You can therefore instruct glog to -remove all strings which fall below a certain severity level by using -the GOOGLE_STRIP_LOG macro: - -

If your application has code like this: - -

-   #define GOOGLE_STRIP_LOG 1    // this must go before the #include!
-   #include <glog/logging.h>
-
- -

The compiler will remove the log messages whose severities are less -than the specified integer value. Since -VLOG logs at the severity level INFO -(numeric value 0), -setting GOOGLE_STRIP_LOG to 1 or greater removes -all log messages associated with VLOGs as well as -INFO log statements. - -

Notes for Windows users

- -

Google glog defines a severity level ERROR, which is -also defined in windows.h -There are two known workarounds to avoid this conflict: - -

    -
  • #define WIN32_LEAN_AND_MEAN or NOGDI - before you #include windows.h . -
  • #undef ERROR after you #include - windows.h . -
- -

See -this issue for more detail. - -


-
-Shinichiro Hamaji
-Gregor Hohpe
- -
- - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/install-sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/install-sh deleted file mode 100755 index a5897de6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/install-sh +++ /dev/null @@ -1,519 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-12-25.00 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/libglog.pc.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/libglog.pc.in deleted file mode 100644 index ad2b0774..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/libglog.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libglog -Description: Google Log (glog) C++ logging framework -Version: @VERSION@ -Libs: -L${libdir} -lglog -Cflags: -I${includedir} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ltmain.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ltmain.sh deleted file mode 100644 index e420facf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/ltmain.sh +++ /dev/null @@ -1,6964 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="1.5.26 Debian 1.5.26-1ubuntu1" -TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2008 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - *.sx) xform=sx ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$deplibdir/$depdepl" ; then - depdepl="$deplibdir/$depdepl" - elif test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - else - # Can't find it, oh well... - depdepl= - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - case " $deplibs" in - *\ -l* | *\ -L*) - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; - esac - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - case " $deplibs" in - *\ -l* | *\ -L*) - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; - esac - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_attribute.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_attribute.m4 deleted file mode 100644 index 19f4021e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_attribute.m4 +++ /dev/null @@ -1,16 +0,0 @@ -AC_DEFUN([AX_C___ATTRIBUTE__], [ - AC_MSG_CHECKING(for __attribute__) - AC_CACHE_VAL(ac_cv___attribute__, [ - AC_TRY_COMPILE( - [#include - static void foo(void) __attribute__ ((unused)); - void foo(void) { exit(1); }], - [], - ac_cv___attribute__=yes, - ac_cv___attribute__=no - )]) - if test "$ac_cv___attribute__" = "yes"; then - AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) - fi - AC_MSG_RESULT($ac_cv___attribute__) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_builtin_expect.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_builtin_expect.m4 deleted file mode 100644 index e91b6fd9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_builtin_expect.m4 +++ /dev/null @@ -1,14 +0,0 @@ -AC_DEFUN([AX_C___BUILTIN_EXPECT], [ - AC_MSG_CHECKING(for __builtin_expect) - AC_CACHE_VAL(ac_cv___builtin_expect, [ - AC_TRY_COMPILE( - [int foo(void) { if (__builtin_expect(0, 0)) return 1; return 0; }], - [], - ac_cv___builtin_expect=yes, - ac_cv___builtin_expect=no - )]) - if test "$ac_cv___builtin_expect" = "yes"; then - AC_DEFINE(HAVE___BUILTIN_EXPECT, 1, [define if your compiler has __builtin_expect]) - fi - AC_MSG_RESULT($ac_cv___builtin_expect) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_sync_val_compare_and_swap.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_sync_val_compare_and_swap.m4 deleted file mode 100644 index 9ff59c25..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_have_sync_val_compare_and_swap.m4 +++ /dev/null @@ -1,14 +0,0 @@ -AC_DEFUN([AX_C___SYNC_VAL_COMPARE_AND_SWAP], [ - AC_MSG_CHECKING(for __sync_val_compare_and_swap) - AC_CACHE_VAL(ac_cv___sync_val_compare_and_swap, [ - AC_TRY_LINK( - [int main() { int a; if (__sync_val_compare_and_swap(&a, 0, 1)) return 1; return 0; }], - [], - ac_cv___sync_val_compare_and_swap=yes, - ac_cv___sync_val_compare_and_swap=no - )]) - if test "$ac_cv___sync_val_compare_and_swap" = "yes"; then - AC_DEFINE(HAVE___SYNC_VAL_COMPARE_AND_SWAP, 1, [define if your compiler has __sync_val_compare_and_swap]) - fi - AC_MSG_RESULT($ac_cv___sync_val_compare_and_swap) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_rwlock.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_rwlock.m4 deleted file mode 100644 index 706efbbd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/ac_rwlock.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# TODO(csilvers): it would be better to actually try to link against -# -pthreads, to make sure it defines these methods, but that may be -# too hard, since pthread support is really tricky. - -# Check for support for pthread_rwlock_init() etc. -# These aren't posix, but are widely supported. To get them on linux, -# you need to define _XOPEN_SOURCE first, so this check assumes your -# application does that. -# -# Note: OS X (as of 6/1/06) seems to support pthread_rwlock, but -# doesn't define PTHREAD_RWLOCK_INITIALIZER. Therefore, we don't test -# that particularly macro. It's probably best if you don't use that -# macro in your code either. - -AC_DEFUN([AC_RWLOCK], -[AC_CACHE_CHECK(support for pthread_rwlock_* functions, -ac_rwlock, -[AC_LANG_SAVE - AC_LANG_C - AC_TRY_COMPILE([#define _XOPEN_SOURCE 500 - #include ], - [pthread_rwlock_t l; pthread_rwlock_init(&l, NULL); - pthread_rwlock_rdlock(&l); - return 0;], - ac_rwlock=yes, ac_rwlock=no) - AC_LANG_RESTORE -]) -if test "$ac_rwlock" = yes; then - AC_DEFINE(HAVE_RWLOCK,1,[define if the compiler implements pthread_rwlock_*]) -fi -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/acx_pthread.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/acx_pthread.m4 deleted file mode 100644 index 2cf20de1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/acx_pthread.m4 +++ /dev/null @@ -1,363 +0,0 @@ -# This was retrieved from -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi -# See also (perhaps for new versions?) -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi -# -# We've rewritten the inconsistency check code (from avahi), to work -# more broadly. In particular, it no longer assumes ld accepts -zdefs. -# This caused a restructing of the code, but the functionality has only -# changed a little. - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl @summary figure out how to build C programs using POSIX threads -dnl -dnl This macro figures out how to build C programs using POSIX threads. -dnl It sets the PTHREAD_LIBS output variable to the threads library and -dnl linker flags, and the PTHREAD_CFLAGS output variable to any special -dnl C compiler flags that are needed. (The user can also force certain -dnl compiler flags/libs to be tested by setting these environment -dnl variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. e.g. you should link -dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS -dnl $LIBS -dnl -dnl If you are only building threads programs, you may wish to use -dnl these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to -dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to -dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the -dnl default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, or -dnl if you have any other suggestions or comments. This macro was based -dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with -dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros -dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. -dnl We are also grateful for the helpful feedback of numerous users. -dnl -dnl @category InstalledPackages -dnl @author Steven G. Johnson -dnl @version 2006-05-29 -dnl @license GPLWithACException -dnl -dnl Checks for GCC shared/pthread inconsistency based on work by -dnl Marcin Owsiany - - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi - - # The next part tries to detect GCC inconsistency with -shared on some - # architectures and systems. The problem is that in certain - # configurations, when -shared is specified, GCC "forgets" to - # internally use various flags which are still necessary. - - # - # Prepare the flags - # - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - save_CC="$CC" - - # Try with the flags determined by the earlier checks. - # - # -Wl,-z,defs forces link-time symbol resolution, so that the - # linking checks with -shared actually have any value - # - # FIXME: -fPIC is required for -shared on many architectures, - # so we specify it here, but the right way would probably be to - # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CC="$PTHREAD_CC" - - # In order not to create several levels of indentation, we test - # the value of "$done" until we find the cure or run out of ideas. - done="no" - - # First, make sure the CFLAGS we added are actually accepted by our - # compiler. If not (and OS X's ld, for instance, does not accept -z), - # then we can't do this test. - if test x"$done" = xno; then - AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies]) - AC_TRY_LINK(,, , [done=yes]) - - if test "x$done" = xyes ; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi - fi - - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -pthread is sufficient with -shared]) - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - - # - # Linux gcc on some architectures such as mips/mipsel forgets - # about -lpthread - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lpthread fixes that]) - LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - # - # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lc_r fixes that]) - LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - if test x"$done" = xno; then - # OK, we have run out of ideas - AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries]) - - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/google_namespace.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/google_namespace.m4 deleted file mode 100644 index 79e0a6d4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/google_namespace.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Allow users to override the namespace we define our application's classes in -# Arg $1 is the default namespace to use if --enable-namespace isn't present. - -# In general, $1 should be 'google', so we put all our exported symbols in a -# unique namespace that is not likely to conflict with anyone else. However, -# when it makes sense -- for instance, when publishing stl-like code -- you -# may want to go with a different default, like 'std'. - -AC_DEFUN([AC_DEFINE_GOOGLE_NAMESPACE], - [google_namespace_default=[$1] - AC_ARG_ENABLE(namespace, [ --enable-namespace=FOO to define these Google - classes in the FOO namespace. --disable-namespace - to define them in the global namespace. Default - is to define them in namespace $1.], - [case "$enableval" in - yes) google_namespace="$google_namespace_default" ;; - no) google_namespace="" ;; - *) google_namespace="$enableval" ;; - esac], - [google_namespace="$google_namespace_default"]) - if test -n "$google_namespace"; then - ac_google_namespace="$google_namespace" - ac_google_start_namespace="namespace $google_namespace {" - ac_google_end_namespace="}" - else - ac_google_namespace="" - ac_google_start_namespace="" - ac_google_end_namespace="" - fi - AC_DEFINE_UNQUOTED(GOOGLE_NAMESPACE, $ac_google_namespace, - Namespace for Google classes) - AC_DEFINE_UNQUOTED(_START_GOOGLE_NAMESPACE_, $ac_google_start_namespace, - Puts following code inside the Google namespace) - AC_DEFINE_UNQUOTED(_END_GOOGLE_NAMESPACE_, $ac_google_end_namespace, - Stops putting the code inside the Google namespace) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/namespaces.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/namespaces.m4 deleted file mode 100644 index d78dbe4c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/namespaces.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# Checks whether the compiler implements namespaces -AC_DEFUN([AC_CXX_NAMESPACES], - [AC_CACHE_CHECK(whether the compiler implements namespaces, - ac_cv_cxx_namespaces, - [AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { - namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, - ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE]) - if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES, 1, [define if the compiler implements namespaces]) - fi]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/pc_from_ucontext.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/pc_from_ucontext.m4 deleted file mode 100644 index daffddb5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/pc_from_ucontext.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# We want to access the "PC" (Program Counter) register from a struct -# ucontext. Every system has its own way of doing that. We try all the -# possibilities we know about. Note REG_PC should come first (REG_RIP -# is also defined on solaris, but does the wrong thing). - -# OpenBSD doesn't have ucontext.h, but we can get PC from ucontext_t -# by using signal.h. - -# The first argument of AC_PC_FROM_UCONTEXT will be invoked when we -# cannot find a way to obtain PC from ucontext. - -AC_DEFUN([AC_PC_FROM_UCONTEXT], - [AC_CHECK_HEADERS(ucontext.h) - AC_CHECK_HEADERS(sys/ucontext.h) # ucontext on OS X 10.6 (at least) - AC_MSG_CHECKING([how to access the program counter from a struct ucontext]) - pc_fields=" uc_mcontext.gregs[[REG_PC]]" # Solaris x86 (32 + 64 bit) - pc_fields="$pc_fields uc_mcontext.gregs[[REG_EIP]]" # Linux (i386) - pc_fields="$pc_fields uc_mcontext.gregs[[REG_RIP]]" # Linux (x86_64) - pc_fields="$pc_fields uc_mcontext.sc_ip" # Linux (ia64) - pc_fields="$pc_fields uc_mcontext.uc_regs->gregs[[PT_NIP]]" # Linux (ppc) - pc_fields="$pc_fields uc_mcontext.gregs[[R15]]" # Linux (arm old [untested]) - pc_fields="$pc_fields uc_mcontext.arm_pc" # Linux (arm new [untested]) - pc_fields="$pc_fields uc_mcontext.mc_eip" # FreeBSD (i386) - pc_fields="$pc_fields uc_mcontext.mc_rip" # FreeBSD (x86_64 [untested]) - pc_fields="$pc_fields uc_mcontext.__gregs[[_REG_EIP]]" # NetBSD (i386) - pc_fields="$pc_fields uc_mcontext.__gregs[[_REG_RIP]]" # NetBSD (x86_64) - pc_fields="$pc_fields uc_mcontext->ss.eip" # OS X (i386, <=10.4) - pc_fields="$pc_fields uc_mcontext->__ss.__eip" # OS X (i386, >=10.5) - pc_fields="$pc_fields uc_mcontext->ss.rip" # OS X (x86_64) - pc_fields="$pc_fields uc_mcontext->__ss.__rip" # OS X (>=10.5 [untested]) - pc_fields="$pc_fields uc_mcontext->ss.srr0" # OS X (ppc, ppc64 [untested]) - pc_fields="$pc_fields uc_mcontext->__ss.__srr0" # OS X (>=10.5 [untested]) - pc_field_found=false - for pc_field in $pc_fields; do - if ! $pc_field_found; then - if test "x$ac_cv_header_sys_ucontext_h" = xyes; then - AC_TRY_COMPILE([#define _GNU_SOURCE 1 - #include ], - [ucontext_t u; return u.$pc_field == 0;], - AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, - How to access the PC from a struct ucontext) - AC_MSG_RESULT([$pc_field]) - pc_field_found=true) - else - AC_TRY_COMPILE([#define _GNU_SOURCE 1 - #include ], - [ucontext_t u; return u.$pc_field == 0;], - AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, - How to access the PC from a struct ucontext) - AC_MSG_RESULT([$pc_field]) - pc_field_found=true) - fi - fi - done - if ! $pc_field_found; then - pc_fields=" sc_eip" # OpenBSD (i386) - pc_fields="$pc_fields sc_rip" # OpenBSD (x86_64) - for pc_field in $pc_fields; do - if ! $pc_field_found; then - AC_TRY_COMPILE([#include ], - [ucontext_t u; return u.$pc_field == 0;], - AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field, - How to access the PC from a struct ucontext) - AC_MSG_RESULT([$pc_field]) - pc_field_found=true) - fi - done - fi - if ! $pc_field_found; then - [$1] - fi]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/stl_namespace.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/stl_namespace.m4 deleted file mode 100644 index 989ad806..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/stl_namespace.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# We check what namespace stl code like vector expects to be executed in - -AC_DEFUN([AC_CXX_STL_NAMESPACE], - [AC_CACHE_CHECK( - what namespace STL code is in, - ac_cv_cxx_stl_namespace, - [AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include ], - [vector t; return 0;], - ac_cv_cxx_stl_namespace=none) - AC_TRY_COMPILE([#include ], - [std::vector t; return 0;], - ac_cv_cxx_stl_namespace=std) - AC_LANG_RESTORE]) - if test "$ac_cv_cxx_stl_namespace" = none; then - AC_DEFINE(STL_NAMESPACE,, - [the namespace where STL code like vector<> is defined]) - fi - if test "$ac_cv_cxx_stl_namespace" = std; then - AC_DEFINE(STL_NAMESPACE,std, - [the namespace where STL code like vector<> is defined]) - fi -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/using_operator.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/using_operator.m4 deleted file mode 100644 index 95a9951e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/m4/using_operator.m4 +++ /dev/null @@ -1,15 +0,0 @@ -AC_DEFUN([AC_CXX_USING_OPERATOR], - [AC_CACHE_CHECK( - whether compiler supports using ::operator<<, - ac_cv_cxx_using_operator, - [AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include - std::ostream& operator<<(std::ostream&, struct s);], - [using ::operator<<; return 0;], - ac_cv_cxx_using_operator=1, - ac_cv_cxx_using_operator=0) - AC_LANG_RESTORE]) - if test "$ac_cv_cxx_using_operator" = 1; then - AC_DEFINE(HAVE_USING_OPERATOR, 1, [define if the compiler supports using expression for operator]) - fi]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/missing b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/missing deleted file mode 100755 index 1c8ff704..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/mkinstalldirs b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/mkinstalldirs deleted file mode 100755 index ef7e16fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/mkinstalldirs +++ /dev/null @@ -1,161 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2006-05-11.19 - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' -IFS=" "" $nl" -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb.sh deleted file mode 100755 index e6f4aca9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -e - -# This takes one commandline argument, the name of the package. If no -# name is given, then we'll end up just using the name associated with -# an arbitrary .tar.gz file in the rootdir. That's fine: there's probably -# only one. -# -# Run this from the 'packages' directory, just under rootdir - -## Set LIB to lib if exporting a library, empty-string else -LIB= -#LIB=lib - -PACKAGE="$1" -VERSION="$2" - -# We can only build Debian packages, if the Debian build tools are installed -if [ \! -x /usr/bin/debuild ]; then - echo "Cannot find /usr/bin/debuild. Not building Debian packages." 1>&2 - exit 0 -fi - -# Double-check we're in the packages directory, just under rootdir -if [ \! -r ../Makefile -a \! -r ../INSTALL ]; then - echo "Must run $0 in the 'packages' directory, under the root directory." 1>&2 - echo "Also, you must run \"make dist\" before running this script." 1>&2 - exit 0 -fi - -# Find the top directory for this package -topdir="${PWD%/*}" - -# Find the tar archive built by "make dist" -archive="$PACKAGE-$VERSION" -if [ -z "${archive}" ]; then - echo "Cannot find ../$PACKAGE*.tar.gz. Run \"make dist\" first." 1>&2 - exit 0 -fi - -# Create a pristine directory for building the Debian package files -trap 'rm -rf '`pwd`/tmp'; exit $?' EXIT SIGHUP SIGINT SIGTERM - -rm -rf tmp -mkdir -p tmp -cd tmp - -# Debian has very specific requirements about the naming of build -# directories, and tar archives. It also wants to write all generated -# packages to the parent of the source directory. We accommodate these -# requirements by building directly from the tar file. -ln -s "${topdir}/${archive}.tar.gz" "${LIB}${archive}.orig.tar.gz" -tar zfx "${LIB}${archive}.orig.tar.gz" -[ -n "${LIB}" ] && mv "${archive}" "${LIB}${archive}" -cd "${LIB}${archive}" -# This is one of those 'specific requirements': where the deb control files live -ln -s "packages/deb" "debian" - -# Now, we can call Debian's standard build tool -debuild -uc -us -cd ../.. # get back to the original top-level dir - -# We'll put the result in a subdirectory that's named after the OS version -# we've made this .deb file for. -destdir="debian-$(cat /etc/debian_version 2>/dev/null || echo UNKNOWN)" - -rm -rf "$destdir" -mkdir -p "$destdir" -mv $(find tmp -mindepth 1 -maxdepth 1 -type f) "$destdir" - -echo -echo "The Debian package files are located in $PWD/$destdir" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/README b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/README deleted file mode 100644 index 57becfda..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/README +++ /dev/null @@ -1,7 +0,0 @@ -The list of files here isn't complete. For a step-by-step guide on -how to set this package up correctly, check out - http://www.debian.org/doc/maint-guide/ - -Most of the files that are in this directory are boilerplate. -However, you may need to change the list of binary-arch dependencies -in 'rules'. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/changelog b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/changelog deleted file mode 100644 index 524bedfd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/changelog +++ /dev/null @@ -1,41 +0,0 @@ -google-glog (0.3.1-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Tue, 15 Jun 2010 13:50:47 +0900 - -google-glog (0.3-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Thu, 30 Jul 2009 21:31:35 +0900 - -google-glog (0.2.1-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Fri, 10 Apr 2009 15:24:17 +0900 - -google-glog (0.2-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Fri, 23 Jan 2009 03:14:29 +0900 - -google-glog (0.1.2-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Tue, 18 Nov 2008 20:37:00 +0900 - -google-glog (0.1.1-1) unstable; urgency=low - - * New upstream release. - - -- Google Inc. Wed, 15 Oct 2008 20:38:19 +0900 - -google-glog (0.1-1) unstable; urgency=low - - * Initial release. - - -- Google Inc. Sat, 10 May 2008 12:31:10 +0900 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/compat b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/compat deleted file mode 100644 index b8626c4c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/compat +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/control b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/control deleted file mode 100644 index 110a72cb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/control +++ /dev/null @@ -1,23 +0,0 @@ -Source: google-glog -Priority: optional -Maintainer: Google Inc. -Build-Depends: debhelper (>= 4.0.0), binutils -Standards-Version: 3.6.1 - -Package: libgoogle-glog-dev -Section: libdevel -Architecture: any -Depends: libgoogle-glog0 (= ${Source-Version}) -Description: a library that implements application-level logging. - This library provides logging APIs based on C++-style streams and - various helper macros. The devel package contains static and debug - libraries and header files for developing applications that use the - google-glog package. - -Package: libgoogle-glog0 -Section: libs -Architecture: any -Depends: ${shlibs:Depends} -Description: a library that implements application-level logging. - This library provides logging APIs based on C++-style streams and - various helper macros. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/copyright b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/copyright deleted file mode 100644 index ed9d9d1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/copyright +++ /dev/null @@ -1,35 +0,0 @@ -This package was debianized by Google Inc. on -13 June 2008. - -It was downloaded from http://code.google.com/ - -Upstream Author: opensource@google.com - -Copyright (c) 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/docs b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/docs deleted file mode 100644 index c3d0789b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/docs +++ /dev/null @@ -1,8 +0,0 @@ -AUTHORS -COPYING -ChangeLog -INSTALL -NEWS -README -doc/designstyle.css -doc/glog.html diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.dirs b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.dirs deleted file mode 100644 index bddfbf5c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.dirs +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib -usr/lib/pkgconfig -usr/include -usr/include/glog diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.install b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.install deleted file mode 100644 index 9c61e86e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog-dev.install +++ /dev/null @@ -1,10 +0,0 @@ -usr/include/glog/* -usr/lib/lib*.so -usr/lib/lib*.a -usr/lib/*.la -usr/lib/pkgconfig/* -debian/tmp/usr/include/glog/* -debian/tmp/usr/lib/lib*.so -debian/tmp/usr/lib/lib*.a -debian/tmp/usr/lib/*.la -debian/tmp/usr/lib/pkgconfig/* diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.dirs b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.dirs deleted file mode 100644 index 68457717..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.install b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.install deleted file mode 100644 index 704ea87a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/libgoogle-glog0.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/lib*.so.* -debian/tmp/usr/lib/lib*.so.* diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/rules b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/rules deleted file mode 100755 index f520befd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/deb/rules +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -# shared library versions, option 1 -#version=2.0.5 -#major=2 -# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so -version=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` -major=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` - -config.status: configure - dh_testdir - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info - - -build: build-stamp -build-stamp: config.status - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples - dh_install --sourcedir=debian/tmp -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_python - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm.sh deleted file mode 100755 index 5395dc02..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -e - -# Run this from the 'packages' directory, just under rootdir - -# We can only build rpm packages, if the rpm build tools are installed -if [ \! -x /usr/bin/rpmbuild ] -then - echo "Cannot find /usr/bin/rpmbuild. Not building an rpm." 1>&2 - exit 0 -fi - -# Check the commandline flags -PACKAGE="$1" -VERSION="$2" -fullname="${PACKAGE}-${VERSION}" -archive=../$fullname.tar.gz - -if [ -z "$1" -o -z "$2" ] -then - echo "Usage: $0 " 1>&2 - exit 0 -fi - -# Double-check we're in the packages directory, just under rootdir -if [ \! -r ../Makefile -a \! -r ../INSTALL ] -then - echo "Must run $0 in the 'packages' directory, under the root directory." 1>&2 - echo "Also, you must run \"make dist\" before running this script." 1>&2 - exit 0 -fi - -if [ \! -r "$archive" ] -then - echo "Cannot find $archive. Run \"make dist\" first." 1>&2 - exit 0 -fi - -# Create the directory where the input lives, and where the output should live -RPM_SOURCE_DIR="/tmp/rpmsource-$fullname" -RPM_BUILD_DIR="/tmp/rpmbuild-$fullname" - -trap 'rm -rf $RPM_SOURCE_DIR $RPM_BUILD_DIR; exit $?' EXIT SIGHUP SIGINT SIGTERM - -rm -rf "$RPM_SOURCE_DIR" "$RPM_BUILD_DIR" -mkdir "$RPM_SOURCE_DIR" -mkdir "$RPM_BUILD_DIR" - -cp "$archive" "$RPM_SOURCE_DIR" - -rpmbuild -bb rpm/rpm.spec \ - --define "NAME $PACKAGE" \ - --define "VERSION $VERSION" \ - --define "_sourcedir $RPM_SOURCE_DIR" \ - --define "_builddir $RPM_BUILD_DIR" \ - --define "_rpmdir $RPM_SOURCE_DIR" - -# We put the output in a directory based on what system we've built for -destdir=rpm-unknown -if [ -r /etc/issue ] -then - grep "Red Hat.*release 7" /etc/issue >/dev/null 2>&1 && destdir=rh7 - grep "Red Hat.*release 8" /etc/issue >/dev/null 2>&1 && destdir=rh8 - grep "Red Hat.*release 9" /etc/issue >/dev/null 2>&1 && destdir=rh9 - if grep Fedora /etc/issue >/dev/null; then - destdir=fc`grep Fedora /etc/issue | cut -d' ' -f 4`; - fi -fi - -rm -rf "$destdir" -mkdir -p "$destdir" -# We want to get not only the main package but devel etc, hence the middle * -mv "$RPM_SOURCE_DIR"/*/"${PACKAGE}"-*"${VERSION}"*.rpm "$destdir" - -echo -echo "The rpm package file(s) are located in $PWD/$destdir" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm/rpm.spec b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm/rpm.spec deleted file mode 100644 index c2edc83a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/packages/rpm/rpm.spec +++ /dev/null @@ -1,72 +0,0 @@ -%define RELEASE 1 -%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} -%define prefix /usr - -Name: %NAME -Summary: A C++ application logging library -Version: %VERSION -Release: %rel -Group: Development/Libraries -URL: http://code.google.com/p/google-glog -License: BSD -Vendor: Google -Packager: Google Inc. -Source: http://%{NAME}.googlecode.com/files/%{NAME}-%{VERSION}.tar.gz -Distribution: Redhat 7 and above. -Buildroot: %{_tmppath}/%{name}-root -Prefix: %prefix - -%description -The %name package contains a library that implements application-level -logging. This library provides logging APIs based on C++-style -streams and various helper macros. - -%package devel -Summary: A C++ application logging library -Group: Development/Libraries -Requires: %{NAME} = %{VERSION} - -%description devel -The %name-devel package contains static and debug libraries and header -files for developing applications that use the %name package. - -%changelog - * Wed Mar 26 2008 - - First draft - -%prep -%setup - -%build -./configure -make prefix=%prefix - -%install -rm -rf $RPM_BUILD_ROOT -make prefix=$RPM_BUILD_ROOT%{prefix} install - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) - -## Mark all installed files within /usr/share/doc/{package name} as -## documentation. This depends on the following two lines appearing in -## Makefile.am: -## docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) -## dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README -%docdir %{prefix}/share/doc/%{NAME}-%{VERSION} -%{prefix}/share/doc/%{NAME}-%{VERSION}/* - -%{prefix}/lib/libglog.so.0 -%{prefix}/lib/libglog.so.0.0.0 - -%files devel -%defattr(-,root,root) - -%{prefix}/include/glog -%{prefix}/lib/libglog.a -%{prefix}/lib/libglog.la -%{prefix}/lib/libglog.so -%{prefix}/lib/pkgconfig/libglog.pc diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/commandlineflags.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/commandlineflags.h deleted file mode 100644 index 53d9485f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/commandlineflags.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// This file is a compatibility layer that defines Google's version of -// command line flags that are used for configuration. -// -// We put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the -// current namespace. The net result is to force people to use -// DECLARE to get access to a flag, rather than saying -// extern bool FLAGS_logtostderr; -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, -// and make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. -#ifndef BASE_COMMANDLINEFLAGS_H__ -#define BASE_COMMANDLINEFLAGS_H__ - -#include "config.h" -#include -#include // for memchr -#include // for getenv - -#ifdef HAVE_LIB_GFLAGS - -#include - -#else - -#include "glog/logging.h" - -#define DECLARE_VARIABLE(type, name, tn) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead { \ - extern GOOGLE_GLOG_DLL_DECL type FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead::FLAGS_##name -#define DEFINE_VARIABLE(type, name, value, meaning, tn) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead { \ - GOOGLE_GLOG_DLL_DECL type FLAGS_##name(value); \ - char FLAGS_no##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead::FLAGS_##name - -// bool specialization -#define DECLARE_bool(name) \ - DECLARE_VARIABLE(bool, name, bool) -#define DEFINE_bool(name, value, meaning) \ - DEFINE_VARIABLE(bool, name, value, meaning, bool) - -// int32 specialization -#define DECLARE_int32(name) \ - DECLARE_VARIABLE(GOOGLE_NAMESPACE::int32, name, int32) -#define DEFINE_int32(name, value, meaning) \ - DEFINE_VARIABLE(GOOGLE_NAMESPACE::int32, name, value, meaning, int32) - -// Special case for string, because we have to specify the namespace -// std::string, which doesn't play nicely with our FLAG__namespace hackery. -#define DECLARE_string(name) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead { \ - extern GOOGLE_GLOG_DLL_DECL std::string FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead::FLAGS_##name -#define DEFINE_string(name, value, meaning) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead { \ - GOOGLE_GLOG_DLL_DECL std::string FLAGS_##name(value); \ - char FLAGS_no##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead::FLAGS_##name - -#endif // HAVE_LIB_GFLAGS - -// Define GLOG_DEFINE_* using DEFINE_* . By using these macros, we -// have GLOG_* environ variables even if we have gflags installed. -// -// If both an environment variable and a flag are specified, the value -// specified by a flag wins. E.g., if GLOG_v=0 and --v=1, the -// verbosity will be 1, not 0. - -#define GLOG_DEFINE_bool(name, value, meaning) \ - DEFINE_bool(name, EnvToBool("GLOG_" #name, value), meaning) - -#define GLOG_DEFINE_int32(name, value, meaning) \ - DEFINE_int32(name, EnvToInt("GLOG_" #name, value), meaning) - -#define GLOG_DEFINE_string(name, value, meaning) \ - DEFINE_string(name, EnvToString("GLOG_" #name, value), meaning) - -// These macros (could be functions, but I don't want to bother with a .cc -// file), make it easier to initialize flags from the environment. - -#define EnvToString(envname, dflt) \ - (!getenv(envname) ? (dflt) : getenv(envname)) - -#define EnvToBool(envname, dflt) \ - (!getenv(envname) ? (dflt) : memchr("tTyY1\0", getenv(envname)[0], 6) != NULL) - -#define EnvToInt(envname, dflt) \ - (!getenv(envname) ? (dflt) : strtol(getenv(envname), NULL, 10)) - -#endif // BASE_COMMANDLINEFLAGS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/googleinit.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/googleinit.h deleted file mode 100644 index c907308e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/googleinit.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Author: Jacob Hoffman-Andrews - -#ifndef _GOOGLEINIT_H -#define _GOOGLEINIT_H - -class GoogleInitializer { - public: - typedef void (*void_function)(void); - GoogleInitializer(const char* name, void_function f) { - f(); - } -}; - -#define REGISTER_MODULE_INITIALIZER(name, body) \ - namespace { \ - static void google_init_module_##name () { body; } \ - GoogleInitializer google_initializer_module_##name(#name, \ - google_init_module_##name); \ - } - -#endif /* _GOOGLEINIT_H */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/mutex.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/mutex.h deleted file mode 100644 index 7ba88cb5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/base/mutex.h +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// Author: Craig Silverstein. -// -// A simple mutex wrapper, supporting locks and read-write locks. -// You should assume the locks are *not* re-entrant. -// -// To use: you should define the following macros in your configure.ac: -// ACX_PTHREAD -// AC_RWLOCK -// The latter is defined in ../autoconf. -// -// This class is meant to be internal-only and should be wrapped by an -// internal namespace. Before you use this module, please give the -// name of your internal namespace for this module. Or, if you want -// to expose it, you'll want to move it to the Google namespace. We -// cannot put this class in global namespace because there can be some -// problems when we have multiple versions of Mutex in each shared object. -// -// NOTE: by default, we have #ifdef'ed out the TryLock() method. -// This is for two reasons: -// 1) TryLock() under Windows is a bit annoying (it requires a -// #define to be defined very early). -// 2) TryLock() is broken for NO_THREADS mode, at least in NDEBUG -// mode. -// If you need TryLock(), and either these two caveats are not a -// problem for you, or you're willing to work around them, then -// feel free to #define GMUTEX_TRYLOCK, or to remove the #ifdefs -// in the code below. -// -// CYGWIN NOTE: Cygwin support for rwlock seems to be buggy: -// http://www.cygwin.com/ml/cygwin/2008-12/msg00017.html -// Because of that, we might as well use windows locks for -// cygwin. They seem to be more reliable than the cygwin pthreads layer. -// -// TRICKY IMPLEMENTATION NOTE: -// This class is designed to be safe to use during -// dynamic-initialization -- that is, by global constructors that are -// run before main() starts. The issue in this case is that -// dynamic-initialization happens in an unpredictable order, and it -// could be that someone else's dynamic initializer could call a -// function that tries to acquire this mutex -- but that all happens -// before this mutex's constructor has run. (This can happen even if -// the mutex and the function that uses the mutex are in the same .cc -// file.) Basically, because Mutex does non-trivial work in its -// constructor, it's not, in the naive implementation, safe to use -// before dynamic initialization has run on it. -// -// The solution used here is to pair the actual mutex primitive with a -// bool that is set to true when the mutex is dynamically initialized. -// (Before that it's false.) Then we modify all mutex routines to -// look at the bool, and not try to lock/unlock until the bool makes -// it to true (which happens after the Mutex constructor has run.) -// -// This works because before main() starts -- particularly, during -// dynamic initialization -- there are no threads, so a) it's ok that -// the mutex operations are a no-op, since we don't need locking then -// anyway; and b) we can be quite confident our bool won't change -// state between a call to Lock() and a call to Unlock() (that would -// require a global constructor in one translation unit to call Lock() -// and another global constructor in another translation unit to call -// Unlock() later, which is pretty perverse). -// -// That said, it's tricky, and can conceivably fail; it's safest to -// avoid trying to acquire a mutex in a global constructor, if you -// can. One way it can fail is that a really smart compiler might -// initialize the bool to true at static-initialization time (too -// early) rather than at dynamic-initialization time. To discourage -// that, we set is_safe_ to true in code (not the constructor -// colon-initializer) and set it to true via a function that always -// evaluates to true, but that the compiler can't know always -// evaluates to true. This should be good enough. - -#ifndef GOOGLE_MUTEX_H_ -#define GOOGLE_MUTEX_H_ - -#include "config.h" // to figure out pthreads support - -#if defined(NO_THREADS) - typedef int MutexType; // to keep a lock-count -#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__) -# define WIN32_LEAN_AND_MEAN // We only need minimal includes -# ifdef GMUTEX_TRYLOCK - // We need Windows NT or later for TryEnterCriticalSection(). If you - // don't need that functionality, you can remove these _WIN32_WINNT - // lines, and change TryLock() to assert(0) or something. -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0400 -# endif -# endif -// To avoid macro definition of ERROR. -# define NOGDI -// To avoid macro definition of min/max. -# define NOMINMAX -# include - typedef CRITICAL_SECTION MutexType; -#elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK) - // Needed for pthread_rwlock_*. If it causes problems, you could take it - // out, but then you'd have to unset HAVE_RWLOCK (at least on linux -- it - // *does* cause problems for FreeBSD, or MacOSX, but isn't needed - // for locking there.) -# ifdef __linux__ -# define _XOPEN_SOURCE 500 // may be needed to get the rwlock calls -# endif -# include - typedef pthread_rwlock_t MutexType; -#elif defined(HAVE_PTHREAD) -# include - typedef pthread_mutex_t MutexType; -#else -# error Need to implement mutex.h for your architecture, or #define NO_THREADS -#endif - -// We need to include these header files after defining _XOPEN_SOURCE -// as they may define the _XOPEN_SOURCE macro. -#include -#include // for abort() - -#define MUTEX_NAMESPACE glog_internal_namespace_ - -namespace MUTEX_NAMESPACE { - -class Mutex { - public: - // Create a Mutex that is not held by anybody. This constructor is - // typically used for Mutexes allocated on the heap or the stack. - // See below for a recommendation for constructing global Mutex - // objects. - inline Mutex(); - - // Destructor - inline ~Mutex(); - - inline void Lock(); // Block if needed until free then acquire exclusively - inline void Unlock(); // Release a lock acquired via Lock() -#ifdef GMUTEX_TRYLOCK - inline bool TryLock(); // If free, Lock() and return true, else return false -#endif - // Note that on systems that don't support read-write locks, these may - // be implemented as synonyms to Lock() and Unlock(). So you can use - // these for efficiency, but don't use them anyplace where being able - // to do shared reads is necessary to avoid deadlock. - inline void ReaderLock(); // Block until free or shared then acquire a share - inline void ReaderUnlock(); // Release a read share of this Mutex - inline void WriterLock() { Lock(); } // Acquire an exclusive lock - inline void WriterUnlock() { Unlock(); } // Release a lock from WriterLock() - - // TODO(hamaji): Do nothing, implement correctly. - inline void AssertHeld() {} - - private: - MutexType mutex_; - // We want to make sure that the compiler sets is_safe_ to true only - // when we tell it to, and never makes assumptions is_safe_ is - // always true. volatile is the most reliable way to do that. - volatile bool is_safe_; - - inline void SetIsSafe() { is_safe_ = true; } - - // Catch the error of writing Mutex when intending MutexLock. - Mutex(Mutex* /*ignored*/) {} - // Disallow "evil" constructors - Mutex(const Mutex&); - void operator=(const Mutex&); -}; - -// Now the implementation of Mutex for various systems -#if defined(NO_THREADS) - -// When we don't have threads, we can be either reading or writing, -// but not both. We can have lots of readers at once (in no-threads -// mode, that's most likely to happen in recursive function calls), -// but only one writer. We represent this by having mutex_ be -1 when -// writing and a number > 0 when reading (and 0 when no lock is held). -// -// In debug mode, we assert these invariants, while in non-debug mode -// we do nothing, for efficiency. That's why everything is in an -// assert. - -Mutex::Mutex() : mutex_(0) { } -Mutex::~Mutex() { assert(mutex_ == 0); } -void Mutex::Lock() { assert(--mutex_ == -1); } -void Mutex::Unlock() { assert(mutex_++ == -1); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { if (mutex_) return false; Lock(); return true; } -#endif -void Mutex::ReaderLock() { assert(++mutex_ > 0); } -void Mutex::ReaderUnlock() { assert(mutex_-- > 0); } - -#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__) - -Mutex::Mutex() { InitializeCriticalSection(&mutex_); SetIsSafe(); } -Mutex::~Mutex() { DeleteCriticalSection(&mutex_); } -void Mutex::Lock() { if (is_safe_) EnterCriticalSection(&mutex_); } -void Mutex::Unlock() { if (is_safe_) LeaveCriticalSection(&mutex_); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - TryEnterCriticalSection(&mutex_) != 0 : true; } -#endif -void Mutex::ReaderLock() { Lock(); } // we don't have read-write locks -void Mutex::ReaderUnlock() { Unlock(); } - -#elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK) - -#define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ - if (is_safe_ && fncall(&mutex_) != 0) abort(); \ -} while (0) - -Mutex::Mutex() { - SetIsSafe(); - if (is_safe_ && pthread_rwlock_init(&mutex_, NULL) != 0) abort(); -} -Mutex::~Mutex() { SAFE_PTHREAD(pthread_rwlock_destroy); } -void Mutex::Lock() { SAFE_PTHREAD(pthread_rwlock_wrlock); } -void Mutex::Unlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - pthread_rwlock_trywrlock(&mutex_) == 0 : - true; } -#endif -void Mutex::ReaderLock() { SAFE_PTHREAD(pthread_rwlock_rdlock); } -void Mutex::ReaderUnlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } -#undef SAFE_PTHREAD - -#elif defined(HAVE_PTHREAD) - -#define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ - if (is_safe_ && fncall(&mutex_) != 0) abort(); \ -} while (0) - -Mutex::Mutex() { - SetIsSafe(); - if (is_safe_ && pthread_mutex_init(&mutex_, NULL) != 0) abort(); -} -Mutex::~Mutex() { SAFE_PTHREAD(pthread_mutex_destroy); } -void Mutex::Lock() { SAFE_PTHREAD(pthread_mutex_lock); } -void Mutex::Unlock() { SAFE_PTHREAD(pthread_mutex_unlock); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - pthread_mutex_trylock(&mutex_) == 0 : true; } -#endif -void Mutex::ReaderLock() { Lock(); } -void Mutex::ReaderUnlock() { Unlock(); } -#undef SAFE_PTHREAD - -#endif - -// -------------------------------------------------------------------------- -// Some helper classes - -// MutexLock(mu) acquires mu when constructed and releases it when destroyed. -class MutexLock { - public: - explicit MutexLock(Mutex *mu) : mu_(mu) { mu_->Lock(); } - ~MutexLock() { mu_->Unlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - MutexLock(const MutexLock&); - void operator=(const MutexLock&); -}; - -// ReaderMutexLock and WriterMutexLock do the same, for rwlocks -class ReaderMutexLock { - public: - explicit ReaderMutexLock(Mutex *mu) : mu_(mu) { mu_->ReaderLock(); } - ~ReaderMutexLock() { mu_->ReaderUnlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - ReaderMutexLock(const ReaderMutexLock&); - void operator=(const ReaderMutexLock&); -}; - -class WriterMutexLock { - public: - explicit WriterMutexLock(Mutex *mu) : mu_(mu) { mu_->WriterLock(); } - ~WriterMutexLock() { mu_->WriterUnlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - WriterMutexLock(const WriterMutexLock&); - void operator=(const WriterMutexLock&); -}; - -// Catch bug where variable name is omitted, e.g. MutexLock (&mu); -#define MutexLock(x) COMPILE_ASSERT(0, mutex_lock_decl_missing_var_name) -#define ReaderMutexLock(x) COMPILE_ASSERT(0, rmutex_lock_decl_missing_var_name) -#define WriterMutexLock(x) COMPILE_ASSERT(0, wmutex_lock_decl_missing_var_name) - -} // namespace MUTEX_NAMESPACE - -using namespace MUTEX_NAMESPACE; - -#undef MUTEX_NAMESPACE - -#endif /* #define GOOGLE_MUTEX_H__ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config.h.in deleted file mode 100644 index b5454baa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config.h.in +++ /dev/null @@ -1,158 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Namespace for Google classes */ -#undef GOOGLE_NAMESPACE - -/* Define if you have the `dladdr' function */ -#undef HAVE_DLADDR - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXECINFO_H - -/* Define if you have the `fcntl' function */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#undef HAVE_LIBPTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBUNWIND_H - -/* define if you have google gflags library */ -#undef HAVE_LIB_GFLAGS - -/* define if you have google gmock library */ -#undef HAVE_LIB_GMOCK - -/* define if you have google gtest library */ -#undef HAVE_LIB_GTEST - -/* define if you have libunwind */ -#undef HAVE_LIB_UNWIND - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* define if the compiler implements namespaces */ -#undef HAVE_NAMESPACES - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* define if the compiler implements pthread_rwlock_* */ -#undef HAVE_RWLOCK - -/* Define if you have the `sigaltstack' function */ -#undef HAVE_SIGALTSTACK - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSCALL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCALL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UCONTEXT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_UTSNAME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UCONTEXT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if the compiler supports using expression for operator */ -#undef HAVE_USING_OPERATOR - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* define if your compiler has __builtin_expect */ -#undef HAVE___BUILTIN_EXPECT - -/* define if your compiler has __sync_val_compare_and_swap */ -#undef HAVE___SYNC_VAL_COMPARE_AND_SWAP - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* How to access the PC from a struct ucontext */ -#undef PC_FROM_UCONTEXT - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* the namespace where STL code like vector<> is defined */ -#undef STL_NAMESPACE - -/* location of source code */ -#undef TEST_SRC_DIR - -/* Version number of package */ -#undef VERSION - -/* Stops putting the code inside the Google namespace */ -#undef _END_GOOGLE_NAMESPACE_ - -/* Puts following code inside the Google namespace */ -#undef _START_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config_for_unittests.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config_for_unittests.h deleted file mode 100644 index 13ea8eab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/config_for_unittests.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// All Rights Reserved. -// -// Author: Craig Silverstein -// Copied from google-perftools and modified by Shinichiro Hamaji -// -// This file is needed for windows -- unittests are not part of the -// glog dll, but still want to include config.h just like the -// dll does, so they can use internal tools and APIs for testing. -// -// The problem is that config.h declares GOOGLE_GLOG_DLL_DECL to be -// for exporting symbols, but the unittest needs to *import* symbols -// (since it's not the dll). -// -// The solution is to have this file, which is just like config.h but -// sets GOOGLE_GLOG_DLL_DECL to do a dllimport instead of a dllexport. -// -// The reason we need this extra GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS -// variable is in case people want to set GOOGLE_GLOG_DLL_DECL explicitly -// to something other than __declspec(dllexport). In that case, they -// may want to use something other than __declspec(dllimport) for the -// unittest case. For that, we allow folks to define both -// GOOGLE_GLOG_DLL_DECL and GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS explicitly. -// -// NOTE: This file is equivalent to config.h on non-windows systems, -// which never defined GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS and always -// define GOOGLE_GLOG_DLL_DECL to the empty string. - -#include "config.h" - -#undef GOOGLE_GLOG_DLL_DECL -#ifdef GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS -# define GOOGLE_GLOG_DLL_DECL GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS -#else -// if DLL_DECL_FOR_UNITTESTS isn't defined, use "" -# define GOOGLE_GLOG_DLL_DECL -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.cc deleted file mode 100644 index 2fbb7900..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.cc +++ /dev/null @@ -1,1307 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// For reference check out: -// http://www.codesourcery.com/public/cxx-abi/abi.html#mangling -// -// Note that we only have partial C++0x support yet. - -#include // for NULL -#include "demangle.h" - -_START_GOOGLE_NAMESPACE_ - -typedef struct { - const char *abbrev; - const char *real_name; -} AbbrevPair; - -// List of operators from Itanium C++ ABI. -static const AbbrevPair kOperatorList[] = { - { "nw", "new" }, - { "na", "new[]" }, - { "dl", "delete" }, - { "da", "delete[]" }, - { "ps", "+" }, - { "ng", "-" }, - { "ad", "&" }, - { "de", "*" }, - { "co", "~" }, - { "pl", "+" }, - { "mi", "-" }, - { "ml", "*" }, - { "dv", "/" }, - { "rm", "%" }, - { "an", "&" }, - { "or", "|" }, - { "eo", "^" }, - { "aS", "=" }, - { "pL", "+=" }, - { "mI", "-=" }, - { "mL", "*=" }, - { "dV", "/=" }, - { "rM", "%=" }, - { "aN", "&=" }, - { "oR", "|=" }, - { "eO", "^=" }, - { "ls", "<<" }, - { "rs", ">>" }, - { "lS", "<<=" }, - { "rS", ">>=" }, - { "eq", "==" }, - { "ne", "!=" }, - { "lt", "<" }, - { "gt", ">" }, - { "le", "<=" }, - { "ge", ">=" }, - { "nt", "!" }, - { "aa", "&&" }, - { "oo", "||" }, - { "pp", "++" }, - { "mm", "--" }, - { "cm", "," }, - { "pm", "->*" }, - { "pt", "->" }, - { "cl", "()" }, - { "ix", "[]" }, - { "qu", "?" }, - { "st", "sizeof" }, - { "sz", "sizeof" }, - { NULL, NULL }, -}; - -// List of builtin types from Itanium C++ ABI. -static const AbbrevPair kBuiltinTypeList[] = { - { "v", "void" }, - { "w", "wchar_t" }, - { "b", "bool" }, - { "c", "char" }, - { "a", "signed char" }, - { "h", "unsigned char" }, - { "s", "short" }, - { "t", "unsigned short" }, - { "i", "int" }, - { "j", "unsigned int" }, - { "l", "long" }, - { "m", "unsigned long" }, - { "x", "long long" }, - { "y", "unsigned long long" }, - { "n", "__int128" }, - { "o", "unsigned __int128" }, - { "f", "float" }, - { "d", "double" }, - { "e", "long double" }, - { "g", "__float128" }, - { "z", "ellipsis" }, - { NULL, NULL } -}; - -// List of substitutions Itanium C++ ABI. -static const AbbrevPair kSubstitutionList[] = { - { "St", "" }, - { "Sa", "allocator" }, - { "Sb", "basic_string" }, - // std::basic_string,std::allocator > - { "Ss", "string"}, - // std::basic_istream > - { "Si", "istream" }, - // std::basic_ostream > - { "So", "ostream" }, - // std::basic_iostream > - { "Sd", "iostream" }, - { NULL, NULL } -}; - -// State needed for demangling. -typedef struct { - const char *mangled_cur; // Cursor of mangled name. - char *out_cur; // Cursor of output string. - const char *out_begin; // Beginning of output string. - const char *out_end; // End of output string. - const char *prev_name; // For constructors/destructors. - int prev_name_length; // For constructors/destructors. - short nest_level; // For nested names. - bool append; // Append flag. - bool overflowed; // True if output gets overflowed. -} State; - -// We don't use strlen() in libc since it's not guaranteed to be async -// signal safe. -static size_t StrLen(const char *str) { - size_t len = 0; - while (*str != '\0') { - ++str; - ++len; - } - return len; -} - -// Returns true if "str" has at least "n" characters remaining. -static bool AtLeastNumCharsRemaining(const char *str, int n) { - for (int i = 0; i < n; ++i) { - if (str == '\0') { - return false; - } - } - return true; -} - -// Returns true if "str" has "prefix" as a prefix. -static bool StrPrefix(const char *str, const char *prefix) { - size_t i = 0; - while (str[i] != '\0' && prefix[i] != '\0' && - str[i] == prefix[i]) { - ++i; - } - return prefix[i] == '\0'; // Consumed everything in "prefix". -} - -static void InitState(State *state, const char *mangled, - char *out, int out_size) { - state->mangled_cur = mangled; - state->out_cur = out; - state->out_begin = out; - state->out_end = out + out_size; - state->prev_name = NULL; - state->prev_name_length = -1; - state->nest_level = -1; - state->append = true; - state->overflowed = false; -} - -// Returns true and advances "mangled_cur" if we find "one_char_token" -// at "mangled_cur" position. It is assumed that "one_char_token" does -// not contain '\0'. -static bool ParseOneCharToken(State *state, const char one_char_token) { - if (state->mangled_cur[0] == one_char_token) { - ++state->mangled_cur; - return true; - } - return false; -} - -// Returns true and advances "mangled_cur" if we find "two_char_token" -// at "mangled_cur" position. It is assumed that "two_char_token" does -// not contain '\0'. -static bool ParseTwoCharToken(State *state, const char *two_char_token) { - if (state->mangled_cur[0] == two_char_token[0] && - state->mangled_cur[1] == two_char_token[1]) { - state->mangled_cur += 2; - return true; - } - return false; -} - -// Returns true and advances "mangled_cur" if we find any character in -// "char_class" at "mangled_cur" position. -static bool ParseCharClass(State *state, const char *char_class) { - if (state->mangled_cur == '\0') { - return false; - } - const char *p = char_class; - for (; *p != '\0'; ++p) { - if (state->mangled_cur[0] == *p) { - ++state->mangled_cur; - return true; - } - } - return false; -} - -// This function is used for handling an optional non-terminal. -static bool Optional(bool status) { - return true; -} - -// This function is used for handling + syntax. -typedef bool (*ParseFunc)(State *); -static bool OneOrMore(ParseFunc parse_func, State *state) { - if (parse_func(state)) { - while (parse_func(state)) { - } - return true; - } - return false; -} - -// This function is used for handling * syntax. The function -// always returns true and must be followed by a termination token or a -// terminating sequence not handled by parse_func (e.g. -// ParseOneCharToken(state, 'E')). -static bool ZeroOrMore(ParseFunc parse_func, State *state) { - while (parse_func(state)) { - } - return true; -} - -// Append "str" at "out_cur". If there is an overflow, "overflowed" -// is set to true for later use. The output string is ensured to -// always terminate with '\0' as long as there is no overflow. -static void Append(State *state, const char * const str, const int length) { - int i; - for (i = 0; i < length; ++i) { - if (state->out_cur + 1 < state->out_end) { // +1 for '\0' - *state->out_cur = str[i]; - ++state->out_cur; - } else { - state->overflowed = true; - break; - } - } - if (!state->overflowed) { - *state->out_cur = '\0'; // Terminate it with '\0' - } -} - -// We don't use equivalents in libc to avoid locale issues. -static bool IsLower(char c) { - return c >= 'a' && c <= 'z'; -} - -static bool IsAlpha(char c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); -} - -static bool IsDigit(char c) { - return c >= '0' && c <= '9'; -} - -// Returns true if "str" is a function clone suffix. These suffixes are used -// by GCC 4.5.x and later versions to indicate functions which have been -// cloned during optimization. We treat any sequence (.+.+)+ as -// a function clone suffix. -static bool IsFunctionCloneSuffix(const char *str) { - size_t i = 0; - while (str[i] != '\0') { - // Consume a single .+.+ sequence. - if (str[i] != '.' || !IsAlpha(str[i + 1])) { - return false; - } - i += 2; - while (IsAlpha(str[i])) { - ++i; - } - if (str[i] != '.' || !IsDigit(str[i + 1])) { - return false; - } - i += 2; - while (IsDigit(str[i])) { - ++i; - } - } - return true; // Consumed everything in "str". -} - -// Append "str" with some tweaks, iff "append" state is true. -// Returns true so that it can be placed in "if" conditions. -static void MaybeAppendWithLength(State *state, const char * const str, - const int length) { - if (state->append && length > 0) { - // Append a space if the output buffer ends with '<' and "str" - // starts with '<' to avoid <<<. - if (str[0] == '<' && state->out_begin < state->out_cur && - state->out_cur[-1] == '<') { - Append(state, " ", 1); - } - // Remember the last identifier name for ctors/dtors. - if (IsAlpha(str[0]) || str[0] == '_') { - state->prev_name = state->out_cur; - state->prev_name_length = length; - } - Append(state, str, length); - } -} - -// A convenient wrapper arount MaybeAppendWithLength(). -static bool MaybeAppend(State *state, const char * const str) { - if (state->append) { - int length = StrLen(str); - MaybeAppendWithLength(state, str, length); - } - return true; -} - -// This function is used for handling nested names. -static bool EnterNestedName(State *state) { - state->nest_level = 0; - return true; -} - -// This function is used for handling nested names. -static bool LeaveNestedName(State *state, short prev_value) { - state->nest_level = prev_value; - return true; -} - -// Disable the append mode not to print function parameters, etc. -static bool DisableAppend(State *state) { - state->append = false; - return true; -} - -// Restore the append mode to the previous state. -static bool RestoreAppend(State *state, bool prev_value) { - state->append = prev_value; - return true; -} - -// Increase the nest level for nested names. -static void MaybeIncreaseNestLevel(State *state) { - if (state->nest_level > -1) { - ++state->nest_level; - } -} - -// Appends :: for nested names if necessary. -static void MaybeAppendSeparator(State *state) { - if (state->nest_level >= 1) { - MaybeAppend(state, "::"); - } -} - -// Cancel the last separator if necessary. -static void MaybeCancelLastSeparator(State *state) { - if (state->nest_level >= 1 && state->append && - state->out_begin <= state->out_cur - 2) { - state->out_cur -= 2; - *state->out_cur = '\0'; - } -} - -// Returns true if the identifier of the given length pointed to by -// "mangled_cur" is anonymous namespace. -static bool IdentifierIsAnonymousNamespace(State *state, int length) { - static const char anon_prefix[] = "_GLOBAL__N_"; - return (length > sizeof(anon_prefix) - 1 && // Should be longer. - StrPrefix(state->mangled_cur, anon_prefix)); -} - -// Forward declarations of our parsing functions. -static bool ParseMangledName(State *state); -static bool ParseEncoding(State *state); -static bool ParseName(State *state); -static bool ParseUnscopedName(State *state); -static bool ParseUnscopedTemplateName(State *state); -static bool ParseNestedName(State *state); -static bool ParsePrefix(State *state); -static bool ParseUnqualifiedName(State *state); -static bool ParseSourceName(State *state); -static bool ParseLocalSourceName(State *state); -static bool ParseNumber(State *state, int *number_out); -static bool ParseFloatNumber(State *state); -static bool ParseSeqId(State *state); -static bool ParseIdentifier(State *state, int length); -static bool ParseOperatorName(State *state); -static bool ParseSpecialName(State *state); -static bool ParseCallOffset(State *state); -static bool ParseNVOffset(State *state); -static bool ParseVOffset(State *state); -static bool ParseCtorDtorName(State *state); -static bool ParseType(State *state); -static bool ParseCVQualifiers(State *state); -static bool ParseBuiltinType(State *state); -static bool ParseFunctionType(State *state); -static bool ParseBareFunctionType(State *state); -static bool ParseClassEnumType(State *state); -static bool ParseArrayType(State *state); -static bool ParsePointerToMemberType(State *state); -static bool ParseTemplateParam(State *state); -static bool ParseTemplateTemplateParam(State *state); -static bool ParseTemplateArgs(State *state); -static bool ParseTemplateArg(State *state); -static bool ParseExpression(State *state); -static bool ParseExprPrimary(State *state); -static bool ParseLocalName(State *state); -static bool ParseDiscriminator(State *state); -static bool ParseSubstitution(State *state); - -// Implementation note: the following code is a straightforward -// translation of the Itanium C++ ABI defined in BNF with a couple of -// exceptions. -// -// - Support GNU extensions not defined in the Itanium C++ ABI -// - and are combined to avoid infinite loop -// - Reorder patterns to shorten the code -// - Reorder patterns to give greedier functions precedence -// We'll mark "Less greedy than" for these cases in the code -// -// Each parsing function changes the state and returns true on -// success. Otherwise, don't change the state and returns false. To -// ensure that the state isn't changed in the latter case, we save the -// original state before we call more than one parsing functions -// consecutively with &&, and restore the state if unsuccessful. See -// ParseEncoding() as an example of this convention. We follow the -// convention throughout the code. -// -// Originally we tried to do demangling without following the full ABI -// syntax but it turned out we needed to follow the full syntax to -// parse complicated cases like nested template arguments. Note that -// implementing a full-fledged demangler isn't trivial (libiberty's -// cp-demangle.c has +4300 lines). -// -// Note that (foo) in <(foo) ...> is a modifier to be ignored. -// -// Reference: -// - Itanium C++ ABI -// - -// ::= _Z -static bool ParseMangledName(State *state) { - return ParseTwoCharToken(state, "_Z") && ParseEncoding(state); -} - -// ::= <(function) name> -// ::= <(data) name> -// ::= -static bool ParseEncoding(State *state) { - State copy = *state; - if (ParseName(state) && ParseBareFunctionType(state)) { - return true; - } - *state = copy; - - if (ParseName(state) || ParseSpecialName(state)) { - return true; - } - return false; -} - -// ::= -// ::= -// ::= -// ::= -static bool ParseName(State *state) { - if (ParseNestedName(state) || ParseLocalName(state)) { - return true; - } - - State copy = *state; - if (ParseUnscopedTemplateName(state) && - ParseTemplateArgs(state)) { - return true; - } - *state = copy; - - // Less greedy than . - if (ParseUnscopedName(state)) { - return true; - } - return false; -} - -// ::= -// ::= St -static bool ParseUnscopedName(State *state) { - if (ParseUnqualifiedName(state)) { - return true; - } - - State copy = *state; - if (ParseTwoCharToken(state, "St") && - MaybeAppend(state, "std::") && - ParseUnqualifiedName(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= -// ::= -static bool ParseUnscopedTemplateName(State *state) { - return ParseUnscopedName(state) || ParseSubstitution(state); -} - -// ::= N [] E -// ::= N [] E -static bool ParseNestedName(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'N') && - EnterNestedName(state) && - Optional(ParseCVQualifiers(state)) && - ParsePrefix(state) && - LeaveNestedName(state, copy.nest_level) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - return false; -} - -// This part is tricky. If we literally translate them to code, we'll -// end up infinite loop. Hence we merge them to avoid the case. -// -// ::= -// ::= -// ::= -// ::= -// ::= # empty -// ::= <(template) unqualified-name> -// ::= -// ::= -static bool ParsePrefix(State *state) { - bool has_something = false; - while (true) { - MaybeAppendSeparator(state); - if (ParseTemplateParam(state) || - ParseSubstitution(state) || - ParseUnscopedName(state)) { - has_something = true; - MaybeIncreaseNestLevel(state); - continue; - } - MaybeCancelLastSeparator(state); - if (has_something && ParseTemplateArgs(state)) { - return ParsePrefix(state); - } else { - break; - } - } - return true; -} - -// ::= -// ::= -// ::= -// ::= -static bool ParseUnqualifiedName(State *state) { - return (ParseOperatorName(state) || - ParseCtorDtorName(state) || - ParseSourceName(state) || - ParseLocalSourceName(state)); -} - -// ::= -static bool ParseSourceName(State *state) { - State copy = *state; - int length = -1; - if (ParseNumber(state, &length) && ParseIdentifier(state, length)) { - return true; - } - *state = copy; - return false; -} - -// ::= L [] -// -// References: -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 -// http://gcc.gnu.org/viewcvs?view=rev&revision=124467 -static bool ParseLocalSourceName(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'L') && ParseSourceName(state) && - Optional(ParseDiscriminator(state))) { - return true; - } - *state = copy; - return false; -} - -// ::= [n] -// If "number_out" is non-null, then *number_out is set to the value of the -// parsed number on success. -static bool ParseNumber(State *state, int *number_out) { - int sign = 1; - if (ParseOneCharToken(state, 'n')) { - sign = -1; - } - const char *p = state->mangled_cur; - int number = 0; - for (;*p != '\0'; ++p) { - if (IsDigit(*p)) { - number = number * 10 + (*p - '0'); - } else { - break; - } - } - if (p != state->mangled_cur) { // Conversion succeeded. - state->mangled_cur = p; - if (number_out != NULL) { - *number_out = number * sign; - } - return true; - } - return false; -} - -// Floating-point literals are encoded using a fixed-length lowercase -// hexadecimal string. -static bool ParseFloatNumber(State *state) { - const char *p = state->mangled_cur; - for (;*p != '\0'; ++p) { - if (!IsDigit(*p) && !(*p >= 'a' && *p <= 'f')) { - break; - } - } - if (p != state->mangled_cur) { // Conversion succeeded. - state->mangled_cur = p; - return true; - } - return false; -} - -// The is a sequence number in base 36, -// using digits and upper case letters -static bool ParseSeqId(State *state) { - const char *p = state->mangled_cur; - for (;*p != '\0'; ++p) { - if (!IsDigit(*p) && !(*p >= 'A' && *p <= 'Z')) { - break; - } - } - if (p != state->mangled_cur) { // Conversion succeeded. - state->mangled_cur = p; - return true; - } - return false; -} - -// ::= (of given length) -static bool ParseIdentifier(State *state, int length) { - if (length == -1 || - !AtLeastNumCharsRemaining(state->mangled_cur, length)) { - return false; - } - if (IdentifierIsAnonymousNamespace(state, length)) { - MaybeAppend(state, "(anonymous namespace)"); - } else { - MaybeAppendWithLength(state, state->mangled_cur, length); - } - state->mangled_cur += length; - return true; -} - -// ::= nw, and other two letters cases -// ::= cv # (cast) -// ::= v # vendor extended operator -static bool ParseOperatorName(State *state) { - if (!AtLeastNumCharsRemaining(state->mangled_cur, 2)) { - return false; - } - // First check with "cv" (cast) case. - State copy = *state; - if (ParseTwoCharToken(state, "cv") && - MaybeAppend(state, "operator ") && - EnterNestedName(state) && - ParseType(state) && - LeaveNestedName(state, copy.nest_level)) { - return true; - } - *state = copy; - - // Then vendor extended operators. - if (ParseOneCharToken(state, 'v') && ParseCharClass(state, "0123456789") && - ParseSourceName(state)) { - return true; - } - *state = copy; - - // Other operator names should start with a lower alphabet followed - // by a lower/upper alphabet. - if (!(IsLower(state->mangled_cur[0]) && - IsAlpha(state->mangled_cur[1]))) { - return false; - } - // We may want to perform a binary search if we really need speed. - const AbbrevPair *p; - for (p = kOperatorList; p->abbrev != NULL; ++p) { - if (state->mangled_cur[0] == p->abbrev[0] && - state->mangled_cur[1] == p->abbrev[1]) { - MaybeAppend(state, "operator"); - if (IsLower(*p->real_name)) { // new, delete, etc. - MaybeAppend(state, " "); - } - MaybeAppend(state, p->real_name); - state->mangled_cur += 2; - return true; - } - } - return false; -} - -// ::= TV -// ::= TT -// ::= TI -// ::= TS -// ::= Tc <(base) encoding> -// ::= GV <(object) name> -// ::= T <(base) encoding> -// G++ extensions: -// ::= TC <(offset) number> _ <(base) type> -// ::= TF -// ::= TJ -// ::= GR -// ::= GA -// ::= Th <(base) encoding> -// ::= Tv <(base) encoding> -// -// Note: we don't care much about them since they don't appear in -// stack traces. The are special data. -static bool ParseSpecialName(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'T') && - ParseCharClass(state, "VTIS") && - ParseType(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "Tc") && ParseCallOffset(state) && - ParseCallOffset(state) && ParseEncoding(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "GV") && - ParseName(state)) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'T') && ParseCallOffset(state) && - ParseEncoding(state)) { - return true; - } - *state = copy; - - // G++ extensions - if (ParseTwoCharToken(state, "TC") && ParseType(state) && - ParseNumber(state, NULL) && ParseOneCharToken(state, '_') && - DisableAppend(state) && - ParseType(state)) { - RestoreAppend(state, copy.append); - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'T') && ParseCharClass(state, "FJ") && - ParseType(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "GR") && ParseName(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "GA") && ParseEncoding(state)) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'T') && ParseCharClass(state, "hv") && - ParseCallOffset(state) && ParseEncoding(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= h _ -// ::= v _ -static bool ParseCallOffset(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'h') && - ParseNVOffset(state) && ParseOneCharToken(state, '_')) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'v') && - ParseVOffset(state) && ParseOneCharToken(state, '_')) { - return true; - } - *state = copy; - - return false; -} - -// ::= <(offset) number> -static bool ParseNVOffset(State *state) { - return ParseNumber(state, NULL); -} - -// ::= <(offset) number> _ <(virtual offset) number> -static bool ParseVOffset(State *state) { - State copy = *state; - if (ParseNumber(state, NULL) && ParseOneCharToken(state, '_') && - ParseNumber(state, NULL)) { - return true; - } - *state = copy; - return false; -} - -// ::= C1 | C2 | C3 -// ::= D0 | D1 | D2 -static bool ParseCtorDtorName(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'C') && - ParseCharClass(state, "123")) { - const char * const prev_name = state->prev_name; - const int prev_name_length = state->prev_name_length; - MaybeAppendWithLength(state, prev_name, prev_name_length); - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'D') && - ParseCharClass(state, "012")) { - const char * const prev_name = state->prev_name; - const int prev_name_length = state->prev_name_length; - MaybeAppend(state, "~"); - MaybeAppendWithLength(state, prev_name, prev_name_length); - return true; - } - *state = copy; - return false; -} - -// ::= -// ::= P # pointer-to -// ::= R # reference-to -// ::= O # rvalue reference-to (C++0x) -// ::= C # complex pair (C 2000) -// ::= G # imaginary (C 2000) -// ::= U # vendor extended type qualifier -// ::= -// ::= -// ::= -// ::= -// ::= -// ::= -// ::= -// ::= -// ::= Dp # pack expansion of (C++0x) -// ::= Dt E # decltype of an id-expression or class -// # member access (C++0x) -// ::= DT E # decltype of an expression (C++0x) -// -static bool ParseType(State *state) { - // We should check CV-qualifers, and PRGC things first. - State copy = *state; - if (ParseCVQualifiers(state) && ParseType(state)) { - return true; - } - *state = copy; - - if (ParseCharClass(state, "OPRCG") && ParseType(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "Dp") && ParseType(state)) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'D') && ParseCharClass(state, "tT") && - ParseExpression(state) && ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'U') && ParseSourceName(state) && - ParseType(state)) { - return true; - } - *state = copy; - - if (ParseBuiltinType(state) || - ParseFunctionType(state) || - ParseClassEnumType(state) || - ParseArrayType(state) || - ParsePointerToMemberType(state) || - ParseSubstitution(state)) { - return true; - } - - if (ParseTemplateTemplateParam(state) && - ParseTemplateArgs(state)) { - return true; - } - *state = copy; - - // Less greedy than . - if (ParseTemplateParam(state)) { - return true; - } - - return false; -} - -// ::= [r] [V] [K] -// We don't allow empty to avoid infinite loop in -// ParseType(). -static bool ParseCVQualifiers(State *state) { - int num_cv_qualifiers = 0; - num_cv_qualifiers += ParseOneCharToken(state, 'r'); - num_cv_qualifiers += ParseOneCharToken(state, 'V'); - num_cv_qualifiers += ParseOneCharToken(state, 'K'); - return num_cv_qualifiers > 0; -} - -// ::= v, etc. -// ::= u -static bool ParseBuiltinType(State *state) { - const AbbrevPair *p; - for (p = kBuiltinTypeList; p->abbrev != NULL; ++p) { - if (state->mangled_cur[0] == p->abbrev[0]) { - MaybeAppend(state, p->real_name); - ++state->mangled_cur; - return true; - } - } - - State copy = *state; - if (ParseOneCharToken(state, 'u') && ParseSourceName(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= F [Y] E -static bool ParseFunctionType(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'F') && - Optional(ParseOneCharToken(state, 'Y')) && - ParseBareFunctionType(state) && ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - return false; -} - -// ::= <(signature) type>+ -static bool ParseBareFunctionType(State *state) { - State copy = *state; - DisableAppend(state); - if (OneOrMore(ParseType, state)) { - RestoreAppend(state, copy.append); - MaybeAppend(state, "()"); - return true; - } - *state = copy; - return false; -} - -// ::= -static bool ParseClassEnumType(State *state) { - return ParseName(state); -} - -// ::= A <(positive dimension) number> _ <(element) type> -// ::= A [<(dimension) expression>] _ <(element) type> -static bool ParseArrayType(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'A') && ParseNumber(state, NULL) && - ParseOneCharToken(state, '_') && ParseType(state)) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'A') && Optional(ParseExpression(state)) && - ParseOneCharToken(state, '_') && ParseType(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= M <(class) type> <(member) type> -static bool ParsePointerToMemberType(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'M') && ParseType(state) && - ParseType(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= T_ -// ::= T _ -static bool ParseTemplateParam(State *state) { - if (ParseTwoCharToken(state, "T_")) { - MaybeAppend(state, "?"); // We don't support template substitutions. - return true; - } - - State copy = *state; - if (ParseOneCharToken(state, 'T') && ParseNumber(state, NULL) && - ParseOneCharToken(state, '_')) { - MaybeAppend(state, "?"); // We don't support template substitutions. - return true; - } - *state = copy; - return false; -} - - -// ::= -// ::= -static bool ParseTemplateTemplateParam(State *state) { - return (ParseTemplateParam(state) || - ParseSubstitution(state)); -} - -// ::= I + E -static bool ParseTemplateArgs(State *state) { - State copy = *state; - DisableAppend(state); - if (ParseOneCharToken(state, 'I') && - OneOrMore(ParseTemplateArg, state) && - ParseOneCharToken(state, 'E')) { - RestoreAppend(state, copy.append); - MaybeAppend(state, "<>"); - return true; - } - *state = copy; - return false; -} - -// ::= -// ::= -// ::= I * E # argument pack -// ::= X E -static bool ParseTemplateArg(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'I') && - ZeroOrMore(ParseTemplateArg, state) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - if (ParseType(state) || - ParseExprPrimary(state)) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'X') && ParseExpression(state) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - return false; -} - -// ::= -// ::= -// ::= -// ::= -// ::= -// -// ::= st -// ::= sr -// ::= sr -static bool ParseExpression(State *state) { - if (ParseTemplateParam(state) || ParseExprPrimary(state)) { - return true; - } - - State copy = *state; - if (ParseOperatorName(state) && - ParseExpression(state) && - ParseExpression(state) && - ParseExpression(state)) { - return true; - } - *state = copy; - - if (ParseOperatorName(state) && - ParseExpression(state) && - ParseExpression(state)) { - return true; - } - *state = copy; - - if (ParseOperatorName(state) && - ParseExpression(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "st") && ParseType(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "sr") && ParseType(state) && - ParseUnqualifiedName(state) && - ParseTemplateArgs(state)) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "sr") && ParseType(state) && - ParseUnqualifiedName(state)) { - return true; - } - *state = copy; - return false; -} - -// ::= L <(value) number> E -// ::= L <(value) float> E -// ::= L E -// // A bug in g++'s C++ ABI version 2 (-fabi-version=2). -// ::= LZ E -static bool ParseExprPrimary(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'L') && ParseType(state) && - ParseNumber(state, NULL) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'L') && ParseType(state) && - ParseFloatNumber(state) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'L') && ParseMangledName(state) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - if (ParseTwoCharToken(state, "LZ") && ParseEncoding(state) && - ParseOneCharToken(state, 'E')) { - return true; - } - *state = copy; - - return false; -} - -// := Z <(function) encoding> E <(entity) name> -// [] -// := Z <(function) encoding> E s [] -static bool ParseLocalName(State *state) { - State copy = *state; - if (ParseOneCharToken(state, 'Z') && ParseEncoding(state) && - ParseOneCharToken(state, 'E') && MaybeAppend(state, "::") && - ParseName(state) && Optional(ParseDiscriminator(state))) { - return true; - } - *state = copy; - - if (ParseOneCharToken(state, 'Z') && ParseEncoding(state) && - ParseTwoCharToken(state, "Es") && Optional(ParseDiscriminator(state))) { - return true; - } - *state = copy; - return false; -} - -// := _ <(non-negative) number> -static bool ParseDiscriminator(State *state) { - State copy = *state; - if (ParseOneCharToken(state, '_') && ParseNumber(state, NULL)) { - return true; - } - *state = copy; - return false; -} - -// ::= S_ -// ::= S _ -// ::= St, etc. -static bool ParseSubstitution(State *state) { - if (ParseTwoCharToken(state, "S_")) { - MaybeAppend(state, "?"); // We don't support substitutions. - return true; - } - - State copy = *state; - if (ParseOneCharToken(state, 'S') && ParseSeqId(state) && - ParseOneCharToken(state, '_')) { - MaybeAppend(state, "?"); // We don't support substitutions. - return true; - } - *state = copy; - - // Expand abbreviations like "St" => "std". - if (ParseOneCharToken(state, 'S')) { - const AbbrevPair *p; - for (p = kSubstitutionList; p->abbrev != NULL; ++p) { - if (state->mangled_cur[0] == p->abbrev[1]) { - MaybeAppend(state, "std"); - if (p->real_name[0] != '\0') { - MaybeAppend(state, "::"); - MaybeAppend(state, p->real_name); - } - ++state->mangled_cur; - return true; - } - } - } - *state = copy; - return false; -} - -// Parse , optionally followed by either a function-clone suffix -// or version suffix. Returns true only if all of "mangled_cur" was consumed. -static bool ParseTopLevelMangledName(State *state) { - if (ParseMangledName(state)) { - if (state->mangled_cur[0] != '\0') { - // Drop trailing function clone suffix, if any. - if (IsFunctionCloneSuffix(state->mangled_cur)) { - return true; - } - // Append trailing version suffix if any. - // ex. _Z3foo@@GLIBCXX_3.4 - if (state->mangled_cur[0] == '@') { - MaybeAppend(state, state->mangled_cur); - return true; - } - return false; // Unconsumed suffix. - } - return true; - } - return false; -} - -// The demangler entry point. -bool Demangle(const char *mangled, char *out, int out_size) { - State state; - InitState(&state, mangled, out, out_size); - return ParseTopLevelMangledName(&state) && !state.overflowed; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.h deleted file mode 100644 index 9c759152..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// An async-signal-safe and thread-safe demangler for Itanium C++ ABI -// (aka G++ V3 ABI). - -// The demangler is implemented to be used in async signal handlers to -// symbolize stack traces. We cannot use libstdc++'s -// abi::__cxa_demangle() in such signal handlers since it's not async -// signal safe (it uses malloc() internally). -// -// Note that this demangler doesn't support full demangling. More -// specifically, it doesn't print types of function parameters and -// types of template arguments. It just skips them. However, it's -// still very useful to extract basic information such as class, -// function, constructor, destructor, and operator names. -// -// See the implementation note in demangle.cc if you are interested. -// -// Example: -// -// | Mangled Name | The Demangler | abi::__cxa_demangle() -// |---------------|---------------|----------------------- -// | _Z1fv | f() | f() -// | _Z1fi | f() | f(int) -// | _Z3foo3bar | foo() | foo(bar) -// | _Z1fIiEvi | f<>() | void f(int) -// | _ZN1N1fE | N::f | N::f -// | _ZN3Foo3BarEv | Foo::Bar() | Foo::Bar() -// | _Zrm1XS_" | operator%() | operator%(X, X) -// | _ZN3FooC1Ev | Foo::Foo() | Foo::Foo() -// | _Z1fSs | f() | f(std::basic_string, -// | | | std::allocator >) -// -// See the unit test for more examples. -// -// Note: we might want to write demanglers for ABIs other than Itanium -// C++ ABI in the future. -// - -#ifndef BASE_DEMANGLE_H_ -#define BASE_DEMANGLE_H_ - -#include "config.h" - -_START_GOOGLE_NAMESPACE_ - -// Demangle "mangled". On success, return true and write the -// demangled symbol name to "out". Otherwise, return false. -// "out" is modified even if demangling is unsuccessful. -bool Demangle(const char *mangled, char *out, int out_size); - -_END_GOOGLE_NAMESPACE_ - -#endif // BASE_DEMANGLE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.cc deleted file mode 100644 index 9d219e65..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.cc +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// Unit tests for functions in demangle.c. - -#include "utilities.h" - -#include -#include -#include -#include "glog/logging.h" -#include "demangle.h" -#include "googletest.h" -#include "config.h" - -GLOG_DEFINE_bool(demangle_filter, false, - "Run demangle_unittest in filter mode"); - -using namespace std; -using namespace GOOGLE_NAMESPACE; - -// A wrapper function for Demangle() to make the unit test simple. -static const char *DemangleIt(const char * const mangled) { - static char demangled[4096]; - if (Demangle(mangled, demangled, sizeof(demangled))) { - return demangled; - } else { - return mangled; - } -} - -// Test corner cases of bounary conditions. -TEST(Demangle, CornerCases) { - char tmp[10]; - EXPECT_TRUE(Demangle("_Z6foobarv", tmp, sizeof(tmp))); - // sizeof("foobar()") == 9 - EXPECT_STREQ("foobar()", tmp); - EXPECT_TRUE(Demangle("_Z6foobarv", tmp, 9)); - EXPECT_STREQ("foobar()", tmp); - EXPECT_FALSE(Demangle("_Z6foobarv", tmp, 8)); // Not enough. - EXPECT_FALSE(Demangle("_Z6foobarv", tmp, 1)); - EXPECT_FALSE(Demangle("_Z6foobarv", tmp, 0)); - EXPECT_FALSE(Demangle("_Z6foobarv", NULL, 0)); // Should not cause SEGV. -} - -// Test handling of functions suffixed with .clone.N, which is used by GCC -// 4.5.x, and .constprop.N and .isra.N, which are used by GCC 4.6.x. These -// suffixes are used to indicate functions which have been cloned during -// optimization. We ignore these suffixes. -TEST(Demangle, Clones) { - char tmp[20]; - EXPECT_TRUE(Demangle("_ZL3Foov", tmp, sizeof(tmp))); - EXPECT_STREQ("Foo()", tmp); - EXPECT_TRUE(Demangle("_ZL3Foov.clone.3", tmp, sizeof(tmp))); - EXPECT_STREQ("Foo()", tmp); - EXPECT_TRUE(Demangle("_ZL3Foov.constprop.80", tmp, sizeof(tmp))); - EXPECT_STREQ("Foo()", tmp); - EXPECT_TRUE(Demangle("_ZL3Foov.isra.18", tmp, sizeof(tmp))); - EXPECT_STREQ("Foo()", tmp); - EXPECT_TRUE(Demangle("_ZL3Foov.isra.2.constprop.18", tmp, sizeof(tmp))); - EXPECT_STREQ("Foo()", tmp); - // Invalid (truncated), should not demangle. - EXPECT_FALSE(Demangle("_ZL3Foov.clo", tmp, sizeof(tmp))); - // Invalid (.clone. not followed by number), should not demangle. - EXPECT_FALSE(Demangle("_ZL3Foov.clone.", tmp, sizeof(tmp))); - // Invalid (.clone. followed by non-number), should not demangle. - EXPECT_FALSE(Demangle("_ZL3Foov.clone.foo", tmp, sizeof(tmp))); - // Invalid (.constprop. not followed by number), should not demangle. - EXPECT_FALSE(Demangle("_ZL3Foov.isra.2.constprop.", tmp, sizeof(tmp))); -} - -TEST(Demangle, FromFile) { - string test_file = FLAGS_test_srcdir + "/src/demangle_unittest.txt"; - ifstream f(test_file.c_str()); // The file should exist. - EXPECT_FALSE(f.fail()); - - string line; - while (getline(f, line)) { - // Lines start with '#' are considered as comments. - if (line.empty() || line[0] == '#') { - continue; - } - // Each line should contain a mangled name and a demangled name - // separated by '\t'. Example: "_Z3foo\tfoo" - string::size_type tab_pos = line.find('\t'); - EXPECT_NE(string::npos, tab_pos); - string mangled = line.substr(0, tab_pos); - string demangled = line.substr(tab_pos + 1); - EXPECT_EQ(demangled, DemangleIt(mangled.c_str())); - } -} - -int main(int argc, char **argv) { -#ifdef HAVE_LIB_GFLAGS - ParseCommandLineFlags(&argc, &argv, true); -#endif - InitGoogleTest(&argc, argv); - - FLAGS_logtostderr = true; - InitGoogleLogging(argv[0]); - if (FLAGS_demangle_filter) { - // Read from cin and write to cout. - string line; - while (getline(cin, line, '\n')) { - cout << DemangleIt(line.c_str()) << endl; - } - return 0; - } else if (argc > 1) { - cout << DemangleIt(argv[1]) << endl; - return 0; - } else { - return RUN_ALL_TESTS(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.sh deleted file mode 100755 index 91deee21..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.sh +++ /dev/null @@ -1,95 +0,0 @@ -#! /bin/sh -# -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: Satoru Takabayashi -# -# Unit tests for demangle.c with a real binary. - -set -e - -die () { - echo $1 - exit 1 -} - -BINDIR=".libs" -LIBGLOG="$BINDIR/libglog.so" - -DEMANGLER="$BINDIR/demangle_unittest" - -if test -e "$DEMANGLER"; then - # We need shared object. - export LD_LIBRARY_PATH=$BINDIR - export DYLD_LIBRARY_PATH=$BINDIR -else - # For windows - DEMANGLER="./demangle_unittest.exe" - if ! test -e "$DEMANGLER"; then - echo "We coundn't find demangle_unittest binary." - exit 1 - fi -fi - -# Extract C++ mangled symbols from libbase.so. -NM_OUTPUT="demangle.nm" -nm "$LIBGLOG" | perl -nle 'print $1 if /\s(_Z\S+$)/' > "$NM_OUTPUT" - -# Check if mangled symbols exist. If there are none, we quit. -# The binary is more likely compiled with GCC 2.95 or something old. -if ! grep --quiet '^_Z' "$NM_OUTPUT"; then - echo "PASS" - exit 0 -fi - -# Demangle the symbols using our demangler. -DM_OUTPUT="demangle.dm" -GLOG_demangle_filter=1 "$DEMANGLER" --demangle_filter < "$NM_OUTPUT" > "$DM_OUTPUT" - -# Calculate the numbers of lines. -NM_LINES=`wc -l "$NM_OUTPUT" | awk '{ print $1 }'` -DM_LINES=`wc -l "$DM_OUTPUT" | awk '{ print $1 }'` - -# Compare the numbers of lines. They must be the same. -if test "$NM_LINES" != "$DM_LINES"; then - die "$NM_OUTPUT and $DM_OUTPUT don't have the same numbers of lines" -fi - -# Check if mangled symbols exist. They must not exist. -if grep --quiet '^_Z' "$DM_OUTPUT"; then - MANGLED=`grep '^_Z' "$DM_OUTPUT" | wc -l | awk '{ print \$1 }'` - echo "Mangled symbols ($MANGLED out of $NM_LINES) found in $DM_OUTPUT:" - grep '^_Z' "$DM_OUTPUT" - die "Mangled symbols ($MANGLED out of $NM_LINES) found in $DM_OUTPUT" -fi - -# All C++ symbols are demangled successfully. -echo "PASS" -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.txt deleted file mode 100644 index 4e23c65b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/demangle_unittest.txt +++ /dev/null @@ -1,137 +0,0 @@ -# Test caces for demangle_unittest. Each line consists of a -# tab-separated pair of mangled and demangled symbol names. - -# Constructors and destructors. -_ZN3FooC1Ev Foo::Foo() -_ZN3FooD1Ev Foo::~Foo() -_ZNSoD0Ev std::ostream::~ostream() - -# G++ extensions. -_ZTCN10LogMessage9LogStreamE0_So LogMessage::LogStream -_ZTv0_n12_N10LogMessage9LogStreamD0Ev LogMessage::LogStream::~LogStream() -_ZThn4_N7icu_3_410UnicodeSetD0Ev icu_3_4::UnicodeSet::~UnicodeSet() - -# A bug in g++'s C++ ABI version 2 (-fabi-version=2). -_ZN7NSSInfoI5groupjjXadL_Z10getgrgid_rEELZ19nss_getgrgid_r_nameEEC1Ei NSSInfo<>::NSSInfo() - -# C linkage symbol names. Should keep them untouched. -main main -Demangle Demangle -_ZERO _ZERO - -# Cast operator. -_Zcviv operator int() -_ZN3foocviEv foo::operator int() - -# Versioned symbols. -_Z3Foo@GLIBCXX_3.4 Foo@GLIBCXX_3.4 -_Z3Foo@@GLIBCXX_3.4 Foo@@GLIBCXX_3.4 - -# Abbreviations. -_ZNSaE std::allocator -_ZNSbE std::basic_string -_ZNSdE std::iostream -_ZNSiE std::istream -_ZNSoE std::ostream -_ZNSsE std::string - -# Substitutions. We just replace them with ?. -_ZN3fooS_E foo::? -_ZN3foo3barS0_E foo::bar::? -_ZNcvT_IiEEv operator ?<>() - -# "<< <" case. -_ZlsI3fooE operator<< <> - -# Random things we found interesting. -_ZN3FooISt6vectorISsSaISsEEEclEv Foo<>::operator()() -_ZTI9Callback1IiE Callback1<> -_ZN7icu_3_47UMemorynwEj icu_3_4::UMemory::operator new() -_ZNSt6vectorIbE9push_backE std::vector<>::push_back -_ZNSt6vectorIbSaIbEE9push_backEb std::vector<>::push_back() -_ZlsRSoRK15PRIVATE_Counter operator<<() -_ZSt6fill_nIPPN9__gnu_cxx15_Hashtable_nodeISt4pairIKPKcjEEEjS8_ET_SA_T0_RKT1_ std::fill_n<>() -_ZZ3FoovE3Bar Foo()::Bar -_ZGVZ7UpTimervE8up_timer UpTimer()::up_timer - -# Test cases from gcc-4.1.0/libstdc++-v3/testsuite/demangle. -# Collected by: -# % grep verify_demangle **/*.cc | perl -nle 'print $1 if /"(_Z.*?)"/' | -# sort | uniq -# -# Note that the following symbols are invalid. -# That's why they are not demangled. -# - _ZNZN1N1fEiE1X1gE -# - _ZNZN1N1fEiE1X1gEv -# - _Z1xINiEE -_Z1fA37_iPS_ f() -_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i f() -_Z1fI1APS0_PKS0_EvT_T0_T1_PA4_S3_M1CS8_ f<>() -_Z1fI1XENT_1tES2_ f<>() -_Z1fI1XEvPVN1AIT_E1TE f<>() -_Z1fILi1ELc120EEv1AIXplT_cviLd4028ae147ae147aeEEE f<>() -_Z1fILi1ELc120EEv1AIXplT_cviLf3f800000EEE f<>() -_Z1fILi5E1AEvN1CIXqugtT_Li0ELi1ELi2EEE1qE f<>() -_Z1fILi5E1AEvN1CIXstN1T1tEEXszsrS2_1tEE1qE f<>() -_Z1fILi5EEvN1AIXcvimlT_Li22EEE1qE f<>() -_Z1fIiEvi f<>() -_Z1fKPFiiE f() -_Z1fM1AFivEPS0_ f() -_Z1fM1AKFivE f() -_Z1fM1AKFvvE f() -_Z1fPFPA1_ivE f() -_Z1fPFYPFiiEiE f() -_Z1fPFvvEM1SFvvE f() -_Z1fPKM1AFivE f() -_Z1fi f() -_Z1fv f() -_Z1jM1AFivEPS1_ j() -_Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_ r() -_Z1sPA37_iPS0_ s() -_Z1xINiEE _Z1xINiEE -_Z3absILi11EEvv abs<>() -_Z3foo3bar foo() -_Z3foo5Hello5WorldS0_S_ foo() -_Z3fooA30_A_i foo() -_Z3fooIA6_KiEvA9_KT_rVPrS4_ foo<>() -_Z3fooILi2EEvRAplT_Li1E_i foo<>() -_Z3fooIiFvdEiEvv foo<>() -_Z3fooPM2ABi foo() -_Z3fooc foo() -_Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_ foo() -_Z3kooPA28_A30_i koo() -_Z4makeI7FactoryiET_IT0_Ev make<>() -_Z5firstI3DuoEvS0_ first<>() -_Z5firstI3DuoEvT_ first<>() -_Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE hairyfunc() -_ZGVN5libcw24_GLOBAL__N_cbll.cc0ZhUKa23compiler_bug_workaroundISt6vectorINS_13omanip_id_tctINS_5debug32memblk_types_manipulator_data_ctEEESaIS6_EEE3idsE libcw::(anonymous namespace)::compiler_bug_workaround<>::ids -_ZN12libcw_app_ct10add_optionIS_EEvMT_FvPKcES3_cS3_S3_ libcw_app_ct::add_option<>() -_ZN1AIfEcvT_IiEEv A<>::operator ?<>() -_ZN1N1TIiiE2mfES0_IddE N::T<>::mf() -_ZN1N1fE N::f -_ZN1f1fE f::f -_ZN3FooIA4_iE3barE Foo<>::bar -_ZN5Arena5levelE Arena::level -_ZN5StackIiiE5levelE Stack<>::level -_ZN5libcw5debug13cwprint_usingINS_9_private_12GlobalObjectEEENS0_17cwprint_using_tctIT_EERKS5_MS5_KFvRSt7ostreamE libcw::debug::cwprint_using<>() -_ZN6System5Sound4beepEv System::Sound::beep() -_ZNKSt14priority_queueIP27timer_event_request_base_ctSt5dequeIS1_SaIS1_EE13timer_greaterE3topEv std::priority_queue<>::top() -_ZNKSt15_Deque_iteratorIP15memory_block_stRKS1_PS2_EeqERKS5_ std::_Deque_iterator<>::operator==() -_ZNKSt17__normal_iteratorIPK6optionSt6vectorIS0_SaIS0_EEEmiERKS6_ std::__normal_iterator<>::operator-() -_ZNSbIcSt11char_traitsIcEN5libcw5debug27no_alloc_checking_allocatorEE12_S_constructIPcEES6_T_S7_RKS3_ std::basic_string<>::_S_construct<>() -_ZNSt13_Alloc_traitsISbIcSt18string_char_traitsIcEN5libcw5debug9_private_17allocator_adaptorIcSt24__default_alloc_templateILb0ELi327664EELb1EEEENS5_IS9_S7_Lb1EEEE15_S_instancelessE std::_Alloc_traits<>::_S_instanceless -_ZNSt3_In4wardE std::_In::ward -_ZNZN1N1fEiE1X1gE _ZNZN1N1fEiE1X1gE -_ZNZN1N1fEiE1X1gEv _ZNZN1N1fEiE1X1gEv -_ZSt1BISt1DIP1ARKS2_PS3_ES0_IS2_RS2_PS2_ES2_ET0_T_SB_SA_PT1_ std::B<>() -_ZSt5state std::state -_ZTI7a_class a_class -_ZZN1N1fEiE1p N::f()::p -_ZZN1N1fEiEs N::f() -_ZlsRK1XS1_ operator<<() -_ZlsRKU3fooU4bart1XS0_ operator<<() -_ZlsRKU3fooU4bart1XS2_ operator<<() -_ZlsRSoRKSs operator<<() -_ZngILi42EEvN1AIXplT_Li2EEE1TE operator-<>() -_ZplR1XS0_ operator+() -_Zrm1XS_ operator%() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/log_severity.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/log_severity.h deleted file mode 100644 index 17805fba..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/log_severity.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef BASE_LOG_SEVERITY_H__ -#define BASE_LOG_SEVERITY_H__ - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// Variables of type LogSeverity are widely taken to lie in the range -// [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if -// you ever need to change their values or add a new severity. -typedef int LogSeverity; - -const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4; - -// DFATAL is FATAL in debug mode, ERROR in normal mode -#ifdef NDEBUG -#define DFATAL_LEVEL ERROR -#else -#define DFATAL_LEVEL FATAL -#endif - -extern GOOGLE_GLOG_DLL_DECL const char* const LogSeverityNames[NUM_SEVERITIES]; - -// NDEBUG usage helpers related to (RAW_)DCHECK: -// -// DEBUG_MODE is for small !NDEBUG uses like -// if (DEBUG_MODE) foo.CheckThatFoo(); -// instead of substantially more verbose -// #ifndef NDEBUG -// foo.CheckThatFoo(); -// #endif -// -// IF_DEBUG_MODE is for small !NDEBUG uses like -// IF_DEBUG_MODE( string error; ) -// DCHECK(Foo(&error)) << error; -// instead of substantially more verbose -// #ifndef NDEBUG -// string error; -// DCHECK(Foo(&error)) << error; -// #endif -// -#ifdef NDEBUG -enum { DEBUG_MODE = 0 }; -#define IF_DEBUG_MODE(x) -#else -enum { DEBUG_MODE = 1 }; -#define IF_DEBUG_MODE(x) x -#endif - -#endif // BASE_LOG_SEVERITY_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/logging.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/logging.h.in deleted file mode 100644 index ff23f2e9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/logging.h.in +++ /dev/null @@ -1,1506 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney -// -// This file contains #include information about logging-related stuff. -// Pretty much everybody needs to #include this file so that they can -// log various happenings. -// -#ifndef _LOGGING_H_ -#define _LOGGING_H_ - -#include -#include -#include -#include -#if @ac_cv_have_unistd_h@ -# include -#endif -#ifdef __DEPRECATED -// Make GCC quiet. -# undef __DEPRECATED -# include -# define __DEPRECATED -#else -# include -#endif -#include - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// We care a lot about number of bits things take up. Unfortunately, -// systems define their bit-specific ints in a lot of different ways. -// We use our own way, and have a typedef to get there. -// Note: these commands below may look like "#if 1" or "#if 0", but -// that's because they were constructed that way at ./configure time. -// Look at logging.h.in to see how they're calculated (based on your config). -#if @ac_cv_have_stdint_h@ -#include // the normal place uint16_t is defined -#endif -#if @ac_cv_have_systypes_h@ -#include // the normal place u_int16_t is defined -#endif -#if @ac_cv_have_inttypes_h@ -#include // a third place for uint16_t or u_int16_t -#endif - -#if @ac_cv_have_libgflags@ -#include -#endif - -@ac_google_start_namespace@ - -#if @ac_cv_have_uint16_t@ // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif @ac_cv_have_u_int16_t@ // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif @ac_cv_have___uint16@ // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif - -@ac_google_end_namespace@ - -// The global value of GOOGLE_STRIP_LOG. All the messages logged to -// LOG(XXX) with severity less than GOOGLE_STRIP_LOG will not be displayed. -// If it can be determined at compile time that the message will not be -// printed, the statement will be compiled out. -// -// Example: to strip out all INFO and WARNING messages, use the value -// of 2 below. To make an exception for WARNING messages from a single -// file, add "#define GOOGLE_STRIP_LOG 1" to that file _before_ including -// base/logging.h -#ifndef GOOGLE_STRIP_LOG -#define GOOGLE_STRIP_LOG 0 -#endif - -// GCC can be told that a certain branch is not likely to be taken (for -// instance, a CHECK failure), and use that information in static analysis. -// Giving it this information can help it optimize for the common case in -// the absence of better information (ie. -fprofile-arcs). -// -#ifndef GOOGLE_PREDICT_BRANCH_NOT_TAKEN -#if @ac_cv_have___builtin_expect@ -#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) (__builtin_expect(x, 0)) -#else -#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) x -#endif -#endif - -// Make a bunch of macros for logging. The way to log things is to stream -// things to LOG(). E.g., -// -// LOG(INFO) << "Found " << num_cookies << " cookies"; -// -// You can capture log messages in a string, rather than reporting them -// immediately: -// -// vector errors; -// LOG_STRING(ERROR, &errors) << "Couldn't parse cookie #" << cookie_num; -// -// This pushes back the new error onto 'errors'; if given a NULL pointer, -// it reports the error via LOG(ERROR). -// -// You can also do conditional logging: -// -// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// You can also do occasional logging (log every n'th occurrence of an -// event): -// -// LOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie"; -// -// The above will cause log messages to be output on the 1st, 11th, 21st, ... -// times it is executed. Note that the special COUNTER value is used to -// identify which repetition is happening. -// -// You can also do occasional conditional logging (log every n'th -// occurrence of an event, when condition is satisfied): -// -// LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << COUNTER -// << "th big cookie"; -// -// You can log messages the first N times your code executes a line. E.g. -// -// LOG_FIRST_N(INFO, 20) << "Got the " << COUNTER << "th cookie"; -// -// Outputs log messages for the first 20 times it is executed. -// -// Analogous SYSLOG, SYSLOG_IF, and SYSLOG_EVERY_N macros are available. -// These log to syslog as well as to the normal logs. If you use these at -// all, you need to be aware that syslog can drastically reduce performance, -// especially if it is configured for remote logging! Don't use these -// unless you fully understand this and have a concrete need to use them. -// Even then, try to minimize your use of them. -// -// There are also "debug mode" logging macros like the ones above: -// -// DLOG(INFO) << "Found cookies"; -// -// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// DLOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie"; -// -// All "debug mode" logging is compiled away to nothing for non-debug mode -// compiles. -// -// We also have -// -// LOG_ASSERT(assertion); -// DLOG_ASSERT(assertion); -// -// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion; -// -// There are "verbose level" logging macros. They look like -// -// VLOG(1) << "I'm printed when you run the program with --v=1 or more"; -// VLOG(2) << "I'm printed when you run the program with --v=2 or more"; -// -// These always log at the INFO log level (when they log at all). -// The verbose logging can also be turned on module-by-module. For instance, -// --vmodule=mapreduce=2,file=1,gfs*=3 --v=0 -// will cause: -// a. VLOG(2) and lower messages to be printed from mapreduce.{h,cc} -// b. VLOG(1) and lower messages to be printed from file.{h,cc} -// c. VLOG(3) and lower messages to be printed from files prefixed with "gfs" -// d. VLOG(0) and lower messages to be printed from elsewhere -// -// The wildcarding functionality shown by (c) supports both '*' (match -// 0 or more characters) and '?' (match any single character) wildcards. -// -// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as -// -// if (VLOG_IS_ON(2)) { -// // do some logging preparation and logging -// // that can't be accomplished with just VLOG(2) << ...; -// } -// -// There are also VLOG_IF, VLOG_EVERY_N and VLOG_IF_EVERY_N "verbose level" -// condition macros for sample cases, when some extra computation and -// preparation for logs is not needed. -// VLOG_IF(1, (size > 1024)) -// << "I'm printed when size is more than 1024 and when you run the " -// "program with --v=1 or more"; -// VLOG_EVERY_N(1, 10) -// << "I'm printed every 10th occurrence, and when you run the program " -// "with --v=1 or more. Present occurence is " << COUNTER; -// VLOG_IF_EVERY_N(1, (size > 1024), 10) -// << "I'm printed on every 10th occurence of case when size is more " -// " than 1024, when you run the program with --v=1 or more. "; -// "Present occurence is " << COUNTER; -// -// The supported severity levels for macros that allow you to specify one -// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL. -// Note that messages of a given severity are logged not only in the -// logfile for that severity, but also in all logfiles of lower severity. -// E.g., a message of severity FATAL will be logged to the logfiles of -// severity FATAL, ERROR, WARNING, and INFO. -// -// There is also the special severity of DFATAL, which logs FATAL in -// debug mode, ERROR in normal mode. -// -// Very important: logging a message at the FATAL severity level causes -// the program to terminate (after the message is logged). -// -// Unless otherwise specified, logs will be written to the filename -// "...log..", followed -// by the date, time, and pid (you can't prevent the date, time, and pid -// from being in the filename). -// -// The logging code takes two flags: -// --v=# set the verbose level -// --logtostderr log all the messages to stderr instead of to logfiles - -// LOG LINE PREFIX FORMAT -// -// Log lines have this form: -// -// Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... -// -// where the fields are defined as follows: -// -// L A single character, representing the log level -// (eg 'I' for INFO) -// mm The month (zero padded; ie May is '05') -// dd The day (zero padded) -// hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds -// threadid The space-padded thread ID as returned by GetTID() -// (this matches the PID on Linux) -// file The file name -// line The line number -// msg The user-supplied message -// -// Example: -// -// I1103 11:57:31.739339 24395 google.cc:2341] Command line: ./some_prog -// I1103 11:57:31.739403 24395 google.cc:2342] Process id 24395 -// -// NOTE: although the microseconds are useful for comparing events on -// a single machine, clocks on different machines may not be well -// synchronized. Hence, use caution when comparing the low bits of -// timestamps from different machines. - -#ifndef DECLARE_VARIABLE -#define MUST_UNDEF_GFLAGS_DECLARE_MACROS -#define DECLARE_VARIABLE(type, name, tn) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead { \ - extern GOOGLE_GLOG_DLL_DECL type FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead::FLAGS_##name - -// bool specialization -#define DECLARE_bool(name) \ - DECLARE_VARIABLE(bool, name, bool) - -// int32 specialization -#define DECLARE_int32(name) \ - DECLARE_VARIABLE(@ac_google_namespace@::int32, name, int32) - -// Special case for string, because we have to specify the namespace -// std::string, which doesn't play nicely with our FLAG__namespace hackery. -#define DECLARE_string(name) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead { \ - extern GOOGLE_GLOG_DLL_DECL std::string FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead::FLAGS_##name -#endif - -// Set whether log messages go to stderr instead of logfiles -DECLARE_bool(logtostderr); - -// Set whether log messages go to stderr in addition to logfiles. -DECLARE_bool(alsologtostderr); - -// Log messages at a level >= this flag are automatically sent to -// stderr in addition to log files. -DECLARE_int32(stderrthreshold); - -// Set whether the log prefix should be prepended to each line of output. -DECLARE_bool(log_prefix); - -// Log messages at a level <= this flag are buffered. -// Log messages at a higher level are flushed immediately. -DECLARE_int32(logbuflevel); - -// Sets the maximum number of seconds which logs may be buffered for. -DECLARE_int32(logbufsecs); - -// Log suppression level: messages logged at a lower level than this -// are suppressed. -DECLARE_int32(minloglevel); - -// If specified, logfiles are written into this directory instead of the -// default logging directory. -DECLARE_string(log_dir); - -// Sets the path of the directory into which to put additional links -// to the log files. -DECLARE_string(log_link); - -DECLARE_int32(v); // in vlog_is_on.cc - -// Sets the maximum log file size (in MB). -DECLARE_int32(max_log_size); - -// Sets whether to avoid logging to the disk if the disk is full. -DECLARE_bool(stop_logging_if_full_disk); - -#ifdef MUST_UNDEF_GFLAGS_DECLARE_MACROS -#undef MUST_UNDEF_GFLAGS_DECLARE_MACROS -#undef DECLARE_VARIABLE -#undef DECLARE_bool -#undef DECLARE_int32 -#undef DECLARE_string -#endif - -// Log messages below the GOOGLE_STRIP_LOG level will be compiled away for -// security reasons. See LOG(severtiy) below. - -// A few definitions of macros that don't generate much code. Since -// LOG(INFO) and its ilk are used all over our code, it's -// better to have compact code for these operations. - -#if GOOGLE_STRIP_LOG == 0 -#define COMPACT_GOOGLE_LOG_INFO @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__) -#define LOG_TO_STRING_INFO(message) @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::INFO, message) -#else -#define COMPACT_GOOGLE_LOG_INFO @ac_google_namespace@::NullStream() -#define LOG_TO_STRING_INFO(message) @ac_google_namespace@::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 1 -#define COMPACT_GOOGLE_LOG_WARNING @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::WARNING) -#define LOG_TO_STRING_WARNING(message) @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::WARNING, message) -#else -#define COMPACT_GOOGLE_LOG_WARNING @ac_google_namespace@::NullStream() -#define LOG_TO_STRING_WARNING(message) @ac_google_namespace@::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 2 -#define COMPACT_GOOGLE_LOG_ERROR @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::ERROR) -#define LOG_TO_STRING_ERROR(message) @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::ERROR, message) -#else -#define COMPACT_GOOGLE_LOG_ERROR @ac_google_namespace@::NullStream() -#define LOG_TO_STRING_ERROR(message) @ac_google_namespace@::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 3 -#define COMPACT_GOOGLE_LOG_FATAL @ac_google_namespace@::LogMessageFatal( \ - __FILE__, __LINE__) -#define LOG_TO_STRING_FATAL(message) @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::FATAL, message) -#else -#define COMPACT_GOOGLE_LOG_FATAL @ac_google_namespace@::NullStreamFatal() -#define LOG_TO_STRING_FATAL(message) @ac_google_namespace@::NullStreamFatal() -#endif - -// For DFATAL, we want to use LogMessage (as opposed to -// LogMessageFatal), to be consistent with the original behavior. -#ifdef NDEBUG -#define COMPACT_GOOGLE_LOG_DFATAL COMPACT_GOOGLE_LOG_ERROR -#elif GOOGLE_STRIP_LOG <= 3 -#define COMPACT_GOOGLE_LOG_DFATAL @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::FATAL) -#else -#define COMPACT_GOOGLE_LOG_DFATAL @ac_google_namespace@::NullStreamFatal() -#endif - -#define GOOGLE_LOG_INFO(counter) @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::INFO, counter, &@ac_google_namespace@::LogMessage::SendToLog) -#define SYSLOG_INFO(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::INFO, counter, \ - &@ac_google_namespace@::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_WARNING(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::WARNING, counter, \ - &@ac_google_namespace@::LogMessage::SendToLog) -#define SYSLOG_WARNING(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::WARNING, counter, \ - &@ac_google_namespace@::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_ERROR(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::ERROR, counter, \ - &@ac_google_namespace@::LogMessage::SendToLog) -#define SYSLOG_ERROR(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::ERROR, counter, \ - &@ac_google_namespace@::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_FATAL(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::FATAL, counter, \ - &@ac_google_namespace@::LogMessage::SendToLog) -#define SYSLOG_FATAL(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::FATAL, counter, \ - &@ac_google_namespace@::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_DFATAL(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::DFATAL_LEVEL, counter, \ - &@ac_google_namespace@::LogMessage::SendToLog) -#define SYSLOG_DFATAL(counter) \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, @ac_google_namespace@::DFATAL_LEVEL, counter, \ - &@ac_google_namespace@::LogMessage::SendToSyslogAndLog) - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) || defined(__CYGWIN32__) -// A very useful logging macro to log windows errors: -#define LOG_SYSRESULT(result) \ - if (FAILED(result)) { \ - LPTSTR message = NULL; \ - LPTSTR msg = reinterpret_cast(&message); \ - DWORD message_length = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | \ - FORMAT_MESSAGE_FROM_SYSTEM, \ - 0, result, 0, msg, 100, NULL); \ - if (message_length > 0) { \ - @ac_google_namespace@::LogMessage(__FILE__, __LINE__, ERROR, 0, \ - &@ac_google_namespace@::LogMessage::SendToLog).stream() << message; \ - LocalFree(message); \ - } \ - } -#endif - -// We use the preprocessor's merging operator, "##", so that, e.g., -// LOG(INFO) becomes the token GOOGLE_LOG_INFO. There's some funny -// subtle difference between ostream member streaming functions (e.g., -// ostream::operator<<(int) and ostream non-member streaming functions -// (e.g., ::operator<<(ostream&, string&): it turns out that it's -// impossible to stream something like a string directly to an unnamed -// ostream. We employ a neat hack by calling the stream() member -// function of LogMessage which seems to avoid the problem. -#define LOG(severity) COMPACT_GOOGLE_LOG_ ## severity.stream() -#define SYSLOG(severity) SYSLOG_ ## severity(0).stream() - -@ac_google_start_namespace@ - -// They need the definitions of integer types. -#include "glog/log_severity.h" -#include "glog/vlog_is_on.h" - -// Initialize google's logging library. You will see the program name -// specified by argv0 in log outputs. -GOOGLE_GLOG_DLL_DECL void InitGoogleLogging(const char* argv0); - -// Shutdown google's logging library. -GOOGLE_GLOG_DLL_DECL void ShutdownGoogleLogging(); - -// Install a function which will be called after LOG(FATAL). -GOOGLE_GLOG_DLL_DECL void InstallFailureFunction(void (*fail_func)()); - -class LogSink; // defined below - -// If a non-NULL sink pointer is given, we push this message to that sink. -// For LOG_TO_SINK we then do normal LOG(severity) logging as well. -// This is useful for capturing messages and passing/storing them -// somewhere more specific than the global log of the process. -// Argument types: -// LogSink* sink; -// LogSeverity severity; -// The cast is to disambiguate NULL arguments. -#define LOG_TO_SINK(sink, severity) \ - @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, \ - @ac_google_namespace@::severity, \ - static_cast<@ac_google_namespace@::LogSink*>(sink), true).stream() -#define LOG_TO_SINK_BUT_NOT_TO_LOGFILE(sink, severity) \ - @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, \ - @ac_google_namespace@::severity, \ - static_cast<@ac_google_namespace@::LogSink*>(sink), false).stream() - -// If a non-NULL string pointer is given, we write this message to that string. -// We then do normal LOG(severity) logging as well. -// This is useful for capturing messages and storing them somewhere more -// specific than the global log of the process. -// Argument types: -// string* message; -// LogSeverity severity; -// The cast is to disambiguate NULL arguments. -// NOTE: LOG(severity) expands to LogMessage().stream() for the specified -// severity. -#define LOG_TO_STRING(severity, message) \ - LOG_TO_STRING_##severity(static_cast(message)).stream() - -// If a non-NULL pointer is given, we push the message onto the end -// of a vector of strings; otherwise, we report it with LOG(severity). -// This is handy for capturing messages and perhaps passing them back -// to the caller, rather than reporting them immediately. -// Argument types: -// LogSeverity severity; -// vector *outvec; -// The cast is to disambiguate NULL arguments. -#define LOG_STRING(severity, outvec) \ - LOG_TO_STRING_##severity(static_cast*>(outvec)).stream() - -#define LOG_IF(severity, condition) \ - !(condition) ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity) -#define SYSLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & SYSLOG(severity) - -#define LOG_ASSERT(condition) \ - LOG_IF(FATAL, !(condition)) << "Assert failed: " #condition -#define SYSLOG_ASSERT(condition) \ - SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition - -// CHECK dies with a fatal error if condition is not true. It is *not* -// controlled by NDEBUG, so the check will be executed regardless of -// compilation mode. Therefore, it is safe to do things like: -// CHECK(fp->Write(x) == 4) -#define CHECK(condition) \ - LOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN(!(condition))) \ - << "Check failed: " #condition " " - -// A container for a string pointer which can be evaluated to a bool - -// true iff the pointer is NULL. -struct CheckOpString { - CheckOpString(std::string* str) : str_(str) { } - // No destructor: if str_ is non-NULL, we're about to LOG(FATAL), - // so there's no point in cleaning up str_. - operator bool() const { - return GOOGLE_PREDICT_BRANCH_NOT_TAKEN(str_ != NULL); - } - std::string* str_; -}; - -// Function is overloaded for integral types to allow static const -// integrals declared in classes and not defined to be used as arguments to -// CHECK* macros. It's not encouraged though. -template -inline const T& GetReferenceableValue(const T& t) { return t; } -inline char GetReferenceableValue(char t) { return t; } -inline unsigned char GetReferenceableValue(unsigned char t) { return t; } -inline signed char GetReferenceableValue(signed char t) { return t; } -inline short GetReferenceableValue(short t) { return t; } -inline unsigned short GetReferenceableValue(unsigned short t) { return t; } -inline int GetReferenceableValue(int t) { return t; } -inline unsigned int GetReferenceableValue(unsigned int t) { return t; } -inline long GetReferenceableValue(long t) { return t; } -inline unsigned long GetReferenceableValue(unsigned long t) { return t; } -inline long long GetReferenceableValue(long long t) { return t; } -inline unsigned long long GetReferenceableValue(unsigned long long t) { - return t; -} - -// This is a dummy class to define the following operator. -struct DummyClassToDefineOperator {}; - -@ac_google_end_namespace@ - -// Define global operator<< to declare using ::operator<<. -// This declaration will allow use to use CHECK macros for user -// defined classes which have operator<< (e.g., stl_logging.h). -inline std::ostream& operator<<( - std::ostream& out, const google::DummyClassToDefineOperator&) { - return out; -} - -@ac_google_start_namespace@ - -// Build the error message string. -template -std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) { - // It means that we cannot use stl_logging if compiler doesn't - // support using expression for operator. - // TODO(hamaji): Figure out a way to fix. -#if @ac_cv_cxx_using_operator@ - using ::operator<<; -#endif - std::strstream ss; - ss << names << " (" << v1 << " vs. " << v2 << ")"; - return new std::string(ss.str(), ss.pcount()); -} - -// Helper functions for CHECK_OP macro. -// The (int, int) specialization works around the issue that the compiler -// will not instantiate the template version of the function on values of -// unnamed enum type - see comment below. -#define DEFINE_CHECK_OP_IMPL(name, op) \ - template \ - inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \ - const char* names) { \ - if (v1 op v2) return NULL; \ - else return MakeCheckOpString(v1, v2, names); \ - } \ - inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \ - return Check##name##Impl(v1, v2, names); \ - } - -// Use _EQ, _NE, _LE, etc. in case the file including base/logging.h -// provides its own #defines for the simpler names EQ, NE, LE, etc. -// This happens if, for example, those are used as token names in a -// yacc grammar. -DEFINE_CHECK_OP_IMPL(_EQ, ==) -DEFINE_CHECK_OP_IMPL(_NE, !=) -DEFINE_CHECK_OP_IMPL(_LE, <=) -DEFINE_CHECK_OP_IMPL(_LT, < ) -DEFINE_CHECK_OP_IMPL(_GE, >=) -DEFINE_CHECK_OP_IMPL(_GT, > ) -#undef DEFINE_CHECK_OP_IMPL - -// Helper macro for binary operators. -// Don't use this macro directly in your code, use CHECK_EQ et al below. - -#if defined(STATIC_ANALYSIS) -// Only for static analysis tool to know that it is equivalent to assert -#define CHECK_OP_LOG(name, op, val1, val2, log) CHECK((val1) op (val2)) -#elif !defined(NDEBUG) -// In debug mode, avoid constructing CheckOpStrings if possible, -// to reduce the overhead of CHECK statments by 2x. -// Real DCHECK-heavy tests have seen 1.5x speedups. - -// The meaning of "string" might be different between now and -// when this macro gets invoked (e.g., if someone is experimenting -// with other string implementations that get defined after this -// file is included). Save the current meaning now and use it -// in the macro. -typedef std::string _Check_string; -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (@ac_google_namespace@::_Check_string* _result = \ - @ac_google_namespace@::Check##name##Impl( \ - @ac_google_namespace@::GetReferenceableValue(val1), \ - @ac_google_namespace@::GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ - log(__FILE__, __LINE__, \ - @ac_google_namespace@::CheckOpString(_result)).stream() -#else -// In optimized mode, use CheckOpString to hint to compiler that -// the while condition is unlikely. -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (@ac_google_namespace@::CheckOpString _result = \ - @ac_google_namespace@::Check##name##Impl( \ - @ac_google_namespace@::GetReferenceableValue(val1), \ - @ac_google_namespace@::GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ - log(__FILE__, __LINE__, _result).stream() -#endif // STATIC_ANALYSIS, !NDEBUG - -#if GOOGLE_STRIP_LOG <= 3 -#define CHECK_OP(name, op, val1, val2) \ - CHECK_OP_LOG(name, op, val1, val2, @ac_google_namespace@::LogMessageFatal) -#else -#define CHECK_OP(name, op, val1, val2) \ - CHECK_OP_LOG(name, op, val1, val2, @ac_google_namespace@::NullStreamFatal) -#endif // STRIP_LOG <= 3 - -// Equality/Inequality checks - compare two values, and log a FATAL message -// including the two values when the result is not as expected. The values -// must have operator<<(ostream, ...) defined. -// -// You may append to the error message like so: -// CHECK_NE(1, 2) << ": The world must be ending!"; -// -// We are very careful to ensure that each argument is evaluated exactly -// once, and that anything which is legal to pass as a function argument is -// legal here. In particular, the arguments may be temporary expressions -// which will end up being destroyed at the end of the apparent statement, -// for example: -// CHECK_EQ(string("abc")[1], 'b'); -// -// WARNING: These don't compile correctly if one of the arguments is a pointer -// and the other is NULL. To work around this, simply static_cast NULL to the -// type of the desired pointer. - -#define CHECK_EQ(val1, val2) CHECK_OP(_EQ, ==, val1, val2) -#define CHECK_NE(val1, val2) CHECK_OP(_NE, !=, val1, val2) -#define CHECK_LE(val1, val2) CHECK_OP(_LE, <=, val1, val2) -#define CHECK_LT(val1, val2) CHECK_OP(_LT, < , val1, val2) -#define CHECK_GE(val1, val2) CHECK_OP(_GE, >=, val1, val2) -#define CHECK_GT(val1, val2) CHECK_OP(_GT, > , val1, val2) - -// Check that the input is non NULL. This very useful in constructor -// initializer lists. - -#define CHECK_NOTNULL(val) \ - @ac_google_namespace@::CheckNotNull(__FILE__, __LINE__, "'" #val "' Must be non NULL", (val)) - -// Helper functions for string comparisons. -// To avoid bloat, the definitions are in logging.cc. -#define DECLARE_CHECK_STROP_IMPL(func, expected) \ - GOOGLE_GLOG_DLL_DECL std::string* Check##func##expected##Impl( \ - const char* s1, const char* s2, const char* names); -DECLARE_CHECK_STROP_IMPL(strcmp, true) -DECLARE_CHECK_STROP_IMPL(strcmp, false) -DECLARE_CHECK_STROP_IMPL(strcasecmp, true) -DECLARE_CHECK_STROP_IMPL(strcasecmp, false) -#undef DECLARE_CHECK_STROP_IMPL - -// Helper macro for string comparisons. -// Don't use this macro directly in your code, use CHECK_STREQ et al below. -#define CHECK_STROP(func, op, expected, s1, s2) \ - while (@ac_google_namespace@::CheckOpString _result = \ - @ac_google_namespace@::Check##func##expected##Impl((s1), (s2), \ - #s1 " " #op " " #s2)) \ - LOG(FATAL) << *_result.str_ - - -// String (char*) equality/inequality checks. -// CASE versions are case-insensitive. -// -// Note that "s1" and "s2" may be temporary strings which are destroyed -// by the compiler at the end of the current "full expression" -// (e.g. CHECK_STREQ(Foo().c_str(), Bar().c_str())). - -#define CHECK_STREQ(s1, s2) CHECK_STROP(strcmp, ==, true, s1, s2) -#define CHECK_STRNE(s1, s2) CHECK_STROP(strcmp, !=, false, s1, s2) -#define CHECK_STRCASEEQ(s1, s2) CHECK_STROP(strcasecmp, ==, true, s1, s2) -#define CHECK_STRCASENE(s1, s2) CHECK_STROP(strcasecmp, !=, false, s1, s2) - -#define CHECK_INDEX(I,A) CHECK(I < (sizeof(A)/sizeof(A[0]))) -#define CHECK_BOUND(B,A) CHECK(B <= (sizeof(A)/sizeof(A[0]))) - -#define CHECK_DOUBLE_EQ(val1, val2) \ - do { \ - CHECK_LE((val1), (val2)+0.000000000000001L); \ - CHECK_GE((val1), (val2)-0.000000000000001L); \ - } while (0) - -#define CHECK_NEAR(val1, val2, margin) \ - do { \ - CHECK_LE((val1), (val2)+(margin)); \ - CHECK_GE((val1), (val2)-(margin)); \ - } while (0) - -// perror()..googly style! -// -// PLOG() and PLOG_IF() and PCHECK() behave exactly like their LOG* and -// CHECK equivalents with the addition that they postpend a description -// of the current state of errno to their output lines. - -#define PLOG(severity) GOOGLE_PLOG(severity, 0).stream() - -#define GOOGLE_PLOG(severity, counter) \ - @ac_google_namespace@::ErrnoLogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::severity, counter, \ - &@ac_google_namespace@::LogMessage::SendToLog) - -#define PLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & PLOG(severity) - -// A CHECK() macro that postpends errno if the condition is false. E.g. -// -// if (poll(fds, nfds, timeout) == -1) { PCHECK(errno == EINTR); ... } -#define PCHECK(condition) \ - PLOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN(!(condition))) \ - << "Check failed: " #condition " " - -// A CHECK() macro that lets you assert the success of a function that -// returns -1 and sets errno in case of an error. E.g. -// -// CHECK_ERR(mkdir(path, 0700)); -// -// or -// -// int fd = open(filename, flags); CHECK_ERR(fd) << ": open " << filename; -#define CHECK_ERR(invocation) \ -PLOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN((invocation) == -1)) \ - << #invocation - -// Use macro expansion to create, for each use of LOG_EVERY_N(), static -// variables with the __LINE__ expansion as part of the variable name. -#define LOG_EVERY_N_VARNAME(base, line) LOG_EVERY_N_VARNAME_CONCAT(base, line) -#define LOG_EVERY_N_VARNAME_CONCAT(base, line) base ## line - -#define LOG_OCCURRENCES LOG_EVERY_N_VARNAME(occurrences_, __LINE__) -#define LOG_OCCURRENCES_MOD_N LOG_EVERY_N_VARNAME(occurrences_mod_n_, __LINE__) - -#define SOME_KIND_OF_LOG_EVERY_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (++LOG_OCCURRENCES_MOD_N > n) LOG_OCCURRENCES_MOD_N -= n; \ - if (LOG_OCCURRENCES_MOD_N == 1) \ - @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_LOG_IF_EVERY_N(severity, condition, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (condition && \ - ((LOG_OCCURRENCES_MOD_N=(LOG_OCCURRENCES_MOD_N + 1) % n) == (1 % n))) \ - @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_PLOG_EVERY_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (++LOG_OCCURRENCES_MOD_N > n) LOG_OCCURRENCES_MOD_N -= n; \ - if (LOG_OCCURRENCES_MOD_N == 1) \ - @ac_google_namespace@::ErrnoLogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_LOG_FIRST_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0; \ - if (LOG_OCCURRENCES <= n) \ - ++LOG_OCCURRENCES; \ - if (LOG_OCCURRENCES <= n) \ - @ac_google_namespace@::LogMessage( \ - __FILE__, __LINE__, @ac_google_namespace@::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -namespace glog_internal_namespace_ { -template -struct CompileAssert { -}; -struct CrashReason; -} // namespace glog_internal_namespace_ - -#define GOOGLE_GLOG_COMPILE_ASSERT(expr, msg) \ - typedef @ac_google_namespace@::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] - -#define LOG_EVERY_N(severity, n) \ - GOOGLE_GLOG_COMPILE_ASSERT(@ac_google_namespace@::severity < \ - @ac_google_namespace@::NUM_SEVERITIES, \ - INVALID_REQUESTED_LOG_SEVERITY); \ - SOME_KIND_OF_LOG_EVERY_N(severity, (n), @ac_google_namespace@::LogMessage::SendToLog) - -#define SYSLOG_EVERY_N(severity, n) \ - SOME_KIND_OF_LOG_EVERY_N(severity, (n), @ac_google_namespace@::LogMessage::SendToSyslogAndLog) - -#define PLOG_EVERY_N(severity, n) \ - SOME_KIND_OF_PLOG_EVERY_N(severity, (n), @ac_google_namespace@::LogMessage::SendToLog) - -#define LOG_FIRST_N(severity, n) \ - SOME_KIND_OF_LOG_FIRST_N(severity, (n), @ac_google_namespace@::LogMessage::SendToLog) - -#define LOG_IF_EVERY_N(severity, condition, n) \ - SOME_KIND_OF_LOG_IF_EVERY_N(severity, (condition), (n), @ac_google_namespace@::LogMessage::SendToLog) - -// We want the special COUNTER value available for LOG_EVERY_X()'ed messages -enum PRIVATE_Counter {COUNTER}; - - -// Plus some debug-logging macros that get compiled to nothing for production - -#ifndef NDEBUG - -#define DLOG(severity) LOG(severity) -#define DVLOG(verboselevel) VLOG(verboselevel) -#define DLOG_IF(severity, condition) LOG_IF(severity, condition) -#define DLOG_EVERY_N(severity, n) LOG_EVERY_N(severity, n) -#define DLOG_IF_EVERY_N(severity, condition, n) \ - LOG_IF_EVERY_N(severity, condition, n) -#define DLOG_ASSERT(condition) LOG_ASSERT(condition) - -// debug-only checking. not executed in NDEBUG mode. -#define DCHECK(condition) CHECK(condition) -#define DCHECK_EQ(val1, val2) CHECK_EQ(val1, val2) -#define DCHECK_NE(val1, val2) CHECK_NE(val1, val2) -#define DCHECK_LE(val1, val2) CHECK_LE(val1, val2) -#define DCHECK_LT(val1, val2) CHECK_LT(val1, val2) -#define DCHECK_GE(val1, val2) CHECK_GE(val1, val2) -#define DCHECK_GT(val1, val2) CHECK_GT(val1, val2) -#define DCHECK_NOTNULL(val) CHECK_NOTNULL(val) -#define DCHECK_STREQ(str1, str2) CHECK_STREQ(str1, str2) -#define DCHECK_STRCASEEQ(str1, str2) CHECK_STRCASEEQ(str1, str2) -#define DCHECK_STRNE(str1, str2) CHECK_STRNE(str1, str2) -#define DCHECK_STRCASENE(str1, str2) CHECK_STRCASENE(str1, str2) - -#else // NDEBUG - -#define DLOG(severity) \ - true ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity) - -#define DVLOG(verboselevel) \ - (true || !VLOG_IS_ON(verboselevel)) ?\ - (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(INFO) - -#define DLOG_IF(severity, condition) \ - (true || !(condition)) ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity) - -#define DLOG_EVERY_N(severity, n) \ - true ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity) - -#define DLOG_IF_EVERY_N(severity, condition, n) \ - (true || !(condition))? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity) - -#define DLOG_ASSERT(condition) \ - true ? (void) 0 : LOG_ASSERT(condition) - -#define DCHECK(condition) \ - while (false) \ - CHECK(condition) - -#define DCHECK_EQ(val1, val2) \ - while (false) \ - CHECK_EQ(val1, val2) - -#define DCHECK_NE(val1, val2) \ - while (false) \ - CHECK_NE(val1, val2) - -#define DCHECK_LE(val1, val2) \ - while (false) \ - CHECK_LE(val1, val2) - -#define DCHECK_LT(val1, val2) \ - while (false) \ - CHECK_LT(val1, val2) - -#define DCHECK_GE(val1, val2) \ - while (false) \ - CHECK_GE(val1, val2) - -#define DCHECK_GT(val1, val2) \ - while (false) \ - CHECK_GT(val1, val2) - -#define DCHECK_NOTNULL(val) (val) - -#define DCHECK_STREQ(str1, str2) \ - while (false) \ - CHECK_STREQ(str1, str2) - -#define DCHECK_STRCASEEQ(str1, str2) \ - while (false) \ - CHECK_STRCASEEQ(str1, str2) - -#define DCHECK_STRNE(str1, str2) \ - while (false) \ - CHECK_STRNE(str1, str2) - -#define DCHECK_STRCASENE(str1, str2) \ - while (false) \ - CHECK_STRCASENE(str1, str2) - - -#endif // NDEBUG - -// Log only in verbose mode. - -#define VLOG(verboselevel) LOG_IF(INFO, VLOG_IS_ON(verboselevel)) - -#define VLOG_IF(verboselevel, condition) \ - LOG_IF(INFO, (condition) && VLOG_IS_ON(verboselevel)) - -#define VLOG_EVERY_N(verboselevel, n) \ - LOG_IF_EVERY_N(INFO, VLOG_IS_ON(verboselevel), n) - -#define VLOG_IF_EVERY_N(verboselevel, condition, n) \ - LOG_IF_EVERY_N(INFO, (condition) && VLOG_IS_ON(verboselevel), n) - -// -// This class more or less represents a particular log message. You -// create an instance of LogMessage and then stream stuff to it. -// When you finish streaming to it, ~LogMessage is called and the -// full message gets streamed to the appropriate destination. -// -// You shouldn't actually use LogMessage's constructor to log things, -// though. You should use the LOG() macro (and variants thereof) -// above. -class GOOGLE_GLOG_DLL_DECL LogMessage { -public: - enum { - // Passing kNoLogPrefix for the line number disables the - // log-message prefix. Useful for using the LogMessage - // infrastructure as a printing utility. See also the --log_prefix - // flag for controlling the log-message prefix on an - // application-wide basis. - kNoLogPrefix = -1 - }; - - // LogStream inherit from non-DLL-exported class (std::ostrstream) - // and VC++ produces a warning for this situation. - // However, MSDN says "C4275 can be ignored in Microsoft Visual C++ - // 2005 if you are deriving from a type in the Standard C++ Library" - // http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx - // Let's just ignore the warning. -#ifdef _MSC_VER -# pragma warning(disable: 4275) -#endif - class GOOGLE_GLOG_DLL_DECL LogStream : public std::ostrstream { -#ifdef _MSC_VER -# pragma warning(default: 4275) -#endif - public: - LogStream(char *buf, int len, int ctr) - : ostrstream(buf, len), - ctr_(ctr) { - self_ = this; - } - - int ctr() const { return ctr_; } - void set_ctr(int ctr) { ctr_ = ctr; } - LogStream* self() const { return self_; } - - private: - int ctr_; // Counter hack (for the LOG_EVERY_X() macro) - LogStream *self_; // Consistency check hack - }; - -public: - // icc 8 requires this typedef to avoid an internal compiler error. - typedef void (LogMessage::*SendMethod)(); - - LogMessage(const char* file, int line, LogSeverity severity, int ctr, - SendMethod send_method); - - // Two special constructors that generate reduced amounts of code at - // LOG call sites for common cases. - - // Used for LOG(INFO): Implied are: - // severity = INFO, ctr = 0, send_method = &LogMessage::SendToLog. - // - // Using this constructor instead of the more complex constructor above - // saves 19 bytes per call site. - LogMessage(const char* file, int line); - - // Used for LOG(severity) where severity != INFO. Implied - // are: ctr = 0, send_method = &LogMessage::SendToLog - // - // Using this constructor instead of the more complex constructor above - // saves 17 bytes per call site. - LogMessage(const char* file, int line, LogSeverity severity); - - // Constructor to log this message to a specified sink (if not NULL). - // Implied are: ctr = 0, send_method = &LogMessage::SendToSinkAndLog if - // also_send_to_log is true, send_method = &LogMessage::SendToSink otherwise. - LogMessage(const char* file, int line, LogSeverity severity, LogSink* sink, - bool also_send_to_log); - - // Constructor where we also give a vector pointer - // for storing the messages (if the pointer is not NULL). - // Implied are: ctr = 0, send_method = &LogMessage::SaveOrSendToLog. - LogMessage(const char* file, int line, LogSeverity severity, - std::vector* outvec); - - // Constructor where we also give a string pointer for storing the - // message (if the pointer is not NULL). Implied are: ctr = 0, - // send_method = &LogMessage::WriteToStringAndLog. - LogMessage(const char* file, int line, LogSeverity severity, - std::string* message); - - // A special constructor used for check failures - LogMessage(const char* file, int line, const CheckOpString& result); - - ~LogMessage(); - - // Flush a buffered message to the sink set in the constructor. Always - // called by the destructor, it may also be called from elsewhere if - // needed. Only the first call is actioned; any later ones are ignored. - void Flush(); - - // An arbitrary limit on the length of a single log message. This - // is so that streaming can be done more efficiently. - static const size_t kMaxLogMessageLen; - - // Theses should not be called directly outside of logging.*, - // only passed as SendMethod arguments to other LogMessage methods: - void SendToLog(); // Actually dispatch to the logs - void SendToSyslogAndLog(); // Actually dispatch to syslog and the logs - - // Call abort() or similar to perform LOG(FATAL) crash. - static void Fail() @ac_cv___attribute___noreturn@; - - std::ostream& stream() { return *(data_->stream_); } - - int preserved_errno() const { return data_->preserved_errno_; } - - // Must be called without the log_mutex held. (L < log_mutex) - static int64 num_messages(int severity); - -private: - // Fully internal SendMethod cases: - void SendToSinkAndLog(); // Send to sink if provided and dispatch to the logs - void SendToSink(); // Send to sink if provided, do nothing otherwise. - - // Write to string if provided and dispatch to the logs. - void WriteToStringAndLog(); - - void SaveOrSendToLog(); // Save to stringvec if provided, else to logs - - void Init(const char* file, int line, LogSeverity severity, - void (LogMessage::*send_method)()); - - // Used to fill in crash information during LOG(FATAL) failures. - void RecordCrashReason(glog_internal_namespace_::CrashReason* reason); - - // Counts of messages sent at each priority: - static int64 num_messages_[NUM_SEVERITIES]; // under log_mutex - - // We keep the data in a separate struct so that each instance of - // LogMessage uses less stack space. - struct GOOGLE_GLOG_DLL_DECL LogMessageData { - LogMessageData() {}; - - int preserved_errno_; // preserved errno - char* buf_; - char* message_text_; // Complete message text (points to selected buffer) - LogStream* stream_alloc_; - LogStream* stream_; - char severity_; // What level is this LogMessage logged at? - int line_; // line number where logging call is. - void (LogMessage::*send_method_)(); // Call this in destructor to send - union { // At most one of these is used: union to keep the size low. - LogSink* sink_; // NULL or sink to send message to - std::vector* outvec_; // NULL or vector to push message onto - std::string* message_; // NULL or string to write message into - }; - time_t timestamp_; // Time of creation of LogMessage - struct ::tm tm_time_; // Time of creation of LogMessage - size_t num_prefix_chars_; // # of chars of prefix in this message - size_t num_chars_to_log_; // # of chars of msg to send to log - size_t num_chars_to_syslog_; // # of chars of msg to send to syslog - const char* basename_; // basename of file that called LOG - const char* fullname_; // fullname of file that called LOG - bool has_been_flushed_; // false => data has not been flushed - bool first_fatal_; // true => this was first fatal msg - - ~LogMessageData(); - private: - LogMessageData(const LogMessageData&); - void operator=(const LogMessageData&); - }; - - static LogMessageData fatal_msg_data_exclusive_; - static LogMessageData fatal_msg_data_shared_; - - LogMessageData* allocated_; - LogMessageData* data_; - - friend class LogDestination; - - LogMessage(const LogMessage&); - void operator=(const LogMessage&); -}; - -// This class happens to be thread-hostile because all instances share -// a single data buffer, but since it can only be created just before -// the process dies, we don't worry so much. -class GOOGLE_GLOG_DLL_DECL LogMessageFatal : public LogMessage { - public: - LogMessageFatal(const char* file, int line); - LogMessageFatal(const char* file, int line, const CheckOpString& result); - ~LogMessageFatal() @ac_cv___attribute___noreturn@; -}; - -// A non-macro interface to the log facility; (useful -// when the logging level is not a compile-time constant). -inline void LogAtLevel(int const severity, std::string const &msg) { - LogMessage(__FILE__, __LINE__, severity).stream() << msg; -} - -// A macro alternative of LogAtLevel. New code may want to use this -// version since there are two advantages: 1. this version outputs the -// file name and the line number where this macro is put like other -// LOG macros, 2. this macro can be used as C++ stream. -#define LOG_AT_LEVEL(severity) @ac_google_namespace@::LogMessage(__FILE__, __LINE__, severity).stream() - -// A small helper for CHECK_NOTNULL(). -template -T* CheckNotNull(const char *file, int line, const char *names, T* t) { - if (t == NULL) { - LogMessageFatal(file, line, new std::string(names)); - } - return t; -} - -// Allow folks to put a counter in the LOG_EVERY_X()'ed messages. This -// only works if ostream is a LogStream. If the ostream is not a -// LogStream you'll get an assert saying as much at runtime. -GOOGLE_GLOG_DLL_DECL std::ostream& operator<<(std::ostream &os, - const PRIVATE_Counter&); - - -// Derived class for PLOG*() above. -class GOOGLE_GLOG_DLL_DECL ErrnoLogMessage : public LogMessage { - public: - - ErrnoLogMessage(const char* file, int line, LogSeverity severity, int ctr, - void (LogMessage::*send_method)()); - - // Postpends ": strerror(errno) [errno]". - ~ErrnoLogMessage(); - - private: - ErrnoLogMessage(const ErrnoLogMessage&); - void operator=(const ErrnoLogMessage&); -}; - - -// This class is used to explicitly ignore values in the conditional -// logging macros. This avoids compiler warnings like "value computed -// is not used" and "statement has no effect". - -class GOOGLE_GLOG_DLL_DECL LogMessageVoidify { - public: - LogMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - - -// Flushes all log files that contains messages that are at least of -// the specified severity level. Thread-safe. -GOOGLE_GLOG_DLL_DECL void FlushLogFiles(LogSeverity min_severity); - -// Flushes all log files that contains messages that are at least of -// the specified severity level. Thread-hostile because it ignores -// locking -- used for catastrophic failures. -GOOGLE_GLOG_DLL_DECL void FlushLogFilesUnsafe(LogSeverity min_severity); - -// -// Set the destination to which a particular severity level of log -// messages is sent. If base_filename is "", it means "don't log this -// severity". Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogDestination(LogSeverity severity, - const char* base_filename); - -// -// Set the basename of the symlink to the latest log file at a given -// severity. If symlink_basename is empty, do not make a symlink. If -// you don't call this function, the symlink basename is the -// invocation name of the program. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogSymlink(LogSeverity severity, - const char* symlink_basename); - -// -// Used to send logs to some other kind of destination -// Users should subclass LogSink and override send to do whatever they want. -// Implementations must be thread-safe because a shared instance will -// be called from whichever thread ran the LOG(XXX) line. -class GOOGLE_GLOG_DLL_DECL LogSink { - public: - virtual ~LogSink(); - - // Sink's logging logic (message_len is such as to exclude '\n' at the end). - // This method can't use LOG() or CHECK() as logging system mutex(s) are held - // during this call. - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len) = 0; - - // Redefine this to implement waiting for - // the sink's logging logic to complete. - // It will be called after each send() returns, - // but before that LogMessage exits or crashes. - // By default this function does nothing. - // Using this function one can implement complex logic for send() - // that itself involves logging; and do all this w/o causing deadlocks and - // inconsistent rearrangement of log messages. - // E.g. if a LogSink has thread-specific actions, the send() method - // can simply add the message to a queue and wake up another thread that - // handles real logging while itself making some LOG() calls; - // WaitTillSent() can be implemented to wait for that logic to complete. - // See our unittest for an example. - virtual void WaitTillSent(); - - // Returns the normal text output of the log message. - // Can be useful to implement send(). - static std::string ToString(LogSeverity severity, const char* file, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len); -}; - -// Add or remove a LogSink as a consumer of logging data. Thread-safe. -GOOGLE_GLOG_DLL_DECL void AddLogSink(LogSink *destination); -GOOGLE_GLOG_DLL_DECL void RemoveLogSink(LogSink *destination); - -// -// Specify an "extension" added to the filename specified via -// SetLogDestination. This applies to all severity levels. It's -// often used to append the port we're listening on to the logfile -// name. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogFilenameExtension( - const char* filename_extension); - -// -// Make it so that all log messages of at least a particular severity -// are logged to stderr (in addition to logging to the usual log -// file(s)). Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetStderrLogging(LogSeverity min_severity); - -// -// Make it so that all log messages go only to stderr. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void LogToStderr(); - -// -// Make it so that all log messages of at least a particular severity are -// logged via email to a list of addresses (in addition to logging to the -// usual log file(s)). The list of addresses is just a string containing -// the email addresses to send to (separated by spaces, say). Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetEmailLogging(LogSeverity min_severity, - const char* addresses); - -// A simple function that sends email. dest is a commma-separated -// list of addressess. Thread-safe. -GOOGLE_GLOG_DLL_DECL bool SendEmail(const char *dest, - const char *subject, const char *body); - -GOOGLE_GLOG_DLL_DECL const std::vector& GetLoggingDirectories(); - -// For tests only: Clear the internal [cached] list of logging directories to -// force a refresh the next time GetLoggingDirectories is called. -// Thread-hostile. -void TestOnly_ClearLoggingDirectoriesList(); - -// Returns a set of existing temporary directories, which will be a -// subset of the directories returned by GetLogginDirectories(). -// Thread-safe. -GOOGLE_GLOG_DLL_DECL void GetExistingTempDirectories( - std::vector* list); - -// Print any fatal message again -- useful to call from signal handler -// so that the last thing in the output is the fatal message. -// Thread-hostile, but a race is unlikely. -GOOGLE_GLOG_DLL_DECL void ReprintFatalMessage(); - -// Truncate a log file that may be the append-only output of multiple -// processes and hence can't simply be renamed/reopened (typically a -// stdout/stderr). If the file "path" is > "limit" bytes, copy the -// last "keep" bytes to offset 0 and truncate the rest. Since we could -// be racing with other writers, this approach has the potential to -// lose very small amounts of data. For security, only follow symlinks -// if the path is /proc/self/fd/* -GOOGLE_GLOG_DLL_DECL void TruncateLogFile(const char *path, - int64 limit, int64 keep); - -// Truncate stdout and stderr if they are over the value specified by -// --max_log_size; keep the final 1MB. This function has the same -// race condition as TruncateLogFile. -GOOGLE_GLOG_DLL_DECL void TruncateStdoutStderr(); - -// Return the string representation of the provided LogSeverity level. -// Thread-safe. -GOOGLE_GLOG_DLL_DECL const char* GetLogSeverityName(LogSeverity severity); - -// --------------------------------------------------------------------- -// Implementation details that are not useful to most clients -// --------------------------------------------------------------------- - -// A Logger is the interface used by logging modules to emit entries -// to a log. A typical implementation will dump formatted data to a -// sequence of files. We also provide interfaces that will forward -// the data to another thread so that the invoker never blocks. -// Implementations should be thread-safe since the logging system -// will write to them from multiple threads. - -namespace base { - -class GOOGLE_GLOG_DLL_DECL Logger { - public: - virtual ~Logger(); - - // Writes "message[0,message_len-1]" corresponding to an event that - // occurred at "timestamp". If "force_flush" is true, the log file - // is flushed immediately. - // - // The input message has already been formatted as deemed - // appropriate by the higher level logging facility. For example, - // textual log messages already contain timestamps, and the - // file:linenumber header. - virtual void Write(bool force_flush, - time_t timestamp, - const char* message, - int message_len) = 0; - - // Flush any buffered messages - virtual void Flush() = 0; - - // Get the current LOG file size. - // The returned value is approximate since some - // logged data may not have been flushed to disk yet. - virtual uint32 LogSize() = 0; -}; - -// Get the logger for the specified severity level. The logger -// remains the property of the logging module and should not be -// deleted by the caller. Thread-safe. -extern GOOGLE_GLOG_DLL_DECL Logger* GetLogger(LogSeverity level); - -// Set the logger for the specified severity level. The logger -// becomes the property of the logging module and should not -// be deleted by the caller. Thread-safe. -extern GOOGLE_GLOG_DLL_DECL void SetLogger(LogSeverity level, Logger* logger); - -} - -// glibc has traditionally implemented two incompatible versions of -// strerror_r(). There is a poorly defined convention for picking the -// version that we want, but it is not clear whether it even works with -// all versions of glibc. -// So, instead, we provide this wrapper that automatically detects the -// version that is in use, and then implements POSIX semantics. -// N.B. In addition to what POSIX says, we also guarantee that "buf" will -// be set to an empty string, if this function failed. This means, in most -// cases, you do not need to check the error code and you can directly -// use the value of "buf". It will never have an undefined value. -GOOGLE_GLOG_DLL_DECL int posix_strerror_r(int err, char *buf, size_t len); - - -// A class for which we define operator<<, which does nothing. -class GOOGLE_GLOG_DLL_DECL NullStream : public LogMessage::LogStream { - public: - // Initialize the LogStream so the messages can be written somewhere - // (they'll never be actually displayed). This will be needed if a - // NullStream& is implicitly converted to LogStream&, in which case - // the overloaded NullStream::operator<< will not be invoked. - NullStream() : LogMessage::LogStream(message_buffer_, 1, 0) { } - NullStream(const char* /*file*/, int /*line*/, - const CheckOpString& /*result*/) : - LogMessage::LogStream(message_buffer_, 1, 0) { } - NullStream &stream() { return *this; } - private: - // A very short buffer for messages (which we discard anyway). This - // will be needed if NullStream& converted to LogStream& (e.g. as a - // result of a conditional expression). - char message_buffer_[2]; -}; - -// Do nothing. This operator is inline, allowing the message to be -// compiled away. The message will not be compiled away if we do -// something like (flag ? LOG(INFO) : LOG(ERROR)) << message; when -// SKIP_LOG=WARNING. In those cases, NullStream will be implicitly -// converted to LogStream and the message will be computed and then -// quietly discarded. -template -inline NullStream& operator<<(NullStream &str, const T &value) { return str; } - -// Similar to NullStream, but aborts the program (without stack -// trace), like LogMessageFatal. -class GOOGLE_GLOG_DLL_DECL NullStreamFatal : public NullStream { - public: - NullStreamFatal() { } - NullStreamFatal(const char* file, int line, const CheckOpString& result) : - NullStream(file, line, result) { } - @ac_cv___attribute___noreturn@ ~NullStreamFatal() { _exit(1); } -}; - -// Install a signal handler that will dump signal information and a stack -// trace when the program crashes on certain signals. We'll install the -// signal handler for the following signals. -// -// SIGSEGV, SIGILL, SIGFPE, SIGABRT, SIGBUS, and SIGTERM. -// -// By default, the signal handler will write the failure dump to the -// standard error. You can customize the destination by installing your -// own writer function by InstallFailureWriter() below. -// -// Note on threading: -// -// The function should be called before threads are created, if you want -// to use the failure signal handler for all threads. The stack trace -// will be shown only for the thread that receives the signal. In other -// words, stack traces of other threads won't be shown. -GOOGLE_GLOG_DLL_DECL void InstallFailureSignalHandler(); - -// Installs a function that is used for writing the failure dump. "data" -// is the pointer to the beginning of a message to be written, and "size" -// is the size of the message. You should not expect the data is -// terminated with '\0'. -GOOGLE_GLOG_DLL_DECL void InstallFailureWriter( - void (*writer)(const char* data, int size)); - -@ac_google_end_namespace@ - -#endif // _LOGGING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/raw_logging.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/raw_logging.h.in deleted file mode 100644 index 5378cd46..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/raw_logging.h.in +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Maxim Lifantsev -// -// Thread-safe logging routines that do not allocate any memory or -// acquire any locks, and can therefore be used by low-level memory -// allocation and synchronization code. - -#ifndef BASE_RAW_LOGGING_H_ -#define BASE_RAW_LOGGING_H_ - -#include - -@ac_google_start_namespace@ - -#include "glog/log_severity.h" -#include "glog/vlog_is_on.h" - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// This is similar to LOG(severity) << format... and VLOG(level) << format.., -// but -// * it is to be used ONLY by low-level modules that can't use normal LOG() -// * it is desiged to be a low-level logger that does not allocate any -// memory and does not need any locks, hence: -// * it logs straight and ONLY to STDERR w/o buffering -// * it uses an explicit format and arguments list -// * it will silently chop off really long message strings -// Usage example: -// RAW_LOG(ERROR, "Failed foo with %i: %s", status, error); -// RAW_VLOG(3, "status is %i", status); -// These will print an almost standard log lines like this to stderr only: -// E0821 211317 file.cc:123] RAW: Failed foo with 22: bad_file -// I0821 211317 file.cc:142] RAW: status is 20 -#define RAW_LOG(severity, ...) \ - do { \ - switch (@ac_google_namespace@::severity) { \ - case 0: \ - RAW_LOG_INFO(__VA_ARGS__); \ - break; \ - case 1: \ - RAW_LOG_WARNING(__VA_ARGS__); \ - break; \ - case 2: \ - RAW_LOG_ERROR(__VA_ARGS__); \ - break; \ - case 3: \ - RAW_LOG_FATAL(__VA_ARGS__); \ - break; \ - default: \ - break; \ - } \ - } while (0) - -// The following STRIP_LOG testing is performed in the header file so that it's -// possible to completely compile out the logging code and the log messages. -#if STRIP_LOG == 0 -#define RAW_VLOG(verboselevel, ...) \ - do { \ - if (VLOG_IS_ON(verboselevel)) { \ - RAW_LOG_INFO(__VA_ARGS__); \ - } \ - } while (0) -#else -#define RAW_VLOG(verboselevel, ...) RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG == 0 - -#if STRIP_LOG == 0 -#define RAW_LOG_INFO(...) @ac_google_namespace@::RawLog__(@ac_google_namespace@::INFO, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_INFO(...) @ac_google_namespace@::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG == 0 - -#if STRIP_LOG <= 1 -#define RAW_LOG_WARNING(...) @ac_google_namespace@::RawLog__(@ac_google_namespace@::WARNING, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_WARNING(...) @ac_google_namespace@::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG <= 1 - -#if STRIP_LOG <= 2 -#define RAW_LOG_ERROR(...) @ac_google_namespace@::RawLog__(@ac_google_namespace@::ERROR, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_ERROR(...) @ac_google_namespace@::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG <= 2 - -#if STRIP_LOG <= 3 -#define RAW_LOG_FATAL(...) @ac_google_namespace@::RawLog__(@ac_google_namespace@::FATAL, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_FATAL(...) \ - do { \ - @ac_google_namespace@::RawLogStub__(0, __VA_ARGS__); \ - exit(1); \ - } while (0) -#endif // STRIP_LOG <= 3 - -// Similar to CHECK(condition) << message, -// but for low-level modules: we use only RAW_LOG that does not allocate memory. -// We do not want to provide args list here to encourage this usage: -// if (!cond) RAW_LOG(FATAL, "foo ...", hard_to_compute_args); -// so that the args are not computed when not needed. -#define RAW_CHECK(condition, message) \ - do { \ - if (!(condition)) { \ - RAW_LOG(FATAL, "Check %s failed: %s", #condition, message); \ - } \ - } while (0) - -// Debug versions of RAW_LOG and RAW_CHECK -#ifndef NDEBUG - -#define RAW_DLOG(severity, ...) RAW_LOG(severity, __VA_ARGS__) -#define RAW_DCHECK(condition, message) RAW_CHECK(condition, message) - -#else // NDEBUG - -#define RAW_DLOG(severity, ...) \ - while (false) \ - RAW_LOG(severity, __VA_ARGS__) -#define RAW_DCHECK(condition, message) \ - while (false) \ - RAW_CHECK(condition, message) - -#endif // NDEBUG - -// Stub log function used to work around for unused variable warnings when -// building with STRIP_LOG > 0. -static inline void RawLogStub__(int ignored, ...) { -} - -// Helper function to implement RAW_LOG and RAW_VLOG -// Logs format... at "severity" level, reporting it -// as called from file:line. -// This does not allocate memory or acquire locks. -GOOGLE_GLOG_DLL_DECL void RawLog__(LogSeverity severity, - const char* file, - int line, - const char* format, ...) - @ac_cv___attribute___printf_4_5@; - -// Hack to propagate time information into this module so that -// this module does not have to directly call localtime_r(), -// which could allocate memory. -GOOGLE_GLOG_DLL_DECL void RawLog__SetLastTime(const struct tm& t, int usecs); - -@ac_google_end_namespace@ - -#endif // BASE_RAW_LOGGING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/stl_logging.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/stl_logging.h.in deleted file mode 100644 index f09e0871..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/stl_logging.h.in +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2003, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Stream output operators for STL containers; to be used for logging *only*. -// Inclusion of this file lets you do: -// -// list x; -// LOG(INFO) << "data: " << x; -// vector v1, v2; -// CHECK_EQ(v1, v2); -// -// Note that if you want to use these operators from the non-global namespace, -// you may get an error since they are not in namespace std (and they are not -// in namespace std since that would result in undefined behavior). You may -// need to write -// -// using ::operator<<; -// -// to fix these errors. - -#ifndef UTIL_GTL_STL_LOGGING_INL_H_ -#define UTIL_GTL_STL_LOGGING_INL_H_ - -#if !@ac_cv_cxx_using_operator@ -# error We do not support stl_logging for this compiler -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifdef __GNUC__ -# include -# include -# include -#endif - -template -inline std::ostream& operator<<(std::ostream& out, - const std::pair& p) { - out << '(' << p.first << ", " << p.second << ')'; - return out; -} - -@ac_google_start_namespace@ - -template -inline void PrintSequence(std::ostream& out, Iter begin, Iter end) { - using ::operator<<; - // Output at most 100 elements -- appropriate if used for logging. - for (int i = 0; begin != end && i < 100; ++i, ++begin) { - if (i > 0) out << ' '; - out << *begin; - } - if (begin != end) { - out << " ..."; - } -} - -@ac_google_end_namespace@ - -#define OUTPUT_TWO_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - @ac_google_namespace@::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_TWO_ARG_CONTAINER(std::vector) -OUTPUT_TWO_ARG_CONTAINER(std::deque) -OUTPUT_TWO_ARG_CONTAINER(std::list) -#ifdef __GNUC__ -OUTPUT_TWO_ARG_CONTAINER(__gnu_cxx::slist) -#endif - -#undef OUTPUT_TWO_ARG_CONTAINER - -#define OUTPUT_THREE_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - @ac_google_namespace@::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_THREE_ARG_CONTAINER(std::set) -OUTPUT_THREE_ARG_CONTAINER(std::multiset) - -#undef OUTPUT_THREE_ARG_CONTAINER - -#define OUTPUT_FOUR_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - @ac_google_namespace@::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_FOUR_ARG_CONTAINER(std::map) -OUTPUT_FOUR_ARG_CONTAINER(std::multimap) -#ifdef __GNUC__ -OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_set) -OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_multiset) -#endif - -#undef OUTPUT_FOUR_ARG_CONTAINER - -#define OUTPUT_FIVE_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - @ac_google_namespace@::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -#ifdef __GNUC__ -OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_map) -OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_multimap) -#endif - -#undef OUTPUT_FIVE_ARG_CONTAINER - -#endif // UTIL_GTL_STL_LOGGING_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/vlog_is_on.h.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/vlog_is_on.h.in deleted file mode 100644 index 3f4c4a32..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/glog/vlog_is_on.h.in +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 1999, 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney and many others -// -// Defines the VLOG_IS_ON macro that controls the variable-verbosity -// conditional logging. -// -// It's used by VLOG and VLOG_IF in logging.h -// and by RAW_VLOG in raw_logging.h to trigger the logging. -// -// It can also be used directly e.g. like this: -// if (VLOG_IS_ON(2)) { -// // do some logging preparation and logging -// // that can't be accomplished e.g. via just VLOG(2) << ...; -// } -// -// The truth value that VLOG_IS_ON(level) returns is determined by -// the three verbosity level flags: -// --v= Gives the default maximal active V-logging level; -// 0 is the default. -// Normally positive values are used for V-logging levels. -// --vmodule= Gives the per-module maximal V-logging levels to override -// the value given by --v. -// E.g. "my_module=2,foo*=3" would change the logging level -// for all code in source files "my_module.*" and "foo*.*" -// ("-inl" suffixes are also disregarded for this matching). -// -// SetVLOGLevel helper function is provided to do limited dynamic control over -// V-logging by overriding the per-module settings given via --vmodule flag. -// -// CAVEAT: --vmodule functionality is not available in non gcc compilers. -// - -#ifndef BASE_VLOG_IS_ON_H_ -#define BASE_VLOG_IS_ON_H_ - -#include "glog/log_severity.h" - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -#if defined(__GNUC__) -// We emit an anonymous static int* variable at every VLOG_IS_ON(n) site. -// (Normally) the first time every VLOG_IS_ON(n) site is hit, -// we determine what variable will dynamically control logging at this site: -// it's either FLAGS_v or an appropriate internal variable -// matching the current source file that represents results of -// parsing of --vmodule flag and/or SetVLOGLevel calls. -#define VLOG_IS_ON(verboselevel) \ - __extension__ \ - ({ static @ac_google_namespace@::int32* vlocal__ = &@ac_google_namespace@::kLogSiteUninitialized; \ - @ac_google_namespace@::int32 verbose_level__ = (verboselevel); \ - (*vlocal__ >= verbose_level__) && \ - ((vlocal__ != &@ac_google_namespace@::kLogSiteUninitialized) || \ - (@ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \ - __FILE__, verbose_level__))); }) -#else -// GNU extensions not available, so we do not support --vmodule. -// Dynamic value of FLAGS_v always controls the logging level. -#define VLOG_IS_ON(verboselevel) (FLAGS_v >= (verboselevel)) -#endif - -// Set VLOG(_IS_ON) level for module_pattern to log_level. -// This lets us dynamically control what is normally set by the --vmodule flag. -// Returns the level that previously applied to module_pattern. -// NOTE: To change the log level for VLOG(_IS_ON) sites -// that have already executed after/during InitGoogleLogging, -// one needs to supply the exact --vmodule pattern that applied to them. -// (If no --vmodule pattern applied to them -// the value of FLAGS_v will continue to control them.) -extern GOOGLE_GLOG_DLL_DECL int SetVLOGLevel(const char* module_pattern, - int log_level); - -// Various declarations needed for VLOG_IS_ON above: ========================= - -// Special value used to indicate that a VLOG_IS_ON site has not been -// initialized. We make this a large value, so the common-case check -// of "*vlocal__ >= verbose_level__" in VLOG_IS_ON definition -// passes in such cases and InitVLOG3__ is then triggered. -extern @ac_google_namespace@::int32 kLogSiteUninitialized; - -// Helper routine which determines the logging info for a particalur VLOG site. -// site_flag is the address of the site-local pointer to the controlling -// verbosity level -// site_default is the default to use for *site_flag -// fname is the current source file name -// verbose_level is the argument to VLOG_IS_ON -// We will return the return value for VLOG_IS_ON -// and if possible set *site_flag appropriately. -extern GOOGLE_GLOG_DLL_DECL bool InitVLOG3__( - @ac_google_namespace@::int32** site_flag, - @ac_google_namespace@::int32* site_default, - const char* fname, - @ac_google_namespace@::int32 verbose_level); - -#endif // BASE_VLOG_IS_ON_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/googletest.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/googletest.h deleted file mode 100644 index c9e413e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/googletest.h +++ /dev/null @@ -1,604 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Shinichiro Hamaji -// (based on googletest: http://code.google.com/p/googletest/) - -#ifdef GOOGLETEST_H__ -#error You must not include this file twice. -#endif -#define GOOGLETEST_H__ - -#include "utilities.h" - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif - -#include "base/commandlineflags.h" - -using std::map; -using std::string; -using std::vector; - -_START_GOOGLE_NAMESPACE_ - -extern GOOGLE_GLOG_DLL_DECL void (*g_logging_fail_func)(); - -_END_GOOGLE_NAMESPACE_ - -#undef GOOGLE_GLOG_DLL_DECL -#define GOOGLE_GLOG_DLL_DECL - -static inline string GetTempDir() { -#ifndef OS_WINDOWS - return "/tmp"; -#else - char tmp[MAX_PATH]; - GetTempPathA(MAX_PATH, tmp); - return tmp; -#endif -} - -#ifdef OS_WINDOWS -// The test will run in glog/vsproject/ -// (e.g., glog/vsproject/logging_unittest). -static const char TEST_SRC_DIR[] = "../.."; -#elif !defined(TEST_SRC_DIR) -# warning TEST_SRC_DIR should be defined in config.h -static const char TEST_SRC_DIR[] = "."; -#endif - -DEFINE_string(test_tmpdir, GetTempDir(), "Dir we use for temp files"); -DEFINE_string(test_srcdir, TEST_SRC_DIR, - "Source-dir root, needed to find glog_unittest_flagfile"); -DEFINE_bool(run_benchmark, false, "If true, run benchmarks"); -#ifdef NDEBUG -DEFINE_int32(benchmark_iters, 100000000, "Number of iterations per benchmark"); -#else -DEFINE_int32(benchmark_iters, 100000, "Number of iterations per benchmark"); -#endif - -#ifdef HAVE_LIB_GTEST -# include -// Use our ASSERT_DEATH implementation. -# undef ASSERT_DEATH -# undef ASSERT_DEBUG_DEATH -using testing::InitGoogleTest; -#else - -_START_GOOGLE_NAMESPACE_ - -void InitGoogleTest(int* argc, char** argv) {} - -// The following is some bare-bones testing infrastructure - -#define EXPECT_TRUE(cond) \ - do { \ - if (!(cond)) { \ - fprintf(stderr, "Check failed: %s\n", #cond); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_FALSE(cond) EXPECT_TRUE(!(cond)) - -#define EXPECT_OP(op, val1, val2) \ - do { \ - if (!((val1) op (val2))) { \ - fprintf(stderr, "Check failed: %s %s %s\n", #val1, #op, #val2); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_EQ(val1, val2) EXPECT_OP(==, val1, val2) -#define EXPECT_NE(val1, val2) EXPECT_OP(!=, val1, val2) -#define EXPECT_GT(val1, val2) EXPECT_OP(>, val1, val2) -#define EXPECT_LT(val1, val2) EXPECT_OP(<, val1, val2) - -#define EXPECT_NAN(arg) \ - do { \ - if (!isnan(arg)) { \ - fprintf(stderr, "Check failed: isnan(%s)\n", #arg); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_INF(arg) \ - do { \ - if (!isinf(arg)) { \ - fprintf(stderr, "Check failed: isinf(%s)\n", #arg); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_DOUBLE_EQ(val1, val2) \ - do { \ - if (((val1) < (val2) - 0.001 || (val1) > (val2) + 0.001)) { \ - fprintf(stderr, "Check failed: %s == %s\n", #val1, #val2); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_STREQ(val1, val2) \ - do { \ - if (strcmp((val1), (val2)) != 0) { \ - fprintf(stderr, "Check failed: streq(%s, %s)\n", #val1, #val2); \ - exit(1); \ - } \ - } while (0) - -vector g_testlist; // the tests to run - -#define TEST(a, b) \ - struct Test_##a##_##b { \ - Test_##a##_##b() { g_testlist.push_back(&Run); } \ - static void Run() { FlagSaver fs; RunTest(); } \ - static void RunTest(); \ - }; \ - static Test_##a##_##b g_test_##a##_##b; \ - void Test_##a##_##b::RunTest() - - -static inline int RUN_ALL_TESTS() { - vector::const_iterator it; - for (it = g_testlist.begin(); it != g_testlist.end(); ++it) { - (*it)(); - } - fprintf(stderr, "Passed %d tests\n\nPASS\n", (int)g_testlist.size()); - return 0; -} - -_END_GOOGLE_NAMESPACE_ - -#endif // ! HAVE_LIB_GTEST - -_START_GOOGLE_NAMESPACE_ - -static bool g_called_abort; -static jmp_buf g_jmp_buf; -static inline void CalledAbort() { - g_called_abort = true; - longjmp(g_jmp_buf, 1); -} - -#ifdef OS_WINDOWS -// TODO(hamaji): Death test somehow doesn't work in Windows. -#define ASSERT_DEATH(fn, msg) -#else -#define ASSERT_DEATH(fn, msg) \ - do { \ - g_called_abort = false; \ - /* in logging.cc */ \ - void (*original_logging_fail_func)() = g_logging_fail_func; \ - g_logging_fail_func = &CalledAbort; \ - if (!setjmp(g_jmp_buf)) fn; \ - /* set back to their default */ \ - g_logging_fail_func = original_logging_fail_func; \ - if (!g_called_abort) { \ - fprintf(stderr, "Function didn't die (%s): %s\n", msg, #fn); \ - exit(1); \ - } \ - } while (0) -#endif - -#ifdef NDEBUG -#define ASSERT_DEBUG_DEATH(fn, msg) -#else -#define ASSERT_DEBUG_DEATH(fn, msg) ASSERT_DEATH(fn, msg) -#endif // NDEBUG - -// Benchmark tools. - -#define BENCHMARK(n) static BenchmarkRegisterer __benchmark_ ## n (#n, &n); - -map g_benchlist; // the benchmarks to run - -class BenchmarkRegisterer { - public: - BenchmarkRegisterer(const char* name, void (*function)(int iters)) { - EXPECT_TRUE(g_benchlist.insert(std::make_pair(name, function)).second); - } -}; - -static inline void RunSpecifiedBenchmarks() { - if (!FLAGS_run_benchmark) { - return; - } - - int iter_cnt = FLAGS_benchmark_iters; - puts("Benchmark\tTime(ns)\tIterations"); - for (map::const_iterator iter = g_benchlist.begin(); - iter != g_benchlist.end(); - ++iter) { - clock_t start = clock(); - iter->second(iter_cnt); - double elapsed_ns = - ((double)clock() - start) / CLOCKS_PER_SEC * 1000*1000*1000; - printf("%s\t%8.2lf\t%10d\n", - iter->first.c_str(), elapsed_ns / iter_cnt, iter_cnt); - } - puts(""); -} - -// ---------------------------------------------------------------------- -// Golden file functions -// ---------------------------------------------------------------------- - -class CapturedStream { - public: - CapturedStream(int fd, const string & filename) : - fd_(fd), - uncaptured_fd_(-1), - filename_(filename) { - Capture(); - } - - ~CapturedStream() { - if (uncaptured_fd_ != -1) { - CHECK(close(uncaptured_fd_) != -1); - } - } - - // Start redirecting output to a file - void Capture() { - // Keep original stream for later - CHECK(uncaptured_fd_ == -1) << ", Stream " << fd_ << " already captured!"; - uncaptured_fd_ = dup(fd_); - CHECK(uncaptured_fd_ != -1); - - // Open file to save stream to - int cap_fd = open(filename_.c_str(), - O_CREAT | O_TRUNC | O_WRONLY, - S_IRUSR | S_IWUSR); - CHECK(cap_fd != -1); - - // Send stdout/stderr to this file - fflush(NULL); - CHECK(dup2(cap_fd, fd_) != -1); - CHECK(close(cap_fd) != -1); - } - - // Remove output redirection - void StopCapture() { - // Restore original stream - if (uncaptured_fd_ != -1) { - fflush(NULL); - CHECK(dup2(uncaptured_fd_, fd_) != -1); - } - } - - const string & filename() const { return filename_; } - - private: - int fd_; // file descriptor being captured - int uncaptured_fd_; // where the stream was originally being sent to - string filename_; // file where stream is being saved -}; -static CapturedStream * s_captured_streams[STDERR_FILENO+1]; -// Redirect a file descriptor to a file. -// fd - Should be STDOUT_FILENO or STDERR_FILENO -// filename - File where output should be stored -static inline void CaptureTestOutput(int fd, const string & filename) { - CHECK((fd == STDOUT_FILENO) || (fd == STDERR_FILENO)); - CHECK(s_captured_streams[fd] == NULL); - s_captured_streams[fd] = new CapturedStream(fd, filename); -} -static inline void CaptureTestStderr() { - CaptureTestOutput(STDERR_FILENO, FLAGS_test_tmpdir + "/captured.err"); -} -// Return the size (in bytes) of a file -static inline size_t GetFileSize(FILE * file) { - fseek(file, 0, SEEK_END); - return static_cast(ftell(file)); -} -// Read the entire content of a file as a string -static inline string ReadEntireFile(FILE * file) { - const size_t file_size = GetFileSize(file); - char * const buffer = new char[file_size]; - - size_t bytes_last_read = 0; // # of bytes read in the last fread() - size_t bytes_read = 0; // # of bytes read so far - - fseek(file, 0, SEEK_SET); - - // Keep reading the file until we cannot read further or the - // pre-determined file size is reached. - do { - bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file); - bytes_read += bytes_last_read; - } while (bytes_last_read > 0 && bytes_read < file_size); - - const string content = string(buffer, buffer+bytes_read); - delete[] buffer; - - return content; -} -// Get the captured stdout (when fd is STDOUT_FILENO) or stderr (when -// fd is STDERR_FILENO) as a string -static inline string GetCapturedTestOutput(int fd) { - CHECK(fd == STDOUT_FILENO || fd == STDERR_FILENO); - CapturedStream * const cap = s_captured_streams[fd]; - CHECK(cap) - << ": did you forget CaptureTestStdout() or CaptureTestStderr()?"; - - // Make sure everything is flushed. - cap->StopCapture(); - - // Read the captured file. - FILE * const file = fopen(cap->filename().c_str(), "r"); - const string content = ReadEntireFile(file); - fclose(file); - - delete cap; - s_captured_streams[fd] = NULL; - - return content; -} -// Get the captured stderr of a test as a string. -static inline string GetCapturedTestStderr() { - return GetCapturedTestOutput(STDERR_FILENO); -} - -// Check if the string is [IWEF](\d{4}|DATE) -static inline bool IsLoggingPrefix(const string& s) { - if (s.size() != 5) return false; - if (!strchr("IWEF", s[0])) return false; - for (int i = 1; i <= 4; ++i) { - if (!isdigit(s[i]) && s[i] != "DATE"[i-1]) return false; - } - return true; -} - -// Convert log output into normalized form. -// -// Example: -// I0102 030405 logging_unittest.cc:345] RAW: vlog -1 -// => IDATE TIME__ logging_unittest.cc:LINE] RAW: vlog -1 -static inline string MungeLine(const string& line) { - std::istringstream iss(line); - string before, logcode_date, time, thread_lineinfo; - iss >> logcode_date; - while (!IsLoggingPrefix(logcode_date)) { - before += " " + logcode_date; - if (!(iss >> logcode_date)) { - // We cannot find the header of log output. - return before; - } - } - if (!before.empty()) before += " "; - iss >> time; - iss >> thread_lineinfo; - CHECK(!thread_lineinfo.empty()); - if (thread_lineinfo[thread_lineinfo.size() - 1] != ']') { - // We found thread ID. - string tmp; - iss >> tmp; - CHECK(!tmp.empty()); - CHECK_EQ(']', tmp[tmp.size() - 1]); - thread_lineinfo = "THREADID " + tmp; - } - size_t index = thread_lineinfo.find(':'); - CHECK_NE(string::npos, index); - thread_lineinfo = thread_lineinfo.substr(0, index+1) + "LINE]"; - string rest; - std::getline(iss, rest); - return (before + logcode_date[0] + "DATE TIME__ " + thread_lineinfo + - MungeLine(rest)); -} - -static inline void StringReplace(string* str, - const string& oldsub, - const string& newsub) { - size_t pos = str->find(oldsub); - if (pos != string::npos) { - str->replace(pos, oldsub.size(), newsub.c_str()); - } -} - -static inline string Munge(const string& filename) { - FILE* fp = fopen(filename.c_str(), "rb"); - CHECK(fp != NULL) << filename << ": couldn't open"; - char buf[4096]; - string result; - while (fgets(buf, 4095, fp)) { - string line = MungeLine(buf); - char null_str[256]; - sprintf(null_str, "%p", static_cast(NULL)); - StringReplace(&line, "__NULLP__", null_str); - // Remove 0x prefix produced by %p. VC++ doesn't put the prefix. - StringReplace(&line, " 0x", " "); - - char errmsg_buf[100]; - posix_strerror_r(0, errmsg_buf, sizeof(errmsg_buf)); - if (*errmsg_buf == '\0') { - // MacOSX 10.4 and FreeBSD return empty string for errno=0. - // In such case, the we need to remove an extra space. - StringReplace(&line, "__SUCCESS__ ", ""); - } else { - StringReplace(&line, "__SUCCESS__", errmsg_buf); - } - StringReplace(&line, "__ENOENT__", strerror(ENOENT)); - StringReplace(&line, "__EINTR__", strerror(EINTR)); - StringReplace(&line, "__ENXIO__", strerror(ENXIO)); - StringReplace(&line, "__ENOEXEC__", strerror(ENOEXEC)); - result += line + "\n"; - } - fclose(fp); - return result; -} - -static inline void WriteToFile(const string& body, const string& file) { - FILE* fp = fopen(file.c_str(), "wb"); - fwrite(body.data(), 1, body.size(), fp); - fclose(fp); -} - -static inline bool MungeAndDiffTestStderr(const string& golden_filename) { - CapturedStream* cap = s_captured_streams[STDERR_FILENO]; - CHECK(cap) << ": did you forget CaptureTestStderr()?"; - - cap->StopCapture(); - - // Run munge - const string captured = Munge(cap->filename()); - const string golden = Munge(golden_filename); - if (captured != golden) { - fprintf(stderr, - "Test with golden file failed. We'll try to show the diff:\n"); - string munged_golden = golden_filename + ".munged"; - WriteToFile(golden, munged_golden); - string munged_captured = cap->filename() + ".munged"; - WriteToFile(captured, munged_captured); - string diffcmd("diff -u " + munged_golden + " " + munged_captured); - if (system(diffcmd.c_str()) != 0) { - fprintf(stderr, "diff command was failed.\n"); - } - unlink(munged_golden.c_str()); - unlink(munged_captured.c_str()); - return false; - } - LOG(INFO) << "Diff was successful"; - return true; -} - -// Save flags used from logging_unittest.cc. -#ifndef HAVE_LIB_GFLAGS -struct FlagSaver { - FlagSaver() - : v_(FLAGS_v), - stderrthreshold_(FLAGS_stderrthreshold), - logtostderr_(FLAGS_logtostderr), - alsologtostderr_(FLAGS_alsologtostderr) {} - ~FlagSaver() { - FLAGS_v = v_; - FLAGS_stderrthreshold = stderrthreshold_; - FLAGS_logtostderr = logtostderr_; - FLAGS_alsologtostderr = alsologtostderr_; - } - int v_; - int stderrthreshold_; - bool logtostderr_; - bool alsologtostderr_; -}; -#endif - -class Thread { - public: - virtual ~Thread() {} - - void SetJoinable(bool joinable) {} -#if defined(OS_WINDOWS) || defined(OS_CYGWIN) - void Start() { - handle_ = CreateThread(NULL, - 0, - (LPTHREAD_START_ROUTINE)&Thread::InvokeThread, - (LPVOID)this, - 0, - &th_); - CHECK(handle_) << "CreateThread"; - } - void Join() { - WaitForSingleObject(handle_, INFINITE); - } -#elif defined(HAVE_PTHREAD) - void Start() { - pthread_create(&th_, NULL, &Thread::InvokeThread, this); - } - void Join() { - pthread_join(th_, NULL); - } -#else -# error No thread implementation. -#endif - - protected: - virtual void Run() = 0; - - private: - static void* InvokeThread(void* self) { - ((Thread*)self)->Run(); - return NULL; - } - -#if defined(OS_WINDOWS) || defined(OS_CYGWIN) - HANDLE handle_; - DWORD th_; -#else - pthread_t th_; -#endif -}; - -static inline void SleepForMilliseconds(int t) { -#ifndef OS_WINDOWS - usleep(t * 1000); -#else - Sleep(t); -#endif -} - -// Add hook for operator new to ensure there are no memory allocation. - -void (*g_new_hook)() = NULL; - -_END_GOOGLE_NAMESPACE_ - -void* operator new(size_t size) { - if (GOOGLE_NAMESPACE::g_new_hook) { - GOOGLE_NAMESPACE::g_new_hook(); - } - return malloc(size); -} - -void* operator new[](size_t size) { - return ::operator new(size); -} - -void operator delete(void* p) { - free(p); -} - -void operator delete[](void* p) { - ::operator delete(p); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging.cc deleted file mode 100644 index 868898f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging.cc +++ /dev/null @@ -1,1781 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#define _GNU_SOURCE 1 // needed for O_NOFOLLOW and pread()/pwrite() - -#include "utilities.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include // For _exit. -#endif -#include -#include -#include -#ifdef HAVE_SYS_UTSNAME_H -# include // For uname. -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_PWD_H -# include -#endif -#ifdef HAVE_SYSLOG_H -# include -#endif -#include -#include // for errno -#include -#include "base/commandlineflags.h" // to get the program name -#include "glog/logging.h" -#include "glog/raw_logging.h" -#include "base/googleinit.h" - -#ifdef HAVE_STACKTRACE -# include "stacktrace.h" -#endif - -using std::string; -using std::vector; -using std::ostrstream; -using std::setw; -using std::setfill; -using std::hex; -using std::dec; -using std::min; -using std::ostream; -using std::ostringstream; -using std::strstream; - -// There is no thread annotation support. -#define EXCLUSIVE_LOCKS_REQUIRED(mu) - -static bool BoolFromEnv(const char *varname, bool defval) { - const char* const valstr = getenv(varname); - if (!valstr) { - return defval; - } - return memchr("tTyY1\0", valstr[0], 6) != NULL; -} - -GLOG_DEFINE_bool(logtostderr, BoolFromEnv("GOOGLE_LOGTOSTDERR", false), - "log messages go to stderr instead of logfiles"); -GLOG_DEFINE_bool(alsologtostderr, BoolFromEnv("GOOGLE_ALSOLOGTOSTDERR", false), - "log messages go to stderr in addition to logfiles"); -#ifdef OS_LINUX -GLOG_DEFINE_bool(drop_log_memory, true, "Drop in-memory buffers of log contents. " - "Logs can grow very quickly and they are rarely read before they " - "need to be evicted from memory. Instead, drop them from memory " - "as soon as they are flushed to disk."); -_START_GOOGLE_NAMESPACE_ -namespace logging { -static const int64 kPageSize = getpagesize(); -} -_END_GOOGLE_NAMESPACE_ -#endif - -// By default, errors (including fatal errors) get logged to stderr as -// well as the file. -// -// The default is ERROR instead of FATAL so that users can see problems -// when they run a program without having to look in another file. -DEFINE_int32(stderrthreshold, - GOOGLE_NAMESPACE::ERROR, - "log messages at or above this level are copied to stderr in " - "addition to logfiles. This flag obsoletes --alsologtostderr."); - -GLOG_DEFINE_string(alsologtoemail, "", - "log messages go to these email addresses " - "in addition to logfiles"); -GLOG_DEFINE_bool(log_prefix, true, - "Prepend the log prefix to the start of each log line"); -GLOG_DEFINE_int32(minloglevel, 0, "Messages logged at a lower level than this don't " - "actually get logged anywhere"); -GLOG_DEFINE_int32(logbuflevel, 0, - "Buffer log messages logged at this level or lower" - " (-1 means don't buffer; 0 means buffer INFO only;" - " ...)"); -GLOG_DEFINE_int32(logbufsecs, 30, - "Buffer log messages for at most this many seconds"); -GLOG_DEFINE_int32(logemaillevel, 999, - "Email log messages logged at this level or higher" - " (0 means email all; 3 means email FATAL only;" - " ...)"); -GLOG_DEFINE_string(logmailer, "/bin/mail", - "Mailer used to send logging email"); - -// Compute the default value for --log_dir -static const char* DefaultLogDir() { - const char* env; - env = getenv("GOOGLE_LOG_DIR"); - if (env != NULL && env[0] != '\0') { - return env; - } - env = getenv("TEST_TMPDIR"); - if (env != NULL && env[0] != '\0') { - return env; - } - return ""; -} - -GLOG_DEFINE_string(log_dir, DefaultLogDir(), - "If specified, logfiles are written into this directory instead " - "of the default logging directory."); -GLOG_DEFINE_string(log_link, "", "Put additional links to the log " - "files in this directory"); - -GLOG_DEFINE_int32(max_log_size, 1800, - "approx. maximum log file size (in MB). A value of 0 will " - "be silently overridden to 1."); - -GLOG_DEFINE_bool(stop_logging_if_full_disk, false, - "Stop attempting to log to disk if the disk is full."); - -GLOG_DEFINE_string(log_backtrace_at, "", - "Emit a backtrace when logging at file:linenum."); - -// TODO(hamaji): consider windows -#define PATH_SEPARATOR '/' - -static void GetHostName(string* hostname) { -#if defined(HAVE_SYS_UTSNAME_H) - struct utsname buf; - if (0 != uname(&buf)) { - // ensure null termination on failure - *buf.nodename = '\0'; - } - *hostname = buf.nodename; -#elif defined(OS_WINDOWS) - char buf[MAX_COMPUTERNAME_LENGTH + 1]; - DWORD len = MAX_COMPUTERNAME_LENGTH + 1; - if (GetComputerNameA(buf, &len)) { - *hostname = buf; - } else { - hostname->clear(); - } -#else -# warning There is no way to retrieve the host name. - *hostname = "(unknown)"; -#endif -} - -_START_GOOGLE_NAMESPACE_ - -// Safely get max_log_size, overriding to 1 if it somehow gets defined as 0 -static int32 MaxLogSize() { - return (FLAGS_max_log_size > 0 ? FLAGS_max_log_size : 1); -} - -// A mutex that allows only one thread to log at a time, to keep things from -// getting jumbled. Some other very uncommon logging operations (like -// changing the destination file for log messages of a given severity) also -// lock this mutex. Please be sure that anybody who might possibly need to -// lock it does so. -static Mutex log_mutex; - -// Number of messages sent at each severity. Under log_mutex. -int64 LogMessage::num_messages_[NUM_SEVERITIES] = {0, 0, 0, 0}; - -// Globally disable log writing (if disk is full) -static bool stop_writing = false; - -const char*const LogSeverityNames[NUM_SEVERITIES] = { - "INFO", "WARNING", "ERROR", "FATAL" -}; - -// Has the user called SetExitOnDFatal(true)? -static bool exit_on_dfatal = true; - -const char* GetLogSeverityName(LogSeverity severity) { - return LogSeverityNames[severity]; -} - -static bool SendEmailInternal(const char*dest, const char *subject, - const char*body, bool use_logging); - -base::Logger::~Logger() { -} - -namespace { - -// Encapsulates all file-system related state -class LogFileObject : public base::Logger { - public: - LogFileObject(LogSeverity severity, const char* base_filename); - ~LogFileObject(); - - virtual void Write(bool force_flush, // Should we force a flush here? - time_t timestamp, // Timestamp for this entry - const char* message, - int message_len); - - // Configuration options - void SetBasename(const char* basename); - void SetExtension(const char* ext); - void SetSymlinkBasename(const char* symlink_basename); - - // Normal flushing routine - virtual void Flush(); - - // It is the actual file length for the system loggers, - // i.e., INFO, ERROR, etc. - virtual uint32 LogSize() { - MutexLock l(&lock_); - return file_length_; - } - - // Internal flush routine. Exposed so that FlushLogFilesUnsafe() - // can avoid grabbing a lock. Usually Flush() calls it after - // acquiring lock_. - void FlushUnlocked(); - - private: - static const uint32 kRolloverAttemptFrequency = 0x20; - - Mutex lock_; - bool base_filename_selected_; - string base_filename_; - string symlink_basename_; - string filename_extension_; // option users can specify (eg to add port#) - FILE* file_; - LogSeverity severity_; - uint32 bytes_since_flush_; - uint32 file_length_; - unsigned int rollover_attempt_; - int64 next_flush_time_; // cycle count at which to flush log - - // Actually create a logfile using the value of base_filename_ and the - // supplied argument time_pid_string - // REQUIRES: lock_ is held - bool CreateLogfile(const char* time_pid_string); -}; - -} // namespace - -class LogDestination { - public: - friend class LogMessage; - friend void ReprintFatalMessage(); - friend base::Logger* base::GetLogger(LogSeverity); - friend void base::SetLogger(LogSeverity, base::Logger*); - - // These methods are just forwarded to by their global versions. - static void SetLogDestination(LogSeverity severity, - const char* base_filename); - static void SetLogSymlink(LogSeverity severity, - const char* symlink_basename); - static void AddLogSink(LogSink *destination); - static void RemoveLogSink(LogSink *destination); - static void SetLogFilenameExtension(const char* filename_extension); - static void SetStderrLogging(LogSeverity min_severity); - static void SetEmailLogging(LogSeverity min_severity, const char* addresses); - static void LogToStderr(); - // Flush all log files that are at least at the given severity level - static void FlushLogFiles(int min_severity); - static void FlushLogFilesUnsafe(int min_severity); - - // we set the maximum size of our packet to be 1400, the logic being - // to prevent fragmentation. - // Really this number is arbitrary. - static const int kNetworkBytes = 1400; - - static const string& hostname(); - private: - - LogDestination(LogSeverity severity, const char* base_filename); - ~LogDestination() { } - - // Take a log message of a particular severity and log it to stderr - // iff it's of a high enough severity to deserve it. - static void MaybeLogToStderr(LogSeverity severity, const char* message, - size_t len); - - // Take a log message of a particular severity and log it to email - // iff it's of a high enough severity to deserve it. - static void MaybeLogToEmail(LogSeverity severity, const char* message, - size_t len); - // Take a log message of a particular severity and log it to a file - // iff the base filename is not "" (which means "don't log to me") - static void MaybeLogToLogfile(LogSeverity severity, - time_t timestamp, - const char* message, size_t len); - // Take a log message of a particular severity and log it to the file - // for that severity and also for all files with severity less than - // this severity. - static void LogToAllLogfiles(LogSeverity severity, - time_t timestamp, - const char* message, size_t len); - - // Send logging info to all registered sinks. - static void LogToSinks(LogSeverity severity, - const char *full_filename, - const char *base_filename, - int line, - const struct ::tm* tm_time, - const char* message, - size_t message_len); - - // Wait for all registered sinks via WaitTillSent - // including the optional one in "data". - static void WaitForSinks(LogMessage::LogMessageData* data); - - static LogDestination* log_destination(LogSeverity severity); - - LogFileObject fileobject_; - base::Logger* logger_; // Either &fileobject_, or wrapper around it - - static LogDestination* log_destinations_[NUM_SEVERITIES]; - static LogSeverity email_logging_severity_; - static string addresses_; - static string hostname_; - - // arbitrary global logging destinations. - static vector* sinks_; - - // Protects the vector sinks_, - // but not the LogSink objects its elements reference. - static Mutex sink_mutex_; - - // Disallow - LogDestination(const LogDestination&); - LogDestination& operator=(const LogDestination&); -}; - -// Errors do not get logged to email by default. -LogSeverity LogDestination::email_logging_severity_ = 99999; - -string LogDestination::addresses_; -string LogDestination::hostname_; - -vector* LogDestination::sinks_ = NULL; -Mutex LogDestination::sink_mutex_; - -/* static */ -const string& LogDestination::hostname() { - if (hostname_.empty()) { - GetHostName(&hostname_); - if (hostname_.empty()) { - hostname_ = "(unknown)"; - } - } - return hostname_; -} - -LogDestination::LogDestination(LogSeverity severity, - const char* base_filename) - : fileobject_(severity, base_filename), - logger_(&fileobject_) { -} - -inline void LogDestination::FlushLogFilesUnsafe(int min_severity) { - // assume we have the log_mutex or we simply don't care - // about it - for (int i = min_severity; i < NUM_SEVERITIES; i++) { - LogDestination* log = log_destination(i); - if (log != NULL) { - // Flush the base fileobject_ logger directly instead of going - // through any wrappers to reduce chance of deadlock. - log->fileobject_.FlushUnlocked(); - } - } -} - -inline void LogDestination::FlushLogFiles(int min_severity) { - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&log_mutex); - for (int i = min_severity; i < NUM_SEVERITIES; i++) { - LogDestination* log = log_destination(i); - if (log != NULL) { - log->logger_->Flush(); - } - } -} - -inline void LogDestination::SetLogDestination(LogSeverity severity, - const char* base_filename) { - assert(severity >= 0 && severity < NUM_SEVERITIES); - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&log_mutex); - log_destination(severity)->fileobject_.SetBasename(base_filename); -} - -inline void LogDestination::SetLogSymlink(LogSeverity severity, - const char* symlink_basename) { - CHECK_GE(severity, 0); - CHECK_LT(severity, NUM_SEVERITIES); - MutexLock l(&log_mutex); - log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename); -} - -inline void LogDestination::AddLogSink(LogSink *destination) { - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&sink_mutex_); - if (!sinks_) sinks_ = new vector; - sinks_->push_back(destination); -} - -inline void LogDestination::RemoveLogSink(LogSink *destination) { - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&sink_mutex_); - // This doesn't keep the sinks in order, but who cares? - if (sinks_) { - for (int i = sinks_->size() - 1; i >= 0; i--) { - if ((*sinks_)[i] == destination) { - (*sinks_)[i] = (*sinks_)[sinks_->size() - 1]; - sinks_->pop_back(); - break; - } - } - } -} - -inline void LogDestination::SetLogFilenameExtension(const char* ext) { - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&log_mutex); - for ( int severity = 0; severity < NUM_SEVERITIES; ++severity ) { - log_destination(severity)->fileobject_.SetExtension(ext); - } -} - -inline void LogDestination::SetStderrLogging(LogSeverity min_severity) { - assert(min_severity >= 0 && min_severity < NUM_SEVERITIES); - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&log_mutex); - FLAGS_stderrthreshold = min_severity; -} - -inline void LogDestination::LogToStderr() { - // *Don't* put this stuff in a mutex lock, since SetStderrLogging & - // SetLogDestination already do the locking! - SetStderrLogging(0); // thus everything is "also" logged to stderr - for ( int i = 0; i < NUM_SEVERITIES; ++i ) { - SetLogDestination(i, ""); // "" turns off logging to a logfile - } -} - -inline void LogDestination::SetEmailLogging(LogSeverity min_severity, - const char* addresses) { - assert(min_severity >= 0 && min_severity < NUM_SEVERITIES); - // Prevent any subtle race conditions by wrapping a mutex lock around - // all this stuff. - MutexLock l(&log_mutex); - LogDestination::email_logging_severity_ = min_severity; - LogDestination::addresses_ = addresses; -} - -static void WriteToStderr(const char* message, size_t len) { - // Avoid using cerr from this module since we may get called during - // exit code, and cerr may be partially or fully destroyed by then. - write(STDERR_FILENO, message, len); -} - -inline void LogDestination::MaybeLogToStderr(LogSeverity severity, - const char* message, size_t len) { - if ((severity >= FLAGS_stderrthreshold) || FLAGS_alsologtostderr) { - WriteToStderr(message, len); -#ifdef OS_WINDOWS - // On Windows, also output to the debugger - ::OutputDebugStringA(string(message,len).c_str()); -#endif - } -} - - -inline void LogDestination::MaybeLogToEmail(LogSeverity severity, - const char* message, size_t len) { - if (severity >= email_logging_severity_ || - severity >= FLAGS_logemaillevel) { - string to(FLAGS_alsologtoemail); - if (!addresses_.empty()) { - if (!to.empty()) { - to += ","; - } - to += addresses_; - } - const string subject(string("[LOG] ") + LogSeverityNames[severity] + ": " + - glog_internal_namespace_::ProgramInvocationShortName()); - string body(hostname()); - body += "\n\n"; - body.append(message, len); - - // should NOT use SendEmail(). The caller of this function holds the - // log_mutex and SendEmail() calls LOG/VLOG which will block trying to - // acquire the log_mutex object. Use SendEmailInternal() and set - // use_logging to false. - SendEmailInternal(to.c_str(), subject.c_str(), body.c_str(), false); - } -} - - -inline void LogDestination::MaybeLogToLogfile(LogSeverity severity, - time_t timestamp, - const char* message, - size_t len) { - const bool should_flush = severity > FLAGS_logbuflevel; - LogDestination* destination = log_destination(severity); - destination->logger_->Write(should_flush, timestamp, message, len); -} - -inline void LogDestination::LogToAllLogfiles(LogSeverity severity, - time_t timestamp, - const char* message, - size_t len) { - - if ( FLAGS_logtostderr ) // global flag: never log to file - WriteToStderr(message, len); - else - for (int i = severity; i >= 0; --i) - LogDestination::MaybeLogToLogfile(i, timestamp, message, len); - -} - -inline void LogDestination::LogToSinks(LogSeverity severity, - const char *full_filename, - const char *base_filename, - int line, - const struct ::tm* tm_time, - const char* message, - size_t message_len) { - ReaderMutexLock l(&sink_mutex_); - if (sinks_) { - for (int i = sinks_->size() - 1; i >= 0; i--) { - (*sinks_)[i]->send(severity, full_filename, base_filename, - line, tm_time, message, message_len); - } - } -} - -inline void LogDestination::WaitForSinks(LogMessage::LogMessageData* data) { - ReaderMutexLock l(&sink_mutex_); - if (sinks_) { - for (int i = sinks_->size() - 1; i >= 0; i--) { - (*sinks_)[i]->WaitTillSent(); - } - } - const bool send_to_sink = - (data->send_method_ == &LogMessage::SendToSink) || - (data->send_method_ == &LogMessage::SendToSinkAndLog); - if (send_to_sink && data->sink_ != NULL) { - data->sink_->WaitTillSent(); - } -} - -LogDestination* LogDestination::log_destinations_[NUM_SEVERITIES]; - -inline LogDestination* LogDestination::log_destination(LogSeverity severity) { - assert(severity >=0 && severity < NUM_SEVERITIES); - if (!log_destinations_[severity]) { - log_destinations_[severity] = new LogDestination(severity, NULL); - } - return log_destinations_[severity]; -} - -namespace { - -LogFileObject::LogFileObject(LogSeverity severity, - const char* base_filename) - : base_filename_selected_(base_filename != NULL), - base_filename_((base_filename != NULL) ? base_filename : ""), - symlink_basename_(glog_internal_namespace_::ProgramInvocationShortName()), - filename_extension_(), - file_(NULL), - severity_(severity), - bytes_since_flush_(0), - file_length_(0), - rollover_attempt_(kRolloverAttemptFrequency-1), - next_flush_time_(0) { - assert(severity >= 0); - assert(severity < NUM_SEVERITIES); -} - -LogFileObject::~LogFileObject() { - MutexLock l(&lock_); - if (file_ != NULL) { - fclose(file_); - file_ = NULL; - } -} - -void LogFileObject::SetBasename(const char* basename) { - MutexLock l(&lock_); - base_filename_selected_ = true; - if (base_filename_ != basename) { - // Get rid of old log file since we are changing names - if (file_ != NULL) { - fclose(file_); - file_ = NULL; - rollover_attempt_ = kRolloverAttemptFrequency-1; - } - base_filename_ = basename; - } -} - -void LogFileObject::SetExtension(const char* ext) { - MutexLock l(&lock_); - if (filename_extension_ != ext) { - // Get rid of old log file since we are changing names - if (file_ != NULL) { - fclose(file_); - file_ = NULL; - rollover_attempt_ = kRolloverAttemptFrequency-1; - } - filename_extension_ = ext; - } -} - -void LogFileObject::SetSymlinkBasename(const char* symlink_basename) { - MutexLock l(&lock_); - symlink_basename_ = symlink_basename; -} - -void LogFileObject::Flush() { - MutexLock l(&lock_); - FlushUnlocked(); -} - -void LogFileObject::FlushUnlocked(){ - if (file_ != NULL) { - fflush(file_); - bytes_since_flush_ = 0; - } - // Figure out when we are due for another flush. - const int64 next = (FLAGS_logbufsecs - * static_cast(1000000)); // in usec - next_flush_time_ = CycleClock_Now() + UsecToCycles(next); -} - -bool LogFileObject::CreateLogfile(const char* time_pid_string) { - string string_filename = base_filename_+filename_extension_+ - time_pid_string; - const char* filename = string_filename.c_str(); - int fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0664); - if (fd == -1) return false; -#ifdef HAVE_FCNTL - // Mark the file close-on-exec. We don't really care if this fails - fcntl(fd, F_SETFD, FD_CLOEXEC); -#endif - - file_ = fdopen(fd, "a"); // Make a FILE*. - if (file_ == NULL) { // Man, we're screwed! - close(fd); - unlink(filename); // Erase the half-baked evidence: an unusable log file - return false; - } - - // We try to create a symlink called ., - // which is easier to use. (Every time we create a new logfile, - // we destroy the old symlink and create a new one, so it always - // points to the latest logfile.) If it fails, we're sad but it's - // no error. - if (!symlink_basename_.empty()) { - // take directory from filename - const char* slash = strrchr(filename, PATH_SEPARATOR); - const string linkname = - symlink_basename_ + '.' + LogSeverityNames[severity_]; - string linkpath; - if ( slash ) linkpath = string(filename, slash-filename+1); // get dirname - linkpath += linkname; - unlink(linkpath.c_str()); // delete old one if it exists - - // We must have unistd.h. -#ifdef HAVE_UNISTD_H - // Make the symlink be relative (in the same dir) so that if the - // entire log directory gets relocated the link is still valid. - const char *linkdest = slash ? (slash + 1) : filename; - symlink(linkdest, linkpath.c_str()); // silently ignore failures - - // Make an additional link to the log file in a place specified by - // FLAGS_log_link, if indicated - if (!FLAGS_log_link.empty()) { - linkpath = FLAGS_log_link + "/" + linkname; - unlink(linkpath.c_str()); // delete old one if it exists - symlink(filename, linkpath.c_str()); // silently ignore failures - } -#endif - } - - return true; // Everything worked -} - -void LogFileObject::Write(bool force_flush, - time_t timestamp, - const char* message, - int message_len) { - MutexLock l(&lock_); - - // We don't log if the base_name_ is "" (which means "don't write") - if (base_filename_selected_ && base_filename_.empty()) { - return; - } - - if (static_cast(file_length_ >> 20) >= MaxLogSize()) { - if (file_ != NULL) fclose(file_); - file_ = NULL; - file_length_ = bytes_since_flush_ = 0; - rollover_attempt_ = kRolloverAttemptFrequency-1; - } - - // If there's no destination file, make one before outputting - if (file_ == NULL) { - // Try to rollover the log file every 32 log messages. The only time - // this could matter would be when we have trouble creating the log - // file. If that happens, we'll lose lots of log messages, of course! - if (++rollover_attempt_ != kRolloverAttemptFrequency) return; - rollover_attempt_ = 0; - - struct ::tm tm_time; - localtime_r(×tamp, &tm_time); - - // The logfile's filename will have the date/time & pid in it - char time_pid_string[256]; // More than enough chars for time, pid, \0 - ostrstream time_pid_stream(time_pid_string, sizeof(time_pid_string)); - time_pid_stream.fill('0'); - time_pid_stream << 1900+tm_time.tm_year - << setw(2) << 1+tm_time.tm_mon - << setw(2) << tm_time.tm_mday - << '-' - << setw(2) << tm_time.tm_hour - << setw(2) << tm_time.tm_min - << setw(2) << tm_time.tm_sec - << '.' - << GetMainThreadPid() - << '\0'; - - if (base_filename_selected_) { - if (!CreateLogfile(time_pid_string)) { - perror("Could not create log file"); - fprintf(stderr, "COULD NOT CREATE LOGFILE '%s'!\n", time_pid_string); - return; - } - } else { - // If no base filename for logs of this severity has been set, use a - // default base filename of - // "...log..". So - // logfiles will have names like - // webserver.examplehost.root.log.INFO.19990817-150000.4354, where - // 19990817 is a date (1999 August 17), 150000 is a time (15:00:00), - // and 4354 is the pid of the logging process. The date & time reflect - // when the file was created for output. - // - // Where does the file get put? Successively try the directories - // "/tmp", and "." - string stripped_filename( - glog_internal_namespace_::ProgramInvocationShortName()); - string hostname; - GetHostName(&hostname); - - string uidname = MyUserName(); - // We should not call CHECK() here because this function can be - // called after holding on to log_mutex. We don't want to - // attempt to hold on to the same mutex, and get into a - // deadlock. Simply use a name like invalid-user. - if (uidname.empty()) uidname = "invalid-user"; - - stripped_filename = stripped_filename+'.'+hostname+'.' - +uidname+".log." - +LogSeverityNames[severity_]+'.'; - // We're going to (potentially) try to put logs in several different dirs - const vector & log_dirs = GetLoggingDirectories(); - - // Go through the list of dirs, and try to create the log file in each - // until we succeed or run out of options - bool success = false; - for (vector::const_iterator dir = log_dirs.begin(); - dir != log_dirs.end(); - ++dir) { - base_filename_ = *dir + "/" + stripped_filename; - if ( CreateLogfile(time_pid_string) ) { - success = true; - break; - } - } - // If we never succeeded, we have to give up - if ( success == false ) { - perror("Could not create logging file"); - fprintf(stderr, "COULD NOT CREATE A LOGGINGFILE %s!", time_pid_string); - return; - } - } - - // Write a header message into the log file - char file_header_string[512]; // Enough chars for time and binary info - ostrstream file_header_stream(file_header_string, - sizeof(file_header_string)); - file_header_stream.fill('0'); - file_header_stream << "Log file created at: " - << 1900+tm_time.tm_year << '/' - << setw(2) << 1+tm_time.tm_mon << '/' - << setw(2) << tm_time.tm_mday - << ' ' - << setw(2) << tm_time.tm_hour << ':' - << setw(2) << tm_time.tm_min << ':' - << setw(2) << tm_time.tm_sec << '\n' - << "Running on machine: " - << LogDestination::hostname() << '\n' - << "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu " - << "threadid file:line] msg" << '\n' - << '\0'; - int header_len = strlen(file_header_string); - fwrite(file_header_string, 1, header_len, file_); - file_length_ += header_len; - bytes_since_flush_ += header_len; - } - - // Write to LOG file - if ( !stop_writing ) { - // fwrite() doesn't return an error when the disk is full, for - // messages that are less than 4096 bytes. When the disk is full, - // it returns the message length for messages that are less than - // 4096 bytes. fwrite() returns 4096 for message lengths that are - // greater than 4096, thereby indicating an error. - errno = 0; - fwrite(message, 1, message_len, file_); - if ( FLAGS_stop_logging_if_full_disk && - errno == ENOSPC ) { // disk full, stop writing to disk - stop_writing = true; // until the disk is - return; - } else { - file_length_ += message_len; - bytes_since_flush_ += message_len; - } - } else { - if ( CycleClock_Now() >= next_flush_time_ ) - stop_writing = false; // check to see if disk has free space. - return; // no need to flush - } - - // See important msgs *now*. Also, flush logs at least every 10^6 chars, - // or every "FLAGS_logbufsecs" seconds. - if ( force_flush || - (bytes_since_flush_ >= 1000000) || - (CycleClock_Now() >= next_flush_time_) ) { - FlushUnlocked(); -#ifdef OS_LINUX - if (FLAGS_drop_log_memory) { - if (file_length_ >= logging::kPageSize) { - // don't evict the most recent page - uint32 len = file_length_ & ~(logging::kPageSize - 1); - posix_fadvise(fileno(file_), 0, len, POSIX_FADV_DONTNEED); - } - } -#endif - } -} - -} // namespace - -// An arbitrary limit on the length of a single log message. This -// is so that streaming can be done more efficiently. -const size_t LogMessage::kMaxLogMessageLen = 30000; - -// Static log data space to avoid alloc failures in a LOG(FATAL) -// -// Since multiple threads may call LOG(FATAL), and we want to preserve -// the data from the first call, we allocate two sets of space. One -// for exclusive use by the first thread, and one for shared use by -// all other threads. -static Mutex fatal_msg_lock; -static CrashReason crash_reason; -static bool fatal_msg_exclusive = true; -static char fatal_msg_buf_exclusive[LogMessage::kMaxLogMessageLen+1]; -static char fatal_msg_buf_shared[LogMessage::kMaxLogMessageLen+1]; -static LogMessage::LogStream fatal_msg_stream_exclusive( - fatal_msg_buf_exclusive, LogMessage::kMaxLogMessageLen, 0); -static LogMessage::LogStream fatal_msg_stream_shared( - fatal_msg_buf_shared, LogMessage::kMaxLogMessageLen, 0); -LogMessage::LogMessageData LogMessage::fatal_msg_data_exclusive_; -LogMessage::LogMessageData LogMessage::fatal_msg_data_shared_; - -LogMessage::LogMessageData::~LogMessageData() { - delete[] buf_; - delete stream_alloc_; -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - int ctr, void (LogMessage::*send_method)()) { - Init(file, line, severity, send_method); - data_->stream_->set_ctr(ctr); -} - -LogMessage::LogMessage(const char* file, int line, - const CheckOpString& result) { - Init(file, line, FATAL, &LogMessage::SendToLog); - stream() << "Check failed: " << (*result.str_) << " "; -} - -LogMessage::LogMessage(const char* file, int line) { - Init(file, line, INFO, &LogMessage::SendToLog); -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity) { - Init(file, line, severity, &LogMessage::SendToLog); -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - LogSink* sink, bool also_send_to_log) { - Init(file, line, severity, also_send_to_log ? &LogMessage::SendToSinkAndLog : - &LogMessage::SendToSink); - data_->sink_ = sink; // override Init()'s setting to NULL -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - vector *outvec) { - Init(file, line, severity, &LogMessage::SaveOrSendToLog); - data_->outvec_ = outvec; // override Init()'s setting to NULL -} - -LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - string *message) { - Init(file, line, severity, &LogMessage::WriteToStringAndLog); - data_->message_ = message; // override Init()'s setting to NULL -} - -void LogMessage::Init(const char* file, - int line, - LogSeverity severity, - void (LogMessage::*send_method)()) { - allocated_ = NULL; - if (severity != FATAL || !exit_on_dfatal) { - allocated_ = new LogMessageData(); - data_ = allocated_; - data_->buf_ = new char[kMaxLogMessageLen+1]; - data_->message_text_ = data_->buf_; - data_->stream_alloc_ = - new LogStream(data_->message_text_, kMaxLogMessageLen, 0); - data_->stream_ = data_->stream_alloc_; - data_->first_fatal_ = false; - } else { - MutexLock l(&fatal_msg_lock); - if (fatal_msg_exclusive) { - fatal_msg_exclusive = false; - data_ = &fatal_msg_data_exclusive_; - data_->message_text_ = fatal_msg_buf_exclusive; - data_->stream_ = &fatal_msg_stream_exclusive; - data_->first_fatal_ = true; - } else { - data_ = &fatal_msg_data_shared_; - data_->message_text_ = fatal_msg_buf_shared; - data_->stream_ = &fatal_msg_stream_shared; - data_->first_fatal_ = false; - } - data_->stream_alloc_ = NULL; - } - - stream().fill('0'); - data_->preserved_errno_ = errno; - data_->severity_ = severity; - data_->line_ = line; - data_->send_method_ = send_method; - data_->sink_ = NULL; - data_->outvec_ = NULL; - WallTime now = WallTime_Now(); - data_->timestamp_ = static_cast(now); - localtime_r(&data_->timestamp_, &data_->tm_time_); - int usecs = static_cast((now - data_->timestamp_) * 1000000); - RawLog__SetLastTime(data_->tm_time_, usecs); - - data_->num_chars_to_log_ = 0; - data_->num_chars_to_syslog_ = 0; - data_->basename_ = const_basename(file); - data_->fullname_ = file; - data_->has_been_flushed_ = false; - - // If specified, prepend a prefix to each line. For example: - // I1018 160715 f5d4fbb0 logging.cc:1153] - // (log level, GMT month, date, time, thread_id, file basename, line) - // We exclude the thread_id for the default thread. - if (FLAGS_log_prefix && (line != kNoLogPrefix)) { - stream() << LogSeverityNames[severity][0] - << setw(2) << 1+data_->tm_time_.tm_mon - << setw(2) << data_->tm_time_.tm_mday - << ' ' - << setw(2) << data_->tm_time_.tm_hour << ':' - << setw(2) << data_->tm_time_.tm_min << ':' - << setw(2) << data_->tm_time_.tm_sec << "." - << setw(6) << usecs - << ' ' - << setfill(' ') << setw(5) - << static_cast(GetTID()) << setfill('0') - << ' ' - << data_->basename_ << ':' << data_->line_ << "] "; - } - data_->num_prefix_chars_ = data_->stream_->pcount(); - - if (!FLAGS_log_backtrace_at.empty()) { - char fileline[128]; - snprintf(fileline, sizeof(fileline), "%s:%d", data_->basename_, line); -#ifdef HAVE_STACKTRACE - if (!strcmp(FLAGS_log_backtrace_at.c_str(), fileline)) { - string stacktrace; - DumpStackTraceToString(&stacktrace); - stream() << " (stacktrace:\n" << stacktrace << ") "; - } -#endif - } -} - -LogMessage::~LogMessage() { - Flush(); - delete allocated_; -} - -// Flush buffered message, called by the destructor, or any other function -// that needs to synchronize the log. -void LogMessage::Flush() { - if (data_->has_been_flushed_ || data_->severity_ < FLAGS_minloglevel) - return; - - data_->num_chars_to_log_ = data_->stream_->pcount(); - data_->num_chars_to_syslog_ = - data_->num_chars_to_log_ - data_->num_prefix_chars_; - - // Do we need to add a \n to the end of this message? - bool append_newline = - (data_->message_text_[data_->num_chars_to_log_-1] != '\n'); - char original_final_char = '\0'; - - // If we do need to add a \n, we'll do it by violating the memory of the - // ostrstream buffer. This is quick, and we'll make sure to undo our - // modification before anything else is done with the ostrstream. It - // would be preferable not to do things this way, but it seems to be - // the best way to deal with this. - if (append_newline) { - original_final_char = data_->message_text_[data_->num_chars_to_log_]; - data_->message_text_[data_->num_chars_to_log_++] = '\n'; - } - - // Prevent any subtle race conditions by wrapping a mutex lock around - // the actual logging action per se. - { - MutexLock l(&log_mutex); - (this->*(data_->send_method_))(); - ++num_messages_[static_cast(data_->severity_)]; - } - LogDestination::WaitForSinks(data_); - - if (append_newline) { - // Fix the ostrstream back how it was before we screwed with it. - // It's 99.44% certain that we don't need to worry about doing this. - data_->message_text_[data_->num_chars_to_log_-1] = original_final_char; - } - - // If errno was already set before we enter the logging call, we'll - // set it back to that value when we return from the logging call. - // It happens often that we log an error message after a syscall - // failure, which can potentially set the errno to some other - // values. We would like to preserve the original errno. - if (data_->preserved_errno_ != 0) { - errno = data_->preserved_errno_; - } - - // Note that this message is now safely logged. If we're asked to flush - // again, as a result of destruction, say, we'll do nothing on future calls. - data_->has_been_flushed_ = true; -} - -// Copy of first FATAL log message so that we can print it out again -// after all the stack traces. To preserve legacy behavior, we don't -// use fatal_msg_buf_exclusive. -static time_t fatal_time; -static char fatal_message[256]; - -void ReprintFatalMessage() { - if (fatal_message[0]) { - const int n = strlen(fatal_message); - if (!FLAGS_logtostderr) { - // Also write to stderr - WriteToStderr(fatal_message, n); - } - LogDestination::LogToAllLogfiles(ERROR, fatal_time, fatal_message, n); - } -} - -// L >= log_mutex (callers must hold the log_mutex). -void LogMessage::SendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { - static bool already_warned_before_initgoogle = false; - - log_mutex.AssertHeld(); - - RAW_DCHECK(data_->num_chars_to_log_ > 0 && - data_->message_text_[data_->num_chars_to_log_-1] == '\n', ""); - - // Messages of a given severity get logged to lower severity logs, too - - if (!already_warned_before_initgoogle && !IsGoogleLoggingInitialized()) { - const char w[] = "WARNING: Logging before InitGoogleLogging() is " - "written to STDERR\n"; - WriteToStderr(w, strlen(w)); - already_warned_before_initgoogle = true; - } - - // global flag: never log to file if set. Also -- don't log to a - // file if we haven't parsed the command line flags to get the - // program name. - if (FLAGS_logtostderr || !IsGoogleLoggingInitialized()) { - WriteToStderr(data_->message_text_, data_->num_chars_to_log_); - - // this could be protected by a flag if necessary. - LogDestination::LogToSinks(data_->severity_, - data_->fullname_, data_->basename_, - data_->line_, &data_->tm_time_, - data_->message_text_ + data_->num_prefix_chars_, - (data_->num_chars_to_log_ - - data_->num_prefix_chars_ - 1)); - } else { - - // log this message to all log files of severity <= severity_ - LogDestination::LogToAllLogfiles(data_->severity_, data_->timestamp_, - data_->message_text_, - data_->num_chars_to_log_); - - LogDestination::MaybeLogToStderr(data_->severity_, data_->message_text_, - data_->num_chars_to_log_); - LogDestination::MaybeLogToEmail(data_->severity_, data_->message_text_, - data_->num_chars_to_log_); - LogDestination::LogToSinks(data_->severity_, - data_->fullname_, data_->basename_, - data_->line_, &data_->tm_time_, - data_->message_text_ + data_->num_prefix_chars_, - (data_->num_chars_to_log_ - - data_->num_prefix_chars_ - 1)); - // NOTE: -1 removes trailing \n - } - - // If we log a FATAL message, flush all the log destinations, then toss - // a signal for others to catch. We leave the logs in a state that - // someone else can use them (as long as they flush afterwards) - if (data_->severity_ == FATAL && exit_on_dfatal) { - if (data_->first_fatal_) { - // Store crash information so that it is accessible from within signal - // handlers that may be invoked later. - RecordCrashReason(&crash_reason); - SetCrashReason(&crash_reason); - - // Store shortened fatal message for other logs and GWQ status - const int copy = min(data_->num_chars_to_log_, - sizeof(fatal_message)-1); - memcpy(fatal_message, data_->message_text_, copy); - fatal_message[copy] = '\0'; - fatal_time = data_->timestamp_; - } - - if (!FLAGS_logtostderr) { - for (int i = 0; i < NUM_SEVERITIES; ++i) { - if ( LogDestination::log_destinations_[i] ) - LogDestination::log_destinations_[i]->logger_->Write(true, 0, "", 0); - } - } - - // release the lock that our caller (directly or indirectly) - // LogMessage::~LogMessage() grabbed so that signal handlers - // can use the logging facility. Alternately, we could add - // an entire unsafe logging interface to bypass locking - // for signal handlers but this seems simpler. - log_mutex.Unlock(); - LogDestination::WaitForSinks(data_); - - const char* message = "*** Check failure stack trace: ***\n"; - write(STDERR_FILENO, message, strlen(message)); - Fail(); - } -} - -void LogMessage::RecordCrashReason( - glog_internal_namespace_::CrashReason* reason) { - reason->filename = fatal_msg_data_exclusive_.fullname_; - reason->line_number = fatal_msg_data_exclusive_.line_; - reason->message = fatal_msg_buf_exclusive + - fatal_msg_data_exclusive_.num_prefix_chars_; -#ifdef HAVE_STACKTRACE - // Retrieve the stack trace, omitting the logging frames that got us here. - reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4); -#else - reason->depth = 0; -#endif -} - -static void logging_fail() { -#if defined(_DEBUG) && defined(_MSC_VER) - // When debugging on windows, avoid the obnoxious dialog and make - // it possible to continue past a LOG(FATAL) in the debugger - _asm int 3 -#else - abort(); -#endif -} - -#ifdef HAVE___ATTRIBUTE__ -GOOGLE_GLOG_DLL_DECL -void (*g_logging_fail_func)() __attribute__((noreturn)) = &logging_fail; -#else -GOOGLE_GLOG_DLL_DECL void (*g_logging_fail_func)() = &logging_fail; -#endif - -void InstallFailureFunction(void (*fail_func)()) { - g_logging_fail_func = fail_func; -} - -void LogMessage::Fail() { - g_logging_fail_func(); -} - -// L >= log_mutex (callers must hold the log_mutex). -void LogMessage::SendToSink() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { - if (data_->sink_ != NULL) { - RAW_DCHECK(data_->num_chars_to_log_ > 0 && - data_->message_text_[data_->num_chars_to_log_-1] == '\n', ""); - data_->sink_->send(data_->severity_, data_->fullname_, data_->basename_, - data_->line_, &data_->tm_time_, - data_->message_text_ + data_->num_prefix_chars_, - (data_->num_chars_to_log_ - - data_->num_prefix_chars_ - 1)); - } -} - -// L >= log_mutex (callers must hold the log_mutex). -void LogMessage::SendToSinkAndLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { - SendToSink(); - SendToLog(); -} - -// L >= log_mutex (callers must hold the log_mutex). -void LogMessage::SaveOrSendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { - if (data_->outvec_ != NULL) { - RAW_DCHECK(data_->num_chars_to_log_ > 0 && - data_->message_text_[data_->num_chars_to_log_-1] == '\n', ""); - // Omit prefix of message and trailing newline when recording in outvec_. - const char *start = data_->message_text_ + data_->num_prefix_chars_; - int len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; - data_->outvec_->push_back(string(start, len)); - } else { - SendToLog(); - } -} - -void LogMessage::WriteToStringAndLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { - if (data_->message_ != NULL) { - RAW_DCHECK(data_->num_chars_to_log_ > 0 && - data_->message_text_[data_->num_chars_to_log_-1] == '\n', ""); - // Omit prefix of message and trailing newline when writing to message_. - const char *start = data_->message_text_ + data_->num_prefix_chars_; - int len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; - data_->message_->assign(start, len); - } - SendToLog(); -} - -// L >= log_mutex (callers must hold the log_mutex). -void LogMessage::SendToSyslogAndLog() { -#ifdef HAVE_SYSLOG_H - // Before any calls to syslog(), make a single call to openlog() - static bool openlog_already_called = false; - if (!openlog_already_called) { - openlog(glog_internal_namespace_::ProgramInvocationShortName(), - LOG_CONS | LOG_NDELAY | LOG_PID, - LOG_USER); - openlog_already_called = true; - } - - // This array maps Google severity levels to syslog levels - const int SEVERITY_TO_LEVEL[] = { LOG_INFO, LOG_WARNING, LOG_ERR, LOG_EMERG }; - syslog(LOG_USER | SEVERITY_TO_LEVEL[static_cast(data_->severity_)], "%.*s", - int(data_->num_chars_to_syslog_), - data_->message_text_ + data_->num_prefix_chars_); - SendToLog(); -#else - LOG(ERROR) << "No syslog support: message=" << data_->message_text_; -#endif -} - -base::Logger* base::GetLogger(LogSeverity severity) { - MutexLock l(&log_mutex); - return LogDestination::log_destination(severity)->logger_; -} - -void base::SetLogger(LogSeverity severity, base::Logger* logger) { - MutexLock l(&log_mutex); - LogDestination::log_destination(severity)->logger_ = logger; -} - -// L < log_mutex. Acquires and releases mutex_. -int64 LogMessage::num_messages(int severity) { - MutexLock l(&log_mutex); - return num_messages_[severity]; -} - -// Output the COUNTER value. This is only valid if ostream is a -// LogStream. -ostream& operator<<(ostream &os, const PRIVATE_Counter&) { - LogMessage::LogStream *log = dynamic_cast(&os); - CHECK(log == log->self()); - os << log->ctr(); - return os; -} - -ErrnoLogMessage::ErrnoLogMessage(const char* file, int line, - LogSeverity severity, int ctr, - void (LogMessage::*send_method)()) - : LogMessage(file, line, severity, ctr, send_method) { -} - -ErrnoLogMessage::~ErrnoLogMessage() { - // Don't access errno directly because it may have been altered - // while streaming the message. - char buf[100]; - posix_strerror_r(preserved_errno(), buf, sizeof(buf)); - stream() << ": " << buf << " [" << preserved_errno() << "]"; -} - -void FlushLogFiles(LogSeverity min_severity) { - LogDestination::FlushLogFiles(min_severity); -} - -void FlushLogFilesUnsafe(LogSeverity min_severity) { - LogDestination::FlushLogFilesUnsafe(min_severity); -} - -void SetLogDestination(LogSeverity severity, const char* base_filename) { - LogDestination::SetLogDestination(severity, base_filename); -} - -void SetLogSymlink(LogSeverity severity, const char* symlink_basename) { - LogDestination::SetLogSymlink(severity, symlink_basename); -} - -LogSink::~LogSink() { -} - -void LogSink::WaitTillSent() { - // noop default -} - -string LogSink::ToString(LogSeverity severity, const char* file, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len) { - ostringstream stream(string(message, message_len)); - stream.fill('0'); - - // FIXME(jrvb): Updating this to use the correct value for usecs - // requires changing the signature for both this method and - // LogSink::send(). This change needs to be done in a separate CL - // so subclasses of LogSink can be updated at the same time. - int usecs = 0; - - stream << LogSeverityNames[severity][0] - << setw(2) << 1+tm_time->tm_mon - << setw(2) << tm_time->tm_mday - << ' ' - << setw(2) << tm_time->tm_hour << ':' - << setw(2) << tm_time->tm_min << ':' - << setw(2) << tm_time->tm_sec << '.' - << setw(6) << usecs - << ' ' - << setfill(' ') << setw(5) << GetTID() << setfill('0') - << ' ' - << file << ':' << line << "] "; - - stream << string(message, message_len); - return stream.str(); -} - -void AddLogSink(LogSink *destination) { - LogDestination::AddLogSink(destination); -} - -void RemoveLogSink(LogSink *destination) { - LogDestination::RemoveLogSink(destination); -} - -void SetLogFilenameExtension(const char* ext) { - LogDestination::SetLogFilenameExtension(ext); -} - -void SetStderrLogging(LogSeverity min_severity) { - LogDestination::SetStderrLogging(min_severity); -} - -void SetEmailLogging(LogSeverity min_severity, const char* addresses) { - LogDestination::SetEmailLogging(min_severity, addresses); -} - -void LogToStderr() { - LogDestination::LogToStderr(); -} - -namespace base { -namespace internal { - -bool GetExitOnDFatal() { - MutexLock l(&log_mutex); - return exit_on_dfatal; -} - -// Determines whether we exit the program for a LOG(DFATAL) message in -// debug mode. It does this by skipping the call to Fail/FailQuietly. -// This is intended for testing only. -// -// This can have some effects on LOG(FATAL) as well. Failure messages -// are always allocated (rather than sharing a buffer), the crash -// reason is not recorded, the "gwq" status message is not updated, -// and the stack trace is not recorded. The LOG(FATAL) *will* still -// exit the program. Since this function is used only in testing, -// these differences are acceptable. -void SetExitOnDFatal(bool value) { - MutexLock l(&log_mutex); - exit_on_dfatal = value; -} - -} // namespace internal -} // namespace base - -// use_logging controls whether the logging functions LOG/VLOG are used -// to log errors. It should be set to false when the caller holds the -// log_mutex. -static bool SendEmailInternal(const char*dest, const char *subject, - const char*body, bool use_logging) { - if (dest && *dest) { - if ( use_logging ) { - VLOG(1) << "Trying to send TITLE:" << subject - << " BODY:" << body << " to " << dest; - } else { - fprintf(stderr, "Trying to send TITLE: %s BODY: %s to %s\n", - subject, body, dest); - } - - string cmd = - FLAGS_logmailer + " -s\"" + subject + "\" " + dest; - FILE* pipe = popen(cmd.c_str(), "w"); - if (pipe != NULL) { - // Add the body if we have one - if (body) - fwrite(body, sizeof(char), strlen(body), pipe); - bool ok = pclose(pipe) != -1; - if ( !ok ) { - if ( use_logging ) { - char buf[100]; - posix_strerror_r(errno, buf, sizeof(buf)); - LOG(ERROR) << "Problems sending mail to " << dest << ": " << buf; - } else { - char buf[100]; - posix_strerror_r(errno, buf, sizeof(buf)); - fprintf(stderr, "Problems sending mail to %s: %s\n", dest, buf); - } - } - return ok; - } else { - if ( use_logging ) { - LOG(ERROR) << "Unable to send mail to " << dest; - } else { - fprintf(stderr, "Unable to send mail to %s\n", dest); - } - } - } - return false; -} - -bool SendEmail(const char*dest, const char *subject, const char*body){ - return SendEmailInternal(dest, subject, body, true); -} - -static void GetTempDirectories(vector* list) { - list->clear(); -#ifdef OS_WINDOWS - // On windows we'll try to find a directory in this order: - // C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is) - // C:/TMP/ - // C:/TEMP/ - // C:/WINDOWS/ or C:/WINNT/ - // . - char tmp[MAX_PATH]; - if (GetTempPathA(MAX_PATH, tmp)) - list->push_back(tmp); - list->push_back("C:\\tmp\\"); - list->push_back("C:\\temp\\"); -#else - // Directories, in order of preference. If we find a dir that - // exists, we stop adding other less-preferred dirs - const char * candidates[] = { - // Non-null only during unittest/regtest - getenv("TEST_TMPDIR"), - - // Explicitly-supplied temp dirs - getenv("TMPDIR"), getenv("TMP"), - - // If all else fails - "/tmp", - }; - - for (int i = 0; i < ARRAYSIZE(candidates); i++) { - const char *d = candidates[i]; - if (!d) continue; // Empty env var - - // Make sure we don't surprise anyone who's expecting a '/' - string dstr = d; - if (dstr[dstr.size() - 1] != '/') { - dstr += "/"; - } - list->push_back(dstr); - - struct stat statbuf; - if (!stat(d, &statbuf) && S_ISDIR(statbuf.st_mode)) { - // We found a dir that exists - we're done. - return; - } - } - -#endif -} - -static vector* logging_directories_list; - -const vector& GetLoggingDirectories() { - // Not strictly thread-safe but we're called early in InitGoogle(). - if (logging_directories_list == NULL) { - logging_directories_list = new vector; - - if ( !FLAGS_log_dir.empty() ) { - // A dir was specified, we should use it - logging_directories_list->push_back(FLAGS_log_dir.c_str()); - } else { - GetTempDirectories(logging_directories_list); -#ifdef OS_WINDOWS - char tmp[MAX_PATH]; - if (GetWindowsDirectoryA(tmp, MAX_PATH)) - logging_directories_list->push_back(tmp); - logging_directories_list->push_back(".\\"); -#else - logging_directories_list->push_back("./"); -#endif - } - } - return *logging_directories_list; -} - -void TestOnly_ClearLoggingDirectoriesList() { - fprintf(stderr, "TestOnly_ClearLoggingDirectoriesList should only be " - "called from test code.\n"); - delete logging_directories_list; - logging_directories_list = NULL; -} - -void GetExistingTempDirectories(vector* list) { - GetTempDirectories(list); - vector::iterator i_dir = list->begin(); - while( i_dir != list->end() ) { - // zero arg to access means test for existence; no constant - // defined on windows - if ( access(i_dir->c_str(), 0) ) { - i_dir = list->erase(i_dir); - } else { - ++i_dir; - } - } -} - -void TruncateLogFile(const char *path, int64 limit, int64 keep) { -#ifdef HAVE_UNISTD_H - struct stat statbuf; - const int kCopyBlockSize = 8 << 10; - char copybuf[kCopyBlockSize]; - int64 read_offset, write_offset; - // Don't follow symlinks unless they're our own fd symlinks in /proc - int flags = O_RDWR; - const char *procfd_prefix = "/proc/self/fd/"; - if (strncmp(procfd_prefix, path, strlen(procfd_prefix))) flags |= O_NOFOLLOW; - - int fd = open(path, flags); - if (fd == -1) { - if (errno == EFBIG) { - // The log file in question has got too big for us to open. The - // real fix for this would be to compile logging.cc (or probably - // all of base/...) with -D_FILE_OFFSET_BITS=64 but that's - // rather scary. - // Instead just truncate the file to something we can manage - if (truncate(path, 0) == -1) { - PLOG(ERROR) << "Unable to truncate " << path; - } else { - LOG(ERROR) << "Truncated " << path << " due to EFBIG error"; - } - } else { - PLOG(ERROR) << "Unable to open " << path; - } - return; - } - - if (fstat(fd, &statbuf) == -1) { - PLOG(ERROR) << "Unable to fstat()"; - goto out_close_fd; - } - - // See if the path refers to a regular file bigger than the - // specified limit - if (!S_ISREG(statbuf.st_mode)) goto out_close_fd; - if (statbuf.st_size <= limit) goto out_close_fd; - if (statbuf.st_size <= keep) goto out_close_fd; - - // This log file is too large - we need to truncate it - LOG(INFO) << "Truncating " << path << " to " << keep << " bytes"; - - // Copy the last "keep" bytes of the file to the beginning of the file - read_offset = statbuf.st_size - keep; - write_offset = 0; - int bytesin, bytesout; - while ((bytesin = pread(fd, copybuf, sizeof(copybuf), read_offset)) > 0) { - bytesout = pwrite(fd, copybuf, bytesin, write_offset); - if (bytesout == -1) { - PLOG(ERROR) << "Unable to write to " << path; - break; - } else if (bytesout != bytesin) { - LOG(ERROR) << "Expected to write " << bytesin << ", wrote " << bytesout; - } - read_offset += bytesin; - write_offset += bytesout; - } - if (bytesin == -1) PLOG(ERROR) << "Unable to read from " << path; - - // Truncate the remainder of the file. If someone else writes to the - // end of the file after our last read() above, we lose their latest - // data. Too bad ... - if (ftruncate(fd, write_offset) == -1) { - PLOG(ERROR) << "Unable to truncate " << path; - } - - out_close_fd: - close(fd); -#else - LOG(ERROR) << "No log truncation support."; -#endif -} - -void TruncateStdoutStderr() { -#ifdef HAVE_UNISTD_H - int64 limit = MaxLogSize() << 20; - int64 keep = 1 << 20; - TruncateLogFile("/proc/self/fd/1", limit, keep); - TruncateLogFile("/proc/self/fd/2", limit, keep); -#else - LOG(ERROR) << "No log truncation support."; -#endif -} - - -// Helper functions for string comparisons. -#define DEFINE_CHECK_STROP_IMPL(name, func, expected) \ - string* Check##func##expected##Impl(const char* s1, const char* s2, \ - const char* names) { \ - bool equal = s1 == s2 || (s1 && s2 && !func(s1, s2)); \ - if (equal == expected) return NULL; \ - else { \ - strstream ss; \ - if (!s1) s1 = ""; \ - if (!s2) s2 = ""; \ - ss << #name " failed: " << names << " (" << s1 << " vs. " << s2 << ")"; \ - return new string(ss.str(), ss.pcount()); \ - } \ - } -DEFINE_CHECK_STROP_IMPL(CHECK_STREQ, strcmp, true) -DEFINE_CHECK_STROP_IMPL(CHECK_STRNE, strcmp, false) -DEFINE_CHECK_STROP_IMPL(CHECK_STRCASEEQ, strcasecmp, true) -DEFINE_CHECK_STROP_IMPL(CHECK_STRCASENE, strcasecmp, false) -#undef DEFINE_CHECK_STROP_IMPL - -int posix_strerror_r(int err, char *buf, size_t len) { - // Sanity check input parameters - if (buf == NULL || len <= 0) { - errno = EINVAL; - return -1; - } - - // Reset buf and errno, and try calling whatever version of strerror_r() - // is implemented by glibc - buf[0] = '\000'; - int old_errno = errno; - errno = 0; - char *rc = reinterpret_cast(strerror_r(err, buf, len)); - - // Both versions set errno on failure - if (errno) { - // Should already be there, but better safe than sorry - buf[0] = '\000'; - return -1; - } - errno = old_errno; - - // POSIX is vague about whether the string will be terminated, although - // is indirectly implies that typically ERANGE will be returned, instead - // of truncating the string. This is different from the GNU implementation. - // We play it safe by always terminating the string explicitly. - buf[len-1] = '\000'; - - // If the function succeeded, we can use its exit code to determine the - // semantics implemented by glibc - if (!rc) { - return 0; - } else { - // GNU semantics detected - if (rc == buf) { - return 0; - } else { - buf[0] = '\000'; -#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) - if (reinterpret_cast(rc) < sys_nerr) { - // This means an error on MacOSX or FreeBSD. - return -1; - } -#endif - strncat(buf, rc, len-1); - return 0; - } - } -} - -LogMessageFatal::LogMessageFatal(const char* file, int line) : - LogMessage(file, line, FATAL) {} - -LogMessageFatal::LogMessageFatal(const char* file, int line, - const CheckOpString& result) : - LogMessage(file, line, result) {} - -LogMessageFatal::~LogMessageFatal() { - Flush(); - LogMessage::Fail(); -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striplog_test.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striplog_test.sh deleted file mode 100755 index b9033b24..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striplog_test.sh +++ /dev/null @@ -1,72 +0,0 @@ -#! /bin/sh -# -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: Sergey Ioffe - -get_strings () { - if test -e ".libs/$1"; then - binary=".libs/$1" - elif test -e "$1.exe"; then - binary="$1.exe" - else - echo "We coundn't find $1 binary." - exit 1 - fi - - strings -n 10 $binary | sort | awk '/TESTMESSAGE/ {printf "%s ", $2}' -} - -# Die if "$1" != "$2", print $3 as death reason -check_eq () { - if [ "$1" != "$2" ]; then - echo "Check failed: '$1' == '$2' ${3:+ ($3)}" - exit 1 - fi -} - -die () { - echo $1 - exit 1 -} - -# Check that the string literals are appropriately stripped. This will -# not be the case in debug mode. - -check_eq "`get_strings logging_striptest0`" "COND ERROR FATAL INFO WARNING " -check_eq "`get_strings logging_striptest2`" "COND ERROR FATAL " -check_eq "`get_strings logging_striptest10`" "" - -# Check that LOG(FATAL) aborts even for large STRIP_LOG - -./logging_striptest2 2>/dev/null && die "Did not abort for STRIP_LOG=2" -./logging_striptest10 2>/dev/null && die "Did not abort for STRIP_LOG=10" - -echo "PASS" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest10.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest10.cc deleted file mode 100644 index f6e1078f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest10.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Sergey Ioffe - -#define GOOGLE_STRIP_LOG 10 - -// Include the actual test. -#include "logging_striptest_main.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest2.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest2.cc deleted file mode 100644 index a64685c9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest2.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Sergey Ioffe - -#define GOOGLE_STRIP_LOG 2 - -// Include the actual test. -#include "logging_striptest_main.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest_main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest_main.cc deleted file mode 100644 index 17a582f5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_striptest_main.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Sergey Ioffe - -// The common part of the striplog tests. - -#include -#include -#include -#include "glog/logging.h" -#include "base/commandlineflags.h" -#include "config.h" - -DECLARE_bool(logtostderr); - -using std::string; -using namespace GOOGLE_NAMESPACE; - -int CheckNoReturn(bool b) { - string s; - if (b) { - LOG(FATAL) << "Fatal"; - } else { - return 0; - } -} - -struct A { }; -std::ostream &operator<<(std::ostream &str, const A&) {return str;} - -int main(int argc, char* argv[]) { - FLAGS_logtostderr = true; - InitGoogleLogging(argv[0]); - LOG(INFO) << "TESTMESSAGE INFO"; - LOG(WARNING) << 2 << "something" << "TESTMESSAGE WARNING" - << 1 << 'c' << A() << std::endl; - LOG(ERROR) << "TESTMESSAGE ERROR"; - bool flag = true; - (flag ? LOG(INFO) : LOG(ERROR)) << "TESTMESSAGE COND"; - LOG(FATAL) << "TESTMESSAGE FATAL"; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.cc deleted file mode 100644 index 5fc34d4a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.cc +++ /dev/null @@ -1,1210 +0,0 @@ -// Copyright (c) 2002, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney - -#include "config_for_unittests.h" -#include "utilities.h" - -#include -#ifdef HAVE_GLOB_H -# include -#endif -#include -#ifdef HAVE_UNISTD_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "base/commandlineflags.h" -#include "glog/logging.h" -#include "glog/raw_logging.h" -#include "googletest.h" - -DECLARE_string(log_backtrace_at); // logging.cc - -#ifdef HAVE_LIB_GFLAGS -#include -#endif - -#ifdef HAVE_LIB_GMOCK -#include -#include "mock-log.h" -// Introduce several symbols from gmock. -using testing::_; -using testing::AnyNumber; -using testing::HasSubstr; -using testing::AllOf; -using testing::StrNe; -using testing::StrictMock; -using testing::InitGoogleMock; -using GOOGLE_NAMESPACE::glog_testing::ScopedMockLog; -#endif - -using namespace std; -using namespace GOOGLE_NAMESPACE; - -// Some non-advertised functions that we want to test or use. -_START_GOOGLE_NAMESPACE_ -namespace base { -namespace internal { -bool GetExitOnDFatal(); -void SetExitOnDFatal(bool value); -} // namespace internal -} // namespace base -_END_GOOGLE_NAMESPACE_ - -static void TestLogging(bool check_counts); -static void TestRawLogging(); -static void LogWithLevels(int v, int severity, bool err, bool alsoerr); -static void TestLoggingLevels(); -static void TestLogString(); -static void TestLogSink(); -static void TestLogToString(); -static void TestLogSinkWaitTillSent(); -static void TestCHECK(); -static void TestDCHECK(); -static void TestSTREQ(); -static void TestBasename(); -static void TestSymlink(); -static void TestExtension(); -static void TestWrapper(); -static void TestErrno(); -static void TestTruncate(); - -static int x = -1; -static void BM_Check1(int n) { - while (n-- > 0) { - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - CHECK_GE(n, x); - } -} -BENCHMARK(BM_Check1); - -static void CheckFailure(int a, int b, const char* file, int line, const char* msg); -static void BM_Check3(int n) { - while (n-- > 0) { - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - if (n < x) CheckFailure(n, x, __FILE__, __LINE__, "n < x"); - } -} -BENCHMARK(BM_Check3); - -static void BM_Check2(int n) { - if (n == 17) { - x = 5; - } - while (n-- > 0) { - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - CHECK(n >= x); - } -} -BENCHMARK(BM_Check2); - -static void CheckFailure(int a, int b, const char* file, int line, const char* msg) { -} - -static void BM_logspeed(int n) { - while (n-- > 0) { - LOG(INFO) << "test message"; - } -} -BENCHMARK(BM_logspeed); - -static void BM_vlog(int n) { - while (n-- > 0) { - VLOG(1) << "test message"; - } -} -BENCHMARK(BM_vlog); - -int main(int argc, char **argv) { -#ifdef HAVE_LIB_GFLAGS - ParseCommandLineFlags(&argc, &argv, true); -#endif - - // Test some basics before InitGoogleLogging: - CaptureTestStderr(); - LogWithLevels(FLAGS_v, FLAGS_stderrthreshold, - FLAGS_logtostderr, FLAGS_alsologtostderr); - LogWithLevels(0, 0, 0, 0); // simulate "before global c-tors" - const string early_stderr = GetCapturedTestStderr(); - - InitGoogleLogging(argv[0]); - - RunSpecifiedBenchmarks(); - - FLAGS_logtostderr = true; - - InitGoogleTest(&argc, argv); -#ifdef HAVE_LIB_GMOCK - InitGoogleMock(&argc, argv); -#endif - - // so that death tests run before we use threads - CHECK_EQ(RUN_ALL_TESTS(), 0); - - CaptureTestStderr(); - - // re-emit early_stderr - LogMessage("dummy", LogMessage::kNoLogPrefix, INFO).stream() << early_stderr; - - TestLogging(true); - TestRawLogging(); - TestLoggingLevels(); - TestLogString(); - TestLogSink(); - TestLogToString(); - TestLogSinkWaitTillSent(); - TestCHECK(); - TestDCHECK(); - TestSTREQ(); - - // TODO: The golden test portion of this test is very flakey. - EXPECT_TRUE( - MungeAndDiffTestStderr(FLAGS_test_srcdir + "/src/logging_unittest.err")); - - FLAGS_logtostderr = false; - - TestBasename(); - TestSymlink(); - TestExtension(); - TestWrapper(); - TestErrno(); - TestTruncate(); - - ShutdownGoogleLogging(); - - fprintf(stdout, "PASS\n"); - return 0; -} - -void TestLogging(bool check_counts) { - int64 base_num_infos = LogMessage::num_messages(INFO); - int64 base_num_warning = LogMessage::num_messages(WARNING); - int64 base_num_errors = LogMessage::num_messages(ERROR); - - LOG(INFO) << string("foo ") << "bar " << 10 << ' ' << 3.4; - for ( int i = 0; i < 10; ++i ) { - int old_errno = errno; - errno = i; - PLOG_EVERY_N(ERROR, 2) << "Plog every 2, iteration " << COUNTER; - errno = old_errno; - - LOG_EVERY_N(ERROR, 3) << "Log every 3, iteration " << COUNTER << endl; - LOG_EVERY_N(ERROR, 4) << "Log every 4, iteration " << COUNTER << endl; - - LOG_IF_EVERY_N(WARNING, true, 5) << "Log if every 5, iteration " << COUNTER; - LOG_IF_EVERY_N(WARNING, false, 3) - << "Log if every 3, iteration " << COUNTER; - LOG_IF_EVERY_N(INFO, true, 1) << "Log if every 1, iteration " << COUNTER; - LOG_IF_EVERY_N(ERROR, (i < 3), 2) - << "Log if less than 3 every 2, iteration " << COUNTER; - } - LOG_IF(WARNING, true) << "log_if this"; - LOG_IF(WARNING, false) << "don't log_if this"; - - char s[] = "array"; - LOG(INFO) << s; - const char const_s[] = "const array"; - LOG(INFO) << const_s; - int j = 1000; - LOG(ERROR) << string("foo") << ' '<< j << ' ' << setw(10) << j << " " - << setw(1) << hex << j; - - LogMessage("foo", LogMessage::kNoLogPrefix, INFO).stream() << "no prefix"; - - if (check_counts) { - CHECK_EQ(base_num_infos + 14, LogMessage::num_messages(INFO)); - CHECK_EQ(base_num_warning + 3, LogMessage::num_messages(WARNING)); - CHECK_EQ(base_num_errors + 15, LogMessage::num_messages(ERROR)); - } -} - -static void NoAllocNewHook() { - CHECK(false) << "unexpected new"; -} - -struct NewHook { - NewHook() { - g_new_hook = &NoAllocNewHook; - } - ~NewHook() { - g_new_hook = NULL; - } -}; - -TEST(DeathNoAllocNewHook, logging) { - // tests that NewHook used below works - NewHook new_hook; - ASSERT_DEATH({ - new int; - }, "unexpected new"); -} - -void TestRawLogging() { - string* foo = new string("foo "); - string huge_str(50000, 'a'); - - FlagSaver saver; - - // Check that RAW loggging does not use mallocs. - NewHook new_hook; - - RAW_LOG(INFO, "%s%s%d%c%f", foo->c_str(), "bar ", 10, ' ', 3.4); - char s[] = "array"; - RAW_LOG(WARNING, "%s", s); - const char const_s[] = "const array"; - RAW_LOG(INFO, "%s", const_s); - void* p = reinterpret_cast(0x12345678); - RAW_LOG(INFO, "ptr %p", p); - p = NULL; - RAW_LOG(INFO, "ptr %p", p); - int j = 1000; - RAW_LOG(ERROR, "%s%d%c%010d%s%1x", foo->c_str(), j, ' ', j, " ", j); - RAW_VLOG(0, "foo %d", j); - -#ifdef NDEBUG - RAW_LOG(INFO, "foo %d", j); // so that have same stderr to compare -#else - RAW_DLOG(INFO, "foo %d", j); // test RAW_DLOG in debug mode -#endif - - // test how long messages are chopped: - RAW_LOG(WARNING, "Huge string: %s", huge_str.c_str()); - RAW_VLOG(0, "Huge string: %s", huge_str.c_str()); - - FLAGS_v = 0; - RAW_LOG(INFO, "log"); - RAW_VLOG(0, "vlog 0 on"); - RAW_VLOG(1, "vlog 1 off"); - RAW_VLOG(2, "vlog 2 off"); - RAW_VLOG(3, "vlog 3 off"); - FLAGS_v = 2; - RAW_LOG(INFO, "log"); - RAW_VLOG(1, "vlog 1 on"); - RAW_VLOG(2, "vlog 2 on"); - RAW_VLOG(3, "vlog 3 off"); - -#ifdef NDEBUG - RAW_DCHECK(1 == 2, " RAW_DCHECK's shouldn't be compiled in normal mode"); -#endif - - RAW_CHECK(1 == 1, "should be ok"); - RAW_DCHECK(true, "should be ok"); - - delete foo; -} - -void LogWithLevels(int v, int severity, bool err, bool alsoerr) { - RAW_LOG(INFO, - "Test: v=%d stderrthreshold=%d logtostderr=%d alsologtostderr=%d", - v, severity, err, alsoerr); - - FlagSaver saver; - - FLAGS_v = v; - FLAGS_stderrthreshold = severity; - FLAGS_logtostderr = err; - FLAGS_alsologtostderr = alsoerr; - - RAW_VLOG(-1, "vlog -1"); - RAW_VLOG(0, "vlog 0"); - RAW_VLOG(1, "vlog 1"); - RAW_LOG(INFO, "log info"); - RAW_LOG(WARNING, "log warning"); - RAW_LOG(ERROR, "log error"); - - VLOG(-1) << "vlog -1"; - VLOG(0) << "vlog 0"; - VLOG(1) << "vlog 1"; - LOG(INFO) << "log info"; - LOG(WARNING) << "log warning"; - LOG(ERROR) << "log error"; - - VLOG_IF(-1, true) << "vlog_if -1"; - VLOG_IF(-1, false) << "don't vlog_if -1"; - VLOG_IF(0, true) << "vlog_if 0"; - VLOG_IF(0, false) << "don't vlog_if 0"; - VLOG_IF(1, true) << "vlog_if 1"; - VLOG_IF(1, false) << "don't vlog_if 1"; - LOG_IF(INFO, true) << "log_if info"; - LOG_IF(INFO, false) << "don't log_if info"; - LOG_IF(WARNING, true) << "log_if warning"; - LOG_IF(WARNING, false) << "don't log_if warning"; - LOG_IF(ERROR, true) << "log_if error"; - LOG_IF(ERROR, false) << "don't log_if error"; - - int c; - c = 1; VLOG_IF(100, c -= 2) << "vlog_if 100 expr"; EXPECT_EQ(c, -1); - c = 1; VLOG_IF(0, c -= 2) << "vlog_if 0 expr"; EXPECT_EQ(c, -1); - c = 1; LOG_IF(INFO, c -= 2) << "log_if info expr"; EXPECT_EQ(c, -1); - c = 1; LOG_IF(ERROR, c -= 2) << "log_if error expr"; EXPECT_EQ(c, -1); - c = 2; VLOG_IF(0, c -= 2) << "don't vlog_if 0 expr"; EXPECT_EQ(c, 0); - c = 2; LOG_IF(ERROR, c -= 2) << "don't log_if error expr"; EXPECT_EQ(c, 0); - - c = 3; LOG_IF_EVERY_N(INFO, c -= 4, 1) << "log_if info every 1 expr"; - EXPECT_EQ(c, -1); - c = 3; LOG_IF_EVERY_N(ERROR, c -= 4, 1) << "log_if error every 1 expr"; - EXPECT_EQ(c, -1); - c = 4; LOG_IF_EVERY_N(ERROR, c -= 4, 3) << "don't log_if info every 3 expr"; - EXPECT_EQ(c, 0); - c = 4; LOG_IF_EVERY_N(ERROR, c -= 4, 3) << "don't log_if error every 3 expr"; - EXPECT_EQ(c, 0); - c = 5; VLOG_IF_EVERY_N(0, c -= 4, 1) << "vlog_if 0 every 1 expr"; - EXPECT_EQ(c, 1); - c = 5; VLOG_IF_EVERY_N(100, c -= 4, 3) << "vlog_if 100 every 3 expr"; - EXPECT_EQ(c, 1); - c = 6; VLOG_IF_EVERY_N(0, c -= 6, 1) << "don't vlog_if 0 every 1 expr"; - EXPECT_EQ(c, 0); - c = 6; VLOG_IF_EVERY_N(100, c -= 6, 3) << "don't vlog_if 100 every 1 expr"; - EXPECT_EQ(c, 0); -} - -void TestLoggingLevels() { - LogWithLevels(0, INFO, false, false); - LogWithLevels(1, INFO, false, false); - LogWithLevels(-1, INFO, false, false); - LogWithLevels(0, WARNING, false, false); - LogWithLevels(0, ERROR, false, false); - LogWithLevels(0, FATAL, false, false); - LogWithLevels(0, FATAL, true, false); - LogWithLevels(0, FATAL, false, true); - LogWithLevels(1, WARNING, false, false); - LogWithLevels(1, FATAL, false, true); -} - -TEST(DeathRawCHECK, logging) { - ASSERT_DEATH(RAW_CHECK(false, "failure 1"), - "RAW: Check false failed: failure 1"); - ASSERT_DEBUG_DEATH(RAW_DCHECK(1 == 2, "failure 2"), - "RAW: Check 1 == 2 failed: failure 2"); -} - -void TestLogString() { - vector errors; - vector *no_errors = NULL; - - LOG_STRING(INFO, &errors) << "LOG_STRING: " << "collected info"; - LOG_STRING(WARNING, &errors) << "LOG_STRING: " << "collected warning"; - LOG_STRING(ERROR, &errors) << "LOG_STRING: " << "collected error"; - - LOG_STRING(INFO, no_errors) << "LOG_STRING: " << "reported info"; - LOG_STRING(WARNING, no_errors) << "LOG_STRING: " << "reported warning"; - LOG_STRING(ERROR, NULL) << "LOG_STRING: " << "reported error"; - - for (size_t i = 0; i < errors.size(); ++i) { - LOG(INFO) << "Captured by LOG_STRING: " << errors[i]; - } -} - -void TestLogToString() { - string error; - string* no_error = NULL; - - LOG_TO_STRING(INFO, &error) << "LOG_TO_STRING: " << "collected info"; - LOG(INFO) << "Captured by LOG_TO_STRING: " << error; - LOG_TO_STRING(WARNING, &error) << "LOG_TO_STRING: " << "collected warning"; - LOG(INFO) << "Captured by LOG_TO_STRING: " << error; - LOG_TO_STRING(ERROR, &error) << "LOG_TO_STRING: " << "collected error"; - LOG(INFO) << "Captured by LOG_TO_STRING: " << error; - - LOG_TO_STRING(INFO, no_error) << "LOG_TO_STRING: " << "reported info"; - LOG_TO_STRING(WARNING, no_error) << "LOG_TO_STRING: " << "reported warning"; - LOG_TO_STRING(ERROR, NULL) << "LOG_TO_STRING: " << "reported error"; -} - -class TestLogSinkImpl : public LogSink { - public: - vector errors; - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct tm* tm_time, - const char* message, size_t message_len) { - errors.push_back( - ToString(severity, base_filename, line, tm_time, message, message_len)); - } -}; - -void TestLogSink() { - TestLogSinkImpl sink; - LogSink *no_sink = NULL; - - LOG_TO_SINK(&sink, INFO) << "LOG_TO_SINK: " << "collected info"; - LOG_TO_SINK(&sink, WARNING) << "LOG_TO_SINK: " << "collected warning"; - LOG_TO_SINK(&sink, ERROR) << "LOG_TO_SINK: " << "collected error"; - - LOG_TO_SINK(no_sink, INFO) << "LOG_TO_SINK: " << "reported info"; - LOG_TO_SINK(no_sink, WARNING) << "LOG_TO_SINK: " << "reported warning"; - LOG_TO_SINK(NULL, ERROR) << "LOG_TO_SINK: " << "reported error"; - - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(&sink, INFO) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "collected info"; - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(&sink, WARNING) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "collected warning"; - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(&sink, ERROR) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "collected error"; - - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(no_sink, INFO) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "thrashed info"; - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(no_sink, WARNING) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "thrashed warning"; - LOG_TO_SINK_BUT_NOT_TO_LOGFILE(NULL, ERROR) - << "LOG_TO_SINK_BUT_NOT_TO_LOGFILE: " << "thrashed error"; - - LOG(INFO) << "Captured by LOG_TO_SINK:"; - for (size_t i = 0; i < sink.errors.size(); ++i) { - LogMessage("foo", LogMessage::kNoLogPrefix, INFO).stream() - << sink.errors[i]; - } -} - -// For testing using CHECK*() on anonymous enums. -enum { - CASE_A, - CASE_B -}; - -void TestCHECK() { - // Tests using CHECK*() on int values. - CHECK(1 == 1); - CHECK_EQ(1, 1); - CHECK_NE(1, 2); - CHECK_GE(1, 1); - CHECK_GE(2, 1); - CHECK_LE(1, 1); - CHECK_LE(1, 2); - CHECK_GT(2, 1); - CHECK_LT(1, 2); - - // Tests using CHECK*() on anonymous enums. - // Apple's GCC doesn't like this. -#if !defined(OS_MACOSX) - CHECK_EQ(CASE_A, CASE_A); - CHECK_NE(CASE_A, CASE_B); - CHECK_GE(CASE_A, CASE_A); - CHECK_GE(CASE_B, CASE_A); - CHECK_LE(CASE_A, CASE_A); - CHECK_LE(CASE_A, CASE_B); - CHECK_GT(CASE_B, CASE_A); - CHECK_LT(CASE_A, CASE_B); -#endif -} - -void TestDCHECK() { -#ifdef NDEBUG - DCHECK( 1 == 2 ) << " DCHECK's shouldn't be compiled in normal mode"; -#endif - DCHECK( 1 == 1 ); - DCHECK_EQ(1, 1); - DCHECK_NE(1, 2); - DCHECK_GE(1, 1); - DCHECK_GE(2, 1); - DCHECK_LE(1, 1); - DCHECK_LE(1, 2); - DCHECK_GT(2, 1); - DCHECK_LT(1, 2); - - auto_ptr sptr(new int64); - int64* ptr = DCHECK_NOTNULL(sptr.get()); - CHECK_EQ(ptr, sptr.get()); -} - -void TestSTREQ() { - CHECK_STREQ("this", "this"); - CHECK_STREQ(NULL, NULL); - CHECK_STRCASEEQ("this", "tHiS"); - CHECK_STRCASEEQ(NULL, NULL); - CHECK_STRNE("this", "tHiS"); - CHECK_STRNE("this", NULL); - CHECK_STRCASENE("this", "that"); - CHECK_STRCASENE(NULL, "that"); - CHECK_STREQ((string("a")+"b").c_str(), "ab"); - CHECK_STREQ(string("test").c_str(), - (string("te") + string("st")).c_str()); -} - -TEST(DeathSTREQ, logging) { - ASSERT_DEATH(CHECK_STREQ(NULL, "this"), ""); - ASSERT_DEATH(CHECK_STREQ("this", "siht"), ""); - ASSERT_DEATH(CHECK_STRCASEEQ(NULL, "siht"), ""); - ASSERT_DEATH(CHECK_STRCASEEQ("this", "siht"), ""); - ASSERT_DEATH(CHECK_STRNE(NULL, NULL), ""); - ASSERT_DEATH(CHECK_STRNE("this", "this"), ""); - ASSERT_DEATH(CHECK_STREQ((string("a")+"b").c_str(), "abc"), ""); -} - -TEST(CheckNOTNULL, Simple) { - int64 t; - void *ptr = static_cast(&t); - void *ref = CHECK_NOTNULL(ptr); - EXPECT_EQ(ptr, ref); - CHECK_NOTNULL(reinterpret_cast(ptr)); - CHECK_NOTNULL(reinterpret_cast(ptr)); - CHECK_NOTNULL(reinterpret_cast(ptr)); - CHECK_NOTNULL(reinterpret_cast(ptr)); -} - -TEST(DeathCheckNN, Simple) { - ASSERT_DEATH(CHECK_NOTNULL(static_cast(NULL)), ""); -} - -// Get list of file names that match pattern -static void GetFiles(const string& pattern, vector* files) { - files->clear(); -#if defined(HAVE_GLOB_H) - glob_t g; - const int r = glob(pattern.c_str(), 0, NULL, &g); - CHECK((r == 0) || (r == GLOB_NOMATCH)) << ": error matching " << pattern; - for (int i = 0; i < g.gl_pathc; i++) { - files->push_back(string(g.gl_pathv[i])); - } - globfree(&g); -#elif defined(OS_WINDOWS) - WIN32_FIND_DATAA data; - HANDLE handle = FindFirstFileA(pattern.c_str(), &data); - size_t index = pattern.rfind('\\'); - if (index == string::npos) { - LOG(FATAL) << "No directory separator."; - } - const string dirname = pattern.substr(0, index + 1); - if (FAILED(handle)) { - // Finding no files is OK. - return; - } - do { - files->push_back(dirname + data.cFileName); - } while (FindNextFileA(handle, &data)); - LOG_SYSRESULT(FindClose(handle)); -#else -# error There is no way to do glob. -#endif -} - -// Delete files patching pattern -static void DeleteFiles(const string& pattern) { - vector files; - GetFiles(pattern, &files); - for (size_t i = 0; i < files.size(); i++) { - CHECK(unlink(files[i].c_str()) == 0) << ": " << strerror(errno); - } -} - -static void CheckFile(const string& name, const string& expected_string) { - vector files; - GetFiles(name + "*", &files); - CHECK_EQ(files.size(), 1); - - FILE* file = fopen(files[0].c_str(), "r"); - CHECK(file != NULL) << ": could not open " << files[0]; - char buf[1000]; - while (fgets(buf, sizeof(buf), file) != NULL) { - if (strstr(buf, expected_string.c_str()) != NULL) { - fclose(file); - return; - } - } - fclose(file); - LOG(FATAL) << "Did not find " << expected_string << " in " << files[0]; -} - -static void TestBasename() { - fprintf(stderr, "==== Test setting log file basename\n"); - const string dest = FLAGS_test_tmpdir + "/logging_test_basename"; - DeleteFiles(dest + "*"); - - SetLogDestination(INFO, dest.c_str()); - LOG(INFO) << "message to new base"; - FlushLogFiles(INFO); - - CheckFile(dest, "message to new base"); - - // Release file handle for the destination file to unlock the file in Windows. - LogToStderr(); - DeleteFiles(dest + "*"); -} - -static void TestSymlink() { -#ifndef OS_WINDOWS - fprintf(stderr, "==== Test setting log file symlink\n"); - string dest = FLAGS_test_tmpdir + "/logging_test_symlink"; - string sym = FLAGS_test_tmpdir + "/symlinkbase"; - DeleteFiles(dest + "*"); - DeleteFiles(sym + "*"); - - SetLogSymlink(INFO, "symlinkbase"); - SetLogDestination(INFO, dest.c_str()); - LOG(INFO) << "message to new symlink"; - FlushLogFiles(INFO); - CheckFile(sym, "message to new symlink"); - - DeleteFiles(dest + "*"); - DeleteFiles(sym + "*"); -#endif -} - -static void TestExtension() { - fprintf(stderr, "==== Test setting log file extension\n"); - string dest = FLAGS_test_tmpdir + "/logging_test_extension"; - DeleteFiles(dest + "*"); - - SetLogDestination(INFO, dest.c_str()); - SetLogFilenameExtension("specialextension"); - LOG(INFO) << "message to new extension"; - FlushLogFiles(INFO); - CheckFile(dest, "message to new extension"); - - // Check that file name ends with extension - vector filenames; - GetFiles(dest + "*", &filenames); - CHECK_EQ(filenames.size(), 1); - CHECK(strstr(filenames[0].c_str(), "specialextension") != NULL); - - // Release file handle for the destination file to unlock the file in Windows. - LogToStderr(); - DeleteFiles(dest + "*"); -} - -struct MyLogger : public base::Logger { - string data; - - virtual void Write(bool should_flush, - time_t timestamp, - const char* message, - int length) { - data.append(message, length); - } - - virtual void Flush() { } - - virtual uint32 LogSize() { return data.length(); } -}; - -static void TestWrapper() { - fprintf(stderr, "==== Test log wrapper\n"); - - MyLogger my_logger; - base::Logger* old_logger = base::GetLogger(INFO); - base::SetLogger(INFO, &my_logger); - LOG(INFO) << "Send to wrapped logger"; - FlushLogFiles(INFO); - base::SetLogger(INFO, old_logger); - - CHECK(strstr(my_logger.data.c_str(), "Send to wrapped logger") != NULL); -} - -static void TestErrno() { - fprintf(stderr, "==== Test errno preservation\n"); - - errno = ENOENT; - TestLogging(false); - CHECK_EQ(errno, ENOENT); -} - -static void TestOneTruncate(const char *path, int64 limit, int64 keep, - int64 dsize, int64 ksize, int64 expect) { - int fd; - CHECK_ERR(fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0600)); - - const char *discardstr = "DISCARDME!", *keepstr = "KEEPME!"; - - // Fill the file with the requested data; first discard data, then kept data - int64 written = 0; - while (written < dsize) { - int bytes = min(dsize - written, strlen(discardstr)); - CHECK_ERR(write(fd, discardstr, bytes)); - written += bytes; - } - written = 0; - while (written < ksize) { - int bytes = min(ksize - written, strlen(keepstr)); - CHECK_ERR(write(fd, keepstr, bytes)); - written += bytes; - } - - TruncateLogFile(path, limit, keep); - - // File should now be shorter - struct stat statbuf; - CHECK_ERR(fstat(fd, &statbuf)); - CHECK_EQ(statbuf.st_size, expect); - CHECK_ERR(lseek(fd, 0, SEEK_SET)); - - // File should contain the suffix of the original file - int buf_size = statbuf.st_size + 1; - char* buf = new char[buf_size]; - memset(buf, 0, sizeof(buf)); - CHECK_ERR(read(fd, buf, buf_size)); - - const char *p = buf; - int64 checked = 0; - while (checked < expect) { - int bytes = min(expect - checked, strlen(keepstr)); - CHECK(!memcmp(p, keepstr, bytes)); - checked += bytes; - } - close(fd); - delete[] buf; -} - -static void TestTruncate() { -#ifdef HAVE_UNISTD_H - fprintf(stderr, "==== Test log truncation\n"); - string path = FLAGS_test_tmpdir + "/truncatefile"; - - // Test on a small file - TestOneTruncate(path.c_str(), 10, 10, 10, 10, 10); - - // And a big file (multiple blocks to copy) - TestOneTruncate(path.c_str(), 2<<20, 4<<10, 3<<20, 4<<10, 4<<10); - - // Check edge-case limits - TestOneTruncate(path.c_str(), 10, 20, 0, 20, 20); - TestOneTruncate(path.c_str(), 10, 0, 0, 0, 0); - TestOneTruncate(path.c_str(), 10, 50, 0, 10, 10); - TestOneTruncate(path.c_str(), 50, 100, 0, 30, 30); - - // MacOSX 10.4 doesn't fail in this case. - // Windows doesn't have symlink. - // Let's just ignore this test for these cases. -#if !defined(OS_MACOSX) && !defined(OS_WINDOWS) - // Through a symlink should fail to truncate - string linkname = path + ".link"; - unlink(linkname.c_str()); - CHECK_ERR(symlink(path.c_str(), linkname.c_str())); - TestOneTruncate(linkname.c_str(), 10, 10, 0, 30, 30); -#endif - - // The /proc/self path makes sense only for linux. -#if defined(OS_LINUX) - // Through an open fd symlink should work - int fd; - CHECK_ERR(fd = open(path.c_str(), O_APPEND | O_WRONLY)); - char fdpath[64]; - snprintf(fdpath, sizeof(fdpath), "/proc/self/fd/%d", fd); - TestOneTruncate(fdpath, 10, 10, 10, 10, 10); -#endif - -#endif -} - -_START_GOOGLE_NAMESPACE_ -namespace glog_internal_namespace_ { -extern // in logging.cc -bool SafeFNMatch_(const char* pattern, size_t patt_len, - const char* str, size_t str_len); -} // namespace glog_internal_namespace_ -using glog_internal_namespace_::SafeFNMatch_; -_END_GOOGLE_NAMESPACE_ - -static bool WrapSafeFNMatch(string pattern, string str) { - pattern += "abc"; - str += "defgh"; - return SafeFNMatch_(pattern.data(), pattern.size() - 3, - str.data(), str.size() - 5); -} - -TEST(SafeFNMatch, logging) { - CHECK(WrapSafeFNMatch("foo", "foo")); - CHECK(!WrapSafeFNMatch("foo", "bar")); - CHECK(!WrapSafeFNMatch("foo", "fo")); - CHECK(!WrapSafeFNMatch("foo", "foo2")); - CHECK(WrapSafeFNMatch("bar/foo.ext", "bar/foo.ext")); - CHECK(WrapSafeFNMatch("*ba*r/fo*o.ext*", "bar/foo.ext")); - CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/baz.ext")); - CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/foo")); - CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/foo.ext.zip")); - CHECK(WrapSafeFNMatch("ba?/*.ext", "bar/foo.ext")); - CHECK(WrapSafeFNMatch("ba?/*.ext", "baZ/FOO.ext")); - CHECK(!WrapSafeFNMatch("ba?/*.ext", "barr/foo.ext")); - CHECK(!WrapSafeFNMatch("ba?/*.ext", "bar/foo.ext2")); - CHECK(WrapSafeFNMatch("ba?/*", "bar/foo.ext2")); - CHECK(WrapSafeFNMatch("ba?/*", "bar/")); - CHECK(!WrapSafeFNMatch("ba?/?", "bar/")); - CHECK(!WrapSafeFNMatch("ba?/*", "bar")); -} - -// TestWaitingLogSink will save messages here -// No lock: Accessed only by TestLogSinkWriter thread -// and after its demise by its creator. -static vector global_messages; - -// helper for TestWaitingLogSink below. -// Thread that does the logic of TestWaitingLogSink -// It's free to use LOG() itself. -class TestLogSinkWriter : public Thread { - public: - - TestLogSinkWriter() : should_exit_(false) { - SetJoinable(true); - Start(); - } - - // Just buffer it (can't use LOG() here). - void Buffer(const string& message) { - mutex_.Lock(); - RAW_LOG(INFO, "Buffering"); - messages_.push(message); - mutex_.Unlock(); - RAW_LOG(INFO, "Buffered"); - } - - // Wait for the buffer to clear (can't use LOG() here). - void Wait() { - RAW_LOG(INFO, "Waiting"); - mutex_.Lock(); - while (!NoWork()) { - mutex_.Unlock(); - SleepForMilliseconds(1); - mutex_.Lock(); - } - RAW_LOG(INFO, "Waited"); - mutex_.Unlock(); - } - - // Trigger thread exit. - void Stop() { - MutexLock l(&mutex_); - should_exit_ = true; - } - - private: - - // helpers --------------- - - // For creating a "Condition". - bool NoWork() { return messages_.empty(); } - bool HaveWork() { return !messages_.empty() || should_exit_; } - - // Thread body; CAN use LOG() here! - virtual void Run() { - while (1) { - mutex_.Lock(); - while (!HaveWork()) { - mutex_.Unlock(); - SleepForMilliseconds(1); - mutex_.Lock(); - } - if (should_exit_ && messages_.empty()) { - mutex_.Unlock(); - break; - } - // Give the main thread time to log its message, - // so that we get a reliable log capture to compare to golden file. - // Same for the other sleep below. - SleepForMilliseconds(20); - RAW_LOG(INFO, "Sink got a messages"); // only RAW_LOG under mutex_ here - string message = messages_.front(); - messages_.pop(); - // Normally this would be some more real/involved logging logic - // where LOG() usage can't be eliminated, - // e.g. pushing the message over with an RPC: - int messages_left = messages_.size(); - mutex_.Unlock(); - SleepForMilliseconds(20); - // May not use LOG while holding mutex_, because Buffer() - // acquires mutex_, and Buffer is called from LOG(), - // which has its own internal mutex: - // LOG()->LogToSinks()->TestWaitingLogSink::send()->Buffer() - LOG(INFO) << "Sink is sending out a message: " << message; - LOG(INFO) << "Have " << messages_left << " left"; - global_messages.push_back(message); - } - } - - // data --------------- - - Mutex mutex_; - bool should_exit_; - queue messages_; // messages to be logged -}; - -// A log sink that exercises WaitTillSent: -// it pushes data to a buffer and wakes up another thread to do the logging -// (that other thread can than use LOG() itself), -class TestWaitingLogSink : public LogSink { - public: - - TestWaitingLogSink() { - tid_ = pthread_self(); // for thread-specific behavior - AddLogSink(this); - } - ~TestWaitingLogSink() { - RemoveLogSink(this); - writer_.Stop(); - writer_.Join(); - } - - // (re)define LogSink interface - - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct tm* tm_time, - const char* message, size_t message_len) { - // Push it to Writer thread if we are the original logging thread. - // Note: Something like ThreadLocalLogSink is a better choice - // to do thread-specific LogSink logic for real. - if (pthread_equal(tid_, pthread_self())) { - writer_.Buffer(ToString(severity, base_filename, line, - tm_time, message, message_len)); - } - } - virtual void WaitTillSent() { - // Wait for Writer thread if we are the original logging thread. - if (pthread_equal(tid_, pthread_self())) writer_.Wait(); - } - - private: - - pthread_t tid_; - TestLogSinkWriter writer_; -}; - -// Check that LogSink::WaitTillSent can be used in the advertised way. -// We also do golden-stderr comparison. -static void TestLogSinkWaitTillSent() { - { TestWaitingLogSink sink; - // Sleeps give the sink threads time to do all their work, - // so that we get a reliable log capture to compare to the golden file. - LOG(INFO) << "Message 1"; - SleepForMilliseconds(60); - LOG(ERROR) << "Message 2"; - SleepForMilliseconds(60); - LOG(WARNING) << "Message 3"; - SleepForMilliseconds(60); - } - for (size_t i = 0; i < global_messages.size(); ++i) { - LOG(INFO) << "Sink capture: " << global_messages[i]; - } - CHECK_EQ(global_messages.size(), 3); -} - -TEST(Strerror, logging) { - int errcode = EINTR; - char *msg = strdup(strerror(errcode)); - int buf_size = strlen(msg) + 1; - char *buf = new char[buf_size]; - CHECK_EQ(posix_strerror_r(errcode, NULL, 0), -1); - buf[0] = 'A'; - CHECK_EQ(posix_strerror_r(errcode, buf, 0), -1); - CHECK_EQ(buf[0], 'A'); - CHECK_EQ(posix_strerror_r(errcode, NULL, buf_size), -1); -#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) - // MacOSX or FreeBSD considers this case is an error since there is - // no enough space. - CHECK_EQ(posix_strerror_r(errcode, buf, 1), -1); -#else - CHECK_EQ(posix_strerror_r(errcode, buf, 1), 0); -#endif - CHECK_STREQ(buf, ""); - CHECK_EQ(posix_strerror_r(errcode, buf, buf_size), 0); - CHECK_STREQ(buf, msg); - free(msg); - delete[] buf; -} - -// Simple routines to look at the sizes of generated code for LOG(FATAL) and -// CHECK(..) via objdump -void MyFatal() { - LOG(FATAL) << "Failed"; -} -void MyCheck(bool a, bool b) { - CHECK_EQ(a, b); -} - -#ifdef HAVE_LIB_GMOCK - -TEST(DVLog, Basic) { - ScopedMockLog log; - -#if NDEBUG - // We are expecting that nothing is logged. - EXPECT_CALL(log, Log(_, _, _)).Times(0); -#else - EXPECT_CALL(log, Log(INFO, __FILE__, "debug log")); -#endif - - FLAGS_v = 1; - DVLOG(1) << "debug log"; -} - -TEST(DVLog, V0) { - ScopedMockLog log; - - // We are expecting that nothing is logged. - EXPECT_CALL(log, Log(_, _, _)).Times(0); - - FLAGS_v = 0; - DVLOG(1) << "debug log"; -} - -TEST(LogAtLevel, Basic) { - ScopedMockLog log; - - // The function version outputs "logging.h" as a file name. - EXPECT_CALL(log, Log(WARNING, StrNe(__FILE__), "function version")); - EXPECT_CALL(log, Log(INFO, __FILE__, "macro version")); - - int severity = WARNING; - LogAtLevel(severity, "function version"); - - severity = INFO; - // We can use the macro version as a C++ stream. - LOG_AT_LEVEL(severity) << "macro" << ' ' << "version"; -} - -TEST(TestExitOnDFatal, ToBeOrNotToBe) { - // Check the default setting... - EXPECT_TRUE(base::internal::GetExitOnDFatal()); - - // Turn off... - base::internal::SetExitOnDFatal(false); - EXPECT_FALSE(base::internal::GetExitOnDFatal()); - - // We don't die. - { - ScopedMockLog log; - //EXPECT_CALL(log, Log(_, _, _)).Times(AnyNumber()); - // LOG(DFATAL) has severity FATAL if debugging, but is - // downgraded to ERROR if not debugging. - const LogSeverity severity = -#ifdef NDEBUG - ERROR; -#else - FATAL; -#endif - EXPECT_CALL(log, Log(severity, __FILE__, "This should not be fatal")); - LOG(DFATAL) << "This should not be fatal"; - } - - // Turn back on... - base::internal::SetExitOnDFatal(true); - EXPECT_TRUE(base::internal::GetExitOnDFatal()); - -#ifdef GTEST_HAS_DEATH_TEST - // Death comes on little cats' feet. - EXPECT_DEBUG_DEATH({ - LOG(DFATAL) << "This should be fatal in debug mode"; - }, "This should be fatal in debug mode"); -#endif -} - -#ifdef HAVE_STACKTRACE - -static void BacktraceAtHelper() { - LOG(INFO) << "Not me"; - -// The vertical spacing of the next 3 lines is significant. - LOG(INFO) << "Backtrace me"; -} -static int kBacktraceAtLine = __LINE__ - 2; // The line of the LOG(INFO) above - -TEST(LogBacktraceAt, DoesNotBacktraceWhenDisabled) { - StrictMock log; - - FLAGS_log_backtrace_at = ""; - - EXPECT_CALL(log, Log(_, _, "Backtrace me")); - EXPECT_CALL(log, Log(_, _, "Not me")); - - BacktraceAtHelper(); -} - -TEST(LogBacktraceAt, DoesBacktraceAtRightLineWhenEnabled) { - StrictMock log; - - char where[100]; - snprintf(where, 100, "%s:%d", const_basename(__FILE__), kBacktraceAtLine); - FLAGS_log_backtrace_at = where; - - // The LOG at the specified line should include a stacktrace which includes - // the name of the containing function, followed by the log message. - // We use HasSubstr()s instead of ContainsRegex() for environments - // which don't have regexp. - EXPECT_CALL(log, Log(_, _, AllOf(HasSubstr("stacktrace:"), - HasSubstr("BacktraceAtHelper"), - HasSubstr("main"), - HasSubstr("Backtrace me")))); - // Other LOGs should not include a backtrace. - EXPECT_CALL(log, Log(_, _, "Not me")); - - BacktraceAtHelper(); -} - -#endif // HAVE_STACKTRACE - -#endif // HAVE_LIB_GMOCK - -struct UserDefinedClass { - bool operator==(const UserDefinedClass& rhs) const { return true; } -}; - -inline ostream& operator<<(ostream& out, const UserDefinedClass& u) { - out << "OK"; - return out; -} - -TEST(UserDefinedClass, logging) { - UserDefinedClass u; - vector buf; - LOG_STRING(INFO, &buf) << u; - CHECK_EQ(1, buf.size()); - CHECK(buf[0].find("OK") != string::npos); - - // We must be able to compile this. - CHECK_EQ(u, u); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.err b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.err deleted file mode 100644 index 4f80bf5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/logging_unittest.err +++ /dev/null @@ -1,305 +0,0 @@ -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=2 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -WARNING: Logging before InitGoogleLogging() is written to STDERR -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=0 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] foo bar 10 3.4 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Plog every 2, iteration 1: __SUCCESS__ [0] -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 3, iteration 1 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 4, iteration 1 -WDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 5, iteration 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 1 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log if less than 3 every 2, iteration 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 2 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Plog every 2, iteration 3: __ENOENT__ [2] -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 3 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log if less than 3 every 2, iteration 3 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 3, iteration 4 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 4 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Plog every 2, iteration 5: __EINTR__ [4] -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 4, iteration 5 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 5 -WDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 5, iteration 6 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 6 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Plog every 2, iteration 7: __ENXIO__ [6] -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 3, iteration 7 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 7 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 8 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Plog every 2, iteration 9: __ENOEXEC__ [8] -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 4, iteration 9 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 9 -EDATE TIME__ THREADID logging_unittest.cc:LINE] Log every 3, iteration 10 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Log if every 1, iteration 10 -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if this -IDATE TIME__ THREADID logging_unittest.cc:LINE] array -IDATE TIME__ THREADID logging_unittest.cc:LINE] const array -EDATE TIME__ THREADID logging_unittest.cc:LINE] foo 1000 0000001000 3e8 -no prefix -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo bar 10 3.400000 -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: array -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: const array -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: ptr 0x12345678 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: ptr __NULLP__ -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo 1000 0000001000 3e8 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo 1000 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: foo 1000 -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: RAW_LOG ERROR: The Message was too long! -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: RAW_LOG ERROR: The Message was too long! -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 on -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 1 on -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 2 on -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=0 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=1 stderrthreshold=0 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=-1 stderrthreshold=0 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=1 logtostderr=0 alsologtostderr=0 -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=2 logtostderr=0 alsologtostderr=0 -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=3 logtostderr=0 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=3 logtostderr=1 alsologtostderr=0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=0 stderrthreshold=3 logtostderr=0 alsologtostderr=1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=1 stderrthreshold=1 logtostderr=0 alsologtostderr=0 -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Test: v=1 stderrthreshold=3 logtostderr=0 alsologtostderr=1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: vlog 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if -1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info -WDATE TIME__ THREADID logging_unittest.cc:LINE] log_if warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] log_if info every 1 expr -EDATE TIME__ THREADID logging_unittest.cc:LINE] log_if error every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] vlog_if 0 every 1 expr -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_STRING: reported info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_STRING: reported warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_STRING: reported error -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_STRING: LOG_STRING: collected info -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_STRING: LOG_STRING: collected warning -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_STRING: LOG_STRING: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: reported info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: reported warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: reported error -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_TO_SINK: -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK_BUT_NOT_TO_LOGFILE: collected info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK_BUT_NOT_TO_LOGFILE: collected warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_SINK_BUT_NOT_TO_LOGFILE: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: collected info -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_TO_STRING: LOG_TO_STRING: collected info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: collected warning -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_TO_STRING: LOG_TO_STRING: collected warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] Captured by LOG_TO_STRING: LOG_TO_STRING: collected error -IDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: reported info -WDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: reported warning -EDATE TIME__ THREADID logging_unittest.cc:LINE] LOG_TO_STRING: reported error -IDATE TIME__ THREADID logging_unittest.cc:LINE] Message 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffering -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffered -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waiting -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Sink got a messages -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waited -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink is sending out a message: IDATE TIME__ THREADID logging_unittest.cc:LINE] Message 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Have 0 left -EDATE TIME__ THREADID logging_unittest.cc:LINE] Message 2 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffering -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffered -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waiting -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Sink got a messages -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waited -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink is sending out a message: EDATE TIME__ THREADID logging_unittest.cc:LINE] Message 2 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Have 0 left -WDATE TIME__ THREADID logging_unittest.cc:LINE] Message 3 -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffering -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Buffered -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waiting -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Sink got a messages -IDATE TIME__ THREADID logging_unittest.cc:LINE] RAW: Waited -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink is sending out a message: WDATE TIME__ THREADID logging_unittest.cc:LINE] Message 3 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Have 0 left -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink capture: IDATE TIME__ THREADID logging_unittest.cc:LINE] Message 1 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink capture: EDATE TIME__ THREADID logging_unittest.cc:LINE] Message 2 -IDATE TIME__ THREADID logging_unittest.cc:LINE] Sink capture: WDATE TIME__ THREADID logging_unittest.cc:LINE] Message 3 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log.h deleted file mode 100644 index 5b218115..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log.h +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Zhanyong Wan -// -// Defines the ScopedMockLog class (using Google C++ Mocking -// Framework), which is convenient for testing code that uses LOG(). - -#ifndef GLOG_SRC_MOCK_LOG_H_ -#define GLOG_SRC_MOCK_LOG_H_ - -// For GOOGLE_NAMESPACE. This must go first so we get _XOPEN_SOURCE. -#include "utilities.h" - -#include - -#include - -#include "glog/logging.h" - -_START_GOOGLE_NAMESPACE_ -namespace glog_testing { - -// A ScopedMockLog object intercepts LOG() messages issued during its -// lifespan. Using this together with Google C++ Mocking Framework, -// it's very easy to test how a piece of code calls LOG(). The -// typical usage: -// -// TEST(FooTest, LogsCorrectly) { -// ScopedMockLog log; -// -// // We expect the WARNING "Something bad!" exactly twice. -// EXPECT_CALL(log, Log(WARNING, _, "Something bad!")) -// .Times(2); -// -// // We allow foo.cc to call LOG(INFO) any number of times. -// EXPECT_CALL(log, Log(INFO, HasSubstr("/foo.cc"), _)) -// .Times(AnyNumber()); -// -// Foo(); // Exercises the code under test. -// } -class ScopedMockLog : public GOOGLE_NAMESPACE::LogSink { - public: - // When a ScopedMockLog object is constructed, it starts to - // intercept logs. - ScopedMockLog() { AddLogSink(this); } - - // When the object is destructed, it stops intercepting logs. - virtual ~ScopedMockLog() { RemoveLogSink(this); } - - // Implements the mock method: - // - // void Log(LogSeverity severity, const string& file_path, - // const string& message); - // - // The second argument to Send() is the full path of the source file - // in which the LOG() was issued. - // - // Note, that in a multi-threaded environment, all LOG() messages from a - // single thread will be handled in sequence, but that cannot be guaranteed - // for messages from different threads. In fact, if the same or multiple - // expectations are matched on two threads concurrently, their actions will - // be executed concurrently as well and may interleave. - MOCK_METHOD3(Log, void(GOOGLE_NAMESPACE::LogSeverity severity, - const std::string& file_path, - const std::string& message)); - - private: - // Implements the send() virtual function in class LogSink. - // Whenever a LOG() statement is executed, this function will be - // invoked with information presented in the LOG(). - // - // The method argument list is long and carries much information a - // test usually doesn't care about, so we trim the list before - // forwarding the call to Log(), which is much easier to use in - // tests. - // - // We still cannot call Log() directly, as it may invoke other LOG() - // messages, either due to Invoke, or due to an error logged in - // Google C++ Mocking Framework code, which would trigger a deadlock - // since a lock is held during send(). - // - // Hence, we save the message for WaitTillSent() which will be called after - // the lock on send() is released, and we'll call Log() inside - // WaitTillSent(). Since while a single send() call may be running at a - // time, multiple WaitTillSent() calls (along with the one send() call) may - // be running simultaneously, we ensure thread-safety of the exchange between - // send() and WaitTillSent(), and that for each message, LOG(), send(), - // WaitTillSent() and Log() are executed in the same thread. - virtual void send(GOOGLE_NAMESPACE::LogSeverity severity, - const char* full_filename, - const char* base_filename, int line, const tm* tm_time, - const char* message, size_t message_len) { - // We are only interested in the log severity, full file name, and - // log message. - message_info_.severity = severity; - message_info_.file_path = full_filename; - message_info_.message = std::string(message, message_len); - } - - // Implements the WaitTillSent() virtual function in class LogSink. - // It will be executed after send() and after the global logging lock is - // released, so calls within it (or rather within the Log() method called - // within) may also issue LOG() statements. - // - // LOG(), send(), WaitTillSent() and Log() will occur in the same thread for - // a given log message. - virtual void WaitTillSent() { - // First, and very importantly, we save a copy of the message being - // processed before calling Log(), since Log() may indirectly call send() - // and WaitTillSent() in the same thread again. - MessageInfo message_info = message_info_; - Log(message_info.severity, message_info.file_path, message_info.message); - } - - // All relevant information about a logged message that needs to be passed - // from send() to WaitTillSent(). - struct MessageInfo { - GOOGLE_NAMESPACE::LogSeverity severity; - std::string file_path; - std::string message; - }; - MessageInfo message_info_; -}; - -} // namespace glog_testing -_END_GOOGLE_NAMESPACE_ - -#endif // GLOG_SRC_MOCK_LOG_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log_test.cc deleted file mode 100644 index 7d58a307..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/mock-log_test.cc +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Zhanyong Wan - -// Tests the ScopedMockLog class. - -#include "mock-log.h" - -#include - -#include -#include - -namespace { - -using GOOGLE_NAMESPACE::INFO; -using GOOGLE_NAMESPACE::WARNING; -using GOOGLE_NAMESPACE::ERROR; -using GOOGLE_NAMESPACE::glog_testing::ScopedMockLog; -using std::string; -using testing::_; -using testing::HasSubstr; -using testing::InSequence; -using testing::InvokeWithoutArgs; - -// Tests that ScopedMockLog intercepts LOG()s when it's alive. -TEST(ScopedMockLogTest, InterceptsLog) { - ScopedMockLog log; - - InSequence s; - EXPECT_CALL(log, Log(WARNING, HasSubstr("/mock-log_test.cc"), "Fishy.")); - EXPECT_CALL(log, Log(INFO, _, "Working...")) - .Times(2); - EXPECT_CALL(log, Log(ERROR, _, "Bad!!")); - - LOG(WARNING) << "Fishy."; - LOG(INFO) << "Working..."; - LOG(INFO) << "Working..."; - LOG(ERROR) << "Bad!!"; -} - -void LogBranch() { - LOG(INFO) << "Logging a branch..."; -} - -void LogTree() { - LOG(INFO) << "Logging the whole tree..."; -} - -void LogForest() { - LOG(INFO) << "Logging the entire forest."; - LOG(INFO) << "Logging the entire forest.."; - LOG(INFO) << "Logging the entire forest..."; -} - -// The purpose of the following test is to verify that intercepting logging -// continues to work properly if a LOG statement is executed within the scope -// of a mocked call. -TEST(ScopedMockLogTest, LogDuringIntercept) { - ScopedMockLog log; - InSequence s; - EXPECT_CALL(log, Log(INFO, __FILE__, "Logging a branch...")) - .WillOnce(InvokeWithoutArgs(LogTree)); - EXPECT_CALL(log, Log(INFO, __FILE__, "Logging the whole tree...")) - .WillOnce(InvokeWithoutArgs(LogForest)); - EXPECT_CALL(log, Log(INFO, __FILE__, "Logging the entire forest.")); - EXPECT_CALL(log, Log(INFO, __FILE__, "Logging the entire forest..")); - EXPECT_CALL(log, Log(INFO, __FILE__, "Logging the entire forest...")); - LogBranch(); -} - -} // namespace - -int main(int argc, char **argv) { - GOOGLE_NAMESPACE::InitGoogleLogging(argv[0]); - testing::InitGoogleMock(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/raw_logging.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/raw_logging.cc deleted file mode 100644 index 50c6a719..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/raw_logging.cc +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Maxim Lifantsev -// -// logging_unittest.cc covers the functionality herein - -#include "utilities.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include // for close() and write() -#endif -#include // for open() -#include -#include "config.h" -#include "glog/logging.h" // To pick up flag settings etc. -#include "glog/raw_logging.h" -#include "base/commandlineflags.h" - -#ifdef HAVE_STACKTRACE -# include "stacktrace.h" -#endif - -#if defined(HAVE_SYSCALL_H) -#include // for syscall() -#elif defined(HAVE_SYS_SYSCALL_H) -#include // for syscall() -#endif -#ifdef HAVE_UNISTD_H -# include -#endif - -#if defined(HAVE_SYSCALL_H) || defined(HAVE_SYS_SYSCALL_H) -# define safe_write(fd, s, len) syscall(SYS_write, fd, s, len) -#else - // Not so safe, but what can you do? -# define safe_write(fd, s, len) write(fd, s, len) -#endif - -_START_GOOGLE_NAMESPACE_ - -// Data for RawLog__ below. We simply pick up the latest -// time data created by a normal log message to avoid calling -// localtime_r which can allocate memory. -static struct ::tm last_tm_time_for_raw_log; -static int last_usecs_for_raw_log; - -void RawLog__SetLastTime(const struct ::tm& t, int usecs) { - memcpy(&last_tm_time_for_raw_log, &t, sizeof(last_tm_time_for_raw_log)); - last_usecs_for_raw_log = usecs; -} - -// CAVEAT: vsnprintf called from *DoRawLog below has some (exotic) code paths -// that invoke malloc() and getenv() that might acquire some locks. -// If this becomes a problem we should reimplement a subset of vsnprintf -// that does not need locks and malloc. - -// Helper for RawLog__ below. -// *DoRawLog writes to *buf of *size and move them past the written portion. -// It returns true iff there was no overflow or error. -static bool DoRawLog(char** buf, int* size, const char* format, ...) { - va_list ap; - va_start(ap, format); - int n = vsnprintf(*buf, *size, format, ap); - va_end(ap); - if (n < 0 || n > *size) return false; - *size -= n; - *buf += n; - return true; -} - -// Helper for RawLog__ below. -inline static bool VADoRawLog(char** buf, int* size, - const char* format, va_list ap) { - int n = vsnprintf(*buf, *size, format, ap); - if (n < 0 || n > *size) return false; - *size -= n; - *buf += n; - return true; -} - -static const int kLogBufSize = 3000; -static bool crashed = false; -static CrashReason crash_reason; -static char crash_buf[kLogBufSize + 1] = { 0 }; // Will end in '\0' - -void RawLog__(LogSeverity severity, const char* file, int line, - const char* format, ...) { - if (!(FLAGS_logtostderr || severity >= FLAGS_stderrthreshold || - FLAGS_alsologtostderr || !IsGoogleLoggingInitialized())) { - return; // this stderr log message is suppressed - } - // can't call localtime_r here: it can allocate - struct ::tm& t = last_tm_time_for_raw_log; - char buffer[kLogBufSize]; - char* buf = buffer; - int size = sizeof(buffer); - - // NOTE: this format should match the specification in base/logging.h - DoRawLog(&buf, &size, "%c%02d%02d %02d:%02d:%02d.%06d %5u %s:%d] RAW: ", - LogSeverityNames[severity][0], - 1 + t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, - last_usecs_for_raw_log, - static_cast(GetTID()), - const_basename(const_cast(file)), line); - - // Record the position and size of the buffer after the prefix - const char* msg_start = buf; - const int msg_size = size; - - va_list ap; - va_start(ap, format); - bool no_chop = VADoRawLog(&buf, &size, format, ap); - va_end(ap); - if (no_chop) { - DoRawLog(&buf, &size, "\n"); - } else { - DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n"); - } - // We make a raw syscall to write directly to the stderr file descriptor, - // avoiding FILE buffering (to avoid invoking malloc()), and bypassing - // libc (to side-step any libc interception). - // We write just once to avoid races with other invocations of RawLog__. - safe_write(STDERR_FILENO, buffer, strlen(buffer)); - if (severity == FATAL) { - if (!sync_val_compare_and_swap(&crashed, false, true)) { - crash_reason.filename = file; - crash_reason.line_number = line; - memcpy(crash_buf, msg_start, msg_size); // Don't include prefix - crash_reason.message = crash_buf; -#ifdef HAVE_STACKTRACE - crash_reason.depth = - GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1); -#else - crash_reason.depth = 0; -#endif - SetCrashReason(&crash_reason); - } - LogMessage::Fail(); // abort() - } -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler.cc deleted file mode 100644 index 9fc91b33..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler.cc +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// Implementation of InstallFailureSignalHandler(). - -#include "utilities.h" -#include "stacktrace.h" -#include "symbolize.h" -#include "glog/logging.h" - -#include -#include -#ifdef HAVE_UCONTEXT_H -# include -#endif -#ifdef HAVE_SYS_UCONTEXT_H -# include -#endif -#include - -_START_GOOGLE_NAMESPACE_ - -namespace { - -// We'll install the failure signal handler for these signals. We could -// use strsignal() to get signal names, but we don't use it to avoid -// introducing yet another #ifdef complication. -// -// The list should be synced with the comment in signalhandler.h. -const struct { - int number; - const char *name; -} kFailureSignals[] = { - { SIGSEGV, "SIGSEGV" }, - { SIGILL, "SIGILL" }, - { SIGFPE, "SIGFPE" }, - { SIGABRT, "SIGABRT" }, - { SIGBUS, "SIGBUS" }, - { SIGTERM, "SIGTERM" }, -}; - -// Returns the program counter from signal context, NULL if unknown. -void* GetPC(void* ucontext_in_void) { -#if (defined(HAVE_UCONTEXT_H) || defined(HAVE_SYS_UCONTEXT_H)) && defined(PC_FROM_UCONTEXT) - if (ucontext_in_void != NULL) { - ucontext_t *context = reinterpret_cast(ucontext_in_void); - return (void*)context->PC_FROM_UCONTEXT; - } -#endif - return NULL; -} - -// The class is used for formatting error messages. We don't use printf() -// as it's not async signal safe. -class MinimalFormatter { - public: - MinimalFormatter(char *buffer, int size) - : buffer_(buffer), - cursor_(buffer), - end_(buffer + size) { - } - - // Returns the number of bytes written in the buffer. - int num_bytes_written() const { return cursor_ - buffer_; } - - // Appends string from "str" and updates the internal cursor. - void AppendString(const char* str) { - int i = 0; - while (str[i] != '\0' && cursor_ + i < end_) { - cursor_[i] = str[i]; - ++i; - } - cursor_ += i; - } - - // Formats "number" in "radix" and updates the internal cursor. - // Lowercase letters are used for 'a' - 'z'. - void AppendUint64(uint64 number, int radix) { - int i = 0; - while (cursor_ + i < end_) { - const int tmp = number % radix; - number /= radix; - cursor_[i] = (tmp < 10 ? '0' + tmp : 'a' + tmp - 10); - ++i; - if (number == 0) { - break; - } - } - // Reverse the bytes written. - std::reverse(cursor_, cursor_ + i); - cursor_ += i; - } - - // Formats "number" as hexadecimal number, and updates the internal - // cursor. Padding will be added in front if needed. - void AppendHexWithPadding(uint64 number, int width) { - char* start = cursor_; - AppendString("0x"); - AppendUint64(number, 16); - // Move to right and add padding in front if needed. - if (cursor_ < start + width) { - const int64 delta = start + width - cursor_; - std::copy(start, cursor_, start + delta); - std::fill(start, start + delta, ' '); - cursor_ = start + width; - } - } - - private: - char *buffer_; - char *cursor_; - const char * const end_; -}; - -// Writes the given data with the size to the standard error. -void WriteToStderr(const char* data, int size) { - write(STDERR_FILENO, data, size); -} - -// The writer function can be changed by InstallFailureWriter(). -void (*g_failure_writer)(const char* data, int size) = WriteToStderr; - -// Dumps time information. We don't dump human-readable time information -// as localtime() is not guaranteed to be async signal safe. -void DumpTimeInfo() { - time_t time_in_sec = time(NULL); - char buf[256]; // Big enough for time info. - MinimalFormatter formatter(buf, sizeof(buf)); - formatter.AppendString("*** Aborted at "); - formatter.AppendUint64(time_in_sec, 10); - formatter.AppendString(" (unix time)"); - formatter.AppendString(" try \"date -d @"); - formatter.AppendUint64(time_in_sec, 10); - formatter.AppendString("\" if you are using GNU date ***\n"); - g_failure_writer(buf, formatter.num_bytes_written()); -} - -// Dumps information about the signal to STDERR. -void DumpSignalInfo(int signal_number, siginfo_t *siginfo) { - // Get the signal name. - const char* signal_name = NULL; - for (int i = 0; i < ARRAYSIZE(kFailureSignals); ++i) { - if (signal_number == kFailureSignals[i].number) { - signal_name = kFailureSignals[i].name; - } - } - - char buf[256]; // Big enough for signal info. - MinimalFormatter formatter(buf, sizeof(buf)); - - formatter.AppendString("*** "); - if (signal_name) { - formatter.AppendString(signal_name); - } else { - // Use the signal number if the name is unknown. The signal name - // should be known, but just in case. - formatter.AppendString("Signal "); - formatter.AppendUint64(signal_number, 10); - } - formatter.AppendString(" (@0x"); - formatter.AppendUint64(reinterpret_cast(siginfo->si_addr), 16); - formatter.AppendString(")"); - formatter.AppendString(" received by PID "); - formatter.AppendUint64(getpid(), 10); - formatter.AppendString(" (TID 0x"); - // We assume pthread_t is an integral number or a pointer, rather - // than a complex struct. In some environments, pthread_self() - // returns an uint64 but in some other environments pthread_self() - // returns a pointer. Hence we use C-style cast here, rather than - // reinterpret/static_cast, to support both types of environments. - formatter.AppendUint64((uintptr_t)pthread_self(), 16); - formatter.AppendString(") "); - // Only linux has the PID of the signal sender in si_pid. -#ifdef OS_LINUX - formatter.AppendString("from PID "); - formatter.AppendUint64(siginfo->si_pid, 10); - formatter.AppendString("; "); -#endif - formatter.AppendString("stack trace: ***\n"); - g_failure_writer(buf, formatter.num_bytes_written()); -} - -// Dumps information about the stack frame to STDERR. -void DumpStackFrameInfo(const char* prefix, void* pc) { - // Get the symbol name. - const char *symbol = "(unknown)"; - char symbolized[1024]; // Big enough for a sane symbol. - // Symbolizes the previous address of pc because pc may be in the - // next function. - if (Symbolize(reinterpret_cast(pc) - 1, - symbolized, sizeof(symbolized))) { - symbol = symbolized; - } - - char buf[1024]; // Big enough for stack frame info. - MinimalFormatter formatter(buf, sizeof(buf)); - - formatter.AppendString(prefix); - formatter.AppendString("@ "); - const int width = 2 * sizeof(void*) + 2; // + 2 for "0x". - formatter.AppendHexWithPadding(reinterpret_cast(pc), width); - formatter.AppendString(" "); - formatter.AppendString(symbol); - formatter.AppendString("\n"); - g_failure_writer(buf, formatter.num_bytes_written()); -} - -// Invoke the default signal handler. -void InvokeDefaultSignalHandler(int signal_number) { - struct sigaction sig_action; - memset(&sig_action, 0, sizeof(sig_action)); - sigemptyset(&sig_action.sa_mask); - sig_action.sa_handler = SIG_DFL; - sigaction(signal_number, &sig_action, NULL); - kill(getpid(), signal_number); -} - -// This variable is used for protecting FailureSignalHandler() from -// dumping stuff while another thread is doing it. Our policy is to let -// the first thread dump stuff and let other threads wait. -// See also comments in FailureSignalHandler(). -static pthread_t* g_entered_thread_id_pointer = NULL; - -// Dumps signal and stack frame information, and invokes the default -// signal handler once our job is done. -void FailureSignalHandler(int signal_number, - siginfo_t *signal_info, - void *ucontext) { - // First check if we've already entered the function. We use an atomic - // compare and swap operation for platforms that support it. For other - // platforms, we use a naive method that could lead to a subtle race. - - // We assume pthread_self() is async signal safe, though it's not - // officially guaranteed. - pthread_t my_thread_id = pthread_self(); - // NOTE: We could simply use pthread_t rather than pthread_t* for this, - // if pthread_self() is guaranteed to return non-zero value for thread - // ids, but there is no such guarantee. We need to distinguish if the - // old value (value returned from __sync_val_compare_and_swap) is - // different from the original value (in this case NULL). - pthread_t* old_thread_id_pointer = - glog_internal_namespace_::sync_val_compare_and_swap( - &g_entered_thread_id_pointer, - static_cast(NULL), - &my_thread_id); - if (old_thread_id_pointer != NULL) { - // We've already entered the signal handler. What should we do? - if (pthread_equal(my_thread_id, *g_entered_thread_id_pointer)) { - // It looks the current thread is reentering the signal handler. - // Something must be going wrong (maybe we are reentering by another - // type of signal?). Kill ourself by the default signal handler. - InvokeDefaultSignalHandler(signal_number); - } - // Another thread is dumping stuff. Let's wait until that thread - // finishes the job and kills the process. - while (true) { - sleep(1); - } - } - // This is the first time we enter the signal handler. We are going to - // do some interesting stuff from here. - // TODO(satorux): We might want to set timeout here using alarm(), but - // mixing alarm() and sleep() can be a bad idea. - - // First dump time info. - DumpTimeInfo(); - - // Get the program counter from ucontext. - void *pc = GetPC(ucontext); - DumpStackFrameInfo("PC: ", pc); - -#ifdef HAVE_STACKTRACE - // Get the stack traces. - void *stack[32]; - // +1 to exclude this function. - const int depth = GetStackTrace(stack, ARRAYSIZE(stack), 1); - DumpSignalInfo(signal_number, signal_info); - // Dump the stack traces. - for (int i = 0; i < depth; ++i) { - DumpStackFrameInfo(" ", stack[i]); - } -#endif - - // *** TRANSITION *** - // - // BEFORE this point, all code must be async-termination-safe! - // (See WARNING above.) - // - // AFTER this point, we do unsafe things, like using LOG()! - // The process could be terminated or hung at any time. We try to - // do more useful things first and riskier things later. - - // Flush the logs before we do anything in case 'anything' - // causes problems. - FlushLogFilesUnsafe(0); - - // Kill ourself by the default signal handler. - InvokeDefaultSignalHandler(signal_number); -} - -} // namespace - -void InstallFailureSignalHandler() { - // Build the sigaction struct. - struct sigaction sig_action; - memset(&sig_action, 0, sizeof(sig_action)); - sigemptyset(&sig_action.sa_mask); - sig_action.sa_flags |= SA_SIGINFO; - sig_action.sa_sigaction = &FailureSignalHandler; - - for (int i = 0; i < ARRAYSIZE(kFailureSignals); ++i) { - CHECK_ERR(sigaction(kFailureSignals[i].number, &sig_action, NULL)); - } -} - -void InstallFailureWriter(void (*writer)(const char* data, int size)) { - g_failure_writer = writer; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.cc deleted file mode 100644 index 5493e52e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.cc +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// This is a helper binary for testing signalhandler.cc. The actual test -// is done in signalhandler_unittest.sh. - -#include "utilities.h" - -#include -#include -#include -#include -#include -#include "glog/logging.h" - -using namespace GOOGLE_NAMESPACE; - -void* DieInThread(void*) { - // We assume pthread_t is an integral number or a pointer, rather - // than a complex struct. In some environments, pthread_self() - // returns an uint64 but in some other environments pthread_self() - // returns a pointer. Hence we use C-style cast here, rather than - // reinterpret/static_cast, to support both types of environments. - fprintf(stderr, "0x%lx is dying\n", (long)pthread_self()); - // Use volatile to prevent from these to be optimized away. - volatile int a = 0; - volatile int b = 1 / a; - fprintf(stderr, "We should have died: b=%d\n", b); - return NULL; -} - -void WriteToStdout(const char* data, int size) { - write(STDOUT_FILENO, data, size); -} - -int main(int argc, char **argv) { -#if defined(HAVE_STACKTRACE) && defined(HAVE_SYMBOLIZE) - InitGoogleLogging(argv[0]); -#ifdef HAVE_LIB_GFLAGS - ParseCommandLineFlags(&argc, &argv, true); -#endif - InstallFailureSignalHandler(); - const std::string command = argc > 1 ? argv[1] : "none"; - if (command == "segv") { - // We'll check if this is outputted. - LOG(INFO) << "create the log file"; - LOG(INFO) << "a message before segv"; - // We assume 0xDEAD is not writable. - int *a = (int*)0xDEAD; - *a = 0; - } else if (command == "loop") { - fprintf(stderr, "looping\n"); - while (true); - } else if (command == "die_in_thread") { - pthread_t thread; - pthread_create(&thread, NULL, &DieInThread, NULL); - pthread_join(thread, NULL); - } else if (command == "dump_to_stdout") { - InstallFailureWriter(WriteToStdout); - abort(); - } else { - // Tell the shell script - puts("OK"); - } -#endif - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.sh deleted file mode 100755 index 3b57b05d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/signalhandler_unittest.sh +++ /dev/null @@ -1,131 +0,0 @@ -#! /bin/sh -# -# Copyright (c) 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: Satoru Takabayashi -# -# Unit tests for signalhandler.cc. - -die () { - echo $1 - exit 1 -} - -BINDIR=".libs" -LIBGLOG="$BINDIR/libglog.so" - -BINARY="$BINDIR/signalhandler_unittest" -LOG_INFO="./signalhandler_unittest.INFO" - -# Remove temporary files. -rm -f signalhandler.out* - -if test -e "$BINARY"; then - # We need shared object. - export LD_LIBRARY_PATH=$BINDIR - export DYLD_LIBRARY_PATH=$BINDIR -else - # For windows - BINARY="./signalhandler_unittest.exe" - if ! test -e "$BINARY"; then - echo "We coundn't find demangle_unittest binary." - exit 1 - fi -fi - -if [ x`$BINARY` != 'xOK' ]; then - echo "PASS (No stacktrace support. We don't run this test.)" - exit 0 -fi - -# The PC cannot be obtained in signal handlers on PowerPC correctly. -# We just skip the test for PowerPC. -if [ x`uname -p` = x"powerpc" ]; then - echo "PASS (We don't test the signal handler on PowerPC.)" - exit 0 -fi - -# Test for a case the program kills itself by SIGSEGV. -GOOGLE_LOG_DIR=. $BINARY segv 2> signalhandler.out1 -for pattern in SIGSEGV 0xdead main "Aborted at [0-9]"; do - if ! grep --quiet "$pattern" signalhandler.out1; then - die "'$pattern' should appear in the output" - fi -done -if ! grep --quiet "a message before segv" $LOG_INFO; then - die "'a message before segv' should appear in the INFO log" -fi -rm -f $LOG_INFO - -# Test for a case the program is killed by this shell script. -# $! = the process id of the last command run in the background. -# $$ = the process id of this shell. -$BINARY loop 2> signalhandler.out2 & -# Wait until "looping" is written in the file. This indicates the program -# is ready to accept signals. -while true; do - if grep --quiet looping signalhandler.out2; then - break - fi -done -kill -TERM $! -wait $! - -from_pid='' -# Only linux has the process ID of the signal sender. -if [ x`uname` = "xLinux" ]; then - from_pid="from PID $$" -fi -for pattern in SIGTERM "by PID $!" "$from_pid" main "Aborted at [0-9]"; do - if ! grep --quiet "$pattern" signalhandler.out2; then - die "'$pattern' should appear in the output" - fi -done - -# Test for a case the program dies in a non-main thread. -$BINARY die_in_thread 2> signalhandler.out3 -EXPECTED_TID="`sed 's/ .*//' signalhandler.out3`" - -for pattern in SIGFPE DieInThread "TID $EXPECTED_TID" "Aborted at [0-9]"; do - if ! grep --quiet "$pattern" signalhandler.out3; then - die "'$pattern' should appear in the output" - fi -done - -# Test for a case the program installs a custom failure writer that writes -# stuff to stdout instead of stderr. -$BINARY dump_to_stdout 1> signalhandler.out4 -for pattern in SIGABRT main "Aborted at [0-9]"; do - if ! grep --quiet "$pattern" signalhandler.out4; then - die "'$pattern' should appear in the output" - fi -done - -echo PASS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace.h deleted file mode 100644 index 8c3e8fe8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2000 - 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Routines to extract the current stack trace. These functions are -// thread-safe. - -#ifndef BASE_STACKTRACE_H_ -#define BASE_STACKTRACE_H_ - -#include "config.h" - -_START_GOOGLE_NAMESPACE_ - -// This is similar to the GetStackFrames routine, except that it returns -// the stack trace only, and not the stack frame sizes as well. -// Example: -// main() { foo(); } -// foo() { bar(); } -// bar() { -// void* result[10]; -// int depth = GetStackFrames(result, 10, 1); -// } -// -// This produces: -// result[0] foo -// result[1] main -// .... ... -// -// "result" must not be NULL. -extern int GetStackTrace(void** result, int max_depth, int skip_count); - -_END_GOOGLE_NAMESPACE_ - -#endif // BASE_STACKTRACE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_generic-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_generic-inl.h deleted file mode 100644 index fad81d3e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_generic-inl.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2000 - 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Portable implementation - just use glibc -// -// Note: The glibc implementation may cause a call to malloc. -// This can cause a deadlock in HeapProfiler. -#include -#include -#include "stacktrace.h" - -_START_GOOGLE_NAMESPACE_ - -// If you change this function, also change GetStackFrames below. -int GetStackTrace(void** result, int max_depth, int skip_count) { - static const int kStackLength = 64; - void * stack[kStackLength]; - int size; - - size = backtrace(stack, kStackLength); - skip_count++; // we want to skip the current frame as well - int result_count = size - skip_count; - if (result_count < 0) - result_count = 0; - if (result_count > max_depth) - result_count = max_depth; - for (int i = 0; i < result_count; i++) - result[i] = stack[i + skip_count]; - - return result_count; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_libunwind-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_libunwind-inl.h deleted file mode 100644 index 0dc14c65..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_libunwind-inl.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2005 - 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Arun Sharma -// -// Produce stack trace using libunwind - -#include "utilities.h" - -extern "C" { -#define UNW_LOCAL_ONLY -#include -} -#include "glog/raw_logging.h" -#include "stacktrace.h" - -_START_GOOGLE_NAMESPACE_ - -// Sometimes, we can try to get a stack trace from within a stack -// trace, because libunwind can call mmap (maybe indirectly via an -// internal mmap based memory allocator), and that mmap gets trapped -// and causes a stack-trace request. If were to try to honor that -// recursive request, we'd end up with infinite recursion or deadlock. -// Luckily, it's safe to ignore those subsequent traces. In such -// cases, we return 0 to indicate the situation. -static bool g_now_entering = false; - -// If you change this function, also change GetStackFrames below. -int GetStackTrace(void** result, int max_depth, int skip_count) { - void *ip; - int n = 0; - unw_cursor_t cursor; - unw_context_t uc; - - if (sync_val_compare_and_swap(&g_now_entering, false, true)) { - return 0; - } - - unw_getcontext(&uc); - RAW_CHECK(unw_init_local(&cursor, &uc) >= 0, "unw_init_local failed"); - skip_count++; // Do not include the "GetStackTrace" frame - - while (n < max_depth) { - int ret = unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t *) &ip); - if (ret < 0) - break; - if (skip_count > 0) { - skip_count--; - } else { - result[n++] = ip; - } - ret = unw_step(&cursor); - if (ret <= 0) - break; - } - - g_now_entering = false; - return n; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_powerpc-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_powerpc-inl.h deleted file mode 100644 index 1090dded..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_powerpc-inl.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Craig Silverstein -// -// Produce stack trace. I'm guessing (hoping!) the code is much like -// for x86. For apple machines, at least, it seems to be; see -// http://developer.apple.com/documentation/mac/runtimehtml/RTArch-59.html -// http://www.linux-foundation.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#STACK -// Linux has similar code: http://patchwork.ozlabs.org/linuxppc/patch?id=8882 - -#include -#include // for uintptr_t -#include "stacktrace.h" - -_START_GOOGLE_NAMESPACE_ - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return NULL if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -static void **NextStackFrame(void **old_sp) { - void **new_sp = (void **) *old_sp; - - // Check that the transition from frame pointer old_sp to frame - // pointer new_sp isn't clearly bogus - if (STRICT_UNWINDING) { - // With the stack growing downwards, older stack frame must be - // at a greater address that the current one. - if (new_sp <= old_sp) return NULL; - // Assume stack frames larger than 100,000 bytes are bogus. - if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return NULL; - } else { - // In the non-strict mode, allow discontiguous stack frames. - // (alternate-signal-stacks for example). - if (new_sp == old_sp) return NULL; - // And allow frames upto about 1MB. - if ((new_sp > old_sp) - && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return NULL; - } - if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return NULL; - return new_sp; -} - -// This ensures that GetStackTrace stes up the Link Register properly. -void StacktracePowerPCDummyFunction() __attribute__((noinline)); -void StacktracePowerPCDummyFunction() { __asm__ volatile(""); } - -// If you change this function, also change GetStackFrames below. -int GetStackTrace(void** result, int max_depth, int skip_count) { - void **sp; - // Apple OS X uses an old version of gnu as -- both Darwin 7.9.0 (Panther) - // and Darwin 8.8.1 (Tiger) use as 1.38. This means we have to use a - // different asm syntax. I don't know quite the best way to discriminate - // systems using the old as from the new one; I've gone with __APPLE__. -#ifdef __APPLE__ - __asm__ volatile ("mr %0,r1" : "=r" (sp)); -#else - __asm__ volatile ("mr %0,1" : "=r" (sp)); -#endif - - // On PowerPC, the "Link Register" or "Link Record" (LR), is a stack - // entry that holds the return address of the subroutine call (what - // instruction we run after our function finishes). This is the - // same as the stack-pointer of our parent routine, which is what we - // want here. While the compiler will always(?) set up LR for - // subroutine calls, it may not for leaf functions (such as this one). - // This routine forces the compiler (at least gcc) to push it anyway. - StacktracePowerPCDummyFunction(); - - // The LR save area is used by the callee, so the top entry is bogus. - skip_count++; - - int n = 0; - while (sp && n < max_depth) { - if (skip_count > 0) { - skip_count--; - } else { - // PowerPC has 3 main ABIs, which say where in the stack the - // Link Register is. For DARWIN and AIX (used by apple and - // linux ppc64), it's in sp[2]. For SYSV (used by linux ppc), - // it's in sp[1]. -#if defined(_CALL_AIX) || defined(_CALL_DARWIN) - result[n++] = *(sp+2); -#elif defined(_CALL_SYSV) - result[n++] = *(sp+1); -#elif defined(__APPLE__) || (defined(__linux) && defined(__PPC64__)) - // This check is in case the compiler doesn't define _CALL_AIX/etc. - result[n++] = *(sp+2); -#elif defined(__linux) - // This check is in case the compiler doesn't define _CALL_SYSV. - result[n++] = *(sp+1); -#else -#error Need to specify the PPC ABI for your archiecture. -#endif - } - // Use strict unwinding rules. - sp = NextStackFrame(sp); - } - return n; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_unittest.cc deleted file mode 100644 index 0acd2c9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_unittest.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2004, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "utilities.h" - -#include -#include -#include "config.h" -#include "base/commandlineflags.h" -#include "glog/logging.h" -#include "stacktrace.h" - -#ifdef HAVE_EXECINFO_H -# include -#endif - -using namespace GOOGLE_NAMESPACE; - -#ifdef HAVE_STACKTRACE - -// Obtain a backtrace, verify that the expected callers are present in the -// backtrace, and maybe print the backtrace to stdout. - -//-----------------------------------------------------------------------// -void CheckStackTraceLeaf(); -void CheckStackTrace4(int i); -void CheckStackTrace3(int i); -void CheckStackTrace2(int i); -void CheckStackTrace1(int i); -void CheckStackTrace(int i); -//-----------------------------------------------------------------------// - -// The sequence of functions whose return addresses we expect to see in the -// backtrace. -const int BACKTRACE_STEPS = 6; -void * expected_stack[BACKTRACE_STEPS] = { - (void *) &CheckStackTraceLeaf, - (void *) &CheckStackTrace4, - (void *) &CheckStackTrace3, - (void *) &CheckStackTrace2, - (void *) &CheckStackTrace1, - (void *) &CheckStackTrace, -}; - -// Depending on the architecture/compiler/libraries, (not sure which) -// the current function may or may not appear in the backtrace. -// For gcc-2: -// -// stack[0] is ret addr within CheckStackTrace4 -// stack[1] is ret addr within CheckStackTrace3 -// stack[2] is ret addr within CheckStackTrace2 -// stack[3] is ret addr within CheckStackTrace1 -// stack[4] is ret addr within CheckStackTrace -// -// For gcc3-k8: -// -// stack[0] is ret addr within CheckStackTraceLeaf -// stack[1] is ret addr within CheckStackTrace4 -// ... -// stack[5] is ret addr within CheckStackTrace - -//-----------------------------------------------------------------------// - -const int kMaxFnLen = 0x40; // assume relevant functions are only this long - -void CheckRetAddrIsInFunction( void * ret_addr, void * function_start_addr) -{ - CHECK_GE(ret_addr, function_start_addr); - CHECK_LE(ret_addr, (void *) ((char *) function_start_addr + kMaxFnLen)); -} - -//-----------------------------------------------------------------------// - -void CheckStackTraceLeaf(void) { - const int STACK_LEN = 10; - void *stack[STACK_LEN]; - int size; - - size = GetStackTrace(stack, STACK_LEN, 0); - printf("Obtained %d stack frames.\n", size); - CHECK_LE(size, STACK_LEN); - - if (1) { -#ifdef HAVE_EXECINFO_H - char **strings = backtrace_symbols(stack, size); - printf("Obtained %d stack frames.\n", size); - for (int i = 0; i < size; i++) - printf("%s %p\n", strings[i], stack[i]); - printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); - free(strings); -#endif - } - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_stack[i], - reinterpret_cast(expected_stack[i]) + kMaxFnLen, stack[i]); - CheckRetAddrIsInFunction(stack[i], expected_stack[i]); - printf("OK\n"); - } - - // Check if the second stacktrace returns the same size. - CHECK_EQ(size, GetStackTrace(stack, STACK_LEN, 0)); -} - -//-----------------------------------------------------------------------// - -/* Dummy functions to make the backtrace more interesting. */ -void CheckStackTrace4(int i) { for (int j = i; j >= 0; j--) CheckStackTraceLeaf(); } -void CheckStackTrace3(int i) { for (int j = i; j >= 0; j--) CheckStackTrace4(j); } -void CheckStackTrace2(int i) { for (int j = i; j >= 0; j--) CheckStackTrace3(j); } -void CheckStackTrace1(int i) { for (int j = i; j >= 0; j--) CheckStackTrace2(j); } -void CheckStackTrace(int i) { for (int j = i; j >= 0; j--) CheckStackTrace1(j); } - -//-----------------------------------------------------------------------// - -int main(int argc, char ** argv) { - FLAGS_logtostderr = true; - InitGoogleLogging(argv[0]); - - CheckStackTrace(0); - - printf("PASS\n"); - return 0; -} - -#else -int main() { - printf("PASS (no stacktrace support)\n"); - return 0; -} -#endif // HAVE_STACKTRACE diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86-inl.h deleted file mode 100644 index cfd31f78..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86-inl.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2000 - 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Produce stack trace - -#include // for uintptr_t - -#include "utilities.h" // for OS_* macros - -#if !defined(OS_WINDOWS) -#include -#include -#endif - -#include // for NULL -#include "stacktrace.h" - -_START_GOOGLE_NAMESPACE_ - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return NULL if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -static void **NextStackFrame(void **old_sp) { - void **new_sp = (void **) *old_sp; - - // Check that the transition from frame pointer old_sp to frame - // pointer new_sp isn't clearly bogus - if (STRICT_UNWINDING) { - // With the stack growing downwards, older stack frame must be - // at a greater address that the current one. - if (new_sp <= old_sp) return NULL; - // Assume stack frames larger than 100,000 bytes are bogus. - if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return NULL; - } else { - // In the non-strict mode, allow discontiguous stack frames. - // (alternate-signal-stacks for example). - if (new_sp == old_sp) return NULL; - // And allow frames upto about 1MB. - if ((new_sp > old_sp) - && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return NULL; - } - if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return NULL; -#ifdef __i386__ - // On 64-bit machines, the stack pointer can be very close to - // 0xffffffff, so we explicitly check for a pointer into the - // last two pages in the address space - if ((uintptr_t)new_sp >= 0xffffe000) return NULL; -#endif -#if !defined(OS_WINDOWS) - if (!STRICT_UNWINDING) { - // Lax sanity checks cause a crash in 32-bit tcmalloc/crash_reason_test - // on AMD-based machines with VDSO-enabled kernels. - // Make an extra sanity check to insure new_sp is readable. - // Note: NextStackFrame() is only called while the program - // is already on its last leg, so it's ok to be slow here. - static int page_size = getpagesize(); - void *new_sp_aligned = (void *)((uintptr_t)new_sp & ~(page_size - 1)); - if (msync(new_sp_aligned, page_size, MS_ASYNC) == -1) - return NULL; - } -#endif - return new_sp; -} - -// If you change this function, also change GetStackFrames below. -int GetStackTrace(void** result, int max_depth, int skip_count) { - void **sp; -#ifdef __i386__ - // Stack frame format: - // sp[0] pointer to previous frame - // sp[1] caller address - // sp[2] first argument - // ... - sp = (void **)&result - 2; -#endif - -#ifdef __x86_64__ - // __builtin_frame_address(0) can return the wrong address on gcc-4.1.0-k8 - unsigned long rbp; - // Move the value of the register %rbp into the local variable rbp. - // We need 'volatile' to prevent this instruction from getting moved - // around during optimization to before function prologue is done. - // An alternative way to achieve this - // would be (before this __asm__ instruction) to call Noop() defined as - // static void Noop() __attribute__ ((noinline)); // prevent inlining - // static void Noop() { asm(""); } // prevent optimizing-away - __asm__ volatile ("mov %%rbp, %0" : "=r" (rbp)); - // Arguments are passed in registers on x86-64, so we can't just - // offset from &result - sp = (void **) rbp; -#endif - - int n = 0; - while (sp && n < max_depth) { - if (*(sp+1) == (void *)0) { - // In 64-bit code, we often see a frame that - // points to itself and has a return address of 0. - break; - } - if (skip_count > 0) { - skip_count--; - } else { - result[n++] = *(sp+1); - } - // Use strict unwinding rules. - sp = NextStackFrame(sp); - } - return n; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86_64-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86_64-inl.h deleted file mode 100644 index f7d1dca8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stacktrace_x86_64-inl.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2005 - 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Arun Sharma -// -// Produce stack trace using libgcc - -extern "C" { -#include // for NULL -#include // ABI defined unwinder -} -#include "stacktrace.h" - -_START_GOOGLE_NAMESPACE_ - -typedef struct { - void **result; - int max_depth; - int skip_count; - int count; -} trace_arg_t; - - -// Workaround for the malloc() in _Unwind_Backtrace() issue. -static _Unwind_Reason_Code nop_backtrace(struct _Unwind_Context *uc, void *opq) { - return _URC_NO_REASON; -} - - -// This code is not considered ready to run until -// static initializers run so that we are guaranteed -// that any malloc-related initialization is done. -static bool ready_to_run = false; -class StackTraceInit { - public: - StackTraceInit() { - // Extra call to force initialization - _Unwind_Backtrace(nop_backtrace, NULL); - ready_to_run = true; - } -}; - -static StackTraceInit module_initializer; // Force initialization - -static _Unwind_Reason_Code GetOneFrame(struct _Unwind_Context *uc, void *opq) { - trace_arg_t *targ = (trace_arg_t *) opq; - - if (targ->skip_count > 0) { - targ->skip_count--; - } else { - targ->result[targ->count++] = (void *) _Unwind_GetIP(uc); - } - - if (targ->count == targ->max_depth) - return _URC_END_OF_STACK; - - return _URC_NO_REASON; -} - -// If you change this function, also change GetStackFrames below. -int GetStackTrace(void** result, int max_depth, int skip_count) { - if (!ready_to_run) - return 0; - - trace_arg_t targ; - - skip_count += 1; // Do not include the "GetStackTrace" frame - - targ.result = result; - targ.max_depth = max_depth; - targ.skip_count = skip_count; - targ.count = 0; - - _Unwind_Backtrace(GetOneFrame, &targ); - - return targ.count; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stl_logging_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stl_logging_unittest.cc deleted file mode 100644 index 0ed4695d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/stl_logging_unittest.cc +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 2003, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "utilities.h" -#include "config.h" - -#ifdef HAVE_USING_OPERATOR - -#include "glog/stl_logging.h" - -#include -#include -#include -#include -#include - -#ifdef __GNUC__ -# include -# include -#endif - -#include "glog/logging.h" -#include "googletest.h" - -using namespace std; -#ifdef __GNUC__ -using namespace __gnu_cxx; -#endif - -struct user_hash { - size_t operator()(int x) const { return x; } -}; - -void TestSTLLogging() { - { - // Test a sequence. - vector v; - v.push_back(10); - v.push_back(20); - v.push_back(30); - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - // Just ostrstream s1; leaks heap. - ss << v << ends; - CHECK_STREQ(ss.str(), "10 20 30"); - vector copied_v(v); - CHECK_EQ(v, copied_v); // This must compile. - } - - { - // Test a sorted pair associative container. - map< int, string > m; - m[20] = "twenty"; - m[10] = "ten"; - m[30] = "thirty"; - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << m << ends; - CHECK_STREQ(ss.str(), "(10, ten) (20, twenty) (30, thirty)"); - map< int, string > copied_m(m); - CHECK_EQ(m, copied_m); // This must compile. - } - -#ifdef __GNUC__ - { - // Test a hashed simple associative container. - hash_set hs; - hs.insert(10); - hs.insert(20); - hs.insert(30); - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << hs << ends; - CHECK_STREQ(ss.str(), "10 20 30"); - hash_set copied_hs(hs); - CHECK_EQ(hs, copied_hs); // This must compile. - } -#endif - -#ifdef __GNUC__ - { - // Test a hashed pair associative container. - hash_map hm; - hm[10] = "ten"; - hm[20] = "twenty"; - hm[30] = "thirty"; - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << hm << ends; - CHECK_STREQ(ss.str(), "(10, ten) (20, twenty) (30, thirty)"); - hash_map copied_hm(hm); - CHECK_EQ(hm, copied_hm); // this must compile - } -#endif - - { - // Test a long sequence. - vector v; - string expected; - for (int i = 0; i < 100; i++) { - v.push_back(i); - if (i > 0) expected += ' '; - char buf[256]; - sprintf(buf, "%d", i); - expected += buf; - } - v.push_back(100); - expected += " ..."; - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << v << ends; - CHECK_STREQ(ss.str(), expected.c_str()); - } - - { - // Test a sorted pair associative container. - // Use a non-default comparison functor. - map< int, string, greater > m; - m[20] = "twenty"; - m[10] = "ten"; - m[30] = "thirty"; - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << m << ends; - CHECK_STREQ(ss.str(), "(30, thirty) (20, twenty) (10, ten)"); - map< int, string, greater > copied_m(m); - CHECK_EQ(m, copied_m); // This must compile. - } - -#ifdef __GNUC__ - { - // Test a hashed simple associative container. - // Use a user defined hash function. - hash_set hs; - hs.insert(10); - hs.insert(20); - hs.insert(30); - char ss_buf[1000]; - ostrstream ss(ss_buf, sizeof(ss_buf)); - ss << hs << ends; - CHECK_STREQ(ss.str(), "10 20 30"); - hash_set copied_hs(hs); - CHECK_EQ(hs, copied_hs); // This must compile. - } -#endif -} - -int main(int argc, char** argv) { - TestSTLLogging(); - std::cout << "PASS\n"; - return 0; -} - -#else - -#include - -int main(int argc, char** argv) { - std::cout << "We don't support stl_logging for this compiler.\n" - << "(we need compiler support of 'using ::operator<<' " - << "for this feature.)\n"; - return 0; -} - -#endif // HAVE_USING_OPERATOR diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.cc deleted file mode 100644 index 3465de6c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.cc +++ /dev/null @@ -1,681 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// Stack-footprint reduction work done by Raksit Ashok -// -// Implementation note: -// -// We don't use heaps but only use stacks. We want to reduce the -// stack consumption so that the symbolizer can run on small stacks. -// -// Here are some numbers collected with GCC 4.1.0 on x86: -// - sizeof(Elf32_Sym) = 16 -// - sizeof(Elf32_Shdr) = 40 -// - sizeof(Elf64_Sym) = 24 -// - sizeof(Elf64_Shdr) = 64 -// -// This implementation is intended to be async-signal-safe but uses -// some functions which are not guaranteed to be so, such as memchr() -// and memmove(). We assume they are async-signal-safe. -// - -#include "utilities.h" - -#if defined(HAVE_SYMBOLIZE) - -#include - -#include "symbolize.h" -#include "demangle.h" - -_START_GOOGLE_NAMESPACE_ - -// We don't use assert() since it's not guaranteed to be -// async-signal-safe. Instead we define a minimal assertion -// macro. So far, we don't need pretty printing for __FILE__, etc. - -// A wrapper for abort() to make it callable in ? :. -static int AssertFail() { - abort(); - return 0; // Should not reach. -} - -#define SAFE_ASSERT(expr) ((expr) ? 0 : AssertFail()) - -static SymbolizeCallback g_symbolize_callback = NULL; -void InstallSymbolizeCallback(SymbolizeCallback callback) { - g_symbolize_callback = callback; -} - -// This function wraps the Demangle function to provide an interface -// where the input symbol is demangled in-place. -// To keep stack consumption low, we would like this function to not -// get inlined. -static ATTRIBUTE_NOINLINE void DemangleInplace(char *out, int out_size) { - char demangled[256]; // Big enough for sane demangled symbols. - if (Demangle(out, demangled, sizeof(demangled))) { - // Demangling succeeded. Copy to out if the space allows. - int len = strlen(demangled); - if (len + 1 <= out_size) { // +1 for '\0'. - SAFE_ASSERT(len < sizeof(demangled)); - memmove(out, demangled, len + 1); - } - } -} - -_END_GOOGLE_NAMESPACE_ - -#if defined(__ELF__) - -#include -#include -#include -#include -#include -#include // For ElfW() macro. -#include -#include -#include -#include -#include -#include -#include -#include - -#include "symbolize.h" -#include "config.h" -#include "glog/raw_logging.h" - -// Re-runs fn until it doesn't cause EINTR. -#define NO_INTR(fn) do {} while ((fn) < 0 && errno == EINTR) - -_START_GOOGLE_NAMESPACE_ - -// Read up to "count" bytes from file descriptor "fd" into the buffer -// starting at "buf" while handling short reads and EINTR. On -// success, return the number of bytes read. Otherwise, return -1. -static ssize_t ReadPersistent(const int fd, void *buf, const size_t count) { - SAFE_ASSERT(fd >= 0); - SAFE_ASSERT(count >= 0 && count <= std::numeric_limits::max()); - char *buf0 = reinterpret_cast(buf); - ssize_t num_bytes = 0; - while (num_bytes < count) { - ssize_t len; - NO_INTR(len = read(fd, buf0 + num_bytes, count - num_bytes)); - if (len < 0) { // There was an error other than EINTR. - return -1; - } - if (len == 0) { // Reached EOF. - break; - } - num_bytes += len; - } - SAFE_ASSERT(num_bytes <= count); - return num_bytes; -} - -// Read up to "count" bytes from "offset" in the file pointed by file -// descriptor "fd" into the buffer starting at "buf". On success, -// return the number of bytes read. Otherwise, return -1. -static ssize_t ReadFromOffset(const int fd, void *buf, - const size_t count, const off_t offset) { - off_t off = lseek(fd, offset, SEEK_SET); - if (off == (off_t)-1) { - return -1; - } - return ReadPersistent(fd, buf, count); -} - -// Try reading exactly "count" bytes from "offset" bytes in a file -// pointed by "fd" into the buffer starting at "buf" while handling -// short reads and EINTR. On success, return true. Otherwise, return -// false. -static bool ReadFromOffsetExact(const int fd, void *buf, - const size_t count, const off_t offset) { - ssize_t len = ReadFromOffset(fd, buf, count, offset); - return len == count; -} - -// Returns elf_header.e_type if the file pointed by fd is an ELF binary. -static int FileGetElfType(const int fd) { - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return -1; - } - if (memcmp(elf_header.e_ident, ELFMAG, SELFMAG) != 0) { - return -1; - } - return elf_header.e_type; -} - -// Read the section headers in the given ELF binary, and if a section -// of the specified type is found, set the output to this section header -// and return true. Otherwise, return false. -// To keep stack consumption low, we would like this function to not get -// inlined. -static ATTRIBUTE_NOINLINE bool -GetSectionHeaderByType(const int fd, ElfW(Half) sh_num, const off_t sh_offset, - ElfW(Word) type, ElfW(Shdr) *out) { - // Read at most 16 section headers at a time to save read calls. - ElfW(Shdr) buf[16]; - for (int i = 0; i < sh_num;) { - const ssize_t num_bytes_left = (sh_num - i) * sizeof(buf[0]); - const ssize_t num_bytes_to_read = - (sizeof(buf) > num_bytes_left) ? num_bytes_left : sizeof(buf); - const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read, - sh_offset + i * sizeof(buf[0])); - SAFE_ASSERT(len % sizeof(buf[0]) == 0); - const ssize_t num_headers_in_buf = len / sizeof(buf[0]); - SAFE_ASSERT(num_headers_in_buf <= sizeof(buf) / sizeof(buf[0])); - for (int j = 0; j < num_headers_in_buf; ++j) { - if (buf[j].sh_type == type) { - *out = buf[j]; - return true; - } - } - i += num_headers_in_buf; - } - return false; -} - -// There is no particular reason to limit section name to 63 characters, -// but there has (as yet) been no need for anything longer either. -const int kMaxSectionNameLen = 64; - -// name_len should include terminating '\0'. -bool GetSectionHeaderByName(int fd, const char *name, size_t name_len, - ElfW(Shdr) *out) { - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return false; - } - - ElfW(Shdr) shstrtab; - off_t shstrtab_offset = (elf_header.e_shoff + - elf_header.e_shentsize * elf_header.e_shstrndx); - if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) { - return false; - } - - for (int i = 0; i < elf_header.e_shnum; ++i) { - off_t section_header_offset = (elf_header.e_shoff + - elf_header.e_shentsize * i); - if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) { - return false; - } - char header_name[kMaxSectionNameLen]; - if (sizeof(header_name) < name_len) { - RAW_LOG(WARNING, "Section name '%s' is too long (%"PRIuS"); " - "section will not be found (even if present).", name, name_len); - // No point in even trying. - return false; - } - off_t name_offset = shstrtab.sh_offset + out->sh_name; - ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset); - if (n_read == -1) { - return false; - } else if (n_read != name_len) { - // Short read -- name could be at end of file. - continue; - } - if (memcmp(header_name, name, name_len) == 0) { - return true; - } - } - return false; -} - -// Read a symbol table and look for the symbol containing the -// pc. Iterate over symbols in a symbol table and look for the symbol -// containing "pc". On success, return true and write the symbol name -// to out. Otherwise, return false. -// To keep stack consumption low, we would like this function to not get -// inlined. -static ATTRIBUTE_NOINLINE bool -FindSymbol(uint64_t pc, const int fd, char *out, int out_size, - uint64_t symbol_offset, const ElfW(Shdr) *strtab, - const ElfW(Shdr) *symtab) { - if (symtab == NULL) { - return false; - } - const int num_symbols = symtab->sh_size / symtab->sh_entsize; - for (int i = 0; i < num_symbols;) { - off_t offset = symtab->sh_offset + i * symtab->sh_entsize; - - // If we are reading Elf64_Sym's, we want to limit this array to - // 32 elements (to keep stack consumption low), otherwise we can - // have a 64 element Elf32_Sym array. -#if __WORDSIZE == 64 -#define NUM_SYMBOLS 32 -#else -#define NUM_SYMBOLS 64 -#endif - - // Read at most NUM_SYMBOLS symbols at once to save read() calls. - ElfW(Sym) buf[NUM_SYMBOLS]; - const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf), offset); - SAFE_ASSERT(len % sizeof(buf[0]) == 0); - const ssize_t num_symbols_in_buf = len / sizeof(buf[0]); - SAFE_ASSERT(num_symbols_in_buf <= sizeof(buf)/sizeof(buf[0])); - for (int j = 0; j < num_symbols_in_buf; ++j) { - const ElfW(Sym)& symbol = buf[j]; - uint64_t start_address = symbol.st_value; - start_address += symbol_offset; - uint64_t end_address = start_address + symbol.st_size; - if (symbol.st_value != 0 && // Skip null value symbols. - symbol.st_shndx != 0 && // Skip undefined symbols. - start_address <= pc && pc < end_address) { - ssize_t len1 = ReadFromOffset(fd, out, out_size, - strtab->sh_offset + symbol.st_name); - if (len1 <= 0 || memchr(out, '\0', out_size) == NULL) { - return false; - } - return true; // Obtained the symbol name. - } - } - i += num_symbols_in_buf; - } - return false; -} - -// Get the symbol name of "pc" from the file pointed by "fd". Process -// both regular and dynamic symbol tables if necessary. On success, -// write the symbol name to "out" and return true. Otherwise, return -// false. -static bool GetSymbolFromObjectFile(const int fd, uint64_t pc, - char *out, int out_size, - uint64_t map_start_address) { - // Read the ELF header. - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return false; - } - - uint64_t symbol_offset = 0; - if (elf_header.e_type == ET_DYN) { // DSO needs offset adjustment. - symbol_offset = map_start_address; - } - - ElfW(Shdr) symtab, strtab; - - // Consult a regular symbol table first. - if (!GetSectionHeaderByType(fd, elf_header.e_shnum, elf_header.e_shoff, - SHT_SYMTAB, &symtab)) { - return false; - } - if (!ReadFromOffsetExact(fd, &strtab, sizeof(strtab), elf_header.e_shoff + - symtab.sh_link * sizeof(symtab))) { - return false; - } - if (FindSymbol(pc, fd, out, out_size, symbol_offset, - &strtab, &symtab)) { - return true; // Found the symbol in a regular symbol table. - } - - // If the symbol is not found, then consult a dynamic symbol table. - if (!GetSectionHeaderByType(fd, elf_header.e_shnum, elf_header.e_shoff, - SHT_DYNSYM, &symtab)) { - return false; - } - if (!ReadFromOffsetExact(fd, &strtab, sizeof(strtab), elf_header.e_shoff + - symtab.sh_link * sizeof(symtab))) { - return false; - } - if (FindSymbol(pc, fd, out, out_size, symbol_offset, - &strtab, &symtab)) { - return true; // Found the symbol in a dynamic symbol table. - } - - return false; -} - -namespace { -// Thin wrapper around a file descriptor so that the file descriptor -// gets closed for sure. -struct FileDescriptor { - const int fd_; - explicit FileDescriptor(int fd) : fd_(fd) {} - ~FileDescriptor() { - if (fd_ >= 0) { - NO_INTR(close(fd_)); - } - } - int get() { return fd_; } - - private: - explicit FileDescriptor(const FileDescriptor&); - void operator=(const FileDescriptor&); -}; - -// Helper class for reading lines from file. -// -// Note: we don't use ProcMapsIterator since the object is big (it has -// a 5k array member) and uses async-unsafe functions such as sscanf() -// and snprintf(). -class LineReader { - public: - explicit LineReader(int fd, char *buf, int buf_len) : fd_(fd), - buf_(buf), buf_len_(buf_len), bol_(buf), eol_(buf), eod_(buf) { - } - - // Read '\n'-terminated line from file. On success, modify "bol" - // and "eol", then return true. Otherwise, return false. - // - // Note: if the last line doesn't end with '\n', the line will be - // dropped. It's an intentional behavior to make the code simple. - bool ReadLine(const char **bol, const char **eol) { - if (BufferIsEmpty()) { // First time. - const ssize_t num_bytes = ReadPersistent(fd_, buf_, buf_len_); - if (num_bytes <= 0) { // EOF or error. - return false; - } - eod_ = buf_ + num_bytes; - bol_ = buf_; - } else { - bol_ = eol_ + 1; // Advance to the next line in the buffer. - SAFE_ASSERT(bol_ <= eod_); // "bol_" can point to "eod_". - if (!HasCompleteLine()) { - const int incomplete_line_length = eod_ - bol_; - // Move the trailing incomplete line to the beginning. - memmove(buf_, bol_, incomplete_line_length); - // Read text from file and append it. - char * const append_pos = buf_ + incomplete_line_length; - const int capacity_left = buf_len_ - incomplete_line_length; - const ssize_t num_bytes = ReadPersistent(fd_, append_pos, - capacity_left); - if (num_bytes <= 0) { // EOF or error. - return false; - } - eod_ = append_pos + num_bytes; - bol_ = buf_; - } - } - eol_ = FindLineFeed(); - if (eol_ == NULL) { // '\n' not found. Malformed line. - return false; - } - *eol_ = '\0'; // Replace '\n' with '\0'. - - *bol = bol_; - *eol = eol_; - return true; - } - - // Beginning of line. - const char *bol() { - return bol_; - } - - // End of line. - const char *eol() { - return eol_; - } - - private: - explicit LineReader(const LineReader&); - void operator=(const LineReader&); - - char *FindLineFeed() { - return reinterpret_cast(memchr(bol_, '\n', eod_ - bol_)); - } - - bool BufferIsEmpty() { - return buf_ == eod_; - } - - bool HasCompleteLine() { - return !BufferIsEmpty() && FindLineFeed() != NULL; - } - - const int fd_; - char * const buf_; - const int buf_len_; - char *bol_; - char *eol_; - const char *eod_; // End of data in "buf_". -}; -} // namespace - -// Place the hex number read from "start" into "*hex". The pointer to -// the first non-hex character or "end" is returned. -static char *GetHex(const char *start, const char *end, uint64_t *hex) { - *hex = 0; - const char *p; - for (p = start; p < end; ++p) { - int ch = *p; - if ((ch >= '0' && ch <= '9') || - (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')) { - *hex = (*hex << 4) | (ch < 'A' ? ch - '0' : (ch & 0xF) + 9); - } else { // Encountered the first non-hex character. - break; - } - } - SAFE_ASSERT(p <= end); - return const_cast(p); -} - -// Search for the object file (from /proc/self/maps) that contains -// the specified pc. If found, open this file and return the file handle, -// and also set start_address to the start address of where this object -// file is mapped to in memory. Otherwise, return -1. -static ATTRIBUTE_NOINLINE int -OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc, - uint64_t &start_address) { - int object_fd; - - // Open /proc/self/maps. - int maps_fd; - NO_INTR(maps_fd = open("/proc/self/maps", O_RDONLY)); - FileDescriptor wrapped_maps_fd(maps_fd); - if (wrapped_maps_fd.get() < 0) { - return -1; - } - - // Iterate over maps and look for the map containing the pc. Then - // look into the symbol tables inside. - char buf[1024]; // Big enough for line of sane /proc/self/maps - LineReader reader(wrapped_maps_fd.get(), buf, sizeof(buf)); - while (true) { - const char *cursor; - const char *eol; - if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. - return -1; - } - - // Start parsing line in /proc/self/maps. Here is an example: - // - // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat - // - // We want start address (08048000), end address (0804c000), flags - // (r-xp) and file name (/bin/cat). - - // Read start address. - cursor = GetHex(cursor, eol, &start_address); - if (cursor == eol || *cursor != '-') { - return -1; // Malformed line. - } - ++cursor; // Skip '-'. - - // Read end address. - uint64_t end_address; - cursor = GetHex(cursor, eol, &end_address); - if (cursor == eol || *cursor != ' ') { - return -1; // Malformed line. - } - ++cursor; // Skip ' '. - - // Check start and end addresses. - if (!(start_address <= pc && pc < end_address)) { - continue; // We skip this map. PC isn't in this map. - } - - // Read flags. Skip flags until we encounter a space or eol. - const char * const flags_start = cursor; - while (cursor < eol && *cursor != ' ') { - ++cursor; - } - // We expect at least four letters for flags (ex. "r-xp"). - if (cursor == eol || cursor < flags_start + 4) { - return -1; // Malformed line. - } - - // Check flags. We are only interested in "r-x" maps. - if (memcmp(flags_start, "r-x", 3) != 0) { // Not a "r-x" map. - continue; // We skip this map. - } - ++cursor; // Skip ' '. - - // Skip to file name. "cursor" now points to file offset. We need to - // skip at least three spaces for file offset, dev, and inode. - int num_spaces = 0; - while (cursor < eol) { - if (*cursor == ' ') { - ++num_spaces; - } else if (num_spaces >= 3) { - // The first non-space character after skipping three spaces - // is the beginning of the file name. - break; - } - ++cursor; - } - if (cursor == eol) { - return -1; // Malformed line. - } - - // Finally, "cursor" now points to file name of our interest. - NO_INTR(object_fd = open(cursor, O_RDONLY)); - if (object_fd < 0) { - return -1; - } - return object_fd; - } -} - -// The implementation of our symbolization routine. If it -// successfully finds the symbol containing "pc" and obtains the -// symbol name, returns true and write the symbol name to "out". -// Otherwise, returns false. If Callback function is installed via -// InstallSymbolizeCallback(), the function is also called in this function, -// and "out" is used as its output. -// To keep stack consumption low, we would like this function to not -// get inlined. -static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out, - int out_size) { - uint64_t pc0 = reinterpret_cast(pc); - uint64_t start_address = 0; - - int object_fd = OpenObjectFileContainingPcAndGetStartAddress(pc0, - start_address); - if (object_fd == -1) { - return false; - } - FileDescriptor wrapped_object_fd(object_fd); - int elf_type = FileGetElfType(wrapped_object_fd.get()); - if (elf_type == -1) { - return false; - } - if (g_symbolize_callback) { - // Run the call back if it's installed. - // Note: relocation (and much of the rest of this code) will be - // wrong for prelinked shared libraries and PIE executables. - uint64 relocation = (elf_type == ET_DYN) ? start_address : 0; - int num_bytes_written = g_symbolize_callback(wrapped_object_fd.get(), - pc, out, out_size, - relocation); - if (num_bytes_written > 0) { - out += num_bytes_written; - out_size -= num_bytes_written; - } - } - if (!GetSymbolFromObjectFile(wrapped_object_fd.get(), pc0, - out, out_size, start_address)) { - return false; - } - - // Symbolization succeeded. Now we try to demangle the symbol. - DemangleInplace(out, out_size); - return true; -} - -_END_GOOGLE_NAMESPACE_ - -#elif defined(OS_MACOSX) && defined(HAVE_DLADDR) - -#include -#include - -_START_GOOGLE_NAMESPACE_ - -static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out, - int out_size) { - Dl_info info; - if (dladdr(pc, &info)) { - if (strlen(info.dli_sname) < out_size) { - strcpy(out, info.dli_sname); - // Symbolization succeeded. Now we try to demangle the symbol. - DemangleInplace(out, out_size); - return true; - } - } - return false; -} - -_END_GOOGLE_NAMESPACE_ - -#else -# error BUG: HAVE_SYMBOLIZE was wrongly set -#endif - -_START_GOOGLE_NAMESPACE_ - -bool Symbolize(void *pc, char *out, int out_size) { - SAFE_ASSERT(out_size >= 0); - return SymbolizeAndDemangle(pc, out, out_size); -} - -_END_GOOGLE_NAMESPACE_ - -#else /* HAVE_SYMBOLIZE */ - -#include - -#include "config.h" - -_START_GOOGLE_NAMESPACE_ - -// TODO: Support other environments. -bool Symbolize(void *pc, char *out, int out_size) { - assert(0); - return false; -} - -_END_GOOGLE_NAMESPACE_ - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.h deleted file mode 100644 index 1ebe4dd9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize.h +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// This library provides Symbolize() function that symbolizes program -// counters to their corresponding symbol names on linux platforms. -// This library has a minimal implementation of an ELF symbol table -// reader (i.e. it doesn't depend on libelf, etc.). -// -// The algorithm used in Symbolize() is as follows. -// -// 1. Go through a list of maps in /proc/self/maps and find the map -// containing the program counter. -// -// 2. Open the mapped file and find a regular symbol table inside. -// Iterate over symbols in the symbol table and look for the symbol -// containing the program counter. If such a symbol is found, -// obtain the symbol name, and demangle the symbol if possible. -// If the symbol isn't found in the regular symbol table (binary is -// stripped), try the same thing with a dynamic symbol table. -// -// Note that Symbolize() is originally implemented to be used in -// FailureSignalHandler() in base/google.cc. Hence it doesn't use -// malloc() and other unsafe operations. It should be both -// thread-safe and async-signal-safe. - -#ifndef BASE_SYMBOLIZE_H_ -#define BASE_SYMBOLIZE_H_ - -#include "utilities.h" -#include "config.h" -#include "glog/logging.h" - -#ifdef HAVE_SYMBOLIZE - -#if defined(__ELF__) // defined by gcc on Linux -#include -#include // For ElfW() macro. - -// If there is no ElfW macro, let's define it by ourself. -#ifndef ElfW -# if SIZEOF_VOID_P == 4 -# define ElfW(type) Elf32_##type -# elif SIZEOF_VOID_P == 8 -# define ElfW(type) Elf64_##type -# else -# error "Unknown sizeof(void *)" -# endif -#endif - -_START_GOOGLE_NAMESPACE_ - -// Gets the section header for the given name, if it exists. Returns true on -// success. Otherwise, returns false. -bool GetSectionHeaderByName(int fd, const char *name, size_t name_len, - ElfW(Shdr) *out); - -_END_GOOGLE_NAMESPACE_ - -#endif /* __ELF__ */ - -_START_GOOGLE_NAMESPACE_ - -// Installs a callback function, which will be called right before a symbol name -// is printed. The callback is intended to be used for showing a file name and a -// line number preceding a symbol name. -// "fd" is a file descriptor of the object file containing the program -// counter "pc". The callback function should write output to "out" -// and return the size of the output written. On error, the callback -// function should return -1. -typedef int (*SymbolizeCallback)(int fd, void *pc, char *out, size_t out_size, - uint64 relocation); -void InstallSymbolizeCallback(SymbolizeCallback callback); - -_END_GOOGLE_NAMESPACE_ - -#endif - -_START_GOOGLE_NAMESPACE_ - -// Symbolizes a program counter. On success, returns true and write the -// symbol name to "out". The symbol name is demangled if possible -// (supports symbols generated by GCC 3.x or newer). Otherwise, -// returns false. -bool Symbolize(void *pc, char *out, int out_size); - -_END_GOOGLE_NAMESPACE_ - -#endif // BASE_SYMBOLIZE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize_unittest.cc deleted file mode 100644 index f25909d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/symbolize_unittest.cc +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Satoru Takabayashi -// -// Unit tests for functions in symbolize.cc. - -#include "utilities.h" - -#include -#include - -#include "glog/logging.h" -#include "symbolize.h" -#include "googletest.h" -#include "config.h" - -using namespace std; -using namespace GOOGLE_NAMESPACE; - -#if defined(HAVE_STACKTRACE) && defined(__ELF__) - -#define always_inline - -// This unit tests make sense only with GCC. -// Uses lots of GCC specific features. -#if defined(__GNUC__) && !defined(__OPENCC__) -# if __GNUC__ >= 4 -# define TEST_WITH_MODERN_GCC -# if __i386__ // always_inline isn't supported for x86_64 with GCC 4.1.0. -# undef always_inline -# define always_inline __attribute__((always_inline)) -# define HAVE_ALWAYS_INLINE -# endif // __i386__ -# else -# endif // __GNUC__ >= 4 -# if defined(__i386__) || defined(__x86_64__) -# define TEST_X86_32_AND_64 1 -# endif // defined(__i386__) || defined(__x86_64__) -#endif - -// A wrapper function for Symbolize() to make the unit test simple. -static const char *TrySymbolize(void *pc) { - static char symbol[4096]; - if (Symbolize(pc, symbol, sizeof(symbol))) { - return symbol; - } else { - return NULL; - } -} - -// Make them C linkage to avoid mangled names. -extern "C" { -void nonstatic_func() { - volatile int a = 0; - ++a; -} - -static void static_func() { - volatile int a = 0; - ++a; -} -} - -TEST(Symbolize, Symbolize) { - // We do C-style cast since GCC 2.95.3 doesn't allow - // reinterpret_cast(&func). - - // Compilers should give us pointers to them. - EXPECT_STREQ("nonstatic_func", TrySymbolize((void *)(&nonstatic_func))); - EXPECT_STREQ("static_func", TrySymbolize((void *)(&static_func))); - - EXPECT_TRUE(NULL == TrySymbolize(NULL)); -} - -struct Foo { - static void func(int x); -}; - -void ATTRIBUTE_NOINLINE Foo::func(int x) { - volatile int a = x; - ++a; -} - -// With a modern GCC, Symbolize() should return demangled symbol -// names. Function parameters should be omitted. -#ifdef TEST_WITH_MODERN_GCC -TEST(Symbolize, SymbolizeWithDemangling) { - Foo::func(100); - EXPECT_STREQ("Foo::func()", TrySymbolize((void *)(&Foo::func))); -} -#endif - -// Tests that verify that Symbolize footprint is within some limit. - -// To measure the stack footprint of the Symbolize function, we create -// a signal handler (for SIGUSR1 say) that calls the Symbolize function -// on an alternate stack. This alternate stack is initialized to some -// known pattern (0x55, 0x55, 0x55, ...). We then self-send this signal, -// and after the signal handler returns, look at the alternate stack -// buffer to see what portion has been touched. -// -// This trick gives us the the stack footprint of the signal handler. -// But the signal handler, even before the call to Symbolize, consumes -// some stack already. We however only want the stack usage of the -// Symbolize function. To measure this accurately, we install two signal -// handlers: one that does nothing and just returns, and another that -// calls Symbolize. The difference between the stack consumption of these -// two signals handlers should give us the Symbolize stack foorprint. - -static void *g_pc_to_symbolize; -static char g_symbolize_buffer[4096]; -static char *g_symbolize_result; - -static void EmptySignalHandler(int signo) {} - -static void SymbolizeSignalHandler(int signo) { - if (Symbolize(g_pc_to_symbolize, g_symbolize_buffer, - sizeof(g_symbolize_buffer))) { - g_symbolize_result = g_symbolize_buffer; - } else { - g_symbolize_result = NULL; - } -} - -const int kAlternateStackSize = 8096; -const char kAlternateStackFillValue = 0x55; - -// These helper functions look at the alternate stack buffer, and figure -// out what portion of this buffer has been touched - this is the stack -// consumption of the signal handler running on this alternate stack. -static ATTRIBUTE_NOINLINE bool StackGrowsDown(int *x) { - int y; - return &y < x; -} -static int GetStackConsumption(const char* alt_stack) { - int x; - if (StackGrowsDown(&x)) { - for (int i = 0; i < kAlternateStackSize; i++) { - if (alt_stack[i] != kAlternateStackFillValue) { - return (kAlternateStackSize - i); - } - } - } else { - for (int i = (kAlternateStackSize - 1); i >= 0; i--) { - if (alt_stack[i] != kAlternateStackFillValue) { - return i; - } - } - } - return -1; -} - -#ifdef HAVE_SIGALTSTACK - -// Call Symbolize and figure out the stack footprint of this call. -static const char *SymbolizeStackConsumption(void *pc, int *stack_consumed) { - - g_pc_to_symbolize = pc; - - // The alt-signal-stack cannot be heap allocated because there is a - // bug in glibc-2.2 where some signal handler setup code looks at the - // current stack pointer to figure out what thread is currently running. - // Therefore, the alternate stack must be allocated from the main stack - // itself. - char altstack[kAlternateStackSize]; - memset(altstack, kAlternateStackFillValue, kAlternateStackSize); - - // Set up the alt-signal-stack (and save the older one). - stack_t sigstk; - memset(&sigstk, 0, sizeof(stack_t)); - stack_t old_sigstk; - sigstk.ss_sp = altstack; - sigstk.ss_size = kAlternateStackSize; - sigstk.ss_flags = 0; - CHECK_ERR(sigaltstack(&sigstk, &old_sigstk)); - - // Set up SIGUSR1 and SIGUSR2 signal handlers (and save the older ones). - struct sigaction sa; - memset(&sa, 0, sizeof(struct sigaction)); - struct sigaction old_sa1, old_sa2; - sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_ONSTACK; - - // SIGUSR1 maps to EmptySignalHandler. - sa.sa_handler = EmptySignalHandler; - CHECK_ERR(sigaction(SIGUSR1, &sa, &old_sa1)); - - // SIGUSR2 maps to SymbolizeSignalHanlder. - sa.sa_handler = SymbolizeSignalHandler; - CHECK_ERR(sigaction(SIGUSR2, &sa, &old_sa2)); - - // Send SIGUSR1 signal and measure the stack consumption of the empty - // signal handler. - CHECK_ERR(kill(getpid(), SIGUSR1)); - int stack_consumption1 = GetStackConsumption(altstack); - - // Send SIGUSR2 signal and measure the stack consumption of the symbolize - // signal handler. - CHECK_ERR(kill(getpid(), SIGUSR2)); - int stack_consumption2 = GetStackConsumption(altstack); - - // The difference between the two stack consumption values is the - // stack footprint of the Symbolize function. - if (stack_consumption1 != -1 && stack_consumption2 != -1) { - *stack_consumed = stack_consumption2 - stack_consumption1; - } else { - *stack_consumed = -1; - } - - // Log the stack consumption values. - LOG(INFO) << "Stack consumption of empty signal handler: " - << stack_consumption1; - LOG(INFO) << "Stack consumption of symbolize signal handler: " - << stack_consumption2; - LOG(INFO) << "Stack consumption of Symbolize: " << *stack_consumed; - - // Now restore the old alt-signal-stack and signal handlers. - CHECK_ERR(sigaltstack(&old_sigstk, NULL)); - CHECK_ERR(sigaction(SIGUSR1, &old_sa1, NULL)); - CHECK_ERR(sigaction(SIGUSR2, &old_sa2, NULL)); - - return g_symbolize_result; -} - -// Symbolize stack consumption should be within 2kB. -const int kStackConsumptionUpperLimit = 2048; - -TEST(Symbolize, SymbolizeStackConsumption) { - int stack_consumed; - const char* symbol; - - symbol = SymbolizeStackConsumption((void *)(&nonstatic_func), - &stack_consumed); - EXPECT_STREQ("nonstatic_func", symbol); - EXPECT_GT(stack_consumed, 0); - EXPECT_LT(stack_consumed, kStackConsumptionUpperLimit); - - symbol = SymbolizeStackConsumption((void *)(&static_func), - &stack_consumed); - EXPECT_STREQ("static_func", symbol); - EXPECT_GT(stack_consumed, 0); - EXPECT_LT(stack_consumed, kStackConsumptionUpperLimit); -} - -#ifdef TEST_WITH_MODERN_GCC -TEST(Symbolize, SymbolizeWithDemanglingStackConsumption) { - Foo::func(100); - int stack_consumed; - const char* symbol; - - symbol = SymbolizeStackConsumption((void *)(&Foo::func), &stack_consumed); - - EXPECT_STREQ("Foo::func()", symbol); - EXPECT_GT(stack_consumed, 0); - EXPECT_LT(stack_consumed, kStackConsumptionUpperLimit); -} -#endif - -#endif // HAVE_SIGALTSTACK - -// x86 specific tests. Uses some inline assembler. -extern "C" { -inline void* always_inline inline_func() { - register void *pc = NULL; -#ifdef TEST_X86_32_AND_64 - __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc)); -#endif - return pc; -} - -void* ATTRIBUTE_NOINLINE non_inline_func() { - register void *pc = NULL; -#ifdef TEST_X86_32_AND_64 - __asm__ __volatile__("call 1f; 1: pop %0" : "=r"(pc)); -#endif - return pc; -} - -void ATTRIBUTE_NOINLINE TestWithPCInsideNonInlineFunction() { -#if defined(TEST_X86_32_AND_64) && defined(HAVE_ATTRIBUTE_NOINLINE) - void *pc = non_inline_func(); - const char *symbol = TrySymbolize(pc); - CHECK(symbol != NULL); - CHECK_STREQ(symbol, "non_inline_func"); - cout << "Test case TestWithPCInsideNonInlineFunction passed." << endl; -#endif -} - -void ATTRIBUTE_NOINLINE TestWithPCInsideInlineFunction() { -#if defined(TEST_X86_32_AND_64) && defined(HAVE_ALWAYS_INLINE) - void *pc = inline_func(); // Must be inlined. - const char *symbol = TrySymbolize(pc); - CHECK(symbol != NULL); - CHECK_STREQ(symbol, __FUNCTION__); - cout << "Test case TestWithPCInsideInlineFunction passed." << endl; -#endif -} -} - -// Test with a return address. -void ATTRIBUTE_NOINLINE TestWithReturnAddress() { -#if defined(HAVE_ATTRIBUTE_NOINLINE) - void *return_address = __builtin_return_address(0); - const char *symbol = TrySymbolize(return_address); - CHECK(symbol != NULL); - CHECK_STREQ(symbol, "main"); - cout << "Test case TestWithReturnAddress passed." << endl; -#endif -} - -int main(int argc, char **argv) { - FLAGS_logtostderr = true; - InitGoogleLogging(argv[0]); - InitGoogleTest(&argc, argv); -#ifdef HAVE_SYMBOLIZE - // We don't want to get affected by the callback interface, that may be - // used to install some callback function at InitGoogle() time. - InstallSymbolizeCallback(NULL); - - TestWithPCInsideInlineFunction(); - TestWithPCInsideNonInlineFunction(); - TestWithReturnAddress(); - return RUN_ALL_TESTS(); -#else - return 0; -#endif -} - -#else -int main() { -#ifdef HAVE_SYMBOLIZE - printf("PASS (no symbolize_unittest support)\n"); -#else - printf("PASS (no symbolize support)\n"); -#endif - return 0; -} -#endif // HAVE_STACKTRACE diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.cc deleted file mode 100644 index 7e476905..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.cc +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Shinichiro Hamaji - -#include "utilities.h" - -#include -#include - -#include -#ifdef HAVE_SYS_TIME_H -# include -#endif -#include -#if defined(HAVE_SYSCALL_H) -#include // for syscall() -#elif defined(HAVE_SYS_SYSCALL_H) -#include // for syscall() -#endif -#ifdef HAVE_SYSLOG_H -# include -#endif - -#include "base/googleinit.h" - -using std::string; - -_START_GOOGLE_NAMESPACE_ - -static const char* g_program_invocation_short_name = NULL; -static pthread_t g_main_thread_id; - -_END_GOOGLE_NAMESPACE_ - -// The following APIs are all internal. -#ifdef HAVE_STACKTRACE - -#include "stacktrace.h" -#include "symbolize.h" -#include "base/commandlineflags.h" - -GLOG_DEFINE_bool(symbolize_stacktrace, true, - "Symbolize the stack trace in the tombstone"); - -_START_GOOGLE_NAMESPACE_ - -typedef void DebugWriter(const char*, void*); - -// The %p field width for printf() functions is two characters per byte. -// For some environments, add two extra bytes for the leading "0x". -static const int kPrintfPointerFieldWidth = 2 + 2 * sizeof(void*); - -static void DebugWriteToStderr(const char* data, void *unused) { - // This one is signal-safe. - write(STDERR_FILENO, data, strlen(data)); -} - -void DebugWriteToString(const char* data, void *arg) { - reinterpret_cast(arg)->append(data); -} - -#ifdef HAVE_SYMBOLIZE -// Print a program counter and its symbol name. -static void DumpPCAndSymbol(DebugWriter *writerfn, void *arg, void *pc, - const char * const prefix) { - char tmp[1024]; - const char *symbol = "(unknown)"; - // Symbolizes the previous address of pc because pc may be in the - // next function. The overrun happens when the function ends with - // a call to a function annotated noreturn (e.g. CHECK). - if (Symbolize(reinterpret_cast(pc) - 1, tmp, sizeof(tmp))) { - symbol = tmp; - } - char buf[1024]; - snprintf(buf, sizeof(buf), "%s@ %*p %s\n", - prefix, kPrintfPointerFieldWidth, pc, symbol); - writerfn(buf, arg); -} -#endif - -static void DumpPC(DebugWriter *writerfn, void *arg, void *pc, - const char * const prefix) { - char buf[100]; - snprintf(buf, sizeof(buf), "%s@ %*p\n", - prefix, kPrintfPointerFieldWidth, pc); - writerfn(buf, arg); -} - -// Dump current stack trace as directed by writerfn -static void DumpStackTrace(int skip_count, DebugWriter *writerfn, void *arg) { - // Print stack trace - void* stack[32]; - int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count+1); - for (int i = 0; i < depth; i++) { -#if defined(HAVE_SYMBOLIZE) - if (FLAGS_symbolize_stacktrace) { - DumpPCAndSymbol(writerfn, arg, stack[i], " "); - } else { - DumpPC(writerfn, arg, stack[i], " "); - } -#else - DumpPC(writerfn, arg, stack[i], " "); -#endif - } -} - -static void DumpStackTraceAndExit() { - DumpStackTrace(1, DebugWriteToStderr, NULL); - - // Set the default signal handler for SIGABRT, to avoid invoking our - // own signal handler installed by InstallFailedSignalHandler(). - struct sigaction sig_action; - memset(&sig_action, 0, sizeof(sig_action)); - sigemptyset(&sig_action.sa_mask); - sig_action.sa_handler = SIG_DFL; - sigaction(SIGABRT, &sig_action, NULL); - - abort(); -} - -_END_GOOGLE_NAMESPACE_ - -#endif // HAVE_STACKTRACE - -_START_GOOGLE_NAMESPACE_ - -namespace glog_internal_namespace_ { - -const char* ProgramInvocationShortName() { - if (g_program_invocation_short_name != NULL) { - return g_program_invocation_short_name; - } else { - // TODO(hamaji): Use /proc/self/cmdline and so? - return "UNKNOWN"; - } -} - -bool IsGoogleLoggingInitialized() { - return g_program_invocation_short_name != NULL; -} - -bool is_default_thread() { - if (g_program_invocation_short_name == NULL) { - // InitGoogleLogging() not yet called, so unlikely to be in a different - // thread - return true; - } else { - return pthread_equal(pthread_self(), g_main_thread_id); - } -} - -#ifdef OS_WINDOWS -struct timeval { - long tv_sec, tv_usec; -}; - -// Based on: http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/os_win32.c&q=GetSystemTimeAsFileTime%20license:bsd -// See COPYING for copyright information. -static int gettimeofday(struct timeval *tv, void* tz) { -#define EPOCHFILETIME (116444736000000000ULL) - FILETIME ft; - LARGE_INTEGER li; - uint64 tt; - - GetSystemTimeAsFileTime(&ft); - li.LowPart = ft.dwLowDateTime; - li.HighPart = ft.dwHighDateTime; - tt = (li.QuadPart - EPOCHFILETIME) / 10; - tv->tv_sec = tt / 1000000; - tv->tv_usec = tt % 1000000; - - return 0; -} -#endif - -int64 CycleClock_Now() { - // TODO(hamaji): temporary impementation - it might be too slow. - struct timeval tv; - gettimeofday(&tv, NULL); - return static_cast(tv.tv_sec) * 1000000 + tv.tv_usec; -} - -int64 UsecToCycles(int64 usec) { - return usec; -} - -WallTime WallTime_Now() { - // Now, cycle clock is retuning microseconds since the epoch. - return CycleClock_Now() * 0.000001; -} - -static int32 g_main_thread_pid = getpid(); -int32 GetMainThreadPid() { - return g_main_thread_pid; -} - -pid_t GetTID() { - // On Linux and FreeBSD, we try to use gettid(). -#if defined OS_LINUX || defined OS_FREEBSD || defined OS_MACOSX -#ifndef __NR_gettid -#ifdef OS_MACOSX -#define __NR_gettid SYS_gettid -#elif ! defined __i386__ -#error "Must define __NR_gettid for non-x86 platforms" -#else -#define __NR_gettid 224 -#endif -#endif - static bool lacks_gettid = false; - if (!lacks_gettid) { - pid_t tid = syscall(__NR_gettid); - if (tid != -1) { - return tid; - } - // Technically, this variable has to be volatile, but there is a small - // performance penalty in accessing volatile variables and there should - // not be any serious adverse effect if a thread does not immediately see - // the value change to "true". - lacks_gettid = true; - } -#endif // OS_LINUX || OS_FREEBSD - - // If gettid() could not be used, we use one of the following. -#if defined OS_LINUX - return getpid(); // Linux: getpid returns thread ID when gettid is absent -#elif defined OS_WINDOWS || defined OS_CYGWIN - return GetCurrentThreadId(); -#else - // If none of the techniques above worked, we use pthread_self(). - return (pid_t)(uintptr_t)pthread_self(); -#endif -} - -const char* const_basename(const char* filepath) { - const char* base = strrchr(filepath, '/'); -#ifdef OS_WINDOWS // Look for either path separator in Windows - if (!base) - base = strrchr(filepath, '\\'); -#endif - return base ? (base+1) : filepath; -} - -static string g_my_user_name; -const string& MyUserName() { - return g_my_user_name; -} -static void MyUserNameInitializer() { - // TODO(hamaji): Probably this is not portable. -#if defined(OS_WINDOWS) - const char* user = getenv("USERNAME"); -#else - const char* user = getenv("USER"); -#endif - if (user != NULL) { - g_my_user_name = user; - } else { - g_my_user_name = "invalid-user"; - } -} -REGISTER_MODULE_INITIALIZER(utilities, MyUserNameInitializer()); - -#ifdef HAVE_STACKTRACE -void DumpStackTraceToString(string* stacktrace) { - DumpStackTrace(1, DebugWriteToString, stacktrace); -} -#endif - -// We use an atomic operation to prevent problems with calling CrashReason -// from inside the Mutex implementation (potentially through RAW_CHECK). -static const CrashReason* g_reason = 0; - -void SetCrashReason(const CrashReason* r) { - sync_val_compare_and_swap(&g_reason, - reinterpret_cast(0), - r); -} - -} // namespace glog_internal_namespace_ - -void InitGoogleLogging(const char* argv0) { - CHECK(!IsGoogleLoggingInitialized()) - << "You called InitGoogleLogging() twice!"; - const char* slash = strrchr(argv0, '/'); -#ifdef OS_WINDOWS - if (!slash) slash = strrchr(argv0, '\\'); -#endif - g_program_invocation_short_name = slash ? slash + 1 : argv0; - g_main_thread_id = pthread_self(); - -#ifdef HAVE_STACKTRACE - InstallFailureFunction(&DumpStackTraceAndExit); -#endif -} - -void ShutdownGoogleLogging() { - CHECK(IsGoogleLoggingInitialized()) - << "You called ShutdownGoogleLogging() without calling InitGoogleLogging() first!"; -#ifdef HAVE_SYSLOG_H - closelog(); -#endif -} - -_END_GOOGLE_NAMESPACE_ - -// Make an implementation of stacktrace compiled. -#ifdef STACKTRACE_H -# include STACKTRACE_H -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.h deleted file mode 100644 index ee54f940..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities.h +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Shinichiro Hamaji -// -// Define utilties for glog internal usage. - -#ifndef UTILITIES_H__ -#define UTILITIES_H__ - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) -# define OS_WINDOWS -#elif defined(__CYGWIN__) || defined(__CYGWIN32__) -# define OS_CYGWIN -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define OS_LINUX -#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) -# define OS_MACOSX -#elif defined(__FreeBSD__) -# define OS_FREEBSD -#elif defined(__NetBSD__) -# define OS_NETBSD -#elif defined(__OpenBSD__) -# define OS_OPENBSD -#else -// TODO(hamaji): Add other platforms. -#endif - -// printf macros for size_t, in the style of inttypes.h -#ifdef _LP64 -#define __PRIS_PREFIX "z" -#else -#define __PRIS_PREFIX -#endif - -// Use these macros after a % in a printf format string -// to get correct 32/64 bit behavior, like this: -// size_t size = records.size(); -// printf("%"PRIuS"\n", size); - -#define PRIdS __PRIS_PREFIX "d" -#define PRIxS __PRIS_PREFIX "x" -#define PRIuS __PRIS_PREFIX "u" -#define PRIXS __PRIS_PREFIX "X" -#define PRIoS __PRIS_PREFIX "o" - -#include "base/mutex.h" // This must go first so we get _XOPEN_SOURCE - -#include - -#if defined(OS_WINDOWS) -# include "port.h" -#endif - -#include "config.h" -#include "glog/logging.h" - -// There are three different ways we can try to get the stack trace: -// -// 1) The libunwind library. This is still in development, and as a -// separate library adds a new dependency, but doesn't need a frame -// pointer. It also doesn't call malloc. -// -// 2) Our hand-coded stack-unwinder. This depends on a certain stack -// layout, which is used by gcc (and those systems using a -// gcc-compatible ABI) on x86 systems, at least since gcc 2.95. -// It uses the frame pointer to do its work. -// -// 3) The gdb unwinder -- also the one used by the c++ exception code. -// It's obviously well-tested, but has a fatal flaw: it can call -// malloc() from the unwinder. This is a problem because we're -// trying to use the unwinder to instrument malloc(). -// -// Note: if you add a new implementation here, make sure it works -// correctly when GetStackTrace() is called with max_depth == 0. -// Some code may do that. - -#if defined(HAVE_LIB_UNWIND) -# define STACKTRACE_H "stacktrace_libunwind-inl.h" -#elif !defined(NO_FRAME_POINTER) -# if defined(__i386__) && __GNUC__ >= 2 -# define STACKTRACE_H "stacktrace_x86-inl.h" -# elif defined(__x86_64__) && __GNUC__ >= 2 -# define STACKTRACE_H "stacktrace_x86_64-inl.h" -# elif (defined(__ppc__) || defined(__PPC__)) && __GNUC__ >= 2 -# define STACKTRACE_H "stacktrace_powerpc-inl.h" -# endif -#endif - -#if !defined(STACKTRACE_H) && defined(HAVE_EXECINFO_H) -# define STACKTRACE_H "stacktrace_generic-inl.h" -#endif - -#if defined(STACKTRACE_H) -# define HAVE_STACKTRACE -#endif - -// defined by gcc -#if defined(__ELF__) && defined(OS_LINUX) -# define HAVE_SYMBOLIZE -#elif defined(OS_MACOSX) && defined(HAVE_DLADDR) -// Use dladdr to symbolize. -# define HAVE_SYMBOLIZE -#endif - -#ifndef ARRAYSIZE -// There is a better way, but this is good enough for our purpose. -# define ARRAYSIZE(a) (sizeof(a) / sizeof(*(a))) -#endif - -_START_GOOGLE_NAMESPACE_ - -namespace glog_internal_namespace_ { - -#ifdef HAVE___ATTRIBUTE__ -# define ATTRIBUTE_NOINLINE __attribute__ ((noinline)) -# define HAVE_ATTRIBUTE_NOINLINE -#else -# define ATTRIBUTE_NOINLINE -#endif - -const char* ProgramInvocationShortName(); - -bool IsGoogleLoggingInitialized(); - -bool is_default_thread(); - -int64 CycleClock_Now(); - -int64 UsecToCycles(int64 usec); - -typedef double WallTime; -WallTime WallTime_Now(); - -int32 GetMainThreadPid(); - -pid_t GetTID(); - -const std::string& MyUserName(); - -// Get the part of filepath after the last path separator. -// (Doesn't modify filepath, contrary to basename() in libgen.h.) -const char* const_basename(const char* filepath); - -// Wrapper of __sync_val_compare_and_swap. If the GCC extension isn't -// defined, we try the CPU specific logics (we only support x86 and -// x86_64 for now) first, then use a naive implementation, which has a -// race condition. -template -inline T sync_val_compare_and_swap(T* ptr, T oldval, T newval) { -#if defined(HAVE___SYNC_VAL_COMPARE_AND_SWAP) - return __sync_val_compare_and_swap(ptr, oldval, newval); -#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - T ret; - __asm__ __volatile__("lock; cmpxchg %1, (%2);" - :"=a"(ret) - // GCC may produces %sil or %dil for - // constraint "r", but some of apple's gas - // dosn't know the 8 bit registers. - // We use "q" to avoid these registers. - :"q"(newval), "q"(ptr), "a"(oldval) - :"memory", "cc"); - return ret; -#else - T ret = *ptr; - if (ret == oldval) { - *ptr = newval; - } - return ret; -#endif -} - -void DumpStackTraceToString(std::string* stacktrace); - -struct CrashReason { - CrashReason() : filename(0), line_number(0), message(0), depth(0) {} - - const char* filename; - int line_number; - const char* message; - - // We'll also store a bit of stack trace context at the time of crash as - // it may not be available later on. - void* stack[32]; - int depth; -}; - -void SetCrashReason(const CrashReason* r); - -} // namespace glog_internal_namespace_ - -_END_GOOGLE_NAMESPACE_ - -using namespace GOOGLE_NAMESPACE::glog_internal_namespace_; - -#endif // UTILITIES_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities_unittest.cc deleted file mode 100644 index 7b796190..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/utilities_unittest.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Shinichiro Hamaji - -#include "utilities.h" -#include "googletest.h" -#include "glog/logging.h" - -using namespace GOOGLE_NAMESPACE; - -TEST(utilities, sync_val_compare_and_swap) { - bool now_entering = false; - EXPECT_FALSE(sync_val_compare_and_swap(&now_entering, false, true)); - EXPECT_TRUE(sync_val_compare_and_swap(&now_entering, false, true)); - EXPECT_TRUE(sync_val_compare_and_swap(&now_entering, false, true)); -} - -TEST(utilities, InitGoogleLoggingDeathTest) { - ASSERT_DEATH(InitGoogleLogging("foobar"), ""); -} - -int main(int argc, char **argv) { - InitGoogleLogging(argv[0]); - InitGoogleTest(&argc, argv); - - CHECK_EQ(RUN_ALL_TESTS(), 0); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/vlog_is_on.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/vlog_is_on.cc deleted file mode 100644 index ee0e412f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/vlog_is_on.cc +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 1999, 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney and many others -// -// Broken out from logging.cc by Soren Lassen -// logging_unittest.cc covers the functionality herein - -#include "utilities.h" - -#include -#include -#include -#include -#include -#include "base/commandlineflags.h" -#include "glog/logging.h" -#include "glog/raw_logging.h" -#include "base/googleinit.h" - -// glog doesn't have annotation -#define ANNOTATE_BENIGN_RACE(address, description) - -using std::string; - -GLOG_DEFINE_int32(v, 0, "Show all VLOG(m) messages for m <= this." -" Overridable by --vmodule."); - -GLOG_DEFINE_string(vmodule, "", "per-module verbose level." -" Argument is a comma-separated list of =." -" is a glob pattern, matched against the filename base" -" (that is, name ignoring .cc/.h./-inl.h)." -" overrides any value given by --v."); - -_START_GOOGLE_NAMESPACE_ - -namespace glog_internal_namespace_ { - -// Implementation of fnmatch that does not need 0-termination -// of arguments and does not allocate any memory, -// but we only support "*" and "?" wildcards, not the "[...]" patterns. -// It's not a static function for the unittest. -GOOGLE_GLOG_DLL_DECL bool SafeFNMatch_(const char* pattern, - size_t patt_len, - const char* str, - size_t str_len) { - int p = 0; - int s = 0; - while (1) { - if (p == patt_len && s == str_len) return true; - if (p == patt_len) return false; - if (s == str_len) return p+1 == patt_len && pattern[p] == '*'; - if (pattern[p] == str[s] || pattern[p] == '?') { - p += 1; - s += 1; - continue; - } - if (pattern[p] == '*') { - if (p+1 == patt_len) return true; - do { - if (SafeFNMatch_(pattern+(p+1), patt_len-(p+1), str+s, str_len-s)) { - return true; - } - s += 1; - } while (s != str_len); - return false; - } - return false; - } -} - -} // namespace glog_internal_namespace_ - -using glog_internal_namespace_::SafeFNMatch_; - -int32 kLogSiteUninitialized = 1000; - -// List of per-module log levels from FLAGS_vmodule. -// Once created each element is never deleted/modified -// except for the vlog_level: other threads will read VModuleInfo blobs -// w/o locks and we'll store pointers to vlog_level at VLOG locations -// that will never go away. -// We can't use an STL struct here as we wouldn't know -// when it's safe to delete/update it: other threads need to use it w/o locks. -struct VModuleInfo { - string module_pattern; - mutable int32 vlog_level; // Conceptually this is an AtomicWord, but it's - // too much work to use AtomicWord type here - // w/o much actual benefit. - const VModuleInfo* next; -}; - -// This protects the following global variables. -static Mutex vmodule_lock; -// Pointer to head of the VModuleInfo list. -// It's a map from module pattern to logging level for those module(s). -static VModuleInfo* vmodule_list = 0; -// Boolean initialization flag. -static bool inited_vmodule = false; - -// L >= vmodule_lock. -static void VLOG2Initializer() { - vmodule_lock.AssertHeld(); - // Can now parse --vmodule flag and initialize mapping of module-specific - // logging levels. - inited_vmodule = false; - const char* vmodule = FLAGS_vmodule.c_str(); - const char* sep; - VModuleInfo* head = NULL; - VModuleInfo* tail = NULL; - while ((sep = strchr(vmodule, '=')) != NULL) { - string pattern(vmodule, sep - vmodule); - int module_level; - if (sscanf(sep, "=%d", &module_level) == 1) { - VModuleInfo* info = new VModuleInfo; - info->module_pattern = pattern; - info->vlog_level = module_level; - if (head) tail->next = info; - else head = info; - tail = info; - } - // Skip past this entry - vmodule = strchr(sep, ','); - if (vmodule == NULL) break; - vmodule++; // Skip past "," - } - if (head) { // Put them into the list at the head: - tail->next = vmodule_list; - vmodule_list = head; - } - inited_vmodule = true; -} - -// This can be called very early, so we use SpinLock and RAW_VLOG here. -int SetVLOGLevel(const char* module_pattern, int log_level) { - int result = FLAGS_v; - int const pattern_len = strlen(module_pattern); - bool found = false; - MutexLock l(&vmodule_lock); // protect whole read-modify-write - for (const VModuleInfo* info = vmodule_list; - info != NULL; info = info->next) { - if (info->module_pattern == module_pattern) { - if (!found) { - result = info->vlog_level; - found = true; - } - info->vlog_level = log_level; - } else if (!found && - SafeFNMatch_(info->module_pattern.c_str(), - info->module_pattern.size(), - module_pattern, pattern_len)) { - result = info->vlog_level; - found = true; - } - } - if (!found) { - VModuleInfo* info = new VModuleInfo; - info->module_pattern = module_pattern; - info->vlog_level = log_level; - info->next = vmodule_list; - vmodule_list = info; - } - RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level); - return result; -} - -// NOTE: Individual VLOG statements cache the integer log level pointers. -// NOTE: This function must not allocate memory or require any locks. -bool InitVLOG3__(int32** site_flag, int32* site_default, - const char* fname, int32 verbose_level) { - MutexLock l(&vmodule_lock); - bool read_vmodule_flag = inited_vmodule; - if (!read_vmodule_flag) { - VLOG2Initializer(); - } - - // protect the errno global in case someone writes: - // VLOG(..) << "The last error was " << strerror(errno) - int old_errno = errno; - - // site_default normally points to FLAGS_v - int32* site_flag_value = site_default; - - // Get basename for file - const char* base = strrchr(fname, '/'); - base = base ? (base+1) : fname; - const char* base_end = strchr(base, '.'); - size_t base_length = base_end ? (base_end - base) : strlen(base); - - // Trim out trailing "-inl" if any - if (base_length >= 4 && (memcmp(base+base_length-4, "-inl", 4) == 0)) { - base_length -= 4; - } - - // TODO: Trim out _unittest suffix? Perhaps it is better to have - // the extra control and just leave it there. - - // find target in vector of modules, replace site_flag_value with - // a module-specific verbose level, if any. - for (const VModuleInfo* info = vmodule_list; - info != NULL; info = info->next) { - if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(), - base, base_length)) { - site_flag_value = &info->vlog_level; - // value at info->vlog_level is now what controls - // the VLOG at the caller site forever - break; - } - } - - // Cache the vlog value pointer if --vmodule flag has been parsed. - ANNOTATE_BENIGN_RACE(site_flag, - "*site_flag may be written by several threads," - " but the value will be the same"); - if (read_vmodule_flag) *site_flag = site_flag_value; - - // restore the errno in case something recoverable went wrong during - // the initialization of the VLOG mechanism (see above note "protect the..") - errno = old_errno; - return *site_flag_value >= verbose_level; -} - -_END_GOOGLE_NAMESPACE_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/config.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/config.h deleted file mode 100755 index 114762e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/config.h +++ /dev/null @@ -1,136 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Namespace for Google classes */ -#define GOOGLE_NAMESPACE google - -/* Define if you have the `dladdr' function */ -#undef HAVE_DLADDR - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_EXECINFO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBUNWIND_H - -/* define if you have google gflags library */ -#undef HAVE_LIB_GFLAGS - -/* define if you have libunwind */ -#undef HAVE_LIB_UNWIND - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* define if the compiler implements namespaces */ -#undef HAVE_NAMESPACES - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* define if the compiler implements pthread_rwlock_* */ -#undef HAVE_RWLOCK - -/* Define if you have the `sigaltstack' function */ -#undef HAVE_SIGALTSTACK - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSCALL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCALL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UCONTEXT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if the compiler supports using expression for operator */ -#undef HAVE_USING_OPERATOR - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* define if your compiler has __builtin_expect */ -#undef HAVE___BUILTIN_EXPECT - -/* define if your compiler has __sync_val_compare_and_swap */ -#undef HAVE___SYNC_VAL_COMPARE_AND_SWAP - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* How to access the PC from a struct ucontext */ -#undef PC_FROM_UCONTEXT - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* the namespace where STL code like vector<> is defined */ -#undef STL_NAMESPACE - -/* Version number of package */ -#undef VERSION - -/* Stops putting the code inside the Google namespace */ -#define _END_GOOGLE_NAMESPACE_ } - -/* Puts following code inside the Google namespace */ -#define _START_GOOGLE_NAMESPACE_ namespace google { - -/* Always the empty-string on non-windows systems. On windows, should be - "__declspec(dllexport)". This way, when we compile the dll, we export our - functions/classes. It's safe to define this here because config.h is only - used internally, to compile the DLL, and every DLL source file #includes - "config.h" before anything else. */ -#ifndef GOOGLE_GLOG_DLL_DECL -# define GOOGLE_GLOG_IS_A_DLL 1 /* not set if you're statically linking */ -# define GOOGLE_GLOG_DLL_DECL __declspec(dllexport) -# define GOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS __declspec(dllimport) -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/log_severity.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/log_severity.h deleted file mode 100644 index 5e7d09ef..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/log_severity.h +++ /dev/null @@ -1,88 +0,0 @@ -// This file is automatically generated from src/glog/log_severity.h -// using src/windows/preprocess.sh. -// DO NOT EDIT! - -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef BASE_LOG_SEVERITY_H__ -#define BASE_LOG_SEVERITY_H__ - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// Variables of type LogSeverity are widely taken to lie in the range -// [0, NUM_SEVERITIES-1]. Be careful to preserve this assumption if -// you ever need to change their values or add a new severity. -typedef int LogSeverity; - -const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4; - -// DFATAL is FATAL in debug mode, ERROR in normal mode -#ifdef NDEBUG -#define DFATAL_LEVEL ERROR -#else -#define DFATAL_LEVEL FATAL -#endif - -extern GOOGLE_GLOG_DLL_DECL const char* const LogSeverityNames[NUM_SEVERITIES]; - -// NDEBUG usage helpers related to (RAW_)DCHECK: -// -// DEBUG_MODE is for small !NDEBUG uses like -// if (DEBUG_MODE) foo.CheckThatFoo(); -// instead of substantially more verbose -// #ifndef NDEBUG -// foo.CheckThatFoo(); -// #endif -// -// IF_DEBUG_MODE is for small !NDEBUG uses like -// IF_DEBUG_MODE( string error; ) -// DCHECK(Foo(&error)) << error; -// instead of substantially more verbose -// #ifndef NDEBUG -// string error; -// DCHECK(Foo(&error)) << error; -// #endif -// -#ifdef NDEBUG -enum { DEBUG_MODE = 0 }; -#define IF_DEBUG_MODE(x) -#else -enum { DEBUG_MODE = 1 }; -#define IF_DEBUG_MODE(x) x -#endif - -#endif // BASE_LOG_SEVERITY_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/logging.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/logging.h deleted file mode 100755 index 7a6df74f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/logging.h +++ /dev/null @@ -1,1510 +0,0 @@ -// This file is automatically generated from src/glog/logging.h.in -// using src/windows/preprocess.sh. -// DO NOT EDIT! - -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney -// -// This file contains #include information about logging-related stuff. -// Pretty much everybody needs to #include this file so that they can -// log various happenings. -// -#ifndef _LOGGING_H_ -#define _LOGGING_H_ - -#include -#include -#include -#include -#if 0 -# include -#endif -#ifdef __DEPRECATED -// Make GCC quiet. -# undef __DEPRECATED -# include -# define __DEPRECATED -#else -# include -#endif -#include - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// We care a lot about number of bits things take up. Unfortunately, -// systems define their bit-specific ints in a lot of different ways. -// We use our own way, and have a typedef to get there. -// Note: these commands below may look like "#if 1" or "#if 0", but -// that's because they were constructed that way at ./configure time. -// Look at logging.h.in to see how they're calculated (based on your config). -#if 0 -#include // the normal place uint16_t is defined -#endif -#if 0 -#include // the normal place u_int16_t is defined -#endif -#if 0 -#include // a third place for uint16_t or u_int16_t -#endif - -#if 0 -#include -#endif - -namespace google { - -#if 0 // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif 0 // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif 1 // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif - -} - -// The global value of GOOGLE_STRIP_LOG. All the messages logged to -// LOG(XXX) with severity less than GOOGLE_STRIP_LOG will not be displayed. -// If it can be determined at compile time that the message will not be -// printed, the statement will be compiled out. -// -// Example: to strip out all INFO and WARNING messages, use the value -// of 2 below. To make an exception for WARNING messages from a single -// file, add "#define GOOGLE_STRIP_LOG 1" to that file _before_ including -// base/logging.h -#ifndef GOOGLE_STRIP_LOG -#define GOOGLE_STRIP_LOG 0 -#endif - -// GCC can be told that a certain branch is not likely to be taken (for -// instance, a CHECK failure), and use that information in static analysis. -// Giving it this information can help it optimize for the common case in -// the absence of better information (ie. -fprofile-arcs). -// -#ifndef GOOGLE_PREDICT_BRANCH_NOT_TAKEN -#if 0 -#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) (__builtin_expect(x, 0)) -#else -#define GOOGLE_PREDICT_BRANCH_NOT_TAKEN(x) x -#endif -#endif - -// Make a bunch of macros for logging. The way to log things is to stream -// things to LOG(). E.g., -// -// LOG(INFO) << "Found " << num_cookies << " cookies"; -// -// You can capture log messages in a string, rather than reporting them -// immediately: -// -// vector errors; -// LOG_STRING(ERROR, &errors) << "Couldn't parse cookie #" << cookie_num; -// -// This pushes back the new error onto 'errors'; if given a NULL pointer, -// it reports the error via LOG(ERROR). -// -// You can also do conditional logging: -// -// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// You can also do occasional logging (log every n'th occurrence of an -// event): -// -// LOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie"; -// -// The above will cause log messages to be output on the 1st, 11th, 21st, ... -// times it is executed. Note that the special COUNTER value is used to -// identify which repetition is happening. -// -// You can also do occasional conditional logging (log every n'th -// occurrence of an event, when condition is satisfied): -// -// LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << COUNTER -// << "th big cookie"; -// -// You can log messages the first N times your code executes a line. E.g. -// -// LOG_FIRST_N(INFO, 20) << "Got the " << COUNTER << "th cookie"; -// -// Outputs log messages for the first 20 times it is executed. -// -// Analogous SYSLOG, SYSLOG_IF, and SYSLOG_EVERY_N macros are available. -// These log to syslog as well as to the normal logs. If you use these at -// all, you need to be aware that syslog can drastically reduce performance, -// especially if it is configured for remote logging! Don't use these -// unless you fully understand this and have a concrete need to use them. -// Even then, try to minimize your use of them. -// -// There are also "debug mode" logging macros like the ones above: -// -// DLOG(INFO) << "Found cookies"; -// -// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies"; -// -// DLOG_EVERY_N(INFO, 10) << "Got the " << COUNTER << "th cookie"; -// -// All "debug mode" logging is compiled away to nothing for non-debug mode -// compiles. -// -// We also have -// -// LOG_ASSERT(assertion); -// DLOG_ASSERT(assertion); -// -// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion; -// -// There are "verbose level" logging macros. They look like -// -// VLOG(1) << "I'm printed when you run the program with --v=1 or more"; -// VLOG(2) << "I'm printed when you run the program with --v=2 or more"; -// -// These always log at the INFO log level (when they log at all). -// The verbose logging can also be turned on module-by-module. For instance, -// --vmodule=mapreduce=2,file=1,gfs*=3 --v=0 -// will cause: -// a. VLOG(2) and lower messages to be printed from mapreduce.{h,cc} -// b. VLOG(1) and lower messages to be printed from file.{h,cc} -// c. VLOG(3) and lower messages to be printed from files prefixed with "gfs" -// d. VLOG(0) and lower messages to be printed from elsewhere -// -// The wildcarding functionality shown by (c) supports both '*' (match -// 0 or more characters) and '?' (match any single character) wildcards. -// -// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as -// -// if (VLOG_IS_ON(2)) { -// // do some logging preparation and logging -// // that can't be accomplished with just VLOG(2) << ...; -// } -// -// There are also VLOG_IF, VLOG_EVERY_N and VLOG_IF_EVERY_N "verbose level" -// condition macros for sample cases, when some extra computation and -// preparation for logs is not needed. -// VLOG_IF(1, (size > 1024)) -// << "I'm printed when size is more than 1024 and when you run the " -// "program with --v=1 or more"; -// VLOG_EVERY_N(1, 10) -// << "I'm printed every 10th occurrence, and when you run the program " -// "with --v=1 or more. Present occurence is " << COUNTER; -// VLOG_IF_EVERY_N(1, (size > 1024), 10) -// << "I'm printed on every 10th occurence of case when size is more " -// " than 1024, when you run the program with --v=1 or more. "; -// "Present occurence is " << COUNTER; -// -// The supported severity levels for macros that allow you to specify one -// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL. -// Note that messages of a given severity are logged not only in the -// logfile for that severity, but also in all logfiles of lower severity. -// E.g., a message of severity FATAL will be logged to the logfiles of -// severity FATAL, ERROR, WARNING, and INFO. -// -// There is also the special severity of DFATAL, which logs FATAL in -// debug mode, ERROR in normal mode. -// -// Very important: logging a message at the FATAL severity level causes -// the program to terminate (after the message is logged). -// -// Unless otherwise specified, logs will be written to the filename -// "...log..", followed -// by the date, time, and pid (you can't prevent the date, time, and pid -// from being in the filename). -// -// The logging code takes two flags: -// --v=# set the verbose level -// --logtostderr log all the messages to stderr instead of to logfiles - -// LOG LINE PREFIX FORMAT -// -// Log lines have this form: -// -// Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... -// -// where the fields are defined as follows: -// -// L A single character, representing the log level -// (eg 'I' for INFO) -// mm The month (zero padded; ie May is '05') -// dd The day (zero padded) -// hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds -// threadid The space-padded thread ID as returned by GetTID() -// (this matches the PID on Linux) -// file The file name -// line The line number -// msg The user-supplied message -// -// Example: -// -// I1103 11:57:31.739339 24395 google.cc:2341] Command line: ./some_prog -// I1103 11:57:31.739403 24395 google.cc:2342] Process id 24395 -// -// NOTE: although the microseconds are useful for comparing events on -// a single machine, clocks on different machines may not be well -// synchronized. Hence, use caution when comparing the low bits of -// timestamps from different machines. - -#ifndef DECLARE_VARIABLE -#define MUST_UNDEF_GFLAGS_DECLARE_MACROS -#define DECLARE_VARIABLE(type, name, tn) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead { \ - extern GOOGLE_GLOG_DLL_DECL type FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_##tn##_instead::FLAGS_##name - -// bool specialization -#define DECLARE_bool(name) \ - DECLARE_VARIABLE(bool, name, bool) - -// int32 specialization -#define DECLARE_int32(name) \ - DECLARE_VARIABLE(google::int32, name, int32) - -// Special case for string, because we have to specify the namespace -// std::string, which doesn't play nicely with our FLAG__namespace hackery. -#define DECLARE_string(name) \ - namespace FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead { \ - extern GOOGLE_GLOG_DLL_DECL std::string FLAGS_##name; \ - } \ - using FLAG__namespace_do_not_use_directly_use_DECLARE_string_instead::FLAGS_##name -#endif - -// Set whether log messages go to stderr instead of logfiles -DECLARE_bool(logtostderr); - -// Set whether log messages go to stderr in addition to logfiles. -DECLARE_bool(alsologtostderr); - -// Log messages at a level >= this flag are automatically sent to -// stderr in addition to log files. -DECLARE_int32(stderrthreshold); - -// Set whether the log prefix should be prepended to each line of output. -DECLARE_bool(log_prefix); - -// Log messages at a level <= this flag are buffered. -// Log messages at a higher level are flushed immediately. -DECLARE_int32(logbuflevel); - -// Sets the maximum number of seconds which logs may be buffered for. -DECLARE_int32(logbufsecs); - -// Log suppression level: messages logged at a lower level than this -// are suppressed. -DECLARE_int32(minloglevel); - -// If specified, logfiles are written into this directory instead of the -// default logging directory. -DECLARE_string(log_dir); - -// Sets the path of the directory into which to put additional links -// to the log files. -DECLARE_string(log_link); - -DECLARE_int32(v); // in vlog_is_on.cc - -// Sets the maximum log file size (in MB). -DECLARE_int32(max_log_size); - -// Sets whether to avoid logging to the disk if the disk is full. -DECLARE_bool(stop_logging_if_full_disk); - -#ifdef MUST_UNDEF_GFLAGS_DECLARE_MACROS -#undef MUST_UNDEF_GFLAGS_DECLARE_MACROS -#undef DECLARE_VARIABLE -#undef DECLARE_bool -#undef DECLARE_int32 -#undef DECLARE_string -#endif - -// Log messages below the GOOGLE_STRIP_LOG level will be compiled away for -// security reasons. See LOG(severtiy) below. - -// A few definitions of macros that don't generate much code. Since -// LOG(INFO) and its ilk are used all over our code, it's -// better to have compact code for these operations. - -#if GOOGLE_STRIP_LOG == 0 -#define COMPACT_GOOGLE_LOG_INFO google::LogMessage( \ - __FILE__, __LINE__) -#define LOG_TO_STRING_INFO(message) google::LogMessage( \ - __FILE__, __LINE__, google::INFO, message) -#else -#define COMPACT_GOOGLE_LOG_INFO google::NullStream() -#define LOG_TO_STRING_INFO(message) google::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 1 -#define COMPACT_GOOGLE_LOG_WARNING google::LogMessage( \ - __FILE__, __LINE__, google::WARNING) -#define LOG_TO_STRING_WARNING(message) google::LogMessage( \ - __FILE__, __LINE__, google::WARNING, message) -#else -#define COMPACT_GOOGLE_LOG_WARNING google::NullStream() -#define LOG_TO_STRING_WARNING(message) google::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 2 -#define COMPACT_GOOGLE_LOG_ERROR google::LogMessage( \ - __FILE__, __LINE__, google::ERROR) -#define LOG_TO_STRING_ERROR(message) google::LogMessage( \ - __FILE__, __LINE__, google::ERROR, message) -#else -#define COMPACT_GOOGLE_LOG_ERROR google::NullStream() -#define LOG_TO_STRING_ERROR(message) google::NullStream() -#endif - -#if GOOGLE_STRIP_LOG <= 3 -#define COMPACT_GOOGLE_LOG_FATAL google::LogMessageFatal( \ - __FILE__, __LINE__) -#define LOG_TO_STRING_FATAL(message) google::LogMessage( \ - __FILE__, __LINE__, google::FATAL, message) -#else -#define COMPACT_GOOGLE_LOG_FATAL google::NullStreamFatal() -#define LOG_TO_STRING_FATAL(message) google::NullStreamFatal() -#endif - -// For DFATAL, we want to use LogMessage (as opposed to -// LogMessageFatal), to be consistent with the original behavior. -#ifdef NDEBUG -#define COMPACT_GOOGLE_LOG_DFATAL COMPACT_GOOGLE_LOG_ERROR -#elif GOOGLE_STRIP_LOG <= 3 -#define COMPACT_GOOGLE_LOG_DFATAL google::LogMessage( \ - __FILE__, __LINE__, google::FATAL) -#else -#define COMPACT_GOOGLE_LOG_DFATAL google::NullStreamFatal() -#endif - -#define GOOGLE_LOG_INFO(counter) google::LogMessage(__FILE__, __LINE__, google::INFO, counter, &google::LogMessage::SendToLog) -#define SYSLOG_INFO(counter) \ - google::LogMessage(__FILE__, __LINE__, google::INFO, counter, \ - &google::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_WARNING(counter) \ - google::LogMessage(__FILE__, __LINE__, google::WARNING, counter, \ - &google::LogMessage::SendToLog) -#define SYSLOG_WARNING(counter) \ - google::LogMessage(__FILE__, __LINE__, google::WARNING, counter, \ - &google::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_ERROR(counter) \ - google::LogMessage(__FILE__, __LINE__, google::ERROR, counter, \ - &google::LogMessage::SendToLog) -#define SYSLOG_ERROR(counter) \ - google::LogMessage(__FILE__, __LINE__, google::ERROR, counter, \ - &google::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_FATAL(counter) \ - google::LogMessage(__FILE__, __LINE__, google::FATAL, counter, \ - &google::LogMessage::SendToLog) -#define SYSLOG_FATAL(counter) \ - google::LogMessage(__FILE__, __LINE__, google::FATAL, counter, \ - &google::LogMessage::SendToSyslogAndLog) -#define GOOGLE_LOG_DFATAL(counter) \ - google::LogMessage(__FILE__, __LINE__, google::DFATAL_LEVEL, counter, \ - &google::LogMessage::SendToLog) -#define SYSLOG_DFATAL(counter) \ - google::LogMessage(__FILE__, __LINE__, google::DFATAL_LEVEL, counter, \ - &google::LogMessage::SendToSyslogAndLog) - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) || defined(__CYGWIN32__) -// A very useful logging macro to log windows errors: -#define LOG_SYSRESULT(result) \ - if (FAILED(result)) { \ - LPTSTR message = NULL; \ - LPTSTR msg = reinterpret_cast(&message); \ - DWORD message_length = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | \ - FORMAT_MESSAGE_FROM_SYSTEM, \ - 0, result, 0, msg, 100, NULL); \ - if (message_length > 0) { \ - google::LogMessage(__FILE__, __LINE__, ERROR, 0, \ - &google::LogMessage::SendToLog).stream() << message; \ - LocalFree(message); \ - } \ - } -#endif - -// We use the preprocessor's merging operator, "##", so that, e.g., -// LOG(INFO) becomes the token GOOGLE_LOG_INFO. There's some funny -// subtle difference between ostream member streaming functions (e.g., -// ostream::operator<<(int) and ostream non-member streaming functions -// (e.g., ::operator<<(ostream&, string&): it turns out that it's -// impossible to stream something like a string directly to an unnamed -// ostream. We employ a neat hack by calling the stream() member -// function of LogMessage which seems to avoid the problem. -#define LOG(severity) COMPACT_GOOGLE_LOG_ ## severity.stream() -#define SYSLOG(severity) SYSLOG_ ## severity(0).stream() - -namespace google { - -// They need the definitions of integer types. -#include "glog/log_severity.h" -#include "glog/vlog_is_on.h" - -// Initialize google's logging library. You will see the program name -// specified by argv0 in log outputs. -GOOGLE_GLOG_DLL_DECL void InitGoogleLogging(const char* argv0); - -// Shutdown google's logging library. -GOOGLE_GLOG_DLL_DECL void ShutdownGoogleLogging(); - -// Install a function which will be called after LOG(FATAL). -GOOGLE_GLOG_DLL_DECL void InstallFailureFunction(void (*fail_func)()); - -class LogSink; // defined below - -// If a non-NULL sink pointer is given, we push this message to that sink. -// For LOG_TO_SINK we then do normal LOG(severity) logging as well. -// This is useful for capturing messages and passing/storing them -// somewhere more specific than the global log of the process. -// Argument types: -// LogSink* sink; -// LogSeverity severity; -// The cast is to disambiguate NULL arguments. -#define LOG_TO_SINK(sink, severity) \ - google::LogMessage( \ - __FILE__, __LINE__, \ - google::severity, \ - static_cast(sink), true).stream() -#define LOG_TO_SINK_BUT_NOT_TO_LOGFILE(sink, severity) \ - google::LogMessage( \ - __FILE__, __LINE__, \ - google::severity, \ - static_cast(sink), false).stream() - -// If a non-NULL string pointer is given, we write this message to that string. -// We then do normal LOG(severity) logging as well. -// This is useful for capturing messages and storing them somewhere more -// specific than the global log of the process. -// Argument types: -// string* message; -// LogSeverity severity; -// The cast is to disambiguate NULL arguments. -// NOTE: LOG(severity) expands to LogMessage().stream() for the specified -// severity. -#define LOG_TO_STRING(severity, message) \ - LOG_TO_STRING_##severity(static_cast(message)).stream() - -// If a non-NULL pointer is given, we push the message onto the end -// of a vector of strings; otherwise, we report it with LOG(severity). -// This is handy for capturing messages and perhaps passing them back -// to the caller, rather than reporting them immediately. -// Argument types: -// LogSeverity severity; -// vector *outvec; -// The cast is to disambiguate NULL arguments. -#define LOG_STRING(severity, outvec) \ - LOG_TO_STRING_##severity(static_cast*>(outvec)).stream() - -#define LOG_IF(severity, condition) \ - !(condition) ? (void) 0 : google::LogMessageVoidify() & LOG(severity) -#define SYSLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : google::LogMessageVoidify() & SYSLOG(severity) - -#define LOG_ASSERT(condition) \ - LOG_IF(FATAL, !(condition)) << "Assert failed: " #condition -#define SYSLOG_ASSERT(condition) \ - SYSLOG_IF(FATAL, !(condition)) << "Assert failed: " #condition - -// CHECK dies with a fatal error if condition is not true. It is *not* -// controlled by NDEBUG, so the check will be executed regardless of -// compilation mode. Therefore, it is safe to do things like: -// CHECK(fp->Write(x) == 4) -#define CHECK(condition) \ - LOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN(!(condition))) \ - << "Check failed: " #condition " " - -// A container for a string pointer which can be evaluated to a bool - -// true iff the pointer is NULL. -struct CheckOpString { - CheckOpString(std::string* str) : str_(str) { } - // No destructor: if str_ is non-NULL, we're about to LOG(FATAL), - // so there's no point in cleaning up str_. - operator bool() const { - return GOOGLE_PREDICT_BRANCH_NOT_TAKEN(str_ != NULL); - } - std::string* str_; -}; - -// Function is overloaded for integral types to allow static const -// integrals declared in classes and not defined to be used as arguments to -// CHECK* macros. It's not encouraged though. -template -inline const T& GetReferenceableValue(const T& t) { return t; } -inline char GetReferenceableValue(char t) { return t; } -inline unsigned char GetReferenceableValue(unsigned char t) { return t; } -inline signed char GetReferenceableValue(signed char t) { return t; } -inline short GetReferenceableValue(short t) { return t; } -inline unsigned short GetReferenceableValue(unsigned short t) { return t; } -inline int GetReferenceableValue(int t) { return t; } -inline unsigned int GetReferenceableValue(unsigned int t) { return t; } -inline long GetReferenceableValue(long t) { return t; } -inline unsigned long GetReferenceableValue(unsigned long t) { return t; } -inline long long GetReferenceableValue(long long t) { return t; } -inline unsigned long long GetReferenceableValue(unsigned long long t) { - return t; -} - -// This is a dummy class to define the following operator. -struct DummyClassToDefineOperator {}; - -} - -// Define global operator<< to declare using ::operator<<. -// This declaration will allow use to use CHECK macros for user -// defined classes which have operator<< (e.g., stl_logging.h). -inline std::ostream& operator<<( - std::ostream& out, const google::DummyClassToDefineOperator&) { - return out; -} - -namespace google { - -// Build the error message string. -template -std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) { - // It means that we cannot use stl_logging if compiler doesn't - // support using expression for operator. - // TODO(hamaji): Figure out a way to fix. -#if 1 - using ::operator<<; -#endif - std::strstream ss; - ss << names << " (" << v1 << " vs. " << v2 << ")"; - return new std::string(ss.str(), ss.pcount()); -} - -// Helper functions for CHECK_OP macro. -// The (int, int) specialization works around the issue that the compiler -// will not instantiate the template version of the function on values of -// unnamed enum type - see comment below. -#define DEFINE_CHECK_OP_IMPL(name, op) \ - template \ - inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \ - const char* names) { \ - if (v1 op v2) return NULL; \ - else return MakeCheckOpString(v1, v2, names); \ - } \ - inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \ - return Check##name##Impl(v1, v2, names); \ - } - -// Use _EQ, _NE, _LE, etc. in case the file including base/logging.h -// provides its own #defines for the simpler names EQ, NE, LE, etc. -// This happens if, for example, those are used as token names in a -// yacc grammar. -DEFINE_CHECK_OP_IMPL(_EQ, ==) -DEFINE_CHECK_OP_IMPL(_NE, !=) -DEFINE_CHECK_OP_IMPL(_LE, <=) -DEFINE_CHECK_OP_IMPL(_LT, < ) -DEFINE_CHECK_OP_IMPL(_GE, >=) -DEFINE_CHECK_OP_IMPL(_GT, > ) -#undef DEFINE_CHECK_OP_IMPL - -// Helper macro for binary operators. -// Don't use this macro directly in your code, use CHECK_EQ et al below. - -#if defined(STATIC_ANALYSIS) -// Only for static analysis tool to know that it is equivalent to assert -#define CHECK_OP_LOG(name, op, val1, val2, log) CHECK((val1) op (val2)) -#elif !defined(NDEBUG) -// In debug mode, avoid constructing CheckOpStrings if possible, -// to reduce the overhead of CHECK statments by 2x. -// Real DCHECK-heavy tests have seen 1.5x speedups. - -// The meaning of "string" might be different between now and -// when this macro gets invoked (e.g., if someone is experimenting -// with other string implementations that get defined after this -// file is included). Save the current meaning now and use it -// in the macro. -typedef std::string _Check_string; -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (google::_Check_string* _result = \ - google::Check##name##Impl( \ - google::GetReferenceableValue(val1), \ - google::GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ - log(__FILE__, __LINE__, \ - google::CheckOpString(_result)).stream() -#else -// In optimized mode, use CheckOpString to hint to compiler that -// the while condition is unlikely. -#define CHECK_OP_LOG(name, op, val1, val2, log) \ - while (google::CheckOpString _result = \ - google::Check##name##Impl( \ - google::GetReferenceableValue(val1), \ - google::GetReferenceableValue(val2), \ - #val1 " " #op " " #val2)) \ - log(__FILE__, __LINE__, _result).stream() -#endif // STATIC_ANALYSIS, !NDEBUG - -#if GOOGLE_STRIP_LOG <= 3 -#define CHECK_OP(name, op, val1, val2) \ - CHECK_OP_LOG(name, op, val1, val2, google::LogMessageFatal) -#else -#define CHECK_OP(name, op, val1, val2) \ - CHECK_OP_LOG(name, op, val1, val2, google::NullStreamFatal) -#endif // STRIP_LOG <= 3 - -// Equality/Inequality checks - compare two values, and log a FATAL message -// including the two values when the result is not as expected. The values -// must have operator<<(ostream, ...) defined. -// -// You may append to the error message like so: -// CHECK_NE(1, 2) << ": The world must be ending!"; -// -// We are very careful to ensure that each argument is evaluated exactly -// once, and that anything which is legal to pass as a function argument is -// legal here. In particular, the arguments may be temporary expressions -// which will end up being destroyed at the end of the apparent statement, -// for example: -// CHECK_EQ(string("abc")[1], 'b'); -// -// WARNING: These don't compile correctly if one of the arguments is a pointer -// and the other is NULL. To work around this, simply static_cast NULL to the -// type of the desired pointer. - -#define CHECK_EQ(val1, val2) CHECK_OP(_EQ, ==, val1, val2) -#define CHECK_NE(val1, val2) CHECK_OP(_NE, !=, val1, val2) -#define CHECK_LE(val1, val2) CHECK_OP(_LE, <=, val1, val2) -#define CHECK_LT(val1, val2) CHECK_OP(_LT, < , val1, val2) -#define CHECK_GE(val1, val2) CHECK_OP(_GE, >=, val1, val2) -#define CHECK_GT(val1, val2) CHECK_OP(_GT, > , val1, val2) - -// Check that the input is non NULL. This very useful in constructor -// initializer lists. - -#define CHECK_NOTNULL(val) \ - google::CheckNotNull(__FILE__, __LINE__, "'" #val "' Must be non NULL", (val)) - -// Helper functions for string comparisons. -// To avoid bloat, the definitions are in logging.cc. -#define DECLARE_CHECK_STROP_IMPL(func, expected) \ - GOOGLE_GLOG_DLL_DECL std::string* Check##func##expected##Impl( \ - const char* s1, const char* s2, const char* names); -DECLARE_CHECK_STROP_IMPL(strcmp, true) -DECLARE_CHECK_STROP_IMPL(strcmp, false) -DECLARE_CHECK_STROP_IMPL(strcasecmp, true) -DECLARE_CHECK_STROP_IMPL(strcasecmp, false) -#undef DECLARE_CHECK_STROP_IMPL - -// Helper macro for string comparisons. -// Don't use this macro directly in your code, use CHECK_STREQ et al below. -#define CHECK_STROP(func, op, expected, s1, s2) \ - while (google::CheckOpString _result = \ - google::Check##func##expected##Impl((s1), (s2), \ - #s1 " " #op " " #s2)) \ - LOG(FATAL) << *_result.str_ - - -// String (char*) equality/inequality checks. -// CASE versions are case-insensitive. -// -// Note that "s1" and "s2" may be temporary strings which are destroyed -// by the compiler at the end of the current "full expression" -// (e.g. CHECK_STREQ(Foo().c_str(), Bar().c_str())). - -#define CHECK_STREQ(s1, s2) CHECK_STROP(strcmp, ==, true, s1, s2) -#define CHECK_STRNE(s1, s2) CHECK_STROP(strcmp, !=, false, s1, s2) -#define CHECK_STRCASEEQ(s1, s2) CHECK_STROP(strcasecmp, ==, true, s1, s2) -#define CHECK_STRCASENE(s1, s2) CHECK_STROP(strcasecmp, !=, false, s1, s2) - -#define CHECK_INDEX(I,A) CHECK(I < (sizeof(A)/sizeof(A[0]))) -#define CHECK_BOUND(B,A) CHECK(B <= (sizeof(A)/sizeof(A[0]))) - -#define CHECK_DOUBLE_EQ(val1, val2) \ - do { \ - CHECK_LE((val1), (val2)+0.000000000000001L); \ - CHECK_GE((val1), (val2)-0.000000000000001L); \ - } while (0) - -#define CHECK_NEAR(val1, val2, margin) \ - do { \ - CHECK_LE((val1), (val2)+(margin)); \ - CHECK_GE((val1), (val2)-(margin)); \ - } while (0) - -// perror()..googly style! -// -// PLOG() and PLOG_IF() and PCHECK() behave exactly like their LOG* and -// CHECK equivalents with the addition that they postpend a description -// of the current state of errno to their output lines. - -#define PLOG(severity) GOOGLE_PLOG(severity, 0).stream() - -#define GOOGLE_PLOG(severity, counter) \ - google::ErrnoLogMessage( \ - __FILE__, __LINE__, google::severity, counter, \ - &google::LogMessage::SendToLog) - -#define PLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : google::LogMessageVoidify() & PLOG(severity) - -// A CHECK() macro that postpends errno if the condition is false. E.g. -// -// if (poll(fds, nfds, timeout) == -1) { PCHECK(errno == EINTR); ... } -#define PCHECK(condition) \ - PLOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN(!(condition))) \ - << "Check failed: " #condition " " - -// A CHECK() macro that lets you assert the success of a function that -// returns -1 and sets errno in case of an error. E.g. -// -// CHECK_ERR(mkdir(path, 0700)); -// -// or -// -// int fd = open(filename, flags); CHECK_ERR(fd) << ": open " << filename; -#define CHECK_ERR(invocation) \ -PLOG_IF(FATAL, GOOGLE_PREDICT_BRANCH_NOT_TAKEN((invocation) == -1)) \ - << #invocation - -// Use macro expansion to create, for each use of LOG_EVERY_N(), static -// variables with the __LINE__ expansion as part of the variable name. -#define LOG_EVERY_N_VARNAME(base, line) LOG_EVERY_N_VARNAME_CONCAT(base, line) -#define LOG_EVERY_N_VARNAME_CONCAT(base, line) base ## line - -#define LOG_OCCURRENCES LOG_EVERY_N_VARNAME(occurrences_, __LINE__) -#define LOG_OCCURRENCES_MOD_N LOG_EVERY_N_VARNAME(occurrences_mod_n_, __LINE__) - -#define SOME_KIND_OF_LOG_EVERY_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (++LOG_OCCURRENCES_MOD_N > n) LOG_OCCURRENCES_MOD_N -= n; \ - if (LOG_OCCURRENCES_MOD_N == 1) \ - google::LogMessage( \ - __FILE__, __LINE__, google::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_LOG_IF_EVERY_N(severity, condition, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (condition && \ - ((LOG_OCCURRENCES_MOD_N=(LOG_OCCURRENCES_MOD_N + 1) % n) == (1 % n))) \ - google::LogMessage( \ - __FILE__, __LINE__, google::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_PLOG_EVERY_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ - ++LOG_OCCURRENCES; \ - if (++LOG_OCCURRENCES_MOD_N > n) LOG_OCCURRENCES_MOD_N -= n; \ - if (LOG_OCCURRENCES_MOD_N == 1) \ - google::ErrnoLogMessage( \ - __FILE__, __LINE__, google::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -#define SOME_KIND_OF_LOG_FIRST_N(severity, n, what_to_do) \ - static int LOG_OCCURRENCES = 0; \ - if (LOG_OCCURRENCES <= n) \ - ++LOG_OCCURRENCES; \ - if (LOG_OCCURRENCES <= n) \ - google::LogMessage( \ - __FILE__, __LINE__, google::severity, LOG_OCCURRENCES, \ - &what_to_do).stream() - -namespace glog_internal_namespace_ { -template -struct CompileAssert { -}; -struct CrashReason; -} // namespace glog_internal_namespace_ - -#define GOOGLE_GLOG_COMPILE_ASSERT(expr, msg) \ - typedef google::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] - -#define LOG_EVERY_N(severity, n) \ - GOOGLE_GLOG_COMPILE_ASSERT(google::severity < \ - google::NUM_SEVERITIES, \ - INVALID_REQUESTED_LOG_SEVERITY); \ - SOME_KIND_OF_LOG_EVERY_N(severity, (n), google::LogMessage::SendToLog) - -#define SYSLOG_EVERY_N(severity, n) \ - SOME_KIND_OF_LOG_EVERY_N(severity, (n), google::LogMessage::SendToSyslogAndLog) - -#define PLOG_EVERY_N(severity, n) \ - SOME_KIND_OF_PLOG_EVERY_N(severity, (n), google::LogMessage::SendToLog) - -#define LOG_FIRST_N(severity, n) \ - SOME_KIND_OF_LOG_FIRST_N(severity, (n), google::LogMessage::SendToLog) - -#define LOG_IF_EVERY_N(severity, condition, n) \ - SOME_KIND_OF_LOG_IF_EVERY_N(severity, (condition), (n), google::LogMessage::SendToLog) - -// We want the special COUNTER value available for LOG_EVERY_X()'ed messages -enum PRIVATE_Counter {COUNTER}; - - -// Plus some debug-logging macros that get compiled to nothing for production - -#ifndef NDEBUG - -#define DLOG(severity) LOG(severity) -#define DVLOG(verboselevel) VLOG(verboselevel) -#define DLOG_IF(severity, condition) LOG_IF(severity, condition) -#define DLOG_EVERY_N(severity, n) LOG_EVERY_N(severity, n) -#define DLOG_IF_EVERY_N(severity, condition, n) \ - LOG_IF_EVERY_N(severity, condition, n) -#define DLOG_ASSERT(condition) LOG_ASSERT(condition) - -// debug-only checking. not executed in NDEBUG mode. -#define DCHECK(condition) CHECK(condition) -#define DCHECK_EQ(val1, val2) CHECK_EQ(val1, val2) -#define DCHECK_NE(val1, val2) CHECK_NE(val1, val2) -#define DCHECK_LE(val1, val2) CHECK_LE(val1, val2) -#define DCHECK_LT(val1, val2) CHECK_LT(val1, val2) -#define DCHECK_GE(val1, val2) CHECK_GE(val1, val2) -#define DCHECK_GT(val1, val2) CHECK_GT(val1, val2) -#define DCHECK_NOTNULL(val) CHECK_NOTNULL(val) -#define DCHECK_STREQ(str1, str2) CHECK_STREQ(str1, str2) -#define DCHECK_STRCASEEQ(str1, str2) CHECK_STRCASEEQ(str1, str2) -#define DCHECK_STRNE(str1, str2) CHECK_STRNE(str1, str2) -#define DCHECK_STRCASENE(str1, str2) CHECK_STRCASENE(str1, str2) - -#else // NDEBUG - -#define DLOG(severity) \ - true ? (void) 0 : google::LogMessageVoidify() & LOG(severity) - -#define DVLOG(verboselevel) \ - (true || !VLOG_IS_ON(verboselevel)) ?\ - (void) 0 : google::LogMessageVoidify() & LOG(INFO) - -#define DLOG_IF(severity, condition) \ - (true || !(condition)) ? (void) 0 : google::LogMessageVoidify() & LOG(severity) - -#define DLOG_EVERY_N(severity, n) \ - true ? (void) 0 : google::LogMessageVoidify() & LOG(severity) - -#define DLOG_IF_EVERY_N(severity, condition, n) \ - (true || !(condition))? (void) 0 : google::LogMessageVoidify() & LOG(severity) - -#define DLOG_ASSERT(condition) \ - true ? (void) 0 : LOG_ASSERT(condition) - -#define DCHECK(condition) \ - while (false) \ - CHECK(condition) - -#define DCHECK_EQ(val1, val2) \ - while (false) \ - CHECK_EQ(val1, val2) - -#define DCHECK_NE(val1, val2) \ - while (false) \ - CHECK_NE(val1, val2) - -#define DCHECK_LE(val1, val2) \ - while (false) \ - CHECK_LE(val1, val2) - -#define DCHECK_LT(val1, val2) \ - while (false) \ - CHECK_LT(val1, val2) - -#define DCHECK_GE(val1, val2) \ - while (false) \ - CHECK_GE(val1, val2) - -#define DCHECK_GT(val1, val2) \ - while (false) \ - CHECK_GT(val1, val2) - -#define DCHECK_NOTNULL(val) (val) - -#define DCHECK_STREQ(str1, str2) \ - while (false) \ - CHECK_STREQ(str1, str2) - -#define DCHECK_STRCASEEQ(str1, str2) \ - while (false) \ - CHECK_STRCASEEQ(str1, str2) - -#define DCHECK_STRNE(str1, str2) \ - while (false) \ - CHECK_STRNE(str1, str2) - -#define DCHECK_STRCASENE(str1, str2) \ - while (false) \ - CHECK_STRCASENE(str1, str2) - - -#endif // NDEBUG - -// Log only in verbose mode. - -#define VLOG(verboselevel) LOG_IF(INFO, VLOG_IS_ON(verboselevel)) - -#define VLOG_IF(verboselevel, condition) \ - LOG_IF(INFO, (condition) && VLOG_IS_ON(verboselevel)) - -#define VLOG_EVERY_N(verboselevel, n) \ - LOG_IF_EVERY_N(INFO, VLOG_IS_ON(verboselevel), n) - -#define VLOG_IF_EVERY_N(verboselevel, condition, n) \ - LOG_IF_EVERY_N(INFO, (condition) && VLOG_IS_ON(verboselevel), n) - -// -// This class more or less represents a particular log message. You -// create an instance of LogMessage and then stream stuff to it. -// When you finish streaming to it, ~LogMessage is called and the -// full message gets streamed to the appropriate destination. -// -// You shouldn't actually use LogMessage's constructor to log things, -// though. You should use the LOG() macro (and variants thereof) -// above. -class GOOGLE_GLOG_DLL_DECL LogMessage { -public: - enum { - // Passing kNoLogPrefix for the line number disables the - // log-message prefix. Useful for using the LogMessage - // infrastructure as a printing utility. See also the --log_prefix - // flag for controlling the log-message prefix on an - // application-wide basis. - kNoLogPrefix = -1 - }; - - // LogStream inherit from non-DLL-exported class (std::ostrstream) - // and VC++ produces a warning for this situation. - // However, MSDN says "C4275 can be ignored in Microsoft Visual C++ - // 2005 if you are deriving from a type in the Standard C++ Library" - // http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx - // Let's just ignore the warning. -#ifdef _MSC_VER -# pragma warning(disable: 4275) -#endif - class GOOGLE_GLOG_DLL_DECL LogStream : public std::ostrstream { -#ifdef _MSC_VER -# pragma warning(default: 4275) -#endif - public: - LogStream(char *buf, int len, int ctr) - : ostrstream(buf, len), - ctr_(ctr) { - self_ = this; - } - - int ctr() const { return ctr_; } - void set_ctr(int ctr) { ctr_ = ctr; } - LogStream* self() const { return self_; } - - private: - int ctr_; // Counter hack (for the LOG_EVERY_X() macro) - LogStream *self_; // Consistency check hack - }; - -public: - // icc 8 requires this typedef to avoid an internal compiler error. - typedef void (LogMessage::*SendMethod)(); - - LogMessage(const char* file, int line, LogSeverity severity, int ctr, - SendMethod send_method); - - // Two special constructors that generate reduced amounts of code at - // LOG call sites for common cases. - - // Used for LOG(INFO): Implied are: - // severity = INFO, ctr = 0, send_method = &LogMessage::SendToLog. - // - // Using this constructor instead of the more complex constructor above - // saves 19 bytes per call site. - LogMessage(const char* file, int line); - - // Used for LOG(severity) where severity != INFO. Implied - // are: ctr = 0, send_method = &LogMessage::SendToLog - // - // Using this constructor instead of the more complex constructor above - // saves 17 bytes per call site. - LogMessage(const char* file, int line, LogSeverity severity); - - // Constructor to log this message to a specified sink (if not NULL). - // Implied are: ctr = 0, send_method = &LogMessage::SendToSinkAndLog if - // also_send_to_log is true, send_method = &LogMessage::SendToSink otherwise. - LogMessage(const char* file, int line, LogSeverity severity, LogSink* sink, - bool also_send_to_log); - - // Constructor where we also give a vector pointer - // for storing the messages (if the pointer is not NULL). - // Implied are: ctr = 0, send_method = &LogMessage::SaveOrSendToLog. - LogMessage(const char* file, int line, LogSeverity severity, - std::vector* outvec); - - // Constructor where we also give a string pointer for storing the - // message (if the pointer is not NULL). Implied are: ctr = 0, - // send_method = &LogMessage::WriteToStringAndLog. - LogMessage(const char* file, int line, LogSeverity severity, - std::string* message); - - // A special constructor used for check failures - LogMessage(const char* file, int line, const CheckOpString& result); - - ~LogMessage(); - - // Flush a buffered message to the sink set in the constructor. Always - // called by the destructor, it may also be called from elsewhere if - // needed. Only the first call is actioned; any later ones are ignored. - void Flush(); - - // An arbitrary limit on the length of a single log message. This - // is so that streaming can be done more efficiently. - static const size_t kMaxLogMessageLen; - - // Theses should not be called directly outside of logging.*, - // only passed as SendMethod arguments to other LogMessage methods: - void SendToLog(); // Actually dispatch to the logs - void SendToSyslogAndLog(); // Actually dispatch to syslog and the logs - - // Call abort() or similar to perform LOG(FATAL) crash. - static void Fail() ; - - std::ostream& stream() { return *(data_->stream_); } - - int preserved_errno() const { return data_->preserved_errno_; } - - // Must be called without the log_mutex held. (L < log_mutex) - static int64 num_messages(int severity); - -private: - // Fully internal SendMethod cases: - void SendToSinkAndLog(); // Send to sink if provided and dispatch to the logs - void SendToSink(); // Send to sink if provided, do nothing otherwise. - - // Write to string if provided and dispatch to the logs. - void WriteToStringAndLog(); - - void SaveOrSendToLog(); // Save to stringvec if provided, else to logs - - void Init(const char* file, int line, LogSeverity severity, - void (LogMessage::*send_method)()); - - // Used to fill in crash information during LOG(FATAL) failures. - void RecordCrashReason(glog_internal_namespace_::CrashReason* reason); - - // Counts of messages sent at each priority: - static int64 num_messages_[NUM_SEVERITIES]; // under log_mutex - - // We keep the data in a separate struct so that each instance of - // LogMessage uses less stack space. - struct GOOGLE_GLOG_DLL_DECL LogMessageData { - LogMessageData() {}; - - int preserved_errno_; // preserved errno - char* buf_; - char* message_text_; // Complete message text (points to selected buffer) - LogStream* stream_alloc_; - LogStream* stream_; - char severity_; // What level is this LogMessage logged at? - int line_; // line number where logging call is. - void (LogMessage::*send_method_)(); // Call this in destructor to send - union { // At most one of these is used: union to keep the size low. - LogSink* sink_; // NULL or sink to send message to - std::vector* outvec_; // NULL or vector to push message onto - std::string* message_; // NULL or string to write message into - }; - time_t timestamp_; // Time of creation of LogMessage - struct ::tm tm_time_; // Time of creation of LogMessage - size_t num_prefix_chars_; // # of chars of prefix in this message - size_t num_chars_to_log_; // # of chars of msg to send to log - size_t num_chars_to_syslog_; // # of chars of msg to send to syslog - const char* basename_; // basename of file that called LOG - const char* fullname_; // fullname of file that called LOG - bool has_been_flushed_; // false => data has not been flushed - bool first_fatal_; // true => this was first fatal msg - - ~LogMessageData(); - private: - LogMessageData(const LogMessageData&); - void operator=(const LogMessageData&); - }; - - static LogMessageData fatal_msg_data_exclusive_; - static LogMessageData fatal_msg_data_shared_; - - LogMessageData* allocated_; - LogMessageData* data_; - - friend class LogDestination; - - LogMessage(const LogMessage&); - void operator=(const LogMessage&); -}; - -// This class happens to be thread-hostile because all instances share -// a single data buffer, but since it can only be created just before -// the process dies, we don't worry so much. -class GOOGLE_GLOG_DLL_DECL LogMessageFatal : public LogMessage { - public: - LogMessageFatal(const char* file, int line); - LogMessageFatal(const char* file, int line, const CheckOpString& result); - ~LogMessageFatal() ; -}; - -// A non-macro interface to the log facility; (useful -// when the logging level is not a compile-time constant). -inline void LogAtLevel(int const severity, std::string const &msg) { - LogMessage(__FILE__, __LINE__, severity).stream() << msg; -} - -// A macro alternative of LogAtLevel. New code may want to use this -// version since there are two advantages: 1. this version outputs the -// file name and the line number where this macro is put like other -// LOG macros, 2. this macro can be used as C++ stream. -#define LOG_AT_LEVEL(severity) google::LogMessage(__FILE__, __LINE__, severity).stream() - -// A small helper for CHECK_NOTNULL(). -template -T* CheckNotNull(const char *file, int line, const char *names, T* t) { - if (t == NULL) { - LogMessageFatal(file, line, new std::string(names)); - } - return t; -} - -// Allow folks to put a counter in the LOG_EVERY_X()'ed messages. This -// only works if ostream is a LogStream. If the ostream is not a -// LogStream you'll get an assert saying as much at runtime. -GOOGLE_GLOG_DLL_DECL std::ostream& operator<<(std::ostream &os, - const PRIVATE_Counter&); - - -// Derived class for PLOG*() above. -class GOOGLE_GLOG_DLL_DECL ErrnoLogMessage : public LogMessage { - public: - - ErrnoLogMessage(const char* file, int line, LogSeverity severity, int ctr, - void (LogMessage::*send_method)()); - - // Postpends ": strerror(errno) [errno]". - ~ErrnoLogMessage(); - - private: - ErrnoLogMessage(const ErrnoLogMessage&); - void operator=(const ErrnoLogMessage&); -}; - - -// This class is used to explicitly ignore values in the conditional -// logging macros. This avoids compiler warnings like "value computed -// is not used" and "statement has no effect". - -class GOOGLE_GLOG_DLL_DECL LogMessageVoidify { - public: - LogMessageVoidify() { } - // This has to be an operator with a precedence lower than << but - // higher than ?: - void operator&(std::ostream&) { } -}; - - -// Flushes all log files that contains messages that are at least of -// the specified severity level. Thread-safe. -GOOGLE_GLOG_DLL_DECL void FlushLogFiles(LogSeverity min_severity); - -// Flushes all log files that contains messages that are at least of -// the specified severity level. Thread-hostile because it ignores -// locking -- used for catastrophic failures. -GOOGLE_GLOG_DLL_DECL void FlushLogFilesUnsafe(LogSeverity min_severity); - -// -// Set the destination to which a particular severity level of log -// messages is sent. If base_filename is "", it means "don't log this -// severity". Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogDestination(LogSeverity severity, - const char* base_filename); - -// -// Set the basename of the symlink to the latest log file at a given -// severity. If symlink_basename is empty, do not make a symlink. If -// you don't call this function, the symlink basename is the -// invocation name of the program. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogSymlink(LogSeverity severity, - const char* symlink_basename); - -// -// Used to send logs to some other kind of destination -// Users should subclass LogSink and override send to do whatever they want. -// Implementations must be thread-safe because a shared instance will -// be called from whichever thread ran the LOG(XXX) line. -class GOOGLE_GLOG_DLL_DECL LogSink { - public: - virtual ~LogSink(); - - // Sink's logging logic (message_len is such as to exclude '\n' at the end). - // This method can't use LOG() or CHECK() as logging system mutex(s) are held - // during this call. - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len) = 0; - - // Redefine this to implement waiting for - // the sink's logging logic to complete. - // It will be called after each send() returns, - // but before that LogMessage exits or crashes. - // By default this function does nothing. - // Using this function one can implement complex logic for send() - // that itself involves logging; and do all this w/o causing deadlocks and - // inconsistent rearrangement of log messages. - // E.g. if a LogSink has thread-specific actions, the send() method - // can simply add the message to a queue and wake up another thread that - // handles real logging while itself making some LOG() calls; - // WaitTillSent() can be implemented to wait for that logic to complete. - // See our unittest for an example. - virtual void WaitTillSent(); - - // Returns the normal text output of the log message. - // Can be useful to implement send(). - static std::string ToString(LogSeverity severity, const char* file, int line, - const struct ::tm* tm_time, - const char* message, size_t message_len); -}; - -// Add or remove a LogSink as a consumer of logging data. Thread-safe. -GOOGLE_GLOG_DLL_DECL void AddLogSink(LogSink *destination); -GOOGLE_GLOG_DLL_DECL void RemoveLogSink(LogSink *destination); - -// -// Specify an "extension" added to the filename specified via -// SetLogDestination. This applies to all severity levels. It's -// often used to append the port we're listening on to the logfile -// name. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetLogFilenameExtension( - const char* filename_extension); - -// -// Make it so that all log messages of at least a particular severity -// are logged to stderr (in addition to logging to the usual log -// file(s)). Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetStderrLogging(LogSeverity min_severity); - -// -// Make it so that all log messages go only to stderr. Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void LogToStderr(); - -// -// Make it so that all log messages of at least a particular severity are -// logged via email to a list of addresses (in addition to logging to the -// usual log file(s)). The list of addresses is just a string containing -// the email addresses to send to (separated by spaces, say). Thread-safe. -// -GOOGLE_GLOG_DLL_DECL void SetEmailLogging(LogSeverity min_severity, - const char* addresses); - -// A simple function that sends email. dest is a commma-separated -// list of addressess. Thread-safe. -GOOGLE_GLOG_DLL_DECL bool SendEmail(const char *dest, - const char *subject, const char *body); - -GOOGLE_GLOG_DLL_DECL const std::vector& GetLoggingDirectories(); - -// For tests only: Clear the internal [cached] list of logging directories to -// force a refresh the next time GetLoggingDirectories is called. -// Thread-hostile. -void TestOnly_ClearLoggingDirectoriesList(); - -// Returns a set of existing temporary directories, which will be a -// subset of the directories returned by GetLogginDirectories(). -// Thread-safe. -GOOGLE_GLOG_DLL_DECL void GetExistingTempDirectories( - std::vector* list); - -// Print any fatal message again -- useful to call from signal handler -// so that the last thing in the output is the fatal message. -// Thread-hostile, but a race is unlikely. -GOOGLE_GLOG_DLL_DECL void ReprintFatalMessage(); - -// Truncate a log file that may be the append-only output of multiple -// processes and hence can't simply be renamed/reopened (typically a -// stdout/stderr). If the file "path" is > "limit" bytes, copy the -// last "keep" bytes to offset 0 and truncate the rest. Since we could -// be racing with other writers, this approach has the potential to -// lose very small amounts of data. For security, only follow symlinks -// if the path is /proc/self/fd/* -GOOGLE_GLOG_DLL_DECL void TruncateLogFile(const char *path, - int64 limit, int64 keep); - -// Truncate stdout and stderr if they are over the value specified by -// --max_log_size; keep the final 1MB. This function has the same -// race condition as TruncateLogFile. -GOOGLE_GLOG_DLL_DECL void TruncateStdoutStderr(); - -// Return the string representation of the provided LogSeverity level. -// Thread-safe. -GOOGLE_GLOG_DLL_DECL const char* GetLogSeverityName(LogSeverity severity); - -// --------------------------------------------------------------------- -// Implementation details that are not useful to most clients -// --------------------------------------------------------------------- - -// A Logger is the interface used by logging modules to emit entries -// to a log. A typical implementation will dump formatted data to a -// sequence of files. We also provide interfaces that will forward -// the data to another thread so that the invoker never blocks. -// Implementations should be thread-safe since the logging system -// will write to them from multiple threads. - -namespace base { - -class GOOGLE_GLOG_DLL_DECL Logger { - public: - virtual ~Logger(); - - // Writes "message[0,message_len-1]" corresponding to an event that - // occurred at "timestamp". If "force_flush" is true, the log file - // is flushed immediately. - // - // The input message has already been formatted as deemed - // appropriate by the higher level logging facility. For example, - // textual log messages already contain timestamps, and the - // file:linenumber header. - virtual void Write(bool force_flush, - time_t timestamp, - const char* message, - int message_len) = 0; - - // Flush any buffered messages - virtual void Flush() = 0; - - // Get the current LOG file size. - // The returned value is approximate since some - // logged data may not have been flushed to disk yet. - virtual uint32 LogSize() = 0; -}; - -// Get the logger for the specified severity level. The logger -// remains the property of the logging module and should not be -// deleted by the caller. Thread-safe. -extern GOOGLE_GLOG_DLL_DECL Logger* GetLogger(LogSeverity level); - -// Set the logger for the specified severity level. The logger -// becomes the property of the logging module and should not -// be deleted by the caller. Thread-safe. -extern GOOGLE_GLOG_DLL_DECL void SetLogger(LogSeverity level, Logger* logger); - -} - -// glibc has traditionally implemented two incompatible versions of -// strerror_r(). There is a poorly defined convention for picking the -// version that we want, but it is not clear whether it even works with -// all versions of glibc. -// So, instead, we provide this wrapper that automatically detects the -// version that is in use, and then implements POSIX semantics. -// N.B. In addition to what POSIX says, we also guarantee that "buf" will -// be set to an empty string, if this function failed. This means, in most -// cases, you do not need to check the error code and you can directly -// use the value of "buf". It will never have an undefined value. -GOOGLE_GLOG_DLL_DECL int posix_strerror_r(int err, char *buf, size_t len); - - -// A class for which we define operator<<, which does nothing. -class GOOGLE_GLOG_DLL_DECL NullStream : public LogMessage::LogStream { - public: - // Initialize the LogStream so the messages can be written somewhere - // (they'll never be actually displayed). This will be needed if a - // NullStream& is implicitly converted to LogStream&, in which case - // the overloaded NullStream::operator<< will not be invoked. - NullStream() : LogMessage::LogStream(message_buffer_, 1, 0) { } - NullStream(const char* /*file*/, int /*line*/, - const CheckOpString& /*result*/) : - LogMessage::LogStream(message_buffer_, 1, 0) { } - NullStream &stream() { return *this; } - private: - // A very short buffer for messages (which we discard anyway). This - // will be needed if NullStream& converted to LogStream& (e.g. as a - // result of a conditional expression). - char message_buffer_[2]; -}; - -// Do nothing. This operator is inline, allowing the message to be -// compiled away. The message will not be compiled away if we do -// something like (flag ? LOG(INFO) : LOG(ERROR)) << message; when -// SKIP_LOG=WARNING. In those cases, NullStream will be implicitly -// converted to LogStream and the message will be computed and then -// quietly discarded. -template -inline NullStream& operator<<(NullStream &str, const T &value) { return str; } - -// Similar to NullStream, but aborts the program (without stack -// trace), like LogMessageFatal. -class GOOGLE_GLOG_DLL_DECL NullStreamFatal : public NullStream { - public: - NullStreamFatal() { } - NullStreamFatal(const char* file, int line, const CheckOpString& result) : - NullStream(file, line, result) { } - ~NullStreamFatal() { _exit(1); } -}; - -// Install a signal handler that will dump signal information and a stack -// trace when the program crashes on certain signals. We'll install the -// signal handler for the following signals. -// -// SIGSEGV, SIGILL, SIGFPE, SIGABRT, SIGBUS, and SIGTERM. -// -// By default, the signal handler will write the failure dump to the -// standard error. You can customize the destination by installing your -// own writer function by InstallFailureWriter() below. -// -// Note on threading: -// -// The function should be called before threads are created, if you want -// to use the failure signal handler for all threads. The stack trace -// will be shown only for the thread that receives the signal. In other -// words, stack traces of other threads won't be shown. -GOOGLE_GLOG_DLL_DECL void InstallFailureSignalHandler(); - -// Installs a function that is used for writing the failure dump. "data" -// is the pointer to the beginning of a message to be written, and "size" -// is the size of the message. You should not expect the data is -// terminated with '\0'. -GOOGLE_GLOG_DLL_DECL void InstallFailureWriter( - void (*writer)(const char* data, int size)); - -} - -#endif // _LOGGING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/raw_logging.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/raw_logging.h deleted file mode 100755 index c81e67bf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/raw_logging.h +++ /dev/null @@ -1,189 +0,0 @@ -// This file is automatically generated from src/glog/raw_logging.h.in -// using src/windows/preprocess.sh. -// DO NOT EDIT! - -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Maxim Lifantsev -// -// Thread-safe logging routines that do not allocate any memory or -// acquire any locks, and can therefore be used by low-level memory -// allocation and synchronization code. - -#ifndef BASE_RAW_LOGGING_H_ -#define BASE_RAW_LOGGING_H_ - -#include - -namespace google { - -#include "glog/log_severity.h" -#include "glog/vlog_is_on.h" - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -// This is similar to LOG(severity) << format... and VLOG(level) << format.., -// but -// * it is to be used ONLY by low-level modules that can't use normal LOG() -// * it is desiged to be a low-level logger that does not allocate any -// memory and does not need any locks, hence: -// * it logs straight and ONLY to STDERR w/o buffering -// * it uses an explicit format and arguments list -// * it will silently chop off really long message strings -// Usage example: -// RAW_LOG(ERROR, "Failed foo with %i: %s", status, error); -// RAW_VLOG(3, "status is %i", status); -// These will print an almost standard log lines like this to stderr only: -// E0821 211317 file.cc:123] RAW: Failed foo with 22: bad_file -// I0821 211317 file.cc:142] RAW: status is 20 -#define RAW_LOG(severity, ...) \ - do { \ - switch (google::severity) { \ - case 0: \ - RAW_LOG_INFO(__VA_ARGS__); \ - break; \ - case 1: \ - RAW_LOG_WARNING(__VA_ARGS__); \ - break; \ - case 2: \ - RAW_LOG_ERROR(__VA_ARGS__); \ - break; \ - case 3: \ - RAW_LOG_FATAL(__VA_ARGS__); \ - break; \ - default: \ - break; \ - } \ - } while (0) - -// The following STRIP_LOG testing is performed in the header file so that it's -// possible to completely compile out the logging code and the log messages. -#if STRIP_LOG == 0 -#define RAW_VLOG(verboselevel, ...) \ - do { \ - if (VLOG_IS_ON(verboselevel)) { \ - RAW_LOG_INFO(__VA_ARGS__); \ - } \ - } while (0) -#else -#define RAW_VLOG(verboselevel, ...) RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG == 0 - -#if STRIP_LOG == 0 -#define RAW_LOG_INFO(...) google::RawLog__(google::INFO, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_INFO(...) google::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG == 0 - -#if STRIP_LOG <= 1 -#define RAW_LOG_WARNING(...) google::RawLog__(google::WARNING, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_WARNING(...) google::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG <= 1 - -#if STRIP_LOG <= 2 -#define RAW_LOG_ERROR(...) google::RawLog__(google::ERROR, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_ERROR(...) google::RawLogStub__(0, __VA_ARGS__) -#endif // STRIP_LOG <= 2 - -#if STRIP_LOG <= 3 -#define RAW_LOG_FATAL(...) google::RawLog__(google::FATAL, \ - __FILE__, __LINE__, __VA_ARGS__) -#else -#define RAW_LOG_FATAL(...) \ - do { \ - google::RawLogStub__(0, __VA_ARGS__); \ - exit(1); \ - } while (0) -#endif // STRIP_LOG <= 3 - -// Similar to CHECK(condition) << message, -// but for low-level modules: we use only RAW_LOG that does not allocate memory. -// We do not want to provide args list here to encourage this usage: -// if (!cond) RAW_LOG(FATAL, "foo ...", hard_to_compute_args); -// so that the args are not computed when not needed. -#define RAW_CHECK(condition, message) \ - do { \ - if (!(condition)) { \ - RAW_LOG(FATAL, "Check %s failed: %s", #condition, message); \ - } \ - } while (0) - -// Debug versions of RAW_LOG and RAW_CHECK -#ifndef NDEBUG - -#define RAW_DLOG(severity, ...) RAW_LOG(severity, __VA_ARGS__) -#define RAW_DCHECK(condition, message) RAW_CHECK(condition, message) - -#else // NDEBUG - -#define RAW_DLOG(severity, ...) \ - while (false) \ - RAW_LOG(severity, __VA_ARGS__) -#define RAW_DCHECK(condition, message) \ - while (false) \ - RAW_CHECK(condition, message) - -#endif // NDEBUG - -// Stub log function used to work around for unused variable warnings when -// building with STRIP_LOG > 0. -static inline void RawLogStub__(int ignored, ...) { -} - -// Helper function to implement RAW_LOG and RAW_VLOG -// Logs format... at "severity" level, reporting it -// as called from file:line. -// This does not allocate memory or acquire locks. -GOOGLE_GLOG_DLL_DECL void RawLog__(LogSeverity severity, - const char* file, - int line, - const char* format, ...) - ; - -// Hack to propagate time information into this module so that -// this module does not have to directly call localtime_r(), -// which could allocate memory. -GOOGLE_GLOG_DLL_DECL void RawLog__SetLastTime(const struct tm& t, int usecs); - -} - -#endif // BASE_RAW_LOGGING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/stl_logging.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/stl_logging.h deleted file mode 100755 index d76f6c18..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/stl_logging.h +++ /dev/null @@ -1,158 +0,0 @@ -// This file is automatically generated from src/glog/stl_logging.h.in -// using src/windows/preprocess.sh. -// DO NOT EDIT! - -// Copyright (c) 2003, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Stream output operators for STL containers; to be used for logging *only*. -// Inclusion of this file lets you do: -// -// list x; -// LOG(INFO) << "data: " << x; -// vector v1, v2; -// CHECK_EQ(v1, v2); -// -// Note that if you want to use these operators from the non-global namespace, -// you may get an error since they are not in namespace std (and they are not -// in namespace std since that would result in undefined behavior). You may -// need to write -// -// using ::operator<<; -// -// to fix these errors. - -#ifndef UTIL_GTL_STL_LOGGING_INL_H_ -#define UTIL_GTL_STL_LOGGING_INL_H_ - -#if !1 -# error We do not support stl_logging for this compiler -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifdef __GNUC__ -# include -# include -# include -#endif - -template -inline std::ostream& operator<<(std::ostream& out, - const std::pair& p) { - out << '(' << p.first << ", " << p.second << ')'; - return out; -} - -namespace google { - -template -inline void PrintSequence(std::ostream& out, Iter begin, Iter end) { - using ::operator<<; - // Output at most 100 elements -- appropriate if used for logging. - for (int i = 0; begin != end && i < 100; ++i, ++begin) { - if (i > 0) out << ' '; - out << *begin; - } - if (begin != end) { - out << " ..."; - } -} - -} - -#define OUTPUT_TWO_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - google::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_TWO_ARG_CONTAINER(std::vector) -OUTPUT_TWO_ARG_CONTAINER(std::deque) -OUTPUT_TWO_ARG_CONTAINER(std::list) -#ifdef __GNUC__ -OUTPUT_TWO_ARG_CONTAINER(__gnu_cxx::slist) -#endif - -#undef OUTPUT_TWO_ARG_CONTAINER - -#define OUTPUT_THREE_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - google::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_THREE_ARG_CONTAINER(std::set) -OUTPUT_THREE_ARG_CONTAINER(std::multiset) - -#undef OUTPUT_THREE_ARG_CONTAINER - -#define OUTPUT_FOUR_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - google::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -OUTPUT_FOUR_ARG_CONTAINER(std::map) -OUTPUT_FOUR_ARG_CONTAINER(std::multimap) -#ifdef __GNUC__ -OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_set) -OUTPUT_FOUR_ARG_CONTAINER(__gnu_cxx::hash_multiset) -#endif - -#undef OUTPUT_FOUR_ARG_CONTAINER - -#define OUTPUT_FIVE_ARG_CONTAINER(Sequence) \ -template \ -inline std::ostream& operator<<(std::ostream& out, \ - const Sequence& seq) { \ - google::PrintSequence(out, seq.begin(), seq.end()); \ - return out; \ -} - -#ifdef __GNUC__ -OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_map) -OUTPUT_FIVE_ARG_CONTAINER(__gnu_cxx::hash_multimap) -#endif - -#undef OUTPUT_FIVE_ARG_CONTAINER - -#endif // UTIL_GTL_STL_LOGGING_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/vlog_is_on.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/vlog_is_on.h deleted file mode 100755 index 409a4011..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/glog/vlog_is_on.h +++ /dev/null @@ -1,133 +0,0 @@ -// This file is automatically generated from src/glog/vlog_is_on.h.in -// using src/windows/preprocess.sh. -// DO NOT EDIT! - -// Copyright (c) 1999, 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Ray Sidney and many others -// -// Defines the VLOG_IS_ON macro that controls the variable-verbosity -// conditional logging. -// -// It's used by VLOG and VLOG_IF in logging.h -// and by RAW_VLOG in raw_logging.h to trigger the logging. -// -// It can also be used directly e.g. like this: -// if (VLOG_IS_ON(2)) { -// // do some logging preparation and logging -// // that can't be accomplished e.g. via just VLOG(2) << ...; -// } -// -// The truth value that VLOG_IS_ON(level) returns is determined by -// the three verbosity level flags: -// --v= Gives the default maximal active V-logging level; -// 0 is the default. -// Normally positive values are used for V-logging levels. -// --vmodule= Gives the per-module maximal V-logging levels to override -// the value given by --v. -// E.g. "my_module=2,foo*=3" would change the logging level -// for all code in source files "my_module.*" and "foo*.*" -// ("-inl" suffixes are also disregarded for this matching). -// -// SetVLOGLevel helper function is provided to do limited dynamic control over -// V-logging by overriding the per-module settings given via --vmodule flag. -// -// CAVEAT: --vmodule functionality is not available in non gcc compilers. -// - -#ifndef BASE_VLOG_IS_ON_H_ -#define BASE_VLOG_IS_ON_H_ - -#include "glog/log_severity.h" - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GOOGLE_GLOG_DLL_DECL -# if defined(_WIN32) && !defined(__CYGWIN__) -# define GOOGLE_GLOG_DLL_DECL __declspec(dllimport) -# else -# define GOOGLE_GLOG_DLL_DECL -# endif -#endif - -#if defined(__GNUC__) -// We emit an anonymous static int* variable at every VLOG_IS_ON(n) site. -// (Normally) the first time every VLOG_IS_ON(n) site is hit, -// we determine what variable will dynamically control logging at this site: -// it's either FLAGS_v or an appropriate internal variable -// matching the current source file that represents results of -// parsing of --vmodule flag and/or SetVLOGLevel calls. -#define VLOG_IS_ON(verboselevel) \ - __extension__ \ - ({ static google::int32* vlocal__ = &google::kLogSiteUninitialized; \ - google::int32 verbose_level__ = (verboselevel); \ - (*vlocal__ >= verbose_level__) && \ - ((vlocal__ != &google::kLogSiteUninitialized) || \ - (google::InitVLOG3__(&vlocal__, &FLAGS_v, \ - __FILE__, verbose_level__))); }) -#else -// GNU extensions not available, so we do not support --vmodule. -// Dynamic value of FLAGS_v always controls the logging level. -#define VLOG_IS_ON(verboselevel) (FLAGS_v >= (verboselevel)) -#endif - -// Set VLOG(_IS_ON) level for module_pattern to log_level. -// This lets us dynamically control what is normally set by the --vmodule flag. -// Returns the level that previously applied to module_pattern. -// NOTE: To change the log level for VLOG(_IS_ON) sites -// that have already executed after/during InitGoogleLogging, -// one needs to supply the exact --vmodule pattern that applied to them. -// (If no --vmodule pattern applied to them -// the value of FLAGS_v will continue to control them.) -extern GOOGLE_GLOG_DLL_DECL int SetVLOGLevel(const char* module_pattern, - int log_level); - -// Various declarations needed for VLOG_IS_ON above: ========================= - -// Special value used to indicate that a VLOG_IS_ON site has not been -// initialized. We make this a large value, so the common-case check -// of "*vlocal__ >= verbose_level__" in VLOG_IS_ON definition -// passes in such cases and InitVLOG3__ is then triggered. -extern google::int32 kLogSiteUninitialized; - -// Helper routine which determines the logging info for a particalur VLOG site. -// site_flag is the address of the site-local pointer to the controlling -// verbosity level -// site_default is the default to use for *site_flag -// fname is the current source file name -// verbose_level is the argument to VLOG_IS_ON -// We will return the return value for VLOG_IS_ON -// and if possible set *site_flag appropriately. -extern GOOGLE_GLOG_DLL_DECL bool InitVLOG3__( - google::int32** site_flag, - google::int32* site_default, - const char* fname, - google::int32 verbose_level); - -#endif // BASE_VLOG_IS_ON_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.cc deleted file mode 100755 index bfa6e70a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Craig Silverstein - * Copied from google-perftools and modified by Shinichiro Hamaji - */ - -#ifndef _WIN32 -# error You should only be including windows/port.cc in a windows environment! -#endif - -#include "config.h" -#include // for va_list, va_start, va_end -#include // for strstr() -#include -#include -#include -#include "port.h" - -using std::string; -using std::vector; - -// These call the windows _vsnprintf, but always NUL-terminate. -int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) { - if (size == 0) // not even room for a \0? - return -1; // not what C99 says to do, but what windows does - str[size-1] = '\0'; - return _vsnprintf(str, size-1, format, ap); -} - -int snprintf(char *str, size_t size, const char *format, ...) { - va_list ap; - va_start(ap, format); - const int r = vsnprintf(str, size, format, ap); - va_end(ap); - return r; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.h deleted file mode 100755 index d093bf5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/port.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Craig Silverstein - * Copied from google-perftools and modified by Shinichiro Hamaji - * - * These are some portability typedefs and defines to make it a bit - * easier to compile this code under VC++. - * - * Several of these are taken from glib: - * http://developer.gnome.org/doc/API/glib/glib-windows-compatability-functions.html - */ - -#ifndef CTEMPLATE_WINDOWS_PORT_H_ -#define CTEMPLATE_WINDOWS_PORT_H_ - -#include "config.h" - -#ifdef _WIN32 - -#define WIN32_LEAN_AND_MEAN /* We always want minimal includes */ -#include -#include /* for gethostname */ -#include /* because we so often use open/close/etc */ -#include /* for _getcwd() */ -#include /* for _getpid() */ -#include /* read in vsnprintf decl. before redifining it */ -#include /* template_dictionary.cc uses va_copy */ -#include /* for _strnicmp(), strerror_s() */ -#include /* for localtime_s() */ -/* Note: the C++ #includes are all together at the bottom. This file is - * used by both C and C++ code, so we put all the C++ together. - */ - -/* 4244: otherwise we get problems when substracting two size_t's to an int - * 4251: it's complaining about a private struct I've chosen not to dllexport - * 4355: we use this in a constructor, but we do it safely - * 4715: for some reason VC++ stopped realizing you can't return after abort() - * 4800: we know we're casting ints/char*'s to bools, and we're ok with that - * 4996: Yes, we're ok using "unsafe" functions like fopen() and strerror() - */ -#pragma warning(disable:4244 4251 4355 4715 4800 4996) - -/* file I/O */ -#define PATH_MAX 1024 -#define access _access -#define getcwd _getcwd -#define open _open -#define read _read -#define write _write -#define lseek _lseek -#define close _close -#define popen _popen -#define pclose _pclose -#define R_OK 04 /* read-only (for access()) */ -#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) -#ifndef __MINGW32__ -enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2 }; -#endif -#define S_IRUSR S_IREAD -#define S_IWUSR S_IWRITE - -/* Not quite as lightweight as a hard-link, but more than good enough for us. */ -#define link(oldpath, newpath) CopyFileA(oldpath, newpath, false) - -#define strcasecmp _stricmp -#define strncasecmp _strnicmp - -/* In windows-land, hash<> is called hash_compare<> (from xhash.h) */ -#define hash hash_compare - -/* Sleep is in ms, on windows */ -#define sleep(secs) Sleep((secs) * 1000) - -/* We can't just use _vsnprintf and _snprintf as drop-in-replacements, - * because they don't always NUL-terminate. :-( We also can't use the - * name vsnprintf, since windows defines that (but not snprintf (!)). - */ -extern int snprintf(char *str, size_t size, - const char *format, ...); -extern int safe_vsnprintf(char *str, size_t size, - const char *format, va_list ap); -#define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap) -#define va_copy(dst, src) (dst) = (src) - -/* Windows doesn't support specifying the number of buckets as a - * hash_map constructor arg, so we leave this blank. - */ -#define CTEMPLATE_SMALL_HASHTABLE - -#define DEFAULT_TEMPLATE_ROOTDIR ".." - -// ----------------------------------- SYSTEM/PROCESS -typedef int pid_t; -#define getpid _getpid - -// ----------------------------------- THREADS -typedef DWORD pthread_t; -typedef DWORD pthread_key_t; -typedef LONG pthread_once_t; -enum { PTHREAD_ONCE_INIT = 0 }; // important that this be 0! for SpinLock -#define pthread_self GetCurrentThreadId -#define pthread_equal(pthread_t_1, pthread_t_2) ((pthread_t_1)==(pthread_t_2)) - -inline struct tm* localtime_r(const time_t* timep, struct tm* result) { - localtime_s(result, timep); - return result; -} - -inline char* strerror_r(int errnum, char* buf, size_t buflen) { - strerror_s(buf, buflen, errnum); - return buf; -} - -#ifndef __cplusplus -/* I don't see how to get inlining for C code in MSVC. Ah well. */ -#define inline -#endif - -#endif /* _WIN32 */ - -#endif /* CTEMPLATE_WINDOWS_PORT_H_ */ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/preprocess.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/preprocess.sh deleted file mode 100755 index ea4352e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/glog/src/windows/preprocess.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# --- -# Author: Craig Silverstein -# Copied from google-perftools and modified by Shinichiro Hamaji -# -# This script is meant to be run at distribution-generation time, for -# instance by autogen.sh. It does some of the work configure would -# normally do, for windows systems. In particular, it expands all the -# @...@ variables found in .in files, and puts them here, in the windows -# directory. -# -# This script should be run before any new release. - -if [ -z "$1" ]; then - echo "USAGE: $0 " - exit 1 -fi - -DLLDEF_MACRO_NAME="GLOG_DLL_DECL" - -# The text we put in every .h files we create. As a courtesy, we'll -# include a helpful comment for windows users as to how to use -# GLOG_DLL_DECL. Apparently sed expands \n into a newline. Good! -DLLDEF_DEFINES="\ -// NOTE: if you are statically linking the template library into your binary\n\ -// (rather than using the template .dll), set '/D $DLLDEF_MACRO_NAME='\n\ -// as a compiler flag in your project file to turn off the dllimports.\n\ -#ifndef $DLLDEF_MACRO_NAME\n\ -# define $DLLDEF_MACRO_NAME __declspec(dllimport)\n\ -#endif" - -# Read all the windows config info into variables -# In order for the 'set' to take, this requires putting all in a subshell. -( - while read define varname value; do - [ "$define" != "#define" ] && continue - eval "$varname='$value'" - done - - # Process all the .in files in the "glog" subdirectory - mkdir -p "$1/windows/glog" - for file in `echo "$1"/glog/*.in`; do - echo "Processing $file" - outfile="$1/windows/glog/`basename $file .in`" - - echo "\ -// This file is automatically generated from $file -// using src/windows/preprocess.sh. -// DO NOT EDIT! -" > "$outfile" - # Besides replacing @...@, we also need to turn on dllimport - # We also need to replace hash by hash_compare (annoying we hard-code :-( ) - sed -e "s!@ac_windows_dllexport@!$DLLDEF_MACRO_NAME!g" \ - -e "s!@ac_windows_dllexport_defines@!$DLLDEF_DEFINES!g" \ - -e "s!@ac_cv_cxx_hash_map@!$HASH_MAP_H!g" \ - -e "s!@ac_cv_cxx_hash_namespace@!$HASH_NAMESPACE!g" \ - -e "s!@ac_cv_cxx_hash_set@!$HASH_SET_H!g" \ - -e "s!@ac_cv_have_stdint_h@!0!g" \ - -e "s!@ac_cv_have_systypes_h@!0!g" \ - -e "s!@ac_cv_have_inttypes_h@!0!g" \ - -e "s!@ac_cv_have_unistd_h@!0!g" \ - -e "s!@ac_cv_have_uint16_t@!0!g" \ - -e "s!@ac_cv_have_u_int16_t@!0!g" \ - -e "s!@ac_cv_have___uint16@!1!g" \ - -e "s!@ac_cv_have_libgflags@!0!g" \ - -e "s!@ac_cv_have___builtin_expect@!0!g" \ - -e "s!@ac_cv_cxx_using_operator@!1!g" \ - -e "s!@ac_cv___attribute___noreturn@!!g" \ - -e "s!@ac_cv___attribute___printf_4_5@!!g" \ - -e "s!@ac_google_attribute@!${HAVE___ATTRIBUTE__:-0}!g" \ - -e "s!@ac_google_end_namespace@!$_END_GOOGLE_NAMESPACE_!g" \ - -e "s!@ac_google_namespace@!$GOOGLE_NAMESPACE!g" \ - -e "s!@ac_google_start_namespace@!$_START_GOOGLE_NAMESPACE_!g" \ - -e "s!@ac_htmlparser_namespace@!$HTMLPARSER_NAMESPACE!g" \ - -e "s!\\bhash\\b!hash_compare!g" \ - "$file" >> "$outfile" - done -) < "$1/windows/config.h" - -# log_severity.h isn't a .in file. -echo "\ -// This file is automatically generated from $1/glog/log_severity.h -// using src/windows/preprocess.sh. -// DO NOT EDIT! -" > "$1/windows/glog/log_severity.h" -cat "$1/glog/log_severity.h" >> "$1/windows/glog/log_severity.h" - -echo "DONE" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/.dirstamp b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/Makefile.am deleted file mode 100644 index bd3129e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -include_HEADERS = libdis.h -lib_LTLIBRARIES = libdisasm.la -libdisasm_la_SOURCES = \ - ia32_implicit.c \ - ia32_implicit.h \ - ia32_insn.c \ - ia32_insn.h \ - ia32_invariant.c \ - ia32_invariant.h \ - ia32_modrm.c \ - ia32_modrm.h \ - ia32_opcode_tables.c \ - ia32_opcode_tables.h \ - ia32_operand.c \ - ia32_operand.h \ - ia32_reg.c \ - ia32_reg.h \ - ia32_settings.c \ - ia32_settings.h \ - libdis.h \ - qword.h \ - x86_disasm.c \ - x86_format.c \ - x86_imm.c \ - x86_imm.h \ - x86_insn.c \ - x86_misc.c \ - x86_operand_list.c \ - x86_operand_list.h - -# Cheat to get non-autoconf swig into tarball, -# even if it doesn't build by default. -EXTRA_DIST = \ -swig/Makefile \ -swig/libdisasm.i \ -swig/libdisasm_oop.i \ -swig/python/Makefile-swig \ -swig/perl/Makefile-swig \ -swig/perl/Makefile.PL \ -swig/ruby/Makefile-swig \ -swig/ruby/extconf.rb \ -swig/tcl/Makefile-swig \ -swig/README diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/TODO b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/TODO deleted file mode 100644 index 148addf9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/TODO +++ /dev/null @@ -1,43 +0,0 @@ -x86_format.c ------------- -intel: jmpf -> jmp, callf -> call -att: jmpf -> ljmp, callf -> lcall - -opcode table ------------- -finish typing instructions -fix flag clear/set/toggle types - -ix64 stuff ----------- -document output file formats in web page -features doc: register aliases, implicit operands, stack mods, -ring0 flags, eflags, cpu model/isa - -ia32_handle_* implementation - -fix operand 0F C2 -CMPPS - -* sysenter, sysexit as CALL types -- preceded by MSR writes -* SYSENTER/SYSEXIT stack : overwrites SS, ESP -* stos, cmps, scas, movs, ins, outs, lods -> OP_PTR -* OP_SIZE in implicit operands -* use OP_SIZE to choose reg sizes! - -DONE?? : -implicit operands: provide action ? -e.g. add/inc for stach, write, etc -replace table numbers in opcodes.dat with -#defines for table names - -replace 0 with INSN_INVALID [or maybe FF for imnvalid and 00 for Not Applicable */ -no wait that is only for prefix tables -- n/p - -if ( prefx) only use if insn != invalid - -these should cover all the wacky disasm exceptions - -for the rep one we can chet, match only a 0x90 - -todo: privilege | ring diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.c deleted file mode 100644 index 8b075d2e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.c +++ /dev/null @@ -1,422 +0,0 @@ -#include - -#include "ia32_implicit.h" -#include "ia32_insn.h" -#include "ia32_reg.h" -#include "x86_operand_list.h" - -/* Conventions: Register operands which are aliases of another register - * operand (e.g. AX in one operand and AL in another) assume that the - * operands are different registers and that alias tracking will resolve - * data flow. This means that something like - * mov ax, al - * would have 'write only' access for AX and 'read only' access for AL, - * even though both AL and AX are read and written */ -typedef struct { - uint32_t type; - uint32_t operand; -} op_implicit_list_t; - -static op_implicit_list_t list_aaa[] = - /* 37 : AAA : rw AL */ - /* 3F : AAS : rw AL */ - {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* aaa */ - -static op_implicit_list_t list_aad[] = - /* D5 0A, D5 (ib) : AAD : rw AX */ - /* D4 0A, D4 (ib) : AAM : rw AX */ - {{ OP_R | OP_W, REG_WORD_OFFSET }, {0}}; /* aad */ - -static op_implicit_list_t list_call[] = - /* E8, FF, 9A, FF : CALL : rw ESP, rw EIP */ - /* C2, C3, CA, CB : RET : rw ESP, rw EIP */ - {{ OP_R | OP_W, REG_EIP_INDEX }, - { OP_R | OP_W, REG_ESP_INDEX }, {0}}; /* call, ret */ - -static op_implicit_list_t list_cbw[] = - /* 98 : CBW : r AL, rw AX */ - {{ OP_R | OP_W, REG_WORD_OFFSET }, - { OP_R, REG_BYTE_OFFSET}, {0}}; /* cbw */ - -static op_implicit_list_t list_cwde[] = - /* 98 : CWDE : r AX, rw EAX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, - { OP_R, REG_WORD_OFFSET }, {0}}; /* cwde */ - -static op_implicit_list_t list_clts[] = - /* 0F 06 : CLTS : rw CR0 */ - {{ OP_R | OP_W, REG_CTRL_OFFSET}, {0}}; /* clts */ - -static op_implicit_list_t list_cmpxchg[] = - /* 0F B0 : CMPXCHG : rw AL */ - {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* cmpxchg */ - -static op_implicit_list_t list_cmpxchgb[] = - /* 0F B1 : CMPXCHG : rw EAX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* cmpxchg */ - -static op_implicit_list_t list_cmpxchg8b[] = - /* 0F C7 : CMPXCHG8B : rw EDX, rw EAX, r ECX, r EBX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, - { OP_R | OP_W, REG_DWORD_OFFSET + 2 }, - { OP_R, REG_DWORD_OFFSET + 1 }, - { OP_R, REG_DWORD_OFFSET + 3 }, {0}}; /* cmpxchg8b */ - -static op_implicit_list_t list_cpuid[] = - /* 0F A2 : CPUID : rw EAX, w EBX, w ECX, w EDX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, - { OP_W, REG_DWORD_OFFSET + 1 }, - { OP_W, REG_DWORD_OFFSET + 2 }, - { OP_W, REG_DWORD_OFFSET + 3 }, {0}}; /* cpuid */ - -static op_implicit_list_t list_cwd[] = - /* 99 : CWD/CWQ : rw EAX, w EDX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, - { OP_W, REG_DWORD_OFFSET + 2 }, {0}}; /* cwd */ - -static op_implicit_list_t list_daa[] = - /* 27 : DAA : rw AL */ - /* 2F : DAS : rw AL */ - {{ OP_R | OP_W, REG_BYTE_OFFSET }, {0}}; /* daa */ - -static op_implicit_list_t list_idiv[] = - /* F6 : DIV, IDIV : r AX, w AL, w AH */ - /* FIXED: first op was EAX, not Aw. TODO: verify! */ - {{ OP_R, REG_WORD_OFFSET }, - { OP_W, REG_BYTE_OFFSET }, - { OP_W, REG_BYTE_OFFSET + 4 }, {0}}; /* div */ - -static op_implicit_list_t list_div[] = - /* F7 : DIV, IDIV : rw EDX, rw EAX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET + 2 }, - { OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* div */ - -static op_implicit_list_t list_enter[] = - /* C8 : ENTER : rw ESP w EBP */ - {{ OP_R | OP_W, REG_DWORD_OFFSET + 4 }, - { OP_R, REG_DWORD_OFFSET + 5 }, {0}}; /* enter */ - -static op_implicit_list_t list_f2xm1[] = - /* D9 F0 : F2XM1 : rw ST(0) */ - /* D9 E1 : FABS : rw ST(0) */ - /* D9 E0 : FCHS : rw ST(0) */ - /* D9 FF : FCOS : rw ST(0)*/ - /* D8, DA : FDIV : rw ST(0) */ - /* D8, DA : FDIVR : rw ST(0) */ - /* D9 F2 : FPTAN : rw ST(0) */ - /* D9 FC : FRNDINT : rw ST(0) */ - /* D9 FB : FSINCOS : rw ST(0) */ - /* D9 FE : FSIN : rw ST(0) */ - /* D9 FA : FSQRT : rw ST(0) */ - /* D9 F4 : FXTRACT : rw ST(0) */ - {{ OP_R | OP_W, REG_FPU_OFFSET }, {0}}; /* f2xm1 */ - -static op_implicit_list_t list_fcom[] = - /* D8, DC, DE D9 : FCOM : r ST(0) */ - /* DE, DA : FICOM : r ST(0) */ - /* DF, D8 : FIST : r ST(0) */ - /* D9 E4 : FTST : r ST(0) */ - /* D9 E5 : FXAM : r ST(0) */ - {{ OP_R, REG_FPU_OFFSET }, {0}}; /* fcom */ - -static op_implicit_list_t list_fpatan[] = - /* D9 F3 : FPATAN : r ST(0), rw ST(1) */ - {{ OP_R, REG_FPU_OFFSET }, {0}}; /* fpatan */ - -static op_implicit_list_t list_fprem[] = - /* D9 F8, D9 F5 : FPREM : rw ST(0) r ST(1) */ - /* D9 FD : FSCALE : rw ST(0), r ST(1) */ - {{ OP_R | OP_W, REG_FPU_OFFSET }, - { OP_R, REG_FPU_OFFSET + 1 }, {0}}; /* fprem */ - -static op_implicit_list_t list_faddp[] = - /* DE C1 : FADDP : r ST(0), rw ST(1) */ - /* DE E9 : FSUBP : r ST(0), rw ST(1) */ - /* D9 F1 : FYL2X : r ST(0), rw ST(1) */ - /* D9 F9 : FYL2XP1 : r ST(0), rw ST(1) */ - {{ OP_R, REG_FPU_OFFSET }, - { OP_R | OP_W, REG_FPU_OFFSET + 1 }, {0}}; /* faddp */ - -static op_implicit_list_t list_fucompp[] = - /* DA E9 : FUCOMPP : r ST(0), r ST(1) */ - {{ OP_R, REG_FPU_OFFSET }, - { OP_R, REG_FPU_OFFSET + 1 }, {0}}; /* fucompp */ - -static op_implicit_list_t list_imul[] = - /* F6 : IMUL : r AL, w AX */ - /* F6 : MUL : r AL, w AX */ - {{ OP_R, REG_BYTE_OFFSET }, - { OP_W, REG_WORD_OFFSET }, {0}}; /* imul */ - -static op_implicit_list_t list_mul[] = - /* F7 : IMUL : rw EAX, w EDX */ - /* F7 : MUL : rw EAX, w EDX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET }, - { OP_W, REG_DWORD_OFFSET + 2 }, {0}}; /* imul */ - -static op_implicit_list_t list_lahf[] = - /* 9F : LAHF : r EFLAGS, w AH */ - {{ OP_R, REG_FLAGS_INDEX }, - { OP_W, REG_BYTE_OFFSET + 4 }, {0}}; /* lahf */ - -static op_implicit_list_t list_ldmxcsr[] = - /* 0F AE : LDMXCSR : w MXCSR SSE Control Status Reg */ - {{ OP_W, REG_MXCSG_INDEX }, {0}}; /* ldmxcsr */ - -static op_implicit_list_t list_leave[] = - /* C9 : LEAVE : rw ESP, w EBP */ - {{ OP_R | OP_W, REG_ESP_INDEX }, - { OP_W, REG_DWORD_OFFSET + 5 }, {0}}; /* leave */ - -static op_implicit_list_t list_lgdt[] = - /* 0F 01 : LGDT : w GDTR */ - {{ OP_W, REG_GDTR_INDEX }, {0}}; /* lgdt */ - -static op_implicit_list_t list_lidt[] = - /* 0F 01 : LIDT : w IDTR */ - {{ OP_W, REG_IDTR_INDEX }, {0}}; /* lidt */ - -static op_implicit_list_t list_lldt[] = - /* 0F 00 : LLDT : w LDTR */ - {{ OP_W, REG_LDTR_INDEX }, {0}}; /* lldt */ - -static op_implicit_list_t list_lmsw[] = - /* 0F 01 : LMSW : w CR0 */ - {{ OP_W, REG_CTRL_OFFSET }, {0}}; /* lmsw */ - -static op_implicit_list_t list_loop[] = - /* E0, E1, E2 : LOOP : rw ECX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET + 1 }, {0}};/* loop */ - -static op_implicit_list_t list_ltr[] = - /* 0F 00 : LTR : w Task Register */ - {{ OP_W, REG_TR_INDEX }, {0}}; /* ltr */ - -static op_implicit_list_t list_pop[] = - /* 8F, 58, 1F, 07, 17, 0F A1, 0F A9 : POP : rw ESP */ - /* FF, 50, 6A, 68, 0E, 16, 1E, 06, 0F A0, 0F A8 : PUSH : rw ESP */ - {{ OP_R | OP_W, REG_ESP_INDEX }, {0}}; /* pop, push */ - -static op_implicit_list_t list_popad[] = - /* 61 : POPAD : rw esp, w edi esi ebp ebx edx ecx eax */ - {{ OP_R | OP_W, REG_ESP_INDEX }, - { OP_W, REG_DWORD_OFFSET + 7 }, - { OP_W, REG_DWORD_OFFSET + 6 }, - { OP_W, REG_DWORD_OFFSET + 5 }, - { OP_W, REG_DWORD_OFFSET + 3 }, - { OP_W, REG_DWORD_OFFSET + 2 }, - { OP_W, REG_DWORD_OFFSET + 1 }, - { OP_W, REG_DWORD_OFFSET }, {0}}; /* popad */ - -static op_implicit_list_t list_popfd[] = - /* 9D : POPFD : rw esp, w eflags */ - {{ OP_R | OP_W, REG_ESP_INDEX }, - { OP_W, REG_FLAGS_INDEX }, {0}}; /* popfd */ - -static op_implicit_list_t list_pushad[] = - /* FF, 50, 6A, 68, 0E, 16, 1E, 06, 0F A0, 0F A8 : PUSH : rw ESP */ - /* 60 : PUSHAD : rw esp, r eax ecx edx ebx esp ebp esi edi */ - {{ OP_R | OP_W, REG_ESP_INDEX }, - { OP_R, REG_DWORD_OFFSET }, - { OP_R, REG_DWORD_OFFSET + 1 }, - { OP_R, REG_DWORD_OFFSET + 2 }, - { OP_R, REG_DWORD_OFFSET + 3 }, - { OP_R, REG_DWORD_OFFSET + 5 }, - { OP_R, REG_DWORD_OFFSET + 6 }, - { OP_R, REG_DWORD_OFFSET + 7 }, {0}}; /* pushad */ - -static op_implicit_list_t list_pushfd[] = - /* 9C : PUSHFD : rw esp, r eflags */ - {{ OP_R | OP_W, REG_ESP_INDEX }, - { OP_R, REG_FLAGS_INDEX }, {0}}; /* pushfd */ - -static op_implicit_list_t list_rdmsr[] = - /* 0F 32 : RDMSR : r ECX, w EDX, w EAX */ - {{ OP_R, REG_DWORD_OFFSET + 1 }, - { OP_W, REG_DWORD_OFFSET + 2 }, - { OP_W, REG_DWORD_OFFSET }, {0}}; /* rdmsr */ - -static op_implicit_list_t list_rdpmc[] = - /* 0F 33 : RDPMC : r ECX, w EDX, w EAX */ - {{ OP_R, REG_DWORD_OFFSET + 1 }, - { OP_W, REG_DWORD_OFFSET + 2 }, - { OP_W, REG_DWORD_OFFSET }, {0}}; /* rdpmc */ - -static op_implicit_list_t list_rdtsc[] = - /* 0F 31 : RDTSC : rw EDX, rw EAX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET + 2 }, - { OP_R | OP_W, REG_DWORD_OFFSET }, {0}}; /* rdtsc */ - -static op_implicit_list_t list_rep[] = - /* F3, F2 ... : REP : rw ECX */ - {{ OP_R | OP_W, REG_DWORD_OFFSET + 1 }, {0}};/* rep */ - -static op_implicit_list_t list_rsm[] = - /* 0F AA : RSM : r CR4, r CR0 */ - {{ OP_R, REG_CTRL_OFFSET + 4 }, - { OP_R, REG_CTRL_OFFSET }, {0}}; /* rsm */ - -static op_implicit_list_t list_sahf[] = - /* 9E : SAHF : r ah, rw eflags (set SF ZF AF PF CF) */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sahf */ - -static op_implicit_list_t list_sgdt[] = - /* 0F : SGDT : r gdtr */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sgdt */ - -static op_implicit_list_t list_sidt[] = - /* 0F : SIDT : r idtr */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sidt */ - -static op_implicit_list_t list_sldt[] = - /* 0F : SLDT : r ldtr */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sldt */ - -static op_implicit_list_t list_smsw[] = - /* 0F : SMSW : r CR0 */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* smsw */ - -static op_implicit_list_t list_stmxcsr[] = - /* 0F AE : STMXCSR : r MXCSR */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* stmxcsr */ - -static op_implicit_list_t list_str[] = - /* 0F 00 : STR : r TR (task register) */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* str */ - -static op_implicit_list_t list_sysenter[] = - /* 0F 34 : SYSENTER : w cs, w eip, w ss, w esp, r CR0, w eflags - * r sysenter_cs_msr, sysenter_esp_msr, sysenter_eip_msr */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sysenter */ - -static op_implicit_list_t list_sysexit[] = - /* 0F 35 : SYSEXIT : r edx, r ecx, w cs, w eip, w ss, w esp - * r sysenter_cs_msr */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* sysexit */ - -static op_implicit_list_t list_wrmsr[] = - /* 0F 30 : WRMST : r edx, r eax, r ecx */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* wrmsr */ - -static op_implicit_list_t list_xlat[] = - /* D7 : XLAT : rw al r ebx (ptr) */ - /* TODO: finish this! */ - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* xlat */ -/* TODO: - * monitor 0f 01 c8 eax OP_R ecx OP_R edx OP_R - * mwait 0f 01 c9 eax OP_R ecx OP_R - */ -static op_implicit_list_t list_monitor[] = - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* monitor */ -static op_implicit_list_t list_mwait[] = - {{ OP_R, REG_DWORD_OFFSET }, {0}}; /* mwait */ - -op_implicit_list_t *op_implicit_list[] = { - /* This is a list of implicit operands which are read/written by - * various x86 instructions. Note that modifications to the stack - * register are mentioned here, but that additional information on - * the effect an instruction has on the stack is contained in the - * x86_insn_t 'stack_mod' and 'stack_mod_val' fields. Use of the - * eflags register, i.e. setting, clearing, and testing flags, is - * not recorded here but rather in the flags_set and flags_tested - * fields of the x86_insn_t.*/ - NULL, - list_aaa, list_aad, list_call, list_cbw, /* 1 - 4 */ - list_cwde, list_clts, list_cmpxchg, list_cmpxchgb, /* 5 - 8 */ - list_cmpxchg8b, list_cpuid, list_cwd, list_daa, /* 9 - 12 */ - list_idiv, list_div, list_enter, list_f2xm1, /* 13 - 16 */ - list_fcom, list_fpatan, list_fprem, list_faddp, /* 17 - 20 */ - list_fucompp, list_imul, list_mul, list_lahf, /* 21 - 24 */ - list_ldmxcsr, list_leave, list_lgdt, list_lidt, /* 25 - 28 */ - list_lldt, list_lmsw, list_loop, list_ltr, /* 29 - 32 */ - list_pop, list_popad, list_popfd, list_pushad, /* 33 - 36 */ - list_pushfd, list_rdmsr, list_rdpmc, list_rdtsc, /* 37 - 40 */ - /* NOTE: 'REP' is a hack since it is a prefix: if its position - * in the table changes, then change IDX_IMPLICIT_REP in the .h */ - list_rep, list_rsm, list_sahf, list_sgdt, /* 41 - 44 */ - list_sidt, list_sldt, list_smsw, list_stmxcsr, /* 45 - 48 */ - list_str, list_sysenter, list_sysexit, list_wrmsr, /* 49 - 52 */ - list_xlat, list_monitor, list_mwait, /* 53 - 55*/ - NULL /* end of list */ - }; - -#define LAST_IMPL_IDX 55 - -static void handle_impl_reg( x86_op_t *op, uint32_t val ) { - x86_reg_t *reg = &op->data.reg; - op->type = op_register; - ia32_handle_register( reg, (unsigned int) val ); - switch (reg->size) { - case 1: - op->datatype = op_byte; break; - case 2: - op->datatype = op_word; break; - case 4: - op->datatype = op_dword; break; - case 8: - op->datatype = op_qword; break; - case 10: - op->datatype = op_extreal; break; - case 16: - op->datatype = op_dqword; break; - } - return; -} - -/* 'impl_idx' is the value from the opcode table: between 1 and LAST_IMPL_IDX */ -/* returns number of operands added */ -unsigned int ia32_insn_implicit_ops( x86_insn_t *insn, unsigned int impl_idx ) { - op_implicit_list_t *list; - x86_op_t *op; - unsigned int num = 0; - - if (! impl_idx || impl_idx > LAST_IMPL_IDX ) { - return 0; - } - - for ( list = op_implicit_list[impl_idx]; list->type; list++, num++ ) { - enum x86_op_access access = (enum x86_op_access) OP_PERM(list->type); - enum x86_op_flags flags = (enum x86_op_flags) (OP_FLAGS(list->type) >> 12); - - op = NULL; - /* In some cases (MUL), EAX is an implicit operand hardcoded in - * the instruction without being explicitly listed in assembly. - * For this situation, find the hardcoded operand and add the - * implied flag rather than adding a new implicit operand. */ - x86_oplist_t * existing; - if (ia32_true_register_id(list->operand) == REG_DWORD_OFFSET) { - for ( existing = insn->operands; existing; existing = existing->next ) { - if (existing->op.type == op_register && - existing->op.data.reg.id == list->operand) { - op = &existing->op; - break; - } - } - } - if (!op) { - op = x86_operand_new( insn ); - /* all implicit operands are registers */ - handle_impl_reg( op, list->operand ); - /* decrement the 'explicit count' incremented by default in - * x86_operand_new */ - insn->explicit_count = insn->explicit_count -1; - } - if (!op) { - return num; /* gah! return early */ - } - op->access |= access; - op->flags |= flags; - op->flags |= op_implied; - } - - return num; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.h deleted file mode 100644 index 0002b28b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_implicit.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef IA32_IMPLICIT_H -#define IA32_IMPLICIT_H - -#include "libdis.h" - -/* OK, this is a hack to deal with prefixes having implicit operands... - * thought I had removed all the old hackishness ;( */ - -#define IDX_IMPLICIT_REP 41 /* change this if the table changes! */ - -unsigned int ia32_insn_implicit_ops( x86_insn_t *insn, unsigned int impl_idx ); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.c deleted file mode 100644 index e4f42108..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.c +++ /dev/null @@ -1,625 +0,0 @@ -#include -#include -#include -#include "qword.h" - -#include "ia32_insn.h" -#include "ia32_opcode_tables.h" - -#include "ia32_reg.h" -#include "ia32_operand.h" -#include "ia32_implicit.h" -#include "ia32_settings.h" - -#include "libdis.h" - -extern ia32_table_desc_t ia32_tables[]; -extern ia32_settings_t ia32_settings; - -#define IS_SP( op ) (op->type == op_register && \ - (op->data.reg.id == REG_ESP_INDEX || \ - op->data.reg.alias == REG_ESP_INDEX) ) -#define IS_IMM( op ) (op->type == op_immediate ) - -#ifdef WIN32 -# define INLINE -#else -# define INLINE inline -#endif - -/* for calculating stack modification based on an operand */ -static INLINE int32_t long_from_operand( x86_op_t *op ) { - - if (! IS_IMM(op) ) { - return 0L; - } - - switch ( op->datatype ) { - case op_byte: - return (int32_t) op->data.sbyte; - case op_word: - return (int32_t) op->data.sword; - case op_qword: - return (int32_t) op->data.sqword; - case op_dword: - return op->data.sdword; - default: - /* these are not used in stack insn */ - break; - } - - return 0L; -} - - -/* determine what this insn does to the stack */ -static void ia32_stack_mod(x86_insn_t *insn) { - x86_op_t *dest, *src = NULL; - - if (! insn || ! insn->operands ) { - return; - } - - dest = &insn->operands->op; - if ( dest ) { - src = &insn->operands->next->op; - } - - insn->stack_mod = 0; - insn->stack_mod_val = 0; - - switch ( insn->type ) { - case insn_call: - case insn_callcc: - insn->stack_mod = 1; - insn->stack_mod_val = insn->addr_size * -1; - break; - case insn_push: - insn->stack_mod = 1; - insn->stack_mod_val = insn->addr_size * -1; - break; - case insn_return: - insn->stack_mod = 1; - insn->stack_mod_val = insn->addr_size; - case insn_int: case insn_intcc: - case insn_iret: - break; - case insn_pop: - insn->stack_mod = 1; - if (! IS_SP( dest ) ) { - insn->stack_mod_val = insn->op_size; - } /* else we don't know the stack change in a pop esp */ - break; - case insn_enter: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_leave: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_pushregs: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_popregs: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_pushflags: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_popflags: - insn->stack_mod = 1; - insn->stack_mod_val = 0; /* TODO : FIX */ - break; - case insn_add: - if ( IS_SP( dest ) ) { - insn->stack_mod = 1; - insn->stack_mod_val = long_from_operand( src ); - } - break; - case insn_sub: - if ( IS_SP( dest ) ) { - insn->stack_mod = 1; - insn->stack_mod_val = long_from_operand( src ); - insn->stack_mod_val *= -1; - } - break; - case insn_inc: - if ( IS_SP( dest ) ) { - insn->stack_mod = 1; - insn->stack_mod_val = 1; - } - break; - case insn_dec: - if ( IS_SP( dest ) ) { - insn->stack_mod = 1; - insn->stack_mod_val = 1; - } - break; - case insn_mov: case insn_movcc: - case insn_xchg: case insn_xchgcc: - case insn_mul: case insn_div: - case insn_shl: case insn_shr: - case insn_rol: case insn_ror: - case insn_and: case insn_or: - case insn_not: case insn_neg: - case insn_xor: - if ( IS_SP( dest ) ) { - insn->stack_mod = 1; - } - break; - default: - break; - } - if (! strcmp("enter", insn->mnemonic) ) { - insn->stack_mod = 1; - } else if (! strcmp("leave", insn->mnemonic) ) { - insn->stack_mod = 1; - } - - /* for mov, etc we return 0 -- unknown stack mod */ - - return; -} - -/* get the cpu details for this insn from cpu flags int */ -static void ia32_handle_cpu( x86_insn_t *insn, unsigned int cpu ) { - insn->cpu = (enum x86_insn_cpu) CPU_MODEL(cpu); - insn->isa = (enum x86_insn_isa) (ISA_SUBSET(cpu)) >> 16; - return; -} - -/* handle mnemonic type and group */ -static void ia32_handle_mnemtype(x86_insn_t *insn, unsigned int mnemtype) { - unsigned int type = mnemtype & ~INS_FLAG_MASK; - insn->group = (enum x86_insn_group) (INS_GROUP(type)) >> 12; - insn->type = (enum x86_insn_type) INS_TYPE(type); - - return; -} - -static void ia32_handle_notes(x86_insn_t *insn, unsigned int notes) { - insn->note = (enum x86_insn_note) notes; - return; -} - -static void ia32_handle_eflags( x86_insn_t *insn, unsigned int eflags) { - unsigned int flags; - - /* handle flags effected */ - flags = INS_FLAGS_TEST(eflags); - /* handle weird OR cases */ - /* these are either JLE (ZF | SF<>OF) or JBE (CF | ZF) */ - if (flags & INS_TEST_OR) { - flags &= ~INS_TEST_OR; - if ( flags & INS_TEST_ZERO ) { - flags &= ~INS_TEST_ZERO; - if ( flags & INS_TEST_CARRY ) { - flags &= ~INS_TEST_CARRY ; - flags |= (int)insn_carry_or_zero_set; - } else if ( flags & INS_TEST_SFNEOF ) { - flags &= ~INS_TEST_SFNEOF; - flags |= (int)insn_zero_set_or_sign_ne_oflow; - } - } - } - insn->flags_tested = (enum x86_flag_status) flags; - - insn->flags_set = (enum x86_flag_status) INS_FLAGS_SET(eflags) >> 16; - - return; -} - -static void ia32_handle_prefix( x86_insn_t *insn, unsigned int prefixes ) { - - insn->prefix = (enum x86_insn_prefix) prefixes & PREFIX_MASK; // >> 20; - if (! (insn->prefix & PREFIX_PRINT_MASK) ) { - /* no printable prefixes */ - insn->prefix = insn_no_prefix; - } - - /* concat all prefix strings */ - if ( (unsigned int)insn->prefix & PREFIX_LOCK ) { - strncat(insn->prefix_string, "lock ", 32 - - strlen(insn->prefix_string)); - } - - if ( (unsigned int)insn->prefix & PREFIX_REPNZ ) { - strncat(insn->prefix_string, "repnz ", 32 - - strlen(insn->prefix_string)); - } else if ( (unsigned int)insn->prefix & PREFIX_REPZ ) { - strncat(insn->prefix_string, "repz ", 32 - - strlen(insn->prefix_string)); - } - - return; -} - - -static void reg_32_to_16( x86_op_t *op, x86_insn_t *insn, void *arg ) { - - /* if this is a 32-bit register and it is a general register ... */ - if ( op->type == op_register && op->data.reg.size == 4 && - (op->data.reg.type & reg_gen) ) { - /* WORD registers are 8 indices off from DWORD registers */ - ia32_handle_register( &(op->data.reg), - op->data.reg.id + 8 ); - } -} - -static void handle_insn_metadata( x86_insn_t *insn, ia32_insn_t *raw_insn ) { - ia32_handle_mnemtype( insn, raw_insn->mnem_flag ); - ia32_handle_notes( insn, raw_insn->notes ); - ia32_handle_eflags( insn, raw_insn->flags_effected ); - ia32_handle_cpu( insn, raw_insn->cpu ); - ia32_stack_mod( insn ); -} - -static size_t ia32_decode_insn( unsigned char *buf, size_t buf_len, - ia32_insn_t *raw_insn, x86_insn_t *insn, - unsigned int prefixes ) { - size_t size, op_size; - unsigned char modrm; - - /* this should never happen, but just in case... */ - if ( raw_insn->mnem_flag == INS_INVALID ) { - return 0; - } - - if (ia32_settings.options & opt_16_bit) { - insn->op_size = ( prefixes & PREFIX_OP_SIZE ) ? 4 : 2; - insn->addr_size = ( prefixes & PREFIX_ADDR_SIZE ) ? 4 : 2; - } else { - insn->op_size = ( prefixes & PREFIX_OP_SIZE ) ? 2 : 4; - insn->addr_size = ( prefixes & PREFIX_ADDR_SIZE ) ? 2 : 4; - } - - - /* ++++ 1. Copy mnemonic and mnemonic-flags to CODE struct */ - if ((ia32_settings.options & opt_att_mnemonics) && raw_insn->mnemonic_att[0]) { - strncpy( insn->mnemonic, raw_insn->mnemonic_att, 16 ); - } - else { - strncpy( insn->mnemonic, raw_insn->mnemonic, 16 ); - } - ia32_handle_prefix( insn, prefixes ); - - handle_insn_metadata( insn, raw_insn ); - - /* prefetch the next byte in case it is a modr/m byte -- saves - * worrying about whether the 'mod/rm' operand or the 'reg' operand - * occurs first */ - modrm = GET_BYTE( buf, buf_len ); - - /* ++++ 2. Decode Explicit Operands */ - /* Intel uses up to 3 explicit operands in its instructions; - * the first is 'dest', the second is 'src', and the third - * is an additional source value (usually an immediate value, - * e.g. in the MUL instructions). These three explicit operands - * are encoded in the opcode tables, even if they are not used - * by the instruction. Additional implicit operands are stored - * in a supplemental table and are handled later. */ - - op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->dest, - raw_insn->dest_flag, prefixes, modrm ); - /* advance buffer, increase size if necessary */ - buf += op_size; - buf_len -= op_size; - size = op_size; - - op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->src, - raw_insn->src_flag, prefixes, modrm ); - buf += op_size; - buf_len -= op_size; - size += op_size; - - op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->aux, - raw_insn->aux_flag, prefixes, modrm ); - size += op_size; - - - /* ++++ 3. Decode Implicit Operands */ - /* apply implicit operands */ - ia32_insn_implicit_ops( insn, raw_insn->implicit_ops ); - /* we have one small inelegant hack here, to deal with - * the two prefixes that have implicit operands. If Intel - * adds more, we'll change the algorithm to suit :) */ - if ( (prefixes & PREFIX_REPZ) || (prefixes & PREFIX_REPNZ) ) { - ia32_insn_implicit_ops( insn, IDX_IMPLICIT_REP ); - } - - - /* 16-bit hack: foreach operand, if 32-bit reg, make 16-bit reg */ - if ( insn->op_size == 2 ) { - x86_operand_foreach( insn, reg_32_to_16, NULL, op_any ); - } - - return size; -} - - -/* convenience routine */ -#define USES_MOD_RM(flag) \ - (flag == ADDRMETH_E || flag == ADDRMETH_M || flag == ADDRMETH_Q || \ - flag == ADDRMETH_W || flag == ADDRMETH_R) - -static int uses_modrm_flag( unsigned int flag ) { - unsigned int meth; - if ( flag == ARG_NONE ) { - return 0; - } - meth = (flag & ADDRMETH_MASK); - if ( USES_MOD_RM(meth) ) { - return 1; - } - - return 0; -} - -/* This routine performs the actual byte-by-byte opcode table lookup. - * Originally it was pretty simple: get a byte, adjust it to a proper - * index into the table, then check the table row at that index to - * determine what to do next. But is anything that simple with Intel? - * This is now a huge, convoluted mess, mostly of bitter comments. */ -/* buf: pointer to next byte to read from stream - * buf_len: length of buf - * table: index of table to use for lookups - * raw_insn: output pointer that receives opcode definition - * prefixes: output integer that is encoded with prefixes in insn - * returns : number of bytes consumed from stream during lookup */ -size_t ia32_table_lookup( unsigned char *buf, size_t buf_len, - unsigned int table, ia32_insn_t **raw_insn, - unsigned int *prefixes ) { - unsigned char *next, op = buf[0]; /* byte value -- 'opcode' */ - size_t size = 1, sub_size = 0, next_len; - ia32_table_desc_t *table_desc; - unsigned int subtable, prefix = 0, recurse_table = 0; - - table_desc = &ia32_tables[table]; - - op = GET_BYTE( buf, buf_len ); - - if ( table_desc->type == tbl_fpu && op > table_desc->maxlim) { - /* one of the fucking FPU tables out of the 00-BH range */ - /* OK,. this is a bit of a hack -- the proper way would - * have been to use subtables in the 00-BF FPU opcode tables, - * but that is rather wasteful of space... */ - table_desc = &ia32_tables[table +1]; - } - - /* PERFORM TABLE LOOKUP */ - - /* ModR/M trick: shift extension bits into lowest bits of byte */ - /* Note: non-ModR/M tables have a shift value of 0 */ - op >>= table_desc->shift; - - /* ModR/M trick: mask out high bits to turn extension into an index */ - /* Note: non-ModR/M tables have a mask value of 0xFF */ - op &= table_desc->mask; - - - /* Sparse table trick: check that byte is <= max value */ - /* Note: full (256-entry) tables have a maxlim of 155 */ - if ( op > table_desc->maxlim ) { - /* this is a partial table, truncated at the tail, - and op is out of range! */ - return INVALID_INSN; - } - - /* Sparse table trick: check that byte is >= min value */ - /* Note: full (256-entry) tables have a minlim of 0 */ - if ( table_desc->minlim > op ) { - /* this is a partial table, truncated at the head, - and op is out of range! */ - return INVALID_INSN; - } - /* adjust op to be an offset from table index 0 */ - op -= table_desc->minlim; - - /* Yay! 'op' is now fully adjusted to be an index into 'table' */ - *raw_insn = &(table_desc->table[op]); - //printf("BYTE %X TABLE %d OP %X\n", buf[0], table, op ); - - if ( (*raw_insn)->mnem_flag & INS_FLAG_PREFIX ) { - prefix = (*raw_insn)->mnem_flag & PREFIX_MASK; - } - - - /* handle escape to a multibyte/coproc/extension/etc table */ - /* NOTE: if insn is a prefix and has a subtable, then we - * only recurse if this is the first prefix byte -- - * that is, if *prefixes is 0. - * NOTE also that suffix tables are handled later */ - subtable = (*raw_insn)->table; - - if ( subtable && ia32_tables[subtable].type != tbl_suffix && - (! prefix || ! *prefixes) ) { - - if ( ia32_tables[subtable].type == tbl_ext_ext || - ia32_tables[subtable].type == tbl_fpu_ext ) { - /* opcode extension: reuse current byte in buffer */ - next = buf; - next_len = buf_len; - } else { - /* "normal" opcode: advance to next byte in buffer */ - if ( buf_len > 1 ) { - next = &buf[1]; - next_len = buf_len - 1; - } - else { - // buffer is truncated - return INVALID_INSN; - } - } - /* we encountered a multibyte opcode: recurse using the - * table specified in the opcode definition */ - sub_size = ia32_table_lookup( next, next_len, subtable, - raw_insn, prefixes ); - - /* SSE/prefix hack: if the original opcode def was a - * prefix that specified a subtable, and the subtable - * lookup returned a valid insn, then we have encountered - * an SSE opcode definition; otherwise, we pretend we - * never did the subtable lookup, and deal with the - * prefix normally later */ - if ( prefix && ( sub_size == INVALID_INSN || - INS_TYPE((*raw_insn)->mnem_flag) == INS_INVALID ) ) { - /* this is a prefix, not an SSE insn : - * lookup next byte in main table, - * subsize will be reset during the - * main table lookup */ - recurse_table = 1; - } else { - /* this is either a subtable (two-byte) insn - * or an invalid insn: either way, set prefix - * to NULL and end the opcode lookup */ - prefix = 0; - // short-circuit lookup on invalid insn - if (sub_size == INVALID_INSN) return INVALID_INSN; - } - } else if ( prefix ) { - recurse_table = 1; - } - - /* by default, we assume that we have the opcode definition, - * and there is no need to recurse on the same table, but - * if we do then a prefix was encountered... */ - if ( recurse_table ) { - /* this must have been a prefix: use the same table for - * lookup of the next byte */ - sub_size = ia32_table_lookup( &buf[1], buf_len - 1, table, - raw_insn, prefixes ); - - // short-circuit lookup on invalid insn - if (sub_size == INVALID_INSN) return INVALID_INSN; - - /* a bit of a hack for branch hints */ - if ( prefix & BRANCH_HINT_MASK ) { - if ( INS_GROUP((*raw_insn)->mnem_flag) == INS_EXEC ) { - /* segment override prefixes are invalid for - * all branch instructions, so delete them */ - prefix &= ~PREFIX_REG_MASK; - } else { - prefix &= ~BRANCH_HINT_MASK; - } - } - - /* apply prefix to instruction */ - - /* TODO: implement something enforcing prefix groups */ - (*prefixes) |= prefix; - } - - /* if this lookup was in a ModR/M table, then an opcode byte is - * NOT consumed: subtract accordingly. NOTE that if none of the - * operands used the ModR/M, then we need to consume the byte - * here, but ONLY in the 'top-level' opcode extension table */ - - if ( table_desc->type == tbl_ext_ext ) { - /* extensions-to-extensions never consume a byte */ - --size; - } else if ( (table_desc->type == tbl_extension || - table_desc->type == tbl_fpu || - table_desc->type == tbl_fpu_ext ) && - /* extensions that have an operand encoded in ModR/M - * never consume a byte */ - (uses_modrm_flag((*raw_insn)->dest_flag) || - uses_modrm_flag((*raw_insn)->src_flag) ) ) { - --size; - } - - size += sub_size; - - return size; -} - -static size_t handle_insn_suffix( unsigned char *buf, size_t buf_len, - ia32_insn_t *raw_insn, x86_insn_t * insn ) { - ia32_table_desc_t *table_desc; - ia32_insn_t *sfx_insn; - size_t size; - unsigned int prefixes = 0; - - table_desc = &ia32_tables[raw_insn->table]; - size = ia32_table_lookup( buf, buf_len, raw_insn->table, &sfx_insn, - &prefixes ); - if (size == INVALID_INSN || sfx_insn->mnem_flag == INS_INVALID ) { - return 0; - } - - strncpy( insn->mnemonic, sfx_insn->mnemonic, 16 ); - handle_insn_metadata( insn, sfx_insn ); - - return 1; -} - -/* invalid instructions are handled by returning 0 [error] from the - * function, setting the size of the insn to 1 byte, and copying - * the byte at the start of the invalid insn into the x86_insn_t. - * if the caller is saving the x86_insn_t for invalid instructions, - * instead of discarding them, this will maintain a consistent - * address space in the x86_insn_ts */ - -/* this function is called by the controlling disassembler, so its name and - * calling convention cannot be changed */ -/* buf points to the loc of the current opcode (start of the - * instruction) in the instruction stream. The instruction - * stream is assumed to be a buffer of bytes read directly - * from the file for the purpose of disassembly; a mem-mapped - * file is ideal for * this. - * insn points to a code structure to be filled by instr_decode - * returns the size of the decoded instruction in bytes */ -size_t ia32_disasm_addr( unsigned char * buf, size_t buf_len, - x86_insn_t *insn ) { - ia32_insn_t *raw_insn = NULL; - unsigned int prefixes = 0; - size_t size, sfx_size; - - if ( (ia32_settings.options & opt_ignore_nulls) && buf_len > 3 && - !buf[0] && !buf[1] && !buf[2] && !buf[3]) { - /* IF IGNORE_NULLS is set AND - * first 4 bytes in the intruction stream are NULL - * THEN return 0 (END_OF_DISASSEMBLY) */ - /* TODO: set errno */ - MAKE_INVALID( insn, buf ); - return 0; /* 4 00 bytes in a row? This isn't code! */ - } - - /* Perform recursive table lookup starting with main table (0) */ - size = ia32_table_lookup(buf, buf_len, idx_Main, &raw_insn, &prefixes); - if ( size == INVALID_INSN || size > buf_len || raw_insn->mnem_flag == INS_INVALID ) { - MAKE_INVALID( insn, buf ); - /* TODO: set errno */ - return 0; - } - - /* We now have the opcode itself figured out: we can decode - * the rest of the instruction. */ - size += ia32_decode_insn( &buf[size], buf_len - size, raw_insn, insn, - prefixes ); - if ( raw_insn->mnem_flag & INS_FLAG_SUFFIX ) { - /* AMD 3DNow! suffix -- get proper operand type here */ - sfx_size = handle_insn_suffix( &buf[size], buf_len - size, - raw_insn, insn ); - if (! sfx_size ) { - /* TODO: set errno */ - MAKE_INVALID( insn, buf ); - return 0; - } - - size += sfx_size; - } - - if (! size ) { - /* invalid insn */ - MAKE_INVALID( insn, buf ); - return 0; - } - - - insn->size = size; - return size; /* return size of instruction in bytes */ -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.h deleted file mode 100644 index d3f36c3b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_insn.h +++ /dev/null @@ -1,506 +0,0 @@ -#ifndef IA32_INSN_H -#define IA32_INSN_H -/* this file contains the structure of opcode definitions and the - * constants they use */ - -#include -#include "libdis.h" - - -#define GET_BYTE( buf, buf_len ) buf_len ? *buf : 0 - -#define OP_SIZE_16 1 -#define OP_SIZE_32 2 -#define ADDR_SIZE_16 4 -#define ADDR_SIZE_32 8 - -#define MAX_INSTRUCTION_SIZE 20 - -/* invalid instructions are handled by returning 0 [error] from the - * function, setting the size of the insn to 1 byte, and copying - * the byte at the start of the invalid insn into the x86_insn_t. - * if the caller is saving the x86_insn_t for invalid instructions, - * instead of discarding them, this will maintain a consistent - * address space in the x86_insn_ts */ - -#define INVALID_INSN ((size_t) -1) /* return value for invalid insn */ -#define MAKE_INVALID( i, buf ) \ - strcpy( i->mnemonic, "invalid" ); \ - x86_oplist_free( i ); \ - i->size = 1; \ - i->group = insn_none; \ - i->type = insn_invalid; \ - memcpy( i->bytes, buf, 1 ); - - -size_t ia32_disasm_addr( unsigned char * buf, size_t buf_len, - x86_insn_t *insn); - - -/* --------------------------------------------------------- Table Lookup */ -/* IA32 Instruction defintion for ia32_opcodes.c */ -typedef struct { - unsigned int table; /* escape to this sub-table */ - unsigned int mnem_flag; /* Flags referring to mnemonic */ - unsigned int notes; /* Notes for this instruction */ - unsigned int dest_flag, src_flag, aux_flag; /* and for specific operands */ - unsigned int cpu; /* minimumCPU [AND with clocks?? */ - char mnemonic[16]; /* buffers for building instruction */ - char mnemonic_att[16]; /* at&t style mnemonic name */ - int32_t dest; - int32_t src; - int32_t aux; - unsigned int flags_effected; - unsigned int implicit_ops; /* implicit operands */ -} ia32_insn_t; - - - -/* --------------------------------------------------------- Prefixes */ -/* Prefix Flags */ -/* Prefixes, same order as in the manual */ -/* had to reverse the values of the first three as they were entered into - * libdis.h incorrectly. */ -#define PREFIX_LOCK 0x0004 -#define PREFIX_REPNZ 0x0002 -#define PREFIX_REPZ 0x0001 -#define PREFIX_OP_SIZE 0x0010 -#define PREFIX_ADDR_SIZE 0x0020 -#define PREFIX_CS 0x0100 -#define PREFIX_SS 0x0200 -#define PREFIX_DS 0x0300 -#define PREFIX_ES 0x0400 -#define PREFIX_FS 0x0500 -#define PREFIX_GS 0x0600 -#define PREFIX_TAKEN 0x1000 /* branch taken */ -#define PREFIX_NOTTAKEN 0x2000 /* branch not taken */ -#define PREFIX_REG_MASK 0x0F00 -#define BRANCH_HINT_MASK 0x3000 -#define PREFIX_PRINT_MASK 0x000F /* printable prefixes */ -#define PREFIX_MASK 0xFFFF - -/* ---------------------------------------------------------- CPU Type */ - -#define cpu_8086 0x0001 -#define cpu_80286 0x0002 -#define cpu_80386 0x0003 -#define cpu_80387 0x0004 /* originally these were a co-proc */ -#define cpu_80486 0x0005 -#define cpu_PENTIUM 0x0006 -#define cpu_PENTPRO 0x0007 -#define cpu_PENTIUM2 0x0008 -#define cpu_PENTIUM3 0x0009 -#define cpu_PENTIUM4 0x000A -#define cpu_K6 0x0010 -#define cpu_K7 0x0020 -#define cpu_ATHLON 0x0030 -#define CPU_MODEL_MASK 0xFFFF -#define CPU_MODEL(cpu) (cpu & CPU_MODEL_MASK) -/* intel instruction subsets */ -#define isa_GP 0x10000 /* General Purpose Instructions */ -#define isa_FPU 0x20000 /* FPU instructions */ -#define isa_FPUMGT 0x30000 /* FPU/SIMD Management */ -#define isa_MMX 0x40000 /* MMX */ -#define isa_SSE1 0x50000 /* SSE */ -#define isa_SSE2 0x60000 /* SSE 2 */ -#define isa_SSE3 0x70000 /* SSE 3 */ -#define isa_3DNOW 0x80000 /* AMD 3d Now */ -#define isa_SYS 0x90000 /* System Instructions */ -#define ISA_SUBSET_MASK 0xFFFF0000 -#define ISA_SUBSET(isa) (isa & ISA_SUBSET_MASK) - - -/* ------------------------------------------------------ Operand Decoding */ -#define ARG_NONE 0 - -/* Using a mask allows us to store info such as OP_SIGNED in the - * operand flags field */ -#define OPFLAGS_MASK 0x0000FFFF - -/* Operand Addressing Methods, per intel manual */ -#define ADDRMETH_MASK 0x00FF0000 - -/* note: for instructions with implied operands, use no ADDRMETH */ -#define ADDRMETH_A 0x00010000 -#define ADDRMETH_C 0x00020000 -#define ADDRMETH_D 0x00030000 -#define ADDRMETH_E 0x00040000 -#define ADDRMETH_F 0x00050000 -#define ADDRMETH_G 0x00060000 -#define ADDRMETH_I 0x00070000 -#define ADDRMETH_J 0x00080000 -#define ADDRMETH_M 0x00090000 -#define ADDRMETH_O 0x000A0000 -#define ADDRMETH_P 0x000B0000 -#define ADDRMETH_Q 0x000C0000 -#define ADDRMETH_R 0x000D0000 -#define ADDRMETH_S 0x000E0000 -#define ADDRMETH_T 0x000F0000 -#define ADDRMETH_V 0x00100000 -#define ADDRMETH_W 0x00110000 -#define ADDRMETH_X 0x00120000 -#define ADDRMETH_Y 0x00130000 -#define ADDRMETH_RR 0x00140000 /* gen reg hard-coded in opcode */ -#define ADDRMETH_RS 0x00150000 /* seg reg hard-coded in opcode */ -#define ADDRMETH_RT 0x00160000 /* test reg hard-coded in opcode */ -#define ADDRMETH_RF 0x00170000 /* fpu reg hard-coded in opcode */ -#define ADDRMETH_II 0x00180000 /* immediate hard-coded in opcode */ -#define ADDRMETH_PP 0x00190000 /* mm reg ONLY in modr/m field */ -#define ADDRMETH_VV 0x001A0000 /* xmm reg ONLY in mod/rm field */ - -/* Operand Types, per intel manual */ -#define OPTYPE_MASK 0xFF000000 - -#define OPTYPE_a 0x01000000 /* BOUND: h:h or w:w */ -#define OPTYPE_b 0x02000000 /* byte */ -#define OPTYPE_c 0x03000000 /* byte or word */ -#define OPTYPE_d 0x04000000 /* word */ -#define OPTYPE_dq 0x05000000 /* qword */ -#define OPTYPE_p 0x06000000 /* 16:16 or 16:32 pointer */ -#define OPTYPE_pi 0x07000000 /* dword MMX reg */ -#define OPTYPE_ps 0x08000000 /* 128-bit single fp */ -#define OPTYPE_q 0x09000000 /* dword */ -#define OPTYPE_s 0x0A000000 /* 6-byte descriptor */ -#define OPTYPE_ss 0x0B000000 /* scalar of 128-bit single fp */ -#define OPTYPE_si 0x0C000000 /* word general register */ -#define OPTYPE_v 0x0D000000 /* hword or word */ -#define OPTYPE_w 0x0E000000 /* hword */ -#define OPTYPE_m 0x0F000000 /* to handle LEA */ -#define OPTYPE_none 0xFF000000 /* no valid operand size, INVLPG */ - -/* custom ones for FPU instructions */ -#define OPTYPE_fs 0x10000000 /* pointer to single-real*/ -#define OPTYPE_fd 0x20000000 /* pointer to double real */ -#define OPTYPE_fe 0x30000000 /* pointer to extended real */ -#define OPTYPE_fb 0x40000000 /* pointer to packed BCD */ -#define OPTYPE_fv 0x50000000 /* pointer to FPU env: 14|28-bytes */ -#define OPTYPE_ft 0x60000000 /* pointer to FPU state: 94|108-bytes */ -#define OPTYPE_fx 0x70000000 /* pointer to FPU regs: 512 bites */ -#define OPTYPE_fp 0x80000000 /* general fpu register: dbl ext */ - -/* SSE2 operand types */ -#define OPTYPE_sd 0x90000000 /* scalar of 128-bit double fp */ -#define OPTYPE_pd 0xA0000000 /* 128-bit double fp */ - - - -/* ---------------------------------------------- Opcode Table Descriptions */ -/* the table type describes how to handle byte/size increments before - * and after lookup. Some tables re-use the current byte, others - * consume a byte only if the ModR/M encodes no operands, etc */ -enum ia32_tbl_type_id { - tbl_opcode = 0, /* standard opcode table: no surprises */ - tbl_prefix, /* Prefix Override, e.g. 66/F2/F3 */ - tbl_suffix, /* 3D Now style */ - tbl_extension, /* ModR/M extension: 00-FF -> 00-07 */ - tbl_ext_ext, /* extension of modr/m using R/M field */ - tbl_fpu, /* fpu table: 00-BF -> 00-0F */ - tbl_fpu_ext /* fpu extension : C0-FF -> 00-1F */ - }; - -/* How it works: - * Bytes are 'consumed' if the next table lookup requires that the byte - * pointer be advanced in the instruction stream. 'Does not consume' means - * that, when the lookup function recurses, the same byte it re-used in the - * new table. It also means that size is not decremented, for example when - * a ModR/M byte is used. Note that tbl_extension (ModR/M) instructions that - * do not increase the size of an insn with their operands have a forced - 3 size increase in the lookup algo. Weird, yes, confusing, yes, welcome - * to the Intel ISA. Another note: tbl_prefix is used as an override, so an - * empty insn in a prefix table causes the instruction in the original table - * to be used, rather than an invalid insn being generated. - * tbl_opcode uses current byte and consumes it - * tbl_prefix uses current byte but does not consume it - * tbl_suffix uses and consumes last byte in insn - * tbl_extension uses current byte but does not consume it - * tbl_ext_ext uses current byte but does not consume it - * tbl_fpu uses current byte and consumes it - * tbl_fpu_ext uses current byte but does not consume it - */ - -/* Convenience struct for opcode tables : these will be stored in a - * 'table of tables' so we can use a table index instead of a pointer */ -typedef struct { /* Assembly instruction tables */ - ia32_insn_t *table; /* Pointer to table of instruction encodings */ - enum ia32_tbl_type_id type; - unsigned char shift; /* amount to shift modrm byte */ - unsigned char mask; /* bit mask for look up */ - unsigned char minlim,maxlim; /* limits on min/max entries. */ -} ia32_table_desc_t; - - -/* ---------------------------------------------- 'Cooked' Operand Type Info */ -/* Permissions: */ -#define OP_R 0x001 /* operand is READ */ -#define OP_W 0x002 /* operand is WRITTEN */ -#define OP_RW 0x003 /* (OP_R|OP_W): convenience macro */ -#define OP_X 0x004 /* operand is EXECUTED */ - -#define OP_PERM_MASK 0x0000007 /* perms are NOT mutually exclusive */ -#define OP_PERM( type ) (type & OP_PERM_MASK) - -/* Flags */ -#define OP_SIGNED 0x010 /* operand is signed */ - -#define OP_FLAG_MASK 0x0F0 /* mods are NOT mutually exclusive */ -#define OP_FLAGS( type ) (type & OP_FLAG_MASK) - -#define OP_REG_MASK 0x0000FFFF /* lower WORD is register ID */ -#define OP_REGTBL_MASK 0xFFFF0000 /* higher word is register type [gen/dbg] */ -#define OP_REGID( type ) (type & OP_REG_MASK) -#define OP_REGTYPE( type ) (type & OP_REGTBL_MASK) - -/* ------------------------------------------'Cooked' Instruction Type Info */ -/* high-bit opcode types/insn meta-types */ -#define INS_FLAG_PREFIX 0x10000000 /* insn is a prefix */ -#define INS_FLAG_SUFFIX 0x20000000 /* followed by a suffix byte */ -#define INS_FLAG_MASK 0xFF000000 - -/* insn notes */ -#define INS_NOTE_RING0 0x00000001 /* insn is privileged */ -#define INS_NOTE_SMM 0x00000002 /* Sys Mgt Mode only */ -#define INS_NOTE_SERIAL 0x00000004 /* serializes */ -#define INS_NOTE_NONSWAP 0x00000008 /* insn is not swapped in att format */ // could be separate field? -#define INS_NOTE_NOSUFFIX 0x00000010 /* insn has no size suffix in att format */ // could be separate field? -//#define INS_NOTE_NMI - -#define INS_INVALID 0 - -/* instruction groups */ -#define INS_EXEC 0x1000 -#define INS_ARITH 0x2000 -#define INS_LOGIC 0x3000 -#define INS_STACK 0x4000 -#define INS_COND 0x5000 -#define INS_LOAD 0x6000 -#define INS_ARRAY 0x7000 -#define INS_BIT 0x8000 -#define INS_FLAG 0x9000 -#define INS_FPU 0xA000 -#define INS_TRAPS 0xD000 -#define INS_SYSTEM 0xE000 -#define INS_OTHER 0xF000 - -#define INS_GROUP_MASK 0xF000 -#define INS_GROUP( type ) ( type & INS_GROUP_MASK ) - -/* INS_EXEC group */ -#define INS_BRANCH (INS_EXEC | 0x01) /* Unconditional branch */ -#define INS_BRANCHCC (INS_EXEC | 0x02) /* Conditional branch */ -#define INS_CALL (INS_EXEC | 0x03) /* Jump to subroutine */ -#define INS_CALLCC (INS_EXEC | 0x04) /* Jump to subroutine */ -#define INS_RET (INS_EXEC | 0x05) /* Return from subroutine */ - -/* INS_ARITH group */ -#define INS_ADD (INS_ARITH | 0x01) -#define INS_SUB (INS_ARITH | 0x02) -#define INS_MUL (INS_ARITH | 0x03) -#define INS_DIV (INS_ARITH | 0x04) -#define INS_INC (INS_ARITH | 0x05) /* increment */ -#define INS_DEC (INS_ARITH | 0x06) /* decrement */ -#define INS_SHL (INS_ARITH | 0x07) /* shift right */ -#define INS_SHR (INS_ARITH | 0x08) /* shift left */ -#define INS_ROL (INS_ARITH | 0x09) /* rotate left */ -#define INS_ROR (INS_ARITH | 0x0A) /* rotate right */ -#define INS_MIN (INS_ARITH | 0x0B) /* min func */ -#define INS_MAX (INS_ARITH | 0x0C) /* max func */ -#define INS_AVG (INS_ARITH | 0x0D) /* avg func */ -#define INS_FLR (INS_ARITH | 0x0E) /* floor func */ -#define INS_CEIL (INS_ARITH | 0x0F) /* ceiling func */ - -/* INS_LOGIC group */ -#define INS_AND (INS_LOGIC | 0x01) -#define INS_OR (INS_LOGIC | 0x02) -#define INS_XOR (INS_LOGIC | 0x03) -#define INS_NOT (INS_LOGIC | 0x04) -#define INS_NEG (INS_LOGIC | 0x05) -#define INS_NAND (INS_LOGIC | 0x06) - -/* INS_STACK group */ -#define INS_PUSH (INS_STACK | 0x01) -#define INS_POP (INS_STACK | 0x02) -#define INS_PUSHREGS (INS_STACK | 0x03) /* push register context */ -#define INS_POPREGS (INS_STACK | 0x04) /* pop register context */ -#define INS_PUSHFLAGS (INS_STACK | 0x05) /* push all flags */ -#define INS_POPFLAGS (INS_STACK | 0x06) /* pop all flags */ -#define INS_ENTER (INS_STACK | 0x07) /* enter stack frame */ -#define INS_LEAVE (INS_STACK | 0x08) /* leave stack frame */ - -/* INS_COND group */ -#define INS_TEST (INS_COND | 0x01) -#define INS_CMP (INS_COND | 0x02) - -/* INS_LOAD group */ -#define INS_MOV (INS_LOAD | 0x01) -#define INS_MOVCC (INS_LOAD | 0x02) -#define INS_XCHG (INS_LOAD | 0x03) -#define INS_XCHGCC (INS_LOAD | 0x04) -#define INS_CONV (INS_LOAD | 0x05) /* move and convert type */ - -/* INS_ARRAY group */ -#define INS_STRCMP (INS_ARRAY | 0x01) -#define INS_STRLOAD (INS_ARRAY | 0x02) -#define INS_STRMOV (INS_ARRAY | 0x03) -#define INS_STRSTOR (INS_ARRAY | 0x04) -#define INS_XLAT (INS_ARRAY | 0x05) - -/* INS_BIT group */ -#define INS_BITTEST (INS_BIT | 0x01) -#define INS_BITSET (INS_BIT | 0x02) -#define INS_BITCLR (INS_BIT | 0x03) - -/* INS_FLAG group */ -#define INS_CLEARCF (INS_FLAG | 0x01) /* clear Carry flag */ -#define INS_CLEARZF (INS_FLAG | 0x02) /* clear Zero flag */ -#define INS_CLEAROF (INS_FLAG | 0x03) /* clear Overflow flag */ -#define INS_CLEARDF (INS_FLAG | 0x04) /* clear Direction flag */ -#define INS_CLEARSF (INS_FLAG | 0x05) /* clear Sign flag */ -#define INS_CLEARPF (INS_FLAG | 0x06) /* clear Parity flag */ -#define INS_SETCF (INS_FLAG | 0x07) -#define INS_SETZF (INS_FLAG | 0x08) -#define INS_SETOF (INS_FLAG | 0x09) -#define INS_SETDF (INS_FLAG | 0x0A) -#define INS_SETSF (INS_FLAG | 0x0B) -#define INS_SETPF (INS_FLAG | 0x0C) -#define INS_TOGCF (INS_FLAG | 0x10) /* toggle */ -#define INS_TOGZF (INS_FLAG | 0x20) -#define INS_TOGOF (INS_FLAG | 0x30) -#define INS_TOGDF (INS_FLAG | 0x40) -#define INS_TOGSF (INS_FLAG | 0x50) -#define INS_TOGPF (INS_FLAG | 0x60) - -/* INS_FPU */ -#define INS_FMOV (INS_FPU | 0x1) -#define INS_FMOVCC (INS_FPU | 0x2) -#define INS_FNEG (INS_FPU | 0x3) -#define INS_FABS (INS_FPU | 0x4) -#define INS_FADD (INS_FPU | 0x5) -#define INS_FSUB (INS_FPU | 0x6) -#define INS_FMUL (INS_FPU | 0x7) -#define INS_FDIV (INS_FPU | 0x8) -#define INS_FSQRT (INS_FPU | 0x9) -#define INS_FCMP (INS_FPU | 0xA) -#define INS_FCOS (INS_FPU | 0xC) /* cosine */ -#define INS_FLDPI (INS_FPU | 0xD) /* load pi */ -#define INS_FLDZ (INS_FPU | 0xE) /* load 0 */ -#define INS_FTAN (INS_FPU | 0xF) /* tanget */ -#define INS_FSINE (INS_FPU | 0x10) /* sine */ -#define INS_FSYS (INS_FPU | 0x20) /* misc */ - -/* INS_TRAP */ -#define INS_TRAP (INS_TRAPS | 0x01) /* generate trap */ -#define INS_TRAPCC (INS_TRAPS | 0x02) /* conditional trap gen */ -#define INS_TRET (INS_TRAPS | 0x03) /* return from trap */ -#define INS_BOUNDS (INS_TRAPS | 0x04) /* gen bounds trap */ -#define INS_DEBUG (INS_TRAPS | 0x05) /* gen breakpoint trap */ -#define INS_TRACE (INS_TRAPS | 0x06) /* gen single step trap */ -#define INS_INVALIDOP (INS_TRAPS | 0x07) /* gen invalid insn */ -#define INS_OFLOW (INS_TRAPS | 0x08) /* gen overflow trap */ -#define INS_ICEBP (INS_TRAPS | 0x09) /* ICE breakpoint */ - -/* INS_SYSTEM */ -#define INS_HALT (INS_SYSTEM | 0x01) /* halt machine */ -#define INS_IN (INS_SYSTEM | 0x02) /* input form port */ -#define INS_OUT (INS_SYSTEM | 0x03) /* output to port */ -#define INS_CPUID (INS_SYSTEM | 0x04) /* identify cpu */ - -/* INS_OTHER */ -#define INS_NOP (INS_OTHER | 0x01) -#define INS_BCDCONV (INS_OTHER | 0x02) /* convert to/from BCD */ -#define INS_SZCONV (INS_OTHER | 0x03) /* convert size of operand */ -#define INS_SALC (INS_OTHER | 0x04) /* set %al on carry */ -#define INS_UNKNOWN (INS_OTHER | 0x05) - - -#define INS_TYPE_MASK 0xFFFF -#define INS_TYPE( type ) ( type & INS_TYPE_MASK ) - - /* flags effected by instruction */ -#define INS_TEST_CARRY 0x01 /* carry */ -#define INS_TEST_ZERO 0x02 /* zero/equal */ -#define INS_TEST_OFLOW 0x04 /* overflow */ -#define INS_TEST_DIR 0x08 /* direction */ -#define INS_TEST_SIGN 0x10 /* negative */ -#define INS_TEST_PARITY 0x20 /* parity */ -#define INS_TEST_OR 0x40 /* used in jle */ -#define INS_TEST_NCARRY 0x100 /* ! carry */ -#define INS_TEST_NZERO 0x200 /* ! zero */ -#define INS_TEST_NOFLOW 0x400 /* ! oflow */ -#define INS_TEST_NDIR 0x800 /* ! dir */ -#define INS_TEST_NSIGN 0x100 /* ! sign */ -#define INS_TEST_NPARITY 0x2000 /* ! parity */ -/* SF == OF */ -#define INS_TEST_SFEQOF 0x4000 -/* SF != OF */ -#define INS_TEST_SFNEOF 0x8000 - -#define INS_TEST_ALL INS_TEST_CARRY | INS_TEST_ZERO | \ - INS_TEST_OFLOW | INS_TEST_SIGN | \ - INS_TEST_PARITY - -#define INS_SET_CARRY 0x010000 /* carry */ -#define INS_SET_ZERO 0x020000 /* zero/equal */ -#define INS_SET_OFLOW 0x040000 /* overflow */ -#define INS_SET_DIR 0x080000 /* direction */ -#define INS_SET_SIGN 0x100000 /* negative */ -#define INS_SET_PARITY 0x200000 /* parity */ -#define INS_SET_NCARRY 0x1000000 -#define INS_SET_NZERO 0x2000000 -#define INS_SET_NOFLOW 0x4000000 -#define INS_SET_NDIR 0x8000000 -#define INS_SET_NSIGN 0x10000000 -#define INS_SET_NPARITY 0x20000000 -#define INS_SET_SFEQOF 0x40000000 -#define INS_SET_SFNEOF 0x80000000 - -#define INS_SET_ALL INS_SET_CARRY | INS_SET_ZERO | \ - INS_SET_OFLOW | INS_SET_SIGN | \ - INS_SET_PARITY - -#define INS_TEST_MASK 0x0000FFFF -#define INS_FLAGS_TEST(x) (x & INS_TEST_MASK) -#define INS_SET_MASK 0xFFFF0000 -#define INS_FLAGS_SET(x) (x & INS_SET_MASK) - -#if 0 -/* TODO: actually start using these */ -#define X86_PAIR_NP 1 /* not pairable; execs in U */ -#define X86_PAIR_PU 2 /* pairable in U pipe */ -#define X86_PAIR_PV 3 /* pairable in V pipe */ -#define X86_PAIR_UV 4 /* pairable in UV pipe */ -#define X86_PAIR_FX 5 /* pairable with FXCH */ - -#define X86_EXEC_PORT_0 1 -#define X86_EXEC_PORT_1 2 -#define X86_EXEC_PORT_2 4 -#define X86_EXEC_PORT_3 8 -#define X86_EXEC_PORT_4 16 - -#define X86_EXEC_UNITS - -typedef struct { /* representation of an insn during decoding */ - uint32_t flags; /* runtime settings */ - /* instruction prefixes and other foolishness */ - uint32_t prefix; /* encoding of prefix */ - char prefix_str[16]; /* mnemonics for prefix */ - uint32_t branch_hint; /* gah! */ - unsigned int cpu_ver; /* TODO: cpu version */ - unsigned int clocks; /* TODO: clock cycles: min/max */ - unsigned char last_prefix; - /* runtime intruction decoding helpers */ - unsigned char mode; /* 16, 32, 64 */ - unsigned char gen_regs; /* offset of default general reg set */ - unsigned char sz_operand; /* operand size for insn */ - unsigned char sz_address; /* address size for insn */ - unsigned char uops; /* uops per insn */ - unsigned char pairing; /* np,pu,pv.lv */ - unsigned char exec_unit; - unsigned char exec_port; - unsigned char latency; -} ia32_info_t; -#define MODE_32 0 /* default */ -#define MODE_16 1 -#define MODE_64 2 -#endif - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.c deleted file mode 100644 index 68ec153d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.c +++ /dev/null @@ -1,313 +0,0 @@ -#include -#include - -#include "ia32_invariant.h" -#include "ia32_insn.h" -#include "ia32_settings.h" - -extern ia32_table_desc_t *ia32_tables; -extern ia32_settings_t ia32_settings; - -extern size_t ia32_table_lookup( unsigned char *buf, size_t buf_len, - unsigned int table, ia32_insn_t **raw_insn, - unsigned int *prefixes ); - - -/* -------------------------------- ModR/M, SIB */ -/* Convenience flags */ -#define MODRM_EA 1 /* ModR/M is an effective addr */ -#define MODRM_reg 2 /* ModR/M is a register */ - -/* ModR/M flags */ -#define MODRM_RM_SIB 0x04 /* R/M == 100 */ -#define MODRM_RM_NOREG 0x05 /* R/B == 101 */ -/* if (MODRM.MOD_NODISP && MODRM.RM_NOREG) then just disp32 */ -#define MODRM_MOD_NODISP 0x00 /* mod == 00 */ -#define MODRM_MOD_DISP8 0x01 /* mod == 01 */ -#define MODRM_MOD_DISP32 0x02 /* mod == 10 */ -#define MODRM_MOD_NOEA 0x03 /* mod == 11 */ -/* 16-bit modrm flags */ -#define MOD16_MOD_NODISP 0 -#define MOD16_MOD_DISP8 1 -#define MOD16_MOD_DISP16 2 -#define MOD16_MOD_REG 3 - -#define MOD16_RM_BXSI 0 -#define MOD16_RM_BXDI 1 -#define MOD16_RM_BPSI 2 -#define MOD16_RM_BPDI 3 -#define MOD16_RM_SI 4 -#define MOD16_RM_DI 5 -#define MOD16_RM_BP 6 -#define MOD16_RM_BX 7 - -/* SIB flags */ -#define SIB_INDEX_NONE 0x04 -#define SIB_BASE_EBP 0x05 -#define SIB_SCALE_NOBASE 0x00 - -/* Convenience struct for modR/M bitfield */ -struct modRM_byte { - unsigned int mod : 2; - unsigned int reg : 3; - unsigned int rm : 3; -}; - -/* Convenience struct for SIB bitfield */ -struct SIB_byte { - unsigned int scale : 2; - unsigned int index : 3; - unsigned int base : 3; -}; - -#ifdef WIN32 -static void byte_decode(unsigned char b, struct modRM_byte *modrm) { -#else -static inline void byte_decode(unsigned char b, struct modRM_byte *modrm) { -#endif - /* generic bitfield-packing routine */ - - modrm->mod = b >> 6; /* top 2 bits */ - modrm->reg = (b & 56) >> 3; /* middle 3 bits */ - modrm->rm = b & 7; /* bottom 3 bits */ -} -static int ia32_invariant_modrm( unsigned char *in, unsigned char *out, - unsigned int mode_16, x86_invariant_op_t *op) { - struct modRM_byte modrm; - struct SIB_byte sib; - unsigned char *c, *cin; - unsigned short *s; - unsigned int *i; - int size = 0; /* modrm byte is already counted */ - - - byte_decode(*in, &modrm); /* get bitfields */ - - out[0] = in[0]; /* save modrm byte */ - cin = &in[1]; - c = &out[1]; - s = (unsigned short *)&out[1]; - i = (unsigned int *)&out[1]; - - op->type = op_expression; - op->flags |= op_pointer; - if ( ! mode_16 && modrm.rm == MODRM_RM_SIB && - modrm.mod != MODRM_MOD_NOEA ) { - size ++; - byte_decode(*cin, (struct modRM_byte *)(void*)&sib); - - out[1] = in[1]; /* save sib byte */ - cin = &in[2]; - c = &out[2]; - s = (unsigned short *)&out[2]; - i = (unsigned int *)&out[2]; - - if ( sib.base == SIB_BASE_EBP && ! modrm.mod ) { - /* disp 32 is variant! */ - memset( i, X86_WILDCARD_BYTE, 4 ); - size += 4; - } - } - - if (! modrm.mod && modrm.rm == 101) { - if ( mode_16 ) { /* straight RVA in disp */ - memset( s, X86_WILDCARD_BYTE, 2 ); - size += 2; - } else { - memset( i, X86_WILDCARD_BYTE, 2 ); - size += 4; - } - } else if (modrm.mod && modrm.mod < 3) { - if (modrm.mod == MODRM_MOD_DISP8) { /* offset in disp */ - *c = *cin; - size += 1; - } else if ( mode_16 ) { - *s = (* ((unsigned short *) cin)); - size += 2; - } else { - *i = (*((unsigned int *) cin)); - size += 4; - } - } else if ( modrm.mod == 3 ) { - op->type = op_register; - op->flags &= ~op_pointer; - } - - return (size); -} - - -static int ia32_decode_invariant( unsigned char *buf, size_t buf_len, - ia32_insn_t *t, unsigned char *out, - unsigned int prefixes, x86_invariant_t *inv) { - - unsigned int addr_size, op_size, mode_16; - unsigned int op_flags[3] = { t->dest_flag, t->src_flag, t->aux_flag }; - int x, type, bytes = 0, size = 0, modrm = 0; - - /* set addressing mode */ - if (ia32_settings.options & opt_16_bit) { - op_size = ( prefixes & PREFIX_OP_SIZE ) ? 4 : 2; - addr_size = ( prefixes & PREFIX_ADDR_SIZE ) ? 4 : 2; - mode_16 = ( prefixes & PREFIX_ADDR_SIZE ) ? 0 : 1; - } else { - op_size = ( prefixes & PREFIX_OP_SIZE ) ? 2 : 4; - addr_size = ( prefixes & PREFIX_ADDR_SIZE ) ? 2 : 4; - mode_16 = ( prefixes & PREFIX_ADDR_SIZE ) ? 1 : 0; - } - - for (x = 0; x < 3; x++) { - inv->operands[x].access = (enum x86_op_access) - OP_PERM(op_flags[x]); - inv->operands[x].flags = (enum x86_op_flags) - (OP_FLAGS(op_flags[x]) >> 12); - - switch (op_flags[x] & OPTYPE_MASK) { - case OPTYPE_c: - size = (op_size == 4) ? 2 : 1; - break; - case OPTYPE_a: case OPTYPE_v: - size = (op_size == 4) ? 4 : 2; - break; - case OPTYPE_p: - size = (op_size == 4) ? 6 : 4; - break; - case OPTYPE_b: - size = 1; - break; - case OPTYPE_w: - size = 2; - break; - case OPTYPE_d: case OPTYPE_fs: case OPTYPE_fd: - case OPTYPE_fe: case OPTYPE_fb: case OPTYPE_fv: - case OPTYPE_si: case OPTYPE_fx: - size = 4; - break; - case OPTYPE_s: - size = 6; - break; - case OPTYPE_q: case OPTYPE_pi: - size = 8; - break; - case OPTYPE_dq: case OPTYPE_ps: case OPTYPE_ss: - case OPTYPE_pd: case OPTYPE_sd: - size = 16; - break; - case OPTYPE_m: - size = (addr_size == 4) ? 4 : 2; - break; - default: - break; - } - - type = op_flags[x] & ADDRMETH_MASK; - switch (type) { - case ADDRMETH_E: case ADDRMETH_M: case ADDRMETH_Q: - case ADDRMETH_R: case ADDRMETH_W: - modrm = 1; - bytes += ia32_invariant_modrm( buf, out, - mode_16, &inv->operands[x]); - break; - case ADDRMETH_C: case ADDRMETH_D: case ADDRMETH_G: - case ADDRMETH_P: case ADDRMETH_S: case ADDRMETH_T: - case ADDRMETH_V: - inv->operands[x].type = op_register; - modrm = 1; - break; - case ADDRMETH_A: case ADDRMETH_O: - /* pad with xF4's */ - memset( &out[bytes + modrm], X86_WILDCARD_BYTE, - size ); - bytes += size; - inv->operands[x].type = op_offset; - if ( type == ADDRMETH_O ) { - inv->operands[x].flags |= op_signed | - op_pointer; - } - break; - case ADDRMETH_I: case ADDRMETH_J: - /* grab imm value */ - if ((op_flags[x] & OPTYPE_MASK) == OPTYPE_v) { - /* assume this is an address */ - memset( &out[bytes + modrm], - X86_WILDCARD_BYTE, size ); - } else { - memcpy( &out[bytes + modrm], - &buf[bytes + modrm], size ); - } - - bytes += size; - if ( type == ADDRMETH_J ) { - if ( size == 1 ) { - inv->operands[x].type = - op_relative_near; - } else { - inv->operands[x].type = - op_relative_far; - } - inv->operands[x].flags |= op_signed; - } else { - inv->operands[x].type = op_immediate; - } - break; - case ADDRMETH_F: - inv->operands[x].type = op_register; - break; - case ADDRMETH_X: - inv->operands[x].flags |= op_signed | - op_pointer | op_ds_seg | op_string; - break; - case ADDRMETH_Y: - inv->operands[x].flags |= op_signed | - op_pointer | op_es_seg | op_string; - break; - case ADDRMETH_RR: - inv->operands[x].type = op_register; - break; - case ADDRMETH_II: - inv->operands[x].type = op_immediate; - break; - default: - inv->operands[x].type = op_unused; - break; - } - } - - return (bytes + modrm); -} - -size_t ia32_disasm_invariant( unsigned char * buf, size_t buf_len, - x86_invariant_t *inv ) { - ia32_insn_t *raw_insn = NULL; - unsigned int prefixes; - unsigned int type; - size_t size; - - /* Perform recursive table lookup starting with main table (0) */ - size = ia32_table_lookup( buf, buf_len, 0, &raw_insn, &prefixes ); - if ( size == INVALID_INSN || size > buf_len ) { - /* TODO: set errno */ - return 0; - } - - /* copy opcode bytes to buffer */ - memcpy( inv->bytes, buf, size ); - - /* set mnemonic type and group */ - type = raw_insn->mnem_flag & ~INS_FLAG_MASK; - inv->group = (enum x86_insn_group) (INS_GROUP(type)) >> 12; - inv->type = (enum x86_insn_type) INS_TYPE(type); - - /* handle operands */ - size += ia32_decode_invariant( buf + size, buf_len - size, raw_insn, - &buf[size - 1], prefixes, inv ); - - inv->size = size; - - return size; /* return size of instruction in bytes */ -} - -size_t ia32_disasm_size( unsigned char *buf, size_t buf_len ) { - x86_invariant_t inv = { {0} }; - return( ia32_disasm_invariant( buf, buf_len, &inv ) ); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.h deleted file mode 100644 index e1cea60e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_invariant.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef IA32_INVARIANT_H -#define IA32_INVARIANT_H - -#include "libdis.h" - -size_t ia32_disasm_invariant( unsigned char *buf, size_t buf_len, - x86_invariant_t *inv); - -size_t ia32_disasm_size( unsigned char *buf, size_t buf_len ); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.c deleted file mode 100644 index b0fe2ed3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.c +++ /dev/null @@ -1,310 +0,0 @@ -#include "ia32_modrm.h" -#include "ia32_reg.h" -#include "x86_imm.h" - -/* NOTE: when decoding ModR/M and SIB, we have to add 1 to all register - * values obtained from decoding the ModR/M or SIB byte, since they - * are encoded with eAX = 0 and the tables in ia32_reg.c use eAX = 1. - * ADDENDUM: this is only the case when the register value is used - * directly as an index into the register table, not when it is added to - * a genregs offset. */ - -/* -------------------------------- ModR/M, SIB */ -/* ModR/M flags */ -#define MODRM_RM_SIB 0x04 /* R/M == 100 */ -#define MODRM_RM_NOREG 0x05 /* R/B == 101 */ - -/* if (MODRM.MOD_NODISP && MODRM.RM_NOREG) then just disp32 */ -#define MODRM_MOD_NODISP 0x00 /* mod == 00 */ -#define MODRM_MOD_DISP8 0x01 /* mod == 01 */ -#define MODRM_MOD_DISP32 0x02 /* mod == 10 */ -#define MODRM_MOD_NOEA 0x03 /* mod == 11 */ - -/* 16-bit modrm flags */ -#define MOD16_MOD_NODISP 0 -#define MOD16_MOD_DISP8 1 -#define MOD16_MOD_DISP16 2 -#define MOD16_MOD_REG 3 - -#define MOD16_RM_BXSI 0 -#define MOD16_RM_BXDI 1 -#define MOD16_RM_BPSI 2 -#define MOD16_RM_BPDI 3 -#define MOD16_RM_SI 4 -#define MOD16_RM_DI 5 -#define MOD16_RM_BP 6 -#define MOD16_RM_BX 7 - -/* SIB flags */ -#define SIB_INDEX_NONE 0x04 -#define SIB_BASE_EBP 0x05 -#define SIB_SCALE_NOBASE 0x00 - -/* Convenience struct for modR/M bitfield */ -struct modRM_byte { - unsigned int mod : 2; - unsigned int reg : 3; - unsigned int rm : 3; -}; - -/* Convenience struct for SIB bitfield */ -struct SIB_byte { - unsigned int scale : 2; - unsigned int index : 3; - unsigned int base : 3; -}; - - -#if 0 -int modrm_rm[] = {0,1,2,3,MODRM_RM_SIB,MODRM_MOD_DISP32,6,7}; -int modrm_reg[] = {0, 1, 2, 3, 4, 5, 6, 7}; -int modrm_mod[] = {0, MODRM_MOD_DISP8, MODRM_MOD_DISP32, MODRM_MOD_NOEA}; -int sib_scl[] = {0, 2, 4, 8}; -int sib_idx[] = {0, 1, 2, 3, SIB_INDEX_NONE, 5, 6, 7 }; -int sib_bas[] = {0, 1, 2, 3, 4, SIB_SCALE_NOBASE, 6, 7 }; -#endif - -/* this is needed to replace x86_imm_signsized() which does not sign-extend - * to dest */ -static unsigned int imm32_signsized( unsigned char *buf, size_t buf_len, - int32_t *dest, unsigned int size ) { - if ( size > buf_len ) { - return 0; - } - - switch (size) { - case 1: - *dest = *((signed char *) buf); - break; - case 2: - *dest = *((signed short *) buf); - break; - case 4: - default: - *dest = *((signed int *) buf); - break; - } - - return size; -} - - - -static void byte_decode(unsigned char b, struct modRM_byte *modrm) { - /* generic bitfield-packing routine */ - - modrm->mod = b >> 6; /* top 2 bits */ - modrm->reg = (b & 56) >> 3; /* middle 3 bits */ - modrm->rm = b & 7; /* bottom 3 bits */ -} - - -static size_t sib_decode( unsigned char *buf, size_t buf_len, x86_ea_t *ea, - unsigned int mod ) { - /* set Address Expression fields (scale, index, base, disp) - * according to the contents of the SIB byte. - * b points to the SIB byte in the instruction-stream buffer; the - * byte after b[0] is therefore the byte after the SIB - * returns number of bytes 'used', including the SIB byte */ - size_t size = 1; /* start at 1 for SIB byte */ - struct SIB_byte sib; - - if ( buf_len < 1 ) { - return 0; - } - - byte_decode( *buf, (struct modRM_byte *)(void*)&sib ); /* get bit-fields */ - - if ( sib.base == SIB_BASE_EBP && ! mod ) { /* if base == 101 (ebp) */ - /* IF BASE == EBP, deal with exception */ - /* IF (ModR/M did not create a Disp */ - /* ... create a 32-bit Displacement */ - imm32_signsized( &buf[1], buf_len, &ea->disp, sizeof(int32_t)); - ea->disp_size = sizeof(int32_t); - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - size += 4; /* add sizeof disp to count */ - - } else { - /* ELSE BASE refers to a General Register */ - ia32_handle_register( &ea->base, sib.base + 1 ); - } - - /* set scale to 1, 2, 4, 8 */ - ea->scale = 1 << sib.scale; - - if (sib.index != SIB_INDEX_NONE) { - /* IF INDEX is not 'ESP' (100) */ - ia32_handle_register( &ea->index, sib.index + 1 ); - } - - return (size); /* return number of bytes processed */ -} - -static size_t modrm_decode16( unsigned char *buf, unsigned int buf_len, - x86_op_t *op, struct modRM_byte *modrm ) { - /* 16-bit mode: hackish, but not as hackish as 32-bit mode ;) */ - size_t size = 1; /* # of bytes decoded [1 for modR/M byte] */ - x86_ea_t * ea = &op->data.expression; - - switch( modrm->rm ) { - case MOD16_RM_BXSI: - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 3); - ia32_handle_register(&ea->index, REG_WORD_OFFSET + 6); - break; - case MOD16_RM_BXDI: - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 3); - ia32_handle_register(&ea->index, REG_WORD_OFFSET + 7); - case MOD16_RM_BPSI: - op->flags |= op_ss_seg; - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 5); - ia32_handle_register(&ea->index, REG_WORD_OFFSET + 6); - break; - case MOD16_RM_BPDI: - op->flags |= op_ss_seg; - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 5); - ia32_handle_register(&ea->index, REG_WORD_OFFSET + 7); - break; - case MOD16_RM_SI: - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 6); - break; - case MOD16_RM_DI: - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 7); - break; - case MOD16_RM_BP: - if ( modrm->mod != MOD16_MOD_NODISP ) { - op->flags |= op_ss_seg; - ia32_handle_register(&ea->base, - REG_WORD_OFFSET + 5); - } - break; - case MOD16_RM_BX: - ia32_handle_register(&ea->base, REG_WORD_OFFSET + 3); - break; - } - - /* move to byte after ModR/M */ - ++buf; - --buf_len; - - if ( modrm->mod == MOD16_MOD_DISP8 ) { - imm32_signsized( buf, buf_len, &ea->disp, sizeof(char) ); - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - ea->disp_size = sizeof(char); - size += sizeof(char); - } else if ( modrm->mod == MOD16_MOD_DISP16 ) { - imm32_signsized( buf, buf_len, &ea->disp, sizeof(short) ); - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - ea->disp_size = sizeof(short); - size += sizeof(short); - } - - return size; -} - -/* TODO : Mark index modes - Use addressing mode flags to imply arrays (index), structure (disp), - two-dimensional arrays [disp + index], classes [ea reg], and so on. -*/ -size_t ia32_modrm_decode( unsigned char *buf, unsigned int buf_len, - x86_op_t *op, x86_insn_t *insn, size_t gen_regs ) { - /* create address expression and/or fill operand based on value of - * ModR/M byte. Calls sib_decode as appropriate. - * flags specifies whether Reg or mod+R/M fields are being decoded - * returns the number of bytes in the instruction, including modR/M */ - struct modRM_byte modrm; - size_t size = 1; /* # of bytes decoded [1 for modR/M byte] */ - x86_ea_t * ea; - - - byte_decode(*buf, &modrm); /* get bitfields */ - - /* first, handle the case where the mod field is a register only */ - if ( modrm.mod == MODRM_MOD_NOEA ) { - op->type = op_register; - ia32_handle_register(&op->data.reg, modrm.rm + gen_regs); - /* increase insn size by 1 for modrm byte */ - return 1; - } - - /* then deal with cases where there is an effective address */ - ea = &op->data.expression; - op->type = op_expression; - op->flags |= op_pointer; - - if ( insn->addr_size == 2 ) { - /* gah! 16 bit mode! */ - return modrm_decode16( buf, buf_len, op, &modrm); - } - - /* move to byte after ModR/M */ - ++buf; - --buf_len; - - if (modrm.mod == MODRM_MOD_NODISP) { /* if mod == 00 */ - - /* IF MOD == No displacement, just Indirect Register */ - if (modrm.rm == MODRM_RM_NOREG) { /* if r/m == 101 */ - /* IF RM == No Register, just Displacement */ - /* This is an Intel Moronic Exception TM */ - imm32_signsized( buf, buf_len, &ea->disp, - sizeof(int32_t) ); - ea->disp_size = sizeof(int32_t); - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - size += 4; /* add sizeof disp to count */ - - } else if (modrm.rm == MODRM_RM_SIB) { /* if r/m == 100 */ - /* ELSE IF an SIB byte is present */ - /* TODO: check for 0 retval */ - size += sib_decode( buf, buf_len, ea, modrm.mod); - /* move to byte after SIB for displacement */ - ++buf; - --buf_len; - } else { /* modR/M specifies base register */ - /* ELSE RM encodes a general register */ - ia32_handle_register( &ea->base, modrm.rm + 1 ); - } - } else { /* mod is 01 or 10 */ - if (modrm.rm == MODRM_RM_SIB) { /* rm == 100 */ - /* IF base is an AddrExpr specified by an SIB byte */ - /* TODO: check for 0 retval */ - size += sib_decode( buf, buf_len, ea, modrm.mod); - /* move to byte after SIB for displacement */ - ++buf; - --buf_len; - } else { - /* ELSE base is a general register */ - ia32_handle_register( &ea->base, modrm.rm + 1 ); - } - - /* ELSE mod + r/m specify a disp##[base] or disp##(SIB) */ - if (modrm.mod == MODRM_MOD_DISP8) { /* mod == 01 */ - /* If this is an 8-bit displacement */ - imm32_signsized( buf, buf_len, &ea->disp, - sizeof(char)); - ea->disp_size = sizeof(char); - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - size += 1; /* add sizeof disp to count */ - - } else { - /* Displacement is dependent on address size */ - imm32_signsized( buf, buf_len, &ea->disp, - insn->addr_size); - ea->disp_size = insn->addr_size; - ea->disp_sign = (ea->disp < 0) ? 1 : 0; - size += 4; - } - } - - return size; /* number of bytes found in instruction */ -} - -void ia32_reg_decode( unsigned char byte, x86_op_t *op, size_t gen_regs ) { - struct modRM_byte modrm; - byte_decode( byte, &modrm ); /* get bitfields */ - - /* set operand to register ID */ - op->type = op_register; - ia32_handle_register(&op->data.reg, modrm.reg + gen_regs); - - return; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.h deleted file mode 100644 index 765cb083..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_modrm.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef IA32_MODRM_H -#define IA32_MODRM_H - -#include "libdis.h" -#include "ia32_insn.h" - -size_t ia32_modrm_decode( unsigned char *buf, unsigned int buf_len, - x86_op_t *op, x86_insn_t *insn, - size_t gen_regs ); - -void ia32_reg_decode( unsigned char byte, x86_op_t *op, size_t gen_regs ); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.c deleted file mode 100644 index ef97c7a3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.c +++ /dev/null @@ -1,2939 +0,0 @@ -#include "ia32_insn.h" - -#include "ia32_reg.h" - -#include "ia32_opcode_tables.h" - -static ia32_insn_t tbl_Main[] = { /* One-byte Opcodes */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 0, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RS | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 0, 0, 0, 0 , 33 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 1, 0, 0, 0 , 33 }, - { idx_0F, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, -/* 0x10 */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_ADD, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_ADD, 0, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_ADD, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_ADD, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 2, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RS | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 2, 0, 0, 0 , 33 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_SIGNED | OP_R, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_RR | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_RR | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 3, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RS | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 3, 0, 0, 0 , 33 }, -/* 0x20 */ - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_AND, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_AND, 0, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_AND, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_AND, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_ES, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BCDCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "daa", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_CARRY|INS_SET_PARITY|INS_TEST_CARRY, 12 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_G | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_RR | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_RR | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_CS | PREFIX_NOTTAKEN, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BCDCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "das", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_CARRY|INS_SET_PARITY|INS_TEST_CARRY, 0 }, -/* 0x30 */ - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_SS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BCDCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "aaa", "", 0, 0, 0, INS_SET_CARRY, 1 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_G | OPTYPE_b | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_RR | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_DS | PREFIX_TAKEN, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BCDCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "aas", "", 0, 0, 0, INS_SET_CARRY, 0 }, -/* 0x40 */ - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 1, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 2, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 3, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 4, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 5, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 6, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_INC, 0, ADDRMETH_RR | OPTYPE_v | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 7, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 1, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 2, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 3, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 4, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 5, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 6, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 7, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, -/* 0x50 */ - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 0, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 1, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 2, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 3, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 4, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 5, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 6, 0, 0, 0 , 33 }, - { 0, INS_PUSH, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 7, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 0, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 1, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 2, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 3, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 4, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 5, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 6, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 7, 0, 0, 0 , 33 }, -/* 0x60 */ - { 0, INS_PUSHREGS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pusha", "", 0, 0, 0, 0 , 36 }, - { 0, INS_POPREGS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "popa", "", 0, 0, 0, 0 , 34 }, - { 0, INS_BOUNDS, INS_NOTE_NONSWAP, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_M | OPTYPE_a | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bound", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_R | OP_W, ADDRMETH_G | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "arpl", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_FS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_GS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_66, INS_FLAG_PREFIX | PREFIX_OP_SIZE, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_FLAG_PREFIX | PREFIX_ADDR_SIZE, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_PUSH, 0, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 0, 0, 0, 0 , 33 }, - { 0, INS_MUL, 0, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_R | OP_W, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, cpu_80386 | isa_GP, "imul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 0, 0, 0, 0 , 33 }, - { 0, INS_MUL, 0, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_R | OP_W, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, cpu_80386 | isa_GP, "imul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 0 }, - { 0, INS_IN, 0, ADDRMETH_Y | OPTYPE_b | OP_W, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ins", "", 0, 2, 0, 0 , 0 }, - { 0, INS_IN, 0, ADDRMETH_Y | OPTYPE_v | OP_W, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ins", "", 0, 2, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_RR | OPTYPE_b | OP_R, ADDRMETH_X | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "outs", "", 2, 0, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ADDRMETH_X | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "outs", "", 2, 0, 0, 0 , 0 }, -/* 0x70 */ - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jo", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jno", "", 0, 0, 0, INS_TEST_NOFLOW, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jc", "", 0, 0, 0, INS_TEST_CARRY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jnc", "", 0, 0, 0, INS_TEST_NCARRY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jz", "", 0, 0, 0, INS_TEST_ZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jnz", "", 0, 0, 0, INS_TEST_NZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jbe", "", 0, 0, 0, INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ja", "", 0, 0, 0, INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "js", "", 0, 0, 0, INS_TEST_SIGN, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jns", "", 0, 0, 0, INS_TEST_NSIGN, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jpe", "", 0, 0, 0, INS_TEST_PARITY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jpo", "", 0, 0, 0, INS_TEST_NPARITY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jl", "", 0, 0, 0, INS_TEST_SFNEOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jge", "", 0, 0, 0, INS_TEST_SFEQOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jle", "", 0, 0, 0, INS_TEST_ZERO|INS_TEST_OR|INS_TEST_SFNEOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jg", "", 0, 0, 0, INS_TEST_NZERO|INS_TEST_SFEQOF, 0 }, -/* 0x80 */ - { idx_80, 0, 0, ADDRMETH_E | OPTYPE_b, ADDRMETH_I | OPTYPE_b, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_81, 0, 0, ADDRMETH_E | OPTYPE_v, ADDRMETH_I | OPTYPE_v, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_82, 0, 0, ADDRMETH_E | OPTYPE_b, ADDRMETH_I | OPTYPE_b, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_83, 0, 0, ADDRMETH_E | OPTYPE_v, ADDRMETH_I | OPTYPE_b, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XCHG, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_b | OP_W, ADDRMETH_G | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_v | OP_W, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_b | OP_W, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_w | OP_W, ADDRMETH_S | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_m | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lea", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_S | OPTYPE_w | OP_W, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_POP, 0, ADDRMETH_E | OPTYPE_v | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 0, 0, 0, 0 , 33 }, -/* 0x90 */ - { 0, INS_NOP, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "nop", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 1, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 2, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 3, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 4, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 5, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 6, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xchg", "", 0, 7, 0, 0 , 0 }, - { 0, INS_SZCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "cwde", "", 0, 0, 0, 0 , 5 }, - { 0, INS_SZCONV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "cdq", "", 0, 0, 0, 0 , 11 }, - { 0, INS_CALL, 0, ADDRMETH_A | OPTYPE_p | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "callf", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "wait", "", 0, 0, 0, 0 , 0 }, - { 0, INS_PUSHFLAGS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pushf", "", 0, 0, 0, 0 , 37 }, - { 0, INS_POPFLAGS, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "popf", "", 0, 0, 0, 0 , 35 }, - { 0, INS_MOV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sahf", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 43 }, - { 0, INS_MOV, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lahf", "", 0, 0, 0, 0 , 24 }, -/* 0xa0 */ - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_O | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_O | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_O | OPTYPE_b | OP_W, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_O | OPTYPE_v | OP_W, ADDRMETH_RR | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRMOV, 0, ADDRMETH_Y | OPTYPE_b | OP_W, ADDRMETH_X | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movs", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRMOV, 0, ADDRMETH_Y | OPTYPE_v | OP_W, ADDRMETH_X | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movs", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRCMP, 0, ADDRMETH_Y | OPTYPE_b | OP_R, ADDRMETH_X | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRCMP, 0, ADDRMETH_X | OPTYPE_v | OP_R, ADDRMETH_Y | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_TEST, 0, ADDRMETH_RR | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_TEST, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_STRSTOR, 0, ADDRMETH_Y | OPTYPE_b | OP_W, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "stos", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRSTOR, 0, ADDRMETH_Y | OPTYPE_v | OP_W, ADDRMETH_RR | OPTYPE_v |OP_R, ARG_NONE, cpu_80386 | isa_GP, "stos", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRLOAD, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_X| OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lods", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRLOAD, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_X| OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lods", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRCMP, 0, ADDRMETH_RR | OPTYPE_b | OP_R, ADDRMETH_Y | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "scas", "", 0, 0, 0, 0 , 0 }, - { 0, INS_STRCMP, 0, ADDRMETH_RR | OPTYPE_v | OP_R, ADDRMETH_Y | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "scas", "", 0, 0, 0, 0 , 0 }, -/* 0xb0 */ - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 1, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 2, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 3, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 4, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 5, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 6, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 7, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 1, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 2, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 3, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 4, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 5, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 6, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 7, 0, 0, 0 , 0 }, -/* 0xc0 */ - { idx_C0, 0, 0, ADDRMETH_E | OPTYPE_b, ADDRMETH_I | OPTYPE_b, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_C1, 0, 0, ADDRMETH_E | OPTYPE_v, ADDRMETH_I | OPTYPE_b, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_RET, 0, ADDRMETH_I | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ret", "", 0, 0, 0, 0 , 3 }, - { 0, INS_RET, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ret", "", 0, 0, 0, 0 , 3 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_p | OP_R, ARG_NONE, cpu_80386 | isa_GP, "les", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_p | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lds", "", 0, 0, 0, 0 , 0 }, - { idx_C6, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_C7, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ENTER, INS_NOTE_NONSWAP, ADDRMETH_I | OPTYPE_w | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "enter", "", 0, 0, 0, 0 , 15 }, - { 0, INS_LEAVE, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "leave", "", 0, 0, 0, 0 , 26 }, - { 0, INS_RET, 0, ADDRMETH_I | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "retf", "lret", 0, 0, 0, 0 , 3 }, - { 0, INS_RET, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "retf", "lret", 0, 0, 0, 0 , 3 }, - { 0, INS_DEBUG, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "int3", "", 0, 0, 0, 0 , 0 }, - { 0, INS_TRAP, 0, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "int", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OFLOW, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "into", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_TRET, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "iret", "", 0, 0, 0, INS_SET_ALL|INS_SET_DIR, 0 }, -/* 0xd0 */ - { idx_D0, 0, 0, ADDRMETH_E | OPTYPE_b, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 1, 0, 0 , 0 }, - { idx_D1, 0, 0, ADDRMETH_E | OPTYPE_v, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 1, 0, 0 , 0 }, - { idx_D2, 0, 0, ADDRMETH_E | OPTYPE_b, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 1, 0, 0 , 0 }, - { idx_D3, 0, 0, ADDRMETH_E | OPTYPE_v, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 1, 0, 0 , 0 }, - { 0, INS_BCDCONV, 0, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "aam", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_BCDCONV, 0, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "aad", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 2 }, - { 0, INS_SALC, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "salc", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XLAT, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "xlat", "", 0, 0, 0, 0 , 53 }, - { idx_D8, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_D9, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DA, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DB, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DC, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DD, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DE, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_DF, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, -/* 0xe0 */ - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "loopnz", "", 0, 0, 0, INS_TEST_NZERO, 31 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "loopz", "", 0, 0, 0, INS_TEST_ZERO, 31 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "loop", "", 0, 0, 0, 0 , 31 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_b | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jcxz", "", 0, 0, 0, 0 , 31 }, - { 0, INS_IN, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "in", "", 0, 0, 0, 0 , 0 }, - { 0, INS_IN, 0, ADDRMETH_RR | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "in", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_I | OPTYPE_b | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "out", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_I | OPTYPE_b | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "out", "", 0, 0, 0, 0 , 0 }, - { 0, INS_CALL, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "call", "", 0, 0, 0, 0 , 3 }, - { 0, INS_BRANCH, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jmp", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BRANCH, 0, ADDRMETH_A | OPTYPE_p | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jmp", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BRANCH, 0, ADDRMETH_J | OPTYPE_b | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jmp", "", 0, 0, 0, 0 , 0 }, - { 0, INS_IN, 0, ADDRMETH_RR | OPTYPE_b| OP_W, ADDRMETH_RR | OPTYPE_w| OP_R, ARG_NONE, cpu_80386 | isa_GP, "in", "", 0, 2, 0, 0 , 0 }, - { 0, INS_IN, 0, ADDRMETH_RR | OPTYPE_v | OP_W, ADDRMETH_RR | OPTYPE_w| OP_R, ARG_NONE, cpu_80386 | isa_GP, "in", "", 0, 2, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_RR | OPTYPE_w| OP_R, ADDRMETH_RR | OPTYPE_b| OP_R, ARG_NONE, cpu_80386 | isa_GP, "out", "", 2, 0, 0, 0 , 0 }, - { 0, INS_OUT, 0, ADDRMETH_RR | OPTYPE_w| OP_R, ADDRMETH_RR | OPTYPE_v| OP_R, ARG_NONE, cpu_80386 | isa_GP, "out", "", 2, 0, 0, 0 , 0 }, -/* 0xf0 */ - { 0, INS_FLAG_PREFIX | PREFIX_LOCK, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ICEBP, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "icebp", "", 0, 0, 0, 0 , 0 }, - { idx_F2, INS_FLAG_PREFIX | PREFIX_REPNZ, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_F3, INS_FLAG_PREFIX | PREFIX_REPZ, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_HALT, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "hlt", "", 0, 0, 0, 0 , 0 }, - { 0, INS_TOGCF, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "cmc", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { idx_F6, 0, 0, ADDRMETH_E | OPTYPE_b, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_F7, 0, 0, ADDRMETH_E | OPTYPE_v, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_CLEARCF, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "clc", "", 0, 0, 0, INS_SET_NCARRY, 0 }, - { 0, INS_SETCF, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "stc", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "cli", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sti", "", 0, 0, 0, 0 , 0 }, - { 0, INS_CLEARDF, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "cld", "", 0, 0, 0, INS_SET_NDIR, 0 }, - { 0, INS_SETDF, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "std", "", 0, 0, 0, INS_SET_DIR, 0 }, - { idx_FE, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_FF, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_66[] = { /* SIMD 66 one-byte Opcodes */ - { idx_660F, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_F2[] = { /* SIMD F2 one-byte Opcodes */ - { idx_F20F, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_F3[] = { /* SIMD F3 one-byte Opcodes */ - { idx_F30F, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pause", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_0F[] = { /* Two-byte Opcodes */ - { idx_0F00, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { idx_0F01, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lar", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "lsl", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "clts", "", 0, 0, 0, 0 , 6 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "invd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "wbinvd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_UNKNOWN, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTPRO | isa_GP, "ud2", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "prefetch", "", 0, 0, 0, 0, 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "femms", "", 0, 0, 0, 0, 0 }, - { idx_0F0F, INS_FLAG_SUFFIX, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movups", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_W | OPTYPE_ps | OP_W, ADDRMETH_V | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movups", "", 0, 0, 0, 0 , 0 }, - { idx_0F12, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movlps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "unpcklps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "unpckhps", "", 0, 0, 0, 0 , 0 }, - { idx_0F16, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_q | OP_W, ADDRMETH_V | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movhps", "", 0, 0, 0, 0 , 0 }, - { idx_0F18, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_R | OPTYPE_d | OP_W, ADDRMETH_C | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_R | OPTYPE_d | OP_W, ADDRMETH_D | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_C | OPTYPE_d | OP_W, ADDRMETH_R | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_D | OPTYPE_d | OP_W, ADDRMETH_R | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_R | OPTYPE_d | OP_W, ADDRMETH_T | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_T | OPTYPE_d | OP_W, ADDRMETH_R | OPTYPE_d | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movaps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_W | OPTYPE_ps | OP_W, ADDRMETH_V | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movaps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "cvtpi2ps", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_W | OPTYPE_ps | OP_W, ADDRMETH_V | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movntps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "cvttps2pi", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_q | OP_W , ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "cvtps2pi", "", 0, 0, 0, 0, 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ss | OP_W, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "ucomiss", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ss | OP_W, ARG_NONE, cpu_PENTIUM2 | isa_GP, "comiss", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "wrmsr", "", 0, 0, 0, 0 , 52 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "rdtsc", "", 0, 0, 0, 0 , 40 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "rdmsr", "", 0, 0, 0, 0 , 38 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTPRO | isa_GP, "rdpmc", "", 0, 0, 0, 0 , 39 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "sysenter", "", 0, 0, 0, 0 , 50 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "sysexit", "", 0, 0, 0, 0 , 51 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovo", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovno", "", 0, 0, 0, INS_TEST_NOFLOW, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovc", "", 0, 0, 0, INS_TEST_CARRY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovnc", "", 0, 0, 0, INS_TEST_NCARRY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovz", "", 0, 0, 0, INS_TEST_ZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovnz", "", 0, 0, 0, INS_TEST_NZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovbe", "", 0, 0, 0, INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmova", "", 0, 0, 0, INS_TEST_NZERO|INS_TEST_NCARRY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovs", "", 0, 0, 0, INS_TEST_SIGN, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovns", "", 0, 0, 0, INS_TEST_NSIGN, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovp", "", 0, 0, 0, INS_TEST_PARITY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovnp", "", 0, 0, 0, INS_TEST_NPARITY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovl", "", 0, 0, 0, INS_TEST_SFNEOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovge", "", 0, 0, 0, INS_TEST_SFEQOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovle", "", 0, 0, 0, INS_TEST_ZERO|INS_TEST_OR|INS_TEST_SFNEOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "cmovg", "", 0, 0, 0, INS_TEST_NZERO|INS_TEST_SFEQOF, 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_d | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movmskps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "sqrtps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "rsqrtps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "rcpps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_AND, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "andps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_AND, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "andnps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OR, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "orps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XOR, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "xorps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "addps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MUL, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "mulps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_pd, ADDRMETH_W | OPTYPE_q, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtps2pd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtdq2ps", "", 0, 0, 0, 0, 0 }, - { 0, INS_SUB, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "subps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "minps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_DIV, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "divps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "maxps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpcklbw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpcklwd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpckldq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "packsswb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpgtb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpgtw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpgtd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "packuswb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpckhbw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpckhwd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "punpckhdq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "packssdw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_d | OP_W, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "movd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "movq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM2 | isa_GP, "pshufw", "", 0, 0, 0, 0, 0 }, - { idx_0F71, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "", "", 0, 0, 0, 0 , 0 }, - { idx_0F72, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "", "", 0, 0, 0, 0 , 0 }, - { idx_0F73, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpeqb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_CMP, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpeqw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_CMP, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pcmpeqd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "emms", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_d | OP_W, ADDRMETH_P | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "movd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_Q | OPTYPE_q | OP_W, ADDRMETH_P | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "movq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jo", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jno", "", 0, 0, 0, INS_TEST_NOFLOW, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jc", "", 0, 0, 0, INS_TEST_CARRY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jnc", "", 0, 0, 0, INS_TEST_NCARRY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jz", "", 0, 0, 0, INS_TEST_ZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jnz", "", 0, 0, 0, INS_TEST_NZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jbe", "", 0, 0, 0, INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ja", "", 0, 0, 0, INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "js", "", 0, 0, 0, INS_TEST_SIGN, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jns", "", 0, 0, 0, INS_TEST_NSIGN, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jpe", "", 0, 0, 0, INS_TEST_PARITY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jpo", "", 0, 0, 0, INS_TEST_NPARITY, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jl", "", 0, 0, 0, INS_TEST_SFNEOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jge", "", 0, 0, 0, INS_TEST_SFEQOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jle", "", 0, 0, 0, INS_TEST_ZERO|INS_TEST_OR|INS_TEST_SFNEOF, 0 }, - { 0, INS_BRANCHCC, 0, ADDRMETH_J | OPTYPE_v | OP_X | OP_SIGNED, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jg", "", 0, 0, 0, INS_TEST_NZERO|INS_TEST_SFEQOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "seto", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setno", "", 0, 0, 0, INS_TEST_OFLOW, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setc", "", 0, 0, 0, INS_TEST_CARRY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setnc", "", 0, 0, 0, INS_TEST_NCARRY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setz", "", 0, 0, 0, INS_TEST_ZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setnz", "", 0, 0, 0, INS_TEST_NZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setbe", "", 0, 0, 0, INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "seta", "", 0, 0, 0, INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sets", "", 0, 0, 0, INS_TEST_SIGN, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setns", "", 0, 0, 0, INS_TEST_NSIGN, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setpe", "", 0, 0, 0, INS_TEST_PARITY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setpo", "", 0, 0, 0, INS_TEST_NPARITY, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setl", "", 0, 0, 0, INS_TEST_SFNEOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setge", "", 0, 0, 0, INS_TEST_SFEQOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setle", "", 0, 0, 0, INS_TEST_ZERO|INS_TEST_OR|INS_TEST_SFNEOF, 0 }, - { 0, INS_MOVCC, 0, ADDRMETH_E | OPTYPE_b | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "setg", "", 0, 0, 0, INS_TEST_NZERO|INS_TEST_SFEQOF, 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 4, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RS | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 4, 0, 0, 0 , 33 }, - { 0, INS_CPUID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "cpuid", "", 0, 0, 0, 0 , 10 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bt", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_80386 | isa_GP, "shld", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - //{ 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_I | OP_R | OPTYPE_b | ADDRMETH_RR, cpu_80386 | isa_GP, "shld", "", 0, 0, 1, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_RR | OP_R | OPTYPE_b, cpu_80386 | isa_GP, "shld", "", 0, 0, 1, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_PUSH, 0, ADDRMETH_RS | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 5, 0, 0, 0 , 33 }, - { 0, INS_POP, 0, ADDRMETH_RS | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "pop", "", 5, 0, 0, 0 , 33 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "rsm", "", 0, 0, 0, INS_SET_ALL|INS_SET_DIR, 42 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bts", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_80386 | isa_GP, "shrd", "", 0, 0, 0, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ADDRMETH_RR | OP_R | OPTYPE_b , cpu_80386 | isa_GP, "shrd", "", 0, 0, 1, INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { idx_0FAE, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MUL, 0, ADDRMETH_G | OPTYPE_v | OP_SIGNED | OP_R | OP_W, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "imul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, }, - { 0, INS_XCHGCC, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_W, ARG_NONE, cpu_80486 | isa_GP, "cmpxchg", "", 0, 0, 0, INS_SET_ALL, 8 }, - { 0, INS_XCHGCC, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_W, ARG_NONE, cpu_80486 | isa_GP, "cmpxchg", "", 0, 0, 0, INS_SET_ALL, 7 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_p | OP_W, ARG_NONE, cpu_80386 | isa_GP, "lss", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "btr", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_p | OP_W, ARG_NONE, cpu_80386 | isa_GP, "lfs", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_M | OPTYPE_p | OP_W, ARG_NONE, cpu_80386 | isa_GP, "lgs", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movzx", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movzx", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_UNKNOWN, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ud1", "", 0, 0, 0, 0 , 0 }, - { idx_0FBA, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_G | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "btc", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_G | OPTYPE_v | OP_R | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bsf", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_G | OPTYPE_v | OP_R | OP_W, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bsr", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movsx", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_G | OPTYPE_v | OP_W, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, cpu_80386 | isa_GP, "movsx", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_G | OPTYPE_b | OP_W, ARG_NONE, cpu_80486 | isa_GP, "xadd", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_G | OPTYPE_v | OP_W, ARG_NONE, cpu_80486 | isa_GP, "xadd", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "cmpps", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_M | OPTYPE_d | OP_W, ADDRMETH_G | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movnti", "", 0, 0, 0, 0, 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_E | OPTYPE_d | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM2 | isa_GP, "pinsrw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_G | OPTYPE_d | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM2 | isa_GP, "pextrw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_ps | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM2 | isa_GP, "shufps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHGCC, 0, ADDRMETH_M | OPTYPE_q | OP_R | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "cmpxchg8b", "", 0, 0, 0, 0, 9 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 1, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 2, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 3, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 4, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 5, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 6, 0, 0, 0 , 0 }, - { 0, INS_XCHG, 0, ADDRMETH_RR | OPTYPE_d | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "bswap", "", 7, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddq", "", 0, 0, 0, 0, 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pmullw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_G | OPTYPE_d | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pmovmskb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubusb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubusw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pminub", "", 0, 0, 0, 0 , 0 }, - { 0, INS_AND, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pand", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddusb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddusw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pmaxub", "", 0, 0, 0, 0 , 0 }, - { 0, INS_AND, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pandn", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pavgb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psraw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrad", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pavgw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MUL, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pmulhuw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MUL, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pmulhw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_W | OPTYPE_q | OP_W, ADDRMETH_V | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movntq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubsb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubsw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pminsw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OR, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "por", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddsb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddsw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "pmaxsw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XOR, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pxor", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pslld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MUL, 0, ADDRMETH_P | OPTYPE_q | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmuludq", "", 0, 0, 0, 0, 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pmaddwd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "psadbw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_P | OPTYPE_pi | OP_W, ADDRMETH_Q | OPTYPE_pi | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "maskmovq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psubd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_q | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubq", "", 0, 0, 0, 0, 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddb", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "paddd", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_660F[] = { /* SIMD 66 Two-byte Opcodes */ - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movupd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_W | OPTYPE_pd | OP_R, ADDRMETH_V | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movupd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_R, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movlpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_M | OPTYPE_q | OP_R, ADDRMETH_V | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movlpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "unpcklpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "unpckhpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_R, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movhpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_M | OPTYPE_q | OP_R, ADDRMETH_V | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movhpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movapd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MOV, 0, ADDRMETH_W | OPTYPE_pd | OP_R, ADDRMETH_V | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movapd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtpi2pd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_M | OPTYPE_pd | OP_R, ADDRMETH_V | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movntpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_P | OPTYPE_q | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvttpd2pi", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_P | OPTYPE_q | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtpd2pi", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "ucomisd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "comisd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movmskpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_FSQRT, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "sqrtpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_AND, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "andpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_AND, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "andnpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_OR, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "orpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_XOR, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "xorpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_ADD, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "addpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_MUL, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "mulpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtpd2ps", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtps2dq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "subpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "minpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "divpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "maxpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpcklbw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpcklwd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpckldq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "packsswb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpgtb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpgtw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpgtd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "packuswb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpckhbw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpckhwd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpckhdq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "packssdw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpcklqdq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "punpckhqdq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_d | OP_R, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movdqa", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "pshufd", "", 0, 0, 0, 0, 0 }, - { idx_660F71, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { idx_660F72, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { idx_660F73, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpeqb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpeqw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pcmpeqd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "haddpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "hsubpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_E | OPTYPE_d | OP_R, ADDRMETH_V | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_W | OPTYPE_dq | OP_R, ADDRMETH_V | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movdqa", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "cmppd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_w | OP_R, ADDRMETH_E | OPTYPE_d | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "pinsrw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_w | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "pextrw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "shufpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "addsubpd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psrlw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psrld", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psrlq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmullw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_W | OPTYPE_q | OP_R, ADDRMETH_V | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmovmskb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubusb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubusw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pminub", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pand", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddusb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddusw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmaxub", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pandn", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pavgb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psraw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psrad", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pavgw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmulhuw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmulhw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvttpd2dq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_M | OPTYPE_dq | OP_R, ADDRMETH_V | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movntdq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubsb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubsw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pminsw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "por", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddsb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddsw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmaxsw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pxor", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psllw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pslld", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psllq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmuludq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "pmaddwd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psadbw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "maskmovdqu", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "psubq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddb", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddw", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "paddd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_F20F[] = { /* SIMD F2 Two-byte Opcodes */ - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_W | OPTYPE_sd | OP_R, ADDRMETH_V | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_q | OP_R, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movddup", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtsi2sd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvttsd2si", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtsd2si", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "sqrtsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "addsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "mulsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtsd2ss", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "subsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "minsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "divsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "maxsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "pshuflw", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "haddps", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "hsubps", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_sd | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "cmpsd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "addsubps", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_P | OPTYPE_q | OP_R, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movdq2q", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_pd | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtpd2dq", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_M | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "lddqu", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_F30F[] = { /* SIMD F3 Two-byte Opcodes */ - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_W | OPTYPE_ss | OP_R, ADDRMETH_V | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movsldup", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ps | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movshdup", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtsi2ss", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvttss2si", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_G | OPTYPE_d | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtss2si", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "sqrtss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "rsqrtss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "rcpss", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "addss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "mulss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_sd | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtss2sd", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_ps | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvttps2dq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "subss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "minss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "divss", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "maxss", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movdqu", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_W | OPTYPE_dq | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "pshufhw", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_q | OP_R, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movq", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_W | OPTYPE_dq | OP_R, ADDRMETH_V | OPTYPE_dq | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movdqu", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_ss | OP_R, ADDRMETH_W | OPTYPE_ss | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, cpu_PENTIUM4 | isa_GP, "cmpss", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_dq | OP_R, ADDRMETH_Q | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "movq2dq", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_UNKNOWN, 0, ADDRMETH_V | OPTYPE_pd | OP_R, ADDRMETH_W | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM4 | isa_GP, "cvtdq2pd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_0F00[] = { /* Group 6 */ - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sldt", "", 0, 0, 0, 0 , 46 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "str", "", 0, 0, 0, 0 , 49 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lldt", "", 0, 0, 0, 0 , 29 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "ltr", "", 0, 0, 0, 0 , 32 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "verr", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "verw", "", 0, 0, 0, INS_SET_ZERO, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0F01[] = { /* Group 7 */ - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sgdt", "", 0, 0, 0, 0 , 44 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sidt", "", 0, 0, 0, 0 , 45 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lgdt", "", 0, 0, 0, 0 , 27 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lidt", "", 0, 0, 0, 0 , 28 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "smsw", "", 0, 0, 0, 0 , 47 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lmsw", "", 0, 0, 0, 0 , 30 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_none | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "invlpg", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sgdt", "", 0, 0, 0, 0 , 44 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sidt", "", 0, 0, 0, 0 , 45 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lgdt", "", 0, 0, 0, 0 , 27 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lidt", "", 0, 0, 0, 0 , 28 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "smsw", "", 0, 0, 0, 0 , 47 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lmsw", "", 0, 0, 0, 0 , 30 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_none | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "invlpg", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sgdt", "", 0, 0, 0, 0 , 44 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "sidt", "", 0, 0, 0, 0 , 45 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lgdt", "", 0, 0, 0, 0 , 27 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_s | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lidt", "", 0, 0, 0, 0 , 28 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "smsw", "", 0, 0, 0, 0 , 47 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lmsw", "", 0, 0, 0, 0 , 30 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_none | OP_R, ARG_NONE, ARG_NONE, cpu_80486 | isa_GP, "invlpg", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { idx_0F0111, 0, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "smsw", "", 0, 0, 0, 0 , 47 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_w | OP_W, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "lmsw", "", 0, 0, 0, 0 , 30 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0F0111[] = { /* Monitor/MWait opcode */ - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "monitor", "", 0, 0, 0, 0, 54 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "mwait", "", 0, 0, 0, 0, 55 } -}; - - -static ia32_insn_t tbl_0F12[] = { /* Movlps Opcode */ - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movlps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movlps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, INS_NOTE_NOSUFFIX, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movlps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_R | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R , ARG_NONE, cpu_PENTIUM4 | isa_GP, "movhlps", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_0F16[] = { /* Movhps Opcode */ - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movhps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movhps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_V | OPTYPE_q | OP_W, ADDRMETH_M | OPTYPE_q | OP_R, ARG_NONE, cpu_PENTIUM2 | isa_GP, "movhps", "", 0, 0, 0, 0 , 0 }, - { 0, INS_MOV, 0, ADDRMETH_V | OPTYPE_ps | OP_R | OP_W, ADDRMETH_W | OPTYPE_ps | OP_R , ARG_NONE, cpu_PENTIUM4 | isa_GP, "movlhps", "", 0, 0, 0, 0, 0 } -}; - - -static ia32_insn_t tbl_0F18[] = { /* Group 16 */ - { 0, INS_SYSTEM, 0, OP_W | OPTYPE_b | ADDRMETH_M, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetchnta", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht0", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht1", "", 1, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht2", "", 2, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, OP_W | OPTYPE_b | ADDRMETH_M, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetchnta", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht0", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht1", "", 1, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht2", "", 2, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, OP_W | OPTYPE_b | ADDRMETH_M, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetchnta", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht0", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht1", "", 1, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_RT | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2 | isa_GP, "prefetcht2", "", 2, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0F71[] = { /* Group 12 */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psraw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_660F71[] = { /* Group 12 SSE */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psraw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllw", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0F72[] = { /* Group 13 */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrad", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pslld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_660F72[] = { /* Group 13 SSE */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrad", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pslld", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0F73[] = { /* Group 14 */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_P | OPTYPE_q | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_660F73[] = { /* Group 14 SSE */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrlq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psrldq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "psllq", "", 0, 0, 0, 0 , 0 }, - { 0, INS_OTHER, 0, ADDRMETH_W | OPTYPE_dq | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_PENTIUM | isa_MMX, "pslldq", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0FAE[] = { /* Group 15 */ - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxsave", "", 0, 0, 0, 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxrstor", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "ldmxcsr", "", 0, 0, 0, 0 , 25 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "stmxcsr", "", 0, 0, 0 , 0, 48 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "clflush", "", 0, 0, 0, 0, 0 }, - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxsave", "", 0, 0, 0, 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxrstor", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "ldmxcsr", "", 0, 0, 0, 0 , 25 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "stmxcsr", "", 0, 0, 0 , 0, 48 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "clflush", "", 0, 0, 0, 0, 0 }, - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxsave", "", 0, 0, 0, 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_E | OPTYPE_fx | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_MMX, "fxrstor", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "ldmxcsr", "", 0, 0, 0, 0 , 25 }, - { 0, INS_SYSTEM, 0, ADDRMETH_E | OPTYPE_d | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM2, "stmxcsr", "", 0, 0, 0 , 0, 48 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ADDRMETH_M | OPTYPE_b | OP_R, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "clflush", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "lfence", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "mfence", "", 0, 0, 0, 0 , 0 }, - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "sfence", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_0FBA[] = { /* Group 8 */ - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bt", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "bts", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "btr", "", 0, 0, 0, INS_SET_CARRY, 0 }, - { 0, INS_BITTEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "btc", "", 0, 0, 0 , INS_SET_CARRY, 0 } -}; - - -static ia32_insn_t tbl_0FC7[] = { /* Group 9 */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHGCC, 0, ADDRMETH_M | OPTYPE_q | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "cmpxch8b", "", 0, 0, 0 , 0 , 9 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHGCC, 0, ADDRMETH_M | OPTYPE_q | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "cmpxch8b", "", 0, 0, 0 , 0 , 9 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "", "", 0, 0, 0, 0 , 0 }, - { 0, INS_XCHGCC, 0, ADDRMETH_M | OPTYPE_q | OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM | isa_GP, "cmpxch8b", "", 0, 0, 0 , 0 , 9 } -}; - - -static ia32_insn_t tbl_0FB9[] = { /* Group 10 */ - { 0, INS_SYSTEM, 0, ARG_NONE, ARG_NONE, ARG_NONE, 0, "fxsave", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_C6[] = { /* Group 11a */ - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_b | OP_W, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_C7[] = { /* Group 11b */ - { 0, INS_MOV, 0, ADDRMETH_E | OPTYPE_v | OP_W, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mov", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_80[] = { /* Group 1a */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_81[] = { /* Group 1b */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_82[] = { /* Group 1c */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_83[] = { /* Group 1d */ - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "add", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_OR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "or", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_ADD, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "adc", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sbb", "", 0, 0, 0, INS_SET_ALL|INS_TEST_CARRY, 0 }, - { 0, INS_AND, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "and", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SUB, 0, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sub", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_XOR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "xor", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_CMP, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "cmp", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_C0[] = { /* Group 2a */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_C1[] = { /* Group 2b */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 0, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_I | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 0, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_D0[] = { /* Group 2c */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_II | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 1, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_D1[] = { /* Group 2d */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_II | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 1, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_D2[] = { /* Group 2e */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 1, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_D3[] = { /* Group 2f */ - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rol", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "ror", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW, 0 }, - { 0, INS_ROL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcl", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_ROR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "rcr", "", 0, 1, 0, INS_SET_CARRY|INS_SET_OFLOW|INS_TEST_CARRY, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shl", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "shr", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHL, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sal", "", 0, 1, 0, INS_SET_ALL, 0 }, - { 0, INS_SHR, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ADDRMETH_RR | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "sar", "", 0, 1, 0 , INS_SET_ALL, 0 } -}; - - -static ia32_insn_t tbl_F6[] = { /* Group 3a */ - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_b | OP_R, ADDRMETH_I | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_NOT, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "not", "", 0, 0, 0, 0 , 0 }, - { 0, INS_NEG, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "neg", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_MUL, 0, OPTYPE_b | ADDRMETH_RR | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 22 }, - { 0, INS_MUL, 0, OPTYPE_b | ADDRMETH_RR | OP_W | OP_SIGNED | OP_R, ADDRMETH_E | OPTYPE_b | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "imul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 22 }, - { 0, INS_DIV, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "div", "", 0, 0, 0, 0 , 13 }, - { 0, INS_DIV, 0, ADDRMETH_RR | OPTYPE_b | OP_W | OP_R, ADDRMETH_E | OPTYPE_b | OP_R, ARG_NONE, cpu_80386 | isa_GP, "idiv", "", 0, 0, 0 , 0 , 13 } -}; - - -static ia32_insn_t tbl_F7[] = { /* Group 3b */ - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_TEST, 0, ADDRMETH_E | OPTYPE_v | OP_R, ADDRMETH_I | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "test", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_NOT, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "not", "", 0, 0, 0, 0 , 0 }, - { 0, INS_NEG, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "neg", "", 0, 0, 0, INS_SET_ALL, 0 }, - { 0, INS_MUL, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "mul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 23 }, - { 0, INS_MUL, 0, ADDRMETH_RR | OPTYPE_v | OP_SIGNED | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_SIGNED | OP_R, ARG_NONE, cpu_80386 | isa_GP, "imul", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_CARRY, 23 }, - { 0, INS_DIV, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "div", "", 0, 0, 0, 0 , 14 }, - { 0, INS_DIV, 0, ADDRMETH_RR | OPTYPE_v | OP_W | OP_R, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, cpu_80386 | isa_GP, "idiv", "", 0, 0, 0, 0 , 14 } -}; - - -static ia32_insn_t tbl_FE[] = { /* Group 4 */ - { 0, INS_INC, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_E | OPTYPE_b | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 0, 0, 0 , INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 } -}; - - -static ia32_insn_t tbl_FF[] = { /* Group 5 */ - { 0, INS_INC, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "inc", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_DEC, 0, ADDRMETH_E | OPTYPE_v | OP_W | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "dec", "", 0, 0, 0, INS_SET_OFLOW|INS_SET_SIGN|INS_SET_ZERO|INS_SET_PARITY, 0 }, - { 0, INS_CALL, 0, ADDRMETH_E | OPTYPE_v | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "call", "", 0, 0, 0, 0 , 3 }, - { 0, INS_CALL, 0, ADDRMETH_M | OPTYPE_p | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "call", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BRANCH, 0, ADDRMETH_E | OPTYPE_v | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jmp", "", 0, 0, 0, 0 , 0 }, - { 0, INS_BRANCH, 0, ADDRMETH_M | OPTYPE_p | OP_X, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "jmp", "", 0, 0, 0, 0 , 0 }, - { 0, INS_PUSH, 0, ADDRMETH_E | OPTYPE_v | OP_R, ARG_NONE, ARG_NONE, cpu_80386 | isa_GP, "push", "", 0, 0, 0, 0 , 33 } -}; - - -static ia32_insn_t tbl_D8[] = { /* FPU D8 */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_D8C0[] = { /* FPU D8 C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 1, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 2, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 3, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 4, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 5, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 6, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 7, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 1, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 2, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 3, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 4, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 5, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 6, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 7, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 7, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_D9[] = { /* FPU D9 */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fs|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fv|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldenv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldcw", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fv|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnstenv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnstcw", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_D9C0[] = { /* FPU D9 C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fxch", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnop", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fchs", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fabs", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ftst", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fxam", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fld1", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldl2t", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldl2e", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldpi", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldlg2", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldln2", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fldz", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "f2xm1", "", 0, 0, 0 , 0 , 16 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fyl2x", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fptan", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fpatan", "", 0, 0, 0 , 0 , 18 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fxtract", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fprem1", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fdecstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fincstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fprem", "", 0, 0, 0 , 0 , 19 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fyl2xp1", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsqrt", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsincos", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "frndint", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fscale", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsin", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcos", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DA[] = { /* FPU DA */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fiadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fimul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ficom", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ficomp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fisub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fisubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fidiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fidivr", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DAC0[] = { /* FPU DA C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 0, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 1, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 2, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 3, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 4, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 5, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 6, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovb", "", 0, 7, 0 , INS_TEST_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 0, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 1, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 2, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 3, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 4, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 5, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 6, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmove", "", 0, 7, 0 , INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 0, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 1, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 2, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 3, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 4, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 5, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 6, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovbe", "", 0, 7, 0 , INS_TEST_CARRY|INS_TEST_OR|INS_TEST_ZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 0, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 1, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 2, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 3, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 4, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 5, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 6, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcmovu", "", 0, 7, 0 , INS_TEST_PARITY, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fucompp", "", 0, 0, 0 , 0 , 21 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DB[] = { /* FPU DB */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fild", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "fisttp", "", 0, 0, 0, 0, 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fist", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_d|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fistp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fe|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fe|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DBC0[] = { /* FPU DB C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 0, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 1, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 2, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 3, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 4, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 5, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 6, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnb", "", 0, 7, 0 , INS_TEST_NCARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 0, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 1, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 2, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 3, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 4, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 5, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 6, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovne", "", 0, 7, 0 , INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 0, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 1, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 2, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 3, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 4, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 5, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 6, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnbe", "", 0, 7, 0 , INS_TEST_NCARRY|INS_TEST_NZERO, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 0, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 1, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 2, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 3, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 4, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 5, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 6, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcmovnu", "", 0, 7, 0 , INS_TEST_NPARITY, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnclex", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fninit", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomi", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0, }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 1, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 2, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 3, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 4, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 5, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 6, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_PENTPRO | isa_GP, "fcomi", "", 0, 7, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DC[] = { /* FPU DC */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcom", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 17 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcomp", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_DCC0[] = { /* FPU DC C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fadd", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmul", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubr", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsub", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivr", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdiv", "", 7, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DD[] = { /* FPU DD */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fld", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_q|OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "fisttp", "", 0, 0, 0, 0, 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fd|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_ft|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "frstor", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_ft|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnsave", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnstsw", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DDC0[] = { /* FPU DD C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ffree", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fst", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fstp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucom", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DE[] = { /* FPU DE */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fiadd", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fimul", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ficom", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "ficomp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fisub", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fisubr", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fidiv", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fidivr", "", 0, 0, 0, 0 , 0 } -}; - - -static ia32_insn_t tbl_DEC0[] = { /* FPU DE C0 */ - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 0, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 1, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 2, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 3, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 4, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 5, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 6, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "faddp", "", 7, 0, 0 , 0 , 20 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fmulp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fcompp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubrp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fsubp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivrp", "", 7, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 1, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 2, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 3, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 4, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 5, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 6, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fdivp", "", 7, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DF[] = { /* FPU DF */ - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fild", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_PENTIUM4 | isa_GP, "fisttp", "", 0, 0, 0, 0, 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fist", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_w|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fistp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fb|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fbld", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_q|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fild", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_fb|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fbstp", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_M|OPTYPE_q|OP_W, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fistp", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_DFC0[] = { /* FPU DF C0 */ - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RR | OPTYPE_w | OP_R, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "fnstsw", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 1, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 2, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 3, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 4, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 5, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 6, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fucomip", "", 0, 7, 0 , 0 , 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 0, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 1, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 2, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 3, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 4, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 5, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 6, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_FPU, 0, ADDRMETH_RF | OPTYPE_fp | OP_W, ADDRMETH_RF | OPTYPE_fp | OP_R, ARG_NONE, cpu_80387 | isa_FPU, "fcomip", "", 0, 7, 0 , INS_SET_ZERO|INS_SET_PARITY|INS_SET_CARRY, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_80387 | isa_FPU, "", "", 0, 0, 0 , 0 , 0 } -}; - - -static ia32_insn_t tbl_0F0F[] = { /* 3D Now! 0F Suffix */ - /* 00 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_CONV, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pi2fd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 10 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_CONV, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pf2id", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 20 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 30 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 40 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 50 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 60 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 70 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - /* 80 */ { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_CMP, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfcmpge", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_MIN, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfmin", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfrcp", "", 0, 0, 0, 0, 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfrsqrt", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfsub", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfadd", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_CMP, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfcmpgt", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_MAX, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfmax", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfrcpit1", "", 0, 0, 0, 0, 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfrsqit1", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_SUB, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfsubr", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_ADD, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfacc", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_CMP, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfcmpeq", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_MUL, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfmul", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_ARITH, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pfrcpit2", "", 0, 0, 0, 0, 0 }, - { 0, INS_MUL, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pmulhrw", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_INVALID, 0, ARG_NONE, ARG_NONE, ARG_NONE, cpu_K6 | isa_3DNOW, "", "", 0, 0, 0, 0, 0 }, - { 0, INS_AVG, 0, ADDRMETH_P | OPTYPE_pi | OP_R | OP_W, ADDRMETH_Q | OPTYPE_q |OP_R, ARG_NONE, cpu_K6 | isa_3DNOW, "pavgusb", "", 0, 0, 0, 0, 0 } -}; - - - -/* ================== Table of Opcode Tables ================== */ -ia32_table_desc_t ia32_tables[] = { - /* table, prefix table, type, shift, mask, min, max */ - { tbl_Main, tbl_opcode, 0x00, 0xFF, 0x00, 0xFF }, - { tbl_66, tbl_prefix, 0x00, 0xFF, 0x0F, 0x0F }, - { tbl_F2, tbl_prefix, 0x00, 0xFF, 0x0F, 0x0F }, - { tbl_F3, tbl_prefix, 0x00, 0xFF, 0x0F, 0x90 }, - { tbl_0F, tbl_opcode, 0x00, 0xFF, 0x00, 0xFF }, - /* 5 */ - { tbl_660F, tbl_prefix, 0x00, 0xFF, 0x10, 0xFF }, - { tbl_F20F, tbl_prefix, 0x00, 0xFF, 0x10, 0xFF }, - { tbl_F30F, tbl_prefix, 0x00, 0xFF, 0x10, 0xFF }, - { tbl_0F00, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_0F01, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - /* 10 */ - { tbl_0F0111, tbl_ext_ext, 0x00, 0x01, 0x00, 0x01 }, - { tbl_0F12, tbl_extension, 0x06, 0x03, 0x00, 0x03 }, - { tbl_0F16, tbl_extension, 0x06, 0x03, 0x00, 0x03 }, - { tbl_0F18, tbl_extension, 0x03, 0x1F, 0x00, 0x13 }, - { tbl_0F71, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - /* 15 */ - { tbl_660F71, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - { tbl_0F72, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - { tbl_660F72, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - { tbl_0F73, tbl_extension, 0x00, 0x00, 0x00, 0x00 }, - { tbl_660F73, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - /* 20 */ - { tbl_0FAE, tbl_extension, 0x03, 0x1F, 0x00, 0x1F }, - { tbl_0FBA, tbl_extension, 0x03, 0x07, 0x04, 0x07 }, - { tbl_0FC7, tbl_extension, 0x03, 0x1F, 0x00, 0x11 }, - { tbl_0FB9, tbl_extension, 0x03, 0x07, 0x00, 0x00 }, - { tbl_C6, tbl_extension, 0x03, 0x07, 0x00, 0x00 }, - /* 25 */ - { tbl_C7, tbl_extension, 0x03, 0x07, 0x00, 0x00 }, - { tbl_80, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_81, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_82, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_83, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - /* 30 */ - { tbl_C0, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_C1, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_D0, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_D1, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_D2, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - /* 35 */ - { tbl_D3, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_F6, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_F7, tbl_extension, 0x03, 0x07, 0x00, 0x07 }, - { tbl_FE, tbl_extension, 0x03, 0x07, 0x00, 0x01 }, - { tbl_FF, tbl_extension, 0x03, 0x07, 0x00, 0x06 }, - /* 40 */ - { tbl_D8, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_D8C0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_D9, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_D9C0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_DA, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - /* 45 */ - { tbl_DAC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_DB, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_DBC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_DC, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_DCC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - /* 50 */ - { tbl_DD, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_DDC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_DE, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - { tbl_DEC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_DF, tbl_fpu, 0x03, 0x07, 0x00, 0xBF }, - /* 55 */ - { tbl_DFC0, tbl_fpu_ext, 0x00, 0xFF, 0xC0, 0xFF }, - { tbl_0F0F, tbl_suffix, 0x00, 0xFF, 0x00, 0xBF } -}; -/* ia32_opcode_tables.h */ -/* Table index constants: -#define idx_Main 0 -#define idx_66 1 -#define idx_F2 2 -#define idx_F3 3 -#define idx_0F 4 -#define idx_660F 5 -#define idx_F20F 6 -#define idx_F30F 7 -#define idx_0F00 8 -#define idx_0F01 9 -#define idx_0F0111 10 -#define idx_0F12 11 -#define idx_0F16 12 -#define idx_0F18 13 -#define idx_0F71 14 -#define idx_660F71 15 -#define idx_0F72 16 -#define idx_660F72 17 -#define idx_0F73 18 -#define idx_660F73 19 -#define idx_0FAE 20 -#define idx_0FBA 21 -#define idx_0FC7 22 -#define idx_0FB9 23 -#define idx_C6 24 -#define idx_C7 25 -#define idx_80 26 -#define idx_81 27 -#define idx_82 28 -#define idx_83 29 -#define idx_C0 30 -#define idx_C1 31 -#define idx_D0 32 -#define idx_D1 33 -#define idx_D2 34 -#define idx_D3 35 -#define idx_F6 36 -#define idx_F7 37 -#define idx_FE 38 -#define idx_FF 39 -#define idx_D8 40 -#define idx_D8C0 41 -#define idx_D9 42 -#define idx_D9C0 43 -#define idx_DA 44 -#define idx_DAC0 45 -#define idx_DB 46 -#define idx_DBC0 47 -#define idx_DC 48 -#define idx_DCC0 49 -#define idx_DD 50 -#define idx_DDC0 51 -#define idx_DE 52 -#define idx_DEC0 53 -#define idx_DF 54 -#define idx_DFC0 55 -#define idx_0F0F 56 -*/ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.h deleted file mode 100644 index bbd4fae9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_opcode_tables.h +++ /dev/null @@ -1,57 +0,0 @@ -#define idx_Main 0 -#define idx_66 1 -#define idx_F2 2 -#define idx_F3 3 -#define idx_0F 4 -#define idx_660F 5 -#define idx_F20F 6 -#define idx_F30F 7 -#define idx_0F00 8 -#define idx_0F01 9 -#define idx_0F0111 10 -#define idx_0F12 11 -#define idx_0F16 12 -#define idx_0F18 13 -#define idx_0F71 14 -#define idx_660F71 15 -#define idx_0F72 16 -#define idx_660F72 17 -#define idx_0F73 18 -#define idx_660F73 19 -#define idx_0FAE 20 -#define idx_0FBA 21 -#define idx_0FC7 22 -#define idx_0FB9 23 -#define idx_C6 24 -#define idx_C7 25 -#define idx_80 26 -#define idx_81 27 -#define idx_82 28 -#define idx_83 29 -#define idx_C0 30 -#define idx_C1 31 -#define idx_D0 32 -#define idx_D1 33 -#define idx_D2 34 -#define idx_D3 35 -#define idx_F6 36 -#define idx_F7 37 -#define idx_FE 38 -#define idx_FF 39 -#define idx_D8 40 -#define idx_D8C0 41 -#define idx_D9 42 -#define idx_D9C0 43 -#define idx_DA 44 -#define idx_DAC0 45 -#define idx_DB 46 -#define idx_DBC0 47 -#define idx_DC 48 -#define idx_DCC0 49 -#define idx_DD 50 -#define idx_DDC0 51 -#define idx_DE 52 -#define idx_DEC0 53 -#define idx_DF 54 -#define idx_DFC0 55 -#define idx_0F0F 56 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.c deleted file mode 100644 index 8e7f16a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.c +++ /dev/null @@ -1,425 +0,0 @@ -#include -#include -#include - -#include "libdis.h" -#include "ia32_insn.h" -#include "ia32_operand.h" -#include "ia32_modrm.h" -#include "ia32_reg.h" -#include "x86_imm.h" -#include "x86_operand_list.h" - - - -/* apply segment override to memory operand in insn */ -static void apply_seg( x86_op_t *op, unsigned int prefixes ) { - if (! prefixes ) return; - - /* apply overrides from prefix */ - switch ( prefixes & PREFIX_REG_MASK ) { - case PREFIX_CS: - op->flags |= op_cs_seg; break; - case PREFIX_SS: - op->flags |= op_ss_seg; break; - case PREFIX_DS: - op->flags |= op_ds_seg; break; - case PREFIX_ES: - op->flags |= op_es_seg; break; - case PREFIX_FS: - op->flags |= op_fs_seg; break; - case PREFIX_GS: - op->flags |= op_gs_seg; break; - } - - return; -} - -static size_t decode_operand_value( unsigned char *buf, size_t buf_len, - x86_op_t *op, x86_insn_t *insn, - unsigned int addr_meth, size_t op_size, - unsigned int op_value, unsigned char modrm, - size_t gen_regs ) { - size_t size = 0; - - /* ++ Do Operand Addressing Method / Decode operand ++ */ - switch (addr_meth) { - /* This sets the operand Size based on the Intel Opcode Map - * (Vol 2, Appendix A). Letter encodings are from section - * A.1.1, 'Codes for Addressing Method' */ - - /* ---------------------- Addressing Method -------------- */ - /* Note that decoding mod ModR/M operand adjusts the size of - * the instruction, but decoding the reg operand does not. - * This should not cause any problems, as every 'reg' operand - * has an associated 'mod' operand. - * Goddamn-Intel-Note: - * Some Intel addressing methods [M, R] specify that modR/M - * byte may only refer to a memory address/may only refer to - * a register -- however Intel provides no clues on what to do - * if, say, the modR/M for an M opcode decodes to a register - * rather than a memory address ... returning 0 is out of the - * question, as this would be an Immediate or a RelOffset, so - * instead these modR/Ms are decoded with total disregard to - * the M, R constraints. */ - - /* MODRM -- mod operand. sets size to at least 1! */ - case ADDRMETH_E: /* ModR/M present, Gen reg or memory */ - size = ia32_modrm_decode( buf, buf_len, op, insn, - gen_regs ); - break; - case ADDRMETH_M: /* ModR/M only refers to memory */ - size = ia32_modrm_decode( buf, buf_len, op, insn, - gen_regs ); - break; - case ADDRMETH_Q: /* ModR/M present, MMX or Memory */ - size = ia32_modrm_decode( buf, buf_len, op, insn, - REG_MMX_OFFSET ); - break; - case ADDRMETH_R: /* ModR/M mod == gen reg */ - size = ia32_modrm_decode( buf, buf_len, op, insn, - gen_regs ); - break; - case ADDRMETH_W: /* ModR/M present, mem or SIMD reg */ - size = ia32_modrm_decode( buf, buf_len, op, insn, - REG_SIMD_OFFSET ); - break; - - /* MODRM -- reg operand. does not effect size! */ - case ADDRMETH_C: /* ModR/M reg == control reg */ - ia32_reg_decode( modrm, op, REG_CTRL_OFFSET ); - break; - case ADDRMETH_D: /* ModR/M reg == debug reg */ - ia32_reg_decode( modrm, op, REG_DEBUG_OFFSET ); - break; - case ADDRMETH_G: /* ModR/M reg == gen-purpose reg */ - ia32_reg_decode( modrm, op, gen_regs ); - break; - case ADDRMETH_P: /* ModR/M reg == qword MMX reg */ - ia32_reg_decode( modrm, op, REG_MMX_OFFSET ); - break; - case ADDRMETH_S: /* ModR/M reg == segment reg */ - ia32_reg_decode( modrm, op, REG_SEG_OFFSET ); - break; - case ADDRMETH_T: /* ModR/M reg == test reg */ - ia32_reg_decode( modrm, op, REG_TEST_OFFSET ); - break; - case ADDRMETH_V: /* ModR/M reg == SIMD reg */ - ia32_reg_decode( modrm, op, REG_SIMD_OFFSET ); - break; - - /* No MODRM : note these set operand type explicitly */ - case ADDRMETH_A: /* No modR/M -- direct addr */ - op->type = op_absolute; - - /* segment:offset address used in far calls */ - x86_imm_sized( buf, buf_len, - &op->data.absolute.segment, 2 ); - if ( insn->addr_size == 4 ) { - x86_imm_sized( buf, buf_len, - &op->data.absolute.offset.off32, 4 ); - size = 6; - } else { - x86_imm_sized( buf, buf_len, - &op->data.absolute.offset.off16, 2 ); - size = 4; - } - - break; - case ADDRMETH_I: /* Immediate val */ - op->type = op_immediate; - /* if it ever becomes legal to have imm as dest and - * there is a src ModR/M operand, we are screwed! */ - if ( op->flags & op_signed ) { - x86_imm_signsized(buf, buf_len, &op->data.byte, - op_size); - } else { - x86_imm_sized(buf, buf_len, &op->data.byte, - op_size); - } - size = op_size; - break; - case ADDRMETH_J: /* Rel offset to add to IP [jmp] */ - /* this fills op->data.near_offset or - op->data.far_offset depending on the size of - the operand */ - op->flags |= op_signed; - if ( op_size == 1 ) { - /* one-byte near offset */ - op->type = op_relative_near; - x86_imm_signsized(buf, buf_len, - &op->data.relative_near, 1); - } else { - /* far offset...is this truly signed? */ - op->type = op_relative_far; - x86_imm_signsized(buf, buf_len, - &op->data.relative_far, op_size ); - } - size = op_size; - break; - case ADDRMETH_O: /* No ModR/M; op is word/dword offset */ - /* NOTE: these are actually RVAs not offsets to seg!! */ - /* note bene: 'O' ADDR_METH uses addr_size to - determine operand size */ - op->type = op_offset; - op->flags |= op_pointer; - x86_imm_sized( buf, buf_len, &op->data.offset, - insn->addr_size ); - - size = insn->addr_size; - break; - - /* Hard-coded: these are specified in the insn definition */ - case ADDRMETH_F: /* EFLAGS register */ - op->type = op_register; - op->flags |= op_hardcode; - ia32_handle_register( &op->data.reg, REG_FLAGS_INDEX ); - break; - case ADDRMETH_X: /* Memory addressed by DS:SI [string] */ - op->type = op_expression; - op->flags |= op_hardcode; - op->flags |= op_ds_seg | op_pointer | op_string; - ia32_handle_register( &op->data.expression.base, - REG_DWORD_OFFSET + 6 ); - break; - case ADDRMETH_Y: /* Memory addressed by ES:DI [string] */ - op->type = op_expression; - op->flags |= op_hardcode; - op->flags |= op_es_seg | op_pointer | op_string; - ia32_handle_register( &op->data.expression.base, - REG_DWORD_OFFSET + 7 ); - break; - case ADDRMETH_RR: /* Gen Register hard-coded in opcode */ - op->type = op_register; - op->flags |= op_hardcode; - ia32_handle_register( &op->data.reg, - op_value + gen_regs ); - break; - case ADDRMETH_RS: /* Seg Register hard-coded in opcode */ - op->type = op_register; - op->flags |= op_hardcode; - ia32_handle_register( &op->data.reg, - op_value + REG_SEG_OFFSET ); - break; - case ADDRMETH_RF: /* FPU Register hard-coded in opcode */ - op->type = op_register; - op->flags |= op_hardcode; - ia32_handle_register( &op->data.reg, - op_value + REG_FPU_OFFSET ); - break; - case ADDRMETH_RT: /* TST Register hard-coded in opcode */ - op->type = op_register; - op->flags |= op_hardcode; - ia32_handle_register( &op->data.reg, - op_value + REG_TEST_OFFSET ); - break; - case ADDRMETH_II: /* Immediate hard-coded in opcode */ - op->type = op_immediate; - op->data.dword = op_value; - op->flags |= op_hardcode; - break; - - case 0: /* Operand is not used */ - default: - /* ignore -- operand not used in this insn */ - op->type = op_unused; /* this shouldn't happen! */ - break; - } - - return size; -} - -static size_t decode_operand_size( unsigned int op_type, x86_insn_t *insn, - x86_op_t *op ){ - size_t size; - - /* ++ Do Operand Type ++ */ - switch (op_type) { - /* This sets the operand Size based on the Intel Opcode Map - * (Vol 2, Appendix A). Letter encodings are from section - * A.1.2, 'Codes for Operand Type' */ - /* NOTE: in this routines, 'size' refers to the size - * of the operand in the raw (encoded) instruction; - * 'datatype' stores the actual size and datatype - * of the operand */ - - /* ------------------------ Operand Type ----------------- */ - case OPTYPE_c: /* byte or word [op size attr] */ - size = (insn->op_size == 4) ? 2 : 1; - op->datatype = (size == 4) ? op_word : op_byte; - break; - case OPTYPE_a: /* 2 word or 2 dword [op size attr] */ - /* pointer to a 16:16 or 32:32 BOUNDS operand */ - size = (insn->op_size == 4) ? 8 : 4; - op->datatype = (size == 4) ? op_bounds32 : op_bounds16; - break; - case OPTYPE_v: /* word or dword [op size attr] */ - size = (insn->op_size == 4) ? 4 : 2; - op->datatype = (size == 4) ? op_dword : op_word; - break; - case OPTYPE_p: /* 32/48-bit ptr [op size attr] */ - /* technically these flags are not accurate: the - * value s a 16:16 pointer or a 16:32 pointer, where - * the first '16' is a segment */ - size = (insn->addr_size == 4) ? 6 : 4; - op->datatype = (size == 4) ? op_descr32 : op_descr16; - break; - case OPTYPE_b: /* byte, ignore op-size */ - size = 1; - op->datatype = op_byte; - break; - case OPTYPE_w: /* word, ignore op-size */ - size = 2; - op->datatype = op_word; - break; - case OPTYPE_d: /* dword , ignore op-size */ - size = 4; - op->datatype = op_dword; - break; - case OPTYPE_s: /* 6-byte psuedo-descriptor */ - /* ptr to 6-byte value which is 32:16 in 32-bit - * mode, or 8:24:16 in 16-bit mode. The high byte - * is ignored in 16-bit mode. */ - size = 6; - op->datatype = (insn->addr_size == 4) ? - op_pdescr32 : op_pdescr16; - break; - case OPTYPE_q: /* qword, ignore op-size */ - size = 8; - op->datatype = op_qword; - break; - case OPTYPE_dq: /* d-qword, ignore op-size */ - size = 16; - op->datatype = op_dqword; - break; - case OPTYPE_ps: /* 128-bit FP data */ - size = 16; - /* really this is 4 packed SP FP values */ - op->datatype = op_ssimd; - break; - case OPTYPE_pd: /* 128-bit FP data */ - size = 16; - /* really this is 2 packed DP FP values */ - op->datatype = op_dsimd; - break; - case OPTYPE_ss: /* Scalar elem of 128-bit FP data */ - size = 16; - /* this only looks at the low dword (4 bytes) - * of the xmmm register passed as a param. - * This is a 16-byte register where only 4 bytes - * are used in the insn. Painful, ain't it? */ - op->datatype = op_sssimd; - break; - case OPTYPE_sd: /* Scalar elem of 128-bit FP data */ - size = 16; - /* this only looks at the low qword (8 bytes) - * of the xmmm register passed as a param. - * This is a 16-byte register where only 8 bytes - * are used in the insn. Painful, again... */ - op->datatype = op_sdsimd; - break; - case OPTYPE_pi: /* qword mmx register */ - size = 8; - op->datatype = op_qword; - break; - case OPTYPE_si: /* dword integer register */ - size = 4; - op->datatype = op_dword; - break; - case OPTYPE_fs: /* single-real */ - size = 4; - op->datatype = op_sreal; - break; - case OPTYPE_fd: /* double real */ - size = 8; - op->datatype = op_dreal; - break; - case OPTYPE_fe: /* extended real */ - size = 10; - op->datatype = op_extreal; - break; - case OPTYPE_fb: /* packed BCD */ - size = 10; - op->datatype = op_bcd; - break; - case OPTYPE_fv: /* pointer to FPU env: 14 or 28-bytes */ - size = (insn->addr_size == 4)? 28 : 14; - op->datatype = (size == 28)? op_fpuenv32: op_fpuenv16; - break; - case OPTYPE_ft: /* pointer to FPU env: 94 or 108 bytes */ - size = (insn->addr_size == 4)? 108 : 94; - op->datatype = (size == 108)? - op_fpustate32: op_fpustate16; - break; - case OPTYPE_fx: /* 512-byte register stack */ - size = 512; - op->datatype = op_fpregset; - break; - case OPTYPE_fp: /* floating point register */ - size = 10; /* double extended precision */ - op->datatype = op_fpreg; - break; - case OPTYPE_m: /* fake operand type used for "lea Gv, M" */ - size = insn->addr_size; - op->datatype = (size == 4) ? op_dword : op_word; - break; - case OPTYPE_none: /* handle weird instructions that have no encoding but use a dword datatype, like invlpg */ - size = 0; - op->datatype = op_none; - break; - case 0: - default: - size = insn->op_size; - op->datatype = (size == 4) ? op_dword : op_word; - break; - } - return size; -} - -size_t ia32_decode_operand( unsigned char *buf, size_t buf_len, - x86_insn_t *insn, unsigned int raw_op, - unsigned int raw_flags, unsigned int prefixes, - unsigned char modrm ) { - unsigned int addr_meth, op_type, op_size, gen_regs; - x86_op_t *op; - size_t size; - - /* ++ Yank optype and addr mode out of operand flags */ - addr_meth = raw_flags & ADDRMETH_MASK; - op_type = raw_flags & OPTYPE_MASK; - - if ( raw_flags == ARG_NONE ) { - /* operand is not used in this instruction */ - return 0; - } - - /* allocate a new operand */ - op = x86_operand_new( insn ); - - /* ++ Copy flags from opcode table to x86_insn_t */ - op->access = (enum x86_op_access) OP_PERM(raw_flags); - op->flags = (enum x86_op_flags) (OP_FLAGS(raw_flags) >> 12); - - /* Get size (for decoding) and datatype of operand */ - op_size = decode_operand_size(op_type, insn, op); - - /* override default register set based on Operand Type */ - /* this allows mixing of 8, 16, and 32 bit regs in insn */ - if (op_size == 1) { - gen_regs = REG_BYTE_OFFSET; - } else if (op_size == 2) { - gen_regs = REG_WORD_OFFSET; - } else { - gen_regs = REG_DWORD_OFFSET; - } - - size = decode_operand_value( buf, buf_len, op, insn, addr_meth, - op_size, raw_op, modrm, gen_regs ); - - /* if operand is an address, apply any segment override prefixes */ - if ( op->type == op_expression || op->type == op_offset ) { - apply_seg(op, prefixes); - } - - return size; /* return number of bytes in instruction */ -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.h deleted file mode 100644 index 08c3074c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_operand.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef IA32_OPERAND_H -#define IA32_OPERAND_H - -#include "libdis.h" -#include "ia32_insn.h" - -size_t ia32_decode_operand( unsigned char *buf, size_t buf_len, - x86_insn_t *insn, unsigned int raw_op, - unsigned int raw_flags, unsigned int prefixes, - unsigned char modrm ); -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.c deleted file mode 100644 index f270c1f3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.c +++ /dev/null @@ -1,234 +0,0 @@ -#include -#include - -#include "ia32_reg.h" -#include "ia32_insn.h" - -#define NUM_X86_REGS 92 - -/* register sizes */ -#define REG_DWORD_SIZE 4 -#define REG_WORD_SIZE 2 -#define REG_BYTE_SIZE 1 -#define REG_MMX_SIZE 8 -#define REG_SIMD_SIZE 16 -#define REG_DEBUG_SIZE 4 -#define REG_CTRL_SIZE 4 -#define REG_TEST_SIZE 4 -#define REG_SEG_SIZE 2 -#define REG_FPU_SIZE 10 -#define REG_FLAGS_SIZE 4 -#define REG_FPCTRL_SIZE 2 -#define REG_FPSTATUS_SIZE 2 -#define REG_FPTAG_SIZE 2 -#define REG_EIP_SIZE 4 -#define REG_IP_SIZE 2 - -/* REGISTER ALIAS TABLE: - * - * NOTE: the MMX register mapping is fixed to the physical registers - * used by the FPU. The floating FP stack does not effect the location - * of the MMX registers, so this aliasing is not 100% accurate. - * */ -static struct { - unsigned char alias; /* id of register this is an alias for */ - unsigned char shift; /* # of bits register must be shifted */ -} ia32_reg_aliases[] = { - { 0,0 }, - { REG_DWORD_OFFSET, 0 }, /* al : 1 */ - { REG_DWORD_OFFSET, 8 }, /* ah : 2 */ - { REG_DWORD_OFFSET, 0 }, /* ax : 3 */ - { REG_DWORD_OFFSET + 1, 0 }, /* cl : 4 */ - { REG_DWORD_OFFSET + 1, 8 }, /* ch : 5 */ - { REG_DWORD_OFFSET + 1, 0 }, /* cx : 6 */ - { REG_DWORD_OFFSET + 2, 0 }, /* dl : 7 */ - { REG_DWORD_OFFSET + 2, 8 }, /* dh : 8 */ - { REG_DWORD_OFFSET + 2, 0 }, /* dx : 9 */ - { REG_DWORD_OFFSET + 3, 0 }, /* bl : 10 */ - { REG_DWORD_OFFSET + 3, 8 }, /* bh : 11 */ - { REG_DWORD_OFFSET + 3, 0 }, /* bx : 12 */ - { REG_DWORD_OFFSET + 4, 0 }, /* sp : 13 */ - { REG_DWORD_OFFSET + 5, 0 }, /* bp : 14 */ - { REG_DWORD_OFFSET + 6, 0 }, /* si : 15 */ - { REG_DWORD_OFFSET + 7, 0 }, /* di : 16 */ - { REG_EIP_INDEX, 0 }, /* ip : 17 */ - { REG_FPU_OFFSET, 0 }, /* mm0 : 18 */ - { REG_FPU_OFFSET + 1, 0 }, /* mm1 : 19 */ - { REG_FPU_OFFSET + 2, 0 }, /* mm2 : 20 */ - { REG_FPU_OFFSET + 3, 0 }, /* mm3 : 21 */ - { REG_FPU_OFFSET + 4, 0 }, /* mm4 : 22 */ - { REG_FPU_OFFSET + 5, 0 }, /* mm5 : 23 */ - { REG_FPU_OFFSET + 6, 0 }, /* mm6 : 24 */ - { REG_FPU_OFFSET + 7, 0 } /* mm7 : 25 */ - }; - -/* REGISTER TABLE: size, type, and name of every register in the - * CPU. Does not include MSRs since the are, after all, - * model specific. */ -static struct { - unsigned int size; - enum x86_reg_type type; - unsigned int alias; - char mnemonic[8]; -} ia32_reg_table[NUM_X86_REGS + 2] = { - { 0, 0, 0, "" }, - /* REG_DWORD_OFFSET */ - { REG_DWORD_SIZE, reg_gen | reg_ret, 0, "eax" }, - { REG_DWORD_SIZE, reg_gen | reg_count, 0, "ecx" }, - { REG_DWORD_SIZE, reg_gen, 0, "edx" }, - { REG_DWORD_SIZE, reg_gen, 0, "ebx" }, - /* REG_ESP_INDEX */ - { REG_DWORD_SIZE, reg_gen | reg_sp, 0, "esp" }, - { REG_DWORD_SIZE, reg_gen | reg_fp, 0, "ebp" }, - { REG_DWORD_SIZE, reg_gen | reg_src, 0, "esi" }, - { REG_DWORD_SIZE, reg_gen | reg_dest, 0, "edi" }, - /* REG_WORD_OFFSET */ - { REG_WORD_SIZE, reg_gen | reg_ret, 3, "ax" }, - { REG_WORD_SIZE, reg_gen | reg_count, 6, "cx" }, - { REG_WORD_SIZE, reg_gen, 9, "dx" }, - { REG_WORD_SIZE, reg_gen, 12, "bx" }, - { REG_WORD_SIZE, reg_gen | reg_sp, 13, "sp" }, - { REG_WORD_SIZE, reg_gen | reg_fp, 14, "bp" }, - { REG_WORD_SIZE, reg_gen | reg_src, 15, "si" }, - { REG_WORD_SIZE, reg_gen | reg_dest, 16, "di" }, - /* REG_BYTE_OFFSET */ - { REG_BYTE_SIZE, reg_gen, 1, "al" }, - { REG_BYTE_SIZE, reg_gen, 4, "cl" }, - { REG_BYTE_SIZE, reg_gen, 7, "dl" }, - { REG_BYTE_SIZE, reg_gen, 10, "bl" }, - { REG_BYTE_SIZE, reg_gen, 2, "ah" }, - { REG_BYTE_SIZE, reg_gen, 5, "ch" }, - { REG_BYTE_SIZE, reg_gen, 8, "dh" }, - { REG_BYTE_SIZE, reg_gen, 11, "bh" }, - /* REG_MMX_OFFSET */ - { REG_MMX_SIZE, reg_simd, 18, "mm0" }, - { REG_MMX_SIZE, reg_simd, 19, "mm1" }, - { REG_MMX_SIZE, reg_simd, 20, "mm2" }, - { REG_MMX_SIZE, reg_simd, 21, "mm3" }, - { REG_MMX_SIZE, reg_simd, 22, "mm4" }, - { REG_MMX_SIZE, reg_simd, 23, "mm5" }, - { REG_MMX_SIZE, reg_simd, 24, "mm6" }, - { REG_MMX_SIZE, reg_simd, 25, "mm7" }, - /* REG_SIMD_OFFSET */ - { REG_SIMD_SIZE, reg_simd, 0, "xmm0" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm1" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm2" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm3" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm4" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm5" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm6" }, - { REG_SIMD_SIZE, reg_simd, 0, "xmm7" }, - /* REG_DEBUG_OFFSET */ - { REG_DEBUG_SIZE, reg_sys, 0, "dr0" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr1" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr2" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr3" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr4" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr5" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr6" }, - { REG_DEBUG_SIZE, reg_sys, 0, "dr7" }, - /* REG_CTRL_OFFSET */ - { REG_CTRL_SIZE, reg_sys, 0, "cr0" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr1" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr2" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr3" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr4" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr5" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr6" }, - { REG_CTRL_SIZE, reg_sys, 0, "cr7" }, - /* REG_TEST_OFFSET */ - { REG_TEST_SIZE, reg_sys, 0, "tr0" }, - { REG_TEST_SIZE, reg_sys, 0, "tr1" }, - { REG_TEST_SIZE, reg_sys, 0, "tr2" }, - { REG_TEST_SIZE, reg_sys, 0, "tr3" }, - { REG_TEST_SIZE, reg_sys, 0, "tr4" }, - { REG_TEST_SIZE, reg_sys, 0, "tr5" }, - { REG_TEST_SIZE, reg_sys, 0, "tr6" }, - { REG_TEST_SIZE, reg_sys, 0, "tr7" }, - /* REG_SEG_OFFSET */ - { REG_SEG_SIZE, reg_seg, 0, "es" }, - { REG_SEG_SIZE, reg_seg, 0, "cs" }, - { REG_SEG_SIZE, reg_seg, 0, "ss" }, - { REG_SEG_SIZE, reg_seg, 0, "ds" }, - { REG_SEG_SIZE, reg_seg, 0, "fs" }, - { REG_SEG_SIZE, reg_seg, 0, "gs" }, - /* REG_LDTR_INDEX */ - { REG_DWORD_SIZE, reg_sys, 0, "ldtr" }, - /* REG_GDTR_INDEX */ - { REG_DWORD_SIZE, reg_sys, 0, "gdtr" }, - /* REG_FPU_OFFSET */ - { REG_FPU_SIZE, reg_fpu, 0, "st(0)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(1)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(2)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(3)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(4)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(5)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(6)" }, - { REG_FPU_SIZE, reg_fpu, 0, "st(7)" }, - /* REG_FLAGS_INDEX : 81 */ - { REG_FLAGS_SIZE, reg_cond, 0, "eflags" }, - /* REG_FPCTRL_INDEX : 82*/ - { REG_FPCTRL_SIZE, reg_fpu | reg_sys, 0, "fpctrl" }, - /* REG_FPSTATUS_INDEX : 83*/ - { REG_FPSTATUS_SIZE, reg_fpu | reg_sys, 0, "fpstat" }, - /* REG_FPTAG_INDEX : 84 */ - { REG_FPTAG_SIZE, reg_fpu | reg_sys, 0, "fptag" }, - /* REG_EIP_INDEX : 85 */ - { REG_EIP_SIZE, reg_pc, 0, "eip" }, - /* REG_IP_INDEX : 86 */ - { REG_IP_SIZE, reg_pc, 17, "ip" }, - /* REG_IDTR_INDEX : 87 */ - { REG_DWORD_SIZE, reg_sys, 0, "idtr" }, - /* REG_MXCSG_INDEX : SSE Control Reg : 88 */ - { REG_DWORD_SIZE, reg_sys | reg_simd, 0, "mxcsr" }, - /* REG_TR_INDEX : Task Register : 89 */ - { 16 + 64, reg_sys, 0, "tr" }, - /* REG_CSMSR_INDEX : SYSENTER_CS_MSR : 90 */ - { REG_DWORD_SIZE, reg_sys, 0, "cs_msr" }, - /* REG_ESPMSR_INDEX : SYSENTER_ESP_MSR : 91 */ - { REG_DWORD_SIZE, reg_sys, 0, "esp_msr" }, - /* REG_EIPMSR_INDEX : SYSENTER_EIP_MSR : 92 */ - { REG_DWORD_SIZE, reg_sys, 0, "eip_msr" }, - { 0 } - }; - - -static size_t sz_regtable = NUM_X86_REGS + 1; - - -void ia32_handle_register( x86_reg_t *reg, size_t id ) { - unsigned int alias; - if (! id || id > sz_regtable ) { - return; - } - - memset( reg, 0, sizeof(x86_reg_t) ); - - strncpy( reg->name, ia32_reg_table[id].mnemonic, MAX_REGNAME ); - - reg->type = ia32_reg_table[id].type; - reg->size = ia32_reg_table[id].size; - - alias = ia32_reg_table[id].alias; - if ( alias ) { - reg->alias = ia32_reg_aliases[alias].alias; - reg->shift = ia32_reg_aliases[alias].shift; - } - reg->id = id; - - return; -} - -size_t ia32_true_register_id( size_t id ) { - size_t reg; - - if (! id || id > sz_regtable ) { - return 0; - } - - reg = id; - if (ia32_reg_table[reg].alias) { - reg = ia32_reg_aliases[ia32_reg_table[reg].alias].alias; - } - return reg; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.h deleted file mode 100644 index fbbc77a1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_reg.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef IA32_REG_H -#define IA32_REG_H - -#include /* for size_t */ -#include "libdis.h" /* for x86_reg_t */ - -/* NOTE these are used in opcode tables for hard-coded registers */ -#define REG_DWORD_OFFSET 1 /* 0 + 1 */ -#define REG_ECX_INDEX 2 /* 0 + 1 + 1 */ -#define REG_ESP_INDEX 5 /* 0 + 4 + 1 */ -#define REG_EBP_INDEX 6 /* 0 + 5 + 1 */ -#define REG_ESI_INDEX 7 /* 0 + 6 + 1 */ -#define REG_EDI_INDEX 8 /* 0 + 7 + 1 */ -#define REG_WORD_OFFSET 9 /* 1 * 8 + 1 */ -#define REG_BYTE_OFFSET 17 /* 2 * 8 + 1 */ -#define REG_MMX_OFFSET 25 /* 3 * 8 + 1 */ -#define REG_SIMD_OFFSET 33 /* 4 * 8 + 1 */ -#define REG_DEBUG_OFFSET 41 /* 5 * 8 + 1 */ -#define REG_CTRL_OFFSET 49 /* 6 * 8 + 1 */ -#define REG_TEST_OFFSET 57 /* 7 * 8 + 1 */ -#define REG_SEG_OFFSET 65 /* 8 * 8 + 1 */ -#define REG_LDTR_INDEX 71 /* 8 * 8 + 1 + 1 */ -#define REG_GDTR_INDEX 72 /* 8 * 8 + 2 + 1 */ -#define REG_FPU_OFFSET 73 /* 9 * 8 + 1 */ -#define REG_FLAGS_INDEX 81 /* 10 * 8 + 1 */ -#define REG_FPCTRL_INDEX 82 /* 10 * 8 + 1 + 1 */ -#define REG_FPSTATUS_INDEX 83 /* 10 * 8 + 2 + 1 */ -#define REG_FPTAG_INDEX 84 /* 10 * 8 + 3 + 1 */ -#define REG_EIP_INDEX 85 /* 10 * 8 + 4 + 1 */ -#define REG_IP_INDEX 86 /* 10 * 8 + 5 + 1 */ -#define REG_IDTR_INDEX 87 /* 10 * 8 + 6 + 1 */ -#define REG_MXCSG_INDEX 88 /* 10 * 8 + 7 + 1 */ -#define REG_TR_INDEX 89 /* 10 * 8 + 8 + 1 */ -#define REG_CSMSR_INDEX 90 /* 10 * 8 + 9 + 1 */ -#define REG_ESPMSR_INDEX 91 /* 10 * 8 + 10 + 1 */ -#define REG_EIPMSR_INDEX 92 /* 10 * 8 + 11 + 1 */ - -void ia32_handle_register( x86_reg_t *reg, size_t id ); -size_t ia32_true_register_id( size_t id ); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.c deleted file mode 100644 index b578e344..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "libdis.h" -#include "ia32_settings.h" -#include "ia32_reg.h" -#include "ia32_insn.h" - -ia32_settings_t ia32_settings = { - 1, 0xF4, - MAX_INSTRUCTION_SIZE, - 4, 4, 8, 4, 8, - REG_ESP_INDEX, REG_EBP_INDEX, REG_EIP_INDEX, REG_FLAGS_INDEX, - REG_DWORD_OFFSET, REG_SEG_OFFSET, REG_FPU_OFFSET, - opt_none -}; diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.h deleted file mode 100644 index 769c0e9f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/ia32_settings.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef IA32_SETTINGS_H -#define IA32_SETTINGS_H - -#include "libdis.h" - -typedef struct { - /* options */ - unsigned char endian, /* 0 = big, 1 = little */ - wc_byte, /* wildcard byte */ - max_insn, /* max insn size */ - sz_addr, /* default address size */ - sz_oper, /* default operand size */ - sz_byte, /* # bits in byte */ - sz_word, /* # bytes in machine word */ - sz_dword; /* # bytes in machine dword */ - unsigned int id_sp_reg, /* id of stack pointer */ - id_fp_reg, /* id of frame pointer */ - id_ip_reg, /* id of instruction pointer */ - id_flag_reg, /* id of flags register */ - offset_gen_regs, /* start of general regs */ - offset_seg_regs, /* start of segment regs */ - offset_fpu_regs; /* start of floating point regs */ - /* user-controlled settings */ - enum x86_options options; -} ia32_settings_t; - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/libdis.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/libdis.h deleted file mode 100644 index 94103396..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/libdis.h +++ /dev/null @@ -1,836 +0,0 @@ -#ifndef LIBDISASM_H -#define LIBDISASM_H - -#ifdef WIN32 -#include -#endif - -#include - -/* 'NEW" types - * __________________________________________________________________________*/ -#ifndef LIBDISASM_QWORD_H /* do not interfere with qword.h */ - #define LIBDISASM_QWORD_H - #ifdef _MSC_VER - typedef __int64 qword_t; - #else - typedef int64_t qword_t; - #endif -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* 'NEW" x86 API - * __________________________________________________________________________*/ - - -/* ========================================= Error Reporting */ -/* REPORT CODES - * These are passed to a reporter function passed at initialization. - * Each code determines the type of the argument passed to the reporter; - * this allows the report to recover from errors, or just log them. - */ -enum x86_report_codes { - report_disasm_bounds, /* RVA OUT OF BOUNDS : The disassembler could - not disassemble the supplied RVA as it is - out of the range of the buffer. The - application should store the address and - attempt to determine what section of the - binary it is in, then disassemble the - address from the bytes in that section. - data: uint32_t rva */ - report_insn_bounds, /* INSTRUCTION OUT OF BOUNDS: The disassembler - could not disassemble the instruction as - the instruction would require bytes beyond - the end of the current buffer. This usually - indicated garbage bytes at the end of a - buffer, or an incorrectly-sized buffer. - data: uint32_t rva */ - report_invalid_insn, /* INVALID INSTRUCTION: The disassembler could - not disassemble the instruction as it has an - invalid combination of opcodes and operands. - This will stop automated disassembly; the - application can restart the disassembly - after the invalid instruction. - data: uint32_t rva */ - report_unknown -}; - -/* 'arg' is optional arbitrary data provided by the code passing the - * callback -- for example, it could be 'this' or 'self' in OOP code. - * 'code' is provided by libdisasm, it is one of the above - * 'data' is provided by libdisasm and is context-specific, per the enums */ -typedef void (*DISASM_REPORTER)( enum x86_report_codes code, - void *data, void *arg ); - - -/* x86_report_error : Call the register reporter to report an error */ -void x86_report_error( enum x86_report_codes code, void *data ); - -/* ========================================= Libdisasm Management Routines */ -enum x86_options { /* these can be ORed together */ - opt_none= 0, - opt_ignore_nulls=1, /* ignore sequences of > 4 NULL bytes */ - opt_16_bit=2, /* 16-bit/DOS disassembly */ - opt_att_mnemonics=4, /* use AT&T syntax names for alternate opcode mnemonics */ -}; - -/* management routines */ -/* 'arg' is caller-specific data which is passed as the first argument - * to the reporter callback routine */ -int x86_init( enum x86_options options, DISASM_REPORTER reporter, void *arg); -void x86_set_reporter( DISASM_REPORTER reporter, void *arg); -void x86_set_options( enum x86_options options ); -enum x86_options x86_get_options( void ); -int x86_cleanup(void); - - -/* ========================================= Instruction Representation */ -/* these defines are only intended for use in the array decl's */ -#define MAX_REGNAME 8 - -#define MAX_PREFIX_STR 32 -#define MAX_MNEM_STR 16 -#define MAX_INSN_SIZE 20 /* same as in i386.h */ -#define MAX_OP_STRING 32 /* max possible operand size in string form */ -#define MAX_OP_RAW_STRING 64 /* max possible operand size in raw form */ -#define MAX_OP_XML_STRING 256 /* max possible operand size in xml form */ -#define MAX_NUM_OPERANDS 8 /* max # implicit and explicit operands */ -/* in these, the '2 *' is arbitrary: the max # of operands should require - * more space than the rest of the insn */ -#define MAX_INSN_STRING 512 /* 2 * 8 * MAX_OP_STRING */ -#define MAX_INSN_RAW_STRING 1024 /* 2 * 8 * MAX_OP_RAW_STRING */ -#define MAX_INSN_XML_STRING 4096 /* 2 * 8 * MAX_OP_XML_STRING */ - -enum x86_reg_type { /* NOTE: these may be ORed together */ - reg_gen = 0x00001, /* general purpose */ - reg_in = 0x00002, /* incoming args, ala RISC */ - reg_out = 0x00004, /* args to calls, ala RISC */ - reg_local = 0x00008, /* local vars, ala RISC */ - reg_fpu = 0x00010, /* FPU data register */ - reg_seg = 0x00020, /* segment register */ - reg_simd = 0x00040, /* SIMD/MMX reg */ - reg_sys = 0x00080, /* restricted/system register */ - reg_sp = 0x00100, /* stack pointer */ - reg_fp = 0x00200, /* frame pointer */ - reg_pc = 0x00400, /* program counter */ - reg_retaddr = 0x00800, /* return addr for func */ - reg_cond = 0x01000, /* condition code / flags */ - reg_zero = 0x02000, /* zero register, ala RISC */ - reg_ret = 0x04000, /* return value */ - reg_src = 0x10000, /* array/rep source */ - reg_dest = 0x20000, /* array/rep destination */ - reg_count = 0x40000 /* array/rep/loop counter */ -}; - -/* x86_reg_t : an X86 CPU register */ -typedef struct { - char name[MAX_REGNAME]; - enum x86_reg_type type; /* what register is used for */ - unsigned int size; /* size of register in bytes */ - unsigned int id; /* register ID #, for quick compares */ - unsigned int alias; /* ID of reg this is an alias for */ - unsigned int shift; /* amount to shift aliased reg by */ -} x86_reg_t; - -/* x86_ea_t : an X86 effective address (address expression) */ -typedef struct { - unsigned int scale; /* scale factor */ - x86_reg_t index, base; /* index, base registers */ - int32_t disp; /* displacement */ - char disp_sign; /* is negative? 1/0 */ - char disp_size; /* 0, 1, 2, 4 */ -} x86_ea_t; - -/* x86_absolute_t : an X86 segment:offset address (descriptor) */ -typedef struct { - unsigned short segment; /* loaded directly into CS */ - union { - unsigned short off16; /* loaded directly into IP */ - uint32_t off32; /* loaded directly into EIP */ - } offset; -} x86_absolute_t; - -enum x86_op_type { /* mutually exclusive */ - op_unused = 0, /* empty/unused operand: should never occur */ - op_register = 1, /* CPU register */ - op_immediate = 2, /* Immediate Value */ - op_relative_near = 3, /* Relative offset from IP */ - op_relative_far = 4, /* Relative offset from IP */ - op_absolute = 5, /* Absolute address (ptr16:32) */ - op_expression = 6, /* Address expression (scale/index/base/disp) */ - op_offset = 7, /* Offset from start of segment (m32) */ - op_unknown -}; - -#define x86_optype_is_address( optype ) \ - ( optype == op_absolute || optype == op_offset ) -#define x86_optype_is_relative( optype ) \ - ( optype == op_relative_near || optype == op_relative_far ) -#define x86_optype_is_memory( optype ) \ - ( optype > op_immediate && optype < op_unknown ) - -enum x86_op_datatype { /* these use Intel's lame terminology */ - op_byte = 1, /* 1 byte integer */ - op_word = 2, /* 2 byte integer */ - op_dword = 3, /* 4 byte integer */ - op_qword = 4, /* 8 byte integer */ - op_dqword = 5, /* 16 byte integer */ - op_sreal = 6, /* 4 byte real (single real) */ - op_dreal = 7, /* 8 byte real (double real) */ - op_extreal = 8, /* 10 byte real (extended real) */ - op_bcd = 9, /* 10 byte binary-coded decimal */ - op_ssimd = 10, /* 16 byte : 4 packed single FP (SIMD, MMX) */ - op_dsimd = 11, /* 16 byte : 2 packed double FP (SIMD, MMX) */ - op_sssimd = 12, /* 4 byte : scalar single FP (SIMD, MMX) */ - op_sdsimd = 13, /* 8 byte : scalar double FP (SIMD, MMX) */ - op_descr32 = 14, /* 6 byte Intel descriptor 2:4 */ - op_descr16 = 15, /* 4 byte Intel descriptor 2:2 */ - op_pdescr32 = 16, /* 6 byte Intel pseudo-descriptor 32:16 */ - op_pdescr16 = 17, /* 6 byte Intel pseudo-descriptor 8:24:16 */ - op_bounds16 = 18, /* signed 16:16 lower:upper bounds */ - op_bounds32 = 19, /* signed 32:32 lower:upper bounds */ - op_fpuenv16 = 20, /* 14 byte FPU control/environment data */ - op_fpuenv32 = 21, /* 28 byte FPU control/environment data */ - op_fpustate16 = 22, /* 94 byte FPU state (env & reg stack) */ - op_fpustate32 = 23, /* 108 byte FPU state (env & reg stack) */ - op_fpregset = 24, /* 512 bytes: register set */ - op_fpreg = 25, /* FPU register */ - op_none = 0xFF, /* operand without a datatype (INVLPG) */ -}; - -enum x86_op_access { /* ORed together */ - op_read = 1, - op_write = 2, - op_execute = 4 -}; - -enum x86_op_flags { /* ORed together, but segs are mutually exclusive */ - op_signed = 1, /* signed integer */ - op_string = 2, /* possible string or array */ - op_constant = 4, /* symbolic constant */ - op_pointer = 8, /* operand points to a memory address */ - op_sysref = 0x010, /* operand is a syscall number */ - op_implied = 0x020, /* operand is implicit in the insn */ - op_hardcode = 0x40, /* operand is hardcoded in insn definition */ - /* NOTE: an 'implied' operand is one which can be considered a side - * effect of the insn, e.g. %esp being modified by PUSH or POP. A - * 'hard-coded' operand is one which is specified in the instruction - * definition, e.g. %es:%edi in MOVSB or 1 in ROL Eb, 1. The difference - * is that hard-coded operands are printed by disassemblers and are - * required to re-assemble, while implicit operands are invisible. */ - op_es_seg = 0x100, /* ES segment override */ - op_cs_seg = 0x200, /* CS segment override */ - op_ss_seg = 0x300, /* SS segment override */ - op_ds_seg = 0x400, /* DS segment override */ - op_fs_seg = 0x500, /* FS segment override */ - op_gs_seg = 0x600 /* GS segment override */ -}; - -/* x86_op_t : an X86 instruction operand */ -typedef struct { - enum x86_op_type type; /* operand type */ - enum x86_op_datatype datatype; /* operand size */ - enum x86_op_access access; /* operand access [RWX] */ - enum x86_op_flags flags; /* misc flags */ - union { - /* sizeof will have to work on these union members! */ - /* immediate values */ - char sbyte; - short sword; - int32_t sdword; - qword_t sqword; - unsigned char byte; - unsigned short word; - uint32_t dword; - qword_t qword; - float sreal; - double dreal; - /* misc large/non-native types */ - unsigned char extreal[10]; - unsigned char bcd[10]; - qword_t dqword[2]; - unsigned char simd[16]; - unsigned char fpuenv[28]; - /* offset from segment */ - uint32_t offset; - /* ID of CPU register */ - x86_reg_t reg; - /* offsets from current insn */ - char relative_near; - int32_t relative_far; - /* segment:offset */ - x86_absolute_t absolute; - /* effective address [expression] */ - x86_ea_t expression; - } data; - /* this is needed to make formatting operands more sane */ - void * insn; /* pointer to x86_insn_t owning operand */ -} x86_op_t; - -/* Linked list of x86_op_t; provided for manual traversal of the operand - * list in an insn. Users wishing to add operands to this list, e.g. to add - * implicit operands, should use x86_operand_new in x86_operand_list.h */ -typedef struct x86_operand_list { - x86_op_t op; - struct x86_operand_list *next; -} x86_oplist_t; - -enum x86_insn_group { - insn_none = 0, /* invalid instruction */ - insn_controlflow = 1, - insn_arithmetic = 2, - insn_logic = 3, - insn_stack = 4, - insn_comparison = 5, - insn_move = 6, - insn_string = 7, - insn_bit_manip = 8, - insn_flag_manip = 9, - insn_fpu = 10, - insn_interrupt = 13, - insn_system = 14, - insn_other = 15 -}; - -enum x86_insn_type { - insn_invalid = 0, /* invalid instruction */ - /* insn_controlflow */ - insn_jmp = 0x1001, - insn_jcc = 0x1002, - insn_call = 0x1003, - insn_callcc = 0x1004, - insn_return = 0x1005, - /* insn_arithmetic */ - insn_add = 0x2001, - insn_sub = 0x2002, - insn_mul = 0x2003, - insn_div = 0x2004, - insn_inc = 0x2005, - insn_dec = 0x2006, - insn_shl = 0x2007, - insn_shr = 0x2008, - insn_rol = 0x2009, - insn_ror = 0x200A, - /* insn_logic */ - insn_and = 0x3001, - insn_or = 0x3002, - insn_xor = 0x3003, - insn_not = 0x3004, - insn_neg = 0x3005, - /* insn_stack */ - insn_push = 0x4001, - insn_pop = 0x4002, - insn_pushregs = 0x4003, - insn_popregs = 0x4004, - insn_pushflags = 0x4005, - insn_popflags = 0x4006, - insn_enter = 0x4007, - insn_leave = 0x4008, - /* insn_comparison */ - insn_test = 0x5001, - insn_cmp = 0x5002, - /* insn_move */ - insn_mov = 0x6001, /* move */ - insn_movcc = 0x6002, /* conditional move */ - insn_xchg = 0x6003, /* exchange */ - insn_xchgcc = 0x6004, /* conditional exchange */ - /* insn_string */ - insn_strcmp = 0x7001, - insn_strload = 0x7002, - insn_strmov = 0x7003, - insn_strstore = 0x7004, - insn_translate = 0x7005, /* xlat */ - /* insn_bit_manip */ - insn_bittest = 0x8001, - insn_bitset = 0x8002, - insn_bitclear = 0x8003, - /* insn_flag_manip */ - insn_clear_carry = 0x9001, - insn_clear_zero = 0x9002, - insn_clear_oflow = 0x9003, - insn_clear_dir = 0x9004, - insn_clear_sign = 0x9005, - insn_clear_parity = 0x9006, - insn_set_carry = 0x9007, - insn_set_zero = 0x9008, - insn_set_oflow = 0x9009, - insn_set_dir = 0x900A, - insn_set_sign = 0x900B, - insn_set_parity = 0x900C, - insn_tog_carry = 0x9010, - insn_tog_zero = 0x9020, - insn_tog_oflow = 0x9030, - insn_tog_dir = 0x9040, - insn_tog_sign = 0x9050, - insn_tog_parity = 0x9060, - /* insn_fpu */ - insn_fmov = 0xA001, - insn_fmovcc = 0xA002, - insn_fneg = 0xA003, - insn_fabs = 0xA004, - insn_fadd = 0xA005, - insn_fsub = 0xA006, - insn_fmul = 0xA007, - insn_fdiv = 0xA008, - insn_fsqrt = 0xA009, - insn_fcmp = 0xA00A, - insn_fcos = 0xA00C, - insn_fldpi = 0xA00D, - insn_fldz = 0xA00E, - insn_ftan = 0xA00F, - insn_fsine = 0xA010, - insn_fsys = 0xA020, - /* insn_interrupt */ - insn_int = 0xD001, - insn_intcc = 0xD002, /* not present in x86 ISA */ - insn_iret = 0xD003, - insn_bound = 0xD004, - insn_debug = 0xD005, - insn_trace = 0xD006, - insn_invalid_op = 0xD007, - insn_oflow = 0xD008, - /* insn_system */ - insn_halt = 0xE001, - insn_in = 0xE002, /* input from port/bus */ - insn_out = 0xE003, /* output to port/bus */ - insn_cpuid = 0xE004, - /* insn_other */ - insn_nop = 0xF001, - insn_bcdconv = 0xF002, /* convert to or from BCD */ - insn_szconv = 0xF003 /* change size of operand */ -}; - -/* These flags specify special characteristics of the instruction, such as - * whether the inatruction is privileged or whether it serializes the - * pipeline. - * NOTE : These may not be accurate for all instructions; updates to the - * opcode tables have not been completed. */ -enum x86_insn_note { - insn_note_ring0 = 1, /* Only available in ring 0 */ - insn_note_smm = 2, /* "" in System Management Mode */ - insn_note_serial = 4, /* Serializing instruction */ - insn_note_nonswap = 8, /* Does not swap arguments in att-style formatting */ - insn_note_nosuffix = 16, /* Does not have size suffix in att-style formatting */ -}; - -/* This specifies what effects the instruction has on the %eflags register */ -enum x86_flag_status { - insn_carry_set = 0x1, /* CF */ - insn_zero_set = 0x2, /* ZF */ - insn_oflow_set = 0x4, /* OF */ - insn_dir_set = 0x8, /* DF */ - insn_sign_set = 0x10, /* SF */ - insn_parity_set = 0x20, /* PF */ - insn_carry_or_zero_set = 0x40, - insn_zero_set_or_sign_ne_oflow = 0x80, - insn_carry_clear = 0x100, - insn_zero_clear = 0x200, - insn_oflow_clear = 0x400, - insn_dir_clear = 0x800, - insn_sign_clear = 0x1000, - insn_parity_clear = 0x2000, - insn_sign_eq_oflow = 0x4000, - insn_sign_ne_oflow = 0x8000 -}; - -/* The CPU model in which the insturction first appeared; this can be used - * to mask out instructions appearing in earlier or later models or to - * check the portability of a binary. - * NOTE : These may not be accurate for all instructions; updates to the - * opcode tables have not been completed. */ -enum x86_insn_cpu { - cpu_8086 = 1, /* Intel */ - cpu_80286 = 2, - cpu_80386 = 3, - cpu_80387 = 4, - cpu_80486 = 5, - cpu_pentium = 6, - cpu_pentiumpro = 7, - cpu_pentium2 = 8, - cpu_pentium3 = 9, - cpu_pentium4 = 10, - cpu_k6 = 16, /* AMD */ - cpu_k7 = 32, - cpu_athlon = 48 -}; - -/* CPU ISA subsets: These are derived from the Instruction Groups in - * Intel Vol 1 Chapter 5; they represent subsets of the IA32 ISA but - * do not reflect the 'type' of the instruction in the same way that - * x86_insn_group does. In short, these are AMD/Intel's somewhat useless - * designations. - * NOTE : These may not be accurate for all instructions; updates to the - * opcode tables have not been completed. */ -enum x86_insn_isa { - isa_gp = 1, /* general purpose */ - isa_fp = 2, /* floating point */ - isa_fpumgt = 3, /* FPU/SIMD management */ - isa_mmx = 4, /* Intel MMX */ - isa_sse1 = 5, /* Intel SSE SIMD */ - isa_sse2 = 6, /* Intel SSE2 SIMD */ - isa_sse3 = 7, /* Intel SSE3 SIMD */ - isa_3dnow = 8, /* AMD 3DNow! SIMD */ - isa_sys = 9 /* system instructions */ -}; - -enum x86_insn_prefix { - insn_no_prefix = 0, - insn_rep_zero = 1, /* REPZ and REPE */ - insn_rep_notzero = 2, /* REPNZ and REPNZ */ - insn_lock = 4 /* LOCK: */ -}; - -/* TODO: maybe provide insn_new/free(), and have disasm return new insn_t */ -/* x86_insn_t : an X86 instruction */ -typedef struct { - /* information about the instruction */ - uint32_t addr; /* load address */ - uint32_t offset; /* offset into file/buffer */ - enum x86_insn_group group; /* meta-type, e.g. INS_EXEC */ - enum x86_insn_type type; /* type, e.g. INS_BRANCH */ - enum x86_insn_note note; /* note, e.g. RING0 */ - unsigned char bytes[MAX_INSN_SIZE]; - unsigned char size; /* size of insn in bytes */ - /* 16/32-bit mode settings */ - unsigned char addr_size; /* default address size : 2 or 4 */ - unsigned char op_size; /* default operand size : 2 or 4 */ - /* CPU/instruction set */ - enum x86_insn_cpu cpu; - enum x86_insn_isa isa; - /* flags */ - enum x86_flag_status flags_set; /* flags set or tested by insn */ - enum x86_flag_status flags_tested; - /* stack */ - unsigned char stack_mod; /* 0 or 1 : is the stack modified? */ - int32_t stack_mod_val; /* val stack is modified by if known */ - - /* the instruction proper */ - enum x86_insn_prefix prefix; /* prefixes ORed together */ - char prefix_string[MAX_PREFIX_STR]; /* prefixes [might be truncated] */ - char mnemonic[MAX_MNEM_STR]; - x86_oplist_t *operands; /* list of explicit/implicit operands */ - size_t operand_count; /* total number of operands */ - size_t explicit_count; /* number of explicit operands */ - /* convenience fields for user */ - void *block; /* code block containing this insn */ - void *function; /* function containing this insn */ - int tag; /* tag the insn as seen/processed */ -} x86_insn_t; - - -/* returns 0 if an instruction is invalid, 1 if valid */ -int x86_insn_is_valid( x86_insn_t *insn ); - -/* DISASSEMBLY ROUTINES - * Canonical order of arguments is - * (buf, buf_len, buf_rva, offset, len, insn, func, arg, resolve_func) - * ...but of course all of these are not used at the same time. - */ - - -/* Function prototype for caller-supplied callback routine - * These callbacks are intended to process 'insn' further, e.g. by - * adding it to a linked list, database, etc */ -typedef void (*DISASM_CALLBACK)( x86_insn_t *insn, void * arg ); - -/* Function prototype for caller-supplied address resolver. - * This routine is used to determine the rva to disassemble next, given - * the 'dest' operand of a jump/call. This allows the caller to resolve - * jump/call targets stored in a register or on the stack, and also allows - * the caller to prevent endless loops by checking if an address has - * already been disassembled. If an address cannot be resolved from the - * operand, or if the address has already been disassembled, this routine - * should return -1; in all other cases the RVA to be disassembled next - * should be returned. */ -typedef int32_t (*DISASM_RESOLVER)( x86_op_t *op, x86_insn_t * current_insn, - void *arg ); - - -/* x86_disasm: Disassemble a single instruction from a buffer of bytes. - * Returns size of instruction in bytes. - * Caller is responsible for calling x86_oplist_free() on - * a reused "insn" to avoid leaking memory when calling this - * function repeatedly. - * buf : Buffer of bytes to disassemble - * buf_len : Length of the buffer - * buf_rva : Load address of the start of the buffer - * offset : Offset in buffer to disassemble - * insn : Structure to fill with disassembled instruction - */ -unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, - uint32_t buf_rva, unsigned int offset, - x86_insn_t * insn ); - -/* x86_disasm_range: Sequential disassembly of a range of bytes in a buffer, - * invoking a callback function each time an instruction - * is successfully disassembled. The 'range' refers to the - * bytes between 'offset' and 'offset + len' in the buffer; - * 'len' is assumed to be less than the length of the buffer. - * Returns number of instructions processed. - * buf : Buffer of bytes to disassemble (e.g. .text section) - * buf_rva : Load address of buffer (e.g. ELF Virtual Address) - * offset : Offset in buffer to start disassembly at - * len : Number of bytes to disassemble - * func : Callback function to invoke (may be NULL) - * arg : Arbitrary data to pass to callback (may be NULL) - */ -unsigned int x86_disasm_range( unsigned char *buf, uint32_t buf_rva, - unsigned int offset, unsigned int len, - DISASM_CALLBACK func, void *arg ); - -/* x86_disasm_forward: Flow-of-execution disassembly of the bytes in a buffer, - * invoking a callback function each time an instruction - * is successfully disassembled. - * buf : Buffer to disassemble (e.g. .text section) - * buf_len : Number of bytes in buffer - * buf_rva : Load address of buffer (e.g. ELF Virtual Address) - * offset : Offset in buffer to start disassembly at (e.g. entry point) - * func : Callback function to invoke (may be NULL) - * arg : Arbitrary data to pass to callback (may be NULL) - * resolver: Caller-supplied address resolver. If no resolver is - * supplied, a default internal one is used -- however the - * internal resolver does NOT catch loops and could end up - * disassembling forever.. - * r_arg : Arbitrary data to pass to resolver (may be NULL) - */ -unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len, - uint32_t buf_rva, unsigned int offset, - DISASM_CALLBACK func, void *arg, - DISASM_RESOLVER resolver, void *r_arg ); - -/* Instruction operands: these are stored as a list of explicit and - * implicit operands. It is recommended that the 'foreach' routines - * be used to when examining operands for purposes of data flow analysis */ - -/* Operand FOREACH callback: 'arg' is an abritrary parameter passed to the - * foreach routine, 'insn' is the x86_insn_t whose operands are being - * iterated over, and 'op' is the current x86_op_t */ -typedef void (*x86_operand_fn)(x86_op_t *op, x86_insn_t *insn, void *arg); - -/* FOREACH types: these are used to limit the foreach results to - * operands which match a certain "type" (implicit or explicit) - * or which are accessed in certain ways (e.g. read or write). Note - * that this operates on the operand list of single instruction, so - * specifying the 'real' operand type (register, memory, etc) is not - * useful. Note also that by definition Execute Access implies Read - * Access and implies Not Write Access. - * The "type" (implicit or explicit) and the access method can - * be ORed together, e.g. op_wo | op_explicit */ -enum x86_op_foreach_type { - op_any = 0, /* ALL operands (explicit, implicit, rwx) */ - op_dest = 1, /* operands with Write access */ - op_src = 2, /* operands with Read access */ - op_ro = 3, /* operands with Read but not Write access */ - op_wo = 4, /* operands with Write but not Read access */ - op_xo = 5, /* operands with Execute access */ - op_rw = 6, /* operands with Read AND Write access */ - op_implicit = 0x10, /* operands that are implied by the opcode */ - op_explicit = 0x20 /* operands that are not side-effects */ -}; - - -/* free the operand list associated with an instruction -- useful for - * preventing memory leaks when free()ing an x86_insn_t */ -void x86_oplist_free( x86_insn_t *insn ); - -/* Operand foreach: invokes 'func' with 'insn' and 'arg' as arguments. The - * 'type' parameter is used to select only operands matching specific - * criteria. */ -int x86_operand_foreach( x86_insn_t *insn, x86_operand_fn func, void *arg, - enum x86_op_foreach_type type); - -/* convenience routine: returns count of operands matching 'type' */ -size_t x86_operand_count( x86_insn_t *insn, enum x86_op_foreach_type type ); - -/* accessor functions for the operands */ -x86_op_t * x86_operand_1st( x86_insn_t *insn ); -x86_op_t * x86_operand_2nd( x86_insn_t *insn ); -x86_op_t * x86_operand_3rd( x86_insn_t *insn ); - -/* these allow libdisasm 2.0 accessor functions to still be used */ -#define x86_get_dest_operand( insn ) x86_operand_1st( insn ) -#define x86_get_src_operand( insn ) x86_operand_2nd( insn ) -#define x86_get_imm_operand( insn ) x86_operand_3rd( insn ) - -/* get size of operand data in bytes */ -unsigned int x86_operand_size( x86_op_t *op ); - -/* Operand Convenience Routines: the following three routines are common - * operations on operands, intended to ease the burden of the programmer. */ - -/* Get Address: return the value of an offset operand, or the offset of - * a segment:offset absolute address */ -uint32_t x86_get_address( x86_insn_t *insn ); - -/* Get Relative Offset: return as a sign-extended int32_t the near or far - * relative offset operand, or 0 if there is none. There can be only one - * relaive offset operand in an instruction. */ -int32_t x86_get_rel_offset( x86_insn_t *insn ); - -/* Get Branch Target: return the x86_op_t containing the target of - * a jump or call operand, or NULL if there is no branch target. - * Internally, a 'branch target' is defined as any operand with - * Execute Access set. There can be only one branch target per instruction. */ -x86_op_t * x86_get_branch_target( x86_insn_t *insn ); - -/* Get Immediate: return the x86_op_t containing the immediate operand - * for this instruction, or NULL if there is no immediate operand. There - * can be only one immediate operand per instruction */ -x86_op_t * x86_get_imm( x86_insn_t *insn ); - -/* Get Raw Immediate Data: returns a pointer to the immediate data encoded - * in the instruction. This is useful for large data types [>32 bits] currently - * not supported by libdisasm, or for determining if the disassembler - * screwed up the conversion of the immediate data. Note that 'imm' in this - * context refers to immediate data encoded at the end of an instruction as - * detailed in the Intel Manual Vol II Chapter 2; it does not refer to the - * 'op_imm' operand (the third operand in instructions like 'mul' */ -unsigned char * x86_get_raw_imm( x86_insn_t *insn ); - - -/* More accessor fuctions, this time for user-defined info... */ -/* set the address (usually RVA) of the insn */ -void x86_set_insn_addr( x86_insn_t *insn, uint32_t addr ); - -/* set the offset (usually offset into file) of the insn */ -void x86_set_insn_offset( x86_insn_t *insn, unsigned int offset ); - -/* set a pointer to the function owning the instruction. The - * type of 'func' is user-defined; libdisasm does not use the func field. */ -void x86_set_insn_function( x86_insn_t *insn, void * func ); - -/* set a pointer to the block of code owning the instruction. The - * type of 'block' is user-defined; libdisasm does not use the block field. */ -void x86_set_insn_block( x86_insn_t *insn, void * block ); - -/* instruction tagging: these routines allow the programmer to mark - * instructions as "seen" in a DFS, for example. libdisasm does not use - * the tag field.*/ -/* set insn->tag to 1 */ -void x86_tag_insn( x86_insn_t *insn ); -/* set insn->tag to 0 */ -void x86_untag_insn( x86_insn_t *insn ); -/* return insn->tag */ -int x86_insn_is_tagged( x86_insn_t *insn ); - - -/* Disassembly formats: - * AT&T is standard AS/GAS-style: "mnemonic\tsrc, dest, imm" - * Intel is standard MASM/NASM/TASM: "mnemonic\tdest,src, imm" - * Native is tab-delimited: "RVA\tbytes\tmnemonic\tdest\tsrc\timm" - * XML is your typical ... - * Raw is addr|offset|size|bytes|prefix... see libdisasm_formats.7 - */ -enum x86_asm_format { - unknown_syntax = 0, /* never use! */ - native_syntax, /* header: 35 bytes */ - intel_syntax, /* header: 23 bytes */ - att_syntax, /* header: 23 bytes */ - xml_syntax, /* header: 679 bytes */ - raw_syntax /* header: 172 bytes */ -}; - -/* format (sprintf) an operand into 'buf' using specified syntax */ -int x86_format_operand(x86_op_t *op, char *buf, int len, - enum x86_asm_format format); - -/* format (sprintf) an instruction mnemonic into 'buf' using specified syntax */ -int x86_format_mnemonic(x86_insn_t *insn, char *buf, int len, - enum x86_asm_format format); - -/* format (sprintf) an instruction into 'buf' using specified syntax; - * this includes formatting all operands */ -int x86_format_insn(x86_insn_t *insn, char *buf, int len, enum x86_asm_format); - -/* fill 'buf' with a description of the format's syntax */ -int x86_format_header( char *buf, int len, enum x86_asm_format format); - -/* Endianness of an x86 CPU : 0 is big, 1 is little; always returns 1 */ -unsigned int x86_endian(void); - -/* Default address and operand size in bytes */ -unsigned int x86_addr_size(void); -unsigned int x86_op_size(void); - -/* Size of a machine word in bytes */ -unsigned int x86_word_size(void); - -/* maximum size of a code instruction */ -#define x86_max_inst_size(x) x86_max_insn_size(x) -unsigned int x86_max_insn_size(void); - -/* register IDs of Stack, Frame, Instruction pointer and Flags register */ -unsigned int x86_sp_reg(void); -unsigned int x86_fp_reg(void); -unsigned int x86_ip_reg(void); -unsigned int x86_flag_reg(void); - -/* fill 'reg' struct with details of register 'id' */ -void x86_reg_from_id( unsigned int id, x86_reg_t * reg ); - -/* convenience macro demonstrating how to get an aliased register; proto is - * void x86_get_aliased_reg( x86_reg_t *alias_reg, x86_reg_t *output_reg ) - * where 'alias_reg' is a reg operand and 'output_reg' is filled with the - * register that the operand is an alias for */ -#define x86_get_aliased_reg( alias_reg, output_reg ) \ - x86_reg_from_id( alias_reg->alias, output_reg ) - - -/* ================================== Invariant Instruction Representation */ -/* Invariant instructions are used for generating binary signatures; - * the instruction is modified so that all variant bytes in an instruction - * are replaced with a wildcard byte. - * - * A 'variant byte' is one that is expected to be modified by either the - * static or the dynamic linker: for example, an address encoded in an - * instruction. - * - * By comparing the invariant representation of one instruction [or of a - * sequence of instructions] with the invariant representation of another, - * one determine whether the two invariant representations are from the same - * relocatable object [.o] file. Thus one can use binary signatures [which - * are just sequences of invariant instruction representations] to look for - * library routines which have been statically-linked into a binary. - * - * The invariant routines are faster and smaller than the disassembly - * routines; they can be used to determine the size of an instruction - * without all of the overhead of a full instruction disassembly. - */ - -/* This byte is used to replace variant bytes */ -#define X86_WILDCARD_BYTE 0xF4 - -typedef struct { - enum x86_op_type type; /* operand type */ - enum x86_op_datatype datatype; /* operand size */ - enum x86_op_access access; /* operand access [RWX] */ - enum x86_op_flags flags; /* misc flags */ -} x86_invariant_op_t; - -typedef struct { - unsigned char bytes[64]; /* invariant representation */ - unsigned int size; /* number of bytes in insn */ - enum x86_insn_group group; /* meta-type, e.g. INS_EXEC */ - enum x86_insn_type type; /* type, e.g. INS_BRANCH */ - x86_invariant_op_t operands[3]; /* operands: dest, src, imm */ -} x86_invariant_t; - - -/* return a version of the instruction with the variant bytes masked out */ -size_t x86_invariant_disasm( unsigned char *buf, int buf_len, - x86_invariant_t *inv ); -/* return the size in bytes of the intruction pointed to by 'buf'; - * this used x86_invariant_disasm since it faster than x86_disasm */ -size_t x86_size_disasm( unsigned char *buf, unsigned int buf_len ); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/qword.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/qword.h deleted file mode 100644 index 5f0e803c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/qword.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef LIBDISASM_QWORD_H -#define LIBDISASM_QWORD_H - -#include - -/* platform independent data types */ - -#ifdef _MSC_VER - typedef __int64 qword_t; -#else - typedef int64_t qword_t; -#endif - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/Makefile deleted file mode 100644 index 44ef486b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# change these values if you need to -SWIG = swig # apt-get install swig ! -GCC = gcc - -CC_FLAGS = -c -fPIC -LD_FLAGS = -shared -L../.. -ldisasm - -BASE_NAME = x86disasm - -export INTERFACE_FILE BASE_NAME SWIG GCC CC_FLAGS LD_FLAGS - -#==================================================== -# TARGETS - -all: swig -dummy: swig swig-python swig-ruby swig-perl swig-tcl install uninstall clean - -swig: swig-python swig-perl -# swig-rub swig-tcl - -swig-python: - cd python && make -f Makefile-swig - -swig-ruby: - cd ruby && make -f Makefile-swig - -swig-perl: - cd perl && make -f Makefile-swig - -swig-tcl: - cd tcl && make -f Makefile-swig - -# ================================================================== -install: install-python install-perl -# install-ruby install-tcl - -install-python: - cd python && sudo make -f Makefile-swig install - -install-ruby: - cd ruby && sudo make -f Makefile-swig install - -install-perl: - cd perl && sudo make -f Makefile-swig install - -install-tcl: - cd tcl && sudo make -f Makefile-swig install - -# ================================================================== -uninstall: uninstall-python -#uninstall-ruby uninstall-perl uninstall-tcl - -uninstall-python: - cd python && sudo make -f Makefile-swig uninstall - -uninstall-ruby: - cd ruby && sudo make -f Makefile-swig uninstall - -uninstall-perl: - cd perl && sudo make -f Makefile-swig uninstall - -uninstall-tcl: - cd tcl && sudo make -f Makefile-swig uninstall - -# ================================================================== -clean: - cd python && make -f Makefile-swig clean - cd ruby && make -f Makefile-swig clean - cd perl && make -f Makefile-swig clean - cd tcl && make -f Makefile-swig clean diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/README b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/README deleted file mode 100644 index a9fa79ec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/README +++ /dev/null @@ -1,128 +0,0 @@ - Libdisasm SWIG README - -The SWIG utility (www.swig.org) can be used to generate - - -Building SWIG Modules ---------------------- - - make - make install - -Make and Install both build Python, Perl, Ruby, and Tcl modules. If you -do not have one of these languages installed, comment out the relevant -target in the main Makefile. - -Install uses 'sudo' to put files in the correct locations; if you -do not have sudo installed, change the install targets. - -The Module API --------------- - -The OOP API ------------ - - -The Python Module ------------------ - -To test that the module loads: - - bash# python - >>> import x86disasm - >>> x86disasm.version_string() - '0.21-pre' - >>>^D - bash# - - >>> import x86disasm - >>> import array - >>> disasm = x86disasm.X86_Disasm( ) - >>> tgt = open( "/tmp/a.out", "rb" ) - >>> tgt.seek( 0, 2 ) - >>> size = tgt.tell() - >>> tgt.seek( 0, 0 ) - >>> buf = array.array( 'B' ) - >>> buf.fromfile( tgt, size ) - >>> tgt.close() - >>> data = x86disasm.byteArray( size ) - >>> for i in range( size ): - ... data[i] = buf.pop(0) - ... - >>> del buf - >>> del tgt - >>> insn = disasm.disasm( data, size - 1, 0, 0 ) - >>> insn.format( x86disasm.att_syntax ) - 'jg\t0x00000047' - >>> insn.format( x86disasm.raw_syntax ) - '0x00000000|0x00000000|2|7F 45 |||controlflow|jcc|jg|80386|General Purpose|||zero_clear sign_eq_oflow |0|0|relative|sbyte|00000047|' - >>> ops = insn.operand_list() - >>> node = ops.first() - >>> while node is not None: - ... s = node.op.format(x86disasm.raw_syntax) - ... print s - ... node = ops.next() - ... - relative|sbyte|00000047| - - - - - - -The Perl Module ---------------- - -To test that the module loads: - - bash# perl - use x86disasm; - print x86disasm::version_string() . "\n"; - ^D - 0.21-pre - bash# - -The Ruby Module ---------------- - -To test that the module loads: - - bash# irb - irb(main):001:0> require 'x86disasm' - => true - irb(main):002:0> X86disasm.version_string() - => "0.21-pre" - irb(main):003:0> x = X86disasm::X86_Disasm.new - => # - irb(main):004:0> x.max_register_string() - => 8 - irb(main):003:0> ^D - bash# - -The Tcl Module ---------------- - -To test that the module loads: - - bash# tclsh - % load /usr/lib/tcl8.3/x86disasm.so X86disasm - % version_string - 0.21-pre - % ^D - bash# - - % x86_init 0 NULL NULL - OR - % x86disasm dis - _486b0708_p_x86disasm - % puts "[dis cget -last_error]" - 0 - - - - -The Interface Files -------------------- - - libdisasm.i -- interface file without shadow classes - libdisasm_oop.i -- interface file with shadow classes diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm.i b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm.i deleted file mode 100644 index ec120417..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm.i +++ /dev/null @@ -1,508 +0,0 @@ -%module x86disasm -%{ -#include "../../libdis.h" -#include "../../../config.h" -%} - -%rename(version_string) x86_version_string; -%include "../../libdis.h" -#include "../../../config.h" - -%inline %{ - const char * x86_version_string( void ) { - return PACKAGE_VERSION; - } -%} - -%rename(report_codes) x86_report_codes; -%rename(report_error) x86_report_error; -%rename(options) x86_options; -%rename(init) x86_init; -%rename(set_reporter) x86_set_reporter; -%rename(set_options) x86_set_options; -%rename(options) x86_get_options; -%rename(cleanup) x86_cleanup; -%rename(reg_type) x86_reg_type; -%rename(reg) x86_reg_t; -%rename(eaddr) x86_ea_t; -%rename(op_type) x86_op_type; -%rename(optype_is_address) x86_optype_is_address; -%rename(optype_is_relative) x86_optype_is_relative; -%rename(op_datatype) x86_op_datatype; -%rename(op_access) x86_op_access; -%rename(op_flags) x86_op_flags; -%rename(operand) x86_op_t; -%rename(insn_group) x86_insn_group; -%rename(insn_type) x86_insn_type; -%rename(insn_note) x86_insn_note ; -%rename(flag_status) x86_flag_status; -%rename(insn_cpu) x86_insn_cpu ; -%rename(insn_isa) x86_insn_isa ; -%rename(insn_prefix) x86_insn_prefix ; -%rename(insn) x86_insn_t; -%rename(insn_is_valid) x86_insn_is_valid; -%rename(i_disasm) x86_disasm; -%rename(i_disasm_range) x86_disasm_range; -%rename(i_disasm_forward) x86_disasm_forward; -%rename(insn_operand_count) x86_operand_count; -%rename(insn_operand_1st) x86_operand_1st; -%rename(insn_operand_2nd) x86_operand_2nd; -%rename(insn_operand_3rd) x86_operand_3rd; -%rename(insn_dest_operand) x86_get_dest_operand; -%rename(insn_src_operand) x86_get_src_operand; -%rename(insn_imm_operand) x86_get_imm_operand; -%rename(operand_size) x86_operand_size; -%rename(insn_rel_offset) x86_get_rel_offset; -%rename(insn_branch_target) x86_get_branch_target; -%rename(insn_imm) x86_get_imm; -%rename(insn_raw_imm) x86_get_raw_imm; -%rename(insn_set_addr) x86_set_insn_addr; -%rename(insn_set_offset) x86_set_insn_offset; -%rename(insn_set_function) x86_set_insn_function; -%rename(insn_set_block) x86_set_insn_block; -%rename(insn_tag) x86_tag_insn; -%rename(insn_untag) x86_untag_insn; -%rename(insn_is_tagged) x86_insn_is_tagged; -%rename(asm_format) x86_asm_format; -%rename(operand_format) x86_format_operand; -%rename(insn_format_mnemonic) x86_format_mnemonic; -%rename(insn_format) x86_format_insn; -%rename(header_format) x86_format_header; -%rename(endian) x86_endian; -%rename(size_default_address) x86_addr_size; -%rename(size_default_operand) x86_op_size; -%rename(size_machine_word) x86_word_size; -%rename(size_max_insn) x86_max_insn_size; -%rename(reg_sp) x86_sp_reg; -%rename(reg_fp) x86_fp_reg; -%rename(reg_ip) x86_ip_reg; -%rename(reg_from_id) x86_reg_from_id; -%rename(reg_from_alias) x86_get_aliased_reg; -%rename(invariant_op) x86_invariant_op_t; -%rename(invariant) x86_invariant_t; -%rename(disasm_invariant) x86_invariant_disasm; -%rename(disasm_size) x86_size_disasm; - -%include "carrays.i" - -%array_class( unsigned char, byteArray ); - - -%apply (unsigned char *STRING, int LENGTH) { - (unsigned char *buf, size_t buf_len) -}; - - -%newobject x86_op_copy; -%inline %{ - x86_op_t * x86_op_copy( x86_op_t * src ) { - x86_op_t *op; - - if (! src ) { - return NULL; - } - - op = (x86_op_t *) calloc( sizeof(x86_op_t), 1 ); - if ( op ) { - memcpy( op, src, sizeof(x86_op_t) ); - } - - return op; - } - - typedef struct x86_op_list_node { - x86_op_t *op; - struct x86_op_list_node *next, *prev; - } x86_op_list_node; - - typedef struct x86_op_list { - size_t count; - x86_op_list_node *head, *tail, *curr; - } x86_op_list; - - x86_op_list * x86_op_list_new () { - x86_op_list *list = (x86_op_list *) - calloc( sizeof(x86_op_list), 1 ); - list->count = 0; - return list; - } - - void x86_op_list_free(x86_op_list *list) { - x86_op_list_node *node, *next; - - node = list->head; - while ( node ) { - next = node->next; - /* free( node->insn ); */ - free( node ); - node = next; - } - - free( list ); - } - - x86_op_list_node * x86_op_list_first(x86_op_list *list) { - return list->head; - } - - x86_op_list_node * x86_op_list_last(x86_op_list *list) { - return list->tail; - } - - x86_op_list_node * x86_op_list_next(x86_op_list *list) { - if (! list->curr ) { - list->curr = list->head; - return list->head; - } - - list->curr = list->curr->next; - return list->curr; - } - - x86_op_list_node * x86_op_list_prev(x86_op_list *list) { - if (! list->curr ) { - list->curr = list->tail; - return list->tail; - } - - list->curr = list->curr->prev; - return list->curr; - } - -%} - -%newobject x86_op_list_append; - -%inline %{ - void x86_op_list_append( x86_op_list * list, x86_op_t *op ) { - x86_op_list_node *node = (x86_op_list_node *) - calloc( sizeof(x86_op_list_node) , 1 ); - if (! node ) { - return; - } - - list->count++; - if ( ! list->tail ) { - list->head = list->tail = node; - } else { - list->tail->next = node; - node->prev = list->tail; - list->tail = node; - } - - node->op = x86_op_copy( op ); - } - - x86_oplist_t * x86_op_list_node_copy( x86_oplist_t * list ) { - x86_oplist_t *ptr; - ptr = (x86_oplist_t *) calloc( sizeof(x86_oplist_t), 1 ); - if ( ptr ) { - memcpy( &ptr->op, &list->op, sizeof(x86_op_t) ); - } - - return ptr; - } - - x86_insn_t * x86_insn_new() { - x86_insn_t *insn = (x86_insn_t *) - calloc( sizeof(x86_insn_t), 1 ); - return insn; - } - - void x86_insn_free( x86_insn_t *insn ) { - x86_oplist_free( insn ); - free( insn ); - } -%} - -%newobject x86_insn_copy; - -%inline %{ - x86_insn_t * x86_insn_copy( x86_insn_t *src) { - x86_oplist_t *ptr, *list, *last = NULL; - x86_insn_t *insn = (x86_insn_t *) - calloc( sizeof(x86_insn_t), 1 ); - - if ( insn ) { - memcpy( insn, src, sizeof(x86_insn_t) ); - insn->operands = NULL; - insn->block = NULL; - insn->function = NULL; - - /* copy operand list */ - for ( list = src->operands; list; list = list->next ) { - ptr = x86_op_list_node_copy( list ); - - if (! ptr ) { - continue; - } - - if ( insn->operands ) { - last->next = ptr; - } else { - insn->operands = ptr; - } - last = ptr; - } - } - - return insn; - } - - x86_op_list * x86_insn_op_list( x86_insn_t *insn ) { - x86_oplist_t *list = insn->operands; - x86_op_list *op_list = x86_op_list_new(); - - for ( list = insn->operands; list; list = list->next ) { - x86_op_list_append( op_list, &list->op ); - } - - return op_list; - } - - typedef struct x86_insn_list_node { - x86_insn_t *insn; - struct x86_insn_list_node *next, *prev; - } x86_insn_list_node; - - typedef struct x86_insn_list { - size_t count; - x86_insn_list_node *head, *tail, *curr; - } x86_insn_list; - -%} - -%newobject x86_insn_list_new; - -%inline %{ - x86_insn_list * x86_insn_list_new () { - x86_insn_list *list = (x86_insn_list *) - calloc( sizeof(x86_insn_list), 1 ); - list->count = 0; - return list; - } - - void x86_insn_list_free( x86_insn_list * list ) { - x86_insn_list_node *node, *next; - - if (! list ) { - return; - } - - node = list->head; - while ( node ) { - next = node->next; - /* free( node->insn ); */ - free( node ); - node = next; - } - - free( list ); - } - - x86_insn_list_node * x86_insn_list_first( x86_insn_list *list ) { - if (! list ) { - return NULL; - } - return list->head; - } - - x86_insn_list_node * x86_insn_list_last( x86_insn_list *list ) { - if (! list ) { - return NULL; - } - return list->tail; - } - - x86_insn_list_node * x86_insn_list_next( x86_insn_list *list ) { - if (! list ) { - return NULL; - } - if (! list->curr ) { - list->curr = list->head; - return list->head; - } - - list->curr = list->curr->next; - return list->curr; - } - - x86_insn_list_node * x86_insn_list_prev( x86_insn_list *list ) { - if (! list ) { - return NULL; - } - if (! list->curr ) { - list->curr = list->tail; - return list->tail; - } - - list->curr = list->curr->prev; - return list->curr; - } - -%} - -%newobject x86_insn_list_append; - -%inline %{ - void x86_insn_list_append( x86_insn_list *list, x86_insn_t *insn ) { - x86_insn_list_node *node; - if (! list ) { - return; - } - - node = (x86_insn_list_node *) - calloc( sizeof(x86_insn_list_node) , 1 ); - - if (! node ) { - return; - } - - list->count++; - if ( ! list->tail ) { - list->head = list->tail = node; - } else { - list->tail->next = node; - node->prev = list->tail; - list->tail = node; - } - - node->insn = x86_insn_copy( insn ); - } - - typedef struct { - enum x86_report_codes last_error; - void * last_error_data; - void * disasm_callback; - void * disasm_resolver; - } x86disasm; - - void x86_default_reporter( enum x86_report_codes code, - void *data, void *arg ) { - x86disasm *dis = (x86disasm *) arg; - if ( dis ) { - dis->last_error = code; - dis->last_error_data = data; - } - } - - void x86_default_callback( x86_insn_t *insn, void *arg ) { - x86_insn_list *list = (x86_insn_list *) arg; - if ( list ) { - x86_insn_list_append( list, insn ); - } - } - - /* TODO: resolver stack, maybe a callback */ - long x86_default_resolver( x86_op_t *op, x86_insn_t *insn, void *arg ) { - x86disasm *dis = (x86disasm *) arg; - if ( dis ) { - //return dis->resolver( op, insn ); - return 0; - } - - return 0; - } - - -%} - -%newobject x86disasm_new; - -%inline %{ - x86disasm * x86disasm_new ( enum x86_options options ) { - x86disasm * dis = (x86disasm *) - calloc( sizeof( x86disasm ), 1 ); - x86_init( options, x86_default_reporter, dis ); - return dis; - } - - void x86disasm_free( x86disasm * dis ) { - x86_cleanup(); - free( dis ); - } -%} - -%newobject x86_disasm; - -%inline %{ - x86_insn_t * disasm( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset ) { - x86_insn_t *insn = calloc( sizeof( x86_insn_t ), 1 ); - x86_disasm( buf, buf_len, buf_rva, offset, insn ); - return insn; - } - - int disasm_range( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset, - unsigned int len ) { - - x86_insn_list *list = x86_insn_list_new(); - - if ( len > buf_len ) { - len = buf_len; - } - - return x86_disasm_range( buf, buf_rva, offset, len, - x86_default_callback, list ); - } - - int disasm_forward( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset ) { - x86_insn_list *list = x86_insn_list_new(); - - /* use default resolver: damn SWIG callbacks! */ - return x86_disasm_forward( buf, buf_len, buf_rva, offset, - x86_default_callback, list, - x86_default_resolver, NULL ); - } - - size_t disasm_invariant( unsigned char *buf, size_t buf_len, - x86_invariant_t *inv ) { - return x86_invariant_disasm( buf, buf_len, inv ); - } - - size_t disasm_size( unsigned char *buf, size_t buf_len ) { - return x86_size_disasm( buf, buf_len ); - } - - int x86_max_operand_string( enum x86_asm_format format ) { - switch ( format ) { - case xml_syntax: - return MAX_OP_XML_STRING; - break; - case raw_syntax: - return MAX_OP_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - return MAX_OP_STRING; - break; - } - } - - - int x86_max_insn_string( enum x86_asm_format format ) { - switch ( format ) { - case xml_syntax: - return MAX_INSN_XML_STRING; - break; - case raw_syntax: - return MAX_INSN_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - return MAX_INSN_STRING; - break; - } - } - - int x86_max_num_operands( ) { return MAX_NUM_OPERANDS; } -%} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm_oop.i b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm_oop.i deleted file mode 100644 index 973a47e2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/libdisasm_oop.i +++ /dev/null @@ -1,1114 +0,0 @@ -%module x86disasm -%{ -#ifdef _MSC_VER - typedef __int64 qword; -#else - typedef long long qword; -#endif - -#include - -#define MAX_REGNAME 8 -#define MAX_PREFIX_STR 32 -#define MAX_MNEM_STR 16 -#define MAX_INSN_SIZE 20 -#define MAX_OP_STRING 32 -#define MAX_OP_RAW_STRING 64 -#define MAX_OP_XML_STRING 256 -#define MAX_NUM_OPERANDS 8 -#define MAX_INSN_STRING 512 -#define MAX_INSN_RAW_STRING 1024 -#define MAX_INSN_XML_STRING 4096 - -#include "../../../config.h" - - -const char * version_string( void ) { - return PACKAGE_VERSION; -} - -%} - -const char * version_string( void ); - -%rename(X86_Register) x86_reg_t; -%rename(X86_EAddr) x86_ea_t; -%rename(X86_Operand) x86_op_t; -//%rename(X86_OpList) x86_oplist_t; -%rename(X86_Insn) x86_insn_t; -%rename(X86_InvOperand) x86_invariant_op_t; -%rename(X86_Invariant) x86_invariant_t; - -%include "carrays.i" - -%array_class( unsigned char, byteArray ); - - -%apply (unsigned char *STRING, int LENGTH) { - (unsigned char *buf, size_t buf_len) -}; - - -%inline %{ - - -enum x86_asm_format { - unknown_syntax = 0, /* never use! */ - native_syntax, /* header: 35 bytes */ - intel_syntax, /* header: 23 bytes */ - att_syntax, /* header: 23 bytes */ - xml_syntax, /* header: 679 bytes */ - raw_syntax /* header: 172 bytes */ -}; -%} - -/* ================================================================== */ -/* operand class */ -%inline %{ - enum x86_reg_type { - reg_gen = 0x00001, reg_in = 0x00002, - reg_out = 0x00004, reg_local = 0x00008, - reg_fpu = 0x00010, reg_seg = 0x00020, - reg_simd = 0x00040, reg_sys = 0x00080, - reg_sp = 0x00100, reg_fp = 0x00200, - reg_pc = 0x00400, reg_retaddr = 0x00800, - reg_cond = 0x01000, reg_zero = 0x02000, - reg_ret = 0x04000, reg_src = 0x10000, - reg_dest = 0x20000, reg_count = 0x40000 - }; - - typedef struct { - char name[MAX_REGNAME]; - enum x86_reg_type type; - unsigned int size; - unsigned int id; - unsigned int alias; - unsigned int shift; - } x86_reg_t; - - void x86_reg_from_id( unsigned int id, x86_reg_t * reg ); - - typedef struct { - unsigned int scale; - x86_reg_t index, base; - long disp; - char disp_sign; - char disp_size; - } x86_ea_t; - - enum x86_op_type { - op_unused = 0, - op_register = 1, - op_immediate = 2, - op_relative_near = 3, - op_relative_far = 4, - op_absolute = 5, - op_expression = 6, - op_offset = 7, - op_unknown - }; - - enum x86_op_datatype { - op_byte = 1, op_word = 2, - op_dword = 3, op_qword = 4, - op_dqword = 5, op_sreal = 6, - op_dreal = 7, op_extreal = 8, - op_bcd = 9, op_ssimd = 10, - op_dsimd = 11, op_sssimd = 12, - op_sdsimd = 13, op_descr32 = 14, - op_descr16 = 15, op_pdescr32 = 16, - op_pdescr16 = 17, op_fpuenv = 18, - op_fpregset = 19, - }; - - enum x86_op_access { - op_read = 1, - op_write = 2, - op_execute = 4 - }; - - enum x86_op_flags { - op_signed = 1, op_string = 2, - op_constant = 4, op_pointer = 8, - op_sysref = 0x010, op_implied = 0x020, - op_hardcode = 0x40, op_es_seg = 0x100, - op_cs_seg = 0x200, op_ss_seg = 0x300, - op_ds_seg = 0x400, op_fs_seg = 0x500, - op_gs_seg = 0x600 - }; - - typedef struct { - enum x86_op_type type; - enum x86_op_datatype datatype; - enum x86_op_access access; - enum x86_op_flags flags; - union { - char sbyte; - short sword; - long sdword; - qword sqword; - unsigned char byte; - unsigned short word; - unsigned long dword; - qword qword; - float sreal; - double dreal; - unsigned char extreal[10]; - unsigned char bcd[10]; - qword dqword[2]; - unsigned char simd[16]; - unsigned char fpuenv[28]; - void * address; - unsigned long offset; - x86_reg_t reg; - char relative_near; - long relative_far; - x86_ea_t expression; - } data; - void * insn; - } x86_op_t; - - unsigned int x86_operand_size( x86_op_t *op ); - - int x86_format_operand(x86_op_t *op, char *buf, int len, - enum x86_asm_format format); -%} - -%extend x86_reg_t{ - x86_reg_t * aliased_reg( ) { - x86_reg_t * reg = (x86_reg_t * ) - calloc( sizeof(x86_reg_t), 1 ); - x86_reg_from_id( self->id, reg ); - return reg; - } -} - -%extend x86_op_t{ - size_t size() { - return x86_operand_size( self ); - } - char * format( enum x86_asm_format format ) { - char *buf, *str; - size_t len; - - switch ( format ) { - case xml_syntax: - len = MAX_OP_XML_STRING; - break; - case raw_syntax: - len = MAX_OP_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - len = MAX_OP_STRING; - break; - } - - buf = (char * ) calloc( len + 1, 1 ); - x86_format_operand( self, buf, len, format ); - - /* drop buffer down to a reasonable size */ - str = strdup( buf ); - free(buf); - return str; - } - - int is_address( ) { - if ( self->type == op_absolute || - self->type == op_offset ) { - return 1; - } - - return 0; - } - - int is_relative( ) { - if ( self->type == op_relative_near || - self->type == op_relative_far ) { - return 1; - } - - return 0; - } - - %newobject copy; - x86_op_t * copy() { - x86_op_t *op = (x86_op_t *) calloc( sizeof(x86_op_t), 1 ); - - if ( op ) { - memcpy( op, self, sizeof(x86_op_t) ); - } - - return op; - } -} - -/* ================================================================== */ -/* operand list class */ -%inline %{ - typedef struct X86_OpListNode { - x86_op_t *op; - struct X86_OpListNode *next, *prev; - } X86_OpListNode; - - typedef struct X86_OpList { - size_t count; - X86_OpListNode *head, *tail, *curr; - } X86_OpList; -%} - -%extend X86_OpList { - X86_OpList () { - X86_OpList *list = (X86_OpList *) - calloc( sizeof(X86_OpList), 1 ); - list->count = 0; - return list; - } - - ~X86_OpList() { - X86_OpListNode *node, *next; - - node = self->head; - while ( node ) { - next = node->next; - /* free( node->insn ); */ - free( node ); - node = next; - } - - free( self ); - } - - X86_OpListNode * first() { - self->curr = self->head; - return self->head; - } - - X86_OpListNode * last() { - self->curr = self->tail; - return self->tail; - } - - X86_OpListNode * next() { - if (! self->curr ) { - self->curr = self->head; - return self->head; - } - - self->curr = self->curr->next; - return self->curr; - } - - X86_OpListNode * prev() { - if (! self->curr ) { - self->curr = self->tail; - return self->tail; - } - - self->curr = self->curr->prev; - return self->curr; - } - - %newobject append; - void append( x86_op_t *op ) { - X86_OpListNode *node = (X86_OpListNode *) - calloc( sizeof(X86_OpListNode) , 1 ); - if (! node ) { - return; - } - - self->count++; - if ( ! self->tail ) { - self->head = self->tail = node; - } else { - self->tail->next = node; - node->prev = self->tail; - self->tail = node; - } - - node->op = x86_op_t_copy( op ); - } -} - -%inline %{ - typedef struct x86_operand_list { - x86_op_t op; - struct x86_operand_list *next; - } x86_oplist_t; -%} - -%extend x86_oplist_t { - %newobject x86_oplist_node_copy; -} - -/* ================================================================== */ -/* instruction class */ -%inline %{ - x86_oplist_t * x86_oplist_node_copy( x86_oplist_t * list ) { - x86_oplist_t *ptr; - ptr = (x86_oplist_t *) calloc( sizeof(x86_oplist_t), 1 ); - if ( ptr ) { - memcpy( &ptr->op, &list->op, sizeof(x86_op_t) ); - } - - return ptr; - } - - enum x86_insn_group { - insn_none = 0, insn_controlflow = 1, - insn_arithmetic = 2, insn_logic = 3, - insn_stack = 4, insn_comparison = 5, - insn_move = 6, insn_string = 7, - insn_bit_manip = 8, insn_flag_manip = 9, - insn_fpu = 10, insn_interrupt = 13, - insn_system = 14, insn_other = 15 - }; - - enum x86_insn_type { - insn_invalid = 0, insn_jmp = 0x1001, - insn_jcc = 0x1002, insn_call = 0x1003, - insn_callcc = 0x1004, insn_return = 0x1005, - insn_add = 0x2001, insn_sub = 0x2002, - insn_mul = 0x2003, insn_div = 0x2004, - insn_inc = 0x2005, insn_dec = 0x2006, - insn_shl = 0x2007, insn_shr = 0x2008, - insn_rol = 0x2009, insn_ror = 0x200A, - insn_and = 0x3001, insn_or = 0x3002, - insn_xor = 0x3003, insn_not = 0x3004, - insn_neg = 0x3005, insn_push = 0x4001, - insn_pop = 0x4002, insn_pushregs = 0x4003, - insn_popregs = 0x4004, insn_pushflags = 0x4005, - insn_popflags = 0x4006, insn_enter = 0x4007, - insn_leave = 0x4008, insn_test = 0x5001, - insn_cmp = 0x5002, insn_mov = 0x6001, - insn_movcc = 0x6002, insn_xchg = 0x6003, - insn_xchgcc = 0x6004, insn_strcmp = 0x7001, - insn_strload = 0x7002, insn_strmov = 0x7003, - insn_strstore = 0x7004, insn_translate = 0x7005, - insn_bittest = 0x8001, insn_bitset = 0x8002, - insn_bitclear = 0x8003, insn_clear_carry = 0x9001, - insn_clear_zero = 0x9002, insn_clear_oflow = 0x9003, - insn_clear_dir = 0x9004, insn_clear_sign = 0x9005, - insn_clear_parity = 0x9006, insn_set_carry = 0x9007, - insn_set_zero = 0x9008, insn_set_oflow = 0x9009, - insn_set_dir = 0x900A, insn_set_sign = 0x900B, - insn_set_parity = 0x900C, insn_tog_carry = 0x9010, - insn_tog_zero = 0x9020, insn_tog_oflow = 0x9030, - insn_tog_dir = 0x9040, insn_tog_sign = 0x9050, - insn_tog_parity = 0x9060, insn_fmov = 0xA001, - insn_fmovcc = 0xA002, insn_fneg = 0xA003, - insn_fabs = 0xA004, insn_fadd = 0xA005, - insn_fsub = 0xA006, insn_fmul = 0xA007, - insn_fdiv = 0xA008, insn_fsqrt = 0xA009, - insn_fcmp = 0xA00A, insn_fcos = 0xA00C, - insn_fldpi = 0xA00D, insn_fldz = 0xA00E, - insn_ftan = 0xA00F, insn_fsine = 0xA010, - insn_fsys = 0xA020, insn_int = 0xD001, - insn_intcc = 0xD002, insn_iret = 0xD003, - insn_bound = 0xD004, insn_debug = 0xD005, - insn_trace = 0xD006, insn_invalid_op = 0xD007, - insn_oflow = 0xD008, insn_halt = 0xE001, - insn_in = 0xE002, insn_out = 0xE003, - insn_cpuid = 0xE004, insn_nop = 0xF001, - insn_bcdconv = 0xF002, insn_szconv = 0xF003 - }; - - enum x86_insn_note { - insn_note_ring0 = 1, - insn_note_smm = 2, - insn_note_serial = 4 - }; - - enum x86_flag_status { - insn_carry_set = 0x1, - insn_zero_set = 0x2, - insn_oflow_set = 0x4, - insn_dir_set = 0x8, - insn_sign_set = 0x10, - insn_parity_set = 0x20, - insn_carry_or_zero_set = 0x40, - insn_zero_set_or_sign_ne_oflow = 0x80, - insn_carry_clear = 0x100, - insn_zero_clear = 0x200, - insn_oflow_clear = 0x400, - insn_dir_clear = 0x800, - insn_sign_clear = 0x1000, - insn_parity_clear = 0x2000, - insn_sign_eq_oflow = 0x4000, - insn_sign_ne_oflow = 0x8000 - }; - - enum x86_insn_cpu { - cpu_8086 = 1, cpu_80286 = 2, - cpu_80386 = 3, cpu_80387 = 4, - cpu_80486 = 5, cpu_pentium = 6, - cpu_pentiumpro = 7, cpu_pentium2 = 8, - cpu_pentium3 = 9, cpu_pentium4 = 10, - cpu_k6 = 16, cpu_k7 = 32, - cpu_athlon = 48 - }; - - enum x86_insn_isa { - isa_gp = 1, isa_fp = 2, - isa_fpumgt = 3, isa_mmx = 4, - isa_sse1 = 5, isa_sse2 = 6, - isa_sse3 = 7, isa_3dnow = 8, - isa_sys = 9 - }; - - enum x86_insn_prefix { - insn_no_prefix = 0, - insn_rep_zero = 1, - insn_rep_notzero = 2, - insn_lock = 4 - }; - - - typedef struct { - unsigned long addr; - unsigned long offset; - enum x86_insn_group group; - enum x86_insn_type type; - enum x86_insn_note note; - unsigned char bytes[MAX_INSN_SIZE]; - unsigned char size; - unsigned char addr_size; - unsigned char op_size; - enum x86_insn_cpu cpu; - enum x86_insn_isa isa; - enum x86_flag_status flags_set; - enum x86_flag_status flags_tested; - unsigned char stack_mod; - long stack_mod_val; - enum x86_insn_prefix prefix; - char prefix_string[MAX_PREFIX_STR]; - char mnemonic[MAX_MNEM_STR]; - x86_oplist_t *operands; - size_t operand_count; - size_t explicit_count; - void *block; - void *function; - int tag; - } x86_insn_t; - - typedef void (*x86_operand_fn)(x86_op_t *op, x86_insn_t *insn, - void *arg); - - enum x86_op_foreach_type { - op_any = 0, - op_dest = 1, - op_src = 2, - op_ro = 3, - op_wo = 4, - op_xo = 5, - op_rw = 6, - op_implicit = 0x10, - op_explicit = 0x20 - }; - - size_t x86_operand_count( x86_insn_t *insn, - enum x86_op_foreach_type type ); - x86_op_t * x86_operand_1st( x86_insn_t *insn ); - x86_op_t * x86_operand_2nd( x86_insn_t *insn ); - x86_op_t * x86_operand_3rd( x86_insn_t *insn ); - long x86_get_rel_offset( x86_insn_t *insn ); - x86_op_t * x86_get_branch_target( x86_insn_t *insn ); - x86_op_t * x86_get_imm( x86_insn_t *insn ); - unsigned char * x86_get_raw_imm( x86_insn_t *insn ); - void x86_set_insn_addr( x86_insn_t *insn, unsigned long addr ); - int x86_format_mnemonic(x86_insn_t *insn, char *buf, int len, - enum x86_asm_format format); - int x86_format_insn(x86_insn_t *insn, char *buf, int len, - enum x86_asm_format); - void x86_oplist_free( x86_insn_t *insn ); - int x86_insn_is_valid( x86_insn_t *insn ); -%} - -%extend x86_insn_t { - x86_insn_t() { - x86_insn_t *insn = (x86_insn_t *) - calloc( sizeof(x86_insn_t), 1 ); - return insn; - } - ~x86_insn_t() { - x86_oplist_free( self ); - free( self ); - } - - int is_valid( ) { - return x86_insn_is_valid( self ); - } - - x86_op_t * operand_1st() { - return x86_operand_1st( self ); - } - - x86_op_t * operand_2nd() { - return x86_operand_2nd( self ); - } - - x86_op_t * operand_3rd() { - return x86_operand_3rd( self ); - } - - x86_op_t * operand_dest() { - return x86_operand_1st( self ); - } - - x86_op_t * operand_src() { - return x86_operand_2nd( self ); - } - - size_t num_operands( enum x86_op_foreach_type type ) { - return x86_operand_count( self, type ); - } - - long rel_offset() { - return x86_get_rel_offset( self ); - } - - x86_op_t * branch_target() { - return x86_get_branch_target( self ); - } - - x86_op_t * imm() { - return x86_get_imm( self ); - } - - unsigned char * raw_imm() { - return x86_get_raw_imm( self ); - } - - %newobject format; - char * format( enum x86_asm_format format ) { - char *buf, *str; - size_t len; - - switch ( format ) { - case xml_syntax: - len = MAX_INSN_XML_STRING; - break; - case raw_syntax: - len = MAX_INSN_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - len = MAX_INSN_STRING; - break; - } - - buf = (char * ) calloc( len + 1, 1 ); - x86_format_insn( self, buf, len, format ); - - /* drop buffer down to a reasonable size */ - str = strdup( buf ); - free(buf); - return str; - } - - %newobject format_mnemonic; - char * format_mnemonic( enum x86_asm_format format ) { - char *buf, *str; - size_t len = MAX_MNEM_STR + MAX_PREFIX_STR + 4; - - buf = (char * ) calloc( len, 1 ); - x86_format_mnemonic( self, buf, len, format ); - - /* drop buffer down to a reasonable size */ - str = strdup( buf ); - free(buf); - - return str; - } - - %newobject copy; - x86_insn_t * copy() { - x86_oplist_t *ptr, *list, *last = NULL; - x86_insn_t *insn = (x86_insn_t *) - calloc( sizeof(x86_insn_t), 1 ); - - if ( insn ) { - memcpy( insn, self, sizeof(x86_insn_t) ); - insn->operands = NULL; - insn->block = NULL; - insn->function = NULL; - - /* copy operand list */ - for ( list = self->operands; list; list = list->next ) { - ptr = x86_oplist_node_copy( list ); - - if (! ptr ) { - continue; - } - - if ( insn->operands ) { - last->next = ptr; - } else { - insn->operands = ptr; - } - last = ptr; - } - } - - return insn; - } - - X86_OpList * operand_list( ) { - x86_oplist_t *list = self->operands; - X86_OpList *op_list = new_X86_OpList(); - - for ( list = self->operands; list; list = list->next ) { - X86_OpList_append( op_list, &list->op ); - } - - return op_list; - } -} - -/* ================================================================== */ -/* invariant instruction class */ -%inline %{ - #define X86_WILDCARD_BYTE 0xF4 - - typedef struct { - enum x86_op_type type; - enum x86_op_datatype datatype; - enum x86_op_access access; - enum x86_op_flags flags; - } x86_invariant_op_t; - - typedef struct { - unsigned char bytes[64]; - unsigned int size; - enum x86_insn_group group; - enum x86_insn_type type; - x86_invariant_op_t operands[3]; - } x86_invariant_t; -%} - -%extend x86_invariant_t { - - x86_invariant_t() { - x86_invariant_t *inv = (x86_invariant_t *) - calloc( sizeof(x86_invariant_t), 1 ); - return inv; - } - - ~x86_invariant_t() { - free( self ); - } -} - -/* ================================================================== */ -/* instruction list class */ -%inline %{ - typedef struct X86_InsnListNode { - x86_insn_t *insn; - struct X86_InsnListNode *next, *prev; - } X86_InsnListNode; - - typedef struct X86_InsnList { - size_t count; - X86_InsnListNode *head, *tail, *curr; - } X86_InsnList; -%} - -%extend X86_InsnList { - X86_InsnList () { - X86_InsnList *list = (X86_InsnList *) - calloc( sizeof(X86_InsnList), 1 ); - list->count = 0; - return list; - } - - ~X86_InsnList() { - X86_InsnListNode *node, *next; - - node = self->head; - while ( node ) { - next = node->next; - /* free( node->insn ); */ - free( node ); - node = next; - } - - free( self ); - } - - X86_InsnListNode * first() { return self->head; } - - X86_InsnListNode * last() { return self->tail; } - - X86_InsnListNode * next() { - if (! self->curr ) { - self->curr = self->head; - return self->head; - } - - self->curr = self->curr->next; - return self->curr; - } - - X86_InsnListNode * prev() { - if (! self->curr ) { - self->curr = self->tail; - return self->tail; - } - - self->curr = self->curr->prev; - return self->curr; - } - - %newobject append; - void append( x86_insn_t *insn ) { - X86_InsnListNode *node = (X86_InsnListNode *) - calloc( sizeof(X86_InsnListNode) , 1 ); - if (! node ) { - return; - } - - self->count++; - if ( ! self->tail ) { - self->head = self->tail = node; - } else { - self->tail->next = node; - node->prev = self->tail; - self->tail = node; - } - - node->insn = x86_insn_t_copy( insn ); - } -} - -/* ================================================================== */ -/* address table class */ -/* slight TODO */ - -/* ================================================================== */ -/* Main disassembler class */ -%inline %{ - - enum x86_options { - opt_none= 0, - opt_ignore_nulls=1, - opt_16_bit=2 - }; - enum x86_report_codes { - report_disasm_bounds, - report_insn_bounds, - report_invalid_insn, - report_unknown - }; - - - typedef struct { - enum x86_report_codes last_error; - void * last_error_data; - void * disasm_callback; - void * disasm_resolver; - } X86_Disasm; - - typedef void (*DISASM_REPORTER)( enum x86_report_codes code, - void *data, void *arg ); - typedef void (*DISASM_CALLBACK)( x86_insn_t *insn, void * arg ); - typedef long (*DISASM_RESOLVER)( x86_op_t *op, - x86_insn_t * current_insn, - void *arg ); - - void x86_report_error( enum x86_report_codes code, void *data ); - int x86_init( enum x86_options options, DISASM_REPORTER reporter, - void *arg); - void x86_set_reporter( DISASM_REPORTER reporter, void *arg); - void x86_set_options( enum x86_options options ); - enum x86_options x86_get_options( void ); - int x86_cleanup(void); - int x86_format_header( char *buf, int len, enum x86_asm_format format); - unsigned int x86_endian(void); - unsigned int x86_addr_size(void); - unsigned int x86_op_size(void); - unsigned int x86_word_size(void); - unsigned int x86_max_insn_size(void); - unsigned int x86_sp_reg(void); - unsigned int x86_fp_reg(void); - unsigned int x86_ip_reg(void); - size_t x86_invariant_disasm( unsigned char *buf, int buf_len, - x86_invariant_t *inv ); - size_t x86_size_disasm( unsigned char *buf, unsigned int buf_len ); - int x86_disasm( unsigned char *buf, unsigned int buf_len, - unsigned long buf_rva, unsigned int offset, - x86_insn_t * insn ); - int x86_disasm_range( unsigned char *buf, unsigned long buf_rva, - unsigned int offset, unsigned int len, - DISASM_CALLBACK func, void *arg ); - int x86_disasm_forward( unsigned char *buf, unsigned int buf_len, - unsigned long buf_rva, unsigned int offset, - DISASM_CALLBACK func, void *arg, - DISASM_RESOLVER resolver, void *r_arg ); - - void x86_default_reporter( enum x86_report_codes code, - void *data, void *arg ) { - X86_Disasm *dis = (X86_Disasm *) arg; - if ( dis ) { - dis->last_error = code; - dis->last_error_data = data; - } - } - - void x86_default_callback( x86_insn_t *insn, void *arg ) { - X86_InsnList *list = (X86_InsnList *) arg; - if ( list ) { - X86_InsnList_append( list, insn ); - } - } - - /* TODO: resolver stack, maybe a callback */ - long x86_default_resolver( x86_op_t *op, x86_insn_t *insn, void *arg ) { - X86_Disasm *dis = (X86_Disasm *) arg; - if ( dis ) { - //return dis->resolver( op, insn ); - return 0; - } - - return 0; - } - -%} - -%extend X86_Disasm { - - X86_Disasm( ) { - X86_Disasm * dis = (X86_Disasm *) - calloc( sizeof( X86_Disasm ), 1 ); - x86_init( opt_none, x86_default_reporter, dis ); - return dis; - } - - X86_Disasm( enum x86_options options ) { - X86_Disasm * dis = (X86_Disasm *) - calloc( sizeof( X86_Disasm ), 1 ); - x86_init( options, x86_default_reporter, dis ); - return dis; - } - - X86_Disasm( enum x86_options options, DISASM_REPORTER reporter ) { - X86_Disasm * dis = (X86_Disasm *) - calloc( sizeof( X86_Disasm ), 1 ); - x86_init( options, reporter, NULL ); - return dis; - } - - X86_Disasm( enum x86_options options, DISASM_REPORTER reporter, - void * arg ) { - X86_Disasm * dis = (X86_Disasm *) - calloc( sizeof( X86_Disasm ), 1 ); - x86_init( options, reporter, arg ); - return dis; - } - - ~X86_Disasm() { - x86_cleanup(); - free( self ); - } - - void set_options( enum x86_options options ) { - return x86_set_options( options ); - } - - enum x86_options options() { - return x86_get_options(); - } - - void set_callback( void * callback ) { - self->disasm_callback = callback; - } - - void set_resolver( void * callback ) { - self->disasm_resolver = callback; - } - - void report_error( enum x86_report_codes code ) { - x86_report_error( code, NULL ); - } - - %newobject disasm; - x86_insn_t * disasm( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset ) { - x86_insn_t *insn = calloc( sizeof( x86_insn_t ), 1 ); - x86_disasm( buf, buf_len, buf_rva, offset, insn ); - return insn; - } - - int disasm_range( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset, - unsigned int len ) { - - X86_InsnList *list = new_X86_InsnList(); - - if ( len > buf_len ) { - len = buf_len; - } - - return x86_disasm_range( buf, buf_rva, offset, len, - x86_default_callback, list ); - } - - int disasm_forward( unsigned char *buf, size_t buf_len, - unsigned long buf_rva, unsigned int offset ) { - X86_InsnList *list = new_X86_InsnList(); - - /* use default resolver: damn SWIG callbacks! */ - return x86_disasm_forward( buf, buf_len, buf_rva, offset, - x86_default_callback, list, - x86_default_resolver, NULL ); - } - - size_t disasm_invariant( unsigned char *buf, size_t buf_len, - x86_invariant_t *inv ) { - return x86_invariant_disasm( buf, buf_len, inv ); - } - - size_t disasm_size( unsigned char *buf, size_t buf_len ) { - return x86_size_disasm( buf, buf_len ); - } - - %newobject format_header; - char * format_header( enum x86_asm_format format) { - char *buf, *str; - size_t len; - - switch ( format ) { - /* these were obtained from x86_format.c */ - case xml_syntax: - len = 679; break; - case raw_syntax: - len = 172; break; - case native_syntax: - len = 35; break; - case intel_syntax: - len = 23; break; - case att_syntax: - len = 23; break; - case unknown_syntax: - default: - len = 23; break; - } - - buf = (char * ) calloc( len + 1, 1 ); - x86_format_header( buf, len, format ); - - return buf; - } - - unsigned int endian() { - return x86_endian(); - } - - unsigned int addr_size() { - return x86_addr_size(); - } - - unsigned int op_size() { - return x86_op_size(); - } - - unsigned int word_size() { - return x86_word_size(); - } - - unsigned int max_insn_size() { - return x86_max_insn_size(); - } - - unsigned int sp_reg() { - return x86_sp_reg(); - } - - unsigned int fp_reg() { - return x86_fp_reg(); - } - - unsigned int ip_reg() { - return x86_ip_reg(); - } - - %newobject reg_from_id; - x86_reg_t * reg_from_id( unsigned int id ) { - x86_reg_t * reg = calloc( sizeof(x86_reg_t), 1 ); - x86_reg_from_id( id, reg ); - return reg; - } - - unsigned char wildcard_byte() { return X86_WILDCARD_BYTE; } - - int max_register_string() { return MAX_REGNAME; } - - int max_prefix_string() { return MAX_PREFIX_STR; } - - int max_mnemonic_string() { return MAX_MNEM_STR; } - - int max_operand_string( enum x86_asm_format format ) { - switch ( format ) { - case xml_syntax: - return MAX_OP_XML_STRING; - break; - case raw_syntax: - return MAX_OP_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - return MAX_OP_STRING; - break; - } - } - - - int max_insn_string( enum x86_asm_format format ) { - switch ( format ) { - case xml_syntax: - return MAX_INSN_XML_STRING; - break; - case raw_syntax: - return MAX_INSN_RAW_STRING; - break; - case native_syntax: - case intel_syntax: - case att_syntax: - case unknown_syntax: - default: - return MAX_INSN_STRING; - break; - } - } - - int max_num_operands( ) { return MAX_NUM_OPERANDS; } -} - -/* python callback, per the manual */ -/*%typemap(python,in) PyObject *pyfunc { - if (!PyCallable_Check($source)) { - PyErr_SetString(PyExc_TypeError, "Need a callable object!"); - return NULL; - } - $target = $source; -}*/ - -/* python FILE * callback, per the manual */ -/* -%typemap(python,in) FILE * { - if (!PyFile_Check($source)) { - PyErr_SetString(PyExc_TypeError, "Need a file!"); - return NULL; - } - $target = PyFile_AsFile($source); -}*/ - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile-swig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile-swig deleted file mode 100644 index 9f3a6457..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile-swig +++ /dev/null @@ -1,65 +0,0 @@ -ifndef BASE_NAME -BASE_NAME = x86disasm -endif - -ifndef SWIG -SWIG = swig # apt-get install swig ! -endif - -ifndef GCC -GCC = gcc -endif - -ifndef CC_FLAGS -CC_FLAGS = -c -fPIC -endif - -ifndef LD_FLAGS -LD_FLAGS = -shared -L.. -ldisasm -endif - -INTERFACE_FILE = libdisasm_oop.i - -SWIG_INTERFACE = ../$(INTERFACE_FILE) - -# PERL rules -PERL_MOD = blib/arch/auto/$(BASE_NAME)/$(BASE_NAME).so -PERL_SHADOW = $(BASE_NAME)_wrap.c -PERL_SWIG = $(BASE_NAME).pl -PERL_OBJ = $(BASE_NAME)_wrap.o -PERL_INC = `perl -e 'use Config; print $$Config{archlib};'`/CORE -PERL_CC_FLAGS = `perl -e 'use Config; print $$Config{ccflags};'` - -#==================================================== -# TARGETS - -all: swig-perl - -dummy: swig-perl install uninstall clean - -swig-perl: $(PERL_MOD) - -$(PERL_MOD): $(PERL_OBJ) - perl Makefile.PL - make - #$(GCC) $(LD_FLAGS) $(PERL_OBJ) -o $@ - -$(PERL_OBJ): $(PERL_SHADOW) - $(GCC) $(CC_FLAGS) $(PERL_CC_FLAGS) -I$(PERL_INC) -o $@ $< - -$(PERL_SHADOW): $(SWIG_INTERFACE) - swig -perl -shadow -o $(PERL_SHADOW) -outdir . $< - -# ================================================================== -install: $(PERL_MOD) - make install - -# ================================================================== -uninstall: - -# ================================================================== -clean: - rm $(PERL_MOD) $(PERL_OBJ) - rm $(PERL_SHADOW) - rm -rf Makefile blib pm_to_blib - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile.PL b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile.PL deleted file mode 100644 index 6e625df1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/perl/Makefile.PL +++ /dev/null @@ -1,7 +0,0 @@ -use ExtUtils::MakeMaker; - -WriteMakefile( - 'NAME' => 'x86disasm', - 'LIBS' => ['-ldisasm'], - 'OBJECT' => 'x86disasm_wrap.o' -); diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/python/Makefile-swig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/python/Makefile-swig deleted file mode 100644 index 544681a1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/python/Makefile-swig +++ /dev/null @@ -1,64 +0,0 @@ -ifndef BASE_NAME -BASE_NAME = x86disasm -endif - -ifndef SWIG -SWIG = swig # apt-get install swig ! -endif - -ifndef GCC -GCC = gcc -endif - -ifndef CC_FLAGS -CC_FLAGS = -c -fPIC -endif - -ifndef LD_FLAGS -LD_FLAGS = -shared -L.. -ldisasm -endif - -INTERFACE_FILE = libdisasm_oop.i - -SWIG_INTERFACE = ../$(INTERFACE_FILE) - -# PYTHON rules -PYTHON_MOD = $(BASE_NAME)-python.so -PYTHON_SHADOW = $(BASE_NAME)_wrap.c -PYTHON_SWIG = $(BASE_NAME).py -PYTHON_OBJ = $(BASE_NAME)_wrap.o -PYTHON_INC = `/bin/echo -e 'import sys\nprint sys.prefix + "/include/python" + sys.version[:3]' | python` -PYTHON_LIB = `/bin/echo -e 'import sys\nprint sys.prefix + "/lib/python" + sys.version[:3]' | python` -PYTHON_DEST = $(PYTHON_LIB)/lib-dynload/_$(BASE_NAME).so - -#==================================================== -# TARGETS - -all: swig-python - -dummy: swig-python install uninstall clean - -swig-python: $(PYTHON_MOD) - -$(PYTHON_MOD): $(PYTHON_OBJ) - $(GCC) $(LD_FLAGS) $(PYTHON_OBJ) -o $@ - -$(PYTHON_OBJ): $(PYTHON_SHADOW) - $(GCC) $(CC_FLAGS) -I$(PYTHON_INC) -I.. -o $@ $< - -$(PYTHON_SHADOW): $(SWIG_INTERFACE) - swig -python -shadow -o $(PYTHON_SHADOW) -outdir . $< - -# ================================================================== -install: $(PYTHON_MOD) - sudo cp $(PYTHON_MOD) $(PYTHON_DEST) - sudo cp $(PYTHON_SWIG) $(PYTHON_LIB) - -# ================================================================== -uninstall: - -# ================================================================== -clean: - rm $(PYTHON_MOD) $(PYTHON_SWIG) $(PYTHON_OBJ) - rm $(PYTHON_SHADOW) - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/Makefile-swig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/Makefile-swig deleted file mode 100644 index ee480023..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/Makefile-swig +++ /dev/null @@ -1,68 +0,0 @@ -ifndef BASE_NAME -BASE_NAME = x86disasm -endif - -ifndef SWIG -SWIG = swig # apt-get install swig ! -endif - -ifndef GCC -GCC = gcc -endif - -ifndef CC_FLAGS -CC_FLAGS = -c -fPIC -endif - -ifndef LD_FLAGS -LD_FLAGS = -shared -L../.. -ldisasm -endif - -LIBDISASM_DIR = ../.. - -INTERFACE_FILE = libdisasm_oop.i - -SWIG_INTERFACE = ../$(INTERFACE_FILE) - -# RUBY rules -RUBY_MAKEFILE = Makefile -RUBY_MOD = $(BASE_NAME).so -RUBY_SHADOW = $(BASE_NAME)_wrap.c -#RUBY_SWIG = $(BASE_NAME).rb -RUBY_OBJ = $(BASE_NAME)_wrap.o -RUBY_INC = `ruby -e 'puts $$:.join("\n")' | tail -2 | head -1` -#RUBY_LIB = -#RUBY_DEST = - -#==================================================== -# TARGETS - -all: swig-ruby - -dummy: swig-ruby install uninstall clean - -swig-ruby: $(RUBY_MOD) - -$(RUBY_MOD): $(RUBY_MAKEFILE) - make - -$(RUBY_MAKEFILE): $(RUBY_OBJ) - ruby extconf.rb - -$(RUBY_OBJ):$(RUBY_SHADOW) - $(GCC) $(CC_FLAGS) -I$(RUBY_INC) -I.. -o $@ $< - -$(RUBY_SHADOW): $(SWIG_INTERFACE) - swig -ruby -o $(RUBY_SHADOW) -outdir . $< - -# ================================================================== -install: $(RUBY_MOD) - make install - -# ================================================================== -uninstall: - -# ================================================================== -clean: - make clean || true - rm $(RUBY_SHADOW) $(RUBY_MAKEFILE) $(RUBY_MOD) $(RUBY_OBJ) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/extconf.rb b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/extconf.rb deleted file mode 100644 index 4e743264..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/ruby/extconf.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'mkmf' -find_library('disasm', 'x86_init', "/usr/local/lib", "../..") -create_makefile('x86disasm') - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/tcl/Makefile-swig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/tcl/Makefile-swig deleted file mode 100644 index 5145a829..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/swig/tcl/Makefile-swig +++ /dev/null @@ -1,63 +0,0 @@ -ifndef BASE_NAME -BASE_NAME = x86disasm -endif - -ifndef SWIG -SWIG = swig # apt-get install swig ! -endif - -ifndef GCC -GCC = gcc -endif - -ifndef CC_FLAGS -CC_FLAGS = -c -fPIC -endif - -ifndef LD_FLAGS -LD_FLAGS = -shared -L../.. -ldisasm -endif - -INTERFACE_FILE = libdisasm.i - -SWIG_INTERFACE = ../$(INTERFACE_FILE) - -# TCL rules -TCL_VERSION = 8.3 -TCL_MOD = $(BASE_NAME)-tcl.so -TCL_SHADOW = $(BASE_NAME)_wrap.c -TCL_OBJ = $(BASE_NAME)_wrap.o -TCL_INC = /usr/include/tcl$(TCL_VERSION) -TCL_LIB = /usr/lib/tcl$(TCL_VERSION) -TCL_DEST = $(TCL_LIB)/$(BASE_NAME).so - -#==================================================== -# TARGETS - -all: swig-tcl - -dummy: swig-tcl install uninstall clean - -swig-tcl: $(TCL_MOD) - -$(TCL_MOD): $(TCL_OBJ) - $(GCC) $(LD_FLAGS) $(TCL_OBJ) -o $@ - -$(TCL_OBJ): $(TCL_SHADOW) - $(GCC) $(CC_FLAGS) -I$(TCL_INC) -I.. -o $@ $< - -$(TCL_SHADOW): $(SWIG_INTERFACE) - swig -tcl -o $(TCL_SHADOW) -outdir . $< - -# ================================================================== -install: $(TCL_MOD) - sudo cp $(TCL_MOD) $(TCL_DEST) - -# ================================================================== -uninstall: - -# ================================================================== -clean: - rm $(TCL_MOD) $(TCL_SWIG) $(TCL_OBJ) - rm $(TCL_SHADOW) - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_disasm.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_disasm.c deleted file mode 100644 index 04574fa0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_disasm.c +++ /dev/null @@ -1,210 +0,0 @@ -#include -#include -#include - -#include "libdis.h" -#include "ia32_insn.h" -#include "ia32_invariant.h" -#include "x86_operand_list.h" - - -#ifdef _MSC_VER - #define snprintf _snprintf - #define inline __inline -#endif - -unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, - uint32_t buf_rva, unsigned int offset, - x86_insn_t *insn ){ - int len, size; - unsigned char bytes[MAX_INSTRUCTION_SIZE]; - - if ( ! buf || ! insn || ! buf_len ) { - /* caller screwed up somehow */ - return 0; - } - - - /* ensure we are all NULLed up */ - memset( insn, 0, sizeof(x86_insn_t) ); - insn->addr = buf_rva + offset; - insn->offset = offset; - /* default to invalid insn */ - insn->type = insn_invalid; - insn->group = insn_none; - - if ( offset >= buf_len ) { - /* another caller screwup ;) */ - x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset); - return 0; - } - - len = buf_len - offset; - - /* copy enough bytes for disassembly into buffer : this - * helps prevent buffer overruns at the end of a file */ - memset( bytes, 0, MAX_INSTRUCTION_SIZE ); - memcpy( bytes, &buf[offset], (len < MAX_INSTRUCTION_SIZE) ? len : - MAX_INSTRUCTION_SIZE ); - - /* actually do the disassembly */ - /* TODO: allow switching when more disassemblers are added */ - size = ia32_disasm_addr( bytes, len, insn); - - /* check and see if we had an invalid instruction */ - if (! size ) { - x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset ); - return 0; - } - - /* check if we overran the end of the buffer */ - if ( size > len ) { - x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset ); - MAKE_INVALID( insn, bytes ); - return 0; - } - - /* fill bytes field of insn */ - memcpy( insn->bytes, bytes, size ); - - return size; -} - -unsigned int x86_disasm_range( unsigned char *buf, uint32_t buf_rva, - unsigned int offset, unsigned int len, - DISASM_CALLBACK func, void *arg ) { - x86_insn_t insn; - unsigned int buf_len, size, count = 0, bytes = 0; - - /* buf_len is implied by the arguments */ - buf_len = len + offset; - - while ( bytes < len ) { - size = x86_disasm( buf, buf_len, buf_rva, offset + bytes, - &insn ); - if ( size ) { - /* invoke callback if it exists */ - if ( func ) { - (*func)( &insn, arg ); - } - bytes += size; - count ++; - } else { - /* error */ - bytes++; /* try next byte */ - } - - x86_oplist_free( &insn ); - } - - return( count ); -} - -static inline int follow_insn_dest( x86_insn_t *insn ) { - if ( insn->type == insn_jmp || insn->type == insn_jcc || - insn->type == insn_call || insn->type == insn_callcc ) { - return(1); - } - return(0); -} - -static inline int insn_doesnt_return( x86_insn_t *insn ) { - return( (insn->type == insn_jmp || insn->type == insn_return) ? 1: 0 ); -} - -static int32_t internal_resolver( x86_op_t *op, x86_insn_t *insn ){ - int32_t next_addr = -1; - if ( x86_optype_is_address(op->type) ) { - next_addr = op->data.sdword; - } else if ( op->type == op_relative_near ) { - next_addr = insn->addr + insn->size + op->data.relative_near; - } else if ( op->type == op_relative_far ) { - next_addr = insn->addr + insn->size + op->data.relative_far; - } - return( next_addr ); -} - -unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len, - uint32_t buf_rva, unsigned int offset, - DISASM_CALLBACK func, void *arg, - DISASM_RESOLVER resolver, void *r_arg ){ - x86_insn_t insn; - x86_op_t *op; - int32_t next_addr; - uint32_t next_offset; - unsigned int size, count = 0, bytes = 0, cont = 1; - - while ( cont && bytes < buf_len ) { - size = x86_disasm( buf, buf_len, buf_rva, offset + bytes, - &insn ); - - if ( size ) { - /* invoke callback if it exists */ - if ( func ) { - (*func)( &insn, arg ); - } - bytes += size; - count ++; - } else { - /* error */ - bytes++; /* try next byte */ - } - - if ( follow_insn_dest(&insn) ) { - op = x86_get_dest_operand( &insn ); - next_addr = -1; - - /* if caller supplied a resolver, use it to determine - * the address to disassemble */ - if ( resolver ) { - next_addr = resolver(op, &insn, r_arg); - } else { - next_addr = internal_resolver(op, &insn); - } - - if (next_addr != -1 ) { - next_offset = next_addr - buf_rva; - /* if offset is in this buffer... */ - if ( next_offset >= 0 && - next_offset < buf_len ) { - /* go ahead and disassemble */ - count += x86_disasm_forward( buf, - buf_len, - buf_rva, - next_offset, - func, arg, - resolver, r_arg ); - } else { - /* report unresolved address */ - x86_report_error( report_disasm_bounds, - (void*)(long)next_addr ); - } - } - } /* end follow_insn */ - - if ( insn_doesnt_return(&insn) ) { - /* stop disassembling */ - cont = 0; - } - - x86_oplist_free( &insn ); - } - return( count ); -} - -/* invariant instruction representation */ -size_t x86_invariant_disasm( unsigned char *buf, int buf_len, - x86_invariant_t *inv ){ - if (! buf || ! buf_len || ! inv ) { - return(0); - } - - return ia32_disasm_invariant(buf, buf_len, inv); -} -size_t x86_size_disasm( unsigned char *buf, unsigned int buf_len ) { - if (! buf || ! buf_len ) { - return(0); - } - - return ia32_disasm_size(buf, buf_len); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_format.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_format.c deleted file mode 100644 index aed8cce4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_format.c +++ /dev/null @@ -1,1430 +0,0 @@ -#include -#include -#include - -#include "libdis.h" -#include - -#ifdef _MSC_VER - #define snprintf _snprintf - #define inline __inline -#endif - - -/* - * concatenation macros. STRNCATF concatenates a format string, buf - * only with one argument. - */ -#define STRNCAT( buf, str, len ) do { \ - int _i = strlen(str), _blen = strlen(buf), _len = len - 1; \ - if ( len ) { \ - strncat( buf, str, _len ); \ - if ( _len <= _i ) { \ - buf[_blen+_len] = '\0'; \ - len = 0; \ - } else { \ - len -= _i; \ - } \ - } \ -} while( 0 ) - -#define STRNCATF( buf, fmt, data, len ) do { \ - char _tmp[MAX_OP_STRING]; \ - \ - snprintf( _tmp, sizeof _tmp, fmt, data ); \ - STRNCAT( buf, _tmp, len ); \ -} while( 0 ) - - -#define PRINT_DISPLACEMENT( ea ) do { \ - if ( ea->disp_size && ea->disp ) { \ - if ( ea->disp_sign ) { \ - STRNCATF( buf, "-0x%" PRIX32, -ea->disp, len ); \ - } else { \ - STRNCATF( buf, "0x%" PRIX32, ea->disp, len ); \ - } \ - } \ -} while( 0 ) - -static const char *prefix_strings[] = { - "", /* no prefix */ - "repz ", /* the trailing spaces make it easy to prepend to mnemonic */ - "repnz ", - "lock ", - "branch delay " /* unused in x86 */ -}; - -static int format_insn_prefix_str( enum x86_insn_prefix prefix, char *buf, - int len ) { - - int len_orig = len; - - /* concat all prefix strings */ - if ( prefix & 1 ) { STRNCAT( buf, prefix_strings[1], len ); } - if ( prefix & 2 ) { STRNCAT( buf, prefix_strings[2], len ); } - if ( prefix & 4 ) { STRNCAT( buf, prefix_strings[3], len ); } - if ( prefix & 8 ) { STRNCAT( buf, prefix_strings[4], len ); } - - /* return the number of characters added */ - return (len_orig - len); -} - -/* - * sprint's an operand's data to string str. - */ -static void get_operand_data_str( x86_op_t *op, char *str, int len ){ - - if ( op->flags & op_signed ) { - switch ( op->datatype ) { - case op_byte: - snprintf( str, len, "%" PRId8, op->data.sbyte ); - return; - case op_word: - snprintf( str, len, "%" PRId16, op->data.sword ); - return; - case op_qword: - snprintf( str, len, "%" PRId64, op->data.sqword ); - return; - default: - snprintf( str, len, "%" PRId32, op->data.sdword ); - return; - } - } - - //else - switch ( op->datatype ) { - case op_byte: - snprintf( str, len, "0x%02" PRIX8, op->data.byte ); - return; - case op_word: - snprintf( str, len, "0x%04" PRIX16, op->data.word ); - return; - case op_qword: - snprintf( str, len, "0x%08" PRIX64,op->data.sqword ); - return; - default: - snprintf( str, len, "0x%08" PRIX32, op->data.dword ); - return; - } -} - -/* - * sprints register types to a string. the register types can be ORed - * together. - */ -static void get_operand_regtype_str( int regtype, char *str, int len ) -{ - static struct { - const char *name; - int value; - } operand_regtypes[] = { - {"reg_gen" , 0x00001}, - {"reg_in" , 0x00002}, - {"reg_out" , 0x00004}, - {"reg_local" , 0x00008}, - {"reg_fpu" , 0x00010}, - {"reg_seg" , 0x00020}, - {"reg_simd" , 0x00040}, - {"reg_sys" , 0x00080}, - {"reg_sp" , 0x00100}, - {"reg_fp" , 0x00200}, - {"reg_pc" , 0x00400}, - {"reg_retaddr", 0x00800}, - {"reg_cond" , 0x01000}, - {"reg_zero" , 0x02000}, - {"reg_ret" , 0x04000}, - {"reg_src" , 0x10000}, - {"reg_dest" , 0x20000}, - {"reg_count" , 0x40000}, - {NULL, 0}, //end - }; - - unsigned int i; - - memset( str, 0, len ); - - //go thru every type in the enum - for ( i = 0; operand_regtypes[i].name; i++ ) { - //skip if type is not set - if(! (regtype & operand_regtypes[i].value) ) - continue; - - //not the first time around - if( str[0] ) { - STRNCAT( str, " ", len ); - } - - STRNCAT(str, operand_regtypes[i].name, len ); - } -} - -static int format_expr( x86_ea_t *ea, char *buf, int len, - enum x86_asm_format format ) { - char str[MAX_OP_STRING]; - - if ( format == att_syntax ) { - if (ea->base.name[0] || ea->index.name[0] || ea->scale) { - PRINT_DISPLACEMENT(ea); - STRNCAT( buf, "(", len ); - - if ( ea->base.name[0]) { - STRNCATF( buf, "%%%s", ea->base.name, len ); - } - if ( ea->index.name[0]) { - STRNCATF( buf, ",%%%s", ea->index.name, len ); - if ( ea->scale > 1 ) { - STRNCATF( buf, ",%d", ea->scale, len ); - } - } - /* handle the syntactic exception */ - if ( ! ea->base.name[0] && - ! ea->index.name[0] ) { - STRNCATF( buf, ",%d", ea->scale, len ); - } - - STRNCAT( buf, ")", len ); - } else - STRNCATF( buf, "0x%" PRIX32, ea->disp, len ); - - } else if ( format == xml_syntax ){ - - if ( ea->base.name[0]) { - STRNCAT (buf, "\t\t\t\n", len); - - get_operand_regtype_str (ea->base.type, str, - sizeof str); - STRNCAT (buf, "\t\t\t\tbase.name, len); - STRNCATF (buf, "type=\"%s\" ", str, len); - STRNCATF (buf, "size=%d/>\n", ea->base.size, len); - - STRNCAT (buf, "\t\t\t\n", len); - } - - if ( ea->index.name[0]) { - STRNCAT (buf, "\t\t\t\n", len); - - get_operand_regtype_str (ea->index.type, str, - sizeof str); - - STRNCAT (buf, "\t\t\t\tindex.name, len); - STRNCATF (buf, "type=\"%s\" ", str, len); - STRNCATF (buf, "size=%d/>\n", ea->index.size, len); - - STRNCAT (buf, "\t\t\t\n", len); - } - - //scale - STRNCAT (buf, "\t\t\t\n", len); - STRNCAT (buf, "\t\t\t\t\n", ea->scale, len); - STRNCAT (buf, "\t\t\t\n", len); - - if ( ea->disp_size ) { - - STRNCAT (buf, "\t\t\t\n", len); - - if ( ea->disp_size > 1 && ! ea->disp_sign ) { - STRNCAT (buf, "\t\t\t\t
\n", ea->disp, - len); - } else { - STRNCAT (buf, "\t\t\t\t\n", ea->disp, len); - } - - STRNCAT (buf, "\t\t\t\n", len); - } - - } else if ( format == raw_syntax ) { - - PRINT_DISPLACEMENT(ea); - STRNCAT( buf, "(", len ); - - STRNCATF( buf, "%s,", ea->base.name, len ); - STRNCATF( buf, "%s,", ea->index.name, len ); - STRNCATF( buf, "%d", ea->scale, len ); - STRNCAT( buf, ")", len ); - - } else { - - STRNCAT( buf, "[", len ); - - if ( ea->base.name[0] ) { - STRNCAT( buf, ea->base.name, len ); - if ( ea->index.name[0] || - (ea->disp_size && ! ea->disp_sign) ) { - STRNCAT( buf, "+", len ); - } - } - if ( ea->index.name[0] ) { - STRNCAT( buf, ea->index.name, len ); - if ( ea->scale > 1 ) - { - STRNCATF( buf, "*%" PRId32, ea->scale, len ); - } - if ( ea->disp_size && ! ea->disp_sign ) - { - STRNCAT( buf, "+", len ); - } - } - - if ( ea->disp_size || (! ea->index.name[0] && - ! ea->base.name[0] ) ) - { - PRINT_DISPLACEMENT(ea); - } - - STRNCAT( buf, "]", len ); - } - - return( strlen(buf) ); -} - -static int format_seg( x86_op_t *op, char *buf, int len, - enum x86_asm_format format ) { - int len_orig = len; - const char *reg = ""; - - if (! op || ! buf || ! len || ! op->flags) { - return(0); - } - if ( op->type != op_offset && op->type != op_expression ){ - return(0); - } - if (! ((int) op->flags & 0xF00) ) { - return(0); - } - - switch (op->flags & 0xF00) { - case op_es_seg: reg = "es"; break; - case op_cs_seg: reg = "cs"; break; - case op_ss_seg: reg = "ss"; break; - case op_ds_seg: reg = "ds"; break; - case op_fs_seg: reg = "fs"; break; - case op_gs_seg: reg = "gs"; break; - default: - break; - } - - if (! reg[0] ) { - return( 0 ); - } - - switch( format ) { - case xml_syntax: - STRNCAT( buf, "\t\t\t\n", reg, len ); - break; - case att_syntax: - STRNCATF( buf, "%%%s:", reg, len ); - break; - - default: - STRNCATF( buf, "%s:", reg, len ); - break; - } - - return( len_orig - len ); /* return length of appended string */ -} - -static const char *get_operand_datatype_str( x86_op_t *op ){ - - static const char *types[] = { - "sbyte", /* 0 */ - "sword", - "sqword", - "sdword", - "sdqword", /* 4 */ - "byte", - "word", - "qword", - "dword", /* 8 */ - "dqword", - "sreal", - "dreal", - "extreal", /* 12 */ - "bcd", - "ssimd", - "dsimd", - "sssimd", /* 16 */ - "sdsimd", - "descr32", - "descr16", - "pdescr32", /* 20 */ - "pdescr16", - "bounds16", - "bounds32", - "fpu_env16", - "fpu_env32", /* 25 */ - "fpu_state16", - "fpu_state32", - "fp_reg_set" - }; - - /* handle signed values first */ - if ( op->flags & op_signed ) { - switch (op->datatype) { - case op_byte: return types[0]; - case op_word: return types[1]; - case op_qword: return types[2]; - case op_dqword: return types[4]; - default: return types[3]; - } - } - - switch (op->datatype) { - case op_byte: return types[5]; - case op_word: return types[6]; - case op_qword: return types[7]; - case op_dqword: return types[9]; - case op_sreal: return types[10]; - case op_dreal: return types[11]; - case op_extreal: return types[12]; - case op_bcd: return types[13]; - case op_ssimd: return types[14]; - case op_dsimd: return types[15]; - case op_sssimd: return types[16]; - case op_sdsimd: return types[17]; - case op_descr32: return types[18]; - case op_descr16: return types[19]; - case op_pdescr32: return types[20]; - case op_pdescr16: return types[21]; - case op_bounds16: return types[22]; - case op_bounds32: return types[23]; - case op_fpustate16: return types[24]; - case op_fpustate32: return types[25]; - case op_fpuenv16: return types[26]; - case op_fpuenv32: return types[27]; - case op_fpregset: return types[28]; - default: return types[8]; - } -} - -static int format_insn_eflags_str( enum x86_flag_status flags, char *buf, - int len) { - - static struct { - const char *name; - int value; - } insn_flags[] = { - { "carry_set ", 0x0001 }, - { "zero_set ", 0x0002 }, - { "oflow_set ", 0x0004 }, - { "dir_set ", 0x0008 }, - { "sign_set ", 0x0010 }, - { "parity_set ", 0x0020 }, - { "carry_or_zero_set ", 0x0040 }, - { "zero_set_or_sign_ne_oflow ", 0x0080 }, - { "carry_clear ", 0x0100 }, - { "zero_clear ", 0x0200 }, - { "oflow_clear ", 0x0400 }, - { "dir_clear ", 0x0800 }, - { "sign_clear ", 0x1000 }, - { "parity_clear ", 0x2000 }, - { "sign_eq_oflow ", 0x4000 }, - { "sign_ne_oflow ", 0x8000 }, - { NULL, 0x0000 }, //end - }; - - unsigned int i; - int len_orig = len; - - for (i = 0; insn_flags[i].name; i++) { - if (! (flags & insn_flags[i].value) ) - continue; - - STRNCAT( buf, insn_flags[i].name, len ); - } - - return( len_orig - len ); -} - -static const char *get_insn_group_str( enum x86_insn_group gp ) { - - static const char *types[] = { - "", // 0 - "controlflow",// 1 - "arithmetic", // 2 - "logic", // 3 - "stack", // 4 - "comparison", // 5 - "move", // 6 - "string", // 7 - "bit_manip", // 8 - "flag_manip", // 9 - "fpu", // 10 - "", // 11 - "", // 12 - "interrupt", // 13 - "system", // 14 - "other", // 15 - }; - - if ( gp > sizeof (types)/sizeof(types[0]) ) - return ""; - - return types[gp]; -} - -static const char *get_insn_type_str( enum x86_insn_type type ) { - - static struct { - const char *name; - int value; - } types[] = { - /* insn_controlflow */ - { "jmp", 0x1001 }, - { "jcc", 0x1002 }, - { "call", 0x1003 }, - { "callcc", 0x1004 }, - { "return", 0x1005 }, - { "loop", 0x1006 }, - /* insn_arithmetic */ - { "add", 0x2001 }, - { "sub", 0x2002 }, - { "mul", 0x2003 }, - { "div", 0x2004 }, - { "inc", 0x2005 }, - { "dec", 0x2006 }, - { "shl", 0x2007 }, - { "shr", 0x2008 }, - { "rol", 0x2009 }, - { "ror", 0x200A }, - /* insn_logic */ - { "and", 0x3001 }, - { "or", 0x3002 }, - { "xor", 0x3003 }, - { "not", 0x3004 }, - { "neg", 0x3005 }, - /* insn_stack */ - { "push", 0x4001 }, - { "pop", 0x4002 }, - { "pushregs", 0x4003 }, - { "popregs", 0x4004 }, - { "pushflags", 0x4005 }, - { "popflags", 0x4006 }, - { "enter", 0x4007 }, - { "leave", 0x4008 }, - /* insn_comparison */ - { "test", 0x5001 }, - { "cmp", 0x5002 }, - /* insn_move */ - { "mov", 0x6001 }, /* move */ - { "movcc", 0x6002 }, /* conditional move */ - { "xchg", 0x6003 }, /* exchange */ - { "xchgcc", 0x6004 }, /* conditional exchange */ - /* insn_string */ - { "strcmp", 0x7001 }, - { "strload", 0x7002 }, - { "strmov", 0x7003 }, - { "strstore", 0x7004 }, - { "translate", 0x7005 }, /* xlat */ - /* insn_bit_manip */ - { "bittest", 0x8001 }, - { "bitset", 0x8002 }, - { "bitclear", 0x8003 }, - /* insn_flag_manip */ - { "clear_carry", 0x9001 }, - { "clear_zero", 0x9002 }, - { "clear_oflow", 0x9003 }, - { "clear_dir", 0x9004 }, - { "clear_sign", 0x9005 }, - { "clear_parity", 0x9006 }, - { "set_carry", 0x9007 }, - { "set_zero", 0x9008 }, - { "set_oflow", 0x9009 }, - { "set_dir", 0x900A }, - { "set_sign", 0x900B }, - { "set_parity", 0x900C }, - { "tog_carry", 0x9010 }, - { "tog_zero", 0x9020 }, - { "tog_oflow", 0x9030 }, - { "tog_dir", 0x9040 }, - { "tog_sign", 0x9050 }, - { "tog_parity", 0x9060 }, - /* insn_fpu */ - { "fmov", 0xA001 }, - { "fmovcc", 0xA002 }, - { "fneg", 0xA003 }, - { "fabs", 0xA004 }, - { "fadd", 0xA005 }, - { "fsub", 0xA006 }, - { "fmul", 0xA007 }, - { "fdiv", 0xA008 }, - { "fsqrt", 0xA009 }, - { "fcmp", 0xA00A }, - { "fcos", 0xA00C }, - { "fldpi", 0xA00D }, - { "fldz", 0xA00E }, - { "ftan", 0xA00F }, - { "fsine", 0xA010 }, - { "fsys", 0xA020 }, - /* insn_interrupt */ - { "int", 0xD001 }, - { "intcc", 0xD002 }, /* not present in x86 ISA */ - { "iret", 0xD003 }, - { "bound", 0xD004 }, - { "debug", 0xD005 }, - { "trace", 0xD006 }, - { "invalid_op", 0xD007 }, - { "oflow", 0xD008 }, - /* insn_system */ - { "halt", 0xE001 }, - { "in", 0xE002 }, /* input from port/bus */ - { "out", 0xE003 }, /* output to port/bus */ - { "cpuid", 0xE004 }, - /* insn_other */ - { "nop", 0xF001 }, - { "bcdconv", 0xF002 }, /* convert to or from BCD */ - { "szconv", 0xF003 }, /* change size of operand */ - { NULL, 0 }, //end - }; - - unsigned int i; - - //go thru every type in the enum - for ( i = 0; types[i].name; i++ ) { - if ( types[i].value == type ) - return types[i].name; - } - - return ""; -} - -static const char *get_insn_cpu_str( enum x86_insn_cpu cpu ) { - static const char *intel[] = { - "", // 0 - "8086", // 1 - "80286", // 2 - "80386", // 3 - "80387", // 4 - "80486", // 5 - "Pentium", // 6 - "Pentium Pro", // 7 - "Pentium 2", // 8 - "Pentium 3", // 9 - "Pentium 4" // 10 - }; - - if ( cpu <= sizeof(intel)/sizeof(intel[0]) ) { - return intel[cpu]; - } else if ( cpu == 16 ) { - return "K6"; - } else if ( cpu == 32 ) { - return "K7"; - } else if ( cpu == 48 ) { - return "Athlon"; - } - - return ""; -} - -static const char *get_insn_isa_str( enum x86_insn_isa isa ) { - static const char *subset[] = { - NULL, // 0 - "General Purpose", // 1 - "Floating Point", // 2 - "FPU Management", // 3 - "MMX", // 4 - "SSE", // 5 - "SSE2", // 6 - "SSE3", // 7 - "3DNow!", // 8 - "System" // 9 - }; - - if ( isa > sizeof (subset)/sizeof(subset[0]) ) { - return ""; - } - - return subset[isa]; -} - -static int format_operand_att( x86_op_t *op, x86_insn_t *insn, char *buf, - int len){ - - char str[MAX_OP_STRING]; - - memset (str, 0, sizeof str); - - switch ( op->type ) { - case op_register: - STRNCATF( buf, "%%%s", op->data.reg.name, len ); - break; - - case op_immediate: - get_operand_data_str( op, str, sizeof str ); - STRNCATF( buf, "$%s", str, len ); - break; - - case op_relative_near: - STRNCATF( buf, "0x%08X", - (unsigned int)(op->data.sbyte + - insn->addr + insn->size), len ); - break; - - case op_relative_far: - if (op->datatype == op_word) { - STRNCATF( buf, "0x%08X", - (unsigned int)(op->data.sword + - insn->addr + insn->size), len ); - } else { - STRNCATF( buf, "0x%08X", - (unsigned int)(op->data.sdword + - insn->addr + insn->size), len ); - } - break; - - case op_absolute: - /* ATT uses the syntax $section, $offset */ - STRNCATF( buf, "$0x%04" PRIX16 ", ", op->data.absolute.segment, - len ); - if (op->datatype == op_descr16) { - STRNCATF( buf, "$0x%04" PRIX16, - op->data.absolute.offset.off16, len ); - } else { - STRNCATF( buf, "$0x%08" PRIX32, - op->data.absolute.offset.off32, len ); - } - break; - case op_offset: - /* ATT requires a '*' before JMP/CALL ops */ - if (insn->type == insn_jmp || insn->type == insn_call) - STRNCAT( buf, "*", len ); - - len -= format_seg( op, buf, len, att_syntax ); - STRNCATF( buf, "0x%08" PRIX32, op->data.sdword, len ); - break; - - case op_expression: - /* ATT requires a '*' before JMP/CALL ops */ - if (insn->type == insn_jmp || insn->type == insn_call) - STRNCAT( buf, "*", len ); - - len -= format_seg( op, buf, len, att_syntax ); - len -= format_expr( &op->data.expression, buf, len, - att_syntax ); - break; - case op_unused: - case op_unknown: - /* return 0-truncated buffer */ - break; - } - - return ( strlen( buf ) ); -} - -static int format_operand_native( x86_op_t *op, x86_insn_t *insn, char *buf, - int len){ - - char str[MAX_OP_STRING]; - - switch (op->type) { - case op_register: - STRNCAT( buf, op->data.reg.name, len ); - break; - - case op_immediate: - get_operand_data_str( op, str, sizeof str ); - STRNCAT( buf, str, len ); - break; - - case op_relative_near: - STRNCATF( buf, "0x%08" PRIX32, - (unsigned int)(op->data.sbyte + - insn->addr + insn->size), len ); - break; - - case op_relative_far: - if ( op->datatype == op_word ) { - STRNCATF( buf, "0x%08" PRIX32, - (unsigned int)(op->data.sword + - insn->addr + insn->size), len ); - break; - } else { - STRNCATF( buf, "0x%08" PRIX32, op->data.sdword + - insn->addr + insn->size, len ); - } - break; - - case op_absolute: - STRNCATF( buf, "$0x%04" PRIX16 ":", op->data.absolute.segment, - len ); - if (op->datatype == op_descr16) { - STRNCATF( buf, "0x%04" PRIX16, - op->data.absolute.offset.off16, len ); - } else { - STRNCATF( buf, "0x%08" PRIX32, - op->data.absolute.offset.off32, len ); - } - break; - - case op_offset: - len -= format_seg( op, buf, len, native_syntax ); - STRNCATF( buf, "[0x%08" PRIX32 "]", op->data.sdword, len ); - break; - - case op_expression: - len -= format_seg( op, buf, len, native_syntax ); - len -= format_expr( &op->data.expression, buf, len, - native_syntax ); - break; - case op_unused: - case op_unknown: - /* return 0-truncated buffer */ - break; - } - - return( strlen( buf ) ); -} - -static int format_operand_xml( x86_op_t *op, x86_insn_t *insn, char *buf, - int len){ - - char str[MAX_OP_STRING] = "\0"; - - switch (op->type) { - case op_register: - - get_operand_regtype_str( op->data.reg.type, str, - sizeof str ); - - STRNCAT( buf, "\t\tdata.reg.name, len ); - STRNCATF( buf, "type=\"%s\" ", str, len ); - STRNCATF( buf, "size=%d/>\n", op->data.reg.size, len ); - break; - - case op_immediate: - - get_operand_data_str( op, str, sizeof str ); - - STRNCAT( buf, "\t\t\n", str, len ); - break; - - case op_relative_near: - STRNCAT( buf, "\t\t\n", - (unsigned int)(op->data.sbyte + - insn->addr + insn->size), len ); - break; - - case op_relative_far: - STRNCAT( buf, "\t\tdatatype == op_word) { - STRNCATF( buf, "value=\"0x%08" PRIX32 "\"/>\n", - (unsigned int)(op->data.sword + - insn->addr + insn->size), len); - break; - } else { - - STRNCATF( buf, "value=\"0x%08" PRIX32 "\"/>\n", - op->data.sdword + insn->addr + insn->size, - len ); - } - break; - - case op_absolute: - - STRNCATF( buf, - "\t\tdata.absolute.segment, len ); - - if (op->datatype == op_descr16) { - STRNCATF( buf, "offset=\"0x%04" PRIX16 "\">", - op->data.absolute.offset.off16, len ); - } else { - STRNCATF( buf, "offset=\"0x%08" PRIX32 "\">", - op->data.absolute.offset.off32, len ); - } - - STRNCAT( buf, "\t\t\n", len ); - break; - - case op_expression: - - - STRNCAT( buf, "\t\t\n", len ); - - len -= format_seg( op, buf, len, xml_syntax ); - len -= format_expr( &op->data.expression, buf, len, - xml_syntax ); - - STRNCAT( buf, "\t\t\n", len ); - break; - - case op_offset: - - STRNCAT( buf, "\t\t\n", len ); - - len -= format_seg( op, buf, len, xml_syntax ); - - STRNCAT( buf, "\t\t\t
\n", - op->data.sdword, len ); - STRNCAT( buf, "\t\t\n", len ); - break; - - case op_unused: - case op_unknown: - /* return 0-truncated buffer */ - break; - } - - return( strlen( buf ) ); -} - -static int format_operand_raw( x86_op_t *op, x86_insn_t *insn, char *buf, - int len){ - - char str[MAX_OP_RAW_STRING]; - const char *datatype = get_operand_datatype_str(op); - - switch (op->type) { - case op_register: - - get_operand_regtype_str( op->data.reg.type, str, - sizeof str ); - - STRNCAT( buf, "reg|", len ); - STRNCATF( buf, "%s|", datatype, len ); - STRNCATF( buf, "%s:", op->data.reg.name, len ); - STRNCATF( buf, "%s:", str, len ); - STRNCATF( buf, "%d|", op->data.reg.size, len ); - break; - - case op_immediate: - - get_operand_data_str( op, str, sizeof str ); - - STRNCAT( buf, "immediate|", len ); - STRNCATF( buf, "%s|", datatype, len ); - STRNCATF( buf, "%s|", str, len ); - break; - - case op_relative_near: - /* NOTE: in raw format, we print the - * relative offset, not the actual - * address of the jump target */ - - STRNCAT( buf, "relative|", len ); - STRNCATF( buf, "%s|", datatype, len ); - STRNCATF( buf, "%" PRId8 "|", op->data.sbyte, len ); - break; - - case op_relative_far: - - STRNCAT( buf, "relative|", len ); - STRNCATF( buf, "%s|", datatype, len ); - - if (op->datatype == op_word) { - STRNCATF( buf, "%" PRId16 "|", op->data.sword, len); - break; - } else { - STRNCATF( buf, "%" PRId32 "|", op->data.sdword, len ); - } - break; - - case op_absolute: - - STRNCAT( buf, "absolute_address|", len ); - STRNCATF( buf, "%s|", datatype, len ); - - STRNCATF( buf, "$0x%04" PRIX16 ":", op->data.absolute.segment, - len ); - if (op->datatype == op_descr16) { - STRNCATF( buf, "0x%04" PRIX16 "|", - op->data.absolute.offset.off16, len ); - } else { - STRNCATF( buf, "0x%08" PRIX32 "|", - op->data.absolute.offset.off32, len ); - } - - break; - - case op_expression: - - STRNCAT( buf, "address_expression|", len ); - STRNCATF( buf, "%s|", datatype, len ); - - len -= format_seg( op, buf, len, native_syntax ); - len -= format_expr( &op->data.expression, buf, len, - raw_syntax ); - - STRNCAT( buf, "|", len ); - break; - - case op_offset: - - STRNCAT( buf, "segment_offset|", len ); - STRNCATF( buf, "%s|", datatype, len ); - - len -= format_seg( op, buf, len, xml_syntax ); - - STRNCATF( buf, "%08" PRIX32 "|", op->data.sdword, len ); - break; - - case op_unused: - case op_unknown: - /* return 0-truncated buffer */ - break; - } - - return( strlen( buf ) ); -} - -int x86_format_operand( x86_op_t *op, char *buf, int len, - enum x86_asm_format format ){ - x86_insn_t *insn; - - if ( ! op || ! buf || len < 1 ) { - return(0); - } - - /* insn is stored in x86_op_t since .21-pre3 */ - insn = (x86_insn_t *) op->insn; - - memset( buf, 0, len ); - - switch ( format ) { - case att_syntax: - return format_operand_att( op, insn, buf, len ); - case xml_syntax: - return format_operand_xml( op, insn, buf, len ); - case raw_syntax: - return format_operand_raw( op, insn, buf, len ); - case native_syntax: - case intel_syntax: - default: - return format_operand_native( op, insn, buf, len ); - } -} - -#define is_imm_jmp(op) (op->type == op_absolute || \ - op->type == op_immediate || \ - op->type == op_offset) -#define is_memory_op(op) (op->type == op_absolute || \ - op->type == op_expression || \ - op->type == op_offset) - -static int format_att_mnemonic( x86_insn_t *insn, char *buf, int len) { - int size = 0; - const char *suffix; - - if (! insn || ! buf || ! len ) - return(0); - - memset( buf, 0, len ); - - /* do long jump/call prefix */ - if ( insn->type == insn_jmp || insn->type == insn_call ) { - if (! is_imm_jmp( x86_operand_1st(insn) ) || - (x86_operand_1st(insn))->datatype != op_byte ) { - /* far jump/call, use "l" prefix */ - STRNCAT( buf, "l", len ); - } - STRNCAT( buf, insn->mnemonic, len ); - - return ( strlen( buf ) ); - } - - /* do mnemonic */ - STRNCAT( buf, insn->mnemonic, len ); - - /* do suffixes for memory operands */ - if (!(insn->note & insn_note_nosuffix) && - (insn->group == insn_arithmetic || - insn->group == insn_logic || - insn->group == insn_move || - insn->group == insn_stack || - insn->group == insn_string || - insn->group == insn_comparison || - insn->type == insn_in || - insn->type == insn_out - )) { - if ( x86_operand_count( insn, op_explicit ) > 0 && - is_memory_op( x86_operand_1st(insn) ) ){ - size = x86_operand_size( x86_operand_1st( insn ) ); - } else if ( x86_operand_count( insn, op_explicit ) > 1 && - is_memory_op( x86_operand_2nd(insn) ) ){ - size = x86_operand_size( x86_operand_2nd( insn ) ); - } - } - - if ( size == 1 ) suffix = "b"; - else if ( size == 2 ) suffix = "w"; - else if ( size == 4 ) suffix = "l"; - else if ( size == 8 ) suffix = "q"; - else suffix = ""; - - STRNCAT( buf, suffix, len ); - return ( strlen( buf ) ); -} - -int x86_format_mnemonic(x86_insn_t *insn, char *buf, int len, - enum x86_asm_format format){ - char str[MAX_OP_STRING]; - - memset( buf, 0, len ); - STRNCAT( buf, insn->prefix_string, len ); - if ( format == att_syntax ) { - format_att_mnemonic( insn, str, sizeof str ); - STRNCAT( buf, str, len ); - } else { - STRNCAT( buf, insn->mnemonic, len ); - } - - return( strlen( buf ) ); -} - -struct op_string { char *buf; size_t len; }; - -static void format_op_raw( x86_op_t *op, x86_insn_t *insn, void *arg ) { - struct op_string * opstr = (struct op_string *) arg; - - format_operand_raw(op, insn, opstr->buf, opstr->len); -} - -static int format_insn_note(x86_insn_t *insn, char *buf, int len){ - char note[32] = {0}; - int len_orig = len, note_len = 32; - - if ( insn->note & insn_note_ring0 ) { - STRNCATF( note, "%s", "Ring0 ", note_len ); - } - if ( insn->note & insn_note_smm ) { - STRNCATF( note, "%s", "SMM ", note_len ); - } - if ( insn->note & insn_note_serial ) { - STRNCATF(note, "%s", "Serialize ", note_len ); - } - STRNCATF( buf, "%s|", note, len ); - - return( len_orig - len ); -} - -static int format_raw_insn( x86_insn_t *insn, char *buf, int len ){ - struct op_string opstr = { buf, len }; - int i; - - /* RAW style: - * ADDRESS|OFFSET|SIZE|BYTES| - * PREFIX|PREFIX_STRING|GROUP|TYPE|NOTES| - * MNEMONIC|CPU|ISA|FLAGS_SET|FLAGS_TESTED| - * STACK_MOD|STACK_MOD_VAL - * [|OP_TYPE|OP_DATATYPE|OP_ACCESS|OP_FLAGS|OP]* - * - * Register values are encoded as: - * NAME:TYPE:SIZE - * - * Effective addresses are encoded as: - * disp(base_reg,index_reg,scale) - */ - STRNCATF( buf, "0x%08" PRIX32 "|", insn->addr , len ); - STRNCATF( buf, "0x%08" PRIX32 "|", insn->offset, len ); - STRNCATF( buf, "%d|" , insn->size , len ); - - /* print bytes */ - for ( i = 0; i < insn->size; i++ ) { - STRNCATF( buf, "%02X ", insn->bytes[i], len ); - } - STRNCAT( buf, "|", len ); - - len -= format_insn_prefix_str( insn->prefix, buf, len ); - STRNCATF( buf, "|%s|", insn->prefix_string , len ); - STRNCATF( buf, "%s|", get_insn_group_str( insn->group ), len ); - STRNCATF( buf, "%s|", get_insn_type_str( insn->type ) , len ); - STRNCATF( buf, "%s|", insn->mnemonic , len ); - STRNCATF( buf, "%s|", get_insn_cpu_str( insn->cpu ) , len ); - STRNCATF( buf, "%s|", get_insn_isa_str( insn->isa ) , len ); - - /* insn note */ - len -= format_insn_note( insn, buf, len ); - - len -= format_insn_eflags_str( insn->flags_set, buf, len ); - STRNCAT( buf, "|", len ); - len -= format_insn_eflags_str( insn->flags_tested, buf, len ); - STRNCAT( buf, "|", len ); - STRNCATF( buf, "%d|", insn->stack_mod, len ); - STRNCATF( buf, "%" PRId32 "|", insn->stack_mod_val, len ); - - opstr.len = len; - x86_operand_foreach( insn, format_op_raw, &opstr, op_any ); - - return( strlen (buf) ); -} - -static int format_xml_insn( x86_insn_t *insn, char *buf, int len ) { - char str[MAX_OP_XML_STRING]; - int i; - - STRNCAT( buf, "\n", len ); - - STRNCATF( buf, "\t
addr, len ); - STRNCATF( buf, "offset=\"0x%08" PRIX32 "\" ", insn->offset, len ); - STRNCATF( buf, "size=%d bytes=\"", insn->size, len ); - - for ( i = 0; i < insn->size; i++ ) { - STRNCATF( buf, "%02X ", insn->bytes[i], len ); - } - STRNCAT( buf, "\"/>\n", len ); - - STRNCAT( buf, "\tprefix, buf, len ); - STRNCATF( buf, "\" string=\"%s\"/>\n", insn->prefix_string, len ); - - STRNCATF( buf, "\tgroup), len ); - STRNCATF( buf, "type=\"%s\" ", get_insn_type_str (insn->type), len ); - STRNCATF( buf, "string=\"%s\"/>\n", insn->mnemonic, len ); - - STRNCAT( buf, "\t\n", len ); - STRNCAT( buf, "\t\tflags_set, buf, len ); - STRNCAT( buf, "\"/>\n\t\n", len ); - - - STRNCAT( buf, "\t\n", len ); - STRNCAT( buf, "\t\tflags_tested, buf, len ); - STRNCAT( buf, "\"/>\n\t\n", len ); - - if ( x86_operand_1st( insn ) ) { - x86_format_operand( x86_operand_1st(insn), str, - sizeof str, xml_syntax); - STRNCAT( buf, "\t\n", len ); - STRNCAT( buf, str, len ); - STRNCAT( buf, "\t\n", len ); - } - - if ( x86_operand_2nd( insn ) ) { - x86_format_operand( x86_operand_2nd( insn ), str, - sizeof str, xml_syntax); - STRNCAT( buf, "\t\n", len ); - STRNCAT( buf, str, len ); - STRNCAT( buf, "\t\n", len ); - } - - if ( x86_operand_3rd( insn ) ) { - x86_format_operand( x86_operand_3rd(insn), str, - sizeof str, xml_syntax); - STRNCAT( buf, "\t\n", len ); - STRNCAT( buf, str, len ); - STRNCAT( buf, "\t\n", len ); - } - - STRNCAT( buf, "\n", len ); - - return strlen (buf); -} - -int x86_format_header( char *buf, int len, enum x86_asm_format format ) { - switch (format) { - case att_syntax: - snprintf( buf, len, "MNEMONIC\tSRC, DEST, IMM" ); - break; - case intel_syntax: - snprintf( buf, len, "MNEMONIC\tDEST, SRC, IMM" ); - break; - case native_syntax: - snprintf( buf, len, "ADDRESS\tBYTES\tMNEMONIC\t" - "DEST\tSRC\tIMM" ); - break; - case raw_syntax: - snprintf( buf, len, "ADDRESS|OFFSET|SIZE|BYTES|" - "PREFIX|PREFIX_STRING|GROUP|TYPE|NOTES|" - "MNEMONIC|CPU|ISA|FLAGS_SET|FLAGS_TESTED|" - "STACK_MOD|STACK_MOD_VAL" - "[|OP_TYPE|OP_DATATYPE|OP_ACCESS|OP_FLAGS|OP]*" - ); - break; - case xml_syntax: - snprintf( buf, len, - "" - "
" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "
" - "" - "" - "" - "
" - "" - "" - "" - ); - break; - case unknown_syntax: - if ( len ) { - buf[0] = '\0'; - } - break; - } - - return( strlen(buf) ); -} - -int x86_format_insn( x86_insn_t *insn, char *buf, int len, - enum x86_asm_format format ){ - char str[MAX_OP_STRING]; - x86_op_t *src, *dst; - int i; - - memset(buf, 0, len); - if ( format == intel_syntax ) { - /* INTEL STYLE: mnemonic dest, src, imm */ - STRNCAT( buf, insn->prefix_string, len ); - STRNCAT( buf, insn->mnemonic, len ); - STRNCAT( buf, "\t", len ); - - /* dest */ - if ( (dst = x86_operand_1st( insn )) && !(dst->flags & op_implied) ) { - x86_format_operand( dst, str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - } - - /* src */ - if ( (src = x86_operand_2nd( insn )) ) { - if ( !(dst->flags & op_implied) ) { - STRNCAT( buf, ", ", len ); - } - x86_format_operand( src, str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - } - - /* imm */ - if ( x86_operand_3rd( insn )) { - STRNCAT( buf, ", ", len ); - x86_format_operand( x86_operand_3rd( insn ), - str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - } - - } else if ( format == att_syntax ) { - /* ATT STYLE: mnemonic src, dest, imm */ - STRNCAT( buf, insn->prefix_string, len ); - format_att_mnemonic(insn, str, MAX_OP_STRING); - STRNCATF( buf, "%s\t", str, len); - - - /* not sure which is correct? sometimes GNU as requires - * an imm as the first operand, sometimes as the third... */ - /* imm */ - if ( x86_operand_3rd( insn ) ) { - x86_format_operand(x86_operand_3rd( insn ), - str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - /* there is always 'dest' operand if there is 'src' */ - STRNCAT( buf, ", ", len ); - } - - if ( (insn->note & insn_note_nonswap ) == 0 ) { - /* regular AT&T style swap */ - src = x86_operand_2nd( insn ); - dst = x86_operand_1st( insn ); - } - else { - /* special-case instructions */ - src = x86_operand_1st( insn ); - dst = x86_operand_2nd( insn ); - } - - /* src */ - if ( src ) { - x86_format_operand(src, str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - /* there is always 'dest' operand if there is 'src' */ - if ( dst && !(dst->flags & op_implied) ) { - STRNCAT( buf, ", ", len ); - } - } - - /* dest */ - if ( dst && !(dst->flags & op_implied) ) { - x86_format_operand( dst, str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - } - - - } else if ( format == raw_syntax ) { - format_raw_insn( insn, buf, len ); - } else if ( format == xml_syntax ) { - format_xml_insn( insn, buf, len ); - } else { /* default to native */ - /* NATIVE style: RVA\tBYTES\tMNEMONIC\tOPERANDS */ - /* print address */ - STRNCATF( buf, "%08" PRIX32 "\t", insn->addr, len ); - - /* print bytes */ - for ( i = 0; i < insn->size; i++ ) { - STRNCATF( buf, "%02X ", insn->bytes[i], len ); - } - - STRNCAT( buf, "\t", len ); - - /* print mnemonic */ - STRNCAT( buf, insn->prefix_string, len ); - STRNCAT( buf, insn->mnemonic, len ); - STRNCAT( buf, "\t", len ); - - /* print operands */ - /* dest */ - if ( x86_operand_1st( insn ) ) { - x86_format_operand( x86_operand_1st( insn ), - str, MAX_OP_STRING, format); - STRNCATF( buf, "%s\t", str, len ); - } - - /* src */ - if ( x86_operand_2nd( insn ) ) { - x86_format_operand(x86_operand_2nd( insn ), - str, MAX_OP_STRING, format); - STRNCATF( buf, "%s\t", str, len ); - } - - /* imm */ - if ( x86_operand_3rd( insn )) { - x86_format_operand( x86_operand_3rd( insn ), - str, MAX_OP_STRING, format); - STRNCAT( buf, str, len ); - } - } - - return( strlen( buf ) ); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.c deleted file mode 100644 index cd59bfc9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "qword.h" -#include "x86_imm.h" - -#include - -unsigned int x86_imm_signsized( unsigned char * buf, size_t buf_len, - void *dest, unsigned int size ) { - signed char *cp = (signed char *) dest; - signed short *sp = (signed short *) dest; - int32_t *lp = (int32_t *) dest; - qword_t *qp = (qword_t *) dest; - - if ( size > buf_len ) { - return 0; - } - - /* Copy 'size' bytes from *buf to *op - * return number of bytes copied */ - switch (size) { - case 1: /* BYTE */ - *cp = *((signed char *) buf); - break; - case 2: /* WORD */ - *sp = *((signed short *) buf); - break; - case 6: - case 8: /* QWORD */ - *qp = *((qword_t *) buf); - break; - case 4: /* DWORD */ - default: - *lp = *((int32_t *) buf); - break; - } - return (size); -} - -unsigned int x86_imm_sized( unsigned char * buf, size_t buf_len, void *dest, - unsigned int size ) { - unsigned char *cp = (unsigned char *) dest; - unsigned short *sp = (unsigned short *) dest; - uint32_t *lp = (uint32_t *) dest; - qword_t *qp = (qword_t *) dest; - - if ( size > buf_len ) { - return 0; - } - - /* Copy 'size' bytes from *buf to *op - * return number of bytes copied */ - switch (size) { - case 1: /* BYTE */ - *cp = *((unsigned char *) buf); - break; - case 2: /* WORD */ - *sp = *((unsigned short *) buf); - break; - case 6: - case 8: /* QWORD */ - *qp = *((qword_t *) buf); - break; - case 4: /* DWORD */ - default: - *lp = *((uint32_t *) buf); - break; - } - - return (size); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.h deleted file mode 100644 index fa35ff2d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_imm.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef x86_IMM_H -#define x86_IMM_H - -#include "./qword.h" -#include - -#ifdef WIN32 -#include -#endif - -/* these are in the global x86 namespace but are not a part of the - * official API */ -unsigned int x86_imm_sized( unsigned char *buf, size_t buf_len, void *dest, - unsigned int size ); - -unsigned int x86_imm_signsized( unsigned char *buf, size_t buf_len, void *dest, - unsigned int size ); -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_insn.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_insn.c deleted file mode 100644 index 5649b89f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_insn.c +++ /dev/null @@ -1,182 +0,0 @@ -#include -#include - -#include "libdis.h" - -#ifdef _MSC_VER - #define snprintf _snprintf - #define inline __inline -#endif - -int x86_insn_is_valid( x86_insn_t *insn ) { - if ( insn && insn->type != insn_invalid && insn->size > 0 ) { - return 1; - } - - return 0; -} - -uint32_t x86_get_address( x86_insn_t *insn ) { - x86_oplist_t *op_lst; - if (! insn || ! insn->operands ) { - return 0; - } - - for (op_lst = insn->operands; op_lst; op_lst = op_lst->next ) { - if ( op_lst->op.type == op_offset ) { - return op_lst->op.data.offset; - } else if ( op_lst->op.type == op_absolute ) { - if ( op_lst->op.datatype == op_descr16 ) { - return (uint32_t) - op_lst->op.data.absolute.offset.off16; - } - return op_lst->op.data.absolute.offset.off32; - } - } - - return 0; -} - -int32_t x86_get_rel_offset( x86_insn_t *insn ) { - x86_oplist_t *op_lst; - if (! insn || ! insn->operands ) { - return 0; - } - - for (op_lst = insn->operands; op_lst; op_lst = op_lst->next ) { - if ( op_lst->op.type == op_relative_near ) { - return (int32_t) op_lst->op.data.relative_near; - } else if ( op_lst->op.type == op_relative_far ) { - return op_lst->op.data.relative_far; - } - } - - return 0; -} - -x86_op_t * x86_get_branch_target( x86_insn_t *insn ) { - x86_oplist_t *op_lst; - if (! insn || ! insn->operands ) { - return NULL; - } - - for (op_lst = insn->operands; op_lst; op_lst = op_lst->next ) { - if ( op_lst->op.access & op_execute ) { - return &(op_lst->op); - } - } - - return NULL; -} -x86_op_t * x86_get_imm( x86_insn_t *insn ) { - x86_oplist_t *op_lst; - if (! insn || ! insn->operands ) { - return NULL; - } - - for (op_lst = insn->operands; op_lst; op_lst = op_lst->next ) { - if ( op_lst->op.type == op_immediate ) { - return &(op_lst->op); - } - } - - return NULL; -} - -#define IS_PROPER_IMM( x ) \ - x->op.type == op_immediate && ! (x->op.flags & op_hardcode) - - -/* if there is an immediate value in the instruction, return a pointer to - * it */ -unsigned char * x86_get_raw_imm( x86_insn_t *insn ) { - int size, offset; - x86_op_t *op = NULL; - - if (! insn || ! insn->operands ) { - return(NULL); - } - - /* a bit inelegant, but oh well... */ - if ( IS_PROPER_IMM( insn->operands ) ) { - op = &insn->operands->op; - } else if ( insn->operands->next ) { - if ( IS_PROPER_IMM( insn->operands->next ) ) { - op = &insn->operands->next->op; - } else if ( insn->operands->next->next && - IS_PROPER_IMM( insn->operands->next->next ) ) { - op = &insn->operands->next->next->op; - } - } - - if (! op ) { - return( NULL ); - } - - /* immediate data is at the end of the insn */ - size = x86_operand_size( op ); - offset = insn->size - size; - return( &insn->bytes[offset] ); -} - - -unsigned int x86_operand_size( x86_op_t *op ) { - switch (op->datatype ) { - case op_byte: return 1; - case op_word: return 2; - case op_dword: return 4; - case op_qword: return 8; - case op_dqword: return 16; - case op_sreal: return 4; - case op_dreal: return 8; - case op_extreal: return 10; - case op_bcd: return 10; - case op_ssimd: return 16; - case op_dsimd: return 16; - case op_sssimd: return 4; - case op_sdsimd: return 8; - case op_descr32: return 6; - case op_descr16: return 4; - case op_pdescr32: return 6; - case op_pdescr16: return 6; - case op_bounds16: return 4; - case op_bounds32: return 8; - case op_fpuenv16: return 14; - case op_fpuenv32: return 28; - case op_fpustate16: return 94; - case op_fpustate32: return 108; - case op_fpregset: return 512; - case op_fpreg: return 10; - case op_none: return 0; - } - return(4); /* default size */ -} - -void x86_set_insn_addr( x86_insn_t *insn, uint32_t addr ) { - if ( insn ) insn->addr = addr; -} - -void x86_set_insn_offset( x86_insn_t *insn, unsigned int offset ){ - if ( insn ) insn->offset = offset; -} - -void x86_set_insn_function( x86_insn_t *insn, void * func ){ - if ( insn ) insn->function = func; -} - -void x86_set_insn_block( x86_insn_t *insn, void * block ){ - if ( insn ) insn->block = block; -} - -void x86_tag_insn( x86_insn_t *insn ){ - if ( insn ) insn->tag = 1; -} - -void x86_untag_insn( x86_insn_t *insn ){ - if ( insn ) insn->tag = 0; -} - -int x86_insn_is_tagged( x86_insn_t *insn ){ - return insn->tag; -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_misc.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_misc.c deleted file mode 100644 index 3d2dd0ae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_misc.c +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include - -#include "libdis.h" -#include "ia32_insn.h" -#include "ia32_reg.h" /* for ia32_reg wrapper */ -#include "ia32_settings.h" -extern ia32_settings_t ia32_settings; - -#ifdef _MSC_VER - #define snprintf _snprintf - #define inline __inline -#endif - - -/* =========================================================== INIT/TERM */ -static DISASM_REPORTER __x86_reporter_func = NULL; -static void * __x86_reporter_arg = NULL; - -int x86_init( enum x86_options options, DISASM_REPORTER reporter, void * arg ) -{ - ia32_settings.options = options; - __x86_reporter_func = reporter; - __x86_reporter_arg = arg; - - return 1; -} - -void x86_set_reporter( DISASM_REPORTER reporter, void * arg ) { - __x86_reporter_func = reporter; - __x86_reporter_arg = arg; -} - -void x86_set_options( enum x86_options options ){ - ia32_settings.options = options; -} - -enum x86_options x86_get_options( void ) { - return ia32_settings.options; -} - -int x86_cleanup( void ) -{ - return 1; -} - -/* =========================================================== ERRORS */ -void x86_report_error( enum x86_report_codes code, void *data ) { - if ( __x86_reporter_func ) { - (*__x86_reporter_func)(code, data, __x86_reporter_arg); - } -} - - -/* =========================================================== MISC */ -unsigned int x86_endian(void) { return ia32_settings.endian; } -unsigned int x86_addr_size(void) { return ia32_settings.sz_addr; } -unsigned int x86_op_size(void) { return ia32_settings.sz_oper; } -unsigned int x86_word_size(void) { return ia32_settings.sz_word; } -unsigned int x86_max_insn_size(void) { return ia32_settings.max_insn; } -unsigned int x86_sp_reg(void) { return ia32_settings.id_sp_reg; } -unsigned int x86_fp_reg(void) { return ia32_settings.id_fp_reg; } -unsigned int x86_ip_reg(void) { return ia32_settings.id_ip_reg; } -unsigned int x86_flag_reg(void) { return ia32_settings.id_flag_reg; } - -/* wrapper function to hide the IA32 register fn */ -void x86_reg_from_id( unsigned int id, x86_reg_t * reg ) { - ia32_handle_register( reg, id ); - return; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.c b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.c deleted file mode 100644 index 95409e06..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.c +++ /dev/null @@ -1,191 +0,0 @@ -#include -#include "libdis.h" - - -static void x86_oplist_append( x86_insn_t *insn, x86_oplist_t *op ) { - x86_oplist_t *list; - - if (! insn ) { - return; - } - - list = insn->operands; - if (! list ) { - insn->operand_count = 1; - /* Note that we have no way of knowing if this is an - * exlicit operand or not, since the caller fills - * the x86_op_t after we return. We increase the - * explicit count automatically, and ia32_insn_implicit_ops - * decrements it */ - insn->explicit_count = 1; - insn->operands = op; - return; - } - - /* get to end of list */ - for ( ; list->next; list = list->next ) - ; - - insn->operand_count = insn->operand_count + 1; - insn->explicit_count = insn->explicit_count + 1; - list->next = op; - - return; -} - -x86_op_t * x86_operand_new( x86_insn_t *insn ) { - x86_oplist_t *op; - - if (! insn ) { - return(NULL); - } - op = calloc( sizeof(x86_oplist_t), 1 ); - op->op.insn = insn; - x86_oplist_append( insn, op ); - return( &(op->op) ); -} - -void x86_oplist_free( x86_insn_t *insn ) { - x86_oplist_t *op, *list; - - if (! insn ) { - return; - } - - for ( list = insn->operands; list; ) { - op = list; - list = list->next; - free(op); - } - - insn->operands = NULL; - insn->operand_count = 0; - insn->explicit_count = 0; - - return; -} - -/* ================================================== LIBDISASM API */ -/* these could probably just be #defines, but that means exposing the - enum... yet one more confusing thing in the API */ -int x86_operand_foreach( x86_insn_t *insn, x86_operand_fn func, void *arg, - enum x86_op_foreach_type type ){ - x86_oplist_t *list; - char explicit = 1, implicit = 1; - - if (! insn || ! func ) { - return 0; - } - - /* note: explicit and implicit can be ORed together to - * allow an "all" limited by access type, even though the - * user is stupid to do this since it is default behavior :) */ - if ( (type & op_explicit) && ! (type & op_implicit) ) { - implicit = 0; - } - if ( (type & op_implicit) && ! (type & op_explicit) ) { - explicit = 0; - } - - type = type & 0x0F; /* mask out explicit/implicit operands */ - - for ( list = insn->operands; list; list = list->next ) { - if (! implicit && (list->op.flags & op_implied) ) { - /* operand is implicit */ - continue; - } - - if (! explicit && ! (list->op.flags & op_implied) ) { - /* operand is not implicit */ - continue; - } - - switch ( type ) { - case op_any: - break; - case op_dest: - if (! (list->op.access & op_write) ) { - continue; - } - break; - case op_src: - if (! (list->op.access & op_read) ) { - continue; - } - break; - case op_ro: - if (! (list->op.access & op_read) || - (list->op.access & op_write ) ) { - continue; - } - break; - case op_wo: - if (! (list->op.access & op_write) || - (list->op.access & op_read ) ) { - continue; - } - break; - case op_xo: - if (! (list->op.access & op_execute) ) { - continue; - } - break; - case op_rw: - if (! (list->op.access & op_write) || - ! (list->op.access & op_read ) ) { - continue; - } - break; - case op_implicit: case op_explicit: /* make gcc happy */ - break; - } - /* any non-continue ends up here: invoke the callback */ - (*func)( &list->op, insn, arg ); - } - - return 1; -} - -static void count_operand( x86_op_t *op, x86_insn_t *insn, void *arg ) { - size_t * count = (size_t *) arg; - *count = *count + 1; -} - -size_t x86_operand_count( x86_insn_t *insn, enum x86_op_foreach_type type ) { - size_t count = 0; - - /* save us a list traversal for common counts... */ - if ( type == op_any ) { - return insn->operand_count; - } else if ( type == op_explicit ) { - return insn->explicit_count; - } - - x86_operand_foreach( insn, count_operand, &count, type ); - return count; -} - -/* accessor functions */ -x86_op_t * x86_operand_1st( x86_insn_t *insn ) { - if (! insn->explicit_count ) { - return NULL; - } - - return &(insn->operands->op); -} - -x86_op_t * x86_operand_2nd( x86_insn_t *insn ) { - if ( insn->explicit_count < 2 ) { - return NULL; - } - - return &(insn->operands->next->op); -} - -x86_op_t * x86_operand_3rd( x86_insn_t *insn ) { - if ( insn->explicit_count < 3 ) { - return NULL; - } - - return &(insn->operands->next->next->op); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.h deleted file mode 100644 index 53668658..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/libdisasm/x86_operand_list.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef X86_OPERAND_LIST_H -#define X86_OPERAND_LIST_H -#include "libdis.h" - - -x86_op_t * x86_operand_new( x86_insn_t *insn ); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags.h deleted file mode 100644 index 08a3b637..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags.h +++ /dev/null @@ -1,533 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Author: Ray Sidney -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// or defines a command line flag or wants to parse command line flags -// or print a program usage message (which will include information about -// flags). Executive summary, in the form of an example foo.cc file: -// -// #include "foo.h" // foo.h has a line "DECLARE_int32(start);" -// -// DEFINE_int32(end, 1000, "The last record to read"); -// DECLARE_bool(verbose); // some other file has a DEFINE_bool(verbose, ...) -// -// void MyFunc() { -// if (FLAGS_verbose) printf("Records %d-%d\n", FLAGS_start, FLAGS_end); -// } -// -// Then, at the command-line: -// ./foo --noverbose --start=5 --end=100 -// -// For more details, see -// doc/gflags.html -// -// --- A note about thread-safety: -// -// We describe many functions in this routine as being thread-hostile, -// thread-compatible, or thread-safe. Here are the meanings we use: -// -// thread-safe: it is safe for multiple threads to call this routine -// (or, when referring to a class, methods of this class) -// concurrently. -// thread-hostile: it is not safe for multiple threads to call this -// routine (or methods of this class) concurrently. In gflags, -// most thread-hostile routines are intended to be called early in, -// or even before, main() -- that is, before threads are spawned. -// thread-compatible: it is safe for multiple threads to read from -// this variable (when applied to variables), or to call const -// methods of this class (when applied to classes), as long as no -// other thread is writing to the variable or calling non-const -// methods of this class. - -#ifndef GOOGLE_GFLAGS_H_ -#define GOOGLE_GFLAGS_H_ - -#include -#include - -// We care a lot about number of bits things take up. Unfortunately, -// systems define their bit-specific ints in a lot of different ways. -// We use our own way, and have a typedef to get there. -// Note: these commands below may look like "#if 1" or "#if 0", but -// that's because they were constructed that way at ./configure time. -// Look at gflags.h.in to see how they're calculated (based on your config). -#if 1 -#include // the normal place uint16_t is defined -#endif -#if 1 -#include // the normal place u_int16_t is defined -#endif -#if 1 -#include // a third place for uint16_t or u_int16_t -#endif - -namespace google { - -#if 1 // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif 1 // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif 0 // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif - -// -------------------------------------------------------------------- -// To actually define a flag in a file, use DEFINE_bool, -// DEFINE_string, etc. at the bottom of this file. You may also find -// it useful to register a validator with the flag. This ensures that -// when the flag is parsed from the commandline, or is later set via -// SetCommandLineOption, we call the validation function. -// -// The validation function should return true if the flag value is valid, and -// false otherwise. If the function returns false for the new setting of the -// flag, the flag will retain its current value. If it returns false for the -// default value, InitGoogle will die. -// -// This function is safe to call at global construct time (as in the -// example below). -// -// Example use: -// static bool ValidatePort(const char* flagname, int32 value) { -// if (value > 0 && value < 32768) // value is ok -// return true; -// printf("Invalid value for --%s: %d\n", flagname, (int)value); -// return false; -// } -// DEFINE_int32(port, 0, "What port to listen on"); -// static bool dummy = RegisterFlagValidator(&FLAGS_port, &ValidatePort); - -// Returns true if successfully registered, false if not (because the -// first argument doesn't point to a command-line flag, or because a -// validator is already registered for this flag). -bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)); -bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)); -bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)); -bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)); -bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)); -bool RegisterFlagValidator(const std::string* flag, - bool (*validate_fn)(const char*, const std::string&)); - - -// -------------------------------------------------------------------- -// These methods are the best way to get access to info about the -// list of commandline flags. Note that these routines are pretty slow. -// GetAllFlags: mostly-complete info about the list, sorted by file. -// ShowUsageWithFlags: pretty-prints the list to stdout (what --help does) -// ShowUsageWithFlagsRestrict: limit to filenames with restrict as a substr -// -// In addition to accessing flags, you can also access argv[0] (the program -// name) and argv (the entire commandline), which we sock away a copy of. -// These variables are static, so you should only set them once. - -struct CommandLineFlagInfo { - std::string name; // the name of the flag - std::string type; // the type of the flag: int32, etc - std::string description; // the "help text" associated with the flag - std::string current_value; // the current value, as a string - std::string default_value; // the default value, as a string - std::string filename; // 'cleaned' version of filename holding the flag - bool has_validator_fn; // true if RegisterFlagValidator called on flag - bool is_default; // true if the flag has default value -}; - -extern void GetAllFlags(std::vector* OUTPUT); -// These two are actually defined in commandlineflags_reporting.cc. -extern void ShowUsageWithFlags(const char *argv0); // what --help does -extern void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict); - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -extern std::string DescribeOneFlag(const CommandLineFlagInfo& flag); - -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetArgv(int argc, const char** argv); -// The following functions are thread-safe as long as SetArgv() is -// only called before any threads start. -extern const std::vector& GetArgvs(); // all of argv as a vector -extern const char* GetArgv(); // all of argv as a string -extern const char* GetArgv0(); // only argv0 -extern uint32 GetArgvSum(); // simple checksum of argv -extern const char* ProgramInvocationName(); // argv0, or "UNKNOWN" if not set -extern const char* ProgramInvocationShortName(); // basename(argv0) -// ProgramUsage() is thread-safe as long as SetUsageMessage() is only -// called before any threads start. -extern const char* ProgramUsage(); // string set by SetUsageMessage() - - -// -------------------------------------------------------------------- -// Normally you access commandline flags by just saying "if (FLAGS_foo)" -// or whatever, and set them by calling "FLAGS_foo = bar" (or, more -// commonly, via the DEFINE_foo macro). But if you need a bit more -// control, we have programmatic ways to get/set the flags as well. -// These programmatic ways to access flags are thread-safe, but direct -// access is only thread-compatible. - -// Return true iff the flagname was found. -// OUTPUT is set to the flag's value, or unchanged if we return false. -extern bool GetCommandLineOption(const char* name, std::string* OUTPUT); - -// Return true iff the flagname was found. OUTPUT is set to the flag's -// CommandLineFlagInfo or unchanged if we return false. -extern bool GetCommandLineFlagInfo(const char* name, - CommandLineFlagInfo* OUTPUT); - -// Return the CommandLineFlagInfo of the flagname. exit() if name not found. -// Example usage, to check if a flag's value is currently the default value: -// if (GetCommandLineFlagInfoOrDie("foo").is_default) ... -extern CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name); - -enum FlagSettingMode { - // update the flag's value (can call this multiple times). - SET_FLAGS_VALUE, - // update the flag's value, but *only if* it has not yet been updated - // with SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef". - SET_FLAG_IF_DEFAULT, - // set the flag's default value to this. If the flag has not yet updated - // yet (via SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef") - // change the flag's current value to the new default value as well. - SET_FLAGS_DEFAULT -}; - -// Set a particular flag ("command line option"). Returns a string -// describing the new value that the option has been set to. The -// return value API is not well-specified, so basically just depend on -// it to be empty if the setting failed for some reason -- the name is -// not a valid flag name, or the value is not a valid value -- and -// non-empty else. - -// SetCommandLineOption uses set_mode == SET_FLAGS_VALUE (the common case) -extern std::string SetCommandLineOption(const char* name, const char* value); -extern std::string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode); - - -// -------------------------------------------------------------------- -// Saves the states (value, default value, whether the user has set -// the flag, registered validators, etc) of all flags, and restores -// them when the FlagSaver is destroyed. This is very useful in -// tests, say, when you want to let your tests change the flags, but -// make sure that they get reverted to the original states when your -// test is complete. -// -// Example usage: -// void TestFoo() { -// FlagSaver s1; -// FLAG_foo = false; -// FLAG_bar = "some value"; -// -// // test happens here. You can return at any time -// // without worrying about restoring the FLAG values. -// } -// -// Note: This class is marked with __attribute__((unused)) because all the -// work is done in the constructor and destructor, so in the standard -// usage example above, the compiler would complain that it's an -// unused variable. -// -// This class is thread-safe. - -class FlagSaver { - public: - FlagSaver(); - ~FlagSaver(); - - private: - class FlagSaverImpl* impl_; // we use pimpl here to keep API steady - - FlagSaver(const FlagSaver&); // no copying! - void operator=(const FlagSaver&); -} __attribute__ ((unused)); - -// -------------------------------------------------------------------- -// Some deprecated or hopefully-soon-to-be-deprecated functions. - -// This is often used for logging. TODO(csilvers): figure out a better way -extern std::string CommandlineFlagsIntoString(); -// Usually where this is used, a FlagSaver should be used instead. -extern bool ReadFlagsFromString(const std::string& flagfilecontents, - const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - -// These let you manually implement --flagfile functionality. -// DEPRECATED. -extern bool AppendFlagsIntoFile(const std::string& filename, const char* prog_name); -extern bool SaveCommandFlags(); // actually defined in google.cc ! -extern bool ReadFromFlagsFile(const std::string& filename, const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - - -// -------------------------------------------------------------------- -// Useful routines for initializing flags from the environment. -// In each case, if 'varname' does not exist in the environment -// return defval. If 'varname' does exist but is not valid -// (e.g., not a number for an int32 flag), abort with an error. -// Otherwise, return the value. NOTE: for booleans, for true use -// 't' or 'T' or 'true' or '1', for false 'f' or 'F' or 'false' or '0'. - -extern bool BoolFromEnv(const char *varname, bool defval); -extern int32 Int32FromEnv(const char *varname, int32 defval); -extern int64 Int64FromEnv(const char *varname, int64 defval); -extern uint64 Uint64FromEnv(const char *varname, uint64 defval); -extern double DoubleFromEnv(const char *varname, double defval); -extern const char *StringFromEnv(const char *varname, const char *defval); - - -// -------------------------------------------------------------------- -// The next two functions parse commandlineflags from main(): - -// Set the "usage" message for this program. For example: -// string usage("This program does nothing. Sample usage:\n"); -// usage += argv[0] + " "; -// SetUsageMessage(usage); -// Do not include commandline flags in the usage: we do that for you! -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetUsageMessage(const std::string& usage); - -// Looks for flags in argv and parses them. Rearranges argv to put -// flags first, or removes them entirely if remove_flags is true. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. -// See top-of-file for more details on this function. -#ifndef SWIG // In swig, use ParseCommandLineFlagsScript() instead. -extern uint32 ParseCommandLineFlags(int *argc, char*** argv, - bool remove_flags); -#endif - - -// Calls to ParseCommandLineNonHelpFlags and then to -// HandleCommandLineHelpFlags can be used instead of a call to -// ParseCommandLineFlags during initialization, in order to allow for -// changing default values for some FLAGS (via -// e.g. SetCommandLineOptionWithMode calls) between the time of -// command line parsing and the time of dumping help information for -// the flags as a result of command line parsing. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. -extern uint32 ParseCommandLineNonHelpFlags(int *argc, char*** argv, - bool remove_flags); -// This is actually defined in commandlineflags_reporting.cc. -// This function is misnamed (it also handles --version, etc.), but -// it's too late to change that now. :-( -extern void HandleCommandLineHelpFlags(); // in commandlineflags_reporting.cc - -// Allow command line reparsing. Disables the error normally -// generated when an unknown flag is found, since it may be found in a -// later parse. Thread-hostile; meant to be called before any threads -// are spawned. -extern void AllowCommandLineReparsing(); - -// Reparse the flags that have not yet been recognized. -// Only flags registered since the last parse will be recognized. -// Any flag value must be provided as part of the argument using "=", -// not as a separate command line argument that follows the flag argument. -// Intended for handling flags from dynamically loaded libraries, -// since their flags are not registered until they are loaded. -extern uint32 ReparseCommandLineNonHelpFlags(); - - -// -------------------------------------------------------------------- -// Now come the command line flag declaration/definition macros that -// will actually be used. They're kind of hairy. A major reason -// for this is initialization: we want people to be able to access -// variables in global constructors and have that not crash, even if -// their global constructor runs before the global constructor here. -// (Obviously, we can't guarantee the flags will have the correct -// default value in that case, but at least accessing them is safe.) -// The only way to do that is have flags point to a static buffer. -// So we make one, using a union to ensure proper alignment, and -// then use placement-new to actually set up the flag with the -// correct default value. In the same vein, we have to worry about -// flag access in global destructors, so FlagRegisterer has to be -// careful never to destroy the flag-values it constructs. -// -// Note that when we define a flag variable FLAGS_, we also -// preemptively define a junk variable, FLAGS_no. This is to -// cause a link-time error if someone tries to define 2 flags with -// names like "logging" and "nologging". We do this because a bool -// flag FLAG can be set from the command line to true with a "-FLAG" -// argument, and to false with a "-noFLAG" argument, and so this can -// potentially avert confusion. -// -// We also put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the current -// namespace. The net result is to force people to use DECLARE to get -// access to a flag, rather than saying "extern bool FLAGS_whatever;" -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, and -// make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. - -class FlagRegisterer { - public: - FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage); -}; - -extern bool FlagsTypeWarn(const char *name); - -// If your application #defines STRIP_FLAG_HELP to a non-zero value -// before #including this file, we remove the help message from the -// binary file. This can reduce the size of the resulting binary -// somewhat, and may also be useful for security reasons. - -extern const char kStrippedFlagHelp[]; - -} - -#ifndef SWIG // In swig, ignore the main flag declarations - -#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0 -// Need this construct to avoid the 'defined but not used' warning. -#define MAYBE_STRIPPED_HELP(txt) (false ? (txt) : kStrippedFlagHelp) -#else -#define MAYBE_STRIPPED_HELP(txt) txt -#endif - -// Each command-line flag has two variables associated with it: one -// with the current value, and one with the default value. However, -// we have a third variable, which is where value is assigned; it's a -// constant. This guarantees that FLAG_##value is initialized at -// static initialization time (e.g. before program-start) rather than -// than global construction time (which is after program-start but -// before main), at least when 'value' is a compile-time constant. We -// use a small trick for the "default value" variable, and call it -// FLAGS_no. This serves the second purpose of assuring a -// compile error if someone tries to define a flag named no -// which is illegal (--foo and --nofoo both affect the "foo" flag). -#define DEFINE_VARIABLE(type, shorttype, name, value, help) \ - namespace fL##shorttype { \ - static const type FLAGS_nono##name = value; \ - type FLAGS_##name = FLAGS_nono##name; \ - type FLAGS_no##name = FLAGS_nono##name; \ - static ::google::FlagRegisterer o_##name( \ - #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \ - &FLAGS_##name, &FLAGS_no##name); \ - } \ - using fL##shorttype::FLAGS_##name - -#define DECLARE_VARIABLE(type, shorttype, name) \ - namespace fL##shorttype { \ - extern type FLAGS_##name; \ - } \ - using fL##shorttype::FLAGS_##name - -// For DEFINE_bool, we want to do the extra check that the passed-in -// value is actually a bool, and not a string or something that can be -// coerced to a bool. These declarations (no definition needed!) will -// help us do that, and never evaluate From, which is important. -// We'll use 'sizeof(IsBool(val))' to distinguish. This code requires -// that the compiler have different sizes for bool & double. Since -// this is not guaranteed by the standard, we check it with a -// compile-time assert (msg[-1] will give a compile-time error). -namespace fLB { -struct CompileAssert {}; -typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ - (sizeof(double) != sizeof(bool)) ? 1 : -1]; -template double IsBoolFlag(const From& from); -bool IsBoolFlag(bool from); -} // namespace fLB - -#define DECLARE_bool(name) DECLARE_VARIABLE(bool,B, name) -#define DEFINE_bool(name,val,txt) \ - namespace fLB { \ - typedef CompileAssert FLAG_##name##_value_is_not_a_bool[ \ - (sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \ - } \ - DEFINE_VARIABLE(bool,B, name, val, txt) - -#define DECLARE_int32(name) DECLARE_VARIABLE(::google::int32,I, name) -#define DEFINE_int32(name,val,txt) DEFINE_VARIABLE(::google::int32,I, name, val, txt) - -#define DECLARE_int64(name) DECLARE_VARIABLE(::google::int64,I64, name) -#define DEFINE_int64(name,val,txt) DEFINE_VARIABLE(::google::int64,I64, name, val, txt) - -#define DECLARE_uint64(name) DECLARE_VARIABLE(::google::uint64,U64, name) -#define DEFINE_uint64(name,val,txt) DEFINE_VARIABLE(::google::uint64,U64, name, val, txt) - -#define DECLARE_double(name) DECLARE_VARIABLE(double,D, name) -#define DEFINE_double(name,val,txt) DEFINE_VARIABLE(double,D, name, val, txt) - -// Strings are trickier, because they're not a POD, so we can't -// construct them at static-initialization time (instead they get -// constructed at global-constructor time, which is much later). To -// try to avoid crashes in that case, we use a char buffer to store -// the string, which we can static-initialize, and then placement-new -// into it later. It's not perfect, but the best we can do. -#define DECLARE_string(name) namespace fLS { extern std::string& FLAGS_##name; } \ - using fLS::FLAGS_##name - -// We need to define a var named FLAGS_no##name so people don't define -// --string and --nostring. And we need a temporary place to put val -// so we don't have to evaluate it twice. Two great needs that go -// great together! -// The weird 'using' + 'extern' inside the fLS namespace is to work around -// an unknown compiler bug/issue with the gcc 4.2.1 on SUSE 10. See -// http://code.google.com/p/google-gflags/issues/detail?id=20 -#define DEFINE_string(name, val, txt) \ - namespace fLS { \ - static union { void* align; char s[sizeof(std::string)]; } s_##name[2]; \ - const std::string* const FLAGS_no##name = new (s_##name[0].s) std::string(val); \ - static ::google::FlagRegisterer o_##name( \ - #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ - s_##name[0].s, new (s_##name[1].s) std::string(*FLAGS_no##name)); \ - extern std::string& FLAGS_##name; \ - using fLS::FLAGS_##name; \ - std::string& FLAGS_##name = *(reinterpret_cast(s_##name[0].s)); \ - } \ - using fLS::FLAGS_##name - -#endif // SWIG - -#endif // GOOGLE_GFLAGS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags_completions.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags_completions.h deleted file mode 100644 index 9d9ce7a5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/include/gflags/gflags_completions.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// Author: Dave Nicponski -// -// Implement helpful bash-style command line flag completions -// -// ** Functional API: -// HandleCommandLineCompletions() should be called early during -// program startup, but after command line flag code has been -// initialized, such as the beginning of HandleCommandLineHelpFlags(). -// It checks the value of the flag --tab_completion_word. If this -// flag is empty, nothing happens here. If it contains a string, -// however, then HandleCommandLineCompletions() will hijack the -// process, attempting to identify the intention behind this -// completion. Regardless of the outcome of this deduction, the -// process will be terminated, similar to --helpshort flag -// handling. -// -// ** Overview of Bash completions: -// Bash can be told to programatically determine completions for the -// current 'cursor word'. It does this by (in this case) invoking a -// command with some additional arguments identifying the command -// being executed, the word being completed, and the previous word -// (if any). Bash then expects a sequence of output lines to be -// printed to stdout. If these lines all contain a common prefix -// longer than the cursor word, bash will replace the cursor word -// with that common prefix, and display nothing. If there isn't such -// a common prefix, bash will display the lines in pages using 'more'. -// -// ** Strategy taken for command line completions: -// If we can deduce either the exact flag intended, or a common flag -// prefix, we'll output exactly that. Otherwise, if information -// must be displayed to the user, we'll take the opportunity to add -// some helpful information beyond just the flag name (specifically, -// we'll include the default flag value and as much of the flag's -// description as can fit on a single terminal line width, as specified -// by the flag --tab_completion_columns). Furthermore, we'll try to -// make bash order the output such that the most useful or relevent -// flags are the most likely to be shown at the top. -// -// ** Additional features: -// To assist in finding that one really useful flag, substring matching -// was implemented. Before pressing a to get completion for the -// current word, you can append one or more '?' to the flag to do -// substring matching. Here's the semantics: -// --foo Show me all flags with names prefixed by 'foo' -// --foo? Show me all flags with 'foo' somewhere in the name -// --foo?? Same as prior case, but also search in module -// definition path for 'foo' -// --foo??? Same as prior case, but also search in flag -// descriptions for 'foo' -// Finally, we'll trim the output to a relatively small number of -// flags to keep bash quiet about the verbosity of output. If one -// really wanted to see all possible matches, appending a '+' to the -// search word will force the exhaustive list of matches to be printed. -// -// ** How to have bash accept completions from a binary: -// Bash requires that it be informed about each command that programmatic -// completion should be enabled for. Example addition to a .bashrc -// file would be (your path to gflags_completions.sh file may differ): - -/* -$ complete -o bashdefault -o default -o nospace -C \ - '/usr/local/bin/gflags_completions.sh --tab_completion_columns $COLUMNS' \ - time env binary_name another_binary [...] -*/ - -// This would allow the following to work: -// $ /path/to/binary_name --vmodule -// Or: -// $ ./bin/path/another_binary --gfs_u -// (etc) -// -// Sadly, it appears that bash gives no easy way to force this behavior for -// all commands. That's where the "time" in the above example comes in. -// If you haven't specifically added a command to the list of completion -// supported commands, you can still get completions by prefixing the -// entire command with "env". -// $ env /some/brand/new/binary --vmod -// Assuming that "binary" is a newly compiled binary, this should still -// produce the expected completion output. - - -#ifndef GOOGLE_GFLAGS_COMPLETIONS_H_ -#define GOOGLE_GFLAGS_COMPLETIONS_H_ - -namespace google { - -void HandleCommandLineCompletions(void); - -} - -#endif // GOOGLE_GFLAGS_COMPLETIONS_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/gflags/libgflags.a b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/gflags/libgflags.a deleted file mode 100644 index c0de874c..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/gflags/libgflags.a and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/glog/libglog.a b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/glog/libglog.a deleted file mode 100644 index 8d2afaef..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/linux/lib/glog/libglog.a and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/lss/linux_syscall_support.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/lss/linux_syscall_support.h deleted file mode 100644 index 4f2ce3c9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/lss/linux_syscall_support.h +++ /dev/null @@ -1,3473 +0,0 @@ -/* Copyright (c) 2005-2010, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Markus Gutschke - */ - -/* This file includes Linux-specific support functions common to the - * coredumper and the thread lister; primarily, this is a collection - * of direct system calls, and a couple of symbols missing from - * standard header files. - * There are a few options that the including file can set to control - * the behavior of this file: - * - * SYS_CPLUSPLUS: - * The entire header file will normally be wrapped in 'extern "C" { }", - * making it suitable for compilation as both C and C++ source. If you - * do not want to do this, you can set the SYS_CPLUSPLUS macro to inhibit - * the wrapping. N.B. doing so will suppress inclusion of all prerequisite - * system header files, too. It is the caller's responsibility to provide - * the necessary definitions. - * - * SYS_ERRNO: - * All system calls will update "errno" unless overriden by setting the - * SYS_ERRNO macro prior to including this file. SYS_ERRNO should be - * an l-value. - * - * SYS_INLINE: - * New symbols will be defined "static inline", unless overridden by - * the SYS_INLINE macro. - * - * SYS_LINUX_SYSCALL_SUPPORT_H - * This macro is used to avoid multiple inclusions of this header file. - * If you need to include this file more than once, make sure to - * unset SYS_LINUX_SYSCALL_SUPPORT_H before each inclusion. - * - * SYS_PREFIX: - * New system calls will have a prefix of "sys_" unless overridden by - * the SYS_PREFIX macro. Valid values for this macro are [0..9] which - * results in prefixes "sys[0..9]_". It is also possible to set this - * macro to -1, which avoids all prefixes. - * - * SYS_SYSCALL_ENTRYPOINT: - * Some applications (such as sandboxes that filter system calls), need - * to be able to run custom-code each time a system call is made. If this - * macro is defined, it expands to the name of a "common" symbol. If - * this symbol is assigned a non-NULL pointer value, it is used as the - * address of the system call entrypoint. - * A pointer to this symbol can be obtained by calling - * get_syscall_entrypoint() - * - * This file defines a few internal symbols that all start with "LSS_". - * Do not access these symbols from outside this file. They are not part - * of the supported API. - */ -#ifndef SYS_LINUX_SYSCALL_SUPPORT_H -#define SYS_LINUX_SYSCALL_SUPPORT_H - -/* We currently only support x86-32, x86-64, ARM, MIPS, and PPC on Linux. - * Porting to other related platforms should not be difficult. - */ -#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ - defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__)) \ - && defined(__linux) - -#ifndef SYS_CPLUSPLUS -#ifdef __cplusplus -/* Some system header files in older versions of gcc neglect to properly - * handle being included from C++. As it appears to be harmless to have - * multiple nested 'extern "C"' blocks, just add another one here. - */ -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __mips__ -/* Include definitions of the ABI currently in use. */ -#include -#endif -#endif - -/* As glibc often provides subtly incompatible data structures (and implicit - * wrapper functions that convert them), we provide our own kernel data - * structures for use by the system calls. - * These structures have been developed by using Linux 2.6.23 headers for - * reference. Note though, we do not care about exact API compatibility - * with the kernel, and in fact the kernel often does not have a single - * API that works across architectures. Instead, we try to mimic the glibc - * API where reasonable, and only guarantee ABI compatibility with the - * kernel headers. - * Most notably, here are a few changes that were made to the structures - * defined by kernel headers: - * - * - we only define structures, but not symbolic names for kernel data - * types. For the latter, we directly use the native C datatype - * (i.e. "unsigned" instead of "mode_t"). - * - in a few cases, it is possible to define identical structures for - * both 32bit (e.g. i386) and 64bit (e.g. x86-64) platforms by - * standardizing on the 64bit version of the data types. In particular, - * this means that we use "unsigned" where the 32bit headers say - * "unsigned long". - * - overall, we try to minimize the number of cases where we need to - * conditionally define different structures. - * - the "struct kernel_sigaction" class of structures have been - * modified to more closely mimic glibc's API by introducing an - * anonymous union for the function pointer. - * - a small number of field names had to have an underscore appended to - * them, because glibc defines a global macro by the same name. - */ - -/* include/linux/dirent.h */ -struct kernel_dirent64 { - unsigned long long d_ino; - long long d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[256]; -}; - -/* include/linux/dirent.h */ -struct kernel_dirent { - long d_ino; - long d_off; - unsigned short d_reclen; - char d_name[256]; -}; - -/* include/linux/uio.h */ -struct kernel_iovec { - void *iov_base; - unsigned long iov_len; -}; - -/* include/linux/socket.h */ -struct kernel_msghdr { - void *msg_name; - int msg_namelen; - struct kernel_iovec*msg_iov; - unsigned long msg_iovlen; - void *msg_control; - unsigned long msg_controllen; - unsigned msg_flags; -}; - -/* include/asm-generic/poll.h */ -struct kernel_pollfd { - int fd; - short events; - short revents; -}; - -/* include/linux/resource.h */ -struct kernel_rlimit { - unsigned long rlim_cur; - unsigned long rlim_max; -}; - -/* include/linux/time.h */ -struct kernel_timespec { - long tv_sec; - long tv_nsec; -}; - -/* include/linux/time.h */ -struct kernel_timeval { - long tv_sec; - long tv_usec; -}; - -/* include/linux/resource.h */ -struct kernel_rusage { - struct kernel_timeval ru_utime; - struct kernel_timeval ru_stime; - long ru_maxrss; - long ru_ixrss; - long ru_idrss; - long ru_isrss; - long ru_minflt; - long ru_majflt; - long ru_nswap; - long ru_inblock; - long ru_oublock; - long ru_msgsnd; - long ru_msgrcv; - long ru_nsignals; - long ru_nvcsw; - long ru_nivcsw; -}; - -struct siginfo; -#if defined(__i386__) || defined(__ARM_EABI__) || defined(__ARM_ARCH_3__) \ - || defined(__PPC__) - -/* include/asm-{arm,i386,mips,ppc}/signal.h */ -struct kernel_old_sigaction { - union { - void (*sa_handler_)(int); - void (*sa_sigaction_)(int, struct siginfo *, void *); - }; - unsigned long sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -} __attribute__((packed,aligned(4))); -#elif (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) - #define kernel_old_sigaction kernel_sigaction -#endif - -/* Some kernel functions (e.g. sigaction() in 2.6.23) require that the - * exactly match the size of the signal set, even though the API was - * intended to be extensible. We define our own KERNEL_NSIG to deal with - * this. - * Please note that glibc provides signals [1.._NSIG-1], whereas the - * kernel (and this header) provides the range [1..KERNEL_NSIG]. The - * actual number of signals is obviously the same, but the constants - * differ by one. - */ -#ifdef __mips__ -#define KERNEL_NSIG 128 -#else -#define KERNEL_NSIG 64 -#endif - -/* include/asm-{arm,i386,mips,x86_64}/signal.h */ -struct kernel_sigset_t { - unsigned long sig[(KERNEL_NSIG + 8*sizeof(unsigned long) - 1)/ - (8*sizeof(unsigned long))]; -}; - -/* include/asm-{arm,i386,mips,x86_64,ppc}/signal.h */ -struct kernel_sigaction { -#ifdef __mips__ - unsigned long sa_flags; - union { - void (*sa_handler_)(int); - void (*sa_sigaction_)(int, struct siginfo *, void *); - }; - struct kernel_sigset_t sa_mask; -#else - union { - void (*sa_handler_)(int); - void (*sa_sigaction_)(int, struct siginfo *, void *); - }; - unsigned long sa_flags; - void (*sa_restorer)(void); - struct kernel_sigset_t sa_mask; -#endif -}; - -/* include/linux/socket.h */ -struct kernel_sockaddr { - unsigned short sa_family; - char sa_data[14]; -}; - -/* include/asm-{arm,i386,mips,ppc}/stat.h */ -#ifdef __mips__ -#if _MIPS_SIM == _MIPS_SIM_ABI64 -struct kernel_stat { -#else -struct kernel_stat64 { -#endif - unsigned st_dev; - unsigned __pad0[3]; - unsigned long long st_ino; - unsigned st_mode; - unsigned st_nlink; - unsigned st_uid; - unsigned st_gid; - unsigned st_rdev; - unsigned __pad1[3]; - long long st_size; - unsigned st_atime_; - unsigned st_atime_nsec_; - unsigned st_mtime_; - unsigned st_mtime_nsec_; - unsigned st_ctime_; - unsigned st_ctime_nsec_; - unsigned st_blksize; - unsigned __pad2; - unsigned long long st_blocks; -}; -#elif defined __PPC__ -struct kernel_stat64 { - unsigned long long st_dev; - unsigned long long st_ino; - unsigned st_mode; - unsigned st_nlink; - unsigned st_uid; - unsigned st_gid; - unsigned long long st_rdev; - unsigned short int __pad2; - long long st_size; - long st_blksize; - long long st_blocks; - long st_atime_; - unsigned long st_atime_nsec_; - long st_mtime_; - unsigned long st_mtime_nsec_; - long st_ctime_; - unsigned long st_ctime_nsec_; - unsigned long __unused4; - unsigned long __unused5; -}; -#else -struct kernel_stat64 { - unsigned long long st_dev; - unsigned char __pad0[4]; - unsigned __st_ino; - unsigned st_mode; - unsigned st_nlink; - unsigned st_uid; - unsigned st_gid; - unsigned long long st_rdev; - unsigned char __pad3[4]; - long long st_size; - unsigned st_blksize; - unsigned long long st_blocks; - unsigned st_atime_; - unsigned st_atime_nsec_; - unsigned st_mtime_; - unsigned st_mtime_nsec_; - unsigned st_ctime_; - unsigned st_ctime_nsec_; - unsigned long long st_ino; -}; -#endif - -/* include/asm-{arm,i386,mips,x86_64,ppc}/stat.h */ -#if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) -struct kernel_stat { - /* The kernel headers suggest that st_dev and st_rdev should be 32bit - * quantities encoding 12bit major and 20bit minor numbers in an interleaved - * format. In reality, we do not see useful data in the top bits. So, - * we'll leave the padding in here, until we find a better solution. - */ - unsigned short st_dev; - short pad1; - unsigned st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - short pad2; - unsigned st_size; - unsigned st_blksize; - unsigned st_blocks; - unsigned st_atime_; - unsigned st_atime_nsec_; - unsigned st_mtime_; - unsigned st_mtime_nsec_; - unsigned st_ctime_; - unsigned st_ctime_nsec_; - unsigned __unused4; - unsigned __unused5; -}; -#elif defined(__x86_64__) -struct kernel_stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned long st_nlink; - unsigned st_mode; - unsigned st_uid; - unsigned st_gid; - unsigned __pad0; - unsigned long st_rdev; - long st_size; - long st_blksize; - long st_blocks; - unsigned long st_atime_; - unsigned long st_atime_nsec_; - unsigned long st_mtime_; - unsigned long st_mtime_nsec_; - unsigned long st_ctime_; - unsigned long st_ctime_nsec_; - long __unused[3]; -}; -#elif defined(__PPC__) -struct kernel_stat { - unsigned st_dev; - unsigned long st_ino; // ino_t - unsigned long st_mode; // mode_t - unsigned short st_nlink; // nlink_t - unsigned st_uid; // uid_t - unsigned st_gid; // gid_t - unsigned st_rdev; - long st_size; // off_t - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime_; - unsigned long st_atime_nsec_; - unsigned long st_mtime_; - unsigned long st_mtime_nsec_; - unsigned long st_ctime_; - unsigned long st_ctime_nsec_; - unsigned long __unused4; - unsigned long __unused5; -}; -#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64) -struct kernel_stat { - unsigned st_dev; - int st_pad1[3]; - unsigned st_ino; - unsigned st_mode; - unsigned st_nlink; - unsigned st_uid; - unsigned st_gid; - unsigned st_rdev; - int st_pad2[2]; - long st_size; - int st_pad3; - long st_atime_; - long st_atime_nsec_; - long st_mtime_; - long st_mtime_nsec_; - long st_ctime_; - long st_ctime_nsec_; - int st_blksize; - int st_blocks; - int st_pad4[14]; -}; -#endif - -/* include/asm-{arm,i386,mips,x86_64,ppc}/statfs.h */ -#ifdef __mips__ -#if _MIPS_SIM != _MIPS_SIM_ABI64 -struct kernel_statfs64 { - unsigned long f_type; - unsigned long f_bsize; - unsigned long f_frsize; - unsigned long __pad; - unsigned long long f_blocks; - unsigned long long f_bfree; - unsigned long long f_files; - unsigned long long f_ffree; - unsigned long long f_bavail; - struct { int val[2]; } f_fsid; - unsigned long f_namelen; - unsigned long f_spare[6]; -}; -#endif -#elif !defined(__x86_64__) -struct kernel_statfs64 { - unsigned long f_type; - unsigned long f_bsize; - unsigned long long f_blocks; - unsigned long long f_bfree; - unsigned long long f_bavail; - unsigned long long f_files; - unsigned long long f_ffree; - struct { int val[2]; } f_fsid; - unsigned long f_namelen; - unsigned long f_frsize; - unsigned long f_spare[5]; -}; -#endif - -/* include/asm-{arm,i386,mips,x86_64,ppc,generic}/statfs.h */ -#ifdef __mips__ -struct kernel_statfs { - long f_type; - long f_bsize; - long f_frsize; - long f_blocks; - long f_bfree; - long f_files; - long f_ffree; - long f_bavail; - struct { int val[2]; } f_fsid; - long f_namelen; - long f_spare[6]; -}; -#else -struct kernel_statfs { - /* x86_64 actually defines all these fields as signed, whereas all other */ - /* platforms define them as unsigned. Leaving them at unsigned should not */ - /* cause any problems. */ - unsigned long f_type; - unsigned long f_bsize; - unsigned long f_blocks; - unsigned long f_bfree; - unsigned long f_bavail; - unsigned long f_files; - unsigned long f_ffree; - struct { int val[2]; } f_fsid; - unsigned long f_namelen; - unsigned long f_frsize; - unsigned long f_spare[5]; -}; -#endif - - -/* Definitions missing from the standard header files */ -#ifndef O_DIRECTORY -#if defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) -#define O_DIRECTORY 0040000 -#else -#define O_DIRECTORY 0200000 -#endif -#endif -#ifndef NT_PRXFPREG -#define NT_PRXFPREG 0x46e62b7f -#endif -#ifndef PTRACE_GETFPXREGS -#define PTRACE_GETFPXREGS ((enum __ptrace_request)18) -#endif -#ifndef PR_GET_DUMPABLE -#define PR_GET_DUMPABLE 3 -#endif -#ifndef PR_SET_DUMPABLE -#define PR_SET_DUMPABLE 4 -#endif -#ifndef PR_GET_SECCOMP -#define PR_GET_SECCOMP 21 -#endif -#ifndef PR_SET_SECCOMP -#define PR_SET_SECCOMP 22 -#endif -#ifndef AT_FDCWD -#define AT_FDCWD (-100) -#endif -#ifndef AT_SYMLINK_NOFOLLOW -#define AT_SYMLINK_NOFOLLOW 0x100 -#endif -#ifndef AT_REMOVEDIR -#define AT_REMOVEDIR 0x200 -#endif -#ifndef MREMAP_FIXED -#define MREMAP_FIXED 2 -#endif -#ifndef SA_RESTORER -#define SA_RESTORER 0x04000000 -#endif -#ifndef CPUCLOCK_PROF -#define CPUCLOCK_PROF 0 -#endif -#ifndef CPUCLOCK_VIRT -#define CPUCLOCK_VIRT 1 -#endif -#ifndef CPUCLOCK_SCHED -#define CPUCLOCK_SCHED 2 -#endif -#ifndef CPUCLOCK_PERTHREAD_MASK -#define CPUCLOCK_PERTHREAD_MASK 4 -#endif -#ifndef MAKE_PROCESS_CPUCLOCK -#define MAKE_PROCESS_CPUCLOCK(pid, clock) \ - ((~(int)(pid) << 3) | (int)(clock)) -#endif -#ifndef MAKE_THREAD_CPUCLOCK -#define MAKE_THREAD_CPUCLOCK(tid, clock) \ - ((~(int)(tid) << 3) | (int)((clock) | CPUCLOCK_PERTHREAD_MASK)) -#endif - -#ifndef FUTEX_WAIT -#define FUTEX_WAIT 0 -#endif -#ifndef FUTEX_WAKE -#define FUTEX_WAKE 1 -#endif -#ifndef FUTEX_FD -#define FUTEX_FD 2 -#endif -#ifndef FUTEX_REQUEUE -#define FUTEX_REQUEUE 3 -#endif -#ifndef FUTEX_CMP_REQUEUE -#define FUTEX_CMP_REQUEUE 4 -#endif -#ifndef FUTEX_WAKE_OP -#define FUTEX_WAKE_OP 5 -#endif -#ifndef FUTEX_LOCK_PI -#define FUTEX_LOCK_PI 6 -#endif -#ifndef FUTEX_UNLOCK_PI -#define FUTEX_UNLOCK_PI 7 -#endif -#ifndef FUTEX_TRYLOCK_PI -#define FUTEX_TRYLOCK_PI 8 -#endif -#ifndef FUTEX_PRIVATE_FLAG -#define FUTEX_PRIVATE_FLAG 128 -#endif -#ifndef FUTEX_CMD_MASK -#define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG -#endif -#ifndef FUTEX_WAIT_PRIVATE -#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_WAKE_PRIVATE -#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_REQUEUE_PRIVATE -#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_CMP_REQUEUE_PRIVATE -#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_WAKE_OP_PRIVATE -#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_LOCK_PI_PRIVATE -#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_UNLOCK_PI_PRIVATE -#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_TRYLOCK_PI_PRIVATE -#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) -#endif - - -#if defined(__x86_64__) -#ifndef ARCH_SET_GS -#define ARCH_SET_GS 0x1001 -#endif -#ifndef ARCH_GET_GS -#define ARCH_GET_GS 0x1004 -#endif -#endif - -#if defined(__i386__) -#ifndef __NR_quotactl -#define __NR_quotactl 131 -#endif -#ifndef __NR_setresuid -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#endif -#ifndef __NR_rt_sigaction -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigsuspend 179 -#endif -#ifndef __NR_pread64 -#define __NR_pread64 180 -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 181 -#endif -#ifndef __NR_ugetrlimit -#define __NR_ugetrlimit 191 -#endif -#ifndef __NR_stat64 -#define __NR_stat64 195 -#endif -#ifndef __NR_fstat64 -#define __NR_fstat64 197 -#endif -#ifndef __NR_setresuid32 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#endif -#ifndef __NR_setfsuid32 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#endif -#ifndef __NR_getdents64 -#define __NR_getdents64 220 -#endif -#ifndef __NR_gettid -#define __NR_gettid 224 -#endif -#ifndef __NR_readahead -#define __NR_readahead 225 -#endif -#ifndef __NR_setxattr -#define __NR_setxattr 226 -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr 227 -#endif -#ifndef __NR_getxattr -#define __NR_getxattr 229 -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr 230 -#endif -#ifndef __NR_listxattr -#define __NR_listxattr 232 -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr 233 -#endif -#ifndef __NR_tkill -#define __NR_tkill 238 -#endif -#ifndef __NR_futex -#define __NR_futex 240 -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address 258 -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime 265 -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres 266 -#endif -#ifndef __NR_statfs64 -#define __NR_statfs64 268 -#endif -#ifndef __NR_fstatfs64 -#define __NR_fstatfs64 269 -#endif -#ifndef __NR_fadvise64_64 -#define __NR_fadvise64_64 272 -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 289 -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get 290 -#endif -#ifndef __NR_openat -#define __NR_openat 295 -#endif -#ifndef __NR_fstatat64 -#define __NR_fstatat64 300 -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat 301 -#endif -#ifndef __NR_move_pages -#define __NR_move_pages 317 -#endif -#ifndef __NR_getcpu -#define __NR_getcpu 318 -#endif -#ifndef __NR_fallocate -#define __NR_fallocate 324 -#endif -/* End of i386 definitions */ -#elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) -#ifndef __NR_setresuid -#define __NR_setresuid (__NR_SYSCALL_BASE + 164) -#define __NR_getresuid (__NR_SYSCALL_BASE + 165) -#define __NR_setresgid (__NR_SYSCALL_BASE + 170) -#define __NR_getresgid (__NR_SYSCALL_BASE + 171) -#endif -#ifndef __NR_rt_sigaction -#define __NR_rt_sigreturn (__NR_SYSCALL_BASE + 173) -#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174) -#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175) -#define __NR_rt_sigpending (__NR_SYSCALL_BASE + 176) -#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE + 179) -#endif -#ifndef __NR_pread64 -#define __NR_pread64 (__NR_SYSCALL_BASE + 180) -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181) -#endif -#ifndef __NR_ugetrlimit -#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191) -#endif -#ifndef __NR_stat64 -#define __NR_stat64 (__NR_SYSCALL_BASE + 195) -#endif -#ifndef __NR_fstat64 -#define __NR_fstat64 (__NR_SYSCALL_BASE + 197) -#endif -#ifndef __NR_setresuid32 -#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208) -#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209) -#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210) -#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211) -#endif -#ifndef __NR_setfsuid32 -#define __NR_setfsuid32 (__NR_SYSCALL_BASE + 215) -#define __NR_setfsgid32 (__NR_SYSCALL_BASE + 216) -#endif -#ifndef __NR_getdents64 -#define __NR_getdents64 (__NR_SYSCALL_BASE + 217) -#endif -#ifndef __NR_gettid -#define __NR_gettid (__NR_SYSCALL_BASE + 224) -#endif -#ifndef __NR_readahead -#define __NR_readahead (__NR_SYSCALL_BASE + 225) -#endif -#ifndef __NR_setxattr -#define __NR_setxattr (__NR_SYSCALL_BASE + 226) -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr (__NR_SYSCALL_BASE + 227) -#endif -#ifndef __NR_getxattr -#define __NR_getxattr (__NR_SYSCALL_BASE + 229) -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr (__NR_SYSCALL_BASE + 230) -#endif -#ifndef __NR_listxattr -#define __NR_listxattr (__NR_SYSCALL_BASE + 232) -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr (__NR_SYSCALL_BASE + 233) -#endif -#ifndef __NR_tkill -#define __NR_tkill (__NR_SYSCALL_BASE + 238) -#endif -#ifndef __NR_futex -#define __NR_futex (__NR_SYSCALL_BASE + 240) -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity (__NR_SYSCALL_BASE + 241) -#define __NR_sched_getaffinity (__NR_SYSCALL_BASE + 242) -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address (__NR_SYSCALL_BASE + 256) -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263) -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres (__NR_SYSCALL_BASE + 264) -#endif -#ifndef __NR_statfs64 -#define __NR_statfs64 (__NR_SYSCALL_BASE + 266) -#endif -#ifndef __NR_fstatfs64 -#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267) -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314) -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315) -#endif -#ifndef __NR_move_pages -#define __NR_move_pages (__NR_SYSCALL_BASE + 344) -#endif -#ifndef __NR_getcpu -#define __NR_getcpu (__NR_SYSCALL_BASE + 345) -#endif -/* End of ARM 3/EABI definitions */ -#elif defined(__x86_64__) -#ifndef __NR_pread64 -#define __NR_pread64 17 -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 18 -#endif -#ifndef __NR_setresuid -#define __NR_setresuid 117 -#define __NR_getresuid 118 -#define __NR_setresgid 119 -#define __NR_getresgid 120 -#endif -#ifndef __NR_quotactl -#define __NR_quotactl 179 -#endif -#ifndef __NR_gettid -#define __NR_gettid 186 -#endif -#ifndef __NR_readahead -#define __NR_readahead 187 -#endif -#ifndef __NR_setxattr -#define __NR_setxattr 188 -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr 189 -#endif -#ifndef __NR_getxattr -#define __NR_getxattr 191 -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr 192 -#endif -#ifndef __NR_listxattr -#define __NR_listxattr 194 -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr 195 -#endif -#ifndef __NR_tkill -#define __NR_tkill 200 -#endif -#ifndef __NR_futex -#define __NR_futex 202 -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity 203 -#define __NR_sched_getaffinity 204 -#endif -#ifndef __NR_getdents64 -#define __NR_getdents64 217 -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address 218 -#endif -#ifndef __NR_fadvise64 -#define __NR_fadvise64 221 -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime 228 -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres 229 -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 251 -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get 252 -#endif -#ifndef __NR_openat -#define __NR_openat 257 -#endif -#ifndef __NR_newfstatat -#define __NR_newfstatat 262 -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat 263 -#endif -#ifndef __NR_move_pages -#define __NR_move_pages 279 -#endif -#ifndef __NR_fallocate -#define __NR_fallocate 285 -#endif -/* End of x86-64 definitions */ -#elif defined(__mips__) -#if _MIPS_SIM == _MIPS_SIM_ABI32 -#ifndef __NR_setresuid -#define __NR_setresuid (__NR_Linux + 185) -#define __NR_getresuid (__NR_Linux + 186) -#define __NR_setresgid (__NR_Linux + 190) -#define __NR_getresgid (__NR_Linux + 191) -#endif -#ifndef __NR_rt_sigaction -#define __NR_rt_sigreturn (__NR_Linux + 193) -#define __NR_rt_sigaction (__NR_Linux + 194) -#define __NR_rt_sigprocmask (__NR_Linux + 195) -#define __NR_rt_sigpending (__NR_Linux + 196) -#define __NR_rt_sigsuspend (__NR_Linux + 199) -#endif -#ifndef __NR_pread64 -#define __NR_pread64 (__NR_Linux + 200) -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 (__NR_Linux + 201) -#endif -#ifndef __NR_stat64 -#define __NR_stat64 (__NR_Linux + 213) -#endif -#ifndef __NR_fstat64 -#define __NR_fstat64 (__NR_Linux + 215) -#endif -#ifndef __NR_getdents64 -#define __NR_getdents64 (__NR_Linux + 219) -#endif -#ifndef __NR_gettid -#define __NR_gettid (__NR_Linux + 222) -#endif -#ifndef __NR_readahead -#define __NR_readahead (__NR_Linux + 223) -#endif -#ifndef __NR_setxattr -#define __NR_setxattr (__NR_Linux + 224) -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr (__NR_Linux + 225) -#endif -#ifndef __NR_getxattr -#define __NR_getxattr (__NR_Linux + 227) -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr (__NR_Linux + 228) -#endif -#ifndef __NR_listxattr -#define __NR_listxattr (__NR_Linux + 230) -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr (__NR_Linux + 231) -#endif -#ifndef __NR_tkill -#define __NR_tkill (__NR_Linux + 236) -#endif -#ifndef __NR_futex -#define __NR_futex (__NR_Linux + 238) -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity (__NR_Linux + 239) -#define __NR_sched_getaffinity (__NR_Linux + 240) -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address (__NR_Linux + 252) -#endif -#ifndef __NR_statfs64 -#define __NR_statfs64 (__NR_Linux + 255) -#endif -#ifndef __NR_fstatfs64 -#define __NR_fstatfs64 (__NR_Linux + 256) -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime (__NR_Linux + 263) -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres (__NR_Linux + 264) -#endif -#ifndef __NR_openat -#define __NR_openat (__NR_Linux + 288) -#endif -#ifndef __NR_fstatat -#define __NR_fstatat (__NR_Linux + 293) -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat (__NR_Linux + 294) -#endif -#ifndef __NR_move_pages -#define __NR_move_pages (__NR_Linux + 308) -#endif -#ifndef __NR_getcpu -#define __NR_getcpu (__NR_Linux + 312) -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set (__NR_Linux + 314) -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get (__NR_Linux + 315) -#endif -/* End of MIPS (old 32bit API) definitions */ -#elif _MIPS_SIM == _MIPS_SIM_ABI64 -#ifndef __NR_pread64 -#define __NR_pread64 (__NR_Linux + 16) -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 (__NR_Linux + 17) -#endif -#ifndef __NR_setresuid -#define __NR_setresuid (__NR_Linux + 115) -#define __NR_getresuid (__NR_Linux + 116) -#define __NR_setresgid (__NR_Linux + 117) -#define __NR_getresgid (__NR_Linux + 118) -#endif -#ifndef __NR_gettid -#define __NR_gettid (__NR_Linux + 178) -#endif -#ifndef __NR_readahead -#define __NR_readahead (__NR_Linux + 179) -#endif -#ifndef __NR_setxattr -#define __NR_setxattr (__NR_Linux + 180) -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr (__NR_Linux + 181) -#endif -#ifndef __NR_getxattr -#define __NR_getxattr (__NR_Linux + 183) -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr (__NR_Linux + 184) -#endif -#ifndef __NR_listxattr -#define __NR_listxattr (__NR_Linux + 186) -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr (__NR_Linux + 187) -#endif -#ifndef __NR_tkill -#define __NR_tkill (__NR_Linux + 192) -#endif -#ifndef __NR_futex -#define __NR_futex (__NR_Linux + 194) -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity (__NR_Linux + 195) -#define __NR_sched_getaffinity (__NR_Linux + 196) -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address (__NR_Linux + 212) -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime (__NR_Linux + 222) -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres (__NR_Linux + 223) -#endif -#ifndef __NR_openat -#define __NR_openat (__NR_Linux + 247) -#endif -#ifndef __NR_fstatat -#define __NR_fstatat (__NR_Linux + 252) -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat (__NR_Linux + 253) -#endif -#ifndef __NR_move_pages -#define __NR_move_pages (__NR_Linux + 267) -#endif -#ifndef __NR_getcpu -#define __NR_getcpu (__NR_Linux + 271) -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set (__NR_Linux + 273) -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get (__NR_Linux + 274) -#endif -/* End of MIPS (64bit API) definitions */ -#else -#ifndef __NR_setresuid -#define __NR_setresuid (__NR_Linux + 115) -#define __NR_getresuid (__NR_Linux + 116) -#define __NR_setresgid (__NR_Linux + 117) -#define __NR_getresgid (__NR_Linux + 118) -#endif -#ifndef __NR_gettid -#define __NR_gettid (__NR_Linux + 178) -#endif -#ifndef __NR_readahead -#define __NR_readahead (__NR_Linux + 179) -#endif -#ifndef __NR_setxattr -#define __NR_setxattr (__NR_Linux + 180) -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr (__NR_Linux + 181) -#endif -#ifndef __NR_getxattr -#define __NR_getxattr (__NR_Linux + 183) -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr (__NR_Linux + 184) -#endif -#ifndef __NR_listxattr -#define __NR_listxattr (__NR_Linux + 186) -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr (__NR_Linux + 187) -#endif -#ifndef __NR_tkill -#define __NR_tkill (__NR_Linux + 192) -#endif -#ifndef __NR_futex -#define __NR_futex (__NR_Linux + 194) -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity (__NR_Linux + 195) -#define __NR_sched_getaffinity (__NR_Linux + 196) -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address (__NR_Linux + 213) -#endif -#ifndef __NR_statfs64 -#define __NR_statfs64 (__NR_Linux + 217) -#endif -#ifndef __NR_fstatfs64 -#define __NR_fstatfs64 (__NR_Linux + 218) -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime (__NR_Linux + 226) -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres (__NR_Linux + 227) -#endif -#ifndef __NR_openat -#define __NR_openat (__NR_Linux + 251) -#endif -#ifndef __NR_fstatat -#define __NR_fstatat (__NR_Linux + 256) -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat (__NR_Linux + 257) -#endif -#ifndef __NR_move_pages -#define __NR_move_pages (__NR_Linux + 271) -#endif -#ifndef __NR_getcpu -#define __NR_getcpu (__NR_Linux + 275) -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set (__NR_Linux + 277) -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get (__NR_Linux + 278) -#endif -/* End of MIPS (new 32bit API) definitions */ -#endif -/* End of MIPS definitions */ -#elif defined(__PPC__) -#ifndef __NR_setfsuid -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#endif -#ifndef __NR_setresuid -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#endif -#ifndef __NR_rt_sigaction -#define __NR_rt_sigreturn 172 -#define __NR_rt_sigaction 173 -#define __NR_rt_sigprocmask 174 -#define __NR_rt_sigpending 175 -#define __NR_rt_sigsuspend 178 -#endif -#ifndef __NR_pread64 -#define __NR_pread64 179 -#endif -#ifndef __NR_pwrite64 -#define __NR_pwrite64 180 -#endif -#ifndef __NR_ugetrlimit -#define __NR_ugetrlimit 190 -#endif -#ifndef __NR_readahead -#define __NR_readahead 191 -#endif -#ifndef __NR_stat64 -#define __NR_stat64 195 -#endif -#ifndef __NR_fstat64 -#define __NR_fstat64 197 -#endif -#ifndef __NR_getdents64 -#define __NR_getdents64 202 -#endif -#ifndef __NR_gettid -#define __NR_gettid 207 -#endif -#ifndef __NR_tkill -#define __NR_tkill 208 -#endif -#ifndef __NR_setxattr -#define __NR_setxattr 209 -#endif -#ifndef __NR_lsetxattr -#define __NR_lsetxattr 210 -#endif -#ifndef __NR_getxattr -#define __NR_getxattr 212 -#endif -#ifndef __NR_lgetxattr -#define __NR_lgetxattr 213 -#endif -#ifndef __NR_listxattr -#define __NR_listxattr 215 -#endif -#ifndef __NR_llistxattr -#define __NR_llistxattr 216 -#endif -#ifndef __NR_futex -#define __NR_futex 221 -#endif -#ifndef __NR_sched_setaffinity -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 -#endif -#ifndef __NR_set_tid_address -#define __NR_set_tid_address 232 -#endif -#ifndef __NR_clock_gettime -#define __NR_clock_gettime 246 -#endif -#ifndef __NR_clock_getres -#define __NR_clock_getres 247 -#endif -#ifndef __NR_statfs64 -#define __NR_statfs64 252 -#endif -#ifndef __NR_fstatfs64 -#define __NR_fstatfs64 253 -#endif -#ifndef __NR_fadvise64_64 -#define __NR_fadvise64_64 254 -#endif -#ifndef __NR_ioprio_set -#define __NR_ioprio_set 273 -#endif -#ifndef __NR_ioprio_get -#define __NR_ioprio_get 274 -#endif -#ifndef __NR_openat -#define __NR_openat 286 -#endif -#ifndef __NR_fstatat64 -#define __NR_fstatat64 291 -#endif -#ifndef __NR_unlinkat -#define __NR_unlinkat 292 -#endif -#ifndef __NR_move_pages -#define __NR_move_pages 301 -#endif -#ifndef __NR_getcpu -#define __NR_getcpu 302 -#endif -/* End of powerpc defininitions */ -#endif - - -/* After forking, we must make sure to only call system calls. */ -#if __BOUNDED_POINTERS__ - #error "Need to port invocations of syscalls for bounded ptrs" -#else - /* The core dumper and the thread lister get executed after threads - * have been suspended. As a consequence, we cannot call any functions - * that acquire locks. Unfortunately, libc wraps most system calls - * (e.g. in order to implement pthread_atfork, and to make calls - * cancellable), which means we cannot call these functions. Instead, - * we have to call syscall() directly. - */ - #undef LSS_ERRNO - #ifdef SYS_ERRNO - /* Allow the including file to override the location of errno. This can - * be useful when using clone() with the CLONE_VM option. - */ - #define LSS_ERRNO SYS_ERRNO - #else - #define LSS_ERRNO errno - #endif - - #undef LSS_INLINE - #ifdef SYS_INLINE - #define LSS_INLINE SYS_INLINE - #else - #define LSS_INLINE static inline - #endif - - /* Allow the including file to override the prefix used for all new - * system calls. By default, it will be set to "sys_". - */ - #undef LSS_NAME - #ifndef SYS_PREFIX - #define LSS_NAME(name) sys_##name - #elif SYS_PREFIX < 0 - #define LSS_NAME(name) name - #elif SYS_PREFIX == 0 - #define LSS_NAME(name) sys0_##name - #elif SYS_PREFIX == 1 - #define LSS_NAME(name) sys1_##name - #elif SYS_PREFIX == 2 - #define LSS_NAME(name) sys2_##name - #elif SYS_PREFIX == 3 - #define LSS_NAME(name) sys3_##name - #elif SYS_PREFIX == 4 - #define LSS_NAME(name) sys4_##name - #elif SYS_PREFIX == 5 - #define LSS_NAME(name) sys5_##name - #elif SYS_PREFIX == 6 - #define LSS_NAME(name) sys6_##name - #elif SYS_PREFIX == 7 - #define LSS_NAME(name) sys7_##name - #elif SYS_PREFIX == 8 - #define LSS_NAME(name) sys8_##name - #elif SYS_PREFIX == 9 - #define LSS_NAME(name) sys9_##name - #endif - - #undef LSS_RETURN - #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) \ - || defined(__ARM_EABI__)) - /* Failing system calls return a negative result in the range of - * -1..-4095. These are "errno" values with the sign inverted. - */ - #define LSS_RETURN(type, res) \ - do { \ - if ((unsigned long)(res) >= (unsigned long)(-4095)) { \ - LSS_ERRNO = -(res); \ - res = -1; \ - } \ - return (type) (res); \ - } while (0) - #elif defined(__mips__) - /* On MIPS, failing system calls return -1, and set errno in a - * separate CPU register. - */ - #define LSS_RETURN(type, res, err) \ - do { \ - if (err) { \ - LSS_ERRNO = (res); \ - res = -1; \ - } \ - return (type) (res); \ - } while (0) - #elif defined(__PPC__) - /* On PPC, failing system calls return -1, and set errno in a - * separate CPU register. See linux/unistd.h. - */ - #define LSS_RETURN(type, res, err) \ - do { \ - if (err & 0x10000000 ) { \ - LSS_ERRNO = (res); \ - res = -1; \ - } \ - return (type) (res); \ - } while (0) - #endif - #if defined(__i386__) - /* In PIC mode (e.g. when building shared libraries), gcc for i386 - * reserves ebx. Unfortunately, most distribution ship with implementations - * of _syscallX() which clobber ebx. - * Also, most definitions of _syscallX() neglect to mark "memory" as being - * clobbered. This causes problems with compilers, that do a better job - * at optimizing across __asm__ calls. - * So, we just have to redefine all of the _syscallX() macros. - */ - #undef LSS_ENTRYPOINT - #ifdef SYS_SYSCALL_ENTRYPOINT - static inline void (**LSS_NAME(get_syscall_entrypoint)(void))(void) { - void (**entrypoint)(void); - asm volatile(".bss\n" - ".align 8\n" - ".globl "SYS_SYSCALL_ENTRYPOINT"\n" - ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" - ".previous\n" - /* This logically does 'lea "SYS_SYSCALL_ENTRYPOINT", %0' */ - "call 0f\n" - "0:pop %0\n" - "add $_GLOBAL_OFFSET_TABLE_+[.-0b], %0\n" - "mov "SYS_SYSCALL_ENTRYPOINT"@GOT(%0), %0\n" - : "=r"(entrypoint)); - return entrypoint; - } - - #define LSS_ENTRYPOINT ".bss\n" \ - ".align 8\n" \ - ".globl "SYS_SYSCALL_ENTRYPOINT"\n" \ - ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" \ - ".previous\n" \ - /* Check the SYS_SYSCALL_ENTRYPOINT vector */ \ - "push %%eax\n" \ - "call 10000f\n" \ - "10000:pop %%eax\n" \ - "add $_GLOBAL_OFFSET_TABLE_+[.-10000b], %%eax\n" \ - "mov "SYS_SYSCALL_ENTRYPOINT"@GOT(%%eax), %%eax\n"\ - "mov 0(%%eax), %%eax\n" \ - "test %%eax, %%eax\n" \ - "jz 10001f\n" \ - "push %%eax\n" \ - "lea 10002f, %%eax\n" \ - "xchg 4(%%esp), %%eax\n" \ - "ret\n" \ - "10001:pop %%eax\n" \ - "int $0x80\n" \ - "10002:\n" - #else - #define LSS_ENTRYPOINT "int $0x80\n" - #endif - #undef LSS_BODY - #define LSS_BODY(type,args...) \ - long __res; \ - __asm__ __volatile__("push %%ebx\n" \ - "movl %2,%%ebx\n" \ - LSS_ENTRYPOINT \ - "pop %%ebx" \ - args \ - : "esp", "memory"); \ - LSS_RETURN(type,__res) - #undef _syscall0 - #define _syscall0(type,name) \ - type LSS_NAME(name)(void) { \ - long __res; \ - __asm__ volatile(LSS_ENTRYPOINT \ - : "=a" (__res) \ - : "0" (__NR_##name) \ - : "esp", "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall1 - #define _syscall1(type,name,type1,arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - LSS_BODY(type, \ - : "=a" (__res) \ - : "0" (__NR_##name), "ri" ((long)(arg1))); \ - } - #undef _syscall2 - #define _syscall2(type,name,type1,arg1,type2,arg2) \ - type LSS_NAME(name)(type1 arg1,type2 arg2) { \ - LSS_BODY(type, \ - : "=a" (__res) \ - : "0" (__NR_##name),"ri" ((long)(arg1)), "c" ((long)(arg2))); \ - } - #undef _syscall3 - #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ - type LSS_NAME(name)(type1 arg1,type2 arg2,type3 arg3) { \ - LSS_BODY(type, \ - : "=a" (__res) \ - : "0" (__NR_##name), "ri" ((long)(arg1)), "c" ((long)(arg2)), \ - "d" ((long)(arg3))); \ - } - #undef _syscall4 - #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - LSS_BODY(type, \ - : "=a" (__res) \ - : "0" (__NR_##name), "ri" ((long)(arg1)), "c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4))); \ - } - #undef _syscall5 - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - long __res; \ - __asm__ __volatile__("push %%ebx\n" \ - "movl %2,%%ebx\n" \ - "movl %1,%%eax\n" \ - LSS_ENTRYPOINT \ - "pop %%ebx" \ - : "=a" (__res) \ - : "i" (__NR_##name), "ri" ((long)(arg1)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ - : "esp", "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall6 - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - long __res; \ - struct { long __a1; long __a6; } __s = { (long)arg1, (long) arg6 }; \ - __asm__ __volatile__("push %%ebp\n" \ - "push %%ebx\n" \ - "movl 4(%2),%%ebp\n" \ - "movl 0(%2), %%ebx\n" \ - "movl %1,%%eax\n" \ - LSS_ENTRYPOINT \ - "pop %%ebx\n" \ - "pop %%ebp" \ - : "=a" (__res) \ - : "i" (__NR_##name), "0" ((long)(&__s)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ - : "esp", "memory"); \ - LSS_RETURN(type,__res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - long __res; - __asm__ __volatile__(/* if (fn == NULL) - * return -EINVAL; - */ - "movl %3,%%ecx\n" - "jecxz 1f\n" - - /* if (child_stack == NULL) - * return -EINVAL; - */ - "movl %4,%%ecx\n" - "jecxz 1f\n" - - /* Set up alignment of the child stack: - * child_stack = (child_stack & ~0xF) - 20; - */ - "andl $-16,%%ecx\n" - "subl $20,%%ecx\n" - - /* Push "arg" and "fn" onto the stack that will be - * used by the child. - */ - "movl %6,%%eax\n" - "movl %%eax,4(%%ecx)\n" - "movl %3,%%eax\n" - "movl %%eax,(%%ecx)\n" - - /* %eax = syscall(%eax = __NR_clone, - * %ebx = flags, - * %ecx = child_stack, - * %edx = parent_tidptr, - * %esi = newtls, - * %edi = child_tidptr) - * Also, make sure that %ebx gets preserved as it is - * used in PIC mode. - */ - "movl %8,%%esi\n" - "movl %7,%%edx\n" - "movl %5,%%eax\n" - "movl %9,%%edi\n" - "pushl %%ebx\n" - "movl %%eax,%%ebx\n" - "movl %2,%%eax\n" - LSS_ENTRYPOINT - - /* In the parent: restore %ebx - * In the child: move "fn" into %ebx - */ - "popl %%ebx\n" - - /* if (%eax != 0) - * return %eax; - */ - "test %%eax,%%eax\n" - "jnz 1f\n" - - /* In the child, now. Terminate frame pointer chain. - */ - "movl $0,%%ebp\n" - - /* Call "fn". "arg" is already on the stack. - */ - "call *%%ebx\n" - - /* Call _exit(%ebx). Unfortunately older versions - * of gcc restrict the number of arguments that can - * be passed to asm(). So, we need to hard-code the - * system call number. - */ - "movl %%eax,%%ebx\n" - "movl $1,%%eax\n" - LSS_ENTRYPOINT - - /* Return to parent. - */ - "1:\n" - : "=a" (__res) - : "0"(-EINVAL), "i"(__NR_clone), - "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), - "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) - : "esp", "memory", "ecx", "edx", "esi", "edi"); - LSS_RETURN(int, __res); - } - - #define __NR__fadvise64_64 __NR_fadvise64_64 - LSS_INLINE _syscall6(int, _fadvise64_64, int, fd, - unsigned, offset_lo, unsigned, offset_hi, - unsigned, len_lo, unsigned, len_hi, - int, advice) - - LSS_INLINE int LSS_NAME(fadvise64)(int fd, loff_t offset, - loff_t len, int advice) { - return LSS_NAME(_fadvise64_64)(fd, - (unsigned)offset, (unsigned)(offset >>32), - (unsigned)len, (unsigned)(len >> 32), - advice); - } - - #define __NR__fallocate __NR_fallocate - LSS_INLINE _syscall6(int, _fallocate, int, fd, - int, mode, - unsigned, offset_lo, unsigned, offset_hi, - unsigned, len_lo, unsigned, len_hi) - - LSS_INLINE int LSS_NAME(fallocate)(int fd, int mode, - loff_t offset, loff_t len) { - union { loff_t off; unsigned w[2]; } o = { offset }, l = { len }; - return LSS_NAME(_fallocate)(fd, mode, o.w[0], o.w[1], l.w[0], l.w[1]); - } - - LSS_INLINE _syscall1(int, set_thread_area, void *, u) - LSS_INLINE _syscall1(int, get_thread_area, void *, u) - - LSS_INLINE void (*LSS_NAME(restore_rt)(void))(void) { - /* On i386, the kernel does not know how to return from a signal - * handler. Instead, it relies on user space to provide a - * restorer function that calls the {rt_,}sigreturn() system call. - * Unfortunately, we cannot just reference the glibc version of this - * function, as glibc goes out of its way to make it inaccessible. - */ - void (*res)(void); - __asm__ __volatile__("call 2f\n" - "0:.align 16\n" - "1:movl %1,%%eax\n" - LSS_ENTRYPOINT - "2:popl %0\n" - "addl $(1b-0b),%0\n" - : "=a" (res) - : "i" (__NR_rt_sigreturn)); - return res; - } - LSS_INLINE void (*LSS_NAME(restore)(void))(void) { - /* On i386, the kernel does not know how to return from a signal - * handler. Instead, it relies on user space to provide a - * restorer function that calls the {rt_,}sigreturn() system call. - * Unfortunately, we cannot just reference the glibc version of this - * function, as glibc goes out of its way to make it inaccessible. - */ - void (*res)(void); - __asm__ __volatile__("call 2f\n" - "0:.align 16\n" - "1:pop %%eax\n" - "movl %1,%%eax\n" - LSS_ENTRYPOINT - "2:popl %0\n" - "addl $(1b-0b),%0\n" - : "=a" (res) - : "i" (__NR_sigreturn)); - return res; - } - #elif defined(__x86_64__) - /* There are no known problems with any of the _syscallX() macros - * currently shipping for x86_64, but we still need to be able to define - * our own version so that we can override the location of the errno - * location (e.g. when using the clone() system call with the CLONE_VM - * option). - */ - #undef LSS_ENTRYPOINT - #ifdef SYS_SYSCALL_ENTRYPOINT - static inline void (**LSS_NAME(get_syscall_entrypoint)(void))(void) { - void (**entrypoint)(void); - asm volatile(".bss\n" - ".align 8\n" - ".globl "SYS_SYSCALL_ENTRYPOINT"\n" - ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" - ".previous\n" - "mov "SYS_SYSCALL_ENTRYPOINT"@GOTPCREL(%%rip), %0\n" - : "=r"(entrypoint)); - return entrypoint; - } - - #define LSS_ENTRYPOINT \ - ".bss\n" \ - ".align 8\n" \ - ".globl "SYS_SYSCALL_ENTRYPOINT"\n" \ - ".common "SYS_SYSCALL_ENTRYPOINT",8,8\n" \ - ".previous\n" \ - "mov "SYS_SYSCALL_ENTRYPOINT"@GOTPCREL(%%rip), %%rcx\n" \ - "mov 0(%%rcx), %%rcx\n" \ - "test %%rcx, %%rcx\n" \ - "jz 10001f\n" \ - "call *%%rcx\n" \ - "jmp 10002f\n" \ - "10001:syscall\n" \ - "10002:\n" - - #else - #define LSS_ENTRYPOINT "syscall\n" - #endif - #undef LSS_BODY - #define LSS_BODY(type,name, ...) \ - long __res; \ - __asm__ __volatile__(LSS_ENTRYPOINT \ - : "=a" (__res) : "0" (__NR_##name), \ - ##__VA_ARGS__ : "r11", "rcx", "memory"); \ - LSS_RETURN(type, __res) - #undef _syscall0 - #define _syscall0(type,name) \ - type LSS_NAME(name)() { \ - LSS_BODY(type, name); \ - } - #undef _syscall1 - #define _syscall1(type,name,type1,arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - LSS_BODY(type, name, "D" ((long)(arg1))); \ - } - #undef _syscall2 - #define _syscall2(type,name,type1,arg1,type2,arg2) \ - type LSS_NAME(name)(type1 arg1, type2 arg2) { \ - LSS_BODY(type, name, "D" ((long)(arg1)), "S" ((long)(arg2))); \ - } - #undef _syscall3 - #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ - LSS_BODY(type, name, "D" ((long)(arg1)), "S" ((long)(arg2)), \ - "d" ((long)(arg3))); \ - } - #undef _syscall4 - #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - long __res; \ - __asm__ __volatile__("movq %5,%%r10;" LSS_ENTRYPOINT : \ - "=a" (__res) : "0" (__NR_##name), \ - "D" ((long)(arg1)), "S" ((long)(arg2)), "d" ((long)(arg3)), \ - "r" ((long)(arg4)) : "r10", "r11", "rcx", "memory"); \ - LSS_RETURN(type, __res); \ - } - #undef _syscall5 - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - long __res; \ - __asm__ __volatile__("movq %5,%%r10; movq %6,%%r8;" LSS_ENTRYPOINT :\ - "=a" (__res) : "0" (__NR_##name), \ - "D" ((long)(arg1)), "S" ((long)(arg2)), "d" ((long)(arg3)), \ - "r" ((long)(arg4)), "r" ((long)(arg5)) : \ - "r8", "r10", "r11", "rcx", "memory"); \ - LSS_RETURN(type, __res); \ - } - #undef _syscall6 - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - long __res; \ - __asm__ __volatile__("movq %5,%%r10; movq %6,%%r8; movq %7,%%r9;" \ - LSS_ENTRYPOINT : \ - "=a" (__res) : "0" (__NR_##name), \ - "D" ((long)(arg1)), "S" ((long)(arg2)), "d" ((long)(arg3)), \ - "r" ((long)(arg4)), "r" ((long)(arg5)), "r" ((long)(arg6)) : \ - "r8", "r9", "r10", "r11", "rcx", "memory"); \ - LSS_RETURN(type, __res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - long __res; - { - register void *__tls __asm__("r8") = newtls; - register int *__ctid __asm__("r10") = child_tidptr; - __asm__ __volatile__(/* if (fn == NULL) - * return -EINVAL; - */ - "testq %4,%4\n" - "jz 1f\n" - - /* if (child_stack == NULL) - * return -EINVAL; - */ - "testq %5,%5\n" - "jz 1f\n" - - /* childstack -= 2*sizeof(void *); - */ - "subq $16,%5\n" - - /* Push "arg" and "fn" onto the stack that will be - * used by the child. - */ - "movq %7,8(%5)\n" - "movq %4,0(%5)\n" - - /* %rax = syscall(%rax = __NR_clone, - * %rdi = flags, - * %rsi = child_stack, - * %rdx = parent_tidptr, - * %r8 = new_tls, - * %r10 = child_tidptr) - */ - "movq %2,%%rax\n" - LSS_ENTRYPOINT - - /* if (%rax != 0) - * return; - */ - "testq %%rax,%%rax\n" - "jnz 1f\n" - - /* In the child. Terminate frame pointer chain. - */ - "xorq %%rbp,%%rbp\n" - - /* Call "fn(arg)". - */ - "popq %%rax\n" - "popq %%rdi\n" - "call *%%rax\n" - - /* Call _exit(%ebx). - */ - "movq %%rax,%%rdi\n" - "movq %3,%%rax\n" - LSS_ENTRYPOINT - - /* Return to parent. - */ - "1:\n" - : "=a" (__res) - : "0"(-EINVAL), "i"(__NR_clone), "i"(__NR_exit), - "r"(fn), "S"(child_stack), "D"(flags), "r"(arg), - "d"(parent_tidptr), "r"(__tls), "r"(__ctid) - : "rsp", "memory", "r11", "rcx"); - } - LSS_RETURN(int, __res); - } - LSS_INLINE _syscall2(int, arch_prctl, int, c, void *, a) - LSS_INLINE _syscall4(int, fadvise64, int, fd, loff_t, offset, loff_t, len, - int, advice) - - LSS_INLINE void (*LSS_NAME(restore_rt)(void))(void) { - /* On x86-64, the kernel does not know how to return from - * a signal handler. Instead, it relies on user space to provide a - * restorer function that calls the rt_sigreturn() system call. - * Unfortunately, we cannot just reference the glibc version of this - * function, as glibc goes out of its way to make it inaccessible. - */ - void (*res)(void); - __asm__ __volatile__("call 2f\n" - "0:.align 16\n" - "1:movq %1,%%rax\n" - LSS_ENTRYPOINT - "2:popq %0\n" - "addq $(1b-0b),%0\n" - : "=a" (res) - : "i" (__NR_rt_sigreturn)); - return res; - } - #elif defined(__ARM_ARCH_3__) - /* Most definitions of _syscallX() neglect to mark "memory" as being - * clobbered. This causes problems with compilers, that do a better job - * at optimizing across __asm__ calls. - * So, we just have to redefine all of the _syscallX() macros. - */ - #undef LSS_REG - #define LSS_REG(r,a) register long __r##r __asm__("r"#r) = (long)a - #undef LSS_BODY - #define LSS_BODY(type,name,args...) \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ (__syscall(name) \ - : "=r"(__res_r0) : args : "lr", "memory"); \ - __res = __res_r0; \ - LSS_RETURN(type, __res) - #undef _syscall0 - #define _syscall0(type, name) \ - type LSS_NAME(name)() { \ - LSS_BODY(type, name); \ - } - #undef _syscall1 - #define _syscall1(type, name, type1, arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - LSS_REG(0, arg1); LSS_BODY(type, name, "r"(__r0)); \ - } - #undef _syscall2 - #define _syscall2(type, name, type1, arg1, type2, arg2) \ - type LSS_NAME(name)(type1 arg1, type2 arg2) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1)); \ - } - #undef _syscall3 - #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2)); \ - } - #undef _syscall4 - #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3)); \ - } - #undef _syscall5 - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); LSS_REG(4, arg5); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ - "r"(__r4)); \ - } - #undef _syscall6 - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); LSS_REG(4, arg5); LSS_REG(5, arg6); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ - "r"(__r4), "r"(__r5)); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - long __res; - { - register int __flags __asm__("r0") = flags; - register void *__stack __asm__("r1") = child_stack; - register void *__ptid __asm__("r2") = parent_tidptr; - register void *__tls __asm__("r3") = newtls; - register int *__ctid __asm__("r4") = child_tidptr; - __asm__ __volatile__(/* if (fn == NULL || child_stack == NULL) - * return -EINVAL; - */ - "cmp %2,#0\n" - "cmpne %3,#0\n" - "moveq %0,%1\n" - "beq 1f\n" - - /* Push "arg" and "fn" onto the stack that will be - * used by the child. - */ - "str %5,[%3,#-4]!\n" - "str %2,[%3,#-4]!\n" - - /* %r0 = syscall(%r0 = flags, - * %r1 = child_stack, - * %r2 = parent_tidptr, - * %r3 = newtls, - * %r4 = child_tidptr) - */ - __syscall(clone)"\n" - - /* if (%r0 != 0) - * return %r0; - */ - "movs %0,r0\n" - "bne 1f\n" - - /* In the child, now. Call "fn(arg)". - */ - "ldr r0,[sp, #4]\n" - "mov lr,pc\n" - "ldr pc,[sp]\n" - - /* Call _exit(%r0). - */ - __syscall(exit)"\n" - "1:\n" - : "=r" (__res) - : "i"(-EINVAL), - "r"(fn), "r"(__stack), "r"(__flags), "r"(arg), - "r"(__ptid), "r"(__tls), "r"(__ctid) - : "cc", "lr", "memory"); - } - LSS_RETURN(int, __res); - } - #elif defined(__ARM_EABI__) - /* Most definitions of _syscallX() neglect to mark "memory" as being - * clobbered. This causes problems with compilers, that do a better job - * at optimizing across __asm__ calls. - * So, we just have to redefine all fo the _syscallX() macros. - */ - #undef LSS_REG - #define LSS_REG(r,a) register long __r##r __asm__("r"#r) = (long)a - #undef LSS_BODY - #define LSS_BODY(type,name,args...) \ - register long __res_r0 __asm__("r0"); \ - long __res; \ - __asm__ __volatile__ ("push {r7}\n" \ - "mov r7, %1\n" \ - "swi 0x0\n" \ - "pop {r7}\n" \ - : "=r"(__res_r0) \ - : "i"(__NR_##name) , ## args \ - : "lr", "memory"); \ - __res = __res_r0; \ - LSS_RETURN(type, __res) - #undef _syscall0 - #define _syscall0(type, name) \ - type LSS_NAME(name)() { \ - LSS_BODY(type, name); \ - } - #undef _syscall1 - #define _syscall1(type, name, type1, arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - LSS_REG(0, arg1); LSS_BODY(type, name, "r"(__r0)); \ - } - #undef _syscall2 - #define _syscall2(type, name, type1, arg1, type2, arg2) \ - type LSS_NAME(name)(type1 arg1, type2 arg2) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1)); \ - } - #undef _syscall3 - #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2)); \ - } - #undef _syscall4 - #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3)); \ - } - #undef _syscall5 - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); LSS_REG(4, arg5); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ - "r"(__r4)); \ - } - #undef _syscall6 - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ - LSS_REG(3, arg4); LSS_REG(4, arg5); LSS_REG(5, arg6); \ - LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ - "r"(__r4), "r"(__r5)); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - long __res; - { - register int __flags __asm__("r0") = flags; - register void *__stack __asm__("r1") = child_stack; - register void *__ptid __asm__("r2") = parent_tidptr; - register void *__tls __asm__("r3") = newtls; - register int *__ctid __asm__("r4") = child_tidptr; - __asm__ __volatile__(/* if (fn == NULL || child_stack == NULL) - * return -EINVAL; - */ - "cmp %2,#0\n" - "cmpne %3,#0\n" - "moveq %0,%1\n" - "beq 1f\n" - - /* Push "arg" and "fn" onto the stack that will be - * used by the child. - */ - "str %5,[%3,#-4]!\n" - "str %2,[%3,#-4]!\n" - - /* %r0 = syscall(%r0 = flags, - * %r1 = child_stack, - * %r2 = parent_tidptr, - * %r3 = newtls, - * %r4 = child_tidptr) - */ - "mov r7, %9\n" - "swi 0x0\n" - - /* if (%r0 != 0) - * return %r0; - */ - "movs %0,r0\n" - "bne 1f\n" - - /* In the child, now. Call "fn(arg)". - */ - "ldr r0,[sp, #4]\n" - "mov lr,pc\n" - "ldr pc,[sp]\n" - - /* Call _exit(%r0). - */ - "mov r7, %10\n" - "swi 0x0\n" - "1:\n" - : "=r" (__res) - : "i"(-EINVAL), - "r"(fn), "r"(__stack), "r"(__flags), "r"(arg), - "r"(__ptid), "r"(__tls), "r"(__ctid), - "i"(__NR_clone), "i"(__NR_exit) - : "cc", "r7", "lr", "memory"); - } - LSS_RETURN(int, __res); - } - #elif defined(__mips__) - #undef LSS_REG - #define LSS_REG(r,a) register unsigned long __r##r __asm__("$"#r) = \ - (unsigned long)(a) - #undef LSS_BODY - #define LSS_BODY(type,name,r7,...) \ - register unsigned long __v0 __asm__("$2") = __NR_##name; \ - __asm__ __volatile__ ("syscall\n" \ - : "=&r"(__v0), r7 (__r7) \ - : "0"(__v0), ##__VA_ARGS__ \ - : "$8", "$9", "$10", "$11", "$12", \ - "$13", "$14", "$15", "$24", "memory"); \ - LSS_RETURN(type, __v0, __r7) - #undef _syscall0 - #define _syscall0(type, name) \ - type LSS_NAME(name)() { \ - register unsigned long __r7 __asm__("$7"); \ - LSS_BODY(type, name, "=r"); \ - } - #undef _syscall1 - #define _syscall1(type, name, type1, arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - register unsigned long __r7 __asm__("$7"); \ - LSS_REG(4, arg1); LSS_BODY(type, name, "=r", "r"(__r4)); \ - } - #undef _syscall2 - #define _syscall2(type, name, type1, arg1, type2, arg2) \ - type LSS_NAME(name)(type1 arg1, type2 arg2) { \ - register unsigned long __r7 __asm__("$7"); \ - LSS_REG(4, arg1); LSS_REG(5, arg2); \ - LSS_BODY(type, name, "=r", "r"(__r4), "r"(__r5)); \ - } - #undef _syscall3 - #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ - register unsigned long __r7 __asm__("$7"); \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_BODY(type, name, "=r", "r"(__r4), "r"(__r5), "r"(__r6)); \ - } - #undef _syscall4 - #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_REG(7, arg4); \ - LSS_BODY(type, name, "+r", "r"(__r4), "r"(__r5), "r"(__r6)); \ - } - #undef _syscall5 - #if _MIPS_SIM == _MIPS_SIM_ABI32 - /* The old 32bit MIPS system call API passes the fifth and sixth argument - * on the stack, whereas the new APIs use registers "r8" and "r9". - */ - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_REG(7, arg4); \ - register unsigned long __v0 __asm__("$2"); \ - __asm__ __volatile__ (".set noreorder\n" \ - "lw $2, %6\n" \ - "subu $29, 32\n" \ - "sw $2, 16($29)\n" \ - "li $2, %2\n" \ - "syscall\n" \ - "addiu $29, 32\n" \ - ".set reorder\n" \ - : "=&r"(__v0), "+r" (__r7) \ - : "i" (__NR_##name), "r"(__r4), "r"(__r5), \ - "r"(__r6), "m" ((unsigned long)arg5) \ - : "$8", "$9", "$10", "$11", "$12", \ - "$13", "$14", "$15", "$24", "memory"); \ - LSS_RETURN(type, __v0, __r7); \ - } - #else - #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_REG(7, arg4); LSS_REG(8, arg5); \ - LSS_BODY(type, name, "+r", "r"(__r4), "r"(__r5), "r"(__r6), \ - "r"(__r8)); \ - } - #endif - #undef _syscall6 - #if _MIPS_SIM == _MIPS_SIM_ABI32 - /* The old 32bit MIPS system call API passes the fifth and sixth argument - * on the stack, whereas the new APIs use registers "r8" and "r9". - */ - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_REG(7, arg4); \ - register unsigned long __v0 __asm__("$2"); \ - __asm__ __volatile__ (".set noreorder\n" \ - "lw $2, %6\n" \ - "lw $8, %7\n" \ - "subu $29, 32\n" \ - "sw $2, 16($29)\n" \ - "sw $8, 20($29)\n" \ - "li $2, %2\n" \ - "syscall\n" \ - "addiu $29, 32\n" \ - ".set reorder\n" \ - : "=&r"(__v0), "+r" (__r7) \ - : "i" (__NR_##name), "r"(__r4), "r"(__r5), \ - "r"(__r6), "r" ((unsigned long)arg5), \ - "r" ((unsigned long)arg6) \ - : "$8", "$9", "$10", "$11", "$12", \ - "$13", "$14", "$15", "$24", "memory"); \ - LSS_RETURN(type, __v0, __r7); \ - } - #else - #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5,type6 arg6) { \ - LSS_REG(4, arg1); LSS_REG(5, arg2); LSS_REG(6, arg3); \ - LSS_REG(7, arg4); LSS_REG(8, arg5); LSS_REG(9, arg6); \ - LSS_BODY(type, name, "+r", "r"(__r4), "r"(__r5), "r"(__r6), \ - "r"(__r8), "r"(__r9)); \ - } - #endif - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - register unsigned long __v0 __asm__("$2"); - register unsigned long __r7 __asm__("$7") = (unsigned long)newtls; - { - register int __flags __asm__("$4") = flags; - register void *__stack __asm__("$5") = child_stack; - register void *__ptid __asm__("$6") = parent_tidptr; - register int *__ctid __asm__("$8") = child_tidptr; - __asm__ __volatile__( - #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 - "subu $29,24\n" - #elif _MIPS_SIM == _MIPS_SIM_NABI32 - "sub $29,16\n" - #else - "dsubu $29,16\n" - #endif - - /* if (fn == NULL || child_stack == NULL) - * return -EINVAL; - */ - "li %0,%2\n" - "beqz %5,1f\n" - "beqz %6,1f\n" - - /* Push "arg" and "fn" onto the stack that will be - * used by the child. - */ - #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 - "subu %6,32\n" - "sw %5,0(%6)\n" - "sw %8,4(%6)\n" - #elif _MIPS_SIM == _MIPS_SIM_NABI32 - "sub %6,32\n" - "sw %5,0(%6)\n" - "sw %8,8(%6)\n" - #else - "dsubu %6,32\n" - "sd %5,0(%6)\n" - "sd %8,8(%6)\n" - #endif - - /* $7 = syscall($4 = flags, - * $5 = child_stack, - * $6 = parent_tidptr, - * $7 = newtls, - * $8 = child_tidptr) - */ - "li $2,%3\n" - "syscall\n" - - /* if ($7 != 0) - * return $2; - */ - "bnez $7,1f\n" - "bnez $2,1f\n" - - /* In the child, now. Call "fn(arg)". - */ - #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 - "lw $25,0($29)\n" - "lw $4,4($29)\n" - #elif _MIPS_SIM == _MIPS_SIM_NABI32 - "lw $25,0($29)\n" - "lw $4,8($29)\n" - #else - "ld $25,0($29)\n" - "ld $4,8($29)\n" - #endif - "jalr $25\n" - - /* Call _exit($2) - */ - "move $4,$2\n" - "li $2,%4\n" - "syscall\n" - - "1:\n" - #if _MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32 - "addu $29, 24\n" - #elif _MIPS_SIM == _MIPS_SIM_NABI32 - "add $29, 16\n" - #else - "daddu $29,16\n" - #endif - : "=&r" (__v0), "=r" (__r7) - : "i"(-EINVAL), "i"(__NR_clone), "i"(__NR_exit), - "r"(fn), "r"(__stack), "r"(__flags), "r"(arg), - "r"(__ptid), "r"(__r7), "r"(__ctid) - : "$9", "$10", "$11", "$12", "$13", "$14", "$15", - "$24", "memory"); - } - LSS_RETURN(int, __v0, __r7); - } - #elif defined (__PPC__) - #undef LSS_LOADARGS_0 - #define LSS_LOADARGS_0(name, dummy...) \ - __sc_0 = __NR_##name - #undef LSS_LOADARGS_1 - #define LSS_LOADARGS_1(name, arg1) \ - LSS_LOADARGS_0(name); \ - __sc_3 = (unsigned long) (arg1) - #undef LSS_LOADARGS_2 - #define LSS_LOADARGS_2(name, arg1, arg2) \ - LSS_LOADARGS_1(name, arg1); \ - __sc_4 = (unsigned long) (arg2) - #undef LSS_LOADARGS_3 - #define LSS_LOADARGS_3(name, arg1, arg2, arg3) \ - LSS_LOADARGS_2(name, arg1, arg2); \ - __sc_5 = (unsigned long) (arg3) - #undef LSS_LOADARGS_4 - #define LSS_LOADARGS_4(name, arg1, arg2, arg3, arg4) \ - LSS_LOADARGS_3(name, arg1, arg2, arg3); \ - __sc_6 = (unsigned long) (arg4) - #undef LSS_LOADARGS_5 - #define LSS_LOADARGS_5(name, arg1, arg2, arg3, arg4, arg5) \ - LSS_LOADARGS_4(name, arg1, arg2, arg3, arg4); \ - __sc_7 = (unsigned long) (arg5) - #undef LSS_LOADARGS_6 - #define LSS_LOADARGS_6(name, arg1, arg2, arg3, arg4, arg5, arg6) \ - LSS_LOADARGS_5(name, arg1, arg2, arg3, arg4, arg5); \ - __sc_8 = (unsigned long) (arg6) - #undef LSS_ASMINPUT_0 - #define LSS_ASMINPUT_0 "0" (__sc_0) - #undef LSS_ASMINPUT_1 - #define LSS_ASMINPUT_1 LSS_ASMINPUT_0, "1" (__sc_3) - #undef LSS_ASMINPUT_2 - #define LSS_ASMINPUT_2 LSS_ASMINPUT_1, "2" (__sc_4) - #undef LSS_ASMINPUT_3 - #define LSS_ASMINPUT_3 LSS_ASMINPUT_2, "3" (__sc_5) - #undef LSS_ASMINPUT_4 - #define LSS_ASMINPUT_4 LSS_ASMINPUT_3, "4" (__sc_6) - #undef LSS_ASMINPUT_5 - #define LSS_ASMINPUT_5 LSS_ASMINPUT_4, "5" (__sc_7) - #undef LSS_ASMINPUT_6 - #define LSS_ASMINPUT_6 LSS_ASMINPUT_5, "6" (__sc_8) - #undef LSS_BODY - #define LSS_BODY(nr, type, name, args...) \ - long __sc_ret, __sc_err; \ - { \ - register unsigned long __sc_0 __asm__ ("r0"); \ - register unsigned long __sc_3 __asm__ ("r3"); \ - register unsigned long __sc_4 __asm__ ("r4"); \ - register unsigned long __sc_5 __asm__ ("r5"); \ - register unsigned long __sc_6 __asm__ ("r6"); \ - register unsigned long __sc_7 __asm__ ("r7"); \ - register unsigned long __sc_8 __asm__ ("r8"); \ - \ - LSS_LOADARGS_##nr(name, args); \ - __asm__ __volatile__ \ - ("sc\n\t" \ - "mfcr %0" \ - : "=&r" (__sc_0), \ - "=&r" (__sc_3), "=&r" (__sc_4), \ - "=&r" (__sc_5), "=&r" (__sc_6), \ - "=&r" (__sc_7), "=&r" (__sc_8) \ - : LSS_ASMINPUT_##nr \ - : "cr0", "ctr", "memory", \ - "r9", "r10", "r11", "r12"); \ - __sc_ret = __sc_3; \ - __sc_err = __sc_0; \ - } \ - LSS_RETURN(type, __sc_ret, __sc_err) - #undef _syscall0 - #define _syscall0(type, name) \ - type LSS_NAME(name)(void) { \ - LSS_BODY(0, type, name); \ - } - #undef _syscall1 - #define _syscall1(type, name, type1, arg1) \ - type LSS_NAME(name)(type1 arg1) { \ - LSS_BODY(1, type, name, arg1); \ - } - #undef _syscall2 - #define _syscall2(type, name, type1, arg1, type2, arg2) \ - type LSS_NAME(name)(type1 arg1, type2 arg2) { \ - LSS_BODY(2, type, name, arg1, arg2); \ - } - #undef _syscall3 - #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ - LSS_BODY(3, type, name, arg1, arg2, arg3); \ - } - #undef _syscall4 - #define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ - LSS_BODY(4, type, name, arg1, arg2, arg3, arg4); \ - } - #undef _syscall5 - #define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5) { \ - LSS_BODY(5, type, name, arg1, arg2, arg3, arg4, arg5); \ - } - #undef _syscall6 - #define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ - type5 arg5, type6 arg6) { \ - LSS_BODY(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \ - } - /* clone function adapted from glibc 2.3.6 clone.S */ - /* TODO(csilvers): consider wrapping some args up in a struct, like we - * do for i386's _syscall6, so we can compile successfully on gcc 2.95 - */ - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, - int flags, void *arg, int *parent_tidptr, - void *newtls, int *child_tidptr) { - long __ret, __err; - { - register int (*__fn)(void *) __asm__ ("r8") = fn; - register void *__cstack __asm__ ("r4") = child_stack; - register int __flags __asm__ ("r3") = flags; - register void * __arg __asm__ ("r9") = arg; - register int * __ptidptr __asm__ ("r5") = parent_tidptr; - register void * __newtls __asm__ ("r6") = newtls; - register int * __ctidptr __asm__ ("r7") = child_tidptr; - __asm__ __volatile__( - /* check for fn == NULL - * and child_stack == NULL - */ - "cmpwi cr0, %6, 0\n\t" - "cmpwi cr1, %7, 0\n\t" - "cror cr0*4+eq, cr1*4+eq, cr0*4+eq\n\t" - "beq- cr0, 1f\n\t" - - /* set up stack frame for child */ - "clrrwi %7, %7, 4\n\t" - "li 0, 0\n\t" - "stwu 0, -16(%7)\n\t" - - /* fn, arg, child_stack are saved across the syscall: r28-30 */ - "mr 28, %6\n\t" - "mr 29, %7\n\t" - "mr 27, %9\n\t" - - /* syscall */ - "li 0, %4\n\t" - /* flags already in r3 - * child_stack already in r4 - * ptidptr already in r5 - * newtls already in r6 - * ctidptr already in r7 - */ - "sc\n\t" - - /* Test if syscall was successful */ - "cmpwi cr1, 3, 0\n\t" - "crandc cr1*4+eq, cr1*4+eq, cr0*4+so\n\t" - "bne- cr1, 1f\n\t" - - /* Do the function call */ - "mtctr 28\n\t" - "mr 3, 27\n\t" - "bctrl\n\t" - - /* Call _exit(r3) */ - "li 0, %5\n\t" - "sc\n\t" - - /* Return to parent */ - "1:\n" - "mfcr %1\n\t" - "mr %0, 3\n\t" - : "=r" (__ret), "=r" (__err) - : "0" (-1), "1" (EINVAL), - "i" (__NR_clone), "i" (__NR_exit), - "r" (__fn), "r" (__cstack), "r" (__flags), - "r" (__arg), "r" (__ptidptr), "r" (__newtls), - "r" (__ctidptr) - : "cr0", "cr1", "memory", "ctr", - "r0", "r29", "r27", "r28"); - } - LSS_RETURN(int, __ret, __err); - } - #endif - #define __NR__exit __NR_exit - #define __NR__gettid __NR_gettid - #define __NR__mremap __NR_mremap - LSS_INLINE _syscall1(int, brk, void *, e) - LSS_INLINE _syscall1(int, chdir, const char *,p) - LSS_INLINE _syscall1(int, close, int, f) - LSS_INLINE _syscall2(int, clock_getres, int, c, - struct kernel_timespec*, t) - LSS_INLINE _syscall2(int, clock_gettime, int, c, - struct kernel_timespec*, t) - LSS_INLINE _syscall1(int, dup, int, f) - LSS_INLINE _syscall2(int, dup2, int, s, - int, d) - LSS_INLINE _syscall3(int, execve, const char*, f, - const char*const*,a,const char*const*, e) - LSS_INLINE _syscall1(int, _exit, int, e) - LSS_INLINE _syscall1(int, exit_group, int, e) - LSS_INLINE _syscall3(int, fcntl, int, f, - int, c, long, a) - LSS_INLINE _syscall0(pid_t, fork) - LSS_INLINE _syscall2(int, fstat, int, f, - struct kernel_stat*, b) - LSS_INLINE _syscall2(int, fstatfs, int, f, - struct kernel_statfs*, b) - LSS_INLINE _syscall2(int, ftruncate, int, f, - off_t, l) - LSS_INLINE _syscall4(int, futex, int*, a, - int, o, int, v, - struct kernel_timespec*, t) - LSS_INLINE _syscall3(int, getdents, int, f, - struct kernel_dirent*, d, int, c) - LSS_INLINE _syscall3(int, getdents64, int, f, - struct kernel_dirent64*, d, int, c) - LSS_INLINE _syscall0(gid_t, getegid) - LSS_INLINE _syscall0(uid_t, geteuid) - LSS_INLINE _syscall0(pid_t, getpgrp) - LSS_INLINE _syscall0(pid_t, getpid) - LSS_INLINE _syscall0(pid_t, getppid) - LSS_INLINE _syscall2(int, getpriority, int, a, - int, b) - LSS_INLINE _syscall3(int, getresgid, gid_t *, r, - gid_t *, e, gid_t *, s) - LSS_INLINE _syscall3(int, getresuid, uid_t *, r, - uid_t *, e, uid_t *, s) -#if !defined(__ARM_EABI__) - LSS_INLINE _syscall2(int, getrlimit, int, r, - struct kernel_rlimit*, l) -#endif - LSS_INLINE _syscall1(pid_t, getsid, pid_t, p) - LSS_INLINE _syscall0(pid_t, _gettid) - LSS_INLINE _syscall2(pid_t, gettimeofday, struct kernel_timeval*, t, - void*, tz) - LSS_INLINE _syscall5(int, setxattr, const char *,p, - const char *, n, const void *,v, - size_t, s, int, f) - LSS_INLINE _syscall5(int, lsetxattr, const char *,p, - const char *, n, const void *,v, - size_t, s, int, f) - LSS_INLINE _syscall4(ssize_t, getxattr, const char *,p, - const char *, n, void *, v, size_t, s) - LSS_INLINE _syscall4(ssize_t, lgetxattr, const char *,p, - const char *, n, void *, v, size_t, s) - LSS_INLINE _syscall3(ssize_t, listxattr, const char *,p, - char *, l, size_t, s) - LSS_INLINE _syscall3(ssize_t, llistxattr, const char *,p, - char *, l, size_t, s) - LSS_INLINE _syscall3(int, ioctl, int, d, - int, r, void *, a) - LSS_INLINE _syscall2(int, ioprio_get, int, which, - int, who) - LSS_INLINE _syscall3(int, ioprio_set, int, which, - int, who, int, ioprio) - LSS_INLINE _syscall2(int, kill, pid_t, p, - int, s) - LSS_INLINE _syscall3(off_t, lseek, int, f, - off_t, o, int, w) - LSS_INLINE _syscall2(int, munmap, void*, s, - size_t, l) - LSS_INLINE _syscall6(long, move_pages, pid_t, p, - unsigned long, n, void **,g, int *, d, - int *, s, int, f) - LSS_INLINE _syscall3(int, mprotect, const void *,a, - size_t, l, int, p) - LSS_INLINE _syscall5(void*, _mremap, void*, o, - size_t, os, size_t, ns, - unsigned long, f, void *, a) - LSS_INLINE _syscall3(int, open, const char*, p, - int, f, int, m) - LSS_INLINE _syscall3(int, poll, struct kernel_pollfd*, u, - unsigned int, n, int, t) - LSS_INLINE _syscall2(int, prctl, int, o, - long, a) - LSS_INLINE _syscall4(long, ptrace, int, r, - pid_t, p, void *, a, void *, d) - #if defined(__NR_quotactl) - // Defined on x86_64 / i386 only - LSS_INLINE _syscall4(int, quotactl, int, cmd, const char *, special, - int, id, caddr_t, addr) - #endif - LSS_INLINE _syscall3(ssize_t, read, int, f, - void *, b, size_t, c) - LSS_INLINE _syscall3(int, readlink, const char*, p, - char*, b, size_t, s) - LSS_INLINE _syscall4(int, rt_sigaction, int, s, - const struct kernel_sigaction*, a, - struct kernel_sigaction*, o, size_t, c) - LSS_INLINE _syscall2(int, rt_sigpending, struct kernel_sigset_t *, s, - size_t, c) - LSS_INLINE _syscall4(int, rt_sigprocmask, int, h, - const struct kernel_sigset_t*, s, - struct kernel_sigset_t*, o, size_t, c) - LSS_INLINE _syscall2(int, rt_sigsuspend, - const struct kernel_sigset_t*, s, size_t, c) - LSS_INLINE _syscall3(int, sched_getaffinity,pid_t, p, - unsigned int, l, unsigned long *, m) - LSS_INLINE _syscall3(int, sched_setaffinity,pid_t, p, - unsigned int, l, unsigned long *, m) - LSS_INLINE _syscall0(int, sched_yield) - LSS_INLINE _syscall1(long, set_tid_address, int *, t) - LSS_INLINE _syscall1(int, setfsgid, gid_t, g) - LSS_INLINE _syscall1(int, setfsuid, uid_t, u) - LSS_INLINE _syscall1(int, setuid, uid_t, u) - LSS_INLINE _syscall1(int, setgid, gid_t, g) - LSS_INLINE _syscall2(int, setpgid, pid_t, p, - pid_t, g) - LSS_INLINE _syscall3(int, setpriority, int, a, - int, b, int, p) - LSS_INLINE _syscall3(int, setresgid, gid_t, r, - gid_t, e, gid_t, s) - LSS_INLINE _syscall3(int, setresuid, uid_t, r, - uid_t, e, uid_t, s) - LSS_INLINE _syscall2(int, setrlimit, int, r, - const struct kernel_rlimit*, l) - LSS_INLINE _syscall0(pid_t, setsid) - LSS_INLINE _syscall2(int, sigaltstack, const stack_t*, s, - const stack_t*, o) - #if defined(__NR_sigreturn) - LSS_INLINE _syscall1(int, sigreturn, unsigned long, u); - #endif - LSS_INLINE _syscall2(int, stat, const char*, f, - struct kernel_stat*, b) - LSS_INLINE _syscall2(int, statfs, const char*, f, - struct kernel_statfs*, b) - LSS_INLINE _syscall3(int, tgkill, pid_t, p, - pid_t, t, int, s) - LSS_INLINE _syscall2(int, tkill, pid_t, p, - int, s) - LSS_INLINE _syscall1(int, unlink, const char*, f) - LSS_INLINE _syscall3(ssize_t, write, int, f, - const void *, b, size_t, c) - LSS_INLINE _syscall3(ssize_t, writev, int, f, - const struct kernel_iovec*, v, size_t, c) - #if defined(__NR_getcpu) - LSS_INLINE _syscall3(long, getcpu, unsigned *, cpu, - unsigned *, node, void *, unused); - #endif - #if defined(__x86_64__) || \ - (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI32) - LSS_INLINE _syscall3(int, recvmsg, int, s, - struct kernel_msghdr*, m, int, f) - LSS_INLINE _syscall3(int, sendmsg, int, s, - const struct kernel_msghdr*, m, int, f) - LSS_INLINE _syscall6(int, sendto, int, s, - const void*, m, size_t, l, - int, f, - const struct kernel_sockaddr*, a, int, t) - LSS_INLINE _syscall2(int, shutdown, int, s, - int, h) - LSS_INLINE _syscall3(int, socket, int, d, - int, t, int, p) - LSS_INLINE _syscall4(int, socketpair, int, d, - int, t, int, p, int*, s) - #endif - #if defined(__x86_64__) - LSS_INLINE _syscall4(int, fallocate, int, fd, int, mode, - loff_t, offset, loff_t, len) - - LSS_INLINE int LSS_NAME(getresgid32)(gid_t *rgid, - gid_t *egid, - gid_t *sgid) { - return LSS_NAME(getresgid)(rgid, egid, sgid); - } - - LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, - uid_t *euid, - uid_t *suid) { - return LSS_NAME(getresuid)(ruid, euid, suid); - } - - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, - __off64_t, o) - - LSS_INLINE _syscall4(int, newfstatat, int, d, - const char *, p, - struct kernel_stat*, b, int, f) - - LSS_INLINE int LSS_NAME(setfsgid32)(gid_t gid) { - return LSS_NAME(setfsgid)(gid); - } - - LSS_INLINE int LSS_NAME(setfsuid32)(uid_t uid) { - return LSS_NAME(setfsuid)(uid); - } - - LSS_INLINE int LSS_NAME(setresgid32)(gid_t rgid, gid_t egid, gid_t sgid) { - return LSS_NAME(setresgid)(rgid, egid, sgid); - } - - LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { - return LSS_NAME(setresuid)(ruid, euid, suid); - } - - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { - /* On x86_64, the kernel requires us to always set our own - * SA_RESTORER in order to be able to return from a signal handler. - * This function must have a "magic" signature that the "gdb" - * (and maybe the kernel?) can recognize. - */ - if (act != NULL && !(act->sa_flags & SA_RESTORER)) { - struct kernel_sigaction a = *act; - a.sa_flags |= SA_RESTORER; - a.sa_restorer = LSS_NAME(restore_rt)(); - return LSS_NAME(rt_sigaction)(signum, &a, oldact, - (KERNEL_NSIG+7)/8); - } else { - return LSS_NAME(rt_sigaction)(signum, act, oldact, - (KERNEL_NSIG+7)/8); - } - } - - LSS_INLINE int LSS_NAME(sigpending)(struct kernel_sigset_t *set) { - return LSS_NAME(rt_sigpending)(set, (KERNEL_NSIG+7)/8); - } - - LSS_INLINE int LSS_NAME(sigprocmask)(int how, - const struct kernel_sigset_t *set, - struct kernel_sigset_t *oldset) { - return LSS_NAME(rt_sigprocmask)(how, set, oldset, (KERNEL_NSIG+7)/8); - } - - LSS_INLINE int LSS_NAME(sigsuspend)(const struct kernel_sigset_t *set) { - return LSS_NAME(rt_sigsuspend)(set, (KERNEL_NSIG+7)/8); - } - #endif - #if defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ - defined(__ARM_EABI__) || \ - (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI32) - LSS_INLINE _syscall4(pid_t, wait4, pid_t, p, - int*, s, int, o, - struct kernel_rusage*, r) - - LSS_INLINE pid_t LSS_NAME(waitpid)(pid_t pid, int *status, int options){ - return LSS_NAME(wait4)(pid, status, options, 0); - } - #endif - #if defined(__i386__) || defined(__x86_64__) - LSS_INLINE _syscall4(int, openat, int, d, const char *, p, int, f, int, m) - LSS_INLINE _syscall3(int, unlinkat, int, d, const char *, p, int, f) - #endif - #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) - #define __NR__getresgid32 __NR_getresgid32 - #define __NR__getresuid32 __NR_getresuid32 - #define __NR__setfsgid32 __NR_setfsgid32 - #define __NR__setfsuid32 __NR_setfsuid32 - #define __NR__setresgid32 __NR_setresgid32 - #define __NR__setresuid32 __NR_setresuid32 -#if defined(__ARM_EABI__) - LSS_INLINE _syscall2(int, ugetrlimit, int, r, - struct kernel_rlimit*, l) -#endif - LSS_INLINE _syscall3(int, _getresgid32, gid_t *, r, - gid_t *, e, gid_t *, s) - LSS_INLINE _syscall3(int, _getresuid32, uid_t *, r, - uid_t *, e, uid_t *, s) - LSS_INLINE _syscall1(int, _setfsgid32, gid_t, f) - LSS_INLINE _syscall1(int, _setfsuid32, uid_t, f) - LSS_INLINE _syscall3(int, _setresgid32, gid_t, r, - gid_t, e, gid_t, s) - LSS_INLINE _syscall3(int, _setresuid32, uid_t, r, - uid_t, e, uid_t, s) - - LSS_INLINE int LSS_NAME(getresgid32)(gid_t *rgid, - gid_t *egid, - gid_t *sgid) { - int rc; - if ((rc = LSS_NAME(_getresgid32)(rgid, egid, sgid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((rgid == NULL) || (egid == NULL) || (sgid == NULL)) { - return EFAULT; - } - // Clear the high bits first, since getresgid only sets 16 bits - *rgid = *egid = *sgid = 0; - rc = LSS_NAME(getresgid)(rgid, egid, sgid); - } - return rc; - } - - LSS_INLINE int LSS_NAME(getresuid32)(uid_t *ruid, - uid_t *euid, - uid_t *suid) { - int rc; - if ((rc = LSS_NAME(_getresuid32)(ruid, euid, suid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((ruid == NULL) || (euid == NULL) || (suid == NULL)) { - return EFAULT; - } - // Clear the high bits first, since getresuid only sets 16 bits - *ruid = *euid = *suid = 0; - rc = LSS_NAME(getresuid)(ruid, euid, suid); - } - return rc; - } - - LSS_INLINE int LSS_NAME(setfsgid32)(gid_t gid) { - int rc; - if ((rc = LSS_NAME(_setfsgid32)(gid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((unsigned int)gid & ~0xFFFFu) { - rc = EINVAL; - } else { - rc = LSS_NAME(setfsgid)(gid); - } - } - return rc; - } - - LSS_INLINE int LSS_NAME(setfsuid32)(uid_t uid) { - int rc; - if ((rc = LSS_NAME(_setfsuid32)(uid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((unsigned int)uid & ~0xFFFFu) { - rc = EINVAL; - } else { - rc = LSS_NAME(setfsuid)(uid); - } - } - return rc; - } - - LSS_INLINE int LSS_NAME(setresgid32)(gid_t rgid, gid_t egid, gid_t sgid) { - int rc; - if ((rc = LSS_NAME(_setresgid32)(rgid, egid, sgid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((unsigned int)rgid & ~0xFFFFu || - (unsigned int)egid & ~0xFFFFu || - (unsigned int)sgid & ~0xFFFFu) { - rc = EINVAL; - } else { - rc = LSS_NAME(setresgid)(rgid, egid, sgid); - } - } - return rc; - } - - LSS_INLINE int LSS_NAME(setresuid32)(uid_t ruid, uid_t euid, uid_t suid) { - int rc; - if ((rc = LSS_NAME(_setresuid32)(ruid, euid, suid)) < 0 && - LSS_ERRNO == ENOSYS) { - if ((unsigned int)ruid & ~0xFFFFu || - (unsigned int)euid & ~0xFFFFu || - (unsigned int)suid & ~0xFFFFu) { - rc = EINVAL; - } else { - rc = LSS_NAME(setresuid)(ruid, euid, suid); - } - } - return rc; - } - #endif - LSS_INLINE int LSS_NAME(sigemptyset)(struct kernel_sigset_t *set) { - memset(&set->sig, 0, sizeof(set->sig)); - return 0; - } - - LSS_INLINE int LSS_NAME(sigfillset)(struct kernel_sigset_t *set) { - memset(&set->sig, -1, sizeof(set->sig)); - return 0; - } - - LSS_INLINE int LSS_NAME(sigaddset)(struct kernel_sigset_t *set, - int signum) { - if (signum < 1 || signum > (int)(8*sizeof(set->sig))) { - LSS_ERRNO = EINVAL; - return -1; - } else { - set->sig[(signum - 1)/(8*sizeof(set->sig[0]))] - |= 1UL << ((signum - 1) % (8*sizeof(set->sig[0]))); - return 0; - } - } - - LSS_INLINE int LSS_NAME(sigdelset)(struct kernel_sigset_t *set, - int signum) { - if (signum < 1 || signum > (int)(8*sizeof(set->sig))) { - LSS_ERRNO = EINVAL; - return -1; - } else { - set->sig[(signum - 1)/(8*sizeof(set->sig[0]))] - &= ~(1UL << ((signum - 1) % (8*sizeof(set->sig[0])))); - return 0; - } - } - - LSS_INLINE int LSS_NAME(sigismember)(struct kernel_sigset_t *set, - int signum) { - if (signum < 1 || signum > (int)(8*sizeof(set->sig))) { - LSS_ERRNO = EINVAL; - return -1; - } else { - return !!(set->sig[(signum - 1)/(8*sizeof(set->sig[0]))] & - (1UL << ((signum - 1) % (8*sizeof(set->sig[0]))))); - } - } - #if defined(__i386__) || defined(__ARM_ARCH_3__) || \ - defined(__ARM_EABI__) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || defined(__PPC__) - #define __NR__sigaction __NR_sigaction - #define __NR__sigpending __NR_sigpending - #define __NR__sigprocmask __NR_sigprocmask - #define __NR__sigsuspend __NR_sigsuspend - #define __NR__socketcall __NR_socketcall - LSS_INLINE _syscall2(int, fstat64, int, f, - struct kernel_stat64 *, b) - LSS_INLINE _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, - loff_t *, res, uint, wh) -#if !defined(__ARM_EABI__) - LSS_INLINE _syscall1(void*, mmap, void*, a) -#endif - LSS_INLINE _syscall6(void*, mmap2, void*, s, - size_t, l, int, p, - int, f, int, d, - __off64_t, o) - LSS_INLINE _syscall3(int, _sigaction, int, s, - const struct kernel_old_sigaction*, a, - struct kernel_old_sigaction*, o) - LSS_INLINE _syscall1(int, _sigpending, unsigned long*, s) - LSS_INLINE _syscall3(int, _sigprocmask, int, h, - const unsigned long*, s, - unsigned long*, o) - #ifdef __PPC__ - LSS_INLINE _syscall1(int, _sigsuspend, unsigned long, s) - #else - LSS_INLINE _syscall3(int, _sigsuspend, const void*, a, - int, b, - unsigned long, s) - #endif - LSS_INLINE _syscall2(int, stat64, const char *, p, - struct kernel_stat64 *, b) - - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { - int old_errno = LSS_ERRNO; - int rc; - struct kernel_sigaction a; - if (act != NULL) { - a = *act; - #ifdef __i386__ - /* On i386, the kernel requires us to always set our own - * SA_RESTORER when using realtime signals. Otherwise, it does not - * know how to return from a signal handler. This function must have - * a "magic" signature that the "gdb" (and maybe the kernel?) can - * recognize. - * Apparently, a SA_RESTORER is implicitly set by the kernel, when - * using non-realtime signals. - * - * TODO: Test whether ARM needs a restorer - */ - if (!(a.sa_flags & SA_RESTORER)) { - a.sa_flags |= SA_RESTORER; - a.sa_restorer = (a.sa_flags & SA_SIGINFO) - ? LSS_NAME(restore_rt)() : LSS_NAME(restore)(); - } - #endif - } - rc = LSS_NAME(rt_sigaction)(signum, act ? &a : act, oldact, - (KERNEL_NSIG+7)/8); - if (rc < 0 && LSS_ERRNO == ENOSYS) { - struct kernel_old_sigaction oa, ooa, *ptr_a = &oa, *ptr_oa = &ooa; - if (!act) { - ptr_a = NULL; - } else { - oa.sa_handler_ = act->sa_handler_; - memcpy(&oa.sa_mask, &act->sa_mask, sizeof(oa.sa_mask)); - #ifndef __mips__ - oa.sa_restorer = act->sa_restorer; - #endif - oa.sa_flags = act->sa_flags; - } - if (!oldact) { - ptr_oa = NULL; - } - LSS_ERRNO = old_errno; - rc = LSS_NAME(_sigaction)(signum, ptr_a, ptr_oa); - if (rc == 0 && oldact) { - if (act) { - memcpy(oldact, act, sizeof(*act)); - } else { - memset(oldact, 0, sizeof(*oldact)); - } - oldact->sa_handler_ = ptr_oa->sa_handler_; - oldact->sa_flags = ptr_oa->sa_flags; - memcpy(&oldact->sa_mask, &ptr_oa->sa_mask, sizeof(ptr_oa->sa_mask)); - #ifndef __mips__ - oldact->sa_restorer = ptr_oa->sa_restorer; - #endif - } - } - return rc; - } - - LSS_INLINE int LSS_NAME(sigpending)(struct kernel_sigset_t *set) { - int old_errno = LSS_ERRNO; - int rc = LSS_NAME(rt_sigpending)(set, (KERNEL_NSIG+7)/8); - if (rc < 0 && LSS_ERRNO == ENOSYS) { - LSS_ERRNO = old_errno; - LSS_NAME(sigemptyset)(set); - rc = LSS_NAME(_sigpending)(&set->sig[0]); - } - return rc; - } - - LSS_INLINE int LSS_NAME(sigprocmask)(int how, - const struct kernel_sigset_t *set, - struct kernel_sigset_t *oldset) { - int olderrno = LSS_ERRNO; - int rc = LSS_NAME(rt_sigprocmask)(how, set, oldset, (KERNEL_NSIG+7)/8); - if (rc < 0 && LSS_ERRNO == ENOSYS) { - LSS_ERRNO = olderrno; - if (oldset) { - LSS_NAME(sigemptyset)(oldset); - } - rc = LSS_NAME(_sigprocmask)(how, - set ? &set->sig[0] : NULL, - oldset ? &oldset->sig[0] : NULL); - } - return rc; - } - - LSS_INLINE int LSS_NAME(sigsuspend)(const struct kernel_sigset_t *set) { - int olderrno = LSS_ERRNO; - int rc = LSS_NAME(rt_sigsuspend)(set, (KERNEL_NSIG+7)/8); - if (rc < 0 && LSS_ERRNO == ENOSYS) { - LSS_ERRNO = olderrno; - rc = LSS_NAME(_sigsuspend)( - #ifndef __PPC__ - set, 0, - #endif - set->sig[0]); - } - return rc; - } - #endif - #if defined(__PPC__) - #undef LSS_SC_LOADARGS_0 - #define LSS_SC_LOADARGS_0(dummy...) - #undef LSS_SC_LOADARGS_1 - #define LSS_SC_LOADARGS_1(arg1) \ - __sc_4 = (unsigned long) (arg1) - #undef LSS_SC_LOADARGS_2 - #define LSS_SC_LOADARGS_2(arg1, arg2) \ - LSS_SC_LOADARGS_1(arg1); \ - __sc_5 = (unsigned long) (arg2) - #undef LSS_SC_LOADARGS_3 - #define LSS_SC_LOADARGS_3(arg1, arg2, arg3) \ - LSS_SC_LOADARGS_2(arg1, arg2); \ - __sc_6 = (unsigned long) (arg3) - #undef LSS_SC_LOADARGS_4 - #define LSS_SC_LOADARGS_4(arg1, arg2, arg3, arg4) \ - LSS_SC_LOADARGS_3(arg1, arg2, arg3); \ - __sc_7 = (unsigned long) (arg4) - #undef LSS_SC_LOADARGS_5 - #define LSS_SC_LOADARGS_5(arg1, arg2, arg3, arg4, arg5) \ - LSS_SC_LOADARGS_4(arg1, arg2, arg3, arg4); \ - __sc_8 = (unsigned long) (arg5) - #undef LSS_SC_BODY - #define LSS_SC_BODY(nr, type, opt, args...) \ - long __sc_ret, __sc_err; \ - { \ - register unsigned long __sc_0 __asm__ ("r0") = __NR_socketcall; \ - register unsigned long __sc_3 __asm__ ("r3") = opt; \ - register unsigned long __sc_4 __asm__ ("r4"); \ - register unsigned long __sc_5 __asm__ ("r5"); \ - register unsigned long __sc_6 __asm__ ("r6"); \ - register unsigned long __sc_7 __asm__ ("r7"); \ - register unsigned long __sc_8 __asm__ ("r8"); \ - LSS_SC_LOADARGS_##nr(args); \ - __asm__ __volatile__ \ - ("stwu 1, -48(1)\n\t" \ - "stw 4, 20(1)\n\t" \ - "stw 5, 24(1)\n\t" \ - "stw 6, 28(1)\n\t" \ - "stw 7, 32(1)\n\t" \ - "stw 8, 36(1)\n\t" \ - "addi 4, 1, 20\n\t" \ - "sc\n\t" \ - "mfcr %0" \ - : "=&r" (__sc_0), \ - "=&r" (__sc_3), "=&r" (__sc_4), \ - "=&r" (__sc_5), "=&r" (__sc_6), \ - "=&r" (__sc_7), "=&r" (__sc_8) \ - : LSS_ASMINPUT_##nr \ - : "cr0", "ctr", "memory"); \ - __sc_ret = __sc_3; \ - __sc_err = __sc_0; \ - } \ - LSS_RETURN(type, __sc_ret, __sc_err) - - LSS_INLINE ssize_t LSS_NAME(recvmsg)(int s,struct kernel_msghdr *msg, - int flags){ - LSS_SC_BODY(3, ssize_t, 17, s, msg, flags); - } - - LSS_INLINE ssize_t LSS_NAME(sendmsg)(int s, - const struct kernel_msghdr *msg, - int flags) { - LSS_SC_BODY(3, ssize_t, 16, s, msg, flags); - } - - // TODO(csilvers): why is this ifdef'ed out? -#if 0 - LSS_INLINE ssize_t LSS_NAME(sendto)(int s, const void *buf, size_t len, - int flags, - const struct kernel_sockaddr *to, - unsigned int tolen) { - LSS_BODY(6, ssize_t, 11, s, buf, len, flags, to, tolen); - } -#endif - - LSS_INLINE int LSS_NAME(shutdown)(int s, int how) { - LSS_SC_BODY(2, int, 13, s, how); - } - - LSS_INLINE int LSS_NAME(socket)(int domain, int type, int protocol) { - LSS_SC_BODY(3, int, 1, domain, type, protocol); - } - - LSS_INLINE int LSS_NAME(socketpair)(int d, int type, int protocol, - int sv[2]) { - LSS_SC_BODY(4, int, 8, d, type, protocol, sv); - } - #endif - #if defined(__ARM_EABI__) - LSS_INLINE _syscall3(ssize_t, recvmsg, int, s, struct kernel_msghdr*, msg, - int, flags) - LSS_INLINE _syscall3(ssize_t, sendmsg, int, s, const struct kernel_msghdr*, - msg, int, flags) - LSS_INLINE _syscall6(ssize_t, sendto, int, s, const void*, buf, size_t,len, - int, flags, const struct kernel_sockaddr*, to, - unsigned int, tolen) - LSS_INLINE _syscall2(int, shutdown, int, s, int, how) - LSS_INLINE _syscall3(int, socket, int, domain, int, type, int, protocol) - LSS_INLINE _syscall4(int, socketpair, int, d, int, type, int, protocol, - int*, sv) - #endif - #if defined(__i386__) || defined(__ARM_ARCH_3__) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) - #define __NR__socketcall __NR_socketcall - LSS_INLINE _syscall2(int, _socketcall, int, c, - va_list, a) - LSS_INLINE int LSS_NAME(socketcall)(int op, ...) { - int rc; - va_list ap; - va_start(ap, op); - rc = LSS_NAME(_socketcall)(op, ap); - va_end(ap); - return rc; - } - - LSS_INLINE ssize_t LSS_NAME(recvmsg)(int s,struct kernel_msghdr *msg, - int flags){ - return (ssize_t)LSS_NAME(socketcall)(17, s, msg, flags); - } - - LSS_INLINE ssize_t LSS_NAME(sendmsg)(int s, - const struct kernel_msghdr *msg, - int flags) { - return (ssize_t)LSS_NAME(socketcall)(16, s, msg, flags); - } - - LSS_INLINE ssize_t LSS_NAME(sendto)(int s, const void *buf, size_t len, - int flags, - const struct kernel_sockaddr *to, - unsigned int tolen) { - return (ssize_t)LSS_NAME(socketcall)(11, s, buf, len, flags, to, tolen); - } - - LSS_INLINE int LSS_NAME(shutdown)(int s, int how) { - return LSS_NAME(socketcall)(13, s, how); - } - - LSS_INLINE int LSS_NAME(socket)(int domain, int type, int protocol) { - return LSS_NAME(socketcall)(1, domain, type, protocol); - } - - LSS_INLINE int LSS_NAME(socketpair)(int d, int type, int protocol, - int sv[2]) { - return LSS_NAME(socketcall)(8, d, type, protocol, sv); - } - #endif - #if defined(__i386__) || defined(__PPC__) - LSS_INLINE _syscall4(int, fstatat64, int, d, - const char *, p, - struct kernel_stat64 *, b, int, f) - #endif - #if defined(__i386__) || defined(__PPC__) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) - LSS_INLINE _syscall3(pid_t, waitpid, pid_t, p, - int*, s, int, o) - #endif - #if defined(__mips__) - /* sys_pipe() on MIPS has non-standard calling conventions, as it returns - * both file handles through CPU registers. - */ - LSS_INLINE int LSS_NAME(pipe)(int *p) { - register unsigned long __v0 __asm__("$2") = __NR_pipe; - register unsigned long __v1 __asm__("$3"); - register unsigned long __r7 __asm__("$7"); - __asm__ __volatile__ ("syscall\n" - : "=&r"(__v0), "=&r"(__v1), "+r" (__r7) - : "0"(__v0) - : "$8", "$9", "$10", "$11", "$12", - "$13", "$14", "$15", "$24", "memory"); - if (__r7) { - LSS_ERRNO = __v0; - return -1; - } else { - p[0] = __v0; - p[1] = __v1; - return 0; - } - } - #else - LSS_INLINE _syscall1(int, pipe, int *, p) - #endif - /* TODO(csilvers): see if ppc can/should support this as well */ - #if defined(__i386__) || defined(__ARM_ARCH_3__) || \ - defined(__ARM_EABI__) || \ - (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64) - #define __NR__statfs64 __NR_statfs64 - #define __NR__fstatfs64 __NR_fstatfs64 - LSS_INLINE _syscall3(int, _statfs64, const char*, p, - size_t, s,struct kernel_statfs64*, b) - LSS_INLINE _syscall3(int, _fstatfs64, int, f, - size_t, s,struct kernel_statfs64*, b) - LSS_INLINE int LSS_NAME(statfs64)(const char *p, - struct kernel_statfs64 *b) { - return LSS_NAME(_statfs64)(p, sizeof(*b), b); - } - LSS_INLINE int LSS_NAME(fstatfs64)(int f,struct kernel_statfs64 *b) { - return LSS_NAME(_fstatfs64)(f, sizeof(*b), b); - } - #endif - - LSS_INLINE int LSS_NAME(execv)(const char *path, const char *const argv[]) { - extern char **environ; - return LSS_NAME(execve)(path, argv, (const char *const *)environ); - } - - LSS_INLINE pid_t LSS_NAME(gettid)() { - pid_t tid = LSS_NAME(_gettid)(); - if (tid != -1) { - return tid; - } - return LSS_NAME(getpid)(); - } - - LSS_INLINE void *LSS_NAME(mremap)(void *old_address, size_t old_size, - size_t new_size, int flags, ...) { - va_list ap; - void *new_address, *rc; - va_start(ap, flags); - new_address = va_arg(ap, void *); - rc = LSS_NAME(_mremap)(old_address, old_size, new_size, - flags, new_address); - va_end(ap); - return rc; - } - - LSS_INLINE int LSS_NAME(ptrace_detach)(pid_t pid) { - /* PTRACE_DETACH can sometimes forget to wake up the tracee and it - * then sends job control signals to the real parent, rather than to - * the tracer. We reduce the risk of this happening by starting a - * whole new time slice, and then quickly sending a SIGCONT signal - * right after detaching from the tracee. - * - * We use tkill to ensure that we only issue a wakeup for the thread being - * detached. Large multi threaded apps can take a long time in the kernel - * processing SIGCONT. - */ - int rc, err; - LSS_NAME(sched_yield)(); - rc = LSS_NAME(ptrace)(PTRACE_DETACH, pid, (void *)0, (void *)0); - err = LSS_ERRNO; - LSS_NAME(tkill)(pid, SIGCONT); - /* Old systems don't have tkill */ - if (LSS_ERRNO == ENOSYS) - LSS_NAME(kill)(pid, SIGCONT); - LSS_ERRNO = err; - return rc; - } - - LSS_INLINE int LSS_NAME(raise)(int sig) { - return LSS_NAME(kill)(LSS_NAME(getpid)(), sig); - } - - LSS_INLINE int LSS_NAME(setpgrp)() { - return LSS_NAME(setpgid)(0, 0); - } - - LSS_INLINE int LSS_NAME(sysconf)(int name) { - extern int __getpagesize(void); - switch (name) { - case _SC_OPEN_MAX: { - struct kernel_rlimit limit; -#if defined(__ARM_EABI__) - return LSS_NAME(ugetrlimit)(RLIMIT_NOFILE, &limit) < 0 - ? 8192 : limit.rlim_cur; -#else - return LSS_NAME(getrlimit)(RLIMIT_NOFILE, &limit) < 0 - ? 8192 : limit.rlim_cur; -#endif - } - case _SC_PAGESIZE: - return __getpagesize(); - default: - LSS_ERRNO = ENOSYS; - return -1; - } - } - #if defined(__x86_64__) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64) - LSS_INLINE _syscall4(ssize_t, pread64, int, f, - void *, b, size_t, c, - loff_t, o) - LSS_INLINE _syscall4(ssize_t, pwrite64, int, f, - const void *, b, size_t, c, - loff_t, o) - LSS_INLINE _syscall3(int, readahead, int, f, - loff_t, o, unsigned, c) - #else - #define __NR__pread64 __NR_pread64 - #define __NR__pwrite64 __NR_pwrite64 - #define __NR__readahead __NR_readahead - LSS_INLINE _syscall5(ssize_t, _pread64, int, f, - void *, b, size_t, c, unsigned, o1, - unsigned, o2) - LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f, - const void *, b, size_t, c, unsigned, o1, - long, o2) - LSS_INLINE _syscall4(int, _readahead, int, f, - unsigned, o1, unsigned, o2, size_t, c) - /* We force 64bit-wide parameters onto the stack, then access each - * 32-bit component individually. This guarantees that we build the - * correct parameters independent of the native byte-order of the - * underlying architecture. - */ - LSS_INLINE ssize_t LSS_NAME(pread64)(int fd, void *buf, size_t count, - loff_t off) { - union { loff_t off; unsigned arg[2]; } o = { off }; - return LSS_NAME(_pread64)(fd, buf, count, o.arg[0], o.arg[1]); - } - LSS_INLINE ssize_t LSS_NAME(pwrite64)(int fd, const void *buf, - size_t count, loff_t off) { - union { loff_t off; unsigned arg[2]; } o = { off }; - return LSS_NAME(_pwrite64)(fd, buf, count, o.arg[0], o.arg[1]); - } - LSS_INLINE int LSS_NAME(readahead)(int fd, loff_t off, int len) { - union { loff_t off; unsigned arg[2]; } o = { off }; - return LSS_NAME(_readahead)(fd, o.arg[0], o.arg[1], len); - } - #endif -#endif - -#if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) -} -#endif - -#endif -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CHANGES.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CHANGES.txt deleted file mode 100644 index 4f15eada..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CHANGES.txt +++ /dev/null @@ -1,451 +0,0 @@ -2011-02-02 version 2.4.0: - - General - * The RPC (cc|java|py)_generic_services default value is now false instead of - true. - * Custom options can have aggregate types. For example, - message MyOption { - optional string comment = 1; - optional string author = 2; - } - extend google.protobuf.FieldOptions { - optional MyOption myoption = 12345; - } - This option can now be set as follows: - message SomeType { - optional int32 field = 1 [(myoption) = { comment:'x' author:'y' }]; - } - - C++ - * Various speed and code size optimizations. - * Added a release_foo() method on string and message fields. - * Fixed gzip_output_stream sub-stream handling. - - Java - * Builders now maintain sub-builders for sub-messages. Use getFooBuilder() to - get the builder for the sub-message "foo". This allows you to repeatedly - modify deeply-nested sub-messages without rebuilding them. - * Builder.build() no longer invalidates the Builder for generated messages - (You may continue to modify it and then build another message). - * Code generator will generate efficient equals() and hashCode() - implementations if new option java_generate_equals_and_hash is enabled. - (Otherwise, reflection-based implementations are used.) - * Generated messages now implement Serializable. - * Fields with [deprecated=true] will be marked with @Deprecated in Java. - * Added lazy conversion of UTF-8 encoded strings to String objects to improve - performance. - * Various optimizations. - * Enum value can be accessed directly, instead of calling getNumber() on the - enum member. - * For each enum value, an integer constant is also generated with the suffix - _VALUE. - - Python - * Added an experimental C++ implementation for Python messages via a Python - extension. Implementation type is controlled by an environment variable - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION (valid values: "cpp" and "python") - The default value is currently "python" but will be changed to "cpp" in - future release. - * Improved performance on message instantiation significantly. - Most of the work on message instantiation is done just once per message - class, instead of once per message instance. - * Improved performance on text message parsing. - * Allow add() to forward keyword arguments to the concrete class. - E.g. instead of - item = repeated_field.add() - item.foo = bar - item.baz = quux - You can do: - repeated_field.add(foo=bar, baz=quux) - * Added a sort() interface to the BaseContainer. - * Added an extend() method to repeated composite fields. - * Added UTF8 debug string support. - -2010-01-08 version 2.3.0: - - General - * Parsers for repeated numeric fields now always accept both packed and - unpacked input. The [packed=true] option only affects serializers. - Therefore, it is possible to switch a field to packed format without - breaking backwards-compatibility -- as long as all parties are using - protobuf 2.3.0 or above, at least. - * The generic RPC service code generated by the C++, Java, and Python - generators can be disabled via file options: - option cc_generic_services = false; - option java_generic_services = false; - option py_generic_services = false; - This allows plugins to generate alternative code, possibly specific to some - particular RPC implementation. - - protoc - * Now supports a plugin system for code generators. Plugins can generate - code for new languages or inject additional code into the output of other - code generators. Plugins are just binaries which accept a protocol buffer - on stdin and write a protocol buffer to stdout, so they may be written in - any language. See src/google/protobuf/compiler/plugin.proto. - **WARNING**: Plugins are experimental. The interface may change in a - future version. - * If the output location ends in .zip or .jar, protoc will write its output - to a zip/jar archive instead of a directory. For example: - protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto - Currently the archive contents are not compressed, though this could change - in the future. - * inf, -inf, and nan can now be used as default values for float and double - fields. - - C++ - * Various speed and code size optimizations. - * DynamicMessageFactory is now fully thread-safe. - * Message::Utf8DebugString() method is like DebugString() but avoids escaping - UTF-8 bytes. - * Compiled-in message types can now contain dynamic extensions, through use - of CodedInputStream::SetExtensionRegistry(). - * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to - match other platforms. Use --disable-shared to avoid this. - - Java - * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return - false/null instead of throwing an exception. - * Fixed some initialization ordering bugs. - * Fixes for OpenJDK 7. - - Python - * 10-25 times faster than 2.2.0, still pure-Python. - * Calling a mutating method on a sub-message always instantiates the message - in its parent even if the mutating method doesn't actually mutate anything - (e.g. parsing from an empty string). - * Expanded descriptors a bit. - -2009-08-11 version 2.2.0: - - C++ - * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler - to generate code which only depends libprotobuf-lite, which is much smaller - than libprotobuf but lacks descriptors, reflection, and some other features. - * Fixed bug where Message.Swap(Message) was only implemented for - optimize_for_speed. Swap now properly implemented in both modes - (Issue 91). - * Added RemoveLast and SwapElements(index1, index2) to Reflection - interface for repeated elements. - * Added Swap(Message) to Reflection interface. - * Floating-point literals in generated code that are intended to be - single-precision now explicitly have 'f' suffix to avoid pedantic warnings - produced by some compilers. - * The [deprecated=true] option now causes the C++ code generator to generate - a GCC-style deprecation annotation (no-op on other compilers). - * google::protobuf::GetEnumDescriptor() returns the - EnumDescriptor for that type -- useful for templates which cannot call - SomeGeneratedEnumType_descriptor(). - * Various optimizations and obscure bug fixes. - - Java - * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler - to generate code which only depends libprotobuf-lite, which is much smaller - than libprotobuf but lacks descriptors, reflection, and some other features. - * Lots of style cleanups. - - Python - * Fixed endianness bug with floats and doubles. - * Text format parsing support. - * Fix bug with parsing packed repeated fields in embedded messages. - * Ability to initialize fields by passing keyword args to constructor. - * Support iterators in extend and __setslice__ for containers. - -2009-05-13 version 2.1.0: - - General - * Repeated fields of primitive types (types other that string, group, and - nested messages) may now use the option [packed = true] to get a more - efficient encoding. In the new encoding, the entire list is written - as a single byte blob using the "length-delimited" wire type. Within - this blob, the individual values are encoded the same way they would - be normally except without a tag before each value (thus, they are - tightly "packed"). - * For each field, the generated code contains an integer constant assigned - to the field number. For example, the .proto file: - message Foo { optional int bar_baz = 123; } - would generate the following constants, all with the integer value 123: - C++: Foo::kBarBazFieldNumber - Java: Foo.BAR_BAZ_FIELD_NUMBER - Python: Foo.BAR_BAZ_FIELD_NUMBER - Constants are also generated for extensions, with the same naming scheme. - These constants may be used as switch cases. - * Updated bundled Google Test to version 1.3.0. Google Test is now bundled - in its verbatim form as a nested autoconf package, so you can drop in any - other version of Google Test if needed. - * optimize_for = SPEED is now the default, by popular demand. Use - optimize_for = CODE_SIZE if code size is more important in your app. - * It is now an error to define a default value for a repeated field. - Previously, this was silently ignored (it had no effect on the generated - code). - * Fields can now be marked deprecated like: - optional int32 foo = 1 [deprecated = true]; - Currently this does not have any actual effect, but in the future the code - generators may generate deprecation annotations in each language. - * Cross-compiling should now be possible using the --with-protoc option to - configure. See README.txt for more info. - - protoc - * --error_format=msvs option causes errors to be printed in Visual Studio - format, which should allow them to be clicked on in the build log to go - directly to the error location. - * The type name resolver will no longer resolve type names to fields. For - example, this now works: - message Foo {} - message Bar { - optional int32 Foo = 1; - optional Foo baz = 2; - } - Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get - an error because Bar.Foo is a field, not a type. Now the type of "baz" - resolves to the message type Foo. This change is unlikely to make a - difference to anyone who follows the Protocol Buffers style guide. - - C++ - * Several optimizations, including but not limited to: - - Serialization, especially to flat arrays, is 10%-50% faster, possibly - more for small objects. - - Several descriptor operations which previously required locking no longer - do. - - Descriptors are now constructed lazily on first use, rather than at - process startup time. This should save memory in programs which do not - use descriptors or reflection. - - UnknownFieldSet completely redesigned to be more efficient (especially in - terms of memory usage). - - Various optimizations to reduce code size (though the serialization speed - optimizations increased code size). - * Message interface has method ParseFromBoundedZeroCopyStream() which parses - a limited number of bytes from an input stream rather than parsing until - EOF. - * GzipInputStream and GzipOutputStream support reading/writing gzip- or - zlib-compressed streams if zlib is available. - (google/protobuf/io/gzip_stream.h) - * DescriptorPool::FindAllExtensions() and corresponding - DescriptorDatabase::FindAllExtensions() can be used to enumerate all - extensions of a given type. - * For each enum type Foo, protoc will generate functions: - const string& Foo_Name(Foo value); - bool Foo_Parse(const string& name, Foo* result); - The former returns the name of the enum constant corresponding to the given - value while the latter finds the value corresponding to a name. - * RepeatedField and RepeatedPtrField now have back-insertion iterators. - * String fields now have setters that take a char* and a size, in addition - to the existing ones that took char* or const string&. - * DescriptorPool::AllowUnknownDependencies() may be used to tell - DescriptorPool to create placeholder descriptors for unknown entities - referenced in a FileDescriptorProto. This can allow you to parse a .proto - file without having access to other .proto files that it imports, for - example. - * Updated gtest to latest version. The gtest package is now included as a - nested autoconf package, so it should be able to drop new versions into the - "gtest" subdirectory without modification. - - Java - * Fixed bug where Message.mergeFrom(Message) failed to merge extensions. - * Message interface has new method toBuilder() which is equivalent to - newBuilderForType().mergeFrom(this). - * All enums now implement the ProtocolMessageEnum interface. - * Setting a field to null now throws NullPointerException. - * Fixed tendency for TextFormat's parsing to overflow the stack when - parsing large string values. The underlying problem is with Java's - regex implementation (which unfortunately uses recursive backtracking - rather than building an NFA). Worked around by making use of possesive - quantifiers. - * Generated service classes now also generate pure interfaces. For a service - Foo, Foo.Interface is a pure interface containing all of the service's - defined methods. Foo.newReflectiveService() can be called to wrap an - instance of this interface in a class that implements the generic - RpcService interface, which provides reflection support that is usually - needed by RPC server implementations. - * RPC interfaces now support blocking operation in addition to non-blocking. - The protocol compiler generates separate blocking and non-blocking stubs - which operate against separate blocking and non-blocking RPC interfaces. - RPC implementations will have to implement the new interfaces in order to - support blocking mode. - * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and - writeDelimitedTo() read and write "delemited" messages from/to a stream, - meaning that the message size precedes the data. This way, you can write - multiple messages to a stream without having to worry about delimiting - them yourself. - * Throw a more descriptive exception when build() is double-called. - * Add a method to query whether CodedInputStream is at the end of the input - stream. - * Add a method to reset a CodedInputStream's size counter; useful when - reading many messages with the same stream. - * equals() and hashCode() now account for unknown fields. - - Python - * Added slicing support for repeated scalar fields. Added slice retrieval and - removal of repeated composite fields. - * Updated RPC interfaces to allow for blocking operation. A client may - now pass None for a callback when making an RPC, in which case the - call will block until the response is received, and the response - object will be returned directly to the caller. This interface change - cannot be used in practice until RPC implementations are updated to - implement it. - * Changes to input_stream.py should make protobuf compatible with appengine. - -2008-11-25 version 2.0.3: - - protoc - * Enum values may now have custom options, using syntax similar to field - options. - * Fixed bug where .proto files which use custom options but don't actually - define them (i.e. they import another .proto file defining the options) - had to explicitly import descriptor.proto. - * Adjacent string literals in .proto files will now be concatenated, like in - C. - * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and - the import path only contains "." (or contains "." but does not contain - the file), protoc incorrectly thought that the file was under ".", because - it thought that the path was relative (since it didn't start with a slash). - This has been fixed. - - C++ - * Generated message classes now have a Swap() method which efficiently swaps - the contents of two objects. - * All message classes now have a SpaceUsed() method which returns an estimate - of the number of bytes of allocated memory currently owned by the object. - This is particularly useful when you are reusing a single message object - to improve performance but want to make sure it doesn't bloat up too large. - * New method Message::SerializeAsString() returns a string containing the - serialized data. May be more convenient than calling - SerializeToString(string*). - * In debug mode, log error messages when string-type fields are found to - contain bytes that are not valid UTF-8. - * Fixed bug where a message with multiple extension ranges couldn't parse - extensions. - * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on - a message that contained no fields (but possibly contained extensions). - * Fixed ShortDebugString() to not be O(n^2). Durr. - * Fixed crash in TextFormat parsing if the first token in the input caused a - tokenization error. - * Fixed obscure bugs in zero_copy_stream_impl.cc. - * Added support for HP C++ on Tru64. - * Only build tests on "make check", not "make". - * Fixed alignment issue that caused crashes when using DynamicMessage on - 64-bit Sparc machines. - * Simplify template usage to work with MSVC 2003. - * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup. - (This affected Fedora 9 in particular.) - * Now works on "Solaris 10 using recent Sun Studio". - - Java - * New overload of mergeFrom() which parses a slice of a byte array instead - of the whole thing. - * New method ByteString.asReadOnlyByteBuffer() does what it sounds like. - * Improved performance of isInitialized() when optimizing for code size. - - Python - * Corrected ListFields() signature in Message base class to match what - subclasses actually implement. - * Some minor refactoring. - * Don't pass self as first argument to superclass constructor (no longer - allowed in Python 2.6). - -2008-09-29 version 2.0.2: - - General - * License changed from Apache 2.0 to New BSD. - * It is now possible to define custom "options", which are basically - annotations which may be placed on definitions in a .proto file. - For example, you might define a field option called "foo" like so: - import "google/protobuf/descriptor.proto" - extend google.protobuf.FieldOptions { - optional string foo = 12345; - } - Then you annotate a field using the "foo" option: - message MyMessage { - optional int32 some_field = 1 [(foo) = "bar"] - } - The value of this option is then visible via the message's - Descriptor: - const FieldDescriptor* field = - MyMessage::descriptor()->FindFieldByName("some_field"); - assert(field->options().GetExtension(foo) == "bar"); - This feature has been implemented and tested in C++ and Java. - Other languages may or may not need to do extra work to support - custom options, depending on how they construct descriptors. - - C++ - * Fixed some GCC warnings that only occur when using -pedantic. - * Improved static initialization code, making ordering more - predictable among other things. - * TextFormat will no longer accept messages which contain multiple - instances of a singular field. Previously, the latter instance - would overwrite the former. - * Now works on systems that don't have hash_map. - - Java - * Print @Override annotation in generated code where appropriate. - - Python - * Strings now use the "unicode" type rather than the "str" type. - String fields may still be assigned ASCII "str" values; they will - automatically be converted. - * Adding a property to an object representing a repeated field now - raises an exception. For example: - # No longer works (and never should have). - message.some_repeated_field.foo = 1 - - Windows - * We now build static libraries rather than DLLs by default on MSVC. - See vsprojects/readme.txt for more information. - -2008-08-15 version 2.0.1: - - protoc - * New flags --encode and --decode can be used to convert between protobuf text - format and binary format from the command-line. - * New flag --descriptor_set_out can be used to write FileDescriptorProtos for - all parsed files directly into a single output file. This is particularly - useful if you wish to parse .proto files from programs written in languages - other than C++: just run protoc as a background process and have it output - a FileDescriptorList, then parse that natively. - * Improved error message when an enum value's name conflicts with another - symbol defined in the enum type's scope, e.g. if two enum types declared - in the same scope have values with the same name. This is disallowed for - compatibility with C++, but this wasn't clear from the error. - * Fixed absolute output paths on Windows. - * Allow trailing slashes in --proto_path mappings. - - C++ - * Reflection objects are now per-class rather than per-instance. To make this - possible, the Reflection interface had to be changed such that all methods - take the Message instance as a parameter. This change improves performance - significantly in memory-bandwidth-limited use cases, since it makes the - message objects smaller. Note that source-incompatible interface changes - like this will not be made again after the library leaves beta. - * Heuristically detect sub-messages when printing unknown fields. - * Fix static initialization ordering bug that caused crashes at startup when - compiling on Mac with static linking. - * Fixed TokenizerTest when compiling with -DNDEBUG on Linux. - * Fixed incorrect definition of kint32min. - * Fix bytes type setter to work with byte sequences with embedded NULLs. - * Other irrelevant tweaks. - - Java - * Fixed UnknownFieldSet's parsing of varints larger than 32 bits. - * Fixed TextFormat's parsing of "inf" and "nan". - * Fixed TextFormat's parsing of comments. - * Added info to Java POM that will be required when we upload the - package to a Maven repo. - - Python - * MergeFrom(message) and CopyFrom(message) are now implemented. - * SerializeToString() raises an exception if the message is missing required - fields. - * Code organization improvements. - * Fixed doc comments for RpcController and RpcChannel, which had somehow been - swapped. - * Fixed text_format_test on Windows where floating-point exponents sometimes - contain extra zeros. - * Fix Python service CallMethod() implementation. - - Other - * Improved readmes. - * VIM syntax highlighting improvements. - -2008-07-07 version 2.0.0: - - * First public release. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CONTRIBUTORS.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CONTRIBUTORS.txt deleted file mode 100644 index b39ec308..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/CONTRIBUTORS.txt +++ /dev/null @@ -1,90 +0,0 @@ -This file contains a list of people who have made large contributions -to the public version of Protocol Buffers. - -Original Protocol Buffers design and implementation: - Sanjay Ghemawat - Jeff Dean - Daniel Dulitz - Craig Silverstein - Paul Haahr - Corey Anderson - (and many others) - -Proto2 C++ and Java primary author: - Kenton Varda - -Proto2 Python primary authors: - Will Robinson - Petar Petrov - -Large code contributions: - Jason Hsueh - Joseph Schorr - Wenbo Zhu - -Large quantity of code reviews: - Scott Bruce - Frank Yellin - Neal Norwitz - Jeffrey Yasskin - Ambrose Feinstein - -Documentation: - Lisa Carey - -Maven packaging: - Gregory Kick - -Patch contributors: - Kevin Ko - * Small patch to handle trailing slashes in --proto_path flag. - Johan Euphrosine - * Small patch to fix Python CallMethod(). - Ulrich Kunitz - * Small optimizations to Python serialization. - Leandro Lucarella - * VI syntax highlighting tweaks. - * Fix compiler to not make output executable. - Dilip Joseph - * Heuristic detection of sub-messages when printing unknown fields in - text format. - Brian Atkinson - * Added @Override annotation to generated Java code where appropriate. - Vincent Choinière - * Tru64 support. - Monty Taylor - * Solaris 10 + Sun Studio fixes. - Alek Storm - * Slicing support for repeated scalar fields for the Python API. - Oleg Smolsky - * MS Visual Studio error format option. - * Detect unordered_map in stl_hash.m4. - Brian Olson - * gzip/zlib I/O support. - Michael Poole - * Fixed warnings about generated constructors not explicitly initializing - all fields (only present with certain compiler settings). - * Added generation of field number constants. - Wink Saville - * Fixed initialization ordering problem in logging code. - Will Pierce - * Small patch improving performance of in Python serialization. - Alexandre Vassalotti - * Emacs mode for Protocol Buffers (editors/protobuf-mode.el). - Scott Stafford - * Added Swap(), SwapElements(), and RemoveLast() to Reflection interface. - Alexander Melnikov - * HPUX support. - Oliver Jowett - * Detect whether zlib is new enough in configure script. - * Fixes for Solaris 10 32/64-bit confusion. - Evan Jones - * Optimize Java serialization code when writing a small message to a stream. - * Optimize Java serialization of strings so that UTF-8 encoding happens only - once per string per serialization call. - * Clean up some Java warnings. - * Fix bug with permanent callbacks that delete themselves when run. - Michael Kucharski - * Added CodedInputStream.getTotalBytesRead(). - Kacper Kowalik - * Fixed m4/acx_pthread.m4 problem for some Linux distributions. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/COPYING.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/COPYING.txt deleted file mode 100644 index 705db579..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/COPYING.txt +++ /dev/null @@ -1,33 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/INSTALL.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/INSTALL.txt deleted file mode 100644 index ce3b0949..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/INSTALL.txt +++ /dev/null @@ -1,237 +0,0 @@ -This file contains detailed but generic information on building and -installing the C++ part of this project. For shorter instructions, -as well as instructions for compiling and installing the Java or -Python parts, see README. - -====================================================================== - -Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/Makefile.am deleted file mode 100644 index 9b960fc5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/Makefile.am +++ /dev/null @@ -1,196 +0,0 @@ -## Process this file with automake to produce Makefile.in - -ACLOCAL_AMFLAGS = -I m4 - -AUTOMAKE_OPTIONS = foreign - -# Build . before src so that our all-local and clean-local hooks kicks in at -# the right time. -SUBDIRS = . src - -# Always include gtest in distributions. -DIST_SUBDIRS = $(subdirs) src - -# Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS -# because then "make check" would also build and run all of gtest's own tests, -# which takes a lot of time and is generally not useful to us. Also, we don't -# want "make install" to recurse into gtest since we don't want to overwrite -# the installed version of gtest if there is one. -check-local: - @echo "Making lib/libgtest.a lib/libgtest_main.a in gtest" - @cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la - -# We would like to clean gtest when "make clean" is invoked. But we have to -# be careful because clean-local is also invoked during "make distclean", but -# "make distclean" already recurses into gtest because it's listed among the -# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to -# cd to the directory again and "make clean" it will fail. So, check that the -# Makefile exists before recursing. -clean-local: - @if test -e gtest/Makefile; then \ - echo "Making clean in gtest"; \ - cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \ - fi - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = protobuf.pc protobuf-lite.pc - -EXTRA_DIST = \ - autogen.sh \ - generate_descriptor_proto.sh \ - README.txt \ - INSTALL.txt \ - COPYING.txt \ - CONTRIBUTORS.txt \ - CHANGES.txt \ - editors/README.txt \ - editors/proto.vim \ - editors/protobuf-mode.el \ - vsprojects/config.h \ - vsprojects/extract_includes.bat \ - vsprojects/libprotobuf.vcproj \ - vsprojects/libprotobuf-lite.vcproj \ - vsprojects/libprotoc.vcproj \ - vsprojects/protobuf.sln \ - vsprojects/protoc.vcproj \ - vsprojects/readme.txt \ - vsprojects/test_plugin.vcproj \ - vsprojects/tests.vcproj \ - vsprojects/lite-test.vcproj \ - vsprojects/convert2008to2005.sh \ - examples/README.txt \ - examples/Makefile \ - examples/addressbook.proto \ - examples/add_person.cc \ - examples/list_people.cc \ - examples/AddPerson.java \ - examples/ListPeople.java \ - examples/add_person.py \ - examples/list_people.py \ - java/src/main/java/com/google/protobuf/AbstractMessage.java \ - java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ - java/src/main/java/com/google/protobuf/BlockingRpcChannel.java \ - java/src/main/java/com/google/protobuf/BlockingService.java \ - java/src/main/java/com/google/protobuf/ByteString.java \ - java/src/main/java/com/google/protobuf/CodedInputStream.java \ - java/src/main/java/com/google/protobuf/CodedOutputStream.java \ - java/src/main/java/com/google/protobuf/Descriptors.java \ - java/src/main/java/com/google/protobuf/DynamicMessage.java \ - java/src/main/java/com/google/protobuf/ExtensionRegistry.java \ - java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ - java/src/main/java/com/google/protobuf/FieldSet.java \ - java/src/main/java/com/google/protobuf/GeneratedMessage.java \ - java/src/main/java/com/google/protobuf/GeneratedMessageLite.java \ - java/src/main/java/com/google/protobuf/Internal.java \ - java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ - java/src/main/java/com/google/protobuf/LazyStringArrayList.java \ - java/src/main/java/com/google/protobuf/LazyStringList.java \ - java/src/main/java/com/google/protobuf/Message.java \ - java/src/main/java/com/google/protobuf/MessageLite.java \ - java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java \ - java/src/main/java/com/google/protobuf/MessageOrBuilder.java \ - java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java \ - java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java \ - java/src/main/java/com/google/protobuf/RpcCallback.java \ - java/src/main/java/com/google/protobuf/RpcChannel.java \ - java/src/main/java/com/google/protobuf/RpcController.java \ - java/src/main/java/com/google/protobuf/RpcUtil.java \ - java/src/main/java/com/google/protobuf/Service.java \ - java/src/main/java/com/google/protobuf/ServiceException.java \ - java/src/main/java/com/google/protobuf/SingleFieldBuilder.java \ - java/src/main/java/com/google/protobuf/SmallSortedMap.java \ - java/src/main/java/com/google/protobuf/TextFormat.java \ - java/src/main/java/com/google/protobuf/UninitializedMessageException.java \ - java/src/main/java/com/google/protobuf/UnknownFieldSet.java \ - java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java \ - java/src/main/java/com/google/protobuf/WireFormat.java \ - java/src/test/java/com/google/protobuf/AbstractMessageTest.java \ - java/src/test/java/com/google/protobuf/CodedInputStreamTest.java \ - java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java \ - java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java \ - java/src/test/java/com/google/protobuf/DescriptorsTest.java \ - java/src/test/java/com/google/protobuf/DynamicMessageTest.java \ - java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java \ - java/src/test/java/com/google/protobuf/GeneratedMessageTest.java \ - java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java \ - java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java \ - java/src/test/java/com/google/protobuf/LiteTest.java \ - java/src/test/java/com/google/protobuf/MessageTest.java \ - java/src/test/java/com/google/protobuf/NestedBuildersTest.java \ - java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java \ - java/src/test/java/com/google/protobuf/ServiceTest.java \ - java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java \ - java/src/test/java/com/google/protobuf/SmallSortedMapTest.java \ - java/src/test/java/com/google/protobuf/TestBadIdentifiers.java \ - java/src/test/java/com/google/protobuf/TestUtil.java \ - java/src/test/java/com/google/protobuf/TextFormatTest.java \ - java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \ - java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java \ - java/src/test/java/com/google/protobuf/WireFormatTest.java \ - java/src/test/java/com/google/protobuf/multiple_files_test.proto \ - java/src/test/java/com/google/protobuf/nested_builders_test.proto \ - java/src/test/java/com/google/protobuf/nested_extension.proto \ - java/src/test/java/com/google/protobuf/nested_extension_lite.proto \ - java/src/test/java/com/google/protobuf/non_nested_extension.proto \ - java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto \ - java/src/test/java/com/google/protobuf/test_bad_identifiers.proto \ - java/pom.xml \ - java/README.txt \ - python/google/protobuf/internal/generator_test.py \ - python/google/protobuf/internal/containers.py \ - python/google/protobuf/internal/decoder.py \ - python/google/protobuf/internal/descriptor_test.py \ - python/google/protobuf/internal/encoder.py \ - python/google/protobuf/internal/message_listener.py \ - python/google/protobuf/internal/message_test.py \ - python/google/protobuf/internal/more_extensions.proto \ - python/google/protobuf/internal/more_messages.proto \ - python/google/protobuf/internal/python_message.py \ - python/google/protobuf/internal/cpp_message.py \ - python/google/protobuf/internal/api_implementation.py \ - python/google/protobuf/internal/reflection_test.py \ - python/google/protobuf/internal/service_reflection_test.py \ - python/google/protobuf/internal/test_util.py \ - python/google/protobuf/internal/text_format_test.py \ - python/google/protobuf/internal/type_checkers.py \ - python/google/protobuf/internal/wire_format.py \ - python/google/protobuf/internal/wire_format_test.py \ - python/google/protobuf/internal/__init__.py \ - python/google/protobuf/pyext/python-proto2.cc \ - python/google/protobuf/pyext/python_descriptor.cc \ - python/google/protobuf/pyext/python_descriptor.h \ - python/google/protobuf/pyext/python_protobuf.cc \ - python/google/protobuf/pyext/python_protobuf.h \ - python/google/protobuf/descriptor.py \ - python/google/protobuf/message.py \ - python/google/protobuf/reflection.py \ - python/google/protobuf/service.py \ - python/google/protobuf/service_reflection.py \ - python/google/protobuf/text_format.py \ - python/google/protobuf/__init__.py \ - python/google/__init__.py \ - python/ez_setup.py \ - python/setup.py \ - python/mox.py \ - python/stubout.py \ - python/README.txt - -# Deletes all the files generated by autogen.sh. -MAINTAINERCLEANFILES = \ - aclocal.m4 \ - config.guess \ - config.sub \ - configure \ - depcomp \ - install-sh \ - ltmain.sh \ - Makefile.in \ - missing \ - mkinstalldirs \ - config.h.in \ - stamp.h.in \ - m4/ltsugar.m4 \ - m4/libtool.m4 \ - m4/ltversion.m4 \ - m4/lt~obsolete.m4 \ - m4/ltoptions.m4 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/README.txt deleted file mode 100644 index a8f66044..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/README.txt +++ /dev/null @@ -1,152 +0,0 @@ -Protocol Buffers - Google's data interchange format -Copyright 2008 Google Inc. -http://code.google.com/apis/protocolbuffers/ - -C++ Installation - Unix -======================= - -To build and install the C++ Protocol Buffer runtime and the Protocol -Buffer compiler (protoc) execute the following: - - $ ./configure - $ make - $ make check - $ make install - -If "make check" fails, you can still install, but it is likely that -some features of this library will not work correctly on your system. -Proceed at your own risk. - -"make install" may require superuser privileges. - -For advanced usage information on configure and make, see INSTALL.txt. - -** Hint on install location ** - - By default, the package will be installed to /usr/local. However, - on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH. - You can add it, but it may be easier to just install to /usr - instead. To do this, invoke configure as follows: - - ./configure --prefix=/usr - - If you already built the package with a different prefix, make sure - to run "make clean" before building again. - -** Compiling dependent packages ** - - To compile a package that uses Protocol Buffers, you need to pass - various flags to your compiler and linker. As of version 2.2.0, - Protocol Buffers integrates with pkg-config to manage this. If you - have pkg-config installed, then you can invoke it to get a list of - flags like so: - - pkg-config --cflags protobuf # print compiler flags - pkg-config --libs protobuf # print linker flags - pkg-config --cflags --libs protobuf # print both - - For example: - - c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf` - - Note that packages written prior to the 2.2.0 release of Protocol - Buffers may not yet integrate with pkg-config to get flags, and may - not pass the correct set of flags to correctly link against - libprotobuf. If the package in question uses autoconf, you can - often fix the problem by invoking its configure script like: - - configure CXXFLAGS="$(pkg-config --cflags protobuf)" \ - LIBS="$(pkg-config --libs protobuf)" - - This will force it to use the correct flags. - - If you are writing an autoconf-based package that uses Protocol - Buffers, you should probably use the PKG_CHECK_MODULES macro in your - configure script like: - - PKG_CHECK_MODULES([protobuf], [protobuf]) - - See the pkg-config man page for more info. - - If you only want protobuf-lite, substitute "protobuf-lite" in place - of "protobuf" in these examples. - -** Note for cross-compiling ** - - The makefiles normally invoke the protoc executable that they just - built in order to build tests. When cross-compiling, the protoc - executable may not be executable on the host machine. In this case, - you must build a copy of protoc for the host machine first, then use - the --with-protoc option to tell configure to use it instead. For - example: - - ./configure --with-protoc=protoc - - This will use the installed protoc (found in your $PATH) instead of - trying to execute the one built during the build process. You can - also use an executable that hasn't been installed. For example, if - you built the protobuf package for your host machine in ../host, - you might do: - - ./configure --with-protoc=../host/src/protoc - - Either way, you must make sure that the protoc executable you use - has the same version as the protobuf source code you are trying to - use it with. - -** Note for Solaris users ** - - Solaris 10 x86 has a bug that will make linking fail, complaining - about libstdc++.la being invalid. We have included a work-around - in this package. To use the work-around, run configure as follows: - - ./configure LDFLAGS=-L$PWD/src/solaris - - See src/solaris/libstdc++.la for more info on this bug. - -** Note for HP C++ Tru64 users ** - - To compile invoke configure as follows: - - ./configure CXXFLAGS="-O -std ansi -ieee -D__USE_STD_IOSTREAM" - - Also, you will need to use gmake instead of make. - -C++ Installation - Windows -========================== - -If you are using Micosoft Visual C++, see vsprojects/readme.txt. - -If you are using Cygwin or MinGW, follow the Unix installation -instructions, above. - -Binary Compatibility Warning -============================ - -Due to the nature of C++, it is unlikely that any two versions of the -Protocol Buffers C++ runtime libraries will have compatible ABIs. -That is, if you linked an executable against an older version of -libprotobuf, it is unlikely to work with a newer version without -re-compiling. This problem, when it occurs, will normally be detected -immediately on startup of your app. Still, you may want to consider -using static linkage. You can configure this package to install -static libraries only using: - - ./configure --disable-shared - -Java and Python Installation -============================ - -The Java and Python runtime libraries for Protocol Buffers are located -in the java and python directories. See the README file in each -directory for more information on how to compile and install them. -Note that both of them require you to first install the Protocol -Buffer compiler (protoc), which is part of the C++ package. - -Usage -===== - -The complete documentation for Protocol Buffers is available via the -web at: - - http://code.google.com/apis/protocolbuffers/ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/autogen.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/autogen.sh deleted file mode 100755 index 04d65b16..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/autogen.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# Run this script to generate the configure script and other files that will -# be included in the distribution. These files are not checked in because they -# are automatically generated. - -set -e - -# Check that we're being run from the right directory. -if test ! -f src/google/protobuf/stubs/common.h; then - cat >&2 << __EOF__ -Could not find source code. Make sure you are running this script from the -root of the distribution tree. -__EOF__ - exit 1 -fi - -# Check that gtest is present. Usually it is already there since the -# directory is set up as an SVN external. -if test ! -e gtest; then - echo "Google Test not present. Fetching gtest-1.3.0 from the web..." - curl http://googletest.googlecode.com/files/gtest-1.3.0.tar.bz2 | tar jx - mv gtest-1.3.0 gtest -fi - -set -ex - -# Temporary hack: Must change C runtime library to "multi-threaded DLL", -# otherwise it will be set to "multi-threaded static" when MSVC upgrades -# the project file to MSVC 2005/2008. vladl of Google Test says gtest will -# probably change their default to match, then this will be unnecessary. -# One of these mappings converts the debug configuration and the other -# converts the release configuration. I don't know which is which. -sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g; - s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj - -# TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings. -autoreconf -f -i -Wall,no-obsolete - -rm -rf autom4te.cache config.h.in~ -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/ProtoBench.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/ProtoBench.java deleted file mode 100644 index 6717ffa2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/ProtoBench.java +++ /dev/null @@ -1,203 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2009 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protocolbuffers; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.lang.reflect.Method; - -import com.google.protobuf.ByteString; -import com.google.protobuf.CodedInputStream; -import com.google.protobuf.CodedOutputStream; -import com.google.protobuf.Message; - -public class ProtoBench { - - private static final long MIN_SAMPLE_TIME_MS = 2 * 1000; - private static final long TARGET_TIME_MS = 30 * 1000; - - private ProtoBench() { - // Prevent instantiation - } - - public static void main(String[] args) { - if (args.length < 2 || (args.length % 2) != 0) { - System.err.println("Usage: ProtoBench "); - System.err.println("The descriptor type name is the fully-qualified message name,"); - System.err.println("e.g. com.google.protocolbuffers.benchmark.Message1"); - System.err.println("(You can specify multiple pairs of descriptor type name and input data.)"); - System.exit(1); - } - boolean success = true; - for (int i = 0; i < args.length; i += 2) { - success &= runTest(args[i], args[i + 1]); - } - System.exit(success ? 0 : 1); - } - - /** - * Runs a single test. Error messages are displayed to stderr, and the return value - * indicates general success/failure. - */ - public static boolean runTest(String type, String file) { - System.out.println("Benchmarking " + type + " with file " + file); - final Message defaultMessage; - try { - Class clazz = Class.forName(type); - Method method = clazz.getDeclaredMethod("getDefaultInstance"); - defaultMessage = (Message) method.invoke(null); - } catch (Exception e) { - // We want to do the same thing with all exceptions. Not generally nice, - // but this is slightly different. - System.err.println("Unable to get default message for " + type); - return false; - } - - try { - final byte[] inputData = readAllBytes(file); - final ByteArrayInputStream inputStream = new ByteArrayInputStream(inputData); - final ByteString inputString = ByteString.copyFrom(inputData); - final Message sampleMessage = defaultMessage.newBuilderForType().mergeFrom(inputString).build(); - FileOutputStream devNullTemp = null; - CodedOutputStream reuseDevNullTemp = null; - try { - devNullTemp = new FileOutputStream("/dev/null"); - reuseDevNullTemp = CodedOutputStream.newInstance(devNullTemp); - } catch (FileNotFoundException e) { - // ignore: this is probably Windows, where /dev/null does not exist - } - final FileOutputStream devNull = devNullTemp; - final CodedOutputStream reuseDevNull = reuseDevNullTemp; - benchmark("Serialize to byte string", inputData.length, new Action() { - public void execute() { sampleMessage.toByteString(); } - }); - benchmark("Serialize to byte array", inputData.length, new Action() { - public void execute() { sampleMessage.toByteArray(); } - }); - benchmark("Serialize to memory stream", inputData.length, new Action() { - public void execute() throws IOException { - sampleMessage.writeTo(new ByteArrayOutputStream()); - } - }); - if (devNull != null) { - benchmark("Serialize to /dev/null with FileOutputStream", inputData.length, new Action() { - public void execute() throws IOException { - sampleMessage.writeTo(devNull); - } - }); - benchmark("Serialize to /dev/null reusing FileOutputStream", inputData.length, new Action() { - public void execute() throws IOException { - sampleMessage.writeTo(reuseDevNull); - reuseDevNull.flush(); // force the write to the OutputStream - } - }); - } - benchmark("Deserialize from byte string", inputData.length, new Action() { - public void execute() throws IOException { - defaultMessage.newBuilderForType().mergeFrom(inputString).build(); - } - }); - benchmark("Deserialize from byte array", inputData.length, new Action() { - public void execute() throws IOException { - defaultMessage.newBuilderForType() - .mergeFrom(CodedInputStream.newInstance(inputData)).build(); - } - }); - benchmark("Deserialize from memory stream", inputData.length, new Action() { - public void execute() throws IOException { - defaultMessage.newBuilderForType() - .mergeFrom(CodedInputStream.newInstance(inputStream)).build(); - inputStream.reset(); - } - }); - System.out.println(); - return true; - } catch (Exception e) { - System.err.println("Error: " + e.getMessage()); - System.err.println("Detailed exception information:"); - e.printStackTrace(System.err); - return false; - } - } - - private static void benchmark(String name, long dataSize, Action action) throws IOException { - // Make sure it's JITted "reasonably" hard before running the first progress test - for (int i=0; i < 100; i++) { - action.execute(); - } - - // Run it progressively more times until we've got a reasonable sample - int iterations = 1; - long elapsed = timeAction(action, iterations); - while (elapsed < MIN_SAMPLE_TIME_MS) { - iterations *= 2; - elapsed = timeAction(action, iterations); - } - - // Upscale the sample to the target time. Do this in floating point arithmetic - // to avoid overflow issues. - iterations = (int) ((TARGET_TIME_MS / (double) elapsed) * iterations); - elapsed = timeAction(action, iterations); - System.out.println(name + ": " + iterations + " iterations in " - + (elapsed/1000f) + "s; " - + (iterations * dataSize) / (elapsed * 1024 * 1024 / 1000f) - + "MB/s"); - } - - private static long timeAction(Action action, int iterations) throws IOException { - System.gc(); - long start = System.currentTimeMillis(); - for (int i = 0; i < iterations; i++) { - action.execute(); - } - long end = System.currentTimeMillis(); - return end - start; - } - - private static byte[] readAllBytes(String filename) throws IOException { - RandomAccessFile file = new RandomAccessFile(new File(filename), "r"); - byte[] content = new byte[(int) file.length()]; - file.readFully(content); - return content; - } - - /** - * Interface used to capture a single action to benchmark. - */ - interface Action { - void execute() throws IOException; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message1.dat b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message1.dat deleted file mode 100644 index bc0f064c..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message1.dat and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message2.dat b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message2.dat deleted file mode 100644 index 06c09441..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_message2.dat and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_size.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_size.proto deleted file mode 100644 index 3e6fbdbc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_size.proto +++ /dev/null @@ -1,136 +0,0 @@ -package benchmarks; - -option java_outer_classname = "GoogleSize"; -option optimize_for = CODE_SIZE; - -message SizeMessage1 { - required string field1 = 1; - optional string field9 = 9; - optional string field18 = 18; - optional bool field80 = 80 [default=false]; - optional bool field81 = 81 [default=true]; - required int32 field2 = 2; - required int32 field3 = 3; - optional int32 field280 = 280; - optional int32 field6 = 6 [default=0]; - optional int64 field22 = 22; - optional string field4 = 4; - repeated fixed64 field5 = 5; - optional bool field59 = 59 [default=false]; - optional string field7 = 7; - optional int32 field16 = 16; - optional int32 field130 = 130 [default=0]; - optional bool field12 = 12 [default=true]; - optional bool field17 = 17 [default=true]; - optional bool field13 = 13 [default=true]; - optional bool field14 = 14 [default=true]; - optional int32 field104 = 104 [default=0]; - optional int32 field100 = 100 [default=0]; - optional int32 field101 = 101 [default=0]; - optional string field102 = 102; - optional string field103 = 103; - optional int32 field29 = 29 [default=0]; - optional bool field30 = 30 [default=false]; - optional int32 field60 = 60 [default=-1]; - optional int32 field271 = 271 [default=-1]; - optional int32 field272 = 272 [default=-1]; - optional int32 field150 = 150; - optional int32 field23 = 23 [default=0]; - optional bool field24 = 24 [default=false]; - optional int32 field25 = 25 [default=0]; - optional SizeMessage1SubMessage field15 = 15; - optional bool field78 = 78; - optional int32 field67 = 67 [default=0]; - optional int32 field68 = 68; - optional int32 field128 = 128 [default=0]; - optional string field129 = 129 [default="xxxxxxxxxxxxxxxxxxxxx"]; - optional int32 field131 = 131 [default=0]; -} - -message SizeMessage1SubMessage { - optional int32 field1 = 1 [default=0]; - optional int32 field2 = 2 [default=0]; - optional int32 field3 = 3 [default=0]; - optional string field15 = 15; - optional bool field12 = 12 [default=true]; - optional int64 field13 = 13; - optional int64 field14 = 14; - optional int32 field16 = 16; - optional int32 field19 = 19 [default=2]; - optional bool field20 = 20 [default=true]; - optional bool field28 = 28 [default=true]; - optional fixed64 field21 = 21; - optional int32 field22 = 22; - optional bool field23 = 23 [ default=false ]; - optional bool field206 = 206 [default=false]; - optional fixed32 field203 = 203; - optional int32 field204 = 204; - optional string field205 = 205; - optional uint64 field207 = 207; - optional uint64 field300 = 300; -} - -message SizeMessage2 { - optional string field1 = 1; - optional int64 field3 = 3; - optional int64 field4 = 4; - optional int64 field30 = 30; - optional bool field75 = 75 [default=false]; - optional string field6 = 6; - optional bytes field2 = 2; - optional int32 field21 = 21 [default=0]; - optional int32 field71 = 71; - optional float field25 = 25; - optional int32 field109 = 109 [default=0]; - optional int32 field210 = 210 [default=0]; - optional int32 field211 = 211 [default=0]; - optional int32 field212 = 212 [default=0]; - optional int32 field213 = 213 [default=0]; - optional int32 field216 = 216 [default=0]; - optional int32 field217 = 217 [default=0]; - optional int32 field218 = 218 [default=0]; - optional int32 field220 = 220 [default=0]; - optional int32 field221 = 221 [default=0]; - optional float field222 = 222 [default=0.0]; - optional int32 field63 = 63; - - repeated group Group1 = 10 { - required float field11 = 11; - optional float field26 = 26; - optional string field12 = 12; - optional string field13 = 13; - repeated string field14 = 14; - required uint64 field15 = 15; - optional int32 field5 = 5; - optional string field27 = 27; - optional int32 field28 = 28; - optional string field29 = 29; - optional string field16 = 16; - repeated string field22 = 22; - repeated int32 field73 = 73; - optional int32 field20 = 20 [default=0]; - optional string field24 = 24; - optional SizeMessage2GroupedMessage field31 = 31; - } - repeated string field128 = 128; - optional int64 field131 = 131; - repeated string field127 = 127; - optional int32 field129 = 129; - repeated int64 field130 = 130; - optional bool field205 = 205 [default=false]; - optional bool field206 = 206 [default=false]; -} - -message SizeMessage2GroupedMessage { - optional float field1 = 1; - optional float field2 = 2; - optional float field3 = 3 [default=0.0]; - optional bool field4 = 4; - optional bool field5 = 5; - optional bool field6 = 6 [default=true]; - optional bool field7 = 7 [default=false]; - optional float field8 = 8; - optional bool field9 = 9; - optional float field10 = 10; - optional int64 field11 = 11; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_speed.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_speed.proto deleted file mode 100644 index d6cd0321..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/google_speed.proto +++ /dev/null @@ -1,136 +0,0 @@ -package benchmarks; - -option java_outer_classname = "GoogleSpeed"; -option optimize_for = SPEED; - -message SpeedMessage1 { - required string field1 = 1; - optional string field9 = 9; - optional string field18 = 18; - optional bool field80 = 80 [default=false]; - optional bool field81 = 81 [default=true]; - required int32 field2 = 2; - required int32 field3 = 3; - optional int32 field280 = 280; - optional int32 field6 = 6 [default=0]; - optional int64 field22 = 22; - optional string field4 = 4; - repeated fixed64 field5 = 5; - optional bool field59 = 59 [default=false]; - optional string field7 = 7; - optional int32 field16 = 16; - optional int32 field130 = 130 [default=0]; - optional bool field12 = 12 [default=true]; - optional bool field17 = 17 [default=true]; - optional bool field13 = 13 [default=true]; - optional bool field14 = 14 [default=true]; - optional int32 field104 = 104 [default=0]; - optional int32 field100 = 100 [default=0]; - optional int32 field101 = 101 [default=0]; - optional string field102 = 102; - optional string field103 = 103; - optional int32 field29 = 29 [default=0]; - optional bool field30 = 30 [default=false]; - optional int32 field60 = 60 [default=-1]; - optional int32 field271 = 271 [default=-1]; - optional int32 field272 = 272 [default=-1]; - optional int32 field150 = 150; - optional int32 field23 = 23 [default=0]; - optional bool field24 = 24 [default=false]; - optional int32 field25 = 25 [default=0]; - optional SpeedMessage1SubMessage field15 = 15; - optional bool field78 = 78; - optional int32 field67 = 67 [default=0]; - optional int32 field68 = 68; - optional int32 field128 = 128 [default=0]; - optional string field129 = 129 [default="xxxxxxxxxxxxxxxxxxxxx"]; - optional int32 field131 = 131 [default=0]; -} - -message SpeedMessage1SubMessage { - optional int32 field1 = 1 [default=0]; - optional int32 field2 = 2 [default=0]; - optional int32 field3 = 3 [default=0]; - optional string field15 = 15; - optional bool field12 = 12 [default=true]; - optional int64 field13 = 13; - optional int64 field14 = 14; - optional int32 field16 = 16; - optional int32 field19 = 19 [default=2]; - optional bool field20 = 20 [default=true]; - optional bool field28 = 28 [default=true]; - optional fixed64 field21 = 21; - optional int32 field22 = 22; - optional bool field23 = 23 [ default=false ]; - optional bool field206 = 206 [default=false]; - optional fixed32 field203 = 203; - optional int32 field204 = 204; - optional string field205 = 205; - optional uint64 field207 = 207; - optional uint64 field300 = 300; -} - -message SpeedMessage2 { - optional string field1 = 1; - optional int64 field3 = 3; - optional int64 field4 = 4; - optional int64 field30 = 30; - optional bool field75 = 75 [default=false]; - optional string field6 = 6; - optional bytes field2 = 2; - optional int32 field21 = 21 [default=0]; - optional int32 field71 = 71; - optional float field25 = 25; - optional int32 field109 = 109 [default=0]; - optional int32 field210 = 210 [default=0]; - optional int32 field211 = 211 [default=0]; - optional int32 field212 = 212 [default=0]; - optional int32 field213 = 213 [default=0]; - optional int32 field216 = 216 [default=0]; - optional int32 field217 = 217 [default=0]; - optional int32 field218 = 218 [default=0]; - optional int32 field220 = 220 [default=0]; - optional int32 field221 = 221 [default=0]; - optional float field222 = 222 [default=0.0]; - optional int32 field63 = 63; - - repeated group Group1 = 10 { - required float field11 = 11; - optional float field26 = 26; - optional string field12 = 12; - optional string field13 = 13; - repeated string field14 = 14; - required uint64 field15 = 15; - optional int32 field5 = 5; - optional string field27 = 27; - optional int32 field28 = 28; - optional string field29 = 29; - optional string field16 = 16; - repeated string field22 = 22; - repeated int32 field73 = 73; - optional int32 field20 = 20 [default=0]; - optional string field24 = 24; - optional SpeedMessage2GroupedMessage field31 = 31; - } - repeated string field128 = 128; - optional int64 field131 = 131; - repeated string field127 = 127; - optional int32 field129 = 129; - repeated int64 field130 = 130; - optional bool field205 = 205 [default=false]; - optional bool field206 = 206 [default=false]; -} - -message SpeedMessage2GroupedMessage { - optional float field1 = 1; - optional float field2 = 2; - optional float field3 = 3 [default=0.0]; - optional bool field4 = 4; - optional bool field5 = 5; - optional bool field6 = 6 [default=true]; - optional bool field7 = 7 [default=false]; - optional float field8 = 8; - optional bool field9 = 9; - optional float field10 = 10; - optional int64 field11 = 11; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/readme.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/readme.txt deleted file mode 100644 index 2c836d0a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/benchmarks/readme.txt +++ /dev/null @@ -1,50 +0,0 @@ -Contents --------- - -This folder contains three kinds of file: - -- Code, such as ProtoBench.java, to build the benchmarking framework. -- Protocol buffer definitions (.proto files) -- Sample data files - -If we end up with a lot of different benchmarks it may be worth -separating these out info different directories, but while there are -so few they might as well all be together. - -Running a benchmark (Java) --------------------------- - -1) Build protoc and the Java protocol buffer library. The examples - below assume a jar file (protobuf.jar) has been built and copied - into this directory. - -2) Build ProtoBench: - $ javac -d tmp -cp protobuf.jar ProtoBench.java - -3) Generate code for the relevant benchmark protocol buffer, e.g. - $ protoc --java_out=tmp google_size.proto google_speed.proto - -4) Build the generated code, e.g. - $ cd tmp - $ javac -d . -cp ../protobuf.jar benchmarks/*.java - -5) Run the test. Arguments are given in pairs - the first argument - is the descriptor type; the second is the filename. For example: - $ java -cp .;../protobuf.jar com.google.protocolbuffers.ProtoBench - benchmarks.GoogleSize$SizeMessage1 ../google_message1.dat - benchmarks.GoogleSpeed$SpeedMessage1 ../google_message1.dat - benchmarks.GoogleSize$SizeMessage2 ../google_message2.dat - benchmarks.GoogleSpeed$SpeedMessage2 ../google_message2.dat - -6) Wait! Each test runs for around 30 seconds, and there are 6 tests - per class/data combination. The above command would therefore take - about 12 minutes to run. - - -Benchmarks available --------------------- - -From Google: -google_size.proto and google_speed.proto, messages -google_message1.dat and google_message2.dat. The proto files are -equivalent, but optimized differently. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/configure.ac deleted file mode 100644 index 08e4ea80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/configure.ac +++ /dev/null @@ -1,149 +0,0 @@ -## Process this file with autoconf to produce configure. -## In general, the safest way to proceed is to run ./autogen.sh - -AC_PREREQ(2.59) - -# Note: If you change the version, you must also update it in: -# * java/pom.xml -# * python/setup.py -# * src/google/protobuf/stubs/common.h -# * src/Makefile.am (Update -version-info for LDFLAGS if needed) -# -# In the SVN trunk, the version should always be the next anticipated release -# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed -# the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[2.4.1-pre],[protobuf@googlegroups.com],[protobuf]) - - -AC_CONFIG_SRCDIR(src/google/protobuf/message.cc) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -# autoconf's default CXXFLAGS are usually "-g -O2". These aren't necessarily -# the best choice for libprotobuf. -AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], - [CFLAGS=""]) -AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], - [CXXFLAGS=""]) - -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE - -AC_ARG_WITH([zlib], - [AS_HELP_STRING([--with-zlib], - [include classes for streaming compressed data in and out @<:@default=check@:>@])], - [],[with_zlib=check]) - -AC_ARG_WITH([protoc], - [AS_HELP_STRING([--with-protoc=COMMAND], - [use the given protoc command instead of building a new one when building tests (useful for cross-compiling)])], - [],[with_protoc=no]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CXX -AC_LANG([C++]) -ACX_USE_SYSTEM_EXTENSIONS -AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc - -# test_util.cc takes forever to compile with GCC and optimization turned on. -AC_MSG_CHECKING([C++ compiler flags...]) -AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ - AS_IF([test "$GCC" = "yes"],[ - PROTOBUF_OPT_FLAG="-O2" - CXXFLAGS="${CXXFLAGS} -g" - ]) - - # Protocol Buffers contains several checks that are intended to be used only - # for debugging and which might hurt performance. Most users are probably - # end users who don't want these checks, so add -DNDEBUG by default. - CXXFLAGS="$CXXFLAGS -DNDEBUG" - - AC_MSG_RESULT([use default: $PROTOBUF_OPT_FLAG $CXXFLAGS]) -],[ - AC_MSG_RESULT([use user-supplied: $CXXFLAGS]) -]) - -AC_SUBST(PROTOBUF_OPT_FLAG) - -ACX_CHECK_SUNCC - -# Have to do libtool after SUNCC, other wise it "helpfully" adds Crun Cstd -# to the link -AC_PROG_LIBTOOL - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) - -# Checks for library functions. -AC_FUNC_MEMCMP -AC_FUNC_STRTOD -AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol]) - -# Check for zlib. -HAVE_ZLIB=0 -AS_IF([test "$with_zlib" != no], [ - AC_MSG_CHECKING([zlib version]) - - # First check the zlib header version. - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([[ - #include - #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204) - # error zlib version too old - #endif - ]], []), [ - AC_MSG_RESULT([ok (1.2.0.4 or later)]) - - # Also need to add -lz to the linker flags and make sure this succeeds. - AC_SEARCH_LIBS([zlibVersion], [z], [ - AC_DEFINE([HAVE_ZLIB], [1], [Enable classes using zlib compression.]) - HAVE_ZLIB=1 - ], [ - AS_IF([test "$with_zlib" != check], [ - AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found]) - ]) - ]) - ], [ - AS_IF([test "$with_zlib" = check], [ - AC_MSG_RESULT([headers missing or too old (requires 1.2.0.4)]) - ], [ - AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)]) - ]) - ]) -]) -AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) - -AS_IF([test "$with_protoc" != "no"], [ - PROTOC=$with_protoc - AS_IF([test "$with_protoc" = "yes"], [ - # No argument given. Use system protoc. - PROTOC=protoc - ]) - AS_IF([echo "$PROTOC" | grep -q '^@<:@^/@:>@.*/'], [ - # Does not start with a slash, but contains a slash. So, it's a relative - # path (as opposed to an absolute path or an executable in $PATH). - # Since it will actually be executed from the src directory, prefix with - # the current directory. We also insert $ac_top_build_prefix in case this - # is a nested package and --with-protoc was actually given on the outer - # package's configure script. - PROTOC=`pwd`/${ac_top_build_prefix}$PROTOC - ]) - AC_SUBST([PROTOC]) -]) -AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"]) - -ACX_PTHREAD -AC_CXX_STL_HASH - -# HACK: Make gtest's configure script pick up our copy of CFLAGS and CXXFLAGS, -# since the flags added by ACX_CHECK_SUNCC must be used when compiling gtest -# too. -export CFLAGS -export CXXFLAGS -AC_CONFIG_SUBDIRS([gtest]) - -AC_CONFIG_FILES([Makefile src/Makefile protobuf.pc protobuf-lite.pc]) -AC_OUTPUT diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/README.txt deleted file mode 100644 index 3e9fc79e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains syntax highlighting and configuration files for editors -to properly display Protocol Buffer files. - -See each file's header comment for directions on how to use it with the -appropriate editor. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/proto.vim b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/proto.vim deleted file mode 100644 index 42f33075..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/proto.vim +++ /dev/null @@ -1,106 +0,0 @@ -" Protocol Buffers - Google's data interchange format -" Copyright 2008 Google Inc. All rights reserved. -" http://code.google.com/p/protobuf/ -" -" Redistribution and use in source and binary forms, with or without -" modification, are permitted provided that the following conditions are -" met: -" -" * Redistributions of source code must retain the above copyright -" notice, this list of conditions and the following disclaimer. -" * Redistributions in binary form must reproduce the above -" copyright notice, this list of conditions and the following disclaimer -" in the documentation and/or other materials provided with the -" distribution. -" * Neither the name of Google Inc. nor the names of its -" contributors may be used to endorse or promote products derived from -" this software without specific prior written permission. -" -" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -" This is the Vim syntax file for Google Protocol Buffers. -" -" Usage: -" -" 1. cp proto.vim ~/.vim/syntax/ -" 2. Add the following to ~/.vimrc: -" -" augroup filetype -" au! BufRead,BufNewFile *.proto setfiletype proto -" augroup end -" -" Or just create a new file called ~/.vim/ftdetect/proto.vim with the -" previous lines on it. - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn case match - -syn keyword pbTodo contained TODO FIXME XXX -syn cluster pbCommentGrp contains=pbTodo - -syn keyword pbSyntax syntax import option -syn keyword pbStructure package message group -syn keyword pbRepeat optional required repeated -syn keyword pbDefault default -syn keyword pbExtend extend extensions to max -syn keyword pbRPC service rpc returns - -syn keyword pbType int32 int64 uint32 uint64 sint32 sint64 -syn keyword pbType fixed32 fixed64 sfixed32 sfixed64 -syn keyword pbType float double bool string bytes -syn keyword pbTypedef enum -syn keyword pbBool true false - -syn match pbInt /-\?\<\d\+\>/ -syn match pbInt /\<0[xX]\x+\>/ -syn match pbFloat /\<-\?\d*\(\.\d*\)\?/ -" TODO: .proto also supports C-style block comments; -" see /usr/share/vim/vim70/syntax/c.vim for how it's done. -syn region pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp -syn region pbString start=/"/ skip=/\\"/ end=/"/ -syn region pbString start=/'/ skip=/\\'/ end=/'/ - -if version >= 508 || !exists("did_proto_syn_inits") - if version < 508 - let did_proto_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink pbTodo Todo - - HiLink pbSyntax Include - HiLink pbStructure Structure - HiLink pbRepeat Repeat - HiLink pbDefault Keyword - HiLink pbExtend Keyword - HiLink pbRPC Keyword - HiLink pbType Type - HiLink pbTypedef Typedef - HiLink pbBool Boolean - - HiLink pbInt Number - HiLink pbFloat Float - HiLink pbComment Comment - HiLink pbString String - - delcommand HiLink -endif - -let b:current_syntax = "proto" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/protobuf-mode.el b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/protobuf-mode.el deleted file mode 100644 index 09aecc93..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/editors/protobuf-mode.el +++ /dev/null @@ -1,220 +0,0 @@ -;;; protobuf-mode.el --- major mode for editing protocol buffers. - -;; Author: Alexandre Vassalotti -;; Created: 23-Apr-2009 -;; Version: 0.3 -;; Keywords: google protobuf languages - -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; * Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; * Redistributions in binary form must reproduce the above -;; copyright notice, this list of conditions and the following disclaimer -;; in the documentation and/or other materials provided with the -;; distribution. -;; * Neither the name of Google Inc. nor the names of its -;; contributors may be used to endorse or promote products derived from -;; this software without specific prior written permission. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -;; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -;;; Commentary: - -;; Installation: -;; - Put `protobuf-mode.el' in your Emacs load-path. -;; - Add this line to your .emacs file: -;; (require 'protobuf-mode) -;; -;; You can customize this mode just like any mode derived from CC Mode. If -;; you want to add customizations specific to protobuf-mode, you can use the -;; `protobuf-mode-hook'. For example, the following would make protocol-mode -;; use 2-space indentation: -;; -;; (defconst my-protobuf-style -;; '((c-basic-offset . 2) -;; (indent-tabs-mode . nil))) -;; -;; (add-hook 'protobuf-mode-hook -;; (lambda () (c-add-style "my-style" my-protobuf-style t))) -;; -;; Refer to the documentation of CC Mode for more information about -;; customization details and how to use this mode. -;; -;; TODO: -;; - Make highlighting for enum values work properly. -;; - Fix the parser to recognize extensions as identifiers and not -;; as casts. -;; - Improve the parsing of option assignment lists. For example: -;; optional int32 foo = 1 [(my_field_option) = 4.5]; -;; - Add support for fully-qualified identifiers (e.g., with a leading "."). - -;;; Code: - -(require 'cc-mode) - -(eval-when-compile - (require 'cc-langs) - (require 'cc-fonts)) - -;; This mode does not inherit properties from other modes. So, we do not use -;; the usual `c-add-language' function. -(eval-and-compile - (put 'protobuf-mode 'c-mode-prefix "protobuf-")) - -;; The following code uses of the `c-lang-defconst' macro define syntactic -;; features of protocol buffer language. Refer to the documentation in the -;; cc-langs.el file for information about the meaning of the -kwds variables. - -(c-lang-defconst c-primitive-type-kwds - protobuf '("double" "float" "int32" "int64" "uint32" "uint64" "sint32" - "sint64" "fixed32" "fixed64" "sfixed32" "sfixed64" "bool" - "string" "bytes" "group")) - -(c-lang-defconst c-modifier-kwds - protobuf '("required" "optional" "repeated")) - -(c-lang-defconst c-class-decl-kwds - protobuf '("message" "enum" "service")) - -(c-lang-defconst c-constant-kwds - protobuf '("true" "false")) - -(c-lang-defconst c-other-decl-kwds - protobuf '("package" "import")) - -(c-lang-defconst c-other-kwds - protobuf '("default" "max")) - -(c-lang-defconst c-identifier-ops - ;; Handle extended identifiers like google.protobuf.MessageOptions - protobuf '((left-assoc "."))) - -;; The following keywords do not fit well in keyword classes defined by -;; cc-mode. So, we approximate as best we can. - -(c-lang-defconst c-type-list-kwds - protobuf '("extensions" "to")) - -(c-lang-defconst c-typeless-decl-kwds - protobuf '("extend" "rpc" "option" "returns")) - - -;; Here we remove default syntax for loops, if-statements and other C -;; syntactic features that are not supported by the protocol buffer language. - -(c-lang-defconst c-brace-list-decl-kwds - ;; Remove syntax for C-style enumerations. - protobuf nil) - -(c-lang-defconst c-block-stmt-1-kwds - ;; Remove syntax for "do" and "else" keywords. - protobuf nil) - -(c-lang-defconst c-block-stmt-2-kwds - ;; Remove syntax for "for", "if", "switch" and "while" keywords. - protobuf nil) - -(c-lang-defconst c-simple-stmt-kwds - ;; Remove syntax for "break", "continue", "goto" and "return" keywords. - protobuf nil) - -(c-lang-defconst c-paren-stmt-kwds - ;; Remove special case for the "(;;)" in for-loops. - protobuf nil) - -(c-lang-defconst c-label-kwds - ;; Remove case label syntax for the "case" and "default" keywords. - protobuf nil) - -(c-lang-defconst c-before-label-kwds - ;; Remove special case for the label in a goto statement. - protobuf nil) - -(c-lang-defconst c-cpp-matchers - ;; Disable all the C preprocessor syntax. - protobuf nil) - -(c-lang-defconst c-decl-prefix-re - ;; Same as for C, except it does not match "(". This is needed for disabling - ;; the syntax for casts. - protobuf "\\([\{\};,]+\\)") - - -;; Add support for variable levels of syntax highlighting. - -(defconst protobuf-font-lock-keywords-1 (c-lang-const c-matchers-1 protobuf) - "Minimal highlighting for protobuf-mode.") - -(defconst protobuf-font-lock-keywords-2 (c-lang-const c-matchers-2 protobuf) - "Fast normal highlighting for protobuf-mode.") - -(defconst protobuf-font-lock-keywords-3 (c-lang-const c-matchers-3 protobuf) - "Accurate normal highlighting for protobuf-mode.") - -(defvar protobuf-font-lock-keywords protobuf-font-lock-keywords-3 - "Default expressions to highlight in protobuf-mode.") - -;; Our syntax table is auto-generated from the keyword classes we defined -;; previously with the `c-lang-const' macro. -(defvar protobuf-mode-syntax-table nil - "Syntax table used in protobuf-mode buffers.") -(or protobuf-mode-syntax-table - (setq protobuf-mode-syntax-table - (funcall (c-lang-const c-make-mode-syntax-table protobuf)))) - -(defvar protobuf-mode-abbrev-table nil - "Abbreviation table used in protobuf-mode buffers.") - -(defvar protobuf-mode-map nil - "Keymap used in protobuf-mode buffers.") -(or protobuf-mode-map - (setq protobuf-mode-map (c-make-inherited-keymap))) - -(easy-menu-define protobuf-menu protobuf-mode-map - "Protocol Buffers Mode Commands" - (cons "Protocol Buffers" (c-lang-const c-mode-menu protobuf))) - -;;;###autoload (add-to-list 'auto-mode-alist '("\\.proto\\'" . protobuf-mode)) - -;;;###autoload -(defun protobuf-mode () - "Major mode for editing Protocol Buffers description language. - -The hook `c-mode-common-hook' is run with no argument at mode -initialization, then `protobuf-mode-hook'. - -Key bindings: -\\{protobuf-mode-map}" - (interactive) - (kill-all-local-variables) - (set-syntax-table protobuf-mode-syntax-table) - (setq major-mode 'protobuf-mode - mode-name "Protocol-Buffers" - local-abbrev-table protobuf-mode-abbrev-table - abbrev-mode t) - (use-local-map protobuf-mode-map) - (c-initialize-cc-mode t) - (if (fboundp 'c-make-emacs-variables-local) - (c-make-emacs-variables-local)) - (c-init-language-vars protobuf-mode) - (c-common-init 'protobuf-mode) - (easy-menu-add protobuf-menu) - (c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook) - (c-update-modeline)) - -(provide 'protobuf-mode) - -;;; protobuf-mode.el ends here diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/AddPerson.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/AddPerson.java deleted file mode 100644 index 4917684b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/AddPerson.java +++ /dev/null @@ -1,89 +0,0 @@ -// See README.txt for information and build instructions. - -import com.example.tutorial.AddressBookProtos.AddressBook; -import com.example.tutorial.AddressBookProtos.Person; -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.io.PrintStream; - -class AddPerson { - // This function fills in a Person message based on user input. - static Person PromptForAddress(BufferedReader stdin, - PrintStream stdout) throws IOException { - Person.Builder person = Person.newBuilder(); - - stdout.print("Enter person ID: "); - person.setId(Integer.valueOf(stdin.readLine())); - - stdout.print("Enter name: "); - person.setName(stdin.readLine()); - - stdout.print("Enter email address (blank for none): "); - String email = stdin.readLine(); - if (email.length() > 0) { - person.setEmail(email); - } - - while (true) { - stdout.print("Enter a phone number (or leave blank to finish): "); - String number = stdin.readLine(); - if (number.length() == 0) { - break; - } - - Person.PhoneNumber.Builder phoneNumber = - Person.PhoneNumber.newBuilder().setNumber(number); - - stdout.print("Is this a mobile, home, or work phone? "); - String type = stdin.readLine(); - if (type.equals("mobile")) { - phoneNumber.setType(Person.PhoneType.MOBILE); - } else if (type.equals("home")) { - phoneNumber.setType(Person.PhoneType.HOME); - } else if (type.equals("work")) { - phoneNumber.setType(Person.PhoneType.WORK); - } else { - stdout.println("Unknown phone type. Using default."); - } - - person.addPhone(phoneNumber); - } - - return person.build(); - } - - // Main function: Reads the entire address book from a file, - // adds one person based on user input, then writes it back out to the same - // file. - public static void main(String[] args) throws Exception { - if (args.length != 1) { - System.err.println("Usage: AddPerson ADDRESS_BOOK_FILE"); - System.exit(-1); - } - - AddressBook.Builder addressBook = AddressBook.newBuilder(); - - // Read the existing address book. - try { - FileInputStream input = new FileInputStream(args[0]); - addressBook.mergeFrom(input); - input.close(); - } catch (FileNotFoundException e) { - System.out.println(args[0] + ": File not found. Creating a new file."); - } - - // Add an address. - addressBook.addPerson( - PromptForAddress(new BufferedReader(new InputStreamReader(System.in)), - System.out)); - - // Write the new address book back to disk. - FileOutputStream output = new FileOutputStream(args[0]); - addressBook.build().writeTo(output); - output.close(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/ListPeople.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/ListPeople.java deleted file mode 100644 index b2f153af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/ListPeople.java +++ /dev/null @@ -1,50 +0,0 @@ -// See README.txt for information and build instructions. - -import com.example.tutorial.AddressBookProtos.AddressBook; -import com.example.tutorial.AddressBookProtos.Person; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.PrintStream; - -class ListPeople { - // Iterates though all people in the AddressBook and prints info about them. - static void Print(AddressBook addressBook) { - for (Person person: addressBook.getPersonList()) { - System.out.println("Person ID: " + person.getId()); - System.out.println(" Name: " + person.getName()); - if (person.hasEmail()) { - System.out.println(" E-mail address: " + person.getEmail()); - } - - for (Person.PhoneNumber phoneNumber : person.getPhoneList()) { - switch (phoneNumber.getType()) { - case MOBILE: - System.out.print(" Mobile phone #: "); - break; - case HOME: - System.out.print(" Home phone #: "); - break; - case WORK: - System.out.print(" Work phone #: "); - break; - } - System.out.println(phoneNumber.getNumber()); - } - } - } - - // Main function: Reads the entire address book from a file and prints all - // the information inside. - public static void main(String[] args) throws Exception { - if (args.length != 1) { - System.err.println("Usage: ListPeople ADDRESS_BOOK_FILE"); - System.exit(-1); - } - - // Read the existing address book. - AddressBook addressBook = - AddressBook.parseFrom(new FileInputStream(args[0])); - - Print(addressBook); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/Makefile deleted file mode 100644 index 8dc90836..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# See README.txt. - -.PHONY: all cpp java python clean - -all: cpp java python - -cpp: add_person_cpp list_people_cpp -java: add_person_java list_people_java -python: add_person_python list_people_python - -clean: - rm -f add_person_cpp list_people_cpp add_person_java list_people_java add_person_python list_people_python - rm -f javac_middleman AddPerson*.class ListPeople*.class com/example/tutorial/*.class - rm -f protoc_middleman addressbook.pb.cc addressbook.pb.h addressbook_pb2.py com/example/tutorial/AddressBookProtos.java - rm -f *.pyc - rmdir com/example/tutorial 2>/dev/null || true - rmdir com/example 2>/dev/null || true - rmdir com 2>/dev/null || true - -protoc_middleman: addressbook.proto - protoc --cpp_out=. --java_out=. --python_out=. addressbook.proto - @touch protoc_middleman - -add_person_cpp: add_person.cc protoc_middleman - pkg-config --cflags protobuf # fails if protobuf is not installed - c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` - -list_people_cpp: list_people.cc protoc_middleman - pkg-config --cflags protobuf # fails if protobuf is not installed - c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` - -javac_middleman: AddPerson.java ListPeople.java protoc_middleman - javac AddPerson.java ListPeople.java com/example/tutorial/AddressBookProtos.java - @touch javac_middleman - -add_person_java: javac_middleman - @echo "Writing shortcut script add_person_java..." - @echo '#! /bin/sh' > add_person_java - @echo 'java -classpath .:$$CLASSPATH AddPerson "$$@"' >> add_person_java - @chmod +x add_person_java - -list_people_java: javac_middleman - @echo "Writing shortcut script list_people_java..." - @echo '#! /bin/sh' > list_people_java - @echo 'java -classpath .:$$CLASSPATH ListPeople "$$@"' >> list_people_java - @chmod +x list_people_java - -add_person_python: add_person.py protoc_middleman - @echo "Writing shortcut script add_person_python..." - @echo '#! /bin/sh' > add_person_python - @echo './add_person.py "$$@"' >> add_person_python - @chmod +x add_person_python - -list_people_python: list_people.py protoc_middleman - @echo "Writing shortcut script list_people_python..." - @echo '#! /bin/sh' > list_people_python - @echo './list_people.py "$$@"' >> list_people_python - @chmod +x list_people_python diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/README.txt deleted file mode 100644 index d22bf06c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/README.txt +++ /dev/null @@ -1,29 +0,0 @@ -This directory contains example code that uses Protocol Buffers to manage an -address book. Two programs are provided, each with three different -implementations, one written in each of C++, Java, and Python. The add_person -example adds a new person to an address book, prompting the user to input -the person's information. The list_people example lists people already in the -address book. The examples use the exact same format in all three languages, -so you can, for example, use add_person_java to create an address book and then -use list_people_python to read it. - -You must install the protobuf package before you can build these. - -To build all the examples (on a unix-like system), simply run "make". This -creates the following executable files in the current directory: - add_person_cpp list_people_cpp - add_person_java list_people_java - add_person_python list_people_python - -If you only want to compile examples in one language, use "make cpp"*, -"make java", or "make python". - -All of these programs simply take an address book file as their parameter. -The add_person programs will create the file if it doesn't already exist. - -These examples are part of the Protocol Buffers tutorial, located at: - http://code.google.com/apis/protocolbuffers/docs/tutorials.html - -* Note that on some platforms you may have to edit the Makefile and remove -"-lpthread" from the linker commands (perhaps replacing it with something else). -We didn't do this automatically because we wanted to keep the example simple. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.cc deleted file mode 100644 index b9ca44fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.cc +++ /dev/null @@ -1,95 +0,0 @@ -// See README.txt for information and build instructions. - -#include -#include -#include -#include "addressbook.pb.h" -using namespace std; - -// This function fills in a Person message based on user input. -void PromptForAddress(tutorial::Person* person) { - cout << "Enter person ID number: "; - int id; - cin >> id; - person->set_id(id); - cin.ignore(256, '\n'); - - cout << "Enter name: "; - getline(cin, *person->mutable_name()); - - cout << "Enter email address (blank for none): "; - string email; - getline(cin, email); - if (!email.empty()) { - person->set_email(email); - } - - while (true) { - cout << "Enter a phone number (or leave blank to finish): "; - string number; - getline(cin, number); - if (number.empty()) { - break; - } - - tutorial::Person::PhoneNumber* phone_number = person->add_phone(); - phone_number->set_number(number); - - cout << "Is this a mobile, home, or work phone? "; - string type; - getline(cin, type); - if (type == "mobile") { - phone_number->set_type(tutorial::Person::MOBILE); - } else if (type == "home") { - phone_number->set_type(tutorial::Person::HOME); - } else if (type == "work") { - phone_number->set_type(tutorial::Person::WORK); - } else { - cout << "Unknown phone type. Using default." << endl; - } - } -} - -// Main function: Reads the entire address book from a file, -// adds one person based on user input, then writes it back out to the same -// file. -int main(int argc, char* argv[]) { - // Verify that the version of the library that we linked against is - // compatible with the version of the headers we compiled against. - GOOGLE_PROTOBUF_VERIFY_VERSION; - - if (argc != 2) { - cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl; - return -1; - } - - tutorial::AddressBook address_book; - - { - // Read the existing address book. - fstream input(argv[1], ios::in | ios::binary); - if (!input) { - cout << argv[1] << ": File not found. Creating a new file." << endl; - } else if (!address_book.ParseFromIstream(&input)) { - cerr << "Failed to parse address book." << endl; - return -1; - } - } - - // Add an address. - PromptForAddress(address_book.add_person()); - - { - // Write the new address book back to disk. - fstream output(argv[1], ios::out | ios::trunc | ios::binary); - if (!address_book.SerializeToOstream(&output)) { - cerr << "Failed to write address book." << endl; - return -1; - } - } - - // Optional: Delete all global objects allocated by libprotobuf. - google::protobuf::ShutdownProtobufLibrary(); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.py deleted file mode 100755 index 78e56966..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/add_person.py +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/python - -# See README.txt for information and build instructions. - -import addressbook_pb2 -import sys - -# This function fills in a Person message based on user input. -def PromptForAddress(person): - person.id = int(raw_input("Enter person ID number: ")) - person.name = raw_input("Enter name: ") - - email = raw_input("Enter email address (blank for none): ") - if email != "": - person.email = email - - while True: - number = raw_input("Enter a phone number (or leave blank to finish): ") - if number == "": - break - - phone_number = person.phone.add() - phone_number.number = number - - type = raw_input("Is this a mobile, home, or work phone? ") - if type == "mobile": - phone_number.type = addressbook_pb2.Person.MOBILE - elif type == "home": - phone_number.type = addressbook_pb2.Person.HOME - elif type == "work": - phone_number.type = addressbook_pb2.Person.WORK - else: - print "Unknown phone type; leaving as default value." - -# Main procedure: Reads the entire address book from a file, -# adds one person based on user input, then writes it back out to the same -# file. -if len(sys.argv) != 2: - print "Usage:", sys.argv[0], "ADDRESS_BOOK_FILE" - sys.exit(-1) - -address_book = addressbook_pb2.AddressBook() - -# Read the existing address book. -try: - f = open(sys.argv[1], "rb") - address_book.ParseFromString(f.read()) - f.close() -except IOError: - print sys.argv[1] + ": File not found. Creating a new file." - -# Add an address. -PromptForAddress(address_book.person.add()) - -# Write the new address book back to disk. -f = open(sys.argv[1], "wb") -f.write(address_book.SerializeToString()) -f.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/addressbook.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/addressbook.proto deleted file mode 100644 index b14829e9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/addressbook.proto +++ /dev/null @@ -1,30 +0,0 @@ -// See README.txt for information and build instructions. - -package tutorial; - -option java_package = "com.example.tutorial"; -option java_outer_classname = "AddressBookProtos"; - -message Person { - required string name = 1; - required int32 id = 2; // Unique ID number for this person. - optional string email = 3; - - enum PhoneType { - MOBILE = 0; - HOME = 1; - WORK = 2; - } - - message PhoneNumber { - required string number = 1; - optional PhoneType type = 2 [default = HOME]; - } - - repeated PhoneNumber phone = 4; -} - -// Our address book file is just one of these. -message AddressBook { - repeated Person person = 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.cc deleted file mode 100644 index 5363152e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.cc +++ /dev/null @@ -1,68 +0,0 @@ -// See README.txt for information and build instructions. - -#include -#include -#include -#include "addressbook.pb.h" -using namespace std; - -// Iterates though all people in the AddressBook and prints info about them. -void ListPeople(const tutorial::AddressBook& address_book) { - for (int i = 0; i < address_book.person_size(); i++) { - const tutorial::Person& person = address_book.person(i); - - cout << "Person ID: " << person.id() << endl; - cout << " Name: " << person.name() << endl; - if (person.has_email()) { - cout << " E-mail address: " << person.email() << endl; - } - - for (int j = 0; j < person.phone_size(); j++) { - const tutorial::Person::PhoneNumber& phone_number = person.phone(j); - - switch (phone_number.type()) { - case tutorial::Person::MOBILE: - cout << " Mobile phone #: "; - break; - case tutorial::Person::HOME: - cout << " Home phone #: "; - break; - case tutorial::Person::WORK: - cout << " Work phone #: "; - break; - } - cout << phone_number.number() << endl; - } - } -} - -// Main function: Reads the entire address book from a file and prints all -// the information inside. -int main(int argc, char* argv[]) { - // Verify that the version of the library that we linked against is - // compatible with the version of the headers we compiled against. - GOOGLE_PROTOBUF_VERIFY_VERSION; - - if (argc != 2) { - cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl; - return -1; - } - - tutorial::AddressBook address_book; - - { - // Read the existing address book. - fstream input(argv[1], ios::in | ios::binary); - if (!address_book.ParseFromIstream(&input)) { - cerr << "Failed to parse address book." << endl; - return -1; - } - } - - ListPeople(address_book); - - // Optional: Delete all global objects allocated by libprotobuf. - google::protobuf::ShutdownProtobufLibrary(); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.py deleted file mode 100755 index f9f36b96..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/examples/list_people.py +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/python - -# See README.txt for information and build instructions. - -import addressbook_pb2 -import sys - -# Iterates though all people in the AddressBook and prints info about them. -def ListPeople(address_book): - for person in address_book.person: - print "Person ID:", person.id - print " Name:", person.name - if person.HasField('email'): - print " E-mail address:", person.email - - for phone_number in person.phone: - if phone_number.type == addressbook_pb2.Person.MOBILE: - print " Mobile phone #:", - elif phone_number.type == addressbook_pb2.Person.HOME: - print " Home phone #:", - elif phone_number.type == addressbook_pb2.Person.WORK: - print " Work phone #:", - print phone_number.number - -# Main procedure: Reads the entire address book from a file and prints all -# the information inside. -if len(sys.argv) != 2: - print "Usage:", sys.argv[0], "ADDRESS_BOOK_FILE" - sys.exit(-1) - -address_book = addressbook_pb2.AddressBook() - -# Read the existing address book. -f = open(sys.argv[1], "rb") -address_book.ParseFromString(f.read()) -f.close() - -ListPeople(address_book) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/generate_descriptor_proto.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/generate_descriptor_proto.sh deleted file mode 100755 index 07219dc1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/generate_descriptor_proto.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# Run this script to regenerate descriptor.pb.{h,cc} after the protocol -# compiler changes. Since these files are compiled into the protocol compiler -# itself, they cannot be generated automatically by a make rule. "make check" -# will fail if these files do not match what the protocol compiler would -# generate. -# -# HINT: Flags passed to generate_descriptor_proto.sh will be passed directly -# to make when building protoc. This is particularly useful for passing -# -j4 to run 4 jobs simultaneously. - -if test ! -e src/google/protobuf/stubs/common.h; then - cat >&2 << __EOF__ -Could not find source code. Make sure you are running this script from the -root of the distribution tree. -__EOF__ - exit 1 -fi - -if test ! -e src/Makefile; then - cat >&2 << __EOF__ -Could not find src/Makefile. You must run ./configure (and perhaps -./autogen.sh) first. -__EOF__ - exit 1 -fi - -cd src -make $@ protoc && - ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto && \ - ./protoc --cpp_out=dllexport_decl=LIBPROTOC_EXPORT:. google/protobuf/compiler/plugin.proto -cd .. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CHANGES b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CHANGES deleted file mode 100644 index 1858f7f8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CHANGES +++ /dev/null @@ -1,76 +0,0 @@ -Changes for 1.4.0: - - * New feature: the event listener API - * New feature: test shuffling - * New feature: the XML report format is closer to junitreport and can - be parsed by Hudson now. - * New feature: when a test runs under Visual Studio, its failures are - integrated in the IDE. - * New feature: /MD(d) versions of VC++ projects. - * New feature: elapsed time for the tests is printed by default. - * New feature: comes with a TR1 tuple implementation such that Boost - is no longer needed for Combine(). - * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends. - * New feature: the Xcode project can now produce static gtest - libraries in addition to a framework. - * Compatibility fixes for Solaris, Cygwin, minGW, Windows Mobile, - Symbian, gcc, and C++Builder. - * Bug fixes and implementation clean-ups. - -Changes for 1.3.0: - - * New feature: death tests on Windows, Cygwin, and Mac. - * New feature: ability to use Google Test assertions in other testing - frameworks. - * New feature: ability to run disabled test via - --gtest_also_run_disabled_tests. - * New feature: the --help flag for printing the usage. - * New feature: access to Google Test flag values in user code. - * New feature: a script that packs Google Test into one .h and one - .cc file for easy deployment. - * New feature: support for distributing test functions to multiple - machines (requires support from the test runner). - * Bug fixes and implementation clean-ups. - -Changes for 1.2.1: - - * Compatibility fixes for Linux IA-64 and IBM z/OS. - * Added support for using Boost and other TR1 implementations. - * Changes to the build scripts to support upcoming release of Google C++ - Mocking Framework. - * Added Makefile to the distribution package. - * Improved build instructions in README. - -Changes for 1.2.0: - - * New feature: value-parameterized tests. - * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS) - macros. - * Changed the XML report format to match JUnit/Ant's. - * Added tests to the Xcode project. - * Added scons/SConscript for building with SCons. - * Added src/gtest-all.cc for building Google Test from a single file. - * Fixed compatibility with Solaris and z/OS. - * Enabled running Python tests on systems with python 2.3 installed, - e.g. Mac OS X 10.4. - * Bug fixes. - -Changes for 1.1.0: - - * New feature: type-parameterized tests. - * New feature: exception assertions. - * New feature: printing elapsed time of tests. - * Improved the robustness of death tests. - * Added an Xcode project and samples. - * Adjusted the output format on Windows to be understandable by Visual Studio. - * Minor bug fixes. - -Changes for 1.0.1: - - * Added project files for Visual Studio 7.1. - * Fixed issues with compiling on Mac OS X. - * Fixed issues with compiling on Cygwin. - -Changes for 1.0.0: - - * Initial Open Source release of Google Test diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CONTRIBUTORS b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CONTRIBUTORS deleted file mode 100644 index 40ce6c87..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/CONTRIBUTORS +++ /dev/null @@ -1,33 +0,0 @@ -# This file contains a list of people who've made non-trivial -# contribution to the Google C++ Testing Framework project. People -# who commit code to the project are encouraged to add their names -# here. Please keep the list sorted by first names. - -Ajay Joshi -Balázs Dán -Bharat Mediratta -Chandler Carruth -Chris Prince -Chris Taylor -Dan Egnor -Eric Roman -Jeffrey Yasskin -Jói Sigurðsson -Keir Mierle -Keith Ray -Kenton Varda -Markus Heule -Mika Raento -Patrick Hanna -Patrick Riley -Peter Kaminski -Preston Jackson -Rainer Klaffenboeck -Russ Cox -Russ Rufer -Sean Mcafee -Sigurður Ãsgeirsson -Tracy Bialik -Vadim Berman -Vlad Losev -Zhanyong Wan diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/COPYING b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/COPYING deleted file mode 100644 index 1941a11f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/Makefile.am deleted file mode 100644 index 3a9233db..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/Makefile.am +++ /dev/null @@ -1,441 +0,0 @@ -# Automake file - -# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump. - -# Nonstandard package files for distribution -EXTRA_DIST = \ - CHANGES \ - CONTRIBUTORS \ - include/gtest/gtest-param-test.h.pump \ - include/gtest/internal/gtest-tuple.h.pump \ - include/gtest/internal/gtest-type-util.h.pump \ - include/gtest/internal/gtest-param-util-generated.h.pump \ - make/Makefile \ - scons/SConscript \ - scons/SConstruct \ - scons/SConstruct.common \ - scripts/fuse_gtest_files.py \ - scripts/gen_gtest_pred_impl.py \ - scripts/test/Makefile \ - test/gtest_all_test.cc - -# MSVC project files -EXTRA_DIST += \ - msvc/gtest-md.sln \ - msvc/gtest.sln \ - msvc/gtest-md.vcproj \ - msvc/gtest.vcproj \ - msvc/gtest_main-md.vcproj \ - msvc/gtest_main.vcproj \ - msvc/gtest_prod_test-md.vcproj \ - msvc/gtest_prod_test.vcproj \ - msvc/gtest_unittest-md.vcproj \ - msvc/gtest_unittest.vcproj - -# xcode project files -EXTRA_DIST += \ - xcode/Config/DebugProject.xcconfig \ - xcode/Config/FrameworkTarget.xcconfig \ - xcode/Config/General.xcconfig \ - xcode/Config/ReleaseProject.xcconfig \ - xcode/Config/StaticLibraryTarget.xcconfig \ - xcode/Config/TestTarget.xcconfig \ - xcode/Resources/Info.plist \ - xcode/Scripts/versiongenerate.py \ - xcode/Scripts/runtests.sh \ - xcode/gtest.xcodeproj/project.pbxproj - -# xcode sample files -EXTRA_DIST += \ - xcode/Samples/FrameworkSample/Info.plist \ - xcode/Samples/FrameworkSample/widget_test.cc \ - xcode/Samples/FrameworkSample/widget.cc \ - xcode/Samples/FrameworkSample/widget.h \ - xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj - -# C++Builder project files -EXTRA_DIST += \ - codegear/gtest_all.cc \ - codegear/gtest_link.cc \ - codegear/gtest.cbproj \ - codegear/gtest_main.cbproj \ - codegear/gtest_unittest.cbproj \ - codegear/gtest.groupproj - -# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into -# the build system such that a user can specify the maximum predicate -# arity here and have the script automatically generate the -# corresponding .h and .cc files. - -# Scripts and utilities -bin_SCRIPTS = scripts/gtest-config -CLEANFILES = $(bin_SCRIPTS) - -# Distribute and install M4 macro -m4datadir = $(datadir)/aclocal -m4data_DATA = m4/gtest.m4 -EXTRA_DIST += $(m4data_DATA) - -# We define the global AM_CPPFLAGS as everything we compile includes from these -# directories. -AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include - -# Build rules for libraries. -lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la - -lib_libgtest_la_SOURCES = src/gtest.cc \ - src/gtest-death-test.cc \ - src/gtest-filepath.cc \ - src/gtest-internal-inl.h \ - src/gtest-port.cc \ - src/gtest-test-part.cc \ - src/gtest-typed-test.cc - -pkginclude_HEADERS = include/gtest/gtest.h \ - include/gtest/gtest-death-test.h \ - include/gtest/gtest-message.h \ - include/gtest/gtest-param-test.h \ - include/gtest/gtest_pred_impl.h \ - include/gtest/gtest_prod.h \ - include/gtest/gtest-spi.h \ - include/gtest/gtest-test-part.h \ - include/gtest/gtest-typed-test.h - -pkginclude_internaldir = $(pkgincludedir)/internal -pkginclude_internal_HEADERS = \ - include/gtest/internal/gtest-death-test-internal.h \ - include/gtest/internal/gtest-filepath.h \ - include/gtest/internal/gtest-internal.h \ - include/gtest/internal/gtest-linked_ptr.h \ - include/gtest/internal/gtest-param-util-generated.h \ - include/gtest/internal/gtest-param-util.h \ - include/gtest/internal/gtest-port.h \ - include/gtest/internal/gtest-string.h \ - include/gtest/internal/gtest-tuple.h \ - include/gtest/internal/gtest-type-util.h - -lib_libgtest_main_la_SOURCES = src/gtest_main.cc -lib_libgtest_main_la_LIBADD = lib/libgtest.la - -# Bulid rules for samples and tests. Automake's naming for some of -# these variables isn't terribly obvious, so this is a brief -# reference: -# -# TESTS -- Programs run automatically by "make check" -# check_PROGRAMS -- Programs built by "make check" but not necessarily run - -noinst_LTLIBRARIES = samples/libsamples.la - -samples_libsamples_la_SOURCES = samples/sample1.cc \ - samples/sample1.h \ - samples/sample2.cc \ - samples/sample2.h \ - samples/sample3-inl.h \ - samples/sample4.cc \ - samples/sample4.h - -TESTS= -TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \ - GTEST_BUILD_DIR="$(top_builddir)/test" -check_PROGRAMS= - -TESTS += samples/sample1_unittest -check_PROGRAMS += samples/sample1_unittest -samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc -samples_sample1_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample2_unittest -check_PROGRAMS += samples/sample2_unittest -samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc -samples_sample2_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample3_unittest -check_PROGRAMS += samples/sample3_unittest -samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc -samples_sample3_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample4_unittest -check_PROGRAMS += samples/sample4_unittest -samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc -samples_sample4_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample5_unittest -check_PROGRAMS += samples/sample5_unittest -samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc -samples_sample5_unittest_LDADD = lib/libgtest_main.la \ - samples/libsamples.la - -TESTS += samples/sample6_unittest -check_PROGRAMS += samples/sample6_unittest -samples_sample6_unittest_SOURCES = samples/prime_tables.h \ - samples/sample6_unittest.cc -samples_sample6_unittest_LDADD = lib/libgtest_main.la - -TESTS += samples/sample7_unittest -check_PROGRAMS += samples/sample7_unittest -samples_sample7_unittest_SOURCES = samples/prime_tables.h \ - samples/sample7_unittest.cc -samples_sample7_unittest_LDADD = lib/libgtest_main.la - -TESTS += samples/sample8_unittest -check_PROGRAMS += samples/sample8_unittest -samples_sample8_unittest_SOURCES = samples/prime_tables.h \ - samples/sample8_unittest.cc -samples_sample8_unittest_LDADD = lib/libgtest_main.la - -TESTS += samples/sample9_unittest -check_PROGRAMS += samples/sample9_unittest -samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc -samples_sample9_unittest_LDADD = lib/libgtest.la - -TESTS += samples/sample10_unittest -check_PROGRAMS += samples/sample10_unittest -samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc -samples_sample10_unittest_LDADD = lib/libgtest.la - -TESTS += test/gtest-death-test_test -check_PROGRAMS += test/gtest-death-test_test -test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc -test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) -test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \ - lib/libgtest_main.la - -TESTS += test/gtest_environment_test -check_PROGRAMS += test/gtest_environment_test -test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc -test_gtest_environment_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-filepath_test -check_PROGRAMS += test/gtest-filepath_test -test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc -test_gtest_filepath_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-linked_ptr_test -check_PROGRAMS += test/gtest-linked_ptr_test -test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc -test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_main_unittest -check_PROGRAMS += test/gtest_main_unittest -test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc -test_gtest_main_unittest_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-message_test -check_PROGRAMS += test/gtest-message_test -test_gtest_message_test_SOURCES = test/gtest-message_test.cc -test_gtest_message_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_no_test_unittest -check_PROGRAMS += test/gtest_no_test_unittest -test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc -test_gtest_no_test_unittest_LDADD = lib/libgtest.la - -TESTS += test/gtest-options_test -check_PROGRAMS += test/gtest-options_test -test_gtest_options_test_SOURCES = test/gtest-options_test.cc -test_gtest_options_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-param-test_test -check_PROGRAMS += test/gtest-param-test_test -test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \ - test/gtest-param-test2_test.cc \ - test/gtest-param-test_test.h -test_gtest_param_test_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-port_test -check_PROGRAMS += test/gtest-port_test -test_gtest_port_test_SOURCES = test/gtest-port_test.cc -test_gtest_port_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_pred_impl_unittest -check_PROGRAMS += test/gtest_pred_impl_unittest -test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc -test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_prod_test -check_PROGRAMS += test/gtest_prod_test -test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \ - test/production.cc \ - test/production.h -test_gtest_prod_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_repeat_test -check_PROGRAMS += test/gtest_repeat_test -test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc -test_gtest_repeat_test_LDADD = lib/libgtest.la - -TESTS += test/gtest_sole_header_test -check_PROGRAMS += test/gtest_sole_header_test -test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc -test_gtest_sole_header_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_stress_test -check_PROGRAMS += test/gtest_stress_test -test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc -test_gtest_stress_test_LDADD = lib/libgtest.la - -TESTS += test/gtest-test-part_test -check_PROGRAMS += test/gtest-test-part_test -test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc -test_gtest_test_part_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_throw_on_failure_ex_test -check_PROGRAMS += test/gtest_throw_on_failure_ex_test -test_gtest_throw_on_failure_ex_test_SOURCES = \ - test/gtest_throw_on_failure_ex_test.cc \ - src/gtest-all.cc -test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions - -TESTS += test/gtest-typed-test_test -check_PROGRAMS += test/gtest-typed-test_test -test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \ - test/gtest-typed-test2_test.cc \ - test/gtest-typed-test_test.h -test_gtest_typed_test_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest_unittest -check_PROGRAMS += test/gtest_unittest -test_gtest_unittest_SOURCES = test/gtest_unittest.cc -test_gtest_unittest_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-unittest-api_test -check_PROGRAMS += test/gtest-unittest-api_test -test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc -test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la - -TESTS += test/gtest-listener_test -check_PROGRAMS += test/gtest-listener_test -test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc -test_gtest_listener_test_LDADD = lib/libgtest_main.la - -# Verifies that Google Test works when RTTI is disabled. -TESTS += test/gtest_no_rtti_test -check_PROGRAMS += test/gtest_no_rtti_test -test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \ - src/gtest-all.cc \ - src/gtest_main.cc -test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0 - -# Verifies that Google Test's own TR1 tuple implementation works. -TESTS += test/gtest-tuple_test -check_PROGRAMS += test/gtest-tuple_test -test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \ - src/gtest-all.cc \ - src/gtest_main.cc -test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 - -# Verifies that Google Test's features that use its own TR1 tuple work. -TESTS += test/gtest_use_own_tuple_test -check_PROGRAMS += test/gtest_use_own_tuple_test -test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \ - test/gtest-param-test2_test.cc \ - src/gtest-all.cc -test_gtest_use_own_tuple_test_CXXFLAGS = \ - $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 - -# The following tests depend on the presence of a Python installation and are -# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt -# to build and execute these tests if Autoconf has found Python v2.4 on the -# system, we don't use the PYTHON variable it specified as the valid -# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and -# thus we cannot distinguish between C++ unit tests and Python unit tests. -if HAVE_PYTHON -check_SCRIPTS = - -# These two Python modules are used by multiple Python tests below. -check_SCRIPTS += test/gtest_test_utils.py \ - test/gtest_xml_test_utils.py - -check_PROGRAMS += test/gtest_break_on_failure_unittest_ -test_gtest_break_on_failure_unittest__SOURCES = \ - test/gtest_break_on_failure_unittest_.cc -test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_break_on_failure_unittest.py -TESTS += test/gtest_break_on_failure_unittest.py - -check_PROGRAMS += test/gtest_color_test_ -test_gtest_color_test__SOURCES = test/gtest_color_test_.cc -test_gtest_color_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_color_test.py -TESTS += test/gtest_color_test.py - -check_PROGRAMS += test/gtest_env_var_test_ -test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc -test_gtest_env_var_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_env_var_test.py -TESTS += test/gtest_env_var_test.py - -check_PROGRAMS += test/gtest_filter_unittest_ -test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc -test_gtest_filter_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_filter_unittest.py -TESTS += test/gtest_filter_unittest.py - -check_PROGRAMS += test/gtest_help_test_ -test_gtest_help_test__SOURCES = test/gtest_help_test_.cc -test_gtest_help_test__LDADD = lib/libgtest_main.la -check_SCRIPTS += test/gtest_help_test.py -TESTS += test/gtest_help_test.py - -check_PROGRAMS += test/gtest_list_tests_unittest_ -test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc -test_gtest_list_tests_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_list_tests_unittest.py -TESTS += test/gtest_list_tests_unittest.py - -check_PROGRAMS += test/gtest_output_test_ -test_gtest_output_test__SOURCES = test/gtest_output_test_.cc -test_gtest_output_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_output_test.py -EXTRA_DIST += test/gtest_output_test_golden_lin.txt \ - test/gtest_output_test_golden_win.txt -TESTS += test/gtest_output_test.py - -check_PROGRAMS += test/gtest_shuffle_test_ -test_gtest_shuffle_test__SOURCES = test/gtest_shuffle_test_.cc -test_gtest_shuffle_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_shuffle_test.py -TESTS += test/gtest_shuffle_test.py - -check_PROGRAMS += test/gtest_throw_on_failure_test_ -test_gtest_throw_on_failure_test__SOURCES = \ - test/gtest_throw_on_failure_test_.cc \ - src/gtest-all.cc -test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions -check_SCRIPTS += test/gtest_throw_on_failure_test.py -TESTS += test/gtest_throw_on_failure_test.py - -check_PROGRAMS += test/gtest_uninitialized_test_ -test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc -test_gtest_uninitialized_test__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_uninitialized_test.py -TESTS += test/gtest_uninitialized_test.py - -check_PROGRAMS += test/gtest_xml_outfile1_test_ -test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc -test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la -check_PROGRAMS += test/gtest_xml_outfile2_test_ -test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc -test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la -check_SCRIPTS += test/gtest_xml_outfiles_test.py -TESTS += test/gtest_xml_outfiles_test.py - -check_PROGRAMS += test/gtest_xml_output_unittest_ -test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc -test_gtest_xml_output_unittest__LDADD = lib/libgtest.la -check_SCRIPTS += test/gtest_xml_output_unittest.py -TESTS += test/gtest_xml_output_unittest.py - -# TODO(wan@google.com): make the build script compile and run the -# negative-compilation tests. (The test/gtest_nc* files are unfinished -# implementation of tests for verifying that certain kinds of misuse -# of Google Test don't compile.) -EXTRA_DIST += $(check_SCRIPTS) \ - test/gtest_nc.cc \ - test/gtest_nc_test.py - -endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/README b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/README deleted file mode 100644 index a9172c56..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/README +++ /dev/null @@ -1,318 +0,0 @@ -Google C++ Testing Framework -============================ -http://code.google.com/p/googletest/ - -Overview --------- -Google's framework for writing C++ tests on a variety of platforms (Linux, Mac -OS X, Windows, Windows CE, Symbian, and etc). Based on the xUnit architecture. -Supports automatic test discovery, a rich set of assertions, user-defined -assertions, death tests, fatal and non-fatal failures, various options for -running the tests, and XML test report generation. - -Please see the project page above for more information as well as mailing lists -for questions, discussions, and development. There is also an IRC channel on -OFTC (irc.oftc.net) #gtest available. Please join us! - -Requirements ------------- -Google Test is designed to have fairly minimal requirements to build -and use with your projects, but there are some. Currently, we support -building Google Test on Linux, Windows, Mac OS X, and Cygwin. We will -also make our best effort to support other platforms (e.g. Solaris and -IBM z/OS). However, since core members of the Google Test project -have no access to them, Google Test may have outstanding issues on -these platforms. If you notice any problems on your platform, please -notify googletestframework@googlegroups.com (patches for fixing them -are even more welcome!). - -### Linux Requirements ### -These are the base requirements to build and use Google Test from a source -package (as described below): - * GNU-compatible Make or "gmake" - * POSIX-standard shell - * POSIX(-2) Regular Expressions (regex.h) - * A C++98 standards compliant compiler - -Furthermore, if you are building Google Test from a VCS Checkout (also -described below), there are further requirements: - * Automake version 1.9 or newer - * Autoconf version 2.59 or newer - * Libtool / Libtoolize - * Python version 2.4 or newer - -### Windows Requirements ### - * Microsoft Visual Studio 7.1 or newer - -### Cygwin Requirements ### - * Cygwin 1.5.25-14 or newer - -### Mac OS X Requirements ### - * Mac OS X 10.4 Tiger or newer - * Developer Tools Installed - * Optional: Xcode 2.5 or later for univeral-binary framework; see note below. - -Getting the Source ------------------- -There are two primary ways of getting Google Test's source code: you can -download a source release in your preferred archive format, or directly check -out the source from a Version Control System (VCS, we use Google Code's -Subversion hosting). The VCS checkout requires a few extra steps and some extra -software packages on your system, but lets you track development, and make -patches to contribute much more easily, so we highly encourage it. - -### VCS Checkout: ### -The first step is to select whether you want to check out the main line of -development on Google Test, or one of the released branches. The former will be -much more active and have the latest features, but the latter provides much -more stability and predictability. Choose whichever fits your needs best, and -proceed with the following Subversion commands: - - svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn - -or for a release version X.Y.*'s branch: - - svn checkout http://googletest.googlecode.com/svn/branches/release-X.Y/ \ - gtest-X.Y-svn - -Next you will need to prepare the GNU Autotools build system, if you -are using Linux, Mac OS X, or Cygwin. Enter the target directory of -the checkout command you used ('gtest-svn' or 'gtest-X.Y-svn' above) -and proceed with the following command: - - autoreconf -fvi - -Once you have completed this step, you are ready to build the library. Note -that you should only need to complete this step once. The subsequent `make' -invocations will automatically re-generate the bits of the build system that -need to be changed. - -If your system uses older versions of the autotools, the above command will -fail. You may need to explicitly specify a version to use. For instance, if you -have both GNU Automake 1.4 and 1.9 installed and `automake' would invoke the -1.4, use instead: - - AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi - -Make sure you're using the same version of automake and aclocal. - -### Source Package: ### -Google Test is also released in source packages which can be downloaded from -its Google Code download page[1]. Several different archive formats are -provided, but the only difference is the tools used to manipulate them, and the -size of the resulting file. Download whichever you are most comfortable with. - - [1] Google Test Downloads: http://code.google.com/p/googletest/downloads/list - -Once downloaded expand the archive using whichever tools you prefer for that -type. This will always result in a new directory with the name "gtest-X.Y.Z" -which contains all of the source code. Here are some examples in Linux: - - tar -xvzf gtest-X.Y.Z.tar.gz - tar -xvjf gtest-X.Y.Z.tar.bz2 - unzip gtest-X.Y.Z.zip - -Choosing a TR1 Tuple Library ----------------------------- -Some Google Test features require the C++ Technical Report 1 (TR1) -tuple library, which is not yet widely available with all compilers. -The good news is that Google Test implements a subset of TR1 tuple -that's enough for its own need, and will automatically use this when -the compiler doesn't provide TR1 tuple. - -Usually you don't need to care about which tuple library Google Test -uses. However, if your project already uses TR1 tuple, you need to -tell Google Test to use the same TR1 tuple library the rest of your -project uses (this requirement is new in Google Test 1.4.0, so you may -need to take care of it when upgrading from an earlier version), or -the two tuple implementations will clash. To do that, add - - -DGTEST_USE_OWN_TR1_TUPLE=0 - -to the compiler flags while compiling Google Test and your tests. - -If you don't want Google Test to use tuple at all, add - - -DGTEST_HAS_TR1_TUPLE=0 - -to the compiler flags. All features using tuple will be disabled in -this mode. - -Building the Source -------------------- -### Linux, Mac OS X (without Xcode), and Cygwin ### -There are two primary options for building the source at this point: build it -inside the source code tree, or in a separate directory. We recommend building -in a separate directory as that tends to produce both more consistent results -and be easier to clean up should anything go wrong, but both patterns are -supported. The only hard restriction is that while the build directory can be -a subdirectory of the source directory, the opposite is not possible and will -result in errors. Once you have selected where you wish to build Google Test, -create the directory if necessary, and enter it. The following steps apply for -either approach by simply substituting the shell variable SRCDIR with "." for -building inside the source directory, and the relative path to the source -directory otherwise. - - ${SRCDIR}/configure # Standard GNU configure script, --help for more info - make # Standard makefile following GNU conventions - make check # Builds and runs all tests - all should pass - -Other programs will only be able to use Google Test's functionality if you -install it in a location which they can access, in Linux this is typically -under '/usr/local'. The following command will install all of the Google Test -libraries, public headers, and utilities necessary for other programs and -libraries to leverage it: - - sudo make install # Not necessary, but allows use by other programs - -Should you need to remove Google Test from your system after having installed -it, run the following command, and it will back out its changes. However, note -carefully that you must run this command on the *same* Google Test build that -you ran the install from, or the results are not predictable. If you install -Google Test on your system, and are working from a VCS checkout, make sure you -run this *before* updating your checkout of the source in order to uninstall -the same version which you installed. - - sudo make uninstall # Must be run against the exact same build as "install" - -Your project can build against Google Test simply by leveraging the -'gtest-config' script. This script can be invoked directly out of the 'scripts' -subdirectory of the build tree, and it will be installed in the binary -directory specified during the 'configure'. Here are some examples of its use, -see 'gtest-config --help' for more detailed information. - - gtest-config --min-version=1.0 || echo "Insufficient Google Test version." - - g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gtest-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Test: - g++ $(../../my_gtest_build/scripts/gtest-config ...) ... - -### Windows ### -The msvc\ folder contains two solutions with Visual C++ projects. Open the -gtest.sln or gtest-md.sln file using Visual Studio, and you are ready to -build Google Test the same way you build any Visual Studio project. Files -that have names ending with -md use DLL versions of Microsoft runtime -libraries (the /MD or the /MDd compiler option). Files without that suffix -use static versions of the runtime libraries (the /MT or the /MTd option). -Please note that one must use the same option to compile both gtest and his -test code. If you use Visual Studio 2005 or above, we recommend the -md -version as /MD is the default for new projects in these versions of Visual -Studio. - -### Mac OS X (universal-binary framework) ### -Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest" -target. The universal binary framework will end up in your selected build -directory (selected in the Xcode "Preferences..." -> "Building" pane and -defaults to xcode/build). Alternatively, at the command line, enter: - - xcodebuild - -This will build the "Release" configuration of gtest.framework in your -default build location. See the "xcodebuild" man page for more information about -building different configurations and building in different locations. - -To test the gtest.framework in Xcode, change the active target to "Check" and -then build. This target builds all of the tests and then runs them. Don't worry -if you see some errors. Xcode reports all test failures (even the intentional -ones) as errors. However, you should see a "Build succeeded" message at the end -of the build log. To run all of the tests from the command line, enter: - - xcodebuild -target Check - -Installation with xcodebuild requires specifying an installation desitination -directory, known as the DSTROOT. Three items will be installed when using -xcodebuild: - - $DSTROOT/Library/Frameworks/gtest.framework - $DSTROOT/usr/local/lib/libgtest.a - $DSTROOT/usr/local/lib/libgtest_main.a - -You specify the installation directory on the command line with the other -xcodebuild options. Here's how you would install in a user-visible location: - - xcodebuild install DSTROOT=~ - -To perform a system-wide inistall, escalate to an administrator and specify -the file system root as the DSTROOT: - - sudo xcodebuild install DSTROOT=/ - -To uninstall gtest.framework via the command line, you need to delete the three -items listed above. Remember to escalate to an administrator if deleting these -from the system-wide location using the commands listed below: - - sudo rm -r /Library/Frameworks/gtest.framework - sudo rm /usr/local/lib/libgtest.a - sudo rm /usr/local/lib/libgtest_main.a - -It is also possible to build and execute individual tests within Xcode. Each -test has its own Xcode "Target" and Xcode "Executable". To build any of the -tests, change the active target and the active executable to the test of -interest and then build and run. - -Individual tests can be built from the command line using: - - xcodebuild -target - -These tests can be executed from the command line by moving to the build -directory and then (in bash) - - export DYLD_FRAMEWORK_PATH=`pwd` - ./ # (e.g. ./gtest_unittest) - -To use gtest.framework for your own tests, first, install the framework using -the steps described above. Then add it to your Xcode project by selecting -Project->Add to Project... from the main menu. Next, add libgtest_main.a from -gtest.framework/Resources directory using the same menu command. Finally, -create a new executable target and add gtest.framework and libgtest_main.a to -the "Link Binary With Libraries" build phase. - -### Using GNU Make ### -The make/ directory contains a Makefile that you can use to build -Google Test on systems where GNU make is available (e.g. Linux, Mac OS -X, and Cygwin). It doesn't try to build Google Test's own tests. -Instead, it just builds the Google Test library and a sample test. -You can use it as a starting point for your own Makefile. - -If the default settings are correct for your environment, the -following commands should succeed: - - cd ${SRCDIR}/make - make - ./sample1_unittest - -If you see errors, try to tweak the contents of make/Makefile to make -them go away. There are instructions in make/Makefile on how to do -it. - -### Using Your Own Build System ### -If none of the build solutions we provide works for you, or if you -prefer your own build system, you just need to compile -src/gtest-all.cc into a library and link your tests with it. Assuming -a Linux-like system and gcc, something like the following will do: - - cd ${SRCDIR} - g++ -I. -I./include -c src/gtest-all.cc - ar -rv libgtest.a gtest-all.o - g++ -I. -I./include path/to/your_test.cc libgtest.a -o your_test - -Regenerating Source Files -------------------------- -Some of Google Test's source files are generated from templates (not -in the C++ sense) using a script. A template file is named FOO.pump, -where FOO is the name of the file it will generate. For example, the -file include/gtest/internal/gtest-type-util.h.pump is used to generate -gtest-type-util.h in the same directory. - -Normally you don't need to worry about regenerating the source files, -unless you need to modify them (e.g. if you are working on a patch for -Google Test). In that case, you should modify the corresponding .pump -files instead and run the 'pump' script (for Pump is Useful for Meta -Programming) to regenerate them. We are still working on releasing -the script and its documentation. If you need it now, please email -googletestframework@googlegroups.com such that we know to make it -happen sooner. - -Happy testing! diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/build-aux/.keep b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/build-aux/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.cbproj deleted file mode 100644 index 95c3054b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.cbproj +++ /dev/null @@ -1,138 +0,0 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 3 - - - 4 - - - 5 - - - 6 - - - 7 - - - 8 - - - 0 - - - 1 - - - 2 - - - 9 - - - 10 - - - 11 - - - 12 - - - 14 - - - 13 - - - 15 - - - 16 - - - 17 - - - 18 - - - Cfg_1 - - - Cfg_2 - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.groupproj b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.groupproj deleted file mode 100644 index 8b650f85..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest.groupproj +++ /dev/null @@ -1,54 +0,0 @@ - - - {c1d923e0-6cba-4332-9b6f-3420acbf5091} - - - - - - - - - Default.Personality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_all.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_all.cc deleted file mode 100644 index 121b2d80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_all.cc +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// C++Builder's IDE cannot build a static library from files with hyphens -// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . -// This file serves as a workaround. - -#include "src/gtest-all.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_link.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_link.cc deleted file mode 100644 index 918eccd1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_link.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// Links gtest.lib and gtest_main.lib into the current project in C++Builder. -// This means that these libraries can't be renamed, but it's the only way to -// ensure that Debug versus Release test builds are linked against the -// appropriate Debug or Release build of the libraries. - -#pragma link "gtest.lib" -#pragma link "gtest_main.lib" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_main.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_main.cbproj deleted file mode 100644 index d76ce139..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_main.cbproj +++ /dev/null @@ -1,82 +0,0 @@ - - - - {bca37a72-5b07-46cf-b44e-89f8e06451a2} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - lib - JPHNE - NO_STRICT - true - true - CppStaticLibrary - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;.. - rtl.lib;vcl.lib - 32 - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk - - - false - false - true - _DEBUG;$(Defines) - true - false - true - None - DEBUG - true - Debug - true - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppStaticLibrary - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk1NO_STRICT13216 - - - - - 0 - - - Cfg_1 - - - Cfg_2 - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_unittest.cbproj b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_unittest.cbproj deleted file mode 100644 index d3823c90..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/codegear/gtest_unittest.cbproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - {eea63393-5ac5-4b9c-8909-d75fef2daa41} - Release - - - true - - - true - true - Base - - - true - true - Base - - - true - exe - JPHNE - NO_STRICT - true - true - ..\test - true - CppConsoleApplication - true - rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi - false - $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;.. - $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test - true - - - false - false - _DEBUG;$(Defines) - true - true - false - true - None - DEBUG - true - Debug - true - true - $(BDS)\lib\debug;$(ILINK_LibraryPath) - true - Full - true - - - NDEBUG;$(Defines) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) - None - - - CPlusPlusBuilder.Personality - CppConsoleApplication - -FalseFalse1000FalseFalseFalseFalseFalse103312521.0.0.01.0.0.0FalseFalseFalseTrueFalse - - - CodeGear C++Builder Office 2000 Servers Package - CodeGear C++Builder Office XP Servers Package - FalseTrueTrue3$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include1$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test2NO_STRICTSTRICT - - - - - 0 - - - 1 - - - Cfg_1 - - - Cfg_2 - - - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/configure.ac b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/configure.ac deleted file mode 100644 index 709b024a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/configure.ac +++ /dev/null @@ -1,51 +0,0 @@ -m4_include(m4/acx_pthread.m4) - -# At this point, the Xcode project assumes the version string will be three -# integers separated by periods and surrounded by square brackets (e.g. -# "[1.0.1]"). It also asumes that there won't be any closing parenthesis -# between "AC_INIT(" and the closing ")" including comments and strings. -AC_INIT([Google C++ Testing Framework], - [1.4.0], - [googletestframework@googlegroups.com], - [gtest]) - -# Provide various options to initialize the Autoconf and configure processes. -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([./COPYING]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_HEADERS([build-aux/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config]) - -# Initialize Automake with various options. We require at least v1.9, prevent -# pedantic complaints about package files, and enable various distribution -# targets. -AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) - -# Check for programs used in building Google Test. -AC_PROG_CC -AC_PROG_CXX -AC_LANG([C++]) -AC_PROG_LIBTOOL - -# TODO(chandlerc@google.com): Currently we aren't running the Python tests -# against the interpreter detected by AM_PATH_PYTHON, and so we condition -# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's -# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" -# hashbang. -PYTHON= # We *do not* allow the user to specify a python interpreter -AC_PATH_PROG([PYTHON],[python],[:]) -AS_IF([test "$PYTHON" != ":"], - [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) -AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) - -# Check for pthreads. -ACX_PTHREAD - -# TODO(chandlerc@google.com) Check for the necessary system headers. - -# TODO(chandlerc@google.com) Check the types, structures, and other compiler -# and architecture characteristics. - -# Output the generated files. No further autoconf macros may be used. -AC_OUTPUT diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-death-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-death-test.h deleted file mode 100644 index fdb497f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-death-test.h +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for death tests. It is -// #included by gtest.h so a user doesn't need to include this -// directly. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ - -#include - -namespace testing { - -// This flag controls the style of death tests. Valid values are "threadsafe", -// meaning that the death test child process will re-execute the test binary -// from the start, running only a single death test, or "fast", -// meaning that the child process will execute the test logic immediately -// after forking. -GTEST_DECLARE_string_(death_test_style); - -#if GTEST_HAS_DEATH_TEST - -// The following macros are useful for writing death tests. - -// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is -// executed: -// -// 1. It generates a warning if there is more than one active -// thread. This is because it's safe to fork() or clone() only -// when there is a single thread. -// -// 2. The parent process clone()s a sub-process and runs the death -// test in it; the sub-process exits with code 0 at the end of the -// death test, if it hasn't exited already. -// -// 3. The parent process waits for the sub-process to terminate. -// -// 4. The parent process checks the exit code and error message of -// the sub-process. -// -// Examples: -// -// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number"); -// for (int i = 0; i < 5; i++) { -// EXPECT_DEATH(server.ProcessRequest(i), -// "Invalid request .* in ProcessRequest()") -// << "Failed to die on request " << i); -// } -// -// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting"); -// -// bool KilledBySIGHUP(int exit_code) { -// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP; -// } -// -// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!"); -// -// On the regular expressions used in death tests: -// -// On POSIX-compliant systems (*nix), we use the library, -// which uses the POSIX extended regex syntax. -// -// On other platforms (e.g. Windows), we only support a simple regex -// syntax implemented as part of Google Test. This limited -// implementation should be enough most of the time when writing -// death tests; though it lacks many features you can find in PCRE -// or POSIX extended regex syntax. For example, we don't support -// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and -// repetition count ("x{5,7}"), among others. -// -// Below is the syntax that we do support. We chose it to be a -// subset of both PCRE and POSIX extended regex, so it's easy to -// learn wherever you come from. In the following: 'A' denotes a -// literal character, period (.), or a single \\ escape sequence; -// 'x' and 'y' denote regular expressions; 'm' and 'n' are for -// natural numbers. -// -// c matches any literal character c -// \\d matches any decimal digit -// \\D matches any character that's not a decimal digit -// \\f matches \f -// \\n matches \n -// \\r matches \r -// \\s matches any ASCII whitespace, including \n -// \\S matches any character that's not a whitespace -// \\t matches \t -// \\v matches \v -// \\w matches any letter, _, or decimal digit -// \\W matches any character that \\w doesn't match -// \\c matches any literal character c, which must be a punctuation -// . matches any single character except \n -// A? matches 0 or 1 occurrences of A -// A* matches 0 or many occurrences of A -// A+ matches 1 or many occurrences of A -// ^ matches the beginning of a string (not that of each line) -// $ matches the end of a string (not that of each line) -// xy matches x followed by y -// -// If you accidentally use PCRE or POSIX extended regex features -// not implemented by us, you will get a run-time failure. In that -// case, please try to rewrite your regular expression within the -// above syntax. -// -// This implementation is *not* meant to be as highly tuned or robust -// as a compiled regex library, but should perform well enough for a -// death test, which already incurs significant overhead by launching -// a child process. -// -// Known caveats: -// -// A "threadsafe" style death test obtains the path to the test -// program from argv[0] and re-executes it in the sub-process. For -// simplicity, the current implementation doesn't search the PATH -// when launching the sub-process. This means that the user must -// invoke the test program via a path that contains at least one -// path separator (e.g. path/to/foo_test and -// /absolute/path/to/bar_test are fine, but foo_test is not). This -// is rarely a problem as people usually don't put the test binary -// directory in PATH. -// -// TODO(wan@google.com): make thread-safe death tests search the PATH. - -// Asserts that a given statement causes the program to exit, with an -// integer exit status that satisfies predicate, and emitting error output -// that matches regex. -#define ASSERT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) - -// Like ASSERT_EXIT, but continues on to successive tests in the -// test case, if any: -#define EXPECT_EXIT(statement, predicate, regex) \ - GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) - -// Asserts that a given statement causes the program to exit, either by -// explicitly exiting with a nonzero exit code or being killed by a -// signal, and emitting error output that matches regex. -#define ASSERT_DEATH(statement, regex) \ - ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Like ASSERT_DEATH, but continues on to successive tests in the -// test case, if any: -#define EXPECT_DEATH(statement, regex) \ - EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) - -// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*: - -// Tests that an exit code describes a normal exit with a given exit code. -class ExitedWithCode { - public: - explicit ExitedWithCode(int exit_code); - bool operator()(int exit_status) const; - private: - // No implementation - assignment is unsupported. - void operator=(const ExitedWithCode& other); - - const int exit_code_; -}; - -#if !GTEST_OS_WINDOWS -// Tests that an exit code describes an exit due to termination by a -// given signal. -class KilledBySignal { - public: - explicit KilledBySignal(int signum); - bool operator()(int exit_status) const; - private: - const int signum_; -}; -#endif // !GTEST_OS_WINDOWS - -// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode. -// The death testing framework causes this to have interesting semantics, -// since the sideeffects of the call are only visible in opt mode, and not -// in debug mode. -// -// In practice, this can be used to test functions that utilize the -// LOG(DFATAL) macro using the following style: -// -// int DieInDebugOr12(int* sideeffect) { -// if (sideeffect) { -// *sideeffect = 12; -// } -// LOG(DFATAL) << "death"; -// return 12; -// } -// -// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) { -// int sideeffect = 0; -// // Only asserts in dbg. -// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death"); -// -// #ifdef NDEBUG -// // opt-mode has sideeffect visible. -// EXPECT_EQ(12, sideeffect); -// #else -// // dbg-mode no visible sideeffect. -// EXPECT_EQ(0, sideeffect); -// #endif -// } -// -// This will assert that DieInDebugReturn12InOpt() crashes in debug -// mode, usually due to a DCHECK or LOG(DFATAL), but returns the -// appropriate fallback value (12 in this case) in opt mode. If you -// need to test that a function has appropriate side-effects in opt -// mode, include assertions against the side-effects. A general -// pattern for this is: -// -// EXPECT_DEBUG_DEATH({ -// // Side-effects here will have an effect after this statement in -// // opt mode, but none in debug mode. -// EXPECT_EQ(12, DieInDebugOr12(&sideeffect)); -// }, "death"); -// -#ifdef NDEBUG - -#define EXPECT_DEBUG_DEATH(statement, regex) \ - do { statement; } while (::testing::internal::AlwaysFalse()) - -#define ASSERT_DEBUG_DEATH(statement, regex) \ - do { statement; } while (::testing::internal::AlwaysFalse()) - -#else - -#define EXPECT_DEBUG_DEATH(statement, regex) \ - EXPECT_DEATH(statement, regex) - -#define ASSERT_DEBUG_DEATH(statement, regex) \ - ASSERT_DEATH(statement, regex) - -#endif // NDEBUG for EXPECT_DEBUG_DEATH -#endif // GTEST_HAS_DEATH_TEST - -// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and -// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if -// death tests are supported; otherwise they just issue a warning. This is -// useful when you are combining death test assertions with normal test -// assertions in one test. -#if GTEST_HAS_DEATH_TEST -#define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ - EXPECT_DEATH(statement, regex) -#define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ - ASSERT_DEATH(statement, regex) -#else -#define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ - GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, ) -#define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ - GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return) -#endif - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-message.h deleted file mode 100644 index 6398712e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-message.h +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the Message class. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! - -#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ -#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ - -#include -#include - -namespace testing { - -// The Message class works like an ostream repeater. -// -// Typical usage: -// -// 1. You stream a bunch of values to a Message object. -// It will remember the text in a StrStream. -// 2. Then you stream the Message object to an ostream. -// This causes the text in the Message to be streamed -// to the ostream. -// -// For example; -// -// testing::Message foo; -// foo << 1 << " != " << 2; -// std::cout << foo; -// -// will print "1 != 2". -// -// Message is not intended to be inherited from. In particular, its -// destructor is not virtual. -// -// Note that StrStream behaves differently in gcc and in MSVC. You -// can stream a NULL char pointer to it in the former, but not in the -// latter (it causes an access violation if you do). The Message -// class hides this difference by treating a NULL char pointer as -// "(null)". -class Message { - private: - // The type of basic IO manipulators (endl, ends, and flush) for - // narrow streams. - typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&); - - public: - // Constructs an empty Message. - // We allocate the StrStream separately because it otherwise each use of - // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's - // stack frame leading to huge stack frames in some cases; gcc does not reuse - // the stack space. - Message() : ss_(new internal::StrStream) {} - - // Copy constructor. - Message(const Message& msg) : ss_(new internal::StrStream) { // NOLINT - *ss_ << msg.GetString(); - } - - // Constructs a Message from a C-string. - explicit Message(const char* str) : ss_(new internal::StrStream) { - *ss_ << str; - } - - ~Message() { delete ss_; } -#if GTEST_OS_SYMBIAN - // Streams a value (either a pointer or not) to this object. - template - inline Message& operator <<(const T& value) { - StreamHelper(typename internal::is_pointer::type(), value); - return *this; - } -#else - // Streams a non-pointer value to this object. - template - inline Message& operator <<(const T& val) { - ::GTestStreamToHelper(ss_, val); - return *this; - } - - // Streams a pointer value to this object. - // - // This function is an overload of the previous one. When you - // stream a pointer to a Message, this definition will be used as it - // is more specialized. (The C++ Standard, section - // [temp.func.order].) If you stream a non-pointer, then the - // previous definition will be used. - // - // The reason for this overload is that streaming a NULL pointer to - // ostream is undefined behavior. Depending on the compiler, you - // may get "0", "(nil)", "(null)", or an access violation. To - // ensure consistent result across compilers, we always treat NULL - // as "(null)". - template - inline Message& operator <<(T* const& pointer) { // NOLINT - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - ::GTestStreamToHelper(ss_, pointer); - } - return *this; - } -#endif // GTEST_OS_SYMBIAN - - // Since the basic IO manipulators are overloaded for both narrow - // and wide streams, we have to provide this specialized definition - // of operator <<, even though its body is the same as the - // templatized version above. Without this definition, streaming - // endl or other basic IO manipulators to Message will confuse the - // compiler. - Message& operator <<(BasicNarrowIoManip val) { - *ss_ << val; - return *this; - } - - // Instead of 1/0, we want to see true/false for bool values. - Message& operator <<(bool b) { - return *this << (b ? "true" : "false"); - } - - // These two overloads allow streaming a wide C string to a Message - // using the UTF-8 encoding. - Message& operator <<(const wchar_t* wide_c_str) { - return *this << internal::String::ShowWideCString(wide_c_str); - } - Message& operator <<(wchar_t* wide_c_str) { - return *this << internal::String::ShowWideCString(wide_c_str); - } - -#if GTEST_HAS_STD_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::std::wstring& wstr); -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING - // Converts the given wide string to a narrow string using the UTF-8 - // encoding, and streams the result to this Message object. - Message& operator <<(const ::wstring& wstr); -#endif // GTEST_HAS_GLOBAL_WSTRING - - // Gets the text streamed to this object so far as a String. - // Each '\0' character in the buffer is replaced with "\\0". - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - internal::String GetString() const { - return internal::StrStreamToString(ss_); - } - - private: -#if GTEST_OS_SYMBIAN - // These are needed as the Nokia Symbian Compiler cannot decide between - // const T& and const T* in a function template. The Nokia compiler _can_ - // decide between class template specializations for T and T*, so a - // tr1::type_traits-like is_pointer works, and we can overload on that. - template - inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) { - if (pointer == NULL) { - *ss_ << "(null)"; - } else { - ::GTestStreamToHelper(ss_, pointer); - } - } - template - inline void StreamHelper(internal::false_type /*dummy*/, const T& value) { - ::GTestStreamToHelper(ss_, value); - } -#endif // GTEST_OS_SYMBIAN - - // We'll hold the text streamed to this object here. - internal::StrStream* const ss_; - - // We declare (but don't implement) this to prevent the compiler - // from implementing the assignment operator. - void operator=(const Message&); -}; - -// Streams a Message to an ostream. -inline std::ostream& operator <<(std::ostream& os, const Message& sb) { - return os << sb.GetString(); -} - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h deleted file mode 100644 index 6c8622a6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h +++ /dev/null @@ -1,1386 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// Macros and functions for implementing parameterized tests -// in Google C++ Testing Framework (Google Test) -// -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ - - -// Value-parameterized tests allow you to test your code with different -// parameters without writing multiple copies of the same test. -// -// Here is how you use value-parameterized tests: - -#if 0 - -// To write value-parameterized tests, first you should define a fixture -// class. It must be derived from testing::TestWithParam, where T is -// the type of your parameter values. TestWithParam is itself derived -// from testing::Test. T can be any copyable type. If it's a raw pointer, -// you are responsible for managing the lifespan of the pointed values. - -class FooTest : public ::testing::TestWithParam { - // You can implement all the usual class fixture members here. -}; - -// Then, use the TEST_P macro to define as many parameterized tests -// for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. - -TEST_P(FooTest, DoesBlah) { - // Inside a test, access the test parameter with the GetParam() method - // of the TestWithParam class: - EXPECT_TRUE(foo.Blah(GetParam())); - ... -} - -TEST_P(FooTest, HasBlahBlah) { - ... -} - -// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test -// case with any set of parameters you want. Google Test defines a number -// of functions for generating test parameters. They return what we call -// (surprise!) parameter generators. Here is a summary of them, which -// are all in the testing namespace: -// -// -// Range(begin, end [, step]) - Yields values {begin, begin+step, -// begin+step+step, ...}. The values do not -// include end. step defaults to 1. -// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. -// ValuesIn(container) - Yields values from a C-style array, an STL -// ValuesIn(begin,end) container, or an iterator range [begin, end). -// Bool() - Yields sequence {false, true}. -// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product -// for the math savvy) of the values generated -// by the N generators. -// -// For more details, see comments at the definitions of these functions below -// in this file. -// -// The following statement will instantiate tests from the FooTest test case -// each with parameter values "meeny", "miny", and "moe". - -INSTANTIATE_TEST_CASE_P(InstantiationName, - FooTest, - Values("meeny", "miny", "moe")); - -// To distinguish different instances of the pattern, (yes, you -// can instantiate it more then once) the first argument to the -// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the -// actual test case name. Remember to pick unique prefixes for different -// instantiations. The tests from the instantiation above will have -// these names: -// -// * InstantiationName/FooTest.DoesBlah/0 for "meeny" -// * InstantiationName/FooTest.DoesBlah/1 for "miny" -// * InstantiationName/FooTest.DoesBlah/2 for "moe" -// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" -// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" -// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" -// -// You can use these names in --gtest_filter. -// -// This statement will instantiate all tests from FooTest again, each -// with parameter values "cat" and "dog": - -const char* pets[] = {"cat", "dog"}; -INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); - -// The tests from the instantiation above will have these names: -// -// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" -// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" -// -// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests -// in the given test case, whether their definitions come before or -// AFTER the INSTANTIATE_TEST_CASE_P statement. -// -// Please also note that generator expressions are evaluated in -// RUN_ALL_TESTS(), after main() has started. This allows evaluation of -// parameter list based on command line parameters. -// -// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc -// for more examples. -// -// In the future, we plan to publish the API for defining new parameter -// generators. But for now this interface remains part of the internal -// implementation and is subject to change. - -#endif // 0 - -#include - -#if !GTEST_OS_SYMBIAN -#include -#endif - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include - -namespace testing { - -// Functions producing parameter generators. -// -// Google Test uses these generators to produce parameters for value- -// parameterized tests. When a parameterized test case is instantiated -// with a particular generator, Google Test creates and runs tests -// for each element in the sequence produced by the generator. -// -// In the following sample, tests from test case FooTest are instantiated -// each three times with parameter values 3, 5, and 8: -// -// class FooTest : public TestWithParam { ... }; -// -// TEST_P(FooTest, TestThis) { -// } -// TEST_P(FooTest, TestThat) { -// } -// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); -// - -// Range() returns generators providing sequences of values in a range. -// -// Synopsis: -// Range(start, end) -// - returns a generator producing a sequence of values {start, start+1, -// start+2, ..., }. -// Range(start, end, step) -// - returns a generator producing a sequence of values {start, start+step, -// start+step+step, ..., }. -// Notes: -// * The generated sequences never include end. For example, Range(1, 5) -// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) -// returns a generator producing {1, 3, 5, 7}. -// * start and end must have the same type. That type may be any integral or -// floating-point type or a user defined type satisfying these conditions: -// * It must be assignable (have operator=() defined). -// * It must have operator+() (operator+(int-compatible type) for -// two-operand version). -// * It must have operator<() defined. -// Elements in the resulting sequences will also have that type. -// * Condition start < end must be satisfied in order for resulting sequences -// to contain any elements. -// -template -internal::ParamGenerator Range(T start, T end, IncrementT step) { - return internal::ParamGenerator( - new internal::RangeGenerator(start, end, step)); -} - -template -internal::ParamGenerator Range(T start, T end) { - return Range(start, end, 1); -} - -// ValuesIn() function allows generation of tests with parameters coming from -// a container. -// -// Synopsis: -// ValuesIn(const T (&array)[N]) -// - returns a generator producing sequences with elements from -// a C-style array. -// ValuesIn(const Container& container) -// - returns a generator producing sequences with elements from -// an STL-style container. -// ValuesIn(Iterator begin, Iterator end) -// - returns a generator producing sequences with elements from -// a range [begin, end) defined by a pair of STL-style iterators. These -// iterators can also be plain C pointers. -// -// Please note that ValuesIn copies the values from the containers -// passed in and keeps them to generate tests in RUN_ALL_TESTS(). -// -// Examples: -// -// This instantiates tests from test case StringTest -// each with C-string values of "foo", "bar", and "baz": -// -// const char* strings[] = {"foo", "bar", "baz"}; -// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); -// -// This instantiates tests from test case StlStringTest -// each with STL strings with values "a" and "b": -// -// ::std::vector< ::std::string> GetParameterStrings() { -// ::std::vector< ::std::string> v; -// v.push_back("a"); -// v.push_back("b"); -// return v; -// } -// -// INSTANTIATE_TEST_CASE_P(CharSequence, -// StlStringTest, -// ValuesIn(GetParameterStrings())); -// -// -// This will also instantiate tests from CharTest -// each with parameter values 'a' and 'b': -// -// ::std::list GetParameterChars() { -// ::std::list list; -// list.push_back('a'); -// list.push_back('b'); -// return list; -// } -// ::std::list l = GetParameterChars(); -// INSTANTIATE_TEST_CASE_P(CharSequence2, -// CharTest, -// ValuesIn(l.begin(), l.end())); -// -template -internal::ParamGenerator< - typename ::std::iterator_traits::value_type> ValuesIn( - ForwardIterator begin, - ForwardIterator end) { - typedef typename ::std::iterator_traits::value_type - ParamType; - return internal::ParamGenerator( - new internal::ValuesInIteratorRangeGenerator(begin, end)); -} - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]) { - return ValuesIn(array, array + N); -} - -template -internal::ParamGenerator ValuesIn( - const Container& container) { - return ValuesIn(container.begin(), container.end()); -} - -// Values() allows generating tests from explicitly specified list of -// parameters. -// -// Synopsis: -// Values(T v1, T v2, ..., T vN) -// - returns a generator producing sequences with elements v1, v2, ..., vN. -// -// For example, this instantiates tests from test case BarTest each -// with values "one", "two", and "three": -// -// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); -// -// This instantiates tests from test case BazTest each with values 1, 2, 3.5. -// The exact type of values will depend on the type of parameter in BazTest. -// -// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); -// -// Currently, Values() supports from 1 to 50 parameters. -// -template -internal::ValueArray1 Values(T1 v1) { - return internal::ValueArray1(v1); -} - -template -internal::ValueArray2 Values(T1 v1, T2 v2) { - return internal::ValueArray2(v1, v2); -} - -template -internal::ValueArray3 Values(T1 v1, T2 v2, T3 v3) { - return internal::ValueArray3(v1, v2, v3); -} - -template -internal::ValueArray4 Values(T1 v1, T2 v2, T3 v3, T4 v4) { - return internal::ValueArray4(v1, v2, v3, v4); -} - -template -internal::ValueArray5 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5) { - return internal::ValueArray5(v1, v2, v3, v4, v5); -} - -template -internal::ValueArray6 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6) { - return internal::ValueArray6(v1, v2, v3, v4, v5, v6); -} - -template -internal::ValueArray7 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7) { - return internal::ValueArray7(v1, v2, v3, v4, v5, - v6, v7); -} - -template -internal::ValueArray8 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) { - return internal::ValueArray8(v1, v2, v3, v4, - v5, v6, v7, v8); -} - -template -internal::ValueArray9 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) { - return internal::ValueArray9(v1, v2, v3, - v4, v5, v6, v7, v8, v9); -} - -template -internal::ValueArray10 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) { - return internal::ValueArray10(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10); -} - -template -internal::ValueArray11 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) { - return internal::ValueArray11(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); -} - -template -internal::ValueArray12 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) { - return internal::ValueArray12(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); -} - -template -internal::ValueArray13 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) { - return internal::ValueArray13(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); -} - -template -internal::ValueArray14 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) { - return internal::ValueArray14(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14); -} - -template -internal::ValueArray15 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) { - return internal::ValueArray15(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15); -} - -template -internal::ValueArray16 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16) { - return internal::ValueArray16(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16); -} - -template -internal::ValueArray17 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17) { - return internal::ValueArray17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17); -} - -template -internal::ValueArray18 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18) { - return internal::ValueArray18(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18); -} - -template -internal::ValueArray19 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) { - return internal::ValueArray19(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19); -} - -template -internal::ValueArray20 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) { - return internal::ValueArray20(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20); -} - -template -internal::ValueArray21 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) { - return internal::ValueArray21(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); -} - -template -internal::ValueArray22 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22) { - return internal::ValueArray22(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22); -} - -template -internal::ValueArray23 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23) { - return internal::ValueArray23(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23); -} - -template -internal::ValueArray24 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24) { - return internal::ValueArray24(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24); -} - -template -internal::ValueArray25 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) { - return internal::ValueArray25(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25); -} - -template -internal::ValueArray26 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) { - return internal::ValueArray26(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26); -} - -template -internal::ValueArray27 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) { - return internal::ValueArray27(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27); -} - -template -internal::ValueArray28 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) { - return internal::ValueArray28(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28); -} - -template -internal::ValueArray29 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) { - return internal::ValueArray29(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29); -} - -template -internal::ValueArray30 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) { - return internal::ValueArray30(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30); -} - -template -internal::ValueArray31 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) { - return internal::ValueArray31(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31); -} - -template -internal::ValueArray32 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32) { - return internal::ValueArray32(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32); -} - -template -internal::ValueArray33 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33) { - return internal::ValueArray33(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33); -} - -template -internal::ValueArray34 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34) { - return internal::ValueArray34(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34); -} - -template -internal::ValueArray35 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) { - return internal::ValueArray35(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35); -} - -template -internal::ValueArray36 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) { - return internal::ValueArray36(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36); -} - -template -internal::ValueArray37 Values(T1 v1, T2 v2, T3 v3, - T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37) { - return internal::ValueArray37(v1, v2, v3, - v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37); -} - -template -internal::ValueArray38 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38) { - return internal::ValueArray38(v1, v2, - v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, - v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, - v33, v34, v35, v36, v37, v38); -} - -template -internal::ValueArray39 Values(T1 v1, T2 v2, - T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, - T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, - T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, - T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, - T37 v37, T38 v38, T39 v39) { - return internal::ValueArray39(v1, - v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, - v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, - v32, v33, v34, v35, v36, v37, v38, v39); -} - -template -internal::ValueArray40 Values(T1 v1, - T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, - T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, - T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, - T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, - T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) { - return internal::ValueArray40(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, - v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40); -} - -template -internal::ValueArray41 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) { - return internal::ValueArray41(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, - v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, - v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41); -} - -template -internal::ValueArray42 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) { - return internal::ValueArray42(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, - v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, - v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, - v42); -} - -template -internal::ValueArray43 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) { - return internal::ValueArray43(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, - v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, - v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, - v41, v42, v43); -} - -template -internal::ValueArray44 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) { - return internal::ValueArray44(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, - v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, - v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, - v40, v41, v42, v43, v44); -} - -template -internal::ValueArray45 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) { - return internal::ValueArray45(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, - v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, - v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, - v39, v40, v41, v42, v43, v44, v45); -} - -template -internal::ValueArray46 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) { - return internal::ValueArray46(v1, v2, v3, v4, v5, v6, v7, v8, v9, - v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46); -} - -template -internal::ValueArray47 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) { - return internal::ValueArray47(v1, v2, v3, v4, v5, v6, v7, v8, - v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, - v38, v39, v40, v41, v42, v43, v44, v45, v46, v47); -} - -template -internal::ValueArray48 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, - T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, - T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, - T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, - T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, - T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, - T48 v48) { - return internal::ValueArray48(v1, v2, v3, v4, v5, v6, v7, - v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, - v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, - v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48); -} - -template -internal::ValueArray49 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, - T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, - T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, - T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, - T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, - T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, - T47 v47, T48 v48, T49 v49) { - return internal::ValueArray49(v1, v2, v3, v4, v5, v6, - v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, - v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, - v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49); -} - -template -internal::ValueArray50 Values(T1 v1, T2 v2, T3 v3, T4 v4, - T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, - T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, - T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, - T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, - T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, - T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) { - return internal::ValueArray50(v1, v2, v3, v4, - v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, - v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, - v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, - v48, v49, v50); -} - -// Bool() allows generating tests with parameters in a set of (false, true). -// -// Synopsis: -// Bool() -// - returns a generator producing sequences with elements {false, true}. -// -// It is useful when testing code that depends on Boolean flags. Combinations -// of multiple flags can be tested when several Bool()'s are combined using -// Combine() function. -// -// In the following example all tests in the test case FlagDependentTest -// will be instantiated twice with parameters false and true. -// -// class FlagDependentTest : public testing::TestWithParam { -// virtual void SetUp() { -// external_flag = GetParam(); -// } -// } -// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); -// -inline internal::ParamGenerator Bool() { - return Values(false, true); -} - -#if GTEST_HAS_COMBINE -// Combine() allows the user to combine two or more sequences to produce -// values of a Cartesian product of those sequences' elements. -// -// Synopsis: -// Combine(gen1, gen2, ..., genN) -// - returns a generator producing sequences with elements coming from -// the Cartesian product of elements from the sequences generated by -// gen1, gen2, ..., genN. The sequence elements will have a type of -// tuple where T1, T2, ..., TN are the types -// of elements from sequences produces by gen1, gen2, ..., genN. -// -// Combine can have up to 10 arguments. This number is currently limited -// by the maximum number of elements in the tuple implementation used by Google -// Test. -// -// Example: -// -// This will instantiate tests in test case AnimalTest each one with -// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), -// tuple("dog", BLACK), and tuple("dog", WHITE): -// -// enum Color { BLACK, GRAY, WHITE }; -// class AnimalTest -// : public testing::TestWithParam > {...}; -// -// TEST_P(AnimalTest, AnimalLooksNice) {...} -// -// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, -// Combine(Values("cat", "dog"), -// Values(BLACK, WHITE))); -// -// This will instantiate tests in FlagDependentTest with all variations of two -// Boolean flags: -// -// class FlagDependentTest -// : public testing::TestWithParam > { -// virtual void SetUp() { -// // Assigns external_flag_1 and external_flag_2 values from the tuple. -// tie(external_flag_1, external_flag_2) = GetParam(); -// } -// }; -// -// TEST_P(FlagDependentTest, TestFeature1) { -// // Test your code using external_flag_1 and external_flag_2 here. -// } -// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, -// Combine(Bool(), Bool())); -// -template -internal::CartesianProductHolder2 Combine( - const Generator1& g1, const Generator2& g2) { - return internal::CartesianProductHolder2( - g1, g2); -} - -template -internal::CartesianProductHolder3 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3) { - return internal::CartesianProductHolder3( - g1, g2, g3); -} - -template -internal::CartesianProductHolder4 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4) { - return internal::CartesianProductHolder4( - g1, g2, g3, g4); -} - -template -internal::CartesianProductHolder5 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5) { - return internal::CartesianProductHolder5( - g1, g2, g3, g4, g5); -} - -template -internal::CartesianProductHolder6 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6) { - return internal::CartesianProductHolder6( - g1, g2, g3, g4, g5, g6); -} - -template -internal::CartesianProductHolder7 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7) { - return internal::CartesianProductHolder7( - g1, g2, g3, g4, g5, g6, g7); -} - -template -internal::CartesianProductHolder8 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8) { - return internal::CartesianProductHolder8( - g1, g2, g3, g4, g5, g6, g7, g8); -} - -template -internal::CartesianProductHolder9 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9) { - return internal::CartesianProductHolder9( - g1, g2, g3, g4, g5, g6, g7, g8, g9); -} - -template -internal::CartesianProductHolder10 Combine( - const Generator1& g1, const Generator2& g2, const Generator3& g3, - const Generator4& g4, const Generator5& g5, const Generator6& g6, - const Generator7& g7, const Generator8& g8, const Generator9& g9, - const Generator10& g10) { - return internal::CartesianProductHolder10( - g1, g2, g3, g4, g5, g6, g7, g8, g9, g10); -} -#endif // GTEST_HAS_COMBINE - - - -#define TEST_P(test_case_name, test_name) \ - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - : public test_case_name { \ - public: \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ - virtual void TestBody(); \ - private: \ - static int AddToRegistry() { \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ - #test_case_name, \ - #test_name, \ - new ::testing::internal::TestMetaFactory< \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ - return 0; \ - } \ - static int gtest_registering_dummy_; \ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ - }; \ - int GTEST_TEST_CLASS_NAME_(test_case_name, \ - test_name)::gtest_registering_dummy_ = \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ - void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ - ::testing::internal::ParamGenerator \ - gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - int gtest_##prefix##test_case_name##_dummy_ = \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ - #prefix, \ - >est_##prefix##test_case_name##_EvalGenerator_, \ - __FILE__, __LINE__) - -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h.pump deleted file mode 100644 index c761f125..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-param-test.h.pump +++ /dev/null @@ -1,453 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of Values arguments we want to support. -$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// Macros and functions for implementing parameterized tests -// in Google C++ Testing Framework (Google Test) -// -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ - - -// Value-parameterized tests allow you to test your code with different -// parameters without writing multiple copies of the same test. -// -// Here is how you use value-parameterized tests: - -#if 0 - -// To write value-parameterized tests, first you should define a fixture -// class. It must be derived from testing::TestWithParam, where T is -// the type of your parameter values. TestWithParam is itself derived -// from testing::Test. T can be any copyable type. If it's a raw pointer, -// you are responsible for managing the lifespan of the pointed values. - -class FooTest : public ::testing::TestWithParam { - // You can implement all the usual class fixture members here. -}; - -// Then, use the TEST_P macro to define as many parameterized tests -// for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. - -TEST_P(FooTest, DoesBlah) { - // Inside a test, access the test parameter with the GetParam() method - // of the TestWithParam class: - EXPECT_TRUE(foo.Blah(GetParam())); - ... -} - -TEST_P(FooTest, HasBlahBlah) { - ... -} - -// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test -// case with any set of parameters you want. Google Test defines a number -// of functions for generating test parameters. They return what we call -// (surprise!) parameter generators. Here is a summary of them, which -// are all in the testing namespace: -// -// -// Range(begin, end [, step]) - Yields values {begin, begin+step, -// begin+step+step, ...}. The values do not -// include end. step defaults to 1. -// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. -// ValuesIn(container) - Yields values from a C-style array, an STL -// ValuesIn(begin,end) container, or an iterator range [begin, end). -// Bool() - Yields sequence {false, true}. -// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product -// for the math savvy) of the values generated -// by the N generators. -// -// For more details, see comments at the definitions of these functions below -// in this file. -// -// The following statement will instantiate tests from the FooTest test case -// each with parameter values "meeny", "miny", and "moe". - -INSTANTIATE_TEST_CASE_P(InstantiationName, - FooTest, - Values("meeny", "miny", "moe")); - -// To distinguish different instances of the pattern, (yes, you -// can instantiate it more then once) the first argument to the -// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the -// actual test case name. Remember to pick unique prefixes for different -// instantiations. The tests from the instantiation above will have -// these names: -// -// * InstantiationName/FooTest.DoesBlah/0 for "meeny" -// * InstantiationName/FooTest.DoesBlah/1 for "miny" -// * InstantiationName/FooTest.DoesBlah/2 for "moe" -// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" -// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" -// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" -// -// You can use these names in --gtest_filter. -// -// This statement will instantiate all tests from FooTest again, each -// with parameter values "cat" and "dog": - -const char* pets[] = {"cat", "dog"}; -INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); - -// The tests from the instantiation above will have these names: -// -// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" -// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" -// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" -// -// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests -// in the given test case, whether their definitions come before or -// AFTER the INSTANTIATE_TEST_CASE_P statement. -// -// Please also note that generator expressions are evaluated in -// RUN_ALL_TESTS(), after main() has started. This allows evaluation of -// parameter list based on command line parameters. -// -// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc -// for more examples. -// -// In the future, we plan to publish the API for defining new parameter -// generators. But for now this interface remains part of the internal -// implementation and is subject to change. - -#endif // 0 - - -#include - -#include - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include - -namespace testing { - -// Functions producing parameter generators. -// -// Google Test uses these generators to produce parameters for value- -// parameterized tests. When a parameterized test case is instantiated -// with a particular generator, Google Test creates and runs tests -// for each element in the sequence produced by the generator. -// -// In the following sample, tests from test case FooTest are instantiated -// each three times with parameter values 3, 5, and 8: -// -// class FooTest : public TestWithParam { ... }; -// -// TEST_P(FooTest, TestThis) { -// } -// TEST_P(FooTest, TestThat) { -// } -// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); -// - -// Range() returns generators providing sequences of values in a range. -// -// Synopsis: -// Range(start, end) -// - returns a generator producing a sequence of values {start, start+1, -// start+2, ..., }. -// Range(start, end, step) -// - returns a generator producing a sequence of values {start, start+step, -// start+step+step, ..., }. -// Notes: -// * The generated sequences never include end. For example, Range(1, 5) -// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) -// returns a generator producing {1, 3, 5, 7}. -// * start and end must have the same type. That type may be any integral or -// floating-point type or a user defined type satisfying these conditions: -// * It must be assignable (have operator=() defined). -// * It must have operator+() (operator+(int-compatible type) for -// two-operand version). -// * It must have operator<() defined. -// Elements in the resulting sequences will also have that type. -// * Condition start < end must be satisfied in order for resulting sequences -// to contain any elements. -// -template -internal::ParamGenerator Range(T start, T end, IncrementT step) { - return internal::ParamGenerator( - new internal::RangeGenerator(start, end, step)); -} - -template -internal::ParamGenerator Range(T start, T end) { - return Range(start, end, 1); -} - -// ValuesIn() function allows generation of tests with parameters coming from -// a container. -// -// Synopsis: -// ValuesIn(const T (&array)[N]) -// - returns a generator producing sequences with elements from -// a C-style array. -// ValuesIn(const Container& container) -// - returns a generator producing sequences with elements from -// an STL-style container. -// ValuesIn(Iterator begin, Iterator end) -// - returns a generator producing sequences with elements from -// a range [begin, end) defined by a pair of STL-style iterators. These -// iterators can also be plain C pointers. -// -// Please note that ValuesIn copies the values from the containers -// passed in and keeps them to generate tests in RUN_ALL_TESTS(). -// -// Examples: -// -// This instantiates tests from test case StringTest -// each with C-string values of "foo", "bar", and "baz": -// -// const char* strings[] = {"foo", "bar", "baz"}; -// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); -// -// This instantiates tests from test case StlStringTest -// each with STL strings with values "a" and "b": -// -// ::std::vector< ::std::string> GetParameterStrings() { -// ::std::vector< ::std::string> v; -// v.push_back("a"); -// v.push_back("b"); -// return v; -// } -// -// INSTANTIATE_TEST_CASE_P(CharSequence, -// StlStringTest, -// ValuesIn(GetParameterStrings())); -// -// -// This will also instantiate tests from CharTest -// each with parameter values 'a' and 'b': -// -// ::std::list GetParameterChars() { -// ::std::list list; -// list.push_back('a'); -// list.push_back('b'); -// return list; -// } -// ::std::list l = GetParameterChars(); -// INSTANTIATE_TEST_CASE_P(CharSequence2, -// CharTest, -// ValuesIn(l.begin(), l.end())); -// -template -internal::ParamGenerator< - typename ::std::iterator_traits::value_type> ValuesIn( - ForwardIterator begin, - ForwardIterator end) { - typedef typename ::std::iterator_traits::value_type - ParamType; - return internal::ParamGenerator( - new internal::ValuesInIteratorRangeGenerator(begin, end)); -} - -template -internal::ParamGenerator ValuesIn(const T (&array)[N]) { - return ValuesIn(array, array + N); -} - -template -internal::ParamGenerator ValuesIn( - const Container& container) { - return ValuesIn(container.begin(), container.end()); -} - -// Values() allows generating tests from explicitly specified list of -// parameters. -// -// Synopsis: -// Values(T v1, T v2, ..., T vN) -// - returns a generator producing sequences with elements v1, v2, ..., vN. -// -// For example, this instantiates tests from test case BarTest each -// with values "one", "two", and "three": -// -// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); -// -// This instantiates tests from test case BazTest each with values 1, 2, 3.5. -// The exact type of values will depend on the type of parameter in BazTest. -// -// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); -// -// Currently, Values() supports from 1 to $n parameters. -// -$range i 1..n -$for i [[ -$range j 1..i - -template <$for j, [[typename T$j]]> -internal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) { - return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]); -} - -]] - -// Bool() allows generating tests with parameters in a set of (false, true). -// -// Synopsis: -// Bool() -// - returns a generator producing sequences with elements {false, true}. -// -// It is useful when testing code that depends on Boolean flags. Combinations -// of multiple flags can be tested when several Bool()'s are combined using -// Combine() function. -// -// In the following example all tests in the test case FlagDependentTest -// will be instantiated twice with parameters false and true. -// -// class FlagDependentTest : public testing::TestWithParam { -// virtual void SetUp() { -// external_flag = GetParam(); -// } -// } -// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); -// -inline internal::ParamGenerator Bool() { - return Values(false, true); -} - -#if GTEST_HAS_COMBINE -// Combine() allows the user to combine two or more sequences to produce -// values of a Cartesian product of those sequences' elements. -// -// Synopsis: -// Combine(gen1, gen2, ..., genN) -// - returns a generator producing sequences with elements coming from -// the Cartesian product of elements from the sequences generated by -// gen1, gen2, ..., genN. The sequence elements will have a type of -// tuple where T1, T2, ..., TN are the types -// of elements from sequences produces by gen1, gen2, ..., genN. -// -// Combine can have up to $maxtuple arguments. This number is currently limited -// by the maximum number of elements in the tuple implementation used by Google -// Test. -// -// Example: -// -// This will instantiate tests in test case AnimalTest each one with -// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), -// tuple("dog", BLACK), and tuple("dog", WHITE): -// -// enum Color { BLACK, GRAY, WHITE }; -// class AnimalTest -// : public testing::TestWithParam > {...}; -// -// TEST_P(AnimalTest, AnimalLooksNice) {...} -// -// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, -// Combine(Values("cat", "dog"), -// Values(BLACK, WHITE))); -// -// This will instantiate tests in FlagDependentTest with all variations of two -// Boolean flags: -// -// class FlagDependentTest -// : public testing::TestWithParam > { -// virtual void SetUp() { -// // Assigns external_flag_1 and external_flag_2 values from the tuple. -// tie(external_flag_1, external_flag_2) = GetParam(); -// } -// }; -// -// TEST_P(FlagDependentTest, TestFeature1) { -// // Test your code using external_flag_1 and external_flag_2 here. -// } -// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, -// Combine(Bool(), Bool())); -// -$range i 2..maxtuple -$for i [[ -$range j 1..i - -template <$for j, [[typename Generator$j]]> -internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine( - $for j, [[const Generator$j& g$j]]) { - return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>( - $for j, [[g$j]]); -} - -]] -#endif // GTEST_HAS_COMBINE - - - -#define TEST_P(test_case_name, test_name) \ - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - : public test_case_name { \ - public: \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ - virtual void TestBody(); \ - private: \ - static int AddToRegistry() { \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ - #test_case_name, \ - #test_name, \ - new ::testing::internal::TestMetaFactory< \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ - return 0; \ - } \ - static int gtest_registering_dummy_; \ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ - }; \ - int GTEST_TEST_CLASS_NAME_(test_case_name, \ - test_name)::gtest_registering_dummy_ = \ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ - void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ - ::testing::internal::ParamGenerator \ - gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ - int gtest_##prefix##test_case_name##_dummy_ = \ - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ - GetTestCasePatternHolder(\ - #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ - #prefix, \ - >est_##prefix##test_case_name##_EvalGenerator_, \ - __FILE__, __LINE__) - -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-spi.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-spi.h deleted file mode 100644 index 2953411b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-spi.h +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Utilities for testing Google Test itself and code that uses Google Test -// (e.g. frameworks built on top of Google Test). - -#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_ -#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_ - -#include - -namespace testing { - -// This helper class can be used to mock out Google Test failure reporting -// so that we can test Google Test or code that builds on Google Test. -// -// An object of this class appends a TestPartResult object to the -// TestPartResultArray object given in the constructor whenever a Google Test -// failure is reported. It can either intercept only failures that are -// generated in the same thread that created this object or it can intercept -// all generated failures. The scope of this mock object can be controlled with -// the second argument to the two arguments constructor. -class ScopedFakeTestPartResultReporter - : public TestPartResultReporterInterface { - public: - // The two possible mocking modes of this object. - enum InterceptMode { - INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures. - INTERCEPT_ALL_THREADS // Intercepts all failures. - }; - - // The c'tor sets this object as the test part result reporter used - // by Google Test. The 'result' parameter specifies where to report the - // results. This reporter will only catch failures generated in the current - // thread. DEPRECATED - explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result); - - // Same as above, but you can choose the interception scope of this object. - ScopedFakeTestPartResultReporter(InterceptMode intercept_mode, - TestPartResultArray* result); - - // The d'tor restores the previous test part result reporter. - virtual ~ScopedFakeTestPartResultReporter(); - - // Appends the TestPartResult object to the TestPartResultArray - // received in the constructor. - // - // This method is from the TestPartResultReporterInterface - // interface. - virtual void ReportTestPartResult(const TestPartResult& result); - private: - void Init(); - - const InterceptMode intercept_mode_; - TestPartResultReporterInterface* old_reporter_; - TestPartResultArray* const result_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter); -}; - -namespace internal { - -// A helper class for implementing EXPECT_FATAL_FAILURE() and -// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given -// TestPartResultArray contains exactly one failure that has the given -// type and contains the given substring. If that's not the case, a -// non-fatal failure will be generated. -class SingleFailureChecker { - public: - // The constructor remembers the arguments. - SingleFailureChecker(const TestPartResultArray* results, - TestPartResult::Type type, - const char* substr); - ~SingleFailureChecker(); - private: - const TestPartResultArray* const results_; - const TestPartResult::Type type_; - const String substr_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker); -}; - -} // namespace internal - -} // namespace testing - -// A set of macros for testing Google Test assertions or code that's expected -// to generate Google Test fatal failures. It verifies that the given -// statement will cause exactly one fatal Google Test failure with 'substr' -// being part of the failure message. -// -// There are two different versions of this macro. EXPECT_FATAL_FAILURE only -// affects and considers failures generated in the current thread and -// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. -// -// The verification of the assertion is done correctly even when the statement -// throws an exception or aborts the current function. -// -// Known restrictions: -// - 'statement' cannot reference local non-static variables or -// non-static members of the current object. -// - 'statement' cannot return a value. -// - You cannot stream a failure message to this macro. -// -// Note that even though the implementations of the following two -// macros are much alike, we cannot refactor them to use a common -// helper macro, due to some peculiarity in how the preprocessor -// works. The AcceptsMacroThatExpandsToUnprotectedComma test in -// gtest_unittest.cc will fail to compile if we do that. -#define EXPECT_FATAL_FAILURE(statement, substr) \ - do { \ - class GTestExpectFatalFailureHelper {\ - public:\ - static void Execute() { statement; }\ - };\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ - GTestExpectFatalFailureHelper::Execute();\ - }\ - } while (::testing::internal::AlwaysFalse()) - -#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ - do { \ - class GTestExpectFatalFailureHelper {\ - public:\ - static void Execute() { statement; }\ - };\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ALL_THREADS, >est_failures);\ - GTestExpectFatalFailureHelper::Execute();\ - }\ - } while (::testing::internal::AlwaysFalse()) - -// A macro for testing Google Test assertions or code that's expected to -// generate Google Test non-fatal failures. It asserts that the given -// statement will cause exactly one non-fatal Google Test failure with 'substr' -// being part of the failure message. -// -// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only -// affects and considers failures generated in the current thread and -// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. -// -// 'statement' is allowed to reference local variables and members of -// the current object. -// -// The verification of the assertion is done correctly even when the statement -// throws an exception or aborts the current function. -// -// Known restrictions: -// - You cannot stream a failure message to this macro. -// -// Note that even though the implementations of the following two -// macros are much alike, we cannot refactor them to use a common -// helper macro, due to some peculiarity in how the preprocessor -// works. If we do that, the code won't compile when the user gives -// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that -// expands to code containing an unprotected comma. The -// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc -// catches that. -// -// For the same reason, we have to write -// if (::testing::internal::AlwaysTrue()) { statement; } -// instead of -// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) -// to avoid an MSVC warning on unreachable code. -#define EXPECT_NONFATAL_FAILURE(statement, substr) \ - do {\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ - (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter:: \ - INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ - if (::testing::internal::AlwaysTrue()) { statement; }\ - }\ - } while (::testing::internal::AlwaysFalse()) - -#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ - do {\ - ::testing::TestPartResultArray gtest_failures;\ - ::testing::internal::SingleFailureChecker gtest_checker(\ - >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ - (substr));\ - {\ - ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ - ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS,\ - >est_failures);\ - if (::testing::internal::AlwaysTrue()) { statement; }\ - }\ - } while (::testing::internal::AlwaysFalse()) - -#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-test-part.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-test-part.h deleted file mode 100644 index 58e7df9e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-test-part.h +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ - -#include -#include -#include - -namespace testing { - -// A copyable object representing the result of a test part (i.e. an -// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()). -// -// Don't inherit from TestPartResult as its destructor is not virtual. -class TestPartResult { - public: - // The possible outcomes of a test part (i.e. an assertion or an - // explicit SUCCEED(), FAIL(), or ADD_FAILURE()). - enum Type { - kSuccess, // Succeeded. - kNonFatalFailure, // Failed but the test can continue. - kFatalFailure // Failed and the test should be terminated. - }; - - // C'tor. TestPartResult does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestPartResult object. - TestPartResult(Type type, - const char* file_name, - int line_number, - const char* message) - : type_(type), - file_name_(file_name), - line_number_(line_number), - summary_(ExtractSummary(message)), - message_(message) { - } - - // Gets the outcome of the test part. - Type type() const { return type_; } - - // Gets the name of the source file where the test part took place, or - // NULL if it's unknown. - const char* file_name() const { return file_name_.c_str(); } - - // Gets the line in the source file where the test part took place, - // or -1 if it's unknown. - int line_number() const { return line_number_; } - - // Gets the summary of the failure message. - const char* summary() const { return summary_.c_str(); } - - // Gets the message associated with the test part. - const char* message() const { return message_.c_str(); } - - // Returns true iff the test part passed. - bool passed() const { return type_ == kSuccess; } - - // Returns true iff the test part failed. - bool failed() const { return type_ != kSuccess; } - - // Returns true iff the test part non-fatally failed. - bool nonfatally_failed() const { return type_ == kNonFatalFailure; } - - // Returns true iff the test part fatally failed. - bool fatally_failed() const { return type_ == kFatalFailure; } - private: - Type type_; - - // Gets the summary of the failure message by omitting the stack - // trace in it. - static internal::String ExtractSummary(const char* message); - - // The name of the source file where the test part took place, or - // NULL if the source file is unknown. - internal::String file_name_; - // The line in the source file where the test part took place, or -1 - // if the line number is unknown. - int line_number_; - internal::String summary_; // The test failure summary. - internal::String message_; // The test failure message. -}; - -// Prints a TestPartResult object. -std::ostream& operator<<(std::ostream& os, const TestPartResult& result); - -// An array of TestPartResult objects. -// -// We define this class as we cannot use STL containers when compiling -// Google Test with MSVC 7.1 and exceptions disabled. -// -// Don't inherit from TestPartResultArray as its destructor is not -// virtual. -class TestPartResultArray { - public: - TestPartResultArray(); - ~TestPartResultArray(); - - // Appends the given TestPartResult to the array. - void Append(const TestPartResult& result); - - // Returns the TestPartResult at the given index (0-based). - const TestPartResult& GetTestPartResult(int index) const; - - // Returns the number of TestPartResult objects in the array. - int size() const; - private: - // Internally we use a Vector to implement the array. - internal::Vector* const array_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); -}; - -// This interface knows how to report a test part result. -class TestPartResultReporterInterface { - public: - virtual ~TestPartResultReporterInterface() {} - - virtual void ReportTestPartResult(const TestPartResult& result) = 0; -}; - -namespace internal { - -// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a -// statement generates new fatal failures. To do so it registers itself as the -// current test part result reporter. Besides checking if fatal failures were -// reported, it only delegates the reporting to the former result reporter. -// The original result reporter is restored in the destructor. -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -class HasNewFatalFailureHelper : public TestPartResultReporterInterface { - public: - HasNewFatalFailureHelper(); - virtual ~HasNewFatalFailureHelper(); - virtual void ReportTestPartResult(const TestPartResult& result); - bool has_new_fatal_failure() const { return has_new_fatal_failure_; } - private: - bool has_new_fatal_failure_; - TestPartResultReporterInterface* original_reporter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper); -}; - -} // namespace internal - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-typed-test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-typed-test.h deleted file mode 100644 index 519edfe9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest-typed-test.h +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ - -// This header implements typed tests and type-parameterized tests. - -// Typed (aka type-driven) tests repeat the same test for types in a -// list. You must know which types you want to test with when writing -// typed tests. Here's how you do it: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - public: - ... - typedef std::list List; - static T shared_; - T value_; -}; - -// Next, associate a list of types with the test case, which will be -// repeated for each type in the list. The typedef is necessary for -// the macro to parse correctly. -typedef testing::Types MyTypes; -TYPED_TEST_CASE(FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// TYPED_TEST_CASE(FooTest, int); - -// Then, use TYPED_TEST() instead of TEST_F() to define as many typed -// tests for this test case as you want. -TYPED_TEST(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - // Since we are inside a derived class template, C++ requires use to - // visit the members of FooTest via 'this'. - TypeParam n = this->value_; - - // To visit static members of the fixture, add the TestFixture:: - // prefix. - n += TestFixture::shared_; - - // To refer to typedefs in the fixture, add the "typename - // TestFixture::" prefix. - typename TestFixture::List values; - values.push_back(n); - ... -} - -TYPED_TEST(FooTest, HasPropertyA) { ... } - -#endif // 0 - -// Type-parameterized tests are abstract test patterns parameterized -// by a type. Compared with typed tests, type-parameterized tests -// allow you to define the test pattern without knowing what the type -// parameters are. The defined pattern can be instantiated with -// different types any number of times, in any number of translation -// units. -// -// If you are designing an interface or concept, you can define a -// suite of type-parameterized tests to verify properties that any -// valid implementation of the interface/concept should have. Then, -// each implementation can easily instantiate the test suite to verify -// that it conforms to the requirements, without having to write -// similar tests repeatedly. Here's an example: - -#if 0 - -// First, define a fixture class template. It should be parameterized -// by a type. Remember to derive it from testing::Test. -template -class FooTest : public testing::Test { - ... -}; - -// Next, declare that you will define a type-parameterized test case -// (the _P suffix is for "parameterized" or "pattern", whichever you -// prefer): -TYPED_TEST_CASE_P(FooTest); - -// Then, use TYPED_TEST_P() to define as many type-parameterized tests -// for this type-parameterized test case as you want. -TYPED_TEST_P(FooTest, DoesBlah) { - // Inside a test, refer to TypeParam to get the type parameter. - TypeParam n = 0; - ... -} - -TYPED_TEST_P(FooTest, HasPropertyA) { ... } - -// Now the tricky part: you need to register all test patterns before -// you can instantiate them. The first argument of the macro is the -// test case name; the rest are the names of the tests in this test -// case. -REGISTER_TYPED_TEST_CASE_P(FooTest, - DoesBlah, HasPropertyA); - -// Finally, you are free to instantiate the pattern with the types you -// want. If you put the above code in a header file, you can #include -// it in multiple C++ source files and instantiate it multiple times. -// -// To distinguish different instances of the pattern, the first -// argument to the INSTANTIATE_* macro is a prefix that will be added -// to the actual test case name. Remember to pick unique prefixes for -// different instances. -typedef testing::Types MyTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); - -// If the type list contains only one type, you can write that type -// directly without Types<...>: -// INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int); - -#endif // 0 - -#include -#include - -// Implements typed tests. - -#if GTEST_HAS_TYPED_TEST - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the typedef for the type parameters of the -// given test case. -#define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_ - -#define TYPED_TEST_CASE(CaseName, Types) \ - typedef ::testing::internal::TypeList::type \ - GTEST_TYPE_PARAMS_(CaseName) - -#define TYPED_TEST(CaseName, TestName) \ - template \ - class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \ - : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - bool gtest_##CaseName##_##TestName##_registered_ = \ - ::testing::internal::TypeParameterizedTest< \ - CaseName, \ - ::testing::internal::TemplateSel< \ - GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \ - GTEST_TYPE_PARAMS_(CaseName)>::Register(\ - "", #CaseName, #TestName, 0); \ - template \ - void GTEST_TEST_CLASS_NAME_(CaseName, TestName)::TestBody() - -#endif // GTEST_HAS_TYPED_TEST - -// Implements type-parameterized tests. - -#if GTEST_HAS_TYPED_TEST_P - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the namespace name that the type-parameterized tests for -// the given type-parameterized test case are defined in. The exact -// name of the namespace is subject to change without notice. -#define GTEST_CASE_NAMESPACE_(TestCaseName) \ - gtest_case_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Expands to the name of the variable used to remember the names of -// the defined tests in the given test case. -#define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \ - gtest_typed_test_case_p_state_##TestCaseName##_ - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY. -// -// Expands to the name of the variable used to remember the names of -// the registered tests in the given test case. -#define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \ - gtest_registered_test_names_##TestCaseName##_ - -// The variables defined in the type-parameterized test macros are -// static as typically these macros are used in a .h file that can be -// #included in multiple translation units linked together. -#define TYPED_TEST_CASE_P(CaseName) \ - static ::testing::internal::TypedTestCasePState \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName) - -#define TYPED_TEST_P(CaseName, TestName) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - template \ - class TestName : public CaseName { \ - private: \ - typedef CaseName TestFixture; \ - typedef gtest_TypeParam_ TypeParam; \ - virtual void TestBody(); \ - }; \ - static bool gtest_##TestName##_defined_ = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\ - __FILE__, __LINE__, #CaseName, #TestName); \ - } \ - template \ - void GTEST_CASE_NAMESPACE_(CaseName)::TestName::TestBody() - -#define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \ - namespace GTEST_CASE_NAMESPACE_(CaseName) { \ - typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \ - } \ - static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \ - GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\ - __FILE__, __LINE__, #__VA_ARGS__) - -#define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \ - bool gtest_##Prefix##_##CaseName = \ - ::testing::internal::TypeParameterizedTestCase::type>::Register(\ - #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName)) - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest.h deleted file mode 100644 index 9be15fbe..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest.h +++ /dev/null @@ -1,1958 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines the public API for Google Test. It should be -// included by any test program that uses Google Test. -// -// IMPORTANT NOTE: Due to limitation of the C++ language, we have to -// leave some internal implementation details in this header file. -// They are clearly marked by comments like this: -// -// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -// -// Such code is NOT meant to be used by a user directly, and is subject -// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user -// program! -// -// Acknowledgment: Google Test borrowed the idea of automatic test -// registration from Barthelemy Dagenais' (barthelemy@prologique.com) -// easyUnit framework. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#define GTEST_INCLUDE_GTEST_GTEST_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Depending on the platform, different string classes are available. -// On Windows, ::std::string compiles only when exceptions are -// enabled. On Linux, in addition to ::std::string, Google also makes -// use of class ::string, which has the same interface as -// ::std::string, but has a different implementation. -// -// The user can tell us whether ::std::string is available in his -// environment by defining the macro GTEST_HAS_STD_STRING to either 1 -// or 0 on the compiler command line. He can also define -// GTEST_HAS_GLOBAL_STRING to 1 to indicate that ::string is available -// AND is a distinct type to ::std::string, or define it to 0 to -// indicate otherwise. -// -// If the user's ::std::string and ::string are the same class due to -// aliasing, he should define GTEST_HAS_STD_STRING to 1 and -// GTEST_HAS_GLOBAL_STRING to 0. -// -// If the user doesn't define GTEST_HAS_STD_STRING and/or -// GTEST_HAS_GLOBAL_STRING, they are defined heuristically. - -namespace testing { - -// Declares the flags. - -// This flag temporary enables the disabled tests. -GTEST_DECLARE_bool_(also_run_disabled_tests); - -// This flag brings the debugger on an assertion failure. -GTEST_DECLARE_bool_(break_on_failure); - -// This flag controls whether Google Test catches all test-thrown exceptions -// and logs them as failures. -GTEST_DECLARE_bool_(catch_exceptions); - -// This flag enables using colors in terminal output. Available values are -// "yes" to enable colors, "no" (disable colors), or "auto" (the default) -// to let Google Test decide. -GTEST_DECLARE_string_(color); - -// This flag sets up the filter to select by name using a glob pattern -// the tests to run. If the filter is not given all tests are executed. -GTEST_DECLARE_string_(filter); - -// This flag causes the Google Test to list tests. None of the tests listed -// are actually run if the flag is provided. -GTEST_DECLARE_bool_(list_tests); - -// This flag controls whether Google Test emits a detailed XML report to a file -// in addition to its normal textual output. -GTEST_DECLARE_string_(output); - -// This flags control whether Google Test prints the elapsed time for each -// test. -GTEST_DECLARE_bool_(print_time); - -// This flag specifies the random number seed. -GTEST_DECLARE_int32_(random_seed); - -// This flag sets how many times the tests are repeated. The default value -// is 1. If the value is -1 the tests are repeating forever. -GTEST_DECLARE_int32_(repeat); - -// This flag controls whether Google Test includes Google Test internal -// stack frames in failure stack traces. -GTEST_DECLARE_bool_(show_internal_stack_frames); - -// When this flag is specified, tests' order is randomized on every iteration. -GTEST_DECLARE_bool_(shuffle); - -// This flag specifies the maximum number of stack frames to be -// printed in a failure message. -GTEST_DECLARE_int32_(stack_trace_depth); - -// When this flag is specified, a failed assertion will throw an -// exception if exceptions are enabled, or exit the program with a -// non-zero code otherwise. -GTEST_DECLARE_bool_(throw_on_failure); - -// The upper limit for valid stack trace depths. -const int kMaxStackTraceDepth = 100; - -namespace internal { - -class AssertHelper; -class DefaultGlobalTestPartResultReporter; -class ExecDeathTest; -class NoExecDeathTest; -class FinalSuccessChecker; -class GTestFlagSaver; -class TestInfoImpl; -class TestResultAccessor; -class TestEventListenersAccessor; -class TestEventRepeater; -class WindowsDeathTest; -class UnitTestImpl* GetUnitTestImpl(); -void ReportFailureInUnknownLocation(TestPartResult::Type result_type, - const String& message); -class PrettyUnitTestResultPrinter; -class XmlUnitTestResultPrinter; - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". -// Declared in gtest-internal.h but defined here, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable) { - return (Message() << streamable).GetString(); -} - -} // namespace internal - -// A class for indicating whether an assertion was successful. When -// the assertion wasn't successful, the AssertionResult object -// remembers a non-empty message that described how it failed. -// -// This class is useful for defining predicate-format functions to be -// used with predicate assertions (ASSERT_PRED_FORMAT*, etc). -// -// The constructor of AssertionResult is private. To create an -// instance of this class, use one of the factory functions -// (AssertionSuccess() and AssertionFailure()). -// -// For example, in order to be able to write: -// -// // Verifies that Foo() returns an even number. -// EXPECT_PRED_FORMAT1(IsEven, Foo()); -// -// you just need to define: -// -// testing::AssertionResult IsEven(const char* expr, int n) { -// if ((n % 2) == 0) return testing::AssertionSuccess(); -// -// Message msg; -// msg << "Expected: " << expr << " is even\n" -// << " Actual: it's " << n; -// return testing::AssertionFailure(msg); -// } -// -// If Foo() returns 5, you will see the following message: -// -// Expected: Foo() is even -// Actual: it's 5 -class AssertionResult { - public: - // Declares factory functions for making successful and failed - // assertion results as friends. - friend AssertionResult AssertionSuccess(); - friend AssertionResult AssertionFailure(const Message&); - - // Returns true iff the assertion succeeded. - operator bool() const { return failure_message_.c_str() == NULL; } // NOLINT - - // Returns the assertion's failure message. - const char* failure_message() const { return failure_message_.c_str(); } - - private: - // The default constructor. It is used when the assertion succeeded. - AssertionResult() {} - - // The constructor used when the assertion failed. - explicit AssertionResult(const internal::String& failure_message); - - // Stores the assertion's failure message. - internal::String failure_message_; -}; - -// Makes a successful assertion result. -AssertionResult AssertionSuccess(); - -// Makes a failed assertion result with the given failure message. -AssertionResult AssertionFailure(const Message& msg); - -// The abstract class that all tests inherit from. -// -// In Google Test, a unit test program contains one or many TestCases, and -// each TestCase contains one or many Tests. -// -// When you define a test using the TEST macro, you don't need to -// explicitly derive from Test - the TEST macro automatically does -// this for you. -// -// The only time you derive from Test is when defining a test fixture -// to be used a TEST_F. For example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { ... } -// virtual void TearDown() { ... } -// ... -// }; -// -// TEST_F(FooTest, Bar) { ... } -// TEST_F(FooTest, Baz) { ... } -// -// Test is not copyable. -class Test { - public: - friend class internal::TestInfoImpl; - - // Defines types for pointers to functions that set up and tear down - // a test case. - typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc; - typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc; - - // The d'tor is virtual as we intend to inherit from Test. - virtual ~Test(); - - // Sets up the stuff shared by all tests in this test case. - // - // Google Test will call Foo::SetUpTestCase() before running the first - // test in test case Foo. Hence a sub-class can define its own - // SetUpTestCase() method to shadow the one defined in the super - // class. - static void SetUpTestCase() {} - - // Tears down the stuff shared by all tests in this test case. - // - // Google Test will call Foo::TearDownTestCase() after running the last - // test in test case Foo. Hence a sub-class can define its own - // TearDownTestCase() method to shadow the one defined in the super - // class. - static void TearDownTestCase() {} - - // Returns true iff the current test has a fatal failure. - static bool HasFatalFailure(); - - // Returns true iff the current test has a non-fatal failure. - static bool HasNonfatalFailure(); - - // Returns true iff the current test has a (either fatal or - // non-fatal) failure. - static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } - - // Logs a property for the current test. Only the last value for a given - // key is remembered. - // These are public static so they can be called from utility functions - // that are not members of the test fixture. - // The arguments are const char* instead strings, as Google Test is used - // on platforms where string doesn't compile. - // - // Note that a driving consideration for these RecordProperty methods - // was to produce xml output suited to the Greenspan charting utility, - // which at present will only chart values that fit in a 32-bit int. It - // is the user's responsibility to restrict their values to 32-bit ints - // if they intend them to be used with Greenspan. - static void RecordProperty(const char* key, const char* value); - static void RecordProperty(const char* key, int value); - - protected: - // Creates a Test object. - Test(); - - // Sets up the test fixture. - virtual void SetUp(); - - // Tears down the test fixture. - virtual void TearDown(); - - private: - // Returns true iff the current test has the same fixture class as - // the first test in the current test case. - static bool HasSameFixtureClass(); - - // Runs the test after the test fixture has been set up. - // - // A sub-class must implement this to define the test logic. - // - // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM. - // Instead, use the TEST or TEST_F macro. - virtual void TestBody() = 0; - - // Sets up, executes, and tears down the test. - void Run(); - - // Uses a GTestFlagSaver to save and restore all Google Test flags. - const internal::GTestFlagSaver* const gtest_flag_saver_; - - // Often a user mis-spells SetUp() as Setup() and spends a long time - // wondering why it is never called by Google Test. The declaration of - // the following method is solely for catching such an error at - // compile time: - // - // - The return type is deliberately chosen to be not void, so it - // will be a conflict if a user declares void Setup() in his test - // fixture. - // - // - This method is private, so it will be another compiler error - // if a user calls it from his test fixture. - // - // DO NOT OVERRIDE THIS FUNCTION. - // - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } - - // We disallow copying Tests. - GTEST_DISALLOW_COPY_AND_ASSIGN_(Test); -}; - -typedef internal::TimeInMillis TimeInMillis; - -// A copyable object representing a user specified test property which can be -// output as a key/value string pair. -// -// Don't inherit from TestProperty as its destructor is not virtual. -class TestProperty { - public: - // C'tor. TestProperty does NOT have a default constructor. - // Always use this constructor (with parameters) to create a - // TestProperty object. - TestProperty(const char* key, const char* value) : - key_(key), value_(value) { - } - - // Gets the user supplied key. - const char* key() const { - return key_.c_str(); - } - - // Gets the user supplied value. - const char* value() const { - return value_.c_str(); - } - - // Sets a new value, overriding the one supplied in the constructor. - void SetValue(const char* new_value) { - value_ = new_value; - } - - private: - // The key supplied by the user. - internal::String key_; - // The value supplied by the user. - internal::String value_; -}; - -// The result of a single Test. This includes a list of -// TestPartResults, a list of TestProperties, a count of how many -// death tests there are in the Test, and how much time it took to run -// the Test. -// -// TestResult is not copyable. -class TestResult { - public: - // Creates an empty TestResult. - TestResult(); - - // D'tor. Do not inherit from TestResult. - ~TestResult(); - - // Gets the number of all test parts. This is the sum of the number - // of successful test parts and the number of failed test parts. - int total_part_count() const; - - // Returns the number of the test properties. - int test_property_count() const; - - // Returns true iff the test passed (i.e. no test part failed). - bool Passed() const { return !Failed(); } - - // Returns true iff the test failed. - bool Failed() const; - - // Returns true iff the test fatally failed. - bool HasFatalFailure() const; - - // Returns true iff the test has a non-fatal failure. - bool HasNonfatalFailure() const; - - // Returns the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns the i-th test part result among all the results. i can range - // from 0 to test_property_count() - 1. If i is not in that range, aborts - // the program. - const TestPartResult& GetTestPartResult(int i) const; - - // Returns the i-th test property. i can range from 0 to - // test_property_count() - 1. If i is not in that range, aborts the - // program. - const TestProperty& GetTestProperty(int i) const; - - private: - friend class TestInfo; - friend class UnitTest; - friend class internal::DefaultGlobalTestPartResultReporter; - friend class internal::ExecDeathTest; - friend class internal::TestInfoImpl; - friend class internal::TestResultAccessor; - friend class internal::UnitTestImpl; - friend class internal::WindowsDeathTest; - - // Gets the vector of TestPartResults. - const internal::Vector& test_part_results() const { - return *test_part_results_; - } - - // Gets the vector of TestProperties. - const internal::Vector& test_properties() const { - return *test_properties_; - } - - // Sets the elapsed time. - void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; } - - // Adds a test property to the list. The property is validated and may add - // a non-fatal failure if invalid (e.g., if it conflicts with reserved - // key names). If a property is already recorded for the same key, the - // value will be updated, rather than storing multiple values for the same - // key. - void RecordProperty(const TestProperty& test_property); - - // Adds a failure if the key is a reserved attribute of Google Test - // testcase tags. Returns true if the property is valid. - // TODO(russr): Validate attribute names are legal and human readable. - static bool ValidateTestProperty(const TestProperty& test_property); - - // Adds a test part result to the list. - void AddTestPartResult(const TestPartResult& test_part_result); - - // Returns the death test count. - int death_test_count() const { return death_test_count_; } - - // Increments the death test count, returning the new count. - int increment_death_test_count() { return ++death_test_count_; } - - // Clears the test part results. - void ClearTestPartResults(); - - // Clears the object. - void Clear(); - - // Protects mutable state of the property vector and of owned - // properties, whose values may be updated. - internal::Mutex test_properites_mutex_; - - // The vector of TestPartResults - internal::scoped_ptr > test_part_results_; - // The vector of TestProperties - internal::scoped_ptr > test_properties_; - // Running count of death tests. - int death_test_count_; - // The elapsed time, in milliseconds. - TimeInMillis elapsed_time_; - - // We disallow copying TestResult. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult); -}; // class TestResult - -// A TestInfo object stores the following information about a test: -// -// Test case name -// Test name -// Whether the test should be run -// A function pointer that creates the test object when invoked -// Test result -// -// The constructor of TestInfo registers itself with the UnitTest -// singleton such that the RUN_ALL_TESTS() macro knows which tests to -// run. -class TestInfo { - public: - // Destructs a TestInfo object. This function is not virtual, so - // don't inherit from TestInfo. - ~TestInfo(); - - // Returns the test case name. - const char* test_case_name() const; - - // Returns the test name. - const char* name() const; - - // Returns the test case comment. - const char* test_case_comment() const; - - // Returns the test comment. - const char* comment() const; - - // Returns true if this test should run, that is if the test is not disabled - // (or it is disabled but the also_run_disabled_tests flag has been specified) - // and its full name matches the user-specified filter. - // - // Google Test allows the user to filter the tests by their full names. - // The full name of a test Bar in test case Foo is defined as - // "Foo.Bar". Only the tests that match the filter will run. - // - // A filter is a colon-separated list of glob (not regex) patterns, - // optionally followed by a '-' and a colon-separated list of - // negative patterns (tests to exclude). A test is run if it - // matches one of the positive patterns and does not match any of - // the negative patterns. - // - // For example, *A*:Foo.* is a filter that matches any string that - // contains the character 'A' or starts with "Foo.". - bool should_run() const; - - // Returns the result of the test. - const TestResult* result() const; - - private: -#if GTEST_HAS_DEATH_TEST - friend class internal::DefaultDeathTestFactory; -#endif // GTEST_HAS_DEATH_TEST - friend class Test; - friend class TestCase; - friend class internal::TestInfoImpl; - friend class internal::UnitTestImpl; - friend TestInfo* internal::MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - internal::TypeId fixture_class_id, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc, - internal::TestFactoryBase* factory); - - // Returns true if this test matches the user-specified filter. - bool matches_filter() const; - - // Increments the number of death tests encountered in this test so - // far. - int increment_death_test_count(); - - // Accessors for the implementation object. - internal::TestInfoImpl* impl() { return impl_; } - const internal::TestInfoImpl* impl() const { return impl_; } - - // Constructs a TestInfo object. The newly constructed instance assumes - // ownership of the factory object. - TestInfo(const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - internal::TypeId fixture_class_id, - internal::TestFactoryBase* factory); - - // An opaque implementation object. - internal::TestInfoImpl* impl_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo); -}; - -// A test case, which consists of a vector of TestInfos. -// -// TestCase is not copyable. -class TestCase { - public: - // Creates a TestCase with the given name. - // - // TestCase does NOT have a default constructor. Always use this - // constructor to create a TestCase object. - // - // Arguments: - // - // name: name of the test case - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - TestCase(const char* name, const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc); - - // Destructor of TestCase. - virtual ~TestCase(); - - // Gets the name of the TestCase. - const char* name() const { return name_.c_str(); } - - // Returns the test case comment. - const char* comment() const { return comment_.c_str(); } - - // Returns true if any test in this test case should run. - bool should_run() const { return should_run_; } - - // Gets the number of successful tests in this test case. - int successful_test_count() const; - - // Gets the number of failed tests in this test case. - int failed_test_count() const; - - // Gets the number of disabled tests in this test case. - int disabled_test_count() const; - - // Get the number of tests in this test case that should run. - int test_to_run_count() const; - - // Gets the number of all tests in this test case. - int total_test_count() const; - - // Returns true iff the test case passed. - bool Passed() const { return !Failed(); } - - // Returns true iff the test case failed. - bool Failed() const { return failed_test_count() > 0; } - - // Returns the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns the i-th test among all the tests. i can range from 0 to - // total_test_count() - 1. If i is not in that range, returns NULL. - const TestInfo* GetTestInfo(int i) const; - - private: - friend class Test; - friend class internal::UnitTestImpl; - - // Gets the (mutable) vector of TestInfos in this TestCase. - internal::Vector& test_info_list() { return *test_info_list_; } - - // Gets the (immutable) vector of TestInfos in this TestCase. - const internal::Vector & test_info_list() const { - return *test_info_list_; - } - - // Returns the i-th test among all the tests. i can range from 0 to - // total_test_count() - 1. If i is not in that range, returns NULL. - TestInfo* GetMutableTestInfo(int i); - - // Sets the should_run member. - void set_should_run(bool should) { should_run_ = should; } - - // Adds a TestInfo to this test case. Will delete the TestInfo upon - // destruction of the TestCase object. - void AddTestInfo(TestInfo * test_info); - - // Clears the results of all tests in this test case. - void ClearResult(); - - // Clears the results of all tests in the given test case. - static void ClearTestCaseResult(TestCase* test_case) { - test_case->ClearResult(); - } - - // Runs every test in this TestCase. - void Run(); - - // Returns true iff test passed. - static bool TestPassed(const TestInfo * test_info); - - // Returns true iff test failed. - static bool TestFailed(const TestInfo * test_info); - - // Returns true iff test is disabled. - static bool TestDisabled(const TestInfo * test_info); - - // Returns true if the given test should run. - static bool ShouldRunTest(const TestInfo *test_info); - - // Shuffles the tests in this test case. - void ShuffleTests(internal::Random* random); - - // Restores the test order to before the first shuffle. - void UnshuffleTests(); - - // Name of the test case. - internal::String name_; - // Comment on the test case. - internal::String comment_; - // The vector of TestInfos in their original order. It owns the - // elements in the vector. - const internal::scoped_ptr > test_info_list_; - // Provides a level of indirection for the test list to allow easy - // shuffling and restoring the test order. The i-th element in this - // vector is the index of the i-th test in the shuffled test list. - const internal::scoped_ptr > test_indices_; - // Pointer to the function that sets up the test case. - Test::SetUpTestCaseFunc set_up_tc_; - // Pointer to the function that tears down the test case. - Test::TearDownTestCaseFunc tear_down_tc_; - // True iff any test in this test case should run. - bool should_run_; - // Elapsed time, in milliseconds. - TimeInMillis elapsed_time_; - - // We disallow copying TestCases. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase); -}; - -// An Environment object is capable of setting up and tearing down an -// environment. The user should subclass this to define his own -// environment(s). -// -// An Environment object does the set-up and tear-down in virtual -// methods SetUp() and TearDown() instead of the constructor and the -// destructor, as: -// -// 1. You cannot safely throw from a destructor. This is a problem -// as in some cases Google Test is used where exceptions are enabled, and -// we may want to implement ASSERT_* using exceptions where they are -// available. -// 2. You cannot use ASSERT_* directly in a constructor or -// destructor. -class Environment { - public: - // The d'tor is virtual as we need to subclass Environment. - virtual ~Environment() {} - - // Override this to define how to set up the environment. - virtual void SetUp() {} - - // Override this to define how to tear down the environment. - virtual void TearDown() {} - private: - // If you see an error about overriding the following function or - // about it being private, you have mis-spelled SetUp() as Setup(). - struct Setup_should_be_spelled_SetUp {}; - virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } -}; - -// The interface for tracing execution of tests. The methods are organized in -// the order the corresponding events are fired. -class TestEventListener { - public: - virtual ~TestEventListener() {} - - // Fired before any test activity starts. - virtual void OnTestProgramStart(const UnitTest& unit_test) = 0; - - // Fired before each iteration of tests starts. There may be more than - // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration - // index, starting from 0. - virtual void OnTestIterationStart(const UnitTest& unit_test, - int iteration) = 0; - - // Fired before environment set-up for each iteration of tests starts. - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0; - - // Fired after environment set-up for each iteration of tests ends. - virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0; - - // Fired before the test case starts. - virtual void OnTestCaseStart(const TestCase& test_case) = 0; - - // Fired before the test starts. - virtual void OnTestStart(const TestInfo& test_info) = 0; - - // Fired after a failed assertion or a SUCCESS(). - virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0; - - // Fired after the test ends. - virtual void OnTestEnd(const TestInfo& test_info) = 0; - - // Fired after the test case ends. - virtual void OnTestCaseEnd(const TestCase& test_case) = 0; - - // Fired before environment tear-down for each iteration of tests starts. - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0; - - // Fired after environment tear-down for each iteration of tests ends. - virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0; - - // Fired after each iteration of tests finishes. - virtual void OnTestIterationEnd(const UnitTest& unit_test, - int iteration) = 0; - - // Fired after all test activities have ended. - virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0; -}; - -// The convenience class for users who need to override just one or two -// methods and are not concerned that a possible change to a signature of -// the methods they override will not be caught during the build. For -// comments about each method please see the definition of TestEventListener -// above. -class EmptyTestEventListener : public TestEventListener { - public: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} - virtual void OnTestStart(const TestInfo& /*test_info*/) {} - virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {} - virtual void OnTestEnd(const TestInfo& /*test_info*/) {} - virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} - virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} -}; - -// TestEventListeners lets users add listeners to track events in Google Test. -class TestEventListeners { - public: - TestEventListeners(); - ~TestEventListeners(); - - // Appends an event listener to the end of the list. Google Test assumes - // the ownership of the listener (i.e. it will delete the listener when - // the test program finishes). - void Append(TestEventListener* listener); - - // Removes the given event listener from the list and returns it. It then - // becomes the caller's responsibility to delete the listener. Returns - // NULL if the listener is not found in the list. - TestEventListener* Release(TestEventListener* listener); - - // Returns the standard listener responsible for the default console - // output. Can be removed from the listeners list to shut down default - // console output. Note that removing this object from the listener list - // with Release transfers its ownership to the caller and makes this - // function return NULL the next time. - TestEventListener* default_result_printer() const { - return default_result_printer_; - } - - // Returns the standard listener responsible for the default XML output - // controlled by the --gtest_output=xml flag. Can be removed from the - // listeners list by users who want to shut down the default XML output - // controlled by this flag and substitute it with custom one. Note that - // removing this object from the listener list with Release transfers its - // ownership to the caller and makes this function return NULL the next - // time. - TestEventListener* default_xml_generator() const { - return default_xml_generator_; - } - - private: - friend class TestCase; - friend class internal::DefaultGlobalTestPartResultReporter; - friend class internal::NoExecDeathTest; - friend class internal::TestEventListenersAccessor; - friend class internal::TestInfoImpl; - friend class internal::UnitTestImpl; - - // Returns repeater that broadcasts the TestEventListener events to all - // subscribers. - TestEventListener* repeater(); - - // Sets the default_result_printer attribute to the provided listener. - // The listener is also added to the listener list and previous - // default_result_printer is removed from it and deleted. The listener can - // also be NULL in which case it will not be added to the list. Does - // nothing if the previous and the current listener objects are the same. - void SetDefaultResultPrinter(TestEventListener* listener); - - // Sets the default_xml_generator attribute to the provided listener. The - // listener is also added to the listener list and previous - // default_xml_generator is removed from it and deleted. The listener can - // also be NULL in which case it will not be added to the list. Does - // nothing if the previous and the current listener objects are the same. - void SetDefaultXmlGenerator(TestEventListener* listener); - - // Controls whether events will be forwarded by the repeater to the - // listeners in the list. - bool EventForwardingEnabled() const; - void SuppressEventForwarding(); - - // The actual list of listeners. - internal::TestEventRepeater* repeater_; - // Listener responsible for the standard result output. - TestEventListener* default_result_printer_; - // Listener responsible for the creation of the XML output file. - TestEventListener* default_xml_generator_; - - // We disallow copying TestEventListeners. - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners); -}; - -// A UnitTest consists of a vector of TestCases. -// -// This is a singleton class. The only instance of UnitTest is -// created when UnitTest::GetInstance() is first called. This -// instance is never deleted. -// -// UnitTest is not copyable. -// -// This class is thread-safe as long as the methods are called -// according to their specification. -class UnitTest { - public: - // Gets the singleton UnitTest object. The first time this method - // is called, a UnitTest object is constructed and returned. - // Consecutive calls will return the same object. - static UnitTest* GetInstance(); - - // Runs all tests in this UnitTest object and prints the result. - // Returns 0 if successful, or 1 otherwise. - // - // This method can only be called from the main thread. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - int Run() GTEST_MUST_USE_RESULT_; - - // Returns the working directory when the first TEST() or TEST_F() - // was executed. The UnitTest object owns the string. - const char* original_working_dir() const; - - // Returns the TestCase object for the test that's currently running, - // or NULL if no test is running. - const TestCase* current_test_case() const; - - // Returns the TestInfo object for the test that's currently running, - // or NULL if no test is running. - const TestInfo* current_test_info() const; - - // Returns the random seed used at the start of the current test run. - int random_seed() const; - -#if GTEST_HAS_PARAM_TEST - // Returns the ParameterizedTestCaseRegistry object used to keep track of - // value-parameterized tests and instantiate and register them. - // - // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - internal::ParameterizedTestCaseRegistry& parameterized_test_registry(); -#endif // GTEST_HAS_PARAM_TEST - - // Gets the number of successful test cases. - int successful_test_case_count() const; - - // Gets the number of failed test cases. - int failed_test_case_count() const; - - // Gets the number of all test cases. - int total_test_case_count() const; - - // Gets the number of all test cases that contain at least one test - // that should run. - int test_case_to_run_count() const; - - // Gets the number of successful tests. - int successful_test_count() const; - - // Gets the number of failed tests. - int failed_test_count() const; - - // Gets the number of disabled tests. - int disabled_test_count() const; - - // Gets the number of all tests. - int total_test_count() const; - - // Gets the number of tests that should run. - int test_to_run_count() const; - - // Gets the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const; - - // Returns true iff the unit test passed (i.e. all test cases passed). - bool Passed() const; - - // Returns true iff the unit test failed (i.e. some test case failed - // or something outside of all tests failed). - bool Failed() const; - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - const TestCase* GetTestCase(int i) const; - - // Returns the list of event listeners that can be used to track events - // inside Google Test. - TestEventListeners& listeners(); - - private: - // Registers and returns a global test environment. When a test - // program is run, all global test environments will be set-up in - // the order they were registered. After all tests in the program - // have finished, all global test environments will be torn-down in - // the *reverse* order they were registered. - // - // The UnitTest object takes ownership of the given environment. - // - // This method can only be called from the main thread. - Environment* AddEnvironment(Environment* env); - - // Adds a TestPartResult to the current TestResult object. All - // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) - // eventually call this to report their results. The user code - // should use the assertion macros instead of calling this directly. - void AddTestPartResult(TestPartResult::Type result_type, - const char* file_name, - int line_number, - const internal::String& message, - const internal::String& os_stack_trace); - - // Adds a TestProperty to the current TestResult object. If the result already - // contains a property with the same key, the value will be updated. - void RecordPropertyForCurrentTest(const char* key, const char* value); - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - TestCase* GetMutableTestCase(int i); - - // Accessors for the implementation object. - internal::UnitTestImpl* impl() { return impl_; } - const internal::UnitTestImpl* impl() const { return impl_; } - - // These classes and funcions are friends as they need to access private - // members of UnitTest. - friend class Test; - friend class internal::AssertHelper; - friend class internal::ScopedTrace; - friend Environment* AddGlobalTestEnvironment(Environment* env); - friend internal::UnitTestImpl* internal::GetUnitTestImpl(); - friend void internal::ReportFailureInUnknownLocation( - TestPartResult::Type result_type, - const internal::String& message); - - // Creates an empty UnitTest. - UnitTest(); - - // D'tor - virtual ~UnitTest(); - - // Pushes a trace defined by SCOPED_TRACE() on to the per-thread - // Google Test trace stack. - void PushGTestTrace(const internal::TraceInfo& trace); - - // Pops a trace from the per-thread Google Test trace stack. - void PopGTestTrace(); - - // Protects mutable state in *impl_. This is mutable as some const - // methods need to lock it too. - mutable internal::Mutex mutex_; - - // Opaque implementation object. This field is never changed once - // the object is constructed. We don't mark it as const here, as - // doing so will cause a warning in the constructor of UnitTest. - // Mutable state in *impl_ is protected by mutex_. - internal::UnitTestImpl* impl_; - - // We disallow copying UnitTest. - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest); -}; - -// A convenient wrapper for adding an environment for the test -// program. -// -// You should call this before RUN_ALL_TESTS() is called, probably in -// main(). If you use gtest_main, you need to call this before main() -// starts for it to take effect. For example, you can define a global -// variable like this: -// -// testing::Environment* const foo_env = -// testing::AddGlobalTestEnvironment(new FooEnvironment); -// -// However, we strongly recommend you to write your own main() and -// call AddGlobalTestEnvironment() there, as relying on initialization -// of global variables makes the code harder to read and may cause -// problems when you register multiple environments from different -// translation units and the environments have dependencies among them -// (remember that the compiler doesn't guarantee the order in which -// global variables from different translation units are initialized). -inline Environment* AddGlobalTestEnvironment(Environment* env) { - return UnitTest::GetInstance()->AddEnvironment(env); -} - -// Initializes Google Test. This must be called before calling -// RUN_ALL_TESTS(). In particular, it parses a command line for the -// flags that Google Test recognizes. Whenever a Google Test flag is -// seen, it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Test flag variables are -// updated. -// -// Calling the function for the second time has no user-visible effect. -void InitGoogleTest(int* argc, char** argv); - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleTest(int* argc, wchar_t** argv); - -namespace internal { - -// These overloaded versions handle ::std::string and ::std::wstring. -#if GTEST_HAS_STD_STRING -inline String FormatForFailureMessage(const ::std::string& str) { - return (Message() << '"' << str << '"').GetString(); -} -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -inline String FormatForFailureMessage(const ::std::wstring& wstr) { - return (Message() << "L\"" << wstr << '"').GetString(); -} -#endif // GTEST_HAS_STD_WSTRING - -// These overloaded versions handle ::string and ::wstring. -#if GTEST_HAS_GLOBAL_STRING -inline String FormatForFailureMessage(const ::string& str) { - return (Message() << '"' << str << '"').GetString(); -} -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING -inline String FormatForFailureMessage(const ::wstring& wstr) { - return (Message() << "L\"" << wstr << '"').GetString(); -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc) -// operand to be used in a failure message. The type (but not value) -// of the other operand may affect the format. This allows us to -// print a char* as a raw pointer when it is compared against another -// char*, and print it as a C string when it is compared against an -// std::string object, for example. -// -// The default implementation ignores the type of the other operand. -// Some specialized versions are used to handle formatting wide or -// narrow C strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -String FormatForComparisonFailureMessage(const T1& value, - const T2& /* other_operand */) { - return FormatForFailureMessage(value); -} - -// The helper function for {ASSERT|EXPECT}_EQ. -template -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4389) // Temporarily disables warning on - // signed/unsigned mismatch. -#endif - - if (expected == actual) { - return AssertionSuccess(); - } - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif - - return EqFailure(expected_expression, - actual_expression, - FormatForComparisonFailureMessage(expected, actual), - FormatForComparisonFailureMessage(actual, expected), - false); -} - -// With this overloaded version, we allow anonymous enums to be used -// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums -// can be implicitly cast to BiggestInt. -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual); - -// The helper class for {ASSERT|EXPECT}_EQ. The template argument -// lhs_is_null_literal is true iff the first argument to ASSERT_EQ() -// is a null pointer literal. The following default implementation is -// for lhs_is_null_literal being false. -template -class EqHelper { - public: - // This templatized version is for the general case. - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // With this overloaded version, we allow anonymous enums to be used - // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous - // enums can be implicitly cast to BiggestInt. - // - // Even though its body looks the same as the above version, we - // cannot merge the two, as it will make anonymous enums unhappy. - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } -}; - -// This specialization is used when the first argument to ASSERT_EQ() -// is a null pointer literal. -template <> -class EqHelper { - public: - // We define two overloaded versions of Compare(). The first - // version will be picked when the second argument to ASSERT_EQ() is - // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or - // EXPECT_EQ(false, a_bool). - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& expected, - const T2& actual) { - return CmpHelperEQ(expected_expression, actual_expression, expected, - actual); - } - - // This version will be picked when the second argument to - // ASSERT_EQ() is a pointer, e.g. ASSERT_EQ(NULL, a_pointer). - template - static AssertionResult Compare(const char* expected_expression, - const char* actual_expression, - const T1& /* expected */, - T2* actual) { - // We already know that 'expected' is a null pointer. - return CmpHelperEQ(expected_expression, actual_expression, - static_cast(NULL), actual); - } -}; - -// A macro for implementing the helper functions needed to implement -// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste -// of similar code. -// -// For each templatized helper function, we also define an overloaded -// version for BiggestInt in order to reduce code bloat and allow -// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled -// with gcc 4. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ -template \ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - const T1& val1, const T2& val2) {\ - if (val1 op val2) {\ - return AssertionSuccess();\ - } else {\ - Message msg;\ - msg << "Expected: (" << expr1 << ") " #op " (" << expr2\ - << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ - << " vs " << FormatForComparisonFailureMessage(val2, val1);\ - return AssertionFailure(msg);\ - }\ -}\ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - BiggestInt val1, BiggestInt val2); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. - -// Implements the helper function for {ASSERT|EXPECT}_NE -GTEST_IMPL_CMP_HELPER_(NE, !=) -// Implements the helper function for {ASSERT|EXPECT}_LE -GTEST_IMPL_CMP_HELPER_(LE, <=) -// Implements the helper function for {ASSERT|EXPECT}_LT -GTEST_IMPL_CMP_HELPER_(LT, < ) -// Implements the helper function for {ASSERT|EXPECT}_GE -GTEST_IMPL_CMP_HELPER_(GE, >=) -// Implements the helper function for {ASSERT|EXPECT}_GT -GTEST_IMPL_CMP_HELPER_(GT, > ) - -#undef GTEST_IMPL_CMP_HELPER_ - -// The helper function for {ASSERT|EXPECT}_STREQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRCASEEQ. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual); - -// The helper function for {ASSERT|EXPECT}_STRNE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - -// The helper function for {ASSERT|EXPECT}_STRCASENE. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRCASENE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2); - - -// Helper function for *_STREQ on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const wchar_t* expected, - const wchar_t* actual); - -// Helper function for *_STRNE on wide strings. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const wchar_t* s1, - const wchar_t* s2); - -} // namespace internal - -// IsSubstring() and IsNotSubstring() are intended to be used as the -// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by -// themselves. They check whether needle is a substring of haystack -// (NULL is considered a substring of itself only), and return an -// appropriate error message when they fail. -// -// The {needle,haystack}_expr arguments are the stringified -// expressions that generated the two real arguments. -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack); -#if GTEST_HAS_STD_STRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack); -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack); -#endif // GTEST_HAS_STD_WSTRING - -namespace internal { - -// Helper template function for comparing floating-points. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -template -AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression, - const char* actual_expression, - RawType expected, - RawType actual) { - const FloatingPoint lhs(expected), rhs(actual); - - if (lhs.AlmostEquals(rhs)) { - return AssertionSuccess(); - } - - StrStream expected_ss; - expected_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << expected; - - StrStream actual_ss; - actual_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << actual; - - return EqFailure(expected_expression, - actual_expression, - StrStreamToString(&expected_ss), - StrStreamToString(&actual_ss), - false); -} - -// Helper function for implementing ASSERT_NEAR. -// -// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. -AssertionResult DoubleNearPredFormat(const char* expr1, - const char* expr2, - const char* abs_error_expr, - double val1, - double val2, - double abs_error); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// A class that enables one to stream messages to assertion macros -class AssertHelper { - public: - // Constructor. - AssertHelper(TestPartResult::Type type, - const char* file, - int line, - const char* message); - ~AssertHelper(); - - // Message assignment is a semantic trick to enable assertion - // streaming; see the GTEST_MESSAGE_ macro below. - void operator=(const Message& message) const; - - private: - // We put our data in a struct so that the size of the AssertHelper class can - // be as small as possible. This is important because gcc is incapable of - // re-using stack space even for temporary variables, so every EXPECT_EQ - // reserves stack space for another AssertHelper. - struct AssertHelperData { - AssertHelperData(TestPartResult::Type t, - const char* srcfile, - int line_num, - const char* msg) - : type(t), file(srcfile), line(line_num), message(msg) { } - - TestPartResult::Type const type; - const char* const file; - int const line; - String const message; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData); - }; - - AssertHelperData* const data_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper); -}; - -} // namespace internal - -#if GTEST_HAS_PARAM_TEST -// The abstract base class that all value-parameterized tests inherit from. -// -// This class adds support for accessing the test parameter value via -// the GetParam() method. -// -// Use it with one of the parameter generator defining functions, like Range(), -// Values(), ValuesIn(), Bool(), and Combine(). -// -// class FooTest : public ::testing::TestWithParam { -// protected: -// FooTest() { -// // Can use GetParam() here. -// } -// virtual ~FooTest() { -// // Can use GetParam() here. -// } -// virtual void SetUp() { -// // Can use GetParam() here. -// } -// virtual void TearDown { -// // Can use GetParam() here. -// } -// }; -// TEST_P(FooTest, DoesBar) { -// // Can use GetParam() method here. -// Foo foo; -// ASSERT_TRUE(foo.DoesBar(GetParam())); -// } -// INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10)); - -template -class TestWithParam : public Test { - public: - typedef T ParamType; - - // The current parameter value. Is also available in the test fixture's - // constructor. - const ParamType& GetParam() const { return *parameter_; } - - private: - // Sets parameter value. The caller is responsible for making sure the value - // remains alive and unchanged throughout the current test. - static void SetParam(const ParamType* parameter) { - parameter_ = parameter; - } - - // Static value used for accessing parameter during a test lifetime. - static const ParamType* parameter_; - - // TestClass must be a subclass of TestWithParam. - template friend class internal::ParameterizedTestFactory; -}; - -template -const T* TestWithParam::parameter_ = NULL; - -#endif // GTEST_HAS_PARAM_TEST - -// Macros for indicating success/failure in test code. - -// ADD_FAILURE unconditionally adds a failure to the current test. -// SUCCEED generates a success - it doesn't automatically make the -// current test successful, as a test is only successful when it has -// no failure. -// -// EXPECT_* verifies that a certain condition is satisfied. If not, -// it behaves like ADD_FAILURE. In particular: -// -// EXPECT_TRUE verifies that a Boolean condition is true. -// EXPECT_FALSE verifies that a Boolean condition is false. -// -// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except -// that they will also abort the current function on failure. People -// usually want the fail-fast behavior of FAIL and ASSERT_*, but those -// writing data-driven tests often find themselves using ADD_FAILURE -// and EXPECT_* more. -// -// Examples: -// -// EXPECT_TRUE(server.StatusIsOK()); -// ASSERT_FALSE(server.HasPendingRequest(port)) -// << "There are still pending requests " << "on port " << port; - -// Generates a nonfatal failure with a generic message. -#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed") - -// Generates a fatal failure with a generic message. -#define FAIL() GTEST_FATAL_FAILURE_("Failed") - -// Generates a success with a generic message. -#define SUCCEED() GTEST_SUCCESS_("Succeeded") - -// Macros for testing exceptions. -// -// * {ASSERT|EXPECT}_THROW(statement, expected_exception): -// Tests that the statement throws the expected exception. -// * {ASSERT|EXPECT}_NO_THROW(statement): -// Tests that the statement doesn't throw any exception. -// * {ASSERT|EXPECT}_ANY_THROW(statement): -// Tests that the statement throws an exception. - -#define EXPECT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_) -#define EXPECT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define EXPECT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_) -#define ASSERT_THROW(statement, expected_exception) \ - GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_) -#define ASSERT_NO_THROW(statement) \ - GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_) -#define ASSERT_ANY_THROW(statement) \ - GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_) - -// Boolean assertions. -#define EXPECT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_NONFATAL_FAILURE_) -#define EXPECT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_NONFATAL_FAILURE_) -#define ASSERT_TRUE(condition) \ - GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ - GTEST_FATAL_FAILURE_) -#define ASSERT_FALSE(condition) \ - GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ - GTEST_FATAL_FAILURE_) - -// Includes the auto-generated header that implements a family of -// generic predicate assertion macros. -#include - -// Macros for testing equalities and inequalities. -// -// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual -// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2 -// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2 -// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2 -// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2 -// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2 -// -// When they are not, Google Test prints both the tested expressions and -// their actual values. The values must be compatible built-in types, -// or you will get a compiler error. By "compatible" we mean that the -// values can be compared by the respective operator. -// -// Note: -// -// 1. It is possible to make a user-defined type work with -// {ASSERT|EXPECT}_??(), but that requires overloading the -// comparison operators and is thus discouraged by the Google C++ -// Usage Guide. Therefore, you are advised to use the -// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are -// equal. -// -// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on -// pointers (in particular, C strings). Therefore, if you use it -// with two C strings, you are testing how their locations in memory -// are related, not how their content is related. To compare two C -// strings by content, use {ASSERT|EXPECT}_STR*(). -// -// 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to -// {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you -// what the actual value is when it fails, and similarly for the -// other comparisons. -// -// 4. Do not depend on the order in which {ASSERT|EXPECT}_??() -// evaluate their arguments, which is undefined. -// -// 5. These macros evaluate their arguments exactly once. -// -// Examples: -// -// EXPECT_NE(5, Foo()); -// EXPECT_EQ(NULL, a_pointer); -// ASSERT_LT(i, array_size); -// ASSERT_GT(records.size(), 0) << "There is no record left."; - -#define EXPECT_EQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define EXPECT_NE(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual) -#define EXPECT_LE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define EXPECT_LT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define EXPECT_GE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define EXPECT_GT(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -#define ASSERT_EQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal:: \ - EqHelper::Compare, \ - expected, actual) -#define ASSERT_NE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) -#define ASSERT_LE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) -#define ASSERT_LT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) -#define ASSERT_GE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) -#define ASSERT_GT(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) - -// C String Comparisons. All tests treat NULL and any non-NULL string -// as different. Two NULLs are equal. -// -// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2 -// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2 -// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case -// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case -// -// For wide or narrow string objects, you can use the -// {ASSERT|EXPECT}_??() macros. -// -// Don't depend on the order in which the arguments are evaluated, -// which is undefined. -// -// These macros evaluate their arguments exactly once. - -#define EXPECT_STREQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define EXPECT_STRNE(s1, s2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define EXPECT_STRCASEEQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define EXPECT_STRCASENE(s1, s2)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -#define ASSERT_STREQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) -#define ASSERT_STRNE(s1, s2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) -#define ASSERT_STRCASEEQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) -#define ASSERT_STRCASENE(s1, s2)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) - -// Macros for comparing floating-point numbers. -// -// * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual): -// Tests that two float values are almost equal. -// * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual): -// Tests that two double values are almost equal. -// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): -// Tests that v1 and v2 are within the given distance to each other. -// -// Google Test uses ULP-based comparison to automatically pick a default -// error bound that is appropriate for the operands. See the -// FloatingPoint template class in gtest-internal.h if you are -// interested in the implementation details. - -#define EXPECT_FLOAT_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_DOUBLE_EQ(expected, actual)\ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_FLOAT_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define ASSERT_DOUBLE_EQ(expected, actual)\ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ - expected, actual) - -#define EXPECT_NEAR(val1, val2, abs_error)\ - EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -#define ASSERT_NEAR(val1, val2, abs_error)\ - ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ - val1, val2, abs_error) - -// These predicate format functions work on floating-point values, and -// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g. -// -// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0); - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult FloatLE(const char* expr1, const char* expr2, - float val1, float val2); -AssertionResult DoubleLE(const char* expr1, const char* expr2, - double val1, double val2); - - -#if GTEST_OS_WINDOWS - -// Macros that test for HRESULT failure and success, these are only useful -// on Windows, and rely on Windows SDK macros and APIs to compile. -// -// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr) -// -// When expr unexpectedly fails or succeeds, Google Test prints the -// expected result and the actual result with both a human-readable -// string representation of the error, if available, as well as the -// hex result code. -#define EXPECT_HRESULT_SUCCEEDED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -#define ASSERT_HRESULT_SUCCEEDED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) - -#define EXPECT_HRESULT_FAILED(expr) \ - EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -#define ASSERT_HRESULT_FAILED(expr) \ - ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) - -#endif // GTEST_OS_WINDOWS - -// Macros that execute statement and check that it doesn't generate new fatal -// failures in the current thread. -// -// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement); -// -// Examples: -// -// EXPECT_NO_FATAL_FAILURE(Process()); -// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed"; -// -#define ASSERT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_) -#define EXPECT_NO_FATAL_FAILURE(statement) \ - GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_) - -// Causes a trace (including the source file path, the current line -// number, and the given message) to be included in every test failure -// message generated by code in the current scope. The effect is -// undone when the control leaves the current scope. -// -// The message argument can be anything streamable to std::ostream. -// -// In the implementation, we include the current line number as part -// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s -// to appear in the same block - as long as they are on different -// lines. -#define SCOPED_TRACE(message) \ - ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\ - __FILE__, __LINE__, ::testing::Message() << (message)) - -namespace internal { - -// This template is declared, but intentionally undefined. -template -struct StaticAssertTypeEqHelper; - -template -struct StaticAssertTypeEqHelper {}; - -} // namespace internal - -// Compile-time assertion for type equality. -// StaticAssertTypeEq() compiles iff type1 and type2 are -// the same type. The value it returns is not interesting. -// -// Instead of making StaticAssertTypeEq a class template, we make it a -// function template that invokes a helper class template. This -// prevents a user from misusing StaticAssertTypeEq by -// defining objects of that type. -// -// CAVEAT: -// -// When used inside a method of a class template, -// StaticAssertTypeEq() is effective ONLY IF the method is -// instantiated. For example, given: -// -// template class Foo { -// public: -// void Bar() { testing::StaticAssertTypeEq(); } -// }; -// -// the code: -// -// void Test1() { Foo foo; } -// -// will NOT generate a compiler error, as Foo::Bar() is never -// actually instantiated. Instead, you need: -// -// void Test2() { Foo foo; foo.Bar(); } -// -// to cause a compiler error. -template -bool StaticAssertTypeEq() { - internal::StaticAssertTypeEqHelper(); - return true; -} - -// Defines a test. -// -// The first parameter is the name of the test case, and the second -// parameter is the name of the test within the test case. -// -// The convention is to end the test case name with "Test". For -// example, a test case for the Foo class can be named FooTest. -// -// The user should put his test code between braces after using this -// macro. Example: -// -// TEST(FooTest, InitializesCorrectly) { -// Foo foo; -// EXPECT_TRUE(foo.StatusIsOK()); -// } - -// Note that we call GetTestTypeId() instead of GetTypeId< -// ::testing::Test>() here to get the type ID of testing::Test. This -// is to work around a suspected linker bug when using Google Test as -// a framework on Mac OS X. The bug causes GetTypeId< -// ::testing::Test>() to return different values depending on whether -// the call is from the Google Test framework itself or from user test -// code. GetTestTypeId() is guaranteed to always return the same -// value, as it always calls GetTypeId<>() from the Google Test -// framework. -#define TEST(test_case_name, test_name)\ - GTEST_TEST_(test_case_name, test_name, \ - ::testing::Test, ::testing::internal::GetTestTypeId()) - - -// Defines a test that uses a test fixture. -// -// The first parameter is the name of the test fixture class, which -// also doubles as the test case name. The second parameter is the -// name of the test within the test case. -// -// A test fixture class must be declared earlier. The user should put -// his test code between braces after using this macro. Example: -// -// class FooTest : public testing::Test { -// protected: -// virtual void SetUp() { b_.AddElement(3); } -// -// Foo a_; -// Foo b_; -// }; -// -// TEST_F(FooTest, InitializesCorrectly) { -// EXPECT_TRUE(a_.StatusIsOK()); -// } -// -// TEST_F(FooTest, ReturnsElementCountCorrectly) { -// EXPECT_EQ(0, a_.size()); -// EXPECT_EQ(1, b_.size()); -// } - -#define TEST_F(test_fixture, test_name)\ - GTEST_TEST_(test_fixture, test_name, test_fixture, \ - ::testing::internal::GetTypeId()) - -// Use this macro in main() to run all tests. It returns 0 if all -// tests are successful, or 1 otherwise. -// -// RUN_ALL_TESTS() should be invoked after the command line has been -// parsed by InitGoogleTest(). - -#define RUN_ALL_TESTS()\ - (::testing::UnitTest::GetInstance()->Run()) - -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_pred_impl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_pred_impl.h deleted file mode 100644 index e1e2f8c4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_pred_impl.h +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on 10/02/2008 by command -// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! -// -// Implements a family of generic predicate assertion macros. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ - -// This header implements a family of generic predicate assertion -// macros: -// -// ASSERT_PRED_FORMAT1(pred_format, v1) -// ASSERT_PRED_FORMAT2(pred_format, v1, v2) -// ... -// -// where pred_format is a function or functor that takes n (in the -// case of ASSERT_PRED_FORMATn) values and their source expression -// text, and returns a testing::AssertionResult. See the definition -// of ASSERT_EQ in gtest.h for an example. -// -// If you don't care about formatting, you can use the more -// restrictive version: -// -// ASSERT_PRED1(pred, v1) -// ASSERT_PRED2(pred, v1, v2) -// ... -// -// where pred is an n-ary function or functor that returns bool, -// and the values v1, v2, ..., must support the << operator for -// streaming to std::ostream. -// -// We also define the EXPECT_* variations. -// -// For now we only support predicates whose arity is at most 5. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. - -// GTEST_ASSERT_ is the basic statement to which all of the assertions -// in this file reduce. Don't use this in your code. - -#define GTEST_ASSERT_(expression, on_failure) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const ::testing::AssertionResult gtest_ar = (expression)) \ - ; \ - else \ - on_failure(gtest_ar.failure_message()) - - -// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -template -AssertionResult AssertPred1Helper(const char* pred_text, - const char* e1, - Pred pred, - const T1& v1) { - if (pred(v1)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1. -// Don't use this in your code. -#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, v1),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use -// this in your code. -#define GTEST_PRED1_(pred, v1, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \ - #v1, \ - pred, \ - v1), on_failure) - -// Unary predicate assertion macros. -#define EXPECT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT1(pred_format, v1) \ - GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED1(pred, v1) \ - GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -template -AssertionResult AssertPred2Helper(const char* pred_text, - const char* e1, - const char* e2, - Pred pred, - const T1& v1, - const T2& v2) { - if (pred(v1, v2)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2. -// Don't use this in your code. -#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use -// this in your code. -#define GTEST_PRED2_(pred, v1, v2, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \ - #v1, \ - #v2, \ - pred, \ - v1, \ - v2), on_failure) - -// Binary predicate assertion macros. -#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \ - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED2(pred, v1, v2) \ - GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -template -AssertionResult AssertPred3Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3) { - if (pred(v1, v2, v3)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3. -// Don't use this in your code. -#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use -// this in your code. -#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - pred, \ - v1, \ - v2, \ - v3), on_failure) - -// Ternary predicate assertion macros. -#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \ - GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED3(pred, v1, v2, v3) \ - GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -template -AssertionResult AssertPred4Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - if (pred(v1, v2, v3, v4)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4. -// Don't use this in your code. -#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use -// this in your code. -#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4), on_failure) - -// 4-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ - GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED4(pred, v1, v2, v3, v4) \ - GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) - - - -// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -template -AssertionResult AssertPred5Helper(const char* pred_text, - const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - Pred pred, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess(); - - Message msg; - msg << pred_text << "(" - << e1 << ", " - << e2 << ", " - << e3 << ", " - << e4 << ", " - << e5 << ") evaluates to false, where" - << "\n" << e1 << " evaluates to " << v1 - << "\n" << e2 << " evaluates to " << v2 - << "\n" << e3 << " evaluates to " << v3 - << "\n" << e4 << " evaluates to " << v4 - << "\n" << e5 << " evaluates to " << v5; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5. -// Don't use this in your code. -#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5),\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use -// this in your code. -#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\ - GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \ - #v1, \ - #v2, \ - #v3, \ - #v4, \ - #v5, \ - pred, \ - v1, \ - v2, \ - v3, \ - v4, \ - v5), on_failure) - -// 5-ary predicate assertion macros. -#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ - GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \ - GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) - - - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_prod.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_prod.h deleted file mode 100644 index da80ddc6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/gtest_prod.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Google C++ Testing Framework definitions useful in production code. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ - -// When you need to test the private or protected members of a class, -// use the FRIEND_TEST macro to declare your tests as friends of the -// class. For example: -// -// class MyClass { -// private: -// void MyMethod(); -// FRIEND_TEST(MyClassTest, MyMethod); -// }; -// -// class MyClassTest : public testing::Test { -// // ... -// }; -// -// TEST_F(MyClassTest, MyMethod) { -// // Can call MyClass::MyMethod() here. -// } - -#define FRIEND_TEST(test_case_name, test_name)\ -friend class test_case_name##_##test_name##_Test - -#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-death-test-internal.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-death-test-internal.h deleted file mode 100644 index 5aba1a0d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-death-test-internal.h +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file defines internal utilities needed for implementing -// death tests. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ - -#include - -namespace testing { -namespace internal { - -GTEST_DECLARE_string_(internal_run_death_test); - -// Names of the flags (needed for parsing Google Test flags). -const char kDeathTestStyleFlag[] = "death_test_style"; -const char kDeathTestUseFork[] = "death_test_use_fork"; -const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; - -#if GTEST_HAS_DEATH_TEST - -// DeathTest is a class that hides much of the complexity of the -// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method -// returns a concrete class that depends on the prevailing death test -// style, as defined by the --gtest_death_test_style and/or -// --gtest_internal_run_death_test flags. - -// In describing the results of death tests, these terms are used with -// the corresponding definitions: -// -// exit status: The integer exit information in the format specified -// by wait(2) -// exit code: The integer code passed to exit(3), _exit(2), or -// returned from main() -class DeathTest { - public: - // Create returns false if there was an error determining the - // appropriate action to take for the current death test; for example, - // if the gtest_death_test_style flag is set to an invalid value. - // The LastMessage method will return a more detailed message in that - // case. Otherwise, the DeathTest pointer pointed to by the "test" - // argument is set. If the death test should be skipped, the pointer - // is set to NULL; otherwise, it is set to the address of a new concrete - // DeathTest object that controls the execution of the current test. - static bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); - DeathTest(); - virtual ~DeathTest() { } - - // A helper class that aborts a death test when it's deleted. - class ReturnSentinel { - public: - explicit ReturnSentinel(DeathTest* test) : test_(test) { } - ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); } - private: - DeathTest* const test_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel); - } GTEST_ATTRIBUTE_UNUSED_; - - // An enumeration of possible roles that may be taken when a death - // test is encountered. EXECUTE means that the death test logic should - // be executed immediately. OVERSEE means that the program should prepare - // the appropriate environment for a child process to execute the death - // test, then wait for it to complete. - enum TestRole { OVERSEE_TEST, EXECUTE_TEST }; - - // An enumeration of the two reasons that a test might be aborted. - enum AbortReason { TEST_ENCOUNTERED_RETURN_STATEMENT, TEST_DID_NOT_DIE }; - - // Assumes one of the above roles. - virtual TestRole AssumeRole() = 0; - - // Waits for the death test to finish and returns its status. - virtual int Wait() = 0; - - // Returns true if the death test passed; that is, the test process - // exited during the test, its exit status matches a user-supplied - // predicate, and its stderr output matches a user-supplied regular - // expression. - // The user-supplied predicate may be a macro expression rather - // than a function pointer or functor, or else Wait and Passed could - // be combined. - virtual bool Passed(bool exit_status_ok) = 0; - - // Signals that the death test did not die as expected. - virtual void Abort(AbortReason reason) = 0; - - // Returns a human-readable outcome message regarding the outcome of - // the last death test. - static const char* LastMessage(); - - static void set_last_death_test_message(const String& message); - - private: - // A string containing a description of the outcome of the last death test. - static String last_death_test_message_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); -}; - -// Factory interface for death tests. May be mocked out for testing. -class DeathTestFactory { - public: - virtual ~DeathTestFactory() { } - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test) = 0; -}; - -// A concrete DeathTestFactory implementation for normal use. -class DefaultDeathTestFactory : public DeathTestFactory { - public: - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); -}; - -// Returns true if exit_status describes a process that was terminated -// by a signal, or exited normally with a nonzero exit code. -bool ExitedUnsuccessfully(int exit_status); - -// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*, -// ASSERT_EXIT*, and EXPECT_EXIT*. -#define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - const ::testing::internal::RE& gtest_regex = (regex); \ - ::testing::internal::DeathTest* gtest_dt; \ - if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \ - __FILE__, __LINE__, >est_dt)) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - if (gtest_dt != NULL) { \ - ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \ - gtest_dt_ptr(gtest_dt); \ - switch (gtest_dt->AssumeRole()) { \ - case ::testing::internal::DeathTest::OVERSEE_TEST: \ - if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \ - goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ - } \ - break; \ - case ::testing::internal::DeathTest::EXECUTE_TEST: { \ - ::testing::internal::DeathTest::ReturnSentinel \ - gtest_sentinel(gtest_dt); \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ - break; \ - } \ - } \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \ - fail(::testing::internal::DeathTest::LastMessage()) -// The symbol "fail" here expands to something into which a message -// can be streamed. - -// A class representing the parsed contents of the -// --gtest_internal_run_death_test flag, as it existed when -// RUN_ALL_TESTS was called. -class InternalRunDeathTestFlag { - public: - InternalRunDeathTestFlag(const String& file, - int line, - int index, - int write_fd) - : file_(file), line_(line), index_(index), write_fd_(write_fd) {} - - ~InternalRunDeathTestFlag() { - if (write_fd_ >= 0) - posix::Close(write_fd_); - } - - String file() const { return file_; } - int line() const { return line_; } - int index() const { return index_; } - int write_fd() const { return write_fd_; } - - private: - String file_; - int line_; - int index_; - int write_fd_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag); -}; - -// Returns a newly created InternalRunDeathTestFlag object with fields -// initialized from the GTEST_FLAG(internal_run_death_test) flag if -// the flag is specified; otherwise returns NULL. -InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); - -#else // GTEST_HAS_DEATH_TEST - -// This macro is used for implementing macros such as -// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where -// death tests are not supported. Those macros must compile on such systems -// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on -// systems that support death tests. This allows one to write such a macro -// on a system that does not support death tests and be sure that it will -// compile on a death-test supporting system. -// -// Parameters: -// statement - A statement that a macro such as EXPECT_DEATH would test -// for program termination. This macro has to make sure this -// statement is compiled but not executed, to ensure that -// EXPECT_DEATH_IF_SUPPORTED compiles with a certain -// parameter iff EXPECT_DEATH compiles with it. -// regex - A regex that a macro such as EXPECT_DEATH would use to test -// the output of statement. This parameter has to be -// compiled but not evaluated by this macro, to ensure that -// this macro only accepts expressions that a macro such as -// EXPECT_DEATH would accept. -// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED -// and a return statement for ASSERT_DEATH_IF_SUPPORTED. -// This ensures that ASSERT_DEATH_IF_SUPPORTED will not -// compile inside functions where ASSERT_DEATH doesn't -// compile. -// -// The branch that has an always false condition is used to ensure that -// statement and regex are compiled (and thus syntactically correct) but -// never executed. The unreachable code macro protects the terminator -// statement from generating an 'unreachable code' warning in case -// statement unconditionally returns or throws. The Message constructor at -// the end allows the syntax of streaming additional messages into the -// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH. -#define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::AlwaysTrue()) { \ - GTEST_LOG_(WARNING) \ - << "Death tests are not supported on this platform.\n" \ - << "Statement '" #statement "' cannot be verified."; \ - } else if (::testing::internal::AlwaysFalse()) { \ - ::testing::internal::RE::PartialMatch(".*", (regex)); \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - terminator; \ - } else \ - ::testing::Message() - -#endif // GTEST_HAS_DEATH_TEST - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-filepath.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-filepath.h deleted file mode 100644 index 1b2f5869..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-filepath.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// Google Test filepath utilities -// -// This header file declares classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included in . -// Do not include this header file separately! - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ - -#include - -namespace testing { -namespace internal { - -// FilePath - a class for file and directory pathname manipulation which -// handles platform-specific conventions (like the pathname separator). -// Used for helper functions for naming files in a directory for xml output. -// Except for Set methods, all methods are const or static, which provides an -// "immutable value object" -- useful for peace of mind. -// A FilePath with a value ending in a path separator ("like/this/") represents -// a directory, otherwise it is assumed to represent a file. In either case, -// it may or may not represent an actual file or directory in the file system. -// Names are NOT checked for syntax correctness -- no checking for illegal -// characters, malformed paths, etc. - -class FilePath { - public: - FilePath() : pathname_("") { } - FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } - - explicit FilePath(const char* pathname) : pathname_(pathname) { - Normalize(); - } - - explicit FilePath(const String& pathname) : pathname_(pathname) { - Normalize(); - } - - FilePath& operator=(const FilePath& rhs) { - Set(rhs); - return *this; - } - - void Set(const FilePath& rhs) { - pathname_ = rhs.pathname_; - } - - String ToString() const { return pathname_; } - const char* c_str() const { return pathname_.c_str(); } - - // Returns the current working directory, or "" if unsuccessful. - static FilePath GetCurrentDir(); - - // Given directory = "dir", base_name = "test", number = 0, - // extension = "xml", returns "dir/test.xml". If number is greater - // than zero (e.g., 12), returns "dir/test_12.xml". - // On Windows platform, uses \ as the separator rather than /. - static FilePath MakeFileName(const FilePath& directory, - const FilePath& base_name, - int number, - const char* extension); - - // Given directory = "dir", relative_path = "test.xml", - // returns "dir/test.xml". - // On Windows, uses \ as the separator rather than /. - static FilePath ConcatPaths(const FilePath& directory, - const FilePath& relative_path); - - // Returns a pathname for a file that does not currently exist. The pathname - // will be directory/base_name.extension or - // directory/base_name_.extension if directory/base_name.extension - // already exists. The number will be incremented until a pathname is found - // that does not already exist. - // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. - // There could be a race condition if two or more processes are calling this - // function at the same time -- they could both pick the same filename. - static FilePath GenerateUniqueFileName(const FilePath& directory, - const FilePath& base_name, - const char* extension); - - // Returns true iff the path is NULL or "". - bool IsEmpty() const { return c_str() == NULL || *c_str() == '\0'; } - - // If input name has a trailing separator character, removes it and returns - // the name, otherwise return the name string unmodified. - // On Windows platform, uses \ as the separator, other platforms use /. - FilePath RemoveTrailingPathSeparator() const; - - // Returns a copy of the FilePath with the directory part removed. - // Example: FilePath("path/to/file").RemoveDirectoryName() returns - // FilePath("file"). If there is no directory part ("just_a_file"), it returns - // the FilePath unmodified. If there is no file part ("just_a_dir/") it - // returns an empty FilePath (""). - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveDirectoryName() const; - - // RemoveFileName returns the directory path with the filename removed. - // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". - // If the FilePath is "a_file" or "/a_file", RemoveFileName returns - // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does - // not have a file, like "just/a/dir/", it returns the FilePath unmodified. - // On Windows platform, '\' is the path separator, otherwise it is '/'. - FilePath RemoveFileName() const; - - // Returns a copy of the FilePath with the case-insensitive extension removed. - // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns - // FilePath("dir/file"). If a case-insensitive extension is not - // found, returns a copy of the original FilePath. - FilePath RemoveExtension(const char* extension) const; - - // Creates directories so that path exists. Returns true if successful or if - // the directories already exist; returns false if unable to create - // directories for any reason. Will also return false if the FilePath does - // not represent a directory (that is, it doesn't end with a path separator). - bool CreateDirectoriesRecursively() const; - - // Create the directory so that path exists. Returns true if successful or - // if the directory already exists; returns false if unable to create the - // directory for any reason, including if the parent directory does not - // exist. Not named "CreateDirectory" because that's a macro on Windows. - bool CreateFolder() const; - - // Returns true if FilePath describes something in the file-system, - // either a file, directory, or whatever, and that something exists. - bool FileOrDirectoryExists() const; - - // Returns true if pathname describes a directory in the file-system - // that exists. - bool DirectoryExists() const; - - // Returns true if FilePath ends with a path separator, which indicates that - // it is intended to represent a directory. Returns false otherwise. - // This does NOT check that a directory (or file) actually exists. - bool IsDirectory() const; - - // Returns true if pathname describes a root directory. (Windows has one - // root directory per disk drive.) - bool IsRootDirectory() const; - - // Returns true if pathname describes an absolute path. - bool IsAbsolutePath() const; - - private: - // Replaces multiple consecutive separators with a single separator. - // For example, "bar///foo" becomes "bar/foo". Does not eliminate other - // redundancies that might be in a pathname involving "." or "..". - // - // A pathname with multiple consecutive separators may occur either through - // user error or as a result of some scripts or APIs that generate a pathname - // with a trailing separator. On other platforms the same API or script - // may NOT generate a pathname with a trailing "/". Then elsewhere that - // pathname may have another "/" and pathname components added to it, - // without checking for the separator already being there. - // The script language and operating system may allow paths like "foo//bar" - // but some of the functions in FilePath will not handle that correctly. In - // particular, RemoveTrailingPathSeparator() only removes one separator, and - // it is called in CreateDirectoriesRecursively() assuming that it will change - // a pathname from directory syntax (trailing separator) to filename syntax. - - void Normalize(); - - String pathname_; -}; // class FilePath - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-internal.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-internal.h deleted file mode 100644 index 7033b0ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-internal.h +++ /dev/null @@ -1,910 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares functions and macros used internally by -// Google Test. They are subject to change without notice. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ - -#include - -#if GTEST_OS_LINUX -#include -#include -#include -#include -#endif // GTEST_OS_LINUX - -#include -#include -#include -#include -#include - -#include -#include -#include - -// Due to C++ preprocessor weirdness, we need double indirection to -// concatenate two tokens when one of them is __LINE__. Writing -// -// foo ## __LINE__ -// -// will result in the token foo__LINE__, instead of foo followed by -// the current line number. For more details, see -// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 -#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) -#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar - -// Google Test defines the testing::Message class to allow construction of -// test messages via the << operator. The idea is that anything -// streamable to std::ostream can be streamed to a testing::Message. -// This allows a user to use his own types in Google Test assertions by -// overloading the << operator. -// -// util/gtl/stl_logging-inl.h overloads << for STL containers. These -// overloads cannot be defined in the std namespace, as that will be -// undefined behavior. Therefore, they are defined in the global -// namespace instead. -// -// C++'s symbol lookup rule (i.e. Koenig lookup) says that these -// overloads are visible in either the std namespace or the global -// namespace, but not other namespaces, including the testing -// namespace which Google Test's Message class is in. -// -// To allow STL containers (and other types that has a << operator -// defined in the global namespace) to be used in Google Test assertions, -// testing::Message must access the custom << operator from the global -// namespace. Hence this helper function. -// -// Note: Jeffrey Yasskin suggested an alternative fix by "using -// ::operator<<;" in the definition of Message's operator<<. That fix -// doesn't require a helper function, but unfortunately doesn't -// compile with MSVC. -template -inline void GTestStreamToHelper(std::ostream* os, const T& val) { - *os << val; -} - -namespace testing { - -// Forward declaration of classes. - -class AssertionResult; // Result of an assertion. -class Message; // Represents a failure message. -class Test; // Represents a test. -class TestInfo; // Information about a test. -class TestPartResult; // Result of a test part. -class UnitTest; // A collection of test cases. - -namespace internal { - -struct TraceInfo; // Information about a trace point. -class ScopedTrace; // Implements scoped trace. -class TestInfoImpl; // Opaque implementation of TestInfo -class UnitTestImpl; // Opaque implementation of UnitTest -template class Vector; // A generic vector. - -// How many times InitGoogleTest() has been called. -extern int g_init_gtest_count; - -// The text used in failure messages to indicate the start of the -// stack trace. -extern const char kStackTraceMarker[]; - -// A secret type that Google Test users don't know about. It has no -// definition on purpose. Therefore it's impossible to create a -// Secret object, which is what we want. -class Secret; - -// Two overloaded helpers for checking at compile time whether an -// expression is a null pointer literal (i.e. NULL or any 0-valued -// compile-time integral constant). Their return values have -// different sizes, so we can use sizeof() to test which version is -// picked by the compiler. These helpers have no implementations, as -// we only need their signatures. -// -// Given IsNullLiteralHelper(x), the compiler will pick the first -// version if x can be implicitly converted to Secret*, and pick the -// second version otherwise. Since Secret is a secret and incomplete -// type, the only expression a user can write that has type Secret* is -// a null pointer literal. Therefore, we know that x is a null -// pointer literal if and only if the first version is picked by the -// compiler. -char IsNullLiteralHelper(Secret* p); -char (&IsNullLiteralHelper(...))[2]; // NOLINT - -// A compile-time bool constant that is true if and only if x is a -// null pointer literal (i.e. NULL or any 0-valued compile-time -// integral constant). -#ifdef GTEST_ELLIPSIS_NEEDS_COPY_ -// Passing non-POD classes through ellipsis (...) crashes the ARM -// compiler. The Nokia Symbian and the IBM XL C/C++ compiler try to -// instantiate a copy constructor for objects passed through ellipsis -// (...), failing for uncopyable objects. Hence we define this to -// false (and lose support for NULL detection). -#define GTEST_IS_NULL_LITERAL_(x) false -#else -#define GTEST_IS_NULL_LITERAL_(x) \ - (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1) -#endif // GTEST_ELLIPSIS_NEEDS_COPY_ - -// Appends the user-supplied message to the Google-Test-generated message. -String AppendUserMessage(const String& gtest_msg, - const Message& user_msg); - -// A helper class for creating scoped traces in user programs. -class ScopedTrace { - public: - // The c'tor pushes the given source file location and message onto - // a trace stack maintained by Google Test. - ScopedTrace(const char* file, int line, const Message& message); - - // The d'tor pops the info pushed by the c'tor. - // - // Note that the d'tor is not virtual in order to be efficient. - // Don't inherit from ScopedTrace! - ~ScopedTrace(); - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace); -} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its - // c'tor and d'tor. Therefore it doesn't - // need to be used otherwise. - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". -// Declared here but defined in gtest.h, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable); - -// Formats a value to be used in a failure message. - -#ifdef GTEST_NEEDS_IS_POINTER_ - -// These are needed as the Nokia Symbian and IBM XL C/C++ compilers -// cannot decide between const T& and const T* in a function template. -// These compilers _can_ decide between class template specializations -// for T and T*, so a tr1::type_traits-like is_pointer works, and we -// can overload on that. - -// This overload makes sure that all pointers (including -// those to char or wchar_t) are printed as raw pointers. -template -inline String FormatValueForFailureMessage(internal::true_type /*dummy*/, - T* pointer) { - return StreamableToString(static_cast(pointer)); -} - -template -inline String FormatValueForFailureMessage(internal::false_type /*dummy*/, - const T& value) { - return StreamableToString(value); -} - -template -inline String FormatForFailureMessage(const T& value) { - return FormatValueForFailureMessage( - typename internal::is_pointer::type(), value); -} - -#else - -// These are needed as the above solution using is_pointer has the -// limitation that T cannot be a type without external linkage, when -// compiled using MSVC. - -template -inline String FormatForFailureMessage(const T& value) { - return StreamableToString(value); -} - -// This overload makes sure that all pointers (including -// those to char or wchar_t) are printed as raw pointers. -template -inline String FormatForFailureMessage(T* pointer) { - return StreamableToString(static_cast(pointer)); -} - -#endif // GTEST_NEEDS_IS_POINTER_ - -// These overloaded versions handle narrow and wide characters. -String FormatForFailureMessage(char ch); -String FormatForFailureMessage(wchar_t wchar); - -// When this operand is a const char* or char*, and the other operand -// is a ::std::string or ::string, we print this operand as a C string -// rather than a pointer. We do the same for wide strings. - -// This internal macro is used to avoid duplicated code. -#define GTEST_FORMAT_IMPL_(operand2_type, operand1_printer)\ -inline String FormatForComparisonFailureMessage(\ - operand2_type::value_type* str, const operand2_type& /*operand2*/) {\ - return operand1_printer(str);\ -}\ -inline String FormatForComparisonFailureMessage(\ - const operand2_type::value_type* str, const operand2_type& /*operand2*/) {\ - return operand1_printer(str);\ -} - -#if GTEST_HAS_STD_STRING -GTEST_FORMAT_IMPL_(::std::string, String::ShowCStringQuoted) -#endif // GTEST_HAS_STD_STRING -#if GTEST_HAS_STD_WSTRING -GTEST_FORMAT_IMPL_(::std::wstring, String::ShowWideCStringQuoted) -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_STRING -GTEST_FORMAT_IMPL_(::string, String::ShowCStringQuoted) -#endif // GTEST_HAS_GLOBAL_STRING -#if GTEST_HAS_GLOBAL_WSTRING -GTEST_FORMAT_IMPL_(::wstring, String::ShowWideCStringQuoted) -#endif // GTEST_HAS_GLOBAL_WSTRING - -#undef GTEST_FORMAT_IMPL_ - -// Constructs and returns the message for an equality assertion -// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. -// -// The first four parameters are the expressions used in the assertion -// and their values, as strings. For example, for ASSERT_EQ(foo, bar) -// where foo is 5 and bar is 6, we have: -// -// expected_expression: "foo" -// actual_expression: "bar" -// expected_value: "5" -// actual_value: "6" -// -// The ignoring_case parameter is true iff the assertion is a -// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will -// be inserted into the message. -AssertionResult EqFailure(const char* expected_expression, - const char* actual_expression, - const String& expected_value, - const String& actual_value, - bool ignoring_case); - - -// This template class represents an IEEE floating-point number -// (either single-precision or double-precision, depending on the -// template parameters). -// -// The purpose of this class is to do more sophisticated number -// comparison. (Due to round-off error, etc, it's very unlikely that -// two floating-points will be equal exactly. Hence a naive -// comparison by the == operation often doesn't work.) -// -// Format of IEEE floating-point: -// -// The most-significant bit being the leftmost, an IEEE -// floating-point looks like -// -// sign_bit exponent_bits fraction_bits -// -// Here, sign_bit is a single bit that designates the sign of the -// number. -// -// For float, there are 8 exponent bits and 23 fraction bits. -// -// For double, there are 11 exponent bits and 52 fraction bits. -// -// More details can be found at -// http://en.wikipedia.org/wiki/IEEE_floating-point_standard. -// -// Template parameter: -// -// RawType: the raw floating-point type (either float or double) -template -class FloatingPoint { - public: - // Defines the unsigned integer type that has the same size as the - // floating point number. - typedef typename TypeWithSize::UInt Bits; - - // Constants. - - // # of bits in a number. - static const size_t kBitCount = 8*sizeof(RawType); - - // # of fraction bits in a number. - static const size_t kFractionBitCount = - std::numeric_limits::digits - 1; - - // # of exponent bits in a number. - static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount; - - // The mask for the sign bit. - static const Bits kSignBitMask = static_cast(1) << (kBitCount - 1); - - // The mask for the fraction bits. - static const Bits kFractionBitMask = - ~static_cast(0) >> (kExponentBitCount + 1); - - // The mask for the exponent bits. - static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask); - - // How many ULP's (Units in the Last Place) we want to tolerate when - // comparing two numbers. The larger the value, the more error we - // allow. A 0 value means that two numbers must be exactly the same - // to be considered equal. - // - // The maximum error of a single floating-point operation is 0.5 - // units in the last place. On Intel CPU's, all floating-point - // calculations are done with 80-bit precision, while double has 64 - // bits. Therefore, 4 should be enough for ordinary use. - // - // See the following article for more details on ULP: - // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm. - static const size_t kMaxUlps = 4; - - // Constructs a FloatingPoint from a raw floating-point number. - // - // On an Intel CPU, passing a non-normalized NAN (Not a Number) - // around may change its bits, although the new value is guaranteed - // to be also a NAN. Therefore, don't expect this constructor to - // preserve the bits in x when x is a NAN. - explicit FloatingPoint(const RawType& x) { u_.value_ = x; } - - // Static methods - - // Reinterprets a bit pattern as a floating-point number. - // - // This function is needed to test the AlmostEquals() method. - static RawType ReinterpretBits(const Bits bits) { - FloatingPoint fp(0); - fp.u_.bits_ = bits; - return fp.u_.value_; - } - - // Returns the floating-point number that represent positive infinity. - static RawType Infinity() { - return ReinterpretBits(kExponentBitMask); - } - - // Non-static methods - - // Returns the bits that represents this number. - const Bits &bits() const { return u_.bits_; } - - // Returns the exponent bits of this number. - Bits exponent_bits() const { return kExponentBitMask & u_.bits_; } - - // Returns the fraction bits of this number. - Bits fraction_bits() const { return kFractionBitMask & u_.bits_; } - - // Returns the sign bit of this number. - Bits sign_bit() const { return kSignBitMask & u_.bits_; } - - // Returns true iff this is NAN (not a number). - bool is_nan() const { - // It's a NAN if the exponent bits are all ones and the fraction - // bits are not entirely zeros. - return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); - } - - // Returns true iff this number is at most kMaxUlps ULP's away from - // rhs. In particular, this function: - // - // - returns false if either number is (or both are) NAN. - // - treats really large numbers as almost equal to infinity. - // - thinks +0.0 and -0.0 are 0 DLP's apart. - bool AlmostEquals(const FloatingPoint& rhs) const { - // The IEEE standard says that any comparison operation involving - // a NAN must return false. - if (is_nan() || rhs.is_nan()) return false; - - return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) - <= kMaxUlps; - } - - private: - // The data type used to store the actual floating-point number. - union FloatingPointUnion { - RawType value_; // The raw floating-point number. - Bits bits_; // The bits that represent the number. - }; - - // Converts an integer from the sign-and-magnitude representation to - // the biased representation. More precisely, let N be 2 to the - // power of (kBitCount - 1), an integer x is represented by the - // unsigned number x + N. - // - // For instance, - // - // -N + 1 (the most negative number representable using - // sign-and-magnitude) is represented by 1; - // 0 is represented by N; and - // N - 1 (the biggest number representable using - // sign-and-magnitude) is represented by 2N - 1. - // - // Read http://en.wikipedia.org/wiki/Signed_number_representations - // for more details on signed number representations. - static Bits SignAndMagnitudeToBiased(const Bits &sam) { - if (kSignBitMask & sam) { - // sam represents a negative number. - return ~sam + 1; - } else { - // sam represents a positive number. - return kSignBitMask | sam; - } - } - - // Given two numbers in the sign-and-magnitude representation, - // returns the distance between them as an unsigned number. - static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, - const Bits &sam2) { - const Bits biased1 = SignAndMagnitudeToBiased(sam1); - const Bits biased2 = SignAndMagnitudeToBiased(sam2); - return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1); - } - - FloatingPointUnion u_; -}; - -// Typedefs the instances of the FloatingPoint template class that we -// care to use. -typedef FloatingPoint Float; -typedef FloatingPoint Double; - -// In order to catch the mistake of putting tests that use different -// test fixture classes in the same test case, we need to assign -// unique IDs to fixture classes and compare them. The TypeId type is -// used to hold such IDs. The user should treat TypeId as an opaque -// type: the only operation allowed on TypeId values is to compare -// them for equality using the == operator. -typedef const void* TypeId; - -template -class TypeIdHelper { - public: - // dummy_ must not have a const type. Otherwise an overly eager - // compiler (e.g. MSVC 7.1 & 8.0) may try to merge - // TypeIdHelper::dummy_ for different Ts as an "optimization". - static bool dummy_; -}; - -template -bool TypeIdHelper::dummy_ = false; - -// GetTypeId() returns the ID of type T. Different values will be -// returned for different types. Calling the function twice with the -// same type argument is guaranteed to return the same ID. -template -TypeId GetTypeId() { - // The compiler is required to allocate a different - // TypeIdHelper::dummy_ variable for each T used to instantiate - // the template. Therefore, the address of dummy_ is guaranteed to - // be unique. - return &(TypeIdHelper::dummy_); -} - -// Returns the type ID of ::testing::Test. Always call this instead -// of GetTypeId< ::testing::Test>() to get the type ID of -// ::testing::Test, as the latter may give the wrong result due to a -// suspected linker bug when compiling Google Test as a Mac OS X -// framework. -TypeId GetTestTypeId(); - -// Defines the abstract factory interface that creates instances -// of a Test object. -class TestFactoryBase { - public: - virtual ~TestFactoryBase() {} - - // Creates a test instance to run. The instance is both created and destroyed - // within TestInfoImpl::Run() - virtual Test* CreateTest() = 0; - - protected: - TestFactoryBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); -}; - -// This class provides implementation of TeastFactoryBase interface. -// It is used in TEST and TEST_F macros. -template -class TestFactoryImpl : public TestFactoryBase { - public: - virtual Test* CreateTest() { return new TestClass; } -}; - -#if GTEST_OS_WINDOWS - -// Predicate-formatters for implementing the HRESULT checking macros -// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED} -// We pass a long instead of HRESULT to avoid causing an -// include dependency for the HRESULT type. -AssertionResult IsHRESULTSuccess(const char* expr, long hr); // NOLINT -AssertionResult IsHRESULTFailure(const char* expr, long hr); // NOLINT - -#endif // GTEST_OS_WINDOWS - -// Formats a source file path and a line number as they would appear -// in a compiler error message. -inline String FormatFileLocation(const char* file, int line) { - const char* const file_name = file == NULL ? "unknown file" : file; - if (line < 0) { - return String::Format("%s:", file_name); - } -#ifdef _MSC_VER - return String::Format("%s(%d):", file_name, line); -#else - return String::Format("%s:%d:", file_name, line); -#endif // _MSC_VER -} - -// Types of SetUpTestCase() and TearDownTestCase() functions. -typedef void (*SetUpTestCaseFunc)(); -typedef void (*TearDownTestCaseFunc)(); - -// Creates a new TestInfo object and registers it with Google Test; -// returns the created object. -// -// Arguments: -// -// test_case_name: name of the test case -// name: name of the test -// test_case_comment: a comment on the test case that will be included in -// the test output -// comment: a comment on the test that will be included in the -// test output -// fixture_class_id: ID of the test fixture class -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -// factory: pointer to the factory that creates a test object. -// The newly created TestInfo instance will assume -// ownership of the factory object. -TestInfo* MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - TypeId fixture_class_id, - SetUpTestCaseFunc set_up_tc, - TearDownTestCaseFunc tear_down_tc, - TestFactoryBase* factory); - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// State of the definition of a type-parameterized test case. -class TypedTestCasePState { - public: - TypedTestCasePState() : registered_(false) {} - - // Adds the given test name to defined_test_names_ and return true - // if the test case hasn't been registered; otherwise aborts the - // program. - bool AddTestName(const char* file, int line, const char* case_name, - const char* test_name) { - if (registered_) { - fprintf(stderr, "%s Test %s must be defined before " - "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n", - FormatFileLocation(file, line).c_str(), test_name, case_name); - fflush(stderr); - posix::Abort(); - } - defined_test_names_.insert(test_name); - return true; - } - - // Verifies that registered_tests match the test names in - // defined_test_names_; returns registered_tests if successful, or - // aborts the program otherwise. - const char* VerifyRegisteredTestNames( - const char* file, int line, const char* registered_tests); - - private: - bool registered_; - ::std::set defined_test_names_; -}; - -// Skips to the first non-space char after the first comma in 'str'; -// returns NULL if no comma is found in 'str'. -inline const char* SkipComma(const char* str) { - const char* comma = strchr(str, ','); - if (comma == NULL) { - return NULL; - } - while (isspace(*(++comma))) {} - return comma; -} - -// Returns the prefix of 'str' before the first comma in it; returns -// the entire string if it contains no comma. -inline String GetPrefixUntilComma(const char* str) { - const char* comma = strchr(str, ','); - return comma == NULL ? String(str) : String(str, comma - str); -} - -// TypeParameterizedTest::Register() -// registers a list of type-parameterized tests with Google Test. The -// return value is insignificant - we just need to return something -// such that we can call this function in a namespace scope. -// -// Implementation note: The GTEST_TEMPLATE_ macro declares a template -// template parameter. It's defined in gtest-type-util.h. -template -class TypeParameterizedTest { - public: - // 'index' is the index of the test in the type list 'Types' - // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase, - // Types). Valid values for 'index' are [0, N - 1] where N is the - // length of Types. - static bool Register(const char* prefix, const char* case_name, - const char* test_names, int index) { - typedef typename Types::Head Type; - typedef Fixture FixtureClass; - typedef typename GTEST_BIND_(TestSel, Type) TestClass; - - // First, registers the first type-parameterized test in the type - // list. - MakeAndRegisterTestInfo( - String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/", - case_name, index).c_str(), - GetPrefixUntilComma(test_names).c_str(), - String::Format("TypeParam = %s", GetTypeName().c_str()).c_str(), - "", - GetTypeId(), - TestClass::SetUpTestCase, - TestClass::TearDownTestCase, - new TestFactoryImpl); - - // Next, recurses (at compile time) with the tail of the type list. - return TypeParameterizedTest - ::Register(prefix, case_name, test_names, index + 1); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTest { - public: - static bool Register(const char* /*prefix*/, const char* /*case_name*/, - const char* /*test_names*/, int /*index*/) { - return true; - } -}; - -// TypeParameterizedTestCase::Register() -// registers *all combinations* of 'Tests' and 'Types' with Google -// Test. The return value is insignificant - we just need to return -// something such that we can call this function in a namespace scope. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* prefix, const char* case_name, - const char* test_names) { - typedef typename Tests::Head Head; - - // First, register the first test in 'Test' for each type in 'Types'. - TypeParameterizedTest::Register( - prefix, case_name, test_names, 0); - - // Next, recurses (at compile time) with the tail of the test list. - return TypeParameterizedTestCase - ::Register(prefix, case_name, SkipComma(test_names)); - } -}; - -// The base case for the compile time recursion. -template -class TypeParameterizedTestCase { - public: - static bool Register(const char* /*prefix*/, const char* /*case_name*/, - const char* /*test_names*/) { - return true; - } -}; - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in -// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, int skip_count); - -// Helpers for suppressing warnings on unreachable code or constant -// condition. - -// Always returns true. -bool AlwaysTrue(); - -// Always returns false. -inline bool AlwaysFalse() { return !AlwaysTrue(); } - -// A simple Linear Congruential Generator for generating random -// numbers with a uniform distribution. Unlike rand() and srand(), it -// doesn't use global state (and therefore can't interfere with user -// code). Unlike rand_r(), it's portable. An LCG isn't very random, -// but it's good enough for our purposes. -class Random { - public: - static const UInt32 kMaxRange = 1u << 31; - - explicit Random(UInt32 seed) : state_(seed) {} - - void Reseed(UInt32 seed) { state_ = seed; } - - // Generates a random number from [0, range). Crashes if 'range' is - // 0 or greater than kMaxRange. - UInt32 Generate(UInt32 range); - - private: - UInt32 state_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Random); -}; - -} // namespace internal -} // namespace testing - -#define GTEST_MESSAGE_(message, result_type) \ - ::testing::internal::AssertHelper(result_type, __FILE__, __LINE__, message) \ - = ::testing::Message() - -#define GTEST_FATAL_FAILURE_(message) \ - return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure) - -#define GTEST_NONFATAL_FAILURE_(message) \ - GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure) - -#define GTEST_SUCCESS_(message) \ - GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess) - -// Suppresses MSVC warnings 4072 (unreachable code) for the code following -// statement if it returns or throws (or doesn't return or throw in some -// situations). -#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \ - if (::testing::internal::AlwaysTrue()) { statement; } - -#define GTEST_TEST_THROW_(statement, expected_exception, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - bool gtest_caught_expected = false; \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (expected_exception const&) { \ - gtest_caught_expected = true; \ - } \ - catch (...) { \ - gtest_msg = "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws a different " \ - "type."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - if (!gtest_caught_expected) { \ - gtest_msg = "Expected: " #statement " throws an exception of type " \ - #expected_exception ".\n Actual: it throws nothing."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \ - fail(gtest_msg) - -#define GTEST_TEST_NO_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (...) { \ - gtest_msg = "Expected: " #statement " doesn't throw an exception.\n" \ - " Actual: it throws."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \ - fail(gtest_msg) - -#define GTEST_TEST_ANY_THROW_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - bool gtest_caught_any = false; \ - try { \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - } \ - catch (...) { \ - gtest_caught_any = true; \ - } \ - if (!gtest_caught_any) { \ - gtest_msg = "Expected: " #statement " throws an exception.\n" \ - " Actual: it doesn't."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \ - fail(gtest_msg) - - -#define GTEST_TEST_BOOLEAN_(boolexpr, booltext, actual, expected, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::IsTrue(boolexpr)) \ - ; \ - else \ - fail("Value of: " booltext "\n Actual: " #actual "\nExpected: " #expected) - -#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (const char* gtest_msg = "") { \ - ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ - if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ - gtest_msg = "Expected: " #statement " doesn't generate new fatal " \ - "failures in the current thread.\n" \ - " Actual: it does."; \ - goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ - } \ - } else \ - GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \ - fail(gtest_msg) - -// Expands to the name of the class that implements the given test. -#define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ - test_case_name##_##test_name##_Test - -// Helper macro for defining tests. -#define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\ -class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\ - public:\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\ - private:\ - virtual void TestBody();\ - static ::testing::TestInfo* const test_info_;\ - GTEST_DISALLOW_COPY_AND_ASSIGN_(\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\ -};\ -\ -::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\ - ::test_info_ =\ - ::testing::internal::MakeAndRegisterTestInfo(\ - #test_case_name, #test_name, "", "", \ - (parent_id), \ - parent_class::SetUpTestCase, \ - parent_class::TearDownTestCase, \ - new ::testing::internal::TestFactoryImpl<\ - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ -void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-linked_ptr.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-linked_ptr.h deleted file mode 100644 index f98af0b1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-linked_ptr.h +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2003 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). -// -// Bill Gibbons suggested we use something like this. -// -// Thread Safety: -// Unlike other linked_ptr implementations, in this implementation -// a linked_ptr object is thread-safe in the sense that: -// - it's safe to copy linked_ptr objects concurrently, -// - it's safe to copy *from* a linked_ptr and read its underlying -// raw pointer (e.g. via get()) concurrently, and -// - it's safe to write to two linked_ptrs that point to the same -// shared object concurrently. -// TODO(wan@google.com): rename this to safe_linked_ptr to avoid -// confusion with normal linked_ptr. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ - -#include -#include - -#include - -namespace testing { -namespace internal { - -// Protects copying of all linked_ptr objects. -extern Mutex g_linked_ptr_mutex; - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Many linked_ptr operations may change p.link_ for some linked_ptr - // variable p in the same circle as this object. Therefore we need - // to prevent two such operations from occurring concurrently. - // - // Note that different types of linked_ptr objects can coexist in a - // circle (e.g. linked_ptr, linked_ptr, and - // linked_ptr). Therefore we must use a single mutex to - // protect all linked_ptr objects. This can create serious - // contention in production code, but is acceptable in a testing - // framework. - - // Join an existing circle. - // L < g_linked_ptr_mutex - void join(linked_ptr_internal const* ptr) { - MutexLock lock(&g_linked_ptr_mutex); - - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true if we were the - // last member of the circle. Once this is done, you can join() another. - // L < g_linked_ptr_mutex - bool depart() { - MutexLock lock(&g_linked_ptr_mutex); - - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { // NOLINT - assert(&ptr != this); - copy(&ptr); - } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { - depart(); - capture(ptr); - } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - // Release ownership of the pointed object and returns it. - // Sole ownership by this linked_ptr object is required. - T* release() { - bool last = link_.depart(); - assert(last); - T* v = value_; - value_ = NULL; - return v; - } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h deleted file mode 100644 index 1358c329..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h +++ /dev/null @@ -1,4803 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently Google Test supports at most 50 arguments in Values, -// and at most 10 arguments in Combine. Please contact -// googletestframework@googlegroups.com if you need more. -// Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is -// currently set at 10. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -#include - -namespace testing { -namespace internal { - -// Used in the Values() function to provide polymorphic capabilities. -template -class ValueArray1 { - public: - explicit ValueArray1(T1 v1) : v1_(v1) {} - - template - operator ParamGenerator() const { return ValuesIn(&v1_, &v1_ + 1); } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray1& other); - - const T1 v1_; -}; - -template -class ValueArray2 { - public: - ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray2& other); - - const T1 v1_; - const T2 v2_; -}; - -template -class ValueArray3 { - public: - ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray3& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; -}; - -template -class ValueArray4 { - public: - ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray4& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; -}; - -template -class ValueArray5 { - public: - ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray5& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; -}; - -template -class ValueArray6 { - public: - ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray6& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; -}; - -template -class ValueArray7 { - public: - ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray7& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; -}; - -template -class ValueArray8 { - public: - ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, - T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray8& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; -}; - -template -class ValueArray9 { - public: - ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, - T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray9& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; -}; - -template -class ValueArray10 { - public: - ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray10& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; -}; - -template -class ValueArray11 { - public: - ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray11& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; -}; - -template -class ValueArray12 { - public: - ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray12& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; -}; - -template -class ValueArray13 { - public: - ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray13& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; -}; - -template -class ValueArray14 { - public: - ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray14& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; -}; - -template -class ValueArray15 { - public: - ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray15& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; -}; - -template -class ValueArray16 { - public: - ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray16& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; -}; - -template -class ValueArray17 { - public: - ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, - T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray17& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; -}; - -template -class ValueArray18 { - public: - ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray18& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; -}; - -template -class ValueArray19 { - public: - ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray19& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; -}; - -template -class ValueArray20 { - public: - ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray20& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; -}; - -template -class ValueArray21 { - public: - ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray21& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; -}; - -template -class ValueArray22 { - public: - ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray22& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; -}; - -template -class ValueArray23 { - public: - ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, - v23_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray23& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; -}; - -template -class ValueArray24 { - public: - ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray24& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; -}; - -template -class ValueArray25 { - public: - ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, - T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray25& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; -}; - -template -class ValueArray26 { - public: - ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray26& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; -}; - -template -class ValueArray27 { - public: - ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray27& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; -}; - -template -class ValueArray28 { - public: - ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray28& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; -}; - -template -class ValueArray29 { - public: - ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray29& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; -}; - -template -class ValueArray30 { - public: - ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray30& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; -}; - -template -class ValueArray31 { - public: - ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray31& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; -}; - -template -class ValueArray32 { - public: - ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray32& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; -}; - -template -class ValueArray33 { - public: - ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, - T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray33& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; -}; - -template -class ValueArray34 { - public: - ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray34& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; -}; - -template -class ValueArray35 { - public: - ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, - v35_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray35& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; -}; - -template -class ValueArray36 { - public: - ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray36& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; -}; - -template -class ValueArray37 { - public: - ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray37& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; -}; - -template -class ValueArray38 { - public: - ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray38& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; -}; - -template -class ValueArray39 { - public: - ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray39& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; -}; - -template -class ValueArray40 { - public: - ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray40& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; -}; - -template -class ValueArray41 { - public: - ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, - T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray41& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; -}; - -template -class ValueArray42 { - public: - ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray42& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; -}; - -template -class ValueArray43 { - public: - ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), - v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), - v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), - v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), - v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), - v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), - v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray43& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; -}; - -template -class ValueArray44 { - public: - ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), - v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), - v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), - v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), - v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), - v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), - v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), - v43_(v43), v44_(v44) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray44& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; -}; - -template -class ValueArray45 { - public: - ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), - v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), - v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), - v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), - v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), - v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), - v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), - v42_(v42), v43_(v43), v44_(v44), v45_(v45) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray45& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; -}; - -template -class ValueArray46 { - public: - ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3), - v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray46& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; -}; - -template -class ValueArray47 { - public: - ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2), - v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), - v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), - v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), - v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), - v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), - v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), - v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46), - v47_(v47) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, - v47_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray47& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; -}; - -template -class ValueArray48 { - public: - ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1), - v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), - v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), - v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), - v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), - v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), - v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), - v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), - v46_(v46), v47_(v47), v48_(v48) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray48& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; -}; - -template -class ValueArray49 { - public: - ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, - T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_, v49_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray49& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; -}; - -template -class ValueArray50 { - public: - ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, - T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, - T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, - T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, - T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, - T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49, - T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), - v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), - v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), - v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), - v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), - v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), - v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), - v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {} - - template - operator ParamGenerator() const { - const T array[] = {v1_, v2_, v3_, v4_, v5_, v6_, v7_, v8_, v9_, v10_, v11_, - v12_, v13_, v14_, v15_, v16_, v17_, v18_, v19_, v20_, v21_, v22_, v23_, - v24_, v25_, v26_, v27_, v28_, v29_, v30_, v31_, v32_, v33_, v34_, v35_, - v36_, v37_, v38_, v39_, v40_, v41_, v42_, v43_, v44_, v45_, v46_, v47_, - v48_, v49_, v50_}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray50& other); - - const T1 v1_; - const T2 v2_; - const T3 v3_; - const T4 v4_; - const T5 v5_; - const T6 v6_; - const T7 v7_; - const T8 v8_; - const T9 v9_; - const T10 v10_; - const T11 v11_; - const T12 v12_; - const T13 v13_; - const T14 v14_; - const T15 v15_; - const T16 v16_; - const T17 v17_; - const T18 v18_; - const T19 v19_; - const T20 v20_; - const T21 v21_; - const T22 v22_; - const T23 v23_; - const T24 v24_; - const T25 v25_; - const T26 v26_; - const T27 v27_; - const T28 v28_; - const T29 v29_; - const T30 v30_; - const T31 v31_; - const T32 v32_; - const T33 v33_; - const T34 v34_; - const T35 v35_; - const T36 v36_; - const T37 v37_; - const T38 v38_; - const T39 v39_; - const T40 v40_; - const T41 v41_; - const T42 v42_; - const T43 v43_; - const T44 v44_; - const T45 v45_; - const T46 v46_; - const T47 v47_; - const T48 v48_; - const T49 v49_; - const T50 v50_; -}; - -#if GTEST_HAS_COMBINE -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Generates values from the Cartesian product of values produced -// by the argument generators. -// -template -class CartesianProductGenerator2 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator2(const ParamGenerator& g1, - const ParamGenerator& g2) - : g1_(g1), g2_(g2) {} - virtual ~CartesianProductGenerator2() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current2_; - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - ParamType current_value_; - }; // class CartesianProductGenerator2::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator2& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; -}; // class CartesianProductGenerator2 - - -template -class CartesianProductGenerator3 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator3(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - virtual ~CartesianProductGenerator3() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current3_; - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - ParamType current_value_; - }; // class CartesianProductGenerator3::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator3& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; -}; // class CartesianProductGenerator3 - - -template -class CartesianProductGenerator4 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator4(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - virtual ~CartesianProductGenerator4() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current4_; - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - ParamType current_value_; - }; // class CartesianProductGenerator4::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator4& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; -}; // class CartesianProductGenerator4 - - -template -class CartesianProductGenerator5 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator5(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - virtual ~CartesianProductGenerator5() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current5_; - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - ParamType current_value_; - }; // class CartesianProductGenerator5::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator5& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; -}; // class CartesianProductGenerator5 - - -template -class CartesianProductGenerator6 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator6(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - virtual ~CartesianProductGenerator6() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current6_; - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - ParamType current_value_; - }; // class CartesianProductGenerator6::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator6& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; -}; // class CartesianProductGenerator6 - - -template -class CartesianProductGenerator7 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator7(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - virtual ~CartesianProductGenerator7() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current7_; - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - ParamType current_value_; - }; // class CartesianProductGenerator7::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator7& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; -}; // class CartesianProductGenerator7 - - -template -class CartesianProductGenerator8 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator8(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - virtual ~CartesianProductGenerator8() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current8_; - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - ParamType current_value_; - }; // class CartesianProductGenerator8::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator8& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; -}; // class CartesianProductGenerator8 - - -template -class CartesianProductGenerator9 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator9(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - virtual ~CartesianProductGenerator9() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current9_; - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - ParamType current_value_; - }; // class CartesianProductGenerator9::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator9& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; -}; // class CartesianProductGenerator9 - - -template -class CartesianProductGenerator10 - : public ParamGeneratorInterface< ::std::tr1::tuple > { - public: - typedef ::std::tr1::tuple ParamType; - - CartesianProductGenerator10(const ParamGenerator& g1, - const ParamGenerator& g2, const ParamGenerator& g3, - const ParamGenerator& g4, const ParamGenerator& g5, - const ParamGenerator& g6, const ParamGenerator& g7, - const ParamGenerator& g8, const ParamGenerator& g9, - const ParamGenerator& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - virtual ~CartesianProductGenerator10() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, - g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, - g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), - g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, - g8_.end(), g9_, g9_.end(), g10_, g10_.end()); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - const ParamGenerator& g1, - const typename ParamGenerator::iterator& current1, - const ParamGenerator& g2, - const typename ParamGenerator::iterator& current2, - const ParamGenerator& g3, - const typename ParamGenerator::iterator& current3, - const ParamGenerator& g4, - const typename ParamGenerator::iterator& current4, - const ParamGenerator& g5, - const typename ParamGenerator::iterator& current5, - const ParamGenerator& g6, - const typename ParamGenerator::iterator& current6, - const ParamGenerator& g7, - const typename ParamGenerator::iterator& current7, - const ParamGenerator& g8, - const typename ParamGenerator::iterator& current8, - const ParamGenerator& g9, - const typename ParamGenerator::iterator& current9, - const ParamGenerator& g10, - const typename ParamGenerator::iterator& current10) - : base_(base), - begin1_(g1.begin()), end1_(g1.end()), current1_(current1), - begin2_(g2.begin()), end2_(g2.end()), current2_(current2), - begin3_(g3.begin()), end3_(g3.end()), current3_(current3), - begin4_(g4.begin()), end4_(g4.end()), current4_(current4), - begin5_(g5.begin()), end5_(g5.end()), current5_(current5), - begin6_(g6.begin()), end6_(g6.end()), current6_(current6), - begin7_(g7.begin()), end7_(g7.end()), current7_(current7), - begin8_(g8.begin()), end8_(g8.end()), current8_(current8), - begin9_(g9.begin()), end9_(g9.end()), current9_(current9), - begin10_(g10.begin()), end10_(g10.end()), current10_(current10) { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current10_; - if (current10_ == end10_) { - current10_ = begin10_; - ++current9_; - } - if (current9_ == end9_) { - current9_ = begin9_; - ++current8_; - } - if (current8_ == end8_) { - current8_ = begin8_; - ++current7_; - } - if (current7_ == end7_) { - current7_ = begin7_; - ++current6_; - } - if (current6_ == end6_) { - current6_ = begin6_; - ++current5_; - } - if (current5_ == end5_) { - current5_ = begin5_; - ++current4_; - } - if (current4_ == end4_) { - current4_ = begin4_; - ++current3_; - } - if (current3_ == end3_) { - current3_ = begin3_; - ++current2_; - } - if (current2_ == end2_) { - current2_ = begin2_; - ++current1_; - } - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ( - current1_ == typed_other->current1_ && - current2_ == typed_other->current2_ && - current3_ == typed_other->current3_ && - current4_ == typed_other->current4_ && - current5_ == typed_other->current5_ && - current6_ == typed_other->current6_ && - current7_ == typed_other->current7_ && - current8_ == typed_other->current8_ && - current9_ == typed_other->current9_ && - current10_ == typed_other->current10_); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), - begin1_(other.begin1_), - end1_(other.end1_), - current1_(other.current1_), - begin2_(other.begin2_), - end2_(other.end2_), - current2_(other.current2_), - begin3_(other.begin3_), - end3_(other.end3_), - current3_(other.current3_), - begin4_(other.begin4_), - end4_(other.end4_), - current4_(other.current4_), - begin5_(other.begin5_), - end5_(other.end5_), - current5_(other.current5_), - begin6_(other.begin6_), - end6_(other.end6_), - current6_(other.current6_), - begin7_(other.begin7_), - end7_(other.end7_), - current7_(other.current7_), - begin8_(other.begin8_), - end8_(other.end8_), - current8_(other.current8_), - begin9_(other.begin9_), - end9_(other.end9_), - current9_(other.current9_), - begin10_(other.begin10_), - end10_(other.end10_), - current10_(other.current10_) { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType(*current1_, *current2_, *current3_, - *current4_, *current5_, *current6_, *current7_, *current8_, - *current9_, *current10_); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return - current1_ == end1_ || - current2_ == end2_ || - current3_ == end3_ || - current4_ == end4_ || - current5_ == end5_ || - current6_ == end6_ || - current7_ == end7_ || - current8_ == end8_ || - current9_ == end9_ || - current10_ == end10_; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. - const typename ParamGenerator::iterator begin1_; - const typename ParamGenerator::iterator end1_; - typename ParamGenerator::iterator current1_; - const typename ParamGenerator::iterator begin2_; - const typename ParamGenerator::iterator end2_; - typename ParamGenerator::iterator current2_; - const typename ParamGenerator::iterator begin3_; - const typename ParamGenerator::iterator end3_; - typename ParamGenerator::iterator current3_; - const typename ParamGenerator::iterator begin4_; - const typename ParamGenerator::iterator end4_; - typename ParamGenerator::iterator current4_; - const typename ParamGenerator::iterator begin5_; - const typename ParamGenerator::iterator end5_; - typename ParamGenerator::iterator current5_; - const typename ParamGenerator::iterator begin6_; - const typename ParamGenerator::iterator end6_; - typename ParamGenerator::iterator current6_; - const typename ParamGenerator::iterator begin7_; - const typename ParamGenerator::iterator end7_; - typename ParamGenerator::iterator current7_; - const typename ParamGenerator::iterator begin8_; - const typename ParamGenerator::iterator end8_; - typename ParamGenerator::iterator current8_; - const typename ParamGenerator::iterator begin9_; - const typename ParamGenerator::iterator end9_; - typename ParamGenerator::iterator current9_; - const typename ParamGenerator::iterator begin10_; - const typename ParamGenerator::iterator end10_; - typename ParamGenerator::iterator current10_; - ParamType current_value_; - }; // class CartesianProductGenerator10::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator10& other); - - const ParamGenerator g1_; - const ParamGenerator g2_; - const ParamGenerator g3_; - const ParamGenerator g4_; - const ParamGenerator g5_; - const ParamGenerator g6_; - const ParamGenerator g7_; - const ParamGenerator g8_; - const ParamGenerator g9_; - const ParamGenerator g10_; -}; // class CartesianProductGenerator10 - - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Helper classes providing Combine() with polymorphic features. They allow -// casting CartesianProductGeneratorN to ParamGenerator if T is -// convertible to U. -// -template -class CartesianProductHolder2 { - public: -CartesianProductHolder2(const Generator1& g1, const Generator2& g2) - : g1_(g1), g2_(g2) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator2( - static_cast >(g1_), - static_cast >(g2_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder2& other); - - const Generator1 g1_; - const Generator2 g2_; -}; // class CartesianProductHolder2 - -template -class CartesianProductHolder3 { - public: -CartesianProductHolder3(const Generator1& g1, const Generator2& g2, - const Generator3& g3) - : g1_(g1), g2_(g2), g3_(g3) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator3( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder3& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; -}; // class CartesianProductHolder3 - -template -class CartesianProductHolder4 { - public: -CartesianProductHolder4(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator4( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder4& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; -}; // class CartesianProductHolder4 - -template -class CartesianProductHolder5 { - public: -CartesianProductHolder5(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator5( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder5& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; -}; // class CartesianProductHolder5 - -template -class CartesianProductHolder6 { - public: -CartesianProductHolder6(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator6( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder6& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; -}; // class CartesianProductHolder6 - -template -class CartesianProductHolder7 { - public: -CartesianProductHolder7(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator7( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder7& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; -}; // class CartesianProductHolder7 - -template -class CartesianProductHolder8 { - public: -CartesianProductHolder8(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), - g8_(g8) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator8( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder8& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; -}; // class CartesianProductHolder8 - -template -class CartesianProductHolder9 { - public: -CartesianProductHolder9(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator9( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder9& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; -}; // class CartesianProductHolder9 - -template -class CartesianProductHolder10 { - public: -CartesianProductHolder10(const Generator1& g1, const Generator2& g2, - const Generator3& g3, const Generator4& g4, const Generator5& g5, - const Generator6& g6, const Generator7& g7, const Generator8& g8, - const Generator9& g9, const Generator10& g10) - : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), - g9_(g9), g10_(g10) {} - template - operator ParamGenerator< ::std::tr1::tuple >() const { - return ParamGenerator< ::std::tr1::tuple >( - new CartesianProductGenerator10( - static_cast >(g1_), - static_cast >(g2_), - static_cast >(g3_), - static_cast >(g4_), - static_cast >(g5_), - static_cast >(g6_), - static_cast >(g7_), - static_cast >(g8_), - static_cast >(g9_), - static_cast >(g10_))); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder10& other); - - const Generator1 g1_; - const Generator2 g2_; - const Generator3 g3_; - const Generator4 g4_; - const Generator5 g5_; - const Generator6 g6_; - const Generator7 g7_; - const Generator8 g8_; - const Generator9 g9_; - const Generator10 g10_; -}; // class CartesianProductHolder10 - -#endif // GTEST_HAS_COMBINE - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h.pump deleted file mode 100644 index 2da2872a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util-generated.h.pump +++ /dev/null @@ -1,284 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of Values arguments we want to support. -$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. -// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently Google Test supports at most $n arguments in Values, -// and at most $maxtuple arguments in Combine. Please contact -// googletestframework@googlegroups.com if you need more. -// Please note that the number of arguments to Combine is limited -// by the maximum arity of the implementation of tr1::tuple which is -// currently set at $maxtuple. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -#include - -namespace testing { -namespace internal { - -// Used in the Values() function to provide polymorphic capabilities. -template -class ValueArray1 { - public: - explicit ValueArray1(T1 v1) : v1_(v1) {} - - template - operator ParamGenerator() const { return ValuesIn(&v1_, &v1_ + 1); } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray1& other); - - const T1 v1_; -}; - -$range i 2..n -$for i [[ -$range j 1..i - -template <$for j, [[typename T$j]]> -class ValueArray$i { - public: - ValueArray$i($for j, [[T$j v$j]]) : $for j, [[v$(j)_(v$j)]] {} - - template - operator ParamGenerator() const { - const T array[] = {$for j, [[v$(j)_]]}; - return ValuesIn(array); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const ValueArray$i& other); - -$for j [[ - - const T$j v$(j)_; -]] - -}; - -]] - -#if GTEST_HAS_COMBINE -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Generates values from the Cartesian product of values produced -// by the argument generators. -// -$range i 2..maxtuple -$for i [[ -$range j 1..i -$range k 2..i - -template <$for j, [[typename T$j]]> -class CartesianProductGenerator$i - : public ParamGeneratorInterface< ::std::tr1::tuple<$for j, [[T$j]]> > { - public: - typedef ::std::tr1::tuple<$for j, [[T$j]]> ParamType; - - CartesianProductGenerator$i($for j, [[const ParamGenerator& g$j]]) - : $for j, [[g$(j)_(g$j)]] {} - virtual ~CartesianProductGenerator$i() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, $for j, [[g$(j)_, g$(j)_.begin()]]); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, $for j, [[g$(j)_, g$(j)_.end()]]); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, $for j, [[ - - const ParamGenerator& g$j, - const typename ParamGenerator::iterator& current$(j)]]) - : base_(base), -$for j, [[ - - begin$(j)_(g$j.begin()), end$(j)_(g$j.end()), current$(j)_(current$j) -]] { - ComputeCurrentValue(); - } - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - // Advance should not be called on beyond-of-range iterators - // so no component iterators must be beyond end of range, either. - virtual void Advance() { - assert(!AtEnd()); - ++current$(i)_; - -$for k [[ - if (current$(i+2-k)_ == end$(i+2-k)_) { - current$(i+2-k)_ = begin$(i+2-k)_; - ++current$(i+2-k-1)_; - } - -]] - ComputeCurrentValue(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const ParamType* Current() const { return ¤t_value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const Iterator* typed_other = - CheckedDowncastToActualType(&other); - // We must report iterators equal if they both point beyond their - // respective ranges. That can happen in a variety of fashions, - // so we have to consult AtEnd(). - return (AtEnd() && typed_other->AtEnd()) || - ($for j && [[ - - current$(j)_ == typed_other->current$(j)_ -]]); - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), $for j, [[ - - begin$(j)_(other.begin$(j)_), - end$(j)_(other.end$(j)_), - current$(j)_(other.current$(j)_) -]] { - ComputeCurrentValue(); - } - - void ComputeCurrentValue() { - if (!AtEnd()) - current_value_ = ParamType($for j, [[*current$(j)_]]); - } - bool AtEnd() const { - // We must report iterator past the end of the range when either of the - // component iterators has reached the end of its range. - return -$for j || [[ - - current$(j)_ == end$(j)_ -]]; - } - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. - // current[i]_ is the actual traversing iterator. -$for j [[ - - const typename ParamGenerator::iterator begin$(j)_; - const typename ParamGenerator::iterator end$(j)_; - typename ParamGenerator::iterator current$(j)_; -]] - - ParamType current_value_; - }; // class CartesianProductGenerator$i::Iterator - - // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator$i& other); - - -$for j [[ - const ParamGenerator g$(j)_; - -]] -}; // class CartesianProductGenerator$i - - -]] - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Helper classes providing Combine() with polymorphic features. They allow -// casting CartesianProductGeneratorN to ParamGenerator if T is -// convertible to U. -// -$range i 2..maxtuple -$for i [[ -$range j 1..i - -template <$for j, [[class Generator$j]]> -class CartesianProductHolder$i { - public: -CartesianProductHolder$i($for j, [[const Generator$j& g$j]]) - : $for j, [[g$(j)_(g$j)]] {} - template <$for j, [[typename T$j]]> - operator ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >() const { - return ParamGenerator< ::std::tr1::tuple<$for j, [[T$j]]> >( - new CartesianProductGenerator$i<$for j, [[T$j]]>( -$for j,[[ - - static_cast >(g$(j)_) -]])); - } - - private: - // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder$i& other); - - -$for j [[ - const Generator$j g$(j)_; - -]] -}; // class CartesianProductHolder$i - -]] - -#endif // GTEST_HAS_COMBINE - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util.h deleted file mode 100644 index dcc54947..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-param-util.h +++ /dev/null @@ -1,638 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// Type and function utilities for implementing parameterized tests. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ - -#include -#include -#include - -#include - -#if GTEST_HAS_PARAM_TEST - -#if GTEST_HAS_RTTI -#include -#endif // GTEST_HAS_RTTI - -#include -#include - -namespace testing { -namespace internal { - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Outputs a message explaining invalid registration of different -// fixture class for the same test case. This may happen when -// TEST_P macro is used to define two tests with the same name -// but in different namespaces. -void ReportInvalidTestCaseType(const char* test_case_name, - const char* file, int line); - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Downcasts the pointer of type Base to Derived. -// Derived must be a subclass of Base. The parameter MUST -// point to a class of type Derived, not any subclass of it. -// When RTTI is available, the function performs a runtime -// check to enforce this. -template -Derived* CheckedDowncastToActualType(Base* base) { -#if GTEST_HAS_RTTI - GTEST_CHECK_(typeid(*base) == typeid(Derived)); - Derived* derived = dynamic_cast(base); // NOLINT -#else - Derived* derived = static_cast(base); // Poor man's downcast. -#endif // GTEST_HAS_RTTI - return derived; -} - -template class ParamGeneratorInterface; -template class ParamGenerator; - -// Interface for iterating over elements provided by an implementation -// of ParamGeneratorInterface. -template -class ParamIteratorInterface { - public: - virtual ~ParamIteratorInterface() {} - // A pointer to the base generator instance. - // Used only for the purposes of iterator comparison - // to make sure that two iterators belong to the same generator. - virtual const ParamGeneratorInterface* BaseGenerator() const = 0; - // Advances iterator to point to the next element - // provided by the generator. The caller is responsible - // for not calling Advance() on an iterator equal to - // BaseGenerator()->End(). - virtual void Advance() = 0; - // Clones the iterator object. Used for implementing copy semantics - // of ParamIterator. - virtual ParamIteratorInterface* Clone() const = 0; - // Dereferences the current iterator and provides (read-only) access - // to the pointed value. It is the caller's responsibility not to call - // Current() on an iterator equal to BaseGenerator()->End(). - // Used for implementing ParamGenerator::operator*(). - virtual const T* Current() const = 0; - // Determines whether the given iterator and other point to the same - // element in the sequence generated by the generator. - // Used for implementing ParamGenerator::operator==(). - virtual bool Equals(const ParamIteratorInterface& other) const = 0; -}; - -// Class iterating over elements provided by an implementation of -// ParamGeneratorInterface. It wraps ParamIteratorInterface -// and implements the const forward iterator concept. -template -class ParamIterator { - public: - typedef T value_type; - typedef const T& reference; - typedef ptrdiff_t difference_type; - - // ParamIterator assumes ownership of the impl_ pointer. - ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {} - ParamIterator& operator=(const ParamIterator& other) { - if (this != &other) - impl_.reset(other.impl_->Clone()); - return *this; - } - - const T& operator*() const { return *impl_->Current(); } - const T* operator->() const { return impl_->Current(); } - // Prefix version of operator++. - ParamIterator& operator++() { - impl_->Advance(); - return *this; - } - // Postfix version of operator++. - ParamIterator operator++(int /*unused*/) { - ParamIteratorInterface* clone = impl_->Clone(); - impl_->Advance(); - return ParamIterator(clone); - } - bool operator==(const ParamIterator& other) const { - return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); - } - bool operator!=(const ParamIterator& other) const { - return !(*this == other); - } - - private: - friend class ParamGenerator; - explicit ParamIterator(ParamIteratorInterface* impl) : impl_(impl) {} - scoped_ptr > impl_; -}; - -// ParamGeneratorInterface is the binary interface to access generators -// defined in other translation units. -template -class ParamGeneratorInterface { - public: - typedef T ParamType; - - virtual ~ParamGeneratorInterface() {} - - // Generator interface definition - virtual ParamIteratorInterface* Begin() const = 0; - virtual ParamIteratorInterface* End() const = 0; -}; - -// Wraps ParamGeneratorInetrface and provides general generator syntax -// compatible with the STL Container concept. -// This class implements copy initialization semantics and the contained -// ParamGeneratorInterface instance is shared among all copies -// of the original object. This is possible because that instance is immutable. -template -class ParamGenerator { - public: - typedef ParamIterator iterator; - - explicit ParamGenerator(ParamGeneratorInterface* impl) : impl_(impl) {} - ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {} - - ParamGenerator& operator=(const ParamGenerator& other) { - impl_ = other.impl_; - return *this; - } - - iterator begin() const { return iterator(impl_->Begin()); } - iterator end() const { return iterator(impl_->End()); } - - private: - ::testing::internal::linked_ptr > impl_; -}; - -// Generates values from a range of two comparable values. Can be used to -// generate sequences of user-defined types that implement operator+() and -// operator<(). -// This class is used in the Range() function. -template -class RangeGenerator : public ParamGeneratorInterface { - public: - RangeGenerator(T begin, T end, IncrementT step) - : begin_(begin), end_(end), - step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} - virtual ~RangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, begin_, 0, step_); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, end_, end_index_, step_); - } - - private: - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, T value, int index, - IncrementT step) - : base_(base), value_(value), index_(index), step_(step) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - value_ = value_ + step_; - index_++; - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - virtual const T* Current() const { return &value_; } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - const int other_index = - CheckedDowncastToActualType(&other)->index_; - return index_ == other_index; - } - - private: - Iterator(const Iterator& other) - : base_(other.base_), value_(other.value_), index_(other.index_), - step_(other.step_) {} - - // No implementation - assignment is unsupported. - void operator=(const Iterator& other); - - const ParamGeneratorInterface* const base_; - T value_; - int index_; - const IncrementT step_; - }; // class RangeGenerator::Iterator - - static int CalculateEndIndex(const T& begin, - const T& end, - const IncrementT& step) { - int end_index = 0; - for (T i = begin; i < end; i = i + step) - end_index++; - return end_index; - } - - // No implementation - assignment is unsupported. - void operator=(const RangeGenerator& other); - - const T begin_; - const T end_; - const IncrementT step_; - // The index for the end() iterator. All the elements in the generated - // sequence are indexed (0-based) to aid iterator comparison. - const int end_index_; -}; // class RangeGenerator - - -// Generates values from a pair of STL-style iterators. Used in the -// ValuesIn() function. The elements are copied from the source range -// since the source can be located on the stack, and the generator -// is likely to persist beyond that stack frame. -template -class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface { - public: - template - ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) - : container_(begin, end) {} - virtual ~ValuesInIteratorRangeGenerator() {} - - virtual ParamIteratorInterface* Begin() const { - return new Iterator(this, container_.begin()); - } - virtual ParamIteratorInterface* End() const { - return new Iterator(this, container_.end()); - } - - private: - typedef typename ::std::vector ContainerType; - - class Iterator : public ParamIteratorInterface { - public: - Iterator(const ParamGeneratorInterface* base, - typename ContainerType::const_iterator iterator) - : base_(base), iterator_(iterator) {} - virtual ~Iterator() {} - - virtual const ParamGeneratorInterface* BaseGenerator() const { - return base_; - } - virtual void Advance() { - ++iterator_; - value_.reset(); - } - virtual ParamIteratorInterface* Clone() const { - return new Iterator(*this); - } - // We need to use cached value referenced by iterator_ because *iterator_ - // can return a temporary object (and of type other then T), so just - // having "return &*iterator_;" doesn't work. - // value_ is updated here and not in Advance() because Advance() - // can advance iterator_ beyond the end of the range, and we cannot - // detect that fact. The client code, on the other hand, is - // responsible for not calling Current() on an out-of-range iterator. - virtual const T* Current() const { - if (value_.get() == NULL) - value_.reset(new T(*iterator_)); - return value_.get(); - } - virtual bool Equals(const ParamIteratorInterface& other) const { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) - << "The program attempted to compare iterators " - << "from different generators." << std::endl; - return iterator_ == - CheckedDowncastToActualType(&other)->iterator_; - } - - private: - Iterator(const Iterator& other) - // The explicit constructor call suppresses a false warning - // emitted by gcc when supplied with the -Wextra option. - : ParamIteratorInterface(), - base_(other.base_), - iterator_(other.iterator_) {} - - const ParamGeneratorInterface* const base_; - typename ContainerType::const_iterator iterator_; - // A cached value of *iterator_. We keep it here to allow access by - // pointer in the wrapping iterator's operator->(). - // value_ needs to be mutable to be accessed in Current(). - // Use of scoped_ptr helps manage cached value's lifetime, - // which is bound by the lifespan of the iterator itself. - mutable scoped_ptr value_; - }; // class ValuesInIteratorRangeGenerator::Iterator - - // No implementation - assignment is unsupported. - void operator=(const ValuesInIteratorRangeGenerator& other); - - const ContainerType container_; -}; // class ValuesInIteratorRangeGenerator - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// Stores a parameter value and later creates tests parameterized with that -// value. -template -class ParameterizedTestFactory : public TestFactoryBase { - public: - typedef typename TestClass::ParamType ParamType; - explicit ParameterizedTestFactory(ParamType parameter) : - parameter_(parameter) {} - virtual Test* CreateTest() { - TestClass::SetParam(¶meter_); - return new TestClass(); - } - - private: - const ParamType parameter_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactoryBase is a base class for meta-factories that create -// test factories for passing into MakeAndRegisterTestInfo function. -template -class TestMetaFactoryBase { - public: - virtual ~TestMetaFactoryBase() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// TestMetaFactory creates test factories for passing into -// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives -// ownership of test factory pointer, same factory object cannot be passed -// into that method twice. But ParameterizedTestCaseInfo is going to call -// it for each Test/Parameter value combination. Thus it needs meta factory -// creator class. -template -class TestMetaFactory - : public TestMetaFactoryBase { - public: - typedef typename TestCase::ParamType ParamType; - - TestMetaFactory() {} - - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) { - return new ParameterizedTestFactory(parameter); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfoBase is a generic interface -// to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase -// accumulates test information provided by TEST_P macro invocations -// and generators provided by INSTANTIATE_TEST_CASE_P macro invocations -// and uses that information to register all resulting test instances -// in RegisterTests method. The ParameterizeTestCaseRegistry class holds -// a collection of pointers to the ParameterizedTestCaseInfo objects -// and calls RegisterTests() on each of them when asked. -class ParameterizedTestCaseInfoBase { - public: - virtual ~ParameterizedTestCaseInfoBase() {} - - // Base part of test case name for display purposes. - virtual const String& GetTestCaseName() const = 0; - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const = 0; - // UnitTest class invokes this method to register tests in this - // test case right before running them in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - virtual void RegisterTests() = 0; - - protected: - ParameterizedTestCaseInfoBase() {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase); -}; - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseInfo accumulates tests obtained from TEST_P -// macro invocations for a particular test case and generators -// obtained from INSTANTIATE_TEST_CASE_P macro invocations for that -// test case. It registers tests with all values generated by all -// generators when asked. -template -class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase { - public: - // ParamType and GeneratorCreationFunc are private types but are required - // for declarations of public methods AddTestPattern() and - // AddTestCaseInstantiation(). - typedef typename TestCase::ParamType ParamType; - // A function that returns an instance of appropriate generator type. - typedef ParamGenerator(GeneratorCreationFunc)(); - - explicit ParameterizedTestCaseInfo(const char* name) - : test_case_name_(name) {} - - // Test case base name for display purposes. - virtual const String& GetTestCaseName() const { return test_case_name_; } - // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const { return GetTypeId(); } - // TEST_P macro uses AddTestPattern() to record information - // about a single test in a LocalTestInfo structure. - // test_case_name is the base name of the test case (without invocation - // prefix). test_base_name is the name of an individual test without - // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is - // test case base name and DoBar is test base name. - void AddTestPattern(const char* test_case_name, - const char* test_base_name, - TestMetaFactoryBase* meta_factory) { - tests_.push_back(linked_ptr(new TestInfo(test_case_name, - test_base_name, - meta_factory))); - } - // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information - // about a generator. - int AddTestCaseInstantiation(const char* instantiation_name, - GeneratorCreationFunc* func, - const char* /* file */, - int /* line */) { - instantiations_.push_back(::std::make_pair(instantiation_name, func)); - return 0; // Return value used only to run this method in namespace scope. - } - // UnitTest class invokes this method to register tests in this test case - // test cases right before running tests in RUN_ALL_TESTS macro. - // This method should not be called more then once on any single - // instance of a ParameterizedTestCaseInfoBase derived class. - // UnitTest has a guard to prevent from calling this method more then once. - virtual void RegisterTests() { - for (typename TestInfoContainer::iterator test_it = tests_.begin(); - test_it != tests_.end(); ++test_it) { - linked_ptr test_info = *test_it; - for (typename InstantiationContainer::iterator gen_it = - instantiations_.begin(); gen_it != instantiations_.end(); - ++gen_it) { - const String& instantiation_name = gen_it->first; - ParamGenerator generator((*gen_it->second)()); - - Message test_case_name_stream; - if ( !instantiation_name.empty() ) - test_case_name_stream << instantiation_name.c_str() << "/"; - test_case_name_stream << test_info->test_case_base_name.c_str(); - - int i = 0; - for (typename ParamGenerator::iterator param_it = - generator.begin(); - param_it != generator.end(); ++param_it, ++i) { - Message test_name_stream; - test_name_stream << test_info->test_base_name.c_str() << "/" << i; - ::testing::internal::MakeAndRegisterTestInfo( - test_case_name_stream.GetString().c_str(), - test_name_stream.GetString().c_str(), - "", // test_case_comment - "", // comment; TODO(vladl@google.com): provide parameter value - // representation. - GetTestCaseTypeId(), - TestCase::SetUpTestCase, - TestCase::TearDownTestCase, - test_info->test_meta_factory->CreateTestFactory(*param_it)); - } // for param_it - } // for gen_it - } // for test_it - } // RegisterTests - - private: - // LocalTestInfo structure keeps information about a single test registered - // with TEST_P macro. - struct TestInfo { - TestInfo(const char* test_case_base_name, - const char* test_base_name, - TestMetaFactoryBase* test_meta_factory) : - test_case_base_name(test_case_base_name), - test_base_name(test_base_name), - test_meta_factory(test_meta_factory) {} - - const String test_case_base_name; - const String test_base_name; - const scoped_ptr > test_meta_factory; - }; - typedef ::std::vector > TestInfoContainer; - // Keeps pairs of - // received from INSTANTIATE_TEST_CASE_P macros. - typedef ::std::vector > - InstantiationContainer; - - const String test_case_name_; - TestInfoContainer tests_; - InstantiationContainer instantiations_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo); -}; // class ParameterizedTestCaseInfo - -// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. -// -// ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase -// classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P -// macros use it to locate their corresponding ParameterizedTestCaseInfo -// descriptors. -class ParameterizedTestCaseRegistry { - public: - ParameterizedTestCaseRegistry() {} - ~ParameterizedTestCaseRegistry() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - delete *it; - } - } - - // Looks up or creates and returns a structure containing information about - // tests and instantiations of a particular test case. - template - ParameterizedTestCaseInfo* GetTestCasePatternHolder( - const char* test_case_name, - const char* file, - int line) { - ParameterizedTestCaseInfo* typed_test_info = NULL; - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - if ((*it)->GetTestCaseName() == test_case_name) { - if ((*it)->GetTestCaseTypeId() != GetTypeId()) { - // Complain about incorrect usage of Google Test facilities - // and terminate the program since we cannot guaranty correct - // test case setup and tear-down in this case. - ReportInvalidTestCaseType(test_case_name, file, line); - abort(); - } else { - // At this point we are sure that the object we found is of the same - // type we are looking for, so we downcast it to that type - // without further checks. - typed_test_info = CheckedDowncastToActualType< - ParameterizedTestCaseInfo >(*it); - } - break; - } - } - if (typed_test_info == NULL) { - typed_test_info = new ParameterizedTestCaseInfo(test_case_name); - test_case_infos_.push_back(typed_test_info); - } - return typed_test_info; - } - void RegisterTests() { - for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); - it != test_case_infos_.end(); ++it) { - (*it)->RegisterTests(); - } - } - - private: - typedef ::std::vector TestCaseInfoContainer; - - TestCaseInfoContainer test_case_infos_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry); -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-port.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-port.h deleted file mode 100644 index ee97881f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-port.h +++ /dev/null @@ -1,1084 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan) -// -// Low-level types and utilities for porting Google Test to various -// platforms. They are subject to change without notice. DO NOT USE -// THEM IN USER CODE. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ - -// The user can define the following macros in the build script to -// control Google Test's behavior. If the user doesn't define a macro -// in this list, Google Test will define it. -// -// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2) -// is/isn't available. -// GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::string, which is different to std::string). -// GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string -// is/isn't available (some systems define -// ::wstring, which is different to std::wstring). -// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that -// is/isn't available. -// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't -// enabled. -// GTEST_HAS_STD_STRING - Define it to 1/0 to indicate that -// std::string does/doesn't work (Google Test can -// be used where std::string is unavailable). -// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that -// std::wstring does/doesn't work (Google Test can -// be used where std::wstring is unavailable). -// GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple -// is/isn't available. -// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the -// compiler supports Microsoft's "Structured -// Exception Handling". -// GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google -// Test's own tr1 tuple implementation should be -// used. Unused when the user sets -// GTEST_HAS_TR1_TUPLE to 0. - -// This header defines the following utilities: -// -// Macros indicating the current platform (defined to 1 if compiled on -// the given platform; otherwise undefined): -// GTEST_OS_CYGWIN - Cygwin -// GTEST_OS_LINUX - Linux -// GTEST_OS_MAC - Mac OS X -// GTEST_OS_SOLARIS - Sun Solaris -// GTEST_OS_SYMBIAN - Symbian -// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile) -// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop -// GTEST_OS_WINDOWS_MINGW - MinGW -// GTEST_OS_WINODWS_MOBILE - Windows Mobile -// GTEST_OS_ZOS - z/OS -// -// Among the platforms, Cygwin, Linux, Max OS X, and Windows have the -// most stable support. Since core members of the Google Test project -// don't have access to other platforms, support for them may be less -// stable. If you notice any problems on your platform, please notify -// googletestframework@googlegroups.com (patches for fixing them are -// even more welcome!). -// -// Note that it is possible that none of the GTEST_OS_* macros are defined. -// -// Macros indicating available Google Test features (defined to 1 if -// the corresponding feature is supported; otherwise undefined): -// GTEST_HAS_COMBINE - the Combine() function (for value-parameterized -// tests) -// GTEST_HAS_DEATH_TEST - death tests -// GTEST_HAS_PARAM_TEST - value-parameterized tests -// GTEST_HAS_TYPED_TEST - typed tests -// GTEST_HAS_TYPED_TEST_P - type-parameterized tests -// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. -// GTEST_USES_SIMPLE_RE - our own simple regex is used; -// the above two are mutually exclusive. -// -// Macros for basic C++ coding: -// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. -// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a -// variable don't have to be used. -// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=. -// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used. -// -// Synchronization: -// Mutex, MutexLock, ThreadLocal, GetThreadCount() -// - synchronization primitives. -// GTEST_IS_THREADSAFE - defined to 1 to indicate that the above -// synchronization primitives have real implementations -// and Google Test is thread-safe; or 0 otherwise. -// -// Template meta programming: -// is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only. -// -// Smart pointers: -// scoped_ptr - as in TR2. -// -// Regular expressions: -// RE - a simple regular expression class using the POSIX -// Extended Regular Expression syntax. Not available on -// Windows. -// -// Logging: -// GTEST_LOG_() - logs messages at the specified severity level. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. -// -// Stderr capturing: -// CaptureStderr() - starts capturing stderr. -// GetCapturedStderr() - stops capturing stderr and returns the captured -// string. -// -// Integer types: -// TypeWithSize - maps an integer to a int type. -// Int32, UInt32, Int64, UInt64, TimeInMillis -// - integers of known sizes. -// BiggestInt - the biggest signed integer type. -// -// Command-line utilities: -// GTEST_FLAG() - references a flag. -// GTEST_DECLARE_*() - declares a flag. -// GTEST_DEFINE_*() - defines a flag. -// GetArgvs() - returns the command line as a vector of strings. -// -// Environment variable utilities: -// GetEnv() - gets the value of an environment variable. -// BoolFromGTestEnv() - parses a bool environment variable. -// Int32FromGTestEnv() - parses an Int32 environment variable. -// StringFromGTestEnv() - parses a string environment variable. - -#include // For ptrdiff_t -#include -#include -#include -#ifndef _WIN32_WCE -#include -#endif // !_WIN32_WCE - -#include // NOLINT - -#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" -#define GTEST_FLAG_PREFIX_ "gtest_" -#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" -#define GTEST_NAME_ "Google Test" -#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" - -// Determines the version of gcc that is used to compile this. -#ifdef __GNUC__ -// 40302 means version 4.3.2. -#define GTEST_GCC_VER_ \ - (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) -#endif // __GNUC__ - -// Determines the platform on which Google Test is compiled. -#ifdef __CYGWIN__ -#define GTEST_OS_CYGWIN 1 -#elif defined __SYMBIAN32__ -#define GTEST_OS_SYMBIAN 1 -#elif defined _WIN32 -#define GTEST_OS_WINDOWS 1 -#ifdef _WIN32_WCE -#define GTEST_OS_WINDOWS_MOBILE 1 -#elif defined(__MINGW__) || defined(__MINGW32__) -#define GTEST_OS_WINDOWS_MINGW 1 -#else -#define GTEST_OS_WINDOWS_DESKTOP 1 -#endif // _WIN32_WCE -#elif defined __APPLE__ -#define GTEST_OS_MAC 1 -#elif defined __linux__ -#define GTEST_OS_LINUX 1 -#elif defined __MVS__ -#define GTEST_OS_ZOS 1 -#elif defined(__sun) && defined(__SVR4) -#define GTEST_OS_SOLARIS 1 -#endif // __CYGWIN__ - -#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \ - GTEST_OS_SOLARIS - -// On some platforms, needs someone to define size_t, and -// won't compile otherwise. We can #include it here as we already -// included , which is guaranteed to define size_t through -// . -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT - -#define GTEST_USES_POSIX_RE 1 - -#elif GTEST_OS_WINDOWS - -#if !GTEST_OS_WINDOWS_MOBILE -#include // NOLINT -#include // NOLINT -#endif - -// is not available on Windows. Use our own simple regex -// implementation instead. -#define GTEST_USES_SIMPLE_RE 1 - -#else - -// may not be available on this platform. Use our own -// simple regex implementation instead. -#define GTEST_USES_SIMPLE_RE 1 - -#endif // GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || - // GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS - -// Defines GTEST_HAS_EXCEPTIONS to 1 if exceptions are enabled, or 0 -// otherwise. - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS -// macro to enable exceptions, so we'll do the same. -// Assumes that exceptions are enabled by default. -#ifndef _HAS_EXCEPTIONS -#define _HAS_EXCEPTIONS 1 -#endif // _HAS_EXCEPTIONS -#define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS -#else // The compiler is not MSVC or C++Builder. -// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. For -// other compilers, we assume exceptions are disabled to be -// conservative. -#if defined(__GNUC__) && __EXCEPTIONS -#define GTEST_HAS_EXCEPTIONS 1 -#else -#define GTEST_HAS_EXCEPTIONS 0 -#endif // defined(__GNUC__) && __EXCEPTIONS -#endif // defined(_MSC_VER) || defined(__BORLANDC__) - -// Determines whether ::std::string and ::string are available. - -#ifndef GTEST_HAS_STD_STRING -// The user didn't tell us whether ::std::string is available, so we -// need to figure it out. The only environment that we know -// ::std::string is not available is MSVC 7.1 or lower with exceptions -// disabled. -#if defined(_MSC_VER) && (_MSC_VER < 1400) && !GTEST_HAS_EXCEPTIONS -#define GTEST_HAS_STD_STRING 0 -#else -#define GTEST_HAS_STD_STRING 1 -#endif -#endif // GTEST_HAS_STD_STRING - -#ifndef GTEST_HAS_GLOBAL_STRING -// The user didn't tell us whether ::string is available, so we need -// to figure it out. - -#define GTEST_HAS_GLOBAL_STRING 0 - -#endif // GTEST_HAS_GLOBAL_STRING - -#ifndef GTEST_HAS_STD_WSTRING -// The user didn't tell us whether ::std::wstring is available, so we need -// to figure it out. -// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring -// is available. - -#if GTEST_OS_CYGWIN || GTEST_OS_SOLARIS -// Cygwin 1.5 and below doesn't support ::std::wstring. -// Cygwin 1.7 might add wstring support; this should be updated when clear. -// Solaris' libc++ doesn't support it either. -#define GTEST_HAS_STD_WSTRING 0 -#else -#define GTEST_HAS_STD_WSTRING GTEST_HAS_STD_STRING -#endif // GTEST_OS_CYGWIN || GTEST_OS_SOLARIS - -#endif // GTEST_HAS_STD_WSTRING - -#ifndef GTEST_HAS_GLOBAL_WSTRING -// The user didn't tell us whether ::wstring is available, so we need -// to figure it out. -#define GTEST_HAS_GLOBAL_WSTRING \ - (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING) -#endif // GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_STRING || GTEST_HAS_GLOBAL_STRING || \ - GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING -#include // NOLINT -#endif // GTEST_HAS_STD_STRING || GTEST_HAS_GLOBAL_STRING || - // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -#if GTEST_HAS_STD_STRING -#include // NOLINT -#else -#include // NOLINT -#endif // GTEST_HAS_STD_STRING - -// Determines whether RTTI is available. -#ifndef GTEST_HAS_RTTI -// The user didn't tell us whether RTTI is enabled, so we need to -// figure it out. - -#ifdef _MSC_VER - -#ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#else -#define GTEST_HAS_RTTI 0 -#endif // _CPPRTTI - -#elif defined(__GNUC__) - -// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. -#if GTEST_GCC_VER_ >= 40302 -#ifdef __GXX_RTTI -#define GTEST_HAS_RTTI 1 -#else -#define GTEST_HAS_RTTI 0 -#endif // __GXX_RTTI -#else -// For gcc versions smaller than 4.3.2, we assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#endif // GTEST_GCC_VER >= 40302 - -#else - -// Unknown compiler - assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 - -#endif // _MSC_VER - -#endif // GTEST_HAS_RTTI - -// Determines whether is available. -#ifndef GTEST_HAS_PTHREAD -// The user didn't tell us, so we need to figure it out. -#define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC) -#endif // GTEST_HAS_PTHREAD - -// Determines whether Google Test can use tr1/tuple. You can define -// this macro to 0 to prevent Google Test from using tuple (any -// feature depending on tuple with be disabled in this mode). -#ifndef GTEST_HAS_TR1_TUPLE -// The user didn't tell us not to do it, so we assume it's OK. -#define GTEST_HAS_TR1_TUPLE 1 -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether Google Test's own tr1 tuple implementation -// should be used. -#ifndef GTEST_USE_OWN_TR1_TUPLE -// The user didn't tell us, so we need to figure it out. - -// We use our own tr1 tuple if we aren't sure the user has an -// implementation of it already. At this time, GCC 4.0.0+ is the only -// mainstream compiler that comes with a TR1 tuple implementation. -// MSVC 2008 (9.0) provides TR1 tuple in a 323 MB Feature Pack -// download, which we cannot assume the user has. MSVC 2010 isn't -// released yet. -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -#define GTEST_USE_OWN_TR1_TUPLE 0 -#else -#define GTEST_USE_OWN_TR1_TUPLE 1 -#endif // defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) - -#endif // GTEST_USE_OWN_TR1_TUPLE - -// To avoid conditional compilation everywhere, we make it -// gtest-port.h's responsibility to #include the header implementing -// tr1/tuple. -#if GTEST_HAS_TR1_TUPLE - -#if GTEST_USE_OWN_TR1_TUPLE -#include -#elif GTEST_OS_SYMBIAN - -// On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to -// use STLport's tuple implementation, which unfortunately doesn't -// work as the copy of STLport distributed with Symbian is incomplete. -// By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to -// use its own tuple implementation. -#ifdef BOOST_HAS_TR1_TUPLE -#undef BOOST_HAS_TR1_TUPLE -#endif // BOOST_HAS_TR1_TUPLE - -// This prevents , which defines -// BOOST_HAS_TR1_TUPLE, from being #included by Boost's . -#define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED -#include - -#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) -// GCC 4.0+ implements tr1/tuple in the header. This does -// not conform to the TR1 spec, which requires the header to be . - -#if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 -// Until version 4.3.2, gcc has a bug that causes , -// which is #included by , to not compile when RTTI is -// disabled. _TR1_FUNCTIONAL is the header guard for -// . Hence the following #define is a hack to prevent -// from being included. -#define _TR1_FUNCTIONAL 1 -#include -#undef _TR1_FUNCTIONAL // Allows the user to #include - // if he chooses to. -#else -#include -#endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 - -#else -// If the compiler is not GCC 4.0+, we assume the user is using a -// spec-conforming TR1 implementation. -#include -#endif // GTEST_USE_OWN_TR1_TUPLE - -#endif // GTEST_HAS_TR1_TUPLE - -// Determines whether clone(2) is supported. -// Usually it will only be available on Linux, excluding -// Linux on the Itanium architecture. -// Also see http://linux.die.net/man/2/clone. -#ifndef GTEST_HAS_CLONE -// The user didn't tell us, so we need to figure it out. - -#if GTEST_OS_LINUX && !defined(__ia64__) -#define GTEST_HAS_CLONE 1 -#else -#define GTEST_HAS_CLONE 0 -#endif // GTEST_OS_LINUX && !defined(__ia64__) - -#endif // GTEST_HAS_CLONE - -// Determines whether to support death tests. -// Google Test does not support death tests for VC 7.1 and earlier for -// these reasons: -// 1. std::vector does not build in VC 7.1 when exceptions are disabled. -// 2. std::string does not build in VC 7.1 when exceptions are disabled -// (this is covered by GTEST_HAS_STD_STRING guard). -// 3. abort() in a VC 7.1 application compiled as GUI in debug config -// pops up a dialog window that cannot be suppressed programmatically. -#if GTEST_HAS_STD_STRING && \ - (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN || \ - (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || GTEST_OS_WINDOWS_MINGW) -#define GTEST_HAS_DEATH_TEST 1 -#include // NOLINT -#endif - -// Determines whether to support value-parameterized tests. - -#if defined(__GNUC__) || (_MSC_VER >= 1400) -// TODO(vladl@google.com): get the implementation rid of vector and list -// to compile on MSVC 7.1. -#define GTEST_HAS_PARAM_TEST 1 -#endif // defined(__GNUC__) || (_MSC_VER >= 1400) - -// Determines whether to support type-driven tests. - -// Typed tests need and variadic macros, which gcc and VC -// 8.0+ support. -#if defined(__GNUC__) || (_MSC_VER >= 1400) -#define GTEST_HAS_TYPED_TEST 1 -#define GTEST_HAS_TYPED_TEST_P 1 -#endif // defined(__GNUC__) || (_MSC_VER >= 1400) - -// Determines whether to support Combine(). This only makes sense when -// value-parameterized tests are enabled. -#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE -#define GTEST_HAS_COMBINE 1 -#endif // GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE - -// Determines whether the system compiler uses UTF-16 for encoding wide strings. -#define GTEST_WIDE_STRING_USES_UTF16_ \ - (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN) - -// Defines some utility macros. - -// The GNU compiler emits a warning if nested "if" statements are followed by -// an "else" statement and braces are not used to explicitly disambiguate the -// "else" binding. This leads to problems with code like: -// -// if (gate) -// ASSERT_*(condition) << "Some message"; -// -// The "switch (0) case 0:" idiom is used to suppress this. -#ifdef __INTEL_COMPILER -#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ -#else -#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: // NOLINT -#endif - -// Use this annotation at the end of a struct/class definition to -// prevent the compiler from optimizing away instances that are never -// used. This is useful when all interesting logic happens inside the -// c'tor and / or d'tor. Example: -// -// struct Foo { -// Foo() { ... } -// } GTEST_ATTRIBUTE_UNUSED_; -// -// Also use it after a variable or parameter declaration to tell the -// compiler the variable/parameter does not have to be used. -#if defined(__GNUC__) && !defined(COMPILER_ICC) -#define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) -#else -#define GTEST_ATTRIBUTE_UNUSED_ -#endif - -// A macro to disallow the evil copy constructor and operator= functions -// This should be used in the private: declarations for a class. -#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ - type(const type &);\ - void operator=(const type &) - -// Tell the compiler to warn about unused return values for functions declared -// with this macro. The macro should be used on function declarations -// following the argument list: -// -// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_; -#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC) -#define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) -#else -#define GTEST_MUST_USE_RESULT_ -#endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC - -// Determine whether the compiler supports Microsoft's Structured Exception -// Handling. This is supported by several Windows compilers but generally -// does not exist on any other system. -#ifndef GTEST_HAS_SEH -// The user didn't tell us, so we need to figure it out. - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// These two compilers are known to support SEH. -#define GTEST_HAS_SEH 1 -#else -// Assume no SEH. -#define GTEST_HAS_SEH 0 -#endif - -#endif // GTEST_HAS_SEH - -namespace testing { - -class Message; - -namespace internal { - -class String; - -// std::strstream is deprecated. However, we have to use it on -// Windows as std::stringstream won't compile on Windows when -// exceptions are disabled. We use std::stringstream on other -// platforms to avoid compiler warnings there. -#if GTEST_HAS_STD_STRING -typedef ::std::stringstream StrStream; -#else -typedef ::std::strstream StrStream; -#endif // GTEST_HAS_STD_STRING - -// A helper for suppressing warnings on constant condition. It just -// returns 'condition'. -bool IsTrue(bool condition); - -// Defines scoped_ptr. - -// This implementation of scoped_ptr is PARTIAL - it only contains -// enough stuff to satisfy Google Test's need. -template -class scoped_ptr { - public: - explicit scoped_ptr(T* p = NULL) : ptr_(p) {} - ~scoped_ptr() { reset(); } - - T& operator*() const { return *ptr_; } - T* operator->() const { return ptr_; } - T* get() const { return ptr_; } - - T* release() { - T* const ptr = ptr_; - ptr_ = NULL; - return ptr; - } - - void reset(T* p = NULL) { - if (p != ptr_) { - if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type. - delete ptr_; - } - ptr_ = p; - } - } - private: - T* ptr_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr); -}; - -// Defines RE. - -// A simple C++ wrapper for . It uses the POSIX Enxtended -// Regular Expression syntax. -class RE { - public: - // Constructs an RE from a string. -#if GTEST_HAS_STD_STRING - RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - RE(const char* regex) { Init(regex); } // NOLINT - ~RE(); - - // Returns the string representation of the regex. - const char* pattern() const { return pattern_; } - - // FullMatch(str, re) returns true iff regular expression re matches - // the entire str. - // PartialMatch(str, re) returns true iff regular expression re - // matches a substring of str (including str itself). - // - // TODO(wan@google.com): make FullMatch() and PartialMatch() work - // when str contains NUL characters. -#if GTEST_HAS_STD_STRING - static bool FullMatch(const ::std::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::std::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - static bool FullMatch(const ::string& str, const RE& re) { - return FullMatch(str.c_str(), re); - } - static bool PartialMatch(const ::string& str, const RE& re) { - return PartialMatch(str.c_str(), re); - } -#endif // GTEST_HAS_GLOBAL_STRING - - static bool FullMatch(const char* str, const RE& re); - static bool PartialMatch(const char* str, const RE& re); - - private: - void Init(const char* regex); - - // We use a const char* instead of a string, as Google Test may be used - // where string is not available. We also do not use Google Test's own - // String type here, in order to simplify dependencies between the - // files. - const char* pattern_; - bool is_valid_; -#if GTEST_USES_POSIX_RE - regex_t full_regex_; // For FullMatch(). - regex_t partial_regex_; // For PartialMatch(). -#else // GTEST_USES_SIMPLE_RE - const char* full_pattern_; // For FullMatch(); -#endif - - GTEST_DISALLOW_COPY_AND_ASSIGN_(RE); -}; - -// Defines logging utilities: -// GTEST_LOG_(severity) - logs messages at the specified severity level. The -// message itself is streamed into the macro. -// LogToStderr() - directs all log messages to stderr. -// FlushInfoLog() - flushes informational log messages. - -enum GTestLogSeverity { - GTEST_INFO, - GTEST_WARNING, - GTEST_ERROR, - GTEST_FATAL -}; - -// Formats log entry severity, provides a stream object for streaming the -// log message, and terminates the message with a newline when going out of -// scope. -class GTestLog { - public: - GTestLog(GTestLogSeverity severity, const char* file, int line); - - // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. - ~GTestLog(); - - ::std::ostream& GetStream() { return ::std::cerr; } - - private: - const GTestLogSeverity severity_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog); -}; - -#define GTEST_LOG_(severity) \ - ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \ - __FILE__, __LINE__).GetStream() - -inline void LogToStderr() {} -inline void FlushInfoLog() { fflush(NULL); } - -// Defines the stderr capturer: -// CaptureStderr - starts capturing stderr. -// GetCapturedStderr - stops capturing stderr and returns the captured string. - -void CaptureStderr(); -String GetCapturedStderr(); - -#if GTEST_HAS_DEATH_TEST - -// A copy of all command line arguments. Set by InitGoogleTest(). -extern ::std::vector g_argvs; - -// GTEST_HAS_DEATH_TEST implies we have ::std::string. -const ::std::vector& GetArgvs(); - -#endif // GTEST_HAS_DEATH_TEST - -// Defines synchronization primitives. - -// A dummy implementation of synchronization primitives (mutex, lock, -// and thread-local variable). Necessary for compiling Google Test where -// mutex is not supported - using Google Test in multiple threads is not -// supported on such platforms. - -class Mutex { - public: - Mutex() {} - explicit Mutex(int /*unused*/) {} - void AssertHeld() const {} - enum { NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX = 0 }; -}; - -// We cannot call it MutexLock directly as the ctor declaration would -// conflict with a macro named MutexLock, which is defined on some -// platforms. Hence the typedef trick below. -class GTestMutexLock { - public: - explicit GTestMutexLock(Mutex*) {} // NOLINT -}; - -typedef GTestMutexLock MutexLock; - -template -class ThreadLocal { - public: - ThreadLocal() : value_() {} - explicit ThreadLocal(const T& value) : value_(value) {} - T* pointer() { return &value_; } - const T* pointer() const { return &value_; } - const T& get() const { return value_; } - void set(const T& value) { value_ = value; } - private: - T value_; -}; - -// Returns the number of threads running in the process, or 0 to indicate that -// we cannot detect it. -size_t GetThreadCount(); - -// The above synchronization primitives have dummy implementations. -// Therefore Google Test is not thread-safe. -#define GTEST_IS_THREADSAFE 0 - -#if defined(__SYMBIAN32__) || defined(__IBMCPP__) - -// Passing non-POD classes through ellipsis (...) crashes the ARM -// compiler. The Nokia Symbian and the IBM XL C/C++ compiler try to -// instantiate a copy constructor for objects passed through ellipsis -// (...), failing for uncopyable objects. We define this to indicate -// the fact. -#define GTEST_ELLIPSIS_NEEDS_COPY_ 1 - -// The Nokia Symbian and IBM XL C/C++ compilers cannot decide between -// const T& and const T* in a function template. These compilers -// _can_ decide between class template specializations for T and T*, -// so a tr1::type_traits-like is_pointer works. -#define GTEST_NEEDS_IS_POINTER_ 1 - -#endif // defined(__SYMBIAN32__) || defined(__IBMCPP__) - -template -struct bool_constant { - typedef bool_constant type; - static const bool value = bool_value; -}; -template const bool bool_constant::value; - -typedef bool_constant false_type; -typedef bool_constant true_type; - -template -struct is_pointer : public false_type {}; - -template -struct is_pointer : public true_type {}; - -#if GTEST_OS_WINDOWS -#define GTEST_PATH_SEP_ "\\" -// The biggest signed integer type the compiler supports. -typedef __int64 BiggestInt; -#else -#define GTEST_PATH_SEP_ "/" -typedef long long BiggestInt; // NOLINT -#endif // GTEST_OS_WINDOWS - -// The testing::internal::posix namespace holds wrappers for common -// POSIX functions. These wrappers hide the differences between -// Windows/MSVC and POSIX systems. Since some compilers define these -// standard functions as macros, the wrapper cannot have the same name -// as the wrapped function. - -namespace posix { - -// Functions with a different name on Windows. - -#if GTEST_OS_WINDOWS - -typedef struct _stat StatStruct; - -#ifdef __BORLANDC__ -inline int IsATTY(int fd) { return isatty(fd); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -#else // !__BORLANDC__ -#if GTEST_OS_WINDOWS_MOBILE -inline int IsATTY(int /* fd */) { return 0; } -#else -inline int IsATTY(int fd) { return _isatty(fd); } -#endif // GTEST_OS_WINDOWS_MOBILE -inline int StrCaseCmp(const char* s1, const char* s2) { - return _stricmp(s1, s2); -} -inline char* StrDup(const char* src) { return _strdup(src); } -#endif // __BORLANDC__ - -#if GTEST_OS_WINDOWS_MOBILE -inline int FileNo(FILE* file) { return reinterpret_cast(_fileno(file)); } -// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this -// time and thus not defined there. -#else -inline int FileNo(FILE* file) { return _fileno(file); } -inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); } -inline int RmDir(const char* dir) { return _rmdir(dir); } -inline bool IsDir(const StatStruct& st) { - return (_S_IFDIR & st.st_mode) != 0; -} -#endif // GTEST_OS_WINDOWS_MOBILE - -#else - -typedef struct stat StatStruct; - -inline int FileNo(FILE* file) { return fileno(file); } -inline int IsATTY(int fd) { return isatty(fd); } -inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); } -inline int StrCaseCmp(const char* s1, const char* s2) { - return strcasecmp(s1, s2); -} -inline char* StrDup(const char* src) { return strdup(src); } -inline int RmDir(const char* dir) { return rmdir(dir); } -inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } - -#endif // GTEST_OS_WINDOWS - -// Functions deprecated by MSVC 8.0. - -#ifdef _MSC_VER -// Temporarily disable warning 4996 (deprecated function). -#pragma warning(push) -#pragma warning(disable:4996) -#endif - -inline const char* StrNCpy(char* dest, const char* src, size_t n) { - return strncpy(dest, src, n); -} - -// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and -// StrError() aren't needed on Windows CE at this time and thus not -// defined there. - -#if !GTEST_OS_WINDOWS_MOBILE -inline int ChDir(const char* dir) { return chdir(dir); } -#endif -inline FILE* FOpen(const char* path, const char* mode) { - return fopen(path, mode); -} -#if !GTEST_OS_WINDOWS_MOBILE -inline FILE *FReopen(const char* path, const char* mode, FILE* stream) { - return freopen(path, mode, stream); -} -inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); } -#endif -inline int FClose(FILE* fp) { return fclose(fp); } -#if !GTEST_OS_WINDOWS_MOBILE -inline int Read(int fd, void* buf, unsigned int count) { - return static_cast(read(fd, buf, count)); -} -inline int Write(int fd, const void* buf, unsigned int count) { - return static_cast(write(fd, buf, count)); -} -inline int Close(int fd) { return close(fd); } -inline const char* StrError(int errnum) { return strerror(errnum); } -#endif -inline const char* GetEnv(const char* name) { -#if GTEST_OS_WINDOWS_MOBILE - // We are on Windows CE, which has no environment variables. - return NULL; -#elif defined(__BORLANDC__) - // Environment variables which we programmatically clear will be set to the - // empty string rather than unset (NULL). Handle that case. - const char* const env = getenv(name); - return (env != NULL && env[0] != '\0') ? env : NULL; -#else - return getenv(name); -#endif -} - -#ifdef _MSC_VER -#pragma warning(pop) // Restores the warning state. -#endif - -#if GTEST_OS_WINDOWS_MOBILE -// Windows CE has no C library. The abort() function is used in -// several places in Google Test. This implementation provides a reasonable -// imitation of standard behaviour. -void Abort(); -#else -inline void Abort() { abort(); } -#endif // GTEST_OS_WINDOWS_MOBILE - -} // namespace posix - -// The maximum number a BiggestInt can represent. This definition -// works no matter BiggestInt is represented in one's complement or -// two's complement. -// -// We cannot rely on numeric_limits in STL, as __int64 and long long -// are not part of standard C++ and numeric_limits doesn't need to be -// defined for them. -const BiggestInt kMaxBiggestInt = - ~(static_cast(1) << (8*sizeof(BiggestInt) - 1)); - -// This template class serves as a compile-time function from size to -// type. It maps a size in bytes to a primitive type with that -// size. e.g. -// -// TypeWithSize<4>::UInt -// -// is typedef-ed to be unsigned int (unsigned integer made up of 4 -// bytes). -// -// Such functionality should belong to STL, but I cannot find it -// there. -// -// Google Test uses this class in the implementation of floating-point -// comparison. -// -// For now it only handles UInt (unsigned int) as that's all Google Test -// needs. Other types can be easily added in the future if need -// arises. -template -class TypeWithSize { - public: - // This prevents the user from using TypeWithSize with incorrect - // values of N. - typedef void UInt; -}; - -// The specialization for size 4. -template <> -class TypeWithSize<4> { - public: - // unsigned int has size 4 in both gcc and MSVC. - // - // As base/basictypes.h doesn't compile on Windows, we cannot use - // uint32, uint64, and etc here. - typedef int Int; - typedef unsigned int UInt; -}; - -// The specialization for size 8. -template <> -class TypeWithSize<8> { - public: -#if GTEST_OS_WINDOWS - typedef __int64 Int; - typedef unsigned __int64 UInt; -#else - typedef long long Int; // NOLINT - typedef unsigned long long UInt; // NOLINT -#endif // GTEST_OS_WINDOWS -}; - -// Integer types of known sizes. -typedef TypeWithSize<4>::Int Int32; -typedef TypeWithSize<4>::UInt UInt32; -typedef TypeWithSize<8>::Int Int64; -typedef TypeWithSize<8>::UInt UInt64; -typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. - -// Utilities for command line flags and environment variables. - -// INTERNAL IMPLEMENTATION - DO NOT USE. -// -// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition -// is not satisfied. -// Synopsys: -// GTEST_CHECK_(boolean_condition); -// or -// GTEST_CHECK_(boolean_condition) << "Additional message"; -// -// This checks the condition and if the condition is not satisfied -// it prints message about the condition violation, including the -// condition itself, plus additional message streamed into it, if any, -// and then it aborts the program. It aborts the program irrespective of -// whether it is built in the debug mode or not. -#define GTEST_CHECK_(condition) \ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ - if (::testing::internal::IsTrue(condition)) \ - ; \ - else \ - GTEST_LOG_(FATAL) << "Condition " #condition " failed. " - -// Macro for referencing flags. -#define GTEST_FLAG(name) FLAGS_gtest_##name - -// Macros for declaring flags. -#define GTEST_DECLARE_bool_(name) extern bool GTEST_FLAG(name) -#define GTEST_DECLARE_int32_(name) \ - extern ::testing::internal::Int32 GTEST_FLAG(name) -#define GTEST_DECLARE_string_(name) \ - extern ::testing::internal::String GTEST_FLAG(name) - -// Macros for defining flags. -#define GTEST_DEFINE_bool_(name, default_val, doc) \ - bool GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_int32_(name, default_val, doc) \ - ::testing::internal::Int32 GTEST_FLAG(name) = (default_val) -#define GTEST_DEFINE_string_(name, default_val, doc) \ - ::testing::internal::String GTEST_FLAG(name) = (default_val) - -// Parses 'str' for a 32-bit signed integer. If successful, writes the result -// to *value and returns true; otherwise leaves *value unchanged and returns -// false. -// TODO(chandlerc): Find a better way to refactor flag and environment parsing -// out of both gtest-port.cc and gtest.cc to avoid exporting this utility -// function. -bool ParseInt32(const Message& src_text, const char* str, Int32* value); - -// Parses a bool/Int32/string from the environment variable -// corresponding to the given Google Test flag. -bool BoolFromGTestEnv(const char* flag, bool default_val); -Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); -const char* StringFromGTestEnv(const char* flag, const char* default_val); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-string.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-string.h deleted file mode 100644 index 4bc82413..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-string.h +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file declares the String class and functions used internally by -// Google Test. They are subject to change without notice. They should not used -// by code external to Google Test. -// -// This header file is #included by . -// It should not be #included by other files. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ - -#include -#include - -#if GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRING -#include -#endif // GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRING - -namespace testing { -namespace internal { - -// String - a UTF-8 string class. -// -// We cannot use std::string as Microsoft's STL implementation in -// Visual C++ 7.1 has problems when exception is disabled. There is a -// hack to work around this, but we've seen cases where the hack fails -// to work. -// -// Also, String is different from std::string in that it can represent -// both NULL and the empty string, while std::string cannot represent -// NULL. -// -// NULL and the empty string are considered different. NULL is less -// than anything (including the empty string) except itself. -// -// This class only provides minimum functionality necessary for -// implementing Google Test. We do not intend to implement a full-fledged -// string class here. -// -// Since the purpose of this class is to provide a substitute for -// std::string on platforms where it cannot be used, we define a copy -// constructor and assignment operators such that we don't need -// conditional compilation in a lot of places. -// -// In order to make the representation efficient, the d'tor of String -// is not virtual. Therefore DO NOT INHERIT FROM String. -class String { - public: - // Static utility methods - - // Returns the input enclosed in double quotes if it's not NULL; - // otherwise returns "(null)". For example, "\"Hello\"" is returned - // for input "Hello". - // - // This is useful for printing a C string in the syntax of a literal. - // - // Known issue: escape sequences are not handled yet. - static String ShowCStringQuoted(const char* c_str); - - // Clones a 0-terminated C string, allocating memory using new. The - // caller is responsible for deleting the return value using - // delete[]. Returns the cloned string, or NULL if the input is - // NULL. - // - // This is different from strdup() in string.h, which allocates - // memory using malloc(). - static const char* CloneCString(const char* c_str); - -#if GTEST_OS_WINDOWS_MOBILE - // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be - // able to pass strings to Win32 APIs on CE we need to convert them - // to 'Unicode', UTF-16. - - // Creates a UTF-16 wide string from the given ANSI string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the wide string, or NULL if the - // input is NULL. - // - // The wide string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static LPCWSTR AnsiToUtf16(const char* c_str); - - // Creates an ANSI string from the given wide string, allocating - // memory using new. The caller is responsible for deleting the return - // value using delete[]. Returns the ANSI string, or NULL if the - // input is NULL. - // - // The returned string is created using the ANSI codepage (CP_ACP) to - // match the behaviour of the ANSI versions of Win32 calls and the - // C runtime. - static const char* Utf16ToAnsi(LPCWSTR utf16_str); -#endif - - // Compares two C strings. Returns true iff they have the same content. - // - // Unlike strcmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CStringEquals(const char* lhs, const char* rhs); - - // Converts a wide C string to a String using the UTF-8 encoding. - // NULL will be converted to "(null)". If an error occurred during - // the conversion, "(failed to convert from wide string)" is - // returned. - static String ShowWideCString(const wchar_t* wide_c_str); - - // Similar to ShowWideCString(), except that this function encloses - // the converted string in double quotes. - static String ShowWideCStringQuoted(const wchar_t* wide_c_str); - - // Compares two wide C strings. Returns true iff they have the same - // content. - // - // Unlike wcscmp(), this function can handle NULL argument(s). A - // NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); - - // Compares two C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike strcasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL C string, - // including the empty string. - static bool CaseInsensitiveCStringEquals(const char* lhs, - const char* rhs); - - // Compares two wide C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike wcscasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL wide C string, - // including the empty string. - // NB: The implementations on different platforms slightly differ. - // On windows, this method uses _wcsicmp which compares according to LC_CTYPE - // environment variable. On GNU platform this method uses wcscasecmp - // which compares according to LC_CTYPE category of the current locale. - // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the - // current locale. - static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, - const wchar_t* rhs); - - // Formats a list of arguments to a String, using the same format - // spec string as for printf. - // - // We do not use the StringPrintf class as it is not universally - // available. - // - // The result is limited to 4096 characters (including the tailing - // 0). If 4096 characters are not enough to format the input, - // "" is returned. - static String Format(const char* format, ...); - - // C'tors - - // The default c'tor constructs a NULL string. - String() : c_str_(NULL), length_(0) {} - - // Constructs a String by cloning a 0-terminated C string. - String(const char* c_str) { // NOLINT - if (c_str == NULL) { - c_str_ = NULL; - length_ = 0; - } else { - ConstructNonNull(c_str, strlen(c_str)); - } - } - - // Constructs a String by copying a given number of chars from a - // buffer. E.g. String("hello", 3) creates the string "hel", - // String("a\0bcd", 4) creates "a\0bc", String(NULL, 0) creates "", - // and String(NULL, 1) results in access violation. - String(const char* buffer, size_t length) { - ConstructNonNull(buffer, length); - } - - // The copy c'tor creates a new copy of the string. The two - // String objects do not share content. - String(const String& str) : c_str_(NULL), length_(0) { *this = str; } - - // D'tor. String is intended to be a final class, so the d'tor - // doesn't need to be virtual. - ~String() { delete[] c_str_; } - - // Allows a String to be implicitly converted to an ::std::string or - // ::string, and vice versa. Converting a String containing a NULL - // pointer to ::std::string or ::string is undefined behavior. - // Converting a ::std::string or ::string containing an embedded NUL - // character to a String will result in the prefix up to the first - // NUL character. -#if GTEST_HAS_STD_STRING - String(const ::std::string& str) { - ConstructNonNull(str.c_str(), str.length()); - } - - operator ::std::string() const { return ::std::string(c_str(), length()); } -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - String(const ::string& str) { - ConstructNonNull(str.c_str(), str.length()); - } - - operator ::string() const { return ::string(c_str(), length()); } -#endif // GTEST_HAS_GLOBAL_STRING - - // Returns true iff this is an empty string (i.e. ""). - bool empty() const { return (c_str() != NULL) && (length() == 0); } - - // Compares this with another String. - // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0 - // if this is greater than rhs. - int Compare(const String& rhs) const; - - // Returns true iff this String equals the given C string. A NULL - // string and a non-NULL string are considered not equal. - bool operator==(const char* c_str) const { return Compare(c_str) == 0; } - - // Returns true iff this String is less than the given String. A - // NULL string is considered less than "". - bool operator<(const String& rhs) const { return Compare(rhs) < 0; } - - // Returns true iff this String doesn't equal the given C string. A NULL - // string and a non-NULL string are considered not equal. - bool operator!=(const char* c_str) const { return !(*this == c_str); } - - // Returns true iff this String ends with the given suffix. *Any* - // String is considered to end with a NULL or empty suffix. - bool EndsWith(const char* suffix) const; - - // Returns true iff this String ends with the given suffix, not considering - // case. Any String is considered to end with a NULL or empty suffix. - bool EndsWithCaseInsensitive(const char* suffix) const; - - // Returns the length of the encapsulated string, or 0 if the - // string is NULL. - size_t length() const { return length_; } - - // Gets the 0-terminated C string this String object represents. - // The String object still owns the string. Therefore the caller - // should NOT delete the return value. - const char* c_str() const { return c_str_; } - - // Assigns a C string to this object. Self-assignment works. - const String& operator=(const char* c_str) { return *this = String(c_str); } - - // Assigns a String object to this object. Self-assignment works. - const String& operator=(const String& rhs) { - if (this != &rhs) { - delete[] c_str_; - if (rhs.c_str() == NULL) { - c_str_ = NULL; - length_ = 0; - } else { - ConstructNonNull(rhs.c_str(), rhs.length()); - } - } - - return *this; - } - - private: - // Constructs a non-NULL String from the given content. This - // function can only be called when data_ has not been allocated. - // ConstructNonNull(NULL, 0) results in an empty string (""). - // ConstructNonNull(NULL, non_zero) is undefined behavior. - void ConstructNonNull(const char* buffer, size_t length) { - char* const str = new char[length + 1]; - memcpy(str, buffer, length); - str[length] = '\0'; - c_str_ = str; - length_ = length; - } - - const char* c_str_; - size_t length_; -}; // class String - -// Streams a String to an ostream. Each '\0' character in the String -// is replaced with "\\0". -inline ::std::ostream& operator<<(::std::ostream& os, const String& str) { - if (str.c_str() == NULL) { - os << "(null)"; - } else { - const char* const c_str = str.c_str(); - for (size_t i = 0; i != str.length(); i++) { - if (c_str[i] == '\0') { - os << "\\0"; - } else { - os << c_str[i]; - } - } - } - return os; -} - -// Gets the content of the StrStream's buffer as a String. Each '\0' -// character in the buffer is replaced with "\\0". -String StrStreamToString(StrStream* stream); - -// Converts a streamable value to a String. A NULL pointer is -// converted to "(null)". When the input value is a ::string, -// ::std::string, ::wstring, or ::std::wstring object, each NUL -// character in it is replaced with "\\0". - -// Declared here but defined in gtest.h, so that it has access -// to the definition of the Message class, required by the ARM -// compiler. -template -String StreamableToString(const T& streamable); - -} // namespace internal -} // namespace testing - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h deleted file mode 100644 index 86b200be..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h +++ /dev/null @@ -1,966 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2009 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements a subset of TR1 tuple needed by Google Test and Google Mock. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ - -#include // For ::std::pair. - -// The compiler used in Symbian has a bug that prevents us from declaring the -// tuple template as a friend (it complains that tuple is redefined). This -// hack bypasses the bug by declaring the members that should otherwise be -// private as public. -#if defined(__SYMBIAN32__) -#define GTEST_DECLARE_TUPLE_AS_FRIEND_ public: -#else -#define GTEST_DECLARE_TUPLE_AS_FRIEND_ \ - template friend class tuple; \ - private: -#endif - -// GTEST_n_TUPLE_(T) is the type of an n-tuple. -#define GTEST_0_TUPLE_(T) tuple<> -#define GTEST_1_TUPLE_(T) tuple -#define GTEST_2_TUPLE_(T) tuple -#define GTEST_3_TUPLE_(T) tuple -#define GTEST_4_TUPLE_(T) tuple -#define GTEST_5_TUPLE_(T) tuple -#define GTEST_6_TUPLE_(T) tuple -#define GTEST_7_TUPLE_(T) tuple -#define GTEST_8_TUPLE_(T) tuple -#define GTEST_9_TUPLE_(T) tuple -#define GTEST_10_TUPLE_(T) tuple - -// GTEST_n_TYPENAMES_(T) declares a list of n typenames. -#define GTEST_0_TYPENAMES_(T) -#define GTEST_1_TYPENAMES_(T) typename T##0 -#define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1 -#define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2 -#define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3 -#define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4 -#define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5 -#define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6 -#define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, typename T##7 -#define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8 -#define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ - typename T##3, typename T##4, typename T##5, typename T##6, \ - typename T##7, typename T##8, typename T##9 - -// In theory, defining stuff in the ::std namespace is undefined -// behavior. We can do this as we are playing the role of a standard -// library vendor. -namespace std { -namespace tr1 { - -template -class tuple; - -// Anything in namespace gtest_internal is Google Test's INTERNAL -// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. -namespace gtest_internal { - -// ByRef::type is T if T is a reference; otherwise it's const T&. -template -struct ByRef { typedef const T& type; }; // NOLINT -template -struct ByRef { typedef T& type; }; // NOLINT - -// A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type - -// AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. -template -struct AddRef { typedef T& type; }; // NOLINT -template -struct AddRef { typedef T& type; }; // NOLINT - -// A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type - -// A helper for implementing get(). -template class Get; - -// A helper for implementing tuple_element. kIndexValid is true -// iff k < the number of fields in tuple type T. -template -struct TupleElement; - -template -struct TupleElement { typedef T0 type; }; - -template -struct TupleElement { typedef T1 type; }; - -template -struct TupleElement { typedef T2 type; }; - -template -struct TupleElement { typedef T3 type; }; - -template -struct TupleElement { typedef T4 type; }; - -template -struct TupleElement { typedef T5 type; }; - -template -struct TupleElement { typedef T6 type; }; - -template -struct TupleElement { typedef T7 type; }; - -template -struct TupleElement { typedef T8 type; }; - -template -struct TupleElement { typedef T9 type; }; - -} // namespace gtest_internal - -template <> -class tuple<> { - public: - tuple() {} - tuple(const tuple& /* t */) {} - tuple& operator=(const tuple& /* t */) { return *this; } -}; - -template -class GTEST_1_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {} - - tuple(const tuple& t) : f0_(t.f0_) {} - - template - tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_1_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) { - f0_ = t.f0_; - return *this; - } - - T0 f0_; -}; - -template -class GTEST_2_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0), - f1_(f1) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {} - - template - tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {} - template - tuple(const ::std::pair& p) : f0_(p.first), f1_(p.second) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_2_TUPLE_(U)& t) { - return CopyFrom(t); - } - template - tuple& operator=(const ::std::pair& p) { - f0_ = p.first; - f1_ = p.second; - return *this; - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - return *this; - } - - T0 f0_; - T1 f1_; -}; - -template -class GTEST_3_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - template - tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_3_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; -}; - -template -class GTEST_4_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {} - - template - tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_4_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; -}; - -template -class GTEST_5_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, - GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_) {} - - template - tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_5_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; -}; - -template -class GTEST_6_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_) {} - - template - tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_6_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; -}; - -template -class GTEST_7_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - template - tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_7_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; -}; - -template -class GTEST_8_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, - GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - template - tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_8_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; -}; - -template -class GTEST_9_TUPLE_(T) { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), - f5_(f5), f6_(f6), f7_(f7), f8_(f8) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - template - tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_9_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; -}; - -template -class tuple { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, - GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, - GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, - GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2), - f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {} - - tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), - f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {} - - template - tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), - f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), - f9_(t.f9_) {} - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_10_TUPLE_(U)& t) { - return CopyFrom(t); - } - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) { - f0_ = t.f0_; - f1_ = t.f1_; - f2_ = t.f2_; - f3_ = t.f3_; - f4_ = t.f4_; - f5_ = t.f5_; - f6_ = t.f6_; - f7_ = t.f7_; - f8_ = t.f8_; - f9_ = t.f9_; - return *this; - } - - T0 f0_; - T1 f1_; - T2 f2_; - T3 f3_; - T4 f4_; - T5 f5_; - T6 f6_; - T7 f7_; - T8 f8_; - T9 f9_; -}; - -// 6.1.3.2 Tuple creation functions. - -// Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't -// implement tie(). - -inline tuple<> make_tuple() { return tuple<>(); } - -template -inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) { - return GTEST_1_TUPLE_(T)(f0); -} - -template -inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) { - return GTEST_2_TUPLE_(T)(f0, f1); -} - -template -inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) { - return GTEST_3_TUPLE_(T)(f0, f1, f2); -} - -template -inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3) { - return GTEST_4_TUPLE_(T)(f0, f1, f2, f3); -} - -template -inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4) { - return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4); -} - -template -inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5) { - return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5); -} - -template -inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6) { - return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6); -} - -template -inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) { - return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7); -} - -template -inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8) { - return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8); -} - -template -inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, - const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, - const T8& f8, const T9& f9) { - return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9); -} - -// 6.1.3.3 Tuple helper classes. - -template struct tuple_size; - -template -struct tuple_size { static const int value = 0; }; - -template -struct tuple_size { static const int value = 1; }; - -template -struct tuple_size { static const int value = 2; }; - -template -struct tuple_size { static const int value = 3; }; - -template -struct tuple_size { static const int value = 4; }; - -template -struct tuple_size { static const int value = 5; }; - -template -struct tuple_size { static const int value = 6; }; - -template -struct tuple_size { static const int value = 7; }; - -template -struct tuple_size { static const int value = 8; }; - -template -struct tuple_size { static const int value = 9; }; - -template -struct tuple_size { static const int value = 10; }; - -template -struct tuple_element { - typedef typename gtest_internal::TupleElement< - k < (tuple_size::value), k, Tuple>::type type; -}; - -#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element::type - -// 6.1.3.4 Element access. - -namespace gtest_internal { - -template <> -class Get<0> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - Field(Tuple& t) { return t.f0_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) - ConstField(const Tuple& t) { return t.f0_; } -}; - -template <> -class Get<1> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - Field(Tuple& t) { return t.f1_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) - ConstField(const Tuple& t) { return t.f1_; } -}; - -template <> -class Get<2> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - Field(Tuple& t) { return t.f2_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) - ConstField(const Tuple& t) { return t.f2_; } -}; - -template <> -class Get<3> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - Field(Tuple& t) { return t.f3_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) - ConstField(const Tuple& t) { return t.f3_; } -}; - -template <> -class Get<4> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - Field(Tuple& t) { return t.f4_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) - ConstField(const Tuple& t) { return t.f4_; } -}; - -template <> -class Get<5> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - Field(Tuple& t) { return t.f5_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) - ConstField(const Tuple& t) { return t.f5_; } -}; - -template <> -class Get<6> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - Field(Tuple& t) { return t.f6_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) - ConstField(const Tuple& t) { return t.f6_; } -}; - -template <> -class Get<7> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - Field(Tuple& t) { return t.f7_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) - ConstField(const Tuple& t) { return t.f7_; } -}; - -template <> -class Get<8> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - Field(Tuple& t) { return t.f8_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) - ConstField(const Tuple& t) { return t.f8_; } -}; - -template <> -class Get<9> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - Field(Tuple& t) { return t.f9_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) - ConstField(const Tuple& t) { return t.f9_; } -}; - -} // namespace gtest_internal - -template -GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::Field(t); -} - -template -GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) -get(const GTEST_10_TUPLE_(T)& t) { - return gtest_internal::Get::ConstField(t); -} - -// 6.1.3.5 Relational operators - -// We only implement == and !=, as we don't have a need for the rest yet. - -namespace gtest_internal { - -// SameSizeTuplePrefixComparator::Eq(t1, t2) returns true if the -// first k fields of t1 equals the first k fields of t2. -// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if -// k1 != k2. -template -struct SameSizeTuplePrefixComparator; - -template <> -struct SameSizeTuplePrefixComparator<0, 0> { - template - static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { - return true; - } -}; - -template -struct SameSizeTuplePrefixComparator { - template - static bool Eq(const Tuple1& t1, const Tuple2& t2) { - return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); - } -}; - -} // namespace gtest_internal - -template -inline bool operator==(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { - return gtest_internal::SameSizeTuplePrefixComparator< - tuple_size::value, - tuple_size::value>::Eq(t, u); -} - -template -inline bool operator!=(const GTEST_10_TUPLE_(T)& t, - const GTEST_10_TUPLE_(U)& u) { return !(t == u); } - -// 6.1.4 Pairs. -// Unimplemented. - -} // namespace tr1 -} // namespace std - -#undef GTEST_0_TUPLE_ -#undef GTEST_1_TUPLE_ -#undef GTEST_2_TUPLE_ -#undef GTEST_3_TUPLE_ -#undef GTEST_4_TUPLE_ -#undef GTEST_5_TUPLE_ -#undef GTEST_6_TUPLE_ -#undef GTEST_7_TUPLE_ -#undef GTEST_8_TUPLE_ -#undef GTEST_9_TUPLE_ -#undef GTEST_10_TUPLE_ - -#undef GTEST_0_TYPENAMES_ -#undef GTEST_1_TYPENAMES_ -#undef GTEST_2_TYPENAMES_ -#undef GTEST_3_TYPENAMES_ -#undef GTEST_4_TYPENAMES_ -#undef GTEST_5_TYPENAMES_ -#undef GTEST_6_TYPENAMES_ -#undef GTEST_7_TYPENAMES_ -#undef GTEST_8_TYPENAMES_ -#undef GTEST_9_TYPENAMES_ -#undef GTEST_10_TYPENAMES_ - -#undef GTEST_DECLARE_TUPLE_AS_FRIEND_ -#undef GTEST_BY_REF_ -#undef GTEST_ADD_REF_ -#undef GTEST_TUPLE_ELEMENT_ - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h.pump deleted file mode 100644 index 12821d8b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-tuple.h.pump +++ /dev/null @@ -1,335 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 10 $$ Maximum number of tuple fields we want to support. -$$ This meta comment fixes auto-indentation in Emacs. }} -// Copyright 2009 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Implements a subset of TR1 tuple needed by Google Test and Google Mock. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ - -#include // For ::std::pair. - -// The compiler used in Symbian 5th Edition (__S60_50__) has a bug -// that prevents us from declaring the tuple template as a friend (it -// complains that tuple is redefined). This hack bypasses the bug by -// declaring the members that should otherwise be private as public. -#if defined(__SYMBIAN32__) && __S60_50__ -#define GTEST_DECLARE_TUPLE_AS_FRIEND_ public: -#else -#define GTEST_DECLARE_TUPLE_AS_FRIEND_ \ - template friend class tuple; \ - private: -#endif - - -$range i 0..n-1 -$range j 0..n -$range k 1..n -// GTEST_n_TUPLE_(T) is the type of an n-tuple. -#define GTEST_0_TUPLE_(T) tuple<> - -$for k [[ -$range m 0..k-1 -$range m2 k..n-1 -#define GTEST_$(k)_TUPLE_(T) tuple<$for m, [[T##$m]]$for m2 [[, void]]> - -]] - -// GTEST_n_TYPENAMES_(T) declares a list of n typenames. - -$for j [[ -$range m 0..j-1 -#define GTEST_$(j)_TYPENAMES_(T) $for m, [[typename T##$m]] - - -]] - -// In theory, defining stuff in the ::std namespace is undefined -// behavior. We can do this as we are playing the role of a standard -// library vendor. -namespace std { -namespace tr1 { - -template <$for i, [[typename T$i = void]]> -class tuple; - -// Anything in namespace gtest_internal is Google Test's INTERNAL -// IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. -namespace gtest_internal { - -// ByRef::type is T if T is a reference; otherwise it's const T&. -template -struct ByRef { typedef const T& type; }; // NOLINT -template -struct ByRef { typedef T& type; }; // NOLINT - -// A handy wrapper for ByRef. -#define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef::type - -// AddRef::type is T if T is a reference; otherwise it's T&. This -// is the same as tr1::add_reference::type. -template -struct AddRef { typedef T& type; }; // NOLINT -template -struct AddRef { typedef T& type; }; // NOLINT - -// A handy wrapper for AddRef. -#define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef::type - -// A helper for implementing get(). -template class Get; - -// A helper for implementing tuple_element. kIndexValid is true -// iff k < the number of fields in tuple type T. -template -struct TupleElement; - - -$for i [[ -template -struct TupleElement [[]] -{ typedef T$i type; }; - - -]] -} // namespace gtest_internal - -template <> -class tuple<> { - public: - tuple() {} - tuple(const tuple& /* t */) {} - tuple& operator=(const tuple& /* t */) { return *this; } -}; - - -$for k [[ -$range m 0..k-1 -template -class $if k < n [[GTEST_$(k)_TUPLE_(T)]] $else [[tuple]] { - public: - template friend class gtest_internal::Get; - - tuple() {} - - explicit tuple($for m, [[GTEST_BY_REF_(T$m) f$m]]) : [[]] -$for m, [[f$(m)_(f$m)]] {} - - tuple(const tuple& t) : $for m, [[f$(m)_(t.f$(m)_)]] {} - - template - tuple(const GTEST_$(k)_TUPLE_(U)& t) : $for m, [[f$(m)_(t.f$(m)_)]] {} - -$if k == 2 [[ - template - tuple(const ::std::pair& p) : f0_(p.first), f1_(p.second) {} - -]] - - tuple& operator=(const tuple& t) { return CopyFrom(t); } - - template - tuple& operator=(const GTEST_$(k)_TUPLE_(U)& t) { - return CopyFrom(t); - } - -$if k == 2 [[ - template - tuple& operator=(const ::std::pair& p) { - f0_ = p.first; - f1_ = p.second; - return *this; - } - -]] - - GTEST_DECLARE_TUPLE_AS_FRIEND_ - - template - tuple& CopyFrom(const GTEST_$(k)_TUPLE_(U)& t) { - -$for m [[ - f$(m)_ = t.f$(m)_; - -]] - return *this; - } - - -$for m [[ - T$m f$(m)_; - -]] -}; - - -]] -// 6.1.3.2 Tuple creation functions. - -// Known limitations: we don't support passing an -// std::tr1::reference_wrapper to make_tuple(). And we don't -// implement tie(). - -inline tuple<> make_tuple() { return tuple<>(); } - -$for k [[ -$range m 0..k-1 - -template -inline GTEST_$(k)_TUPLE_(T) make_tuple($for m, [[const T$m& f$m]]) { - return GTEST_$(k)_TUPLE_(T)($for m, [[f$m]]); -} - -]] - -// 6.1.3.3 Tuple helper classes. - -template struct tuple_size; - - -$for j [[ -template -struct tuple_size { static const int value = $j; }; - - -]] -template -struct tuple_element { - typedef typename gtest_internal::TupleElement< - k < (tuple_size::value), k, Tuple>::type type; -}; - -#define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element::type - -// 6.1.3.4 Element access. - -namespace gtest_internal { - - -$for i [[ -template <> -class Get<$i> { - public: - template - static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple)) - Field(Tuple& t) { return t.f$(i)_; } // NOLINT - - template - static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_($i, Tuple)) - ConstField(const Tuple& t) { return t.f$(i)_; } -}; - - -]] -} // namespace gtest_internal - -template -GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T))) -get(GTEST_$(n)_TUPLE_(T)& t) { - return gtest_internal::Get::Field(t); -} - -template -GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_$(n)_TUPLE_(T))) -get(const GTEST_$(n)_TUPLE_(T)& t) { - return gtest_internal::Get::ConstField(t); -} - -// 6.1.3.5 Relational operators - -// We only implement == and !=, as we don't have a need for the rest yet. - -namespace gtest_internal { - -// SameSizeTuplePrefixComparator::Eq(t1, t2) returns true if the -// first k fields of t1 equals the first k fields of t2. -// SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if -// k1 != k2. -template -struct SameSizeTuplePrefixComparator; - -template <> -struct SameSizeTuplePrefixComparator<0, 0> { - template - static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { - return true; - } -}; - -template -struct SameSizeTuplePrefixComparator { - template - static bool Eq(const Tuple1& t1, const Tuple2& t2) { - return SameSizeTuplePrefixComparator::Eq(t1, t2) && - ::std::tr1::get(t1) == ::std::tr1::get(t2); - } -}; - -} // namespace gtest_internal - -template -inline bool operator==(const GTEST_$(n)_TUPLE_(T)& t, - const GTEST_$(n)_TUPLE_(U)& u) { - return gtest_internal::SameSizeTuplePrefixComparator< - tuple_size::value, - tuple_size::value>::Eq(t, u); -} - -template -inline bool operator!=(const GTEST_$(n)_TUPLE_(T)& t, - const GTEST_$(n)_TUPLE_(U)& u) { return !(t == u); } - -// 6.1.4 Pairs. -// Unimplemented. - -} // namespace tr1 -} // namespace std - - -$for j [[ -#undef GTEST_$(j)_TUPLE_ - -]] - - -$for j [[ -#undef GTEST_$(j)_TYPENAMES_ - -]] - -#undef GTEST_DECLARE_TUPLE_AS_FRIEND_ -#undef GTEST_BY_REF_ -#undef GTEST_ADD_REF_ -#undef GTEST_TUPLE_ELEMENT_ - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h deleted file mode 100644 index f1b1bedd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h +++ /dev/null @@ -1,3321 +0,0 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! - -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Type utilities needed for implementing typed and type-parameterized -// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently we support at most 50 types in a list, and at most 50 -// type-parameterized tests in one type-parameterized test case. -// Please contact googletestframework@googlegroups.com if you need -// more. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - -#include -#include - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// #ifdef __GNUC__ is too general here. It is possible to use gcc without using -// libstdc++ (which is where cxxabi.h comes from). -#ifdef __GLIBCXX__ -#include -#endif // __GLIBCXX__ - -#include - -namespace testing { -namespace internal { - -// AssertyTypeEq::type is defined iff T1 and T2 are the same -// type. This can be used as a compile-time assertion to ensure that -// two types are equal. - -template -struct AssertTypeEq; - -template -struct AssertTypeEq { - typedef bool type; -}; - -// GetTypeName() returns a human-readable name of type T. -template -String GetTypeName() { -#if GTEST_HAS_RTTI - - const char* const name = typeid(T).name(); -#ifdef __GLIBCXX__ - int status = 0; - // gcc's implementation of typeid(T).name() mangles the type name, - // so we have to demangle it. - char* const readable_name = abi::__cxa_demangle(name, 0, 0, &status); - const String name_str(status == 0 ? readable_name : name); - free(readable_name); - return name_str; -#else - return name; -#endif // __GLIBCXX__ - -#else - return ""; -#endif // GTEST_HAS_RTTI -} - -// A unique type used as the default value for the arguments of class -// template Types. This allows us to simulate variadic templates -// (e.g. Types, Type, and etc), which C++ doesn't -// support directly. -struct None {}; - -// The following family of struct and struct templates are used to -// represent type lists. In particular, TypesN -// represents a type list with N types (T1, T2, ..., and TN) in it. -// Except for Types0, every struct in the family has two member types: -// Head for the first type in the list, and Tail for the rest of the -// list. - -// The empty type list. -struct Types0 {}; - -// Type lists of length 1, 2, 3, and so on. - -template -struct Types1 { - typedef T1 Head; - typedef Types0 Tail; -}; -template -struct Types2 { - typedef T1 Head; - typedef Types1 Tail; -}; - -template -struct Types3 { - typedef T1 Head; - typedef Types2 Tail; -}; - -template -struct Types4 { - typedef T1 Head; - typedef Types3 Tail; -}; - -template -struct Types5 { - typedef T1 Head; - typedef Types4 Tail; -}; - -template -struct Types6 { - typedef T1 Head; - typedef Types5 Tail; -}; - -template -struct Types7 { - typedef T1 Head; - typedef Types6 Tail; -}; - -template -struct Types8 { - typedef T1 Head; - typedef Types7 Tail; -}; - -template -struct Types9 { - typedef T1 Head; - typedef Types8 Tail; -}; - -template -struct Types10 { - typedef T1 Head; - typedef Types9 Tail; -}; - -template -struct Types11 { - typedef T1 Head; - typedef Types10 Tail; -}; - -template -struct Types12 { - typedef T1 Head; - typedef Types11 Tail; -}; - -template -struct Types13 { - typedef T1 Head; - typedef Types12 Tail; -}; - -template -struct Types14 { - typedef T1 Head; - typedef Types13 Tail; -}; - -template -struct Types15 { - typedef T1 Head; - typedef Types14 Tail; -}; - -template -struct Types16 { - typedef T1 Head; - typedef Types15 Tail; -}; - -template -struct Types17 { - typedef T1 Head; - typedef Types16 Tail; -}; - -template -struct Types18 { - typedef T1 Head; - typedef Types17 Tail; -}; - -template -struct Types19 { - typedef T1 Head; - typedef Types18 Tail; -}; - -template -struct Types20 { - typedef T1 Head; - typedef Types19 Tail; -}; - -template -struct Types21 { - typedef T1 Head; - typedef Types20 Tail; -}; - -template -struct Types22 { - typedef T1 Head; - typedef Types21 Tail; -}; - -template -struct Types23 { - typedef T1 Head; - typedef Types22 Tail; -}; - -template -struct Types24 { - typedef T1 Head; - typedef Types23 Tail; -}; - -template -struct Types25 { - typedef T1 Head; - typedef Types24 Tail; -}; - -template -struct Types26 { - typedef T1 Head; - typedef Types25 Tail; -}; - -template -struct Types27 { - typedef T1 Head; - typedef Types26 Tail; -}; - -template -struct Types28 { - typedef T1 Head; - typedef Types27 Tail; -}; - -template -struct Types29 { - typedef T1 Head; - typedef Types28 Tail; -}; - -template -struct Types30 { - typedef T1 Head; - typedef Types29 Tail; -}; - -template -struct Types31 { - typedef T1 Head; - typedef Types30 Tail; -}; - -template -struct Types32 { - typedef T1 Head; - typedef Types31 Tail; -}; - -template -struct Types33 { - typedef T1 Head; - typedef Types32 Tail; -}; - -template -struct Types34 { - typedef T1 Head; - typedef Types33 Tail; -}; - -template -struct Types35 { - typedef T1 Head; - typedef Types34 Tail; -}; - -template -struct Types36 { - typedef T1 Head; - typedef Types35 Tail; -}; - -template -struct Types37 { - typedef T1 Head; - typedef Types36 Tail; -}; - -template -struct Types38 { - typedef T1 Head; - typedef Types37 Tail; -}; - -template -struct Types39 { - typedef T1 Head; - typedef Types38 Tail; -}; - -template -struct Types40 { - typedef T1 Head; - typedef Types39 Tail; -}; - -template -struct Types41 { - typedef T1 Head; - typedef Types40 Tail; -}; - -template -struct Types42 { - typedef T1 Head; - typedef Types41 Tail; -}; - -template -struct Types43 { - typedef T1 Head; - typedef Types42 Tail; -}; - -template -struct Types44 { - typedef T1 Head; - typedef Types43 Tail; -}; - -template -struct Types45 { - typedef T1 Head; - typedef Types44 Tail; -}; - -template -struct Types46 { - typedef T1 Head; - typedef Types45 Tail; -}; - -template -struct Types47 { - typedef T1 Head; - typedef Types46 Tail; -}; - -template -struct Types48 { - typedef T1 Head; - typedef Types47 Tail; -}; - -template -struct Types49 { - typedef T1 Head; - typedef Types48 Tail; -}; - -template -struct Types50 { - typedef T1 Head; - typedef Types49 Tail; -}; - - -} // namespace internal - -// We don't want to require the users to write TypesN<...> directly, -// as that would require them to count the length. Types<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Types -// will appear as Types in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Types, and Google Test will translate -// that to TypesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Types template. -template -struct Types { - typedef internal::Types50 type; -}; - -template <> -struct Types { - typedef internal::Types0 type; -}; -template -struct Types { - typedef internal::Types1 type; -}; -template -struct Types { - typedef internal::Types2 type; -}; -template -struct Types { - typedef internal::Types3 type; -}; -template -struct Types { - typedef internal::Types4 type; -}; -template -struct Types { - typedef internal::Types5 type; -}; -template -struct Types { - typedef internal::Types6 type; -}; -template -struct Types { - typedef internal::Types7 type; -}; -template -struct Types { - typedef internal::Types8 type; -}; -template -struct Types { - typedef internal::Types9 type; -}; -template -struct Types { - typedef internal::Types10 type; -}; -template -struct Types { - typedef internal::Types11 type; -}; -template -struct Types { - typedef internal::Types12 type; -}; -template -struct Types { - typedef internal::Types13 type; -}; -template -struct Types { - typedef internal::Types14 type; -}; -template -struct Types { - typedef internal::Types15 type; -}; -template -struct Types { - typedef internal::Types16 type; -}; -template -struct Types { - typedef internal::Types17 type; -}; -template -struct Types { - typedef internal::Types18 type; -}; -template -struct Types { - typedef internal::Types19 type; -}; -template -struct Types { - typedef internal::Types20 type; -}; -template -struct Types { - typedef internal::Types21 type; -}; -template -struct Types { - typedef internal::Types22 type; -}; -template -struct Types { - typedef internal::Types23 type; -}; -template -struct Types { - typedef internal::Types24 type; -}; -template -struct Types { - typedef internal::Types25 type; -}; -template -struct Types { - typedef internal::Types26 type; -}; -template -struct Types { - typedef internal::Types27 type; -}; -template -struct Types { - typedef internal::Types28 type; -}; -template -struct Types { - typedef internal::Types29 type; -}; -template -struct Types { - typedef internal::Types30 type; -}; -template -struct Types { - typedef internal::Types31 type; -}; -template -struct Types { - typedef internal::Types32 type; -}; -template -struct Types { - typedef internal::Types33 type; -}; -template -struct Types { - typedef internal::Types34 type; -}; -template -struct Types { - typedef internal::Types35 type; -}; -template -struct Types { - typedef internal::Types36 type; -}; -template -struct Types { - typedef internal::Types37 type; -}; -template -struct Types { - typedef internal::Types38 type; -}; -template -struct Types { - typedef internal::Types39 type; -}; -template -struct Types { - typedef internal::Types40 type; -}; -template -struct Types { - typedef internal::Types41 type; -}; -template -struct Types { - typedef internal::Types42 type; -}; -template -struct Types { - typedef internal::Types43 type; -}; -template -struct Types { - typedef internal::Types44 type; -}; -template -struct Types { - typedef internal::Types45 type; -}; -template -struct Types { - typedef internal::Types46 type; -}; -template -struct Types { - typedef internal::Types47 type; -}; -template -struct Types { - typedef internal::Types48 type; -}; -template -struct Types { - typedef internal::Types49 type; -}; - -namespace internal { - -#define GTEST_TEMPLATE_ template class - -// The template "selector" struct TemplateSel is used to -// represent Tmpl, which must be a class template with one type -// parameter, as a type. TemplateSel::Bind::type is defined -// as the type Tmpl. This allows us to actually instantiate the -// template "selected" by TemplateSel. -// -// This trick is necessary for simulating typedef for class templates, -// which C++ doesn't support directly. -template -struct TemplateSel { - template - struct Bind { - typedef Tmpl type; - }; -}; - -#define GTEST_BIND_(TmplSel, T) \ - TmplSel::template Bind::type - -// A unique struct template used as the default value for the -// arguments of class template Templates. This allows us to simulate -// variadic templates (e.g. Templates, Templates, -// and etc), which C++ doesn't support directly. -template -struct NoneT {}; - -// The following family of struct and struct templates are used to -// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except -// for Templates0, every struct in the family has two member types: -// Head for the selector of the first template in the list, and Tail -// for the rest of the list. - -// The empty template list. -struct Templates0 {}; - -// Template lists of length 1, 2, 3, and so on. - -template -struct Templates1 { - typedef TemplateSel Head; - typedef Templates0 Tail; -}; -template -struct Templates2 { - typedef TemplateSel Head; - typedef Templates1 Tail; -}; - -template -struct Templates3 { - typedef TemplateSel Head; - typedef Templates2 Tail; -}; - -template -struct Templates4 { - typedef TemplateSel Head; - typedef Templates3 Tail; -}; - -template -struct Templates5 { - typedef TemplateSel Head; - typedef Templates4 Tail; -}; - -template -struct Templates6 { - typedef TemplateSel Head; - typedef Templates5 Tail; -}; - -template -struct Templates7 { - typedef TemplateSel Head; - typedef Templates6 Tail; -}; - -template -struct Templates8 { - typedef TemplateSel Head; - typedef Templates7 Tail; -}; - -template -struct Templates9 { - typedef TemplateSel Head; - typedef Templates8 Tail; -}; - -template -struct Templates10 { - typedef TemplateSel Head; - typedef Templates9 Tail; -}; - -template -struct Templates11 { - typedef TemplateSel Head; - typedef Templates10 Tail; -}; - -template -struct Templates12 { - typedef TemplateSel Head; - typedef Templates11 Tail; -}; - -template -struct Templates13 { - typedef TemplateSel Head; - typedef Templates12 Tail; -}; - -template -struct Templates14 { - typedef TemplateSel Head; - typedef Templates13 Tail; -}; - -template -struct Templates15 { - typedef TemplateSel Head; - typedef Templates14 Tail; -}; - -template -struct Templates16 { - typedef TemplateSel Head; - typedef Templates15 Tail; -}; - -template -struct Templates17 { - typedef TemplateSel Head; - typedef Templates16 Tail; -}; - -template -struct Templates18 { - typedef TemplateSel Head; - typedef Templates17 Tail; -}; - -template -struct Templates19 { - typedef TemplateSel Head; - typedef Templates18 Tail; -}; - -template -struct Templates20 { - typedef TemplateSel Head; - typedef Templates19 Tail; -}; - -template -struct Templates21 { - typedef TemplateSel Head; - typedef Templates20 Tail; -}; - -template -struct Templates22 { - typedef TemplateSel Head; - typedef Templates21 Tail; -}; - -template -struct Templates23 { - typedef TemplateSel Head; - typedef Templates22 Tail; -}; - -template -struct Templates24 { - typedef TemplateSel Head; - typedef Templates23 Tail; -}; - -template -struct Templates25 { - typedef TemplateSel Head; - typedef Templates24 Tail; -}; - -template -struct Templates26 { - typedef TemplateSel Head; - typedef Templates25 Tail; -}; - -template -struct Templates27 { - typedef TemplateSel Head; - typedef Templates26 Tail; -}; - -template -struct Templates28 { - typedef TemplateSel Head; - typedef Templates27 Tail; -}; - -template -struct Templates29 { - typedef TemplateSel Head; - typedef Templates28 Tail; -}; - -template -struct Templates30 { - typedef TemplateSel Head; - typedef Templates29 Tail; -}; - -template -struct Templates31 { - typedef TemplateSel Head; - typedef Templates30 Tail; -}; - -template -struct Templates32 { - typedef TemplateSel Head; - typedef Templates31 Tail; -}; - -template -struct Templates33 { - typedef TemplateSel Head; - typedef Templates32 Tail; -}; - -template -struct Templates34 { - typedef TemplateSel Head; - typedef Templates33 Tail; -}; - -template -struct Templates35 { - typedef TemplateSel Head; - typedef Templates34 Tail; -}; - -template -struct Templates36 { - typedef TemplateSel Head; - typedef Templates35 Tail; -}; - -template -struct Templates37 { - typedef TemplateSel Head; - typedef Templates36 Tail; -}; - -template -struct Templates38 { - typedef TemplateSel Head; - typedef Templates37 Tail; -}; - -template -struct Templates39 { - typedef TemplateSel Head; - typedef Templates38 Tail; -}; - -template -struct Templates40 { - typedef TemplateSel Head; - typedef Templates39 Tail; -}; - -template -struct Templates41 { - typedef TemplateSel Head; - typedef Templates40 Tail; -}; - -template -struct Templates42 { - typedef TemplateSel Head; - typedef Templates41 Tail; -}; - -template -struct Templates43 { - typedef TemplateSel Head; - typedef Templates42 Tail; -}; - -template -struct Templates44 { - typedef TemplateSel Head; - typedef Templates43 Tail; -}; - -template -struct Templates45 { - typedef TemplateSel Head; - typedef Templates44 Tail; -}; - -template -struct Templates46 { - typedef TemplateSel Head; - typedef Templates45 Tail; -}; - -template -struct Templates47 { - typedef TemplateSel Head; - typedef Templates46 Tail; -}; - -template -struct Templates48 { - typedef TemplateSel Head; - typedef Templates47 Tail; -}; - -template -struct Templates49 { - typedef TemplateSel Head; - typedef Templates48 Tail; -}; - -template -struct Templates50 { - typedef TemplateSel Head; - typedef Templates49 Tail; -}; - - -// We don't want to require the users to write TemplatesN<...> directly, -// as that would require them to count the length. Templates<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Templates -// will appear as Templates in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Templates, and Google Test will translate -// that to TemplatesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Templates template. -template -struct Templates { - typedef Templates50 type; -}; - -template <> -struct Templates { - typedef Templates0 type; -}; -template -struct Templates { - typedef Templates1 type; -}; -template -struct Templates { - typedef Templates2 type; -}; -template -struct Templates { - typedef Templates3 type; -}; -template -struct Templates { - typedef Templates4 type; -}; -template -struct Templates { - typedef Templates5 type; -}; -template -struct Templates { - typedef Templates6 type; -}; -template -struct Templates { - typedef Templates7 type; -}; -template -struct Templates { - typedef Templates8 type; -}; -template -struct Templates { - typedef Templates9 type; -}; -template -struct Templates { - typedef Templates10 type; -}; -template -struct Templates { - typedef Templates11 type; -}; -template -struct Templates { - typedef Templates12 type; -}; -template -struct Templates { - typedef Templates13 type; -}; -template -struct Templates { - typedef Templates14 type; -}; -template -struct Templates { - typedef Templates15 type; -}; -template -struct Templates { - typedef Templates16 type; -}; -template -struct Templates { - typedef Templates17 type; -}; -template -struct Templates { - typedef Templates18 type; -}; -template -struct Templates { - typedef Templates19 type; -}; -template -struct Templates { - typedef Templates20 type; -}; -template -struct Templates { - typedef Templates21 type; -}; -template -struct Templates { - typedef Templates22 type; -}; -template -struct Templates { - typedef Templates23 type; -}; -template -struct Templates { - typedef Templates24 type; -}; -template -struct Templates { - typedef Templates25 type; -}; -template -struct Templates { - typedef Templates26 type; -}; -template -struct Templates { - typedef Templates27 type; -}; -template -struct Templates { - typedef Templates28 type; -}; -template -struct Templates { - typedef Templates29 type; -}; -template -struct Templates { - typedef Templates30 type; -}; -template -struct Templates { - typedef Templates31 type; -}; -template -struct Templates { - typedef Templates32 type; -}; -template -struct Templates { - typedef Templates33 type; -}; -template -struct Templates { - typedef Templates34 type; -}; -template -struct Templates { - typedef Templates35 type; -}; -template -struct Templates { - typedef Templates36 type; -}; -template -struct Templates { - typedef Templates37 type; -}; -template -struct Templates { - typedef Templates38 type; -}; -template -struct Templates { - typedef Templates39 type; -}; -template -struct Templates { - typedef Templates40 type; -}; -template -struct Templates { - typedef Templates41 type; -}; -template -struct Templates { - typedef Templates42 type; -}; -template -struct Templates { - typedef Templates43 type; -}; -template -struct Templates { - typedef Templates44 type; -}; -template -struct Templates { - typedef Templates45 type; -}; -template -struct Templates { - typedef Templates46 type; -}; -template -struct Templates { - typedef Templates47 type; -}; -template -struct Templates { - typedef Templates48 type; -}; -template -struct Templates { - typedef Templates49 type; -}; - -// The TypeList template makes it possible to use either a single type -// or a Types<...> list in TYPED_TEST_CASE() and -// INSTANTIATE_TYPED_TEST_CASE_P(). - -template -struct TypeList { typedef Types1 type; }; - -template -struct TypeList > { - typedef typename Types::type type; -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h.pump b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h.pump deleted file mode 100644 index 3eb5dcee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/include/gtest/internal/gtest-type-util.h.pump +++ /dev/null @@ -1,289 +0,0 @@ -$$ -*- mode: c++; -*- -$var n = 50 $$ Maximum length of type lists we want to support. -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Type utilities needed for implementing typed and type-parameterized -// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! -// -// Currently we support at most $n types in a list, and at most $n -// type-parameterized tests in one type-parameterized test case. -// Please contact googletestframework@googlegroups.com if you need -// more. - -#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ -#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ - -#include -#include - -#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -// #ifdef __GNUC__ is too general here. It is possible to use gcc without using -// libstdc++ (which is where cxxabi.h comes from). -#ifdef __GLIBCXX__ -#include -#endif // __GLIBCXX__ - -#include - -namespace testing { -namespace internal { - -// AssertyTypeEq::type is defined iff T1 and T2 are the same -// type. This can be used as a compile-time assertion to ensure that -// two types are equal. - -template -struct AssertTypeEq; - -template -struct AssertTypeEq { - typedef bool type; -}; - -// GetTypeName() returns a human-readable name of type T. -template -String GetTypeName() { -#if GTEST_HAS_RTTI - - const char* const name = typeid(T).name(); -#ifdef __GLIBCXX__ - int status = 0; - // gcc's implementation of typeid(T).name() mangles the type name, - // so we have to demangle it. - char* const readable_name = abi::__cxa_demangle(name, 0, 0, &status); - const String name_str(status == 0 ? readable_name : name); - free(readable_name); - return name_str; -#else - return name; -#endif // __GLIBCXX__ - -#else - return ""; -#endif // GTEST_HAS_RTTI -} - -// A unique type used as the default value for the arguments of class -// template Types. This allows us to simulate variadic templates -// (e.g. Types, Type, and etc), which C++ doesn't -// support directly. -struct None {}; - -// The following family of struct and struct templates are used to -// represent type lists. In particular, TypesN -// represents a type list with N types (T1, T2, ..., and TN) in it. -// Except for Types0, every struct in the family has two member types: -// Head for the first type in the list, and Tail for the rest of the -// list. - -// The empty type list. -struct Types0 {}; - -// Type lists of length 1, 2, 3, and so on. - -template -struct Types1 { - typedef T1 Head; - typedef Types0 Tail; -}; - -$range i 2..n - -$for i [[ -$range j 1..i -$range k 2..i -template <$for j, [[typename T$j]]> -struct Types$i { - typedef T1 Head; - typedef Types$(i-1)<$for k, [[T$k]]> Tail; -}; - - -]] - -} // namespace internal - -// We don't want to require the users to write TypesN<...> directly, -// as that would require them to count the length. Types<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Types -// will appear as Types in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Types, and Google Test will translate -// that to TypesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Types template. - -$range i 1..n -template <$for i, [[typename T$i = internal::None]]> -struct Types { - typedef internal::Types$n<$for i, [[T$i]]> type; -}; - -template <> -struct Types<$for i, [[internal::None]]> { - typedef internal::Types0 type; -}; - -$range i 1..n-1 -$for i [[ -$range j 1..i -$range k i+1..n -template <$for j, [[typename T$j]]> -struct Types<$for j, [[T$j]]$for k[[, internal::None]]> { - typedef internal::Types$i<$for j, [[T$j]]> type; -}; - -]] - -namespace internal { - -#define GTEST_TEMPLATE_ template class - -// The template "selector" struct TemplateSel is used to -// represent Tmpl, which must be a class template with one type -// parameter, as a type. TemplateSel::Bind::type is defined -// as the type Tmpl. This allows us to actually instantiate the -// template "selected" by TemplateSel. -// -// This trick is necessary for simulating typedef for class templates, -// which C++ doesn't support directly. -template -struct TemplateSel { - template - struct Bind { - typedef Tmpl type; - }; -}; - -#define GTEST_BIND_(TmplSel, T) \ - TmplSel::template Bind::type - -// A unique struct template used as the default value for the -// arguments of class template Templates. This allows us to simulate -// variadic templates (e.g. Templates, Templates, -// and etc), which C++ doesn't support directly. -template -struct NoneT {}; - -// The following family of struct and struct templates are used to -// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except -// for Templates0, every struct in the family has two member types: -// Head for the selector of the first template in the list, and Tail -// for the rest of the list. - -// The empty template list. -struct Templates0 {}; - -// Template lists of length 1, 2, 3, and so on. - -template -struct Templates1 { - typedef TemplateSel Head; - typedef Templates0 Tail; -}; - -$range i 2..n - -$for i [[ -$range j 1..i -$range k 2..i -template <$for j, [[GTEST_TEMPLATE_ T$j]]> -struct Templates$i { - typedef TemplateSel Head; - typedef Templates$(i-1)<$for k, [[T$k]]> Tail; -}; - - -]] - -// We don't want to require the users to write TemplatesN<...> directly, -// as that would require them to count the length. Templates<...> is much -// easier to write, but generates horrible messages when there is a -// compiler error, as gcc insists on printing out each template -// argument, even if it has the default value (this means Templates -// will appear as Templates in the compiler -// errors). -// -// Our solution is to combine the best part of the two approaches: a -// user would write Templates, and Google Test will translate -// that to TemplatesN internally to make error messages -// readable. The translation is done by the 'type' member of the -// Templates template. - -$range i 1..n -template <$for i, [[GTEST_TEMPLATE_ T$i = NoneT]]> -struct Templates { - typedef Templates$n<$for i, [[T$i]]> type; -}; - -template <> -struct Templates<$for i, [[NoneT]]> { - typedef Templates0 type; -}; - -$range i 1..n-1 -$for i [[ -$range j 1..i -$range k i+1..n -template <$for j, [[GTEST_TEMPLATE_ T$j]]> -struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> { - typedef Templates$i<$for j, [[T$j]]> type; -}; - -]] - -// The TypeList template makes it possible to use either a single type -// or a Types<...> list in TYPED_TEST_CASE() and -// INSTANTIATE_TYPED_TEST_CASE_P(). - -template -struct TypeList { typedef Types1 type; }; - - -$range i 1..n -template <$for i, [[typename T$i]]> -struct TypeList > { - typedef typename Types<$for i, [[T$i]]>::type type; -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/acx_pthread.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/acx_pthread.m4 deleted file mode 100644 index 2cf20de1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/acx_pthread.m4 +++ /dev/null @@ -1,363 +0,0 @@ -# This was retrieved from -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi -# See also (perhaps for new versions?) -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi -# -# We've rewritten the inconsistency check code (from avahi), to work -# more broadly. In particular, it no longer assumes ld accepts -zdefs. -# This caused a restructing of the code, but the functionality has only -# changed a little. - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl @summary figure out how to build C programs using POSIX threads -dnl -dnl This macro figures out how to build C programs using POSIX threads. -dnl It sets the PTHREAD_LIBS output variable to the threads library and -dnl linker flags, and the PTHREAD_CFLAGS output variable to any special -dnl C compiler flags that are needed. (The user can also force certain -dnl compiler flags/libs to be tested by setting these environment -dnl variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. e.g. you should link -dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS -dnl $LIBS -dnl -dnl If you are only building threads programs, you may wish to use -dnl these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to -dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to -dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the -dnl default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, or -dnl if you have any other suggestions or comments. This macro was based -dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with -dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros -dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. -dnl We are also grateful for the helpful feedback of numerous users. -dnl -dnl @category InstalledPackages -dnl @author Steven G. Johnson -dnl @version 2006-05-29 -dnl @license GPLWithACException -dnl -dnl Checks for GCC shared/pthread inconsistency based on work by -dnl Marcin Owsiany - - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi - - # The next part tries to detect GCC inconsistency with -shared on some - # architectures and systems. The problem is that in certain - # configurations, when -shared is specified, GCC "forgets" to - # internally use various flags which are still necessary. - - # - # Prepare the flags - # - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - save_CC="$CC" - - # Try with the flags determined by the earlier checks. - # - # -Wl,-z,defs forces link-time symbol resolution, so that the - # linking checks with -shared actually have any value - # - # FIXME: -fPIC is required for -shared on many architectures, - # so we specify it here, but the right way would probably be to - # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CC="$PTHREAD_CC" - - # In order not to create several levels of indentation, we test - # the value of "$done" until we find the cure or run out of ideas. - done="no" - - # First, make sure the CFLAGS we added are actually accepted by our - # compiler. If not (and OS X's ld, for instance, does not accept -z), - # then we can't do this test. - if test x"$done" = xno; then - AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies]) - AC_TRY_LINK(,, , [done=yes]) - - if test "x$done" = xyes ; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi - fi - - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -pthread is sufficient with -shared]) - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - - # - # Linux gcc on some architectures such as mips/mipsel forgets - # about -lpthread - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lpthread fixes that]) - LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - # - # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lc_r fixes that]) - LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - if test x"$done" = xno; then - # OK, we have run out of ideas - AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries]) - - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/gtest.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/gtest.m4 deleted file mode 100644 index 6598ba75..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/m4/gtest.m4 +++ /dev/null @@ -1,74 +0,0 @@ -dnl GTEST_LIB_CHECK([minimum version [, -dnl action if found [,action if not found]]]) -dnl -dnl Check for the presence of the Google Test library, optionally at a minimum -dnl version, and indicate a viable version with the HAVE_GTEST flag. It defines -dnl standard variables for substitution including GTEST_CPPFLAGS, -dnl GTEST_CXXFLAGS, GTEST_LDFLAGS, and GTEST_LIBS. It also defines -dnl GTEST_VERSION as the version of Google Test found. Finally, it provides -dnl optional custom action slots in the event GTEST is found or not. -AC_DEFUN([GTEST_LIB_CHECK], -[ -dnl Provide a flag to enable or disable Google Test usage. -AC_ARG_ENABLE([gtest], - [AS_HELP_STRING([--enable-gtest], - [Enable tests using the Google C++ Testing Framework. - (Default is enabled.)])], - [], - [enable_gtest=]) -AC_ARG_VAR([GTEST_CONFIG], - [The exact path of Google Test's 'gtest-config' script.]) -AC_ARG_VAR([GTEST_CPPFLAGS], - [C-like preprocessor flags for Google Test.]) -AC_ARG_VAR([GTEST_CXXFLAGS], - [C++ compile flags for Google Test.]) -AC_ARG_VAR([GTEST_LDFLAGS], - [Linker path and option flags for Google Test.]) -AC_ARG_VAR([GTEST_LIBS], - [Library linking flags for Google Test.]) -AC_ARG_VAR([GTEST_VERSION], - [The version of Google Test available.]) -HAVE_GTEST="no" -AS_IF([test "x${enable_gtest}" != "xno"], - [AC_MSG_CHECKING([for 'gtest-config']) - AS_IF([test "x${enable_gtest}" != "xyes"], - [AS_IF([test -x "${enable_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${enable_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${enable_gtest}/bin/gtest-config"]) - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([dnl -Unable to locate either a built or installed Google Test. -The specific location '${enable_gtest}' was provided for a built or installed -Google Test, but no 'gtest-config' script could be found at this location.]) - ])], - [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])]) - AS_IF([test -x "${GTEST_CONFIG}"], - [AC_MSG_RESULT([${GTEST_CONFIG}]) - m4_ifval([$1], - [_gtest_min_version="--min-version=$1" - AC_MSG_CHECKING([for Google Test at least version >= $1])], - [_gtest_min_version="--min-version=0" - AC_MSG_CHECKING([for Google Test])]) - AS_IF([${GTEST_CONFIG} ${_gtest_min_version}], - [AC_MSG_RESULT([yes]) - HAVE_GTEST='yes'], - [AC_MSG_RESULT([no])])], - [AC_MSG_RESULT([no])]) - AS_IF([test "x${HAVE_GTEST}" = "xyes"], - [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` - GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` - GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` - GTEST_LIBS=`${GTEST_CONFIG} --libs` - GTEST_VERSION=`${GTEST_CONFIG} --version` - AC_DEFINE([HAVE_GTEST],[1],[Defined when Google Test is available.])], - [AS_IF([test "x${enable_gtest}" = "xyes"], - [AC_MSG_ERROR([dnl -Google Test was enabled, but no viable version could be found.]) - ])])]) -AC_SUBST([HAVE_GTEST]) -AM_CONDITIONAL([HAVE_GTEST],[test "x$HAVE_GTEST" = "xyes"]) -AS_IF([test "x$HAVE_GTEST" = "xyes"], - [m4_ifval([$2], [$2])], - [m4_ifval([$3], [$3])]) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/make/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/make/Makefile deleted file mode 100644 index 2d8806eb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/make/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# A sample Makefile for building Google Test and using it in user -# tests. Please tweak it to suit your environment and project. You -# may want to move it to your project's root directory. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make clean - removes all files generated by make. - -# Please tweak the following variable definitions as needed by your -# project, except GTEST_HEADERS, which you can use in your own targets -# but shouldn't modify. - -# Points to the root of Google Test, relative to where this file is. -# Remember to tweak this if you move this file. -GTEST_DIR = .. - -# Where to find user code. -USER_DIR = ../samples - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(GTEST_DIR) -I$(GTEST_DIR)/include - -# Flags passed to the C++ compiler. -CXXFLAGS += -g -Wall -Wextra - -# All tests produced by this Makefile. Remember to add new tests you -# created to the list. -TESTS = sample1_unittest - -# All Google Test headers. Usually you shouldn't change this -# definition. -GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \ - $(GTEST_DIR)/include/gtest/internal/*.h - -# House-keeping build targets. - -all : $(TESTS) - -clean : - rm -f $(TESTS) gtest.a gtest_main.a *.o - -# Builds gtest.a and gtest_main.a. - -# Usually you shouldn't tweak such internal variables, indicated by a -# trailing _. -GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) - -# For simplicity and to avoid depending on Google Test's -# implementation details, the dependencies specified below are -# conservative and not optimized. This is fine as Google Test -# compiles fast and for ordinary users its source rarely changes. -gtest-all.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc - -gtest_main.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest_main.cc - -gtest.a : gtest-all.o - $(AR) $(ARFLAGS) $@ $^ - -gtest_main.a : gtest-all.o gtest_main.o - $(AR) $(ARFLAGS) $@ $^ - -# Builds a sample test. A test should link with either gtest.a or -# gtest_main.a, depending on whether it defines its own main() -# function. - -sample1.o : $(USER_DIR)/sample1.cc $(USER_DIR)/sample1.h $(GTEST_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1.cc - -sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \ - $(USER_DIR)/sample1.h $(GTEST_HEADERS) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc - -sample1_unittest : sample1.o sample1_unittest.o gtest_main.a - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/run_tests.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/run_tests.py deleted file mode 100755 index 67014f3b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/run_tests.py +++ /dev/null @@ -1,438 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Runs specified tests for Google Test. - -SYNOPSIS - run_tests.py [OPTION]... [BUILD_DIR]... [TEST]... - -DESCRIPTION - Runs the specified tests (either binary or Python), and prints a - summary of the results. BUILD_DIRS will be used to search for the - binaries. If no TESTs are specified, all binary tests found in - BUILD_DIRs and all Python tests found in the directory test/ (in the - gtest root) are run. - - TEST is a name of either a binary or a Python test. A binary test is - an executable file named *_test or *_unittest (with the .exe - extension on Windows) A Python test is a script named *_test.py or - *_unittest.py. - -OPTIONS - -c CONFIGURATIONS - Specify build directories via build configurations. - CONFIGURATIONS is either a comma-separated list of build - configurations or 'all'. Each configuration is equivalent to - adding 'scons/build//scons' to BUILD_DIRs. - Specifying -c=all is equivalent to providing all directories - listed in KNOWN BUILD DIRECTORIES section below. - - -a - Equivalent to -c=all - - -b - Equivalent to -c=all with the exception that the script will not - fail if some of the KNOWN BUILD DIRECTORIES do not exists; the - script will simply not run the tests there. 'b' stands for - 'built directories'. - -RETURN VALUE - Returns 0 if all tests are successful; otherwise returns 1. - -EXAMPLES - run_tests.py - Runs all tests for the default build configuration. - - run_tests.py -a - Runs all tests with binaries in KNOWN BUILD DIRECTORIES. - - run_tests.py -b - Runs all tests in KNOWN BUILD DIRECTORIES that have been - built. - - run_tests.py foo/ - Runs all tests in the foo/ directory and all Python tests in - the directory test. The Python tests are instructed to look - for binaries in foo/. - - run_tests.py bar_test.exe test/baz_test.exe foo/ bar/ - Runs foo/bar_test.exe, bar/bar_test.exe, foo/baz_test.exe, and - bar/baz_test.exe. - - run_tests.py foo bar test/foo_test.py - Runs test/foo_test.py twice instructing it to look for its - test binaries in the directories foo and bar, - correspondingly. - -KNOWN BUILD DIRECTORIES - run_tests.py knows about directories where the SCons build script - deposits its products. These are the directories where run_tests.py - will be looking for its binaries. Currently, gtest's SConstruct file - defines them as follows (the default build directory is the first one - listed in each group): - On Windows: - /scons/build/win-dbg8/scons/ - /scons/build/win-opt8/scons/ - /scons/build/win-dbg/scons/ - /scons/build/win-opt/scons/ - On Mac: - /scons/build/mac-dbg/scons/ - /scons/build/mac-opt/scons/ - On other platforms: - /scons/build/dbg/scons/ - /scons/build/opt/scons/ - -AUTHOR - Written by Zhanyong Wan (wan@google.com) - and Vlad Losev(vladl@google.com). - -REQUIREMENTS - This script requires Python 2.3 or higher. -""" - -import optparse -import os -import re -import sets -import sys - -try: - # subrocess module is a preferable way to invoke subprocesses but it may - # not be available on MacOS X 10.4. - import subprocess -except ImportError: - subprocess = None - -IS_WINDOWS = os.name == 'nt' -IS_MAC = os.name == 'posix' and os.uname()[0] == 'Darwin' -IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] - -# Definition of CONFIGS must match that of the build directory names in the -# SConstruct script. The first list item is the default build configuration. -if IS_WINDOWS: - CONFIGS = ('win-dbg8', 'win-opt8', 'win-dbg', 'win-opt') -elif IS_MAC: - CONFIGS = ('mac-dbg', 'mac-opt') -else: - CONFIGS = ('dbg', 'opt') - -if IS_WINDOWS or IS_CYGWIN: - PYTHON_TEST_REGEX = re.compile(r'_(unit)?test\.py$', re.IGNORECASE) - BINARY_TEST_REGEX = re.compile(r'_(unit)?test(\.exe)?$', re.IGNORECASE) - BINARY_TEST_SEARCH_REGEX = re.compile(r'_(unit)?test\.exe$', re.IGNORECASE) -else: - PYTHON_TEST_REGEX = re.compile(r'_(unit)?test\.py$') - BINARY_TEST_REGEX = re.compile(r'_(unit)?test$') - BINARY_TEST_SEARCH_REGEX = BINARY_TEST_REGEX - -GTEST_BUILD_DIR = 'GTEST_BUILD_DIR' - - -# All paths in this script are either absolute or relative to the current -# working directory, unless otherwise specified. -class TestRunner(object): - """Provides facilities for running Python and binary tests for Google Test.""" - - def __init__(self, - injected_os=os, - injected_subprocess=subprocess, - injected_script_dir=os.path.dirname(__file__)): - self.os = injected_os - self.subprocess = injected_subprocess - # If a program using this file is invoked via a relative path, the - # script directory will be relative to the path of the main program - # file. It may be '.' when this script is invoked directly or '..' when - # it is imported for testing. To simplify testing we inject the script - # directory into TestRunner. - self.script_dir = injected_script_dir - - def GetBuildDirForConfig(self, config): - """Returns the build directory for a given configuration.""" - - return self.os.path.normpath( - self.os.path.join(self.script_dir, 'scons/build', config, 'scons')) - - def Run(self, args): - """Runs the executable with given args (args[0] is the executable name). - - Args: - args: Command line arguments for the process. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - if self.subprocess: - return self.subprocess.Popen(args).wait() - else: - return self.os.spawnv(self.os.P_WAIT, args[0], args) - - def RunBinaryTest(self, test): - """Runs the binary test given its path. - - Args: - test: Path to the test binary. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - return self.Run([test]) - - def RunPythonTest(self, test, build_dir): - """Runs the Python test script with the specified build directory. - - Args: - test: Path to the test's Python script. - build_dir: Path to the directory where the test binary is to be found. - - Returns: - Process's exit code if it exits normally, or -signal if the process is - killed by a signal. - """ - - old_build_dir = self.os.environ.get(GTEST_BUILD_DIR) - - try: - self.os.environ[GTEST_BUILD_DIR] = build_dir - - # If this script is run on a Windows machine that has no association - # between the .py extension and a python interpreter, simply passing - # the script name into subprocess.Popen/os.spawn will not work. - print 'Running %s . . .' % (test,) - return self.Run([sys.executable, test]) - - finally: - if old_build_dir is None: - del self.os.environ[GTEST_BUILD_DIR] - else: - self.os.environ[GTEST_BUILD_DIR] = old_build_dir - - def FindFilesByRegex(self, directory, regex): - """Returns files in a directory whose names match a regular expression. - - Args: - directory: Path to the directory to search for files. - regex: Regular expression to filter file names. - - Returns: - The list of the paths to the files in the directory. - """ - - return [self.os.path.join(directory, file_name) - for file_name in self.os.listdir(directory) - if re.search(regex, file_name)] - - # TODO(vladl@google.com): Implement parsing of scons/SConscript to run all - # tests defined there when no tests are specified. - # TODO(vladl@google.com): Update the docstring after the code is changed to - # try to test all builds defined in scons/SConscript. - def GetTestsToRun(self, - args, - named_configurations, - built_configurations, - available_configurations=CONFIGS): - """Determines what tests should be run. - - Args: - args: The list of non-option arguments from the command line. - named_configurations: The list of configurations specified via -c or -a. - built_configurations: True if -b has been specified. - available_configurations: a list of configurations available on the - current platform, injectable for testing. - - Returns: - A tuple with 2 elements: the list of Python tests to run and the list of - binary tests to run. - """ - - if named_configurations == 'all': - named_configurations = ','.join(available_configurations) - - normalized_args = [self.os.path.normpath(arg) for arg in args] - - # A final list of build directories which will be searched for the test - # binaries. First, add directories specified directly on the command - # line. - build_dirs = filter(self.os.path.isdir, normalized_args) - - # Adds build directories specified via their build configurations using - # the -c or -a options. - if named_configurations: - build_dirs += [self.GetBuildDirForConfig(config) - for config in named_configurations.split(',')] - - # Adds KNOWN BUILD DIRECTORIES if -b is specified. - if built_configurations: - build_dirs += [self.GetBuildDirForConfig(config) - for config in available_configurations - if self.os.path.isdir(self.GetBuildDirForConfig(config))] - - # If no directories were specified either via -a, -b, -c, or directly, use - # the default configuration. - elif not build_dirs: - build_dirs = [self.GetBuildDirForConfig(available_configurations[0])] - - # Makes sure there are no duplications. - build_dirs = sets.Set(build_dirs) - - errors_found = False - listed_python_tests = [] # All Python tests listed on the command line. - listed_binary_tests = [] # All binary tests listed on the command line. - - test_dir = self.os.path.normpath(self.os.path.join(self.script_dir, 'test')) - - # Sifts through non-directory arguments fishing for any Python or binary - # tests and detecting errors. - for argument in sets.Set(normalized_args) - build_dirs: - if re.search(PYTHON_TEST_REGEX, argument): - python_path = self.os.path.join(test_dir, - self.os.path.basename(argument)) - if self.os.path.isfile(python_path): - listed_python_tests.append(python_path) - else: - sys.stderr.write('Unable to find Python test %s' % argument) - errors_found = True - elif re.search(BINARY_TEST_REGEX, argument): - # This script also accepts binary test names prefixed with test/ for - # the convenience of typing them (can use path completions in the - # shell). Strips test/ prefix from the binary test names. - listed_binary_tests.append(self.os.path.basename(argument)) - else: - sys.stderr.write('%s is neither test nor build directory' % argument) - errors_found = True - - if errors_found: - return None - - user_has_listed_tests = listed_python_tests or listed_binary_tests - - if user_has_listed_tests: - selected_python_tests = listed_python_tests - else: - selected_python_tests = self.FindFilesByRegex(test_dir, PYTHON_TEST_REGEX) - - # TODO(vladl@google.com): skip unbuilt Python tests when -b is specified. - python_test_pairs = [] - for directory in build_dirs: - for test in selected_python_tests: - python_test_pairs.append((directory, test)) - - binary_test_pairs = [] - for directory in build_dirs: - if user_has_listed_tests: - binary_test_pairs.extend( - [(directory, self.os.path.join(directory, test)) - for test in listed_binary_tests]) - else: - tests = self.FindFilesByRegex(directory, BINARY_TEST_SEARCH_REGEX) - binary_test_pairs.extend([(directory, test) for test in tests]) - - return (python_test_pairs, binary_test_pairs) - - def RunTests(self, python_tests, binary_tests): - """Runs Python and binary tests and reports results to the standard output. - - Args: - python_tests: List of Python tests to run in the form of tuples - (build directory, Python test script). - binary_tests: List of binary tests to run in the form of tuples - (build directory, binary file). - - Returns: - The exit code the program should pass into sys.exit(). - """ - - if python_tests or binary_tests: - results = [] - for directory, test in python_tests: - results.append((directory, - test, - self.RunPythonTest(test, directory) == 0)) - for directory, test in binary_tests: - results.append((directory, - self.os.path.basename(test), - self.RunBinaryTest(test) == 0)) - - failed = [(directory, test) - for (directory, test, success) in results - if not success] - print - print '%d tests run.' % len(results) - if failed: - print 'The following %d tests failed:' % len(failed) - for (directory, test) in failed: - print '%s in %s' % (test, directory) - return 1 - else: - print 'All tests passed!' - else: # No tests defined - print 'Nothing to test - no tests specified!' - - return 0 - - -def _Main(): - """Runs all tests for Google Test.""" - - parser = optparse.OptionParser() - parser.add_option('-c', - action='store', - dest='configurations', - default=None, - help='Test in the specified build directories') - parser.add_option('-a', - action='store_const', - dest='configurations', - default=None, - const='all', - help='Test in all default build directories') - parser.add_option('-b', - action='store_const', - dest='built_configurations', - default=False, - const=True, - help=('Test in all default build directories, do not fail' - 'if some of them do not exist')) - (options, args) = parser.parse_args() - - test_runner = TestRunner() - tests = test_runner.GetTestsToRun(args, - options.configurations, - options.built_configurations) - if not tests: - sys.exit(1) # Incorrect parameters given, abort execution. - - sys.exit(test_runner.RunTests(tests[0], tests[1])) - -if __name__ == '__main__': - _Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/prime_tables.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/prime_tables.h deleted file mode 100644 index 236e84c3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/prime_tables.h +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// Author: vladl@google.com (Vlad Losev) - -// This provides interface PrimeTable that determines whether a number is a -// prime and determines a next prime number. This interface is used -// in Google Test samples demonstrating use of parameterized tests. - -#ifndef GTEST_SAMPLES_PRIME_TABLES_H_ -#define GTEST_SAMPLES_PRIME_TABLES_H_ - -#include - -// The prime table interface. -class PrimeTable { - public: - virtual ~PrimeTable() {} - - // Returns true iff n is a prime number. - virtual bool IsPrime(int n) const = 0; - - // Returns the smallest prime number greater than p; or returns -1 - // if the next prime is beyond the capacity of the table. - virtual int GetNextPrime(int p) const = 0; -}; - -// Implementation #1 calculates the primes on-the-fly. -class OnTheFlyPrimeTable : public PrimeTable { - public: - virtual bool IsPrime(int n) const { - if (n <= 1) return false; - - for (int i = 2; i*i <= n; i++) { - // n is divisible by an integer other than 1 and itself. - if ((n % i) == 0) return false; - } - - return true; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n > 0; n++) { - if (IsPrime(n)) return n; - } - - return -1; - } -}; - -// Implementation #2 pre-calculates the primes and stores the result -// in an array. -class PreCalculatedPrimeTable : public PrimeTable { - public: - // 'max' specifies the maximum number the prime table holds. - explicit PreCalculatedPrimeTable(int max) - : is_prime_size_(max + 1), is_prime_(new bool[max + 1]) { - CalculatePrimesUpTo(max); - } - virtual ~PreCalculatedPrimeTable() { delete[] is_prime_; } - - virtual bool IsPrime(int n) const { - return 0 <= n && n < is_prime_size_ && is_prime_[n]; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n < is_prime_size_; n++) { - if (is_prime_[n]) return n; - } - - return -1; - } - - private: - void CalculatePrimesUpTo(int max) { - ::std::fill(is_prime_, is_prime_ + is_prime_size_, true); - is_prime_[0] = is_prime_[1] = false; - - for (int i = 2; i <= max; i++) { - if (!is_prime_[i]) continue; - - // Marks all multiples of i (except i itself) as non-prime. - for (int j = 2*i; j <= max; j += i) { - is_prime_[j] = false; - } - } - } - - const int is_prime_size_; - bool* const is_prime_; -}; - -#endif // GTEST_SAMPLES_PRIME_TABLES_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.cc deleted file mode 100644 index f171e260..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include "sample1.h" - -// Returns n! (the factorial of n). For negative n, n! is defined to be 1. -int Factorial(int n) { - int result = 1; - for (int i = 1; i <= n; i++) { - result *= i; - } - - return result; -} - -// Returns true iff n is a prime number. -bool IsPrime(int n) { - // Trivial case 1: small numbers - if (n <= 1) return false; - - // Trivial case 2: even numbers - if (n % 2 == 0) return n == 2; - - // Now, we have that n is odd and n >= 3. - - // Try to divide n by every odd number i, starting from 3 - for (int i = 3; ; i += 2) { - // We only have to try i up to the squre root of n - if (i > n/i) break; - - // Now, we have i <= n/i < n. - // If n is divisible by i, n is not prime. - if (n % i == 0) return false; - } - - // n has no integer factor in the range (1, n), and thus is prime. - return true; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.h deleted file mode 100644 index 3dfeb98c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE1_H_ -#define GTEST_SAMPLES_SAMPLE1_H_ - -// Returns n! (the factorial of n). For negative n, n! is defined to be 1. -int Factorial(int n); - -// Returns true iff n is a prime number. -bool IsPrime(int n); - -#endif // GTEST_SAMPLES_SAMPLE1_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample10_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample10_unittest.cc deleted file mode 100644 index 703ec6ee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample10_unittest.cc +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2009 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to use Google Test listener API to implement -// a primitive leak checker. - -#include -#include - -#include - -using ::testing::EmptyTestEventListener; -using ::testing::InitGoogleTest; -using ::testing::Test; -using ::testing::TestCase; -using ::testing::TestEventListeners; -using ::testing::TestInfo; -using ::testing::TestPartResult; -using ::testing::UnitTest; - -namespace { - -// We will track memory used by this class. -class Water { - public: - // Normal Water declarations go here. - - // operator new and operator delete help us control water allocation. - void* operator new(size_t allocation_size) { - allocated_++; - return malloc(allocation_size); - } - - void operator delete(void* block, size_t allocation_size) { - allocated_--; - free(block); - } - - static int allocated() { return allocated_; } - - private: - static int allocated_; -}; - -int Water::allocated_ = 0; - -// This event listener monitors how many Water objects are created and -// destroyed by each test, and reports a failure if a test leaks some Water -// objects. It does this by comparing the number of live Water objects at -// the beginning of a test and at the end of a test. -class LeakChecker : public EmptyTestEventListener { - private: - // Called before a test starts. - virtual void OnTestStart(const TestInfo& test_info) { - initially_allocated_ = Water::allocated(); - } - - // Called after a test ends. - virtual void OnTestEnd(const TestInfo& test_info) { - int difference = Water::allocated() - initially_allocated_; - - // You can generate a failure in any event handler except - // OnTestPartResult. Just use an appropriate Google Test assertion to do - // it. - EXPECT_TRUE(difference <= 0) - << "Leaked " << difference << " unit(s) of Water!"; - } - - int initially_allocated_; -}; - -TEST(ListenersTest, DoesNotLeak) { - Water* water = new Water; - delete water; -} - -// This should fail when the --check_for_leaks command line flag is -// specified. -TEST(ListenersTest, LeaksWater) { - Water* water = new Water; - EXPECT_TRUE(water != NULL); -} - -} // namespace - -int main(int argc, char **argv) { - InitGoogleTest(&argc, argv); - - bool check_for_leaks = false; - if (argc > 1 && strcmp(argv[1], "--check_for_leaks") == 0 ) - check_for_leaks = true; - else - printf("%s\n", "Run this program with --check_for_leaks to enable " - "custom leak checking in the tests."); - - // If we are given the --check_for_leaks command line flag, installs the - // leak checker. - if (check_for_leaks) { - TestEventListeners& listeners = UnitTest::GetInstance()->listeners(); - - // Adds the leak checker to the end of the test event listener list, - // after the default text output printer and the default XML report - // generator. - // - // The order is important - it ensures that failures generated in the - // leak checker's OnTestEnd() method are processed by the text and XML - // printers *before* their OnTestEnd() methods are called, such that - // they are attributed to the right test. Remember that a listener - // receives an OnXyzStart event *after* listeners preceding it in the - // list received that event, and receives an OnXyzEnd event *before* - // listeners preceding it. - // - // We don't need to worry about deleting the new listener later, as - // Google Test will do it. - listeners.Append(new LeakChecker); - } - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1_unittest.cc deleted file mode 100644 index 01eb5462..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample1_unittest.cc +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// This sample shows how to write a simple unit test for a function, -// using Google C++ testing framework. -// -// Writing a unit test using Google C++ testing framework is easy as 1-2-3: - - -// Step 1. Include necessary header files such that the stuff your -// test logic needs is declared. -// -// Don't forget gtest.h, which declares the testing framework. - -#include -#include "sample1.h" -#include - - -// Step 2. Use the TEST macro to define your tests. -// -// TEST has two parameters: the test case name and the test name. -// After using the macro, you should define your test logic between a -// pair of braces. You can use a bunch of macros to indicate the -// success or failure of a test. EXPECT_TRUE and EXPECT_EQ are -// examples of such macros. For a complete list, see gtest.h. -// -// -// -// In Google Test, tests are grouped into test cases. This is how we -// keep test code organized. You should put logically related tests -// into the same test case. -// -// The test case name and the test name should both be valid C++ -// identifiers. And you should not use underscore (_) in the names. -// -// Google Test guarantees that each test you define is run exactly -// once, but it makes no guarantee on the order the tests are -// executed. Therefore, you should write your tests in such a way -// that their results don't depend on their order. -// -// - - -// Tests Factorial(). - -// Tests factorial of negative numbers. -TEST(FactorialTest, Negative) { - // This test is named "Negative", and belongs to the "FactorialTest" - // test case. - EXPECT_EQ(1, Factorial(-5)); - EXPECT_EQ(1, Factorial(-1)); - EXPECT_TRUE(Factorial(-10) > 0); - - // - // - // EXPECT_EQ(expected, actual) is the same as - // - // EXPECT_TRUE((expected) == (actual)) - // - // except that it will print both the expected value and the actual - // value when the assertion fails. This is very helpful for - // debugging. Therefore in this case EXPECT_EQ is preferred. - // - // On the other hand, EXPECT_TRUE accepts any Boolean expression, - // and is thus more general. - // - // -} - -// Tests factorial of 0. -TEST(FactorialTest, Zero) { - EXPECT_EQ(1, Factorial(0)); -} - -// Tests factorial of positive numbers. -TEST(FactorialTest, Positive) { - EXPECT_EQ(1, Factorial(1)); - EXPECT_EQ(2, Factorial(2)); - EXPECT_EQ(6, Factorial(3)); - EXPECT_EQ(40320, Factorial(8)); -} - - -// Tests IsPrime() - -// Tests negative input. -TEST(IsPrimeTest, Negative) { - // This test belongs to the IsPrimeTest test case. - - EXPECT_FALSE(IsPrime(-1)); - EXPECT_FALSE(IsPrime(-2)); - EXPECT_FALSE(IsPrime(INT_MIN)); -} - -// Tests some trivial cases. -TEST(IsPrimeTest, Trivial) { - EXPECT_FALSE(IsPrime(0)); - EXPECT_FALSE(IsPrime(1)); - EXPECT_TRUE(IsPrime(2)); - EXPECT_TRUE(IsPrime(3)); -} - -// Tests positive input. -TEST(IsPrimeTest, Positive) { - EXPECT_FALSE(IsPrime(4)); - EXPECT_TRUE(IsPrime(5)); - EXPECT_FALSE(IsPrime(6)); - EXPECT_TRUE(IsPrime(23)); -} - -// Step 3. Call RUN_ALL_TESTS() in main(). -// -// We do this by linking in src/gtest_main.cc file, which consists of -// a main() function which calls RUN_ALL_TESTS() for us. -// -// This runs all the tests you've defined, prints the result, and -// returns 0 if successful, or 1 otherwise. -// -// Did you notice that we didn't register the tests? The -// RUN_ALL_TESTS() macro magically knows about all the tests we -// defined. Isn't this convenient? diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.cc deleted file mode 100644 index 53857c0e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include "sample2.h" - -#include - -// Clones a 0-terminated C string, allocating memory using new. -const char * MyString::CloneCString(const char * c_string) { - if (c_string == NULL) return NULL; - - const size_t len = strlen(c_string); - char * const clone = new char[ len + 1 ]; - memcpy(clone, c_string, len + 1); - - return clone; -} - -// Sets the 0-terminated C string this MyString object -// represents. -void MyString::Set(const char * c_string) { - // Makes sure this works when c_string == c_string_ - const char * const temp = MyString::CloneCString(c_string); - delete[] c_string_; - c_string_ = temp; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.h deleted file mode 100644 index c5f3b8c5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE2_H_ -#define GTEST_SAMPLES_SAMPLE2_H_ - -#include - - -// A simple string class. -class MyString { - private: - const char * c_string_; - const MyString& operator=(const MyString& rhs); - - public: - - // Clones a 0-terminated C string, allocating memory using new. - static const char * CloneCString(const char * c_string); - - //////////////////////////////////////////////////////////// - // - // C'tors - - // The default c'tor constructs a NULL string. - MyString() : c_string_(NULL) {} - - // Constructs a MyString by cloning a 0-terminated C string. - explicit MyString(const char * c_string) : c_string_(NULL) { - Set(c_string); - } - - // Copy c'tor - MyString(const MyString& string) : c_string_(NULL) { - Set(string.c_string_); - } - - //////////////////////////////////////////////////////////// - // - // D'tor. MyString is intended to be a final class, so the d'tor - // doesn't need to be virtual. - ~MyString() { delete[] c_string_; } - - // Gets the 0-terminated C string this MyString object represents. - const char * c_string() const { return c_string_; } - - size_t Length() const { - return c_string_ == NULL ? 0 : strlen(c_string_); - } - - // Sets the 0-terminated C string this MyString object represents. - void Set(const char * c_string); -}; - - -#endif // GTEST_SAMPLES_SAMPLE2_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2_unittest.cc deleted file mode 100644 index e1d79108..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample2_unittest.cc +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// This sample shows how to write a more complex unit test for a class -// that has multiple member functions. -// -// Usually, it's a good idea to have one test for each method in your -// class. You don't have to do that exactly, but it helps to keep -// your tests organized. You may also throw in additional tests as -// needed. - -#include "sample2.h" -#include - -// In this example, we test the MyString class (a simple string). - -// Tests the default c'tor. -TEST(MyString, DefaultConstructor) { - const MyString s; - - // Asserts that s.c_string() returns NULL. - // - // - // - // If we write NULL instead of - // - // static_cast(NULL) - // - // in this assertion, it will generate a warning on gcc 3.4. The - // reason is that EXPECT_EQ needs to know the types of its - // arguments in order to print them when it fails. Since NULL is - // #defined as 0, the compiler will use the formatter function for - // int to print it. However, gcc thinks that NULL should be used as - // a pointer, not an int, and therefore complains. - // - // The root of the problem is C++'s lack of distinction between the - // integer number 0 and the null pointer constant. Unfortunately, - // we have to live with this fact. - // - // - EXPECT_STREQ(NULL, s.c_string()); - - EXPECT_EQ(0, s.Length()); -} - -const char kHelloString[] = "Hello, world!"; - -// Tests the c'tor that accepts a C string. -TEST(MyString, ConstructorFromCString) { - const MyString s(kHelloString); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - EXPECT_EQ(sizeof(kHelloString)/sizeof(kHelloString[0]) - 1, - s.Length()); -} - -// Tests the copy c'tor. -TEST(MyString, CopyConstructor) { - const MyString s1(kHelloString); - const MyString s2 = s1; - EXPECT_TRUE(strcmp(s2.c_string(), kHelloString) == 0); -} - -// Tests the Set method. -TEST(MyString, Set) { - MyString s; - - s.Set(kHelloString); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - - // Set should work when the input pointer is the same as the one - // already in the MyString object. - s.Set(s.c_string()); - EXPECT_TRUE(strcmp(s.c_string(), kHelloString) == 0); - - // Can we set the MyString to NULL? - s.Set(NULL); - EXPECT_STREQ(NULL, s.c_string()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3-inl.h deleted file mode 100644 index 630e950c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3-inl.h +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE3_INL_H_ -#define GTEST_SAMPLES_SAMPLE3_INL_H_ - -#include - - -// Queue is a simple queue implemented as a singled-linked list. -// -// The element type must support copy constructor. -template // E is the element type -class Queue; - -// QueueNode is a node in a Queue, which consists of an element of -// type E and a pointer to the next node. -template // E is the element type -class QueueNode { - friend class Queue; - - public: - // Gets the element in this node. - const E & element() const { return element_; } - - // Gets the next node in the queue. - QueueNode * next() { return next_; } - const QueueNode * next() const { return next_; } - - private: - // Creates a node with a given element value. The next pointer is - // set to NULL. - QueueNode(const E & element) : element_(element), next_(NULL) {} - - // We disable the default assignment operator and copy c'tor. - const QueueNode & operator = (const QueueNode &); - QueueNode(const QueueNode &); - - E element_; - QueueNode * next_; -}; - -template // E is the element type. -class Queue { -public: - - // Creates an empty queue. - Queue() : head_(NULL), last_(NULL), size_(0) {} - - // D'tor. Clears the queue. - ~Queue() { Clear(); } - - // Clears the queue. - void Clear() { - if (size_ > 0) { - // 1. Deletes every node. - QueueNode * node = head_; - QueueNode * next = node->next(); - for (; ;) { - delete node; - node = next; - if (node == NULL) break; - next = node->next(); - } - - // 2. Resets the member variables. - head_ = last_ = NULL; - size_ = 0; - } - } - - // Gets the number of elements. - size_t Size() const { return size_; } - - // Gets the first element of the queue, or NULL if the queue is empty. - QueueNode * Head() { return head_; } - const QueueNode * Head() const { return head_; } - - // Gets the last element of the queue, or NULL if the queue is empty. - QueueNode * Last() { return last_; } - const QueueNode * Last() const { return last_; } - - // Adds an element to the end of the queue. A copy of the element is - // created using the copy constructor, and then stored in the queue. - // Changes made to the element in the queue doesn't affect the source - // object, and vice versa. - void Enqueue(const E & element) { - QueueNode * new_node = new QueueNode(element); - - if (size_ == 0) { - head_ = last_ = new_node; - size_ = 1; - } else { - last_->next_ = new_node; - last_ = new_node; - size_++; - } - } - - // Removes the head of the queue and returns it. Returns NULL if - // the queue is empty. - E * Dequeue() { - if (size_ == 0) { - return NULL; - } - - const QueueNode * const old_head = head_; - head_ = head_->next_; - size_--; - if (size_ == 0) { - last_ = NULL; - } - - E * element = new E(old_head->element()); - delete old_head; - - return element; - } - - // Applies a function/functor on each element of the queue, and - // returns the result in a new queue. The original queue is not - // affected. - template - Queue * Map(F function) const { - Queue * new_queue = new Queue(); - for (const QueueNode * node = head_; node != NULL; node = node->next_) { - new_queue->Enqueue(function(node->element())); - } - - return new_queue; - } - - private: - QueueNode * head_; // The first node of the queue. - QueueNode * last_; // The last node of the queue. - size_t size_; // The number of elements in the queue. - - // We disallow copying a queue. - Queue(const Queue &); - const Queue & operator = (const Queue &); - }; - -#endif // GTEST_SAMPLES_SAMPLE3_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3_unittest.cc deleted file mode 100644 index a3d26da2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample3_unittest.cc +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - - -// In this example, we use a more advanced feature of Google Test called -// test fixture. -// -// A test fixture is a place to hold objects and functions shared by -// all tests in a test case. Using a test fixture avoids duplicating -// the test code necessary to initialize and cleanup those common -// objects for each test. It is also useful for defining sub-routines -// that your tests need to invoke a lot. -// -// -// -// The tests share the test fixture in the sense of code sharing, not -// data sharing. Each test is given its own fresh copy of the -// fixture. You cannot expect the data modified by one test to be -// passed on to another test, which is a bad idea. -// -// The reason for this design is that tests should be independent and -// repeatable. In particular, a test should not fail as the result of -// another test's failure. If one test depends on info produced by -// another test, then the two tests should really be one big test. -// -// The macros for indicating the success/failure of a test -// (EXPECT_TRUE, FAIL, etc) need to know what the current test is -// (when Google Test prints the test result, it tells you which test -// each failure belongs to). Technically, these macros invoke a -// member function of the Test class. Therefore, you cannot use them -// in a global function. That's why you should put test sub-routines -// in a test fixture. -// -// - -#include "sample3-inl.h" -#include - -// To use a test fixture, derive a class from testing::Test. -class QueueTest : public testing::Test { - protected: // You should make the members protected s.t. they can be - // accessed from sub-classes. - - // virtual void SetUp() will be called before each test is run. You - // should define it if you need to initialize the varaibles. - // Otherwise, this can be skipped. - virtual void SetUp() { - q1_.Enqueue(1); - q2_.Enqueue(2); - q2_.Enqueue(3); - } - - // virtual void TearDown() will be called after each test is run. - // You should define it if there is cleanup work to do. Otherwise, - // you don't have to provide it. - // - // virtual void TearDown() { - // } - - // A helper function that some test uses. - static int Double(int n) { - return 2*n; - } - - // A helper function for testing Queue::Map(). - void MapTester(const Queue * q) { - // Creates a new queue, where each element is twice as big as the - // corresponding one in q. - const Queue * const new_q = q->Map(Double); - - // Verifies that the new queue has the same size as q. - ASSERT_EQ(q->Size(), new_q->Size()); - - // Verifies the relationship between the elements of the two queues. - for ( const QueueNode * n1 = q->Head(), * n2 = new_q->Head(); - n1 != NULL; n1 = n1->next(), n2 = n2->next() ) { - EXPECT_EQ(2 * n1->element(), n2->element()); - } - - delete new_q; - } - - // Declares the variables your tests want to use. - Queue q0_; - Queue q1_; - Queue q2_; -}; - -// When you have a test fixture, you define a test using TEST_F -// instead of TEST. - -// Tests the default c'tor. -TEST_F(QueueTest, DefaultConstructor) { - // You can access data in the test fixture here. - EXPECT_EQ(0, q0_.Size()); -} - -// Tests Dequeue(). -TEST_F(QueueTest, Dequeue) { - int * n = q0_.Dequeue(); - EXPECT_TRUE(n == NULL); - - n = q1_.Dequeue(); - ASSERT_TRUE(n != NULL); - EXPECT_EQ(1, *n); - EXPECT_EQ(0, q1_.Size()); - delete n; - - n = q2_.Dequeue(); - ASSERT_TRUE(n != NULL); - EXPECT_EQ(2, *n); - EXPECT_EQ(1, q2_.Size()); - delete n; -} - -// Tests the Queue::Map() function. -TEST_F(QueueTest, Map) { - MapTester(&q0_); - MapTester(&q1_); - MapTester(&q2_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.cc deleted file mode 100644 index ae44bda6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include "sample4.h" - -// Returns the current counter value, and increments it. -int Counter::Increment() { - return counter_++; -} - -// Prints the current counter value to STDOUT. -void Counter::Print() const { - printf("%d", counter_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.h deleted file mode 100644 index cd60f0dd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_SAMPLES_SAMPLE4_H_ -#define GTEST_SAMPLES_SAMPLE4_H_ - -// A simple monotonic counter. -class Counter { - private: - int counter_; - - public: - // Creates a counter that starts at 0. - Counter() : counter_(0) {} - - // Returns the current counter value, and increments it. - int Increment(); - - // Prints the current counter value to STDOUT. - void Print() const; -}; - -#endif // GTEST_SAMPLES_SAMPLE4_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4_unittest.cc deleted file mode 100644 index b4fb3736..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample4_unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include "sample4.h" - -// Tests the Increment() method. -TEST(Counter, Increment) { - Counter c; - - // EXPECT_EQ() evaluates its arguments exactly once, so they - // can have side effects. - - EXPECT_EQ(0, c.Increment()); - EXPECT_EQ(1, c.Increment()); - EXPECT_EQ(2, c.Increment()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample5_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample5_unittest.cc deleted file mode 100644 index be5df90d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample5_unittest.cc +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This sample teaches how to reuse a test fixture in multiple test -// cases by deriving sub-fixtures from it. -// -// When you define a test fixture, you specify the name of the test -// case that will use this fixture. Therefore, a test fixture can -// be used by only one test case. -// -// Sometimes, more than one test cases may want to use the same or -// slightly different test fixtures. For example, you may want to -// make sure that all tests for a GUI library don't leak important -// system resources like fonts and brushes. In Google Test, you do -// this by putting the shared logic in a super (as in "super class") -// test fixture, and then have each test case use a fixture derived -// from this super fixture. - -#include -#include -#include "sample3-inl.h" -#include -#include "sample1.h" - -// In this sample, we want to ensure that every test finishes within -// ~5 seconds. If a test takes longer to run, we consider it a -// failure. -// -// We put the code for timing a test in a test fixture called -// "QuickTest". QuickTest is intended to be the super fixture that -// other fixtures derive from, therefore there is no test case with -// the name "QuickTest". This is OK. -// -// Later, we will derive multiple test fixtures from QuickTest. -class QuickTest : public testing::Test { - protected: - // Remember that SetUp() is run immediately before a test starts. - // This is a good place to record the start time. - virtual void SetUp() { - start_time_ = time(NULL); - } - - // TearDown() is invoked immediately after a test finishes. Here we - // check if the test was too slow. - virtual void TearDown() { - // Gets the time when the test finishes - const time_t end_time = time(NULL); - - // Asserts that the test took no more than ~5 seconds. Did you - // know that you can use assertions in SetUp() and TearDown() as - // well? - EXPECT_TRUE(end_time - start_time_ <= 5) << "The test took too long."; - } - - // The UTC time (in seconds) when the test starts - time_t start_time_; -}; - - -// We derive a fixture named IntegerFunctionTest from the QuickTest -// fixture. All tests using this fixture will be automatically -// required to be quick. -class IntegerFunctionTest : public QuickTest { - // We don't need any more logic than already in the QuickTest fixture. - // Therefore the body is empty. -}; - - -// Now we can write tests in the IntegerFunctionTest test case. - -// Tests Factorial() -TEST_F(IntegerFunctionTest, Factorial) { - // Tests factorial of negative numbers. - EXPECT_EQ(1, Factorial(-5)); - EXPECT_EQ(1, Factorial(-1)); - EXPECT_TRUE(Factorial(-10) > 0); - - // Tests factorial of 0. - EXPECT_EQ(1, Factorial(0)); - - // Tests factorial of positive numbers. - EXPECT_EQ(1, Factorial(1)); - EXPECT_EQ(2, Factorial(2)); - EXPECT_EQ(6, Factorial(3)); - EXPECT_EQ(40320, Factorial(8)); -} - - -// Tests IsPrime() -TEST_F(IntegerFunctionTest, IsPrime) { - // Tests negative input. - EXPECT_TRUE(!IsPrime(-1)); - EXPECT_TRUE(!IsPrime(-2)); - EXPECT_TRUE(!IsPrime(INT_MIN)); - - // Tests some trivial cases. - EXPECT_TRUE(!IsPrime(0)); - EXPECT_TRUE(!IsPrime(1)); - EXPECT_TRUE(IsPrime(2)); - EXPECT_TRUE(IsPrime(3)); - - // Tests positive input. - EXPECT_TRUE(!IsPrime(4)); - EXPECT_TRUE(IsPrime(5)); - EXPECT_TRUE(!IsPrime(6)); - EXPECT_TRUE(IsPrime(23)); -} - - -// The next test case (named "QueueTest") also needs to be quick, so -// we derive another fixture from QuickTest. -// -// The QueueTest test fixture has some logic and shared objects in -// addition to what's in QuickTest already. We define the additional -// stuff inside the body of the test fixture, as usual. -class QueueTest : public QuickTest { - protected: - virtual void SetUp() { - // First, we need to set up the super fixture (QuickTest). - QuickTest::SetUp(); - - // Second, some additional setup for this fixture. - q1_.Enqueue(1); - q2_.Enqueue(2); - q2_.Enqueue(3); - } - - // By default, TearDown() inherits the behavior of - // QuickTest::TearDown(). As we have no additional cleaning work - // for QueueTest, we omit it here. - // - // virtual void TearDown() { - // QuickTest::TearDown(); - // } - - Queue q0_; - Queue q1_; - Queue q2_; -}; - - -// Now, let's write tests using the QueueTest fixture. - -// Tests the default constructor. -TEST_F(QueueTest, DefaultConstructor) { - EXPECT_EQ(0, q0_.Size()); -} - -// Tests Dequeue(). -TEST_F(QueueTest, Dequeue) { - int * n = q0_.Dequeue(); - EXPECT_TRUE(n == NULL); - - n = q1_.Dequeue(); - EXPECT_TRUE(n != NULL); - EXPECT_EQ(1, *n); - EXPECT_EQ(0, q1_.Size()); - delete n; - - n = q2_.Dequeue(); - EXPECT_TRUE(n != NULL); - EXPECT_EQ(2, *n); - EXPECT_EQ(1, q2_.Size()); - delete n; -} - -// If necessary, you can derive further test fixtures from a derived -// fixture itself. For example, you can derive another fixture from -// QueueTest. Google Test imposes no limit on how deep the hierarchy -// can be. In practice, however, you probably don't want it to be too -// deep as to be confusing. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample6_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample6_unittest.cc deleted file mode 100644 index dd0df31f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample6_unittest.cc +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This sample shows how to test common properties of multiple -// implementations of the same interface (aka interface tests). - -// The interface and its implementations are in this header. -#include "prime_tables.h" - -#include - -// First, we define some factory functions for creating instances of -// the implementations. You may be able to skip this step if all your -// implementations can be constructed the same way. - -template -PrimeTable* CreatePrimeTable(); - -template <> -PrimeTable* CreatePrimeTable() { - return new OnTheFlyPrimeTable; -} - -template <> -PrimeTable* CreatePrimeTable() { - return new PreCalculatedPrimeTable(10000); -} - -// Then we define a test fixture class template. -template -class PrimeTableTest : public testing::Test { - protected: - // The ctor calls the factory function to create a prime table - // implemented by T. - PrimeTableTest() : table_(CreatePrimeTable()) {} - - virtual ~PrimeTableTest() { delete table_; } - - // Note that we test an implementation via the base interface - // instead of the actual implementation class. This is important - // for keeping the tests close to the real world scenario, where the - // implementation is invoked via the base interface. It avoids - // got-yas where the implementation class has a method that shadows - // a method with the same name (but slightly different argument - // types) in the base interface, for example. - PrimeTable* const table_; -}; - -#if GTEST_HAS_TYPED_TEST - -using testing::Types; - -// Google Test offers two ways for reusing tests for different types. -// The first is called "typed tests". You should use it if you -// already know *all* the types you are gonna exercise when you write -// the tests. - -// To write a typed test case, first use -// -// TYPED_TEST_CASE(TestCaseName, TypeList); -// -// to declare it and specify the type parameters. As with TEST_F, -// TestCaseName must match the test fixture name. - -// The list of types we want to test. -typedef Types Implementations; - -TYPED_TEST_CASE(PrimeTableTest, Implementations); - -// Then use TYPED_TEST(TestCaseName, TestName) to define a typed test, -// similar to TEST_F. -TYPED_TEST(PrimeTableTest, ReturnsFalseForNonPrimes) { - // Inside the test body, you can refer to the type parameter by - // TypeParam, and refer to the fixture class by TestFixture. We - // don't need them in this example. - - // Since we are in the template world, C++ requires explicitly - // writing 'this->' when referring to members of the fixture class. - // This is something you have to learn to live with. - EXPECT_FALSE(this->table_->IsPrime(-5)); - EXPECT_FALSE(this->table_->IsPrime(0)); - EXPECT_FALSE(this->table_->IsPrime(1)); - EXPECT_FALSE(this->table_->IsPrime(4)); - EXPECT_FALSE(this->table_->IsPrime(6)); - EXPECT_FALSE(this->table_->IsPrime(100)); -} - -TYPED_TEST(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(this->table_->IsPrime(2)); - EXPECT_TRUE(this->table_->IsPrime(3)); - EXPECT_TRUE(this->table_->IsPrime(5)); - EXPECT_TRUE(this->table_->IsPrime(7)); - EXPECT_TRUE(this->table_->IsPrime(11)); - EXPECT_TRUE(this->table_->IsPrime(131)); -} - -TYPED_TEST(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, this->table_->GetNextPrime(0)); - EXPECT_EQ(3, this->table_->GetNextPrime(2)); - EXPECT_EQ(5, this->table_->GetNextPrime(3)); - EXPECT_EQ(7, this->table_->GetNextPrime(5)); - EXPECT_EQ(11, this->table_->GetNextPrime(7)); - EXPECT_EQ(131, this->table_->GetNextPrime(128)); -} - -// That's it! Google Test will repeat each TYPED_TEST for each type -// in the type list specified in TYPED_TEST_CASE. Sit back and be -// happy that you don't have to define them multiple times. - -#endif // GTEST_HAS_TYPED_TEST - -#if GTEST_HAS_TYPED_TEST_P - -using testing::Types; - -// Sometimes, however, you don't yet know all the types that you want -// to test when you write the tests. For example, if you are the -// author of an interface and expect other people to implement it, you -// might want to write a set of tests to make sure each implementation -// conforms to some basic requirements, but you don't know what -// implementations will be written in the future. -// -// How can you write the tests without committing to the type -// parameters? That's what "type-parameterized tests" can do for you. -// It is a bit more involved than typed tests, but in return you get a -// test pattern that can be reused in many contexts, which is a big -// win. Here's how you do it: - -// First, define a test fixture class template. Here we just reuse -// the PrimeTableTest fixture defined earlier: - -template -class PrimeTableTest2 : public PrimeTableTest { -}; - -// Then, declare the test case. The argument is the name of the test -// fixture, and also the name of the test case (as usual). The _P -// suffix is for "parameterized" or "pattern". -TYPED_TEST_CASE_P(PrimeTableTest2); - -// Next, use TYPED_TEST_P(TestCaseName, TestName) to define a test, -// similar to what you do with TEST_F. -TYPED_TEST_P(PrimeTableTest2, ReturnsFalseForNonPrimes) { - EXPECT_FALSE(this->table_->IsPrime(-5)); - EXPECT_FALSE(this->table_->IsPrime(0)); - EXPECT_FALSE(this->table_->IsPrime(1)); - EXPECT_FALSE(this->table_->IsPrime(4)); - EXPECT_FALSE(this->table_->IsPrime(6)); - EXPECT_FALSE(this->table_->IsPrime(100)); -} - -TYPED_TEST_P(PrimeTableTest2, ReturnsTrueForPrimes) { - EXPECT_TRUE(this->table_->IsPrime(2)); - EXPECT_TRUE(this->table_->IsPrime(3)); - EXPECT_TRUE(this->table_->IsPrime(5)); - EXPECT_TRUE(this->table_->IsPrime(7)); - EXPECT_TRUE(this->table_->IsPrime(11)); - EXPECT_TRUE(this->table_->IsPrime(131)); -} - -TYPED_TEST_P(PrimeTableTest2, CanGetNextPrime) { - EXPECT_EQ(2, this->table_->GetNextPrime(0)); - EXPECT_EQ(3, this->table_->GetNextPrime(2)); - EXPECT_EQ(5, this->table_->GetNextPrime(3)); - EXPECT_EQ(7, this->table_->GetNextPrime(5)); - EXPECT_EQ(11, this->table_->GetNextPrime(7)); - EXPECT_EQ(131, this->table_->GetNextPrime(128)); -} - -// Type-parameterized tests involve one extra step: you have to -// enumerate the tests you defined: -REGISTER_TYPED_TEST_CASE_P( - PrimeTableTest2, // The first argument is the test case name. - // The rest of the arguments are the test names. - ReturnsFalseForNonPrimes, ReturnsTrueForPrimes, CanGetNextPrime); - -// At this point the test pattern is done. However, you don't have -// any real test yet as you haven't said which types you want to run -// the tests with. - -// To turn the abstract test pattern into real tests, you instantiate -// it with a list of types. Usually the test pattern will be defined -// in a .h file, and anyone can #include and instantiate it. You can -// even instantiate it more than once in the same program. To tell -// different instances apart, you give each of them a name, which will -// become part of the test case name and can be used in test filters. - -// The list of types we want to test. Note that it doesn't have to be -// defined at the time we write the TYPED_TEST_P()s. -typedef Types - PrimeTableImplementations; -INSTANTIATE_TYPED_TEST_CASE_P(OnTheFlyAndPreCalculated, // Instance name - PrimeTableTest2, // Test case name - PrimeTableImplementations); // Type list - -#endif // GTEST_HAS_TYPED_TEST_P diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample7_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample7_unittest.cc deleted file mode 100644 index b5d507a9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample7_unittest.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to test common properties of multiple -// implementations of an interface (aka interface tests) using -// value-parameterized tests. Each test in the test case has -// a parameter that is an interface pointer to an implementation -// tested. - -// The interface and its implementations are in this header. -#include "prime_tables.h" - -#include - -#if GTEST_HAS_PARAM_TEST - -using ::testing::TestWithParam; -using ::testing::Values; - -// As a general rule, tested objects should not be reused between tests. -// Also, their constructors and destructors of tested objects can have -// side effects. Thus you should create and destroy them for each test. -// In this sample we will define a simple factory function for PrimeTable -// objects. We will instantiate objects in test's SetUp() method and -// delete them in TearDown() method. -typedef PrimeTable* CreatePrimeTableFunc(); - -PrimeTable* CreateOnTheFlyPrimeTable() { - return new OnTheFlyPrimeTable(); -} - -template -PrimeTable* CreatePreCalculatedPrimeTable() { - return new PreCalculatedPrimeTable(max_precalculated); -} - -// Inside the test body, fixture constructor, SetUp(), and TearDown() -// you can refer to the test parameter by GetParam(). -// In this case, the test parameter is a PrimeTableFactory interface pointer -// which we use in fixture's SetUp() to create and store an instance of -// PrimeTable. -class PrimeTableTest : public TestWithParam { - public: - virtual ~PrimeTableTest() { delete table_; } - virtual void SetUp() { table_ = (*GetParam())(); } - virtual void TearDown() { - delete table_; - table_ = NULL; - } - - protected: - PrimeTable* table_; -}; - -TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) { - EXPECT_FALSE(table_->IsPrime(-5)); - EXPECT_FALSE(table_->IsPrime(0)); - EXPECT_FALSE(table_->IsPrime(1)); - EXPECT_FALSE(table_->IsPrime(4)); - EXPECT_FALSE(table_->IsPrime(6)); - EXPECT_FALSE(table_->IsPrime(100)); -} - -TEST_P(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(table_->IsPrime(2)); - EXPECT_TRUE(table_->IsPrime(3)); - EXPECT_TRUE(table_->IsPrime(5)); - EXPECT_TRUE(table_->IsPrime(7)); - EXPECT_TRUE(table_->IsPrime(11)); - EXPECT_TRUE(table_->IsPrime(131)); -} - -TEST_P(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, table_->GetNextPrime(0)); - EXPECT_EQ(3, table_->GetNextPrime(2)); - EXPECT_EQ(5, table_->GetNextPrime(3)); - EXPECT_EQ(7, table_->GetNextPrime(5)); - EXPECT_EQ(11, table_->GetNextPrime(7)); - EXPECT_EQ(131, table_->GetNextPrime(128)); -} - -// In order to run value-parameterized tests, you need to instantiate them, -// or bind them to a list of values which will be used as test parameters. -// You can instantiate them in a different translation module, or even -// instantiate them several times. -// -// Here, we instantiate our tests with a list of two PrimeTable object -// factory functions: -INSTANTIATE_TEST_CASE_P( - OnTheFlyAndPreCalculated, - PrimeTableTest, - Values(&CreateOnTheFlyPrimeTable, &CreatePreCalculatedPrimeTable<1000>)); - -#else - -// Google Test doesn't support value-parameterized tests on some platforms -// and compilers, such as MSVC 7.1. If we use conditional compilation to -// compile out all code referring to the gtest_main library, MSVC linker -// will not link that library at all and consequently complain about -// missing entry point defined in that library (fatal error LNK1561: -// entry point must be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {} - -#endif // GTEST_HAS_PARAM_TEST diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample8_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample8_unittest.cc deleted file mode 100644 index d76136a7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample8_unittest.cc +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to test code relying on some global flag variables. -// Combine() helps with generating all possible combinations of such flags, -// and each test is given one combination as a parameter. - -// Use class definitions to test from this header. -#include "prime_tables.h" - -#include - -#if GTEST_HAS_COMBINE - -// Suppose we want to introduce a new, improved implementation of PrimeTable -// which combines speed of PrecalcPrimeTable and versatility of -// OnTheFlyPrimeTable (see prime_tables.h). Inside it instantiates both -// PrecalcPrimeTable and OnTheFlyPrimeTable and uses the one that is more -// appropriate under the circumstances. But in low memory conditions, it can be -// told to instantiate without PrecalcPrimeTable instance at all and use only -// OnTheFlyPrimeTable. -class HybridPrimeTable : public PrimeTable { - public: - HybridPrimeTable(bool force_on_the_fly, int max_precalculated) - : on_the_fly_impl_(new OnTheFlyPrimeTable), - precalc_impl_(force_on_the_fly ? NULL : - new PreCalculatedPrimeTable(max_precalculated)), - max_precalculated_(max_precalculated) {} - virtual ~HybridPrimeTable() { - delete on_the_fly_impl_; - delete precalc_impl_; - } - - virtual bool IsPrime(int n) const { - if (precalc_impl_ != NULL && n < max_precalculated_) - return precalc_impl_->IsPrime(n); - else - return on_the_fly_impl_->IsPrime(n); - } - - virtual int GetNextPrime(int p) const { - int next_prime = -1; - if (precalc_impl_ != NULL && p < max_precalculated_) - next_prime = precalc_impl_->GetNextPrime(p); - - return next_prime != -1 ? next_prime : on_the_fly_impl_->GetNextPrime(p); - } - - private: - OnTheFlyPrimeTable* on_the_fly_impl_; - PreCalculatedPrimeTable* precalc_impl_; - int max_precalculated_; -}; - -using ::testing::TestWithParam; -using ::testing::Bool; -using ::testing::Values; -using ::testing::Combine; - -// To test all code paths for HybridPrimeTable we must test it with numbers -// both within and outside PreCalculatedPrimeTable's capacity and also with -// PreCalculatedPrimeTable disabled. We do this by defining fixture which will -// accept different combinations of parameters for instantiating a -// HybridPrimeTable instance. -class PrimeTableTest : public TestWithParam< ::std::tr1::tuple > { - protected: - virtual void SetUp() { - // This can be written as - // - // bool force_on_the_fly; - // int max_precalculated; - // tie(force_on_the_fly, max_precalculated) = GetParam(); - // - // once the Google C++ Style Guide allows use of ::std::tr1::tie. - // - bool force_on_the_fly = ::std::tr1::get<0>(GetParam()); - int max_precalculated = ::std::tr1::get<1>(GetParam()); - table_ = new HybridPrimeTable(force_on_the_fly, max_precalculated); - } - virtual void TearDown() { - delete table_; - table_ = NULL; - } - HybridPrimeTable* table_; -}; - -TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) { - // Inside the test body, you can refer to the test parameter by GetParam(). - // In this case, the test parameter is a PrimeTable interface pointer which - // we can use directly. - // Please note that you can also save it in the fixture's SetUp() method - // or constructor and use saved copy in the tests. - - EXPECT_FALSE(table_->IsPrime(-5)); - EXPECT_FALSE(table_->IsPrime(0)); - EXPECT_FALSE(table_->IsPrime(1)); - EXPECT_FALSE(table_->IsPrime(4)); - EXPECT_FALSE(table_->IsPrime(6)); - EXPECT_FALSE(table_->IsPrime(100)); -} - -TEST_P(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(table_->IsPrime(2)); - EXPECT_TRUE(table_->IsPrime(3)); - EXPECT_TRUE(table_->IsPrime(5)); - EXPECT_TRUE(table_->IsPrime(7)); - EXPECT_TRUE(table_->IsPrime(11)); - EXPECT_TRUE(table_->IsPrime(131)); -} - -TEST_P(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, table_->GetNextPrime(0)); - EXPECT_EQ(3, table_->GetNextPrime(2)); - EXPECT_EQ(5, table_->GetNextPrime(3)); - EXPECT_EQ(7, table_->GetNextPrime(5)); - EXPECT_EQ(11, table_->GetNextPrime(7)); - EXPECT_EQ(131, table_->GetNextPrime(128)); -} - -// In order to run value-parameterized tests, you need to instantiate them, -// or bind them to a list of values which will be used as test parameters. -// You can instantiate them in a different translation module, or even -// instantiate them several times. -// -// Here, we instantiate our tests with a list of parameters. We must combine -// all variations of the boolean flag suppressing PrecalcPrimeTable and some -// meaningful values for tests. We choose a small value (1), and a value that -// will put some of the tested numbers beyond the capability of the -// PrecalcPrimeTable instance and some inside it (10). Combine will produce all -// possible combinations. -INSTANTIATE_TEST_CASE_P(MeaningfulTestParameters, - PrimeTableTest, - Combine(Bool(), Values(1, 10))); - -#else - -// Google Test doesn't support Combine() on some platforms and compilers, -// such as MSVC 7.1. If we use conditional compilation to compile out -// all code referring to the gtest_main library, MSVC linker will not -// link that library at all and consequently complain about missing entry -// point defined in that library (fatal error LNK1561: entry point must -// be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {} - -#endif // GTEST_HAS_COMBINE diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample9_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample9_unittest.cc deleted file mode 100644 index 8944c47b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/samples/sample9_unittest.cc +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2009 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) - -// This sample shows how to use Google Test listener API to implement -// an alternative console output and how to use the UnitTest reflection API -// to enumerate test cases and tests and to inspect their results. - -#include - -#include - -using ::testing::EmptyTestEventListener; -using ::testing::InitGoogleTest; -using ::testing::Test; -using ::testing::TestCase; -using ::testing::TestEventListeners; -using ::testing::TestInfo; -using ::testing::TestPartResult; -using ::testing::UnitTest; - -namespace { - -// Provides alternative output mode which produces minimal amount of -// information about tests. -class TersePrinter : public EmptyTestEventListener { - private: - // Called before any test activity starts. - virtual void OnTestProgramStart(const UnitTest& unit_test) {} - - // Called after all test activities have ended. - virtual void OnTestProgramEnd(const UnitTest& unit_test) { - fprintf(stdout, "TEST %s\n", unit_test.Passed() ? "PASSED" : "FAILED"); - fflush(stdout); - } - - // Called before a test starts. - virtual void OnTestStart(const TestInfo& test_info) { - fprintf(stdout, - "*** Test %s.%s starting.\n", - test_info.test_case_name(), - test_info.name()); - fflush(stdout); - } - - // Called after a failed assertion or a SUCCESS(). - virtual void OnTestPartResult(const TestPartResult& test_part_result) { - fprintf(stdout, - "%s in %s:%d\n%s\n", - test_part_result.failed() ? "*** Failure" : "Success", - test_part_result.file_name(), - test_part_result.line_number(), - test_part_result.summary()); - fflush(stdout); - } - - // Called after a test ends. - virtual void OnTestEnd(const TestInfo& test_info) { - fprintf(stdout, - "*** Test %s.%s ending.\n", - test_info.test_case_name(), - test_info.name()); - fflush(stdout); - } -}; // class TersePrinter - -TEST(CustomOutputTest, PrintsMessage) { - printf("Printing something from the test body...\n"); -} - -TEST(CustomOutputTest, Succeeds) { - SUCCEED() << "SUCCEED() has been invoked from here"; -} - -TEST(CustomOutputTest, Fails) { - EXPECT_EQ(1, 2) - << "This test fails in order to demonstrate alternative failure messages"; -} - -} // namespace - -int main(int argc, char **argv) { - InitGoogleTest(&argc, argv); - - bool terse_output = false; - if (argc > 1 && strcmp(argv[1], "--terse_output") == 0 ) - terse_output = true; - else - printf("%s\n", "Run this program with --terse_output to change the way " - "it prints its output."); - - UnitTest& unit_test = *UnitTest::GetInstance(); - - // If we are given the --terse_output command line flag, suppresses the - // standard output and attaches own result printer. - if (terse_output) { - TestEventListeners& listeners = unit_test.listeners(); - - // Removes the default console output listener from the list so it will - // not receive events from Google Test and won't print any output. Since - // this operation transfers ownership of the listener to the caller we - // have to delete it as well. - delete listeners.Release(listeners.default_result_printer()); - - // Adds the custom output listener to the list. It will now receive - // events from Google Test and print the alternative output. We don't - // have to worry about deleting it since Google Test assumes ownership - // over it after adding it to the list. - listeners.Append(new TersePrinter); - } - int ret_val = RUN_ALL_TESTS(); - - // This is an example of using the UnitTest reflection API to inspect test - // results. Here we discount failures from the tests we expected to fail. - int unexpectedly_failed_tests = 0; - for (int i = 0; i < unit_test.total_test_case_count(); ++i) { - const TestCase& test_case = *unit_test.GetTestCase(i); - for (int j = 0; j < test_case.total_test_count(); ++j) { - const TestInfo& test_info = *test_case.GetTestInfo(j); - // Counts failed tests that were not meant to fail (those without - // 'Fails' in the name). - if (test_info.result()->Failed() && - strcmp(test_info.name(), "Fails") != 0) { - unexpectedly_failed_tests++; - } - } - } - - // Test that were meant to fail should not affect the test program outcome. - if (unexpectedly_failed_tests == 0) - ret_val = 0; - - return ret_val; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConscript b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConscript deleted file mode 100644 index 26fa5fbf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConscript +++ /dev/null @@ -1,325 +0,0 @@ -# -*- Python -*- -# Copyright 2008 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -"""Builds the Google Test (gtest) lib. This has been tested on Windows, -Linux, Mac OS X, and Cygwin. The compilation settings from your project -will be used, with some specific flags required for gtest added. - -You should be able to call this file from more or less any SConscript -file. - -You can optionally set a variable on the construction environment to -have the unit test executables copied to your output directory. The -variable should be env['EXE_OUTPUT']. - -Another optional variable is env['LIB_OUTPUT']. If set, the generated -libraries are copied to the folder indicated by the variable. - -If you place the gtest sources within your own project's source -directory, you should be able to call this SConscript file simply as -follows: - -# -- cut here -- -# Build gtest library; first tell it where to copy executables. -env['EXE_OUTPUT'] = '#/mybuilddir/mybuildmode' # example, optional -env['LIB_OUTPUT'] = '#/mybuilddir/mybuildmode/lib' -env.SConscript('whateverpath/gtest/scons/SConscript') -# -- cut here -- - -If on the other hand you place the gtest sources in a directory -outside of your project's source tree, you would use a snippet similar -to the following: - -# -- cut here -- - -# The following assumes that $BUILD_DIR refers to the root of the -# directory for your current build mode, e.g. "#/mybuilddir/mybuildmode" - -# Build gtest library; as it is outside of our source root, we need to -# tell SCons that the directory it will refer to as -# e.g. $BUILD_DIR/gtest is actually on disk in original form as -# ../../gtest (relative to your project root directory). Recall that -# SCons by default copies all source files into the build directory -# before building. -gtest_dir = env.Dir('$BUILD_DIR/gtest') - -# Modify this part to point to gtest relative to the current -# SConscript or SConstruct file's directory. The ../.. path would -# be different per project, to locate the base directory for gtest. -gtest_dir.addRepository(env.Dir('../../gtest')) - -# Tell the gtest SCons file where to copy executables. -env['EXE_OUTPUT'] = '$BUILD_DIR' # example, optional - -# Call the gtest SConscript to build gtest.lib and unit tests. The -# location of the library should end up as -# '$BUILD_DIR/gtest/scons/gtest.lib' -env.SConscript(env.File('scons/SConscript', gtest_dir)) - -# -- cut here -- -""" - - -__author__ = 'joi@google.com (Joi Sigurdsson)' - - -import os - -############################################################ -# Environments for building the targets, sorted by name. - -Import('env', 'EnvCreator') - -env = EnvCreator.Create(env) - -# Note: The relative paths in SConscript files are relative to the location -# of the SConscript file itself. To make a path relative to the location of -# the main SConstruct file, prepend the path with the # sign. -# -# But if a project uses variant builds without source duplication, the above -# rule gets muddied a bit. In that case the paths must be counted from the -# location of the copy of the SConscript file in scons/build//scons. -# -# Include paths to gtest headers are relative to either the gtest -# directory or the 'include' subdirectory of it, and this SConscript -# file is one directory deeper than the gtest directory. -env.Prepend(CPPPATH = ['..', '../include']) - -env_use_own_tuple = EnvCreator.Create(env, EnvCreator.UseOwnTuple) -env_less_optimized = EnvCreator.Create(env, EnvCreator.LessOptimized) -env_with_threads = EnvCreator.Create(env, EnvCreator.WithThreads) -# The following environments are used to compile gtest_unittest.cc, which -# triggers a warning in all but the most recent GCC versions when compiling -# the EXPECT_EQ(NULL, ptr) statement. -env_warning_ok = EnvCreator.Create(env, EnvCreator.WarningOk) -env_with_exceptions = EnvCreator.Create(env_warning_ok, - EnvCreator.WithExceptions) -env_without_rtti = EnvCreator.Create(env_warning_ok, EnvCreator.NoRtti) - -############################################################ -# Helpers for creating build targets. - -# Caches object file targets built by GtestObject to allow passing the -# same source file with the same environment twice into the function as a -# convenience. -_all_objects = {} - -def GtestObject(build_env, source): - """Returns a target to build an object file from the given .cc source file.""" - - object_name = os.path.basename(source).rstrip('.cc') + build_env['OBJ_SUFFIX'] - if object_name not in _all_objects: - _all_objects[object_name] = build_env.Object(target=object_name, - source=source) - return _all_objects[object_name] - - -def GtestStaticLibraries(build_env): - """Builds static libraries for gtest and gtest_main in build_env. - - Args: - build_env: An environment in which to build libraries. - - Returns: - A pair (gtest library, gtest_main library) built in the given environment. - """ - - gtest_object = GtestObject(build_env, '../src/gtest-all.cc') - gtest_main_object = GtestObject(build_env, '../src/gtest_main.cc') - - return (build_env.StaticLibrary(target='gtest' + build_env['OBJ_SUFFIX'], - source=[gtest_object]), - build_env.StaticLibrary(target='gtest_main' + build_env['OBJ_SUFFIX'], - source=[gtest_object, gtest_main_object])) - - -def GtestBinary(build_env, target, gtest_libs, sources): - """Creates a target to build a binary (either test or sample). - - Args: - build_env: The SCons construction environment to use to build. - target: The basename of the target's main source file, also used as the - target name. - gtest_libs: The gtest library or the list of libraries to link. - sources: A list of source files in the target. - """ - srcs = [] # The object targets corresponding to sources. - for src in sources: - if type(src) is str: - srcs.append(GtestObject(build_env, src)) - else: - srcs.append(src) - - if not gtest_libs: - gtest_libs = [] - elif type(gtest_libs) != type(list()): - gtest_libs = [gtest_libs] - binary = build_env.Program(target=target, source=srcs, LIBS=gtest_libs) - if 'EXE_OUTPUT' in build_env.Dictionary(): - build_env.Install('$EXE_OUTPUT', source=[binary]) - - -def GtestTest(build_env, target, gtest_libs, additional_sources=None): - """Creates a target to build the given test. - - Args: - build_env: The SCons construction environment to use to build. - target: The basename of the target test .cc file. - gtest_libs: The gtest library or the list of libraries to use. - additional_sources: A list of additional source files in the target. - """ - - GtestBinary(build_env, target, gtest_libs, - ['../test/%s.cc' % target] + (additional_sources or [])) - - -def GtestSample(build_env, target, additional_sources=None): - """Creates a target to build the given sample. - - Args: - build_env: The SCons construction environment to use to build. - target: The basename of the target sample .cc file. - gtest_libs: The gtest library or the list of libraries to use. - additional_sources: A list of additional source files in the target. - """ - GtestBinary(build_env, target, gtest_main, - ['../samples/%s.cc' % target] + (additional_sources or [])) - - -############################################################ -# Object and library targets. - -# gtest.lib to be used by most apps (if you have your own main function). -# gtest_main.lib can be used if you just want a basic main function; it is also -# used by some tests for Google Test itself. -gtest, gtest_main = GtestStaticLibraries(env) -gtest_ex, gtest_main_ex = GtestStaticLibraries(env_with_exceptions) -gtest_no_rtti, gtest_main_no_rtti = GtestStaticLibraries(env_without_rtti) -gtest_use_own_tuple, gtest_use_own_tuple_main = GtestStaticLibraries( - env_use_own_tuple) - -# Install the libraries if needed. -if 'LIB_OUTPUT' in env.Dictionary(): - env.Install('$LIB_OUTPUT', source=[gtest, gtest_main, - gtest_ex, gtest_main_ex, - gtest_no_rtti, gtest_main_no_rtti, - gtest_use_own_tuple, - gtest_use_own_tuple_main]) - -############################################################ -# Test targets using the standard environment. - -GtestTest(env, 'gtest-filepath_test', gtest_main) -GtestTest(env, 'gtest-message_test', gtest_main) -GtestTest(env, 'gtest-options_test', gtest_main) -GtestTest(env, 'gtest_environment_test', gtest) -GtestTest(env, 'gtest_main_unittest', gtest_main) -GtestTest(env, 'gtest_no_test_unittest', gtest) -GtestTest(env, 'gtest_pred_impl_unittest', gtest_main) -GtestTest(env, 'gtest_prod_test', gtest_main, - additional_sources=['../test/production.cc']) -GtestTest(env, 'gtest_repeat_test', gtest) -GtestTest(env, 'gtest_sole_header_test', gtest_main) -GtestTest(env, 'gtest-test-part_test', gtest_main) -GtestTest(env, 'gtest-typed-test_test', gtest_main, - additional_sources=['../test/gtest-typed-test2_test.cc']) -GtestTest(env, 'gtest-param-test_test', gtest, - additional_sources=['../test/gtest-param-test2_test.cc']) -GtestTest(env, 'gtest_color_test_', gtest) -GtestTest(env, 'gtest-linked_ptr_test', gtest_main) -GtestTest(env, 'gtest-port_test', gtest_main) -GtestTest(env, 'gtest_break_on_failure_unittest_', gtest) -GtestTest(env, 'gtest_filter_unittest_', gtest) -GtestTest(env, 'gtest_help_test_', gtest_main) -GtestTest(env, 'gtest_list_tests_unittest_', gtest) -GtestTest(env, 'gtest_throw_on_failure_test_', gtest) -GtestTest(env, 'gtest_xml_outfile1_test_', gtest_main) -GtestTest(env, 'gtest_xml_outfile2_test_', gtest_main) -GtestTest(env, 'gtest_xml_output_unittest_', gtest) -GtestTest(env, 'gtest-unittest-api_test', gtest) -GtestTest(env, 'gtest-listener_test', gtest) -GtestTest(env, 'gtest_shuffle_test_', gtest) - -############################################################ -# Tests targets using custom environments. - -GtestTest(env_warning_ok, 'gtest_unittest', gtest_main) -GtestTest(env_with_exceptions, 'gtest_output_test_', gtest_ex) -GtestTest(env_with_exceptions, 'gtest_throw_on_failure_ex_test', gtest_ex) -GtestTest(env_with_threads, 'gtest-death-test_test', gtest_main) -GtestTest(env_less_optimized, 'gtest_env_var_test_', gtest) -GtestTest(env_less_optimized, 'gtest_uninitialized_test_', gtest) -GtestTest(env_use_own_tuple, 'gtest-tuple_test', gtest_use_own_tuple_main) -GtestBinary(env_use_own_tuple, - 'gtest_use_own_tuple_test', - gtest_use_own_tuple_main, - ['../test/gtest-param-test_test.cc', - '../test/gtest-param-test2_test.cc']) -GtestBinary(env_with_exceptions, 'gtest_ex_unittest', gtest_main_ex, - ['../test/gtest_unittest.cc']) -GtestBinary(env_without_rtti, 'gtest_no_rtti_test', gtest_main_no_rtti, - ['../test/gtest_unittest.cc']) - -############################################################ -# Sample targets. - -# Use the GTEST_BUILD_SAMPLES build variable to control building of samples. -# In your SConstruct file, add -# vars = Variables() -# vars.Add(BoolVariable('GTEST_BUILD_SAMPLES', 'Build samples', False)) -# my_environment = Environment(variables = vars, ...) -# Then, in the command line use GTEST_BUILD_SAMPLES=true to enable them. -if env.get('GTEST_BUILD_SAMPLES', False): - GtestSample(env, 'sample1_unittest', - additional_sources=['../samples/sample1.cc']) - GtestSample(env, 'sample2_unittest', - additional_sources=['../samples/sample2.cc']) - GtestSample(env, 'sample3_unittest') - GtestSample(env, 'sample4_unittest', - additional_sources=['../samples/sample4.cc']) - GtestSample(env, 'sample5_unittest', - additional_sources=['../samples/sample1.cc']) - GtestSample(env, 'sample6_unittest') - GtestSample(env, 'sample7_unittest') - GtestSample(env, 'sample8_unittest') - GtestSample(env, 'sample9_unittest') - GtestSample(env, 'sample10_unittest') - -# These exports are used by Google Mock. -gtest_exports = {'gtest': gtest, - 'gtest_ex': gtest_ex, - 'gtest_no_rtti': gtest_no_rtti, - 'gtest_use_own_tuple': gtest_use_own_tuple, - 'EnvCreator': EnvCreator, - 'GtestObject': GtestObject, - 'GtestBinary': GtestBinary, - 'GtestTest': GtestTest} -# Makes the gtest_exports dictionary available to the invoking SConstruct. -Return('gtest_exports') diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct deleted file mode 100644 index 1f2f37f6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct +++ /dev/null @@ -1,61 +0,0 @@ -# -*- Python -*- -# Copyright 2008 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: joi@google.com (Joi Sigurdsson) -# Author: vladl@google.com (Vlad Losev) -# -# Base build file for Google Test Tests. -# -# Usage: -# cd to the directory with this file, then -# ./scons.py [OPTIONS] -# -# where frequently used command-line options include: -# -h print usage help. -# BUILD=all build all build types. -# BUILD=win-opt build the given build type. - -EnsurePythonVersion(2, 3) - -sconstruct_helper = SConscript('SConstruct.common') - -sconstruct_helper.Initialize(build_root_path='..', - support_multiple_win_builds=False) - -win_base = sconstruct_helper.MakeWinBaseEnvironment() - -if win_base.get('MSVS_VERSION', None) == '7.1': - sconstruct_helper.AllowVc71StlWithoutExceptions(win_base) - -sconstruct_helper.MakeWinDebugEnvironment(win_base, 'win-dbg') -sconstruct_helper.MakeWinOptimizedEnvironment(win_base, 'win-opt') - -sconstruct_helper.ConfigureGccEnvironments() - -sconstruct_helper.BuildSelectedEnvironments() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct.common b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct.common deleted file mode 100644 index 2445bebd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scons/SConstruct.common +++ /dev/null @@ -1,356 +0,0 @@ -# -*- Python -*- -# Copyright 2008 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: joi@google.com (Joi Sigurdsson) -# Author: vladl@google.com (Vlad Losev) -# -# Shared SCons utilities for building Google Test inside and outside of -# Google's environment. -# - -EnsurePythonVersion(2, 3) - - -BUILD_DIR_PREFIX = 'build' - - -class SConstructHelper: - def __init__(self): - # A dictionary to look up an environment by its name. - self.env_dict = {} - - def Initialize(self, build_root_path, support_multiple_win_builds=False): - test_env = Environment() - platform = test_env['PLATFORM'] - if platform == 'win32': - if support_multiple_win_builds: - available_build_types = ['win-dbg8', 'win-opt8', 'win-dbg', 'win-opt'] - else: - available_build_types = ['win-dbg', 'win-opt'] - elif platform == 'darwin': # MacOSX - available_build_types = ['mac-dbg', 'mac-opt'] - else: - available_build_types = ['dbg', 'opt'] # Assuming POSIX-like environment - # with GCC by default. - - vars = Variables() - vars.Add(ListVariable('BUILD', 'Build type', available_build_types[0], - available_build_types)) - vars.Add(BoolVariable('GTEST_BUILD_SAMPLES', 'Build samples', False)) - - # Create base environment. - self.env_base = Environment(variables=vars, - BUILD_MODE={'BUILD' : '"${BUILD}"'}) - - # Leave around a variable pointing at the build root so that SConscript - # files from outside our project root can find their bearings. Trick - # borrowed from Hammer in Software Construction Toolkit - # (http://code.google.com/p/swtoolkit/); if/when we switch to using the - # Hammer idioms instead of just Hammer's version of SCons, we should be - # able to remove this line. - self.env_base['SOURCE_ROOT'] = self.env_base.Dir(build_root_path) - - # And another that definitely always points to the project root. - self.env_base['PROJECT_ROOT'] = self.env_base.Dir('.').abspath - - # Enable scons -h - Help(vars.GenerateHelpText(self.env_base)) - - class EnvCreator: - """Creates new customized environments from a base one.""" - - def _Remove(cls, env, attribute, value): - """Removes the given attribute value from the environment.""" - - attribute_values = env[attribute] - if value in attribute_values: - attribute_values.remove(value) - _Remove = classmethod(_Remove) - - def Create(cls, base_env, modifier=None): - # User should NOT create more than one environment with the same - # modifier (including None). - env = base_env.Clone() - if modifier: - modifier(env) - else: - env['OBJ_SUFFIX'] = '' # Default suffix for unchanged environment. - return env; - Create = classmethod(Create) - - # Each of the following methods modifies the environment for a particular - # purpose and can be used by clients for creating new environments. Each - # one needs to set the OBJ_SUFFIX variable to a unique suffix to - # differentiate targets built with that environment. Otherwise, SCons may - # complain about same target built with different settings. - - def UseOwnTuple(cls, env): - """Instructs Google Test to use its internal implementation of tuple.""" - - env['OBJ_SUFFIX'] = '_use_own_tuple' - env.Append(CPPDEFINES = 'GTEST_USE_OWN_TR1_TUPLE=1') - UseOwnTuple = classmethod(UseOwnTuple) - - def WarningOk(cls, env): - """Does not treat warnings as errors. - - Necessary for compiling gtest_unittest.cc, which triggers a gcc - warning when testing EXPECT_EQ(NULL, ptr).""" - - env['OBJ_SUFFIX'] = '_warning_ok' - if env['PLATFORM'] == 'win32': - cls._Remove(env, 'CCFLAGS', '-WX') - else: - cls._Remove(env, 'CCFLAGS', '-Werror') - WarningOk = classmethod(WarningOk) - - def WithExceptions(cls, env): - """Re-enables exceptions.""" - - env['OBJ_SUFFIX'] = '_ex' - if env['PLATFORM'] == 'win32': - env.Append(CCFLAGS=['/EHsc']) - env.Append(CPPDEFINES='_HAS_EXCEPTIONS=1') - # Undoes the _TYPEINFO_ hack, which is unnecessary and only creates - # trouble when exceptions are enabled. - cls._Remove(env, 'CPPDEFINES', '_TYPEINFO_') - cls._Remove(env, 'CPPDEFINES', '_HAS_EXCEPTIONS=0') - else: - env.Append(CCFLAGS='-fexceptions') - cls._Remove(env, 'CCFLAGS', '-fno-exceptions') - WithExceptions = classmethod(WithExceptions) - - def LessOptimized(cls, env): - """Disables certain optimizations on Windows. - - We need to disable some optimization flags for some tests on - Windows; otherwise the redirection of stdout does not work - (apparently because of a compiler bug).""" - - env['OBJ_SUFFIX'] = '_less_optimized' - if env['PLATFORM'] == 'win32': - for flag in ['/O1', '/Os', '/Og', '/Oy']: - cls._Remove(env, 'LINKFLAGS', flag) - LessOptimized = classmethod(LessOptimized) - - def WithThreads(cls, env): - """Allows use of threads. - - Currently only enables pthreads under GCC.""" - - env['OBJ_SUFFIX'] = '_with_threads' - if env['PLATFORM'] != 'win32': - # Assuming POSIX-like environment with GCC. - # TODO(vladl@google.com): sniff presence of pthread_atfork instead of - # selecting on a platform. - env.Append(CCFLAGS=['-pthread']) - env.Append(LINKFLAGS=['-pthread']) - WithThreads = classmethod(WithThreads) - - def NoRtti(cls, env): - """Disables RTTI support.""" - - env['OBJ_SUFFIX'] = '_no_rtti' - if env['PLATFORM'] == 'win32': - env.Append(CCFLAGS=['/GR-']) - else: - env.Append(CCFLAGS=['-fno-rtti']) - env.Append(CPPDEFINES='GTEST_HAS_RTTI=0') - NoRtti = classmethod(NoRtti) - - def AllowVc71StlWithoutExceptions(self, env): - env.Append( - CPPDEFINES = [# needed for using some parts of STL with exception - # disabled. The scoop is given here, with comments - # from P.J. Plauger at - # http://groups.google.com/group/microsoft.public.vc.stl/browse_thread/thread/5e719833c6bdb177?q=_HAS_EXCEPTIONS+using+namespace+std&pli=1 - '_TYPEINFO_']) - - def MakeWinBaseEnvironment(self): - win_base = self.env_base.Clone( - platform='win32', - CCFLAGS=['-GS', # Enable buffer security check - '-W4', # Warning level - - # Disables warnings that are either uninteresting or - # hard to fix. - - '-WX', # Treat warning as errors - #'-GR-', # Disable runtime type information - '-RTCs', # Enable stack-frame run-time error checks - '-RTCu', # Report when variable used without init. - #'-EHs', # enable C++ EH (no SEH exceptions) - '-nologo', # Suppress logo line - '-J', # All chars unsigned - #'-Wp64', # Detect 64-bit portability issues. This - # flag has been deprecated by VS 2008. - '-Zi', # Produce debug information in PDB files. - ], - CCPDBFLAGS='', - CPPDEFINES=['_UNICODE', 'UNICODE', - 'WIN32', '_WIN32', - 'STRICT', - 'WIN32_LEAN_AND_MEAN', - '_HAS_EXCEPTIONS=0', - ], - LIBPATH=['#/$MAIN_DIR/lib'], - LINKFLAGS=['-MACHINE:x86', # Enable safe SEH (not supp. on x64) - '-DEBUG', # Generate debug info - '-NOLOGO', # Suppress logo line - ], - # All strings in string tables zero terminated. - RCFLAGS=['-n']) - - return win_base - - def SetBuildNameAndDir(self, env, name): - env['BUILD_NAME'] = name; - env['BUILD_DIR'] = '%s/%s' % (BUILD_DIR_PREFIX, name) - self.env_dict[name] = env - - def MakeWinDebugEnvironment(self, base_environment, name): - """Takes a VC71 or VC80 base environment and adds debug settings.""" - debug_env = base_environment.Clone() - self.SetBuildNameAndDir(debug_env, name) - debug_env.Append( - CCFLAGS = ['-Od', # Disable optimizations - '-MTd', # Multithreaded, static link (debug) - # Path for PDB files - '-Fd%s\\' % debug_env.Dir(debug_env['BUILD_DIR']), - ], - CPPDEFINES = ['DEBUG', - '_DEBUG', - ], - LIBPATH = [], - LINKFLAGS = ['-INCREMENTAL:yes', - '/OPT:NOICF', - ] - ) - return debug_env - - def MakeWinOptimizedEnvironment(self, base_environment, name): - """Takes a VC71 or VC80 base environment and adds release settings.""" - optimized_env = base_environment.Clone() - self.SetBuildNameAndDir(optimized_env, name) - optimized_env.Append( - CCFLAGS = ['-GL', # Enable link-time code generation (/GL) - '-GF', # Enable String Pooling (/GF) - '-MT', # Multithreaded, static link - # Path for PDB files - '-Fd%s\\' % optimized_env.Dir(optimized_env['BUILD_DIR']), - - # Favor small code (this is /O1 minus /Og) - '-Os', - '-Oy', - '-Ob2', - '-Gs', - '-GF', - '-Gy', - ], - CPPDEFINES = ['NDEBUG', - '_NDEBUG', - ], - LIBPATH = [], - ARFLAGS = ['-LTCG'], # Link-time Code Generation - LINKFLAGS = ['-LTCG', # Link-time Code Generation - '-OPT:REF', # Optimize by reference. - '-OPT:ICF=32', # Optimize by identical COMDAT folding - '-OPT:NOWIN98', # Optimize by not aligning section for - # Win98 - '-INCREMENTAL:NO', # No incremental linking as we don't - # want padding bytes in release build. - ], - ) - return optimized_env - - def AddGccFlagsTo(self, env, optimized): - env.Append(CCFLAGS=['-fno-exceptions', - '-Wall', - '-Werror', - ]) - if optimized: - env.Append(CCFLAGS=['-O2'], CPPDEFINES=['NDEBUG', '_NDEBUG']) - else: - env.Append(CCFLAGS=['-g'], CPPDEFINES=['DEBUG', '_DEBUG']) - - def ConfigureGccEnvironments(self): - # Mac environments. - mac_base = self.env_base.Clone(platform='darwin') - - mac_dbg = mac_base.Clone() - self.AddGccFlagsTo(mac_dbg, optimized=False) - self.SetBuildNameAndDir(mac_dbg, 'mac-dbg') - - mac_opt = mac_base.Clone() - self.AddGccFlagsTo(mac_opt, optimized=True) - self.SetBuildNameAndDir(mac_opt, 'mac-opt') - - # Generic GCC environments. - gcc_dbg = self.env_base.Clone() - self.AddGccFlagsTo(gcc_dbg, optimized=False) - self.SetBuildNameAndDir(gcc_dbg, 'dbg') - - gcc_opt = self.env_base.Clone() - self.AddGccFlagsTo(gcc_opt, optimized=True) - self.SetBuildNameAndDir(gcc_opt, 'opt') - - def BuildSelectedEnvironments(self): - EnvCreator = SConstructHelper.EnvCreator - Export('EnvCreator') - # Build using whichever environments the 'BUILD' option selected - for build_name in self.env_base['BUILD']: - print 'BUILDING %s' % build_name - env = self.env_dict[build_name] - - # Make sure SConscript files can refer to base build dir - env['MAIN_DIR'] = env.Dir(env['BUILD_DIR']) - - #print 'CCFLAGS: %s' % env.subst('$CCFLAGS') - #print 'LINK: %s' % env.subst('$LINK') - #print 'AR: %s' % env.subst('$AR') - #print 'CC: %s' % env.subst('$CC') - #print 'CXX: %s' % env.subst('$CXX') - #print 'LIBPATH: %s' % env.subst('$LIBPATH') - #print 'ENV:PATH: %s' % env['ENV']['PATH'] - #print 'ENV:INCLUDE: %s' % env['ENV']['INCLUDE'] - #print 'ENV:LIB: %s' % env['ENV']['LIB'] - #print 'ENV:TEMP: %s' % env['ENV']['TEMP'] - - Export('env') - # Invokes SConscript with variant_dir being build/. - # Counter-intuitively, src_dir is relative to the build dir and has - # to be '..' to point to the scons directory. - SConscript('SConscript', - src_dir='..', - variant_dir=env['BUILD_DIR'], - duplicate=0) - - -sconstruct_helper = SConstructHelper() -Return('sconstruct_helper') diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/fuse_gtest_files.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/fuse_gtest_files.py deleted file mode 100755 index 148444ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/fuse_gtest_files.py +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""fuse_gtest_files.py v0.2.0 -Fuses Google Test source code into a .h file and a .cc file. - -SYNOPSIS - fuse_gtest_files.py [GTEST_ROOT_DIR] OUTPUT_DIR - - Scans GTEST_ROOT_DIR for Google Test source code, and generates - two files: OUTPUT_DIR/gtest/gtest.h and OUTPUT_DIR/gtest/gtest-all.cc. - Then you can build your tests by adding OUTPUT_DIR to the include - search path and linking with OUTPUT_DIR/gtest/gtest-all.cc. These - two files contain everything you need to use Google Test. Hence - you can "install" Google Test by copying them to wherever you want. - - GTEST_ROOT_DIR can be omitted and defaults to the parent - directory of the directory holding this script. - -EXAMPLES - ./fuse_gtest_files.py fused_gtest - ./fuse_gtest_files.py path/to/unpacked/gtest fused_gtest - -This tool is experimental. In particular, it assumes that there is no -conditional inclusion of Google Test headers. Please report any -problems to googletestframework@googlegroups.com. You can read -http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for -more information. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sets -import sys - -# We assume that this file is in the scripts/ directory in the Google -# Test root directory. -DEFAULT_GTEST_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') - -# Regex for matching '#include '. -INCLUDE_GTEST_FILE_REGEX = re.compile(r'^\s*#\s*include\s*<(gtest/.+)>') - -# Regex for matching '#include "src/..."'. -INCLUDE_SRC_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(src/.+)"') - -# Where to find the source seed files. -GTEST_H_SEED = 'include/gtest/gtest.h' -GTEST_SPI_H_SEED = 'include/gtest/gtest-spi.h' -GTEST_ALL_CC_SEED = 'src/gtest-all.cc' - -# Where to put the generated files. -GTEST_H_OUTPUT = 'gtest/gtest.h' -GTEST_ALL_CC_OUTPUT = 'gtest/gtest-all.cc' - - -def VerifyFileExists(directory, relative_path): - """Verifies that the given file exists; aborts on failure. - - relative_path is the file path relative to the given directory. - """ - - if not os.path.isfile(os.path.join(directory, relative_path)): - print 'ERROR: Cannot find %s in directory %s.' % (relative_path, - directory) - print ('Please either specify a valid project root directory ' - 'or omit it on the command line.') - sys.exit(1) - - -def ValidateGTestRootDir(gtest_root): - """Makes sure gtest_root points to a valid gtest root directory. - - The function aborts the program on failure. - """ - - VerifyFileExists(gtest_root, GTEST_H_SEED) - VerifyFileExists(gtest_root, GTEST_ALL_CC_SEED) - - -def VerifyOutputFile(output_dir, relative_path): - """Verifies that the given output file path is valid. - - relative_path is relative to the output_dir directory. - """ - - # Makes sure the output file either doesn't exist or can be overwritten. - output_file = os.path.join(output_dir, relative_path) - if os.path.exists(output_file): - # TODO(wan@google.com): The following user-interaction doesn't - # work with automated processes. We should provide a way for the - # Makefile to force overwriting the files. - print ('%s already exists in directory %s - overwrite it? (y/N) ' % - (relative_path, output_dir)) - answer = sys.stdin.readline().strip() - if answer not in ['y', 'Y']: - print 'ABORTED.' - sys.exit(1) - - # Makes sure the directory holding the output file exists; creates - # it and all its ancestors if necessary. - parent_directory = os.path.dirname(output_file) - if not os.path.isdir(parent_directory): - os.makedirs(parent_directory) - - -def ValidateOutputDir(output_dir): - """Makes sure output_dir points to a valid output directory. - - The function aborts the program on failure. - """ - - VerifyOutputFile(output_dir, GTEST_H_OUTPUT) - VerifyOutputFile(output_dir, GTEST_ALL_CC_OUTPUT) - - -def FuseGTestH(gtest_root, output_dir): - """Scans folder gtest_root to generate gtest/gtest.h in output_dir.""" - - output_file = file(os.path.join(output_dir, GTEST_H_OUTPUT), 'w') - processed_files = sets.Set() # Holds all gtest headers we've processed. - - def ProcessFile(gtest_header_path): - """Processes the given gtest header file.""" - - # We don't process the same header twice. - if gtest_header_path in processed_files: - return - - processed_files.add(gtest_header_path) - - # Reads each line in the given gtest header. - for line in file(os.path.join(gtest_root, gtest_header_path), 'r'): - m = INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - # It's '#include ' - let's process it recursively. - ProcessFile('include/' + m.group(1)) - else: - # Otherwise we copy the line unchanged to the output file. - output_file.write(line) - - ProcessFile(GTEST_H_SEED) - output_file.close() - - -def FuseGTestAllCcToFile(gtest_root, output_file): - """Scans folder gtest_root to generate gtest/gtest-all.cc in output_file.""" - - processed_files = sets.Set() - - def ProcessFile(gtest_source_file): - """Processes the given gtest source file.""" - - # We don't process the same #included file twice. - if gtest_source_file in processed_files: - return - - processed_files.add(gtest_source_file) - - # Reads each line in the given gtest source file. - for line in file(os.path.join(gtest_root, gtest_source_file), 'r'): - m = INCLUDE_GTEST_FILE_REGEX.match(line) - if m: - if 'include/' + m.group(1) == GTEST_SPI_H_SEED: - # It's '#include '. This file is not - # #included by , so we need to process it. - ProcessFile(GTEST_SPI_H_SEED) - else: - # It's '#include ' where foo is not gtest-spi. - # We treat it as '#include ', as all other - # gtest headers are being fused into gtest.h and cannot be - # #included directly. - - # There is no need to #include more than once. - if not GTEST_H_SEED in processed_files: - processed_files.add(GTEST_H_SEED) - output_file.write('#include <%s>\n' % (GTEST_H_OUTPUT,)) - else: - m = INCLUDE_SRC_FILE_REGEX.match(line) - if m: - # It's '#include "src/foo"' - let's process it recursively. - ProcessFile(m.group(1)) - else: - output_file.write(line) - - ProcessFile(GTEST_ALL_CC_SEED) - - -def FuseGTestAllCc(gtest_root, output_dir): - """Scans folder gtest_root to generate gtest/gtest-all.cc in output_dir.""" - - output_file = file(os.path.join(output_dir, GTEST_ALL_CC_OUTPUT), 'w') - FuseGTestAllCcToFile(gtest_root, output_file) - output_file.close() - - -def FuseGTest(gtest_root, output_dir): - """Fuses gtest.h and gtest-all.cc.""" - - ValidateGTestRootDir(gtest_root) - ValidateOutputDir(output_dir) - - FuseGTestH(gtest_root, output_dir) - FuseGTestAllCc(gtest_root, output_dir) - - -def main(): - argc = len(sys.argv) - if argc == 2: - # fuse_gtest_files.py OUTPUT_DIR - FuseGTest(DEFAULT_GTEST_ROOT_DIR, sys.argv[1]) - elif argc == 3: - # fuse_gtest_files.py GTEST_ROOT_DIR OUTPUT_DIR - FuseGTest(sys.argv[1], sys.argv[2]) - else: - print __doc__ - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gen_gtest_pred_impl.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gen_gtest_pred_impl.py deleted file mode 100755 index 8307134a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gen_gtest_pred_impl.py +++ /dev/null @@ -1,733 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""gen_gtest_pred_impl.py v0.1 - -Generates the implementation of Google Test predicate assertions and -accompanying tests. - -Usage: - - gen_gtest_pred_impl.py MAX_ARITY - -where MAX_ARITY is a positive integer. - -The command generates the implementation of up-to MAX_ARITY-ary -predicate assertions, and writes it to file gtest_pred_impl.h in the -directory where the script is. It also generates the accompanying -unit test in file gtest_pred_impl_unittest.cc. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys -import time - -# Where this script is. -SCRIPT_DIR = os.path.dirname(sys.argv[0]) - -# Where to store the generated header. -HEADER = os.path.join(SCRIPT_DIR, '../include/gtest/gtest_pred_impl.h') - -# Where to store the generated unit test. -UNIT_TEST = os.path.join(SCRIPT_DIR, '../test/gtest_pred_impl_unittest.cc') - - -def HeaderPreamble(n): - """Returns the preamble for the header file. - - Args: - n: the maximum arity of the predicate macros to be generated. - """ - - # A map that defines the values used in the preamble template. - DEFS = { - 'today' : time.strftime('%m/%d/%Y'), - 'year' : time.strftime('%Y'), - 'command' : '%s %s' % (os.path.basename(sys.argv[0]), n), - 'n' : n - } - - return ( -"""// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on %(today)s by command -// '%(command)s'. DO NOT EDIT BY HAND! -// -// Implements a family of generic predicate assertion macros. - -#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ - -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -#error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ - -// This header implements a family of generic predicate assertion -// macros: -// -// ASSERT_PRED_FORMAT1(pred_format, v1) -// ASSERT_PRED_FORMAT2(pred_format, v1, v2) -// ... -// -// where pred_format is a function or functor that takes n (in the -// case of ASSERT_PRED_FORMATn) values and their source expression -// text, and returns a testing::AssertionResult. See the definition -// of ASSERT_EQ in gtest.h for an example. -// -// If you don't care about formatting, you can use the more -// restrictive version: -// -// ASSERT_PRED1(pred, v1) -// ASSERT_PRED2(pred, v1, v2) -// ... -// -// where pred is an n-ary function or functor that returns bool, -// and the values v1, v2, ..., must support the << operator for -// streaming to std::ostream. -// -// We also define the EXPECT_* variations. -// -// For now we only support predicates whose arity is at most %(n)s. -// Please email googletestframework@googlegroups.com if you need -// support for higher arities. - -// GTEST_ASSERT_ is the basic statement to which all of the assertions -// in this file reduce. Don't use this in your code. - -#define GTEST_ASSERT_(expression, on_failure) \\ - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\ - if (const ::testing::AssertionResult gtest_ar = (expression)) \\ - ; \\ - else \\ - on_failure(gtest_ar.failure_message()) -""" % DEFS) - - -def Arity(n): - """Returns the English name of the given arity.""" - - if n < 0: - return None - elif n <= 3: - return ['nullary', 'unary', 'binary', 'ternary'][n] - else: - return '%s-ary' % n - - -def Title(word): - """Returns the given word in title case. The difference between - this and string's title() method is that Title('4-ary') is '4-ary' - while '4-ary'.title() is '4-Ary'.""" - - return word[0].upper() + word[1:] - - -def OneTo(n): - """Returns the list [1, 2, 3, ..., n].""" - - return range(1, n + 1) - - -def Iter(n, format, sep=''): - """Given a positive integer n, a format string that contains 0 or - more '%s' format specs, and optionally a separator string, returns - the join of n strings, each formatted with the format string on an - iterator ranged from 1 to n. - - Example: - - Iter(3, 'v%s', sep=', ') returns 'v1, v2, v3'. - """ - - # How many '%s' specs are in format? - spec_count = len(format.split('%s')) - 1 - return sep.join([format % (spec_count * (i,)) for i in OneTo(n)]) - - -def ImplementationForArity(n): - """Returns the implementation of n-ary predicate assertions.""" - - # A map the defines the values used in the implementation template. - DEFS = { - 'n' : str(n), - 'vs' : Iter(n, 'v%s', sep=', '), - 'vts' : Iter(n, '#v%s', sep=', '), - 'arity' : Arity(n), - 'Arity' : Title(Arity(n)) - } - - impl = """ - -// Helper function for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use -// this in your code. -template -AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS - - impl += Iter(n, """, - const char* e%s""") - - impl += """, - Pred pred""" - - impl += Iter(n, """, - const T%s& v%s""") - - impl += """) { - if (pred(%(vs)s)) return AssertionSuccess(); - - Message msg; -""" % DEFS - - impl += ' msg << pred_text << "("' - - impl += Iter(n, """ - << e%s""", sep=' << ", "') - - impl += ' << ") evaluates to false, where"' - - impl += Iter(n, """ - << "\\n" << e%s << " evaluates to " << v%s""") - - impl += """; - return AssertionFailure(msg); -} - -// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT%(n)s. -// Don't use this in your code. -#define GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, on_failure)\\ - GTEST_ASSERT_(pred_format(%(vts)s, %(vs)s),\\ - on_failure) - -// Internal macro for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use -// this in your code. -#define GTEST_PRED%(n)s_(pred, %(vs)s, on_failure)\\ - GTEST_ASSERT_(::testing::AssertPred%(n)sHelper(#pred""" % DEFS - - impl += Iter(n, """, \\ - #v%s""") - - impl += """, \\ - pred""" - - impl += Iter(n, """, \\ - v%s""") - - impl += """), on_failure) - -// %(Arity)s predicate assertion macros. -#define EXPECT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\ - GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_NONFATAL_FAILURE_) -#define EXPECT_PRED%(n)s(pred, %(vs)s) \\ - GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_NONFATAL_FAILURE_) -#define ASSERT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\ - GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_FATAL_FAILURE_) -#define ASSERT_PRED%(n)s(pred, %(vs)s) \\ - GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_FATAL_FAILURE_) - -""" % DEFS - - return impl - - -def HeaderPostamble(): - """Returns the postamble for the header file.""" - - return """ - -#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -""" - - -def GenerateFile(path, content): - """Given a file path and a content string, overwrites it with the - given content.""" - - print 'Updating file %s . . .' % path - - f = file(path, 'w+') - print >>f, content, - f.close() - - print 'File %s has been updated.' % path - - -def GenerateHeader(n): - """Given the maximum arity n, updates the header file that implements - the predicate assertions.""" - - GenerateFile(HEADER, - HeaderPreamble(n) - + ''.join([ImplementationForArity(i) for i in OneTo(n)]) - + HeaderPostamble()) - - -def UnitTestPreamble(): - """Returns the preamble for the unit test file.""" - - # A map that defines the values used in the preamble template. - DEFS = { - 'today' : time.strftime('%m/%d/%Y'), - 'year' : time.strftime('%Y'), - 'command' : '%s %s' % (os.path.basename(sys.argv[0]), sys.argv[1]), - } - - return ( -"""// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on %(today)s by command -// '%(command)s'. DO NOT EDIT BY HAND! - -// Regression test for gtest_pred_impl.h -// -// This file is generated by a script and quite long. If you intend to -// learn how Google Test works by reading its unit tests, read -// gtest_unittest.cc instead. -// -// This is intended as a regression test for the Google Test predicate -// assertions. We compile it as part of the gtest_unittest target -// only to keep the implementation tidy and compact, as it is quite -// involved to set up the stage for testing Google Test using Google -// Test itself. -// -// Currently, gtest_unittest takes ~11 seconds to run in the testing -// daemon. In the future, if it grows too large and needs much more -// time to finish, we should consider separating this file into a -// stand-alone regression test. - -#include - -#include -#include - -// A user-defined data type. -struct Bool { - explicit Bool(int val) : value(val != 0) {} - - bool operator>(int n) const { return value > Bool(n).value; } - - Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); } - - bool operator==(const Bool& rhs) const { return value == rhs.value; } - - bool value; -}; - -// Enables Bool to be used in assertions. -std::ostream& operator<<(std::ostream& os, const Bool& x) { - return os << (x.value ? "true" : "false"); -} - -""" % DEFS) - - -def TestsForArity(n): - """Returns the tests for n-ary predicate assertions.""" - - # A map that defines the values used in the template for the tests. - DEFS = { - 'n' : n, - 'es' : Iter(n, 'e%s', sep=', '), - 'vs' : Iter(n, 'v%s', sep=', '), - 'vts' : Iter(n, '#v%s', sep=', '), - 'tvs' : Iter(n, 'T%s v%s', sep=', '), - 'int_vs' : Iter(n, 'int v%s', sep=', '), - 'Bool_vs' : Iter(n, 'Bool v%s', sep=', '), - 'types' : Iter(n, 'typename T%s', sep=', '), - 'v_sum' : Iter(n, 'v%s', sep=' + '), - 'arity' : Arity(n), - 'Arity' : Title(Arity(n)), - } - - tests = ( -"""// Sample functions/functors for testing %(arity)s predicate assertions. - -// A %(arity)s predicate function. -template <%(types)s> -bool PredFunction%(n)s(%(tvs)s) { - return %(v_sum)s > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction%(n)sInt(%(int_vs)s) { - return %(v_sum)s > 0; -} -bool PredFunction%(n)sBool(%(Bool_vs)s) { - return %(v_sum)s > 0; -} -""" % DEFS) - - tests += """ -// A %(arity)s predicate functor. -struct PredFunctor%(n)s { - template <%(types)s> - bool operator()(""" % DEFS - - tests += Iter(n, 'const T%s& v%s', sep=""", - """) - - tests += """) { - return %(v_sum)s > 0; - } -}; -""" % DEFS - - tests += """ -// A %(arity)s predicate-formatter function. -template <%(types)s> -testing::AssertionResult PredFormatFunction%(n)s(""" % DEFS - - tests += Iter(n, 'const char* e%s', sep=""", - """) - - tests += Iter(n, """, - const T%s& v%s""") - - tests += """) { - if (PredFunction%(n)s(%(vs)s)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << """ % DEFS - - tests += Iter(n, 'e%s', sep=' << " + " << ') - - tests += """ - << " is expected to be positive, but evaluates to " - << %(v_sum)s << "."; - return testing::AssertionFailure(msg); -} -""" % DEFS - - tests += """ -// A %(arity)s predicate-formatter functor. -struct PredFormatFunctor%(n)s { - template <%(types)s> - testing::AssertionResult operator()(""" % DEFS - - tests += Iter(n, 'const char* e%s', sep=""", - """) - - tests += Iter(n, """, - const T%s& v%s""") - - tests += """) const { - return PredFormatFunction%(n)s(%(es)s, %(vs)s); - } -}; -""" % DEFS - - tests += """ -// Tests for {EXPECT|ASSERT}_PRED_FORMAT%(n)s. - -class Predicate%(n)sTest : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false;""" % DEFS - - tests += """ - """ + Iter(n, 'n%s_ = ') + """0; - } -""" - - tests += """ - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once.""" - - tests += ''.join([""" - EXPECT_EQ(1, n%s_) << - "The predicate assertion didn't evaluate argument %s " - "exactly once.";""" % (i, i + 1) for i in OneTo(n)]) - - tests += """ - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; -""" % DEFS - - tests += Iter(n, """ - static int n%s_;""") - - tests += """ -}; - -bool Predicate%(n)sTest::expected_to_finish_; -bool Predicate%(n)sTest::finished_; -""" % DEFS - - tests += Iter(n, """int Predicate%%(n)sTest::n%s_; -""") % DEFS - - tests += """ -typedef Predicate%(n)sTest EXPECT_PRED_FORMAT%(n)sTest; -typedef Predicate%(n)sTest ASSERT_PRED_FORMAT%(n)sTest; -typedef Predicate%(n)sTest EXPECT_PRED%(n)sTest; -typedef Predicate%(n)sTest ASSERT_PRED%(n)sTest; -""" % DEFS - - def GenTest(use_format, use_assert, expect_failure, - use_functor, use_user_type): - """Returns the test for a predicate assertion macro. - - Args: - use_format: true iff the assertion is a *_PRED_FORMAT*. - use_assert: true iff the assertion is a ASSERT_*. - expect_failure: true iff the assertion is expected to fail. - use_functor: true iff the first argument of the assertion is - a functor (as opposed to a function) - use_user_type: true iff the predicate functor/function takes - argument(s) of a user-defined type. - - Example: - - GenTest(1, 0, 0, 1, 0) returns a test that tests the behavior - of a successful EXPECT_PRED_FORMATn() that takes a functor - whose arguments have built-in types.""" - - if use_assert: - assrt = 'ASSERT' # 'assert' is reserved, so we cannot use - # that identifier here. - else: - assrt = 'EXPECT' - - assertion = assrt + '_PRED' - - if use_format: - pred_format = 'PredFormat' - assertion += '_FORMAT' - else: - pred_format = 'Pred' - - assertion += '%(n)s' % DEFS - - if use_functor: - pred_format_type = 'functor' - pred_format += 'Functor%(n)s()' - else: - pred_format_type = 'function' - pred_format += 'Function%(n)s' - if not use_format: - if use_user_type: - pred_format += 'Bool' - else: - pred_format += 'Int' - - test_name = pred_format_type.title() - - if use_user_type: - arg_type = 'user-defined type (Bool)' - test_name += 'OnUserType' - if expect_failure: - arg = 'Bool(n%s_++)' - else: - arg = 'Bool(++n%s_)' - else: - arg_type = 'built-in type (int)' - test_name += 'OnBuiltInType' - if expect_failure: - arg = 'n%s_++' - else: - arg = '++n%s_' - - if expect_failure: - successful_or_failed = 'failed' - expected_or_not = 'expected.' - test_name += 'Failure' - else: - successful_or_failed = 'successful' - expected_or_not = 'UNEXPECTED!' - test_name += 'Success' - - # A map that defines the values used in the test template. - defs = DEFS.copy() - defs.update({ - 'assert' : assrt, - 'assertion' : assertion, - 'test_name' : test_name, - 'pf_type' : pred_format_type, - 'pf' : pred_format, - 'arg_type' : arg_type, - 'arg' : arg, - 'successful' : successful_or_failed, - 'expected' : expected_or_not, - }) - - test = """ -// Tests a %(successful)s %(assertion)s where the -// predicate-formatter is a %(pf_type)s on a %(arg_type)s. -TEST_F(%(assertion)sTest, %(test_name)s) {""" % defs - - indent = (len(assertion) + 3)*' ' - extra_indent = '' - - if expect_failure: - extra_indent = ' ' - if use_assert: - test += """ - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT""" - else: - test += """ - EXPECT_NONFATAL_FAILURE({ // NOLINT""" - - test += '\n' + extra_indent + """ %(assertion)s(%(pf)s""" % defs - - test = test % defs - test += Iter(n, ',\n' + indent + extra_indent + '%(arg)s' % defs) - test += ');\n' + extra_indent + ' finished_ = true;\n' - - if expect_failure: - test += ' }, "");\n' - - test += '}\n' - return test - - # Generates tests for all 2**6 = 64 combinations. - tests += ''.join([GenTest(use_format, use_assert, expect_failure, - use_functor, use_user_type) - for use_format in [0, 1] - for use_assert in [0, 1] - for expect_failure in [0, 1] - for use_functor in [0, 1] - for use_user_type in [0, 1] - ]) - - return tests - - -def UnitTestPostamble(): - """Returns the postamble for the tests.""" - - return '' - - -def GenerateUnitTest(n): - """Returns the tests for up-to n-ary predicate assertions.""" - - GenerateFile(UNIT_TEST, - UnitTestPreamble() - + ''.join([TestsForArity(i) for i in OneTo(n)]) - + UnitTestPostamble()) - - -def _Main(): - """The entry point of the script. Generates the header file and its - unit test.""" - - if len(sys.argv) != 2: - print __doc__ - print 'Author: ' + __author__ - sys.exit(1) - - n = int(sys.argv[1]) - GenerateHeader(n) - GenerateUnitTest(n) - - -if __name__ == '__main__': - _Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gtest-config.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gtest-config.in deleted file mode 100755 index b82d5a17..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/gtest-config.in +++ /dev/null @@ -1,274 +0,0 @@ -#!/bin/sh - -# These variables are automatically filled in by the configure script. -name="@PACKAGE_TARNAME@" -version="@PACKAGE_VERSION@" - -show_usage() -{ - echo "Usage: gtest-config [OPTIONS...]" -} - -show_help() -{ - show_usage - cat <<\EOF - -The `gtest-config' script provides access to the necessary compile and linking -flags to connect with Google C++ Testing Framework, both in a build prior to -installation, and on the system proper after installation. The installation -overrides may be issued in combination with any other queries, but will only -affect installation queries if called on a built but not installed gtest. The -installation queries may not be issued with any other types of queries, and -only one installation query may be made at a time. The version queries and -compiler flag queries may be combined as desired but not mixed. Different -version queries are always combined with logical "and" semantics, and only the -last of any particular query is used while all previous ones ignored. All -versions must be specified as a sequence of numbers separated by periods. -Compiler flag queries output the union of the sets of flags when combined. - - Examples: - gtest-config --min-version=1.0 || echo "Insufficient Google Test version." - - g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp - g++ $(gtest-config --ldflags --libs) -o foo foo.o - - # When using a built but not installed Google Test: - g++ $(../../my_gtest_build/scripts/gtest-config ...) ... - - # When using an installed Google Test, but with installation overrides: - export GTEST_PREFIX="/opt" - g++ $(gtest-config --libdir="/opt/lib64" ...) ... - - Help: - --usage brief usage information - --help display this help message - - Installation Overrides: - --prefix= overrides the installation prefix - --exec-prefix= overrides the executable installation prefix - --libdir= overrides the library installation prefix - --includedir= overrides the header file installation prefix - - Installation Queries: - --prefix installation prefix - --exec-prefix executable installation prefix - --libdir library installation directory - --includedir header file installation directory - --version the version of the Google Test installation - - Version Queries: - --min-version=VERSION return 0 if the version is at least VERSION - --exact-version=VERSION return 0 if the version is exactly VERSION - --max-version=VERSION return 0 if the version is at most VERSION - - Compilation Flag Queries: - --cppflags compile flags specific to the C-like preprocessors - --cxxflags compile flags appropriate for C++ programs - --ldflags linker flags - --libs libraries for linking - -EOF -} - -# This function bounds our version with a min and a max. It uses some clever -# POSIX-compliant variable expansion to portably do all the work in the shell -# and avoid any dependency on a particular "sed" or "awk" implementation. -# Notable is that it will only ever compare the first 3 components of versions. -# Further components will be cleanly stripped off. All versions must be -# unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and -# the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should -# investigate expanding this via autom4te from AS_VERSION_COMPARE rather than -# continuing to maintain our own shell version. -check_versions() -{ - major_version=${version%%.*} - minor_version="0" - point_version="0" - if test "${version#*.}" != "${version}"; then - minor_version=${version#*.} - minor_version=${minor_version%%.*} - fi - if test "${version#*.*.}" != "${version}"; then - point_version=${version#*.*.} - point_version=${point_version%%.*} - fi - - min_version="$1" - min_major_version=${min_version%%.*} - min_minor_version="0" - min_point_version="0" - if test "${min_version#*.}" != "${min_version}"; then - min_minor_version=${min_version#*.} - min_minor_version=${min_minor_version%%.*} - fi - if test "${min_version#*.*.}" != "${min_version}"; then - min_point_version=${min_version#*.*.} - min_point_version=${min_point_version%%.*} - fi - - max_version="$2" - max_major_version=${max_version%%.*} - max_minor_version="0" - max_point_version="0" - if test "${max_version#*.}" != "${max_version}"; then - max_minor_version=${max_version#*.} - max_minor_version=${max_minor_version%%.*} - fi - if test "${max_version#*.*.}" != "${max_version}"; then - max_point_version=${max_version#*.*.} - max_point_version=${max_point_version%%.*} - fi - - test $(($major_version)) -lt $(($min_major_version)) && exit 1 - if test $(($major_version)) -eq $(($min_major_version)); then - test $(($minor_version)) -lt $(($min_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($min_minor_version)); then - test $(($point_version)) -lt $(($min_point_version)) && exit 1 - fi - fi - - test $(($major_version)) -gt $(($max_major_version)) && exit 1 - if test $(($major_version)) -eq $(($max_major_version)); then - test $(($minor_version)) -gt $(($max_minor_version)) && exit 1 - if test $(($minor_version)) -eq $(($max_minor_version)); then - test $(($point_version)) -gt $(($max_point_version)) && exit 1 - fi - fi - - exit 0 -} - -# Show the usage line when no arguments are specified. -if test $# -eq 0; then - show_usage - exit 1 -fi - -while test $# -gt 0; do - case $1 in - --usage) show_usage; exit 0;; - --help) show_help; exit 0;; - - # Installation overrides - --prefix=*) GTEST_PREFIX=${1#--prefix=};; - --exec-prefix=*) GTEST_EXEC_PREFIX=${1#--exec-prefix=};; - --libdir=*) GTEST_LIBDIR=${1#--libdir=};; - --includedir=*) GTEST_INCLUDEDIR=${1#--includedir=};; - - # Installation queries - --prefix|--exec-prefix|--libdir|--includedir|--version) - if test -n "${do_query}"; then - show_usage - exit 1 - fi - do_query=${1#--} - ;; - - # Version checking - --min-version=*) - do_check_versions=yes - min_version=${1#--min-version=} - ;; - --max-version=*) - do_check_versions=yes - max_version=${1#--max-version=} - ;; - --exact-version=*) - do_check_versions=yes - exact_version=${1#--exact-version=} - ;; - - # Compiler flag output - --cppflags) echo_cppflags=yes;; - --cxxflags) echo_cxxflags=yes;; - --ldflags) echo_ldflags=yes;; - --libs) echo_libs=yes;; - - # Everything else is an error - *) show_usage; exit 1;; - esac - shift -done - -# These have defaults filled in by the configure script but can also be -# overridden by environment variables or command line parameters. -prefix="${GTEST_PREFIX:-@prefix@}" -exec_prefix="${GTEST_EXEC_PREFIX:-@exec_prefix@}" -libdir="${GTEST_LIBDIR:-@libdir@}" -includedir="${GTEST_INCLUDEDIR:-@includedir@}" - -# We try and detect if our binary is not located at its installed location. If -# it's not, we provide variables pointing to the source and build tree rather -# than to the install tree. This allows building against a just-built gtest -# rather than an installed gtest. -bindir="@bindir@" -this_relative_bindir=`dirname $0` -this_bindir=`cd ${this_relative_bindir}; pwd -P` -if test "${this_bindir}" = "${this_bindir%${bindir}}"; then - # The path to the script doesn't end in the bindir sequence from Autoconf, - # assume that we are in a build tree. - build_dir=`dirname ${this_bindir}` - src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P` - - # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we - # should work to remove it, and/or remove libtool altogether, replacing it - # with direct references to the library and a link path. - gtest_libs="${build_dir}/lib/libgtest.la" - gtest_ldflags="" - - # We provide hooks to include from either the source or build dir, where the - # build dir is always preferred. This will potentially allow us to write - # build rules for generated headers and have them automatically be preferred - # over provided versions. - gtest_cppflags="-I${build_dir}/include -I${src_dir}/include" - gtest_cxxflags="" -else - # We're using an installed gtest, although it may be staged under some - # prefix. Assume (as our own libraries do) that we can resolve the prefix, - # and are present in the dynamic link paths. - gtest_ldflags="-L${libdir}" - gtest_libs="-l${name}" - gtest_cppflags="-I${includedir}" - gtest_cxxflags="" -fi - -# Do an installation query if requested. -if test -n "$do_query"; then - case $do_query in - prefix) echo $prefix; exit 0;; - exec-prefix) echo $exec_prefix; exit 0;; - libdir) echo $libdir; exit 0;; - includedir) echo $includedir; exit 0;; - version) echo $version; exit 0;; - *) show_usage; exit 1;; - esac -fi - -# Do a version check if requested. -if test "$do_check_versions" = "yes"; then - # Make sure we didn't receive a bad combination of parameters. - test "$echo_cppflags" = "yes" && show_usage && exit 1 - test "$echo_cxxflags" = "yes" && show_usage && exit 1 - test "$echo_ldflags" = "yes" && show_usage && exit 1 - test "$echo_libs" = "yes" && show_usage && exit 1 - - if test "$exact_version" != ""; then - check_versions $exact_version $exact_version - # unreachable - else - check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999} - # unreachable - fi -fi - -# Do the output in the correct order so that these can be used in-line of -# a compiler invocation. -output="" -test "$echo_cppflags" = "yes" && output="$output $gtest_cppflags" -test "$echo_cxxflags" = "yes" && output="$output $gtest_cxxflags" -test "$echo_ldflags" = "yes" && output="$output $gtest_ldflags" -test "$echo_libs" = "yes" && output="$output $gtest_libs" -echo $output - -exit 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/test/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/test/Makefile deleted file mode 100644 index ffc0c90a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/test/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# A Makefile for fusing Google Test and building a sample test against it. -# -# SYNOPSIS: -# -# make [all] - makes everything. -# make TARGET - makes the given target. -# make check - makes everything and runs the built sample test. -# make clean - removes all files generated by make. - -# Points to the root of fused Google Test, relative to where this file is. -FUSED_GTEST_DIR = output - -# Paths to the fused gtest files. -FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h -FUSED_GTEST_ALL_CC = $(FUSED_GTEST_DIR)/gtest/gtest-all.cc - -# Where to find the sample test. -SAMPLE_DIR = ../../samples - -# Where to find gtest_main.cc. -GTEST_MAIN_CC = ../../src/gtest_main.cc - -# Flags passed to the preprocessor. -CPPFLAGS += -I$(FUSED_GTEST_DIR) - -# Flags passed to the C++ compiler. -CXXFLAGS += -g - -all : sample1_unittest - -check : all - ./sample1_unittest - -clean : - rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o - -$(FUSED_GTEST_H) : - ../fuse_gtest_files.py $(FUSED_GTEST_DIR) - -$(FUSED_GTEST_ALL_CC) : - ../fuse_gtest_files.py $(FUSED_GTEST_DIR) - -gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GTEST_DIR)/gtest/gtest-all.cc - -gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_MAIN_CC) - -sample1.o : $(SAMPLE_DIR)/sample1.cc $(SAMPLE_DIR)/sample1.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1.cc - -sample1_unittest.o : $(SAMPLE_DIR)/sample1_unittest.cc \ - $(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1_unittest.cc - -sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload.py deleted file mode 100755 index 6e6f9a14..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload.py +++ /dev/null @@ -1,1387 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tool for uploading diffs from a version control system to the codereview app. - -Usage summary: upload.py [options] [-- diff_options] - -Diff options are passed to the diff command of the underlying system. - -Supported version control systems: - Git - Mercurial - Subversion - -It is important for Git/Mercurial users to specify a tree/node/branch to diff -against by using the '--rev' option. -""" -# This code is derived from appcfg.py in the App Engine SDK (open source), -# and from ASPN recipe #146306. - -import cookielib -import getpass -import logging -import md5 -import mimetypes -import optparse -import os -import re -import socket -import subprocess -import sys -import urllib -import urllib2 -import urlparse - -try: - import readline -except ImportError: - pass - -# The logging verbosity: -# 0: Errors only. -# 1: Status messages. -# 2: Info logs. -# 3: Debug logs. -verbosity = 1 - -# Max size of patch or base file. -MAX_UPLOAD_SIZE = 900 * 1024 - - -def GetEmail(prompt): - """Prompts the user for their email address and returns it. - - The last used email address is saved to a file and offered up as a suggestion - to the user. If the user presses enter without typing in anything the last - used email address is used. If the user enters a new address, it is saved - for next time we prompt. - - """ - last_email_file_name = os.path.expanduser("~/.last_codereview_email_address") - last_email = "" - if os.path.exists(last_email_file_name): - try: - last_email_file = open(last_email_file_name, "r") - last_email = last_email_file.readline().strip("\n") - last_email_file.close() - prompt += " [%s]" % last_email - except IOError, e: - pass - email = raw_input(prompt + ": ").strip() - if email: - try: - last_email_file = open(last_email_file_name, "w") - last_email_file.write(email) - last_email_file.close() - except IOError, e: - pass - else: - email = last_email - return email - - -def StatusUpdate(msg): - """Print a status message to stdout. - - If 'verbosity' is greater than 0, print the message. - - Args: - msg: The string to print. - """ - if verbosity > 0: - print msg - - -def ErrorExit(msg): - """Print an error message to stderr and exit.""" - print >>sys.stderr, msg - sys.exit(1) - - -class ClientLoginError(urllib2.HTTPError): - """Raised to indicate there was an error authenticating with ClientLogin.""" - - def __init__(self, url, code, msg, headers, args): - urllib2.HTTPError.__init__(self, url, code, msg, headers, None) - self.args = args - self.reason = args["Error"] - - -class AbstractRpcServer(object): - """Provides a common interface for a simple RPC server.""" - - def __init__(self, host, auth_function, host_override=None, extra_headers={}, - save_cookies=False): - """Creates a new HttpRpcServer. - - Args: - host: The host to send requests to. - auth_function: A function that takes no arguments and returns an - (email, password) tuple when called. Will be called if authentication - is required. - host_override: The host header to send to the server (defaults to host). - extra_headers: A dict of extra headers to append to every request. - save_cookies: If True, save the authentication cookies to local disk. - If False, use an in-memory cookiejar instead. Subclasses must - implement this functionality. Defaults to False. - """ - self.host = host - self.host_override = host_override - self.auth_function = auth_function - self.authenticated = False - self.extra_headers = extra_headers - self.save_cookies = save_cookies - self.opener = self._GetOpener() - if self.host_override: - logging.info("Server: %s; Host: %s", self.host, self.host_override) - else: - logging.info("Server: %s", self.host) - - def _GetOpener(self): - """Returns an OpenerDirector for making HTTP requests. - - Returns: - A urllib2.OpenerDirector object. - """ - raise NotImplementedError() - - def _CreateRequest(self, url, data=None): - """Creates a new urllib request.""" - logging.debug("Creating request for: '%s' with payload:\n%s", url, data) - req = urllib2.Request(url, data=data) - if self.host_override: - req.add_header("Host", self.host_override) - for key, value in self.extra_headers.iteritems(): - req.add_header(key, value) - return req - - def _GetAuthToken(self, email, password): - """Uses ClientLogin to authenticate the user, returning an auth token. - - Args: - email: The user's email address - password: The user's password - - Raises: - ClientLoginError: If there was an error authenticating with ClientLogin. - HTTPError: If there was some other form of HTTP error. - - Returns: - The authentication token returned by ClientLogin. - """ - account_type = "GOOGLE" - if self.host.endswith(".google.com"): - # Needed for use inside Google. - account_type = "HOSTED" - req = self._CreateRequest( - url="https://www.google.com/accounts/ClientLogin", - data=urllib.urlencode({ - "Email": email, - "Passwd": password, - "service": "ah", - "source": "rietveld-codereview-upload", - "accountType": account_type, - }), - ) - try: - response = self.opener.open(req) - response_body = response.read() - response_dict = dict(x.split("=") - for x in response_body.split("\n") if x) - return response_dict["Auth"] - except urllib2.HTTPError, e: - if e.code == 403: - body = e.read() - response_dict = dict(x.split("=", 1) for x in body.split("\n") if x) - raise ClientLoginError(req.get_full_url(), e.code, e.msg, - e.headers, response_dict) - else: - raise - - def _GetAuthCookie(self, auth_token): - """Fetches authentication cookies for an authentication token. - - Args: - auth_token: The authentication token returned by ClientLogin. - - Raises: - HTTPError: If there was an error fetching the authentication cookies. - """ - # This is a dummy value to allow us to identify when we're successful. - continue_location = "http://localhost/" - args = {"continue": continue_location, "auth": auth_token} - req = self._CreateRequest("http://%s/_ah/login?%s" % - (self.host, urllib.urlencode(args))) - try: - response = self.opener.open(req) - except urllib2.HTTPError, e: - response = e - if (response.code != 302 or - response.info()["location"] != continue_location): - raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg, - response.headers, response.fp) - self.authenticated = True - - def _Authenticate(self): - """Authenticates the user. - - The authentication process works as follows: - 1) We get a username and password from the user - 2) We use ClientLogin to obtain an AUTH token for the user - (see http://code.google.com/apis/accounts/AuthForInstalledApps.html). - 3) We pass the auth token to /_ah/login on the server to obtain an - authentication cookie. If login was successful, it tries to redirect - us to the URL we provided. - - If we attempt to access the upload API without first obtaining an - authentication cookie, it returns a 401 response and directs us to - authenticate ourselves with ClientLogin. - """ - for i in range(3): - credentials = self.auth_function() - try: - auth_token = self._GetAuthToken(credentials[0], credentials[1]) - except ClientLoginError, e: - if e.reason == "BadAuthentication": - print >>sys.stderr, "Invalid username or password." - continue - if e.reason == "CaptchaRequired": - print >>sys.stderr, ( - "Please go to\n" - "https://www.google.com/accounts/DisplayUnlockCaptcha\n" - "and verify you are a human. Then try again.") - break - if e.reason == "NotVerified": - print >>sys.stderr, "Account not verified." - break - if e.reason == "TermsNotAgreed": - print >>sys.stderr, "User has not agreed to TOS." - break - if e.reason == "AccountDeleted": - print >>sys.stderr, "The user account has been deleted." - break - if e.reason == "AccountDisabled": - print >>sys.stderr, "The user account has been disabled." - break - if e.reason == "ServiceDisabled": - print >>sys.stderr, ("The user's access to the service has been " - "disabled.") - break - if e.reason == "ServiceUnavailable": - print >>sys.stderr, "The service is not available; try again later." - break - raise - self._GetAuthCookie(auth_token) - return - - def Send(self, request_path, payload=None, - content_type="application/octet-stream", - timeout=None, - **kwargs): - """Sends an RPC and returns the response. - - Args: - request_path: The path to send the request to, eg /api/appversion/create. - payload: The body of the request, or None to send an empty request. - content_type: The Content-Type header to use. - timeout: timeout in seconds; default None i.e. no timeout. - (Note: for large requests on OS X, the timeout doesn't work right.) - kwargs: Any keyword arguments are converted into query string parameters. - - Returns: - The response body, as a string. - """ - # TODO: Don't require authentication. Let the server say - # whether it is necessary. - if not self.authenticated: - self._Authenticate() - - old_timeout = socket.getdefaulttimeout() - socket.setdefaulttimeout(timeout) - try: - tries = 0 - while True: - tries += 1 - args = dict(kwargs) - url = "http://%s%s" % (self.host, request_path) - if args: - url += "?" + urllib.urlencode(args) - req = self._CreateRequest(url=url, data=payload) - req.add_header("Content-Type", content_type) - try: - f = self.opener.open(req) - response = f.read() - f.close() - return response - except urllib2.HTTPError, e: - if tries > 3: - raise - elif e.code == 401: - self._Authenticate() -## elif e.code >= 500 and e.code < 600: -## # Server Error - try again. -## continue - else: - raise - finally: - socket.setdefaulttimeout(old_timeout) - - -class HttpRpcServer(AbstractRpcServer): - """Provides a simplified RPC-style interface for HTTP requests.""" - - def _Authenticate(self): - """Save the cookie jar after authentication.""" - super(HttpRpcServer, self)._Authenticate() - if self.save_cookies: - StatusUpdate("Saving authentication cookies to %s" % self.cookie_file) - self.cookie_jar.save() - - def _GetOpener(self): - """Returns an OpenerDirector that supports cookies and ignores redirects. - - Returns: - A urllib2.OpenerDirector object. - """ - opener = urllib2.OpenerDirector() - opener.add_handler(urllib2.ProxyHandler()) - opener.add_handler(urllib2.UnknownHandler()) - opener.add_handler(urllib2.HTTPHandler()) - opener.add_handler(urllib2.HTTPDefaultErrorHandler()) - opener.add_handler(urllib2.HTTPSHandler()) - opener.add_handler(urllib2.HTTPErrorProcessor()) - if self.save_cookies: - self.cookie_file = os.path.expanduser("~/.codereview_upload_cookies") - self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file) - if os.path.exists(self.cookie_file): - try: - self.cookie_jar.load() - self.authenticated = True - StatusUpdate("Loaded authentication cookies from %s" % - self.cookie_file) - except (cookielib.LoadError, IOError): - # Failed to load cookies - just ignore them. - pass - else: - # Create an empty cookie file with mode 600 - fd = os.open(self.cookie_file, os.O_CREAT, 0600) - os.close(fd) - # Always chmod the cookie file - os.chmod(self.cookie_file, 0600) - else: - # Don't save cookies across runs of update.py. - self.cookie_jar = cookielib.CookieJar() - opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar)) - return opener - - -parser = optparse.OptionParser(usage="%prog [options] [-- diff_options]") -parser.add_option("-y", "--assume_yes", action="store_true", - dest="assume_yes", default=False, - help="Assume that the answer to yes/no questions is 'yes'.") -# Logging -group = parser.add_option_group("Logging options") -group.add_option("-q", "--quiet", action="store_const", const=0, - dest="verbose", help="Print errors only.") -group.add_option("-v", "--verbose", action="store_const", const=2, - dest="verbose", default=1, - help="Print info level logs (default).") -group.add_option("--noisy", action="store_const", const=3, - dest="verbose", help="Print all logs.") -# Review server -group = parser.add_option_group("Review server options") -group.add_option("-s", "--server", action="store", dest="server", - default="codereview.appspot.com", - metavar="SERVER", - help=("The server to upload to. The format is host[:port]. " - "Defaults to 'codereview.appspot.com'.")) -group.add_option("-e", "--email", action="store", dest="email", - metavar="EMAIL", default=None, - help="The username to use. Will prompt if omitted.") -group.add_option("-H", "--host", action="store", dest="host", - metavar="HOST", default=None, - help="Overrides the Host header sent with all RPCs.") -group.add_option("--no_cookies", action="store_false", - dest="save_cookies", default=True, - help="Do not save authentication cookies to local disk.") -# Issue -group = parser.add_option_group("Issue options") -group.add_option("-d", "--description", action="store", dest="description", - metavar="DESCRIPTION", default=None, - help="Optional description when creating an issue.") -group.add_option("-f", "--description_file", action="store", - dest="description_file", metavar="DESCRIPTION_FILE", - default=None, - help="Optional path of a file that contains " - "the description when creating an issue.") -group.add_option("-r", "--reviewers", action="store", dest="reviewers", - metavar="REVIEWERS", default=None, - help="Add reviewers (comma separated email addresses).") -group.add_option("--cc", action="store", dest="cc", - metavar="CC", default=None, - help="Add CC (comma separated email addresses).") -# Upload options -group = parser.add_option_group("Patch options") -group.add_option("-m", "--message", action="store", dest="message", - metavar="MESSAGE", default=None, - help="A message to identify the patch. " - "Will prompt if omitted.") -group.add_option("-i", "--issue", type="int", action="store", - metavar="ISSUE", default=None, - help="Issue number to which to add. Defaults to new issue.") -group.add_option("--download_base", action="store_true", - dest="download_base", default=False, - help="Base files will be downloaded by the server " - "(side-by-side diffs may not work on files with CRs).") -group.add_option("--rev", action="store", dest="revision", - metavar="REV", default=None, - help="Branch/tree/revision to diff against (used by DVCS).") -group.add_option("--send_mail", action="store_true", - dest="send_mail", default=False, - help="Send notification email to reviewers.") - - -def GetRpcServer(options): - """Returns an instance of an AbstractRpcServer. - - Returns: - A new AbstractRpcServer, on which RPC calls can be made. - """ - - rpc_server_class = HttpRpcServer - - def GetUserCredentials(): - """Prompts the user for a username and password.""" - email = options.email - if email is None: - email = GetEmail("Email (login for uploading to %s)" % options.server) - password = getpass.getpass("Password for %s: " % email) - return (email, password) - - # If this is the dev_appserver, use fake authentication. - host = (options.host or options.server).lower() - if host == "localhost" or host.startswith("localhost:"): - email = options.email - if email is None: - email = "test@example.com" - logging.info("Using debug user %s. Override with --email" % email) - server = rpc_server_class( - options.server, - lambda: (email, "password"), - host_override=options.host, - extra_headers={"Cookie": - 'dev_appserver_login="%s:False"' % email}, - save_cookies=options.save_cookies) - # Don't try to talk to ClientLogin. - server.authenticated = True - return server - - return rpc_server_class(options.server, GetUserCredentials, - host_override=options.host, - save_cookies=options.save_cookies) - - -def EncodeMultipartFormData(fields, files): - """Encode form fields for multipart/form-data. - - Args: - fields: A sequence of (name, value) elements for regular form fields. - files: A sequence of (name, filename, value) elements for data to be - uploaded as files. - Returns: - (content_type, body) ready for httplib.HTTP instance. - - Source: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 - """ - BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-' - CRLF = '\r\n' - lines = [] - for (key, value) in fields: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"' % key) - lines.append('') - lines.append(value) - for (key, filename, value) in files: - lines.append('--' + BOUNDARY) - lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % - (key, filename)) - lines.append('Content-Type: %s' % GetContentType(filename)) - lines.append('') - lines.append(value) - lines.append('--' + BOUNDARY + '--') - lines.append('') - body = CRLF.join(lines) - content_type = 'multipart/form-data; boundary=%s' % BOUNDARY - return content_type, body - - -def GetContentType(filename): - """Helper to guess the content-type from the filename.""" - return mimetypes.guess_type(filename)[0] or 'application/octet-stream' - - -# Use a shell for subcommands on Windows to get a PATH search. -use_shell = sys.platform.startswith("win") - -def RunShellWithReturnCode(command, print_output=False, - universal_newlines=True): - """Executes a command and returns the output from stdout and the return code. - - Args: - command: Command to execute. - print_output: If True, the output is printed to stdout. - If False, both stdout and stderr are ignored. - universal_newlines: Use universal_newlines flag (default: True). - - Returns: - Tuple (output, return code) - """ - logging.info("Running %s", command) - p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - shell=use_shell, universal_newlines=universal_newlines) - if print_output: - output_array = [] - while True: - line = p.stdout.readline() - if not line: - break - print line.strip("\n") - output_array.append(line) - output = "".join(output_array) - else: - output = p.stdout.read() - p.wait() - errout = p.stderr.read() - if print_output and errout: - print >>sys.stderr, errout - p.stdout.close() - p.stderr.close() - return output, p.returncode - - -def RunShell(command, silent_ok=False, universal_newlines=True, - print_output=False): - data, retcode = RunShellWithReturnCode(command, print_output, - universal_newlines) - if retcode: - ErrorExit("Got error status from %s:\n%s" % (command, data)) - if not silent_ok and not data: - ErrorExit("No output from %s" % command) - return data - - -class VersionControlSystem(object): - """Abstract base class providing an interface to the VCS.""" - - def __init__(self, options): - """Constructor. - - Args: - options: Command line options. - """ - self.options = options - - def GenerateDiff(self, args): - """Return the current diff as a string. - - Args: - args: Extra arguments to pass to the diff command. - """ - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - def CheckForUnknownFiles(self): - """Show an "are you sure?" prompt if there are unknown files.""" - unknown_files = self.GetUnknownFiles() - if unknown_files: - print "The following files are not added to version control:" - for line in unknown_files: - print line - prompt = "Are you sure to continue?(y/N) " - answer = raw_input(prompt).strip() - if answer != "y": - ErrorExit("User aborted") - - def GetBaseFile(self, filename): - """Get the content of the upstream version of a file. - - Returns: - A tuple (base_content, new_content, is_binary, status) - base_content: The contents of the base file. - new_content: For text files, this is empty. For binary files, this is - the contents of the new file, since the diff output won't contain - information to reconstruct the current file. - is_binary: True iff the file is binary. - status: The status of the file. - """ - - raise NotImplementedError( - "abstract method -- subclass %s must override" % self.__class__) - - - def GetBaseFiles(self, diff): - """Helper that calls GetBase file for each file in the patch. - - Returns: - A dictionary that maps from filename to GetBaseFile's tuple. Filenames - are retrieved based on lines that start with "Index:" or - "Property changes on:". - """ - files = {} - for line in diff.splitlines(True): - if line.startswith('Index:') or line.startswith('Property changes on:'): - unused, filename = line.split(':', 1) - # On Windows if a file has property changes its filename uses '\' - # instead of '/'. - filename = filename.strip().replace('\\', '/') - files[filename] = self.GetBaseFile(filename) - return files - - - def UploadBaseFiles(self, issue, rpc_server, patch_list, patchset, options, - files): - """Uploads the base files (and if necessary, the current ones as well).""" - - def UploadFile(filename, file_id, content, is_binary, status, is_base): - """Uploads a file to the server.""" - file_too_large = False - if is_base: - type = "base" - else: - type = "current" - if len(content) > MAX_UPLOAD_SIZE: - print ("Not uploading the %s file for %s because it's too large." % - (type, filename)) - file_too_large = True - content = "" - checksum = md5.new(content).hexdigest() - if options.verbose > 0 and not file_too_large: - print "Uploading %s file for %s" % (type, filename) - url = "/%d/upload_content/%d/%d" % (int(issue), int(patchset), file_id) - form_fields = [("filename", filename), - ("status", status), - ("checksum", checksum), - ("is_binary", str(is_binary)), - ("is_current", str(not is_base)), - ] - if file_too_large: - form_fields.append(("file_too_large", "1")) - if options.email: - form_fields.append(("user", options.email)) - ctype, body = EncodeMultipartFormData(form_fields, - [("data", filename, content)]) - response_body = rpc_server.Send(url, body, - content_type=ctype) - if not response_body.startswith("OK"): - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - - patches = dict() - [patches.setdefault(v, k) for k, v in patch_list] - for filename in patches.keys(): - base_content, new_content, is_binary, status = files[filename] - file_id_str = patches.get(filename) - if file_id_str.find("nobase") != -1: - base_content = None - file_id_str = file_id_str[file_id_str.rfind("_") + 1:] - file_id = int(file_id_str) - if base_content != None: - UploadFile(filename, file_id, base_content, is_binary, status, True) - if new_content != None: - UploadFile(filename, file_id, new_content, is_binary, status, False) - - def IsImage(self, filename): - """Returns true if the filename has an image extension.""" - mimetype = mimetypes.guess_type(filename)[0] - if not mimetype: - return False - return mimetype.startswith("image/") - - -class SubversionVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Subversion.""" - - def __init__(self, options): - super(SubversionVCS, self).__init__(options) - if self.options.revision: - match = re.match(r"(\d+)(:(\d+))?", self.options.revision) - if not match: - ErrorExit("Invalid Subversion revision %s." % self.options.revision) - self.rev_start = match.group(1) - self.rev_end = match.group(3) - else: - self.rev_start = self.rev_end = None - # Cache output from "svn list -r REVNO dirname". - # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev). - self.svnls_cache = {} - # SVN base URL is required to fetch files deleted in an older revision. - # Result is cached to not guess it over and over again in GetBaseFile(). - required = self.options.download_base or self.options.revision is not None - self.svn_base = self._GuessBase(required) - - def GuessBase(self, required): - """Wrapper for _GuessBase.""" - return self.svn_base - - def _GuessBase(self, required): - """Returns the SVN base URL. - - Args: - required: If true, exits if the url can't be guessed, otherwise None is - returned. - """ - info = RunShell(["svn", "info"]) - for line in info.splitlines(): - words = line.split() - if len(words) == 2 and words[0] == "URL:": - url = words[1] - scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) - username, netloc = urllib.splituser(netloc) - if username: - logging.info("Removed username from base URL") - if netloc.endswith("svn.python.org"): - if netloc == "svn.python.org": - if path.startswith("/projects/"): - path = path[9:] - elif netloc != "pythondev@svn.python.org": - ErrorExit("Unrecognized Python URL: %s" % url) - base = "http://svn.python.org/view/*checkout*%s/" % path - logging.info("Guessed Python base = %s", base) - elif netloc.endswith("svn.collab.net"): - if path.startswith("/repos/"): - path = path[6:] - base = "http://svn.collab.net/viewvc/*checkout*%s/" % path - logging.info("Guessed CollabNet base = %s", base) - elif netloc.endswith(".googlecode.com"): - path = path + "/" - base = urlparse.urlunparse(("http", netloc, path, params, - query, fragment)) - logging.info("Guessed Google Code base = %s", base) - else: - path = path + "/" - base = urlparse.urlunparse((scheme, netloc, path, params, - query, fragment)) - logging.info("Guessed base = %s", base) - return base - if required: - ErrorExit("Can't find URL in output from svn info") - return None - - def GenerateDiff(self, args): - cmd = ["svn", "diff"] - if self.options.revision: - cmd += ["-r", self.options.revision] - cmd.extend(args) - data = RunShell(cmd) - count = 0 - for line in data.splitlines(): - if line.startswith("Index:") or line.startswith("Property changes on:"): - count += 1 - logging.info(line) - if not count: - ErrorExit("No valid patches found in output from svn diff") - return data - - def _CollapseKeywords(self, content, keyword_str): - """Collapses SVN keywords.""" - # svn cat translates keywords but svn diff doesn't. As a result of this - # behavior patching.PatchChunks() fails with a chunk mismatch error. - # This part was originally written by the Review Board development team - # who had the same problem (http://reviews.review-board.org/r/276/). - # Mapping of keywords to known aliases - svn_keywords = { - # Standard keywords - 'Date': ['Date', 'LastChangedDate'], - 'Revision': ['Revision', 'LastChangedRevision', 'Rev'], - 'Author': ['Author', 'LastChangedBy'], - 'HeadURL': ['HeadURL', 'URL'], - 'Id': ['Id'], - - # Aliases - 'LastChangedDate': ['LastChangedDate', 'Date'], - 'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'], - 'LastChangedBy': ['LastChangedBy', 'Author'], - 'URL': ['URL', 'HeadURL'], - } - - def repl(m): - if m.group(2): - return "$%s::%s$" % (m.group(1), " " * len(m.group(3))) - return "$%s$" % m.group(1) - keywords = [keyword - for name in keyword_str.split(" ") - for keyword in svn_keywords.get(name, [])] - return re.sub(r"\$(%s):(:?)([^\$]+)\$" % '|'.join(keywords), repl, content) - - def GetUnknownFiles(self): - status = RunShell(["svn", "status", "--ignore-externals"], silent_ok=True) - unknown_files = [] - for line in status.split("\n"): - if line and line[0] == "?": - unknown_files.append(line) - return unknown_files - - def ReadFile(self, filename): - """Returns the contents of a file.""" - file = open(filename, 'rb') - result = "" - try: - result = file.read() - finally: - file.close() - return result - - def GetStatus(self, filename): - """Returns the status of a file.""" - if not self.options.revision: - status = RunShell(["svn", "status", "--ignore-externals", filename]) - if not status: - ErrorExit("svn status returned no output for %s" % filename) - status_lines = status.splitlines() - # If file is in a cl, the output will begin with - # "\n--- Changelist 'cl_name':\n". See - # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt - if (len(status_lines) == 3 and - not status_lines[0] and - status_lines[1].startswith("--- Changelist")): - status = status_lines[2] - else: - status = status_lines[0] - # If we have a revision to diff against we need to run "svn list" - # for the old and the new revision and compare the results to get - # the correct status for a file. - else: - dirname, relfilename = os.path.split(filename) - if dirname not in self.svnls_cache: - cmd = ["svn", "list", "-r", self.rev_start, dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to get status for %s." % filename) - old_files = out.splitlines() - args = ["svn", "list"] - if self.rev_end: - args += ["-r", self.rev_end] - cmd = args + [dirname or "."] - out, returncode = RunShellWithReturnCode(cmd) - if returncode: - ErrorExit("Failed to run command %s" % cmd) - self.svnls_cache[dirname] = (old_files, out.splitlines()) - old_files, new_files = self.svnls_cache[dirname] - if relfilename in old_files and relfilename not in new_files: - status = "D " - elif relfilename in old_files and relfilename in new_files: - status = "M " - else: - status = "A " - return status - - def GetBaseFile(self, filename): - status = self.GetStatus(filename) - base_content = None - new_content = None - - # If a file is copied its status will be "A +", which signifies - # "addition-with-history". See "svn st" for more information. We need to - # upload the original file or else diff parsing will fail if the file was - # edited. - if status[0] == "A" and status[3] != "+": - # We'll need to upload the new content if we're adding a binary file - # since diff's output won't contain it. - mimetype = RunShell(["svn", "propget", "svn:mime-type", filename], - silent_ok=True) - base_content = "" - is_binary = mimetype and not mimetype.startswith("text/") - if is_binary and self.IsImage(filename): - new_content = self.ReadFile(filename) - elif (status[0] in ("M", "D", "R") or - (status[0] == "A" and status[3] == "+") or # Copied file. - (status[0] == " " and status[1] == "M")): # Property change. - args = [] - if self.options.revision: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - # Don't change filename, it's needed later. - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:mime-type", url] - mimetype, returncode = RunShellWithReturnCode(cmd) - if returncode: - # File does not exist in the requested revision. - # Reset mimetype, it contains an error message. - mimetype = "" - get_base = False - is_binary = mimetype and not mimetype.startswith("text/") - if status[0] == " ": - # Empty base content just to force an upload. - base_content = "" - elif is_binary: - if self.IsImage(filename): - get_base = True - if status[0] == "M": - if not self.rev_end: - new_content = self.ReadFile(filename) - else: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_end) - new_content = RunShell(["svn", "cat", url], - universal_newlines=True, silent_ok=True) - else: - base_content = "" - else: - get_base = True - - if get_base: - if is_binary: - universal_newlines = False - else: - universal_newlines = True - if self.rev_start: - # "svn cat -r REV delete_file.txt" doesn't work. cat requires - # the full URL with "@REV" appended instead of using "-r" option. - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - base_content = RunShell(["svn", "cat", url], - universal_newlines=universal_newlines, - silent_ok=True) - else: - base_content = RunShell(["svn", "cat", filename], - universal_newlines=universal_newlines, - silent_ok=True) - if not is_binary: - args = [] - if self.rev_start: - url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) - else: - url = filename - args += ["-r", "BASE"] - cmd = ["svn"] + args + ["propget", "svn:keywords", url] - keywords, returncode = RunShellWithReturnCode(cmd) - if keywords and not returncode: - base_content = self._CollapseKeywords(base_content, keywords) - else: - StatusUpdate("svn status returned unexpected output: %s" % status) - sys.exit(1) - return base_content, new_content, is_binary, status[0:5] - - -class GitVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Git.""" - - def __init__(self, options): - super(GitVCS, self).__init__(options) - # Map of filename -> hash of base file. - self.base_hashes = {} - - def GenerateDiff(self, extra_args): - # This is more complicated than svn's GenerateDiff because we must convert - # the diff output to include an svn-style "Index:" line as well as record - # the hashes of the base files, so we can upload them along with our diff. - if self.options.revision: - extra_args = [self.options.revision] + extra_args - gitdiff = RunShell(["git", "diff", "--full-index"] + extra_args) - svndiff = [] - filecount = 0 - filename = None - for line in gitdiff.splitlines(): - match = re.match(r"diff --git a/(.*) b/.*$", line) - if match: - filecount += 1 - filename = match.group(1) - svndiff.append("Index: %s\n" % filename) - else: - # The "index" line in a git diff looks like this (long hashes elided): - # index 82c0d44..b2cee3f 100755 - # We want to save the left hash, as that identifies the base file. - match = re.match(r"index (\w+)\.\.", line) - if match: - self.base_hashes[filename] = match.group(1) - svndiff.append(line + "\n") - if not filecount: - ErrorExit("No valid patches found in output from git diff") - return "".join(svndiff) - - def GetUnknownFiles(self): - status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], - silent_ok=True) - return status.splitlines() - - def GetBaseFile(self, filename): - hash = self.base_hashes[filename] - base_content = None - new_content = None - is_binary = False - if hash == "0" * 40: # All-zero hash indicates no base file. - status = "A" - base_content = "" - else: - status = "M" - base_content, returncode = RunShellWithReturnCode(["git", "show", hash]) - if returncode: - ErrorExit("Got error status from 'git show %s'" % hash) - return (base_content, new_content, is_binary, status) - - -class MercurialVCS(VersionControlSystem): - """Implementation of the VersionControlSystem interface for Mercurial.""" - - def __init__(self, options, repo_dir): - super(MercurialVCS, self).__init__(options) - # Absolute path to repository (we can be in a subdir) - self.repo_dir = os.path.normpath(repo_dir) - # Compute the subdir - cwd = os.path.normpath(os.getcwd()) - assert cwd.startswith(self.repo_dir) - self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/") - if self.options.revision: - self.base_rev = self.options.revision - else: - self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip() - - def _GetRelPath(self, filename): - """Get relative path of a file according to the current directory, - given its logical path in the repo.""" - assert filename.startswith(self.subdir), filename - return filename[len(self.subdir):].lstrip(r"\/") - - def GenerateDiff(self, extra_args): - # If no file specified, restrict to the current subdir - extra_args = extra_args or ["."] - cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args - data = RunShell(cmd, silent_ok=True) - svndiff = [] - filecount = 0 - for line in data.splitlines(): - m = re.match("diff --git a/(\S+) b/(\S+)", line) - if m: - # Modify line to make it look like as it comes from svn diff. - # With this modification no changes on the server side are required - # to make upload.py work with Mercurial repos. - # NOTE: for proper handling of moved/copied files, we have to use - # the second filename. - filename = m.group(2) - svndiff.append("Index: %s" % filename) - svndiff.append("=" * 67) - filecount += 1 - logging.info(line) - else: - svndiff.append(line) - if not filecount: - ErrorExit("No valid patches found in output from hg diff") - return "\n".join(svndiff) + "\n" - - def GetUnknownFiles(self): - """Return a list of files unknown to the VCS.""" - args = [] - status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."], - silent_ok=True) - unknown_files = [] - for line in status.splitlines(): - st, fn = line.split(" ", 1) - if st == "?": - unknown_files.append(fn) - return unknown_files - - def GetBaseFile(self, filename): - # "hg status" and "hg cat" both take a path relative to the current subdir - # rather than to the repo root, but "hg diff" has given us the full path - # to the repo root. - base_content = "" - new_content = None - is_binary = False - oldrelpath = relpath = self._GetRelPath(filename) - # "hg status -C" returns two lines for moved/copied files, one otherwise - out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath]) - out = out.splitlines() - # HACK: strip error message about missing file/directory if it isn't in - # the working copy - if out[0].startswith('%s: ' % relpath): - out = out[1:] - if len(out) > 1: - # Moved/copied => considered as modified, use old filename to - # retrieve base contents - oldrelpath = out[1].strip() - status = "M" - else: - status, _ = out[0].split(' ', 1) - if status != "A": - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True) - is_binary = "\0" in base_content # Mercurial's heuristic - if status != "R": - new_content = open(relpath, "rb").read() - is_binary = is_binary or "\0" in new_content - if is_binary and base_content: - # Fetch again without converting newlines - base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath], - silent_ok=True, universal_newlines=False) - if not is_binary or not self.IsImage(relpath): - new_content = None - return base_content, new_content, is_binary, status - - -# NOTE: The SplitPatch function is duplicated in engine.py, keep them in sync. -def SplitPatch(data): - """Splits a patch into separate pieces for each file. - - Args: - data: A string containing the output of svn diff. - - Returns: - A list of 2-tuple (filename, text) where text is the svn diff output - pertaining to filename. - """ - patches = [] - filename = None - diff = [] - for line in data.splitlines(True): - new_filename = None - if line.startswith('Index:'): - unused, new_filename = line.split(':', 1) - new_filename = new_filename.strip() - elif line.startswith('Property changes on:'): - unused, temp_filename = line.split(':', 1) - # When a file is modified, paths use '/' between directories, however - # when a property is modified '\' is used on Windows. Make them the same - # otherwise the file shows up twice. - temp_filename = temp_filename.strip().replace('\\', '/') - if temp_filename != filename: - # File has property changes but no modifications, create a new diff. - new_filename = temp_filename - if new_filename: - if filename and diff: - patches.append((filename, ''.join(diff))) - filename = new_filename - diff = [line] - continue - if diff is not None: - diff.append(line) - if filename and diff: - patches.append((filename, ''.join(diff))) - return patches - - -def UploadSeparatePatches(issue, rpc_server, patchset, data, options): - """Uploads a separate patch for each file in the diff output. - - Returns a list of [patch_key, filename] for each file. - """ - patches = SplitPatch(data) - rv = [] - for patch in patches: - if len(patch[1]) > MAX_UPLOAD_SIZE: - print ("Not uploading the patch for " + patch[0] + - " because the file is too large.") - continue - form_fields = [("filename", patch[0])] - if not options.download_base: - form_fields.append(("content_upload", "1")) - files = [("data", "data.diff", patch[1])] - ctype, body = EncodeMultipartFormData(form_fields, files) - url = "/%d/upload_patch/%d" % (int(issue), int(patchset)) - print "Uploading patch for " + patch[0] - response_body = rpc_server.Send(url, body, content_type=ctype) - lines = response_body.splitlines() - if not lines or lines[0] != "OK": - StatusUpdate(" --> %s" % response_body) - sys.exit(1) - rv.append([lines[1], patch[0]]) - return rv - - -def GuessVCS(options): - """Helper to guess the version control system. - - This examines the current directory, guesses which VersionControlSystem - we're using, and returns an instance of the appropriate class. Exit with an - error if we can't figure it out. - - Returns: - A VersionControlSystem instance. Exits if the VCS can't be guessed. - """ - # Mercurial has a command to get the base directory of a repository - # Try running it, but don't die if we don't have hg installed. - # NOTE: we try Mercurial first as it can sit on top of an SVN working copy. - try: - out, returncode = RunShellWithReturnCode(["hg", "root"]) - if returncode == 0: - return MercurialVCS(options, out.strip()) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have hg installed. - raise - - # Subversion has a .svn in all working directories. - if os.path.isdir('.svn'): - logging.info("Guessed VCS = Subversion") - return SubversionVCS(options) - - # Git has a command to test if you're in a git tree. - # Try running it, but don't die if we don't have git installed. - try: - out, returncode = RunShellWithReturnCode(["git", "rev-parse", - "--is-inside-work-tree"]) - if returncode == 0: - return GitVCS(options) - except OSError, (errno, message): - if errno != 2: # ENOENT -- they don't have git installed. - raise - - ErrorExit(("Could not guess version control system. " - "Are you in a working copy directory?")) - - -def RealMain(argv, data=None): - """The real main function. - - Args: - argv: Command line arguments. - data: Diff contents. If None (default) the diff is generated by - the VersionControlSystem implementation returned by GuessVCS(). - - Returns: - A 2-tuple (issue id, patchset id). - The patchset id is None if the base files are not uploaded by this - script (applies only to SVN checkouts). - """ - logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" - "%(lineno)s %(message)s ")) - os.environ['LC_ALL'] = 'C' - options, args = parser.parse_args(argv[1:]) - global verbosity - verbosity = options.verbose - if verbosity >= 3: - logging.getLogger().setLevel(logging.DEBUG) - elif verbosity >= 2: - logging.getLogger().setLevel(logging.INFO) - vcs = GuessVCS(options) - if isinstance(vcs, SubversionVCS): - # base field is only allowed for Subversion. - # Note: Fetching base files may become deprecated in future releases. - base = vcs.GuessBase(options.download_base) - else: - base = None - if not base and options.download_base: - options.download_base = True - logging.info("Enabled upload of base file") - if not options.assume_yes: - vcs.CheckForUnknownFiles() - if data is None: - data = vcs.GenerateDiff(args) - files = vcs.GetBaseFiles(data) - if verbosity >= 1: - print "Upload server:", options.server, "(change with -s/--server)" - if options.issue: - prompt = "Message describing this patch set: " - else: - prompt = "New issue subject: " - message = options.message or raw_input(prompt).strip() - if not message: - ErrorExit("A non-empty message is required") - rpc_server = GetRpcServer(options) - form_fields = [("subject", message)] - if base: - form_fields.append(("base", base)) - if options.issue: - form_fields.append(("issue", str(options.issue))) - if options.email: - form_fields.append(("user", options.email)) - if options.reviewers: - for reviewer in options.reviewers.split(','): - if "@" in reviewer and not reviewer.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % reviewer) - form_fields.append(("reviewers", options.reviewers)) - if options.cc: - for cc in options.cc.split(','): - if "@" in cc and not cc.split("@")[1].count(".") == 1: - ErrorExit("Invalid email address: %s" % cc) - form_fields.append(("cc", options.cc)) - description = options.description - if options.description_file: - if options.description: - ErrorExit("Can't specify description and description_file") - file = open(options.description_file, 'r') - description = file.read() - file.close() - if description: - form_fields.append(("description", description)) - # Send a hash of all the base file so the server can determine if a copy - # already exists in an earlier patchset. - base_hashes = "" - for file, info in files.iteritems(): - if not info[0] is None: - checksum = md5.new(info[0]).hexdigest() - if base_hashes: - base_hashes += "|" - base_hashes += checksum + ":" + file - form_fields.append(("base_hashes", base_hashes)) - # If we're uploading base files, don't send the email before the uploads, so - # that it contains the file status. - if options.send_mail and options.download_base: - form_fields.append(("send_mail", "1")) - if not options.download_base: - form_fields.append(("content_upload", "1")) - if len(data) > MAX_UPLOAD_SIZE: - print "Patch is large, so uploading file patches separately." - uploaded_diff_file = [] - form_fields.append(("separate_patches", "1")) - else: - uploaded_diff_file = [("data", "data.diff", data)] - ctype, body = EncodeMultipartFormData(form_fields, uploaded_diff_file) - response_body = rpc_server.Send("/upload", body, content_type=ctype) - patchset = None - if not options.download_base or not uploaded_diff_file: - lines = response_body.splitlines() - if len(lines) >= 2: - msg = lines[0] - patchset = lines[1].strip() - patches = [x.split(" ", 1) for x in lines[2:]] - else: - msg = response_body - else: - msg = response_body - StatusUpdate(msg) - if not response_body.startswith("Issue created.") and \ - not response_body.startswith("Issue updated."): - sys.exit(0) - issue = msg[msg.rfind("/")+1:] - - if not uploaded_diff_file: - result = UploadSeparatePatches(issue, rpc_server, patchset, data, options) - if not options.download_base: - patches = result - - if not options.download_base: - vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files) - if options.send_mail: - rpc_server.Send("/" + issue + "/mail", payload="") - return issue, patchset - - -def main(): - try: - RealMain(sys.argv) - except KeyboardInterrupt: - print - StatusUpdate("Interrupted.") - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload_gtest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload_gtest.py deleted file mode 100755 index be19ae80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/scripts/upload_gtest.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""upload_gtest.py v0.1.0 -- uploads a Google Test patch for review. - -This simple wrapper passes all command line flags and ---cc=googletestframework@googlegroups.com to upload.py. - -USAGE: upload_gtest.py [options for upload.py] -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys - -CC_FLAG = '--cc=' -GTEST_GROUP = 'googletestframework@googlegroups.com' - - -def main(): - # Finds the path to upload.py, assuming it is in the same directory - # as this file. - my_dir = os.path.dirname(os.path.abspath(__file__)) - upload_py_path = os.path.join(my_dir, 'upload.py') - - # Adds Google Test discussion group to the cc line if it's not there - # already. - upload_py_argv = [upload_py_path] - found_cc_flag = False - for arg in sys.argv[1:]: - if arg.startswith(CC_FLAG): - found_cc_flag = True - cc_line = arg[len(CC_FLAG):] - cc_list = [addr for addr in cc_line.split(',') if addr] - if GTEST_GROUP not in cc_list: - cc_list.append(GTEST_GROUP) - upload_py_argv.append(CC_FLAG + ','.join(cc_list)) - else: - upload_py_argv.append(arg) - - if not found_cc_flag: - upload_py_argv.append(CC_FLAG + GTEST_GROUP) - - # Invokes upload.py with the modified command line flags. - os.execv(upload_py_path, upload_py_argv) - - -if __name__ == '__main__': - main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-all.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-all.cc deleted file mode 100644 index a67ea0fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-all.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// Google C++ Testing Framework (Google Test) -// -// Sometimes it's desirable to build Google Test by compiling a single file. -// This file serves this purpose. -#include "src/gtest.cc" -#include "src/gtest-death-test.cc" -#include "src/gtest-filepath.cc" -#include "src/gtest-port.cc" -#include "src/gtest-test-part.cc" -#include "src/gtest-typed-test.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-death-test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-death-test.cc deleted file mode 100644 index 106b01c7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-death-test.cc +++ /dev/null @@ -1,1174 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) -// -// This file implements death tests. - -#include -#include - -#if GTEST_HAS_DEATH_TEST - -#if GTEST_OS_MAC -#include -#endif // GTEST_OS_MAC - -#include -#include -#include -#include - -#if GTEST_OS_WINDOWS -#include -#else -#include -#include -#endif // GTEST_OS_WINDOWS - -#endif // GTEST_HAS_DEATH_TEST - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -// Constants. - -// The default death test style. -static const char kDefaultDeathTestStyle[] = "fast"; - -GTEST_DEFINE_string_( - death_test_style, - internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), - "Indicates how to run a death test in a forked child process: " - "\"threadsafe\" (child process re-executes the test binary " - "from the beginning, running only the specific death test) or " - "\"fast\" (child process runs the death test immediately " - "after forking)."); - -GTEST_DEFINE_bool_( - death_test_use_fork, - internal::BoolFromGTestEnv("death_test_use_fork", false), - "Instructs to use fork()/_exit() instead of clone() in death tests. " - "Ignored and always uses fork() on POSIX systems where clone() is not " - "implemented. Useful when running under valgrind or similar tools if " - "those do not support clone(). Valgrind 3.3.1 will just fail if " - "it sees an unsupported combination of clone() flags. " - "It is not recommended to use this flag w/o valgrind though it will " - "work in 99% of the cases. Once valgrind is fixed, this flag will " - "most likely be removed."); - -namespace internal { -GTEST_DEFINE_string_( - internal_run_death_test, "", - "Indicates the file, line number, temporal index of " - "the single death test to run, and a file descriptor to " - "which a success code may be sent, all separated by " - "colons. This flag is specified if and only if the current " - "process is a sub-process launched for running a thread-safe " - "death test. FOR INTERNAL USE ONLY."); -} // namespace internal - -#if GTEST_HAS_DEATH_TEST - -// ExitedWithCode constructor. -ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) { -} - -// ExitedWithCode function-call operator. -bool ExitedWithCode::operator()(int exit_status) const { -#if GTEST_OS_WINDOWS - return exit_status == exit_code_; -#else - return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_; -#endif // GTEST_OS_WINDOWS -} - -#if !GTEST_OS_WINDOWS -// KilledBySignal constructor. -KilledBySignal::KilledBySignal(int signum) : signum_(signum) { -} - -// KilledBySignal function-call operator. -bool KilledBySignal::operator()(int exit_status) const { - return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; -} -#endif // !GTEST_OS_WINDOWS - -namespace internal { - -// Utilities needed for death tests. - -// Generates a textual description of a given exit code, in the format -// specified by wait(2). -static String ExitSummary(int exit_code) { - Message m; -#if GTEST_OS_WINDOWS - m << "Exited with exit status " << exit_code; -#else - if (WIFEXITED(exit_code)) { - m << "Exited with exit status " << WEXITSTATUS(exit_code); - } else if (WIFSIGNALED(exit_code)) { - m << "Terminated by signal " << WTERMSIG(exit_code); - } -#ifdef WCOREDUMP - if (WCOREDUMP(exit_code)) { - m << " (core dumped)"; - } -#endif -#endif // GTEST_OS_WINDOWS - return m.GetString(); -} - -// Returns true if exit_status describes a process that was terminated -// by a signal, or exited normally with a nonzero exit code. -bool ExitedUnsuccessfully(int exit_status) { - return !ExitedWithCode(0)(exit_status); -} - -#if !GTEST_OS_WINDOWS -// Generates a textual failure message when a death test finds more than -// one thread running, or cannot determine the number of threads, prior -// to executing the given statement. It is the responsibility of the -// caller not to pass a thread_count of 1. -static String DeathTestThreadWarning(size_t thread_count) { - Message msg; - msg << "Death tests use fork(), which is unsafe particularly" - << " in a threaded context. For this test, " << GTEST_NAME_ << " "; - if (thread_count == 0) - msg << "couldn't detect the number of threads."; - else - msg << "detected " << thread_count << " threads."; - return msg.GetString(); -} -#endif // !GTEST_OS_WINDOWS - -// Flag characters for reporting a death test that did not die. -static const char kDeathTestLived = 'L'; -static const char kDeathTestReturned = 'R'; -static const char kDeathTestInternalError = 'I'; - -// An enumeration describing all of the possible ways that a death test -// can conclude. DIED means that the process died while executing the -// test code; LIVED means that process lived beyond the end of the test -// code; and RETURNED means that the test statement attempted a "return," -// which is not allowed. IN_PROGRESS means the test has not yet -// concluded. -enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED }; - -// Routine for aborting the program which is safe to call from an -// exec-style death test child process, in which case the error -// message is propagated back to the parent process. Otherwise, the -// message is simply printed to stderr. In either case, the program -// then exits with status 1. -void DeathTestAbort(const String& message) { - // On a POSIX system, this function may be called from a threadsafe-style - // death test child process, which operates on a very small stack. Use - // the heap for any additional non-minuscule memory requirements. - const InternalRunDeathTestFlag* const flag = - GetUnitTestImpl()->internal_run_death_test_flag(); - if (flag != NULL) { - FILE* parent = posix::FDOpen(flag->write_fd(), "w"); - fputc(kDeathTestInternalError, parent); - fprintf(parent, "%s", message.c_str()); - fflush(parent); - _exit(1); - } else { - fprintf(stderr, "%s", message.c_str()); - fflush(stderr); - abort(); - } -} - -// A replacement for CHECK that calls DeathTestAbort if the assertion -// fails. -#define GTEST_DEATH_TEST_CHECK_(expression) \ - do { \ - if (!::testing::internal::IsTrue(expression)) { \ - DeathTestAbort(::testing::internal::String::Format( \ - "CHECK failed: File %s, line %d: %s", \ - __FILE__, __LINE__, #expression)); \ - } \ - } while (::testing::internal::AlwaysFalse()) - -// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for -// evaluating any system call that fulfills two conditions: it must return -// -1 on failure, and set errno to EINTR when it is interrupted and -// should be tried again. The macro expands to a loop that repeatedly -// evaluates the expression as long as it evaluates to -1 and sets -// errno to EINTR. If the expression evaluates to -1 but errno is -// something other than EINTR, DeathTestAbort is called. -#define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \ - do { \ - int gtest_retval; \ - do { \ - gtest_retval = (expression); \ - } while (gtest_retval == -1 && errno == EINTR); \ - if (gtest_retval == -1) { \ - DeathTestAbort(::testing::internal::String::Format( \ - "CHECK failed: File %s, line %d: %s != -1", \ - __FILE__, __LINE__, #expression)); \ - } \ - } while (::testing::internal::AlwaysFalse()) - -// Returns the message describing the last system error in errno. -String GetLastErrnoDescription() { - return String(errno == 0 ? "" : posix::StrError(errno)); -} - -// This is called from a death test parent process to read a failure -// message from the death test child process and log it with the FATAL -// severity. On Windows, the message is read from a pipe handle. On other -// platforms, it is read from a file descriptor. -static void FailFromInternalError(int fd) { - Message error; - char buffer[256]; - int num_read; - - do { - while ((num_read = posix::Read(fd, buffer, 255)) > 0) { - buffer[num_read] = '\0'; - error << buffer; - } - } while (num_read == -1 && errno == EINTR); - - if (num_read == 0) { - GTEST_LOG_(FATAL) << error.GetString(); - } else { - const int last_error = errno; - GTEST_LOG_(FATAL) << "Error while reading death test internal: " - << GetLastErrnoDescription() << " [" << last_error << "]"; - } -} - -// Death test constructor. Increments the running death test count -// for the current test. -DeathTest::DeathTest() { - TestInfo* const info = GetUnitTestImpl()->current_test_info(); - if (info == NULL) { - DeathTestAbort("Cannot run a death test outside of a TEST or " - "TEST_F construct"); - } -} - -// Creates and returns a death test by dispatching to the current -// death test factory. -bool DeathTest::Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test) { - return GetUnitTestImpl()->death_test_factory()->Create( - statement, regex, file, line, test); -} - -const char* DeathTest::LastMessage() { - return last_death_test_message_.c_str(); -} - -void DeathTest::set_last_death_test_message(const String& message) { - last_death_test_message_ = message; -} - -String DeathTest::last_death_test_message_; - -// Provides cross platform implementation for some death functionality. -class DeathTestImpl : public DeathTest { - protected: - DeathTestImpl(const char* statement, const RE* regex) - : statement_(statement), - regex_(regex), - spawned_(false), - status_(-1), - outcome_(IN_PROGRESS), - read_fd_(-1), - write_fd_(-1) {} - - // read_fd_ is expected to be closed and cleared by a derived class. - ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } - - void Abort(AbortReason reason); - virtual bool Passed(bool status_ok); - - const char* statement() const { return statement_; } - const RE* regex() const { return regex_; } - bool spawned() const { return spawned_; } - void set_spawned(bool spawned) { spawned_ = spawned; } - int status() const { return status_; } - void set_status(int status) { status_ = status; } - DeathTestOutcome outcome() const { return outcome_; } - void set_outcome(DeathTestOutcome outcome) { outcome_ = outcome; } - int read_fd() const { return read_fd_; } - void set_read_fd(int fd) { read_fd_ = fd; } - int write_fd() const { return write_fd_; } - void set_write_fd(int fd) { write_fd_ = fd; } - - // Called in the parent process only. Reads the result code of the death - // test child process via a pipe, interprets it to set the outcome_ - // member, and closes read_fd_. Outputs diagnostics and terminates in - // case of unexpected codes. - void ReadAndInterpretStatusByte(); - - private: - // The textual content of the code this object is testing. This class - // doesn't own this string and should not attempt to delete it. - const char* const statement_; - // The regular expression which test output must match. DeathTestImpl - // doesn't own this object and should not attempt to delete it. - const RE* const regex_; - // True if the death test child process has been successfully spawned. - bool spawned_; - // The exit status of the child process. - int status_; - // How the death test concluded. - DeathTestOutcome outcome_; - // Descriptor to the read end of the pipe to the child process. It is - // always -1 in the child process. The child keeps its write end of the - // pipe in write_fd_. - int read_fd_; - // Descriptor to the child's write end of the pipe to the parent process. - // It is always -1 in the parent process. The parent keeps its end of the - // pipe in read_fd_. - int write_fd_; -}; - -// Called in the parent process only. Reads the result code of the death -// test child process via a pipe, interprets it to set the outcome_ -// member, and closes read_fd_. Outputs diagnostics and terminates in -// case of unexpected codes. -void DeathTestImpl::ReadAndInterpretStatusByte() { - char flag; - int bytes_read; - - // The read() here blocks until data is available (signifying the - // failure of the death test) or until the pipe is closed (signifying - // its success), so it's okay to call this in the parent before - // the child process has exited. - do { - bytes_read = posix::Read(read_fd(), &flag, 1); - } while (bytes_read == -1 && errno == EINTR); - - if (bytes_read == 0) { - set_outcome(DIED); - } else if (bytes_read == 1) { - switch (flag) { - case kDeathTestReturned: - set_outcome(RETURNED); - break; - case kDeathTestLived: - set_outcome(LIVED); - break; - case kDeathTestInternalError: - FailFromInternalError(read_fd()); // Does not return. - break; - default: - GTEST_LOG_(FATAL) << "Death test child process reported " - << "unexpected status byte (" - << static_cast(flag) << ")"; - } - } else { - GTEST_LOG_(FATAL) << "Read from death test child process failed: " - << GetLastErrnoDescription(); - } - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd())); - set_read_fd(-1); -} - -// Signals that the death test code which should have exited, didn't. -// Should be called only in a death test child process. -// Writes a status byte to the child's status file descriptor, then -// calls _exit(1). -void DeathTestImpl::Abort(AbortReason reason) { - // The parent process considers the death test to be a failure if - // it finds any data in our pipe. So, here we write a single flag byte - // to the pipe, then exit. - const char status_ch = - reason == TEST_DID_NOT_DIE ? kDeathTestLived : kDeathTestReturned; - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1)); - GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(write_fd())); - _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash) -} - -// Assesses the success or failure of a death test, using both private -// members which have previously been set, and one argument: -// -// Private data members: -// outcome: An enumeration describing how the death test -// concluded: DIED, LIVED, or RETURNED. The death test fails -// in the latter two cases. -// status: The exit status of the child process. On *nix, it is in the -// in the format specified by wait(2). On Windows, this is the -// value supplied to the ExitProcess() API or a numeric code -// of the exception that terminated the program. -// regex: A regular expression object to be applied to -// the test's captured standard error output; the death test -// fails if it does not match. -// -// Argument: -// status_ok: true if exit_status is acceptable in the context of -// this particular death test, which fails if it is false -// -// Returns true iff all of the above conditions are met. Otherwise, the -// first failing condition, in the order given above, is the one that is -// reported. Also sets the last death test message string. -bool DeathTestImpl::Passed(bool status_ok) { - if (!spawned()) - return false; - - const String error_message = GetCapturedStderr(); - - bool success = false; - Message buffer; - - buffer << "Death test: " << statement() << "\n"; - switch (outcome()) { - case LIVED: - buffer << " Result: failed to die.\n" - << " Error msg: " << error_message; - break; - case RETURNED: - buffer << " Result: illegal return in test statement.\n" - << " Error msg: " << error_message; - break; - case DIED: - if (status_ok) { - const bool matched = RE::PartialMatch(error_message.c_str(), *regex()); - if (matched) { - success = true; - } else { - buffer << " Result: died but not with expected error.\n" - << " Expected: " << regex()->pattern() << "\n" - << "Actual msg: " << error_message; - } - } else { - buffer << " Result: died but not with expected exit code:\n" - << " " << ExitSummary(status()) << "\n"; - } - break; - case IN_PROGRESS: - default: - GTEST_LOG_(FATAL) - << "DeathTest::Passed somehow called before conclusion of test"; - } - - DeathTest::set_last_death_test_message(buffer.GetString()); - return success; -} - -#if GTEST_OS_WINDOWS -// WindowsDeathTest implements death tests on Windows. Due to the -// specifics of starting new processes on Windows, death tests there are -// always threadsafe, and Google Test considers the -// --gtest_death_test_style=fast setting to be equivalent to -// --gtest_death_test_style=threadsafe there. -// -// A few implementation notes: Like the Linux version, the Windows -// implementation uses pipes for child-to-parent communication. But due to -// the specifics of pipes on Windows, some extra steps are required: -// -// 1. The parent creates a communication pipe and stores handles to both -// ends of it. -// 2. The parent starts the child and provides it with the information -// necessary to acquire the handle to the write end of the pipe. -// 3. The child acquires the write end of the pipe and signals the parent -// using a Windows event. -// 4. Now the parent can release the write end of the pipe on its side. If -// this is done before step 3, the object's reference count goes down to -// 0 and it is destroyed, preventing the child from acquiring it. The -// parent now has to release it, or read operations on the read end of -// the pipe will not return when the child terminates. -// 5. The parent reads child's output through the pipe (outcome code and -// any possible error messages) from the pipe, and its stderr and then -// determines whether to fail the test. -// -// Note: to distinguish Win32 API calls from the local method and function -// calls, the former are explicitly resolved in the global namespace. -// -class WindowsDeathTest : public DeathTestImpl { - public: - WindowsDeathTest(const char* statement, - const RE* regex, - const char* file, - int line) - : DeathTestImpl(statement, regex), file_(file), line_(line) {} - - // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); - virtual TestRole AssumeRole(); - - private: - // The name of the file in which the death test is located. - const char* const file_; - // The line number on which the death test is located. - const int line_; - // Handle to the write end of the pipe to the child process. - AutoHandle write_handle_; - // Child process handle. - AutoHandle child_handle_; - // Event the child process uses to signal the parent that it has - // acquired the handle to the write end of the pipe. After seeing this - // event the parent can release its own handles to make sure its - // ReadFile() calls return when the child terminates. - AutoHandle event_handle_; -}; - -// Waits for the child in a death test to exit, returning its exit -// status, or 0 if no child process exists. As a side effect, sets the -// outcome data member. -int WindowsDeathTest::Wait() { - if (!spawned()) - return 0; - - // Wait until the child either signals that it has acquired the write end - // of the pipe or it dies. - const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; - switch (::WaitForMultipleObjects(2, - wait_handles, - FALSE, // Waits for any of the handles. - INFINITE)) { - case WAIT_OBJECT_0: - case WAIT_OBJECT_0 + 1: - break; - default: - GTEST_DEATH_TEST_CHECK_(false); // Should not get here. - } - - // The child has acquired the write end of the pipe or exited. - // We release the handle on our side and continue. - write_handle_.Reset(); - event_handle_.Reset(); - - ReadAndInterpretStatusByte(); - - // Waits for the child process to exit if it haven't already. This - // returns immediately if the child has already exited, regardless of - // whether previous calls to WaitForMultipleObjects synchronized on this - // handle or not. - GTEST_DEATH_TEST_CHECK_( - WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(), - INFINITE)); - DWORD status; - GTEST_DEATH_TEST_CHECK_(::GetExitCodeProcess(child_handle_.Get(), &status) - != FALSE); - child_handle_.Reset(); - set_status(static_cast(status)); - return this->status(); -} - -// The AssumeRole process for a Windows death test. It creates a child -// process with the same executable as the current process to run the -// death test. The child process is given the --gtest_filter and -// --gtest_internal_run_death_test flags such that it knows to run the -// current death test only. -DeathTest::TestRole WindowsDeathTest::AssumeRole() { - const UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const TestInfo* const info = impl->current_test_info(); - const int death_test_index = info->result()->death_test_count(); - - if (flag != NULL) { - // ParseInternalRunDeathTestFlag() has performed all the necessary - // processing. - set_write_fd(flag->write_fd()); - return EXECUTE_TEST; - } - - // WindowsDeathTest uses an anonymous pipe to communicate results of - // a death test. - SECURITY_ATTRIBUTES handles_are_inheritable = { - sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; - HANDLE read_handle, write_handle; - GTEST_DEATH_TEST_CHECK_( - ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable, - 0) // Default buffer size. - != FALSE); - set_read_fd(::_open_osfhandle(reinterpret_cast(read_handle), - O_RDONLY)); - write_handle_.Reset(write_handle); - event_handle_.Reset(::CreateEvent( - &handles_are_inheritable, - TRUE, // The event will automatically reset to non-signaled state. - FALSE, // The initial state is non-signalled. - NULL)); // The even is unnamed. - GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != NULL); - const String filter_flag = String::Format("--%s%s=%s.%s", - GTEST_FLAG_PREFIX_, kFilterFlag, - info->test_case_name(), - info->name()); - const String internal_flag = String::Format( - "--%s%s=%s|%d|%d|%u|%Iu|%Iu", - GTEST_FLAG_PREFIX_, - kInternalRunDeathTestFlag, - file_, line_, - death_test_index, - static_cast(::GetCurrentProcessId()), - // size_t has the same with as pointers on both 32-bit and 64-bit - // Windows platforms. - // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. - reinterpret_cast(write_handle), - reinterpret_cast(event_handle_.Get())); - - char executable_path[_MAX_PATH + 1]; // NOLINT - GTEST_DEATH_TEST_CHECK_( - _MAX_PATH + 1 != ::GetModuleFileNameA(NULL, - executable_path, - _MAX_PATH)); - - String command_line = String::Format("%s %s \"%s\"", - ::GetCommandLineA(), - filter_flag.c_str(), - internal_flag.c_str()); - - DeathTest::set_last_death_test_message(""); - - CaptureStderr(); - // Flush the log buffers since the log streams are shared with the child. - FlushInfoLog(); - - // The child process will share the standard handles with the parent. - STARTUPINFOA startup_info; - memset(&startup_info, 0, sizeof(STARTUPINFO)); - startup_info.dwFlags = STARTF_USESTDHANDLES; - startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE); - startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE); - startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE); - - PROCESS_INFORMATION process_info; - GTEST_DEATH_TEST_CHECK_(::CreateProcessA( - executable_path, - const_cast(command_line.c_str()), - NULL, // Retuned process handle is not inheritable. - NULL, // Retuned thread handle is not inheritable. - TRUE, // Child inherits all inheritable handles (for write_handle_). - 0x0, // Default creation flags. - NULL, // Inherit the parent's environment. - UnitTest::GetInstance()->original_working_dir(), - &startup_info, - &process_info) != FALSE); - child_handle_.Reset(process_info.hProcess); - ::CloseHandle(process_info.hThread); - set_spawned(true); - return OVERSEE_TEST; -} -#else // We are not on Windows. - -// ForkingDeathTest provides implementations for most of the abstract -// methods of the DeathTest interface. Only the AssumeRole method is -// left undefined. -class ForkingDeathTest : public DeathTestImpl { - public: - ForkingDeathTest(const char* statement, const RE* regex); - - // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); - - protected: - void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } - - private: - // PID of child process during death test; 0 in the child process itself. - pid_t child_pid_; -}; - -// Constructs a ForkingDeathTest. -ForkingDeathTest::ForkingDeathTest(const char* statement, const RE* regex) - : DeathTestImpl(statement, regex), - child_pid_(-1) {} - -// Waits for the child in a death test to exit, returning its exit -// status, or 0 if no child process exists. As a side effect, sets the -// outcome data member. -int ForkingDeathTest::Wait() { - if (!spawned()) - return 0; - - ReadAndInterpretStatusByte(); - - int status; - GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status, 0)); - set_status(status); - return status; -} - -// A concrete death test class that forks, then immediately runs the test -// in the child process. -class NoExecDeathTest : public ForkingDeathTest { - public: - NoExecDeathTest(const char* statement, const RE* regex) : - ForkingDeathTest(statement, regex) { } - virtual TestRole AssumeRole(); -}; - -// The AssumeRole process for a fork-and-run death test. It implements a -// straightforward fork, with a simple pipe to transmit the status byte. -DeathTest::TestRole NoExecDeathTest::AssumeRole() { - const size_t thread_count = GetThreadCount(); - if (thread_count != 1) { - GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count); - } - - int pipe_fd[2]; - GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); - - DeathTest::set_last_death_test_message(""); - CaptureStderr(); - // When we fork the process below, the log file buffers are copied, but the - // file descriptors are shared. We flush all log files here so that closing - // the file descriptors in the child process doesn't throw off the - // synchronization between descriptors and buffers in the parent process. - // This is as close to the fork as possible to avoid a race condition in case - // there are multiple threads running before the death test, and another - // thread writes to the log file. - FlushInfoLog(); - - const pid_t child_pid = fork(); - GTEST_DEATH_TEST_CHECK_(child_pid != -1); - set_child_pid(child_pid); - if (child_pid == 0) { - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); - set_write_fd(pipe_fd[1]); - // Redirects all logging to stderr in the child process to prevent - // concurrent writes to the log files. We capture stderr in the parent - // process and append the child process' output to a log. - LogToStderr(); - // Event forwarding to the listeners of event listener API mush be shut - // down in death test subprocesses. - GetUnitTestImpl()->listeners()->SuppressEventForwarding(); - return EXECUTE_TEST; - } else { - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); - set_read_fd(pipe_fd[0]); - set_spawned(true); - return OVERSEE_TEST; - } -} - -// A concrete death test class that forks and re-executes the main -// program from the beginning, with command-line flags set that cause -// only this specific death test to be run. -class ExecDeathTest : public ForkingDeathTest { - public: - ExecDeathTest(const char* statement, const RE* regex, - const char* file, int line) : - ForkingDeathTest(statement, regex), file_(file), line_(line) { } - virtual TestRole AssumeRole(); - private: - // The name of the file in which the death test is located. - const char* const file_; - // The line number on which the death test is located. - const int line_; -}; - -// Utility class for accumulating command-line arguments. -class Arguments { - public: - Arguments() { - args_.push_back(NULL); - } - - ~Arguments() { - for (std::vector::iterator i = args_.begin(); i != args_.end(); - ++i) { - free(*i); - } - } - void AddArgument(const char* argument) { - args_.insert(args_.end() - 1, posix::StrDup(argument)); - } - - template - void AddArguments(const ::std::vector& arguments) { - for (typename ::std::vector::const_iterator i = arguments.begin(); - i != arguments.end(); - ++i) { - args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); - } - } - char* const* Argv() { - return &args_[0]; - } - private: - std::vector args_; -}; - -// A struct that encompasses the arguments to the child process of a -// threadsafe-style death test process. -struct ExecDeathTestArgs { - char* const* argv; // Command-line arguments for the child's call to exec - int close_fd; // File descriptor to close; the read end of a pipe -}; - -#if GTEST_OS_MAC -inline char** GetEnviron() { - // When Google Test is built as a framework on MacOS X, the environ variable - // is unavailable. Apple's documentation (man environ) recommends using - // _NSGetEnviron() instead. - return *_NSGetEnviron(); -} -#else -// Some POSIX platforms expect you to declare environ. extern "C" makes -// it reside in the global namespace. -extern "C" char** environ; -inline char** GetEnviron() { return environ; } -#endif // GTEST_OS_MAC - -// The main function for a threadsafe-style death test child process. -// This function is called in a clone()-ed process and thus must avoid -// any potentially unsafe operations like malloc or libc functions. -static int ExecDeathTestChildMain(void* child_arg) { - ExecDeathTestArgs* const args = static_cast(child_arg); - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd)); - - // We need to execute the test program in the same environment where - // it was originally invoked. Therefore we change to the original - // working directory first. - const char* const original_dir = - UnitTest::GetInstance()->original_working_dir(); - // We can safely call chdir() as it's a direct system call. - if (chdir(original_dir) != 0) { - DeathTestAbort(String::Format("chdir(\"%s\") failed: %s", - original_dir, - GetLastErrnoDescription().c_str())); - return EXIT_FAILURE; - } - - // We can safely call execve() as it's a direct system call. We - // cannot use execvp() as it's a libc function and thus potentially - // unsafe. Since execve() doesn't search the PATH, the user must - // invoke the test program via a valid path that contains at least - // one path separator. - execve(args->argv[0], args->argv, GetEnviron()); - DeathTestAbort(String::Format("execve(%s, ...) in %s failed: %s", - args->argv[0], - original_dir, - GetLastErrnoDescription().c_str())); - return EXIT_FAILURE; -} - -// Two utility routines that together determine the direction the stack -// grows. -// This could be accomplished more elegantly by a single recursive -// function, but we want to guard against the unlikely possibility of -// a smart compiler optimizing the recursion away. -bool StackLowerThanAddress(const void* ptr) { - int dummy; - return &dummy < ptr; -} - -bool StackGrowsDown() { - int dummy; - return StackLowerThanAddress(&dummy); -} - -// A threadsafe implementation of fork(2) for threadsafe-style death tests -// that uses clone(2). It dies with an error message if anything goes -// wrong. -static pid_t ExecDeathTestFork(char* const* argv, int close_fd) { - ExecDeathTestArgs args = { argv, close_fd }; - pid_t child_pid = -1; - -#if GTEST_HAS_CLONE - const bool use_fork = GTEST_FLAG(death_test_use_fork); - - if (!use_fork) { - static const bool stack_grows_down = StackGrowsDown(); - const size_t stack_size = getpagesize(); - // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. - void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); - GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); - void* const stack_top = - static_cast(stack) + (stack_grows_down ? stack_size : 0); - - child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); - - GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1); - } -#else - const bool use_fork = true; -#endif // GTEST_HAS_CLONE - - if (use_fork && (child_pid = fork()) == 0) { - ExecDeathTestChildMain(&args); - _exit(0); - } - - GTEST_DEATH_TEST_CHECK_(child_pid != -1); - return child_pid; -} - -// The AssumeRole process for a fork-and-exec death test. It re-executes the -// main program from the beginning, setting the --gtest_filter -// and --gtest_internal_run_death_test flags to cause only the current -// death test to be re-run. -DeathTest::TestRole ExecDeathTest::AssumeRole() { - const UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const TestInfo* const info = impl->current_test_info(); - const int death_test_index = info->result()->death_test_count(); - - if (flag != NULL) { - set_write_fd(flag->write_fd()); - return EXECUTE_TEST; - } - - int pipe_fd[2]; - GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); - // Clear the close-on-exec flag on the write end of the pipe, lest - // it be closed when the child process does an exec: - GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); - - const String filter_flag = - String::Format("--%s%s=%s.%s", - GTEST_FLAG_PREFIX_, kFilterFlag, - info->test_case_name(), info->name()); - const String internal_flag = - String::Format("--%s%s=%s|%d|%d|%d", - GTEST_FLAG_PREFIX_, kInternalRunDeathTestFlag, - file_, line_, death_test_index, pipe_fd[1]); - Arguments args; - args.AddArguments(GetArgvs()); - args.AddArgument(filter_flag.c_str()); - args.AddArgument(internal_flag.c_str()); - - DeathTest::set_last_death_test_message(""); - - CaptureStderr(); - // See the comment in NoExecDeathTest::AssumeRole for why the next line - // is necessary. - FlushInfoLog(); - - const pid_t child_pid = ExecDeathTestFork(args.Argv(), pipe_fd[0]); - GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); - set_child_pid(child_pid); - set_read_fd(pipe_fd[0]); - set_spawned(true); - return OVERSEE_TEST; -} - -#endif // !GTEST_OS_WINDOWS - -// Creates a concrete DeathTest-derived class that depends on the -// --gtest_death_test_style flag, and sets the pointer pointed to -// by the "test" argument to its address. If the test should be -// skipped, sets that pointer to NULL. Returns true, unless the -// flag is set to an invalid value. -bool DefaultDeathTestFactory::Create(const char* statement, const RE* regex, - const char* file, int line, - DeathTest** test) { - UnitTestImpl* const impl = GetUnitTestImpl(); - const InternalRunDeathTestFlag* const flag = - impl->internal_run_death_test_flag(); - const int death_test_index = impl->current_test_info() - ->increment_death_test_count(); - - if (flag != NULL) { - if (death_test_index > flag->index()) { - DeathTest::set_last_death_test_message(String::Format( - "Death test count (%d) somehow exceeded expected maximum (%d)", - death_test_index, flag->index())); - return false; - } - - if (!(flag->file() == file && flag->line() == line && - flag->index() == death_test_index)) { - *test = NULL; - return true; - } - } - -#if GTEST_OS_WINDOWS - if (GTEST_FLAG(death_test_style) == "threadsafe" || - GTEST_FLAG(death_test_style) == "fast") { - *test = new WindowsDeathTest(statement, regex, file, line); - } -#else - if (GTEST_FLAG(death_test_style) == "threadsafe") { - *test = new ExecDeathTest(statement, regex, file, line); - } else if (GTEST_FLAG(death_test_style) == "fast") { - *test = new NoExecDeathTest(statement, regex); - } -#endif // GTEST_OS_WINDOWS - else { // NOLINT - this is more readable than unbalanced brackets inside #if. - DeathTest::set_last_death_test_message(String::Format( - "Unknown death test style \"%s\" encountered", - GTEST_FLAG(death_test_style).c_str())); - return false; - } - - return true; -} - -// Splits a given string on a given delimiter, populating a given -// vector with the fields. GTEST_HAS_DEATH_TEST implies that we have -// ::std::string, so we can use it here. -// TODO(vladl@google.com): Get rid of std::vector to be able to build on -// Visual C++ 7.1 with exceptions disabled. -static void SplitString(const ::std::string& str, char delimiter, - ::std::vector< ::std::string>* dest) { - ::std::vector< ::std::string> parsed; - ::std::string::size_type pos = 0; - while (::testing::internal::AlwaysTrue()) { - const ::std::string::size_type colon = str.find(delimiter, pos); - if (colon == ::std::string::npos) { - parsed.push_back(str.substr(pos)); - break; - } else { - parsed.push_back(str.substr(pos, colon - pos)); - pos = colon + 1; - } - } - dest->swap(parsed); -} - -#if GTEST_OS_WINDOWS -// Recreates the pipe and event handles from the provided parameters, -// signals the event, and returns a file descriptor wrapped around the pipe -// handle. This function is called in the child process only. -int GetStatusFileDescriptor(unsigned int parent_process_id, - size_t write_handle_as_size_t, - size_t event_handle_as_size_t) { - AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE, - FALSE, // Non-inheritable. - parent_process_id)); - if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) { - DeathTestAbort(String::Format("Unable to open parent process %u", - parent_process_id)); - } - - // TODO(vladl@google.com): Replace the following check with a - // compile-time assertion when available. - GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); - - const HANDLE write_handle = - reinterpret_cast(write_handle_as_size_t); - HANDLE dup_write_handle; - - // The newly initialized handle is accessible only in in the parent - // process. To obtain one accessible within the child, we need to use - // DuplicateHandle. - if (!::DuplicateHandle(parent_process_handle.Get(), write_handle, - ::GetCurrentProcess(), &dup_write_handle, - 0x0, // Requested privileges ignored since - // DUPLICATE_SAME_ACCESS is used. - FALSE, // Request non-inheritable handler. - DUPLICATE_SAME_ACCESS)) { - DeathTestAbort(String::Format( - "Unable to duplicate the pipe handle %Iu from the parent process %u", - write_handle_as_size_t, parent_process_id)); - } - - const HANDLE event_handle = reinterpret_cast(event_handle_as_size_t); - HANDLE dup_event_handle; - - if (!::DuplicateHandle(parent_process_handle.Get(), event_handle, - ::GetCurrentProcess(), &dup_event_handle, - 0x0, - FALSE, - DUPLICATE_SAME_ACCESS)) { - DeathTestAbort(String::Format( - "Unable to duplicate the event handle %Iu from the parent process %u", - event_handle_as_size_t, parent_process_id)); - } - - const int write_fd = - ::_open_osfhandle(reinterpret_cast(dup_write_handle), O_APPEND); - if (write_fd == -1) { - DeathTestAbort(String::Format( - "Unable to convert pipe handle %Iu to a file descriptor", - write_handle_as_size_t)); - } - - // Signals the parent that the write end of the pipe has been acquired - // so the parent can release its own write end. - ::SetEvent(dup_event_handle); - - return write_fd; -} -#endif // GTEST_OS_WINDOWS - -// Returns a newly created InternalRunDeathTestFlag object with fields -// initialized from the GTEST_FLAG(internal_run_death_test) flag if -// the flag is specified; otherwise returns NULL. -InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() { - if (GTEST_FLAG(internal_run_death_test) == "") return NULL; - - // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we - // can use it here. - int line = -1; - int index = -1; - ::std::vector< ::std::string> fields; - SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields); - int write_fd = -1; - -#if GTEST_OS_WINDOWS - unsigned int parent_process_id = 0; - size_t write_handle_as_size_t = 0; - size_t event_handle_as_size_t = 0; - - if (fields.size() != 6 - || !ParseNaturalNumber(fields[1], &line) - || !ParseNaturalNumber(fields[2], &index) - || !ParseNaturalNumber(fields[3], &parent_process_id) - || !ParseNaturalNumber(fields[4], &write_handle_as_size_t) - || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) { - DeathTestAbort(String::Format( - "Bad --gtest_internal_run_death_test flag: %s", - GTEST_FLAG(internal_run_death_test).c_str())); - } - write_fd = GetStatusFileDescriptor(parent_process_id, - write_handle_as_size_t, - event_handle_as_size_t); -#else - if (fields.size() != 4 - || !ParseNaturalNumber(fields[1], &line) - || !ParseNaturalNumber(fields[2], &index) - || !ParseNaturalNumber(fields[3], &write_fd)) { - DeathTestAbort(String::Format( - "Bad --gtest_internal_run_death_test flag: %s", - GTEST_FLAG(internal_run_death_test).c_str())); - } -#endif // GTEST_OS_WINDOWS - return new InternalRunDeathTestFlag(fields[0], line, index, write_fd); -} - -} // namespace internal - -#endif // GTEST_HAS_DEATH_TEST - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-filepath.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-filepath.cc deleted file mode 100644 index 515d61c7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-filepath.cc +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) - -#include -#include - -#include - -#if GTEST_OS_WINDOWS_MOBILE -#include -#elif GTEST_OS_WINDOWS -#include -#include -#elif GTEST_OS_SYMBIAN -// Symbian OpenC has PATH_MAX in sys/syslimits.h -#include -#else -#include -#include // Some Linux distributions define PATH_MAX here. -#endif // GTEST_OS_WINDOWS_MOBILE - -#if GTEST_OS_WINDOWS -#define GTEST_PATH_MAX_ _MAX_PATH -#elif defined(PATH_MAX) -#define GTEST_PATH_MAX_ PATH_MAX -#elif defined(_XOPEN_PATH_MAX) -#define GTEST_PATH_MAX_ _XOPEN_PATH_MAX -#else -#define GTEST_PATH_MAX_ _POSIX_PATH_MAX -#endif // GTEST_OS_WINDOWS - -#include - -namespace testing { -namespace internal { - -#if GTEST_OS_WINDOWS -const char kPathSeparator = '\\'; -const char kPathSeparatorString[] = "\\"; -#if GTEST_OS_WINDOWS_MOBILE -// Windows CE doesn't have a current directory. You should not use -// the current directory in tests on Windows CE, but this at least -// provides a reasonable fallback. -const char kCurrentDirectoryString[] = "\\"; -// Windows CE doesn't define INVALID_FILE_ATTRIBUTES -const DWORD kInvalidFileAttributes = 0xffffffff; -#else -const char kCurrentDirectoryString[] = ".\\"; -#endif // GTEST_OS_WINDOWS_MOBILE -#else -const char kPathSeparator = '/'; -const char kPathSeparatorString[] = "/"; -const char kCurrentDirectoryString[] = "./"; -#endif // GTEST_OS_WINDOWS - -// Returns the current working directory, or "" if unsuccessful. -FilePath FilePath::GetCurrentDir() { -#if GTEST_OS_WINDOWS_MOBILE - // Windows CE doesn't have a current directory, so we just return - // something reasonable. - return FilePath(kCurrentDirectoryString); -#elif GTEST_OS_WINDOWS - char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; - return FilePath(_getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); -#else - char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; - return FilePath(getcwd(cwd, sizeof(cwd)) == NULL ? "" : cwd); -#endif // GTEST_OS_WINDOWS_MOBILE -} - -// Returns a copy of the FilePath with the case-insensitive extension removed. -// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns -// FilePath("dir/file"). If a case-insensitive extension is not -// found, returns a copy of the original FilePath. -FilePath FilePath::RemoveExtension(const char* extension) const { - String dot_extension(String::Format(".%s", extension)); - if (pathname_.EndsWithCaseInsensitive(dot_extension.c_str())) { - return FilePath(String(pathname_.c_str(), pathname_.length() - 4)); - } - return *this; -} - -// Returns a copy of the FilePath with the directory part removed. -// Example: FilePath("path/to/file").RemoveDirectoryName() returns -// FilePath("file"). If there is no directory part ("just_a_file"), it returns -// the FilePath unmodified. If there is no file part ("just_a_dir/") it -// returns an empty FilePath (""). -// On Windows platform, '\' is the path separator, otherwise it is '/'. -FilePath FilePath::RemoveDirectoryName() const { - const char* const last_sep = strrchr(c_str(), kPathSeparator); - return last_sep ? FilePath(String(last_sep + 1)) : *this; -} - -// RemoveFileName returns the directory path with the filename removed. -// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". -// If the FilePath is "a_file" or "/a_file", RemoveFileName returns -// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does -// not have a file, like "just/a/dir/", it returns the FilePath unmodified. -// On Windows platform, '\' is the path separator, otherwise it is '/'. -FilePath FilePath::RemoveFileName() const { - const char* const last_sep = strrchr(c_str(), kPathSeparator); - String dir; - if (last_sep) { - dir = String(c_str(), last_sep + 1 - c_str()); - } else { - dir = kCurrentDirectoryString; - } - return FilePath(dir); -} - -// Helper functions for naming files in a directory for xml output. - -// Given directory = "dir", base_name = "test", number = 0, -// extension = "xml", returns "dir/test.xml". If number is greater -// than zero (e.g., 12), returns "dir/test_12.xml". -// On Windows platform, uses \ as the separator rather than /. -FilePath FilePath::MakeFileName(const FilePath& directory, - const FilePath& base_name, - int number, - const char* extension) { - String file; - if (number == 0) { - file = String::Format("%s.%s", base_name.c_str(), extension); - } else { - file = String::Format("%s_%d.%s", base_name.c_str(), number, extension); - } - return ConcatPaths(directory, FilePath(file)); -} - -// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". -// On Windows, uses \ as the separator rather than /. -FilePath FilePath::ConcatPaths(const FilePath& directory, - const FilePath& relative_path) { - if (directory.IsEmpty()) - return relative_path; - const FilePath dir(directory.RemoveTrailingPathSeparator()); - return FilePath(String::Format("%s%c%s", dir.c_str(), kPathSeparator, - relative_path.c_str())); -} - -// Returns true if pathname describes something findable in the file-system, -// either a file, directory, or whatever. -bool FilePath::FileOrDirectoryExists() const { -#if GTEST_OS_WINDOWS_MOBILE - LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str()); - const DWORD attributes = GetFileAttributes(unicode); - delete [] unicode; - return attributes != kInvalidFileAttributes; -#else - posix::StatStruct file_stat; - return posix::Stat(pathname_.c_str(), &file_stat) == 0; -#endif // GTEST_OS_WINDOWS_MOBILE -} - -// Returns true if pathname describes a directory in the file-system -// that exists. -bool FilePath::DirectoryExists() const { - bool result = false; -#if GTEST_OS_WINDOWS - // Don't strip off trailing separator if path is a root directory on - // Windows (like "C:\\"). - const FilePath& path(IsRootDirectory() ? *this : - RemoveTrailingPathSeparator()); -#else - const FilePath& path(*this); -#endif - -#if GTEST_OS_WINDOWS_MOBILE - LPCWSTR unicode = String::AnsiToUtf16(path.c_str()); - const DWORD attributes = GetFileAttributes(unicode); - delete [] unicode; - if ((attributes != kInvalidFileAttributes) && - (attributes & FILE_ATTRIBUTE_DIRECTORY)) { - result = true; - } -#else - posix::StatStruct file_stat; - result = posix::Stat(path.c_str(), &file_stat) == 0 && - posix::IsDir(file_stat); -#endif // GTEST_OS_WINDOWS_MOBILE - - return result; -} - -// Returns true if pathname describes a root directory. (Windows has one -// root directory per disk drive.) -bool FilePath::IsRootDirectory() const { -#if GTEST_OS_WINDOWS - // TODO(wan@google.com): on Windows a network share like - // \\server\share can be a root directory, although it cannot be the - // current directory. Handle this properly. - return pathname_.length() == 3 && IsAbsolutePath(); -#else - return pathname_ == kPathSeparatorString; -#endif -} - -// Returns true if pathname describes an absolute path. -bool FilePath::IsAbsolutePath() const { - const char* const name = pathname_.c_str(); -#if GTEST_OS_WINDOWS - return pathname_.length() >= 3 && - ((name[0] >= 'a' && name[0] <= 'z') || - (name[0] >= 'A' && name[0] <= 'Z')) && - name[1] == ':' && - name[2] == kPathSeparator; -#else - return name[0] == kPathSeparator; -#endif -} - -// Returns a pathname for a file that does not currently exist. The pathname -// will be directory/base_name.extension or -// directory/base_name_.extension if directory/base_name.extension -// already exists. The number will be incremented until a pathname is found -// that does not already exist. -// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. -// There could be a race condition if two or more processes are calling this -// function at the same time -- they could both pick the same filename. -FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, - const FilePath& base_name, - const char* extension) { - FilePath full_pathname; - int number = 0; - do { - full_pathname.Set(MakeFileName(directory, base_name, number++, extension)); - } while (full_pathname.FileOrDirectoryExists()); - return full_pathname; -} - -// Returns true if FilePath ends with a path separator, which indicates that -// it is intended to represent a directory. Returns false otherwise. -// This does NOT check that a directory (or file) actually exists. -bool FilePath::IsDirectory() const { - return pathname_.EndsWith(kPathSeparatorString); -} - -// Create directories so that path exists. Returns true if successful or if -// the directories already exist; returns false if unable to create directories -// for any reason. -bool FilePath::CreateDirectoriesRecursively() const { - if (!this->IsDirectory()) { - return false; - } - - if (pathname_.length() == 0 || this->DirectoryExists()) { - return true; - } - - const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); - return parent.CreateDirectoriesRecursively() && this->CreateFolder(); -} - -// Create the directory so that path exists. Returns true if successful or -// if the directory already exists; returns false if unable to create the -// directory for any reason, including if the parent directory does not -// exist. Not named "CreateDirectory" because that's a macro on Windows. -bool FilePath::CreateFolder() const { -#if GTEST_OS_WINDOWS_MOBILE - FilePath removed_sep(this->RemoveTrailingPathSeparator()); - LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str()); - int result = CreateDirectory(unicode, NULL) ? 0 : -1; - delete [] unicode; -#elif GTEST_OS_WINDOWS - int result = _mkdir(pathname_.c_str()); -#else - int result = mkdir(pathname_.c_str(), 0777); -#endif // GTEST_OS_WINDOWS_MOBILE - - if (result == -1) { - return this->DirectoryExists(); // An error is OK if the directory exists. - } - return true; // No error. -} - -// If input name has a trailing separator character, remove it and return the -// name, otherwise return the name string unmodified. -// On Windows platform, uses \ as the separator, other platforms use /. -FilePath FilePath::RemoveTrailingPathSeparator() const { - return pathname_.EndsWith(kPathSeparatorString) - ? FilePath(String(pathname_.c_str(), pathname_.length() - 1)) - : *this; -} - -// Normalize removes any redundant separators that might be in the pathname. -// For example, "bar///foo" becomes "bar/foo". Does not eliminate other -// redundancies that might be in a pathname involving "." or "..". -void FilePath::Normalize() { - if (pathname_.c_str() == NULL) { - pathname_ = ""; - return; - } - const char* src = pathname_.c_str(); - char* const dest = new char[pathname_.length() + 1]; - char* dest_ptr = dest; - memset(dest_ptr, 0, pathname_.length() + 1); - - while (*src != '\0') { - *dest_ptr++ = *src; - if (*src != kPathSeparator) - src++; - else - while (*src == kPathSeparator) - src++; - } - *dest_ptr = '\0'; - pathname_ = dest; - delete[] dest; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-internal-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-internal-inl.h deleted file mode 100644 index 47aec22d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-internal-inl.h +++ /dev/null @@ -1,1247 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Utility functions and classes used by the Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This file contains purely Google Test's internal implementation. Please -// DO NOT #INCLUDE IT IN A USER PROGRAM. - -#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_ -#define GTEST_SRC_GTEST_INTERNAL_INL_H_ - -// GTEST_IMPLEMENTATION_ is defined to 1 iff the current translation unit is -// part of Google Test's implementation; otherwise it's undefined. -#if !GTEST_IMPLEMENTATION_ -// A user is trying to include this from his code - just say no. -#error "gtest-internal-inl.h is part of Google Test's internal implementation." -#error "It must not be included except by Google Test itself." -#endif // GTEST_IMPLEMENTATION_ - -#ifndef _WIN32_WCE -#include -#endif // !_WIN32_WCE -#include -#include // For strtoll/_strtoul64/malloc/free. -#include // For memmove. - -#include - -#include - -#if GTEST_OS_WINDOWS -#include // For DWORD. -#endif // GTEST_OS_WINDOWS - -#include -#include - -namespace testing { - -// Declares the flags. -// -// We don't want the users to modify this flag in the code, but want -// Google Test's own unit tests to be able to access it. Therefore we -// declare it here as opposed to in gtest.h. -GTEST_DECLARE_bool_(death_test_use_fork); - -namespace internal { - -// The value of GetTestTypeId() as seen from within the Google Test -// library. This is solely for testing GetTestTypeId(). -extern const TypeId kTestTypeIdInGoogleTest; - -// Names of the flags (needed for parsing Google Test flags). -const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests"; -const char kBreakOnFailureFlag[] = "break_on_failure"; -const char kCatchExceptionsFlag[] = "catch_exceptions"; -const char kColorFlag[] = "color"; -const char kFilterFlag[] = "filter"; -const char kListTestsFlag[] = "list_tests"; -const char kOutputFlag[] = "output"; -const char kPrintTimeFlag[] = "print_time"; -const char kRandomSeedFlag[] = "random_seed"; -const char kRepeatFlag[] = "repeat"; -const char kShuffleFlag[] = "shuffle"; -const char kThrowOnFailureFlag[] = "throw_on_failure"; - -// A valid random seed must be in [1, kMaxRandomSeed]. -const int kMaxRandomSeed = 99999; - -// Returns the current time in milliseconds. -TimeInMillis GetTimeInMillis(); - -// Returns a random seed in range [1, kMaxRandomSeed] based on the -// given --gtest_random_seed flag value. -inline int GetRandomSeedFromFlag(Int32 random_seed_flag) { - const unsigned int raw_seed = (random_seed_flag == 0) ? - static_cast(GetTimeInMillis()) : - static_cast(random_seed_flag); - - // Normalizes the actual seed to range [1, kMaxRandomSeed] such that - // it's easy to type. - const int normalized_seed = - static_cast((raw_seed - 1U) % - static_cast(kMaxRandomSeed)) + 1; - return normalized_seed; -} - -// Returns the first valid random seed after 'seed'. The behavior is -// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is -// considered to be 1. -inline int GetNextRandomSeed(int seed) { - GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed) - << "Invalid random seed " << seed << " - must be in [1, " - << kMaxRandomSeed << "]."; - const int next_seed = seed + 1; - return (next_seed > kMaxRandomSeed) ? 1 : next_seed; -} - -// This class saves the values of all Google Test flags in its c'tor, and -// restores them in its d'tor. -class GTestFlagSaver { - public: - // The c'tor. - GTestFlagSaver() { - also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests); - break_on_failure_ = GTEST_FLAG(break_on_failure); - catch_exceptions_ = GTEST_FLAG(catch_exceptions); - color_ = GTEST_FLAG(color); - death_test_style_ = GTEST_FLAG(death_test_style); - death_test_use_fork_ = GTEST_FLAG(death_test_use_fork); - filter_ = GTEST_FLAG(filter); - internal_run_death_test_ = GTEST_FLAG(internal_run_death_test); - list_tests_ = GTEST_FLAG(list_tests); - output_ = GTEST_FLAG(output); - print_time_ = GTEST_FLAG(print_time); - random_seed_ = GTEST_FLAG(random_seed); - repeat_ = GTEST_FLAG(repeat); - shuffle_ = GTEST_FLAG(shuffle); - throw_on_failure_ = GTEST_FLAG(throw_on_failure); - } - - // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS. - ~GTestFlagSaver() { - GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_; - GTEST_FLAG(break_on_failure) = break_on_failure_; - GTEST_FLAG(catch_exceptions) = catch_exceptions_; - GTEST_FLAG(color) = color_; - GTEST_FLAG(death_test_style) = death_test_style_; - GTEST_FLAG(death_test_use_fork) = death_test_use_fork_; - GTEST_FLAG(filter) = filter_; - GTEST_FLAG(internal_run_death_test) = internal_run_death_test_; - GTEST_FLAG(list_tests) = list_tests_; - GTEST_FLAG(output) = output_; - GTEST_FLAG(print_time) = print_time_; - GTEST_FLAG(random_seed) = random_seed_; - GTEST_FLAG(repeat) = repeat_; - GTEST_FLAG(shuffle) = shuffle_; - GTEST_FLAG(throw_on_failure) = throw_on_failure_; - } - private: - // Fields for saving the original values of flags. - bool also_run_disabled_tests_; - bool break_on_failure_; - bool catch_exceptions_; - String color_; - String death_test_style_; - bool death_test_use_fork_; - String filter_; - String internal_run_death_test_; - bool list_tests_; - String output_; - bool print_time_; - bool pretty_; - internal::Int32 random_seed_; - internal::Int32 repeat_; - bool shuffle_; - bool throw_on_failure_; -} GTEST_ATTRIBUTE_UNUSED_; - -// Converts a Unicode code point to a narrow string in UTF-8 encoding. -// code_point parameter is of type UInt32 because wchar_t may not be -// wide enough to contain a code point. -// The output buffer str must containt at least 32 characters. -// The function returns the address of the output buffer. -// If the code_point is not a valid Unicode code point -// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. -char* CodePointToUtf8(UInt32 code_point, char* str); - -// Converts a wide string to a narrow string in UTF-8 encoding. -// The wide string is assumed to have the following encoding: -// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) -// UTF-32 if sizeof(wchar_t) == 4 (on Linux) -// Parameter str points to a null-terminated wide string. -// Parameter num_chars may additionally limit the number -// of wchar_t characters processed. -1 is used when the entire string -// should be processed. -// If the string contains code points that are not valid Unicode code points -// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding -// and contains invalid UTF-16 surrogate pairs, values in those pairs -// will be encoded as individual Unicode characters from Basic Normal Plane. -String WideStringToUtf8(const wchar_t* str, int num_chars); - -// Returns the number of active threads, or 0 when there is an error. -size_t GetThreadCount(); - -// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file -// if the variable is present. If a file already exists at this location, this -// function will write over it. If the variable is present, but the file cannot -// be created, prints an error and exits. -void WriteToShardStatusFileIfNeeded(); - -// Checks whether sharding is enabled by examining the relevant -// environment variable values. If the variables are present, -// but inconsistent (e.g., shard_index >= total_shards), prints -// an error and exits. If in_subprocess_for_death_test, sharding is -// disabled because it must only be applied to the original test -// process. Otherwise, we could filter out death tests we intended to execute. -bool ShouldShard(const char* total_shards_str, const char* shard_index_str, - bool in_subprocess_for_death_test); - -// Parses the environment variable var as an Int32. If it is unset, -// returns default_val. If it is not an Int32, prints an error and -// and aborts. -Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val); - -// Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is -// some arbitrary but unique non-negative integer assigned to each test -// method. Assumes that 0 <= shard_index < total_shards. -bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id); - -// Vector is an ordered container that supports random access to the -// elements. -// -// We cannot use std::vector, as Visual C++ 7.1's implementation of -// STL has problems compiling when exceptions are disabled. There is -// a hack to work around the problems, but we've seen cases where the -// hack fails to work. -// -// The element type must support copy constructor and operator=. -template // E is the element type. -class Vector { - public: - // Creates an empty Vector. - Vector() : elements_(NULL), capacity_(0), size_(0) {} - - // D'tor. - virtual ~Vector() { Clear(); } - - // Clears the Vector. - void Clear() { - if (elements_ != NULL) { - for (int i = 0; i < size_; i++) { - delete elements_[i]; - } - - free(elements_); - elements_ = NULL; - capacity_ = size_ = 0; - } - } - - // Gets the number of elements. - int size() const { return size_; } - - // Adds an element to the end of the Vector. A copy of the element - // is created using the copy constructor, and then stored in the - // Vector. Changes made to the element in the Vector doesn't affect - // the source object, and vice versa. - void PushBack(const E& element) { Insert(element, size_); } - - // Adds an element to the beginning of this Vector. - void PushFront(const E& element) { Insert(element, 0); } - - // Removes an element from the beginning of this Vector. If the - // result argument is not NULL, the removed element is stored in the - // memory it points to. Otherwise the element is thrown away. - // Returns true iff the vector wasn't empty before the operation. - bool PopFront(E* result) { - if (size_ == 0) - return false; - - if (result != NULL) - *result = GetElement(0); - - Erase(0); - return true; - } - - // Inserts an element at the given index. It's the caller's - // responsibility to ensure that the given index is in the range [0, - // size()]. - void Insert(const E& element, int index) { - GrowIfNeeded(); - MoveElements(index, size_ - index, index + 1); - elements_[index] = new E(element); - size_++; - } - - // Erases the element at the specified index, or aborts the program if the - // index is not in range [0, size()). - void Erase(int index) { - GTEST_CHECK_(0 <= index && index < size_) - << "Invalid Vector index " << index << ": must be in range [0, " - << (size_ - 1) << "]."; - - delete elements_[index]; - MoveElements(index + 1, size_ - index - 1, index); - size_--; - } - - // Returns the number of elements that satisfy a given predicate. - // The parameter 'predicate' is a Boolean function or functor that - // accepts a 'const E &', where E is the element type. - template // P is the type of the predicate function/functor - int CountIf(P predicate) const { - int count = 0; - for (int i = 0; i < size_; i++) { - if (predicate(*(elements_[i]))) { - count++; - } - } - - return count; - } - - // Applies a function/functor to each element in the Vector. The - // parameter 'functor' is a function/functor that accepts a 'const - // E &', where E is the element type. This method does not change - // the elements. - template // F is the type of the function/functor - void ForEach(F functor) const { - for (int i = 0; i < size_; i++) { - functor(*(elements_[i])); - } - } - - // Returns the first node whose element satisfies a given predicate, - // or NULL if none is found. The parameter 'predicate' is a - // function/functor that accepts a 'const E &', where E is the - // element type. This method does not change the elements. - template // P is the type of the predicate function/functor. - const E* FindIf(P predicate) const { - for (int i = 0; i < size_; i++) { - if (predicate(*elements_[i])) { - return elements_[i]; - } - } - return NULL; - } - - template - E* FindIf(P predicate) { - for (int i = 0; i < size_; i++) { - if (predicate(*elements_[i])) { - return elements_[i]; - } - } - return NULL; - } - - // Returns the i-th element of the Vector, or aborts the program if i - // is not in range [0, size()). - const E& GetElement(int i) const { - GTEST_CHECK_(0 <= i && i < size_) - << "Invalid Vector index " << i << ": must be in range [0, " - << (size_ - 1) << "]."; - - return *(elements_[i]); - } - - // Returns a mutable reference to the i-th element of the Vector, or - // aborts the program if i is not in range [0, size()). - E& GetMutableElement(int i) { - GTEST_CHECK_(0 <= i && i < size_) - << "Invalid Vector index " << i << ": must be in range [0, " - << (size_ - 1) << "]."; - - return *(elements_[i]); - } - - // Returns the i-th element of the Vector, or default_value if i is not - // in range [0, size()). - E GetElementOr(int i, E default_value) const { - return (i < 0 || i >= size_) ? default_value : *(elements_[i]); - } - - // Swaps the i-th and j-th elements of the Vector. Crashes if i or - // j is invalid. - void Swap(int i, int j) { - GTEST_CHECK_(0 <= i && i < size_) - << "Invalid first swap element " << i << ": must be in range [0, " - << (size_ - 1) << "]."; - GTEST_CHECK_(0 <= j && j < size_) - << "Invalid second swap element " << j << ": must be in range [0, " - << (size_ - 1) << "]."; - - E* const temp = elements_[i]; - elements_[i] = elements_[j]; - elements_[j] = temp; - } - - // Performs an in-place shuffle of a range of this Vector's nodes. - // 'begin' and 'end' are element indices as an STL-style range; - // i.e. [begin, end) are shuffled, where 'end' == size() means to - // shuffle to the end of the Vector. - void ShuffleRange(internal::Random* random, int begin, int end) { - GTEST_CHECK_(0 <= begin && begin <= size_) - << "Invalid shuffle range start " << begin << ": must be in range [0, " - << size_ << "]."; - GTEST_CHECK_(begin <= end && end <= size_) - << "Invalid shuffle range finish " << end << ": must be in range [" - << begin << ", " << size_ << "]."; - - // Fisher-Yates shuffle, from - // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle - for (int range_width = end - begin; range_width >= 2; range_width--) { - const int last_in_range = begin + range_width - 1; - const int selected = begin + random->Generate(range_width); - Swap(selected, last_in_range); - } - } - - // Performs an in-place shuffle of this Vector's nodes. - void Shuffle(internal::Random* random) { - ShuffleRange(random, 0, size()); - } - - // Returns a copy of this Vector. - Vector* Clone() const { - Vector* const clone = new Vector; - clone->Reserve(size_); - for (int i = 0; i < size_; i++) { - clone->PushBack(GetElement(i)); - } - return clone; - } - - private: - // Makes sure this Vector's capacity is at least the given value. - void Reserve(int new_capacity) { - if (new_capacity <= capacity_) - return; - - capacity_ = new_capacity; - elements_ = static_cast( - realloc(elements_, capacity_*sizeof(elements_[0]))); - } - - // Grows the buffer if it is not big enough to hold one more element. - void GrowIfNeeded() { - if (size_ < capacity_) - return; - - // Exponential bump-up is necessary to ensure that inserting N - // elements is O(N) instead of O(N^2). The factor 3/2 means that - // no more than 1/3 of the slots are wasted. - const int new_capacity = 3*(capacity_/2 + 1); - GTEST_CHECK_(new_capacity > capacity_) // Does the new capacity overflow? - << "Cannot grow a Vector with " << capacity_ << " elements already."; - Reserve(new_capacity); - } - - // Moves the give consecutive elements to a new index in the Vector. - void MoveElements(int source, int count, int dest) { - memmove(elements_ + dest, elements_ + source, count*sizeof(elements_[0])); - } - - E** elements_; - int capacity_; // The number of elements allocated for elements_. - int size_; // The number of elements; in the range [0, capacity_]. - - // We disallow copying Vector. - GTEST_DISALLOW_COPY_AND_ASSIGN_(Vector); -}; // class Vector - -// A function for deleting an object. Handy for being used as a -// functor. -template -static void Delete(T * x) { - delete x; -} - -// A predicate that checks the key of a TestProperty against a known key. -// -// TestPropertyKeyIs is copyable. -class TestPropertyKeyIs { - public: - // Constructor. - // - // TestPropertyKeyIs has NO default constructor. - explicit TestPropertyKeyIs(const char* key) - : key_(key) {} - - // Returns true iff the test name of test property matches on key_. - bool operator()(const TestProperty& test_property) const { - return String(test_property.key()).Compare(key_) == 0; - } - - private: - String key_; -}; - -class TestInfoImpl { - public: - TestInfoImpl(TestInfo* parent, const char* test_case_name, - const char* name, const char* test_case_comment, - const char* comment, TypeId fixture_class_id, - internal::TestFactoryBase* factory); - ~TestInfoImpl(); - - // Returns true if this test should run. - bool should_run() const { return should_run_; } - - // Sets the should_run member. - void set_should_run(bool should) { should_run_ = should; } - - // Returns true if this test is disabled. Disabled tests are not run. - bool is_disabled() const { return is_disabled_; } - - // Sets the is_disabled member. - void set_is_disabled(bool is) { is_disabled_ = is; } - - // Returns true if this test matches the filter specified by the user. - bool matches_filter() const { return matches_filter_; } - - // Sets the matches_filter member. - void set_matches_filter(bool matches) { matches_filter_ = matches; } - - // Returns the test case name. - const char* test_case_name() const { return test_case_name_.c_str(); } - - // Returns the test name. - const char* name() const { return name_.c_str(); } - - // Returns the test case comment. - const char* test_case_comment() const { return test_case_comment_.c_str(); } - - // Returns the test comment. - const char* comment() const { return comment_.c_str(); } - - // Returns the ID of the test fixture class. - TypeId fixture_class_id() const { return fixture_class_id_; } - - // Returns the test result. - TestResult* result() { return &result_; } - const TestResult* result() const { return &result_; } - - // Creates the test object, runs it, records its result, and then - // deletes it. - void Run(); - - // Clears the test result. - void ClearResult() { result_.Clear(); } - - // Clears the test result in the given TestInfo object. - static void ClearTestResult(TestInfo * test_info) { - test_info->impl()->ClearResult(); - } - - private: - // These fields are immutable properties of the test. - TestInfo* const parent_; // The owner of this object - const String test_case_name_; // Test case name - const String name_; // Test name - const String test_case_comment_; // Test case comment - const String comment_; // Test comment - const TypeId fixture_class_id_; // ID of the test fixture class - bool should_run_; // True iff this test should run - bool is_disabled_; // True iff this test is disabled - bool matches_filter_; // True if this test matches the - // user-specified filter. - internal::TestFactoryBase* const factory_; // The factory that creates - // the test object - - // This field is mutable and needs to be reset before running the - // test for the second time. - TestResult result_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfoImpl); -}; - -// Class UnitTestOptions. -// -// This class contains functions for processing options the user -// specifies when running the tests. It has only static members. -// -// In most cases, the user can specify an option using either an -// environment variable or a command line flag. E.g. you can set the -// test filter using either GTEST_FILTER or --gtest_filter. If both -// the variable and the flag are present, the latter overrides the -// former. -class UnitTestOptions { - public: - // Functions for processing the gtest_output flag. - - // Returns the output format, or "" for normal printed output. - static String GetOutputFormat(); - - // Returns the absolute path of the requested output file, or the - // default (test_detail.xml in the original working directory) if - // none was explicitly specified. - static String GetAbsolutePathToOutputFile(); - - // Functions for processing the gtest_filter flag. - - // Returns true iff the wildcard pattern matches the string. The - // first ':' or '\0' character in pattern marks the end of it. - // - // This recursive algorithm isn't very efficient, but is clear and - // works well enough for matching test names, which are short. - static bool PatternMatchesString(const char *pattern, const char *str); - - // Returns true iff the user-specified filter matches the test case - // name and the test name. - static bool FilterMatchesTest(const String &test_case_name, - const String &test_name); - -#if GTEST_OS_WINDOWS - // Function for supporting the gtest_catch_exception flag. - - // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the - // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. - // This function is useful as an __except condition. - static int GTestShouldProcessSEH(DWORD exception_code); -#endif // GTEST_OS_WINDOWS - - // Returns true if "name" matches the ':' separated list of glob-style - // filters in "filter". - static bool MatchesFilter(const String& name, const char* filter); -}; - -// Returns the current application's name, removing directory path if that -// is present. Used by UnitTestOptions::GetOutputFile. -FilePath GetCurrentExecutableName(); - -// The role interface for getting the OS stack trace as a string. -class OsStackTraceGetterInterface { - public: - OsStackTraceGetterInterface() {} - virtual ~OsStackTraceGetterInterface() {} - - // Returns the current OS stack trace as a String. Parameters: - // - // max_depth - the maximum number of stack frames to be included - // in the trace. - // skip_count - the number of top frames to be skipped; doesn't count - // against max_depth. - virtual String CurrentStackTrace(int max_depth, int skip_count) = 0; - - // UponLeavingGTest() should be called immediately before Google Test calls - // user code. It saves some information about the current stack that - // CurrentStackTrace() will use to find and hide Google Test stack frames. - virtual void UponLeavingGTest() = 0; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface); -}; - -// A working implementation of the OsStackTraceGetterInterface interface. -class OsStackTraceGetter : public OsStackTraceGetterInterface { - public: - OsStackTraceGetter() : caller_frame_(NULL) {} - virtual String CurrentStackTrace(int max_depth, int skip_count); - virtual void UponLeavingGTest(); - - // This string is inserted in place of stack frames that are part of - // Google Test's implementation. - static const char* const kElidedFramesMarker; - - private: - Mutex mutex_; // protects all internal state - - // We save the stack frame below the frame that calls user code. - // We do this because the address of the frame immediately below - // the user code changes between the call to UponLeavingGTest() - // and any calls to CurrentStackTrace() from within the user code. - void* caller_frame_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter); -}; - -// Information about a Google Test trace point. -struct TraceInfo { - const char* file; - int line; - String message; -}; - -// This is the default global test part result reporter used in UnitTestImpl. -// This class should only be used by UnitTestImpl. -class DefaultGlobalTestPartResultReporter - : public TestPartResultReporterInterface { - public: - explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. Reports the test part - // result in the current test. - virtual void ReportTestPartResult(const TestPartResult& result); - - private: - UnitTestImpl* const unit_test_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter); -}; - -// This is the default per thread test part result reporter used in -// UnitTestImpl. This class should only be used by UnitTestImpl. -class DefaultPerThreadTestPartResultReporter - : public TestPartResultReporterInterface { - public: - explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. The implementation just - // delegates to the current global test part result reporter of *unit_test_. - virtual void ReportTestPartResult(const TestPartResult& result); - - private: - UnitTestImpl* const unit_test_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter); -}; - -// The private implementation of the UnitTest class. We don't protect -// the methods under a mutex, as this class is not accessible by a -// user and the UnitTest class that delegates work to this class does -// proper locking. -class UnitTestImpl { - public: - explicit UnitTestImpl(UnitTest* parent); - virtual ~UnitTestImpl(); - - // There are two different ways to register your own TestPartResultReporter. - // You can register your own repoter to listen either only for test results - // from the current thread or for results from all threads. - // By default, each per-thread test result repoter just passes a new - // TestPartResult to the global test result reporter, which registers the - // test part result for the currently running test. - - // Returns the global test part result reporter. - TestPartResultReporterInterface* GetGlobalTestPartResultReporter(); - - // Sets the global test part result reporter. - void SetGlobalTestPartResultReporter( - TestPartResultReporterInterface* reporter); - - // Returns the test part result reporter for the current thread. - TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread(); - - // Sets the test part result reporter for the current thread. - void SetTestPartResultReporterForCurrentThread( - TestPartResultReporterInterface* reporter); - - // Gets the number of successful test cases. - int successful_test_case_count() const; - - // Gets the number of failed test cases. - int failed_test_case_count() const; - - // Gets the number of all test cases. - int total_test_case_count() const; - - // Gets the number of all test cases that contain at least one test - // that should run. - int test_case_to_run_count() const; - - // Gets the number of successful tests. - int successful_test_count() const; - - // Gets the number of failed tests. - int failed_test_count() const; - - // Gets the number of disabled tests. - int disabled_test_count() const; - - // Gets the number of all tests. - int total_test_count() const; - - // Gets the number of tests that should run. - int test_to_run_count() const; - - // Gets the elapsed time, in milliseconds. - TimeInMillis elapsed_time() const { return elapsed_time_; } - - // Returns true iff the unit test passed (i.e. all test cases passed). - bool Passed() const { return !Failed(); } - - // Returns true iff the unit test failed (i.e. some test case failed - // or something outside of all tests failed). - bool Failed() const { - return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed(); - } - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - const TestCase* GetTestCase(int i) const { - const int index = test_case_indices_.GetElementOr(i, -1); - return index < 0 ? NULL : test_cases_.GetElement(i); - } - - // Gets the i-th test case among all the test cases. i can range from 0 to - // total_test_case_count() - 1. If i is not in that range, returns NULL. - TestCase* GetMutableTestCase(int i) { - const int index = test_case_indices_.GetElementOr(i, -1); - return index < 0 ? NULL : test_cases_.GetElement(index); - } - - // Provides access to the event listener list. - TestEventListeners* listeners() { return &listeners_; } - - // Returns the TestResult for the test that's currently running, or - // the TestResult for the ad hoc test if no test is running. - TestResult* current_test_result(); - - // Returns the TestResult for the ad hoc test. - const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; } - - // Sets the OS stack trace getter. - // - // Does nothing if the input and the current OS stack trace getter - // are the same; otherwise, deletes the old getter and makes the - // input the current getter. - void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter); - - // Returns the current OS stack trace getter if it is not NULL; - // otherwise, creates an OsStackTraceGetter, makes it the current - // getter, and returns it. - OsStackTraceGetterInterface* os_stack_trace_getter(); - - // Returns the current OS stack trace as a String. - // - // The maximum number of stack frames to be included is specified by - // the gtest_stack_trace_depth flag. The skip_count parameter - // specifies the number of top frames to be skipped, which doesn't - // count against the number of frames to be included. - // - // For example, if Foo() calls Bar(), which in turn calls - // CurrentOsStackTraceExceptTop(1), Foo() will be included in the - // trace but Bar() and CurrentOsStackTraceExceptTop() won't. - String CurrentOsStackTraceExceptTop(int skip_count); - - // Finds and returns a TestCase with the given name. If one doesn't - // exist, creates one and returns it. - // - // Arguments: - // - // test_case_name: name of the test case - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - TestCase* GetTestCase(const char* test_case_name, - const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc); - - // Adds a TestInfo to the unit test. - // - // Arguments: - // - // set_up_tc: pointer to the function that sets up the test case - // tear_down_tc: pointer to the function that tears down the test case - // test_info: the TestInfo object - void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc, - TestInfo * test_info) { - // In order to support thread-safe death tests, we need to - // remember the original working directory when the test program - // was first invoked. We cannot do this in RUN_ALL_TESTS(), as - // the user may have changed the current directory before calling - // RUN_ALL_TESTS(). Therefore we capture the current directory in - // AddTestInfo(), which is called to register a TEST or TEST_F - // before main() is reached. - if (original_working_dir_.IsEmpty()) { - original_working_dir_.Set(FilePath::GetCurrentDir()); - GTEST_CHECK_(!original_working_dir_.IsEmpty()) - << "Failed to get the current working directory."; - } - - GetTestCase(test_info->test_case_name(), - test_info->test_case_comment(), - set_up_tc, - tear_down_tc)->AddTestInfo(test_info); - } - -#if GTEST_HAS_PARAM_TEST - // Returns ParameterizedTestCaseRegistry object used to keep track of - // value-parameterized tests and instantiate and register them. - internal::ParameterizedTestCaseRegistry& parameterized_test_registry() { - return parameterized_test_registry_; - } -#endif // GTEST_HAS_PARAM_TEST - - // Sets the TestCase object for the test that's currently running. - void set_current_test_case(TestCase* current_test_case) { - current_test_case_ = current_test_case; - } - - // Sets the TestInfo object for the test that's currently running. If - // current_test_info is NULL, the assertion results will be stored in - // ad_hoc_test_result_. - void set_current_test_info(TestInfo* current_test_info) { - current_test_info_ = current_test_info; - } - - // Registers all parameterized tests defined using TEST_P and - // INSTANTIATE_TEST_P, creating regular tests for each test/parameter - // combination. This method can be called more then once; it has - // guards protecting from registering the tests more then once. - // If value-parameterized tests are disabled, RegisterParameterizedTests - // is present but does nothing. - void RegisterParameterizedTests(); - - // Runs all tests in this UnitTest object, prints the result, and - // returns 0 if all tests are successful, or 1 otherwise. If any - // exception is thrown during a test on Windows, this test is - // considered to be failed, but the rest of the tests will still be - // run. (We disable exceptions on Linux and Mac OS X, so the issue - // doesn't apply there.) - int RunAllTests(); - - // Clears the results of all tests, including the ad hoc test. - void ClearResult() { - test_cases_.ForEach(TestCase::ClearTestCaseResult); - ad_hoc_test_result_.Clear(); - } - - enum ReactionToSharding { - HONOR_SHARDING_PROTOCOL, - IGNORE_SHARDING_PROTOCOL - }; - - // Matches the full name of each test against the user-specified - // filter to decide whether the test should run, then records the - // result in each TestCase and TestInfo object. - // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests - // based on sharding variables in the environment. - // Returns the number of tests that should run. - int FilterTests(ReactionToSharding shard_tests); - - // Prints the names of the tests matching the user-specified filter flag. - void ListTestsMatchingFilter(); - - const TestCase* current_test_case() const { return current_test_case_; } - TestInfo* current_test_info() { return current_test_info_; } - const TestInfo* current_test_info() const { return current_test_info_; } - - // Returns the vector of environments that need to be set-up/torn-down - // before/after the tests are run. - internal::Vector* environments() { return &environments_; } - internal::Vector* environments_in_reverse_order() { - return &environments_in_reverse_order_; - } - - // Getters for the per-thread Google Test trace stack. - internal::Vector* gtest_trace_stack() { - return gtest_trace_stack_.pointer(); - } - const internal::Vector* gtest_trace_stack() const { - return gtest_trace_stack_.pointer(); - } - -#if GTEST_HAS_DEATH_TEST - void InitDeathTestSubprocessControlInfo() { - internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag()); - } - // Returns a pointer to the parsed --gtest_internal_run_death_test - // flag, or NULL if that flag was not specified. - // This information is useful only in a death test child process. - // Must not be called before a call to InitGoogleTest. - const InternalRunDeathTestFlag* internal_run_death_test_flag() const { - return internal_run_death_test_flag_.get(); - } - - // Returns a pointer to the current death test factory. - internal::DeathTestFactory* death_test_factory() { - return death_test_factory_.get(); - } - - void SuppressTestEventsIfInSubprocess(); - - friend class ReplaceDeathTestFactory; -#endif // GTEST_HAS_DEATH_TEST - - // Initializes the event listener performing XML output as specified by - // UnitTestOptions. Must not be called before InitGoogleTest. - void ConfigureXmlOutput(); - - // Performs initialization dependent upon flag values obtained in - // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to - // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest - // this function is also called from RunAllTests. Since this function can be - // called more than once, it has to be idempotent. - void PostFlagParsingInit(); - - // Gets the random seed used at the start of the current test iteration. - int random_seed() const { return random_seed_; } - - // Gets the random number generator. - internal::Random* random() { return &random_; } - - // Shuffles all test cases, and the tests within each test case, - // making sure that death tests are still run first. - void ShuffleTests(); - - // Restores the test cases and tests to their order before the first shuffle. - void UnshuffleTests(); - - private: - friend class ::testing::UnitTest; - - // The UnitTest object that owns this implementation object. - UnitTest* const parent_; - - // The working directory when the first TEST() or TEST_F() was - // executed. - internal::FilePath original_working_dir_; - - // The default test part result reporters. - DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_; - DefaultPerThreadTestPartResultReporter - default_per_thread_test_part_result_reporter_; - - // Points to (but doesn't own) the global test part result reporter. - TestPartResultReporterInterface* global_test_part_result_repoter_; - - // Protects read and write access to global_test_part_result_reporter_. - internal::Mutex global_test_part_result_reporter_mutex_; - - // Points to (but doesn't own) the per-thread test part result reporter. - internal::ThreadLocal - per_thread_test_part_result_reporter_; - - // The vector of environments that need to be set-up/torn-down - // before/after the tests are run. environments_in_reverse_order_ - // simply mirrors environments_ in reverse order. - internal::Vector environments_; - internal::Vector environments_in_reverse_order_; - - // The vector of TestCases in their original order. It owns the - // elements in the vector. - internal::Vector test_cases_; - - // Provides a level of indirection for the test case list to allow - // easy shuffling and restoring the test case order. The i-th - // element of this vector is the index of the i-th test case in the - // shuffled order. - internal::Vector test_case_indices_; - -#if GTEST_HAS_PARAM_TEST - // ParameterizedTestRegistry object used to register value-parameterized - // tests. - internal::ParameterizedTestCaseRegistry parameterized_test_registry_; - - // Indicates whether RegisterParameterizedTests() has been called already. - bool parameterized_tests_registered_; -#endif // GTEST_HAS_PARAM_TEST - - // Index of the last death test case registered. Initially -1. - int last_death_test_case_; - - // This points to the TestCase for the currently running test. It - // changes as Google Test goes through one test case after another. - // When no test is running, this is set to NULL and Google Test - // stores assertion results in ad_hoc_test_result_. Initially NULL. - TestCase* current_test_case_; - - // This points to the TestInfo for the currently running test. It - // changes as Google Test goes through one test after another. When - // no test is running, this is set to NULL and Google Test stores - // assertion results in ad_hoc_test_result_. Initially NULL. - TestInfo* current_test_info_; - - // Normally, a user only writes assertions inside a TEST or TEST_F, - // or inside a function called by a TEST or TEST_F. Since Google - // Test keeps track of which test is current running, it can - // associate such an assertion with the test it belongs to. - // - // If an assertion is encountered when no TEST or TEST_F is running, - // Google Test attributes the assertion result to an imaginary "ad hoc" - // test, and records the result in ad_hoc_test_result_. - TestResult ad_hoc_test_result_; - - // The list of event listeners that can be used to track events inside - // Google Test. - TestEventListeners listeners_; - - // The OS stack trace getter. Will be deleted when the UnitTest - // object is destructed. By default, an OsStackTraceGetter is used, - // but the user can set this field to use a custom getter if that is - // desired. - OsStackTraceGetterInterface* os_stack_trace_getter_; - - // True iff PostFlagParsingInit() has been called. - bool post_flag_parse_init_performed_; - - // The random number seed used at the beginning of the test run. - int random_seed_; - - // Our random number generator. - internal::Random random_; - - // How long the test took to run, in milliseconds. - TimeInMillis elapsed_time_; - -#if GTEST_HAS_DEATH_TEST - // The decomposed components of the gtest_internal_run_death_test flag, - // parsed when RUN_ALL_TESTS is called. - internal::scoped_ptr internal_run_death_test_flag_; - internal::scoped_ptr death_test_factory_; -#endif // GTEST_HAS_DEATH_TEST - - // A per-thread stack of traces created by the SCOPED_TRACE() macro. - internal::ThreadLocal > gtest_trace_stack_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl); -}; // class UnitTestImpl - -// Convenience function for accessing the global UnitTest -// implementation object. -inline UnitTestImpl* GetUnitTestImpl() { - return UnitTest::GetInstance()->impl(); -} - -// Internal helper functions for implementing the simple regular -// expression matcher. -bool IsInSet(char ch, const char* str); -bool IsDigit(char ch); -bool IsPunct(char ch); -bool IsRepeat(char ch); -bool IsWhiteSpace(char ch); -bool IsWordChar(char ch); -bool IsValidEscape(char ch); -bool AtomMatchesChar(bool escaped, char pattern, char ch); -bool ValidateRegex(const char* regex); -bool MatchRegexAtHead(const char* regex, const char* str); -bool MatchRepetitionAndRegexAtHead( - bool escaped, char ch, char repeat, const char* regex, const char* str); -bool MatchRegexAnywhere(const char* regex, const char* str); - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. -void ParseGoogleTestFlagsOnly(int* argc, char** argv); -void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv); - -#if GTEST_HAS_DEATH_TEST - -// Returns the message describing the last system error, regardless of the -// platform. -String GetLastErrnoDescription(); - -#if GTEST_OS_WINDOWS -// Provides leak-safe Windows kernel handle ownership. -class AutoHandle { - public: - AutoHandle() : handle_(INVALID_HANDLE_VALUE) {} - explicit AutoHandle(HANDLE handle) : handle_(handle) {} - - ~AutoHandle() { Reset(); } - - HANDLE Get() const { return handle_; } - void Reset() { Reset(INVALID_HANDLE_VALUE); } - void Reset(HANDLE handle) { - if (handle != handle_) { - if (handle_ != INVALID_HANDLE_VALUE) - ::CloseHandle(handle_); - handle_ = handle; - } - } - - private: - HANDLE handle_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle); -}; -#endif // GTEST_OS_WINDOWS - -// Attempts to parse a string into a positive integer pointed to by the -// number parameter. Returns true if that is possible. -// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use -// it here. -template -bool ParseNaturalNumber(const ::std::string& str, Integer* number) { - // Fail fast if the given string does not begin with a digit; - // this bypasses strtoXXX's "optional leading whitespace and plus - // or minus sign" semantics, which are undesirable here. - if (str.empty() || !isdigit(str[0])) { - return false; - } - errno = 0; - - char* end; - // BiggestConvertible is the largest integer type that system-provided - // string-to-number conversion routines can return. -#if GTEST_OS_WINDOWS && !defined(__GNUC__) - // MSVC and C++ Builder define __int64 instead of the standard long long. - typedef unsigned __int64 BiggestConvertible; - const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10); -#else - typedef unsigned long long BiggestConvertible; // NOLINT - const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10); -#endif // GTEST_OS_WINDOWS && !defined(__GNUC__) - const bool parse_success = *end == '\0' && errno == 0; - - // TODO(vladl@google.com): Convert this to compile time assertion when it is - // available. - GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); - - const Integer result = static_cast(parsed); - if (parse_success && static_cast(result) == parsed) { - *number = result; - return true; - } - return false; -} -#endif // GTEST_HAS_DEATH_TEST - -// TestResult contains some private methods that should be hidden from -// Google Test user but are required for testing. This class allow our tests -// to access them. -class TestResultAccessor { - public: - static void RecordProperty(TestResult* test_result, - const TestProperty& property) { - test_result->RecordProperty(property); - } - - static void ClearTestPartResults(TestResult* test_result) { - test_result->ClearTestPartResults(); - } - - static const Vector& test_part_results( - const TestResult& test_result) { - return test_result.test_part_results(); - } -}; - -} // namespace internal -} // namespace testing - -#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-port.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-port.cc deleted file mode 100644 index de169e2a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-port.cc +++ /dev/null @@ -1,680 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include -#include -#include - -#if GTEST_OS_WINDOWS_MOBILE -#include // For TerminateProcess() -#elif GTEST_OS_WINDOWS -#include -#include -#else -#include -#endif // GTEST_OS_WINDOWS_MOBILE - -#if GTEST_OS_MAC -#include -#include -#include -#endif // GTEST_OS_MAC - -#include -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { - -#if defined(_MSC_VER) || defined(__BORLANDC__) -// MSVC and C++Builder do not provide a definition of STDERR_FILENO. -const int kStdErrFileno = 2; -#else -const int kStdErrFileno = STDERR_FILENO; -#endif // _MSC_VER - -#if GTEST_OS_MAC - -// Returns the number of threads running in the process, or 0 to indicate that -// we cannot detect it. -size_t GetThreadCount() { - const task_t task = mach_task_self(); - mach_msg_type_number_t thread_count; - thread_act_array_t thread_list; - const kern_return_t status = task_threads(task, &thread_list, &thread_count); - if (status == KERN_SUCCESS) { - // task_threads allocates resources in thread_list and we need to free them - // to avoid leaks. - vm_deallocate(task, - reinterpret_cast(thread_list), - sizeof(thread_t) * thread_count); - return static_cast(thread_count); - } else { - return 0; - } -} - -#else - -size_t GetThreadCount() { - // There's no portable way to detect the number of threads, so we just - // return 0 to indicate that we cannot detect it. - return 0; -} - -#endif // GTEST_OS_MAC - -#if GTEST_USES_POSIX_RE - -// Implements RE. Currently only needed for death tests. - -RE::~RE() { - regfree(&partial_regex_); - regfree(&full_regex_); - free(const_cast(pattern_)); -} - -// Returns true iff regular expression re matches the entire str. -bool RE::FullMatch(const char* str, const RE& re) { - if (!re.is_valid_) return false; - - regmatch_t match; - return regexec(&re.full_regex_, str, 1, &match, 0) == 0; -} - -// Returns true iff regular expression re matches a substring of str -// (including str itself). -bool RE::PartialMatch(const char* str, const RE& re) { - if (!re.is_valid_) return false; - - regmatch_t match; - return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; -} - -// Initializes an RE from its string representation. -void RE::Init(const char* regex) { - pattern_ = posix::StrDup(regex); - - // Reserves enough bytes to hold the regular expression used for a - // full match. - const size_t full_regex_len = strlen(regex) + 10; - char* const full_pattern = new char[full_regex_len]; - - snprintf(full_pattern, full_regex_len, "^(%s)$", regex); - is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0; - // We want to call regcomp(&partial_regex_, ...) even if the - // previous expression returns false. Otherwise partial_regex_ may - // not be properly initialized can may cause trouble when it's - // freed. - // - // Some implementation of POSIX regex (e.g. on at least some - // versions of Cygwin) doesn't accept the empty string as a valid - // regex. We change it to an equivalent form "()" to be safe. - const char* const partial_regex = (*regex == '\0') ? "()" : regex; - is_valid_ = (regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0) - && is_valid_; - EXPECT_TRUE(is_valid_) - << "Regular expression \"" << regex - << "\" is not a valid POSIX Extended regular expression."; - - delete[] full_pattern; -} - -#elif GTEST_USES_SIMPLE_RE - -// Returns true iff ch appears anywhere in str (excluding the -// terminating '\0' character). -bool IsInSet(char ch, const char* str) { - return ch != '\0' && strchr(str, ch) != NULL; -} - -// Returns true iff ch belongs to the given classification. Unlike -// similar functions in , these aren't affected by the -// current locale. -bool IsDigit(char ch) { return '0' <= ch && ch <= '9'; } -bool IsPunct(char ch) { - return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"); -} -bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); } -bool IsWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); } -bool IsWordChar(char ch) { - return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || - ('0' <= ch && ch <= '9') || ch == '_'; -} - -// Returns true iff "\\c" is a supported escape sequence. -bool IsValidEscape(char c) { - return (IsPunct(c) || IsInSet(c, "dDfnrsStvwW")); -} - -// Returns true iff the given atom (specified by escaped and pattern) -// matches ch. The result is undefined if the atom is invalid. -bool AtomMatchesChar(bool escaped, char pattern_char, char ch) { - if (escaped) { // "\\p" where p is pattern_char. - switch (pattern_char) { - case 'd': return IsDigit(ch); - case 'D': return !IsDigit(ch); - case 'f': return ch == '\f'; - case 'n': return ch == '\n'; - case 'r': return ch == '\r'; - case 's': return IsWhiteSpace(ch); - case 'S': return !IsWhiteSpace(ch); - case 't': return ch == '\t'; - case 'v': return ch == '\v'; - case 'w': return IsWordChar(ch); - case 'W': return !IsWordChar(ch); - } - return IsPunct(pattern_char) && pattern_char == ch; - } - - return (pattern_char == '.' && ch != '\n') || pattern_char == ch; -} - -// Helper function used by ValidateRegex() to format error messages. -String FormatRegexSyntaxError(const char* regex, int index) { - return (Message() << "Syntax error at index " << index - << " in simple regular expression \"" << regex << "\": ").GetString(); -} - -// Generates non-fatal failures and returns false if regex is invalid; -// otherwise returns true. -bool ValidateRegex(const char* regex) { - if (regex == NULL) { - // TODO(wan@google.com): fix the source file location in the - // assertion failures to match where the regex is used in user - // code. - ADD_FAILURE() << "NULL is not a valid simple regular expression."; - return false; - } - - bool is_valid = true; - - // True iff ?, *, or + can follow the previous atom. - bool prev_repeatable = false; - for (int i = 0; regex[i]; i++) { - if (regex[i] == '\\') { // An escape sequence - i++; - if (regex[i] == '\0') { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) - << "'\\' cannot appear at the end."; - return false; - } - - if (!IsValidEscape(regex[i])) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) - << "invalid escape sequence \"\\" << regex[i] << "\"."; - is_valid = false; - } - prev_repeatable = true; - } else { // Not an escape sequence. - const char ch = regex[i]; - - if (ch == '^' && i > 0) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'^' can only appear at the beginning."; - is_valid = false; - } else if (ch == '$' && regex[i + 1] != '\0') { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'$' can only appear at the end."; - is_valid = false; - } else if (IsInSet(ch, "()[]{}|")) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'" << ch << "' is unsupported."; - is_valid = false; - } else if (IsRepeat(ch) && !prev_repeatable) { - ADD_FAILURE() << FormatRegexSyntaxError(regex, i) - << "'" << ch << "' can only follow a repeatable token."; - is_valid = false; - } - - prev_repeatable = !IsInSet(ch, "^$?*+"); - } - } - - return is_valid; -} - -// Matches a repeated regex atom followed by a valid simple regular -// expression. The regex atom is defined as c if escaped is false, -// or \c otherwise. repeat is the repetition meta character (?, *, -// or +). The behavior is undefined if str contains too many -// characters to be indexable by size_t, in which case the test will -// probably time out anyway. We are fine with this limitation as -// std::string has it too. -bool MatchRepetitionAndRegexAtHead( - bool escaped, char c, char repeat, const char* regex, - const char* str) { - const size_t min_count = (repeat == '+') ? 1 : 0; - const size_t max_count = (repeat == '?') ? 1 : - static_cast(-1) - 1; - // We cannot call numeric_limits::max() as it conflicts with the - // max() macro on Windows. - - for (size_t i = 0; i <= max_count; ++i) { - // We know that the atom matches each of the first i characters in str. - if (i >= min_count && MatchRegexAtHead(regex, str + i)) { - // We have enough matches at the head, and the tail matches too. - // Since we only care about *whether* the pattern matches str - // (as opposed to *how* it matches), there is no need to find a - // greedy match. - return true; - } - if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i])) - return false; - } - return false; -} - -// Returns true iff regex matches a prefix of str. regex must be a -// valid simple regular expression and not start with "^", or the -// result is undefined. -bool MatchRegexAtHead(const char* regex, const char* str) { - if (*regex == '\0') // An empty regex matches a prefix of anything. - return true; - - // "$" only matches the end of a string. Note that regex being - // valid guarantees that there's nothing after "$" in it. - if (*regex == '$') - return *str == '\0'; - - // Is the first thing in regex an escape sequence? - const bool escaped = *regex == '\\'; - if (escaped) - ++regex; - if (IsRepeat(regex[1])) { - // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so - // here's an indirect recursion. It terminates as the regex gets - // shorter in each recursion. - return MatchRepetitionAndRegexAtHead( - escaped, regex[0], regex[1], regex + 2, str); - } else { - // regex isn't empty, isn't "$", and doesn't start with a - // repetition. We match the first atom of regex with the first - // character of str and recurse. - return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) && - MatchRegexAtHead(regex + 1, str + 1); - } -} - -// Returns true iff regex matches any substring of str. regex must be -// a valid simple regular expression, or the result is undefined. -// -// The algorithm is recursive, but the recursion depth doesn't exceed -// the regex length, so we won't need to worry about running out of -// stack space normally. In rare cases the time complexity can be -// exponential with respect to the regex length + the string length, -// but usually it's must faster (often close to linear). -bool MatchRegexAnywhere(const char* regex, const char* str) { - if (regex == NULL || str == NULL) - return false; - - if (*regex == '^') - return MatchRegexAtHead(regex + 1, str); - - // A successful match can be anywhere in str. - do { - if (MatchRegexAtHead(regex, str)) - return true; - } while (*str++ != '\0'); - return false; -} - -// Implements the RE class. - -RE::~RE() { - free(const_cast(pattern_)); - free(const_cast(full_pattern_)); -} - -// Returns true iff regular expression re matches the entire str. -bool RE::FullMatch(const char* str, const RE& re) { - return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str); -} - -// Returns true iff regular expression re matches a substring of str -// (including str itself). -bool RE::PartialMatch(const char* str, const RE& re) { - return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str); -} - -// Initializes an RE from its string representation. -void RE::Init(const char* regex) { - pattern_ = full_pattern_ = NULL; - if (regex != NULL) { - pattern_ = posix::StrDup(regex); - } - - is_valid_ = ValidateRegex(regex); - if (!is_valid_) { - // No need to calculate the full pattern when the regex is invalid. - return; - } - - const size_t len = strlen(regex); - // Reserves enough bytes to hold the regular expression used for a - // full match: we need space to prepend a '^', append a '$', and - // terminate the string with '\0'. - char* buffer = static_cast(malloc(len + 3)); - full_pattern_ = buffer; - - if (*regex != '^') - *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'. - - // We don't use snprintf or strncpy, as they trigger a warning when - // compiled with VC++ 8.0. - memcpy(buffer, regex, len); - buffer += len; - - if (len == 0 || regex[len - 1] != '$') - *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'. - - *buffer = '\0'; -} - -#endif // GTEST_USES_POSIX_RE - - -GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) - : severity_(severity) { - const char* const marker = - severity == GTEST_INFO ? "[ INFO ]" : - severity == GTEST_WARNING ? "[WARNING]" : - severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; - GetStream() << ::std::endl << marker << " " - << FormatFileLocation(file, line).c_str() << ": "; -} - -// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. -GTestLog::~GTestLog() { - GetStream() << ::std::endl; - if (severity_ == GTEST_FATAL) { - fflush(stderr); - posix::Abort(); - } -} -// Disable Microsoft deprecation warnings for POSIX functions called from -// this class (creat, dup, dup2, and close) -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4996) -#endif // _MSC_VER - -// Defines the stderr capturer. - -class CapturedStderr { - public: - // The ctor redirects stderr to a temporary file. - CapturedStderr() { -#if GTEST_OS_WINDOWS_MOBILE - // Not supported on Windows CE. - posix::Abort(); -#else - uncaptured_fd_ = dup(kStdErrFileno); - -#if GTEST_OS_WINDOWS - char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT - char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT - - ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); - ::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, temp_file_path); - const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); - filename_ = temp_file_path; -#else - // There's no guarantee that a test has write access to the - // current directory, so we create the temporary file in the /tmp - // directory instead. - char name_template[] = "/tmp/captured_stderr.XXXXXX"; - const int captured_fd = mkstemp(name_template); - filename_ = name_template; -#endif // GTEST_OS_WINDOWS - fflush(NULL); - dup2(captured_fd, kStdErrFileno); - close(captured_fd); -#endif // GTEST_OS_WINDOWS_MOBILE - } - - ~CapturedStderr() { -#if !GTEST_OS_WINDOWS_MOBILE - remove(filename_.c_str()); -#endif // !GTEST_OS_WINDOWS_MOBILE - } - - // Stops redirecting stderr. - void StopCapture() { -#if !GTEST_OS_WINDOWS_MOBILE - // Restores the original stream. - fflush(NULL); - dup2(uncaptured_fd_, kStdErrFileno); - close(uncaptured_fd_); - uncaptured_fd_ = -1; -#endif // !GTEST_OS_WINDOWS_MOBILE - } - - // Returns the name of the temporary file holding the stderr output. - // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we - // can use it here. - ::std::string filename() const { return filename_; } - - private: - int uncaptured_fd_; - ::std::string filename_; -}; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER - -static CapturedStderr* g_captured_stderr = NULL; - -// Returns the size (in bytes) of a file. -static size_t GetFileSize(FILE * file) { - fseek(file, 0, SEEK_END); - return static_cast(ftell(file)); -} - -// Reads the entire content of a file as a string. -static String ReadEntireFile(FILE * file) { - const size_t file_size = GetFileSize(file); - char* const buffer = new char[file_size]; - - size_t bytes_last_read = 0; // # of bytes read in the last fread() - size_t bytes_read = 0; // # of bytes read so far - - fseek(file, 0, SEEK_SET); - - // Keeps reading the file until we cannot read further or the - // pre-determined file size is reached. - do { - bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file); - bytes_read += bytes_last_read; - } while (bytes_last_read > 0 && bytes_read < file_size); - - const String content(buffer, bytes_read); - delete[] buffer; - - return content; -} - -// Starts capturing stderr. -void CaptureStderr() { - if (g_captured_stderr != NULL) { - GTEST_LOG_(FATAL) << "Only one stderr capturer can exist at one time."; - } - g_captured_stderr = new CapturedStderr; -} - -// Stops capturing stderr and returns the captured string. -// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can -// use it here. -String GetCapturedStderr() { - g_captured_stderr->StopCapture(); - - FILE* const file = posix::FOpen(g_captured_stderr->filename().c_str(), "r"); - const String content = ReadEntireFile(file); - posix::FClose(file); - - delete g_captured_stderr; - g_captured_stderr = NULL; - - return content; -} - -#if GTEST_HAS_DEATH_TEST - -// A copy of all command line arguments. Set by InitGoogleTest(). -::std::vector g_argvs; - -// Returns the command line as a vector of strings. -const ::std::vector& GetArgvs() { return g_argvs; } - -#endif // GTEST_HAS_DEATH_TEST - -#if GTEST_OS_WINDOWS_MOBILE -namespace posix { -void Abort() { - DebugBreak(); - TerminateProcess(GetCurrentProcess(), 1); -} -} // namespace posix -#endif // GTEST_OS_WINDOWS_MOBILE - -// Returns the name of the environment variable corresponding to the -// given flag. For example, FlagToEnvVar("foo") will return -// "GTEST_FOO" in the open-source version. -static String FlagToEnvVar(const char* flag) { - const String full_flag = - (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); - - Message env_var; - for (size_t i = 0; i != full_flag.length(); i++) { - env_var << static_cast(toupper(full_flag.c_str()[i])); - } - - return env_var.GetString(); -} - -// Parses 'str' for a 32-bit signed integer. If successful, writes -// the result to *value and returns true; otherwise leaves *value -// unchanged and returns false. -bool ParseInt32(const Message& src_text, const char* str, Int32* value) { - // Parses the environment variable as a decimal integer. - char* end = NULL; - const long long_value = strtol(str, &end, 10); // NOLINT - - // Has strtol() consumed all characters in the string? - if (*end != '\0') { - // No - an invalid character was encountered. - Message msg; - msg << "WARNING: " << src_text - << " is expected to be a 32-bit integer, but actually" - << " has value \"" << str << "\".\n"; - printf("%s", msg.GetString().c_str()); - fflush(stdout); - return false; - } - - // Is the parsed value in the range of an Int32? - const Int32 result = static_cast(long_value); - if (long_value == LONG_MAX || long_value == LONG_MIN || - // The parsed value overflows as a long. (strtol() returns - // LONG_MAX or LONG_MIN when the input overflows.) - result != long_value - // The parsed value overflows as an Int32. - ) { - Message msg; - msg << "WARNING: " << src_text - << " is expected to be a 32-bit integer, but actually" - << " has value " << str << ", which overflows.\n"; - printf("%s", msg.GetString().c_str()); - fflush(stdout); - return false; - } - - *value = result; - return true; -} - -// Reads and returns the Boolean environment variable corresponding to -// the given flag; if it's not set, returns default_value. -// -// The value is considered true iff it's not "0". -bool BoolFromGTestEnv(const char* flag, bool default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const string_value = posix::GetEnv(env_var.c_str()); - return string_value == NULL ? - default_value : strcmp(string_value, "0") != 0; -} - -// Reads and returns a 32-bit integer stored in the environment -// variable corresponding to the given flag; if it isn't set or -// doesn't represent a valid 32-bit integer, returns default_value. -Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const string_value = posix::GetEnv(env_var.c_str()); - if (string_value == NULL) { - // The environment variable is not set. - return default_value; - } - - Int32 result = default_value; - if (!ParseInt32(Message() << "Environment variable " << env_var, - string_value, &result)) { - printf("The default value %s is used.\n", - (Message() << default_value).GetString().c_str()); - fflush(stdout); - return default_value; - } - - return result; -} - -// Reads and returns the string environment variable corresponding to -// the given flag; if it's not set, returns default_value. -const char* StringFromGTestEnv(const char* flag, const char* default_value) { - const String env_var = FlagToEnvVar(flag); - const char* const value = posix::GetEnv(env_var.c_str()); - return value == NULL ? default_value : value; -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-test-part.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-test-part.cc deleted file mode 100644 index 4f36df66..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-test-part.cc +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// The Google C++ Testing Framework (Google Test) - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -using internal::GetUnitTestImpl; - -// Gets the summary of the failure message by omitting the stack trace -// in it. -internal::String TestPartResult::ExtractSummary(const char* message) { - const char* const stack_trace = strstr(message, internal::kStackTraceMarker); - return stack_trace == NULL ? internal::String(message) : - internal::String(message, stack_trace - message); -} - -// Prints a TestPartResult object. -std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { - return os - << result.file_name() << ":" << result.line_number() << ": " - << (result.type() == TestPartResult::kSuccess ? "Success" : - result.type() == TestPartResult::kFatalFailure ? "Fatal failure" : - "Non-fatal failure") << ":\n" - << result.message() << std::endl; -} - -// Constructs an empty TestPartResultArray. -TestPartResultArray::TestPartResultArray() - : array_(new internal::Vector) { -} - -// Destructs a TestPartResultArray. -TestPartResultArray::~TestPartResultArray() { - delete array_; -} - -// Appends a TestPartResult to the array. -void TestPartResultArray::Append(const TestPartResult& result) { - array_->PushBack(result); -} - -// Returns the TestPartResult at the given index (0-based). -const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { - if (index < 0 || index >= size()) { - printf("\nInvalid index (%d) into TestPartResultArray.\n", index); - internal::posix::Abort(); - } - - return array_->GetElement(index); -} - -// Returns the number of TestPartResult objects in the array. -int TestPartResultArray::size() const { - return array_->size(); -} - -namespace internal { - -HasNewFatalFailureHelper::HasNewFatalFailureHelper() - : has_new_fatal_failure_(false), - original_reporter_(GetUnitTestImpl()-> - GetTestPartResultReporterForCurrentThread()) { - GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this); -} - -HasNewFatalFailureHelper::~HasNewFatalFailureHelper() { - GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread( - original_reporter_); -} - -void HasNewFatalFailureHelper::ReportTestPartResult( - const TestPartResult& result) { - if (result.fatally_failed()) - has_new_fatal_failure_ = true; - original_reporter_->ReportTestPartResult(result); -} - -} // namespace internal - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-typed-test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-typed-test.cc deleted file mode 100644 index 4a0f657d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest-typed-test.cc +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -namespace testing { -namespace internal { - -#if GTEST_HAS_TYPED_TEST_P - -// Verifies that registered_tests match the test names in -// defined_test_names_; returns registered_tests if successful, or -// aborts the program otherwise. -const char* TypedTestCasePState::VerifyRegisteredTestNames( - const char* file, int line, const char* registered_tests) { - typedef ::std::set::const_iterator DefinedTestIter; - registered_ = true; - - Message errors; - ::std::set tests; - for (const char* names = registered_tests; names != NULL; - names = SkipComma(names)) { - const String name = GetPrefixUntilComma(names); - if (tests.count(name) != 0) { - errors << "Test " << name << " is listed more than once.\n"; - continue; - } - - bool found = false; - for (DefinedTestIter it = defined_test_names_.begin(); - it != defined_test_names_.end(); - ++it) { - if (name == *it) { - found = true; - break; - } - } - - if (found) { - tests.insert(name); - } else { - errors << "No test named " << name - << " can be found in this test case.\n"; - } - } - - for (DefinedTestIter it = defined_test_names_.begin(); - it != defined_test_names_.end(); - ++it) { - if (tests.count(*it) == 0) { - errors << "You forgot to list test " << *it << ".\n"; - } - } - - const String& errors_str = errors.GetString(); - if (errors_str != "") { - fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), - errors_str.c_str()); - fflush(stderr); - posix::Abort(); - } - - return registered_tests; -} - -#endif // GTEST_HAS_TYPED_TEST_P - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest.cc deleted file mode 100644 index 93407245..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest.cc +++ /dev/null @@ -1,4642 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// The Google C++ Testing Framework (Google Test) - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#if GTEST_OS_LINUX - -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -#define GTEST_HAS_GETTIMEOFDAY_ 1 - -#include -#include -#include -// Declares vsnprintf(). This header is not available on Windows. -#include -#include -#include -#include -#include -#include - -#elif GTEST_OS_SYMBIAN -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT - -#elif GTEST_OS_ZOS -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT - -// On z/OS we additionally need strings.h for strcasecmp. -#include // NOLINT - -#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE. - -#include // NOLINT - -#elif GTEST_OS_WINDOWS // We are on Windows proper. - -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT - -#if GTEST_OS_WINDOWS_MINGW -// MinGW has gettimeofday() but not _ftime64(). -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -// TODO(kenton@google.com): There are other ways to get the time on -// Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW -// supports these. consider using them instead. -#define GTEST_HAS_GETTIMEOFDAY_ 1 -#include // NOLINT -#endif // GTEST_OS_WINDOWS_MINGW - -// cpplint thinks that the header is already included, so we want to -// silence it. -#include // NOLINT - -#else - -// Assume other platforms have gettimeofday(). -// TODO(kenton@google.com): Use autoconf to detect availability of -// gettimeofday(). -#define GTEST_HAS_GETTIMEOFDAY_ 1 - -// cpplint thinks that the header is already included, so we want to -// silence it. -#include // NOLINT -#include // NOLINT - -#endif // GTEST_OS_LINUX - -#if GTEST_HAS_EXCEPTIONS -#include -#endif - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#if GTEST_OS_WINDOWS -#define vsnprintf _vsnprintf -#endif // GTEST_OS_WINDOWS - -namespace testing { - -// Constants. - -// A test whose test case name or test name matches this filter is -// disabled and not run. -static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*"; - -// A test case whose name matches this filter is considered a death -// test case and will be run before test cases whose name doesn't -// match this filter. -static const char kDeathTestCaseFilter[] = "*DeathTest:*DeathTest/*"; - -// A test filter that matches everything. -static const char kUniversalFilter[] = "*"; - -// The default output file for XML output. -static const char kDefaultOutputFile[] = "test_detail.xml"; - -// The environment variable name for the test shard index. -static const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; -// The environment variable name for the total number of test shards. -static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS"; -// The environment variable name for the test shard status file. -static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE"; - -namespace internal { - -// The text used in failure messages to indicate the start of the -// stack trace. -const char kStackTraceMarker[] = "\nStack trace:\n"; - -} // namespace internal - -GTEST_DEFINE_bool_( - also_run_disabled_tests, - internal::BoolFromGTestEnv("also_run_disabled_tests", false), - "Run disabled tests too, in addition to the tests normally being run."); - -GTEST_DEFINE_bool_( - break_on_failure, - internal::BoolFromGTestEnv("break_on_failure", false), - "True iff a failed assertion should be a debugger break-point."); - -GTEST_DEFINE_bool_( - catch_exceptions, - internal::BoolFromGTestEnv("catch_exceptions", false), - "True iff " GTEST_NAME_ - " should catch exceptions and treat them as test failures."); - -GTEST_DEFINE_string_( - color, - internal::StringFromGTestEnv("color", "auto"), - "Whether to use colors in the output. Valid values: yes, no, " - "and auto. 'auto' means to use colors if the output is " - "being sent to a terminal and the TERM environment variable " - "is set to xterm, xterm-color, xterm-256color, linux or cygwin."); - -GTEST_DEFINE_string_( - filter, - internal::StringFromGTestEnv("filter", kUniversalFilter), - "A colon-separated list of glob (not regex) patterns " - "for filtering the tests to run, optionally followed by a " - "'-' and a : separated list of negative patterns (tests to " - "exclude). A test is run if it matches one of the positive " - "patterns and does not match any of the negative patterns."); - -GTEST_DEFINE_bool_(list_tests, false, - "List all tests without running them."); - -GTEST_DEFINE_string_( - output, - internal::StringFromGTestEnv("output", ""), - "A format (currently must be \"xml\"), optionally followed " - "by a colon and an output file name or directory. A directory " - "is indicated by a trailing pathname separator. " - "Examples: \"xml:filename.xml\", \"xml::directoryname/\". " - "If a directory is specified, output files will be created " - "within that directory, with file-names based on the test " - "executable's name and, if necessary, made unique by adding " - "digits."); - -GTEST_DEFINE_bool_( - print_time, - internal::BoolFromGTestEnv("print_time", true), - "True iff " GTEST_NAME_ - " should display elapsed time in text output."); - -GTEST_DEFINE_int32_( - random_seed, - internal::Int32FromGTestEnv("random_seed", 0), - "Random number seed to use when shuffling test orders. Must be in range " - "[1, 99999], or 0 to use a seed based on the current time."); - -GTEST_DEFINE_int32_( - repeat, - internal::Int32FromGTestEnv("repeat", 1), - "How many times to repeat each test. Specify a negative number " - "for repeating forever. Useful for shaking out flaky tests."); - -GTEST_DEFINE_bool_( - show_internal_stack_frames, false, - "True iff " GTEST_NAME_ " should include internal stack frames when " - "printing test failure stack traces."); - -GTEST_DEFINE_bool_( - shuffle, - internal::BoolFromGTestEnv("shuffle", false), - "True iff " GTEST_NAME_ - " should randomize tests' order on every run."); - -GTEST_DEFINE_int32_( - stack_trace_depth, - internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth), - "The maximum number of stack frames to print when an " - "assertion fails. The valid range is 0 through 100, inclusive."); - -GTEST_DEFINE_bool_( - throw_on_failure, - internal::BoolFromGTestEnv("throw_on_failure", false), - "When this flag is specified, a failed assertion will throw an exception " - "if exceptions are enabled or exit the program with a non-zero code " - "otherwise."); - -namespace internal { - -// Generates a random number from [0, range), using a Linear -// Congruential Generator (LCG). Crashes if 'range' is 0 or greater -// than kMaxRange. -UInt32 Random::Generate(UInt32 range) { - // These constants are the same as are used in glibc's rand(3). - state_ = (1103515245U*state_ + 12345U) % kMaxRange; - - GTEST_CHECK_(range > 0) - << "Cannot generate a number in the range [0, 0)."; - GTEST_CHECK_(range <= kMaxRange) - << "Generation of a number in [0, " << range << ") was requested, " - << "but this can only generate numbers in [0, " << kMaxRange << ")."; - - // Converting via modulus introduces a bit of downward bias, but - // it's simple, and a linear congruential generator isn't too good - // to begin with. - return state_ % range; -} - -// g_help_flag is true iff the --help flag or an equivalent form is -// specified on the command line. -static bool g_help_flag = false; - -// GTestIsInitialized() returns true iff the user has initialized -// Google Test. Useful for catching the user mistake of not initializing -// Google Test before calling RUN_ALL_TESTS(). -// -// A user must call testing::InitGoogleTest() to initialize Google -// Test. g_init_gtest_count is set to the number of times -// InitGoogleTest() has been called. We don't protect this variable -// under a mutex as it is only accessed in the main thread. -int g_init_gtest_count = 0; -static bool GTestIsInitialized() { return g_init_gtest_count != 0; } - -// Iterates over a vector of TestCases, keeping a running sum of the -// results of calling a given int-returning method on each. -// Returns the sum. -static int SumOverTestCaseList(const internal::Vector& case_list, - int (TestCase::*method)() const) { - int sum = 0; - for (int i = 0; i < case_list.size(); i++) { - sum += (case_list.GetElement(i)->*method)(); - } - return sum; -} - -// Returns true iff the test case passed. -static bool TestCasePassed(const TestCase* test_case) { - return test_case->should_run() && test_case->Passed(); -} - -// Returns true iff the test case failed. -static bool TestCaseFailed(const TestCase* test_case) { - return test_case->should_run() && test_case->Failed(); -} - -// Returns true iff test_case contains at least one test that should -// run. -static bool ShouldRunTestCase(const TestCase* test_case) { - return test_case->should_run(); -} - -// AssertHelper constructor. -AssertHelper::AssertHelper(TestPartResult::Type type, - const char* file, - int line, - const char* message) - : data_(new AssertHelperData(type, file, line, message)) { -} - -AssertHelper::~AssertHelper() { - delete data_; -} - -// Message assignment, for assertion streaming support. -void AssertHelper::operator=(const Message& message) const { - UnitTest::GetInstance()-> - AddTestPartResult(data_->type, data_->file, data_->line, - AppendUserMessage(data_->message, message), - UnitTest::GetInstance()->impl() - ->CurrentOsStackTraceExceptTop(1) - // Skips the stack frame for this function itself. - ); // NOLINT -} - -// Mutex for linked pointers. -Mutex g_linked_ptr_mutex(Mutex::NO_CONSTRUCTOR_NEEDED_FOR_STATIC_MUTEX); - -// Application pathname gotten in InitGoogleTest. -String g_executable_path; - -// Returns the current application's name, removing directory path if that -// is present. -FilePath GetCurrentExecutableName() { - FilePath result; - -#if GTEST_OS_WINDOWS - result.Set(FilePath(g_executable_path).RemoveExtension("exe")); -#else - result.Set(FilePath(g_executable_path)); -#endif // GTEST_OS_WINDOWS - - return result.RemoveDirectoryName(); -} - -// Functions for processing the gtest_output flag. - -// Returns the output format, or "" for normal printed output. -String UnitTestOptions::GetOutputFormat() { - const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) return String(""); - - const char* const colon = strchr(gtest_output_flag, ':'); - return (colon == NULL) ? - String(gtest_output_flag) : - String(gtest_output_flag, colon - gtest_output_flag); -} - -// Returns the name of the requested output file, or the default if none -// was explicitly specified. -String UnitTestOptions::GetAbsolutePathToOutputFile() { - const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); - if (gtest_output_flag == NULL) - return String(""); - - const char* const colon = strchr(gtest_output_flag, ':'); - if (colon == NULL) - return String(internal::FilePath::ConcatPaths( - internal::FilePath( - UnitTest::GetInstance()->original_working_dir()), - internal::FilePath(kDefaultOutputFile)).ToString() ); - - internal::FilePath output_name(colon + 1); - if (!output_name.IsAbsolutePath()) - // TODO(wan@google.com): on Windows \some\path is not an absolute - // path (as its meaning depends on the current drive), yet the - // following logic for turning it into an absolute path is wrong. - // Fix it. - output_name = internal::FilePath::ConcatPaths( - internal::FilePath(UnitTest::GetInstance()->original_working_dir()), - internal::FilePath(colon + 1)); - - if (!output_name.IsDirectory()) - return output_name.ToString(); - - internal::FilePath result(internal::FilePath::GenerateUniqueFileName( - output_name, internal::GetCurrentExecutableName(), - GetOutputFormat().c_str())); - return result.ToString(); -} - -// Returns true iff the wildcard pattern matches the string. The -// first ':' or '\0' character in pattern marks the end of it. -// -// This recursive algorithm isn't very efficient, but is clear and -// works well enough for matching test names, which are short. -bool UnitTestOptions::PatternMatchesString(const char *pattern, - const char *str) { - switch (*pattern) { - case '\0': - case ':': // Either ':' or '\0' marks the end of the pattern. - return *str == '\0'; - case '?': // Matches any single character. - return *str != '\0' && PatternMatchesString(pattern + 1, str + 1); - case '*': // Matches any string (possibly empty) of characters. - return (*str != '\0' && PatternMatchesString(pattern, str + 1)) || - PatternMatchesString(pattern + 1, str); - default: // Non-special character. Matches itself. - return *pattern == *str && - PatternMatchesString(pattern + 1, str + 1); - } -} - -bool UnitTestOptions::MatchesFilter(const String& name, const char* filter) { - const char *cur_pattern = filter; - for (;;) { - if (PatternMatchesString(cur_pattern, name.c_str())) { - return true; - } - - // Finds the next pattern in the filter. - cur_pattern = strchr(cur_pattern, ':'); - - // Returns if no more pattern can be found. - if (cur_pattern == NULL) { - return false; - } - - // Skips the pattern separater (the ':' character). - cur_pattern++; - } -} - -// TODO(keithray): move String function implementations to gtest-string.cc. - -// Returns true iff the user-specified filter matches the test case -// name and the test name. -bool UnitTestOptions::FilterMatchesTest(const String &test_case_name, - const String &test_name) { - const String& full_name = String::Format("%s.%s", - test_case_name.c_str(), - test_name.c_str()); - - // Split --gtest_filter at '-', if there is one, to separate into - // positive filter and negative filter portions - const char* const p = GTEST_FLAG(filter).c_str(); - const char* const dash = strchr(p, '-'); - String positive; - String negative; - if (dash == NULL) { - positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter - negative = String(""); - } else { - positive = String(p, dash - p); // Everything up to the dash - negative = String(dash+1); // Everything after the dash - if (positive.empty()) { - // Treat '-test1' as the same as '*-test1' - positive = kUniversalFilter; - } - } - - // A filter is a colon-separated list of patterns. It matches a - // test if any pattern in it matches the test. - return (MatchesFilter(full_name, positive.c_str()) && - !MatchesFilter(full_name, negative.c_str())); -} - -#if GTEST_OS_WINDOWS -// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the -// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. -// This function is useful as an __except condition. -int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) { - // Google Test should handle an exception if: - // 1. the user wants it to, AND - // 2. this is not a breakpoint exception. - return (GTEST_FLAG(catch_exceptions) && - exception_code != EXCEPTION_BREAKPOINT) ? - EXCEPTION_EXECUTE_HANDLER : - EXCEPTION_CONTINUE_SEARCH; -} -#endif // GTEST_OS_WINDOWS - -} // namespace internal - -// The c'tor sets this object as the test part result reporter used by -// Google Test. The 'result' parameter specifies where to report the -// results. Intercepts only failures from the current thread. -ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( - TestPartResultArray* result) - : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD), - result_(result) { - Init(); -} - -// The c'tor sets this object as the test part result reporter used by -// Google Test. The 'result' parameter specifies where to report the -// results. -ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( - InterceptMode intercept_mode, TestPartResultArray* result) - : intercept_mode_(intercept_mode), - result_(result) { - Init(); -} - -void ScopedFakeTestPartResultReporter::Init() { - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - if (intercept_mode_ == INTERCEPT_ALL_THREADS) { - old_reporter_ = impl->GetGlobalTestPartResultReporter(); - impl->SetGlobalTestPartResultReporter(this); - } else { - old_reporter_ = impl->GetTestPartResultReporterForCurrentThread(); - impl->SetTestPartResultReporterForCurrentThread(this); - } -} - -// The d'tor restores the test part result reporter used by Google Test -// before. -ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() { - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - if (intercept_mode_ == INTERCEPT_ALL_THREADS) { - impl->SetGlobalTestPartResultReporter(old_reporter_); - } else { - impl->SetTestPartResultReporterForCurrentThread(old_reporter_); - } -} - -// Increments the test part result count and remembers the result. -// This method is from the TestPartResultReporterInterface interface. -void ScopedFakeTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - result_->Append(result); -} - -namespace internal { - -// Returns the type ID of ::testing::Test. We should always call this -// instead of GetTypeId< ::testing::Test>() to get the type ID of -// testing::Test. This is to work around a suspected linker bug when -// using Google Test as a framework on Mac OS X. The bug causes -// GetTypeId< ::testing::Test>() to return different values depending -// on whether the call is from the Google Test framework itself or -// from user test code. GetTestTypeId() is guaranteed to always -// return the same value, as it always calls GetTypeId<>() from the -// gtest.cc, which is within the Google Test framework. -TypeId GetTestTypeId() { - return GetTypeId(); -} - -// The value of GetTestTypeId() as seen from within the Google Test -// library. This is solely for testing GetTestTypeId(). -extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId(); - -// This predicate-formatter checks that 'results' contains a test part -// failure of the given type and that the failure message contains the -// given substring. -AssertionResult HasOneFailure(const char* /* results_expr */, - const char* /* type_expr */, - const char* /* substr_expr */, - const TestPartResultArray& results, - TestPartResult::Type type, - const char* substr) { - const String expected(type == TestPartResult::kFatalFailure ? - "1 fatal failure" : - "1 non-fatal failure"); - Message msg; - if (results.size() != 1) { - msg << "Expected: " << expected << "\n" - << " Actual: " << results.size() << " failures"; - for (int i = 0; i < results.size(); i++) { - msg << "\n" << results.GetTestPartResult(i); - } - return AssertionFailure(msg); - } - - const TestPartResult& r = results.GetTestPartResult(0); - if (r.type() != type) { - msg << "Expected: " << expected << "\n" - << " Actual:\n" - << r; - return AssertionFailure(msg); - } - - if (strstr(r.message(), substr) == NULL) { - msg << "Expected: " << expected << " containing \"" - << substr << "\"\n" - << " Actual:\n" - << r; - return AssertionFailure(msg); - } - - return AssertionSuccess(); -} - -// The constructor of SingleFailureChecker remembers where to look up -// test part results, what type of failure we expect, and what -// substring the failure message should contain. -SingleFailureChecker:: SingleFailureChecker( - const TestPartResultArray* results, - TestPartResult::Type type, - const char* substr) - : results_(results), - type_(type), - substr_(substr) {} - -// The destructor of SingleFailureChecker verifies that the given -// TestPartResultArray contains exactly one failure that has the given -// type and contains the given substring. If that's not the case, a -// non-fatal failure will be generated. -SingleFailureChecker::~SingleFailureChecker() { - EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_.c_str()); -} - -DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter( - UnitTestImpl* unit_test) : unit_test_(unit_test) {} - -void DefaultGlobalTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - unit_test_->current_test_result()->AddTestPartResult(result); - unit_test_->listeners()->repeater()->OnTestPartResult(result); -} - -DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter( - UnitTestImpl* unit_test) : unit_test_(unit_test) {} - -void DefaultPerThreadTestPartResultReporter::ReportTestPartResult( - const TestPartResult& result) { - unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result); -} - -// Returns the global test part result reporter. -TestPartResultReporterInterface* -UnitTestImpl::GetGlobalTestPartResultReporter() { - internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - return global_test_part_result_repoter_; -} - -// Sets the global test part result reporter. -void UnitTestImpl::SetGlobalTestPartResultReporter( - TestPartResultReporterInterface* reporter) { - internal::MutexLock lock(&global_test_part_result_reporter_mutex_); - global_test_part_result_repoter_ = reporter; -} - -// Returns the test part result reporter for the current thread. -TestPartResultReporterInterface* -UnitTestImpl::GetTestPartResultReporterForCurrentThread() { - return per_thread_test_part_result_reporter_.get(); -} - -// Sets the test part result reporter for the current thread. -void UnitTestImpl::SetTestPartResultReporterForCurrentThread( - TestPartResultReporterInterface* reporter) { - per_thread_test_part_result_reporter_.set(reporter); -} - -// Gets the number of successful test cases. -int UnitTestImpl::successful_test_case_count() const { - return test_cases_.CountIf(TestCasePassed); -} - -// Gets the number of failed test cases. -int UnitTestImpl::failed_test_case_count() const { - return test_cases_.CountIf(TestCaseFailed); -} - -// Gets the number of all test cases. -int UnitTestImpl::total_test_case_count() const { - return test_cases_.size(); -} - -// Gets the number of all test cases that contain at least one test -// that should run. -int UnitTestImpl::test_case_to_run_count() const { - return test_cases_.CountIf(ShouldRunTestCase); -} - -// Gets the number of successful tests. -int UnitTestImpl::successful_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::successful_test_count); -} - -// Gets the number of failed tests. -int UnitTestImpl::failed_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::failed_test_count); -} - -// Gets the number of disabled tests. -int UnitTestImpl::disabled_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::disabled_test_count); -} - -// Gets the number of all tests. -int UnitTestImpl::total_test_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::total_test_count); -} - -// Gets the number of tests that should run. -int UnitTestImpl::test_to_run_count() const { - return SumOverTestCaseList(test_cases_, &TestCase::test_to_run_count); -} - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// CurrentOsStackTraceExceptTop(1), Foo() will be included in the -// trace but Bar() and CurrentOsStackTraceExceptTop() won't. -String UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) { - (void)skip_count; - return String(""); -} - -// Returns the current time in milliseconds. -TimeInMillis GetTimeInMillis() { -#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__) - // Difference between 1970-01-01 and 1601-01-01 in milliseconds. - // http://analogous.blogspot.com/2005/04/epoch.html - const TimeInMillis kJavaEpochToWinFileTimeDelta = - static_cast(116444736UL) * 100000UL; - const DWORD kTenthMicrosInMilliSecond = 10000; - - SYSTEMTIME now_systime; - FILETIME now_filetime; - ULARGE_INTEGER now_int64; - // TODO(kenton@google.com): Shouldn't this just use - // GetSystemTimeAsFileTime()? - GetSystemTime(&now_systime); - if (SystemTimeToFileTime(&now_systime, &now_filetime)) { - now_int64.LowPart = now_filetime.dwLowDateTime; - now_int64.HighPart = now_filetime.dwHighDateTime; - now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) - - kJavaEpochToWinFileTimeDelta; - return now_int64.QuadPart; - } - return 0; -#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_ - __timeb64 now; -#ifdef _MSC_VER - // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 - // (deprecated function) there. - // TODO(kenton@google.com): Use GetTickCount()? Or use - // SystemTimeToFileTime() -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. - _ftime64(&now); -#pragma warning(pop) // Restores the warning state. -#else - _ftime64(&now); -#endif // _MSC_VER - return static_cast(now.time) * 1000 + now.millitm; -#elif GTEST_HAS_GETTIMEOFDAY_ - struct timeval now; - gettimeofday(&now, NULL); - return static_cast(now.tv_sec) * 1000 + now.tv_usec / 1000; -#else -#error "Don't know how to get the current time on your system." -#endif -} - -// Utilities - -// class String - -// Returns the input enclosed in double quotes if it's not NULL; -// otherwise returns "(null)". For example, "\"Hello\"" is returned -// for input "Hello". -// -// This is useful for printing a C string in the syntax of a literal. -// -// Known issue: escape sequences are not handled yet. -String String::ShowCStringQuoted(const char* c_str) { - return c_str ? String::Format("\"%s\"", c_str) : String("(null)"); -} - -// Copies at most length characters from str into a newly-allocated -// piece of memory of size length+1. The memory is allocated with new[]. -// A terminating null byte is written to the memory, and a pointer to it -// is returned. If str is NULL, NULL is returned. -static char* CloneString(const char* str, size_t length) { - if (str == NULL) { - return NULL; - } else { - char* const clone = new char[length + 1]; - posix::StrNCpy(clone, str, length); - clone[length] = '\0'; - return clone; - } -} - -// Clones a 0-terminated C string, allocating memory using new. The -// caller is responsible for deleting[] the return value. Returns the -// cloned string, or NULL if the input is NULL. -const char * String::CloneCString(const char* c_str) { - return (c_str == NULL) ? - NULL : CloneString(c_str, strlen(c_str)); -} - -#if GTEST_OS_WINDOWS_MOBILE -// Creates a UTF-16 wide string from the given ANSI string, allocating -// memory using new. The caller is responsible for deleting the return -// value using delete[]. Returns the wide string, or NULL if the -// input is NULL. -LPCWSTR String::AnsiToUtf16(const char* ansi) { - if (!ansi) return NULL; - const int length = strlen(ansi); - const int unicode_length = - MultiByteToWideChar(CP_ACP, 0, ansi, length, - NULL, 0); - WCHAR* unicode = new WCHAR[unicode_length + 1]; - MultiByteToWideChar(CP_ACP, 0, ansi, length, - unicode, unicode_length); - unicode[unicode_length] = 0; - return unicode; -} - -// Creates an ANSI string from the given wide string, allocating -// memory using new. The caller is responsible for deleting the return -// value using delete[]. Returns the ANSI string, or NULL if the -// input is NULL. -const char* String::Utf16ToAnsi(LPCWSTR utf16_str) { - if (!utf16_str) return NULL; - const int ansi_length = - WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, - NULL, 0, NULL, NULL); - char* ansi = new char[ansi_length + 1]; - WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, - ansi, ansi_length, NULL, NULL); - ansi[ansi_length] = 0; - return ansi; -} - -#endif // GTEST_OS_WINDOWS_MOBILE - -// Compares two C strings. Returns true iff they have the same content. -// -// Unlike strcmp(), this function can handle NULL argument(s). A NULL -// C string is considered different to any non-NULL C string, -// including the empty string. -bool String::CStringEquals(const char * lhs, const char * rhs) { - if ( lhs == NULL ) return rhs == NULL; - - if ( rhs == NULL ) return false; - - return strcmp(lhs, rhs) == 0; -} - -#if GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -// Converts an array of wide chars to a narrow string using the UTF-8 -// encoding, and streams the result to the given Message object. -static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length, - Message* msg) { - // TODO(wan): consider allowing a testing::String object to - // contain '\0'. This will make it behave more like std::string, - // and will allow ToUtf8String() to return the correct encoding - // for '\0' s.t. we can get rid of the conditional here (and in - // several other places). - for (size_t i = 0; i != length; ) { // NOLINT - if (wstr[i] != L'\0') { - *msg << WideStringToUtf8(wstr + i, static_cast(length - i)); - while (i != length && wstr[i] != L'\0') - i++; - } else { - *msg << '\0'; - i++; - } - } -} - -#endif // GTEST_HAS_STD_WSTRING || GTEST_HAS_GLOBAL_WSTRING - -} // namespace internal - -#if GTEST_HAS_STD_WSTRING -// Converts the given wide string to a narrow string using the UTF-8 -// encoding, and streams the result to this Message object. -Message& Message::operator <<(const ::std::wstring& wstr) { - internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); - return *this; -} -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_WSTRING -// Converts the given wide string to a narrow string using the UTF-8 -// encoding, and streams the result to this Message object. -Message& Message::operator <<(const ::wstring& wstr) { - internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); - return *this; -} -#endif // GTEST_HAS_GLOBAL_WSTRING - -namespace internal { - -// Formats a value to be used in a failure message. - -// For a char value, we print it as a C++ char literal and as an -// unsigned integer (both in decimal and in hexadecimal). -String FormatForFailureMessage(char ch) { - const unsigned int ch_as_uint = ch; - // A String object cannot contain '\0', so we print "\\0" when ch is - // '\0'. - return String::Format("'%s' (%u, 0x%X)", - ch ? String::Format("%c", ch).c_str() : "\\0", - ch_as_uint, ch_as_uint); -} - -// For a wchar_t value, we print it as a C++ wchar_t literal and as an -// unsigned integer (both in decimal and in hexidecimal). -String FormatForFailureMessage(wchar_t wchar) { - // The C++ standard doesn't specify the exact size of the wchar_t - // type. It just says that it shall have the same size as another - // integral type, called its underlying type. - // - // Therefore, in order to print a wchar_t value in the numeric form, - // we first convert it to the largest integral type (UInt64) and - // then print the converted value. - // - // We use streaming to print the value as "%llu" doesn't work - // correctly with MSVC 7.1. - const UInt64 wchar_as_uint64 = wchar; - Message msg; - // A String object cannot contain '\0', so we print "\\0" when wchar is - // L'\0'. - char buffer[32]; // CodePointToUtf8 requires a buffer that big. - msg << "L'" - << (wchar ? CodePointToUtf8(static_cast(wchar), buffer) : "\\0") - << "' (" << wchar_as_uint64 << ", 0x" << ::std::setbase(16) - << wchar_as_uint64 << ")"; - return msg.GetString(); -} - -} // namespace internal - -// AssertionResult constructor. -AssertionResult::AssertionResult(const internal::String& failure_message) - : failure_message_(failure_message) { -} - - -// Makes a successful assertion result. -AssertionResult AssertionSuccess() { - return AssertionResult(); -} - - -// Makes a failed assertion result with the given failure message. -AssertionResult AssertionFailure(const Message& message) { - return AssertionResult(message.GetString()); -} - -namespace internal { - -// Constructs and returns the message for an equality assertion -// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. -// -// The first four parameters are the expressions used in the assertion -// and their values, as strings. For example, for ASSERT_EQ(foo, bar) -// where foo is 5 and bar is 6, we have: -// -// expected_expression: "foo" -// actual_expression: "bar" -// expected_value: "5" -// actual_value: "6" -// -// The ignoring_case parameter is true iff the assertion is a -// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will -// be inserted into the message. -AssertionResult EqFailure(const char* expected_expression, - const char* actual_expression, - const String& expected_value, - const String& actual_value, - bool ignoring_case) { - Message msg; - msg << "Value of: " << actual_expression; - if (actual_value != actual_expression) { - msg << "\n Actual: " << actual_value; - } - - msg << "\nExpected: " << expected_expression; - if (ignoring_case) { - msg << " (ignoring case)"; - } - if (expected_value != expected_expression) { - msg << "\nWhich is: " << expected_value; - } - - return AssertionFailure(msg); -} - - -// Helper function for implementing ASSERT_NEAR. -AssertionResult DoubleNearPredFormat(const char* expr1, - const char* expr2, - const char* abs_error_expr, - double val1, - double val2, - double abs_error) { - const double diff = fabs(val1 - val2); - if (diff <= abs_error) return AssertionSuccess(); - - // TODO(wan): do not print the value of an expression if it's - // already a literal. - Message msg; - msg << "The difference between " << expr1 << " and " << expr2 - << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" - << expr1 << " evaluates to " << val1 << ",\n" - << expr2 << " evaluates to " << val2 << ", and\n" - << abs_error_expr << " evaluates to " << abs_error << "."; - return AssertionFailure(msg); -} - - -// Helper template for implementing FloatLE() and DoubleLE(). -template -AssertionResult FloatingPointLE(const char* expr1, - const char* expr2, - RawType val1, - RawType val2) { - // Returns success if val1 is less than val2, - if (val1 < val2) { - return AssertionSuccess(); - } - - // or if val1 is almost equal to val2. - const FloatingPoint lhs(val1), rhs(val2); - if (lhs.AlmostEquals(rhs)) { - return AssertionSuccess(); - } - - // Note that the above two checks will both fail if either val1 or - // val2 is NaN, as the IEEE floating-point standard requires that - // any predicate involving a NaN must return false. - - StrStream val1_ss; - val1_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << val1; - - StrStream val2_ss; - val2_ss << std::setprecision(std::numeric_limits::digits10 + 2) - << val2; - - Message msg; - msg << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" - << " Actual: " << StrStreamToString(&val1_ss) << " vs " - << StrStreamToString(&val2_ss); - - return AssertionFailure(msg); -} - -} // namespace internal - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult FloatLE(const char* expr1, const char* expr2, - float val1, float val2) { - return internal::FloatingPointLE(expr1, expr2, val1, val2); -} - -// Asserts that val1 is less than, or almost equal to, val2. Fails -// otherwise. In particular, it fails if either val1 or val2 is NaN. -AssertionResult DoubleLE(const char* expr1, const char* expr2, - double val1, double val2) { - return internal::FloatingPointLE(expr1, expr2, val1, val2); -} - -namespace internal { - -// The helper function for {ASSERT|EXPECT}_EQ with int or enum -// arguments. -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual) { - if (expected == actual) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - FormatForComparisonFailureMessage(expected, actual), - FormatForComparisonFailureMessage(actual, expected), - false); -} - -// A macro for implementing the helper functions needed to implement -// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here -// just to avoid copy-and-paste of similar code. -#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - BiggestInt val1, BiggestInt val2) {\ - if (val1 op val2) {\ - return AssertionSuccess();\ - } else {\ - Message msg;\ - msg << "Expected: (" << expr1 << ") " #op " (" << expr2\ - << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ - << " vs " << FormatForComparisonFailureMessage(val2, val1);\ - return AssertionFailure(msg);\ - }\ -} - -// Implements the helper function for {ASSERT|EXPECT}_NE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(NE, !=) -// Implements the helper function for {ASSERT|EXPECT}_LE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(LE, <=) -// Implements the helper function for {ASSERT|EXPECT}_LT with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(LT, < ) -// Implements the helper function for {ASSERT|EXPECT}_GE with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(GE, >=) -// Implements the helper function for {ASSERT|EXPECT}_GT with int or -// enum arguments. -GTEST_IMPL_CMP_HELPER_(GT, > ) - -#undef GTEST_IMPL_CMP_HELPER_ - -// The helper function for {ASSERT|EXPECT}_STREQ. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual) { - if (String::CStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowCStringQuoted(expected), - String::ShowCStringQuoted(actual), - false); -} - -// The helper function for {ASSERT|EXPECT}_STRCASEEQ. -AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, - const char* actual_expression, - const char* expected, - const char* actual) { - if (String::CaseInsensitiveCStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowCStringQuoted(expected), - String::ShowCStringQuoted(actual), - true); -} - -// The helper function for {ASSERT|EXPECT}_STRNE. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2) { - if (!String::CStringEquals(s1, s2)) { - return AssertionSuccess(); - } else { - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << "), actual: \"" - << s1 << "\" vs \"" << s2 << "\""; - return AssertionFailure(msg); - } -} - -// The helper function for {ASSERT|EXPECT}_STRCASENE. -AssertionResult CmpHelperSTRCASENE(const char* s1_expression, - const char* s2_expression, - const char* s1, - const char* s2) { - if (!String::CaseInsensitiveCStringEquals(s1, s2)) { - return AssertionSuccess(); - } else { - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << ") (ignoring case), actual: \"" - << s1 << "\" vs \"" << s2 << "\""; - return AssertionFailure(msg); - } -} - -} // namespace internal - -namespace { - -// Helper functions for implementing IsSubString() and IsNotSubstring(). - -// This group of overloaded functions return true iff needle is a -// substring of haystack. NULL is considered a substring of itself -// only. - -bool IsSubstringPred(const char* needle, const char* haystack) { - if (needle == NULL || haystack == NULL) - return needle == haystack; - - return strstr(haystack, needle) != NULL; -} - -bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { - if (needle == NULL || haystack == NULL) - return needle == haystack; - - return wcsstr(haystack, needle) != NULL; -} - -// StringType here can be either ::std::string or ::std::wstring. -template -bool IsSubstringPred(const StringType& needle, - const StringType& haystack) { - return haystack.find(needle) != StringType::npos; -} - -// This function implements either IsSubstring() or IsNotSubstring(), -// depending on the value of the expected_to_be_substring parameter. -// StringType here can be const char*, const wchar_t*, ::std::string, -// or ::std::wstring. -template -AssertionResult IsSubstringImpl( - bool expected_to_be_substring, - const char* needle_expr, const char* haystack_expr, - const StringType& needle, const StringType& haystack) { - if (IsSubstringPred(needle, haystack) == expected_to_be_substring) - return AssertionSuccess(); - - const bool is_wide_string = sizeof(needle[0]) > 1; - const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; - return AssertionFailure( - Message() - << "Value of: " << needle_expr << "\n" - << " Actual: " << begin_string_quote << needle << "\"\n" - << "Expected: " << (expected_to_be_substring ? "" : "not ") - << "a substring of " << haystack_expr << "\n" - << "Which is: " << begin_string_quote << haystack << "\""); -} - -} // namespace - -// IsSubstring() and IsNotSubstring() check whether needle is a -// substring of haystack (NULL is considered a substring of itself -// only), and return an appropriate error message when they fail. - -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const char* needle, const char* haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const wchar_t* needle, const wchar_t* haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} - -#if GTEST_HAS_STD_STRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::string& needle, const ::std::string& haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -AssertionResult IsSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack) { - return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); -} - -AssertionResult IsNotSubstring( - const char* needle_expr, const char* haystack_expr, - const ::std::wstring& needle, const ::std::wstring& haystack) { - return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); -} -#endif // GTEST_HAS_STD_WSTRING - -namespace internal { - -#if GTEST_OS_WINDOWS - -namespace { - -// Helper function for IsHRESULT{SuccessFailure} predicates -AssertionResult HRESULTFailureHelper(const char* expr, - const char* expected, - long hr) { // NOLINT -#if GTEST_OS_WINDOWS_MOBILE - // Windows CE doesn't support FormatMessage. - const char error_text[] = ""; -#else - // Looks up the human-readable system message for the HRESULT code - // and since we're not passing any params to FormatMessage, we don't - // want inserts expanded. - const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS; - const DWORD kBufSize = 4096; // String::Format can't exceed this length. - // Gets the system's human readable message string for this HRESULT. - char error_text[kBufSize] = { '\0' }; - DWORD message_length = ::FormatMessageA(kFlags, - 0, // no source, we're asking system - hr, // the error - 0, // no line width restrictions - error_text, // output buffer - kBufSize, // buf size - NULL); // no arguments for inserts - // Trims tailing white space (FormatMessage leaves a trailing cr-lf) - for (; message_length && isspace(error_text[message_length - 1]); - --message_length) { - error_text[message_length - 1] = '\0'; - } -#endif // GTEST_OS_WINDOWS_MOBILE - - const String error_hex(String::Format("0x%08X ", hr)); - Message msg; - msg << "Expected: " << expr << " " << expected << ".\n" - << " Actual: " << error_hex << error_text << "\n"; - - return ::testing::AssertionFailure(msg); -} - -} // namespace - -AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT - if (SUCCEEDED(hr)) { - return AssertionSuccess(); - } - return HRESULTFailureHelper(expr, "succeeds", hr); -} - -AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT - if (FAILED(hr)) { - return AssertionSuccess(); - } - return HRESULTFailureHelper(expr, "fails", hr); -} - -#endif // GTEST_OS_WINDOWS - -// Utility functions for encoding Unicode text (wide strings) in -// UTF-8. - -// A Unicode code-point can have upto 21 bits, and is encoded in UTF-8 -// like this: -// -// Code-point length Encoding -// 0 - 7 bits 0xxxxxxx -// 8 - 11 bits 110xxxxx 10xxxxxx -// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx -// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - -// The maximum code-point a one-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint1 = (static_cast(1) << 7) - 1; - -// The maximum code-point a two-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint2 = (static_cast(1) << (5 + 6)) - 1; - -// The maximum code-point a three-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint3 = (static_cast(1) << (4 + 2*6)) - 1; - -// The maximum code-point a four-byte UTF-8 sequence can represent. -const UInt32 kMaxCodePoint4 = (static_cast(1) << (3 + 3*6)) - 1; - -// Chops off the n lowest bits from a bit pattern. Returns the n -// lowest bits. As a side effect, the original bit pattern will be -// shifted to the right by n bits. -inline UInt32 ChopLowBits(UInt32* bits, int n) { - const UInt32 low_bits = *bits & ((static_cast(1) << n) - 1); - *bits >>= n; - return low_bits; -} - -// Converts a Unicode code point to a narrow string in UTF-8 encoding. -// code_point parameter is of type UInt32 because wchar_t may not be -// wide enough to contain a code point. -// The output buffer str must containt at least 32 characters. -// The function returns the address of the output buffer. -// If the code_point is not a valid Unicode code point -// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. -char* CodePointToUtf8(UInt32 code_point, char* str) { - if (code_point <= kMaxCodePoint1) { - str[1] = '\0'; - str[0] = static_cast(code_point); // 0xxxxxxx - } else if (code_point <= kMaxCodePoint2) { - str[2] = '\0'; - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xC0 | code_point); // 110xxxxx - } else if (code_point <= kMaxCodePoint3) { - str[3] = '\0'; - str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xE0 | code_point); // 1110xxxx - } else if (code_point <= kMaxCodePoint4) { - str[4] = '\0'; - str[3] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx - str[0] = static_cast(0xF0 | code_point); // 11110xxx - } else { - // The longest string String::Format can produce when invoked - // with these parameters is 28 character long (not including - // the terminating nul character). We are asking for 32 character - // buffer just in case. This is also enough for strncpy to - // null-terminate the destination string. - posix::StrNCpy( - str, String::Format("(Invalid Unicode 0x%X)", code_point).c_str(), 32); - str[31] = '\0'; // Makes sure no change in the format to strncpy leaves - // the result unterminated. - } - return str; -} - -// The following two functions only make sense if the the system -// uses UTF-16 for wide string encoding. All supported systems -// with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16. - -// Determines if the arguments constitute UTF-16 surrogate pair -// and thus should be combined into a single Unicode code point -// using CreateCodePointFromUtf16SurrogatePair. -inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) { - return sizeof(wchar_t) == 2 && - (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00; -} - -// Creates a Unicode code point from UTF16 surrogate pair. -inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first, - wchar_t second) { - const UInt32 mask = (1 << 10) - 1; - return (sizeof(wchar_t) == 2) ? - (((first & mask) << 10) | (second & mask)) + 0x10000 : - // This function should not be called when the condition is - // false, but we provide a sensible default in case it is. - static_cast(first); -} - -// Converts a wide string to a narrow string in UTF-8 encoding. -// The wide string is assumed to have the following encoding: -// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin, Symbian OS) -// UTF-32 if sizeof(wchar_t) == 4 (on Linux) -// Parameter str points to a null-terminated wide string. -// Parameter num_chars may additionally limit the number -// of wchar_t characters processed. -1 is used when the entire string -// should be processed. -// If the string contains code points that are not valid Unicode code points -// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output -// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding -// and contains invalid UTF-16 surrogate pairs, values in those pairs -// will be encoded as individual Unicode characters from Basic Normal Plane. -String WideStringToUtf8(const wchar_t* str, int num_chars) { - if (num_chars == -1) - num_chars = static_cast(wcslen(str)); - - StrStream stream; - for (int i = 0; i < num_chars; ++i) { - UInt32 unicode_code_point; - - if (str[i] == L'\0') { - break; - } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) { - unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i], - str[i + 1]); - i++; - } else { - unicode_code_point = static_cast(str[i]); - } - - char buffer[32]; // CodePointToUtf8 requires a buffer this big. - stream << CodePointToUtf8(unicode_code_point, buffer); - } - return StrStreamToString(&stream); -} - -// Converts a wide C string to a String using the UTF-8 encoding. -// NULL will be converted to "(null)". -String String::ShowWideCString(const wchar_t * wide_c_str) { - if (wide_c_str == NULL) return String("(null)"); - - return String(internal::WideStringToUtf8(wide_c_str, -1).c_str()); -} - -// Similar to ShowWideCString(), except that this function encloses -// the converted string in double quotes. -String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) { - if (wide_c_str == NULL) return String("(null)"); - - return String::Format("L\"%s\"", - String::ShowWideCString(wide_c_str).c_str()); -} - -// Compares two wide C strings. Returns true iff they have the same -// content. -// -// Unlike wcscmp(), this function can handle NULL argument(s). A NULL -// C string is considered different to any non-NULL C string, -// including the empty string. -bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) { - if (lhs == NULL) return rhs == NULL; - - if (rhs == NULL) return false; - - return wcscmp(lhs, rhs) == 0; -} - -// Helper function for *_STREQ on wide strings. -AssertionResult CmpHelperSTREQ(const char* expected_expression, - const char* actual_expression, - const wchar_t* expected, - const wchar_t* actual) { - if (String::WideCStringEquals(expected, actual)) { - return AssertionSuccess(); - } - - return EqFailure(expected_expression, - actual_expression, - String::ShowWideCStringQuoted(expected), - String::ShowWideCStringQuoted(actual), - false); -} - -// Helper function for *_STRNE on wide strings. -AssertionResult CmpHelperSTRNE(const char* s1_expression, - const char* s2_expression, - const wchar_t* s1, - const wchar_t* s2) { - if (!String::WideCStringEquals(s1, s2)) { - return AssertionSuccess(); - } - - Message msg; - msg << "Expected: (" << s1_expression << ") != (" - << s2_expression << "), actual: " - << String::ShowWideCStringQuoted(s1) - << " vs " << String::ShowWideCStringQuoted(s2); - return AssertionFailure(msg); -} - -// Compares two C strings, ignoring case. Returns true iff they have -// the same content. -// -// Unlike strcasecmp(), this function can handle NULL argument(s). A -// NULL C string is considered different to any non-NULL C string, -// including the empty string. -bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { - if (lhs == NULL) - return rhs == NULL; - if (rhs == NULL) - return false; - return posix::StrCaseCmp(lhs, rhs) == 0; -} - - // Compares two wide C strings, ignoring case. Returns true iff they - // have the same content. - // - // Unlike wcscasecmp(), this function can handle NULL argument(s). - // A NULL C string is considered different to any non-NULL wide C string, - // including the empty string. - // NB: The implementations on different platforms slightly differ. - // On windows, this method uses _wcsicmp which compares according to LC_CTYPE - // environment variable. On GNU platform this method uses wcscasecmp - // which compares according to LC_CTYPE category of the current locale. - // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the - // current locale. -bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, - const wchar_t* rhs) { - if ( lhs == NULL ) return rhs == NULL; - - if ( rhs == NULL ) return false; - -#if GTEST_OS_WINDOWS - return _wcsicmp(lhs, rhs) == 0; -#elif GTEST_OS_LINUX - return wcscasecmp(lhs, rhs) == 0; -#else - // Mac OS X and Cygwin don't define wcscasecmp. Other unknown OSes - // may not define it either. - wint_t left, right; - do { - left = towlower(*lhs++); - right = towlower(*rhs++); - } while (left && left == right); - return left == right; -#endif // OS selector -} - -// Compares this with another String. -// Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0 -// if this is greater than rhs. -int String::Compare(const String & rhs) const { - const char* const lhs_c_str = c_str(); - const char* const rhs_c_str = rhs.c_str(); - - if (lhs_c_str == NULL) { - return rhs_c_str == NULL ? 0 : -1; // NULL < anything except NULL - } else if (rhs_c_str == NULL) { - return 1; - } - - const size_t shorter_str_len = - length() <= rhs.length() ? length() : rhs.length(); - for (size_t i = 0; i != shorter_str_len; i++) { - if (lhs_c_str[i] < rhs_c_str[i]) { - return -1; - } else if (lhs_c_str[i] > rhs_c_str[i]) { - return 1; - } - } - return (length() < rhs.length()) ? -1 : - (length() > rhs.length()) ? 1 : 0; -} - -// Returns true iff this String ends with the given suffix. *Any* -// String is considered to end with a NULL or empty suffix. -bool String::EndsWith(const char* suffix) const { - if (suffix == NULL || CStringEquals(suffix, "")) return true; - - if (c_str() == NULL) return false; - - const size_t this_len = strlen(c_str()); - const size_t suffix_len = strlen(suffix); - return (this_len >= suffix_len) && - CStringEquals(c_str() + this_len - suffix_len, suffix); -} - -// Returns true iff this String ends with the given suffix, ignoring case. -// Any String is considered to end with a NULL or empty suffix. -bool String::EndsWithCaseInsensitive(const char* suffix) const { - if (suffix == NULL || CStringEquals(suffix, "")) return true; - - if (c_str() == NULL) return false; - - const size_t this_len = strlen(c_str()); - const size_t suffix_len = strlen(suffix); - return (this_len >= suffix_len) && - CaseInsensitiveCStringEquals(c_str() + this_len - suffix_len, suffix); -} - -// Formats a list of arguments to a String, using the same format -// spec string as for printf. -// -// We do not use the StringPrintf class as it is not universally -// available. -// -// The result is limited to 4096 characters (including the tailing 0). -// If 4096 characters are not enough to format the input, or if -// there's an error, "" is -// returned. -String String::Format(const char * format, ...) { - va_list args; - va_start(args, format); - - char buffer[4096]; - const int kBufferSize = sizeof(buffer)/sizeof(buffer[0]); - - // MSVC 8 deprecates vsnprintf(), so we want to suppress warning - // 4996 (deprecated function) there. -#ifdef _MSC_VER // We are using MSVC. -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4996) // Temporarily disables warning 4996. - const int size = vsnprintf(buffer, kBufferSize, format, args); -#pragma warning(pop) // Restores the warning state. -#else // We are not using MSVC. - const int size = vsnprintf(buffer, kBufferSize, format, args); -#endif // _MSC_VER - va_end(args); - - // vsnprintf()'s behavior is not portable. When the buffer is not - // big enough, it returns a negative value in MSVC, and returns the - // needed buffer size on Linux. When there is an output error, it - // always returns a negative value. For simplicity, we lump the two - // error cases together. - if (size < 0 || size >= kBufferSize) { - return String(""); - } else { - return String(buffer, size); - } -} - -// Converts the buffer in a StrStream to a String, converting NUL -// bytes to "\\0" along the way. -String StrStreamToString(StrStream* ss) { -#if GTEST_HAS_STD_STRING - const ::std::string& str = ss->str(); - const char* const start = str.c_str(); - const char* const end = start + str.length(); -#else - const char* const start = ss->str(); - const char* const end = start + ss->pcount(); -#endif // GTEST_HAS_STD_STRING - - // We need to use a helper StrStream to do this transformation - // because String doesn't support push_back(). - StrStream helper; - for (const char* ch = start; ch != end; ++ch) { - if (*ch == '\0') { - helper << "\\0"; // Replaces NUL with "\\0"; - } else { - helper.put(*ch); - } - } - -#if GTEST_HAS_STD_STRING - return String(helper.str().c_str()); -#else - const String str(helper.str(), helper.pcount()); - helper.freeze(false); - ss->freeze(false); - return str; -#endif // GTEST_HAS_STD_STRING -} - -// Appends the user-supplied message to the Google-Test-generated message. -String AppendUserMessage(const String& gtest_msg, - const Message& user_msg) { - // Appends the user message if it's non-empty. - const String user_msg_string = user_msg.GetString(); - if (user_msg_string.empty()) { - return gtest_msg; - } - - Message msg; - msg << gtest_msg << "\n" << user_msg_string; - - return msg.GetString(); -} - -} // namespace internal - -// class TestResult - -// Creates an empty TestResult. -TestResult::TestResult() - : test_part_results_(new internal::Vector), - test_properties_(new internal::Vector), - death_test_count_(0), - elapsed_time_(0) { -} - -// D'tor. -TestResult::~TestResult() { -} - -// Returns the i-th test part result among all the results. i can -// range from 0 to total_part_count() - 1. If i is not in that range, -// aborts the program. -const TestPartResult& TestResult::GetTestPartResult(int i) const { - return test_part_results_->GetElement(i); -} - -// Returns the i-th test property. i can range from 0 to -// test_property_count() - 1. If i is not in that range, aborts the -// program. -const TestProperty& TestResult::GetTestProperty(int i) const { - return test_properties_->GetElement(i); -} - -// Clears the test part results. -void TestResult::ClearTestPartResults() { - test_part_results_->Clear(); -} - -// Adds a test part result to the list. -void TestResult::AddTestPartResult(const TestPartResult& test_part_result) { - test_part_results_->PushBack(test_part_result); -} - -// Adds a test property to the list. If a property with the same key as the -// supplied property is already represented, the value of this test_property -// replaces the old value for that key. -void TestResult::RecordProperty(const TestProperty& test_property) { - if (!ValidateTestProperty(test_property)) { - return; - } - internal::MutexLock lock(&test_properites_mutex_); - TestProperty* const property_with_matching_key = - test_properties_->FindIf( - internal::TestPropertyKeyIs(test_property.key())); - if (property_with_matching_key == NULL) { - test_properties_->PushBack(test_property); - return; - } - property_with_matching_key->SetValue(test_property.value()); -} - -// Adds a failure if the key is a reserved attribute of Google Test -// testcase tags. Returns true if the property is valid. -bool TestResult::ValidateTestProperty(const TestProperty& test_property) { - internal::String key(test_property.key()); - if (key == "name" || key == "status" || key == "time" || key == "classname") { - ADD_FAILURE() - << "Reserved key used in RecordProperty(): " - << key - << " ('name', 'status', 'time', and 'classname' are reserved by " - << GTEST_NAME_ << ")"; - return false; - } - return true; -} - -// Clears the object. -void TestResult::Clear() { - test_part_results_->Clear(); - test_properties_->Clear(); - death_test_count_ = 0; - elapsed_time_ = 0; -} - -// Returns true iff the test failed. -bool TestResult::Failed() const { - for (int i = 0; i < total_part_count(); ++i) { - if (GetTestPartResult(i).failed()) - return true; - } - return false; -} - -// Returns true iff the test part fatally failed. -static bool TestPartFatallyFailed(const TestPartResult& result) { - return result.fatally_failed(); -} - -// Returns true iff the test fatally failed. -bool TestResult::HasFatalFailure() const { - return test_part_results_->CountIf(TestPartFatallyFailed) > 0; -} - -// Returns true iff the test part non-fatally failed. -static bool TestPartNonfatallyFailed(const TestPartResult& result) { - return result.nonfatally_failed(); -} - -// Returns true iff the test has a non-fatal failure. -bool TestResult::HasNonfatalFailure() const { - return test_part_results_->CountIf(TestPartNonfatallyFailed) > 0; -} - -// Gets the number of all test parts. This is the sum of the number -// of successful test parts and the number of failed test parts. -int TestResult::total_part_count() const { - return test_part_results_->size(); -} - -// Returns the number of the test properties. -int TestResult::test_property_count() const { - return test_properties_->size(); -} - -// class Test - -// Creates a Test object. - -// The c'tor saves the values of all Google Test flags. -Test::Test() - : gtest_flag_saver_(new internal::GTestFlagSaver) { -} - -// The d'tor restores the values of all Google Test flags. -Test::~Test() { - delete gtest_flag_saver_; -} - -// Sets up the test fixture. -// -// A sub-class may override this. -void Test::SetUp() { -} - -// Tears down the test fixture. -// -// A sub-class may override this. -void Test::TearDown() { -} - -// Allows user supplied key value pairs to be recorded for later output. -void Test::RecordProperty(const char* key, const char* value) { - UnitTest::GetInstance()->RecordPropertyForCurrentTest(key, value); -} - -// Allows user supplied key value pairs to be recorded for later output. -void Test::RecordProperty(const char* key, int value) { - Message value_message; - value_message << value; - RecordProperty(key, value_message.GetString().c_str()); -} - -namespace internal { - -void ReportFailureInUnknownLocation(TestPartResult::Type result_type, - const String& message) { - // This function is a friend of UnitTest and as such has access to - // AddTestPartResult. - UnitTest::GetInstance()->AddTestPartResult( - result_type, - NULL, // No info about the source file where the exception occurred. - -1, // We have no info on which line caused the exception. - message, - String()); // No stack trace, either. -} - -} // namespace internal - -#if GTEST_OS_WINDOWS -// We are on Windows. - -// Adds an "exception thrown" fatal failure to the current test. -static void AddExceptionThrownFailure(DWORD exception_code, - const char* location) { - Message message; - message << "Exception thrown with code 0x" << std::setbase(16) << - exception_code << std::setbase(10) << " in " << location << "."; - - internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure, - message.GetString()); -} - -#endif // GTEST_OS_WINDOWS - -// Google Test requires all tests in the same test case to use the same test -// fixture class. This function checks if the current test has the -// same fixture class as the first test in the current test case. If -// yes, it returns true; otherwise it generates a Google Test failure and -// returns false. -bool Test::HasSameFixtureClass() { - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - const TestCase* const test_case = impl->current_test_case(); - - // Info about the first test in the current test case. - const internal::TestInfoImpl* const first_test_info = - test_case->test_info_list().GetElement(0)->impl(); - const internal::TypeId first_fixture_id = first_test_info->fixture_class_id(); - const char* const first_test_name = first_test_info->name(); - - // Info about the current test. - const internal::TestInfoImpl* const this_test_info = - impl->current_test_info()->impl(); - const internal::TypeId this_fixture_id = this_test_info->fixture_class_id(); - const char* const this_test_name = this_test_info->name(); - - if (this_fixture_id != first_fixture_id) { - // Is the first test defined using TEST? - const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId(); - // Is this test defined using TEST? - const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId(); - - if (first_is_TEST || this_is_TEST) { - // The user mixed TEST and TEST_F in this test case - we'll tell - // him/her how to fix it. - - // Gets the name of the TEST and the name of the TEST_F. Note - // that first_is_TEST and this_is_TEST cannot both be true, as - // the fixture IDs are different for the two tests. - const char* const TEST_name = - first_is_TEST ? first_test_name : this_test_name; - const char* const TEST_F_name = - first_is_TEST ? this_test_name : first_test_name; - - ADD_FAILURE() - << "All tests in the same test case must use the same test fixture\n" - << "class, so mixing TEST_F and TEST in the same test case is\n" - << "illegal. In test case " << this_test_info->test_case_name() - << ",\n" - << "test " << TEST_F_name << " is defined using TEST_F but\n" - << "test " << TEST_name << " is defined using TEST. You probably\n" - << "want to change the TEST to TEST_F or move it to another test\n" - << "case."; - } else { - // The user defined two fixture classes with the same name in - // two namespaces - we'll tell him/her how to fix it. - ADD_FAILURE() - << "All tests in the same test case must use the same test fixture\n" - << "class. However, in test case " - << this_test_info->test_case_name() << ",\n" - << "you defined test " << first_test_name - << " and test " << this_test_name << "\n" - << "using two different test fixture classes. This can happen if\n" - << "the two classes are from different namespaces or translation\n" - << "units and have the same name. You should probably rename one\n" - << "of the classes to put the tests into different test cases."; - } - return false; - } - - return true; -} - -// Runs the test and updates the test result. -void Test::Run() { - if (!HasSameFixtureClass()) return; - - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - SetUp(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "SetUp()"); - } - - // We will run the test only if SetUp() had no fatal failure. - if (!HasFatalFailure()) { - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - TestBody(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "the test body"); - } - } - - // However, we want to clean up as much as possible. Hence we will - // always call TearDown(), even if SetUp() or the test body has - // failed. - impl->os_stack_trace_getter()->UponLeavingGTest(); - __try { - TearDown(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), "TearDown()"); - } - -#else // We are on a compiler or platform that doesn't support SEH. - impl->os_stack_trace_getter()->UponLeavingGTest(); - SetUp(); - - // We will run the test only if SetUp() was successful. - if (!HasFatalFailure()) { - impl->os_stack_trace_getter()->UponLeavingGTest(); - TestBody(); - } - - // However, we want to clean up as much as possible. Hence we will - // always call TearDown(), even if SetUp() or the test body has - // failed. - impl->os_stack_trace_getter()->UponLeavingGTest(); - TearDown(); -#endif // GTEST_HAS_SEH -} - - -// Returns true iff the current test has a fatal failure. -bool Test::HasFatalFailure() { - return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure(); -} - -// Returns true iff the current test has a non-fatal failure. -bool Test::HasNonfatalFailure() { - return internal::GetUnitTestImpl()->current_test_result()-> - HasNonfatalFailure(); -} - -// class TestInfo - -// Constructs a TestInfo object. It assumes ownership of the test factory -// object via impl_. -TestInfo::TestInfo(const char* test_case_name, - const char* name, - const char* test_case_comment, - const char* comment, - internal::TypeId fixture_class_id, - internal::TestFactoryBase* factory) { - impl_ = new internal::TestInfoImpl(this, test_case_name, name, - test_case_comment, comment, - fixture_class_id, factory); -} - -// Destructs a TestInfo object. -TestInfo::~TestInfo() { - delete impl_; -} - -namespace internal { - -// Creates a new TestInfo object and registers it with Google Test; -// returns the created object. -// -// Arguments: -// -// test_case_name: name of the test case -// name: name of the test -// test_case_comment: a comment on the test case that will be included in -// the test output -// comment: a comment on the test that will be included in the -// test output -// fixture_class_id: ID of the test fixture class -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -// factory: pointer to the factory that creates a test object. -// The newly created TestInfo instance will assume -// ownership of the factory object. -TestInfo* MakeAndRegisterTestInfo( - const char* test_case_name, const char* name, - const char* test_case_comment, const char* comment, - TypeId fixture_class_id, - SetUpTestCaseFunc set_up_tc, - TearDownTestCaseFunc tear_down_tc, - TestFactoryBase* factory) { - TestInfo* const test_info = - new TestInfo(test_case_name, name, test_case_comment, comment, - fixture_class_id, factory); - GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info); - return test_info; -} - -#if GTEST_HAS_PARAM_TEST -void ReportInvalidTestCaseType(const char* test_case_name, - const char* file, int line) { - Message errors; - errors - << "Attempted redefinition of test case " << test_case_name << ".\n" - << "All tests in the same test case must use the same test fixture\n" - << "class. However, in test case " << test_case_name << ", you tried\n" - << "to define a test using a fixture class different from the one\n" - << "used earlier. This can happen if the two fixture classes are\n" - << "from different namespaces and have the same name. You should\n" - << "probably rename one of the classes to put the tests into different\n" - << "test cases."; - - fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), - errors.GetString().c_str()); -} -#endif // GTEST_HAS_PARAM_TEST - -} // namespace internal - -// Returns the test case name. -const char* TestInfo::test_case_name() const { - return impl_->test_case_name(); -} - -// Returns the test name. -const char* TestInfo::name() const { - return impl_->name(); -} - -// Returns the test case comment. -const char* TestInfo::test_case_comment() const { - return impl_->test_case_comment(); -} - -// Returns the test comment. -const char* TestInfo::comment() const { - return impl_->comment(); -} - -// Returns true if this test should run. -bool TestInfo::should_run() const { return impl_->should_run(); } - -// Returns true if this test matches the user-specified filter. -bool TestInfo::matches_filter() const { return impl_->matches_filter(); } - -// Returns the result of the test. -const TestResult* TestInfo::result() const { return impl_->result(); } - -// Increments the number of death tests encountered in this test so -// far. -int TestInfo::increment_death_test_count() { - return impl_->result()->increment_death_test_count(); -} - -namespace { - -// A predicate that checks the test name of a TestInfo against a known -// value. -// -// This is used for implementation of the TestCase class only. We put -// it in the anonymous namespace to prevent polluting the outer -// namespace. -// -// TestNameIs is copyable. -class TestNameIs { - public: - // Constructor. - // - // TestNameIs has NO default constructor. - explicit TestNameIs(const char* name) - : name_(name) {} - - // Returns true iff the test name of test_info matches name_. - bool operator()(const TestInfo * test_info) const { - return test_info && internal::String(test_info->name()).Compare(name_) == 0; - } - - private: - internal::String name_; -}; - -} // namespace - -namespace internal { - -// This method expands all parameterized tests registered with macros TEST_P -// and INSTANTIATE_TEST_CASE_P into regular tests and registers those. -// This will be done just once during the program runtime. -void UnitTestImpl::RegisterParameterizedTests() { -#if GTEST_HAS_PARAM_TEST - if (!parameterized_tests_registered_) { - parameterized_test_registry_.RegisterTests(); - parameterized_tests_registered_ = true; - } -#endif -} - -// Creates the test object, runs it, records its result, and then -// deletes it. -void TestInfoImpl::Run() { - if (!should_run_) return; - - // Tells UnitTest where to store test result. - UnitTestImpl* const impl = internal::GetUnitTestImpl(); - impl->set_current_test_info(parent_); - - TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); - - // Notifies the unit test event listeners that a test is about to start. - repeater->OnTestStart(*parent_); - - const TimeInMillis start = GetTimeInMillis(); - - impl->os_stack_trace_getter()->UponLeavingGTest(); -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - Test* test = NULL; - - __try { - // Creates the test object. - test = factory_->CreateTest(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - AddExceptionThrownFailure(GetExceptionCode(), - "the test fixture's constructor"); - return; - } -#else // We are on a compiler or platform that doesn't support SEH. - - // TODO(wan): If test->Run() throws, test won't be deleted. This is - // not a problem now as we don't use exceptions. If we were to - // enable exceptions, we should revise the following to be - // exception-safe. - - // Creates the test object. - Test* test = factory_->CreateTest(); -#endif // GTEST_HAS_SEH - - // Runs the test only if the constructor of the test fixture didn't - // generate a fatal failure. - if (!Test::HasFatalFailure()) { - test->Run(); - } - - // Deletes the test object. - impl->os_stack_trace_getter()->UponLeavingGTest(); - delete test; - test = NULL; - - result_.set_elapsed_time(GetTimeInMillis() - start); - - // Notifies the unit test event listener that a test has just finished. - repeater->OnTestEnd(*parent_); - - // Tells UnitTest to stop associating assertion results to this - // test. - impl->set_current_test_info(NULL); -} - -} // namespace internal - -// class TestCase - -// Gets the number of successful tests in this test case. -int TestCase::successful_test_count() const { - return test_info_list_->CountIf(TestPassed); -} - -// Gets the number of failed tests in this test case. -int TestCase::failed_test_count() const { - return test_info_list_->CountIf(TestFailed); -} - -int TestCase::disabled_test_count() const { - return test_info_list_->CountIf(TestDisabled); -} - -// Get the number of tests in this test case that should run. -int TestCase::test_to_run_count() const { - return test_info_list_->CountIf(ShouldRunTest); -} - -// Gets the number of all tests. -int TestCase::total_test_count() const { - return test_info_list_->size(); -} - -// Creates a TestCase with the given name. -// -// Arguments: -// -// name: name of the test case -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -TestCase::TestCase(const char* name, const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc) - : name_(name), - comment_(comment), - test_info_list_(new internal::Vector), - test_indices_(new internal::Vector), - set_up_tc_(set_up_tc), - tear_down_tc_(tear_down_tc), - should_run_(false), - elapsed_time_(0) { -} - -// Destructor of TestCase. -TestCase::~TestCase() { - // Deletes every Test in the collection. - test_info_list_->ForEach(internal::Delete); -} - -// Returns the i-th test among all the tests. i can range from 0 to -// total_test_count() - 1. If i is not in that range, returns NULL. -const TestInfo* TestCase::GetTestInfo(int i) const { - const int index = test_indices_->GetElementOr(i, -1); - return index < 0 ? NULL : test_info_list_->GetElement(index); -} - -// Returns the i-th test among all the tests. i can range from 0 to -// total_test_count() - 1. If i is not in that range, returns NULL. -TestInfo* TestCase::GetMutableTestInfo(int i) { - const int index = test_indices_->GetElementOr(i, -1); - return index < 0 ? NULL : test_info_list_->GetElement(index); -} - -// Adds a test to this test case. Will delete the test upon -// destruction of the TestCase object. -void TestCase::AddTestInfo(TestInfo * test_info) { - test_info_list_->PushBack(test_info); - test_indices_->PushBack(test_indices_->size()); -} - -// Runs every test in this TestCase. -void TestCase::Run() { - if (!should_run_) return; - - internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); - impl->set_current_test_case(this); - - TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); - - repeater->OnTestCaseStart(*this); - impl->os_stack_trace_getter()->UponLeavingGTest(); - set_up_tc_(); - - const internal::TimeInMillis start = internal::GetTimeInMillis(); - for (int i = 0; i < total_test_count(); i++) { - GetMutableTestInfo(i)->impl()->Run(); - } - elapsed_time_ = internal::GetTimeInMillis() - start; - - impl->os_stack_trace_getter()->UponLeavingGTest(); - tear_down_tc_(); - repeater->OnTestCaseEnd(*this); - impl->set_current_test_case(NULL); -} - -// Clears the results of all tests in this test case. -void TestCase::ClearResult() { - test_info_list_->ForEach(internal::TestInfoImpl::ClearTestResult); -} - -// Returns true iff test passed. -bool TestCase::TestPassed(const TestInfo * test_info) { - const internal::TestInfoImpl* const impl = test_info->impl(); - return impl->should_run() && impl->result()->Passed(); -} - -// Returns true iff test failed. -bool TestCase::TestFailed(const TestInfo * test_info) { - const internal::TestInfoImpl* const impl = test_info->impl(); - return impl->should_run() && impl->result()->Failed(); -} - -// Returns true iff test is disabled. -bool TestCase::TestDisabled(const TestInfo * test_info) { - return test_info->impl()->is_disabled(); -} - -// Returns true if the given test should run. -bool TestCase::ShouldRunTest(const TestInfo *test_info) { - return test_info->impl()->should_run(); -} - -// Shuffles the tests in this test case. -void TestCase::ShuffleTests(internal::Random* random) { - test_indices_->Shuffle(random); -} - -// Restores the test order to before the first shuffle. -void TestCase::UnshuffleTests() { - for (int i = 0; i < test_indices_->size(); i++) { - test_indices_->GetMutableElement(i) = i; - } -} - -// Formats a countable noun. Depending on its quantity, either the -// singular form or the plural form is used. e.g. -// -// FormatCountableNoun(1, "formula", "formuli") returns "1 formula". -// FormatCountableNoun(5, "book", "books") returns "5 books". -static internal::String FormatCountableNoun(int count, - const char * singular_form, - const char * plural_form) { - return internal::String::Format("%d %s", count, - count == 1 ? singular_form : plural_form); -} - -// Formats the count of tests. -static internal::String FormatTestCount(int test_count) { - return FormatCountableNoun(test_count, "test", "tests"); -} - -// Formats the count of test cases. -static internal::String FormatTestCaseCount(int test_case_count) { - return FormatCountableNoun(test_case_count, "test case", "test cases"); -} - -// Converts a TestPartResult::Type enum to human-friendly string -// representation. Both kNonFatalFailure and kFatalFailure are translated -// to "Failure", as the user usually doesn't care about the difference -// between the two when viewing the test result. -static const char * TestPartResultTypeToString(TestPartResult::Type type) { - switch (type) { - case TestPartResult::kSuccess: - return "Success"; - - case TestPartResult::kNonFatalFailure: - case TestPartResult::kFatalFailure: -#ifdef _MSC_VER - return "error: "; -#else - return "Failure\n"; -#endif - } - - return "Unknown result type"; -} - -// Prints a TestPartResult to a String. -static internal::String PrintTestPartResultToString( - const TestPartResult& test_part_result) { - return (Message() - << internal::FormatFileLocation(test_part_result.file_name(), - test_part_result.line_number()) - << " " << TestPartResultTypeToString(test_part_result.type()) - << test_part_result.message()).GetString(); -} - -// Prints a TestPartResult. -static void PrintTestPartResult(const TestPartResult& test_part_result) { - const internal::String& result = - PrintTestPartResultToString(test_part_result); - printf("%s\n", result.c_str()); - fflush(stdout); - // If the test program runs in Visual Studio or a debugger, the - // following statements add the test part result message to the Output - // window such that the user can double-click on it to jump to the - // corresponding source code location; otherwise they do nothing. -#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE - // We don't call OutputDebugString*() on Windows Mobile, as printing - // to stdout is done by OutputDebugString() there already - we don't - // want the same message printed twice. - ::OutputDebugStringA(result.c_str()); - ::OutputDebugStringA("\n"); -#endif -} - -// class PrettyUnitTestResultPrinter - -namespace internal { - -enum GTestColor { - COLOR_DEFAULT, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW -}; - -#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE - -// Returns the character attribute for the given color. -WORD GetColorAttribute(GTestColor color) { - switch (color) { - case COLOR_RED: return FOREGROUND_RED; - case COLOR_GREEN: return FOREGROUND_GREEN; - case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN; - default: return 0; - } -} - -#else - -// Returns the ANSI color code for the given color. COLOR_DEFAULT is -// an invalid input. -const char* GetAnsiColorCode(GTestColor color) { - switch (color) { - case COLOR_RED: return "1"; - case COLOR_GREEN: return "2"; - case COLOR_YELLOW: return "3"; - default: return NULL; - }; -} - -#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE - -// Returns true iff Google Test should use colors in the output. -bool ShouldUseColor(bool stdout_is_tty) { - const char* const gtest_color = GTEST_FLAG(color).c_str(); - - if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { -#if GTEST_OS_WINDOWS - // On Windows the TERM variable is usually not set, but the - // console there does support colors. - return stdout_is_tty; -#else - // On non-Windows platforms, we rely on the TERM variable. - const char* const term = posix::GetEnv("TERM"); - const bool term_supports_color = - String::CStringEquals(term, "xterm") || - String::CStringEquals(term, "xterm-color") || - String::CStringEquals(term, "xterm-256color") || - String::CStringEquals(term, "linux") || - String::CStringEquals(term, "cygwin"); - return stdout_is_tty && term_supports_color; -#endif // GTEST_OS_WINDOWS - } - - return String::CaseInsensitiveCStringEquals(gtest_color, "yes") || - String::CaseInsensitiveCStringEquals(gtest_color, "true") || - String::CaseInsensitiveCStringEquals(gtest_color, "t") || - String::CStringEquals(gtest_color, "1"); - // We take "yes", "true", "t", and "1" as meaning "yes". If the - // value is neither one of these nor "auto", we treat it as "no" to - // be conservative. -} - -// Helpers for printing colored strings to stdout. Note that on Windows, we -// cannot simply emit special characters and have the terminal change colors. -// This routine must actually emit the characters rather than return a string -// that would be colored when printed, as can be done on Linux. -void ColoredPrintf(GTestColor color, const char* fmt, ...) { - va_list args; - va_start(args, fmt); - -#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS - const bool use_color = false; -#else - static const bool in_color_mode = - ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0); - const bool use_color = in_color_mode && (color != COLOR_DEFAULT); -#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS - // The '!= 0' comparison is necessary to satisfy MSVC 7.1. - - if (!use_color) { - vprintf(fmt, args); - va_end(args); - return; - } - -#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE - const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); - - // Gets the current text color. - CONSOLE_SCREEN_BUFFER_INFO buffer_info; - GetConsoleScreenBufferInfo(stdout_handle, &buffer_info); - const WORD old_color_attrs = buffer_info.wAttributes; - - SetConsoleTextAttribute(stdout_handle, - GetColorAttribute(color) | FOREGROUND_INTENSITY); - vprintf(fmt, args); - - // Restores the text color. - SetConsoleTextAttribute(stdout_handle, old_color_attrs); -#else - printf("\033[0;3%sm", GetAnsiColorCode(color)); - vprintf(fmt, args); - printf("\033[m"); // Resets the terminal to default. -#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE - va_end(args); -} - -// This class implements the TestEventListener interface. -// -// Class PrettyUnitTestResultPrinter is copyable. -class PrettyUnitTestResultPrinter : public TestEventListener { - public: - PrettyUnitTestResultPrinter() {} - static void PrintTestName(const char * test_case, const char * test) { - printf("%s.%s", test_case, test); - } - - // The following methods override what's in the TestEventListener class. - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestCaseStart(const TestCase& test_case); - virtual void OnTestStart(const TestInfo& test_info); - virtual void OnTestPartResult(const TestPartResult& result); - virtual void OnTestEnd(const TestInfo& test_info); - virtual void OnTestCaseEnd(const TestCase& test_case); - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} - - private: - static void PrintFailedTests(const UnitTest& unit_test); - - internal::String test_case_name_; -}; - - // Fired before each iteration of tests starts. -void PrettyUnitTestResultPrinter::OnTestIterationStart( - const UnitTest& unit_test, int iteration) { - if (GTEST_FLAG(repeat) != 1) - printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); - - const char* const filter = GTEST_FLAG(filter).c_str(); - - // Prints the filter if it's not *. This reminds the user that some - // tests may be skipped. - if (!internal::String::CStringEquals(filter, kUniversalFilter)) { - ColoredPrintf(COLOR_YELLOW, - "Note: %s filter = %s\n", GTEST_NAME_, filter); - } - - if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { - ColoredPrintf(COLOR_YELLOW, - "Note: This is test shard %s of %s.\n", - internal::posix::GetEnv(kTestShardIndex), - internal::posix::GetEnv(kTestTotalShards)); - } - - if (GTEST_FLAG(shuffle)) { - ColoredPrintf(COLOR_YELLOW, - "Note: Randomizing tests' orders with a seed of %d .\n", - unit_test.random_seed()); - } - - ColoredPrintf(COLOR_GREEN, "[==========] "); - printf("Running %s from %s.\n", - FormatTestCount(unit_test.test_to_run_count()).c_str(), - FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( - const UnitTest& /*unit_test*/) { - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("Global test environment set-up.\n"); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) { - test_case_name_ = test_case.name(); - const internal::String counts = - FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("%s from %s", counts.c_str(), test_case_name_.c_str()); - if (test_case.comment()[0] == '\0') { - printf("\n"); - } else { - printf(", where %s\n", test_case.comment()); - } - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) { - ColoredPrintf(COLOR_GREEN, "[ RUN ] "); - PrintTestName(test_case_name_.c_str(), test_info.name()); - if (test_info.comment()[0] == '\0') { - printf("\n"); - } else { - printf(", where %s\n", test_info.comment()); - } - fflush(stdout); -} - -// Called after an assertion failure. -void PrettyUnitTestResultPrinter::OnTestPartResult( - const TestPartResult& result) { - // If the test part succeeded, we don't need to do anything. - if (result.type() == TestPartResult::kSuccess) - return; - - // Print failure message from the assertion (e.g. expected this and got that). - PrintTestPartResult(result); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) { - if (test_info.result()->Passed()) { - ColoredPrintf(COLOR_GREEN, "[ OK ] "); - } else { - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - } - PrintTestName(test_case_name_.c_str(), test_info.name()); - if (GTEST_FLAG(print_time)) { - printf(" (%s ms)\n", internal::StreamableToString( - test_info.result()->elapsed_time()).c_str()); - } else { - printf("\n"); - } - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) { - if (!GTEST_FLAG(print_time)) return; - - test_case_name_ = test_case.name(); - const internal::String counts = - FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("%s from %s (%s ms total)\n\n", - counts.c_str(), test_case_name_.c_str(), - internal::StreamableToString(test_case.elapsed_time()).c_str()); - fflush(stdout); -} - -void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart( - const UnitTest& /*unit_test*/) { - ColoredPrintf(COLOR_GREEN, "[----------] "); - printf("Global test environment tear-down\n"); - fflush(stdout); -} - -// Internal helper for printing the list of failed tests. -void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) { - const int failed_test_count = unit_test.failed_test_count(); - if (failed_test_count == 0) { - return; - } - - for (int i = 0; i < unit_test.total_test_case_count(); ++i) { - const TestCase& test_case = *unit_test.GetTestCase(i); - if (!test_case.should_run() || (test_case.failed_test_count() == 0)) { - continue; - } - for (int j = 0; j < test_case.total_test_count(); ++j) { - const TestInfo& test_info = *test_case.GetTestInfo(j); - if (!test_info.should_run() || test_info.result()->Passed()) { - continue; - } - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - printf("%s.%s", test_case.name(), test_info.name()); - if (test_case.comment()[0] != '\0' || - test_info.comment()[0] != '\0') { - printf(", where %s", test_case.comment()); - if (test_case.comment()[0] != '\0' && - test_info.comment()[0] != '\0') { - printf(" and "); - } - } - printf("%s\n", test_info.comment()); - } - } -} - - void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, - int /*iteration*/) { - ColoredPrintf(COLOR_GREEN, "[==========] "); - printf("%s from %s ran.", - FormatTestCount(unit_test.test_to_run_count()).c_str(), - FormatTestCaseCount(unit_test.test_case_to_run_count()).c_str()); - if (GTEST_FLAG(print_time)) { - printf(" (%s ms total)", - internal::StreamableToString(unit_test.elapsed_time()).c_str()); - } - printf("\n"); - ColoredPrintf(COLOR_GREEN, "[ PASSED ] "); - printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); - - int num_failures = unit_test.failed_test_count(); - if (!unit_test.Passed()) { - const int failed_test_count = unit_test.failed_test_count(); - ColoredPrintf(COLOR_RED, "[ FAILED ] "); - printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str()); - PrintFailedTests(unit_test); - printf("\n%2d FAILED %s\n", num_failures, - num_failures == 1 ? "TEST" : "TESTS"); - } - - int num_disabled = unit_test.disabled_test_count(); - if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) { - if (!num_failures) { - printf("\n"); // Add a spacer if no FAILURE banner is displayed. - } - ColoredPrintf(COLOR_YELLOW, - " YOU HAVE %d DISABLED %s\n\n", - num_disabled, - num_disabled == 1 ? "TEST" : "TESTS"); - } - // Ensure that Google Test output is printed before, e.g., heapchecker output. - fflush(stdout); -} - -// End PrettyUnitTestResultPrinter - -// class TestEventRepeater -// -// This class forwards events to other event listeners. -class TestEventRepeater : public TestEventListener { - public: - TestEventRepeater() : forwarding_enabled_(true) {} - virtual ~TestEventRepeater(); - void Append(TestEventListener *listener); - TestEventListener* Release(TestEventListener* listener); - - // Controls whether events will be forwarded to listeners_. Set to false - // in death test child processes. - bool forwarding_enabled() const { return forwarding_enabled_; } - void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; } - - virtual void OnTestProgramStart(const UnitTest& unit_test); - virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); - virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test); - virtual void OnTestCaseStart(const TestCase& test_case); - virtual void OnTestStart(const TestInfo& test_info); - virtual void OnTestPartResult(const TestPartResult& result); - virtual void OnTestEnd(const TestInfo& test_info); - virtual void OnTestCaseEnd(const TestCase& test_case); - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); - virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test); - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); - virtual void OnTestProgramEnd(const UnitTest& unit_test); - - private: - // Controls whether events will be forwarded to listeners_. Set to false - // in death test child processes. - bool forwarding_enabled_; - // The list of listeners that receive events. - Vector listeners_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater); -}; - -TestEventRepeater::~TestEventRepeater() { - for (int i = 0; i < listeners_.size(); i++) { - delete listeners_.GetElement(i); - } -} - -void TestEventRepeater::Append(TestEventListener *listener) { - listeners_.PushBack(listener); -} - -// TODO(vladl@google.com): Factor the search functionality into Vector::Find. -TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { - for (int i = 0; i < listeners_.size(); ++i) { - if (listeners_.GetElement(i) == listener) { - listeners_.Erase(i); - return listener; - } - } - - return NULL; -} - -// Since most methods are very similar, use macros to reduce boilerplate. -// This defines a member that forwards the call to all listeners. -#define GTEST_REPEATER_METHOD_(Name, Type) \ -void TestEventRepeater::Name(const Type& parameter) { \ - if (forwarding_enabled_) { \ - for (int i = 0; i < listeners_.size(); i++) { \ - listeners_.GetElement(i)->Name(parameter); \ - } \ - } \ -} -// This defines a member that forwards the call to all listeners in reverse -// order. -#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \ -void TestEventRepeater::Name(const Type& parameter) { \ - if (forwarding_enabled_) { \ - for (int i = static_cast(listeners_.size()) - 1; i >= 0; i--) { \ - listeners_.GetElement(i)->Name(parameter); \ - } \ - } \ -} - -GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest) -GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest) -GTEST_REPEATER_METHOD_(OnTestCaseStart, TestCase) -GTEST_REPEATER_METHOD_(OnTestStart, TestInfo) -GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult) -GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest) -GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest) -GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest) -GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo) -GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestCase) -GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest) - -#undef GTEST_REPEATER_METHOD_ -#undef GTEST_REVERSE_REPEATER_METHOD_ - -void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test, - int iteration) { - if (forwarding_enabled_) { - for (int i = 0; i < listeners_.size(); i++) { - listeners_.GetElement(i)->OnTestIterationStart(unit_test, iteration); - } - } -} - -void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test, - int iteration) { - if (forwarding_enabled_) { - for (int i = static_cast(listeners_.size()) - 1; i >= 0; i--) { - listeners_.GetElement(i)->OnTestIterationEnd(unit_test, iteration); - } - } -} - -// End TestEventRepeater - -// This class generates an XML output file. -class XmlUnitTestResultPrinter : public EmptyTestEventListener { - public: - explicit XmlUnitTestResultPrinter(const char* output_file); - - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); - - private: - // Is c a whitespace character that is normalized to a space character - // when it appears in an XML attribute value? - static bool IsNormalizableWhitespace(char c) { - return c == 0x9 || c == 0xA || c == 0xD; - } - - // May c appear in a well-formed XML document? - static bool IsValidXmlCharacter(char c) { - return IsNormalizableWhitespace(c) || c >= 0x20; - } - - // Returns an XML-escaped copy of the input string str. If - // is_attribute is true, the text is meant to appear as an attribute - // value, and normalizable whitespace is preserved by replacing it - // with character references. - static String EscapeXml(const char* str, bool is_attribute); - - // Returns the given string with all characters invalid in XML removed. - static String RemoveInvalidXmlCharacters(const char* str); - - // Convenience wrapper around EscapeXml when str is an attribute value. - static String EscapeXmlAttribute(const char* str) { - return EscapeXml(str, true); - } - - // Convenience wrapper around EscapeXml when str is not an attribute value. - static String EscapeXmlText(const char* str) { return EscapeXml(str, false); } - - // Streams an XML CDATA section, escaping invalid CDATA sequences as needed. - static void OutputXmlCDataSection(::std::ostream* stream, const char* data); - - // Streams an XML representation of a TestInfo object. - static void OutputXmlTestInfo(::std::ostream* stream, - const char* test_case_name, - const TestInfo& test_info); - - // Prints an XML representation of a TestCase object - static void PrintXmlTestCase(FILE* out, const TestCase& test_case); - - // Prints an XML summary of unit_test to output stream out. - static void PrintXmlUnitTest(FILE* out, const UnitTest& unit_test); - - // Produces a string representing the test properties in a result as space - // delimited XML attributes based on the property key="value" pairs. - // When the String is not empty, it includes a space at the beginning, - // to delimit this attribute from prior attributes. - static String TestPropertiesAsXmlAttributes(const TestResult& result); - - // The output file. - const String output_file_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter); -}; - -// Creates a new XmlUnitTestResultPrinter. -XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file) - : output_file_(output_file) { - if (output_file_.c_str() == NULL || output_file_.empty()) { - fprintf(stderr, "XML output file may not be null\n"); - fflush(stderr); - exit(EXIT_FAILURE); - } -} - -// Called after the unit test ends. -void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, - int /*iteration*/) { - FILE* xmlout = NULL; - FilePath output_file(output_file_); - FilePath output_dir(output_file.RemoveFileName()); - - if (output_dir.CreateDirectoriesRecursively()) { - xmlout = posix::FOpen(output_file_.c_str(), "w"); - } - if (xmlout == NULL) { - // TODO(wan): report the reason of the failure. - // - // We don't do it for now as: - // - // 1. There is no urgent need for it. - // 2. It's a bit involved to make the errno variable thread-safe on - // all three operating systems (Linux, Windows, and Mac OS). - // 3. To interpret the meaning of errno in a thread-safe way, - // we need the strerror_r() function, which is not available on - // Windows. - fprintf(stderr, - "Unable to open file \"%s\"\n", - output_file_.c_str()); - fflush(stderr); - exit(EXIT_FAILURE); - } - PrintXmlUnitTest(xmlout, unit_test); - fclose(xmlout); -} - -// Returns an XML-escaped copy of the input string str. If is_attribute -// is true, the text is meant to appear as an attribute value, and -// normalizable whitespace is preserved by replacing it with character -// references. -// -// Invalid XML characters in str, if any, are stripped from the output. -// It is expected that most, if not all, of the text processed by this -// module will consist of ordinary English text. -// If this module is ever modified to produce version 1.1 XML output, -// most invalid characters can be retained using character references. -// TODO(wan): It might be nice to have a minimally invasive, human-readable -// escaping scheme for invalid characters, rather than dropping them. -String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_attribute) { - Message m; - - if (str != NULL) { - for (const char* src = str; *src; ++src) { - switch (*src) { - case '<': - m << "<"; - break; - case '>': - m << ">"; - break; - case '&': - m << "&"; - break; - case '\'': - if (is_attribute) - m << "'"; - else - m << '\''; - break; - case '"': - if (is_attribute) - m << """; - else - m << '"'; - break; - default: - if (IsValidXmlCharacter(*src)) { - if (is_attribute && IsNormalizableWhitespace(*src)) - m << String::Format("&#x%02X;", unsigned(*src)); - else - m << *src; - } - break; - } - } - } - - return m.GetString(); -} - -// Returns the given string with all characters invalid in XML removed. -// Currently invalid characters are dropped from the string. An -// alternative is to replace them with certain characters such as . or ?. -String XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const char* str) { - char* const output = new char[strlen(str) + 1]; - char* appender = output; - for (char ch = *str; ch != '\0'; ch = *++str) - if (IsValidXmlCharacter(ch)) - *appender++ = ch; - *appender = '\0'; - - String ret_value(output); - delete[] output; - return ret_value; -} - -// The following routines generate an XML representation of a UnitTest -// object. -// -// This is how Google Test concepts map to the DTD: -// -// <-- corresponds to a UnitTest object -// <-- corresponds to a TestCase object -// <-- corresponds to a TestInfo object -// ... -// ... -// ... -// <-- individual assertion failures -// -// -// - -// Formats the given time in milliseconds as seconds. The returned -// C-string is owned by this function and cannot be released by the -// caller. Calling the function again invalidates the previous -// result. -const char* FormatTimeInMillisAsSeconds(TimeInMillis ms) { - static String str; - str = (Message() << (ms/1000.0)).GetString(); - return str.c_str(); -} - -// Streams an XML CDATA section, escaping invalid CDATA sequences as needed. -void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream, - const char* data) { - const char* segment = data; - *stream << ""); - if (next_segment != NULL) { - stream->write(segment, next_segment - segment); - *stream << "]]>]]>"); - } else { - *stream << segment; - break; - } - } - *stream << "]]>"; -} - -// Prints an XML representation of a TestInfo object. -// TODO(wan): There is also value in printing properties with the plain printer. -void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, - const char* test_case_name, - const TestInfo& test_info) { - const TestResult& result = *test_info.result(); - *stream << " \n"; - *stream << " "; - const String message = RemoveInvalidXmlCharacters(String::Format( - "%s:%d\n%s", - part.file_name(), part.line_number(), - part.message()).c_str()); - OutputXmlCDataSection(stream, message.c_str()); - *stream << "\n"; - } - } - - if (failures == 0) - *stream << " />\n"; - else - *stream << " \n"; -} - -// Prints an XML representation of a TestCase object -void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out, - const TestCase& test_case) { - fprintf(out, - " \n", - FormatTimeInMillisAsSeconds(test_case.elapsed_time())); - for (int i = 0; i < test_case.total_test_count(); ++i) { - StrStream stream; - OutputXmlTestInfo(&stream, test_case.name(), *test_case.GetTestInfo(i)); - fprintf(out, "%s", StrStreamToString(&stream).c_str()); - } - fprintf(out, " \n"); -} - -// Prints an XML summary of unit_test to output stream out. -void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out, - const UnitTest& unit_test) { - fprintf(out, "\n"); - fprintf(out, - "\n"); - for (int i = 0; i < unit_test.total_test_case_count(); ++i) - PrintXmlTestCase(out, *unit_test.GetTestCase(i)); - fprintf(out, "\n"); -} - -// Produces a string representing the test properties in a result as space -// delimited XML attributes based on the property key="value" pairs. -String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes( - const TestResult& result) { - Message attributes; - for (int i = 0; i < result.test_property_count(); ++i) { - const TestProperty& property = result.GetTestProperty(i); - attributes << " " << property.key() << "=" - << "\"" << EscapeXmlAttribute(property.value()) << "\""; - } - return attributes.GetString(); -} - -// End XmlUnitTestResultPrinter - -// Class ScopedTrace - -// Pushes the given source file location and message onto a per-thread -// trace stack maintained by Google Test. -// L < UnitTest::mutex_ -ScopedTrace::ScopedTrace(const char* file, int line, const Message& message) { - TraceInfo trace; - trace.file = file; - trace.line = line; - trace.message = message.GetString(); - - UnitTest::GetInstance()->PushGTestTrace(trace); -} - -// Pops the info pushed by the c'tor. -// L < UnitTest::mutex_ -ScopedTrace::~ScopedTrace() { - UnitTest::GetInstance()->PopGTestTrace(); -} - - -// class OsStackTraceGetter - -// Returns the current OS stack trace as a String. Parameters: -// -// max_depth - the maximum number of stack frames to be included -// in the trace. -// skip_count - the number of top frames to be skipped; doesn't count -// against max_depth. -// -// L < mutex_ -// We use "L < mutex_" to denote that the function may acquire mutex_. -String OsStackTraceGetter::CurrentStackTrace(int, int) { - return String(""); -} - -// L < mutex_ -void OsStackTraceGetter::UponLeavingGTest() { -} - -const char* const -OsStackTraceGetter::kElidedFramesMarker = - "... " GTEST_NAME_ " internal frames ..."; - -} // namespace internal - -// class TestEventListeners - -TestEventListeners::TestEventListeners() - : repeater_(new internal::TestEventRepeater()), - default_result_printer_(NULL), - default_xml_generator_(NULL) { -} - -TestEventListeners::~TestEventListeners() { delete repeater_; } - -// Returns the standard listener responsible for the default console -// output. Can be removed from the listeners list to shut down default -// console output. Note that removing this object from the listener list -// with Release transfers its ownership to the user. -void TestEventListeners::Append(TestEventListener* listener) { - repeater_->Append(listener); -} - -// Removes the given event listener from the list and returns it. It then -// becomes the caller's responsibility to delete the listener. Returns -// NULL if the listener is not found in the list. -TestEventListener* TestEventListeners::Release(TestEventListener* listener) { - if (listener == default_result_printer_) - default_result_printer_ = NULL; - else if (listener == default_xml_generator_) - default_xml_generator_ = NULL; - return repeater_->Release(listener); -} - -// Returns repeater that broadcasts the TestEventListener events to all -// subscribers. -TestEventListener* TestEventListeners::repeater() { return repeater_; } - -// Sets the default_result_printer attribute to the provided listener. -// The listener is also added to the listener list and previous -// default_result_printer is removed from it and deleted. The listener can -// also be NULL in which case it will not be added to the list. Does -// nothing if the previous and the current listener objects are the same. -void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) { - if (default_result_printer_ != listener) { - // It is an error to pass this method a listener that is already in the - // list. - delete Release(default_result_printer_); - default_result_printer_ = listener; - if (listener != NULL) - Append(listener); - } -} - -// Sets the default_xml_generator attribute to the provided listener. The -// listener is also added to the listener list and previous -// default_xml_generator is removed from it and deleted. The listener can -// also be NULL in which case it will not be added to the list. Does -// nothing if the previous and the current listener objects are the same. -void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) { - if (default_xml_generator_ != listener) { - // It is an error to pass this method a listener that is already in the - // list. - delete Release(default_xml_generator_); - default_xml_generator_ = listener; - if (listener != NULL) - Append(listener); - } -} - -// Controls whether events will be forwarded by the repeater to the -// listeners in the list. -bool TestEventListeners::EventForwardingEnabled() const { - return repeater_->forwarding_enabled(); -} - -void TestEventListeners::SuppressEventForwarding() { - repeater_->set_forwarding_enabled(false); -} - -// class UnitTest - -// Gets the singleton UnitTest object. The first time this method is -// called, a UnitTest object is constructed and returned. Consecutive -// calls will return the same object. -// -// We don't protect this under mutex_ as a user is not supposed to -// call this before main() starts, from which point on the return -// value will never change. -UnitTest * UnitTest::GetInstance() { - // When compiled with MSVC 7.1 in optimized mode, destroying the - // UnitTest object upon exiting the program messes up the exit code, - // causing successful tests to appear failed. We have to use a - // different implementation in this case to bypass the compiler bug. - // This implementation makes the compiler happy, at the cost of - // leaking the UnitTest object. - - // CodeGear C++Builder insists on a public destructor for the - // default implementation. Use this implementation to keep good OO - // design with private destructor. - -#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) - static UnitTest* const instance = new UnitTest; - return instance; -#else - static UnitTest instance; - return &instance; -#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__) -} - -// Gets the number of successful test cases. -int UnitTest::successful_test_case_count() const { - return impl()->successful_test_case_count(); -} - -// Gets the number of failed test cases. -int UnitTest::failed_test_case_count() const { - return impl()->failed_test_case_count(); -} - -// Gets the number of all test cases. -int UnitTest::total_test_case_count() const { - return impl()->total_test_case_count(); -} - -// Gets the number of all test cases that contain at least one test -// that should run. -int UnitTest::test_case_to_run_count() const { - return impl()->test_case_to_run_count(); -} - -// Gets the number of successful tests. -int UnitTest::successful_test_count() const { - return impl()->successful_test_count(); -} - -// Gets the number of failed tests. -int UnitTest::failed_test_count() const { return impl()->failed_test_count(); } - -// Gets the number of disabled tests. -int UnitTest::disabled_test_count() const { - return impl()->disabled_test_count(); -} - -// Gets the number of all tests. -int UnitTest::total_test_count() const { return impl()->total_test_count(); } - -// Gets the number of tests that should run. -int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); } - -// Gets the elapsed time, in milliseconds. -internal::TimeInMillis UnitTest::elapsed_time() const { - return impl()->elapsed_time(); -} - -// Returns true iff the unit test passed (i.e. all test cases passed). -bool UnitTest::Passed() const { return impl()->Passed(); } - -// Returns true iff the unit test failed (i.e. some test case failed -// or something outside of all tests failed). -bool UnitTest::Failed() const { return impl()->Failed(); } - -// Gets the i-th test case among all the test cases. i can range from 0 to -// total_test_case_count() - 1. If i is not in that range, returns NULL. -const TestCase* UnitTest::GetTestCase(int i) const { - return impl()->GetTestCase(i); -} - -// Gets the i-th test case among all the test cases. i can range from 0 to -// total_test_case_count() - 1. If i is not in that range, returns NULL. -TestCase* UnitTest::GetMutableTestCase(int i) { - return impl()->GetMutableTestCase(i); -} - -// Returns the list of event listeners that can be used to track events -// inside Google Test. -TestEventListeners& UnitTest::listeners() { - return *impl()->listeners(); -} - -// Registers and returns a global test environment. When a test -// program is run, all global test environments will be set-up in the -// order they were registered. After all tests in the program have -// finished, all global test environments will be torn-down in the -// *reverse* order they were registered. -// -// The UnitTest object takes ownership of the given environment. -// -// We don't protect this under mutex_, as we only support calling it -// from the main thread. -Environment* UnitTest::AddEnvironment(Environment* env) { - if (env == NULL) { - return NULL; - } - - impl_->environments()->PushBack(env); - impl_->environments_in_reverse_order()->PushFront(env); - return env; -} - -#if GTEST_HAS_EXCEPTIONS -// A failed Google Test assertion will throw an exception of this type -// when exceptions are enabled. We derive it from std::runtime_error, -// which is for errors presumably detectable only at run time. Since -// std::runtime_error inherits from std::exception, many testing -// frameworks know how to extract and print the message inside it. -class GoogleTestFailureException : public ::std::runtime_error { - public: - explicit GoogleTestFailureException(const TestPartResult& failure) - : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {} -}; -#endif - -// Adds a TestPartResult to the current TestResult object. All Google Test -// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call -// this to report their results. The user code should use the -// assertion macros instead of calling this directly. -// L < mutex_ -void UnitTest::AddTestPartResult(TestPartResult::Type result_type, - const char* file_name, - int line_number, - const internal::String& message, - const internal::String& os_stack_trace) { - Message msg; - msg << message; - - internal::MutexLock lock(&mutex_); - if (impl_->gtest_trace_stack()->size() > 0) { - msg << "\n" << GTEST_NAME_ << " trace:"; - - for (int i = 0; i < impl_->gtest_trace_stack()->size(); i++) { - const internal::TraceInfo& trace = - impl_->gtest_trace_stack()->GetElement(i); - msg << "\n" << internal::FormatFileLocation(trace.file, trace.line) - << " " << trace.message; - } - } - - if (os_stack_trace.c_str() != NULL && !os_stack_trace.empty()) { - msg << internal::kStackTraceMarker << os_stack_trace; - } - - const TestPartResult result = - TestPartResult(result_type, file_name, line_number, - msg.GetString().c_str()); - impl_->GetTestPartResultReporterForCurrentThread()-> - ReportTestPartResult(result); - - if (result_type != TestPartResult::kSuccess) { - // gtest_break_on_failure takes precedence over - // gtest_throw_on_failure. This allows a user to set the latter - // in the code (perhaps in order to use Google Test assertions - // with another testing framework) and specify the former on the - // command line for debugging. - if (GTEST_FLAG(break_on_failure)) { -#if GTEST_OS_WINDOWS - // Using DebugBreak on Windows allows gtest to still break into a debugger - // when a failure happens and both the --gtest_break_on_failure and - // the --gtest_catch_exceptions flags are specified. - DebugBreak(); -#else - *static_cast(NULL) = 1; -#endif // GTEST_OS_WINDOWS - } else if (GTEST_FLAG(throw_on_failure)) { -#if GTEST_HAS_EXCEPTIONS - throw GoogleTestFailureException(result); -#else - // We cannot call abort() as it generates a pop-up in debug mode - // that cannot be suppressed in VC 7.1 or below. - exit(1); -#endif - } - } -} - -// Creates and adds a property to the current TestResult. If a property matching -// the supplied value already exists, updates its value instead. -void UnitTest::RecordPropertyForCurrentTest(const char* key, - const char* value) { - const TestProperty test_property(key, value); - impl_->current_test_result()->RecordProperty(test_property); -} - -// Runs all tests in this UnitTest object and prints the result. -// Returns 0 if successful, or 1 otherwise. -// -// We don't protect this under mutex_, as we only support calling it -// from the main thread. -int UnitTest::Run() { -#if GTEST_HAS_SEH - // Catch SEH-style exceptions. - - const bool in_death_test_child_process = - internal::GTEST_FLAG(internal_run_death_test).length() > 0; - - // Either the user wants Google Test to catch exceptions thrown by the - // tests or this is executing in the context of death test child - // process. In either case the user does not want to see pop-up dialogs - // about crashes - they are expected.. - if (GTEST_FLAG(catch_exceptions) || in_death_test_child_process) { -#if !GTEST_OS_WINDOWS_MOBILE - // SetErrorMode doesn't exist on CE. - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | - SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); -#endif // !GTEST_OS_WINDOWS_MOBILE - -#if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE - // Death test children can be terminated with _abort(). On Windows, - // _abort() can show a dialog with a warning message. This forces the - // abort message to go to stderr instead. - _set_error_mode(_OUT_TO_STDERR); -#endif - -#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE - // In the debug version, Visual Studio pops up a separate dialog - // offering a choice to debug the aborted program. We need to suppress - // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement - // executed. Google Test will notify the user of any unexpected - // failure via stderr. - // - // VC++ doesn't define _set_abort_behavior() prior to the version 8.0. - // Users of prior VC versions shall suffer the agony and pain of - // clicking through the countless debug dialogs. - // TODO(vladl@google.com): find a way to suppress the abort dialog() in the - // debug mode when compiled with VC 7.1 or lower. - if (!GTEST_FLAG(break_on_failure)) - _set_abort_behavior( - 0x0, // Clear the following flags: - _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. -#endif - } - - __try { - return impl_->RunAllTests(); - } __except(internal::UnitTestOptions::GTestShouldProcessSEH( - GetExceptionCode())) { - printf("Exception thrown with code 0x%x.\nFAIL\n", GetExceptionCode()); - fflush(stdout); - return 1; - } - -#else // We are on a compiler or platform that doesn't support SEH. - - return impl_->RunAllTests(); -#endif // GTEST_HAS_SEH -} - -// Returns the working directory when the first TEST() or TEST_F() was -// executed. -const char* UnitTest::original_working_dir() const { - return impl_->original_working_dir_.c_str(); -} - -// Returns the TestCase object for the test that's currently running, -// or NULL if no test is running. -// L < mutex_ -const TestCase* UnitTest::current_test_case() const { - internal::MutexLock lock(&mutex_); - return impl_->current_test_case(); -} - -// Returns the TestInfo object for the test that's currently running, -// or NULL if no test is running. -// L < mutex_ -const TestInfo* UnitTest::current_test_info() const { - internal::MutexLock lock(&mutex_); - return impl_->current_test_info(); -} - -// Returns the random seed used at the start of the current test run. -int UnitTest::random_seed() const { return impl_->random_seed(); } - -#if GTEST_HAS_PARAM_TEST -// Returns ParameterizedTestCaseRegistry object used to keep track of -// value-parameterized tests and instantiate and register them. -// L < mutex_ -internal::ParameterizedTestCaseRegistry& - UnitTest::parameterized_test_registry() { - return impl_->parameterized_test_registry(); -} -#endif // GTEST_HAS_PARAM_TEST - -// Creates an empty UnitTest. -UnitTest::UnitTest() { - impl_ = new internal::UnitTestImpl(this); -} - -// Destructor of UnitTest. -UnitTest::~UnitTest() { - delete impl_; -} - -// Pushes a trace defined by SCOPED_TRACE() on to the per-thread -// Google Test trace stack. -// L < mutex_ -void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) { - internal::MutexLock lock(&mutex_); - impl_->gtest_trace_stack()->PushFront(trace); -} - -// Pops a trace from the per-thread Google Test trace stack. -// L < mutex_ -void UnitTest::PopGTestTrace() { - internal::MutexLock lock(&mutex_); - impl_->gtest_trace_stack()->PopFront(NULL); -} - -namespace internal { - -UnitTestImpl::UnitTestImpl(UnitTest* parent) - : parent_(parent), -#ifdef _MSC_VER -#pragma warning(push) // Saves the current warning state. -#pragma warning(disable:4355) // Temporarily disables warning 4355 - // (using this in initializer). - default_global_test_part_result_reporter_(this), - default_per_thread_test_part_result_reporter_(this), -#pragma warning(pop) // Restores the warning state again. -#else - default_global_test_part_result_reporter_(this), - default_per_thread_test_part_result_reporter_(this), -#endif // _MSC_VER - global_test_part_result_repoter_( - &default_global_test_part_result_reporter_), - per_thread_test_part_result_reporter_( - &default_per_thread_test_part_result_reporter_), -#if GTEST_HAS_PARAM_TEST - parameterized_test_registry_(), - parameterized_tests_registered_(false), -#endif // GTEST_HAS_PARAM_TEST - last_death_test_case_(-1), - current_test_case_(NULL), - current_test_info_(NULL), - ad_hoc_test_result_(), - os_stack_trace_getter_(NULL), - post_flag_parse_init_performed_(false), - random_seed_(0), // Will be overridden by the flag before first use. - random_(0), // Will be reseeded before first use. -#if GTEST_HAS_DEATH_TEST - elapsed_time_(0), - internal_run_death_test_flag_(NULL), - death_test_factory_(new DefaultDeathTestFactory) { -#else - elapsed_time_(0) { -#endif // GTEST_HAS_DEATH_TEST - listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); -} - -UnitTestImpl::~UnitTestImpl() { - // Deletes every TestCase. - test_cases_.ForEach(internal::Delete); - - // Deletes every Environment. - environments_.ForEach(internal::Delete); - - delete os_stack_trace_getter_; -} - -#if GTEST_HAS_DEATH_TEST -// Disables event forwarding if the control is currently in a death test -// subprocess. Must not be called before InitGoogleTest. -void UnitTestImpl::SuppressTestEventsIfInSubprocess() { - if (internal_run_death_test_flag_.get() != NULL) - listeners()->SuppressEventForwarding(); -} -#endif // GTEST_HAS_DEATH_TEST - -// Initializes event listeners performing XML output as specified by -// UnitTestOptions. Must not be called before InitGoogleTest. -void UnitTestImpl::ConfigureXmlOutput() { - const String& output_format = UnitTestOptions::GetOutputFormat(); - if (output_format == "xml") { - listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter( - UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); - } else if (output_format != "") { - printf("WARNING: unrecognized output format \"%s\" ignored.\n", - output_format.c_str()); - fflush(stdout); - } -} - -// Performs initialization dependent upon flag values obtained in -// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to -// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest -// this function is also called from RunAllTests. Since this function can be -// called more than once, it has to be idempotent. -void UnitTestImpl::PostFlagParsingInit() { - // Ensures that this function does not execute more than once. - if (!post_flag_parse_init_performed_) { - post_flag_parse_init_performed_ = true; - -#if GTEST_HAS_DEATH_TEST - InitDeathTestSubprocessControlInfo(); - SuppressTestEventsIfInSubprocess(); -#endif // GTEST_HAS_DEATH_TEST - - // Registers parameterized tests. This makes parameterized tests - // available to the UnitTest reflection API without running - // RUN_ALL_TESTS. - RegisterParameterizedTests(); - - // Configures listeners for XML output. This makes it possible for users - // to shut down the default XML output before invoking RUN_ALL_TESTS. - ConfigureXmlOutput(); - } -} - -// A predicate that checks the name of a TestCase against a known -// value. -// -// This is used for implementation of the UnitTest class only. We put -// it in the anonymous namespace to prevent polluting the outer -// namespace. -// -// TestCaseNameIs is copyable. -class TestCaseNameIs { - public: - // Constructor. - explicit TestCaseNameIs(const String& name) - : name_(name) {} - - // Returns true iff the name of test_case matches name_. - bool operator()(const TestCase* test_case) const { - return test_case != NULL && strcmp(test_case->name(), name_.c_str()) == 0; - } - - private: - String name_; -}; - -// Finds and returns a TestCase with the given name. If one doesn't -// exist, creates one and returns it. It's the CALLER'S -// RESPONSIBILITY to ensure that this function is only called WHEN THE -// TESTS ARE NOT SHUFFLED. -// -// Arguments: -// -// test_case_name: name of the test case -// set_up_tc: pointer to the function that sets up the test case -// tear_down_tc: pointer to the function that tears down the test case -TestCase* UnitTestImpl::GetTestCase(const char* test_case_name, - const char* comment, - Test::SetUpTestCaseFunc set_up_tc, - Test::TearDownTestCaseFunc tear_down_tc) { - // Can we find a TestCase with the given name? - TestCase** test_case = test_cases_.FindIf(TestCaseNameIs(test_case_name)); - - if (test_case != NULL) - return *test_case; - - // No. Let's create one. - TestCase* const new_test_case = - new TestCase(test_case_name, comment, set_up_tc, tear_down_tc); - - // Is this a death test case? - if (internal::UnitTestOptions::MatchesFilter(String(test_case_name), - kDeathTestCaseFilter)) { - // Yes. Inserts the test case after the last death test case - // defined so far. This only works when the test cases haven't - // been shuffled. Otherwise we may end up running a death test - // after a non-death test. - test_cases_.Insert(new_test_case, ++last_death_test_case_); - } else { - // No. Appends to the end of the list. - test_cases_.PushBack(new_test_case); - } - - test_case_indices_.PushBack(test_case_indices_.size()); - return new_test_case; -} - -// Helpers for setting up / tearing down the given environment. They -// are for use in the Vector::ForEach() method. -static void SetUpEnvironment(Environment* env) { env->SetUp(); } -static void TearDownEnvironment(Environment* env) { env->TearDown(); } - -// Runs all tests in this UnitTest object, prints the result, and -// returns 0 if all tests are successful, or 1 otherwise. If any -// exception is thrown during a test on Windows, this test is -// considered to be failed, but the rest of the tests will still be -// run. (We disable exceptions on Linux and Mac OS X, so the issue -// doesn't apply there.) -// When parameterized tests are enabled, it expands and registers -// parameterized tests first in RegisterParameterizedTests(). -// All other functions called from RunAllTests() may safely assume that -// parameterized tests are ready to be counted and run. -int UnitTestImpl::RunAllTests() { - // Makes sure InitGoogleTest() was called. - if (!GTestIsInitialized()) { - printf("%s", - "\nThis test program did NOT call ::testing::InitGoogleTest " - "before calling RUN_ALL_TESTS(). Please fix it.\n"); - return 1; - } - - // Do not run any test if the --help flag was specified. - if (g_help_flag) - return 0; - - // Repeats the call to the post-flag parsing initialization in case the - // user didn't call InitGoogleTest. - PostFlagParsingInit(); - - // Even if sharding is not on, test runners may want to use the - // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding - // protocol. - internal::WriteToShardStatusFileIfNeeded(); - - // True iff we are in a subprocess for running a thread-safe-style - // death test. - bool in_subprocess_for_death_test = false; - -#if GTEST_HAS_DEATH_TEST - in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL); -#endif // GTEST_HAS_DEATH_TEST - - const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex, - in_subprocess_for_death_test); - - // Compares the full test names with the filter to decide which - // tests to run. - const bool has_tests_to_run = FilterTests(should_shard - ? HONOR_SHARDING_PROTOCOL - : IGNORE_SHARDING_PROTOCOL) > 0; - - // Lists the tests and exits if the --gtest_list_tests flag was specified. - if (GTEST_FLAG(list_tests)) { - // This must be called *after* FilterTests() has been called. - ListTestsMatchingFilter(); - return 0; - } - - random_seed_ = GTEST_FLAG(shuffle) ? - GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0; - - // True iff at least one test has failed. - bool failed = false; - - TestEventListener* repeater = listeners()->repeater(); - - repeater->OnTestProgramStart(*parent_); - - // How many times to repeat the tests? We don't want to repeat them - // when we are inside the subprocess of a death test. - const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat); - // Repeats forever if the repeat count is negative. - const bool forever = repeat < 0; - for (int i = 0; forever || i != repeat; i++) { - ClearResult(); - - const TimeInMillis start = GetTimeInMillis(); - - // Shuffles test cases and tests if requested. - if (has_tests_to_run && GTEST_FLAG(shuffle)) { - random()->Reseed(random_seed_); - // This should be done before calling OnTestIterationStart(), - // such that a test event listener can see the actual test order - // in the event. - ShuffleTests(); - } - - // Tells the unit test event listeners that the tests are about to start. - repeater->OnTestIterationStart(*parent_, i); - - // Runs each test case if there is at least one test to run. - if (has_tests_to_run) { - // Sets up all environments beforehand. - repeater->OnEnvironmentsSetUpStart(*parent_); - environments_.ForEach(SetUpEnvironment); - repeater->OnEnvironmentsSetUpEnd(*parent_); - - // Runs the tests only if there was no fatal failure during global - // set-up. - if (!Test::HasFatalFailure()) { - for (int i = 0; i < total_test_case_count(); i++) { - GetMutableTestCase(i)->Run(); - } - } - - // Tears down all environments in reverse order afterwards. - repeater->OnEnvironmentsTearDownStart(*parent_); - environments_in_reverse_order_.ForEach(TearDownEnvironment); - repeater->OnEnvironmentsTearDownEnd(*parent_); - } - - elapsed_time_ = GetTimeInMillis() - start; - - // Tells the unit test event listener that the tests have just finished. - repeater->OnTestIterationEnd(*parent_, i); - - // Gets the result and clears it. - if (!Passed()) { - failed = true; - } - - // Restores the original test order after the iteration. This - // allows the user to quickly repro a failure that happens in the - // N-th iteration without repeating the first (N - 1) iterations. - // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in - // case the user somehow changes the value of the flag somewhere - // (it's always safe to unshuffle the tests). - UnshuffleTests(); - - if (GTEST_FLAG(shuffle)) { - // Picks a new random seed for each iteration. - random_seed_ = GetNextRandomSeed(random_seed_); - } - } - - repeater->OnTestProgramEnd(*parent_); - - // Returns 0 if all tests passed, or 1 other wise. - return failed ? 1 : 0; -} - -// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file -// if the variable is present. If a file already exists at this location, this -// function will write over it. If the variable is present, but the file cannot -// be created, prints an error and exits. -void WriteToShardStatusFileIfNeeded() { - const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile); - if (test_shard_file != NULL) { - FILE* const file = posix::FOpen(test_shard_file, "w"); - if (file == NULL) { - ColoredPrintf(COLOR_RED, - "Could not write to the test shard status file \"%s\" " - "specified by the %s environment variable.\n", - test_shard_file, kTestShardStatusFile); - fflush(stdout); - exit(EXIT_FAILURE); - } - fclose(file); - } -} - -// Checks whether sharding is enabled by examining the relevant -// environment variable values. If the variables are present, -// but inconsistent (i.e., shard_index >= total_shards), prints -// an error and exits. If in_subprocess_for_death_test, sharding is -// disabled because it must only be applied to the original test -// process. Otherwise, we could filter out death tests we intended to execute. -bool ShouldShard(const char* total_shards_env, - const char* shard_index_env, - bool in_subprocess_for_death_test) { - if (in_subprocess_for_death_test) { - return false; - } - - const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1); - const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); - - if (total_shards == -1 && shard_index == -1) { - return false; - } else if (total_shards == -1 && shard_index != -1) { - const Message msg = Message() - << "Invalid environment variables: you have " - << kTestShardIndex << " = " << shard_index - << ", but have left " << kTestTotalShards << " unset.\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } else if (total_shards != -1 && shard_index == -1) { - const Message msg = Message() - << "Invalid environment variables: you have " - << kTestTotalShards << " = " << total_shards - << ", but have left " << kTestShardIndex << " unset.\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } else if (shard_index < 0 || shard_index >= total_shards) { - const Message msg = Message() - << "Invalid environment variables: we require 0 <= " - << kTestShardIndex << " < " << kTestTotalShards - << ", but you have " << kTestShardIndex << "=" << shard_index - << ", " << kTestTotalShards << "=" << total_shards << ".\n"; - ColoredPrintf(COLOR_RED, msg.GetString().c_str()); - fflush(stdout); - exit(EXIT_FAILURE); - } - - return total_shards > 1; -} - -// Parses the environment variable var as an Int32. If it is unset, -// returns default_val. If it is not an Int32, prints an error -// and aborts. -Int32 Int32FromEnvOrDie(const char* const var, Int32 default_val) { - const char* str_val = posix::GetEnv(var); - if (str_val == NULL) { - return default_val; - } - - Int32 result; - if (!ParseInt32(Message() << "The value of environment variable " << var, - str_val, &result)) { - exit(EXIT_FAILURE); - } - return result; -} - -// Given the total number of shards, the shard index, and the test id, -// returns true iff the test should be run on this shard. The test id is -// some arbitrary but unique non-negative integer assigned to each test -// method. Assumes that 0 <= shard_index < total_shards. -bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { - return (test_id % total_shards) == shard_index; -} - -// Compares the name of each test with the user-specified filter to -// decide whether the test should be run, then records the result in -// each TestCase and TestInfo object. -// If shard_tests == true, further filters tests based on sharding -// variables in the environment - see -// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide. -// Returns the number of tests that should run. -int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) { - const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ? - Int32FromEnvOrDie(kTestTotalShards, -1) : -1; - const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ? - Int32FromEnvOrDie(kTestShardIndex, -1) : -1; - - // num_runnable_tests are the number of tests that will - // run across all shards (i.e., match filter and are not disabled). - // num_selected_tests are the number of tests to be run on - // this shard. - int num_runnable_tests = 0; - int num_selected_tests = 0; - for (int i = 0; i < test_cases_.size(); i++) { - TestCase* const test_case = test_cases_.GetElement(i); - const String &test_case_name = test_case->name(); - test_case->set_should_run(false); - - for (int j = 0; j < test_case->test_info_list().size(); j++) { - TestInfo* const test_info = test_case->test_info_list().GetElement(j); - const String test_name(test_info->name()); - // A test is disabled if test case name or test name matches - // kDisableTestFilter. - const bool is_disabled = - internal::UnitTestOptions::MatchesFilter(test_case_name, - kDisableTestFilter) || - internal::UnitTestOptions::MatchesFilter(test_name, - kDisableTestFilter); - test_info->impl()->set_is_disabled(is_disabled); - - const bool matches_filter = - internal::UnitTestOptions::FilterMatchesTest(test_case_name, - test_name); - test_info->impl()->set_matches_filter(matches_filter); - - const bool is_runnable = - (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) && - matches_filter; - - const bool is_selected = is_runnable && - (shard_tests == IGNORE_SHARDING_PROTOCOL || - ShouldRunTestOnShard(total_shards, shard_index, - num_runnable_tests)); - - num_runnable_tests += is_runnable; - num_selected_tests += is_selected; - - test_info->impl()->set_should_run(is_selected); - test_case->set_should_run(test_case->should_run() || is_selected); - } - } - return num_selected_tests; -} - -// Prints the names of the tests matching the user-specified filter flag. -void UnitTestImpl::ListTestsMatchingFilter() { - for (int i = 0; i < test_cases_.size(); i++) { - const TestCase* const test_case = test_cases_.GetElement(i); - bool printed_test_case_name = false; - - for (int j = 0; j < test_case->test_info_list().size(); j++) { - const TestInfo* const test_info = - test_case->test_info_list().GetElement(j); - if (test_info->matches_filter()) { - if (!printed_test_case_name) { - printed_test_case_name = true; - printf("%s.\n", test_case->name()); - } - printf(" %s\n", test_info->name()); - } - } - } - fflush(stdout); -} - -// Sets the OS stack trace getter. -// -// Does nothing if the input and the current OS stack trace getter are -// the same; otherwise, deletes the old getter and makes the input the -// current getter. -void UnitTestImpl::set_os_stack_trace_getter( - OsStackTraceGetterInterface* getter) { - if (os_stack_trace_getter_ != getter) { - delete os_stack_trace_getter_; - os_stack_trace_getter_ = getter; - } -} - -// Returns the current OS stack trace getter if it is not NULL; -// otherwise, creates an OsStackTraceGetter, makes it the current -// getter, and returns it. -OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() { - if (os_stack_trace_getter_ == NULL) { - os_stack_trace_getter_ = new OsStackTraceGetter; - } - - return os_stack_trace_getter_; -} - -// Returns the TestResult for the test that's currently running, or -// the TestResult for the ad hoc test if no test is running. -TestResult* UnitTestImpl::current_test_result() { - return current_test_info_ ? - current_test_info_->impl()->result() : &ad_hoc_test_result_; -} - -// Shuffles all test cases, and the tests within each test case, -// making sure that death tests are still run first. -void UnitTestImpl::ShuffleTests() { - // Shuffles the death test cases. - test_case_indices_.ShuffleRange(random(), 0, last_death_test_case_ + 1); - - // Shuffles the non-death test cases. - test_case_indices_.ShuffleRange(random(), last_death_test_case_ + 1, - test_cases_.size()); - - // Shuffles the tests inside each test case. - for (int i = 0; i < test_cases_.size(); i++) { - test_cases_.GetElement(i)->ShuffleTests(random()); - } -} - -// Restores the test cases and tests to their order before the first shuffle. -void UnitTestImpl::UnshuffleTests() { - for (int i = 0; i < test_cases_.size(); i++) { - // Unshuffles the tests in each test case. - test_cases_.GetElement(i)->UnshuffleTests(); - // Resets the index of each test case. - test_case_indices_.GetMutableElement(i) = i; - } -} - -// TestInfoImpl constructor. The new instance assumes ownership of the test -// factory object. -TestInfoImpl::TestInfoImpl(TestInfo* parent, - const char* test_case_name, - const char* name, - const char* test_case_comment, - const char* comment, - TypeId fixture_class_id, - internal::TestFactoryBase* factory) : - parent_(parent), - test_case_name_(String(test_case_name)), - name_(String(name)), - test_case_comment_(String(test_case_comment)), - comment_(String(comment)), - fixture_class_id_(fixture_class_id), - should_run_(false), - is_disabled_(false), - matches_filter_(false), - factory_(factory) { -} - -// TestInfoImpl destructor. -TestInfoImpl::~TestInfoImpl() { - delete factory_; -} - -// Returns the current OS stack trace as a String. -// -// The maximum number of stack frames to be included is specified by -// the gtest_stack_trace_depth flag. The skip_count parameter -// specifies the number of top frames to be skipped, which doesn't -// count against the number of frames to be included. -// -// For example, if Foo() calls Bar(), which in turn calls -// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in -// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/, - int skip_count) { - // We pass skip_count + 1 to skip this wrapper function in addition - // to what the user really wants to skip. - return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1); -} - -// Used by the GTEST_HIDE_UNREACHABLE_CODE_ macro to suppress unreachable -// code warnings. -namespace { -class ClassUniqueToAlwaysTrue {}; -} - -bool IsTrue(bool condition) { return condition; } - -bool AlwaysTrue() { -#if GTEST_HAS_EXCEPTIONS - // This condition is always false so AlwaysTrue() never actually throws, - // but it makes the compiler think that it may throw. - if (IsTrue(false)) - throw ClassUniqueToAlwaysTrue(); -#endif // GTEST_HAS_EXCEPTIONS - return true; -} - -// Parses a string as a command line flag. The string should have -// the format "--flag=value". When def_optional is true, the "=value" -// part can be omitted. -// -// Returns the value of the flag, or NULL if the parsing failed. -const char* ParseFlagValue(const char* str, - const char* flag, - bool def_optional) { - // str and flag must not be NULL. - if (str == NULL || flag == NULL) return NULL; - - // The flag must start with "--" followed by GTEST_FLAG_PREFIX_. - const String flag_str = String::Format("--%s%s", GTEST_FLAG_PREFIX_, flag); - const size_t flag_len = flag_str.length(); - if (strncmp(str, flag_str.c_str(), flag_len) != 0) return NULL; - - // Skips the flag name. - const char* flag_end = str + flag_len; - - // When def_optional is true, it's OK to not have a "=value" part. - if (def_optional && (flag_end[0] == '\0')) { - return flag_end; - } - - // If def_optional is true and there are more characters after the - // flag name, or if def_optional is false, there must be a '=' after - // the flag name. - if (flag_end[0] != '=') return NULL; - - // Returns the string after "=". - return flag_end + 1; -} - -// Parses a string for a bool flag, in the form of either -// "--flag=value" or "--flag". -// -// In the former case, the value is taken as true as long as it does -// not start with '0', 'f', or 'F'. -// -// In the latter case, the value is taken as true. -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseBoolFlag(const char* str, const char* flag, bool* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, true); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Converts the string value to a bool. - *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); - return true; -} - -// Parses a string for an Int32 flag, in the form of -// "--flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseInt32Flag(const char* str, const char* flag, Int32* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, false); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Sets *value to the value of the flag. - return ParseInt32(Message() << "The value of flag --" << flag, - value_str, value); -} - -// Parses a string for a string flag, in the form of -// "--flag=value". -// -// On success, stores the value of the flag in *value, and returns -// true. On failure, returns false without changing *value. -bool ParseStringFlag(const char* str, const char* flag, String* value) { - // Gets the value of the flag as a string. - const char* const value_str = ParseFlagValue(str, flag, false); - - // Aborts if the parsing failed. - if (value_str == NULL) return false; - - // Sets *value to the value of the flag. - *value = value_str; - return true; -} - -// Prints a string containing code-encoded text. The following escape -// sequences can be used in the string to control the text color: -// -// @@ prints a single '@' character. -// @R changes the color to red. -// @G changes the color to green. -// @Y changes the color to yellow. -// @D changes to the default terminal text color. -// -// TODO(wan@google.com): Write tests for this once we add stdout -// capturing to Google Test. -static void PrintColorEncoded(const char* str) { - GTestColor color = COLOR_DEFAULT; // The current color. - - // Conceptually, we split the string into segments divided by escape - // sequences. Then we print one segment at a time. At the end of - // each iteration, the str pointer advances to the beginning of the - // next segment. - for (;;) { - const char* p = strchr(str, '@'); - if (p == NULL) { - ColoredPrintf(color, "%s", str); - return; - } - - ColoredPrintf(color, "%s", String(str, p - str).c_str()); - - const char ch = p[1]; - str = p + 2; - if (ch == '@') { - ColoredPrintf(color, "@"); - } else if (ch == 'D') { - color = COLOR_DEFAULT; - } else if (ch == 'R') { - color = COLOR_RED; - } else if (ch == 'G') { - color = COLOR_GREEN; - } else if (ch == 'Y') { - color = COLOR_YELLOW; - } else { - --str; - } - } -} - -static const char kColorEncodedHelpMessage[] = -"This program contains tests written using " GTEST_NAME_ ". You can use the\n" -"following command line flags to control its behavior:\n" -"\n" -"Test Selection:\n" -" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n" -" List the names of all tests instead of running them. The name of\n" -" TEST(Foo, Bar) is \"Foo.Bar\".\n" -" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS" - "[@G-@YNEGATIVE_PATTERNS]@D\n" -" Run only the tests whose name matches one of the positive patterns but\n" -" none of the negative patterns. '?' matches any single character; '*'\n" -" matches any substring; ':' separates two patterns.\n" -" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n" -" Run all disabled tests too.\n" -"\n" -"Test Execution:\n" -" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n" -" Run the tests repeatedly; use a negative count to repeat forever.\n" -" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n" -" Randomize tests' orders on every iteration.\n" -" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n" -" Random number seed to use for shuffling test orders (between 1 and\n" -" 99999, or 0 to use a seed based on the current time).\n" -"\n" -"Test Output:\n" -" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n" -" Enable/disable colored output. The default is @Gauto@D.\n" -" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n" -" Don't print the elapsed time of each test.\n" -" @G--" GTEST_FLAG_PREFIX_ "output=xml@Y[@G:@YDIRECTORY_PATH@G" - GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n" -" Generate an XML report in the given directory or with the given file\n" -" name. @YFILE_PATH@D defaults to @Gtest_details.xml@D.\n" -"\n" -"Assertion Behavior:\n" -#if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n" -" Set the default death test style.\n" -#endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n" -" Turn assertion failures into debugger break-points.\n" -" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n" -" Turn assertion failures into C++ exceptions.\n" -#if GTEST_OS_WINDOWS -" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions@D\n" -" Suppress pop-ups caused by exceptions.\n" -#endif // GTEST_OS_WINDOWS -"\n" -"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set " - "the corresponding\n" -"environment variable of a flag (all letters in upper-case). For example, to\n" -"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_ - "color=no@D or set\n" -"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n" -"\n" -"For more information, please read the " GTEST_NAME_ " documentation at\n" -"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n" -"(not one in your own code or tests), please report it to\n" -"@G<" GTEST_DEV_EMAIL_ ">@D.\n"; - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. The type parameter CharType can be -// instantiated to either char or wchar_t. -template -void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { - for (int i = 1; i < *argc; i++) { - const String arg_string = StreamableToString(argv[i]); - const char* const arg = arg_string.c_str(); - - using internal::ParseBoolFlag; - using internal::ParseInt32Flag; - using internal::ParseStringFlag; - - // Do we see a Google Test flag? - if (ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag, - >EST_FLAG(also_run_disabled_tests)) || - ParseBoolFlag(arg, kBreakOnFailureFlag, - >EST_FLAG(break_on_failure)) || - ParseBoolFlag(arg, kCatchExceptionsFlag, - >EST_FLAG(catch_exceptions)) || - ParseStringFlag(arg, kColorFlag, >EST_FLAG(color)) || - ParseStringFlag(arg, kDeathTestStyleFlag, - >EST_FLAG(death_test_style)) || - ParseBoolFlag(arg, kDeathTestUseFork, - >EST_FLAG(death_test_use_fork)) || - ParseStringFlag(arg, kFilterFlag, >EST_FLAG(filter)) || - ParseStringFlag(arg, kInternalRunDeathTestFlag, - >EST_FLAG(internal_run_death_test)) || - ParseBoolFlag(arg, kListTestsFlag, >EST_FLAG(list_tests)) || - ParseStringFlag(arg, kOutputFlag, >EST_FLAG(output)) || - ParseBoolFlag(arg, kPrintTimeFlag, >EST_FLAG(print_time)) || - ParseInt32Flag(arg, kRandomSeedFlag, >EST_FLAG(random_seed)) || - ParseInt32Flag(arg, kRepeatFlag, >EST_FLAG(repeat)) || - ParseBoolFlag(arg, kShuffleFlag, >EST_FLAG(shuffle)) || - ParseBoolFlag(arg, kThrowOnFailureFlag, >EST_FLAG(throw_on_failure)) - ) { - // Yes. Shift the remainder of the argv list left by one. Note - // that argv has (*argc + 1) elements, the last one always being - // NULL. The following loop moves the trailing NULL element as - // well. - for (int j = i; j != *argc; j++) { - argv[j] = argv[j + 1]; - } - - // Decrements the argument count. - (*argc)--; - - // We also need to decrement the iterator as we just removed - // an element. - i--; - } else if (arg_string == "--help" || arg_string == "-h" || - arg_string == "-?" || arg_string == "/?") { - g_help_flag = true; - } - } - - if (g_help_flag) { - // We print the help here instead of in RUN_ALL_TESTS(), as the - // latter may not be called at all if the user is using Google - // Test with another testing framework. - PrintColorEncoded(kColorEncodedHelpMessage); - } -} - -// Parses the command line for Google Test flags, without initializing -// other parts of Google Test. -void ParseGoogleTestFlagsOnly(int* argc, char** argv) { - ParseGoogleTestFlagsOnlyImpl(argc, argv); -} -void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { - ParseGoogleTestFlagsOnlyImpl(argc, argv); -} - -// The internal implementation of InitGoogleTest(). -// -// The type parameter CharType can be instantiated to either char or -// wchar_t. -template -void InitGoogleTestImpl(int* argc, CharType** argv) { - g_init_gtest_count++; - - // We don't want to run the initialization code twice. - if (g_init_gtest_count != 1) return; - - if (*argc <= 0) return; - - internal::g_executable_path = internal::StreamableToString(argv[0]); - -#if GTEST_HAS_DEATH_TEST - g_argvs.clear(); - for (int i = 0; i != *argc; i++) { - g_argvs.push_back(StreamableToString(argv[i])); - } -#endif // GTEST_HAS_DEATH_TEST - - ParseGoogleTestFlagsOnly(argc, argv); - GetUnitTestImpl()->PostFlagParsingInit(); -} - -} // namespace internal - -// Initializes Google Test. This must be called before calling -// RUN_ALL_TESTS(). In particular, it parses a command line for the -// flags that Google Test recognizes. Whenever a Google Test flag is -// seen, it is removed from argv, and *argc is decremented. -// -// No value is returned. Instead, the Google Test flag variables are -// updated. -// -// Calling the function for the second time has no user-visible effect. -void InitGoogleTest(int* argc, char** argv) { - internal::InitGoogleTestImpl(argc, argv); -} - -// This overloaded version can be used in Windows programs compiled in -// UNICODE mode. -void InitGoogleTest(int* argc, wchar_t** argv) { - internal::InitGoogleTestImpl(argc, argv); -} - -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest_main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest_main.cc deleted file mode 100644 index d20c02fd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/src/gtest_main.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include - -int main(int argc, char **argv) { - std::cout << "Running main() from gtest_main.cc\n"; - - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-death-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-death-test_test.cc deleted file mode 100644 index 288c70a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-death-test_test.cc +++ /dev/null @@ -1,1248 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for death tests. - -#include -#include -#include - -using testing::internal::AlwaysFalse; -using testing::internal::AlwaysTrue; - -#if GTEST_HAS_DEATH_TEST - -#if GTEST_OS_WINDOWS -#include // For chdir(). -#else -#include -#include // For waitpid. -#include // For std::numeric_limits. -#endif // GTEST_OS_WINDOWS - -#include -#include -#include - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace posix = ::testing::internal::posix; - -using testing::Message; -using testing::internal::DeathTest; -using testing::internal::DeathTestFactory; -using testing::internal::FilePath; -using testing::internal::GetLastErrnoDescription; -using testing::internal::GetUnitTestImpl; -using testing::internal::ParseNaturalNumber; -using testing::internal::String; - -namespace testing { -namespace internal { - -// A helper class whose objects replace the death test factory for a -// single UnitTest object during their lifetimes. -class ReplaceDeathTestFactory { - public: - explicit ReplaceDeathTestFactory(DeathTestFactory* new_factory) - : unit_test_impl_(GetUnitTestImpl()) { - old_factory_ = unit_test_impl_->death_test_factory_.release(); - unit_test_impl_->death_test_factory_.reset(new_factory); - } - - ~ReplaceDeathTestFactory() { - unit_test_impl_->death_test_factory_.release(); - unit_test_impl_->death_test_factory_.reset(old_factory_); - } - private: - // Prevents copying ReplaceDeathTestFactory objects. - ReplaceDeathTestFactory(const ReplaceDeathTestFactory&); - void operator=(const ReplaceDeathTestFactory&); - - UnitTestImpl* unit_test_impl_; - DeathTestFactory* old_factory_; -}; - -} // namespace internal -} // namespace testing - -// Tests that death tests work. - -class TestForDeathTest : public testing::Test { - protected: - TestForDeathTest() : original_dir_(FilePath::GetCurrentDir()) {} - - virtual ~TestForDeathTest() { - posix::ChDir(original_dir_.c_str()); - } - - // A static member function that's expected to die. - static void StaticMemberFunction() { - fprintf(stderr, "%s", "death inside StaticMemberFunction()."); - fflush(stderr); - // We call _exit() instead of exit(), as the former is a direct - // system call and thus safer in the presence of threads. exit() - // will invoke user-defined exit-hooks, which may do dangerous - // things that conflict with death tests. - _exit(1); - } - - // A method of the test fixture that may die. - void MemberFunction() { - if (should_die_) { - fprintf(stderr, "%s", "death inside MemberFunction()."); - fflush(stderr); - _exit(1); - } - } - - // True iff MemberFunction() should die. - bool should_die_; - const FilePath original_dir_; -}; - -// A class with a member function that may die. -class MayDie { - public: - explicit MayDie(bool should_die) : should_die_(should_die) {} - - // A member function that may die. - void MemberFunction() const { - if (should_die_) { - GTEST_LOG_(FATAL) << "death inside MayDie::MemberFunction()."; - } - } - - private: - // True iff MemberFunction() should die. - bool should_die_; -}; - -// A global function that's expected to die. -void GlobalFunction() { - GTEST_LOG_(FATAL) << "death inside GlobalFunction()."; -} - -// A non-void function that's expected to die. -int NonVoidFunction() { - GTEST_LOG_(FATAL) << "death inside NonVoidFunction()."; - return 1; -} - -// A unary function that may die. -void DieIf(bool should_die) { - if (should_die) { - GTEST_LOG_(FATAL) << "death inside DieIf()."; - } -} - -// A binary function that may die. -bool DieIfLessThan(int x, int y) { - if (x < y) { - GTEST_LOG_(FATAL) << "death inside DieIfLessThan()."; - } - return true; -} - -// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture. -void DeathTestSubroutine() { - EXPECT_DEATH(GlobalFunction(), "death.*GlobalFunction"); - ASSERT_DEATH(GlobalFunction(), "death.*GlobalFunction"); -} - -// Death in dbg, not opt. -int DieInDebugElse12(int* sideeffect) { - if (sideeffect) *sideeffect = 12; -#ifndef NDEBUG - GTEST_LOG_(FATAL) << "debug death inside DieInDebugElse12()"; -#endif // NDEBUG - return 12; -} - -#if GTEST_OS_WINDOWS - -// Tests the ExitedWithCode predicate. -TEST(ExitStatusPredicateTest, ExitedWithCode) { - // On Windows, the process's exit code is the same as its exit status, - // so the predicate just compares the its input with its parameter. - EXPECT_TRUE(testing::ExitedWithCode(0)(0)); - EXPECT_TRUE(testing::ExitedWithCode(1)(1)); - EXPECT_TRUE(testing::ExitedWithCode(42)(42)); - EXPECT_FALSE(testing::ExitedWithCode(0)(1)); - EXPECT_FALSE(testing::ExitedWithCode(1)(0)); -} - -#else - -// Returns the exit status of a process that calls _exit(2) with a -// given exit code. This is a helper function for the -// ExitStatusPredicateTest test suite. -static int NormalExitStatus(int exit_code) { - pid_t child_pid = fork(); - if (child_pid == 0) { - _exit(exit_code); - } - int status; - waitpid(child_pid, &status, 0); - return status; -} - -// Returns the exit status of a process that raises a given signal. -// If the signal does not cause the process to die, then it returns -// instead the exit status of a process that exits normally with exit -// code 1. This is a helper function for the ExitStatusPredicateTest -// test suite. -static int KilledExitStatus(int signum) { - pid_t child_pid = fork(); - if (child_pid == 0) { - raise(signum); - _exit(1); - } - int status; - waitpid(child_pid, &status, 0); - return status; -} - -// Tests the ExitedWithCode predicate. -TEST(ExitStatusPredicateTest, ExitedWithCode) { - const int status0 = NormalExitStatus(0); - const int status1 = NormalExitStatus(1); - const int status42 = NormalExitStatus(42); - const testing::ExitedWithCode pred0(0); - const testing::ExitedWithCode pred1(1); - const testing::ExitedWithCode pred42(42); - EXPECT_PRED1(pred0, status0); - EXPECT_PRED1(pred1, status1); - EXPECT_PRED1(pred42, status42); - EXPECT_FALSE(pred0(status1)); - EXPECT_FALSE(pred42(status0)); - EXPECT_FALSE(pred1(status42)); -} - -// Tests the KilledBySignal predicate. -TEST(ExitStatusPredicateTest, KilledBySignal) { - const int status_segv = KilledExitStatus(SIGSEGV); - const int status_kill = KilledExitStatus(SIGKILL); - const testing::KilledBySignal pred_segv(SIGSEGV); - const testing::KilledBySignal pred_kill(SIGKILL); - EXPECT_PRED1(pred_segv, status_segv); - EXPECT_PRED1(pred_kill, status_kill); - EXPECT_FALSE(pred_segv(status_kill)); - EXPECT_FALSE(pred_kill(status_segv)); -} - -#endif // GTEST_OS_WINDOWS - -// Tests that the death test macros expand to code which may or may not -// be followed by operator<<, and that in either case the complete text -// comprises only a single C++ statement. -TEST_F(TestForDeathTest, SingleStatement) { - if (AlwaysFalse()) - // This would fail if executed; this is a compilation test only - ASSERT_DEATH(return, ""); - - if (AlwaysTrue()) - EXPECT_DEATH(_exit(1), ""); - else - // This empty "else" branch is meant to ensure that EXPECT_DEATH - // doesn't expand into an "if" statement without an "else" - ; - - if (AlwaysFalse()) - ASSERT_DEATH(return, "") << "did not die"; - - if (AlwaysFalse()) - ; - else - EXPECT_DEATH(_exit(1), "") << 1 << 2 << 3; -} - -void DieWithEmbeddedNul() { - fprintf(stderr, "Hello%cmy null world.\n", '\0'); - fflush(stderr); - _exit(1); -} - -#if GTEST_USES_PCRE -// Tests that EXPECT_DEATH and ASSERT_DEATH work when the error -// message has a NUL character in it. -TEST_F(TestForDeathTest, EmbeddedNulInMessage) { - // TODO(wan@google.com): doesn't support matching strings - // with embedded NUL characters - find a way to workaround it. - EXPECT_DEATH(DieWithEmbeddedNul(), "my null world"); - ASSERT_DEATH(DieWithEmbeddedNul(), "my null world"); -} -#endif // GTEST_USES_PCRE - -// Tests that death test macros expand to code which interacts well with switch -// statements. -TEST_F(TestForDeathTest, SwitchStatement) { -// Microsoft compiler usually complains about switch statements without -// case labels. We suppress that warning for this test. -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4065) -#endif // _MSC_VER - - switch (0) - default: - ASSERT_DEATH(_exit(1), "") << "exit in default switch handler"; - - switch (0) - case 0: - EXPECT_DEATH(_exit(1), "") << "exit in switch case"; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER -} - -// Tests that a static member function can be used in a "fast" style -// death test. -TEST_F(TestForDeathTest, StaticMemberFunctionFastStyle) { - testing::GTEST_FLAG(death_test_style) = "fast"; - ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember"); -} - -// Tests that a method of the test fixture can be used in a "fast" -// style death test. -TEST_F(TestForDeathTest, MemberFunctionFastStyle) { - testing::GTEST_FLAG(death_test_style) = "fast"; - should_die_ = true; - EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction"); -} - -void ChangeToRootDir() { posix::ChDir(GTEST_PATH_SEP_); } - -// Tests that death tests work even if the current directory has been -// changed. -TEST_F(TestForDeathTest, FastDeathTestInChangedDir) { - testing::GTEST_FLAG(death_test_style) = "fast"; - - ChangeToRootDir(); - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - - ChangeToRootDir(); - ASSERT_DEATH(_exit(1), ""); -} - -// Repeats a representative sample of death tests in the "threadsafe" style: - -TEST_F(TestForDeathTest, StaticMemberFunctionThreadsafeStyle) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - ASSERT_DEATH(StaticMemberFunction(), "death.*StaticMember"); -} - -TEST_F(TestForDeathTest, MemberFunctionThreadsafeStyle) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - should_die_ = true; - EXPECT_DEATH(MemberFunction(), "inside.*MemberFunction"); -} - -TEST_F(TestForDeathTest, ThreadsafeDeathTestInLoop) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - - for (int i = 0; i < 3; ++i) - EXPECT_EXIT(_exit(i), testing::ExitedWithCode(i), "") << ": i = " << i; -} - -TEST_F(TestForDeathTest, ThreadsafeDeathTestInChangedDir) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - - ChangeToRootDir(); - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - - ChangeToRootDir(); - ASSERT_DEATH(_exit(1), ""); -} - -TEST_F(TestForDeathTest, MixedStyles) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - EXPECT_DEATH(_exit(1), ""); - testing::GTEST_FLAG(death_test_style) = "fast"; - EXPECT_DEATH(_exit(1), ""); -} - -namespace { - -bool pthread_flag; - -void SetPthreadFlag() { - pthread_flag = true; -} - -} // namespace - -#if GTEST_HAS_CLONE - -TEST_F(TestForDeathTest, DoesNotExecuteAtforkHooks) { - if (!testing::GTEST_FLAG(death_test_use_fork)) { - testing::GTEST_FLAG(death_test_style) = "threadsafe"; - pthread_flag = false; - ASSERT_EQ(0, pthread_atfork(&SetPthreadFlag, NULL, NULL)); - ASSERT_DEATH(_exit(1), ""); - ASSERT_FALSE(pthread_flag); - } -} - -#endif // GTEST_HAS_CLONE - -// Tests that a method of another class can be used in a death test. -TEST_F(TestForDeathTest, MethodOfAnotherClass) { - const MayDie x(true); - ASSERT_DEATH(x.MemberFunction(), "MayDie\\:\\:MemberFunction"); -} - -// Tests that a global function can be used in a death test. -TEST_F(TestForDeathTest, GlobalFunction) { - EXPECT_DEATH(GlobalFunction(), "GlobalFunction"); -} - -// Tests that any value convertible to an RE works as a second -// argument to EXPECT_DEATH. -TEST_F(TestForDeathTest, AcceptsAnythingConvertibleToRE) { - static const char regex_c_str[] = "GlobalFunction"; - EXPECT_DEATH(GlobalFunction(), regex_c_str); - - const testing::internal::RE regex(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex); - -#if GTEST_HAS_GLOBAL_STRING - const string regex_str(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex_str); -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_STD_STRING - const ::std::string regex_std_str(regex_c_str); - EXPECT_DEATH(GlobalFunction(), regex_std_str); -#endif // GTEST_HAS_STD_STRING -} - -// Tests that a non-void function can be used in a death test. -TEST_F(TestForDeathTest, NonVoidFunction) { - ASSERT_DEATH(NonVoidFunction(), "NonVoidFunction"); -} - -// Tests that functions that take parameter(s) can be used in a death test. -TEST_F(TestForDeathTest, FunctionWithParameter) { - EXPECT_DEATH(DieIf(true), "DieIf\\(\\)"); - EXPECT_DEATH(DieIfLessThan(2, 3), "DieIfLessThan"); -} - -// Tests that ASSERT_DEATH can be used outside a TEST, TEST_F, or test fixture. -TEST_F(TestForDeathTest, OutsideFixture) { - DeathTestSubroutine(); -} - -// Tests that death tests can be done inside a loop. -TEST_F(TestForDeathTest, InsideLoop) { - for (int i = 0; i < 5; i++) { - EXPECT_DEATH(DieIfLessThan(-1, i), "DieIfLessThan") << "where i == " << i; - } -} - -// Tests that a compound statement can be used in a death test. -TEST_F(TestForDeathTest, CompoundStatement) { - EXPECT_DEATH({ // NOLINT - const int x = 2; - const int y = x + 1; - DieIfLessThan(x, y); - }, - "DieIfLessThan"); -} - -// Tests that code that doesn't die causes a death test to fail. -TEST_F(TestForDeathTest, DoesNotDie) { - EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(DieIf(false), "DieIf"), - "failed to die"); -} - -// Tests that a death test fails when the error message isn't expected. -TEST_F(TestForDeathTest, ErrorMessageMismatch) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(DieIf(true), "DieIfLessThan") << "End of death test message."; - }, "died but not with expected error"); -} - -// On exit, *aborted will be true iff the EXPECT_DEATH() statement -// aborted the function. -void ExpectDeathTestHelper(bool* aborted) { - *aborted = true; - EXPECT_DEATH(DieIf(false), "DieIf"); // This assertion should fail. - *aborted = false; -} - -// Tests that EXPECT_DEATH doesn't abort the test on failure. -TEST_F(TestForDeathTest, EXPECT_DEATH) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(ExpectDeathTestHelper(&aborted), - "failed to die"); - EXPECT_FALSE(aborted); -} - -// Tests that ASSERT_DEATH does abort the test on failure. -TEST_F(TestForDeathTest, ASSERT_DEATH) { - static bool aborted; - EXPECT_FATAL_FAILURE({ // NOLINT - aborted = true; - ASSERT_DEATH(DieIf(false), "DieIf"); // This assertion should fail. - aborted = false; - }, "failed to die"); - EXPECT_TRUE(aborted); -} - -// Tests that EXPECT_DEATH evaluates the arguments exactly once. -TEST_F(TestForDeathTest, SingleEvaluation) { - int x = 3; - EXPECT_DEATH(DieIf((++x) == 4), "DieIf"); - - const char* regex = "DieIf"; - const char* regex_save = regex; - EXPECT_DEATH(DieIfLessThan(3, 4), regex++); - EXPECT_EQ(regex_save + 1, regex); -} - -// Tests that run-away death tests are reported as failures. -TEST_F(TestForDeathTest, Runaway) { - EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(static_cast(0), "Foo"), - "failed to die."); - - EXPECT_FATAL_FAILURE(ASSERT_DEATH(return, "Bar"), - "illegal return in test statement."); -} - - -// Tests that EXPECT_DEBUG_DEATH works as expected, -// that is, in debug mode, it: -// 1. Asserts on death. -// 2. Has no side effect. -// -// And in opt mode, it: -// 1. Has side effects but does not assert. -TEST_F(TestForDeathTest, TestExpectDebugDeath) { - int sideeffect = 0; - - EXPECT_DEBUG_DEATH(DieInDebugElse12(&sideeffect), - "death.*DieInDebugElse12"); - -#ifdef NDEBUG - // Checks that the assignment occurs in opt mode (sideeffect). - EXPECT_EQ(12, sideeffect); -#else - // Checks that the assignment does not occur in dbg mode (no sideeffect). - EXPECT_EQ(0, sideeffect); -#endif -} - -// Tests that ASSERT_DEBUG_DEATH works as expected -// In debug mode: -// 1. Asserts on debug death. -// 2. Has no side effect. -// -// In opt mode: -// 1. Has side effects and returns the expected value (12). -TEST_F(TestForDeathTest, TestAssertDebugDeath) { - int sideeffect = 0; - - ASSERT_DEBUG_DEATH({ // NOLINT - // Tests that the return value is 12 in opt mode. - EXPECT_EQ(12, DieInDebugElse12(&sideeffect)); - // Tests that the side effect occurred in opt mode. - EXPECT_EQ(12, sideeffect); - }, "death.*DieInDebugElse12"); - -#ifdef NDEBUG - // Checks that the assignment occurs in opt mode (sideeffect). - EXPECT_EQ(12, sideeffect); -#else - // Checks that the assignment does not occur in dbg mode (no sideeffect). - EXPECT_EQ(0, sideeffect); -#endif -} - -#ifndef NDEBUG - -void ExpectDebugDeathHelper(bool* aborted) { - *aborted = true; - EXPECT_DEBUG_DEATH(return, "") << "This is expected to fail."; - *aborted = false; -} - -#if GTEST_OS_WINDOWS -TEST(PopUpDeathTest, DoesNotShowPopUpOnAbort) { - printf("This test should be considered failing if it shows " - "any pop-up dialogs.\n"); - fflush(stdout); - - EXPECT_DEATH({ - testing::GTEST_FLAG(catch_exceptions) = false; - abort(); - }, ""); -} - -TEST(PopUpDeathTest, DoesNotShowPopUpOnThrow) { - printf("This test should be considered failing if it shows " - "any pop-up dialogs.\n"); - fflush(stdout); - - EXPECT_DEATH({ - testing::GTEST_FLAG(catch_exceptions) = false; - throw 1; - }, ""); -} -#endif // GTEST_OS_WINDOWS - -// Tests that EXPECT_DEBUG_DEATH in debug mode does not abort -// the function. -TEST_F(TestForDeathTest, ExpectDebugDeathDoesNotAbort) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(ExpectDebugDeathHelper(&aborted), ""); - EXPECT_FALSE(aborted); -} - -void AssertDebugDeathHelper(bool* aborted) { - *aborted = true; - ASSERT_DEBUG_DEATH(return, "") << "This is expected to fail."; - *aborted = false; -} - -// Tests that ASSERT_DEBUG_DEATH in debug mode aborts the function on -// failure. -TEST_F(TestForDeathTest, AssertDebugDeathAborts) { - static bool aborted; - aborted = false; - EXPECT_FATAL_FAILURE(AssertDebugDeathHelper(&aborted), ""); - EXPECT_TRUE(aborted); -} - -#endif // _NDEBUG - -// Tests the *_EXIT family of macros, using a variety of predicates. -static void TestExitMacros() { - EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), ""); - ASSERT_EXIT(_exit(42), testing::ExitedWithCode(42), ""); - -#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW - // MinGW (as of MinGW 5.1.6 and MSYS 1.0.11) does not tag crashed - // processes with non-zero exit code and does not honor calls to - // SetErrorMode(SEM_NOGPFAULTERRORBOX) that are supposed to suppress - // error pop-ups. - EXPECT_EXIT({ - testing::GTEST_FLAG(catch_exceptions) = false; - *static_cast(NULL) = 1; - }, testing::ExitedWithCode(0xC0000005), "") << "foo"; - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EXIT({ - testing::GTEST_FLAG(catch_exceptions) = false; - *static_cast(NULL) = 1; - }, testing::ExitedWithCode(0), "") << "This failure is expected."; - }, "This failure is expected."); -#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW - -#if GTEST_OS_WINDOWS - // Of all signals effects on the process exit code, only those of SIGABRT - // are documented on Windows. - // See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx. - EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), ""); -#else - EXPECT_EXIT(raise(SIGKILL), testing::KilledBySignal(SIGKILL), "") << "foo"; - ASSERT_EXIT(raise(SIGUSR2), testing::KilledBySignal(SIGUSR2), "") << "bar"; - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EXIT(_exit(0), testing::KilledBySignal(SIGSEGV), "") - << "This failure is expected, too."; - }, "This failure is expected, too."); -#endif // GTEST_OS_WINDOWS - - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EXIT(raise(SIGSEGV), testing::ExitedWithCode(0), "") - << "This failure is expected."; - }, "This failure is expected."); -} - -TEST_F(TestForDeathTest, ExitMacros) { - TestExitMacros(); -} - -TEST_F(TestForDeathTest, ExitMacrosUsingFork) { - testing::GTEST_FLAG(death_test_use_fork) = true; - TestExitMacros(); -} - -TEST_F(TestForDeathTest, InvalidStyle) { - testing::GTEST_FLAG(death_test_style) = "rococo"; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(_exit(0), "") << "This failure is expected."; - }, "This failure is expected."); -} - -// A DeathTestFactory that returns MockDeathTests. -class MockDeathTestFactory : public DeathTestFactory { - public: - MockDeathTestFactory(); - virtual bool Create(const char* statement, - const ::testing::internal::RE* regex, - const char* file, int line, DeathTest** test); - - // Sets the parameters for subsequent calls to Create. - void SetParameters(bool create, DeathTest::TestRole role, - int status, bool passed); - - // Accessors. - int AssumeRoleCalls() const { return assume_role_calls_; } - int WaitCalls() const { return wait_calls_; } - int PassedCalls() const { return passed_args_.size(); } - bool PassedArgument(int n) const { return passed_args_[n]; } - int AbortCalls() const { return abort_args_.size(); } - DeathTest::AbortReason AbortArgument(int n) const { - return abort_args_[n]; - } - bool TestDeleted() const { return test_deleted_; } - - private: - friend class MockDeathTest; - // If true, Create will return a MockDeathTest; otherwise it returns - // NULL. - bool create_; - // The value a MockDeathTest will return from its AssumeRole method. - DeathTest::TestRole role_; - // The value a MockDeathTest will return from its Wait method. - int status_; - // The value a MockDeathTest will return from its Passed method. - bool passed_; - - // Number of times AssumeRole was called. - int assume_role_calls_; - // Number of times Wait was called. - int wait_calls_; - // The arguments to the calls to Passed since the last call to - // SetParameters. - std::vector passed_args_; - // The arguments to the calls to Abort since the last call to - // SetParameters. - std::vector abort_args_; - // True if the last MockDeathTest returned by Create has been - // deleted. - bool test_deleted_; -}; - - -// A DeathTest implementation useful in testing. It returns values set -// at its creation from its various inherited DeathTest methods, and -// reports calls to those methods to its parent MockDeathTestFactory -// object. -class MockDeathTest : public DeathTest { - public: - MockDeathTest(MockDeathTestFactory *parent, - TestRole role, int status, bool passed) : - parent_(parent), role_(role), status_(status), passed_(passed) { - } - virtual ~MockDeathTest() { - parent_->test_deleted_ = true; - } - virtual TestRole AssumeRole() { - ++parent_->assume_role_calls_; - return role_; - } - virtual int Wait() { - ++parent_->wait_calls_; - return status_; - } - virtual bool Passed(bool exit_status_ok) { - parent_->passed_args_.push_back(exit_status_ok); - return passed_; - } - virtual void Abort(AbortReason reason) { - parent_->abort_args_.push_back(reason); - } - private: - MockDeathTestFactory* const parent_; - const TestRole role_; - const int status_; - const bool passed_; -}; - - -// MockDeathTestFactory constructor. -MockDeathTestFactory::MockDeathTestFactory() - : create_(true), - role_(DeathTest::OVERSEE_TEST), - status_(0), - passed_(true), - assume_role_calls_(0), - wait_calls_(0), - passed_args_(), - abort_args_() { -} - - -// Sets the parameters for subsequent calls to Create. -void MockDeathTestFactory::SetParameters(bool create, - DeathTest::TestRole role, - int status, bool passed) { - create_ = create; - role_ = role; - status_ = status; - passed_ = passed; - - assume_role_calls_ = 0; - wait_calls_ = 0; - passed_args_.clear(); - abort_args_.clear(); -} - - -// Sets test to NULL (if create_ is false) or to the address of a new -// MockDeathTest object with parameters taken from the last call -// to SetParameters (if create_ is true). Always returns true. -bool MockDeathTestFactory::Create(const char* /*statement*/, - const ::testing::internal::RE* /*regex*/, - const char* /*file*/, - int /*line*/, - DeathTest** test) { - test_deleted_ = false; - if (create_) { - *test = new MockDeathTest(this, role_, status_, passed_); - } else { - *test = NULL; - } - return true; -} - -// A test fixture for testing the logic of the GTEST_DEATH_TEST_ macro. -// It installs a MockDeathTestFactory that is used for the duration -// of the test case. -class MacroLogicDeathTest : public testing::Test { - protected: - static testing::internal::ReplaceDeathTestFactory* replacer_; - static MockDeathTestFactory* factory_; - - static void SetUpTestCase() { - factory_ = new MockDeathTestFactory; - replacer_ = new testing::internal::ReplaceDeathTestFactory(factory_); - } - - static void TearDownTestCase() { - delete replacer_; - replacer_ = NULL; - delete factory_; - factory_ = NULL; - } - - // Runs a death test that breaks the rules by returning. Such a death - // test cannot be run directly from a test routine that uses a - // MockDeathTest, or the remainder of the routine will not be executed. - static void RunReturningDeathTest(bool* flag) { - ASSERT_DEATH({ // NOLINT - *flag = true; - return; - }, ""); - } -}; - -testing::internal::ReplaceDeathTestFactory* MacroLogicDeathTest::replacer_ - = NULL; -MockDeathTestFactory* MacroLogicDeathTest::factory_ = NULL; - - -// Test that nothing happens when the factory doesn't return a DeathTest: -TEST_F(MacroLogicDeathTest, NothingHappens) { - bool flag = false; - factory_->SetParameters(false, DeathTest::OVERSEE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(0, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_FALSE(factory_->TestDeleted()); -} - -// Test that the parent process doesn't run the death test code, -// and that the Passed method returns false when the (simulated) -// child process exits with status 0: -TEST_F(MacroLogicDeathTest, ChildExitsSuccessfully) { - bool flag = false; - factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(1, factory_->WaitCalls()); - ASSERT_EQ(1, factory_->PassedCalls()); - EXPECT_FALSE(factory_->PassedArgument(0)); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the Passed method was given the argument "true" when -// the (simulated) child process exits with status 1: -TEST_F(MacroLogicDeathTest, ChildExitsUnsuccessfully) { - bool flag = false; - factory_->SetParameters(true, DeathTest::OVERSEE_TEST, 1, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_FALSE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(1, factory_->WaitCalls()); - ASSERT_EQ(1, factory_->PassedCalls()); - EXPECT_TRUE(factory_->PassedArgument(0)); - EXPECT_EQ(0, factory_->AbortCalls()); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the (simulated) child process executes the death test -// code, and is aborted with the correct AbortReason if it -// executes a return statement. -TEST_F(MacroLogicDeathTest, ChildPerformsReturn) { - bool flag = false; - factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true); - RunReturningDeathTest(&flag); - EXPECT_TRUE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - EXPECT_EQ(1, factory_->AbortCalls()); - EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT, - factory_->AbortArgument(0)); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that the (simulated) child process is aborted with the -// correct AbortReason if it does not die. -TEST_F(MacroLogicDeathTest, ChildDoesNotDie) { - bool flag = false; - factory_->SetParameters(true, DeathTest::EXECUTE_TEST, 0, true); - EXPECT_DEATH(flag = true, ""); - EXPECT_TRUE(flag); - EXPECT_EQ(1, factory_->AssumeRoleCalls()); - EXPECT_EQ(0, factory_->WaitCalls()); - EXPECT_EQ(0, factory_->PassedCalls()); - // This time there are two calls to Abort: one since the test didn't - // die, and another from the ReturnSentinel when it's destroyed. The - // sentinel normally isn't destroyed if a test doesn't die, since - // _exit(2) is called in that case by ForkingDeathTest, but not by - // our MockDeathTest. - ASSERT_EQ(2, factory_->AbortCalls()); - EXPECT_EQ(DeathTest::TEST_DID_NOT_DIE, - factory_->AbortArgument(0)); - EXPECT_EQ(DeathTest::TEST_ENCOUNTERED_RETURN_STATEMENT, - factory_->AbortArgument(1)); - EXPECT_TRUE(factory_->TestDeleted()); -} - -// Tests that a successful death test does not register a successful -// test part. -TEST(SuccessRegistrationDeathTest, NoSuccessPart) { - EXPECT_DEATH(_exit(1), ""); - EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -TEST(StreamingAssertionsDeathTest, DeathTest) { - EXPECT_DEATH(_exit(1), "") << "unexpected failure"; - ASSERT_DEATH(_exit(1), "") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_DEATH(_exit(0), "") << "expected failure"; - }, "expected failure"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_DEATH(_exit(0), "") << "expected failure"; - }, "expected failure"); -} - -// Tests that GetLastErrnoDescription returns an empty string when the -// last error is 0 and non-empty string when it is non-zero. -TEST(GetLastErrnoDescription, GetLastErrnoDescriptionWorks) { - errno = ENOENT; - EXPECT_STRNE("", GetLastErrnoDescription().c_str()); - errno = 0; - EXPECT_STREQ("", GetLastErrnoDescription().c_str()); -} - -#if GTEST_OS_WINDOWS -TEST(AutoHandleTest, AutoHandleWorks) { - HANDLE handle = ::CreateEvent(NULL, FALSE, FALSE, NULL); - ASSERT_NE(INVALID_HANDLE_VALUE, handle); - - // Tests that the AutoHandle is correctly initialized with a handle. - testing::internal::AutoHandle auto_handle(handle); - EXPECT_EQ(handle, auto_handle.Get()); - - // Tests that Reset assigns INVALID_HANDLE_VALUE. - // Note that this cannot verify whether the original handle is closed. - auto_handle.Reset(); - EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle.Get()); - - // Tests that Reset assigns the new handle. - // Note that this cannot verify whether the original handle is closed. - handle = ::CreateEvent(NULL, FALSE, FALSE, NULL); - ASSERT_NE(INVALID_HANDLE_VALUE, handle); - auto_handle.Reset(handle); - EXPECT_EQ(handle, auto_handle.Get()); - - // Tests that AutoHandle contains INVALID_HANDLE_VALUE by default. - testing::internal::AutoHandle auto_handle2; - EXPECT_EQ(INVALID_HANDLE_VALUE, auto_handle2.Get()); -} -#endif // GTEST_OS_WINDOWS - -#if GTEST_OS_WINDOWS -typedef unsigned __int64 BiggestParsable; -typedef signed __int64 BiggestSignedParsable; -const BiggestParsable kBiggestParsableMax = ULLONG_MAX; -const BiggestParsable kBiggestSignedParsableMax = LLONG_MAX; -#else -typedef unsigned long long BiggestParsable; -typedef signed long long BiggestSignedParsable; -const BiggestParsable kBiggestParsableMax = - ::std::numeric_limits::max(); -const BiggestSignedParsable kBiggestSignedParsableMax = - ::std::numeric_limits::max(); -#endif // GTEST_OS_WINDOWS - -TEST(ParseNaturalNumberTest, RejectsInvalidFormat) { - BiggestParsable result = 0; - - // Rejects non-numbers. - EXPECT_FALSE(ParseNaturalNumber(String("non-number string"), &result)); - - // Rejects numbers with whitespace prefix. - EXPECT_FALSE(ParseNaturalNumber(String(" 123"), &result)); - - // Rejects negative numbers. - EXPECT_FALSE(ParseNaturalNumber(String("-123"), &result)); - - // Rejects numbers starting with a plus sign. - EXPECT_FALSE(ParseNaturalNumber(String("+123"), &result)); - errno = 0; -} - -TEST(ParseNaturalNumberTest, RejectsOverflownNumbers) { - BiggestParsable result = 0; - - EXPECT_FALSE(ParseNaturalNumber(String("99999999999999999999999"), &result)); - - signed char char_result = 0; - EXPECT_FALSE(ParseNaturalNumber(String("200"), &char_result)); - errno = 0; -} - -TEST(ParseNaturalNumberTest, AcceptsValidNumbers) { - BiggestParsable result = 0; - - result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &result)); - EXPECT_EQ(123U, result); - - // Check 0 as an edge case. - result = 1; - ASSERT_TRUE(ParseNaturalNumber(String("0"), &result)); - EXPECT_EQ(0U, result); - - result = 1; - ASSERT_TRUE(ParseNaturalNumber(String("00000"), &result)); - EXPECT_EQ(0U, result); -} - -TEST(ParseNaturalNumberTest, AcceptsTypeLimits) { - Message msg; - msg << kBiggestParsableMax; - - BiggestParsable result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg.GetString(), &result)); - EXPECT_EQ(kBiggestParsableMax, result); - - Message msg2; - msg2 << kBiggestSignedParsableMax; - - BiggestSignedParsable signed_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg2.GetString(), &signed_result)); - EXPECT_EQ(kBiggestSignedParsableMax, signed_result); - - Message msg3; - msg3 << INT_MAX; - - int int_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg3.GetString(), &int_result)); - EXPECT_EQ(INT_MAX, int_result); - - Message msg4; - msg4 << UINT_MAX; - - unsigned int uint_result = 0; - EXPECT_TRUE(ParseNaturalNumber(msg4.GetString(), &uint_result)); - EXPECT_EQ(UINT_MAX, uint_result); -} - -TEST(ParseNaturalNumberTest, WorksForShorterIntegers) { - short short_result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &short_result)); - EXPECT_EQ(123, short_result); - - signed char char_result = 0; - ASSERT_TRUE(ParseNaturalNumber(String("123"), &char_result)); - EXPECT_EQ(123, char_result); -} - -#if GTEST_OS_WINDOWS -TEST(EnvironmentTest, HandleFitsIntoSizeT) { - // TODO(vladl@google.com): Remove this test after this condition is verified - // in a static assertion in gtest-death-test.cc in the function - // GetStatusFileDescriptor. - ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t)); -} -#endif // GTEST_OS_WINDOWS - -// Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED trigger -// failures when death tests are available on the system. -TEST(ConditionalDeathMacrosDeathTest, ExpectsDeathWhenDeathTestsAvailable) { - EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(false) << "failure", "false.*failure"); - ASSERT_DEATH_IF_SUPPORTED(GTEST_CHECK_(false) << "failure", "false.*failure"); - - // Empty statement will not crash, which must trigger a failure. - EXPECT_NONFATAL_FAILURE(EXPECT_DEATH_IF_SUPPORTED(;, ""), ""); - EXPECT_FATAL_FAILURE(ASSERT_DEATH_IF_SUPPORTED(;, ""), ""); -} - -#else - -using testing::internal::CaptureStderr; -using testing::internal::GetCapturedStderr; -using testing::internal::String; - -// Tests that EXPECT_DEATH_IF_SUPPORTED/ASSERT_DEATH_IF_SUPPORTED are still -// defined but do not trigger failures when death tests are not available on -// the system. -TEST(ConditionalDeathMacrosTest, WarnsWhenDeathTestsNotAvailable) { - // Empty statement will not crash, but that should not trigger a failure - // when death tests are not supported. - CaptureStderr(); - EXPECT_DEATH_IF_SUPPORTED(;, ""); - String output = GetCapturedStderr(); - ASSERT_TRUE(NULL != strstr(output.c_str(), - "Death tests are not supported on this platform")); - ASSERT_TRUE(NULL != strstr(output.c_str(), ";")); - - // The streamed message should not be printed as there is no test failure. - CaptureStderr(); - EXPECT_DEATH_IF_SUPPORTED(;, "") << "streamed message"; - output = GetCapturedStderr(); - ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message")); - - CaptureStderr(); - ASSERT_DEATH_IF_SUPPORTED(;, ""); // NOLINT - output = GetCapturedStderr(); - ASSERT_TRUE(NULL != strstr(output.c_str(), - "Death tests are not supported on this platform")); - ASSERT_TRUE(NULL != strstr(output.c_str(), ";")); - - CaptureStderr(); - ASSERT_DEATH_IF_SUPPORTED(;, "") << "streamed message"; // NOLINT - output = GetCapturedStderr(); - ASSERT_TRUE(NULL == strstr(output.c_str(), "streamed message")); -} - -void FuncWithAssert(int* n) { - ASSERT_DEATH_IF_SUPPORTED(return;, ""); - (*n)++; -} - -// Tests that ASSERT_DEATH_IF_SUPPORTED does not return from the current -// function (as ASSERT_DEATH does) if death tests are not supported. -TEST(ConditionalDeathMacrosTest, AssertDeatDoesNotReturnhIfUnsupported) { - int n = 0; - FuncWithAssert(&n); - EXPECT_EQ(1, n); -} -#endif // GTEST_HAS_DEATH_TEST - -// Tests that the death test macros expand to code which may or may not -// be followed by operator<<, and that in either case the complete text -// comprises only a single C++ statement. -// -// The syntax should work whether death tests are available or not. -TEST(ConditionalDeathMacrosSyntaxDeathTest, SingleStatement) { - if (AlwaysFalse()) - // This would fail if executed; this is a compilation test only - ASSERT_DEATH_IF_SUPPORTED(return, ""); - - if (AlwaysTrue()) - EXPECT_DEATH_IF_SUPPORTED(_exit(1), ""); - else - // This empty "else" branch is meant to ensure that EXPECT_DEATH - // doesn't expand into an "if" statement without an "else" - ; // NOLINT - - if (AlwaysFalse()) - ASSERT_DEATH_IF_SUPPORTED(return, "") << "did not die"; - - if (AlwaysFalse()) - ; // NOLINT - else - EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << 1 << 2 << 3; -} - -// Tests that conditional death test macros expand to code which interacts -// well with switch statements. -TEST(ConditionalDeathMacrosSyntaxDeathTest, SwitchStatement) { -// Microsoft compiler usually complains about switch statements without -// case labels. We suppress that warning for this test. -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4065) -#endif // _MSC_VER - - switch (0) - default: - ASSERT_DEATH_IF_SUPPORTED(_exit(1), "") - << "exit in default switch handler"; - - switch (0) - case 0: - EXPECT_DEATH_IF_SUPPORTED(_exit(1), "") << "exit in switch case"; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER -} - -// Tests that a test case whose name ends with "DeathTest" works fine -// on Windows. -TEST(NotADeathTest, Test) { - SUCCEED(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-filepath_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-filepath_test.cc deleted file mode 100644 index 5bc4daf2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-filepath_test.cc +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) -// -// Google Test filepath utilities -// -// This file tests classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included from gtest_unittest.cc, to avoid changing -// build or make-files for some existing Google Test clients. Do not -// #include this file anywhere else! - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#if GTEST_OS_WINDOWS_MOBILE -#include // NOLINT -#elif GTEST_OS_WINDOWS -#include // NOLINT -#endif // GTEST_OS_WINDOWS_MOBILE - -namespace testing { -namespace internal { -namespace { - -#if GTEST_OS_WINDOWS_MOBILE -// TODO(wan@google.com): Move these to the POSIX adapter section in -// gtest-port.h. - -// Windows CE doesn't have the remove C function. -int remove(const char* path) { - LPCWSTR wpath = String::AnsiToUtf16(path); - int ret = DeleteFile(wpath) ? 0 : -1; - delete [] wpath; - return ret; -} -// Windows CE doesn't have the _rmdir C function. -int _rmdir(const char* path) { - FilePath filepath(path); - LPCWSTR wpath = String::AnsiToUtf16( - filepath.RemoveTrailingPathSeparator().c_str()); - int ret = RemoveDirectory(wpath) ? 0 : -1; - delete [] wpath; - return ret; -} - -#else - -TEST(GetCurrentDirTest, ReturnsCurrentDir) { - const FilePath original_dir = FilePath::GetCurrentDir(); - EXPECT_FALSE(original_dir.IsEmpty()); - - posix::ChDir(GTEST_PATH_SEP_); - const FilePath cwd = FilePath::GetCurrentDir(); - posix::ChDir(original_dir.c_str()); - -#if GTEST_OS_WINDOWS - // Skips the ":". - const char* const cwd_without_drive = strchr(cwd.c_str(), ':'); - ASSERT_TRUE(cwd_without_drive != NULL); - EXPECT_STREQ(GTEST_PATH_SEP_, cwd_without_drive + 1); -#else - EXPECT_STREQ(GTEST_PATH_SEP_, cwd.c_str()); -#endif -} - -#endif // GTEST_OS_WINDOWS_MOBILE - -TEST(IsEmptyTest, ReturnsTrueForEmptyPath) { - EXPECT_TRUE(FilePath("").IsEmpty()); - EXPECT_TRUE(FilePath(NULL).IsEmpty()); -} - -TEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) { - EXPECT_FALSE(FilePath("a").IsEmpty()); - EXPECT_FALSE(FilePath(".").IsEmpty()); - EXPECT_FALSE(FilePath("a/b").IsEmpty()); - EXPECT_FALSE(FilePath("a\\b\\").IsEmpty()); -} - -// RemoveDirectoryName "" -> "" -TEST(RemoveDirectoryNameTest, WhenEmptyName) { - EXPECT_STREQ("", FilePath("").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "afile" -> "afile" -TEST(RemoveDirectoryNameTest, ButNoDirectory) { - EXPECT_STREQ("afile", - FilePath("afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "/afile" -> "afile" -TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) { - EXPECT_STREQ("afile", - FilePath(GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/" -> "" -TEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) { - EXPECT_STREQ("", - FilePath("adir" GTEST_PATH_SEP_).RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/afile" -> "afile" -TEST(RemoveDirectoryNameTest, ShouldGiveFileName) { - EXPECT_STREQ("afile", - FilePath("adir" GTEST_PATH_SEP_ "afile").RemoveDirectoryName().c_str()); -} - -// RemoveDirectoryName "adir/subdir/afile" -> "afile" -TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) { - EXPECT_STREQ("afile", - FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") - .RemoveDirectoryName().c_str()); -} - - -// RemoveFileName "" -> "./" -TEST(RemoveFileNameTest, EmptyName) { -#if GTEST_OS_WINDOWS_MOBILE - // On Windows CE, we use the root as the current directory. - EXPECT_STREQ(GTEST_PATH_SEP_, - FilePath("").RemoveFileName().c_str()); -#else - EXPECT_STREQ("." GTEST_PATH_SEP_, - FilePath("").RemoveFileName().c_str()); -#endif -} - -// RemoveFileName "adir/" -> "adir/" -TEST(RemoveFileNameTest, ButNoFile) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_).RemoveFileName().c_str()); -} - -// RemoveFileName "adir/afile" -> "adir/" -TEST(RemoveFileNameTest, GivesDirName) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_ "afile") - .RemoveFileName().c_str()); -} - -// RemoveFileName "adir/subdir/afile" -> "adir/subdir/" -TEST(RemoveFileNameTest, GivesDirAndSubDirName) { - EXPECT_STREQ("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_, - FilePath("adir" GTEST_PATH_SEP_ "subdir" GTEST_PATH_SEP_ "afile") - .RemoveFileName().c_str()); -} - -// RemoveFileName "/afile" -> "/" -TEST(RemoveFileNameTest, GivesRootDir) { - EXPECT_STREQ(GTEST_PATH_SEP_, - FilePath(GTEST_PATH_SEP_ "afile").RemoveFileName().c_str()); -} - - -TEST(MakeFileNameTest, GenerateWhenNumberIsZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), - 0, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameNumberGtZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo"), FilePath("bar"), - 12, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberIsZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar"), 0, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateFileNameWithSlashNumberGtZero) { - FilePath actual = FilePath::MakeFileName(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar"), 12, "xml"); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar_12.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateWhenNumberIsZeroAndDirIsEmpty) { - FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), - 0, "xml"); - EXPECT_STREQ("bar.xml", actual.c_str()); -} - -TEST(MakeFileNameTest, GenerateWhenNumberIsNotZeroAndDirIsEmpty) { - FilePath actual = FilePath::MakeFileName(FilePath(""), FilePath("bar"), - 14, "xml"); - EXPECT_STREQ("bar_14.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, WorksWhenDirDoesNotEndWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, WorksWhenPath1EndsWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, Path1BeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath(""), - FilePath("bar.xml")); - EXPECT_STREQ("bar.xml", actual.c_str()); -} - -TEST(ConcatPathsTest, Path2BeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, actual.c_str()); -} - -TEST(ConcatPathsTest, BothPathBeingEmpty) { - FilePath actual = FilePath::ConcatPaths(FilePath(""), - FilePath("")); - EXPECT_STREQ("", actual.c_str()); -} - -TEST(ConcatPathsTest, Path1ContainsPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo" GTEST_PATH_SEP_ "bar"), - FilePath("foobar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "foobar.xml", - actual.c_str()); -} - -TEST(ConcatPathsTest, Path2ContainsPathSep) { - FilePath actual = FilePath::ConcatPaths( - FilePath("foo" GTEST_PATH_SEP_), - FilePath("bar" GTEST_PATH_SEP_ "bar.xml")); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_ "bar.xml", - actual.c_str()); -} - -TEST(ConcatPathsTest, Path2EndsWithPathSep) { - FilePath actual = FilePath::ConcatPaths(FilePath("foo"), - FilePath("bar" GTEST_PATH_SEP_)); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_, actual.c_str()); -} - -// RemoveTrailingPathSeparator "" -> "" -TEST(RemoveTrailingPathSeparatorTest, EmptyString) { - EXPECT_STREQ("", - FilePath("").RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo" -> "foo" -TEST(RemoveTrailingPathSeparatorTest, FileNoSlashString) { - EXPECT_STREQ("foo", - FilePath("foo").RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/" -> "foo" -TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveTrailingSeparator) { - EXPECT_STREQ( - "foo", - FilePath("foo" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/bar/" -> "foo/bar/" -TEST(RemoveTrailingPathSeparatorTest, ShouldRemoveLastSeparator) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar" GTEST_PATH_SEP_) - .RemoveTrailingPathSeparator().c_str()); -} - -// RemoveTrailingPathSeparator "foo/bar" -> "foo/bar" -TEST(RemoveTrailingPathSeparatorTest, ShouldReturnUnmodified) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar") - .RemoveTrailingPathSeparator().c_str()); -} - -TEST(DirectoryTest, RootDirectoryExists) { -#if GTEST_OS_WINDOWS // We are on Windows. - char current_drive[_MAX_PATH]; // NOLINT - current_drive[0] = static_cast(_getdrive() + 'A' - 1); - current_drive[1] = ':'; - current_drive[2] = '\\'; - current_drive[3] = '\0'; - EXPECT_TRUE(FilePath(current_drive).DirectoryExists()); -#else - EXPECT_TRUE(FilePath("/").DirectoryExists()); -#endif // GTEST_OS_WINDOWS -} - -#if GTEST_OS_WINDOWS -TEST(DirectoryTest, RootOfWrongDriveDoesNotExists) { - const int saved_drive_ = _getdrive(); - // Find a drive that doesn't exist. Start with 'Z' to avoid common ones. - for (char drive = 'Z'; drive >= 'A'; drive--) - if (_chdrive(drive - 'A' + 1) == -1) { - char non_drive[_MAX_PATH]; // NOLINT - non_drive[0] = drive; - non_drive[1] = ':'; - non_drive[2] = '\\'; - non_drive[3] = '\0'; - EXPECT_FALSE(FilePath(non_drive).DirectoryExists()); - break; - } - _chdrive(saved_drive_); -} -#endif // GTEST_OS_WINDOWS - -#if !GTEST_OS_WINDOWS_MOBILE -// Windows CE _does_ consider an empty directory to exist. -TEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) { - EXPECT_FALSE(FilePath("").DirectoryExists()); -} -#endif // !GTEST_OS_WINDOWS_MOBILE - -TEST(DirectoryTest, CurrentDirectoryExists) { -#if GTEST_OS_WINDOWS // We are on Windows. -#ifndef _WIN32_CE // Windows CE doesn't have a current directory. - EXPECT_TRUE(FilePath(".").DirectoryExists()); - EXPECT_TRUE(FilePath(".\\").DirectoryExists()); -#endif // _WIN32_CE -#else - EXPECT_TRUE(FilePath(".").DirectoryExists()); - EXPECT_TRUE(FilePath("./").DirectoryExists()); -#endif // GTEST_OS_WINDOWS -} - -TEST(NormalizeTest, NullStringsEqualEmptyDirectory) { - EXPECT_STREQ("", FilePath(NULL).c_str()); - EXPECT_STREQ("", FilePath(String(NULL)).c_str()); -} - -// "foo/bar" == foo//bar" == "foo///bar" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsInMidstring) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_ "bar", - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ - GTEST_PATH_SEP_ "bar").c_str()); -} - -// "/bar" == //bar" == "///bar" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringStart) { - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); - EXPECT_STREQ(GTEST_PATH_SEP_ "bar", - FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ "bar").c_str()); -} - -// "foo/" == foo//" == "foo///" -TEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringEnd) { - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_).c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str()); - EXPECT_STREQ("foo" GTEST_PATH_SEP_, - FilePath("foo" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).c_str()); -} - -TEST(AssignmentOperatorTest, DefaultAssignedToNonDefault) { - FilePath default_path; - FilePath non_default_path("path"); - non_default_path = default_path; - EXPECT_STREQ("", non_default_path.c_str()); - EXPECT_STREQ("", default_path.c_str()); // RHS var is unchanged. -} - -TEST(AssignmentOperatorTest, NonDefaultAssignedToDefault) { - FilePath non_default_path("path"); - FilePath default_path; - default_path = non_default_path; - EXPECT_STREQ("path", default_path.c_str()); - EXPECT_STREQ("path", non_default_path.c_str()); // RHS var is unchanged. -} - -TEST(AssignmentOperatorTest, ConstAssignedToNonConst) { - const FilePath const_default_path("const_path"); - FilePath non_default_path("path"); - non_default_path = const_default_path; - EXPECT_STREQ("const_path", non_default_path.c_str()); -} - -class DirectoryCreationTest : public Test { - protected: - virtual void SetUp() { - testdata_path_.Set(FilePath(String::Format("%s%s%s", - TempDir().c_str(), GetCurrentExecutableName().c_str(), - "_directory_creation" GTEST_PATH_SEP_ "test" GTEST_PATH_SEP_))); - testdata_file_.Set(testdata_path_.RemoveTrailingPathSeparator()); - - unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), - 0, "txt")); - unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath("unique"), - 1, "txt")); - - remove(testdata_file_.c_str()); - remove(unique_file0_.c_str()); - remove(unique_file1_.c_str()); - posix::RmDir(testdata_path_.c_str()); - } - - virtual void TearDown() { - remove(testdata_file_.c_str()); - remove(unique_file0_.c_str()); - remove(unique_file1_.c_str()); - posix::RmDir(testdata_path_.c_str()); - } - - String TempDir() const { -#if GTEST_OS_WINDOWS_MOBILE - return String("\\temp\\"); -#elif GTEST_OS_WINDOWS - const char* temp_dir = posix::GetEnv("TEMP"); - if (temp_dir == NULL || temp_dir[0] == '\0') - return String("\\temp\\"); - else if (String(temp_dir).EndsWith("\\")) - return String(temp_dir); - else - return String::Format("%s\\", temp_dir); -#else - return String("/tmp/"); -#endif // GTEST_OS_WINDOWS_MOBILE - } - - void CreateTextFile(const char* filename) { - FILE* f = posix::FOpen(filename, "w"); - fprintf(f, "text\n"); - fclose(f); - } - - // Strings representing a directory and a file, with identical paths - // except for the trailing separator character that distinquishes - // a directory named 'test' from a file named 'test'. Example names: - FilePath testdata_path_; // "/tmp/directory_creation/test/" - FilePath testdata_file_; // "/tmp/directory_creation/test" - FilePath unique_file0_; // "/tmp/directory_creation/test/unique.txt" - FilePath unique_file1_; // "/tmp/directory_creation/test/unique_1.txt" -}; - -TEST_F(DirectoryCreationTest, CreateDirectoriesRecursively) { - EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str(); - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); - EXPECT_TRUE(testdata_path_.DirectoryExists()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesForAlreadyExistingPath) { - EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.c_str(); - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); - // Call 'create' again... should still succeed. - EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesAndUniqueFilename) { - FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_, - FilePath("unique"), "txt")); - EXPECT_STREQ(unique_file0_.c_str(), file_path.c_str()); - EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file not there - - testdata_path_.CreateDirectoriesRecursively(); - EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file still not there - CreateTextFile(file_path.c_str()); - EXPECT_TRUE(file_path.FileOrDirectoryExists()); - - FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_, - FilePath("unique"), "txt")); - EXPECT_STREQ(unique_file1_.c_str(), file_path2.c_str()); - EXPECT_FALSE(file_path2.FileOrDirectoryExists()); // file not there - CreateTextFile(file_path2.c_str()); - EXPECT_TRUE(file_path2.FileOrDirectoryExists()); -} - -TEST_F(DirectoryCreationTest, CreateDirectoriesFail) { - // force a failure by putting a file where we will try to create a directory. - CreateTextFile(testdata_file_.c_str()); - EXPECT_TRUE(testdata_file_.FileOrDirectoryExists()); - EXPECT_FALSE(testdata_file_.DirectoryExists()); - EXPECT_FALSE(testdata_file_.CreateDirectoriesRecursively()); -} - -TEST(NoDirectoryCreationTest, CreateNoDirectoriesForDefaultXmlFile) { - const FilePath test_detail_xml("test_detail.xml"); - EXPECT_FALSE(test_detail_xml.CreateDirectoriesRecursively()); -} - -TEST(FilePathTest, DefaultConstructor) { - FilePath fp; - EXPECT_STREQ("", fp.c_str()); -} - -TEST(FilePathTest, CharAndCopyConstructors) { - const FilePath fp("spicy"); - EXPECT_STREQ("spicy", fp.c_str()); - - const FilePath fp_copy(fp); - EXPECT_STREQ("spicy", fp_copy.c_str()); -} - -TEST(FilePathTest, StringConstructor) { - const FilePath fp(String("cider")); - EXPECT_STREQ("cider", fp.c_str()); -} - -TEST(FilePathTest, Set) { - const FilePath apple("apple"); - FilePath mac("mac"); - mac.Set(apple); // Implement Set() since overloading operator= is forbidden. - EXPECT_STREQ("apple", mac.c_str()); - EXPECT_STREQ("apple", apple.c_str()); -} - -TEST(FilePathTest, ToString) { - const FilePath file("drink"); - String str(file.ToString()); - EXPECT_STREQ("drink", str.c_str()); -} - -TEST(FilePathTest, RemoveExtension) { - EXPECT_STREQ("app", FilePath("app.exe").RemoveExtension("exe").c_str()); - EXPECT_STREQ("APP", FilePath("APP.EXE").RemoveExtension("exe").c_str()); -} - -TEST(FilePathTest, RemoveExtensionWhenThereIsNoExtension) { - EXPECT_STREQ("app", FilePath("app").RemoveExtension("exe").c_str()); -} - -TEST(FilePathTest, IsDirectory) { - EXPECT_FALSE(FilePath("cola").IsDirectory()); - EXPECT_TRUE(FilePath("koala" GTEST_PATH_SEP_).IsDirectory()); -} - -TEST(FilePathTest, IsAbsolutePath) { - EXPECT_FALSE(FilePath("is" GTEST_PATH_SEP_ "relative").IsAbsolutePath()); - EXPECT_FALSE(FilePath("").IsAbsolutePath()); -#if GTEST_OS_WINDOWS - EXPECT_TRUE(FilePath("c:\\" GTEST_PATH_SEP_ "is_not" - GTEST_PATH_SEP_ "relative").IsAbsolutePath()); - EXPECT_FALSE(FilePath("c:foo" GTEST_PATH_SEP_ "bar").IsAbsolutePath()); -#else - EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ "is_not" GTEST_PATH_SEP_ "relative") - .IsAbsolutePath()); -#endif // GTEST_OS_WINDOWS -} - -} // namespace -} // namespace internal -} // namespace testing - -#undef GTEST_PATH_SEP_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-linked_ptr_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-linked_ptr_test.cc deleted file mode 100644 index eae82296..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-linked_ptr_test.cc +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2003, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// Ported to Windows: Vadim Berman (vadimb@google.com) - -#include - -#include -#include - -namespace { - -using testing::Message; -using testing::internal::linked_ptr; - -int num; -Message* history = NULL; - -// Class which tracks allocation/deallocation -class A { - public: - A(): mynum(num++) { *history << "A" << mynum << " ctor\n"; } - virtual ~A() { *history << "A" << mynum << " dtor\n"; } - virtual void Use() { *history << "A" << mynum << " use\n"; } - protected: - int mynum; -}; - -// Subclass -class B : public A { - public: - B() { *history << "B" << mynum << " ctor\n"; } - ~B() { *history << "B" << mynum << " dtor\n"; } - virtual void Use() { *history << "B" << mynum << " use\n"; } -}; - -class LinkedPtrTest : public testing::Test { - public: - LinkedPtrTest() { - num = 0; - history = new Message; - } - - virtual ~LinkedPtrTest() { - delete history; - history = NULL; - } -}; - -TEST_F(LinkedPtrTest, GeneralTest) { - { - linked_ptr a0, a1, a2; - a0 = a0; - a1 = a2; - ASSERT_EQ(a0.get(), static_cast(NULL)); - ASSERT_EQ(a1.get(), static_cast(NULL)); - ASSERT_EQ(a2.get(), static_cast(NULL)); - ASSERT_TRUE(a0 == NULL); - ASSERT_TRUE(a1 == NULL); - ASSERT_TRUE(a2 == NULL); - - { - linked_ptr a3(new A); - a0 = a3; - ASSERT_TRUE(a0 == a3); - ASSERT_TRUE(a0 != NULL); - ASSERT_TRUE(a0.get() == a3); - ASSERT_TRUE(a0 == a3.get()); - linked_ptr a4(a0); - a1 = a4; - linked_ptr a5(new A); - ASSERT_TRUE(a5.get() != a3); - ASSERT_TRUE(a5 != a3.get()); - a2 = a5; - linked_ptr b0(new B); - linked_ptr a6(b0); - ASSERT_TRUE(b0 == a6); - ASSERT_TRUE(a6 == b0); - ASSERT_TRUE(b0 != NULL); - a5 = b0; - a5 = b0; - a3->Use(); - a4->Use(); - a5->Use(); - a6->Use(); - b0->Use(); - (*b0).Use(); - b0.get()->Use(); - } - - a0->Use(); - a1->Use(); - a2->Use(); - - a1 = a2; - a2.reset(new A); - a0.reset(); - - linked_ptr a7; - } - - ASSERT_STREQ( - "A0 ctor\n" - "A1 ctor\n" - "A2 ctor\n" - "B2 ctor\n" - "A0 use\n" - "A0 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 use\n" - "B2 dtor\n" - "A2 dtor\n" - "A0 use\n" - "A0 use\n" - "A1 use\n" - "A3 ctor\n" - "A0 dtor\n" - "A3 dtor\n" - "A1 dtor\n", - history->GetString().c_str() - ); -} - -} // Unnamed namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-listener_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-listener_test.cc deleted file mode 100644 index f12f5188..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-listener_test.cc +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2009 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// The Google C++ Testing Framework (Google Test) -// -// This file verifies Google Test event listeners receive events at the -// right times. - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" // For Vector. -#undef GTEST_IMPLEMENTATION_ - -using ::testing::AddGlobalTestEnvironment; -using ::testing::Environment; -using ::testing::InitGoogleTest; -using ::testing::Test; -using ::testing::TestCase; -using ::testing::TestEventListener; -using ::testing::TestInfo; -using ::testing::TestPartResult; -using ::testing::UnitTest; -using ::testing::internal::String; -using ::testing::internal::Vector; - -// Used by tests to register their events. -Vector* g_events = NULL; - -namespace testing { -namespace internal { - -class EventRecordingListener : public TestEventListener { - public: - EventRecordingListener(const char* name) : name_(name) {} - - protected: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnTestProgramStart")); - } - - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, - int iteration) { - Message message; - message << GetFullMethodName("OnTestIterationStart") - << "(" << iteration << ")"; - g_events->PushBack(message.GetString()); - } - - virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnEnvironmentsSetUpStart")); - } - - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnEnvironmentsSetUpEnd")); - } - - virtual void OnTestCaseStart(const TestCase& /*test_case*/) { - g_events->PushBack(GetFullMethodName("OnTestCaseStart")); - } - - virtual void OnTestStart(const TestInfo& /*test_info*/) { - g_events->PushBack(GetFullMethodName("OnTestStart")); - } - - virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) { - g_events->PushBack(GetFullMethodName("OnTestPartResult")); - } - - virtual void OnTestEnd(const TestInfo& /*test_info*/) { - g_events->PushBack(GetFullMethodName("OnTestEnd")); - } - - virtual void OnTestCaseEnd(const TestCase& /*test_case*/) { - g_events->PushBack(GetFullMethodName("OnTestCaseEnd")); - } - - virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnEnvironmentsTearDownStart")); - } - - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnEnvironmentsTearDownEnd")); - } - - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, - int iteration) { - Message message; - message << GetFullMethodName("OnTestIterationEnd") - << "(" << iteration << ")"; - g_events->PushBack(message.GetString()); - } - - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) { - g_events->PushBack(GetFullMethodName("OnTestProgramEnd")); - } - - private: - String GetFullMethodName(const char* name) { - Message message; - message << name_ << "." << name; - return message.GetString(); - } - - String name_; -}; - -class EnvironmentInvocationCatcher : public Environment { - protected: - virtual void SetUp() { - g_events->PushBack(String("Environment::SetUp")); - } - - virtual void TearDown() { - g_events->PushBack(String("Environment::TearDown")); - } -}; - -class ListenerTest : public Test { - protected: - static void SetUpTestCase() { - g_events->PushBack(String("ListenerTest::SetUpTestCase")); - } - - static void TearDownTestCase() { - g_events->PushBack(String("ListenerTest::TearDownTestCase")); - } - - virtual void SetUp() { - g_events->PushBack(String("ListenerTest::SetUp")); - } - - virtual void TearDown() { - g_events->PushBack(String("ListenerTest::TearDown")); - } -}; - -TEST_F(ListenerTest, DoesFoo) { - // Test execution order within a test case is not guaranteed so we are not - // recording the test name. - g_events->PushBack(String("ListenerTest::* Test Body")); - SUCCEED(); // Triggers OnTestPartResult. -} - -TEST_F(ListenerTest, DoesBar) { - g_events->PushBack(String("ListenerTest::* Test Body")); - SUCCEED(); // Triggers OnTestPartResult. -} - -} // namespace internal - -} // namespace testing - -using ::testing::internal::EnvironmentInvocationCatcher; -using ::testing::internal::EventRecordingListener; - -void VerifyResults(const Vector& data, - const char* const* expected_data, - int expected_data_size) { - const int actual_size = data.size(); - // If the following assertion fails, a new entry will be appended to - // data. Hence we save data.size() first. - EXPECT_EQ(expected_data_size, actual_size); - - // Compares the common prefix. - const int shorter_size = expected_data_size <= actual_size ? - expected_data_size : actual_size; - int i = 0; - for (; i < shorter_size; ++i) { - ASSERT_STREQ(expected_data[i], data.GetElement(i).c_str()) - << "at position " << i; - } - - // Prints extra elements in the actual data. - for (; i < actual_size; ++i) { - printf(" Actual event #%d: %s\n", i, data.GetElement(i).c_str()); - } -} - -int main(int argc, char **argv) { - Vector events; - g_events = &events; - InitGoogleTest(&argc, argv); - - UnitTest::GetInstance()->listeners().Append( - new EventRecordingListener("1st")); - UnitTest::GetInstance()->listeners().Append( - new EventRecordingListener("2nd")); - - AddGlobalTestEnvironment(new EnvironmentInvocationCatcher); - - GTEST_CHECK_(events.size() == 0) - << "AddGlobalTestEnvironment should not generate any events itself."; - - ::testing::GTEST_FLAG(repeat) = 2; - int ret_val = RUN_ALL_TESTS(); - - const char* const expected_events[] = { - "1st.OnTestProgramStart", - "2nd.OnTestProgramStart", - "1st.OnTestIterationStart(0)", - "2nd.OnTestIterationStart(0)", - "1st.OnEnvironmentsSetUpStart", - "2nd.OnEnvironmentsSetUpStart", - "Environment::SetUp", - "2nd.OnEnvironmentsSetUpEnd", - "1st.OnEnvironmentsSetUpEnd", - "1st.OnTestCaseStart", - "2nd.OnTestCaseStart", - "ListenerTest::SetUpTestCase", - "1st.OnTestStart", - "2nd.OnTestStart", - "ListenerTest::SetUp", - "ListenerTest::* Test Body", - "1st.OnTestPartResult", - "2nd.OnTestPartResult", - "ListenerTest::TearDown", - "2nd.OnTestEnd", - "1st.OnTestEnd", - "1st.OnTestStart", - "2nd.OnTestStart", - "ListenerTest::SetUp", - "ListenerTest::* Test Body", - "1st.OnTestPartResult", - "2nd.OnTestPartResult", - "ListenerTest::TearDown", - "2nd.OnTestEnd", - "1st.OnTestEnd", - "ListenerTest::TearDownTestCase", - "2nd.OnTestCaseEnd", - "1st.OnTestCaseEnd", - "1st.OnEnvironmentsTearDownStart", - "2nd.OnEnvironmentsTearDownStart", - "Environment::TearDown", - "2nd.OnEnvironmentsTearDownEnd", - "1st.OnEnvironmentsTearDownEnd", - "2nd.OnTestIterationEnd(0)", - "1st.OnTestIterationEnd(0)", - "1st.OnTestIterationStart(1)", - "2nd.OnTestIterationStart(1)", - "1st.OnEnvironmentsSetUpStart", - "2nd.OnEnvironmentsSetUpStart", - "Environment::SetUp", - "2nd.OnEnvironmentsSetUpEnd", - "1st.OnEnvironmentsSetUpEnd", - "1st.OnTestCaseStart", - "2nd.OnTestCaseStart", - "ListenerTest::SetUpTestCase", - "1st.OnTestStart", - "2nd.OnTestStart", - "ListenerTest::SetUp", - "ListenerTest::* Test Body", - "1st.OnTestPartResult", - "2nd.OnTestPartResult", - "ListenerTest::TearDown", - "2nd.OnTestEnd", - "1st.OnTestEnd", - "1st.OnTestStart", - "2nd.OnTestStart", - "ListenerTest::SetUp", - "ListenerTest::* Test Body", - "1st.OnTestPartResult", - "2nd.OnTestPartResult", - "ListenerTest::TearDown", - "2nd.OnTestEnd", - "1st.OnTestEnd", - "ListenerTest::TearDownTestCase", - "2nd.OnTestCaseEnd", - "1st.OnTestCaseEnd", - "1st.OnEnvironmentsTearDownStart", - "2nd.OnEnvironmentsTearDownStart", - "Environment::TearDown", - "2nd.OnEnvironmentsTearDownEnd", - "1st.OnEnvironmentsTearDownEnd", - "2nd.OnTestIterationEnd(1)", - "1st.OnTestIterationEnd(1)", - "2nd.OnTestProgramEnd", - "1st.OnTestProgramEnd" - }; - VerifyResults(events, - expected_events, - sizeof(expected_events)/sizeof(expected_events[0])); - - // We need to check manually for ad hoc test failures that happen after - // RUN_ALL_TESTS finishes. - if (UnitTest::GetInstance()->Failed()) - ret_val = 1; - - return ret_val; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-message_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-message_test.cc deleted file mode 100644 index 6c43c33d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-message_test.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for the Message class. - -#include - -#include - -namespace { - -using ::testing::Message; -using ::testing::internal::StrStream; - -// A helper function that turns a Message into a C string. -const char* ToCString(const Message& msg) { - static testing::internal::String result; - result = msg.GetString(); - return result.c_str(); -} - -// Tests the testing::Message class - -// Tests the default constructor. -TEST(MessageTest, DefaultConstructor) { - const Message msg; - EXPECT_STREQ("", ToCString(msg)); -} - -// Tests the copy constructor. -TEST(MessageTest, CopyConstructor) { - const Message msg1("Hello"); - const Message msg2(msg1); - EXPECT_STREQ("Hello", ToCString(msg2)); -} - -// Tests constructing a Message from a C-string. -TEST(MessageTest, ConstructsFromCString) { - Message msg("Hello"); - EXPECT_STREQ("Hello", ToCString(msg)); -} - -// Tests streaming a non-char pointer. -TEST(MessageTest, StreamsPointer) { - int n = 0; - int* p = &n; - EXPECT_STRNE("(null)", ToCString(Message() << p)); -} - -// Tests streaming a NULL non-char pointer. -TEST(MessageTest, StreamsNullPointer) { - int* p = NULL; - EXPECT_STREQ("(null)", ToCString(Message() << p)); -} - -// Tests streaming a C string. -TEST(MessageTest, StreamsCString) { - EXPECT_STREQ("Foo", ToCString(Message() << "Foo")); -} - -// Tests streaming a NULL C string. -TEST(MessageTest, StreamsNullCString) { - char* p = NULL; - EXPECT_STREQ("(null)", ToCString(Message() << p)); -} - -#if GTEST_HAS_STD_STRING - -// Tests streaming std::string. -// -// As std::string has problem in MSVC when exception is disabled, we only -// test this where std::string can be used. -TEST(MessageTest, StreamsString) { - const ::std::string str("Hello"); - EXPECT_STREQ("Hello", ToCString(Message() << str)); -} - -// Tests that we can output strings containing embedded NULs. -TEST(MessageTest, StreamsStringWithEmbeddedNUL) { - const char char_array_with_nul[] = - "Here's a NUL\0 and some more string"; - const ::std::string string_with_nul(char_array_with_nul, - sizeof(char_array_with_nul) - 1); - EXPECT_STREQ("Here's a NUL\\0 and some more string", - ToCString(Message() << string_with_nul)); -} - -#endif // GTEST_HAS_STD_STRING - -// Tests streaming a NUL char. -TEST(MessageTest, StreamsNULChar) { - EXPECT_STREQ("\\0", ToCString(Message() << '\0')); -} - -// Tests streaming int. -TEST(MessageTest, StreamsInt) { - EXPECT_STREQ("123", ToCString(Message() << 123)); -} - -// Tests that basic IO manipulators (endl, ends, and flush) can be -// streamed to Message. -TEST(MessageTest, StreamsBasicIoManip) { - EXPECT_STREQ("Line 1.\nA NUL char \\0 in line 2.", - ToCString(Message() << "Line 1." << std::endl - << "A NUL char " << std::ends << std::flush - << " in line 2.")); -} - -// Tests Message::GetString() -TEST(MessageTest, GetString) { - Message msg; - msg << 1 << " lamb"; - EXPECT_STREQ("1 lamb", msg.GetString().c_str()); -} - -// Tests streaming a Message object to an ostream. -TEST(MessageTest, StreamsToOStream) { - Message msg("Hello"); - StrStream ss; - ss << msg; - EXPECT_STREQ("Hello", testing::internal::StrStreamToString(&ss).c_str()); -} - -// Tests that a Message object doesn't take up too much stack space. -TEST(MessageTest, DoesNotTakeUpMuchStackSpace) { - EXPECT_LE(sizeof(Message), 16U); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-options_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-options_test.cc deleted file mode 100644 index 31ae3277..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-options_test.cc +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: keith.ray@gmail.com (Keith Ray) -// -// Google Test UnitTestOptions tests -// -// This file tests classes and functions used internally by -// Google Test. They are subject to change without notice. -// -// This file is #included from gtest.cc, to avoid changing build or -// make-files on Windows and other platforms. Do not #include this file -// anywhere else! - -#include - -#if GTEST_OS_WINDOWS_MOBILE -#include -#elif GTEST_OS_WINDOWS -#include -#endif // GTEST_OS_WINDOWS_MOBILE - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { -namespace { - -// Turns the given relative path into an absolute path. -FilePath GetAbsolutePathOf(const FilePath& relative_path) { - return FilePath::ConcatPaths(FilePath::GetCurrentDir(), relative_path); -} - -// Testing UnitTestOptions::GetOutputFormat/GetOutputFile. - -TEST(XmlOutputTest, GetOutputFormatDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ("", UnitTestOptions::GetOutputFormat().c_str()); -} - -TEST(XmlOutputTest, GetOutputFormat) { - GTEST_FLAG(output) = "xml:filename"; - EXPECT_STREQ("xml", UnitTestOptions::GetOutputFormat().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ(GetAbsolutePathOf(FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileSingleFile) { - GTEST_FLAG(output) = "xml:filename.abc"; - EXPECT_STREQ(GetAbsolutePathOf(FilePath("filename.abc")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:path\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest-options_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest-options-ex_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - GetAbsolutePathOf( - FilePath("path\\gtest_all_test.xml")).c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:path/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == - GetAbsolutePathOf( - FilePath("path/gtest-options_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/lt-gtest-options_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/gtest_all_test.xml")).c_str() || - output_file == - GetAbsolutePathOf( - FilePath("path/lt-gtest_all_test.xml")).c_str()) - << " output_file = " << output_file; -#endif -} - -TEST(OutputFileHelpersTest, GetCurrentExecutableName) { - const FilePath executable = GetCurrentExecutableName(); - const char* const exe_str = executable.c_str(); -#if GTEST_OS_WINDOWS - ASSERT_TRUE(_strcmpi("gtest-options_test", exe_str) == 0 || - _strcmpi("gtest-options-ex_test", exe_str) == 0 || - _strcmpi("gtest_all_test", exe_str) == 0) - << "GetCurrentExecutableName() returns " << exe_str; -#else - // TODO(wan@google.com): remove the hard-coded "lt-" prefix when - // Chandler Carruth's libtool replacement is ready. - EXPECT_TRUE(String(exe_str) == "gtest-options_test" || - String(exe_str) == "lt-gtest-options_test" || - String(exe_str) == "gtest_all_test" || - String(exe_str) == "lt-gtest_all_test") - << "GetCurrentExecutableName() returns " << exe_str; -#endif // GTEST_OS_WINDOWS -} - -class XmlOutputChangeDirTest : public Test { - protected: - virtual void SetUp() { - original_working_dir_ = FilePath::GetCurrentDir(); - posix::ChDir(".."); - // This will make the test fail if run from the root directory. - EXPECT_STRNE(original_working_dir_.c_str(), - FilePath::GetCurrentDir().c_str()); - } - - virtual void TearDown() { - posix::ChDir(original_working_dir_.c_str()); - } - - FilePath original_working_dir_; -}; - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefault) { - GTEST_FLAG(output) = ""; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefaultXML) { - GTEST_FLAG(output) = "xml"; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("test_detail.xml")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativeFile) { - GTEST_FLAG(output) = "xml:filename.abc"; - EXPECT_STREQ(FilePath::ConcatPaths(original_working_dir_, - FilePath("filename.abc")).c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativePath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:path\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest-options_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest-options-ex_test.xml")).c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath::ConcatPaths( - original_working_dir_, - FilePath("path\\gtest_all_test.xml")).c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:path/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/gtest-options_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/lt-gtest-options_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/gtest_all_test.xml")).c_str() || - output_file == FilePath::ConcatPaths(original_working_dir_, - FilePath("path/lt-gtest_all_test.xml")).c_str()) - << " output_file = " << output_file; -#endif -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsoluteFile) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:c:\\tmp\\filename.abc"; - EXPECT_STREQ(FilePath("c:\\tmp\\filename.abc").c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -#else - GTEST_FLAG(output) ="xml:/tmp/filename.abc"; - EXPECT_STREQ(FilePath("/tmp/filename.abc").c_str(), - UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); -#endif -} - -TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsolutePath) { -#if GTEST_OS_WINDOWS - GTEST_FLAG(output) = "xml:c:\\tmp\\"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - EXPECT_TRUE( - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest-options_test.xml").c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest-options-ex_test.xml").c_str()) == 0 || - _strcmpi(output_file.c_str(), - FilePath("c:\\tmp\\gtest_all_test.xml").c_str()) == 0) - << " output_file = " << output_file; -#else - GTEST_FLAG(output) = "xml:/tmp/"; - const String& output_file = UnitTestOptions::GetAbsolutePathToOutputFile(); - // TODO(wan@google.com): libtool causes the test binary file to be - // named lt-gtest-options_test. Therefore the output file may be - // named .../lt-gtest-options_test.xml. We should remove this - // hard-coded logic when Chandler Carruth's libtool replacement is - // ready. - EXPECT_TRUE(output_file == "/tmp/gtest-options_test.xml" || - output_file == "/tmp/lt-gtest-options_test.xml" || - output_file == "/tmp/gtest_all_test.xml" || - output_file == "/tmp/lt-gtest_all_test.xml") - << " output_file = " << output_file; -#endif -} - -} // namespace -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test2_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test2_test.cc deleted file mode 100644 index ccb6cfac..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test2_test.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// Tests for Google Test itself. This verifies that the basic constructs of -// Google Test work. - -#include - -#include "test/gtest-param-test_test.h" - -#if GTEST_HAS_PARAM_TEST - -using ::testing::Values; -using ::testing::internal::ParamGenerator; - -// Tests that generators defined in a different translation unit -// are functional. The test using extern_gen is defined -// in gtest-param-test_test.cc. -ParamGenerator extern_gen = Values(33); - -// Tests that a parameterized test case can be defined in one translation unit -// and instantiated in another. The test is defined in gtest-param-test_test.cc -// and ExternalInstantiationTest fixture class is defined in -// gtest-param-test_test.h. -INSTANTIATE_TEST_CASE_P(MultiplesOf33, - ExternalInstantiationTest, - Values(33, 66)); - -// Tests that a parameterized test case can be instantiated -// in multiple translation units. Another instantiation is defined -// in gtest-param-test_test.cc and InstantiationInMultipleTranslaionUnitsTest -// fixture is defined in gtest-param-test_test.h -INSTANTIATE_TEST_CASE_P(Sequence2, - InstantiationInMultipleTranslaionUnitsTest, - Values(42*3, 42*4, 42*5)); - -#endif // GTEST_HAS_PARAM_TEST diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.cc deleted file mode 100644 index ecb5fdbb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.cc +++ /dev/null @@ -1,792 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// Tests for Google Test itself. This file verifies that the parameter -// generators objects produce correct parameter sequences and that -// Google Test runtime instantiates correct tests from those sequences. - -#include - -#if GTEST_HAS_PARAM_TEST - -#include -#include -#include -#include - -// To include gtest-internal-inl.h. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" // for UnitTestOptions -#undef GTEST_IMPLEMENTATION_ - -#include "test/gtest-param-test_test.h" - -using ::std::vector; -using ::std::sort; - -using ::testing::AddGlobalTestEnvironment; -using ::testing::Bool; -using ::testing::Message; -using ::testing::Range; -using ::testing::TestWithParam; -using ::testing::Values; -using ::testing::ValuesIn; - -#if GTEST_HAS_COMBINE -using ::testing::Combine; -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -#endif // GTEST_HAS_COMBINE - -using ::testing::internal::ParamGenerator; -using ::testing::internal::UnitTestOptions; - -// Verifies that a sequence generated by the generator and accessed -// via the iterator object matches the expected one using Google Test -// assertions. -template -void VerifyGenerator(const ParamGenerator& generator, - const T (&expected_values)[N]) { - typename ParamGenerator::iterator it = generator.begin(); - for (size_t i = 0; i < N; ++i) { - ASSERT_FALSE(it == generator.end()) - << "At element " << i << " when accessing via an iterator " - << "created with the copy constructor." << std::endl; - EXPECT_EQ(expected_values[i], *it) - << "At element " << i << " when accessing via an iterator " - << "created with the copy constructor." << std::endl; - it++; - } - EXPECT_TRUE(it == generator.end()) - << "At the presumed end of sequence when accessing via an iterator " - << "created with the copy constructor." << std::endl; - - // Test the iterator assignment. The following lines verify that - // the sequence accessed via an iterator initialized via the - // assignment operator (as opposed to a copy constructor) matches - // just the same. - it = generator.begin(); - for (size_t i = 0; i < N; ++i) { - ASSERT_FALSE(it == generator.end()) - << "At element " << i << " when accessing via an iterator " - << "created with the assignment operator." << std::endl; - EXPECT_EQ(expected_values[i], *it) - << "At element " << i << " when accessing via an iterator " - << "created with the assignment operator." << std::endl; - it++; - } - EXPECT_TRUE(it == generator.end()) - << "At the presumed end of sequence when accessing via an iterator " - << "created with the assignment operator." << std::endl; -} - -template -void VerifyGeneratorIsEmpty(const ParamGenerator& generator) { - typename ParamGenerator::iterator it = generator.begin(); - EXPECT_TRUE(it == generator.end()); - - it = generator.begin(); - EXPECT_TRUE(it == generator.end()); -} - -// Generator tests. They test that each of the provided generator functions -// generates an expected sequence of values. The general test pattern -// instantiates a generator using one of the generator functions, -// checks the sequence produced by the generator using its iterator API, -// and then resets the iterator back to the beginning of the sequence -// and checks the sequence again. - -// Tests that iterators produced by generator functions conform to the -// ForwardIterator concept. -TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept) { - const ParamGenerator gen = Range(0, 10); - ParamGenerator::iterator it = gen.begin(); - - // Verifies that iterator initialization works as expected. - ParamGenerator::iterator it2 = it; - EXPECT_TRUE(*it == *it2) << "Initialized iterators must point to the " - << "element same as its source points to"; - - // Verifies that iterator assignment works as expected. - it++; - EXPECT_FALSE(*it == *it2); - it2 = it; - EXPECT_TRUE(*it == *it2) << "Assigned iterators must point to the " - << "element same as its source points to"; - - // Verifies that prefix operator++() returns *this. - EXPECT_EQ(&it, &(++it)) << "Result of the prefix operator++ must be " - << "refer to the original object"; - - // Verifies that the result of the postfix operator++ points to the value - // pointed to by the original iterator. - int original_value = *it; // Have to compute it outside of macro call to be - // unaffected by the parameter evaluation order. - EXPECT_EQ(original_value, *(it++)); - - // Verifies that prefix and postfix operator++() advance an iterator - // all the same. - it2 = it; - it++; - ++it2; - EXPECT_TRUE(*it == *it2); -} - -// Tests that Range() generates the expected sequence. -TEST(RangeTest, IntRangeWithDefaultStep) { - const ParamGenerator gen = Range(0, 3); - const int expected_values[] = {0, 1, 2}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that Range() generates the single element sequence -// as expected when provided with range limits that are equal. -TEST(RangeTest, IntRangeSingleValue) { - const ParamGenerator gen = Range(0, 1); - const int expected_values[] = {0}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that Range() with generates empty sequence when -// supplied with an empty range. -TEST(RangeTest, IntRangeEmpty) { - const ParamGenerator gen = Range(0, 0); - VerifyGeneratorIsEmpty(gen); -} - -// Tests that Range() with custom step (greater then one) generates -// the expected sequence. -TEST(RangeTest, IntRangeWithCustomStep) { - const ParamGenerator gen = Range(0, 9, 3); - const int expected_values[] = {0, 3, 6}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Range() with custom step (greater then one) generates -// the expected sequence when the last element does not fall on the -// upper range limit. Sequences generated by Range() must not have -// elements beyond the range limits. -TEST(RangeTest, IntRangeWithCustomStepOverUpperBound) { - const ParamGenerator gen = Range(0, 4, 3); - const int expected_values[] = {0, 3}; - VerifyGenerator(gen, expected_values); -} - -// Verifies that Range works with user-defined types that define -// copy constructor, operator=(), operator+(), and operator<(). -class DogAdder { - public: - explicit DogAdder(const char* value) : value_(value) {} - DogAdder(const DogAdder& other) : value_(other.value_.c_str()) {} - - DogAdder operator=(const DogAdder& other) { - if (this != &other) - value_ = other.value_; - return *this; - } - DogAdder operator+(const DogAdder& other) const { - Message msg; - msg << value_.c_str() << other.value_.c_str(); - return DogAdder(msg.GetString().c_str()); - } - bool operator<(const DogAdder& other) const { - return value_ < other.value_; - } - const ::testing::internal::String& value() const { return value_; } - - private: - ::testing::internal::String value_; -}; - -TEST(RangeTest, WorksWithACustomType) { - const ParamGenerator gen = - Range(DogAdder("cat"), DogAdder("catdogdog"), DogAdder("dog")); - ParamGenerator::iterator it = gen.begin(); - - ASSERT_FALSE(it == gen.end()); - EXPECT_STREQ("cat", it->value().c_str()); - - ASSERT_FALSE(++it == gen.end()); - EXPECT_STREQ("catdog", it->value().c_str()); - - EXPECT_TRUE(++it == gen.end()); -} - -class IntWrapper { - public: - explicit IntWrapper(int value) : value_(value) {} - IntWrapper(const IntWrapper& other) : value_(other.value_) {} - - IntWrapper operator=(const IntWrapper& other) { - value_ = other.value_; - return *this; - } - // operator+() adds a different type. - IntWrapper operator+(int other) const { return IntWrapper(value_ + other); } - bool operator<(const IntWrapper& other) const { - return value_ < other.value_; - } - int value() const { return value_; } - - private: - int value_; -}; - -TEST(RangeTest, WorksWithACustomTypeWithDifferentIncrementType) { - const ParamGenerator gen = Range(IntWrapper(0), IntWrapper(2)); - ParamGenerator::iterator it = gen.begin(); - - ASSERT_FALSE(it == gen.end()); - EXPECT_EQ(0, it->value()); - - ASSERT_FALSE(++it == gen.end()); - EXPECT_EQ(1, it->value()); - - EXPECT_TRUE(++it == gen.end()); -} - -// Tests that ValuesIn() with an array parameter generates -// the expected sequence. -TEST(ValuesInTest, ValuesInArray) { - int array[] = {3, 5, 8}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Tests that ValuesIn() with a const array parameter generates -// the expected sequence. -TEST(ValuesInTest, ValuesInConstArray) { - const int array[] = {3, 5, 8}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Edge case. Tests that ValuesIn() with an array parameter containing a -// single element generates the single element sequence. -TEST(ValuesInTest, ValuesInSingleElementArray) { - int array[] = {42}; - const ParamGenerator gen = ValuesIn(array); - VerifyGenerator(gen, array); -} - -// Tests that ValuesIn() generates the expected sequence for an STL -// container (vector). -TEST(ValuesInTest, ValuesInVector) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(3); - values.push_back(5); - values.push_back(8); - const ParamGenerator gen = ValuesIn(values); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Tests that ValuesIn() generates the expected sequence. -TEST(ValuesInTest, ValuesInIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(3); - values.push_back(5); - values.push_back(8); - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that ValuesIn() provided with an iterator range specifying a -// single value generates a single-element sequence. -TEST(ValuesInTest, ValuesInSingleElementIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - values.push_back(42); - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - const int expected_values[] = {42}; - VerifyGenerator(gen, expected_values); -} - -// Edge case. Tests that ValuesIn() provided with an empty iterator range -// generates an empty sequence. -TEST(ValuesInTest, ValuesInEmptyIteratorRange) { - typedef ::std::vector ContainerType; - ContainerType values; - const ParamGenerator gen = ValuesIn(values.begin(), values.end()); - - VerifyGeneratorIsEmpty(gen); -} - -// Tests that the Values() generates the expected sequence. -TEST(ValuesTest, ValuesWorks) { - const ParamGenerator gen = Values(3, 5, 8); - - const int expected_values[] = {3, 5, 8}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Values() generates the expected sequences from elements of -// different types convertible to ParamGenerator's parameter type. -TEST(ValuesTest, ValuesWorksForValuesOfCompatibleTypes) { - const ParamGenerator gen = Values(3, 5.0f, 8.0); - - const double expected_values[] = {3.0, 5.0, 8.0}; - VerifyGenerator(gen, expected_values); -} - -TEST(ValuesTest, ValuesWorksForMaxLengthList) { - const ParamGenerator gen = Values( - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, - 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, - 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, - 410, 420, 430, 440, 450, 460, 470, 480, 490, 500); - - const int expected_values[] = { - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, - 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, - 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, - 410, 420, 430, 440, 450, 460, 470, 480, 490, 500}; - VerifyGenerator(gen, expected_values); -} - -// Edge case test. Tests that single-parameter Values() generates the sequence -// with the single value. -TEST(ValuesTest, ValuesWithSingleParameter) { - const ParamGenerator gen = Values(42); - - const int expected_values[] = {42}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Bool() generates sequence (false, true). -TEST(BoolTest, BoolWorks) { - const ParamGenerator gen = Bool(); - - const bool expected_values[] = {false, true}; - VerifyGenerator(gen, expected_values); -} - -#if GTEST_HAS_COMBINE - -template -::std::ostream& operator<<(::std::ostream& stream, const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) << ")"; - return stream; -} - -template -::std::ostream& operator<<(::std::ostream& stream, - const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) - << ", "<< get<2>(value) << ")"; - return stream; -} - -template -::std::ostream& operator<<( - ::std::ostream& stream, - const tuple& value) { - stream << "(" << get<0>(value) << ", " << get<1>(value) - << ", "<< get<2>(value) << ", " << get<3>(value) - << ", "<< get<4>(value) << ", " << get<5>(value) - << ", "<< get<6>(value) << ", " << get<7>(value) - << ", "<< get<8>(value) << ", " << get<9>(value) << ")"; - return stream; -} - -// Tests that Combine() with two parameters generates the expected sequence. -TEST(CombineTest, CombineWithTwoParameters) { - const char* foo = "foo"; - const char* bar = "bar"; - const ParamGenerator > gen = - Combine(Values(foo, bar), Values(3, 4)); - - tuple expected_values[] = { - make_tuple(foo, 3), make_tuple(foo, 4), - make_tuple(bar, 3), make_tuple(bar, 4)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that Combine() with three parameters generates the expected sequence. -TEST(CombineTest, CombineWithThreeParameters) { - const ParamGenerator > gen = Combine(Values(0, 1), - Values(3, 4), - Values(5, 6)); - tuple expected_values[] = { - make_tuple(0, 3, 5), make_tuple(0, 3, 6), - make_tuple(0, 4, 5), make_tuple(0, 4, 6), - make_tuple(1, 3, 5), make_tuple(1, 3, 6), - make_tuple(1, 4, 5), make_tuple(1, 4, 6)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that the Combine() with the first parameter generating a single value -// sequence generates a sequence with the number of elements equal to the -// number of elements in the sequence generated by the second parameter. -TEST(CombineTest, CombineWithFirstParameterSingleValue) { - const ParamGenerator > gen = Combine(Values(42), - Values(0, 1)); - - tuple expected_values[] = {make_tuple(42, 0), make_tuple(42, 1)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that the Combine() with the second parameter generating a single value -// sequence generates a sequence with the number of elements equal to the -// number of elements in the sequence generated by the first parameter. -TEST(CombineTest, CombineWithSecondParameterSingleValue) { - const ParamGenerator > gen = Combine(Values(0, 1), - Values(42)); - - tuple expected_values[] = {make_tuple(0, 42), make_tuple(1, 42)}; - VerifyGenerator(gen, expected_values); -} - -// Tests that when the first parameter produces an empty sequence, -// Combine() produces an empty sequence, too. -TEST(CombineTest, CombineWithFirstParameterEmptyRange) { - const ParamGenerator > gen = Combine(Range(0, 0), - Values(0, 1)); - VerifyGeneratorIsEmpty(gen); -} - -// Tests that when the second parameter produces an empty sequence, -// Combine() produces an empty sequence, too. -TEST(CombineTest, CombineWithSecondParameterEmptyRange) { - const ParamGenerator > gen = Combine(Values(0, 1), - Range(1, 1)); - VerifyGeneratorIsEmpty(gen); -} - -// Edge case. Tests that combine works with the maximum number -// of parameters supported by Google Test (currently 10). -TEST(CombineTest, CombineWithMaxNumberOfParameters) { - const char* foo = "foo"; - const char* bar = "bar"; - const ParamGenerator > gen = Combine(Values(foo, bar), - Values(1), Values(2), - Values(3), Values(4), - Values(5), Values(6), - Values(7), Values(8), - Values(9)); - - tuple - expected_values[] = {make_tuple(foo, 1, 2, 3, 4, 5, 6, 7, 8, 9), - make_tuple(bar, 1, 2, 3, 4, 5, 6, 7, 8, 9)}; - VerifyGenerator(gen, expected_values); -} - -#endif // GTEST_HAS_COMBINE - -// Tests that an generator produces correct sequence after being -// assigned from another generator. -TEST(ParamGeneratorTest, AssignmentWorks) { - ParamGenerator gen = Values(1, 2); - const ParamGenerator gen2 = Values(3, 4); - gen = gen2; - - const int expected_values[] = {3, 4}; - VerifyGenerator(gen, expected_values); -} - -// This test verifies that the tests are expanded and run as specified: -// one test per element from the sequence produced by the generator -// specified in INSTANTIATE_TEST_CASE_P. It also verifies that the test's -// fixture constructor, SetUp(), and TearDown() have run and have been -// supplied with the correct parameters. - -// The use of environment object allows detection of the case where no test -// case functionality is run at all. In this case TestCaseTearDown will not -// be able to detect missing tests, naturally. -template -class TestGenerationEnvironment : public ::testing::Environment { - public: - static TestGenerationEnvironment* Instance() { - static TestGenerationEnvironment* instance = new TestGenerationEnvironment; - return instance; - } - - void FixtureConstructorExecuted() { fixture_constructor_count_++; } - void SetUpExecuted() { set_up_count_++; } - void TearDownExecuted() { tear_down_count_++; } - void TestBodyExecuted() { test_body_count_++; } - - virtual void TearDown() { - // If all MultipleTestGenerationTest tests have been de-selected - // by the filter flag, the following checks make no sense. - bool perform_check = false; - - for (int i = 0; i < kExpectedCalls; ++i) { - Message msg; - msg << "TestsExpandedAndRun/" << i; - if (UnitTestOptions::FilterMatchesTest( - "TestExpansionModule/MultipleTestGenerationTest", - msg.GetString().c_str())) { - perform_check = true; - } - } - if (perform_check) { - EXPECT_EQ(kExpectedCalls, fixture_constructor_count_) - << "Fixture constructor of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, set_up_count_) - << "Fixture SetUp method of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, tear_down_count_) - << "Fixture TearDown method of ParamTestGenerationTest test case " - << "has not been run as expected."; - EXPECT_EQ(kExpectedCalls, test_body_count_) - << "Test in ParamTestGenerationTest test case " - << "has not been run as expected."; - } - } - private: - TestGenerationEnvironment() : fixture_constructor_count_(0), set_up_count_(0), - tear_down_count_(0), test_body_count_(0) {} - - int fixture_constructor_count_; - int set_up_count_; - int tear_down_count_; - int test_body_count_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationEnvironment); -}; - -const int test_generation_params[] = {36, 42, 72}; - -class TestGenerationTest : public TestWithParam { - public: - enum { - PARAMETER_COUNT = - sizeof(test_generation_params)/sizeof(test_generation_params[0]) - }; - - typedef TestGenerationEnvironment Environment; - - TestGenerationTest() { - Environment::Instance()->FixtureConstructorExecuted(); - current_parameter_ = GetParam(); - } - virtual void SetUp() { - Environment::Instance()->SetUpExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - } - virtual void TearDown() { - Environment::Instance()->TearDownExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - } - - static void SetUpTestCase() { - bool all_tests_in_test_case_selected = true; - - for (int i = 0; i < PARAMETER_COUNT; ++i) { - Message test_name; - test_name << "TestsExpandedAndRun/" << i; - if ( !UnitTestOptions::FilterMatchesTest( - "TestExpansionModule/MultipleTestGenerationTest", - test_name.GetString())) { - all_tests_in_test_case_selected = false; - } - } - EXPECT_TRUE(all_tests_in_test_case_selected) - << "When running the TestGenerationTest test case all of its tests\n" - << "must be selected by the filter flag for the test case to pass.\n" - << "If not all of them are enabled, we can't reliably conclude\n" - << "that the correct number of tests have been generated."; - - collected_parameters_.clear(); - } - - static void TearDownTestCase() { - vector expected_values(test_generation_params, - test_generation_params + PARAMETER_COUNT); - // Test execution order is not guaranteed by Google Test, - // so the order of values in collected_parameters_ can be - // different and we have to sort to compare. - sort(expected_values.begin(), expected_values.end()); - sort(collected_parameters_.begin(), collected_parameters_.end()); - - EXPECT_TRUE(collected_parameters_ == expected_values); - } - protected: - int current_parameter_; - static vector collected_parameters_; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationTest); -}; -vector TestGenerationTest::collected_parameters_; - -TEST_P(TestGenerationTest, TestsExpandedAndRun) { - Environment::Instance()->TestBodyExecuted(); - EXPECT_EQ(current_parameter_, GetParam()); - collected_parameters_.push_back(GetParam()); -} -INSTANTIATE_TEST_CASE_P(TestExpansionModule, TestGenerationTest, - ValuesIn(test_generation_params)); - -// This test verifies that the element sequence (third parameter of -// INSTANTIATE_TEST_CASE_P) is evaluated in RUN_ALL_TESTS and not at the call -// site of INSTANTIATE_TEST_CASE_P. -// For that, we declare param_value_ to be a static member of -// GeneratorEvaluationTest and initialize it to 0. We set it to 1 in main(), -// just before invocation of RUN_ALL_TESTS. If the sequence is evaluated -// before that moment, INSTANTIATE_TEST_CASE_P will create a test with -// parameter 0, and the test body will fail the assertion. -class GeneratorEvaluationTest : public TestWithParam { - public: - static int param_value() { return param_value_; } - static void set_param_value(int param_value) { param_value_ = param_value; } - - private: - static int param_value_; -}; -int GeneratorEvaluationTest::param_value_ = 0; - -TEST_P(GeneratorEvaluationTest, GeneratorsEvaluatedInMain) { - EXPECT_EQ(1, GetParam()); -} -INSTANTIATE_TEST_CASE_P(GenEvalModule, - GeneratorEvaluationTest, - Values(GeneratorEvaluationTest::param_value())); - -// Tests that generators defined in a different translation unit are -// functional. Generator extern_gen is defined in gtest-param-test_test2.cc. -extern ParamGenerator extern_gen; -class ExternalGeneratorTest : public TestWithParam {}; -TEST_P(ExternalGeneratorTest, ExternalGenerator) { - // Sequence produced by extern_gen contains only a single value - // which we verify here. - EXPECT_EQ(GetParam(), 33); -} -INSTANTIATE_TEST_CASE_P(ExternalGeneratorModule, - ExternalGeneratorTest, - extern_gen); - -// Tests that a parameterized test case can be defined in one translation -// unit and instantiated in another. This test will be instantiated in -// gtest-param-test_test2.cc. ExternalInstantiationTest fixture class is -// defined in gtest-param-test_test.h. -TEST_P(ExternalInstantiationTest, IsMultipleOf33) { - EXPECT_EQ(0, GetParam() % 33); -} - -// Tests that a parameterized test case can be instantiated with multiple -// generators. -class MultipleInstantiationTest : public TestWithParam {}; -TEST_P(MultipleInstantiationTest, AllowsMultipleInstances) { -} -INSTANTIATE_TEST_CASE_P(Sequence1, MultipleInstantiationTest, Values(1, 2)); -INSTANTIATE_TEST_CASE_P(Sequence2, MultipleInstantiationTest, Range(3, 5)); - -// Tests that a parameterized test case can be instantiated -// in multiple translation units. This test will be instantiated -// here and in gtest-param-test_test2.cc. -// InstantiationInMultipleTranslationUnitsTest fixture class -// is defined in gtest-param-test_test.h. -TEST_P(InstantiationInMultipleTranslaionUnitsTest, IsMultipleOf42) { - EXPECT_EQ(0, GetParam() % 42); -} -INSTANTIATE_TEST_CASE_P(Sequence1, - InstantiationInMultipleTranslaionUnitsTest, - Values(42, 42*2)); - -// Tests that each iteration of parameterized test runs in a separate test -// object. -class SeparateInstanceTest : public TestWithParam { - public: - SeparateInstanceTest() : count_(0) {} - - static void TearDownTestCase() { - EXPECT_GE(global_count_, 2) - << "If some (but not all) SeparateInstanceTest tests have been " - << "filtered out this test will fail. Make sure that all " - << "GeneratorEvaluationTest are selected or de-selected together " - << "by the test filter."; - } - - protected: - int count_; - static int global_count_; -}; -int SeparateInstanceTest::global_count_ = 0; - -TEST_P(SeparateInstanceTest, TestsRunInSeparateInstances) { - EXPECT_EQ(0, count_++); - global_count_++; -} -INSTANTIATE_TEST_CASE_P(FourElemSequence, SeparateInstanceTest, Range(1, 4)); - -// Tests that all instantiations of a test have named appropriately. Test -// defined with TEST_P(TestCaseName, TestName) and instantiated with -// INSTANTIATE_TEST_CASE_P(SequenceName, TestCaseName, generator) must be named -// SequenceName/TestCaseName.TestName/i, where i is the 0-based index of the -// sequence element used to instantiate the test. -class NamingTest : public TestWithParam {}; - -TEST_P(NamingTest, TestsAreNamedAppropriately) { - const ::testing::TestInfo* const test_info = - ::testing::UnitTest::GetInstance()->current_test_info(); - - EXPECT_STREQ("ZeroToFiveSequence/NamingTest", test_info->test_case_name()); - - Message msg; - msg << "TestsAreNamedAppropriately/" << GetParam(); - EXPECT_STREQ(msg.GetString().c_str(), test_info->name()); -} - -INSTANTIATE_TEST_CASE_P(ZeroToFiveSequence, NamingTest, Range(0, 5)); - -#endif // GTEST_HAS_PARAM_TEST - -TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined) { -#if GTEST_HAS_COMBINE && !GTEST_HAS_PARAM_TEST - FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n" -#endif -} - -int main(int argc, char **argv) { -#if GTEST_HAS_PARAM_TEST - // Used in TestGenerationTest test case. - AddGlobalTestEnvironment(TestGenerationTest::Environment::Instance()); - // Used in GeneratorEvaluationTest test case. - GeneratorEvaluationTest::set_param_value(1); -#endif // GTEST_HAS_PARAM_TEST - - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.h deleted file mode 100644 index b7f94936..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-param-test_test.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev) -// -// The Google C++ Testing Framework (Google Test) -// -// This header file provides classes and functions used internally -// for testing Google Test itself. - -#ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ -#define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ - -#include - -#if GTEST_HAS_PARAM_TEST - -// Test fixture for testing definition and instantiation of a test -// in separate translation units. -class ExternalInstantiationTest : public ::testing::TestWithParam {}; - -// Test fixture for testing instantiation of a test in multiple -// translation units. -class InstantiationInMultipleTranslaionUnitsTest - : public ::testing::TestWithParam {}; - -#endif // GTEST_HAS_PARAM_TEST - -#endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-port_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-port_test.cc deleted file mode 100644 index df59f9e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-port_test.cc +++ /dev/null @@ -1,699 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: vladl@google.com (Vlad Losev), wan@google.com (Zhanyong Wan) -// -// This file tests the internal cross-platform support utilities. - -#include - -#if GTEST_OS_MAC -#include -#include -#endif // GTEST_OS_MAC - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace internal { - -TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) { - if (AlwaysFalse()) - GTEST_CHECK_(false) << "This should never be executed; " - "It's a compilation test only."; - - if (AlwaysTrue()) - GTEST_CHECK_(true); - else - ; // NOLINT - - if (AlwaysFalse()) - ; // NOLINT - else - GTEST_CHECK_(true) << ""; -} - -TEST(GtestCheckSyntaxTest, WorksWithSwitch) { - switch (0) { - case 1: - break; - default: - GTEST_CHECK_(true); - } - - switch(0) - case 0: - GTEST_CHECK_(true) << "Check failed in switch case"; -} - -#if GTEST_OS_MAC -void* ThreadFunc(void* data) { - pthread_mutex_t* mutex = reinterpret_cast(data); - pthread_mutex_lock(mutex); - pthread_mutex_unlock(mutex); - return NULL; -} - -TEST(GetThreadCountTest, ReturnsCorrectValue) { - EXPECT_EQ(1U, GetThreadCount()); - pthread_mutex_t mutex; - pthread_attr_t attr; - pthread_t thread_id; - - // TODO(vladl@google.com): turn mutex into internal::Mutex for automatic - // destruction. - pthread_mutex_init(&mutex, NULL); - pthread_mutex_lock(&mutex); - ASSERT_EQ(0, pthread_attr_init(&attr)); - ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE)); - - const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex); - ASSERT_EQ(0, pthread_attr_destroy(&attr)); - ASSERT_EQ(0, status); - EXPECT_EQ(2U, GetThreadCount()); - pthread_mutex_unlock(&mutex); - - void* dummy; - ASSERT_EQ(0, pthread_join(thread_id, &dummy)); - - // MacOS X may not immediately report the updated thread count after - // joining a thread, causing flakiness in this test. To counter that, we - // wait for up to .5 seconds for the OS to report the correct value. - for (int i = 0; i < 5; ++i) { - if (GetThreadCount() == 1) - break; - - timespec time; - time.tv_sec = 0; - time.tv_nsec = 100L * 1000 * 1000; // .1 seconds. - nanosleep(&time, NULL); - } - EXPECT_EQ(1U, GetThreadCount()); - pthread_mutex_destroy(&mutex); -} -#else -TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) { - EXPECT_EQ(0U, GetThreadCount()); -} -#endif // GTEST_OS_MAC - -TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) { - const bool a_false_condition = false; - const char regex[] = -#ifdef _MSC_VER - "gtest-port_test\\.cc\\(\\d+\\):" -#else - "gtest-port_test\\.cc:[0-9]+" -#endif // _MSC_VER - ".*a_false_condition.*Extra info.*"; - - EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(a_false_condition) << "Extra info", - regex); -} - -#if GTEST_HAS_DEATH_TEST - -TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) { - EXPECT_EXIT({ - GTEST_CHECK_(true) << "Extra info"; - ::std::cerr << "Success\n"; - exit(0); }, - ::testing::ExitedWithCode(0), "Success"); -} - -#endif // GTEST_HAS_DEATH_TEST - -#if GTEST_USES_POSIX_RE - -template -class RETest : public ::testing::Test {}; - -// Defines StringTypes as the list of all string types that class RE -// supports. -typedef testing::Types< -#if GTEST_HAS_STD_STRING - ::std::string, -#endif // GTEST_HAS_STD_STRING -#if GTEST_HAS_GLOBAL_STRING - ::string, -#endif // GTEST_HAS_GLOBAL_STRING - const char*> StringTypes; - -TYPED_TEST_CASE(RETest, StringTypes); - -// Tests RE's implicit constructors. -TYPED_TEST(RETest, ImplicitConstructorWorks) { - const RE empty(TypeParam("")); - EXPECT_STREQ("", empty.pattern()); - - const RE simple(TypeParam("hello")); - EXPECT_STREQ("hello", simple.pattern()); - - const RE normal(TypeParam(".*(\\w+)")); - EXPECT_STREQ(".*(\\w+)", normal.pattern()); -} - -// Tests that RE's constructors reject invalid regular expressions. -TYPED_TEST(RETest, RejectsInvalidRegex) { - EXPECT_NONFATAL_FAILURE({ - const RE invalid(TypeParam("?")); - }, "\"?\" is not a valid POSIX Extended regular expression."); -} - -// Tests RE::FullMatch(). -TYPED_TEST(RETest, FullMatchWorks) { - const RE empty(TypeParam("")); - EXPECT_TRUE(RE::FullMatch(TypeParam(""), empty)); - EXPECT_FALSE(RE::FullMatch(TypeParam("a"), empty)); - - const RE re(TypeParam("a.*z")); - EXPECT_TRUE(RE::FullMatch(TypeParam("az"), re)); - EXPECT_TRUE(RE::FullMatch(TypeParam("axyz"), re)); - EXPECT_FALSE(RE::FullMatch(TypeParam("baz"), re)); - EXPECT_FALSE(RE::FullMatch(TypeParam("azy"), re)); -} - -// Tests RE::PartialMatch(). -TYPED_TEST(RETest, PartialMatchWorks) { - const RE empty(TypeParam("")); - EXPECT_TRUE(RE::PartialMatch(TypeParam(""), empty)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("a"), empty)); - - const RE re(TypeParam("a.*z")); - EXPECT_TRUE(RE::PartialMatch(TypeParam("az"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("axyz"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("baz"), re)); - EXPECT_TRUE(RE::PartialMatch(TypeParam("azy"), re)); - EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re)); -} - -#elif GTEST_USES_SIMPLE_RE - -TEST(IsInSetTest, NulCharIsNotInAnySet) { - EXPECT_FALSE(IsInSet('\0', "")); - EXPECT_FALSE(IsInSet('\0', "\0")); - EXPECT_FALSE(IsInSet('\0', "a")); -} - -TEST(IsInSetTest, WorksForNonNulChars) { - EXPECT_FALSE(IsInSet('a', "Ab")); - EXPECT_FALSE(IsInSet('c', "")); - - EXPECT_TRUE(IsInSet('b', "bcd")); - EXPECT_TRUE(IsInSet('b', "ab")); -} - -TEST(IsDigitTest, IsFalseForNonDigit) { - EXPECT_FALSE(IsDigit('\0')); - EXPECT_FALSE(IsDigit(' ')); - EXPECT_FALSE(IsDigit('+')); - EXPECT_FALSE(IsDigit('-')); - EXPECT_FALSE(IsDigit('.')); - EXPECT_FALSE(IsDigit('a')); -} - -TEST(IsDigitTest, IsTrueForDigit) { - EXPECT_TRUE(IsDigit('0')); - EXPECT_TRUE(IsDigit('1')); - EXPECT_TRUE(IsDigit('5')); - EXPECT_TRUE(IsDigit('9')); -} - -TEST(IsPunctTest, IsFalseForNonPunct) { - EXPECT_FALSE(IsPunct('\0')); - EXPECT_FALSE(IsPunct(' ')); - EXPECT_FALSE(IsPunct('\n')); - EXPECT_FALSE(IsPunct('a')); - EXPECT_FALSE(IsPunct('0')); -} - -TEST(IsPunctTest, IsTrueForPunct) { - for (const char* p = "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; *p; p++) { - EXPECT_PRED1(IsPunct, *p); - } -} - -TEST(IsRepeatTest, IsFalseForNonRepeatChar) { - EXPECT_FALSE(IsRepeat('\0')); - EXPECT_FALSE(IsRepeat(' ')); - EXPECT_FALSE(IsRepeat('a')); - EXPECT_FALSE(IsRepeat('1')); - EXPECT_FALSE(IsRepeat('-')); -} - -TEST(IsRepeatTest, IsTrueForRepeatChar) { - EXPECT_TRUE(IsRepeat('?')); - EXPECT_TRUE(IsRepeat('*')); - EXPECT_TRUE(IsRepeat('+')); -} - -TEST(IsWhiteSpaceTest, IsFalseForNonWhiteSpace) { - EXPECT_FALSE(IsWhiteSpace('\0')); - EXPECT_FALSE(IsWhiteSpace('a')); - EXPECT_FALSE(IsWhiteSpace('1')); - EXPECT_FALSE(IsWhiteSpace('+')); - EXPECT_FALSE(IsWhiteSpace('_')); -} - -TEST(IsWhiteSpaceTest, IsTrueForWhiteSpace) { - EXPECT_TRUE(IsWhiteSpace(' ')); - EXPECT_TRUE(IsWhiteSpace('\n')); - EXPECT_TRUE(IsWhiteSpace('\r')); - EXPECT_TRUE(IsWhiteSpace('\t')); - EXPECT_TRUE(IsWhiteSpace('\v')); - EXPECT_TRUE(IsWhiteSpace('\f')); -} - -TEST(IsWordCharTest, IsFalseForNonWordChar) { - EXPECT_FALSE(IsWordChar('\0')); - EXPECT_FALSE(IsWordChar('+')); - EXPECT_FALSE(IsWordChar('.')); - EXPECT_FALSE(IsWordChar(' ')); - EXPECT_FALSE(IsWordChar('\n')); -} - -TEST(IsWordCharTest, IsTrueForLetter) { - EXPECT_TRUE(IsWordChar('a')); - EXPECT_TRUE(IsWordChar('b')); - EXPECT_TRUE(IsWordChar('A')); - EXPECT_TRUE(IsWordChar('Z')); -} - -TEST(IsWordCharTest, IsTrueForDigit) { - EXPECT_TRUE(IsWordChar('0')); - EXPECT_TRUE(IsWordChar('1')); - EXPECT_TRUE(IsWordChar('7')); - EXPECT_TRUE(IsWordChar('9')); -} - -TEST(IsWordCharTest, IsTrueForUnderscore) { - EXPECT_TRUE(IsWordChar('_')); -} - -TEST(IsValidEscapeTest, IsFalseForNonPrintable) { - EXPECT_FALSE(IsValidEscape('\0')); - EXPECT_FALSE(IsValidEscape('\007')); -} - -TEST(IsValidEscapeTest, IsFalseForDigit) { - EXPECT_FALSE(IsValidEscape('0')); - EXPECT_FALSE(IsValidEscape('9')); -} - -TEST(IsValidEscapeTest, IsFalseForWhiteSpace) { - EXPECT_FALSE(IsValidEscape(' ')); - EXPECT_FALSE(IsValidEscape('\n')); -} - -TEST(IsValidEscapeTest, IsFalseForSomeLetter) { - EXPECT_FALSE(IsValidEscape('a')); - EXPECT_FALSE(IsValidEscape('Z')); -} - -TEST(IsValidEscapeTest, IsTrueForPunct) { - EXPECT_TRUE(IsValidEscape('.')); - EXPECT_TRUE(IsValidEscape('-')); - EXPECT_TRUE(IsValidEscape('^')); - EXPECT_TRUE(IsValidEscape('$')); - EXPECT_TRUE(IsValidEscape('(')); - EXPECT_TRUE(IsValidEscape(']')); - EXPECT_TRUE(IsValidEscape('{')); - EXPECT_TRUE(IsValidEscape('|')); -} - -TEST(IsValidEscapeTest, IsTrueForSomeLetter) { - EXPECT_TRUE(IsValidEscape('d')); - EXPECT_TRUE(IsValidEscape('D')); - EXPECT_TRUE(IsValidEscape('s')); - EXPECT_TRUE(IsValidEscape('S')); - EXPECT_TRUE(IsValidEscape('w')); - EXPECT_TRUE(IsValidEscape('W')); -} - -TEST(AtomMatchesCharTest, EscapedPunct) { - EXPECT_FALSE(AtomMatchesChar(true, '\\', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, '\\', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, '_', '.')); - EXPECT_FALSE(AtomMatchesChar(true, '.', 'a')); - - EXPECT_TRUE(AtomMatchesChar(true, '\\', '\\')); - EXPECT_TRUE(AtomMatchesChar(true, '_', '_')); - EXPECT_TRUE(AtomMatchesChar(true, '+', '+')); - EXPECT_TRUE(AtomMatchesChar(true, '.', '.')); -} - -TEST(AtomMatchesCharTest, Escaped_d) { - EXPECT_FALSE(AtomMatchesChar(true, 'd', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'd', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 'd', '.')); - - EXPECT_TRUE(AtomMatchesChar(true, 'd', '0')); - EXPECT_TRUE(AtomMatchesChar(true, 'd', '9')); -} - -TEST(AtomMatchesCharTest, Escaped_D) { - EXPECT_FALSE(AtomMatchesChar(true, 'D', '0')); - EXPECT_FALSE(AtomMatchesChar(true, 'D', '9')); - - EXPECT_TRUE(AtomMatchesChar(true, 'D', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'D', 'a')); - EXPECT_TRUE(AtomMatchesChar(true, 'D', '-')); -} - -TEST(AtomMatchesCharTest, Escaped_s) { - EXPECT_FALSE(AtomMatchesChar(true, 's', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 's', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 's', '.')); - EXPECT_FALSE(AtomMatchesChar(true, 's', '9')); - - EXPECT_TRUE(AtomMatchesChar(true, 's', ' ')); - EXPECT_TRUE(AtomMatchesChar(true, 's', '\n')); - EXPECT_TRUE(AtomMatchesChar(true, 's', '\t')); -} - -TEST(AtomMatchesCharTest, Escaped_S) { - EXPECT_FALSE(AtomMatchesChar(true, 'S', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, 'S', '\r')); - - EXPECT_TRUE(AtomMatchesChar(true, 'S', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'S', 'a')); - EXPECT_TRUE(AtomMatchesChar(true, 'S', '9')); -} - -TEST(AtomMatchesCharTest, Escaped_w) { - EXPECT_FALSE(AtomMatchesChar(true, 'w', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', '+')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', ' ')); - EXPECT_FALSE(AtomMatchesChar(true, 'w', '\n')); - - EXPECT_TRUE(AtomMatchesChar(true, 'w', '0')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', 'b')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', 'C')); - EXPECT_TRUE(AtomMatchesChar(true, 'w', '_')); -} - -TEST(AtomMatchesCharTest, Escaped_W) { - EXPECT_FALSE(AtomMatchesChar(true, 'W', 'A')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', 'b')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', '9')); - EXPECT_FALSE(AtomMatchesChar(true, 'W', '_')); - - EXPECT_TRUE(AtomMatchesChar(true, 'W', '\0')); - EXPECT_TRUE(AtomMatchesChar(true, 'W', '*')); - EXPECT_TRUE(AtomMatchesChar(true, 'W', '\n')); -} - -TEST(AtomMatchesCharTest, EscapedWhiteSpace) { - EXPECT_FALSE(AtomMatchesChar(true, 'f', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'f', '\n')); - EXPECT_FALSE(AtomMatchesChar(true, 'n', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'n', '\r')); - EXPECT_FALSE(AtomMatchesChar(true, 'r', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'r', 'a')); - EXPECT_FALSE(AtomMatchesChar(true, 't', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 't', 't')); - EXPECT_FALSE(AtomMatchesChar(true, 'v', '\0')); - EXPECT_FALSE(AtomMatchesChar(true, 'v', '\f')); - - EXPECT_TRUE(AtomMatchesChar(true, 'f', '\f')); - EXPECT_TRUE(AtomMatchesChar(true, 'n', '\n')); - EXPECT_TRUE(AtomMatchesChar(true, 'r', '\r')); - EXPECT_TRUE(AtomMatchesChar(true, 't', '\t')); - EXPECT_TRUE(AtomMatchesChar(true, 'v', '\v')); -} - -TEST(AtomMatchesCharTest, UnescapedDot) { - EXPECT_FALSE(AtomMatchesChar(false, '.', '\n')); - - EXPECT_TRUE(AtomMatchesChar(false, '.', '\0')); - EXPECT_TRUE(AtomMatchesChar(false, '.', '.')); - EXPECT_TRUE(AtomMatchesChar(false, '.', 'a')); - EXPECT_TRUE(AtomMatchesChar(false, '.', ' ')); -} - -TEST(AtomMatchesCharTest, UnescapedChar) { - EXPECT_FALSE(AtomMatchesChar(false, 'a', '\0')); - EXPECT_FALSE(AtomMatchesChar(false, 'a', 'b')); - EXPECT_FALSE(AtomMatchesChar(false, '$', 'a')); - - EXPECT_TRUE(AtomMatchesChar(false, '$', '$')); - EXPECT_TRUE(AtomMatchesChar(false, '5', '5')); - EXPECT_TRUE(AtomMatchesChar(false, 'Z', 'Z')); -} - -TEST(ValidateRegexTest, GeneratesFailureAndReturnsFalseForInvalid) { - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(NULL)), - "NULL is not a valid simple regular expression"); - EXPECT_NONFATAL_FAILURE( - ASSERT_FALSE(ValidateRegex("a\\")), - "Syntax error at index 1 in simple regular expression \"a\\\": "); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a\\")), - "'\\' cannot appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\n\\")), - "'\\' cannot appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("\\s\\hb")), - "invalid escape sequence \"\\h\""); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^^")), - "'^' can only appear at the beginning"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex(".*^b")), - "'^' can only appear at the beginning"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("$$")), - "'$' can only appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^$a")), - "'$' can only appear at the end"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a(b")), - "'(' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("ab)")), - "')' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("[ab")), - "'[' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("a{2")), - "'{' is unsupported"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("?")), - "'?' can only follow a repeatable token"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("^*")), - "'*' can only follow a repeatable token"); - EXPECT_NONFATAL_FAILURE(ASSERT_FALSE(ValidateRegex("5*+")), - "'+' can only follow a repeatable token"); -} - -TEST(ValidateRegexTest, ReturnsTrueForValid) { - EXPECT_TRUE(ValidateRegex("")); - EXPECT_TRUE(ValidateRegex("a")); - EXPECT_TRUE(ValidateRegex(".*")); - EXPECT_TRUE(ValidateRegex("^a_+")); - EXPECT_TRUE(ValidateRegex("^a\\t\\&?")); - EXPECT_TRUE(ValidateRegex("09*$")); - EXPECT_TRUE(ValidateRegex("^Z$")); - EXPECT_TRUE(ValidateRegex("a\\^Z\\$\\(\\)\\|\\[\\]\\{\\}")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrOne) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "a", "ba")); - // Repeating more than once. - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "aab")); - - // Repeating zero times. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ba")); - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, 'a', '?', "b", "ab")); - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '#', '?', ".", "##")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForZeroOrMany) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '*', "a$", "baab")); - - // Repeating zero times. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "bc")); - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '*', "b", "abc")); - // Repeating more than once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '*', "-", "ab_1-g")); -} - -TEST(MatchRepetitionAndRegexAtHeadTest, WorksForOneOrMany) { - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "a$", "baab")); - // Repeating zero times. - EXPECT_FALSE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "bc")); - - // Repeating once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(false, '.', '+', "b", "abc")); - // Repeating more than once. - EXPECT_TRUE(MatchRepetitionAndRegexAtHead(true, 'w', '+', "-", "ab_1-g")); -} - -TEST(MatchRegexAtHeadTest, ReturnsTrueForEmptyRegex) { - EXPECT_TRUE(MatchRegexAtHead("", "")); - EXPECT_TRUE(MatchRegexAtHead("", "ab")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenDollarIsInRegex) { - EXPECT_FALSE(MatchRegexAtHead("$", "a")); - - EXPECT_TRUE(MatchRegexAtHead("$", "")); - EXPECT_TRUE(MatchRegexAtHead("a$", "a")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithEscapeSequence) { - EXPECT_FALSE(MatchRegexAtHead("\\w", "+")); - EXPECT_FALSE(MatchRegexAtHead("\\W", "ab")); - - EXPECT_TRUE(MatchRegexAtHead("\\sa", "\nab")); - EXPECT_TRUE(MatchRegexAtHead("\\d", "1a")); -} - -TEST(MatchRegexAtHeadTest, WorksWhenRegexStartsWithRepetition) { - EXPECT_FALSE(MatchRegexAtHead(".+a", "abc")); - EXPECT_FALSE(MatchRegexAtHead("a?b", "aab")); - - EXPECT_TRUE(MatchRegexAtHead(".*a", "bc12-ab")); - EXPECT_TRUE(MatchRegexAtHead("a?b", "b")); - EXPECT_TRUE(MatchRegexAtHead("a?b", "ab")); -} - -TEST(MatchRegexAtHeadTest, - WorksWhenRegexStartsWithRepetionOfEscapeSequence) { - EXPECT_FALSE(MatchRegexAtHead("\\.+a", "abc")); - EXPECT_FALSE(MatchRegexAtHead("\\s?b", " b")); - - EXPECT_TRUE(MatchRegexAtHead("\\(*a", "((((ab")); - EXPECT_TRUE(MatchRegexAtHead("\\^?b", "^b")); - EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "b")); - EXPECT_TRUE(MatchRegexAtHead("\\\\?b", "\\b")); -} - -TEST(MatchRegexAtHeadTest, MatchesSequentially) { - EXPECT_FALSE(MatchRegexAtHead("ab.*c", "acabc")); - - EXPECT_TRUE(MatchRegexAtHead("ab.*c", "ab-fsc")); -} - -TEST(MatchRegexAnywhereTest, ReturnsFalseWhenStringIsNull) { - EXPECT_FALSE(MatchRegexAnywhere("", NULL)); -} - -TEST(MatchRegexAnywhereTest, WorksWhenRegexStartsWithCaret) { - EXPECT_FALSE(MatchRegexAnywhere("^a", "ba")); - EXPECT_FALSE(MatchRegexAnywhere("^$", "a")); - - EXPECT_TRUE(MatchRegexAnywhere("^a", "ab")); - EXPECT_TRUE(MatchRegexAnywhere("^", "ab")); - EXPECT_TRUE(MatchRegexAnywhere("^$", "")); -} - -TEST(MatchRegexAnywhereTest, ReturnsFalseWhenNoMatch) { - EXPECT_FALSE(MatchRegexAnywhere("a", "bcde123")); - EXPECT_FALSE(MatchRegexAnywhere("a.+a", "--aa88888888")); -} - -TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingPrefix) { - EXPECT_TRUE(MatchRegexAnywhere("\\w+", "ab1_ - 5")); - EXPECT_TRUE(MatchRegexAnywhere(".*=", "=")); - EXPECT_TRUE(MatchRegexAnywhere("x.*ab?.*bc", "xaaabc")); -} - -TEST(MatchRegexAnywhereTest, ReturnsTrueWhenMatchingNonPrefix) { - EXPECT_TRUE(MatchRegexAnywhere("\\w+", "$$$ ab1_ - 5")); - EXPECT_TRUE(MatchRegexAnywhere("\\.+=", "= ...=")); -} - -// Tests RE's implicit constructors. -TEST(RETest, ImplicitConstructorWorks) { - const RE empty(""); - EXPECT_STREQ("", empty.pattern()); - - const RE simple("hello"); - EXPECT_STREQ("hello", simple.pattern()); -} - -// Tests that RE's constructors reject invalid regular expressions. -TEST(RETest, RejectsInvalidRegex) { - EXPECT_NONFATAL_FAILURE({ - const RE normal(NULL); - }, "NULL is not a valid simple regular expression"); - - EXPECT_NONFATAL_FAILURE({ - const RE normal(".*(\\w+"); - }, "'(' is unsupported"); - - EXPECT_NONFATAL_FAILURE({ - const RE invalid("^?"); - }, "'?' can only follow a repeatable token"); -} - -// Tests RE::FullMatch(). -TEST(RETest, FullMatchWorks) { - const RE empty(""); - EXPECT_TRUE(RE::FullMatch("", empty)); - EXPECT_FALSE(RE::FullMatch("a", empty)); - - const RE re1("a"); - EXPECT_TRUE(RE::FullMatch("a", re1)); - - const RE re("a.*z"); - EXPECT_TRUE(RE::FullMatch("az", re)); - EXPECT_TRUE(RE::FullMatch("axyz", re)); - EXPECT_FALSE(RE::FullMatch("baz", re)); - EXPECT_FALSE(RE::FullMatch("azy", re)); -} - -// Tests RE::PartialMatch(). -TEST(RETest, PartialMatchWorks) { - const RE empty(""); - EXPECT_TRUE(RE::PartialMatch("", empty)); - EXPECT_TRUE(RE::PartialMatch("a", empty)); - - const RE re("a.*z"); - EXPECT_TRUE(RE::PartialMatch("az", re)); - EXPECT_TRUE(RE::PartialMatch("axyz", re)); - EXPECT_TRUE(RE::PartialMatch("baz", re)); - EXPECT_TRUE(RE::PartialMatch("azy", re)); - EXPECT_FALSE(RE::PartialMatch("zza", re)); -} - -#endif // GTEST_USES_POSIX_RE - -TEST(CaptureStderrTest, CapturesStdErr) { - CaptureStderr(); - fprintf(stderr, "abc"); - ASSERT_STREQ("abc", GetCapturedStderr().c_str()); -} - -} // namespace internal -} // namespace testing diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-test-part_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-test-part_test.cc deleted file mode 100644 index 403c1845..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-test-part_test.cc +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// - -#include - -#include - -using testing::Test; -using testing::TestPartResult; -using testing::TestPartResultArray; - -namespace { - -// Tests the TestPartResult class. - -// The test fixture for testing TestPartResult. -class TestPartResultTest : public Test { - protected: - TestPartResultTest() - : r1_(TestPartResult::kSuccess, "foo/bar.cc", 10, "Success!"), - r2_(TestPartResult::kNonFatalFailure, "foo/bar.cc", -1, "Failure!"), - r3_(TestPartResult::kFatalFailure, NULL, -1, "Failure!") {} - - TestPartResult r1_, r2_, r3_; -}; - -// Tests TestPartResult::type(). -TEST_F(TestPartResultTest, type) { - EXPECT_EQ(TestPartResult::kSuccess, r1_.type()); - EXPECT_EQ(TestPartResult::kNonFatalFailure, r2_.type()); - EXPECT_EQ(TestPartResult::kFatalFailure, r3_.type()); -} - -// Tests TestPartResult::file_name(). -TEST_F(TestPartResultTest, file_name) { - EXPECT_STREQ("foo/bar.cc", r1_.file_name()); - EXPECT_STREQ(NULL, r3_.file_name()); -} - -// Tests TestPartResult::line_number(). -TEST_F(TestPartResultTest, line_number) { - EXPECT_EQ(10, r1_.line_number()); - EXPECT_EQ(-1, r2_.line_number()); -} - -// Tests TestPartResult::message(). -TEST_F(TestPartResultTest, message) { - EXPECT_STREQ("Success!", r1_.message()); -} - -// Tests TestPartResult::passed(). -TEST_F(TestPartResultTest, Passed) { - EXPECT_TRUE(r1_.passed()); - EXPECT_FALSE(r2_.passed()); - EXPECT_FALSE(r3_.passed()); -} - -// Tests TestPartResult::failed(). -TEST_F(TestPartResultTest, Failed) { - EXPECT_FALSE(r1_.failed()); - EXPECT_TRUE(r2_.failed()); - EXPECT_TRUE(r3_.failed()); -} - -// Tests TestPartResult::fatally_failed(). -TEST_F(TestPartResultTest, FatallyFailed) { - EXPECT_FALSE(r1_.fatally_failed()); - EXPECT_FALSE(r2_.fatally_failed()); - EXPECT_TRUE(r3_.fatally_failed()); -} - -// Tests TestPartResult::nonfatally_failed(). -TEST_F(TestPartResultTest, NonfatallyFailed) { - EXPECT_FALSE(r1_.nonfatally_failed()); - EXPECT_TRUE(r2_.nonfatally_failed()); - EXPECT_FALSE(r3_.nonfatally_failed()); -} - -// Tests the TestPartResultArray class. - -class TestPartResultArrayTest : public Test { - protected: - TestPartResultArrayTest() - : r1_(TestPartResult::kNonFatalFailure, "foo/bar.cc", -1, "Failure 1"), - r2_(TestPartResult::kFatalFailure, "foo/bar.cc", -1, "Failure 2") {} - - const TestPartResult r1_, r2_; -}; - -// Tests that TestPartResultArray initially has size 0. -TEST_F(TestPartResultArrayTest, InitialSizeIsZero) { - TestPartResultArray results; - EXPECT_EQ(0, results.size()); -} - -// Tests that TestPartResultArray contains the given TestPartResult -// after one Append() operation. -TEST_F(TestPartResultArrayTest, ContainsGivenResultAfterAppend) { - TestPartResultArray results; - results.Append(r1_); - EXPECT_EQ(1, results.size()); - EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message()); -} - -// Tests that TestPartResultArray contains the given TestPartResults -// after two Append() operations. -TEST_F(TestPartResultArrayTest, ContainsGivenResultsAfterTwoAppends) { - TestPartResultArray results; - results.Append(r1_); - results.Append(r2_); - EXPECT_EQ(2, results.size()); - EXPECT_STREQ("Failure 1", results.GetTestPartResult(0).message()); - EXPECT_STREQ("Failure 2", results.GetTestPartResult(1).message()); -} - -typedef TestPartResultArrayTest TestPartResultArrayDeathTest; - -// Tests that the program dies when GetTestPartResult() is called with -// an invalid index. -TEST_F(TestPartResultArrayDeathTest, DiesWhenIndexIsOutOfBound) { - TestPartResultArray results; - results.Append(r1_); - - EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(-1), ""); - EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(1), ""); -} - -// TODO(mheule@google.com): Add a test for the class HasNewFatalFailureHelper. - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-tuple_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-tuple_test.cc deleted file mode 100644 index 3829118e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-tuple_test.cc +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include -#include - -namespace { - -using ::std::tr1::get; -using ::std::tr1::make_tuple; -using ::std::tr1::tuple; -using ::std::tr1::tuple_element; -using ::std::tr1::tuple_size; -using ::testing::StaticAssertTypeEq; - -// Tests that tuple_element >::type returns TK. -TEST(tuple_element_Test, ReturnsElementType) { - StaticAssertTypeEq >::type>(); - StaticAssertTypeEq >::type>(); - StaticAssertTypeEq >::type>(); -} - -// Tests that tuple_size::value gives the number of fields in tuple -// type T. -TEST(tuple_size_Test, ReturnsNumberOfFields) { - EXPECT_EQ(0, +tuple_size >::value); - EXPECT_EQ(1, +tuple_size >::value); - EXPECT_EQ(1, +tuple_size >::value); - EXPECT_EQ(1, +(tuple_size > >::value)); - EXPECT_EQ(2, +(tuple_size >::value)); - EXPECT_EQ(3, +(tuple_size >::value)); -} - -// Tests comparing a tuple with itself. -TEST(ComparisonTest, ComparesWithSelf) { - const tuple a(5, 'a', false); - - EXPECT_TRUE(a == a); - EXPECT_FALSE(a != a); -} - -// Tests comparing two tuples with the same value. -TEST(ComparisonTest, ComparesEqualTuples) { - const tuple a(5, true), b(5, true); - - EXPECT_TRUE(a == b); - EXPECT_FALSE(a != b); -} - -// Tests comparing two different tuples that have no reference fields. -TEST(ComparisonTest, ComparesUnequalTuplesWithoutReferenceFields) { - typedef tuple FooTuple; - - const FooTuple a(0, 'x'); - const FooTuple b(1, 'a'); - - EXPECT_TRUE(a != b); - EXPECT_FALSE(a == b); - - const FooTuple c(1, 'b'); - - EXPECT_TRUE(b != c); - EXPECT_FALSE(b == c); -} - -// Tests comparing two different tuples that have reference fields. -TEST(ComparisonTest, ComparesUnequalTuplesWithReferenceFields) { - typedef tuple FooTuple; - - int i = 5; - const char ch = 'a'; - const FooTuple a(i, ch); - - int j = 6; - const FooTuple b(j, ch); - - EXPECT_TRUE(a != b); - EXPECT_FALSE(a == b); - - j = 5; - const char ch2 = 'b'; - const FooTuple c(j, ch2); - - EXPECT_TRUE(b != c); - EXPECT_FALSE(b == c); -} - -// Tests that a tuple field with a reference type is an alias of the -// variable it's supposed to reference. -TEST(ReferenceFieldTest, IsAliasOfReferencedVariable) { - int n = 0; - tuple t(true, n); - - n = 1; - EXPECT_EQ(n, get<1>(t)) - << "Changing a underlying variable should update the reference field."; - - // Makes sure that the implementation doesn't do anything funny with - // the & operator for the return type of get<>(). - EXPECT_EQ(&n, &(get<1>(t))) - << "The address of a reference field should equal the address of " - << "the underlying variable."; - - get<1>(t) = 2; - EXPECT_EQ(2, n) - << "Changing a reference field should update the underlying variable."; -} - -// Tests tuple's default constructor. -TEST(TupleConstructorTest, DefaultConstructor) { - // We are just testing that the following compiles. - tuple<> empty; - tuple one_field; - tuple three_fields; -} - -// Tests constructing a tuple from its fields. -TEST(TupleConstructorTest, ConstructsFromFields) { - int n = 1; - // Reference field. - tuple a(n); - EXPECT_EQ(&n, &(get<0>(a))); - - // Non-reference fields. - tuple b(5, 'a'); - EXPECT_EQ(5, get<0>(b)); - EXPECT_EQ('a', get<1>(b)); - - // Const reference field. - const int m = 2; - tuple c(true, m); - EXPECT_TRUE(get<0>(c)); - EXPECT_EQ(&m, &(get<1>(c))); -} - -// Tests tuple's copy constructor. -TEST(TupleConstructorTest, CopyConstructor) { - tuple a(0.0, true); - tuple b(a); - - EXPECT_DOUBLE_EQ(0.0, get<0>(b)); - EXPECT_TRUE(get<1>(b)); -} - -// Tests constructing a tuple from another tuple that has a compatible -// but different type. -TEST(TupleConstructorTest, ConstructsFromDifferentTupleType) { - tuple a(0, 1, 'a'); - tuple b(a); - - EXPECT_DOUBLE_EQ(0.0, get<0>(b)); - EXPECT_EQ(1, get<1>(b)); - EXPECT_EQ('a', get<2>(b)); -} - -// Tests constructing a 2-tuple from an std::pair. -TEST(TupleConstructorTest, ConstructsFromPair) { - ::std::pair a(1, 'a'); - tuple b(a); - tuple c(a); -} - -// Tests assigning a tuple to another tuple with the same type. -TEST(TupleAssignmentTest, AssignsToSameTupleType) { - const tuple a(5, 7L); - tuple b; - b = a; - EXPECT_EQ(5, get<0>(b)); - EXPECT_EQ(7L, get<1>(b)); -} - -// Tests assigning a tuple to another tuple with a different but -// compatible type. -TEST(TupleAssignmentTest, AssignsToDifferentTupleType) { - const tuple a(1, 7L, true); - tuple b; - b = a; - EXPECT_EQ(1L, get<0>(b)); - EXPECT_EQ(7, get<1>(b)); - EXPECT_TRUE(get<2>(b)); -} - -// Tests assigning an std::pair to a 2-tuple. -TEST(TupleAssignmentTest, AssignsFromPair) { - const ::std::pair a(5, true); - tuple b; - b = a; - EXPECT_EQ(5, get<0>(b)); - EXPECT_TRUE(get<1>(b)); - - tuple c; - c = a; - EXPECT_EQ(5L, get<0>(c)); - EXPECT_TRUE(get<1>(c)); -} - -// A fixture for testing big tuples. -class BigTupleTest : public testing::Test { - protected: - typedef tuple BigTuple; - - BigTupleTest() : - a_(1, 0, 0, 0, 0, 0, 0, 0, 0, 2), - b_(1, 0, 0, 0, 0, 0, 0, 0, 0, 3) {} - - BigTuple a_, b_; -}; - -// Tests constructing big tuples. -TEST_F(BigTupleTest, Construction) { - BigTuple a; - BigTuple b(b_); -} - -// Tests that get(t) returns the N-th (0-based) field of tuple t. -TEST_F(BigTupleTest, get) { - EXPECT_EQ(1, get<0>(a_)); - EXPECT_EQ(2, get<9>(a_)); - - // Tests that get() works on a const tuple too. - const BigTuple a(a_); - EXPECT_EQ(1, get<0>(a)); - EXPECT_EQ(2, get<9>(a)); -} - -// Tests comparing big tuples. -TEST_F(BigTupleTest, Comparisons) { - EXPECT_TRUE(a_ == a_); - EXPECT_FALSE(a_ != a_); - - EXPECT_TRUE(a_ != b_); - EXPECT_FALSE(a_ == b_); -} - -TEST(MakeTupleTest, WorksForScalarTypes) { - tuple a; - a = make_tuple(true, 5); - EXPECT_TRUE(get<0>(a)); - EXPECT_EQ(5, get<1>(a)); - - tuple b; - b = make_tuple('a', 'b', 5); - EXPECT_EQ('a', get<0>(b)); - EXPECT_EQ('b', get<1>(b)); - EXPECT_EQ(5, get<2>(b)); -} - -TEST(MakeTupleTest, WorksForPointers) { - int a[] = { 1, 2, 3, 4 }; - const char* const str = "hi"; - int* const p = a; - - tuple t; - t = make_tuple(str, p); - EXPECT_EQ(str, get<0>(t)); - EXPECT_EQ(p, get<1>(t)); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test2_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test2_test.cc deleted file mode 100644 index 79a8a87d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test2_test.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -#include "test/gtest-typed-test_test.h" -#include - -#if GTEST_HAS_TYPED_TEST_P - -// Tests that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// (ContainerTest is also instantiated in gtest-typed-test_test.cc.) -INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest, - testing::Types >); - -#endif // GTEST_HAS_TYPED_TEST_P diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.cc deleted file mode 100644 index 4b6e971c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.cc +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -#include "test/gtest-typed-test_test.h" -#include - -using testing::Test; - -// Used for testing that SetUpTestCase()/TearDownTestCase(), fixture -// ctor/dtor, and SetUp()/TearDown() work correctly in typed tests and -// type-parameterized test. -template -class CommonTest : public Test { - // For some technical reason, SetUpTestCase() and TearDownTestCase() - // must be public. - public: - static void SetUpTestCase() { - shared_ = new T(5); - } - - static void TearDownTestCase() { - delete shared_; - shared_ = NULL; - } - - // This 'protected:' is optional. There's no harm in making all - // members of this fixture class template public. - protected: - // We used to use std::list here, but switched to std::vector since - // MSVC's doesn't compile cleanly with /W4. - typedef std::vector Vector; - typedef std::set IntSet; - - CommonTest() : value_(1) {} - - virtual ~CommonTest() { EXPECT_EQ(3, value_); } - - virtual void SetUp() { - EXPECT_EQ(1, value_); - value_++; - } - - virtual void TearDown() { - EXPECT_EQ(2, value_); - value_++; - } - - T value_; - static T* shared_; -}; - -template -T* CommonTest::shared_ = NULL; - -// This #ifdef block tests typed tests. -#if GTEST_HAS_TYPED_TEST - -using testing::Types; - -// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor, -// and SetUp()/TearDown() work correctly in typed tests - -typedef Types TwoTypes; -TYPED_TEST_CASE(CommonTest, TwoTypes); - -TYPED_TEST(CommonTest, ValuesAreCorrect) { - // Static members of the fixture class template can be visited via - // the TestFixture:: prefix. - EXPECT_EQ(5, *TestFixture::shared_); - - // Typedefs in the fixture class template can be visited via the - // "typename TestFixture::" prefix. - typename TestFixture::Vector empty; - EXPECT_EQ(0U, empty.size()); - - typename TestFixture::IntSet empty2; - EXPECT_EQ(0U, empty2.size()); - - // Non-static members of the fixture class must be visited via - // 'this', as required by C++ for class templates. - EXPECT_EQ(2, this->value_); -} - -// The second test makes sure shared_ is not deleted after the first -// test. -TYPED_TEST(CommonTest, ValuesAreStillCorrect) { - // Static members of the fixture class template can also be visited - // via 'this'. - ASSERT_TRUE(this->shared_ != NULL); - EXPECT_EQ(5, *this->shared_); - - // TypeParam can be used to refer to the type parameter. - EXPECT_EQ(static_cast(2), this->value_); -} - -// Tests that multiple TYPED_TEST_CASE's can be defined in the same -// translation unit. - -template -class TypedTest1 : public Test { -}; - -// Verifies that the second argument of TYPED_TEST_CASE can be a -// single type. -TYPED_TEST_CASE(TypedTest1, int); -TYPED_TEST(TypedTest1, A) {} - -template -class TypedTest2 : public Test { -}; - -// Verifies that the second argument of TYPED_TEST_CASE can be a -// Types<...> type list. -TYPED_TEST_CASE(TypedTest2, Types); - -// This also verifies that tests from different typed test cases can -// share the same name. -TYPED_TEST(TypedTest2, A) {} - -// Tests that a typed test case can be defined in a namespace. - -namespace library1 { - -template -class NumericTest : public Test { -}; - -typedef Types NumericTypes; -TYPED_TEST_CASE(NumericTest, NumericTypes); - -TYPED_TEST(NumericTest, DefaultIsZero) { - EXPECT_EQ(0, TypeParam()); -} - -} // namespace library1 - -#endif // GTEST_HAS_TYPED_TEST - -// This #ifdef block tests type-parameterized tests. -#if GTEST_HAS_TYPED_TEST_P - -using testing::Types; -using testing::internal::TypedTestCasePState; - -// Tests TypedTestCasePState. - -class TypedTestCasePStateTest : public Test { - protected: - virtual void SetUp() { - state_.AddTestName("foo.cc", 0, "FooTest", "A"); - state_.AddTestName("foo.cc", 0, "FooTest", "B"); - state_.AddTestName("foo.cc", 0, "FooTest", "C"); - } - - TypedTestCasePState state_; -}; - -TEST_F(TypedTestCasePStateTest, SucceedsForMatchingList) { - const char* tests = "A, B, C"; - EXPECT_EQ(tests, - state_.VerifyRegisteredTestNames("foo.cc", 1, tests)); -} - -// Makes sure that the order of the tests and spaces around the names -// don't matter. -TEST_F(TypedTestCasePStateTest, IgnoresOrderAndSpaces) { - const char* tests = "A,C, B"; - EXPECT_EQ(tests, - state_.VerifyRegisteredTestNames("foo.cc", 1, tests)); -} - -typedef TypedTestCasePStateTest TypedTestCasePStateDeathTest; - -TEST_F(TypedTestCasePStateDeathTest, DetectsDuplicates) { - EXPECT_DEATH_IF_SUPPORTED( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, A, C"), - "foo\\.cc.1.?: Test A is listed more than once\\."); -} - -TEST_F(TypedTestCasePStateDeathTest, DetectsExtraTest) { - EXPECT_DEATH_IF_SUPPORTED( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C, D"), - "foo\\.cc.1.?: No test named D can be found in this test case\\."); -} - -TEST_F(TypedTestCasePStateDeathTest, DetectsMissedTest) { - EXPECT_DEATH_IF_SUPPORTED( - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, C"), - "foo\\.cc.1.?: You forgot to list test B\\."); -} - -// Tests that defining a test for a parameterized test case generates -// a run-time error if the test case has been registered. -TEST_F(TypedTestCasePStateDeathTest, DetectsTestAfterRegistration) { - state_.VerifyRegisteredTestNames("foo.cc", 1, "A, B, C"); - EXPECT_DEATH_IF_SUPPORTED( - state_.AddTestName("foo.cc", 2, "FooTest", "D"), - "foo\\.cc.2.?: Test D must be defined before REGISTER_TYPED_TEST_CASE_P" - "\\(FooTest, \\.\\.\\.\\)\\."); -} - -// Tests that SetUpTestCase()/TearDownTestCase(), fixture ctor/dtor, -// and SetUp()/TearDown() work correctly in type-parameterized tests. - -template -class DerivedTest : public CommonTest { -}; - -TYPED_TEST_CASE_P(DerivedTest); - -TYPED_TEST_P(DerivedTest, ValuesAreCorrect) { - // Static members of the fixture class template can be visited via - // the TestFixture:: prefix. - EXPECT_EQ(5, *TestFixture::shared_); - - // Non-static members of the fixture class must be visited via - // 'this', as required by C++ for class templates. - EXPECT_EQ(2, this->value_); -} - -// The second test makes sure shared_ is not deleted after the first -// test. -TYPED_TEST_P(DerivedTest, ValuesAreStillCorrect) { - // Static members of the fixture class template can also be visited - // via 'this'. - ASSERT_TRUE(this->shared_ != NULL); - EXPECT_EQ(5, *this->shared_); - EXPECT_EQ(2, this->value_); -} - -REGISTER_TYPED_TEST_CASE_P(DerivedTest, - ValuesAreCorrect, ValuesAreStillCorrect); - -typedef Types MyTwoTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, DerivedTest, MyTwoTypes); - -// Tests that multiple TYPED_TEST_CASE_P's can be defined in the same -// translation unit. - -template -class TypedTestP1 : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP1); - -// For testing that the code between TYPED_TEST_CASE_P() and -// TYPED_TEST_P() is not enclosed in a namespace. -typedef int IntAfterTypedTestCaseP; - -TYPED_TEST_P(TypedTestP1, A) {} -TYPED_TEST_P(TypedTestP1, B) {} - -// For testing that the code between TYPED_TEST_P() and -// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace. -typedef int IntBeforeRegisterTypedTestCaseP; - -REGISTER_TYPED_TEST_CASE_P(TypedTestP1, A, B); - -template -class TypedTestP2 : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP2); - -// This also verifies that tests from different type-parameterized -// test cases can share the same name. -TYPED_TEST_P(TypedTestP2, A) {} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP2, A); - -// Verifies that the code between TYPED_TEST_CASE_P() and -// REGISTER_TYPED_TEST_CASE_P() is not enclosed in a namespace. -IntAfterTypedTestCaseP after = 0; -IntBeforeRegisterTypedTestCaseP before = 0; - -// Verifies that the last argument of INSTANTIATE_TYPED_TEST_CASE_P() -// can be either a single type or a Types<...> type list. -INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP1, int); -INSTANTIATE_TYPED_TEST_CASE_P(Int, TypedTestP2, Types); - -// Tests that the same type-parameterized test case can be -// instantiated more than once in the same translation unit. -INSTANTIATE_TYPED_TEST_CASE_P(Double, TypedTestP2, Types); - -// Tests that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// (ContainerTest is also instantiated in gtest-typed-test_test.cc.) -typedef Types, std::set > MyContainers; -INSTANTIATE_TYPED_TEST_CASE_P(My, ContainerTest, MyContainers); - -// Tests that a type-parameterized test case can be defined and -// instantiated in a namespace. - -namespace library2 { - -template -class NumericTest : public Test { -}; - -TYPED_TEST_CASE_P(NumericTest); - -TYPED_TEST_P(NumericTest, DefaultIsZero) { - EXPECT_EQ(0, TypeParam()); -} - -TYPED_TEST_P(NumericTest, ZeroIsLessThanOne) { - EXPECT_LT(TypeParam(0), TypeParam(1)); -} - -REGISTER_TYPED_TEST_CASE_P(NumericTest, - DefaultIsZero, ZeroIsLessThanOne); -typedef Types NumericTypes; -INSTANTIATE_TYPED_TEST_CASE_P(My, NumericTest, NumericTypes); - -} // namespace library2 - -#endif // GTEST_HAS_TYPED_TEST_P - -#if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P) - -// Google Test doesn't support type-parameterized tests on some platforms -// and compilers, such as MSVC 7.1. If we use conditional compilation to -// compile out all code referring to the gtest_main library, MSVC linker -// will not link that library at all and consequently complain about -// missing entry point defined in that library (fatal error LNK1561: -// entry point must be defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, TypedTestsAreNotSupportedOnThisPlatform) {} - -#endif // #if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.h deleted file mode 100644 index 40dfeac6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-typed-test_test.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ -#define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ - -#include - -#if GTEST_HAS_TYPED_TEST_P - -using testing::Test; - -// For testing that the same type-parameterized test case can be -// instantiated in different translation units linked together. -// ContainerTest will be instantiated in both gtest-typed-test_test.cc -// and gtest-typed-test2_test.cc. - -template -class ContainerTest : public Test { -}; - -TYPED_TEST_CASE_P(ContainerTest); - -TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) { - TypeParam container; -} - -TYPED_TEST_P(ContainerTest, InitialSizeIsZero) { - TypeParam container; - EXPECT_EQ(0U, container.size()); -} - -REGISTER_TYPED_TEST_CASE_P(ContainerTest, - CanBeDefaultConstructed, InitialSizeIsZero); - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-unittest-api_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-unittest-api_test.cc deleted file mode 100644 index 7e0f8f80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest-unittest-api_test.cc +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright 2009 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) -// -// The Google C++ Testing Framework (Google Test) -// -// This file contains tests verifying correctness of data provided via -// UnitTest's public methods. - -#include - -#include // For strcmp. -#include - -using ::testing::InitGoogleTest; - -namespace testing { -namespace internal { - -template -struct LessByName { - bool operator()(const T* a, const T* b) { - return strcmp(a->name(), b->name()) < 0; - } -}; - -class UnitTestHelper { - public: - // Returns the array of pointers to all test cases sorted by the test case - // name. The caller is responsible for deleting the array. - static TestCase const** const GetSortedTestCases() { - UnitTest& unit_test = *UnitTest::GetInstance(); - TestCase const** const test_cases = - new const TestCase*[unit_test.total_test_case_count()]; - - for (int i = 0; i < unit_test.total_test_case_count(); ++i) - test_cases[i] = unit_test.GetTestCase(i); - - std::sort(test_cases, - test_cases + unit_test.total_test_case_count(), - LessByName()); - return test_cases; - } - - // Returns the test case by its name. The caller doesn't own the returned - // pointer. - static const TestCase* FindTestCase(const char* name) { - UnitTest& unit_test = *UnitTest::GetInstance(); - for (int i = 0; i < unit_test.total_test_case_count(); ++i) { - const TestCase* test_case = unit_test.GetTestCase(i); - if (0 == strcmp(test_case->name(), name)) - return test_case; - } - return NULL; - } - - // Returns the array of pointers to all tests in a particular test case - // sorted by the test name. The caller is responsible for deleting the - // array. - static TestInfo const** const GetSortedTests(const TestCase* test_case) { - TestInfo const** const tests = - new const TestInfo*[test_case->total_test_count()]; - - for (int i = 0; i < test_case->total_test_count(); ++i) - tests[i] = test_case->GetTestInfo(i); - - std::sort(tests, tests + test_case->total_test_count(), - LessByName()); - return tests; - } -}; - -#if GTEST_HAS_TYPED_TEST -template class TestCaseWithCommentTest : public Test {}; -TYPED_TEST_CASE(TestCaseWithCommentTest, Types); -TYPED_TEST(TestCaseWithCommentTest, Dummy) {} - -const int kTypedTestCases = 1; -const int kTypedTests = 1; - -String GetExpectedTestCaseComment() { - Message comment; - comment << "TypeParam = " << GetTypeName().c_str(); - return comment.GetString(); -} -#else -const int kTypedTestCases = 0; -const int kTypedTests = 0; -#endif // GTEST_HAS_TYPED_TEST - -// We can only test the accessors that do not change value while tests run. -// Since tests can be run in any order, the values the accessors that track -// test execution (such as failed_test_count) can not be predicted. -TEST(ApiTest, UnitTestImmutableAccessorsWork) { - UnitTest* unit_test = UnitTest::GetInstance(); - - ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count()); - EXPECT_EQ(1 + kTypedTestCases, unit_test->test_case_to_run_count()); - EXPECT_EQ(2, unit_test->disabled_test_count()); - EXPECT_EQ(5 + kTypedTests, unit_test->total_test_count()); - EXPECT_EQ(3 + kTypedTests, unit_test->test_to_run_count()); - - const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases(); - - EXPECT_STREQ("ApiTest", test_cases[0]->name()); - EXPECT_STREQ("DISABLED_Test", test_cases[1]->name()); -#if GTEST_HAS_TYPED_TEST - EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name()); -#endif // GTEST_HAS_TYPED_TEST - - delete[] test_cases; - - // The following lines initiate actions to verify certain methods in - // FinalSuccessChecker::TearDown. - - // Records a test property to verify TestResult::GetTestProperty(). - RecordProperty("key", "value"); -} - -TEST(ApiTest, TestCaseImmutableAccessorsWork) { - const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest"); - ASSERT_TRUE(test_case != NULL); - - EXPECT_STREQ("ApiTest", test_case->name()); - EXPECT_STREQ("", test_case->comment()); - EXPECT_TRUE(test_case->should_run()); - EXPECT_EQ(1, test_case->disabled_test_count()); - EXPECT_EQ(3, test_case->test_to_run_count()); - ASSERT_EQ(4, test_case->total_test_count()); - - const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case); - - EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name()); - EXPECT_STREQ("ApiTest", tests[0]->test_case_name()); - EXPECT_STREQ("", tests[0]->comment()); - EXPECT_STREQ("", tests[0]->test_case_comment()); - EXPECT_FALSE(tests[0]->should_run()); - - EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name()); - EXPECT_STREQ("ApiTest", tests[1]->test_case_name()); - EXPECT_STREQ("", tests[1]->comment()); - EXPECT_STREQ("", tests[1]->test_case_comment()); - EXPECT_TRUE(tests[1]->should_run()); - - EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name()); - EXPECT_STREQ("ApiTest", tests[2]->test_case_name()); - EXPECT_STREQ("", tests[2]->comment()); - EXPECT_STREQ("", tests[2]->test_case_comment()); - EXPECT_TRUE(tests[2]->should_run()); - - EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name()); - EXPECT_STREQ("ApiTest", tests[3]->test_case_name()); - EXPECT_STREQ("", tests[3]->comment()); - EXPECT_STREQ("", tests[3]->test_case_comment()); - EXPECT_TRUE(tests[3]->should_run()); - - delete[] tests; - tests = NULL; - -#if GTEST_HAS_TYPED_TEST - test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0"); - ASSERT_TRUE(test_case != NULL); - - EXPECT_STREQ("TestCaseWithCommentTest/0", test_case->name()); - EXPECT_STREQ(GetExpectedTestCaseComment().c_str(), test_case->comment()); - EXPECT_TRUE(test_case->should_run()); - EXPECT_EQ(0, test_case->disabled_test_count()); - EXPECT_EQ(1, test_case->test_to_run_count()); - ASSERT_EQ(1, test_case->total_test_count()); - - tests = UnitTestHelper::GetSortedTests(test_case); - - EXPECT_STREQ("Dummy", tests[0]->name()); - EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name()); - EXPECT_STREQ("", tests[0]->comment()); - EXPECT_STREQ(GetExpectedTestCaseComment().c_str(), - tests[0]->test_case_comment()); - EXPECT_TRUE(tests[0]->should_run()); - - delete[] tests; -#endif // GTEST_HAS_TYPED_TEST -} - -TEST(ApiTest, TestCaseDisabledAccessorsWork) { - const TestCase* test_case = UnitTestHelper::FindTestCase("DISABLED_Test"); - ASSERT_TRUE(test_case != NULL); - - EXPECT_STREQ("DISABLED_Test", test_case->name()); - EXPECT_STREQ("", test_case->comment()); - EXPECT_FALSE(test_case->should_run()); - EXPECT_EQ(1, test_case->disabled_test_count()); - EXPECT_EQ(0, test_case->test_to_run_count()); - ASSERT_EQ(1, test_case->total_test_count()); - - const TestInfo* const test_info = test_case->GetTestInfo(0); - EXPECT_STREQ("Dummy2", test_info->name()); - EXPECT_STREQ("DISABLED_Test", test_info->test_case_name()); - EXPECT_STREQ("", test_info->comment()); - EXPECT_STREQ("", test_info->test_case_comment()); - EXPECT_FALSE(test_info->should_run()); -} - -// These two tests are here to provide support for testing -// test_case_to_run_count, disabled_test_count, and test_to_run_count. -TEST(ApiTest, DISABLED_Dummy1) {} -TEST(DISABLED_Test, Dummy2) {} - -class FinalSuccessChecker : public Environment { - protected: - virtual void TearDown() { - UnitTest* unit_test = UnitTest::GetInstance(); - - EXPECT_EQ(1 + kTypedTestCases, unit_test->successful_test_case_count()); - EXPECT_EQ(3 + kTypedTests, unit_test->successful_test_count()); - EXPECT_EQ(0, unit_test->failed_test_case_count()); - EXPECT_EQ(0, unit_test->failed_test_count()); - EXPECT_TRUE(unit_test->Passed()); - EXPECT_FALSE(unit_test->Failed()); - ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count()); - - const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases(); - - EXPECT_STREQ("ApiTest", test_cases[0]->name()); - EXPECT_STREQ("", test_cases[0]->comment()); - EXPECT_TRUE(test_cases[0]->should_run()); - EXPECT_EQ(1, test_cases[0]->disabled_test_count()); - ASSERT_EQ(4, test_cases[0]->total_test_count()); - EXPECT_EQ(3, test_cases[0]->successful_test_count()); - EXPECT_EQ(0, test_cases[0]->failed_test_count()); - EXPECT_TRUE(test_cases[0]->Passed()); - EXPECT_FALSE(test_cases[0]->Failed()); - - EXPECT_STREQ("DISABLED_Test", test_cases[1]->name()); - EXPECT_STREQ("", test_cases[1]->comment()); - EXPECT_FALSE(test_cases[1]->should_run()); - EXPECT_EQ(1, test_cases[1]->disabled_test_count()); - ASSERT_EQ(1, test_cases[1]->total_test_count()); - EXPECT_EQ(0, test_cases[1]->successful_test_count()); - EXPECT_EQ(0, test_cases[1]->failed_test_count()); - -#if GTEST_HAS_TYPED_TEST - EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name()); - EXPECT_STREQ(GetExpectedTestCaseComment().c_str(), - test_cases[2]->comment()); - EXPECT_TRUE(test_cases[2]->should_run()); - EXPECT_EQ(0, test_cases[2]->disabled_test_count()); - ASSERT_EQ(1, test_cases[2]->total_test_count()); - EXPECT_EQ(1, test_cases[2]->successful_test_count()); - EXPECT_EQ(0, test_cases[2]->failed_test_count()); - EXPECT_TRUE(test_cases[2]->Passed()); - EXPECT_FALSE(test_cases[2]->Failed()); -#endif // GTEST_HAS_TYPED_TEST - - const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest"); - const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case); - EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name()); - EXPECT_STREQ("ApiTest", tests[0]->test_case_name()); - EXPECT_FALSE(tests[0]->should_run()); - - EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name()); - EXPECT_STREQ("ApiTest", tests[1]->test_case_name()); - EXPECT_STREQ("", tests[1]->comment()); - EXPECT_STREQ("", tests[1]->test_case_comment()); - EXPECT_TRUE(tests[1]->should_run()); - EXPECT_TRUE(tests[1]->result()->Passed()); - EXPECT_EQ(0, tests[1]->result()->test_property_count()); - - EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name()); - EXPECT_STREQ("ApiTest", tests[2]->test_case_name()); - EXPECT_STREQ("", tests[2]->comment()); - EXPECT_STREQ("", tests[2]->test_case_comment()); - EXPECT_TRUE(tests[2]->should_run()); - EXPECT_TRUE(tests[2]->result()->Passed()); - EXPECT_EQ(0, tests[2]->result()->test_property_count()); - - EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name()); - EXPECT_STREQ("ApiTest", tests[3]->test_case_name()); - EXPECT_STREQ("", tests[3]->comment()); - EXPECT_STREQ("", tests[3]->test_case_comment()); - EXPECT_TRUE(tests[3]->should_run()); - EXPECT_TRUE(tests[3]->result()->Passed()); - EXPECT_EQ(1, tests[3]->result()->test_property_count()); - const TestProperty& property = tests[3]->result()->GetTestProperty(0); - EXPECT_STREQ("key", property.key()); - EXPECT_STREQ("value", property.value()); - - delete[] tests; - -#if GTEST_HAS_TYPED_TEST - test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0"); - tests = UnitTestHelper::GetSortedTests(test_case); - - EXPECT_STREQ("Dummy", tests[0]->name()); - EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name()); - EXPECT_STREQ("", tests[0]->comment()); - EXPECT_STREQ(GetExpectedTestCaseComment().c_str(), - tests[0]->test_case_comment()); - EXPECT_TRUE(tests[0]->should_run()); - EXPECT_TRUE(tests[0]->result()->Passed()); - EXPECT_EQ(0, tests[0]->result()->test_property_count()); - - delete[] tests; -#endif // GTEST_HAS_TYPED_TEST - delete[] test_cases; - } -}; - -} // namespace internal -} // namespace testing - -int main(int argc, char **argv) { - InitGoogleTest(&argc, argv); - - AddGlobalTestEnvironment(new testing::internal::FinalSuccessChecker()); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_all_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_all_test.cc deleted file mode 100644 index 955aa628..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_all_test.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for Google C++ Testing Framework (Google Test) -// -// Sometimes it's desirable to build most of Google Test's own tests -// by compiling a single file. This file serves this purpose. -#include "test/gtest-filepath_test.cc" -#include "test/gtest-linked_ptr_test.cc" -#include "test/gtest-message_test.cc" -#include "test/gtest-options_test.cc" -#include "test/gtest-port_test.cc" -#include "test/gtest_pred_impl_unittest.cc" -#include "test/gtest_prod_test.cc" -#include "test/gtest-test-part_test.cc" -#include "test/gtest-typed-test_test.cc" -#include "test/gtest-typed-test2_test.cc" -#include "test/gtest_unittest.cc" -#include "test/production.cc" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest.py deleted file mode 100755 index 218d3713..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test's break-on-failure mode. - -A user can ask Google Test to seg-fault when an assertion fails, using -either the GTEST_BREAK_ON_FAILURE environment variable or the ---gtest_break_on_failure flag. This script tests such functionality -by invoking gtest_break_on_failure_unittest_ (a program written with -Google Test) with different environments and command line flags. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gtest_test_utils -import os -import sys - - -# Constants. - -IS_WINDOWS = os.name == 'nt' - -# The environment variable for enabling/disabling the break-on-failure mode. -BREAK_ON_FAILURE_ENV_VAR = 'GTEST_BREAK_ON_FAILURE' - -# The command line flag for enabling/disabling the break-on-failure mode. -BREAK_ON_FAILURE_FLAG = 'gtest_break_on_failure' - -# The environment variable for enabling/disabling the throw-on-failure mode. -THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE' - -# The environment variable for enabling/disabling the catch-exceptions mode. -CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS' - -# Path to the gtest_break_on_failure_unittest_ program. -EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_break_on_failure_unittest_') - - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets an environment variable to a given value; unsets it when the - given value is None. - """ - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def Run(command): - """Runs a command; returns 1 if it was killed by a signal, or 0 otherwise.""" - - p = gtest_test_utils.Subprocess(command) - if p.terminated_by_signal: - return 1 - else: - return 0 - - -# The tests. - - -class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase): - """Tests using the GTEST_BREAK_ON_FAILURE environment variable or - the --gtest_break_on_failure flag to turn assertion failures into - segmentation faults. - """ - - def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault): - """Runs gtest_break_on_failure_unittest_ and verifies that it does - (or does not) have a seg-fault. - - Args: - env_var_value: value of the GTEST_BREAK_ON_FAILURE environment - variable; None if the variable should be unset. - flag_value: value of the --gtest_break_on_failure flag; - None if the flag should not be present. - expect_seg_fault: 1 if the program is expected to generate a seg-fault; - 0 otherwise. - """ - - SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value) - - if env_var_value is None: - env_var_value_msg = ' is not set' - else: - env_var_value_msg = '=' + env_var_value - - if flag_value is None: - flag = '' - elif flag_value == '0': - flag = '--%s=0' % BREAK_ON_FAILURE_FLAG - else: - flag = '--%s' % BREAK_ON_FAILURE_FLAG - - command = [EXE_PATH] - if flag: - command.append(flag) - - if expect_seg_fault: - should_or_not = 'should' - else: - should_or_not = 'should not' - - has_seg_fault = Run(command) - - SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None) - - msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' % - (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command), - should_or_not)) - self.assert_(has_seg_fault == expect_seg_fault, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(env_var_value=None, - flag_value=None, - expect_seg_fault=0) - - def testEnvVar(self): - """Tests using the GTEST_BREAK_ON_FAILURE environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value=None, - expect_seg_fault=0) - self.RunAndVerify(env_var_value='1', - flag_value=None, - expect_seg_fault=1) - - def testFlag(self): - """Tests using the --gtest_break_on_failure flag.""" - - self.RunAndVerify(env_var_value=None, - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value=None, - flag_value='1', - expect_seg_fault=1) - - def testFlagOverridesEnvVar(self): - """Tests that the flag overrides the environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value='0', - flag_value='1', - expect_seg_fault=1) - self.RunAndVerify(env_var_value='1', - flag_value='0', - expect_seg_fault=0) - self.RunAndVerify(env_var_value='1', - flag_value='1', - expect_seg_fault=1) - - def testBreakOnFailureOverridesThrowOnFailure(self): - """Tests that gtest_break_on_failure overrides gtest_throw_on_failure.""" - - SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1') - try: - self.RunAndVerify(env_var_value=None, - flag_value='1', - expect_seg_fault=1) - finally: - SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None) - - if IS_WINDOWS: - def testCatchExceptionsDoesNotInterfere(self): - """Tests that gtest_catch_exceptions doesn't interfere.""" - - SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1') - try: - self.RunAndVerify(env_var_value='1', - flag_value='1', - expect_seg_fault=1) - finally: - SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest_.cc deleted file mode 100644 index 10a1203b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_break_on_failure_unittest_.cc +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Unit test for Google Test's break-on-failure mode. -// -// A user can ask Google Test to seg-fault when an assertion fails, using -// either the GTEST_BREAK_ON_FAILURE environment variable or the -// --gtest_break_on_failure flag. This file is used for testing such -// functionality. -// -// This program will be invoked from a Python unit test. It is -// expected to fail. Don't run it directly. - -#include - -#if GTEST_OS_WINDOWS -#include -#endif - -namespace { - -// A test that's expected to fail. -TEST(Foo, Bar) { - EXPECT_EQ(2, 3); -} - -} // namespace - -int main(int argc, char **argv) { -#if GTEST_OS_WINDOWS - // Suppresses display of the Windows error dialog upon encountering - // a general protection fault (segment violation). - SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS); -#endif - testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test.py deleted file mode 100755 index d02a53ed..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test.py +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test correctly determines whether to use colors.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -IS_WINDOWS = os.name = 'nt' - -COLOR_ENV_VAR = 'GTEST_COLOR' -COLOR_FLAG = 'gtest_color' -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_color_test_') - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def UsesColor(term, color_env_var, color_flag): - """Runs gtest_color_test_ and returns its exit code.""" - - SetEnvVar('TERM', term) - SetEnvVar(COLOR_ENV_VAR, color_env_var) - - if color_flag is None: - args = [] - else: - args = ['--%s=%s' % (COLOR_FLAG, color_flag)] - p = gtest_test_utils.Subprocess([COMMAND] + args) - return not p.exited or p.exit_code - - -class GTestColorTest(gtest_test_utils.TestCase): - def testNoEnvVarNoFlag(self): - """Tests the case when there's neither GTEST_COLOR nor --gtest_color.""" - - if not IS_WINDOWS: - self.assert_(not UsesColor('dumb', None, None)) - self.assert_(not UsesColor('emacs', None, None)) - self.assert_(not UsesColor('xterm-mono', None, None)) - self.assert_(not UsesColor('unknown', None, None)) - self.assert_(not UsesColor(None, None, None)) - self.assert_(UsesColor('linux', None, None)) - self.assert_(UsesColor('cygwin', None, None)) - self.assert_(UsesColor('xterm', None, None)) - self.assert_(UsesColor('xterm-color', None, None)) - self.assert_(UsesColor('xterm-256color', None, None)) - - def testFlagOnly(self): - """Tests the case when there's --gtest_color but not GTEST_COLOR.""" - - self.assert_(not UsesColor('dumb', None, 'no')) - self.assert_(not UsesColor('xterm-color', None, 'no')) - if not IS_WINDOWS: - self.assert_(not UsesColor('emacs', None, 'auto')) - self.assert_(UsesColor('xterm', None, 'auto')) - self.assert_(UsesColor('dumb', None, 'yes')) - self.assert_(UsesColor('xterm', None, 'yes')) - - def testEnvVarOnly(self): - """Tests the case when there's GTEST_COLOR but not --gtest_color.""" - - self.assert_(not UsesColor('dumb', 'no', None)) - self.assert_(not UsesColor('xterm-color', 'no', None)) - if not IS_WINDOWS: - self.assert_(not UsesColor('dumb', 'auto', None)) - self.assert_(UsesColor('xterm-color', 'auto', None)) - self.assert_(UsesColor('dumb', 'yes', None)) - self.assert_(UsesColor('xterm-color', 'yes', None)) - - def testEnvVarAndFlag(self): - """Tests the case when there are both GTEST_COLOR and --gtest_color.""" - - self.assert_(not UsesColor('xterm-color', 'no', 'no')) - self.assert_(UsesColor('dumb', 'no', 'yes')) - self.assert_(UsesColor('xterm-color', 'no', 'auto')) - - def testAliasesOfYesAndNo(self): - """Tests using aliases in specifying --gtest_color.""" - - self.assert_(UsesColor('dumb', None, 'true')) - self.assert_(UsesColor('dumb', None, 'YES')) - self.assert_(UsesColor('dumb', None, 'T')) - self.assert_(UsesColor('dumb', None, '1')) - - self.assert_(not UsesColor('xterm', None, 'f')) - self.assert_(not UsesColor('xterm', None, 'false')) - self.assert_(not UsesColor('xterm', None, '0')) - self.assert_(not UsesColor('xterm', None, 'unknown')) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test_.cc deleted file mode 100644 index 305aeb96..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_color_test_.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// A helper program for testing how Google Test determines whether to use -// colors in the output. It prints "YES" and returns 1 if Google Test -// decides to use colors, and prints "NO" and returns 0 otherwise. - -#include - -#include - -namespace testing { -namespace internal { -bool ShouldUseColor(bool stdout_is_tty); -} // namespace internal -} // namespace testing - -using testing::internal::ShouldUseColor; - -// The purpose of this is to ensure that the UnitTest singleton is -// created before main() is entered, and thus that ShouldUseColor() -// works the same way as in a real Google-Test-based test. We don't actual -// run the TEST itself. -TEST(GTestColorTest, Dummy) { -} - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - if (ShouldUseColor(true)) { - // Google Test decides to use colors in the output (assuming it - // goes to a TTY). - printf("YES\n"); - return 1; - } else { - // Google Test decides not to use colors in the output. - printf("NO\n"); - return 0; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test.py deleted file mode 100755 index f8250d4c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test correctly parses environment variables.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -IS_WINDOWS = os.name == 'nt' -IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' - -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_') - - -def AssertEq(expected, actual): - if expected != actual: - print 'Expected: %s' % (expected,) - print ' Actual: %s' % (actual,) - raise AssertionError - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def GetFlag(flag): - """Runs gtest_env_var_test_ and returns its output.""" - - args = [COMMAND] - if flag is not None: - args += [flag] - return gtest_test_utils.Subprocess(args).output - - -def TestFlag(flag, test_val, default_val): - """Verifies that the given flag is affected by the corresponding env var.""" - - env_var = 'GTEST_' + flag.upper() - SetEnvVar(env_var, test_val) - AssertEq(test_val, GetFlag(flag)) - SetEnvVar(env_var, None) - AssertEq(default_val, GetFlag(flag)) - - -class GTestEnvVarTest(gtest_test_utils.TestCase): - def testEnvVarAffectsFlag(self): - """Tests that environment variable should affect the corresponding flag.""" - - TestFlag('break_on_failure', '1', '0') - TestFlag('color', 'yes', 'auto') - TestFlag('filter', 'FooTest.Bar', '*') - TestFlag('output', 'xml:tmp/foo.xml', '') - TestFlag('print_time', '0', '1') - TestFlag('repeat', '999', '1') - TestFlag('throw_on_failure', '1', '0') - TestFlag('death_test_style', 'threadsafe', 'fast') - - if IS_WINDOWS: - TestFlag('catch_exceptions', '1', '0') - - if IS_LINUX: - TestFlag('death_test_use_fork', '1', '0') - TestFlag('stack_trace_depth', '0', '100') - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test_.cc deleted file mode 100644 index f7c78fcf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_env_var_test_.cc +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// A helper program for testing that Google Test parses the environment -// variables correctly. - -#include - -#include - -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -using ::std::cout; - -namespace testing { - -// The purpose of this is to make the test more realistic by ensuring -// that the UnitTest singleton is created before main() is entered. -// We don't actual run the TEST itself. -TEST(GTestEnvVarTest, Dummy) { -} - -void PrintFlag(const char* flag) { - if (strcmp(flag, "break_on_failure") == 0) { - cout << GTEST_FLAG(break_on_failure); - return; - } - - if (strcmp(flag, "catch_exceptions") == 0) { - cout << GTEST_FLAG(catch_exceptions); - return; - } - - if (strcmp(flag, "color") == 0) { - cout << GTEST_FLAG(color); - return; - } - - if (strcmp(flag, "death_test_style") == 0) { - cout << GTEST_FLAG(death_test_style); - return; - } - - if (strcmp(flag, "death_test_use_fork") == 0) { - cout << GTEST_FLAG(death_test_use_fork); - return; - } - - if (strcmp(flag, "filter") == 0) { - cout << GTEST_FLAG(filter); - return; - } - - if (strcmp(flag, "output") == 0) { - cout << GTEST_FLAG(output); - return; - } - - if (strcmp(flag, "print_time") == 0) { - cout << GTEST_FLAG(print_time); - return; - } - - if (strcmp(flag, "repeat") == 0) { - cout << GTEST_FLAG(repeat); - return; - } - - if (strcmp(flag, "stack_trace_depth") == 0) { - cout << GTEST_FLAG(stack_trace_depth); - return; - } - - if (strcmp(flag, "throw_on_failure") == 0) { - cout << GTEST_FLAG(throw_on_failure); - return; - } - - cout << "Invalid flag name " << flag - << ". Valid names are break_on_failure, color, filter, etc.\n"; - exit(1); -} - -} // namespace testing - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - if (argc != 2) { - cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n"; - return 1; - } - - testing::PrintFlag(argv[1]); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_environment_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_environment_test.cc deleted file mode 100644 index c9392614..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_environment_test.cc +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests using global test environments. - -#include -#include -#include - -namespace testing { -GTEST_DECLARE_string_(filter); -} - -namespace { - -enum FailureType { - NO_FAILURE, NON_FATAL_FAILURE, FATAL_FAILURE -}; - -// For testing using global test environments. -class MyEnvironment : public testing::Environment { - public: - MyEnvironment() { Reset(); } - - // Depending on the value of failure_in_set_up_, SetUp() will - // generate a non-fatal failure, generate a fatal failure, or - // succeed. - virtual void SetUp() { - set_up_was_run_ = true; - - switch (failure_in_set_up_) { - case NON_FATAL_FAILURE: - ADD_FAILURE() << "Expected non-fatal failure in global set-up."; - break; - case FATAL_FAILURE: - FAIL() << "Expected fatal failure in global set-up."; - break; - default: - break; - } - } - - // Generates a non-fatal failure. - virtual void TearDown() { - tear_down_was_run_ = true; - ADD_FAILURE() << "Expected non-fatal failure in global tear-down."; - } - - // Resets the state of the environment s.t. it can be reused. - void Reset() { - failure_in_set_up_ = NO_FAILURE; - set_up_was_run_ = false; - tear_down_was_run_ = false; - } - - // We call this function to set the type of failure SetUp() should - // generate. - void set_failure_in_set_up(FailureType type) { - failure_in_set_up_ = type; - } - - // Was SetUp() run? - bool set_up_was_run() const { return set_up_was_run_; } - - // Was TearDown() run? - bool tear_down_was_run() const { return tear_down_was_run_; } - private: - FailureType failure_in_set_up_; - bool set_up_was_run_; - bool tear_down_was_run_; -}; - -// Was the TEST run? -bool test_was_run; - -// The sole purpose of this TEST is to enable us to check whether it -// was run. -TEST(FooTest, Bar) { - test_was_run = true; -} - -// Prints the message and aborts the program if condition is false. -void Check(bool condition, const char* msg) { - if (!condition) { - printf("FAILED: %s\n", msg); - abort(); - } -} - -// Runs the tests. Return true iff successful. -// -// The 'failure' parameter specifies the type of failure that should -// be generated by the global set-up. -int RunAllTests(MyEnvironment* env, FailureType failure) { - env->Reset(); - env->set_failure_in_set_up(failure); - test_was_run = false; - return RUN_ALL_TESTS(); -} - -} // namespace - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - // Registers a global test environment, and verifies that the - // registration function returns its argument. - MyEnvironment* const env = new MyEnvironment; - Check(testing::AddGlobalTestEnvironment(env) == env, - "AddGlobalTestEnvironment() should return its argument."); - - // Verifies that RUN_ALL_TESTS() runs the tests when the global - // set-up is successful. - Check(RunAllTests(env, NO_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as the global tear-down " - "should generate a failure."); - Check(test_was_run, - "The tests should run, as the global set-up should generate no " - "failure"); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() runs the tests when the global - // set-up generates no fatal failure. - Check(RunAllTests(env, NON_FATAL_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as both the global set-up " - "and the global tear-down should generate a non-fatal failure."); - Check(test_was_run, - "The tests should run, as the global set-up should generate no " - "fatal failure."); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() runs no test when the global set-up - // generates a fatal failure. - Check(RunAllTests(env, FATAL_FAILURE) != 0, - "RUN_ALL_TESTS() should return non-zero, as the global set-up " - "should generate a fatal failure."); - Check(!test_was_run, - "The tests should not run, as the global set-up should generate " - "a fatal failure."); - Check(env->tear_down_was_run(), - "The global tear-down should run, as the global set-up was run."); - - // Verifies that RUN_ALL_TESTS() doesn't do global set-up or - // tear-down when there is no test to run. - testing::GTEST_FLAG(filter) = "-*"; - Check(RunAllTests(env, NO_FAILURE) == 0, - "RUN_ALL_TESTS() should return zero, as there is no test to run."); - Check(!env->set_up_was_run(), - "The global set-up should not run, as there is no test to run."); - Check(!env->tear_down_was_run(), - "The global tear-down should not run, " - "as the global set-up was not run."); - - printf("PASS\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest.py deleted file mode 100755 index a94a5210..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest.py +++ /dev/null @@ -1,594 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2005 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test test filters. - -A user can specify which test(s) in a Google Test program to run via either -the GTEST_FILTER environment variable or the --gtest_filter flag. -This script tests such functionality by invoking -gtest_filter_unittest_ (a program written with Google Test) with different -environments and command line flags. - -Note that test sharding may also influence which tests are filtered. Therefore, -we test that here also. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sets -import gtest_test_utils - -# Constants. - -IS_WINDOWS = os.name == 'nt' - -# The environment variable for specifying the test filters. -FILTER_ENV_VAR = 'GTEST_FILTER' - -# The environment variables for test sharding. -TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS' -SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX' -SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE' - -# The command line flag for specifying the test filters. -FILTER_FLAG = 'gtest_filter' - -# The command line flag for including disabled tests. -ALSO_RUN_DISABED_TESTS_FLAG = 'gtest_also_run_disabled_tests' - -# Command to run the gtest_filter_unittest_ program. -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_') - -# Regex for determining whether parameterized tests are enabled in the binary. -PARAM_TEST_REGEX = re.compile(r'/ParamTest') - -# Regex for parsing test case names from Google Test's output. -TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)') - -# Regex for parsing test names from Google Test's output. -TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)') - -# Full names of all tests in gtest_filter_unittests_. -PARAM_TESTS = [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - 'SeqQ/ParamTest.TestX/0', - 'SeqQ/ParamTest.TestX/1', - 'SeqQ/ParamTest.TestY/0', - 'SeqQ/ParamTest.TestY/1', - ] - -DISABLED_TESTS = [ - 'BarTest.DISABLED_TestFour', - 'BarTest.DISABLED_TestFive', - 'BazTest.DISABLED_TestC', - 'DISABLED_FoobarTest.Test1', - 'DISABLED_FoobarTest.DISABLED_Test2', - 'DISABLED_FoobarbazTest.TestA', - ] - -# All the non-disabled tests. -ACTIVE_TESTS = [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', - ] + PARAM_TESTS - -param_tests_present = None - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets the env variable to 'value'; unsets it when 'value' is None.""" - - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def RunAndReturnOutput(args = None): - """Runs the test program and returns its output.""" - - return gtest_test_utils.Subprocess([COMMAND] + (args or [])).output - - -def RunAndExtractTestList(args = None): - """Runs the test program and returns its exit code and a list of tests run.""" - - p = gtest_test_utils.Subprocess([COMMAND] + (args or [])) - tests_run = [] - test_case = '' - test = '' - for line in p.output.split('\n'): - match = TEST_CASE_REGEX.match(line) - if match is not None: - test_case = match.group(1) - else: - match = TEST_REGEX.match(line) - if match is not None: - test = match.group(1) - tests_run.append(test_case + '.' + test) - return (tests_run, p.exit_code) - - -def InvokeWithModifiedEnv(extra_env, function, *args, **kwargs): - """Runs the given function and arguments in a modified environment.""" - try: - original_env = os.environ.copy() - os.environ.update(extra_env) - return function(*args, **kwargs) - finally: - for key in extra_env.iterkeys(): - if key in original_env: - os.environ[key] = original_env[key] - else: - del os.environ[key] - - -def RunWithSharding(total_shards, shard_index, command): - """Runs a test program shard and returns exit code and a list of tests run.""" - - extra_env = {SHARD_INDEX_ENV_VAR: str(shard_index), - TOTAL_SHARDS_ENV_VAR: str(total_shards)} - return InvokeWithModifiedEnv(extra_env, RunAndExtractTestList, command) - -# The unit test. - - -class GTestFilterUnitTest(gtest_test_utils.TestCase): - """Tests GTEST_FILTER env variable or --gtest_filter flag to filter tests.""" - - # Utilities. - - def AssertSetEqual(self, lhs, rhs): - """Asserts that two sets are equal.""" - - for elem in lhs: - self.assert_(elem in rhs, '%s in %s' % (elem, rhs)) - - for elem in rhs: - self.assert_(elem in lhs, '%s in %s' % (elem, lhs)) - - def AssertPartitionIsValid(self, set_var, list_of_sets): - """Asserts that list_of_sets is a valid partition of set_var.""" - - full_partition = [] - for slice_var in list_of_sets: - full_partition.extend(slice_var) - self.assertEqual(len(set_var), len(full_partition)) - self.assertEqual(sets.Set(set_var), sets.Set(full_partition)) - - def AdjustForParameterizedTests(self, tests_to_run): - """Adjust tests_to_run in case value parameterized tests are disabled.""" - - global param_tests_present - if not param_tests_present: - return list(sets.Set(tests_to_run) - sets.Set(PARAM_TESTS)) - else: - return tests_to_run - - def RunAndVerify(self, gtest_filter, tests_to_run): - """Checks that the binary runs correct set of tests for the given filter.""" - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # First, tests using GTEST_FILTER. - - # Windows removes empty variables from the environment when passing it - # to a new process. This means it is impossible to pass an empty filter - # into a process using the GTEST_FILTER environment variable. However, - # we can still test the case when the variable is not supplied (i.e., - # gtest_filter is None). - # pylint: disable-msg=C6403 - if not IS_WINDOWS or gtest_filter != '': - SetEnvVar(FILTER_ENV_VAR, gtest_filter) - tests_run = RunAndExtractTestList()[0] - SetEnvVar(FILTER_ENV_VAR, None) - self.AssertSetEqual(tests_run, tests_to_run) - # pylint: enable-msg=C6403 - - # Next, tests using --gtest_filter. - - if gtest_filter is None: - args = [] - else: - args = ['--%s=%s' % (FILTER_FLAG, gtest_filter)] - - tests_run = RunAndExtractTestList(args)[0] - self.AssertSetEqual(tests_run, tests_to_run) - - def RunAndVerifyWithSharding(self, gtest_filter, total_shards, tests_to_run, - args=None, check_exit_0=False): - """Checks that binary runs correct tests for the given filter and shard. - - Runs all shards of gtest_filter_unittest_ with the given filter, and - verifies that the right set of tests were run. The union of tests run - on each shard should be identical to tests_to_run, without duplicates. - - Args: - gtest_filter: A filter to apply to the tests. - total_shards: A total number of shards to split test run into. - tests_to_run: A set of tests expected to run. - args : Arguments to pass to the to the test binary. - check_exit_0: When set to a true value, make sure that all shards - return 0. - """ - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # Windows removes empty variables from the environment when passing it - # to a new process. This means it is impossible to pass an empty filter - # into a process using the GTEST_FILTER environment variable. However, - # we can still test the case when the variable is not supplied (i.e., - # gtest_filter is None). - # pylint: disable-msg=C6403 - if not IS_WINDOWS or gtest_filter != '': - SetEnvVar(FILTER_ENV_VAR, gtest_filter) - partition = [] - for i in range(0, total_shards): - (tests_run, exit_code) = RunWithSharding(total_shards, i, args) - if check_exit_0: - self.assertEqual(0, exit_code) - partition.append(tests_run) - - self.AssertPartitionIsValid(tests_to_run, partition) - SetEnvVar(FILTER_ENV_VAR, None) - # pylint: enable-msg=C6403 - - def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run): - """Checks that the binary runs correct set of tests for the given filter. - - Runs gtest_filter_unittest_ with the given filter, and enables - disabled tests. Verifies that the right set of tests were run. - - Args: - gtest_filter: A filter to apply to the tests. - tests_to_run: A set of tests expected to run. - """ - - tests_to_run = self.AdjustForParameterizedTests(tests_to_run) - - # Construct the command line. - args = ['--%s' % ALSO_RUN_DISABED_TESTS_FLAG] - if gtest_filter is not None: - args.append('--%s=%s' % (FILTER_FLAG, gtest_filter)) - - tests_run = RunAndExtractTestList(args)[0] - self.AssertSetEqual(tests_run, tests_to_run) - - def setUp(self): - """Sets up test case. - - Determines whether value-parameterized tests are enabled in the binary and - sets the flags accordingly. - """ - - global param_tests_present - if param_tests_present is None: - param_tests_present = PARAM_TEST_REGEX.search( - RunAndReturnOutput()) is not None - - def testDefaultBehavior(self): - """Tests the behavior of not specifying the filter.""" - - self.RunAndVerify(None, ACTIVE_TESTS) - - def testDefaultBehaviorWithShards(self): - """Tests the behavior without the filter, with sharding enabled.""" - - self.RunAndVerifyWithSharding(None, 1, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, 2, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) - 1, ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS), ACTIVE_TESTS) - self.RunAndVerifyWithSharding(None, len(ACTIVE_TESTS) + 1, ACTIVE_TESTS) - - def testEmptyFilter(self): - """Tests an empty filter.""" - - self.RunAndVerify('', []) - self.RunAndVerifyWithSharding('', 1, []) - self.RunAndVerifyWithSharding('', 2, []) - - def testBadFilter(self): - """Tests a filter that matches nothing.""" - - self.RunAndVerify('BadFilter', []) - self.RunAndVerifyAllowingDisabled('BadFilter', []) - - def testFullName(self): - """Tests filtering by full name.""" - - self.RunAndVerify('FooTest.Xyz', ['FooTest.Xyz']) - self.RunAndVerifyAllowingDisabled('FooTest.Xyz', ['FooTest.Xyz']) - self.RunAndVerifyWithSharding('FooTest.Xyz', 5, ['FooTest.Xyz']) - - def testUniversalFilters(self): - """Tests filters that match everything.""" - - self.RunAndVerify('*', ACTIVE_TESTS) - self.RunAndVerify('*.*', ACTIVE_TESTS) - self.RunAndVerifyWithSharding('*.*', len(ACTIVE_TESTS) - 3, ACTIVE_TESTS) - self.RunAndVerifyAllowingDisabled('*', ACTIVE_TESTS + DISABLED_TESTS) - self.RunAndVerifyAllowingDisabled('*.*', ACTIVE_TESTS + DISABLED_TESTS) - - def testFilterByTestCase(self): - """Tests filtering by test case name.""" - - self.RunAndVerify('FooTest.*', ['FooTest.Abc', 'FooTest.Xyz']) - - BAZ_TESTS = ['BazTest.TestOne', 'BazTest.TestA', 'BazTest.TestB'] - self.RunAndVerify('BazTest.*', BAZ_TESTS) - self.RunAndVerifyAllowingDisabled('BazTest.*', - BAZ_TESTS + ['BazTest.DISABLED_TestC']) - - def testFilterByTest(self): - """Tests filtering by test name.""" - - self.RunAndVerify('*.TestOne', ['BarTest.TestOne', 'BazTest.TestOne']) - - def testFilterDisabledTests(self): - """Select only the disabled tests to run.""" - - self.RunAndVerify('DISABLED_FoobarTest.Test1', []) - self.RunAndVerifyAllowingDisabled('DISABLED_FoobarTest.Test1', - ['DISABLED_FoobarTest.Test1']) - - self.RunAndVerify('*DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('*DISABLED_*', DISABLED_TESTS) - - self.RunAndVerify('*.DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('*.DISABLED_*', [ - 'BarTest.DISABLED_TestFour', - 'BarTest.DISABLED_TestFive', - 'BazTest.DISABLED_TestC', - 'DISABLED_FoobarTest.DISABLED_Test2', - ]) - - self.RunAndVerify('DISABLED_*', []) - self.RunAndVerifyAllowingDisabled('DISABLED_*', [ - 'DISABLED_FoobarTest.Test1', - 'DISABLED_FoobarTest.DISABLED_Test2', - 'DISABLED_FoobarbazTest.TestA', - ]) - - def testWildcardInTestCaseName(self): - """Tests using wildcard in the test case name.""" - - self.RunAndVerify('*a*.*', [ - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', ] + PARAM_TESTS) - - def testWildcardInTestName(self): - """Tests using wildcard in the test name.""" - - self.RunAndVerify('*.*A*', ['FooTest.Abc', 'BazTest.TestA']) - - def testFilterWithoutDot(self): - """Tests a filter that has no '.' in it.""" - - self.RunAndVerify('*z*', [ - 'FooTest.Xyz', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ]) - - def testTwoPatterns(self): - """Tests filters that consist of two patterns.""" - - self.RunAndVerify('Foo*.*:*A*', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BazTest.TestA', - ]) - - # An empty pattern + a non-empty one - self.RunAndVerify(':*A*', ['FooTest.Abc', 'BazTest.TestA']) - - def testThreePatterns(self): - """Tests filters that consist of three patterns.""" - - self.RunAndVerify('*oo*:*A*:*One', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - - 'BazTest.TestOne', - 'BazTest.TestA', - ]) - - # The 2nd pattern is empty. - self.RunAndVerify('*oo*::*One', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - - 'BazTest.TestOne', - ]) - - # The last 2 patterns are empty. - self.RunAndVerify('*oo*::', [ - 'FooTest.Abc', - 'FooTest.Xyz', - ]) - - def testNegativeFilters(self): - self.RunAndVerify('*-HasDeathTest.Test1', [ - 'FooTest.Abc', - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - - 'HasDeathTest.Test2', - ] + PARAM_TESTS) - - self.RunAndVerify('*-FooTest.Abc:HasDeathTest.*', [ - 'FooTest.Xyz', - - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ] + PARAM_TESTS) - - self.RunAndVerify('BarTest.*-BarTest.TestOne', [ - 'BarTest.TestTwo', - 'BarTest.TestThree', - ]) - - # Tests without leading '*'. - self.RunAndVerify('-FooTest.Abc:FooTest.Xyz:HasDeathTest.*', [ - 'BarTest.TestOne', - 'BarTest.TestTwo', - 'BarTest.TestThree', - - 'BazTest.TestOne', - 'BazTest.TestA', - 'BazTest.TestB', - ] + PARAM_TESTS) - - # Value parameterized tests. - self.RunAndVerify('*/*', PARAM_TESTS) - - # Value parameterized tests filtering by the sequence name. - self.RunAndVerify('SeqP/*', [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - ]) - - # Value parameterized tests filtering by the test name. - self.RunAndVerify('*/0', [ - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestY/0', - 'SeqQ/ParamTest.TestX/0', - 'SeqQ/ParamTest.TestY/0', - ]) - - def testFlagOverridesEnvVar(self): - """Tests that the filter flag overrides the filtering env. variable.""" - - SetEnvVar(FILTER_ENV_VAR, 'Foo*') - args = ['--%s=%s' % (FILTER_FLAG, '*One')] - tests_run = RunAndExtractTestList(args)[0] - SetEnvVar(FILTER_ENV_VAR, None) - - self.AssertSetEqual(tests_run, ['BarTest.TestOne', 'BazTest.TestOne']) - - def testShardStatusFileIsCreated(self): - """Tests that the shard file is created if specified in the environment.""" - - shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), - 'shard_status_file') - self.assert_(not os.path.exists(shard_status_file)) - - extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} - try: - InvokeWithModifiedEnv(extra_env, RunAndReturnOutput) - finally: - self.assert_(os.path.exists(shard_status_file)) - os.remove(shard_status_file) - - def testShardStatusFileIsCreatedWithListTests(self): - """Tests that the shard file is created with --gtest_list_tests.""" - - shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), - 'shard_status_file2') - self.assert_(not os.path.exists(shard_status_file)) - - extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} - try: - InvokeWithModifiedEnv(extra_env, - RunAndReturnOutput, - ['--gtest_list_tests']) - finally: - self.assert_(os.path.exists(shard_status_file)) - os.remove(shard_status_file) - - def testShardingWorksWithDeathTests(self): - """Tests integration with death tests and sharding.""" - gtest_filter = 'HasDeathTest.*:SeqP/*' - expected_tests = [ - 'HasDeathTest.Test1', - 'HasDeathTest.Test2', - - 'SeqP/ParamTest.TestX/0', - 'SeqP/ParamTest.TestX/1', - 'SeqP/ParamTest.TestY/0', - 'SeqP/ParamTest.TestY/1', - ] - - for flag in ['--gtest_death_test_style=threadsafe', - '--gtest_death_test_style=fast']: - self.RunAndVerifyWithSharding(gtest_filter, 3, expected_tests, - check_exit_0=True, args=[flag]) - self.RunAndVerifyWithSharding(gtest_filter, 5, expected_tests, - check_exit_0=True, args=[flag]) - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest_.cc deleted file mode 100644 index 325504fe..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_filter_unittest_.cc +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Unit test for Google Test test filters. -// -// A user can specify which test(s) in a Google Test program to run via -// either the GTEST_FILTER environment variable or the --gtest_filter -// flag. This is used for testing such functionality. -// -// The program will be invoked from a Python unit test. Don't run it -// directly. - -#include - -namespace { - -// Test case FooTest. - -class FooTest : public testing::Test { -}; - -TEST_F(FooTest, Abc) { -} - -TEST_F(FooTest, Xyz) { - FAIL() << "Expected failure."; -} - -// Test case BarTest. - -TEST(BarTest, TestOne) { -} - -TEST(BarTest, TestTwo) { -} - -TEST(BarTest, TestThree) { -} - -TEST(BarTest, DISABLED_TestFour) { - FAIL() << "Expected failure."; -} - -TEST(BarTest, DISABLED_TestFive) { - FAIL() << "Expected failure."; -} - -// Test case BazTest. - -TEST(BazTest, TestOne) { - FAIL() << "Expected failure."; -} - -TEST(BazTest, TestA) { -} - -TEST(BazTest, TestB) { -} - -TEST(BazTest, DISABLED_TestC) { - FAIL() << "Expected failure."; -} - -// Test case HasDeathTest - -TEST(HasDeathTest, Test1) { - EXPECT_DEATH_IF_SUPPORTED(exit(1), ".*"); -} - -// We need at least two death tests to make sure that the all death tests -// aren't on the first shard. -TEST(HasDeathTest, Test2) { - EXPECT_DEATH_IF_SUPPORTED(exit(1), ".*"); -} - -// Test case FoobarTest - -TEST(DISABLED_FoobarTest, Test1) { - FAIL() << "Expected failure."; -} - -TEST(DISABLED_FoobarTest, DISABLED_Test2) { - FAIL() << "Expected failure."; -} - -// Test case FoobarbazTest - -TEST(DISABLED_FoobarbazTest, TestA) { - FAIL() << "Expected failure."; -} - -#if GTEST_HAS_PARAM_TEST -class ParamTest : public testing::TestWithParam { -}; - -TEST_P(ParamTest, TestX) { -} - -TEST_P(ParamTest, TestY) { -} - -INSTANTIATE_TEST_CASE_P(SeqP, ParamTest, testing::Values(1, 2)); -INSTANTIATE_TEST_CASE_P(SeqQ, ParamTest, testing::Values(5, 6)); -#endif // GTEST_HAS_PARAM_TEST - -} // namespace - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test.py deleted file mode 100755 index 91081ad3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the --help flag of Google C++ Testing Framework. - -SYNOPSIS - gtest_help_test.py --gtest_build_dir=BUILD/DIR - # where BUILD/DIR contains the built gtest_help_test_ file. - gtest_help_test.py -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import gtest_test_utils - - -IS_WINDOWS = os.name == 'nt' - -PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_help_test_') -FLAG_PREFIX = '--gtest_' -CATCH_EXCEPTIONS_FLAG = FLAG_PREFIX + 'catch_exceptions' -DEATH_TEST_STYLE_FLAG = FLAG_PREFIX + 'death_test_style' - -# The help message must match this regex. -HELP_REGEX = re.compile( - FLAG_PREFIX + r'list_tests.*' + - FLAG_PREFIX + r'filter=.*' + - FLAG_PREFIX + r'also_run_disabled_tests.*' + - FLAG_PREFIX + r'repeat=.*' + - FLAG_PREFIX + r'shuffle.*' + - FLAG_PREFIX + r'random_seed=.*' + - FLAG_PREFIX + r'color=.*' + - FLAG_PREFIX + r'print_time.*' + - FLAG_PREFIX + r'output=.*' + - FLAG_PREFIX + r'break_on_failure.*' + - FLAG_PREFIX + r'throw_on_failure.*', - re.DOTALL) - - -def RunWithFlag(flag): - """Runs gtest_help_test_ with the given flag. - - Returns: - the exit code and the text output as a tuple. - Args: - flag: the command-line flag to pass to gtest_help_test_, or None. - """ - - if flag is None: - command = [PROGRAM_PATH] - else: - command = [PROGRAM_PATH, flag] - child = gtest_test_utils.Subprocess(command) - return child.exit_code, child.output - - -class GTestHelpTest(gtest_test_utils.TestCase): - """Tests the --help flag and its equivalent forms.""" - - def TestHelpFlag(self, flag): - """Verifies that the right message is printed and the tests are - skipped when the given flag is specified.""" - - exit_code, output = RunWithFlag(flag) - self.assertEquals(0, exit_code) - self.assert_(HELP_REGEX.search(output), output) - if IS_WINDOWS: - self.assert_(CATCH_EXCEPTIONS_FLAG in output, output) - self.assert_(DEATH_TEST_STYLE_FLAG not in output, output) - else: - self.assert_(CATCH_EXCEPTIONS_FLAG not in output, output) - self.assert_(DEATH_TEST_STYLE_FLAG in output, output) - - def testPrintsHelpWithFullFlag(self): - self.TestHelpFlag('--help') - - def testPrintsHelpWithShortFlag(self): - self.TestHelpFlag('-h') - - def testPrintsHelpWithQuestionFlag(self): - self.TestHelpFlag('-?') - - def testPrintsHelpWithWindowsStyleQuestionFlag(self): - self.TestHelpFlag('/?') - - def testRunsTestsWithoutHelpFlag(self): - """Verifies that when no help flag is specified, the tests are run - and the help message is not printed.""" - - exit_code, output = RunWithFlag(None) - self.assert_(exit_code != 0) - self.assert_(not HELP_REGEX.search(output), output) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test_.cc deleted file mode 100644 index 0282bc88..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_help_test_.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This program is meant to be run by gtest_help_test.py. Do not run -// it directly. - -#include - -// When a help flag is specified, this program should skip the tests -// and exit with 0; otherwise the following test will be executed, -// causing this program to exit with a non-zero code. -TEST(HelpFlagTest, ShouldNotBeRun) { - ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified."; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest.py deleted file mode 100755 index ce8c3ef0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for Google Test's --gtest_list_tests flag. - -A user can ask Google Test to list all tests by specifying the ---gtest_list_tests flag. This script tests such functionality -by invoking gtest_list_tests_unittest_ (a program written with -Google Test) the command line flags. -""" - -__author__ = 'phanna@google.com (Patrick Hanna)' - -import gtest_test_utils - - -# Constants. - -# The command line flag for enabling/disabling listing all tests. -LIST_TESTS_FLAG = 'gtest_list_tests' - -# Path to the gtest_list_tests_unittest_ program. -EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_') - -# The expected output when running gtest_list_tests_unittest_ with -# --gtest_list_tests -EXPECTED_OUTPUT_NO_FILTER = """FooDeathTest. - Test1 -Foo. - Bar1 - Bar2 - DISABLED_Bar3 -Abc. - Xyz - Def -FooBar. - Baz -FooTest. - Test1 - DISABLED_Test2 - Test3 -""" - -# The expected output when running gtest_list_tests_unittest_ with -# --gtest_list_tests and --gtest_filter=Foo*. -EXPECTED_OUTPUT_FILTER_FOO = """FooDeathTest. - Test1 -Foo. - Bar1 - Bar2 - DISABLED_Bar3 -FooBar. - Baz -FooTest. - Test1 - DISABLED_Test2 - Test3 -""" - -# Utilities. - - -def Run(args): - """Runs gtest_list_tests_unittest_ and returns the list of tests printed.""" - - return gtest_test_utils.Subprocess([EXE_PATH] + args, - capture_stderr=False).output - - -# The unit test. - -class GTestListTestsUnitTest(gtest_test_utils.TestCase): - """Tests using the --gtest_list_tests flag to list all tests.""" - - def RunAndVerify(self, flag_value, expected_output, other_flag): - """Runs gtest_list_tests_unittest_ and verifies that it prints - the correct tests. - - Args: - flag_value: value of the --gtest_list_tests flag; - None if the flag should not be present. - - expected_output: the expected output after running command; - - other_flag: a different flag to be passed to command - along with gtest_list_tests; - None if the flag should not be present. - """ - - if flag_value is None: - flag = '' - flag_expression = 'not set' - elif flag_value == '0': - flag = '--%s=0' % LIST_TESTS_FLAG - flag_expression = '0' - else: - flag = '--%s' % LIST_TESTS_FLAG - flag_expression = '1' - - args = [flag] - - if other_flag is not None: - args += [other_flag] - - output = Run(args) - - msg = ('when %s is %s, the output of "%s" is "%s".' % - (LIST_TESTS_FLAG, flag_expression, ' '.join(args), output)) - - if expected_output is not None: - self.assert_(output == expected_output, msg) - else: - self.assert_(output != EXPECTED_OUTPUT_NO_FILTER, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(flag_value=None, - expected_output=None, - other_flag=None) - - def testFlag(self): - """Tests using the --gtest_list_tests flag.""" - - self.RunAndVerify(flag_value='0', - expected_output=None, - other_flag=None) - self.RunAndVerify(flag_value='1', - expected_output=EXPECTED_OUTPUT_NO_FILTER, - other_flag=None) - - def testOverrideNonFilterFlags(self): - """Tests that --gtest_list_tests overrides the non-filter flags.""" - - self.RunAndVerify(flag_value='1', - expected_output=EXPECTED_OUTPUT_NO_FILTER, - other_flag='--gtest_break_on_failure') - - def testWithFilterFlags(self): - """Tests that --gtest_list_tests takes into account the - --gtest_filter flag.""" - - self.RunAndVerify(flag_value='1', - expected_output=EXPECTED_OUTPUT_FILTER_FOO, - other_flag='--gtest_filter=Foo*') - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest_.cc deleted file mode 100644 index a0ed0825..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_list_tests_unittest_.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: phanna@google.com (Patrick Hanna) - -// Unit test for Google Test's --gtest_list_tests flag. -// -// A user can ask Google Test to list all tests that will run -// so that when using a filter, a user will know what -// tests to look for. The tests will not be run after listing. -// -// This program will be invoked from a Python unit test. -// Don't run it directly. - -#include - -namespace { - -// Several different test cases and tests that will be listed. -TEST(Foo, Bar1) { -} - -TEST(Foo, Bar2) { -} - -TEST(Foo, DISABLED_Bar3) { -} - -TEST(Abc, Xyz) { -} - -TEST(Abc, Def) { -} - -TEST(FooBar, Baz) { -} - -class FooTest : public testing::Test { -}; - -TEST_F(FooTest, Test1) { -} - -TEST_F(FooTest, DISABLED_Test2) { -} - -TEST_F(FooTest, Test3) { -} - -TEST(FooDeathTest, Test1) { -} - -} // namespace - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_main_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_main_unittest.cc deleted file mode 100644 index 7a3f0adf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_main_unittest.cc +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -// Tests that we don't have to define main() when we link to -// gtest_main instead of gtest. - -namespace { - -TEST(GTestMainTest, ShouldSucceed) { -} - -} // namespace - -// We are using the main() function defined in src/gtest_main.cc, so -// we don't define it here. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc.cc deleted file mode 100644 index 73b5db6d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc.cc +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// This file is the input to a negative-compilation test for Google -// Test. Code here is NOT supposed to compile. Its purpose is to -// verify that certain incorrect usages of the Google Test API are -// indeed rejected by the compiler. -// -// We still need to write the negative-compilation test itself, which -// will be tightly coupled with the build environment. -// -// TODO(wan@google.com): finish the negative-compilation test. - -#ifdef TEST_CANNOT_IGNORE_RUN_ALL_TESTS_RESULT -// Tests that the result of RUN_ALL_TESTS() cannot be ignored. - -#include - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - RUN_ALL_TESTS(); // This line shouldn't compile. -} - -#elif defined(TEST_USER_CANNOT_INCLUDE_GTEST_INTERNAL_INL_H) -// Tests that a user cannot include gtest-internal-inl.h in his code. - -#include "src/gtest-internal-inl.h" - -#elif defined(TEST_CATCHES_DECLARING_SETUP_IN_TEST_FIXTURE_WITH_TYPO) -// Tests that the compiler catches the typo when a user declares a -// Setup() method in a test fixture. - -#include - -class MyTest : public testing::Test { - protected: - void Setup() {} -}; - -#elif defined(TEST_CATCHES_CALLING_SETUP_IN_TEST_WITH_TYPO) -// Tests that the compiler catches the typo when a user calls Setup() -// from a test fixture. - -#include - -class MyTest : public testing::Test { - protected: - virtual void SetUp() { - testing::Test::Setup(); // Tries to call SetUp() in the parent class. - } -}; - -#elif defined(TEST_CATCHES_DECLARING_SETUP_IN_ENVIRONMENT_WITH_TYPO) -// Tests that the compiler catches the typo when a user declares a -// Setup() method in a subclass of Environment. - -#include - -class MyEnvironment : public testing::Environment { - public: - void Setup() {} -}; - -#elif defined(TEST_CATCHES_CALLING_SETUP_IN_ENVIRONMENT_WITH_TYPO) -// Tests that the compiler catches the typo when a user calls Setup() -// in an Environment. - -#include - -class MyEnvironment : public testing::Environment { - protected: - virtual void SetUp() { - // Tries to call SetUp() in the parent class. - testing::Environment::Setup(); - } -}; - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_TYPED_TEST_P) -// Tests that the compiler catches using the wrong test case name in -// TYPED_TEST_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(BarTest, A) {} // Wrong test case name. -REGISTER_TYPED_TEST_CASE_P(FooTest, A); -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_REGISTER_TYPED_TEST_CASE_P) -// Tests that the compiler catches using the wrong test case name in -// REGISTER_TYPED_TEST_CASE_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(BarTest, A); // Wrong test case name. -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_CATCHES_WRONG_CASE_IN_INSTANTIATE_TYPED_TEST_CASE_P) -// Tests that the compiler catches using the wrong test case name in -// INSTANTIATE_TYPED_TEST_CASE_P. - -#include - -template -class FooTest : public testing::Test { -}; - -template -class BarTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(FooTest, A); - -// Wrong test case name. -INSTANTIATE_TYPED_TEST_CASE_P(My, BarTest, testing::Types); - -#elif defined(TEST_CATCHES_INSTANTIATE_TYPED_TESET_CASE_P_WITH_SAME_NAME_PREFIX) -// Tests that the compiler catches instantiating TYPED_TEST_CASE_P -// twice with the same name prefix. - -#include - -template -class FooTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(FooTest); -TYPED_TEST_P(FooTest, A) {} -REGISTER_TYPED_TEST_CASE_P(FooTest, A); - -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -// Wrong name prefix: "My" has been used. -INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, testing::Types); - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE) - -#include - -// Tests that StaticAssertTypeEq cannot be used as a type. -testing::StaticAssertTypeEq dummy; - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE) - -#include - -// Tests that StaticAssertTypeEq works in a namespace scope. -static bool dummy = testing::StaticAssertTypeEq(); - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS) - -#include - -template -class Helper { - public: - // Tests that StaticAssertTypeEq works in a class. - Helper() { testing::StaticAssertTypeEq(); } - - void DoSomething() {} -}; - -void Test() { - Helper h; - h.DoSomething(); // To avoid the "unused variable" warning. -} - -#elif defined(TEST_STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION) - -#include - -void Test() { - // Tests that StaticAssertTypeEq works inside a function. - testing::StaticAssertTypeEq(); -} - -#else -// A sanity test. This should compile. - -#include - -int main() { - return RUN_ALL_TESTS(); -} - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc_test.py deleted file mode 100755 index 06ffb3f8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_nc_test.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Negative compilation test for Google Test.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import sys -import unittest - - -IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' -if not IS_LINUX: - sys.exit(0) # Negative compilation tests are not supported on Windows & Mac. - - -class GTestNCTest(unittest.TestCase): - """Negative compilation test for Google Test.""" - - def testCompilerError(self): - """Verifies that erroneous code leads to expected compiler - messages.""" - - # Defines a list of test specs, where each element is a tuple - # (test name, list of regexes for matching the compiler errors). - test_specs = [ - ('CANNOT_IGNORE_RUN_ALL_TESTS_RESULT', - [r'ignoring return value']), - - ('USER_CANNOT_INCLUDE_GTEST_INTERNAL_INL_H', - [r'must not be included except by Google Test itself']), - - ('CATCHES_DECLARING_SETUP_IN_TEST_FIXTURE_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_CALLING_SETUP_IN_TEST_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_DECLARING_SETUP_IN_ENVIRONMENT_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_CALLING_SETUP_IN_ENVIRONMENT_WITH_TYPO', - [r'Setup_should_be_spelled_SetUp']), - - ('CATCHES_WRONG_CASE_IN_TYPED_TEST_P', - [r'BarTest.*was not declared']), - - ('CATCHES_WRONG_CASE_IN_REGISTER_TYPED_TEST_CASE_P', - [r'BarTest.*was not declared']), - - ('CATCHES_WRONG_CASE_IN_INSTANTIATE_TYPED_TEST_CASE_P', - [r'BarTest.*not declared']), - - ('CATCHES_INSTANTIATE_TYPED_TESET_CASE_P_WITH_SAME_NAME_PREFIX', - [r'redefinition of.*My.*FooTest']), - - ('STATIC_ASSERT_TYPE_EQ_IS_NOT_A_TYPE', - [r'StaticAssertTypeEq.* does not name a type']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_NAMESPACE', - [r'StaticAssertTypeEq.*int.*const int']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_CLASS', - [r'StaticAssertTypeEq.*int.*bool']), - - ('STATIC_ASSERT_TYPE_EQ_WORKS_IN_FUNCTION', - [r'StaticAssertTypeEq.*const int.*int']), - - ('SANITY', - None) - ] - - # TODO(wan@google.com): verify that the test specs are satisfied. - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_no_test_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_no_test_unittest.cc deleted file mode 100644 index afe2dc0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_no_test_unittest.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Tests that a Google Test program that has no test defined can run -// successfully. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - // An ad-hoc assertion outside of all tests. - // - // This serves two purposes: - // - // 1. It verifies that an ad-hoc assertion can be executed even if - // no test is defined. - // 2. We had a bug where the XML output won't be generated if an - // assertion is executed before RUN_ALL_TESTS() is called, even - // though --gtest_output=xml is specified. This makes sure the - // bug is fixed and doesn't regress. - EXPECT_EQ(1, 1); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test.py deleted file mode 100755 index c8a38f53..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test.py +++ /dev/null @@ -1,307 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the text output of Google C++ Testing Framework. - -SYNOPSIS - gtest_output_test.py --gtest_build_dir=BUILD/DIR --gengolden - # where BUILD/DIR contains the built gtest_output_test_ file. - gtest_output_test.py --gengolden - gtest_output_test.py -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import re -import sys -import gtest_test_utils - - -# The flag for generating the golden file -GENGOLDEN_FLAG = '--gengolden' - -IS_WINDOWS = os.name == 'nt' - -if IS_WINDOWS: - GOLDEN_NAME = 'gtest_output_test_golden_win.txt' -else: - GOLDEN_NAME = 'gtest_output_test_golden_lin.txt' - -PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_') - -# At least one command we exercise must not have the -# --gtest_internal_skip_environment_and_ad_hoc_tests flag. -COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests']) -COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes']) -COMMAND_WITH_TIME = ({}, [PROGRAM_PATH, - '--gtest_print_time', - '--gtest_internal_skip_environment_and_ad_hoc_tests', - '--gtest_filter=FatalFailureTest.*:LoggingTest.*']) -COMMAND_WITH_DISABLED = ( - {}, [PROGRAM_PATH, - '--gtest_also_run_disabled_tests', - '--gtest_internal_skip_environment_and_ad_hoc_tests', - '--gtest_filter=*DISABLED_*']) -COMMAND_WITH_SHARDING = ( - {'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'}, - [PROGRAM_PATH, - '--gtest_internal_skip_environment_and_ad_hoc_tests', - '--gtest_filter=PassingTest.*']) - -GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) - - -def ToUnixLineEnding(s): - """Changes all Windows/Mac line endings in s to UNIX line endings.""" - - return s.replace('\r\n', '\n').replace('\r', '\n') - - -def RemoveLocations(test_output): - """Removes all file location info from a Google Test program's output. - - Args: - test_output: the output of a Google Test program. - - Returns: - output with all file location info (in the form of - 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or - 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by - 'FILE_NAME:#: '. - """ - - return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\: ', r'\1:#: ', test_output) - - -def RemoveStackTraceDetails(output): - """Removes all stack traces from a Google Test program's output.""" - - # *? means "find the shortest string that matches". - return re.sub(r'Stack trace:(.|\n)*?\n\n', - 'Stack trace: (omitted)\n\n', output) - - -def RemoveStackTraces(output): - """Removes all traces of stack traces from a Google Test program's output.""" - - # *? means "find the shortest string that matches". - return re.sub(r'Stack trace:(.|\n)*?\n\n', '', output) - - -def RemoveTime(output): - """Removes all time information from a Google Test program's output.""" - - return re.sub(r'\(\d+ ms', '(? ms', output) - - -def RemoveTestCounts(output): - """Removes test counts from a Google Test program's output.""" - - output = re.sub(r'\d+ tests, listed below', - '? tests, listed below', output) - output = re.sub(r'\d+ FAILED TESTS', - '? FAILED TESTS', output) - output = re.sub(r'\d+ tests from \d+ test cases', - '? tests from ? test cases', output) - output = re.sub(r'\d+ tests from ([a-zA-Z_])', - r'? tests from \1', output) - return re.sub(r'\d+ tests\.', '? tests.', output) - - -def RemoveMatchingTests(test_output, pattern): - """Removes output of specified tests from a Google Test program's output. - - This function strips not only the beginning and the end of a test but also - all output in between. - - Args: - test_output: A string containing the test output. - pattern: A regex string that matches names of test cases or - tests to remove. - - Returns: - Contents of test_output with tests whose names match pattern removed. - """ - - test_output = re.sub( - r'.*\[ RUN \] .*%s(.|\n)*?\[( FAILED | OK )\] .*%s.*\n' % ( - pattern, pattern), - '', - test_output) - return re.sub(r'.*%s.*\n' % pattern, '', test_output) - - -def NormalizeOutput(output): - """Normalizes output (the output of gtest_output_test_.exe).""" - - output = ToUnixLineEnding(output) - output = RemoveLocations(output) - output = RemoveStackTraceDetails(output) - output = RemoveTime(output) - return output - - -def GetShellCommandOutput(env_cmd): - """Runs a command in a sub-process, and returns its output in a string. - - Args: - env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra - environment variables to set, and element 1 is a string with - the command and any flags. - - Returns: - A string with the command's combined standard and diagnostic output. - """ - - # Spawns cmd in a sub-process, and gets its standard I/O file objects. - # Set and save the environment properly. - old_env_vars = dict(os.environ) - os.environ.update(env_cmd[0]) - p = gtest_test_utils.Subprocess(env_cmd[1]) - - # Changes made by os.environ.clear are not inheritable by child processes - # until Python 2.6. To produce inheritable changes we have to delete - # environment items with the del statement. - for key in os.environ.keys(): - del os.environ[key] - os.environ.update(old_env_vars) - - return p.output - - -def GetCommandOutput(env_cmd): - """Runs a command and returns its output with all file location - info stripped off. - - Args: - env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra - environment variables to set, and element 1 is a string with - the command and any flags. - """ - - # Disables exception pop-ups on Windows. - os.environ['GTEST_CATCH_EXCEPTIONS'] = '1' - return NormalizeOutput(GetShellCommandOutput(env_cmd)) - - -def GetOutputOfAllCommands(): - """Returns concatenated output from several representative commands.""" - - return (GetCommandOutput(COMMAND_WITH_COLOR) + - GetCommandOutput(COMMAND_WITH_TIME) + - GetCommandOutput(COMMAND_WITH_DISABLED) + - GetCommandOutput(COMMAND_WITH_SHARDING)) - - -test_list = GetShellCommandOutput(COMMAND_LIST_TESTS) -SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list -SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list -SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list -SUPPORTS_STACK_TRACES = False - -CAN_GENERATE_GOLDEN_FILE = SUPPORTS_DEATH_TESTS and SUPPORTS_TYPED_TESTS - - -class GTestOutputTest(gtest_test_utils.TestCase): - def RemoveUnsupportedTests(self, test_output): - if not SUPPORTS_DEATH_TESTS: - test_output = RemoveMatchingTests(test_output, 'DeathTest') - if not SUPPORTS_TYPED_TESTS: - test_output = RemoveMatchingTests(test_output, 'TypedTest') - if not SUPPORTS_THREADS: - test_output = RemoveMatchingTests(test_output, - 'ExpectFailureWithThreadsTest') - test_output = RemoveMatchingTests(test_output, - 'ScopedFakeTestPartResultReporterTest') - test_output = RemoveMatchingTests(test_output, - 'WorksConcurrently') - if not SUPPORTS_STACK_TRACES: - test_output = RemoveStackTraces(test_output) - - return test_output - - def testOutput(self): - output = GetOutputOfAllCommands() - - golden_file = open(GOLDEN_PATH, 'rb') - # A mis-configured source control system can cause \r appear in EOL - # sequences when we read the golden file irrespective of an operating - # system used. Therefore, we need to strip those \r's from newlines - # unconditionally. - golden = ToUnixLineEnding(golden_file.read()) - golden_file.close() - - # We want the test to pass regardless of certain features being - # supported or not. - if CAN_GENERATE_GOLDEN_FILE: - self.assert_(golden == output) - else: - normalized_actual = RemoveTestCounts(output) - normalized_golden = RemoveTestCounts(self.RemoveUnsupportedTests(golden)) - - # This code is very handy when debugging test differences so I left it - # here, commented. - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_actual.txt'), 'wb').write( - # normalized_actual) - # open(os.path.join( - # gtest_test_utils.GetSourceDir(), - # '_gtest_output_test_normalized_golden.txt'), 'wb').write( - # normalized_golden) - - self.assert_(normalized_golden == normalized_actual) - - -if __name__ == '__main__': - if sys.argv[1:] == [GENGOLDEN_FLAG]: - if CAN_GENERATE_GOLDEN_FILE: - output = GetOutputOfAllCommands() - golden_file = open(GOLDEN_PATH, 'wb') - golden_file.write(output) - golden_file.close() - else: - message = ( - """Unable to write a golden file when compiled in an environment -that does not support all the required features (death tests""") - if IS_WINDOWS: - message += ( - """\nand typed tests). Please check that you are using VC++ 8.0 SP1 -or higher as your compiler.""") - else: - message += """\nand typed tests). Please generate the golden file -using a binary built with those features enabled.""" - - sys.stderr.write(message) - sys.exit(1) - else: - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_.cc deleted file mode 100644 index 6d756027..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_.cc +++ /dev/null @@ -1,1009 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// A unit test for Google Test itself. This verifies that the basic -// constructs of Google Test work. -// -// Author: wan@google.com (Zhanyong Wan) - -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#include - -#if GTEST_HAS_PTHREAD -#include -#endif // GTEST_HAS_PTHREAD - -using testing::ScopedFakeTestPartResultReporter; -using testing::TestPartResultArray; - -namespace posix = ::testing::internal::posix; -using testing::internal::String; - -// Tests catching fatal failures. - -// A subroutine used by the following test. -void TestEq1(int x) { - ASSERT_EQ(1, x); -} - -// This function calls a test subroutine, catches the fatal failure it -// generates, and then returns early. -void TryTestSubroutine() { - // Calls a subrountine that yields a fatal failure. - TestEq1(2); - - // Catches the fatal failure and aborts the test. - // - // The testing::Test:: prefix is necessary when calling - // HasFatalFailure() outside of a TEST, TEST_F, or test fixture. - if (testing::Test::HasFatalFailure()) return; - - // If we get here, something is wrong. - FAIL() << "This should never be reached."; -} - -TEST(PassingTest, PassingTest1) { -} - -TEST(PassingTest, PassingTest2) { -} - -// Tests catching a fatal failure in a subroutine. -TEST(FatalFailureTest, FatalFailureInSubroutine) { - printf("(expecting a failure that x should be 1)\n"); - - TryTestSubroutine(); -} - -// Tests catching a fatal failure in a nested subroutine. -TEST(FatalFailureTest, FatalFailureInNestedSubroutine) { - printf("(expecting a failure that x should be 1)\n"); - - // Calls a subrountine that yields a fatal failure. - TryTestSubroutine(); - - // Catches the fatal failure and aborts the test. - // - // When calling HasFatalFailure() inside a TEST, TEST_F, or test - // fixture, the testing::Test:: prefix is not needed. - if (HasFatalFailure()) return; - - // If we get here, something is wrong. - FAIL() << "This should never be reached."; -} - -// Tests HasFatalFailure() after a failed EXPECT check. -TEST(FatalFailureTest, NonfatalFailureInSubroutine) { - printf("(expecting a failure on false)\n"); - EXPECT_TRUE(false); // Generates a nonfatal failure - ASSERT_FALSE(HasFatalFailure()); // This should succeed. -} - -// Tests interleaving user logging and Google Test assertions. -TEST(LoggingTest, InterleavingLoggingAndAssertions) { - static const int a[4] = { - 3, 9, 2, 6 - }; - - printf("(expecting 2 failures on (3) >= (a[i]))\n"); - for (int i = 0; i < static_cast(sizeof(a)/sizeof(*a)); i++) { - printf("i == %d\n", i); - EXPECT_GE(3, a[i]); - } -} - -// Tests the SCOPED_TRACE macro. - -// A helper function for testing SCOPED_TRACE. -void SubWithoutTrace(int n) { - EXPECT_EQ(1, n); - ASSERT_EQ(2, n); -} - -// Another helper function for testing SCOPED_TRACE. -void SubWithTrace(int n) { - SCOPED_TRACE(testing::Message() << "n = " << n); - - SubWithoutTrace(n); -} - -// Tests that SCOPED_TRACE() obeys lexical scopes. -TEST(SCOPED_TRACETest, ObeysScopes) { - printf("(expected to fail)\n"); - - // There should be no trace before SCOPED_TRACE() is invoked. - ADD_FAILURE() << "This failure is expected, and shouldn't have a trace."; - - { - SCOPED_TRACE("Expected trace"); - // After SCOPED_TRACE(), a failure in the current scope should contain - // the trace. - ADD_FAILURE() << "This failure is expected, and should have a trace."; - } - - // Once the control leaves the scope of the SCOPED_TRACE(), there - // should be no trace again. - ADD_FAILURE() << "This failure is expected, and shouldn't have a trace."; -} - -// Tests that SCOPED_TRACE works inside a loop. -TEST(SCOPED_TRACETest, WorksInLoop) { - printf("(expected to fail)\n"); - - for (int i = 1; i <= 2; i++) { - SCOPED_TRACE(testing::Message() << "i = " << i); - - SubWithoutTrace(i); - } -} - -// Tests that SCOPED_TRACE works in a subroutine. -TEST(SCOPED_TRACETest, WorksInSubroutine) { - printf("(expected to fail)\n"); - - SubWithTrace(1); - SubWithTrace(2); -} - -// Tests that SCOPED_TRACE can be nested. -TEST(SCOPED_TRACETest, CanBeNested) { - printf("(expected to fail)\n"); - - SCOPED_TRACE(""); // A trace without a message. - - SubWithTrace(2); -} - -// Tests that multiple SCOPED_TRACEs can be used in the same scope. -TEST(SCOPED_TRACETest, CanBeRepeated) { - printf("(expected to fail)\n"); - - SCOPED_TRACE("A"); - ADD_FAILURE() - << "This failure is expected, and should contain trace point A."; - - SCOPED_TRACE("B"); - ADD_FAILURE() - << "This failure is expected, and should contain trace point A and B."; - - { - SCOPED_TRACE("C"); - ADD_FAILURE() << "This failure is expected, and should contain " - << "trace point A, B, and C."; - } - - SCOPED_TRACE("D"); - ADD_FAILURE() << "This failure is expected, and should contain " - << "trace point A, B, and D."; -} - -TEST(DisabledTestsWarningTest, - DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning) { - // This test body is intentionally empty. Its sole purpose is for - // verifying that the --gtest_also_run_disabled_tests flag - // suppresses the "YOU HAVE 12 DISABLED TESTS" warning at the end of - // the test output. -} - -// Tests using assertions outside of TEST and TEST_F. -// -// This function creates two failures intentionally. -void AdHocTest() { - printf("The non-test part of the code is expected to have 2 failures.\n\n"); - EXPECT_TRUE(false); - EXPECT_EQ(2, 3); -} - -// Runs all TESTs, all TEST_Fs, and the ad hoc test. -int RunAllTests() { - AdHocTest(); - return RUN_ALL_TESTS(); -} - -// Tests non-fatal failures in the fixture constructor. -class NonFatalFailureInFixtureConstructorTest : public testing::Test { - protected: - NonFatalFailureInFixtureConstructorTest() { - printf("(expecting 5 failures)\n"); - ADD_FAILURE() << "Expected failure #1, in the test fixture c'tor."; - } - - ~NonFatalFailureInFixtureConstructorTest() { - ADD_FAILURE() << "Expected failure #5, in the test fixture d'tor."; - } - - virtual void SetUp() { - ADD_FAILURE() << "Expected failure #2, in SetUp()."; - } - - virtual void TearDown() { - ADD_FAILURE() << "Expected failure #4, in TearDown."; - } -}; - -TEST_F(NonFatalFailureInFixtureConstructorTest, FailureInConstructor) { - ADD_FAILURE() << "Expected failure #3, in the test body."; -} - -// Tests fatal failures in the fixture constructor. -class FatalFailureInFixtureConstructorTest : public testing::Test { - protected: - FatalFailureInFixtureConstructorTest() { - printf("(expecting 2 failures)\n"); - Init(); - } - - ~FatalFailureInFixtureConstructorTest() { - ADD_FAILURE() << "Expected failure #2, in the test fixture d'tor."; - } - - virtual void SetUp() { - ADD_FAILURE() << "UNEXPECTED failure in SetUp(). " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; - } - - virtual void TearDown() { - ADD_FAILURE() << "UNEXPECTED failure in TearDown(). " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; - } - private: - void Init() { - FAIL() << "Expected failure #1, in the test fixture c'tor."; - } -}; - -TEST_F(FatalFailureInFixtureConstructorTest, FailureInConstructor) { - ADD_FAILURE() << "UNEXPECTED failure in the test body. " - << "We should never get here, as the test fixture c'tor " - << "had a fatal failure."; -} - -// Tests non-fatal failures in SetUp(). -class NonFatalFailureInSetUpTest : public testing::Test { - protected: - virtual ~NonFatalFailureInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 4 failures)\n"); - ADD_FAILURE() << "Expected failure #1, in SetUp()."; - } - - virtual void TearDown() { - FAIL() << "Expected failure #3, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #4, in the test fixture d'tor."; - } -}; - -TEST_F(NonFatalFailureInSetUpTest, FailureInSetUp) { - FAIL() << "Expected failure #2, in the test function."; -} - -// Tests fatal failures in SetUp(). -class FatalFailureInSetUpTest : public testing::Test { - protected: - virtual ~FatalFailureInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 3 failures)\n"); - FAIL() << "Expected failure #1, in SetUp()."; - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -TEST_F(FatalFailureInSetUpTest, FailureInSetUp) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as SetUp() failed."; -} - -#if GTEST_OS_WINDOWS - -// This group of tests verifies that Google Test handles SEH and C++ -// exceptions correctly. - -// A function that throws an SEH exception. -static void ThrowSEH() { - int* p = NULL; - *p = 0; // Raises an access violation. -} - -// Tests exceptions thrown in the test fixture constructor. -class ExceptionInFixtureCtorTest : public testing::Test { - protected: - ExceptionInFixtureCtorTest() { - printf("(expecting a failure on thrown exception " - "in the test fixture's constructor)\n"); - - ThrowSEH(); - } - - virtual ~ExceptionInFixtureCtorTest() { - Deinit(); - } - - virtual void SetUp() { - FAIL() << "UNEXPECTED failure in SetUp(). " - << "We should never get here, as the test fixture c'tor threw."; - } - - virtual void TearDown() { - FAIL() << "UNEXPECTED failure in TearDown(). " - << "We should never get here, as the test fixture c'tor threw."; - } - private: - void Deinit() { - FAIL() << "UNEXPECTED failure in the d'tor. " - << "We should never get here, as the test fixture c'tor threw."; - } -}; - -TEST_F(ExceptionInFixtureCtorTest, ExceptionInFixtureCtor) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as the test fixture c'tor threw."; -} - -// Tests exceptions thrown in SetUp(). -class ExceptionInSetUpTest : public testing::Test { - protected: - virtual ~ExceptionInSetUpTest() { - Deinit(); - } - - virtual void SetUp() { - printf("(expecting 3 failures)\n"); - - ThrowSEH(); - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -TEST_F(ExceptionInSetUpTest, ExceptionInSetUp) { - FAIL() << "UNEXPECTED failure in the test function. " - << "We should never get here, as SetUp() threw."; -} - -// Tests that TearDown() and the test fixture d'tor are always called, -// even when the test function throws an exception. -class ExceptionInTestFunctionTest : public testing::Test { - protected: - virtual ~ExceptionInTestFunctionTest() { - Deinit(); - } - - virtual void TearDown() { - FAIL() << "Expected failure #2, in TearDown()."; - } - private: - void Deinit() { - FAIL() << "Expected failure #3, in the test fixture d'tor."; - } -}; - -// Tests that the test fixture d'tor is always called, even when the -// test function throws an SEH exception. -TEST_F(ExceptionInTestFunctionTest, SEH) { - printf("(expecting 3 failures)\n"); - - ThrowSEH(); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that the test fixture d'tor is always called, even when the -// test function throws a C++ exception. We do this only when -// GTEST_HAS_EXCEPTIONS is non-zero, i.e. C++ exceptions are enabled. -TEST_F(ExceptionInTestFunctionTest, CppException) { - throw 1; -} - -// Tests exceptions thrown in TearDown(). -class ExceptionInTearDownTest : public testing::Test { - protected: - virtual ~ExceptionInTearDownTest() { - Deinit(); - } - - virtual void TearDown() { - throw 1; - } - private: - void Deinit() { - FAIL() << "Expected failure #2, in the test fixture d'tor."; - } -}; - -TEST_F(ExceptionInTearDownTest, ExceptionInTearDown) { - printf("(expecting 2 failures)\n"); -} - -#endif // GTEST_HAS_EXCEPTIONS - -#endif // GTEST_OS_WINDOWS - -// The MixedUpTestCaseTest test case verifies that Google Test will fail a -// test if it uses a different fixture class than what other tests in -// the same test case use. It deliberately contains two fixture -// classes with the same name but defined in different namespaces. - -// The MixedUpTestCaseWithSameTestNameTest test case verifies that -// when the user defines two tests with the same test case name AND -// same test name (but in different namespaces), the second test will -// fail. - -namespace foo { - -class MixedUpTestCaseTest : public testing::Test { -}; - -TEST_F(MixedUpTestCaseTest, FirstTestFromNamespaceFoo) {} -TEST_F(MixedUpTestCaseTest, SecondTestFromNamespaceFoo) {} - -class MixedUpTestCaseWithSameTestNameTest : public testing::Test { -}; - -TEST_F(MixedUpTestCaseWithSameTestNameTest, - TheSecondTestWithThisNameShouldFail) {} - -} // namespace foo - -namespace bar { - -class MixedUpTestCaseTest : public testing::Test { -}; - -// The following two tests are expected to fail. We rely on the -// golden file to check that Google Test generates the right error message. -TEST_F(MixedUpTestCaseTest, ThisShouldFail) {} -TEST_F(MixedUpTestCaseTest, ThisShouldFailToo) {} - -class MixedUpTestCaseWithSameTestNameTest : public testing::Test { -}; - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST_F(MixedUpTestCaseWithSameTestNameTest, - TheSecondTestWithThisNameShouldFail) {} - -} // namespace bar - -// The following two test cases verify that Google Test catches the user -// error of mixing TEST and TEST_F in the same test case. The first -// test case checks the scenario where TEST_F appears before TEST, and -// the second one checks where TEST appears before TEST_F. - -class TEST_F_before_TEST_in_same_test_case : public testing::Test { -}; - -TEST_F(TEST_F_before_TEST_in_same_test_case, DefinedUsingTEST_F) {} - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST(TEST_F_before_TEST_in_same_test_case, DefinedUsingTESTAndShouldFail) {} - -class TEST_before_TEST_F_in_same_test_case : public testing::Test { -}; - -TEST(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST) {} - -// Expected to fail. We rely on the golden file to check that Google Test -// generates the right error message. -TEST_F(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST_FAndShouldFail) { -} - -// Used for testing EXPECT_NONFATAL_FAILURE() and EXPECT_FATAL_FAILURE(). -int global_integer = 0; - -// Tests that EXPECT_NONFATAL_FAILURE() can reference global variables. -TEST(ExpectNonfatalFailureTest, CanReferenceGlobalVariables) { - global_integer = 0; - EXPECT_NONFATAL_FAILURE({ - EXPECT_EQ(1, global_integer) << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() can reference local variables -// (static or not). -TEST(ExpectNonfatalFailureTest, CanReferenceLocalVariables) { - int m = 0; - static int n; - n = 1; - EXPECT_NONFATAL_FAILURE({ - EXPECT_EQ(m, n) << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() succeeds when there is exactly -// one non-fatal failure and no fatal failure. -TEST(ExpectNonfatalFailureTest, SucceedsWhenThereIsOneNonfatalFailure) { - EXPECT_NONFATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure."; - }, "Expected non-fatal failure."); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there is no -// non-fatal failure. -TEST(ExpectNonfatalFailureTest, FailsWhenThereIsNoNonfatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there are two -// non-fatal failures. -TEST(ExpectNonfatalFailureTest, FailsWhenThereAreTwoNonfatalFailures) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure 1."; - ADD_FAILURE() << "Expected non-fatal failure 2."; - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when there is one fatal -// failure. -TEST(ExpectNonfatalFailureTest, FailsWhenThereIsOneFatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - FAIL() << "Expected fatal failure."; - }, ""); -} - -// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being -// tested returns. -TEST(ExpectNonfatalFailureTest, FailsWhenStatementReturns) { - printf("(expecting a failure)\n"); - EXPECT_NONFATAL_FAILURE({ - return; - }, ""); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_NONFATAL_FAILURE() fails when the statement being -// tested throws. -TEST(ExpectNonfatalFailureTest, FailsWhenStatementThrows) { - printf("(expecting a failure)\n"); - try { - EXPECT_NONFATAL_FAILURE({ - throw 0; - }, ""); - } catch(int) { // NOLINT - } -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_FATAL_FAILURE() can reference global variables. -TEST(ExpectFatalFailureTest, CanReferenceGlobalVariables) { - global_integer = 0; - EXPECT_FATAL_FAILURE({ - ASSERT_EQ(1, global_integer) << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() can reference local static -// variables. -TEST(ExpectFatalFailureTest, CanReferenceLocalStaticVariables) { - static int n; - n = 1; - EXPECT_FATAL_FAILURE({ - ASSERT_EQ(0, n) << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() succeeds when there is exactly -// one fatal failure and no non-fatal failure. -TEST(ExpectFatalFailureTest, SucceedsWhenThereIsOneFatalFailure) { - EXPECT_FATAL_FAILURE({ - FAIL() << "Expected fatal failure."; - }, "Expected fatal failure."); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there is no fatal -// failure. -TEST(ExpectFatalFailureTest, FailsWhenThereIsNoFatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - }, ""); -} - -// A helper for generating a fatal failure. -void FatalFailure() { - FAIL() << "Expected fatal failure."; -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there are two -// fatal failures. -TEST(ExpectFatalFailureTest, FailsWhenThereAreTwoFatalFailures) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - FatalFailure(); - FatalFailure(); - }, ""); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when there is one non-fatal -// failure. -TEST(ExpectFatalFailureTest, FailsWhenThereIsOneNonfatalFailure) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - ADD_FAILURE() << "Expected non-fatal failure."; - }, ""); -} - -// Tests that EXPECT_FATAL_FAILURE() fails when the statement being -// tested returns. -TEST(ExpectFatalFailureTest, FailsWhenStatementReturns) { - printf("(expecting a failure)\n"); - EXPECT_FATAL_FAILURE({ - return; - }, ""); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests that EXPECT_FATAL_FAILURE() fails when the statement being -// tested throws. -TEST(ExpectFatalFailureTest, FailsWhenStatementThrows) { - printf("(expecting a failure)\n"); - try { - EXPECT_FATAL_FAILURE({ - throw 0; - }, ""); - } catch(int) { // NOLINT - } -} - -#endif // GTEST_HAS_EXCEPTIONS - -// This #ifdef block tests the output of typed tests. -#if GTEST_HAS_TYPED_TEST - -template -class TypedTest : public testing::Test { -}; - -TYPED_TEST_CASE(TypedTest, testing::Types); - -TYPED_TEST(TypedTest, Success) { - EXPECT_EQ(0, TypeParam()); -} - -TYPED_TEST(TypedTest, Failure) { - EXPECT_EQ(1, TypeParam()) << "Expected failure"; -} - -#endif // GTEST_HAS_TYPED_TEST - -// This #ifdef block tests the output of type-parameterized tests. -#if GTEST_HAS_TYPED_TEST_P - -template -class TypedTestP : public testing::Test { -}; - -TYPED_TEST_CASE_P(TypedTestP); - -TYPED_TEST_P(TypedTestP, Success) { - EXPECT_EQ(0U, TypeParam()); -} - -TYPED_TEST_P(TypedTestP, Failure) { - EXPECT_EQ(1U, TypeParam()) << "Expected failure"; -} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP, Success, Failure); - -typedef testing::Types UnsignedTypes; -INSTANTIATE_TYPED_TEST_CASE_P(Unsigned, TypedTestP, UnsignedTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -#if GTEST_HAS_DEATH_TEST - -// We rely on the golden file to verify that tests whose test case -// name ends with DeathTest are run first. - -TEST(ADeathTest, ShouldRunFirst) { -} - -#if GTEST_HAS_TYPED_TEST - -// We rely on the golden file to verify that typed tests whose test -// case name ends with DeathTest are run first. - -template -class ATypedDeathTest : public testing::Test { -}; - -typedef testing::Types NumericTypes; -TYPED_TEST_CASE(ATypedDeathTest, NumericTypes); - -TYPED_TEST(ATypedDeathTest, ShouldRunFirst) { -} - -#endif // GTEST_HAS_TYPED_TEST - -#if GTEST_HAS_TYPED_TEST_P - - -// We rely on the golden file to verify that type-parameterized tests -// whose test case name ends with DeathTest are run first. - -template -class ATypeParamDeathTest : public testing::Test { -}; - -TYPED_TEST_CASE_P(ATypeParamDeathTest); - -TYPED_TEST_P(ATypeParamDeathTest, ShouldRunFirst) { -} - -REGISTER_TYPED_TEST_CASE_P(ATypeParamDeathTest, ShouldRunFirst); - -INSTANTIATE_TYPED_TEST_CASE_P(My, ATypeParamDeathTest, NumericTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -#endif // GTEST_HAS_DEATH_TEST - -// Tests various failure conditions of -// EXPECT_{,NON}FATAL_FAILURE{,_ON_ALL_THREADS}. -class ExpectFailureTest : public testing::Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - enum FailureMode { - FATAL_FAILURE, - NONFATAL_FAILURE - }; - static void AddFailure(FailureMode failure) { - if (failure == FATAL_FAILURE) { - FAIL() << "Expected fatal failure."; - } else { - ADD_FAILURE() << "Expected non-fatal failure."; - } - } -}; - -TEST_F(ExpectFailureTest, ExpectFatalFailure) { - // Expected fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(SUCCEED(), "Expected fatal failure."); - // Expected fatal failure, but got a non-fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Expected non-fatal " - "failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE(AddFailure(FATAL_FAILURE), "Some other fatal failure " - "expected."); -} - -TEST_F(ExpectFailureTest, ExpectNonFatalFailure) { - // Expected non-fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(SUCCEED(), "Expected non-fatal failure."); - // Expected non-fatal failure, but got a fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(AddFailure(FATAL_FAILURE), "Expected fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE(AddFailure(NONFATAL_FAILURE), "Some other non-fatal " - "failure."); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -class ExpectFailureWithThreadsTest : public ExpectFailureTest { - protected: - static void AddFailureInOtherThread(FailureMode failure) { - pthread_t tid; - pthread_create(&tid, - NULL, - ExpectFailureWithThreadsTest::FailureThread, - &failure); - pthread_join(tid, NULL); - } - private: - static void* FailureThread(void* attr) { - FailureMode* failure = static_cast(attr); - AddFailure(*failure); - return NULL; - } -}; - -TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailure) { - // We only intercept the current thread. - printf("(expecting 2 failures)\n"); - EXPECT_FATAL_FAILURE(AddFailureInOtherThread(FATAL_FAILURE), - "Expected fatal failure."); -} - -TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailure) { - // We only intercept the current thread. - printf("(expecting 2 failures)\n"); - EXPECT_NONFATAL_FAILURE(AddFailureInOtherThread(NONFATAL_FAILURE), - "Expected non-fatal failure."); -} - -typedef ExpectFailureWithThreadsTest ScopedFakeTestPartResultReporterTest; - -// Tests that the ScopedFakeTestPartResultReporter only catches failures from -// the current thread if it is instantiated with INTERCEPT_ONLY_CURRENT_THREAD. -TEST_F(ScopedFakeTestPartResultReporterTest, InterceptOnlyCurrentThread) { - printf("(expecting 2 failures)\n"); - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD, - &results); - AddFailureInOtherThread(FATAL_FAILURE); - AddFailureInOtherThread(NONFATAL_FAILURE); - } - // The two failures should not have been intercepted. - EXPECT_EQ(0, results.size()) << "This shouldn't fail."; -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -TEST_F(ExpectFailureTest, ExpectFatalFailureOnAllThreads) { - // Expected fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected fatal failure."); - // Expected fatal failure, but got a non-fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE), - "Expected non-fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE), - "Some other fatal failure expected."); -} - -TEST_F(ExpectFailureTest, ExpectNonFatalFailureOnAllThreads) { - // Expected non-fatal failure, but succeeds. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(SUCCEED(), "Expected non-fatal " - "failure."); - // Expected non-fatal failure, but got a fatal failure. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(FATAL_FAILURE), - "Expected fatal failure."); - // Wrong message. - printf("(expecting 1 failure)\n"); - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddFailure(NONFATAL_FAILURE), - "Some other non-fatal failure."); -} - - -// Two test environments for testing testing::AddGlobalTestEnvironment(). - -class FooEnvironment : public testing::Environment { - public: - virtual void SetUp() { - printf("%s", "FooEnvironment::SetUp() called.\n"); - } - - virtual void TearDown() { - printf("%s", "FooEnvironment::TearDown() called.\n"); - FAIL() << "Expected fatal failure."; - } -}; - -class BarEnvironment : public testing::Environment { - public: - virtual void SetUp() { - printf("%s", "BarEnvironment::SetUp() called.\n"); - } - - virtual void TearDown() { - printf("%s", "BarEnvironment::TearDown() called.\n"); - ADD_FAILURE() << "Expected non-fatal failure."; - } -}; - -GTEST_DEFINE_bool_(internal_skip_environment_and_ad_hoc_tests, false, - "This flag causes the program to skip test environment " - "tests and ad hoc tests."); - -// The main function. -// -// The idea is to use Google Test to run all the tests we have defined (some -// of them are intended to fail), and then compare the test results -// with the "golden" file. -int main(int argc, char **argv) { - testing::GTEST_FLAG(print_time) = false; - - // We just run the tests, knowing some of them are intended to fail. - // We will use a separate Python script to compare the output of - // this program with the golden file. - - // It's hard to test InitGoogleTest() directly, as it has many - // global side effects. The following line serves as a sanity test - // for it. - testing::InitGoogleTest(&argc, argv); - if (argc >= 2 && - String(argv[1]) == "--gtest_internal_skip_environment_and_ad_hoc_tests") - GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests) = true; - -#if GTEST_HAS_DEATH_TEST - if (testing::internal::GTEST_FLAG(internal_run_death_test) != "") { - // Skip the usual output capturing if we're running as the child - // process of an threadsafe-style death test. -#if GTEST_OS_WINDOWS - posix::FReopen("nul:", "w", stdout); -#else - posix::FReopen("/dev/null", "w", stdout); -#endif // GTEST_OS_WINDOWS - return RUN_ALL_TESTS(); - } -#endif // GTEST_HAS_DEATH_TEST - - if (GTEST_FLAG(internal_skip_environment_and_ad_hoc_tests)) - return RUN_ALL_TESTS(); - - // Registers two global test environments. - // The golden file verifies that they are set up in the order they - // are registered, and torn down in the reverse order. - testing::AddGlobalTestEnvironment(new FooEnvironment); - testing::AddGlobalTestEnvironment(new BarEnvironment); - - return RunAllTests(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_lin.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_lin.txt deleted file mode 100644 index 51bae52d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_lin.txt +++ /dev/null @@ -1,634 +0,0 @@ -The non-test part of the code is expected to have 2 failures. - -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -gtest_output_test_.cc:#: Failure -Value of: 3 -Expected: 2 -[==========] Running 56 tests from 23 test cases. -[----------] Global test environment set-up. -FooEnvironment::SetUp() called. -BarEnvironment::SetUp() called. -[----------] 1 test from ADeathTest -[ RUN ] ADeathTest.ShouldRunFirst -[ OK ] ADeathTest.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/0, where TypeParam = int -[ RUN ] ATypedDeathTest/0.ShouldRunFirst -[ OK ] ATypedDeathTest/0.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/1, where TypeParam = double -[ RUN ] ATypedDeathTest/1.ShouldRunFirst -[ OK ] ATypedDeathTest/1.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int -[ RUN ] My/ATypeParamDeathTest/0.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/0.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double -[ RUN ] My/ATypeParamDeathTest/1.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/1.ShouldRunFirst -[----------] 2 tests from PassingTest -[ RUN ] PassingTest.PassingTest1 -[ OK ] PassingTest.PassingTest1 -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[----------] 5 tests from SCOPED_TRACETest -[ RUN ] SCOPED_TRACETest.ObeysScopes -(expected to fail) -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and shouldn't have a trace. -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should have a trace. -Google Test trace: -gtest_output_test_.cc:#: Expected trace -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and shouldn't have a trace. -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ RUN ] SCOPED_TRACETest.WorksInLoop -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: i = 1 -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: i = 2 -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ RUN ] SCOPED_TRACETest.WorksInSubroutine -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: n = 1 -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ RUN ] SCOPED_TRACETest.CanBeNested -(expected to fail) -gtest_output_test_.cc:#: Failure -Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -gtest_output_test_.cc:#: -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ RUN ] SCOPED_TRACETest.CanBeRepeated -(expected to fail) -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A. -Google Test trace: -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A and B. -Google Test trace: -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A, B, and C. -Google Test trace: -gtest_output_test_.cc:#: C -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: Failure -Failed -This failure is expected, and should contain trace point A, B, and D. -Google Test trace: -gtest_output_test_.cc:#: D -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[----------] 1 test from NonFatalFailureInFixtureConstructorTest -[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 5 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in the test body. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #4, in TearDown. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #5, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from FatalFailureInFixtureConstructorTest -[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 2 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in the test fixture d'tor. -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from NonFatalFailureInSetUpTest -[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp -(expecting 4 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in the test function. -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in TearDown(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #4, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from FatalFailureInSetUpTest -[ RUN ] FatalFailureInSetUpTest.FailureInSetUp -(expecting 3 failures) -gtest_output_test_.cc:#: Failure -Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: Failure -Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[----------] 4 tests from MixedUpTestCaseTest -[ RUN ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.ThisShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseWithSameTestNameTest, -you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[----------] 2 tests from TEST_F_before_TEST_in_same_test_case -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_F_before_TEST_in_same_test_case, -test DefinedUsingTEST_F is defined using TEST_F but -test DefinedUsingTESTAndShouldFail is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[----------] 2 tests from TEST_before_TEST_F_in_same_test_case -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -gtest.cc:#: Failure -Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_before_TEST_F_in_same_test_case, -test DefinedUsingTEST_FAndShouldFail is defined using TEST_F but -test DefinedUsingTEST is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[----------] 8 tests from ExpectNonfatalFailureTest -[ RUN ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ RUN ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 1. - -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 2. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[----------] 8 tests from ExpectFatalFailureTest -[ RUN ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ RUN ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[----------] 2 tests from TypedTest/0, where TypeParam = int -[ RUN ] TypedTest/0.Success -[ OK ] TypedTest/0.Success -[ RUN ] TypedTest/0.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] TypedTest/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char -[ RUN ] Unsigned/TypedTestP/0.Success -[ OK ] Unsigned/TypedTestP/0.Success -[ RUN ] Unsigned/TypedTestP/0.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: \0 -Expected: 1U -Which is: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int -[ RUN ] Unsigned/TypedTestP/1.Success -[ OK ] Unsigned/TypedTestP/1.Success -[ RUN ] Unsigned/TypedTestP/1.Failure -gtest_output_test_.cc:#: Failure -Value of: TypeParam() - Actual: 0 -Expected: 1U -Which is: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/1.Failure -[----------] 4 tests from ExpectFailureTest -[ RUN ] ExpectFailureTest.ExpectFatalFailure -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ RUN ] ExpectFailureTest.ExpectNonFatalFailure -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ RUN ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ RUN ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: Failure -Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -[----------] Global test environment tear-down -BarEnvironment::TearDown() called. -gtest_output_test_.cc:#: Failure -Failed -Expected non-fatal failure. -FooEnvironment::TearDown() called. -gtest_output_test_.cc:#: Failure -Failed -Expected fatal failure. -[==========] 56 tests from 23 test cases ran. -[ PASSED ] 21 tests. -[ FAILED ] 35 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[ FAILED ] TypedTest/0.Failure, where TypeParam = int -[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char -[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads - -35 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = FatalFailureTest.*:LoggingTest.* -[==========] Running 4 tests from 2 test cases. -[----------] Global test environment set-up. -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms) -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: Failure -Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms) -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: Failure -Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine (? ms) -[----------] 3 tests from FatalFailureTest (? ms total) - -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: Failure -Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions (? ms) -[----------] 1 test from LoggingTest (? ms total) - -[----------] Global test environment tear-down -[==========] 4 tests from 2 test cases ran. (? ms total) -[ PASSED ] 0 tests. -[ FAILED ] 4 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions - - 4 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = *DISABLED_* -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from DisabledTestsWarningTest -[ RUN ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[ OK ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. -Note: Google Test filter = PassingTest.* -Note: This is test shard 1 of 2. -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from PassingTest -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. - - YOU HAVE 1 DISABLED TEST - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_win.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_win.txt deleted file mode 100644 index 313c3aaf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_output_test_golden_win.txt +++ /dev/null @@ -1,605 +0,0 @@ -The non-test part of the code is expected to have 2 failures. - -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -gtest_output_test_.cc:#: error: Value of: 3 -Expected: 2 -[==========] Running 61 tests from 27 test cases. -[----------] Global test environment set-up. -FooEnvironment::SetUp() called. -BarEnvironment::SetUp() called. -[----------] 1 test from ADeathTest -[ RUN ] ADeathTest.ShouldRunFirst -[ OK ] ADeathTest.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/0, where TypeParam = int -[ RUN ] ATypedDeathTest/0.ShouldRunFirst -[ OK ] ATypedDeathTest/0.ShouldRunFirst -[----------] 1 test from ATypedDeathTest/1, where TypeParam = double -[ RUN ] ATypedDeathTest/1.ShouldRunFirst -[ OK ] ATypedDeathTest/1.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/0, where TypeParam = int -[ RUN ] My/ATypeParamDeathTest/0.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/0.ShouldRunFirst -[----------] 1 test from My/ATypeParamDeathTest/1, where TypeParam = double -[ RUN ] My/ATypeParamDeathTest/1.ShouldRunFirst -[ OK ] My/ATypeParamDeathTest/1.ShouldRunFirst -[----------] 2 tests from PassingTest -[ RUN ] PassingTest.PassingTest1 -[ OK ] PassingTest.PassingTest1 -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[----------] 5 tests from SCOPED_TRACETest -[ RUN ] SCOPED_TRACETest.ObeysScopes -(expected to fail) -gtest_output_test_.cc:#: error: Failed -This failure is expected, and shouldn't have a trace. -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should have a trace. -Google Test trace: -gtest_output_test_.cc:#: Expected trace -gtest_output_test_.cc:#: error: Failed -This failure is expected, and shouldn't have a trace. -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ RUN ] SCOPED_TRACETest.WorksInLoop -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: i = 1 -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: i = 2 -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ RUN ] SCOPED_TRACETest.WorksInSubroutine -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 1 -Expected: 2 -Google Test trace: -gtest_output_test_.cc:#: n = 1 -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ RUN ] SCOPED_TRACETest.CanBeNested -(expected to fail) -gtest_output_test_.cc:#: error: Value of: n - Actual: 2 -Expected: 1 -Google Test trace: -gtest_output_test_.cc:#: n = 2 -gtest_output_test_.cc:#: -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ RUN ] SCOPED_TRACETest.CanBeRepeated -(expected to fail) -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A. -Google Test trace: -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A and B. -Google Test trace: -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A, B, and C. -Google Test trace: -gtest_output_test_.cc:#: C -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -gtest_output_test_.cc:#: error: Failed -This failure is expected, and should contain trace point A, B, and D. -Google Test trace: -gtest_output_test_.cc:#: D -gtest_output_test_.cc:#: B -gtest_output_test_.cc:#: A -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[----------] 1 test from NonFatalFailureInFixtureConstructorTest -[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 5 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test body. -gtest_output_test_.cc:#: error: Failed -Expected failure #4, in TearDown. -gtest_output_test_.cc:#: error: Failed -Expected failure #5, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from FatalFailureInFixtureConstructorTest -[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor -(expecting 2 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in the test fixture c'tor. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in the test fixture d'tor. -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[----------] 1 test from NonFatalFailureInSetUpTest -[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp -(expecting 4 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in the test function. -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #4, in the test fixture d'tor. -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from FatalFailureInSetUpTest -[ RUN ] FatalFailureInSetUpTest.FailureInSetUp -(expecting 3 failures) -gtest_output_test_.cc:#: error: Failed -Expected failure #1, in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[----------] 1 test from ExceptionInFixtureCtorTest -[ RUN ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor -(expecting a failure on thrown exception in the test fixture's constructor) -unknown file: error: Exception thrown with code 0xc0000005 in the test fixture's constructor. -[----------] 1 test from ExceptionInSetUpTest -[ RUN ] ExceptionInSetUpTest.ExceptionInSetUp -(expecting 3 failures) -unknown file: error: Exception thrown with code 0xc0000005 in SetUp(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp -[----------] 2 tests from ExceptionInTestFunctionTest -[ RUN ] ExceptionInTestFunctionTest.SEH -(expecting 3 failures) -unknown file: error: Exception thrown with code 0xc0000005 in the test body. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] ExceptionInTestFunctionTest.SEH -[ RUN ] ExceptionInTestFunctionTest.CppException -unknown file: error: Exception thrown with code 0xe06d7363 in the test body. -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #3, in the test fixture d'tor. -[ FAILED ] ExceptionInTestFunctionTest.CppException -[----------] 1 test from ExceptionInTearDownTest -[ RUN ] ExceptionInTearDownTest.ExceptionInTearDown -(expecting 2 failures) -unknown file: error: Exception thrown with code 0xe06d7363 in TearDown(). -gtest_output_test_.cc:#: error: Failed -Expected failure #2, in the test fixture d'tor. -[ FAILED ] ExceptionInTearDownTest.ExceptionInTearDown -[----------] 4 tests from MixedUpTestCaseTest -[ RUN ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.FirstTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo -[ RUN ] MixedUpTestCaseTest.ThisShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseTest, -you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[----------] 2 tests from MixedUpTestCaseWithSameTestNameTest -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class. However, in test case MixedUpTestCaseWithSameTestNameTest, -you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail -using two different test fixture classes. This can happen if -the two classes are from different namespaces or translation -units and have the same name. You should probably rename one -of the classes to put the tests into different test cases. -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[----------] 2 tests from TEST_F_before_TEST_in_same_test_case -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F -[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_F_before_TEST_in_same_test_case, -test DefinedUsingTEST_F is defined using TEST_F but -test DefinedUsingTESTAndShouldFail is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[----------] 2 tests from TEST_before_TEST_F_in_same_test_case -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST -[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -gtest.cc:#: error: Failed -All tests in the same test case must use the same test fixture -class, so mixing TEST_F and TEST in the same test case is -illegal. In test case TEST_before_TEST_F_in_same_test_case, -test DefinedUsingTEST_FAndShouldFail is defined using TEST_F but -test DefinedUsingTEST is defined using TEST. You probably -want to change the TEST to TEST_F or move it to another test -case. -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[----------] 8 tests from ExpectNonfatalFailureTest -[ RUN ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ OK ] ExpectNonfatalFailureTest.CanReferenceLocalVariables -[ RUN ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 1. - -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure 2. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: 0 failures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[----------] 8 tests from ExpectFatalFailureTest -[ RUN ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ OK ] ExpectFatalFailureTest.CanReferenceGlobalVariables -[ RUN ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ OK ] ExpectFatalFailureTest.CanReferenceLocalStaticVariables -[ RUN ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 2 failures -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ RUN ] ExpectFatalFailureTest.FailsWhenStatementThrows -(expecting a failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: 0 failures -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[----------] 2 tests from TypedTest/0, where TypeParam = int -[ RUN ] TypedTest/0.Success -[ OK ] TypedTest/0.Success -[ RUN ] TypedTest/0.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: 0 -Expected: 1 -Expected failure -[ FAILED ] TypedTest/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char -[ RUN ] Unsigned/TypedTestP/0.Success -[ OK ] Unsigned/TypedTestP/0.Success -[ RUN ] Unsigned/TypedTestP/0.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: \0 -Expected: 1U -Which is: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/0.Failure -[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int -[ RUN ] Unsigned/TypedTestP/1.Success -[ OK ] Unsigned/TypedTestP/1.Success -[ RUN ] Unsigned/TypedTestP/1.Failure -gtest_output_test_.cc:#: error: Value of: TypeParam() - Actual: 0 -Expected: 1U -Which is: 1 -Expected failure -[ FAILED ] Unsigned/TypedTestP/1.Failure -[----------] 4 tests from ExpectFailureTest -[ RUN ] ExpectFailureTest.ExpectFatalFailure -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ RUN ] ExpectFailureTest.ExpectNonFatalFailure -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ RUN ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 fatal failure containing "Some other fatal failure expected." - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ RUN ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Success: -Succeeded - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure - Actual: -gtest_output_test_.cc:#: Fatal failure: -Failed -Expected fatal failure. - -(expecting 1 failure) -gtest.cc:#: error: Expected: 1 non-fatal failure containing "Some other non-fatal failure." - Actual: -gtest_output_test_.cc:#: Non-fatal failure: -Failed -Expected non-fatal failure. - -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads -[----------] Global test environment tear-down -BarEnvironment::TearDown() called. -gtest_output_test_.cc:#: error: Failed -Expected non-fatal failure. -FooEnvironment::TearDown() called. -gtest_output_test_.cc:#: error: Failed -Expected fatal failure. -[==========] 61 tests from 27 test cases ran. -[ PASSED ] 21 tests. -[ FAILED ] 40 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions -[ FAILED ] SCOPED_TRACETest.ObeysScopes -[ FAILED ] SCOPED_TRACETest.WorksInLoop -[ FAILED ] SCOPED_TRACETest.WorksInSubroutine -[ FAILED ] SCOPED_TRACETest.CanBeNested -[ FAILED ] SCOPED_TRACETest.CanBeRepeated -[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor -[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp -[ FAILED ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor -[ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp -[ FAILED ] ExceptionInTestFunctionTest.SEH -[ FAILED ] ExceptionInTestFunctionTest.CppException -[ FAILED ] ExceptionInTearDownTest.ExceptionInTearDown -[ FAILED ] MixedUpTestCaseTest.ThisShouldFail -[ FAILED ] MixedUpTestCaseTest.ThisShouldFailToo -[ FAILED ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail -[ FAILED ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail -[ FAILED ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementThrows -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures -[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns -[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementThrows -[ FAILED ] TypedTest/0.Failure, where TypeParam = int -[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char -[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int -[ FAILED ] ExpectFailureTest.ExpectFatalFailure -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailure -[ FAILED ] ExpectFailureTest.ExpectFatalFailureOnAllThreads -[ FAILED ] ExpectFailureTest.ExpectNonFatalFailureOnAllThreads - -40 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = FatalFailureTest.*:LoggingTest.* -[==========] Running 4 tests from 2 test cases. -[----------] Global test environment set-up. -[----------] 3 tests from FatalFailureTest -[ RUN ] FatalFailureTest.FatalFailureInSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms) -[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine -(expecting a failure that x should be 1) -gtest_output_test_.cc:#: error: Value of: x - Actual: 2 -Expected: 1 -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms) -[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine -(expecting a failure on false) -gtest_output_test_.cc:#: error: Value of: false - Actual: false -Expected: true -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine (? ms) -[----------] 3 tests from FatalFailureTest (? ms total) - -[----------] 1 test from LoggingTest -[ RUN ] LoggingTest.InterleavingLoggingAndAssertions -(expecting 2 failures on (3) >= (a[i])) -i == 0 -i == 1 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 9 -i == 2 -i == 3 -gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 6 -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions (? ms) -[----------] 1 test from LoggingTest (? ms total) - -[----------] Global test environment tear-down -[==========] 4 tests from 2 test cases ran. (? ms total) -[ PASSED ] 0 tests. -[ FAILED ] 4 tests, listed below: -[ FAILED ] FatalFailureTest.FatalFailureInSubroutine -[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine -[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine -[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions - - 4 FAILED TESTS - YOU HAVE 1 DISABLED TEST - -Note: Google Test filter = *DISABLED_* -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from DisabledTestsWarningTest -[ RUN ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[ OK ] DisabledTestsWarningTest.DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. -Note: Google Test filter = PassingTest.* -Note: This is test shard 1 of 2. -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from PassingTest -[ RUN ] PassingTest.PassingTest2 -[ OK ] PassingTest.PassingTest2 -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. -[ PASSED ] 1 test. - - YOU HAVE 1 DISABLED TEST - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_pred_impl_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_pred_impl_unittest.cc deleted file mode 100644 index e7ee54b5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_pred_impl_unittest.cc +++ /dev/null @@ -1,2432 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is AUTOMATICALLY GENERATED on 10/02/2008 by command -// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! - -// Regression test for gtest_pred_impl.h -// -// This file is generated by a script and quite long. If you intend to -// learn how Google Test works by reading its unit tests, read -// gtest_unittest.cc instead. -// -// This is intended as a regression test for the Google Test predicate -// assertions. We compile it as part of the gtest_unittest target -// only to keep the implementation tidy and compact, as it is quite -// involved to set up the stage for testing Google Test using Google -// Test itself. -// -// Currently, gtest_unittest takes ~11 seconds to run in the testing -// daemon. In the future, if it grows too large and needs much more -// time to finish, we should consider separating this file into a -// stand-alone regression test. - -#include - -#include -#include - -// A user-defined data type. -struct Bool { - explicit Bool(int val) : value(val != 0) {} - - bool operator>(int n) const { return value > Bool(n).value; } - - Bool operator+(const Bool& rhs) const { return Bool(value + rhs.value); } - - bool operator==(const Bool& rhs) const { return value == rhs.value; } - - bool value; -}; - -// Enables Bool to be used in assertions. -std::ostream& operator<<(std::ostream& os, const Bool& x) { - return os << (x.value ? "true" : "false"); -} - -// Sample functions/functors for testing unary predicate assertions. - -// A unary predicate function. -template -bool PredFunction1(T1 v1) { - return v1 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction1Int(int v1) { - return v1 > 0; -} -bool PredFunction1Bool(Bool v1) { - return v1 > 0; -} - -// A unary predicate functor. -struct PredFunctor1 { - template - bool operator()(const T1& v1) { - return v1 > 0; - } -}; - -// A unary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction1(const char* e1, - const T1& v1) { - if (PredFunction1(v1)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 - << " is expected to be positive, but evaluates to " - << v1 << "."; - return testing::AssertionFailure(msg); -} - -// A unary predicate-formatter functor. -struct PredFormatFunctor1 { - template - testing::AssertionResult operator()(const char* e1, - const T1& v1) const { - return PredFormatFunction1(e1, v1); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT1. - -class Predicate1Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; -}; - -bool Predicate1Test::expected_to_finish_; -bool Predicate1Test::finished_; -int Predicate1Test::n1_; - -typedef Predicate1Test EXPECT_PRED_FORMAT1Test; -typedef Predicate1Test ASSERT_PRED_FORMAT1Test; -typedef Predicate1Test EXPECT_PRED1Test; -typedef Predicate1Test ASSERT_PRED1Test; - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED1(PredFunction1Int, - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED1(PredFunction1Bool, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED1(PredFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED1(PredFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunction1Int, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunction1Bool, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(PredFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED1(PredFunction1Int, - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED1(PredFunction1Bool, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED1(PredFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED1(PredFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunction1Int, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunction1Bool, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED1Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED1Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED1(PredFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunction1, - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunction1, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunction1, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunction1, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunction1, - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunction1, - Bool(++n1_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - ++n1_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(++n1_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunction1, - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunction1, - Bool(n1_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - n1_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT1 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT1Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(PredFormatFunctor1(), - Bool(n1_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing binary predicate assertions. - -// A binary predicate function. -template -bool PredFunction2(T1 v1, T2 v2) { - return v1 + v2 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction2Int(int v1, int v2) { - return v1 + v2 > 0; -} -bool PredFunction2Bool(Bool v1, Bool v2) { - return v1 + v2 > 0; -} - -// A binary predicate functor. -struct PredFunctor2 { - template - bool operator()(const T1& v1, - const T2& v2) { - return v1 + v2 > 0; - } -}; - -// A binary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction2(const char* e1, - const char* e2, - const T1& v1, - const T2& v2) { - if (PredFunction2(v1, v2)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 - << " is expected to be positive, but evaluates to " - << v1 + v2 << "."; - return testing::AssertionFailure(msg); -} - -// A binary predicate-formatter functor. -struct PredFormatFunctor2 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const T1& v1, - const T2& v2) const { - return PredFormatFunction2(e1, e2, v1, v2); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT2. - -class Predicate2Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; -}; - -bool Predicate2Test::expected_to_finish_; -bool Predicate2Test::finished_; -int Predicate2Test::n1_; -int Predicate2Test::n2_; - -typedef Predicate2Test EXPECT_PRED_FORMAT2Test; -typedef Predicate2Test ASSERT_PRED_FORMAT2Test; -typedef Predicate2Test EXPECT_PRED2Test; -typedef Predicate2Test ASSERT_PRED2Test; - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED2(PredFunction2Int, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED2(PredFunction2Bool, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED2(PredFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED2(PredFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunction2Int, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunction2Bool, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(PredFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED2(PredFunction2Int, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED2(PredFunction2Bool, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED2(PredFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED2(PredFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunction2Int, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunction2Bool, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED2Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED2Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED2(PredFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunction2, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunction2, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunction2, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunction2, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunction2, - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunction2, - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - ++n1_, - ++n2_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(++n1_), - Bool(++n2_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunction2, - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunction2, - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - n1_++, - n2_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT2 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT2Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(PredFormatFunctor2(), - Bool(n1_++), - Bool(n2_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing ternary predicate assertions. - -// A ternary predicate function. -template -bool PredFunction3(T1 v1, T2 v2, T3 v3) { - return v1 + v2 + v3 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction3Int(int v1, int v2, int v3) { - return v1 + v2 + v3 > 0; -} -bool PredFunction3Bool(Bool v1, Bool v2, Bool v3) { - return v1 + v2 + v3 > 0; -} - -// A ternary predicate functor. -struct PredFunctor3 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3) { - return v1 + v2 + v3 > 0; - } -}; - -// A ternary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction3(const char* e1, - const char* e2, - const char* e3, - const T1& v1, - const T2& v2, - const T3& v3) { - if (PredFunction3(v1, v2, v3)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 << "."; - return testing::AssertionFailure(msg); -} - -// A ternary predicate-formatter functor. -struct PredFormatFunctor3 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const T1& v1, - const T2& v2, - const T3& v3) const { - return PredFormatFunction3(e1, e2, e3, v1, v2, v3); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT3. - -class Predicate3Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; -}; - -bool Predicate3Test::expected_to_finish_; -bool Predicate3Test::finished_; -int Predicate3Test::n1_; -int Predicate3Test::n2_; -int Predicate3Test::n3_; - -typedef Predicate3Test EXPECT_PRED_FORMAT3Test; -typedef Predicate3Test ASSERT_PRED_FORMAT3Test; -typedef Predicate3Test EXPECT_PRED3Test; -typedef Predicate3Test ASSERT_PRED3Test; - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED3(PredFunction3Int, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED3(PredFunction3Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED3(PredFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED3(PredFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunction3Int, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunction3Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(PredFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED3(PredFunction3Int, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED3(PredFunction3Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED3(PredFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED3(PredFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunction3Int, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunction3Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED3Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED3Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(PredFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunction3, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunction3, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunction3, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunction3, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunction3, - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunction3, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - ++n1_, - ++n2_, - ++n3_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunction3, - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunction3, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - n1_++, - n2_++, - n3_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT3 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT3Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT3(PredFormatFunctor3(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing 4-ary predicate assertions. - -// A 4-ary predicate function. -template -bool PredFunction4(T1 v1, T2 v2, T3 v3, T4 v4) { - return v1 + v2 + v3 + v4 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction4Int(int v1, int v2, int v3, int v4) { - return v1 + v2 + v3 + v4 > 0; -} -bool PredFunction4Bool(Bool v1, Bool v2, Bool v3, Bool v4) { - return v1 + v2 + v3 + v4 > 0; -} - -// A 4-ary predicate functor. -struct PredFunctor4 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - return v1 + v2 + v3 + v4 > 0; - } -}; - -// A 4-ary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction4(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) { - if (PredFunction4(v1, v2, v3, v4)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 + v4 << "."; - return testing::AssertionFailure(msg); -} - -// A 4-ary predicate-formatter functor. -struct PredFormatFunctor4 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4) const { - return PredFormatFunction4(e1, e2, e3, e4, v1, v2, v3, v4); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT4. - -class Predicate4Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = n4_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - EXPECT_EQ(1, n4_) << - "The predicate assertion didn't evaluate argument 5 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; - static int n4_; -}; - -bool Predicate4Test::expected_to_finish_; -bool Predicate4Test::finished_; -int Predicate4Test::n1_; -int Predicate4Test::n2_; -int Predicate4Test::n3_; -int Predicate4Test::n4_; - -typedef Predicate4Test EXPECT_PRED_FORMAT4Test; -typedef Predicate4Test ASSERT_PRED_FORMAT4Test; -typedef Predicate4Test EXPECT_PRED4Test; -typedef Predicate4Test ASSERT_PRED4Test; - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED4(PredFunction4Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED4(PredFunction4Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED4(PredFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED4(PredFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunction4Int, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunction4Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED4(PredFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED4(PredFunction4Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED4(PredFunction4Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED4(PredFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED4(PredFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunction4Int, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunction4Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED4Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED4Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED4(PredFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunction4, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunction4, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunction4, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunction4, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunction4, - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunction4, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - ++n1_, - ++n2_, - ++n3_, - ++n4_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunction4, - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunction4, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - n1_++, - n2_++, - n3_++, - n4_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT4 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT4Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT4(PredFormatFunctor4(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++)); - finished_ = true; - }, ""); -} -// Sample functions/functors for testing 5-ary predicate assertions. - -// A 5-ary predicate function. -template -bool PredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} - -// The following two functions are needed to circumvent a bug in -// gcc 2.95.3, which sometimes has problem with the above template -// function. -bool PredFunction5Int(int v1, int v2, int v3, int v4, int v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} -bool PredFunction5Bool(Bool v1, Bool v2, Bool v3, Bool v4, Bool v5) { - return v1 + v2 + v3 + v4 + v5 > 0; -} - -// A 5-ary predicate functor. -struct PredFunctor5 { - template - bool operator()(const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - return v1 + v2 + v3 + v4 + v5 > 0; - } -}; - -// A 5-ary predicate-formatter function. -template -testing::AssertionResult PredFormatFunction5(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) { - if (PredFunction5(v1, v2, v3, v4, v5)) - return testing::AssertionSuccess(); - - testing::Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5 - << " is expected to be positive, but evaluates to " - << v1 + v2 + v3 + v4 + v5 << "."; - return testing::AssertionFailure(msg); -} - -// A 5-ary predicate-formatter functor. -struct PredFormatFunctor5 { - template - testing::AssertionResult operator()(const char* e1, - const char* e2, - const char* e3, - const char* e4, - const char* e5, - const T1& v1, - const T2& v2, - const T3& v3, - const T4& v4, - const T5& v5) const { - return PredFormatFunction5(e1, e2, e3, e4, e5, v1, v2, v3, v4, v5); - } -}; - -// Tests for {EXPECT|ASSERT}_PRED_FORMAT5. - -class Predicate5Test : public testing::Test { - protected: - virtual void SetUp() { - expected_to_finish_ = true; - finished_ = false; - n1_ = n2_ = n3_ = n4_ = n5_ = 0; - } - - virtual void TearDown() { - // Verifies that each of the predicate's arguments was evaluated - // exactly once. - EXPECT_EQ(1, n1_) << - "The predicate assertion didn't evaluate argument 2 " - "exactly once."; - EXPECT_EQ(1, n2_) << - "The predicate assertion didn't evaluate argument 3 " - "exactly once."; - EXPECT_EQ(1, n3_) << - "The predicate assertion didn't evaluate argument 4 " - "exactly once."; - EXPECT_EQ(1, n4_) << - "The predicate assertion didn't evaluate argument 5 " - "exactly once."; - EXPECT_EQ(1, n5_) << - "The predicate assertion didn't evaluate argument 6 " - "exactly once."; - - // Verifies that the control flow in the test function is expected. - if (expected_to_finish_ && !finished_) { - FAIL() << "The predicate assertion unexpactedly aborted the test."; - } else if (!expected_to_finish_ && finished_) { - FAIL() << "The failed predicate assertion didn't abort the test " - "as expected."; - } - } - - // true iff the test function is expected to run to finish. - static bool expected_to_finish_; - - // true iff the test function did run to finish. - static bool finished_; - - static int n1_; - static int n2_; - static int n3_; - static int n4_; - static int n5_; -}; - -bool Predicate5Test::expected_to_finish_; -bool Predicate5Test::finished_; -int Predicate5Test::n1_; -int Predicate5Test::n2_; -int Predicate5Test::n3_; -int Predicate5Test::n4_; -int Predicate5Test::n5_; - -typedef Predicate5Test EXPECT_PRED_FORMAT5Test; -typedef Predicate5Test ASSERT_PRED_FORMAT5Test; -typedef Predicate5Test EXPECT_PRED5Test; -typedef Predicate5Test ASSERT_PRED5Test; - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED5(PredFunction5Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED5(PredFunction5Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED5(PredFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED5(PredFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunction5Int, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunction5Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED5(PredFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED5(PredFunction5Int, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED5(PredFunction5Bool, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED5(PredFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED5(PredFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunction5Int, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunction5Bool, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED5Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED5Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED5(PredFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunction5, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunction5, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) { - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunction5, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunction5, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed EXPECT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(EXPECT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) { - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunction5, - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunction5, - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - ++n1_, - ++n2_, - ++n3_, - ++n4_, - ++n5_); - finished_ = true; -} - -// Tests a successful ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeSuccess) { - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(++n1_), - Bool(++n2_), - Bool(++n3_), - Bool(++n4_), - Bool(++n5_)); - finished_ = true; -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunction5, - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a function on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctionOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunction5, - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a built-in type (int). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnBuiltInTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - n1_++, - n2_++, - n3_++, - n4_++, - n5_++); - finished_ = true; - }, ""); -} - -// Tests a failed ASSERT_PRED_FORMAT5 where the -// predicate-formatter is a functor on a user-defined type (Bool). -TEST_F(ASSERT_PRED_FORMAT5Test, FunctorOnUserTypeFailure) { - expected_to_finish_ = false; - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(PredFormatFunctor5(), - Bool(n1_++), - Bool(n2_++), - Bool(n3_++), - Bool(n4_++), - Bool(n5_++)); - finished_ = true; - }, ""); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_prod_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_prod_test.cc deleted file mode 100644 index bc3201d0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_prod_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Unit test for include/gtest/gtest_prod.h. - -#include -#include "test/production.h" - -// Tests that private members can be accessed from a TEST declared as -// a friend of the class. -TEST(PrivateCodeTest, CanAccessPrivateMembers) { - PrivateCode a; - EXPECT_EQ(0, a.x_); - - a.set_x(1); - EXPECT_EQ(1, a.x_); -} - -typedef testing::Test PrivateCodeFixtureTest; - -// Tests that private members can be accessed from a TEST_F declared -// as a friend of the class. -TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) { - PrivateCode a; - EXPECT_EQ(0, a.x_); - - a.set_x(2); - EXPECT_EQ(2, a.x_); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_repeat_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_repeat_test.cc deleted file mode 100644 index df6868b8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_repeat_test.cc +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests the --gtest_repeat=number flag. - -#include -#include -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { - -GTEST_DECLARE_string_(death_test_style); -GTEST_DECLARE_string_(filter); -GTEST_DECLARE_int32_(repeat); - -} // namespace testing - -using testing::GTEST_FLAG(death_test_style); -using testing::GTEST_FLAG(filter); -using testing::GTEST_FLAG(repeat); - -namespace { - -// We need this when we are testing Google Test itself and therefore -// cannot use Google Test assertions. -#define GTEST_CHECK_INT_EQ_(expected, actual) \ - do {\ - const int expected_val = (expected);\ - const int actual_val = (actual);\ - if (::testing::internal::IsTrue(expected_val != actual_val)) {\ - ::std::cout << "Value of: " #actual "\n"\ - << " Actual: " << actual_val << "\n"\ - << "Expected: " #expected "\n"\ - << "Which is: " << expected_val << "\n";\ - abort();\ - }\ - } while(::testing::internal::AlwaysFalse()) - - -// Used for verifying that global environment set-up and tear-down are -// inside the gtest_repeat loop. - -int g_environment_set_up_count = 0; -int g_environment_tear_down_count = 0; - -class MyEnvironment : public testing::Environment { - public: - MyEnvironment() {} - virtual void SetUp() { g_environment_set_up_count++; } - virtual void TearDown() { g_environment_tear_down_count++; } -}; - -// A test that should fail. - -int g_should_fail_count = 0; - -TEST(FooTest, ShouldFail) { - g_should_fail_count++; - EXPECT_EQ(0, 1) << "Expected failure."; -} - -// A test that should pass. - -int g_should_pass_count = 0; - -TEST(FooTest, ShouldPass) { - g_should_pass_count++; -} - -// A test that contains a thread-safe death test and a fast death -// test. It should pass. - -int g_death_test_count = 0; - -TEST(BarDeathTest, ThreadSafeAndFast) { - g_death_test_count++; - - GTEST_FLAG(death_test_style) = "threadsafe"; - EXPECT_DEATH_IF_SUPPORTED(abort(), ""); - - GTEST_FLAG(death_test_style) = "fast"; - EXPECT_DEATH_IF_SUPPORTED(abort(), ""); -} - -#if GTEST_HAS_PARAM_TEST -int g_param_test_count = 0; - -const int kNumberOfParamTests = 10; - -class MyParamTest : public testing::TestWithParam {}; - -TEST_P(MyParamTest, ShouldPass) { - // TODO(vladl@google.com): Make parameter value checking robust - // WRT order of tests. - GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); - g_param_test_count++; -} -INSTANTIATE_TEST_CASE_P(MyParamSequence, - MyParamTest, - testing::Range(0, kNumberOfParamTests)); -#endif // GTEST_HAS_PARAM_TEST - -// Resets the count for each test. -void ResetCounts() { - g_environment_set_up_count = 0; - g_environment_tear_down_count = 0; - g_should_fail_count = 0; - g_should_pass_count = 0; - g_death_test_count = 0; -#if GTEST_HAS_PARAM_TEST - g_param_test_count = 0; -#endif // GTEST_HAS_PARAM_TEST -} - -// Checks that the count for each test is expected. -void CheckCounts(int expected) { - GTEST_CHECK_INT_EQ_(expected, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(expected, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(expected, g_should_fail_count); - GTEST_CHECK_INT_EQ_(expected, g_should_pass_count); - GTEST_CHECK_INT_EQ_(expected, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(expected * kNumberOfParamTests, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -// Tests the behavior of Google Test when --gtest_repeat is not specified. -void TestRepeatUnspecified() { - ResetCounts(); - GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS()); - CheckCounts(1); -} - -// Tests the behavior of Google Test when --gtest_repeat has the given value. -void TestRepeat(int repeat) { - GTEST_FLAG(repeat) = repeat; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(repeat > 0 ? 1 : 0, RUN_ALL_TESTS()); - CheckCounts(repeat); -} - -// Tests using --gtest_repeat when --gtest_filter specifies an empty -// set of tests. -void TestRepeatWithEmptyFilter(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "None"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS()); - CheckCounts(0); -} - -// Tests using --gtest_repeat when --gtest_filter specifies a set of -// successful tests. -void TestRepeatWithFilterForSuccessfulTests(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "*-*ShouldFail"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(0, RUN_ALL_TESTS()); - GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(0, g_should_fail_count); - GTEST_CHECK_INT_EQ_(repeat, g_should_pass_count); - GTEST_CHECK_INT_EQ_(repeat, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(repeat * kNumberOfParamTests, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -// Tests using --gtest_repeat when --gtest_filter specifies a set of -// failed tests. -void TestRepeatWithFilterForFailedTests(int repeat) { - GTEST_FLAG(repeat) = repeat; - GTEST_FLAG(filter) = "*ShouldFail"; - - ResetCounts(); - GTEST_CHECK_INT_EQ_(1, RUN_ALL_TESTS()); - GTEST_CHECK_INT_EQ_(repeat, g_environment_set_up_count); - GTEST_CHECK_INT_EQ_(repeat, g_environment_tear_down_count); - GTEST_CHECK_INT_EQ_(repeat, g_should_fail_count); - GTEST_CHECK_INT_EQ_(0, g_should_pass_count); - GTEST_CHECK_INT_EQ_(0, g_death_test_count); -#if GTEST_HAS_PARAM_TEST - GTEST_CHECK_INT_EQ_(0, g_param_test_count); -#endif // GTEST_HAS_PARAM_TEST -} - -} // namespace - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - testing::AddGlobalTestEnvironment(new MyEnvironment); - - TestRepeatUnspecified(); - TestRepeat(0); - TestRepeat(1); - TestRepeat(5); - - TestRepeatWithEmptyFilter(2); - TestRepeatWithEmptyFilter(3); - - TestRepeatWithFilterForSuccessfulTests(3); - - TestRepeatWithFilterForFailedTests(4); - - // It would be nice to verify that the tests indeed loop forever - // when GTEST_FLAG(repeat) is negative, but this test will be quite - // complicated to write. Since this flag is for interactive - // debugging only and doesn't affect the normal test result, such a - // test would be an overkill. - - printf("PASS\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test.py deleted file mode 100755 index a870a01b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test.py +++ /dev/null @@ -1,331 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that test shuffling works.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - -# Command to run the gtest_shuffle_test_ program. -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_shuffle_test_') - -# The environment variables for test sharding. -TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS' -SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX' - -TEST_FILTER = 'A*.A:A*.B:C*' - -ALL_TESTS = [] -ACTIVE_TESTS = [] -FILTERED_TESTS = [] -SHARDED_TESTS = [] - -SHUFFLED_ALL_TESTS = [] -SHUFFLED_ACTIVE_TESTS = [] -SHUFFLED_FILTERED_TESTS = [] -SHUFFLED_SHARDED_TESTS = [] - - -def AlsoRunDisabledTestsFlag(): - return '--gtest_also_run_disabled_tests' - - -def FilterFlag(test_filter): - return '--gtest_filter=%s' % (test_filter,) - - -def RepeatFlag(n): - return '--gtest_repeat=%s' % (n,) - - -def ShuffleFlag(): - return '--gtest_shuffle' - - -def RandomSeedFlag(n): - return '--gtest_random_seed=%s' % (n,) - - -def RunAndReturnOutput(extra_env, args): - """Runs the test program and returns its output.""" - - try: - original_env = os.environ.copy() - os.environ.update(extra_env) - return gtest_test_utils.Subprocess([COMMAND] + args).output - finally: - for key in extra_env.iterkeys(): - if key in original_env: - os.environ[key] = original_env[key] - else: - del os.environ[key] - - -def GetTestsForAllIterations(extra_env, args): - """Runs the test program and returns a list of test lists. - - Args: - extra_env: a map from environment variables to their values - args: command line flags to pass to gtest_shuffle_test_ - - Returns: - A list where the i-th element is the list of tests run in the i-th - test iteration. - """ - - test_iterations = [] - for line in RunAndReturnOutput(extra_env, args).split('\n'): - if line.startswith('----'): - tests = [] - test_iterations.append(tests) - elif line.strip(): - tests.append(line.strip()) # 'TestCaseName.TestName' - - return test_iterations - - -def GetTestCases(tests): - """Returns a list of test cases in the given full test names. - - Args: - tests: a list of full test names - - Returns: - A list of test cases from 'tests', in their original order. - Consecutive duplicates are removed. - """ - - test_cases = [] - for test in tests: - test_case = test.split('.')[0] - if not test_case in test_cases: - test_cases.append(test_case) - - return test_cases - - -def CalculateTestLists(): - """Calculates the list of tests run under different flags.""" - - if not ALL_TESTS: - ALL_TESTS.extend( - GetTestsForAllIterations({}, [AlsoRunDisabledTestsFlag()])[0]) - - if not ACTIVE_TESTS: - ACTIVE_TESTS.extend(GetTestsForAllIterations({}, [])[0]) - - if not FILTERED_TESTS: - FILTERED_TESTS.extend( - GetTestsForAllIterations({}, [FilterFlag(TEST_FILTER)])[0]) - - if not SHARDED_TESTS: - SHARDED_TESTS.extend( - GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3', - SHARD_INDEX_ENV_VAR: '1'}, - [])[0]) - - if not SHUFFLED_ALL_TESTS: - SHUFFLED_ALL_TESTS.extend(GetTestsForAllIterations( - {}, [AlsoRunDisabledTestsFlag(), ShuffleFlag(), RandomSeedFlag(1)])[0]) - - if not SHUFFLED_ACTIVE_TESTS: - SHUFFLED_ACTIVE_TESTS.extend(GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(1)])[0]) - - if not SHUFFLED_FILTERED_TESTS: - SHUFFLED_FILTERED_TESTS.extend(GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(1), FilterFlag(TEST_FILTER)])[0]) - - if not SHUFFLED_SHARDED_TESTS: - SHUFFLED_SHARDED_TESTS.extend( - GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3', - SHARD_INDEX_ENV_VAR: '1'}, - [ShuffleFlag(), RandomSeedFlag(1)])[0]) - - -class GTestShuffleUnitTest(gtest_test_utils.TestCase): - """Tests test shuffling.""" - - def setUp(self): - CalculateTestLists() - - def testShufflePreservesNumberOfTests(self): - self.assertEqual(len(ALL_TESTS), len(SHUFFLED_ALL_TESTS)) - self.assertEqual(len(ACTIVE_TESTS), len(SHUFFLED_ACTIVE_TESTS)) - self.assertEqual(len(FILTERED_TESTS), len(SHUFFLED_FILTERED_TESTS)) - self.assertEqual(len(SHARDED_TESTS), len(SHUFFLED_SHARDED_TESTS)) - - def testShuffleChangesTestOrder(self): - self.assert_(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS) - self.assert_(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS) - self.assert_(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS, - SHUFFLED_FILTERED_TESTS) - self.assert_(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS, - SHUFFLED_SHARDED_TESTS) - - def testShuffleChangesTestCaseOrder(self): - self.assert_(GetTestCases(SHUFFLED_ALL_TESTS) != GetTestCases(ALL_TESTS), - GetTestCases(SHUFFLED_ALL_TESTS)) - self.assert_( - GetTestCases(SHUFFLED_ACTIVE_TESTS) != GetTestCases(ACTIVE_TESTS), - GetTestCases(SHUFFLED_ACTIVE_TESTS)) - self.assert_( - GetTestCases(SHUFFLED_FILTERED_TESTS) != GetTestCases(FILTERED_TESTS), - GetTestCases(SHUFFLED_FILTERED_TESTS)) - self.assert_( - GetTestCases(SHUFFLED_SHARDED_TESTS) != GetTestCases(SHARDED_TESTS), - GetTestCases(SHUFFLED_SHARDED_TESTS)) - - def testShuffleDoesNotRepeatTest(self): - for test in SHUFFLED_ALL_TESTS: - self.assertEqual(1, SHUFFLED_ALL_TESTS.count(test), - '%s appears more than once' % (test,)) - for test in SHUFFLED_ACTIVE_TESTS: - self.assertEqual(1, SHUFFLED_ACTIVE_TESTS.count(test), - '%s appears more than once' % (test,)) - for test in SHUFFLED_FILTERED_TESTS: - self.assertEqual(1, SHUFFLED_FILTERED_TESTS.count(test), - '%s appears more than once' % (test,)) - for test in SHUFFLED_SHARDED_TESTS: - self.assertEqual(1, SHUFFLED_SHARDED_TESTS.count(test), - '%s appears more than once' % (test,)) - - def testShuffleDoesNotCreateNewTest(self): - for test in SHUFFLED_ALL_TESTS: - self.assert_(test in ALL_TESTS, '%s is an invalid test' % (test,)) - for test in SHUFFLED_ACTIVE_TESTS: - self.assert_(test in ACTIVE_TESTS, '%s is an invalid test' % (test,)) - for test in SHUFFLED_FILTERED_TESTS: - self.assert_(test in FILTERED_TESTS, '%s is an invalid test' % (test,)) - for test in SHUFFLED_SHARDED_TESTS: - self.assert_(test in SHARDED_TESTS, '%s is an invalid test' % (test,)) - - def testShuffleIncludesAllTests(self): - for test in ALL_TESTS: - self.assert_(test in SHUFFLED_ALL_TESTS, '%s is missing' % (test,)) - for test in ACTIVE_TESTS: - self.assert_(test in SHUFFLED_ACTIVE_TESTS, '%s is missing' % (test,)) - for test in FILTERED_TESTS: - self.assert_(test in SHUFFLED_FILTERED_TESTS, '%s is missing' % (test,)) - for test in SHARDED_TESTS: - self.assert_(test in SHUFFLED_SHARDED_TESTS, '%s is missing' % (test,)) - - def testShuffleLeavesDeathTestsAtFront(self): - non_death_test_found = False - for test in SHUFFLED_ACTIVE_TESTS: - if 'DeathTest.' in test: - self.assert_(not non_death_test_found, - '%s appears after a non-death test' % (test,)) - else: - non_death_test_found = True - - def _VerifyTestCasesDoNotInterleave(self, tests): - test_cases = [] - for test in tests: - [test_case, _] = test.split('.') - if test_cases and test_cases[-1] != test_case: - test_cases.append(test_case) - self.assertEqual(1, test_cases.count(test_case), - 'Test case %s is not grouped together in %s' % - (test_case, tests)) - - def testShuffleDoesNotInterleaveTestCases(self): - self._VerifyTestCasesDoNotInterleave(SHUFFLED_ALL_TESTS) - self._VerifyTestCasesDoNotInterleave(SHUFFLED_ACTIVE_TESTS) - self._VerifyTestCasesDoNotInterleave(SHUFFLED_FILTERED_TESTS) - self._VerifyTestCasesDoNotInterleave(SHUFFLED_SHARDED_TESTS) - - def testShuffleRestoresOrderAfterEachIteration(self): - # Get the test lists in all 3 iterations, using random seed 1, 2, - # and 3 respectively. Google Test picks a different seed in each - # iteration, and this test depends on the current implementation - # picking successive numbers. This dependency is not ideal, but - # makes the test much easier to write. - [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = ( - GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)])) - - # Make sure running the tests with random seed 1 gets the same - # order as in iteration 1 above. - [tests_with_seed1] = GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(1)]) - self.assertEqual(tests_in_iteration1, tests_with_seed1) - - # Make sure running the tests with random seed 2 gets the same - # order as in iteration 2 above. Success means that Google Test - # correctly restores the test order before re-shuffling at the - # beginning of iteration 2. - [tests_with_seed2] = GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(2)]) - self.assertEqual(tests_in_iteration2, tests_with_seed2) - - # Make sure running the tests with random seed 3 gets the same - # order as in iteration 3 above. Success means that Google Test - # correctly restores the test order before re-shuffling at the - # beginning of iteration 3. - [tests_with_seed3] = GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(3)]) - self.assertEqual(tests_in_iteration3, tests_with_seed3) - - def testShuffleGeneratesNewOrderInEachIteration(self): - [tests_in_iteration1, tests_in_iteration2, tests_in_iteration3] = ( - GetTestsForAllIterations( - {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)])) - - self.assert_(tests_in_iteration1 != tests_in_iteration2, - tests_in_iteration1) - self.assert_(tests_in_iteration1 != tests_in_iteration3, - tests_in_iteration1) - self.assert_(tests_in_iteration2 != tests_in_iteration3, - tests_in_iteration2) - - def testShuffleShardedTestsPreservesPartition(self): - # If we run M tests on N shards, the same M tests should be run in - # total, regardless of the random seeds used by the shards. - [tests1] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3', - SHARD_INDEX_ENV_VAR: '0'}, - [ShuffleFlag(), RandomSeedFlag(1)]) - [tests2] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3', - SHARD_INDEX_ENV_VAR: '1'}, - [ShuffleFlag(), RandomSeedFlag(20)]) - [tests3] = GetTestsForAllIterations({TOTAL_SHARDS_ENV_VAR: '3', - SHARD_INDEX_ENV_VAR: '2'}, - [ShuffleFlag(), RandomSeedFlag(25)]) - sorted_sharded_tests = tests1 + tests2 + tests3 - sorted_sharded_tests.sort() - sorted_active_tests = [] - sorted_active_tests.extend(ACTIVE_TESTS) - sorted_active_tests.sort() - self.assertEqual(sorted_active_tests, sorted_sharded_tests) - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test_.cc deleted file mode 100644 index 53ecf777..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_shuffle_test_.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Verifies that test shuffling works. - -#include - -namespace { - -using ::testing::EmptyTestEventListener; -using ::testing::InitGoogleTest; -using ::testing::Message; -using ::testing::Test; -using ::testing::TestEventListeners; -using ::testing::TestInfo; -using ::testing::UnitTest; -using ::testing::internal::String; -using ::testing::internal::scoped_ptr; - -// The test methods are empty, as the sole purpose of this program is -// to print the test names before/after shuffling. - -class A : public Test {}; -TEST_F(A, A) {} -TEST_F(A, B) {} - -TEST(ADeathTest, A) {} -TEST(ADeathTest, B) {} -TEST(ADeathTest, C) {} - -TEST(B, A) {} -TEST(B, B) {} -TEST(B, C) {} -TEST(B, DISABLED_D) {} -TEST(B, DISABLED_E) {} - -TEST(BDeathTest, A) {} -TEST(BDeathTest, B) {} - -TEST(C, A) {} -TEST(C, B) {} -TEST(C, C) {} -TEST(C, DISABLED_D) {} - -TEST(CDeathTest, A) {} - -TEST(DISABLED_D, A) {} -TEST(DISABLED_D, DISABLED_B) {} - -// This printer prints the full test names only, starting each test -// iteration with a "----" marker. -class TestNamePrinter : public EmptyTestEventListener { - public: - virtual void OnTestIterationStart(const UnitTest& /* unit_test */, - int /* iteration */) { - printf("----\n"); - } - - virtual void OnTestStart(const TestInfo& test_info) { - printf("%s.%s\n", test_info.test_case_name(), test_info.name()); - } -}; - -} // namespace - -int main(int argc, char **argv) { - InitGoogleTest(&argc, argv); - - // Replaces the default printer with TestNamePrinter, which prints - // the test name only. - TestEventListeners& listeners = UnitTest::GetInstance()->listeners(); - delete listeners.Release(listeners.default_result_printer()); - listeners.Append(new TestNamePrinter); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_sole_header_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_sole_header_test.cc deleted file mode 100644 index de91e800..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_sole_header_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// -// This test verifies that it's possible to use Google Test by including -// the gtest.h header file alone. - -#include - -namespace { - -void Subroutine() { - EXPECT_EQ(42, 42); -} - -TEST(NoFatalFailureTest, ExpectNoFatalFailure) { - EXPECT_NO_FATAL_FAILURE(;); - EXPECT_NO_FATAL_FAILURE(SUCCEED()); - EXPECT_NO_FATAL_FAILURE(Subroutine()); - EXPECT_NO_FATAL_FAILURE({ SUCCEED(); }); -} - -TEST(NoFatalFailureTest, AssertNoFatalFailure) { - ASSERT_NO_FATAL_FAILURE(;); - ASSERT_NO_FATAL_FAILURE(SUCCEED()); - ASSERT_NO_FATAL_FAILURE(Subroutine()); - ASSERT_NO_FATAL_FAILURE({ SUCCEED(); }); -} - -} // namespace diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_stress_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_stress_test.cc deleted file mode 100644 index 0034bb84..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_stress_test.cc +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests that SCOPED_TRACE() and various Google Test assertions can be -// used in a large number of threads concurrently. - -#include -#include - -// We must define this macro in order to #include -// gtest-internal-inl.h. This is how Google Test prevents a user from -// accidentally depending on its internal implementation. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -namespace testing { -namespace { - -using internal::String; -using internal::TestPropertyKeyIs; -using internal::Vector; - -// How many threads to create? -const int kThreadCount = 50; - -String IdToKey(int id, const char* suffix) { - Message key; - key << "key_" << id << "_" << suffix; - return key.GetString(); -} - -String IdToString(int id) { - Message id_message; - id_message << id; - return id_message.GetString(); -} - -void ExpectKeyAndValueWereRecordedForId(const Vector& properties, - int id, - const char* suffix) { - TestPropertyKeyIs matches_key(IdToKey(id, suffix).c_str()); - const TestProperty* property = properties.FindIf(matches_key); - ASSERT_TRUE(property != NULL) - << "expecting " << suffix << " value for id " << id; - EXPECT_STREQ(IdToString(id).c_str(), property->value()); -} - -// Calls a large number of Google Test assertions, where exactly one of them -// will fail. -void ManyAsserts(int id) { - ::std::cout << "Thread #" << id << " running...\n"; - - SCOPED_TRACE(Message() << "Thread #" << id); - - for (int i = 0; i < kThreadCount; i++) { - SCOPED_TRACE(Message() << "Iteration #" << i); - - // A bunch of assertions that should succeed. - EXPECT_TRUE(true); - ASSERT_FALSE(false) << "This shouldn't fail."; - EXPECT_STREQ("a", "a"); - ASSERT_LE(5, 6); - EXPECT_EQ(i, i) << "This shouldn't fail."; - - // RecordProperty() should interact safely with other threads as well. - // The shared_key forces property updates. - Test::RecordProperty(IdToKey(id, "string").c_str(), IdToString(id).c_str()); - Test::RecordProperty(IdToKey(id, "int").c_str(), id); - Test::RecordProperty("shared_key", IdToString(id).c_str()); - - // This assertion should fail kThreadCount times per thread. It - // is for testing whether Google Test can handle failed assertions in a - // multi-threaded context. - EXPECT_LT(i, 0) << "This should always fail."; - } -} - -// Tests using SCOPED_TRACE() and Google Test assertions in many threads -// concurrently. -TEST(StressTest, CanUseScopedTraceAndAssertionsInManyThreads) { - // TODO(wan): when Google Test is made thread-safe, run - // ManyAsserts() in many threads here. -} - -TEST(NoFatalFailureTest, ExpectNoFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(NoFatalFailureTest, AssertNoFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(FatalFailureTest, ExpectFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(FatalFailureOnAllThreadsTest, ExpectFatalFailureOnAllThreads) { - // TODO(wan@google.com): Test this works correctly when Google Test - // is made thread-safe. -} - -TEST(NonFatalFailureTest, ExpectNonFatalFailureIgnoresFailuresInOtherThreads) { - // TODO(mheule@google.com): Test this works correctly when Google - // Test is made thread-safe. -} - -TEST(NonFatalFailureOnAllThreadsTest, ExpectNonFatalFailureOnAllThreads) { - // TODO(wan@google.com): Test this works correctly when Google Test - // is made thread-safe. -} - -} // namespace -} // namespace testing - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_test_utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_test_utils.py deleted file mode 100755 index 385662ad..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_test_utils.py +++ /dev/null @@ -1,270 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test utilities for Google C++ Testing Framework.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import atexit -import os -import shutil -import sys -import tempfile -import unittest -_test_module = unittest - -# Suppresses the 'Import not at the top of the file' lint complaint. -# pylint: disable-msg=C6204 -try: - import subprocess - _SUBPROCESS_MODULE_AVAILABLE = True -except: - import popen2 - _SUBPROCESS_MODULE_AVAILABLE = False -# pylint: enable-msg=C6204 - - -IS_WINDOWS = os.name == 'nt' -IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] - -# Here we expose a class from a particular module, depending on the -# environment. The comment suppresses the 'Invalid variable name' lint -# complaint. -TestCase = _test_module.TestCase # pylint: disable-msg=C6409 - -# Initially maps a flag to its default value. After -# _ParseAndStripGTestFlags() is called, maps a flag to its actual value. -_flag_map = {'gtest_source_dir': os.path.dirname(sys.argv[0]), - 'gtest_build_dir': os.path.dirname(sys.argv[0])} -_gtest_flags_are_parsed = False - - -def _ParseAndStripGTestFlags(argv): - """Parses and strips Google Test flags from argv. This is idempotent.""" - - # Suppresses the lint complaint about a global variable since we need it - # here to maintain module-wide state. - global _gtest_flags_are_parsed # pylint: disable-msg=W0603 - if _gtest_flags_are_parsed: - return - - _gtest_flags_are_parsed = True - for flag in _flag_map: - # The environment variable overrides the default value. - if flag.upper() in os.environ: - _flag_map[flag] = os.environ[flag.upper()] - - # The command line flag overrides the environment variable. - i = 1 # Skips the program name. - while i < len(argv): - prefix = '--' + flag + '=' - if argv[i].startswith(prefix): - _flag_map[flag] = argv[i][len(prefix):] - del argv[i] - break - else: - # We don't increment i in case we just found a --gtest_* flag - # and removed it from argv. - i += 1 - - -def GetFlag(flag): - """Returns the value of the given flag.""" - - # In case GetFlag() is called before Main(), we always call - # _ParseAndStripGTestFlags() here to make sure the --gtest_* flags - # are parsed. - _ParseAndStripGTestFlags(sys.argv) - - return _flag_map[flag] - - -def GetSourceDir(): - """Returns the absolute path of the directory where the .py files are.""" - - return os.path.abspath(GetFlag('gtest_source_dir')) - - -def GetBuildDir(): - """Returns the absolute path of the directory where the test binaries are.""" - - return os.path.abspath(GetFlag('gtest_build_dir')) - - -_temp_dir = None - -def _RemoveTempDir(): - if _temp_dir: - shutil.rmtree(_temp_dir, ignore_errors=True) - -atexit.register(_RemoveTempDir) - - -def GetTempDir(): - """Returns a directory for temporary files.""" - - global _temp_dir - if not _temp_dir: - _temp_dir = tempfile.mkdtemp() - return _temp_dir - - -def GetTestExecutablePath(executable_name): - """Returns the absolute path of the test binary given its name. - - The function will print a message and abort the program if the resulting file - doesn't exist. - - Args: - executable_name: name of the test binary that the test script runs. - - Returns: - The absolute path of the test binary. - """ - - path = os.path.abspath(os.path.join(GetBuildDir(), executable_name)) - if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'): - path += '.exe' - - if not os.path.exists(path): - message = ( - 'Unable to find the test binary. Please make sure to provide path\n' - 'to the binary via the --gtest_build_dir flag or the GTEST_BUILD_DIR\n' - 'environment variable. For convenient use, invoke this script via\n' - 'mk_test.py.\n' - # TODO(vladl@google.com): change mk_test.py to test.py after renaming - # the file. - 'Please run mk_test.py -h for help.') - print >> sys.stderr, message - sys.exit(1) - - return path - - -def GetExitStatus(exit_code): - """Returns the argument to exit(), or -1 if exit() wasn't called. - - Args: - exit_code: the result value of os.system(command). - """ - - if os.name == 'nt': - # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns - # the argument to exit() directly. - return exit_code - else: - # On Unix, os.WEXITSTATUS() must be used to extract the exit status - # from the result of os.system(). - if os.WIFEXITED(exit_code): - return os.WEXITSTATUS(exit_code) - else: - return -1 - - -class Subprocess: - def __init__(self, command, working_dir=None, capture_stderr=True): - """Changes into a specified directory, if provided, and executes a command. - Restores the old directory afterwards. Execution results are returned - via the following attributes: - terminated_by_sygnal True iff the child process has been terminated - by a signal. - signal Sygnal that terminated the child process. - exited True iff the child process exited normally. - exit_code The code with which the child proces exited. - output Child process's stdout and stderr output - combined in a string. - - Args: - command: The command to run, in the form of sys.argv. - working_dir: The directory to change into. - capture_stderr: Determines whether to capture stderr in the output member - or to discard it. - """ - - # The subprocess module is the preferrable way of running programs - # since it is available and behaves consistently on all platforms, - # including Windows. But it is only available starting in python 2.4. - # In earlier python versions, we revert to the popen2 module, which is - # available in python 2.0 and later but doesn't provide required - # functionality (Popen4) under Windows. This allows us to support Mac - # OS X 10.4 Tiger, which has python 2.3 installed. - if _SUBPROCESS_MODULE_AVAILABLE: - if capture_stderr: - stderr = subprocess.STDOUT - else: - stderr = subprocess.PIPE - - p = subprocess.Popen(command, - stdout=subprocess.PIPE, stderr=stderr, - cwd=working_dir, universal_newlines=True) - # communicate returns a tuple with the file obect for the child's - # output. - self.output = p.communicate()[0] - self._return_code = p.returncode - else: - old_dir = os.getcwd() - try: - if working_dir is not None: - os.chdir(working_dir) - if capture_stderr: - p = popen2.Popen4(command) - else: - p = popen2.Popen3(command) - p.tochild.close() - self.output = p.fromchild.read() - ret_code = p.wait() - finally: - os.chdir(old_dir) - # Converts ret_code to match the semantics of - # subprocess.Popen.returncode. - if os.WIFSIGNALED(ret_code): - self._return_code = -os.WTERMSIG(ret_code) - else: # os.WIFEXITED(ret_code) should return True here. - self._return_code = os.WEXITSTATUS(ret_code) - - if self._return_code < 0: - self.terminated_by_signal = True - self.exited = False - self.signal = -self._return_code - else: - self.terminated_by_signal = False - self.exited = True - self.exit_code = self._return_code - - -def Main(): - """Runs the unit test.""" - - # We must call _ParseAndStripGTestFlags() before calling - # unittest.main(). Otherwise the latter will be confused by the - # --gtest_* flags. - _ParseAndStripGTestFlags(sys.argv) - _test_module.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_ex_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_ex_test.cc deleted file mode 100644 index 8bf9dc90..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_ex_test.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests Google Test's throw-on-failure mode with exceptions enabled. - -#include - -#include -#include -#include -#include - -// Prints the given failure message and exits the program with -// non-zero. We use this instead of a Google Test assertion to -// indicate a failure, as the latter is been tested and cannot be -// relied on. -void Fail(const char* msg) { - printf("FAILURE: %s\n", msg); - fflush(stdout); - exit(1); -} - -// Tests that an assertion failure throws a subclass of -// std::runtime_error. -void TestFailureThrowsRuntimeError() { - testing::GTEST_FLAG(throw_on_failure) = true; - - // A successful assertion shouldn't throw. - try { - EXPECT_EQ(3, 3); - } catch(...) { - Fail("A successful assertion wrongfully threw."); - } - - // A failed assertion should throw a subclass of std::runtime_error. - try { - EXPECT_EQ(2, 3) << "Expected failure"; - } catch(const std::runtime_error& e) { - if (strstr(e.what(), "Expected failure") != NULL) - return; - - printf("%s", - "A failed assertion did throw an exception of the right type, " - "but the message is incorrect. Instead of containing \"Expected " - "failure\", it is:\n"); - Fail(e.what()); - } catch(...) { - Fail("A failed assertion threw the wrong type of exception."); - } - Fail("A failed assertion should've thrown but didn't."); -} - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - // We want to ensure that people can use Google Test assertions in - // other testing frameworks, as long as they initialize Google Test - // properly and set the thrown-on-failure mode. Therefore, we don't - // use Google Test's constructs for defining and running tests - // (e.g. TEST and RUN_ALL_TESTS) here. - - TestFailureThrowsRuntimeError(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test.py deleted file mode 100755 index 5678ffea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests Google Test's throw-on-failure mode with exceptions disabled. - -This script invokes gtest_throw_on_failure_test_ (a program written with -Google Test) with different environments and command line flags. -""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import os -import gtest_test_utils - - -# Constants. - -# The command line flag for enabling/disabling the throw-on-failure mode. -THROW_ON_FAILURE = 'gtest_throw_on_failure' - -# Path to the gtest_throw_on_failure_test_ program, compiled with -# exceptions disabled. -EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_throw_on_failure_test_') - - -# Utilities. - - -def SetEnvVar(env_var, value): - """Sets an environment variable to a given value; unsets it when the - given value is None. - """ - - env_var = env_var.upper() - if value is not None: - os.environ[env_var] = value - elif env_var in os.environ: - del os.environ[env_var] - - -def Run(command): - """Runs a command; returns True/False if its exit code is/isn't 0.""" - - print 'Running "%s". . .' % ' '.join(command) - p = gtest_test_utils.Subprocess(command) - return p.exited and p.exit_code == 0 - - -# The tests. TODO(wan@google.com): refactor the class to share common -# logic with code in gtest_break_on_failure_unittest.py. -class ThrowOnFailureTest(gtest_test_utils.TestCase): - """Tests the throw-on-failure mode.""" - - def RunAndVerify(self, env_var_value, flag_value, should_fail): - """Runs gtest_throw_on_failure_test_ and verifies that it does - (or does not) exit with a non-zero code. - - Args: - env_var_value: value of the GTEST_BREAK_ON_FAILURE environment - variable; None if the variable should be unset. - flag_value: value of the --gtest_break_on_failure flag; - None if the flag should not be present. - should_fail: True iff the program is expected to fail. - """ - - SetEnvVar(THROW_ON_FAILURE, env_var_value) - - if env_var_value is None: - env_var_value_msg = ' is not set' - else: - env_var_value_msg = '=' + env_var_value - - if flag_value is None: - flag = '' - elif flag_value == '0': - flag = '--%s=0' % THROW_ON_FAILURE - else: - flag = '--%s' % THROW_ON_FAILURE - - command = [EXE_PATH] - if flag: - command.append(flag) - - if should_fail: - should_or_not = 'should' - else: - should_or_not = 'should not' - - failed = not Run(command) - - SetEnvVar(THROW_ON_FAILURE, None) - - msg = ('when %s%s, an assertion failure in "%s" %s cause a non-zero ' - 'exit code.' % - (THROW_ON_FAILURE, env_var_value_msg, ' '.join(command), - should_or_not)) - self.assert_(failed == should_fail, msg) - - def testDefaultBehavior(self): - """Tests the behavior of the default mode.""" - - self.RunAndVerify(env_var_value=None, flag_value=None, should_fail=False) - - def testThrowOnFailureEnvVar(self): - """Tests using the GTEST_THROW_ON_FAILURE environment variable.""" - - self.RunAndVerify(env_var_value='0', - flag_value=None, - should_fail=False) - self.RunAndVerify(env_var_value='1', - flag_value=None, - should_fail=True) - - def testThrowOnFailureFlag(self): - """Tests using the --gtest_throw_on_failure flag.""" - - self.RunAndVerify(env_var_value=None, - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value=None, - flag_value='1', - should_fail=True) - - def testThrowOnFailureFlagOverridesEnvVar(self): - """Tests that --gtest_throw_on_failure overrides GTEST_THROW_ON_FAILURE.""" - - self.RunAndVerify(env_var_value='0', - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value='0', - flag_value='1', - should_fail=True) - self.RunAndVerify(env_var_value='1', - flag_value='0', - should_fail=False) - self.RunAndVerify(env_var_value='1', - flag_value='1', - should_fail=True) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test_.cc deleted file mode 100644 index 88fbd5a7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_throw_on_failure_test_.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -// Tests Google Test's throw-on-failure mode with exceptions disabled. -// -// This program must be compiled with exceptions disabled. It will be -// invoked by gtest_throw_on_failure_test.py, and is expected to exit -// with non-zero in the throw-on-failure mode or 0 otherwise. - -#include - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - - // We want to ensure that people can use Google Test assertions in - // other testing frameworks, as long as they initialize Google Test - // properly and set the thrown-on-failure mode. Therefore, we don't - // use Google Test's constructs for defining and running tests - // (e.g. TEST and RUN_ALL_TESTS) here. - - // In the throw-on-failure mode with exceptions disabled, this - // assertion will cause the program to exit with a non-zero code. - EXPECT_EQ(2, 3); - - // When not in the throw-on-failure mode, the control will reach - // here. - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test.py deleted file mode 100755 index 6ae57eee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Verifies that Google Test warns the user when not initialized properly.""" - -__author__ = 'wan@google.com (Zhanyong Wan)' - -import gtest_test_utils - - -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_') - - -def Assert(condition): - if not condition: - raise AssertionError - - -def AssertEq(expected, actual): - if expected != actual: - print 'Expected: %s' % (expected,) - print ' Actual: %s' % (actual,) - raise AssertionError - - -def TestExitCodeAndOutput(command): - """Runs the given command and verifies its exit code and output.""" - - # Verifies that 'command' exits with code 1. - p = gtest_test_utils.Subprocess(command) - Assert(p.exited) - AssertEq(1, p.exit_code) - Assert('InitGoogleTest' in p.output) - - -class GTestUninitializedTest(gtest_test_utils.TestCase): - def testExitCodeAndOutput(self): - TestExitCodeAndOutput(COMMAND) - - -if __name__ == '__main__': - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test_.cc deleted file mode 100644 index e8b2aa81..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_uninitialized_test_.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) - -#include - -TEST(DummyTest, Dummy) { - // This test doesn't verify anything. We just need it to create a - // realistic stage for testing the behavior of Google Test when - // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being - // called first. -} - -int main() { - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_unittest.cc deleted file mode 100644 index 5c69b463..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_unittest.cc +++ /dev/null @@ -1,6847 +0,0 @@ -// Copyright 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// Tests for Google Test itself. This verifies that the basic constructs of -// Google Test work. - -#include - -// Verifies that the command line flag variables can be accessed -// in code once has been #included. -// Do not move it after other #includes. -TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) { - bool dummy = testing::GTEST_FLAG(also_run_disabled_tests) - || testing::GTEST_FLAG(break_on_failure) - || testing::GTEST_FLAG(catch_exceptions) - || testing::GTEST_FLAG(color) != "unknown" - || testing::GTEST_FLAG(filter) != "unknown" - || testing::GTEST_FLAG(list_tests) - || testing::GTEST_FLAG(output) != "unknown" - || testing::GTEST_FLAG(print_time) - || testing::GTEST_FLAG(random_seed) - || testing::GTEST_FLAG(repeat) > 0 - || testing::GTEST_FLAG(show_internal_stack_frames) - || testing::GTEST_FLAG(shuffle) - || testing::GTEST_FLAG(stack_trace_depth) > 0 - || testing::GTEST_FLAG(throw_on_failure); - EXPECT_TRUE(dummy || !dummy); // Suppresses warning that dummy is unused. -} - -#include - -// Indicates that this translation unit is part of Google Test's -// implementation. It must come before gtest-internal-inl.h is -// included, or there will be a compiler error. This trick is to -// prevent a user from accidentally including gtest-internal-inl.h in -// his code. -#define GTEST_IMPLEMENTATION_ 1 -#include "src/gtest-internal-inl.h" -#undef GTEST_IMPLEMENTATION_ - -#include // For INT_MAX. -#include -#include - -#if GTEST_HAS_PTHREAD -#include -#endif // GTEST_HAS_PTHREAD - -#ifdef __BORLANDC__ -#include -#endif - -namespace testing { -namespace internal { - -bool ShouldUseColor(bool stdout_is_tty); -const char* FormatTimeInMillisAsSeconds(TimeInMillis ms); -bool ParseInt32Flag(const char* str, const char* flag, Int32* value); - -// Provides access to otherwise private parts of the TestEventListeners class -// that are needed to test it. -class TestEventListenersAccessor { - public: - static TestEventListener* GetRepeater(TestEventListeners* listeners) { - return listeners->repeater(); - } - - static void SetDefaultResultPrinter(TestEventListeners* listeners, - TestEventListener* listener) { - listeners->SetDefaultResultPrinter(listener); - } - static void SetDefaultXmlGenerator(TestEventListeners* listeners, - TestEventListener* listener) { - listeners->SetDefaultXmlGenerator(listener); - } - - static bool EventForwardingEnabled(const TestEventListeners& listeners) { - return listeners.EventForwardingEnabled(); - } - - static void SuppressEventForwarding(TestEventListeners* listeners) { - listeners->SuppressEventForwarding(); - } -}; - -} // namespace internal -} // namespace testing - -using testing::AssertionFailure; -using testing::AssertionResult; -using testing::AssertionSuccess; -using testing::DoubleLE; -using testing::EmptyTestEventListener; -using testing::FloatLE; -using testing::GTEST_FLAG(also_run_disabled_tests); -using testing::GTEST_FLAG(break_on_failure); -using testing::GTEST_FLAG(catch_exceptions); -using testing::GTEST_FLAG(color); -using testing::GTEST_FLAG(death_test_use_fork); -using testing::GTEST_FLAG(filter); -using testing::GTEST_FLAG(list_tests); -using testing::GTEST_FLAG(output); -using testing::GTEST_FLAG(print_time); -using testing::GTEST_FLAG(random_seed); -using testing::GTEST_FLAG(repeat); -using testing::GTEST_FLAG(show_internal_stack_frames); -using testing::GTEST_FLAG(shuffle); -using testing::GTEST_FLAG(stack_trace_depth); -using testing::GTEST_FLAG(throw_on_failure); -using testing::IsNotSubstring; -using testing::IsSubstring; -using testing::Message; -using testing::ScopedFakeTestPartResultReporter; -using testing::StaticAssertTypeEq; -using testing::Test; -using testing::TestEventListeners; -using testing::TestCase; -using testing::TestPartResult; -using testing::TestPartResultArray; -using testing::TestProperty; -using testing::TestResult; -using testing::UnitTest; -using testing::internal::AlwaysFalse; -using testing::internal::AlwaysTrue; -using testing::internal::AppendUserMessage; -using testing::internal::CodePointToUtf8; -using testing::internal::EqFailure; -using testing::internal::FloatingPoint; -using testing::internal::FormatTimeInMillisAsSeconds; -using testing::internal::GTestFlagSaver; -using testing::internal::GetCurrentOsStackTraceExceptTop; -using testing::internal::GetNextRandomSeed; -using testing::internal::GetRandomSeedFromFlag; -using testing::internal::GetTestTypeId; -using testing::internal::GetTypeId; -using testing::internal::GetUnitTestImpl; -using testing::internal::Int32; -using testing::internal::Int32FromEnvOrDie; -using testing::internal::ParseInt32Flag; -using testing::internal::ShouldRunTestOnShard; -using testing::internal::ShouldShard; -using testing::internal::ShouldUseColor; -using testing::internal::StreamableToString; -using testing::internal::String; -using testing::internal::TestEventListenersAccessor; -using testing::internal::TestResultAccessor; -using testing::internal::ThreadLocal; -using testing::internal::UInt32; -using testing::internal::Vector; -using testing::internal::WideStringToUtf8; -using testing::internal::kMaxRandomSeed; -using testing::internal::kTestTypeIdInGoogleTest; -using testing::internal::scoped_ptr; - -class TestingVector : public Vector { -}; - -::std::ostream& operator<<(::std::ostream& os, - const TestingVector& vector) { - os << "{ "; - for (int i = 0; i < vector.size(); i++) { - os << vector.GetElement(i) << " "; - } - os << "}"; - return os; -} - -// This line tests that we can define tests in an unnamed namespace. -namespace { - -TEST(GetRandomSeedFromFlagTest, HandlesZero) { - const int seed = GetRandomSeedFromFlag(0); - EXPECT_LE(1, seed); - EXPECT_LE(seed, static_cast(kMaxRandomSeed)); -} - -TEST(GetRandomSeedFromFlagTest, PreservesValidSeed) { - EXPECT_EQ(1, GetRandomSeedFromFlag(1)); - EXPECT_EQ(2, GetRandomSeedFromFlag(2)); - EXPECT_EQ(kMaxRandomSeed - 1, GetRandomSeedFromFlag(kMaxRandomSeed - 1)); - EXPECT_EQ(static_cast(kMaxRandomSeed), - GetRandomSeedFromFlag(kMaxRandomSeed)); -} - -TEST(GetRandomSeedFromFlagTest, NormalizesInvalidSeed) { - const int seed1 = GetRandomSeedFromFlag(-1); - EXPECT_LE(1, seed1); - EXPECT_LE(seed1, static_cast(kMaxRandomSeed)); - - const int seed2 = GetRandomSeedFromFlag(kMaxRandomSeed + 1); - EXPECT_LE(1, seed2); - EXPECT_LE(seed2, static_cast(kMaxRandomSeed)); -} - -TEST(GetNextRandomSeedTest, WorksForValidInput) { - EXPECT_EQ(2, GetNextRandomSeed(1)); - EXPECT_EQ(3, GetNextRandomSeed(2)); - EXPECT_EQ(static_cast(kMaxRandomSeed), - GetNextRandomSeed(kMaxRandomSeed - 1)); - EXPECT_EQ(1, GetNextRandomSeed(kMaxRandomSeed)); - - // We deliberately don't test GetNextRandomSeed() with invalid - // inputs, as that requires death tests, which are expensive. This - // is fine as GetNextRandomSeed() is internal and has a - // straightforward definition. -} - -static void ClearCurrentTestPartResults() { - TestResultAccessor::ClearTestPartResults( - GetUnitTestImpl()->current_test_result()); -} - -// Tests GetTypeId. - -TEST(GetTypeIdTest, ReturnsSameValueForSameType) { - EXPECT_EQ(GetTypeId(), GetTypeId()); - EXPECT_EQ(GetTypeId(), GetTypeId()); -} - -class SubClassOfTest : public Test {}; -class AnotherSubClassOfTest : public Test {}; - -TEST(GetTypeIdTest, ReturnsDifferentValuesForDifferentTypes) { - EXPECT_NE(GetTypeId(), GetTypeId()); - EXPECT_NE(GetTypeId(), GetTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTestTypeId()); - EXPECT_NE(GetTypeId(), GetTypeId()); -} - -// Verifies that GetTestTypeId() returns the same value, no matter it -// is called from inside Google Test or outside of it. -TEST(GetTestTypeIdTest, ReturnsTheSameValueInsideOrOutsideOfGoogleTest) { - EXPECT_EQ(kTestTypeIdInGoogleTest, GetTestTypeId()); -} - -// Tests FormatTimeInMillisAsSeconds(). - -TEST(FormatTimeInMillisAsSecondsTest, FormatsZero) { - EXPECT_STREQ("0", FormatTimeInMillisAsSeconds(0)); -} - -TEST(FormatTimeInMillisAsSecondsTest, FormatsPositiveNumber) { - EXPECT_STREQ("0.003", FormatTimeInMillisAsSeconds(3)); - EXPECT_STREQ("0.01", FormatTimeInMillisAsSeconds(10)); - EXPECT_STREQ("0.2", FormatTimeInMillisAsSeconds(200)); - EXPECT_STREQ("1.2", FormatTimeInMillisAsSeconds(1200)); - EXPECT_STREQ("3", FormatTimeInMillisAsSeconds(3000)); -} - -TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) { - EXPECT_STREQ("-0.003", FormatTimeInMillisAsSeconds(-3)); - EXPECT_STREQ("-0.01", FormatTimeInMillisAsSeconds(-10)); - EXPECT_STREQ("-0.2", FormatTimeInMillisAsSeconds(-200)); - EXPECT_STREQ("-1.2", FormatTimeInMillisAsSeconds(-1200)); - EXPECT_STREQ("-3", FormatTimeInMillisAsSeconds(-3000)); -} - -#if !GTEST_OS_SYMBIAN -// NULL testing does not work with Symbian compilers. - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests that GTEST_IS_NULL_LITERAL_(x) is true when x is a null -// pointer literal. -TEST(NullLiteralTest, IsTrueForNullLiterals) { - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(NULL)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0U)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0L)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(false)); -#ifndef __BORLANDC__ - // Some compilers may fail to detect some null pointer literals; - // as long as users of the framework don't use such literals, this - // is harmless. - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(1 - 1)); - EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(true && false)); -#endif -} - -// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null -// pointer literal. -TEST(NullLiteralTest, IsFalseForNonNullLiterals) { - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(1)); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(0.0)); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_('a')); - EXPECT_FALSE(GTEST_IS_NULL_LITERAL_(static_cast(NULL))); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -#endif // !GTEST_OS_SYMBIAN -// -// Tests CodePointToUtf8(). - -// Tests that the NUL character L'\0' is encoded correctly. -TEST(CodePointToUtf8Test, CanEncodeNul) { - char buffer[32]; - EXPECT_STREQ("", CodePointToUtf8(L'\0', buffer)); -} - -// Tests that ASCII characters are encoded correctly. -TEST(CodePointToUtf8Test, CanEncodeAscii) { - char buffer[32]; - EXPECT_STREQ("a", CodePointToUtf8(L'a', buffer)); - EXPECT_STREQ("Z", CodePointToUtf8(L'Z', buffer)); - EXPECT_STREQ("&", CodePointToUtf8(L'&', buffer)); - EXPECT_STREQ("\x7F", CodePointToUtf8(L'\x7F', buffer)); -} - -// Tests that Unicode code-points that have 8 to 11 bits are encoded -// as 110xxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode8To11Bits) { - char buffer[32]; - // 000 1101 0011 => 110-00011 10-010011 - EXPECT_STREQ("\xC3\x93", CodePointToUtf8(L'\xD3', buffer)); - - // 101 0111 0110 => 110-10101 10-110110 - EXPECT_STREQ("\xD5\xB6", CodePointToUtf8(L'\x576', buffer)); -} - -// Tests that Unicode code-points that have 12 to 16 bits are encoded -// as 1110xxxx 10xxxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode12To16Bits) { - char buffer[32]; - // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011 - EXPECT_STREQ("\xE0\xA3\x93", CodePointToUtf8(L'\x8D3', buffer)); - - // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101 - EXPECT_STREQ("\xEC\x9D\x8D", CodePointToUtf8(L'\xC74D', buffer)); -} - -#if !GTEST_WIDE_STRING_USES_UTF16_ -// Tests in this group require a wchar_t to hold > 16 bits, and thus -// are skipped on Windows, Cygwin, and Symbian, where a wchar_t is -// 16-bit wide. This code may not compile on those systems. - -// Tests that Unicode code-points that have 17 to 21 bits are encoded -// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx. -TEST(CodePointToUtf8Test, CanEncode17To21Bits) { - char buffer[32]; - // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011 - EXPECT_STREQ("\xF0\x90\xA3\x93", CodePointToUtf8(L'\x108D3', buffer)); - - // 0 0001 0000 0100 0000 0000 => 11110-000 10-010000 10-010000 10-000000 - EXPECT_STREQ("\xF0\x90\x90\x80", CodePointToUtf8(L'\x10400', buffer)); - - // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100 - EXPECT_STREQ("\xF4\x88\x98\xB4", CodePointToUtf8(L'\x108634', buffer)); -} - -// Tests that encoding an invalid code-point generates the expected result. -TEST(CodePointToUtf8Test, CanEncodeInvalidCodePoint) { - char buffer[32]; - EXPECT_STREQ("(Invalid Unicode 0x1234ABCD)", - CodePointToUtf8(L'\x1234ABCD', buffer)); -} - -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests WideStringToUtf8(). - -// Tests that the NUL character L'\0' is encoded correctly. -TEST(WideStringToUtf8Test, CanEncodeNul) { - EXPECT_STREQ("", WideStringToUtf8(L"", 0).c_str()); - EXPECT_STREQ("", WideStringToUtf8(L"", -1).c_str()); -} - -// Tests that ASCII strings are encoded correctly. -TEST(WideStringToUtf8Test, CanEncodeAscii) { - EXPECT_STREQ("a", WideStringToUtf8(L"a", 1).c_str()); - EXPECT_STREQ("ab", WideStringToUtf8(L"ab", 2).c_str()); - EXPECT_STREQ("a", WideStringToUtf8(L"a", -1).c_str()); - EXPECT_STREQ("ab", WideStringToUtf8(L"ab", -1).c_str()); -} - -// Tests that Unicode code-points that have 8 to 11 bits are encoded -// as 110xxxxx 10xxxxxx. -TEST(WideStringToUtf8Test, CanEncode8To11Bits) { - // 000 1101 0011 => 110-00011 10-010011 - EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", 1).c_str()); - EXPECT_STREQ("\xC3\x93", WideStringToUtf8(L"\xD3", -1).c_str()); - - // 101 0111 0110 => 110-10101 10-110110 - EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(L"\x576", 1).c_str()); - EXPECT_STREQ("\xD5\xB6", WideStringToUtf8(L"\x576", -1).c_str()); -} - -// Tests that Unicode code-points that have 12 to 16 bits are encoded -// as 1110xxxx 10xxxxxx 10xxxxxx. -TEST(WideStringToUtf8Test, CanEncode12To16Bits) { - // 0000 1000 1101 0011 => 1110-0000 10-100011 10-010011 - EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(L"\x8D3", 1).c_str()); - EXPECT_STREQ("\xE0\xA3\x93", WideStringToUtf8(L"\x8D3", -1).c_str()); - - // 1100 0111 0100 1101 => 1110-1100 10-011101 10-001101 - EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(L"\xC74D", 1).c_str()); - EXPECT_STREQ("\xEC\x9D\x8D", WideStringToUtf8(L"\xC74D", -1).c_str()); -} - -// Tests that the conversion stops when the function encounters \0 character. -TEST(WideStringToUtf8Test, StopsOnNulCharacter) { - EXPECT_STREQ("ABC", WideStringToUtf8(L"ABC\0XYZ", 100).c_str()); -} - -// Tests that the conversion stops when the function reaches the limit -// specified by the 'length' parameter. -TEST(WideStringToUtf8Test, StopsWhenLengthLimitReached) { - EXPECT_STREQ("ABC", WideStringToUtf8(L"ABCDEF", 3).c_str()); -} - - -#if !GTEST_WIDE_STRING_USES_UTF16_ -// Tests that Unicode code-points that have 17 to 21 bits are encoded -// as 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx. This code may not compile -// on the systems using UTF-16 encoding. -TEST(WideStringToUtf8Test, CanEncode17To21Bits) { - // 0 0001 0000 1000 1101 0011 => 11110-000 10-010000 10-100011 10-010011 - EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", 1).c_str()); - EXPECT_STREQ("\xF0\x90\xA3\x93", WideStringToUtf8(L"\x108D3", -1).c_str()); - - // 1 0000 1000 0110 0011 0100 => 11110-100 10-001000 10-011000 10-110100 - EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", 1).c_str()); - EXPECT_STREQ("\xF4\x88\x98\xB4", WideStringToUtf8(L"\x108634", -1).c_str()); -} - -// Tests that encoding an invalid code-point generates the expected result. -TEST(WideStringToUtf8Test, CanEncodeInvalidCodePoint) { - EXPECT_STREQ("(Invalid Unicode 0xABCDFF)", - WideStringToUtf8(L"\xABCDFF", -1).c_str()); -} -#else // !GTEST_WIDE_STRING_USES_UTF16_ -// Tests that surrogate pairs are encoded correctly on the systems using -// UTF-16 encoding in the wide strings. -TEST(WideStringToUtf8Test, CanEncodeValidUtf16SUrrogatePairs) { - EXPECT_STREQ("\xF0\x90\x90\x80", - WideStringToUtf8(L"\xD801\xDC00", -1).c_str()); -} - -// Tests that encoding an invalid UTF-16 surrogate pair -// generates the expected result. -TEST(WideStringToUtf8Test, CanEncodeInvalidUtf16SurrogatePair) { - // Leading surrogate is at the end of the string. - EXPECT_STREQ("\xED\xA0\x80", WideStringToUtf8(L"\xD800", -1).c_str()); - // Leading surrogate is not followed by the trailing surrogate. - EXPECT_STREQ("\xED\xA0\x80$", WideStringToUtf8(L"\xD800$", -1).c_str()); - // Trailing surrogate appearas without a leading surrogate. - EXPECT_STREQ("\xED\xB0\x80PQR", WideStringToUtf8(L"\xDC00PQR", -1).c_str()); -} -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests that codepoint concatenation works correctly. -#if !GTEST_WIDE_STRING_USES_UTF16_ -TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) { - EXPECT_STREQ( - "\xF4\x88\x98\xB4" - "\xEC\x9D\x8D" - "\n" - "\xD5\xB6" - "\xE0\xA3\x93" - "\xF4\x88\x98\xB4", - WideStringToUtf8(L"\x108634\xC74D\n\x576\x8D3\x108634", -1).c_str()); -} -#else -TEST(WideStringToUtf8Test, ConcatenatesCodepointsCorrectly) { - EXPECT_STREQ( - "\xEC\x9D\x8D" "\n" "\xD5\xB6" "\xE0\xA3\x93", - WideStringToUtf8(L"\xC74D\n\x576\x8D3", -1).c_str()); -} -#endif // !GTEST_WIDE_STRING_USES_UTF16_ - -// Tests the Random class. - -TEST(RandomDeathTest, GeneratesCrashesOnInvalidRange) { - testing::internal::Random random(42); - EXPECT_DEATH_IF_SUPPORTED( - random.Generate(0), - "Cannot generate a number in the range \\[0, 0\\)"); - EXPECT_DEATH_IF_SUPPORTED( - random.Generate(testing::internal::Random::kMaxRange + 1), - "Generation of a number in \\[0, 2147483649\\) was requested, " - "but this can only generate numbers in \\[0, 2147483648\\)"); -} - -TEST(RandomTest, GeneratesNumbersWithinRange) { - const UInt32 kRange = 10000; - testing::internal::Random random(12345); - for (int i = 0; i < 10; i++) { - EXPECT_LT(random.Generate(kRange), kRange) << " for iteration " << i; - } - - testing::internal::Random random2(testing::internal::Random::kMaxRange); - for (int i = 0; i < 10; i++) { - EXPECT_LT(random2.Generate(kRange), kRange) << " for iteration " << i; - } -} - -TEST(RandomTest, RepeatsWhenReseeded) { - const int kSeed = 123; - const int kArraySize = 10; - const UInt32 kRange = 10000; - UInt32 values[kArraySize]; - - testing::internal::Random random(kSeed); - for (int i = 0; i < kArraySize; i++) { - values[i] = random.Generate(kRange); - } - - random.Reseed(kSeed); - for (int i = 0; i < kArraySize; i++) { - EXPECT_EQ(values[i], random.Generate(kRange)) << " for iteration " << i; - } -} - -// Tests the Vector class template. - -// Tests Vector::Clear(). -TEST(VectorTest, Clear) { - Vector a; - a.PushBack(1); - a.Clear(); - EXPECT_EQ(0, a.size()); - - a.PushBack(2); - a.PushBack(3); - a.Clear(); - EXPECT_EQ(0, a.size()); -} - -// Tests Vector::PushBack(). -TEST(VectorTest, PushBack) { - Vector a; - a.PushBack('a'); - ASSERT_EQ(1, a.size()); - EXPECT_EQ('a', a.GetElement(0)); - - a.PushBack('b'); - ASSERT_EQ(2, a.size()); - EXPECT_EQ('a', a.GetElement(0)); - EXPECT_EQ('b', a.GetElement(1)); -} - -// Tests Vector::PushFront(). -TEST(VectorTest, PushFront) { - Vector a; - ASSERT_EQ(0, a.size()); - - // Calls PushFront() on an empty Vector. - a.PushFront(1); - ASSERT_EQ(1, a.size()); - EXPECT_EQ(1, a.GetElement(0)); - - // Calls PushFront() on a singleton Vector. - a.PushFront(2); - ASSERT_EQ(2, a.size()); - EXPECT_EQ(2, a.GetElement(0)); - EXPECT_EQ(1, a.GetElement(1)); - - // Calls PushFront() on a Vector with more than one elements. - a.PushFront(3); - ASSERT_EQ(3, a.size()); - EXPECT_EQ(3, a.GetElement(0)); - EXPECT_EQ(2, a.GetElement(1)); - EXPECT_EQ(1, a.GetElement(2)); -} - -// Tests Vector::PopFront(). -TEST(VectorTest, PopFront) { - Vector a; - - // Popping on an empty Vector should fail. - EXPECT_FALSE(a.PopFront(NULL)); - - // Popping again on an empty Vector should fail, and the result element - // shouldn't be overwritten. - int element = 1; - EXPECT_FALSE(a.PopFront(&element)); - EXPECT_EQ(1, element); - - a.PushFront(2); - a.PushFront(3); - - // PopFront() should pop the element in the front of the Vector. - EXPECT_TRUE(a.PopFront(&element)); - EXPECT_EQ(3, element); - - // After popping the last element, the Vector should be empty. - EXPECT_TRUE(a.PopFront(NULL)); - EXPECT_EQ(0, a.size()); -} - -// Tests inserting at the beginning using Vector::Insert(). -TEST(VectorTest, InsertAtBeginning) { - Vector a; - ASSERT_EQ(0, a.size()); - - // Inserts into an empty Vector. - a.Insert(1, 0); - ASSERT_EQ(1, a.size()); - EXPECT_EQ(1, a.GetElement(0)); - - // Inserts at the beginning of a singleton Vector. - a.Insert(2, 0); - ASSERT_EQ(2, a.size()); - EXPECT_EQ(2, a.GetElement(0)); - EXPECT_EQ(1, a.GetElement(1)); - - // Inserts at the beginning of a Vector with more than one elements. - a.Insert(3, 0); - ASSERT_EQ(3, a.size()); - EXPECT_EQ(3, a.GetElement(0)); - EXPECT_EQ(2, a.GetElement(1)); - EXPECT_EQ(1, a.GetElement(2)); -} - -// Tests inserting at a location other than the beginning using -// Vector::Insert(). -TEST(VectorTest, InsertNotAtBeginning) { - // Prepares a singleton Vector. - Vector a; - a.PushBack(1); - - // Inserts at the end of a singleton Vector. - a.Insert(2, a.size()); - ASSERT_EQ(2, a.size()); - EXPECT_EQ(1, a.GetElement(0)); - EXPECT_EQ(2, a.GetElement(1)); - - // Inserts at the end of a Vector with more than one elements. - a.Insert(3, a.size()); - ASSERT_EQ(3, a.size()); - EXPECT_EQ(1, a.GetElement(0)); - EXPECT_EQ(2, a.GetElement(1)); - EXPECT_EQ(3, a.GetElement(2)); - - // Inserts in the middle of a Vector. - a.Insert(4, 1); - ASSERT_EQ(4, a.size()); - EXPECT_EQ(1, a.GetElement(0)); - EXPECT_EQ(4, a.GetElement(1)); - EXPECT_EQ(2, a.GetElement(2)); - EXPECT_EQ(3, a.GetElement(3)); -} - -// Tests Vector::GetElementOr(). -TEST(VectorTest, GetElementOr) { - Vector a; - EXPECT_EQ('x', a.GetElementOr(0, 'x')); - - a.PushBack('a'); - a.PushBack('b'); - EXPECT_EQ('a', a.GetElementOr(0, 'x')); - EXPECT_EQ('b', a.GetElementOr(1, 'x')); - EXPECT_EQ('x', a.GetElementOr(-2, 'x')); - EXPECT_EQ('x', a.GetElementOr(2, 'x')); -} - -TEST(VectorTest, Swap) { - Vector a; - a.PushBack(0); - a.PushBack(1); - a.PushBack(2); - - // Swaps an element with itself. - a.Swap(0, 0); - ASSERT_EQ(0, a.GetElement(0)); - ASSERT_EQ(1, a.GetElement(1)); - ASSERT_EQ(2, a.GetElement(2)); - - // Swaps two different elements where the indices go up. - a.Swap(0, 1); - ASSERT_EQ(1, a.GetElement(0)); - ASSERT_EQ(0, a.GetElement(1)); - ASSERT_EQ(2, a.GetElement(2)); - - // Swaps two different elements where the indices go down. - a.Swap(2, 0); - ASSERT_EQ(2, a.GetElement(0)); - ASSERT_EQ(0, a.GetElement(1)); - ASSERT_EQ(1, a.GetElement(2)); -} - -TEST(VectorTest, Clone) { - // Clones an empty Vector. - Vector a; - scoped_ptr > empty(a.Clone()); - EXPECT_EQ(0, empty->size()); - - // Clones a singleton. - a.PushBack(42); - scoped_ptr > singleton(a.Clone()); - ASSERT_EQ(1, singleton->size()); - EXPECT_EQ(42, singleton->GetElement(0)); - - // Clones a Vector with more elements. - a.PushBack(43); - a.PushBack(44); - scoped_ptr > big(a.Clone()); - ASSERT_EQ(3, big->size()); - EXPECT_EQ(42, big->GetElement(0)); - EXPECT_EQ(43, big->GetElement(1)); - EXPECT_EQ(44, big->GetElement(2)); -} - -// Tests Vector::Erase(). -TEST(VectorDeathTest, Erase) { - Vector a; - - // Tests erasing from an empty vector. - EXPECT_DEATH_IF_SUPPORTED( - a.Erase(0), - "Invalid Vector index 0: must be in range \\[0, -1\\]\\."); - - // Tests erasing from a singleton vector. - a.PushBack(0); - - a.Erase(0); - EXPECT_EQ(0, a.size()); - - // Tests Erase parameters beyond the bounds of the vector. - Vector a1; - a1.PushBack(0); - a1.PushBack(1); - a1.PushBack(2); - - EXPECT_DEATH_IF_SUPPORTED( - a1.Erase(3), - "Invalid Vector index 3: must be in range \\[0, 2\\]\\."); - EXPECT_DEATH_IF_SUPPORTED( - a1.Erase(-1), - "Invalid Vector index -1: must be in range \\[0, 2\\]\\."); - - // Tests erasing at the end of the vector. - Vector a2; - a2.PushBack(0); - a2.PushBack(1); - a2.PushBack(2); - - a2.Erase(2); - ASSERT_EQ(2, a2.size()); - EXPECT_EQ(0, a2.GetElement(0)); - EXPECT_EQ(1, a2.GetElement(1)); - - // Tests erasing in the middle of the vector. - Vector a3; - a3.PushBack(0); - a3.PushBack(1); - a3.PushBack(2); - - a3.Erase(1); - ASSERT_EQ(2, a3.size()); - EXPECT_EQ(0, a3.GetElement(0)); - EXPECT_EQ(2, a3.GetElement(1)); - - // Tests erasing at the beginning of the vector. - Vector a4; - a4.PushBack(0); - a4.PushBack(1); - a4.PushBack(2); - - a4.Erase(0); - ASSERT_EQ(2, a4.size()); - EXPECT_EQ(1, a4.GetElement(0)); - EXPECT_EQ(2, a4.GetElement(1)); -} - -// Tests the GetElement accessor. -TEST(VectorDeathTest, GetElement) { - Vector a; - a.PushBack(0); - a.PushBack(1); - a.PushBack(2); - const Vector& b = a; - - EXPECT_EQ(0, b.GetElement(0)); - EXPECT_EQ(1, b.GetElement(1)); - EXPECT_EQ(2, b.GetElement(2)); - EXPECT_DEATH_IF_SUPPORTED( - b.GetElement(3), - "Invalid Vector index 3: must be in range \\[0, 2\\]\\."); - EXPECT_DEATH_IF_SUPPORTED( - b.GetElement(-1), - "Invalid Vector index -1: must be in range \\[0, 2\\]\\."); -} - -// Tests the GetMutableElement accessor. -TEST(VectorDeathTest, GetMutableElement) { - Vector a; - a.PushBack(0); - a.PushBack(1); - a.PushBack(2); - - EXPECT_EQ(0, a.GetMutableElement(0)); - EXPECT_EQ(1, a.GetMutableElement(1)); - EXPECT_EQ(2, a.GetMutableElement(2)); - - a.GetMutableElement(0) = 42; - EXPECT_EQ(42, a.GetMutableElement(0)); - EXPECT_EQ(1, a.GetMutableElement(1)); - EXPECT_EQ(2, a.GetMutableElement(2)); - - EXPECT_DEATH_IF_SUPPORTED( - a.GetMutableElement(3), - "Invalid Vector index 3: must be in range \\[0, 2\\]\\."); - EXPECT_DEATH_IF_SUPPORTED( - a.GetMutableElement(-1), - "Invalid Vector index -1: must be in range \\[0, 2\\]\\."); -} - -TEST(VectorDeathTest, Swap) { - Vector a; - a.PushBack(0); - a.PushBack(1); - a.PushBack(2); - - EXPECT_DEATH_IF_SUPPORTED( - a.Swap(-1, 1), - "Invalid first swap element -1: must be in range \\[0, 2\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.Swap(3, 1), - "Invalid first swap element 3: must be in range \\[0, 2\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.Swap(1, -1), - "Invalid second swap element -1: must be in range \\[0, 2\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.Swap(1, 3), - "Invalid second swap element 3: must be in range \\[0, 2\\]"); -} - -TEST(VectorDeathTest, ShuffleRange) { - Vector a; - a.PushBack(0); - a.PushBack(1); - a.PushBack(2); - testing::internal::Random random(1); - - EXPECT_DEATH_IF_SUPPORTED( - a.ShuffleRange(&random, -1, 1), - "Invalid shuffle range start -1: must be in range \\[0, 3\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.ShuffleRange(&random, 4, 4), - "Invalid shuffle range start 4: must be in range \\[0, 3\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.ShuffleRange(&random, 3, 2), - "Invalid shuffle range finish 2: must be in range \\[3, 3\\]"); - EXPECT_DEATH_IF_SUPPORTED( - a.ShuffleRange(&random, 3, 4), - "Invalid shuffle range finish 4: must be in range \\[3, 3\\]"); -} - -class VectorShuffleTest : public Test { - protected: - static const int kVectorSize = 20; - - VectorShuffleTest() : random_(1) { - for (int i = 0; i < kVectorSize; i++) { - vector_.PushBack(i); - } - } - - static bool VectorIsCorrupt(const TestingVector& vector) { - if (kVectorSize != vector.size()) { - return true; - } - - bool found_in_vector[kVectorSize] = { false }; - for (int i = 0; i < vector.size(); i++) { - const int e = vector.GetElement(i); - if (e < 0 || e >= kVectorSize || found_in_vector[e]) { - return true; - } - found_in_vector[e] = true; - } - - // Vector size is correct, elements' range is correct, no - // duplicate elements. Therefore no corruption has occurred. - return false; - } - - static bool VectorIsNotCorrupt(const TestingVector& vector) { - return !VectorIsCorrupt(vector); - } - - static bool RangeIsShuffled(const TestingVector& vector, int begin, int end) { - for (int i = begin; i < end; i++) { - if (i != vector.GetElement(i)) { - return true; - } - } - return false; - } - - static bool RangeIsUnshuffled( - const TestingVector& vector, int begin, int end) { - return !RangeIsShuffled(vector, begin, end); - } - - static bool VectorIsShuffled(const TestingVector& vector) { - return RangeIsShuffled(vector, 0, vector.size()); - } - - static bool VectorIsUnshuffled(const TestingVector& vector) { - return !VectorIsShuffled(vector); - } - - testing::internal::Random random_; - TestingVector vector_; -}; // class VectorShuffleTest - -const int VectorShuffleTest::kVectorSize; - -TEST_F(VectorShuffleTest, HandlesEmptyRange) { - // Tests an empty range at the beginning... - vector_.ShuffleRange(&random_, 0, 0); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); - - // ...in the middle... - vector_.ShuffleRange(&random_, kVectorSize/2, kVectorSize/2); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); - - // ...at the end... - vector_.ShuffleRange(&random_, kVectorSize - 1, kVectorSize - 1); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); - - // ...and past the end. - vector_.ShuffleRange(&random_, kVectorSize, kVectorSize); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); -} - -TEST_F(VectorShuffleTest, HandlesRangeOfSizeOne) { - // Tests a size one range at the beginning... - vector_.ShuffleRange(&random_, 0, 1); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); - - // ...in the middle... - vector_.ShuffleRange(&random_, kVectorSize/2, kVectorSize/2 + 1); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); - - // ...and at the end. - vector_.ShuffleRange(&random_, kVectorSize - 1, kVectorSize); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsUnshuffled, vector_); -} - -// Because we use our own random number generator and a fixed seed, -// we can guarantee that the following "random" tests will succeed. - -TEST_F(VectorShuffleTest, ShufflesEntireVector) { - vector_.Shuffle(&random_); - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - EXPECT_FALSE(VectorIsUnshuffled(vector_)) << vector_; - - // Tests the first and last elements in particular to ensure that - // there are no off-by-one problems in our shuffle algorithm. - EXPECT_NE(0, vector_.GetElement(0)); - EXPECT_NE(kVectorSize - 1, vector_.GetElement(kVectorSize - 1)); -} - -TEST_F(VectorShuffleTest, ShufflesStartOfVector) { - const int kRangeSize = kVectorSize/2; - - vector_.ShuffleRange(&random_, 0, kRangeSize); - - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - EXPECT_PRED3(RangeIsShuffled, vector_, 0, kRangeSize); - EXPECT_PRED3(RangeIsUnshuffled, vector_, kRangeSize, kVectorSize); -} - -TEST_F(VectorShuffleTest, ShufflesEndOfVector) { - const int kRangeSize = kVectorSize / 2; - vector_.ShuffleRange(&random_, kRangeSize, kVectorSize); - - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - EXPECT_PRED3(RangeIsUnshuffled, vector_, 0, kRangeSize); - EXPECT_PRED3(RangeIsShuffled, vector_, kRangeSize, kVectorSize); -} - -TEST_F(VectorShuffleTest, ShufflesMiddleOfVector) { - int kRangeSize = kVectorSize/3; - vector_.ShuffleRange(&random_, kRangeSize, 2*kRangeSize); - - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - EXPECT_PRED3(RangeIsUnshuffled, vector_, 0, kRangeSize); - EXPECT_PRED3(RangeIsShuffled, vector_, kRangeSize, 2*kRangeSize); - EXPECT_PRED3(RangeIsUnshuffled, vector_, 2*kRangeSize, kVectorSize); -} - -TEST_F(VectorShuffleTest, ShufflesRepeatably) { - TestingVector vector2; - for (int i = 0; i < kVectorSize; i++) { - vector2.PushBack(i); - } - - random_.Reseed(1234); - vector_.Shuffle(&random_); - random_.Reseed(1234); - vector2.Shuffle(&random_); - - ASSERT_PRED1(VectorIsNotCorrupt, vector_); - ASSERT_PRED1(VectorIsNotCorrupt, vector2); - - for (int i = 0; i < kVectorSize; i++) { - EXPECT_EQ(vector_.GetElement(i), vector2.GetElement(i)) - << " where i is " << i; - } -} - -// Tests the size of the AssertHelper class. - -TEST(AssertHelperTest, AssertHelperIsSmall) { - // To avoid breaking clients that use lots of assertions in one - // function, we cannot grow the size of AssertHelper. - EXPECT_LE(sizeof(testing::internal::AssertHelper), sizeof(void*)); -} - -// Tests the String class. - -// Tests String's constructors. -TEST(StringTest, Constructors) { - // Default ctor. - String s1; - // We aren't using EXPECT_EQ(NULL, s1.c_str()) because comparing - // pointers with NULL isn't supported on all platforms. - EXPECT_EQ(0U, s1.length()); - EXPECT_TRUE(NULL == s1.c_str()); - - // Implicitly constructs from a C-string. - String s2 = "Hi"; - EXPECT_EQ(2U, s2.length()); - EXPECT_STREQ("Hi", s2.c_str()); - - // Constructs from a C-string and a length. - String s3("hello", 3); - EXPECT_EQ(3U, s3.length()); - EXPECT_STREQ("hel", s3.c_str()); - - // The empty String should be created when String is constructed with - // a NULL pointer and length 0. - EXPECT_EQ(0U, String(NULL, 0).length()); - EXPECT_FALSE(String(NULL, 0).c_str() == NULL); - - // Constructs a String that contains '\0'. - String s4("a\0bcd", 4); - EXPECT_EQ(4U, s4.length()); - EXPECT_EQ('a', s4.c_str()[0]); - EXPECT_EQ('\0', s4.c_str()[1]); - EXPECT_EQ('b', s4.c_str()[2]); - EXPECT_EQ('c', s4.c_str()[3]); - - // Copy ctor where the source is NULL. - const String null_str; - String s5 = null_str; - EXPECT_TRUE(s5.c_str() == NULL); - - // Copy ctor where the source isn't NULL. - String s6 = s3; - EXPECT_EQ(3U, s6.length()); - EXPECT_STREQ("hel", s6.c_str()); - - // Copy ctor where the source contains '\0'. - String s7 = s4; - EXPECT_EQ(4U, s7.length()); - EXPECT_EQ('a', s7.c_str()[0]); - EXPECT_EQ('\0', s7.c_str()[1]); - EXPECT_EQ('b', s7.c_str()[2]); - EXPECT_EQ('c', s7.c_str()[3]); -} - -#if GTEST_HAS_STD_STRING - -TEST(StringTest, ConvertsFromStdString) { - // An empty std::string. - const std::string src1(""); - const String dest1 = src1; - EXPECT_EQ(0U, dest1.length()); - EXPECT_STREQ("", dest1.c_str()); - - // A normal std::string. - const std::string src2("Hi"); - const String dest2 = src2; - EXPECT_EQ(2U, dest2.length()); - EXPECT_STREQ("Hi", dest2.c_str()); - - // An std::string with an embedded NUL character. - const char src3[] = "a\0b"; - const String dest3 = std::string(src3, sizeof(src3)); - EXPECT_EQ(sizeof(src3), dest3.length()); - EXPECT_EQ('a', dest3.c_str()[0]); - EXPECT_EQ('\0', dest3.c_str()[1]); - EXPECT_EQ('b', dest3.c_str()[2]); -} - -TEST(StringTest, ConvertsToStdString) { - // An empty String. - const String src1(""); - const std::string dest1 = src1; - EXPECT_EQ("", dest1); - - // A normal String. - const String src2("Hi"); - const std::string dest2 = src2; - EXPECT_EQ("Hi", dest2); - - // A String containing a '\0'. - const String src3("x\0y", 3); - const std::string dest3 = src3; - EXPECT_EQ(std::string("x\0y", 3), dest3); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_GLOBAL_STRING - -TEST(StringTest, ConvertsFromGlobalString) { - // An empty ::string. - const ::string src1(""); - const String dest1 = src1; - EXPECT_EQ(0U, dest1.length()); - EXPECT_STREQ("", dest1.c_str()); - - // A normal ::string. - const ::string src2("Hi"); - const String dest2 = src2; - EXPECT_EQ(2U, dest2.length()); - EXPECT_STREQ("Hi", dest2.c_str()); - - // An ::string with an embedded NUL character. - const char src3[] = "x\0y"; - const String dest3 = ::string(src3, sizeof(src3)); - EXPECT_EQ(sizeof(src3), dest3.length()); - EXPECT_EQ('x', dest3.c_str()[0]); - EXPECT_EQ('\0', dest3.c_str()[1]); - EXPECT_EQ('y', dest3.c_str()[2]); -} - -TEST(StringTest, ConvertsToGlobalString) { - // An empty String. - const String src1(""); - const ::string dest1 = src1; - EXPECT_EQ("", dest1); - - // A normal String. - const String src2("Hi"); - const ::string dest2 = src2; - EXPECT_EQ("Hi", dest2); - - const String src3("x\0y", 3); - const ::string dest3 = src3; - EXPECT_EQ(::string("x\0y", 3), dest3); -} - -#endif // GTEST_HAS_GLOBAL_STRING - -// Tests String::ShowCStringQuoted(). -TEST(StringTest, ShowCStringQuoted) { - EXPECT_STREQ("(null)", - String::ShowCStringQuoted(NULL).c_str()); - EXPECT_STREQ("\"\"", - String::ShowCStringQuoted("").c_str()); - EXPECT_STREQ("\"foo\"", - String::ShowCStringQuoted("foo").c_str()); -} - -// Tests String::empty(). -TEST(StringTest, Empty) { - EXPECT_TRUE(String("").empty()); - EXPECT_FALSE(String().empty()); - EXPECT_FALSE(String(NULL).empty()); - EXPECT_FALSE(String("a").empty()); - EXPECT_FALSE(String("\0", 1).empty()); -} - -// Tests String::Compare(). -TEST(StringTest, Compare) { - // NULL vs NULL. - EXPECT_EQ(0, String().Compare(String())); - - // NULL vs non-NULL. - EXPECT_EQ(-1, String().Compare(String(""))); - - // Non-NULL vs NULL. - EXPECT_EQ(1, String("").Compare(String())); - - // The following covers non-NULL vs non-NULL. - - // "" vs "". - EXPECT_EQ(0, String("").Compare(String(""))); - - // "" vs non-"". - EXPECT_EQ(-1, String("").Compare(String("\0", 1))); - EXPECT_EQ(-1, String("").Compare(" ")); - - // Non-"" vs "". - EXPECT_EQ(1, String("a").Compare(String(""))); - - // The following covers non-"" vs non-"". - - // Same length and equal. - EXPECT_EQ(0, String("a").Compare(String("a"))); - - // Same length and different. - EXPECT_EQ(-1, String("a\0b", 3).Compare(String("a\0c", 3))); - EXPECT_EQ(1, String("b").Compare(String("a"))); - - // Different lengths. - EXPECT_EQ(-1, String("a").Compare(String("ab"))); - EXPECT_EQ(-1, String("a").Compare(String("a\0", 2))); - EXPECT_EQ(1, String("abc").Compare(String("aacd"))); -} - -// Tests String::operator==(). -TEST(StringTest, Equals) { - const String null(NULL); - EXPECT_TRUE(null == NULL); // NOLINT - EXPECT_FALSE(null == ""); // NOLINT - EXPECT_FALSE(null == "bar"); // NOLINT - - const String empty(""); - EXPECT_FALSE(empty == NULL); // NOLINT - EXPECT_TRUE(empty == ""); // NOLINT - EXPECT_FALSE(empty == "bar"); // NOLINT - - const String foo("foo"); - EXPECT_FALSE(foo == NULL); // NOLINT - EXPECT_FALSE(foo == ""); // NOLINT - EXPECT_FALSE(foo == "bar"); // NOLINT - EXPECT_TRUE(foo == "foo"); // NOLINT - - const String bar("x\0y", 3); - EXPECT_FALSE(bar == "x"); -} - -// Tests String::operator!=(). -TEST(StringTest, NotEquals) { - const String null(NULL); - EXPECT_FALSE(null != NULL); // NOLINT - EXPECT_TRUE(null != ""); // NOLINT - EXPECT_TRUE(null != "bar"); // NOLINT - - const String empty(""); - EXPECT_TRUE(empty != NULL); // NOLINT - EXPECT_FALSE(empty != ""); // NOLINT - EXPECT_TRUE(empty != "bar"); // NOLINT - - const String foo("foo"); - EXPECT_TRUE(foo != NULL); // NOLINT - EXPECT_TRUE(foo != ""); // NOLINT - EXPECT_TRUE(foo != "bar"); // NOLINT - EXPECT_FALSE(foo != "foo"); // NOLINT - - const String bar("x\0y", 3); - EXPECT_TRUE(bar != "x"); -} - -// Tests String::length(). -TEST(StringTest, Length) { - EXPECT_EQ(0U, String().length()); - EXPECT_EQ(0U, String("").length()); - EXPECT_EQ(2U, String("ab").length()); - EXPECT_EQ(3U, String("a\0b", 3).length()); -} - -// Tests String::EndsWith(). -TEST(StringTest, EndsWith) { - EXPECT_TRUE(String("foobar").EndsWith("bar")); - EXPECT_TRUE(String("foobar").EndsWith("")); - EXPECT_TRUE(String("").EndsWith("")); - - EXPECT_FALSE(String("foobar").EndsWith("foo")); - EXPECT_FALSE(String("").EndsWith("foo")); -} - -// Tests String::EndsWithCaseInsensitive(). -TEST(StringTest, EndsWithCaseInsensitive) { - EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive("BAR")); - EXPECT_TRUE(String("foobaR").EndsWithCaseInsensitive("bar")); - EXPECT_TRUE(String("foobar").EndsWithCaseInsensitive("")); - EXPECT_TRUE(String("").EndsWithCaseInsensitive("")); - - EXPECT_FALSE(String("Foobar").EndsWithCaseInsensitive("foo")); - EXPECT_FALSE(String("foobar").EndsWithCaseInsensitive("Foo")); - EXPECT_FALSE(String("").EndsWithCaseInsensitive("foo")); -} - -// C++Builder's preprocessor is buggy; it fails to expand macros that -// appear in macro parameters after wide char literals. Provide an alias -// for NULL as a workaround. -static const wchar_t* const kNull = NULL; - -// Tests String::CaseInsensitiveWideCStringEquals -TEST(StringTest, CaseInsensitiveWideCStringEquals) { - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(NULL, NULL)); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L"")); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"", kNull)); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(kNull, L"foobar")); - EXPECT_FALSE(String::CaseInsensitiveWideCStringEquals(L"foobar", kNull)); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"foobar")); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"foobar", L"FOOBAR")); - EXPECT_TRUE(String::CaseInsensitiveWideCStringEquals(L"FOOBAR", L"foobar")); -} - -// Tests that NULL can be assigned to a String. -TEST(StringTest, CanBeAssignedNULL) { - const String src(NULL); - String dest; - - dest = src; - EXPECT_STREQ(NULL, dest.c_str()); -} - -// Tests that the empty string "" can be assigned to a String. -TEST(StringTest, CanBeAssignedEmpty) { - const String src(""); - String dest; - - dest = src; - EXPECT_STREQ("", dest.c_str()); -} - -// Tests that a non-empty string can be assigned to a String. -TEST(StringTest, CanBeAssignedNonEmpty) { - const String src("hello"); - String dest; - dest = src; - EXPECT_EQ(5U, dest.length()); - EXPECT_STREQ("hello", dest.c_str()); - - const String src2("x\0y", 3); - String dest2; - dest2 = src2; - EXPECT_EQ(3U, dest2.length()); - EXPECT_EQ('x', dest2.c_str()[0]); - EXPECT_EQ('\0', dest2.c_str()[1]); - EXPECT_EQ('y', dest2.c_str()[2]); -} - -// Tests that a String can be assigned to itself. -TEST(StringTest, CanBeAssignedSelf) { - String dest("hello"); - - dest = dest; - EXPECT_STREQ("hello", dest.c_str()); -} - -// Tests streaming a String. -TEST(StringTest, Streams) { - EXPECT_EQ(StreamableToString(String()), "(null)"); - EXPECT_EQ(StreamableToString(String("")), ""); - EXPECT_EQ(StreamableToString(String("a\0b", 3)), "a\\0b"); -} - -// Tests that String::Format() works. -TEST(StringTest, FormatWorks) { - // Normal case: the format spec is valid, the arguments match the - // spec, and the result is < 4095 characters. - EXPECT_STREQ("Hello, 42", String::Format("%s, %d", "Hello", 42).c_str()); - - // Edge case: the result is 4095 characters. - char buffer[4096]; - const size_t kSize = sizeof(buffer); - memset(buffer, 'a', kSize - 1); - buffer[kSize - 1] = '\0'; - EXPECT_STREQ(buffer, String::Format("%s", buffer).c_str()); - - // The result needs to be 4096 characters, exceeding Format()'s limit. - EXPECT_STREQ("", - String::Format("x%s", buffer).c_str()); - -#if GTEST_OS_LINUX - // On Linux, invalid format spec should lead to an error message. - // In other environment (e.g. MSVC on Windows), String::Format() may - // simply ignore a bad format spec, so this assertion is run on - // Linux only. - EXPECT_STREQ("", - String::Format("%").c_str()); -#endif -} - -#if GTEST_OS_WINDOWS - -// Tests String::ShowWideCString(). -TEST(StringTest, ShowWideCString) { - EXPECT_STREQ("(null)", - String::ShowWideCString(NULL).c_str()); - EXPECT_STREQ("", String::ShowWideCString(L"").c_str()); - EXPECT_STREQ("foo", String::ShowWideCString(L"foo").c_str()); -} - -// Tests String::ShowWideCStringQuoted(). -TEST(StringTest, ShowWideCStringQuoted) { - EXPECT_STREQ("(null)", - String::ShowWideCStringQuoted(NULL).c_str()); - EXPECT_STREQ("L\"\"", - String::ShowWideCStringQuoted(L"").c_str()); - EXPECT_STREQ("L\"foo\"", - String::ShowWideCStringQuoted(L"foo").c_str()); -} - -#if GTEST_OS_WINDOWS_MOBILE -TEST(StringTest, AnsiAndUtf16Null) { - EXPECT_EQ(NULL, String::AnsiToUtf16(NULL)); - EXPECT_EQ(NULL, String::Utf16ToAnsi(NULL)); -} - -TEST(StringTest, AnsiAndUtf16ConvertBasic) { - const char* ansi = String::Utf16ToAnsi(L"str"); - EXPECT_STREQ("str", ansi); - delete [] ansi; - const WCHAR* utf16 = String::AnsiToUtf16("str"); - EXPECT_EQ(0, wcsncmp(L"str", utf16, 3)); - delete [] utf16; -} - -TEST(StringTest, AnsiAndUtf16ConvertPathChars) { - const char* ansi = String::Utf16ToAnsi(L".:\\ \"*?"); - EXPECT_STREQ(".:\\ \"*?", ansi); - delete [] ansi; - const WCHAR* utf16 = String::AnsiToUtf16(".:\\ \"*?"); - EXPECT_EQ(0, wcsncmp(L".:\\ \"*?", utf16, 3)); - delete [] utf16; -} -#endif // GTEST_OS_WINDOWS_MOBILE - -#endif // GTEST_OS_WINDOWS - -// Tests TestProperty construction. -TEST(TestPropertyTest, StringValue) { - TestProperty property("key", "1"); - EXPECT_STREQ("key", property.key()); - EXPECT_STREQ("1", property.value()); -} - -// Tests TestProperty replacing a value. -TEST(TestPropertyTest, ReplaceStringValue) { - TestProperty property("key", "1"); - EXPECT_STREQ("1", property.value()); - property.SetValue("2"); - EXPECT_STREQ("2", property.value()); -} - -// AddFatalFailure() and AddNonfatalFailure() must be stand-alone -// functions (i.e. their definitions cannot be inlined at the call -// sites), or C++Builder won't compile the code. -static void AddFatalFailure() { - FAIL() << "Expected fatal failure."; -} - -static void AddNonfatalFailure() { - ADD_FAILURE() << "Expected non-fatal failure."; -} - -class ScopedFakeTestPartResultReporterTest : public Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - enum FailureMode { - FATAL_FAILURE, - NONFATAL_FAILURE - }; - static void AddFailure(FailureMode failure) { - if (failure == FATAL_FAILURE) { - AddFatalFailure(); - } else { - AddNonfatalFailure(); - } - } -}; - -// Tests that ScopedFakeTestPartResultReporter intercepts test -// failures. -TEST_F(ScopedFakeTestPartResultReporterTest, InterceptsTestFailures) { - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ONLY_CURRENT_THREAD, - &results); - AddFailure(NONFATAL_FAILURE); - AddFailure(FATAL_FAILURE); - } - - EXPECT_EQ(2, results.size()); - EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed()); -} - -TEST_F(ScopedFakeTestPartResultReporterTest, DeprecatedConstructor) { - TestPartResultArray results; - { - // Tests, that the deprecated constructor still works. - ScopedFakeTestPartResultReporter reporter(&results); - AddFailure(NONFATAL_FAILURE); - } - EXPECT_EQ(1, results.size()); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -class ScopedFakeTestPartResultReporterWithThreadsTest - : public ScopedFakeTestPartResultReporterTest { - protected: - static void AddFailureInOtherThread(FailureMode failure) { - pthread_t tid; - pthread_create(&tid, - NULL, - ScopedFakeTestPartResultReporterWithThreadsTest:: - FailureThread, - &failure); - pthread_join(tid, NULL); - } - private: - static void* FailureThread(void* attr) { - FailureMode* failure = static_cast(attr); - AddFailure(*failure); - return NULL; - } -}; - -TEST_F(ScopedFakeTestPartResultReporterWithThreadsTest, - InterceptsTestFailuresInAllThreads) { - TestPartResultArray results; - { - ScopedFakeTestPartResultReporter reporter( - ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, &results); - AddFailure(NONFATAL_FAILURE); - AddFailure(FATAL_FAILURE); - AddFailureInOtherThread(NONFATAL_FAILURE); - AddFailureInOtherThread(FATAL_FAILURE); - } - - EXPECT_EQ(4, results.size()); - EXPECT_TRUE(results.GetTestPartResult(0).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(1).fatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(2).nonfatally_failed()); - EXPECT_TRUE(results.GetTestPartResult(3).fatally_failed()); -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -// Tests EXPECT_FATAL_FAILURE{,ON_ALL_THREADS}. Makes sure that they -// work even if the failure is generated in a called function rather than -// the current context. - -typedef ScopedFakeTestPartResultReporterTest ExpectFatalFailureTest; - -TEST_F(ExpectFatalFailureTest, CatchesFatalFaliure) { - EXPECT_FATAL_FAILURE(AddFatalFailure(), "Expected fatal failure."); -} - -TEST_F(ExpectFatalFailureTest, CatchesFatalFailureOnAllThreads) { - // We have another test below to verify that the macro catches fatal - // failures generated on another thread. - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFatalFailure(), - "Expected fatal failure."); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true" -#pragma option push -w-ccc -#endif - -// Tests that EXPECT_FATAL_FAILURE() can be used in a non-void -// function even when the statement in it contains ASSERT_*. - -int NonVoidFunction() { - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), ""); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), ""); - return 0; -} - -TEST_F(ExpectFatalFailureTest, CanBeUsedInNonVoidFunction) { - NonVoidFunction(); -} - -// Tests that EXPECT_FATAL_FAILURE(statement, ...) doesn't abort the -// current function even though 'statement' generates a fatal failure. - -void DoesNotAbortHelper(bool* aborted) { - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), ""); - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(FAIL(), ""); - - *aborted = false; -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -TEST_F(ExpectFatalFailureTest, DoesNotAbort) { - bool aborted = true; - DoesNotAbortHelper(&aborted); - EXPECT_FALSE(aborted); -} - -// Tests that the EXPECT_FATAL_FAILURE{,_ON_ALL_THREADS} accepts a -// statement that contains a macro which expands to code containing an -// unprotected comma. - -static int global_var = 0; -#define GTEST_USE_UNPROTECTED_COMMA_ global_var++, global_var++ - -TEST_F(ExpectFatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) { -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007. - EXPECT_FATAL_FAILURE({ - GTEST_USE_UNPROTECTED_COMMA_; - AddFatalFailure(); - }, ""); -#endif - - EXPECT_FATAL_FAILURE_ON_ALL_THREADS({ - GTEST_USE_UNPROTECTED_COMMA_; - AddFatalFailure(); - }, ""); -} - -// Tests EXPECT_NONFATAL_FAILURE{,ON_ALL_THREADS}. - -typedef ScopedFakeTestPartResultReporterTest ExpectNonfatalFailureTest; - -TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailure) { - EXPECT_NONFATAL_FAILURE(AddNonfatalFailure(), - "Expected non-fatal failure."); -} - -TEST_F(ExpectNonfatalFailureTest, CatchesNonfatalFailureOnAllThreads) { - // We have another test below to verify that the macro catches - // non-fatal failures generated on another thread. - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(AddNonfatalFailure(), - "Expected non-fatal failure."); -} - -// Tests that the EXPECT_NONFATAL_FAILURE{,_ON_ALL_THREADS} accepts a -// statement that contains a macro which expands to code containing an -// unprotected comma. -TEST_F(ExpectNonfatalFailureTest, AcceptsMacroThatExpandsToUnprotectedComma) { - EXPECT_NONFATAL_FAILURE({ - GTEST_USE_UNPROTECTED_COMMA_; - AddNonfatalFailure(); - }, ""); - - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS({ - GTEST_USE_UNPROTECTED_COMMA_; - AddNonfatalFailure(); - }, ""); -} - -#if GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -typedef ScopedFakeTestPartResultReporterWithThreadsTest - ExpectFailureWithThreadsTest; - -TEST_F(ExpectFailureWithThreadsTest, ExpectFatalFailureOnAllThreads) { - EXPECT_FATAL_FAILURE_ON_ALL_THREADS(AddFailureInOtherThread(FATAL_FAILURE), - "Expected fatal failure."); -} - -TEST_F(ExpectFailureWithThreadsTest, ExpectNonFatalFailureOnAllThreads) { - EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS( - AddFailureInOtherThread(NONFATAL_FAILURE), "Expected non-fatal failure."); -} - -#endif // GTEST_IS_THREADSAFE && GTEST_HAS_PTHREAD - -// Tests the TestProperty class. - -TEST(TestPropertyTest, ConstructorWorks) { - const TestProperty property("key", "value"); - EXPECT_STREQ("key", property.key()); - EXPECT_STREQ("value", property.value()); -} - -TEST(TestPropertyTest, SetValue) { - TestProperty property("key", "value_1"); - EXPECT_STREQ("key", property.key()); - property.SetValue("value_2"); - EXPECT_STREQ("key", property.key()); - EXPECT_STREQ("value_2", property.value()); -} - -// Tests the TestPartResult class. - -TEST(TestPartResultTest, ConstructorWorks) { - Message message; - message << "something is terribly wrong"; - message << static_cast(testing::internal::kStackTraceMarker); - message << "some unimportant stack trace"; - - const TestPartResult result(TestPartResult::kNonFatalFailure, - "some_file.cc", - 42, - message.GetString().c_str()); - - EXPECT_EQ(TestPartResult::kNonFatalFailure, result.type()); - EXPECT_STREQ("some_file.cc", result.file_name()); - EXPECT_EQ(42, result.line_number()); - EXPECT_STREQ(message.GetString().c_str(), result.message()); - EXPECT_STREQ("something is terribly wrong", result.summary()); -} - -TEST(TestPartResultTest, ResultAccessorsWork) { - const TestPartResult success(TestPartResult::kSuccess, - "file.cc", - 42, - "message"); - EXPECT_TRUE(success.passed()); - EXPECT_FALSE(success.failed()); - EXPECT_FALSE(success.nonfatally_failed()); - EXPECT_FALSE(success.fatally_failed()); - - const TestPartResult nonfatal_failure(TestPartResult::kNonFatalFailure, - "file.cc", - 42, - "message"); - EXPECT_FALSE(nonfatal_failure.passed()); - EXPECT_TRUE(nonfatal_failure.failed()); - EXPECT_TRUE(nonfatal_failure.nonfatally_failed()); - EXPECT_FALSE(nonfatal_failure.fatally_failed()); - - const TestPartResult fatal_failure(TestPartResult::kFatalFailure, - "file.cc", - 42, - "message"); - EXPECT_FALSE(fatal_failure.passed()); - EXPECT_TRUE(fatal_failure.failed()); - EXPECT_FALSE(fatal_failure.nonfatally_failed()); - EXPECT_TRUE(fatal_failure.fatally_failed()); -} - -// Tests the TestResult class - -// The test fixture for testing TestResult. -class TestResultTest : public Test { - protected: - typedef Vector TPRVector; - - // We make use of 2 TestPartResult objects, - TestPartResult * pr1, * pr2; - - // ... and 3 TestResult objects. - TestResult * r0, * r1, * r2; - - virtual void SetUp() { - // pr1 is for success. - pr1 = new TestPartResult(TestPartResult::kSuccess, - "foo/bar.cc", - 10, - "Success!"); - - // pr2 is for fatal failure. - pr2 = new TestPartResult(TestPartResult::kFatalFailure, - "foo/bar.cc", - -1, // This line number means "unknown" - "Failure!"); - - // Creates the TestResult objects. - r0 = new TestResult(); - r1 = new TestResult(); - r2 = new TestResult(); - - // In order to test TestResult, we need to modify its internal - // state, in particular the TestPartResult Vector it holds. - // test_part_results() returns a const reference to this Vector. - // We cast it to a non-const object s.t. it can be modified (yes, - // this is a hack). - TPRVector* results1 = const_cast *>( - &TestResultAccessor::test_part_results(*r1)); - TPRVector* results2 = const_cast *>( - &TestResultAccessor::test_part_results(*r2)); - - // r0 is an empty TestResult. - - // r1 contains a single SUCCESS TestPartResult. - results1->PushBack(*pr1); - - // r2 contains a SUCCESS, and a FAILURE. - results2->PushBack(*pr1); - results2->PushBack(*pr2); - } - - virtual void TearDown() { - delete pr1; - delete pr2; - - delete r0; - delete r1; - delete r2; - } - - // Helper that compares two two TestPartResults. - static void CompareTestPartResult(const TestPartResult& expected, - const TestPartResult& actual) { - EXPECT_EQ(expected.type(), actual.type()); - EXPECT_STREQ(expected.file_name(), actual.file_name()); - EXPECT_EQ(expected.line_number(), actual.line_number()); - EXPECT_STREQ(expected.summary(), actual.summary()); - EXPECT_STREQ(expected.message(), actual.message()); - EXPECT_EQ(expected.passed(), actual.passed()); - EXPECT_EQ(expected.failed(), actual.failed()); - EXPECT_EQ(expected.nonfatally_failed(), actual.nonfatally_failed()); - EXPECT_EQ(expected.fatally_failed(), actual.fatally_failed()); - } -}; - -// Tests TestResult::total_part_count(). -TEST_F(TestResultTest, total_part_count) { - ASSERT_EQ(0, r0->total_part_count()); - ASSERT_EQ(1, r1->total_part_count()); - ASSERT_EQ(2, r2->total_part_count()); -} - -// Tests TestResult::Passed(). -TEST_F(TestResultTest, Passed) { - ASSERT_TRUE(r0->Passed()); - ASSERT_TRUE(r1->Passed()); - ASSERT_FALSE(r2->Passed()); -} - -// Tests TestResult::Failed(). -TEST_F(TestResultTest, Failed) { - ASSERT_FALSE(r0->Failed()); - ASSERT_FALSE(r1->Failed()); - ASSERT_TRUE(r2->Failed()); -} - -// Tests TestResult::GetTestPartResult(). - -typedef TestResultTest TestResultDeathTest; - -TEST_F(TestResultDeathTest, GetTestPartResult) { - CompareTestPartResult(*pr1, r2->GetTestPartResult(0)); - CompareTestPartResult(*pr2, r2->GetTestPartResult(1)); - EXPECT_DEATH_IF_SUPPORTED( - r2->GetTestPartResult(2), - "Invalid Vector index 2: must be in range \\[0, 1\\]\\."); - EXPECT_DEATH_IF_SUPPORTED( - r2->GetTestPartResult(-1), - "Invalid Vector index -1: must be in range \\[0, 1\\]\\."); -} - -// Tests TestResult has no properties when none are added. -TEST(TestResultPropertyTest, NoPropertiesFoundWhenNoneAreAdded) { - TestResult test_result; - ASSERT_EQ(0, test_result.test_property_count()); -} - -// Tests TestResult has the expected property when added. -TEST(TestResultPropertyTest, OnePropertyFoundWhenAdded) { - TestResult test_result; - TestProperty property("key_1", "1"); - TestResultAccessor::RecordProperty(&test_result, property); - ASSERT_EQ(1, test_result.test_property_count()); - const TestProperty& actual_property = test_result.GetTestProperty(0); - EXPECT_STREQ("key_1", actual_property.key()); - EXPECT_STREQ("1", actual_property.value()); -} - -// Tests TestResult has multiple properties when added. -TEST(TestResultPropertyTest, MultiplePropertiesFoundWhenAdded) { - TestResult test_result; - TestProperty property_1("key_1", "1"); - TestProperty property_2("key_2", "2"); - TestResultAccessor::RecordProperty(&test_result, property_1); - TestResultAccessor::RecordProperty(&test_result, property_2); - ASSERT_EQ(2, test_result.test_property_count()); - const TestProperty& actual_property_1 = test_result.GetTestProperty(0); - EXPECT_STREQ("key_1", actual_property_1.key()); - EXPECT_STREQ("1", actual_property_1.value()); - - const TestProperty& actual_property_2 = test_result.GetTestProperty(1); - EXPECT_STREQ("key_2", actual_property_2.key()); - EXPECT_STREQ("2", actual_property_2.value()); -} - -// Tests TestResult::RecordProperty() overrides values for duplicate keys. -TEST(TestResultPropertyTest, OverridesValuesForDuplicateKeys) { - TestResult test_result; - TestProperty property_1_1("key_1", "1"); - TestProperty property_2_1("key_2", "2"); - TestProperty property_1_2("key_1", "12"); - TestProperty property_2_2("key_2", "22"); - TestResultAccessor::RecordProperty(&test_result, property_1_1); - TestResultAccessor::RecordProperty(&test_result, property_2_1); - TestResultAccessor::RecordProperty(&test_result, property_1_2); - TestResultAccessor::RecordProperty(&test_result, property_2_2); - - ASSERT_EQ(2, test_result.test_property_count()); - const TestProperty& actual_property_1 = test_result.GetTestProperty(0); - EXPECT_STREQ("key_1", actual_property_1.key()); - EXPECT_STREQ("12", actual_property_1.value()); - - const TestProperty& actual_property_2 = test_result.GetTestProperty(1); - EXPECT_STREQ("key_2", actual_property_2.key()); - EXPECT_STREQ("22", actual_property_2.value()); -} - -// Tests TestResult::GetTestProperty(). -TEST(TestResultPropertyDeathTest, GetTestProperty) { - TestResult test_result; - TestProperty property_1("key_1", "1"); - TestProperty property_2("key_2", "2"); - TestProperty property_3("key_3", "3"); - TestResultAccessor::RecordProperty(&test_result, property_1); - TestResultAccessor::RecordProperty(&test_result, property_2); - TestResultAccessor::RecordProperty(&test_result, property_3); - - const TestProperty& fetched_property_1 = test_result.GetTestProperty(0); - const TestProperty& fetched_property_2 = test_result.GetTestProperty(1); - const TestProperty& fetched_property_3 = test_result.GetTestProperty(2); - - EXPECT_STREQ("key_1", fetched_property_1.key()); - EXPECT_STREQ("1", fetched_property_1.value()); - - EXPECT_STREQ("key_2", fetched_property_2.key()); - EXPECT_STREQ("2", fetched_property_2.value()); - - EXPECT_STREQ("key_3", fetched_property_3.key()); - EXPECT_STREQ("3", fetched_property_3.value()); - - EXPECT_DEATH_IF_SUPPORTED( - test_result.GetTestProperty(3), - "Invalid Vector index 3: must be in range \\[0, 2\\]\\."); - EXPECT_DEATH_IF_SUPPORTED( - test_result.GetTestProperty(-1), - "Invalid Vector index -1: must be in range \\[0, 2\\]\\."); -} - -// When a property using a reserved key is supplied to this function, it tests -// that a non-fatal failure is added, a fatal failure is not added, and that the -// property is not recorded. -void ExpectNonFatalFailureRecordingPropertyWithReservedKey(const char* key) { - TestResult test_result; - TestProperty property(key, "1"); - EXPECT_NONFATAL_FAILURE( - TestResultAccessor::RecordProperty(&test_result, property), - "Reserved key"); - ASSERT_EQ(0, test_result.test_property_count()) << "Not recorded"; -} - -// Attempting to recording a property with the Reserved literal "name" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledName) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("name"); -} - -// Attempting to recording a property with the Reserved literal "status" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledStatus) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("status"); -} - -// Attempting to recording a property with the Reserved literal "time" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledTime) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("time"); -} - -// Attempting to recording a property with the Reserved literal "classname" -// should add a non-fatal failure and the property should not be recorded. -TEST(TestResultPropertyTest, AddFailureWhenUsingReservedKeyCalledClassname) { - ExpectNonFatalFailureRecordingPropertyWithReservedKey("classname"); -} - -// Tests that GTestFlagSaver works on Windows and Mac. - -class GTestFlagSaverTest : public Test { - protected: - // Saves the Google Test flags such that we can restore them later, and - // then sets them to their default values. This will be called - // before the first test in this test case is run. - static void SetUpTestCase() { - saver_ = new GTestFlagSaver; - - GTEST_FLAG(also_run_disabled_tests) = false; - GTEST_FLAG(break_on_failure) = false; - GTEST_FLAG(catch_exceptions) = false; - GTEST_FLAG(death_test_use_fork) = false; - GTEST_FLAG(color) = "auto"; - GTEST_FLAG(filter) = ""; - GTEST_FLAG(list_tests) = false; - GTEST_FLAG(output) = ""; - GTEST_FLAG(print_time) = true; - GTEST_FLAG(random_seed) = 0; - GTEST_FLAG(repeat) = 1; - GTEST_FLAG(shuffle) = false; - GTEST_FLAG(throw_on_failure) = false; - } - - // Restores the Google Test flags that the tests have modified. This will - // be called after the last test in this test case is run. - static void TearDownTestCase() { - delete saver_; - saver_ = NULL; - } - - // Verifies that the Google Test flags have their default values, and then - // modifies each of them. - void VerifyAndModifyFlags() { - EXPECT_FALSE(GTEST_FLAG(also_run_disabled_tests)); - EXPECT_FALSE(GTEST_FLAG(break_on_failure)); - EXPECT_FALSE(GTEST_FLAG(catch_exceptions)); - EXPECT_STREQ("auto", GTEST_FLAG(color).c_str()); - EXPECT_FALSE(GTEST_FLAG(death_test_use_fork)); - EXPECT_STREQ("", GTEST_FLAG(filter).c_str()); - EXPECT_FALSE(GTEST_FLAG(list_tests)); - EXPECT_STREQ("", GTEST_FLAG(output).c_str()); - EXPECT_TRUE(GTEST_FLAG(print_time)); - EXPECT_EQ(0, GTEST_FLAG(random_seed)); - EXPECT_EQ(1, GTEST_FLAG(repeat)); - EXPECT_FALSE(GTEST_FLAG(shuffle)); - EXPECT_FALSE(GTEST_FLAG(throw_on_failure)); - - GTEST_FLAG(also_run_disabled_tests) = true; - GTEST_FLAG(break_on_failure) = true; - GTEST_FLAG(catch_exceptions) = true; - GTEST_FLAG(color) = "no"; - GTEST_FLAG(death_test_use_fork) = true; - GTEST_FLAG(filter) = "abc"; - GTEST_FLAG(list_tests) = true; - GTEST_FLAG(output) = "xml:foo.xml"; - GTEST_FLAG(print_time) = false; - GTEST_FLAG(random_seed) = 1; - GTEST_FLAG(repeat) = 100; - GTEST_FLAG(shuffle) = true; - GTEST_FLAG(throw_on_failure) = true; - } - private: - // For saving Google Test flags during this test case. - static GTestFlagSaver* saver_; -}; - -GTestFlagSaver* GTestFlagSaverTest::saver_ = NULL; - -// Google Test doesn't guarantee the order of tests. The following two -// tests are designed to work regardless of their order. - -// Modifies the Google Test flags in the test body. -TEST_F(GTestFlagSaverTest, ModifyGTestFlags) { - VerifyAndModifyFlags(); -} - -// Verifies that the Google Test flags in the body of the previous test were -// restored to their original values. -TEST_F(GTestFlagSaverTest, VerifyGTestFlags) { - VerifyAndModifyFlags(); -} - -// Sets an environment variable with the given name to the given -// value. If the value argument is "", unsets the environment -// variable. The caller must ensure that both arguments are not NULL. -static void SetEnv(const char* name, const char* value) { -#if GTEST_OS_WINDOWS_MOBILE - // Environment variables are not supported on Windows CE. - return; -#elif defined(__BORLANDC__) - // C++Builder's putenv only stores a pointer to its parameter; we have to - // ensure that the string remains valid as long as it might be needed. - // We use an std::map to do so. - static std::map added_env; - - // Because putenv stores a pointer to the string buffer, we can't delete the - // previous string (if present) until after it's replaced. - String *prev_env = NULL; - if (added_env.find(name) != added_env.end()) { - prev_env = added_env[name]; - } - added_env[name] = new String((Message() << name << "=" << value).GetString()); - putenv(added_env[name]->c_str()); - delete prev_env; -#elif GTEST_OS_WINDOWS // If we are on Windows proper. - _putenv((Message() << name << "=" << value).GetString().c_str()); -#else - if (*value == '\0') { - unsetenv(name); - } else { - setenv(name, value, 1); - } -#endif // GTEST_OS_WINDOWS_MOBILE -} - -#if !GTEST_OS_WINDOWS_MOBILE -// Environment variables are not supported on Windows CE. - -using testing::internal::Int32FromGTestEnv; - -// Tests Int32FromGTestEnv(). - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable is not set. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenVariableIsNotSet) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", ""); - EXPECT_EQ(10, Int32FromGTestEnv("temp", 10)); -} - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable overflows as an Int32. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueOverflows) { - printf("(expecting 2 warnings)\n"); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12345678987654321"); - EXPECT_EQ(20, Int32FromGTestEnv("temp", 20)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-12345678987654321"); - EXPECT_EQ(30, Int32FromGTestEnv("temp", 30)); -} - -// Tests that Int32FromGTestEnv() returns the default value when the -// environment variable does not represent a valid decimal integer. -TEST(Int32FromGTestEnvTest, ReturnsDefaultWhenValueIsInvalid) { - printf("(expecting 2 warnings)\n"); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "A1"); - EXPECT_EQ(40, Int32FromGTestEnv("temp", 40)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "12X"); - EXPECT_EQ(50, Int32FromGTestEnv("temp", 50)); -} - -// Tests that Int32FromGTestEnv() parses and returns the value of the -// environment variable when it represents a valid decimal integer in -// the range of an Int32. -TEST(Int32FromGTestEnvTest, ParsesAndReturnsValidValue) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "123"); - EXPECT_EQ(123, Int32FromGTestEnv("temp", 0)); - - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "TEMP", "-321"); - EXPECT_EQ(-321, Int32FromGTestEnv("temp", 0)); -} -#endif // !GTEST_OS_WINDOWS_MOBILE - -// Tests ParseInt32Flag(). - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag has wrong format -TEST(ParseInt32FlagTest, ReturnsFalseForInvalidFlag) { - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--a=100", "b", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("a=100", "a", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag overflows as an Int32. -TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueOverflows) { - printf("(expecting 2 warnings)\n"); - - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--abc=12345678987654321", "abc", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("--abc=-12345678987654321", "abc", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() returns false and doesn't change the -// output value when the flag does not represent a valid decimal -// integer. -TEST(ParseInt32FlagTest, ReturnsDefaultWhenValueIsInvalid) { - printf("(expecting 2 warnings)\n"); - - Int32 value = 123; - EXPECT_FALSE(ParseInt32Flag("--abc=A1", "abc", &value)); - EXPECT_EQ(123, value); - - EXPECT_FALSE(ParseInt32Flag("--abc=12X", "abc", &value)); - EXPECT_EQ(123, value); -} - -// Tests that ParseInt32Flag() parses the value of the flag and -// returns true when the flag represents a valid decimal integer in -// the range of an Int32. -TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) { - Int32 value = 123; - EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=456", "abc", &value)); - EXPECT_EQ(456, value); - - EXPECT_TRUE(ParseInt32Flag("--" GTEST_FLAG_PREFIX_ "abc=-789", - "abc", &value)); - EXPECT_EQ(-789, value); -} - -// Tests that Int32FromEnvOrDie() parses the value of the var or -// returns the correct default. -// Environment variables are not supported on Windows CE. -#if !GTEST_OS_WINDOWS_MOBILE -TEST(Int32FromEnvOrDieTest, ParsesAndReturnsValidValue) { - EXPECT_EQ(333, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "123"); - EXPECT_EQ(123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", "-123"); - EXPECT_EQ(-123, Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "UnsetVar", 333)); -} -#endif // !GTEST_OS_WINDOWS_MOBILE - -// Tests that Int32FromEnvOrDie() aborts with an error message -// if the variable is not an Int32. -TEST(Int32FromEnvOrDieDeathTest, AbortsOnFailure) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "xxx"); - EXPECT_DEATH_IF_SUPPORTED( - Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123), - ".*"); -} - -// Tests that Int32FromEnvOrDie() aborts with an error message -// if the variable cannot be represnted by an Int32. -TEST(Int32FromEnvOrDieDeathTest, AbortsOnInt32Overflow) { - SetEnv(GTEST_FLAG_PREFIX_UPPER_ "VAR", "1234567891234567891234"); - EXPECT_DEATH_IF_SUPPORTED( - Int32FromEnvOrDie(GTEST_FLAG_PREFIX_UPPER_ "VAR", 123), - ".*"); -} - -// Tests that ShouldRunTestOnShard() selects all tests -// where there is 1 shard. -TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereIsOneShard) { - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 0)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 1)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 2)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 3)); - EXPECT_TRUE(ShouldRunTestOnShard(1, 0, 4)); -} - -class ShouldShardTest : public testing::Test { - protected: - virtual void SetUp() { - index_var_ = GTEST_FLAG_PREFIX_UPPER_ "INDEX"; - total_var_ = GTEST_FLAG_PREFIX_UPPER_ "TOTAL"; - } - - virtual void TearDown() { - SetEnv(index_var_, ""); - SetEnv(total_var_, ""); - } - - const char* index_var_; - const char* total_var_; -}; - -// Tests that sharding is disabled if neither of the environment variables -// are set. -TEST_F(ShouldShardTest, ReturnsFalseWhenNeitherEnvVarIsSet) { - SetEnv(index_var_, ""); - SetEnv(total_var_, ""); - - EXPECT_FALSE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} - -// Tests that sharding is not enabled if total_shards == 1. -TEST_F(ShouldShardTest, ReturnsFalseWhenTotalShardIsOne) { - SetEnv(index_var_, "0"); - SetEnv(total_var_, "1"); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} - -// Tests that sharding is enabled if total_shards > 1 and -// we are not in a death test subprocess. -// Environment variables are not supported on Windows CE. -#if !GTEST_OS_WINDOWS_MOBILE -TEST_F(ShouldShardTest, WorksWhenShardEnvVarsAreValid) { - SetEnv(index_var_, "4"); - SetEnv(total_var_, "22"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); - - SetEnv(index_var_, "8"); - SetEnv(total_var_, "9"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); - - SetEnv(index_var_, "0"); - SetEnv(total_var_, "9"); - EXPECT_TRUE(ShouldShard(total_var_, index_var_, false)); - EXPECT_FALSE(ShouldShard(total_var_, index_var_, true)); -} -#endif // !GTEST_OS_WINDOWS_MOBILE - -// Tests that we exit in error if the sharding values are not valid. - -typedef ShouldShardTest ShouldShardDeathTest; - -TEST_F(ShouldShardDeathTest, AbortsWhenShardingEnvVarsAreInvalid) { - SetEnv(index_var_, "4"); - SetEnv(total_var_, "4"); - EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*"); - - SetEnv(index_var_, "4"); - SetEnv(total_var_, "-2"); - EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*"); - - SetEnv(index_var_, "5"); - SetEnv(total_var_, ""); - EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*"); - - SetEnv(index_var_, ""); - SetEnv(total_var_, "5"); - EXPECT_DEATH_IF_SUPPORTED(ShouldShard(total_var_, index_var_, false), ".*"); -} - -// Tests that ShouldRunTestOnShard is a partition when 5 -// shards are used. -TEST(ShouldRunTestOnShardTest, IsPartitionWhenThereAreFiveShards) { - // Choose an arbitrary number of tests and shards. - const int num_tests = 17; - const int num_shards = 5; - - // Check partitioning: each test should be on exactly 1 shard. - for (int test_id = 0; test_id < num_tests; test_id++) { - int prev_selected_shard_index = -1; - for (int shard_index = 0; shard_index < num_shards; shard_index++) { - if (ShouldRunTestOnShard(num_shards, shard_index, test_id)) { - if (prev_selected_shard_index < 0) { - prev_selected_shard_index = shard_index; - } else { - ADD_FAILURE() << "Shard " << prev_selected_shard_index << " and " - << shard_index << " are both selected to run test " << test_id; - } - } - } - } - - // Check balance: This is not required by the sharding protocol, but is a - // desirable property for performance. - for (int shard_index = 0; shard_index < num_shards; shard_index++) { - int num_tests_on_shard = 0; - for (int test_id = 0; test_id < num_tests; test_id++) { - num_tests_on_shard += - ShouldRunTestOnShard(num_shards, shard_index, test_id); - } - EXPECT_GE(num_tests_on_shard, num_tests / num_shards); - } -} - -// For the same reason we are not explicitly testing everything in the -// Test class, there are no separate tests for the following classes -// (except for some trivial cases): -// -// TestCase, UnitTest, UnitTestResultPrinter. -// -// Similarly, there are no separate tests for the following macros: -// -// TEST, TEST_F, RUN_ALL_TESTS - -TEST(UnitTestTest, CanGetOriginalWorkingDir) { - ASSERT_TRUE(UnitTest::GetInstance()->original_working_dir() != NULL); - EXPECT_STRNE(UnitTest::GetInstance()->original_working_dir(), ""); -} - -// This group of tests is for predicate assertions (ASSERT_PRED*, etc) -// of various arities. They do not attempt to be exhaustive. Rather, -// view them as smoke tests that can be easily reviewed and verified. -// A more complete set of tests for predicate assertions can be found -// in gtest_pred_impl_unittest.cc. - -// First, some predicates and predicate-formatters needed by the tests. - -// Returns true iff the argument is an even number. -bool IsEven(int n) { - return (n % 2) == 0; -} - -// A functor that returns true iff the argument is an even number. -struct IsEvenFunctor { - bool operator()(int n) { return IsEven(n); } -}; - -// A predicate-formatter function that asserts the argument is an even -// number. -AssertionResult AssertIsEven(const char* expr, int n) { - if (IsEven(n)) { - return AssertionSuccess(); - } - - Message msg; - msg << expr << " evaluates to " << n << ", which is not even."; - return AssertionFailure(msg); -} - -// A predicate-formatter functor that asserts the argument is an even -// number. -struct AssertIsEvenFunctor { - AssertionResult operator()(const char* expr, int n) { - return AssertIsEven(expr, n); - } -}; - -// Returns true iff the sum of the arguments is an even number. -bool SumIsEven2(int n1, int n2) { - return IsEven(n1 + n2); -} - -// A functor that returns true iff the sum of the arguments is an even -// number. -struct SumIsEven3Functor { - bool operator()(int n1, int n2, int n3) { - return IsEven(n1 + n2 + n3); - } -}; - -// A predicate-formatter function that asserts the sum of the -// arguments is an even number. -AssertionResult AssertSumIsEven4( - const char* e1, const char* e2, const char* e3, const char* e4, - int n1, int n2, int n3, int n4) { - const int sum = n1 + n2 + n3 + n4; - if (IsEven(sum)) { - return AssertionSuccess(); - } - - Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 - << " (" << n1 << " + " << n2 << " + " << n3 << " + " << n4 - << ") evaluates to " << sum << ", which is not even."; - return AssertionFailure(msg); -} - -// A predicate-formatter functor that asserts the sum of the arguments -// is an even number. -struct AssertSumIsEven5Functor { - AssertionResult operator()( - const char* e1, const char* e2, const char* e3, const char* e4, - const char* e5, int n1, int n2, int n3, int n4, int n5) { - const int sum = n1 + n2 + n3 + n4 + n5; - if (IsEven(sum)) { - return AssertionSuccess(); - } - - Message msg; - msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5 - << " (" - << n1 << " + " << n2 << " + " << n3 << " + " << n4 << " + " << n5 - << ") evaluates to " << sum << ", which is not even."; - return AssertionFailure(msg); - } -}; - - -// Tests unary predicate assertions. - -// Tests unary predicate assertions that don't use a custom formatter. -TEST(Pred1Test, WithoutFormat) { - // Success cases. - EXPECT_PRED1(IsEvenFunctor(), 2) << "This failure is UNEXPECTED!"; - ASSERT_PRED1(IsEven, 4); - - // Failure cases. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED1(IsEven, 5) << "This failure is expected."; - }, "This failure is expected."); - EXPECT_FATAL_FAILURE(ASSERT_PRED1(IsEvenFunctor(), 5), - "evaluates to false"); -} - -// Tests unary predicate assertions that use a custom formatter. -TEST(Pred1Test, WithFormat) { - // Success cases. - EXPECT_PRED_FORMAT1(AssertIsEven, 2); - ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), 4) - << "This failure is UNEXPECTED!"; - - // Failure cases. - const int n = 5; - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT1(AssertIsEvenFunctor(), n), - "n evaluates to 5, which is not even."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(AssertIsEven, 5) << "This failure is expected."; - }, "This failure is expected."); -} - -// Tests that unary predicate assertions evaluates their arguments -// exactly once. -TEST(Pred1Test, SingleEvaluationOnFailure) { - // A success case. - static int n = 0; - EXPECT_PRED1(IsEven, n++); - EXPECT_EQ(1, n) << "The argument is not evaluated exactly once."; - - // A failure case. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT1(AssertIsEvenFunctor(), n++) - << "This failure is expected."; - }, "This failure is expected."); - EXPECT_EQ(2, n) << "The argument is not evaluated exactly once."; -} - - -// Tests predicate assertions whose arity is >= 2. - -// Tests predicate assertions that don't use a custom formatter. -TEST(PredTest, WithoutFormat) { - // Success cases. - ASSERT_PRED2(SumIsEven2, 2, 4) << "This failure is UNEXPECTED!"; - EXPECT_PRED3(SumIsEven3Functor(), 4, 6, 8); - - // Failure cases. - const int n1 = 1; - const int n2 = 2; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED2(SumIsEven2, n1, n2) << "This failure is expected."; - }, "This failure is expected."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED3(SumIsEven3Functor(), 1, 2, 4); - }, "evaluates to false"); -} - -// Tests predicate assertions that use a custom formatter. -TEST(PredTest, WithFormat) { - // Success cases. - ASSERT_PRED_FORMAT4(AssertSumIsEven4, 4, 6, 8, 10) << - "This failure is UNEXPECTED!"; - EXPECT_PRED_FORMAT5(AssertSumIsEven5Functor(), 2, 4, 6, 8, 10); - - // Failure cases. - const int n1 = 1; - const int n2 = 2; - const int n3 = 4; - const int n4 = 6; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(AssertSumIsEven4, n1, n2, n3, n4); - }, "evaluates to 13, which is not even."); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(), 1, 2, 4, 6, 8) - << "This failure is expected."; - }, "This failure is expected."); -} - -// Tests that predicate assertions evaluates their arguments -// exactly once. -TEST(PredTest, SingleEvaluationOnFailure) { - // A success case. - int n1 = 0; - int n2 = 0; - EXPECT_PRED2(SumIsEven2, n1++, n2++); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - - // Another success case. - n1 = n2 = 0; - int n3 = 0; - int n4 = 0; - int n5 = 0; - ASSERT_PRED_FORMAT5(AssertSumIsEven5Functor(), - n1++, n2++, n3++, n4++, n5++) - << "This failure is UNEXPECTED!"; - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once."; - EXPECT_EQ(1, n5) << "Argument 5 is not evaluated exactly once."; - - // A failure case. - n1 = n2 = n3 = 0; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED3(SumIsEven3Functor(), ++n1, n2++, n3++) - << "This failure is expected."; - }, "This failure is expected."); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - - // Another failure case. - n1 = n2 = n3 = n4 = 0; - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT4(AssertSumIsEven4, ++n1, n2++, n3++, n4++); - }, "evaluates to 1, which is not even."); - EXPECT_EQ(1, n1) << "Argument 1 is not evaluated exactly once."; - EXPECT_EQ(1, n2) << "Argument 2 is not evaluated exactly once."; - EXPECT_EQ(1, n3) << "Argument 3 is not evaluated exactly once."; - EXPECT_EQ(1, n4) << "Argument 4 is not evaluated exactly once."; -} - - -// Some helper functions for testing using overloaded/template -// functions with ASSERT_PREDn and EXPECT_PREDn. - -bool IsPositive(int n) { - return n > 0; -} - -bool IsPositive(double x) { - return x > 0; -} - -template -bool IsNegative(T x) { - return x < 0; -} - -template -bool GreaterThan(T1 x1, T2 x2) { - return x1 > x2; -} - -// Tests that overloaded functions can be used in *_PRED* as long as -// their types are explicitly specified. -TEST(PredicateAssertionTest, AcceptsOverloadedFunction) { - // C++Builder requires C-style casts rather than static_cast. - EXPECT_PRED1((bool (*)(int))(IsPositive), 5); // NOLINT - ASSERT_PRED1((bool (*)(double))(IsPositive), 6.0); // NOLINT -} - -// Tests that template functions can be used in *_PRED* as long as -// their types are explicitly specified. -TEST(PredicateAssertionTest, AcceptsTemplateFunction) { - EXPECT_PRED1(IsNegative, -5); - // Makes sure that we can handle templates with more than one - // parameter. - ASSERT_PRED2((GreaterThan), 5, 0); -} - - -// Some helper functions for testing using overloaded/template -// functions with ASSERT_PRED_FORMATn and EXPECT_PRED_FORMATn. - -AssertionResult IsPositiveFormat(const char* /* expr */, int n) { - return n > 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -AssertionResult IsPositiveFormat(const char* /* expr */, double x) { - return x > 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -template -AssertionResult IsNegativeFormat(const char* /* expr */, T x) { - return x < 0 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -template -AssertionResult EqualsFormat(const char* /* expr1 */, const char* /* expr2 */, - const T1& x1, const T2& x2) { - return x1 == x2 ? AssertionSuccess() : - AssertionFailure(Message() << "Failure"); -} - -// Tests that overloaded functions can be used in *_PRED_FORMAT* -// without explicitly specifying their types. -TEST(PredicateFormatAssertionTest, AcceptsOverloadedFunction) { - EXPECT_PRED_FORMAT1(IsPositiveFormat, 5); - ASSERT_PRED_FORMAT1(IsPositiveFormat, 6.0); -} - -// Tests that template functions can be used in *_PRED_FORMAT* without -// explicitly specifying their types. -TEST(PredicateFormatAssertionTest, AcceptsTemplateFunction) { - EXPECT_PRED_FORMAT1(IsNegativeFormat, -5); - ASSERT_PRED_FORMAT2(EqualsFormat, 3, 3); -} - - -// Tests string assertions. - -// Tests ASSERT_STREQ with non-NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ) { - const char * const p1 = "good"; - ASSERT_STREQ(p1, p1); - - // Let p2 have the same content as p1, but be at a different address. - const char p2[] = "good"; - ASSERT_STREQ(p1, p2); - - EXPECT_FATAL_FAILURE(ASSERT_STREQ("bad", "good"), - "Expected: \"bad\""); -} - -// Tests ASSERT_STREQ with NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ_Null) { - ASSERT_STREQ(static_cast(NULL), NULL); - EXPECT_FATAL_FAILURE(ASSERT_STREQ(NULL, "non-null"), - "non-null"); -} - -// Tests ASSERT_STREQ with NULL arguments. -TEST(StringAssertionTest, ASSERT_STREQ_Null2) { - EXPECT_FATAL_FAILURE(ASSERT_STREQ("non-null", NULL), - "non-null"); -} - -// Tests ASSERT_STRNE. -TEST(StringAssertionTest, ASSERT_STRNE) { - ASSERT_STRNE("hi", "Hi"); - ASSERT_STRNE("Hi", NULL); - ASSERT_STRNE(NULL, "Hi"); - ASSERT_STRNE("", NULL); - ASSERT_STRNE(NULL, ""); - ASSERT_STRNE("", "Hi"); - ASSERT_STRNE("Hi", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRNE("Hi", "Hi"), - "\"Hi\" vs \"Hi\""); -} - -// Tests ASSERT_STRCASEEQ. -TEST(StringAssertionTest, ASSERT_STRCASEEQ) { - ASSERT_STRCASEEQ("hi", "Hi"); - ASSERT_STRCASEEQ(static_cast(NULL), NULL); - - ASSERT_STRCASEEQ("", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("Hi", "hi2"), - "(ignoring case)"); -} - -// Tests ASSERT_STRCASENE. -TEST(StringAssertionTest, ASSERT_STRCASENE) { - ASSERT_STRCASENE("hi1", "Hi2"); - ASSERT_STRCASENE("Hi", NULL); - ASSERT_STRCASENE(NULL, "Hi"); - ASSERT_STRCASENE("", NULL); - ASSERT_STRCASENE(NULL, ""); - ASSERT_STRCASENE("", "Hi"); - ASSERT_STRCASENE("Hi", ""); - EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("Hi", "hi"), - "(ignoring case)"); -} - -// Tests *_STREQ on wide strings. -TEST(StringAssertionTest, STREQ_Wide) { - // NULL strings. - ASSERT_STREQ(static_cast(NULL), NULL); - - // Empty strings. - ASSERT_STREQ(L"", L""); - - // Non-null vs NULL. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"non-null", NULL), - "non-null"); - - // Equal strings. - EXPECT_STREQ(L"Hi", L"Hi"); - - // Unequal strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc", L"Abc"), - "Abc"); - - // Strings containing wide characters. - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ(L"abc\x8119", L"abc\x8120"), - "abc"); -} - -// Tests *_STRNE on wide strings. -TEST(StringAssertionTest, STRNE_Wide) { - // NULL strings. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_STRNE(static_cast(NULL), NULL); - }, ""); - - // Empty strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"", L""), - "L\"\""); - - // Non-null vs NULL. - ASSERT_STRNE(L"non-null", NULL); - - // Equal strings. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"Hi", L"Hi"), - "L\"Hi\""); - - // Unequal strings. - EXPECT_STRNE(L"abc", L"Abc"); - - // Strings containing wide characters. - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE(L"abc\x8119", L"abc\x8119"), - "abc"); -} - -// Tests for ::testing::IsSubstring(). - -// Tests that IsSubstring() returns the correct result when the input -// argument type is const char*. -TEST(IsSubstringTest, ReturnsCorrectResultForCString) { - EXPECT_FALSE(IsSubstring("", "", NULL, "a")); - EXPECT_FALSE(IsSubstring("", "", "b", NULL)); - EXPECT_FALSE(IsSubstring("", "", "needle", "haystack")); - - EXPECT_TRUE(IsSubstring("", "", static_cast(NULL), NULL)); - EXPECT_TRUE(IsSubstring("", "", "needle", "two needles")); -} - -// Tests that IsSubstring() returns the correct result when the input -// argument type is const wchar_t*. -TEST(IsSubstringTest, ReturnsCorrectResultForWideCString) { - EXPECT_FALSE(IsSubstring("", "", kNull, L"a")); - EXPECT_FALSE(IsSubstring("", "", L"b", kNull)); - EXPECT_FALSE(IsSubstring("", "", L"needle", L"haystack")); - - EXPECT_TRUE(IsSubstring("", "", static_cast(NULL), NULL)); - EXPECT_TRUE(IsSubstring("", "", L"needle", L"two needles")); -} - -// Tests that IsSubstring() generates the correct message when the input -// argument type is const char*. -TEST(IsSubstringTest, GeneratesCorrectMessageForCString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: \"needle\"\n" - "Expected: a substring of haystack_expr\n" - "Which is: \"haystack\"", - IsSubstring("needle_expr", "haystack_expr", - "needle", "haystack").failure_message()); -} - -#if GTEST_HAS_STD_STRING - -// Tests that IsSubstring returns the correct result when the input -// argument type is ::std::string. -TEST(IsSubstringTest, ReturnsCorrectResultsForStdString) { - EXPECT_TRUE(IsSubstring("", "", std::string("hello"), "ahellob")); - EXPECT_FALSE(IsSubstring("", "", "hello", std::string("world"))); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING -// Tests that IsSubstring returns the correct result when the input -// argument type is ::std::wstring. -TEST(IsSubstringTest, ReturnsCorrectResultForStdWstring) { - EXPECT_TRUE(IsSubstring("", "", ::std::wstring(L"needle"), L"two needles")); - EXPECT_FALSE(IsSubstring("", "", L"needle", ::std::wstring(L"haystack"))); -} - -// Tests that IsSubstring() generates the correct message when the input -// argument type is ::std::wstring. -TEST(IsSubstringTest, GeneratesCorrectMessageForWstring) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: L\"needle\"\n" - "Expected: a substring of haystack_expr\n" - "Which is: L\"haystack\"", - IsSubstring( - "needle_expr", "haystack_expr", - ::std::wstring(L"needle"), L"haystack").failure_message()); -} - -#endif // GTEST_HAS_STD_WSTRING - -// Tests for ::testing::IsNotSubstring(). - -// Tests that IsNotSubstring() returns the correct result when the input -// argument type is const char*. -TEST(IsNotSubstringTest, ReturnsCorrectResultForCString) { - EXPECT_TRUE(IsNotSubstring("", "", "needle", "haystack")); - EXPECT_FALSE(IsNotSubstring("", "", "needle", "two needles")); -} - -// Tests that IsNotSubstring() returns the correct result when the input -// argument type is const wchar_t*. -TEST(IsNotSubstringTest, ReturnsCorrectResultForWideCString) { - EXPECT_TRUE(IsNotSubstring("", "", L"needle", L"haystack")); - EXPECT_FALSE(IsNotSubstring("", "", L"needle", L"two needles")); -} - -// Tests that IsNotSubstring() generates the correct message when the input -// argument type is const wchar_t*. -TEST(IsNotSubstringTest, GeneratesCorrectMessageForWideCString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: L\"needle\"\n" - "Expected: not a substring of haystack_expr\n" - "Which is: L\"two needles\"", - IsNotSubstring( - "needle_expr", "haystack_expr", - L"needle", L"two needles").failure_message()); -} - -#if GTEST_HAS_STD_STRING - -// Tests that IsNotSubstring returns the correct result when the input -// argument type is ::std::string. -TEST(IsNotSubstringTest, ReturnsCorrectResultsForStdString) { - EXPECT_FALSE(IsNotSubstring("", "", std::string("hello"), "ahellob")); - EXPECT_TRUE(IsNotSubstring("", "", "hello", std::string("world"))); -} - -// Tests that IsNotSubstring() generates the correct message when the input -// argument type is ::std::string. -TEST(IsNotSubstringTest, GeneratesCorrectMessageForStdString) { - EXPECT_STREQ("Value of: needle_expr\n" - " Actual: \"needle\"\n" - "Expected: not a substring of haystack_expr\n" - "Which is: \"two needles\"", - IsNotSubstring( - "needle_expr", "haystack_expr", - ::std::string("needle"), "two needles").failure_message()); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING - -// Tests that IsNotSubstring returns the correct result when the input -// argument type is ::std::wstring. -TEST(IsNotSubstringTest, ReturnsCorrectResultForStdWstring) { - EXPECT_FALSE( - IsNotSubstring("", "", ::std::wstring(L"needle"), L"two needles")); - EXPECT_TRUE(IsNotSubstring("", "", L"needle", ::std::wstring(L"haystack"))); -} - -#endif // GTEST_HAS_STD_WSTRING - -// Tests floating-point assertions. - -template -class FloatingPointTest : public Test { - protected: - - // Pre-calculated numbers to be used by the tests. - struct TestValues { - RawType close_to_positive_zero; - RawType close_to_negative_zero; - RawType further_from_negative_zero; - - RawType close_to_one; - RawType further_from_one; - - RawType infinity; - RawType close_to_infinity; - RawType further_from_infinity; - - RawType nan1; - RawType nan2; - }; - - typedef typename testing::internal::FloatingPoint Floating; - typedef typename Floating::Bits Bits; - - virtual void SetUp() { - const size_t max_ulps = Floating::kMaxUlps; - - // The bits that represent 0.0. - const Bits zero_bits = Floating(0).bits(); - - // Makes some numbers close to 0.0. - values_.close_to_positive_zero = Floating::ReinterpretBits( - zero_bits + max_ulps/2); - values_.close_to_negative_zero = -Floating::ReinterpretBits( - zero_bits + max_ulps - max_ulps/2); - values_.further_from_negative_zero = -Floating::ReinterpretBits( - zero_bits + max_ulps + 1 - max_ulps/2); - - // The bits that represent 1.0. - const Bits one_bits = Floating(1).bits(); - - // Makes some numbers close to 1.0. - values_.close_to_one = Floating::ReinterpretBits(one_bits + max_ulps); - values_.further_from_one = Floating::ReinterpretBits( - one_bits + max_ulps + 1); - - // +infinity. - values_.infinity = Floating::Infinity(); - - // The bits that represent +infinity. - const Bits infinity_bits = Floating(values_.infinity).bits(); - - // Makes some numbers close to infinity. - values_.close_to_infinity = Floating::ReinterpretBits( - infinity_bits - max_ulps); - values_.further_from_infinity = Floating::ReinterpretBits( - infinity_bits - max_ulps - 1); - - // Makes some NAN's. Sets the most significant bit of the fraction so that - // our NaN's are quiet; trying to process a signaling NaN would raise an - // exception if our environment enables floating point exceptions. - values_.nan1 = Floating::ReinterpretBits(Floating::kExponentBitMask - | (static_cast(1) << (Floating::kFractionBitCount - 1)) | 1); - values_.nan2 = Floating::ReinterpretBits(Floating::kExponentBitMask - | (static_cast(1) << (Floating::kFractionBitCount - 1)) | 200); - } - - void TestSize() { - EXPECT_EQ(sizeof(RawType), sizeof(Bits)); - } - - static TestValues values_; -}; - -template -typename FloatingPointTest::TestValues - FloatingPointTest::values_; - -// Instantiates FloatingPointTest for testing *_FLOAT_EQ. -typedef FloatingPointTest FloatTest; - -// Tests that the size of Float::Bits matches the size of float. -TEST_F(FloatTest, Size) { - TestSize(); -} - -// Tests comparing with +0 and -0. -TEST_F(FloatTest, Zeros) { - EXPECT_FLOAT_EQ(0.0, -0.0); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(-0.0, 1.0), - "1.0"); - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.5), - "1.5"); -} - -// Tests comparing numbers close to 0. -// -// This ensures that *_FLOAT_EQ handles the sign correctly and no -// overflow occurs when comparing numbers whose absolute value is very -// small. -TEST_F(FloatTest, AlmostZeros) { - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const FloatTest::TestValues& v(this->values_); - - EXPECT_FLOAT_EQ(0.0, v.close_to_positive_zero); - EXPECT_FLOAT_EQ(-0.0, v.close_to_negative_zero); - EXPECT_FLOAT_EQ(v.close_to_positive_zero, v.close_to_negative_zero); - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_FLOAT_EQ(v.close_to_positive_zero, - v.further_from_negative_zero); - }, "v.further_from_negative_zero"); -} - -// Tests comparing numbers close to each other. -TEST_F(FloatTest, SmallDiff) { - EXPECT_FLOAT_EQ(1.0, values_.close_to_one); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, values_.further_from_one), - "values_.further_from_one"); -} - -// Tests comparing numbers far apart. -TEST_F(FloatTest, LargeDiff) { - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(2.5, 3.0), - "3.0"); -} - -// Tests comparing with infinity. -// -// This ensures that no overflow occurs when comparing numbers whose -// absolute value is very large. -TEST_F(FloatTest, Infinity) { - EXPECT_FLOAT_EQ(values_.infinity, values_.close_to_infinity); - EXPECT_FLOAT_EQ(-values_.infinity, -values_.close_to_infinity); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, -values_.infinity), - "-values_.infinity"); - - // This is interesting as the representations of infinity and nan1 - // are only 1 DLP apart. - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.infinity, values_.nan1), - "values_.nan1"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that comparing with NAN always returns false. -TEST_F(FloatTest, NaN) { -#if !GTEST_OS_SYMBIAN -// Nokia's STLport crashes if we try to output infinity or NaN. - - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const FloatTest::TestValues& v(this->values_); - - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan1), - "v.nan1"); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(v.nan1, v.nan2), - "v.nan2"); - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(1.0, v.nan1), - "v.nan1"); - - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(v.nan1, v.infinity), - "v.infinity"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_FLOAT_EQ are reflexive. -TEST_F(FloatTest, Reflexive) { - EXPECT_FLOAT_EQ(0.0, 0.0); - EXPECT_FLOAT_EQ(1.0, 1.0); - ASSERT_FLOAT_EQ(values_.infinity, values_.infinity); -} - -// Tests that *_FLOAT_EQ are commutative. -TEST_F(FloatTest, Commutative) { - // We already tested EXPECT_FLOAT_EQ(1.0, values_.close_to_one). - EXPECT_FLOAT_EQ(values_.close_to_one, 1.0); - - // We already tested EXPECT_FLOAT_EQ(1.0, values_.further_from_one). - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(values_.further_from_one, 1.0), - "1.0"); -} - -// Tests EXPECT_NEAR. -TEST_F(FloatTest, EXPECT_NEAR) { - EXPECT_NEAR(-1.0f, -1.1f, 0.2f); - EXPECT_NEAR(2.0f, 3.0f, 1.0f); - EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0f,1.2f, 0.1f), // NOLINT - "The difference between 1.0f and 1.2f is 0.2, " - "which exceeds 0.1f"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous line. -} - -// Tests ASSERT_NEAR. -TEST_F(FloatTest, ASSERT_NEAR) { - ASSERT_NEAR(-1.0f, -1.1f, 0.2f); - ASSERT_NEAR(2.0f, 3.0f, 1.0f); - EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0f,1.2f, 0.1f), // NOLINT - "The difference between 1.0f and 1.2f is 0.2, " - "which exceeds 0.1f"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous line. -} - -// Tests the cases where FloatLE() should succeed. -TEST_F(FloatTest, FloatLESucceeds) { - EXPECT_PRED_FORMAT2(FloatLE, 1.0f, 2.0f); // When val1 < val2, - ASSERT_PRED_FORMAT2(FloatLE, 1.0f, 1.0f); // val1 == val2, - - // or when val1 is greater than, but almost equals to, val2. - EXPECT_PRED_FORMAT2(FloatLE, values_.close_to_positive_zero, 0.0f); -} - -// Tests the cases where FloatLE() should fail. -TEST_F(FloatTest, FloatLEFails) { - // When val1 is greater than val2 by a large margin, - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(FloatLE, 2.0f, 1.0f), - "(2.0f) <= (1.0f)"); - - // or by a small yet non-negligible margin, - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, values_.further_from_one, 1.0f); - }, "(values_.further_from_one) <= (1.0f)"); - -#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) - // Nokia's STLport crashes if we try to output infinity or NaN. - // C++Builder gives bad results for ordered comparisons involving NaNs - // due to compiler bugs. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, values_.nan1, values_.infinity); - }, "(values_.nan1) <= (values_.infinity)"); - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(FloatLE, -values_.infinity, values_.nan1); - }, "(-values_.infinity) <= (values_.nan1)"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(FloatLE, values_.nan1, values_.nan1); - }, "(values_.nan1) <= (values_.nan1)"); -#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) -} - -// Instantiates FloatingPointTest for testing *_DOUBLE_EQ. -typedef FloatingPointTest DoubleTest; - -// Tests that the size of Double::Bits matches the size of double. -TEST_F(DoubleTest, Size) { - TestSize(); -} - -// Tests comparing with +0 and -0. -TEST_F(DoubleTest, Zeros) { - EXPECT_DOUBLE_EQ(0.0, -0.0); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(-0.0, 1.0), - "1.0"); - EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(0.0, 1.0), - "1.0"); -} - -// Tests comparing numbers close to 0. -// -// This ensures that *_DOUBLE_EQ handles the sign correctly and no -// overflow occurs when comparing numbers whose absolute value is very -// small. -TEST_F(DoubleTest, AlmostZeros) { - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const DoubleTest::TestValues& v(this->values_); - - EXPECT_DOUBLE_EQ(0.0, v.close_to_positive_zero); - EXPECT_DOUBLE_EQ(-0.0, v.close_to_negative_zero); - EXPECT_DOUBLE_EQ(v.close_to_positive_zero, v.close_to_negative_zero); - - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_DOUBLE_EQ(v.close_to_positive_zero, - v.further_from_negative_zero); - }, "v.further_from_negative_zero"); -} - -// Tests comparing numbers close to each other. -TEST_F(DoubleTest, SmallDiff) { - EXPECT_DOUBLE_EQ(1.0, values_.close_to_one); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, values_.further_from_one), - "values_.further_from_one"); -} - -// Tests comparing numbers far apart. -TEST_F(DoubleTest, LargeDiff) { - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(2.0, 3.0), - "3.0"); -} - -// Tests comparing with infinity. -// -// This ensures that no overflow occurs when comparing numbers whose -// absolute value is very large. -TEST_F(DoubleTest, Infinity) { - EXPECT_DOUBLE_EQ(values_.infinity, values_.close_to_infinity); - EXPECT_DOUBLE_EQ(-values_.infinity, -values_.close_to_infinity); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, -values_.infinity), - "-values_.infinity"); - - // This is interesting as the representations of infinity_ and nan1_ - // are only 1 DLP apart. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.infinity, values_.nan1), - "values_.nan1"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that comparing with NAN always returns false. -TEST_F(DoubleTest, NaN) { -#if !GTEST_OS_SYMBIAN - // In C++Builder, names within local classes (such as used by - // EXPECT_FATAL_FAILURE) cannot be resolved against static members of the - // scoping class. Use a static local alias as a workaround. - static const DoubleTest::TestValues& v(this->values_); - - // Nokia's STLport crashes if we try to output infinity or NaN. - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan1), - "v.nan1"); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(v.nan1, v.nan2), "v.nan2"); - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(1.0, v.nan1), "v.nan1"); - EXPECT_FATAL_FAILURE(ASSERT_DOUBLE_EQ(v.nan1, v.infinity), - "v.infinity"); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_DOUBLE_EQ are reflexive. -TEST_F(DoubleTest, Reflexive) { - EXPECT_DOUBLE_EQ(0.0, 0.0); - EXPECT_DOUBLE_EQ(1.0, 1.0); -#if !GTEST_OS_SYMBIAN - // Nokia's STLport crashes if we try to output infinity or NaN. - ASSERT_DOUBLE_EQ(values_.infinity, values_.infinity); -#endif // !GTEST_OS_SYMBIAN -} - -// Tests that *_DOUBLE_EQ are commutative. -TEST_F(DoubleTest, Commutative) { - // We already tested EXPECT_DOUBLE_EQ(1.0, values_.close_to_one). - EXPECT_DOUBLE_EQ(values_.close_to_one, 1.0); - - // We already tested EXPECT_DOUBLE_EQ(1.0, values_.further_from_one). - EXPECT_NONFATAL_FAILURE(EXPECT_DOUBLE_EQ(values_.further_from_one, 1.0), - "1.0"); -} - -// Tests EXPECT_NEAR. -TEST_F(DoubleTest, EXPECT_NEAR) { - EXPECT_NEAR(-1.0, -1.1, 0.2); - EXPECT_NEAR(2.0, 3.0, 1.0); - EXPECT_NONFATAL_FAILURE(EXPECT_NEAR(1.0, 1.2, 0.1), // NOLINT - "The difference between 1.0 and 1.2 is 0.2, " - "which exceeds 0.1"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous statement. -} - -// Tests ASSERT_NEAR. -TEST_F(DoubleTest, ASSERT_NEAR) { - ASSERT_NEAR(-1.0, -1.1, 0.2); - ASSERT_NEAR(2.0, 3.0, 1.0); - EXPECT_FATAL_FAILURE(ASSERT_NEAR(1.0, 1.2, 0.1), // NOLINT - "The difference between 1.0 and 1.2 is 0.2, " - "which exceeds 0.1"); - // To work around a bug in gcc 2.95.0, there is intentionally no - // space after the first comma in the previous statement. -} - -// Tests the cases where DoubleLE() should succeed. -TEST_F(DoubleTest, DoubleLESucceeds) { - EXPECT_PRED_FORMAT2(DoubleLE, 1.0, 2.0); // When val1 < val2, - ASSERT_PRED_FORMAT2(DoubleLE, 1.0, 1.0); // val1 == val2, - - // or when val1 is greater than, but almost equals to, val2. - EXPECT_PRED_FORMAT2(DoubleLE, values_.close_to_positive_zero, 0.0); -} - -// Tests the cases where DoubleLE() should fail. -TEST_F(DoubleTest, DoubleLEFails) { - // When val1 is greater than val2 by a large margin, - EXPECT_NONFATAL_FAILURE(EXPECT_PRED_FORMAT2(DoubleLE, 2.0, 1.0), - "(2.0) <= (1.0)"); - - // or by a small yet non-negligible margin, - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, values_.further_from_one, 1.0); - }, "(values_.further_from_one) <= (1.0)"); - -#if !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) - // Nokia's STLport crashes if we try to output infinity or NaN. - // C++Builder gives bad results for ordered comparisons involving NaNs - // due to compiler bugs. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.infinity); - }, "(values_.nan1) <= (values_.infinity)"); - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_PRED_FORMAT2(DoubleLE, -values_.infinity, values_.nan1); - }, " (-values_.infinity) <= (values_.nan1)"); - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_PRED_FORMAT2(DoubleLE, values_.nan1, values_.nan1); - }, "(values_.nan1) <= (values_.nan1)"); -#endif // !GTEST_OS_SYMBIAN && !defined(__BORLANDC__) -} - - -// Verifies that a test or test case whose name starts with DISABLED_ is -// not run. - -// A test whose name starts with DISABLED_. -// Should not run. -TEST(DisabledTest, DISABLED_TestShouldNotRun) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -// A test whose name does not start with DISABLED_. -// Should run. -TEST(DisabledTest, NotDISABLED_TestShouldRun) { - EXPECT_EQ(1, 1); -} - -// A test case whose name starts with DISABLED_. -// Should not run. -TEST(DISABLED_TestCase, TestShouldNotRun) { - FAIL() << "Unexpected failure: Test in disabled test case should not be run."; -} - -// A test case and test whose names start with DISABLED_. -// Should not run. -TEST(DISABLED_TestCase, DISABLED_TestShouldNotRun) { - FAIL() << "Unexpected failure: Test in disabled test case should not be run."; -} - -// Check that when all tests in a test case are disabled, SetupTestCase() and -// TearDownTestCase() are not called. -class DisabledTestsTest : public Test { - protected: - static void SetUpTestCase() { - FAIL() << "Unexpected failure: All tests disabled in test case. " - "SetupTestCase() should not be called."; - } - - static void TearDownTestCase() { - FAIL() << "Unexpected failure: All tests disabled in test case. " - "TearDownTestCase() should not be called."; - } -}; - -TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_1) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -TEST_F(DisabledTestsTest, DISABLED_TestShouldNotRun_2) { - FAIL() << "Unexpected failure: Disabled test should not be run."; -} - -// Tests that disabled typed tests aren't run. - -#if GTEST_HAS_TYPED_TEST - -template -class TypedTest : public Test { -}; - -typedef testing::Types NumericTypes; -TYPED_TEST_CASE(TypedTest, NumericTypes); - -TYPED_TEST(TypedTest, DISABLED_ShouldNotRun) { - FAIL() << "Unexpected failure: Disabled typed test should not run."; -} - -template -class DISABLED_TypedTest : public Test { -}; - -TYPED_TEST_CASE(DISABLED_TypedTest, NumericTypes); - -TYPED_TEST(DISABLED_TypedTest, ShouldNotRun) { - FAIL() << "Unexpected failure: Disabled typed test should not run."; -} - -#endif // GTEST_HAS_TYPED_TEST - -// Tests that disabled type-parameterized tests aren't run. - -#if GTEST_HAS_TYPED_TEST_P - -template -class TypedTestP : public Test { -}; - -TYPED_TEST_CASE_P(TypedTestP); - -TYPED_TEST_P(TypedTestP, DISABLED_ShouldNotRun) { - FAIL() << "Unexpected failure: " - << "Disabled type-parameterized test should not run."; -} - -REGISTER_TYPED_TEST_CASE_P(TypedTestP, DISABLED_ShouldNotRun); - -INSTANTIATE_TYPED_TEST_CASE_P(My, TypedTestP, NumericTypes); - -template -class DISABLED_TypedTestP : public Test { -}; - -TYPED_TEST_CASE_P(DISABLED_TypedTestP); - -TYPED_TEST_P(DISABLED_TypedTestP, ShouldNotRun) { - FAIL() << "Unexpected failure: " - << "Disabled type-parameterized test should not run."; -} - -REGISTER_TYPED_TEST_CASE_P(DISABLED_TypedTestP, ShouldNotRun); - -INSTANTIATE_TYPED_TEST_CASE_P(My, DISABLED_TypedTestP, NumericTypes); - -#endif // GTEST_HAS_TYPED_TEST_P - -// Tests that assertion macros evaluate their arguments exactly once. - -class SingleEvaluationTest : public Test { - public: // Must be public and not protected due to a bug in g++ 3.4.2. - // This helper function is needed by the FailedASSERT_STREQ test - // below. It's public to work around C++Builder's bug with scoping local - // classes. - static void CompareAndIncrementCharPtrs() { - ASSERT_STREQ(p1_++, p2_++); - } - - // This helper function is needed by the FailedASSERT_NE test below. It's - // public to work around C++Builder's bug with scoping local classes. - static void CompareAndIncrementInts() { - ASSERT_NE(a_++, b_++); - } - - protected: - SingleEvaluationTest() { - p1_ = s1_; - p2_ = s2_; - a_ = 0; - b_ = 0; - } - - static const char* const s1_; - static const char* const s2_; - static const char* p1_; - static const char* p2_; - - static int a_; - static int b_; -}; - -const char* const SingleEvaluationTest::s1_ = "01234"; -const char* const SingleEvaluationTest::s2_ = "abcde"; -const char* SingleEvaluationTest::p1_; -const char* SingleEvaluationTest::p2_; -int SingleEvaluationTest::a_; -int SingleEvaluationTest::b_; - -// Tests that when ASSERT_STREQ fails, it evaluates its arguments -// exactly once. -TEST_F(SingleEvaluationTest, FailedASSERT_STREQ) { - EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementCharPtrs(), - "p2_++"); - EXPECT_EQ(s1_ + 1, p1_); - EXPECT_EQ(s2_ + 1, p2_); -} - -// Tests that string assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, ASSERT_STR) { - // successful EXPECT_STRNE - EXPECT_STRNE(p1_++, p2_++); - EXPECT_EQ(s1_ + 1, p1_); - EXPECT_EQ(s2_ + 1, p2_); - - // failed EXPECT_STRCASEEQ - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ(p1_++, p2_++), - "ignoring case"); - EXPECT_EQ(s1_ + 2, p1_); - EXPECT_EQ(s2_ + 2, p2_); -} - -// Tests that when ASSERT_NE fails, it evaluates its arguments exactly -// once. -TEST_F(SingleEvaluationTest, FailedASSERT_NE) { - EXPECT_FATAL_FAILURE(SingleEvaluationTest::CompareAndIncrementInts(), - "(a_++) != (b_++)"); - EXPECT_EQ(1, a_); - EXPECT_EQ(1, b_); -} - -// Tests that assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, OtherCases) { - // successful EXPECT_TRUE - EXPECT_TRUE(0 == a_++); // NOLINT - EXPECT_EQ(1, a_); - - // failed EXPECT_TRUE - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(-1 == a_++), "-1 == a_++"); - EXPECT_EQ(2, a_); - - // successful EXPECT_GT - EXPECT_GT(a_++, b_++); - EXPECT_EQ(3, a_); - EXPECT_EQ(1, b_); - - // failed EXPECT_LT - EXPECT_NONFATAL_FAILURE(EXPECT_LT(a_++, b_++), "(a_++) < (b_++)"); - EXPECT_EQ(4, a_); - EXPECT_EQ(2, b_); - - // successful ASSERT_TRUE - ASSERT_TRUE(0 < a_++); // NOLINT - EXPECT_EQ(5, a_); - - // successful ASSERT_GT - ASSERT_GT(a_++, b_++); - EXPECT_EQ(6, a_); - EXPECT_EQ(3, b_); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowAnInteger() { - throw 1; -} - -// Tests that assertion arguments are evaluated exactly once. -TEST_F(SingleEvaluationTest, ExceptionTests) { - // successful EXPECT_THROW - EXPECT_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }, int); - EXPECT_EQ(1, a_); - - // failed EXPECT_THROW, throws different - EXPECT_NONFATAL_FAILURE(EXPECT_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }, bool), "throws a different type"); - EXPECT_EQ(2, a_); - - // failed EXPECT_THROW, throws nothing - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(a_++, bool), "throws nothing"); - EXPECT_EQ(3, a_); - - // successful EXPECT_NO_THROW - EXPECT_NO_THROW(a_++); - EXPECT_EQ(4, a_); - - // failed EXPECT_NO_THROW - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }), "it throws"); - EXPECT_EQ(5, a_); - - // successful EXPECT_ANY_THROW - EXPECT_ANY_THROW({ // NOLINT - a_++; - ThrowAnInteger(); - }); - EXPECT_EQ(6, a_); - - // failed EXPECT_ANY_THROW - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(a_++), "it doesn't"); - EXPECT_EQ(7, a_); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests {ASSERT|EXPECT}_NO_FATAL_FAILURE. -class NoFatalFailureTest : public Test { - protected: - void Succeeds() {} - void FailsNonFatal() { - ADD_FAILURE() << "some non-fatal failure"; - } - void Fails() { - FAIL() << "some fatal failure"; - } - - void DoAssertNoFatalFailureOnFails() { - ASSERT_NO_FATAL_FAILURE(Fails()); - ADD_FAILURE() << "shold not reach here."; - } - - void DoExpectNoFatalFailureOnFails() { - EXPECT_NO_FATAL_FAILURE(Fails()); - ADD_FAILURE() << "other failure"; - } -}; - -TEST_F(NoFatalFailureTest, NoFailure) { - EXPECT_NO_FATAL_FAILURE(Succeeds()); - ASSERT_NO_FATAL_FAILURE(Succeeds()); -} - -TEST_F(NoFatalFailureTest, NonFatalIsNoFailure) { - EXPECT_NONFATAL_FAILURE( - EXPECT_NO_FATAL_FAILURE(FailsNonFatal()), - "some non-fatal failure"); - EXPECT_NONFATAL_FAILURE( - ASSERT_NO_FATAL_FAILURE(FailsNonFatal()), - "some non-fatal failure"); -} - -TEST_F(NoFatalFailureTest, AssertNoFatalFailureOnFatalFailure) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - DoAssertNoFatalFailureOnFails(); - } - ASSERT_EQ(2, gtest_failures.size()); - EXPECT_EQ(TestPartResult::kFatalFailure, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(TestPartResult::kFatalFailure, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does", - gtest_failures.GetTestPartResult(1).message()); -} - -TEST_F(NoFatalFailureTest, ExpectNoFatalFailureOnFatalFailure) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - DoExpectNoFatalFailureOnFails(); - } - ASSERT_EQ(3, gtest_failures.size()); - EXPECT_EQ(TestPartResult::kFatalFailure, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(TestPartResult::kNonFatalFailure, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_EQ(TestPartResult::kNonFatalFailure, - gtest_failures.GetTestPartResult(2).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "some fatal failure", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "it does", - gtest_failures.GetTestPartResult(1).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "other failure", - gtest_failures.GetTestPartResult(2).message()); -} - -TEST_F(NoFatalFailureTest, MessageIsStreamable) { - TestPartResultArray gtest_failures; - { - ScopedFakeTestPartResultReporter gtest_reporter(>est_failures); - EXPECT_NO_FATAL_FAILURE(FAIL() << "foo") << "my message"; - } - ASSERT_EQ(2, gtest_failures.size()); - EXPECT_EQ(TestPartResult::kNonFatalFailure, - gtest_failures.GetTestPartResult(0).type()); - EXPECT_EQ(TestPartResult::kNonFatalFailure, - gtest_failures.GetTestPartResult(1).type()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "foo", - gtest_failures.GetTestPartResult(0).message()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, "my message", - gtest_failures.GetTestPartResult(1).message()); -} - -// Tests non-string assertions. - -// Tests EqFailure(), used for implementing *EQ* assertions. -TEST(AssertionTest, EqFailure) { - const String foo_val("5"), bar_val("6"); - const String msg1( - EqFailure("foo", "bar", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: 6\n" - "Expected: foo\n" - "Which is: 5", - msg1.c_str()); - - const String msg2( - EqFailure("foo", "6", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: 6\n" - "Expected: foo\n" - "Which is: 5", - msg2.c_str()); - - const String msg3( - EqFailure("5", "bar", foo_val, bar_val, false) - .failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: 6\n" - "Expected: 5", - msg3.c_str()); - - const String msg4( - EqFailure("5", "6", foo_val, bar_val, false).failure_message()); - EXPECT_STREQ( - "Value of: 6\n" - "Expected: 5", - msg4.c_str()); - - const String msg5( - EqFailure("foo", "bar", - String("\"x\""), String("\"y\""), - true).failure_message()); - EXPECT_STREQ( - "Value of: bar\n" - " Actual: \"y\"\n" - "Expected: foo (ignoring case)\n" - "Which is: \"x\"", - msg5.c_str()); -} - -// Tests AppendUserMessage(), used for implementing the *EQ* macros. -TEST(AssertionTest, AppendUserMessage) { - const String foo("foo"); - - Message msg; - EXPECT_STREQ("foo", - AppendUserMessage(foo, msg).c_str()); - - msg << "bar"; - EXPECT_STREQ("foo\nbar", - AppendUserMessage(foo, msg).c_str()); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests ASSERT_TRUE. -TEST(AssertionTest, ASSERT_TRUE) { - ASSERT_TRUE(2 > 1); // NOLINT - EXPECT_FATAL_FAILURE(ASSERT_TRUE(2 < 1), - "2 < 1"); -} - -// Tests ASSERT_FALSE. -TEST(AssertionTest, ASSERT_FALSE) { - ASSERT_FALSE(2 < 1); // NOLINT - EXPECT_FATAL_FAILURE(ASSERT_FALSE(2 > 1), - "Value of: 2 > 1\n" - " Actual: true\n" - "Expected: false"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -// Tests using ASSERT_EQ on double values. The purpose is to make -// sure that the specialization we did for integer and anonymous enums -// isn't used for double arguments. -TEST(ExpectTest, ASSERT_EQ_Double) { - // A success. - ASSERT_EQ(5.6, 5.6); - - // A failure. - EXPECT_FATAL_FAILURE(ASSERT_EQ(5.1, 5.2), - "5.1"); -} - -// Tests ASSERT_EQ. -TEST(AssertionTest, ASSERT_EQ) { - ASSERT_EQ(5, 2 + 3); - EXPECT_FATAL_FAILURE(ASSERT_EQ(5, 2*3), - "Value of: 2*3\n" - " Actual: 6\n" - "Expected: 5"); -} - -// Tests ASSERT_EQ(NULL, pointer). -#if !GTEST_OS_SYMBIAN -// The NULL-detection template magic fails to compile with -// the Nokia compiler and crashes the ARM compiler, hence -// not testing on Symbian. -TEST(AssertionTest, ASSERT_EQ_NULL) { - // A success. - const char* p = NULL; - // Some older GCC versions may issue a spurious waring in this or the next - // assertion statement. This warning should not be suppressed with - // static_cast since the test verifies the ability to use bare NULL as the - // expected parameter to the macro. - ASSERT_EQ(NULL, p); - - // A failure. - static int n = 0; - EXPECT_FATAL_FAILURE(ASSERT_EQ(NULL, &n), - "Value of: &n\n"); -} -#endif // !GTEST_OS_SYMBIAN - -// Tests ASSERT_EQ(0, non_pointer). Since the literal 0 can be -// treated as a null pointer by the compiler, we need to make sure -// that ASSERT_EQ(0, non_pointer) isn't interpreted by Google Test as -// ASSERT_EQ(static_cast(NULL), non_pointer). -TEST(ExpectTest, ASSERT_EQ_0) { - int n = 0; - - // A success. - ASSERT_EQ(0, n); - - // A failure. - EXPECT_FATAL_FAILURE(ASSERT_EQ(0, 5.6), - "Expected: 0"); -} - -// Tests ASSERT_NE. -TEST(AssertionTest, ASSERT_NE) { - ASSERT_NE(6, 7); - EXPECT_FATAL_FAILURE(ASSERT_NE('a', 'a'), - "Expected: ('a') != ('a'), " - "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)"); -} - -// Tests ASSERT_LE. -TEST(AssertionTest, ASSERT_LE) { - ASSERT_LE(2, 3); - ASSERT_LE(2, 2); - EXPECT_FATAL_FAILURE(ASSERT_LE(2, 0), - "Expected: (2) <= (0), actual: 2 vs 0"); -} - -// Tests ASSERT_LT. -TEST(AssertionTest, ASSERT_LT) { - ASSERT_LT(2, 3); - EXPECT_FATAL_FAILURE(ASSERT_LT(2, 2), - "Expected: (2) < (2), actual: 2 vs 2"); -} - -// Tests ASSERT_GE. -TEST(AssertionTest, ASSERT_GE) { - ASSERT_GE(2, 1); - ASSERT_GE(2, 2); - EXPECT_FATAL_FAILURE(ASSERT_GE(2, 3), - "Expected: (2) >= (3), actual: 2 vs 3"); -} - -// Tests ASSERT_GT. -TEST(AssertionTest, ASSERT_GT) { - ASSERT_GT(2, 1); - EXPECT_FATAL_FAILURE(ASSERT_GT(2, 2), - "Expected: (2) > (2), actual: 2 vs 2"); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowNothing() {} - -// Tests ASSERT_THROW. -TEST(AssertionTest, ASSERT_THROW) { - ASSERT_THROW(ThrowAnInteger(), int); -#if !defined(__BORLANDC__) || __BORLANDC__ >= 0x600 || defined(_DEBUG) - // ICE's in C++Builder 2007 (Release build). - EXPECT_FATAL_FAILURE( - ASSERT_THROW(ThrowAnInteger(), bool), - "Expected: ThrowAnInteger() throws an exception of type bool.\n" - " Actual: it throws a different type."); -#endif - EXPECT_FATAL_FAILURE( - ASSERT_THROW(ThrowNothing(), bool), - "Expected: ThrowNothing() throws an exception of type bool.\n" - " Actual: it throws nothing."); -} - -// Tests ASSERT_NO_THROW. -TEST(AssertionTest, ASSERT_NO_THROW) { - ASSERT_NO_THROW(ThrowNothing()); - EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()), - "Expected: ThrowAnInteger() doesn't throw an exception." - "\n Actual: it throws."); -} - -// Tests ASSERT_ANY_THROW. -TEST(AssertionTest, ASSERT_ANY_THROW) { - ASSERT_ANY_THROW(ThrowAnInteger()); - EXPECT_FATAL_FAILURE( - ASSERT_ANY_THROW(ThrowNothing()), - "Expected: ThrowNothing() throws an exception.\n" - " Actual: it doesn't."); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Makes sure we deal with the precedence of <<. This test should -// compile. -TEST(AssertionTest, AssertPrecedence) { - ASSERT_EQ(1 < 2, true); - ASSERT_EQ(true && false, false); -} - -// A subroutine used by the following test. -void TestEq1(int x) { - ASSERT_EQ(1, x); -} - -// Tests calling a test subroutine that's not part of a fixture. -TEST(AssertionTest, NonFixtureSubroutine) { - EXPECT_FATAL_FAILURE(TestEq1(2), - "Value of: x"); -} - -// An uncopyable class. -class Uncopyable { - public: - explicit Uncopyable(int value) : value_(value) {} - - int value() const { return value_; } - bool operator==(const Uncopyable& rhs) const { - return value() == rhs.value(); - } - private: - // This constructor deliberately has no implementation, as we don't - // want this class to be copyable. - Uncopyable(const Uncopyable&); // NOLINT - - int value_; -}; - -::std::ostream& operator<<(::std::ostream& os, const Uncopyable& value) { - return os << value.value(); -} - - -bool IsPositiveUncopyable(const Uncopyable& x) { - return x.value() > 0; -} - -// A subroutine used by the following test. -void TestAssertNonPositive() { - Uncopyable y(-1); - ASSERT_PRED1(IsPositiveUncopyable, y); -} -// A subroutine used by the following test. -void TestAssertEqualsUncopyable() { - Uncopyable x(5); - Uncopyable y(-1); - ASSERT_EQ(x, y); -} - -// Tests that uncopyable objects can be used in assertions. -TEST(AssertionTest, AssertWorksWithUncopyableObject) { - Uncopyable x(5); - ASSERT_PRED1(IsPositiveUncopyable, x); - ASSERT_EQ(x, x); - EXPECT_FATAL_FAILURE(TestAssertNonPositive(), - "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1"); - EXPECT_FATAL_FAILURE(TestAssertEqualsUncopyable(), - "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5"); -} - -// Tests that uncopyable objects can be used in expects. -TEST(AssertionTest, ExpectWorksWithUncopyableObject) { - Uncopyable x(5); - EXPECT_PRED1(IsPositiveUncopyable, x); - Uncopyable y(-1); - EXPECT_NONFATAL_FAILURE(EXPECT_PRED1(IsPositiveUncopyable, y), - "IsPositiveUncopyable(y) evaluates to false, where\ny evaluates to -1"); - EXPECT_EQ(x, x); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(x, y), - "Value of: y\n Actual: -1\nExpected: x\nWhich is: 5"); -} - - -// The version of gcc used in XCode 2.2 has a bug and doesn't allow -// anonymous enums in assertions. Therefore the following test is not -// done on Mac. -#if !GTEST_OS_MAC - -// Tests using assertions with anonymous enums. -enum { - CASE_A = -1, -#if GTEST_OS_LINUX - // We want to test the case where the size of the anonymous enum is - // larger than sizeof(int), to make sure our implementation of the - // assertions doesn't truncate the enums. However, MSVC - // (incorrectly) doesn't allow an enum value to exceed the range of - // an int, so this has to be conditionally compiled. - // - // On Linux, CASE_B and CASE_A have the same value when truncated to - // int size. We want to test whether this will confuse the - // assertions. - CASE_B = testing::internal::kMaxBiggestInt, -#else - CASE_B = INT_MAX, -#endif // GTEST_OS_LINUX -}; - -TEST(AssertionTest, AnonymousEnum) { -#if GTEST_OS_LINUX - EXPECT_EQ(static_cast(CASE_A), static_cast(CASE_B)); -#endif // GTEST_OS_LINUX - - EXPECT_EQ(CASE_A, CASE_A); - EXPECT_NE(CASE_A, CASE_B); - EXPECT_LT(CASE_A, CASE_B); - EXPECT_LE(CASE_A, CASE_B); - EXPECT_GT(CASE_B, CASE_A); - EXPECT_GE(CASE_A, CASE_A); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(CASE_A, CASE_B), - "(CASE_A) >= (CASE_B)"); - - ASSERT_EQ(CASE_A, CASE_A); - ASSERT_NE(CASE_A, CASE_B); - ASSERT_LT(CASE_A, CASE_B); - ASSERT_LE(CASE_A, CASE_B); - ASSERT_GT(CASE_B, CASE_A); - ASSERT_GE(CASE_A, CASE_A); - EXPECT_FATAL_FAILURE(ASSERT_EQ(CASE_A, CASE_B), - "Value of: CASE_B"); -} - -#endif // !GTEST_OS_MAC - -#if GTEST_OS_WINDOWS - -static HRESULT UnexpectedHRESULTFailure() { - return E_UNEXPECTED; -} - -static HRESULT OkHRESULTSuccess() { - return S_OK; -} - -static HRESULT FalseHRESULTSuccess() { - return S_FALSE; -} - -// HRESULT assertion tests test both zero and non-zero -// success codes as well as failure message for each. -// -// Windows CE doesn't support message texts. -TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) { - EXPECT_HRESULT_SUCCEEDED(S_OK); - EXPECT_HRESULT_SUCCEEDED(S_FALSE); - - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"); -} - -TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) { - ASSERT_HRESULT_SUCCEEDED(S_OK); - ASSERT_HRESULT_SUCCEEDED(S_FALSE); - - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"); -} - -TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) { - EXPECT_HRESULT_FAILED(E_UNEXPECTED); - - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(OkHRESULTSuccess()), - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"); - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()), - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"); -} - -TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) { - ASSERT_HRESULT_FAILED(E_UNEXPECTED); - -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007 and 2009. - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(OkHRESULTSuccess()), - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"); -#endif - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()), - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"); -} - -// Tests that streaming to the HRESULT macros works. -TEST(HRESULTAssertionTest, Streaming) { - EXPECT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure"; - ASSERT_HRESULT_SUCCEEDED(S_OK) << "unexpected failure"; - EXPECT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure"; - ASSERT_HRESULT_FAILED(E_UNEXPECTED) << "unexpected failure"; - - EXPECT_NONFATAL_FAILURE( - EXPECT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure", - "expected failure"); - -#ifndef __BORLANDC__ - // ICE's in C++Builder 2007 and 2009. - EXPECT_FATAL_FAILURE( - ASSERT_HRESULT_SUCCEEDED(E_UNEXPECTED) << "expected failure", - "expected failure"); -#endif - - EXPECT_NONFATAL_FAILURE( - EXPECT_HRESULT_FAILED(S_OK) << "expected failure", - "expected failure"); - - EXPECT_FATAL_FAILURE( - ASSERT_HRESULT_FAILED(S_OK) << "expected failure", - "expected failure"); -} - -#endif // GTEST_OS_WINDOWS - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -// Tests that the assertion macros behave like single statements. -TEST(AssertionSyntaxTest, BasicAssertionsBehavesLikeSingleStatement) { - if (AlwaysFalse()) - ASSERT_TRUE(false) << "This should never be executed; " - "It's a compilation test only."; - - if (AlwaysTrue()) - EXPECT_FALSE(false); - else - ; // NOLINT - - if (AlwaysFalse()) - ASSERT_LT(1, 3); - - if (AlwaysFalse()) - ; // NOLINT - else - EXPECT_GT(3, 2) << ""; -} - -#if GTEST_HAS_EXCEPTIONS -// Tests that the compiler will not complain about unreachable code in the -// EXPECT_THROW/EXPECT_ANY_THROW/EXPECT_NO_THROW macros. -TEST(ExpectThrowTest, DoesNotGenerateUnreachableCodeWarning) { - int n = 0; - - EXPECT_THROW(throw 1, int); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(n++, int), ""); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(throw 1, const char*), ""); - EXPECT_NO_THROW(n++); - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(throw 1), ""); - EXPECT_ANY_THROW(throw 1); - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(n++), ""); -} - -TEST(AssertionSyntaxTest, ExceptionAssertionsBehavesLikeSingleStatement) { - if (AlwaysFalse()) - EXPECT_THROW(ThrowNothing(), bool); - - if (AlwaysTrue()) - EXPECT_THROW(ThrowAnInteger(), int); - else - ; // NOLINT - - if (AlwaysFalse()) - EXPECT_NO_THROW(ThrowAnInteger()); - - if (AlwaysTrue()) - EXPECT_NO_THROW(ThrowNothing()); - else - ; // NOLINT - - if (AlwaysFalse()) - EXPECT_ANY_THROW(ThrowNothing()); - - if (AlwaysTrue()) - EXPECT_ANY_THROW(ThrowAnInteger()); - else - ; // NOLINT -} -#endif // GTEST_HAS_EXCEPTIONS - -TEST(AssertionSyntaxTest, NoFatalFailureAssertionsBehavesLikeSingleStatement) { - if (AlwaysFalse()) - EXPECT_NO_FATAL_FAILURE(FAIL()) << "This should never be executed. " - << "It's a compilation test only."; - else - ; // NOLINT - - if (AlwaysFalse()) - ASSERT_NO_FATAL_FAILURE(FAIL()) << ""; - else - ; // NOLINT - - if (AlwaysTrue()) - EXPECT_NO_FATAL_FAILURE(SUCCEED()); - else - ; // NOLINT - - if (AlwaysFalse()) - ; // NOLINT - else - ASSERT_NO_FATAL_FAILURE(SUCCEED()); -} - -// Tests that the assertion macros work well with switch statements. -TEST(AssertionSyntaxTest, WorksWithSwitch) { - switch (0) { - case 1: - break; - default: - ASSERT_TRUE(true); - } - - switch (0) - case 0: - EXPECT_FALSE(false) << "EXPECT_FALSE failed in switch case"; - - // Binary assertions are implemented using a different code path - // than the Boolean assertions. Hence we test them separately. - switch (0) { - case 1: - default: - ASSERT_EQ(1, 1) << "ASSERT_EQ failed in default switch handler"; - } - - switch (0) - case 0: - EXPECT_NE(1, 2); -} - -#if GTEST_HAS_EXCEPTIONS - -void ThrowAString() { - throw "String"; -} - -// Test that the exception assertion macros compile and work with const -// type qualifier. -TEST(AssertionSyntaxTest, WorksWithConst) { - ASSERT_THROW(ThrowAString(), const char*); - - EXPECT_THROW(ThrowAString(), const char*); -} - -#endif // GTEST_HAS_EXCEPTIONS - -} // namespace - -namespace testing { - -// Tests that Google Test tracks SUCCEED*. -TEST(SuccessfulAssertionTest, SUCCEED) { - SUCCEED(); - SUCCEED() << "OK"; - EXPECT_EQ(2, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -// Tests that Google Test doesn't track successful EXPECT_*. -TEST(SuccessfulAssertionTest, EXPECT) { - EXPECT_TRUE(true); - EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -// Tests that Google Test doesn't track successful EXPECT_STR*. -TEST(SuccessfulAssertionTest, EXPECT_STR) { - EXPECT_STREQ("", ""); - EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -// Tests that Google Test doesn't track successful ASSERT_*. -TEST(SuccessfulAssertionTest, ASSERT) { - ASSERT_TRUE(true); - EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -// Tests that Google Test doesn't track successful ASSERT_STR*. -TEST(SuccessfulAssertionTest, ASSERT_STR) { - ASSERT_STREQ("", ""); - EXPECT_EQ(0, GetUnitTestImpl()->current_test_result()->total_part_count()); -} - -} // namespace testing - -namespace { - -// Tests EXPECT_TRUE. -TEST(ExpectTest, EXPECT_TRUE) { - EXPECT_TRUE(2 > 1); // NOLINT - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 < 1), - "Value of: 2 < 1\n" - " Actual: false\n" - "Expected: true"); - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(2 > 3), - "2 > 3"); -} - -// Tests EXPECT_FALSE. -TEST(ExpectTest, EXPECT_FALSE) { - EXPECT_FALSE(2 < 1); // NOLINT - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 > 1), - "Value of: 2 > 1\n" - " Actual: true\n" - "Expected: false"); - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(2 < 3), - "2 < 3"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -// Tests EXPECT_EQ. -TEST(ExpectTest, EXPECT_EQ) { - EXPECT_EQ(5, 2 + 3); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2*3), - "Value of: 2*3\n" - " Actual: 6\n" - "Expected: 5"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5, 2 - 3), - "2 - 3"); -} - -// Tests using EXPECT_EQ on double values. The purpose is to make -// sure that the specialization we did for integer and anonymous enums -// isn't used for double arguments. -TEST(ExpectTest, EXPECT_EQ_Double) { - // A success. - EXPECT_EQ(5.6, 5.6); - - // A failure. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(5.1, 5.2), - "5.1"); -} - -#if !GTEST_OS_SYMBIAN -// Tests EXPECT_EQ(NULL, pointer). -TEST(ExpectTest, EXPECT_EQ_NULL) { - // A success. - const char* p = NULL; - // Some older GCC versions may issue a spurious waring in this or the next - // assertion statement. This warning should not be suppressed with - // static_cast since the test verifies the ability to use bare NULL as the - // expected parameter to the macro. - EXPECT_EQ(NULL, p); - - // A failure. - int n = 0; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(NULL, &n), - "Value of: &n\n"); -} -#endif // !GTEST_OS_SYMBIAN - -// Tests EXPECT_EQ(0, non_pointer). Since the literal 0 can be -// treated as a null pointer by the compiler, we need to make sure -// that EXPECT_EQ(0, non_pointer) isn't interpreted by Google Test as -// EXPECT_EQ(static_cast(NULL), non_pointer). -TEST(ExpectTest, EXPECT_EQ_0) { - int n = 0; - - // A success. - EXPECT_EQ(0, n); - - // A failure. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(0, 5.6), - "Expected: 0"); -} - -// Tests EXPECT_NE. -TEST(ExpectTest, EXPECT_NE) { - EXPECT_NE(6, 7); - - EXPECT_NONFATAL_FAILURE(EXPECT_NE('a', 'a'), - "Expected: ('a') != ('a'), " - "actual: 'a' (97, 0x61) vs 'a' (97, 0x61)"); - EXPECT_NONFATAL_FAILURE(EXPECT_NE(2, 2), - "2"); - char* const p0 = NULL; - EXPECT_NONFATAL_FAILURE(EXPECT_NE(p0, p0), - "p0"); - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - char* const p1 = reinterpret_cast(pv1); - EXPECT_NONFATAL_FAILURE(EXPECT_NE(p1, p1), - "p1"); -} - -// Tests EXPECT_LE. -TEST(ExpectTest, EXPECT_LE) { - EXPECT_LE(2, 3); - EXPECT_LE(2, 2); - EXPECT_NONFATAL_FAILURE(EXPECT_LE(2, 0), - "Expected: (2) <= (0), actual: 2 vs 0"); - EXPECT_NONFATAL_FAILURE(EXPECT_LE(1.1, 0.9), - "(1.1) <= (0.9)"); -} - -// Tests EXPECT_LT. -TEST(ExpectTest, EXPECT_LT) { - EXPECT_LT(2, 3); - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 2), - "Expected: (2) < (2), actual: 2 vs 2"); - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1), - "(2) < (1)"); -} - -// Tests EXPECT_GE. -TEST(ExpectTest, EXPECT_GE) { - EXPECT_GE(2, 1); - EXPECT_GE(2, 2); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(2, 3), - "Expected: (2) >= (3), actual: 2 vs 3"); - EXPECT_NONFATAL_FAILURE(EXPECT_GE(0.9, 1.1), - "(0.9) >= (1.1)"); -} - -// Tests EXPECT_GT. -TEST(ExpectTest, EXPECT_GT) { - EXPECT_GT(2, 1); - EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 2), - "Expected: (2) > (2), actual: 2 vs 2"); - EXPECT_NONFATAL_FAILURE(EXPECT_GT(2, 3), - "(2) > (3)"); -} - -#if GTEST_HAS_EXCEPTIONS - -// Tests EXPECT_THROW. -TEST(ExpectTest, EXPECT_THROW) { - EXPECT_THROW(ThrowAnInteger(), int); - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool), - "Expected: ThrowAnInteger() throws an exception of " - "type bool.\n Actual: it throws a different type."); - EXPECT_NONFATAL_FAILURE( - EXPECT_THROW(ThrowNothing(), bool), - "Expected: ThrowNothing() throws an exception of type bool.\n" - " Actual: it throws nothing."); -} - -// Tests EXPECT_NO_THROW. -TEST(ExpectTest, EXPECT_NO_THROW) { - EXPECT_NO_THROW(ThrowNothing()); - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()), - "Expected: ThrowAnInteger() doesn't throw an " - "exception.\n Actual: it throws."); -} - -// Tests EXPECT_ANY_THROW. -TEST(ExpectTest, EXPECT_ANY_THROW) { - EXPECT_ANY_THROW(ThrowAnInteger()); - EXPECT_NONFATAL_FAILURE( - EXPECT_ANY_THROW(ThrowNothing()), - "Expected: ThrowNothing() throws an exception.\n" - " Actual: it doesn't."); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Make sure we deal with the precedence of <<. -TEST(ExpectTest, ExpectPrecedence) { - EXPECT_EQ(1 < 2, true); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(true, true && false), - "Value of: true && false"); -} - - -// Tests the StreamableToString() function. - -// Tests using StreamableToString() on a scalar. -TEST(StreamableToStringTest, Scalar) { - EXPECT_STREQ("5", StreamableToString(5).c_str()); -} - -// Tests using StreamableToString() on a non-char pointer. -TEST(StreamableToStringTest, Pointer) { - int n = 0; - int* p = &n; - EXPECT_STRNE("(null)", StreamableToString(p).c_str()); -} - -// Tests using StreamableToString() on a NULL non-char pointer. -TEST(StreamableToStringTest, NullPointer) { - int* p = NULL; - EXPECT_STREQ("(null)", StreamableToString(p).c_str()); -} - -// Tests using StreamableToString() on a C string. -TEST(StreamableToStringTest, CString) { - EXPECT_STREQ("Foo", StreamableToString("Foo").c_str()); -} - -// Tests using StreamableToString() on a NULL C string. -TEST(StreamableToStringTest, NullCString) { - char* p = NULL; - EXPECT_STREQ("(null)", StreamableToString(p).c_str()); -} - -// Tests using streamable values as assertion messages. - -#if GTEST_HAS_STD_STRING -// Tests using std::string as an assertion message. -TEST(StreamableTest, string) { - static const std::string str( - "This failure message is a std::string, and is expected."); - EXPECT_FATAL_FAILURE(FAIL() << str, - str.c_str()); -} - -// Tests that we can output strings containing embedded NULs. -// Limited to Linux because we can only do this with std::string's. -TEST(StreamableTest, stringWithEmbeddedNUL) { - static const char char_array_with_nul[] = - "Here's a NUL\0 and some more string"; - static const std::string string_with_nul(char_array_with_nul, - sizeof(char_array_with_nul) - - 1); // drops the trailing NUL - EXPECT_FATAL_FAILURE(FAIL() << string_with_nul, - "Here's a NUL\\0 and some more string"); -} - -#endif // GTEST_HAS_STD_STRING - -// Tests that we can output a NUL char. -TEST(StreamableTest, NULChar) { - EXPECT_FATAL_FAILURE({ // NOLINT - FAIL() << "A NUL" << '\0' << " and some more string"; - }, "A NUL\\0 and some more string"); -} - -// Tests using int as an assertion message. -TEST(StreamableTest, int) { - EXPECT_FATAL_FAILURE(FAIL() << 900913, - "900913"); -} - -// Tests using NULL char pointer as an assertion message. -// -// In MSVC, streaming a NULL char * causes access violation. Google Test -// implemented a workaround (substituting "(null)" for NULL). This -// tests whether the workaround works. -TEST(StreamableTest, NullCharPtr) { - EXPECT_FATAL_FAILURE(FAIL() << static_cast(NULL), - "(null)"); -} - -// Tests that basic IO manipulators (endl, ends, and flush) can be -// streamed to testing::Message. -TEST(StreamableTest, BasicIoManip) { - EXPECT_FATAL_FAILURE({ // NOLINT - FAIL() << "Line 1." << std::endl - << "A NUL char " << std::ends << std::flush << " in line 2."; - }, "Line 1.\nA NUL char \\0 in line 2."); -} - -// Tests the macros that haven't been covered so far. - -void AddFailureHelper(bool* aborted) { - *aborted = true; - ADD_FAILURE() << "Failure"; - *aborted = false; -} - -// Tests ADD_FAILURE. -TEST(MacroTest, ADD_FAILURE) { - bool aborted = true; - EXPECT_NONFATAL_FAILURE(AddFailureHelper(&aborted), - "Failure"); - EXPECT_FALSE(aborted); -} - -// Tests FAIL. -TEST(MacroTest, FAIL) { - EXPECT_FATAL_FAILURE(FAIL(), - "Failed"); - EXPECT_FATAL_FAILURE(FAIL() << "Intentional failure.", - "Intentional failure."); -} - -// Tests SUCCEED -TEST(MacroTest, SUCCEED) { - SUCCEED(); - SUCCEED() << "Explicit success."; -} - - -// Tests for EXPECT_EQ() and ASSERT_EQ(). -// -// These tests fail *intentionally*, s.t. the failure messages can be -// generated and tested. -// -// We have different tests for different argument types. - -// Tests using bool values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Bool) { - EXPECT_EQ(true, true); - EXPECT_FATAL_FAILURE(ASSERT_EQ(false, true), - "Value of: true"); -} - -// Tests using int values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Int) { - ASSERT_EQ(32, 32); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(32, 33), - "33"); -} - -// Tests using time_t values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Time_T) { - EXPECT_EQ(static_cast(0), - static_cast(0)); - EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast(0), - static_cast(1234)), - "1234"); -} - -// Tests using char values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, Char) { - ASSERT_EQ('z', 'z'); - const char ch = 'b'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ('\0', ch), - "ch"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ('a', ch), - "ch"); -} - -// Tests using wchar_t values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, WideChar) { - EXPECT_EQ(L'b', L'b'); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'\0', L'x'), - "Value of: L'x'\n" - " Actual: L'x' (120, 0x78)\n" - "Expected: L'\0'\n" - "Which is: L'\0' (0, 0x0)"); - - static wchar_t wchar; - wchar = L'b'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(L'a', wchar), - "wchar"); - wchar = L'\x8119'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(L'\x8120', wchar), - "Value of: wchar"); -} - -#if GTEST_HAS_STD_STRING -// Tests using ::std::string values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, StdString) { - // Compares a const char* to an std::string that has identical - // content. - ASSERT_EQ("Test", ::std::string("Test")); - - // Compares two identical std::strings. - static const ::std::string str1("A * in the middle"); - static const ::std::string str2(str1); - EXPECT_EQ(str1, str2); - - // Compares a const char* to an std::string that has different - // content - EXPECT_NONFATAL_FAILURE(EXPECT_EQ("Test", ::std::string("test")), - "::std::string(\"test\")"); - - // Compares an std::string to a char* that has different content. - char* const p1 = const_cast("foo"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::std::string("bar"), p1), - "p1"); - - // Compares two std::strings that have different contents, one of - // which having a NUL character in the middle. This should fail. - static ::std::string str3(str1); - str3.at(2) = '\0'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(str1, str3), - "Value of: str3\n" - " Actual: \"A \\0 in the middle\""); -} - -#endif // GTEST_HAS_STD_STRING - -#if GTEST_HAS_STD_WSTRING - -// Tests using ::std::wstring values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, StdWideString) { - // Compares an std::wstring to a const wchar_t* that has identical - // content. - EXPECT_EQ(::std::wstring(L"Test\x8119"), L"Test\x8119"); - - // Compares two identical std::wstrings. - const ::std::wstring wstr1(L"A * in the middle"); - const ::std::wstring wstr2(wstr1); - ASSERT_EQ(wstr1, wstr2); - - // Compares an std::wstring to a const wchar_t* that has different - // content. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EQ(::std::wstring(L"Test\x8119"), L"Test\x8120"); - }, "L\"Test\\x8120\""); - - // Compares two std::wstrings that have different contents, one of - // which having a NUL character in the middle. - ::std::wstring wstr3(wstr1); - wstr3.at(2) = L'\0'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(wstr1, wstr3), - "wstr3"); - - // Compares a wchar_t* to an std::wstring that has different - // content. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EQ(const_cast(L"foo"), ::std::wstring(L"bar")); - }, ""); -} - -#endif // GTEST_HAS_STD_WSTRING - -#if GTEST_HAS_GLOBAL_STRING -// Tests using ::string values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, GlobalString) { - // Compares a const char* to a ::string that has identical content. - EXPECT_EQ("Test", ::string("Test")); - - // Compares two identical ::strings. - const ::string str1("A * in the middle"); - const ::string str2(str1); - ASSERT_EQ(str1, str2); - - // Compares a ::string to a const char* that has different content. - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(::string("Test"), "test"), - "test"); - - // Compares two ::strings that have different contents, one of which - // having a NUL character in the middle. - ::string str3(str1); - str3.at(2) = '\0'; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(str1, str3), - "str3"); - - // Compares a ::string to a char* that has different content. - EXPECT_FATAL_FAILURE({ // NOLINT - ASSERT_EQ(::string("bar"), const_cast("foo")); - }, ""); -} - -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_GLOBAL_WSTRING - -// Tests using ::wstring values in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, GlobalWideString) { - // Compares a const wchar_t* to a ::wstring that has identical content. - ASSERT_EQ(L"Test\x8119", ::wstring(L"Test\x8119")); - - // Compares two identical ::wstrings. - static const ::wstring wstr1(L"A * in the middle"); - static const ::wstring wstr2(wstr1); - EXPECT_EQ(wstr1, wstr2); - - // Compares a const wchar_t* to a ::wstring that has different - // content. - EXPECT_NONFATAL_FAILURE({ // NOLINT - EXPECT_EQ(L"Test\x8120", ::wstring(L"Test\x8119")); - }, "Test\\x8119"); - - // Compares a wchar_t* to a ::wstring that has different content. - wchar_t* const p1 = const_cast(L"foo"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, ::wstring(L"bar")), - "bar"); - - // Compares two ::wstrings that have different contents, one of which - // having a NUL character in the middle. - static ::wstring wstr3; - wstr3 = wstr1; - wstr3.at(2) = L'\0'; - EXPECT_FATAL_FAILURE(ASSERT_EQ(wstr1, wstr3), - "wstr3"); -} - -#endif // GTEST_HAS_GLOBAL_WSTRING - -// Tests using char pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, CharPointer) { - char* const p0 = NULL; - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - void* pv2 = (void*)0xABC0; // NOLINT - char* const p1 = reinterpret_cast(pv1); - char* const p2 = reinterpret_cast(pv2); - ASSERT_EQ(p1, p1); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2), - "Value of: p2"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2), - "p2"); - EXPECT_FATAL_FAILURE(ASSERT_EQ(reinterpret_cast(0x1234), - reinterpret_cast(0xABC0)), - "ABC0"); -} - -// Tests using wchar_t pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, WideCharPointer) { - wchar_t* const p0 = NULL; - // Only way to get the Nokia compiler to compile the cast - // is to have a separate void* variable first. Putting - // the two casts on the same line doesn't work, neither does - // a direct C-style to char*. - void* pv1 = (void*)0x1234; // NOLINT - void* pv2 = (void*)0xABC0; // NOLINT - wchar_t* const p1 = reinterpret_cast(pv1); - wchar_t* const p2 = reinterpret_cast(pv2); - EXPECT_EQ(p0, p0); - - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p0, p2), - "Value of: p2"); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p1, p2), - "p2"); - void* pv3 = (void*)0x1234; // NOLINT - void* pv4 = (void*)0xABC0; // NOLINT - const wchar_t* p3 = reinterpret_cast(pv3); - const wchar_t* p4 = reinterpret_cast(pv4); - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(p3, p4), - "p4"); -} - -// Tests using other types of pointers in {EXPECT|ASSERT}_EQ. -TEST(EqAssertionTest, OtherPointer) { - ASSERT_EQ(static_cast(NULL), - static_cast(NULL)); - EXPECT_FATAL_FAILURE(ASSERT_EQ(static_cast(NULL), - reinterpret_cast(0x1234)), - "0x1234"); -} - -// Tests the FRIEND_TEST macro. - -// This class has a private member we want to test. We will test it -// both in a TEST and in a TEST_F. -class Foo { - public: - Foo() {} - - private: - int Bar() const { return 1; } - - // Declares the friend tests that can access the private member - // Bar(). - FRIEND_TEST(FRIEND_TEST_Test, TEST); - FRIEND_TEST(FRIEND_TEST_Test2, TEST_F); -}; - -// Tests that the FRIEND_TEST declaration allows a TEST to access a -// class's private members. This should compile. -TEST(FRIEND_TEST_Test, TEST) { - ASSERT_EQ(1, Foo().Bar()); -} - -// The fixture needed to test using FRIEND_TEST with TEST_F. -class FRIEND_TEST_Test2 : public Test { - protected: - Foo foo; -}; - -// Tests that the FRIEND_TEST declaration allows a TEST_F to access a -// class's private members. This should compile. -TEST_F(FRIEND_TEST_Test2, TEST_F) { - ASSERT_EQ(1, foo.Bar()); -} - -// Tests the life cycle of Test objects. - -// The test fixture for testing the life cycle of Test objects. -// -// This class counts the number of live test objects that uses this -// fixture. -class TestLifeCycleTest : public Test { - protected: - // Constructor. Increments the number of test objects that uses - // this fixture. - TestLifeCycleTest() { count_++; } - - // Destructor. Decrements the number of test objects that uses this - // fixture. - ~TestLifeCycleTest() { count_--; } - - // Returns the number of live test objects that uses this fixture. - int count() const { return count_; } - - private: - static int count_; -}; - -int TestLifeCycleTest::count_ = 0; - -// Tests the life cycle of test objects. -TEST_F(TestLifeCycleTest, Test1) { - // There should be only one test object in this test case that's - // currently alive. - ASSERT_EQ(1, count()); -} - -// Tests the life cycle of test objects. -TEST_F(TestLifeCycleTest, Test2) { - // After Test1 is done and Test2 is started, there should still be - // only one live test object, as the object for Test1 should've been - // deleted. - ASSERT_EQ(1, count()); -} - -} // namespace - -// Tests streaming a user type whose definition and operator << are -// both in the global namespace. -class Base { - public: - explicit Base(int x) : x_(x) {} - int x() const { return x_; } - private: - int x_; -}; -std::ostream& operator<<(std::ostream& os, - const Base& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const Base* pointer) { - return os << "(" << pointer->x() << ")"; -} - -TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace) { - Message msg; - Base a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition and operator<< are -// both in an unnamed namespace. -namespace { -class MyTypeInUnnamedNameSpace : public Base { - public: - explicit MyTypeInUnnamedNameSpace(int x): Base(x) {} -}; -std::ostream& operator<<(std::ostream& os, - const MyTypeInUnnamedNameSpace& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const MyTypeInUnnamedNameSpace* pointer) { - return os << "(" << pointer->x() << ")"; -} -} // namespace - -TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace) { - Message msg; - MyTypeInUnnamedNameSpace a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition and operator<< are -// both in a user namespace. -namespace namespace1 { -class MyTypeInNameSpace1 : public Base { - public: - explicit MyTypeInNameSpace1(int x): Base(x) {} -}; -std::ostream& operator<<(std::ostream& os, - const MyTypeInNameSpace1& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const MyTypeInNameSpace1* pointer) { - return os << "(" << pointer->x() << ")"; -} -} // namespace namespace1 - -TEST(MessageTest, CanStreamUserTypeInUserNameSpace) { - Message msg; - namespace1::MyTypeInNameSpace1 a(1); - - msg << a << &a; // Uses namespace1::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming a user type whose definition is in a user namespace -// but whose operator<< is in the global namespace. -namespace namespace2 { -class MyTypeInNameSpace2 : public ::Base { - public: - explicit MyTypeInNameSpace2(int x): Base(x) {} -}; -} // namespace namespace2 -std::ostream& operator<<(std::ostream& os, - const namespace2::MyTypeInNameSpace2& val) { - return os << val.x(); -} -std::ostream& operator<<(std::ostream& os, - const namespace2::MyTypeInNameSpace2* pointer) { - return os << "(" << pointer->x() << ")"; -} - -TEST(MessageTest, CanStreamUserTypeInUserNameSpaceWithStreamOperatorInGlobal) { - Message msg; - namespace2::MyTypeInNameSpace2 a(1); - - msg << a << &a; // Uses ::operator<<. - EXPECT_STREQ("1(1)", msg.GetString().c_str()); -} - -// Tests streaming NULL pointers to testing::Message. -TEST(MessageTest, NullPointers) { - Message msg; - char* const p1 = NULL; - unsigned char* const p2 = NULL; - int* p3 = NULL; - double* p4 = NULL; - bool* p5 = NULL; - Message* p6 = NULL; - - msg << p1 << p2 << p3 << p4 << p5 << p6; - ASSERT_STREQ("(null)(null)(null)(null)(null)(null)", - msg.GetString().c_str()); -} - -// Tests streaming wide strings to testing::Message. -TEST(MessageTest, WideStrings) { - // Streams a NULL of type const wchar_t*. - const wchar_t* const_wstr = NULL; - EXPECT_STREQ("(null)", - (Message() << const_wstr).GetString().c_str()); - - // Streams a NULL of type wchar_t*. - wchar_t* wstr = NULL; - EXPECT_STREQ("(null)", - (Message() << wstr).GetString().c_str()); - - // Streams a non-NULL of type const wchar_t*. - const_wstr = L"abc\x8119"; - EXPECT_STREQ("abc\xe8\x84\x99", - (Message() << const_wstr).GetString().c_str()); - - // Streams a non-NULL of type wchar_t*. - wstr = const_cast(const_wstr); - EXPECT_STREQ("abc\xe8\x84\x99", - (Message() << wstr).GetString().c_str()); -} - - -// This line tests that we can define tests in the testing namespace. -namespace testing { - -// Tests the TestInfo class. - -class TestInfoTest : public Test { - protected: - static const TestInfo* GetTestInfo(const char* test_name) { - const TestCase* const test_case = GetUnitTestImpl()-> - GetTestCase("TestInfoTest", "", NULL, NULL); - - for (int i = 0; i < test_case->total_test_count(); ++i) { - const TestInfo* const test_info = test_case->GetTestInfo(i); - if (strcmp(test_name, test_info->name()) == 0) - return test_info; - } - return NULL; - } - - static const TestResult* GetTestResult( - const TestInfo* test_info) { - return test_info->result(); - } -}; - -// Tests TestInfo::test_case_name() and TestInfo::name(). -TEST_F(TestInfoTest, Names) { - const TestInfo* const test_info = GetTestInfo("Names"); - - ASSERT_STREQ("TestInfoTest", test_info->test_case_name()); - ASSERT_STREQ("Names", test_info->name()); -} - -// Tests TestInfo::result(). -TEST_F(TestInfoTest, result) { - const TestInfo* const test_info = GetTestInfo("result"); - - // Initially, there is no TestPartResult for this test. - ASSERT_EQ(0, GetTestResult(test_info)->total_part_count()); - - // After the previous assertion, there is still none. - ASSERT_EQ(0, GetTestResult(test_info)->total_part_count()); -} - -// Tests setting up and tearing down a test case. - -class SetUpTestCaseTest : public Test { - protected: - // This will be called once before the first test in this test case - // is run. - static void SetUpTestCase() { - printf("Setting up the test case . . .\n"); - - // Initializes some shared resource. In this simple example, we - // just create a C string. More complex stuff can be done if - // desired. - shared_resource_ = "123"; - - // Increments the number of test cases that have been set up. - counter_++; - - // SetUpTestCase() should be called only once. - EXPECT_EQ(1, counter_); - } - - // This will be called once after the last test in this test case is - // run. - static void TearDownTestCase() { - printf("Tearing down the test case . . .\n"); - - // Decrements the number of test cases that have been set up. - counter_--; - - // TearDownTestCase() should be called only once. - EXPECT_EQ(0, counter_); - - // Cleans up the shared resource. - shared_resource_ = NULL; - } - - // This will be called before each test in this test case. - virtual void SetUp() { - // SetUpTestCase() should be called only once, so counter_ should - // always be 1. - EXPECT_EQ(1, counter_); - } - - // Number of test cases that have been set up. - static int counter_; - - // Some resource to be shared by all tests in this test case. - static const char* shared_resource_; -}; - -int SetUpTestCaseTest::counter_ = 0; -const char* SetUpTestCaseTest::shared_resource_ = NULL; - -// A test that uses the shared resource. -TEST_F(SetUpTestCaseTest, Test1) { - EXPECT_STRNE(NULL, shared_resource_); -} - -// Another test that uses the shared resource. -TEST_F(SetUpTestCaseTest, Test2) { - EXPECT_STREQ("123", shared_resource_); -} - -// The InitGoogleTestTest test case tests testing::InitGoogleTest(). - -// The Flags struct stores a copy of all Google Test flags. -struct Flags { - // Constructs a Flags struct where each flag has its default value. - Flags() : also_run_disabled_tests(false), - break_on_failure(false), - catch_exceptions(false), - death_test_use_fork(false), - filter(""), - list_tests(false), - output(""), - print_time(true), - random_seed(0), - repeat(1), - shuffle(false), - throw_on_failure(false) {} - - // Factory methods. - - // Creates a Flags struct where the gtest_also_run_disabled_tests flag has - // the given value. - static Flags AlsoRunDisabledTests(bool also_run_disabled_tests) { - Flags flags; - flags.also_run_disabled_tests = also_run_disabled_tests; - return flags; - } - - // Creates a Flags struct where the gtest_break_on_failure flag has - // the given value. - static Flags BreakOnFailure(bool break_on_failure) { - Flags flags; - flags.break_on_failure = break_on_failure; - return flags; - } - - // Creates a Flags struct where the gtest_catch_exceptions flag has - // the given value. - static Flags CatchExceptions(bool catch_exceptions) { - Flags flags; - flags.catch_exceptions = catch_exceptions; - return flags; - } - - // Creates a Flags struct where the gtest_death_test_use_fork flag has - // the given value. - static Flags DeathTestUseFork(bool death_test_use_fork) { - Flags flags; - flags.death_test_use_fork = death_test_use_fork; - return flags; - } - - // Creates a Flags struct where the gtest_filter flag has the given - // value. - static Flags Filter(const char* filter) { - Flags flags; - flags.filter = filter; - return flags; - } - - // Creates a Flags struct where the gtest_list_tests flag has the - // given value. - static Flags ListTests(bool list_tests) { - Flags flags; - flags.list_tests = list_tests; - return flags; - } - - // Creates a Flags struct where the gtest_output flag has the given - // value. - static Flags Output(const char* output) { - Flags flags; - flags.output = output; - return flags; - } - - // Creates a Flags struct where the gtest_print_time flag has the given - // value. - static Flags PrintTime(bool print_time) { - Flags flags; - flags.print_time = print_time; - return flags; - } - - // Creates a Flags struct where the gtest_random_seed flag has - // the given value. - static Flags RandomSeed(Int32 random_seed) { - Flags flags; - flags.random_seed = random_seed; - return flags; - } - - // Creates a Flags struct where the gtest_repeat flag has the given - // value. - static Flags Repeat(Int32 repeat) { - Flags flags; - flags.repeat = repeat; - return flags; - } - - // Creates a Flags struct where the gtest_shuffle flag has - // the given value. - static Flags Shuffle(bool shuffle) { - Flags flags; - flags.shuffle = shuffle; - return flags; - } - - // Creates a Flags struct where the gtest_throw_on_failure flag has - // the given value. - static Flags ThrowOnFailure(bool throw_on_failure) { - Flags flags; - flags.throw_on_failure = throw_on_failure; - return flags; - } - - // These fields store the flag values. - bool also_run_disabled_tests; - bool break_on_failure; - bool catch_exceptions; - bool death_test_use_fork; - const char* filter; - bool list_tests; - const char* output; - bool print_time; - Int32 random_seed; - Int32 repeat; - bool shuffle; - bool throw_on_failure; -}; - -// Fixture for testing InitGoogleTest(). -class InitGoogleTestTest : public Test { - protected: - // Clears the flags before each test. - virtual void SetUp() { - GTEST_FLAG(also_run_disabled_tests) = false; - GTEST_FLAG(break_on_failure) = false; - GTEST_FLAG(catch_exceptions) = false; - GTEST_FLAG(death_test_use_fork) = false; - GTEST_FLAG(filter) = ""; - GTEST_FLAG(list_tests) = false; - GTEST_FLAG(output) = ""; - GTEST_FLAG(print_time) = true; - GTEST_FLAG(random_seed) = 0; - GTEST_FLAG(repeat) = 1; - GTEST_FLAG(shuffle) = false; - GTEST_FLAG(throw_on_failure) = false; - } - - // Asserts that two narrow or wide string arrays are equal. - template - static void AssertStringArrayEq(size_t size1, CharType** array1, - size_t size2, CharType** array2) { - ASSERT_EQ(size1, size2) << " Array sizes different."; - - for (size_t i = 0; i != size1; i++) { - ASSERT_STREQ(array1[i], array2[i]) << " where i == " << i; - } - } - - // Verifies that the flag values match the expected values. - static void CheckFlags(const Flags& expected) { - EXPECT_EQ(expected.also_run_disabled_tests, - GTEST_FLAG(also_run_disabled_tests)); - EXPECT_EQ(expected.break_on_failure, GTEST_FLAG(break_on_failure)); - EXPECT_EQ(expected.catch_exceptions, GTEST_FLAG(catch_exceptions)); - EXPECT_EQ(expected.death_test_use_fork, GTEST_FLAG(death_test_use_fork)); - EXPECT_STREQ(expected.filter, GTEST_FLAG(filter).c_str()); - EXPECT_EQ(expected.list_tests, GTEST_FLAG(list_tests)); - EXPECT_STREQ(expected.output, GTEST_FLAG(output).c_str()); - EXPECT_EQ(expected.print_time, GTEST_FLAG(print_time)); - EXPECT_EQ(expected.random_seed, GTEST_FLAG(random_seed)); - EXPECT_EQ(expected.repeat, GTEST_FLAG(repeat)); - EXPECT_EQ(expected.shuffle, GTEST_FLAG(shuffle)); - EXPECT_EQ(expected.throw_on_failure, GTEST_FLAG(throw_on_failure)); - } - - // Parses a command line (specified by argc1 and argv1), then - // verifies that the flag values are expected and that the - // recognized flags are removed from the command line. - template - static void TestParsingFlags(int argc1, const CharType** argv1, - int argc2, const CharType** argv2, - const Flags& expected) { - // Parses the command line. - internal::ParseGoogleTestFlagsOnly(&argc1, const_cast(argv1)); - - // Verifies the flag values. - CheckFlags(expected); - - // Verifies that the recognized flags are removed from the command - // line. - AssertStringArrayEq(argc1 + 1, argv1, argc2 + 1, argv2); - } - - // This macro wraps TestParsingFlags s.t. the user doesn't need - // to specify the array sizes. -#define GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected) \ - TestParsingFlags(sizeof(argv1)/sizeof(*argv1) - 1, argv1, \ - sizeof(argv2)/sizeof(*argv2) - 1, argv2, expected) -}; - -// Tests parsing an empty command line. -TEST_F(InitGoogleTestTest, Empty) { - const char* argv[] = { - NULL - }; - - const char* argv2[] = { - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing a command line that has no flag. -TEST_F(InitGoogleTestTest, NoFlag) { - const char* argv[] = { - "foo.exe", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing a bad --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterBad) { - const char* argv[] = { - "foo.exe", - "--gtest_filter", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "--gtest_filter", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("")); -} - -// Tests parsing an empty --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("")); -} - -// Tests parsing a non-empty --gtest_filter flag. -TEST_F(InitGoogleTestTest, FilterNonEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=abc", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("abc")); -} - -// Tests parsing --gtest_break_on_failure. -TEST_F(InitGoogleTestTest, BreakOnFailureWithoutValue) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure", - NULL -}; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true)); -} - -// Tests parsing --gtest_break_on_failure=0. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_0) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing --gtest_break_on_failure=f. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing --gtest_break_on_failure=F. -TEST_F(InitGoogleTestTest, BreakOnFailureFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(false)); -} - -// Tests parsing a --gtest_break_on_failure flag that has a "true" -// definition. -TEST_F(InitGoogleTestTest, BreakOnFailureTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::BreakOnFailure(true)); -} - -// Tests parsing --gtest_catch_exceptions. -TEST_F(InitGoogleTestTest, CatchExceptions) { - const char* argv[] = { - "foo.exe", - "--gtest_catch_exceptions", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::CatchExceptions(true)); -} - -// Tests parsing --gtest_death_test_use_fork. -TEST_F(InitGoogleTestTest, DeathTestUseFork) { - const char* argv[] = { - "foo.exe", - "--gtest_death_test_use_fork", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::DeathTestUseFork(true)); -} - -// Tests having the same flag twice with different values. The -// expected behavior is that the one coming last takes precedence. -TEST_F(InitGoogleTestTest, DuplicatedFlags) { - const char* argv[] = { - "foo.exe", - "--gtest_filter=a", - "--gtest_filter=b", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Filter("b")); -} - -// Tests having an unrecognized flag on the command line. -TEST_F(InitGoogleTestTest, UnrecognizedFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_break_on_failure", - "bar", // Unrecognized by Google Test. - "--gtest_filter=b", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "bar", - NULL - }; - - Flags flags; - flags.break_on_failure = true; - flags.filter = "b"; - GTEST_TEST_PARSING_FLAGS_(argv, argv2, flags); -} - -// Tests having a --gtest_list_tests flag -TEST_F(InitGoogleTestTest, ListTestsFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true)); -} - -// Tests having a --gtest_list_tests flag with a "true" value -TEST_F(InitGoogleTestTest, ListTestsTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(true)); -} - -// Tests having a --gtest_list_tests flag with a "false" value -TEST_F(InitGoogleTestTest, ListTestsFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_list_tests=f. -TEST_F(InitGoogleTestTest, ListTestsFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_list_tests=F. -TEST_F(InitGoogleTestTest, ListTestsFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_list_tests=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ListTests(false)); -} - -// Tests parsing --gtest_output (invalid). -TEST_F(InitGoogleTestTest, OutputEmpty) { - const char* argv[] = { - "foo.exe", - "--gtest_output", - NULL - }; - - const char* argv2[] = { - "foo.exe", - "--gtest_output", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags()); -} - -// Tests parsing --gtest_output=xml -TEST_F(InitGoogleTestTest, OutputXml) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml")); -} - -// Tests parsing --gtest_output=xml:file -TEST_F(InitGoogleTestTest, OutputXmlFile) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml:file", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:file")); -} - -// Tests parsing --gtest_output=xml:directory/path/ -TEST_F(InitGoogleTestTest, OutputXmlDirectory) { - const char* argv[] = { - "foo.exe", - "--gtest_output=xml:directory/path/", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Output("xml:directory/path/")); -} - -// Tests having a --gtest_print_time flag -TEST_F(InitGoogleTestTest, PrintTimeFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true)); -} - -// Tests having a --gtest_print_time flag with a "true" value -TEST_F(InitGoogleTestTest, PrintTimeTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(true)); -} - -// Tests having a --gtest_print_time flag with a "false" value -TEST_F(InitGoogleTestTest, PrintTimeFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_print_time=f. -TEST_F(InitGoogleTestTest, PrintTimeFalse_f) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=f", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_print_time=F. -TEST_F(InitGoogleTestTest, PrintTimeFalse_F) { - const char* argv[] = { - "foo.exe", - "--gtest_print_time=F", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::PrintTime(false)); -} - -// Tests parsing --gtest_random_seed=number -TEST_F(InitGoogleTestTest, RandomSeed) { - const char* argv[] = { - "foo.exe", - "--gtest_random_seed=1000", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::RandomSeed(1000)); -} - -// Tests parsing --gtest_repeat=number -TEST_F(InitGoogleTestTest, Repeat) { - const char* argv[] = { - "foo.exe", - "--gtest_repeat=1000", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Repeat(1000)); -} - -// Tests having a --gtest_also_run_disabled_tests flag -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFlag) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true)); -} - -// Tests having a --gtest_also_run_disabled_tests flag with a "true" value -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(true)); -} - -// Tests having a --gtest_also_run_disabled_tests flag with a "false" value -TEST_F(InitGoogleTestTest, AlsoRunDisabledTestsFalse) { - const char* argv[] = { - "foo.exe", - "--gtest_also_run_disabled_tests=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::AlsoRunDisabledTests(false)); -} - -// Tests parsing --gtest_shuffle. -TEST_F(InitGoogleTestTest, ShuffleWithoutValue) { - const char* argv[] = { - "foo.exe", - "--gtest_shuffle", - NULL -}; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true)); -} - -// Tests parsing --gtest_shuffle=0. -TEST_F(InitGoogleTestTest, ShuffleFalse_0) { - const char* argv[] = { - "foo.exe", - "--gtest_shuffle=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(false)); -} - -// Tests parsing a --gtest_shuffle flag that has a "true" -// definition. -TEST_F(InitGoogleTestTest, ShuffleTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_shuffle=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::Shuffle(true)); -} - -// Tests parsing --gtest_throw_on_failure. -TEST_F(InitGoogleTestTest, ThrowOnFailureWithoutValue) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure", - NULL -}; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true)); -} - -// Tests parsing --gtest_throw_on_failure=0. -TEST_F(InitGoogleTestTest, ThrowOnFailureFalse_0) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure=0", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(false)); -} - -// Tests parsing a --gtest_throw_on_failure flag that has a "true" -// definition. -TEST_F(InitGoogleTestTest, ThrowOnFailureTrue) { - const char* argv[] = { - "foo.exe", - "--gtest_throw_on_failure=1", - NULL - }; - - const char* argv2[] = { - "foo.exe", - NULL - }; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, Flags::ThrowOnFailure(true)); -} - -#if GTEST_OS_WINDOWS -// Tests parsing wide strings. -TEST_F(InitGoogleTestTest, WideStrings) { - const wchar_t* argv[] = { - L"foo.exe", - L"--gtest_filter=Foo*", - L"--gtest_list_tests=1", - L"--gtest_break_on_failure", - L"--non_gtest_flag", - NULL - }; - - const wchar_t* argv2[] = { - L"foo.exe", - L"--non_gtest_flag", - NULL - }; - - Flags expected_flags; - expected_flags.break_on_failure = true; - expected_flags.filter = "Foo*"; - expected_flags.list_tests = true; - - GTEST_TEST_PARSING_FLAGS_(argv, argv2, expected_flags); -} -#endif // GTEST_OS_WINDOWS - -// Tests current_test_info() in UnitTest. -class CurrentTestInfoTest : public Test { - protected: - // Tests that current_test_info() returns NULL before the first test in - // the test case is run. - static void SetUpTestCase() { - // There should be no tests running at this point. - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - EXPECT_TRUE(test_info == NULL) - << "There should be no tests running at this point."; - } - - // Tests that current_test_info() returns NULL after the last test in - // the test case has run. - static void TearDownTestCase() { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - EXPECT_TRUE(test_info == NULL) - << "There should be no tests running at this point."; - } -}; - -// Tests that current_test_info() returns TestInfo for currently running -// test by checking the expected test name against the actual one. -TEST_F(CurrentTestInfoTest, WorksForFirstTestInATestCase) { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - ASSERT_TRUE(NULL != test_info) - << "There is a test running so we should have a valid TestInfo."; - EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name()) - << "Expected the name of the currently running test case."; - EXPECT_STREQ("WorksForFirstTestInATestCase", test_info->name()) - << "Expected the name of the currently running test."; -} - -// Tests that current_test_info() returns TestInfo for currently running -// test by checking the expected test name against the actual one. We -// use this test to see that the TestInfo object actually changed from -// the previous invocation. -TEST_F(CurrentTestInfoTest, WorksForSecondTestInATestCase) { - const TestInfo* test_info = - UnitTest::GetInstance()->current_test_info(); - ASSERT_TRUE(NULL != test_info) - << "There is a test running so we should have a valid TestInfo."; - EXPECT_STREQ("CurrentTestInfoTest", test_info->test_case_name()) - << "Expected the name of the currently running test case."; - EXPECT_STREQ("WorksForSecondTestInATestCase", test_info->name()) - << "Expected the name of the currently running test."; -} - -} // namespace testing - -// These two lines test that we can define tests in a namespace that -// has the name "testing" and is nested in another namespace. -namespace my_namespace { -namespace testing { - -// Makes sure that TEST knows to use ::testing::Test instead of -// ::my_namespace::testing::Test. -class Test {}; - -// Makes sure that an assertion knows to use ::testing::Message instead of -// ::my_namespace::testing::Message. -class Message {}; - -// Makes sure that an assertion knows to use -// ::testing::AssertionResult instead of -// ::my_namespace::testing::AssertionResult. -class AssertionResult {}; - -// Tests that an assertion that should succeed works as expected. -TEST(NestedTestingNamespaceTest, Success) { - EXPECT_EQ(1, 1) << "This shouldn't fail."; -} - -// Tests that an assertion that should fail works as expected. -TEST(NestedTestingNamespaceTest, Failure) { - EXPECT_FATAL_FAILURE(FAIL() << "This failure is expected.", - "This failure is expected."); -} - -} // namespace testing -} // namespace my_namespace - -// Tests that one can call superclass SetUp and TearDown methods-- -// that is, that they are not private. -// No tests are based on this fixture; the test "passes" if it compiles -// successfully. -class ProtectedFixtureMethodsTest : public Test { - protected: - virtual void SetUp() { - Test::SetUp(); - } - virtual void TearDown() { - Test::TearDown(); - } -}; - -// StreamingAssertionsTest tests the streaming versions of a representative -// sample of assertions. -TEST(StreamingAssertionsTest, Unconditional) { - SUCCEED() << "expected success"; - EXPECT_NONFATAL_FAILURE(ADD_FAILURE() << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(FAIL() << "expected failure", - "expected failure"); -} - -#ifdef __BORLANDC__ -// Silences warnings: "Condition is always true", "Unreachable code" -#pragma option push -w-ccc -w-rch -#endif - -TEST(StreamingAssertionsTest, Truth) { - EXPECT_TRUE(true) << "unexpected failure"; - ASSERT_TRUE(true) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_TRUE(false) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_TRUE(false) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, Truth2) { - EXPECT_FALSE(false) << "unexpected failure"; - ASSERT_FALSE(false) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_FALSE(true) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_FALSE(true) << "expected failure", - "expected failure"); -} - -#ifdef __BORLANDC__ -// Restores warnings after previous "#pragma option push" supressed them -#pragma option pop -#endif - -TEST(StreamingAssertionsTest, IntegerEquals) { - EXPECT_EQ(1, 1) << "unexpected failure"; - ASSERT_EQ(1, 1) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_EQ(1, 2) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_EQ(1, 2) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, IntegerLessThan) { - EXPECT_LT(1, 2) << "unexpected failure"; - ASSERT_LT(1, 2) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_LT(2, 1) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_LT(2, 1) << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsEqual) { - EXPECT_STREQ("foo", "foo") << "unexpected failure"; - ASSERT_STREQ("foo", "foo") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STREQ("foo", "bar") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STREQ("foo", "bar") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsNotEqual) { - EXPECT_STRNE("foo", "bar") << "unexpected failure"; - ASSERT_STRNE("foo", "bar") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRNE("foo", "foo") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRNE("foo", "foo") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringsEqualIgnoringCase) { - EXPECT_STRCASEEQ("foo", "FOO") << "unexpected failure"; - ASSERT_STRCASEEQ("foo", "FOO") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASEEQ("foo", "bar") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRCASEEQ("foo", "bar") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, StringNotEqualIgnoringCase) { - EXPECT_STRCASENE("foo", "bar") << "unexpected failure"; - ASSERT_STRCASENE("foo", "bar") << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_STRCASENE("foo", "FOO") << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_STRCASENE("bar", "BAR") << "expected failure", - "expected failure"); -} - -TEST(StreamingAssertionsTest, FloatingPointEquals) { - EXPECT_FLOAT_EQ(1.0, 1.0) << "unexpected failure"; - ASSERT_FLOAT_EQ(1.0, 1.0) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_FLOAT_EQ(0.0, 1.0) << "expected failure", - "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_FLOAT_EQ(0.0, 1.0) << "expected failure", - "expected failure"); -} - -#if GTEST_HAS_EXCEPTIONS - -TEST(StreamingAssertionsTest, Throw) { - EXPECT_THROW(ThrowAnInteger(), int) << "unexpected failure"; - ASSERT_THROW(ThrowAnInteger(), int) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_THROW(ThrowAnInteger(), bool) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_THROW(ThrowAnInteger(), bool) << - "expected failure", "expected failure"); -} - -TEST(StreamingAssertionsTest, NoThrow) { - EXPECT_NO_THROW(ThrowNothing()) << "unexpected failure"; - ASSERT_NO_THROW(ThrowNothing()) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_NO_THROW(ThrowAnInteger()) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_NO_THROW(ThrowAnInteger()) << - "expected failure", "expected failure"); -} - -TEST(StreamingAssertionsTest, AnyThrow) { - EXPECT_ANY_THROW(ThrowAnInteger()) << "unexpected failure"; - ASSERT_ANY_THROW(ThrowAnInteger()) << "unexpected failure"; - EXPECT_NONFATAL_FAILURE(EXPECT_ANY_THROW(ThrowNothing()) << - "expected failure", "expected failure"); - EXPECT_FATAL_FAILURE(ASSERT_ANY_THROW(ThrowNothing()) << - "expected failure", "expected failure"); -} - -#endif // GTEST_HAS_EXCEPTIONS - -// Tests that Google Test correctly decides whether to use colors in the output. - -TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsYes) { - GTEST_FLAG(color) = "yes"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsAliasOfYes) { - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - - GTEST_FLAG(color) = "True"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - GTEST_FLAG(color) = "t"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. - - GTEST_FLAG(color) = "1"; - EXPECT_TRUE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsNo) { - GTEST_FLAG(color) = "no"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. -} - -TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsInvalid) { - SetEnv("TERM", "xterm"); // TERM supports colors. - - GTEST_FLAG(color) = "F"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - GTEST_FLAG(color) = "0"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - GTEST_FLAG(color) = "unknown"; - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty) { - GTEST_FLAG(color) = "auto"; - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_FALSE(ShouldUseColor(false)); // Stdout is not a TTY. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -} - -TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { - GTEST_FLAG(color) = "auto"; - -#if GTEST_OS_WINDOWS - // On Windows, we ignore the TERM variable as it's usually not set. - - SetEnv("TERM", "dumb"); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", ""); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm"); - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -#else - // On non-Windows platforms, we rely on TERM to determine if the - // terminal supports colors. - - SetEnv("TERM", "dumb"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "emacs"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "vt100"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm-mono"); // TERM doesn't support colors. - EXPECT_FALSE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "xterm-color"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. - - SetEnv("TERM", "linux"); // TERM supports colors. - EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. -#endif // GTEST_OS_WINDOWS -} - -// Verifies that StaticAssertTypeEq works in a namespace scope. - -static bool dummy1 = StaticAssertTypeEq(); -static bool dummy2 = StaticAssertTypeEq(); - -// Verifies that StaticAssertTypeEq works in a class. - -template -class StaticAssertTypeEqTestHelper { - public: - StaticAssertTypeEqTestHelper() { StaticAssertTypeEq(); } -}; - -TEST(StaticAssertTypeEqTest, WorksInClass) { - StaticAssertTypeEqTestHelper(); -} - -// Verifies that StaticAssertTypeEq works inside a function. - -typedef int IntAlias; - -TEST(StaticAssertTypeEqTest, CompilesForEqualTypes) { - StaticAssertTypeEq(); - StaticAssertTypeEq(); -} - -TEST(ThreadLocalTest, DefaultConstructor) { - ThreadLocal t1; - EXPECT_EQ(0, t1.get()); - - ThreadLocal t2; - EXPECT_TRUE(t2.get() == NULL); -} - -TEST(ThreadLocalTest, Init) { - ThreadLocal t1(123); - EXPECT_EQ(123, t1.get()); - - int i = 0; - ThreadLocal t2(&i); - EXPECT_EQ(&i, t2.get()); -} - -TEST(GetCurrentOsStackTraceExceptTopTest, ReturnsTheStackTrace) { - testing::UnitTest* const unit_test = testing::UnitTest::GetInstance(); - - // We don't have a stack walker in Google Test yet. - EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 0).c_str()); - EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 1).c_str()); -} - -TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsNoFailure) { - EXPECT_FALSE(HasNonfatalFailure()); -} - -static void FailFatally() { FAIL(); } - -TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsOnlyFatalFailure) { - FailFatally(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_FALSE(has_nonfatal_failure); -} - -TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) { - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) { - FailFatally(); - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -// A wrapper for calling HasNonfatalFailure outside of a test body. -static bool HasNonfatalFailureHelper() { - return testing::Test::HasNonfatalFailure(); -} - -TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody) { - EXPECT_FALSE(HasNonfatalFailureHelper()); -} - -TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody2) { - ADD_FAILURE(); - const bool has_nonfatal_failure = HasNonfatalFailureHelper(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_nonfatal_failure); -} - -TEST(HasFailureTest, ReturnsFalseWhenThereIsNoFailure) { - EXPECT_FALSE(HasFailure()); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereIsFatalFailure) { - FailFatally(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereIsNonfatalFailure) { - ADD_FAILURE(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -TEST(HasFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures) { - FailFatally(); - ADD_FAILURE(); - const bool has_failure = HasFailure(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -// A wrapper for calling HasFailure outside of a test body. -static bool HasFailureHelper() { return testing::Test::HasFailure(); } - -TEST(HasFailureTest, WorksOutsideOfTestBody) { - EXPECT_FALSE(HasFailureHelper()); -} - -TEST(HasFailureTest, WorksOutsideOfTestBody2) { - ADD_FAILURE(); - const bool has_failure = HasFailureHelper(); - ClearCurrentTestPartResults(); - EXPECT_TRUE(has_failure); -} - -class TestListener : public EmptyTestEventListener { - public: - TestListener() : on_start_counter_(NULL), is_destroyed_(NULL) {} - TestListener(int* on_start_counter, bool* is_destroyed) - : on_start_counter_(on_start_counter), - is_destroyed_(is_destroyed) {} - - virtual ~TestListener() { - if (is_destroyed_) - *is_destroyed_ = true; - } - - protected: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) { - if (on_start_counter_ != NULL) - (*on_start_counter_)++; - } - - private: - int* on_start_counter_; - bool* is_destroyed_; -}; - -// Tests the constructor. -TEST(TestEventListenersTest, ConstructionWorks) { - TestEventListeners listeners; - - EXPECT_TRUE(TestEventListenersAccessor::GetRepeater(&listeners) != NULL); - EXPECT_TRUE(listeners.default_result_printer() == NULL); - EXPECT_TRUE(listeners.default_xml_generator() == NULL); -} - -// Tests that the TestEventListeners destructor deletes all the listeners it -// owns. -TEST(TestEventListenersTest, DestructionWorks) { - bool default_result_printer_is_destroyed = false; - bool default_xml_printer_is_destroyed = false; - bool extra_listener_is_destroyed = false; - TestListener* default_result_printer = new TestListener( - NULL, &default_result_printer_is_destroyed); - TestListener* default_xml_printer = new TestListener( - NULL, &default_xml_printer_is_destroyed); - TestListener* extra_listener = new TestListener( - NULL, &extra_listener_is_destroyed); - - { - TestEventListeners listeners; - TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, - default_result_printer); - TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, - default_xml_printer); - listeners.Append(extra_listener); - } - EXPECT_TRUE(default_result_printer_is_destroyed); - EXPECT_TRUE(default_xml_printer_is_destroyed); - EXPECT_TRUE(extra_listener_is_destroyed); -} - -// Tests that a listener Append'ed to a TestEventListeners list starts -// receiving events. -TEST(TestEventListenersTest, Append) { - int on_start_counter = 0; - bool is_destroyed = false; - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - { - TestEventListeners listeners; - listeners.Append(listener); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(1, on_start_counter); - } - EXPECT_TRUE(is_destroyed); -} - -// Tests that listeners receive events in the order they were appended to -// the list, except for *End requests, which must be received in the reverse -// order. -class SequenceTestingListener : public EmptyTestEventListener { - public: - SequenceTestingListener(Vector* vector, const char* id) - : vector_(vector), id_(id) {} - - protected: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) { - vector_->PushBack(GetEventDescription("OnTestProgramStart")); - } - - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) { - vector_->PushBack(GetEventDescription("OnTestProgramEnd")); - } - - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, - int /*iteration*/) { - vector_->PushBack(GetEventDescription("OnTestIterationStart")); - } - - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, - int /*iteration*/) { - vector_->PushBack(GetEventDescription("OnTestIterationEnd")); - } - - private: - String GetEventDescription(const char* method) { - Message message; - message << id_ << "." << method; - return message.GetString(); - } - - Vector* vector_; - const char* const id_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(SequenceTestingListener); -}; - -TEST(EventListenerTest, AppendKeepsOrder) { - Vector vec; - TestEventListeners listeners; - listeners.Append(new SequenceTestingListener(&vec, "1st")); - listeners.Append(new SequenceTestingListener(&vec, "2nd")); - listeners.Append(new SequenceTestingListener(&vec, "3rd")); - - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - ASSERT_EQ(3, vec.size()); - EXPECT_STREQ("1st.OnTestProgramStart", vec.GetElement(0).c_str()); - EXPECT_STREQ("2nd.OnTestProgramStart", vec.GetElement(1).c_str()); - EXPECT_STREQ("3rd.OnTestProgramStart", vec.GetElement(2).c_str()); - - vec.Clear(); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramEnd( - *UnitTest::GetInstance()); - ASSERT_EQ(3, vec.size()); - EXPECT_STREQ("3rd.OnTestProgramEnd", vec.GetElement(0).c_str()); - EXPECT_STREQ("2nd.OnTestProgramEnd", vec.GetElement(1).c_str()); - EXPECT_STREQ("1st.OnTestProgramEnd", vec.GetElement(2).c_str()); - - vec.Clear(); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestIterationStart( - *UnitTest::GetInstance(), 0); - ASSERT_EQ(3, vec.size()); - EXPECT_STREQ("1st.OnTestIterationStart", vec.GetElement(0).c_str()); - EXPECT_STREQ("2nd.OnTestIterationStart", vec.GetElement(1).c_str()); - EXPECT_STREQ("3rd.OnTestIterationStart", vec.GetElement(2).c_str()); - - vec.Clear(); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestIterationEnd( - *UnitTest::GetInstance(), 0); - ASSERT_EQ(3, vec.size()); - EXPECT_STREQ("3rd.OnTestIterationEnd", vec.GetElement(0).c_str()); - EXPECT_STREQ("2nd.OnTestIterationEnd", vec.GetElement(1).c_str()); - EXPECT_STREQ("1st.OnTestIterationEnd", vec.GetElement(2).c_str()); -} - -// Tests that a listener removed from a TestEventListeners list stops receiving -// events and is not deleted when the list is destroyed. -TEST(TestEventListenersTest, Release) { - int on_start_counter = 0; - bool is_destroyed = false; - // Although Append passes the ownership of this object to the list, - // the following calls release it, and we need to delete it before the - // test ends. - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - { - TestEventListeners listeners; - listeners.Append(listener); - EXPECT_EQ(listener, listeners.Release(listener)); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_TRUE(listeners.Release(listener) == NULL); - } - EXPECT_EQ(0, on_start_counter); - EXPECT_FALSE(is_destroyed); - delete listener; -} - -// Tests that no events are forwarded when event forwarding is disabled. -TEST(EventListenerTest, SuppressEventForwarding) { - int on_start_counter = 0; - TestListener* listener = new TestListener(&on_start_counter, NULL); - - TestEventListeners listeners; - listeners.Append(listener); - ASSERT_TRUE(TestEventListenersAccessor::EventForwardingEnabled(listeners)); - TestEventListenersAccessor::SuppressEventForwarding(&listeners); - ASSERT_FALSE(TestEventListenersAccessor::EventForwardingEnabled(listeners)); - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(0, on_start_counter); -} - -// Tests that events generated by Google Test are not forwarded in -// death test subprocesses. -TEST(EventListenerDeathTest, EventsNotForwardedInDeathTestSubprecesses) { - EXPECT_DEATH_IF_SUPPORTED({ - GTEST_CHECK_(TestEventListenersAccessor::EventForwardingEnabled( - *GetUnitTestImpl()->listeners())) << "expected failure";}, - "expected failure"); -} - -// Tests that a listener installed via SetDefaultResultPrinter() starts -// receiving events and is returned via default_result_printer() and that -// the previous default_result_printer is removed from the list and deleted. -TEST(EventListenerTest, default_result_printer) { - int on_start_counter = 0; - bool is_destroyed = false; - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - - TestEventListeners listeners; - TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, listener); - - EXPECT_EQ(listener, listeners.default_result_printer()); - - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - - EXPECT_EQ(1, on_start_counter); - - // Replacing default_result_printer with something else should remove it - // from the list and destroy it. - TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, NULL); - - EXPECT_TRUE(listeners.default_result_printer() == NULL); - EXPECT_TRUE(is_destroyed); - - // After broadcasting an event the counter is still the same, indicating - // the listener is not in the list anymore. - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(1, on_start_counter); -} - -// Tests that the default_result_printer listener stops receiving events -// when removed via Release and that is not owned by the list anymore. -TEST(EventListenerTest, RemovingDefaultResultPrinterWorks) { - int on_start_counter = 0; - bool is_destroyed = false; - // Although Append passes the ownership of this object to the list, - // the following calls release it, and we need to delete it before the - // test ends. - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - { - TestEventListeners listeners; - TestEventListenersAccessor::SetDefaultResultPrinter(&listeners, listener); - - EXPECT_EQ(listener, listeners.Release(listener)); - EXPECT_TRUE(listeners.default_result_printer() == NULL); - EXPECT_FALSE(is_destroyed); - - // Broadcasting events now should not affect default_result_printer. - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(0, on_start_counter); - } - // Destroying the list should not affect the listener now, too. - EXPECT_FALSE(is_destroyed); - delete listener; -} - -// Tests that a listener installed via SetDefaultXmlGenerator() starts -// receiving events and is returned via default_xml_generator() and that -// the previous default_xml_generator is removed from the list and deleted. -TEST(EventListenerTest, default_xml_generator) { - int on_start_counter = 0; - bool is_destroyed = false; - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - - TestEventListeners listeners; - TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, listener); - - EXPECT_EQ(listener, listeners.default_xml_generator()); - - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - - EXPECT_EQ(1, on_start_counter); - - // Replacing default_xml_generator with something else should remove it - // from the list and destroy it. - TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, NULL); - - EXPECT_TRUE(listeners.default_xml_generator() == NULL); - EXPECT_TRUE(is_destroyed); - - // After broadcasting an event the counter is still the same, indicating - // the listener is not in the list anymore. - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(1, on_start_counter); -} - -// Tests that the default_xml_generator listener stops receiving events -// when removed via Release and that is not owned by the list anymore. -TEST(EventListenerTest, RemovingDefaultXmlGeneratorWorks) { - int on_start_counter = 0; - bool is_destroyed = false; - // Although Append passes the ownership of this object to the list, - // the following calls release it, and we need to delete it before the - // test ends. - TestListener* listener = new TestListener(&on_start_counter, &is_destroyed); - { - TestEventListeners listeners; - TestEventListenersAccessor::SetDefaultXmlGenerator(&listeners, listener); - - EXPECT_EQ(listener, listeners.Release(listener)); - EXPECT_TRUE(listeners.default_xml_generator() == NULL); - EXPECT_FALSE(is_destroyed); - - // Broadcasting events now should not affect default_xml_generator. - TestEventListenersAccessor::GetRepeater(&listeners)->OnTestProgramStart( - *UnitTest::GetInstance()); - EXPECT_EQ(0, on_start_counter); - } - // Destroying the list should not affect the listener now, too. - EXPECT_FALSE(is_destroyed); - delete listener; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile1_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile1_test_.cc deleted file mode 100644 index 664baad2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile1_test_.cc +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// gtest_xml_outfile1_test_ writes some xml via TestProperty used by -// gtest_xml_outfiles_test.py - -#include - -class PropertyOne : public testing::Test { - protected: - virtual void SetUp() { - RecordProperty("SetUpProp", 1); - } - virtual void TearDown() { - RecordProperty("TearDownProp", 1); - } -}; - -TEST_F(PropertyOne, TestSomeProperties) { - RecordProperty("TestSomeProperty", 1); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile2_test_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile2_test_.cc deleted file mode 100644 index 3411a3d3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfile2_test_.cc +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: keith.ray@gmail.com (Keith Ray) -// -// gtest_xml_outfile2_test_ writes some xml via TestProperty used by -// gtest_xml_outfiles_test.py - -#include - -class PropertyTwo : public testing::Test { - protected: - virtual void SetUp() { - RecordProperty("SetUpProp", 2); - } - virtual void TearDown() { - RecordProperty("TearDownProp", 2); - } -}; - -TEST_F(PropertyTwo, TestSomeProperties) { - RecordProperty("TestSomeProperty", 2); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfiles_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfiles_test.py deleted file mode 100755 index 0fe947f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_outfiles_test.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for the gtest_xml_output module.""" - -__author__ = "keith.ray@gmail.com (Keith Ray)" - -import os -from xml.dom import minidom, Node - -import gtest_test_utils -import gtest_xml_test_utils - - -GTEST_OUTPUT_SUBDIR = "xml_outfiles" -GTEST_OUTPUT_1_TEST = "gtest_xml_outfile1_test_" -GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_" - -EXPECTED_XML_1 = """ - - - - - -""" - -EXPECTED_XML_2 = """ - - - - - -""" - - -class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): - """Unit test for Google Test's XML output functionality.""" - - def setUp(self): - # We want the trailing '/' that the last "" provides in os.path.join, for - # telling Google Test to create an output directory instead of a single file - # for xml output. - self.output_dir_ = os.path.join(gtest_test_utils.GetTempDir(), - GTEST_OUTPUT_SUBDIR, "") - self.DeleteFilesAndDir() - - def tearDown(self): - self.DeleteFilesAndDir() - - def DeleteFilesAndDir(self): - try: - os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_1_TEST + ".xml")) - except os.error: - pass - try: - os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_2_TEST + ".xml")) - except os.error: - pass - try: - os.rmdir(self.output_dir_) - except os.error: - pass - - def testOutfile1(self): - self._TestOutFile(GTEST_OUTPUT_1_TEST, EXPECTED_XML_1) - - def testOutfile2(self): - self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_XML_2) - - def _TestOutFile(self, test_name, expected_xml): - gtest_prog_path = gtest_test_utils.GetTestExecutablePath(test_name) - command = [gtest_prog_path, "--gtest_output=xml:%s" % self.output_dir_] - p = gtest_test_utils.Subprocess(command, - working_dir=gtest_test_utils.GetTempDir()) - self.assert_(p.exited) - self.assertEquals(0, p.exit_code) - - # TODO(wan@google.com): libtool causes the built test binary to be - # named lt-gtest_xml_outfiles_test_ instead of - # gtest_xml_outfiles_test_. To account for this possibillity, we - # allow both names in the following code. We should remove this - # hack when Chandler Carruth's libtool replacement tool is ready. - output_file_name1 = test_name + ".xml" - output_file1 = os.path.join(self.output_dir_, output_file_name1) - output_file_name2 = 'lt-' + output_file_name1 - output_file2 = os.path.join(self.output_dir_, output_file_name2) - self.assert_(os.path.isfile(output_file1) or os.path.isfile(output_file2), - output_file1) - - expected = minidom.parseString(expected_xml) - if os.path.isfile(output_file1): - actual = minidom.parse(output_file1) - else: - actual = minidom.parse(output_file2) - self.NormalizeXml(actual.documentElement) - self.AssertEquivalentNodes(expected.documentElement, - actual.documentElement) - expected.unlink() - actual.unlink() - - -if __name__ == "__main__": - os.environ["GTEST_STACK_TRACE_DEPTH"] = "0" - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest.py deleted file mode 100755 index 6d44929c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest.py +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test for the gtest_xml_output module""" - -__author__ = 'eefacm@gmail.com (Sean Mcafee)' - -import errno -import os -import sys -from xml.dom import minidom, Node - -import gtest_test_utils -import gtest_xml_test_utils - - -GTEST_OUTPUT_FLAG = "--gtest_output" -GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" -GTEST_PROGRAM_NAME = "gtest_xml_output_unittest_" - -SUPPORTS_STACK_TRACES = False - -if SUPPORTS_STACK_TRACES: - STACK_TRACE_TEMPLATE = "\nStack trace:\n*" -else: - STACK_TRACE_TEMPLATE = "" - -EXPECTED_NON_EMPTY_XML = """ - - - - - - - - - - - - - - - - - - - - ]]>%(stack)s]]> - - - - - - - - - - - - - - - - - - - - - -""" % {'stack': STACK_TRACE_TEMPLATE} - - -EXPECTED_EMPTY_XML = """ - -""" - - -class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): - """ - Unit test for Google Test's XML output functionality. - """ - - def testNonEmptyXmlOutput(self): - """ - Runs a test program that generates a non-empty XML output, and - tests that the XML output is expected. - """ - self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_NON_EMPTY_XML, 1) - - def testEmptyXmlOutput(self): - """ - Runs a test program that generates an empty XML output, and - tests that the XML output is expected. - """ - - self._TestXmlOutput("gtest_no_test_unittest", - EXPECTED_EMPTY_XML, 0) - - def testDefaultOutputFile(self): - """ - Confirms that Google Test produces an XML output file with the expected - default name if no name is explicitly specified. - """ - output_file = os.path.join(gtest_test_utils.GetTempDir(), - GTEST_DEFAULT_OUTPUT_FILE) - gtest_prog_path = gtest_test_utils.GetTestExecutablePath( - "gtest_no_test_unittest") - try: - os.remove(output_file) - except OSError, e: - if e.errno != errno.ENOENT: - raise - - p = gtest_test_utils.Subprocess( - [gtest_prog_path, "%s=xml" % GTEST_OUTPUT_FLAG], - working_dir=gtest_test_utils.GetTempDir()) - self.assert_(p.exited) - self.assertEquals(0, p.exit_code) - self.assert_(os.path.isfile(output_file)) - - def testSuppressedXmlOutput(self): - """ - Tests that no XML file is generated if the default XML listener is - shut down before RUN_ALL_TESTS is invoked. - """ - - xml_path = os.path.join(gtest_test_utils.GetTempDir(), - GTEST_PROGRAM_NAME + "out.xml") - if os.path.isfile(xml_path): - os.remove(xml_path) - - gtest_prog_path = gtest_test_utils.GetTestExecutablePath(GTEST_PROGRAM_NAME) - - command = [gtest_prog_path, - "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path), - "--shut_down_xml"] - p = gtest_test_utils.Subprocess(command) - if p.terminated_by_signal: - self.assert_(False, - "%s was killed by signal %d" % (gtest_prog_name, p.signal)) - else: - self.assert_(p.exited) - self.assertEquals(1, p.exit_code, - "'%s' exited with code %s, which doesn't match " - "the expected exit code %s." - % (command, p.exit_code, 1)) - - self.assert_(not os.path.isfile(xml_path)) - - - def _TestXmlOutput(self, gtest_prog_name, expected_xml, expected_exit_code): - """ - Asserts that the XML document generated by running the program - gtest_prog_name matches expected_xml, a string containing another - XML document. Furthermore, the program's exit code must be - expected_exit_code. - """ - xml_path = os.path.join(gtest_test_utils.GetTempDir(), - gtest_prog_name + "out.xml") - gtest_prog_path = gtest_test_utils.GetTestExecutablePath(gtest_prog_name) - - command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)] - p = gtest_test_utils.Subprocess(command) - if p.terminated_by_signal: - self.assert_(False, - "%s was killed by signal %d" % (gtest_prog_name, p.signal)) - else: - self.assert_(p.exited) - self.assertEquals(expected_exit_code, p.exit_code, - "'%s' exited with code %s, which doesn't match " - "the expected exit code %s." - % (command, p.exit_code, expected_exit_code)) - - expected = minidom.parseString(expected_xml) - actual = minidom.parse(xml_path) - self.NormalizeXml(actual.documentElement) - self.AssertEquivalentNodes(expected.documentElement, - actual.documentElement) - expected.unlink() - actual .unlink() - - - -if __name__ == '__main__': - os.environ['GTEST_STACK_TRACE_DEPTH'] = '1' - gtest_test_utils.Main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest_.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest_.cc deleted file mode 100644 index fc07ef46..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_output_unittest_.cc +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: eefacm@gmail.com (Sean Mcafee) - -// Unit test for Google Test XML output. -// -// A user can specify XML output in a Google Test program to run via -// either the GTEST_OUTPUT environment variable or the --gtest_output -// flag. This is used for testing such functionality. -// -// This program will be invoked from a Python unit test. Don't run it -// directly. - -#include - -using ::testing::InitGoogleTest; -using ::testing::TestEventListeners; -using ::testing::UnitTest; - -class SuccessfulTest : public testing::Test { -}; - -TEST_F(SuccessfulTest, Succeeds) { - SUCCEED() << "This is a success."; - ASSERT_EQ(1, 1); -} - -class FailedTest : public testing::Test { -}; - -TEST_F(FailedTest, Fails) { - ASSERT_EQ(1, 2); -} - -class DisabledTest : public testing::Test { -}; - -TEST_F(DisabledTest, DISABLED_test_not_run) { - FAIL() << "Unexpected failure: Disabled test should not be run"; -} - -TEST(MixedResultTest, Succeeds) { - EXPECT_EQ(1, 1); - ASSERT_EQ(1, 1); -} - -TEST(MixedResultTest, Fails) { - EXPECT_EQ(1, 2); - ASSERT_EQ(2, 3); -} - -TEST(MixedResultTest, DISABLED_test) { - FAIL() << "Unexpected failure: Disabled test should not be run"; -} - -TEST(XmlQuotingTest, OutputsCData) { - FAIL() << "XML output: " - ""; -} - -// Helps to test that invalid characters produced by test code do not make -// it into the XML file. -TEST(InvalidCharactersTest, InvalidCharactersInMessage) { - FAIL() << "Invalid characters in brackets [\x1\x2]"; -} - -class PropertyRecordingTest : public testing::Test { -}; - -TEST_F(PropertyRecordingTest, OneProperty) { - RecordProperty("key_1", "1"); -} - -TEST_F(PropertyRecordingTest, IntValuedProperty) { - RecordProperty("key_int", 1); -} - -TEST_F(PropertyRecordingTest, ThreeProperties) { - RecordProperty("key_1", "1"); - RecordProperty("key_2", "2"); - RecordProperty("key_3", "3"); -} - -TEST_F(PropertyRecordingTest, TwoValuesForOneKeyUsesLastValue) { - RecordProperty("key_1", "1"); - RecordProperty("key_1", "2"); -} - -TEST(NoFixtureTest, RecordProperty) { - RecordProperty("key", "1"); -} - -void ExternalUtilityThatCallsRecordProperty(const char* key, int value) { - testing::Test::RecordProperty(key, value); -} - -void ExternalUtilityThatCallsRecordProperty(const char* key, - const char* value) { - testing::Test::RecordProperty(key, value); -} - -TEST(NoFixtureTest, ExternalUtilityThatCallsRecordIntValuedProperty) { - ExternalUtilityThatCallsRecordProperty("key_for_utility_int", 1); -} - -TEST(NoFixtureTest, ExternalUtilityThatCallsRecordStringValuedProperty) { - ExternalUtilityThatCallsRecordProperty("key_for_utility_string", "1"); -} - -int main(int argc, char** argv) { - InitGoogleTest(&argc, argv); - - if (argc > 1 && strcmp(argv[1], "--shut_down_xml") == 0) { - TestEventListeners& listeners = UnitTest::GetInstance()->listeners(); - delete listeners.Release(listeners.default_xml_generator()); - } - return RUN_ALL_TESTS(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_test_utils.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_test_utils.py deleted file mode 100755 index c83c3b7e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/gtest_xml_test_utils.py +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unit test utilities for gtest_xml_output""" - -__author__ = 'eefacm@gmail.com (Sean Mcafee)' - -import re -from xml.dom import minidom, Node - -import gtest_test_utils - - -GTEST_OUTPUT_FLAG = "--gtest_output" -GTEST_DEFAULT_OUTPUT_FILE = "test_detail.xml" - -class GTestXMLTestCase(gtest_test_utils.TestCase): - """ - Base class for tests of Google Test's XML output functionality. - """ - - - def AssertEquivalentNodes(self, expected_node, actual_node): - """ - Asserts that actual_node (a DOM node object) is equivalent to - expected_node (another DOM node object), in that either both of - them are CDATA nodes and have the same value, or both are DOM - elements and actual_node meets all of the following conditions: - - * It has the same tag name as expected_node. - * It has the same set of attributes as expected_node, each with - the same value as the corresponding attribute of expected_node. - An exception is any attribute named "time", which needs only be - convertible to a floating-point number. - * It has an equivalent set of child nodes (including elements and - CDATA sections) as expected_node. Note that we ignore the - order of the children as they are not guaranteed to be in any - particular order. - """ - - if expected_node.nodeType == Node.CDATA_SECTION_NODE: - self.assertEquals(Node.CDATA_SECTION_NODE, actual_node.nodeType) - self.assertEquals(expected_node.nodeValue, actual_node.nodeValue) - return - - self.assertEquals(Node.ELEMENT_NODE, actual_node.nodeType) - self.assertEquals(Node.ELEMENT_NODE, expected_node.nodeType) - self.assertEquals(expected_node.tagName, actual_node.tagName) - - expected_attributes = expected_node.attributes - actual_attributes = actual_node .attributes - self.assertEquals( - expected_attributes.length, actual_attributes.length, - "attribute numbers differ in element " + actual_node.tagName) - for i in range(expected_attributes.length): - expected_attr = expected_attributes.item(i) - actual_attr = actual_attributes.get(expected_attr.name) - self.assert_( - actual_attr is not None, - "expected attribute %s not found in element %s" % - (expected_attr.name, actual_node.tagName)) - self.assertEquals(expected_attr.value, actual_attr.value, - " values of attribute %s in element %s differ" % - (expected_attr.name, actual_node.tagName)) - - expected_children = self._GetChildren(expected_node) - actual_children = self._GetChildren(actual_node) - self.assertEquals( - len(expected_children), len(actual_children), - "number of child elements differ in element " + actual_node.tagName) - for child_id, child in expected_children.iteritems(): - self.assert_(child_id in actual_children, - '<%s> is not in <%s> (in element %s)' % - (child_id, actual_children, actual_node.tagName)) - self.AssertEquivalentNodes(child, actual_children[child_id]) - - identifying_attribute = { - "testsuites": "name", - "testsuite": "name", - "testcase": "name", - "failure": "message", - } - - def _GetChildren(self, element): - """ - Fetches all of the child nodes of element, a DOM Element object. - Returns them as the values of a dictionary keyed by the IDs of the - children. For , and elements, the ID - is the value of their "name" attribute; for elements, it is - the value of the "message" attribute; CDATA sections and non-whitespace - text nodes are concatenated into a single CDATA section with ID - "detail". An exception is raised if any element other than the above - four is encountered, if two child elements with the same identifying - attributes are encountered, or if any other type of node is encountered. - """ - - children = {} - for child in element.childNodes: - if child.nodeType == Node.ELEMENT_NODE: - self.assert_(child.tagName in self.identifying_attribute, - "Encountered unknown element <%s>" % child.tagName) - childID = child.getAttribute(self.identifying_attribute[child.tagName]) - self.assert_(childID not in children) - children[childID] = child - elif child.nodeType in [Node.TEXT_NODE, Node.CDATA_SECTION_NODE]: - if "detail" not in children: - if (child.nodeType == Node.CDATA_SECTION_NODE or - not child.nodeValue.isspace()): - children["detail"] = child.ownerDocument.createCDATASection( - child.nodeValue) - else: - children["detail"].nodeValue += child.nodeValue - else: - self.fail("Encountered unexpected node type %d" % child.nodeType) - return children - - def NormalizeXml(self, element): - """ - Normalizes Google Test's XML output to eliminate references to transient - information that may change from run to run. - - * The "time" attribute of , and - elements is replaced with a single asterisk, if it contains - only digit characters. - * The line number reported in the first line of the "message" - attribute of elements is replaced with a single asterisk. - * The directory names in file paths are removed. - * The stack traces are removed. - """ - - if element.tagName in ("testsuites", "testsuite", "testcase"): - time = element.getAttributeNode("time") - time.value = re.sub(r"^\d+(\.\d+)?$", "*", time.value) - elif element.tagName == "failure": - for child in element.childNodes: - if child.nodeType == Node.CDATA_SECTION_NODE: - # Removes the source line number. - cdata = re.sub(r"^.*[/\\](.*:)\d+\n", "\\1*\n", child.nodeValue) - # Removes the actual stack trace. - child.nodeValue = re.sub(r"\nStack trace:\n(.|\n)*", - "", cdata) - for child in element.childNodes: - if child.nodeType == Node.ELEMENT_NODE: - self.NormalizeXml(child) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.cc deleted file mode 100644 index 8b8a40b4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This is part of the unit test for include/gtest/gtest_prod.h. - -#include "production.h" - -PrivateCode::PrivateCode() : x_(0) {} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.h deleted file mode 100644 index 59970da0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/production.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// -// This is part of the unit test for include/gtest/gtest_prod.h. - -#ifndef GTEST_TEST_PRODUCTION_H_ -#define GTEST_TEST_PRODUCTION_H_ - -#include - -class PrivateCode { - public: - // Declares a friend test that does not use a fixture. - FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers); - - // Declares a friend test that uses a fixture. - FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers); - - PrivateCode(); - - int x() const { return x_; } - private: - void set_x(int x) { x_ = x; } - int x_; -}; - -#endif // GTEST_TEST_PRODUCTION_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/run_tests_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/run_tests_test.py deleted file mode 100755 index 79524a68..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/test/run_tests_test.py +++ /dev/null @@ -1,614 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 Google Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests for run_tests.py test runner script.""" - -__author__ = 'vladl@google.com (Vlad Losev)' - -import os -import re -import sets -import sys -import unittest - -sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), os.pardir)) -import run_tests - - -GTEST_DBG_DIR = 'scons/build/dbg/scons' -GTEST_OPT_DIR = 'scons/build/opt/scons' -GTEST_OTHER_DIR = 'scons/build/other/scons' - - -def AddExeExtension(path): - """Appends .exe to the path on Windows or Cygwin.""" - - if run_tests.IS_WINDOWS or run_tests.IS_CYGWIN: - return path + '.exe' - else: - return path - - -class FakePath(object): - """A fake os.path module for testing.""" - - def __init__(self, current_dir=os.getcwd(), known_paths=None): - self.current_dir = current_dir - self.tree = {} - self.path_separator = os.sep - - # known_paths contains either absolute or relative paths. Relative paths - # are absolutized with self.current_dir. - if known_paths: - self._AddPaths(known_paths) - - def _AddPath(self, path): - ends_with_slash = path.endswith('/') - path = self.abspath(path) - if ends_with_slash: - path += self.path_separator - name_list = path.split(self.path_separator) - tree = self.tree - for name in name_list[:-1]: - if not name: - continue - if name in tree: - tree = tree[name] - else: - tree[name] = {} - tree = tree[name] - - name = name_list[-1] - if name: - if name in tree: - assert tree[name] == 1 - else: - tree[name] = 1 - - def _AddPaths(self, paths): - for path in paths: - self._AddPath(path) - - def PathElement(self, path): - """Returns an internal representation of directory tree entry for path.""" - tree = self.tree - name_list = self.abspath(path).split(self.path_separator) - for name in name_list: - if not name: - continue - tree = tree.get(name, None) - if tree is None: - break - - return tree - - def normpath(self, path): - return os.path.normpath(path) - - def abspath(self, path): - return self.normpath(os.path.join(self.current_dir, path)) - - def isfile(self, path): - return self.PathElement(self.abspath(path)) == 1 - - def isdir(self, path): - return type(self.PathElement(self.abspath(path))) == type(dict()) - - def basename(self, path): - return os.path.basename(path) - - def dirname(self, path): - return os.path.dirname(path) - - def join(self, *kargs): - return os.path.join(*kargs) - - -class FakeOs(object): - """A fake os module for testing.""" - P_WAIT = os.P_WAIT - - def __init__(self, fake_path_module): - self.path = fake_path_module - - # Some methods/attributes are delegated to the real os module. - self.environ = os.environ - - def listdir(self, path): - assert self.path.isdir(path) - return self.path.PathElement(path).iterkeys() - - def spawnv(self, wait, executable, *kargs): - assert wait == FakeOs.P_WAIT - return self.spawn_impl(executable, kargs) - - -class GetTestsToRunTest(unittest.TestCase): - """Exercises TestRunner.GetTestsToRun.""" - - def NormalizeGetTestsToRunResults(self, results): - """Normalizes path data returned from GetTestsToRun for comparison.""" - - def NormalizePythonTestPair(pair): - """Normalizes path data in the (directory, python_script) pair.""" - - return (os.path.normpath(pair[0]), os.path.normpath(pair[1])) - - def NormalizeBinaryTestPair(pair): - """Normalizes path data in the (directory, binary_executable) pair.""" - - directory, executable = map(os.path.normpath, pair) - - # On Windows and Cygwin, the test file names have the .exe extension, but - # they can be invoked either by name or by name+extension. Our test must - # accommodate both situations. - if run_tests.IS_WINDOWS or run_tests.IS_CYGWIN: - executable = re.sub(r'\.exe$', '', executable) - return (directory, executable) - - python_tests = sets.Set(map(NormalizePythonTestPair, results[0])) - binary_tests = sets.Set(map(NormalizeBinaryTestPair, results[1])) - return (python_tests, binary_tests) - - def AssertResultsEqual(self, results, expected): - """Asserts results returned by GetTestsToRun equal to expected results.""" - - self.assertEqual(self.NormalizeGetTestsToRunResults(results), - self.NormalizeGetTestsToRunResults(expected), - 'Incorrect set of tests returned:\n%s\nexpected:\n%s' % - (results, expected)) - - def setUp(self): - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=[AddExeExtension(GTEST_DBG_DIR + '/gtest_unittest'), - AddExeExtension(GTEST_OPT_DIR + '/gtest_unittest'), - 'test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='.') - - def testBinaryTestsOnly(self): - """Exercises GetTestsToRun with parameters designating binary tests only.""" - - # A default build. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # An explicitly specified directory. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # A particular configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - 'other', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_OTHER_DIR, GTEST_OTHER_DIR + '/gtest_unittest')])) - - # All available configurations - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - 'all', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), - (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) - - # All built configurations (unbuilt don't cause failure). - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - True, - available_configurations=self.fake_configurations + ['unbuilt']), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), - (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) - - # A combination of an explicit directory and a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_unittest'], - 'opt', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), - (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) - - # Same test specified in an explicit directory and via a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_unittest'], - 'dbg', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # All built configurations + explicit directory + explicit configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_unittest'], - 'opt', - True, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), - (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) - - def testPythonTestsOnly(self): - """Exercises GetTestsToRun with parameters designating Python tests only.""" - - # A default build. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [])) - - # An explicitly specified directory. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'test/gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [])) - - # A particular configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - 'other', - False, - available_configurations=self.fake_configurations), - ([(GTEST_OTHER_DIR, 'test/gtest_color_test.py')], - [])) - - # All available configurations - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['test/gtest_color_test.py'], - 'all', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), - (GTEST_OPT_DIR, 'test/gtest_color_test.py')], - [])) - - # All built configurations (unbuilt don't cause failure). - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - True, - available_configurations=self.fake_configurations + ['unbuilt']), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), - (GTEST_OPT_DIR, 'test/gtest_color_test.py')], - [])) - - # A combination of an explicit directory and a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_color_test.py'], - 'opt', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), - (GTEST_OPT_DIR, 'test/gtest_color_test.py')], - [])) - - # Same test specified in an explicit directory and via a configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_color_test.py'], - 'dbg', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [])) - - # All built configurations + explicit directory + explicit configuration. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [GTEST_DBG_DIR, 'gtest_color_test.py'], - 'opt', - True, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), - (GTEST_OPT_DIR, 'test/gtest_color_test.py')], - [])) - - def testCombinationOfBinaryAndPythonTests(self): - """Exercises GetTestsToRun with mixed binary/Python tests.""" - - # Use only default configuration for this test. - - # Neither binary nor Python tests are specified so find all. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [], - '', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # Specifying both binary and Python tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest', 'gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # Specifying binary tests suppresses Python tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) - - # Specifying Python tests suppresses binary tests. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - [])) - - def testIgnoresNonTestFiles(self): - """Verifies that GetTestsToRun ignores non-test files in the filesystem.""" - - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=[AddExeExtension(GTEST_DBG_DIR + '/gtest_nontest'), - 'test/'])) - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='.') - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [], - '', - True, - available_configurations=self.fake_configurations), - ([], [])) - - def testWorksFromDifferentDir(self): - """Exercises GetTestsToRun from a directory different from run_test.py's.""" - - # Here we simulate an test script in directory /d/ called from the - # directory /a/b/c/. - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath('/a/b/c'), - known_paths=[ - '/a/b/c/', - AddExeExtension('/d/' + GTEST_DBG_DIR + '/gtest_unittest'), - AddExeExtension('/d/' + GTEST_OPT_DIR + '/gtest_unittest'), - '/d/test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='/d/') - # A binary test. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_unittest'], - '', - False, - available_configurations=self.fake_configurations), - ([], - [('/d/' + GTEST_DBG_DIR, '/d/' + GTEST_DBG_DIR + '/gtest_unittest')])) - - # A Python test. - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - ['gtest_color_test.py'], - '', - False, - available_configurations=self.fake_configurations), - ([('/d/' + GTEST_DBG_DIR, '/d/test/gtest_color_test.py')], [])) - - - def testNonTestBinary(self): - """Exercises GetTestsToRun with a non-test parameter.""" - - self.assert_( - not self.test_runner.GetTestsToRun( - ['gtest_unittest_not_really'], - '', - False, - available_configurations=self.fake_configurations)) - - def testNonExistingPythonTest(self): - """Exercises GetTestsToRun with a non-existent Python test parameter.""" - - self.assert_( - not self.test_runner.GetTestsToRun( - ['nonexistent_test.py'], - '', - False, - available_configurations=self.fake_configurations)) - - if run_tests.IS_WINDOWS or run_tests.IS_CYGWIN: - def testDoesNotPickNonExeFilesOnWindows(self): - """Verifies that GetTestsToRun does not find _test files on Windows.""" - - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=['/d/' + GTEST_DBG_DIR + '/gtest_test', 'test/'])) - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None, - injected_script_dir='.') - self.AssertResultsEqual( - self.test_runner.GetTestsToRun( - [], - '', - True, - available_configurations=self.fake_configurations), - ([], [])) - - -class RunTestsTest(unittest.TestCase): - """Exercises TestRunner.RunTests.""" - - def SpawnSuccess(self, unused_executable, unused_argv): - """Fakes test success by returning 0 as an exit code.""" - - self.num_spawn_calls += 1 - return 0 - - def SpawnFailure(self, unused_executable, unused_argv): - """Fakes test success by returning 1 as an exit code.""" - - self.num_spawn_calls += 1 - return 1 - - def setUp(self): - self.fake_os = FakeOs(FakePath( - current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=[ - AddExeExtension(GTEST_DBG_DIR + '/gtest_unittest'), - AddExeExtension(GTEST_OPT_DIR + '/gtest_unittest'), - 'test/gtest_color_test.py'])) - self.fake_configurations = ['dbg', 'opt'] - self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, - injected_subprocess=None) - self.num_spawn_calls = 0 # A number of calls to spawn. - - def testRunPythonTestSuccess(self): - """Exercises RunTests to handle a Python test success.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - []), - 0) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunBinaryTestSuccess(self): - """Exercises RunTests to handle a binary test success.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunPythonTestFauilure(self): - """Exercises RunTests to handle a Python test failure.""" - - self.fake_os.spawn_impl = self.SpawnFailure - self.assertEqual( - self.test_runner.RunTests( - [(GTEST_DBG_DIR, 'test/gtest_color_test.py')], - []), - 1) - self.assertEqual(self.num_spawn_calls, 1) - - def testRunBinaryTestFailure(self): - """Exercises RunTests to handle a binary test failure.""" - - self.fake_os.spawn_impl = self.SpawnFailure - self.assertEqual( - self.test_runner.RunTests( - [], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), - 1) - self.assertEqual(self.num_spawn_calls, 1) - - def testCombinedTestSuccess(self): - """Exercises RunTests to handle a success of both Python and binary test.""" - - self.fake_os.spawn_impl = self.SpawnSuccess - self.assertEqual( - self.test_runner.RunTests( - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 2) - - def testCombinedTestSuccessAndFailure(self): - """Exercises RunTests to handle a success of both Python and binary test.""" - - def SpawnImpl(executable, argv): - self.num_spawn_calls += 1 - # Simulates failure of a Python test and success of a binary test. - if '.py' in executable or '.py' in argv[0]: - return 1 - else: - return 0 - - self.fake_os.spawn_impl = SpawnImpl - self.assertEqual( - self.test_runner.RunTests( - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')], - [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), - 0) - self.assertEqual(self.num_spawn_calls, 2) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/DebugProject.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/DebugProject.xcconfig deleted file mode 100644 index 3d68157d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/DebugProject.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// DebugProject.xcconfig -// -// These are Debug Configuration project settings for the gtest framework and -// examples. It is set in the "Based On:" dropdown in the "Project" info -// dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -#include "General.xcconfig" - -// No optimization -GCC_OPTIMIZATION_LEVEL = 0 - -// Deployment postprocessing is what triggers Xcode to strip, turn it off -DEPLOYMENT_POSTPROCESSING = NO - -// Dead code stripping off -DEAD_CODE_STRIPPING = NO - -// Debug symbols should be on obviously -GCC_GENERATE_DEBUGGING_SYMBOLS = YES - -// Define the DEBUG macro in all debug builds -OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 - -// These are turned off to avoid STL incompatibilities with client code -// // Turns on special C++ STL checks to "encourage" good STL use -// GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/FrameworkTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/FrameworkTarget.xcconfig deleted file mode 100644 index 357b1c8f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/FrameworkTarget.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// FrameworkTarget.xcconfig -// -// These are Framework target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -// Dynamic libs need to be position independent -GCC_DYNAMIC_NO_PIC = NO - -// Dynamic libs should not have their external symbols stripped. -STRIP_STYLE = non-global - -// Let the user install by specifying the $DSTROOT with xcodebuild -SKIP_INSTALL = NO diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/General.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/General.xcconfig deleted file mode 100644 index 9fcada16..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/General.xcconfig +++ /dev/null @@ -1,41 +0,0 @@ -// -// General.xcconfig -// -// These are General configuration settings for the gtest framework and -// examples. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -// Build for PPC and Intel, 32- and 64-bit -ARCHS = i386 x86_64 ppc ppc64 - -// Zerolink prevents link warnings so turn it off -ZERO_LINK = NO - -// Prebinding considered unhelpful in 10.3 and later -PREBINDING = NO - -// Strictest warning policy -WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare - -// Work around Xcode bugs by using external strip. See: -// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -SEPARATE_STRIP = YES - -// Force C99 dialect -GCC_C_LANGUAGE_STANDARD = c99 - -// not sure why apple defaults this on, but it's pretty risky -ALWAYS_SEARCH_USER_PATHS = NO - -// Turn on position dependent code for most cases (overridden where appropriate) -GCC_DYNAMIC_NO_PIC = YES - -// Default SDK and minimum OS version is 10.4 -SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk -MACOSX_DEPLOYMENT_TARGET = 10.4 -GCC_VERSION = 4.0 - -// VERSIONING BUILD SETTINGS (used in Info.plist) -GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/ReleaseProject.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/ReleaseProject.xcconfig deleted file mode 100644 index 5349f0a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/ReleaseProject.xcconfig +++ /dev/null @@ -1,32 +0,0 @@ -// -// ReleaseProject.xcconfig -// -// These are Release Configuration project settings for the gtest framework -// and examples. It is set in the "Based On:" dropdown in the "Project" info -// dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -#include "General.xcconfig" - -// subconfig/Release.xcconfig - -// Optimize for space and size (Apple recommendation) -GCC_OPTIMIZATION_LEVEL = s - -// Deploment postprocessing is what triggers Xcode to strip -DEPLOYMENT_POSTPROCESSING = YES - -// No symbols -GCC_GENERATE_DEBUGGING_SYMBOLS = NO - -// Dead code strip does not affect ObjC code but can help for C -DEAD_CODE_STRIPPING = YES - -// NDEBUG is used by things like assert.h, so define it for general compat. -// ASSERT going away in release tends to create unused vars. -OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable - -// When we strip we want to strip all symbols in release, but save externals. -STRIP_STYLE = all diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/StaticLibraryTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/StaticLibraryTarget.xcconfig deleted file mode 100644 index 3922fa51..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/StaticLibraryTarget.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// StaticLibraryTarget.xcconfig -// -// These are static library target settings for libgtest.a. It -// is set in the "Based On:" dropdown in the "Target" info dialog. -// This file is based on the Xcode Configuration files in: -// http://code.google.com/p/google-toolbox-for-mac/ -// - -// Static libs can be included in bundles so make them position independent -GCC_DYNAMIC_NO_PIC = NO - -// Static libs should not have their internal globals or external symbols -// stripped. -STRIP_STYLE = debugging - -// Let the user install by specifying the $DSTROOT with xcodebuild -SKIP_INSTALL = NO diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/TestTarget.xcconfig b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/TestTarget.xcconfig deleted file mode 100644 index e6652ba8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Config/TestTarget.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -// -// TestTarget.xcconfig -// -// These are Test target settings for the gtest framework and examples. It -// is set in the "Based On:" dropdown in the "Target" info dialog. - -PRODUCT_NAME = $(TARGET_NAME) -HEADER_SEARCH_PATHS = ../include diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Resources/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Resources/Info.plist deleted file mode 100644 index 9dd28ea1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Resources/Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.${PRODUCT_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - GTEST_VERSIONINFO_LONG - CFBundleShortVersionString - GTEST_VERSIONINFO_SHORT - CFBundleGetInfoString - ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} - NSHumanReadableCopyright - ${GTEST_VERSIONINFO_ABOUT} - CSResourcesFileMapped - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/Info.plist b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/Info.plist deleted file mode 100644 index f3852ede..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.gtest.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - CSResourcesFileMapped - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.cc deleted file mode 100644 index d03ca00c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.cc +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget.cc -// - -// Widget is a very simple class used for demonstrating the use of gtest - -#include "widget.h" - -Widget::Widget(int number, const std::string& name) - : number_(number), - name_(name) {} - -Widget::~Widget() {} - -float Widget::GetFloatValue() const { - return number_; -} - -int Widget::GetIntValue() const { - return static_cast(number_); -} - -std::string Widget::GetStringValue() const { - return name_; -} - -void Widget::GetCharPtrValue(char* buffer, size_t max_size) const { - // Copy the char* representation of name_ into buffer, up to max_size. - strncpy(buffer, name_.c_str(), max_size-1); - buffer[max_size-1] = '\0'; - return; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.h deleted file mode 100644 index 59cc82cd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget.h -// - -// Widget is a very simple class used for demonstrating the use of gtest. It -// simply stores two values a string and an integer, which are returned via -// public accessors in multiple forms. - -#import - -class Widget { - public: - Widget(int number, const std::string& name); - ~Widget(); - - // Public accessors to number data - float GetFloatValue() const; - int GetIntValue() const; - - // Public accessors to the string data - std::string GetStringValue() const; - void GetCharPtrValue(char* buffer, size_t max_size) const; - - private: - // Data members - float number_; - std::string name_; -}; diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget_test.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget_test.cc deleted file mode 100644 index 0a7c4f0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Samples/FrameworkSample/widget_test.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: preston.jackson@gmail.com (Preston Jackson) -// -// Google Test - FrameworkSample -// widget_test.cc -// - -// This is a simple test file for the Widget class in the Widget.framework - -#include -#include - -#include - -// This test verifies that the constructor sets the internal state of the -// Widget class correctly. -TEST(WidgetInitializerTest, TestConstructor) { - Widget widget(1.0f, "name"); - EXPECT_FLOAT_EQ(1.0f, widget.GetFloatValue()); - EXPECT_EQ(std::string("name"), widget.GetStringValue()); -} - -// This test verifies the conversion of the float and string values to int and -// char*, respectively. -TEST(WidgetInitializerTest, TestConversion) { - Widget widget(1.0f, "name"); - EXPECT_EQ(1, widget.GetIntValue()); - - size_t max_size = 128; - char buffer[max_size]; - widget.GetCharPtrValue(buffer, max_size); - EXPECT_STREQ("name", buffer); -} - -// Use the Google Test main that is linked into the framework. It does something -// like this: -// int main(int argc, char** argv) { -// testing::InitGoogleTest(&argc, argv); -// return RUN_ALL_TESTS(); -// } diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/runtests.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/runtests.sh deleted file mode 100644 index 9d23a772..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/runtests.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Executes the samples and tests for the Google Test Framework. - -# Help the dynamic linker find the path to the libraries. -export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR -export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR - -# Create some executables. -test_executables=("$BUILT_PRODUCTS_DIR/gtest_unittest-framework" - "$BUILT_PRODUCTS_DIR/gtest_unittest" - "$BUILT_PRODUCTS_DIR/sample1_unittest-framework" - "$BUILT_PRODUCTS_DIR/sample1_unittest-static") - -# Now execute each one in turn keeping track of how many succeeded and failed. -succeeded=0 -failed=0 -failed_list=() -for test in ${test_executables[*]}; do - "$test" - result=$? - if [ $result -eq 0 ]; then - succeeded=$(( $succeeded + 1 )) - else - failed=$(( failed + 1 )) - failed_list="$failed_list $test" - fi -done - -# Report the successes and failures to the console. -echo "Tests complete with $succeeded successes and $failed failures." -if [ $failed -ne 0 ]; then - echo "The following tests failed:" - echo $failed_list -fi -exit $failed diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/versiongenerate.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/versiongenerate.py deleted file mode 100644 index 3b19a96b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/gtest/xcode/Scripts/versiongenerate.py +++ /dev/null @@ -1,71 +0,0 @@ -#/usr/bin/python - -"""A script to prepare version informtion for use the gtest Info.plist file. - - This script extracts the version information from the configure.ac file and - uses it to generate a header file containing the same information. The - #defines in this header file will be included in during the generation of - the Info.plist of the framework, giving the correct value to the version - shown in the Finder. - - This script makes the following assumptions (these are faults of the script, - not problems with the Autoconf): - 1. The AC_INIT macro will be contained within the first 1024 characters - of configure.ac - 2. The version string will be 3 integers separated by periods and will be - surrounded by squre brackets, "[" and "]" (e.g. [1.0.1]). The first - segment represents the major version, the second represents the minor - version and the third represents the fix version. - 3. No ")" character exists between the opening "(" and closing ")" of - AC_INIT, including in comments and character strings. -""" - -import sys -import re - -# Read the command line argument (the output directory for Version.h) -if (len(sys.argv) < 3): - print "Usage: /usr/bin/python versiongenerate.py input_dir output_dir" - sys.exit(1) -else: - input_dir = sys.argv[1] - output_dir = sys.argv[2] - -# Read the first 1024 characters of the configure.ac file -config_file = open("%s/configure.ac" % input_dir, 'r') -buffer_size = 1024 -opening_string = config_file.read(buffer_size) -config_file.close() - -# Extract the version string from the AC_INIT macro -# The following init_expression means: -# Extract three integers separated by periods and surrounded by squre -# brackets(e.g. "[1.0.1]") between "AC_INIT(" and ")". Do not be greedy -# (*? is the non-greedy flag) since that would pull in everything between -# the first "(" and the last ")" in the file. -version_expression = re.compile(r"AC_INIT\(.*?\[(\d+)\.(\d+)\.(\d+)\].*?\)", - re.DOTALL) -version_values = version_expression.search(opening_string) -major_version = version_values.group(1) -minor_version = version_values.group(2) -fix_version = version_values.group(3) - -# Write the version information to a header file to be included in the -# Info.plist file. -file_data = """// -// DO NOT MODIFY THIS FILE (but you can delete it) -// -// This file is autogenerated by the versiongenerate.py script. This script -// is executed in a "Run Script" build phase when creating gtest.framework. This -// header file is not used during compilation of C-source. Rather, it simply -// defines some version strings for substitution in the Info.plist. Because of -// this, we are not not restricted to C-syntax nor are we using include guards. -// - -#define GTEST_VERSIONINFO_SHORT %s.%s -#define GTEST_VERSIONINFO_LONG %s.%s.%s - -""" % (major_version, minor_version, major_version, minor_version, fix_version) -version_file = open("%s/Version.h" % output_dir, 'w') -version_file.write(file_data) -version_file.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/README.txt deleted file mode 100644 index 3ed06a1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/README.txt +++ /dev/null @@ -1,96 +0,0 @@ -Protocol Buffers - Google's data interchange format -Copyright 2008 Google Inc. - -This directory contains the Java Protocol Buffers runtime library. - -Installation - With Maven -========================= - -The Protocol Buffers build is managed using Maven. If you would -rather build without Maven, see below. - -1) Install Apache Maven if you don't have it: - - http://maven.apache.org/ - -2) Build the C++ code, or obtain a binary distribution of protoc. If - you install a binary distribution, make sure that it is the same - version as this package. If in doubt, run: - - $ protoc --version - - You will need to place the protoc executable in ../src. (If you - built it yourself, it should already be there.) - -3) Run the tests: - - $ mvn test - - If some tests fail, this library may not work correctly on your - system. Continue at your own risk. - -4) Install the library into your Maven repository: - - $ mvn install - -5) If you do not use Maven to manage your own build, you can build a - .jar file to use: - - $ mvn package - - The .jar will be placed in the "target" directory. - -Installation - 'Lite' Version - With Maven -========================================== - -Building the 'lite' version of the Java Protocol Buffers library is -the same as building the full version, except that all commands are -run using the 'lite' profile. (see -http://maven.apache.org/guides/introduction/introduction-to-profiles.html) - -E.g. to install the lite version of the jar, you would run: - - $ mvn install -P lite - -The resulting artifact has the 'lite' classifier. To reference it -for dependency resolution, you would specify it as: - - - com.google.protobuf - protobuf-java - ${version} - lite - - -Installation - Without Maven -============================ - -If you would rather not install Maven to build the library, you may -follow these instructions instead. Note that these instructions skip -running unit tests. - -1) Build the C++ code, or obtain a binary distribution of protoc. If - you install a binary distribution, make sure that it is the same - version as this package. If in doubt, run: - - $ protoc --version - - If you built the C++ code without installing, the compiler binary - should be located in ../src. - -2) Invoke protoc to build DescriptorProtos.java: - - $ protoc --java_out=src/main/java -I../src \ - ../src/google/protobuf/descriptor.proto - -3) Compile the code in src/main/java using whatever means you prefer. - -4) Install the classes wherever you prefer. - -Usage -===== - -The complete documentation for Protocol Buffers is available via the -web at: - - http://code.google.com/apis/protocolbuffers/ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/pom.xml b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/pom.xml deleted file mode 100644 index d1b44c0f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/pom.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - 4.0.0 - - com.google - google - 1 - - com.google.protobuf - protobuf-java - 2.4.1-pre - jar - Protocol Buffer Java API - - Protocol Buffers are a way of encoding structured data in an efficient yet - extensible format. - - 2008 - http://code.google.com/p/protobuf - - - New BSD license - http://www.opensource.org/licenses/bsd-license.php - repo - - - - http://code.google.com/p/protobuf/source/browse - - scm:svn:http://protobuf.googlecode.com/svn/trunk/ - - - - - junit - junit - 4.4 - test - - - org.easymock - easymock - 2.2 - test - - - org.easymock - easymockclassextension - 2.2.1 - test - - - - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - maven-surefire-plugin - - - **/*Test.java - - - - - maven-antrun-plugin - - - generate-sources - generate-sources - - - - - - - - - - target/generated-sources - - - run - - - - generate-test-sources - generate-test-sources - - - - - - - - - - - - - - - - - - - - - - - - - - - target/generated-test-sources - - - run - - - - - - - - - lite - - - - maven-compiler-plugin - - - **/AbstractMessageLite.java - **/ByteString.java - **/CodedInputStream.java - **/CodedOutputStream.java - **/ExtensionRegistryLite.java - **/FieldSet.java - **/GeneratedMessageLite.java - **/Internal.java - **/InvalidProtocolBufferException.java - **/LazyStringArrayList.java - **/LazyStringList.java - **/MessageLite.java - **/MessageLiteOrBuilder.java - **/SmallSortedMap.java - **/UninitializedMessageException.java - **/UnmodifiableLazyStringList.java - **/WireFormat.java - - - **/LiteTest.java - **/*Lite.java - - - - - maven-surefire-plugin - - - **/LiteTest.java - - - - - maven-jar-plugin - - lite - - - - - - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java deleted file mode 100644 index b9d83016..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java +++ /dev/null @@ -1,764 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Internal.EnumLite; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * A partial implementation of the {@link Message} interface which implements - * as many methods of that interface as possible in terms of other methods. - * - * @author kenton@google.com Kenton Varda - */ -public abstract class AbstractMessage extends AbstractMessageLite - implements Message { - @SuppressWarnings("unchecked") - public boolean isInitialized() { - // Check that all required fields are present. - for (final FieldDescriptor field : getDescriptorForType().getFields()) { - if (field.isRequired()) { - if (!hasField(field)) { - return false; - } - } - } - - // Check that embedded messages are initialized. - for (final Map.Entry entry : - getAllFields().entrySet()) { - final FieldDescriptor field = entry.getKey(); - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (field.isRepeated()) { - for (final Message element : (List) entry.getValue()) { - if (!element.isInitialized()) { - return false; - } - } - } else { - if (!((Message) entry.getValue()).isInitialized()) { - return false; - } - } - } - } - - return true; - } - - @Override - public final String toString() { - return TextFormat.printToString(this); - } - - public void writeTo(final CodedOutputStream output) throws IOException { - final boolean isMessageSet = - getDescriptorForType().getOptions().getMessageSetWireFormat(); - - for (final Map.Entry entry : - getAllFields().entrySet()) { - final FieldDescriptor field = entry.getKey(); - final Object value = entry.getValue(); - if (isMessageSet && field.isExtension() && - field.getType() == FieldDescriptor.Type.MESSAGE && - !field.isRepeated()) { - output.writeMessageSetExtension(field.getNumber(), (Message) value); - } else { - FieldSet.writeField(field, value, output); - } - } - - final UnknownFieldSet unknownFields = getUnknownFields(); - if (isMessageSet) { - unknownFields.writeAsMessageSetTo(output); - } else { - unknownFields.writeTo(output); - } - } - - private int memoizedSize = -1; - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) { - return size; - } - - size = 0; - final boolean isMessageSet = - getDescriptorForType().getOptions().getMessageSetWireFormat(); - - for (final Map.Entry entry : - getAllFields().entrySet()) { - final FieldDescriptor field = entry.getKey(); - final Object value = entry.getValue(); - if (isMessageSet && field.isExtension() && - field.getType() == FieldDescriptor.Type.MESSAGE && - !field.isRepeated()) { - size += CodedOutputStream.computeMessageSetExtensionSize( - field.getNumber(), (Message) value); - } else { - size += FieldSet.computeFieldSize(field, value); - } - } - - final UnknownFieldSet unknownFields = getUnknownFields(); - if (isMessageSet) { - size += unknownFields.getSerializedSizeAsMessageSet(); - } else { - size += unknownFields.getSerializedSize(); - } - - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object other) { - if (other == this) { - return true; - } - if (!(other instanceof Message)) { - return false; - } - final Message otherMessage = (Message) other; - if (getDescriptorForType() != otherMessage.getDescriptorForType()) { - return false; - } - return getAllFields().equals(otherMessage.getAllFields()) && - getUnknownFields().equals(otherMessage.getUnknownFields()); - } - - @Override - public int hashCode() { - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = hashFields(hash, getAllFields()); - hash = (29 * hash) + getUnknownFields().hashCode(); - return hash; - } - - /** Get a hash code for given fields and values, using the given seed. */ - @SuppressWarnings("unchecked") - protected int hashFields(int hash, Map map) { - for (Map.Entry entry : map.entrySet()) { - FieldDescriptor field = entry.getKey(); - Object value = entry.getValue(); - hash = (37 * hash) + field.getNumber(); - if (field.getType() != FieldDescriptor.Type.ENUM){ - hash = (53 * hash) + value.hashCode(); - } else if (field.isRepeated()) { - List list = (List) value; - hash = (53 * hash) + hashEnumList(list); - } else { - hash = (53 * hash) + hashEnum((EnumLite) value); - } - } - return hash; - } - - /** - * Helper method for implementing {@link Message#hashCode()}. - * @see Boolean#hashCode() - */ - protected static int hashLong(long n) { - return (int) (n ^ (n >>> 32)); - } - - /** - * Helper method for implementing {@link Message#hashCode()}. - * @see Boolean#hashCode() - */ - protected static int hashBoolean(boolean b) { - return b ? 1231 : 1237; - } - - /** - * Helper method for implementing {@link Message#hashCode()}. - *

- * This is needed because {@link java.lang.Enum#hashCode()} is final, but we - * need to use the field number as the hash code to ensure compatibility - * between statically and dynamically generated enum objects. - */ - protected static int hashEnum(EnumLite e) { - return e.getNumber(); - } - - /** Helper method for implementing {@link Message#hashCode()}. */ - protected static int hashEnumList(List list) { - int hash = 1; - for (EnumLite e : list) { - hash = 31 * hash + hashEnum(e); - } - return hash; - } - - // ================================================================= - - /** - * A partial implementation of the {@link Message.Builder} interface which - * implements as many methods of that interface as possible in terms of - * other methods. - */ - @SuppressWarnings("unchecked") - public static abstract class Builder - extends AbstractMessageLite.Builder - implements Message.Builder { - // The compiler produces an error if this is not declared explicitly. - @Override - public abstract BuilderType clone(); - - public BuilderType clear() { - for (final Map.Entry entry : - getAllFields().entrySet()) { - clearField(entry.getKey()); - } - return (BuilderType) this; - } - - public BuilderType mergeFrom(final Message other) { - if (other.getDescriptorForType() != getDescriptorForType()) { - throw new IllegalArgumentException( - "mergeFrom(Message) can only merge messages of the same type."); - } - - // Note: We don't attempt to verify that other's fields have valid - // types. Doing so would be a losing battle. We'd have to verify - // all sub-messages as well, and we'd have to make copies of all of - // them to insure that they don't change after verification (since - // the Message interface itself cannot enforce immutability of - // implementations). - // TODO(kenton): Provide a function somewhere called makeDeepCopy() - // which allows people to make secure deep copies of messages. - - for (final Map.Entry entry : - other.getAllFields().entrySet()) { - final FieldDescriptor field = entry.getKey(); - if (field.isRepeated()) { - for (final Object element : (List)entry.getValue()) { - addRepeatedField(field, element); - } - } else if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - final Message existingValue = (Message)getField(field); - if (existingValue == existingValue.getDefaultInstanceForType()) { - setField(field, entry.getValue()); - } else { - setField(field, - existingValue.newBuilderForType() - .mergeFrom(existingValue) - .mergeFrom((Message)entry.getValue()) - .build()); - } - } else { - setField(field, entry.getValue()); - } - } - - mergeUnknownFields(other.getUnknownFields()); - - return (BuilderType) this; - } - - @Override - public BuilderType mergeFrom(final CodedInputStream input) - throws IOException { - return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); - } - - @Override - public BuilderType mergeFrom( - final CodedInputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - final UnknownFieldSet.Builder unknownFields = - UnknownFieldSet.newBuilder(getUnknownFields()); - while (true) { - final int tag = input.readTag(); - if (tag == 0) { - break; - } - - if (!mergeFieldFrom(input, unknownFields, extensionRegistry, - this, tag)) { - // end group tag - break; - } - } - setUnknownFields(unknownFields.build()); - return (BuilderType) this; - } - - /** - * Like {@link #mergeFrom(CodedInputStream, UnknownFieldSet.Builder, - * ExtensionRegistryLite, Message.Builder)}, but parses a single field. - * Package-private because it is used by GeneratedMessage.ExtendableMessage. - * @param tag The tag, which should have already been read. - * @return {@code true} unless the tag is an end-group tag. - */ - static boolean mergeFieldFrom( - final CodedInputStream input, - final UnknownFieldSet.Builder unknownFields, - final ExtensionRegistryLite extensionRegistry, - final Message.Builder builder, - final int tag) throws IOException { - final Descriptor type = builder.getDescriptorForType(); - - if (type.getOptions().getMessageSetWireFormat() && - tag == WireFormat.MESSAGE_SET_ITEM_TAG) { - mergeMessageSetExtensionFromCodedStream( - input, unknownFields, extensionRegistry, builder); - return true; - } - - final int wireType = WireFormat.getTagWireType(tag); - final int fieldNumber = WireFormat.getTagFieldNumber(tag); - - final FieldDescriptor field; - Message defaultInstance = null; - - if (type.isExtensionNumber(fieldNumber)) { - // extensionRegistry may be either ExtensionRegistry or - // ExtensionRegistryLite. Since the type we are parsing is a full - // message, only a full ExtensionRegistry could possibly contain - // extensions of it. Otherwise we will treat the registry as if it - // were empty. - if (extensionRegistry instanceof ExtensionRegistry) { - final ExtensionRegistry.ExtensionInfo extension = - ((ExtensionRegistry) extensionRegistry) - .findExtensionByNumber(type, fieldNumber); - if (extension == null) { - field = null; - } else { - field = extension.descriptor; - defaultInstance = extension.defaultInstance; - if (defaultInstance == null && - field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - throw new IllegalStateException( - "Message-typed extension lacked default instance: " + - field.getFullName()); - } - } - } else { - field = null; - } - } else { - field = type.findFieldByNumber(fieldNumber); - } - - boolean unknown = false; - boolean packed = false; - if (field == null) { - unknown = true; // Unknown field. - } else if (wireType == FieldSet.getWireFormatForFieldType( - field.getLiteType(), - false /* isPacked */)) { - packed = false; - } else if (field.isPackable() && - wireType == FieldSet.getWireFormatForFieldType( - field.getLiteType(), - true /* isPacked */)) { - packed = true; - } else { - unknown = true; // Unknown wire type. - } - - if (unknown) { // Unknown field or wrong wire type. Skip. - return unknownFields.mergeFieldFrom(tag, input); - } - - if (packed) { - final int length = input.readRawVarint32(); - final int limit = input.pushLimit(length); - if (field.getLiteType() == WireFormat.FieldType.ENUM) { - while (input.getBytesUntilLimit() > 0) { - final int rawValue = input.readEnum(); - final Object value = field.getEnumType().findValueByNumber(rawValue); - if (value == null) { - // If the number isn't recognized as a valid value for this - // enum, drop it (don't even add it to unknownFields). - return true; - } - builder.addRepeatedField(field, value); - } - } else { - while (input.getBytesUntilLimit() > 0) { - final Object value = - FieldSet.readPrimitiveField(input, field.getLiteType()); - builder.addRepeatedField(field, value); - } - } - input.popLimit(limit); - } else { - final Object value; - switch (field.getType()) { - case GROUP: { - final Message.Builder subBuilder; - if (defaultInstance != null) { - subBuilder = defaultInstance.newBuilderForType(); - } else { - subBuilder = builder.newBuilderForField(field); - } - if (!field.isRepeated()) { - subBuilder.mergeFrom((Message) builder.getField(field)); - } - input.readGroup(field.getNumber(), subBuilder, extensionRegistry); - value = subBuilder.build(); - break; - } - case MESSAGE: { - final Message.Builder subBuilder; - if (defaultInstance != null) { - subBuilder = defaultInstance.newBuilderForType(); - } else { - subBuilder = builder.newBuilderForField(field); - } - if (!field.isRepeated()) { - subBuilder.mergeFrom((Message) builder.getField(field)); - } - input.readMessage(subBuilder, extensionRegistry); - value = subBuilder.build(); - break; - } - case ENUM: - final int rawValue = input.readEnum(); - value = field.getEnumType().findValueByNumber(rawValue); - // If the number isn't recognized as a valid value for this enum, - // drop it. - if (value == null) { - unknownFields.mergeVarintField(fieldNumber, rawValue); - return true; - } - break; - default: - value = FieldSet.readPrimitiveField(input, field.getLiteType()); - break; - } - - if (field.isRepeated()) { - builder.addRepeatedField(field, value); - } else { - builder.setField(field, value); - } - } - - return true; - } - - /** Called by {@code #mergeFieldFrom()} to parse a MessageSet extension. */ - private static void mergeMessageSetExtensionFromCodedStream( - final CodedInputStream input, - final UnknownFieldSet.Builder unknownFields, - final ExtensionRegistryLite extensionRegistry, - final Message.Builder builder) throws IOException { - final Descriptor type = builder.getDescriptorForType(); - - // The wire format for MessageSet is: - // message MessageSet { - // repeated group Item = 1 { - // required int32 typeId = 2; - // required bytes message = 3; - // } - // } - // "typeId" is the extension's field number. The extension can only be - // a message type, where "message" contains the encoded bytes of that - // message. - // - // In practice, we will probably never see a MessageSet item in which - // the message appears before the type ID, or where either field does not - // appear exactly once. However, in theory such cases are valid, so we - // should be prepared to accept them. - - int typeId = 0; - ByteString rawBytes = null; // If we encounter "message" before "typeId" - Message.Builder subBuilder = null; - FieldDescriptor field = null; - - while (true) { - final int tag = input.readTag(); - if (tag == 0) { - break; - } - - if (tag == WireFormat.MESSAGE_SET_TYPE_ID_TAG) { - typeId = input.readUInt32(); - // Zero is not a valid type ID. - if (typeId != 0) { - final ExtensionRegistry.ExtensionInfo extension; - - // extensionRegistry may be either ExtensionRegistry or - // ExtensionRegistryLite. Since the type we are parsing is a full - // message, only a full ExtensionRegistry could possibly contain - // extensions of it. Otherwise we will treat the registry as if it - // were empty. - if (extensionRegistry instanceof ExtensionRegistry) { - extension = ((ExtensionRegistry) extensionRegistry) - .findExtensionByNumber(type, typeId); - } else { - extension = null; - } - - if (extension != null) { - field = extension.descriptor; - subBuilder = extension.defaultInstance.newBuilderForType(); - final Message originalMessage = (Message)builder.getField(field); - if (originalMessage != null) { - subBuilder.mergeFrom(originalMessage); - } - if (rawBytes != null) { - // We already encountered the message. Parse it now. - subBuilder.mergeFrom( - CodedInputStream.newInstance(rawBytes.newInput())); - rawBytes = null; - } - } else { - // Unknown extension number. If we already saw data, put it - // in rawBytes. - if (rawBytes != null) { - unknownFields.mergeField(typeId, - UnknownFieldSet.Field.newBuilder() - .addLengthDelimited(rawBytes) - .build()); - rawBytes = null; - } - } - } - } else if (tag == WireFormat.MESSAGE_SET_MESSAGE_TAG) { - if (typeId == 0) { - // We haven't seen a type ID yet, so we have to store the raw bytes - // for now. - rawBytes = input.readBytes(); - } else if (subBuilder == null) { - // We don't know how to parse this. Ignore it. - unknownFields.mergeField(typeId, - UnknownFieldSet.Field.newBuilder() - .addLengthDelimited(input.readBytes()) - .build()); - } else { - // We already know the type, so we can parse directly from the input - // with no copying. Hooray! - input.readMessage(subBuilder, extensionRegistry); - } - } else { - // Unknown tag. Skip it. - if (!input.skipField(tag)) { - break; // end of group - } - } - } - - input.checkLastTagWas(WireFormat.MESSAGE_SET_ITEM_END_TAG); - - if (subBuilder != null) { - builder.setField(field, subBuilder.build()); - } - } - - public BuilderType mergeUnknownFields(final UnknownFieldSet unknownFields) { - setUnknownFields( - UnknownFieldSet.newBuilder(getUnknownFields()) - .mergeFrom(unknownFields) - .build()); - return (BuilderType) this; - } - - /** - * Construct an UninitializedMessageException reporting missing fields in - * the given message. - */ - protected static UninitializedMessageException - newUninitializedMessageException(Message message) { - return new UninitializedMessageException(findMissingFields(message)); - } - - /** - * Populates {@code this.missingFields} with the full "path" of each - * missing required field in the given message. - */ - private static List findMissingFields(final Message message) { - final List results = new ArrayList(); - findMissingFields(message, "", results); - return results; - } - - /** Recursive helper implementing {@link #findMissingFields(Message)}. */ - private static void findMissingFields(final Message message, - final String prefix, - final List results) { - for (final FieldDescriptor field : - message.getDescriptorForType().getFields()) { - if (field.isRequired() && !message.hasField(field)) { - results.add(prefix + field.getName()); - } - } - - for (final Map.Entry entry : - message.getAllFields().entrySet()) { - final FieldDescriptor field = entry.getKey(); - final Object value = entry.getValue(); - - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (field.isRepeated()) { - int i = 0; - for (final Object element : (List) value) { - findMissingFields((Message) element, - subMessagePrefix(prefix, field, i++), - results); - } - } else { - if (message.hasField(field)) { - findMissingFields((Message) value, - subMessagePrefix(prefix, field, -1), - results); - } - } - } - } - } - - private static String subMessagePrefix(final String prefix, - final FieldDescriptor field, - final int index) { - final StringBuilder result = new StringBuilder(prefix); - if (field.isExtension()) { - result.append('(') - .append(field.getFullName()) - .append(')'); - } else { - result.append(field.getName()); - } - if (index != -1) { - result.append('[') - .append(index) - .append(']'); - } - result.append('.'); - return result.toString(); - } - - // =============================================================== - // The following definitions seem to be required in order to make javac - // not produce weird errors like: - // - // java/com/google/protobuf/DynamicMessage.java:203: types - // com.google.protobuf.AbstractMessage.Builder< - // com.google.protobuf.DynamicMessage.Builder> and - // com.google.protobuf.AbstractMessage.Builder< - // com.google.protobuf.DynamicMessage.Builder> are incompatible; both - // define mergeFrom(com.google.protobuf.ByteString), but with unrelated - // return types. - // - // Strangely, these lines are only needed if javac is invoked separately - // on AbstractMessage.java and AbstractMessageLite.java. If javac is - // invoked on both simultaneously, it works. (Or maybe the important - // point is whether or not DynamicMessage.java is compiled together with - // AbstractMessageLite.java -- not sure.) I suspect this is a compiler - // bug. - - @Override - public BuilderType mergeFrom(final ByteString data) - throws InvalidProtocolBufferException { - return super.mergeFrom(data); - } - - @Override - public BuilderType mergeFrom( - final ByteString data, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - return super.mergeFrom(data, extensionRegistry); - } - - @Override - public BuilderType mergeFrom(final byte[] data) - throws InvalidProtocolBufferException { - return super.mergeFrom(data); - } - - @Override - public BuilderType mergeFrom( - final byte[] data, final int off, final int len) - throws InvalidProtocolBufferException { - return super.mergeFrom(data, off, len); - } - - @Override - public BuilderType mergeFrom( - final byte[] data, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - return super.mergeFrom(data, extensionRegistry); - } - - @Override - public BuilderType mergeFrom( - final byte[] data, final int off, final int len, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - return super.mergeFrom(data, off, len, extensionRegistry); - } - - @Override - public BuilderType mergeFrom(final InputStream input) - throws IOException { - return super.mergeFrom(input); - } - - @Override - public BuilderType mergeFrom( - final InputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - return super.mergeFrom(input, extensionRegistry); - } - - @Override - public boolean mergeDelimitedFrom(final InputStream input) - throws IOException { - return super.mergeDelimitedFrom(input); - } - - @Override - public boolean mergeDelimitedFrom( - final InputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - return super.mergeDelimitedFrom(input, extensionRegistry); - } - - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java deleted file mode 100644 index 77b27370..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java +++ /dev/null @@ -1,325 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.FilterInputStream; -import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Collection; - -/** - * A partial implementation of the {@link MessageLite} interface which - * implements as many methods of that interface as possible in terms of other - * methods. - * - * @author kenton@google.com Kenton Varda - */ -public abstract class AbstractMessageLite implements MessageLite { - public ByteString toByteString() { - try { - final ByteString.CodedBuilder out = - ByteString.newCodedBuilder(getSerializedSize()); - writeTo(out.getCodedOutput()); - return out.build(); - } catch (IOException e) { - throw new RuntimeException( - "Serializing to a ByteString threw an IOException (should " + - "never happen).", e); - } - } - - public byte[] toByteArray() { - try { - final byte[] result = new byte[getSerializedSize()]; - final CodedOutputStream output = CodedOutputStream.newInstance(result); - writeTo(output); - output.checkNoSpaceLeft(); - return result; - } catch (IOException e) { - throw new RuntimeException( - "Serializing to a byte array threw an IOException " + - "(should never happen).", e); - } - } - - public void writeTo(final OutputStream output) throws IOException { - final int bufferSize = - CodedOutputStream.computePreferredBufferSize(getSerializedSize()); - final CodedOutputStream codedOutput = - CodedOutputStream.newInstance(output, bufferSize); - writeTo(codedOutput); - codedOutput.flush(); - } - - public void writeDelimitedTo(final OutputStream output) throws IOException { - final int serialized = getSerializedSize(); - final int bufferSize = CodedOutputStream.computePreferredBufferSize( - CodedOutputStream.computeRawVarint32Size(serialized) + serialized); - final CodedOutputStream codedOutput = - CodedOutputStream.newInstance(output, bufferSize); - codedOutput.writeRawVarint32(serialized); - writeTo(codedOutput); - codedOutput.flush(); - } - - /** - * A partial implementation of the {@link Message.Builder} interface which - * implements as many methods of that interface as possible in terms of - * other methods. - */ - @SuppressWarnings("unchecked") - public static abstract class Builder - implements MessageLite.Builder { - // The compiler produces an error if this is not declared explicitly. - @Override - public abstract BuilderType clone(); - - public BuilderType mergeFrom(final CodedInputStream input) - throws IOException { - return mergeFrom(input, ExtensionRegistryLite.getEmptyRegistry()); - } - - // Re-defined here for return type covariance. - public abstract BuilderType mergeFrom( - final CodedInputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException; - - public BuilderType mergeFrom(final ByteString data) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = data.newCodedInput(); - mergeFrom(input); - input.checkLastTagWas(0); - return (BuilderType) this; - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "Reading from a ByteString threw an IOException (should " + - "never happen).", e); - } - } - - public BuilderType mergeFrom( - final ByteString data, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = data.newCodedInput(); - mergeFrom(input, extensionRegistry); - input.checkLastTagWas(0); - return (BuilderType) this; - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "Reading from a ByteString threw an IOException (should " + - "never happen).", e); - } - } - - public BuilderType mergeFrom(final byte[] data) - throws InvalidProtocolBufferException { - return mergeFrom(data, 0, data.length); - } - - public BuilderType mergeFrom(final byte[] data, final int off, - final int len) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = - CodedInputStream.newInstance(data, off, len); - mergeFrom(input); - input.checkLastTagWas(0); - return (BuilderType) this; - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "Reading from a byte array threw an IOException (should " + - "never happen).", e); - } - } - - public BuilderType mergeFrom( - final byte[] data, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - return mergeFrom(data, 0, data.length, extensionRegistry); - } - - public BuilderType mergeFrom( - final byte[] data, final int off, final int len, - final ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = - CodedInputStream.newInstance(data, off, len); - mergeFrom(input, extensionRegistry); - input.checkLastTagWas(0); - return (BuilderType) this; - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "Reading from a byte array threw an IOException (should " + - "never happen).", e); - } - } - - public BuilderType mergeFrom(final InputStream input) throws IOException { - final CodedInputStream codedInput = CodedInputStream.newInstance(input); - mergeFrom(codedInput); - codedInput.checkLastTagWas(0); - return (BuilderType) this; - } - - public BuilderType mergeFrom( - final InputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - final CodedInputStream codedInput = CodedInputStream.newInstance(input); - mergeFrom(codedInput, extensionRegistry); - codedInput.checkLastTagWas(0); - return (BuilderType) this; - } - - /** - * An InputStream implementations which reads from some other InputStream - * but is limited to a particular number of bytes. Used by - * mergeDelimitedFrom(). This is intentionally package-private so that - * UnknownFieldSet can share it. - */ - static final class LimitedInputStream extends FilterInputStream { - private int limit; - - LimitedInputStream(InputStream in, int limit) { - super(in); - this.limit = limit; - } - - @Override - public int available() throws IOException { - return Math.min(super.available(), limit); - } - - @Override - public int read() throws IOException { - if (limit <= 0) { - return -1; - } - final int result = super.read(); - if (result >= 0) { - --limit; - } - return result; - } - - @Override - public int read(final byte[] b, final int off, int len) - throws IOException { - if (limit <= 0) { - return -1; - } - len = Math.min(len, limit); - final int result = super.read(b, off, len); - if (result >= 0) { - limit -= result; - } - return result; - } - - @Override - public long skip(final long n) throws IOException { - final long result = super.skip(Math.min(n, limit)); - if (result >= 0) { - limit -= result; - } - return result; - } - } - - public boolean mergeDelimitedFrom( - final InputStream input, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - final int firstByte = input.read(); - if (firstByte == -1) { - return false; - } - final int size = CodedInputStream.readRawVarint32(firstByte, input); - final InputStream limitedInput = new LimitedInputStream(input, size); - mergeFrom(limitedInput, extensionRegistry); - return true; - } - - public boolean mergeDelimitedFrom(final InputStream input) - throws IOException { - return mergeDelimitedFrom(input, - ExtensionRegistryLite.getEmptyRegistry()); - } - - /** - * Construct an UninitializedMessageException reporting missing fields in - * the given message. - */ - protected static UninitializedMessageException - newUninitializedMessageException(MessageLite message) { - return new UninitializedMessageException(message); - } - - /** - * Adds the {@code values} to the {@code list}. This is a helper method - * used by generated code. Users should ignore it. - * - * @throws NullPointerException if any of the elements of {@code values} is - * null. - */ - protected static void addAll(final Iterable values, - final Collection list) { - for (final T value : values) { - if (value == null) { - throw new NullPointerException(); - } - } - if (values instanceof Collection) { - final Collection collection = (Collection) values; - list.addAll(collection); - } else { - for (final T value : values) { - list.add(value); - } - } - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java deleted file mode 100644 index 1e81143a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java +++ /dev/null @@ -1,51 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - *

Abstract interface for a blocking RPC channel. {@code BlockingRpcChannel} - * is the blocking equivalent to {@link RpcChannel}. - * - * @author kenton@google.com Kenton Varda - * @author cpovirk@google.com Chris Povirk - */ -public interface BlockingRpcChannel { - /** - * Call the given method of the remote service and blocks until it returns. - * {@code callBlockingMethod()} is the blocking equivalent to - * {@link RpcChannel#callMethod}. - */ - Message callBlockingMethod( - Descriptors.MethodDescriptor method, - RpcController controller, - Message request, - Message responsePrototype) throws ServiceException; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java deleted file mode 100644 index ecc80096..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java +++ /dev/null @@ -1,64 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Blocking equivalent to {@link Service}. - * - * @author kenton@google.com Kenton Varda - * @author cpovirk@google.com Chris Povirk - */ -public interface BlockingService { - /** - * Equivalent to {@link Service#getDescriptorForType}. - */ - Descriptors.ServiceDescriptor getDescriptorForType(); - - /** - * Equivalent to {@link Service#callMethod}, except that - * {@code callBlockingMethod()} returns the result of the RPC or throws a - * {@link ServiceException} if there is a failure, rather than passing the - * information to a callback. - */ - Message callBlockingMethod(Descriptors.MethodDescriptor method, - RpcController controller, - Message request) throws ServiceException; - - /** - * Equivalent to {@link Service#getRequestPrototype}. - */ - Message getRequestPrototype(Descriptors.MethodDescriptor method); - - /** - * Equivalent to {@link Service#getResponsePrototype}. - */ - Message getResponsePrototype(Descriptors.MethodDescriptor method); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ByteString.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ByteString.java deleted file mode 100644 index 91356357..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ByteString.java +++ /dev/null @@ -1,403 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FilterOutputStream; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.util.List; - -/** - * Immutable array of bytes. - * - * @author crazybob@google.com Bob Lee - * @author kenton@google.com Kenton Varda - */ -public final class ByteString { - private final byte[] bytes; - - private ByteString(final byte[] bytes) { - this.bytes = bytes; - } - - /** - * Gets the byte at the given index. - * - * @throws ArrayIndexOutOfBoundsException {@code index} is < 0 or >= size - */ - public byte byteAt(final int index) { - return bytes[index]; - } - - /** - * Gets the number of bytes. - */ - public int size() { - return bytes.length; - } - - /** - * Returns {@code true} if the size is {@code 0}, {@code false} otherwise. - */ - public boolean isEmpty() { - return bytes.length == 0; - } - - // ================================================================= - // byte[] -> ByteString - - /** - * Empty ByteString. - */ - public static final ByteString EMPTY = new ByteString(new byte[0]); - - /** - * Copies the given bytes into a {@code ByteString}. - */ - public static ByteString copyFrom(final byte[] bytes, final int offset, - final int size) { - final byte[] copy = new byte[size]; - System.arraycopy(bytes, offset, copy, 0, size); - return new ByteString(copy); - } - - /** - * Copies the given bytes into a {@code ByteString}. - */ - public static ByteString copyFrom(final byte[] bytes) { - return copyFrom(bytes, 0, bytes.length); - } - - /** - * Copies {@code size} bytes from a {@code java.nio.ByteBuffer} into - * a {@code ByteString}. - */ - public static ByteString copyFrom(final ByteBuffer bytes, final int size) { - final byte[] copy = new byte[size]; - bytes.get(copy); - return new ByteString(copy); - } - - /** - * Copies the remaining bytes from a {@code java.nio.ByteBuffer} into - * a {@code ByteString}. - */ - public static ByteString copyFrom(final ByteBuffer bytes) { - return copyFrom(bytes, bytes.remaining()); - } - - /** - * Encodes {@code text} into a sequence of bytes using the named charset - * and returns the result as a {@code ByteString}. - */ - public static ByteString copyFrom(final String text, final String charsetName) - throws UnsupportedEncodingException { - return new ByteString(text.getBytes(charsetName)); - } - - /** - * Encodes {@code text} into a sequence of UTF-8 bytes and returns the - * result as a {@code ByteString}. - */ - public static ByteString copyFromUtf8(final String text) { - try { - return new ByteString(text.getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("UTF-8 not supported?", e); - } - } - - /** - * Concatenates all byte strings in the list and returns the result. - * - *

The returned {@code ByteString} is not necessarily a unique object. - * If the list is empty, the returned object is the singleton empty - * {@code ByteString}. If the list has only one element, that - * {@code ByteString} will be returned without copying. - */ - public static ByteString copyFrom(List list) { - if (list.size() == 0) { - return EMPTY; - } else if (list.size() == 1) { - return list.get(0); - } - - int size = 0; - for (ByteString str : list) { - size += str.size(); - } - byte[] bytes = new byte[size]; - int pos = 0; - for (ByteString str : list) { - System.arraycopy(str.bytes, 0, bytes, pos, str.size()); - pos += str.size(); - } - return new ByteString(bytes); - } - - // ================================================================= - // ByteString -> byte[] - - /** - * Copies bytes into a buffer at the given offset. - * - * @param target buffer to copy into - * @param offset in the target buffer - */ - public void copyTo(final byte[] target, final int offset) { - System.arraycopy(bytes, 0, target, offset, bytes.length); - } - - /** - * Copies bytes into a buffer. - * - * @param target buffer to copy into - * @param sourceOffset offset within these bytes - * @param targetOffset offset within the target buffer - * @param size number of bytes to copy - */ - public void copyTo(final byte[] target, final int sourceOffset, - final int targetOffset, - final int size) { - System.arraycopy(bytes, sourceOffset, target, targetOffset, size); - } - - /** - * Copies bytes into a ByteBuffer. - * - * @param target ByteBuffer to copy into. - * @throws ReadOnlyBufferException if the {@code target} is read-only - * @throws BufferOverflowException if the {@code target}'s remaining() - * space is not large enough to hold the data. - */ - public void copyTo(ByteBuffer target) { - target.put(bytes, 0, bytes.length); - } - - /** - * Copies bytes to a {@code byte[]}. - */ - public byte[] toByteArray() { - final int size = bytes.length; - final byte[] copy = new byte[size]; - System.arraycopy(bytes, 0, copy, 0, size); - return copy; - } - - /** - * Constructs a new read-only {@code java.nio.ByteBuffer} with the - * same backing byte array. - */ - public ByteBuffer asReadOnlyByteBuffer() { - final ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); - return byteBuffer.asReadOnlyBuffer(); - } - - /** - * Constructs a new {@code String} by decoding the bytes using the - * specified charset. - */ - public String toString(final String charsetName) - throws UnsupportedEncodingException { - return new String(bytes, charsetName); - } - - /** - * Constructs a new {@code String} by decoding the bytes as UTF-8. - */ - public String toStringUtf8() { - try { - return new String(bytes, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("UTF-8 not supported?", e); - } - } - - // ================================================================= - // equals() and hashCode() - - @Override - public boolean equals(final Object o) { - if (o == this) { - return true; - } - - if (!(o instanceof ByteString)) { - return false; - } - - final ByteString other = (ByteString) o; - final int size = bytes.length; - if (size != other.bytes.length) { - return false; - } - - final byte[] thisBytes = bytes; - final byte[] otherBytes = other.bytes; - for (int i = 0; i < size; i++) { - if (thisBytes[i] != otherBytes[i]) { - return false; - } - } - - return true; - } - - private volatile int hash = 0; - - @Override - public int hashCode() { - int h = hash; - - if (h == 0) { - final byte[] thisBytes = bytes; - final int size = bytes.length; - - h = size; - for (int i = 0; i < size; i++) { - h = h * 31 + thisBytes[i]; - } - if (h == 0) { - h = 1; - } - - hash = h; - } - - return h; - } - - // ================================================================= - // Input stream - - /** - * Creates an {@code InputStream} which can be used to read the bytes. - */ - public InputStream newInput() { - return new ByteArrayInputStream(bytes); - } - - /** - * Creates a {@link CodedInputStream} which can be used to read the bytes. - * Using this is more efficient than creating a {@link CodedInputStream} - * wrapping the result of {@link #newInput()}. - */ - public CodedInputStream newCodedInput() { - // We trust CodedInputStream not to modify the bytes, or to give anyone - // else access to them. - return CodedInputStream.newInstance(bytes); - } - - // ================================================================= - // Output stream - - /** - * Creates a new {@link Output} with the given initial capacity. - */ - public static Output newOutput(final int initialCapacity) { - return new Output(new ByteArrayOutputStream(initialCapacity)); - } - - /** - * Creates a new {@link Output}. - */ - public static Output newOutput() { - return newOutput(32); - } - - /** - * Outputs to a {@code ByteString} instance. Call {@link #toByteString()} to - * create the {@code ByteString} instance. - */ - public static final class Output extends FilterOutputStream { - private final ByteArrayOutputStream bout; - - /** - * Constructs a new output with the given initial capacity. - */ - private Output(final ByteArrayOutputStream bout) { - super(bout); - this.bout = bout; - } - - /** - * Creates a {@code ByteString} instance from this {@code Output}. - */ - public ByteString toByteString() { - final byte[] byteArray = bout.toByteArray(); - return new ByteString(byteArray); - } - } - - /** - * Constructs a new ByteString builder, which allows you to efficiently - * construct a {@code ByteString} by writing to a {@link CodedOutputStream}. - * Using this is much more efficient than calling {@code newOutput()} and - * wrapping that in a {@code CodedOutputStream}. - * - *

This is package-private because it's a somewhat confusing interface. - * Users can call {@link Message#toByteString()} instead of calling this - * directly. - * - * @param size The target byte size of the {@code ByteString}. You must - * write exactly this many bytes before building the result. - */ - static CodedBuilder newCodedBuilder(final int size) { - return new CodedBuilder(size); - } - - /** See {@link ByteString#newCodedBuilder(int)}. */ - static final class CodedBuilder { - private final CodedOutputStream output; - private final byte[] buffer; - - private CodedBuilder(final int size) { - buffer = new byte[size]; - output = CodedOutputStream.newInstance(buffer); - } - - public ByteString build() { - output.checkNoSpaceLeft(); - - // We can be confident that the CodedOutputStream will not modify the - // underlying bytes anymore because it already wrote all of them. So, - // no need to make a copy. - return new ByteString(buffer); - } - - public CodedOutputStream getCodedOutput() { - return output; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java deleted file mode 100644 index b3e08555..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java +++ /dev/null @@ -1,885 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -/** - * Reads and decodes protocol message fields. - * - * This class contains two kinds of methods: methods that read specific - * protocol message constructs and field types (e.g. {@link #readTag()} and - * {@link #readInt32()}) and methods that read low-level values (e.g. - * {@link #readRawVarint32()} and {@link #readRawBytes}). If you are reading - * encoded protocol messages, you should use the former methods, but if you are - * reading some other format of your own design, use the latter. - * - * @author kenton@google.com Kenton Varda - */ -public final class CodedInputStream { - /** - * Create a new CodedInputStream wrapping the given InputStream. - */ - public static CodedInputStream newInstance(final InputStream input) { - return new CodedInputStream(input); - } - - /** - * Create a new CodedInputStream wrapping the given byte array. - */ - public static CodedInputStream newInstance(final byte[] buf) { - return newInstance(buf, 0, buf.length); - } - - /** - * Create a new CodedInputStream wrapping the given byte array slice. - */ - public static CodedInputStream newInstance(final byte[] buf, final int off, - final int len) { - CodedInputStream result = new CodedInputStream(buf, off, len); - try { - // Some uses of CodedInputStream can be more efficient if they know - // exactly how many bytes are available. By pushing the end point of the - // buffer as a limit, we allow them to get this information via - // getBytesUntilLimit(). Pushing a limit that we know is at the end of - // the stream can never hurt, since we can never past that point anyway. - result.pushLimit(len); - } catch (InvalidProtocolBufferException ex) { - // The only reason pushLimit() might throw an exception here is if len - // is negative. Normally pushLimit()'s parameter comes directly off the - // wire, so it's important to catch exceptions in case of corrupt or - // malicious data. However, in this case, we expect that len is not a - // user-supplied value, so we can assume that it being negative indicates - // a programming error. Therefore, throwing an unchecked exception is - // appropriate. - throw new IllegalArgumentException(ex); - } - return result; - } - - // ----------------------------------------------------------------- - - /** - * Attempt to read a field tag, returning zero if we have reached EOF. - * Protocol message parsers use this to read tags, since a protocol message - * may legally end wherever a tag occurs, and zero is not a valid tag number. - */ - public int readTag() throws IOException { - if (isAtEnd()) { - lastTag = 0; - return 0; - } - - lastTag = readRawVarint32(); - if (WireFormat.getTagFieldNumber(lastTag) == 0) { - // If we actually read zero (or any tag number corresponding to field - // number zero), that's not a valid tag. - throw InvalidProtocolBufferException.invalidTag(); - } - return lastTag; - } - - /** - * Verifies that the last call to readTag() returned the given tag value. - * This is used to verify that a nested group ended with the correct - * end tag. - * - * @throws InvalidProtocolBufferException {@code value} does not match the - * last tag. - */ - public void checkLastTagWas(final int value) - throws InvalidProtocolBufferException { - if (lastTag != value) { - throw InvalidProtocolBufferException.invalidEndTag(); - } - } - - /** - * Reads and discards a single field, given its tag value. - * - * @return {@code false} if the tag is an endgroup tag, in which case - * nothing is skipped. Otherwise, returns {@code true}. - */ - public boolean skipField(final int tag) throws IOException { - switch (WireFormat.getTagWireType(tag)) { - case WireFormat.WIRETYPE_VARINT: - readInt32(); - return true; - case WireFormat.WIRETYPE_FIXED64: - readRawLittleEndian64(); - return true; - case WireFormat.WIRETYPE_LENGTH_DELIMITED: - skipRawBytes(readRawVarint32()); - return true; - case WireFormat.WIRETYPE_START_GROUP: - skipMessage(); - checkLastTagWas( - WireFormat.makeTag(WireFormat.getTagFieldNumber(tag), - WireFormat.WIRETYPE_END_GROUP)); - return true; - case WireFormat.WIRETYPE_END_GROUP: - return false; - case WireFormat.WIRETYPE_FIXED32: - readRawLittleEndian32(); - return true; - default: - throw InvalidProtocolBufferException.invalidWireType(); - } - } - - /** - * Reads and discards an entire message. This will read either until EOF - * or until an endgroup tag, whichever comes first. - */ - public void skipMessage() throws IOException { - while (true) { - final int tag = readTag(); - if (tag == 0 || !skipField(tag)) { - return; - } - } - } - - // ----------------------------------------------------------------- - - /** Read a {@code double} field value from the stream. */ - public double readDouble() throws IOException { - return Double.longBitsToDouble(readRawLittleEndian64()); - } - - /** Read a {@code float} field value from the stream. */ - public float readFloat() throws IOException { - return Float.intBitsToFloat(readRawLittleEndian32()); - } - - /** Read a {@code uint64} field value from the stream. */ - public long readUInt64() throws IOException { - return readRawVarint64(); - } - - /** Read an {@code int64} field value from the stream. */ - public long readInt64() throws IOException { - return readRawVarint64(); - } - - /** Read an {@code int32} field value from the stream. */ - public int readInt32() throws IOException { - return readRawVarint32(); - } - - /** Read a {@code fixed64} field value from the stream. */ - public long readFixed64() throws IOException { - return readRawLittleEndian64(); - } - - /** Read a {@code fixed32} field value from the stream. */ - public int readFixed32() throws IOException { - return readRawLittleEndian32(); - } - - /** Read a {@code bool} field value from the stream. */ - public boolean readBool() throws IOException { - return readRawVarint32() != 0; - } - - /** Read a {@code string} field value from the stream. */ - public String readString() throws IOException { - final int size = readRawVarint32(); - if (size <= (bufferSize - bufferPos) && size > 0) { - // Fast path: We already have the bytes in a contiguous buffer, so - // just copy directly from it. - final String result = new String(buffer, bufferPos, size, "UTF-8"); - bufferPos += size; - return result; - } else { - // Slow path: Build a byte array first then copy it. - return new String(readRawBytes(size), "UTF-8"); - } - } - - /** Read a {@code group} field value from the stream. */ - public void readGroup(final int fieldNumber, - final MessageLite.Builder builder, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - if (recursionDepth >= recursionLimit) { - throw InvalidProtocolBufferException.recursionLimitExceeded(); - } - ++recursionDepth; - builder.mergeFrom(this, extensionRegistry); - checkLastTagWas( - WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP)); - --recursionDepth; - } - - /** - * Reads a {@code group} field value from the stream and merges it into the - * given {@link UnknownFieldSet}. - * - * @deprecated UnknownFieldSet.Builder now implements MessageLite.Builder, so - * you can just call {@link #readGroup}. - */ - @Deprecated - public void readUnknownGroup(final int fieldNumber, - final MessageLite.Builder builder) - throws IOException { - // We know that UnknownFieldSet will ignore any ExtensionRegistry so it - // is safe to pass null here. (We can't call - // ExtensionRegistry.getEmptyRegistry() because that would make this - // class depend on ExtensionRegistry, which is not part of the lite - // library.) - readGroup(fieldNumber, builder, null); - } - - /** Read an embedded message field value from the stream. */ - public void readMessage(final MessageLite.Builder builder, - final ExtensionRegistryLite extensionRegistry) - throws IOException { - final int length = readRawVarint32(); - if (recursionDepth >= recursionLimit) { - throw InvalidProtocolBufferException.recursionLimitExceeded(); - } - final int oldLimit = pushLimit(length); - ++recursionDepth; - builder.mergeFrom(this, extensionRegistry); - checkLastTagWas(0); - --recursionDepth; - popLimit(oldLimit); - } - - /** Read a {@code bytes} field value from the stream. */ - public ByteString readBytes() throws IOException { - final int size = readRawVarint32(); - if (size == 0) { - return ByteString.EMPTY; - } else if (size <= (bufferSize - bufferPos) && size > 0) { - // Fast path: We already have the bytes in a contiguous buffer, so - // just copy directly from it. - final ByteString result = ByteString.copyFrom(buffer, bufferPos, size); - bufferPos += size; - return result; - } else { - // Slow path: Build a byte array first then copy it. - return ByteString.copyFrom(readRawBytes(size)); - } - } - - /** Read a {@code uint32} field value from the stream. */ - public int readUInt32() throws IOException { - return readRawVarint32(); - } - - /** - * Read an enum field value from the stream. Caller is responsible - * for converting the numeric value to an actual enum. - */ - public int readEnum() throws IOException { - return readRawVarint32(); - } - - /** Read an {@code sfixed32} field value from the stream. */ - public int readSFixed32() throws IOException { - return readRawLittleEndian32(); - } - - /** Read an {@code sfixed64} field value from the stream. */ - public long readSFixed64() throws IOException { - return readRawLittleEndian64(); - } - - /** Read an {@code sint32} field value from the stream. */ - public int readSInt32() throws IOException { - return decodeZigZag32(readRawVarint32()); - } - - /** Read an {@code sint64} field value from the stream. */ - public long readSInt64() throws IOException { - return decodeZigZag64(readRawVarint64()); - } - - // ================================================================= - - /** - * Read a raw Varint from the stream. If larger than 32 bits, discard the - * upper bits. - */ - public int readRawVarint32() throws IOException { - byte tmp = readRawByte(); - if (tmp >= 0) { - return tmp; - } - int result = tmp & 0x7f; - if ((tmp = readRawByte()) >= 0) { - result |= tmp << 7; - } else { - result |= (tmp & 0x7f) << 7; - if ((tmp = readRawByte()) >= 0) { - result |= tmp << 14; - } else { - result |= (tmp & 0x7f) << 14; - if ((tmp = readRawByte()) >= 0) { - result |= tmp << 21; - } else { - result |= (tmp & 0x7f) << 21; - result |= (tmp = readRawByte()) << 28; - if (tmp < 0) { - // Discard upper 32 bits. - for (int i = 0; i < 5; i++) { - if (readRawByte() >= 0) { - return result; - } - } - throw InvalidProtocolBufferException.malformedVarint(); - } - } - } - } - return result; - } - - /** - * Reads a varint from the input one byte at a time, so that it does not - * read any bytes after the end of the varint. If you simply wrapped the - * stream in a CodedInputStream and used {@link #readRawVarint32(InputStream)} - * then you would probably end up reading past the end of the varint since - * CodedInputStream buffers its input. - */ - static int readRawVarint32(final InputStream input) throws IOException { - final int firstByte = input.read(); - if (firstByte == -1) { - throw InvalidProtocolBufferException.truncatedMessage(); - } - return readRawVarint32(firstByte, input); - } - - /** - * Like {@link #readRawVarint32(InputStream)}, but expects that the caller - * has already read one byte. This allows the caller to determine if EOF - * has been reached before attempting to read. - */ - public static int readRawVarint32( - final int firstByte, final InputStream input) throws IOException { - if ((firstByte & 0x80) == 0) { - return firstByte; - } - - int result = firstByte & 0x7f; - int offset = 7; - for (; offset < 32; offset += 7) { - final int b = input.read(); - if (b == -1) { - throw InvalidProtocolBufferException.truncatedMessage(); - } - result |= (b & 0x7f) << offset; - if ((b & 0x80) == 0) { - return result; - } - } - // Keep reading up to 64 bits. - for (; offset < 64; offset += 7) { - final int b = input.read(); - if (b == -1) { - throw InvalidProtocolBufferException.truncatedMessage(); - } - if ((b & 0x80) == 0) { - return result; - } - } - throw InvalidProtocolBufferException.malformedVarint(); - } - - /** Read a raw Varint from the stream. */ - public long readRawVarint64() throws IOException { - int shift = 0; - long result = 0; - while (shift < 64) { - final byte b = readRawByte(); - result |= (long)(b & 0x7F) << shift; - if ((b & 0x80) == 0) { - return result; - } - shift += 7; - } - throw InvalidProtocolBufferException.malformedVarint(); - } - - /** Read a 32-bit little-endian integer from the stream. */ - public int readRawLittleEndian32() throws IOException { - final byte b1 = readRawByte(); - final byte b2 = readRawByte(); - final byte b3 = readRawByte(); - final byte b4 = readRawByte(); - return (((int)b1 & 0xff) ) | - (((int)b2 & 0xff) << 8) | - (((int)b3 & 0xff) << 16) | - (((int)b4 & 0xff) << 24); - } - - /** Read a 64-bit little-endian integer from the stream. */ - public long readRawLittleEndian64() throws IOException { - final byte b1 = readRawByte(); - final byte b2 = readRawByte(); - final byte b3 = readRawByte(); - final byte b4 = readRawByte(); - final byte b5 = readRawByte(); - final byte b6 = readRawByte(); - final byte b7 = readRawByte(); - final byte b8 = readRawByte(); - return (((long)b1 & 0xff) ) | - (((long)b2 & 0xff) << 8) | - (((long)b3 & 0xff) << 16) | - (((long)b4 & 0xff) << 24) | - (((long)b5 & 0xff) << 32) | - (((long)b6 & 0xff) << 40) | - (((long)b7 & 0xff) << 48) | - (((long)b8 & 0xff) << 56); - } - - /** - * Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers - * into values that can be efficiently encoded with varint. (Otherwise, - * negative values must be sign-extended to 64 bits to be varint encoded, - * thus always taking 10 bytes on the wire.) - * - * @param n An unsigned 32-bit integer, stored in a signed int because - * Java has no explicit unsigned support. - * @return A signed 32-bit integer. - */ - public static int decodeZigZag32(final int n) { - return (n >>> 1) ^ -(n & 1); - } - - /** - * Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers - * into values that can be efficiently encoded with varint. (Otherwise, - * negative values must be sign-extended to 64 bits to be varint encoded, - * thus always taking 10 bytes on the wire.) - * - * @param n An unsigned 64-bit integer, stored in a signed int because - * Java has no explicit unsigned support. - * @return A signed 64-bit integer. - */ - public static long decodeZigZag64(final long n) { - return (n >>> 1) ^ -(n & 1); - } - - // ----------------------------------------------------------------- - - private final byte[] buffer; - private int bufferSize; - private int bufferSizeAfterLimit; - private int bufferPos; - private final InputStream input; - private int lastTag; - - /** - * The total number of bytes read before the current buffer. The total - * bytes read up to the current position can be computed as - * {@code totalBytesRetired + bufferPos}. This value may be negative if - * reading started in the middle of the current buffer (e.g. if the - * constructor that takes a byte array and an offset was used). - */ - private int totalBytesRetired; - - /** The absolute position of the end of the current message. */ - private int currentLimit = Integer.MAX_VALUE; - - /** See setRecursionLimit() */ - private int recursionDepth; - private int recursionLimit = DEFAULT_RECURSION_LIMIT; - - /** See setSizeLimit() */ - private int sizeLimit = DEFAULT_SIZE_LIMIT; - - private static final int DEFAULT_RECURSION_LIMIT = 64; - private static final int DEFAULT_SIZE_LIMIT = 64 << 20; // 64MB - private static final int BUFFER_SIZE = 4096; - - private CodedInputStream(final byte[] buffer, final int off, final int len) { - this.buffer = buffer; - bufferSize = off + len; - bufferPos = off; - totalBytesRetired = -off; - input = null; - } - - private CodedInputStream(final InputStream input) { - buffer = new byte[BUFFER_SIZE]; - bufferSize = 0; - bufferPos = 0; - totalBytesRetired = 0; - this.input = input; - } - - /** - * Set the maximum message recursion depth. In order to prevent malicious - * messages from causing stack overflows, {@code CodedInputStream} limits - * how deeply messages may be nested. The default limit is 64. - * - * @return the old limit. - */ - public int setRecursionLimit(final int limit) { - if (limit < 0) { - throw new IllegalArgumentException( - "Recursion limit cannot be negative: " + limit); - } - final int oldLimit = recursionLimit; - recursionLimit = limit; - return oldLimit; - } - - /** - * Set the maximum message size. In order to prevent malicious - * messages from exhausting memory or causing integer overflows, - * {@code CodedInputStream} limits how large a message may be. - * The default limit is 64MB. You should set this limit as small - * as you can without harming your app's functionality. Note that - * size limits only apply when reading from an {@code InputStream}, not - * when constructed around a raw byte array (nor with - * {@link ByteString#newCodedInput}). - *

- * If you want to read several messages from a single CodedInputStream, you - * could call {@link #resetSizeCounter()} after each one to avoid hitting the - * size limit. - * - * @return the old limit. - */ - public int setSizeLimit(final int limit) { - if (limit < 0) { - throw new IllegalArgumentException( - "Size limit cannot be negative: " + limit); - } - final int oldLimit = sizeLimit; - sizeLimit = limit; - return oldLimit; - } - - /** - * Resets the current size counter to zero (see {@link #setSizeLimit(int)}). - */ - public void resetSizeCounter() { - totalBytesRetired = -bufferPos; - } - - /** - * Sets {@code currentLimit} to (current position) + {@code byteLimit}. This - * is called when descending into a length-delimited embedded message. - * - *

Note that {@code pushLimit()} does NOT affect how many bytes the - * {@code CodedInputStream} reads from an underlying {@code InputStream} when - * refreshing its buffer. If you need to prevent reading past a certain - * point in the underlying {@code InputStream} (e.g. because you expect it to - * contain more data after the end of the message which you need to handle - * differently) then you must place a wrapper around you {@code InputStream} - * which limits the amount of data that can be read from it. - * - * @return the old limit. - */ - public int pushLimit(int byteLimit) throws InvalidProtocolBufferException { - if (byteLimit < 0) { - throw InvalidProtocolBufferException.negativeSize(); - } - byteLimit += totalBytesRetired + bufferPos; - final int oldLimit = currentLimit; - if (byteLimit > oldLimit) { - throw InvalidProtocolBufferException.truncatedMessage(); - } - currentLimit = byteLimit; - - recomputeBufferSizeAfterLimit(); - - return oldLimit; - } - - private void recomputeBufferSizeAfterLimit() { - bufferSize += bufferSizeAfterLimit; - final int bufferEnd = totalBytesRetired + bufferSize; - if (bufferEnd > currentLimit) { - // Limit is in current buffer. - bufferSizeAfterLimit = bufferEnd - currentLimit; - bufferSize -= bufferSizeAfterLimit; - } else { - bufferSizeAfterLimit = 0; - } - } - - /** - * Discards the current limit, returning to the previous limit. - * - * @param oldLimit The old limit, as returned by {@code pushLimit}. - */ - public void popLimit(final int oldLimit) { - currentLimit = oldLimit; - recomputeBufferSizeAfterLimit(); - } - - /** - * Returns the number of bytes to be read before the current limit. - * If no limit is set, returns -1. - */ - public int getBytesUntilLimit() { - if (currentLimit == Integer.MAX_VALUE) { - return -1; - } - - final int currentAbsolutePosition = totalBytesRetired + bufferPos; - return currentLimit - currentAbsolutePosition; - } - - /** - * Returns true if the stream has reached the end of the input. This is the - * case if either the end of the underlying input source has been reached or - * if the stream has reached a limit created using {@link #pushLimit(int)}. - */ - public boolean isAtEnd() throws IOException { - return bufferPos == bufferSize && !refillBuffer(false); - } - - /** - * The total bytes read up to the current position. Calling - * {@link #resetSizeCounter()} resets this value to zero. - */ - public int getTotalBytesRead() { - return totalBytesRetired + bufferPos; - } - - /** - * Called with {@code this.buffer} is empty to read more bytes from the - * input. If {@code mustSucceed} is true, refillBuffer() gurantees that - * either there will be at least one byte in the buffer when it returns - * or it will throw an exception. If {@code mustSucceed} is false, - * refillBuffer() returns false if no more bytes were available. - */ - private boolean refillBuffer(final boolean mustSucceed) throws IOException { - if (bufferPos < bufferSize) { - throw new IllegalStateException( - "refillBuffer() called when buffer wasn't empty."); - } - - if (totalBytesRetired + bufferSize == currentLimit) { - // Oops, we hit a limit. - if (mustSucceed) { - throw InvalidProtocolBufferException.truncatedMessage(); - } else { - return false; - } - } - - totalBytesRetired += bufferSize; - - bufferPos = 0; - bufferSize = (input == null) ? -1 : input.read(buffer); - if (bufferSize == 0 || bufferSize < -1) { - throw new IllegalStateException( - "InputStream#read(byte[]) returned invalid result: " + bufferSize + - "\nThe InputStream implementation is buggy."); - } - if (bufferSize == -1) { - bufferSize = 0; - if (mustSucceed) { - throw InvalidProtocolBufferException.truncatedMessage(); - } else { - return false; - } - } else { - recomputeBufferSizeAfterLimit(); - final int totalBytesRead = - totalBytesRetired + bufferSize + bufferSizeAfterLimit; - if (totalBytesRead > sizeLimit || totalBytesRead < 0) { - throw InvalidProtocolBufferException.sizeLimitExceeded(); - } - return true; - } - } - - /** - * Read one byte from the input. - * - * @throws InvalidProtocolBufferException The end of the stream or the current - * limit was reached. - */ - public byte readRawByte() throws IOException { - if (bufferPos == bufferSize) { - refillBuffer(true); - } - return buffer[bufferPos++]; - } - - /** - * Read a fixed size of bytes from the input. - * - * @throws InvalidProtocolBufferException The end of the stream or the current - * limit was reached. - */ - public byte[] readRawBytes(final int size) throws IOException { - if (size < 0) { - throw InvalidProtocolBufferException.negativeSize(); - } - - if (totalBytesRetired + bufferPos + size > currentLimit) { - // Read to the end of the stream anyway. - skipRawBytes(currentLimit - totalBytesRetired - bufferPos); - // Then fail. - throw InvalidProtocolBufferException.truncatedMessage(); - } - - if (size <= bufferSize - bufferPos) { - // We have all the bytes we need already. - final byte[] bytes = new byte[size]; - System.arraycopy(buffer, bufferPos, bytes, 0, size); - bufferPos += size; - return bytes; - } else if (size < BUFFER_SIZE) { - // Reading more bytes than are in the buffer, but not an excessive number - // of bytes. We can safely allocate the resulting array ahead of time. - - // First copy what we have. - final byte[] bytes = new byte[size]; - int pos = bufferSize - bufferPos; - System.arraycopy(buffer, bufferPos, bytes, 0, pos); - bufferPos = bufferSize; - - // We want to use refillBuffer() and then copy from the buffer into our - // byte array rather than reading directly into our byte array because - // the input may be unbuffered. - refillBuffer(true); - - while (size - pos > bufferSize) { - System.arraycopy(buffer, 0, bytes, pos, bufferSize); - pos += bufferSize; - bufferPos = bufferSize; - refillBuffer(true); - } - - System.arraycopy(buffer, 0, bytes, pos, size - pos); - bufferPos = size - pos; - - return bytes; - } else { - // The size is very large. For security reasons, we can't allocate the - // entire byte array yet. The size comes directly from the input, so a - // maliciously-crafted message could provide a bogus very large size in - // order to trick the app into allocating a lot of memory. We avoid this - // by allocating and reading only a small chunk at a time, so that the - // malicious message must actually *be* extremely large to cause - // problems. Meanwhile, we limit the allowed size of a message elsewhere. - - // Remember the buffer markers since we'll have to copy the bytes out of - // it later. - final int originalBufferPos = bufferPos; - final int originalBufferSize = bufferSize; - - // Mark the current buffer consumed. - totalBytesRetired += bufferSize; - bufferPos = 0; - bufferSize = 0; - - // Read all the rest of the bytes we need. - int sizeLeft = size - (originalBufferSize - originalBufferPos); - final List chunks = new ArrayList(); - - while (sizeLeft > 0) { - final byte[] chunk = new byte[Math.min(sizeLeft, BUFFER_SIZE)]; - int pos = 0; - while (pos < chunk.length) { - final int n = (input == null) ? -1 : - input.read(chunk, pos, chunk.length - pos); - if (n == -1) { - throw InvalidProtocolBufferException.truncatedMessage(); - } - totalBytesRetired += n; - pos += n; - } - sizeLeft -= chunk.length; - chunks.add(chunk); - } - - // OK, got everything. Now concatenate it all into one buffer. - final byte[] bytes = new byte[size]; - - // Start by copying the leftover bytes from this.buffer. - int pos = originalBufferSize - originalBufferPos; - System.arraycopy(buffer, originalBufferPos, bytes, 0, pos); - - // And now all the chunks. - for (final byte[] chunk : chunks) { - System.arraycopy(chunk, 0, bytes, pos, chunk.length); - pos += chunk.length; - } - - // Done. - return bytes; - } - } - - /** - * Reads and discards {@code size} bytes. - * - * @throws InvalidProtocolBufferException The end of the stream or the current - * limit was reached. - */ - public void skipRawBytes(final int size) throws IOException { - if (size < 0) { - throw InvalidProtocolBufferException.negativeSize(); - } - - if (totalBytesRetired + bufferPos + size > currentLimit) { - // Read to the end of the stream anyway. - skipRawBytes(currentLimit - totalBytesRetired - bufferPos); - // Then fail. - throw InvalidProtocolBufferException.truncatedMessage(); - } - - if (size <= bufferSize - bufferPos) { - // We have all the bytes we need already. - bufferPos += size; - } else { - // Skipping more bytes than are in the buffer. First skip what we have. - int pos = bufferSize - bufferPos; - bufferPos = bufferSize; - - // Keep refilling the buffer until we get to the point we wanted to skip - // to. This has the side effect of ensuring the limits are updated - // correctly. - refillBuffer(true); - while (size - pos > bufferSize) { - pos += bufferSize; - bufferPos = bufferSize; - refillBuffer(true); - } - - bufferPos = size - pos; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java deleted file mode 100644 index ac5f2d30..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java +++ /dev/null @@ -1,1081 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.OutputStream; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.io.InputStream; - -/** - * Encodes and writes protocol message fields. - * - *

This class contains two kinds of methods: methods that write specific - * protocol message constructs and field types (e.g. {@link #writeTag} and - * {@link #writeInt32}) and methods that write low-level values (e.g. - * {@link #writeRawVarint32} and {@link #writeRawBytes}). If you are - * writing encoded protocol messages, you should use the former methods, but if - * you are writing some other format of your own design, use the latter. - * - *

This class is totally unsynchronized. - * - * @author kneton@google.com Kenton Varda - */ -public final class CodedOutputStream { - private final byte[] buffer; - private final int limit; - private int position; - - private final OutputStream output; - - /** - * The buffer size used in {@link #newInstance(OutputStream)}. - */ - public static final int DEFAULT_BUFFER_SIZE = 4096; - - /** - * Returns the buffer size to efficiently write dataLength bytes to this - * CodedOutputStream. Used by AbstractMessageLite. - * - * @return the buffer size to efficiently write dataLength bytes to this - * CodedOutputStream. - */ - static int computePreferredBufferSize(int dataLength) { - if (dataLength > DEFAULT_BUFFER_SIZE) return DEFAULT_BUFFER_SIZE; - return dataLength; - } - - private CodedOutputStream(final byte[] buffer, final int offset, - final int length) { - output = null; - this.buffer = buffer; - position = offset; - limit = offset + length; - } - - private CodedOutputStream(final OutputStream output, final byte[] buffer) { - this.output = output; - this.buffer = buffer; - position = 0; - limit = buffer.length; - } - - /** - * Create a new {@code CodedOutputStream} wrapping the given - * {@code OutputStream}. - */ - public static CodedOutputStream newInstance(final OutputStream output) { - return newInstance(output, DEFAULT_BUFFER_SIZE); - } - - /** - * Create a new {@code CodedOutputStream} wrapping the given - * {@code OutputStream} with a given buffer size. - */ - public static CodedOutputStream newInstance(final OutputStream output, - final int bufferSize) { - return new CodedOutputStream(output, new byte[bufferSize]); - } - - /** - * Create a new {@code CodedOutputStream} that writes directly to the given - * byte array. If more bytes are written than fit in the array, - * {@link OutOfSpaceException} will be thrown. Writing directly to a flat - * array is faster than writing to an {@code OutputStream}. See also - * {@link ByteString#newCodedBuilder}. - */ - public static CodedOutputStream newInstance(final byte[] flatArray) { - return newInstance(flatArray, 0, flatArray.length); - } - - /** - * Create a new {@code CodedOutputStream} that writes directly to the given - * byte array slice. If more bytes are written than fit in the slice, - * {@link OutOfSpaceException} will be thrown. Writing directly to a flat - * array is faster than writing to an {@code OutputStream}. See also - * {@link ByteString#newCodedBuilder}. - */ - public static CodedOutputStream newInstance(final byte[] flatArray, - final int offset, - final int length) { - return new CodedOutputStream(flatArray, offset, length); - } - - // ----------------------------------------------------------------- - - /** Write a {@code double} field, including tag, to the stream. */ - public void writeDouble(final int fieldNumber, final double value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED64); - writeDoubleNoTag(value); - } - - /** Write a {@code float} field, including tag, to the stream. */ - public void writeFloat(final int fieldNumber, final float value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED32); - writeFloatNoTag(value); - } - - /** Write a {@code uint64} field, including tag, to the stream. */ - public void writeUInt64(final int fieldNumber, final long value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeUInt64NoTag(value); - } - - /** Write an {@code int64} field, including tag, to the stream. */ - public void writeInt64(final int fieldNumber, final long value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeInt64NoTag(value); - } - - /** Write an {@code int32} field, including tag, to the stream. */ - public void writeInt32(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeInt32NoTag(value); - } - - /** Write a {@code fixed64} field, including tag, to the stream. */ - public void writeFixed64(final int fieldNumber, final long value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED64); - writeFixed64NoTag(value); - } - - /** Write a {@code fixed32} field, including tag, to the stream. */ - public void writeFixed32(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED32); - writeFixed32NoTag(value); - } - - /** Write a {@code bool} field, including tag, to the stream. */ - public void writeBool(final int fieldNumber, final boolean value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeBoolNoTag(value); - } - - /** Write a {@code string} field, including tag, to the stream. */ - public void writeString(final int fieldNumber, final String value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_LENGTH_DELIMITED); - writeStringNoTag(value); - } - - /** Write a {@code group} field, including tag, to the stream. */ - public void writeGroup(final int fieldNumber, final MessageLite value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_START_GROUP); - writeGroupNoTag(value); - writeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP); - } - - /** - * Write a group represented by an {@link UnknownFieldSet}. - * - * @deprecated UnknownFieldSet now implements MessageLite, so you can just - * call {@link #writeGroup}. - */ - @Deprecated - public void writeUnknownGroup(final int fieldNumber, - final MessageLite value) - throws IOException { - writeGroup(fieldNumber, value); - } - - /** Write an embedded message field, including tag, to the stream. */ - public void writeMessage(final int fieldNumber, final MessageLite value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_LENGTH_DELIMITED); - writeMessageNoTag(value); - } - - /** Write a {@code bytes} field, including tag, to the stream. */ - public void writeBytes(final int fieldNumber, final ByteString value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_LENGTH_DELIMITED); - writeBytesNoTag(value); - } - - /** Write a {@code uint32} field, including tag, to the stream. */ - public void writeUInt32(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeUInt32NoTag(value); - } - - /** - * Write an enum field, including tag, to the stream. Caller is responsible - * for converting the enum value to its numeric value. - */ - public void writeEnum(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeEnumNoTag(value); - } - - /** Write an {@code sfixed32} field, including tag, to the stream. */ - public void writeSFixed32(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED32); - writeSFixed32NoTag(value); - } - - /** Write an {@code sfixed64} field, including tag, to the stream. */ - public void writeSFixed64(final int fieldNumber, final long value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_FIXED64); - writeSFixed64NoTag(value); - } - - /** Write an {@code sint32} field, including tag, to the stream. */ - public void writeSInt32(final int fieldNumber, final int value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeSInt32NoTag(value); - } - - /** Write an {@code sint64} field, including tag, to the stream. */ - public void writeSInt64(final int fieldNumber, final long value) - throws IOException { - writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); - writeSInt64NoTag(value); - } - - /** - * Write a MessageSet extension field to the stream. For historical reasons, - * the wire format differs from normal fields. - */ - public void writeMessageSetExtension(final int fieldNumber, - final MessageLite value) - throws IOException { - writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_START_GROUP); - writeUInt32(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber); - writeMessage(WireFormat.MESSAGE_SET_MESSAGE, value); - writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_END_GROUP); - } - - /** - * Write an unparsed MessageSet extension field to the stream. For - * historical reasons, the wire format differs from normal fields. - */ - public void writeRawMessageSetExtension(final int fieldNumber, - final ByteString value) - throws IOException { - writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_START_GROUP); - writeUInt32(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber); - writeBytes(WireFormat.MESSAGE_SET_MESSAGE, value); - writeTag(WireFormat.MESSAGE_SET_ITEM, WireFormat.WIRETYPE_END_GROUP); - } - - // ----------------------------------------------------------------- - - /** Write a {@code double} field to the stream. */ - public void writeDoubleNoTag(final double value) throws IOException { - writeRawLittleEndian64(Double.doubleToRawLongBits(value)); - } - - /** Write a {@code float} field to the stream. */ - public void writeFloatNoTag(final float value) throws IOException { - writeRawLittleEndian32(Float.floatToRawIntBits(value)); - } - - /** Write a {@code uint64} field to the stream. */ - public void writeUInt64NoTag(final long value) throws IOException { - writeRawVarint64(value); - } - - /** Write an {@code int64} field to the stream. */ - public void writeInt64NoTag(final long value) throws IOException { - writeRawVarint64(value); - } - - /** Write an {@code int32} field to the stream. */ - public void writeInt32NoTag(final int value) throws IOException { - if (value >= 0) { - writeRawVarint32(value); - } else { - // Must sign-extend. - writeRawVarint64(value); - } - } - - /** Write a {@code fixed64} field to the stream. */ - public void writeFixed64NoTag(final long value) throws IOException { - writeRawLittleEndian64(value); - } - - /** Write a {@code fixed32} field to the stream. */ - public void writeFixed32NoTag(final int value) throws IOException { - writeRawLittleEndian32(value); - } - - /** Write a {@code bool} field to the stream. */ - public void writeBoolNoTag(final boolean value) throws IOException { - writeRawByte(value ? 1 : 0); - } - - /** Write a {@code string} field to the stream. */ - public void writeStringNoTag(final String value) throws IOException { - // Unfortunately there does not appear to be any way to tell Java to encode - // UTF-8 directly into our buffer, so we have to let it create its own byte - // array and then copy. - final byte[] bytes = value.getBytes("UTF-8"); - writeRawVarint32(bytes.length); - writeRawBytes(bytes); - } - - /** Write a {@code group} field to the stream. */ - public void writeGroupNoTag(final MessageLite value) throws IOException { - value.writeTo(this); - } - - /** - * Write a group represented by an {@link UnknownFieldSet}. - * - * @deprecated UnknownFieldSet now implements MessageLite, so you can just - * call {@link #writeGroupNoTag}. - */ - @Deprecated - public void writeUnknownGroupNoTag(final MessageLite value) - throws IOException { - writeGroupNoTag(value); - } - - /** Write an embedded message field to the stream. */ - public void writeMessageNoTag(final MessageLite value) throws IOException { - writeRawVarint32(value.getSerializedSize()); - value.writeTo(this); - } - - /** Write a {@code bytes} field to the stream. */ - public void writeBytesNoTag(final ByteString value) throws IOException { - writeRawVarint32(value.size()); - writeRawBytes(value); - } - - /** Write a {@code uint32} field to the stream. */ - public void writeUInt32NoTag(final int value) throws IOException { - writeRawVarint32(value); - } - - /** - * Write an enum field to the stream. Caller is responsible - * for converting the enum value to its numeric value. - */ - public void writeEnumNoTag(final int value) throws IOException { - writeInt32NoTag(value); - } - - /** Write an {@code sfixed32} field to the stream. */ - public void writeSFixed32NoTag(final int value) throws IOException { - writeRawLittleEndian32(value); - } - - /** Write an {@code sfixed64} field to the stream. */ - public void writeSFixed64NoTag(final long value) throws IOException { - writeRawLittleEndian64(value); - } - - /** Write an {@code sint32} field to the stream. */ - public void writeSInt32NoTag(final int value) throws IOException { - writeRawVarint32(encodeZigZag32(value)); - } - - /** Write an {@code sint64} field to the stream. */ - public void writeSInt64NoTag(final long value) throws IOException { - writeRawVarint64(encodeZigZag64(value)); - } - - // ================================================================= - - /** - * Compute the number of bytes that would be needed to encode a - * {@code double} field, including tag. - */ - public static int computeDoubleSize(final int fieldNumber, - final double value) { - return computeTagSize(fieldNumber) + computeDoubleSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code float} field, including tag. - */ - public static int computeFloatSize(final int fieldNumber, final float value) { - return computeTagSize(fieldNumber) + computeFloatSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code uint64} field, including tag. - */ - public static int computeUInt64Size(final int fieldNumber, final long value) { - return computeTagSize(fieldNumber) + computeUInt64SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code int64} field, including tag. - */ - public static int computeInt64Size(final int fieldNumber, final long value) { - return computeTagSize(fieldNumber) + computeInt64SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code int32} field, including tag. - */ - public static int computeInt32Size(final int fieldNumber, final int value) { - return computeTagSize(fieldNumber) + computeInt32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code fixed64} field, including tag. - */ - public static int computeFixed64Size(final int fieldNumber, - final long value) { - return computeTagSize(fieldNumber) + computeFixed64SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code fixed32} field, including tag. - */ - public static int computeFixed32Size(final int fieldNumber, - final int value) { - return computeTagSize(fieldNumber) + computeFixed32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code bool} field, including tag. - */ - public static int computeBoolSize(final int fieldNumber, - final boolean value) { - return computeTagSize(fieldNumber) + computeBoolSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code string} field, including tag. - */ - public static int computeStringSize(final int fieldNumber, - final String value) { - return computeTagSize(fieldNumber) + computeStringSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code group} field, including tag. - */ - public static int computeGroupSize(final int fieldNumber, - final MessageLite value) { - return computeTagSize(fieldNumber) * 2 + computeGroupSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code group} field represented by an {@code UnknownFieldSet}, including - * tag. - * - * @deprecated UnknownFieldSet now implements MessageLite, so you can just - * call {@link #computeGroupSize}. - */ - @Deprecated - public static int computeUnknownGroupSize(final int fieldNumber, - final MessageLite value) { - return computeGroupSize(fieldNumber, value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * embedded message field, including tag. - */ - public static int computeMessageSize(final int fieldNumber, - final MessageLite value) { - return computeTagSize(fieldNumber) + computeMessageSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code bytes} field, including tag. - */ - public static int computeBytesSize(final int fieldNumber, - final ByteString value) { - return computeTagSize(fieldNumber) + computeBytesSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code uint32} field, including tag. - */ - public static int computeUInt32Size(final int fieldNumber, final int value) { - return computeTagSize(fieldNumber) + computeUInt32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * enum field, including tag. Caller is responsible for converting the - * enum value to its numeric value. - */ - public static int computeEnumSize(final int fieldNumber, final int value) { - return computeTagSize(fieldNumber) + computeEnumSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sfixed32} field, including tag. - */ - public static int computeSFixed32Size(final int fieldNumber, - final int value) { - return computeTagSize(fieldNumber) + computeSFixed32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sfixed64} field, including tag. - */ - public static int computeSFixed64Size(final int fieldNumber, - final long value) { - return computeTagSize(fieldNumber) + computeSFixed64SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sint32} field, including tag. - */ - public static int computeSInt32Size(final int fieldNumber, final int value) { - return computeTagSize(fieldNumber) + computeSInt32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sint64} field, including tag. - */ - public static int computeSInt64Size(final int fieldNumber, final long value) { - return computeTagSize(fieldNumber) + computeSInt64SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * MessageSet extension to the stream. For historical reasons, - * the wire format differs from normal fields. - */ - public static int computeMessageSetExtensionSize( - final int fieldNumber, final MessageLite value) { - return computeTagSize(WireFormat.MESSAGE_SET_ITEM) * 2 + - computeUInt32Size(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber) + - computeMessageSize(WireFormat.MESSAGE_SET_MESSAGE, value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * unparsed MessageSet extension field to the stream. For - * historical reasons, the wire format differs from normal fields. - */ - public static int computeRawMessageSetExtensionSize( - final int fieldNumber, final ByteString value) { - return computeTagSize(WireFormat.MESSAGE_SET_ITEM) * 2 + - computeUInt32Size(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber) + - computeBytesSize(WireFormat.MESSAGE_SET_MESSAGE, value); - } - - // ----------------------------------------------------------------- - - /** - * Compute the number of bytes that would be needed to encode a - * {@code double} field, including tag. - */ - public static int computeDoubleSizeNoTag(final double value) { - return LITTLE_ENDIAN_64_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code float} field, including tag. - */ - public static int computeFloatSizeNoTag(final float value) { - return LITTLE_ENDIAN_32_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code uint64} field, including tag. - */ - public static int computeUInt64SizeNoTag(final long value) { - return computeRawVarint64Size(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code int64} field, including tag. - */ - public static int computeInt64SizeNoTag(final long value) { - return computeRawVarint64Size(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code int32} field, including tag. - */ - public static int computeInt32SizeNoTag(final int value) { - if (value >= 0) { - return computeRawVarint32Size(value); - } else { - // Must sign-extend. - return 10; - } - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code fixed64} field. - */ - public static int computeFixed64SizeNoTag(final long value) { - return LITTLE_ENDIAN_64_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code fixed32} field. - */ - public static int computeFixed32SizeNoTag(final int value) { - return LITTLE_ENDIAN_32_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code bool} field. - */ - public static int computeBoolSizeNoTag(final boolean value) { - return 1; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code string} field. - */ - public static int computeStringSizeNoTag(final String value) { - try { - final byte[] bytes = value.getBytes("UTF-8"); - return computeRawVarint32Size(bytes.length) + - bytes.length; - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("UTF-8 not supported.", e); - } - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code group} field. - */ - public static int computeGroupSizeNoTag(final MessageLite value) { - return value.getSerializedSize(); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code group} field represented by an {@code UnknownFieldSet}, including - * tag. - * - * @deprecated UnknownFieldSet now implements MessageLite, so you can just - * call {@link #computeUnknownGroupSizeNoTag}. - */ - @Deprecated - public static int computeUnknownGroupSizeNoTag(final MessageLite value) { - return computeGroupSizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an embedded - * message field. - */ - public static int computeMessageSizeNoTag(final MessageLite value) { - final int size = value.getSerializedSize(); - return computeRawVarint32Size(size) + size; - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code bytes} field. - */ - public static int computeBytesSizeNoTag(final ByteString value) { - return computeRawVarint32Size(value.size()) + - value.size(); - } - - /** - * Compute the number of bytes that would be needed to encode a - * {@code uint32} field. - */ - public static int computeUInt32SizeNoTag(final int value) { - return computeRawVarint32Size(value); - } - - /** - * Compute the number of bytes that would be needed to encode an enum field. - * Caller is responsible for converting the enum value to its numeric value. - */ - public static int computeEnumSizeNoTag(final int value) { - return computeInt32SizeNoTag(value); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sfixed32} field. - */ - public static int computeSFixed32SizeNoTag(final int value) { - return LITTLE_ENDIAN_32_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sfixed64} field. - */ - public static int computeSFixed64SizeNoTag(final long value) { - return LITTLE_ENDIAN_64_SIZE; - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sint32} field. - */ - public static int computeSInt32SizeNoTag(final int value) { - return computeRawVarint32Size(encodeZigZag32(value)); - } - - /** - * Compute the number of bytes that would be needed to encode an - * {@code sint64} field. - */ - public static int computeSInt64SizeNoTag(final long value) { - return computeRawVarint64Size(encodeZigZag64(value)); - } - - // ================================================================= - - /** - * Internal helper that writes the current buffer to the output. The - * buffer position is reset to its initial value when this returns. - */ - private void refreshBuffer() throws IOException { - if (output == null) { - // We're writing to a single buffer. - throw new OutOfSpaceException(); - } - - // Since we have an output stream, this is our buffer - // and buffer offset == 0 - output.write(buffer, 0, position); - position = 0; - } - - /** - * Flushes the stream and forces any buffered bytes to be written. This - * does not flush the underlying OutputStream. - */ - public void flush() throws IOException { - if (output != null) { - refreshBuffer(); - } - } - - /** - * If writing to a flat array, return the space left in the array. - * Otherwise, throws {@code UnsupportedOperationException}. - */ - public int spaceLeft() { - if (output == null) { - return limit - position; - } else { - throw new UnsupportedOperationException( - "spaceLeft() can only be called on CodedOutputStreams that are " + - "writing to a flat array."); - } - } - - /** - * Verifies that {@link #spaceLeft()} returns zero. It's common to create - * a byte array that is exactly big enough to hold a message, then write to - * it with a {@code CodedOutputStream}. Calling {@code checkNoSpaceLeft()} - * after writing verifies that the message was actually as big as expected, - * which can help catch bugs. - */ - public void checkNoSpaceLeft() { - if (spaceLeft() != 0) { - throw new IllegalStateException( - "Did not write as much data as expected."); - } - } - - /** - * If you create a CodedOutputStream around a simple flat array, you must - * not attempt to write more bytes than the array has space. Otherwise, - * this exception will be thrown. - */ - public static class OutOfSpaceException extends IOException { - private static final long serialVersionUID = -6947486886997889499L; - - OutOfSpaceException() { - super("CodedOutputStream was writing to a flat byte array and ran " + - "out of space."); - } - } - - /** Write a single byte. */ - public void writeRawByte(final byte value) throws IOException { - if (position == limit) { - refreshBuffer(); - } - - buffer[position++] = value; - } - - /** Write a single byte, represented by an integer value. */ - public void writeRawByte(final int value) throws IOException { - writeRawByte((byte) value); - } - - /** Write a byte string. */ - public void writeRawBytes(final ByteString value) throws IOException { - writeRawBytes(value, 0, value.size()); - } - - /** Write an array of bytes. */ - public void writeRawBytes(final byte[] value) throws IOException { - writeRawBytes(value, 0, value.length); - } - - /** Write part of an array of bytes. */ - public void writeRawBytes(final byte[] value, int offset, int length) - throws IOException { - if (limit - position >= length) { - // We have room in the current buffer. - System.arraycopy(value, offset, buffer, position, length); - position += length; - } else { - // Write extends past current buffer. Fill the rest of this buffer and - // flush. - final int bytesWritten = limit - position; - System.arraycopy(value, offset, buffer, position, bytesWritten); - offset += bytesWritten; - length -= bytesWritten; - position = limit; - refreshBuffer(); - - // Now deal with the rest. - // Since we have an output stream, this is our buffer - // and buffer offset == 0 - if (length <= limit) { - // Fits in new buffer. - System.arraycopy(value, offset, buffer, 0, length); - position = length; - } else { - // Write is very big. Let's do it all at once. - output.write(value, offset, length); - } - } - } - - /** Write part of a byte string. */ - public void writeRawBytes(final ByteString value, int offset, int length) - throws IOException { - if (limit - position >= length) { - // We have room in the current buffer. - value.copyTo(buffer, offset, position, length); - position += length; - } else { - // Write extends past current buffer. Fill the rest of this buffer and - // flush. - final int bytesWritten = limit - position; - value.copyTo(buffer, offset, position, bytesWritten); - offset += bytesWritten; - length -= bytesWritten; - position = limit; - refreshBuffer(); - - // Now deal with the rest. - // Since we have an output stream, this is our buffer - // and buffer offset == 0 - if (length <= limit) { - // Fits in new buffer. - value.copyTo(buffer, offset, 0, length); - position = length; - } else { - // Write is very big, but we can't do it all at once without allocating - // an a copy of the byte array since ByteString does not give us access - // to the underlying bytes. Use the InputStream interface on the - // ByteString and our buffer to copy between the two. - InputStream inputStreamFrom = value.newInput(); - if (offset != inputStreamFrom.skip(offset)) { - throw new IllegalStateException("Skip failed? Should never happen."); - } - // Use the buffer as the temporary buffer to avoid allocating memory. - while (length > 0) { - int bytesToRead = Math.min(length, limit); - int bytesRead = inputStreamFrom.read(buffer, 0, bytesToRead); - if (bytesRead != bytesToRead) { - throw new IllegalStateException("Read failed? Should never happen"); - } - output.write(buffer, 0, bytesRead); - length -= bytesRead; - } - } - } - } - - /** Encode and write a tag. */ - public void writeTag(final int fieldNumber, final int wireType) - throws IOException { - writeRawVarint32(WireFormat.makeTag(fieldNumber, wireType)); - } - - /** Compute the number of bytes that would be needed to encode a tag. */ - public static int computeTagSize(final int fieldNumber) { - return computeRawVarint32Size(WireFormat.makeTag(fieldNumber, 0)); - } - - /** - * Encode and write a varint. {@code value} is treated as - * unsigned, so it won't be sign-extended if negative. - */ - public void writeRawVarint32(int value) throws IOException { - while (true) { - if ((value & ~0x7F) == 0) { - writeRawByte(value); - return; - } else { - writeRawByte((value & 0x7F) | 0x80); - value >>>= 7; - } - } - } - - /** - * Compute the number of bytes that would be needed to encode a varint. - * {@code value} is treated as unsigned, so it won't be sign-extended if - * negative. - */ - public static int computeRawVarint32Size(final int value) { - if ((value & (0xffffffff << 7)) == 0) return 1; - if ((value & (0xffffffff << 14)) == 0) return 2; - if ((value & (0xffffffff << 21)) == 0) return 3; - if ((value & (0xffffffff << 28)) == 0) return 4; - return 5; - } - - /** Encode and write a varint. */ - public void writeRawVarint64(long value) throws IOException { - while (true) { - if ((value & ~0x7FL) == 0) { - writeRawByte((int)value); - return; - } else { - writeRawByte(((int)value & 0x7F) | 0x80); - value >>>= 7; - } - } - } - - /** Compute the number of bytes that would be needed to encode a varint. */ - public static int computeRawVarint64Size(final long value) { - if ((value & (0xffffffffffffffffL << 7)) == 0) return 1; - if ((value & (0xffffffffffffffffL << 14)) == 0) return 2; - if ((value & (0xffffffffffffffffL << 21)) == 0) return 3; - if ((value & (0xffffffffffffffffL << 28)) == 0) return 4; - if ((value & (0xffffffffffffffffL << 35)) == 0) return 5; - if ((value & (0xffffffffffffffffL << 42)) == 0) return 6; - if ((value & (0xffffffffffffffffL << 49)) == 0) return 7; - if ((value & (0xffffffffffffffffL << 56)) == 0) return 8; - if ((value & (0xffffffffffffffffL << 63)) == 0) return 9; - return 10; - } - - /** Write a little-endian 32-bit integer. */ - public void writeRawLittleEndian32(final int value) throws IOException { - writeRawByte((value ) & 0xFF); - writeRawByte((value >> 8) & 0xFF); - writeRawByte((value >> 16) & 0xFF); - writeRawByte((value >> 24) & 0xFF); - } - - public static final int LITTLE_ENDIAN_32_SIZE = 4; - - /** Write a little-endian 64-bit integer. */ - public void writeRawLittleEndian64(final long value) throws IOException { - writeRawByte((int)(value ) & 0xFF); - writeRawByte((int)(value >> 8) & 0xFF); - writeRawByte((int)(value >> 16) & 0xFF); - writeRawByte((int)(value >> 24) & 0xFF); - writeRawByte((int)(value >> 32) & 0xFF); - writeRawByte((int)(value >> 40) & 0xFF); - writeRawByte((int)(value >> 48) & 0xFF); - writeRawByte((int)(value >> 56) & 0xFF); - } - - public static final int LITTLE_ENDIAN_64_SIZE = 8; - - /** - * Encode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers - * into values that can be efficiently encoded with varint. (Otherwise, - * negative values must be sign-extended to 64 bits to be varint encoded, - * thus always taking 10 bytes on the wire.) - * - * @param n A signed 32-bit integer. - * @return An unsigned 32-bit integer, stored in a signed int because - * Java has no explicit unsigned support. - */ - public static int encodeZigZag32(final int n) { - // Note: the right-shift must be arithmetic - return (n << 1) ^ (n >> 31); - } - - /** - * Encode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers - * into values that can be efficiently encoded with varint. (Otherwise, - * negative values must be sign-extended to 64 bits to be varint encoded, - * thus always taking 10 bytes on the wire.) - * - * @param n A signed 64-bit integer. - * @return An unsigned 64-bit integer, stored in a signed int because - * Java has no explicit unsigned support. - */ - public static long encodeZigZag64(final long n) { - // Note: the right-shift must be arithmetic - return (n << 1) ^ (n >> 63); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java deleted file mode 100644 index 2ee84594..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java +++ /dev/null @@ -1,1887 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.DescriptorProtos.*; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.io.UnsupportedEncodingException; - -/** - * Contains a collection of classes which describe protocol message types. - * - * Every message type has a {@link Descriptor}, which lists all - * its fields and other information about a type. You can get a message - * type's descriptor by calling {@code MessageType.getDescriptor()}, or - * (given a message object of the type) {@code message.getDescriptorForType()}. - * Furthermore, each message is associated with a {@link FileDescriptor} for - * a relevant {@code .proto} file. You can obtain it by calling - * {@code Descriptor.getFile()}. A {@link FileDescriptor} contains descriptors - * for all the messages defined in that file, and file descriptors for all the - * imported {@code .proto} files. - * - * Descriptors are built from DescriptorProtos, as defined in - * {@code google/protobuf/descriptor.proto}. - * - * @author kenton@google.com Kenton Varda - */ -public final class Descriptors { - /** - * Describes a {@code .proto} file, including everything defined within. - * That includes, in particular, descriptors for all the messages and - * file descriptors for all other imported {@code .proto} files - * (dependencies). - */ - public static final class FileDescriptor { - /** Convert the descriptor to its protocol message representation. */ - public FileDescriptorProto toProto() { return proto; } - - /** Get the file name. */ - public String getName() { return proto.getName(); } - - /** - * Get the proto package name. This is the package name given by the - * {@code package} statement in the {@code .proto} file, which differs - * from the Java package. - */ - public String getPackage() { return proto.getPackage(); } - - /** Get the {@code FileOptions}, defined in {@code descriptor.proto}. */ - public FileOptions getOptions() { return proto.getOptions(); } - - /** Get a list of top-level message types declared in this file. */ - public List getMessageTypes() { - return Collections.unmodifiableList(Arrays.asList(messageTypes)); - } - - /** Get a list of top-level enum types declared in this file. */ - public List getEnumTypes() { - return Collections.unmodifiableList(Arrays.asList(enumTypes)); - } - - /** Get a list of top-level services declared in this file. */ - public List getServices() { - return Collections.unmodifiableList(Arrays.asList(services)); - } - - /** Get a list of top-level extensions declared in this file. */ - public List getExtensions() { - return Collections.unmodifiableList(Arrays.asList(extensions)); - } - - /** Get a list of this file's dependencies (imports). */ - public List getDependencies() { - return Collections.unmodifiableList(Arrays.asList(dependencies)); - } - - /** - * Find a message type in the file by name. Does not find nested types. - * - * @param name The unqualified type name to look for. - * @return The message type's descriptor, or {@code null} if not found. - */ - public Descriptor findMessageTypeByName(String name) { - // Don't allow looking up nested types. This will make optimization - // easier later. - if (name.indexOf('.') != -1) { - return null; - } - if (getPackage().length() > 0) { - name = getPackage() + '.' + name; - } - final GenericDescriptor result = pool.findSymbol(name); - if (result != null && result instanceof Descriptor && - result.getFile() == this) { - return (Descriptor)result; - } else { - return null; - } - } - - /** - * Find an enum type in the file by name. Does not find nested types. - * - * @param name The unqualified type name to look for. - * @return The enum type's descriptor, or {@code null} if not found. - */ - public EnumDescriptor findEnumTypeByName(String name) { - // Don't allow looking up nested types. This will make optimization - // easier later. - if (name.indexOf('.') != -1) { - return null; - } - if (getPackage().length() > 0) { - name = getPackage() + '.' + name; - } - final GenericDescriptor result = pool.findSymbol(name); - if (result != null && result instanceof EnumDescriptor && - result.getFile() == this) { - return (EnumDescriptor)result; - } else { - return null; - } - } - - /** - * Find a service type in the file by name. - * - * @param name The unqualified type name to look for. - * @return The service type's descriptor, or {@code null} if not found. - */ - public ServiceDescriptor findServiceByName(String name) { - // Don't allow looking up nested types. This will make optimization - // easier later. - if (name.indexOf('.') != -1) { - return null; - } - if (getPackage().length() > 0) { - name = getPackage() + '.' + name; - } - final GenericDescriptor result = pool.findSymbol(name); - if (result != null && result instanceof ServiceDescriptor && - result.getFile() == this) { - return (ServiceDescriptor)result; - } else { - return null; - } - } - - /** - * Find an extension in the file by name. Does not find extensions nested - * inside message types. - * - * @param name The unqualified extension name to look for. - * @return The extension's descriptor, or {@code null} if not found. - */ - public FieldDescriptor findExtensionByName(String name) { - if (name.indexOf('.') != -1) { - return null; - } - if (getPackage().length() > 0) { - name = getPackage() + '.' + name; - } - final GenericDescriptor result = pool.findSymbol(name); - if (result != null && result instanceof FieldDescriptor && - result.getFile() == this) { - return (FieldDescriptor)result; - } else { - return null; - } - } - - /** - * Construct a {@code FileDescriptor}. - * - * @param proto The protocol message form of the FileDescriptor. - * @param dependencies {@code FileDescriptor}s corresponding to all of - * the file's dependencies, in the exact order listed - * in {@code proto}. - * @throws DescriptorValidationException {@code proto} is not a valid - * descriptor. This can occur for a number of reasons, e.g. - * because a field has an undefined type or because two messages - * were defined with the same name. - */ - public static FileDescriptor buildFrom(final FileDescriptorProto proto, - final FileDescriptor[] dependencies) - throws DescriptorValidationException { - // Building decsriptors involves two steps: translating and linking. - // In the translation step (implemented by FileDescriptor's - // constructor), we build an object tree mirroring the - // FileDescriptorProto's tree and put all of the descriptors into the - // DescriptorPool's lookup tables. In the linking step, we look up all - // type references in the DescriptorPool, so that, for example, a - // FieldDescriptor for an embedded message contains a pointer directly - // to the Descriptor for that message's type. We also detect undefined - // types in the linking step. - final DescriptorPool pool = new DescriptorPool(dependencies); - final FileDescriptor result = - new FileDescriptor(proto, dependencies, pool); - - if (dependencies.length != proto.getDependencyCount()) { - throw new DescriptorValidationException(result, - "Dependencies passed to FileDescriptor.buildFrom() don't match " + - "those listed in the FileDescriptorProto."); - } - for (int i = 0; i < proto.getDependencyCount(); i++) { - if (!dependencies[i].getName().equals(proto.getDependency(i))) { - throw new DescriptorValidationException(result, - "Dependencies passed to FileDescriptor.buildFrom() don't match " + - "those listed in the FileDescriptorProto."); - } - } - - result.crossLink(); - return result; - } - - /** - * This method is to be called by generated code only. It is equivalent - * to {@code buildFrom} except that the {@code FileDescriptorProto} is - * encoded in protocol buffer wire format. - */ - public static void internalBuildGeneratedFileFrom( - final String[] descriptorDataParts, - final FileDescriptor[] dependencies, - final InternalDescriptorAssigner descriptorAssigner) { - // Hack: We can't embed a raw byte array inside generated Java code - // (at least, not efficiently), but we can embed Strings. So, the - // protocol compiler embeds the FileDescriptorProto as a giant - // string literal which is passed to this function to construct the - // file's FileDescriptor. The string literal contains only 8-bit - // characters, each one representing a byte of the FileDescriptorProto's - // serialized form. So, if we convert it to bytes in ISO-8859-1, we - // should get the original bytes that we want. - - // descriptorData may contain multiple strings in order to get around the - // Java 64k string literal limit. - StringBuilder descriptorData = new StringBuilder(); - for (String part : descriptorDataParts) { - descriptorData.append(part); - } - - final byte[] descriptorBytes; - try { - descriptorBytes = descriptorData.toString().getBytes("ISO-8859-1"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException( - "Standard encoding ISO-8859-1 not supported by JVM.", e); - } - - FileDescriptorProto proto; - try { - proto = FileDescriptorProto.parseFrom(descriptorBytes); - } catch (InvalidProtocolBufferException e) { - throw new IllegalArgumentException( - "Failed to parse protocol buffer descriptor for generated code.", e); - } - - final FileDescriptor result; - try { - result = buildFrom(proto, dependencies); - } catch (DescriptorValidationException e) { - throw new IllegalArgumentException( - "Invalid embedded descriptor for \"" + proto.getName() + "\".", e); - } - - final ExtensionRegistry registry = - descriptorAssigner.assignDescriptors(result); - - if (registry != null) { - // We must re-parse the proto using the registry. - try { - proto = FileDescriptorProto.parseFrom(descriptorBytes, registry); - } catch (InvalidProtocolBufferException e) { - throw new IllegalArgumentException( - "Failed to parse protocol buffer descriptor for generated code.", - e); - } - - result.setProto(proto); - } - } - - /** - * This class should be used by generated code only. When calling - * {@link FileDescriptor#internalBuildGeneratedFileFrom}, the caller - * provides a callback implementing this interface. The callback is called - * after the FileDescriptor has been constructed, in order to assign all - * the global variales defined in the generated code which point at parts - * of the FileDescriptor. The callback returns an ExtensionRegistry which - * contains any extensions which might be used in the descriptor -- that - * is, extensions of the various "Options" messages defined in - * descriptor.proto. The callback may also return null to indicate that - * no extensions are used in the decsriptor. - */ - public interface InternalDescriptorAssigner { - ExtensionRegistry assignDescriptors(FileDescriptor root); - } - - private FileDescriptorProto proto; - private final Descriptor[] messageTypes; - private final EnumDescriptor[] enumTypes; - private final ServiceDescriptor[] services; - private final FieldDescriptor[] extensions; - private final FileDescriptor[] dependencies; - private final DescriptorPool pool; - - private FileDescriptor(final FileDescriptorProto proto, - final FileDescriptor[] dependencies, - final DescriptorPool pool) - throws DescriptorValidationException { - this.pool = pool; - this.proto = proto; - this.dependencies = dependencies.clone(); - - pool.addPackage(getPackage(), this); - - messageTypes = new Descriptor[proto.getMessageTypeCount()]; - for (int i = 0; i < proto.getMessageTypeCount(); i++) { - messageTypes[i] = - new Descriptor(proto.getMessageType(i), this, null, i); - } - - enumTypes = new EnumDescriptor[proto.getEnumTypeCount()]; - for (int i = 0; i < proto.getEnumTypeCount(); i++) { - enumTypes[i] = new EnumDescriptor(proto.getEnumType(i), this, null, i); - } - - services = new ServiceDescriptor[proto.getServiceCount()]; - for (int i = 0; i < proto.getServiceCount(); i++) { - services[i] = new ServiceDescriptor(proto.getService(i), this, i); - } - - extensions = new FieldDescriptor[proto.getExtensionCount()]; - for (int i = 0; i < proto.getExtensionCount(); i++) { - extensions[i] = new FieldDescriptor( - proto.getExtension(i), this, null, i, true); - } - } - - /** Look up and cross-link all field types, etc. */ - private void crossLink() throws DescriptorValidationException { - for (final Descriptor messageType : messageTypes) { - messageType.crossLink(); - } - - for (final ServiceDescriptor service : services) { - service.crossLink(); - } - - for (final FieldDescriptor extension : extensions) { - extension.crossLink(); - } - } - - /** - * Replace our {@link FileDescriptorProto} with the given one, which is - * identical except that it might contain extensions that weren't present - * in the original. This method is needed for bootstrapping when a file - * defines custom options. The options may be defined in the file itself, - * so we can't actually parse them until we've constructed the descriptors, - * but to construct the decsriptors we have to have parsed the descriptor - * protos. So, we have to parse the descriptor protos a second time after - * constructing the descriptors. - */ - private void setProto(final FileDescriptorProto proto) { - this.proto = proto; - - for (int i = 0; i < messageTypes.length; i++) { - messageTypes[i].setProto(proto.getMessageType(i)); - } - - for (int i = 0; i < enumTypes.length; i++) { - enumTypes[i].setProto(proto.getEnumType(i)); - } - - for (int i = 0; i < services.length; i++) { - services[i].setProto(proto.getService(i)); - } - - for (int i = 0; i < extensions.length; i++) { - extensions[i].setProto(proto.getExtension(i)); - } - } - } - - // ================================================================= - - /** Describes a message type. */ - public static final class Descriptor implements GenericDescriptor { - /** - * Get the index of this descriptor within its parent. In other words, - * given a {@link FileDescriptor} {@code file}, the following is true: - *

-     *   for all i in [0, file.getMessageTypeCount()):
-     *     file.getMessageType(i).getIndex() == i
-     * 
- * Similarly, for a {@link Descriptor} {@code messageType}: - *
-     *   for all i in [0, messageType.getNestedTypeCount()):
-     *     messageType.getNestedType(i).getIndex() == i
-     * 
- */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public DescriptorProto toProto() { return proto; } - - /** Get the type's unqualified name. */ - public String getName() { return proto.getName(); } - - /** - * Get the type's fully-qualified name, within the proto language's - * namespace. This differs from the Java name. For example, given this - * {@code .proto}: - *
-     *   package foo.bar;
-     *   option java_package = "com.example.protos"
-     *   message Baz {}
-     * 
- * {@code Baz}'s full name is "foo.bar.Baz". - */ - public String getFullName() { return fullName; } - - /** Get the {@link FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** If this is a nested type, get the outer descriptor, otherwise null. */ - public Descriptor getContainingType() { return containingType; } - - /** Get the {@code MessageOptions}, defined in {@code descriptor.proto}. */ - public MessageOptions getOptions() { return proto.getOptions(); } - - /** Get a list of this message type's fields. */ - public List getFields() { - return Collections.unmodifiableList(Arrays.asList(fields)); - } - - /** Get a list of this message type's extensions. */ - public List getExtensions() { - return Collections.unmodifiableList(Arrays.asList(extensions)); - } - - /** Get a list of message types nested within this one. */ - public List getNestedTypes() { - return Collections.unmodifiableList(Arrays.asList(nestedTypes)); - } - - /** Get a list of enum types nested within this one. */ - public List getEnumTypes() { - return Collections.unmodifiableList(Arrays.asList(enumTypes)); - } - - /** Determines if the given field number is an extension. */ - public boolean isExtensionNumber(final int number) { - for (final DescriptorProto.ExtensionRange range : - proto.getExtensionRangeList()) { - if (range.getStart() <= number && number < range.getEnd()) { - return true; - } - } - return false; - } - - /** - * Finds a field by name. - * @param name The unqualified name of the field (e.g. "foo"). - * @return The field's descriptor, or {@code null} if not found. - */ - public FieldDescriptor findFieldByName(final String name) { - final GenericDescriptor result = - file.pool.findSymbol(fullName + '.' + name); - if (result != null && result instanceof FieldDescriptor) { - return (FieldDescriptor)result; - } else { - return null; - } - } - - /** - * Finds a field by field number. - * @param number The field number within this message type. - * @return The field's descriptor, or {@code null} if not found. - */ - public FieldDescriptor findFieldByNumber(final int number) { - return file.pool.fieldsByNumber.get( - new DescriptorPool.DescriptorIntPair(this, number)); - } - - /** - * Finds a nested message type by name. - * @param name The unqualified name of the nested type (e.g. "Foo"). - * @return The types's descriptor, or {@code null} if not found. - */ - public Descriptor findNestedTypeByName(final String name) { - final GenericDescriptor result = - file.pool.findSymbol(fullName + '.' + name); - if (result != null && result instanceof Descriptor) { - return (Descriptor)result; - } else { - return null; - } - } - - /** - * Finds a nested enum type by name. - * @param name The unqualified name of the nested type (e.g. "Foo"). - * @return The types's descriptor, or {@code null} if not found. - */ - public EnumDescriptor findEnumTypeByName(final String name) { - final GenericDescriptor result = - file.pool.findSymbol(fullName + '.' + name); - if (result != null && result instanceof EnumDescriptor) { - return (EnumDescriptor)result; - } else { - return null; - } - } - - private final int index; - private DescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private final Descriptor containingType; - private final Descriptor[] nestedTypes; - private final EnumDescriptor[] enumTypes; - private final FieldDescriptor[] fields; - private final FieldDescriptor[] extensions; - - private Descriptor(final DescriptorProto proto, - final FileDescriptor file, - final Descriptor parent, - final int index) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - fullName = computeFullName(file, parent, proto.getName()); - this.file = file; - containingType = parent; - - nestedTypes = new Descriptor[proto.getNestedTypeCount()]; - for (int i = 0; i < proto.getNestedTypeCount(); i++) { - nestedTypes[i] = new Descriptor( - proto.getNestedType(i), file, this, i); - } - - enumTypes = new EnumDescriptor[proto.getEnumTypeCount()]; - for (int i = 0; i < proto.getEnumTypeCount(); i++) { - enumTypes[i] = new EnumDescriptor( - proto.getEnumType(i), file, this, i); - } - - fields = new FieldDescriptor[proto.getFieldCount()]; - for (int i = 0; i < proto.getFieldCount(); i++) { - fields[i] = new FieldDescriptor( - proto.getField(i), file, this, i, false); - } - - extensions = new FieldDescriptor[proto.getExtensionCount()]; - for (int i = 0; i < proto.getExtensionCount(); i++) { - extensions[i] = new FieldDescriptor( - proto.getExtension(i), file, this, i, true); - } - - file.pool.addSymbol(this); - } - - /** Look up and cross-link all field types, etc. */ - private void crossLink() throws DescriptorValidationException { - for (final Descriptor nestedType : nestedTypes) { - nestedType.crossLink(); - } - - for (final FieldDescriptor field : fields) { - field.crossLink(); - } - - for (final FieldDescriptor extension : extensions) { - extension.crossLink(); - } - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final DescriptorProto proto) { - this.proto = proto; - - for (int i = 0; i < nestedTypes.length; i++) { - nestedTypes[i].setProto(proto.getNestedType(i)); - } - - for (int i = 0; i < enumTypes.length; i++) { - enumTypes[i].setProto(proto.getEnumType(i)); - } - - for (int i = 0; i < fields.length; i++) { - fields[i].setProto(proto.getField(i)); - } - - for (int i = 0; i < extensions.length; i++) { - extensions[i].setProto(proto.getExtension(i)); - } - } - } - - // ================================================================= - - /** Describes a field of a message type. */ - public static final class FieldDescriptor - implements GenericDescriptor, Comparable, - FieldSet.FieldDescriptorLite { - /** - * Get the index of this descriptor within its parent. - * @see Descriptor#getIndex() - */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public FieldDescriptorProto toProto() { return proto; } - - /** Get the field's unqualified name. */ - public String getName() { return proto.getName(); } - - /** Get the field's number. */ - public int getNumber() { return proto.getNumber(); } - - /** - * Get the field's fully-qualified name. - * @see Descriptor#getFullName() - */ - public String getFullName() { return fullName; } - - /** - * Get the field's java type. This is just for convenience. Every - * {@code FieldDescriptorProto.Type} maps to exactly one Java type. - */ - public JavaType getJavaType() { return type.getJavaType(); } - - /** For internal use only. */ - public WireFormat.JavaType getLiteJavaType() { - return getLiteType().getJavaType(); - } - - /** Get the {@code FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** Get the field's declared type. */ - public Type getType() { return type; } - - /** For internal use only. */ - public WireFormat.FieldType getLiteType() { - return table[type.ordinal()]; - } - // I'm pretty sure values() constructs a new array every time, since there - // is nothing stopping the caller from mutating the array. Therefore we - // make a static copy here. - private static final WireFormat.FieldType[] table = - WireFormat.FieldType.values(); - - /** Is this field declared required? */ - public boolean isRequired() { - return proto.getLabel() == FieldDescriptorProto.Label.LABEL_REQUIRED; - } - - /** Is this field declared optional? */ - public boolean isOptional() { - return proto.getLabel() == FieldDescriptorProto.Label.LABEL_OPTIONAL; - } - - /** Is this field declared repeated? */ - public boolean isRepeated() { - return proto.getLabel() == FieldDescriptorProto.Label.LABEL_REPEATED; - } - - /** Does this field have the {@code [packed = true]} option? */ - public boolean isPacked() { - return getOptions().getPacked(); - } - - /** Can this field be packed? i.e. is it a repeated primitive field? */ - public boolean isPackable() { - return isRepeated() && getLiteType().isPackable(); - } - - /** Returns true if the field had an explicitly-defined default value. */ - public boolean hasDefaultValue() { return proto.hasDefaultValue(); } - - /** - * Returns the field's default value. Valid for all types except for - * messages and groups. For all other types, the object returned is of - * the same class that would returned by Message.getField(this). - */ - public Object getDefaultValue() { - if (getJavaType() == JavaType.MESSAGE) { - throw new UnsupportedOperationException( - "FieldDescriptor.getDefaultValue() called on an embedded message " + - "field."); - } - return defaultValue; - } - - /** Get the {@code FieldOptions}, defined in {@code descriptor.proto}. */ - public FieldOptions getOptions() { return proto.getOptions(); } - - /** Is this field an extension? */ - public boolean isExtension() { return proto.hasExtendee(); } - - /** - * Get the field's containing type. For extensions, this is the type being - * extended, not the location where the extension was defined. See - * {@link #getExtensionScope()}. - */ - public Descriptor getContainingType() { return containingType; } - - /** - * For extensions defined nested within message types, gets the outer - * type. Not valid for non-extension fields. For example, consider - * this {@code .proto} file: - *
-     *   message Foo {
-     *     extensions 1000 to max;
-     *   }
-     *   extend Foo {
-     *     optional int32 baz = 1234;
-     *   }
-     *   message Bar {
-     *     extend Foo {
-     *       optional int32 qux = 4321;
-     *     }
-     *   }
-     * 
- * Both {@code baz}'s and {@code qux}'s containing type is {@code Foo}. - * However, {@code baz}'s extension scope is {@code null} while - * {@code qux}'s extension scope is {@code Bar}. - */ - public Descriptor getExtensionScope() { - if (!isExtension()) { - throw new UnsupportedOperationException( - "This field is not an extension."); - } - return extensionScope; - } - - /** For embedded message and group fields, gets the field's type. */ - public Descriptor getMessageType() { - if (getJavaType() != JavaType.MESSAGE) { - throw new UnsupportedOperationException( - "This field is not of message type."); - } - return messageType; - } - - /** For enum fields, gets the field's type. */ - public EnumDescriptor getEnumType() { - if (getJavaType() != JavaType.ENUM) { - throw new UnsupportedOperationException( - "This field is not of enum type."); - } - return enumType; - } - - /** - * Compare with another {@code FieldDescriptor}. This orders fields in - * "canonical" order, which simply means ascending order by field number. - * {@code other} must be a field of the same type -- i.e. - * {@code getContainingType()} must return the same {@code Descriptor} for - * both fields. - * - * @return negative, zero, or positive if {@code this} is less than, - * equal to, or greater than {@code other}, respectively. - */ - public int compareTo(final FieldDescriptor other) { - if (other.containingType != containingType) { - throw new IllegalArgumentException( - "FieldDescriptors can only be compared to other FieldDescriptors " + - "for fields of the same message type."); - } - return getNumber() - other.getNumber(); - } - - private final int index; - - private FieldDescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private final Descriptor extensionScope; - - // Possibly initialized during cross-linking. - private Type type; - private Descriptor containingType; - private Descriptor messageType; - private EnumDescriptor enumType; - private Object defaultValue; - - public enum Type { - DOUBLE (JavaType.DOUBLE ), - FLOAT (JavaType.FLOAT ), - INT64 (JavaType.LONG ), - UINT64 (JavaType.LONG ), - INT32 (JavaType.INT ), - FIXED64 (JavaType.LONG ), - FIXED32 (JavaType.INT ), - BOOL (JavaType.BOOLEAN ), - STRING (JavaType.STRING ), - GROUP (JavaType.MESSAGE ), - MESSAGE (JavaType.MESSAGE ), - BYTES (JavaType.BYTE_STRING), - UINT32 (JavaType.INT ), - ENUM (JavaType.ENUM ), - SFIXED32(JavaType.INT ), - SFIXED64(JavaType.LONG ), - SINT32 (JavaType.INT ), - SINT64 (JavaType.LONG ); - - Type(final JavaType javaType) { - this.javaType = javaType; - } - - private JavaType javaType; - - public FieldDescriptorProto.Type toProto() { - return FieldDescriptorProto.Type.valueOf(ordinal() + 1); - } - public JavaType getJavaType() { return javaType; } - - public static Type valueOf(final FieldDescriptorProto.Type type) { - return values()[type.getNumber() - 1]; - } - } - - static { - // Refuse to init if someone added a new declared type. - if (Type.values().length != FieldDescriptorProto.Type.values().length) { - throw new RuntimeException( - "descriptor.proto has a new declared type but Desrciptors.java " + - "wasn't updated."); - } - } - - public enum JavaType { - INT(0), - LONG(0L), - FLOAT(0F), - DOUBLE(0D), - BOOLEAN(false), - STRING(""), - BYTE_STRING(ByteString.EMPTY), - ENUM(null), - MESSAGE(null); - - JavaType(final Object defaultDefault) { - this.defaultDefault = defaultDefault; - } - - /** - * The default default value for fields of this type, if it's a primitive - * type. This is meant for use inside this file only, hence is private. - */ - private final Object defaultDefault; - } - - private FieldDescriptor(final FieldDescriptorProto proto, - final FileDescriptor file, - final Descriptor parent, - final int index, - final boolean isExtension) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - fullName = computeFullName(file, parent, proto.getName()); - this.file = file; - - if (proto.hasType()) { - type = Type.valueOf(proto.getType()); - } - - if (getNumber() <= 0) { - throw new DescriptorValidationException(this, - "Field numbers must be positive integers."); - } - - // Only repeated primitive fields may be packed. - if (proto.getOptions().getPacked() && !isPackable()) { - throw new DescriptorValidationException(this, - "[packed = true] can only be specified for repeated primitive " + - "fields."); - } - - if (isExtension) { - if (!proto.hasExtendee()) { - throw new DescriptorValidationException(this, - "FieldDescriptorProto.extendee not set for extension field."); - } - containingType = null; // Will be filled in when cross-linking - if (parent != null) { - extensionScope = parent; - } else { - extensionScope = null; - } - } else { - if (proto.hasExtendee()) { - throw new DescriptorValidationException(this, - "FieldDescriptorProto.extendee set for non-extension field."); - } - containingType = parent; - extensionScope = null; - } - - file.pool.addSymbol(this); - } - - /** Look up and cross-link all field types, etc. */ - private void crossLink() throws DescriptorValidationException { - if (proto.hasExtendee()) { - final GenericDescriptor extendee = - file.pool.lookupSymbol(proto.getExtendee(), this); - if (!(extendee instanceof Descriptor)) { - throw new DescriptorValidationException(this, - '\"' + proto.getExtendee() + "\" is not a message type."); - } - containingType = (Descriptor)extendee; - - if (!getContainingType().isExtensionNumber(getNumber())) { - throw new DescriptorValidationException(this, - '\"' + getContainingType().getFullName() + - "\" does not declare " + getNumber() + - " as an extension number."); - } - } - - if (proto.hasTypeName()) { - final GenericDescriptor typeDescriptor = - file.pool.lookupSymbol(proto.getTypeName(), this); - - if (!proto.hasType()) { - // Choose field type based on symbol. - if (typeDescriptor instanceof Descriptor) { - type = Type.MESSAGE; - } else if (typeDescriptor instanceof EnumDescriptor) { - type = Type.ENUM; - } else { - throw new DescriptorValidationException(this, - '\"' + proto.getTypeName() + "\" is not a type."); - } - } - - if (getJavaType() == JavaType.MESSAGE) { - if (!(typeDescriptor instanceof Descriptor)) { - throw new DescriptorValidationException(this, - '\"' + proto.getTypeName() + "\" is not a message type."); - } - messageType = (Descriptor)typeDescriptor; - - if (proto.hasDefaultValue()) { - throw new DescriptorValidationException(this, - "Messages can't have default values."); - } - } else if (getJavaType() == JavaType.ENUM) { - if (!(typeDescriptor instanceof EnumDescriptor)) { - throw new DescriptorValidationException(this, - '\"' + proto.getTypeName() + "\" is not an enum type."); - } - enumType = (EnumDescriptor)typeDescriptor; - } else { - throw new DescriptorValidationException(this, - "Field with primitive type has type_name."); - } - } else { - if (getJavaType() == JavaType.MESSAGE || - getJavaType() == JavaType.ENUM) { - throw new DescriptorValidationException(this, - "Field with message or enum type missing type_name."); - } - } - - // We don't attempt to parse the default value until here because for - // enums we need the enum type's descriptor. - if (proto.hasDefaultValue()) { - if (isRepeated()) { - throw new DescriptorValidationException(this, - "Repeated fields cannot have default values."); - } - - try { - switch (getType()) { - case INT32: - case SINT32: - case SFIXED32: - defaultValue = TextFormat.parseInt32(proto.getDefaultValue()); - break; - case UINT32: - case FIXED32: - defaultValue = TextFormat.parseUInt32(proto.getDefaultValue()); - break; - case INT64: - case SINT64: - case SFIXED64: - defaultValue = TextFormat.parseInt64(proto.getDefaultValue()); - break; - case UINT64: - case FIXED64: - defaultValue = TextFormat.parseUInt64(proto.getDefaultValue()); - break; - case FLOAT: - if (proto.getDefaultValue().equals("inf")) { - defaultValue = Float.POSITIVE_INFINITY; - } else if (proto.getDefaultValue().equals("-inf")) { - defaultValue = Float.NEGATIVE_INFINITY; - } else if (proto.getDefaultValue().equals("nan")) { - defaultValue = Float.NaN; - } else { - defaultValue = Float.valueOf(proto.getDefaultValue()); - } - break; - case DOUBLE: - if (proto.getDefaultValue().equals("inf")) { - defaultValue = Double.POSITIVE_INFINITY; - } else if (proto.getDefaultValue().equals("-inf")) { - defaultValue = Double.NEGATIVE_INFINITY; - } else if (proto.getDefaultValue().equals("nan")) { - defaultValue = Double.NaN; - } else { - defaultValue = Double.valueOf(proto.getDefaultValue()); - } - break; - case BOOL: - defaultValue = Boolean.valueOf(proto.getDefaultValue()); - break; - case STRING: - defaultValue = proto.getDefaultValue(); - break; - case BYTES: - try { - defaultValue = - TextFormat.unescapeBytes(proto.getDefaultValue()); - } catch (TextFormat.InvalidEscapeSequenceException e) { - throw new DescriptorValidationException(this, - "Couldn't parse default value: " + e.getMessage(), e); - } - break; - case ENUM: - defaultValue = enumType.findValueByName(proto.getDefaultValue()); - if (defaultValue == null) { - throw new DescriptorValidationException(this, - "Unknown enum default value: \"" + - proto.getDefaultValue() + '\"'); - } - break; - case MESSAGE: - case GROUP: - throw new DescriptorValidationException(this, - "Message type had default value."); - } - } catch (NumberFormatException e) { - throw new DescriptorValidationException(this, - "Could not parse default value: \"" + - proto.getDefaultValue() + '\"', e); - } - } else { - // Determine the default default for this field. - if (isRepeated()) { - defaultValue = Collections.emptyList(); - } else { - switch (getJavaType()) { - case ENUM: - // We guarantee elsewhere that an enum type always has at least - // one possible value. - defaultValue = enumType.getValues().get(0); - break; - case MESSAGE: - defaultValue = null; - break; - default: - defaultValue = getJavaType().defaultDefault; - break; - } - } - } - - if (!isExtension()) { - file.pool.addFieldByNumber(this); - } - - if (containingType != null && - containingType.getOptions().getMessageSetWireFormat()) { - if (isExtension()) { - if (!isOptional() || getType() != Type.MESSAGE) { - throw new DescriptorValidationException(this, - "Extensions of MessageSets must be optional messages."); - } - } else { - throw new DescriptorValidationException(this, - "MessageSets cannot have fields, only extensions."); - } - } - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final FieldDescriptorProto proto) { - this.proto = proto; - } - - /** - * For internal use only. This is to satisfy the FieldDescriptorLite - * interface. - */ - public MessageLite.Builder internalMergeFrom( - MessageLite.Builder to, MessageLite from) { - // FieldDescriptors are only used with non-lite messages so we can just - // down-cast and call mergeFrom directly. - return ((Message.Builder) to).mergeFrom((Message) from); - } - } - - // ================================================================= - - /** Describes an enum type. */ - public static final class EnumDescriptor - implements GenericDescriptor, Internal.EnumLiteMap { - /** - * Get the index of this descriptor within its parent. - * @see Descriptor#getIndex() - */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public EnumDescriptorProto toProto() { return proto; } - - /** Get the type's unqualified name. */ - public String getName() { return proto.getName(); } - - /** - * Get the type's fully-qualified name. - * @see Descriptor#getFullName() - */ - public String getFullName() { return fullName; } - - /** Get the {@link FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** If this is a nested type, get the outer descriptor, otherwise null. */ - public Descriptor getContainingType() { return containingType; } - - /** Get the {@code EnumOptions}, defined in {@code descriptor.proto}. */ - public EnumOptions getOptions() { return proto.getOptions(); } - - /** Get a list of defined values for this enum. */ - public List getValues() { - return Collections.unmodifiableList(Arrays.asList(values)); - } - - /** - * Find an enum value by name. - * @param name The unqualified name of the value (e.g. "FOO"). - * @return the value's decsriptor, or {@code null} if not found. - */ - public EnumValueDescriptor findValueByName(final String name) { - final GenericDescriptor result = - file.pool.findSymbol(fullName + '.' + name); - if (result != null && result instanceof EnumValueDescriptor) { - return (EnumValueDescriptor)result; - } else { - return null; - } - } - - /** - * Find an enum value by number. If multiple enum values have the same - * number, this returns the first defined value with that number. - * @param number The value's number. - * @return the value's decsriptor, or {@code null} if not found. - */ - public EnumValueDescriptor findValueByNumber(final int number) { - return file.pool.enumValuesByNumber.get( - new DescriptorPool.DescriptorIntPair(this, number)); - } - - private final int index; - private EnumDescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private final Descriptor containingType; - private EnumValueDescriptor[] values; - - private EnumDescriptor(final EnumDescriptorProto proto, - final FileDescriptor file, - final Descriptor parent, - final int index) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - fullName = computeFullName(file, parent, proto.getName()); - this.file = file; - containingType = parent; - - if (proto.getValueCount() == 0) { - // We cannot allow enums with no values because this would mean there - // would be no valid default value for fields of this type. - throw new DescriptorValidationException(this, - "Enums must contain at least one value."); - } - - values = new EnumValueDescriptor[proto.getValueCount()]; - for (int i = 0; i < proto.getValueCount(); i++) { - values[i] = new EnumValueDescriptor( - proto.getValue(i), file, this, i); - } - - file.pool.addSymbol(this); - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final EnumDescriptorProto proto) { - this.proto = proto; - - for (int i = 0; i < values.length; i++) { - values[i].setProto(proto.getValue(i)); - } - } - } - - // ================================================================= - - /** - * Describes one value within an enum type. Note that multiple defined - * values may have the same number. In generated Java code, all values - * with the same number after the first become aliases of the first. - * However, they still have independent EnumValueDescriptors. - */ - public static final class EnumValueDescriptor - implements GenericDescriptor, Internal.EnumLite { - /** - * Get the index of this descriptor within its parent. - * @see Descriptor#getIndex() - */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public EnumValueDescriptorProto toProto() { return proto; } - - /** Get the value's unqualified name. */ - public String getName() { return proto.getName(); } - - /** Get the value's number. */ - public int getNumber() { return proto.getNumber(); } - - /** - * Get the value's fully-qualified name. - * @see Descriptor#getFullName() - */ - public String getFullName() { return fullName; } - - /** Get the {@link FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** Get the value's enum type. */ - public EnumDescriptor getType() { return type; } - - /** - * Get the {@code EnumValueOptions}, defined in {@code descriptor.proto}. - */ - public EnumValueOptions getOptions() { return proto.getOptions(); } - - private final int index; - private EnumValueDescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private final EnumDescriptor type; - - private EnumValueDescriptor(final EnumValueDescriptorProto proto, - final FileDescriptor file, - final EnumDescriptor parent, - final int index) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - this.file = file; - type = parent; - - fullName = parent.getFullName() + '.' + proto.getName(); - - file.pool.addSymbol(this); - file.pool.addEnumValueByNumber(this); - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final EnumValueDescriptorProto proto) { - this.proto = proto; - } - } - - // ================================================================= - - /** Describes a service type. */ - public static final class ServiceDescriptor implements GenericDescriptor { - /** - * Get the index of this descriptor within its parent. - * * @see Descriptors.Descriptor#getIndex() - */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public ServiceDescriptorProto toProto() { return proto; } - - /** Get the type's unqualified name. */ - public String getName() { return proto.getName(); } - - /** - * Get the type's fully-qualified name. - * @see Descriptor#getFullName() - */ - public String getFullName() { return fullName; } - - /** Get the {@link FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** Get the {@code ServiceOptions}, defined in {@code descriptor.proto}. */ - public ServiceOptions getOptions() { return proto.getOptions(); } - - /** Get a list of methods for this service. */ - public List getMethods() { - return Collections.unmodifiableList(Arrays.asList(methods)); - } - - /** - * Find a method by name. - * @param name The unqualified name of the method (e.g. "Foo"). - * @return the method's decsriptor, or {@code null} if not found. - */ - public MethodDescriptor findMethodByName(final String name) { - final GenericDescriptor result = - file.pool.findSymbol(fullName + '.' + name); - if (result != null && result instanceof MethodDescriptor) { - return (MethodDescriptor)result; - } else { - return null; - } - } - - private final int index; - private ServiceDescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private MethodDescriptor[] methods; - - private ServiceDescriptor(final ServiceDescriptorProto proto, - final FileDescriptor file, - final int index) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - fullName = computeFullName(file, null, proto.getName()); - this.file = file; - - methods = new MethodDescriptor[proto.getMethodCount()]; - for (int i = 0; i < proto.getMethodCount(); i++) { - methods[i] = new MethodDescriptor( - proto.getMethod(i), file, this, i); - } - - file.pool.addSymbol(this); - } - - private void crossLink() throws DescriptorValidationException { - for (final MethodDescriptor method : methods) { - method.crossLink(); - } - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final ServiceDescriptorProto proto) { - this.proto = proto; - - for (int i = 0; i < methods.length; i++) { - methods[i].setProto(proto.getMethod(i)); - } - } - } - - // ================================================================= - - /** - * Describes one method within a service type. - */ - public static final class MethodDescriptor implements GenericDescriptor { - /** - * Get the index of this descriptor within its parent. - * * @see Descriptors.Descriptor#getIndex() - */ - public int getIndex() { return index; } - - /** Convert the descriptor to its protocol message representation. */ - public MethodDescriptorProto toProto() { return proto; } - - /** Get the method's unqualified name. */ - public String getName() { return proto.getName(); } - - /** - * Get the method's fully-qualified name. - * @see Descriptor#getFullName() - */ - public String getFullName() { return fullName; } - - /** Get the {@link FileDescriptor} containing this descriptor. */ - public FileDescriptor getFile() { return file; } - - /** Get the method's service type. */ - public ServiceDescriptor getService() { return service; } - - /** Get the method's input type. */ - public Descriptor getInputType() { return inputType; } - - /** Get the method's output type. */ - public Descriptor getOutputType() { return outputType; } - - /** - * Get the {@code MethodOptions}, defined in {@code descriptor.proto}. - */ - public MethodOptions getOptions() { return proto.getOptions(); } - - private final int index; - private MethodDescriptorProto proto; - private final String fullName; - private final FileDescriptor file; - private final ServiceDescriptor service; - - // Initialized during cross-linking. - private Descriptor inputType; - private Descriptor outputType; - - private MethodDescriptor(final MethodDescriptorProto proto, - final FileDescriptor file, - final ServiceDescriptor parent, - final int index) - throws DescriptorValidationException { - this.index = index; - this.proto = proto; - this.file = file; - service = parent; - - fullName = parent.getFullName() + '.' + proto.getName(); - - file.pool.addSymbol(this); - } - - private void crossLink() throws DescriptorValidationException { - final GenericDescriptor input = - file.pool.lookupSymbol(proto.getInputType(), this); - if (!(input instanceof Descriptor)) { - throw new DescriptorValidationException(this, - '\"' + proto.getInputType() + "\" is not a message type."); - } - inputType = (Descriptor)input; - - final GenericDescriptor output = - file.pool.lookupSymbol(proto.getOutputType(), this); - if (!(output instanceof Descriptor)) { - throw new DescriptorValidationException(this, - '\"' + proto.getOutputType() + "\" is not a message type."); - } - outputType = (Descriptor)output; - } - - /** See {@link FileDescriptor#setProto}. */ - private void setProto(final MethodDescriptorProto proto) { - this.proto = proto; - } - } - - // ================================================================= - - private static String computeFullName(final FileDescriptor file, - final Descriptor parent, - final String name) { - if (parent != null) { - return parent.getFullName() + '.' + name; - } else if (file.getPackage().length() > 0) { - return file.getPackage() + '.' + name; - } else { - return name; - } - } - - // ================================================================= - - /** - * All descriptors except {@code FileDescriptor} implement this to make - * {@code DescriptorPool}'s life easier. - */ - private interface GenericDescriptor { - Message toProto(); - String getName(); - String getFullName(); - FileDescriptor getFile(); - } - - /** - * Thrown when building descriptors fails because the source DescriptorProtos - * are not valid. - */ - public static class DescriptorValidationException extends Exception { - private static final long serialVersionUID = 5750205775490483148L; - - /** Gets the full name of the descriptor where the error occurred. */ - public String getProblemSymbolName() { return name; } - - /** - * Gets the the protocol message representation of the invalid descriptor. - */ - public Message getProblemProto() { return proto; } - - /** - * Gets a human-readable description of the error. - */ - public String getDescription() { return description; } - - private final String name; - private final Message proto; - private final String description; - - private DescriptorValidationException( - final GenericDescriptor problemDescriptor, - final String description) { - super(problemDescriptor.getFullName() + ": " + description); - - // Note that problemDescriptor may be partially uninitialized, so we - // don't want to expose it directly to the user. So, we only provide - // the name and the original proto. - name = problemDescriptor.getFullName(); - proto = problemDescriptor.toProto(); - this.description = description; - } - - private DescriptorValidationException( - final GenericDescriptor problemDescriptor, - final String description, - final Throwable cause) { - this(problemDescriptor, description); - initCause(cause); - } - - private DescriptorValidationException( - final FileDescriptor problemDescriptor, - final String description) { - super(problemDescriptor.getName() + ": " + description); - - // Note that problemDescriptor may be partially uninitialized, so we - // don't want to expose it directly to the user. So, we only provide - // the name and the original proto. - name = problemDescriptor.getName(); - proto = problemDescriptor.toProto(); - this.description = description; - } - } - - // ================================================================= - - /** - * A private helper class which contains lookup tables containing all the - * descriptors defined in a particular file. - */ - private static final class DescriptorPool { - DescriptorPool(final FileDescriptor[] dependencies) { - this.dependencies = new DescriptorPool[dependencies.length]; - - for (int i = 0; i < dependencies.length; i++) { - this.dependencies[i] = dependencies[i].pool; - } - - for (final FileDescriptor dependency : dependencies) { - try { - addPackage(dependency.getPackage(), dependency); - } catch (DescriptorValidationException e) { - // Can't happen, because addPackage() only fails when the name - // conflicts with a non-package, but we have not yet added any - // non-packages at this point. - assert false; - } - } - } - - private final DescriptorPool[] dependencies; - - private final Map descriptorsByName = - new HashMap(); - private final Map fieldsByNumber = - new HashMap(); - private final Map enumValuesByNumber - = new HashMap(); - - /** Find a generic descriptor by fully-qualified name. */ - GenericDescriptor findSymbol(final String fullName) { - GenericDescriptor result = descriptorsByName.get(fullName); - if (result != null) { - return result; - } - - for (final DescriptorPool dependency : dependencies) { - result = dependency.descriptorsByName.get(fullName); - if (result != null) { - return result; - } - } - - return null; - } - - /** - * Look up a descriptor by name, relative to some other descriptor. - * The name may be fully-qualified (with a leading '.'), - * partially-qualified, or unqualified. C++-like name lookup semantics - * are used to search for the matching descriptor. - */ - GenericDescriptor lookupSymbol(final String name, - final GenericDescriptor relativeTo) - throws DescriptorValidationException { - // TODO(kenton): This could be optimized in a number of ways. - - GenericDescriptor result; - if (name.startsWith(".")) { - // Fully-qualified name. - result = findSymbol(name.substring(1)); - } else { - // If "name" is a compound identifier, we want to search for the - // first component of it, then search within it for the rest. - final int firstPartLength = name.indexOf('.'); - final String firstPart; - if (firstPartLength == -1) { - firstPart = name; - } else { - firstPart = name.substring(0, firstPartLength); - } - - // We will search each parent scope of "relativeTo" looking for the - // symbol. - final StringBuilder scopeToTry = - new StringBuilder(relativeTo.getFullName()); - - while (true) { - // Chop off the last component of the scope. - final int dotpos = scopeToTry.lastIndexOf("."); - if (dotpos == -1) { - result = findSymbol(name); - break; - } else { - scopeToTry.setLength(dotpos + 1); - - // Append firstPart and try to find. - scopeToTry.append(firstPart); - result = findSymbol(scopeToTry.toString()); - - if (result != null) { - if (firstPartLength != -1) { - // We only found the first part of the symbol. Now look for - // the whole thing. If this fails, we *don't* want to keep - // searching parent scopes. - scopeToTry.setLength(dotpos + 1); - scopeToTry.append(name); - result = findSymbol(scopeToTry.toString()); - } - break; - } - - // Not found. Remove the name so we can try again. - scopeToTry.setLength(dotpos); - } - } - } - - if (result == null) { - throw new DescriptorValidationException(relativeTo, - '\"' + name + "\" is not defined."); - } else { - return result; - } - } - - /** - * Adds a symbol to the symbol table. If a symbol with the same name - * already exists, throws an error. - */ - void addSymbol(final GenericDescriptor descriptor) - throws DescriptorValidationException { - validateSymbolName(descriptor); - - final String fullName = descriptor.getFullName(); - final int dotpos = fullName.lastIndexOf('.'); - - final GenericDescriptor old = descriptorsByName.put(fullName, descriptor); - if (old != null) { - descriptorsByName.put(fullName, old); - - if (descriptor.getFile() == old.getFile()) { - if (dotpos == -1) { - throw new DescriptorValidationException(descriptor, - '\"' + fullName + "\" is already defined."); - } else { - throw new DescriptorValidationException(descriptor, - '\"' + fullName.substring(dotpos + 1) + - "\" is already defined in \"" + - fullName.substring(0, dotpos) + "\"."); - } - } else { - throw new DescriptorValidationException(descriptor, - '\"' + fullName + "\" is already defined in file \"" + - old.getFile().getName() + "\"."); - } - } - } - - /** - * Represents a package in the symbol table. We use PackageDescriptors - * just as placeholders so that someone cannot define, say, a message type - * that has the same name as an existing package. - */ - private static final class PackageDescriptor implements GenericDescriptor { - public Message toProto() { return file.toProto(); } - public String getName() { return name; } - public String getFullName() { return fullName; } - public FileDescriptor getFile() { return file; } - - PackageDescriptor(final String name, final String fullName, - final FileDescriptor file) { - this.file = file; - this.fullName = fullName; - this.name = name; - } - - private final String name; - private final String fullName; - private final FileDescriptor file; - } - - /** - * Adds a package to the symbol tables. If a package by the same name - * already exists, that is fine, but if some other kind of symbol exists - * under the same name, an exception is thrown. If the package has - * multiple components, this also adds the parent package(s). - */ - void addPackage(final String fullName, final FileDescriptor file) - throws DescriptorValidationException { - final int dotpos = fullName.lastIndexOf('.'); - final String name; - if (dotpos == -1) { - name = fullName; - } else { - addPackage(fullName.substring(0, dotpos), file); - name = fullName.substring(dotpos + 1); - } - - final GenericDescriptor old = - descriptorsByName.put(fullName, - new PackageDescriptor(name, fullName, file)); - if (old != null) { - descriptorsByName.put(fullName, old); - if (!(old instanceof PackageDescriptor)) { - throw new DescriptorValidationException(file, - '\"' + name + "\" is already defined (as something other than a " - + "package) in file \"" + old.getFile().getName() + "\"."); - } - } - } - - /** A (GenericDescriptor, int) pair, used as a map key. */ - private static final class DescriptorIntPair { - private final GenericDescriptor descriptor; - private final int number; - - DescriptorIntPair(final GenericDescriptor descriptor, final int number) { - this.descriptor = descriptor; - this.number = number; - } - - @Override - public int hashCode() { - return descriptor.hashCode() * ((1 << 16) - 1) + number; - } - @Override - public boolean equals(final Object obj) { - if (!(obj instanceof DescriptorIntPair)) { - return false; - } - final DescriptorIntPair other = (DescriptorIntPair)obj; - return descriptor == other.descriptor && number == other.number; - } - } - - /** - * Adds a field to the fieldsByNumber table. Throws an exception if a - * field with hte same containing type and number already exists. - */ - void addFieldByNumber(final FieldDescriptor field) - throws DescriptorValidationException { - final DescriptorIntPair key = - new DescriptorIntPair(field.getContainingType(), field.getNumber()); - final FieldDescriptor old = fieldsByNumber.put(key, field); - if (old != null) { - fieldsByNumber.put(key, old); - throw new DescriptorValidationException(field, - "Field number " + field.getNumber() + - "has already been used in \"" + - field.getContainingType().getFullName() + - "\" by field \"" + old.getName() + "\"."); - } - } - - /** - * Adds an enum value to the enumValuesByNumber table. If an enum value - * with the same type and number already exists, does nothing. (This is - * allowed; the first value define with the number takes precedence.) - */ - void addEnumValueByNumber(final EnumValueDescriptor value) { - final DescriptorIntPair key = - new DescriptorIntPair(value.getType(), value.getNumber()); - final EnumValueDescriptor old = enumValuesByNumber.put(key, value); - if (old != null) { - enumValuesByNumber.put(key, old); - // Not an error: Multiple enum values may have the same number, but - // we only want the first one in the map. - } - } - - /** - * Verifies that the descriptor's name is valid (i.e. it contains only - * letters, digits, and underscores, and does not start with a digit). - */ - static void validateSymbolName(final GenericDescriptor descriptor) - throws DescriptorValidationException { - final String name = descriptor.getName(); - if (name.length() == 0) { - throw new DescriptorValidationException(descriptor, "Missing name."); - } else { - boolean valid = true; - for (int i = 0; i < name.length(); i++) { - final char c = name.charAt(i); - // Non-ASCII characters are not valid in protobuf identifiers, even - // if they are letters or digits. - if (c >= 128) { - valid = false; - } - // First character must be letter or _. Subsequent characters may - // be letters, numbers, or digits. - if (Character.isLetter(c) || c == '_' || - (Character.isDigit(c) && i > 0)) { - // Valid - } else { - valid = false; - } - } - if (!valid) { - throw new DescriptorValidationException(descriptor, - '\"' + name + "\" is not a valid identifier."); - } - } - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java deleted file mode 100644 index c106b662..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java +++ /dev/null @@ -1,438 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; - -import java.io.InputStream; -import java.io.IOException; -import java.util.Map; - -/** - * An implementation of {@link Message} that can represent arbitrary types, - * given a {@link Descriptors.Descriptor}. - * - * @author kenton@google.com Kenton Varda - */ -public final class DynamicMessage extends AbstractMessage { - private final Descriptor type; - private final FieldSet fields; - private final UnknownFieldSet unknownFields; - private int memoizedSize = -1; - - /** - * Construct a {@code DynamicMessage} using the given {@code FieldSet}. - */ - private DynamicMessage(Descriptor type, FieldSet fields, - UnknownFieldSet unknownFields) { - this.type = type; - this.fields = fields; - this.unknownFields = unknownFields; - } - - /** - * Get a {@code DynamicMessage} representing the default instance of the - * given type. - */ - public static DynamicMessage getDefaultInstance(Descriptor type) { - return new DynamicMessage(type, FieldSet.emptySet(), - UnknownFieldSet.getDefaultInstance()); - } - - /** Parse a message of the given type from the given input stream. */ - public static DynamicMessage parseFrom(Descriptor type, - CodedInputStream input) - throws IOException { - return newBuilder(type).mergeFrom(input).buildParsed(); - } - - /** Parse a message of the given type from the given input stream. */ - public static DynamicMessage parseFrom( - Descriptor type, - CodedInputStream input, - ExtensionRegistry extensionRegistry) - throws IOException { - return newBuilder(type).mergeFrom(input, extensionRegistry).buildParsed(); - } - - /** Parse {@code data} as a message of the given type and return it. */ - public static DynamicMessage parseFrom(Descriptor type, ByteString data) - throws InvalidProtocolBufferException { - return newBuilder(type).mergeFrom(data).buildParsed(); - } - - /** Parse {@code data} as a message of the given type and return it. */ - public static DynamicMessage parseFrom(Descriptor type, ByteString data, - ExtensionRegistry extensionRegistry) - throws InvalidProtocolBufferException { - return newBuilder(type).mergeFrom(data, extensionRegistry).buildParsed(); - } - - /** Parse {@code data} as a message of the given type and return it. */ - public static DynamicMessage parseFrom(Descriptor type, byte[] data) - throws InvalidProtocolBufferException { - return newBuilder(type).mergeFrom(data).buildParsed(); - } - - /** Parse {@code data} as a message of the given type and return it. */ - public static DynamicMessage parseFrom(Descriptor type, byte[] data, - ExtensionRegistry extensionRegistry) - throws InvalidProtocolBufferException { - return newBuilder(type).mergeFrom(data, extensionRegistry).buildParsed(); - } - - /** Parse a message of the given type from {@code input} and return it. */ - public static DynamicMessage parseFrom(Descriptor type, InputStream input) - throws IOException { - return newBuilder(type).mergeFrom(input).buildParsed(); - } - - /** Parse a message of the given type from {@code input} and return it. */ - public static DynamicMessage parseFrom(Descriptor type, InputStream input, - ExtensionRegistry extensionRegistry) - throws IOException { - return newBuilder(type).mergeFrom(input, extensionRegistry).buildParsed(); - } - - /** Construct a {@link Message.Builder} for the given type. */ - public static Builder newBuilder(Descriptor type) { - return new Builder(type); - } - - /** - * Construct a {@link Message.Builder} for a message of the same type as - * {@code prototype}, and initialize it with {@code prototype}'s contents. - */ - public static Builder newBuilder(Message prototype) { - return new Builder(prototype.getDescriptorForType()).mergeFrom(prototype); - } - - // ----------------------------------------------------------------- - // Implementation of Message interface. - - public Descriptor getDescriptorForType() { - return type; - } - - public DynamicMessage getDefaultInstanceForType() { - return getDefaultInstance(type); - } - - public Map getAllFields() { - return fields.getAllFields(); - } - - public boolean hasField(FieldDescriptor field) { - verifyContainingType(field); - return fields.hasField(field); - } - - public Object getField(FieldDescriptor field) { - verifyContainingType(field); - Object result = fields.getField(field); - if (result == null) { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - result = getDefaultInstance(field.getMessageType()); - } else { - result = field.getDefaultValue(); - } - } - return result; - } - - public int getRepeatedFieldCount(FieldDescriptor field) { - verifyContainingType(field); - return fields.getRepeatedFieldCount(field); - } - - public Object getRepeatedField(FieldDescriptor field, int index) { - verifyContainingType(field); - return fields.getRepeatedField(field, index); - } - - public UnknownFieldSet getUnknownFields() { - return unknownFields; - } - - private static boolean isInitialized(Descriptor type, - FieldSet fields) { - // Check that all required fields are present. - for (final FieldDescriptor field : type.getFields()) { - if (field.isRequired()) { - if (!fields.hasField(field)) { - return false; - } - } - } - - // Check that embedded messages are initialized. - return fields.isInitialized(); - } - - public boolean isInitialized() { - return isInitialized(type, fields); - } - - public void writeTo(CodedOutputStream output) throws IOException { - if (type.getOptions().getMessageSetWireFormat()) { - fields.writeMessageSetTo(output); - unknownFields.writeAsMessageSetTo(output); - } else { - fields.writeTo(output); - unknownFields.writeTo(output); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - if (type.getOptions().getMessageSetWireFormat()) { - size = fields.getMessageSetSerializedSize(); - size += unknownFields.getSerializedSizeAsMessageSet(); - } else { - size = fields.getSerializedSize(); - size += unknownFields.getSerializedSize(); - } - - memoizedSize = size; - return size; - } - - public Builder newBuilderForType() { - return new Builder(type); - } - - public Builder toBuilder() { - return newBuilderForType().mergeFrom(this); - } - - /** Verifies that the field is a field of this message. */ - private void verifyContainingType(FieldDescriptor field) { - if (field.getContainingType() != type) { - throw new IllegalArgumentException( - "FieldDescriptor does not match message type."); - } - } - - // ================================================================= - - /** - * Builder for {@link DynamicMessage}s. - */ - public static final class Builder extends AbstractMessage.Builder { - private final Descriptor type; - private FieldSet fields; - private UnknownFieldSet unknownFields; - - /** Construct a {@code Builder} for the given type. */ - private Builder(Descriptor type) { - this.type = type; - this.fields = FieldSet.newFieldSet(); - this.unknownFields = UnknownFieldSet.getDefaultInstance(); - } - - // --------------------------------------------------------------- - // Implementation of Message.Builder interface. - - public Builder clear() { - if (fields == null) { - throw new IllegalStateException("Cannot call clear() after build()."); - } - fields.clear(); - return this; - } - - public Builder mergeFrom(Message other) { - if (other instanceof DynamicMessage) { - // This should be somewhat faster than calling super.mergeFrom(). - DynamicMessage otherDynamicMessage = (DynamicMessage) other; - if (otherDynamicMessage.type != type) { - throw new IllegalArgumentException( - "mergeFrom(Message) can only merge messages of the same type."); - } - fields.mergeFrom(otherDynamicMessage.fields); - mergeUnknownFields(otherDynamicMessage.unknownFields); - return this; - } else { - return super.mergeFrom(other); - } - } - - public DynamicMessage build() { - // If fields == null, we'll throw an appropriate exception later. - if (fields != null && !isInitialized()) { - throw newUninitializedMessageException( - new DynamicMessage(type, fields, unknownFields)); - } - return buildPartial(); - } - - /** - * Helper for DynamicMessage.parseFrom() methods to call. Throws - * {@link InvalidProtocolBufferException} instead of - * {@link UninitializedMessageException}. - */ - private DynamicMessage buildParsed() throws InvalidProtocolBufferException { - if (!isInitialized()) { - throw newUninitializedMessageException( - new DynamicMessage(type, fields, unknownFields)) - .asInvalidProtocolBufferException(); - } - return buildPartial(); - } - - public DynamicMessage buildPartial() { - if (fields == null) { - throw new IllegalStateException( - "build() has already been called on this Builder."); - } - fields.makeImmutable(); - DynamicMessage result = - new DynamicMessage(type, fields, unknownFields); - fields = null; - unknownFields = null; - return result; - } - - public Builder clone() { - Builder result = new Builder(type); - result.fields.mergeFrom(fields); - return result; - } - - public boolean isInitialized() { - return DynamicMessage.isInitialized(type, fields); - } - - public Descriptor getDescriptorForType() { - return type; - } - - public DynamicMessage getDefaultInstanceForType() { - return getDefaultInstance(type); - } - - public Map getAllFields() { - return fields.getAllFields(); - } - - public Builder newBuilderForField(FieldDescriptor field) { - verifyContainingType(field); - - if (field.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { - throw new IllegalArgumentException( - "newBuilderForField is only valid for fields with message type."); - } - - return new Builder(field.getMessageType()); - } - - public boolean hasField(FieldDescriptor field) { - verifyContainingType(field); - return fields.hasField(field); - } - - public Object getField(FieldDescriptor field) { - verifyContainingType(field); - Object result = fields.getField(field); - if (result == null) { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - result = getDefaultInstance(field.getMessageType()); - } else { - result = field.getDefaultValue(); - } - } - return result; - } - - public Builder setField(FieldDescriptor field, Object value) { - verifyContainingType(field); - fields.setField(field, value); - return this; - } - - public Builder clearField(FieldDescriptor field) { - verifyContainingType(field); - fields.clearField(field); - return this; - } - - public int getRepeatedFieldCount(FieldDescriptor field) { - verifyContainingType(field); - return fields.getRepeatedFieldCount(field); - } - - public Object getRepeatedField(FieldDescriptor field, int index) { - verifyContainingType(field); - return fields.getRepeatedField(field, index); - } - - public Builder setRepeatedField(FieldDescriptor field, - int index, Object value) { - verifyContainingType(field); - fields.setRepeatedField(field, index, value); - return this; - } - - public Builder addRepeatedField(FieldDescriptor field, Object value) { - verifyContainingType(field); - fields.addRepeatedField(field, value); - return this; - } - - public UnknownFieldSet getUnknownFields() { - return unknownFields; - } - - public Builder setUnknownFields(UnknownFieldSet unknownFields) { - this.unknownFields = unknownFields; - return this; - } - - public Builder mergeUnknownFields(UnknownFieldSet unknownFields) { - this.unknownFields = - UnknownFieldSet.newBuilder(this.unknownFields) - .mergeFrom(unknownFields) - .build(); - return this; - } - - /** Verifies that the field is a field of this message. */ - private void verifyContainingType(FieldDescriptor field) { - if (field.getContainingType() != type) { - throw new IllegalArgumentException( - "FieldDescriptor does not match message type."); - } - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java deleted file mode 100644 index d4f6ba9e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java +++ /dev/null @@ -1,266 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * A table of known extensions, searchable by name or field number. When - * parsing a protocol message that might have extensions, you must provide - * an {@code ExtensionRegistry} in which you have registered any extensions - * that you want to be able to parse. Otherwise, those extensions will just - * be treated like unknown fields. - * - *

For example, if you had the {@code .proto} file: - * - *

- * option java_class = "MyProto";
- *
- * message Foo {
- *   extensions 1000 to max;
- * }
- *
- * extend Foo {
- *   optional int32 bar;
- * }
- * 
- * - * Then you might write code like: - * - *
- * ExtensionRegistry registry = ExtensionRegistry.newInstance();
- * registry.add(MyProto.bar);
- * MyProto.Foo message = MyProto.Foo.parseFrom(input, registry);
- * 
- * - *

Background: - * - *

You might wonder why this is necessary. Two alternatives might come to - * mind. First, you might imagine a system where generated extensions are - * automatically registered when their containing classes are loaded. This - * is a popular technique, but is bad design; among other things, it creates a - * situation where behavior can change depending on what classes happen to be - * loaded. It also introduces a security vulnerability, because an - * unprivileged class could cause its code to be called unexpectedly from a - * privileged class by registering itself as an extension of the right type. - * - *

Another option you might consider is lazy parsing: do not parse an - * extension until it is first requested, at which point the caller must - * provide a type to use. This introduces a different set of problems. First, - * it would require a mutex lock any time an extension was accessed, which - * would be slow. Second, corrupt data would not be detected until first - * access, at which point it would be much harder to deal with it. Third, it - * could violate the expectation that message objects are immutable, since the - * type provided could be any arbitrary message class. An unprivileged user - * could take advantage of this to inject a mutable object into a message - * belonging to privileged code and create mischief. - * - * @author kenton@google.com Kenton Varda - */ -public final class ExtensionRegistry extends ExtensionRegistryLite { - /** Construct a new, empty instance. */ - public static ExtensionRegistry newInstance() { - return new ExtensionRegistry(); - } - - /** Get the unmodifiable singleton empty instance. */ - public static ExtensionRegistry getEmptyRegistry() { - return EMPTY; - } - - /** Returns an unmodifiable view of the registry. */ - @Override - public ExtensionRegistry getUnmodifiable() { - return new ExtensionRegistry(this); - } - - /** A (Descriptor, Message) pair, returned by lookup methods. */ - public static final class ExtensionInfo { - /** The extension's descriptor. */ - public final FieldDescriptor descriptor; - - /** - * A default instance of the extension's type, if it has a message type. - * Otherwise, {@code null}. - */ - public final Message defaultInstance; - - private ExtensionInfo(final FieldDescriptor descriptor) { - this.descriptor = descriptor; - defaultInstance = null; - } - private ExtensionInfo(final FieldDescriptor descriptor, - final Message defaultInstance) { - this.descriptor = descriptor; - this.defaultInstance = defaultInstance; - } - } - - /** - * Find an extension by fully-qualified field name, in the proto namespace. - * I.e. {@code result.descriptor.fullName()} will match {@code fullName} if - * a match is found. - * - * @return Information about the extension if found, or {@code null} - * otherwise. - */ - public ExtensionInfo findExtensionByName(final String fullName) { - return extensionsByName.get(fullName); - } - - /** - * Find an extension by containing type and field number. - * - * @return Information about the extension if found, or {@code null} - * otherwise. - */ - public ExtensionInfo findExtensionByNumber(final Descriptor containingType, - final int fieldNumber) { - return extensionsByNumber.get( - new DescriptorIntPair(containingType, fieldNumber)); - } - - /** Add an extension from a generated file to the registry. */ - public void add(final GeneratedMessage.GeneratedExtension extension) { - if (extension.getDescriptor().getJavaType() == - FieldDescriptor.JavaType.MESSAGE) { - if (extension.getMessageDefaultInstance() == null) { - throw new IllegalStateException( - "Registered message-type extension had null default instance: " + - extension.getDescriptor().getFullName()); - } - add(new ExtensionInfo(extension.getDescriptor(), - extension.getMessageDefaultInstance())); - } else { - add(new ExtensionInfo(extension.getDescriptor(), null)); - } - } - - /** Add a non-message-type extension to the registry by descriptor. */ - public void add(final FieldDescriptor type) { - if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - throw new IllegalArgumentException( - "ExtensionRegistry.add() must be provided a default instance when " + - "adding an embedded message extension."); - } - add(new ExtensionInfo(type, null)); - } - - /** Add a message-type extension to the registry by descriptor. */ - public void add(final FieldDescriptor type, final Message defaultInstance) { - if (type.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { - throw new IllegalArgumentException( - "ExtensionRegistry.add() provided a default instance for a " + - "non-message extension."); - } - add(new ExtensionInfo(type, defaultInstance)); - } - - // ================================================================= - // Private stuff. - - private ExtensionRegistry() { - this.extensionsByName = new HashMap(); - this.extensionsByNumber = new HashMap(); - } - - private ExtensionRegistry(ExtensionRegistry other) { - super(other); - this.extensionsByName = Collections.unmodifiableMap(other.extensionsByName); - this.extensionsByNumber = - Collections.unmodifiableMap(other.extensionsByNumber); - } - - private final Map extensionsByName; - private final Map extensionsByNumber; - - private ExtensionRegistry(boolean empty) { - super(ExtensionRegistryLite.getEmptyRegistry()); - this.extensionsByName = Collections.emptyMap(); - this.extensionsByNumber = - Collections.emptyMap(); - } - private static final ExtensionRegistry EMPTY = new ExtensionRegistry(true); - - private void add(final ExtensionInfo extension) { - if (!extension.descriptor.isExtension()) { - throw new IllegalArgumentException( - "ExtensionRegistry.add() was given a FieldDescriptor for a regular " + - "(non-extension) field."); - } - - extensionsByName.put(extension.descriptor.getFullName(), extension); - extensionsByNumber.put( - new DescriptorIntPair(extension.descriptor.getContainingType(), - extension.descriptor.getNumber()), - extension); - - final FieldDescriptor field = extension.descriptor; - if (field.getContainingType().getOptions().getMessageSetWireFormat() && - field.getType() == FieldDescriptor.Type.MESSAGE && - field.isOptional() && - field.getExtensionScope() == field.getMessageType()) { - // This is an extension of a MessageSet type defined within the extension - // type's own scope. For backwards-compatibility, allow it to be looked - // up by type name. - extensionsByName.put(field.getMessageType().getFullName(), extension); - } - } - - /** A (GenericDescriptor, int) pair, used as a map key. */ - private static final class DescriptorIntPair { - private final Descriptor descriptor; - private final int number; - - DescriptorIntPair(final Descriptor descriptor, final int number) { - this.descriptor = descriptor; - this.number = number; - } - - @Override - public int hashCode() { - return descriptor.hashCode() * ((1 << 16) - 1) + number; - } - @Override - public boolean equals(final Object obj) { - if (!(obj instanceof DescriptorIntPair)) { - return false; - } - final DescriptorIntPair other = (DescriptorIntPair)obj; - return descriptor == other.descriptor && number == other.number; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java deleted file mode 100644 index d5288dd8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java +++ /dev/null @@ -1,169 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * Equivalent to {@link ExtensionRegistry} but supports only "lite" types. - *

- * If all of your types are lite types, then you only need to use - * {@code ExtensionRegistryLite}. Similarly, if all your types are regular - * types, then you only need {@link ExtensionRegistry}. Typically it does not - * make sense to mix the two, since if you have any regular types in your - * program, you then require the full runtime and lose all the benefits of - * the lite runtime, so you might as well make all your types be regular types. - * However, in some cases (e.g. when depending on multiple third-patry libraries - * where one uses lite types and one uses regular), you may find yourself - * wanting to mix the two. In this case things get more complicated. - *

- * There are three factors to consider: Whether the type being extended is - * lite, whether the embedded type (in the case of a message-typed extension) - * is lite, and whether the extension itself is lite. Since all three are - * declared in different files, they could all be different. Here are all - * the combinations and which type of registry to use: - *

- *   Extended type     Inner type    Extension         Use registry
- *   =======================================================================
- *   lite              lite          lite              ExtensionRegistryLite
- *   lite              regular       lite              ExtensionRegistry
- *   regular           regular       regular           ExtensionRegistry
- *   all other combinations                            not supported
- * 
- *

- * Note that just as regular types are not allowed to contain lite-type fields, - * they are also not allowed to contain lite-type extensions. This is because - * regular types must be fully accessible via reflection, which in turn means - * that all the inner messages must also support reflection. On the other hand, - * since regular types implement the entire lite interface, there is no problem - * with embedding regular types inside lite types. - * - * @author kenton@google.com Kenton Varda - */ -public class ExtensionRegistryLite { - /** Construct a new, empty instance. */ - public static ExtensionRegistryLite newInstance() { - return new ExtensionRegistryLite(); - } - - /** Get the unmodifiable singleton empty instance. */ - public static ExtensionRegistryLite getEmptyRegistry() { - return EMPTY; - } - - /** Returns an unmodifiable view of the registry. */ - public ExtensionRegistryLite getUnmodifiable() { - return new ExtensionRegistryLite(this); - } - - /** - * Find an extension by containing type and field number. - * - * @return Information about the extension if found, or {@code null} - * otherwise. - */ - @SuppressWarnings("unchecked") - public - GeneratedMessageLite.GeneratedExtension - findLiteExtensionByNumber( - final ContainingType containingTypeDefaultInstance, - final int fieldNumber) { - return (GeneratedMessageLite.GeneratedExtension) - extensionsByNumber.get( - new ObjectIntPair(containingTypeDefaultInstance, fieldNumber)); - } - - /** Add an extension from a lite generated file to the registry. */ - public final void add( - final GeneratedMessageLite.GeneratedExtension extension) { - extensionsByNumber.put( - new ObjectIntPair(extension.getContainingTypeDefaultInstance(), - extension.getNumber()), - extension); - } - - // ================================================================= - // Private stuff. - - // Constructors are package-private so that ExtensionRegistry can subclass - // this. - - ExtensionRegistryLite() { - this.extensionsByNumber = - new HashMap>(); - } - - ExtensionRegistryLite(ExtensionRegistryLite other) { - if (other == EMPTY) { - this.extensionsByNumber = Collections.emptyMap(); - } else { - this.extensionsByNumber = - Collections.unmodifiableMap(other.extensionsByNumber); - } - } - - private final Map> - extensionsByNumber; - - private ExtensionRegistryLite(boolean empty) { - this.extensionsByNumber = Collections.emptyMap(); - } - private static final ExtensionRegistryLite EMPTY = - new ExtensionRegistryLite(true); - - /** A (Object, int) pair, used as a map key. */ - private static final class ObjectIntPair { - private final Object object; - private final int number; - - ObjectIntPair(final Object object, final int number) { - this.object = object; - this.number = number; - } - - @Override - public int hashCode() { - return System.identityHashCode(object) * ((1 << 16) - 1) + number; - } - @Override - public boolean equals(final Object obj) { - if (!(obj instanceof ObjectIntPair)) { - return false; - } - final ObjectIntPair other = (ObjectIntPair)obj; - return object == other.object && number == other.number; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java deleted file mode 100644 index a85dbaa6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java +++ /dev/null @@ -1,788 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.io.IOException; - -/** - * A class which represents an arbitrary set of fields of some message type. - * This is used to implement {@link DynamicMessage}, and also to represent - * extensions in {@link GeneratedMessage}. This class is package-private, - * since outside users should probably be using {@link DynamicMessage}. - * - * @author kenton@google.com Kenton Varda - */ -final class FieldSet> { - /** - * Interface for a FieldDescriptor or lite extension descriptor. This - * prevents FieldSet from depending on {@link Descriptors.FieldDescriptor}. - */ - public interface FieldDescriptorLite> - extends Comparable { - int getNumber(); - WireFormat.FieldType getLiteType(); - WireFormat.JavaType getLiteJavaType(); - boolean isRepeated(); - boolean isPacked(); - Internal.EnumLiteMap getEnumType(); - - // If getLiteJavaType() == MESSAGE, this merges a message object of the - // type into a builder of the type. Returns {@code to}. - MessageLite.Builder internalMergeFrom( - MessageLite.Builder to, MessageLite from); - } - - private final SmallSortedMap fields; - private boolean isImmutable; - - /** Construct a new FieldSet. */ - private FieldSet() { - this.fields = SmallSortedMap.newFieldMap(16); - } - - /** - * Construct an empty FieldSet. This is only used to initialize - * DEFAULT_INSTANCE. - */ - private FieldSet(final boolean dummy) { - this.fields = SmallSortedMap.newFieldMap(0); - makeImmutable(); - } - - /** Construct a new FieldSet. */ - public static > - FieldSet newFieldSet() { - return new FieldSet(); - } - - /** Get an immutable empty FieldSet. */ - @SuppressWarnings("unchecked") - public static > - FieldSet emptySet() { - return DEFAULT_INSTANCE; - } - @SuppressWarnings("unchecked") - private static final FieldSet DEFAULT_INSTANCE = new FieldSet(true); - - /** Make this FieldSet immutable from this point forward. */ - @SuppressWarnings("unchecked") - public void makeImmutable() { - if (isImmutable) { - return; - } - fields.makeImmutable(); - isImmutable = true; - } - - /** - * Retuns whether the FieldSet is immutable. This is true if it is the - * {@link #emptySet} or if {@link #makeImmutable} were called. - * - * @return whether the FieldSet is immutable. - */ - public boolean isImmutable() { - return isImmutable; - } - - /** - * Clones the FieldSet. The returned FieldSet will be mutable even if the - * original FieldSet was immutable. - * - * @return the newly cloned FieldSet - */ - @Override - public FieldSet clone() { - // We can't just call fields.clone because List objects in the map - // should not be shared. - FieldSet clone = FieldSet.newFieldSet(); - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - Map.Entry entry = fields.getArrayEntryAt(i); - FieldDescriptorType descriptor = entry.getKey(); - clone.setField(descriptor, entry.getValue()); - } - for (Map.Entry entry : - fields.getOverflowEntries()) { - FieldDescriptorType descriptor = entry.getKey(); - clone.setField(descriptor, entry.getValue()); - } - return clone; - } - - // ================================================================= - - /** See {@link Message.Builder#clear()}. */ - public void clear() { - fields.clear(); - } - - /** - * Get a simple map containing all the fields. - */ - public Map getAllFields() { - return fields.isImmutable() ? fields : Collections.unmodifiableMap(fields); - } - - /** - * Get an iterator to the field map. This iterator should not be leaked out - * of the protobuf library as it is not protected from mutation when - * fields is not immutable. - */ - public Iterator> iterator() { - return fields.entrySet().iterator(); - } - - /** - * Useful for implementing - * {@link Message#hasField(Descriptors.FieldDescriptor)}. - */ - public boolean hasField(final FieldDescriptorType descriptor) { - if (descriptor.isRepeated()) { - throw new IllegalArgumentException( - "hasField() can only be called on non-repeated fields."); - } - - return fields.get(descriptor) != null; - } - - /** - * Useful for implementing - * {@link Message#getField(Descriptors.FieldDescriptor)}. This method - * returns {@code null} if the field is not set; in this case it is up - * to the caller to fetch the field's default value. - */ - public Object getField(final FieldDescriptorType descriptor) { - return fields.get(descriptor); - } - - /** - * Useful for implementing - * {@link Message.Builder#setField(Descriptors.FieldDescriptor,Object)}. - */ - @SuppressWarnings("unchecked") - public void setField(final FieldDescriptorType descriptor, - Object value) { - if (descriptor.isRepeated()) { - if (!(value instanceof List)) { - throw new IllegalArgumentException( - "Wrong object type used with protocol message reflection."); - } - - // Wrap the contents in a new list so that the caller cannot change - // the list's contents after setting it. - final List newList = new ArrayList(); - newList.addAll((List)value); - for (final Object element : newList) { - verifyType(descriptor.getLiteType(), element); - } - value = newList; - } else { - verifyType(descriptor.getLiteType(), value); - } - - fields.put(descriptor, value); - } - - /** - * Useful for implementing - * {@link Message.Builder#clearField(Descriptors.FieldDescriptor)}. - */ - public void clearField(final FieldDescriptorType descriptor) { - fields.remove(descriptor); - } - - /** - * Useful for implementing - * {@link Message#getRepeatedFieldCount(Descriptors.FieldDescriptor)}. - */ - public int getRepeatedFieldCount(final FieldDescriptorType descriptor) { - if (!descriptor.isRepeated()) { - throw new IllegalArgumentException( - "getRepeatedField() can only be called on repeated fields."); - } - - final Object value = fields.get(descriptor); - if (value == null) { - return 0; - } else { - return ((List) value).size(); - } - } - - /** - * Useful for implementing - * {@link Message#getRepeatedField(Descriptors.FieldDescriptor,int)}. - */ - public Object getRepeatedField(final FieldDescriptorType descriptor, - final int index) { - if (!descriptor.isRepeated()) { - throw new IllegalArgumentException( - "getRepeatedField() can only be called on repeated fields."); - } - - final Object value = fields.get(descriptor); - - if (value == null) { - throw new IndexOutOfBoundsException(); - } else { - return ((List) value).get(index); - } - } - - /** - * Useful for implementing - * {@link Message.Builder#setRepeatedField(Descriptors.FieldDescriptor,int,Object)}. - */ - @SuppressWarnings("unchecked") - public void setRepeatedField(final FieldDescriptorType descriptor, - final int index, - final Object value) { - if (!descriptor.isRepeated()) { - throw new IllegalArgumentException( - "getRepeatedField() can only be called on repeated fields."); - } - - final Object list = fields.get(descriptor); - if (list == null) { - throw new IndexOutOfBoundsException(); - } - - verifyType(descriptor.getLiteType(), value); - ((List) list).set(index, value); - } - - /** - * Useful for implementing - * {@link Message.Builder#addRepeatedField(Descriptors.FieldDescriptor,Object)}. - */ - @SuppressWarnings("unchecked") - public void addRepeatedField(final FieldDescriptorType descriptor, - final Object value) { - if (!descriptor.isRepeated()) { - throw new IllegalArgumentException( - "addRepeatedField() can only be called on repeated fields."); - } - - verifyType(descriptor.getLiteType(), value); - - final Object existingValue = fields.get(descriptor); - List list; - if (existingValue == null) { - list = new ArrayList(); - fields.put(descriptor, list); - } else { - list = (List) existingValue; - } - - list.add(value); - } - - /** - * Verifies that the given object is of the correct type to be a valid - * value for the given field. (For repeated fields, this checks if the - * object is the right type to be one element of the field.) - * - * @throws IllegalArgumentException The value is not of the right type. - */ - private static void verifyType(final WireFormat.FieldType type, - final Object value) { - if (value == null) { - throw new NullPointerException(); - } - - boolean isValid = false; - switch (type.getJavaType()) { - case INT: isValid = value instanceof Integer ; break; - case LONG: isValid = value instanceof Long ; break; - case FLOAT: isValid = value instanceof Float ; break; - case DOUBLE: isValid = value instanceof Double ; break; - case BOOLEAN: isValid = value instanceof Boolean ; break; - case STRING: isValid = value instanceof String ; break; - case BYTE_STRING: isValid = value instanceof ByteString; break; - case ENUM: - // TODO(kenton): Caller must do type checking here, I guess. - isValid = value instanceof Internal.EnumLite; - break; - case MESSAGE: - // TODO(kenton): Caller must do type checking here, I guess. - isValid = value instanceof MessageLite; - break; - } - - if (!isValid) { - // TODO(kenton): When chaining calls to setField(), it can be hard to - // tell from the stack trace which exact call failed, since the whole - // chain is considered one line of code. It would be nice to print - // more information here, e.g. naming the field. We used to do that. - // But we can't now that FieldSet doesn't use descriptors. Maybe this - // isn't a big deal, though, since it would only really apply when using - // reflection and generally people don't chain reflection setters. - throw new IllegalArgumentException( - "Wrong object type used with protocol message reflection."); - } - } - - // ================================================================= - // Parsing and serialization - - /** - * See {@link Message#isInitialized()}. Note: Since {@code FieldSet} - * itself does not have any way of knowing about required fields that - * aren't actually present in the set, it is up to the caller to check - * that all required fields are present. - */ - public boolean isInitialized() { - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - if (!isInitialized(fields.getArrayEntryAt(i))) { - return false; - } - } - for (final Map.Entry entry : - fields.getOverflowEntries()) { - if (!isInitialized(entry)) { - return false; - } - } - return true; - } - - @SuppressWarnings("unchecked") - private boolean isInitialized( - final Map.Entry entry) { - final FieldDescriptorType descriptor = entry.getKey(); - if (descriptor.getLiteJavaType() == WireFormat.JavaType.MESSAGE) { - if (descriptor.isRepeated()) { - for (final MessageLite element: - (List) entry.getValue()) { - if (!element.isInitialized()) { - return false; - } - } - } else { - if (!((MessageLite) entry.getValue()).isInitialized()) { - return false; - } - } - } - return true; - } - - /** - * Given a field type, return the wire type. - * - * @returns One of the {@code WIRETYPE_} constants defined in - * {@link WireFormat}. - */ - static int getWireFormatForFieldType(final WireFormat.FieldType type, - boolean isPacked) { - if (isPacked) { - return WireFormat.WIRETYPE_LENGTH_DELIMITED; - } else { - return type.getWireType(); - } - } - - /** - * Like {@link #mergeFrom(Message)}, but merges from another {@link FieldSet}. - */ - public void mergeFrom(final FieldSet other) { - for (int i = 0; i < other.fields.getNumArrayEntries(); i++) { - mergeFromField(other.fields.getArrayEntryAt(i)); - } - for (final Map.Entry entry : - other.fields.getOverflowEntries()) { - mergeFromField(entry); - } - } - - @SuppressWarnings("unchecked") - private void mergeFromField( - final Map.Entry entry) { - final FieldDescriptorType descriptor = entry.getKey(); - final Object otherValue = entry.getValue(); - - if (descriptor.isRepeated()) { - Object value = fields.get(descriptor); - if (value == null) { - // Our list is empty, but we still need to make a defensive copy of - // the other list since we don't know if the other FieldSet is still - // mutable. - fields.put(descriptor, new ArrayList((List) otherValue)); - } else { - // Concatenate the lists. - ((List) value).addAll((List) otherValue); - } - } else if (descriptor.getLiteJavaType() == WireFormat.JavaType.MESSAGE) { - Object value = fields.get(descriptor); - if (value == null) { - fields.put(descriptor, otherValue); - } else { - // Merge the messages. - fields.put( - descriptor, - descriptor.internalMergeFrom( - ((MessageLite) value).toBuilder(), (MessageLite) otherValue) - .build()); - } - - } else { - fields.put(descriptor, otherValue); - } - } - - // TODO(kenton): Move static parsing and serialization methods into some - // other class. Probably WireFormat. - - /** - * Read a field of any primitive type from a CodedInputStream. Enums, - * groups, and embedded messages are not handled by this method. - * - * @param input The stream from which to read. - * @param type Declared type of the field. - * @return An object representing the field's value, of the exact - * type which would be returned by - * {@link Message#getField(Descriptors.FieldDescriptor)} for - * this field. - */ - public static Object readPrimitiveField( - CodedInputStream input, - final WireFormat.FieldType type) throws IOException { - switch (type) { - case DOUBLE : return input.readDouble (); - case FLOAT : return input.readFloat (); - case INT64 : return input.readInt64 (); - case UINT64 : return input.readUInt64 (); - case INT32 : return input.readInt32 (); - case FIXED64 : return input.readFixed64 (); - case FIXED32 : return input.readFixed32 (); - case BOOL : return input.readBool (); - case STRING : return input.readString (); - case BYTES : return input.readBytes (); - case UINT32 : return input.readUInt32 (); - case SFIXED32: return input.readSFixed32(); - case SFIXED64: return input.readSFixed64(); - case SINT32 : return input.readSInt32 (); - case SINT64 : return input.readSInt64 (); - - case GROUP: - throw new IllegalArgumentException( - "readPrimitiveField() cannot handle nested groups."); - case MESSAGE: - throw new IllegalArgumentException( - "readPrimitiveField() cannot handle embedded messages."); - case ENUM: - // We don't handle enums because we don't know what to do if the - // value is not recognized. - throw new IllegalArgumentException( - "readPrimitiveField() cannot handle enums."); - } - - throw new RuntimeException( - "There is no way to get here, but the compiler thinks otherwise."); - } - - /** See {@link Message#writeTo(CodedOutputStream)}. */ - public void writeTo(final CodedOutputStream output) - throws IOException { - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - final Map.Entry entry = - fields.getArrayEntryAt(i); - writeField(entry.getKey(), entry.getValue(), output); - } - for (final Map.Entry entry : - fields.getOverflowEntries()) { - writeField(entry.getKey(), entry.getValue(), output); - } - } - - /** - * Like {@link #writeTo} but uses MessageSet wire format. - */ - public void writeMessageSetTo(final CodedOutputStream output) - throws IOException { - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - writeMessageSetTo(fields.getArrayEntryAt(i), output); - } - for (final Map.Entry entry : - fields.getOverflowEntries()) { - writeMessageSetTo(entry, output); - } - } - - private void writeMessageSetTo( - final Map.Entry entry, - final CodedOutputStream output) throws IOException { - final FieldDescriptorType descriptor = entry.getKey(); - if (descriptor.getLiteJavaType() == WireFormat.JavaType.MESSAGE && - !descriptor.isRepeated() && !descriptor.isPacked()) { - output.writeMessageSetExtension(entry.getKey().getNumber(), - (MessageLite) entry.getValue()); - } else { - writeField(descriptor, entry.getValue(), output); - } - } - - /** - * Write a single tag-value pair to the stream. - * - * @param output The output stream. - * @param type The field's type. - * @param number The field's number. - * @param value Object representing the field's value. Must be of the exact - * type which would be returned by - * {@link Message#getField(Descriptors.FieldDescriptor)} for - * this field. - */ - private static void writeElement(final CodedOutputStream output, - final WireFormat.FieldType type, - final int number, - final Object value) throws IOException { - // Special case for groups, which need a start and end tag; other fields - // can just use writeTag() and writeFieldNoTag(). - if (type == WireFormat.FieldType.GROUP) { - output.writeGroup(number, (MessageLite) value); - } else { - output.writeTag(number, getWireFormatForFieldType(type, false)); - writeElementNoTag(output, type, value); - } - } - - /** - * Write a field of arbitrary type, without its tag, to the stream. - * - * @param output The output stream. - * @param type The field's type. - * @param value Object representing the field's value. Must be of the exact - * type which would be returned by - * {@link Message#getField(Descriptors.FieldDescriptor)} for - * this field. - */ - private static void writeElementNoTag( - final CodedOutputStream output, - final WireFormat.FieldType type, - final Object value) throws IOException { - switch (type) { - case DOUBLE : output.writeDoubleNoTag ((Double ) value); break; - case FLOAT : output.writeFloatNoTag ((Float ) value); break; - case INT64 : output.writeInt64NoTag ((Long ) value); break; - case UINT64 : output.writeUInt64NoTag ((Long ) value); break; - case INT32 : output.writeInt32NoTag ((Integer ) value); break; - case FIXED64 : output.writeFixed64NoTag ((Long ) value); break; - case FIXED32 : output.writeFixed32NoTag ((Integer ) value); break; - case BOOL : output.writeBoolNoTag ((Boolean ) value); break; - case STRING : output.writeStringNoTag ((String ) value); break; - case GROUP : output.writeGroupNoTag ((MessageLite) value); break; - case MESSAGE : output.writeMessageNoTag ((MessageLite) value); break; - case BYTES : output.writeBytesNoTag ((ByteString ) value); break; - case UINT32 : output.writeUInt32NoTag ((Integer ) value); break; - case SFIXED32: output.writeSFixed32NoTag((Integer ) value); break; - case SFIXED64: output.writeSFixed64NoTag((Long ) value); break; - case SINT32 : output.writeSInt32NoTag ((Integer ) value); break; - case SINT64 : output.writeSInt64NoTag ((Long ) value); break; - - case ENUM: - output.writeEnumNoTag(((Internal.EnumLite) value).getNumber()); - break; - } - } - - /** Write a single field. */ - public static void writeField(final FieldDescriptorLite descriptor, - final Object value, - final CodedOutputStream output) - throws IOException { - WireFormat.FieldType type = descriptor.getLiteType(); - int number = descriptor.getNumber(); - if (descriptor.isRepeated()) { - final List valueList = (List)value; - if (descriptor.isPacked()) { - output.writeTag(number, WireFormat.WIRETYPE_LENGTH_DELIMITED); - // Compute the total data size so the length can be written. - int dataSize = 0; - for (final Object element : valueList) { - dataSize += computeElementSizeNoTag(type, element); - } - output.writeRawVarint32(dataSize); - // Write the data itself, without any tags. - for (final Object element : valueList) { - writeElementNoTag(output, type, element); - } - } else { - for (final Object element : valueList) { - writeElement(output, type, number, element); - } - } - } else { - writeElement(output, type, number, value); - } - } - - /** - * See {@link Message#getSerializedSize()}. It's up to the caller to cache - * the resulting size if desired. - */ - public int getSerializedSize() { - int size = 0; - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - final Map.Entry entry = - fields.getArrayEntryAt(i); - size += computeFieldSize(entry.getKey(), entry.getValue()); - } - for (final Map.Entry entry : - fields.getOverflowEntries()) { - size += computeFieldSize(entry.getKey(), entry.getValue()); - } - return size; - } - - /** - * Like {@link #getSerializedSize} but uses MessageSet wire format. - */ - public int getMessageSetSerializedSize() { - int size = 0; - for (int i = 0; i < fields.getNumArrayEntries(); i++) { - size += getMessageSetSerializedSize(fields.getArrayEntryAt(i)); - } - for (final Map.Entry entry : - fields.getOverflowEntries()) { - size += getMessageSetSerializedSize(entry); - } - return size; - } - - private int getMessageSetSerializedSize( - final Map.Entry entry) { - final FieldDescriptorType descriptor = entry.getKey(); - if (descriptor.getLiteJavaType() == WireFormat.JavaType.MESSAGE && - !descriptor.isRepeated() && !descriptor.isPacked()) { - return CodedOutputStream.computeMessageSetExtensionSize( - entry.getKey().getNumber(), (MessageLite) entry.getValue()); - } else { - return computeFieldSize(descriptor, entry.getValue()); - } - } - - /** - * Compute the number of bytes that would be needed to encode a - * single tag/value pair of arbitrary type. - * - * @param type The field's type. - * @param number The field's number. - * @param value Object representing the field's value. Must be of the exact - * type which would be returned by - * {@link Message#getField(Descriptors.FieldDescriptor)} for - * this field. - */ - private static int computeElementSize( - final WireFormat.FieldType type, - final int number, final Object value) { - int tagSize = CodedOutputStream.computeTagSize(number); - if (type == WireFormat.FieldType.GROUP) { - tagSize *= 2; - } - return tagSize + computeElementSizeNoTag(type, value); - } - - /** - * Compute the number of bytes that would be needed to encode a - * particular value of arbitrary type, excluding tag. - * - * @param type The field's type. - * @param value Object representing the field's value. Must be of the exact - * type which would be returned by - * {@link Message#getField(Descriptors.FieldDescriptor)} for - * this field. - */ - private static int computeElementSizeNoTag( - final WireFormat.FieldType type, final Object value) { - switch (type) { - // Note: Minor violation of 80-char limit rule here because this would - // actually be harder to read if we wrapped the lines. - case DOUBLE : return CodedOutputStream.computeDoubleSizeNoTag ((Double )value); - case FLOAT : return CodedOutputStream.computeFloatSizeNoTag ((Float )value); - case INT64 : return CodedOutputStream.computeInt64SizeNoTag ((Long )value); - case UINT64 : return CodedOutputStream.computeUInt64SizeNoTag ((Long )value); - case INT32 : return CodedOutputStream.computeInt32SizeNoTag ((Integer )value); - case FIXED64 : return CodedOutputStream.computeFixed64SizeNoTag ((Long )value); - case FIXED32 : return CodedOutputStream.computeFixed32SizeNoTag ((Integer )value); - case BOOL : return CodedOutputStream.computeBoolSizeNoTag ((Boolean )value); - case STRING : return CodedOutputStream.computeStringSizeNoTag ((String )value); - case GROUP : return CodedOutputStream.computeGroupSizeNoTag ((MessageLite)value); - case MESSAGE : return CodedOutputStream.computeMessageSizeNoTag ((MessageLite)value); - case BYTES : return CodedOutputStream.computeBytesSizeNoTag ((ByteString )value); - case UINT32 : return CodedOutputStream.computeUInt32SizeNoTag ((Integer )value); - case SFIXED32: return CodedOutputStream.computeSFixed32SizeNoTag((Integer )value); - case SFIXED64: return CodedOutputStream.computeSFixed64SizeNoTag((Long )value); - case SINT32 : return CodedOutputStream.computeSInt32SizeNoTag ((Integer )value); - case SINT64 : return CodedOutputStream.computeSInt64SizeNoTag ((Long )value); - - case ENUM: - return CodedOutputStream.computeEnumSizeNoTag( - ((Internal.EnumLite) value).getNumber()); - } - - throw new RuntimeException( - "There is no way to get here, but the compiler thinks otherwise."); - } - - /** - * Compute the number of bytes needed to encode a particular field. - */ - public static int computeFieldSize(final FieldDescriptorLite descriptor, - final Object value) { - WireFormat.FieldType type = descriptor.getLiteType(); - int number = descriptor.getNumber(); - if (descriptor.isRepeated()) { - if (descriptor.isPacked()) { - int dataSize = 0; - for (final Object element : (List)value) { - dataSize += computeElementSizeNoTag(type, element); - } - return dataSize + - CodedOutputStream.computeTagSize(number) + - CodedOutputStream.computeRawVarint32Size(dataSize); - } else { - int size = 0; - for (final Object element : (List)value) { - size += computeElementSize(type, number, element); - } - return size; - } - } else { - return computeElementSize(type, number, value); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java deleted file mode 100644 index 2c22fcab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java +++ /dev/null @@ -1,1834 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.EnumValueDescriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; - -import java.io.IOException; -import java.io.ObjectStreamException; -import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -/** - * All generated protocol message classes extend this class. This class - * implements most of the Message and Builder interfaces using Java reflection. - * Users can ignore this class and pretend that generated messages implement - * the Message interface directly. - * - * @author kenton@google.com Kenton Varda - */ -public abstract class GeneratedMessage extends AbstractMessage - implements Serializable { - private static final long serialVersionUID = 1L; - - private final UnknownFieldSet unknownFields; - - /** - * For testing. Allows a test to disable the optimization that avoids using - * field builders for nested messages until they are requested. By disabling - * this optimization, existing tests can be reused to test the field builders. - */ - protected static boolean alwaysUseFieldBuilders = false; - - protected GeneratedMessage() { - this.unknownFields = UnknownFieldSet.getDefaultInstance(); - } - - protected GeneratedMessage(Builder builder) { - this.unknownFields = builder.getUnknownFields(); - } - - /** - * For testing. Allows a test to disable the optimization that avoids using - * field builders for nested messages until they are requested. By disabling - * this optimization, existing tests can be reused to test the field builders. - * See {@link RepeatedFieldBuilder} and {@link SingleFieldBuilder}. - */ - static void enableAlwaysUseFieldBuildersForTesting() { - alwaysUseFieldBuilders = true; - } - - /** - * Get the FieldAccessorTable for this type. We can't have the message - * class pass this in to the constructor because of bootstrapping trouble - * with DescriptorProtos. - */ - protected abstract FieldAccessorTable internalGetFieldAccessorTable(); - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Descriptor getDescriptorForType() { - return internalGetFieldAccessorTable().descriptor; - } - - /** Internal helper which returns a mutable map. */ - private Map getAllFieldsMutable() { - final TreeMap result = - new TreeMap(); - final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; - for (final FieldDescriptor field : descriptor.getFields()) { - if (field.isRepeated()) { - final List value = (List) getField(field); - if (!value.isEmpty()) { - result.put(field, value); - } - } else { - if (hasField(field)) { - result.put(field, getField(field)); - } - } - } - return result; - } - - @Override - public boolean isInitialized() { - for (final FieldDescriptor field : getDescriptorForType().getFields()) { - // Check that all required fields are present. - if (field.isRequired()) { - if (!hasField(field)) { - return false; - } - } - // Check that embedded messages are initialized. - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (field.isRepeated()) { - @SuppressWarnings("unchecked") final - List messageList = (List) getField(field); - for (final Message element : messageList) { - if (!element.isInitialized()) { - return false; - } - } - } else { - if (hasField(field) && !((Message) getField(field)).isInitialized()) { - return false; - } - } - } - } - - return true; - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Map getAllFields() { - return Collections.unmodifiableMap(getAllFieldsMutable()); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public boolean hasField(final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field).has(this); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Object getField(final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field).get(this); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public int getRepeatedFieldCount(final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field) - .getRepeatedCount(this); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Object getRepeatedField(final FieldDescriptor field, final int index) { - return internalGetFieldAccessorTable().getField(field) - .getRepeated(this, index); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final UnknownFieldSet getUnknownFields() { - return unknownFields; - } - - protected abstract Message.Builder newBuilderForType(BuilderParent parent); - - /** - * Interface for the parent of a Builder that allows the builder to - * communicate invalidations back to the parent for use when using nested - * builders. - */ - protected interface BuilderParent { - - /** - * A builder becomes dirty whenever a field is modified -- including fields - * in nested builders -- and becomes clean when build() is called. Thus, - * when a builder becomes dirty, all its parents become dirty as well, and - * when it becomes clean, all its children become clean. The dirtiness - * state is used to invalidate certain cached values. - *
- * To this end, a builder calls markAsDirty() on its parent whenever it - * transitions from clean to dirty. The parent must propagate this call to - * its own parent, unless it was already dirty, in which case the - * grandparent must necessarily already be dirty as well. The parent can - * only transition back to "clean" after calling build() on all children. - */ - void markDirty(); - } - - @SuppressWarnings("unchecked") - public abstract static class Builder - extends AbstractMessage.Builder { - - private BuilderParent builderParent; - - private BuilderParentImpl meAsParent; - - // Indicates that we've built a message and so we are now obligated - // to dispatch dirty invalidations. See GeneratedMessage.BuilderListener. - private boolean isClean; - - private UnknownFieldSet unknownFields = - UnknownFieldSet.getDefaultInstance(); - - protected Builder() { - this(null); - } - - protected Builder(BuilderParent builderParent) { - this.builderParent = builderParent; - } - - void dispose() { - builderParent = null; - } - - /** - * Called by the subclass when a message is built. - */ - protected void onBuilt() { - if (builderParent != null) { - markClean(); - } - } - - /** - * Called by the subclass or a builder to notify us that a message was - * built and may be cached and therefore invalidations are needed. - */ - protected void markClean() { - this.isClean = true; - } - - /** - * Gets whether invalidations are needed - * - * @return whether invalidations are needed - */ - protected boolean isClean() { - return isClean; - } - - // This is implemented here only to work around an apparent bug in the - // Java compiler and/or build system. See bug #1898463. The mere presence - // of this dummy clone() implementation makes it go away. - @Override - public BuilderType clone() { - throw new UnsupportedOperationException( - "This is supposed to be overridden by subclasses."); - } - - /** - * Called by the initialization and clear code paths to allow subclasses to - * reset any of their builtin fields back to the initial values. - */ - public BuilderType clear() { - unknownFields = UnknownFieldSet.getDefaultInstance(); - onChanged(); - return (BuilderType) this; - } - - /** - * Get the FieldAccessorTable for this type. We can't have the message - * class pass this in to the constructor because of bootstrapping trouble - * with DescriptorProtos. - */ - protected abstract FieldAccessorTable internalGetFieldAccessorTable(); - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Descriptor getDescriptorForType() { - return internalGetFieldAccessorTable().descriptor; - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Map getAllFields() { - return Collections.unmodifiableMap(getAllFieldsMutable()); - } - - /** Internal helper which returns a mutable map. */ - private Map getAllFieldsMutable() { - final TreeMap result = - new TreeMap(); - final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; - for (final FieldDescriptor field : descriptor.getFields()) { - if (field.isRepeated()) { - final List value = (List) getField(field); - if (!value.isEmpty()) { - result.put(field, value); - } - } else { - if (hasField(field)) { - result.put(field, getField(field)); - } - } - } - return result; - } - - public Message.Builder newBuilderForField( - final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field).newBuilder(); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public boolean hasField(final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field).has(this); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Object getField(final FieldDescriptor field) { - Object object = internalGetFieldAccessorTable().getField(field).get(this); - if (field.isRepeated()) { - // The underlying list object is still modifiable at this point. - // Make sure not to expose the modifiable list to the caller. - return Collections.unmodifiableList((List) object); - } else { - return object; - } - } - - public BuilderType setField(final FieldDescriptor field, - final Object value) { - internalGetFieldAccessorTable().getField(field).set(this, value); - return (BuilderType) this; - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public BuilderType clearField(final FieldDescriptor field) { - internalGetFieldAccessorTable().getField(field).clear(this); - return (BuilderType) this; - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public int getRepeatedFieldCount(final FieldDescriptor field) { - return internalGetFieldAccessorTable().getField(field) - .getRepeatedCount(this); - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public Object getRepeatedField(final FieldDescriptor field, - final int index) { - return internalGetFieldAccessorTable().getField(field) - .getRepeated(this, index); - } - - public BuilderType setRepeatedField(final FieldDescriptor field, - final int index, final Object value) { - internalGetFieldAccessorTable().getField(field) - .setRepeated(this, index, value); - return (BuilderType) this; - } - - public BuilderType addRepeatedField(final FieldDescriptor field, - final Object value) { - internalGetFieldAccessorTable().getField(field).addRepeated(this, value); - return (BuilderType) this; - } - - public final BuilderType setUnknownFields( - final UnknownFieldSet unknownFields) { - this.unknownFields = unknownFields; - onChanged(); - return (BuilderType) this; - } - - @Override - public final BuilderType mergeUnknownFields( - final UnknownFieldSet unknownFields) { - this.unknownFields = - UnknownFieldSet.newBuilder(this.unknownFields) - .mergeFrom(unknownFields) - .build(); - onChanged(); - return (BuilderType) this; - } - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public boolean isInitialized() { - for (final FieldDescriptor field : getDescriptorForType().getFields()) { - // Check that all required fields are present. - if (field.isRequired()) { - if (!hasField(field)) { - return false; - } - } - // Check that embedded messages are initialized. - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (field.isRepeated()) { - @SuppressWarnings("unchecked") final - List messageList = (List) getField(field); - for (final Message element : messageList) { - if (!element.isInitialized()) { - return false; - } - } - } else { - if (hasField(field) && - !((Message) getField(field)).isInitialized()) { - return false; - } - } - } - } - return true; - } - - @Override - public final UnknownFieldSet getUnknownFields() { - return unknownFields; - } - - /** - * Called by subclasses to parse an unknown field. - * @return {@code true} unless the tag is an end-group tag. - */ - protected boolean parseUnknownField( - final CodedInputStream input, - final UnknownFieldSet.Builder unknownFields, - final ExtensionRegistryLite extensionRegistry, - final int tag) throws IOException { - return unknownFields.mergeFieldFrom(tag, input); - } - - /** - * Implementation of {@link BuilderParent} for giving to our children. This - * small inner class makes it so we don't publicly expose the BuilderParent - * methods. - */ - private class BuilderParentImpl implements BuilderParent { - - @Override - public void markDirty() { - onChanged(); - } - } - - /** - * Gets the {@link BuilderParent} for giving to our children. - * @return The builder parent for our children. - */ - protected BuilderParent getParentForChildren() { - if (meAsParent == null) { - meAsParent = new BuilderParentImpl(); - } - return meAsParent; - } - - /** - * Called when a the builder or one of its nested children has changed - * and any parent should be notified of its invalidation. - */ - protected final void onChanged() { - if (isClean && builderParent != null) { - builderParent.markDirty(); - - // Don't keep dispatching invalidations until build is called again. - isClean = false; - } - } - } - - // ================================================================= - // Extensions-related stuff - - public interface ExtendableMessageOrBuilder< - MessageType extends ExtendableMessage> extends MessageOrBuilder { - - /** Check if a singular extension is present. */ - boolean hasExtension( - GeneratedExtension extension); - - /** Get the number of elements in a repeated extension. */ - int getExtensionCount( - GeneratedExtension> extension); - - /** Get the value of an extension. */ - Type getExtension(GeneratedExtension extension); - - /** Get one element of a repeated extension. */ - Type getExtension( - GeneratedExtension> extension, - int index); - } - - /** - * Generated message classes for message types that contain extension ranges - * subclass this. - * - *

This class implements type-safe accessors for extensions. They - * implement all the same operations that you can do with normal fields -- - * e.g. "has", "get", and "getCount" -- but for extensions. The extensions - * are identified using instances of the class {@link GeneratedExtension}; - * the protocol compiler generates a static instance of this class for every - * extension in its input. Through the magic of generics, all is made - * type-safe. - * - *

For example, imagine you have the {@code .proto} file: - * - *

-   * option java_class = "MyProto";
-   *
-   * message Foo {
-   *   extensions 1000 to max;
-   * }
-   *
-   * extend Foo {
-   *   optional int32 bar;
-   * }
-   * 
- * - *

Then you might write code like: - * - *

-   * MyProto.Foo foo = getFoo();
-   * int i = foo.getExtension(MyProto.bar);
-   * 
- * - *

See also {@link ExtendableBuilder}. - */ - public abstract static class ExtendableMessage< - MessageType extends ExtendableMessage> - extends GeneratedMessage - implements ExtendableMessageOrBuilder { - - private final FieldSet extensions; - - protected ExtendableMessage() { - this.extensions = FieldSet.newFieldSet(); - } - - protected ExtendableMessage( - ExtendableBuilder builder) { - super(builder); - this.extensions = builder.buildExtensions(); - } - - private void verifyExtensionContainingType( - final GeneratedExtension extension) { - if (extension.getDescriptor().getContainingType() != - getDescriptorForType()) { - // This can only happen if someone uses unchecked operations. - throw new IllegalArgumentException( - "Extension is for type \"" + - extension.getDescriptor().getContainingType().getFullName() + - "\" which does not match message type \"" + - getDescriptorForType().getFullName() + "\"."); - } - } - - /** Check if a singular extension is present. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final boolean hasExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - return extensions.hasField(extension.getDescriptor()); - } - - /** Get the number of elements in a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final int getExtensionCount( - final GeneratedExtension> extension) { - verifyExtensionContainingType(extension); - final FieldDescriptor descriptor = extension.getDescriptor(); - return extensions.getRepeatedFieldCount(descriptor); - } - - /** Get the value of an extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - @SuppressWarnings("unchecked") - public final Type getExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - FieldDescriptor descriptor = extension.getDescriptor(); - final Object value = extensions.getField(descriptor); - if (value == null) { - if (descriptor.isRepeated()) { - return (Type) Collections.emptyList(); - } else if (descriptor.getJavaType() == - FieldDescriptor.JavaType.MESSAGE) { - return (Type) extension.getMessageDefaultInstance(); - } else { - return (Type) extension.fromReflectionType( - descriptor.getDefaultValue()); - } - } else { - return (Type) extension.fromReflectionType(value); - } - } - - /** Get one element of a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - @SuppressWarnings("unchecked") - public final Type getExtension( - final GeneratedExtension> extension, - final int index) { - verifyExtensionContainingType(extension); - FieldDescriptor descriptor = extension.getDescriptor(); - return (Type) extension.singularFromReflectionType( - extensions.getRepeatedField(descriptor, index)); - } - - /** Called by subclasses to check if all extensions are initialized. */ - protected boolean extensionsAreInitialized() { - return extensions.isInitialized(); - } - - @Override - public boolean isInitialized() { - return super.isInitialized() && extensionsAreInitialized(); - } - - /** - * Used by subclasses to serialize extensions. Extension ranges may be - * interleaved with field numbers, but we must write them in canonical - * (sorted by field number) order. ExtensionWriter helps us write - * individual ranges of extensions at once. - */ - protected class ExtensionWriter { - // Imagine how much simpler this code would be if Java iterators had - // a way to get the next element without advancing the iterator. - - private final Iterator> iter = - extensions.iterator(); - private Map.Entry next; - private final boolean messageSetWireFormat; - - private ExtensionWriter(final boolean messageSetWireFormat) { - if (iter.hasNext()) { - next = iter.next(); - } - this.messageSetWireFormat = messageSetWireFormat; - } - - public void writeUntil(final int end, final CodedOutputStream output) - throws IOException { - while (next != null && next.getKey().getNumber() < end) { - FieldDescriptor descriptor = next.getKey(); - if (messageSetWireFormat && descriptor.getLiteJavaType() == - WireFormat.JavaType.MESSAGE && - !descriptor.isRepeated()) { - output.writeMessageSetExtension(descriptor.getNumber(), - (Message) next.getValue()); - } else { - FieldSet.writeField(descriptor, next.getValue(), output); - } - if (iter.hasNext()) { - next = iter.next(); - } else { - next = null; - } - } - } - } - - protected ExtensionWriter newExtensionWriter() { - return new ExtensionWriter(false); - } - protected ExtensionWriter newMessageSetExtensionWriter() { - return new ExtensionWriter(true); - } - - /** Called by subclasses to compute the size of extensions. */ - protected int extensionsSerializedSize() { - return extensions.getSerializedSize(); - } - protected int extensionsSerializedSizeAsMessageSet() { - return extensions.getMessageSetSerializedSize(); - } - - // --------------------------------------------------------------- - // Reflection - - protected Map getExtensionFields() { - return extensions.getAllFields(); - } - - @Override - public Map getAllFields() { - final Map result = super.getAllFieldsMutable(); - result.putAll(getExtensionFields()); - return Collections.unmodifiableMap(result); - } - - @Override - public boolean hasField(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.hasField(field); - } else { - return super.hasField(field); - } - } - - @Override - public Object getField(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - final Object value = extensions.getField(field); - if (value == null) { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - // Lacking an ExtensionRegistry, we have no way to determine the - // extension's real type, so we return a DynamicMessage. - return DynamicMessage.getDefaultInstance(field.getMessageType()); - } else { - return field.getDefaultValue(); - } - } else { - return value; - } - } else { - return super.getField(field); - } - } - - @Override - public int getRepeatedFieldCount(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.getRepeatedFieldCount(field); - } else { - return super.getRepeatedFieldCount(field); - } - } - - @Override - public Object getRepeatedField(final FieldDescriptor field, - final int index) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.getRepeatedField(field, index); - } else { - return super.getRepeatedField(field, index); - } - } - - private void verifyContainingType(final FieldDescriptor field) { - if (field.getContainingType() != getDescriptorForType()) { - throw new IllegalArgumentException( - "FieldDescriptor does not match message type."); - } - } - } - - /** - * Generated message builders for message types that contain extension ranges - * subclass this. - * - *

This class implements type-safe accessors for extensions. They - * implement all the same operations that you can do with normal fields -- - * e.g. "get", "set", and "add" -- but for extensions. The extensions are - * identified using instances of the class {@link GeneratedExtension}; the - * protocol compiler generates a static instance of this class for every - * extension in its input. Through the magic of generics, all is made - * type-safe. - * - *

For example, imagine you have the {@code .proto} file: - * - *

-   * option java_class = "MyProto";
-   *
-   * message Foo {
-   *   extensions 1000 to max;
-   * }
-   *
-   * extend Foo {
-   *   optional int32 bar;
-   * }
-   * 
- * - *

Then you might write code like: - * - *

-   * MyProto.Foo foo =
-   *   MyProto.Foo.newBuilder()
-   *     .setExtension(MyProto.bar, 123)
-   *     .build();
-   * 
- * - *

See also {@link ExtendableMessage}. - */ - @SuppressWarnings("unchecked") - public abstract static class ExtendableBuilder< - MessageType extends ExtendableMessage, - BuilderType extends ExtendableBuilder> - extends Builder - implements ExtendableMessageOrBuilder { - - private FieldSet extensions = FieldSet.emptySet(); - - protected ExtendableBuilder() {} - - protected ExtendableBuilder( - BuilderParent parent) { - super(parent); - } - - @Override - public BuilderType clear() { - extensions = FieldSet.emptySet(); - return super.clear(); - } - - // This is implemented here only to work around an apparent bug in the - // Java compiler and/or build system. See bug #1898463. The mere presence - // of this dummy clone() implementation makes it go away. - @Override - public BuilderType clone() { - throw new UnsupportedOperationException( - "This is supposed to be overridden by subclasses."); - } - - private void ensureExtensionsIsMutable() { - if (extensions.isImmutable()) { - extensions = extensions.clone(); - } - } - - private void verifyExtensionContainingType( - final GeneratedExtension extension) { - if (extension.getDescriptor().getContainingType() != - getDescriptorForType()) { - // This can only happen if someone uses unchecked operations. - throw new IllegalArgumentException( - "Extension is for type \"" + - extension.getDescriptor().getContainingType().getFullName() + - "\" which does not match message type \"" + - getDescriptorForType().getFullName() + "\"."); - } - } - - /** Check if a singular extension is present. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final boolean hasExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - return extensions.hasField(extension.getDescriptor()); - } - - /** Get the number of elements in a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final int getExtensionCount( - final GeneratedExtension> extension) { - verifyExtensionContainingType(extension); - final FieldDescriptor descriptor = extension.getDescriptor(); - return extensions.getRepeatedFieldCount(descriptor); - } - - /** Get the value of an extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final Type getExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - FieldDescriptor descriptor = extension.getDescriptor(); - final Object value = extensions.getField(descriptor); - if (value == null) { - if (descriptor.isRepeated()) { - return (Type) Collections.emptyList(); - } else if (descriptor.getJavaType() == - FieldDescriptor.JavaType.MESSAGE) { - return (Type) extension.getMessageDefaultInstance(); - } else { - return (Type) extension.fromReflectionType( - descriptor.getDefaultValue()); - } - } else { - return (Type) extension.fromReflectionType(value); - } - } - - /** Get one element of a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final Type getExtension( - final GeneratedExtension> extension, - final int index) { - verifyExtensionContainingType(extension); - FieldDescriptor descriptor = extension.getDescriptor(); - return (Type) extension.singularFromReflectionType( - extensions.getRepeatedField(descriptor, index)); - } - - /** Set the value of an extension. */ - public final BuilderType setExtension( - final GeneratedExtension extension, - final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - final FieldDescriptor descriptor = extension.getDescriptor(); - extensions.setField(descriptor, extension.toReflectionType(value)); - onChanged(); - return (BuilderType) this; - } - - /** Set the value of one element of a repeated extension. */ - public final BuilderType setExtension( - final GeneratedExtension> extension, - final int index, final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - final FieldDescriptor descriptor = extension.getDescriptor(); - extensions.setRepeatedField( - descriptor, index, - extension.singularToReflectionType(value)); - onChanged(); - return (BuilderType) this; - } - - /** Append a value to a repeated extension. */ - public final BuilderType addExtension( - final GeneratedExtension> extension, - final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - final FieldDescriptor descriptor = extension.getDescriptor(); - extensions.addRepeatedField( - descriptor, extension.singularToReflectionType(value)); - onChanged(); - return (BuilderType) this; - } - - /** Clear an extension. */ - public final BuilderType clearExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - extensions.clearField(extension.getDescriptor()); - onChanged(); - return (BuilderType) this; - } - - /** Called by subclasses to check if all extensions are initialized. */ - protected boolean extensionsAreInitialized() { - return extensions.isInitialized(); - } - - /** - * Called by the build code path to create a copy of the extensions for - * building the message. - */ - private FieldSet buildExtensions() { - extensions.makeImmutable(); - return extensions; - } - - @Override - public boolean isInitialized() { - return super.isInitialized() && extensionsAreInitialized(); - } - - /** - * Called by subclasses to parse an unknown field or an extension. - * @return {@code true} unless the tag is an end-group tag. - */ - @Override - protected boolean parseUnknownField( - final CodedInputStream input, - final UnknownFieldSet.Builder unknownFields, - final ExtensionRegistryLite extensionRegistry, - final int tag) throws IOException { - return AbstractMessage.Builder.mergeFieldFrom( - input, unknownFields, extensionRegistry, this, tag); - } - - // --------------------------------------------------------------- - // Reflection - - @Override - public Map getAllFields() { - final Map result = super.getAllFieldsMutable(); - result.putAll(extensions.getAllFields()); - return Collections.unmodifiableMap(result); - } - - @Override - public Object getField(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - final Object value = extensions.getField(field); - if (value == null) { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - // Lacking an ExtensionRegistry, we have no way to determine the - // extension's real type, so we return a DynamicMessage. - return DynamicMessage.getDefaultInstance(field.getMessageType()); - } else { - return field.getDefaultValue(); - } - } else { - return value; - } - } else { - return super.getField(field); - } - } - - @Override - public int getRepeatedFieldCount(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.getRepeatedFieldCount(field); - } else { - return super.getRepeatedFieldCount(field); - } - } - - @Override - public Object getRepeatedField(final FieldDescriptor field, - final int index) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.getRepeatedField(field, index); - } else { - return super.getRepeatedField(field, index); - } - } - - @Override - public boolean hasField(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - return extensions.hasField(field); - } else { - return super.hasField(field); - } - } - - @Override - public BuilderType setField(final FieldDescriptor field, - final Object value) { - if (field.isExtension()) { - verifyContainingType(field); - ensureExtensionsIsMutable(); - extensions.setField(field, value); - onChanged(); - return (BuilderType) this; - } else { - return super.setField(field, value); - } - } - - @Override - public BuilderType clearField(final FieldDescriptor field) { - if (field.isExtension()) { - verifyContainingType(field); - ensureExtensionsIsMutable(); - extensions.clearField(field); - onChanged(); - return (BuilderType) this; - } else { - return super.clearField(field); - } - } - - @Override - public BuilderType setRepeatedField(final FieldDescriptor field, - final int index, final Object value) { - if (field.isExtension()) { - verifyContainingType(field); - ensureExtensionsIsMutable(); - extensions.setRepeatedField(field, index, value); - onChanged(); - return (BuilderType) this; - } else { - return super.setRepeatedField(field, index, value); - } - } - - @Override - public BuilderType addRepeatedField(final FieldDescriptor field, - final Object value) { - if (field.isExtension()) { - verifyContainingType(field); - ensureExtensionsIsMutable(); - extensions.addRepeatedField(field, value); - onChanged(); - return (BuilderType) this; - } else { - return super.addRepeatedField(field, value); - } - } - - protected final void mergeExtensionFields(final ExtendableMessage other) { - ensureExtensionsIsMutable(); - extensions.mergeFrom(other.extensions); - onChanged(); - } - - private void verifyContainingType(final FieldDescriptor field) { - if (field.getContainingType() != getDescriptorForType()) { - throw new IllegalArgumentException( - "FieldDescriptor does not match message type."); - } - } - } - - // ----------------------------------------------------------------- - - /** - * Gets the descriptor for an extension. The implementation depends on whether - * the extension is scoped in the top level of a file or scoped in a Message. - */ - private static interface ExtensionDescriptorRetriever { - FieldDescriptor getDescriptor(); - } - - /** For use by generated code only. */ - public static - GeneratedExtension - newMessageScopedGeneratedExtension(final Message scope, - final int descriptorIndex, - final Class singularType, - final Message defaultInstance) { - // For extensions scoped within a Message, we use the Message to resolve - // the outer class's descriptor, from which the extension descriptor is - // obtained. - return new GeneratedExtension( - new ExtensionDescriptorRetriever() { - @Override - public FieldDescriptor getDescriptor() { - return scope.getDescriptorForType().getExtensions() - .get(descriptorIndex); - } - }, - singularType, - defaultInstance); - } - - /** For use by generated code only. */ - public static - GeneratedExtension - newFileScopedGeneratedExtension(final Class singularType, - final Message defaultInstance) { - // For extensions scoped within a file, we rely on the outer class's - // static initializer to call internalInit() on the extension when the - // descriptor is available. - return new GeneratedExtension( - null, // ExtensionDescriptorRetriever is initialized in internalInit(); - singularType, - defaultInstance); - } - - /** - * Type used to represent generated extensions. The protocol compiler - * generates a static singleton instance of this class for each extension. - * - *

For example, imagine you have the {@code .proto} file: - * - *

-   * option java_class = "MyProto";
-   *
-   * message Foo {
-   *   extensions 1000 to max;
-   * }
-   *
-   * extend Foo {
-   *   optional int32 bar;
-   * }
-   * 
- * - *

Then, {@code MyProto.Foo.bar} has type - * {@code GeneratedExtension}. - * - *

In general, users should ignore the details of this type, and simply use - * these static singletons as parameters to the extension accessors defined - * in {@link ExtendableMessage} and {@link ExtendableBuilder}. - */ - public static final class GeneratedExtension< - ContainingType extends Message, Type> { - // TODO(kenton): Find ways to avoid using Java reflection within this - // class. Also try to avoid suppressing unchecked warnings. - - // We can't always initialize the descriptor of a GeneratedExtension when - // we first construct it due to initialization order difficulties (namely, - // the descriptor may not have been constructed yet, since it is often - // constructed by the initializer of a separate module). - // - // In the case of nested extensions, we initialize the - // ExtensionDescriptorRetriever with an instance that uses the scoping - // Message's default instance to retrieve the extension's descriptor. - // - // In the case of non-nested extensions, we initialize the - // ExtensionDescriptorRetriever to null and rely on the outer class's static - // initializer to call internalInit() after the descriptor has been parsed. - private GeneratedExtension(ExtensionDescriptorRetriever descriptorRetriever, - Class singularType, - Message messageDefaultInstance) { - if (Message.class.isAssignableFrom(singularType) && - !singularType.isInstance(messageDefaultInstance)) { - throw new IllegalArgumentException( - "Bad messageDefaultInstance for " + singularType.getName()); - } - this.descriptorRetriever = descriptorRetriever; - this.singularType = singularType; - this.messageDefaultInstance = messageDefaultInstance; - - if (ProtocolMessageEnum.class.isAssignableFrom(singularType)) { - this.enumValueOf = getMethodOrDie(singularType, "valueOf", - EnumValueDescriptor.class); - this.enumGetValueDescriptor = - getMethodOrDie(singularType, "getValueDescriptor"); - } else { - this.enumValueOf = null; - this.enumGetValueDescriptor = null; - } - } - - /** For use by generated code only. */ - public void internalInit(final FieldDescriptor descriptor) { - if (descriptorRetriever != null) { - throw new IllegalStateException("Already initialized."); - } - descriptorRetriever = new ExtensionDescriptorRetriever() { - @Override - public FieldDescriptor getDescriptor() { - return descriptor; - } - }; - } - - private ExtensionDescriptorRetriever descriptorRetriever; - private final Class singularType; - private final Message messageDefaultInstance; - private final Method enumValueOf; - private final Method enumGetValueDescriptor; - - public FieldDescriptor getDescriptor() { - if (descriptorRetriever == null) { - throw new IllegalStateException( - "getDescriptor() called before internalInit()"); - } - return descriptorRetriever.getDescriptor(); - } - - /** - * If the extension is an embedded message or group, returns the default - * instance of the message. - */ - public Message getMessageDefaultInstance() { - return messageDefaultInstance; - } - - /** - * Convert from the type used by the reflection accessors to the type used - * by native accessors. E.g., for enums, the reflection accessors use - * EnumValueDescriptors but the native accessors use the generated enum - * type. - */ - @SuppressWarnings("unchecked") - private Object fromReflectionType(final Object value) { - FieldDescriptor descriptor = getDescriptor(); - if (descriptor.isRepeated()) { - if (descriptor.getJavaType() == FieldDescriptor.JavaType.MESSAGE || - descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { - // Must convert the whole list. - final List result = new ArrayList(); - for (final Object element : (List) value) { - result.add(singularFromReflectionType(element)); - } - return result; - } else { - return value; - } - } else { - return singularFromReflectionType(value); - } - } - - /** - * Like {@link #fromReflectionType(Object)}, but if the type is a repeated - * type, this converts a single element. - */ - private Object singularFromReflectionType(final Object value) { - FieldDescriptor descriptor = getDescriptor(); - switch (descriptor.getJavaType()) { - case MESSAGE: - if (singularType.isInstance(value)) { - return value; - } else { - // It seems the copy of the embedded message stored inside the - // extended message is not of the exact type the user was - // expecting. This can happen if a user defines a - // GeneratedExtension manually and gives it a different type. - // This should not happen in normal use. But, to be nice, we'll - // copy the message to whatever type the caller was expecting. - return messageDefaultInstance.newBuilderForType() - .mergeFrom((Message) value).build(); - } - case ENUM: - return invokeOrDie(enumValueOf, null, (EnumValueDescriptor) value); - default: - return value; - } - } - - /** - * Convert from the type used by the native accessors to the type used - * by reflection accessors. E.g., for enums, the reflection accessors use - * EnumValueDescriptors but the native accessors use the generated enum - * type. - */ - @SuppressWarnings("unchecked") - private Object toReflectionType(final Object value) { - FieldDescriptor descriptor = getDescriptor(); - if (descriptor.isRepeated()) { - if (descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { - // Must convert the whole list. - final List result = new ArrayList(); - for (final Object element : (List) value) { - result.add(singularToReflectionType(element)); - } - return result; - } else { - return value; - } - } else { - return singularToReflectionType(value); - } - } - - /** - * Like {@link #toReflectionType(Object)}, but if the type is a repeated - * type, this converts a single element. - */ - private Object singularToReflectionType(final Object value) { - FieldDescriptor descriptor = getDescriptor(); - switch (descriptor.getJavaType()) { - case ENUM: - return invokeOrDie(enumGetValueDescriptor, value); - default: - return value; - } - } - } - - // ================================================================= - - /** Calls Class.getMethod and throws a RuntimeException if it fails. */ - @SuppressWarnings("unchecked") - private static Method getMethodOrDie( - final Class clazz, final String name, final Class... params) { - try { - return clazz.getMethod(name, params); - } catch (NoSuchMethodException e) { - throw new RuntimeException( - "Generated message class \"" + clazz.getName() + - "\" missing method \"" + name + "\".", e); - } - } - - /** Calls invoke and throws a RuntimeException if it fails. */ - private static Object invokeOrDie( - final Method method, final Object object, final Object... params) { - try { - return method.invoke(object, params); - } catch (IllegalAccessException e) { - throw new RuntimeException( - "Couldn't use Java reflection to implement protocol message " + - "reflection.", e); - } catch (InvocationTargetException e) { - final Throwable cause = e.getCause(); - if (cause instanceof RuntimeException) { - throw (RuntimeException) cause; - } else if (cause instanceof Error) { - throw (Error) cause; - } else { - throw new RuntimeException( - "Unexpected exception thrown by generated accessor method.", cause); - } - } - } - - /** - * Users should ignore this class. This class provides the implementation - * with access to the fields of a message object using Java reflection. - */ - public static final class FieldAccessorTable { - - /** - * Construct a FieldAccessorTable for a particular message class. Only - * one FieldAccessorTable should ever be constructed per class. - * - * @param descriptor The type's descriptor. - * @param camelCaseNames The camelcase names of all fields in the message. - * These are used to derive the accessor method names. - * @param messageClass The message type. - * @param builderClass The builder type. - */ - public FieldAccessorTable( - final Descriptor descriptor, - final String[] camelCaseNames, - final Class messageClass, - final Class builderClass) { - this.descriptor = descriptor; - fields = new FieldAccessor[descriptor.getFields().size()]; - - for (int i = 0; i < fields.length; i++) { - final FieldDescriptor field = descriptor.getFields().get(i); - if (field.isRepeated()) { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - fields[i] = new RepeatedMessageFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } else if (field.getJavaType() == FieldDescriptor.JavaType.ENUM) { - fields[i] = new RepeatedEnumFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } else { - fields[i] = new RepeatedFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } - } else { - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - fields[i] = new SingularMessageFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } else if (field.getJavaType() == FieldDescriptor.JavaType.ENUM) { - fields[i] = new SingularEnumFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } else { - fields[i] = new SingularFieldAccessor( - field, camelCaseNames[i], messageClass, builderClass); - } - } - } - } - - private final Descriptor descriptor; - private final FieldAccessor[] fields; - - /** Get the FieldAccessor for a particular field. */ - private FieldAccessor getField(final FieldDescriptor field) { - if (field.getContainingType() != descriptor) { - throw new IllegalArgumentException( - "FieldDescriptor does not match message type."); - } else if (field.isExtension()) { - // If this type had extensions, it would subclass ExtendableMessage, - // which overrides the reflection interface to handle extensions. - throw new IllegalArgumentException( - "This type does not have extensions."); - } - return fields[field.getIndex()]; - } - - /** - * Abstract interface that provides access to a single field. This is - * implemented differently depending on the field type and cardinality. - */ - private interface FieldAccessor { - Object get(GeneratedMessage message); - Object get(GeneratedMessage.Builder builder); - void set(Builder builder, Object value); - Object getRepeated(GeneratedMessage message, int index); - Object getRepeated(GeneratedMessage.Builder builder, int index); - void setRepeated(Builder builder, - int index, Object value); - void addRepeated(Builder builder, Object value); - boolean has(GeneratedMessage message); - boolean has(GeneratedMessage.Builder builder); - int getRepeatedCount(GeneratedMessage message); - int getRepeatedCount(GeneratedMessage.Builder builder); - void clear(Builder builder); - Message.Builder newBuilder(); - } - - // --------------------------------------------------------------- - - private static class SingularFieldAccessor implements FieldAccessor { - SingularFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - getMethod = getMethodOrDie(messageClass, "get" + camelCaseName); - getMethodBuilder = getMethodOrDie(builderClass, "get" + camelCaseName); - type = getMethod.getReturnType(); - setMethod = getMethodOrDie(builderClass, "set" + camelCaseName, type); - hasMethod = - getMethodOrDie(messageClass, "has" + camelCaseName); - hasMethodBuilder = - getMethodOrDie(builderClass, "has" + camelCaseName); - clearMethod = getMethodOrDie(builderClass, "clear" + camelCaseName); - } - - // Note: We use Java reflection to call public methods rather than - // access private fields directly as this avoids runtime security - // checks. - protected final Class type; - protected final Method getMethod; - protected final Method getMethodBuilder; - protected final Method setMethod; - protected final Method hasMethod; - protected final Method hasMethodBuilder; - protected final Method clearMethod; - - public Object get(final GeneratedMessage message) { - return invokeOrDie(getMethod, message); - } - public Object get(GeneratedMessage.Builder builder) { - return invokeOrDie(getMethodBuilder, builder); - } - public void set(final Builder builder, final Object value) { - invokeOrDie(setMethod, builder, value); - } - public Object getRepeated(final GeneratedMessage message, - final int index) { - throw new UnsupportedOperationException( - "getRepeatedField() called on a singular field."); - } - public Object getRepeated(GeneratedMessage.Builder builder, int index) { - throw new UnsupportedOperationException( - "getRepeatedField() called on a singular field."); - } - public void setRepeated(final Builder builder, - final int index, final Object value) { - throw new UnsupportedOperationException( - "setRepeatedField() called on a singular field."); - } - public void addRepeated(final Builder builder, final Object value) { - throw new UnsupportedOperationException( - "addRepeatedField() called on a singular field."); - } - public boolean has(final GeneratedMessage message) { - return (Boolean) invokeOrDie(hasMethod, message); - } - public boolean has(GeneratedMessage.Builder builder) { - return (Boolean) invokeOrDie(hasMethodBuilder, builder); - } - public int getRepeatedCount(final GeneratedMessage message) { - throw new UnsupportedOperationException( - "getRepeatedFieldSize() called on a singular field."); - } - public int getRepeatedCount(GeneratedMessage.Builder builder) { - throw new UnsupportedOperationException( - "getRepeatedFieldSize() called on a singular field."); - } - public void clear(final Builder builder) { - invokeOrDie(clearMethod, builder); - } - public Message.Builder newBuilder() { - throw new UnsupportedOperationException( - "newBuilderForField() called on a non-Message type."); - } - } - - private static class RepeatedFieldAccessor implements FieldAccessor { - protected final Class type; - protected final Method getMethod; - protected final Method getMethodBuilder; - protected final Method getRepeatedMethod; - protected final Method getRepeatedMethodBuilder; - protected final Method setRepeatedMethod; - protected final Method addRepeatedMethod; - protected final Method getCountMethod; - protected final Method getCountMethodBuilder; - protected final Method clearMethod; - - RepeatedFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - getMethod = getMethodOrDie(messageClass, - "get" + camelCaseName + "List"); - getMethodBuilder = getMethodOrDie(builderClass, - "get" + camelCaseName + "List"); - - - getRepeatedMethod = - getMethodOrDie(messageClass, "get" + camelCaseName, Integer.TYPE); - getRepeatedMethodBuilder = - getMethodOrDie(builderClass, "get" + camelCaseName, Integer.TYPE); - type = getRepeatedMethod.getReturnType(); - setRepeatedMethod = - getMethodOrDie(builderClass, "set" + camelCaseName, - Integer.TYPE, type); - addRepeatedMethod = - getMethodOrDie(builderClass, "add" + camelCaseName, type); - getCountMethod = - getMethodOrDie(messageClass, "get" + camelCaseName + "Count"); - getCountMethodBuilder = - getMethodOrDie(builderClass, "get" + camelCaseName + "Count"); - - clearMethod = getMethodOrDie(builderClass, "clear" + camelCaseName); - } - - public Object get(final GeneratedMessage message) { - return invokeOrDie(getMethod, message); - } - public Object get(GeneratedMessage.Builder builder) { - return invokeOrDie(getMethodBuilder, builder); - } - public void set(final Builder builder, final Object value) { - // Add all the elements individually. This serves two purposes: - // 1) Verifies that each element has the correct type. - // 2) Insures that the caller cannot modify the list later on and - // have the modifications be reflected in the message. - clear(builder); - for (final Object element : (List) value) { - addRepeated(builder, element); - } - } - public Object getRepeated(final GeneratedMessage message, - final int index) { - return invokeOrDie(getRepeatedMethod, message, index); - } - public Object getRepeated(GeneratedMessage.Builder builder, int index) { - return invokeOrDie(getRepeatedMethodBuilder, builder, index); - } - public void setRepeated(final Builder builder, - final int index, final Object value) { - invokeOrDie(setRepeatedMethod, builder, index, value); - } - public void addRepeated(final Builder builder, final Object value) { - invokeOrDie(addRepeatedMethod, builder, value); - } - public boolean has(final GeneratedMessage message) { - throw new UnsupportedOperationException( - "hasField() called on a singular field."); - } - public boolean has(GeneratedMessage.Builder builder) { - throw new UnsupportedOperationException( - "hasField() called on a singular field."); - } - public int getRepeatedCount(final GeneratedMessage message) { - return (Integer) invokeOrDie(getCountMethod, message); - } - public int getRepeatedCount(GeneratedMessage.Builder builder) { - return (Integer) invokeOrDie(getCountMethodBuilder, builder); - } - public void clear(final Builder builder) { - invokeOrDie(clearMethod, builder); - } - public Message.Builder newBuilder() { - throw new UnsupportedOperationException( - "newBuilderForField() called on a non-Message type."); - } - } - - // --------------------------------------------------------------- - - private static final class SingularEnumFieldAccessor - extends SingularFieldAccessor { - SingularEnumFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - super(descriptor, camelCaseName, messageClass, builderClass); - - valueOfMethod = getMethodOrDie(type, "valueOf", - EnumValueDescriptor.class); - getValueDescriptorMethod = - getMethodOrDie(type, "getValueDescriptor"); - } - - private Method valueOfMethod; - private Method getValueDescriptorMethod; - - @Override - public Object get(final GeneratedMessage message) { - return invokeOrDie(getValueDescriptorMethod, super.get(message)); - } - - @Override - public Object get(final GeneratedMessage.Builder builder) { - return invokeOrDie(getValueDescriptorMethod, super.get(builder)); - } - - @Override - public void set(final Builder builder, final Object value) { - super.set(builder, invokeOrDie(valueOfMethod, null, value)); - } - } - - private static final class RepeatedEnumFieldAccessor - extends RepeatedFieldAccessor { - RepeatedEnumFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - super(descriptor, camelCaseName, messageClass, builderClass); - - valueOfMethod = getMethodOrDie(type, "valueOf", - EnumValueDescriptor.class); - getValueDescriptorMethod = - getMethodOrDie(type, "getValueDescriptor"); - } - - private final Method valueOfMethod; - private final Method getValueDescriptorMethod; - - @Override - @SuppressWarnings("unchecked") - public Object get(final GeneratedMessage message) { - final List newList = new ArrayList(); - for (final Object element : (List) super.get(message)) { - newList.add(invokeOrDie(getValueDescriptorMethod, element)); - } - return Collections.unmodifiableList(newList); - } - - @Override - @SuppressWarnings("unchecked") - public Object get(final GeneratedMessage.Builder builder) { - final List newList = new ArrayList(); - for (final Object element : (List) super.get(builder)) { - newList.add(invokeOrDie(getValueDescriptorMethod, element)); - } - return Collections.unmodifiableList(newList); - } - - @Override - public Object getRepeated(final GeneratedMessage message, - final int index) { - return invokeOrDie(getValueDescriptorMethod, - super.getRepeated(message, index)); - } - @Override - public Object getRepeated(final GeneratedMessage.Builder builder, - final int index) { - return invokeOrDie(getValueDescriptorMethod, - super.getRepeated(builder, index)); - } - @Override - public void setRepeated(final Builder builder, - final int index, final Object value) { - super.setRepeated(builder, index, invokeOrDie(valueOfMethod, null, - value)); - } - @Override - public void addRepeated(final Builder builder, final Object value) { - super.addRepeated(builder, invokeOrDie(valueOfMethod, null, value)); - } - } - - // --------------------------------------------------------------- - - private static final class SingularMessageFieldAccessor - extends SingularFieldAccessor { - SingularMessageFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - super(descriptor, camelCaseName, messageClass, builderClass); - - newBuilderMethod = getMethodOrDie(type, "newBuilder"); - } - - private final Method newBuilderMethod; - - private Object coerceType(final Object value) { - if (type.isInstance(value)) { - return value; - } else { - // The value is not the exact right message type. However, if it - // is an alternative implementation of the same type -- e.g. a - // DynamicMessage -- we should accept it. In this case we can make - // a copy of the message. - return ((Message.Builder) invokeOrDie(newBuilderMethod, null)) - .mergeFrom((Message) value).build(); - } - } - - @Override - public void set(final Builder builder, final Object value) { - super.set(builder, coerceType(value)); - } - @Override - public Message.Builder newBuilder() { - return (Message.Builder) invokeOrDie(newBuilderMethod, null); - } - } - - private static final class RepeatedMessageFieldAccessor - extends RepeatedFieldAccessor { - RepeatedMessageFieldAccessor( - final FieldDescriptor descriptor, final String camelCaseName, - final Class messageClass, - final Class builderClass) { - super(descriptor, camelCaseName, messageClass, builderClass); - - newBuilderMethod = getMethodOrDie(type, "newBuilder"); - } - - private final Method newBuilderMethod; - - private Object coerceType(final Object value) { - if (type.isInstance(value)) { - return value; - } else { - // The value is not the exact right message type. However, if it - // is an alternative implementation of the same type -- e.g. a - // DynamicMessage -- we should accept it. In this case we can make - // a copy of the message. - return ((Message.Builder) invokeOrDie(newBuilderMethod, null)) - .mergeFrom((Message) value).build(); - } - } - - @Override - public void setRepeated(final Builder builder, - final int index, final Object value) { - super.setRepeated(builder, index, coerceType(value)); - } - @Override - public void addRepeated(final Builder builder, final Object value) { - super.addRepeated(builder, coerceType(value)); - } - @Override - public Message.Builder newBuilder() { - return (Message.Builder) invokeOrDie(newBuilderMethod, null); - } - } - } - - /** - * Replaces this object in the output stream with a serialized form. - * Part of Java's serialization magic. Generated sub-classes must override - * this method by calling return super.writeReplace(); - * @return a SerializedForm of this message - */ - protected Object writeReplace() throws ObjectStreamException { - return new GeneratedMessageLite.SerializedForm(this); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java deleted file mode 100644 index 1813e9b3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java +++ /dev/null @@ -1,731 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.IOException; -import java.io.ObjectStreamException; -import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * Lite version of {@link GeneratedMessage}. - * - * @author kenton@google.com Kenton Varda - */ -public abstract class GeneratedMessageLite extends AbstractMessageLite - implements Serializable { - private static final long serialVersionUID = 1L; - - protected GeneratedMessageLite() { - } - - protected GeneratedMessageLite(Builder builder) { - } - - @SuppressWarnings("unchecked") - public abstract static class Builder - extends AbstractMessageLite.Builder { - protected Builder() {} - - //@Override (Java 1.6 override semantics, but we must support 1.5) - public BuilderType clear() { - return (BuilderType) this; - } - - // This is implemented here only to work around an apparent bug in the - // Java compiler and/or build system. See bug #1898463. The mere presence - // of this dummy clone() implementation makes it go away. - @Override - public BuilderType clone() { - throw new UnsupportedOperationException( - "This is supposed to be overridden by subclasses."); - } - - /** All subclasses implement this. */ - public abstract BuilderType mergeFrom(MessageType message); - - // Defined here for return type covariance. - public abstract MessageType getDefaultInstanceForType(); - - /** - * Called by subclasses to parse an unknown field. - * @return {@code true} unless the tag is an end-group tag. - */ - protected boolean parseUnknownField( - final CodedInputStream input, - final ExtensionRegistryLite extensionRegistry, - final int tag) throws IOException { - return input.skipField(tag); - } - } - - // ================================================================= - // Extensions-related stuff - - /** - * Lite equivalent of {@link com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder}. - */ - public interface ExtendableMessageOrBuilder< - MessageType extends ExtendableMessage> extends MessageLiteOrBuilder { - - /** Check if a singular extension is present. */ - boolean hasExtension( - GeneratedExtension extension); - - /** Get the number of elements in a repeated extension. */ - int getExtensionCount( - GeneratedExtension> extension); - - /** Get the value of an extension. */ - Type getExtension(GeneratedExtension extension); - - /** Get one element of a repeated extension. */ - Type getExtension( - GeneratedExtension> extension, - int index); - } - - /** - * Lite equivalent of {@link GeneratedMessage.ExtendableMessage}. - */ - public abstract static class ExtendableMessage< - MessageType extends ExtendableMessage> - extends GeneratedMessageLite - implements ExtendableMessageOrBuilder { - - private final FieldSet extensions; - - protected ExtendableMessage() { - this.extensions = FieldSet.newFieldSet(); - } - - protected ExtendableMessage(ExtendableBuilder builder) { - this.extensions = builder.buildExtensions(); - } - - private void verifyExtensionContainingType( - final GeneratedExtension extension) { - if (extension.getContainingTypeDefaultInstance() != - getDefaultInstanceForType()) { - // This can only happen if someone uses unchecked operations. - throw new IllegalArgumentException( - "This extension is for a different message type. Please make " + - "sure that you are not suppressing any generics type warnings."); - } - } - - /** Check if a singular extension is present. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final boolean hasExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - return extensions.hasField(extension.descriptor); - } - - /** Get the number of elements in a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final int getExtensionCount( - final GeneratedExtension> extension) { - verifyExtensionContainingType(extension); - return extensions.getRepeatedFieldCount(extension.descriptor); - } - - /** Get the value of an extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - @SuppressWarnings("unchecked") - public final Type getExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - final Object value = extensions.getField(extension.descriptor); - if (value == null) { - return extension.defaultValue; - } else { - return (Type) value; - } - } - - /** Get one element of a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - @SuppressWarnings("unchecked") - public final Type getExtension( - final GeneratedExtension> extension, - final int index) { - verifyExtensionContainingType(extension); - return (Type) extensions.getRepeatedField(extension.descriptor, index); - } - - /** Called by subclasses to check if all extensions are initialized. */ - protected boolean extensionsAreInitialized() { - return extensions.isInitialized(); - } - - /** - * Used by subclasses to serialize extensions. Extension ranges may be - * interleaved with field numbers, but we must write them in canonical - * (sorted by field number) order. ExtensionWriter helps us write - * individual ranges of extensions at once. - */ - protected class ExtensionWriter { - // Imagine how much simpler this code would be if Java iterators had - // a way to get the next element without advancing the iterator. - - private final Iterator> iter = - extensions.iterator(); - private Map.Entry next; - private final boolean messageSetWireFormat; - - private ExtensionWriter(boolean messageSetWireFormat) { - if (iter.hasNext()) { - next = iter.next(); - } - this.messageSetWireFormat = messageSetWireFormat; - } - - public void writeUntil(final int end, final CodedOutputStream output) - throws IOException { - while (next != null && next.getKey().getNumber() < end) { - ExtensionDescriptor extension = next.getKey(); - if (messageSetWireFormat && extension.getLiteJavaType() == - WireFormat.JavaType.MESSAGE && - !extension.isRepeated()) { - output.writeMessageSetExtension(extension.getNumber(), - (MessageLite) next.getValue()); - } else { - FieldSet.writeField(extension, next.getValue(), output); - } - if (iter.hasNext()) { - next = iter.next(); - } else { - next = null; - } - } - } - } - - protected ExtensionWriter newExtensionWriter() { - return new ExtensionWriter(false); - } - protected ExtensionWriter newMessageSetExtensionWriter() { - return new ExtensionWriter(true); - } - - /** Called by subclasses to compute the size of extensions. */ - protected int extensionsSerializedSize() { - return extensions.getSerializedSize(); - } - protected int extensionsSerializedSizeAsMessageSet() { - return extensions.getMessageSetSerializedSize(); - } - } - - /** - * Lite equivalent of {@link GeneratedMessage.ExtendableBuilder}. - */ - @SuppressWarnings("unchecked") - public abstract static class ExtendableBuilder< - MessageType extends ExtendableMessage, - BuilderType extends ExtendableBuilder> - extends Builder - implements ExtendableMessageOrBuilder { - protected ExtendableBuilder() {} - - private FieldSet extensions = FieldSet.emptySet(); - private boolean extensionsIsMutable; - - @Override - public BuilderType clear() { - extensions.clear(); - extensionsIsMutable = false; - return super.clear(); - } - - private void ensureExtensionsIsMutable() { - if (!extensionsIsMutable) { - extensions = extensions.clone(); - extensionsIsMutable = true; - } - } - - /** - * Called by the build code path to create a copy of the extensions for - * building the message. - */ - private FieldSet buildExtensions() { - extensions.makeImmutable(); - extensionsIsMutable = false; - return extensions; - } - - private void verifyExtensionContainingType( - final GeneratedExtension extension) { - if (extension.getContainingTypeDefaultInstance() != - getDefaultInstanceForType()) { - // This can only happen if someone uses unchecked operations. - throw new IllegalArgumentException( - "This extension is for a different message type. Please make " + - "sure that you are not suppressing any generics type warnings."); - } - } - - /** Check if a singular extension is present. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final boolean hasExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - return extensions.hasField(extension.descriptor); - } - - /** Get the number of elements in a repeated extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final int getExtensionCount( - final GeneratedExtension> extension) { - verifyExtensionContainingType(extension); - return extensions.getRepeatedFieldCount(extension.descriptor); - } - - /** Get the value of an extension. */ - //@Override (Java 1.6 override semantics, but we must support 1.5) - @SuppressWarnings("unchecked") - public final Type getExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - final Object value = extensions.getField(extension.descriptor); - if (value == null) { - return extension.defaultValue; - } else { - return (Type) value; - } - } - - /** Get one element of a repeated extension. */ - @SuppressWarnings("unchecked") - //@Override (Java 1.6 override semantics, but we must support 1.5) - public final Type getExtension( - final GeneratedExtension> extension, - final int index) { - verifyExtensionContainingType(extension); - return (Type) extensions.getRepeatedField(extension.descriptor, index); - } - - // This is implemented here only to work around an apparent bug in the - // Java compiler and/or build system. See bug #1898463. The mere presence - // of this dummy clone() implementation makes it go away. - @Override - public BuilderType clone() { - throw new UnsupportedOperationException( - "This is supposed to be overridden by subclasses."); - } - - /** Set the value of an extension. */ - public final BuilderType setExtension( - final GeneratedExtension extension, - final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - extensions.setField(extension.descriptor, value); - return (BuilderType) this; - } - - /** Set the value of one element of a repeated extension. */ - public final BuilderType setExtension( - final GeneratedExtension> extension, - final int index, final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - extensions.setRepeatedField(extension.descriptor, index, value); - return (BuilderType) this; - } - - /** Append a value to a repeated extension. */ - public final BuilderType addExtension( - final GeneratedExtension> extension, - final Type value) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - extensions.addRepeatedField(extension.descriptor, value); - return (BuilderType) this; - } - - /** Clear an extension. */ - public final BuilderType clearExtension( - final GeneratedExtension extension) { - verifyExtensionContainingType(extension); - ensureExtensionsIsMutable(); - extensions.clearField(extension.descriptor); - return (BuilderType) this; - } - - /** Called by subclasses to check if all extensions are initialized. */ - protected boolean extensionsAreInitialized() { - return extensions.isInitialized(); - } - - /** - * Called by subclasses to parse an unknown field or an extension. - * @return {@code true} unless the tag is an end-group tag. - */ - @Override - protected boolean parseUnknownField( - final CodedInputStream input, - final ExtensionRegistryLite extensionRegistry, - final int tag) throws IOException { - final int wireType = WireFormat.getTagWireType(tag); - final int fieldNumber = WireFormat.getTagFieldNumber(tag); - - final GeneratedExtension extension = - extensionRegistry.findLiteExtensionByNumber( - getDefaultInstanceForType(), fieldNumber); - - boolean unknown = false; - boolean packed = false; - if (extension == null) { - unknown = true; // Unknown field. - } else if (wireType == FieldSet.getWireFormatForFieldType( - extension.descriptor.getLiteType(), - false /* isPacked */)) { - packed = false; // Normal, unpacked value. - } else if (extension.descriptor.isRepeated && - extension.descriptor.type.isPackable() && - wireType == FieldSet.getWireFormatForFieldType( - extension.descriptor.getLiteType(), - true /* isPacked */)) { - packed = true; // Packed value. - } else { - unknown = true; // Wrong wire type. - } - - if (unknown) { // Unknown field or wrong wire type. Skip. - return input.skipField(tag); - } - - if (packed) { - final int length = input.readRawVarint32(); - final int limit = input.pushLimit(length); - if (extension.descriptor.getLiteType() == WireFormat.FieldType.ENUM) { - while (input.getBytesUntilLimit() > 0) { - final int rawValue = input.readEnum(); - final Object value = - extension.descriptor.getEnumType().findValueByNumber(rawValue); - if (value == null) { - // If the number isn't recognized as a valid value for this - // enum, drop it (don't even add it to unknownFields). - return true; - } - ensureExtensionsIsMutable(); - extensions.addRepeatedField(extension.descriptor, value); - } - } else { - while (input.getBytesUntilLimit() > 0) { - final Object value = - FieldSet.readPrimitiveField(input, - extension.descriptor.getLiteType()); - ensureExtensionsIsMutable(); - extensions.addRepeatedField(extension.descriptor, value); - } - } - input.popLimit(limit); - } else { - final Object value; - switch (extension.descriptor.getLiteJavaType()) { - case MESSAGE: { - MessageLite.Builder subBuilder = null; - if (!extension.descriptor.isRepeated()) { - MessageLite existingValue = - (MessageLite) extensions.getField(extension.descriptor); - if (existingValue != null) { - subBuilder = existingValue.toBuilder(); - } - } - if (subBuilder == null) { - subBuilder = extension.messageDefaultInstance.newBuilderForType(); - } - if (extension.descriptor.getLiteType() == - WireFormat.FieldType.GROUP) { - input.readGroup(extension.getNumber(), - subBuilder, extensionRegistry); - } else { - input.readMessage(subBuilder, extensionRegistry); - } - value = subBuilder.build(); - break; - } - case ENUM: - final int rawValue = input.readEnum(); - value = extension.descriptor.getEnumType() - .findValueByNumber(rawValue); - // If the number isn't recognized as a valid value for this enum, - // drop it. - if (value == null) { - return true; - } - break; - default: - value = FieldSet.readPrimitiveField(input, - extension.descriptor.getLiteType()); - break; - } - - if (extension.descriptor.isRepeated()) { - ensureExtensionsIsMutable(); - extensions.addRepeatedField(extension.descriptor, value); - } else { - ensureExtensionsIsMutable(); - extensions.setField(extension.descriptor, value); - } - } - - return true; - } - - protected final void mergeExtensionFields(final MessageType other) { - ensureExtensionsIsMutable(); - extensions.mergeFrom(((ExtendableMessage) other).extensions); - } - } - - // ----------------------------------------------------------------- - - /** For use by generated code only. */ - public static - GeneratedExtension - newSingularGeneratedExtension( - final ContainingType containingTypeDefaultInstance, - final Type defaultValue, - final MessageLite messageDefaultInstance, - final Internal.EnumLiteMap enumTypeMap, - final int number, - final WireFormat.FieldType type) { - return new GeneratedExtension( - containingTypeDefaultInstance, - defaultValue, - messageDefaultInstance, - new ExtensionDescriptor(enumTypeMap, number, type, - false /* isRepeated */, - false /* isPacked */)); - } - - /** For use by generated code only. */ - public static - GeneratedExtension - newRepeatedGeneratedExtension( - final ContainingType containingTypeDefaultInstance, - final MessageLite messageDefaultInstance, - final Internal.EnumLiteMap enumTypeMap, - final int number, - final WireFormat.FieldType type, - final boolean isPacked) { - @SuppressWarnings("unchecked") // Subclasses ensure Type is a List - Type emptyList = (Type) Collections.emptyList(); - return new GeneratedExtension( - containingTypeDefaultInstance, - emptyList, - messageDefaultInstance, - new ExtensionDescriptor( - enumTypeMap, number, type, true /* isRepeated */, isPacked)); - } - - private static final class ExtensionDescriptor - implements FieldSet.FieldDescriptorLite< - ExtensionDescriptor> { - private ExtensionDescriptor( - final Internal.EnumLiteMap enumTypeMap, - final int number, - final WireFormat.FieldType type, - final boolean isRepeated, - final boolean isPacked) { - this.enumTypeMap = enumTypeMap; - this.number = number; - this.type = type; - this.isRepeated = isRepeated; - this.isPacked = isPacked; - } - - private final Internal.EnumLiteMap enumTypeMap; - private final int number; - private final WireFormat.FieldType type; - private final boolean isRepeated; - private final boolean isPacked; - - public int getNumber() { - return number; - } - - public WireFormat.FieldType getLiteType() { - return type; - } - - public WireFormat.JavaType getLiteJavaType() { - return type.getJavaType(); - } - - public boolean isRepeated() { - return isRepeated; - } - - public boolean isPacked() { - return isPacked; - } - - public Internal.EnumLiteMap getEnumType() { - return enumTypeMap; - } - - @SuppressWarnings("unchecked") - public MessageLite.Builder internalMergeFrom( - MessageLite.Builder to, MessageLite from) { - return ((Builder) to).mergeFrom((GeneratedMessageLite) from); - } - - public int compareTo(ExtensionDescriptor other) { - return number - other.number; - } - } - - /** - * Lite equivalent to {@link GeneratedMessage.GeneratedExtension}. - * - * Users should ignore the contents of this class and only use objects of - * this type as parameters to extension accessors and ExtensionRegistry.add(). - */ - public static final class GeneratedExtension< - ContainingType extends MessageLite, Type> { - - private GeneratedExtension( - final ContainingType containingTypeDefaultInstance, - final Type defaultValue, - final MessageLite messageDefaultInstance, - final ExtensionDescriptor descriptor) { - // Defensive checks to verify the correct initialization order of - // GeneratedExtensions and their related GeneratedMessages. - if (containingTypeDefaultInstance == null) { - throw new IllegalArgumentException( - "Null containingTypeDefaultInstance"); - } - if (descriptor.getLiteType() == WireFormat.FieldType.MESSAGE && - messageDefaultInstance == null) { - throw new IllegalArgumentException( - "Null messageDefaultInstance"); - } - this.containingTypeDefaultInstance = containingTypeDefaultInstance; - this.defaultValue = defaultValue; - this.messageDefaultInstance = messageDefaultInstance; - this.descriptor = descriptor; - } - - private final ContainingType containingTypeDefaultInstance; - private final Type defaultValue; - private final MessageLite messageDefaultInstance; - private final ExtensionDescriptor descriptor; - - /** - * Default instance of the type being extended, used to identify that type. - */ - public ContainingType getContainingTypeDefaultInstance() { - return containingTypeDefaultInstance; - } - - /** Get the field number. */ - public int getNumber() { - return descriptor.getNumber(); - } - - /** - * If the extension is an embedded message, this is the default instance of - * that type. - */ - public MessageLite getMessageDefaultInstance() { - return messageDefaultInstance; - } - } - - /** - * A serialized (serializable) form of the generated message. Stores the - * message as a class name and a byte array. - */ - static final class SerializedForm implements Serializable { - private static final long serialVersionUID = 0L; - - private String messageClassName; - private byte[] asBytes; - - /** - * Creates the serialized form by calling {@link com.google.protobuf.MessageLite#toByteArray}. - * @param regularForm the message to serialize - */ - SerializedForm(MessageLite regularForm) { - messageClassName = regularForm.getClass().getName(); - asBytes = regularForm.toByteArray(); - } - - /** - * When read from an ObjectInputStream, this method converts this object - * back to the regular form. Part of Java's serialization magic. - * @return a GeneratedMessage of the type that was serialized - */ - @SuppressWarnings("unchecked") - protected Object readResolve() throws ObjectStreamException { - try { - Class messageClass = Class.forName(messageClassName); - Method newBuilder = messageClass.getMethod("newBuilder"); - MessageLite.Builder builder = - (MessageLite.Builder) newBuilder.invoke(null); - builder.mergeFrom(asBytes); - return builder.buildPartial(); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Unable to find proto buffer class", e); - } catch (NoSuchMethodException e) { - throw new RuntimeException("Unable to find newBuilder method", e); - } catch (IllegalAccessException e) { - throw new RuntimeException("Unable to call newBuilder method", e); - } catch (InvocationTargetException e) { - throw new RuntimeException("Error calling newBuilder", e.getCause()); - } catch (InvalidProtocolBufferException e) { - throw new RuntimeException("Unable to understand proto buffer", e); - } - } - } - - /** - * Replaces this object in the output stream with a serialized form. - * Part of Java's serialization magic. Generated sub-classes must override - * this method by calling return super.writeReplace(); - * @return a SerializedForm of this message - */ - protected Object writeReplace() throws ObjectStreamException { - return new SerializedForm(this); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Internal.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Internal.java deleted file mode 100644 index 05eab57a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Internal.java +++ /dev/null @@ -1,206 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.UnsupportedEncodingException; - -/** - * The classes contained within are used internally by the Protocol Buffer - * library and generated message implementations. They are public only because - * those generated messages do not reside in the {@code protobuf} package. - * Others should not use this class directly. - * - * @author kenton@google.com (Kenton Varda) - */ -public class Internal { - /** - * Helper called by generated code to construct default values for string - * fields. - *

- * The protocol compiler does not actually contain a UTF-8 decoder -- it - * just pushes UTF-8-encoded text around without touching it. The one place - * where this presents a problem is when generating Java string literals. - * Unicode characters in the string literal would normally need to be encoded - * using a Unicode escape sequence, which would require decoding them. - * To get around this, protoc instead embeds the UTF-8 bytes into the - * generated code and leaves it to the runtime library to decode them. - *

- * It gets worse, though. If protoc just generated a byte array, like: - * new byte[] {0x12, 0x34, 0x56, 0x78} - * Java actually generates *code* which allocates an array and then fills - * in each value. This is much less efficient than just embedding the bytes - * directly into the bytecode. To get around this, we need another - * work-around. String literals are embedded directly, so protoc actually - * generates a string literal corresponding to the bytes. The easiest way - * to do this is to use the ISO-8859-1 character set, which corresponds to - * the first 256 characters of the Unicode range. Protoc can then use - * good old CEscape to generate the string. - *

- * So we have a string literal which represents a set of bytes which - * represents another string. This function -- stringDefaultValue -- - * converts from the generated string to the string we actually want. The - * generated code calls this automatically. - */ - public static String stringDefaultValue(String bytes) { - try { - return new String(bytes.getBytes("ISO-8859-1"), "UTF-8"); - } catch (UnsupportedEncodingException e) { - // This should never happen since all JVMs are required to implement - // both of the above character sets. - throw new IllegalStateException( - "Java VM does not support a standard character set.", e); - } - } - - /** - * Helper called by generated code to construct default values for bytes - * fields. - *

- * This is a lot like {@link #stringDefaultValue}, but for bytes fields. - * In this case we only need the second of the two hacks -- allowing us to - * embed raw bytes as a string literal with ISO-8859-1 encoding. - */ - public static ByteString bytesDefaultValue(String bytes) { - try { - return ByteString.copyFrom(bytes.getBytes("ISO-8859-1")); - } catch (UnsupportedEncodingException e) { - // This should never happen since all JVMs are required to implement - // ISO-8859-1. - throw new IllegalStateException( - "Java VM does not support a standard character set.", e); - } - } - - /** - * Helper called by generated code to determine if a byte array is a valid - * UTF-8 encoded string such that the original bytes can be converted to - * a String object and then back to a byte array round tripping the bytes - * without loss. - *

- * This is inspired by UTF_8.java in sun.nio.cs. - * - * @param byteString the string to check - * @return whether the byte array is round trippable - */ - public static boolean isValidUtf8(ByteString byteString) { - int index = 0; - int size = byteString.size(); - // To avoid the masking, we could change this to use bytes; - // Then X > 0xC2 gets turned into X < -0xC2; X < 0x80 - // gets turned into X >= 0, etc. - - while (index < size) { - int byte1 = byteString.byteAt(index++) & 0xFF; - if (byte1 < 0x80) { - // fast loop for single bytes - continue; - - // we know from this point on that we have 2-4 byte forms - } else if (byte1 < 0xC2 || byte1 > 0xF4) { - // catch illegal first bytes: < C2 or > F4 - return false; - } - if (index >= size) { - // fail if we run out of bytes - return false; - } - int byte2 = byteString.byteAt(index++) & 0xFF; - if (byte2 < 0x80 || byte2 > 0xBF) { - // general trail-byte test - return false; - } - if (byte1 <= 0xDF) { - // two-byte form; general trail-byte test is sufficient - continue; - } - - // we know from this point on that we have 3 or 4 byte forms - if (index >= size) { - // fail if we run out of bytes - return false; - } - int byte3 = byteString.byteAt(index++) & 0xFF; - if (byte3 < 0x80 || byte3 > 0xBF) { - // general trail-byte test - return false; - } - if (byte1 <= 0xEF) { - // three-byte form. Vastly more frequent than four-byte forms - // The following has an extra test, but not worth restructuring - if (byte1 == 0xE0 && byte2 < 0xA0 || - byte1 == 0xED && byte2 > 0x9F) { - // check special cases of byte2 - return false; - } - - } else { - // four-byte form - - if (index >= size) { - // fail if we run out of bytes - return false; - } - int byte4 = byteString.byteAt(index++) & 0xFF; - if (byte4 < 0x80 || byte4 > 0xBF) { - // general trail-byte test - return false; - } - // The following has an extra test, but not worth restructuring - if (byte1 == 0xF0 && byte2 < 0x90 || - byte1 == 0xF4 && byte2 > 0x8F) { - // check special cases of byte2 - return false; - } - } - } - return true; - } - - /** - * Interface for an enum value or value descriptor, to be used in FieldSet. - * The lite library stores enum values directly in FieldSets but the full - * library stores EnumValueDescriptors in order to better support reflection. - */ - public interface EnumLite { - int getNumber(); - } - - /** - * Interface for an object which maps integers to {@link EnumLite}s. - * {@link Descriptors.EnumDescriptor} implements this interface by mapping - * numbers to {@link Descriptors.EnumValueDescriptor}s. Additionally, - * every generated enum type has a static method internalGetValueMap() which - * returns an implementation of this type that maps numbers to enum values. - */ - public interface EnumLiteMap { - T findValueByNumber(int number); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java deleted file mode 100644 index 90f7ffbc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java +++ /dev/null @@ -1,93 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.io.IOException; - -/** - * Thrown when a protocol message being parsed is invalid in some way, - * e.g. it contains a malformed varint or a negative byte length. - * - * @author kenton@google.com Kenton Varda - */ -public class InvalidProtocolBufferException extends IOException { - private static final long serialVersionUID = -1616151763072450476L; - - public InvalidProtocolBufferException(final String description) { - super(description); - } - - static InvalidProtocolBufferException truncatedMessage() { - return new InvalidProtocolBufferException( - "While parsing a protocol message, the input ended unexpectedly " + - "in the middle of a field. This could mean either than the " + - "input has been truncated or that an embedded message " + - "misreported its own length."); - } - - static InvalidProtocolBufferException negativeSize() { - return new InvalidProtocolBufferException( - "CodedInputStream encountered an embedded string or message " + - "which claimed to have negative size."); - } - - static InvalidProtocolBufferException malformedVarint() { - return new InvalidProtocolBufferException( - "CodedInputStream encountered a malformed varint."); - } - - static InvalidProtocolBufferException invalidTag() { - return new InvalidProtocolBufferException( - "Protocol message contained an invalid tag (zero)."); - } - - static InvalidProtocolBufferException invalidEndTag() { - return new InvalidProtocolBufferException( - "Protocol message end-group tag did not match expected tag."); - } - - static InvalidProtocolBufferException invalidWireType() { - return new InvalidProtocolBufferException( - "Protocol message tag had invalid wire type."); - } - - static InvalidProtocolBufferException recursionLimitExceeded() { - return new InvalidProtocolBufferException( - "Protocol message had too many levels of nesting. May be malicious. " + - "Use CodedInputStream.setRecursionLimit() to increase the depth limit."); - } - - static InvalidProtocolBufferException sizeLimitExceeded() { - return new InvalidProtocolBufferException( - "Protocol message was too large. May be malicious. " + - "Use CodedInputStream.setSizeLimit() to increase the size limit."); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java deleted file mode 100644 index 1683a640..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java +++ /dev/null @@ -1,155 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.List; -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.RandomAccess; -import java.util.Collection; - -/** - * An implementation of {@link LazyStringList} that wraps an ArrayList. Each - * element is either a ByteString or a String. It caches the last one requested - * which is most likely the one needed next. This minimizes memory usage while - * satisfying the most common use cases. - *

- * Note that this implementation is not synchronized. - * If multiple threads access an ArrayList instance concurrently, - * and at least one of the threads modifies the list structurally, it - * must be synchronized externally. (A structural modification is - * any operation that adds or deletes one or more elements, or explicitly - * resizes the backing array; merely setting the value of an element is not - * a structural modification.) This is typically accomplished by - * synchronizing on some object that naturally encapsulates the list. - *

- * If the implementation is accessed via concurrent reads, this is thread safe. - * Conversions are done in a thread safe manner. It's possible that the - * conversion may happen more than once if two threads attempt to access the - * same element and the modifications were not visible to each other, but this - * will not result in any corruption of the list or change in behavior other - * than performance. - * - * @author jonp@google.com (Jon Perlow) - */ -public class LazyStringArrayList extends AbstractList - implements LazyStringList, RandomAccess { - - public final static LazyStringList EMPTY = new UnmodifiableLazyStringList( - new LazyStringArrayList()); - - private final List list; - - public LazyStringArrayList() { - list = new ArrayList(); - } - - public LazyStringArrayList(List from) { - list = new ArrayList(from); - } - - @Override - public String get(int index) { - Object o = list.get(index); - if (o instanceof String) { - return (String) o; - } else { - ByteString bs = (ByteString) o; - String s = bs.toStringUtf8(); - if (Internal.isValidUtf8(bs)) { - list.set(index, s); - } - return s; - } - } - - @Override - public int size() { - return list.size(); - } - - @Override - public String set(int index, String s) { - Object o = list.set(index, s); - return asString(o); - } - - @Override - public void add(int index, String element) { - list.add(index, element); - modCount++; - } - - @Override - public boolean addAll(int index, Collection c) { - boolean ret = list.addAll(index, c); - modCount++; - return ret; - } - - @Override - public String remove(int index) { - Object o = list.remove(index); - modCount++; - return asString(o); - } - - public void clear() { - list.clear(); - modCount++; - } - - // @Override - public void add(ByteString element) { - list.add(element); - modCount++; - } - - // @Override - public ByteString getByteString(int index) { - Object o = list.get(index); - if (o instanceof String) { - ByteString b = ByteString.copyFromUtf8((String) o); - list.set(index, b); - return b; - } else { - return (ByteString) o; - } - } - - private String asString(Object o) { - if (o instanceof String) { - return (String) o; - } else { - return ((ByteString) o).toStringUtf8(); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java deleted file mode 100644 index 97139ca6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java +++ /dev/null @@ -1,72 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.List; - -/** - * An interface extending List<String> that also provides access to the - * items of the list as UTF8-encoded ByteString objects. This is used by the - * protocol buffer implementation to support lazily converting bytes parsed - * over the wire to String objects until needed and also increases the - * efficiency of serialization if the String was never requested as the - * ByteString is already cached. - *

- * This only adds additional methods that are required for the use in the - * protocol buffer code in order to be able successfuly round trip byte arrays - * through parsing and serialization without conversion to strings. It's not - * attempting to support the functionality of say List<ByteString>, hence - * why only these two very specific methods are added. - * - * @author jonp@google.com (Jon Perlow) - */ -public interface LazyStringList extends List { - - /** - * Returns the element at the specified position in this list as a ByteString. - * - * @param index index of the element to return - * @return the element at the specified position in this list - * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index >= size()) - */ - ByteString getByteString(int index); - - /** - * Appends the specified element to the end of this list (optional - * operation). - * - * @param element element to be appended to this list - * @throws UnsupportedOperationException if the add operation - * is not supported by this list - */ - void add(ByteString element); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Message.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Message.java deleted file mode 100644 index 67c4148e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Message.java +++ /dev/null @@ -1,215 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// TODO(kenton): Use generics? E.g. Builder, then -// mergeFrom*() could return BuilderType for better type-safety. - -package com.google.protobuf; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -/** - * Abstract interface implemented by Protocol Message objects. - *

- * See also {@link MessageLite}, which defines most of the methods that typical - * users care about. {@link Message} adds to it methods that are not available - * in the "lite" runtime. The biggest added features are introspection and - * reflection -- i.e., getting descriptors for the message type and accessing - * the field values dynamically. - * - * @author kenton@google.com Kenton Varda - */ -public interface Message extends MessageLite, MessageOrBuilder { - - // ----------------------------------------------------------------- - // Comparison and hashing - - /** - * Compares the specified object with this message for equality. Returns - * true if the given object is a message of the same type (as - * defined by {@code getDescriptorForType()}) and has identical values for - * all of its fields. Subclasses must implement this; inheriting - * {@code Object.equals()} is incorrect. - * - * @param other object to be compared for equality with this message - * @return true if the specified object is equal to this message - */ - @Override - boolean equals(Object other); - - /** - * Returns the hash code value for this message. The hash code of a message - * should mix the message's type (object identity of the decsriptor) with its - * contents (known and unknown field values). Subclasses must implement this; - * inheriting {@code Object.hashCode()} is incorrect. - * - * @return the hash code value for this message - * @see Map#hashCode() - */ - @Override - int hashCode(); - - // ----------------------------------------------------------------- - // Convenience methods. - - /** - * Converts the message to a string in protocol buffer text format. This is - * just a trivial wrapper around {@link TextFormat#printToString(Message)}. - */ - @Override - String toString(); - - // ================================================================= - // Builders - - // (From MessageLite, re-declared here only for return type covariance.) - Builder newBuilderForType(); - Builder toBuilder(); - - /** - * Abstract interface implemented by Protocol Message builders. - */ - interface Builder extends MessageLite.Builder, MessageOrBuilder { - // (From MessageLite.Builder, re-declared here only for return type - // covariance.) - Builder clear(); - - /** - * Merge {@code other} into the message being built. {@code other} must - * have the exact same type as {@code this} (i.e. - * {@code getDescriptorForType() == other.getDescriptorForType()}). - * - * Merging occurs as follows. For each field:
- * * For singular primitive fields, if the field is set in {@code other}, - * then {@code other}'s value overwrites the value in this message.
- * * For singular message fields, if the field is set in {@code other}, - * it is merged into the corresponding sub-message of this message - * using the same merging rules.
- * * For repeated fields, the elements in {@code other} are concatenated - * with the elements in this message. - * - * This is equivalent to the {@code Message::MergeFrom} method in C++. - */ - Builder mergeFrom(Message other); - - // (From MessageLite.Builder, re-declared here only for return type - // covariance.) - Message build(); - Message buildPartial(); - Builder clone(); - Builder mergeFrom(CodedInputStream input) throws IOException; - Builder mergeFrom(CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - - /** - * Get the message's type's descriptor. - * See {@link Message#getDescriptorForType()}. - */ - Descriptors.Descriptor getDescriptorForType(); - - /** - * Create a Builder for messages of the appropriate type for the given - * field. Messages built with this can then be passed to setField(), - * setRepeatedField(), or addRepeatedField(). - */ - Builder newBuilderForField(Descriptors.FieldDescriptor field); - - /** - * Sets a field to the given value. The value must be of the correct type - * for this field, i.e. the same type that - * {@link Message#getField(Descriptors.FieldDescriptor)} would return. - */ - Builder setField(Descriptors.FieldDescriptor field, Object value); - - /** - * Clears the field. This is exactly equivalent to calling the generated - * "clear" accessor method corresponding to the field. - */ - Builder clearField(Descriptors.FieldDescriptor field); - - /** - * Sets an element of a repeated field to the given value. The value must - * be of the correct type for this field, i.e. the same type that - * {@link Message#getRepeatedField(Descriptors.FieldDescriptor,int)} would - * return. - * @throws IllegalArgumentException The field is not a repeated field, or - * {@code field.getContainingType() != getDescriptorForType()}. - */ - Builder setRepeatedField(Descriptors.FieldDescriptor field, - int index, Object value); - - /** - * Like {@code setRepeatedField}, but appends the value as a new element. - * @throws IllegalArgumentException The field is not a repeated field, or - * {@code field.getContainingType() != getDescriptorForType()}. - */ - Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value); - - /** Set the {@link UnknownFieldSet} for this message. */ - Builder setUnknownFields(UnknownFieldSet unknownFields); - - /** - * Merge some unknown fields into the {@link UnknownFieldSet} for this - * message. - */ - Builder mergeUnknownFields(UnknownFieldSet unknownFields); - - // --------------------------------------------------------------- - // Convenience methods. - - // (From MessageLite.Builder, re-declared here only for return type - // covariance.) - Builder mergeFrom(ByteString data) throws InvalidProtocolBufferException; - Builder mergeFrom(ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - Builder mergeFrom(byte[] data) throws InvalidProtocolBufferException; - Builder mergeFrom(byte[] data, int off, int len) - throws InvalidProtocolBufferException; - Builder mergeFrom(byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - Builder mergeFrom(byte[] data, int off, int len, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - Builder mergeFrom(InputStream input) throws IOException; - Builder mergeFrom(InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - boolean mergeDelimitedFrom(InputStream input) - throws IOException; - boolean mergeDelimitedFrom(InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java deleted file mode 100644 index 31b8256e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java +++ /dev/null @@ -1,325 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// TODO(kenton): Use generics? E.g. Builder, then -// mergeFrom*() could return BuilderType for better type-safety. - -package com.google.protobuf; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -/** - * Abstract interface implemented by Protocol Message objects. - * - *

This interface is implemented by all protocol message objects. Non-lite - * messages additionally implement the Message interface, which is a subclass - * of MessageLite. Use MessageLite instead when you only need the subset of - * features which it supports -- namely, nothing that uses descriptors or - * reflection. You can instruct the protocol compiler to generate classes - * which implement only MessageLite, not the full Message interface, by adding - * the follow line to the .proto file: - *

- *   option optimize_for = LITE_RUNTIME;
- * 
- * - *

This is particularly useful on resource-constrained systems where the - * full protocol buffers runtime library is too big. - * - *

Note that on non-constrained systems (e.g. servers) when you need to link - * in lots of protocol definitions, a better way to reduce total code footprint - * is to use {@code optimize_for = CODE_SIZE}. This will make the generated - * code smaller while still supporting all the same features (at the expense of - * speed). {@code optimize_for = LITE_RUNTIME} is best when you only have a - * small number of message types linked into your binary, in which case the - * size of the protocol buffers runtime itself is the biggest problem. - * - * @author kenton@google.com Kenton Varda - */ -public interface MessageLite extends MessageLiteOrBuilder { - - - /** - * Serializes the message and writes it to {@code output}. This does not - * flush or close the stream. - */ - void writeTo(CodedOutputStream output) throws IOException; - - /** - * Get the number of bytes required to encode this message. The result - * is only computed on the first call and memoized after that. - */ - int getSerializedSize(); - - // ----------------------------------------------------------------- - // Convenience methods. - - /** - * Serializes the message to a {@code ByteString} and returns it. This is - * just a trivial wrapper around - * {@link #writeTo(CodedOutputStream)}. - */ - ByteString toByteString(); - - /** - * Serializes the message to a {@code byte} array and returns it. This is - * just a trivial wrapper around - * {@link #writeTo(CodedOutputStream)}. - */ - byte[] toByteArray(); - - /** - * Serializes the message and writes it to {@code output}. This is just a - * trivial wrapper around {@link #writeTo(CodedOutputStream)}. This does - * not flush or close the stream. - *

- * NOTE: Protocol Buffers are not self-delimiting. Therefore, if you write - * any more data to the stream after the message, you must somehow ensure - * that the parser on the receiving end does not interpret this as being - * part of the protocol message. This can be done e.g. by writing the size - * of the message before the data, then making sure to limit the input to - * that size on the receiving end (e.g. by wrapping the InputStream in one - * which limits the input). Alternatively, just use - * {@link #writeDelimitedTo(OutputStream)}. - */ - void writeTo(OutputStream output) throws IOException; - - /** - * Like {@link #writeTo(OutputStream)}, but writes the size of the message - * as a varint before writing the data. This allows more data to be written - * to the stream after the message without the need to delimit the message - * data yourself. Use {@link Builder#mergeDelimitedFrom(InputStream)} (or - * the static method {@code YourMessageType.parseDelimitedFrom(InputStream)}) - * to parse messages written by this method. - */ - void writeDelimitedTo(OutputStream output) throws IOException; - - // ================================================================= - // Builders - - /** - * Constructs a new builder for a message of the same type as this message. - */ - Builder newBuilderForType(); - - /** - * Constructs a builder initialized with the current message. Use this to - * derive a new message from the current one. - */ - Builder toBuilder(); - - /** - * Abstract interface implemented by Protocol Message builders. - */ - interface Builder extends MessageLiteOrBuilder, Cloneable { - /** Resets all fields to their default values. */ - Builder clear(); - - /** - * Construct the final message. Once this is called, the Builder is no - * longer valid, and calling any other method will result in undefined - * behavior and may throw a NullPointerException. If you need to continue - * working with the builder after calling {@code build()}, {@code clone()} - * it first. - * @throws UninitializedMessageException The message is missing one or more - * required fields (i.e. {@link #isInitialized()} returns false). - * Use {@link #buildPartial()} to bypass this check. - */ - MessageLite build(); - - /** - * Like {@link #build()}, but does not throw an exception if the message - * is missing required fields. Instead, a partial message is returned. - * Once this is called, the Builder is no longer valid, and calling any - * will result in undefined behavior and may throw a NullPointerException. - * - * If you need to continue working with the builder after calling - * {@code buildPartial()}, {@code clone()} it first. - */ - MessageLite buildPartial(); - - /** - * Clones the Builder. - * @see Object#clone() - */ - Builder clone(); - - /** - * Parses a message of this type from the input and merges it with this - * message, as if using {@link Builder#mergeFrom(MessageLite)}. - * - *

Warning: This does not verify that all required fields are present in - * the input message. If you call {@link #build()} without setting all - * required fields, it will throw an {@link UninitializedMessageException}, - * which is a {@code RuntimeException} and thus might not be caught. There - * are a few good ways to deal with this: - *

    - *
  • Call {@link #isInitialized()} to verify that all required fields - * are set before building. - *
  • Parse the message separately using one of the static - * {@code parseFrom} methods, then use {@link #mergeFrom(MessageLite)} - * to merge it with this one. {@code parseFrom} will throw an - * {@link InvalidProtocolBufferException} (an {@code IOException}) - * if some required fields are missing. - *
  • Use {@code buildPartial()} to build, which ignores missing - * required fields. - *
- * - *

Note: The caller should call - * {@link CodedInputStream#checkLastTagWas(int)} after calling this to - * verify that the last tag seen was the appropriate end-group tag, - * or zero for EOF. - */ - Builder mergeFrom(CodedInputStream input) throws IOException; - - /** - * Like {@link Builder#mergeFrom(CodedInputStream)}, but also - * parses extensions. The extensions that you want to be able to parse - * must be registered in {@code extensionRegistry}. Extensions not in - * the registry will be treated as unknown fields. - */ - Builder mergeFrom(CodedInputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - - // --------------------------------------------------------------- - // Convenience methods. - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - * - * @return this - */ - Builder mergeFrom(ByteString data) throws InvalidProtocolBufferException; - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream,ExtensionRegistry)}. - * - * @return this - */ - Builder mergeFrom(ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - * - * @return this - */ - Builder mergeFrom(byte[] data) throws InvalidProtocolBufferException; - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - * - * @return this - */ - Builder mergeFrom(byte[] data, int off, int len) - throws InvalidProtocolBufferException; - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream,ExtensionRegistry)}. - * - * @return this - */ - Builder mergeFrom(byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - - /** - * Parse {@code data} as a message of this type and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream,ExtensionRegistry)}. - * - * @return this - */ - Builder mergeFrom(byte[] data, int off, int len, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException; - - /** - * Parse a message of this type from {@code input} and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. Note that this method always - * reads the entire input (unless it throws an exception). If you - * want it to stop earlier, you will need to wrap your input in some - * wrapper stream that limits reading. Or, use - * {@link MessageLite#writeDelimitedTo(OutputStream)} to write your message - * and {@link #mergeDelimitedFrom(InputStream)} to read it. - *

- * Despite usually reading the entire input, this does not close the stream. - * - * @return this - */ - Builder mergeFrom(InputStream input) throws IOException; - - /** - * Parse a message of this type from {@code input} and merge it with the - * message being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream,ExtensionRegistry)}. - * - * @return this - */ - Builder mergeFrom(InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - - /** - * Like {@link #mergeFrom(InputStream)}, but does not read until EOF. - * Instead, the size of the message (encoded as a varint) is read first, - * then the message data. Use - * {@link MessageLite#writeDelimitedTo(OutputStream)} to write messages in - * this format. - * - * @returns True if successful, or false if the stream is at EOF when the - * method starts. Any other error (including reaching EOF during - * parsing) will cause an exception to be thrown. - */ - boolean mergeDelimitedFrom(InputStream input) - throws IOException; - - /** - * Like {@link #mergeDelimitedFrom(InputStream)} but supporting extensions. - */ - boolean mergeDelimitedFrom(InputStream input, - ExtensionRegistryLite extensionRegistry) - throws IOException; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java deleted file mode 100644 index 7cc72e9c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Base interface for methods common to {@link MessageLite} - * and {@link MessageLite.Builder} to provide type equivalency. - * - * @author jonp@google.com (Jon Perlow) - */ -public interface MessageLiteOrBuilder { - /** - * Get an instance of the type with no fields set. Because no fields are set, - * all getters for singular fields will return default values and repeated - * fields will appear empty. - * This may or may not be a singleton. This differs from the - * {@code getDefaultInstance()} method of generated message classes in that - * this method is an abstract method of the {@code MessageLite} interface - * whereas {@code getDefaultInstance()} is a static method of a specific - * class. They return the same thing. - */ - MessageLite getDefaultInstanceForType(); - - /** - * Returns true if all required fields in the message and all embedded - * messages are set, false otherwise. - */ - boolean isInitialized(); - -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java deleted file mode 100644 index 0132e7ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.Map; - -/** - * Base interface for methods common to {@link Message} and - * {@link Message.Builder} to provide type equivalency. - * - * @author jonp@google.com (Jon Perlow) - */ -public interface MessageOrBuilder extends MessageLiteOrBuilder { - - // (From MessageLite, re-declared here only for return type covariance.) - //@Override (Java 1.6 override semantics, but we must support 1.5) - Message getDefaultInstanceForType(); - - /** - * Get the message's type's descriptor. This differs from the - * {@code getDescriptor()} method of generated message classes in that - * this method is an abstract method of the {@code Message} interface - * whereas {@code getDescriptor()} is a static method of a specific class. - * They return the same thing. - */ - Descriptors.Descriptor getDescriptorForType(); - - /** - * Returns a collection of all the fields in this message which are set - * and their corresponding values. A singular ("required" or "optional") - * field is set iff hasField() returns true for that field. A "repeated" - * field is set iff getRepeatedFieldSize() is greater than zero. The - * values are exactly what would be returned by calling - * {@link #getField(Descriptors.FieldDescriptor)} for each field. The map - * is guaranteed to be a sorted map, so iterating over it will return fields - * in order by field number. - *
- * If this is for a builder, the returned map may or may not reflect future - * changes to the builder. Either way, the returned map is itself - * unmodifiable. - */ - Map getAllFields(); - - /** - * Returns true if the given field is set. This is exactly equivalent to - * calling the generated "has" accessor method corresponding to the field. - * @throws IllegalArgumentException The field is a repeated field, or - * {@code field.getContainingType() != getDescriptorForType()}. - */ - boolean hasField(Descriptors.FieldDescriptor field); - - /** - * Obtains the value of the given field, or the default value if it is - * not set. For primitive fields, the boxed primitive value is returned. - * For enum fields, the EnumValueDescriptor for the value is returend. For - * embedded message fields, the sub-message is returned. For repeated - * fields, a java.util.List is returned. - */ - Object getField(Descriptors.FieldDescriptor field); - - /** - * Gets the number of elements of a repeated field. This is exactly - * equivalent to calling the generated "Count" accessor method corresponding - * to the field. - * @throws IllegalArgumentException The field is not a repeated field, or - * {@code field.getContainingType() != getDescriptorForType()}. - */ - int getRepeatedFieldCount(Descriptors.FieldDescriptor field); - - /** - * Gets an element of a repeated field. For primitive fields, the boxed - * primitive value is returned. For enum fields, the EnumValueDescriptor - * for the value is returend. For embedded message fields, the sub-message - * is returned. - * @throws IllegalArgumentException The field is not a repeated field, or - * {@code field.getContainingType() != getDescriptorForType()}. - */ - Object getRepeatedField(Descriptors.FieldDescriptor field, int index); - - /** Get the {@link UnknownFieldSet} for this message. */ - UnknownFieldSet getUnknownFields(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java deleted file mode 100644 index 112400f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java +++ /dev/null @@ -1,58 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.EnumDescriptor; -import com.google.protobuf.Descriptors.EnumValueDescriptor; - -/** - * Interface of useful methods added to all enums generated by the protocol - * compiler. - */ -public interface ProtocolMessageEnum extends Internal.EnumLite { - - /** - * Return the value's numeric value as defined in the .proto file. - */ - int getNumber(); - - /** - * Return the value's descriptor, which contains information such as - * value name, number, and type. - */ - EnumValueDescriptor getValueDescriptor(); - - /** - * Return the enum type's descriptor, which contains information - * about each defined value, etc. - */ - EnumDescriptor getDescriptorForType(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java deleted file mode 100644 index 0772eaca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java +++ /dev/null @@ -1,696 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -/** - * RepeatedFieldBuilder implements a structure that a protocol - * message uses to hold a repeated field of other protocol messages. It supports - * the classical use case of adding immutable {@link Message}'s to the - * repeated field and is highly optimized around this (no extra memory - * allocations and sharing of immutable arrays). - *
- * It also supports the additional use case of adding a {@link Message.Builder} - * to the repeated field and deferring conversion of that Builder - * to an immutable Message. In this way, it's possible to maintain - * a tree of Builder's that acts as a fully read/write data - * structure. - *
- * Logically, one can think of a tree of builders as converting the entire tree - * to messages when build is called on the root or when any method is called - * that desires a Message instead of a Builder. In terms of the implementation, - * the SingleFieldBuilder and RepeatedFieldBuilder - * classes cache messages that were created so that messages only need to be - * created when some change occured in its builder or a builder for one of its - * descendants. - * - * @param the type of message for the field - * @param the type of builder for the field - * @param the common interface for the message and the builder - * - * @author jonp@google.com (Jon Perlow) - */ -public class RepeatedFieldBuilder - - implements GeneratedMessage.BuilderParent { - - // Parent to send changes to. - private GeneratedMessage.BuilderParent parent; - - // List of messages. Never null. It may be immutable, in which case - // isMessagesListImmutable will be true. See note below. - private List messages; - - // Whether messages is an mutable array that can be modified. - private boolean isMessagesListMutable; - - // List of builders. May be null, in which case, no nested builders were - // created. If not null, entries represent the builder for that index. - private List> builders; - - // Here are the invariants for messages and builders: - // 1. messages is never null and its count corresponds to the number of items - // in the repeated field. - // 2. If builders is non-null, messages and builders MUST always - // contain the same number of items. - // 3. Entries in either array can be null, but for any index, there MUST be - // either a Message in messages or a builder in builders. - // 4. If the builder at an index is non-null, the builder is - // authoritative. This is the case where a Builder was set on the index. - // Any message in the messages array MUST be ignored. - // t. If the builder at an index is null, the message in the messages - // list is authoritative. This is the case where a Message (not a Builder) - // was set directly for an index. - - // Indicates that we've built a message and so we are now obligated - // to dispatch dirty invalidations. See GeneratedMessage.BuilderListener. - private boolean isClean; - - // A view of this builder that exposes a List interface of messages. This is - // initialized on demand. This is fully backed by this object and all changes - // are reflected in it. Access to any item converts it to a message if it - // was a builder. - private MessageExternalList externalMessageList; - - // A view of this builder that exposes a List interface of builders. This is - // initialized on demand. This is fully backed by this object and all changes - // are reflected in it. Access to any item converts it to a builder if it - // was a message. - private BuilderExternalList externalBuilderList; - - // A view of this builder that exposes a List interface of the interface - // implemented by messages and builders. This is initialized on demand. This - // is fully backed by this object and all changes are reflected in it. - // Access to any item returns either a builder or message depending on - // what is most efficient. - private MessageOrBuilderExternalList - externalMessageOrBuilderList; - - /** - * Constructs a new builder with an empty list of messages. - * - * @param messages the current list of messages - * @param isMessagesListMutable Whether the messages list is mutable - * @param parent a listener to notify of changes - * @param isClean whether the builder is initially marked clean - */ - public RepeatedFieldBuilder( - List messages, - boolean isMessagesListMutable, - GeneratedMessage.BuilderParent parent, - boolean isClean) { - this.messages = messages; - this.isMessagesListMutable = isMessagesListMutable; - this.parent = parent; - this.isClean = isClean; - } - - public void dispose() { - // Null out parent so we stop sending it invalidations. - parent = null; - } - - /** - * Ensures that the list of messages is mutable so it can be updated. If it's - * immutable, a copy is made. - */ - private void ensureMutableMessageList() { - if (!isMessagesListMutable) { - messages = new ArrayList(messages); - isMessagesListMutable = true; - } - } - - /** - * Ensures that the list of builders is not null. If it's null, the list is - * created and initialized to be the same size as the messages list with - * null entries. - */ - private void ensureBuilders() { - if (this.builders == null) { - this.builders = - new ArrayList>( - messages.size()); - for (int i = 0; i < messages.size(); i++) { - builders.add(null); - } - } - } - - /** - * Gets the count of items in the list. - * - * @return the count of items in the list. - */ - public int getCount() { - return messages.size(); - } - - /** - * Gets whether the list is empty. - * - * @return whether the list is empty - */ - public boolean isEmpty() { - return messages.isEmpty(); - } - - /** - * Get the message at the specified index. If the message is currently stored - * as a Builder, it is converted to a Message by - * calling {@link Message.Builder#buildPartial} on it. - * - * @param index the index of the message to get - * @return the message for the specified index - */ - public MType getMessage(int index) { - return getMessage(index, false); - } - - /** - * Get the message at the specified index. If the message is currently stored - * as a Builder, it is converted to a Message by - * calling {@link Message.Builder#buildPartial} on it. - * - * @param index the index of the message to get - * @param forBuild this is being called for build so we want to make sure - * we SingleFieldBuilder.build to send dirty invalidations - * @return the message for the specified index - */ - private MType getMessage(int index, boolean forBuild) { - if (this.builders == null) { - // We don't have any builders -- return the current Message. - // This is the case where no builder was created, so we MUST have a - // Message. - return messages.get(index); - } - - SingleFieldBuilder builder = builders.get(index); - if (builder == null) { - // We don't have a builder -- return the current message. - // This is the case where no builder was created for the entry at index, - // so we MUST have a message. - return messages.get(index); - - } else { - return forBuild ? builder.build() : builder.getMessage(); - } - } - - /** - * Gets a builder for the specified index. If no builder has been created for - * that index, a builder is created on demand by calling - * {@link Message#toBuilder}. - * - * @param index the index of the message to get - * @return The builder for that index - */ - public BType getBuilder(int index) { - ensureBuilders(); - SingleFieldBuilder builder = builders.get(index); - if (builder == null) { - MType message = messages.get(index); - builder = new SingleFieldBuilder( - message, this, isClean); - builders.set(index, builder); - } - return builder.getBuilder(); - } - - /** - * Gets the base class interface for the specified index. This may either be - * a builder or a message. It will return whatever is more efficient. - * - * @param index the index of the message to get - * @return the message or builder for the index as the base class interface - */ - @SuppressWarnings("unchecked") - public IType getMessageOrBuilder(int index) { - if (this.builders == null) { - // We don't have any builders -- return the current Message. - // This is the case where no builder was created, so we MUST have a - // Message. - return (IType) messages.get(index); - } - - SingleFieldBuilder builder = builders.get(index); - if (builder == null) { - // We don't have a builder -- return the current message. - // This is the case where no builder was created for the entry at index, - // so we MUST have a message. - return (IType) messages.get(index); - - } else { - return builder.getMessageOrBuilder(); - } - } - - /** - * Sets a message at the specified index replacing the existing item at - * that index. - * - * @param index the index to set. - * @param message the message to set - * @return the builder - */ - public RepeatedFieldBuilder setMessage( - int index, MType message) { - if (message == null) { - throw new NullPointerException(); - } - ensureMutableMessageList(); - messages.set(index, message); - if (builders != null) { - SingleFieldBuilder entry = - builders.set(index, null); - if (entry != null) { - entry.dispose(); - } - } - onChanged(); - incrementModCounts(); - return this; - } - - /** - * Appends the specified element to the end of this list. - * - * @param message the message to add - * @return the builder - */ - public RepeatedFieldBuilder addMessage( - MType message) { - if (message == null) { - throw new NullPointerException(); - } - ensureMutableMessageList(); - messages.add(message); - if (builders != null) { - builders.add(null); - } - onChanged(); - incrementModCounts(); - return this; - } - - /** - * Inserts the specified message at the specified position in this list. - * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices). - * - * @param index the index at which to insert the message - * @param message the message to add - * @return the builder - */ - public RepeatedFieldBuilder addMessage( - int index, MType message) { - if (message == null) { - throw new NullPointerException(); - } - ensureMutableMessageList(); - messages.add(index, message); - if (builders != null) { - builders.add(index, null); - } - onChanged(); - incrementModCounts(); - return this; - } - - /** - * Appends all of the messages in the specified collection to the end of - * this list, in the order that they are returned by the specified - * collection's iterator. - * - * @param values the messages to add - * @return the builder - */ - public RepeatedFieldBuilder addAllMessages( - Iterable values) { - for (final MType value : values) { - if (value == null) { - throw new NullPointerException(); - } - } - if (values instanceof Collection) { - @SuppressWarnings("unchecked") final - Collection collection = (Collection) values; - if (collection.size() == 0) { - return this; - } - ensureMutableMessageList(); - for (MType value : values) { - addMessage(value); - } - } else { - ensureMutableMessageList(); - for (MType value : values) { - addMessage(value); - } - } - onChanged(); - incrementModCounts(); - return this; - } - - /** - * Appends a new builder to the end of this list and returns the builder. - * - * @param message the message to add which is the basis of the builder - * @return the new builder - */ - public BType addBuilder(MType message) { - ensureMutableMessageList(); - ensureBuilders(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - message, this, isClean); - messages.add(null); - builders.add(builder); - onChanged(); - incrementModCounts(); - return builder.getBuilder(); - } - - /** - * Inserts a new builder at the specified position in this list. - * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices). - * - * @param index the index at which to insert the builder - * @param message the message to add which is the basis of the builder - * @return the builder - */ - public BType addBuilder(int index, MType message) { - ensureMutableMessageList(); - ensureBuilders(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - message, this, isClean); - messages.add(index, null); - builders.add(index, builder); - onChanged(); - incrementModCounts(); - return builder.getBuilder(); - } - - /** - * Removes the element at the specified position in this list. Shifts any - * subsequent elements to the left (subtracts one from their indices). - * Returns the element that was removed from the list. - * - * @param index the index at which to remove the message - */ - public void remove(int index) { - ensureMutableMessageList(); - messages.remove(index); - if (builders != null) { - SingleFieldBuilder entry = - builders.remove(index); - if (entry != null) { - entry.dispose(); - } - } - onChanged(); - incrementModCounts(); - } - - /** - * Removes all of the elements from this list. - * The list will be empty after this call returns. - */ - public void clear() { - messages = Collections.emptyList(); - isMessagesListMutable = false; - if (builders != null) { - for (SingleFieldBuilder entry : - builders) { - if (entry != null) { - entry.dispose(); - } - } - builders = null; - } - onChanged(); - incrementModCounts(); - } - - /** - * Builds the list of messages from the builder and returns them. - * - * @return an immutable list of messages - */ - public List build() { - // Now that build has been called, we are required to dispatch - // invalidations. - isClean = true; - - if (!isMessagesListMutable && builders == null) { - // We still have an immutable list and we never created a builder. - return messages; - } - - boolean allMessagesInSync = true; - if (!isMessagesListMutable) { - // We still have an immutable list. Let's see if any of them are out - // of sync with their builders. - for (int i = 0; i < messages.size(); i++) { - Message message = messages.get(i); - SingleFieldBuilder builder = builders.get(i); - if (builder != null) { - if (builder.build() != message) { - allMessagesInSync = false; - break; - } - } - } - if (allMessagesInSync) { - // Immutable list is still in sync. - return messages; - } - } - - // Need to make sure messages is up to date - ensureMutableMessageList(); - for (int i = 0; i < messages.size(); i++) { - messages.set(i, getMessage(i, true)); - } - - // We're going to return our list as immutable so we mark that we can - // no longer update it. - messages = Collections.unmodifiableList(messages); - isMessagesListMutable = false; - return messages; - } - - /** - * Gets a view of the builder as a list of messages. The returned list is live - * and will reflect any changes to the underlying builder. - * - * @return the messages in the list - */ - public List getMessageList() { - if (externalMessageList == null) { - externalMessageList = - new MessageExternalList(this); - } - return externalMessageList; - } - - /** - * Gets a view of the builder as a list of builders. This returned list is - * live and will reflect any changes to the underlying builder. - * - * @return the builders in the list - */ - public List getBuilderList() { - if (externalBuilderList == null) { - externalBuilderList = - new BuilderExternalList(this); - } - return externalBuilderList; - } - - /** - * Gets a view of the builder as a list of MessageOrBuilders. This returned - * list is live and will reflect any changes to the underlying builder. - * - * @return the builders in the list - */ - public List getMessageOrBuilderList() { - if (externalMessageOrBuilderList == null) { - externalMessageOrBuilderList = - new MessageOrBuilderExternalList(this); - } - return externalMessageOrBuilderList; - } - - /** - * Called when a the builder or one of its nested children has changed - * and any parent should be notified of its invalidation. - */ - private void onChanged() { - if (isClean && parent != null) { - parent.markDirty(); - - // Don't keep dispatching invalidations until build is called again. - isClean = false; - } - } - - @Override - public void markDirty() { - onChanged(); - } - - /** - * Increments the mod counts so that an ConcurrentModificationException can - * be thrown if calling code tries to modify the builder while its iterating - * the list. - */ - private void incrementModCounts() { - if (externalMessageList != null) { - externalMessageList.incrementModCount(); - } - if (externalBuilderList != null) { - externalBuilderList.incrementModCount(); - } - if (externalMessageOrBuilderList != null) { - externalMessageOrBuilderList.incrementModCount(); - } - } - - /** - * Provides a live view of the builder as a list of messages. - * - * @param the type of message for the field - * @param the type of builder for the field - * @param the common interface for the message and the builder - */ - private static class MessageExternalList< - MType extends GeneratedMessage, - BType extends GeneratedMessage.Builder, - IType extends MessageOrBuilder> - extends AbstractList implements List { - - RepeatedFieldBuilder builder; - - MessageExternalList( - RepeatedFieldBuilder builder) { - this.builder = builder; - } - - public int size() { - return this.builder.getCount(); - } - - public MType get(int index) { - return builder.getMessage(index); - } - - void incrementModCount() { - modCount++; - } - } - - /** - * Provides a live view of the builder as a list of builders. - * - * @param the type of message for the field - * @param the type of builder for the field - * @param the common interface for the message and the builder - */ - private static class BuilderExternalList< - MType extends GeneratedMessage, - BType extends GeneratedMessage.Builder, - IType extends MessageOrBuilder> - extends AbstractList implements List { - - RepeatedFieldBuilder builder; - - BuilderExternalList( - RepeatedFieldBuilder builder) { - this.builder = builder; - } - - public int size() { - return this.builder.getCount(); - } - - public BType get(int index) { - return builder.getBuilder(index); - } - - void incrementModCount() { - modCount++; - } - } - - /** - * Provides a live view of the builder as a list of builders. - * - * @param the type of message for the field - * @param the type of builder for the field - * @param the common interface for the message and the builder - */ - private static class MessageOrBuilderExternalList< - MType extends GeneratedMessage, - BType extends GeneratedMessage.Builder, - IType extends MessageOrBuilder> - extends AbstractList implements List { - - RepeatedFieldBuilder builder; - - MessageOrBuilderExternalList( - RepeatedFieldBuilder builder) { - this.builder = builder; - } - - public int size() { - return this.builder.getCount(); - } - - public IType get(int index) { - return builder.getMessageOrBuilder(index); - } - - void incrementModCount() { - modCount++; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java deleted file mode 100644 index 1fd35ed3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java +++ /dev/null @@ -1,47 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Interface for an RPC callback, normally called when an RPC completes. - * {@code ParameterType} is normally the method's response message type. - * - *

Starting with version 2.3.0, RPC implementations should not try to build - * on this, but should instead provide code generator plugins which generate - * code specific to the particular RPC implementation. This way the generated - * code can be more appropriate for the implementation in use and can avoid - * unnecessary layers of indirection. - * - * @author kenton@google.com Kenton Varda - */ -public interface RpcCallback { - void run(ParameterType parameter); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java deleted file mode 100644 index c6ec54fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java +++ /dev/null @@ -1,71 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - *

Abstract interface for an RPC channel. An {@code RpcChannel} represents a - * communication line to a {@link Service} which can be used to call that - * {@link Service}'s methods. The {@link Service} may be running on another - * machine. Normally, you should not call an {@code RpcChannel} directly, but - * instead construct a stub {@link Service} wrapping it. Example: - * - *

- *   RpcChannel channel = rpcImpl.newChannel("remotehost.example.com:1234");
- *   RpcController controller = rpcImpl.newController();
- *   MyService service = MyService.newStub(channel);
- *   service.myMethod(controller, request, callback);
- * 
- * - *

Starting with version 2.3.0, RPC implementations should not try to build - * on this, but should instead provide code generator plugins which generate - * code specific to the particular RPC implementation. This way the generated - * code can be more appropriate for the implementation in use and can avoid - * unnecessary layers of indirection. - * - * @author kenton@google.com Kenton Varda - */ -public interface RpcChannel { - /** - * Call the given method of the remote service. This method is similar to - * {@code Service.callMethod()} with one important difference: the caller - * decides the types of the {@code Message} objects, not the callee. The - * request may be of any type as long as - * {@code request.getDescriptor() == method.getInputType()}. - * The response passed to the callback will be of the same type as - * {@code responsePrototype} (which must have - * {@code getDescriptor() == method.getOutputType()}). - */ - void callMethod(Descriptors.MethodDescriptor method, - RpcController controller, - Message request, - Message responsePrototype, - RpcCallback done); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcController.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcController.java deleted file mode 100644 index aaa5446d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcController.java +++ /dev/null @@ -1,118 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - *

An {@code RpcController} mediates a single method call. The primary - * purpose of the controller is to provide a way to manipulate settings - * specific to the RPC implementation and to find out about RPC-level errors. - * - *

Starting with version 2.3.0, RPC implementations should not try to build - * on this, but should instead provide code generator plugins which generate - * code specific to the particular RPC implementation. This way the generated - * code can be more appropriate for the implementation in use and can avoid - * unnecessary layers of indirection. - * - *

The methods provided by the {@code RpcController} interface are intended - * to be a "least common denominator" set of features which we expect all - * implementations to support. Specific implementations may provide more - * advanced features (e.g. deadline propagation). - * - * @author kenton@google.com Kenton Varda - */ -public interface RpcController { - // ----------------------------------------------------------------- - // These calls may be made from the client side only. Their results - // are undefined on the server side (may throw RuntimeExceptions). - - /** - * Resets the RpcController to its initial state so that it may be reused in - * a new call. This can be called from the client side only. It must not - * be called while an RPC is in progress. - */ - void reset(); - - /** - * After a call has finished, returns true if the call failed. The possible - * reasons for failure depend on the RPC implementation. {@code failed()} - * most only be called on the client side, and must not be called before a - * call has finished. - */ - boolean failed(); - - /** - * If {@code failed()} is {@code true}, returns a human-readable description - * of the error. - */ - String errorText(); - - /** - * Advises the RPC system that the caller desires that the RPC call be - * canceled. The RPC system may cancel it immediately, may wait awhile and - * then cancel it, or may not even cancel the call at all. If the call is - * canceled, the "done" callback will still be called and the RpcController - * will indicate that the call failed at that time. - */ - void startCancel(); - - // ----------------------------------------------------------------- - // These calls may be made from the server side only. Their results - // are undefined on the client side (may throw RuntimeExceptions). - - /** - * Causes {@code failed()} to return true on the client side. {@code reason} - * will be incorporated into the message returned by {@code errorText()}. - * If you find you need to return machine-readable information about - * failures, you should incorporate it into your response protocol buffer - * and should NOT call {@code setFailed()}. - */ - void setFailed(String reason); - - /** - * If {@code true}, indicates that the client canceled the RPC, so the server - * may as well give up on replying to it. This method must be called on the - * server side only. The server should still call the final "done" callback. - */ - boolean isCanceled(); - - /** - * Asks that the given callback be called when the RPC is canceled. The - * parameter passed to the callback will always be {@code null}. The - * callback will always be called exactly once. If the RPC completes without - * being canceled, the callback will be called after completion. If the RPC - * has already been canceled when NotifyOnCancel() is called, the callback - * will be called immediately. - * - *

{@code notifyOnCancel()} must be called no more than once per request. - * It must be called on the server side only. - */ - void notifyOnCancel(RpcCallback callback); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java deleted file mode 100644 index b1b959a8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java +++ /dev/null @@ -1,135 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Grab-bag of utility functions useful when dealing with RPCs. - * - * @author kenton@google.com Kenton Varda - */ -public final class RpcUtil { - private RpcUtil() {} - - /** - * Take an {@code RpcCallback} and convert it to an - * {@code RpcCallback} accepting a specific message type. This is always - * type-safe (parameter type contravariance). - */ - @SuppressWarnings("unchecked") - public static RpcCallback - specializeCallback(final RpcCallback originalCallback) { - return (RpcCallback)originalCallback; - // The above cast works, but only due to technical details of the Java - // implementation. A more theoretically correct -- but less efficient -- - // implementation would be as follows: - // return new RpcCallback() { - // public void run(Type parameter) { - // originalCallback.run(parameter); - // } - // }; - } - - /** - * Take an {@code RpcCallback} accepting a specific message type and convert - * it to an {@code RpcCallback}. The generalized callback will - * accept any message object which has the same descriptor, and will convert - * it to the correct class before calling the original callback. However, - * if the generalized callback is given a message with a different descriptor, - * an exception will be thrown. - */ - public static - RpcCallback generalizeCallback( - final RpcCallback originalCallback, - final Class originalClass, - final Type defaultInstance) { - return new RpcCallback() { - public void run(final Message parameter) { - Type typedParameter; - try { - typedParameter = originalClass.cast(parameter); - } catch (ClassCastException ignored) { - typedParameter = copyAsType(defaultInstance, parameter); - } - originalCallback.run(typedParameter); - } - }; - } - - /** - * Creates a new message of type "Type" which is a copy of "source". "source" - * must have the same descriptor but may be a different class (e.g. - * DynamicMessage). - */ - @SuppressWarnings("unchecked") - private static Type copyAsType( - final Type typeDefaultInstance, final Message source) { - return (Type)typeDefaultInstance.newBuilderForType() - .mergeFrom(source) - .build(); - } - - /** - * Creates a callback which can only be called once. This may be useful for - * security, when passing a callback to untrusted code: most callbacks do - * not expect to be called more than once, so doing so may expose bugs if it - * is not prevented. - */ - public static - RpcCallback newOneTimeCallback( - final RpcCallback originalCallback) { - return new RpcCallback() { - private boolean alreadyCalled = false; - - public void run(final ParameterType parameter) { - synchronized(this) { - if (alreadyCalled) { - throw new AlreadyCalledException(); - } - alreadyCalled = true; - } - - originalCallback.run(parameter); - } - }; - } - - /** - * Exception thrown when a one-time callback is called more than once. - */ - public static final class AlreadyCalledException extends RuntimeException { - private static final long serialVersionUID = 5469741279507848266L; - - public AlreadyCalledException() { - super("This RpcCallback was already called and cannot be called " + - "multiple times."); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Service.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Service.java deleted file mode 100644 index 541585f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/Service.java +++ /dev/null @@ -1,117 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Abstract base interface for protocol-buffer-based RPC services. Services - * themselves are abstract classes (implemented either by servers or as - * stubs), but they subclass this base interface. The methods of this - * interface can be used to call the methods of the service without knowing - * its exact type at compile time (analogous to the Message interface). - * - *

Starting with version 2.3.0, RPC implementations should not try to build - * on this, but should instead provide code generator plugins which generate - * code specific to the particular RPC implementation. This way the generated - * code can be more appropriate for the implementation in use and can avoid - * unnecessary layers of indirection. - * - * @author kenton@google.com Kenton Varda - */ -public interface Service { - /** - * Get the {@code ServiceDescriptor} describing this service and its methods. - */ - Descriptors.ServiceDescriptor getDescriptorForType(); - - /** - *

Call a method of the service specified by MethodDescriptor. This is - * normally implemented as a simple {@code switch()} that calls the standard - * definitions of the service's methods. - * - *

Preconditions: - *

    - *
  • {@code method.getService() == getDescriptorForType()} - *
  • {@code request} is of the exact same class as the object returned by - * {@code getRequestPrototype(method)}. - *
  • {@code controller} is of the correct type for the RPC implementation - * being used by this Service. For stubs, the "correct type" depends - * on the RpcChannel which the stub is using. Server-side Service - * implementations are expected to accept whatever type of - * {@code RpcController} the server-side RPC implementation uses. - *
- * - *

Postconditions: - *

    - *
  • {@code done} will be called when the method is complete. This may be - * before {@code callMethod()} returns or it may be at some point in - * the future. - *
  • The parameter to {@code done} is the response. It must be of the - * exact same type as would be returned by - * {@code getResponsePrototype(method)}. - *
  • If the RPC failed, the parameter to {@code done} will be - * {@code null}. Further details about the failure can be found by - * querying {@code controller}. - *
- */ - void callMethod(Descriptors.MethodDescriptor method, - RpcController controller, - Message request, - RpcCallback done); - - /** - *

{@code callMethod()} requires that the request passed in is of a - * particular subclass of {@code Message}. {@code getRequestPrototype()} - * gets the default instances of this type for a given method. You can then - * call {@code Message.newBuilderForType()} on this instance to - * construct a builder to build an object which you can then pass to - * {@code callMethod()}. - * - *

Example: - *

-   *   MethodDescriptor method =
-   *     service.getDescriptorForType().findMethodByName("Foo");
-   *   Message request =
-   *     stub.getRequestPrototype(method).newBuilderForType()
-   *         .mergeFrom(input).build();
-   *   service.callMethod(method, request, callback);
-   * 
- */ - Message getRequestPrototype(Descriptors.MethodDescriptor method); - - /** - * Like {@code getRequestPrototype()}, but gets a prototype of the response - * message. {@code getResponsePrototype()} is generally not needed because - * the {@code Service} implementation constructs the response message itself, - * but it may be useful in some cases to know ahead of time what type of - * object will be returned. - */ - Message getResponsePrototype(Descriptors.MethodDescriptor method); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java deleted file mode 100644 index cde669d6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * Thrown by blocking RPC methods when a failure occurs. - * - * @author cpovirk@google.com (Chris Povirk) - */ -public class ServiceException extends Exception { - private static final long serialVersionUID = -1219262335729891920L; - - public ServiceException(final String message) { - super(message); - } - - public ServiceException(final Throwable cause) { - super(cause); - } - - public ServiceException(final String message, final Throwable cause) { - super(message, cause); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java deleted file mode 100644 index a92042e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java +++ /dev/null @@ -1,241 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * SingleFieldBuilder implements a structure that a protocol - * message uses to hold a single field of another protocol message. It supports - * the classical use case of setting an immutable {@link Message} as the value - * of the field and is highly optimized around this. - *
- * It also supports the additional use case of setting a {@link Message.Builder} - * as the field and deferring conversion of that Builder - * to an immutable Message. In this way, it's possible to maintain - * a tree of Builder's that acts as a fully read/write data - * structure. - *
- * Logically, one can think of a tree of builders as converting the entire tree - * to messages when build is called on the root or when any method is called - * that desires a Message instead of a Builder. In terms of the implementation, - * the SingleFieldBuilder and RepeatedFieldBuilder - * classes cache messages that were created so that messages only need to be - * created when some change occured in its builder or a builder for one of its - * descendants. - * - * @param the type of message for the field - * @param the type of builder for the field - * @param the common interface for the message and the builder - * - * @author jonp@google.com (Jon Perlow) - */ -public class SingleFieldBuilder - - implements GeneratedMessage.BuilderParent { - - // Parent to send changes to. - private GeneratedMessage.BuilderParent parent; - - // Invariant: one of builder or message fields must be non-null. - - // If set, this is the case where we are backed by a builder. In this case, - // message field represents a cached message for the builder (or null if - // there is no cached message). - private BType builder; - - // If builder is non-null, this represents a cached message from the builder. - // If builder is null, this is the authoritative message for the field. - private MType message; - - // Indicates that we've built a message and so we are now obligated - // to dispatch dirty invalidations. See GeneratedMessage.BuilderListener. - private boolean isClean; - - public SingleFieldBuilder( - MType message, - GeneratedMessage.BuilderParent parent, - boolean isClean) { - if (message == null) { - throw new NullPointerException(); - } - this.message = message; - this.parent = parent; - this.isClean = isClean; - } - - public void dispose() { - // Null out parent so we stop sending it invalidations. - parent = null; - } - - /** - * Get the message for the field. If the message is currently stored - * as a Builder, it is converted to a Message by - * calling {@link Message.Builder#buildPartial} on it. If no message has - * been set, returns the default instance of the message. - * - * @return the message for the field - */ - @SuppressWarnings("unchecked") - public MType getMessage() { - if (message == null) { - // If message is null, the invariant is that we must be have a builder. - message = (MType) builder.buildPartial(); - } - return message; - } - - /** - * Builds the message and returns it. - * - * @return the message - */ - public MType build() { - // Now that build has been called, we are required to dispatch - // invalidations. - isClean = true; - return getMessage(); - } - - /** - * Gets a builder for the field. If no builder has been created yet, a - * builder is created on demand by calling {@link Message#toBuilder}. - * - * @return The builder for the field - */ - @SuppressWarnings("unchecked") - public BType getBuilder() { - if (builder == null) { - // builder.mergeFrom() on a fresh builder - // does not create any sub-objects with independent clean/dirty states, - // therefore setting the builder itself to clean without actually calling - // build() cannot break any invariants. - builder = (BType) message.newBuilderForType(this); - builder.mergeFrom(message); // no-op if message is the default message - builder.markClean(); - } - return builder; - } - - /** - * Gets the base class interface for the field. This may either be a builder - * or a message. It will return whatever is more efficient. - * - * @return the message or builder for the field as the base class interface - */ - @SuppressWarnings("unchecked") - public IType getMessageOrBuilder() { - if (builder != null) { - return (IType) builder; - } else { - return (IType) message; - } - } - - /** - * Sets a message for the field replacing any existing value. - * - * @param message the message to set - * @return the builder - */ - public SingleFieldBuilder setMessage( - MType message) { - if (message == null) { - throw new NullPointerException(); - } - this.message = message; - if (builder != null) { - builder.dispose(); - builder = null; - } - onChanged(); - return this; - } - - /** - * Merges the field from another field. - * - * @param value the value to merge from - * @return the builder - */ - public SingleFieldBuilder mergeFrom( - MType value) { - if (builder == null && message == message.getDefaultInstanceForType()) { - message = value; - } else { - getBuilder().mergeFrom(value); - } - onChanged(); - return this; - } - - /** - * Clears the value of the field. - * - * @return the builder - */ - @SuppressWarnings("unchecked") - public SingleFieldBuilder clear() { - message = (MType) (message != null ? - message.getDefaultInstanceForType() : - builder.getDefaultInstanceForType()); - if (builder != null) { - builder.dispose(); - builder = null; - } - onChanged(); - return this; - } - - /** - * Called when a the builder or one of its nested children has changed - * and any parent should be notified of its invalidation. - */ - private void onChanged() { - // If builder is null, this is the case where onChanged is being called - // from setMessage or clear. - if (builder != null) { - message = null; - } - if (isClean && parent != null) { - parent.markDirty(); - - // Don't keep dispatching invalidations until build is called again. - isClean = false; - } - } - - @Override - public void markDirty() { - onChanged(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java deleted file mode 100644 index ccc20163..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java +++ /dev/null @@ -1,618 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.AbstractMap; -import java.util.AbstractSet; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.TreeMap; -import java.util.List; -import java.util.Map; -import java.util.NoSuchElementException; -import java.util.Set; -import java.util.SortedMap; - -/** - * A custom map implementation from FieldDescriptor to Object optimized to - * minimize the number of memory allocations for instances with a small number - * of mappings. The implementation stores the first {@code k} mappings in an - * array for a configurable value of {@code k}, allowing direct access to the - * corresponding {@code Entry}s without the need to create an Iterator. The - * remaining entries are stored in an overflow map. Iteration over the entries - * in the map should be done as follows: - * - *
- * for (int i = 0; i < fieldMap.getNumArrayEntries(); i++) {
- *   process(fieldMap.getArrayEntryAt(i));
- * }
- * for (Map.Entry<K, V> entry : fieldMap.getOverflowEntries()) {
- *   process(entry);
- * }
- * 
- * - * The resulting iteration is in order of ascending field tag number. The - * object returned by {@link #entrySet()} adheres to the same contract but is - * less efficient as it necessarily involves creating an object for iteration. - *

- * The tradeoff for this memory efficiency is that the worst case running time - * of the {@code put()} operation is {@code O(k + lg n)}, which happens when - * entries are added in descending order. {@code k} should be chosen such that - * it covers enough common cases without adversely affecting larger maps. In - * practice, the worst case scenario does not happen for extensions because - * extension fields are serialized and deserialized in order of ascending tag - * number, but the worst case scenario can happen for DynamicMessages. - *

- * The running time for all other operations is similar to that of - * {@code TreeMap}. - *

- * Instances are not thread-safe until {@link #makeImmutable()} is called, - * after which any modifying operation will result in an - * {@link UnsupportedOperationException}. - * - * @author darick@google.com Darick Tong - */ -// This class is final for all intents and purposes because the constructor is -// private. However, the FieldDescriptor-specific logic is encapsulated in -// a subclass to aid testability of the core logic. -class SmallSortedMap, V> extends AbstractMap { - - /** - * Creates a new instance for mapping FieldDescriptors to their values. - * The {@link #makeImmutable()} implementation will convert the List values - * of any repeated fields to unmodifiable lists. - * - * @param arraySize The size of the entry array containing the - * lexicographically smallest mappings. - */ - static > - SmallSortedMap newFieldMap(int arraySize) { - return new SmallSortedMap(arraySize) { - @Override - @SuppressWarnings("unchecked") - public void makeImmutable() { - if (!isImmutable()) { - for (int i = 0; i < getNumArrayEntries(); i++) { - final Map.Entry entry = - getArrayEntryAt(i); - if (entry.getKey().isRepeated()) { - final List value = (List) entry.getValue(); - entry.setValue(Collections.unmodifiableList(value)); - } - } - for (Map.Entry entry : - getOverflowEntries()) { - if (entry.getKey().isRepeated()) { - final List value = (List) entry.getValue(); - entry.setValue(Collections.unmodifiableList(value)); - } - } - } - super.makeImmutable(); - } - }; - } - - /** - * Creates a new instance for testing. - * - * @param arraySize The size of the entry array containing the - * lexicographically smallest mappings. - */ - static , V> SmallSortedMap newInstanceForTest( - int arraySize) { - return new SmallSortedMap(arraySize); - } - - private final int maxArraySize; - // The "entry array" is actually a List because generic arrays are not - // allowed. ArrayList also nicely handles the entry shifting on inserts and - // removes. - private List entryList; - private Map overflowEntries; - private boolean isImmutable; - // The EntrySet is a stateless view of the Map. It's initialized the first - // time it is requested and reused henceforth. - private volatile EntrySet lazyEntrySet; - - /** - * @code arraySize Size of the array in which the lexicographically smallest - * mappings are stored. (i.e. the {@code k} referred to in the class - * documentation). - */ - private SmallSortedMap(int arraySize) { - this.maxArraySize = arraySize; - this.entryList = Collections.emptyList(); - this.overflowEntries = Collections.emptyMap(); - } - - /** Make this map immutable from this point forward. */ - public void makeImmutable() { - if (!isImmutable) { - // Note: There's no need to wrap the entryList in an unmodifiableList - // because none of the list's accessors are exposed. The iterator() of - // overflowEntries, on the other hand, is exposed so it must be made - // unmodifiable. - overflowEntries = overflowEntries.isEmpty() ? - Collections.emptyMap() : - Collections.unmodifiableMap(overflowEntries); - isImmutable = true; - } - } - - /** @return Whether {@link #makeImmutable()} has been called. */ - public boolean isImmutable() { - return isImmutable; - } - - /** @return The number of entries in the entry array. */ - public int getNumArrayEntries() { - return entryList.size(); - } - - /** @return The array entry at the given {@code index}. */ - public Map.Entry getArrayEntryAt(int index) { - return entryList.get(index); - } - - /** @return There number of overflow entries. */ - public int getNumOverflowEntries() { - return overflowEntries.size(); - } - - /** @return An iterable over the overflow entries. */ - public Iterable> getOverflowEntries() { - return overflowEntries.isEmpty() ? - EmptySet.>iterable() : - overflowEntries.entrySet(); - } - - @Override - public int size() { - return entryList.size() + overflowEntries.size(); - } - - /** - * The implementation throws a {@code ClassCastException} if o is not an - * object of type {@code K}. - * - * {@inheritDoc} - */ - @Override - public boolean containsKey(Object o) { - @SuppressWarnings("unchecked") - final K key = (K) o; - return binarySearchInArray(key) >= 0 || overflowEntries.containsKey(key); - } - - /** - * The implementation throws a {@code ClassCastException} if o is not an - * object of type {@code K}. - * - * {@inheritDoc} - */ - @Override - public V get(Object o) { - @SuppressWarnings("unchecked") - final K key = (K) o; - final int index = binarySearchInArray(key); - if (index >= 0) { - return entryList.get(index).getValue(); - } - return overflowEntries.get(key); - } - - @Override - public V put(K key, V value) { - checkMutable(); - final int index = binarySearchInArray(key); - if (index >= 0) { - // Replace existing array entry. - return entryList.get(index).setValue(value); - } - ensureEntryArrayMutable(); - final int insertionPoint = -(index + 1); - if (insertionPoint >= maxArraySize) { - // Put directly in overflow. - return getOverflowEntriesMutable().put(key, value); - } - // Insert new Entry in array. - if (entryList.size() == maxArraySize) { - // Shift the last array entry into overflow. - final Entry lastEntryInArray = entryList.remove(maxArraySize - 1); - getOverflowEntriesMutable().put(lastEntryInArray.getKey(), - lastEntryInArray.getValue()); - } - entryList.add(insertionPoint, new Entry(key, value)); - return null; - } - - @Override - public void clear() { - checkMutable(); - if (!entryList.isEmpty()) { - entryList.clear(); - } - if (!overflowEntries.isEmpty()) { - overflowEntries.clear(); - } - } - - /** - * The implementation throws a {@code ClassCastException} if o is not an - * object of type {@code K}. - * - * {@inheritDoc} - */ - @Override - public V remove(Object o) { - checkMutable(); - @SuppressWarnings("unchecked") - final K key = (K) o; - final int index = binarySearchInArray(key); - if (index >= 0) { - return removeArrayEntryAt(index); - } - // overflowEntries might be Collections.unmodifiableMap(), so only - // call remove() if it is non-empty. - if (overflowEntries.isEmpty()) { - return null; - } else { - return overflowEntries.remove(key); - } - } - - private V removeArrayEntryAt(int index) { - checkMutable(); - final V removed = entryList.remove(index).getValue(); - if (!overflowEntries.isEmpty()) { - // Shift the first entry in the overflow to be the last entry in the - // array. - final Iterator> iterator = - getOverflowEntriesMutable().entrySet().iterator(); - entryList.add(new Entry(iterator.next())); - iterator.remove(); - } - return removed; - } - - /** - * @param key The key to find in the entry array. - * @return The returned integer position follows the same semantics as the - * value returned by {@link java.util.Arrays#binarySearch()}. - */ - private int binarySearchInArray(K key) { - int left = 0; - int right = entryList.size() - 1; - - // Optimization: For the common case in which entries are added in - // ascending tag order, check the largest element in the array before - // doing a full binary search. - if (right >= 0) { - int cmp = key.compareTo(entryList.get(right).getKey()); - if (cmp > 0) { - return -(right + 2); // Insert point is after "right". - } else if (cmp == 0) { - return right; - } - } - - while (left <= right) { - int mid = (left + right) / 2; - int cmp = key.compareTo(entryList.get(mid).getKey()); - if (cmp < 0) { - right = mid - 1; - } else if (cmp > 0) { - left = mid + 1; - } else { - return mid; - } - } - return -(left + 1); - } - - /** - * Similar to the AbstractMap implementation of {@code keySet()} and - * {@code values()}, the entry set is created the first time this method is - * called, and returned in response to all subsequent calls. - * - * {@inheritDoc} - */ - @Override - public Set> entrySet() { - if (lazyEntrySet == null) { - lazyEntrySet = new EntrySet(); - } - return lazyEntrySet; - } - - /** - * @throws UnsupportedOperationException if {@link #makeImmutable()} has - * has been called. - */ - private void checkMutable() { - if (isImmutable) { - throw new UnsupportedOperationException(); - } - } - - /** - * @return a {@link SortedMap} to which overflow entries mappings can be - * added or removed. - * @throws UnsupportedOperationException if {@link #makeImmutable()} has been - * called. - */ - @SuppressWarnings("unchecked") - private SortedMap getOverflowEntriesMutable() { - checkMutable(); - if (overflowEntries.isEmpty() && !(overflowEntries instanceof TreeMap)) { - overflowEntries = new TreeMap(); - } - return (SortedMap) overflowEntries; - } - - /** - * Lazily creates the entry list. Any code that adds to the list must first - * call this method. - */ - private void ensureEntryArrayMutable() { - checkMutable(); - if (entryList.isEmpty() && !(entryList instanceof ArrayList)) { - entryList = new ArrayList(maxArraySize); - } - } - - /** - * Entry implementation that implements Comparable in order to support - * binary search witin the entry array. Also checks mutability in - * {@link #setValue()}. - */ - private class Entry implements Map.Entry, Comparable { - - private final K key; - private V value; - - Entry(Map.Entry copy) { - this(copy.getKey(), copy.getValue()); - } - - Entry(K key, V value) { - this.key = key; - this.value = value; - } - - @Override - public K getKey() { - return key; - } - - @Override - public V getValue() { - return value; - } - - @Override - public int compareTo(Entry other) { - return getKey().compareTo(other.getKey()); - } - - @Override - public V setValue(V newValue) { - checkMutable(); - final V oldValue = this.value; - this.value = newValue; - return oldValue; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof Map.Entry)) { - return false; - } - @SuppressWarnings("unchecked") - Map.Entry other = (Map.Entry) o; - return equals(key, other.getKey()) && equals(value, other.getValue()); - } - - @Override - public int hashCode() { - return (key == null ? 0 : key.hashCode()) ^ - (value == null ? 0 : value.hashCode()); - } - - @Override - public String toString() { - return key + "=" + value; - } - - /** equals() that handles null values. */ - private boolean equals(Object o1, Object o2) { - return o1 == null ? o2 == null : o1.equals(o2); - } - } - - /** - * Stateless view of the entries in the field map. - */ - private class EntrySet extends AbstractSet> { - - @Override - public Iterator> iterator() { - return new EntryIterator(); - } - - @Override - public int size() { - return SmallSortedMap.this.size(); - } - - /** - * Throws a {@link ClassCastException} if o is not of the expected type. - * - * {@inheritDoc} - */ - @Override - public boolean contains(Object o) { - @SuppressWarnings("unchecked") - final Map.Entry entry = (Map.Entry) o; - final V existing = get(entry.getKey()); - final V value = entry.getValue(); - return existing == value || - (existing != null && existing.equals(value)); - } - - @Override - public boolean add(Map.Entry entry) { - if (!contains(entry)) { - put(entry.getKey(), entry.getValue()); - return true; - } - return false; - } - - /** - * Throws a {@link ClassCastException} if o is not of the expected type. - * - * {@inheritDoc} - */ - @Override - public boolean remove(Object o) { - @SuppressWarnings("unchecked") - final Map.Entry entry = (Map.Entry) o; - if (contains(entry)) { - SmallSortedMap.this.remove(entry.getKey()); - return true; - } - return false; - } - - @Override - public void clear() { - SmallSortedMap.this.clear(); - } - } - - /** - * Iterator implementation that switches from the entry array to the overflow - * entries appropriately. - */ - private class EntryIterator implements Iterator> { - - private int pos = -1; - private boolean nextCalledBeforeRemove; - private Iterator> lazyOverflowIterator; - - @Override - public boolean hasNext() { - return (pos + 1) < entryList.size() || - getOverflowIterator().hasNext(); - } - - @Override - public Map.Entry next() { - nextCalledBeforeRemove = true; - // Always increment pos so that we know whether the last returned value - // was from the array or from overflow. - if (++pos < entryList.size()) { - return entryList.get(pos); - } - return getOverflowIterator().next(); - } - - @Override - public void remove() { - if (!nextCalledBeforeRemove) { - throw new IllegalStateException("remove() was called before next()"); - } - nextCalledBeforeRemove = false; - checkMutable(); - - if (pos < entryList.size()) { - removeArrayEntryAt(pos--); - } else { - getOverflowIterator().remove(); - } - } - - /** - * It is important to create the overflow iterator only after the array - * entries have been iterated over because the overflow entry set changes - * when the client calls remove() on the array entries, which invalidates - * any existing iterators. - */ - private Iterator> getOverflowIterator() { - if (lazyOverflowIterator == null) { - lazyOverflowIterator = overflowEntries.entrySet().iterator(); - } - return lazyOverflowIterator; - } - } - - /** - * Helper class that holds immutable instances of an Iterable/Iterator that - * we return when the overflow entries is empty. This eliminates the creation - * of an Iterator object when there is nothing to iterate over. - */ - private static class EmptySet { - - private static final Iterator ITERATOR = new Iterator() { - @Override - public boolean hasNext() { - return false; - } - @Override - public Object next() { - throw new NoSuchElementException(); - } - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - - private static final Iterable ITERABLE = new Iterable() { - @Override - public Iterator iterator() { - return ITERATOR; - } - }; - - @SuppressWarnings("unchecked") - static Iterable iterable() { - return (Iterable) ITERABLE; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java deleted file mode 100644 index d5fbdabf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java +++ /dev/null @@ -1,1476 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Descriptors.EnumDescriptor; -import com.google.protobuf.Descriptors.EnumValueDescriptor; - -import java.io.IOException; -import java.nio.CharBuffer; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Provide text parsing and formatting support for proto2 instances. - * The implementation largely follows google/protobuf/text_format.cc. - * - * @author wenboz@google.com Wenbo Zhu - * @author kenton@google.com Kenton Varda - */ -public final class TextFormat { - private TextFormat() {} - - private static final Printer DEFAULT_PRINTER = new Printer(false); - private static final Printer SINGLE_LINE_PRINTER = new Printer(true); - - /** - * Outputs a textual representation of the Protocol Message supplied into - * the parameter output. (This representation is the new version of the - * classic "ProtocolPrinter" output from the original Protocol Buffer system) - */ - public static void print(final Message message, final Appendable output) - throws IOException { - DEFAULT_PRINTER.print(message, new TextGenerator(output)); - } - - /** Outputs a textual representation of {@code fields} to {@code output}. */ - public static void print(final UnknownFieldSet fields, - final Appendable output) - throws IOException { - DEFAULT_PRINTER.printUnknownFields(fields, new TextGenerator(output)); - } - - /** - * Generates a human readable form of this message, useful for debugging and - * other purposes, with no newline characters. - */ - public static String shortDebugString(final Message message) { - try { - final StringBuilder sb = new StringBuilder(); - SINGLE_LINE_PRINTER.print(message, new TextGenerator(sb)); - // Single line mode currently might have an extra space at the end. - return sb.toString().trim(); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - /** - * Generates a human readable form of the unknown fields, useful for debugging - * and other purposes, with no newline characters. - */ - public static String shortDebugString(final UnknownFieldSet fields) { - try { - final StringBuilder sb = new StringBuilder(); - SINGLE_LINE_PRINTER.printUnknownFields(fields, new TextGenerator(sb)); - // Single line mode currently might have an extra space at the end. - return sb.toString().trim(); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - /** - * Like {@code print()}, but writes directly to a {@code String} and - * returns it. - */ - public static String printToString(final Message message) { - try { - final StringBuilder text = new StringBuilder(); - print(message, text); - return text.toString(); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - /** - * Like {@code print()}, but writes directly to a {@code String} and - * returns it. - */ - public static String printToString(final UnknownFieldSet fields) { - try { - final StringBuilder text = new StringBuilder(); - print(fields, text); - return text.toString(); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - public static void printField(final FieldDescriptor field, - final Object value, - final Appendable output) - throws IOException { - DEFAULT_PRINTER.printField(field, value, new TextGenerator(output)); - } - - public static String printFieldToString(final FieldDescriptor field, - final Object value) { - try { - final StringBuilder text = new StringBuilder(); - printField(field, value, text); - return text.toString(); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - /** - * Outputs a textual representation of the value of given field value. - * - * @param field the descriptor of the field - * @param value the value of the field - * @param output the output to which to append the formatted value - * @throws ClassCastException if the value is not appropriate for the - * given field descriptor - * @throws IOException if there is an exception writing to the output - */ - public static void printFieldValue(final FieldDescriptor field, - final Object value, - final Appendable output) - throws IOException { - DEFAULT_PRINTER.printFieldValue(field, value, new TextGenerator(output)); - } - - /** - * Outputs a textual representation of the value of an unknown field. - * - * @param tag the field's tag number - * @param value the value of the field - * @param output the output to which to append the formatted value - * @throws ClassCastException if the value is not appropriate for the - * given field descriptor - * @throws IOException if there is an exception writing to the output - */ - public static void printUnknownFieldValue(final int tag, - final Object value, - final Appendable output) - throws IOException { - printUnknownFieldValue(tag, value, new TextGenerator(output)); - } - - private static void printUnknownFieldValue(final int tag, - final Object value, - final TextGenerator generator) - throws IOException { - switch (WireFormat.getTagWireType(tag)) { - case WireFormat.WIRETYPE_VARINT: - generator.print(unsignedToString((Long) value)); - break; - case WireFormat.WIRETYPE_FIXED32: - generator.print( - String.format((Locale) null, "0x%08x", (Integer) value)); - break; - case WireFormat.WIRETYPE_FIXED64: - generator.print(String.format((Locale) null, "0x%016x", (Long) value)); - break; - case WireFormat.WIRETYPE_LENGTH_DELIMITED: - generator.print("\""); - generator.print(escapeBytes((ByteString) value)); - generator.print("\""); - break; - case WireFormat.WIRETYPE_START_GROUP: - DEFAULT_PRINTER.printUnknownFields((UnknownFieldSet) value, generator); - break; - default: - throw new IllegalArgumentException("Bad tag: " + tag); - } - } - - /** Helper class for converting protobufs to text. */ - private static final class Printer { - /** Whether to omit newlines from the output. */ - final boolean singleLineMode; - - private Printer(final boolean singleLineMode) { - this.singleLineMode = singleLineMode; - } - - private void print(final Message message, final TextGenerator generator) - throws IOException { - for (Map.Entry field - : message.getAllFields().entrySet()) { - printField(field.getKey(), field.getValue(), generator); - } - printUnknownFields(message.getUnknownFields(), generator); - } - - private void printField(final FieldDescriptor field, final Object value, - final TextGenerator generator) throws IOException { - if (field.isRepeated()) { - // Repeated field. Print each element. - for (Object element : (List) value) { - printSingleField(field, element, generator); - } - } else { - printSingleField(field, value, generator); - } - } - - private void printSingleField(final FieldDescriptor field, - final Object value, - final TextGenerator generator) - throws IOException { - if (field.isExtension()) { - generator.print("["); - // We special-case MessageSet elements for compatibility with proto1. - if (field.getContainingType().getOptions().getMessageSetWireFormat() - && (field.getType() == FieldDescriptor.Type.MESSAGE) - && (field.isOptional()) - // object equality - && (field.getExtensionScope() == field.getMessageType())) { - generator.print(field.getMessageType().getFullName()); - } else { - generator.print(field.getFullName()); - } - generator.print("]"); - } else { - if (field.getType() == FieldDescriptor.Type.GROUP) { - // Groups must be serialized with their original capitalization. - generator.print(field.getMessageType().getName()); - } else { - generator.print(field.getName()); - } - } - - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (singleLineMode) { - generator.print(" { "); - } else { - generator.print(" {\n"); - generator.indent(); - } - } else { - generator.print(": "); - } - - printFieldValue(field, value, generator); - - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - if (singleLineMode) { - generator.print("} "); - } else { - generator.outdent(); - generator.print("}\n"); - } - } else { - if (singleLineMode) { - generator.print(" "); - } else { - generator.print("\n"); - } - } - } - - private void printFieldValue(final FieldDescriptor field, - final Object value, - final TextGenerator generator) - throws IOException { - switch (field.getType()) { - case INT32: - case SINT32: - case SFIXED32: - generator.print(((Integer) value).toString()); - break; - - case INT64: - case SINT64: - case SFIXED64: - generator.print(((Long) value).toString()); - break; - - case BOOL: - generator.print(((Boolean) value).toString()); - break; - - case FLOAT: - generator.print(((Float) value).toString()); - break; - - case DOUBLE: - generator.print(((Double) value).toString()); - break; - - case UINT32: - case FIXED32: - generator.print(unsignedToString((Integer) value)); - break; - - case UINT64: - case FIXED64: - generator.print(unsignedToString((Long) value)); - break; - - case STRING: - generator.print("\""); - generator.print(escapeText((String) value)); - generator.print("\""); - break; - - case BYTES: - generator.print("\""); - generator.print(escapeBytes((ByteString) value)); - generator.print("\""); - break; - - case ENUM: - generator.print(((EnumValueDescriptor) value).getName()); - break; - - case MESSAGE: - case GROUP: - print((Message) value, generator); - break; - } - } - - private void printUnknownFields(final UnknownFieldSet unknownFields, - final TextGenerator generator) - throws IOException { - for (Map.Entry entry : - unknownFields.asMap().entrySet()) { - final int number = entry.getKey(); - final UnknownFieldSet.Field field = entry.getValue(); - printUnknownField(number, WireFormat.WIRETYPE_VARINT, - field.getVarintList(), generator); - printUnknownField(number, WireFormat.WIRETYPE_FIXED32, - field.getFixed32List(), generator); - printUnknownField(number, WireFormat.WIRETYPE_FIXED64, - field.getFixed64List(), generator); - printUnknownField(number, WireFormat.WIRETYPE_LENGTH_DELIMITED, - field.getLengthDelimitedList(), generator); - for (final UnknownFieldSet value : field.getGroupList()) { - generator.print(entry.getKey().toString()); - if (singleLineMode) { - generator.print(" { "); - } else { - generator.print(" {\n"); - generator.indent(); - } - printUnknownFields(value, generator); - if (singleLineMode) { - generator.print("} "); - } else { - generator.outdent(); - generator.print("}\n"); - } - } - } - } - - private void printUnknownField(final int number, - final int wireType, - final List values, - final TextGenerator generator) - throws IOException { - for (final Object value : values) { - generator.print(String.valueOf(number)); - generator.print(": "); - printUnknownFieldValue(wireType, value, generator); - generator.print(singleLineMode ? " " : "\n"); - } - } - } - - /** Convert an unsigned 32-bit integer to a string. */ - private static String unsignedToString(final int value) { - if (value >= 0) { - return Integer.toString(value); - } else { - return Long.toString(((long) value) & 0x00000000FFFFFFFFL); - } - } - - /** Convert an unsigned 64-bit integer to a string. */ - private static String unsignedToString(final long value) { - if (value >= 0) { - return Long.toString(value); - } else { - // Pull off the most-significant bit so that BigInteger doesn't think - // the number is negative, then set it again using setBit(). - return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL) - .setBit(63).toString(); - } - } - - /** - * An inner class for writing text to the output stream. - */ - private static final class TextGenerator { - private final Appendable output; - private final StringBuilder indent = new StringBuilder(); - private boolean atStartOfLine = true; - - private TextGenerator(final Appendable output) { - this.output = output; - } - - /** - * Indent text by two spaces. After calling Indent(), two spaces will be - * inserted at the beginning of each line of text. Indent() may be called - * multiple times to produce deeper indents. - */ - public void indent() { - indent.append(" "); - } - - /** - * Reduces the current indent level by two spaces, or crashes if the indent - * level is zero. - */ - public void outdent() { - final int length = indent.length(); - if (length == 0) { - throw new IllegalArgumentException( - " Outdent() without matching Indent()."); - } - indent.delete(length - 2, length); - } - - /** - * Print text to the output stream. - */ - public void print(final CharSequence text) throws IOException { - final int size = text.length(); - int pos = 0; - - for (int i = 0; i < size; i++) { - if (text.charAt(i) == '\n') { - write(text.subSequence(pos, size), i - pos + 1); - pos = i + 1; - atStartOfLine = true; - } - } - write(text.subSequence(pos, size), size - pos); - } - - private void write(final CharSequence data, final int size) - throws IOException { - if (size == 0) { - return; - } - if (atStartOfLine) { - atStartOfLine = false; - output.append(indent); - } - output.append(data); - } - } - - // ================================================================= - // Parsing - - /** - * Represents a stream of tokens parsed from a {@code String}. - * - *

The Java standard library provides many classes that you might think - * would be useful for implementing this, but aren't. For example: - * - *

    - *
  • {@code java.io.StreamTokenizer}: This almost does what we want -- or, - * at least, something that would get us close to what we want -- except - * for one fatal flaw: It automatically un-escapes strings using Java - * escape sequences, which do not include all the escape sequences we - * need to support (e.g. '\x'). - *
  • {@code java.util.Scanner}: This seems like a great way at least to - * parse regular expressions out of a stream (so we wouldn't have to load - * the entire input into a single string before parsing). Sadly, - * {@code Scanner} requires that tokens be delimited with some delimiter. - * Thus, although the text "foo:" should parse to two tokens ("foo" and - * ":"), {@code Scanner} would recognize it only as a single token. - * Furthermore, {@code Scanner} provides no way to inspect the contents - * of delimiters, making it impossible to keep track of line and column - * numbers. - *
- * - *

Luckily, Java's regular expression support does manage to be useful to - * us. (Barely: We need {@code Matcher.usePattern()}, which is new in - * Java 1.5.) So, we can use that, at least. Unfortunately, this implies - * that we need to have the entire input in one contiguous string. - */ - private static final class Tokenizer { - private final CharSequence text; - private final Matcher matcher; - private String currentToken; - - // The character index within this.text at which the current token begins. - private int pos = 0; - - // The line and column numbers of the current token. - private int line = 0; - private int column = 0; - - // The line and column numbers of the previous token (allows throwing - // errors *after* consuming). - private int previousLine = 0; - private int previousColumn = 0; - - // We use possesive quantifiers (*+ and ++) because otherwise the Java - // regex matcher has stack overflows on large inputs. - private static final Pattern WHITESPACE = - Pattern.compile("(\\s|(#.*$))++", Pattern.MULTILINE); - private static final Pattern TOKEN = Pattern.compile( - "[a-zA-Z_][0-9a-zA-Z_+-]*+|" + // an identifier - "[.]?[0-9+-][0-9a-zA-Z_.+-]*+|" + // a number - "\"([^\"\n\\\\]|\\\\.)*+(\"|\\\\?$)|" + // a double-quoted string - "\'([^\'\n\\\\]|\\\\.)*+(\'|\\\\?$)", // a single-quoted string - Pattern.MULTILINE); - - private static final Pattern DOUBLE_INFINITY = Pattern.compile( - "-?inf(inity)?", - Pattern.CASE_INSENSITIVE); - private static final Pattern FLOAT_INFINITY = Pattern.compile( - "-?inf(inity)?f?", - Pattern.CASE_INSENSITIVE); - private static final Pattern FLOAT_NAN = Pattern.compile( - "nanf?", - Pattern.CASE_INSENSITIVE); - - /** Construct a tokenizer that parses tokens from the given text. */ - private Tokenizer(final CharSequence text) { - this.text = text; - this.matcher = WHITESPACE.matcher(text); - skipWhitespace(); - nextToken(); - } - - /** Are we at the end of the input? */ - public boolean atEnd() { - return currentToken.length() == 0; - } - - /** Advance to the next token. */ - public void nextToken() { - previousLine = line; - previousColumn = column; - - // Advance the line counter to the current position. - while (pos < matcher.regionStart()) { - if (text.charAt(pos) == '\n') { - ++line; - column = 0; - } else { - ++column; - } - ++pos; - } - - // Match the next token. - if (matcher.regionStart() == matcher.regionEnd()) { - // EOF - currentToken = ""; - } else { - matcher.usePattern(TOKEN); - if (matcher.lookingAt()) { - currentToken = matcher.group(); - matcher.region(matcher.end(), matcher.regionEnd()); - } else { - // Take one character. - currentToken = String.valueOf(text.charAt(pos)); - matcher.region(pos + 1, matcher.regionEnd()); - } - - skipWhitespace(); - } - } - - /** - * Skip over any whitespace so that the matcher region starts at the next - * token. - */ - private void skipWhitespace() { - matcher.usePattern(WHITESPACE); - if (matcher.lookingAt()) { - matcher.region(matcher.end(), matcher.regionEnd()); - } - } - - /** - * If the next token exactly matches {@code token}, consume it and return - * {@code true}. Otherwise, return {@code false} without doing anything. - */ - public boolean tryConsume(final String token) { - if (currentToken.equals(token)) { - nextToken(); - return true; - } else { - return false; - } - } - - /** - * If the next token exactly matches {@code token}, consume it. Otherwise, - * throw a {@link ParseException}. - */ - public void consume(final String token) throws ParseException { - if (!tryConsume(token)) { - throw parseException("Expected \"" + token + "\"."); - } - } - - /** - * Returns {@code true} if the next token is an integer, but does - * not consume it. - */ - public boolean lookingAtInteger() { - if (currentToken.length() == 0) { - return false; - } - - final char c = currentToken.charAt(0); - return ('0' <= c && c <= '9') || - c == '-' || c == '+'; - } - - /** - * If the next token is an identifier, consume it and return its value. - * Otherwise, throw a {@link ParseException}. - */ - public String consumeIdentifier() throws ParseException { - for (int i = 0; i < currentToken.length(); i++) { - final char c = currentToken.charAt(i); - if (('a' <= c && c <= 'z') || - ('A' <= c && c <= 'Z') || - ('0' <= c && c <= '9') || - (c == '_') || (c == '.')) { - // OK - } else { - throw parseException("Expected identifier."); - } - } - - final String result = currentToken; - nextToken(); - return result; - } - - /** - * If the next token is a 32-bit signed integer, consume it and return its - * value. Otherwise, throw a {@link ParseException}. - */ - public int consumeInt32() throws ParseException { - try { - final int result = parseInt32(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw integerParseException(e); - } - } - - /** - * If the next token is a 32-bit unsigned integer, consume it and return its - * value. Otherwise, throw a {@link ParseException}. - */ - public int consumeUInt32() throws ParseException { - try { - final int result = parseUInt32(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw integerParseException(e); - } - } - - /** - * If the next token is a 64-bit signed integer, consume it and return its - * value. Otherwise, throw a {@link ParseException}. - */ - public long consumeInt64() throws ParseException { - try { - final long result = parseInt64(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw integerParseException(e); - } - } - - /** - * If the next token is a 64-bit unsigned integer, consume it and return its - * value. Otherwise, throw a {@link ParseException}. - */ - public long consumeUInt64() throws ParseException { - try { - final long result = parseUInt64(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw integerParseException(e); - } - } - - /** - * If the next token is a double, consume it and return its value. - * Otherwise, throw a {@link ParseException}. - */ - public double consumeDouble() throws ParseException { - // We need to parse infinity and nan separately because - // Double.parseDouble() does not accept "inf", "infinity", or "nan". - if (DOUBLE_INFINITY.matcher(currentToken).matches()) { - final boolean negative = currentToken.startsWith("-"); - nextToken(); - return negative ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; - } - if (currentToken.equalsIgnoreCase("nan")) { - nextToken(); - return Double.NaN; - } - try { - final double result = Double.parseDouble(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw floatParseException(e); - } - } - - /** - * If the next token is a float, consume it and return its value. - * Otherwise, throw a {@link ParseException}. - */ - public float consumeFloat() throws ParseException { - // We need to parse infinity and nan separately because - // Float.parseFloat() does not accept "inf", "infinity", or "nan". - if (FLOAT_INFINITY.matcher(currentToken).matches()) { - final boolean negative = currentToken.startsWith("-"); - nextToken(); - return negative ? Float.NEGATIVE_INFINITY : Float.POSITIVE_INFINITY; - } - if (FLOAT_NAN.matcher(currentToken).matches()) { - nextToken(); - return Float.NaN; - } - try { - final float result = Float.parseFloat(currentToken); - nextToken(); - return result; - } catch (NumberFormatException e) { - throw floatParseException(e); - } - } - - /** - * If the next token is a boolean, consume it and return its value. - * Otherwise, throw a {@link ParseException}. - */ - public boolean consumeBoolean() throws ParseException { - if (currentToken.equals("true") || - currentToken.equals("t") || - currentToken.equals("1")) { - nextToken(); - return true; - } else if (currentToken.equals("false") || - currentToken.equals("f") || - currentToken.equals("0")) { - nextToken(); - return false; - } else { - throw parseException("Expected \"true\" or \"false\"."); - } - } - - /** - * If the next token is a string, consume it and return its (unescaped) - * value. Otherwise, throw a {@link ParseException}. - */ - public String consumeString() throws ParseException { - return consumeByteString().toStringUtf8(); - } - - /** - * If the next token is a string, consume it, unescape it as a - * {@link ByteString}, and return it. Otherwise, throw a - * {@link ParseException}. - */ - public ByteString consumeByteString() throws ParseException { - List list = new ArrayList(); - consumeByteString(list); - while (currentToken.startsWith("'") || currentToken.startsWith("\"")) { - consumeByteString(list); - } - return ByteString.copyFrom(list); - } - - /** - * Like {@link #consumeByteString()} but adds each token of the string to - * the given list. String literals (whether bytes or text) may come in - * multiple adjacent tokens which are automatically concatenated, like in - * C or Python. - */ - private void consumeByteString(List list) throws ParseException { - final char quote = currentToken.length() > 0 ? currentToken.charAt(0) - : '\0'; - if (quote != '\"' && quote != '\'') { - throw parseException("Expected string."); - } - - if (currentToken.length() < 2 || - currentToken.charAt(currentToken.length() - 1) != quote) { - throw parseException("String missing ending quote."); - } - - try { - final String escaped = - currentToken.substring(1, currentToken.length() - 1); - final ByteString result = unescapeBytes(escaped); - nextToken(); - list.add(result); - } catch (InvalidEscapeSequenceException e) { - throw parseException(e.getMessage()); - } - } - - /** - * Returns a {@link ParseException} with the current line and column - * numbers in the description, suitable for throwing. - */ - public ParseException parseException(final String description) { - // Note: People generally prefer one-based line and column numbers. - return new ParseException( - (line + 1) + ":" + (column + 1) + ": " + description); - } - - /** - * Returns a {@link ParseException} with the line and column numbers of - * the previous token in the description, suitable for throwing. - */ - public ParseException parseExceptionPreviousToken( - final String description) { - // Note: People generally prefer one-based line and column numbers. - return new ParseException( - (previousLine + 1) + ":" + (previousColumn + 1) + ": " + description); - } - - /** - * Constructs an appropriate {@link ParseException} for the given - * {@code NumberFormatException} when trying to parse an integer. - */ - private ParseException integerParseException( - final NumberFormatException e) { - return parseException("Couldn't parse integer: " + e.getMessage()); - } - - /** - * Constructs an appropriate {@link ParseException} for the given - * {@code NumberFormatException} when trying to parse a float or double. - */ - private ParseException floatParseException(final NumberFormatException e) { - return parseException("Couldn't parse number: " + e.getMessage()); - } - } - - /** Thrown when parsing an invalid text format message. */ - public static class ParseException extends IOException { - private static final long serialVersionUID = 3196188060225107702L; - - public ParseException(final String message) { - super(message); - } - } - - /** - * Parse a text-format message from {@code input} and merge the contents - * into {@code builder}. - */ - public static void merge(final Readable input, - final Message.Builder builder) - throws IOException { - merge(input, ExtensionRegistry.getEmptyRegistry(), builder); - } - - /** - * Parse a text-format message from {@code input} and merge the contents - * into {@code builder}. - */ - public static void merge(final CharSequence input, - final Message.Builder builder) - throws ParseException { - merge(input, ExtensionRegistry.getEmptyRegistry(), builder); - } - - /** - * Parse a text-format message from {@code input} and merge the contents - * into {@code builder}. Extensions will be recognized if they are - * registered in {@code extensionRegistry}. - */ - public static void merge(final Readable input, - final ExtensionRegistry extensionRegistry, - final Message.Builder builder) - throws IOException { - // Read the entire input to a String then parse that. - - // If StreamTokenizer were not quite so crippled, or if there were a kind - // of Reader that could read in chunks that match some particular regex, - // or if we wanted to write a custom Reader to tokenize our stream, then - // we would not have to read to one big String. Alas, none of these is - // the case. Oh well. - - merge(toStringBuilder(input), extensionRegistry, builder); - } - - private static final int BUFFER_SIZE = 4096; - - // TODO(chrisn): See if working around java.io.Reader#read(CharBuffer) - // overhead is worthwhile - private static StringBuilder toStringBuilder(final Readable input) - throws IOException { - final StringBuilder text = new StringBuilder(); - final CharBuffer buffer = CharBuffer.allocate(BUFFER_SIZE); - while (true) { - final int n = input.read(buffer); - if (n == -1) { - break; - } - buffer.flip(); - text.append(buffer, 0, n); - } - return text; - } - - /** - * Parse a text-format message from {@code input} and merge the contents - * into {@code builder}. Extensions will be recognized if they are - * registered in {@code extensionRegistry}. - */ - public static void merge(final CharSequence input, - final ExtensionRegistry extensionRegistry, - final Message.Builder builder) - throws ParseException { - final Tokenizer tokenizer = new Tokenizer(input); - - while (!tokenizer.atEnd()) { - mergeField(tokenizer, extensionRegistry, builder); - } - } - - /** - * Parse a single field from {@code tokenizer} and merge it into - * {@code builder}. - */ - private static void mergeField(final Tokenizer tokenizer, - final ExtensionRegistry extensionRegistry, - final Message.Builder builder) - throws ParseException { - FieldDescriptor field; - final Descriptor type = builder.getDescriptorForType(); - ExtensionRegistry.ExtensionInfo extension = null; - - if (tokenizer.tryConsume("[")) { - // An extension. - final StringBuilder name = - new StringBuilder(tokenizer.consumeIdentifier()); - while (tokenizer.tryConsume(".")) { - name.append('.'); - name.append(tokenizer.consumeIdentifier()); - } - - extension = extensionRegistry.findExtensionByName(name.toString()); - - if (extension == null) { - throw tokenizer.parseExceptionPreviousToken( - "Extension \"" + name + "\" not found in the ExtensionRegistry."); - } else if (extension.descriptor.getContainingType() != type) { - throw tokenizer.parseExceptionPreviousToken( - "Extension \"" + name + "\" does not extend message type \"" + - type.getFullName() + "\"."); - } - - tokenizer.consume("]"); - - field = extension.descriptor; - } else { - final String name = tokenizer.consumeIdentifier(); - field = type.findFieldByName(name); - - // Group names are expected to be capitalized as they appear in the - // .proto file, which actually matches their type names, not their field - // names. - if (field == null) { - // Explicitly specify US locale so that this code does not break when - // executing in Turkey. - final String lowerName = name.toLowerCase(Locale.US); - field = type.findFieldByName(lowerName); - // If the case-insensitive match worked but the field is NOT a group, - if (field != null && field.getType() != FieldDescriptor.Type.GROUP) { - field = null; - } - } - // Again, special-case group names as described above. - if (field != null && field.getType() == FieldDescriptor.Type.GROUP && - !field.getMessageType().getName().equals(name)) { - field = null; - } - - if (field == null) { - throw tokenizer.parseExceptionPreviousToken( - "Message type \"" + type.getFullName() + - "\" has no field named \"" + name + "\"."); - } - } - - Object value = null; - - if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { - tokenizer.tryConsume(":"); // optional - - final String endToken; - if (tokenizer.tryConsume("<")) { - endToken = ">"; - } else { - tokenizer.consume("{"); - endToken = "}"; - } - - final Message.Builder subBuilder; - if (extension == null) { - subBuilder = builder.newBuilderForField(field); - } else { - subBuilder = extension.defaultInstance.newBuilderForType(); - } - - while (!tokenizer.tryConsume(endToken)) { - if (tokenizer.atEnd()) { - throw tokenizer.parseException( - "Expected \"" + endToken + "\"."); - } - mergeField(tokenizer, extensionRegistry, subBuilder); - } - - value = subBuilder.build(); - - } else { - tokenizer.consume(":"); - - switch (field.getType()) { - case INT32: - case SINT32: - case SFIXED32: - value = tokenizer.consumeInt32(); - break; - - case INT64: - case SINT64: - case SFIXED64: - value = tokenizer.consumeInt64(); - break; - - case UINT32: - case FIXED32: - value = tokenizer.consumeUInt32(); - break; - - case UINT64: - case FIXED64: - value = tokenizer.consumeUInt64(); - break; - - case FLOAT: - value = tokenizer.consumeFloat(); - break; - - case DOUBLE: - value = tokenizer.consumeDouble(); - break; - - case BOOL: - value = tokenizer.consumeBoolean(); - break; - - case STRING: - value = tokenizer.consumeString(); - break; - - case BYTES: - value = tokenizer.consumeByteString(); - break; - - case ENUM: - final EnumDescriptor enumType = field.getEnumType(); - - if (tokenizer.lookingAtInteger()) { - final int number = tokenizer.consumeInt32(); - value = enumType.findValueByNumber(number); - if (value == null) { - throw tokenizer.parseExceptionPreviousToken( - "Enum type \"" + enumType.getFullName() + - "\" has no value with number " + number + '.'); - } - } else { - final String id = tokenizer.consumeIdentifier(); - value = enumType.findValueByName(id); - if (value == null) { - throw tokenizer.parseExceptionPreviousToken( - "Enum type \"" + enumType.getFullName() + - "\" has no value named \"" + id + "\"."); - } - } - - break; - - case MESSAGE: - case GROUP: - throw new RuntimeException("Can't get here."); - } - } - - if (field.isRepeated()) { - builder.addRepeatedField(field, value); - } else { - builder.setField(field, value); - } - } - - // ================================================================= - // Utility functions - // - // Some of these methods are package-private because Descriptors.java uses - // them. - - /** - * Escapes bytes in the format used in protocol buffer text format, which - * is the same as the format used for C string literals. All bytes - * that are not printable 7-bit ASCII characters are escaped, as well as - * backslash, single-quote, and double-quote characters. Characters for - * which no defined short-hand escape sequence is defined will be escaped - * using 3-digit octal sequences. - */ - static String escapeBytes(final ByteString input) { - final StringBuilder builder = new StringBuilder(input.size()); - for (int i = 0; i < input.size(); i++) { - final byte b = input.byteAt(i); - switch (b) { - // Java does not recognize \a or \v, apparently. - case 0x07: builder.append("\\a" ); break; - case '\b': builder.append("\\b" ); break; - case '\f': builder.append("\\f" ); break; - case '\n': builder.append("\\n" ); break; - case '\r': builder.append("\\r" ); break; - case '\t': builder.append("\\t" ); break; - case 0x0b: builder.append("\\v" ); break; - case '\\': builder.append("\\\\"); break; - case '\'': builder.append("\\\'"); break; - case '"' : builder.append("\\\""); break; - default: - // Note: Bytes with the high-order bit set should be escaped. Since - // bytes are signed, such bytes will compare less than 0x20, hence - // the following line is correct. - if (b >= 0x20) { - builder.append((char) b); - } else { - builder.append('\\'); - builder.append((char) ('0' + ((b >>> 6) & 3))); - builder.append((char) ('0' + ((b >>> 3) & 7))); - builder.append((char) ('0' + (b & 7))); - } - break; - } - } - return builder.toString(); - } - - /** - * Un-escape a byte sequence as escaped using - * {@link #escapeBytes(ByteString)}. Two-digit hex escapes (starting with - * "\x") are also recognized. - */ - static ByteString unescapeBytes(final CharSequence charString) - throws InvalidEscapeSequenceException { - // First convert the Java characater sequence to UTF-8 bytes. - ByteString input = ByteString.copyFromUtf8(charString.toString()); - // Then unescape certain byte sequences introduced by ASCII '\\'. The valid - // escapes can all be expressed with ASCII characters, so it is safe to - // operate on bytes here. - // - // Unescaping the input byte array will result in a byte sequence that's no - // longer than the input. That's because each escape sequence is between - // two and four bytes long and stands for a single byte. - final byte[] result = new byte[input.size()]; - int pos = 0; - for (int i = 0; i < input.size(); i++) { - byte c = input.byteAt(i); - if (c == '\\') { - if (i + 1 < input.size()) { - ++i; - c = input.byteAt(i); - if (isOctal(c)) { - // Octal escape. - int code = digitValue(c); - if (i + 1 < input.size() && isOctal(input.byteAt(i + 1))) { - ++i; - code = code * 8 + digitValue(input.byteAt(i)); - } - if (i + 1 < input.size() && isOctal(input.byteAt(i + 1))) { - ++i; - code = code * 8 + digitValue(input.byteAt(i)); - } - // TODO: Check that 0 <= code && code <= 0xFF. - result[pos++] = (byte)code; - } else { - switch (c) { - case 'a' : result[pos++] = 0x07; break; - case 'b' : result[pos++] = '\b'; break; - case 'f' : result[pos++] = '\f'; break; - case 'n' : result[pos++] = '\n'; break; - case 'r' : result[pos++] = '\r'; break; - case 't' : result[pos++] = '\t'; break; - case 'v' : result[pos++] = 0x0b; break; - case '\\': result[pos++] = '\\'; break; - case '\'': result[pos++] = '\''; break; - case '"' : result[pos++] = '\"'; break; - - case 'x': - // hex escape - int code = 0; - if (i + 1 < input.size() && isHex(input.byteAt(i + 1))) { - ++i; - code = digitValue(input.byteAt(i)); - } else { - throw new InvalidEscapeSequenceException( - "Invalid escape sequence: '\\x' with no digits"); - } - if (i + 1 < input.size() && isHex(input.byteAt(i + 1))) { - ++i; - code = code * 16 + digitValue(input.byteAt(i)); - } - result[pos++] = (byte)code; - break; - - default: - throw new InvalidEscapeSequenceException( - "Invalid escape sequence: '\\" + (char)c + '\''); - } - } - } else { - throw new InvalidEscapeSequenceException( - "Invalid escape sequence: '\\' at end of string."); - } - } else { - result[pos++] = c; - } - } - - return ByteString.copyFrom(result, 0, pos); - } - - /** - * Thrown by {@link TextFormat#unescapeBytes} and - * {@link TextFormat#unescapeText} when an invalid escape sequence is seen. - */ - static class InvalidEscapeSequenceException extends IOException { - private static final long serialVersionUID = -8164033650142593304L; - - InvalidEscapeSequenceException(final String description) { - super(description); - } - } - - /** - * Like {@link #escapeBytes(ByteString)}, but escapes a text string. - * Non-ASCII characters are first encoded as UTF-8, then each byte is escaped - * individually as a 3-digit octal escape. Yes, it's weird. - */ - static String escapeText(final String input) { - return escapeBytes(ByteString.copyFromUtf8(input)); - } - - /** - * Un-escape a text string as escaped using {@link #escapeText(String)}. - * Two-digit hex escapes (starting with "\x") are also recognized. - */ - static String unescapeText(final String input) - throws InvalidEscapeSequenceException { - return unescapeBytes(input).toStringUtf8(); - } - - /** Is this an octal digit? */ - private static boolean isOctal(final byte c) { - return '0' <= c && c <= '7'; - } - - /** Is this a hex digit? */ - private static boolean isHex(final byte c) { - return ('0' <= c && c <= '9') || - ('a' <= c && c <= 'f') || - ('A' <= c && c <= 'F'); - } - - /** - * Interpret a character as a digit (in any base up to 36) and return the - * numeric value. This is like {@code Character.digit()} but we don't accept - * non-ASCII digits. - */ - private static int digitValue(final byte c) { - if ('0' <= c && c <= '9') { - return c - '0'; - } else if ('a' <= c && c <= 'z') { - return c - 'a' + 10; - } else { - return c - 'A' + 10; - } - } - - /** - * Parse a 32-bit signed integer from the text. Unlike the Java standard - * {@code Integer.parseInt()}, this function recognizes the prefixes "0x" - * and "0" to signify hexidecimal and octal numbers, respectively. - */ - static int parseInt32(final String text) throws NumberFormatException { - return (int) parseInteger(text, true, false); - } - - /** - * Parse a 32-bit unsigned integer from the text. Unlike the Java standard - * {@code Integer.parseInt()}, this function recognizes the prefixes "0x" - * and "0" to signify hexidecimal and octal numbers, respectively. The - * result is coerced to a (signed) {@code int} when returned since Java has - * no unsigned integer type. - */ - static int parseUInt32(final String text) throws NumberFormatException { - return (int) parseInteger(text, false, false); - } - - /** - * Parse a 64-bit signed integer from the text. Unlike the Java standard - * {@code Integer.parseInt()}, this function recognizes the prefixes "0x" - * and "0" to signify hexidecimal and octal numbers, respectively. - */ - static long parseInt64(final String text) throws NumberFormatException { - return parseInteger(text, true, true); - } - - /** - * Parse a 64-bit unsigned integer from the text. Unlike the Java standard - * {@code Integer.parseInt()}, this function recognizes the prefixes "0x" - * and "0" to signify hexidecimal and octal numbers, respectively. The - * result is coerced to a (signed) {@code long} when returned since Java has - * no unsigned long type. - */ - static long parseUInt64(final String text) throws NumberFormatException { - return parseInteger(text, false, true); - } - - private static long parseInteger(final String text, - final boolean isSigned, - final boolean isLong) - throws NumberFormatException { - int pos = 0; - - boolean negative = false; - if (text.startsWith("-", pos)) { - if (!isSigned) { - throw new NumberFormatException("Number must be positive: " + text); - } - ++pos; - negative = true; - } - - int radix = 10; - if (text.startsWith("0x", pos)) { - pos += 2; - radix = 16; - } else if (text.startsWith("0", pos)) { - radix = 8; - } - - final String numberText = text.substring(pos); - - long result = 0; - if (numberText.length() < 16) { - // Can safely assume no overflow. - result = Long.parseLong(numberText, radix); - if (negative) { - result = -result; - } - - // Check bounds. - // No need to check for 64-bit numbers since they'd have to be 16 chars - // or longer to overflow. - if (!isLong) { - if (isSigned) { - if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { - throw new NumberFormatException( - "Number out of range for 32-bit signed integer: " + text); - } - } else { - if (result >= (1L << 32) || result < 0) { - throw new NumberFormatException( - "Number out of range for 32-bit unsigned integer: " + text); - } - } - } - } else { - BigInteger bigValue = new BigInteger(numberText, radix); - if (negative) { - bigValue = bigValue.negate(); - } - - // Check bounds. - if (!isLong) { - if (isSigned) { - if (bigValue.bitLength() > 31) { - throw new NumberFormatException( - "Number out of range for 32-bit signed integer: " + text); - } - } else { - if (bigValue.bitLength() > 32) { - throw new NumberFormatException( - "Number out of range for 32-bit unsigned integer: " + text); - } - } - } else { - if (isSigned) { - if (bigValue.bitLength() > 63) { - throw new NumberFormatException( - "Number out of range for 64-bit signed integer: " + text); - } - } else { - if (bigValue.bitLength() > 64) { - throw new NumberFormatException( - "Number out of range for 64-bit unsigned integer: " + text); - } - } - } - - result = bigValue.longValue(); - } - - return result; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java deleted file mode 100644 index 8743c120..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java +++ /dev/null @@ -1,99 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.Collections; -import java.util.List; - -/** - * Thrown when attempting to build a protocol message that is missing required - * fields. This is a {@code RuntimeException} because it normally represents - * a programming error: it happens when some code which constructs a message - * fails to set all the fields. {@code parseFrom()} methods do not - * throw this; they throw an {@link InvalidProtocolBufferException} if - * required fields are missing, because it is not a programming error to - * receive an incomplete message. In other words, - * {@code UninitializedMessageException} should never be thrown by correct - * code, but {@code InvalidProtocolBufferException} might be. - * - * @author kenton@google.com Kenton Varda - */ -public class UninitializedMessageException extends RuntimeException { - private static final long serialVersionUID = -7466929953374883507L; - - public UninitializedMessageException(final MessageLite message) { - super("Message was missing required fields. (Lite runtime could not " + - "determine which fields were missing)."); - missingFields = null; - } - - public UninitializedMessageException(final List missingFields) { - super(buildDescription(missingFields)); - this.missingFields = missingFields; - } - - private final List missingFields; - - /** - * Get a list of human-readable names of required fields missing from this - * message. Each name is a full path to a field, e.g. "foo.bar[5].baz". - * Returns null if the lite runtime was used, since it lacks the ability to - * find missing fields. - */ - public List getMissingFields() { - return Collections.unmodifiableList(missingFields); - } - - /** - * Converts this exception to an {@link InvalidProtocolBufferException}. - * When a parsed message is missing required fields, this should be thrown - * instead of {@code UninitializedMessageException}. - */ - public InvalidProtocolBufferException asInvalidProtocolBufferException() { - return new InvalidProtocolBufferException(getMessage()); - } - - /** Construct the description string for this exception. */ - private static String buildDescription(final List missingFields) { - final StringBuilder description = - new StringBuilder("Message missing required fields: "); - boolean first = true; - for (final String field : missingFields) { - if (first) { - first = false; - } else { - description.append(", "); - } - description.append(field); - } - return description.toString(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java deleted file mode 100644 index 26a15d00..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java +++ /dev/null @@ -1,953 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -/** - * {@code UnknownFieldSet} is used to keep track of fields which were seen when - * parsing a protocol message but whose field numbers or types are unrecognized. - * This most frequently occurs when new fields are added to a message type - * and then messages containing those feilds are read by old software that was - * compiled before the new types were added. - * - *

Every {@link Message} contains an {@code UnknownFieldSet} (and every - * {@link Message.Builder} contains an {@link Builder}). - * - *

Most users will never need to use this class. - * - * @author kenton@google.com Kenton Varda - */ -public final class UnknownFieldSet implements MessageLite { - private UnknownFieldSet() {} - - /** Create a new {@link Builder}. */ - public static Builder newBuilder() { - return Builder.create(); - } - - /** - * Create a new {@link Builder} and initialize it to be a copy - * of {@code copyFrom}. - */ - public static Builder newBuilder(final UnknownFieldSet copyFrom) { - return newBuilder().mergeFrom(copyFrom); - } - - /** Get an empty {@code UnknownFieldSet}. */ - public static UnknownFieldSet getDefaultInstance() { - return defaultInstance; - } - public UnknownFieldSet getDefaultInstanceForType() { - return defaultInstance; - } - private static final UnknownFieldSet defaultInstance = - new UnknownFieldSet(Collections.emptyMap()); - - /** - * Construct an {@code UnknownFieldSet} around the given map. The map is - * expected to be immutable. - */ - private UnknownFieldSet(final Map fields) { - this.fields = fields; - } - private Map fields; - - @Override - public boolean equals(final Object other) { - if (this == other) { - return true; - } - return (other instanceof UnknownFieldSet) && - fields.equals(((UnknownFieldSet) other).fields); - } - - @Override - public int hashCode() { - return fields.hashCode(); - } - - /** Get a map of fields in the set by number. */ - public Map asMap() { - return fields; - } - - /** Check if the given field number is present in the set. */ - public boolean hasField(final int number) { - return fields.containsKey(number); - } - - /** - * Get a field by number. Returns an empty field if not present. Never - * returns {@code null}. - */ - public Field getField(final int number) { - final Field result = fields.get(number); - return (result == null) ? Field.getDefaultInstance() : result; - } - - /** Serializes the set and writes it to {@code output}. */ - public void writeTo(final CodedOutputStream output) throws IOException { - for (final Map.Entry entry : fields.entrySet()) { - entry.getValue().writeTo(entry.getKey(), output); - } - } - - /** - * Converts the set to a string in protocol buffer text format. This is - * just a trivial wrapper around - * {@link TextFormat#printToString(UnknownFieldSet)}. - */ - @Override - public String toString() { - return TextFormat.printToString(this); - } - - /** - * Serializes the message to a {@code ByteString} and returns it. This is - * just a trivial wrapper around {@link #writeTo(CodedOutputStream)}. - */ - public ByteString toByteString() { - try { - final ByteString.CodedBuilder out = - ByteString.newCodedBuilder(getSerializedSize()); - writeTo(out.getCodedOutput()); - return out.build(); - } catch (final IOException e) { - throw new RuntimeException( - "Serializing to a ByteString threw an IOException (should " + - "never happen).", e); - } - } - - /** - * Serializes the message to a {@code byte} array and returns it. This is - * just a trivial wrapper around {@link #writeTo(CodedOutputStream)}. - */ - public byte[] toByteArray() { - try { - final byte[] result = new byte[getSerializedSize()]; - final CodedOutputStream output = CodedOutputStream.newInstance(result); - writeTo(output); - output.checkNoSpaceLeft(); - return result; - } catch (final IOException e) { - throw new RuntimeException( - "Serializing to a byte array threw an IOException " + - "(should never happen).", e); - } - } - - /** - * Serializes the message and writes it to {@code output}. This is just a - * trivial wrapper around {@link #writeTo(CodedOutputStream)}. - */ - public void writeTo(final OutputStream output) throws IOException { - final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output); - writeTo(codedOutput); - codedOutput.flush(); - } - - public void writeDelimitedTo(OutputStream output) throws IOException { - final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output); - codedOutput.writeRawVarint32(getSerializedSize()); - writeTo(codedOutput); - codedOutput.flush(); - } - - /** Get the number of bytes required to encode this set. */ - public int getSerializedSize() { - int result = 0; - for (final Map.Entry entry : fields.entrySet()) { - result += entry.getValue().getSerializedSize(entry.getKey()); - } - return result; - } - - /** - * Serializes the set and writes it to {@code output} using - * {@code MessageSet} wire format. - */ - public void writeAsMessageSetTo(final CodedOutputStream output) - throws IOException { - for (final Map.Entry entry : fields.entrySet()) { - entry.getValue().writeAsMessageSetExtensionTo( - entry.getKey(), output); - } - } - - /** - * Get the number of bytes required to encode this set using - * {@code MessageSet} wire format. - */ - public int getSerializedSizeAsMessageSet() { - int result = 0; - for (final Map.Entry entry : fields.entrySet()) { - result += entry.getValue().getSerializedSizeAsMessageSetExtension( - entry.getKey()); - } - return result; - } - - public boolean isInitialized() { - // UnknownFieldSets do not have required fields, so they are always - // initialized. - return true; - } - - /** Parse an {@code UnknownFieldSet} from the given input stream. */ - public static UnknownFieldSet parseFrom(final CodedInputStream input) - throws IOException { - return newBuilder().mergeFrom(input).build(); - } - - /** Parse {@code data} as an {@code UnknownFieldSet} and return it. */ - public static UnknownFieldSet parseFrom(final ByteString data) - throws InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).build(); - } - - /** Parse {@code data} as an {@code UnknownFieldSet} and return it. */ - public static UnknownFieldSet parseFrom(final byte[] data) - throws InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).build(); - } - - /** Parse an {@code UnknownFieldSet} from {@code input} and return it. */ - public static UnknownFieldSet parseFrom(final InputStream input) - throws IOException { - return newBuilder().mergeFrom(input).build(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public Builder toBuilder() { - return newBuilder().mergeFrom(this); - } - - /** - * Builder for {@link UnknownFieldSet}s. - * - *

Note that this class maintains {@link Field.Builder}s for all fields - * in the set. Thus, adding one element to an existing {@link Field} does not - * require making a copy. This is important for efficient parsing of - * unknown repeated fields. However, it implies that {@link Field}s cannot - * be constructed independently, nor can two {@link UnknownFieldSet}s share - * the same {@code Field} object. - * - *

Use {@link UnknownFieldSet#newBuilder()} to construct a {@code Builder}. - */ - public static final class Builder implements MessageLite.Builder { - // This constructor should never be called directly (except from 'create'). - private Builder() {} - - private Map fields; - - // Optimization: We keep around a builder for the last field that was - // modified so that we can efficiently add to it multiple times in a - // row (important when parsing an unknown repeated field). - private int lastFieldNumber; - private Field.Builder lastField; - - private static Builder create() { - Builder builder = new Builder(); - builder.reinitialize(); - return builder; - } - - /** - * Get a field builder for the given field number which includes any - * values that already exist. - */ - private Field.Builder getFieldBuilder(final int number) { - if (lastField != null) { - if (number == lastFieldNumber) { - return lastField; - } - // Note: addField() will reset lastField and lastFieldNumber. - addField(lastFieldNumber, lastField.build()); - } - if (number == 0) { - return null; - } else { - final Field existing = fields.get(number); - lastFieldNumber = number; - lastField = Field.newBuilder(); - if (existing != null) { - lastField.mergeFrom(existing); - } - return lastField; - } - } - - /** - * Build the {@link UnknownFieldSet} and return it. - * - *

Once {@code build()} has been called, the {@code Builder} will no - * longer be usable. Calling any method after {@code build()} will result - * in undefined behavior and can cause a {@code NullPointerException} to be - * thrown. - */ - public UnknownFieldSet build() { - getFieldBuilder(0); // Force lastField to be built. - final UnknownFieldSet result; - if (fields.isEmpty()) { - result = getDefaultInstance(); - } else { - result = new UnknownFieldSet(Collections.unmodifiableMap(fields)); - } - fields = null; - return result; - } - - public UnknownFieldSet buildPartial() { - // No required fields, so this is the same as build(). - return build(); - } - - @Override - public Builder clone() { - getFieldBuilder(0); // Force lastField to be built. - return UnknownFieldSet.newBuilder().mergeFrom( - new UnknownFieldSet(fields)); - } - - public UnknownFieldSet getDefaultInstanceForType() { - return UnknownFieldSet.getDefaultInstance(); - } - - private void reinitialize() { - fields = Collections.emptyMap(); - lastFieldNumber = 0; - lastField = null; - } - - /** Reset the builder to an empty set. */ - public Builder clear() { - reinitialize(); - return this; - } - - /** - * Merge the fields from {@code other} into this set. If a field number - * exists in both sets, {@code other}'s values for that field will be - * appended to the values in this set. - */ - public Builder mergeFrom(final UnknownFieldSet other) { - if (other != getDefaultInstance()) { - for (final Map.Entry entry : other.fields.entrySet()) { - mergeField(entry.getKey(), entry.getValue()); - } - } - return this; - } - - /** - * Add a field to the {@code UnknownFieldSet}. If a field with the same - * number already exists, the two are merged. - */ - public Builder mergeField(final int number, final Field field) { - if (number == 0) { - throw new IllegalArgumentException("Zero is not a valid field number."); - } - if (hasField(number)) { - getFieldBuilder(number).mergeFrom(field); - } else { - // Optimization: We could call getFieldBuilder(number).mergeFrom(field) - // in this case, but that would create a copy of the Field object. - // We'd rather reuse the one passed to us, so call addField() instead. - addField(number, field); - } - return this; - } - - /** - * Convenience method for merging a new field containing a single varint - * value. This is used in particular when an unknown enum value is - * encountered. - */ - public Builder mergeVarintField(final int number, final int value) { - if (number == 0) { - throw new IllegalArgumentException("Zero is not a valid field number."); - } - getFieldBuilder(number).addVarint(value); - return this; - } - - /** Check if the given field number is present in the set. */ - public boolean hasField(final int number) { - if (number == 0) { - throw new IllegalArgumentException("Zero is not a valid field number."); - } - return number == lastFieldNumber || fields.containsKey(number); - } - - /** - * Add a field to the {@code UnknownFieldSet}. If a field with the same - * number already exists, it is removed. - */ - public Builder addField(final int number, final Field field) { - if (number == 0) { - throw new IllegalArgumentException("Zero is not a valid field number."); - } - if (lastField != null && lastFieldNumber == number) { - // Discard this. - lastField = null; - lastFieldNumber = 0; - } - if (fields.isEmpty()) { - fields = new TreeMap(); - } - fields.put(number, field); - return this; - } - - /** - * Get all present {@code Field}s as an immutable {@code Map}. If more - * fields are added, the changes may or may not be reflected in this map. - */ - public Map asMap() { - getFieldBuilder(0); // Force lastField to be built. - return Collections.unmodifiableMap(fields); - } - - /** - * Parse an entire message from {@code input} and merge its fields into - * this set. - */ - public Builder mergeFrom(final CodedInputStream input) throws IOException { - while (true) { - final int tag = input.readTag(); - if (tag == 0 || !mergeFieldFrom(tag, input)) { - break; - } - } - return this; - } - - /** - * Parse a single field from {@code input} and merge it into this set. - * @param tag The field's tag number, which was already parsed. - * @return {@code false} if the tag is an engroup tag. - */ - public boolean mergeFieldFrom(final int tag, final CodedInputStream input) - throws IOException { - final int number = WireFormat.getTagFieldNumber(tag); - switch (WireFormat.getTagWireType(tag)) { - case WireFormat.WIRETYPE_VARINT: - getFieldBuilder(number).addVarint(input.readInt64()); - return true; - case WireFormat.WIRETYPE_FIXED64: - getFieldBuilder(number).addFixed64(input.readFixed64()); - return true; - case WireFormat.WIRETYPE_LENGTH_DELIMITED: - getFieldBuilder(number).addLengthDelimited(input.readBytes()); - return true; - case WireFormat.WIRETYPE_START_GROUP: - final Builder subBuilder = newBuilder(); - input.readGroup(number, subBuilder, - ExtensionRegistry.getEmptyRegistry()); - getFieldBuilder(number).addGroup(subBuilder.build()); - return true; - case WireFormat.WIRETYPE_END_GROUP: - return false; - case WireFormat.WIRETYPE_FIXED32: - getFieldBuilder(number).addFixed32(input.readFixed32()); - return true; - default: - throw InvalidProtocolBufferException.invalidWireType(); - } - } - - /** - * Parse {@code data} as an {@code UnknownFieldSet} and merge it with the - * set being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - */ - public Builder mergeFrom(final ByteString data) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = data.newCodedInput(); - mergeFrom(input); - input.checkLastTagWas(0); - return this; - } catch (final InvalidProtocolBufferException e) { - throw e; - } catch (final IOException e) { - throw new RuntimeException( - "Reading from a ByteString threw an IOException (should " + - "never happen).", e); - } - } - - /** - * Parse {@code data} as an {@code UnknownFieldSet} and merge it with the - * set being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - */ - public Builder mergeFrom(final byte[] data) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = CodedInputStream.newInstance(data); - mergeFrom(input); - input.checkLastTagWas(0); - return this; - } catch (final InvalidProtocolBufferException e) { - throw e; - } catch (final IOException e) { - throw new RuntimeException( - "Reading from a byte array threw an IOException (should " + - "never happen).", e); - } - } - - /** - * Parse an {@code UnknownFieldSet} from {@code input} and merge it with the - * set being built. This is just a small wrapper around - * {@link #mergeFrom(CodedInputStream)}. - */ - public Builder mergeFrom(final InputStream input) throws IOException { - final CodedInputStream codedInput = CodedInputStream.newInstance(input); - mergeFrom(codedInput); - codedInput.checkLastTagWas(0); - return this; - } - - public boolean mergeDelimitedFrom(InputStream input) - throws IOException { - final int firstByte = input.read(); - if (firstByte == -1) { - return false; - } - final int size = CodedInputStream.readRawVarint32(firstByte, input); - final InputStream limitedInput = new LimitedInputStream(input, size); - mergeFrom(limitedInput); - return true; - } - - public boolean mergeDelimitedFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) throws IOException { - // UnknownFieldSet has no extensions. - return mergeDelimitedFrom(input); - } - - public Builder mergeFrom( - CodedInputStream input, - ExtensionRegistryLite extensionRegistry) throws IOException { - // UnknownFieldSet has no extensions. - return mergeFrom(input); - } - - public Builder mergeFrom( - ByteString data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - // UnknownFieldSet has no extensions. - return mergeFrom(data); - } - - public Builder mergeFrom(byte[] data, int off, int len) - throws InvalidProtocolBufferException { - try { - final CodedInputStream input = - CodedInputStream.newInstance(data, off, len); - mergeFrom(input); - input.checkLastTagWas(0); - return this; - } catch (InvalidProtocolBufferException e) { - throw e; - } catch (IOException e) { - throw new RuntimeException( - "Reading from a byte array threw an IOException (should " + - "never happen).", e); - } - } - - public Builder mergeFrom( - byte[] data, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - // UnknownFieldSet has no extensions. - return mergeFrom(data); - } - - public Builder mergeFrom( - byte[] data, int off, int len, - ExtensionRegistryLite extensionRegistry) - throws InvalidProtocolBufferException { - // UnknownFieldSet has no extensions. - return mergeFrom(data, off, len); - } - - public Builder mergeFrom( - InputStream input, - ExtensionRegistryLite extensionRegistry) throws IOException { - // UnknownFieldSet has no extensions. - return mergeFrom(input); - } - - public boolean isInitialized() { - // UnknownFieldSets do not have required fields, so they are always - // initialized. - return true; - } - } - - /** - * Represents a single field in an {@code UnknownFieldSet}. - * - *

A {@code Field} consists of five lists of values. The lists correspond - * to the five "wire types" used in the protocol buffer binary format. - * The wire type of each field can be determined from the encoded form alone, - * without knowing the field's declared type. So, we are able to parse - * unknown values at least this far and separate them. Normally, only one - * of the five lists will contain any values, since it is impossible to - * define a valid message type that declares two different types for the - * same field number. However, the code is designed to allow for the case - * where the same unknown field number is encountered using multiple different - * wire types. - * - *

{@code Field} is an immutable class. To construct one, you must use a - * {@link Builder}. - * - * @see UnknownFieldSet - */ - public static final class Field { - private Field() {} - - /** Construct a new {@link Builder}. */ - public static Builder newBuilder() { - return Builder.create(); - } - - /** - * Construct a new {@link Builder} and initialize it to a copy of - * {@code copyFrom}. - */ - public static Builder newBuilder(final Field copyFrom) { - return newBuilder().mergeFrom(copyFrom); - } - - /** Get an empty {@code Field}. */ - public static Field getDefaultInstance() { - return fieldDefaultInstance; - } - private static final Field fieldDefaultInstance = newBuilder().build(); - - /** Get the list of varint values for this field. */ - public List getVarintList() { return varint; } - - /** Get the list of fixed32 values for this field. */ - public List getFixed32List() { return fixed32; } - - /** Get the list of fixed64 values for this field. */ - public List getFixed64List() { return fixed64; } - - /** Get the list of length-delimited values for this field. */ - public List getLengthDelimitedList() { return lengthDelimited; } - - /** - * Get the list of embedded group values for this field. These are - * represented using {@link UnknownFieldSet}s rather than {@link Message}s - * since the group's type is presumably unknown. - */ - public List getGroupList() { return group; } - - @Override - public boolean equals(final Object other) { - if (this == other) { - return true; - } - if (!(other instanceof Field)) { - return false; - } - return Arrays.equals(getIdentityArray(), - ((Field) other).getIdentityArray()); - } - - @Override - public int hashCode() { - return Arrays.hashCode(getIdentityArray()); - } - - /** - * Returns the array of objects to be used to uniquely identify this - * {@link Field} instance. - */ - private Object[] getIdentityArray() { - return new Object[] { - varint, - fixed32, - fixed64, - lengthDelimited, - group}; - } - - /** - * Serializes the field, including field number, and writes it to - * {@code output}. - */ - public void writeTo(final int fieldNumber, final CodedOutputStream output) - throws IOException { - for (final long value : varint) { - output.writeUInt64(fieldNumber, value); - } - for (final int value : fixed32) { - output.writeFixed32(fieldNumber, value); - } - for (final long value : fixed64) { - output.writeFixed64(fieldNumber, value); - } - for (final ByteString value : lengthDelimited) { - output.writeBytes(fieldNumber, value); - } - for (final UnknownFieldSet value : group) { - output.writeGroup(fieldNumber, value); - } - } - - /** - * Get the number of bytes required to encode this field, including field - * number. - */ - public int getSerializedSize(final int fieldNumber) { - int result = 0; - for (final long value : varint) { - result += CodedOutputStream.computeUInt64Size(fieldNumber, value); - } - for (final int value : fixed32) { - result += CodedOutputStream.computeFixed32Size(fieldNumber, value); - } - for (final long value : fixed64) { - result += CodedOutputStream.computeFixed64Size(fieldNumber, value); - } - for (final ByteString value : lengthDelimited) { - result += CodedOutputStream.computeBytesSize(fieldNumber, value); - } - for (final UnknownFieldSet value : group) { - result += CodedOutputStream.computeGroupSize(fieldNumber, value); - } - return result; - } - - /** - * Serializes the field, including field number, and writes it to - * {@code output}, using {@code MessageSet} wire format. - */ - public void writeAsMessageSetExtensionTo( - final int fieldNumber, - final CodedOutputStream output) - throws IOException { - for (final ByteString value : lengthDelimited) { - output.writeRawMessageSetExtension(fieldNumber, value); - } - } - - /** - * Get the number of bytes required to encode this field, including field - * number, using {@code MessageSet} wire format. - */ - public int getSerializedSizeAsMessageSetExtension(final int fieldNumber) { - int result = 0; - for (final ByteString value : lengthDelimited) { - result += CodedOutputStream.computeRawMessageSetExtensionSize( - fieldNumber, value); - } - return result; - } - - private List varint; - private List fixed32; - private List fixed64; - private List lengthDelimited; - private List group; - - /** - * Used to build a {@link Field} within an {@link UnknownFieldSet}. - * - *

Use {@link Field#newBuilder()} to construct a {@code Builder}. - */ - public static final class Builder { - // This constructor should never be called directly (except from 'create'). - private Builder() {} - - private static Builder create() { - Builder builder = new Builder(); - builder.result = new Field(); - return builder; - } - - private Field result; - - /** - * Build the field. After {@code build()} has been called, the - * {@code Builder} is no longer usable. Calling any other method will - * result in undefined behavior and can cause a - * {@code NullPointerException} to be thrown. - */ - public Field build() { - if (result.varint == null) { - result.varint = Collections.emptyList(); - } else { - result.varint = Collections.unmodifiableList(result.varint); - } - if (result.fixed32 == null) { - result.fixed32 = Collections.emptyList(); - } else { - result.fixed32 = Collections.unmodifiableList(result.fixed32); - } - if (result.fixed64 == null) { - result.fixed64 = Collections.emptyList(); - } else { - result.fixed64 = Collections.unmodifiableList(result.fixed64); - } - if (result.lengthDelimited == null) { - result.lengthDelimited = Collections.emptyList(); - } else { - result.lengthDelimited = - Collections.unmodifiableList(result.lengthDelimited); - } - if (result.group == null) { - result.group = Collections.emptyList(); - } else { - result.group = Collections.unmodifiableList(result.group); - } - - final Field returnMe = result; - result = null; - return returnMe; - } - - /** Discard the field's contents. */ - public Builder clear() { - result = new Field(); - return this; - } - - /** - * Merge the values in {@code other} into this field. For each list - * of values, {@code other}'s values are append to the ones in this - * field. - */ - public Builder mergeFrom(final Field other) { - if (!other.varint.isEmpty()) { - if (result.varint == null) { - result.varint = new ArrayList(); - } - result.varint.addAll(other.varint); - } - if (!other.fixed32.isEmpty()) { - if (result.fixed32 == null) { - result.fixed32 = new ArrayList(); - } - result.fixed32.addAll(other.fixed32); - } - if (!other.fixed64.isEmpty()) { - if (result.fixed64 == null) { - result.fixed64 = new ArrayList(); - } - result.fixed64.addAll(other.fixed64); - } - if (!other.lengthDelimited.isEmpty()) { - if (result.lengthDelimited == null) { - result.lengthDelimited = new ArrayList(); - } - result.lengthDelimited.addAll(other.lengthDelimited); - } - if (!other.group.isEmpty()) { - if (result.group == null) { - result.group = new ArrayList(); - } - result.group.addAll(other.group); - } - return this; - } - - /** Add a varint value. */ - public Builder addVarint(final long value) { - if (result.varint == null) { - result.varint = new ArrayList(); - } - result.varint.add(value); - return this; - } - - /** Add a fixed32 value. */ - public Builder addFixed32(final int value) { - if (result.fixed32 == null) { - result.fixed32 = new ArrayList(); - } - result.fixed32.add(value); - return this; - } - - /** Add a fixed64 value. */ - public Builder addFixed64(final long value) { - if (result.fixed64 == null) { - result.fixed64 = new ArrayList(); - } - result.fixed64.add(value); - return this; - } - - /** Add a length-delimited value. */ - public Builder addLengthDelimited(final ByteString value) { - if (result.lengthDelimited == null) { - result.lengthDelimited = new ArrayList(); - } - result.lengthDelimited.add(value); - return this; - } - - /** Add an embedded group. */ - public Builder addGroup(final UnknownFieldSet value) { - if (result.group == null) { - result.group = new ArrayList(); - } - result.group.add(value); - return this; - } - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java deleted file mode 100644 index ee8fe190..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java +++ /dev/null @@ -1,146 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import java.util.AbstractList; -import java.util.RandomAccess; -import java.util.ListIterator; -import java.util.Iterator; - -/** - * An implementation of {@link LazyStringList} that wraps another - * {@link LazyStringList} such that it cannot be modified via the wrapper. - * - * @author jonp@google.com (Jon Perlow) - */ -public class UnmodifiableLazyStringList extends AbstractList - implements LazyStringList, RandomAccess { - - private final LazyStringList list; - - public UnmodifiableLazyStringList(LazyStringList list) { - this.list = list; - } - - @Override - public String get(int index) { - return list.get(index); - } - - @Override - public int size() { - return list.size(); - } - - @Override - public ByteString getByteString(int index) { - return list.getByteString(index); - } - - @Override - public void add(ByteString element) { - throw new UnsupportedOperationException(); - } - - @Override - public ListIterator listIterator(final int index) { - return new ListIterator() { - ListIterator iter = list.listIterator(index); - - @Override - public boolean hasNext() { - return iter.hasNext(); - } - - @Override - public String next() { - return iter.next(); - } - - @Override - public boolean hasPrevious() { - return iter.hasPrevious(); - } - - @Override - public String previous() { - return iter.previous(); - } - - @Override - public int nextIndex() { - return iter.nextIndex(); - } - - @Override - public int previousIndex() { - return iter.previousIndex(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public void set(String o) { - throw new UnsupportedOperationException(); - } - - @Override - public void add(String o) { - throw new UnsupportedOperationException(); - } - }; - } - - @Override - public Iterator iterator() { - return new Iterator() { - Iterator iter = list.iterator(); - - @Override - public boolean hasNext() { - return iter.hasNext(); - } - - @Override - public String next() { - return iter.next(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java deleted file mode 100644 index a30f2a3c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java +++ /dev/null @@ -1,163 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * This class is used internally by the Protocol Buffer library and generated - * message implementations. It is public only because those generated messages - * do not reside in the {@code protobuf} package. Others should not use this - * class directly. - * - * This class contains constants and helper functions useful for dealing with - * the Protocol Buffer wire format. - * - * @author kenton@google.com Kenton Varda - */ -public final class WireFormat { - // Do not allow instantiation. - private WireFormat() {} - - public static final int WIRETYPE_VARINT = 0; - public static final int WIRETYPE_FIXED64 = 1; - public static final int WIRETYPE_LENGTH_DELIMITED = 2; - public static final int WIRETYPE_START_GROUP = 3; - public static final int WIRETYPE_END_GROUP = 4; - public static final int WIRETYPE_FIXED32 = 5; - - static final int TAG_TYPE_BITS = 3; - static final int TAG_TYPE_MASK = (1 << TAG_TYPE_BITS) - 1; - - /** Given a tag value, determines the wire type (the lower 3 bits). */ - static int getTagWireType(final int tag) { - return tag & TAG_TYPE_MASK; - } - - /** Given a tag value, determines the field number (the upper 29 bits). */ - public static int getTagFieldNumber(final int tag) { - return tag >>> TAG_TYPE_BITS; - } - - /** Makes a tag value given a field number and wire type. */ - static int makeTag(final int fieldNumber, final int wireType) { - return (fieldNumber << TAG_TYPE_BITS) | wireType; - } - - /** - * Lite equivalent to {@link Descriptors.FieldDescriptor.JavaType}. This is - * only here to support the lite runtime and should not be used by users. - */ - public enum JavaType { - INT(0), - LONG(0L), - FLOAT(0F), - DOUBLE(0D), - BOOLEAN(false), - STRING(""), - BYTE_STRING(ByteString.EMPTY), - ENUM(null), - MESSAGE(null); - - JavaType(final Object defaultDefault) { - this.defaultDefault = defaultDefault; - } - - /** - * The default default value for fields of this type, if it's a primitive - * type. - */ - Object getDefaultDefault() { - return defaultDefault; - } - - private final Object defaultDefault; - } - - /** - * Lite equivalent to {@link Descriptors.FieldDescriptor.Type}. This is - * only here to support the lite runtime and should not be used by users. - */ - public enum FieldType { - DOUBLE (JavaType.DOUBLE , WIRETYPE_FIXED64 ), - FLOAT (JavaType.FLOAT , WIRETYPE_FIXED32 ), - INT64 (JavaType.LONG , WIRETYPE_VARINT ), - UINT64 (JavaType.LONG , WIRETYPE_VARINT ), - INT32 (JavaType.INT , WIRETYPE_VARINT ), - FIXED64 (JavaType.LONG , WIRETYPE_FIXED64 ), - FIXED32 (JavaType.INT , WIRETYPE_FIXED32 ), - BOOL (JavaType.BOOLEAN , WIRETYPE_VARINT ), - STRING (JavaType.STRING , WIRETYPE_LENGTH_DELIMITED) { - public boolean isPackable() { return false; } - }, - GROUP (JavaType.MESSAGE , WIRETYPE_START_GROUP ) { - public boolean isPackable() { return false; } - }, - MESSAGE (JavaType.MESSAGE , WIRETYPE_LENGTH_DELIMITED) { - public boolean isPackable() { return false; } - }, - BYTES (JavaType.BYTE_STRING, WIRETYPE_LENGTH_DELIMITED) { - public boolean isPackable() { return false; } - }, - UINT32 (JavaType.INT , WIRETYPE_VARINT ), - ENUM (JavaType.ENUM , WIRETYPE_VARINT ), - SFIXED32(JavaType.INT , WIRETYPE_FIXED32 ), - SFIXED64(JavaType.LONG , WIRETYPE_FIXED64 ), - SINT32 (JavaType.INT , WIRETYPE_VARINT ), - SINT64 (JavaType.LONG , WIRETYPE_VARINT ); - - FieldType(final JavaType javaType, final int wireType) { - this.javaType = javaType; - this.wireType = wireType; - } - - private final JavaType javaType; - private final int wireType; - - public JavaType getJavaType() { return javaType; } - public int getWireType() { return wireType; } - - public boolean isPackable() { return true; } - } - - // Field numbers for feilds in MessageSet wire format. - static final int MESSAGE_SET_ITEM = 1; - static final int MESSAGE_SET_TYPE_ID = 2; - static final int MESSAGE_SET_MESSAGE = 3; - - // Tag numbers. - static final int MESSAGE_SET_ITEM_TAG = - makeTag(MESSAGE_SET_ITEM, WIRETYPE_START_GROUP); - static final int MESSAGE_SET_ITEM_END_TAG = - makeTag(MESSAGE_SET_ITEM, WIRETYPE_END_GROUP); - static final int MESSAGE_SET_TYPE_ID_TAG = - makeTag(MESSAGE_SET_TYPE_ID, WIRETYPE_VARINT); - static final int MESSAGE_SET_MESSAGE_TAG = - makeTag(MESSAGE_SET_MESSAGE, WIRETYPE_LENGTH_DELIMITED); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java deleted file mode 100644 index d53ce8d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java +++ /dev/null @@ -1,460 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestOptimizeFor.TestOptimizedForSize; -import protobuf_unittest.UnittestProto; -import protobuf_unittest.UnittestProto.ForeignMessage; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestPackedTypes; -import protobuf_unittest.UnittestProto.TestRequired; -import protobuf_unittest.UnittestProto.TestRequiredForeign; -import protobuf_unittest.UnittestProto.TestUnpackedTypes; - -import junit.framework.TestCase; - -import java.util.Map; - -/** - * Unit test for {@link AbstractMessage}. - * - * @author kenton@google.com Kenton Varda - */ -public class AbstractMessageTest extends TestCase { - /** - * Extends AbstractMessage and wraps some other message object. The methods - * of the Message interface which aren't explicitly implemented by - * AbstractMessage are forwarded to the wrapped object. This allows us to - * test that AbstractMessage's implementations work even if the wrapped - * object does not use them. - */ - private static class AbstractMessageWrapper extends AbstractMessage { - private final Message wrappedMessage; - - public AbstractMessageWrapper(Message wrappedMessage) { - this.wrappedMessage = wrappedMessage; - } - - public Descriptors.Descriptor getDescriptorForType() { - return wrappedMessage.getDescriptorForType(); - } - public AbstractMessageWrapper getDefaultInstanceForType() { - return new AbstractMessageWrapper( - wrappedMessage.getDefaultInstanceForType()); - } - public Map getAllFields() { - return wrappedMessage.getAllFields(); - } - public boolean hasField(Descriptors.FieldDescriptor field) { - return wrappedMessage.hasField(field); - } - public Object getField(Descriptors.FieldDescriptor field) { - return wrappedMessage.getField(field); - } - public int getRepeatedFieldCount(Descriptors.FieldDescriptor field) { - return wrappedMessage.getRepeatedFieldCount(field); - } - public Object getRepeatedField( - Descriptors.FieldDescriptor field, int index) { - return wrappedMessage.getRepeatedField(field, index); - } - public UnknownFieldSet getUnknownFields() { - return wrappedMessage.getUnknownFields(); - } - public Builder newBuilderForType() { - return new Builder(wrappedMessage.newBuilderForType()); - } - public Builder toBuilder() { - return new Builder(wrappedMessage.toBuilder()); - } - - static class Builder extends AbstractMessage.Builder { - private final Message.Builder wrappedBuilder; - - public Builder(Message.Builder wrappedBuilder) { - this.wrappedBuilder = wrappedBuilder; - } - - public AbstractMessageWrapper build() { - return new AbstractMessageWrapper(wrappedBuilder.build()); - } - public AbstractMessageWrapper buildPartial() { - return new AbstractMessageWrapper(wrappedBuilder.buildPartial()); - } - public Builder clone() { - return new Builder(wrappedBuilder.clone()); - } - public boolean isInitialized() { - return clone().buildPartial().isInitialized(); - } - public Descriptors.Descriptor getDescriptorForType() { - return wrappedBuilder.getDescriptorForType(); - } - public AbstractMessageWrapper getDefaultInstanceForType() { - return new AbstractMessageWrapper( - wrappedBuilder.getDefaultInstanceForType()); - } - public Map getAllFields() { - return wrappedBuilder.getAllFields(); - } - public Builder newBuilderForField(Descriptors.FieldDescriptor field) { - return new Builder(wrappedBuilder.newBuilderForField(field)); - } - public boolean hasField(Descriptors.FieldDescriptor field) { - return wrappedBuilder.hasField(field); - } - public Object getField(Descriptors.FieldDescriptor field) { - return wrappedBuilder.getField(field); - } - public Builder setField(Descriptors.FieldDescriptor field, Object value) { - wrappedBuilder.setField(field, value); - return this; - } - public Builder clearField(Descriptors.FieldDescriptor field) { - wrappedBuilder.clearField(field); - return this; - } - public int getRepeatedFieldCount(Descriptors.FieldDescriptor field) { - return wrappedBuilder.getRepeatedFieldCount(field); - } - public Object getRepeatedField( - Descriptors.FieldDescriptor field, int index) { - return wrappedBuilder.getRepeatedField(field, index); - } - public Builder setRepeatedField(Descriptors.FieldDescriptor field, - int index, Object value) { - wrappedBuilder.setRepeatedField(field, index, value); - return this; - } - public Builder addRepeatedField( - Descriptors.FieldDescriptor field, Object value) { - wrappedBuilder.addRepeatedField(field, value); - return this; - } - public UnknownFieldSet getUnknownFields() { - return wrappedBuilder.getUnknownFields(); - } - public Builder setUnknownFields(UnknownFieldSet unknownFields) { - wrappedBuilder.setUnknownFields(unknownFields); - return this; - } - } - } - - // ================================================================= - - TestUtil.ReflectionTester reflectionTester = - new TestUtil.ReflectionTester(TestAllTypes.getDescriptor(), null); - - TestUtil.ReflectionTester extensionsReflectionTester = - new TestUtil.ReflectionTester(TestAllExtensions.getDescriptor(), - TestUtil.getExtensionRegistry()); - - public void testClear() throws Exception { - AbstractMessageWrapper message = - new AbstractMessageWrapper.Builder( - TestAllTypes.newBuilder(TestUtil.getAllSet())) - .clear().build(); - TestUtil.assertClear((TestAllTypes) message.wrappedMessage); - } - - public void testCopy() throws Exception { - AbstractMessageWrapper message = - new AbstractMessageWrapper.Builder(TestAllTypes.newBuilder()) - .mergeFrom(TestUtil.getAllSet()).build(); - TestUtil.assertAllFieldsSet((TestAllTypes) message.wrappedMessage); - } - - public void testSerializedSize() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - Message abstractMessage = new AbstractMessageWrapper(TestUtil.getAllSet()); - - assertEquals(message.getSerializedSize(), - abstractMessage.getSerializedSize()); - } - - public void testSerialization() throws Exception { - Message abstractMessage = new AbstractMessageWrapper(TestUtil.getAllSet()); - - TestUtil.assertAllFieldsSet( - TestAllTypes.parseFrom(abstractMessage.toByteString())); - - assertEquals(TestUtil.getAllSet().toByteString(), - abstractMessage.toByteString()); - } - - public void testParsing() throws Exception { - AbstractMessageWrapper.Builder builder = - new AbstractMessageWrapper.Builder(TestAllTypes.newBuilder()); - AbstractMessageWrapper message = - builder.mergeFrom(TestUtil.getAllSet().toByteString()).build(); - TestUtil.assertAllFieldsSet((TestAllTypes) message.wrappedMessage); - } - - public void testPackedSerialization() throws Exception { - Message abstractMessage = - new AbstractMessageWrapper(TestUtil.getPackedSet()); - - TestUtil.assertPackedFieldsSet( - TestPackedTypes.parseFrom(abstractMessage.toByteString())); - - assertEquals(TestUtil.getPackedSet().toByteString(), - abstractMessage.toByteString()); - } - - public void testPackedParsing() throws Exception { - AbstractMessageWrapper.Builder builder = - new AbstractMessageWrapper.Builder(TestPackedTypes.newBuilder()); - AbstractMessageWrapper message = - builder.mergeFrom(TestUtil.getPackedSet().toByteString()).build(); - TestUtil.assertPackedFieldsSet((TestPackedTypes) message.wrappedMessage); - } - - public void testUnpackedSerialization() throws Exception { - Message abstractMessage = - new AbstractMessageWrapper(TestUtil.getUnpackedSet()); - - TestUtil.assertUnpackedFieldsSet( - TestUnpackedTypes.parseFrom(abstractMessage.toByteString())); - - assertEquals(TestUtil.getUnpackedSet().toByteString(), - abstractMessage.toByteString()); - } - - public void testParsePackedToUnpacked() throws Exception { - AbstractMessageWrapper.Builder builder = - new AbstractMessageWrapper.Builder(TestUnpackedTypes.newBuilder()); - AbstractMessageWrapper message = - builder.mergeFrom(TestUtil.getPackedSet().toByteString()).build(); - TestUtil.assertUnpackedFieldsSet( - (TestUnpackedTypes) message.wrappedMessage); - } - - public void testParseUnpackedToPacked() throws Exception { - AbstractMessageWrapper.Builder builder = - new AbstractMessageWrapper.Builder(TestPackedTypes.newBuilder()); - AbstractMessageWrapper message = - builder.mergeFrom(TestUtil.getUnpackedSet().toByteString()).build(); - TestUtil.assertPackedFieldsSet((TestPackedTypes) message.wrappedMessage); - } - - public void testUnpackedParsing() throws Exception { - AbstractMessageWrapper.Builder builder = - new AbstractMessageWrapper.Builder(TestUnpackedTypes.newBuilder()); - AbstractMessageWrapper message = - builder.mergeFrom(TestUtil.getUnpackedSet().toByteString()).build(); - TestUtil.assertUnpackedFieldsSet( - (TestUnpackedTypes) message.wrappedMessage); - } - - public void testOptimizedForSize() throws Exception { - // We're mostly only checking that this class was compiled successfully. - TestOptimizedForSize message = - TestOptimizedForSize.newBuilder().setI(1).build(); - message = TestOptimizedForSize.parseFrom(message.toByteString()); - assertEquals(2, message.getSerializedSize()); - } - - // ----------------------------------------------------------------- - // Tests for isInitialized(). - - private static final TestRequired TEST_REQUIRED_UNINITIALIZED = - TestRequired.getDefaultInstance(); - private static final TestRequired TEST_REQUIRED_INITIALIZED = - TestRequired.newBuilder().setA(1).setB(2).setC(3).build(); - - public void testIsInitialized() throws Exception { - TestRequired.Builder builder = TestRequired.newBuilder(); - AbstractMessageWrapper.Builder abstractBuilder = - new AbstractMessageWrapper.Builder(builder); - - assertFalse(abstractBuilder.isInitialized()); - builder.setA(1); - assertFalse(abstractBuilder.isInitialized()); - builder.setB(1); - assertFalse(abstractBuilder.isInitialized()); - builder.setC(1); - assertTrue(abstractBuilder.isInitialized()); - } - - public void testForeignIsInitialized() throws Exception { - TestRequiredForeign.Builder builder = TestRequiredForeign.newBuilder(); - AbstractMessageWrapper.Builder abstractBuilder = - new AbstractMessageWrapper.Builder(builder); - - assertTrue(abstractBuilder.isInitialized()); - - builder.setOptionalMessage(TEST_REQUIRED_UNINITIALIZED); - assertFalse(abstractBuilder.isInitialized()); - - builder.setOptionalMessage(TEST_REQUIRED_INITIALIZED); - assertTrue(abstractBuilder.isInitialized()); - - builder.addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED); - assertFalse(abstractBuilder.isInitialized()); - - builder.setRepeatedMessage(0, TEST_REQUIRED_INITIALIZED); - assertTrue(abstractBuilder.isInitialized()); - } - - // ----------------------------------------------------------------- - // Tests for mergeFrom - - static final TestAllTypes MERGE_SOURCE = - TestAllTypes.newBuilder() - .setOptionalInt32(1) - .setOptionalString("foo") - .setOptionalForeignMessage(ForeignMessage.getDefaultInstance()) - .addRepeatedString("bar") - .build(); - - static final TestAllTypes MERGE_DEST = - TestAllTypes.newBuilder() - .setOptionalInt64(2) - .setOptionalString("baz") - .setOptionalForeignMessage(ForeignMessage.newBuilder().setC(3).build()) - .addRepeatedString("qux") - .build(); - - static final String MERGE_RESULT_TEXT = - "optional_int32: 1\n" + - "optional_int64: 2\n" + - "optional_string: \"foo\"\n" + - "optional_foreign_message {\n" + - " c: 3\n" + - "}\n" + - "repeated_string: \"qux\"\n" + - "repeated_string: \"bar\"\n"; - - public void testMergeFrom() throws Exception { - AbstractMessageWrapper result = - new AbstractMessageWrapper.Builder( - TestAllTypes.newBuilder(MERGE_DEST)) - .mergeFrom(MERGE_SOURCE).build(); - - assertEquals(MERGE_RESULT_TEXT, result.toString()); - } - - // ----------------------------------------------------------------- - // Tests for equals and hashCode - - public void testEqualsAndHashCode() throws Exception { - TestAllTypes a = TestUtil.getAllSet(); - TestAllTypes b = TestAllTypes.newBuilder().build(); - TestAllTypes c = TestAllTypes.newBuilder(b).addRepeatedString("x").build(); - TestAllTypes d = TestAllTypes.newBuilder(c).addRepeatedString("y").build(); - TestAllExtensions e = TestUtil.getAllExtensionsSet(); - TestAllExtensions f = TestAllExtensions.newBuilder(e) - .addExtension(UnittestProto.repeatedInt32Extension, 999).build(); - - checkEqualsIsConsistent(a); - checkEqualsIsConsistent(b); - checkEqualsIsConsistent(c); - checkEqualsIsConsistent(d); - checkEqualsIsConsistent(e); - checkEqualsIsConsistent(f); - - checkNotEqual(a, b); - checkNotEqual(a, c); - checkNotEqual(a, d); - checkNotEqual(a, e); - checkNotEqual(a, f); - - checkNotEqual(b, c); - checkNotEqual(b, d); - checkNotEqual(b, e); - checkNotEqual(b, f); - - checkNotEqual(c, d); - checkNotEqual(c, e); - checkNotEqual(c, f); - - checkNotEqual(d, e); - checkNotEqual(d, f); - - checkNotEqual(e, f); - - // Deserializing into the TestEmptyMessage such that every field - // is an {@link UnknownFieldSet.Field}. - UnittestProto.TestEmptyMessage eUnknownFields = - UnittestProto.TestEmptyMessage.parseFrom(e.toByteArray()); - UnittestProto.TestEmptyMessage fUnknownFields = - UnittestProto.TestEmptyMessage.parseFrom(f.toByteArray()); - checkNotEqual(eUnknownFields, fUnknownFields); - checkEqualsIsConsistent(eUnknownFields); - checkEqualsIsConsistent(fUnknownFields); - - // Subsequent reconstitutions should be identical - UnittestProto.TestEmptyMessage eUnknownFields2 = - UnittestProto.TestEmptyMessage.parseFrom(e.toByteArray()); - checkEqualsIsConsistent(eUnknownFields, eUnknownFields2); - } - - - /** - * Asserts that the given proto has symetric equals and hashCode methods. - */ - private void checkEqualsIsConsistent(Message message) { - // Object should be equal to itself. - assertEquals(message, message); - - // Object should be equal to a dynamic copy of itself. - DynamicMessage dynamic = DynamicMessage.newBuilder(message).build(); - checkEqualsIsConsistent(message, dynamic); - } - - /** - * Asserts that the given protos are equal and have the same hash code. - */ - private void checkEqualsIsConsistent(Message message1, Message message2) { - assertEquals(message1, message2); - assertEquals(message2, message1); - assertEquals(message2.hashCode(), message1.hashCode()); - } - - /** - * Asserts that the given protos are not equal and have different hash codes. - * - * @warning It's valid for non-equal objects to have the same hash code, so - * this test is stricter than it needs to be. However, this should happen - * relatively rarely. - */ - private void checkNotEqual(Message m1, Message m2) { - String equalsError = String.format("%s should not be equal to %s", m1, m2); - assertFalse(equalsError, m1.equals(m2)); - assertFalse(equalsError, m2.equals(m1)); - - assertFalse( - String.format("%s should have a different hash code from %s", m1, m2), - m1.hashCode() == m2.hashCode()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java deleted file mode 100644 index 83f7f8da..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java +++ /dev/null @@ -1,528 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestRecursiveMessage; - -import junit.framework.TestCase; - -import java.io.ByteArrayInputStream; -import java.io.FilterInputStream; -import java.io.InputStream; -import java.io.IOException; - -/** - * Unit test for {@link CodedInputStream}. - * - * @author kenton@google.com Kenton Varda - */ -public class CodedInputStreamTest extends TestCase { - /** - * Helper to construct a byte array from a bunch of bytes. The inputs are - * actually ints so that I can use hex notation and not get stupid errors - * about precision. - */ - private byte[] bytes(int... bytesAsInts) { - byte[] bytes = new byte[bytesAsInts.length]; - for (int i = 0; i < bytesAsInts.length; i++) { - bytes[i] = (byte) bytesAsInts[i]; - } - return bytes; - } - - /** - * An InputStream which limits the number of bytes it reads at a time. - * We use this to make sure that CodedInputStream doesn't screw up when - * reading in small blocks. - */ - private static final class SmallBlockInputStream extends FilterInputStream { - private final int blockSize; - - public SmallBlockInputStream(byte[] data, int blockSize) { - this(new ByteArrayInputStream(data), blockSize); - } - - public SmallBlockInputStream(InputStream in, int blockSize) { - super(in); - this.blockSize = blockSize; - } - - public int read(byte[] b) throws IOException { - return super.read(b, 0, Math.min(b.length, blockSize)); - } - - public int read(byte[] b, int off, int len) throws IOException { - return super.read(b, off, Math.min(len, blockSize)); - } - } - - /** - * Parses the given bytes using readRawVarint32() and readRawVarint64() and - * checks that the result matches the given value. - */ - private void assertReadVarint(byte[] data, long value) throws Exception { - CodedInputStream input = CodedInputStream.newInstance(data); - assertEquals((int)value, input.readRawVarint32()); - - input = CodedInputStream.newInstance(data); - assertEquals(value, input.readRawVarint64()); - assertTrue(input.isAtEnd()); - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - input = CodedInputStream.newInstance( - new SmallBlockInputStream(data, blockSize)); - assertEquals((int)value, input.readRawVarint32()); - - input = CodedInputStream.newInstance( - new SmallBlockInputStream(data, blockSize)); - assertEquals(value, input.readRawVarint64()); - assertTrue(input.isAtEnd()); - } - - // Try reading direct from an InputStream. We want to verify that it - // doesn't read past the end of the input, so we copy to a new, bigger - // array first. - byte[] longerData = new byte[data.length + 1]; - System.arraycopy(data, 0, longerData, 0, data.length); - InputStream rawInput = new ByteArrayInputStream(longerData); - assertEquals((int)value, CodedInputStream.readRawVarint32(rawInput)); - assertEquals(1, rawInput.available()); - } - - /** - * Parses the given bytes using readRawVarint32() and readRawVarint64() and - * expects them to fail with an InvalidProtocolBufferException whose - * description matches the given one. - */ - private void assertReadVarintFailure( - InvalidProtocolBufferException expected, byte[] data) - throws Exception { - CodedInputStream input = CodedInputStream.newInstance(data); - try { - input.readRawVarint32(); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals(expected.getMessage(), e.getMessage()); - } - - input = CodedInputStream.newInstance(data); - try { - input.readRawVarint64(); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals(expected.getMessage(), e.getMessage()); - } - - // Make sure we get the same error when reading direct from an InputStream. - try { - CodedInputStream.readRawVarint32(new ByteArrayInputStream(data)); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals(expected.getMessage(), e.getMessage()); - } - } - - /** Tests readRawVarint32() and readRawVarint64(). */ - public void testReadVarint() throws Exception { - assertReadVarint(bytes(0x00), 0); - assertReadVarint(bytes(0x01), 1); - assertReadVarint(bytes(0x7f), 127); - // 14882 - assertReadVarint(bytes(0xa2, 0x74), (0x22 << 0) | (0x74 << 7)); - // 2961488830 - assertReadVarint(bytes(0xbe, 0xf7, 0x92, 0x84, 0x0b), - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (0x0bL << 28)); - - // 64-bit - // 7256456126 - assertReadVarint(bytes(0xbe, 0xf7, 0x92, 0x84, 0x1b), - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (0x1bL << 28)); - // 41256202580718336 - assertReadVarint( - bytes(0x80, 0xe6, 0xeb, 0x9c, 0xc3, 0xc9, 0xa4, 0x49), - (0x00 << 0) | (0x66 << 7) | (0x6b << 14) | (0x1c << 21) | - (0x43L << 28) | (0x49L << 35) | (0x24L << 42) | (0x49L << 49)); - // 11964378330978735131 - assertReadVarint( - bytes(0x9b, 0xa8, 0xf9, 0xc2, 0xbb, 0xd6, 0x80, 0x85, 0xa6, 0x01), - (0x1b << 0) | (0x28 << 7) | (0x79 << 14) | (0x42 << 21) | - (0x3bL << 28) | (0x56L << 35) | (0x00L << 42) | - (0x05L << 49) | (0x26L << 56) | (0x01L << 63)); - - // Failures - assertReadVarintFailure( - InvalidProtocolBufferException.malformedVarint(), - bytes(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x00)); - assertReadVarintFailure( - InvalidProtocolBufferException.truncatedMessage(), - bytes(0x80)); - } - - /** - * Parses the given bytes using readRawLittleEndian32() and checks - * that the result matches the given value. - */ - private void assertReadLittleEndian32(byte[] data, int value) - throws Exception { - CodedInputStream input = CodedInputStream.newInstance(data); - assertEquals(value, input.readRawLittleEndian32()); - assertTrue(input.isAtEnd()); - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - input = CodedInputStream.newInstance( - new SmallBlockInputStream(data, blockSize)); - assertEquals(value, input.readRawLittleEndian32()); - assertTrue(input.isAtEnd()); - } - } - - /** - * Parses the given bytes using readRawLittleEndian64() and checks - * that the result matches the given value. - */ - private void assertReadLittleEndian64(byte[] data, long value) - throws Exception { - CodedInputStream input = CodedInputStream.newInstance(data); - assertEquals(value, input.readRawLittleEndian64()); - assertTrue(input.isAtEnd()); - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - input = CodedInputStream.newInstance( - new SmallBlockInputStream(data, blockSize)); - assertEquals(value, input.readRawLittleEndian64()); - assertTrue(input.isAtEnd()); - } - } - - /** Tests readRawLittleEndian32() and readRawLittleEndian64(). */ - public void testReadLittleEndian() throws Exception { - assertReadLittleEndian32(bytes(0x78, 0x56, 0x34, 0x12), 0x12345678); - assertReadLittleEndian32(bytes(0xf0, 0xde, 0xbc, 0x9a), 0x9abcdef0); - - assertReadLittleEndian64( - bytes(0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12), - 0x123456789abcdef0L); - assertReadLittleEndian64( - bytes(0x78, 0x56, 0x34, 0x12, 0xf0, 0xde, 0xbc, 0x9a), - 0x9abcdef012345678L); - } - - /** Test decodeZigZag32() and decodeZigZag64(). */ - public void testDecodeZigZag() throws Exception { - assertEquals( 0, CodedInputStream.decodeZigZag32(0)); - assertEquals(-1, CodedInputStream.decodeZigZag32(1)); - assertEquals( 1, CodedInputStream.decodeZigZag32(2)); - assertEquals(-2, CodedInputStream.decodeZigZag32(3)); - assertEquals(0x3FFFFFFF, CodedInputStream.decodeZigZag32(0x7FFFFFFE)); - assertEquals(0xC0000000, CodedInputStream.decodeZigZag32(0x7FFFFFFF)); - assertEquals(0x7FFFFFFF, CodedInputStream.decodeZigZag32(0xFFFFFFFE)); - assertEquals(0x80000000, CodedInputStream.decodeZigZag32(0xFFFFFFFF)); - - assertEquals( 0, CodedInputStream.decodeZigZag64(0)); - assertEquals(-1, CodedInputStream.decodeZigZag64(1)); - assertEquals( 1, CodedInputStream.decodeZigZag64(2)); - assertEquals(-2, CodedInputStream.decodeZigZag64(3)); - assertEquals(0x000000003FFFFFFFL, - CodedInputStream.decodeZigZag64(0x000000007FFFFFFEL)); - assertEquals(0xFFFFFFFFC0000000L, - CodedInputStream.decodeZigZag64(0x000000007FFFFFFFL)); - assertEquals(0x000000007FFFFFFFL, - CodedInputStream.decodeZigZag64(0x00000000FFFFFFFEL)); - assertEquals(0xFFFFFFFF80000000L, - CodedInputStream.decodeZigZag64(0x00000000FFFFFFFFL)); - assertEquals(0x7FFFFFFFFFFFFFFFL, - CodedInputStream.decodeZigZag64(0xFFFFFFFFFFFFFFFEL)); - assertEquals(0x8000000000000000L, - CodedInputStream.decodeZigZag64(0xFFFFFFFFFFFFFFFFL)); - } - - /** Tests reading and parsing a whole message with every field type. */ - public void testReadWholeMessage() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - - byte[] rawBytes = message.toByteArray(); - assertEquals(rawBytes.length, message.getSerializedSize()); - - TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); - TestUtil.assertAllFieldsSet(message2); - - // Try different block sizes. - for (int blockSize = 1; blockSize < 256; blockSize *= 2) { - message2 = TestAllTypes.parseFrom( - new SmallBlockInputStream(rawBytes, blockSize)); - TestUtil.assertAllFieldsSet(message2); - } - } - - /** Tests skipField(). */ - public void testSkipWholeMessage() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - byte[] rawBytes = message.toByteArray(); - - // Create two parallel inputs. Parse one as unknown fields while using - // skipField() to skip each field on the other. Expect the same tags. - CodedInputStream input1 = CodedInputStream.newInstance(rawBytes); - CodedInputStream input2 = CodedInputStream.newInstance(rawBytes); - UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder(); - - while (true) { - int tag = input1.readTag(); - assertEquals(tag, input2.readTag()); - if (tag == 0) { - break; - } - unknownFields.mergeFieldFrom(tag, input1); - input2.skipField(tag); - } - } - - /** - * Test that a bug in skipRawBytes() has been fixed: if the skip skips - * exactly up to a limit, this should not break things. - */ - public void testSkipRawBytesBug() throws Exception { - byte[] rawBytes = new byte[] { 1, 2 }; - CodedInputStream input = CodedInputStream.newInstance(rawBytes); - - int limit = input.pushLimit(1); - input.skipRawBytes(1); - input.popLimit(limit); - assertEquals(2, input.readRawByte()); - } - - /** - * Test that a bug in skipRawBytes() has been fixed: if the skip skips - * past the end of a buffer with a limit that has been set past the end of - * that buffer, this should not break things. - */ - public void testSkipRawBytesPastEndOfBufferWithLimit() throws Exception { - byte[] rawBytes = new byte[] { 1, 2, 3, 4, 5 }; - CodedInputStream input = CodedInputStream.newInstance( - new SmallBlockInputStream(rawBytes, 3)); - - int limit = input.pushLimit(4); - // In order to expose the bug we need to read at least one byte to prime the - // buffer inside the CodedInputStream. - assertEquals(1, input.readRawByte()); - // Skip to the end of the limit. - input.skipRawBytes(3); - assertTrue(input.isAtEnd()); - input.popLimit(limit); - assertEquals(5, input.readRawByte()); - } - - public void testReadHugeBlob() throws Exception { - // Allocate and initialize a 1MB blob. - byte[] blob = new byte[1 << 20]; - for (int i = 0; i < blob.length; i++) { - blob[i] = (byte)i; - } - - // Make a message containing it. - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - builder.setOptionalBytes(ByteString.copyFrom(blob)); - TestAllTypes message = builder.build(); - - // Serialize and parse it. Make sure to parse from an InputStream, not - // directly from a ByteString, so that CodedInputStream uses buffered - // reading. - TestAllTypes message2 = - TestAllTypes.parseFrom(message.toByteString().newInput()); - - assertEquals(message.getOptionalBytes(), message2.getOptionalBytes()); - - // Make sure all the other fields were parsed correctly. - TestAllTypes message3 = TestAllTypes.newBuilder(message2) - .setOptionalBytes(TestUtil.getAllSet().getOptionalBytes()) - .build(); - TestUtil.assertAllFieldsSet(message3); - } - - public void testReadMaliciouslyLargeBlob() throws Exception { - ByteString.Output rawOutput = ByteString.newOutput(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - - int tag = WireFormat.makeTag(1, WireFormat.WIRETYPE_LENGTH_DELIMITED); - output.writeRawVarint32(tag); - output.writeRawVarint32(0x7FFFFFFF); - output.writeRawBytes(new byte[32]); // Pad with a few random bytes. - output.flush(); - - CodedInputStream input = rawOutput.toByteString().newCodedInput(); - assertEquals(tag, input.readTag()); - - try { - input.readBytes(); - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - } - - private TestRecursiveMessage makeRecursiveMessage(int depth) { - if (depth == 0) { - return TestRecursiveMessage.newBuilder().setI(5).build(); - } else { - return TestRecursiveMessage.newBuilder() - .setA(makeRecursiveMessage(depth - 1)).build(); - } - } - - private void assertMessageDepth(TestRecursiveMessage message, int depth) { - if (depth == 0) { - assertFalse(message.hasA()); - assertEquals(5, message.getI()); - } else { - assertTrue(message.hasA()); - assertMessageDepth(message.getA(), depth - 1); - } - } - - public void testMaliciousRecursion() throws Exception { - ByteString data64 = makeRecursiveMessage(64).toByteString(); - ByteString data65 = makeRecursiveMessage(65).toByteString(); - - assertMessageDepth(TestRecursiveMessage.parseFrom(data64), 64); - - try { - TestRecursiveMessage.parseFrom(data65); - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - - CodedInputStream input = data64.newCodedInput(); - input.setRecursionLimit(8); - try { - TestRecursiveMessage.parseFrom(input); - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - } - - public void testSizeLimit() throws Exception { - CodedInputStream input = CodedInputStream.newInstance( - TestUtil.getAllSet().toByteString().newInput()); - input.setSizeLimit(16); - - try { - TestAllTypes.parseFrom(input); - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - } - - public void testResetSizeCounter() throws Exception { - CodedInputStream input = CodedInputStream.newInstance( - new SmallBlockInputStream(new byte[256], 8)); - input.setSizeLimit(16); - input.readRawBytes(16); - assertEquals(16, input.getTotalBytesRead()); - - try { - input.readRawByte(); - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - - input.resetSizeCounter(); - assertEquals(0, input.getTotalBytesRead()); - input.readRawByte(); // No exception thrown. - input.resetSizeCounter(); - assertEquals(0, input.getTotalBytesRead()); - - try { - input.readRawBytes(16); // Hits limit again. - fail("Should have thrown an exception!"); - } catch (InvalidProtocolBufferException e) { - // success. - } - } - - /** - * Tests that if we read an string that contains invalid UTF-8, no exception - * is thrown. Instead, the invalid bytes are replaced with the Unicode - * "replacement character" U+FFFD. - */ - public void testReadInvalidUtf8() throws Exception { - ByteString.Output rawOutput = ByteString.newOutput(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - - int tag = WireFormat.makeTag(1, WireFormat.WIRETYPE_LENGTH_DELIMITED); - output.writeRawVarint32(tag); - output.writeRawVarint32(1); - output.writeRawBytes(new byte[] { (byte)0x80 }); - output.flush(); - - CodedInputStream input = rawOutput.toByteString().newCodedInput(); - assertEquals(tag, input.readTag()); - String text = input.readString(); - assertEquals(0xfffd, text.charAt(0)); - } - - public void testReadFromSlice() throws Exception { - byte[] bytes = bytes(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); - CodedInputStream in = CodedInputStream.newInstance(bytes, 3, 5); - assertEquals(0, in.getTotalBytesRead()); - for (int i = 3; i < 8; i++) { - assertEquals(i, in.readRawByte()); - assertEquals(i-2, in.getTotalBytesRead()); - } - // eof - assertEquals(0, in.readTag()); - assertEquals(5, in.getTotalBytesRead()); - } - - public void testInvalidTag() throws Exception { - // Any tag number which corresponds to field number zero is invalid and - // should throw InvalidProtocolBufferException. - for (int i = 0; i < 8; i++) { - try { - CodedInputStream.newInstance(bytes(i)).readTag(); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals(InvalidProtocolBufferException.invalidTag().getMessage(), - e.getMessage()); - } - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java deleted file mode 100644 index 74476e36..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java +++ /dev/null @@ -1,318 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestPackedTypes; - -import junit.framework.TestCase; - -import java.io.ByteArrayOutputStream; -import java.util.ArrayList; -import java.util.List; - -/** - * Unit test for {@link CodedOutputStream}. - * - * @author kenton@google.com Kenton Varda - */ -public class CodedOutputStreamTest extends TestCase { - /** - * Helper to construct a byte array from a bunch of bytes. The inputs are - * actually ints so that I can use hex notation and not get stupid errors - * about precision. - */ - private byte[] bytes(int... bytesAsInts) { - byte[] bytes = new byte[bytesAsInts.length]; - for (int i = 0; i < bytesAsInts.length; i++) { - bytes[i] = (byte) bytesAsInts[i]; - } - return bytes; - } - - /** Arrays.asList() does not work with arrays of primitives. :( */ - private List toList(byte[] bytes) { - List result = new ArrayList(); - for (byte b : bytes) { - result.add(b); - } - return result; - } - - private void assertEqualBytes(byte[] a, byte[] b) { - assertEquals(toList(a), toList(b)); - } - - /** - * Writes the given value using writeRawVarint32() and writeRawVarint64() and - * checks that the result matches the given bytes. - */ - private void assertWriteVarint(byte[] data, long value) throws Exception { - // Only do 32-bit write if the value fits in 32 bits. - if ((value >>> 32) == 0) { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - output.writeRawVarint32((int) value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - - // Also try computing size. - assertEquals(data.length, - CodedOutputStream.computeRawVarint32Size((int) value)); - } - - { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - output.writeRawVarint64(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - - // Also try computing size. - assertEquals(data.length, - CodedOutputStream.computeRawVarint64Size(value)); - } - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - // Only do 32-bit write if the value fits in 32 bits. - if ((value >>> 32) == 0) { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = - CodedOutputStream.newInstance(rawOutput, blockSize); - output.writeRawVarint32((int) value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - } - - { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = - CodedOutputStream.newInstance(rawOutput, blockSize); - output.writeRawVarint64(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - } - } - } - - /** Tests writeRawVarint32() and writeRawVarint64(). */ - public void testWriteVarint() throws Exception { - assertWriteVarint(bytes(0x00), 0); - assertWriteVarint(bytes(0x01), 1); - assertWriteVarint(bytes(0x7f), 127); - // 14882 - assertWriteVarint(bytes(0xa2, 0x74), (0x22 << 0) | (0x74 << 7)); - // 2961488830 - assertWriteVarint(bytes(0xbe, 0xf7, 0x92, 0x84, 0x0b), - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (0x0bL << 28)); - - // 64-bit - // 7256456126 - assertWriteVarint(bytes(0xbe, 0xf7, 0x92, 0x84, 0x1b), - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (0x1bL << 28)); - // 41256202580718336 - assertWriteVarint( - bytes(0x80, 0xe6, 0xeb, 0x9c, 0xc3, 0xc9, 0xa4, 0x49), - (0x00 << 0) | (0x66 << 7) | (0x6b << 14) | (0x1c << 21) | - (0x43L << 28) | (0x49L << 35) | (0x24L << 42) | (0x49L << 49)); - // 11964378330978735131 - assertWriteVarint( - bytes(0x9b, 0xa8, 0xf9, 0xc2, 0xbb, 0xd6, 0x80, 0x85, 0xa6, 0x01), - (0x1b << 0) | (0x28 << 7) | (0x79 << 14) | (0x42 << 21) | - (0x3bL << 28) | (0x56L << 35) | (0x00L << 42) | - (0x05L << 49) | (0x26L << 56) | (0x01L << 63)); - } - - /** - * Parses the given bytes using writeRawLittleEndian32() and checks - * that the result matches the given value. - */ - private void assertWriteLittleEndian32(byte[] data, int value) - throws Exception { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - output.writeRawLittleEndian32(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - rawOutput = new ByteArrayOutputStream(); - output = CodedOutputStream.newInstance(rawOutput, blockSize); - output.writeRawLittleEndian32(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - } - } - - /** - * Parses the given bytes using writeRawLittleEndian64() and checks - * that the result matches the given value. - */ - private void assertWriteLittleEndian64(byte[] data, long value) - throws Exception { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = CodedOutputStream.newInstance(rawOutput); - output.writeRawLittleEndian64(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - - // Try different block sizes. - for (int blockSize = 1; blockSize <= 16; blockSize *= 2) { - rawOutput = new ByteArrayOutputStream(); - output = CodedOutputStream.newInstance(rawOutput, blockSize); - output.writeRawLittleEndian64(value); - output.flush(); - assertEqualBytes(data, rawOutput.toByteArray()); - } - } - - /** Tests writeRawLittleEndian32() and writeRawLittleEndian64(). */ - public void testWriteLittleEndian() throws Exception { - assertWriteLittleEndian32(bytes(0x78, 0x56, 0x34, 0x12), 0x12345678); - assertWriteLittleEndian32(bytes(0xf0, 0xde, 0xbc, 0x9a), 0x9abcdef0); - - assertWriteLittleEndian64( - bytes(0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12), - 0x123456789abcdef0L); - assertWriteLittleEndian64( - bytes(0x78, 0x56, 0x34, 0x12, 0xf0, 0xde, 0xbc, 0x9a), - 0x9abcdef012345678L); - } - - /** Test encodeZigZag32() and encodeZigZag64(). */ - public void testEncodeZigZag() throws Exception { - assertEquals(0, CodedOutputStream.encodeZigZag32( 0)); - assertEquals(1, CodedOutputStream.encodeZigZag32(-1)); - assertEquals(2, CodedOutputStream.encodeZigZag32( 1)); - assertEquals(3, CodedOutputStream.encodeZigZag32(-2)); - assertEquals(0x7FFFFFFE, CodedOutputStream.encodeZigZag32(0x3FFFFFFF)); - assertEquals(0x7FFFFFFF, CodedOutputStream.encodeZigZag32(0xC0000000)); - assertEquals(0xFFFFFFFE, CodedOutputStream.encodeZigZag32(0x7FFFFFFF)); - assertEquals(0xFFFFFFFF, CodedOutputStream.encodeZigZag32(0x80000000)); - - assertEquals(0, CodedOutputStream.encodeZigZag64( 0)); - assertEquals(1, CodedOutputStream.encodeZigZag64(-1)); - assertEquals(2, CodedOutputStream.encodeZigZag64( 1)); - assertEquals(3, CodedOutputStream.encodeZigZag64(-2)); - assertEquals(0x000000007FFFFFFEL, - CodedOutputStream.encodeZigZag64(0x000000003FFFFFFFL)); - assertEquals(0x000000007FFFFFFFL, - CodedOutputStream.encodeZigZag64(0xFFFFFFFFC0000000L)); - assertEquals(0x00000000FFFFFFFEL, - CodedOutputStream.encodeZigZag64(0x000000007FFFFFFFL)); - assertEquals(0x00000000FFFFFFFFL, - CodedOutputStream.encodeZigZag64(0xFFFFFFFF80000000L)); - assertEquals(0xFFFFFFFFFFFFFFFEL, - CodedOutputStream.encodeZigZag64(0x7FFFFFFFFFFFFFFFL)); - assertEquals(0xFFFFFFFFFFFFFFFFL, - CodedOutputStream.encodeZigZag64(0x8000000000000000L)); - - // Some easier-to-verify round-trip tests. The inputs (other than 0, 1, -1) - // were chosen semi-randomly via keyboard bashing. - assertEquals(0, - CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(0))); - assertEquals(1, - CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(1))); - assertEquals(-1, - CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(-1))); - assertEquals(14927, - CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(14927))); - assertEquals(-3612, - CodedOutputStream.encodeZigZag32(CodedInputStream.decodeZigZag32(-3612))); - - assertEquals(0, - CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(0))); - assertEquals(1, - CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(1))); - assertEquals(-1, - CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(-1))); - assertEquals(14927, - CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(14927))); - assertEquals(-3612, - CodedOutputStream.encodeZigZag64(CodedInputStream.decodeZigZag64(-3612))); - - assertEquals(856912304801416L, - CodedOutputStream.encodeZigZag64( - CodedInputStream.decodeZigZag64( - 856912304801416L))); - assertEquals(-75123905439571256L, - CodedOutputStream.encodeZigZag64( - CodedInputStream.decodeZigZag64( - -75123905439571256L))); - } - - /** Tests writing a whole message with every field type. */ - public void testWriteWholeMessage() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - - byte[] rawBytes = message.toByteArray(); - assertEqualBytes(TestUtil.getGoldenMessage().toByteArray(), rawBytes); - - // Try different block sizes. - for (int blockSize = 1; blockSize < 256; blockSize *= 2) { - ByteArrayOutputStream rawOutput = new ByteArrayOutputStream(); - CodedOutputStream output = - CodedOutputStream.newInstance(rawOutput, blockSize); - message.writeTo(output); - output.flush(); - assertEqualBytes(rawBytes, rawOutput.toByteArray()); - } - } - - /** Tests writing a whole message with every packed field type. Ensures the - * wire format of packed fields is compatible with C++. */ - public void testWriteWholePackedFieldsMessage() throws Exception { - TestPackedTypes message = TestUtil.getPackedSet(); - - byte[] rawBytes = message.toByteArray(); - assertEqualBytes(TestUtil.getGoldenPackedFieldsMessage().toByteArray(), - rawBytes); - } - - /** Test writing a message containing a negative enum value. This used to - * fail because the size was not properly computed as a sign-extended varint. */ - public void testWriteMessageWithNegativeEnumValue() throws Exception { - protobuf_unittest.UnittestProto.SparseEnumMessage message = - protobuf_unittest.UnittestProto.SparseEnumMessage.newBuilder() - .setSparseEnum(protobuf_unittest.UnittestProto.TestSparseEnum.SPARSE_E) - .build(); - assertTrue(message.getSparseEnum().getNumber() < 0); - byte[] rawBytes = message.toByteArray(); - protobuf_unittest.UnittestProto.SparseEnumMessage message2 = - protobuf_unittest.UnittestProto.SparseEnumMessage.parseFrom(rawBytes); - assertEquals(protobuf_unittest.UnittestProto.TestSparseEnum.SPARSE_E, - message2.getSparseEnum()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java deleted file mode 100644 index 1f8bb445..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestDeprecatedFields; - -import junit.framework.TestCase; - -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Method; -/** - * Test field deprecation - * - * @author birdo@google.com (Roberto Scaramuzzi) - */ -public class DeprecatedFieldTest extends TestCase { - private String[] deprecatedGetterNames = { - "hasDeprecatedInt32", - "getDeprecatedInt32"}; - - private String[] deprecatedBuilderGetterNames = { - "hasDeprecatedInt32", - "getDeprecatedInt32", - "clearDeprecatedInt32"}; - - private String[] deprecatedBuilderSetterNames = { - "setDeprecatedInt32"}; - - public void testDeprecatedField() throws Exception { - Class deprecatedFields = TestDeprecatedFields.class; - Class deprecatedFieldsBuilder = TestDeprecatedFields.Builder.class; - for (String name : deprecatedGetterNames) { - Method method = deprecatedFields.getMethod(name); - assertTrue("Method " + name + " should be deprecated", - isDeprecated(method)); - } - for (String name : deprecatedBuilderGetterNames) { - Method method = deprecatedFieldsBuilder.getMethod(name); - assertTrue("Method " + name + " should be deprecated", - isDeprecated(method)); - } - for (String name : deprecatedBuilderSetterNames) { - Method method = deprecatedFieldsBuilder.getMethod(name, int.class); - assertTrue("Method " + name + " should be deprecated", - isDeprecated(method)); - } - } - - private boolean isDeprecated(AnnotatedElement annotated) { - return annotated.isAnnotationPresent(Deprecated.class); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java deleted file mode 100644 index 65d06e32..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java +++ /dev/null @@ -1,460 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.DescriptorProtos.DescriptorProto; -import com.google.protobuf.DescriptorProtos.FieldDescriptorProto; -import com.google.protobuf.DescriptorProtos.FileDescriptorProto; -import com.google.protobuf.Descriptors.DescriptorValidationException; -import com.google.protobuf.Descriptors.FileDescriptor; -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.Descriptors.EnumDescriptor; -import com.google.protobuf.Descriptors.EnumValueDescriptor; -import com.google.protobuf.Descriptors.ServiceDescriptor; -import com.google.protobuf.Descriptors.MethodDescriptor; - -import com.google.protobuf.test.UnittestImport; -import com.google.protobuf.test.UnittestImport.ImportEnum; -import com.google.protobuf.test.UnittestImport.ImportMessage; -import protobuf_unittest.UnittestProto; -import protobuf_unittest.UnittestProto.ForeignEnum; -import protobuf_unittest.UnittestProto.ForeignMessage; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestExtremeDefaultValues; -import protobuf_unittest.UnittestProto.TestRequired; -import protobuf_unittest.UnittestProto.TestService; -import protobuf_unittest.UnittestCustomOptions; - - -import junit.framework.TestCase; - -import java.util.Arrays; -import java.util.Collections; - -/** - * Unit test for {@link Descriptors}. - * - * @author kenton@google.com Kenton Varda - */ -public class DescriptorsTest extends TestCase { - - // Regression test for bug where referencing a FieldDescriptor.Type value - // before a FieldDescriptorProto.Type value would yield a - // ExceptionInInitializerError. - @SuppressWarnings("unused") - private static final Object STATIC_INIT_TEST = FieldDescriptor.Type.BOOL; - - public void testFieldTypeEnumMapping() throws Exception { - assertEquals(FieldDescriptor.Type.values().length, - FieldDescriptorProto.Type.values().length); - for (FieldDescriptor.Type type : FieldDescriptor.Type.values()) { - FieldDescriptorProto.Type protoType = type.toProto(); - assertEquals("TYPE_" + type.name(), protoType.name()); - assertEquals(type, FieldDescriptor.Type.valueOf(protoType)); - } - } - - public void testFileDescriptor() throws Exception { - FileDescriptor file = UnittestProto.getDescriptor(); - - assertEquals("google/protobuf/unittest.proto", file.getName()); - assertEquals("protobuf_unittest", file.getPackage()); - - assertEquals("UnittestProto", file.getOptions().getJavaOuterClassname()); - assertEquals("google/protobuf/unittest.proto", - file.toProto().getName()); - - assertEquals(Arrays.asList(UnittestImport.getDescriptor()), - file.getDependencies()); - - Descriptor messageType = TestAllTypes.getDescriptor(); - assertEquals(messageType, file.getMessageTypes().get(0)); - assertEquals(messageType, file.findMessageTypeByName("TestAllTypes")); - assertNull(file.findMessageTypeByName("NoSuchType")); - assertNull(file.findMessageTypeByName("protobuf_unittest.TestAllTypes")); - for (int i = 0; i < file.getMessageTypes().size(); i++) { - assertEquals(i, file.getMessageTypes().get(i).getIndex()); - } - - EnumDescriptor enumType = ForeignEnum.getDescriptor(); - assertEquals(enumType, file.getEnumTypes().get(0)); - assertEquals(enumType, file.findEnumTypeByName("ForeignEnum")); - assertNull(file.findEnumTypeByName("NoSuchType")); - assertNull(file.findEnumTypeByName("protobuf_unittest.ForeignEnum")); - assertEquals(Arrays.asList(ImportEnum.getDescriptor()), - UnittestImport.getDescriptor().getEnumTypes()); - for (int i = 0; i < file.getEnumTypes().size(); i++) { - assertEquals(i, file.getEnumTypes().get(i).getIndex()); - } - - ServiceDescriptor service = TestService.getDescriptor(); - assertEquals(service, file.getServices().get(0)); - assertEquals(service, file.findServiceByName("TestService")); - assertNull(file.findServiceByName("NoSuchType")); - assertNull(file.findServiceByName("protobuf_unittest.TestService")); - assertEquals(Collections.emptyList(), - UnittestImport.getDescriptor().getServices()); - for (int i = 0; i < file.getServices().size(); i++) { - assertEquals(i, file.getServices().get(i).getIndex()); - } - - FieldDescriptor extension = - UnittestProto.optionalInt32Extension.getDescriptor(); - assertEquals(extension, file.getExtensions().get(0)); - assertEquals(extension, - file.findExtensionByName("optional_int32_extension")); - assertNull(file.findExtensionByName("no_such_ext")); - assertNull(file.findExtensionByName( - "protobuf_unittest.optional_int32_extension")); - assertEquals(Collections.emptyList(), - UnittestImport.getDescriptor().getExtensions()); - for (int i = 0; i < file.getExtensions().size(); i++) { - assertEquals(i, file.getExtensions().get(i).getIndex()); - } - } - - public void testDescriptor() throws Exception { - Descriptor messageType = TestAllTypes.getDescriptor(); - Descriptor nestedType = TestAllTypes.NestedMessage.getDescriptor(); - - assertEquals("TestAllTypes", messageType.getName()); - assertEquals("protobuf_unittest.TestAllTypes", messageType.getFullName()); - assertEquals(UnittestProto.getDescriptor(), messageType.getFile()); - assertNull(messageType.getContainingType()); - assertEquals(DescriptorProtos.MessageOptions.getDefaultInstance(), - messageType.getOptions()); - assertEquals("TestAllTypes", messageType.toProto().getName()); - - assertEquals("NestedMessage", nestedType.getName()); - assertEquals("protobuf_unittest.TestAllTypes.NestedMessage", - nestedType.getFullName()); - assertEquals(UnittestProto.getDescriptor(), nestedType.getFile()); - assertEquals(messageType, nestedType.getContainingType()); - - FieldDescriptor field = messageType.getFields().get(0); - assertEquals("optional_int32", field.getName()); - assertEquals(field, messageType.findFieldByName("optional_int32")); - assertNull(messageType.findFieldByName("no_such_field")); - assertEquals(field, messageType.findFieldByNumber(1)); - assertNull(messageType.findFieldByNumber(571283)); - for (int i = 0; i < messageType.getFields().size(); i++) { - assertEquals(i, messageType.getFields().get(i).getIndex()); - } - - assertEquals(nestedType, messageType.getNestedTypes().get(0)); - assertEquals(nestedType, messageType.findNestedTypeByName("NestedMessage")); - assertNull(messageType.findNestedTypeByName("NoSuchType")); - for (int i = 0; i < messageType.getNestedTypes().size(); i++) { - assertEquals(i, messageType.getNestedTypes().get(i).getIndex()); - } - - EnumDescriptor enumType = TestAllTypes.NestedEnum.getDescriptor(); - assertEquals(enumType, messageType.getEnumTypes().get(0)); - assertEquals(enumType, messageType.findEnumTypeByName("NestedEnum")); - assertNull(messageType.findEnumTypeByName("NoSuchType")); - for (int i = 0; i < messageType.getEnumTypes().size(); i++) { - assertEquals(i, messageType.getEnumTypes().get(i).getIndex()); - } - } - - public void testFieldDescriptor() throws Exception { - Descriptor messageType = TestAllTypes.getDescriptor(); - FieldDescriptor primitiveField = - messageType.findFieldByName("optional_int32"); - FieldDescriptor enumField = - messageType.findFieldByName("optional_nested_enum"); - FieldDescriptor messageField = - messageType.findFieldByName("optional_foreign_message"); - FieldDescriptor cordField = - messageType.findFieldByName("optional_cord"); - FieldDescriptor extension = - UnittestProto.optionalInt32Extension.getDescriptor(); - FieldDescriptor nestedExtension = TestRequired.single.getDescriptor(); - - assertEquals("optional_int32", primitiveField.getName()); - assertEquals("protobuf_unittest.TestAllTypes.optional_int32", - primitiveField.getFullName()); - assertEquals(1, primitiveField.getNumber()); - assertEquals(messageType, primitiveField.getContainingType()); - assertEquals(UnittestProto.getDescriptor(), primitiveField.getFile()); - assertEquals(FieldDescriptor.Type.INT32, primitiveField.getType()); - assertEquals(FieldDescriptor.JavaType.INT, primitiveField.getJavaType()); - assertEquals(DescriptorProtos.FieldOptions.getDefaultInstance(), - primitiveField.getOptions()); - assertFalse(primitiveField.isExtension()); - assertEquals("optional_int32", primitiveField.toProto().getName()); - - assertEquals("optional_nested_enum", enumField.getName()); - assertEquals(FieldDescriptor.Type.ENUM, enumField.getType()); - assertEquals(FieldDescriptor.JavaType.ENUM, enumField.getJavaType()); - assertEquals(TestAllTypes.NestedEnum.getDescriptor(), - enumField.getEnumType()); - - assertEquals("optional_foreign_message", messageField.getName()); - assertEquals(FieldDescriptor.Type.MESSAGE, messageField.getType()); - assertEquals(FieldDescriptor.JavaType.MESSAGE, messageField.getJavaType()); - assertEquals(ForeignMessage.getDescriptor(), messageField.getMessageType()); - - assertEquals("optional_cord", cordField.getName()); - assertEquals(FieldDescriptor.Type.STRING, cordField.getType()); - assertEquals(FieldDescriptor.JavaType.STRING, cordField.getJavaType()); - assertEquals(DescriptorProtos.FieldOptions.CType.CORD, - cordField.getOptions().getCtype()); - - assertEquals("optional_int32_extension", extension.getName()); - assertEquals("protobuf_unittest.optional_int32_extension", - extension.getFullName()); - assertEquals(1, extension.getNumber()); - assertEquals(TestAllExtensions.getDescriptor(), - extension.getContainingType()); - assertEquals(UnittestProto.getDescriptor(), extension.getFile()); - assertEquals(FieldDescriptor.Type.INT32, extension.getType()); - assertEquals(FieldDescriptor.JavaType.INT, extension.getJavaType()); - assertEquals(DescriptorProtos.FieldOptions.getDefaultInstance(), - extension.getOptions()); - assertTrue(extension.isExtension()); - assertEquals(null, extension.getExtensionScope()); - assertEquals("optional_int32_extension", extension.toProto().getName()); - - assertEquals("single", nestedExtension.getName()); - assertEquals("protobuf_unittest.TestRequired.single", - nestedExtension.getFullName()); - assertEquals(TestRequired.getDescriptor(), - nestedExtension.getExtensionScope()); - } - - public void testFieldDescriptorLabel() throws Exception { - FieldDescriptor requiredField = - TestRequired.getDescriptor().findFieldByName("a"); - FieldDescriptor optionalField = - TestAllTypes.getDescriptor().findFieldByName("optional_int32"); - FieldDescriptor repeatedField = - TestAllTypes.getDescriptor().findFieldByName("repeated_int32"); - - assertTrue(requiredField.isRequired()); - assertFalse(requiredField.isRepeated()); - assertFalse(optionalField.isRequired()); - assertFalse(optionalField.isRepeated()); - assertFalse(repeatedField.isRequired()); - assertTrue(repeatedField.isRepeated()); - } - - public void testFieldDescriptorDefault() throws Exception { - Descriptor d = TestAllTypes.getDescriptor(); - assertFalse(d.findFieldByName("optional_int32").hasDefaultValue()); - assertEquals(0, d.findFieldByName("optional_int32").getDefaultValue()); - assertTrue(d.findFieldByName("default_int32").hasDefaultValue()); - assertEquals(41, d.findFieldByName("default_int32").getDefaultValue()); - - d = TestExtremeDefaultValues.getDescriptor(); - assertEquals( - ByteString.copyFrom( - "\0\001\007\b\f\n\r\t\013\\\'\"\u00fe".getBytes("ISO-8859-1")), - d.findFieldByName("escaped_bytes").getDefaultValue()); - assertEquals(-1, d.findFieldByName("large_uint32").getDefaultValue()); - assertEquals(-1L, d.findFieldByName("large_uint64").getDefaultValue()); - } - - public void testEnumDescriptor() throws Exception { - EnumDescriptor enumType = ForeignEnum.getDescriptor(); - EnumDescriptor nestedType = TestAllTypes.NestedEnum.getDescriptor(); - - assertEquals("ForeignEnum", enumType.getName()); - assertEquals("protobuf_unittest.ForeignEnum", enumType.getFullName()); - assertEquals(UnittestProto.getDescriptor(), enumType.getFile()); - assertNull(enumType.getContainingType()); - assertEquals(DescriptorProtos.EnumOptions.getDefaultInstance(), - enumType.getOptions()); - - assertEquals("NestedEnum", nestedType.getName()); - assertEquals("protobuf_unittest.TestAllTypes.NestedEnum", - nestedType.getFullName()); - assertEquals(UnittestProto.getDescriptor(), nestedType.getFile()); - assertEquals(TestAllTypes.getDescriptor(), nestedType.getContainingType()); - - EnumValueDescriptor value = ForeignEnum.FOREIGN_FOO.getValueDescriptor(); - assertEquals(value, enumType.getValues().get(0)); - assertEquals("FOREIGN_FOO", value.getName()); - assertEquals(4, value.getNumber()); - assertEquals(value, enumType.findValueByName("FOREIGN_FOO")); - assertEquals(value, enumType.findValueByNumber(4)); - assertNull(enumType.findValueByName("NO_SUCH_VALUE")); - for (int i = 0; i < enumType.getValues().size(); i++) { - assertEquals(i, enumType.getValues().get(i).getIndex()); - } - } - - public void testServiceDescriptor() throws Exception { - ServiceDescriptor service = TestService.getDescriptor(); - - assertEquals("TestService", service.getName()); - assertEquals("protobuf_unittest.TestService", service.getFullName()); - assertEquals(UnittestProto.getDescriptor(), service.getFile()); - - assertEquals(2, service.getMethods().size()); - - MethodDescriptor fooMethod = service.getMethods().get(0); - assertEquals("Foo", fooMethod.getName()); - assertEquals(UnittestProto.FooRequest.getDescriptor(), - fooMethod.getInputType()); - assertEquals(UnittestProto.FooResponse.getDescriptor(), - fooMethod.getOutputType()); - assertEquals(fooMethod, service.findMethodByName("Foo")); - - MethodDescriptor barMethod = service.getMethods().get(1); - assertEquals("Bar", barMethod.getName()); - assertEquals(UnittestProto.BarRequest.getDescriptor(), - barMethod.getInputType()); - assertEquals(UnittestProto.BarResponse.getDescriptor(), - barMethod.getOutputType()); - assertEquals(barMethod, service.findMethodByName("Bar")); - - assertNull(service.findMethodByName("NoSuchMethod")); - - for (int i = 0; i < service.getMethods().size(); i++) { - assertEquals(i, service.getMethods().get(i).getIndex()); - } - } - - - public void testCustomOptions() throws Exception { - Descriptor descriptor = - UnittestCustomOptions.TestMessageWithCustomOptions.getDescriptor(); - - assertTrue( - descriptor.getOptions().hasExtension(UnittestCustomOptions.messageOpt1)); - assertEquals(Integer.valueOf(-56), - descriptor.getOptions().getExtension(UnittestCustomOptions.messageOpt1)); - - FieldDescriptor field = descriptor.findFieldByName("field1"); - assertNotNull(field); - - assertTrue( - field.getOptions().hasExtension(UnittestCustomOptions.fieldOpt1)); - assertEquals(Long.valueOf(8765432109L), - field.getOptions().getExtension(UnittestCustomOptions.fieldOpt1)); - - EnumDescriptor enumType = - UnittestCustomOptions.TestMessageWithCustomOptions.AnEnum.getDescriptor(); - - assertTrue( - enumType.getOptions().hasExtension(UnittestCustomOptions.enumOpt1)); - assertEquals(Integer.valueOf(-789), - enumType.getOptions().getExtension(UnittestCustomOptions.enumOpt1)); - - ServiceDescriptor service = - UnittestCustomOptions.TestServiceWithCustomOptions.getDescriptor(); - - assertTrue( - service.getOptions().hasExtension(UnittestCustomOptions.serviceOpt1)); - assertEquals(Long.valueOf(-9876543210L), - service.getOptions().getExtension(UnittestCustomOptions.serviceOpt1)); - - MethodDescriptor method = service.findMethodByName("Foo"); - assertNotNull(method); - - assertTrue( - method.getOptions().hasExtension(UnittestCustomOptions.methodOpt1)); - assertEquals(UnittestCustomOptions.MethodOpt1.METHODOPT1_VAL2, - method.getOptions().getExtension(UnittestCustomOptions.methodOpt1)); - } - - /** - * Test that the FieldDescriptor.Type enum is the same as the - * WireFormat.FieldType enum. - */ - public void testFieldTypeTablesMatch() throws Exception { - FieldDescriptor.Type[] values1 = FieldDescriptor.Type.values(); - WireFormat.FieldType[] values2 = WireFormat.FieldType.values(); - - assertEquals(values1.length, values2.length); - - for (int i = 0; i < values1.length; i++) { - assertEquals(values1[i].toString(), values2[i].toString()); - } - } - - /** - * Test that the FieldDescriptor.JavaType enum is the same as the - * WireFormat.JavaType enum. - */ - public void testJavaTypeTablesMatch() throws Exception { - FieldDescriptor.JavaType[] values1 = FieldDescriptor.JavaType.values(); - WireFormat.JavaType[] values2 = WireFormat.JavaType.values(); - - assertEquals(values1.length, values2.length); - - for (int i = 0; i < values1.length; i++) { - assertEquals(values1[i].toString(), values2[i].toString()); - } - } - - public void testEnormousDescriptor() throws Exception { - // The descriptor for this file is larger than 64k, yet it did not cause - // a compiler error due to an over-long string literal. - assertTrue( - UnittestEnormousDescriptor.getDescriptor() - .toProto().getSerializedSize() > 65536); - } - - /** - * Tests that the DescriptorValidationException works as intended. - */ - public void testDescriptorValidatorException() throws Exception { - FileDescriptorProto fileDescriptorProto = FileDescriptorProto.newBuilder() - .setName("foo.proto") - .addMessageType(DescriptorProto.newBuilder() - .setName("Foo") - .addField(FieldDescriptorProto.newBuilder() - .setLabel(FieldDescriptorProto.Label.LABEL_OPTIONAL) - .setType(FieldDescriptorProto.Type.TYPE_INT32) - .setName("foo") - .setNumber(1) - .setDefaultValue("invalid") - .build()) - .build()) - .build(); - try { - Descriptors.FileDescriptor.buildFrom(fileDescriptorProto, - new FileDescriptor[0]); - fail("DescriptorValidationException expected"); - } catch (DescriptorValidationException e) { - // Expected; check that the error message contains some useful hints - assertTrue(e.getMessage().indexOf("foo") != -1); - assertTrue(e.getMessage().indexOf("Foo") != -1); - assertTrue(e.getMessage().indexOf("invalid") != -1); - assertTrue(e.getCause() instanceof NumberFormatException); - assertTrue(e.getCause().getMessage().indexOf("invalid") != -1); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java deleted file mode 100644 index aabccda2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java +++ /dev/null @@ -1,226 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestPackedTypes; - -import junit.framework.TestCase; -import java.util.Arrays; - -/** - * Unit test for {@link DynamicMessage}. See also {@link MessageTest}, which - * tests some {@link DynamicMessage} functionality. - * - * @author kenton@google.com Kenton Varda - */ -public class DynamicMessageTest extends TestCase { - TestUtil.ReflectionTester reflectionTester = - new TestUtil.ReflectionTester(TestAllTypes.getDescriptor(), null); - - TestUtil.ReflectionTester extensionsReflectionTester = - new TestUtil.ReflectionTester(TestAllExtensions.getDescriptor(), - TestUtil.getExtensionRegistry()); - TestUtil.ReflectionTester packedReflectionTester = - new TestUtil.ReflectionTester(TestPackedTypes.getDescriptor(), null); - - public void testDynamicMessageAccessors() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.setAllFieldsViaReflection(builder); - Message message = builder.build(); - reflectionTester.assertAllFieldsSetViaReflection(message); - } - - public void testDoubleBuildError() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - builder.build(); - try { - builder.build(); - fail("Should have thrown exception."); - } catch (IllegalStateException e) { - // Success. - } - } - - public void testClearAfterBuildError() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - builder.build(); - try { - builder.clear(); - fail("Should have thrown exception."); - } catch (IllegalStateException e) { - // Success. - } - } - - public void testDynamicMessageSettersRejectNull() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.assertReflectionSettersRejectNull(builder); - } - - public void testDynamicMessageExtensionAccessors() throws Exception { - // We don't need to extensively test DynamicMessage's handling of - // extensions because, frankly, it doesn't do anything special with them. - // It treats them just like any other fields. - Message.Builder builder = - DynamicMessage.newBuilder(TestAllExtensions.getDescriptor()); - extensionsReflectionTester.setAllFieldsViaReflection(builder); - Message message = builder.build(); - extensionsReflectionTester.assertAllFieldsSetViaReflection(message); - } - - public void testDynamicMessageExtensionSettersRejectNull() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllExtensions.getDescriptor()); - extensionsReflectionTester.assertReflectionSettersRejectNull(builder); - } - - public void testDynamicMessageRepeatedSetters() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.setAllFieldsViaReflection(builder); - reflectionTester.modifyRepeatedFieldsViaReflection(builder); - Message message = builder.build(); - reflectionTester.assertRepeatedFieldsModifiedViaReflection(message); - } - - public void testDynamicMessageRepeatedSettersRejectNull() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.assertReflectionRepeatedSettersRejectNull(builder); - } - - public void testDynamicMessageDefaults() throws Exception { - reflectionTester.assertClearViaReflection( - DynamicMessage.getDefaultInstance(TestAllTypes.getDescriptor())); - reflectionTester.assertClearViaReflection( - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()).build()); - } - - public void testDynamicMessageSerializedSize() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - - Message.Builder dynamicBuilder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.setAllFieldsViaReflection(dynamicBuilder); - Message dynamicMessage = dynamicBuilder.build(); - - assertEquals(message.getSerializedSize(), - dynamicMessage.getSerializedSize()); - } - - public void testDynamicMessageSerialization() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.setAllFieldsViaReflection(builder); - Message message = builder.build(); - - ByteString rawBytes = message.toByteString(); - TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); - - TestUtil.assertAllFieldsSet(message2); - - // In fact, the serialized forms should be exactly the same, byte-for-byte. - assertEquals(TestUtil.getAllSet().toByteString(), rawBytes); - } - - public void testDynamicMessageParsing() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestAllTypes message = builder.build(); - - ByteString rawBytes = message.toByteString(); - - Message message2 = - DynamicMessage.parseFrom(TestAllTypes.getDescriptor(), rawBytes); - reflectionTester.assertAllFieldsSetViaReflection(message2); - } - - public void testDynamicMessagePackedSerialization() throws Exception { - Message.Builder builder = - DynamicMessage.newBuilder(TestPackedTypes.getDescriptor()); - packedReflectionTester.setPackedFieldsViaReflection(builder); - Message message = builder.build(); - - ByteString rawBytes = message.toByteString(); - TestPackedTypes message2 = TestPackedTypes.parseFrom(rawBytes); - - TestUtil.assertPackedFieldsSet(message2); - - // In fact, the serialized forms should be exactly the same, byte-for-byte. - assertEquals(TestUtil.getPackedSet().toByteString(), rawBytes); - } - - public void testDynamicMessagePackedParsing() throws Exception { - TestPackedTypes.Builder builder = TestPackedTypes.newBuilder(); - TestUtil.setPackedFields(builder); - TestPackedTypes message = builder.build(); - - ByteString rawBytes = message.toByteString(); - - Message message2 = - DynamicMessage.parseFrom(TestPackedTypes.getDescriptor(), rawBytes); - packedReflectionTester.assertPackedFieldsSetViaReflection(message2); - } - - public void testDynamicMessageCopy() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestAllTypes message = builder.build(); - - DynamicMessage copy = DynamicMessage.newBuilder(message).build(); - reflectionTester.assertAllFieldsSetViaReflection(copy); - } - - public void testToBuilder() throws Exception { - DynamicMessage.Builder builder = - DynamicMessage.newBuilder(TestAllTypes.getDescriptor()); - reflectionTester.setAllFieldsViaReflection(builder); - int unknownFieldNum = 9; - long unknownFieldVal = 90; - builder.setUnknownFields(UnknownFieldSet.newBuilder() - .addField(unknownFieldNum, - UnknownFieldSet.Field.newBuilder() - .addVarint(unknownFieldVal).build()) - .build()); - DynamicMessage message = builder.build(); - - DynamicMessage derived = message.toBuilder().build(); - reflectionTester.assertAllFieldsSetViaReflection(derived); - assertEquals(Arrays.asList(unknownFieldVal), - derived.getUnknownFields().getField(unknownFieldNum).getVarintList()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java deleted file mode 100644 index 108a28e1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -/** - * A prerun for a test suite that allows running the full protocol buffer - * tests in a mode that disables the optimization for not using - * {@link RepeatedFieldBuilder} and {@link SingleFieldBuilder} until they are - * requested. This allows us to run all the tests through both code paths - * and ensures that both code paths produce identical results. - * - * @author jonp@google.com (Jon Perlow) - */ -public class ForceFieldBuildersPreRun implements Runnable { - - @Override - public void run() { - GeneratedMessage.enableAlwaysUseFieldBuildersForTesting(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java deleted file mode 100644 index b9dd40bf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java +++ /dev/null @@ -1,974 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.UnittestLite.TestAllExtensionsLite; -import com.google.protobuf.test.UnittestImport; -import protobuf_unittest.EnumWithNoOuter; -import protobuf_unittest.MessageWithNoOuter; -import protobuf_unittest.MultipleFilesTestProto; -import protobuf_unittest.NestedExtension.MyNestedExtension; -import protobuf_unittest.NestedExtensionLite.MyNestedExtensionLite; -import protobuf_unittest.NonNestedExtension; -import protobuf_unittest.NonNestedExtension.MessageToBeExtended; -import protobuf_unittest.NonNestedExtension.MyNonNestedExtension; -import protobuf_unittest.NonNestedExtensionLite; -import protobuf_unittest.NonNestedExtensionLite.MessageLiteToBeExtended; -import protobuf_unittest.NonNestedExtensionLite.MyNonNestedExtensionLite; -import protobuf_unittest.ServiceWithNoOuter; -import protobuf_unittest.UnittestOptimizeFor.TestOptimizedForSize; -import protobuf_unittest.UnittestOptimizeFor.TestOptionalOptimizedForSize; -import protobuf_unittest.UnittestOptimizeFor.TestRequiredOptimizedForSize; -import protobuf_unittest.UnittestProto; -import protobuf_unittest.UnittestProto.ForeignEnum; -import protobuf_unittest.UnittestProto.ForeignMessage; -import protobuf_unittest.UnittestProto.ForeignMessageOrBuilder; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllTypesOrBuilder; -import protobuf_unittest.UnittestProto.TestExtremeDefaultValues; -import protobuf_unittest.UnittestProto.TestPackedTypes; -import protobuf_unittest.UnittestProto.TestUnpackedTypes; - -import junit.framework.TestCase; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - * Unit test for generated messages and generated code. See also - * {@link MessageTest}, which tests some generated message functionality. - * - * @author kenton@google.com Kenton Varda - */ -public class GeneratedMessageTest extends TestCase { - TestUtil.ReflectionTester reflectionTester = - new TestUtil.ReflectionTester(TestAllTypes.getDescriptor(), null); - - public void testDefaultInstance() throws Exception { - assertSame(TestAllTypes.getDefaultInstance(), - TestAllTypes.getDefaultInstance().getDefaultInstanceForType()); - assertSame(TestAllTypes.getDefaultInstance(), - TestAllTypes.newBuilder().getDefaultInstanceForType()); - } - - public void testMessageOrBuilder() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestAllTypes message = builder.build(); - TestUtil.assertAllFieldsSet(message); - } - - public void testUsingBuilderMultipleTimes() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - // primitive field scalar and repeated - builder.setOptionalSfixed64(100); - builder.addRepeatedInt32(100); - // enum field scalar and repeated - builder.setOptionalImportEnum(UnittestImport.ImportEnum.IMPORT_BAR); - builder.addRepeatedImportEnum(UnittestImport.ImportEnum.IMPORT_BAR); - // proto field scalar and repeated - builder.setOptionalForeignMessage(ForeignMessage.newBuilder().setC(1)); - builder.addRepeatedForeignMessage(ForeignMessage.newBuilder().setC(1)); - - TestAllTypes value1 = builder.build(); - - assertEquals(100, value1.getOptionalSfixed64()); - assertEquals(100, value1.getRepeatedInt32(0)); - assertEquals(UnittestImport.ImportEnum.IMPORT_BAR, - value1.getOptionalImportEnum()); - assertEquals(UnittestImport.ImportEnum.IMPORT_BAR, - value1.getRepeatedImportEnum(0)); - assertEquals(1, value1.getOptionalForeignMessage().getC()); - assertEquals(1, value1.getRepeatedForeignMessage(0).getC()); - - // Make sure that builder didn't update previously created values - builder.setOptionalSfixed64(200); - builder.setRepeatedInt32(0, 200); - builder.setOptionalImportEnum(UnittestImport.ImportEnum.IMPORT_FOO); - builder.setRepeatedImportEnum(0, UnittestImport.ImportEnum.IMPORT_FOO); - builder.setOptionalForeignMessage(ForeignMessage.newBuilder().setC(2)); - builder.setRepeatedForeignMessage(0, ForeignMessage.newBuilder().setC(2)); - - TestAllTypes value2 = builder.build(); - - // Make sure value1 didn't change. - assertEquals(100, value1.getOptionalSfixed64()); - assertEquals(100, value1.getRepeatedInt32(0)); - assertEquals(UnittestImport.ImportEnum.IMPORT_BAR, - value1.getOptionalImportEnum()); - assertEquals(UnittestImport.ImportEnum.IMPORT_BAR, - value1.getRepeatedImportEnum(0)); - assertEquals(1, value1.getOptionalForeignMessage().getC()); - assertEquals(1, value1.getRepeatedForeignMessage(0).getC()); - - // Make sure value2 is correct - assertEquals(200, value2.getOptionalSfixed64()); - assertEquals(200, value2.getRepeatedInt32(0)); - assertEquals(UnittestImport.ImportEnum.IMPORT_FOO, - value2.getOptionalImportEnum()); - assertEquals(UnittestImport.ImportEnum.IMPORT_FOO, - value2.getRepeatedImportEnum(0)); - assertEquals(2, value2.getOptionalForeignMessage().getC()); - assertEquals(2, value2.getRepeatedForeignMessage(0).getC()); - } - - public void testProtosShareRepeatedArraysIfDidntChange() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - builder.addRepeatedInt32(100); - builder.addRepeatedImportEnum(UnittestImport.ImportEnum.IMPORT_BAR); - builder.addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()); - - TestAllTypes value1 = builder.build(); - TestAllTypes value2 = value1.toBuilder().build(); - - assertSame(value1.getRepeatedInt32List(), value2.getRepeatedInt32List()); - assertSame(value1.getRepeatedImportEnumList(), - value2.getRepeatedImportEnumList()); - assertSame(value1.getRepeatedForeignMessageList(), - value2.getRepeatedForeignMessageList()); - } - - public void testRepeatedArraysAreImmutable() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - builder.addRepeatedInt32(100); - builder.addRepeatedImportEnum(UnittestImport.ImportEnum.IMPORT_BAR); - builder.addRepeatedForeignMessage(ForeignMessage.getDefaultInstance()); - assertIsUnmodifiable(builder.getRepeatedInt32List()); - assertIsUnmodifiable(builder.getRepeatedImportEnumList()); - assertIsUnmodifiable(builder.getRepeatedForeignMessageList()); - assertIsUnmodifiable(builder.getRepeatedFloatList()); - - - TestAllTypes value = builder.build(); - assertIsUnmodifiable(value.getRepeatedInt32List()); - assertIsUnmodifiable(value.getRepeatedImportEnumList()); - assertIsUnmodifiable(value.getRepeatedForeignMessageList()); - assertIsUnmodifiable(value.getRepeatedFloatList()); - } - - private void assertIsUnmodifiable(List list) { - if (list == Collections.emptyList()) { - // OKAY -- Need to check this b/c EmptyList allows you to call clear. - } else { - try { - list.clear(); - fail("List wasn't immutable"); - } catch (UnsupportedOperationException e) { - // good - } - } - } - - public void testSettersRejectNull() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - try { - builder.setOptionalString(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setOptionalBytes(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setOptionalNestedMessage((TestAllTypes.NestedMessage) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setOptionalNestedMessage( - (TestAllTypes.NestedMessage.Builder) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setOptionalNestedEnum(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedString(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedBytes(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedNestedMessage((TestAllTypes.NestedMessage) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedNestedMessage( - (TestAllTypes.NestedMessage.Builder) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedNestedEnum(null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - } - - public void testRepeatedSetters() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestUtil.modifyRepeatedFields(builder); - TestAllTypes message = builder.build(); - TestUtil.assertRepeatedFieldsModified(message); - } - - public void testRepeatedSettersRejectNull() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - - builder.addRepeatedString("one"); - builder.addRepeatedString("two"); - try { - builder.setRepeatedString(1, null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedBytes(TestUtil.toBytes("one")); - builder.addRepeatedBytes(TestUtil.toBytes("two")); - try { - builder.setRepeatedBytes(1, null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedNestedMessage( - TestAllTypes.NestedMessage.newBuilder().setBb(218).build()); - builder.addRepeatedNestedMessage( - TestAllTypes.NestedMessage.newBuilder().setBb(456).build()); - try { - builder.setRepeatedNestedMessage(1, (TestAllTypes.NestedMessage) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setRepeatedNestedMessage( - 1, (TestAllTypes.NestedMessage.Builder) null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedNestedEnum(TestAllTypes.NestedEnum.FOO); - builder.addRepeatedNestedEnum(TestAllTypes.NestedEnum.BAR); - try { - builder.setRepeatedNestedEnum(1, null); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - } - - public void testRepeatedAppend() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - - builder.addAllRepeatedInt32(Arrays.asList(1, 2, 3, 4)); - builder.addAllRepeatedForeignEnum(Arrays.asList(ForeignEnum.FOREIGN_BAZ)); - - ForeignMessage foreignMessage = - ForeignMessage.newBuilder().setC(12).build(); - builder.addAllRepeatedForeignMessage(Arrays.asList(foreignMessage)); - - TestAllTypes message = builder.build(); - assertEquals(message.getRepeatedInt32List(), Arrays.asList(1, 2, 3, 4)); - assertEquals(message.getRepeatedForeignEnumList(), - Arrays.asList(ForeignEnum.FOREIGN_BAZ)); - assertEquals(1, message.getRepeatedForeignMessageCount()); - assertEquals(12, message.getRepeatedForeignMessage(0).getC()); - } - - public void testRepeatedAppendRejectsNull() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - - ForeignMessage foreignMessage = - ForeignMessage.newBuilder().setC(12).build(); - try { - builder.addAllRepeatedForeignMessage( - Arrays.asList(foreignMessage, (ForeignMessage) null)); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - try { - builder.addAllRepeatedForeignEnum( - Arrays.asList(ForeignEnum.FOREIGN_BAZ, null)); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - try { - builder.addAllRepeatedString(Arrays.asList("one", null)); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - try { - builder.addAllRepeatedBytes(Arrays.asList(TestUtil.toBytes("one"), null)); - fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - } - - public void testSettingForeignMessageUsingBuilder() throws Exception { - TestAllTypes message = TestAllTypes.newBuilder() - // Pass builder for foreign message instance. - .setOptionalForeignMessage(ForeignMessage.newBuilder().setC(123)) - .build(); - TestAllTypes expectedMessage = TestAllTypes.newBuilder() - // Create expected version passing foreign message instance explicitly. - .setOptionalForeignMessage( - ForeignMessage.newBuilder().setC(123).build()) - .build(); - // TODO(ngd): Upgrade to using real #equals method once implemented - assertEquals(expectedMessage.toString(), message.toString()); - } - - public void testSettingRepeatedForeignMessageUsingBuilder() throws Exception { - TestAllTypes message = TestAllTypes.newBuilder() - // Pass builder for foreign message instance. - .addRepeatedForeignMessage(ForeignMessage.newBuilder().setC(456)) - .build(); - TestAllTypes expectedMessage = TestAllTypes.newBuilder() - // Create expected version passing foreign message instance explicitly. - .addRepeatedForeignMessage( - ForeignMessage.newBuilder().setC(456).build()) - .build(); - assertEquals(expectedMessage.toString(), message.toString()); - } - - public void testDefaults() throws Exception { - TestUtil.assertClear(TestAllTypes.getDefaultInstance()); - TestUtil.assertClear(TestAllTypes.newBuilder().build()); - - TestExtremeDefaultValues message = - TestExtremeDefaultValues.getDefaultInstance(); - assertEquals("\u1234", message.getUtf8String()); - assertEquals(Double.POSITIVE_INFINITY, message.getInfDouble()); - assertEquals(Double.NEGATIVE_INFINITY, message.getNegInfDouble()); - assertTrue(Double.isNaN(message.getNanDouble())); - assertEquals(Float.POSITIVE_INFINITY, message.getInfFloat()); - assertEquals(Float.NEGATIVE_INFINITY, message.getNegInfFloat()); - assertTrue(Float.isNaN(message.getNanFloat())); - assertEquals("? ? ?? ?? ??? ??/ ??-", message.getCppTrigraph()); - } - - public void testClear() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.assertClear(builder); - TestUtil.setAllFields(builder); - builder.clear(); - TestUtil.assertClear(builder); - } - - public void testReflectionGetters() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - reflectionTester.assertAllFieldsSetViaReflection(builder); - - TestAllTypes message = builder.build(); - reflectionTester.assertAllFieldsSetViaReflection(message); - } - - public void testReflectionSetters() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - reflectionTester.setAllFieldsViaReflection(builder); - TestUtil.assertAllFieldsSet(builder); - - TestAllTypes message = builder.build(); - TestUtil.assertAllFieldsSet(message); - } - - public void testReflectionSettersRejectNull() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - reflectionTester.assertReflectionSettersRejectNull(builder); - } - - public void testReflectionRepeatedSetters() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - reflectionTester.setAllFieldsViaReflection(builder); - reflectionTester.modifyRepeatedFieldsViaReflection(builder); - TestUtil.assertRepeatedFieldsModified(builder); - - TestAllTypes message = builder.build(); - TestUtil.assertRepeatedFieldsModified(message); - } - - public void testReflectionRepeatedSettersRejectNull() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - reflectionTester.assertReflectionRepeatedSettersRejectNull(builder); - } - - public void testReflectionDefaults() throws Exception { - reflectionTester.assertClearViaReflection( - TestAllTypes.getDefaultInstance()); - reflectionTester.assertClearViaReflection( - TestAllTypes.newBuilder().build()); - } - - public void testEnumInterface() throws Exception { - assertTrue(TestAllTypes.getDefaultInstance().getDefaultNestedEnum() - instanceof ProtocolMessageEnum); - } - - public void testEnumMap() throws Exception { - Internal.EnumLiteMap map = ForeignEnum.internalGetValueMap(); - - for (ForeignEnum value : ForeignEnum.values()) { - assertEquals(value, map.findValueByNumber(value.getNumber())); - } - - assertTrue(map.findValueByNumber(12345) == null); - } - - public void testParsePackedToUnpacked() throws Exception { - TestUnpackedTypes.Builder builder = TestUnpackedTypes.newBuilder(); - TestUnpackedTypes message = - builder.mergeFrom(TestUtil.getPackedSet().toByteString()).build(); - TestUtil.assertUnpackedFieldsSet(message); - } - - public void testParseUnpackedToPacked() throws Exception { - TestPackedTypes.Builder builder = TestPackedTypes.newBuilder(); - TestPackedTypes message = - builder.mergeFrom(TestUtil.getUnpackedSet().toByteString()).build(); - TestUtil.assertPackedFieldsSet(message); - } - - // ================================================================= - // Extensions. - - TestUtil.ReflectionTester extensionsReflectionTester = - new TestUtil.ReflectionTester(TestAllExtensions.getDescriptor(), - TestUtil.getExtensionRegistry()); - - public void testExtensionMessageOrBuilder() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - TestUtil.setAllExtensions(builder); - TestAllExtensions message = builder.build(); - TestUtil.assertAllExtensionsSet(message); - } - - public void testExtensionRepeatedSetters() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - TestUtil.setAllExtensions(builder); - TestUtil.modifyRepeatedExtensions(builder); - TestAllExtensions message = builder.build(); - TestUtil.assertRepeatedExtensionsModified(message); - } - - public void testExtensionDefaults() throws Exception { - TestUtil.assertExtensionsClear(TestAllExtensions.getDefaultInstance()); - TestUtil.assertExtensionsClear(TestAllExtensions.newBuilder().build()); - } - - public void testExtensionReflectionGetters() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - TestUtil.setAllExtensions(builder); - extensionsReflectionTester.assertAllFieldsSetViaReflection(builder); - - TestAllExtensions message = builder.build(); - extensionsReflectionTester.assertAllFieldsSetViaReflection(message); - } - - public void testExtensionReflectionSetters() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - extensionsReflectionTester.setAllFieldsViaReflection(builder); - TestUtil.assertAllExtensionsSet(builder); - - TestAllExtensions message = builder.build(); - TestUtil.assertAllExtensionsSet(message); - } - - public void testExtensionReflectionSettersRejectNull() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - extensionsReflectionTester.assertReflectionSettersRejectNull(builder); - } - - public void testExtensionReflectionRepeatedSetters() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - extensionsReflectionTester.setAllFieldsViaReflection(builder); - extensionsReflectionTester.modifyRepeatedFieldsViaReflection(builder); - TestUtil.assertRepeatedExtensionsModified(builder); - - TestAllExtensions message = builder.build(); - TestUtil.assertRepeatedExtensionsModified(message); - } - - public void testExtensionReflectionRepeatedSettersRejectNull() - throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - extensionsReflectionTester.assertReflectionRepeatedSettersRejectNull( - builder); - } - - public void testExtensionReflectionDefaults() throws Exception { - extensionsReflectionTester.assertClearViaReflection( - TestAllExtensions.getDefaultInstance()); - extensionsReflectionTester.assertClearViaReflection( - TestAllExtensions.newBuilder().build()); - } - - public void testClearExtension() throws Exception { - // clearExtension() is not actually used in TestUtil, so try it manually. - assertFalse( - TestAllExtensions.newBuilder() - .setExtension(UnittestProto.optionalInt32Extension, 1) - .clearExtension(UnittestProto.optionalInt32Extension) - .hasExtension(UnittestProto.optionalInt32Extension)); - assertEquals(0, - TestAllExtensions.newBuilder() - .addExtension(UnittestProto.repeatedInt32Extension, 1) - .clearExtension(UnittestProto.repeatedInt32Extension) - .getExtensionCount(UnittestProto.repeatedInt32Extension)); - } - - public void testExtensionCopy() throws Exception { - TestAllExtensions original = TestUtil.getAllExtensionsSet(); - TestAllExtensions copy = TestAllExtensions.newBuilder(original).build(); - TestUtil.assertAllExtensionsSet(copy); - } - - public void testExtensionMergeFrom() throws Exception { - TestAllExtensions original = - TestAllExtensions.newBuilder() - .setExtension(UnittestProto.optionalInt32Extension, 1).build(); - TestAllExtensions merged = - TestAllExtensions.newBuilder().mergeFrom(original).build(); - assertTrue(merged.hasExtension(UnittestProto.optionalInt32Extension)); - assertEquals( - 1, (int) merged.getExtension(UnittestProto.optionalInt32Extension)); - } - - // ================================================================= - // Lite Extensions. - - // We test lite extensions directly because they have a separate - // implementation from full extensions. In contrast, we do not test - // lite fields directly since they are implemented exactly the same as - // regular fields. - - public void testLiteExtensionMessageOrBuilder() throws Exception { - TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.newBuilder(); - TestUtil.setAllExtensions(builder); - TestUtil.assertAllExtensionsSet(builder); - - TestAllExtensionsLite message = builder.build(); - TestUtil.assertAllExtensionsSet(message); - } - - public void testLiteExtensionRepeatedSetters() throws Exception { - TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.newBuilder(); - TestUtil.setAllExtensions(builder); - TestUtil.modifyRepeatedExtensions(builder); - TestUtil.assertRepeatedExtensionsModified(builder); - - TestAllExtensionsLite message = builder.build(); - TestUtil.assertRepeatedExtensionsModified(message); - } - - public void testLiteExtensionDefaults() throws Exception { - TestUtil.assertExtensionsClear(TestAllExtensionsLite.getDefaultInstance()); - TestUtil.assertExtensionsClear(TestAllExtensionsLite.newBuilder().build()); - } - - public void testClearLiteExtension() throws Exception { - // clearExtension() is not actually used in TestUtil, so try it manually. - assertFalse( - TestAllExtensionsLite.newBuilder() - .setExtension(UnittestLite.optionalInt32ExtensionLite, 1) - .clearExtension(UnittestLite.optionalInt32ExtensionLite) - .hasExtension(UnittestLite.optionalInt32ExtensionLite)); - assertEquals(0, - TestAllExtensionsLite.newBuilder() - .addExtension(UnittestLite.repeatedInt32ExtensionLite, 1) - .clearExtension(UnittestLite.repeatedInt32ExtensionLite) - .getExtensionCount(UnittestLite.repeatedInt32ExtensionLite)); - } - - public void testLiteExtensionCopy() throws Exception { - TestAllExtensionsLite original = TestUtil.getAllLiteExtensionsSet(); - TestAllExtensionsLite copy = - TestAllExtensionsLite.newBuilder(original).build(); - TestUtil.assertAllExtensionsSet(copy); - } - - public void testLiteExtensionMergeFrom() throws Exception { - TestAllExtensionsLite original = - TestAllExtensionsLite.newBuilder() - .setExtension(UnittestLite.optionalInt32ExtensionLite, 1).build(); - TestAllExtensionsLite merged = - TestAllExtensionsLite.newBuilder().mergeFrom(original).build(); - assertTrue(merged.hasExtension(UnittestLite.optionalInt32ExtensionLite)); - assertEquals( - 1, (int) merged.getExtension(UnittestLite.optionalInt32ExtensionLite)); - } - - // ================================================================= - // multiple_files_test - - public void testMultipleFilesOption() throws Exception { - // We mostly just want to check that things compile. - MessageWithNoOuter message = - MessageWithNoOuter.newBuilder() - .setNested(MessageWithNoOuter.NestedMessage.newBuilder().setI(1)) - .addForeign(TestAllTypes.newBuilder().setOptionalInt32(1)) - .setNestedEnum(MessageWithNoOuter.NestedEnum.BAZ) - .setForeignEnum(EnumWithNoOuter.BAR) - .build(); - assertEquals(message, MessageWithNoOuter.parseFrom(message.toByteString())); - - assertEquals(MultipleFilesTestProto.getDescriptor(), - MessageWithNoOuter.getDescriptor().getFile()); - - Descriptors.FieldDescriptor field = - MessageWithNoOuter.getDescriptor().findFieldByName("foreign_enum"); - assertEquals(EnumWithNoOuter.BAR.getValueDescriptor(), - message.getField(field)); - - assertEquals(MultipleFilesTestProto.getDescriptor(), - ServiceWithNoOuter.getDescriptor().getFile()); - - assertFalse( - TestAllExtensions.getDefaultInstance().hasExtension( - MultipleFilesTestProto.extensionWithOuter)); - } - - public void testOptionalFieldWithRequiredSubfieldsOptimizedForSize() - throws Exception { - TestOptionalOptimizedForSize message = - TestOptionalOptimizedForSize.getDefaultInstance(); - assertTrue(message.isInitialized()); - - message = TestOptionalOptimizedForSize.newBuilder().setO( - TestRequiredOptimizedForSize.newBuilder().buildPartial() - ).buildPartial(); - assertFalse(message.isInitialized()); - - message = TestOptionalOptimizedForSize.newBuilder().setO( - TestRequiredOptimizedForSize.newBuilder().setX(5).buildPartial() - ).buildPartial(); - assertTrue(message.isInitialized()); - } - - public void testUninitializedExtensionInOptimizedForSize() - throws Exception { - TestOptimizedForSize.Builder builder = TestOptimizedForSize.newBuilder(); - builder.setExtension(TestOptimizedForSize.testExtension2, - TestRequiredOptimizedForSize.newBuilder().buildPartial()); - assertFalse(builder.isInitialized()); - assertFalse(builder.buildPartial().isInitialized()); - - builder = TestOptimizedForSize.newBuilder(); - builder.setExtension(TestOptimizedForSize.testExtension2, - TestRequiredOptimizedForSize.newBuilder().setX(10).buildPartial()); - assertTrue(builder.isInitialized()); - assertTrue(builder.buildPartial().isInitialized()); - } - - public void testToBuilder() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestAllTypes message = builder.build(); - TestUtil.assertAllFieldsSet(message); - TestUtil.assertAllFieldsSet(message.toBuilder().build()); - } - - public void testFieldConstantValues() throws Exception { - assertEquals(TestAllTypes.NestedMessage.BB_FIELD_NUMBER, 1); - assertEquals(TestAllTypes.OPTIONAL_INT32_FIELD_NUMBER, 1); - assertEquals(TestAllTypes.OPTIONALGROUP_FIELD_NUMBER, 16); - assertEquals(TestAllTypes.OPTIONAL_NESTED_MESSAGE_FIELD_NUMBER, 18); - assertEquals(TestAllTypes.OPTIONAL_NESTED_ENUM_FIELD_NUMBER, 21); - assertEquals(TestAllTypes.REPEATED_INT32_FIELD_NUMBER, 31); - assertEquals(TestAllTypes.REPEATEDGROUP_FIELD_NUMBER, 46); - assertEquals(TestAllTypes.REPEATED_NESTED_MESSAGE_FIELD_NUMBER, 48); - assertEquals(TestAllTypes.REPEATED_NESTED_ENUM_FIELD_NUMBER, 51); - } - - public void testExtensionConstantValues() throws Exception { - assertEquals(UnittestProto.TestRequired.SINGLE_FIELD_NUMBER, 1000); - assertEquals(UnittestProto.TestRequired.MULTI_FIELD_NUMBER, 1001); - assertEquals(UnittestProto.OPTIONAL_INT32_EXTENSION_FIELD_NUMBER, 1); - assertEquals(UnittestProto.OPTIONALGROUP_EXTENSION_FIELD_NUMBER, 16); - assertEquals( - UnittestProto.OPTIONAL_NESTED_MESSAGE_EXTENSION_FIELD_NUMBER, 18); - assertEquals(UnittestProto.OPTIONAL_NESTED_ENUM_EXTENSION_FIELD_NUMBER, 21); - assertEquals(UnittestProto.REPEATED_INT32_EXTENSION_FIELD_NUMBER, 31); - assertEquals(UnittestProto.REPEATEDGROUP_EXTENSION_FIELD_NUMBER, 46); - assertEquals( - UnittestProto.REPEATED_NESTED_MESSAGE_EXTENSION_FIELD_NUMBER, 48); - assertEquals(UnittestProto.REPEATED_NESTED_ENUM_EXTENSION_FIELD_NUMBER, 51); - } - - public void testRecursiveMessageDefaultInstance() throws Exception { - UnittestProto.TestRecursiveMessage message = - UnittestProto.TestRecursiveMessage.getDefaultInstance(); - assertTrue(message != null); - assertTrue(message.getA() != null); - assertTrue(message.getA() == message); - } - - public void testSerialize() throws Exception { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestUtil.setAllFields(builder); - TestAllTypes expected = builder.build(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(expected); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - TestAllTypes actual = (TestAllTypes) in.readObject(); - assertEquals(expected, actual); - } - - public void testSerializePartial() throws Exception { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestAllTypes expected = builder.buildPartial(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(expected); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - TestAllTypes actual = (TestAllTypes) in.readObject(); - assertEquals(expected, actual); - } - - public void testEnumValues() { - assertEquals( - TestAllTypes.NestedEnum.BAR.getNumber(), - TestAllTypes.NestedEnum.BAR_VALUE); - assertEquals( - TestAllTypes.NestedEnum.BAZ.getNumber(), - TestAllTypes.NestedEnum.BAZ_VALUE); - assertEquals( - TestAllTypes.NestedEnum.FOO.getNumber(), - TestAllTypes.NestedEnum.FOO_VALUE); - } - - public void testNonNestedExtensionInitialization() { - assertTrue(NonNestedExtension.nonNestedExtension - .getMessageDefaultInstance() instanceof MyNonNestedExtension); - assertEquals("nonNestedExtension", - NonNestedExtension.nonNestedExtension.getDescriptor().getName()); - } - - public void testNestedExtensionInitialization() { - assertTrue(MyNestedExtension.recursiveExtension.getMessageDefaultInstance() - instanceof MessageToBeExtended); - assertEquals("recursiveExtension", - MyNestedExtension.recursiveExtension.getDescriptor().getName()); - } - - public void testNonNestedExtensionLiteInitialization() { - assertTrue(NonNestedExtensionLite.nonNestedExtensionLite - .getMessageDefaultInstance() instanceof MyNonNestedExtensionLite); - } - - public void testNestedExtensionLiteInitialization() { - assertTrue(MyNestedExtensionLite.recursiveExtensionLite - .getMessageDefaultInstance() instanceof MessageLiteToBeExtended); - } - - public void testInvalidations() throws Exception { - GeneratedMessage.enableAlwaysUseFieldBuildersForTesting(); - TestAllTypes.NestedMessage nestedMessage1 = - TestAllTypes.NestedMessage.newBuilder().build(); - TestAllTypes.NestedMessage nestedMessage2 = - TestAllTypes.NestedMessage.newBuilder().build(); - - // Set all three flavors (enum, primitive, message and singular/repeated) - // and verify no invalidations fired - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - - TestAllTypes.Builder builder = (TestAllTypes.Builder) - ((GeneratedMessage) TestAllTypes.getDefaultInstance()). - newBuilderForType(mockParent); - builder.setOptionalInt32(1); - builder.setOptionalNestedEnum(TestAllTypes.NestedEnum.BAR); - builder.setOptionalNestedMessage(nestedMessage1); - builder.addRepeatedInt32(1); - builder.addRepeatedNestedEnum(TestAllTypes.NestedEnum.BAR); - builder.addRepeatedNestedMessage(nestedMessage1); - assertEquals(0, mockParent.getInvalidationCount()); - - // Now tell it we want changes and make sure it's only fired once - // And do this for each flavor - - // primitive single - builder.buildPartial(); - builder.setOptionalInt32(2); - builder.setOptionalInt32(3); - assertEquals(1, mockParent.getInvalidationCount()); - - // enum single - builder.buildPartial(); - builder.setOptionalNestedEnum(TestAllTypes.NestedEnum.BAZ); - builder.setOptionalNestedEnum(TestAllTypes.NestedEnum.BAR); - assertEquals(2, mockParent.getInvalidationCount()); - - // message single - builder.buildPartial(); - builder.setOptionalNestedMessage(nestedMessage2); - builder.setOptionalNestedMessage(nestedMessage1); - assertEquals(3, mockParent.getInvalidationCount()); - - // primitive repated - builder.buildPartial(); - builder.addRepeatedInt32(2); - builder.addRepeatedInt32(3); - assertEquals(4, mockParent.getInvalidationCount()); - - // enum repeated - builder.buildPartial(); - builder.addRepeatedNestedEnum(TestAllTypes.NestedEnum.BAZ); - builder.addRepeatedNestedEnum(TestAllTypes.NestedEnum.BAZ); - assertEquals(5, mockParent.getInvalidationCount()); - - // message repeated - builder.buildPartial(); - builder.addRepeatedNestedMessage(nestedMessage2); - builder.addRepeatedNestedMessage(nestedMessage1); - assertEquals(6, mockParent.getInvalidationCount()); - - } - - public void testInvalidations_Extensions() throws Exception { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - - TestAllExtensions.Builder builder = (TestAllExtensions.Builder) - ((GeneratedMessage) TestAllExtensions.getDefaultInstance()). - newBuilderForType(mockParent); - - builder.addExtension(UnittestProto.repeatedInt32Extension, 1); - builder.setExtension(UnittestProto.repeatedInt32Extension, 0, 2); - builder.clearExtension(UnittestProto.repeatedInt32Extension); - assertEquals(0, mockParent.getInvalidationCount()); - - // Now tell it we want changes and make sure it's only fired once - builder.buildPartial(); - builder.addExtension(UnittestProto.repeatedInt32Extension, 2); - builder.addExtension(UnittestProto.repeatedInt32Extension, 3); - assertEquals(1, mockParent.getInvalidationCount()); - - builder.buildPartial(); - builder.setExtension(UnittestProto.repeatedInt32Extension, 0, 4); - builder.setExtension(UnittestProto.repeatedInt32Extension, 1, 5); - assertEquals(2, mockParent.getInvalidationCount()); - - builder.buildPartial(); - builder.clearExtension(UnittestProto.repeatedInt32Extension); - builder.clearExtension(UnittestProto.repeatedInt32Extension); - assertEquals(3, mockParent.getInvalidationCount()); - } - - public void testBaseMessageOrBuilder() { - // Mostly just makes sure the base interface exists and has some methods. - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TestAllTypes message = builder.buildPartial(); - TestAllTypesOrBuilder builderAsInterface = (TestAllTypesOrBuilder) builder; - TestAllTypesOrBuilder messageAsInterface = (TestAllTypesOrBuilder) message; - - assertEquals( - messageAsInterface.getDefaultBool(), - messageAsInterface.getDefaultBool()); - assertEquals( - messageAsInterface.getOptionalDouble(), - messageAsInterface.getOptionalDouble()); - } - - public void testMessageOrBuilderGetters() { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - - // single fields - assertSame(ForeignMessage.getDefaultInstance(), - builder.getOptionalForeignMessageOrBuilder()); - ForeignMessage.Builder subBuilder = - builder.getOptionalForeignMessageBuilder(); - assertSame(subBuilder, builder.getOptionalForeignMessageOrBuilder()); - - // repeated fields - ForeignMessage m0 = ForeignMessage.newBuilder().buildPartial(); - ForeignMessage m1 = ForeignMessage.newBuilder().buildPartial(); - ForeignMessage m2 = ForeignMessage.newBuilder().buildPartial(); - builder.addRepeatedForeignMessage(m0); - builder.addRepeatedForeignMessage(m1); - builder.addRepeatedForeignMessage(m2); - assertSame(m0, builder.getRepeatedForeignMessageOrBuilder(0)); - assertSame(m1, builder.getRepeatedForeignMessageOrBuilder(1)); - assertSame(m2, builder.getRepeatedForeignMessageOrBuilder(2)); - ForeignMessage.Builder b0 = builder.getRepeatedForeignMessageBuilder(0); - ForeignMessage.Builder b1 = builder.getRepeatedForeignMessageBuilder(1); - assertSame(b0, builder.getRepeatedForeignMessageOrBuilder(0)); - assertSame(b1, builder.getRepeatedForeignMessageOrBuilder(1)); - assertSame(m2, builder.getRepeatedForeignMessageOrBuilder(2)); - - List messageOrBuilderList = - builder.getRepeatedForeignMessageOrBuilderList(); - assertSame(b0, messageOrBuilderList.get(0)); - assertSame(b1, messageOrBuilderList.get(1)); - assertSame(m2, messageOrBuilderList.get(2)); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java deleted file mode 100644 index 4dcdc74d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java +++ /dev/null @@ -1,118 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import junit.framework.TestCase; - -/** - * Tests for {@link LazyStringArrayList}. - * - * @author jonp@google.com (Jon Perlow) - */ -public class LazyStringArrayListTest extends TestCase { - - private static String STRING_A = "A"; - private static String STRING_B = "B"; - private static String STRING_C = "C"; - - private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A"); - private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B"); - private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C"); - - public void testJustStrings() { - LazyStringArrayList list = new LazyStringArrayList(); - list.add(STRING_A); - list.add(STRING_B); - list.add(STRING_C); - - assertEquals(3, list.size()); - assertSame(STRING_A, list.get(0)); - assertSame(STRING_B, list.get(1)); - assertSame(STRING_C, list.get(2)); - - list.set(1, STRING_C); - assertSame(STRING_C, list.get(1)); - - list.remove(1); - assertSame(STRING_A, list.get(0)); - assertSame(STRING_C, list.get(1)); - } - - public void testJustByteString() { - LazyStringArrayList list = new LazyStringArrayList(); - list.add(BYTE_STRING_A); - list.add(BYTE_STRING_B); - list.add(BYTE_STRING_C); - - assertEquals(3, list.size()); - assertSame(BYTE_STRING_A, list.getByteString(0)); - assertSame(BYTE_STRING_B, list.getByteString(1)); - assertSame(BYTE_STRING_C, list.getByteString(2)); - - list.remove(1); - assertSame(BYTE_STRING_A, list.getByteString(0)); - assertSame(BYTE_STRING_C, list.getByteString(1)); - } - - public void testConversionBackAndForth() { - LazyStringArrayList list = new LazyStringArrayList(); - list.add(STRING_A); - list.add(BYTE_STRING_B); - list.add(BYTE_STRING_C); - - // String a should be the same because it was originally a string - assertSame(STRING_A, list.get(0)); - - // String b and c should be different because the string has to be computed - // from the ByteString - String bPrime = list.get(1); - assertNotSame(STRING_B, bPrime); - assertEquals(STRING_B, bPrime); - String cPrime = list.get(2); - assertNotSame(STRING_C, cPrime); - assertEquals(STRING_C, cPrime); - - // String c and c should stay the same once cached. - assertSame(bPrime, list.get(1)); - assertSame(cPrime, list.get(2)); - - // ByteString needs to be computed from string for both a and b - ByteString aPrimeByteString = list.getByteString(0); - assertEquals(BYTE_STRING_A, aPrimeByteString); - ByteString bPrimeByteString = list.getByteString(1); - assertNotSame(BYTE_STRING_B, bPrimeByteString); - assertEquals(BYTE_STRING_B, list.getByteString(1)); - - // Once cached, ByteString should stay cached. - assertSame(aPrimeByteString, list.getByteString(0)); - assertSame(bPrimeByteString, list.getByteString(1)); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java deleted file mode 100644 index e6870b51..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java +++ /dev/null @@ -1,115 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - - -import protobuf_unittest.UnittestProto; - -import junit.framework.TestCase; - -import java.io.IOException; - -/** - * Tests to make sure the lazy conversion of UTF8-encoded byte arrays to - * strings works correctly. - * - * @author jonp@google.com (Jon Perlow) - */ -public class LazyStringEndToEndTest extends TestCase { - - private static ByteString TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8 = - ByteString.copyFrom(new byte[] { - 114, 4, -1, 0, -1, 0, -30, 2, 4, -1, - 0, -1, 0, -30, 2, 4, -1, 0, -1, 0, }); - - /** - * Tests that an invalid UTF8 string will roundtrip through a parse - * and serialization. - */ - public void testParseAndSerialize() throws InvalidProtocolBufferException { - UnittestProto.TestAllTypes tV2 = UnittestProto.TestAllTypes.parseFrom( - TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8); - ByteString bytes = tV2.toByteString(); - assertEquals(TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8, bytes); - - tV2.getOptionalString(); - bytes = tV2.toByteString(); - assertEquals(TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8, bytes); - } - - public void testParseAndWrite() throws IOException { - UnittestProto.TestAllTypes tV2 = UnittestProto.TestAllTypes.parseFrom( - TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8); - byte[] sink = new byte[TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8.size()]; - CodedOutputStream outputStream = CodedOutputStream.newInstance(sink); - tV2.writeTo(outputStream); - outputStream.flush(); - assertEquals( - TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8, - ByteString.copyFrom(sink)); - } - - public void testCaching() { - String a = "a"; - String b = "b"; - String c = "c"; - UnittestProto.TestAllTypes proto = UnittestProto.TestAllTypes.newBuilder() - .setOptionalString(a) - .addRepeatedString(b) - .addRepeatedString(c) - .build(); - - // String should be the one we passed it. - assertSame(a, proto.getOptionalString()); - assertSame(b, proto.getRepeatedString(0)); - assertSame(c, proto.getRepeatedString(1)); - - - // There's no way to directly observe that the ByteString is cached - // correctly on serialization, but we can observe that it had to recompute - // the string after serialization. - proto.toByteString(); - String aPrime = proto.getOptionalString(); - assertNotSame(a, aPrime); - assertEquals(a, aPrime); - String bPrime = proto.getRepeatedString(0); - assertNotSame(b, bPrime); - assertEquals(b, bPrime); - String cPrime = proto.getRepeatedString(1); - assertNotSame(c, cPrime); - assertEquals(c, cPrime); - - // And now the string should stay cached. - assertSame(aPrime, proto.getOptionalString()); - assertSame(bPrime, proto.getRepeatedString(0)); - assertSame(cPrime, proto.getRepeatedString(1)); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java deleted file mode 100644 index 4e1003d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.UnittestLite; -import com.google.protobuf.UnittestLite.TestAllTypesLite; -import com.google.protobuf.UnittestLite.TestAllExtensionsLite; -import com.google.protobuf.UnittestLite.TestNestedExtensionLite; - -import junit.framework.TestCase; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -/** - * Test lite runtime. - * - * @author kenton@google.com Kenton Varda - */ -public class LiteTest extends TestCase { - public void setUp() throws Exception { - // Test that nested extensions are initialized correctly even if the outer - // class has not been accessed directly. This was once a bug with lite - // messages. - // - // We put this in setUp() rather than in its own test method because we - // need to make sure it runs before any actual tests. - assertTrue(TestNestedExtensionLite.nestedExtension != null); - } - - public void testLite() throws Exception { - // Since lite messages are a subset of regular messages, we can mostly - // assume that the functionality of lite messages is already thoroughly - // tested by the regular tests. All this test really verifies is that - // a proto with optimize_for = LITE_RUNTIME compiles correctly when - // linked only against the lite library. That is all tested at compile - // time, leaving not much to do in this method. Let's just do some random - // stuff to make sure the lite message is actually here and usable. - - TestAllTypesLite message = - TestAllTypesLite.newBuilder() - .setOptionalInt32(123) - .addRepeatedString("hello") - .setOptionalNestedMessage( - TestAllTypesLite.NestedMessage.newBuilder().setBb(7)) - .build(); - - ByteString data = message.toByteString(); - - TestAllTypesLite message2 = TestAllTypesLite.parseFrom(data); - - assertEquals(123, message2.getOptionalInt32()); - assertEquals(1, message2.getRepeatedStringCount()); - assertEquals("hello", message2.getRepeatedString(0)); - assertEquals(7, message2.getOptionalNestedMessage().getBb()); - } - - public void testLiteExtensions() throws Exception { - // TODO(kenton): Unlike other features of the lite library, extensions are - // implemented completely differently from the regular library. We - // should probably test them more thoroughly. - - TestAllExtensionsLite message = - TestAllExtensionsLite.newBuilder() - .setExtension(UnittestLite.optionalInt32ExtensionLite, 123) - .addExtension(UnittestLite.repeatedStringExtensionLite, "hello") - .setExtension(UnittestLite.optionalNestedEnumExtensionLite, - TestAllTypesLite.NestedEnum.BAZ) - .setExtension(UnittestLite.optionalNestedMessageExtensionLite, - TestAllTypesLite.NestedMessage.newBuilder().setBb(7).build()) - .build(); - - // Test copying a message, since coping extensions actually does use a - // different code path between lite and regular libraries, and as of this - // writing, parsing hasn't been implemented yet. - TestAllExtensionsLite message2 = message.toBuilder().build(); - - assertEquals(123, (int) message2.getExtension( - UnittestLite.optionalInt32ExtensionLite)); - assertEquals(1, message2.getExtensionCount( - UnittestLite.repeatedStringExtensionLite)); - assertEquals(1, message2.getExtension( - UnittestLite.repeatedStringExtensionLite).size()); - assertEquals("hello", message2.getExtension( - UnittestLite.repeatedStringExtensionLite, 0)); - assertEquals(TestAllTypesLite.NestedEnum.BAZ, message2.getExtension( - UnittestLite.optionalNestedEnumExtensionLite)); - assertEquals(7, message2.getExtension( - UnittestLite.optionalNestedMessageExtensionLite).getBb()); - } - - public void testSerialize() throws Exception { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - TestAllTypesLite expected = - TestAllTypesLite.newBuilder() - .setOptionalInt32(123) - .addRepeatedString("hello") - .setOptionalNestedMessage( - TestAllTypesLite.NestedMessage.newBuilder().setBb(7)) - .build(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(expected); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - TestAllTypesLite actual = (TestAllTypesLite) in.readObject(); - assertEquals(expected.getOptionalInt32(), actual.getOptionalInt32()); - assertEquals(expected.getRepeatedStringCount(), - actual.getRepeatedStringCount()); - assertEquals(expected.getRepeatedString(0), - actual.getRepeatedString(0)); - assertEquals(expected.getOptionalNestedMessage().getBb(), - actual.getOptionalNestedMessage().getBb()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java deleted file mode 100644 index c2f47eb2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java +++ /dev/null @@ -1,313 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestRequired; -import protobuf_unittest.UnittestProto.TestRequiredForeign; -import protobuf_unittest.UnittestProto.ForeignMessage; - -import junit.framework.TestCase; - -/** - * Misc. unit tests for message operations that apply to both generated - * and dynamic messages. - * - * @author kenton@google.com Kenton Varda - */ -public class MessageTest extends TestCase { - // ================================================================= - // Message-merging tests. - - static final TestAllTypes MERGE_SOURCE = - TestAllTypes.newBuilder() - .setOptionalInt32(1) - .setOptionalString("foo") - .setOptionalForeignMessage(ForeignMessage.getDefaultInstance()) - .addRepeatedString("bar") - .build(); - - static final TestAllTypes MERGE_DEST = - TestAllTypes.newBuilder() - .setOptionalInt64(2) - .setOptionalString("baz") - .setOptionalForeignMessage(ForeignMessage.newBuilder().setC(3).build()) - .addRepeatedString("qux") - .build(); - - static final String MERGE_RESULT_TEXT = - "optional_int32: 1\n" + - "optional_int64: 2\n" + - "optional_string: \"foo\"\n" + - "optional_foreign_message {\n" + - " c: 3\n" + - "}\n" + - "repeated_string: \"qux\"\n" + - "repeated_string: \"bar\"\n"; - - public void testMergeFrom() throws Exception { - TestAllTypes result = - TestAllTypes.newBuilder(MERGE_DEST) - .mergeFrom(MERGE_SOURCE).build(); - - assertEquals(MERGE_RESULT_TEXT, result.toString()); - } - - /** - * Test merging a DynamicMessage into a GeneratedMessage. As long as they - * have the same descriptor, this should work, but it is an entirely different - * code path. - */ - public void testMergeFromDynamic() throws Exception { - TestAllTypes result = - TestAllTypes.newBuilder(MERGE_DEST) - .mergeFrom(DynamicMessage.newBuilder(MERGE_SOURCE).build()) - .build(); - - assertEquals(MERGE_RESULT_TEXT, result.toString()); - } - - /** Test merging two DynamicMessages. */ - public void testDynamicMergeFrom() throws Exception { - DynamicMessage result = - DynamicMessage.newBuilder(MERGE_DEST) - .mergeFrom(DynamicMessage.newBuilder(MERGE_SOURCE).build()) - .build(); - - assertEquals(MERGE_RESULT_TEXT, result.toString()); - } - - // ================================================================= - // Required-field-related tests. - - private static final TestRequired TEST_REQUIRED_UNINITIALIZED = - TestRequired.getDefaultInstance(); - private static final TestRequired TEST_REQUIRED_INITIALIZED = - TestRequired.newBuilder().setA(1).setB(2).setC(3).build(); - - public void testRequired() throws Exception { - TestRequired.Builder builder = TestRequired.newBuilder(); - - assertFalse(builder.isInitialized()); - builder.setA(1); - assertFalse(builder.isInitialized()); - builder.setB(1); - assertFalse(builder.isInitialized()); - builder.setC(1); - assertTrue(builder.isInitialized()); - } - - public void testRequiredForeign() throws Exception { - TestRequiredForeign.Builder builder = TestRequiredForeign.newBuilder(); - - assertTrue(builder.isInitialized()); - - builder.setOptionalMessage(TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setOptionalMessage(TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - - builder.addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setRepeatedMessage(0, TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - } - - public void testRequiredExtension() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - - assertTrue(builder.isInitialized()); - - builder.setExtension(TestRequired.single, TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setExtension(TestRequired.single, TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - - builder.addExtension(TestRequired.multi, TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setExtension(TestRequired.multi, 0, TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - } - - public void testRequiredDynamic() throws Exception { - Descriptors.Descriptor descriptor = TestRequired.getDescriptor(); - DynamicMessage.Builder builder = DynamicMessage.newBuilder(descriptor); - - assertFalse(builder.isInitialized()); - builder.setField(descriptor.findFieldByName("a"), 1); - assertFalse(builder.isInitialized()); - builder.setField(descriptor.findFieldByName("b"), 1); - assertFalse(builder.isInitialized()); - builder.setField(descriptor.findFieldByName("c"), 1); - assertTrue(builder.isInitialized()); - } - - public void testRequiredDynamicForeign() throws Exception { - Descriptors.Descriptor descriptor = TestRequiredForeign.getDescriptor(); - DynamicMessage.Builder builder = DynamicMessage.newBuilder(descriptor); - - assertTrue(builder.isInitialized()); - - builder.setField(descriptor.findFieldByName("optional_message"), - TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setField(descriptor.findFieldByName("optional_message"), - TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - - builder.addRepeatedField(descriptor.findFieldByName("repeated_message"), - TEST_REQUIRED_UNINITIALIZED); - assertFalse(builder.isInitialized()); - - builder.setRepeatedField(descriptor.findFieldByName("repeated_message"), 0, - TEST_REQUIRED_INITIALIZED); - assertTrue(builder.isInitialized()); - } - - public void testUninitializedException() throws Exception { - try { - TestRequired.newBuilder().build(); - fail("Should have thrown an exception."); - } catch (UninitializedMessageException e) { - assertEquals("Message missing required fields: a, b, c", e.getMessage()); - } - } - - public void testBuildPartial() throws Exception { - // We're mostly testing that no exception is thrown. - TestRequired message = TestRequired.newBuilder().buildPartial(); - assertFalse(message.isInitialized()); - } - - public void testNestedUninitializedException() throws Exception { - try { - TestRequiredForeign.newBuilder() - .setOptionalMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .build(); - fail("Should have thrown an exception."); - } catch (UninitializedMessageException e) { - assertEquals( - "Message missing required fields: " + - "optional_message.a, " + - "optional_message.b, " + - "optional_message.c, " + - "repeated_message[0].a, " + - "repeated_message[0].b, " + - "repeated_message[0].c, " + - "repeated_message[1].a, " + - "repeated_message[1].b, " + - "repeated_message[1].c", - e.getMessage()); - } - } - - public void testBuildNestedPartial() throws Exception { - // We're mostly testing that no exception is thrown. - TestRequiredForeign message = - TestRequiredForeign.newBuilder() - .setOptionalMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .buildPartial(); - assertFalse(message.isInitialized()); - } - - public void testParseUnititialized() throws Exception { - try { - TestRequired.parseFrom(ByteString.EMPTY); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals("Message missing required fields: a, b, c", e.getMessage()); - } - } - - public void testParseNestedUnititialized() throws Exception { - ByteString data = - TestRequiredForeign.newBuilder() - .setOptionalMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .addRepeatedMessage(TEST_REQUIRED_UNINITIALIZED) - .buildPartial().toByteString(); - - try { - TestRequiredForeign.parseFrom(data); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals( - "Message missing required fields: " + - "optional_message.a, " + - "optional_message.b, " + - "optional_message.c, " + - "repeated_message[0].a, " + - "repeated_message[0].b, " + - "repeated_message[0].c, " + - "repeated_message[1].a, " + - "repeated_message[1].b, " + - "repeated_message[1].c", - e.getMessage()); - } - } - - public void testDynamicUninitializedException() throws Exception { - try { - DynamicMessage.newBuilder(TestRequired.getDescriptor()).build(); - fail("Should have thrown an exception."); - } catch (UninitializedMessageException e) { - assertEquals("Message missing required fields: a, b, c", e.getMessage()); - } - } - - public void testDynamicBuildPartial() throws Exception { - // We're mostly testing that no exception is thrown. - DynamicMessage message = - DynamicMessage.newBuilder(TestRequired.getDescriptor()) - .buildPartial(); - assertFalse(message.isInitialized()); - } - - public void testDynamicParseUnititialized() throws Exception { - try { - Descriptors.Descriptor descriptor = TestRequired.getDescriptor(); - DynamicMessage.parseFrom(descriptor, ByteString.EMPTY); - fail("Should have thrown an exception."); - } catch (InvalidProtocolBufferException e) { - assertEquals("Message missing required fields: a, b, c", e.getMessage()); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java deleted file mode 100644 index f5375801..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java +++ /dev/null @@ -1,185 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.Vehicle; -import protobuf_unittest.Wheel; - -import junit.framework.TestCase; - -import java.util.List; -import java.util.ArrayList; - -/** - * Test cases that exercise end-to-end use cases involving - * {@link SingleFieldBuilder} and {@link RepeatedFieldBuilder}. - * - * @author jonp@google.com (Jon Perlow) - */ -public class NestedBuildersTest extends TestCase { - - public void testMessagesAndBuilders() { - Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); - vehicleBuilder.addWheelBuilder() - .setRadius(4) - .setWidth(1); - vehicleBuilder.addWheelBuilder() - .setRadius(4) - .setWidth(2); - vehicleBuilder.addWheelBuilder() - .setRadius(4) - .setWidth(3); - vehicleBuilder.addWheelBuilder() - .setRadius(4) - .setWidth(4); - vehicleBuilder.getEngineBuilder() - .setLiters(10); - - Vehicle vehicle = vehicleBuilder.build(); - assertEquals(4, vehicle.getWheelCount()); - for (int i = 0; i < 4; i++) { - Wheel wheel = vehicle.getWheel(i); - assertEquals(4, wheel.getRadius()); - assertEquals(i + 1, wheel.getWidth()); - } - assertEquals(10, vehicle.getEngine().getLiters()); - - for (int i = 0; i < 4; i++) { - vehicleBuilder.getWheelBuilder(i) - .setRadius(5) - .setWidth(i + 10); - } - vehicleBuilder.getEngineBuilder().setLiters(20); - - vehicle = vehicleBuilder.build(); - for (int i = 0; i < 4; i++) { - Wheel wheel = vehicle.getWheel(i); - assertEquals(5, wheel.getRadius()); - assertEquals(i + 10, wheel.getWidth()); - } - assertEquals(20, vehicle.getEngine().getLiters()); - assertTrue(vehicle.hasEngine()); - } - - public void testMessagesAreCached() { - Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); - vehicleBuilder.addWheelBuilder() - .setRadius(1) - .setWidth(2); - vehicleBuilder.addWheelBuilder() - .setRadius(3) - .setWidth(4); - vehicleBuilder.addWheelBuilder() - .setRadius(5) - .setWidth(6); - vehicleBuilder.addWheelBuilder() - .setRadius(7) - .setWidth(8); - - // Make sure messages are cached. - List wheels = new ArrayList(vehicleBuilder.getWheelList()); - for (int i = 0; i < wheels.size(); i++) { - assertSame(wheels.get(i), vehicleBuilder.getWheel(i)); - } - - // Now get builders and check they didn't change. - for (int i = 0; i < wheels.size(); i++) { - vehicleBuilder.getWheel(i); - } - for (int i = 0; i < wheels.size(); i++) { - assertSame(wheels.get(i), vehicleBuilder.getWheel(i)); - } - - // Change just one - vehicleBuilder.getWheelBuilder(3) - .setRadius(20).setWidth(20); - - // Now get wheels and check that only that one changed - for (int i = 0; i < wheels.size(); i++) { - if (i < 3) { - assertSame(wheels.get(i), vehicleBuilder.getWheel(i)); - } else { - assertNotSame(wheels.get(i), vehicleBuilder.getWheel(i)); - } - } - } - - public void testRemove_WithNestedBuilders() { - Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); - vehicleBuilder.addWheelBuilder() - .setRadius(1) - .setWidth(1); - vehicleBuilder.addWheelBuilder() - .setRadius(2) - .setWidth(2); - vehicleBuilder.removeWheel(0); - - assertEquals(1, vehicleBuilder.getWheelCount()); - assertEquals(2, vehicleBuilder.getWheel(0).getRadius()); - } - - public void testRemove_WithNestedMessages() { - Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); - vehicleBuilder.addWheel(Wheel.newBuilder() - .setRadius(1) - .setWidth(1)); - vehicleBuilder.addWheel(Wheel.newBuilder() - .setRadius(2) - .setWidth(2)); - vehicleBuilder.removeWheel(0); - - assertEquals(1, vehicleBuilder.getWheelCount()); - assertEquals(2, vehicleBuilder.getWheel(0).getRadius()); - } - - public void testMerge() { - Vehicle vehicle1 = Vehicle.newBuilder() - .addWheel(Wheel.newBuilder().setRadius(1).build()) - .addWheel(Wheel.newBuilder().setRadius(2).build()) - .build(); - - Vehicle vehicle2 = Vehicle.newBuilder() - .mergeFrom(vehicle1) - .build(); - // List should be the same -- no allocation - assertSame(vehicle1.getWheelList(), vehicle2.getWheelList()); - - Vehicle vehicle3 = vehicle1.toBuilder().build(); - assertSame(vehicle1.getWheelList(), vehicle3.getWheelList()); - } - - public void testGettingBuilderMarksFieldAsHaving() { - Vehicle.Builder vehicleBuilder = Vehicle.newBuilder(); - vehicleBuilder.getEngineBuilder(); - Vehicle vehicle = vehicleBuilder.buildPartial(); - assertTrue(vehicle.hasEngine()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java deleted file mode 100644 index cdcdcb25..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java +++ /dev/null @@ -1,190 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllTypesOrBuilder; - -import junit.framework.TestCase; - -import java.util.Collections; -import java.util.List; - -/** - * Tests for {@link RepeatedFieldBuilder}. This tests basic functionality. - * More extensive testing is provided via other tests that exercise the - * builder. - * - * @author jonp@google.com (Jon Perlow) - */ -public class RepeatedFieldBuilderTest extends TestCase { - - public void testBasicUse() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - RepeatedFieldBuilder builder = newRepeatedFieldBuilder(mockParent); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); - assertEquals(0, builder.getMessage(0).getOptionalInt32()); - assertEquals(1, builder.getMessage(1).getOptionalInt32()); - - List list = builder.build(); - assertEquals(2, list.size()); - assertEquals(0, list.get(0).getOptionalInt32()); - assertEquals(1, list.get(1).getOptionalInt32()); - assertIsUnmodifiable(list); - - // Make sure it doesn't change. - List list2 = builder.build(); - assertSame(list, list2); - assertEquals(0, mockParent.getInvalidationCount()); - } - - public void testGoingBackAndForth() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - RepeatedFieldBuilder builder = newRepeatedFieldBuilder(mockParent); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); - assertEquals(0, builder.getMessage(0).getOptionalInt32()); - assertEquals(1, builder.getMessage(1).getOptionalInt32()); - - // Convert to list - List list = builder.build(); - assertEquals(2, list.size()); - assertEquals(0, list.get(0).getOptionalInt32()); - assertEquals(1, list.get(1).getOptionalInt32()); - assertIsUnmodifiable(list); - - // Update 0th item - assertEquals(0, mockParent.getInvalidationCount()); - builder.getBuilder(0).setOptionalString("foo"); - assertEquals(1, mockParent.getInvalidationCount()); - list = builder.build(); - assertEquals(2, list.size()); - assertEquals(0, list.get(0).getOptionalInt32()); - assertEquals("foo", list.get(0).getOptionalString()); - assertEquals(1, list.get(1).getOptionalInt32()); - assertIsUnmodifiable(list); - assertEquals(1, mockParent.getInvalidationCount()); - } - - public void testVariousMethods() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - RepeatedFieldBuilder builder = newRepeatedFieldBuilder(mockParent); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(2).build()); - builder.addBuilder(0, TestAllTypes.getDefaultInstance()) - .setOptionalInt32(0); - builder.addBuilder(TestAllTypes.getDefaultInstance()).setOptionalInt32(3); - - assertEquals(0, builder.getMessage(0).getOptionalInt32()); - assertEquals(1, builder.getMessage(1).getOptionalInt32()); - assertEquals(2, builder.getMessage(2).getOptionalInt32()); - assertEquals(3, builder.getMessage(3).getOptionalInt32()); - - assertEquals(0, mockParent.getInvalidationCount()); - List messages = builder.build(); - assertEquals(4, messages.size()); - assertSame(messages, builder.build()); // expect same list - - // Remove a message. - builder.remove(2); - assertEquals(1, mockParent.getInvalidationCount()); - assertEquals(3, builder.getCount()); - assertEquals(0, builder.getMessage(0).getOptionalInt32()); - assertEquals(1, builder.getMessage(1).getOptionalInt32()); - assertEquals(3, builder.getMessage(2).getOptionalInt32()); - - // Remove a builder. - builder.remove(0); - assertEquals(1, mockParent.getInvalidationCount()); - assertEquals(2, builder.getCount()); - assertEquals(1, builder.getMessage(0).getOptionalInt32()); - assertEquals(3, builder.getMessage(1).getOptionalInt32()); - - // Test clear. - builder.clear(); - assertEquals(1, mockParent.getInvalidationCount()); - assertEquals(0, builder.getCount()); - assertTrue(builder.isEmpty()); - } - - public void testLists() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - RepeatedFieldBuilder builder = newRepeatedFieldBuilder(mockParent); - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(1).build()); - builder.addMessage(0, - TestAllTypes.newBuilder().setOptionalInt32(0).build()); - assertEquals(0, builder.getMessage(0).getOptionalInt32()); - assertEquals(1, builder.getMessage(1).getOptionalInt32()); - - // Use list of builders. - List builders = builder.getBuilderList(); - assertEquals(0, builders.get(0).getOptionalInt32()); - assertEquals(1, builders.get(1).getOptionalInt32()); - builders.get(0).setOptionalInt32(10); - builders.get(1).setOptionalInt32(11); - - // Use list of protos - List protos = builder.getMessageList(); - assertEquals(10, protos.get(0).getOptionalInt32()); - assertEquals(11, protos.get(1).getOptionalInt32()); - - // Add an item to the builders and verify it's updated in both - builder.addMessage(TestAllTypes.newBuilder().setOptionalInt32(12).build()); - assertEquals(3, builders.size()); - assertEquals(3, protos.size()); - } - - private void assertIsUnmodifiable(List list) { - if (list == Collections.emptyList()) { - // OKAY -- Need to check this b/c EmptyList allows you to call clear. - } else { - try { - list.clear(); - fail("List wasn't immutable"); - } catch (UnsupportedOperationException e) { - // good - } - } - } - - private RepeatedFieldBuilder - newRepeatedFieldBuilder(GeneratedMessage.BuilderParent parent) { - return new RepeatedFieldBuilder(Collections.emptyList(), false, - parent, false); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java deleted file mode 100644 index 4be84f5b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java +++ /dev/null @@ -1,320 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.FileDescriptor; -import com.google.protobuf.Descriptors.MethodDescriptor; -import google.protobuf.no_generic_services_test.UnittestNoGenericServices; -import protobuf_unittest.MessageWithNoOuter; -import protobuf_unittest.ServiceWithNoOuter; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestService; -import protobuf_unittest.UnittestProto.FooRequest; -import protobuf_unittest.UnittestProto.FooResponse; -import protobuf_unittest.UnittestProto.BarRequest; -import protobuf_unittest.UnittestProto.BarResponse; - -import org.easymock.classextension.EasyMock; -import org.easymock.classextension.IMocksControl; -import org.easymock.IArgumentMatcher; - -import java.util.HashSet; -import java.util.Set; - -import junit.framework.TestCase; - -/** - * Tests services and stubs. - * - * @author kenton@google.com Kenton Varda - */ -public class ServiceTest extends TestCase { - private IMocksControl control; - private RpcController mockController; - - private final Descriptors.MethodDescriptor fooDescriptor = - TestService.getDescriptor().getMethods().get(0); - private final Descriptors.MethodDescriptor barDescriptor = - TestService.getDescriptor().getMethods().get(1); - - @Override - protected void setUp() throws Exception { - super.setUp(); - control = EasyMock.createStrictControl(); - mockController = control.createMock(RpcController.class); - } - - // ================================================================= - - /** Tests Service.callMethod(). */ - public void testCallMethod() throws Exception { - FooRequest fooRequest = FooRequest.newBuilder().build(); - BarRequest barRequest = BarRequest.newBuilder().build(); - MockCallback fooCallback = new MockCallback(); - MockCallback barCallback = new MockCallback(); - TestService mockService = control.createMock(TestService.class); - - mockService.foo(EasyMock.same(mockController), EasyMock.same(fooRequest), - this.wrapsCallback(fooCallback)); - mockService.bar(EasyMock.same(mockController), EasyMock.same(barRequest), - this.wrapsCallback(barCallback)); - control.replay(); - - mockService.callMethod(fooDescriptor, mockController, - fooRequest, fooCallback); - mockService.callMethod(barDescriptor, mockController, - barRequest, barCallback); - control.verify(); - } - - /** Tests Service.get{Request,Response}Prototype(). */ - public void testGetPrototype() throws Exception { - TestService mockService = control.createMock(TestService.class); - - assertSame(mockService.getRequestPrototype(fooDescriptor), - FooRequest.getDefaultInstance()); - assertSame(mockService.getResponsePrototype(fooDescriptor), - FooResponse.getDefaultInstance()); - assertSame(mockService.getRequestPrototype(barDescriptor), - BarRequest.getDefaultInstance()); - assertSame(mockService.getResponsePrototype(barDescriptor), - BarResponse.getDefaultInstance()); - } - - /** Tests generated stubs. */ - public void testStub() throws Exception { - FooRequest fooRequest = FooRequest.newBuilder().build(); - BarRequest barRequest = BarRequest.newBuilder().build(); - MockCallback fooCallback = new MockCallback(); - MockCallback barCallback = new MockCallback(); - RpcChannel mockChannel = control.createMock(RpcChannel.class); - TestService stub = TestService.newStub(mockChannel); - - mockChannel.callMethod( - EasyMock.same(fooDescriptor), - EasyMock.same(mockController), - EasyMock.same(fooRequest), - EasyMock.same(FooResponse.getDefaultInstance()), - this.wrapsCallback(fooCallback)); - mockChannel.callMethod( - EasyMock.same(barDescriptor), - EasyMock.same(mockController), - EasyMock.same(barRequest), - EasyMock.same(BarResponse.getDefaultInstance()), - this.wrapsCallback(barCallback)); - control.replay(); - - stub.foo(mockController, fooRequest, fooCallback); - stub.bar(mockController, barRequest, barCallback); - control.verify(); - } - - /** Tests generated blocking stubs. */ - public void testBlockingStub() throws Exception { - FooRequest fooRequest = FooRequest.newBuilder().build(); - BarRequest barRequest = BarRequest.newBuilder().build(); - BlockingRpcChannel mockChannel = - control.createMock(BlockingRpcChannel.class); - TestService.BlockingInterface stub = - TestService.newBlockingStub(mockChannel); - - FooResponse fooResponse = FooResponse.newBuilder().build(); - BarResponse barResponse = BarResponse.newBuilder().build(); - - EasyMock.expect(mockChannel.callBlockingMethod( - EasyMock.same(fooDescriptor), - EasyMock.same(mockController), - EasyMock.same(fooRequest), - EasyMock.same(FooResponse.getDefaultInstance()))).andReturn(fooResponse); - EasyMock.expect(mockChannel.callBlockingMethod( - EasyMock.same(barDescriptor), - EasyMock.same(mockController), - EasyMock.same(barRequest), - EasyMock.same(BarResponse.getDefaultInstance()))).andReturn(barResponse); - control.replay(); - - assertSame(fooResponse, stub.foo(mockController, fooRequest)); - assertSame(barResponse, stub.bar(mockController, barRequest)); - control.verify(); - } - - public void testNewReflectiveService() { - ServiceWithNoOuter.Interface impl = - control.createMock(ServiceWithNoOuter.Interface.class); - RpcController controller = control.createMock(RpcController.class); - Service service = ServiceWithNoOuter.newReflectiveService(impl); - - MethodDescriptor fooMethod = - ServiceWithNoOuter.getDescriptor().findMethodByName("Foo"); - MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); - RpcCallback callback = new RpcCallback() { - public void run(Message parameter) { - // No reason this should be run. - fail(); - } - }; - RpcCallback specializedCallback = - RpcUtil.specializeCallback(callback); - - impl.foo(EasyMock.same(controller), EasyMock.same(request), - EasyMock.same(specializedCallback)); - EasyMock.expectLastCall(); - - control.replay(); - - service.callMethod(fooMethod, controller, request, callback); - - control.verify(); - } - - public void testNewReflectiveBlockingService() throws ServiceException { - ServiceWithNoOuter.BlockingInterface impl = - control.createMock(ServiceWithNoOuter.BlockingInterface.class); - RpcController controller = control.createMock(RpcController.class); - BlockingService service = - ServiceWithNoOuter.newReflectiveBlockingService(impl); - - MethodDescriptor fooMethod = - ServiceWithNoOuter.getDescriptor().findMethodByName("Foo"); - MessageWithNoOuter request = MessageWithNoOuter.getDefaultInstance(); - - TestAllTypes expectedResponse = TestAllTypes.getDefaultInstance(); - EasyMock.expect(impl.foo(EasyMock.same(controller), EasyMock.same(request))) - .andReturn(expectedResponse); - - control.replay(); - - Message response = - service.callBlockingMethod(fooMethod, controller, request); - assertEquals(expectedResponse, response); - - control.verify(); - } - - public void testNoGenericServices() throws Exception { - // Non-services should be usable. - UnittestNoGenericServices.TestMessage message = - UnittestNoGenericServices.TestMessage.newBuilder() - .setA(123) - .setExtension(UnittestNoGenericServices.testExtension, 456) - .build(); - assertEquals(123, message.getA()); - assertEquals(1, UnittestNoGenericServices.TestEnum.FOO.getNumber()); - - // Build a list of the class names nested in UnittestNoGenericServices. - String outerName = "google.protobuf.no_generic_services_test." + - "UnittestNoGenericServices"; - Class outerClass = Class.forName(outerName); - - Set innerClassNames = new HashSet(); - for (Class innerClass : outerClass.getClasses()) { - String fullName = innerClass.getName(); - // Figure out the unqualified name of the inner class. - // Note: Surprisingly, the full name of an inner class will be separated - // from the outer class name by a '$' rather than a '.'. This is not - // mentioned in the documentation for java.lang.Class. I don't want to - // make assumptions, so I'm just going to accept any character as the - // separator. - assertTrue(fullName.startsWith(outerName)); - - if (!Service.class.isAssignableFrom(innerClass) && - !Message.class.isAssignableFrom(innerClass) && - !ProtocolMessageEnum.class.isAssignableFrom(innerClass)) { - // Ignore any classes not generated by the base code generator. - continue; - } - - innerClassNames.add(fullName.substring(outerName.length() + 1)); - } - - // No service class should have been generated. - assertTrue(innerClassNames.contains("TestMessage")); - assertTrue(innerClassNames.contains("TestEnum")); - assertFalse(innerClassNames.contains("TestService")); - - // But descriptors are there. - FileDescriptor file = UnittestNoGenericServices.getDescriptor(); - assertEquals(1, file.getServices().size()); - assertEquals("TestService", file.getServices().get(0).getName()); - assertEquals(1, file.getServices().get(0).getMethods().size()); - assertEquals("Foo", - file.getServices().get(0).getMethods().get(0).getName()); - } - - // ================================================================= - - /** - * wrapsCallback() is an EasyMock argument predicate. wrapsCallback(c) - * matches a callback if calling that callback causes c to be called. - * In other words, c wraps the given callback. - */ - private RpcCallback wrapsCallback( - MockCallback callback) { - EasyMock.reportMatcher(new WrapsCallback(callback)); - return null; - } - - /** The parameter to wrapsCallback() must be a MockCallback. */ - private static class MockCallback - implements RpcCallback { - private boolean called = false; - - public boolean isCalled() { return called; } - - public void reset() { called = false; } - public void run(Type message) { called = true; } - } - - /** Implementation of the wrapsCallback() argument matcher. */ - private static class WrapsCallback implements IArgumentMatcher { - private MockCallback callback; - - public WrapsCallback(MockCallback callback) { - this.callback = callback; - } - - @SuppressWarnings("unchecked") - public boolean matches(Object actual) { - if (!(actual instanceof RpcCallback)) { - return false; - } - RpcCallback actualCallback = (RpcCallback)actual; - - callback.reset(); - actualCallback.run(null); - return callback.isCalled(); - } - - public void appendTo(StringBuffer buffer) { - buffer.append("wrapsCallback(mockCallback)"); - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java deleted file mode 100644 index 5c2f7e75..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java +++ /dev/null @@ -1,155 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllTypesOrBuilder; - -import junit.framework.TestCase; - -/** - * Tests for {@link SingleFieldBuilder}. This tests basic functionality. - * More extensive testing is provided via other tests that exercise the - * builder. - * - * @author jonp@google.com (Jon Perlow) - */ -public class SingleFieldBuilderTest extends TestCase { - - public void testBasicUseAndInvalidations() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - TestAllTypes.getDefaultInstance(), - mockParent, - false); - assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - assertEquals(TestAllTypes.getDefaultInstance(), - builder.getBuilder().buildPartial()); - assertEquals(0, mockParent.getInvalidationCount()); - - builder.getBuilder().setOptionalInt32(10); - assertEquals(0, mockParent.getInvalidationCount()); - TestAllTypes message = builder.build(); - assertEquals(10, message.getOptionalInt32()); - - // Test that we receive invalidations now that build has been called. - assertEquals(0, mockParent.getInvalidationCount()); - builder.getBuilder().setOptionalInt32(20); - assertEquals(1, mockParent.getInvalidationCount()); - - // Test that we don't keep getting invalidations on every change - builder.getBuilder().setOptionalInt32(30); - assertEquals(1, mockParent.getInvalidationCount()); - - } - - public void testSetMessage() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - TestAllTypes.getDefaultInstance(), - mockParent, - false); - builder.setMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); - assertEquals(0, builder.getMessage().getOptionalInt32()); - - // Update message using the builder - builder.getBuilder().setOptionalInt32(1); - assertEquals(0, mockParent.getInvalidationCount()); - assertEquals(1, builder.getBuilder().getOptionalInt32()); - assertEquals(1, builder.getMessage().getOptionalInt32()); - builder.build(); - builder.getBuilder().setOptionalInt32(2); - assertEquals(2, builder.getBuilder().getOptionalInt32()); - assertEquals(2, builder.getMessage().getOptionalInt32()); - - // Make sure message stays cached - assertSame(builder.getMessage(), builder.getMessage()); - } - - public void testClear() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - TestAllTypes.getDefaultInstance(), - mockParent, - false); - builder.setMessage(TestAllTypes.newBuilder().setOptionalInt32(0).build()); - assertNotSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - builder.clear(); - assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - - builder.getBuilder().setOptionalInt32(1); - assertNotSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - builder.clear(); - assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - } - - public void testMerge() { - TestUtil.MockBuilderParent mockParent = new TestUtil.MockBuilderParent(); - SingleFieldBuilder builder = - new SingleFieldBuilder( - TestAllTypes.getDefaultInstance(), - mockParent, - false); - - // Merge into default field. - builder.mergeFrom(TestAllTypes.getDefaultInstance()); - assertSame(TestAllTypes.getDefaultInstance(), builder.getMessage()); - - // Merge into non-default field on existing builder. - builder.getBuilder().setOptionalInt32(2); - builder.mergeFrom(TestAllTypes.newBuilder() - .setOptionalDouble(4.0) - .buildPartial()); - assertEquals(2, builder.getMessage().getOptionalInt32()); - assertEquals(4.0, builder.getMessage().getOptionalDouble()); - - // Merge into non-default field on existing message - builder.setMessage(TestAllTypes.newBuilder() - .setOptionalInt32(10) - .buildPartial()); - builder.mergeFrom(TestAllTypes.newBuilder() - .setOptionalDouble(5.0) - .buildPartial()); - assertEquals(10, builder.getMessage().getOptionalInt32()); - assertEquals(5.0, builder.getMessage().getOptionalDouble()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java deleted file mode 100644 index 922115fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java +++ /dev/null @@ -1,378 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import junit.framework.TestCase; - -import java.util.AbstractMap.SimpleEntry; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; - -/** - * @author darick@google.com Darick Tong - */ -public class SmallSortedMapTest extends TestCase { - - public void testPutAndGetArrayEntriesOnly() { - runPutAndGetTest(3); - } - - public void testPutAndGetOverflowEntries() { - runPutAndGetTest(6); - } - - private void runPutAndGetTest(int numElements) { - // Test with even and odd arraySize - SmallSortedMap map1 = - SmallSortedMap.newInstanceForTest(3); - SmallSortedMap map2 = - SmallSortedMap.newInstanceForTest(4); - SmallSortedMap map3 = - SmallSortedMap.newInstanceForTest(3); - SmallSortedMap map4 = - SmallSortedMap.newInstanceForTest(4); - - // Test with puts in ascending order. - for (int i = 0; i < numElements; i++) { - assertNull(map1.put(i, i + 1)); - assertNull(map2.put(i, i + 1)); - } - // Test with puts in descending order. - for (int i = numElements - 1; i >= 0; i--) { - assertNull(map3.put(i, i + 1)); - assertNull(map4.put(i, i + 1)); - } - - assertEquals(Math.min(3, numElements), map1.getNumArrayEntries()); - assertEquals(Math.min(4, numElements), map2.getNumArrayEntries()); - assertEquals(Math.min(3, numElements), map3.getNumArrayEntries()); - assertEquals(Math.min(4, numElements), map4.getNumArrayEntries()); - - List> allMaps = - new ArrayList>(); - allMaps.add(map1); - allMaps.add(map2); - allMaps.add(map3); - allMaps.add(map4); - - for (SmallSortedMap map : allMaps) { - assertEquals(numElements, map.size()); - for (int i = 0; i < numElements; i++) { - assertEquals(new Integer(i + 1), map.get(i)); - } - } - - assertEquals(map1, map2); - assertEquals(map2, map3); - assertEquals(map3, map4); - } - - public void testReplacingPut() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - assertNull(map.remove(i + 1)); - } - for (int i = 0; i < 6; i++) { - assertEquals(new Integer(i + 1), map.put(i, i + 2)); - } - } - - public void testRemove() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - assertNull(map.remove(i + 1)); - } - - assertEquals(3, map.getNumArrayEntries()); - assertEquals(3, map.getNumOverflowEntries()); - assertEquals(6, map.size()); - assertEquals(makeSortedKeySet(0, 1, 2, 3, 4, 5), map.keySet()); - - assertEquals(new Integer(2), map.remove(1)); - assertEquals(3, map.getNumArrayEntries()); - assertEquals(2, map.getNumOverflowEntries()); - assertEquals(5, map.size()); - assertEquals(makeSortedKeySet(0, 2, 3, 4, 5), map.keySet()); - - assertEquals(new Integer(5), map.remove(4)); - assertEquals(3, map.getNumArrayEntries()); - assertEquals(1, map.getNumOverflowEntries()); - assertEquals(4, map.size()); - assertEquals(makeSortedKeySet(0, 2, 3, 5), map.keySet()); - - assertEquals(new Integer(4), map.remove(3)); - assertEquals(3, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(3, map.size()); - assertEquals(makeSortedKeySet(0, 2, 5), map.keySet()); - - assertNull(map.remove(3)); - assertEquals(3, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(3, map.size()); - - assertEquals(new Integer(1), map.remove(0)); - assertEquals(2, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(2, map.size()); - } - - public void testClear() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - map.clear(); - assertEquals(0, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(0, map.size()); - } - - public void testGetArrayEntryAndOverflowEntries() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - assertEquals(3, map.getNumArrayEntries()); - for (int i = 0; i < 3; i++) { - Map.Entry entry = map.getArrayEntryAt(i); - assertEquals(new Integer(i), entry.getKey()); - assertEquals(new Integer(i + 1), entry.getValue()); - } - Iterator> it = - map.getOverflowEntries().iterator(); - for (int i = 3; i < 6; i++) { - assertTrue(it.hasNext()); - Map.Entry entry = it.next(); - assertEquals(new Integer(i), entry.getKey()); - assertEquals(new Integer(i + 1), entry.getValue()); - } - assertFalse(it.hasNext()); - } - - public void testEntrySetContains() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - Set> entrySet = map.entrySet(); - for (int i = 0; i < 6; i++) { - assertTrue( - entrySet.contains(new SimpleEntry(i, i + 1))); - assertFalse( - entrySet.contains(new SimpleEntry(i, i))); - } - } - - public void testEntrySetAdd() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - Set> entrySet = map.entrySet(); - for (int i = 0; i < 6; i++) { - Map.Entry entry = - new SimpleEntry(i, i + 1); - assertTrue(entrySet.add(entry)); - assertFalse(entrySet.add(entry)); - } - for (int i = 0; i < 6; i++) { - assertEquals(new Integer(i + 1), map.get(i)); - } - assertEquals(3, map.getNumArrayEntries()); - assertEquals(3, map.getNumOverflowEntries()); - assertEquals(6, map.size()); - } - - public void testEntrySetRemove() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - Set> entrySet = map.entrySet(); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - for (int i = 0; i < 6; i++) { - Map.Entry entry = - new SimpleEntry(i, i + 1); - assertTrue(entrySet.remove(entry)); - assertFalse(entrySet.remove(entry)); - } - assertTrue(map.isEmpty()); - assertEquals(0, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(0, map.size()); - } - - public void testEntrySetClear() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - map.entrySet().clear(); - assertTrue(map.isEmpty()); - assertEquals(0, map.getNumArrayEntries()); - assertEquals(0, map.getNumOverflowEntries()); - assertEquals(0, map.size()); - } - - public void testEntrySetIteratorNext() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - Iterator> it = map.entrySet().iterator(); - for (int i = 0; i < 6; i++) { - assertTrue(it.hasNext()); - Map.Entry entry = it.next(); - assertEquals(new Integer(i), entry.getKey()); - assertEquals(new Integer(i + 1), entry.getValue()); - } - assertFalse(it.hasNext()); - } - - public void testEntrySetIteratorRemove() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - Iterator> it = map.entrySet().iterator(); - for (int i = 0; i < 6; i++) { - assertTrue(map.containsKey(i)); - it.next(); - it.remove(); - assertFalse(map.containsKey(i)); - assertEquals(6 - i - 1, map.size()); - } - } - - public void testMapEntryModification() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - Iterator> it = map.entrySet().iterator(); - for (int i = 0; i < 6; i++) { - Map.Entry entry = it.next(); - entry.setValue(i + 23); - } - for (int i = 0; i < 6; i++) { - assertEquals(new Integer(i + 23), map.get(i)); - } - } - - public void testMakeImmutable() { - SmallSortedMap map = SmallSortedMap.newInstanceForTest(3); - for (int i = 0; i < 6; i++) { - assertNull(map.put(i, i + 1)); - } - map.makeImmutable(); - assertEquals(new Integer(1), map.get(0)); - assertEquals(6, map.size()); - - try { - map.put(23, 23); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - Map other = new HashMap(); - other.put(23, 23); - try { - map.putAll(other); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - try { - map.remove(0); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - try { - map.clear(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - Set> entrySet = map.entrySet(); - try { - entrySet.clear(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - Iterator> it = entrySet.iterator(); - while (it.hasNext()) { - Map.Entry entry = it.next(); - try { - entry.setValue(0); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - try { - it.remove(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - } - - Set keySet = map.keySet(); - try { - keySet.clear(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - - Iterator keys = keySet.iterator(); - while (keys.hasNext()) { - Integer key = keys.next(); - try { - keySet.remove(key); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - try { - keys.remove(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException expected) { - } - } - } - - private Set makeSortedKeySet(Integer... keys) { - return new TreeSet(Arrays.asList(keys)); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java deleted file mode 100644 index 6feec4e6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java +++ /dev/null @@ -1,49 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import junit.framework.TestCase; - -/** - * Tests that proto2 api generation doesn't cause compile errors when - * compiling protocol buffers that have names that would otherwise conflict - * if not fully qualified (like @Deprecated and @Override). - * - * @author jonp@google.com (Jon Perlow) - */ -public class TestBadIdentifiers extends TestCase { - - public void testCompilation() { - // If this compiles, it means the generation was correct. - TestBadIdentifiersProto.Deprecated.newBuilder(); - TestBadIdentifiersProto.Override.newBuilder(); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java deleted file mode 100644 index 7c458d75..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java +++ /dev/null @@ -1,3811 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto; -import com.google.protobuf.UnittestLite; - -// The static imports are to avoid 100+ char lines. The following is roughly equivalent to -// import static protobuf_unittest.UnittestProto.*; -import static protobuf_unittest.UnittestProto.defaultInt32Extension; -import static protobuf_unittest.UnittestProto.defaultInt64Extension; -import static protobuf_unittest.UnittestProto.defaultUint32Extension; -import static protobuf_unittest.UnittestProto.defaultUint64Extension; -import static protobuf_unittest.UnittestProto.defaultSint32Extension; -import static protobuf_unittest.UnittestProto.defaultSint64Extension; -import static protobuf_unittest.UnittestProto.defaultFixed32Extension; -import static protobuf_unittest.UnittestProto.defaultFixed64Extension; -import static protobuf_unittest.UnittestProto.defaultSfixed32Extension; -import static protobuf_unittest.UnittestProto.defaultSfixed64Extension; -import static protobuf_unittest.UnittestProto.defaultFloatExtension; -import static protobuf_unittest.UnittestProto.defaultDoubleExtension; -import static protobuf_unittest.UnittestProto.defaultBoolExtension; -import static protobuf_unittest.UnittestProto.defaultStringExtension; -import static protobuf_unittest.UnittestProto.defaultBytesExtension; -import static protobuf_unittest.UnittestProto.defaultNestedEnumExtension; -import static protobuf_unittest.UnittestProto.defaultForeignEnumExtension; -import static protobuf_unittest.UnittestProto.defaultImportEnumExtension; -import static protobuf_unittest.UnittestProto.defaultStringPieceExtension; -import static protobuf_unittest.UnittestProto.defaultCordExtension; - -import static protobuf_unittest.UnittestProto.optionalInt32Extension; -import static protobuf_unittest.UnittestProto.optionalInt64Extension; -import static protobuf_unittest.UnittestProto.optionalUint32Extension; -import static protobuf_unittest.UnittestProto.optionalUint64Extension; -import static protobuf_unittest.UnittestProto.optionalSint32Extension; -import static protobuf_unittest.UnittestProto.optionalSint64Extension; -import static protobuf_unittest.UnittestProto.optionalFixed32Extension; -import static protobuf_unittest.UnittestProto.optionalFixed64Extension; -import static protobuf_unittest.UnittestProto.optionalSfixed32Extension; -import static protobuf_unittest.UnittestProto.optionalSfixed64Extension; -import static protobuf_unittest.UnittestProto.optionalFloatExtension; -import static protobuf_unittest.UnittestProto.optionalDoubleExtension; -import static protobuf_unittest.UnittestProto.optionalBoolExtension; -import static protobuf_unittest.UnittestProto.optionalStringExtension; -import static protobuf_unittest.UnittestProto.optionalBytesExtension; -import static protobuf_unittest.UnittestProto.optionalGroupExtension; -import static protobuf_unittest.UnittestProto.optionalNestedMessageExtension; -import static protobuf_unittest.UnittestProto.optionalForeignMessageExtension; -import static protobuf_unittest.UnittestProto.optionalImportMessageExtension; -import static protobuf_unittest.UnittestProto.optionalNestedEnumExtension; -import static protobuf_unittest.UnittestProto.optionalForeignEnumExtension; -import static protobuf_unittest.UnittestProto.optionalImportEnumExtension; -import static protobuf_unittest.UnittestProto.optionalStringPieceExtension; -import static protobuf_unittest.UnittestProto.optionalCordExtension; - -import static protobuf_unittest.UnittestProto.repeatedInt32Extension; -import static protobuf_unittest.UnittestProto.repeatedInt64Extension; -import static protobuf_unittest.UnittestProto.repeatedUint32Extension; -import static protobuf_unittest.UnittestProto.repeatedUint64Extension; -import static protobuf_unittest.UnittestProto.repeatedSint32Extension; -import static protobuf_unittest.UnittestProto.repeatedSint64Extension; -import static protobuf_unittest.UnittestProto.repeatedFixed32Extension; -import static protobuf_unittest.UnittestProto.repeatedFixed64Extension; -import static protobuf_unittest.UnittestProto.repeatedSfixed32Extension; -import static protobuf_unittest.UnittestProto.repeatedSfixed64Extension; -import static protobuf_unittest.UnittestProto.repeatedFloatExtension; -import static protobuf_unittest.UnittestProto.repeatedDoubleExtension; -import static protobuf_unittest.UnittestProto.repeatedBoolExtension; -import static protobuf_unittest.UnittestProto.repeatedStringExtension; -import static protobuf_unittest.UnittestProto.repeatedBytesExtension; -import static protobuf_unittest.UnittestProto.repeatedGroupExtension; -import static protobuf_unittest.UnittestProto.repeatedNestedMessageExtension; -import static protobuf_unittest.UnittestProto.repeatedForeignMessageExtension; -import static protobuf_unittest.UnittestProto.repeatedImportMessageExtension; -import static protobuf_unittest.UnittestProto.repeatedNestedEnumExtension; -import static protobuf_unittest.UnittestProto.repeatedForeignEnumExtension; -import static protobuf_unittest.UnittestProto.repeatedImportEnumExtension; -import static protobuf_unittest.UnittestProto.repeatedStringPieceExtension; -import static protobuf_unittest.UnittestProto.repeatedCordExtension; - -import static protobuf_unittest.UnittestProto.OptionalGroup_extension; -import static protobuf_unittest.UnittestProto.RepeatedGroup_extension; - -import static protobuf_unittest.UnittestProto.packedInt32Extension; -import static protobuf_unittest.UnittestProto.packedInt64Extension; -import static protobuf_unittest.UnittestProto.packedUint32Extension; -import static protobuf_unittest.UnittestProto.packedUint64Extension; -import static protobuf_unittest.UnittestProto.packedSint32Extension; -import static protobuf_unittest.UnittestProto.packedSint64Extension; -import static protobuf_unittest.UnittestProto.packedFixed32Extension; -import static protobuf_unittest.UnittestProto.packedFixed64Extension; -import static protobuf_unittest.UnittestProto.packedSfixed32Extension; -import static protobuf_unittest.UnittestProto.packedSfixed64Extension; -import static protobuf_unittest.UnittestProto.packedFloatExtension; -import static protobuf_unittest.UnittestProto.packedDoubleExtension; -import static protobuf_unittest.UnittestProto.packedBoolExtension; -import static protobuf_unittest.UnittestProto.packedEnumExtension; - -import static com.google.protobuf.UnittestLite.defaultInt32ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultInt64ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultUint32ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultUint64ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultSint32ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultSint64ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultFixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultFixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultSfixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultSfixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.defaultFloatExtensionLite; -import static com.google.protobuf.UnittestLite.defaultDoubleExtensionLite; -import static com.google.protobuf.UnittestLite.defaultBoolExtensionLite; -import static com.google.protobuf.UnittestLite.defaultStringExtensionLite; -import static com.google.protobuf.UnittestLite.defaultBytesExtensionLite; -import static com.google.protobuf.UnittestLite.defaultNestedEnumExtensionLite; -import static com.google.protobuf.UnittestLite.defaultForeignEnumExtensionLite; -import static com.google.protobuf.UnittestLite.defaultImportEnumExtensionLite; -import static com.google.protobuf.UnittestLite.defaultStringPieceExtensionLite; -import static com.google.protobuf.UnittestLite.defaultCordExtensionLite; - -import static com.google.protobuf.UnittestLite.optionalInt32ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalInt64ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalUint32ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalUint64ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalSint32ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalSint64ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalFixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalFixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalSfixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalSfixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.optionalFloatExtensionLite; -import static com.google.protobuf.UnittestLite.optionalDoubleExtensionLite; -import static com.google.protobuf.UnittestLite.optionalBoolExtensionLite; -import static com.google.protobuf.UnittestLite.optionalStringExtensionLite; -import static com.google.protobuf.UnittestLite.optionalBytesExtensionLite; -import static com.google.protobuf.UnittestLite.optionalGroupExtensionLite; -import static com.google.protobuf.UnittestLite.optionalNestedMessageExtensionLite; -import static com.google.protobuf.UnittestLite.optionalForeignMessageExtensionLite; -import static com.google.protobuf.UnittestLite.optionalImportMessageExtensionLite; -import static com.google.protobuf.UnittestLite.optionalNestedEnumExtensionLite; -import static com.google.protobuf.UnittestLite.optionalForeignEnumExtensionLite; -import static com.google.protobuf.UnittestLite.optionalImportEnumExtensionLite; -import static com.google.protobuf.UnittestLite.optionalStringPieceExtensionLite; -import static com.google.protobuf.UnittestLite.optionalCordExtensionLite; - -import static com.google.protobuf.UnittestLite.repeatedInt32ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedInt64ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedUint32ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedUint64ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedSint32ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedSint64ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedFixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedFixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedSfixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedSfixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedFloatExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedDoubleExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedBoolExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedStringExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedBytesExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedGroupExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedNestedMessageExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedForeignMessageExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedImportMessageExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedNestedEnumExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedForeignEnumExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedImportEnumExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedStringPieceExtensionLite; -import static com.google.protobuf.UnittestLite.repeatedCordExtensionLite; - -import static com.google.protobuf.UnittestLite.OptionalGroup_extension_lite; -import static com.google.protobuf.UnittestLite.RepeatedGroup_extension_lite; - -import static com.google.protobuf.UnittestLite.packedInt32ExtensionLite; -import static com.google.protobuf.UnittestLite.packedInt64ExtensionLite; -import static com.google.protobuf.UnittestLite.packedUint32ExtensionLite; -import static com.google.protobuf.UnittestLite.packedUint64ExtensionLite; -import static com.google.protobuf.UnittestLite.packedSint32ExtensionLite; -import static com.google.protobuf.UnittestLite.packedSint64ExtensionLite; -import static com.google.protobuf.UnittestLite.packedFixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.packedFixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.packedSfixed32ExtensionLite; -import static com.google.protobuf.UnittestLite.packedSfixed64ExtensionLite; -import static com.google.protobuf.UnittestLite.packedFloatExtensionLite; -import static com.google.protobuf.UnittestLite.packedDoubleExtensionLite; -import static com.google.protobuf.UnittestLite.packedBoolExtensionLite; -import static com.google.protobuf.UnittestLite.packedEnumExtensionLite; - -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllExtensionsOrBuilder; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllTypesOrBuilder; -import protobuf_unittest.UnittestProto.TestPackedExtensions; -import protobuf_unittest.UnittestProto.TestPackedTypes; -import protobuf_unittest.UnittestProto.TestUnpackedTypes; -import protobuf_unittest.UnittestProto.ForeignMessage; -import protobuf_unittest.UnittestProto.ForeignEnum; -import com.google.protobuf.test.UnittestImport.ImportMessage; -import com.google.protobuf.test.UnittestImport.ImportEnum; - -import com.google.protobuf.UnittestLite.TestAllTypesLite; -import com.google.protobuf.UnittestLite.TestAllExtensionsLite; -import com.google.protobuf.UnittestLite.TestAllExtensionsLiteOrBuilder; -import com.google.protobuf.UnittestLite.TestPackedExtensionsLite; -import com.google.protobuf.UnittestLite.ForeignMessageLite; -import com.google.protobuf.UnittestLite.ForeignEnumLite; -import com.google.protobuf.UnittestImportLite.ImportMessageLite; -import com.google.protobuf.UnittestImportLite.ImportEnumLite; - -import junit.framework.Assert; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; - -/** - * Contains methods for setting all fields of {@code TestAllTypes} to - * some vaules as well as checking that all the fields are set to those values. - * These are useful for testing various protocol message features, e.g. - * set all fields of a message, serialize it, parse it, and check that all - * fields are set. - * - *

This code is not to be used outside of {@code com.google.protobuf} and - * subpackages. - * - * @author kenton@google.com Kenton Varda - */ -public final class TestUtil { - private TestUtil() {} - - /** Helper to convert a String to ByteString. */ - static ByteString toBytes(String str) { - try { - return ByteString.copyFrom(str.getBytes("UTF-8")); - } catch(java.io.UnsupportedEncodingException e) { - throw new RuntimeException("UTF-8 not supported.", e); - } - } - - /** - * Get a {@code TestAllTypes} with all fields set as they would be by - * {@link #setAllFields(TestAllTypes.Builder)}. - */ - public static TestAllTypes getAllSet() { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - setAllFields(builder); - return builder.build(); - } - - /** - * Get a {@code TestAllExtensions} with all fields set as they would be by - * {@link #setAllExtensions(TestAllExtensions.Builder)}. - */ - public static TestAllExtensions getAllExtensionsSet() { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - setAllExtensions(builder); - return builder.build(); - } - - public static TestAllExtensionsLite getAllLiteExtensionsSet() { - TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.newBuilder(); - setAllExtensions(builder); - return builder.build(); - } - - public static TestPackedTypes getPackedSet() { - TestPackedTypes.Builder builder = TestPackedTypes.newBuilder(); - setPackedFields(builder); - return builder.build(); - } - - public static TestUnpackedTypes getUnpackedSet() { - TestUnpackedTypes.Builder builder = TestUnpackedTypes.newBuilder(); - setUnpackedFields(builder); - return builder.build(); - } - - public static TestPackedExtensions getPackedExtensionsSet() { - TestPackedExtensions.Builder builder = TestPackedExtensions.newBuilder(); - setPackedExtensions(builder); - return builder.build(); - } - - public static TestPackedExtensionsLite getLitePackedExtensionsSet() { - TestPackedExtensionsLite.Builder builder = - TestPackedExtensionsLite.newBuilder(); - setPackedExtensions(builder); - return builder.build(); - } - - /** - * Set every field of {@code message} to the values expected by - * {@code assertAllFieldsSet()}. - */ - public static void setAllFields(TestAllTypes.Builder message) { - message.setOptionalInt32 (101); - message.setOptionalInt64 (102); - message.setOptionalUint32 (103); - message.setOptionalUint64 (104); - message.setOptionalSint32 (105); - message.setOptionalSint64 (106); - message.setOptionalFixed32 (107); - message.setOptionalFixed64 (108); - message.setOptionalSfixed32(109); - message.setOptionalSfixed64(110); - message.setOptionalFloat (111); - message.setOptionalDouble (112); - message.setOptionalBool (true); - message.setOptionalString ("115"); - message.setOptionalBytes (toBytes("116")); - - message.setOptionalGroup( - TestAllTypes.OptionalGroup.newBuilder().setA(117).build()); - message.setOptionalNestedMessage( - TestAllTypes.NestedMessage.newBuilder().setBb(118).build()); - message.setOptionalForeignMessage( - ForeignMessage.newBuilder().setC(119).build()); - message.setOptionalImportMessage( - ImportMessage.newBuilder().setD(120).build()); - - message.setOptionalNestedEnum (TestAllTypes.NestedEnum.BAZ); - message.setOptionalForeignEnum(ForeignEnum.FOREIGN_BAZ); - message.setOptionalImportEnum (ImportEnum.IMPORT_BAZ); - - message.setOptionalStringPiece("124"); - message.setOptionalCord("125"); - - // ----------------------------------------------------------------- - - message.addRepeatedInt32 (201); - message.addRepeatedInt64 (202); - message.addRepeatedUint32 (203); - message.addRepeatedUint64 (204); - message.addRepeatedSint32 (205); - message.addRepeatedSint64 (206); - message.addRepeatedFixed32 (207); - message.addRepeatedFixed64 (208); - message.addRepeatedSfixed32(209); - message.addRepeatedSfixed64(210); - message.addRepeatedFloat (211); - message.addRepeatedDouble (212); - message.addRepeatedBool (true); - message.addRepeatedString ("215"); - message.addRepeatedBytes (toBytes("216")); - - message.addRepeatedGroup( - TestAllTypes.RepeatedGroup.newBuilder().setA(217).build()); - message.addRepeatedNestedMessage( - TestAllTypes.NestedMessage.newBuilder().setBb(218).build()); - message.addRepeatedForeignMessage( - ForeignMessage.newBuilder().setC(219).build()); - message.addRepeatedImportMessage( - ImportMessage.newBuilder().setD(220).build()); - - message.addRepeatedNestedEnum (TestAllTypes.NestedEnum.BAR); - message.addRepeatedForeignEnum(ForeignEnum.FOREIGN_BAR); - message.addRepeatedImportEnum (ImportEnum.IMPORT_BAR); - - message.addRepeatedStringPiece("224"); - message.addRepeatedCord("225"); - - // Add a second one of each field. - message.addRepeatedInt32 (301); - message.addRepeatedInt64 (302); - message.addRepeatedUint32 (303); - message.addRepeatedUint64 (304); - message.addRepeatedSint32 (305); - message.addRepeatedSint64 (306); - message.addRepeatedFixed32 (307); - message.addRepeatedFixed64 (308); - message.addRepeatedSfixed32(309); - message.addRepeatedSfixed64(310); - message.addRepeatedFloat (311); - message.addRepeatedDouble (312); - message.addRepeatedBool (false); - message.addRepeatedString ("315"); - message.addRepeatedBytes (toBytes("316")); - - message.addRepeatedGroup( - TestAllTypes.RepeatedGroup.newBuilder().setA(317).build()); - message.addRepeatedNestedMessage( - TestAllTypes.NestedMessage.newBuilder().setBb(318).build()); - message.addRepeatedForeignMessage( - ForeignMessage.newBuilder().setC(319).build()); - message.addRepeatedImportMessage( - ImportMessage.newBuilder().setD(320).build()); - - message.addRepeatedNestedEnum (TestAllTypes.NestedEnum.BAZ); - message.addRepeatedForeignEnum(ForeignEnum.FOREIGN_BAZ); - message.addRepeatedImportEnum (ImportEnum.IMPORT_BAZ); - - message.addRepeatedStringPiece("324"); - message.addRepeatedCord("325"); - - // ----------------------------------------------------------------- - - message.setDefaultInt32 (401); - message.setDefaultInt64 (402); - message.setDefaultUint32 (403); - message.setDefaultUint64 (404); - message.setDefaultSint32 (405); - message.setDefaultSint64 (406); - message.setDefaultFixed32 (407); - message.setDefaultFixed64 (408); - message.setDefaultSfixed32(409); - message.setDefaultSfixed64(410); - message.setDefaultFloat (411); - message.setDefaultDouble (412); - message.setDefaultBool (false); - message.setDefaultString ("415"); - message.setDefaultBytes (toBytes("416")); - - message.setDefaultNestedEnum (TestAllTypes.NestedEnum.FOO); - message.setDefaultForeignEnum(ForeignEnum.FOREIGN_FOO); - message.setDefaultImportEnum (ImportEnum.IMPORT_FOO); - - message.setDefaultStringPiece("424"); - message.setDefaultCord("425"); - } - - // ------------------------------------------------------------------- - - /** - * Modify the repeated fields of {@code message} to contain the values - * expected by {@code assertRepeatedFieldsModified()}. - */ - public static void modifyRepeatedFields(TestAllTypes.Builder message) { - message.setRepeatedInt32 (1, 501); - message.setRepeatedInt64 (1, 502); - message.setRepeatedUint32 (1, 503); - message.setRepeatedUint64 (1, 504); - message.setRepeatedSint32 (1, 505); - message.setRepeatedSint64 (1, 506); - message.setRepeatedFixed32 (1, 507); - message.setRepeatedFixed64 (1, 508); - message.setRepeatedSfixed32(1, 509); - message.setRepeatedSfixed64(1, 510); - message.setRepeatedFloat (1, 511); - message.setRepeatedDouble (1, 512); - message.setRepeatedBool (1, true); - message.setRepeatedString (1, "515"); - message.setRepeatedBytes (1, toBytes("516")); - - message.setRepeatedGroup(1, - TestAllTypes.RepeatedGroup.newBuilder().setA(517).build()); - message.setRepeatedNestedMessage(1, - TestAllTypes.NestedMessage.newBuilder().setBb(518).build()); - message.setRepeatedForeignMessage(1, - ForeignMessage.newBuilder().setC(519).build()); - message.setRepeatedImportMessage(1, - ImportMessage.newBuilder().setD(520).build()); - - message.setRepeatedNestedEnum (1, TestAllTypes.NestedEnum.FOO); - message.setRepeatedForeignEnum(1, ForeignEnum.FOREIGN_FOO); - message.setRepeatedImportEnum (1, ImportEnum.IMPORT_FOO); - - message.setRepeatedStringPiece(1, "524"); - message.setRepeatedCord(1, "525"); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are set to the values assigned by {@code setAllFields}. - */ - public static void assertAllFieldsSet(TestAllTypesOrBuilder message) { - Assert.assertTrue(message.hasOptionalInt32 ()); - Assert.assertTrue(message.hasOptionalInt64 ()); - Assert.assertTrue(message.hasOptionalUint32 ()); - Assert.assertTrue(message.hasOptionalUint64 ()); - Assert.assertTrue(message.hasOptionalSint32 ()); - Assert.assertTrue(message.hasOptionalSint64 ()); - Assert.assertTrue(message.hasOptionalFixed32 ()); - Assert.assertTrue(message.hasOptionalFixed64 ()); - Assert.assertTrue(message.hasOptionalSfixed32()); - Assert.assertTrue(message.hasOptionalSfixed64()); - Assert.assertTrue(message.hasOptionalFloat ()); - Assert.assertTrue(message.hasOptionalDouble ()); - Assert.assertTrue(message.hasOptionalBool ()); - Assert.assertTrue(message.hasOptionalString ()); - Assert.assertTrue(message.hasOptionalBytes ()); - - Assert.assertTrue(message.hasOptionalGroup ()); - Assert.assertTrue(message.hasOptionalNestedMessage ()); - Assert.assertTrue(message.hasOptionalForeignMessage()); - Assert.assertTrue(message.hasOptionalImportMessage ()); - - Assert.assertTrue(message.getOptionalGroup ().hasA()); - Assert.assertTrue(message.getOptionalNestedMessage ().hasBb()); - Assert.assertTrue(message.getOptionalForeignMessage().hasC()); - Assert.assertTrue(message.getOptionalImportMessage ().hasD()); - - Assert.assertTrue(message.hasOptionalNestedEnum ()); - Assert.assertTrue(message.hasOptionalForeignEnum()); - Assert.assertTrue(message.hasOptionalImportEnum ()); - - Assert.assertTrue(message.hasOptionalStringPiece()); - Assert.assertTrue(message.hasOptionalCord()); - - Assert.assertEquals(101 , message.getOptionalInt32 ()); - Assert.assertEquals(102 , message.getOptionalInt64 ()); - Assert.assertEquals(103 , message.getOptionalUint32 ()); - Assert.assertEquals(104 , message.getOptionalUint64 ()); - Assert.assertEquals(105 , message.getOptionalSint32 ()); - Assert.assertEquals(106 , message.getOptionalSint64 ()); - Assert.assertEquals(107 , message.getOptionalFixed32 ()); - Assert.assertEquals(108 , message.getOptionalFixed64 ()); - Assert.assertEquals(109 , message.getOptionalSfixed32()); - Assert.assertEquals(110 , message.getOptionalSfixed64()); - Assert.assertEquals(111 , message.getOptionalFloat (), 0.0); - Assert.assertEquals(112 , message.getOptionalDouble (), 0.0); - Assert.assertEquals(true , message.getOptionalBool ()); - Assert.assertEquals("115", message.getOptionalString ()); - Assert.assertEquals(toBytes("116"), message.getOptionalBytes()); - - Assert.assertEquals(117, message.getOptionalGroup ().getA()); - Assert.assertEquals(118, message.getOptionalNestedMessage ().getBb()); - Assert.assertEquals(119, message.getOptionalForeignMessage().getC()); - Assert.assertEquals(120, message.getOptionalImportMessage ().getD()); - - Assert.assertEquals(TestAllTypes.NestedEnum.BAZ, message.getOptionalNestedEnum()); - Assert.assertEquals(ForeignEnum.FOREIGN_BAZ, message.getOptionalForeignEnum()); - Assert.assertEquals(ImportEnum.IMPORT_BAZ, message.getOptionalImportEnum()); - - Assert.assertEquals("124", message.getOptionalStringPiece()); - Assert.assertEquals("125", message.getOptionalCord()); - - // ----------------------------------------------------------------- - - Assert.assertEquals(2, message.getRepeatedInt32Count ()); - Assert.assertEquals(2, message.getRepeatedInt64Count ()); - Assert.assertEquals(2, message.getRepeatedUint32Count ()); - Assert.assertEquals(2, message.getRepeatedUint64Count ()); - Assert.assertEquals(2, message.getRepeatedSint32Count ()); - Assert.assertEquals(2, message.getRepeatedSint64Count ()); - Assert.assertEquals(2, message.getRepeatedFixed32Count ()); - Assert.assertEquals(2, message.getRepeatedFixed64Count ()); - Assert.assertEquals(2, message.getRepeatedSfixed32Count()); - Assert.assertEquals(2, message.getRepeatedSfixed64Count()); - Assert.assertEquals(2, message.getRepeatedFloatCount ()); - Assert.assertEquals(2, message.getRepeatedDoubleCount ()); - Assert.assertEquals(2, message.getRepeatedBoolCount ()); - Assert.assertEquals(2, message.getRepeatedStringCount ()); - Assert.assertEquals(2, message.getRepeatedBytesCount ()); - - Assert.assertEquals(2, message.getRepeatedGroupCount ()); - Assert.assertEquals(2, message.getRepeatedNestedMessageCount ()); - Assert.assertEquals(2, message.getRepeatedForeignMessageCount()); - Assert.assertEquals(2, message.getRepeatedImportMessageCount ()); - Assert.assertEquals(2, message.getRepeatedNestedEnumCount ()); - Assert.assertEquals(2, message.getRepeatedForeignEnumCount ()); - Assert.assertEquals(2, message.getRepeatedImportEnumCount ()); - - Assert.assertEquals(2, message.getRepeatedStringPieceCount()); - Assert.assertEquals(2, message.getRepeatedCordCount()); - - Assert.assertEquals(201 , message.getRepeatedInt32 (0)); - Assert.assertEquals(202 , message.getRepeatedInt64 (0)); - Assert.assertEquals(203 , message.getRepeatedUint32 (0)); - Assert.assertEquals(204 , message.getRepeatedUint64 (0)); - Assert.assertEquals(205 , message.getRepeatedSint32 (0)); - Assert.assertEquals(206 , message.getRepeatedSint64 (0)); - Assert.assertEquals(207 , message.getRepeatedFixed32 (0)); - Assert.assertEquals(208 , message.getRepeatedFixed64 (0)); - Assert.assertEquals(209 , message.getRepeatedSfixed32(0)); - Assert.assertEquals(210 , message.getRepeatedSfixed64(0)); - Assert.assertEquals(211 , message.getRepeatedFloat (0), 0.0); - Assert.assertEquals(212 , message.getRepeatedDouble (0), 0.0); - Assert.assertEquals(true , message.getRepeatedBool (0)); - Assert.assertEquals("215", message.getRepeatedString (0)); - Assert.assertEquals(toBytes("216"), message.getRepeatedBytes(0)); - - Assert.assertEquals(217, message.getRepeatedGroup (0).getA()); - Assert.assertEquals(218, message.getRepeatedNestedMessage (0).getBb()); - Assert.assertEquals(219, message.getRepeatedForeignMessage(0).getC()); - Assert.assertEquals(220, message.getRepeatedImportMessage (0).getD()); - - Assert.assertEquals(TestAllTypes.NestedEnum.BAR, message.getRepeatedNestedEnum (0)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAR, message.getRepeatedForeignEnum(0)); - Assert.assertEquals(ImportEnum.IMPORT_BAR, message.getRepeatedImportEnum(0)); - - Assert.assertEquals("224", message.getRepeatedStringPiece(0)); - Assert.assertEquals("225", message.getRepeatedCord(0)); - - Assert.assertEquals(301 , message.getRepeatedInt32 (1)); - Assert.assertEquals(302 , message.getRepeatedInt64 (1)); - Assert.assertEquals(303 , message.getRepeatedUint32 (1)); - Assert.assertEquals(304 , message.getRepeatedUint64 (1)); - Assert.assertEquals(305 , message.getRepeatedSint32 (1)); - Assert.assertEquals(306 , message.getRepeatedSint64 (1)); - Assert.assertEquals(307 , message.getRepeatedFixed32 (1)); - Assert.assertEquals(308 , message.getRepeatedFixed64 (1)); - Assert.assertEquals(309 , message.getRepeatedSfixed32(1)); - Assert.assertEquals(310 , message.getRepeatedSfixed64(1)); - Assert.assertEquals(311 , message.getRepeatedFloat (1), 0.0); - Assert.assertEquals(312 , message.getRepeatedDouble (1), 0.0); - Assert.assertEquals(false, message.getRepeatedBool (1)); - Assert.assertEquals("315", message.getRepeatedString (1)); - Assert.assertEquals(toBytes("316"), message.getRepeatedBytes(1)); - - Assert.assertEquals(317, message.getRepeatedGroup (1).getA()); - Assert.assertEquals(318, message.getRepeatedNestedMessage (1).getBb()); - Assert.assertEquals(319, message.getRepeatedForeignMessage(1).getC()); - Assert.assertEquals(320, message.getRepeatedImportMessage (1).getD()); - - Assert.assertEquals(TestAllTypes.NestedEnum.BAZ, message.getRepeatedNestedEnum (1)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAZ, message.getRepeatedForeignEnum(1)); - Assert.assertEquals(ImportEnum.IMPORT_BAZ, message.getRepeatedImportEnum(1)); - - Assert.assertEquals("324", message.getRepeatedStringPiece(1)); - Assert.assertEquals("325", message.getRepeatedCord(1)); - - // ----------------------------------------------------------------- - - Assert.assertTrue(message.hasDefaultInt32 ()); - Assert.assertTrue(message.hasDefaultInt64 ()); - Assert.assertTrue(message.hasDefaultUint32 ()); - Assert.assertTrue(message.hasDefaultUint64 ()); - Assert.assertTrue(message.hasDefaultSint32 ()); - Assert.assertTrue(message.hasDefaultSint64 ()); - Assert.assertTrue(message.hasDefaultFixed32 ()); - Assert.assertTrue(message.hasDefaultFixed64 ()); - Assert.assertTrue(message.hasDefaultSfixed32()); - Assert.assertTrue(message.hasDefaultSfixed64()); - Assert.assertTrue(message.hasDefaultFloat ()); - Assert.assertTrue(message.hasDefaultDouble ()); - Assert.assertTrue(message.hasDefaultBool ()); - Assert.assertTrue(message.hasDefaultString ()); - Assert.assertTrue(message.hasDefaultBytes ()); - - Assert.assertTrue(message.hasDefaultNestedEnum ()); - Assert.assertTrue(message.hasDefaultForeignEnum()); - Assert.assertTrue(message.hasDefaultImportEnum ()); - - Assert.assertTrue(message.hasDefaultStringPiece()); - Assert.assertTrue(message.hasDefaultCord()); - - Assert.assertEquals(401 , message.getDefaultInt32 ()); - Assert.assertEquals(402 , message.getDefaultInt64 ()); - Assert.assertEquals(403 , message.getDefaultUint32 ()); - Assert.assertEquals(404 , message.getDefaultUint64 ()); - Assert.assertEquals(405 , message.getDefaultSint32 ()); - Assert.assertEquals(406 , message.getDefaultSint64 ()); - Assert.assertEquals(407 , message.getDefaultFixed32 ()); - Assert.assertEquals(408 , message.getDefaultFixed64 ()); - Assert.assertEquals(409 , message.getDefaultSfixed32()); - Assert.assertEquals(410 , message.getDefaultSfixed64()); - Assert.assertEquals(411 , message.getDefaultFloat (), 0.0); - Assert.assertEquals(412 , message.getDefaultDouble (), 0.0); - Assert.assertEquals(false, message.getDefaultBool ()); - Assert.assertEquals("415", message.getDefaultString ()); - Assert.assertEquals(toBytes("416"), message.getDefaultBytes()); - - Assert.assertEquals(TestAllTypes.NestedEnum.FOO, message.getDefaultNestedEnum ()); - Assert.assertEquals(ForeignEnum.FOREIGN_FOO, message.getDefaultForeignEnum()); - Assert.assertEquals(ImportEnum.IMPORT_FOO, message.getDefaultImportEnum()); - - Assert.assertEquals("424", message.getDefaultStringPiece()); - Assert.assertEquals("425", message.getDefaultCord()); - } - - // ------------------------------------------------------------------- - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are cleared, and that getting the fields returns their - * default values. - */ - public static void assertClear(TestAllTypesOrBuilder message) { - // hasBlah() should initially be false for all optional fields. - Assert.assertFalse(message.hasOptionalInt32 ()); - Assert.assertFalse(message.hasOptionalInt64 ()); - Assert.assertFalse(message.hasOptionalUint32 ()); - Assert.assertFalse(message.hasOptionalUint64 ()); - Assert.assertFalse(message.hasOptionalSint32 ()); - Assert.assertFalse(message.hasOptionalSint64 ()); - Assert.assertFalse(message.hasOptionalFixed32 ()); - Assert.assertFalse(message.hasOptionalFixed64 ()); - Assert.assertFalse(message.hasOptionalSfixed32()); - Assert.assertFalse(message.hasOptionalSfixed64()); - Assert.assertFalse(message.hasOptionalFloat ()); - Assert.assertFalse(message.hasOptionalDouble ()); - Assert.assertFalse(message.hasOptionalBool ()); - Assert.assertFalse(message.hasOptionalString ()); - Assert.assertFalse(message.hasOptionalBytes ()); - - Assert.assertFalse(message.hasOptionalGroup ()); - Assert.assertFalse(message.hasOptionalNestedMessage ()); - Assert.assertFalse(message.hasOptionalForeignMessage()); - Assert.assertFalse(message.hasOptionalImportMessage ()); - - Assert.assertFalse(message.hasOptionalNestedEnum ()); - Assert.assertFalse(message.hasOptionalForeignEnum()); - Assert.assertFalse(message.hasOptionalImportEnum ()); - - Assert.assertFalse(message.hasOptionalStringPiece()); - Assert.assertFalse(message.hasOptionalCord()); - - // Optional fields without defaults are set to zero or something like it. - Assert.assertEquals(0 , message.getOptionalInt32 ()); - Assert.assertEquals(0 , message.getOptionalInt64 ()); - Assert.assertEquals(0 , message.getOptionalUint32 ()); - Assert.assertEquals(0 , message.getOptionalUint64 ()); - Assert.assertEquals(0 , message.getOptionalSint32 ()); - Assert.assertEquals(0 , message.getOptionalSint64 ()); - Assert.assertEquals(0 , message.getOptionalFixed32 ()); - Assert.assertEquals(0 , message.getOptionalFixed64 ()); - Assert.assertEquals(0 , message.getOptionalSfixed32()); - Assert.assertEquals(0 , message.getOptionalSfixed64()); - Assert.assertEquals(0 , message.getOptionalFloat (), 0.0); - Assert.assertEquals(0 , message.getOptionalDouble (), 0.0); - Assert.assertEquals(false, message.getOptionalBool ()); - Assert.assertEquals("" , message.getOptionalString ()); - Assert.assertEquals(ByteString.EMPTY, message.getOptionalBytes()); - - // Embedded messages should also be clear. - Assert.assertFalse(message.getOptionalGroup ().hasA()); - Assert.assertFalse(message.getOptionalNestedMessage ().hasBb()); - Assert.assertFalse(message.getOptionalForeignMessage().hasC()); - Assert.assertFalse(message.getOptionalImportMessage ().hasD()); - - Assert.assertEquals(0, message.getOptionalGroup ().getA()); - Assert.assertEquals(0, message.getOptionalNestedMessage ().getBb()); - Assert.assertEquals(0, message.getOptionalForeignMessage().getC()); - Assert.assertEquals(0, message.getOptionalImportMessage ().getD()); - - // Enums without defaults are set to the first value in the enum. - Assert.assertEquals(TestAllTypes.NestedEnum.FOO, message.getOptionalNestedEnum ()); - Assert.assertEquals(ForeignEnum.FOREIGN_FOO, message.getOptionalForeignEnum()); - Assert.assertEquals(ImportEnum.IMPORT_FOO, message.getOptionalImportEnum()); - - Assert.assertEquals("", message.getOptionalStringPiece()); - Assert.assertEquals("", message.getOptionalCord()); - - // Repeated fields are empty. - Assert.assertEquals(0, message.getRepeatedInt32Count ()); - Assert.assertEquals(0, message.getRepeatedInt64Count ()); - Assert.assertEquals(0, message.getRepeatedUint32Count ()); - Assert.assertEquals(0, message.getRepeatedUint64Count ()); - Assert.assertEquals(0, message.getRepeatedSint32Count ()); - Assert.assertEquals(0, message.getRepeatedSint64Count ()); - Assert.assertEquals(0, message.getRepeatedFixed32Count ()); - Assert.assertEquals(0, message.getRepeatedFixed64Count ()); - Assert.assertEquals(0, message.getRepeatedSfixed32Count()); - Assert.assertEquals(0, message.getRepeatedSfixed64Count()); - Assert.assertEquals(0, message.getRepeatedFloatCount ()); - Assert.assertEquals(0, message.getRepeatedDoubleCount ()); - Assert.assertEquals(0, message.getRepeatedBoolCount ()); - Assert.assertEquals(0, message.getRepeatedStringCount ()); - Assert.assertEquals(0, message.getRepeatedBytesCount ()); - - Assert.assertEquals(0, message.getRepeatedGroupCount ()); - Assert.assertEquals(0, message.getRepeatedNestedMessageCount ()); - Assert.assertEquals(0, message.getRepeatedForeignMessageCount()); - Assert.assertEquals(0, message.getRepeatedImportMessageCount ()); - Assert.assertEquals(0, message.getRepeatedNestedEnumCount ()); - Assert.assertEquals(0, message.getRepeatedForeignEnumCount ()); - Assert.assertEquals(0, message.getRepeatedImportEnumCount ()); - - Assert.assertEquals(0, message.getRepeatedStringPieceCount()); - Assert.assertEquals(0, message.getRepeatedCordCount()); - - // hasBlah() should also be false for all default fields. - Assert.assertFalse(message.hasDefaultInt32 ()); - Assert.assertFalse(message.hasDefaultInt64 ()); - Assert.assertFalse(message.hasDefaultUint32 ()); - Assert.assertFalse(message.hasDefaultUint64 ()); - Assert.assertFalse(message.hasDefaultSint32 ()); - Assert.assertFalse(message.hasDefaultSint64 ()); - Assert.assertFalse(message.hasDefaultFixed32 ()); - Assert.assertFalse(message.hasDefaultFixed64 ()); - Assert.assertFalse(message.hasDefaultSfixed32()); - Assert.assertFalse(message.hasDefaultSfixed64()); - Assert.assertFalse(message.hasDefaultFloat ()); - Assert.assertFalse(message.hasDefaultDouble ()); - Assert.assertFalse(message.hasDefaultBool ()); - Assert.assertFalse(message.hasDefaultString ()); - Assert.assertFalse(message.hasDefaultBytes ()); - - Assert.assertFalse(message.hasDefaultNestedEnum ()); - Assert.assertFalse(message.hasDefaultForeignEnum()); - Assert.assertFalse(message.hasDefaultImportEnum ()); - - Assert.assertFalse(message.hasDefaultStringPiece()); - Assert.assertFalse(message.hasDefaultCord()); - - // Fields with defaults have their default values (duh). - Assert.assertEquals( 41 , message.getDefaultInt32 ()); - Assert.assertEquals( 42 , message.getDefaultInt64 ()); - Assert.assertEquals( 43 , message.getDefaultUint32 ()); - Assert.assertEquals( 44 , message.getDefaultUint64 ()); - Assert.assertEquals(-45 , message.getDefaultSint32 ()); - Assert.assertEquals( 46 , message.getDefaultSint64 ()); - Assert.assertEquals( 47 , message.getDefaultFixed32 ()); - Assert.assertEquals( 48 , message.getDefaultFixed64 ()); - Assert.assertEquals( 49 , message.getDefaultSfixed32()); - Assert.assertEquals(-50 , message.getDefaultSfixed64()); - Assert.assertEquals( 51.5 , message.getDefaultFloat (), 0.0); - Assert.assertEquals( 52e3 , message.getDefaultDouble (), 0.0); - Assert.assertEquals(true , message.getDefaultBool ()); - Assert.assertEquals("hello", message.getDefaultString ()); - Assert.assertEquals(toBytes("world"), message.getDefaultBytes()); - - Assert.assertEquals(TestAllTypes.NestedEnum.BAR, message.getDefaultNestedEnum ()); - Assert.assertEquals(ForeignEnum.FOREIGN_BAR, message.getDefaultForeignEnum()); - Assert.assertEquals(ImportEnum.IMPORT_BAR, message.getDefaultImportEnum()); - - Assert.assertEquals("abc", message.getDefaultStringPiece()); - Assert.assertEquals("123", message.getDefaultCord()); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are set to the values assigned by {@code setAllFields} - * followed by {@code modifyRepeatedFields}. - */ - public static void assertRepeatedFieldsModified( - TestAllTypesOrBuilder message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - Assert.assertEquals(2, message.getRepeatedInt32Count ()); - Assert.assertEquals(2, message.getRepeatedInt64Count ()); - Assert.assertEquals(2, message.getRepeatedUint32Count ()); - Assert.assertEquals(2, message.getRepeatedUint64Count ()); - Assert.assertEquals(2, message.getRepeatedSint32Count ()); - Assert.assertEquals(2, message.getRepeatedSint64Count ()); - Assert.assertEquals(2, message.getRepeatedFixed32Count ()); - Assert.assertEquals(2, message.getRepeatedFixed64Count ()); - Assert.assertEquals(2, message.getRepeatedSfixed32Count()); - Assert.assertEquals(2, message.getRepeatedSfixed64Count()); - Assert.assertEquals(2, message.getRepeatedFloatCount ()); - Assert.assertEquals(2, message.getRepeatedDoubleCount ()); - Assert.assertEquals(2, message.getRepeatedBoolCount ()); - Assert.assertEquals(2, message.getRepeatedStringCount ()); - Assert.assertEquals(2, message.getRepeatedBytesCount ()); - - Assert.assertEquals(2, message.getRepeatedGroupCount ()); - Assert.assertEquals(2, message.getRepeatedNestedMessageCount ()); - Assert.assertEquals(2, message.getRepeatedForeignMessageCount()); - Assert.assertEquals(2, message.getRepeatedImportMessageCount ()); - Assert.assertEquals(2, message.getRepeatedNestedEnumCount ()); - Assert.assertEquals(2, message.getRepeatedForeignEnumCount ()); - Assert.assertEquals(2, message.getRepeatedImportEnumCount ()); - - Assert.assertEquals(2, message.getRepeatedStringPieceCount()); - Assert.assertEquals(2, message.getRepeatedCordCount()); - - Assert.assertEquals(201 , message.getRepeatedInt32 (0)); - Assert.assertEquals(202L , message.getRepeatedInt64 (0)); - Assert.assertEquals(203 , message.getRepeatedUint32 (0)); - Assert.assertEquals(204L , message.getRepeatedUint64 (0)); - Assert.assertEquals(205 , message.getRepeatedSint32 (0)); - Assert.assertEquals(206L , message.getRepeatedSint64 (0)); - Assert.assertEquals(207 , message.getRepeatedFixed32 (0)); - Assert.assertEquals(208L , message.getRepeatedFixed64 (0)); - Assert.assertEquals(209 , message.getRepeatedSfixed32(0)); - Assert.assertEquals(210L , message.getRepeatedSfixed64(0)); - Assert.assertEquals(211F , message.getRepeatedFloat (0)); - Assert.assertEquals(212D , message.getRepeatedDouble (0)); - Assert.assertEquals(true , message.getRepeatedBool (0)); - Assert.assertEquals("215", message.getRepeatedString (0)); - Assert.assertEquals(toBytes("216"), message.getRepeatedBytes(0)); - - Assert.assertEquals(217, message.getRepeatedGroup (0).getA()); - Assert.assertEquals(218, message.getRepeatedNestedMessage (0).getBb()); - Assert.assertEquals(219, message.getRepeatedForeignMessage(0).getC()); - Assert.assertEquals(220, message.getRepeatedImportMessage (0).getD()); - - Assert.assertEquals(TestAllTypes.NestedEnum.BAR, message.getRepeatedNestedEnum (0)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAR, message.getRepeatedForeignEnum(0)); - Assert.assertEquals(ImportEnum.IMPORT_BAR, message.getRepeatedImportEnum(0)); - - Assert.assertEquals("224", message.getRepeatedStringPiece(0)); - Assert.assertEquals("225", message.getRepeatedCord(0)); - - // Actually verify the second (modified) elements now. - Assert.assertEquals(501 , message.getRepeatedInt32 (1)); - Assert.assertEquals(502L , message.getRepeatedInt64 (1)); - Assert.assertEquals(503 , message.getRepeatedUint32 (1)); - Assert.assertEquals(504L , message.getRepeatedUint64 (1)); - Assert.assertEquals(505 , message.getRepeatedSint32 (1)); - Assert.assertEquals(506L , message.getRepeatedSint64 (1)); - Assert.assertEquals(507 , message.getRepeatedFixed32 (1)); - Assert.assertEquals(508L , message.getRepeatedFixed64 (1)); - Assert.assertEquals(509 , message.getRepeatedSfixed32(1)); - Assert.assertEquals(510L , message.getRepeatedSfixed64(1)); - Assert.assertEquals(511F , message.getRepeatedFloat (1)); - Assert.assertEquals(512D , message.getRepeatedDouble (1)); - Assert.assertEquals(true , message.getRepeatedBool (1)); - Assert.assertEquals("515", message.getRepeatedString (1)); - Assert.assertEquals(toBytes("516"), message.getRepeatedBytes(1)); - - Assert.assertEquals(517, message.getRepeatedGroup (1).getA()); - Assert.assertEquals(518, message.getRepeatedNestedMessage (1).getBb()); - Assert.assertEquals(519, message.getRepeatedForeignMessage(1).getC()); - Assert.assertEquals(520, message.getRepeatedImportMessage (1).getD()); - - Assert.assertEquals(TestAllTypes.NestedEnum.FOO, message.getRepeatedNestedEnum (1)); - Assert.assertEquals(ForeignEnum.FOREIGN_FOO, message.getRepeatedForeignEnum(1)); - Assert.assertEquals(ImportEnum.IMPORT_FOO, message.getRepeatedImportEnum(1)); - - Assert.assertEquals("524", message.getRepeatedStringPiece(1)); - Assert.assertEquals("525", message.getRepeatedCord(1)); - } - - /** - * Set every field of {@code message} to a unique value. - */ - public static void setPackedFields(TestPackedTypes.Builder message) { - message.addPackedInt32 (601); - message.addPackedInt64 (602); - message.addPackedUint32 (603); - message.addPackedUint64 (604); - message.addPackedSint32 (605); - message.addPackedSint64 (606); - message.addPackedFixed32 (607); - message.addPackedFixed64 (608); - message.addPackedSfixed32(609); - message.addPackedSfixed64(610); - message.addPackedFloat (611); - message.addPackedDouble (612); - message.addPackedBool (true); - message.addPackedEnum (ForeignEnum.FOREIGN_BAR); - // Add a second one of each field. - message.addPackedInt32 (701); - message.addPackedInt64 (702); - message.addPackedUint32 (703); - message.addPackedUint64 (704); - message.addPackedSint32 (705); - message.addPackedSint64 (706); - message.addPackedFixed32 (707); - message.addPackedFixed64 (708); - message.addPackedSfixed32(709); - message.addPackedSfixed64(710); - message.addPackedFloat (711); - message.addPackedDouble (712); - message.addPackedBool (false); - message.addPackedEnum (ForeignEnum.FOREIGN_BAZ); - } - - /** - * Set every field of {@code message} to a unique value. Must correspond with - * the values applied by {@code setPackedFields}. - */ - public static void setUnpackedFields(TestUnpackedTypes.Builder message) { - message.addUnpackedInt32 (601); - message.addUnpackedInt64 (602); - message.addUnpackedUint32 (603); - message.addUnpackedUint64 (604); - message.addUnpackedSint32 (605); - message.addUnpackedSint64 (606); - message.addUnpackedFixed32 (607); - message.addUnpackedFixed64 (608); - message.addUnpackedSfixed32(609); - message.addUnpackedSfixed64(610); - message.addUnpackedFloat (611); - message.addUnpackedDouble (612); - message.addUnpackedBool (true); - message.addUnpackedEnum (ForeignEnum.FOREIGN_BAR); - // Add a second one of each field. - message.addUnpackedInt32 (701); - message.addUnpackedInt64 (702); - message.addUnpackedUint32 (703); - message.addUnpackedUint64 (704); - message.addUnpackedSint32 (705); - message.addUnpackedSint64 (706); - message.addUnpackedFixed32 (707); - message.addUnpackedFixed64 (708); - message.addUnpackedSfixed32(709); - message.addUnpackedSfixed64(710); - message.addUnpackedFloat (711); - message.addUnpackedDouble (712); - message.addUnpackedBool (false); - message.addUnpackedEnum (ForeignEnum.FOREIGN_BAZ); - } - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are set to the values assigned by {@code setPackedFields}. - */ - public static void assertPackedFieldsSet(TestPackedTypes message) { - Assert.assertEquals(2, message.getPackedInt32Count ()); - Assert.assertEquals(2, message.getPackedInt64Count ()); - Assert.assertEquals(2, message.getPackedUint32Count ()); - Assert.assertEquals(2, message.getPackedUint64Count ()); - Assert.assertEquals(2, message.getPackedSint32Count ()); - Assert.assertEquals(2, message.getPackedSint64Count ()); - Assert.assertEquals(2, message.getPackedFixed32Count ()); - Assert.assertEquals(2, message.getPackedFixed64Count ()); - Assert.assertEquals(2, message.getPackedSfixed32Count()); - Assert.assertEquals(2, message.getPackedSfixed64Count()); - Assert.assertEquals(2, message.getPackedFloatCount ()); - Assert.assertEquals(2, message.getPackedDoubleCount ()); - Assert.assertEquals(2, message.getPackedBoolCount ()); - Assert.assertEquals(2, message.getPackedEnumCount ()); - Assert.assertEquals(601 , message.getPackedInt32 (0)); - Assert.assertEquals(602 , message.getPackedInt64 (0)); - Assert.assertEquals(603 , message.getPackedUint32 (0)); - Assert.assertEquals(604 , message.getPackedUint64 (0)); - Assert.assertEquals(605 , message.getPackedSint32 (0)); - Assert.assertEquals(606 , message.getPackedSint64 (0)); - Assert.assertEquals(607 , message.getPackedFixed32 (0)); - Assert.assertEquals(608 , message.getPackedFixed64 (0)); - Assert.assertEquals(609 , message.getPackedSfixed32(0)); - Assert.assertEquals(610 , message.getPackedSfixed64(0)); - Assert.assertEquals(611 , message.getPackedFloat (0), 0.0); - Assert.assertEquals(612 , message.getPackedDouble (0), 0.0); - Assert.assertEquals(true , message.getPackedBool (0)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAR, message.getPackedEnum(0)); - Assert.assertEquals(701 , message.getPackedInt32 (1)); - Assert.assertEquals(702 , message.getPackedInt64 (1)); - Assert.assertEquals(703 , message.getPackedUint32 (1)); - Assert.assertEquals(704 , message.getPackedUint64 (1)); - Assert.assertEquals(705 , message.getPackedSint32 (1)); - Assert.assertEquals(706 , message.getPackedSint64 (1)); - Assert.assertEquals(707 , message.getPackedFixed32 (1)); - Assert.assertEquals(708 , message.getPackedFixed64 (1)); - Assert.assertEquals(709 , message.getPackedSfixed32(1)); - Assert.assertEquals(710 , message.getPackedSfixed64(1)); - Assert.assertEquals(711 , message.getPackedFloat (1), 0.0); - Assert.assertEquals(712 , message.getPackedDouble (1), 0.0); - Assert.assertEquals(false, message.getPackedBool (1)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAZ, message.getPackedEnum(1)); - } - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are set to the values assigned by {@code setUnpackedFields}. - */ - public static void assertUnpackedFieldsSet(TestUnpackedTypes message) { - Assert.assertEquals(2, message.getUnpackedInt32Count ()); - Assert.assertEquals(2, message.getUnpackedInt64Count ()); - Assert.assertEquals(2, message.getUnpackedUint32Count ()); - Assert.assertEquals(2, message.getUnpackedUint64Count ()); - Assert.assertEquals(2, message.getUnpackedSint32Count ()); - Assert.assertEquals(2, message.getUnpackedSint64Count ()); - Assert.assertEquals(2, message.getUnpackedFixed32Count ()); - Assert.assertEquals(2, message.getUnpackedFixed64Count ()); - Assert.assertEquals(2, message.getUnpackedSfixed32Count()); - Assert.assertEquals(2, message.getUnpackedSfixed64Count()); - Assert.assertEquals(2, message.getUnpackedFloatCount ()); - Assert.assertEquals(2, message.getUnpackedDoubleCount ()); - Assert.assertEquals(2, message.getUnpackedBoolCount ()); - Assert.assertEquals(2, message.getUnpackedEnumCount ()); - Assert.assertEquals(601 , message.getUnpackedInt32 (0)); - Assert.assertEquals(602 , message.getUnpackedInt64 (0)); - Assert.assertEquals(603 , message.getUnpackedUint32 (0)); - Assert.assertEquals(604 , message.getUnpackedUint64 (0)); - Assert.assertEquals(605 , message.getUnpackedSint32 (0)); - Assert.assertEquals(606 , message.getUnpackedSint64 (0)); - Assert.assertEquals(607 , message.getUnpackedFixed32 (0)); - Assert.assertEquals(608 , message.getUnpackedFixed64 (0)); - Assert.assertEquals(609 , message.getUnpackedSfixed32(0)); - Assert.assertEquals(610 , message.getUnpackedSfixed64(0)); - Assert.assertEquals(611 , message.getUnpackedFloat (0), 0.0); - Assert.assertEquals(612 , message.getUnpackedDouble (0), 0.0); - Assert.assertEquals(true , message.getUnpackedBool (0)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAR, message.getUnpackedEnum(0)); - Assert.assertEquals(701 , message.getUnpackedInt32 (1)); - Assert.assertEquals(702 , message.getUnpackedInt64 (1)); - Assert.assertEquals(703 , message.getUnpackedUint32 (1)); - Assert.assertEquals(704 , message.getUnpackedUint64 (1)); - Assert.assertEquals(705 , message.getUnpackedSint32 (1)); - Assert.assertEquals(706 , message.getUnpackedSint64 (1)); - Assert.assertEquals(707 , message.getUnpackedFixed32 (1)); - Assert.assertEquals(708 , message.getUnpackedFixed64 (1)); - Assert.assertEquals(709 , message.getUnpackedSfixed32(1)); - Assert.assertEquals(710 , message.getUnpackedSfixed64(1)); - Assert.assertEquals(711 , message.getUnpackedFloat (1), 0.0); - Assert.assertEquals(712 , message.getUnpackedDouble (1), 0.0); - Assert.assertEquals(false, message.getUnpackedBool (1)); - Assert.assertEquals(ForeignEnum.FOREIGN_BAZ, message.getUnpackedEnum(1)); - } - - // =================================================================== - // Like above, but for extensions - - // Java gets confused with things like assertEquals(int, Integer): it can't - // decide whether to call assertEquals(int, int) or assertEquals(Object, - // Object). So we define these methods to help it. - private static void assertEqualsExactType(int a, int b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(long a, long b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(float a, float b) { - Assert.assertEquals(a, b, 0.0); - } - private static void assertEqualsExactType(double a, double b) { - Assert.assertEquals(a, b, 0.0); - } - private static void assertEqualsExactType(boolean a, boolean b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(String a, String b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(ByteString a, ByteString b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(TestAllTypes.NestedEnum a, - TestAllTypes.NestedEnum b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(ForeignEnum a, ForeignEnum b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(ImportEnum a, ImportEnum b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(TestAllTypesLite.NestedEnum a, - TestAllTypesLite.NestedEnum b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(ForeignEnumLite a, - ForeignEnumLite b) { - Assert.assertEquals(a, b); - } - private static void assertEqualsExactType(ImportEnumLite a, - ImportEnumLite b) { - Assert.assertEquals(a, b); - } - - /** - * Get an unmodifiable {@link ExtensionRegistry} containing all the - * extensions of {@code TestAllExtensions}. - */ - public static ExtensionRegistry getExtensionRegistry() { - ExtensionRegistry registry = ExtensionRegistry.newInstance(); - registerAllExtensions(registry); - return registry.getUnmodifiable(); - } - - public static ExtensionRegistryLite getExtensionRegistryLite() { - ExtensionRegistryLite registry = ExtensionRegistryLite.newInstance(); - registerAllExtensionsLite(registry); - return registry.getUnmodifiable(); - } - - /** - * Register all of {@code TestAllExtensions}'s extensions with the - * given {@link ExtensionRegistry}. - */ - public static void registerAllExtensions(ExtensionRegistry registry) { - UnittestProto.registerAllExtensions(registry); - registerAllExtensionsLite(registry); - } - - public static void registerAllExtensionsLite(ExtensionRegistryLite registry) { - UnittestLite.registerAllExtensions(registry); - } - - /** - * Set every field of {@code message} to the values expected by - * {@code assertAllExtensionsSet()}. - */ - public static void setAllExtensions(TestAllExtensions.Builder message) { - message.setExtension(optionalInt32Extension , 101); - message.setExtension(optionalInt64Extension , 102L); - message.setExtension(optionalUint32Extension , 103); - message.setExtension(optionalUint64Extension , 104L); - message.setExtension(optionalSint32Extension , 105); - message.setExtension(optionalSint64Extension , 106L); - message.setExtension(optionalFixed32Extension , 107); - message.setExtension(optionalFixed64Extension , 108L); - message.setExtension(optionalSfixed32Extension, 109); - message.setExtension(optionalSfixed64Extension, 110L); - message.setExtension(optionalFloatExtension , 111F); - message.setExtension(optionalDoubleExtension , 112D); - message.setExtension(optionalBoolExtension , true); - message.setExtension(optionalStringExtension , "115"); - message.setExtension(optionalBytesExtension , toBytes("116")); - - message.setExtension(optionalGroupExtension, - OptionalGroup_extension.newBuilder().setA(117).build()); - message.setExtension(optionalNestedMessageExtension, - TestAllTypes.NestedMessage.newBuilder().setBb(118).build()); - message.setExtension(optionalForeignMessageExtension, - ForeignMessage.newBuilder().setC(119).build()); - message.setExtension(optionalImportMessageExtension, - ImportMessage.newBuilder().setD(120).build()); - - message.setExtension(optionalNestedEnumExtension, TestAllTypes.NestedEnum.BAZ); - message.setExtension(optionalForeignEnumExtension, ForeignEnum.FOREIGN_BAZ); - message.setExtension(optionalImportEnumExtension, ImportEnum.IMPORT_BAZ); - - message.setExtension(optionalStringPieceExtension, "124"); - message.setExtension(optionalCordExtension, "125"); - - // ----------------------------------------------------------------- - - message.addExtension(repeatedInt32Extension , 201); - message.addExtension(repeatedInt64Extension , 202L); - message.addExtension(repeatedUint32Extension , 203); - message.addExtension(repeatedUint64Extension , 204L); - message.addExtension(repeatedSint32Extension , 205); - message.addExtension(repeatedSint64Extension , 206L); - message.addExtension(repeatedFixed32Extension , 207); - message.addExtension(repeatedFixed64Extension , 208L); - message.addExtension(repeatedSfixed32Extension, 209); - message.addExtension(repeatedSfixed64Extension, 210L); - message.addExtension(repeatedFloatExtension , 211F); - message.addExtension(repeatedDoubleExtension , 212D); - message.addExtension(repeatedBoolExtension , true); - message.addExtension(repeatedStringExtension , "215"); - message.addExtension(repeatedBytesExtension , toBytes("216")); - - message.addExtension(repeatedGroupExtension, - RepeatedGroup_extension.newBuilder().setA(217).build()); - message.addExtension(repeatedNestedMessageExtension, - TestAllTypes.NestedMessage.newBuilder().setBb(218).build()); - message.addExtension(repeatedForeignMessageExtension, - ForeignMessage.newBuilder().setC(219).build()); - message.addExtension(repeatedImportMessageExtension, - ImportMessage.newBuilder().setD(220).build()); - - message.addExtension(repeatedNestedEnumExtension, TestAllTypes.NestedEnum.BAR); - message.addExtension(repeatedForeignEnumExtension, ForeignEnum.FOREIGN_BAR); - message.addExtension(repeatedImportEnumExtension, ImportEnum.IMPORT_BAR); - - message.addExtension(repeatedStringPieceExtension, "224"); - message.addExtension(repeatedCordExtension, "225"); - - // Add a second one of each field. - message.addExtension(repeatedInt32Extension , 301); - message.addExtension(repeatedInt64Extension , 302L); - message.addExtension(repeatedUint32Extension , 303); - message.addExtension(repeatedUint64Extension , 304L); - message.addExtension(repeatedSint32Extension , 305); - message.addExtension(repeatedSint64Extension , 306L); - message.addExtension(repeatedFixed32Extension , 307); - message.addExtension(repeatedFixed64Extension , 308L); - message.addExtension(repeatedSfixed32Extension, 309); - message.addExtension(repeatedSfixed64Extension, 310L); - message.addExtension(repeatedFloatExtension , 311F); - message.addExtension(repeatedDoubleExtension , 312D); - message.addExtension(repeatedBoolExtension , false); - message.addExtension(repeatedStringExtension , "315"); - message.addExtension(repeatedBytesExtension , toBytes("316")); - - message.addExtension(repeatedGroupExtension, - RepeatedGroup_extension.newBuilder().setA(317).build()); - message.addExtension(repeatedNestedMessageExtension, - TestAllTypes.NestedMessage.newBuilder().setBb(318).build()); - message.addExtension(repeatedForeignMessageExtension, - ForeignMessage.newBuilder().setC(319).build()); - message.addExtension(repeatedImportMessageExtension, - ImportMessage.newBuilder().setD(320).build()); - - message.addExtension(repeatedNestedEnumExtension, TestAllTypes.NestedEnum.BAZ); - message.addExtension(repeatedForeignEnumExtension, ForeignEnum.FOREIGN_BAZ); - message.addExtension(repeatedImportEnumExtension, ImportEnum.IMPORT_BAZ); - - message.addExtension(repeatedStringPieceExtension, "324"); - message.addExtension(repeatedCordExtension, "325"); - - // ----------------------------------------------------------------- - - message.setExtension(defaultInt32Extension , 401); - message.setExtension(defaultInt64Extension , 402L); - message.setExtension(defaultUint32Extension , 403); - message.setExtension(defaultUint64Extension , 404L); - message.setExtension(defaultSint32Extension , 405); - message.setExtension(defaultSint64Extension , 406L); - message.setExtension(defaultFixed32Extension , 407); - message.setExtension(defaultFixed64Extension , 408L); - message.setExtension(defaultSfixed32Extension, 409); - message.setExtension(defaultSfixed64Extension, 410L); - message.setExtension(defaultFloatExtension , 411F); - message.setExtension(defaultDoubleExtension , 412D); - message.setExtension(defaultBoolExtension , false); - message.setExtension(defaultStringExtension , "415"); - message.setExtension(defaultBytesExtension , toBytes("416")); - - message.setExtension(defaultNestedEnumExtension, TestAllTypes.NestedEnum.FOO); - message.setExtension(defaultForeignEnumExtension, ForeignEnum.FOREIGN_FOO); - message.setExtension(defaultImportEnumExtension, ImportEnum.IMPORT_FOO); - - message.setExtension(defaultStringPieceExtension, "424"); - message.setExtension(defaultCordExtension, "425"); - } - - // ------------------------------------------------------------------- - - /** - * Modify the repeated extensions of {@code message} to contain the values - * expected by {@code assertRepeatedExtensionsModified()}. - */ - public static void modifyRepeatedExtensions( - TestAllExtensions.Builder message) { - message.setExtension(repeatedInt32Extension , 1, 501); - message.setExtension(repeatedInt64Extension , 1, 502L); - message.setExtension(repeatedUint32Extension , 1, 503); - message.setExtension(repeatedUint64Extension , 1, 504L); - message.setExtension(repeatedSint32Extension , 1, 505); - message.setExtension(repeatedSint64Extension , 1, 506L); - message.setExtension(repeatedFixed32Extension , 1, 507); - message.setExtension(repeatedFixed64Extension , 1, 508L); - message.setExtension(repeatedSfixed32Extension, 1, 509); - message.setExtension(repeatedSfixed64Extension, 1, 510L); - message.setExtension(repeatedFloatExtension , 1, 511F); - message.setExtension(repeatedDoubleExtension , 1, 512D); - message.setExtension(repeatedBoolExtension , 1, true); - message.setExtension(repeatedStringExtension , 1, "515"); - message.setExtension(repeatedBytesExtension , 1, toBytes("516")); - - message.setExtension(repeatedGroupExtension, 1, - RepeatedGroup_extension.newBuilder().setA(517).build()); - message.setExtension(repeatedNestedMessageExtension, 1, - TestAllTypes.NestedMessage.newBuilder().setBb(518).build()); - message.setExtension(repeatedForeignMessageExtension, 1, - ForeignMessage.newBuilder().setC(519).build()); - message.setExtension(repeatedImportMessageExtension, 1, - ImportMessage.newBuilder().setD(520).build()); - - message.setExtension(repeatedNestedEnumExtension , 1, TestAllTypes.NestedEnum.FOO); - message.setExtension(repeatedForeignEnumExtension, 1, ForeignEnum.FOREIGN_FOO); - message.setExtension(repeatedImportEnumExtension , 1, ImportEnum.IMPORT_FOO); - - message.setExtension(repeatedStringPieceExtension, 1, "524"); - message.setExtension(repeatedCordExtension, 1, "525"); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are set to the values assigned by {@code setAllExtensions}. - */ - public static void assertAllExtensionsSet( - TestAllExtensionsOrBuilder message) { - Assert.assertTrue(message.hasExtension(optionalInt32Extension )); - Assert.assertTrue(message.hasExtension(optionalInt64Extension )); - Assert.assertTrue(message.hasExtension(optionalUint32Extension )); - Assert.assertTrue(message.hasExtension(optionalUint64Extension )); - Assert.assertTrue(message.hasExtension(optionalSint32Extension )); - Assert.assertTrue(message.hasExtension(optionalSint64Extension )); - Assert.assertTrue(message.hasExtension(optionalFixed32Extension )); - Assert.assertTrue(message.hasExtension(optionalFixed64Extension )); - Assert.assertTrue(message.hasExtension(optionalSfixed32Extension)); - Assert.assertTrue(message.hasExtension(optionalSfixed64Extension)); - Assert.assertTrue(message.hasExtension(optionalFloatExtension )); - Assert.assertTrue(message.hasExtension(optionalDoubleExtension )); - Assert.assertTrue(message.hasExtension(optionalBoolExtension )); - Assert.assertTrue(message.hasExtension(optionalStringExtension )); - Assert.assertTrue(message.hasExtension(optionalBytesExtension )); - - Assert.assertTrue(message.hasExtension(optionalGroupExtension )); - Assert.assertTrue(message.hasExtension(optionalNestedMessageExtension )); - Assert.assertTrue(message.hasExtension(optionalForeignMessageExtension)); - Assert.assertTrue(message.hasExtension(optionalImportMessageExtension )); - - Assert.assertTrue(message.getExtension(optionalGroupExtension ).hasA()); - Assert.assertTrue(message.getExtension(optionalNestedMessageExtension ).hasBb()); - Assert.assertTrue(message.getExtension(optionalForeignMessageExtension).hasC()); - Assert.assertTrue(message.getExtension(optionalImportMessageExtension ).hasD()); - - Assert.assertTrue(message.hasExtension(optionalNestedEnumExtension )); - Assert.assertTrue(message.hasExtension(optionalForeignEnumExtension)); - Assert.assertTrue(message.hasExtension(optionalImportEnumExtension )); - - Assert.assertTrue(message.hasExtension(optionalStringPieceExtension)); - Assert.assertTrue(message.hasExtension(optionalCordExtension)); - - assertEqualsExactType(101 , message.getExtension(optionalInt32Extension )); - assertEqualsExactType(102L , message.getExtension(optionalInt64Extension )); - assertEqualsExactType(103 , message.getExtension(optionalUint32Extension )); - assertEqualsExactType(104L , message.getExtension(optionalUint64Extension )); - assertEqualsExactType(105 , message.getExtension(optionalSint32Extension )); - assertEqualsExactType(106L , message.getExtension(optionalSint64Extension )); - assertEqualsExactType(107 , message.getExtension(optionalFixed32Extension )); - assertEqualsExactType(108L , message.getExtension(optionalFixed64Extension )); - assertEqualsExactType(109 , message.getExtension(optionalSfixed32Extension)); - assertEqualsExactType(110L , message.getExtension(optionalSfixed64Extension)); - assertEqualsExactType(111F , message.getExtension(optionalFloatExtension )); - assertEqualsExactType(112D , message.getExtension(optionalDoubleExtension )); - assertEqualsExactType(true , message.getExtension(optionalBoolExtension )); - assertEqualsExactType("115", message.getExtension(optionalStringExtension )); - assertEqualsExactType(toBytes("116"), message.getExtension(optionalBytesExtension)); - - assertEqualsExactType(117, message.getExtension(optionalGroupExtension ).getA()); - assertEqualsExactType(118, message.getExtension(optionalNestedMessageExtension ).getBb()); - assertEqualsExactType(119, message.getExtension(optionalForeignMessageExtension).getC()); - assertEqualsExactType(120, message.getExtension(optionalImportMessageExtension ).getD()); - - assertEqualsExactType(TestAllTypes.NestedEnum.BAZ, - message.getExtension(optionalNestedEnumExtension)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAZ, - message.getExtension(optionalForeignEnumExtension)); - assertEqualsExactType(ImportEnum.IMPORT_BAZ, - message.getExtension(optionalImportEnumExtension)); - - assertEqualsExactType("124", message.getExtension(optionalStringPieceExtension)); - assertEqualsExactType("125", message.getExtension(optionalCordExtension)); - - // ----------------------------------------------------------------- - - Assert.assertEquals(2, message.getExtensionCount(repeatedInt32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedInt64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed32Extension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed64Extension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedFloatExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedDoubleExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBoolExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedStringExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBytesExtension )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedGroupExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedMessageExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignMessageExtension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportMessageExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedEnumExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignEnumExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportEnumExtension )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedStringPieceExtension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedCordExtension)); - - assertEqualsExactType(201 , message.getExtension(repeatedInt32Extension , 0)); - assertEqualsExactType(202L , message.getExtension(repeatedInt64Extension , 0)); - assertEqualsExactType(203 , message.getExtension(repeatedUint32Extension , 0)); - assertEqualsExactType(204L , message.getExtension(repeatedUint64Extension , 0)); - assertEqualsExactType(205 , message.getExtension(repeatedSint32Extension , 0)); - assertEqualsExactType(206L , message.getExtension(repeatedSint64Extension , 0)); - assertEqualsExactType(207 , message.getExtension(repeatedFixed32Extension , 0)); - assertEqualsExactType(208L , message.getExtension(repeatedFixed64Extension , 0)); - assertEqualsExactType(209 , message.getExtension(repeatedSfixed32Extension, 0)); - assertEqualsExactType(210L , message.getExtension(repeatedSfixed64Extension, 0)); - assertEqualsExactType(211F , message.getExtension(repeatedFloatExtension , 0)); - assertEqualsExactType(212D , message.getExtension(repeatedDoubleExtension , 0)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtension , 0)); - assertEqualsExactType("215", message.getExtension(repeatedStringExtension , 0)); - assertEqualsExactType(toBytes("216"), message.getExtension(repeatedBytesExtension, 0)); - - assertEqualsExactType(217, message.getExtension(repeatedGroupExtension , 0).getA()); - assertEqualsExactType(218, message.getExtension(repeatedNestedMessageExtension , 0).getBb()); - assertEqualsExactType(219, message.getExtension(repeatedForeignMessageExtension, 0).getC()); - assertEqualsExactType(220, message.getExtension(repeatedImportMessageExtension , 0).getD()); - - assertEqualsExactType(TestAllTypes.NestedEnum.BAR, - message.getExtension(repeatedNestedEnumExtension, 0)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAR, - message.getExtension(repeatedForeignEnumExtension, 0)); - assertEqualsExactType(ImportEnum.IMPORT_BAR, - message.getExtension(repeatedImportEnumExtension, 0)); - - assertEqualsExactType("224", message.getExtension(repeatedStringPieceExtension, 0)); - assertEqualsExactType("225", message.getExtension(repeatedCordExtension, 0)); - - assertEqualsExactType(301 , message.getExtension(repeatedInt32Extension , 1)); - assertEqualsExactType(302L , message.getExtension(repeatedInt64Extension , 1)); - assertEqualsExactType(303 , message.getExtension(repeatedUint32Extension , 1)); - assertEqualsExactType(304L , message.getExtension(repeatedUint64Extension , 1)); - assertEqualsExactType(305 , message.getExtension(repeatedSint32Extension , 1)); - assertEqualsExactType(306L , message.getExtension(repeatedSint64Extension , 1)); - assertEqualsExactType(307 , message.getExtension(repeatedFixed32Extension , 1)); - assertEqualsExactType(308L , message.getExtension(repeatedFixed64Extension , 1)); - assertEqualsExactType(309 , message.getExtension(repeatedSfixed32Extension, 1)); - assertEqualsExactType(310L , message.getExtension(repeatedSfixed64Extension, 1)); - assertEqualsExactType(311F , message.getExtension(repeatedFloatExtension , 1)); - assertEqualsExactType(312D , message.getExtension(repeatedDoubleExtension , 1)); - assertEqualsExactType(false, message.getExtension(repeatedBoolExtension , 1)); - assertEqualsExactType("315", message.getExtension(repeatedStringExtension , 1)); - assertEqualsExactType(toBytes("316"), message.getExtension(repeatedBytesExtension, 1)); - - assertEqualsExactType(317, message.getExtension(repeatedGroupExtension , 1).getA()); - assertEqualsExactType(318, message.getExtension(repeatedNestedMessageExtension , 1).getBb()); - assertEqualsExactType(319, message.getExtension(repeatedForeignMessageExtension, 1).getC()); - assertEqualsExactType(320, message.getExtension(repeatedImportMessageExtension , 1).getD()); - - assertEqualsExactType(TestAllTypes.NestedEnum.BAZ, - message.getExtension(repeatedNestedEnumExtension, 1)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAZ, - message.getExtension(repeatedForeignEnumExtension, 1)); - assertEqualsExactType(ImportEnum.IMPORT_BAZ, - message.getExtension(repeatedImportEnumExtension, 1)); - - assertEqualsExactType("324", message.getExtension(repeatedStringPieceExtension, 1)); - assertEqualsExactType("325", message.getExtension(repeatedCordExtension, 1)); - - // ----------------------------------------------------------------- - - Assert.assertTrue(message.hasExtension(defaultInt32Extension )); - Assert.assertTrue(message.hasExtension(defaultInt64Extension )); - Assert.assertTrue(message.hasExtension(defaultUint32Extension )); - Assert.assertTrue(message.hasExtension(defaultUint64Extension )); - Assert.assertTrue(message.hasExtension(defaultSint32Extension )); - Assert.assertTrue(message.hasExtension(defaultSint64Extension )); - Assert.assertTrue(message.hasExtension(defaultFixed32Extension )); - Assert.assertTrue(message.hasExtension(defaultFixed64Extension )); - Assert.assertTrue(message.hasExtension(defaultSfixed32Extension)); - Assert.assertTrue(message.hasExtension(defaultSfixed64Extension)); - Assert.assertTrue(message.hasExtension(defaultFloatExtension )); - Assert.assertTrue(message.hasExtension(defaultDoubleExtension )); - Assert.assertTrue(message.hasExtension(defaultBoolExtension )); - Assert.assertTrue(message.hasExtension(defaultStringExtension )); - Assert.assertTrue(message.hasExtension(defaultBytesExtension )); - - Assert.assertTrue(message.hasExtension(defaultNestedEnumExtension )); - Assert.assertTrue(message.hasExtension(defaultForeignEnumExtension)); - Assert.assertTrue(message.hasExtension(defaultImportEnumExtension )); - - Assert.assertTrue(message.hasExtension(defaultStringPieceExtension)); - Assert.assertTrue(message.hasExtension(defaultCordExtension)); - - assertEqualsExactType(401 , message.getExtension(defaultInt32Extension )); - assertEqualsExactType(402L , message.getExtension(defaultInt64Extension )); - assertEqualsExactType(403 , message.getExtension(defaultUint32Extension )); - assertEqualsExactType(404L , message.getExtension(defaultUint64Extension )); - assertEqualsExactType(405 , message.getExtension(defaultSint32Extension )); - assertEqualsExactType(406L , message.getExtension(defaultSint64Extension )); - assertEqualsExactType(407 , message.getExtension(defaultFixed32Extension )); - assertEqualsExactType(408L , message.getExtension(defaultFixed64Extension )); - assertEqualsExactType(409 , message.getExtension(defaultSfixed32Extension)); - assertEqualsExactType(410L , message.getExtension(defaultSfixed64Extension)); - assertEqualsExactType(411F , message.getExtension(defaultFloatExtension )); - assertEqualsExactType(412D , message.getExtension(defaultDoubleExtension )); - assertEqualsExactType(false, message.getExtension(defaultBoolExtension )); - assertEqualsExactType("415", message.getExtension(defaultStringExtension )); - assertEqualsExactType(toBytes("416"), message.getExtension(defaultBytesExtension)); - - assertEqualsExactType(TestAllTypes.NestedEnum.FOO, - message.getExtension(defaultNestedEnumExtension )); - assertEqualsExactType(ForeignEnum.FOREIGN_FOO, - message.getExtension(defaultForeignEnumExtension)); - assertEqualsExactType(ImportEnum.IMPORT_FOO, - message.getExtension(defaultImportEnumExtension)); - - assertEqualsExactType("424", message.getExtension(defaultStringPieceExtension)); - assertEqualsExactType("425", message.getExtension(defaultCordExtension)); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are cleared, and that getting the extensions returns their - * default values. - */ - public static void assertExtensionsClear(TestAllExtensionsOrBuilder message) { - // hasBlah() should initially be false for all optional fields. - Assert.assertFalse(message.hasExtension(optionalInt32Extension )); - Assert.assertFalse(message.hasExtension(optionalInt64Extension )); - Assert.assertFalse(message.hasExtension(optionalUint32Extension )); - Assert.assertFalse(message.hasExtension(optionalUint64Extension )); - Assert.assertFalse(message.hasExtension(optionalSint32Extension )); - Assert.assertFalse(message.hasExtension(optionalSint64Extension )); - Assert.assertFalse(message.hasExtension(optionalFixed32Extension )); - Assert.assertFalse(message.hasExtension(optionalFixed64Extension )); - Assert.assertFalse(message.hasExtension(optionalSfixed32Extension)); - Assert.assertFalse(message.hasExtension(optionalSfixed64Extension)); - Assert.assertFalse(message.hasExtension(optionalFloatExtension )); - Assert.assertFalse(message.hasExtension(optionalDoubleExtension )); - Assert.assertFalse(message.hasExtension(optionalBoolExtension )); - Assert.assertFalse(message.hasExtension(optionalStringExtension )); - Assert.assertFalse(message.hasExtension(optionalBytesExtension )); - - Assert.assertFalse(message.hasExtension(optionalGroupExtension )); - Assert.assertFalse(message.hasExtension(optionalNestedMessageExtension )); - Assert.assertFalse(message.hasExtension(optionalForeignMessageExtension)); - Assert.assertFalse(message.hasExtension(optionalImportMessageExtension )); - - Assert.assertFalse(message.hasExtension(optionalNestedEnumExtension )); - Assert.assertFalse(message.hasExtension(optionalForeignEnumExtension)); - Assert.assertFalse(message.hasExtension(optionalImportEnumExtension )); - - Assert.assertFalse(message.hasExtension(optionalStringPieceExtension)); - Assert.assertFalse(message.hasExtension(optionalCordExtension)); - - // Optional fields without defaults are set to zero or something like it. - assertEqualsExactType(0 , message.getExtension(optionalInt32Extension )); - assertEqualsExactType(0L , message.getExtension(optionalInt64Extension )); - assertEqualsExactType(0 , message.getExtension(optionalUint32Extension )); - assertEqualsExactType(0L , message.getExtension(optionalUint64Extension )); - assertEqualsExactType(0 , message.getExtension(optionalSint32Extension )); - assertEqualsExactType(0L , message.getExtension(optionalSint64Extension )); - assertEqualsExactType(0 , message.getExtension(optionalFixed32Extension )); - assertEqualsExactType(0L , message.getExtension(optionalFixed64Extension )); - assertEqualsExactType(0 , message.getExtension(optionalSfixed32Extension)); - assertEqualsExactType(0L , message.getExtension(optionalSfixed64Extension)); - assertEqualsExactType(0F , message.getExtension(optionalFloatExtension )); - assertEqualsExactType(0D , message.getExtension(optionalDoubleExtension )); - assertEqualsExactType(false, message.getExtension(optionalBoolExtension )); - assertEqualsExactType("" , message.getExtension(optionalStringExtension )); - assertEqualsExactType(ByteString.EMPTY, message.getExtension(optionalBytesExtension)); - - // Embedded messages should also be clear. - Assert.assertFalse(message.getExtension(optionalGroupExtension ).hasA()); - Assert.assertFalse(message.getExtension(optionalNestedMessageExtension ).hasBb()); - Assert.assertFalse(message.getExtension(optionalForeignMessageExtension).hasC()); - Assert.assertFalse(message.getExtension(optionalImportMessageExtension ).hasD()); - - assertEqualsExactType(0, message.getExtension(optionalGroupExtension ).getA()); - assertEqualsExactType(0, message.getExtension(optionalNestedMessageExtension ).getBb()); - assertEqualsExactType(0, message.getExtension(optionalForeignMessageExtension).getC()); - assertEqualsExactType(0, message.getExtension(optionalImportMessageExtension ).getD()); - - // Enums without defaults are set to the first value in the enum. - assertEqualsExactType(TestAllTypes.NestedEnum.FOO, - message.getExtension(optionalNestedEnumExtension )); - assertEqualsExactType(ForeignEnum.FOREIGN_FOO, - message.getExtension(optionalForeignEnumExtension)); - assertEqualsExactType(ImportEnum.IMPORT_FOO, - message.getExtension(optionalImportEnumExtension)); - - assertEqualsExactType("", message.getExtension(optionalStringPieceExtension)); - assertEqualsExactType("", message.getExtension(optionalCordExtension)); - - // Repeated fields are empty. - Assert.assertEquals(0, message.getExtensionCount(repeatedInt32Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedInt64Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedUint32Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedUint64Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSint32Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSint64Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedFixed32Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedFixed64Extension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSfixed32Extension)); - Assert.assertEquals(0, message.getExtensionCount(repeatedSfixed64Extension)); - Assert.assertEquals(0, message.getExtensionCount(repeatedFloatExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedDoubleExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedBoolExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedStringExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedBytesExtension )); - - Assert.assertEquals(0, message.getExtensionCount(repeatedGroupExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedNestedMessageExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedForeignMessageExtension)); - Assert.assertEquals(0, message.getExtensionCount(repeatedImportMessageExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedNestedEnumExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedForeignEnumExtension )); - Assert.assertEquals(0, message.getExtensionCount(repeatedImportEnumExtension )); - - Assert.assertEquals(0, message.getExtensionCount(repeatedStringPieceExtension)); - Assert.assertEquals(0, message.getExtensionCount(repeatedCordExtension)); - - // Repeated fields are empty via getExtension().size(). - Assert.assertEquals(0, message.getExtension(repeatedInt32Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedInt64Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedUint32Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedUint64Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedSint32Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedSint64Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedFixed32Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedFixed64Extension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedSfixed32Extension).size()); - Assert.assertEquals(0, message.getExtension(repeatedSfixed64Extension).size()); - Assert.assertEquals(0, message.getExtension(repeatedFloatExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedDoubleExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedBoolExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedStringExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedBytesExtension ).size()); - - Assert.assertEquals(0, message.getExtension(repeatedGroupExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedNestedMessageExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedForeignMessageExtension).size()); - Assert.assertEquals(0, message.getExtension(repeatedImportMessageExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedNestedEnumExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedForeignEnumExtension ).size()); - Assert.assertEquals(0, message.getExtension(repeatedImportEnumExtension ).size()); - - Assert.assertEquals(0, message.getExtension(repeatedStringPieceExtension).size()); - Assert.assertEquals(0, message.getExtension(repeatedCordExtension).size()); - - // hasBlah() should also be false for all default fields. - Assert.assertFalse(message.hasExtension(defaultInt32Extension )); - Assert.assertFalse(message.hasExtension(defaultInt64Extension )); - Assert.assertFalse(message.hasExtension(defaultUint32Extension )); - Assert.assertFalse(message.hasExtension(defaultUint64Extension )); - Assert.assertFalse(message.hasExtension(defaultSint32Extension )); - Assert.assertFalse(message.hasExtension(defaultSint64Extension )); - Assert.assertFalse(message.hasExtension(defaultFixed32Extension )); - Assert.assertFalse(message.hasExtension(defaultFixed64Extension )); - Assert.assertFalse(message.hasExtension(defaultSfixed32Extension)); - Assert.assertFalse(message.hasExtension(defaultSfixed64Extension)); - Assert.assertFalse(message.hasExtension(defaultFloatExtension )); - Assert.assertFalse(message.hasExtension(defaultDoubleExtension )); - Assert.assertFalse(message.hasExtension(defaultBoolExtension )); - Assert.assertFalse(message.hasExtension(defaultStringExtension )); - Assert.assertFalse(message.hasExtension(defaultBytesExtension )); - - Assert.assertFalse(message.hasExtension(defaultNestedEnumExtension )); - Assert.assertFalse(message.hasExtension(defaultForeignEnumExtension)); - Assert.assertFalse(message.hasExtension(defaultImportEnumExtension )); - - Assert.assertFalse(message.hasExtension(defaultStringPieceExtension)); - Assert.assertFalse(message.hasExtension(defaultCordExtension)); - - // Fields with defaults have their default values (duh). - assertEqualsExactType( 41 , message.getExtension(defaultInt32Extension )); - assertEqualsExactType( 42L , message.getExtension(defaultInt64Extension )); - assertEqualsExactType( 43 , message.getExtension(defaultUint32Extension )); - assertEqualsExactType( 44L , message.getExtension(defaultUint64Extension )); - assertEqualsExactType(-45 , message.getExtension(defaultSint32Extension )); - assertEqualsExactType( 46L , message.getExtension(defaultSint64Extension )); - assertEqualsExactType( 47 , message.getExtension(defaultFixed32Extension )); - assertEqualsExactType( 48L , message.getExtension(defaultFixed64Extension )); - assertEqualsExactType( 49 , message.getExtension(defaultSfixed32Extension)); - assertEqualsExactType(-50L , message.getExtension(defaultSfixed64Extension)); - assertEqualsExactType( 51.5F , message.getExtension(defaultFloatExtension )); - assertEqualsExactType( 52e3D , message.getExtension(defaultDoubleExtension )); - assertEqualsExactType(true , message.getExtension(defaultBoolExtension )); - assertEqualsExactType("hello", message.getExtension(defaultStringExtension )); - assertEqualsExactType(toBytes("world"), message.getExtension(defaultBytesExtension)); - - assertEqualsExactType(TestAllTypes.NestedEnum.BAR, - message.getExtension(defaultNestedEnumExtension )); - assertEqualsExactType(ForeignEnum.FOREIGN_BAR, - message.getExtension(defaultForeignEnumExtension)); - assertEqualsExactType(ImportEnum.IMPORT_BAR, - message.getExtension(defaultImportEnumExtension)); - - assertEqualsExactType("abc", message.getExtension(defaultStringPieceExtension)); - assertEqualsExactType("123", message.getExtension(defaultCordExtension)); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are set to the values assigned by {@code setAllExtensions} - * followed by {@code modifyRepeatedExtensions}. - */ - public static void assertRepeatedExtensionsModified( - TestAllExtensionsOrBuilder message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - Assert.assertEquals(2, message.getExtensionCount(repeatedInt32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedInt64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed32Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed64Extension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed32Extension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed64Extension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedFloatExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedDoubleExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBoolExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedStringExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBytesExtension )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedGroupExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedMessageExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignMessageExtension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportMessageExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedEnumExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignEnumExtension )); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportEnumExtension )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedStringPieceExtension)); - Assert.assertEquals(2, message.getExtensionCount(repeatedCordExtension)); - - assertEqualsExactType(201 , message.getExtension(repeatedInt32Extension , 0)); - assertEqualsExactType(202L , message.getExtension(repeatedInt64Extension , 0)); - assertEqualsExactType(203 , message.getExtension(repeatedUint32Extension , 0)); - assertEqualsExactType(204L , message.getExtension(repeatedUint64Extension , 0)); - assertEqualsExactType(205 , message.getExtension(repeatedSint32Extension , 0)); - assertEqualsExactType(206L , message.getExtension(repeatedSint64Extension , 0)); - assertEqualsExactType(207 , message.getExtension(repeatedFixed32Extension , 0)); - assertEqualsExactType(208L , message.getExtension(repeatedFixed64Extension , 0)); - assertEqualsExactType(209 , message.getExtension(repeatedSfixed32Extension, 0)); - assertEqualsExactType(210L , message.getExtension(repeatedSfixed64Extension, 0)); - assertEqualsExactType(211F , message.getExtension(repeatedFloatExtension , 0)); - assertEqualsExactType(212D , message.getExtension(repeatedDoubleExtension , 0)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtension , 0)); - assertEqualsExactType("215", message.getExtension(repeatedStringExtension , 0)); - assertEqualsExactType(toBytes("216"), message.getExtension(repeatedBytesExtension, 0)); - - assertEqualsExactType(217, message.getExtension(repeatedGroupExtension , 0).getA()); - assertEqualsExactType(218, message.getExtension(repeatedNestedMessageExtension , 0).getBb()); - assertEqualsExactType(219, message.getExtension(repeatedForeignMessageExtension, 0).getC()); - assertEqualsExactType(220, message.getExtension(repeatedImportMessageExtension , 0).getD()); - - assertEqualsExactType(TestAllTypes.NestedEnum.BAR, - message.getExtension(repeatedNestedEnumExtension, 0)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAR, - message.getExtension(repeatedForeignEnumExtension, 0)); - assertEqualsExactType(ImportEnum.IMPORT_BAR, - message.getExtension(repeatedImportEnumExtension, 0)); - - assertEqualsExactType("224", message.getExtension(repeatedStringPieceExtension, 0)); - assertEqualsExactType("225", message.getExtension(repeatedCordExtension, 0)); - - // Actually verify the second (modified) elements now. - assertEqualsExactType(501 , message.getExtension(repeatedInt32Extension , 1)); - assertEqualsExactType(502L , message.getExtension(repeatedInt64Extension , 1)); - assertEqualsExactType(503 , message.getExtension(repeatedUint32Extension , 1)); - assertEqualsExactType(504L , message.getExtension(repeatedUint64Extension , 1)); - assertEqualsExactType(505 , message.getExtension(repeatedSint32Extension , 1)); - assertEqualsExactType(506L , message.getExtension(repeatedSint64Extension , 1)); - assertEqualsExactType(507 , message.getExtension(repeatedFixed32Extension , 1)); - assertEqualsExactType(508L , message.getExtension(repeatedFixed64Extension , 1)); - assertEqualsExactType(509 , message.getExtension(repeatedSfixed32Extension, 1)); - assertEqualsExactType(510L , message.getExtension(repeatedSfixed64Extension, 1)); - assertEqualsExactType(511F , message.getExtension(repeatedFloatExtension , 1)); - assertEqualsExactType(512D , message.getExtension(repeatedDoubleExtension , 1)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtension , 1)); - assertEqualsExactType("515", message.getExtension(repeatedStringExtension , 1)); - assertEqualsExactType(toBytes("516"), message.getExtension(repeatedBytesExtension, 1)); - - assertEqualsExactType(517, message.getExtension(repeatedGroupExtension , 1).getA()); - assertEqualsExactType(518, message.getExtension(repeatedNestedMessageExtension , 1).getBb()); - assertEqualsExactType(519, message.getExtension(repeatedForeignMessageExtension, 1).getC()); - assertEqualsExactType(520, message.getExtension(repeatedImportMessageExtension , 1).getD()); - - assertEqualsExactType(TestAllTypes.NestedEnum.FOO, - message.getExtension(repeatedNestedEnumExtension, 1)); - assertEqualsExactType(ForeignEnum.FOREIGN_FOO, - message.getExtension(repeatedForeignEnumExtension, 1)); - assertEqualsExactType(ImportEnum.IMPORT_FOO, - message.getExtension(repeatedImportEnumExtension, 1)); - - assertEqualsExactType("524", message.getExtension(repeatedStringPieceExtension, 1)); - assertEqualsExactType("525", message.getExtension(repeatedCordExtension, 1)); - } - - public static void setPackedExtensions(TestPackedExtensions.Builder message) { - message.addExtension(packedInt32Extension , 601); - message.addExtension(packedInt64Extension , 602L); - message.addExtension(packedUint32Extension , 603); - message.addExtension(packedUint64Extension , 604L); - message.addExtension(packedSint32Extension , 605); - message.addExtension(packedSint64Extension , 606L); - message.addExtension(packedFixed32Extension , 607); - message.addExtension(packedFixed64Extension , 608L); - message.addExtension(packedSfixed32Extension, 609); - message.addExtension(packedSfixed64Extension, 610L); - message.addExtension(packedFloatExtension , 611F); - message.addExtension(packedDoubleExtension , 612D); - message.addExtension(packedBoolExtension , true); - message.addExtension(packedEnumExtension, ForeignEnum.FOREIGN_BAR); - // Add a second one of each field. - message.addExtension(packedInt32Extension , 701); - message.addExtension(packedInt64Extension , 702L); - message.addExtension(packedUint32Extension , 703); - message.addExtension(packedUint64Extension , 704L); - message.addExtension(packedSint32Extension , 705); - message.addExtension(packedSint64Extension , 706L); - message.addExtension(packedFixed32Extension , 707); - message.addExtension(packedFixed64Extension , 708L); - message.addExtension(packedSfixed32Extension, 709); - message.addExtension(packedSfixed64Extension, 710L); - message.addExtension(packedFloatExtension , 711F); - message.addExtension(packedDoubleExtension , 712D); - message.addExtension(packedBoolExtension , false); - message.addExtension(packedEnumExtension, ForeignEnum.FOREIGN_BAZ); - } - - public static void assertPackedExtensionsSet(TestPackedExtensions message) { - Assert.assertEquals(2, message.getExtensionCount(packedInt32Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedInt64Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedUint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedUint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedSint32Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedSint64Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedFixed32Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedFixed64Extension )); - Assert.assertEquals(2, message.getExtensionCount(packedSfixed32Extension)); - Assert.assertEquals(2, message.getExtensionCount(packedSfixed64Extension)); - Assert.assertEquals(2, message.getExtensionCount(packedFloatExtension )); - Assert.assertEquals(2, message.getExtensionCount(packedDoubleExtension )); - Assert.assertEquals(2, message.getExtensionCount(packedBoolExtension )); - Assert.assertEquals(2, message.getExtensionCount(packedEnumExtension)); - assertEqualsExactType(601 , message.getExtension(packedInt32Extension , 0)); - assertEqualsExactType(602L , message.getExtension(packedInt64Extension , 0)); - assertEqualsExactType(603 , message.getExtension(packedUint32Extension , 0)); - assertEqualsExactType(604L , message.getExtension(packedUint64Extension , 0)); - assertEqualsExactType(605 , message.getExtension(packedSint32Extension , 0)); - assertEqualsExactType(606L , message.getExtension(packedSint64Extension , 0)); - assertEqualsExactType(607 , message.getExtension(packedFixed32Extension , 0)); - assertEqualsExactType(608L , message.getExtension(packedFixed64Extension , 0)); - assertEqualsExactType(609 , message.getExtension(packedSfixed32Extension, 0)); - assertEqualsExactType(610L , message.getExtension(packedSfixed64Extension, 0)); - assertEqualsExactType(611F , message.getExtension(packedFloatExtension , 0)); - assertEqualsExactType(612D , message.getExtension(packedDoubleExtension , 0)); - assertEqualsExactType(true , message.getExtension(packedBoolExtension , 0)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAR, - message.getExtension(packedEnumExtension, 0)); - assertEqualsExactType(701 , message.getExtension(packedInt32Extension , 1)); - assertEqualsExactType(702L , message.getExtension(packedInt64Extension , 1)); - assertEqualsExactType(703 , message.getExtension(packedUint32Extension , 1)); - assertEqualsExactType(704L , message.getExtension(packedUint64Extension , 1)); - assertEqualsExactType(705 , message.getExtension(packedSint32Extension , 1)); - assertEqualsExactType(706L , message.getExtension(packedSint64Extension , 1)); - assertEqualsExactType(707 , message.getExtension(packedFixed32Extension , 1)); - assertEqualsExactType(708L , message.getExtension(packedFixed64Extension , 1)); - assertEqualsExactType(709 , message.getExtension(packedSfixed32Extension, 1)); - assertEqualsExactType(710L , message.getExtension(packedSfixed64Extension, 1)); - assertEqualsExactType(711F , message.getExtension(packedFloatExtension , 1)); - assertEqualsExactType(712D , message.getExtension(packedDoubleExtension , 1)); - assertEqualsExactType(false, message.getExtension(packedBoolExtension , 1)); - assertEqualsExactType(ForeignEnum.FOREIGN_BAZ, - message.getExtension(packedEnumExtension, 1)); - } - - // =================================================================== - // Lite extensions - - /** - * Set every field of {@code message} to the values expected by - * {@code assertAllExtensionsSet()}. - */ - public static void setAllExtensions(TestAllExtensionsLite.Builder message) { - message.setExtension(optionalInt32ExtensionLite , 101); - message.setExtension(optionalInt64ExtensionLite , 102L); - message.setExtension(optionalUint32ExtensionLite , 103); - message.setExtension(optionalUint64ExtensionLite , 104L); - message.setExtension(optionalSint32ExtensionLite , 105); - message.setExtension(optionalSint64ExtensionLite , 106L); - message.setExtension(optionalFixed32ExtensionLite , 107); - message.setExtension(optionalFixed64ExtensionLite , 108L); - message.setExtension(optionalSfixed32ExtensionLite, 109); - message.setExtension(optionalSfixed64ExtensionLite, 110L); - message.setExtension(optionalFloatExtensionLite , 111F); - message.setExtension(optionalDoubleExtensionLite , 112D); - message.setExtension(optionalBoolExtensionLite , true); - message.setExtension(optionalStringExtensionLite , "115"); - message.setExtension(optionalBytesExtensionLite , toBytes("116")); - - message.setExtension(optionalGroupExtensionLite, - OptionalGroup_extension_lite.newBuilder().setA(117).build()); - message.setExtension(optionalNestedMessageExtensionLite, - TestAllTypesLite.NestedMessage.newBuilder().setBb(118).build()); - message.setExtension(optionalForeignMessageExtensionLite, - ForeignMessageLite.newBuilder().setC(119).build()); - message.setExtension(optionalImportMessageExtensionLite, - ImportMessageLite.newBuilder().setD(120).build()); - - message.setExtension(optionalNestedEnumExtensionLite, TestAllTypesLite.NestedEnum.BAZ); - message.setExtension(optionalForeignEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_BAZ); - message.setExtension(optionalImportEnumExtensionLite, ImportEnumLite.IMPORT_LITE_BAZ); - - message.setExtension(optionalStringPieceExtensionLite, "124"); - message.setExtension(optionalCordExtensionLite, "125"); - - // ----------------------------------------------------------------- - - message.addExtension(repeatedInt32ExtensionLite , 201); - message.addExtension(repeatedInt64ExtensionLite , 202L); - message.addExtension(repeatedUint32ExtensionLite , 203); - message.addExtension(repeatedUint64ExtensionLite , 204L); - message.addExtension(repeatedSint32ExtensionLite , 205); - message.addExtension(repeatedSint64ExtensionLite , 206L); - message.addExtension(repeatedFixed32ExtensionLite , 207); - message.addExtension(repeatedFixed64ExtensionLite , 208L); - message.addExtension(repeatedSfixed32ExtensionLite, 209); - message.addExtension(repeatedSfixed64ExtensionLite, 210L); - message.addExtension(repeatedFloatExtensionLite , 211F); - message.addExtension(repeatedDoubleExtensionLite , 212D); - message.addExtension(repeatedBoolExtensionLite , true); - message.addExtension(repeatedStringExtensionLite , "215"); - message.addExtension(repeatedBytesExtensionLite , toBytes("216")); - - message.addExtension(repeatedGroupExtensionLite, - RepeatedGroup_extension_lite.newBuilder().setA(217).build()); - message.addExtension(repeatedNestedMessageExtensionLite, - TestAllTypesLite.NestedMessage.newBuilder().setBb(218).build()); - message.addExtension(repeatedForeignMessageExtensionLite, - ForeignMessageLite.newBuilder().setC(219).build()); - message.addExtension(repeatedImportMessageExtensionLite, - ImportMessageLite.newBuilder().setD(220).build()); - - message.addExtension(repeatedNestedEnumExtensionLite, TestAllTypesLite.NestedEnum.BAR); - message.addExtension(repeatedForeignEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_BAR); - message.addExtension(repeatedImportEnumExtensionLite, ImportEnumLite.IMPORT_LITE_BAR); - - message.addExtension(repeatedStringPieceExtensionLite, "224"); - message.addExtension(repeatedCordExtensionLite, "225"); - - // Add a second one of each field. - message.addExtension(repeatedInt32ExtensionLite , 301); - message.addExtension(repeatedInt64ExtensionLite , 302L); - message.addExtension(repeatedUint32ExtensionLite , 303); - message.addExtension(repeatedUint64ExtensionLite , 304L); - message.addExtension(repeatedSint32ExtensionLite , 305); - message.addExtension(repeatedSint64ExtensionLite , 306L); - message.addExtension(repeatedFixed32ExtensionLite , 307); - message.addExtension(repeatedFixed64ExtensionLite , 308L); - message.addExtension(repeatedSfixed32ExtensionLite, 309); - message.addExtension(repeatedSfixed64ExtensionLite, 310L); - message.addExtension(repeatedFloatExtensionLite , 311F); - message.addExtension(repeatedDoubleExtensionLite , 312D); - message.addExtension(repeatedBoolExtensionLite , false); - message.addExtension(repeatedStringExtensionLite , "315"); - message.addExtension(repeatedBytesExtensionLite , toBytes("316")); - - message.addExtension(repeatedGroupExtensionLite, - RepeatedGroup_extension_lite.newBuilder().setA(317).build()); - message.addExtension(repeatedNestedMessageExtensionLite, - TestAllTypesLite.NestedMessage.newBuilder().setBb(318).build()); - message.addExtension(repeatedForeignMessageExtensionLite, - ForeignMessageLite.newBuilder().setC(319).build()); - message.addExtension(repeatedImportMessageExtensionLite, - ImportMessageLite.newBuilder().setD(320).build()); - - message.addExtension(repeatedNestedEnumExtensionLite, TestAllTypesLite.NestedEnum.BAZ); - message.addExtension(repeatedForeignEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_BAZ); - message.addExtension(repeatedImportEnumExtensionLite, ImportEnumLite.IMPORT_LITE_BAZ); - - message.addExtension(repeatedStringPieceExtensionLite, "324"); - message.addExtension(repeatedCordExtensionLite, "325"); - - // ----------------------------------------------------------------- - - message.setExtension(defaultInt32ExtensionLite , 401); - message.setExtension(defaultInt64ExtensionLite , 402L); - message.setExtension(defaultUint32ExtensionLite , 403); - message.setExtension(defaultUint64ExtensionLite , 404L); - message.setExtension(defaultSint32ExtensionLite , 405); - message.setExtension(defaultSint64ExtensionLite , 406L); - message.setExtension(defaultFixed32ExtensionLite , 407); - message.setExtension(defaultFixed64ExtensionLite , 408L); - message.setExtension(defaultSfixed32ExtensionLite, 409); - message.setExtension(defaultSfixed64ExtensionLite, 410L); - message.setExtension(defaultFloatExtensionLite , 411F); - message.setExtension(defaultDoubleExtensionLite , 412D); - message.setExtension(defaultBoolExtensionLite , false); - message.setExtension(defaultStringExtensionLite , "415"); - message.setExtension(defaultBytesExtensionLite , toBytes("416")); - - message.setExtension(defaultNestedEnumExtensionLite, TestAllTypesLite.NestedEnum.FOO); - message.setExtension(defaultForeignEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_FOO); - message.setExtension(defaultImportEnumExtensionLite, ImportEnumLite.IMPORT_LITE_FOO); - - message.setExtension(defaultStringPieceExtensionLite, "424"); - message.setExtension(defaultCordExtensionLite, "425"); - } - - // ------------------------------------------------------------------- - - /** - * Modify the repeated extensions of {@code message} to contain the values - * expected by {@code assertRepeatedExtensionsModified()}. - */ - public static void modifyRepeatedExtensions( - TestAllExtensionsLite.Builder message) { - message.setExtension(repeatedInt32ExtensionLite , 1, 501); - message.setExtension(repeatedInt64ExtensionLite , 1, 502L); - message.setExtension(repeatedUint32ExtensionLite , 1, 503); - message.setExtension(repeatedUint64ExtensionLite , 1, 504L); - message.setExtension(repeatedSint32ExtensionLite , 1, 505); - message.setExtension(repeatedSint64ExtensionLite , 1, 506L); - message.setExtension(repeatedFixed32ExtensionLite , 1, 507); - message.setExtension(repeatedFixed64ExtensionLite , 1, 508L); - message.setExtension(repeatedSfixed32ExtensionLite, 1, 509); - message.setExtension(repeatedSfixed64ExtensionLite, 1, 510L); - message.setExtension(repeatedFloatExtensionLite , 1, 511F); - message.setExtension(repeatedDoubleExtensionLite , 1, 512D); - message.setExtension(repeatedBoolExtensionLite , 1, true); - message.setExtension(repeatedStringExtensionLite , 1, "515"); - message.setExtension(repeatedBytesExtensionLite , 1, toBytes("516")); - - message.setExtension(repeatedGroupExtensionLite, 1, - RepeatedGroup_extension_lite.newBuilder().setA(517).build()); - message.setExtension(repeatedNestedMessageExtensionLite, 1, - TestAllTypesLite.NestedMessage.newBuilder().setBb(518).build()); - message.setExtension(repeatedForeignMessageExtensionLite, 1, - ForeignMessageLite.newBuilder().setC(519).build()); - message.setExtension(repeatedImportMessageExtensionLite, 1, - ImportMessageLite.newBuilder().setD(520).build()); - - message.setExtension(repeatedNestedEnumExtensionLite , 1, TestAllTypesLite.NestedEnum.FOO); - message.setExtension(repeatedForeignEnumExtensionLite, 1, ForeignEnumLite.FOREIGN_LITE_FOO); - message.setExtension(repeatedImportEnumExtensionLite , 1, ImportEnumLite.IMPORT_LITE_FOO); - - message.setExtension(repeatedStringPieceExtensionLite, 1, "524"); - message.setExtension(repeatedCordExtensionLite, 1, "525"); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are set to the values assigned by {@code setAllExtensions}. - */ - public static void assertAllExtensionsSet( - TestAllExtensionsLiteOrBuilder message) { - Assert.assertTrue(message.hasExtension(optionalInt32ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalInt64ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalUint32ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalUint64ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalSint32ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalSint64ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalFixed32ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalFixed64ExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalSfixed32ExtensionLite)); - Assert.assertTrue(message.hasExtension(optionalSfixed64ExtensionLite)); - Assert.assertTrue(message.hasExtension(optionalFloatExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalDoubleExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalBoolExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalStringExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalBytesExtensionLite )); - - Assert.assertTrue(message.hasExtension(optionalGroupExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalNestedMessageExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalForeignMessageExtensionLite)); - Assert.assertTrue(message.hasExtension(optionalImportMessageExtensionLite )); - - Assert.assertTrue(message.getExtension(optionalGroupExtensionLite ).hasA()); - Assert.assertTrue(message.getExtension(optionalNestedMessageExtensionLite ).hasBb()); - Assert.assertTrue(message.getExtension(optionalForeignMessageExtensionLite).hasC()); - Assert.assertTrue(message.getExtension(optionalImportMessageExtensionLite ).hasD()); - - Assert.assertTrue(message.hasExtension(optionalNestedEnumExtensionLite )); - Assert.assertTrue(message.hasExtension(optionalForeignEnumExtensionLite)); - Assert.assertTrue(message.hasExtension(optionalImportEnumExtensionLite )); - - Assert.assertTrue(message.hasExtension(optionalStringPieceExtensionLite)); - Assert.assertTrue(message.hasExtension(optionalCordExtensionLite)); - - assertEqualsExactType(101 , message.getExtension(optionalInt32ExtensionLite )); - assertEqualsExactType(102L , message.getExtension(optionalInt64ExtensionLite )); - assertEqualsExactType(103 , message.getExtension(optionalUint32ExtensionLite )); - assertEqualsExactType(104L , message.getExtension(optionalUint64ExtensionLite )); - assertEqualsExactType(105 , message.getExtension(optionalSint32ExtensionLite )); - assertEqualsExactType(106L , message.getExtension(optionalSint64ExtensionLite )); - assertEqualsExactType(107 , message.getExtension(optionalFixed32ExtensionLite )); - assertEqualsExactType(108L , message.getExtension(optionalFixed64ExtensionLite )); - assertEqualsExactType(109 , message.getExtension(optionalSfixed32ExtensionLite)); - assertEqualsExactType(110L , message.getExtension(optionalSfixed64ExtensionLite)); - assertEqualsExactType(111F , message.getExtension(optionalFloatExtensionLite )); - assertEqualsExactType(112D , message.getExtension(optionalDoubleExtensionLite )); - assertEqualsExactType(true , message.getExtension(optionalBoolExtensionLite )); - assertEqualsExactType("115", message.getExtension(optionalStringExtensionLite )); - assertEqualsExactType(toBytes("116"), message.getExtension(optionalBytesExtensionLite)); - - assertEqualsExactType(117, message.getExtension(optionalGroupExtensionLite ).getA()); - assertEqualsExactType(118, message.getExtension(optionalNestedMessageExtensionLite ).getBb()); - assertEqualsExactType(119, message.getExtension(optionalForeignMessageExtensionLite).getC()); - assertEqualsExactType(120, message.getExtension(optionalImportMessageExtensionLite ).getD()); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.BAZ, - message.getExtension(optionalNestedEnumExtensionLite)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAZ, - message.getExtension(optionalForeignEnumExtensionLite)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_BAZ, - message.getExtension(optionalImportEnumExtensionLite)); - - assertEqualsExactType("124", message.getExtension(optionalStringPieceExtensionLite)); - assertEqualsExactType("125", message.getExtension(optionalCordExtensionLite)); - - // ----------------------------------------------------------------- - - Assert.assertEquals(2, message.getExtensionCount(repeatedInt32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedInt64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed32ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed64ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedFloatExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedDoubleExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBoolExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedStringExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBytesExtensionLite )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedGroupExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedMessageExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignMessageExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportMessageExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedEnumExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignEnumExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportEnumExtensionLite )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedStringPieceExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedCordExtensionLite)); - - assertEqualsExactType(201 , message.getExtension(repeatedInt32ExtensionLite , 0)); - assertEqualsExactType(202L , message.getExtension(repeatedInt64ExtensionLite , 0)); - assertEqualsExactType(203 , message.getExtension(repeatedUint32ExtensionLite , 0)); - assertEqualsExactType(204L , message.getExtension(repeatedUint64ExtensionLite , 0)); - assertEqualsExactType(205 , message.getExtension(repeatedSint32ExtensionLite , 0)); - assertEqualsExactType(206L , message.getExtension(repeatedSint64ExtensionLite , 0)); - assertEqualsExactType(207 , message.getExtension(repeatedFixed32ExtensionLite , 0)); - assertEqualsExactType(208L , message.getExtension(repeatedFixed64ExtensionLite , 0)); - assertEqualsExactType(209 , message.getExtension(repeatedSfixed32ExtensionLite, 0)); - assertEqualsExactType(210L , message.getExtension(repeatedSfixed64ExtensionLite, 0)); - assertEqualsExactType(211F , message.getExtension(repeatedFloatExtensionLite , 0)); - assertEqualsExactType(212D , message.getExtension(repeatedDoubleExtensionLite , 0)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtensionLite , 0)); - assertEqualsExactType("215", message.getExtension(repeatedStringExtensionLite , 0)); - assertEqualsExactType(toBytes("216"), message.getExtension(repeatedBytesExtensionLite, 0)); - - assertEqualsExactType(217, message.getExtension(repeatedGroupExtensionLite ,0).getA()); - assertEqualsExactType(218, message.getExtension(repeatedNestedMessageExtensionLite ,0).getBb()); - assertEqualsExactType(219, message.getExtension(repeatedForeignMessageExtensionLite,0).getC()); - assertEqualsExactType(220, message.getExtension(repeatedImportMessageExtensionLite ,0).getD()); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.BAR, - message.getExtension(repeatedNestedEnumExtensionLite, 0)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAR, - message.getExtension(repeatedForeignEnumExtensionLite, 0)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_BAR, - message.getExtension(repeatedImportEnumExtensionLite, 0)); - - assertEqualsExactType("224", message.getExtension(repeatedStringPieceExtensionLite, 0)); - assertEqualsExactType("225", message.getExtension(repeatedCordExtensionLite, 0)); - - assertEqualsExactType(301 , message.getExtension(repeatedInt32ExtensionLite , 1)); - assertEqualsExactType(302L , message.getExtension(repeatedInt64ExtensionLite , 1)); - assertEqualsExactType(303 , message.getExtension(repeatedUint32ExtensionLite , 1)); - assertEqualsExactType(304L , message.getExtension(repeatedUint64ExtensionLite , 1)); - assertEqualsExactType(305 , message.getExtension(repeatedSint32ExtensionLite , 1)); - assertEqualsExactType(306L , message.getExtension(repeatedSint64ExtensionLite , 1)); - assertEqualsExactType(307 , message.getExtension(repeatedFixed32ExtensionLite , 1)); - assertEqualsExactType(308L , message.getExtension(repeatedFixed64ExtensionLite , 1)); - assertEqualsExactType(309 , message.getExtension(repeatedSfixed32ExtensionLite, 1)); - assertEqualsExactType(310L , message.getExtension(repeatedSfixed64ExtensionLite, 1)); - assertEqualsExactType(311F , message.getExtension(repeatedFloatExtensionLite , 1)); - assertEqualsExactType(312D , message.getExtension(repeatedDoubleExtensionLite , 1)); - assertEqualsExactType(false, message.getExtension(repeatedBoolExtensionLite , 1)); - assertEqualsExactType("315", message.getExtension(repeatedStringExtensionLite , 1)); - assertEqualsExactType(toBytes("316"), message.getExtension(repeatedBytesExtensionLite, 1)); - - assertEqualsExactType(317, message.getExtension(repeatedGroupExtensionLite ,1).getA()); - assertEqualsExactType(318, message.getExtension(repeatedNestedMessageExtensionLite ,1).getBb()); - assertEqualsExactType(319, message.getExtension(repeatedForeignMessageExtensionLite,1).getC()); - assertEqualsExactType(320, message.getExtension(repeatedImportMessageExtensionLite ,1).getD()); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.BAZ, - message.getExtension(repeatedNestedEnumExtensionLite, 1)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAZ, - message.getExtension(repeatedForeignEnumExtensionLite, 1)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_BAZ, - message.getExtension(repeatedImportEnumExtensionLite, 1)); - - assertEqualsExactType("324", message.getExtension(repeatedStringPieceExtensionLite, 1)); - assertEqualsExactType("325", message.getExtension(repeatedCordExtensionLite, 1)); - - // ----------------------------------------------------------------- - - Assert.assertTrue(message.hasExtension(defaultInt32ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultInt64ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultUint32ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultUint64ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultSint32ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultSint64ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultFixed32ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultFixed64ExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultSfixed32ExtensionLite)); - Assert.assertTrue(message.hasExtension(defaultSfixed64ExtensionLite)); - Assert.assertTrue(message.hasExtension(defaultFloatExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultDoubleExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultBoolExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultStringExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultBytesExtensionLite )); - - Assert.assertTrue(message.hasExtension(defaultNestedEnumExtensionLite )); - Assert.assertTrue(message.hasExtension(defaultForeignEnumExtensionLite)); - Assert.assertTrue(message.hasExtension(defaultImportEnumExtensionLite )); - - Assert.assertTrue(message.hasExtension(defaultStringPieceExtensionLite)); - Assert.assertTrue(message.hasExtension(defaultCordExtensionLite)); - - assertEqualsExactType(401 , message.getExtension(defaultInt32ExtensionLite )); - assertEqualsExactType(402L , message.getExtension(defaultInt64ExtensionLite )); - assertEqualsExactType(403 , message.getExtension(defaultUint32ExtensionLite )); - assertEqualsExactType(404L , message.getExtension(defaultUint64ExtensionLite )); - assertEqualsExactType(405 , message.getExtension(defaultSint32ExtensionLite )); - assertEqualsExactType(406L , message.getExtension(defaultSint64ExtensionLite )); - assertEqualsExactType(407 , message.getExtension(defaultFixed32ExtensionLite )); - assertEqualsExactType(408L , message.getExtension(defaultFixed64ExtensionLite )); - assertEqualsExactType(409 , message.getExtension(defaultSfixed32ExtensionLite)); - assertEqualsExactType(410L , message.getExtension(defaultSfixed64ExtensionLite)); - assertEqualsExactType(411F , message.getExtension(defaultFloatExtensionLite )); - assertEqualsExactType(412D , message.getExtension(defaultDoubleExtensionLite )); - assertEqualsExactType(false, message.getExtension(defaultBoolExtensionLite )); - assertEqualsExactType("415", message.getExtension(defaultStringExtensionLite )); - assertEqualsExactType(toBytes("416"), message.getExtension(defaultBytesExtensionLite)); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.FOO, - message.getExtension(defaultNestedEnumExtensionLite )); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_FOO, - message.getExtension(defaultForeignEnumExtensionLite)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_FOO, - message.getExtension(defaultImportEnumExtensionLite)); - - assertEqualsExactType("424", message.getExtension(defaultStringPieceExtensionLite)); - assertEqualsExactType("425", message.getExtension(defaultCordExtensionLite)); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are cleared, and that getting the extensions returns their - * default values. - */ - public static void assertExtensionsClear( - TestAllExtensionsLiteOrBuilder message) { - // hasBlah() should initially be false for all optional fields. - Assert.assertFalse(message.hasExtension(optionalInt32ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalInt64ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalUint32ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalUint64ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalSint32ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalSint64ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalFixed32ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalFixed64ExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalSfixed32ExtensionLite)); - Assert.assertFalse(message.hasExtension(optionalSfixed64ExtensionLite)); - Assert.assertFalse(message.hasExtension(optionalFloatExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalDoubleExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalBoolExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalStringExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalBytesExtensionLite )); - - Assert.assertFalse(message.hasExtension(optionalGroupExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalNestedMessageExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalForeignMessageExtensionLite)); - Assert.assertFalse(message.hasExtension(optionalImportMessageExtensionLite )); - - Assert.assertFalse(message.hasExtension(optionalNestedEnumExtensionLite )); - Assert.assertFalse(message.hasExtension(optionalForeignEnumExtensionLite)); - Assert.assertFalse(message.hasExtension(optionalImportEnumExtensionLite )); - - Assert.assertFalse(message.hasExtension(optionalStringPieceExtensionLite)); - Assert.assertFalse(message.hasExtension(optionalCordExtensionLite)); - - // Optional fields without defaults are set to zero or something like it. - assertEqualsExactType(0 , message.getExtension(optionalInt32ExtensionLite )); - assertEqualsExactType(0L , message.getExtension(optionalInt64ExtensionLite )); - assertEqualsExactType(0 , message.getExtension(optionalUint32ExtensionLite )); - assertEqualsExactType(0L , message.getExtension(optionalUint64ExtensionLite )); - assertEqualsExactType(0 , message.getExtension(optionalSint32ExtensionLite )); - assertEqualsExactType(0L , message.getExtension(optionalSint64ExtensionLite )); - assertEqualsExactType(0 , message.getExtension(optionalFixed32ExtensionLite )); - assertEqualsExactType(0L , message.getExtension(optionalFixed64ExtensionLite )); - assertEqualsExactType(0 , message.getExtension(optionalSfixed32ExtensionLite)); - assertEqualsExactType(0L , message.getExtension(optionalSfixed64ExtensionLite)); - assertEqualsExactType(0F , message.getExtension(optionalFloatExtensionLite )); - assertEqualsExactType(0D , message.getExtension(optionalDoubleExtensionLite )); - assertEqualsExactType(false, message.getExtension(optionalBoolExtensionLite )); - assertEqualsExactType("" , message.getExtension(optionalStringExtensionLite )); - assertEqualsExactType(ByteString.EMPTY, message.getExtension(optionalBytesExtensionLite)); - - // Embedded messages should also be clear. - Assert.assertFalse(message.getExtension(optionalGroupExtensionLite ).hasA()); - Assert.assertFalse(message.getExtension(optionalNestedMessageExtensionLite ).hasBb()); - Assert.assertFalse(message.getExtension(optionalForeignMessageExtensionLite).hasC()); - Assert.assertFalse(message.getExtension(optionalImportMessageExtensionLite ).hasD()); - - assertEqualsExactType(0, message.getExtension(optionalGroupExtensionLite ).getA()); - assertEqualsExactType(0, message.getExtension(optionalNestedMessageExtensionLite ).getBb()); - assertEqualsExactType(0, message.getExtension(optionalForeignMessageExtensionLite).getC()); - assertEqualsExactType(0, message.getExtension(optionalImportMessageExtensionLite ).getD()); - - // Enums without defaults are set to the first value in the enum. - assertEqualsExactType(TestAllTypesLite.NestedEnum.FOO, - message.getExtension(optionalNestedEnumExtensionLite )); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_FOO, - message.getExtension(optionalForeignEnumExtensionLite)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_FOO, - message.getExtension(optionalImportEnumExtensionLite)); - - assertEqualsExactType("", message.getExtension(optionalStringPieceExtensionLite)); - assertEqualsExactType("", message.getExtension(optionalCordExtensionLite)); - - // Repeated fields are empty. - Assert.assertEquals(0, message.getExtensionCount(repeatedInt32ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedInt64ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedUint32ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedUint64ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSint32ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSint64ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedFixed32ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedFixed64ExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedSfixed32ExtensionLite)); - Assert.assertEquals(0, message.getExtensionCount(repeatedSfixed64ExtensionLite)); - Assert.assertEquals(0, message.getExtensionCount(repeatedFloatExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedDoubleExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedBoolExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedStringExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedBytesExtensionLite )); - - Assert.assertEquals(0, message.getExtensionCount(repeatedGroupExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedNestedMessageExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedForeignMessageExtensionLite)); - Assert.assertEquals(0, message.getExtensionCount(repeatedImportMessageExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedNestedEnumExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedForeignEnumExtensionLite )); - Assert.assertEquals(0, message.getExtensionCount(repeatedImportEnumExtensionLite )); - - Assert.assertEquals(0, message.getExtensionCount(repeatedStringPieceExtensionLite)); - Assert.assertEquals(0, message.getExtensionCount(repeatedCordExtensionLite)); - - // hasBlah() should also be false for all default fields. - Assert.assertFalse(message.hasExtension(defaultInt32ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultInt64ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultUint32ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultUint64ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultSint32ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultSint64ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultFixed32ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultFixed64ExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultSfixed32ExtensionLite)); - Assert.assertFalse(message.hasExtension(defaultSfixed64ExtensionLite)); - Assert.assertFalse(message.hasExtension(defaultFloatExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultDoubleExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultBoolExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultStringExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultBytesExtensionLite )); - - Assert.assertFalse(message.hasExtension(defaultNestedEnumExtensionLite )); - Assert.assertFalse(message.hasExtension(defaultForeignEnumExtensionLite)); - Assert.assertFalse(message.hasExtension(defaultImportEnumExtensionLite )); - - Assert.assertFalse(message.hasExtension(defaultStringPieceExtensionLite)); - Assert.assertFalse(message.hasExtension(defaultCordExtensionLite)); - - // Fields with defaults have their default values (duh). - assertEqualsExactType( 41 , message.getExtension(defaultInt32ExtensionLite )); - assertEqualsExactType( 42L , message.getExtension(defaultInt64ExtensionLite )); - assertEqualsExactType( 43 , message.getExtension(defaultUint32ExtensionLite )); - assertEqualsExactType( 44L , message.getExtension(defaultUint64ExtensionLite )); - assertEqualsExactType(-45 , message.getExtension(defaultSint32ExtensionLite )); - assertEqualsExactType( 46L , message.getExtension(defaultSint64ExtensionLite )); - assertEqualsExactType( 47 , message.getExtension(defaultFixed32ExtensionLite )); - assertEqualsExactType( 48L , message.getExtension(defaultFixed64ExtensionLite )); - assertEqualsExactType( 49 , message.getExtension(defaultSfixed32ExtensionLite)); - assertEqualsExactType(-50L , message.getExtension(defaultSfixed64ExtensionLite)); - assertEqualsExactType( 51.5F , message.getExtension(defaultFloatExtensionLite )); - assertEqualsExactType( 52e3D , message.getExtension(defaultDoubleExtensionLite )); - assertEqualsExactType(true , message.getExtension(defaultBoolExtensionLite )); - assertEqualsExactType("hello", message.getExtension(defaultStringExtensionLite )); - assertEqualsExactType(toBytes("world"), message.getExtension(defaultBytesExtensionLite)); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.BAR, - message.getExtension(defaultNestedEnumExtensionLite )); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAR, - message.getExtension(defaultForeignEnumExtensionLite)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_BAR, - message.getExtension(defaultImportEnumExtensionLite)); - - assertEqualsExactType("abc", message.getExtension(defaultStringPieceExtensionLite)); - assertEqualsExactType("123", message.getExtension(defaultCordExtensionLite)); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all extensions of - * {@code message} are set to the values assigned by {@code setAllExtensions} - * followed by {@code modifyRepeatedExtensions}. - */ - public static void assertRepeatedExtensionsModified( - TestAllExtensionsLiteOrBuilder message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - Assert.assertEquals(2, message.getExtensionCount(repeatedInt32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedInt64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedUint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedFixed64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed32ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedSfixed64ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedFloatExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedDoubleExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBoolExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedStringExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedBytesExtensionLite )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedGroupExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedMessageExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignMessageExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportMessageExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedNestedEnumExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedForeignEnumExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(repeatedImportEnumExtensionLite )); - - Assert.assertEquals(2, message.getExtensionCount(repeatedStringPieceExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(repeatedCordExtensionLite)); - - assertEqualsExactType(201 , message.getExtension(repeatedInt32ExtensionLite , 0)); - assertEqualsExactType(202L , message.getExtension(repeatedInt64ExtensionLite , 0)); - assertEqualsExactType(203 , message.getExtension(repeatedUint32ExtensionLite , 0)); - assertEqualsExactType(204L , message.getExtension(repeatedUint64ExtensionLite , 0)); - assertEqualsExactType(205 , message.getExtension(repeatedSint32ExtensionLite , 0)); - assertEqualsExactType(206L , message.getExtension(repeatedSint64ExtensionLite , 0)); - assertEqualsExactType(207 , message.getExtension(repeatedFixed32ExtensionLite , 0)); - assertEqualsExactType(208L , message.getExtension(repeatedFixed64ExtensionLite , 0)); - assertEqualsExactType(209 , message.getExtension(repeatedSfixed32ExtensionLite, 0)); - assertEqualsExactType(210L , message.getExtension(repeatedSfixed64ExtensionLite, 0)); - assertEqualsExactType(211F , message.getExtension(repeatedFloatExtensionLite , 0)); - assertEqualsExactType(212D , message.getExtension(repeatedDoubleExtensionLite , 0)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtensionLite , 0)); - assertEqualsExactType("215", message.getExtension(repeatedStringExtensionLite , 0)); - assertEqualsExactType(toBytes("216"), message.getExtension(repeatedBytesExtensionLite, 0)); - - assertEqualsExactType(217, message.getExtension(repeatedGroupExtensionLite ,0).getA()); - assertEqualsExactType(218, message.getExtension(repeatedNestedMessageExtensionLite ,0).getBb()); - assertEqualsExactType(219, message.getExtension(repeatedForeignMessageExtensionLite,0).getC()); - assertEqualsExactType(220, message.getExtension(repeatedImportMessageExtensionLite ,0).getD()); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.BAR, - message.getExtension(repeatedNestedEnumExtensionLite, 0)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAR, - message.getExtension(repeatedForeignEnumExtensionLite, 0)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_BAR, - message.getExtension(repeatedImportEnumExtensionLite, 0)); - - assertEqualsExactType("224", message.getExtension(repeatedStringPieceExtensionLite, 0)); - assertEqualsExactType("225", message.getExtension(repeatedCordExtensionLite, 0)); - - // Actually verify the second (modified) elements now. - assertEqualsExactType(501 , message.getExtension(repeatedInt32ExtensionLite , 1)); - assertEqualsExactType(502L , message.getExtension(repeatedInt64ExtensionLite , 1)); - assertEqualsExactType(503 , message.getExtension(repeatedUint32ExtensionLite , 1)); - assertEqualsExactType(504L , message.getExtension(repeatedUint64ExtensionLite , 1)); - assertEqualsExactType(505 , message.getExtension(repeatedSint32ExtensionLite , 1)); - assertEqualsExactType(506L , message.getExtension(repeatedSint64ExtensionLite , 1)); - assertEqualsExactType(507 , message.getExtension(repeatedFixed32ExtensionLite , 1)); - assertEqualsExactType(508L , message.getExtension(repeatedFixed64ExtensionLite , 1)); - assertEqualsExactType(509 , message.getExtension(repeatedSfixed32ExtensionLite, 1)); - assertEqualsExactType(510L , message.getExtension(repeatedSfixed64ExtensionLite, 1)); - assertEqualsExactType(511F , message.getExtension(repeatedFloatExtensionLite , 1)); - assertEqualsExactType(512D , message.getExtension(repeatedDoubleExtensionLite , 1)); - assertEqualsExactType(true , message.getExtension(repeatedBoolExtensionLite , 1)); - assertEqualsExactType("515", message.getExtension(repeatedStringExtensionLite , 1)); - assertEqualsExactType(toBytes("516"), message.getExtension(repeatedBytesExtensionLite, 1)); - - assertEqualsExactType(517, message.getExtension(repeatedGroupExtensionLite ,1).getA()); - assertEqualsExactType(518, message.getExtension(repeatedNestedMessageExtensionLite ,1).getBb()); - assertEqualsExactType(519, message.getExtension(repeatedForeignMessageExtensionLite,1).getC()); - assertEqualsExactType(520, message.getExtension(repeatedImportMessageExtensionLite ,1).getD()); - - assertEqualsExactType(TestAllTypesLite.NestedEnum.FOO, - message.getExtension(repeatedNestedEnumExtensionLite, 1)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_FOO, - message.getExtension(repeatedForeignEnumExtensionLite, 1)); - assertEqualsExactType(ImportEnumLite.IMPORT_LITE_FOO, - message.getExtension(repeatedImportEnumExtensionLite, 1)); - - assertEqualsExactType("524", message.getExtension(repeatedStringPieceExtensionLite, 1)); - assertEqualsExactType("525", message.getExtension(repeatedCordExtensionLite, 1)); - } - - public static void setPackedExtensions(TestPackedExtensionsLite.Builder message) { - message.addExtension(packedInt32ExtensionLite , 601); - message.addExtension(packedInt64ExtensionLite , 602L); - message.addExtension(packedUint32ExtensionLite , 603); - message.addExtension(packedUint64ExtensionLite , 604L); - message.addExtension(packedSint32ExtensionLite , 605); - message.addExtension(packedSint64ExtensionLite , 606L); - message.addExtension(packedFixed32ExtensionLite , 607); - message.addExtension(packedFixed64ExtensionLite , 608L); - message.addExtension(packedSfixed32ExtensionLite, 609); - message.addExtension(packedSfixed64ExtensionLite, 610L); - message.addExtension(packedFloatExtensionLite , 611F); - message.addExtension(packedDoubleExtensionLite , 612D); - message.addExtension(packedBoolExtensionLite , true); - message.addExtension(packedEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_BAR); - // Add a second one of each field. - message.addExtension(packedInt32ExtensionLite , 701); - message.addExtension(packedInt64ExtensionLite , 702L); - message.addExtension(packedUint32ExtensionLite , 703); - message.addExtension(packedUint64ExtensionLite , 704L); - message.addExtension(packedSint32ExtensionLite , 705); - message.addExtension(packedSint64ExtensionLite , 706L); - message.addExtension(packedFixed32ExtensionLite , 707); - message.addExtension(packedFixed64ExtensionLite , 708L); - message.addExtension(packedSfixed32ExtensionLite, 709); - message.addExtension(packedSfixed64ExtensionLite, 710L); - message.addExtension(packedFloatExtensionLite , 711F); - message.addExtension(packedDoubleExtensionLite , 712D); - message.addExtension(packedBoolExtensionLite , false); - message.addExtension(packedEnumExtensionLite, ForeignEnumLite.FOREIGN_LITE_BAZ); - } - - public static void assertPackedExtensionsSet(TestPackedExtensionsLite message) { - Assert.assertEquals(2, message.getExtensionCount(packedInt32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedInt64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedUint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedUint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedSint32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedSint64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedFixed32ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedFixed64ExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedSfixed32ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(packedSfixed64ExtensionLite)); - Assert.assertEquals(2, message.getExtensionCount(packedFloatExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedDoubleExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedBoolExtensionLite )); - Assert.assertEquals(2, message.getExtensionCount(packedEnumExtensionLite)); - assertEqualsExactType(601 , message.getExtension(packedInt32ExtensionLite , 0)); - assertEqualsExactType(602L , message.getExtension(packedInt64ExtensionLite , 0)); - assertEqualsExactType(603 , message.getExtension(packedUint32ExtensionLite , 0)); - assertEqualsExactType(604L , message.getExtension(packedUint64ExtensionLite , 0)); - assertEqualsExactType(605 , message.getExtension(packedSint32ExtensionLite , 0)); - assertEqualsExactType(606L , message.getExtension(packedSint64ExtensionLite , 0)); - assertEqualsExactType(607 , message.getExtension(packedFixed32ExtensionLite , 0)); - assertEqualsExactType(608L , message.getExtension(packedFixed64ExtensionLite , 0)); - assertEqualsExactType(609 , message.getExtension(packedSfixed32ExtensionLite, 0)); - assertEqualsExactType(610L , message.getExtension(packedSfixed64ExtensionLite, 0)); - assertEqualsExactType(611F , message.getExtension(packedFloatExtensionLite , 0)); - assertEqualsExactType(612D , message.getExtension(packedDoubleExtensionLite , 0)); - assertEqualsExactType(true , message.getExtension(packedBoolExtensionLite , 0)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAR, - message.getExtension(packedEnumExtensionLite, 0)); - assertEqualsExactType(701 , message.getExtension(packedInt32ExtensionLite , 1)); - assertEqualsExactType(702L , message.getExtension(packedInt64ExtensionLite , 1)); - assertEqualsExactType(703 , message.getExtension(packedUint32ExtensionLite , 1)); - assertEqualsExactType(704L , message.getExtension(packedUint64ExtensionLite , 1)); - assertEqualsExactType(705 , message.getExtension(packedSint32ExtensionLite , 1)); - assertEqualsExactType(706L , message.getExtension(packedSint64ExtensionLite , 1)); - assertEqualsExactType(707 , message.getExtension(packedFixed32ExtensionLite , 1)); - assertEqualsExactType(708L , message.getExtension(packedFixed64ExtensionLite , 1)); - assertEqualsExactType(709 , message.getExtension(packedSfixed32ExtensionLite, 1)); - assertEqualsExactType(710L , message.getExtension(packedSfixed64ExtensionLite, 1)); - assertEqualsExactType(711F , message.getExtension(packedFloatExtensionLite , 1)); - assertEqualsExactType(712D , message.getExtension(packedDoubleExtensionLite , 1)); - assertEqualsExactType(false, message.getExtension(packedBoolExtensionLite , 1)); - assertEqualsExactType(ForeignEnumLite.FOREIGN_LITE_BAZ, - message.getExtension(packedEnumExtensionLite, 1)); - } - - // ================================================================= - - /** - * Performs the same things that the methods of {@code TestUtil} do, but - * via the reflection interface. This is its own class because it needs - * to know what descriptor to use. - */ - public static class ReflectionTester { - private final Descriptors.Descriptor baseDescriptor; - private final ExtensionRegistry extensionRegistry; - - private final Descriptors.FileDescriptor file; - private final Descriptors.FileDescriptor importFile; - - private final Descriptors.Descriptor optionalGroup; - private final Descriptors.Descriptor repeatedGroup; - private final Descriptors.Descriptor nestedMessage; - private final Descriptors.Descriptor foreignMessage; - private final Descriptors.Descriptor importMessage; - - private final Descriptors.FieldDescriptor groupA; - private final Descriptors.FieldDescriptor repeatedGroupA; - private final Descriptors.FieldDescriptor nestedB; - private final Descriptors.FieldDescriptor foreignC; - private final Descriptors.FieldDescriptor importD; - - private final Descriptors.EnumDescriptor nestedEnum; - private final Descriptors.EnumDescriptor foreignEnum; - private final Descriptors.EnumDescriptor importEnum; - - private final Descriptors.EnumValueDescriptor nestedFoo; - private final Descriptors.EnumValueDescriptor nestedBar; - private final Descriptors.EnumValueDescriptor nestedBaz; - private final Descriptors.EnumValueDescriptor foreignFoo; - private final Descriptors.EnumValueDescriptor foreignBar; - private final Descriptors.EnumValueDescriptor foreignBaz; - private final Descriptors.EnumValueDescriptor importFoo; - private final Descriptors.EnumValueDescriptor importBar; - private final Descriptors.EnumValueDescriptor importBaz; - - /** - * Construct a {@code ReflectionTester} that will expect messages using - * the given descriptor. - * - * Normally {@code baseDescriptor} should be a descriptor for the type - * {@code TestAllTypes}, defined in - * {@code google/protobuf/unittest.proto}. However, if - * {@code extensionRegistry} is non-null, then {@code baseDescriptor} should - * be for {@code TestAllExtensions} instead, and instead of reading and - * writing normal fields, the tester will read and write extensions. - * All of {@code TestAllExtensions}' extensions must be registered in the - * registry. - */ - public ReflectionTester(Descriptors.Descriptor baseDescriptor, - ExtensionRegistry extensionRegistry) { - this.baseDescriptor = baseDescriptor; - this.extensionRegistry = extensionRegistry; - - this.file = baseDescriptor.getFile(); - Assert.assertEquals(1, file.getDependencies().size()); - this.importFile = file.getDependencies().get(0); - - Descriptors.Descriptor testAllTypes; - if (baseDescriptor.getName() == "TestAllTypes") { - testAllTypes = baseDescriptor; - } else { - testAllTypes = file.findMessageTypeByName("TestAllTypes"); - Assert.assertNotNull(testAllTypes); - } - - if (extensionRegistry == null) { - // Use testAllTypes, rather than baseDescriptor, to allow - // initialization using TestPackedTypes descriptors. These objects - // won't be used by the methods for packed fields. - this.optionalGroup = - testAllTypes.findNestedTypeByName("OptionalGroup"); - this.repeatedGroup = - testAllTypes.findNestedTypeByName("RepeatedGroup"); - } else { - this.optionalGroup = - file.findMessageTypeByName("OptionalGroup_extension"); - this.repeatedGroup = - file.findMessageTypeByName("RepeatedGroup_extension"); - } - this.nestedMessage = testAllTypes.findNestedTypeByName("NestedMessage"); - this.foreignMessage = file.findMessageTypeByName("ForeignMessage"); - this.importMessage = importFile.findMessageTypeByName("ImportMessage"); - - this.nestedEnum = testAllTypes.findEnumTypeByName("NestedEnum"); - this.foreignEnum = file.findEnumTypeByName("ForeignEnum"); - this.importEnum = importFile.findEnumTypeByName("ImportEnum"); - - Assert.assertNotNull(optionalGroup ); - Assert.assertNotNull(repeatedGroup ); - Assert.assertNotNull(nestedMessage ); - Assert.assertNotNull(foreignMessage); - Assert.assertNotNull(importMessage ); - Assert.assertNotNull(nestedEnum ); - Assert.assertNotNull(foreignEnum ); - Assert.assertNotNull(importEnum ); - - this.nestedB = nestedMessage .findFieldByName("bb"); - this.foreignC = foreignMessage.findFieldByName("c"); - this.importD = importMessage .findFieldByName("d"); - this.nestedFoo = nestedEnum.findValueByName("FOO"); - this.nestedBar = nestedEnum.findValueByName("BAR"); - this.nestedBaz = nestedEnum.findValueByName("BAZ"); - this.foreignFoo = foreignEnum.findValueByName("FOREIGN_FOO"); - this.foreignBar = foreignEnum.findValueByName("FOREIGN_BAR"); - this.foreignBaz = foreignEnum.findValueByName("FOREIGN_BAZ"); - this.importFoo = importEnum.findValueByName("IMPORT_FOO"); - this.importBar = importEnum.findValueByName("IMPORT_BAR"); - this.importBaz = importEnum.findValueByName("IMPORT_BAZ"); - - this.groupA = optionalGroup.findFieldByName("a"); - this.repeatedGroupA = repeatedGroup.findFieldByName("a"); - - Assert.assertNotNull(groupA ); - Assert.assertNotNull(repeatedGroupA); - Assert.assertNotNull(nestedB ); - Assert.assertNotNull(foreignC ); - Assert.assertNotNull(importD ); - Assert.assertNotNull(nestedFoo ); - Assert.assertNotNull(nestedBar ); - Assert.assertNotNull(nestedBaz ); - Assert.assertNotNull(foreignFoo ); - Assert.assertNotNull(foreignBar ); - Assert.assertNotNull(foreignBaz ); - Assert.assertNotNull(importFoo ); - Assert.assertNotNull(importBar ); - Assert.assertNotNull(importBaz ); - } - - /** - * Shorthand to get a FieldDescriptor for a field of unittest::TestAllTypes. - */ - private Descriptors.FieldDescriptor f(String name) { - Descriptors.FieldDescriptor result; - if (extensionRegistry == null) { - result = baseDescriptor.findFieldByName(name); - } else { - result = file.findExtensionByName(name + "_extension"); - } - Assert.assertNotNull(result); - return result; - } - - /** - * Calls {@code parent.newBuilderForField()} or uses the - * {@code ExtensionRegistry} to find an appropriate builder, depending - * on what type is being tested. - */ - private Message.Builder newBuilderForField( - Message.Builder parent, Descriptors.FieldDescriptor field) { - if (extensionRegistry == null) { - return parent.newBuilderForField(field); - } else { - ExtensionRegistry.ExtensionInfo extension = - extensionRegistry.findExtensionByNumber(field.getContainingType(), - field.getNumber()); - Assert.assertNotNull(extension); - Assert.assertNotNull(extension.defaultInstance); - return extension.defaultInstance.newBuilderForType(); - } - } - - // ------------------------------------------------------------------- - - /** - * Set every field of {@code message} to the values expected by - * {@code assertAllFieldsSet()}, using the {@link Message.Builder} - * reflection interface. - */ - void setAllFieldsViaReflection(Message.Builder message) { - message.setField(f("optional_int32" ), 101 ); - message.setField(f("optional_int64" ), 102L); - message.setField(f("optional_uint32" ), 103 ); - message.setField(f("optional_uint64" ), 104L); - message.setField(f("optional_sint32" ), 105 ); - message.setField(f("optional_sint64" ), 106L); - message.setField(f("optional_fixed32" ), 107 ); - message.setField(f("optional_fixed64" ), 108L); - message.setField(f("optional_sfixed32"), 109 ); - message.setField(f("optional_sfixed64"), 110L); - message.setField(f("optional_float" ), 111F); - message.setField(f("optional_double" ), 112D); - message.setField(f("optional_bool" ), true); - message.setField(f("optional_string" ), "115"); - message.setField(f("optional_bytes" ), toBytes("116")); - - message.setField(f("optionalgroup"), - newBuilderForField(message, f("optionalgroup")) - .setField(groupA, 117).build()); - message.setField(f("optional_nested_message"), - newBuilderForField(message, f("optional_nested_message")) - .setField(nestedB, 118).build()); - message.setField(f("optional_foreign_message"), - newBuilderForField(message, f("optional_foreign_message")) - .setField(foreignC, 119).build()); - message.setField(f("optional_import_message"), - newBuilderForField(message, f("optional_import_message")) - .setField(importD, 120).build()); - - message.setField(f("optional_nested_enum" ), nestedBaz); - message.setField(f("optional_foreign_enum"), foreignBaz); - message.setField(f("optional_import_enum" ), importBaz); - - message.setField(f("optional_string_piece" ), "124"); - message.setField(f("optional_cord" ), "125"); - - // ----------------------------------------------------------------- - - message.addRepeatedField(f("repeated_int32" ), 201 ); - message.addRepeatedField(f("repeated_int64" ), 202L); - message.addRepeatedField(f("repeated_uint32" ), 203 ); - message.addRepeatedField(f("repeated_uint64" ), 204L); - message.addRepeatedField(f("repeated_sint32" ), 205 ); - message.addRepeatedField(f("repeated_sint64" ), 206L); - message.addRepeatedField(f("repeated_fixed32" ), 207 ); - message.addRepeatedField(f("repeated_fixed64" ), 208L); - message.addRepeatedField(f("repeated_sfixed32"), 209 ); - message.addRepeatedField(f("repeated_sfixed64"), 210L); - message.addRepeatedField(f("repeated_float" ), 211F); - message.addRepeatedField(f("repeated_double" ), 212D); - message.addRepeatedField(f("repeated_bool" ), true); - message.addRepeatedField(f("repeated_string" ), "215"); - message.addRepeatedField(f("repeated_bytes" ), toBytes("216")); - - message.addRepeatedField(f("repeatedgroup"), - newBuilderForField(message, f("repeatedgroup")) - .setField(repeatedGroupA, 217).build()); - message.addRepeatedField(f("repeated_nested_message"), - newBuilderForField(message, f("repeated_nested_message")) - .setField(nestedB, 218).build()); - message.addRepeatedField(f("repeated_foreign_message"), - newBuilderForField(message, f("repeated_foreign_message")) - .setField(foreignC, 219).build()); - message.addRepeatedField(f("repeated_import_message"), - newBuilderForField(message, f("repeated_import_message")) - .setField(importD, 220).build()); - - message.addRepeatedField(f("repeated_nested_enum" ), nestedBar); - message.addRepeatedField(f("repeated_foreign_enum"), foreignBar); - message.addRepeatedField(f("repeated_import_enum" ), importBar); - - message.addRepeatedField(f("repeated_string_piece" ), "224"); - message.addRepeatedField(f("repeated_cord" ), "225"); - - // Add a second one of each field. - message.addRepeatedField(f("repeated_int32" ), 301 ); - message.addRepeatedField(f("repeated_int64" ), 302L); - message.addRepeatedField(f("repeated_uint32" ), 303 ); - message.addRepeatedField(f("repeated_uint64" ), 304L); - message.addRepeatedField(f("repeated_sint32" ), 305 ); - message.addRepeatedField(f("repeated_sint64" ), 306L); - message.addRepeatedField(f("repeated_fixed32" ), 307 ); - message.addRepeatedField(f("repeated_fixed64" ), 308L); - message.addRepeatedField(f("repeated_sfixed32"), 309 ); - message.addRepeatedField(f("repeated_sfixed64"), 310L); - message.addRepeatedField(f("repeated_float" ), 311F); - message.addRepeatedField(f("repeated_double" ), 312D); - message.addRepeatedField(f("repeated_bool" ), false); - message.addRepeatedField(f("repeated_string" ), "315"); - message.addRepeatedField(f("repeated_bytes" ), toBytes("316")); - - message.addRepeatedField(f("repeatedgroup"), - newBuilderForField(message, f("repeatedgroup")) - .setField(repeatedGroupA, 317).build()); - message.addRepeatedField(f("repeated_nested_message"), - newBuilderForField(message, f("repeated_nested_message")) - .setField(nestedB, 318).build()); - message.addRepeatedField(f("repeated_foreign_message"), - newBuilderForField(message, f("repeated_foreign_message")) - .setField(foreignC, 319).build()); - message.addRepeatedField(f("repeated_import_message"), - newBuilderForField(message, f("repeated_import_message")) - .setField(importD, 320).build()); - - message.addRepeatedField(f("repeated_nested_enum" ), nestedBaz); - message.addRepeatedField(f("repeated_foreign_enum"), foreignBaz); - message.addRepeatedField(f("repeated_import_enum" ), importBaz); - - message.addRepeatedField(f("repeated_string_piece" ), "324"); - message.addRepeatedField(f("repeated_cord" ), "325"); - - // ----------------------------------------------------------------- - - message.setField(f("default_int32" ), 401 ); - message.setField(f("default_int64" ), 402L); - message.setField(f("default_uint32" ), 403 ); - message.setField(f("default_uint64" ), 404L); - message.setField(f("default_sint32" ), 405 ); - message.setField(f("default_sint64" ), 406L); - message.setField(f("default_fixed32" ), 407 ); - message.setField(f("default_fixed64" ), 408L); - message.setField(f("default_sfixed32"), 409 ); - message.setField(f("default_sfixed64"), 410L); - message.setField(f("default_float" ), 411F); - message.setField(f("default_double" ), 412D); - message.setField(f("default_bool" ), false); - message.setField(f("default_string" ), "415"); - message.setField(f("default_bytes" ), toBytes("416")); - - message.setField(f("default_nested_enum" ), nestedFoo); - message.setField(f("default_foreign_enum"), foreignFoo); - message.setField(f("default_import_enum" ), importFoo); - - message.setField(f("default_string_piece" ), "424"); - message.setField(f("default_cord" ), "425"); - } - - // ------------------------------------------------------------------- - - /** - * Modify the repeated fields of {@code message} to contain the values - * expected by {@code assertRepeatedFieldsModified()}, using the - * {@link Message.Builder} reflection interface. - */ - void modifyRepeatedFieldsViaReflection(Message.Builder message) { - message.setRepeatedField(f("repeated_int32" ), 1, 501 ); - message.setRepeatedField(f("repeated_int64" ), 1, 502L); - message.setRepeatedField(f("repeated_uint32" ), 1, 503 ); - message.setRepeatedField(f("repeated_uint64" ), 1, 504L); - message.setRepeatedField(f("repeated_sint32" ), 1, 505 ); - message.setRepeatedField(f("repeated_sint64" ), 1, 506L); - message.setRepeatedField(f("repeated_fixed32" ), 1, 507 ); - message.setRepeatedField(f("repeated_fixed64" ), 1, 508L); - message.setRepeatedField(f("repeated_sfixed32"), 1, 509 ); - message.setRepeatedField(f("repeated_sfixed64"), 1, 510L); - message.setRepeatedField(f("repeated_float" ), 1, 511F); - message.setRepeatedField(f("repeated_double" ), 1, 512D); - message.setRepeatedField(f("repeated_bool" ), 1, true); - message.setRepeatedField(f("repeated_string" ), 1, "515"); - message.setRepeatedField(f("repeated_bytes" ), 1, toBytes("516")); - - message.setRepeatedField(f("repeatedgroup"), 1, - newBuilderForField(message, f("repeatedgroup")) - .setField(repeatedGroupA, 517).build()); - message.setRepeatedField(f("repeated_nested_message"), 1, - newBuilderForField(message, f("repeated_nested_message")) - .setField(nestedB, 518).build()); - message.setRepeatedField(f("repeated_foreign_message"), 1, - newBuilderForField(message, f("repeated_foreign_message")) - .setField(foreignC, 519).build()); - message.setRepeatedField(f("repeated_import_message"), 1, - newBuilderForField(message, f("repeated_import_message")) - .setField(importD, 520).build()); - - message.setRepeatedField(f("repeated_nested_enum" ), 1, nestedFoo); - message.setRepeatedField(f("repeated_foreign_enum"), 1, foreignFoo); - message.setRepeatedField(f("repeated_import_enum" ), 1, importFoo); - - message.setRepeatedField(f("repeated_string_piece"), 1, "524"); - message.setRepeatedField(f("repeated_cord"), 1, "525"); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are set to the values assigned by {@code setAllFields}, - * using the {@link Message} reflection interface. - */ - public void assertAllFieldsSetViaReflection(MessageOrBuilder message) { - Assert.assertTrue(message.hasField(f("optional_int32" ))); - Assert.assertTrue(message.hasField(f("optional_int64" ))); - Assert.assertTrue(message.hasField(f("optional_uint32" ))); - Assert.assertTrue(message.hasField(f("optional_uint64" ))); - Assert.assertTrue(message.hasField(f("optional_sint32" ))); - Assert.assertTrue(message.hasField(f("optional_sint64" ))); - Assert.assertTrue(message.hasField(f("optional_fixed32" ))); - Assert.assertTrue(message.hasField(f("optional_fixed64" ))); - Assert.assertTrue(message.hasField(f("optional_sfixed32"))); - Assert.assertTrue(message.hasField(f("optional_sfixed64"))); - Assert.assertTrue(message.hasField(f("optional_float" ))); - Assert.assertTrue(message.hasField(f("optional_double" ))); - Assert.assertTrue(message.hasField(f("optional_bool" ))); - Assert.assertTrue(message.hasField(f("optional_string" ))); - Assert.assertTrue(message.hasField(f("optional_bytes" ))); - - Assert.assertTrue(message.hasField(f("optionalgroup" ))); - Assert.assertTrue(message.hasField(f("optional_nested_message" ))); - Assert.assertTrue(message.hasField(f("optional_foreign_message"))); - Assert.assertTrue(message.hasField(f("optional_import_message" ))); - - Assert.assertTrue( - ((Message)message.getField(f("optionalgroup"))).hasField(groupA)); - Assert.assertTrue( - ((Message)message.getField(f("optional_nested_message"))) - .hasField(nestedB)); - Assert.assertTrue( - ((Message)message.getField(f("optional_foreign_message"))) - .hasField(foreignC)); - Assert.assertTrue( - ((Message)message.getField(f("optional_import_message"))) - .hasField(importD)); - - Assert.assertTrue(message.hasField(f("optional_nested_enum" ))); - Assert.assertTrue(message.hasField(f("optional_foreign_enum"))); - Assert.assertTrue(message.hasField(f("optional_import_enum" ))); - - Assert.assertTrue(message.hasField(f("optional_string_piece"))); - Assert.assertTrue(message.hasField(f("optional_cord"))); - - Assert.assertEquals(101 , message.getField(f("optional_int32" ))); - Assert.assertEquals(102L , message.getField(f("optional_int64" ))); - Assert.assertEquals(103 , message.getField(f("optional_uint32" ))); - Assert.assertEquals(104L , message.getField(f("optional_uint64" ))); - Assert.assertEquals(105 , message.getField(f("optional_sint32" ))); - Assert.assertEquals(106L , message.getField(f("optional_sint64" ))); - Assert.assertEquals(107 , message.getField(f("optional_fixed32" ))); - Assert.assertEquals(108L , message.getField(f("optional_fixed64" ))); - Assert.assertEquals(109 , message.getField(f("optional_sfixed32"))); - Assert.assertEquals(110L , message.getField(f("optional_sfixed64"))); - Assert.assertEquals(111F , message.getField(f("optional_float" ))); - Assert.assertEquals(112D , message.getField(f("optional_double" ))); - Assert.assertEquals(true , message.getField(f("optional_bool" ))); - Assert.assertEquals("115", message.getField(f("optional_string" ))); - Assert.assertEquals(toBytes("116"), message.getField(f("optional_bytes"))); - - Assert.assertEquals(117, - ((Message)message.getField(f("optionalgroup"))).getField(groupA)); - Assert.assertEquals(118, - ((Message)message.getField(f("optional_nested_message"))) - .getField(nestedB)); - Assert.assertEquals(119, - ((Message)message.getField(f("optional_foreign_message"))) - .getField(foreignC)); - Assert.assertEquals(120, - ((Message)message.getField(f("optional_import_message"))) - .getField(importD)); - - Assert.assertEquals( nestedBaz, message.getField(f("optional_nested_enum" ))); - Assert.assertEquals(foreignBaz, message.getField(f("optional_foreign_enum"))); - Assert.assertEquals( importBaz, message.getField(f("optional_import_enum" ))); - - Assert.assertEquals("124", message.getField(f("optional_string_piece"))); - Assert.assertEquals("125", message.getField(f("optional_cord"))); - - // ----------------------------------------------------------------- - - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_int32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_int64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_uint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_uint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_fixed32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_fixed64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sfixed32"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sfixed64"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_float" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_double" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_bool" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_string" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_bytes" ))); - - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeatedgroup" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_nested_message" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_foreign_message"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_import_message" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_nested_enum" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_foreign_enum" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_import_enum" ))); - - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_string_piece"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_cord"))); - - Assert.assertEquals(201 , message.getRepeatedField(f("repeated_int32" ), 0)); - Assert.assertEquals(202L , message.getRepeatedField(f("repeated_int64" ), 0)); - Assert.assertEquals(203 , message.getRepeatedField(f("repeated_uint32" ), 0)); - Assert.assertEquals(204L , message.getRepeatedField(f("repeated_uint64" ), 0)); - Assert.assertEquals(205 , message.getRepeatedField(f("repeated_sint32" ), 0)); - Assert.assertEquals(206L , message.getRepeatedField(f("repeated_sint64" ), 0)); - Assert.assertEquals(207 , message.getRepeatedField(f("repeated_fixed32" ), 0)); - Assert.assertEquals(208L , message.getRepeatedField(f("repeated_fixed64" ), 0)); - Assert.assertEquals(209 , message.getRepeatedField(f("repeated_sfixed32"), 0)); - Assert.assertEquals(210L , message.getRepeatedField(f("repeated_sfixed64"), 0)); - Assert.assertEquals(211F , message.getRepeatedField(f("repeated_float" ), 0)); - Assert.assertEquals(212D , message.getRepeatedField(f("repeated_double" ), 0)); - Assert.assertEquals(true , message.getRepeatedField(f("repeated_bool" ), 0)); - Assert.assertEquals("215", message.getRepeatedField(f("repeated_string" ), 0)); - Assert.assertEquals(toBytes("216"), message.getRepeatedField(f("repeated_bytes"), 0)); - - Assert.assertEquals(217, - ((Message)message.getRepeatedField(f("repeatedgroup"), 0)) - .getField(repeatedGroupA)); - Assert.assertEquals(218, - ((Message)message.getRepeatedField(f("repeated_nested_message"), 0)) - .getField(nestedB)); - Assert.assertEquals(219, - ((Message)message.getRepeatedField(f("repeated_foreign_message"), 0)) - .getField(foreignC)); - Assert.assertEquals(220, - ((Message)message.getRepeatedField(f("repeated_import_message"), 0)) - .getField(importD)); - - Assert.assertEquals( nestedBar, message.getRepeatedField(f("repeated_nested_enum" ),0)); - Assert.assertEquals(foreignBar, message.getRepeatedField(f("repeated_foreign_enum"),0)); - Assert.assertEquals( importBar, message.getRepeatedField(f("repeated_import_enum" ),0)); - - Assert.assertEquals("224", message.getRepeatedField(f("repeated_string_piece"), 0)); - Assert.assertEquals("225", message.getRepeatedField(f("repeated_cord"), 0)); - - Assert.assertEquals(301 , message.getRepeatedField(f("repeated_int32" ), 1)); - Assert.assertEquals(302L , message.getRepeatedField(f("repeated_int64" ), 1)); - Assert.assertEquals(303 , message.getRepeatedField(f("repeated_uint32" ), 1)); - Assert.assertEquals(304L , message.getRepeatedField(f("repeated_uint64" ), 1)); - Assert.assertEquals(305 , message.getRepeatedField(f("repeated_sint32" ), 1)); - Assert.assertEquals(306L , message.getRepeatedField(f("repeated_sint64" ), 1)); - Assert.assertEquals(307 , message.getRepeatedField(f("repeated_fixed32" ), 1)); - Assert.assertEquals(308L , message.getRepeatedField(f("repeated_fixed64" ), 1)); - Assert.assertEquals(309 , message.getRepeatedField(f("repeated_sfixed32"), 1)); - Assert.assertEquals(310L , message.getRepeatedField(f("repeated_sfixed64"), 1)); - Assert.assertEquals(311F , message.getRepeatedField(f("repeated_float" ), 1)); - Assert.assertEquals(312D , message.getRepeatedField(f("repeated_double" ), 1)); - Assert.assertEquals(false, message.getRepeatedField(f("repeated_bool" ), 1)); - Assert.assertEquals("315", message.getRepeatedField(f("repeated_string" ), 1)); - Assert.assertEquals(toBytes("316"), message.getRepeatedField(f("repeated_bytes"), 1)); - - Assert.assertEquals(317, - ((Message)message.getRepeatedField(f("repeatedgroup"), 1)) - .getField(repeatedGroupA)); - Assert.assertEquals(318, - ((Message)message.getRepeatedField(f("repeated_nested_message"), 1)) - .getField(nestedB)); - Assert.assertEquals(319, - ((Message)message.getRepeatedField(f("repeated_foreign_message"), 1)) - .getField(foreignC)); - Assert.assertEquals(320, - ((Message)message.getRepeatedField(f("repeated_import_message"), 1)) - .getField(importD)); - - Assert.assertEquals( nestedBaz, message.getRepeatedField(f("repeated_nested_enum" ),1)); - Assert.assertEquals(foreignBaz, message.getRepeatedField(f("repeated_foreign_enum"),1)); - Assert.assertEquals( importBaz, message.getRepeatedField(f("repeated_import_enum" ),1)); - - Assert.assertEquals("324", message.getRepeatedField(f("repeated_string_piece"), 1)); - Assert.assertEquals("325", message.getRepeatedField(f("repeated_cord"), 1)); - - // ----------------------------------------------------------------- - - Assert.assertTrue(message.hasField(f("default_int32" ))); - Assert.assertTrue(message.hasField(f("default_int64" ))); - Assert.assertTrue(message.hasField(f("default_uint32" ))); - Assert.assertTrue(message.hasField(f("default_uint64" ))); - Assert.assertTrue(message.hasField(f("default_sint32" ))); - Assert.assertTrue(message.hasField(f("default_sint64" ))); - Assert.assertTrue(message.hasField(f("default_fixed32" ))); - Assert.assertTrue(message.hasField(f("default_fixed64" ))); - Assert.assertTrue(message.hasField(f("default_sfixed32"))); - Assert.assertTrue(message.hasField(f("default_sfixed64"))); - Assert.assertTrue(message.hasField(f("default_float" ))); - Assert.assertTrue(message.hasField(f("default_double" ))); - Assert.assertTrue(message.hasField(f("default_bool" ))); - Assert.assertTrue(message.hasField(f("default_string" ))); - Assert.assertTrue(message.hasField(f("default_bytes" ))); - - Assert.assertTrue(message.hasField(f("default_nested_enum" ))); - Assert.assertTrue(message.hasField(f("default_foreign_enum"))); - Assert.assertTrue(message.hasField(f("default_import_enum" ))); - - Assert.assertTrue(message.hasField(f("default_string_piece"))); - Assert.assertTrue(message.hasField(f("default_cord"))); - - Assert.assertEquals(401 , message.getField(f("default_int32" ))); - Assert.assertEquals(402L , message.getField(f("default_int64" ))); - Assert.assertEquals(403 , message.getField(f("default_uint32" ))); - Assert.assertEquals(404L , message.getField(f("default_uint64" ))); - Assert.assertEquals(405 , message.getField(f("default_sint32" ))); - Assert.assertEquals(406L , message.getField(f("default_sint64" ))); - Assert.assertEquals(407 , message.getField(f("default_fixed32" ))); - Assert.assertEquals(408L , message.getField(f("default_fixed64" ))); - Assert.assertEquals(409 , message.getField(f("default_sfixed32"))); - Assert.assertEquals(410L , message.getField(f("default_sfixed64"))); - Assert.assertEquals(411F , message.getField(f("default_float" ))); - Assert.assertEquals(412D , message.getField(f("default_double" ))); - Assert.assertEquals(false, message.getField(f("default_bool" ))); - Assert.assertEquals("415", message.getField(f("default_string" ))); - Assert.assertEquals(toBytes("416"), message.getField(f("default_bytes"))); - - Assert.assertEquals( nestedFoo, message.getField(f("default_nested_enum" ))); - Assert.assertEquals(foreignFoo, message.getField(f("default_foreign_enum"))); - Assert.assertEquals( importFoo, message.getField(f("default_import_enum" ))); - - Assert.assertEquals("424", message.getField(f("default_string_piece"))); - Assert.assertEquals("425", message.getField(f("default_cord"))); - } - - // ------------------------------------------------------------------- - - /** - * Assert (using {@code junit.framework.Assert}} that all fields of - * {@code message} are cleared, and that getting the fields returns their - * default values, using the {@link Message} reflection interface. - */ - public void assertClearViaReflection(MessageOrBuilder message) { - // has_blah() should initially be false for all optional fields. - Assert.assertFalse(message.hasField(f("optional_int32" ))); - Assert.assertFalse(message.hasField(f("optional_int64" ))); - Assert.assertFalse(message.hasField(f("optional_uint32" ))); - Assert.assertFalse(message.hasField(f("optional_uint64" ))); - Assert.assertFalse(message.hasField(f("optional_sint32" ))); - Assert.assertFalse(message.hasField(f("optional_sint64" ))); - Assert.assertFalse(message.hasField(f("optional_fixed32" ))); - Assert.assertFalse(message.hasField(f("optional_fixed64" ))); - Assert.assertFalse(message.hasField(f("optional_sfixed32"))); - Assert.assertFalse(message.hasField(f("optional_sfixed64"))); - Assert.assertFalse(message.hasField(f("optional_float" ))); - Assert.assertFalse(message.hasField(f("optional_double" ))); - Assert.assertFalse(message.hasField(f("optional_bool" ))); - Assert.assertFalse(message.hasField(f("optional_string" ))); - Assert.assertFalse(message.hasField(f("optional_bytes" ))); - - Assert.assertFalse(message.hasField(f("optionalgroup" ))); - Assert.assertFalse(message.hasField(f("optional_nested_message" ))); - Assert.assertFalse(message.hasField(f("optional_foreign_message"))); - Assert.assertFalse(message.hasField(f("optional_import_message" ))); - - Assert.assertFalse(message.hasField(f("optional_nested_enum" ))); - Assert.assertFalse(message.hasField(f("optional_foreign_enum"))); - Assert.assertFalse(message.hasField(f("optional_import_enum" ))); - - Assert.assertFalse(message.hasField(f("optional_string_piece"))); - Assert.assertFalse(message.hasField(f("optional_cord"))); - - // Optional fields without defaults are set to zero or something like it. - Assert.assertEquals(0 , message.getField(f("optional_int32" ))); - Assert.assertEquals(0L , message.getField(f("optional_int64" ))); - Assert.assertEquals(0 , message.getField(f("optional_uint32" ))); - Assert.assertEquals(0L , message.getField(f("optional_uint64" ))); - Assert.assertEquals(0 , message.getField(f("optional_sint32" ))); - Assert.assertEquals(0L , message.getField(f("optional_sint64" ))); - Assert.assertEquals(0 , message.getField(f("optional_fixed32" ))); - Assert.assertEquals(0L , message.getField(f("optional_fixed64" ))); - Assert.assertEquals(0 , message.getField(f("optional_sfixed32"))); - Assert.assertEquals(0L , message.getField(f("optional_sfixed64"))); - Assert.assertEquals(0F , message.getField(f("optional_float" ))); - Assert.assertEquals(0D , message.getField(f("optional_double" ))); - Assert.assertEquals(false, message.getField(f("optional_bool" ))); - Assert.assertEquals("" , message.getField(f("optional_string" ))); - Assert.assertEquals(ByteString.EMPTY, message.getField(f("optional_bytes"))); - - // Embedded messages should also be clear. - Assert.assertFalse( - ((Message)message.getField(f("optionalgroup"))).hasField(groupA)); - Assert.assertFalse( - ((Message)message.getField(f("optional_nested_message"))) - .hasField(nestedB)); - Assert.assertFalse( - ((Message)message.getField(f("optional_foreign_message"))) - .hasField(foreignC)); - Assert.assertFalse( - ((Message)message.getField(f("optional_import_message"))) - .hasField(importD)); - - Assert.assertEquals(0, - ((Message)message.getField(f("optionalgroup"))).getField(groupA)); - Assert.assertEquals(0, - ((Message)message.getField(f("optional_nested_message"))) - .getField(nestedB)); - Assert.assertEquals(0, - ((Message)message.getField(f("optional_foreign_message"))) - .getField(foreignC)); - Assert.assertEquals(0, - ((Message)message.getField(f("optional_import_message"))) - .getField(importD)); - - // Enums without defaults are set to the first value in the enum. - Assert.assertEquals( nestedFoo, message.getField(f("optional_nested_enum" ))); - Assert.assertEquals(foreignFoo, message.getField(f("optional_foreign_enum"))); - Assert.assertEquals( importFoo, message.getField(f("optional_import_enum" ))); - - Assert.assertEquals("", message.getField(f("optional_string_piece"))); - Assert.assertEquals("", message.getField(f("optional_cord"))); - - // Repeated fields are empty. - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_int32" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_int64" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_uint32" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_uint64" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_sint32" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_sint64" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_fixed32" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_fixed64" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_sfixed32"))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_sfixed64"))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_float" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_double" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_bool" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_string" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_bytes" ))); - - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeatedgroup" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_nested_message" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_foreign_message"))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_import_message" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_nested_enum" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_foreign_enum" ))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_import_enum" ))); - - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_string_piece"))); - Assert.assertEquals(0, message.getRepeatedFieldCount(f("repeated_cord"))); - - // has_blah() should also be false for all default fields. - Assert.assertFalse(message.hasField(f("default_int32" ))); - Assert.assertFalse(message.hasField(f("default_int64" ))); - Assert.assertFalse(message.hasField(f("default_uint32" ))); - Assert.assertFalse(message.hasField(f("default_uint64" ))); - Assert.assertFalse(message.hasField(f("default_sint32" ))); - Assert.assertFalse(message.hasField(f("default_sint64" ))); - Assert.assertFalse(message.hasField(f("default_fixed32" ))); - Assert.assertFalse(message.hasField(f("default_fixed64" ))); - Assert.assertFalse(message.hasField(f("default_sfixed32"))); - Assert.assertFalse(message.hasField(f("default_sfixed64"))); - Assert.assertFalse(message.hasField(f("default_float" ))); - Assert.assertFalse(message.hasField(f("default_double" ))); - Assert.assertFalse(message.hasField(f("default_bool" ))); - Assert.assertFalse(message.hasField(f("default_string" ))); - Assert.assertFalse(message.hasField(f("default_bytes" ))); - - Assert.assertFalse(message.hasField(f("default_nested_enum" ))); - Assert.assertFalse(message.hasField(f("default_foreign_enum"))); - Assert.assertFalse(message.hasField(f("default_import_enum" ))); - - Assert.assertFalse(message.hasField(f("default_string_piece" ))); - Assert.assertFalse(message.hasField(f("default_cord" ))); - - // Fields with defaults have their default values (duh). - Assert.assertEquals( 41 , message.getField(f("default_int32" ))); - Assert.assertEquals( 42L , message.getField(f("default_int64" ))); - Assert.assertEquals( 43 , message.getField(f("default_uint32" ))); - Assert.assertEquals( 44L , message.getField(f("default_uint64" ))); - Assert.assertEquals(-45 , message.getField(f("default_sint32" ))); - Assert.assertEquals( 46L , message.getField(f("default_sint64" ))); - Assert.assertEquals( 47 , message.getField(f("default_fixed32" ))); - Assert.assertEquals( 48L , message.getField(f("default_fixed64" ))); - Assert.assertEquals( 49 , message.getField(f("default_sfixed32"))); - Assert.assertEquals(-50L , message.getField(f("default_sfixed64"))); - Assert.assertEquals( 51.5F , message.getField(f("default_float" ))); - Assert.assertEquals( 52e3D , message.getField(f("default_double" ))); - Assert.assertEquals(true , message.getField(f("default_bool" ))); - Assert.assertEquals("hello", message.getField(f("default_string" ))); - Assert.assertEquals(toBytes("world"), message.getField(f("default_bytes"))); - - Assert.assertEquals( nestedBar, message.getField(f("default_nested_enum" ))); - Assert.assertEquals(foreignBar, message.getField(f("default_foreign_enum"))); - Assert.assertEquals( importBar, message.getField(f("default_import_enum" ))); - - Assert.assertEquals("abc", message.getField(f("default_string_piece"))); - Assert.assertEquals("123", message.getField(f("default_cord"))); - } - - - // --------------------------------------------------------------- - - public void assertRepeatedFieldsModifiedViaReflection( - MessageOrBuilder message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_int32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_int64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_uint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_uint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_fixed32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_fixed64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sfixed32"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_sfixed64"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_float" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_double" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_bool" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_string" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_bytes" ))); - - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeatedgroup" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_nested_message" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_foreign_message"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_import_message" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_nested_enum" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_foreign_enum" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_import_enum" ))); - - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_string_piece"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("repeated_cord"))); - - Assert.assertEquals(201 , message.getRepeatedField(f("repeated_int32" ), 0)); - Assert.assertEquals(202L , message.getRepeatedField(f("repeated_int64" ), 0)); - Assert.assertEquals(203 , message.getRepeatedField(f("repeated_uint32" ), 0)); - Assert.assertEquals(204L , message.getRepeatedField(f("repeated_uint64" ), 0)); - Assert.assertEquals(205 , message.getRepeatedField(f("repeated_sint32" ), 0)); - Assert.assertEquals(206L , message.getRepeatedField(f("repeated_sint64" ), 0)); - Assert.assertEquals(207 , message.getRepeatedField(f("repeated_fixed32" ), 0)); - Assert.assertEquals(208L , message.getRepeatedField(f("repeated_fixed64" ), 0)); - Assert.assertEquals(209 , message.getRepeatedField(f("repeated_sfixed32"), 0)); - Assert.assertEquals(210L , message.getRepeatedField(f("repeated_sfixed64"), 0)); - Assert.assertEquals(211F , message.getRepeatedField(f("repeated_float" ), 0)); - Assert.assertEquals(212D , message.getRepeatedField(f("repeated_double" ), 0)); - Assert.assertEquals(true , message.getRepeatedField(f("repeated_bool" ), 0)); - Assert.assertEquals("215", message.getRepeatedField(f("repeated_string" ), 0)); - Assert.assertEquals(toBytes("216"), message.getRepeatedField(f("repeated_bytes"), 0)); - - Assert.assertEquals(217, - ((Message)message.getRepeatedField(f("repeatedgroup"), 0)) - .getField(repeatedGroupA)); - Assert.assertEquals(218, - ((Message)message.getRepeatedField(f("repeated_nested_message"), 0)) - .getField(nestedB)); - Assert.assertEquals(219, - ((Message)message.getRepeatedField(f("repeated_foreign_message"), 0)) - .getField(foreignC)); - Assert.assertEquals(220, - ((Message)message.getRepeatedField(f("repeated_import_message"), 0)) - .getField(importD)); - - Assert.assertEquals( nestedBar, message.getRepeatedField(f("repeated_nested_enum" ),0)); - Assert.assertEquals(foreignBar, message.getRepeatedField(f("repeated_foreign_enum"),0)); - Assert.assertEquals( importBar, message.getRepeatedField(f("repeated_import_enum" ),0)); - - Assert.assertEquals("224", message.getRepeatedField(f("repeated_string_piece"), 0)); - Assert.assertEquals("225", message.getRepeatedField(f("repeated_cord"), 0)); - - Assert.assertEquals(501 , message.getRepeatedField(f("repeated_int32" ), 1)); - Assert.assertEquals(502L , message.getRepeatedField(f("repeated_int64" ), 1)); - Assert.assertEquals(503 , message.getRepeatedField(f("repeated_uint32" ), 1)); - Assert.assertEquals(504L , message.getRepeatedField(f("repeated_uint64" ), 1)); - Assert.assertEquals(505 , message.getRepeatedField(f("repeated_sint32" ), 1)); - Assert.assertEquals(506L , message.getRepeatedField(f("repeated_sint64" ), 1)); - Assert.assertEquals(507 , message.getRepeatedField(f("repeated_fixed32" ), 1)); - Assert.assertEquals(508L , message.getRepeatedField(f("repeated_fixed64" ), 1)); - Assert.assertEquals(509 , message.getRepeatedField(f("repeated_sfixed32"), 1)); - Assert.assertEquals(510L , message.getRepeatedField(f("repeated_sfixed64"), 1)); - Assert.assertEquals(511F , message.getRepeatedField(f("repeated_float" ), 1)); - Assert.assertEquals(512D , message.getRepeatedField(f("repeated_double" ), 1)); - Assert.assertEquals(true , message.getRepeatedField(f("repeated_bool" ), 1)); - Assert.assertEquals("515", message.getRepeatedField(f("repeated_string" ), 1)); - Assert.assertEquals(toBytes("516"), message.getRepeatedField(f("repeated_bytes"), 1)); - - Assert.assertEquals(517, - ((Message)message.getRepeatedField(f("repeatedgroup"), 1)) - .getField(repeatedGroupA)); - Assert.assertEquals(518, - ((Message)message.getRepeatedField(f("repeated_nested_message"), 1)) - .getField(nestedB)); - Assert.assertEquals(519, - ((Message)message.getRepeatedField(f("repeated_foreign_message"), 1)) - .getField(foreignC)); - Assert.assertEquals(520, - ((Message)message.getRepeatedField(f("repeated_import_message"), 1)) - .getField(importD)); - - Assert.assertEquals( nestedFoo, message.getRepeatedField(f("repeated_nested_enum" ),1)); - Assert.assertEquals(foreignFoo, message.getRepeatedField(f("repeated_foreign_enum"),1)); - Assert.assertEquals( importFoo, message.getRepeatedField(f("repeated_import_enum" ),1)); - - Assert.assertEquals("524", message.getRepeatedField(f("repeated_string_piece"), 1)); - Assert.assertEquals("525", message.getRepeatedField(f("repeated_cord"), 1)); - } - - public void setPackedFieldsViaReflection(Message.Builder message) { - message.addRepeatedField(f("packed_int32" ), 601 ); - message.addRepeatedField(f("packed_int64" ), 602L); - message.addRepeatedField(f("packed_uint32" ), 603 ); - message.addRepeatedField(f("packed_uint64" ), 604L); - message.addRepeatedField(f("packed_sint32" ), 605 ); - message.addRepeatedField(f("packed_sint64" ), 606L); - message.addRepeatedField(f("packed_fixed32" ), 607 ); - message.addRepeatedField(f("packed_fixed64" ), 608L); - message.addRepeatedField(f("packed_sfixed32"), 609 ); - message.addRepeatedField(f("packed_sfixed64"), 610L); - message.addRepeatedField(f("packed_float" ), 611F); - message.addRepeatedField(f("packed_double" ), 612D); - message.addRepeatedField(f("packed_bool" ), true); - message.addRepeatedField(f("packed_enum" ), foreignBar); - // Add a second one of each field. - message.addRepeatedField(f("packed_int32" ), 701 ); - message.addRepeatedField(f("packed_int64" ), 702L); - message.addRepeatedField(f("packed_uint32" ), 703 ); - message.addRepeatedField(f("packed_uint64" ), 704L); - message.addRepeatedField(f("packed_sint32" ), 705 ); - message.addRepeatedField(f("packed_sint64" ), 706L); - message.addRepeatedField(f("packed_fixed32" ), 707 ); - message.addRepeatedField(f("packed_fixed64" ), 708L); - message.addRepeatedField(f("packed_sfixed32"), 709 ); - message.addRepeatedField(f("packed_sfixed64"), 710L); - message.addRepeatedField(f("packed_float" ), 711F); - message.addRepeatedField(f("packed_double" ), 712D); - message.addRepeatedField(f("packed_bool" ), false); - message.addRepeatedField(f("packed_enum" ), foreignBaz); - } - - public void assertPackedFieldsSetViaReflection(MessageOrBuilder message) { - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_int32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_int64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_uint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_uint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_sint32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_sint64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_fixed32" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_fixed64" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_sfixed32"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_sfixed64"))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_float" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_double" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_bool" ))); - Assert.assertEquals(2, message.getRepeatedFieldCount(f("packed_enum" ))); - Assert.assertEquals(601 , message.getRepeatedField(f("packed_int32" ), 0)); - Assert.assertEquals(602L , message.getRepeatedField(f("packed_int64" ), 0)); - Assert.assertEquals(603 , message.getRepeatedField(f("packed_uint32" ), 0)); - Assert.assertEquals(604L , message.getRepeatedField(f("packed_uint64" ), 0)); - Assert.assertEquals(605 , message.getRepeatedField(f("packed_sint32" ), 0)); - Assert.assertEquals(606L , message.getRepeatedField(f("packed_sint64" ), 0)); - Assert.assertEquals(607 , message.getRepeatedField(f("packed_fixed32" ), 0)); - Assert.assertEquals(608L , message.getRepeatedField(f("packed_fixed64" ), 0)); - Assert.assertEquals(609 , message.getRepeatedField(f("packed_sfixed32"), 0)); - Assert.assertEquals(610L , message.getRepeatedField(f("packed_sfixed64"), 0)); - Assert.assertEquals(611F , message.getRepeatedField(f("packed_float" ), 0)); - Assert.assertEquals(612D , message.getRepeatedField(f("packed_double" ), 0)); - Assert.assertEquals(true , message.getRepeatedField(f("packed_bool" ), 0)); - Assert.assertEquals(foreignBar, message.getRepeatedField(f("packed_enum" ),0)); - Assert.assertEquals(701 , message.getRepeatedField(f("packed_int32" ), 1)); - Assert.assertEquals(702L , message.getRepeatedField(f("packed_int64" ), 1)); - Assert.assertEquals(703 , message.getRepeatedField(f("packed_uint32" ), 1)); - Assert.assertEquals(704L , message.getRepeatedField(f("packed_uint64" ), 1)); - Assert.assertEquals(705 , message.getRepeatedField(f("packed_sint32" ), 1)); - Assert.assertEquals(706L , message.getRepeatedField(f("packed_sint64" ), 1)); - Assert.assertEquals(707 , message.getRepeatedField(f("packed_fixed32" ), 1)); - Assert.assertEquals(708L , message.getRepeatedField(f("packed_fixed64" ), 1)); - Assert.assertEquals(709 , message.getRepeatedField(f("packed_sfixed32"), 1)); - Assert.assertEquals(710L , message.getRepeatedField(f("packed_sfixed64"), 1)); - Assert.assertEquals(711F , message.getRepeatedField(f("packed_float" ), 1)); - Assert.assertEquals(712D , message.getRepeatedField(f("packed_double" ), 1)); - Assert.assertEquals(false, message.getRepeatedField(f("packed_bool" ), 1)); - Assert.assertEquals(foreignBaz, message.getRepeatedField(f("packed_enum" ),1)); - } - - /** - * Verifies that the reflection setters for the given.Builder object throw a - * NullPointerException if they are passed a null value. Uses Assert to throw an - * appropriate assertion failure, if the condition is not verified. - */ - public void assertReflectionSettersRejectNull(Message.Builder builder) - throws Exception { - try { - builder.setField(f("optional_string"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setField(f("optional_bytes"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setField(f("optional_nested_enum"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setField(f("optional_nested_message"), - (TestAllTypes.NestedMessage) null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.setField(f("optional_nested_message"), - (TestAllTypes.NestedMessage.Builder) null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - try { - builder.addRepeatedField(f("repeated_string"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedField(f("repeated_bytes"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedField(f("repeated_nested_enum"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - try { - builder.addRepeatedField(f("repeated_nested_message"), null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - } - - /** - * Verifies that the reflection repeated setters for the given Builder object throw a - * NullPointerException if they are passed a null value. Uses Assert to throw an appropriate - * assertion failure, if the condition is not verified. - */ - public void assertReflectionRepeatedSettersRejectNull(Message.Builder builder) - throws Exception { - builder.addRepeatedField(f("repeated_string"), "one"); - try { - builder.setRepeatedField(f("repeated_string"), 0, null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedField(f("repeated_bytes"), toBytes("one")); - try { - builder.setRepeatedField(f("repeated_bytes"), 0, null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedField(f("repeated_nested_enum"), nestedBaz); - try { - builder.setRepeatedField(f("repeated_nested_enum"), 0, null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - - builder.addRepeatedField( - f("repeated_nested_message"), - TestAllTypes.NestedMessage.newBuilder().setBb(218).build()); - try { - builder.setRepeatedField(f("repeated_nested_message"), 0, null); - Assert.fail("Exception was not thrown"); - } catch (NullPointerException e) { - // We expect this exception. - } - } - } - - /** - * @param filePath The path relative to - * {@link #getTestDataDir}. - */ - public static String readTextFromFile(String filePath) { - return readBytesFromFile(filePath).toStringUtf8(); - } - - private static File getTestDataDir() { - // Search each parent directory looking for "src/google/protobuf". - File ancestor = new File("."); - try { - ancestor = ancestor.getCanonicalFile(); - } catch (IOException e) { - throw new RuntimeException( - "Couldn't get canonical name of working directory.", e); - } - while (ancestor != null && ancestor.exists()) { - if (new File(ancestor, "src/google/protobuf").exists()) { - return new File(ancestor, "src/google/protobuf/testdata"); - } - ancestor = ancestor.getParentFile(); - } - - throw new RuntimeException( - "Could not find golden files. This test must be run from within the " + - "protobuf source package so that it can read test data files from the " + - "C++ source tree."); - } - - /** - * @param filename The path relative to - * {@link #getTestDataDir}. - */ - public static ByteString readBytesFromFile(String filename) { - File fullPath = new File(getTestDataDir(), filename); - try { - RandomAccessFile file = new RandomAccessFile(fullPath, "r"); - byte[] content = new byte[(int) file.length()]; - file.readFully(content); - return ByteString.copyFrom(content); - } catch (IOException e) { - // Throw a RuntimeException here so that we can call this function from - // static initializers. - throw new IllegalArgumentException( - "Couldn't read file: " + fullPath.getPath(), e); - } - } - - /** - * Get the bytes of the "golden message". This is a serialized TestAllTypes - * with all fields set as they would be by - * {@link #setAllFields(TestAllTypes.Builder)}, but it is loaded from a file - * on disk rather than generated dynamically. The file is actually generated - * by C++ code, so testing against it verifies compatibility with C++. - */ - public static ByteString getGoldenMessage() { - if (goldenMessage == null) { - goldenMessage = readBytesFromFile("golden_message"); - } - return goldenMessage; - } - private static ByteString goldenMessage = null; - - /** - * Get the bytes of the "golden packed fields message". This is a serialized - * TestPackedTypes with all fields set as they would be by - * {@link #setPackedFields(TestPackedTypes.Builder)}, but it is loaded from a - * file on disk rather than generated dynamically. The file is actually - * generated by C++ code, so testing against it verifies compatibility with - * C++. - */ - public static ByteString getGoldenPackedFieldsMessage() { - if (goldenPackedFieldsMessage == null) { - goldenPackedFieldsMessage = - readBytesFromFile("golden_packed_fields_message"); - } - return goldenPackedFieldsMessage; - } - private static ByteString goldenPackedFieldsMessage = null; - - /** - * Mock implementation of {@link GeneratedMessage.BuilderParent} for testing. - * - * @author jonp@google.com (Jon Perlow) - */ - public static class MockBuilderParent - implements GeneratedMessage.BuilderParent { - - private int invalidations; - - @Override - public void markDirty() { - invalidations++; - } - - public int getInvalidationCount() { - return invalidations; - } - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java deleted file mode 100644 index 47690d1f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java +++ /dev/null @@ -1,752 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import com.google.protobuf.Descriptors.FieldDescriptor; -import protobuf_unittest.UnittestMset.TestMessageSet; -import protobuf_unittest.UnittestMset.TestMessageSetExtension1; -import protobuf_unittest.UnittestMset.TestMessageSetExtension2; -import protobuf_unittest.UnittestProto.OneString; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestAllTypes.NestedMessage; -import protobuf_unittest.UnittestProto.TestEmptyMessage; - -import junit.framework.TestCase; - -import java.io.StringReader; - -/** - * Test case for {@link TextFormat}. - * - * TODO(wenboz): ExtensionTest and rest of text_format_unittest.cc. - * - * @author wenboz@google.com (Wenbo Zhu) - */ -public class TextFormatTest extends TestCase { - - // A basic string with different escapable characters for testing. - private final static String kEscapeTestString = - "\"A string with ' characters \n and \r newlines and \t tabs and \001 " - + "slashes \\"; - - // A representation of the above string with all the characters escaped. - private final static String kEscapeTestStringEscaped = - "\\\"A string with \\' characters \\n and \\r newlines " - + "and \\t tabs and \\001 slashes \\\\"; - - private static String allFieldsSetText = TestUtil.readTextFromFile( - "text_format_unittest_data.txt"); - private static String allExtensionsSetText = TestUtil.readTextFromFile( - "text_format_unittest_extensions_data.txt"); - - private static String exoticText = - "repeated_int32: -1\n" + - "repeated_int32: -2147483648\n" + - "repeated_int64: -1\n" + - "repeated_int64: -9223372036854775808\n" + - "repeated_uint32: 4294967295\n" + - "repeated_uint32: 2147483648\n" + - "repeated_uint64: 18446744073709551615\n" + - "repeated_uint64: 9223372036854775808\n" + - "repeated_double: 123.0\n" + - "repeated_double: 123.5\n" + - "repeated_double: 0.125\n" + - "repeated_double: .125\n" + - "repeated_double: -.125\n" + - "repeated_double: 1.23E17\n" + - "repeated_double: 1.23E+17\n" + - "repeated_double: -1.23e-17\n" + - "repeated_double: .23e+17\n" + - "repeated_double: -.23E17\n" + - "repeated_double: 1.235E22\n" + - "repeated_double: 1.235E-18\n" + - "repeated_double: 123.456789\n" + - "repeated_double: Infinity\n" + - "repeated_double: -Infinity\n" + - "repeated_double: NaN\n" + - "repeated_string: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"" + - "\\341\\210\\264\"\n" + - "repeated_bytes: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"\\376\"\n"; - - private static String canonicalExoticText = - exoticText.replace(": .", ": 0.").replace(": -.", ": -0.") // short-form double - .replace("23e", "23E").replace("E+", "E").replace("0.23E17", "2.3E16"); - - private String messageSetText = - "[protobuf_unittest.TestMessageSetExtension1] {\n" + - " i: 123\n" + - "}\n" + - "[protobuf_unittest.TestMessageSetExtension2] {\n" + - " str: \"foo\"\n" + - "}\n"; - - /** Print TestAllTypes and compare with golden file. */ - public void testPrintMessage() throws Exception { - String javaText = TextFormat.printToString(TestUtil.getAllSet()); - - // Java likes to add a trailing ".0" to floats and doubles. C printf - // (with %g format) does not. Our golden files are used for both - // C++ and Java TextFormat classes, so we need to conform. - javaText = javaText.replace(".0\n", "\n"); - - assertEquals(allFieldsSetText, javaText); - } - - /** Print TestAllExtensions and compare with golden file. */ - public void testPrintExtensions() throws Exception { - String javaText = TextFormat.printToString(TestUtil.getAllExtensionsSet()); - - // Java likes to add a trailing ".0" to floats and doubles. C printf - // (with %g format) does not. Our golden files are used for both - // C++ and Java TextFormat classes, so we need to conform. - javaText = javaText.replace(".0\n", "\n"); - - assertEquals(allExtensionsSetText, javaText); - } - - // Creates an example unknown field set. - private UnknownFieldSet makeUnknownFieldSet() { - return UnknownFieldSet.newBuilder() - .addField(5, - UnknownFieldSet.Field.newBuilder() - .addVarint(1) - .addFixed32(2) - .addFixed64(3) - .addLengthDelimited(ByteString.copyFromUtf8("4")) - .addGroup( - UnknownFieldSet.newBuilder() - .addField(10, - UnknownFieldSet.Field.newBuilder() - .addVarint(5) - .build()) - .build()) - .build()) - .addField(8, - UnknownFieldSet.Field.newBuilder() - .addVarint(1) - .addVarint(2) - .addVarint(3) - .build()) - .addField(15, - UnknownFieldSet.Field.newBuilder() - .addVarint(0xABCDEF1234567890L) - .addFixed32(0xABCD1234) - .addFixed64(0xABCDEF1234567890L) - .build()) - .build(); - } - - public void testPrintUnknownFields() throws Exception { - // Test printing of unknown fields in a message. - - TestEmptyMessage message = - TestEmptyMessage.newBuilder() - .setUnknownFields(makeUnknownFieldSet()) - .build(); - - assertEquals( - "5: 1\n" + - "5: 0x00000002\n" + - "5: 0x0000000000000003\n" + - "5: \"4\"\n" + - "5 {\n" + - " 10: 5\n" + - "}\n" + - "8: 1\n" + - "8: 2\n" + - "8: 3\n" + - "15: 12379813812177893520\n" + - "15: 0xabcd1234\n" + - "15: 0xabcdef1234567890\n", - TextFormat.printToString(message)); - } - - public void testPrintField() throws Exception { - final FieldDescriptor dataField = - OneString.getDescriptor().findFieldByName("data"); - assertEquals( - "data: \"test data\"\n", - TextFormat.printFieldToString(dataField, "test data")); - - final FieldDescriptor optionalField = - TestAllTypes.getDescriptor().findFieldByName("optional_nested_message"); - final Object value = NestedMessage.newBuilder().setBb(42).build(); - - assertEquals( - "optional_nested_message {\n bb: 42\n}\n", - TextFormat.printFieldToString(optionalField, value)); - } - - /** - * Helper to construct a ByteString from a String containing only 8-bit - * characters. The characters are converted directly to bytes, *not* - * encoded using UTF-8. - */ - private ByteString bytes(String str) throws Exception { - return ByteString.copyFrom(str.getBytes("ISO-8859-1")); - } - - /** - * Helper to construct a ByteString from a bunch of bytes. The inputs are - * actually ints so that I can use hex notation and not get stupid errors - * about precision. - */ - private ByteString bytes(int... bytesAsInts) { - byte[] bytes = new byte[bytesAsInts.length]; - for (int i = 0; i < bytesAsInts.length; i++) { - bytes[i] = (byte) bytesAsInts[i]; - } - return ByteString.copyFrom(bytes); - } - - public void testPrintExotic() throws Exception { - Message message = TestAllTypes.newBuilder() - // Signed vs. unsigned numbers. - .addRepeatedInt32 (-1) - .addRepeatedUint32(-1) - .addRepeatedInt64 (-1) - .addRepeatedUint64(-1) - - .addRepeatedInt32 (1 << 31) - .addRepeatedUint32(1 << 31) - .addRepeatedInt64 (1l << 63) - .addRepeatedUint64(1l << 63) - - // Floats of various precisions and exponents. - .addRepeatedDouble(123) - .addRepeatedDouble(123.5) - .addRepeatedDouble(0.125) - .addRepeatedDouble(.125) - .addRepeatedDouble(-.125) - .addRepeatedDouble(123e15) - .addRepeatedDouble(123e15) - .addRepeatedDouble(-1.23e-17) - .addRepeatedDouble(.23e17) - .addRepeatedDouble(-23e15) - .addRepeatedDouble(123.5e20) - .addRepeatedDouble(123.5e-20) - .addRepeatedDouble(123.456789) - .addRepeatedDouble(Double.POSITIVE_INFINITY) - .addRepeatedDouble(Double.NEGATIVE_INFINITY) - .addRepeatedDouble(Double.NaN) - - // Strings and bytes that needing escaping. - .addRepeatedString("\0\001\007\b\f\n\r\t\013\\\'\"\u1234") - .addRepeatedBytes(bytes("\0\001\007\b\f\n\r\t\013\\\'\"\u00fe")) - .build(); - - assertEquals(canonicalExoticText, message.toString()); - } - - public void testPrintMessageSet() throws Exception { - TestMessageSet messageSet = - TestMessageSet.newBuilder() - .setExtension( - TestMessageSetExtension1.messageSetExtension, - TestMessageSetExtension1.newBuilder().setI(123).build()) - .setExtension( - TestMessageSetExtension2.messageSetExtension, - TestMessageSetExtension2.newBuilder().setStr("foo").build()) - .build(); - - assertEquals(messageSetText, messageSet.toString()); - } - - // ================================================================= - - public void testParse() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge(allFieldsSetText, builder); - TestUtil.assertAllFieldsSet(builder.build()); - } - - public void testParseReader() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge(new StringReader(allFieldsSetText), builder); - TestUtil.assertAllFieldsSet(builder.build()); - } - - public void testParseExtensions() throws Exception { - TestAllExtensions.Builder builder = TestAllExtensions.newBuilder(); - TextFormat.merge(allExtensionsSetText, - TestUtil.getExtensionRegistry(), - builder); - TestUtil.assertAllExtensionsSet(builder.build()); - } - - public void testParseCompatibility() throws Exception { - String original = "repeated_float: inf\n" + - "repeated_float: -inf\n" + - "repeated_float: nan\n" + - "repeated_float: inff\n" + - "repeated_float: -inff\n" + - "repeated_float: nanf\n" + - "repeated_float: 1.0f\n" + - "repeated_float: infinityf\n" + - "repeated_float: -Infinityf\n" + - "repeated_double: infinity\n" + - "repeated_double: -infinity\n" + - "repeated_double: nan\n"; - String canonical = "repeated_float: Infinity\n" + - "repeated_float: -Infinity\n" + - "repeated_float: NaN\n" + - "repeated_float: Infinity\n" + - "repeated_float: -Infinity\n" + - "repeated_float: NaN\n" + - "repeated_float: 1.0\n" + - "repeated_float: Infinity\n" + - "repeated_float: -Infinity\n" + - "repeated_double: Infinity\n" + - "repeated_double: -Infinity\n" + - "repeated_double: NaN\n"; - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge(original, builder); - assertEquals(canonical, builder.build().toString()); - } - - public void testParseExotic() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge(exoticText, builder); - - // Too lazy to check things individually. Don't try to debug this - // if testPrintExotic() is failing. - assertEquals(canonicalExoticText, builder.build().toString()); - } - - public void testParseMessageSet() throws Exception { - ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance(); - extensionRegistry.add(TestMessageSetExtension1.messageSetExtension); - extensionRegistry.add(TestMessageSetExtension2.messageSetExtension); - - TestMessageSet.Builder builder = TestMessageSet.newBuilder(); - TextFormat.merge(messageSetText, extensionRegistry, builder); - TestMessageSet messageSet = builder.build(); - - assertTrue(messageSet.hasExtension( - TestMessageSetExtension1.messageSetExtension)); - assertEquals(123, messageSet.getExtension( - TestMessageSetExtension1.messageSetExtension).getI()); - assertTrue(messageSet.hasExtension( - TestMessageSetExtension2.messageSetExtension)); - assertEquals("foo", messageSet.getExtension( - TestMessageSetExtension2.messageSetExtension).getStr()); - } - - public void testParseNumericEnum() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_nested_enum: 2", builder); - assertEquals(TestAllTypes.NestedEnum.BAR, builder.getOptionalNestedEnum()); - } - - public void testParseAngleBrackets() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge("OptionalGroup: < a: 1 >", builder); - assertTrue(builder.hasOptionalGroup()); - assertEquals(1, builder.getOptionalGroup().getA()); - } - - public void testParseComment() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge( - "# this is a comment\n" + - "optional_int32: 1 # another comment\n" + - "optional_int64: 2\n" + - "# EOF comment", builder); - assertEquals(1, builder.getOptionalInt32()); - assertEquals(2, builder.getOptionalInt64()); - } - - private void assertParseError(String error, String text) { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - try { - TextFormat.merge(text, TestUtil.getExtensionRegistry(), builder); - fail("Expected parse exception."); - } catch (TextFormat.ParseException e) { - assertEquals(error, e.getMessage()); - } - } - - public void testParseErrors() throws Exception { - assertParseError( - "1:16: Expected \":\".", - "optional_int32 123"); - assertParseError( - "1:23: Expected identifier.", - "optional_nested_enum: ?"); - assertParseError( - "1:18: Couldn't parse integer: Number must be positive: -1", - "optional_uint32: -1"); - assertParseError( - "1:17: Couldn't parse integer: Number out of range for 32-bit signed " + - "integer: 82301481290849012385230157", - "optional_int32: 82301481290849012385230157"); - assertParseError( - "1:16: Expected \"true\" or \"false\".", - "optional_bool: maybe"); - assertParseError( - "1:16: Expected \"true\" or \"false\".", - "optional_bool: 2"); - assertParseError( - "1:18: Expected string.", - "optional_string: 123"); - assertParseError( - "1:18: String missing ending quote.", - "optional_string: \"ueoauaoe"); - assertParseError( - "1:18: String missing ending quote.", - "optional_string: \"ueoauaoe\n" + - "optional_int32: 123"); - assertParseError( - "1:18: Invalid escape sequence: '\\z'", - "optional_string: \"\\z\""); - assertParseError( - "1:18: String missing ending quote.", - "optional_string: \"ueoauaoe\n" + - "optional_int32: 123"); - assertParseError( - "1:2: Extension \"nosuchext\" not found in the ExtensionRegistry.", - "[nosuchext]: 123"); - assertParseError( - "1:20: Extension \"protobuf_unittest.optional_int32_extension\" does " + - "not extend message type \"protobuf_unittest.TestAllTypes\".", - "[protobuf_unittest.optional_int32_extension]: 123"); - assertParseError( - "1:1: Message type \"protobuf_unittest.TestAllTypes\" has no field " + - "named \"nosuchfield\".", - "nosuchfield: 123"); - assertParseError( - "1:21: Expected \">\".", - "OptionalGroup < a: 1"); - assertParseError( - "1:23: Enum type \"protobuf_unittest.TestAllTypes.NestedEnum\" has no " + - "value named \"NO_SUCH_VALUE\".", - "optional_nested_enum: NO_SUCH_VALUE"); - assertParseError( - "1:23: Enum type \"protobuf_unittest.TestAllTypes.NestedEnum\" has no " + - "value with number 123.", - "optional_nested_enum: 123"); - - // Delimiters must match. - assertParseError( - "1:22: Expected identifier.", - "OptionalGroup < a: 1 }"); - assertParseError( - "1:22: Expected identifier.", - "OptionalGroup { a: 1 >"); - } - - // ================================================================= - - public void testEscape() throws Exception { - // Escape sequences. - assertEquals("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"", - TextFormat.escapeBytes(bytes("\0\001\007\b\f\n\r\t\013\\\'\""))); - assertEquals("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"", - TextFormat.escapeText("\0\001\007\b\f\n\r\t\013\\\'\"")); - assertEquals(bytes("\0\001\007\b\f\n\r\t\013\\\'\""), - TextFormat.unescapeBytes("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"")); - assertEquals("\0\001\007\b\f\n\r\t\013\\\'\"", - TextFormat.unescapeText("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"")); - assertEquals(kEscapeTestStringEscaped, - TextFormat.escapeText(kEscapeTestString)); - assertEquals(kEscapeTestString, - TextFormat.unescapeText(kEscapeTestStringEscaped)); - - // Unicode handling. - assertEquals("\\341\\210\\264", TextFormat.escapeText("\u1234")); - assertEquals("\\341\\210\\264", - TextFormat.escapeBytes(bytes(0xe1, 0x88, 0xb4))); - assertEquals("\u1234", TextFormat.unescapeText("\\341\\210\\264")); - assertEquals(bytes(0xe1, 0x88, 0xb4), - TextFormat.unescapeBytes("\\341\\210\\264")); - assertEquals("\u1234", TextFormat.unescapeText("\\xe1\\x88\\xb4")); - assertEquals(bytes(0xe1, 0x88, 0xb4), - TextFormat.unescapeBytes("\\xe1\\x88\\xb4")); - - // Handling of strings with unescaped Unicode characters > 255. - final String zh = "\u9999\u6e2f\u4e0a\u6d77\ud84f\udf80\u8c50\u9280\u884c"; - ByteString zhByteString = ByteString.copyFromUtf8(zh); - assertEquals(zhByteString, TextFormat.unescapeBytes(zh)); - - // Errors. - try { - TextFormat.unescapeText("\\x"); - fail("Should have thrown an exception."); - } catch (TextFormat.InvalidEscapeSequenceException e) { - // success - } - - try { - TextFormat.unescapeText("\\z"); - fail("Should have thrown an exception."); - } catch (TextFormat.InvalidEscapeSequenceException e) { - // success - } - - try { - TextFormat.unescapeText("\\"); - fail("Should have thrown an exception."); - } catch (TextFormat.InvalidEscapeSequenceException e) { - // success - } - } - - public void testParseInteger() throws Exception { - assertEquals( 0, TextFormat.parseInt32( "0")); - assertEquals( 1, TextFormat.parseInt32( "1")); - assertEquals( -1, TextFormat.parseInt32( "-1")); - assertEquals( 12345, TextFormat.parseInt32( "12345")); - assertEquals( -12345, TextFormat.parseInt32( "-12345")); - assertEquals( 2147483647, TextFormat.parseInt32( "2147483647")); - assertEquals(-2147483648, TextFormat.parseInt32("-2147483648")); - - assertEquals( 0, TextFormat.parseUInt32( "0")); - assertEquals( 1, TextFormat.parseUInt32( "1")); - assertEquals( 12345, TextFormat.parseUInt32( "12345")); - assertEquals( 2147483647, TextFormat.parseUInt32("2147483647")); - assertEquals((int) 2147483648L, TextFormat.parseUInt32("2147483648")); - assertEquals((int) 4294967295L, TextFormat.parseUInt32("4294967295")); - - assertEquals( 0L, TextFormat.parseInt64( "0")); - assertEquals( 1L, TextFormat.parseInt64( "1")); - assertEquals( -1L, TextFormat.parseInt64( "-1")); - assertEquals( 12345L, TextFormat.parseInt64( "12345")); - assertEquals( -12345L, TextFormat.parseInt64( "-12345")); - assertEquals( 2147483647L, TextFormat.parseInt64( "2147483647")); - assertEquals(-2147483648L, TextFormat.parseInt64("-2147483648")); - assertEquals( 4294967295L, TextFormat.parseInt64( "4294967295")); - assertEquals( 4294967296L, TextFormat.parseInt64( "4294967296")); - assertEquals(9223372036854775807L, - TextFormat.parseInt64("9223372036854775807")); - assertEquals(-9223372036854775808L, - TextFormat.parseInt64("-9223372036854775808")); - - assertEquals( 0L, TextFormat.parseUInt64( "0")); - assertEquals( 1L, TextFormat.parseUInt64( "1")); - assertEquals( 12345L, TextFormat.parseUInt64( "12345")); - assertEquals( 2147483647L, TextFormat.parseUInt64( "2147483647")); - assertEquals( 4294967295L, TextFormat.parseUInt64( "4294967295")); - assertEquals( 4294967296L, TextFormat.parseUInt64( "4294967296")); - assertEquals(9223372036854775807L, - TextFormat.parseUInt64("9223372036854775807")); - assertEquals(-9223372036854775808L, - TextFormat.parseUInt64("9223372036854775808")); - assertEquals(-1L, TextFormat.parseUInt64("18446744073709551615")); - - // Hex - assertEquals(0x1234abcd, TextFormat.parseInt32("0x1234abcd")); - assertEquals(-0x1234abcd, TextFormat.parseInt32("-0x1234abcd")); - assertEquals(-1, TextFormat.parseUInt64("0xffffffffffffffff")); - assertEquals(0x7fffffffffffffffL, - TextFormat.parseInt64("0x7fffffffffffffff")); - - // Octal - assertEquals(01234567, TextFormat.parseInt32("01234567")); - - // Out-of-range - try { - TextFormat.parseInt32("2147483648"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseInt32("-2147483649"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseUInt32("4294967296"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseUInt32("-1"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseInt64("9223372036854775808"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseInt64("-9223372036854775809"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseUInt64("18446744073709551616"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - try { - TextFormat.parseUInt64("-1"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - - // Not a number. - try { - TextFormat.parseInt32("abcd"); - fail("Should have thrown an exception."); - } catch (NumberFormatException e) { - // success - } - } - - public void testParseString() throws Exception { - final String zh = "\u9999\u6e2f\u4e0a\u6d77\ud84f\udf80\u8c50\u9280\u884c"; - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_string: \"" + zh + "\"", builder); - assertEquals(zh, builder.getOptionalString()); - } - - public void testParseLongString() throws Exception { - String longText = - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890" + - "123456789012345678901234567890123456789012345678901234567890"; - - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_string: \"" + longText + "\"", builder); - assertEquals(longText, builder.getOptionalString()); - } - - public void testParseBoolean() throws Exception { - String goodText = - "repeated_bool: t repeated_bool : 0\n" + - "repeated_bool :f repeated_bool:1"; - String goodTextCanonical = - "repeated_bool: true\n" + - "repeated_bool: false\n" + - "repeated_bool: false\n" + - "repeated_bool: true\n"; - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge(goodText, builder); - assertEquals(goodTextCanonical, builder.build().toString()); - - try { - TestAllTypes.Builder badBuilder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_bool:2", badBuilder); - fail("Should have thrown an exception."); - } catch (TextFormat.ParseException e) { - // success - } - try { - TestAllTypes.Builder badBuilder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_bool: foo", badBuilder); - fail("Should have thrown an exception."); - } catch (TextFormat.ParseException e) { - // success - } - } - - public void testParseAdjacentStringLiterals() throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - TextFormat.merge("optional_string: \"foo\" 'corge' \"grault\"", builder); - assertEquals("foocorgegrault", builder.getOptionalString()); - } - - public void testPrintFieldValue() throws Exception { - assertPrintFieldValue("\"Hello\"", "Hello", "repeated_string"); - assertPrintFieldValue("123.0", 123f, "repeated_float"); - assertPrintFieldValue("123.0", 123d, "repeated_double"); - assertPrintFieldValue("123", 123, "repeated_int32"); - assertPrintFieldValue("123", 123L, "repeated_int64"); - assertPrintFieldValue("true", true, "repeated_bool"); - assertPrintFieldValue("4294967295", 0xFFFFFFFF, "repeated_uint32"); - assertPrintFieldValue("18446744073709551615", 0xFFFFFFFFFFFFFFFFL, - "repeated_uint64"); - assertPrintFieldValue("\"\\001\\002\\003\"", - ByteString.copyFrom(new byte[] {1, 2, 3}), "repeated_bytes"); - } - - private void assertPrintFieldValue(String expect, Object value, - String fieldName) throws Exception { - TestAllTypes.Builder builder = TestAllTypes.newBuilder(); - StringBuilder sb = new StringBuilder(); - TextFormat.printFieldValue( - TestAllTypes.getDescriptor().findFieldByName(fieldName), - value, sb); - assertEquals(expect, sb.toString()); - } - - public void testShortDebugString() { - assertEquals("optional_nested_message { bb: 42 } repeated_int32: 1" - + " repeated_uint32: 2", - TextFormat.shortDebugString(TestAllTypes.newBuilder() - .addRepeatedInt32(1) - .addRepeatedUint32(2) - .setOptionalNestedMessage( - NestedMessage.newBuilder().setBb(42).build()) - .build())); - } - - public void testShortDebugString_unknown() { - assertEquals("5: 1 5: 0x00000002 5: 0x0000000000000003 5: \"4\" 5 { 10: 5 }" - + " 8: 1 8: 2 8: 3 15: 12379813812177893520 15: 0xabcd1234 15:" - + " 0xabcdef1234567890", - TextFormat.shortDebugString(makeUnknownFieldSet())); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java deleted file mode 100644 index ea088b32..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java +++ /dev/null @@ -1,437 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import protobuf_unittest.UnittestProto; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestEmptyMessage; -import protobuf_unittest.UnittestProto.TestEmptyMessageWithExtensions; - -import junit.framework.TestCase; - -import java.util.Arrays; -import java.util.Map; - -/** - * Tests related to unknown field handling. - * - * @author kenton@google.com (Kenton Varda) - */ -public class UnknownFieldSetTest extends TestCase { - public void setUp() throws Exception { - descriptor = TestAllTypes.getDescriptor(); - allFields = TestUtil.getAllSet(); - allFieldsData = allFields.toByteString(); - emptyMessage = TestEmptyMessage.parseFrom(allFieldsData); - unknownFields = emptyMessage.getUnknownFields(); - } - - UnknownFieldSet.Field getField(String name) { - Descriptors.FieldDescriptor field = descriptor.findFieldByName(name); - assertNotNull(field); - return unknownFields.getField(field.getNumber()); - } - - // Constructs a protocol buffer which contains fields with all the same - // numbers as allFieldsData except that each field is some other wire - // type. - ByteString getBizarroData() throws Exception { - UnknownFieldSet.Builder bizarroFields = UnknownFieldSet.newBuilder(); - - UnknownFieldSet.Field varintField = - UnknownFieldSet.Field.newBuilder().addVarint(1).build(); - UnknownFieldSet.Field fixed32Field = - UnknownFieldSet.Field.newBuilder().addFixed32(1).build(); - - for (Map.Entry entry : - unknownFields.asMap().entrySet()) { - if (entry.getValue().getVarintList().isEmpty()) { - // Original field is not a varint, so use a varint. - bizarroFields.addField(entry.getKey(), varintField); - } else { - // Original field *is* a varint, so use something else. - bizarroFields.addField(entry.getKey(), fixed32Field); - } - } - - return bizarroFields.build().toByteString(); - } - - Descriptors.Descriptor descriptor; - TestAllTypes allFields; - ByteString allFieldsData; - - // An empty message that has been parsed from allFieldsData. So, it has - // unknown fields of every type. - TestEmptyMessage emptyMessage; - UnknownFieldSet unknownFields; - - // ================================================================= - - public void testVarint() throws Exception { - UnknownFieldSet.Field field = getField("optional_int32"); - assertEquals(1, field.getVarintList().size()); - assertEquals(allFields.getOptionalInt32(), - (long) field.getVarintList().get(0)); - } - - public void testFixed32() throws Exception { - UnknownFieldSet.Field field = getField("optional_fixed32"); - assertEquals(1, field.getFixed32List().size()); - assertEquals(allFields.getOptionalFixed32(), - (int) field.getFixed32List().get(0)); - } - - public void testFixed64() throws Exception { - UnknownFieldSet.Field field = getField("optional_fixed64"); - assertEquals(1, field.getFixed64List().size()); - assertEquals(allFields.getOptionalFixed64(), - (long) field.getFixed64List().get(0)); - } - - public void testLengthDelimited() throws Exception { - UnknownFieldSet.Field field = getField("optional_bytes"); - assertEquals(1, field.getLengthDelimitedList().size()); - assertEquals(allFields.getOptionalBytes(), - field.getLengthDelimitedList().get(0)); - } - - public void testGroup() throws Exception { - Descriptors.FieldDescriptor nestedFieldDescriptor = - TestAllTypes.OptionalGroup.getDescriptor().findFieldByName("a"); - assertNotNull(nestedFieldDescriptor); - - UnknownFieldSet.Field field = getField("optionalgroup"); - assertEquals(1, field.getGroupList().size()); - - UnknownFieldSet group = field.getGroupList().get(0); - assertEquals(1, group.asMap().size()); - assertTrue(group.hasField(nestedFieldDescriptor.getNumber())); - - UnknownFieldSet.Field nestedField = - group.getField(nestedFieldDescriptor.getNumber()); - assertEquals(1, nestedField.getVarintList().size()); - assertEquals(allFields.getOptionalGroup().getA(), - (long) nestedField.getVarintList().get(0)); - } - - public void testSerialize() throws Exception { - // Check that serializing the UnknownFieldSet produces the original data - // again. - ByteString data = emptyMessage.toByteString(); - assertEquals(allFieldsData, data); - } - - public void testCopyFrom() throws Exception { - TestEmptyMessage message = - TestEmptyMessage.newBuilder().mergeFrom(emptyMessage).build(); - - assertEquals(emptyMessage.toString(), message.toString()); - } - - public void testMergeFrom() throws Exception { - TestEmptyMessage source = - TestEmptyMessage.newBuilder() - .setUnknownFields( - UnknownFieldSet.newBuilder() - .addField(2, - UnknownFieldSet.Field.newBuilder() - .addVarint(2).build()) - .addField(3, - UnknownFieldSet.Field.newBuilder() - .addVarint(4).build()) - .build()) - .build(); - TestEmptyMessage destination = - TestEmptyMessage.newBuilder() - .setUnknownFields( - UnknownFieldSet.newBuilder() - .addField(1, - UnknownFieldSet.Field.newBuilder() - .addVarint(1).build()) - .addField(3, - UnknownFieldSet.Field.newBuilder() - .addVarint(3).build()) - .build()) - .mergeFrom(source) - .build(); - - assertEquals( - "1: 1\n" + - "2: 2\n" + - "3: 3\n" + - "3: 4\n", - destination.toString()); - } - - public void testClear() throws Exception { - UnknownFieldSet fields = - UnknownFieldSet.newBuilder().mergeFrom(unknownFields).clear().build(); - assertTrue(fields.asMap().isEmpty()); - } - - public void testClearMessage() throws Exception { - TestEmptyMessage message = - TestEmptyMessage.newBuilder().mergeFrom(emptyMessage).clear().build(); - assertEquals(0, message.getSerializedSize()); - } - - public void testParseKnownAndUnknown() throws Exception { - // Test mixing known and unknown fields when parsing. - - UnknownFieldSet fields = - UnknownFieldSet.newBuilder(unknownFields) - .addField(123456, - UnknownFieldSet.Field.newBuilder().addVarint(654321).build()) - .build(); - - ByteString data = fields.toByteString(); - TestAllTypes destination = TestAllTypes.parseFrom(data); - - TestUtil.assertAllFieldsSet(destination); - assertEquals(1, destination.getUnknownFields().asMap().size()); - - UnknownFieldSet.Field field = - destination.getUnknownFields().getField(123456); - assertEquals(1, field.getVarintList().size()); - assertEquals(654321, (long) field.getVarintList().get(0)); - } - - public void testWrongTypeTreatedAsUnknown() throws Exception { - // Test that fields of the wrong wire type are treated like unknown fields - // when parsing. - - ByteString bizarroData = getBizarroData(); - TestAllTypes allTypesMessage = TestAllTypes.parseFrom(bizarroData); - TestEmptyMessage emptyMessage = TestEmptyMessage.parseFrom(bizarroData); - - // All fields should have been interpreted as unknown, so the debug strings - // should be the same. - assertEquals(emptyMessage.toString(), allTypesMessage.toString()); - } - - public void testUnknownExtensions() throws Exception { - // Make sure fields are properly parsed to the UnknownFieldSet even when - // they are declared as extension numbers. - - TestEmptyMessageWithExtensions message = - TestEmptyMessageWithExtensions.parseFrom(allFieldsData); - - assertEquals(unknownFields.asMap().size(), - message.getUnknownFields().asMap().size()); - assertEquals(allFieldsData, message.toByteString()); - } - - public void testWrongExtensionTypeTreatedAsUnknown() throws Exception { - // Test that fields of the wrong wire type are treated like unknown fields - // when parsing extensions. - - ByteString bizarroData = getBizarroData(); - TestAllExtensions allExtensionsMessage = - TestAllExtensions.parseFrom(bizarroData); - TestEmptyMessage emptyMessage = TestEmptyMessage.parseFrom(bizarroData); - - // All fields should have been interpreted as unknown, so the debug strings - // should be the same. - assertEquals(emptyMessage.toString(), - allExtensionsMessage.toString()); - } - - public void testParseUnknownEnumValue() throws Exception { - Descriptors.FieldDescriptor singularField = - TestAllTypes.getDescriptor().findFieldByName("optional_nested_enum"); - Descriptors.FieldDescriptor repeatedField = - TestAllTypes.getDescriptor().findFieldByName("repeated_nested_enum"); - assertNotNull(singularField); - assertNotNull(repeatedField); - - ByteString data = - UnknownFieldSet.newBuilder() - .addField(singularField.getNumber(), - UnknownFieldSet.Field.newBuilder() - .addVarint(TestAllTypes.NestedEnum.BAR.getNumber()) - .addVarint(5) // not valid - .build()) - .addField(repeatedField.getNumber(), - UnknownFieldSet.Field.newBuilder() - .addVarint(TestAllTypes.NestedEnum.FOO.getNumber()) - .addVarint(4) // not valid - .addVarint(TestAllTypes.NestedEnum.BAZ.getNumber()) - .addVarint(6) // not valid - .build()) - .build() - .toByteString(); - - { - TestAllTypes message = TestAllTypes.parseFrom(data); - assertEquals(TestAllTypes.NestedEnum.BAR, - message.getOptionalNestedEnum()); - assertEquals( - Arrays.asList(TestAllTypes.NestedEnum.FOO, TestAllTypes.NestedEnum.BAZ), - message.getRepeatedNestedEnumList()); - assertEquals(Arrays.asList(5L), - message.getUnknownFields() - .getField(singularField.getNumber()) - .getVarintList()); - assertEquals(Arrays.asList(4L, 6L), - message.getUnknownFields() - .getField(repeatedField.getNumber()) - .getVarintList()); - } - - { - TestAllExtensions message = - TestAllExtensions.parseFrom(data, TestUtil.getExtensionRegistry()); - assertEquals(TestAllTypes.NestedEnum.BAR, - message.getExtension(UnittestProto.optionalNestedEnumExtension)); - assertEquals( - Arrays.asList(TestAllTypes.NestedEnum.FOO, TestAllTypes.NestedEnum.BAZ), - message.getExtension(UnittestProto.repeatedNestedEnumExtension)); - assertEquals(Arrays.asList(5L), - message.getUnknownFields() - .getField(singularField.getNumber()) - .getVarintList()); - assertEquals(Arrays.asList(4L, 6L), - message.getUnknownFields() - .getField(repeatedField.getNumber()) - .getVarintList()); - } - } - - public void testLargeVarint() throws Exception { - ByteString data = - UnknownFieldSet.newBuilder() - .addField(1, - UnknownFieldSet.Field.newBuilder() - .addVarint(0x7FFFFFFFFFFFFFFFL) - .build()) - .build() - .toByteString(); - UnknownFieldSet parsed = UnknownFieldSet.parseFrom(data); - UnknownFieldSet.Field field = parsed.getField(1); - assertEquals(1, field.getVarintList().size()); - assertEquals(0x7FFFFFFFFFFFFFFFL, (long)field.getVarintList().get(0)); - } - - public void testEqualsAndHashCode() { - UnknownFieldSet.Field fixed32Field = - UnknownFieldSet.Field.newBuilder() - .addFixed32(1) - .build(); - UnknownFieldSet.Field fixed64Field = - UnknownFieldSet.Field.newBuilder() - .addFixed64(1) - .build(); - UnknownFieldSet.Field varIntField = - UnknownFieldSet.Field.newBuilder() - .addVarint(1) - .build(); - UnknownFieldSet.Field lengthDelimitedField = - UnknownFieldSet.Field.newBuilder() - .addLengthDelimited(ByteString.EMPTY) - .build(); - UnknownFieldSet.Field groupField = - UnknownFieldSet.Field.newBuilder() - .addGroup(unknownFields) - .build(); - - UnknownFieldSet a = - UnknownFieldSet.newBuilder() - .addField(1, fixed32Field) - .build(); - UnknownFieldSet b = - UnknownFieldSet.newBuilder() - .addField(1, fixed64Field) - .build(); - UnknownFieldSet c = - UnknownFieldSet.newBuilder() - .addField(1, varIntField) - .build(); - UnknownFieldSet d = - UnknownFieldSet.newBuilder() - .addField(1, lengthDelimitedField) - .build(); - UnknownFieldSet e = - UnknownFieldSet.newBuilder() - .addField(1, groupField) - .build(); - - checkEqualsIsConsistent(a); - checkEqualsIsConsistent(b); - checkEqualsIsConsistent(c); - checkEqualsIsConsistent(d); - checkEqualsIsConsistent(e); - - checkNotEqual(a, b); - checkNotEqual(a, c); - checkNotEqual(a, d); - checkNotEqual(a, e); - checkNotEqual(b, c); - checkNotEqual(b, d); - checkNotEqual(b, e); - checkNotEqual(c, d); - checkNotEqual(c, e); - checkNotEqual(d, e); - } - - /** - * Asserts that the given field sets are not equal and have different - * hash codes. - * - * @warning It's valid for non-equal objects to have the same hash code, so - * this test is stricter than it needs to be. However, this should happen - * relatively rarely. - */ - private void checkNotEqual(UnknownFieldSet s1, UnknownFieldSet s2) { - String equalsError = String.format("%s should not be equal to %s", s1, s2); - assertFalse(equalsError, s1.equals(s2)); - assertFalse(equalsError, s2.equals(s1)); - - assertFalse( - String.format("%s should have a different hash code from %s", s1, s2), - s1.hashCode() == s2.hashCode()); - } - - /** - * Asserts that the given field sets are equal and have identical hash codes. - */ - private void checkEqualsIsConsistent(UnknownFieldSet set) { - // Object should be equal to itself. - assertEquals(set, set); - - // Object should be equal to a copy of itself. - UnknownFieldSet copy = UnknownFieldSet.newBuilder(set).build(); - assertEquals(set, copy); - assertEquals(copy, set); - assertEquals(set.hashCode(), copy.hashCode()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java deleted file mode 100644 index ed5d069e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java +++ /dev/null @@ -1,152 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import junit.framework.TestCase; - -import java.util.Iterator; -import java.util.ListIterator; - -/** - * Tests for {@link UnmodifiableLazyStringList}. - * - * @author jonp@google.com (Jon Perlow) - */ -public class UnmodifiableLazyStringListTest extends TestCase { - - private static String STRING_A = "A"; - private static String STRING_B = "B"; - private static String STRING_C = "C"; - - private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A"); - private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B"); - private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C"); - - public void testReadOnlyMethods() { - LazyStringArrayList rawList = createSampleList(); - UnmodifiableLazyStringList list = new UnmodifiableLazyStringList(rawList); - assertEquals(3, list.size()); - assertSame(STRING_A, list.get(0)); - assertSame(STRING_B, list.get(1)); - assertSame(STRING_C, list.get(2)); - assertEquals(BYTE_STRING_A, list.getByteString(0)); - assertEquals(BYTE_STRING_B, list.getByteString(1)); - assertEquals(BYTE_STRING_C, list.getByteString(2)); - } - - public void testModifyMethods() { - LazyStringArrayList rawList = createSampleList(); - UnmodifiableLazyStringList list = new UnmodifiableLazyStringList(rawList); - - try { - list.remove(0); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - assertEquals(3, list.size()); - - try { - list.add(STRING_B); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - assertEquals(3, list.size()); - - try { - list.set(1, STRING_B); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - } - - public void testIterator() { - LazyStringArrayList rawList = createSampleList(); - UnmodifiableLazyStringList list = new UnmodifiableLazyStringList(rawList); - - Iterator iter = list.iterator(); - int count = 0; - while (iter.hasNext()) { - iter.next(); - count++; - try { - iter.remove(); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - } - assertEquals(3, count); - - } - - public void testListIterator() { - LazyStringArrayList rawList = createSampleList(); - UnmodifiableLazyStringList list = new UnmodifiableLazyStringList(rawList); - - ListIterator iter = list.listIterator(); - int count = 0; - while (iter.hasNext()) { - iter.next(); - count++; - try { - iter.remove(); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - try { - iter.set("bar"); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - try { - iter.add("bar"); - fail(); - } catch (UnsupportedOperationException e) { - // expected - } - } - assertEquals(3, count); - - } - - private LazyStringArrayList createSampleList() { - LazyStringArrayList rawList = new LazyStringArrayList(); - rawList.add(STRING_A); - rawList.add(STRING_B); - rawList.add(STRING_C); - return rawList; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java deleted file mode 100644 index 5ea1dd6a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java +++ /dev/null @@ -1,427 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package com.google.protobuf; - -import junit.framework.TestCase; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import protobuf_unittest.UnittestProto; -import protobuf_unittest.UnittestProto.TestAllExtensions; -import protobuf_unittest.UnittestProto.TestAllTypes; -import protobuf_unittest.UnittestProto.TestFieldOrderings; -import protobuf_unittest.UnittestProto.TestPackedExtensions; -import protobuf_unittest.UnittestProto.TestPackedTypes; -import protobuf_unittest.UnittestMset.TestMessageSet; -import protobuf_unittest.UnittestMset.RawMessageSet; -import protobuf_unittest.UnittestMset.TestMessageSetExtension1; -import protobuf_unittest.UnittestMset.TestMessageSetExtension2; -import com.google.protobuf.UnittestLite.TestAllExtensionsLite; -import com.google.protobuf.UnittestLite.TestPackedExtensionsLite; - -/** - * Tests related to parsing and serialization. - * - * @author kenton@google.com (Kenton Varda) - */ -public class WireFormatTest extends TestCase { - public void testSerialization() throws Exception { - TestAllTypes message = TestUtil.getAllSet(); - - ByteString rawBytes = message.toByteString(); - assertEquals(rawBytes.size(), message.getSerializedSize()); - - TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); - - TestUtil.assertAllFieldsSet(message2); - } - - public void testSerializationPacked() throws Exception { - TestPackedTypes message = TestUtil.getPackedSet(); - - ByteString rawBytes = message.toByteString(); - assertEquals(rawBytes.size(), message.getSerializedSize()); - - TestPackedTypes message2 = TestPackedTypes.parseFrom(rawBytes); - - TestUtil.assertPackedFieldsSet(message2); - } - - public void testSerializeExtensions() throws Exception { - // TestAllTypes and TestAllExtensions should have compatible wire formats, - // so if we serialize a TestAllExtensions then parse it as TestAllTypes - // it should work. - - TestAllExtensions message = TestUtil.getAllExtensionsSet(); - ByteString rawBytes = message.toByteString(); - assertEquals(rawBytes.size(), message.getSerializedSize()); - - TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); - - TestUtil.assertAllFieldsSet(message2); - } - - public void testSerializePackedExtensions() throws Exception { - // TestPackedTypes and TestPackedExtensions should have compatible wire - // formats; check that they serialize to the same string. - TestPackedExtensions message = TestUtil.getPackedExtensionsSet(); - ByteString rawBytes = message.toByteString(); - - TestPackedTypes message2 = TestUtil.getPackedSet(); - ByteString rawBytes2 = message2.toByteString(); - - assertEquals(rawBytes, rawBytes2); - } - - public void testSerializationPackedWithoutGetSerializedSize() - throws Exception { - // Write directly to an OutputStream, without invoking getSerializedSize() - // This used to be a bug where the size of a packed field was incorrect, - // since getSerializedSize() was never invoked. - TestPackedTypes message = TestUtil.getPackedSet(); - - // Directly construct a CodedOutputStream around the actual OutputStream, - // in case writeTo(OutputStream output) invokes getSerializedSize(); - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - CodedOutputStream codedOutput = CodedOutputStream.newInstance(outputStream); - - message.writeTo(codedOutput); - - codedOutput.flush(); - - TestPackedTypes message2 = TestPackedTypes.parseFrom( - outputStream.toByteArray()); - - TestUtil.assertPackedFieldsSet(message2); - } - - public void testSerializeExtensionsLite() throws Exception { - // TestAllTypes and TestAllExtensions should have compatible wire formats, - // so if we serialize a TestAllExtensions then parse it as TestAllTypes - // it should work. - - TestAllExtensionsLite message = TestUtil.getAllLiteExtensionsSet(); - ByteString rawBytes = message.toByteString(); - assertEquals(rawBytes.size(), message.getSerializedSize()); - - TestAllTypes message2 = TestAllTypes.parseFrom(rawBytes); - - TestUtil.assertAllFieldsSet(message2); - } - - public void testSerializePackedExtensionsLite() throws Exception { - // TestPackedTypes and TestPackedExtensions should have compatible wire - // formats; check that they serialize to the same string. - TestPackedExtensionsLite message = TestUtil.getLitePackedExtensionsSet(); - ByteString rawBytes = message.toByteString(); - - TestPackedTypes message2 = TestUtil.getPackedSet(); - ByteString rawBytes2 = message2.toByteString(); - - assertEquals(rawBytes, rawBytes2); - } - - public void testParseExtensions() throws Exception { - // TestAllTypes and TestAllExtensions should have compatible wire formats, - // so if we serialize a TestAllTypes then parse it as TestAllExtensions - // it should work. - - TestAllTypes message = TestUtil.getAllSet(); - ByteString rawBytes = message.toByteString(); - - ExtensionRegistry registry = TestUtil.getExtensionRegistry(); - - TestAllExtensions message2 = - TestAllExtensions.parseFrom(rawBytes, registry); - - TestUtil.assertAllExtensionsSet(message2); - } - - public void testParsePackedExtensions() throws Exception { - // Ensure that packed extensions can be properly parsed. - TestPackedExtensions message = TestUtil.getPackedExtensionsSet(); - ByteString rawBytes = message.toByteString(); - - ExtensionRegistry registry = TestUtil.getExtensionRegistry(); - - TestPackedExtensions message2 = - TestPackedExtensions.parseFrom(rawBytes, registry); - - TestUtil.assertPackedExtensionsSet(message2); - } - - public void testParseExtensionsLite() throws Exception { - // TestAllTypes and TestAllExtensions should have compatible wire formats, - // so if we serialize a TestAllTypes then parse it as TestAllExtensions - // it should work. - - TestAllTypes message = TestUtil.getAllSet(); - ByteString rawBytes = message.toByteString(); - - ExtensionRegistryLite registry_lite = TestUtil.getExtensionRegistryLite(); - - TestAllExtensionsLite message2 = - TestAllExtensionsLite.parseFrom(rawBytes, registry_lite); - - TestUtil.assertAllExtensionsSet(message2); - - // Try again using a full extension registry. - ExtensionRegistry registry = TestUtil.getExtensionRegistry(); - - TestAllExtensionsLite message3 = - TestAllExtensionsLite.parseFrom(rawBytes, registry); - - TestUtil.assertAllExtensionsSet(message3); - } - - public void testParsePackedExtensionsLite() throws Exception { - // Ensure that packed extensions can be properly parsed. - TestPackedExtensionsLite message = TestUtil.getLitePackedExtensionsSet(); - ByteString rawBytes = message.toByteString(); - - ExtensionRegistryLite registry = TestUtil.getExtensionRegistryLite(); - - TestPackedExtensionsLite message2 = - TestPackedExtensionsLite.parseFrom(rawBytes, registry); - - TestUtil.assertPackedExtensionsSet(message2); - } - - public void testExtensionsSerializedSize() throws Exception { - assertEquals(TestUtil.getAllSet().getSerializedSize(), - TestUtil.getAllExtensionsSet().getSerializedSize()); - } - - public void testSerializeDelimited() throws Exception { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - TestUtil.getAllSet().writeDelimitedTo(output); - output.write(12); - TestUtil.getPackedSet().writeDelimitedTo(output); - output.write(34); - - ByteArrayInputStream input = new ByteArrayInputStream(output.toByteArray()); - - TestUtil.assertAllFieldsSet(TestAllTypes.parseDelimitedFrom(input)); - assertEquals(12, input.read()); - TestUtil.assertPackedFieldsSet(TestPackedTypes.parseDelimitedFrom(input)); - assertEquals(34, input.read()); - assertEquals(-1, input.read()); - - // We're at EOF, so parsing again should return null. - assertTrue(TestAllTypes.parseDelimitedFrom(input) == null); - } - - private void assertFieldsInOrder(ByteString data) throws Exception { - CodedInputStream input = data.newCodedInput(); - int previousTag = 0; - - while (true) { - int tag = input.readTag(); - if (tag == 0) { - break; - } - - assertTrue(tag > previousTag); - previousTag = tag; - input.skipField(tag); - } - } - - public void testInterleavedFieldsAndExtensions() throws Exception { - // Tests that fields are written in order even when extension ranges - // are interleaved with field numbers. - ByteString data = - TestFieldOrderings.newBuilder() - .setMyInt(1) - .setMyString("foo") - .setMyFloat(1.0F) - .setExtension(UnittestProto.myExtensionInt, 23) - .setExtension(UnittestProto.myExtensionString, "bar") - .build().toByteString(); - assertFieldsInOrder(data); - - Descriptors.Descriptor descriptor = TestFieldOrderings.getDescriptor(); - ByteString dynamic_data = - DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor()) - .setField(descriptor.findFieldByName("my_int"), 1L) - .setField(descriptor.findFieldByName("my_string"), "foo") - .setField(descriptor.findFieldByName("my_float"), 1.0F) - .setField(UnittestProto.myExtensionInt.getDescriptor(), 23) - .setField(UnittestProto.myExtensionString.getDescriptor(), "bar") - .build().toByteString(); - assertFieldsInOrder(dynamic_data); - } - - private ExtensionRegistry getTestFieldOrderingsRegistry() { - ExtensionRegistry result = ExtensionRegistry.newInstance(); - result.add(UnittestProto.myExtensionInt); - result.add(UnittestProto.myExtensionString); - return result; - } - - public void testParseMultipleExtensionRanges() throws Exception { - // Make sure we can parse a message that contains multiple extensions - // ranges. - TestFieldOrderings source = - TestFieldOrderings.newBuilder() - .setMyInt(1) - .setMyString("foo") - .setMyFloat(1.0F) - .setExtension(UnittestProto.myExtensionInt, 23) - .setExtension(UnittestProto.myExtensionString, "bar") - .build(); - TestFieldOrderings dest = - TestFieldOrderings.parseFrom(source.toByteString(), - getTestFieldOrderingsRegistry()); - assertEquals(source, dest); - } - - public void testParseMultipleExtensionRangesDynamic() throws Exception { - // Same as above except with DynamicMessage. - Descriptors.Descriptor descriptor = TestFieldOrderings.getDescriptor(); - DynamicMessage source = - DynamicMessage.newBuilder(TestFieldOrderings.getDescriptor()) - .setField(descriptor.findFieldByName("my_int"), 1L) - .setField(descriptor.findFieldByName("my_string"), "foo") - .setField(descriptor.findFieldByName("my_float"), 1.0F) - .setField(UnittestProto.myExtensionInt.getDescriptor(), 23) - .setField(UnittestProto.myExtensionString.getDescriptor(), "bar") - .build(); - DynamicMessage dest = - DynamicMessage.parseFrom(descriptor, source.toByteString(), - getTestFieldOrderingsRegistry()); - assertEquals(source, dest); - } - - private static final int UNKNOWN_TYPE_ID = 1550055; - private static final int TYPE_ID_1 = - TestMessageSetExtension1.getDescriptor().getExtensions().get(0).getNumber(); - private static final int TYPE_ID_2 = - TestMessageSetExtension2.getDescriptor().getExtensions().get(0).getNumber(); - - public void testSerializeMessageSet() throws Exception { - // Set up a TestMessageSet with two known messages and an unknown one. - TestMessageSet messageSet = - TestMessageSet.newBuilder() - .setExtension( - TestMessageSetExtension1.messageSetExtension, - TestMessageSetExtension1.newBuilder().setI(123).build()) - .setExtension( - TestMessageSetExtension2.messageSetExtension, - TestMessageSetExtension2.newBuilder().setStr("foo").build()) - .setUnknownFields( - UnknownFieldSet.newBuilder() - .addField(UNKNOWN_TYPE_ID, - UnknownFieldSet.Field.newBuilder() - .addLengthDelimited(ByteString.copyFromUtf8("bar")) - .build()) - .build()) - .build(); - - ByteString data = messageSet.toByteString(); - - // Parse back using RawMessageSet and check the contents. - RawMessageSet raw = RawMessageSet.parseFrom(data); - - assertTrue(raw.getUnknownFields().asMap().isEmpty()); - - assertEquals(3, raw.getItemCount()); - assertEquals(TYPE_ID_1, raw.getItem(0).getTypeId()); - assertEquals(TYPE_ID_2, raw.getItem(1).getTypeId()); - assertEquals(UNKNOWN_TYPE_ID, raw.getItem(2).getTypeId()); - - TestMessageSetExtension1 message1 = - TestMessageSetExtension1.parseFrom( - raw.getItem(0).getMessage().toByteArray()); - assertEquals(123, message1.getI()); - - TestMessageSetExtension2 message2 = - TestMessageSetExtension2.parseFrom( - raw.getItem(1).getMessage().toByteArray()); - assertEquals("foo", message2.getStr()); - - assertEquals("bar", raw.getItem(2).getMessage().toStringUtf8()); - } - - public void testParseMessageSet() throws Exception { - ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance(); - extensionRegistry.add(TestMessageSetExtension1.messageSetExtension); - extensionRegistry.add(TestMessageSetExtension2.messageSetExtension); - - // Set up a RawMessageSet with two known messages and an unknown one. - RawMessageSet raw = - RawMessageSet.newBuilder() - .addItem( - RawMessageSet.Item.newBuilder() - .setTypeId(TYPE_ID_1) - .setMessage( - TestMessageSetExtension1.newBuilder() - .setI(123) - .build().toByteString()) - .build()) - .addItem( - RawMessageSet.Item.newBuilder() - .setTypeId(TYPE_ID_2) - .setMessage( - TestMessageSetExtension2.newBuilder() - .setStr("foo") - .build().toByteString()) - .build()) - .addItem( - RawMessageSet.Item.newBuilder() - .setTypeId(UNKNOWN_TYPE_ID) - .setMessage(ByteString.copyFromUtf8("bar")) - .build()) - .build(); - - ByteString data = raw.toByteString(); - - // Parse as a TestMessageSet and check the contents. - TestMessageSet messageSet = - TestMessageSet.parseFrom(data, extensionRegistry); - - assertEquals(123, messageSet.getExtension( - TestMessageSetExtension1.messageSetExtension).getI()); - assertEquals("foo", messageSet.getExtension( - TestMessageSetExtension2.messageSetExtension).getStr()); - - // Check for unknown field with type LENGTH_DELIMITED, - // number UNKNOWN_TYPE_ID, and contents "bar". - UnknownFieldSet unknownFields = messageSet.getUnknownFields(); - assertEquals(1, unknownFields.asMap().size()); - assertTrue(unknownFields.hasField(UNKNOWN_TYPE_ID)); - - UnknownFieldSet.Field field = unknownFields.getField(UNKNOWN_TYPE_ID); - assertEquals(1, field.getLengthDelimitedList().size()); - assertEquals("bar", field.getLengthDelimitedList().get(0).toStringUtf8()); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto deleted file mode 100644 index 9a040145..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto +++ /dev/null @@ -1,71 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// A proto file which tests the java_multiple_files option. - - -// Some generic_services option(s) added automatically. -// See: http://go/proto2-generic-services-default -option java_generic_services = true; // auto-added - -import "google/protobuf/unittest.proto"; - -package protobuf_unittest; - -option java_multiple_files = true; -option java_outer_classname = "MultipleFilesTestProto"; - -message MessageWithNoOuter { - message NestedMessage { - optional int32 i = 1; - } - enum NestedEnum { - BAZ = 3; - } - optional NestedMessage nested = 1; - repeated TestAllTypes foreign = 2; - optional NestedEnum nested_enum = 3; - optional EnumWithNoOuter foreign_enum = 4; -} - -enum EnumWithNoOuter { - FOO = 1; - BAR = 2; -} - -service ServiceWithNoOuter { - rpc Foo(MessageWithNoOuter) returns(TestAllTypes); -} - -extend TestAllExtensions { - optional int32 extension_with_outer = 1234567; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto deleted file mode 100644 index abffb9d2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jonp@google.com (Jon Perlow) -// - -package protobuf_unittest; - -option java_multiple_files = true; -option java_outer_classname = "NestedBuilders"; - - -message Vehicle { - optional Engine engine = 1; - repeated Wheel wheel = 2; -} - -message Engine { - optional int32 cylinder = 1; - optional int32 liters = 2; -} - -message Wheel { - optional int32 radius = 1; - optional int32 width = 2; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto deleted file mode 100644 index 9fe5d560..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto +++ /dev/null @@ -1,45 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Darick Tong (darick@google.com) -// -// A proto file with nested extensions. Note that this must be defined in -// a separate file to properly test the initialization of the outer class. - - -import "com/google/protobuf/non_nested_extension.proto"; - -package protobuf_unittest; - -message MyNestedExtension { - extend MessageToBeExtended { - optional MessageToBeExtended recursiveExtension = 2; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto deleted file mode 100644 index 16ee46e5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Darick Tong (darick@google.com) -// -// A proto file with nested extensions for a MessageLite messages. Note that -// this must be defined in a separate file to properly test the initialization -// of the outer class. - - -package protobuf_unittest; - -option optimize_for = LITE_RUNTIME; - -import "com/google/protobuf/non_nested_extension_lite.proto"; - -message MyNestedExtensionLite { - extend MessageLiteToBeExtended { - optional MessageLiteToBeExtended recursiveExtensionLite = 3; - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto deleted file mode 100644 index f61b419b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Darick Tong (darick@google.com) -// -// A proto file with extensions. - - -package protobuf_unittest; - -message MessageToBeExtended { - extensions 1 to max; -} - -message MyNonNestedExtension { -} - -extend MessageToBeExtended { - optional MyNonNestedExtension nonNestedExtension = 1; -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto deleted file mode 100644 index 3c82659b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Darick Tong (darick@google.com) -// -// A proto file with extensions for a MessageLite messages. - - -package protobuf_unittest; - -option optimize_for = LITE_RUNTIME; - -message MessageLiteToBeExtended { - extensions 1 to max; -} - -message MyNonNestedExtensionLite { -} - -extend MessageLiteToBeExtended { - optional MyNonNestedExtensionLite nonNestedExtensionLite = 1; -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto deleted file mode 100644 index 499f099f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jonp@google.com (Jon Perlow) - -// This file tests that various identifiers work as field and type names even -// though the same identifiers are used internally by the java code generator. - - -// Some generic_services option(s) added automatically. -// See: http://go/proto2-generic-services-default -option java_generic_services = true; // auto-added - -package io_protocol_tests; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "TestBadIdentifiersProto"; - -message TestMessage { -} - -message Deprecated { - enum TestEnum { - FOO = 1; - } - - optional int32 field1 = 1 [deprecated=true]; - optional TestEnum field2 = 2 [deprecated=true]; - optional TestMessage field3 = 3 [deprecated=true]; -} - -message Override { - optional int32 override = 1; -} - -message Object { - optional int32 object = 1; -} - -service TestConflictingMethodNames { - rpc Override(TestMessage) returns (TestMessage); -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/ac_system_extensions.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/ac_system_extensions.m4 deleted file mode 100644 index 1ca2eeb1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/ac_system_extensions.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl Provide AC_USE_SYSTEM_EXTENSIONS for old autoconf machines. -AC_DEFUN([ACX_USE_SYSTEM_EXTENSIONS],[ - ifdef([AC_USE_SYSTEM_EXTENSIONS],[ - AC_USE_SYSTEM_EXTENSIONS - ],[ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) - AC_BEFORE([$0], [AC_RUN_IFELSE]) - - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_AIX]) - AC_REQUIRE([AC_MINIX]) - - AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ -# define __EXTENSIONS__ 1 - AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) - ]) -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_check_suncc.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_check_suncc.m4 deleted file mode 100644 index 4e8f9610..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_check_suncc.m4 +++ /dev/null @@ -1,74 +0,0 @@ -dnl Check for the presence of the Sun Studio compiler. -dnl If Sun Studio compiler is found, set appropriate flags. -dnl Additionally, Sun Studio doesn't default to 64-bit by itself, -dnl nor does it automatically look in standard Solaris places for -dnl 64-bit libs, so we must add those options and paths to the search -dnl paths. - -dnl TODO(kenton): This is pretty hacky. It sets CXXFLAGS, which the autoconf -dnl docs say should never be overridden except by the user. It also isn't -dnl cross-compile safe. We should fix these problems, but since I don't have -dnl Sun CC at my disposal for testing, someone else will have to do it. - -AC_DEFUN([ACX_CHECK_SUNCC],[ - - AC_LANG_PUSH([C++]) - AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"]) - AC_LANG_POP() - - - AC_ARG_ENABLE([64bit-solaris], - [AS_HELP_STRING([--disable-64bit-solaris], - [Build 64 bit binary on Solaris @<:@default=on@:>@])], - [ac_enable_64bit="$enableval"], - [ac_enable_64bit="yes"]) - - AS_IF([test "$SUNCC" = "yes" -a "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ - dnl Sun Studio has a crashing bug with -xO4 in some cases. Keep this - dnl at -xO3 until a proper test to detect those crashes can be done. - CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${CXXFLAGS}" - ]) - - case $host_os in - *solaris*) - AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) - AS_IF([test "x$ISAINFO" != "xno"], - [isainfo_b=`${ISAINFO} -b`], - [isainfo_b="x"]) - - AS_IF([test "$isainfo_b" != "x"],[ - - isainfo_k=`${ISAINFO} -k` - - AS_IF([test "x$ac_enable_64bit" = "xyes"],[ - - AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ - dnl The user hasn't overridden the default libdir, so we'll - dnl the dir suffix to match solaris 32/64-bit policy - libdir="${libdir}/${isainfo_k}" - ]) - - dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool - dnl does the wrong thing if you don't put it into CXXFLAGS. sigh. - dnl (It also needs it in CFLAGS, or it does a different wrong thing!) - AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ - CXXFLAGS="${CXXFLAGS} -m64" - ac_cv_env_CXXFLAGS_set=set - ac_cv_env_CXXFLAGS_value='-m64' - ]) - - AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[ - CFLAGS="${CFLAGS} -m64" - ac_cv_env_CFLAGS_set=set - ac_cv_env_CFLAGS_value='-m64' - ]) - - AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[ - CXXFLAGS="-xmemalign=8s ${CXXFLAGS}" - ]) - ]) - ]) - ;; - esac - -]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_pthread.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_pthread.m4 deleted file mode 100644 index 89d42c74..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/acx_pthread.m4 +++ /dev/null @@ -1,397 +0,0 @@ -# This was retrieved from -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi -# See also (perhaps for new versions?) -# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi -# -# We've rewritten the inconsistency check code (from avahi), to work -# more broadly. In particular, it no longer assumes ld accepts -zdefs. -# This caused a restructing of the code, but the functionality has only -# changed a little. - -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl @summary figure out how to build C programs using POSIX threads -dnl -dnl This macro figures out how to build C programs using POSIX threads. -dnl It sets the PTHREAD_LIBS output variable to the threads library and -dnl linker flags, and the PTHREAD_CFLAGS output variable to any special -dnl C compiler flags that are needed. (The user can also force certain -dnl compiler flags/libs to be tested by setting these environment -dnl variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. e.g. you should link -dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS -dnl $LIBS -dnl -dnl If you are only building threads programs, you may wish to use -dnl these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to -dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to -dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the -dnl default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, or -dnl if you have any other suggestions or comments. This macro was based -dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with -dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros -dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. -dnl We are also grateful for the helpful feedback of numerous users. -dnl -dnl @category InstalledPackages -dnl @author Steven G. Johnson -dnl @version 2006-05-29 -dnl @license GPLWithACException -dnl -dnl Checks for GCC shared/pthread inconsistency based on work by -dnl Marcin Owsiany - - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi - - # The next part tries to detect GCC inconsistency with -shared on some - # architectures and systems. The problem is that in certain - # configurations, when -shared is specified, GCC "forgets" to - # internally use various flags which are still necessary. - - # - # Prepare the flags - # - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - save_CC="$CC" - - # Try with the flags determined by the earlier checks. - # - # -Wl,-z,defs forces link-time symbol resolution, so that the - # linking checks with -shared actually have any value - # - # FIXME: -fPIC is required for -shared on many architectures, - # so we specify it here, but the right way would probably be to - # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CC="$PTHREAD_CC" - - # In order not to create several levels of indentation, we test - # the value of "$done" until we find the cure or run out of ideas. - done="no" - - # First, make sure the CFLAGS we added are actually accepted by our - # compiler. If not (and OS X's ld, for instance, does not accept -z), - # then we can't do this test. - if test x"$done" = xno; then - AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies]) - AC_TRY_LINK(,, , [done=yes]) - - if test "x$done" = xyes ; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi - fi - - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -pthread is sufficient with -shared]) - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - - # - # Linux gcc on some architectures such as mips/mipsel forgets - # about -lpthread - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lpthread fixes that]) - LIBS="-lpthread $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - # - # FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc - # - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lc_r fixes that]) - LIBS="-lc_r $PTHREAD_LIBS $save_LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="-lc_r $PTHREAD_LIBS" - else - AC_MSG_RESULT([no]) - fi - fi - if test x"$done" = xno; then - # OK, we have run out of ideas - AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries]) - - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi - - AC_MSG_CHECKING([whether what we have so far is sufficient with -nostdlib]) - CFLAGS="-nostdlib $CFLAGS" - # we need c with nostdlib - LIBS="$LIBS -lc" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes],[done=no]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - - if test x"$done" = xno; then - AC_MSG_CHECKING([whether -lpthread saves the day]) - LIBS="-lpthread $LIBS" - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [done=yes],[done=no]) - - if test "x$done" = xyes; then - AC_MSG_RESULT([yes]) - PTHREAD_LIBS="$PTHREAD_LIBS -lpthread" - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries and -nostdlib]) - fi - fi - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/stl_hash.m4 b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/stl_hash.m4 deleted file mode 100644 index 0722b14a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/m4/stl_hash.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# We check two things: where the include file is for -# unordered_map/hash_map (we prefer the first form), and what -# namespace unordered/hash_map lives in within that include file. We -# include AC_TRY_COMPILE for all the combinations we've seen in the -# wild. We define HASH_MAP_H to the location of the header file, and -# HASH_NAMESPACE to the namespace the class (unordered_map or -# hash_map) is in. We define HAVE_UNORDERED_MAP if the class we found -# is named unordered_map, or leave it undefined if not. - -# This also checks if unordered map exists. -AC_DEFUN([AC_CXX_STL_HASH], - [ - AC_MSG_CHECKING(the location of hash_map) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - ac_cv_cxx_hash_map="" - # First try unordered_map, but not on gcc's before 4.2 -- I've - # seen unexplainable unordered_map bugs with -O2 on older gcc's. - AC_TRY_COMPILE([#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) - # error GCC too old for unordered_map - #endif - ], - [/* no program body necessary */], - [stl_hash_old_gcc=no], - [stl_hash_old_gcc=yes]) - for location in unordered_map tr1/unordered_map; do - for namespace in std std::tr1; do - if test -z "$ac_cv_cxx_hash_map" -a "$stl_hash_old_gcc" != yes; then - # Some older gcc's have a buggy tr1, so test a bit of code. - AC_TRY_COMPILE([#include <$location>], - [const ${namespace}::unordered_map t; - return t.find(5) == t.end();], - [ac_cv_cxx_hash_map="<$location>"; - ac_cv_cxx_hash_namespace="$namespace"; - ac_cv_cxx_hash_map_class="unordered_map";]) - fi - done - done - # Now try hash_map - for location in ext/hash_map hash_map; do - for namespace in __gnu_cxx "" std stdext; do - if test -z "$ac_cv_cxx_hash_map"; then - AC_TRY_COMPILE([#include <$location>], - [${namespace}::hash_map t], - [ac_cv_cxx_hash_map="<$location>"; - ac_cv_cxx_hash_namespace="$namespace"; - ac_cv_cxx_hash_map_class="hash_map";]) - fi - done - done - ac_cv_cxx_hash_set=`echo "$ac_cv_cxx_hash_map" | sed s/map/set/`; - ac_cv_cxx_hash_set_class=`echo "$ac_cv_cxx_hash_map_class" | sed s/map/set/`; - if test -n "$ac_cv_cxx_hash_map"; then - AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map]) - AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set]) - AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map, - [the location of or ]) - AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set, - [the location of or ]) - AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace, - [the namespace of hash_map/hash_set]) - AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class, - [the name of ]) - AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, - [the name of ]) - AC_MSG_RESULT([$ac_cv_cxx_hash_map]) - else - AC_MSG_RESULT() - AC_MSG_WARN([could not find an STL hash_map]) - fi -]) - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/more_tests/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/more_tests/Makefile deleted file mode 100755 index 286cf0f1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/more_tests/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# Additional tests to run before releasing a package. -# -# Run like: -# make PACKAGE=/path/to/protobuf-VERSION.tar.gz -# -# Some of these tests require tools or make assumptions that may not be -# available on end-user machines, so these cannot be part of "make check". For -# example, we test that the headers compile with strict warning settings, but -# since different compilers produce wildly different warnings we cannot assume -# that this test will pass everywhere. If we ran it as part of "make check", -# it could unnecessarily block users from running the real tests just because -# their compiler produces some extra warnings that probably aren't a big deal. -# So we run it separately. - -all: header_warning_test - -clean: - rm -rf src target header_warning_test.cc header_warning_test.o header_warning_test - -# Unpack the package into src, then install it into target. -PACKAGE=protobuf.tar.gz - -src: $(PACKAGE) - tar zxvf $(PACKAGE) - mv `basename $(PACKAGE) .tar.gz` src - -target: src - (cd src && ./configure --prefix=$$PWD/../target --disable-shared) - (cd src && make -j4 check) - (cd src && make install) - -# Verify that headers produce no warnings even under strict settings. -header_warning_test.cc: target - ( (cd target/include && find google/protobuf -name '*.h') | \ - awk '{print "#include \""$$1"\""} ' > header_warning_test.cc ) - -header_warning_test: header_warning_test.cc - # TODO(kenton): Consider adding -pedantic and -Weffc++. Currently these - # produce tons of extra warnings so we'll need to do some work first. - g++ -Itarget/include -Wall -Werror -Wsign-compare -O2 -c header_warning_test.cc - touch header_warning_test diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/post_process_dist.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/post_process_dist.sh deleted file mode 100755 index 7b2e599d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/post_process_dist.sh +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/sh - -# This script takes the result of "make dist" and: -# 1) Unpacks it. -# 2) Ensures all contents are user-writable. Some version control systems -# keep code read-only until you explicitly ask to edit it, and the normal -# "make dist" process does not correct for this, so the result is that -# the entire dist is still marked read-only when unpacked, which is -# annoying. So, we fix it. -# 3) Convert MSVC project files to MSVC 2005, so that anyone who has version -# 2005 *or* 2008 can open them. (In version control, we keep things in -# MSVC 2008 format since that's what we use in development.) -# 4) Uses the result to create .tar.gz, .tar.bz2, and .zip versions and -# deposites them in the "dist" directory. In the .zip version, all -# non-testdata .txt files are converted to Windows-style line endings. -# 5) Cleans up after itself. - -if [ "$1" == "" ]; then - echo "USAGE: $1 DISTFILE" >&2 - exit 1 -fi - -if [ ! -e $1 ]; then - echo $1": File not found." >&2 - exit 1 -fi - -set -ex - -BASENAME=`basename $1 .tar.gz` - -# Create a directory called "dist", copy the tarball there and unpack it. -mkdir dist -cp $1 dist -cd dist -tar zxvf $BASENAME.tar.gz -rm $BASENAME.tar.gz - -# Set the entire contents to be user-writable. -chmod -R u+w $BASENAME - -# Convert the MSVC projects to MSVC 2005 format. -cd $BASENAME/vsprojects -./convert2008to2005.sh -cd .. - -# Build the dist again in .tar.gz and .tar.bz2 formats. -./configure -make dist-gzip -make dist-bzip2 - -# Convert all text files to use DOS-style line endings, then build a .zip -# distribution. -todos *.txt */*.txt -make dist-zip - -# Clean up. -mv $BASENAME.tar.gz $BASENAME.tar.bz2 $BASENAME.zip .. -cd .. -rm -rf $BASENAME diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf-lite.pc.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf-lite.pc.in deleted file mode 100644 index 29c218e5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf-lite.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Protocol Buffers -Description: Google's Data Interchange Format -Version: @VERSION@ -Libs: -L${libdir} -lprotobuf-lite @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -Cflags: -I${includedir} @PTHREAD_CFLAGS@ -# Commented out because it crashes pkg-config *sigh*: -# http://bugs.freedesktop.org/show_bug.cgi?id=13265 -# Conflicts: protobuf diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf.pc.in b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf.pc.in deleted file mode 100644 index 8a53a431..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/protobuf.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Protocol Buffers -Description: Google's Data Interchange Format -Version: @VERSION@ -Libs: -L${libdir} -lprotobuf @LIBS@ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -Cflags: -I${includedir} @PTHREAD_CFLAGS@ -# Commented out because it crashes pkg-config *sigh*: -# http://bugs.freedesktop.org/show_bug.cgi?id=13265 -# Conflicts: protobuf-lite diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/README.txt deleted file mode 100644 index 73a26566..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/README.txt +++ /dev/null @@ -1,97 +0,0 @@ -Protocol Buffers - Google's data interchange format -Copyright 2008 Google Inc. - -This directory contains the Python Protocol Buffers runtime library. - -Normally, this directory comes as part of the protobuf package, available -from: - - http://code.google.com/p/protobuf - -The complete package includes the C++ source code, which includes the -Protocol Compiler (protoc). If you downloaded this package from PyPI -or some other Python-specific source, you may have received only the -Python part of the code. In this case, you will need to obtain the -Protocol Compiler from some other source before you can use this -package. - -Development Warning -=================== - -The Python implementation of Protocol Buffers is not as mature as the C++ -and Java implementations. It may be more buggy, and it is known to be -pretty slow at this time. If you would like to help fix these issues, -join the Protocol Buffers discussion list and let us know! - -Installation -============ - -1) Make sure you have Python 2.4 or newer. If in doubt, run: - - $ python -V - -2) If you do not have setuptools installed, note that it will be - downloaded and installed automatically as soon as you run setup.py. - If you would rather install it manually, you may do so by following - the instructions on this page: - - http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions - -3) Build the C++ code, or install a binary distribution of protoc. If - you install a binary distribution, make sure that it is the same - version as this package. If in doubt, run: - - $ protoc --version - -4) Run the tests: - - $ python setup.py test - - If some tests fail, this library may not work correctly on your - system. Continue at your own risk. - - Please note that there is a known problem with some versions of - Python on Cygwin which causes the tests to fail after printing the - error: "sem_init: Resource temporarily unavailable". This appears - to be a bug either in Cygwin or in Python: - http://www.cygwin.com/ml/cygwin/2005-07/msg01378.html - We do not know if or when it might me fixed. We also do not know - how likely it is that this bug will affect users in practice. - -5) Install: - - $ python setup.py install - - This step may require superuser privileges. - NOTE: To use C++ implementation, you need to export the environment variable - before this step. See the "C++ Implementation" section below for more - details. - -Usage -===== - -The complete documentation for Protocol Buffers is available via the -web at: - - http://code.google.com/apis/protocolbuffers/ - -C++ Implementation -================== - -WARNING: This is EXPERIMENTAL and only available for CPython platforms. - -The C++ implementation for Python messages is built as a Python extension to -improve the overall protobuf Python performance. - -To use the C++ implementation, export an environment variable: - - $ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp - -You need to export this variable before running setup.py script to build and -install the extension. You must also set the variable at runtime, otherwise -the pure-Python implementation will be used. In a future release, we will -change the default so that C++ implementation is used whenever it is available. -It is strongly recommended to run `python setup.py test` after setting the -variable to "cpp", so the tests will be against C++ implemented Python -messages. - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/ez_setup.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/ez_setup.py deleted file mode 100755 index a2cf777d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/ez_setup.py +++ /dev/null @@ -1,283 +0,0 @@ -#!python - -# This file was obtained from: -# http://peak.telecommunity.com/dist/ez_setup.py -# on 2011/1/21. - -"""Bootstrap setuptools installation - -If you want to use setuptools in your package's setup.py, just include this -file in the same directory with it, and add this to the top of your setup.py:: - - from ez_setup import use_setuptools - use_setuptools() - -If you want to require a specific version of setuptools, set a download -mirror, or use an alternate download directory, you can do so by supplying -the appropriate options to ``use_setuptools()``. - -This file can also be run as a script to install or upgrade setuptools. -""" -import sys -DEFAULT_VERSION = "0.6c11" -DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] - -md5_data = { - 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', - 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', - 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', - 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', - 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', - 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', - 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', - 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', - 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', - 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', - 'setuptools-0.6c10-py2.3.egg': 'ce1e2ab5d3a0256456d9fc13800a7090', - 'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4', - 'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7', - 'setuptools-0.6c10-py2.6.egg': '58ea40aef06da02ce641495523a0b7f5', - 'setuptools-0.6c11-py2.3.egg': '2baeac6e13d414a9d28e7ba5b5a596de', - 'setuptools-0.6c11-py2.4.egg': 'bd639f9b0eac4c42497034dec2ec0c2b', - 'setuptools-0.6c11-py2.5.egg': '64c94f3bf7a72a13ec83e0b24f2749b2', - 'setuptools-0.6c11-py2.6.egg': 'bfa92100bd772d5a213eedd356d64086', - 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', - 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', - 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', - 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', - 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', - 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', - 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', - 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', - 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', - 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', - 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', - 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', - 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', - 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', - 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', - 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', - 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', - 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', - 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', - 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', - 'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03', - 'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a', - 'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6', - 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a', -} - -import sys, os -try: from hashlib import md5 -except ImportError: from md5 import md5 - -def _validate_md5(egg_name, data): - if egg_name in md5_data: - digest = md5(data).hexdigest() - if digest != md5_data[egg_name]: - print >>sys.stderr, ( - "md5 validation of %s failed! (Possible download problem?)" - % egg_name - ) - sys.exit(2) - return data - -def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - download_delay=15 -): - """Automatically find/download setuptools and make it available on sys.path - - `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end with - a '/'). `to_dir` is the directory where setuptools will be downloaded, if - it is not already available. If `download_delay` is specified, it should - be the number of seconds that will be paused before initiating a download, - should one be required. If an older version of setuptools is installed, - this routine will print a message to ``sys.stderr`` and raise SystemExit in - an attempt to abort the calling script. - """ - was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules - def do_download(): - egg = download_setuptools(version, download_base, to_dir, download_delay) - sys.path.insert(0, egg) - import setuptools; setuptools.bootstrap_install_from = egg - try: - import pkg_resources - except ImportError: - return do_download() - try: - pkg_resources.require("setuptools>="+version); return - except pkg_resources.VersionConflict, e: - if was_imported: - print >>sys.stderr, ( - "The required version of setuptools (>=%s) is not available, and\n" - "can't be installed while this script is running. Please install\n" - " a more recent version first, using 'easy_install -U setuptools'." - "\n\n(Currently using %r)" - ) % (version, e.args[0]) - sys.exit(2) - except pkg_resources.DistributionNotFound: - pass - - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return do_download() - -def download_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - delay = 15 -): - """Download setuptools from a specified location and return its filename - - `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end - with a '/'). `to_dir` is the directory where the egg will be downloaded. - `delay` is the number of seconds to pause before an actual download attempt. - """ - import urllib2, shutil - egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) - url = download_base + egg_name - saveto = os.path.join(to_dir, egg_name) - src = dst = None - if not os.path.exists(saveto): # Avoid repeated downloads - try: - from distutils import log - if delay: - log.warn(""" ---------------------------------------------------------------------------- -This script requires setuptools version %s to run (even to display -help). I will attempt to download it for you (from -%s), but -you may need to enable firewall access for this script first. -I will start the download in %d seconds. - -(Note: if this machine does not have network access, please obtain the file - - %s - -and place it in this directory before rerunning this script.) ----------------------------------------------------------------------------""", - version, download_base, delay, url - ); from time import sleep; sleep(delay) - log.warn("Downloading %s", url) - src = urllib2.urlopen(url) - # Read/write all in one block, so we don't create a corrupt file - # if the download is interrupted. - data = _validate_md5(egg_name, src.read()) - dst = open(saveto,"wb"); dst.write(data) - finally: - if src: src.close() - if dst: dst.close() - return os.path.realpath(saveto) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -def main(argv, version=DEFAULT_VERSION): - """Install or upgrade setuptools and EasyInstall""" - try: - import setuptools - except ImportError: - egg = None - try: - egg = download_setuptools(version, delay=0) - sys.path.insert(0,egg) - from setuptools.command.easy_install import main - return main(list(argv)+[egg]) # we're done here - finally: - if egg and os.path.exists(egg): - os.unlink(egg) - else: - if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( - "You have an obsolete version of setuptools installed. Please\n" - "remove it from your system entirely before rerunning this script." - ) - sys.exit(2) - - req = "setuptools>="+version - import pkg_resources - try: - pkg_resources.require(req) - except pkg_resources.VersionConflict: - try: - from setuptools.command.easy_install import main - except ImportError: - from easy_install import main - main(list(argv)+[download_setuptools(delay=0)]) - sys.exit(0) # try to force an exit - else: - if argv: - from setuptools.command.easy_install import main - main(argv) - else: - print "Setuptools version",version,"or greater has been installed." - print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' - -def update_md5(filenames): - """Update our built-in md5 registry""" - - import re - - for name in filenames: - base = os.path.basename(name) - f = open(name,'rb') - md5_data[base] = md5(f.read()).hexdigest() - f.close() - - data = [" %r: %r,\n" % it for it in md5_data.items()] - data.sort() - repl = "".join(data) - - import inspect - srcfile = inspect.getsourcefile(sys.modules[__name__]) - f = open(srcfile, 'rb'); src = f.read(); f.close() - - match = re.search("\nmd5_data = {\n([^}]+)}", src) - if not match: - print >>sys.stderr, "Internal error!" - sys.exit(2) - - src = src[:match.start(1)] + repl + src[match.end(1):] - f = open(srcfile,'w') - f.write(src) - f.close() - - -if __name__=='__main__': - if len(sys.argv)>2 and sys.argv[1]=='--md5update': - update_md5(sys.argv[2:]) - else: - main(sys.argv[1:]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/__init__.py deleted file mode 100755 index de40ea7c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/__init__.py deleted file mode 100755 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/descriptor.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/descriptor.py deleted file mode 100755 index cf609bee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/descriptor.py +++ /dev/null @@ -1,598 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Descriptors essentially contain exactly the information found in a .proto -file, in types that make this information accessible in Python. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - - -from google.protobuf.internal import api_implementation - - -if api_implementation.Type() == 'cpp': - from google.protobuf.internal import cpp_message - - -class Error(Exception): - """Base error for this module.""" - - -class DescriptorBase(object): - - """Descriptors base class. - - This class is the base of all descriptor classes. It provides common options - related functionaility. - - Attributes: - has_options: True if the descriptor has non-default options. Usually it - is not necessary to read this -- just call GetOptions() which will - happily return the default instance. However, it's sometimes useful - for efficiency, and also useful inside the protobuf implementation to - avoid some bootstrapping issues. - """ - - def __init__(self, options, options_class_name): - """Initialize the descriptor given its options message and the name of the - class of the options message. The name of the class is required in case - the options message is None and has to be created. - """ - self._options = options - self._options_class_name = options_class_name - - # Does this descriptor have non-default options? - self.has_options = options is not None - - def GetOptions(self): - """Retrieves descriptor options. - - This method returns the options set or creates the default options for the - descriptor. - """ - if self._options: - return self._options - from google.protobuf import descriptor_pb2 - try: - options_class = getattr(descriptor_pb2, self._options_class_name) - except AttributeError: - raise RuntimeError('Unknown options class name %s!' % - (self._options_class_name)) - self._options = options_class() - return self._options - - -class _NestedDescriptorBase(DescriptorBase): - """Common class for descriptors that can be nested.""" - - def __init__(self, options, options_class_name, name, full_name, - file, containing_type, serialized_start=None, - serialized_end=None): - """Constructor. - - Args: - options: Protocol message options or None - to use default message options. - options_class_name: (str) The class name of the above options. - - name: (str) Name of this protocol message type. - full_name: (str) Fully-qualified name of this protocol message type, - which will include protocol "package" name and the name of any - enclosing types. - file: (FileDescriptor) Reference to file info. - containing_type: if provided, this is a nested descriptor, with this - descriptor as parent, otherwise None. - serialized_start: The start index (inclusive) in block in the - file.serialized_pb that describes this descriptor. - serialized_end: The end index (exclusive) in block in the - file.serialized_pb that describes this descriptor. - """ - super(_NestedDescriptorBase, self).__init__( - options, options_class_name) - - self.name = name - # TODO(falk): Add function to calculate full_name instead of having it in - # memory? - self.full_name = full_name - self.file = file - self.containing_type = containing_type - - self._serialized_start = serialized_start - self._serialized_end = serialized_end - - def GetTopLevelContainingType(self): - """Returns the root if this is a nested type, or itself if its the root.""" - desc = self - while desc.containing_type is not None: - desc = desc.containing_type - return desc - - def CopyToProto(self, proto): - """Copies this to the matching proto in descriptor_pb2. - - Args: - proto: An empty proto instance from descriptor_pb2. - - Raises: - Error: If self couldnt be serialized, due to to few constructor arguments. - """ - if (self.file is not None and - self._serialized_start is not None and - self._serialized_end is not None): - proto.ParseFromString(self.file.serialized_pb[ - self._serialized_start:self._serialized_end]) - else: - raise Error('Descriptor does not contain serialization.') - - -class Descriptor(_NestedDescriptorBase): - - """Descriptor for a protocol message type. - - A Descriptor instance has the following attributes: - - name: (str) Name of this protocol message type. - full_name: (str) Fully-qualified name of this protocol message type, - which will include protocol "package" name and the name of any - enclosing types. - - containing_type: (Descriptor) Reference to the descriptor of the - type containing us, or None if this is top-level. - - fields: (list of FieldDescriptors) Field descriptors for all - fields in this type. - fields_by_number: (dict int -> FieldDescriptor) Same FieldDescriptor - objects as in |fields|, but indexed by "number" attribute in each - FieldDescriptor. - fields_by_name: (dict str -> FieldDescriptor) Same FieldDescriptor - objects as in |fields|, but indexed by "name" attribute in each - FieldDescriptor. - - nested_types: (list of Descriptors) Descriptor references - for all protocol message types nested within this one. - nested_types_by_name: (dict str -> Descriptor) Same Descriptor - objects as in |nested_types|, but indexed by "name" attribute - in each Descriptor. - - enum_types: (list of EnumDescriptors) EnumDescriptor references - for all enums contained within this type. - enum_types_by_name: (dict str ->EnumDescriptor) Same EnumDescriptor - objects as in |enum_types|, but indexed by "name" attribute - in each EnumDescriptor. - enum_values_by_name: (dict str -> EnumValueDescriptor) Dict mapping - from enum value name to EnumValueDescriptor for that value. - - extensions: (list of FieldDescriptor) All extensions defined directly - within this message type (NOT within a nested type). - extensions_by_name: (dict, string -> FieldDescriptor) Same FieldDescriptor - objects as |extensions|, but indexed by "name" attribute of each - FieldDescriptor. - - is_extendable: Does this type define any extension ranges? - - options: (descriptor_pb2.MessageOptions) Protocol message options or None - to use default message options. - - file: (FileDescriptor) Reference to file descriptor. - """ - - def __init__(self, name, full_name, filename, containing_type, fields, - nested_types, enum_types, extensions, options=None, - is_extendable=True, extension_ranges=None, file=None, - serialized_start=None, serialized_end=None): - """Arguments to __init__() are as described in the description - of Descriptor fields above. - - Note that filename is an obsolete argument, that is not used anymore. - Please use file.name to access this as an attribute. - """ - super(Descriptor, self).__init__( - options, 'MessageOptions', name, full_name, file, - containing_type, serialized_start=serialized_start, - serialized_end=serialized_start) - - # We have fields in addition to fields_by_name and fields_by_number, - # so that: - # 1. Clients can index fields by "order in which they're listed." - # 2. Clients can easily iterate over all fields with the terse - # syntax: for f in descriptor.fields: ... - self.fields = fields - for field in self.fields: - field.containing_type = self - self.fields_by_number = dict((f.number, f) for f in fields) - self.fields_by_name = dict((f.name, f) for f in fields) - - self.nested_types = nested_types - self.nested_types_by_name = dict((t.name, t) for t in nested_types) - - self.enum_types = enum_types - for enum_type in self.enum_types: - enum_type.containing_type = self - self.enum_types_by_name = dict((t.name, t) for t in enum_types) - self.enum_values_by_name = dict( - (v.name, v) for t in enum_types for v in t.values) - - self.extensions = extensions - for extension in self.extensions: - extension.extension_scope = self - self.extensions_by_name = dict((f.name, f) for f in extensions) - self.is_extendable = is_extendable - self.extension_ranges = extension_ranges - - self._serialized_start = serialized_start - self._serialized_end = serialized_end - - def CopyToProto(self, proto): - """Copies this to a descriptor_pb2.DescriptorProto. - - Args: - proto: An empty descriptor_pb2.DescriptorProto. - """ - # This function is overriden to give a better doc comment. - super(Descriptor, self).CopyToProto(proto) - - -# TODO(robinson): We should have aggressive checking here, -# for example: -# * If you specify a repeated field, you should not be allowed -# to specify a default value. -# * [Other examples here as needed]. -# -# TODO(robinson): for this and other *Descriptor classes, we -# might also want to lock things down aggressively (e.g., -# prevent clients from setting the attributes). Having -# stronger invariants here in general will reduce the number -# of runtime checks we must do in reflection.py... -class FieldDescriptor(DescriptorBase): - - """Descriptor for a single field in a .proto file. - - A FieldDescriptor instance has the following attriubtes: - - name: (str) Name of this field, exactly as it appears in .proto. - full_name: (str) Name of this field, including containing scope. This is - particularly relevant for extensions. - index: (int) Dense, 0-indexed index giving the order that this - field textually appears within its message in the .proto file. - number: (int) Tag number declared for this field in the .proto file. - - type: (One of the TYPE_* constants below) Declared type. - cpp_type: (One of the CPPTYPE_* constants below) C++ type used to - represent this field. - - label: (One of the LABEL_* constants below) Tells whether this - field is optional, required, or repeated. - has_default_value: (bool) True if this field has a default value defined, - otherwise false. - default_value: (Varies) Default value of this field. Only - meaningful for non-repeated scalar fields. Repeated fields - should always set this to [], and non-repeated composite - fields should always set this to None. - - containing_type: (Descriptor) Descriptor of the protocol message - type that contains this field. Set by the Descriptor constructor - if we're passed into one. - Somewhat confusingly, for extension fields, this is the - descriptor of the EXTENDED message, not the descriptor - of the message containing this field. (See is_extension and - extension_scope below). - message_type: (Descriptor) If a composite field, a descriptor - of the message type contained in this field. Otherwise, this is None. - enum_type: (EnumDescriptor) If this field contains an enum, a - descriptor of that enum. Otherwise, this is None. - - is_extension: True iff this describes an extension field. - extension_scope: (Descriptor) Only meaningful if is_extension is True. - Gives the message that immediately contains this extension field. - Will be None iff we're a top-level (file-level) extension field. - - options: (descriptor_pb2.FieldOptions) Protocol message field options or - None to use default field options. - """ - - # Must be consistent with C++ FieldDescriptor::Type enum in - # descriptor.h. - # - # TODO(robinson): Find a way to eliminate this repetition. - TYPE_DOUBLE = 1 - TYPE_FLOAT = 2 - TYPE_INT64 = 3 - TYPE_UINT64 = 4 - TYPE_INT32 = 5 - TYPE_FIXED64 = 6 - TYPE_FIXED32 = 7 - TYPE_BOOL = 8 - TYPE_STRING = 9 - TYPE_GROUP = 10 - TYPE_MESSAGE = 11 - TYPE_BYTES = 12 - TYPE_UINT32 = 13 - TYPE_ENUM = 14 - TYPE_SFIXED32 = 15 - TYPE_SFIXED64 = 16 - TYPE_SINT32 = 17 - TYPE_SINT64 = 18 - MAX_TYPE = 18 - - # Must be consistent with C++ FieldDescriptor::CppType enum in - # descriptor.h. - # - # TODO(robinson): Find a way to eliminate this repetition. - CPPTYPE_INT32 = 1 - CPPTYPE_INT64 = 2 - CPPTYPE_UINT32 = 3 - CPPTYPE_UINT64 = 4 - CPPTYPE_DOUBLE = 5 - CPPTYPE_FLOAT = 6 - CPPTYPE_BOOL = 7 - CPPTYPE_ENUM = 8 - CPPTYPE_STRING = 9 - CPPTYPE_MESSAGE = 10 - MAX_CPPTYPE = 10 - - # Must be consistent with C++ FieldDescriptor::Label enum in - # descriptor.h. - # - # TODO(robinson): Find a way to eliminate this repetition. - LABEL_OPTIONAL = 1 - LABEL_REQUIRED = 2 - LABEL_REPEATED = 3 - MAX_LABEL = 3 - - def __init__(self, name, full_name, index, number, type, cpp_type, label, - default_value, message_type, enum_type, containing_type, - is_extension, extension_scope, options=None, - has_default_value=True): - """The arguments are as described in the description of FieldDescriptor - attributes above. - - Note that containing_type may be None, and may be set later if necessary - (to deal with circular references between message types, for example). - Likewise for extension_scope. - """ - super(FieldDescriptor, self).__init__(options, 'FieldOptions') - self.name = name - self.full_name = full_name - self.index = index - self.number = number - self.type = type - self.cpp_type = cpp_type - self.label = label - self.has_default_value = has_default_value - self.default_value = default_value - self.containing_type = containing_type - self.message_type = message_type - self.enum_type = enum_type - self.is_extension = is_extension - self.extension_scope = extension_scope - if api_implementation.Type() == 'cpp': - if is_extension: - self._cdescriptor = cpp_message.GetExtensionDescriptor(full_name) - else: - self._cdescriptor = cpp_message.GetFieldDescriptor(full_name) - else: - self._cdescriptor = None - - -class EnumDescriptor(_NestedDescriptorBase): - - """Descriptor for an enum defined in a .proto file. - - An EnumDescriptor instance has the following attributes: - - name: (str) Name of the enum type. - full_name: (str) Full name of the type, including package name - and any enclosing type(s). - - values: (list of EnumValueDescriptors) List of the values - in this enum. - values_by_name: (dict str -> EnumValueDescriptor) Same as |values|, - but indexed by the "name" field of each EnumValueDescriptor. - values_by_number: (dict int -> EnumValueDescriptor) Same as |values|, - but indexed by the "number" field of each EnumValueDescriptor. - containing_type: (Descriptor) Descriptor of the immediate containing - type of this enum, or None if this is an enum defined at the - top level in a .proto file. Set by Descriptor's constructor - if we're passed into one. - file: (FileDescriptor) Reference to file descriptor. - options: (descriptor_pb2.EnumOptions) Enum options message or - None to use default enum options. - """ - - def __init__(self, name, full_name, filename, values, - containing_type=None, options=None, file=None, - serialized_start=None, serialized_end=None): - """Arguments are as described in the attribute description above. - - Note that filename is an obsolete argument, that is not used anymore. - Please use file.name to access this as an attribute. - """ - super(EnumDescriptor, self).__init__( - options, 'EnumOptions', name, full_name, file, - containing_type, serialized_start=serialized_start, - serialized_end=serialized_start) - - self.values = values - for value in self.values: - value.type = self - self.values_by_name = dict((v.name, v) for v in values) - self.values_by_number = dict((v.number, v) for v in values) - - self._serialized_start = serialized_start - self._serialized_end = serialized_end - - def CopyToProto(self, proto): - """Copies this to a descriptor_pb2.EnumDescriptorProto. - - Args: - proto: An empty descriptor_pb2.EnumDescriptorProto. - """ - # This function is overriden to give a better doc comment. - super(EnumDescriptor, self).CopyToProto(proto) - - -class EnumValueDescriptor(DescriptorBase): - - """Descriptor for a single value within an enum. - - name: (str) Name of this value. - index: (int) Dense, 0-indexed index giving the order that this - value appears textually within its enum in the .proto file. - number: (int) Actual number assigned to this enum value. - type: (EnumDescriptor) EnumDescriptor to which this value - belongs. Set by EnumDescriptor's constructor if we're - passed into one. - options: (descriptor_pb2.EnumValueOptions) Enum value options message or - None to use default enum value options options. - """ - - def __init__(self, name, index, number, type=None, options=None): - """Arguments are as described in the attribute description above.""" - super(EnumValueDescriptor, self).__init__(options, 'EnumValueOptions') - self.name = name - self.index = index - self.number = number - self.type = type - - -class ServiceDescriptor(_NestedDescriptorBase): - - """Descriptor for a service. - - name: (str) Name of the service. - full_name: (str) Full name of the service, including package name. - index: (int) 0-indexed index giving the order that this services - definition appears withing the .proto file. - methods: (list of MethodDescriptor) List of methods provided by this - service. - options: (descriptor_pb2.ServiceOptions) Service options message or - None to use default service options. - file: (FileDescriptor) Reference to file info. - """ - - def __init__(self, name, full_name, index, methods, options=None, file=None, - serialized_start=None, serialized_end=None): - super(ServiceDescriptor, self).__init__( - options, 'ServiceOptions', name, full_name, file, - None, serialized_start=serialized_start, - serialized_end=serialized_end) - self.index = index - self.methods = methods - # Set the containing service for each method in this service. - for method in self.methods: - method.containing_service = self - - def FindMethodByName(self, name): - """Searches for the specified method, and returns its descriptor.""" - for method in self.methods: - if name == method.name: - return method - return None - - def CopyToProto(self, proto): - """Copies this to a descriptor_pb2.ServiceDescriptorProto. - - Args: - proto: An empty descriptor_pb2.ServiceDescriptorProto. - """ - # This function is overriden to give a better doc comment. - super(ServiceDescriptor, self).CopyToProto(proto) - - -class MethodDescriptor(DescriptorBase): - - """Descriptor for a method in a service. - - name: (str) Name of the method within the service. - full_name: (str) Full name of method. - index: (int) 0-indexed index of the method inside the service. - containing_service: (ServiceDescriptor) The service that contains this - method. - input_type: The descriptor of the message that this method accepts. - output_type: The descriptor of the message that this method returns. - options: (descriptor_pb2.MethodOptions) Method options message or - None to use default method options. - """ - - def __init__(self, name, full_name, index, containing_service, - input_type, output_type, options=None): - """The arguments are as described in the description of MethodDescriptor - attributes above. - - Note that containing_service may be None, and may be set later if necessary. - """ - super(MethodDescriptor, self).__init__(options, 'MethodOptions') - self.name = name - self.full_name = full_name - self.index = index - self.containing_service = containing_service - self.input_type = input_type - self.output_type = output_type - - -class FileDescriptor(DescriptorBase): - """Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto. - - name: name of file, relative to root of source tree. - package: name of the package - serialized_pb: (str) Byte string of serialized - descriptor_pb2.FileDescriptorProto. - """ - - def __init__(self, name, package, options=None, serialized_pb=None): - """Constructor.""" - super(FileDescriptor, self).__init__(options, 'FileOptions') - - self.message_types_by_name = {} - self.name = name - self.package = package - self.serialized_pb = serialized_pb - if (api_implementation.Type() == 'cpp' and - self.serialized_pb is not None): - cpp_message.BuildFile(self.serialized_pb) - - def CopyToProto(self, proto): - """Copies this to a descriptor_pb2.FileDescriptorProto. - - Args: - proto: An empty descriptor_pb2.FileDescriptorProto. - """ - proto.ParseFromString(self.serialized_pb) - - -def _ParseOptions(message, string): - """Parses serialized options. - - This helper function is used to parse serialized options in generated - proto2 files. It must not be used outside proto2. - """ - message.ParseFromString(string) - return message diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/__init__.py deleted file mode 100755 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/api_implementation.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/api_implementation.py deleted file mode 100755 index b3e412e2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/api_implementation.py +++ /dev/null @@ -1,64 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -""" -This module is the central entity that determines which implementation of the -API is used. -""" - -__author__ = 'petar@google.com (Petar Petrov)' - -import os -# This environment variable can be used to switch to a certain implementation -# of the Python API. Right now only 'python' and 'cpp' are valid values. Any -# other value will be ignored. -_implementation_type = os.getenv('PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION', - 'python') - - -if _implementation_type != 'python': - # For now, by default use the pure-Python implementation. - # The code below checks if the C extension is available and - # uses it if it is available. - _implementation_type = 'cpp' - ## Determine automatically which implementation to use. - #try: - # from google.protobuf.internal import cpp_message - # _implementation_type = 'cpp' - #except ImportError, e: - # _implementation_type = 'python' - - -# Usage of this function is discouraged. Clients shouldn't care which -# implementation of the API is in use. Note that there is no guarantee -# that differences between APIs will be maintained. -# Please don't use this function if possible. -def Type(): - return _implementation_type diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/containers.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/containers.py deleted file mode 100755 index 097a3c26..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/containers.py +++ /dev/null @@ -1,259 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Contains container classes to represent different protocol buffer types. - -This file defines container classes which represent categories of protocol -buffer field types which need extra maintenance. Currently these categories -are: - - Repeated scalar fields - These are all repeated fields which aren't - composite (e.g. they are of simple types like int32, string, etc). - - Repeated composite fields - Repeated fields which are composite. This - includes groups and nested messages. -""" - -__author__ = 'petar@google.com (Petar Petrov)' - - -class BaseContainer(object): - - """Base container class.""" - - # Minimizes memory usage and disallows assignment to other attributes. - __slots__ = ['_message_listener', '_values'] - - def __init__(self, message_listener): - """ - Args: - message_listener: A MessageListener implementation. - The RepeatedScalarFieldContainer will call this object's - Modified() method when it is modified. - """ - self._message_listener = message_listener - self._values = [] - - def __getitem__(self, key): - """Retrieves item by the specified key.""" - return self._values[key] - - def __len__(self): - """Returns the number of elements in the container.""" - return len(self._values) - - def __ne__(self, other): - """Checks if another instance isn't equal to this one.""" - # The concrete classes should define __eq__. - return not self == other - - def __hash__(self): - raise TypeError('unhashable object') - - def __repr__(self): - return repr(self._values) - - def sort(self, sort_function=cmp): - self._values.sort(sort_function) - - -class RepeatedScalarFieldContainer(BaseContainer): - - """Simple, type-checked, list-like container for holding repeated scalars.""" - - # Disallows assignment to other attributes. - __slots__ = ['_type_checker'] - - def __init__(self, message_listener, type_checker): - """ - Args: - message_listener: A MessageListener implementation. - The RepeatedScalarFieldContainer will call this object's - Modified() method when it is modified. - type_checker: A type_checkers.ValueChecker instance to run on elements - inserted into this container. - """ - super(RepeatedScalarFieldContainer, self).__init__(message_listener) - self._type_checker = type_checker - - def append(self, value): - """Appends an item to the list. Similar to list.append().""" - self._type_checker.CheckValue(value) - self._values.append(value) - if not self._message_listener.dirty: - self._message_listener.Modified() - - def insert(self, key, value): - """Inserts the item at the specified position. Similar to list.insert().""" - self._type_checker.CheckValue(value) - self._values.insert(key, value) - if not self._message_listener.dirty: - self._message_listener.Modified() - - def extend(self, elem_seq): - """Extends by appending the given sequence. Similar to list.extend().""" - if not elem_seq: - return - - new_values = [] - for elem in elem_seq: - self._type_checker.CheckValue(elem) - new_values.append(elem) - self._values.extend(new_values) - self._message_listener.Modified() - - def MergeFrom(self, other): - """Appends the contents of another repeated field of the same type to this - one. We do not check the types of the individual fields. - """ - self._values.extend(other._values) - self._message_listener.Modified() - - def remove(self, elem): - """Removes an item from the list. Similar to list.remove().""" - self._values.remove(elem) - self._message_listener.Modified() - - def __setitem__(self, key, value): - """Sets the item on the specified position.""" - self._type_checker.CheckValue(value) - self._values[key] = value - self._message_listener.Modified() - - def __getslice__(self, start, stop): - """Retrieves the subset of items from between the specified indices.""" - return self._values[start:stop] - - def __setslice__(self, start, stop, values): - """Sets the subset of items from between the specified indices.""" - new_values = [] - for value in values: - self._type_checker.CheckValue(value) - new_values.append(value) - self._values[start:stop] = new_values - self._message_listener.Modified() - - def __delitem__(self, key): - """Deletes the item at the specified position.""" - del self._values[key] - self._message_listener.Modified() - - def __delslice__(self, start, stop): - """Deletes the subset of items from between the specified indices.""" - del self._values[start:stop] - self._message_listener.Modified() - - def __eq__(self, other): - """Compares the current instance with another one.""" - if self is other: - return True - # Special case for the same type which should be common and fast. - if isinstance(other, self.__class__): - return other._values == self._values - # We are presumably comparing against some other sequence type. - return other == self._values - - -class RepeatedCompositeFieldContainer(BaseContainer): - - """Simple, list-like container for holding repeated composite fields.""" - - # Disallows assignment to other attributes. - __slots__ = ['_message_descriptor'] - - def __init__(self, message_listener, message_descriptor): - """ - Note that we pass in a descriptor instead of the generated directly, - since at the time we construct a _RepeatedCompositeFieldContainer we - haven't yet necessarily initialized the type that will be contained in the - container. - - Args: - message_listener: A MessageListener implementation. - The RepeatedCompositeFieldContainer will call this object's - Modified() method when it is modified. - message_descriptor: A Descriptor instance describing the protocol type - that should be present in this container. We'll use the - _concrete_class field of this descriptor when the client calls add(). - """ - super(RepeatedCompositeFieldContainer, self).__init__(message_listener) - self._message_descriptor = message_descriptor - - def add(self, **kwargs): - """Adds a new element at the end of the list and returns it. Keyword - arguments may be used to initialize the element. - """ - new_element = self._message_descriptor._concrete_class(**kwargs) - new_element._SetListener(self._message_listener) - self._values.append(new_element) - if not self._message_listener.dirty: - self._message_listener.Modified() - return new_element - - def extend(self, elem_seq): - """Extends by appending the given sequence of elements of the same type - as this one, copying each individual message. - """ - message_class = self._message_descriptor._concrete_class - listener = self._message_listener - values = self._values - for message in elem_seq: - new_element = message_class() - new_element._SetListener(listener) - new_element.MergeFrom(message) - values.append(new_element) - listener.Modified() - - def MergeFrom(self, other): - """Appends the contents of another repeated field of the same type to this - one, copying each individual message. - """ - self.extend(other._values) - - def __getslice__(self, start, stop): - """Retrieves the subset of items from between the specified indices.""" - return self._values[start:stop] - - def __delitem__(self, key): - """Deletes the item at the specified position.""" - del self._values[key] - self._message_listener.Modified() - - def __delslice__(self, start, stop): - """Deletes the subset of items from between the specified indices.""" - del self._values[start:stop] - self._message_listener.Modified() - - def __eq__(self, other): - """Compares the current instance with another one.""" - if self is other: - return True - if not isinstance(other, self.__class__): - raise TypeError('Can only compare repeated composite fields against ' - 'other repeated composite fields.') - return self._values == other._values diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/cpp_message.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/cpp_message.py deleted file mode 100755 index 3f426502..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/cpp_message.py +++ /dev/null @@ -1,616 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Contains helper functions used to create protocol message classes from -Descriptor objects at runtime backed by the protocol buffer C++ API. -""" - -__author__ = 'petar@google.com (Petar Petrov)' - -import operator -from google.protobuf.internal import _net_proto2___python -from google.protobuf import message - - -_LABEL_REPEATED = _net_proto2___python.LABEL_REPEATED -_LABEL_OPTIONAL = _net_proto2___python.LABEL_OPTIONAL -_CPPTYPE_MESSAGE = _net_proto2___python.CPPTYPE_MESSAGE -_TYPE_MESSAGE = _net_proto2___python.TYPE_MESSAGE - - -def GetDescriptorPool(): - """Creates a new DescriptorPool C++ object.""" - return _net_proto2___python.NewCDescriptorPool() - - -_pool = GetDescriptorPool() - - -def GetFieldDescriptor(full_field_name): - """Searches for a field descriptor given a full field name.""" - return _pool.FindFieldByName(full_field_name) - - -def BuildFile(content): - """Registers a new proto file in the underlying C++ descriptor pool.""" - _net_proto2___python.BuildFile(content) - - -def GetExtensionDescriptor(full_extension_name): - """Searches for extension descriptor given a full field name.""" - return _pool.FindExtensionByName(full_extension_name) - - -def NewCMessage(full_message_name): - """Creates a new C++ protocol message by its name.""" - return _net_proto2___python.NewCMessage(full_message_name) - - -def ScalarProperty(cdescriptor): - """Returns a scalar property for the given descriptor.""" - - def Getter(self): - return self._cmsg.GetScalar(cdescriptor) - - def Setter(self, value): - self._cmsg.SetScalar(cdescriptor, value) - - return property(Getter, Setter) - - -def CompositeProperty(cdescriptor, message_type): - """Returns a Python property the given composite field.""" - - def Getter(self): - sub_message = self._composite_fields.get(cdescriptor.name, None) - if sub_message is None: - cmessage = self._cmsg.NewSubMessage(cdescriptor) - sub_message = message_type._concrete_class(__cmessage=cmessage) - self._composite_fields[cdescriptor.name] = sub_message - return sub_message - - return property(Getter) - - -class RepeatedScalarContainer(object): - """Container for repeated scalar fields.""" - - __slots__ = ['_message', '_cfield_descriptor', '_cmsg'] - - def __init__(self, msg, cfield_descriptor): - self._message = msg - self._cmsg = msg._cmsg - self._cfield_descriptor = cfield_descriptor - - def append(self, value): - self._cmsg.AddRepeatedScalar( - self._cfield_descriptor, value) - - def extend(self, sequence): - for element in sequence: - self.append(element) - - def insert(self, key, value): - values = self[slice(None, None, None)] - values.insert(key, value) - self._cmsg.AssignRepeatedScalar(self._cfield_descriptor, values) - - def remove(self, value): - values = self[slice(None, None, None)] - values.remove(value) - self._cmsg.AssignRepeatedScalar(self._cfield_descriptor, values) - - def __setitem__(self, key, value): - values = self[slice(None, None, None)] - values[key] = value - self._cmsg.AssignRepeatedScalar(self._cfield_descriptor, values) - - def __getitem__(self, key): - return self._cmsg.GetRepeatedScalar(self._cfield_descriptor, key) - - def __delitem__(self, key): - self._cmsg.DeleteRepeatedField(self._cfield_descriptor, key) - - def __len__(self): - return len(self[slice(None, None, None)]) - - def __eq__(self, other): - if self is other: - return True - if not operator.isSequenceType(other): - raise TypeError( - 'Can only compare repeated scalar fields against sequences.') - # We are presumably comparing against some other sequence type. - return other == self[slice(None, None, None)] - - def __ne__(self, other): - return not self == other - - def __hash__(self): - raise TypeError('unhashable object') - - def sort(self, sort_function=cmp): - values = self[slice(None, None, None)] - values.sort(sort_function) - self._cmsg.AssignRepeatedScalar(self._cfield_descriptor, values) - - -def RepeatedScalarProperty(cdescriptor): - """Returns a Python property the given repeated scalar field.""" - - def Getter(self): - container = self._composite_fields.get(cdescriptor.name, None) - if container is None: - container = RepeatedScalarContainer(self, cdescriptor) - self._composite_fields[cdescriptor.name] = container - return container - - def Setter(self, new_value): - raise AttributeError('Assignment not allowed to repeated field ' - '"%s" in protocol message object.' % cdescriptor.name) - - doc = 'Magic attribute generated for "%s" proto field.' % cdescriptor.name - return property(Getter, Setter, doc=doc) - - -class RepeatedCompositeContainer(object): - """Container for repeated composite fields.""" - - __slots__ = ['_message', '_subclass', '_cfield_descriptor', '_cmsg'] - - def __init__(self, msg, cfield_descriptor, subclass): - self._message = msg - self._cmsg = msg._cmsg - self._subclass = subclass - self._cfield_descriptor = cfield_descriptor - - def add(self, **kwargs): - cmessage = self._cmsg.AddMessage(self._cfield_descriptor) - return self._subclass(__cmessage=cmessage, __owner=self._message, **kwargs) - - def extend(self, elem_seq): - """Extends by appending the given sequence of elements of the same type - as this one, copying each individual message. - """ - for message in elem_seq: - self.add().MergeFrom(message) - - def MergeFrom(self, other): - for message in other[:]: - self.add().MergeFrom(message) - - def __getitem__(self, key): - cmessages = self._cmsg.GetRepeatedMessage( - self._cfield_descriptor, key) - subclass = self._subclass - if not isinstance(cmessages, list): - return subclass(__cmessage=cmessages, __owner=self._message) - - return [subclass(__cmessage=m, __owner=self._message) for m in cmessages] - - def __delitem__(self, key): - self._cmsg.DeleteRepeatedField( - self._cfield_descriptor, key) - - def __len__(self): - return self._cmsg.FieldLength(self._cfield_descriptor) - - def __eq__(self, other): - """Compares the current instance with another one.""" - if self is other: - return True - if not isinstance(other, self.__class__): - raise TypeError('Can only compare repeated composite fields against ' - 'other repeated composite fields.') - messages = self[slice(None, None, None)] - other_messages = other[slice(None, None, None)] - return messages == other_messages - - def __hash__(self): - raise TypeError('unhashable object') - - def sort(self, sort_function=cmp): - messages = [] - for index in range(len(self)): - # messages[i][0] is where the i-th element of the new array has to come - # from. - # messages[i][1] is where the i-th element of the old array has to go. - messages.append([index, 0, self[index]]) - messages.sort(lambda x,y: sort_function(x[2], y[2])) - - # Remember which position each elements has to move to. - for i in range(len(messages)): - messages[messages[i][0]][1] = i - - # Apply the transposition. - for i in range(len(messages)): - from_position = messages[i][0] - if i == from_position: - continue - self._cmsg.SwapRepeatedFieldElements( - self._cfield_descriptor, i, from_position) - messages[messages[i][1]][0] = from_position - - -def RepeatedCompositeProperty(cdescriptor, message_type): - """Returns a Python property for the given repeated composite field.""" - - def Getter(self): - container = self._composite_fields.get(cdescriptor.name, None) - if container is None: - container = RepeatedCompositeContainer( - self, cdescriptor, message_type._concrete_class) - self._composite_fields[cdescriptor.name] = container - return container - - def Setter(self, new_value): - raise AttributeError('Assignment not allowed to repeated field ' - '"%s" in protocol message object.' % cdescriptor.name) - - doc = 'Magic attribute generated for "%s" proto field.' % cdescriptor.name - return property(Getter, Setter, doc=doc) - - -class ExtensionDict(object): - """Extension dictionary added to each protocol message.""" - - def __init__(self, msg): - self._message = msg - self._cmsg = msg._cmsg - self._values = {} - - def __setitem__(self, extension, value): - from google.protobuf import descriptor - if not isinstance(extension, descriptor.FieldDescriptor): - raise KeyError('Bad extension %r.' % (extension,)) - cdescriptor = extension._cdescriptor - if (cdescriptor.label != _LABEL_OPTIONAL or - cdescriptor.cpp_type == _CPPTYPE_MESSAGE): - raise TypeError('Extension %r is repeated and/or a composite type.' % ( - extension.full_name,)) - self._cmsg.SetScalar(cdescriptor, value) - self._values[extension] = value - - def __getitem__(self, extension): - from google.protobuf import descriptor - if not isinstance(extension, descriptor.FieldDescriptor): - raise KeyError('Bad extension %r.' % (extension,)) - - cdescriptor = extension._cdescriptor - if (cdescriptor.label != _LABEL_REPEATED and - cdescriptor.cpp_type != _CPPTYPE_MESSAGE): - return self._cmsg.GetScalar(cdescriptor) - - ext = self._values.get(extension, None) - if ext is not None: - return ext - - ext = self._CreateNewHandle(extension) - self._values[extension] = ext - return ext - - def ClearExtension(self, extension): - from google.protobuf import descriptor - if not isinstance(extension, descriptor.FieldDescriptor): - raise KeyError('Bad extension %r.' % (extension,)) - self._cmsg.ClearFieldByDescriptor(extension._cdescriptor) - if extension in self._values: - del self._values[extension] - - def HasExtension(self, extension): - from google.protobuf import descriptor - if not isinstance(extension, descriptor.FieldDescriptor): - raise KeyError('Bad extension %r.' % (extension,)) - return self._cmsg.HasFieldByDescriptor(extension._cdescriptor) - - def _FindExtensionByName(self, name): - """Tries to find a known extension with the specified name. - - Args: - name: Extension full name. - - Returns: - Extension field descriptor. - """ - return self._message._extensions_by_name.get(name, None) - - def _CreateNewHandle(self, extension): - cdescriptor = extension._cdescriptor - if (cdescriptor.label != _LABEL_REPEATED and - cdescriptor.cpp_type == _CPPTYPE_MESSAGE): - cmessage = self._cmsg.NewSubMessage(cdescriptor) - return extension.message_type._concrete_class(__cmessage=cmessage) - - if cdescriptor.label == _LABEL_REPEATED: - if cdescriptor.cpp_type == _CPPTYPE_MESSAGE: - return RepeatedCompositeContainer( - self._message, cdescriptor, extension.message_type._concrete_class) - else: - return RepeatedScalarContainer(self._message, cdescriptor) - # This shouldn't happen! - assert False - return None - - -def NewMessage(message_descriptor, dictionary): - """Creates a new protocol message *class*.""" - _AddClassAttributesForNestedExtensions(message_descriptor, dictionary) - _AddEnumValues(message_descriptor, dictionary) - _AddDescriptors(message_descriptor, dictionary) - - -def InitMessage(message_descriptor, cls): - """Constructs a new message instance (called before instance's __init__).""" - cls._extensions_by_name = {} - _AddInitMethod(message_descriptor, cls) - _AddMessageMethods(message_descriptor, cls) - _AddPropertiesForExtensions(message_descriptor, cls) - - -def _AddDescriptors(message_descriptor, dictionary): - """Sets up a new protocol message class dictionary. - - Args: - message_descriptor: A Descriptor instance describing this message type. - dictionary: Class dictionary to which we'll add a '__slots__' entry. - """ - dictionary['__descriptors'] = {} - for field in message_descriptor.fields: - dictionary['__descriptors'][field.name] = GetFieldDescriptor( - field.full_name) - - dictionary['__slots__'] = list(dictionary['__descriptors'].iterkeys()) + [ - '_cmsg', '_owner', '_composite_fields', 'Extensions'] - - -def _AddEnumValues(message_descriptor, dictionary): - """Sets class-level attributes for all enum fields defined in this message. - - Args: - message_descriptor: Descriptor object for this message type. - dictionary: Class dictionary that should be populated. - """ - for enum_type in message_descriptor.enum_types: - for enum_value in enum_type.values: - dictionary[enum_value.name] = enum_value.number - - -def _AddClassAttributesForNestedExtensions(message_descriptor, dictionary): - """Adds class attributes for the nested extensions.""" - extension_dict = message_descriptor.extensions_by_name - for extension_name, extension_field in extension_dict.iteritems(): - assert extension_name not in dictionary - dictionary[extension_name] = extension_field - - -def _AddInitMethod(message_descriptor, cls): - """Adds an __init__ method to cls.""" - - # Create and attach message field properties to the message class. - # This can be done just once per message class, since property setters and - # getters are passed the message instance. - # This makes message instantiation extremely fast, and at the same time it - # doesn't require the creation of property objects for each message instance, - # which saves a lot of memory. - for field in message_descriptor.fields: - field_cdescriptor = cls.__descriptors[field.name] - if field.label == _LABEL_REPEATED: - if field.cpp_type == _CPPTYPE_MESSAGE: - value = RepeatedCompositeProperty(field_cdescriptor, field.message_type) - else: - value = RepeatedScalarProperty(field_cdescriptor) - elif field.cpp_type == _CPPTYPE_MESSAGE: - value = CompositeProperty(field_cdescriptor, field.message_type) - else: - value = ScalarProperty(field_cdescriptor) - setattr(cls, field.name, value) - - # Attach a constant with the field number. - constant_name = field.name.upper() + '_FIELD_NUMBER' - setattr(cls, constant_name, field.number) - - def Init(self, **kwargs): - """Message constructor.""" - cmessage = kwargs.pop('__cmessage', None) - if cmessage is None: - self._cmsg = NewCMessage(message_descriptor.full_name) - else: - self._cmsg = cmessage - - # Keep a reference to the owner, as the owner keeps a reference to the - # underlying protocol buffer message. - owner = kwargs.pop('__owner', None) - if owner is not None: - self._owner = owner - - self.Extensions = ExtensionDict(self) - self._composite_fields = {} - - for field_name, field_value in kwargs.iteritems(): - field_cdescriptor = self.__descriptors.get(field_name, None) - if field_cdescriptor is None: - raise ValueError('Protocol message has no "%s" field.' % field_name) - if field_cdescriptor.label == _LABEL_REPEATED: - if field_cdescriptor.cpp_type == _CPPTYPE_MESSAGE: - for val in field_value: - getattr(self, field_name).add().MergeFrom(val) - else: - getattr(self, field_name).extend(field_value) - elif field_cdescriptor.cpp_type == _CPPTYPE_MESSAGE: - getattr(self, field_name).MergeFrom(field_value) - else: - setattr(self, field_name, field_value) - - Init.__module__ = None - Init.__doc__ = None - cls.__init__ = Init - - -def _IsMessageSetExtension(field): - """Checks if a field is a message set extension.""" - return (field.is_extension and - field.containing_type.has_options and - field.containing_type.GetOptions().message_set_wire_format and - field.type == _TYPE_MESSAGE and - field.message_type == field.extension_scope and - field.label == _LABEL_OPTIONAL) - - -def _AddMessageMethods(message_descriptor, cls): - """Adds the methods to a protocol message class.""" - if message_descriptor.is_extendable: - - def ClearExtension(self, extension): - self.Extensions.ClearExtension(extension) - - def HasExtension(self, extension): - return self.Extensions.HasExtension(extension) - - def HasField(self, field_name): - return self._cmsg.HasField(field_name) - - def ClearField(self, field_name): - if field_name in self._composite_fields: - del self._composite_fields[field_name] - self._cmsg.ClearField(field_name) - - def Clear(self): - return self._cmsg.Clear() - - def IsInitialized(self, errors=None): - if self._cmsg.IsInitialized(): - return True - if errors is not None: - errors.extend(self.FindInitializationErrors()); - return False - - def SerializeToString(self): - if not self.IsInitialized(): - raise message.EncodeError( - 'Message is missing required fields: ' + - ','.join(self.FindInitializationErrors())) - return self._cmsg.SerializeToString() - - def SerializePartialToString(self): - return self._cmsg.SerializePartialToString() - - def ParseFromString(self, serialized): - self.Clear() - self.MergeFromString(serialized) - - def MergeFromString(self, serialized): - byte_size = self._cmsg.MergeFromString(serialized) - if byte_size < 0: - raise message.DecodeError('Unable to merge from string.') - return byte_size - - def MergeFrom(self, msg): - if not isinstance(msg, cls): - raise TypeError( - "Parameter to MergeFrom() must be instance of same class.") - self._cmsg.MergeFrom(msg._cmsg) - - def CopyFrom(self, msg): - self._cmsg.CopyFrom(msg._cmsg) - - def ByteSize(self): - return self._cmsg.ByteSize() - - def SetInParent(self): - return self._cmsg.SetInParent() - - def ListFields(self): - all_fields = [] - field_list = self._cmsg.ListFields() - fields_by_name = cls.DESCRIPTOR.fields_by_name - for is_extension, field_name in field_list: - if is_extension: - extension = cls._extensions_by_name[field_name] - all_fields.append((extension, self.Extensions[extension])) - else: - field_descriptor = fields_by_name[field_name] - all_fields.append( - (field_descriptor, getattr(self, field_name))) - all_fields.sort(key=lambda item: item[0].number) - return all_fields - - def FindInitializationErrors(self): - return self._cmsg.FindInitializationErrors() - - def __str__(self): - return self._cmsg.DebugString() - - def __eq__(self, other): - if self is other: - return True - if not isinstance(other, self.__class__): - return False - return self.ListFields() == other.ListFields() - - def __ne__(self, other): - return not self == other - - def __hash__(self): - raise TypeError('unhashable object') - - def __unicode__(self): - return text_format.MessageToString(self, as_utf8=True).decode('utf-8') - - # Attach the local methods to the message class. - for key, value in locals().copy().iteritems(): - if key not in ('key', 'value', '__builtins__', '__name__', '__doc__'): - setattr(cls, key, value) - - # Static methods: - - def RegisterExtension(extension_handle): - extension_handle.containing_type = cls.DESCRIPTOR - cls._extensions_by_name[extension_handle.full_name] = extension_handle - - if _IsMessageSetExtension(extension_handle): - # MessageSet extension. Also register under type name. - cls._extensions_by_name[ - extension_handle.message_type.full_name] = extension_handle - cls.RegisterExtension = staticmethod(RegisterExtension) - - def FromString(string): - msg = cls() - msg.MergeFromString(string) - return msg - cls.FromString = staticmethod(FromString) - - - -def _AddPropertiesForExtensions(message_descriptor, cls): - """Adds properties for all fields in this protocol message type.""" - extension_dict = message_descriptor.extensions_by_name - for extension_name, extension_field in extension_dict.iteritems(): - constant_name = extension_name.upper() + '_FIELD_NUMBER' - setattr(cls, constant_name, extension_field.number) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py deleted file mode 100755 index 55f746f5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/decoder.py +++ /dev/null @@ -1,714 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Code for decoding protocol buffer primitives. - -This code is very similar to encoder.py -- read the docs for that module first. - -A "decoder" is a function with the signature: - Decode(buffer, pos, end, message, field_dict) -The arguments are: - buffer: The string containing the encoded message. - pos: The current position in the string. - end: The position in the string where the current message ends. May be - less than len(buffer) if we're reading a sub-message. - message: The message object into which we're parsing. - field_dict: message._fields (avoids a hashtable lookup). -The decoder reads the field and stores it into field_dict, returning the new -buffer position. A decoder for a repeated field may proactively decode all of -the elements of that field, if they appear consecutively. - -Note that decoders may throw any of the following: - IndexError: Indicates a truncated message. - struct.error: Unpacking of a fixed-width field failed. - message.DecodeError: Other errors. - -Decoders are expected to raise an exception if they are called with pos > end. -This allows callers to be lax about bounds checking: it's fineto read past -"end" as long as you are sure that someone else will notice and throw an -exception later on. - -Something up the call stack is expected to catch IndexError and struct.error -and convert them to message.DecodeError. - -Decoders are constructed using decoder constructors with the signature: - MakeDecoder(field_number, is_repeated, is_packed, key, new_default) -The arguments are: - field_number: The field number of the field we want to decode. - is_repeated: Is the field a repeated field? (bool) - is_packed: Is the field a packed field? (bool) - key: The key to use when looking up the field within field_dict. - (This is actually the FieldDescriptor but nothing in this - file should depend on that.) - new_default: A function which takes a message object as a parameter and - returns a new instance of the default value for this field. - (This is called for repeated fields and sub-messages, when an - instance does not already exist.) - -As with encoders, we define a decoder constructor for every type of field. -Then, for every field of every message class we construct an actual decoder. -That decoder goes into a dict indexed by tag, so when we decode a message -we repeatedly read a tag, look up the corresponding decoder, and invoke it. -""" - -__author__ = 'kenton@google.com (Kenton Varda)' - -import struct -from google.protobuf.internal import encoder -from google.protobuf.internal import wire_format -from google.protobuf import message - - -# This will overflow and thus become IEEE-754 "infinity". We would use -# "float('inf')" but it doesn't work on Windows pre-Python-2.6. -_POS_INF = 1e10000 -_NEG_INF = -_POS_INF -_NAN = _POS_INF * 0 - - -# This is not for optimization, but rather to avoid conflicts with local -# variables named "message". -_DecodeError = message.DecodeError - - -def _VarintDecoder(mask): - """Return an encoder for a basic varint value (does not include tag). - - Decoded values will be bitwise-anded with the given mask before being - returned, e.g. to limit them to 32 bits. The returned decoder does not - take the usual "end" parameter -- the caller is expected to do bounds checking - after the fact (often the caller can defer such checking until later). The - decoder returns a (value, new_pos) pair. - """ - - local_ord = ord - def DecodeVarint(buffer, pos): - result = 0 - shift = 0 - while 1: - b = local_ord(buffer[pos]) - result |= ((b & 0x7f) << shift) - pos += 1 - if not (b & 0x80): - result &= mask - return (result, pos) - shift += 7 - if shift >= 64: - raise _DecodeError('Too many bytes when decoding varint.') - return DecodeVarint - - -def _SignedVarintDecoder(mask): - """Like _VarintDecoder() but decodes signed values.""" - - local_ord = ord - def DecodeVarint(buffer, pos): - result = 0 - shift = 0 - while 1: - b = local_ord(buffer[pos]) - result |= ((b & 0x7f) << shift) - pos += 1 - if not (b & 0x80): - if result > 0x7fffffffffffffff: - result -= (1 << 64) - result |= ~mask - else: - result &= mask - return (result, pos) - shift += 7 - if shift >= 64: - raise _DecodeError('Too many bytes when decoding varint.') - return DecodeVarint - - -_DecodeVarint = _VarintDecoder((1 << 64) - 1) -_DecodeSignedVarint = _SignedVarintDecoder((1 << 64) - 1) - -# Use these versions for values which must be limited to 32 bits. -_DecodeVarint32 = _VarintDecoder((1 << 32) - 1) -_DecodeSignedVarint32 = _SignedVarintDecoder((1 << 32) - 1) - - -def ReadTag(buffer, pos): - """Read a tag from the buffer, and return a (tag_bytes, new_pos) tuple. - - We return the raw bytes of the tag rather than decoding them. The raw - bytes can then be used to look up the proper decoder. This effectively allows - us to trade some work that would be done in pure-python (decoding a varint) - for work that is done in C (searching for a byte string in a hash table). - In a low-level language it would be much cheaper to decode the varint and - use that, but not in Python. - """ - - start = pos - while ord(buffer[pos]) & 0x80: - pos += 1 - pos += 1 - return (buffer[start:pos], pos) - - -# -------------------------------------------------------------------- - - -def _SimpleDecoder(wire_type, decode_value): - """Return a constructor for a decoder for fields of a particular type. - - Args: - wire_type: The field's wire type. - decode_value: A function which decodes an individual value, e.g. - _DecodeVarint() - """ - - def SpecificDecoder(field_number, is_repeated, is_packed, key, new_default): - if is_packed: - local_DecodeVarint = _DecodeVarint - def DecodePackedField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - (endpoint, pos) = local_DecodeVarint(buffer, pos) - endpoint += pos - if endpoint > end: - raise _DecodeError('Truncated message.') - while pos < endpoint: - (element, pos) = decode_value(buffer, pos) - value.append(element) - if pos > endpoint: - del value[-1] # Discard corrupt value. - raise _DecodeError('Packed element was truncated.') - return pos - return DecodePackedField - elif is_repeated: - tag_bytes = encoder.TagBytes(field_number, wire_type) - tag_len = len(tag_bytes) - def DecodeRepeatedField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - while 1: - (element, new_pos) = decode_value(buffer, pos) - value.append(element) - # Predict that the next tag is another copy of the same repeated - # field. - pos = new_pos + tag_len - if buffer[new_pos:pos] != tag_bytes or new_pos >= end: - # Prediction failed. Return. - if new_pos > end: - raise _DecodeError('Truncated message.') - return new_pos - return DecodeRepeatedField - else: - def DecodeField(buffer, pos, end, message, field_dict): - (field_dict[key], pos) = decode_value(buffer, pos) - if pos > end: - del field_dict[key] # Discard corrupt value. - raise _DecodeError('Truncated message.') - return pos - return DecodeField - - return SpecificDecoder - - -def _ModifiedDecoder(wire_type, decode_value, modify_value): - """Like SimpleDecoder but additionally invokes modify_value on every value - before storing it. Usually modify_value is ZigZagDecode. - """ - - # Reusing _SimpleDecoder is slightly slower than copying a bunch of code, but - # not enough to make a significant difference. - - def InnerDecode(buffer, pos): - (result, new_pos) = decode_value(buffer, pos) - return (modify_value(result), new_pos) - return _SimpleDecoder(wire_type, InnerDecode) - - -def _StructPackDecoder(wire_type, format): - """Return a constructor for a decoder for a fixed-width field. - - Args: - wire_type: The field's wire type. - format: The format string to pass to struct.unpack(). - """ - - value_size = struct.calcsize(format) - local_unpack = struct.unpack - - # Reusing _SimpleDecoder is slightly slower than copying a bunch of code, but - # not enough to make a significant difference. - - # Note that we expect someone up-stack to catch struct.error and convert - # it to _DecodeError -- this way we don't have to set up exception- - # handling blocks every time we parse one value. - - def InnerDecode(buffer, pos): - new_pos = pos + value_size - result = local_unpack(format, buffer[pos:new_pos])[0] - return (result, new_pos) - return _SimpleDecoder(wire_type, InnerDecode) - - -def _FloatDecoder(): - """Returns a decoder for a float field. - - This code works around a bug in struct.unpack for non-finite 32-bit - floating-point values. - """ - - local_unpack = struct.unpack - - def InnerDecode(buffer, pos): - # We expect a 32-bit value in little-endian byte order. Bit 1 is the sign - # bit, bits 2-9 represent the exponent, and bits 10-32 are the significand. - new_pos = pos + 4 - float_bytes = buffer[pos:new_pos] - - # If this value has all its exponent bits set, then it's non-finite. - # In Python 2.4, struct.unpack will convert it to a finite 64-bit value. - # To avoid that, we parse it specially. - if ((float_bytes[3] in '\x7F\xFF') - and (float_bytes[2] >= '\x80')): - # If at least one significand bit is set... - if float_bytes[0:3] != '\x00\x00\x80': - return (_NAN, new_pos) - # If sign bit is set... - if float_bytes[3] == '\xFF': - return (_NEG_INF, new_pos) - return (_POS_INF, new_pos) - - # Note that we expect someone up-stack to catch struct.error and convert - # it to _DecodeError -- this way we don't have to set up exception- - # handling blocks every time we parse one value. - result = local_unpack('= '\xF0') - and (double_bytes[0:7] != '\x00\x00\x00\x00\x00\x00\xF0')): - return (_NAN, new_pos) - - # Note that we expect someone up-stack to catch struct.error and convert - # it to _DecodeError -- this way we don't have to set up exception- - # handling blocks every time we parse one value. - result = local_unpack(' end: - raise _DecodeError('Truncated string.') - value.append(local_unicode(buffer[pos:new_pos], 'utf-8')) - # Predict that the next tag is another copy of the same repeated field. - pos = new_pos + tag_len - if buffer[new_pos:pos] != tag_bytes or new_pos == end: - # Prediction failed. Return. - return new_pos - return DecodeRepeatedField - else: - def DecodeField(buffer, pos, end, message, field_dict): - (size, pos) = local_DecodeVarint(buffer, pos) - new_pos = pos + size - if new_pos > end: - raise _DecodeError('Truncated string.') - field_dict[key] = local_unicode(buffer[pos:new_pos], 'utf-8') - return new_pos - return DecodeField - - -def BytesDecoder(field_number, is_repeated, is_packed, key, new_default): - """Returns a decoder for a bytes field.""" - - local_DecodeVarint = _DecodeVarint - - assert not is_packed - if is_repeated: - tag_bytes = encoder.TagBytes(field_number, - wire_format.WIRETYPE_LENGTH_DELIMITED) - tag_len = len(tag_bytes) - def DecodeRepeatedField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - while 1: - (size, pos) = local_DecodeVarint(buffer, pos) - new_pos = pos + size - if new_pos > end: - raise _DecodeError('Truncated string.') - value.append(buffer[pos:new_pos]) - # Predict that the next tag is another copy of the same repeated field. - pos = new_pos + tag_len - if buffer[new_pos:pos] != tag_bytes or new_pos == end: - # Prediction failed. Return. - return new_pos - return DecodeRepeatedField - else: - def DecodeField(buffer, pos, end, message, field_dict): - (size, pos) = local_DecodeVarint(buffer, pos) - new_pos = pos + size - if new_pos > end: - raise _DecodeError('Truncated string.') - field_dict[key] = buffer[pos:new_pos] - return new_pos - return DecodeField - - -def GroupDecoder(field_number, is_repeated, is_packed, key, new_default): - """Returns a decoder for a group field.""" - - end_tag_bytes = encoder.TagBytes(field_number, - wire_format.WIRETYPE_END_GROUP) - end_tag_len = len(end_tag_bytes) - - assert not is_packed - if is_repeated: - tag_bytes = encoder.TagBytes(field_number, - wire_format.WIRETYPE_START_GROUP) - tag_len = len(tag_bytes) - def DecodeRepeatedField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - while 1: - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - # Read sub-message. - pos = value.add()._InternalParse(buffer, pos, end) - # Read end tag. - new_pos = pos+end_tag_len - if buffer[pos:new_pos] != end_tag_bytes or new_pos > end: - raise _DecodeError('Missing group end tag.') - # Predict that the next tag is another copy of the same repeated field. - pos = new_pos + tag_len - if buffer[new_pos:pos] != tag_bytes or new_pos == end: - # Prediction failed. Return. - return new_pos - return DecodeRepeatedField - else: - def DecodeField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - # Read sub-message. - pos = value._InternalParse(buffer, pos, end) - # Read end tag. - new_pos = pos+end_tag_len - if buffer[pos:new_pos] != end_tag_bytes or new_pos > end: - raise _DecodeError('Missing group end tag.') - return new_pos - return DecodeField - - -def MessageDecoder(field_number, is_repeated, is_packed, key, new_default): - """Returns a decoder for a message field.""" - - local_DecodeVarint = _DecodeVarint - - assert not is_packed - if is_repeated: - tag_bytes = encoder.TagBytes(field_number, - wire_format.WIRETYPE_LENGTH_DELIMITED) - tag_len = len(tag_bytes) - def DecodeRepeatedField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - while 1: - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - # Read length. - (size, pos) = local_DecodeVarint(buffer, pos) - new_pos = pos + size - if new_pos > end: - raise _DecodeError('Truncated message.') - # Read sub-message. - if value.add()._InternalParse(buffer, pos, new_pos) != new_pos: - # The only reason _InternalParse would return early is if it - # encountered an end-group tag. - raise _DecodeError('Unexpected end-group tag.') - # Predict that the next tag is another copy of the same repeated field. - pos = new_pos + tag_len - if buffer[new_pos:pos] != tag_bytes or new_pos == end: - # Prediction failed. Return. - return new_pos - return DecodeRepeatedField - else: - def DecodeField(buffer, pos, end, message, field_dict): - value = field_dict.get(key) - if value is None: - value = field_dict.setdefault(key, new_default(message)) - # Read length. - (size, pos) = local_DecodeVarint(buffer, pos) - new_pos = pos + size - if new_pos > end: - raise _DecodeError('Truncated message.') - # Read sub-message. - if value._InternalParse(buffer, pos, new_pos) != new_pos: - # The only reason _InternalParse would return early is if it encountered - # an end-group tag. - raise _DecodeError('Unexpected end-group tag.') - return new_pos - return DecodeField - - -# -------------------------------------------------------------------- - -MESSAGE_SET_ITEM_TAG = encoder.TagBytes(1, wire_format.WIRETYPE_START_GROUP) - -def MessageSetItemDecoder(extensions_by_number): - """Returns a decoder for a MessageSet item. - - The parameter is the _extensions_by_number map for the message class. - - The message set message looks like this: - message MessageSet { - repeated group Item = 1 { - required int32 type_id = 2; - required string message = 3; - } - } - """ - - type_id_tag_bytes = encoder.TagBytes(2, wire_format.WIRETYPE_VARINT) - message_tag_bytes = encoder.TagBytes(3, wire_format.WIRETYPE_LENGTH_DELIMITED) - item_end_tag_bytes = encoder.TagBytes(1, wire_format.WIRETYPE_END_GROUP) - - local_ReadTag = ReadTag - local_DecodeVarint = _DecodeVarint - local_SkipField = SkipField - - def DecodeItem(buffer, pos, end, message, field_dict): - type_id = -1 - message_start = -1 - message_end = -1 - - # Technically, type_id and message can appear in any order, so we need - # a little loop here. - while 1: - (tag_bytes, pos) = local_ReadTag(buffer, pos) - if tag_bytes == type_id_tag_bytes: - (type_id, pos) = local_DecodeVarint(buffer, pos) - elif tag_bytes == message_tag_bytes: - (size, message_start) = local_DecodeVarint(buffer, pos) - pos = message_end = message_start + size - elif tag_bytes == item_end_tag_bytes: - break - else: - pos = SkipField(buffer, pos, end, tag_bytes) - if pos == -1: - raise _DecodeError('Missing group end tag.') - - if pos > end: - raise _DecodeError('Truncated message.') - - if type_id == -1: - raise _DecodeError('MessageSet item missing type_id.') - if message_start == -1: - raise _DecodeError('MessageSet item missing message.') - - extension = extensions_by_number.get(type_id) - if extension is not None: - value = field_dict.get(extension) - if value is None: - value = field_dict.setdefault( - extension, extension.message_type._concrete_class()) - if value._InternalParse(buffer, message_start,message_end) != message_end: - # The only reason _InternalParse would return early is if it encountered - # an end-group tag. - raise _DecodeError('Unexpected end-group tag.') - - return pos - - return DecodeItem - -# -------------------------------------------------------------------- -# Optimization is not as heavy here because calls to SkipField() are rare, -# except for handling end-group tags. - -def _SkipVarint(buffer, pos, end): - """Skip a varint value. Returns the new position.""" - - while ord(buffer[pos]) & 0x80: - pos += 1 - pos += 1 - if pos > end: - raise _DecodeError('Truncated message.') - return pos - -def _SkipFixed64(buffer, pos, end): - """Skip a fixed64 value. Returns the new position.""" - - pos += 8 - if pos > end: - raise _DecodeError('Truncated message.') - return pos - -def _SkipLengthDelimited(buffer, pos, end): - """Skip a length-delimited value. Returns the new position.""" - - (size, pos) = _DecodeVarint(buffer, pos) - pos += size - if pos > end: - raise _DecodeError('Truncated message.') - return pos - -def _SkipGroup(buffer, pos, end): - """Skip sub-group. Returns the new position.""" - - while 1: - (tag_bytes, pos) = ReadTag(buffer, pos) - new_pos = SkipField(buffer, pos, end, tag_bytes) - if new_pos == -1: - return pos - pos = new_pos - -def _EndGroup(buffer, pos, end): - """Skipping an END_GROUP tag returns -1 to tell the parent loop to break.""" - - return -1 - -def _SkipFixed32(buffer, pos, end): - """Skip a fixed32 value. Returns the new position.""" - - pos += 4 - if pos > end: - raise _DecodeError('Truncated message.') - return pos - -def _RaiseInvalidWireType(buffer, pos, end): - """Skip function for unknown wire types. Raises an exception.""" - - raise _DecodeError('Tag had invalid wire type.') - -def _FieldSkipper(): - """Constructs the SkipField function.""" - - WIRETYPE_TO_SKIPPER = [ - _SkipVarint, - _SkipFixed64, - _SkipLengthDelimited, - _SkipGroup, - _EndGroup, - _SkipFixed32, - _RaiseInvalidWireType, - _RaiseInvalidWireType, - ] - - wiretype_mask = wire_format.TAG_TYPE_MASK - local_ord = ord - - def SkipField(buffer, pos, end, tag_bytes): - """Skips a field with the specified tag. - - |pos| should point to the byte immediately after the tag. - - Returns: - The new position (after the tag value), or -1 if the tag is an end-group - tag (in which case the calling loop should break). - """ - - # The wire type is always in the first byte since varints are little-endian. - wire_type = local_ord(tag_bytes[0]) & wiretype_mask - return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end) - - return SkipField - -SkipField = _FieldSkipper() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/descriptor_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/descriptor_test.py deleted file mode 100755 index 05c27452..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/descriptor_test.py +++ /dev/null @@ -1,334 +0,0 @@ -#! /usr/bin/python -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unittest for google.protobuf.internal.descriptor.""" - -__author__ = 'robinson@google.com (Will Robinson)' - -import unittest -from google.protobuf import unittest_import_pb2 -from google.protobuf import unittest_pb2 -from google.protobuf import descriptor_pb2 -from google.protobuf import descriptor -from google.protobuf import text_format - - -TEST_EMPTY_MESSAGE_DESCRIPTOR_ASCII = """ -name: 'TestEmptyMessage' -""" - - -class DescriptorTest(unittest.TestCase): - - def setUp(self): - self.my_file = descriptor.FileDescriptor( - name='some/filename/some.proto', - package='protobuf_unittest' - ) - self.my_enum = descriptor.EnumDescriptor( - name='ForeignEnum', - full_name='protobuf_unittest.ForeignEnum', - filename=None, - file=self.my_file, - values=[ - descriptor.EnumValueDescriptor(name='FOREIGN_FOO', index=0, number=4), - descriptor.EnumValueDescriptor(name='FOREIGN_BAR', index=1, number=5), - descriptor.EnumValueDescriptor(name='FOREIGN_BAZ', index=2, number=6), - ]) - self.my_message = descriptor.Descriptor( - name='NestedMessage', - full_name='protobuf_unittest.TestAllTypes.NestedMessage', - filename=None, - file=self.my_file, - containing_type=None, - fields=[ - descriptor.FieldDescriptor( - name='bb', - full_name='protobuf_unittest.TestAllTypes.NestedMessage.bb', - index=0, number=1, - type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None), - ], - nested_types=[], - enum_types=[ - self.my_enum, - ], - extensions=[]) - self.my_method = descriptor.MethodDescriptor( - name='Bar', - full_name='protobuf_unittest.TestService.Bar', - index=0, - containing_service=None, - input_type=None, - output_type=None) - self.my_service = descriptor.ServiceDescriptor( - name='TestServiceWithOptions', - full_name='protobuf_unittest.TestServiceWithOptions', - file=self.my_file, - index=0, - methods=[ - self.my_method - ]) - - def testEnumFixups(self): - self.assertEqual(self.my_enum, self.my_enum.values[0].type) - - def testContainingTypeFixups(self): - self.assertEqual(self.my_message, self.my_message.fields[0].containing_type) - self.assertEqual(self.my_message, self.my_enum.containing_type) - - def testContainingServiceFixups(self): - self.assertEqual(self.my_service, self.my_method.containing_service) - - def testGetOptions(self): - self.assertEqual(self.my_enum.GetOptions(), - descriptor_pb2.EnumOptions()) - self.assertEqual(self.my_enum.values[0].GetOptions(), - descriptor_pb2.EnumValueOptions()) - self.assertEqual(self.my_message.GetOptions(), - descriptor_pb2.MessageOptions()) - self.assertEqual(self.my_message.fields[0].GetOptions(), - descriptor_pb2.FieldOptions()) - self.assertEqual(self.my_method.GetOptions(), - descriptor_pb2.MethodOptions()) - self.assertEqual(self.my_service.GetOptions(), - descriptor_pb2.ServiceOptions()) - - def testFileDescriptorReferences(self): - self.assertEqual(self.my_enum.file, self.my_file) - self.assertEqual(self.my_message.file, self.my_file) - - def testFileDescriptor(self): - self.assertEqual(self.my_file.name, 'some/filename/some.proto') - self.assertEqual(self.my_file.package, 'protobuf_unittest') - - -class DescriptorCopyToProtoTest(unittest.TestCase): - """Tests for CopyTo functions of Descriptor.""" - - def _AssertProtoEqual(self, actual_proto, expected_class, expected_ascii): - expected_proto = expected_class() - text_format.Merge(expected_ascii, expected_proto) - - self.assertEqual( - actual_proto, expected_proto, - 'Not equal,\nActual:\n%s\nExpected:\n%s\n' - % (str(actual_proto), str(expected_proto))) - - def _InternalTestCopyToProto(self, desc, expected_proto_class, - expected_proto_ascii): - actual = expected_proto_class() - desc.CopyToProto(actual) - self._AssertProtoEqual( - actual, expected_proto_class, expected_proto_ascii) - - def testCopyToProto_EmptyMessage(self): - self._InternalTestCopyToProto( - unittest_pb2.TestEmptyMessage.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_EMPTY_MESSAGE_DESCRIPTOR_ASCII) - - def testCopyToProto_NestedMessage(self): - TEST_NESTED_MESSAGE_ASCII = """ - name: 'NestedMessage' - field: < - name: 'bb' - number: 1 - label: 1 # Optional - type: 5 # TYPE_INT32 - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_NESTED_MESSAGE_ASCII) - - def testCopyToProto_ForeignNestedMessage(self): - TEST_FOREIGN_NESTED_ASCII = """ - name: 'TestForeignNested' - field: < - name: 'foreign_nested' - number: 1 - label: 1 # Optional - type: 11 # TYPE_MESSAGE - type_name: '.protobuf_unittest.TestAllTypes.NestedMessage' - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestForeignNested.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_FOREIGN_NESTED_ASCII) - - def testCopyToProto_ForeignEnum(self): - TEST_FOREIGN_ENUM_ASCII = """ - name: 'ForeignEnum' - value: < - name: 'FOREIGN_FOO' - number: 4 - > - value: < - name: 'FOREIGN_BAR' - number: 5 - > - value: < - name: 'FOREIGN_BAZ' - number: 6 - > - """ - - self._InternalTestCopyToProto( - unittest_pb2._FOREIGNENUM, - descriptor_pb2.EnumDescriptorProto, - TEST_FOREIGN_ENUM_ASCII) - - def testCopyToProto_Options(self): - TEST_DEPRECATED_FIELDS_ASCII = """ - name: 'TestDeprecatedFields' - field: < - name: 'deprecated_int32' - number: 1 - label: 1 # Optional - type: 5 # TYPE_INT32 - options: < - deprecated: true - > - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestDeprecatedFields.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_DEPRECATED_FIELDS_ASCII) - - def testCopyToProto_AllExtensions(self): - TEST_EMPTY_MESSAGE_WITH_EXTENSIONS_ASCII = """ - name: 'TestEmptyMessageWithExtensions' - extension_range: < - start: 1 - end: 536870912 - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestEmptyMessageWithExtensions.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_EMPTY_MESSAGE_WITH_EXTENSIONS_ASCII) - - def testCopyToProto_SeveralExtensions(self): - TEST_MESSAGE_WITH_SEVERAL_EXTENSIONS_ASCII = """ - name: 'TestMultipleExtensionRanges' - extension_range: < - start: 42 - end: 43 - > - extension_range: < - start: 4143 - end: 4244 - > - extension_range: < - start: 65536 - end: 536870912 - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestMultipleExtensionRanges.DESCRIPTOR, - descriptor_pb2.DescriptorProto, - TEST_MESSAGE_WITH_SEVERAL_EXTENSIONS_ASCII) - - def testCopyToProto_FileDescriptor(self): - UNITTEST_IMPORT_FILE_DESCRIPTOR_ASCII = (""" - name: 'google/protobuf/unittest_import.proto' - package: 'protobuf_unittest_import' - message_type: < - name: 'ImportMessage' - field: < - name: 'd' - number: 1 - label: 1 # Optional - type: 5 # TYPE_INT32 - > - > - """ + - """enum_type: < - name: 'ImportEnum' - value: < - name: 'IMPORT_FOO' - number: 7 - > - value: < - name: 'IMPORT_BAR' - number: 8 - > - value: < - name: 'IMPORT_BAZ' - number: 9 - > - > - options: < - java_package: 'com.google.protobuf.test' - optimize_for: 1 # SPEED - > - """) - - self._InternalTestCopyToProto( - unittest_import_pb2.DESCRIPTOR, - descriptor_pb2.FileDescriptorProto, - UNITTEST_IMPORT_FILE_DESCRIPTOR_ASCII) - - def testCopyToProto_ServiceDescriptor(self): - TEST_SERVICE_ASCII = """ - name: 'TestService' - method: < - name: 'Foo' - input_type: '.protobuf_unittest.FooRequest' - output_type: '.protobuf_unittest.FooResponse' - > - method: < - name: 'Bar' - input_type: '.protobuf_unittest.BarRequest' - output_type: '.protobuf_unittest.BarResponse' - > - """ - - self._InternalTestCopyToProto( - unittest_pb2.TestService.DESCRIPTOR, - descriptor_pb2.ServiceDescriptorProto, - TEST_SERVICE_ASCII) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/encoder.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/encoder.py deleted file mode 100755 index 777975e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/encoder.py +++ /dev/null @@ -1,769 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Code for encoding protocol message primitives. - -Contains the logic for encoding every logical protocol field type -into one of the 5 physical wire types. - -This code is designed to push the Python interpreter's performance to the -limits. - -The basic idea is that at startup time, for every field (i.e. every -FieldDescriptor) we construct two functions: a "sizer" and an "encoder". The -sizer takes a value of this field's type and computes its byte size. The -encoder takes a writer function and a value. It encodes the value into byte -strings and invokes the writer function to write those strings. Typically the -writer function is the write() method of a cStringIO. - -We try to do as much work as possible when constructing the writer and the -sizer rather than when calling them. In particular: -* We copy any needed global functions to local variables, so that we do not need - to do costly global table lookups at runtime. -* Similarly, we try to do any attribute lookups at startup time if possible. -* Every field's tag is encoded to bytes at startup, since it can't change at - runtime. -* Whatever component of the field size we can compute at startup, we do. -* We *avoid* sharing code if doing so would make the code slower and not sharing - does not burden us too much. For example, encoders for repeated fields do - not just call the encoders for singular fields in a loop because this would - add an extra function call overhead for every loop iteration; instead, we - manually inline the single-value encoder into the loop. -* If a Python function lacks a return statement, Python actually generates - instructions to pop the result of the last statement off the stack, push - None onto the stack, and then return that. If we really don't care what - value is returned, then we can save two instructions by returning the - result of the last statement. It looks funny but it helps. -* We assume that type and bounds checking has happened at a higher level. -""" - -__author__ = 'kenton@google.com (Kenton Varda)' - -import struct -from google.protobuf.internal import wire_format - - -# This will overflow and thus become IEEE-754 "infinity". We would use -# "float('inf')" but it doesn't work on Windows pre-Python-2.6. -_POS_INF = 1e10000 -_NEG_INF = -_POS_INF - - -def _VarintSize(value): - """Compute the size of a varint value.""" - if value <= 0x7f: return 1 - if value <= 0x3fff: return 2 - if value <= 0x1fffff: return 3 - if value <= 0xfffffff: return 4 - if value <= 0x7ffffffff: return 5 - if value <= 0x3ffffffffff: return 6 - if value <= 0x1ffffffffffff: return 7 - if value <= 0xffffffffffffff: return 8 - if value <= 0x7fffffffffffffff: return 9 - return 10 - - -def _SignedVarintSize(value): - """Compute the size of a signed varint value.""" - if value < 0: return 10 - if value <= 0x7f: return 1 - if value <= 0x3fff: return 2 - if value <= 0x1fffff: return 3 - if value <= 0xfffffff: return 4 - if value <= 0x7ffffffff: return 5 - if value <= 0x3ffffffffff: return 6 - if value <= 0x1ffffffffffff: return 7 - if value <= 0xffffffffffffff: return 8 - if value <= 0x7fffffffffffffff: return 9 - return 10 - - -def _TagSize(field_number): - """Returns the number of bytes required to serialize a tag with this field - number.""" - # Just pass in type 0, since the type won't affect the tag+type size. - return _VarintSize(wire_format.PackTag(field_number, 0)) - - -# -------------------------------------------------------------------- -# In this section we define some generic sizers. Each of these functions -# takes parameters specific to a particular field type, e.g. int32 or fixed64. -# It returns another function which in turn takes parameters specific to a -# particular field, e.g. the field number and whether it is repeated or packed. -# Look at the next section to see how these are used. - - -def _SimpleSizer(compute_value_size): - """A sizer which uses the function compute_value_size to compute the size of - each value. Typically compute_value_size is _VarintSize.""" - - def SpecificSizer(field_number, is_repeated, is_packed): - tag_size = _TagSize(field_number) - if is_packed: - local_VarintSize = _VarintSize - def PackedFieldSize(value): - result = 0 - for element in value: - result += compute_value_size(element) - return result + local_VarintSize(result) + tag_size - return PackedFieldSize - elif is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - result += compute_value_size(element) - return result - return RepeatedFieldSize - else: - def FieldSize(value): - return tag_size + compute_value_size(value) - return FieldSize - - return SpecificSizer - - -def _ModifiedSizer(compute_value_size, modify_value): - """Like SimpleSizer, but modify_value is invoked on each value before it is - passed to compute_value_size. modify_value is typically ZigZagEncode.""" - - def SpecificSizer(field_number, is_repeated, is_packed): - tag_size = _TagSize(field_number) - if is_packed: - local_VarintSize = _VarintSize - def PackedFieldSize(value): - result = 0 - for element in value: - result += compute_value_size(modify_value(element)) - return result + local_VarintSize(result) + tag_size - return PackedFieldSize - elif is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - result += compute_value_size(modify_value(element)) - return result - return RepeatedFieldSize - else: - def FieldSize(value): - return tag_size + compute_value_size(modify_value(value)) - return FieldSize - - return SpecificSizer - - -def _FixedSizer(value_size): - """Like _SimpleSizer except for a fixed-size field. The input is the size - of one value.""" - - def SpecificSizer(field_number, is_repeated, is_packed): - tag_size = _TagSize(field_number) - if is_packed: - local_VarintSize = _VarintSize - def PackedFieldSize(value): - result = len(value) * value_size - return result + local_VarintSize(result) + tag_size - return PackedFieldSize - elif is_repeated: - element_size = value_size + tag_size - def RepeatedFieldSize(value): - return len(value) * element_size - return RepeatedFieldSize - else: - field_size = value_size + tag_size - def FieldSize(value): - return field_size - return FieldSize - - return SpecificSizer - - -# ==================================================================== -# Here we declare a sizer constructor for each field type. Each "sizer -# constructor" is a function that takes (field_number, is_repeated, is_packed) -# as parameters and returns a sizer, which in turn takes a field value as -# a parameter and returns its encoded size. - - -Int32Sizer = Int64Sizer = EnumSizer = _SimpleSizer(_SignedVarintSize) - -UInt32Sizer = UInt64Sizer = _SimpleSizer(_VarintSize) - -SInt32Sizer = SInt64Sizer = _ModifiedSizer( - _SignedVarintSize, wire_format.ZigZagEncode) - -Fixed32Sizer = SFixed32Sizer = FloatSizer = _FixedSizer(4) -Fixed64Sizer = SFixed64Sizer = DoubleSizer = _FixedSizer(8) - -BoolSizer = _FixedSizer(1) - - -def StringSizer(field_number, is_repeated, is_packed): - """Returns a sizer for a string field.""" - - tag_size = _TagSize(field_number) - local_VarintSize = _VarintSize - local_len = len - assert not is_packed - if is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - l = local_len(element.encode('utf-8')) - result += local_VarintSize(l) + l - return result - return RepeatedFieldSize - else: - def FieldSize(value): - l = local_len(value.encode('utf-8')) - return tag_size + local_VarintSize(l) + l - return FieldSize - - -def BytesSizer(field_number, is_repeated, is_packed): - """Returns a sizer for a bytes field.""" - - tag_size = _TagSize(field_number) - local_VarintSize = _VarintSize - local_len = len - assert not is_packed - if is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - l = local_len(element) - result += local_VarintSize(l) + l - return result - return RepeatedFieldSize - else: - def FieldSize(value): - l = local_len(value) - return tag_size + local_VarintSize(l) + l - return FieldSize - - -def GroupSizer(field_number, is_repeated, is_packed): - """Returns a sizer for a group field.""" - - tag_size = _TagSize(field_number) * 2 - assert not is_packed - if is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - result += element.ByteSize() - return result - return RepeatedFieldSize - else: - def FieldSize(value): - return tag_size + value.ByteSize() - return FieldSize - - -def MessageSizer(field_number, is_repeated, is_packed): - """Returns a sizer for a message field.""" - - tag_size = _TagSize(field_number) - local_VarintSize = _VarintSize - assert not is_packed - if is_repeated: - def RepeatedFieldSize(value): - result = tag_size * len(value) - for element in value: - l = element.ByteSize() - result += local_VarintSize(l) + l - return result - return RepeatedFieldSize - else: - def FieldSize(value): - l = value.ByteSize() - return tag_size + local_VarintSize(l) + l - return FieldSize - - -# -------------------------------------------------------------------- -# MessageSet is special. - - -def MessageSetItemSizer(field_number): - """Returns a sizer for extensions of MessageSet. - - The message set message looks like this: - message MessageSet { - repeated group Item = 1 { - required int32 type_id = 2; - required string message = 3; - } - } - """ - static_size = (_TagSize(1) * 2 + _TagSize(2) + _VarintSize(field_number) + - _TagSize(3)) - local_VarintSize = _VarintSize - - def FieldSize(value): - l = value.ByteSize() - return static_size + local_VarintSize(l) + l - - return FieldSize - - -# ==================================================================== -# Encoders! - - -def _VarintEncoder(): - """Return an encoder for a basic varint value (does not include tag).""" - - local_chr = chr - def EncodeVarint(write, value): - bits = value & 0x7f - value >>= 7 - while value: - write(local_chr(0x80|bits)) - bits = value & 0x7f - value >>= 7 - return write(local_chr(bits)) - - return EncodeVarint - - -def _SignedVarintEncoder(): - """Return an encoder for a basic signed varint value (does not include - tag).""" - - local_chr = chr - def EncodeSignedVarint(write, value): - if value < 0: - value += (1 << 64) - bits = value & 0x7f - value >>= 7 - while value: - write(local_chr(0x80|bits)) - bits = value & 0x7f - value >>= 7 - return write(local_chr(bits)) - - return EncodeSignedVarint - - -_EncodeVarint = _VarintEncoder() -_EncodeSignedVarint = _SignedVarintEncoder() - - -def _VarintBytes(value): - """Encode the given integer as a varint and return the bytes. This is only - called at startup time so it doesn't need to be fast.""" - - pieces = [] - _EncodeVarint(pieces.append, value) - return "".join(pieces) - - -def TagBytes(field_number, wire_type): - """Encode the given tag and return the bytes. Only called at startup.""" - - return _VarintBytes(wire_format.PackTag(field_number, wire_type)) - -# -------------------------------------------------------------------- -# As with sizers (see above), we have a number of common encoder -# implementations. - - -def _SimpleEncoder(wire_type, encode_value, compute_value_size): - """Return a constructor for an encoder for fields of a particular type. - - Args: - wire_type: The field's wire type, for encoding tags. - encode_value: A function which encodes an individual value, e.g. - _EncodeVarint(). - compute_value_size: A function which computes the size of an individual - value, e.g. _VarintSize(). - """ - - def SpecificEncoder(field_number, is_repeated, is_packed): - if is_packed: - tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) - local_EncodeVarint = _EncodeVarint - def EncodePackedField(write, value): - write(tag_bytes) - size = 0 - for element in value: - size += compute_value_size(element) - local_EncodeVarint(write, size) - for element in value: - encode_value(write, element) - return EncodePackedField - elif is_repeated: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeRepeatedField(write, value): - for element in value: - write(tag_bytes) - encode_value(write, element) - return EncodeRepeatedField - else: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeField(write, value): - write(tag_bytes) - return encode_value(write, value) - return EncodeField - - return SpecificEncoder - - -def _ModifiedEncoder(wire_type, encode_value, compute_value_size, modify_value): - """Like SimpleEncoder but additionally invokes modify_value on every value - before passing it to encode_value. Usually modify_value is ZigZagEncode.""" - - def SpecificEncoder(field_number, is_repeated, is_packed): - if is_packed: - tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) - local_EncodeVarint = _EncodeVarint - def EncodePackedField(write, value): - write(tag_bytes) - size = 0 - for element in value: - size += compute_value_size(modify_value(element)) - local_EncodeVarint(write, size) - for element in value: - encode_value(write, modify_value(element)) - return EncodePackedField - elif is_repeated: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeRepeatedField(write, value): - for element in value: - write(tag_bytes) - encode_value(write, modify_value(element)) - return EncodeRepeatedField - else: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeField(write, value): - write(tag_bytes) - return encode_value(write, modify_value(value)) - return EncodeField - - return SpecificEncoder - - -def _StructPackEncoder(wire_type, format): - """Return a constructor for an encoder for a fixed-width field. - - Args: - wire_type: The field's wire type, for encoding tags. - format: The format string to pass to struct.pack(). - """ - - value_size = struct.calcsize(format) - - def SpecificEncoder(field_number, is_repeated, is_packed): - local_struct_pack = struct.pack - if is_packed: - tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) - local_EncodeVarint = _EncodeVarint - def EncodePackedField(write, value): - write(tag_bytes) - local_EncodeVarint(write, len(value) * value_size) - for element in value: - write(local_struct_pack(format, element)) - return EncodePackedField - elif is_repeated: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeRepeatedField(write, value): - for element in value: - write(tag_bytes) - write(local_struct_pack(format, element)) - return EncodeRepeatedField - else: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeField(write, value): - write(tag_bytes) - return write(local_struct_pack(format, value)) - return EncodeField - - return SpecificEncoder - - -def _FloatingPointEncoder(wire_type, format): - """Return a constructor for an encoder for float fields. - - This is like StructPackEncoder, but catches errors that may be due to - passing non-finite floating-point values to struct.pack, and makes a - second attempt to encode those values. - - Args: - wire_type: The field's wire type, for encoding tags. - format: The format string to pass to struct.pack(). - """ - - value_size = struct.calcsize(format) - if value_size == 4: - def EncodeNonFiniteOrRaise(write, value): - # Remember that the serialized form uses little-endian byte order. - if value == _POS_INF: - write('\x00\x00\x80\x7F') - elif value == _NEG_INF: - write('\x00\x00\x80\xFF') - elif value != value: # NaN - write('\x00\x00\xC0\x7F') - else: - raise - elif value_size == 8: - def EncodeNonFiniteOrRaise(write, value): - if value == _POS_INF: - write('\x00\x00\x00\x00\x00\x00\xF0\x7F') - elif value == _NEG_INF: - write('\x00\x00\x00\x00\x00\x00\xF0\xFF') - elif value != value: # NaN - write('\x00\x00\x00\x00\x00\x00\xF8\x7F') - else: - raise - else: - raise ValueError('Can\'t encode floating-point values that are ' - '%d bytes long (only 4 or 8)' % value_size) - - def SpecificEncoder(field_number, is_repeated, is_packed): - local_struct_pack = struct.pack - if is_packed: - tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) - local_EncodeVarint = _EncodeVarint - def EncodePackedField(write, value): - write(tag_bytes) - local_EncodeVarint(write, len(value) * value_size) - for element in value: - # This try/except block is going to be faster than any code that - # we could write to check whether element is finite. - try: - write(local_struct_pack(format, element)) - except SystemError: - EncodeNonFiniteOrRaise(write, element) - return EncodePackedField - elif is_repeated: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeRepeatedField(write, value): - for element in value: - write(tag_bytes) - try: - write(local_struct_pack(format, element)) - except SystemError: - EncodeNonFiniteOrRaise(write, element) - return EncodeRepeatedField - else: - tag_bytes = TagBytes(field_number, wire_type) - def EncodeField(write, value): - write(tag_bytes) - try: - write(local_struct_pack(format, value)) - except SystemError: - EncodeNonFiniteOrRaise(write, value) - return EncodeField - - return SpecificEncoder - - -# ==================================================================== -# Here we declare an encoder constructor for each field type. These work -# very similarly to sizer constructors, described earlier. - - -Int32Encoder = Int64Encoder = EnumEncoder = _SimpleEncoder( - wire_format.WIRETYPE_VARINT, _EncodeSignedVarint, _SignedVarintSize) - -UInt32Encoder = UInt64Encoder = _SimpleEncoder( - wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize) - -SInt32Encoder = SInt64Encoder = _ModifiedEncoder( - wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize, - wire_format.ZigZagEncode) - -# Note that Python conveniently guarantees that when using the '<' prefix on -# formats, they will also have the same size across all platforms (as opposed -# to without the prefix, where their sizes depend on the C compiler's basic -# type sizes). -Fixed32Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, ' 0) - self.assertTrue(isinf(message.neg_inf_double)) - self.assertTrue(message.neg_inf_double < 0) - self.assertTrue(isnan(message.nan_double)) - - self.assertTrue(isinf(message.inf_float)) - self.assertTrue(message.inf_float > 0) - self.assertTrue(isinf(message.neg_inf_float)) - self.assertTrue(message.neg_inf_float < 0) - self.assertTrue(isnan(message.nan_float)) - self.assertEqual("? ? ?? ?? ??? ??/ ??-", message.cpp_trigraph) - - def testHasDefaultValues(self): - desc = unittest_pb2.TestAllTypes.DESCRIPTOR - - expected_has_default_by_name = { - 'optional_int32': False, - 'repeated_int32': False, - 'optional_nested_message': False, - 'default_int32': True, - } - - has_default_by_name = dict( - [(f.name, f.has_default_value) - for f in desc.fields - if f.name in expected_has_default_by_name]) - self.assertEqual(expected_has_default_by_name, has_default_by_name) - - def testContainingTypeBehaviorForExtensions(self): - self.assertEqual(unittest_pb2.optional_int32_extension.containing_type, - unittest_pb2.TestAllExtensions.DESCRIPTOR) - self.assertEqual(unittest_pb2.TestRequired.single.containing_type, - unittest_pb2.TestAllExtensions.DESCRIPTOR) - - def testExtensionScope(self): - self.assertEqual(unittest_pb2.optional_int32_extension.extension_scope, - None) - self.assertEqual(unittest_pb2.TestRequired.single.extension_scope, - unittest_pb2.TestRequired.DESCRIPTOR) - - def testIsExtension(self): - self.assertTrue(unittest_pb2.optional_int32_extension.is_extension) - self.assertTrue(unittest_pb2.TestRequired.single.is_extension) - - message_descriptor = unittest_pb2.TestRequired.DESCRIPTOR - non_extension_descriptor = message_descriptor.fields_by_name['a'] - self.assertTrue(not non_extension_descriptor.is_extension) - - def testOptions(self): - proto = unittest_mset_pb2.TestMessageSet() - self.assertTrue(proto.DESCRIPTOR.GetOptions().message_set_wire_format) - - def testMessageWithCustomOptions(self): - proto = unittest_custom_options_pb2.TestMessageWithCustomOptions() - enum_options = proto.DESCRIPTOR.enum_types_by_name['AnEnum'].GetOptions() - self.assertTrue(enum_options is not None) - # TODO(gps): We really should test for the presense of the enum_opt1 - # extension and for its value to be set to -789. - - def testNestedTypes(self): - self.assertEquals( - set(unittest_pb2.TestAllTypes.DESCRIPTOR.nested_types), - set([ - unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR, - unittest_pb2.TestAllTypes.OptionalGroup.DESCRIPTOR, - unittest_pb2.TestAllTypes.RepeatedGroup.DESCRIPTOR, - ])) - self.assertEqual(unittest_pb2.TestEmptyMessage.DESCRIPTOR.nested_types, []) - self.assertEqual( - unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR.nested_types, []) - - def testContainingType(self): - self.assertTrue( - unittest_pb2.TestEmptyMessage.DESCRIPTOR.containing_type is None) - self.assertTrue( - unittest_pb2.TestAllTypes.DESCRIPTOR.containing_type is None) - self.assertEqual( - unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR.containing_type, - unittest_pb2.TestAllTypes.DESCRIPTOR) - self.assertEqual( - unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR.containing_type, - unittest_pb2.TestAllTypes.DESCRIPTOR) - self.assertEqual( - unittest_pb2.TestAllTypes.RepeatedGroup.DESCRIPTOR.containing_type, - unittest_pb2.TestAllTypes.DESCRIPTOR) - - def testContainingTypeInEnumDescriptor(self): - self.assertTrue(unittest_pb2._FOREIGNENUM.containing_type is None) - self.assertEqual(unittest_pb2._TESTALLTYPES_NESTEDENUM.containing_type, - unittest_pb2.TestAllTypes.DESCRIPTOR) - - def testPackage(self): - self.assertEqual( - unittest_pb2.TestAllTypes.DESCRIPTOR.file.package, - 'protobuf_unittest') - desc = unittest_pb2.TestAllTypes.NestedMessage.DESCRIPTOR - self.assertEqual(desc.file.package, 'protobuf_unittest') - self.assertEqual( - unittest_import_pb2.ImportMessage.DESCRIPTOR.file.package, - 'protobuf_unittest_import') - - self.assertEqual( - unittest_pb2._FOREIGNENUM.file.package, 'protobuf_unittest') - self.assertEqual( - unittest_pb2._TESTALLTYPES_NESTEDENUM.file.package, - 'protobuf_unittest') - self.assertEqual( - unittest_import_pb2._IMPORTENUM.file.package, - 'protobuf_unittest_import') - - def testExtensionRange(self): - self.assertEqual( - unittest_pb2.TestAllTypes.DESCRIPTOR.extension_ranges, []) - self.assertEqual( - unittest_pb2.TestAllExtensions.DESCRIPTOR.extension_ranges, - [(1, MAX_EXTENSION)]) - self.assertEqual( - unittest_pb2.TestMultipleExtensionRanges.DESCRIPTOR.extension_ranges, - [(42, 43), (4143, 4244), (65536, MAX_EXTENSION)]) - - def testFileDescriptor(self): - self.assertEqual(unittest_pb2.DESCRIPTOR.name, - 'google/protobuf/unittest.proto') - self.assertEqual(unittest_pb2.DESCRIPTOR.package, 'protobuf_unittest') - self.assertFalse(unittest_pb2.DESCRIPTOR.serialized_pb is None) - - def testNoGenericServices(self): - self.assertTrue(hasattr(unittest_no_generic_services_pb2, "TestMessage")) - self.assertTrue(hasattr(unittest_no_generic_services_pb2, "FOO")) - self.assertTrue(hasattr(unittest_no_generic_services_pb2, "test_extension")) - - # Make sure unittest_no_generic_services_pb2 has no services subclassing - # Proto2 Service class. - if hasattr(unittest_no_generic_services_pb2, "TestService"): - self.assertFalse(issubclass(unittest_no_generic_services_pb2.TestService, - service.Service)) - - def testMessageTypesByName(self): - file_type = unittest_pb2.DESCRIPTOR - self.assertEqual( - unittest_pb2._TESTALLTYPES, - file_type.message_types_by_name[unittest_pb2._TESTALLTYPES.name]) - - # Nested messages shouldn't be included in the message_types_by_name - # dictionary (like in the C++ API). - self.assertFalse( - unittest_pb2._TESTALLTYPES_NESTEDMESSAGE.name in - file_type.message_types_by_name) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_listener.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_listener.py deleted file mode 100755 index 1080234d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_listener.py +++ /dev/null @@ -1,78 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Defines a listener interface for observing certain -state transitions on Message objects. - -Also defines a null implementation of this interface. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - - -class MessageListener(object): - - """Listens for modifications made to a message. Meant to be registered via - Message._SetListener(). - - Attributes: - dirty: If True, then calling Modified() would be a no-op. This can be - used to avoid these calls entirely in the common case. - """ - - def Modified(self): - """Called every time the message is modified in such a way that the parent - message may need to be updated. This currently means either: - (a) The message was modified for the first time, so the parent message - should henceforth mark the message as present. - (b) The message's cached byte size became dirty -- i.e. the message was - modified for the first time after a previous call to ByteSize(). - Therefore the parent should also mark its byte size as dirty. - Note that (a) implies (b), since new objects start out with a client cached - size (zero). However, we document (a) explicitly because it is important. - - Modified() will *only* be called in response to one of these two events -- - not every time the sub-message is modified. - - Note that if the listener's |dirty| attribute is true, then calling - Modified at the moment would be a no-op, so it can be skipped. Performance- - sensitive callers should check this attribute directly before calling since - it will be true most of the time. - """ - - raise NotImplementedError - - -class NullMessageListener(object): - - """No-op MessageListener implementation.""" - - def Modified(self): - pass diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_test.py deleted file mode 100755 index 65174373..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/message_test.py +++ /dev/null @@ -1,343 +0,0 @@ -#! /usr/bin/python -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests python protocol buffers against the golden message. - -Note that the golden messages exercise every known field type, thus this -test ends up exercising and verifying nearly all of the parsing and -serialization code in the whole library. - -TODO(kenton): Merge with wire_format_test? It doesn't make a whole lot of -sense to call this a test of the "message" module, which only declares an -abstract interface. -""" - -__author__ = 'gps@google.com (Gregory P. Smith)' - -import copy -import math -import unittest -from google.protobuf import unittest_import_pb2 -from google.protobuf import unittest_pb2 -from google.protobuf.internal import test_util - -# Python pre-2.6 does not have isinf() or isnan() functions, so we have -# to provide our own. -def isnan(val): - # NaN is never equal to itself. - return val != val -def isinf(val): - # Infinity times zero equals NaN. - return not isnan(val) and isnan(val * 0) -def IsPosInf(val): - return isinf(val) and (val > 0) -def IsNegInf(val): - return isinf(val) and (val < 0) - -class MessageTest(unittest.TestCase): - - def testGoldenMessage(self): - golden_data = test_util.GoldenFile('golden_message').read() - golden_message = unittest_pb2.TestAllTypes() - golden_message.ParseFromString(golden_data) - test_util.ExpectAllFieldsSet(self, golden_message) - self.assertTrue(golden_message.SerializeToString() == golden_data) - golden_copy = copy.deepcopy(golden_message) - self.assertTrue(golden_copy.SerializeToString() == golden_data) - - def testGoldenExtensions(self): - golden_data = test_util.GoldenFile('golden_message').read() - golden_message = unittest_pb2.TestAllExtensions() - golden_message.ParseFromString(golden_data) - all_set = unittest_pb2.TestAllExtensions() - test_util.SetAllExtensions(all_set) - self.assertEquals(all_set, golden_message) - self.assertTrue(golden_message.SerializeToString() == golden_data) - golden_copy = copy.deepcopy(golden_message) - self.assertTrue(golden_copy.SerializeToString() == golden_data) - - def testGoldenPackedMessage(self): - golden_data = test_util.GoldenFile('golden_packed_fields_message').read() - golden_message = unittest_pb2.TestPackedTypes() - golden_message.ParseFromString(golden_data) - all_set = unittest_pb2.TestPackedTypes() - test_util.SetAllPackedFields(all_set) - self.assertEquals(all_set, golden_message) - self.assertTrue(all_set.SerializeToString() == golden_data) - golden_copy = copy.deepcopy(golden_message) - self.assertTrue(golden_copy.SerializeToString() == golden_data) - - def testGoldenPackedExtensions(self): - golden_data = test_util.GoldenFile('golden_packed_fields_message').read() - golden_message = unittest_pb2.TestPackedExtensions() - golden_message.ParseFromString(golden_data) - all_set = unittest_pb2.TestPackedExtensions() - test_util.SetAllPackedExtensions(all_set) - self.assertEquals(all_set, golden_message) - self.assertTrue(all_set.SerializeToString() == golden_data) - golden_copy = copy.deepcopy(golden_message) - self.assertTrue(golden_copy.SerializeToString() == golden_data) - - def testPositiveInfinity(self): - golden_data = ('\x5D\x00\x00\x80\x7F' - '\x61\x00\x00\x00\x00\x00\x00\xF0\x7F' - '\xCD\x02\x00\x00\x80\x7F' - '\xD1\x02\x00\x00\x00\x00\x00\x00\xF0\x7F') - golden_message = unittest_pb2.TestAllTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(IsPosInf(golden_message.optional_float)) - self.assertTrue(IsPosInf(golden_message.optional_double)) - self.assertTrue(IsPosInf(golden_message.repeated_float[0])) - self.assertTrue(IsPosInf(golden_message.repeated_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testNegativeInfinity(self): - golden_data = ('\x5D\x00\x00\x80\xFF' - '\x61\x00\x00\x00\x00\x00\x00\xF0\xFF' - '\xCD\x02\x00\x00\x80\xFF' - '\xD1\x02\x00\x00\x00\x00\x00\x00\xF0\xFF') - golden_message = unittest_pb2.TestAllTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(IsNegInf(golden_message.optional_float)) - self.assertTrue(IsNegInf(golden_message.optional_double)) - self.assertTrue(IsNegInf(golden_message.repeated_float[0])) - self.assertTrue(IsNegInf(golden_message.repeated_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testNotANumber(self): - golden_data = ('\x5D\x00\x00\xC0\x7F' - '\x61\x00\x00\x00\x00\x00\x00\xF8\x7F' - '\xCD\x02\x00\x00\xC0\x7F' - '\xD1\x02\x00\x00\x00\x00\x00\x00\xF8\x7F') - golden_message = unittest_pb2.TestAllTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(isnan(golden_message.optional_float)) - self.assertTrue(isnan(golden_message.optional_double)) - self.assertTrue(isnan(golden_message.repeated_float[0])) - self.assertTrue(isnan(golden_message.repeated_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testPositiveInfinityPacked(self): - golden_data = ('\xA2\x06\x04\x00\x00\x80\x7F' - '\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF0\x7F') - golden_message = unittest_pb2.TestPackedTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(IsPosInf(golden_message.packed_float[0])) - self.assertTrue(IsPosInf(golden_message.packed_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testNegativeInfinityPacked(self): - golden_data = ('\xA2\x06\x04\x00\x00\x80\xFF' - '\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF0\xFF') - golden_message = unittest_pb2.TestPackedTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(IsNegInf(golden_message.packed_float[0])) - self.assertTrue(IsNegInf(golden_message.packed_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testNotANumberPacked(self): - golden_data = ('\xA2\x06\x04\x00\x00\xC0\x7F' - '\xAA\x06\x08\x00\x00\x00\x00\x00\x00\xF8\x7F') - golden_message = unittest_pb2.TestPackedTypes() - golden_message.ParseFromString(golden_data) - self.assertTrue(isnan(golden_message.packed_float[0])) - self.assertTrue(isnan(golden_message.packed_double[0])) - self.assertTrue(golden_message.SerializeToString() == golden_data) - - def testExtremeFloatValues(self): - message = unittest_pb2.TestAllTypes() - - # Most positive exponent, no significand bits set. - kMostPosExponentNoSigBits = math.pow(2, 127) - message.optional_float = kMostPosExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == kMostPosExponentNoSigBits) - - # Most positive exponent, one significand bit set. - kMostPosExponentOneSigBit = 1.5 * math.pow(2, 127) - message.optional_float = kMostPosExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == kMostPosExponentOneSigBit) - - # Repeat last two cases with values of same magnitude, but negative. - message.optional_float = -kMostPosExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == -kMostPosExponentNoSigBits) - - message.optional_float = -kMostPosExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == -kMostPosExponentOneSigBit) - - # Most negative exponent, no significand bits set. - kMostNegExponentNoSigBits = math.pow(2, -127) - message.optional_float = kMostNegExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == kMostNegExponentNoSigBits) - - # Most negative exponent, one significand bit set. - kMostNegExponentOneSigBit = 1.5 * math.pow(2, -127) - message.optional_float = kMostNegExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == kMostNegExponentOneSigBit) - - # Repeat last two cases with values of the same magnitude, but negative. - message.optional_float = -kMostNegExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == -kMostNegExponentNoSigBits) - - message.optional_float = -kMostNegExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_float == -kMostNegExponentOneSigBit) - - def testExtremeFloatValues(self): - message = unittest_pb2.TestAllTypes() - - # Most positive exponent, no significand bits set. - kMostPosExponentNoSigBits = math.pow(2, 1023) - message.optional_double = kMostPosExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == kMostPosExponentNoSigBits) - - # Most positive exponent, one significand bit set. - kMostPosExponentOneSigBit = 1.5 * math.pow(2, 1023) - message.optional_double = kMostPosExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == kMostPosExponentOneSigBit) - - # Repeat last two cases with values of same magnitude, but negative. - message.optional_double = -kMostPosExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == -kMostPosExponentNoSigBits) - - message.optional_double = -kMostPosExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == -kMostPosExponentOneSigBit) - - # Most negative exponent, no significand bits set. - kMostNegExponentNoSigBits = math.pow(2, -1023) - message.optional_double = kMostNegExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == kMostNegExponentNoSigBits) - - # Most negative exponent, one significand bit set. - kMostNegExponentOneSigBit = 1.5 * math.pow(2, -1023) - message.optional_double = kMostNegExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == kMostNegExponentOneSigBit) - - # Repeat last two cases with values of the same magnitude, but negative. - message.optional_double = -kMostNegExponentNoSigBits - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == -kMostNegExponentNoSigBits) - - message.optional_double = -kMostNegExponentOneSigBit - message.ParseFromString(message.SerializeToString()) - self.assertTrue(message.optional_double == -kMostNegExponentOneSigBit) - - def testSortingRepeatedScalarFieldsDefaultComparator(self): - """Check some different types with the default comparator.""" - message = unittest_pb2.TestAllTypes() - - # TODO(mattp): would testing more scalar types strengthen test? - message.repeated_int32.append(1) - message.repeated_int32.append(3) - message.repeated_int32.append(2) - message.repeated_int32.sort() - self.assertEqual(message.repeated_int32[0], 1) - self.assertEqual(message.repeated_int32[1], 2) - self.assertEqual(message.repeated_int32[2], 3) - - message.repeated_float.append(1.1) - message.repeated_float.append(1.3) - message.repeated_float.append(1.2) - message.repeated_float.sort() - self.assertAlmostEqual(message.repeated_float[0], 1.1) - self.assertAlmostEqual(message.repeated_float[1], 1.2) - self.assertAlmostEqual(message.repeated_float[2], 1.3) - - message.repeated_string.append('a') - message.repeated_string.append('c') - message.repeated_string.append('b') - message.repeated_string.sort() - self.assertEqual(message.repeated_string[0], 'a') - self.assertEqual(message.repeated_string[1], 'b') - self.assertEqual(message.repeated_string[2], 'c') - - message.repeated_bytes.append('a') - message.repeated_bytes.append('c') - message.repeated_bytes.append('b') - message.repeated_bytes.sort() - self.assertEqual(message.repeated_bytes[0], 'a') - self.assertEqual(message.repeated_bytes[1], 'b') - self.assertEqual(message.repeated_bytes[2], 'c') - - def testSortingRepeatedScalarFieldsCustomComparator(self): - """Check some different types with custom comparator.""" - message = unittest_pb2.TestAllTypes() - - message.repeated_int32.append(-3) - message.repeated_int32.append(-2) - message.repeated_int32.append(-1) - message.repeated_int32.sort(lambda x,y: cmp(abs(x), abs(y))) - self.assertEqual(message.repeated_int32[0], -1) - self.assertEqual(message.repeated_int32[1], -2) - self.assertEqual(message.repeated_int32[2], -3) - - message.repeated_string.append('aaa') - message.repeated_string.append('bb') - message.repeated_string.append('c') - message.repeated_string.sort(lambda x,y: cmp(len(x), len(y))) - self.assertEqual(message.repeated_string[0], 'c') - self.assertEqual(message.repeated_string[1], 'bb') - self.assertEqual(message.repeated_string[2], 'aaa') - - def testSortingRepeatedCompositeFieldsCustomComparator(self): - """Check passing a custom comparator to sort a repeated composite field.""" - message = unittest_pb2.TestAllTypes() - - message.repeated_nested_message.add().bb = 1 - message.repeated_nested_message.add().bb = 3 - message.repeated_nested_message.add().bb = 2 - message.repeated_nested_message.add().bb = 6 - message.repeated_nested_message.add().bb = 5 - message.repeated_nested_message.add().bb = 4 - message.repeated_nested_message.sort(lambda x,y: cmp(x.bb, y.bb)) - self.assertEqual(message.repeated_nested_message[0].bb, 1) - self.assertEqual(message.repeated_nested_message[1].bb, 2) - self.assertEqual(message.repeated_nested_message[2].bb, 3) - self.assertEqual(message.repeated_nested_message[3].bb, 4) - self.assertEqual(message.repeated_nested_message[4].bb, 5) - self.assertEqual(message.repeated_nested_message[5].bb, 6) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_extensions.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_extensions.proto deleted file mode 100644 index e2d97010..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_extensions.proto +++ /dev/null @@ -1,58 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: robinson@google.com (Will Robinson) - - -package google.protobuf.internal; - - -message TopLevelMessage { - optional ExtendedMessage submessage = 1; -} - - -message ExtendedMessage { - extensions 1 to max; -} - - -message ForeignMessage { - optional int32 foreign_message_int = 1; -} - - -extend ExtendedMessage { - optional int32 optional_int_extension = 1; - optional ForeignMessage optional_message_extension = 2; - - repeated int32 repeated_int_extension = 3; - repeated ForeignMessage repeated_message_extension = 4; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_messages.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_messages.proto deleted file mode 100644 index c701b446..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/more_messages.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: robinson@google.com (Will Robinson) - - -package google.protobuf.internal; - -// A message where tag numbers are listed out of order, to allow us to test our -// canonicalization of serialized output, which should always be in tag order. -// We also mix in some extensions for extra fun. -message OutOfOrderFields { - optional sint32 optional_sint32 = 5; - extensions 4 to 4; - optional uint32 optional_uint32 = 3; - extensions 2 to 2; - optional int32 optional_int32 = 1; -}; - - -extend OutOfOrderFields { - optional uint64 optional_uint64 = 4; - optional int64 optional_int64 = 2; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/python_message.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/python_message.py deleted file mode 100755 index 66fca918..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/python_message.py +++ /dev/null @@ -1,1098 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This code is meant to work on Python 2.4 and above only. -# -# TODO(robinson): Helpers for verbose, common checks like seeing if a -# descriptor's cpp_type is CPPTYPE_MESSAGE. - -"""Contains a metaclass and helper functions used to create -protocol message classes from Descriptor objects at runtime. - -Recall that a metaclass is the "type" of a class. -(A class is to a metaclass what an instance is to a class.) - -In this case, we use the GeneratedProtocolMessageType metaclass -to inject all the useful functionality into the classes -output by the protocol compiler at compile-time. - -The upshot of all this is that the real implementation -details for ALL pure-Python protocol buffers are *here in -this file*. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - -try: - from cStringIO import StringIO -except ImportError: - from StringIO import StringIO -import struct -import weakref - -# We use "as" to avoid name collisions with variables. -from google.protobuf.internal import containers -from google.protobuf.internal import decoder -from google.protobuf.internal import encoder -from google.protobuf.internal import message_listener as message_listener_mod -from google.protobuf.internal import type_checkers -from google.protobuf.internal import wire_format -from google.protobuf import descriptor as descriptor_mod -from google.protobuf import message as message_mod -from google.protobuf import text_format - -_FieldDescriptor = descriptor_mod.FieldDescriptor - - -def NewMessage(descriptor, dictionary): - _AddClassAttributesForNestedExtensions(descriptor, dictionary) - _AddSlots(descriptor, dictionary) - - -def InitMessage(descriptor, cls): - cls._decoders_by_tag = {} - cls._extensions_by_name = {} - cls._extensions_by_number = {} - if (descriptor.has_options and - descriptor.GetOptions().message_set_wire_format): - cls._decoders_by_tag[decoder.MESSAGE_SET_ITEM_TAG] = ( - decoder.MessageSetItemDecoder(cls._extensions_by_number)) - - # Attach stuff to each FieldDescriptor for quick lookup later on. - for field in descriptor.fields: - _AttachFieldHelpers(cls, field) - - _AddEnumValues(descriptor, cls) - _AddInitMethod(descriptor, cls) - _AddPropertiesForFields(descriptor, cls) - _AddPropertiesForExtensions(descriptor, cls) - _AddStaticMethods(cls) - _AddMessageMethods(descriptor, cls) - _AddPrivateHelperMethods(cls) - - -# Stateless helpers for GeneratedProtocolMessageType below. -# Outside clients should not access these directly. -# -# I opted not to make any of these methods on the metaclass, to make it more -# clear that I'm not really using any state there and to keep clients from -# thinking that they have direct access to these construction helpers. - - -def _PropertyName(proto_field_name): - """Returns the name of the public property attribute which - clients can use to get and (in some cases) set the value - of a protocol message field. - - Args: - proto_field_name: The protocol message field name, exactly - as it appears (or would appear) in a .proto file. - """ - # TODO(robinson): Escape Python keywords (e.g., yield), and test this support. - # nnorwitz makes my day by writing: - # """ - # FYI. See the keyword module in the stdlib. This could be as simple as: - # - # if keyword.iskeyword(proto_field_name): - # return proto_field_name + "_" - # return proto_field_name - # """ - # Kenton says: The above is a BAD IDEA. People rely on being able to use - # getattr() and setattr() to reflectively manipulate field values. If we - # rename the properties, then every such user has to also make sure to apply - # the same transformation. Note that currently if you name a field "yield", - # you can still access it just fine using getattr/setattr -- it's not even - # that cumbersome to do so. - # TODO(kenton): Remove this method entirely if/when everyone agrees with my - # position. - return proto_field_name - - -def _VerifyExtensionHandle(message, extension_handle): - """Verify that the given extension handle is valid.""" - - if not isinstance(extension_handle, _FieldDescriptor): - raise KeyError('HasExtension() expects an extension handle, got: %s' % - extension_handle) - - if not extension_handle.is_extension: - raise KeyError('"%s" is not an extension.' % extension_handle.full_name) - - if extension_handle.containing_type is not message.DESCRIPTOR: - raise KeyError('Extension "%s" extends message type "%s", but this ' - 'message is of type "%s".' % - (extension_handle.full_name, - extension_handle.containing_type.full_name, - message.DESCRIPTOR.full_name)) - - -def _AddSlots(message_descriptor, dictionary): - """Adds a __slots__ entry to dictionary, containing the names of all valid - attributes for this message type. - - Args: - message_descriptor: A Descriptor instance describing this message type. - dictionary: Class dictionary to which we'll add a '__slots__' entry. - """ - dictionary['__slots__'] = ['_cached_byte_size', - '_cached_byte_size_dirty', - '_fields', - '_is_present_in_parent', - '_listener', - '_listener_for_children', - '__weakref__'] - - -def _IsMessageSetExtension(field): - return (field.is_extension and - field.containing_type.has_options and - field.containing_type.GetOptions().message_set_wire_format and - field.type == _FieldDescriptor.TYPE_MESSAGE and - field.message_type == field.extension_scope and - field.label == _FieldDescriptor.LABEL_OPTIONAL) - - -def _AttachFieldHelpers(cls, field_descriptor): - is_repeated = (field_descriptor.label == _FieldDescriptor.LABEL_REPEATED) - is_packed = (field_descriptor.has_options and - field_descriptor.GetOptions().packed) - - if _IsMessageSetExtension(field_descriptor): - field_encoder = encoder.MessageSetItemEncoder(field_descriptor.number) - sizer = encoder.MessageSetItemSizer(field_descriptor.number) - else: - field_encoder = type_checkers.TYPE_TO_ENCODER[field_descriptor.type]( - field_descriptor.number, is_repeated, is_packed) - sizer = type_checkers.TYPE_TO_SIZER[field_descriptor.type]( - field_descriptor.number, is_repeated, is_packed) - - field_descriptor._encoder = field_encoder - field_descriptor._sizer = sizer - field_descriptor._default_constructor = _DefaultValueConstructorForField( - field_descriptor) - - def AddDecoder(wiretype, is_packed): - tag_bytes = encoder.TagBytes(field_descriptor.number, wiretype) - cls._decoders_by_tag[tag_bytes] = ( - type_checkers.TYPE_TO_DECODER[field_descriptor.type]( - field_descriptor.number, is_repeated, is_packed, - field_descriptor, field_descriptor._default_constructor)) - - AddDecoder(type_checkers.FIELD_TYPE_TO_WIRE_TYPE[field_descriptor.type], - False) - - if is_repeated and wire_format.IsTypePackable(field_descriptor.type): - # To support wire compatibility of adding packed = true, add a decoder for - # packed values regardless of the field's options. - AddDecoder(wire_format.WIRETYPE_LENGTH_DELIMITED, True) - - -def _AddClassAttributesForNestedExtensions(descriptor, dictionary): - extension_dict = descriptor.extensions_by_name - for extension_name, extension_field in extension_dict.iteritems(): - assert extension_name not in dictionary - dictionary[extension_name] = extension_field - - -def _AddEnumValues(descriptor, cls): - """Sets class-level attributes for all enum fields defined in this message. - - Args: - descriptor: Descriptor object for this message type. - cls: Class we're constructing for this message type. - """ - for enum_type in descriptor.enum_types: - for enum_value in enum_type.values: - setattr(cls, enum_value.name, enum_value.number) - - -def _DefaultValueConstructorForField(field): - """Returns a function which returns a default value for a field. - - Args: - field: FieldDescriptor object for this field. - - The returned function has one argument: - message: Message instance containing this field, or a weakref proxy - of same. - - That function in turn returns a default value for this field. The default - value may refer back to |message| via a weak reference. - """ - - if field.label == _FieldDescriptor.LABEL_REPEATED: - if field.default_value != []: - raise ValueError('Repeated field default value not empty list: %s' % ( - field.default_value)) - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - # We can't look at _concrete_class yet since it might not have - # been set. (Depends on order in which we initialize the classes). - message_type = field.message_type - def MakeRepeatedMessageDefault(message): - return containers.RepeatedCompositeFieldContainer( - message._listener_for_children, field.message_type) - return MakeRepeatedMessageDefault - else: - type_checker = type_checkers.GetTypeChecker(field.cpp_type, field.type) - def MakeRepeatedScalarDefault(message): - return containers.RepeatedScalarFieldContainer( - message._listener_for_children, type_checker) - return MakeRepeatedScalarDefault - - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - # _concrete_class may not yet be initialized. - message_type = field.message_type - def MakeSubMessageDefault(message): - result = message_type._concrete_class() - result._SetListener(message._listener_for_children) - return result - return MakeSubMessageDefault - - def MakeScalarDefault(message): - return field.default_value - return MakeScalarDefault - - -def _AddInitMethod(message_descriptor, cls): - """Adds an __init__ method to cls.""" - fields = message_descriptor.fields - def init(self, **kwargs): - self._cached_byte_size = 0 - self._cached_byte_size_dirty = len(kwargs) > 0 - self._fields = {} - self._is_present_in_parent = False - self._listener = message_listener_mod.NullMessageListener() - self._listener_for_children = _Listener(self) - for field_name, field_value in kwargs.iteritems(): - field = _GetFieldByName(message_descriptor, field_name) - if field is None: - raise TypeError("%s() got an unexpected keyword argument '%s'" % - (message_descriptor.name, field_name)) - if field.label == _FieldDescriptor.LABEL_REPEATED: - copy = field._default_constructor(self) - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: # Composite - for val in field_value: - copy.add().MergeFrom(val) - else: # Scalar - copy.extend(field_value) - self._fields[field] = copy - elif field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - copy = field._default_constructor(self) - copy.MergeFrom(field_value) - self._fields[field] = copy - else: - setattr(self, field_name, field_value) - - init.__module__ = None - init.__doc__ = None - cls.__init__ = init - - -def _GetFieldByName(message_descriptor, field_name): - """Returns a field descriptor by field name. - - Args: - message_descriptor: A Descriptor describing all fields in message. - field_name: The name of the field to retrieve. - Returns: - The field descriptor associated with the field name. - """ - try: - return message_descriptor.fields_by_name[field_name] - except KeyError: - raise ValueError('Protocol message has no "%s" field.' % field_name) - - -def _AddPropertiesForFields(descriptor, cls): - """Adds properties for all fields in this protocol message type.""" - for field in descriptor.fields: - _AddPropertiesForField(field, cls) - - if descriptor.is_extendable: - # _ExtensionDict is just an adaptor with no state so we allocate a new one - # every time it is accessed. - cls.Extensions = property(lambda self: _ExtensionDict(self)) - - -def _AddPropertiesForField(field, cls): - """Adds a public property for a protocol message field. - Clients can use this property to get and (in the case - of non-repeated scalar fields) directly set the value - of a protocol message field. - - Args: - field: A FieldDescriptor for this field. - cls: The class we're constructing. - """ - # Catch it if we add other types that we should - # handle specially here. - assert _FieldDescriptor.MAX_CPPTYPE == 10 - - constant_name = field.name.upper() + "_FIELD_NUMBER" - setattr(cls, constant_name, field.number) - - if field.label == _FieldDescriptor.LABEL_REPEATED: - _AddPropertiesForRepeatedField(field, cls) - elif field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - _AddPropertiesForNonRepeatedCompositeField(field, cls) - else: - _AddPropertiesForNonRepeatedScalarField(field, cls) - - -def _AddPropertiesForRepeatedField(field, cls): - """Adds a public property for a "repeated" protocol message field. Clients - can use this property to get the value of the field, which will be either a - _RepeatedScalarFieldContainer or _RepeatedCompositeFieldContainer (see - below). - - Note that when clients add values to these containers, we perform - type-checking in the case of repeated scalar fields, and we also set any - necessary "has" bits as a side-effect. - - Args: - field: A FieldDescriptor for this field. - cls: The class we're constructing. - """ - proto_field_name = field.name - property_name = _PropertyName(proto_field_name) - - def getter(self): - field_value = self._fields.get(field) - if field_value is None: - # Construct a new object to represent this field. - field_value = field._default_constructor(self) - - # Atomically check if another thread has preempted us and, if not, swap - # in the new object we just created. If someone has preempted us, we - # take that object and discard ours. - # WARNING: We are relying on setdefault() being atomic. This is true - # in CPython but we haven't investigated others. This warning appears - # in several other locations in this file. - field_value = self._fields.setdefault(field, field_value) - return field_value - getter.__module__ = None - getter.__doc__ = 'Getter for %s.' % proto_field_name - - # We define a setter just so we can throw an exception with a more - # helpful error message. - def setter(self, new_value): - raise AttributeError('Assignment not allowed to repeated field ' - '"%s" in protocol message object.' % proto_field_name) - - doc = 'Magic attribute generated for "%s" proto field.' % proto_field_name - setattr(cls, property_name, property(getter, setter, doc=doc)) - - -def _AddPropertiesForNonRepeatedScalarField(field, cls): - """Adds a public property for a nonrepeated, scalar protocol message field. - Clients can use this property to get and directly set the value of the field. - Note that when the client sets the value of a field by using this property, - all necessary "has" bits are set as a side-effect, and we also perform - type-checking. - - Args: - field: A FieldDescriptor for this field. - cls: The class we're constructing. - """ - proto_field_name = field.name - property_name = _PropertyName(proto_field_name) - type_checker = type_checkers.GetTypeChecker(field.cpp_type, field.type) - default_value = field.default_value - valid_values = set() - - def getter(self): - return self._fields.get(field, default_value) - getter.__module__ = None - getter.__doc__ = 'Getter for %s.' % proto_field_name - def setter(self, new_value): - type_checker.CheckValue(new_value) - self._fields[field] = new_value - # Check _cached_byte_size_dirty inline to improve performance, since scalar - # setters are called frequently. - if not self._cached_byte_size_dirty: - self._Modified() - - setter.__module__ = None - setter.__doc__ = 'Setter for %s.' % proto_field_name - - # Add a property to encapsulate the getter/setter. - doc = 'Magic attribute generated for "%s" proto field.' % proto_field_name - setattr(cls, property_name, property(getter, setter, doc=doc)) - - -def _AddPropertiesForNonRepeatedCompositeField(field, cls): - """Adds a public property for a nonrepeated, composite protocol message field. - A composite field is a "group" or "message" field. - - Clients can use this property to get the value of the field, but cannot - assign to the property directly. - - Args: - field: A FieldDescriptor for this field. - cls: The class we're constructing. - """ - # TODO(robinson): Remove duplication with similar method - # for non-repeated scalars. - proto_field_name = field.name - property_name = _PropertyName(proto_field_name) - message_type = field.message_type - - def getter(self): - field_value = self._fields.get(field) - if field_value is None: - # Construct a new object to represent this field. - field_value = message_type._concrete_class() - field_value._SetListener(self._listener_for_children) - - # Atomically check if another thread has preempted us and, if not, swap - # in the new object we just created. If someone has preempted us, we - # take that object and discard ours. - # WARNING: We are relying on setdefault() being atomic. This is true - # in CPython but we haven't investigated others. This warning appears - # in several other locations in this file. - field_value = self._fields.setdefault(field, field_value) - return field_value - getter.__module__ = None - getter.__doc__ = 'Getter for %s.' % proto_field_name - - # We define a setter just so we can throw an exception with a more - # helpful error message. - def setter(self, new_value): - raise AttributeError('Assignment not allowed to composite field ' - '"%s" in protocol message object.' % proto_field_name) - - # Add a property to encapsulate the getter. - doc = 'Magic attribute generated for "%s" proto field.' % proto_field_name - setattr(cls, property_name, property(getter, setter, doc=doc)) - - -def _AddPropertiesForExtensions(descriptor, cls): - """Adds properties for all fields in this protocol message type.""" - extension_dict = descriptor.extensions_by_name - for extension_name, extension_field in extension_dict.iteritems(): - constant_name = extension_name.upper() + "_FIELD_NUMBER" - setattr(cls, constant_name, extension_field.number) - - -def _AddStaticMethods(cls): - # TODO(robinson): This probably needs to be thread-safe(?) - def RegisterExtension(extension_handle): - extension_handle.containing_type = cls.DESCRIPTOR - _AttachFieldHelpers(cls, extension_handle) - - # Try to insert our extension, failing if an extension with the same number - # already exists. - actual_handle = cls._extensions_by_number.setdefault( - extension_handle.number, extension_handle) - if actual_handle is not extension_handle: - raise AssertionError( - 'Extensions "%s" and "%s" both try to extend message type "%s" with ' - 'field number %d.' % - (extension_handle.full_name, actual_handle.full_name, - cls.DESCRIPTOR.full_name, extension_handle.number)) - - cls._extensions_by_name[extension_handle.full_name] = extension_handle - - handle = extension_handle # avoid line wrapping - if _IsMessageSetExtension(handle): - # MessageSet extension. Also register under type name. - cls._extensions_by_name[ - extension_handle.message_type.full_name] = extension_handle - - cls.RegisterExtension = staticmethod(RegisterExtension) - - def FromString(s): - message = cls() - message.MergeFromString(s) - return message - cls.FromString = staticmethod(FromString) - - -def _IsPresent(item): - """Given a (FieldDescriptor, value) tuple from _fields, return true if the - value should be included in the list returned by ListFields().""" - - if item[0].label == _FieldDescriptor.LABEL_REPEATED: - return bool(item[1]) - elif item[0].cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - return item[1]._is_present_in_parent - else: - return True - - -def _AddListFieldsMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - def ListFields(self): - all_fields = [item for item in self._fields.iteritems() if _IsPresent(item)] - all_fields.sort(key = lambda item: item[0].number) - return all_fields - - cls.ListFields = ListFields - - -def _AddHasFieldMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - singular_fields = {} - for field in message_descriptor.fields: - if field.label != _FieldDescriptor.LABEL_REPEATED: - singular_fields[field.name] = field - - def HasField(self, field_name): - try: - field = singular_fields[field_name] - except KeyError: - raise ValueError( - 'Protocol message has no singular "%s" field.' % field_name) - - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - value = self._fields.get(field) - return value is not None and value._is_present_in_parent - else: - return field in self._fields - cls.HasField = HasField - - -def _AddClearFieldMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - def ClearField(self, field_name): - try: - field = message_descriptor.fields_by_name[field_name] - except KeyError: - raise ValueError('Protocol message has no "%s" field.' % field_name) - - if field in self._fields: - # Note: If the field is a sub-message, its listener will still point - # at us. That's fine, because the worst than can happen is that it - # will call _Modified() and invalidate our byte size. Big deal. - del self._fields[field] - - # Always call _Modified() -- even if nothing was changed, this is - # a mutating method, and thus calling it should cause the field to become - # present in the parent message. - self._Modified() - - cls.ClearField = ClearField - - -def _AddClearExtensionMethod(cls): - """Helper for _AddMessageMethods().""" - def ClearExtension(self, extension_handle): - _VerifyExtensionHandle(self, extension_handle) - - # Similar to ClearField(), above. - if extension_handle in self._fields: - del self._fields[extension_handle] - self._Modified() - cls.ClearExtension = ClearExtension - - -def _AddClearMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - def Clear(self): - # Clear fields. - self._fields = {} - self._Modified() - cls.Clear = Clear - - -def _AddHasExtensionMethod(cls): - """Helper for _AddMessageMethods().""" - def HasExtension(self, extension_handle): - _VerifyExtensionHandle(self, extension_handle) - if extension_handle.label == _FieldDescriptor.LABEL_REPEATED: - raise KeyError('"%s" is repeated.' % extension_handle.full_name) - - if extension_handle.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - value = self._fields.get(extension_handle) - return value is not None and value._is_present_in_parent - else: - return extension_handle in self._fields - cls.HasExtension = HasExtension - - -def _AddEqualsMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - def __eq__(self, other): - if (not isinstance(other, message_mod.Message) or - other.DESCRIPTOR != self.DESCRIPTOR): - return False - - if self is other: - return True - - return self.ListFields() == other.ListFields() - - cls.__eq__ = __eq__ - - -def _AddStrMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - def __str__(self): - return text_format.MessageToString(self) - cls.__str__ = __str__ - - -def _AddUnicodeMethod(unused_message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - def __unicode__(self): - return text_format.MessageToString(self, as_utf8=True).decode('utf-8') - cls.__unicode__ = __unicode__ - - -def _AddSetListenerMethod(cls): - """Helper for _AddMessageMethods().""" - def SetListener(self, listener): - if listener is None: - self._listener = message_listener_mod.NullMessageListener() - else: - self._listener = listener - cls._SetListener = SetListener - - -def _BytesForNonRepeatedElement(value, field_number, field_type): - """Returns the number of bytes needed to serialize a non-repeated element. - The returned byte count includes space for tag information and any - other additional space associated with serializing value. - - Args: - value: Value we're serializing. - field_number: Field number of this value. (Since the field number - is stored as part of a varint-encoded tag, this has an impact - on the total bytes required to serialize the value). - field_type: The type of the field. One of the TYPE_* constants - within FieldDescriptor. - """ - try: - fn = type_checkers.TYPE_TO_BYTE_SIZE_FN[field_type] - return fn(field_number, value) - except KeyError: - raise message_mod.EncodeError('Unrecognized field type: %d' % field_type) - - -def _AddByteSizeMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - def ByteSize(self): - if not self._cached_byte_size_dirty: - return self._cached_byte_size - - size = 0 - for field_descriptor, field_value in self.ListFields(): - size += field_descriptor._sizer(field_value) - - self._cached_byte_size = size - self._cached_byte_size_dirty = False - self._listener_for_children.dirty = False - return size - - cls.ByteSize = ByteSize - - -def _AddSerializeToStringMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - def SerializeToString(self): - # Check if the message has all of its required fields set. - errors = [] - if not self.IsInitialized(): - raise message_mod.EncodeError( - 'Message is missing required fields: ' + - ','.join(self.FindInitializationErrors())) - return self.SerializePartialToString() - cls.SerializeToString = SerializeToString - - -def _AddSerializePartialToStringMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - - def SerializePartialToString(self): - out = StringIO() - self._InternalSerialize(out.write) - return out.getvalue() - cls.SerializePartialToString = SerializePartialToString - - def InternalSerialize(self, write_bytes): - for field_descriptor, field_value in self.ListFields(): - field_descriptor._encoder(write_bytes, field_value) - cls._InternalSerialize = InternalSerialize - - -def _AddMergeFromStringMethod(message_descriptor, cls): - """Helper for _AddMessageMethods().""" - def MergeFromString(self, serialized): - length = len(serialized) - try: - if self._InternalParse(serialized, 0, length) != length: - # The only reason _InternalParse would return early is if it - # encountered an end-group tag. - raise message_mod.DecodeError('Unexpected end-group tag.') - except IndexError: - raise message_mod.DecodeError('Truncated message.') - except struct.error, e: - raise message_mod.DecodeError(e) - return length # Return this for legacy reasons. - cls.MergeFromString = MergeFromString - - local_ReadTag = decoder.ReadTag - local_SkipField = decoder.SkipField - decoders_by_tag = cls._decoders_by_tag - - def InternalParse(self, buffer, pos, end): - self._Modified() - field_dict = self._fields - while pos != end: - (tag_bytes, new_pos) = local_ReadTag(buffer, pos) - field_decoder = decoders_by_tag.get(tag_bytes) - if field_decoder is None: - new_pos = local_SkipField(buffer, new_pos, end, tag_bytes) - if new_pos == -1: - return pos - pos = new_pos - else: - pos = field_decoder(buffer, new_pos, end, self, field_dict) - return pos - cls._InternalParse = InternalParse - - -def _AddIsInitializedMethod(message_descriptor, cls): - """Adds the IsInitialized and FindInitializationError methods to the - protocol message class.""" - - required_fields = [field for field in message_descriptor.fields - if field.label == _FieldDescriptor.LABEL_REQUIRED] - - def IsInitialized(self, errors=None): - """Checks if all required fields of a message are set. - - Args: - errors: A list which, if provided, will be populated with the field - paths of all missing required fields. - - Returns: - True iff the specified message has all required fields set. - """ - - # Performance is critical so we avoid HasField() and ListFields(). - - for field in required_fields: - if (field not in self._fields or - (field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE and - not self._fields[field]._is_present_in_parent)): - if errors is not None: - errors.extend(self.FindInitializationErrors()) - return False - - for field, value in self._fields.iteritems(): - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - if field.label == _FieldDescriptor.LABEL_REPEATED: - for element in value: - if not element.IsInitialized(): - if errors is not None: - errors.extend(self.FindInitializationErrors()) - return False - elif value._is_present_in_parent and not value.IsInitialized(): - if errors is not None: - errors.extend(self.FindInitializationErrors()) - return False - - return True - - cls.IsInitialized = IsInitialized - - def FindInitializationErrors(self): - """Finds required fields which are not initialized. - - Returns: - A list of strings. Each string is a path to an uninitialized field from - the top-level message, e.g. "foo.bar[5].baz". - """ - - errors = [] # simplify things - - for field in required_fields: - if not self.HasField(field.name): - errors.append(field.name) - - for field, value in self.ListFields(): - if field.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - if field.is_extension: - name = "(%s)" % field.full_name - else: - name = field.name - - if field.label == _FieldDescriptor.LABEL_REPEATED: - for i in xrange(len(value)): - element = value[i] - prefix = "%s[%d]." % (name, i) - sub_errors = element.FindInitializationErrors() - errors += [ prefix + error for error in sub_errors ] - else: - prefix = name + "." - sub_errors = value.FindInitializationErrors() - errors += [ prefix + error for error in sub_errors ] - - return errors - - cls.FindInitializationErrors = FindInitializationErrors - - -def _AddMergeFromMethod(cls): - LABEL_REPEATED = _FieldDescriptor.LABEL_REPEATED - CPPTYPE_MESSAGE = _FieldDescriptor.CPPTYPE_MESSAGE - - def MergeFrom(self, msg): - if not isinstance(msg, cls): - raise TypeError( - "Parameter to MergeFrom() must be instance of same class.") - - assert msg is not self - self._Modified() - - fields = self._fields - - for field, value in msg._fields.iteritems(): - if field.label == LABEL_REPEATED: - field_value = fields.get(field) - if field_value is None: - # Construct a new object to represent this field. - field_value = field._default_constructor(self) - fields[field] = field_value - field_value.MergeFrom(value) - elif field.cpp_type == CPPTYPE_MESSAGE: - if value._is_present_in_parent: - field_value = fields.get(field) - if field_value is None: - # Construct a new object to represent this field. - field_value = field._default_constructor(self) - fields[field] = field_value - field_value.MergeFrom(value) - else: - self._fields[field] = value - cls.MergeFrom = MergeFrom - - -def _AddMessageMethods(message_descriptor, cls): - """Adds implementations of all Message methods to cls.""" - _AddListFieldsMethod(message_descriptor, cls) - _AddHasFieldMethod(message_descriptor, cls) - _AddClearFieldMethod(message_descriptor, cls) - if message_descriptor.is_extendable: - _AddClearExtensionMethod(cls) - _AddHasExtensionMethod(cls) - _AddClearMethod(message_descriptor, cls) - _AddEqualsMethod(message_descriptor, cls) - _AddStrMethod(message_descriptor, cls) - _AddUnicodeMethod(message_descriptor, cls) - _AddSetListenerMethod(cls) - _AddByteSizeMethod(message_descriptor, cls) - _AddSerializeToStringMethod(message_descriptor, cls) - _AddSerializePartialToStringMethod(message_descriptor, cls) - _AddMergeFromStringMethod(message_descriptor, cls) - _AddIsInitializedMethod(message_descriptor, cls) - _AddMergeFromMethod(cls) - - -def _AddPrivateHelperMethods(cls): - """Adds implementation of private helper methods to cls.""" - - def Modified(self): - """Sets the _cached_byte_size_dirty bit to true, - and propagates this to our listener iff this was a state change. - """ - - # Note: Some callers check _cached_byte_size_dirty before calling - # _Modified() as an extra optimization. So, if this method is ever - # changed such that it does stuff even when _cached_byte_size_dirty is - # already true, the callers need to be updated. - if not self._cached_byte_size_dirty: - self._cached_byte_size_dirty = True - self._listener_for_children.dirty = True - self._is_present_in_parent = True - self._listener.Modified() - - cls._Modified = Modified - cls.SetInParent = Modified - - -class _Listener(object): - - """MessageListener implementation that a parent message registers with its - child message. - - In order to support semantics like: - - foo.bar.baz.qux = 23 - assert foo.HasField('bar') - - ...child objects must have back references to their parents. - This helper class is at the heart of this support. - """ - - def __init__(self, parent_message): - """Args: - parent_message: The message whose _Modified() method we should call when - we receive Modified() messages. - """ - # This listener establishes a back reference from a child (contained) object - # to its parent (containing) object. We make this a weak reference to avoid - # creating cyclic garbage when the client finishes with the 'parent' object - # in the tree. - if isinstance(parent_message, weakref.ProxyType): - self._parent_message_weakref = parent_message - else: - self._parent_message_weakref = weakref.proxy(parent_message) - - # As an optimization, we also indicate directly on the listener whether - # or not the parent message is dirty. This way we can avoid traversing - # up the tree in the common case. - self.dirty = False - - def Modified(self): - if self.dirty: - return - try: - # Propagate the signal to our parents iff this is the first field set. - self._parent_message_weakref._Modified() - except ReferenceError: - # We can get here if a client has kept a reference to a child object, - # and is now setting a field on it, but the child's parent has been - # garbage-collected. This is not an error. - pass - - -# TODO(robinson): Move elsewhere? This file is getting pretty ridiculous... -# TODO(robinson): Unify error handling of "unknown extension" crap. -# TODO(robinson): Support iteritems()-style iteration over all -# extensions with the "has" bits turned on? -class _ExtensionDict(object): - - """Dict-like container for supporting an indexable "Extensions" - field on proto instances. - - Note that in all cases we expect extension handles to be - FieldDescriptors. - """ - - def __init__(self, extended_message): - """extended_message: Message instance for which we are the Extensions dict. - """ - - self._extended_message = extended_message - - def __getitem__(self, extension_handle): - """Returns the current value of the given extension handle.""" - - _VerifyExtensionHandle(self._extended_message, extension_handle) - - result = self._extended_message._fields.get(extension_handle) - if result is not None: - return result - - if extension_handle.label == _FieldDescriptor.LABEL_REPEATED: - result = extension_handle._default_constructor(self._extended_message) - elif extension_handle.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE: - result = extension_handle.message_type._concrete_class() - try: - result._SetListener(self._extended_message._listener_for_children) - except ReferenceError: - pass - else: - # Singular scalar -- just return the default without inserting into the - # dict. - return extension_handle.default_value - - # Atomically check if another thread has preempted us and, if not, swap - # in the new object we just created. If someone has preempted us, we - # take that object and discard ours. - # WARNING: We are relying on setdefault() being atomic. This is true - # in CPython but we haven't investigated others. This warning appears - # in several other locations in this file. - result = self._extended_message._fields.setdefault( - extension_handle, result) - - return result - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return False - - my_fields = self._extended_message.ListFields() - other_fields = other._extended_message.ListFields() - - # Get rid of non-extension fields. - my_fields = [ field for field in my_fields if field.is_extension ] - other_fields = [ field for field in other_fields if field.is_extension ] - - return my_fields == other_fields - - def __ne__(self, other): - return not self == other - - def __hash__(self): - raise TypeError('unhashable object') - - # Note that this is only meaningful for non-repeated, scalar extension - # fields. Note also that we may have to call _Modified() when we do - # successfully set a field this way, to set any necssary "has" bits in the - # ancestors of the extended message. - def __setitem__(self, extension_handle, value): - """If extension_handle specifies a non-repeated, scalar extension - field, sets the value of that field. - """ - - _VerifyExtensionHandle(self._extended_message, extension_handle) - - if (extension_handle.label == _FieldDescriptor.LABEL_REPEATED or - extension_handle.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE): - raise TypeError( - 'Cannot assign to extension "%s" because it is a repeated or ' - 'composite type.' % extension_handle.full_name) - - # It's slightly wasteful to lookup the type checker each time, - # but we expect this to be a vanishingly uncommon case anyway. - type_checker = type_checkers.GetTypeChecker( - extension_handle.cpp_type, extension_handle.type) - type_checker.CheckValue(value) - self._extended_message._fields[extension_handle] = value - self._extended_message._Modified() - - def _FindExtensionByName(self, name): - """Tries to find a known extension with the specified name. - - Args: - name: Extension full name. - - Returns: - Extension field descriptor. - """ - return self._extended_message._extensions_by_name.get(name, None) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/reflection_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/reflection_test.py deleted file mode 100755 index 7b9d3398..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/reflection_test.py +++ /dev/null @@ -1,2421 +0,0 @@ -#! /usr/bin/python -# -*- coding: utf-8 -*- -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Unittest for reflection.py, which also indirectly tests the output of the -pure-Python protocol compiler. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - -import operator -import struct - -import unittest -from google.protobuf import unittest_import_pb2 -from google.protobuf import unittest_mset_pb2 -from google.protobuf import unittest_pb2 -from google.protobuf import descriptor_pb2 -from google.protobuf import descriptor -from google.protobuf import message -from google.protobuf import reflection -from google.protobuf.internal import api_implementation -from google.protobuf.internal import more_extensions_pb2 -from google.protobuf.internal import more_messages_pb2 -from google.protobuf.internal import wire_format -from google.protobuf.internal import test_util -from google.protobuf.internal import decoder - - -class _MiniDecoder(object): - """Decodes a stream of values from a string. - - Once upon a time we actually had a class called decoder.Decoder. Then we - got rid of it during a redesign that made decoding much, much faster overall. - But a couple tests in this file used it to check that the serialized form of - a message was correct. So, this class implements just the methods that were - used by said tests, so that we don't have to rewrite the tests. - """ - - def __init__(self, bytes): - self._bytes = bytes - self._pos = 0 - - def ReadVarint(self): - result, self._pos = decoder._DecodeVarint(self._bytes, self._pos) - return result - - ReadInt32 = ReadVarint - ReadInt64 = ReadVarint - ReadUInt32 = ReadVarint - ReadUInt64 = ReadVarint - - def ReadSInt64(self): - return wire_format.ZigZagDecode(self.ReadVarint()) - - ReadSInt32 = ReadSInt64 - - def ReadFieldNumberAndWireType(self): - return wire_format.UnpackTag(self.ReadVarint()) - - def ReadFloat(self): - result = struct.unpack("".', - text_format.Merge, text, message) - - text = 'RepeatedGroup: {' - self.assertRaisesWithMessage( - text_format.ParseError, '1:16 : Expected "}".', - text_format.Merge, text, message) - - def testMergeEmptyGroup(self): - message = unittest_pb2.TestAllTypes() - text = 'OptionalGroup: {}' - text_format.Merge(text, message) - self.assertTrue(message.HasField('optionalgroup')) - - message.Clear() - - message = unittest_pb2.TestAllTypes() - text = 'OptionalGroup: <>' - text_format.Merge(text, message) - self.assertTrue(message.HasField('optionalgroup')) - - def testMergeBadEnumValue(self): - message = unittest_pb2.TestAllTypes() - text = 'optional_nested_enum: BARR' - self.assertRaisesWithMessage( - text_format.ParseError, - ('1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" ' - 'has no value named BARR.'), - text_format.Merge, text, message) - - message = unittest_pb2.TestAllTypes() - text = 'optional_nested_enum: 100' - self.assertRaisesWithMessage( - text_format.ParseError, - ('1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" ' - 'has no value with number 100.'), - text_format.Merge, text, message) - - def assertRaisesWithMessage(self, e_class, e, func, *args, **kwargs): - """Same as assertRaises, but also compares the exception message.""" - if hasattr(e_class, '__name__'): - exc_name = e_class.__name__ - else: - exc_name = str(e_class) - - try: - func(*args, **kwargs) - except e_class, expr: - if str(expr) != e: - msg = '%s raised, but with wrong message: "%s" instead of "%s"' - raise self.failureException(msg % (exc_name, - str(expr).encode('string_escape'), - e.encode('string_escape'))) - return - else: - raise self.failureException('%s not raised' % exc_name) - - -class TokenizerTest(unittest.TestCase): - - def testSimpleTokenCases(self): - text = ('identifier1:"string1"\n \n\n' - 'identifier2 : \n \n123 \n identifier3 :\'string\'\n' - 'identifiER_4 : 1.1e+2 ID5:-0.23 ID6:\'aaaa\\\'bbbb\'\n' - 'ID7 : "aa\\"bb"\n\n\n\n ID8: {A:inf B:-inf C:true D:false}\n' - 'ID9: 22 ID10: -111111111111111111 ID11: -22\n' - 'ID12: 2222222222222222222 ' - 'false_bool: 0 true_BOOL:t \n true_bool1: 1 false_BOOL1:f ' ) - tokenizer = text_format._Tokenizer(text) - methods = [(tokenizer.ConsumeIdentifier, 'identifier1'), - ':', - (tokenizer.ConsumeString, 'string1'), - (tokenizer.ConsumeIdentifier, 'identifier2'), - ':', - (tokenizer.ConsumeInt32, 123), - (tokenizer.ConsumeIdentifier, 'identifier3'), - ':', - (tokenizer.ConsumeString, 'string'), - (tokenizer.ConsumeIdentifier, 'identifiER_4'), - ':', - (tokenizer.ConsumeFloat, 1.1e+2), - (tokenizer.ConsumeIdentifier, 'ID5'), - ':', - (tokenizer.ConsumeFloat, -0.23), - (tokenizer.ConsumeIdentifier, 'ID6'), - ':', - (tokenizer.ConsumeString, 'aaaa\'bbbb'), - (tokenizer.ConsumeIdentifier, 'ID7'), - ':', - (tokenizer.ConsumeString, 'aa\"bb'), - (tokenizer.ConsumeIdentifier, 'ID8'), - ':', - '{', - (tokenizer.ConsumeIdentifier, 'A'), - ':', - (tokenizer.ConsumeFloat, text_format._INFINITY), - (tokenizer.ConsumeIdentifier, 'B'), - ':', - (tokenizer.ConsumeFloat, -text_format._INFINITY), - (tokenizer.ConsumeIdentifier, 'C'), - ':', - (tokenizer.ConsumeBool, True), - (tokenizer.ConsumeIdentifier, 'D'), - ':', - (tokenizer.ConsumeBool, False), - '}', - (tokenizer.ConsumeIdentifier, 'ID9'), - ':', - (tokenizer.ConsumeUint32, 22), - (tokenizer.ConsumeIdentifier, 'ID10'), - ':', - (tokenizer.ConsumeInt64, -111111111111111111), - (tokenizer.ConsumeIdentifier, 'ID11'), - ':', - (tokenizer.ConsumeInt32, -22), - (tokenizer.ConsumeIdentifier, 'ID12'), - ':', - (tokenizer.ConsumeUint64, 2222222222222222222), - (tokenizer.ConsumeIdentifier, 'false_bool'), - ':', - (tokenizer.ConsumeBool, False), - (tokenizer.ConsumeIdentifier, 'true_BOOL'), - ':', - (tokenizer.ConsumeBool, True), - (tokenizer.ConsumeIdentifier, 'true_bool1'), - ':', - (tokenizer.ConsumeBool, True), - (tokenizer.ConsumeIdentifier, 'false_BOOL1'), - ':', - (tokenizer.ConsumeBool, False)] - - i = 0 - while not tokenizer.AtEnd(): - m = methods[i] - if type(m) == str: - token = tokenizer.token - self.assertEqual(token, m) - tokenizer.NextToken() - else: - self.assertEqual(m[1], m[0]()) - i += 1 - - def testConsumeIntegers(self): - # This test only tests the failures in the integer parsing methods as well - # as the '0' special cases. - int64_max = (1 << 63) - 1 - uint32_max = (1 << 32) - 1 - text = '-1 %d %d' % (uint32_max + 1, int64_max + 1) - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint32) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint64) - self.assertEqual(-1, tokenizer.ConsumeInt32()) - - self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint32) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeInt32) - self.assertEqual(uint32_max + 1, tokenizer.ConsumeInt64()) - - self.assertRaises(text_format.ParseError, tokenizer.ConsumeInt64) - self.assertEqual(int64_max + 1, tokenizer.ConsumeUint64()) - self.assertTrue(tokenizer.AtEnd()) - - text = '-0 -0 0 0' - tokenizer = text_format._Tokenizer(text) - self.assertEqual(0, tokenizer.ConsumeUint32()) - self.assertEqual(0, tokenizer.ConsumeUint64()) - self.assertEqual(0, tokenizer.ConsumeUint32()) - self.assertEqual(0, tokenizer.ConsumeUint64()) - self.assertTrue(tokenizer.AtEnd()) - - def testConsumeByteString(self): - text = '"string1\'' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString) - - text = 'string1"' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString) - - text = '\n"\\xt"' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString) - - text = '\n"\\"' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString) - - text = '\n"\\x"' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString) - - def testConsumeBool(self): - text = 'not-a-bool' - tokenizer = text_format._Tokenizer(text) - self.assertRaises(text_format.ParseError, tokenizer.ConsumeBool) - - def testInfNan(self): - # Make sure our infinity and NaN definitions are sound. - self.assertEquals(float, type(text_format._INFINITY)) - self.assertEquals(float, type(text_format._NAN)) - self.assertTrue(text_format._NAN != text_format._NAN) - - inf_times_zero = text_format._INFINITY * 0 - self.assertTrue(inf_times_zero != inf_times_zero) - self.assertTrue(text_format._INFINITY > 0) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/type_checkers.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/type_checkers.py deleted file mode 100755 index 2b3cd4de..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/type_checkers.py +++ /dev/null @@ -1,286 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Provides type checking routines. - -This module defines type checking utilities in the forms of dictionaries: - -VALUE_CHECKERS: A dictionary of field types and a value validation object. -TYPE_TO_BYTE_SIZE_FN: A dictionary with field types and a size computing - function. -TYPE_TO_SERIALIZE_METHOD: A dictionary with field types and serialization - function. -FIELD_TYPE_TO_WIRE_TYPE: A dictionary with field typed and their - coresponding wire types. -TYPE_TO_DESERIALIZE_METHOD: A dictionary with field types and deserialization - function. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - -from google.protobuf.internal import decoder -from google.protobuf.internal import encoder -from google.protobuf.internal import wire_format -from google.protobuf import descriptor - -_FieldDescriptor = descriptor.FieldDescriptor - - -def GetTypeChecker(cpp_type, field_type): - """Returns a type checker for a message field of the specified types. - - Args: - cpp_type: C++ type of the field (see descriptor.py). - field_type: Protocol message field type (see descriptor.py). - - Returns: - An instance of TypeChecker which can be used to verify the types - of values assigned to a field of the specified type. - """ - if (cpp_type == _FieldDescriptor.CPPTYPE_STRING and - field_type == _FieldDescriptor.TYPE_STRING): - return UnicodeValueChecker() - return _VALUE_CHECKERS[cpp_type] - - -# None of the typecheckers below make any attempt to guard against people -# subclassing builtin types and doing weird things. We're not trying to -# protect against malicious clients here, just people accidentally shooting -# themselves in the foot in obvious ways. - -class TypeChecker(object): - - """Type checker used to catch type errors as early as possible - when the client is setting scalar fields in protocol messages. - """ - - def __init__(self, *acceptable_types): - self._acceptable_types = acceptable_types - - def CheckValue(self, proposed_value): - if not isinstance(proposed_value, self._acceptable_types): - message = ('%.1024r has type %s, but expected one of: %s' % - (proposed_value, type(proposed_value), self._acceptable_types)) - raise TypeError(message) - - -# IntValueChecker and its subclasses perform integer type-checks -# and bounds-checks. -class IntValueChecker(object): - - """Checker used for integer fields. Performs type-check and range check.""" - - def CheckValue(self, proposed_value): - if not isinstance(proposed_value, (int, long)): - message = ('%.1024r has type %s, but expected one of: %s' % - (proposed_value, type(proposed_value), (int, long))) - raise TypeError(message) - if not self._MIN <= proposed_value <= self._MAX: - raise ValueError('Value out of range: %d' % proposed_value) - - -class UnicodeValueChecker(object): - - """Checker used for string fields.""" - - def CheckValue(self, proposed_value): - if not isinstance(proposed_value, (str, unicode)): - message = ('%.1024r has type %s, but expected one of: %s' % - (proposed_value, type(proposed_value), (str, unicode))) - raise TypeError(message) - - # If the value is of type 'str' make sure that it is in 7-bit ASCII - # encoding. - if isinstance(proposed_value, str): - try: - unicode(proposed_value, 'ascii') - except UnicodeDecodeError: - raise ValueError('%.1024r has type str, but isn\'t in 7-bit ASCII ' - 'encoding. Non-ASCII strings must be converted to ' - 'unicode objects before being added.' % - (proposed_value)) - - -class Int32ValueChecker(IntValueChecker): - # We're sure to use ints instead of longs here since comparison may be more - # efficient. - _MIN = -2147483648 - _MAX = 2147483647 - - -class Uint32ValueChecker(IntValueChecker): - _MIN = 0 - _MAX = (1 << 32) - 1 - - -class Int64ValueChecker(IntValueChecker): - _MIN = -(1 << 63) - _MAX = (1 << 63) - 1 - - -class Uint64ValueChecker(IntValueChecker): - _MIN = 0 - _MAX = (1 << 64) - 1 - - -# Type-checkers for all scalar CPPTYPEs. -_VALUE_CHECKERS = { - _FieldDescriptor.CPPTYPE_INT32: Int32ValueChecker(), - _FieldDescriptor.CPPTYPE_INT64: Int64ValueChecker(), - _FieldDescriptor.CPPTYPE_UINT32: Uint32ValueChecker(), - _FieldDescriptor.CPPTYPE_UINT64: Uint64ValueChecker(), - _FieldDescriptor.CPPTYPE_DOUBLE: TypeChecker( - float, int, long), - _FieldDescriptor.CPPTYPE_FLOAT: TypeChecker( - float, int, long), - _FieldDescriptor.CPPTYPE_BOOL: TypeChecker(bool, int), - _FieldDescriptor.CPPTYPE_ENUM: Int32ValueChecker(), - _FieldDescriptor.CPPTYPE_STRING: TypeChecker(str), - } - - -# Map from field type to a function F, such that F(field_num, value) -# gives the total byte size for a value of the given type. This -# byte size includes tag information and any other additional space -# associated with serializing "value". -TYPE_TO_BYTE_SIZE_FN = { - _FieldDescriptor.TYPE_DOUBLE: wire_format.DoubleByteSize, - _FieldDescriptor.TYPE_FLOAT: wire_format.FloatByteSize, - _FieldDescriptor.TYPE_INT64: wire_format.Int64ByteSize, - _FieldDescriptor.TYPE_UINT64: wire_format.UInt64ByteSize, - _FieldDescriptor.TYPE_INT32: wire_format.Int32ByteSize, - _FieldDescriptor.TYPE_FIXED64: wire_format.Fixed64ByteSize, - _FieldDescriptor.TYPE_FIXED32: wire_format.Fixed32ByteSize, - _FieldDescriptor.TYPE_BOOL: wire_format.BoolByteSize, - _FieldDescriptor.TYPE_STRING: wire_format.StringByteSize, - _FieldDescriptor.TYPE_GROUP: wire_format.GroupByteSize, - _FieldDescriptor.TYPE_MESSAGE: wire_format.MessageByteSize, - _FieldDescriptor.TYPE_BYTES: wire_format.BytesByteSize, - _FieldDescriptor.TYPE_UINT32: wire_format.UInt32ByteSize, - _FieldDescriptor.TYPE_ENUM: wire_format.EnumByteSize, - _FieldDescriptor.TYPE_SFIXED32: wire_format.SFixed32ByteSize, - _FieldDescriptor.TYPE_SFIXED64: wire_format.SFixed64ByteSize, - _FieldDescriptor.TYPE_SINT32: wire_format.SInt32ByteSize, - _FieldDescriptor.TYPE_SINT64: wire_format.SInt64ByteSize - } - - -# Maps from field types to encoder constructors. -TYPE_TO_ENCODER = { - _FieldDescriptor.TYPE_DOUBLE: encoder.DoubleEncoder, - _FieldDescriptor.TYPE_FLOAT: encoder.FloatEncoder, - _FieldDescriptor.TYPE_INT64: encoder.Int64Encoder, - _FieldDescriptor.TYPE_UINT64: encoder.UInt64Encoder, - _FieldDescriptor.TYPE_INT32: encoder.Int32Encoder, - _FieldDescriptor.TYPE_FIXED64: encoder.Fixed64Encoder, - _FieldDescriptor.TYPE_FIXED32: encoder.Fixed32Encoder, - _FieldDescriptor.TYPE_BOOL: encoder.BoolEncoder, - _FieldDescriptor.TYPE_STRING: encoder.StringEncoder, - _FieldDescriptor.TYPE_GROUP: encoder.GroupEncoder, - _FieldDescriptor.TYPE_MESSAGE: encoder.MessageEncoder, - _FieldDescriptor.TYPE_BYTES: encoder.BytesEncoder, - _FieldDescriptor.TYPE_UINT32: encoder.UInt32Encoder, - _FieldDescriptor.TYPE_ENUM: encoder.EnumEncoder, - _FieldDescriptor.TYPE_SFIXED32: encoder.SFixed32Encoder, - _FieldDescriptor.TYPE_SFIXED64: encoder.SFixed64Encoder, - _FieldDescriptor.TYPE_SINT32: encoder.SInt32Encoder, - _FieldDescriptor.TYPE_SINT64: encoder.SInt64Encoder, - } - - -# Maps from field types to sizer constructors. -TYPE_TO_SIZER = { - _FieldDescriptor.TYPE_DOUBLE: encoder.DoubleSizer, - _FieldDescriptor.TYPE_FLOAT: encoder.FloatSizer, - _FieldDescriptor.TYPE_INT64: encoder.Int64Sizer, - _FieldDescriptor.TYPE_UINT64: encoder.UInt64Sizer, - _FieldDescriptor.TYPE_INT32: encoder.Int32Sizer, - _FieldDescriptor.TYPE_FIXED64: encoder.Fixed64Sizer, - _FieldDescriptor.TYPE_FIXED32: encoder.Fixed32Sizer, - _FieldDescriptor.TYPE_BOOL: encoder.BoolSizer, - _FieldDescriptor.TYPE_STRING: encoder.StringSizer, - _FieldDescriptor.TYPE_GROUP: encoder.GroupSizer, - _FieldDescriptor.TYPE_MESSAGE: encoder.MessageSizer, - _FieldDescriptor.TYPE_BYTES: encoder.BytesSizer, - _FieldDescriptor.TYPE_UINT32: encoder.UInt32Sizer, - _FieldDescriptor.TYPE_ENUM: encoder.EnumSizer, - _FieldDescriptor.TYPE_SFIXED32: encoder.SFixed32Sizer, - _FieldDescriptor.TYPE_SFIXED64: encoder.SFixed64Sizer, - _FieldDescriptor.TYPE_SINT32: encoder.SInt32Sizer, - _FieldDescriptor.TYPE_SINT64: encoder.SInt64Sizer, - } - - -# Maps from field type to a decoder constructor. -TYPE_TO_DECODER = { - _FieldDescriptor.TYPE_DOUBLE: decoder.DoubleDecoder, - _FieldDescriptor.TYPE_FLOAT: decoder.FloatDecoder, - _FieldDescriptor.TYPE_INT64: decoder.Int64Decoder, - _FieldDescriptor.TYPE_UINT64: decoder.UInt64Decoder, - _FieldDescriptor.TYPE_INT32: decoder.Int32Decoder, - _FieldDescriptor.TYPE_FIXED64: decoder.Fixed64Decoder, - _FieldDescriptor.TYPE_FIXED32: decoder.Fixed32Decoder, - _FieldDescriptor.TYPE_BOOL: decoder.BoolDecoder, - _FieldDescriptor.TYPE_STRING: decoder.StringDecoder, - _FieldDescriptor.TYPE_GROUP: decoder.GroupDecoder, - _FieldDescriptor.TYPE_MESSAGE: decoder.MessageDecoder, - _FieldDescriptor.TYPE_BYTES: decoder.BytesDecoder, - _FieldDescriptor.TYPE_UINT32: decoder.UInt32Decoder, - _FieldDescriptor.TYPE_ENUM: decoder.EnumDecoder, - _FieldDescriptor.TYPE_SFIXED32: decoder.SFixed32Decoder, - _FieldDescriptor.TYPE_SFIXED64: decoder.SFixed64Decoder, - _FieldDescriptor.TYPE_SINT32: decoder.SInt32Decoder, - _FieldDescriptor.TYPE_SINT64: decoder.SInt64Decoder, - } - -# Maps from field type to expected wiretype. -FIELD_TYPE_TO_WIRE_TYPE = { - _FieldDescriptor.TYPE_DOUBLE: wire_format.WIRETYPE_FIXED64, - _FieldDescriptor.TYPE_FLOAT: wire_format.WIRETYPE_FIXED32, - _FieldDescriptor.TYPE_INT64: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_UINT64: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_INT32: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_FIXED64: wire_format.WIRETYPE_FIXED64, - _FieldDescriptor.TYPE_FIXED32: wire_format.WIRETYPE_FIXED32, - _FieldDescriptor.TYPE_BOOL: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_STRING: - wire_format.WIRETYPE_LENGTH_DELIMITED, - _FieldDescriptor.TYPE_GROUP: wire_format.WIRETYPE_START_GROUP, - _FieldDescriptor.TYPE_MESSAGE: - wire_format.WIRETYPE_LENGTH_DELIMITED, - _FieldDescriptor.TYPE_BYTES: - wire_format.WIRETYPE_LENGTH_DELIMITED, - _FieldDescriptor.TYPE_UINT32: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_ENUM: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_SFIXED32: wire_format.WIRETYPE_FIXED32, - _FieldDescriptor.TYPE_SFIXED64: wire_format.WIRETYPE_FIXED64, - _FieldDescriptor.TYPE_SINT32: wire_format.WIRETYPE_VARINT, - _FieldDescriptor.TYPE_SINT64: wire_format.WIRETYPE_VARINT, - } diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format.py deleted file mode 100755 index c941fe1a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format.py +++ /dev/null @@ -1,268 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Constants and static functions to support protocol buffer wire format.""" - -__author__ = 'robinson@google.com (Will Robinson)' - -import struct -from google.protobuf import descriptor -from google.protobuf import message - - -TAG_TYPE_BITS = 3 # Number of bits used to hold type info in a proto tag. -TAG_TYPE_MASK = (1 << TAG_TYPE_BITS) - 1 # 0x7 - -# These numbers identify the wire type of a protocol buffer value. -# We use the least-significant TAG_TYPE_BITS bits of the varint-encoded -# tag-and-type to store one of these WIRETYPE_* constants. -# These values must match WireType enum in google/protobuf/wire_format.h. -WIRETYPE_VARINT = 0 -WIRETYPE_FIXED64 = 1 -WIRETYPE_LENGTH_DELIMITED = 2 -WIRETYPE_START_GROUP = 3 -WIRETYPE_END_GROUP = 4 -WIRETYPE_FIXED32 = 5 -_WIRETYPE_MAX = 5 - - -# Bounds for various integer types. -INT32_MAX = int((1 << 31) - 1) -INT32_MIN = int(-(1 << 31)) -UINT32_MAX = (1 << 32) - 1 - -INT64_MAX = (1 << 63) - 1 -INT64_MIN = -(1 << 63) -UINT64_MAX = (1 << 64) - 1 - -# "struct" format strings that will encode/decode the specified formats. -FORMAT_UINT32_LITTLE_ENDIAN = '> TAG_TYPE_BITS), (tag & TAG_TYPE_MASK) - - -def ZigZagEncode(value): - """ZigZag Transform: Encodes signed integers so that they can be - effectively used with varint encoding. See wire_format.h for - more details. - """ - if value >= 0: - return value << 1 - return (value << 1) ^ (~0) - - -def ZigZagDecode(value): - """Inverse of ZigZagEncode().""" - if not value & 0x1: - return value >> 1 - return (value >> 1) ^ (~0) - - - -# The *ByteSize() functions below return the number of bytes required to -# serialize "field number + type" information and then serialize the value. - - -def Int32ByteSize(field_number, int32): - return Int64ByteSize(field_number, int32) - - -def Int32ByteSizeNoTag(int32): - return _VarUInt64ByteSizeNoTag(0xffffffffffffffff & int32) - - -def Int64ByteSize(field_number, int64): - # Have to convert to uint before calling UInt64ByteSize(). - return UInt64ByteSize(field_number, 0xffffffffffffffff & int64) - - -def UInt32ByteSize(field_number, uint32): - return UInt64ByteSize(field_number, uint32) - - -def UInt64ByteSize(field_number, uint64): - return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(uint64) - - -def SInt32ByteSize(field_number, int32): - return UInt32ByteSize(field_number, ZigZagEncode(int32)) - - -def SInt64ByteSize(field_number, int64): - return UInt64ByteSize(field_number, ZigZagEncode(int64)) - - -def Fixed32ByteSize(field_number, fixed32): - return TagByteSize(field_number) + 4 - - -def Fixed64ByteSize(field_number, fixed64): - return TagByteSize(field_number) + 8 - - -def SFixed32ByteSize(field_number, sfixed32): - return TagByteSize(field_number) + 4 - - -def SFixed64ByteSize(field_number, sfixed64): - return TagByteSize(field_number) + 8 - - -def FloatByteSize(field_number, flt): - return TagByteSize(field_number) + 4 - - -def DoubleByteSize(field_number, double): - return TagByteSize(field_number) + 8 - - -def BoolByteSize(field_number, b): - return TagByteSize(field_number) + 1 - - -def EnumByteSize(field_number, enum): - return UInt32ByteSize(field_number, enum) - - -def StringByteSize(field_number, string): - return BytesByteSize(field_number, string.encode('utf-8')) - - -def BytesByteSize(field_number, b): - return (TagByteSize(field_number) - + _VarUInt64ByteSizeNoTag(len(b)) - + len(b)) - - -def GroupByteSize(field_number, message): - return (2 * TagByteSize(field_number) # START and END group. - + message.ByteSize()) - - -def MessageByteSize(field_number, message): - return (TagByteSize(field_number) - + _VarUInt64ByteSizeNoTag(message.ByteSize()) - + message.ByteSize()) - - -def MessageSetItemByteSize(field_number, msg): - # First compute the sizes of the tags. - # There are 2 tags for the beginning and ending of the repeated group, that - # is field number 1, one with field number 2 (type_id) and one with field - # number 3 (message). - total_size = (2 * TagByteSize(1) + TagByteSize(2) + TagByteSize(3)) - - # Add the number of bytes for type_id. - total_size += _VarUInt64ByteSizeNoTag(field_number) - - message_size = msg.ByteSize() - - # The number of bytes for encoding the length of the message. - total_size += _VarUInt64ByteSizeNoTag(message_size) - - # The size of the message. - total_size += message_size - return total_size - - -def TagByteSize(field_number): - """Returns the bytes required to serialize a tag with this field number.""" - # Just pass in type 0, since the type won't affect the tag+type size. - return _VarUInt64ByteSizeNoTag(PackTag(field_number, 0)) - - -# Private helper function for the *ByteSize() functions above. - -def _VarUInt64ByteSizeNoTag(uint64): - """Returns the number of bytes required to serialize a single varint - using boundary value comparisons. (unrolled loop optimization -WPierce) - uint64 must be unsigned. - """ - if uint64 <= 0x7f: return 1 - if uint64 <= 0x3fff: return 2 - if uint64 <= 0x1fffff: return 3 - if uint64 <= 0xfffffff: return 4 - if uint64 <= 0x7ffffffff: return 5 - if uint64 <= 0x3ffffffffff: return 6 - if uint64 <= 0x1ffffffffffff: return 7 - if uint64 <= 0xffffffffffffff: return 8 - if uint64 <= 0x7fffffffffffffff: return 9 - if uint64 > UINT64_MAX: - raise message.EncodeError('Value out of range: %d' % uint64) - return 10 - - -NON_PACKABLE_TYPES = ( - descriptor.FieldDescriptor.TYPE_STRING, - descriptor.FieldDescriptor.TYPE_GROUP, - descriptor.FieldDescriptor.TYPE_MESSAGE, - descriptor.FieldDescriptor.TYPE_BYTES -) - - -def IsTypePackable(field_type): - """Return true iff packable = true is valid for fields of this type. - - Args: - field_type: a FieldDescriptor::Type value. - - Returns: - True iff fields of this type are packable. - """ - return field_type not in NON_PACKABLE_TYPES diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format_test.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format_test.py deleted file mode 100755 index 76007786..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format_test.py +++ /dev/null @@ -1,253 +0,0 @@ -#! /usr/bin/python -# -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Test for google.protobuf.internal.wire_format.""" - -__author__ = 'robinson@google.com (Will Robinson)' - -import unittest -from google.protobuf import message -from google.protobuf.internal import wire_format - - -class WireFormatTest(unittest.TestCase): - - def testPackTag(self): - field_number = 0xabc - tag_type = 2 - self.assertEqual((field_number << 3) | tag_type, - wire_format.PackTag(field_number, tag_type)) - PackTag = wire_format.PackTag - # Number too high. - self.assertRaises(message.EncodeError, PackTag, field_number, 6) - # Number too low. - self.assertRaises(message.EncodeError, PackTag, field_number, -1) - - def testUnpackTag(self): - # Test field numbers that will require various varint sizes. - for expected_field_number in (1, 15, 16, 2047, 2048): - for expected_wire_type in range(6): # Highest-numbered wiretype is 5. - field_number, wire_type = wire_format.UnpackTag( - wire_format.PackTag(expected_field_number, expected_wire_type)) - self.assertEqual(expected_field_number, field_number) - self.assertEqual(expected_wire_type, wire_type) - - self.assertRaises(TypeError, wire_format.UnpackTag, None) - self.assertRaises(TypeError, wire_format.UnpackTag, 'abc') - self.assertRaises(TypeError, wire_format.UnpackTag, 0.0) - self.assertRaises(TypeError, wire_format.UnpackTag, object()) - - def testZigZagEncode(self): - Z = wire_format.ZigZagEncode - self.assertEqual(0, Z(0)) - self.assertEqual(1, Z(-1)) - self.assertEqual(2, Z(1)) - self.assertEqual(3, Z(-2)) - self.assertEqual(4, Z(2)) - self.assertEqual(0xfffffffe, Z(0x7fffffff)) - self.assertEqual(0xffffffff, Z(-0x80000000)) - self.assertEqual(0xfffffffffffffffe, Z(0x7fffffffffffffff)) - self.assertEqual(0xffffffffffffffff, Z(-0x8000000000000000)) - - self.assertRaises(TypeError, Z, None) - self.assertRaises(TypeError, Z, 'abcd') - self.assertRaises(TypeError, Z, 0.0) - self.assertRaises(TypeError, Z, object()) - - def testZigZagDecode(self): - Z = wire_format.ZigZagDecode - self.assertEqual(0, Z(0)) - self.assertEqual(-1, Z(1)) - self.assertEqual(1, Z(2)) - self.assertEqual(-2, Z(3)) - self.assertEqual(2, Z(4)) - self.assertEqual(0x7fffffff, Z(0xfffffffe)) - self.assertEqual(-0x80000000, Z(0xffffffff)) - self.assertEqual(0x7fffffffffffffff, Z(0xfffffffffffffffe)) - self.assertEqual(-0x8000000000000000, Z(0xffffffffffffffff)) - - self.assertRaises(TypeError, Z, None) - self.assertRaises(TypeError, Z, 'abcd') - self.assertRaises(TypeError, Z, 0.0) - self.assertRaises(TypeError, Z, object()) - - def NumericByteSizeTestHelper(self, byte_size_fn, value, expected_value_size): - # Use field numbers that cause various byte sizes for the tag information. - for field_number, tag_bytes in ((15, 1), (16, 2), (2047, 2), (2048, 3)): - expected_size = expected_value_size + tag_bytes - actual_size = byte_size_fn(field_number, value) - self.assertEqual(expected_size, actual_size, - 'byte_size_fn: %s, field_number: %d, value: %r\n' - 'Expected: %d, Actual: %d'% ( - byte_size_fn, field_number, value, expected_size, actual_size)) - - def testByteSizeFunctions(self): - # Test all numeric *ByteSize() functions. - NUMERIC_ARGS = [ - # Int32ByteSize(). - [wire_format.Int32ByteSize, 0, 1], - [wire_format.Int32ByteSize, 127, 1], - [wire_format.Int32ByteSize, 128, 2], - [wire_format.Int32ByteSize, -1, 10], - # Int64ByteSize(). - [wire_format.Int64ByteSize, 0, 1], - [wire_format.Int64ByteSize, 127, 1], - [wire_format.Int64ByteSize, 128, 2], - [wire_format.Int64ByteSize, -1, 10], - # UInt32ByteSize(). - [wire_format.UInt32ByteSize, 0, 1], - [wire_format.UInt32ByteSize, 127, 1], - [wire_format.UInt32ByteSize, 128, 2], - [wire_format.UInt32ByteSize, wire_format.UINT32_MAX, 5], - # UInt64ByteSize(). - [wire_format.UInt64ByteSize, 0, 1], - [wire_format.UInt64ByteSize, 127, 1], - [wire_format.UInt64ByteSize, 128, 2], - [wire_format.UInt64ByteSize, wire_format.UINT64_MAX, 10], - # SInt32ByteSize(). - [wire_format.SInt32ByteSize, 0, 1], - [wire_format.SInt32ByteSize, -1, 1], - [wire_format.SInt32ByteSize, 1, 1], - [wire_format.SInt32ByteSize, -63, 1], - [wire_format.SInt32ByteSize, 63, 1], - [wire_format.SInt32ByteSize, -64, 1], - [wire_format.SInt32ByteSize, 64, 2], - # SInt64ByteSize(). - [wire_format.SInt64ByteSize, 0, 1], - [wire_format.SInt64ByteSize, -1, 1], - [wire_format.SInt64ByteSize, 1, 1], - [wire_format.SInt64ByteSize, -63, 1], - [wire_format.SInt64ByteSize, 63, 1], - [wire_format.SInt64ByteSize, -64, 1], - [wire_format.SInt64ByteSize, 64, 2], - # Fixed32ByteSize(). - [wire_format.Fixed32ByteSize, 0, 4], - [wire_format.Fixed32ByteSize, wire_format.UINT32_MAX, 4], - # Fixed64ByteSize(). - [wire_format.Fixed64ByteSize, 0, 8], - [wire_format.Fixed64ByteSize, wire_format.UINT64_MAX, 8], - # SFixed32ByteSize(). - [wire_format.SFixed32ByteSize, 0, 4], - [wire_format.SFixed32ByteSize, wire_format.INT32_MIN, 4], - [wire_format.SFixed32ByteSize, wire_format.INT32_MAX, 4], - # SFixed64ByteSize(). - [wire_format.SFixed64ByteSize, 0, 8], - [wire_format.SFixed64ByteSize, wire_format.INT64_MIN, 8], - [wire_format.SFixed64ByteSize, wire_format.INT64_MAX, 8], - # FloatByteSize(). - [wire_format.FloatByteSize, 0.0, 4], - [wire_format.FloatByteSize, 1000000000.0, 4], - [wire_format.FloatByteSize, -1000000000.0, 4], - # DoubleByteSize(). - [wire_format.DoubleByteSize, 0.0, 8], - [wire_format.DoubleByteSize, 1000000000.0, 8], - [wire_format.DoubleByteSize, -1000000000.0, 8], - # BoolByteSize(). - [wire_format.BoolByteSize, False, 1], - [wire_format.BoolByteSize, True, 1], - # EnumByteSize(). - [wire_format.EnumByteSize, 0, 1], - [wire_format.EnumByteSize, 127, 1], - [wire_format.EnumByteSize, 128, 2], - [wire_format.EnumByteSize, wire_format.UINT32_MAX, 5], - ] - for args in NUMERIC_ARGS: - self.NumericByteSizeTestHelper(*args) - - # Test strings and bytes. - for byte_size_fn in (wire_format.StringByteSize, wire_format.BytesByteSize): - # 1 byte for tag, 1 byte for length, 3 bytes for contents. - self.assertEqual(5, byte_size_fn(10, 'abc')) - # 2 bytes for tag, 1 byte for length, 3 bytes for contents. - self.assertEqual(6, byte_size_fn(16, 'abc')) - # 2 bytes for tag, 2 bytes for length, 128 bytes for contents. - self.assertEqual(132, byte_size_fn(16, 'a' * 128)) - - # Test UTF-8 string byte size calculation. - # 1 byte for tag, 1 byte for length, 8 bytes for content. - self.assertEqual(10, wire_format.StringByteSize( - 5, unicode('\xd0\xa2\xd0\xb5\xd1\x81\xd1\x82', 'utf-8'))) - - class MockMessage(object): - def __init__(self, byte_size): - self.byte_size = byte_size - def ByteSize(self): - return self.byte_size - - message_byte_size = 10 - mock_message = MockMessage(byte_size=message_byte_size) - # Test groups. - # (2 * 1) bytes for begin and end tags, plus message_byte_size. - self.assertEqual(2 + message_byte_size, - wire_format.GroupByteSize(1, mock_message)) - # (2 * 2) bytes for begin and end tags, plus message_byte_size. - self.assertEqual(4 + message_byte_size, - wire_format.GroupByteSize(16, mock_message)) - - # Test messages. - # 1 byte for tag, plus 1 byte for length, plus contents. - self.assertEqual(2 + mock_message.byte_size, - wire_format.MessageByteSize(1, mock_message)) - # 2 bytes for tag, plus 1 byte for length, plus contents. - self.assertEqual(3 + mock_message.byte_size, - wire_format.MessageByteSize(16, mock_message)) - # 2 bytes for tag, plus 2 bytes for length, plus contents. - mock_message.byte_size = 128 - self.assertEqual(4 + mock_message.byte_size, - wire_format.MessageByteSize(16, mock_message)) - - - # Test message set item byte size. - # 4 bytes for tags, plus 1 byte for length, plus 1 byte for type_id, - # plus contents. - mock_message.byte_size = 10 - self.assertEqual(mock_message.byte_size + 6, - wire_format.MessageSetItemByteSize(1, mock_message)) - - # 4 bytes for tags, plus 2 bytes for length, plus 1 byte for type_id, - # plus contents. - mock_message.byte_size = 128 - self.assertEqual(mock_message.byte_size + 7, - wire_format.MessageSetItemByteSize(1, mock_message)) - - # 4 bytes for tags, plus 2 bytes for length, plus 2 byte for type_id, - # plus contents. - self.assertEqual(mock_message.byte_size + 8, - wire_format.MessageSetItemByteSize(128, mock_message)) - - # Too-long varint. - self.assertRaises(message.EncodeError, - wire_format.UInt64ByteSize, 1, 1 << 128) - - -if __name__ == '__main__': - unittest.main() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/message.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/message.py deleted file mode 100755 index 6f19f85f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/message.py +++ /dev/null @@ -1,268 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# TODO(robinson): We should just make these methods all "pure-virtual" and move -# all implementation out, into reflection.py for now. - - -"""Contains an abstract base class for protocol messages.""" - -__author__ = 'robinson@google.com (Will Robinson)' - - -class Error(Exception): pass -class DecodeError(Error): pass -class EncodeError(Error): pass - - -class Message(object): - - """Abstract base class for protocol messages. - - Protocol message classes are almost always generated by the protocol - compiler. These generated types subclass Message and implement the methods - shown below. - - TODO(robinson): Link to an HTML document here. - - TODO(robinson): Document that instances of this class will also - have an Extensions attribute with __getitem__ and __setitem__. - Again, not sure how to best convey this. - - TODO(robinson): Document that the class must also have a static - RegisterExtension(extension_field) method. - Not sure how to best express at this point. - """ - - # TODO(robinson): Document these fields and methods. - - __slots__ = [] - - DESCRIPTOR = None - - def __deepcopy__(self, memo=None): - clone = type(self)() - clone.MergeFrom(self) - return clone - - def __eq__(self, other_msg): - raise NotImplementedError - - def __ne__(self, other_msg): - # Can't just say self != other_msg, since that would infinitely recurse. :) - return not self == other_msg - - def __hash__(self): - raise TypeError('unhashable object') - - def __str__(self): - raise NotImplementedError - - def __unicode__(self): - raise NotImplementedError - - def MergeFrom(self, other_msg): - """Merges the contents of the specified message into current message. - - This method merges the contents of the specified message into the current - message. Singular fields that are set in the specified message overwrite - the corresponding fields in the current message. Repeated fields are - appended. Singular sub-messages and groups are recursively merged. - - Args: - other_msg: Message to merge into the current message. - """ - raise NotImplementedError - - def CopyFrom(self, other_msg): - """Copies the content of the specified message into the current message. - - The method clears the current message and then merges the specified - message using MergeFrom. - - Args: - other_msg: Message to copy into the current one. - """ - if self is other_msg: - return - self.Clear() - self.MergeFrom(other_msg) - - def Clear(self): - """Clears all data that was set in the message.""" - raise NotImplementedError - - def SetInParent(self): - """Mark this as present in the parent. - - This normally happens automatically when you assign a field of a - sub-message, but sometimes you want to make the sub-message - present while keeping it empty. If you find yourself using this, - you may want to reconsider your design.""" - raise NotImplementedError - - def IsInitialized(self): - """Checks if the message is initialized. - - Returns: - The method returns True if the message is initialized (i.e. all of its - required fields are set). - """ - raise NotImplementedError - - # TODO(robinson): MergeFromString() should probably return None and be - # implemented in terms of a helper that returns the # of bytes read. Our - # deserialization routines would use the helper when recursively - # deserializing, but the end user would almost always just want the no-return - # MergeFromString(). - - def MergeFromString(self, serialized): - """Merges serialized protocol buffer data into this message. - - When we find a field in |serialized| that is already present - in this message: - - If it's a "repeated" field, we append to the end of our list. - - Else, if it's a scalar, we overwrite our field. - - Else, (it's a nonrepeated composite), we recursively merge - into the existing composite. - - TODO(robinson): Document handling of unknown fields. - - Args: - serialized: Any object that allows us to call buffer(serialized) - to access a string of bytes using the buffer interface. - - TODO(robinson): When we switch to a helper, this will return None. - - Returns: - The number of bytes read from |serialized|. - For non-group messages, this will always be len(serialized), - but for messages which are actually groups, this will - generally be less than len(serialized), since we must - stop when we reach an END_GROUP tag. Note that if - we *do* stop because of an END_GROUP tag, the number - of bytes returned does not include the bytes - for the END_GROUP tag information. - """ - raise NotImplementedError - - def ParseFromString(self, serialized): - """Like MergeFromString(), except we clear the object first.""" - self.Clear() - self.MergeFromString(serialized) - - def SerializeToString(self): - """Serializes the protocol message to a binary string. - - Returns: - A binary string representation of the message if all of the required - fields in the message are set (i.e. the message is initialized). - - Raises: - message.EncodeError if the message isn't initialized. - """ - raise NotImplementedError - - def SerializePartialToString(self): - """Serializes the protocol message to a binary string. - - This method is similar to SerializeToString but doesn't check if the - message is initialized. - - Returns: - A string representation of the partial message. - """ - raise NotImplementedError - - # TODO(robinson): Decide whether we like these better - # than auto-generated has_foo() and clear_foo() methods - # on the instances themselves. This way is less consistent - # with C++, but it makes reflection-type access easier and - # reduces the number of magically autogenerated things. - # - # TODO(robinson): Be sure to document (and test) exactly - # which field names are accepted here. Are we case-sensitive? - # What do we do with fields that share names with Python keywords - # like 'lambda' and 'yield'? - # - # nnorwitz says: - # """ - # Typically (in python), an underscore is appended to names that are - # keywords. So they would become lambda_ or yield_. - # """ - def ListFields(self): - """Returns a list of (FieldDescriptor, value) tuples for all - fields in the message which are not empty. A singular field is non-empty - if HasField() would return true, and a repeated field is non-empty if - it contains at least one element. The fields are ordered by field - number""" - raise NotImplementedError - - def HasField(self, field_name): - """Checks if a certain field is set for the message. Note if the - field_name is not defined in the message descriptor, ValueError will be - raised.""" - raise NotImplementedError - - def ClearField(self, field_name): - raise NotImplementedError - - def HasExtension(self, extension_handle): - raise NotImplementedError - - def ClearExtension(self, extension_handle): - raise NotImplementedError - - def ByteSize(self): - """Returns the serialized size of this message. - Recursively calls ByteSize() on all contained messages. - """ - raise NotImplementedError - - def _SetListener(self, message_listener): - """Internal method used by the protocol message implementation. - Clients should not call this directly. - - Sets a listener that this message will call on certain state transitions. - - The purpose of this method is to register back-edges from children to - parents at runtime, for the purpose of setting "has" bits and - byte-size-dirty bits in the parent and ancestor objects whenever a child or - descendant object is modified. - - If the client wants to disconnect this Message from the object tree, she - explicitly sets callback to None. - - If message_listener is None, unregisters any existing listener. Otherwise, - message_listener must implement the MessageListener interface in - internal/message_listener.py, and we discard any listener registered - via a previous _SetListener() call. - """ - raise NotImplementedError diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python-proto2.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python-proto2.cc deleted file mode 100644 index f2799e62..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python-proto2.cc +++ /dev/null @@ -1,1658 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: petar@google.com (Petar Petrov) - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* Is 64bit */ -#define IS_64BIT (SIZEOF_LONG == 8) - -#define FIELD_BELONGS_TO_MESSAGE(field_descriptor, message) \ - ((message)->GetDescriptor() == (field_descriptor)->containing_type()) - -#define FIELD_IS_REPEATED(field_descriptor) \ - ((field_descriptor)->label() == google::protobuf::FieldDescriptor::LABEL_REPEATED) - -#define GOOGLE_CHECK_GET_INT32(arg, value) \ - int32 value; \ - if (!CheckAndGetInteger(arg, &value, kint32min_py, kint32max_py)) { \ - return NULL; \ - } - -#define GOOGLE_CHECK_GET_INT64(arg, value) \ - int64 value; \ - if (!CheckAndGetInteger(arg, &value, kint64min_py, kint64max_py)) { \ - return NULL; \ - } - -#define GOOGLE_CHECK_GET_UINT32(arg, value) \ - uint32 value; \ - if (!CheckAndGetInteger(arg, &value, kPythonZero, kuint32max_py)) { \ - return NULL; \ - } - -#define GOOGLE_CHECK_GET_UINT64(arg, value) \ - uint64 value; \ - if (!CheckAndGetInteger(arg, &value, kPythonZero, kuint64max_py)) { \ - return NULL; \ - } - -#define GOOGLE_CHECK_GET_FLOAT(arg, value) \ - float value; \ - if (!CheckAndGetFloat(arg, &value)) { \ - return NULL; \ - } \ - -#define GOOGLE_CHECK_GET_DOUBLE(arg, value) \ - double value; \ - if (!CheckAndGetDouble(arg, &value)) { \ - return NULL; \ - } - -#define GOOGLE_CHECK_GET_BOOL(arg, value) \ - bool value; \ - if (!CheckAndGetBool(arg, &value)) { \ - return NULL; \ - } - -#define C(str) const_cast(str) - -// --- Globals: - -// Constants used for integer type range checking. -static PyObject* kPythonZero; -static PyObject* kint32min_py; -static PyObject* kint32max_py; -static PyObject* kuint32max_py; -static PyObject* kint64min_py; -static PyObject* kint64max_py; -static PyObject* kuint64max_py; - -namespace google { -namespace protobuf { -namespace python { - -// --- Support Routines: - -static void AddConstants(PyObject* module) { - struct NameValue { - char* name; - int32 value; - } constants[] = { - // Labels: - {"LABEL_OPTIONAL", google::protobuf::FieldDescriptor::LABEL_OPTIONAL}, - {"LABEL_REQUIRED", google::protobuf::FieldDescriptor::LABEL_REQUIRED}, - {"LABEL_REPEATED", google::protobuf::FieldDescriptor::LABEL_REPEATED}, - // CPP types: - {"CPPTYPE_MESSAGE", google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE}, - // Field Types: - {"TYPE_MESSAGE", google::protobuf::FieldDescriptor::TYPE_MESSAGE}, - // End. - {NULL, 0} - }; - - for (NameValue* constant = constants; - constant->name != NULL; constant++) { - PyModule_AddIntConstant(module, constant->name, constant->value); - } -} - -// --- CMessage Custom Type: - -// ------ Type Forward Declaration: - -struct CMessage; -struct CMessage_Type; - -static void CMessageDealloc(CMessage* self); -static int CMessageInit(CMessage* self, PyObject *args, PyObject *kwds); -static PyObject* CMessageStr(CMessage* self); - -static PyObject* CMessage_AddMessage(CMessage* self, PyObject* args); -static PyObject* CMessage_AddRepeatedScalar(CMessage* self, PyObject* args); -static PyObject* CMessage_AssignRepeatedScalar(CMessage* self, PyObject* args); -static PyObject* CMessage_ByteSize(CMessage* self, PyObject* args); -static PyObject* CMessage_Clear(CMessage* self, PyObject* args); -static PyObject* CMessage_ClearField(CMessage* self, PyObject* args); -static PyObject* CMessage_ClearFieldByDescriptor( - CMessage* self, PyObject* args); -static PyObject* CMessage_CopyFrom(CMessage* self, PyObject* args); -static PyObject* CMessage_DebugString(CMessage* self, PyObject* args); -static PyObject* CMessage_DeleteRepeatedField(CMessage* self, PyObject* args); -static PyObject* CMessage_Equals(CMessage* self, PyObject* args); -static PyObject* CMessage_FieldLength(CMessage* self, PyObject* args); -static PyObject* CMessage_FindInitializationErrors(CMessage* self); -static PyObject* CMessage_GetRepeatedMessage(CMessage* self, PyObject* args); -static PyObject* CMessage_GetRepeatedScalar(CMessage* self, PyObject* args); -static PyObject* CMessage_GetScalar(CMessage* self, PyObject* args); -static PyObject* CMessage_HasField(CMessage* self, PyObject* args); -static PyObject* CMessage_HasFieldByDescriptor(CMessage* self, PyObject* args); -static PyObject* CMessage_IsInitialized(CMessage* self, PyObject* args); -static PyObject* CMessage_ListFields(CMessage* self, PyObject* args); -static PyObject* CMessage_MergeFrom(CMessage* self, PyObject* args); -static PyObject* CMessage_MergeFromString(CMessage* self, PyObject* args); -static PyObject* CMessage_MutableMessage(CMessage* self, PyObject* args); -static PyObject* CMessage_NewSubMessage(CMessage* self, PyObject* args); -static PyObject* CMessage_SetScalar(CMessage* self, PyObject* args); -static PyObject* CMessage_SerializePartialToString( - CMessage* self, PyObject* args); -static PyObject* CMessage_SerializeToString(CMessage* self, PyObject* args); -static PyObject* CMessage_SetInParent(CMessage* self, PyObject* args); -static PyObject* CMessage_SwapRepeatedFieldElements( - CMessage* self, PyObject* args); - -// ------ Object Definition: - -typedef struct CMessage { - PyObject_HEAD - - struct CMessage* parent; // NULL if wasn't created from another message. - CFieldDescriptor* parent_field; - const char* full_name; - google::protobuf::Message* message; - bool free_message; - bool read_only; -} CMessage; - -// ------ Method Table: - -#define CMETHOD(name, args, doc) \ - { C(#name), (PyCFunction)CMessage_##name, args, C(doc) } -static PyMethodDef CMessageMethods[] = { - CMETHOD(AddMessage, METH_O, - "Adds a new message to a repeated composite field."), - CMETHOD(AddRepeatedScalar, METH_VARARGS, - "Adds a scalar to a repeated scalar field."), - CMETHOD(AssignRepeatedScalar, METH_VARARGS, - "Clears and sets the values of a repeated scalar field."), - CMETHOD(ByteSize, METH_NOARGS, - "Returns the size of the message in bytes."), - CMETHOD(Clear, METH_NOARGS, - "Clears a protocol message."), - CMETHOD(ClearField, METH_O, - "Clears a protocol message field by name."), - CMETHOD(ClearFieldByDescriptor, METH_O, - "Clears a protocol message field by descriptor."), - CMETHOD(CopyFrom, METH_O, - "Copies a protocol message into the current message."), - CMETHOD(DebugString, METH_NOARGS, - "Returns the debug string of a protocol message."), - CMETHOD(DeleteRepeatedField, METH_VARARGS, - "Deletes a slice of values from a repeated field."), - CMETHOD(Equals, METH_O, - "Checks if two protocol messages are equal (by identity)."), - CMETHOD(FieldLength, METH_O, - "Returns the number of elements in a repeated field."), - CMETHOD(FindInitializationErrors, METH_NOARGS, - "Returns the initialization errors of a message."), - CMETHOD(GetRepeatedMessage, METH_VARARGS, - "Returns a message from a repeated composite field."), - CMETHOD(GetRepeatedScalar, METH_VARARGS, - "Returns a scalar value from a repeated scalar field."), - CMETHOD(GetScalar, METH_O, - "Returns the scalar value of a field."), - CMETHOD(HasField, METH_O, - "Checks if a message field is set."), - CMETHOD(HasFieldByDescriptor, METH_O, - "Checks if a message field is set by given its descriptor"), - CMETHOD(IsInitialized, METH_NOARGS, - "Checks if all required fields of a protocol message are set."), - CMETHOD(ListFields, METH_NOARGS, - "Lists all set fields of a message."), - CMETHOD(MergeFrom, METH_O, - "Merges a protocol message into the current message."), - CMETHOD(MergeFromString, METH_O, - "Merges a serialized message into the current message."), - CMETHOD(MutableMessage, METH_O, - "Returns a new instance of a nested protocol message."), - CMETHOD(NewSubMessage, METH_O, - "Creates and returns a python message given the descriptor of a " - "composite field of the current message."), - CMETHOD(SetScalar, METH_VARARGS, - "Sets the value of a singular scalar field."), - CMETHOD(SerializePartialToString, METH_VARARGS, - "Serializes the message to a string, even if it isn't initialized."), - CMETHOD(SerializeToString, METH_NOARGS, - "Serializes the message to a string, only for initialized messages."), - CMETHOD(SetInParent, METH_NOARGS, - "Sets the has bit of the given field in its parent message."), - CMETHOD(SwapRepeatedFieldElements, METH_VARARGS, - "Swaps the elements in two positions in a repeated field."), - { NULL, NULL } -}; -#undef CMETHOD - -static PyMemberDef CMessageMembers[] = { - { C("full_name"), T_STRING, offsetof(CMessage, full_name), 0, "Full name" }, - { NULL } -}; - -// ------ Type Definition: - -// The definition for the type object that captures the type of CMessage -// in Python. -PyTypeObject CMessage_Type = { - PyObject_HEAD_INIT(&PyType_Type) - 0, - C("google3.net.google.protobuf.python.internal." - "_net_proto2___python." - "CMessage"), // tp_name - sizeof(CMessage), // tp_basicsize - 0, // tp_itemsize - (destructor)CMessageDealloc, // tp_dealloc - 0, // tp_print - 0, // tp_getattr - 0, // tp_setattr - 0, // tp_compare - 0, // tp_repr - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - 0, // tp_hash - 0, // tp_call - (reprfunc)CMessageStr, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_DEFAULT, // tp_flags - C("A ProtocolMessage"), // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0, // tp_weaklistoffset - 0, // tp_iter - 0, // tp_iternext - CMessageMethods, // tp_methods - CMessageMembers, // tp_members - 0, // tp_getset - 0, // tp_base - 0, // tp_dict - 0, // tp_descr_get - 0, // tp_descr_set - 0, // tp_dictoffset - (initproc)CMessageInit, // tp_init - PyType_GenericAlloc, // tp_alloc - PyType_GenericNew, // tp_new - PyObject_Del, // tp_free -}; - -// ------ Helper Functions: - -static void FormatTypeError(PyObject* arg, char* expected_types) { - PyObject* s = PyObject_Str(PyObject_Type(arg)); - PyObject* repr = PyObject_Repr(PyObject_Type(arg)); - PyErr_Format(PyExc_TypeError, - "%.100s has type %.100s, but expected one of: %s", - PyString_AS_STRING(repr), - PyString_AS_STRING(s), - expected_types); - Py_DECREF(s); - Py_DECREF(repr); -} - -template -static bool CheckAndGetInteger( - PyObject* arg, T* value, PyObject* min, PyObject* max) { - bool is_long = PyLong_Check(arg); - if (!PyInt_Check(arg) && !is_long) { - FormatTypeError(arg, "int, long"); - return false; - } - - if (PyObject_Compare(min, arg) > 0 || PyObject_Compare(max, arg) < 0) { - PyObject* s = PyObject_Str(arg); - PyErr_Format(PyExc_ValueError, - "Value out of range: %s", - PyString_AS_STRING(s)); - Py_DECREF(s); - return false; - } - if (is_long) { - if (min == kPythonZero) { - *value = static_cast(PyLong_AsUnsignedLongLong(arg)); - } else { - *value = static_cast(PyLong_AsLongLong(arg)); - } - } else { - *value = static_cast(PyInt_AsLong(arg)); - } - return true; -} - -static bool CheckAndGetDouble(PyObject* arg, double* value) { - if (!PyInt_Check(arg) && !PyLong_Check(arg) && - !PyFloat_Check(arg)) { - FormatTypeError(arg, "int, long, float"); - return false; - } - *value = PyFloat_AsDouble(arg); - return true; -} - -static bool CheckAndGetFloat(PyObject* arg, float* value) { - double double_value; - if (!CheckAndGetDouble(arg, &double_value)) { - return false; - } - *value = static_cast(double_value); - return true; -} - -static bool CheckAndGetBool(PyObject* arg, bool* value) { - if (!PyInt_Check(arg) && !PyBool_Check(arg) && !PyLong_Check(arg)) { - FormatTypeError(arg, "int, long, bool"); - return false; - } - *value = static_cast(PyInt_AsLong(arg)); - return true; -} - -google::protobuf::DynamicMessageFactory* global_message_factory = NULL; -static const google::protobuf::Message* CreateMessage(const char* message_type) { - string message_name(message_type); - const google::protobuf::Descriptor* descriptor = - GetDescriptorPool()->FindMessageTypeByName(message_name); - if (descriptor == NULL) { - return NULL; - } - return global_message_factory->GetPrototype(descriptor); -} - -static bool CheckAndSetString( - PyObject* arg, google::protobuf::Message* message, - const google::protobuf::FieldDescriptor* descriptor, - const google::protobuf::Reflection* reflection, - bool append, - int index) { - GOOGLE_DCHECK(descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING || - descriptor->type() == google::protobuf::FieldDescriptor::TYPE_BYTES); - if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { - if (!PyString_Check(arg) && !PyUnicode_Check(arg)) { - FormatTypeError(arg, "str, unicode"); - return false; - } - - if (PyString_Check(arg)) { - PyObject* unicode = PyUnicode_FromEncodedObject(arg, "ascii", NULL); - if (unicode == NULL) { - PyObject* repr = PyObject_Repr(arg); - PyErr_Format(PyExc_ValueError, - "%s has type str, but isn't in 7-bit ASCII " - "encoding. Non-ASCII strings must be converted to " - "unicode objects before being added.", - PyString_AS_STRING(repr)); - Py_DECREF(repr); - return false; - } else { - Py_DECREF(unicode); - } - } - } else if (!PyString_Check(arg)) { - FormatTypeError(arg, "str"); - return false; - } - - PyObject* encoded_string = NULL; - if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) { - if (PyString_Check(arg)) { - encoded_string = PyString_AsEncodedObject(arg, "utf-8", NULL); - } else { - encoded_string = PyUnicode_AsEncodedObject(arg, "utf-8", NULL); - } - } else { - // In this case field type is "bytes". - encoded_string = arg; - Py_INCREF(encoded_string); - } - - if (encoded_string == NULL) { - return false; - } - - char* value; - Py_ssize_t value_len; - if (PyString_AsStringAndSize(encoded_string, &value, &value_len) < 0) { - Py_DECREF(encoded_string); - return false; - } - - string value_string(value, value_len); - if (append) { - reflection->AddString(message, descriptor, value_string); - } else if (index < 0) { - reflection->SetString(message, descriptor, value_string); - } else { - reflection->SetRepeatedString(message, descriptor, index, value_string); - } - Py_DECREF(encoded_string); - return true; -} - -static PyObject* ToStringObject( - const google::protobuf::FieldDescriptor* descriptor, string value) { - if (descriptor->type() != google::protobuf::FieldDescriptor::TYPE_STRING) { - return PyString_FromStringAndSize(value.c_str(), value.length()); - } - - PyObject* result = PyUnicode_DecodeUTF8(value.c_str(), value.length(), NULL); - // If the string can't be decoded in UTF-8, just return a string object that - // contains the raw bytes. This can't happen if the value was assigned using - // the members of the Python message object, but can happen if the values were - // parsed from the wire (binary). - if (result == NULL) { - PyErr_Clear(); - result = PyString_FromStringAndSize(value.c_str(), value.length()); - } - return result; -} - -static void AssureWritable(CMessage* self) { - if (self == NULL || - self->parent == NULL || - self->parent_field == NULL) { - return; - } - - if (!self->read_only) { - return; - } - - AssureWritable(self->parent); - - google::protobuf::Message* message = self->parent->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - self->message = reflection->MutableMessage( - message, self->parent_field->descriptor, global_message_factory); - self->read_only = false; - self->parent = NULL; - self->parent_field = NULL; -} - -static PyObject* InternalGetScalar( - google::protobuf::Message* message, - const google::protobuf::FieldDescriptor* field_descriptor) { - const google::protobuf::Reflection* reflection = message->GetReflection(); - - if (!FIELD_BELONGS_TO_MESSAGE(field_descriptor, message)) { - PyErr_SetString( - PyExc_KeyError, "Field does not belong to message!"); - return NULL; - } - - PyObject* result = NULL; - switch (field_descriptor->cpp_type()) { - case google::protobuf::FieldDescriptor::CPPTYPE_INT32: { - int32 value = reflection->GetInt32(*message, field_descriptor); - result = PyInt_FromLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_INT64: { - int64 value = reflection->GetInt64(*message, field_descriptor); -#if IS_64BIT - result = PyInt_FromLong(value); -#else - result = PyLong_FromLongLong(value); -#endif - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT32: { - uint32 value = reflection->GetUInt32(*message, field_descriptor); -#if IS_64BIT - result = PyInt_FromLong(value); -#else - result = PyLong_FromLongLong(value); -#endif - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT64: { - uint64 value = reflection->GetUInt64(*message, field_descriptor); -#if IS_64BIT - if (value <= static_cast(kint64max)) { - result = PyInt_FromLong(static_cast(value)); - } -#else - if (value <= static_cast(kint32max)) { - result = PyInt_FromLong(static_cast(value)); - } -#endif - else { // NOLINT - result = PyLong_FromUnsignedLongLong(value); - } - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT: { - float value = reflection->GetFloat(*message, field_descriptor); - result = PyFloat_FromDouble(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE: { - double value = reflection->GetDouble(*message, field_descriptor); - result = PyFloat_FromDouble(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_BOOL: { - bool value = reflection->GetBool(*message, field_descriptor); - result = PyBool_FromLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_STRING: { - string value = reflection->GetString(*message, field_descriptor); - result = ToStringObject(field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_ENUM: { - if (!message->GetReflection()->HasField(*message, field_descriptor)) { - // Look for the value in the unknown fields. - google::protobuf::UnknownFieldSet* unknown_field_set = - message->GetReflection()->MutableUnknownFields(message); - for (int i = 0; i < unknown_field_set->field_count(); ++i) { - if (unknown_field_set->field(i).number() == - field_descriptor->number()) { - result = PyInt_FromLong(unknown_field_set->field(i).varint()); - break; - } - } - } - - if (result == NULL) { - const google::protobuf::EnumValueDescriptor* enum_value = - message->GetReflection()->GetEnum(*message, field_descriptor); - result = PyInt_FromLong(enum_value->number()); - } - break; - } - default: - PyErr_Format( - PyExc_SystemError, "Getting a value from a field of unknown type %d", - field_descriptor->cpp_type()); - } - - return result; -} - -static PyObject* InternalSetScalar( - google::protobuf::Message* message, const google::protobuf::FieldDescriptor* field_descriptor, - PyObject* arg) { - const google::protobuf::Reflection* reflection = message->GetReflection(); - - if (!FIELD_BELONGS_TO_MESSAGE(field_descriptor, message)) { - PyErr_SetString( - PyExc_KeyError, "Field does not belong to message!"); - return NULL; - } - - switch (field_descriptor->cpp_type()) { - case google::protobuf::FieldDescriptor::CPPTYPE_INT32: { - GOOGLE_CHECK_GET_INT32(arg, value); - reflection->SetInt32(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_INT64: { - GOOGLE_CHECK_GET_INT64(arg, value); - reflection->SetInt64(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT32: { - GOOGLE_CHECK_GET_UINT32(arg, value); - reflection->SetUInt32(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT64: { - GOOGLE_CHECK_GET_UINT64(arg, value); - reflection->SetUInt64(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT: { - GOOGLE_CHECK_GET_FLOAT(arg, value); - reflection->SetFloat(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE: { - GOOGLE_CHECK_GET_DOUBLE(arg, value); - reflection->SetDouble(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_BOOL: { - GOOGLE_CHECK_GET_BOOL(arg, value); - reflection->SetBool(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_STRING: { - if (!CheckAndSetString( - arg, message, field_descriptor, reflection, false, -1)) { - return NULL; - } - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_ENUM: { - GOOGLE_CHECK_GET_INT32(arg, value); - const google::protobuf::EnumDescriptor* enum_descriptor = - field_descriptor->enum_type(); - const google::protobuf::EnumValueDescriptor* enum_value = - enum_descriptor->FindValueByNumber(value); - if (enum_value != NULL) { - reflection->SetEnum(message, field_descriptor, enum_value); - } else { - bool added = false; - // Add the value to the unknown fields. - google::protobuf::UnknownFieldSet* unknown_field_set = - message->GetReflection()->MutableUnknownFields(message); - for (int i = 0; i < unknown_field_set->field_count(); ++i) { - if (unknown_field_set->field(i).number() == - field_descriptor->number()) { - unknown_field_set->mutable_field(i)->set_varint(value); - added = true; - break; - } - } - - if (!added) { - unknown_field_set->AddVarint(field_descriptor->number(), value); - } - reflection->ClearField(message, field_descriptor); - } - break; - } - default: - PyErr_Format( - PyExc_SystemError, "Setting value to a field of unknown type %d", - field_descriptor->cpp_type()); - } - - Py_RETURN_NONE; -} - -static PyObject* InternalAddRepeatedScalar( - google::protobuf::Message* message, const google::protobuf::FieldDescriptor* field_descriptor, - PyObject* arg) { - - if (!FIELD_BELONGS_TO_MESSAGE(field_descriptor, message)) { - PyErr_SetString( - PyExc_KeyError, "Field does not belong to message!"); - return NULL; - } - - const google::protobuf::Reflection* reflection = message->GetReflection(); - switch (field_descriptor->cpp_type()) { - case google::protobuf::FieldDescriptor::CPPTYPE_INT32: { - GOOGLE_CHECK_GET_INT32(arg, value); - reflection->AddInt32(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_INT64: { - GOOGLE_CHECK_GET_INT64(arg, value); - reflection->AddInt64(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT32: { - GOOGLE_CHECK_GET_UINT32(arg, value); - reflection->AddUInt32(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT64: { - GOOGLE_CHECK_GET_UINT64(arg, value); - reflection->AddUInt64(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT: { - GOOGLE_CHECK_GET_FLOAT(arg, value); - reflection->AddFloat(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE: { - GOOGLE_CHECK_GET_DOUBLE(arg, value); - reflection->AddDouble(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_BOOL: { - GOOGLE_CHECK_GET_BOOL(arg, value); - reflection->AddBool(message, field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_STRING: { - if (!CheckAndSetString( - arg, message, field_descriptor, reflection, true, -1)) { - return NULL; - } - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_ENUM: { - GOOGLE_CHECK_GET_INT32(arg, value); - const google::protobuf::EnumDescriptor* enum_descriptor = - field_descriptor->enum_type(); - const google::protobuf::EnumValueDescriptor* enum_value = - enum_descriptor->FindValueByNumber(value); - if (enum_value != NULL) { - reflection->AddEnum(message, field_descriptor, enum_value); - } else { - PyObject* s = PyObject_Str(arg); - PyErr_Format(PyExc_ValueError, "Unknown enum value: %s", - PyString_AS_STRING(s)); - Py_DECREF(s); - return NULL; - } - break; - } - default: - PyErr_Format( - PyExc_SystemError, "Adding value to a field of unknown type %d", - field_descriptor->cpp_type()); - } - - Py_RETURN_NONE; -} - -static PyObject* InternalGetRepeatedScalar( - CMessage* cmessage, const google::protobuf::FieldDescriptor* field_descriptor, - int index) { - google::protobuf::Message* message = cmessage->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - - int field_size = reflection->FieldSize(*message, field_descriptor); - if (index < 0) { - index = field_size + index; - } - if (index < 0 || index >= field_size) { - PyErr_Format(PyExc_IndexError, - "list assignment index (%d) out of range", index); - return NULL; - } - - PyObject* result = NULL; - switch (field_descriptor->cpp_type()) { - case google::protobuf::FieldDescriptor::CPPTYPE_INT32: { - int32 value = reflection->GetRepeatedInt32( - *message, field_descriptor, index); - result = PyInt_FromLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_INT64: { - int64 value = reflection->GetRepeatedInt64( - *message, field_descriptor, index); - result = PyLong_FromLongLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT32: { - uint32 value = reflection->GetRepeatedUInt32( - *message, field_descriptor, index); - result = PyLong_FromLongLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_UINT64: { - uint64 value = reflection->GetRepeatedUInt64( - *message, field_descriptor, index); - result = PyLong_FromUnsignedLongLong(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT: { - float value = reflection->GetRepeatedFloat( - *message, field_descriptor, index); - result = PyFloat_FromDouble(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE: { - double value = reflection->GetRepeatedDouble( - *message, field_descriptor, index); - result = PyFloat_FromDouble(value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_BOOL: { - bool value = reflection->GetRepeatedBool( - *message, field_descriptor, index); - result = PyBool_FromLong(value ? 1 : 0); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_ENUM: { - const google::protobuf::EnumValueDescriptor* enum_value = - message->GetReflection()->GetRepeatedEnum( - *message, field_descriptor, index); - result = PyInt_FromLong(enum_value->number()); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_STRING: { - string value = reflection->GetRepeatedString( - *message, field_descriptor, index); - result = ToStringObject(field_descriptor, value); - break; - } - case google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE: { - CMessage* py_cmsg = PyObject_New(CMessage, &CMessage_Type); - if (py_cmsg == NULL) { - return NULL; - } - const google::protobuf::Message& msg = reflection->GetRepeatedMessage( - *message, field_descriptor, index); - py_cmsg->parent = cmessage; - py_cmsg->full_name = field_descriptor->full_name().c_str(); - py_cmsg->message = const_cast(&msg); - py_cmsg->free_message = false; - py_cmsg->read_only = false; - result = reinterpret_cast(py_cmsg); - break; - } - default: - PyErr_Format( - PyExc_SystemError, - "Getting value from a repeated field of unknown type %d", - field_descriptor->cpp_type()); - } - - return result; -} - -static PyObject* InternalGetRepeatedScalarSlice( - CMessage* cmessage, const google::protobuf::FieldDescriptor* field_descriptor, - PyObject* slice) { - Py_ssize_t from; - Py_ssize_t to; - Py_ssize_t step; - Py_ssize_t length; - bool return_list = false; - google::protobuf::Message* message = cmessage->message; - - if (PyInt_Check(slice)) { - from = to = PyInt_AsLong(slice); - } else if (PyLong_Check(slice)) { - from = to = PyLong_AsLong(slice); - } else if (PySlice_Check(slice)) { - const google::protobuf::Reflection* reflection = message->GetReflection(); - length = reflection->FieldSize(*message, field_descriptor); - PySlice_GetIndices( - reinterpret_cast(slice), length, &from, &to, &step); - return_list = true; - } else { - PyErr_SetString(PyExc_TypeError, "list indices must be integers"); - return NULL; - } - - if (!return_list) { - return InternalGetRepeatedScalar(cmessage, field_descriptor, from); - } - - PyObject* list = PyList_New(0); - if (list == NULL) { - return NULL; - } - - if (from <= to) { - if (step < 0) return list; - for (Py_ssize_t index = from; index < to; index += step) { - if (index < 0 || index >= length) break; - PyObject* s = InternalGetRepeatedScalar( - cmessage, field_descriptor, index); - PyList_Append(list, s); - Py_DECREF(s); - } - } else { - if (step > 0) return list; - for (Py_ssize_t index = from; index > to; index += step) { - if (index < 0 || index >= length) break; - PyObject* s = InternalGetRepeatedScalar( - cmessage, field_descriptor, index); - PyList_Append(list, s); - Py_DECREF(s); - } - } - return list; -} - -// ------ C Constructor/Destructor: - -static int CMessageInit(CMessage* self, PyObject *args, PyObject *kwds) { - self->message = NULL; - return 0; -} - -static void CMessageDealloc(CMessage* self) { - if (self->free_message) { - if (self->read_only) { - PyErr_WriteUnraisable(reinterpret_cast(self)); - } - delete self->message; - } - self->ob_type->tp_free(reinterpret_cast(self)); -} - -// ------ Methods: - -static PyObject* CMessage_Clear(CMessage* self, PyObject* args) { - AssureWritable(self); - self->message->Clear(); - Py_RETURN_NONE; -} - -static PyObject* CMessage_IsInitialized(CMessage* self, PyObject* args) { - return PyBool_FromLong(self->message->IsInitialized() ? 1 : 0); -} - -static PyObject* CMessage_HasField(CMessage* self, PyObject* arg) { - char* field_name; - if (PyString_AsStringAndSize(arg, &field_name, NULL) < 0) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Descriptor* descriptor = message->GetDescriptor(); - const google::protobuf::FieldDescriptor* field_descriptor = - descriptor->FindFieldByName(field_name); - if (field_descriptor == NULL) { - PyErr_Format(PyExc_ValueError, "Unknown field %s.", field_name); - return NULL; - } - - bool has_field = - message->GetReflection()->HasField(*message, field_descriptor); - return PyBool_FromLong(has_field ? 1 : 0); -} - -static PyObject* CMessage_HasFieldByDescriptor(CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor = NULL; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - - google::protobuf::Message* message = self->message; - const google::protobuf::FieldDescriptor* field_descriptor = - cfield_descriptor->descriptor; - - if (!FIELD_BELONGS_TO_MESSAGE(field_descriptor, message)) { - PyErr_SetString(PyExc_KeyError, - "Field does not belong to message!"); - return NULL; - } - - if (FIELD_IS_REPEATED(field_descriptor)) { - PyErr_SetString(PyExc_KeyError, - "Field is repeated. A singular method is required."); - return NULL; - } - - bool has_field = - message->GetReflection()->HasField(*message, field_descriptor); - return PyBool_FromLong(has_field ? 1 : 0); -} - -static PyObject* CMessage_ClearFieldByDescriptor( - CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor = NULL; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - - google::protobuf::Message* message = self->message; - const google::protobuf::FieldDescriptor* field_descriptor = - cfield_descriptor->descriptor; - - if (!FIELD_BELONGS_TO_MESSAGE(field_descriptor, message)) { - PyErr_SetString(PyExc_KeyError, - "Field does not belong to message!"); - return NULL; - } - - message->GetReflection()->ClearField(message, field_descriptor); - Py_RETURN_NONE; -} - -static PyObject* CMessage_ClearField(CMessage* self, PyObject* arg) { - char* field_name; - if (PyString_AsStringAndSize(arg, &field_name, NULL) < 0) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Descriptor* descriptor = message->GetDescriptor(); - const google::protobuf::FieldDescriptor* field_descriptor = - descriptor->FindFieldByName(field_name); - if (field_descriptor == NULL) { - PyErr_Format(PyExc_ValueError, "Unknown field %s.", field_name); - return NULL; - } - - message->GetReflection()->ClearField(message, field_descriptor); - Py_RETURN_NONE; -} - -static PyObject* CMessage_GetScalar(CMessage* self, PyObject* arg) { - CFieldDescriptor* cdescriptor = NULL; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cdescriptor = reinterpret_cast(arg); - - google::protobuf::Message* message = self->message; - return InternalGetScalar(message, cdescriptor->descriptor); -} - -static PyObject* CMessage_GetRepeatedScalar(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* slice; - if (!PyArg_ParseTuple(args, C("O!O:GetRepeatedScalar"), - &CFieldDescriptor_Type, &cfield_descriptor, &slice)) { - return NULL; - } - - return InternalGetRepeatedScalarSlice( - self, cfield_descriptor->descriptor, slice); -} - -static PyObject* CMessage_AssignRepeatedScalar(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* slice; - if (!PyArg_ParseTuple(args, C("O!O:AssignRepeatedScalar"), - &CFieldDescriptor_Type, &cfield_descriptor, &slice)) { - return NULL; - } - - AssureWritable(self); - google::protobuf::Message* message = self->message; - message->GetReflection()->ClearField(message, cfield_descriptor->descriptor); - - PyObject* iter = PyObject_GetIter(slice); - PyObject* next; - while ((next = PyIter_Next(iter)) != NULL) { - if (InternalAddRepeatedScalar( - message, cfield_descriptor->descriptor, next) == NULL) { - Py_DECREF(iter); - return NULL; - } - } - Py_DECREF(iter); - Py_RETURN_NONE; -} - -static PyObject* CMessage_DeleteRepeatedField(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* slice; - if (!PyArg_ParseTuple(args, C("O!O:DeleteRepeatedField"), - &CFieldDescriptor_Type, &cfield_descriptor, &slice)) { - return NULL; - } - AssureWritable(self); - - Py_ssize_t length, from, to, step, slice_length; - google::protobuf::Message* message = self->message; - const google::protobuf::FieldDescriptor* field_descriptor = - cfield_descriptor->descriptor; - const google::protobuf::Reflection* reflection = message->GetReflection(); - int min, max; - length = reflection->FieldSize(*message, field_descriptor); - - if (PyInt_Check(slice) || PyLong_Check(slice)) { - from = to = PyLong_AsLong(slice); - if (from < 0) { - from = to = length + from; - } - step = 1; - min = max = from; - - // Range check. - if (from < 0 || from >= length) { - PyErr_Format(PyExc_IndexError, "list assignment index out of range"); - return NULL; - } - } else if (PySlice_Check(slice)) { - from = to = step = slice_length = 0; - PySlice_GetIndicesEx( - reinterpret_cast(slice), - length, &from, &to, &step, &slice_length); - if (from < to) { - min = from; - max = to - 1; - } else { - min = to + 1; - max = from; - } - } else { - PyErr_SetString(PyExc_TypeError, "list indices must be integers"); - return NULL; - } - - Py_ssize_t i = from; - std::vector to_delete(length, false); - while (i >= min && i <= max) { - to_delete[i] = true; - i += step; - } - - to = 0; - for (i = 0; i < length; ++i) { - if (!to_delete[i]) { - if (i != to) { - reflection->SwapElements(message, field_descriptor, i, to); - } - ++to; - } - } - - while (i > to) { - reflection->RemoveLast(message, field_descriptor); - --i; - } - - Py_RETURN_NONE; -} - - -static PyObject* CMessage_SetScalar(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* arg; - if (!PyArg_ParseTuple(args, C("O!O:SetScalar"), - &CFieldDescriptor_Type, &cfield_descriptor, &arg)) { - return NULL; - } - AssureWritable(self); - - return InternalSetScalar(self->message, cfield_descriptor->descriptor, arg); -} - -static PyObject* CMessage_AddRepeatedScalar(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* value; - if (!PyArg_ParseTuple(args, C("O!O:AddRepeatedScalar"), - &CFieldDescriptor_Type, &cfield_descriptor, &value)) { - return NULL; - } - AssureWritable(self); - - return InternalAddRepeatedScalar( - self->message, cfield_descriptor->descriptor, value); -} - -static PyObject* CMessage_FieldLength(CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - - google::protobuf::Message* message = self->message; - int length = message->GetReflection()->FieldSize( - *message, cfield_descriptor->descriptor); - return PyInt_FromLong(length); -} - -static PyObject* CMessage_DebugString(CMessage* self, PyObject* args) { - return PyString_FromString(self->message->DebugString().c_str()); -} - -static PyObject* CMessage_SerializeToString(CMessage* self, PyObject* args) { - int size = self->message->ByteSize(); - if (size <= 0) { - return PyString_FromString(""); - } - PyObject* result = PyString_FromStringAndSize(NULL, size); - if (result == NULL) { - return NULL; - } - char* buffer = PyString_AS_STRING(result); - self->message->SerializeWithCachedSizesToArray( - reinterpret_cast(buffer)); - return result; -} - -static PyObject* CMessage_SerializePartialToString( - CMessage* self, PyObject* args) { - string contents; - self->message->SerializePartialToString(&contents); - return PyString_FromStringAndSize(contents.c_str(), contents.size()); -} - -static PyObject* CMessageStr(CMessage* self) { - char str[1024]; - str[sizeof(str) - 1] = 0; - snprintf(str, sizeof(str) - 1, "CMessage: <%p>", self->message); - return PyString_FromString(str); -} - -static PyObject* CMessage_MergeFrom(CMessage* self, PyObject* arg) { - CMessage* other_message; - if (!PyObject_TypeCheck(reinterpret_cast(arg), &CMessage_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a message"); - return NULL; - } - - other_message = reinterpret_cast(arg); - if (other_message->message->GetDescriptor() != - self->message->GetDescriptor()) { - PyErr_Format(PyExc_TypeError, - "Tried to merge from a message with a different type. " - "to: %s, from: %s", - self->message->GetDescriptor()->full_name().c_str(), - other_message->message->GetDescriptor()->full_name().c_str()); - return NULL; - } - AssureWritable(self); - - self->message->MergeFrom(*other_message->message); - Py_RETURN_NONE; -} - -static PyObject* CMessage_CopyFrom(CMessage* self, PyObject* arg) { - CMessage* other_message; - if (!PyObject_TypeCheck(reinterpret_cast(arg), &CMessage_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a message"); - return NULL; - } - - other_message = reinterpret_cast(arg); - if (other_message->message->GetDescriptor() != - self->message->GetDescriptor()) { - PyErr_Format(PyExc_TypeError, - "Tried to copy from a message with a different type. " - "to: %s, from: %s", - self->message->GetDescriptor()->full_name().c_str(), - other_message->message->GetDescriptor()->full_name().c_str()); - return NULL; - } - - AssureWritable(self); - - self->message->CopyFrom(*other_message->message); - Py_RETURN_NONE; -} - -static PyObject* CMessage_MergeFromString(CMessage* self, PyObject* arg) { - const void* data; - Py_ssize_t data_length; - if (PyObject_AsReadBuffer(arg, &data, &data_length) < 0) { - return NULL; - } - - AssureWritable(self); - google::protobuf::io::CodedInputStream input( - reinterpret_cast(data), data_length); - bool success = self->message->MergePartialFromCodedStream(&input); - if (success) { - return PyInt_FromLong(self->message->ByteSize()); - } else { - return PyInt_FromLong(-1); - } -} - -static PyObject* CMessage_ByteSize(CMessage* self, PyObject* args) { - return PyLong_FromLong(self->message->ByteSize()); -} - -static PyObject* CMessage_SetInParent(CMessage* self, PyObject* args) { - AssureWritable(self); - Py_RETURN_NONE; -} - -static PyObject* CMessage_SwapRepeatedFieldElements( - CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - int index1, index2; - if (!PyArg_ParseTuple(args, C("O!ii:SwapRepeatedFieldElements"), - &CFieldDescriptor_Type, &cfield_descriptor, - &index1, &index2)) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - - reflection->SwapElements( - message, cfield_descriptor->descriptor, index1, index2); - Py_RETURN_NONE; -} - -static PyObject* CMessage_AddMessage(CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - AssureWritable(self); - - CMessage* py_cmsg = PyObject_New(CMessage, &CMessage_Type); - if (py_cmsg == NULL) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - google::protobuf::Message* sub_message = - reflection->AddMessage(message, cfield_descriptor->descriptor); - - py_cmsg->parent = NULL; - py_cmsg->full_name = sub_message->GetDescriptor()->full_name().c_str(); - py_cmsg->message = sub_message; - py_cmsg->free_message = false; - py_cmsg->read_only = false; - return reinterpret_cast(py_cmsg); -} - -static PyObject* CMessage_GetRepeatedMessage(CMessage* self, PyObject* args) { - CFieldDescriptor* cfield_descriptor; - PyObject* slice; - if (!PyArg_ParseTuple(args, C("O!O:GetRepeatedMessage"), - &CFieldDescriptor_Type, &cfield_descriptor, &slice)) { - return NULL; - } - - return InternalGetRepeatedScalarSlice( - self, cfield_descriptor->descriptor, slice); -} - -static PyObject* CMessage_NewSubMessage(CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - - CMessage* py_cmsg = PyObject_New(CMessage, &CMessage_Type); - if (py_cmsg == NULL) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - const google::protobuf::Message& sub_message = - reflection->GetMessage(*message, cfield_descriptor->descriptor, - global_message_factory); - - py_cmsg->full_name = sub_message.GetDescriptor()->full_name().c_str(); - py_cmsg->parent = self; - py_cmsg->parent_field = cfield_descriptor; - py_cmsg->message = const_cast(&sub_message); - py_cmsg->free_message = false; - py_cmsg->read_only = true; - return reinterpret_cast(py_cmsg); -} - -static PyObject* CMessage_MutableMessage(CMessage* self, PyObject* arg) { - CFieldDescriptor* cfield_descriptor; - if (!PyObject_TypeCheck(reinterpret_cast(arg), - &CFieldDescriptor_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a field descriptor"); - return NULL; - } - cfield_descriptor = reinterpret_cast(arg); - AssureWritable(self); - - CMessage* py_cmsg = PyObject_New(CMessage, &CMessage_Type); - if (py_cmsg == NULL) { - return NULL; - } - - google::protobuf::Message* message = self->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - google::protobuf::Message* mutable_message = - reflection->MutableMessage(message, cfield_descriptor->descriptor, - global_message_factory); - - py_cmsg->full_name = mutable_message->GetDescriptor()->full_name().c_str(); - py_cmsg->message = mutable_message; - py_cmsg->free_message = false; - py_cmsg->read_only = false; - return reinterpret_cast(py_cmsg); -} - -static PyObject* CMessage_Equals(CMessage* self, PyObject* arg) { - CMessage* other_message; - if (!PyObject_TypeCheck(reinterpret_cast(arg), &CMessage_Type)) { - PyErr_SetString(PyExc_TypeError, "Must be a message"); - return NULL; - } - other_message = reinterpret_cast(arg); - - if (other_message->message == self->message) { - return PyBool_FromLong(1); - } - - if (other_message->message->GetDescriptor() != - self->message->GetDescriptor()) { - return PyBool_FromLong(0); - } - - return PyBool_FromLong(1); -} - -static PyObject* CMessage_ListFields(CMessage* self, PyObject* args) { - google::protobuf::Message* message = self->message; - const google::protobuf::Reflection* reflection = message->GetReflection(); - vector fields; - reflection->ListFields(*message, &fields); - - PyObject* list = PyList_New(fields.size()); - if (list == NULL) { - return NULL; - } - - for (unsigned int i = 0; i < fields.size(); ++i) { - bool is_extension = fields[i]->is_extension(); - PyObject* t = PyTuple_New(2); - if (t == NULL) { - Py_DECREF(list); - return NULL; - } - - PyObject* is_extension_object = PyBool_FromLong(is_extension ? 1 : 0); - - PyObject* field_name; - const string* s; - if (is_extension) { - s = &fields[i]->full_name(); - } else { - s = &fields[i]->name(); - } - field_name = PyString_FromStringAndSize(s->c_str(), s->length()); - if (field_name == NULL) { - Py_DECREF(list); - Py_DECREF(t); - return NULL; - } - - PyTuple_SET_ITEM(t, 0, is_extension_object); - PyTuple_SET_ITEM(t, 1, field_name); - PyList_SET_ITEM(list, i, t); - } - - return list; -} - -static PyObject* CMessage_FindInitializationErrors(CMessage* self) { - google::protobuf::Message* message = self->message; - vector errors; - message->FindInitializationErrors(&errors); - - PyObject* error_list = PyList_New(errors.size()); - if (error_list == NULL) { - return NULL; - } - for (unsigned int i = 0; i < errors.size(); ++i) { - const string& error = errors[i]; - PyObject* error_string = PyString_FromStringAndSize( - error.c_str(), error.length()); - if (error_string == NULL) { - Py_DECREF(error_list); - return NULL; - } - PyList_SET_ITEM(error_list, i, error_string); - } - return error_list; -} - -// ------ Python Constructor: - -PyObject* Python_NewCMessage(PyObject* ignored, PyObject* arg) { - const char* message_type = PyString_AsString(arg); - if (message_type == NULL) { - return NULL; - } - - const google::protobuf::Message* message = CreateMessage(message_type); - if (message == NULL) { - PyErr_Format(PyExc_TypeError, "Couldn't create message of type %s!", - message_type); - return NULL; - } - - CMessage* py_cmsg = PyObject_New(CMessage, &CMessage_Type); - if (py_cmsg == NULL) { - return NULL; - } - py_cmsg->message = message->New(); - py_cmsg->free_message = true; - py_cmsg->full_name = message->GetDescriptor()->full_name().c_str(); - py_cmsg->read_only = false; - py_cmsg->parent = NULL; - py_cmsg->parent_field = NULL; - return reinterpret_cast(py_cmsg); -} - -// --- Module Functions (exposed to Python): - -PyMethodDef methods[] = { - { C("NewCMessage"), (PyCFunction)Python_NewCMessage, - METH_O, - C("Creates a new C++ protocol message, given its full name.") }, - { C("NewCDescriptorPool"), (PyCFunction)Python_NewCDescriptorPool, - METH_NOARGS, - C("Creates a new C++ descriptor pool.") }, - { C("BuildFile"), (PyCFunction)Python_BuildFile, - METH_O, - C("Registers a new protocol buffer file in the global C++ descriptor " - "pool.") }, - {NULL} -}; - -// --- Exposing the C proto living inside Python proto to C code: - -extern const Message* (*GetCProtoInsidePyProtoPtr)(PyObject* msg); -extern Message* (*MutableCProtoInsidePyProtoPtr)(PyObject* msg); - -static const google::protobuf::Message* GetCProtoInsidePyProtoImpl(PyObject* msg) { - PyObject* c_msg_obj = PyObject_GetAttrString(msg, "_cmsg"); - if (c_msg_obj == NULL) { - PyErr_Clear(); - return NULL; - } - Py_DECREF(c_msg_obj); - if (!PyObject_TypeCheck(c_msg_obj, &CMessage_Type)) { - return NULL; - } - CMessage* c_msg = reinterpret_cast(c_msg_obj); - return c_msg->message; -} - -static google::protobuf::Message* MutableCProtoInsidePyProtoImpl(PyObject* msg) { - PyObject* c_msg_obj = PyObject_GetAttrString(msg, "_cmsg"); - if (c_msg_obj == NULL) { - PyErr_Clear(); - return NULL; - } - Py_DECREF(c_msg_obj); - if (!PyObject_TypeCheck(c_msg_obj, &CMessage_Type)) { - return NULL; - } - CMessage* c_msg = reinterpret_cast(c_msg_obj); - AssureWritable(c_msg); - return c_msg->message; -} - -// --- Module Init Function: - -static const char module_docstring[] = -"python-proto2 is a module that can be used to enhance proto2 Python API\n" -"performance.\n" -"\n" -"It provides access to the protocol buffers C++ reflection API that\n" -"implements the basic protocol buffer functions."; - -extern "C" { - void init_net_proto2___python() { - // Initialize constants. - kPythonZero = PyInt_FromLong(0); - kint32min_py = PyInt_FromLong(kint32min); - kint32max_py = PyInt_FromLong(kint32max); - kuint32max_py = PyLong_FromLongLong(kuint32max); - kint64min_py = PyLong_FromLongLong(kint64min); - kint64max_py = PyLong_FromLongLong(kint64max); - kuint64max_py = PyLong_FromUnsignedLongLong(kuint64max); - - global_message_factory = new DynamicMessageFactory(GetDescriptorPool()); - global_message_factory->SetDelegateToGeneratedFactory(true); - - // Export our functions to Python. - PyObject *m; - m = Py_InitModule3(C("_net_proto2___python"), methods, C(module_docstring)); - if (m == NULL) { - return; - } - - AddConstants(m); - - CMessage_Type.tp_new = PyType_GenericNew; - if (PyType_Ready(&CMessage_Type) < 0) { - return; - } - - if (!InitDescriptor()) { - return; - } - - // Override {Get,Mutable}CProtoInsidePyProto. - GetCProtoInsidePyProtoPtr = GetCProtoInsidePyProtoImpl; - MutableCProtoInsidePyProtoPtr = MutableCProtoInsidePyProtoImpl; - } -} - -} // namespace python -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.cc deleted file mode 100644 index fb87bad1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.cc +++ /dev/null @@ -1,334 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: petar@google.com (Petar Petrov) - -#include - -#include -#include - -#define C(str) const_cast(str) - -namespace google { -namespace protobuf { -namespace python { - -static void CFieldDescriptorDealloc(CFieldDescriptor* self); - -static google::protobuf::DescriptorPool* g_descriptor_pool = NULL; - -static PyObject* CFieldDescriptor_GetFullName( - CFieldDescriptor* self, void *closure) { - Py_XINCREF(self->full_name); - return self->full_name; -} - -static PyObject* CFieldDescriptor_GetName( - CFieldDescriptor *self, void *closure) { - Py_XINCREF(self->name); - return self->name; -} - -static PyObject* CFieldDescriptor_GetCppType( - CFieldDescriptor *self, void *closure) { - Py_XINCREF(self->cpp_type); - return self->cpp_type; -} - -static PyObject* CFieldDescriptor_GetLabel( - CFieldDescriptor *self, void *closure) { - Py_XINCREF(self->label); - return self->label; -} - -static PyObject* CFieldDescriptor_GetID( - CFieldDescriptor *self, void *closure) { - Py_XINCREF(self->id); - return self->id; -} - - -static PyGetSetDef CFieldDescriptorGetters[] = { - { C("full_name"), - (getter)CFieldDescriptor_GetFullName, NULL, "Full name", NULL}, - { C("name"), - (getter)CFieldDescriptor_GetName, NULL, "last name", NULL}, - { C("cpp_type"), - (getter)CFieldDescriptor_GetCppType, NULL, "C++ Type", NULL}, - { C("label"), - (getter)CFieldDescriptor_GetLabel, NULL, "Label", NULL}, - { C("id"), - (getter)CFieldDescriptor_GetID, NULL, "ID", NULL}, - {NULL} -}; - -PyTypeObject CFieldDescriptor_Type = { - PyObject_HEAD_INIT(&PyType_Type) - 0, - C("google3.net.google.protobuf.python.internal." - "_net_proto2___python." - "CFieldDescriptor"), // tp_name - sizeof(CFieldDescriptor), // tp_basicsize - 0, // tp_itemsize - (destructor)CFieldDescriptorDealloc, // tp_dealloc - 0, // tp_print - 0, // tp_getattr - 0, // tp_setattr - 0, // tp_compare - 0, // tp_repr - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - 0, // tp_hash - 0, // tp_call - 0, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_DEFAULT, // tp_flags - C("A Field Descriptor"), // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0, // tp_weaklistoffset - 0, // tp_iter - 0, // tp_iternext - 0, // tp_methods - 0, // tp_members - CFieldDescriptorGetters, // tp_getset - 0, // tp_base - 0, // tp_dict - 0, // tp_descr_get - 0, // tp_descr_set - 0, // tp_dictoffset - 0, // tp_init - PyType_GenericAlloc, // tp_alloc - PyType_GenericNew, // tp_new - PyObject_Del, // tp_free -}; - -static void CFieldDescriptorDealloc(CFieldDescriptor* self) { - Py_DECREF(self->full_name); - Py_DECREF(self->name); - Py_DECREF(self->cpp_type); - Py_DECREF(self->label); - Py_DECREF(self->id); - self->ob_type->tp_free(reinterpret_cast(self)); -} - -typedef struct { - PyObject_HEAD - - const google::protobuf::DescriptorPool* pool; -} CDescriptorPool; - -static void CDescriptorPoolDealloc(CDescriptorPool* self); - -static PyObject* CDescriptorPool_NewCDescriptor( - const google::protobuf::FieldDescriptor* field_descriptor) { - CFieldDescriptor* cfield_descriptor = PyObject_New( - CFieldDescriptor, &CFieldDescriptor_Type); - if (cfield_descriptor == NULL) { - return NULL; - } - cfield_descriptor->descriptor = field_descriptor; - - cfield_descriptor->full_name = PyString_FromString( - field_descriptor->full_name().c_str()); - cfield_descriptor->name = PyString_FromString( - field_descriptor->name().c_str()); - cfield_descriptor->cpp_type = PyLong_FromLong(field_descriptor->cpp_type()); - cfield_descriptor->label = PyLong_FromLong(field_descriptor->label()); - cfield_descriptor->id = PyLong_FromVoidPtr(cfield_descriptor); - return reinterpret_cast(cfield_descriptor); -} - -static PyObject* CDescriptorPool_FindFieldByName( - CDescriptorPool* self, PyObject* arg) { - const char* full_field_name = PyString_AsString(arg); - if (full_field_name == NULL) { - return NULL; - } - - const google::protobuf::FieldDescriptor* field_descriptor = NULL; - - field_descriptor = self->pool->FindFieldByName(full_field_name); - if (field_descriptor == NULL) { - PyErr_Format(PyExc_TypeError, "Couldn't find field %.200s", - full_field_name); - return NULL; - } - - return CDescriptorPool_NewCDescriptor(field_descriptor); -} - -static PyObject* CDescriptorPool_FindExtensionByName( - CDescriptorPool* self, PyObject* arg) { - const char* full_field_name = PyString_AsString(arg); - if (full_field_name == NULL) { - return NULL; - } - - const google::protobuf::FieldDescriptor* field_descriptor = - self->pool->FindExtensionByName(full_field_name); - if (field_descriptor == NULL) { - PyErr_Format(PyExc_TypeError, "Couldn't find field %.200s", - full_field_name); - return NULL; - } - - return CDescriptorPool_NewCDescriptor(field_descriptor); -} - -static PyMethodDef CDescriptorPoolMethods[] = { - { C("FindFieldByName"), - (PyCFunction)CDescriptorPool_FindFieldByName, - METH_O, - C("Searches for a field descriptor by full name.") }, - { C("FindExtensionByName"), - (PyCFunction)CDescriptorPool_FindExtensionByName, - METH_O, - C("Searches for extension descriptor by full name.") }, - {NULL} -}; - -PyTypeObject CDescriptorPool_Type = { - PyObject_HEAD_INIT(&PyType_Type) - 0, - C("google3.net.google.protobuf.python.internal." - "_net_proto2___python." - "CFieldDescriptor"), // tp_name - sizeof(CDescriptorPool), // tp_basicsize - 0, // tp_itemsize - (destructor)CDescriptorPoolDealloc, // tp_dealloc - 0, // tp_print - 0, // tp_getattr - 0, // tp_setattr - 0, // tp_compare - 0, // tp_repr - 0, // tp_as_number - 0, // tp_as_sequence - 0, // tp_as_mapping - 0, // tp_hash - 0, // tp_call - 0, // tp_str - 0, // tp_getattro - 0, // tp_setattro - 0, // tp_as_buffer - Py_TPFLAGS_DEFAULT, // tp_flags - C("A Descriptor Pool"), // tp_doc - 0, // tp_traverse - 0, // tp_clear - 0, // tp_richcompare - 0, // tp_weaklistoffset - 0, // tp_iter - 0, // tp_iternext - CDescriptorPoolMethods, // tp_methods - 0, // tp_members - 0, // tp_getset - 0, // tp_base - 0, // tp_dict - 0, // tp_descr_get - 0, // tp_descr_set - 0, // tp_dictoffset - 0, // tp_init - PyType_GenericAlloc, // tp_alloc - PyType_GenericNew, // tp_new - PyObject_Del, // tp_free -}; - -static void CDescriptorPoolDealloc(CDescriptorPool* self) { - self->ob_type->tp_free(reinterpret_cast(self)); -} - -google::protobuf::DescriptorPool* GetDescriptorPool() { - if (g_descriptor_pool == NULL) { - g_descriptor_pool = new google::protobuf::DescriptorPool( - google::protobuf::DescriptorPool::generated_pool()); - } - return g_descriptor_pool; -} - -PyObject* Python_NewCDescriptorPool(PyObject* ignored, PyObject* args) { - CDescriptorPool* cdescriptor_pool = PyObject_New( - CDescriptorPool, &CDescriptorPool_Type); - if (cdescriptor_pool == NULL) { - return NULL; - } - cdescriptor_pool->pool = GetDescriptorPool(); - return reinterpret_cast(cdescriptor_pool); -} - -PyObject* Python_BuildFile(PyObject* ignored, PyObject* arg) { - char* message_type; - Py_ssize_t message_len; - - if (PyString_AsStringAndSize(arg, &message_type, &message_len) < 0) { - return NULL; - } - - google::protobuf::FileDescriptorProto file_proto; - if (!file_proto.ParseFromArray(message_type, message_len)) { - PyErr_SetString(PyExc_TypeError, "Couldn't parse file content!"); - return NULL; - } - - // If this file is already in the generated pool, don't add it again. - if (google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - file_proto.name()) != NULL) { - Py_RETURN_NONE; - } - - const google::protobuf::FileDescriptor* descriptor = GetDescriptorPool()->BuildFile( - file_proto); - if (descriptor == NULL) { - PyErr_SetString(PyExc_TypeError, - "Couldn't build proto file into descriptor pool!"); - return NULL; - } - - Py_RETURN_NONE; -} - -bool InitDescriptor() { - CFieldDescriptor_Type.tp_new = PyType_GenericNew; - if (PyType_Ready(&CFieldDescriptor_Type) < 0) - return false; - - CDescriptorPool_Type.tp_new = PyType_GenericNew; - if (PyType_Ready(&CDescriptorPool_Type) < 0) - return false; - return true; -} - -} // namespace python -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.h deleted file mode 100644 index 5232680f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_descriptor.h +++ /dev/null @@ -1,87 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: petar@google.com (Petar Petrov) - -#ifndef GOOGLE_PROTOBUF_PYTHON_DESCRIPTOR_H__ -#define GOOGLE_PROTOBUF_PYTHON_DESCRIPTOR_H__ - -#include -#include - -#include - -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -#endif - -namespace google { -namespace protobuf { -namespace python { - -typedef struct { - PyObject_HEAD - - // The proto2 descriptor that this object represents. - const google::protobuf::FieldDescriptor* descriptor; - - // Full name of the field (PyString). - PyObject* full_name; - - // Name of the field (PyString). - PyObject* name; - - // C++ type of the field (PyLong). - PyObject* cpp_type; - - // Name of the field (PyLong). - PyObject* label; - - // Identity of the descriptor (PyLong used as a poiner). - PyObject* id; -} CFieldDescriptor; - -extern PyTypeObject CFieldDescriptor_Type; - -extern PyTypeObject CDescriptorPool_Type; - - -PyObject* Python_NewCDescriptorPool(PyObject* ignored, PyObject* args); -PyObject* Python_BuildFile(PyObject* ignored, PyObject* args); -bool InitDescriptor(); -google::protobuf::DescriptorPool* GetDescriptorPool(); - -} // namespace python -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_PYTHON_DESCRIPTOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.cc deleted file mode 100644 index 1b1ab5d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.cc +++ /dev/null @@ -1,63 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: qrczak@google.com (Marcin Kowalczyk) - -#include - -namespace google { -namespace protobuf { -namespace python { - -static const Message* GetCProtoInsidePyProtoStub(PyObject* msg) { - return NULL; -} -static Message* MutableCProtoInsidePyProtoStub(PyObject* msg) { - return NULL; -} - -// This is initialized with a default, stub implementation. -// If python-google.protobuf.cc is loaded, the function pointer is overridden -// with a full implementation. -const Message* (*GetCProtoInsidePyProtoPtr)(PyObject* msg) = - GetCProtoInsidePyProtoStub; -Message* (*MutableCProtoInsidePyProtoPtr)(PyObject* msg) = - MutableCProtoInsidePyProtoStub; - -const Message* GetCProtoInsidePyProto(PyObject* msg) { - return GetCProtoInsidePyProtoPtr(msg); -} -Message* MutableCProtoInsidePyProto(PyObject* msg) { - return MutableCProtoInsidePyProtoPtr(msg); -} - -} // namespace python -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.h deleted file mode 100644 index c5b0b1cd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/pyext/python_protobuf.h +++ /dev/null @@ -1,57 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: qrczak@google.com (Marcin Kowalczyk) -// -// This module exposes the C proto inside the given Python proto, in -// case the Python proto is implemented with a C proto. - -#ifndef GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__ -#define GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__ - -#include - -namespace google { -namespace protobuf { - -class Message; - -namespace python { - -// Return the pointer to the C proto inside the given Python proto, -// or NULL when this is not a Python proto implemented with a C proto. -const Message* GetCProtoInsidePyProto(PyObject* msg); -Message* MutableCProtoInsidePyProto(PyObject* msg); - -} // namespace python -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_PYTHON_PYTHON_PROTOBUF_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/reflection.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/reflection.py deleted file mode 100755 index 1373c882..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/reflection.py +++ /dev/null @@ -1,142 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This code is meant to work on Python 2.4 and above only. - -"""Contains a metaclass and helper functions used to create -protocol message classes from Descriptor objects at runtime. - -Recall that a metaclass is the "type" of a class. -(A class is to a metaclass what an instance is to a class.) - -In this case, we use the GeneratedProtocolMessageType metaclass -to inject all the useful functionality into the classes -output by the protocol compiler at compile-time. - -The upshot of all this is that the real implementation -details for ALL pure-Python protocol buffers are *here in -this file*. -""" - -__author__ = 'robinson@google.com (Will Robinson)' - - -from google.protobuf.internal import api_implementation -from google.protobuf import descriptor as descriptor_mod -_FieldDescriptor = descriptor_mod.FieldDescriptor - - -if api_implementation.Type() == 'cpp': - from google.protobuf.internal import cpp_message - _NewMessage = cpp_message.NewMessage - _InitMessage = cpp_message.InitMessage -else: - from google.protobuf.internal import python_message - _NewMessage = python_message.NewMessage - _InitMessage = python_message.InitMessage - - -class GeneratedProtocolMessageType(type): - - """Metaclass for protocol message classes created at runtime from Descriptors. - - We add implementations for all methods described in the Message class. We - also create properties to allow getting/setting all fields in the protocol - message. Finally, we create slots to prevent users from accidentally - "setting" nonexistent fields in the protocol message, which then wouldn't get - serialized / deserialized properly. - - The protocol compiler currently uses this metaclass to create protocol - message classes at runtime. Clients can also manually create their own - classes at runtime, as in this example: - - mydescriptor = Descriptor(.....) - class MyProtoClass(Message): - __metaclass__ = GeneratedProtocolMessageType - DESCRIPTOR = mydescriptor - myproto_instance = MyProtoClass() - myproto.foo_field = 23 - ... - """ - - # Must be consistent with the protocol-compiler code in - # proto2/compiler/internal/generator.*. - _DESCRIPTOR_KEY = 'DESCRIPTOR' - - def __new__(cls, name, bases, dictionary): - """Custom allocation for runtime-generated class types. - - We override __new__ because this is apparently the only place - where we can meaningfully set __slots__ on the class we're creating(?). - (The interplay between metaclasses and slots is not very well-documented). - - Args: - name: Name of the class (ignored, but required by the - metaclass protocol). - bases: Base classes of the class we're constructing. - (Should be message.Message). We ignore this field, but - it's required by the metaclass protocol - dictionary: The class dictionary of the class we're - constructing. dictionary[_DESCRIPTOR_KEY] must contain - a Descriptor object describing this protocol message - type. - - Returns: - Newly-allocated class. - """ - descriptor = dictionary[GeneratedProtocolMessageType._DESCRIPTOR_KEY] - _NewMessage(descriptor, dictionary) - superclass = super(GeneratedProtocolMessageType, cls) - - new_class = superclass.__new__(cls, name, bases, dictionary) - setattr(descriptor, '_concrete_class', new_class) - return new_class - - def __init__(cls, name, bases, dictionary): - """Here we perform the majority of our work on the class. - We add enum getters, an __init__ method, implementations - of all Message methods, and properties for all fields - in the protocol type. - - Args: - name: Name of the class (ignored, but required by the - metaclass protocol). - bases: Base classes of the class we're constructing. - (Should be message.Message). We ignore this field, but - it's required by the metaclass protocol - dictionary: The class dictionary of the class we're - constructing. dictionary[_DESCRIPTOR_KEY] must contain - a Descriptor object describing this protocol message - type. - """ - descriptor = dictionary[GeneratedProtocolMessageType._DESCRIPTOR_KEY] - _InitMessage(descriptor, cls) - superclass = super(GeneratedProtocolMessageType, cls) - superclass.__init__(name, bases, dictionary) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service.py deleted file mode 100755 index 180b70e8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service.py +++ /dev/null @@ -1,226 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""DEPRECATED: Declares the RPC service interfaces. - -This module declares the abstract interfaces underlying proto2 RPC -services. These are intended to be independent of any particular RPC -implementation, so that proto2 services can be used on top of a variety -of implementations. Starting with version 2.3.0, RPC implementations should -not try to build on these, but should instead provide code generator plugins -which generate code specific to the particular RPC implementation. This way -the generated code can be more appropriate for the implementation in use -and can avoid unnecessary layers of indirection. -""" - -__author__ = 'petar@google.com (Petar Petrov)' - - -class RpcException(Exception): - """Exception raised on failed blocking RPC method call.""" - pass - - -class Service(object): - - """Abstract base interface for protocol-buffer-based RPC services. - - Services themselves are abstract classes (implemented either by servers or as - stubs), but they subclass this base interface. The methods of this - interface can be used to call the methods of the service without knowing - its exact type at compile time (analogous to the Message interface). - """ - - def GetDescriptor(): - """Retrieves this service's descriptor.""" - raise NotImplementedError - - def CallMethod(self, method_descriptor, rpc_controller, - request, done): - """Calls a method of the service specified by method_descriptor. - - If "done" is None then the call is blocking and the response - message will be returned directly. Otherwise the call is asynchronous - and "done" will later be called with the response value. - - In the blocking case, RpcException will be raised on error. - - Preconditions: - * method_descriptor.service == GetDescriptor - * request is of the exact same classes as returned by - GetRequestClass(method). - * After the call has started, the request must not be modified. - * "rpc_controller" is of the correct type for the RPC implementation being - used by this Service. For stubs, the "correct type" depends on the - RpcChannel which the stub is using. - - Postconditions: - * "done" will be called when the method is complete. This may be - before CallMethod() returns or it may be at some point in the future. - * If the RPC failed, the response value passed to "done" will be None. - Further details about the failure can be found by querying the - RpcController. - """ - raise NotImplementedError - - def GetRequestClass(self, method_descriptor): - """Returns the class of the request message for the specified method. - - CallMethod() requires that the request is of a particular subclass of - Message. GetRequestClass() gets the default instance of this required - type. - - Example: - method = service.GetDescriptor().FindMethodByName("Foo") - request = stub.GetRequestClass(method)() - request.ParseFromString(input) - service.CallMethod(method, request, callback) - """ - raise NotImplementedError - - def GetResponseClass(self, method_descriptor): - """Returns the class of the response message for the specified method. - - This method isn't really needed, as the RpcChannel's CallMethod constructs - the response protocol message. It's provided anyway in case it is useful - for the caller to know the response type in advance. - """ - raise NotImplementedError - - -class RpcController(object): - - """An RpcController mediates a single method call. - - The primary purpose of the controller is to provide a way to manipulate - settings specific to the RPC implementation and to find out about RPC-level - errors. The methods provided by the RpcController interface are intended - to be a "least common denominator" set of features which we expect all - implementations to support. Specific implementations may provide more - advanced features (e.g. deadline propagation). - """ - - # Client-side methods below - - def Reset(self): - """Resets the RpcController to its initial state. - - After the RpcController has been reset, it may be reused in - a new call. Must not be called while an RPC is in progress. - """ - raise NotImplementedError - - def Failed(self): - """Returns true if the call failed. - - After a call has finished, returns true if the call failed. The possible - reasons for failure depend on the RPC implementation. Failed() must not - be called before a call has finished. If Failed() returns true, the - contents of the response message are undefined. - """ - raise NotImplementedError - - def ErrorText(self): - """If Failed is true, returns a human-readable description of the error.""" - raise NotImplementedError - - def StartCancel(self): - """Initiate cancellation. - - Advises the RPC system that the caller desires that the RPC call be - canceled. The RPC system may cancel it immediately, may wait awhile and - then cancel it, or may not even cancel the call at all. If the call is - canceled, the "done" callback will still be called and the RpcController - will indicate that the call failed at that time. - """ - raise NotImplementedError - - # Server-side methods below - - def SetFailed(self, reason): - """Sets a failure reason. - - Causes Failed() to return true on the client side. "reason" will be - incorporated into the message returned by ErrorText(). If you find - you need to return machine-readable information about failures, you - should incorporate it into your response protocol buffer and should - NOT call SetFailed(). - """ - raise NotImplementedError - - def IsCanceled(self): - """Checks if the client cancelled the RPC. - - If true, indicates that the client canceled the RPC, so the server may - as well give up on replying to it. The server should still call the - final "done" callback. - """ - raise NotImplementedError - - def NotifyOnCancel(self, callback): - """Sets a callback to invoke on cancel. - - Asks that the given callback be called when the RPC is canceled. The - callback will always be called exactly once. If the RPC completes without - being canceled, the callback will be called after completion. If the RPC - has already been canceled when NotifyOnCancel() is called, the callback - will be called immediately. - - NotifyOnCancel() must be called no more than once per request. - """ - raise NotImplementedError - - -class RpcChannel(object): - - """Abstract interface for an RPC channel. - - An RpcChannel represents a communication line to a service which can be used - to call that service's methods. The service may be running on another - machine. Normally, you should not use an RpcChannel directly, but instead - construct a stub {@link Service} wrapping it. Example: - - Example: - RpcChannel channel = rpcImpl.Channel("remotehost.example.com:1234") - RpcController controller = rpcImpl.Controller() - MyService service = MyService_Stub(channel) - service.MyMethod(controller, request, callback) - """ - - def CallMethod(self, method_descriptor, rpc_controller, - request, response_class, done): - """Calls the method identified by the descriptor. - - Call the given method of the remote service. The signature of this - procedure looks the same as Service.CallMethod(), but the requirements - are less strict in one important way: the request object doesn't have to - be of any specific class as long as its descriptor is method.input_type. - """ - raise NotImplementedError diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service_reflection.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service_reflection.py deleted file mode 100755 index 851e83e7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/service_reflection.py +++ /dev/null @@ -1,284 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Contains metaclasses used to create protocol service and service stub -classes from ServiceDescriptor objects at runtime. - -The GeneratedServiceType and GeneratedServiceStubType metaclasses are used to -inject all useful functionality into the classes output by the protocol -compiler at compile-time. -""" - -__author__ = 'petar@google.com (Petar Petrov)' - - -class GeneratedServiceType(type): - - """Metaclass for service classes created at runtime from ServiceDescriptors. - - Implementations for all methods described in the Service class are added here - by this class. We also create properties to allow getting/setting all fields - in the protocol message. - - The protocol compiler currently uses this metaclass to create protocol service - classes at runtime. Clients can also manually create their own classes at - runtime, as in this example: - - mydescriptor = ServiceDescriptor(.....) - class MyProtoService(service.Service): - __metaclass__ = GeneratedServiceType - DESCRIPTOR = mydescriptor - myservice_instance = MyProtoService() - ... - """ - - _DESCRIPTOR_KEY = 'DESCRIPTOR' - - def __init__(cls, name, bases, dictionary): - """Creates a message service class. - - Args: - name: Name of the class (ignored, but required by the metaclass - protocol). - bases: Base classes of the class being constructed. - dictionary: The class dictionary of the class being constructed. - dictionary[_DESCRIPTOR_KEY] must contain a ServiceDescriptor object - describing this protocol service type. - """ - # Don't do anything if this class doesn't have a descriptor. This happens - # when a service class is subclassed. - if GeneratedServiceType._DESCRIPTOR_KEY not in dictionary: - return - descriptor = dictionary[GeneratedServiceType._DESCRIPTOR_KEY] - service_builder = _ServiceBuilder(descriptor) - service_builder.BuildService(cls) - - -class GeneratedServiceStubType(GeneratedServiceType): - - """Metaclass for service stubs created at runtime from ServiceDescriptors. - - This class has similar responsibilities as GeneratedServiceType, except that - it creates the service stub classes. - """ - - _DESCRIPTOR_KEY = 'DESCRIPTOR' - - def __init__(cls, name, bases, dictionary): - """Creates a message service stub class. - - Args: - name: Name of the class (ignored, here). - bases: Base classes of the class being constructed. - dictionary: The class dictionary of the class being constructed. - dictionary[_DESCRIPTOR_KEY] must contain a ServiceDescriptor object - describing this protocol service type. - """ - super(GeneratedServiceStubType, cls).__init__(name, bases, dictionary) - # Don't do anything if this class doesn't have a descriptor. This happens - # when a service stub is subclassed. - if GeneratedServiceStubType._DESCRIPTOR_KEY not in dictionary: - return - descriptor = dictionary[GeneratedServiceStubType._DESCRIPTOR_KEY] - service_stub_builder = _ServiceStubBuilder(descriptor) - service_stub_builder.BuildServiceStub(cls) - - -class _ServiceBuilder(object): - - """This class constructs a protocol service class using a service descriptor. - - Given a service descriptor, this class constructs a class that represents - the specified service descriptor. One service builder instance constructs - exactly one service class. That means all instances of that class share the - same builder. - """ - - def __init__(self, service_descriptor): - """Initializes an instance of the service class builder. - - Args: - service_descriptor: ServiceDescriptor to use when constructing the - service class. - """ - self.descriptor = service_descriptor - - def BuildService(self, cls): - """Constructs the service class. - - Args: - cls: The class that will be constructed. - """ - - # CallMethod needs to operate with an instance of the Service class. This - # internal wrapper function exists only to be able to pass the service - # instance to the method that does the real CallMethod work. - def _WrapCallMethod(srvc, method_descriptor, - rpc_controller, request, callback): - return self._CallMethod(srvc, method_descriptor, - rpc_controller, request, callback) - self.cls = cls - cls.CallMethod = _WrapCallMethod - cls.GetDescriptor = staticmethod(lambda: self.descriptor) - cls.GetDescriptor.__doc__ = "Returns the service descriptor." - cls.GetRequestClass = self._GetRequestClass - cls.GetResponseClass = self._GetResponseClass - for method in self.descriptor.methods: - setattr(cls, method.name, self._GenerateNonImplementedMethod(method)) - - def _CallMethod(self, srvc, method_descriptor, - rpc_controller, request, callback): - """Calls the method described by a given method descriptor. - - Args: - srvc: Instance of the service for which this method is called. - method_descriptor: Descriptor that represent the method to call. - rpc_controller: RPC controller to use for this method's execution. - request: Request protocol message. - callback: A callback to invoke after the method has completed. - """ - if method_descriptor.containing_service != self.descriptor: - raise RuntimeError( - 'CallMethod() given method descriptor for wrong service type.') - method = getattr(srvc, method_descriptor.name) - return method(rpc_controller, request, callback) - - def _GetRequestClass(self, method_descriptor): - """Returns the class of the request protocol message. - - Args: - method_descriptor: Descriptor of the method for which to return the - request protocol message class. - - Returns: - A class that represents the input protocol message of the specified - method. - """ - if method_descriptor.containing_service != self.descriptor: - raise RuntimeError( - 'GetRequestClass() given method descriptor for wrong service type.') - return method_descriptor.input_type._concrete_class - - def _GetResponseClass(self, method_descriptor): - """Returns the class of the response protocol message. - - Args: - method_descriptor: Descriptor of the method for which to return the - response protocol message class. - - Returns: - A class that represents the output protocol message of the specified - method. - """ - if method_descriptor.containing_service != self.descriptor: - raise RuntimeError( - 'GetResponseClass() given method descriptor for wrong service type.') - return method_descriptor.output_type._concrete_class - - def _GenerateNonImplementedMethod(self, method): - """Generates and returns a method that can be set for a service methods. - - Args: - method: Descriptor of the service method for which a method is to be - generated. - - Returns: - A method that can be added to the service class. - """ - return lambda inst, rpc_controller, request, callback: ( - self._NonImplementedMethod(method.name, rpc_controller, callback)) - - def _NonImplementedMethod(self, method_name, rpc_controller, callback): - """The body of all methods in the generated service class. - - Args: - method_name: Name of the method being executed. - rpc_controller: RPC controller used to execute this method. - callback: A callback which will be invoked when the method finishes. - """ - rpc_controller.SetFailed('Method %s not implemented.' % method_name) - callback(None) - - -class _ServiceStubBuilder(object): - - """Constructs a protocol service stub class using a service descriptor. - - Given a service descriptor, this class constructs a suitable stub class. - A stub is just a type-safe wrapper around an RpcChannel which emulates a - local implementation of the service. - - One service stub builder instance constructs exactly one class. It means all - instances of that class share the same service stub builder. - """ - - def __init__(self, service_descriptor): - """Initializes an instance of the service stub class builder. - - Args: - service_descriptor: ServiceDescriptor to use when constructing the - stub class. - """ - self.descriptor = service_descriptor - - def BuildServiceStub(self, cls): - """Constructs the stub class. - - Args: - cls: The class that will be constructed. - """ - - def _ServiceStubInit(stub, rpc_channel): - stub.rpc_channel = rpc_channel - self.cls = cls - cls.__init__ = _ServiceStubInit - for method in self.descriptor.methods: - setattr(cls, method.name, self._GenerateStubMethod(method)) - - def _GenerateStubMethod(self, method): - return (lambda inst, rpc_controller, request, callback=None: - self._StubMethod(inst, method, rpc_controller, request, callback)) - - def _StubMethod(self, stub, method_descriptor, - rpc_controller, request, callback): - """The body of all service methods in the generated stub class. - - Args: - stub: Stub instance. - method_descriptor: Descriptor of the invoked method. - rpc_controller: Rpc controller to execute the method. - request: Request protocol message. - callback: A callback to execute when the method finishes. - Returns: - Response message (in case of blocking call). - """ - return stub.rpc_channel.CallMethod( - method_descriptor, rpc_controller, request, - method_descriptor.output_type._concrete_class, callback) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/text_format.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/text_format.py deleted file mode 100755 index c3a1cf60..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/google/protobuf/text_format.py +++ /dev/null @@ -1,691 +0,0 @@ -# Protocol Buffers - Google's data interchange format -# Copyright 2008 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Contains routines for printing protocol messages in text format.""" - -__author__ = 'kenton@google.com (Kenton Varda)' - -import cStringIO -import re - -from collections import deque -from google.protobuf.internal import type_checkers -from google.protobuf import descriptor - -__all__ = [ 'MessageToString', 'PrintMessage', 'PrintField', - 'PrintFieldValue', 'Merge' ] - - -# Infinity and NaN are not explicitly supported by Python pre-2.6, and -# float('inf') does not work on Windows (pre-2.6). -_INFINITY = 1e10000 # overflows, thus will actually be infinity. -_NAN = _INFINITY * 0 - - -class ParseError(Exception): - """Thrown in case of ASCII parsing error.""" - - -def MessageToString(message, as_utf8=False, as_one_line=False): - out = cStringIO.StringIO() - PrintMessage(message, out, as_utf8=as_utf8, as_one_line=as_one_line) - result = out.getvalue() - out.close() - if as_one_line: - return result.rstrip() - return result - - -def PrintMessage(message, out, indent=0, as_utf8=False, as_one_line=False): - for field, value in message.ListFields(): - if field.label == descriptor.FieldDescriptor.LABEL_REPEATED: - for element in value: - PrintField(field, element, out, indent, as_utf8, as_one_line) - else: - PrintField(field, value, out, indent, as_utf8, as_one_line) - - -def PrintField(field, value, out, indent=0, as_utf8=False, as_one_line=False): - """Print a single field name/value pair. For repeated fields, the value - should be a single element.""" - - out.write(' ' * indent); - if field.is_extension: - out.write('[') - if (field.containing_type.GetOptions().message_set_wire_format and - field.type == descriptor.FieldDescriptor.TYPE_MESSAGE and - field.message_type == field.extension_scope and - field.label == descriptor.FieldDescriptor.LABEL_OPTIONAL): - out.write(field.message_type.full_name) - else: - out.write(field.full_name) - out.write(']') - elif field.type == descriptor.FieldDescriptor.TYPE_GROUP: - # For groups, use the capitalized name. - out.write(field.message_type.name) - else: - out.write(field.name) - - if field.cpp_type != descriptor.FieldDescriptor.CPPTYPE_MESSAGE: - # The colon is optional in this case, but our cross-language golden files - # don't include it. - out.write(': ') - - PrintFieldValue(field, value, out, indent, as_utf8, as_one_line) - if as_one_line: - out.write(' ') - else: - out.write('\n') - - -def PrintFieldValue(field, value, out, indent=0, - as_utf8=False, as_one_line=False): - """Print a single field value (not including name). For repeated fields, - the value should be a single element.""" - - if field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_MESSAGE: - if as_one_line: - out.write(' { ') - PrintMessage(value, out, indent, as_utf8, as_one_line) - out.write('}') - else: - out.write(' {\n') - PrintMessage(value, out, indent + 2, as_utf8, as_one_line) - out.write(' ' * indent + '}') - elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_ENUM: - out.write(field.enum_type.values_by_number[value].name) - elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_STRING: - out.write('\"') - if type(value) is unicode: - out.write(_CEscape(value.encode('utf-8'), as_utf8)) - else: - out.write(_CEscape(value, as_utf8)) - out.write('\"') - elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_BOOL: - if value: - out.write("true") - else: - out.write("false") - else: - out.write(str(value)) - - -def Merge(text, message): - """Merges an ASCII representation of a protocol message into a message. - - Args: - text: Message ASCII representation. - message: A protocol buffer message to merge into. - - Raises: - ParseError: On ASCII parsing problems. - """ - tokenizer = _Tokenizer(text) - while not tokenizer.AtEnd(): - _MergeField(tokenizer, message) - - -def _MergeField(tokenizer, message): - """Merges a single protocol message field into a message. - - Args: - tokenizer: A tokenizer to parse the field name and values. - message: A protocol message to record the data. - - Raises: - ParseError: In case of ASCII parsing problems. - """ - message_descriptor = message.DESCRIPTOR - if tokenizer.TryConsume('['): - name = [tokenizer.ConsumeIdentifier()] - while tokenizer.TryConsume('.'): - name.append(tokenizer.ConsumeIdentifier()) - name = '.'.join(name) - - if not message_descriptor.is_extendable: - raise tokenizer.ParseErrorPreviousToken( - 'Message type "%s" does not have extensions.' % - message_descriptor.full_name) - field = message.Extensions._FindExtensionByName(name) - if not field: - raise tokenizer.ParseErrorPreviousToken( - 'Extension "%s" not registered.' % name) - elif message_descriptor != field.containing_type: - raise tokenizer.ParseErrorPreviousToken( - 'Extension "%s" does not extend message type "%s".' % ( - name, message_descriptor.full_name)) - tokenizer.Consume(']') - else: - name = tokenizer.ConsumeIdentifier() - field = message_descriptor.fields_by_name.get(name, None) - - # Group names are expected to be capitalized as they appear in the - # .proto file, which actually matches their type names, not their field - # names. - if not field: - field = message_descriptor.fields_by_name.get(name.lower(), None) - if field and field.type != descriptor.FieldDescriptor.TYPE_GROUP: - field = None - - if (field and field.type == descriptor.FieldDescriptor.TYPE_GROUP and - field.message_type.name != name): - field = None - - if not field: - raise tokenizer.ParseErrorPreviousToken( - 'Message type "%s" has no field named "%s".' % ( - message_descriptor.full_name, name)) - - if field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_MESSAGE: - tokenizer.TryConsume(':') - - if tokenizer.TryConsume('<'): - end_token = '>' - else: - tokenizer.Consume('{') - end_token = '}' - - if field.label == descriptor.FieldDescriptor.LABEL_REPEATED: - if field.is_extension: - sub_message = message.Extensions[field].add() - else: - sub_message = getattr(message, field.name).add() - else: - if field.is_extension: - sub_message = message.Extensions[field] - else: - sub_message = getattr(message, field.name) - sub_message.SetInParent() - - while not tokenizer.TryConsume(end_token): - if tokenizer.AtEnd(): - raise tokenizer.ParseErrorPreviousToken('Expected "%s".' % (end_token)) - _MergeField(tokenizer, sub_message) - else: - _MergeScalarField(tokenizer, message, field) - - -def _MergeScalarField(tokenizer, message, field): - """Merges a single protocol message scalar field into a message. - - Args: - tokenizer: A tokenizer to parse the field value. - message: A protocol message to record the data. - field: The descriptor of the field to be merged. - - Raises: - ParseError: In case of ASCII parsing problems. - RuntimeError: On runtime errors. - """ - tokenizer.Consume(':') - value = None - - if field.type in (descriptor.FieldDescriptor.TYPE_INT32, - descriptor.FieldDescriptor.TYPE_SINT32, - descriptor.FieldDescriptor.TYPE_SFIXED32): - value = tokenizer.ConsumeInt32() - elif field.type in (descriptor.FieldDescriptor.TYPE_INT64, - descriptor.FieldDescriptor.TYPE_SINT64, - descriptor.FieldDescriptor.TYPE_SFIXED64): - value = tokenizer.ConsumeInt64() - elif field.type in (descriptor.FieldDescriptor.TYPE_UINT32, - descriptor.FieldDescriptor.TYPE_FIXED32): - value = tokenizer.ConsumeUint32() - elif field.type in (descriptor.FieldDescriptor.TYPE_UINT64, - descriptor.FieldDescriptor.TYPE_FIXED64): - value = tokenizer.ConsumeUint64() - elif field.type in (descriptor.FieldDescriptor.TYPE_FLOAT, - descriptor.FieldDescriptor.TYPE_DOUBLE): - value = tokenizer.ConsumeFloat() - elif field.type == descriptor.FieldDescriptor.TYPE_BOOL: - value = tokenizer.ConsumeBool() - elif field.type == descriptor.FieldDescriptor.TYPE_STRING: - value = tokenizer.ConsumeString() - elif field.type == descriptor.FieldDescriptor.TYPE_BYTES: - value = tokenizer.ConsumeByteString() - elif field.type == descriptor.FieldDescriptor.TYPE_ENUM: - # Enum can be specified by a number (the enum value), or by - # a string literal (the enum name). - enum_descriptor = field.enum_type - if tokenizer.LookingAtInteger(): - number = tokenizer.ConsumeInt32() - enum_value = enum_descriptor.values_by_number.get(number, None) - if enum_value is None: - raise tokenizer.ParseErrorPreviousToken( - 'Enum type "%s" has no value with number %d.' % ( - enum_descriptor.full_name, number)) - else: - identifier = tokenizer.ConsumeIdentifier() - enum_value = enum_descriptor.values_by_name.get(identifier, None) - if enum_value is None: - raise tokenizer.ParseErrorPreviousToken( - 'Enum type "%s" has no value named %s.' % ( - enum_descriptor.full_name, identifier)) - value = enum_value.number - else: - raise RuntimeError('Unknown field type %d' % field.type) - - if field.label == descriptor.FieldDescriptor.LABEL_REPEATED: - if field.is_extension: - message.Extensions[field].append(value) - else: - getattr(message, field.name).append(value) - else: - if field.is_extension: - message.Extensions[field] = value - else: - setattr(message, field.name, value) - - -class _Tokenizer(object): - """Protocol buffer ASCII representation tokenizer. - - This class handles the lower level string parsing by splitting it into - meaningful tokens. - - It was directly ported from the Java protocol buffer API. - """ - - _WHITESPACE = re.compile('(\\s|(#.*$))+', re.MULTILINE) - _TOKEN = re.compile( - '[a-zA-Z_][0-9a-zA-Z_+-]*|' # an identifier - '[0-9+-][0-9a-zA-Z_.+-]*|' # a number - '\"([^\"\n\\\\]|\\\\.)*(\"|\\\\?$)|' # a double-quoted string - '\'([^\'\n\\\\]|\\\\.)*(\'|\\\\?$)') # a single-quoted string - _IDENTIFIER = re.compile('\w+') - _INTEGER_CHECKERS = [type_checkers.Uint32ValueChecker(), - type_checkers.Int32ValueChecker(), - type_checkers.Uint64ValueChecker(), - type_checkers.Int64ValueChecker()] - _FLOAT_INFINITY = re.compile('-?inf(inity)?f?', re.IGNORECASE) - _FLOAT_NAN = re.compile("nanf?", re.IGNORECASE) - - def __init__(self, text_message): - self._text_message = text_message - - self._position = 0 - self._line = -1 - self._column = 0 - self._token_start = None - self.token = '' - self._lines = deque(text_message.split('\n')) - self._current_line = '' - self._previous_line = 0 - self._previous_column = 0 - self._SkipWhitespace() - self.NextToken() - - def AtEnd(self): - """Checks the end of the text was reached. - - Returns: - True iff the end was reached. - """ - return self.token == '' - - def _PopLine(self): - while len(self._current_line) <= self._column: - if not self._lines: - self._current_line = '' - return - self._line += 1 - self._column = 0 - self._current_line = self._lines.popleft() - - def _SkipWhitespace(self): - while True: - self._PopLine() - match = self._WHITESPACE.match(self._current_line, self._column) - if not match: - break - length = len(match.group(0)) - self._column += length - - def TryConsume(self, token): - """Tries to consume a given piece of text. - - Args: - token: Text to consume. - - Returns: - True iff the text was consumed. - """ - if self.token == token: - self.NextToken() - return True - return False - - def Consume(self, token): - """Consumes a piece of text. - - Args: - token: Text to consume. - - Raises: - ParseError: If the text couldn't be consumed. - """ - if not self.TryConsume(token): - raise self._ParseError('Expected "%s".' % token) - - def LookingAtInteger(self): - """Checks if the current token is an integer. - - Returns: - True iff the current token is an integer. - """ - if not self.token: - return False - c = self.token[0] - return (c >= '0' and c <= '9') or c == '-' or c == '+' - - def ConsumeIdentifier(self): - """Consumes protocol message field identifier. - - Returns: - Identifier string. - - Raises: - ParseError: If an identifier couldn't be consumed. - """ - result = self.token - if not self._IDENTIFIER.match(result): - raise self._ParseError('Expected identifier.') - self.NextToken() - return result - - def ConsumeInt32(self): - """Consumes a signed 32bit integer number. - - Returns: - The integer parsed. - - Raises: - ParseError: If a signed 32bit integer couldn't be consumed. - """ - try: - result = self._ParseInteger(self.token, is_signed=True, is_long=False) - except ValueError, e: - raise self._IntegerParseError(e) - self.NextToken() - return result - - def ConsumeUint32(self): - """Consumes an unsigned 32bit integer number. - - Returns: - The integer parsed. - - Raises: - ParseError: If an unsigned 32bit integer couldn't be consumed. - """ - try: - result = self._ParseInteger(self.token, is_signed=False, is_long=False) - except ValueError, e: - raise self._IntegerParseError(e) - self.NextToken() - return result - - def ConsumeInt64(self): - """Consumes a signed 64bit integer number. - - Returns: - The integer parsed. - - Raises: - ParseError: If a signed 64bit integer couldn't be consumed. - """ - try: - result = self._ParseInteger(self.token, is_signed=True, is_long=True) - except ValueError, e: - raise self._IntegerParseError(e) - self.NextToken() - return result - - def ConsumeUint64(self): - """Consumes an unsigned 64bit integer number. - - Returns: - The integer parsed. - - Raises: - ParseError: If an unsigned 64bit integer couldn't be consumed. - """ - try: - result = self._ParseInteger(self.token, is_signed=False, is_long=True) - except ValueError, e: - raise self._IntegerParseError(e) - self.NextToken() - return result - - def ConsumeFloat(self): - """Consumes an floating point number. - - Returns: - The number parsed. - - Raises: - ParseError: If a floating point number couldn't be consumed. - """ - text = self.token - if self._FLOAT_INFINITY.match(text): - self.NextToken() - if text.startswith('-'): - return -_INFINITY - return _INFINITY - - if self._FLOAT_NAN.match(text): - self.NextToken() - return _NAN - - try: - result = float(text) - except ValueError, e: - raise self._FloatParseError(e) - self.NextToken() - return result - - def ConsumeBool(self): - """Consumes a boolean value. - - Returns: - The bool parsed. - - Raises: - ParseError: If a boolean value couldn't be consumed. - """ - if self.token in ('true', 't', '1'): - self.NextToken() - return True - elif self.token in ('false', 'f', '0'): - self.NextToken() - return False - else: - raise self._ParseError('Expected "true" or "false".') - - def ConsumeString(self): - """Consumes a string value. - - Returns: - The string parsed. - - Raises: - ParseError: If a string value couldn't be consumed. - """ - bytes = self.ConsumeByteString() - try: - return unicode(bytes, 'utf-8') - except UnicodeDecodeError, e: - raise self._StringParseError(e) - - def ConsumeByteString(self): - """Consumes a byte array value. - - Returns: - The array parsed (as a string). - - Raises: - ParseError: If a byte array value couldn't be consumed. - """ - list = [self._ConsumeSingleByteString()] - while len(self.token) > 0 and self.token[0] in ('\'', '"'): - list.append(self._ConsumeSingleByteString()) - return "".join(list) - - def _ConsumeSingleByteString(self): - """Consume one token of a string literal. - - String literals (whether bytes or text) can come in multiple adjacent - tokens which are automatically concatenated, like in C or Python. This - method only consumes one token. - """ - text = self.token - if len(text) < 1 or text[0] not in ('\'', '"'): - raise self._ParseError('Exptected string.') - - if len(text) < 2 or text[-1] != text[0]: - raise self._ParseError('String missing ending quote.') - - try: - result = _CUnescape(text[1:-1]) - except ValueError, e: - raise self._ParseError(str(e)) - self.NextToken() - return result - - def _ParseInteger(self, text, is_signed=False, is_long=False): - """Parses an integer. - - Args: - text: The text to parse. - is_signed: True if a signed integer must be parsed. - is_long: True if a long integer must be parsed. - - Returns: - The integer value. - - Raises: - ValueError: Thrown Iff the text is not a valid integer. - """ - pos = 0 - if text.startswith('-'): - pos += 1 - - base = 10 - if text.startswith('0x', pos) or text.startswith('0X', pos): - base = 16 - elif text.startswith('0', pos): - base = 8 - - # Do the actual parsing. Exception handling is propagated to caller. - result = int(text, base) - - # Check if the integer is sane. Exceptions handled by callers. - checker = self._INTEGER_CHECKERS[2 * int(is_long) + int(is_signed)] - checker.CheckValue(result) - return result - - def ParseErrorPreviousToken(self, message): - """Creates and *returns* a ParseError for the previously read token. - - Args: - message: A message to set for the exception. - - Returns: - A ParseError instance. - """ - return ParseError('%d:%d : %s' % ( - self._previous_line + 1, self._previous_column + 1, message)) - - def _ParseError(self, message): - """Creates and *returns* a ParseError for the current token.""" - return ParseError('%d:%d : %s' % ( - self._line + 1, self._column - len(self.token) + 1, message)) - - def _IntegerParseError(self, e): - return self._ParseError('Couldn\'t parse integer: ' + str(e)) - - def _FloatParseError(self, e): - return self._ParseError('Couldn\'t parse number: ' + str(e)) - - def _StringParseError(self, e): - return self._ParseError('Couldn\'t parse string: ' + str(e)) - - def NextToken(self): - """Reads the next meaningful token.""" - self._previous_line = self._line - self._previous_column = self._column - - self._column += len(self.token) - self._SkipWhitespace() - - if not self._lines and len(self._current_line) <= self._column: - self.token = '' - return - - match = self._TOKEN.match(self._current_line, self._column) - if match: - token = match.group(0) - self.token = token - else: - self.token = self._current_line[self._column] - - -# text.encode('string_escape') does not seem to satisfy our needs as it -# encodes unprintable characters using two-digit hex escapes whereas our -# C++ unescaping function allows hex escapes to be any length. So, -# "\0011".encode('string_escape') ends up being "\\x011", which will be -# decoded in C++ as a single-character string with char code 0x11. -def _CEscape(text, as_utf8): - def escape(c): - o = ord(c) - if o == 10: return r"\n" # optional escape - if o == 13: return r"\r" # optional escape - if o == 9: return r"\t" # optional escape - if o == 39: return r"\'" # optional escape - - if o == 34: return r'\"' # necessary escape - if o == 92: return r"\\" # necessary escape - - # necessary escapes - if not as_utf8 and (o >= 127 or o < 32): return "\\%03o" % o - return c - return "".join([escape(c) for c in text]) - - -_CUNESCAPE_HEX = re.compile('\\\\x([0-9a-fA-F]{2}|[0-9a-fA-F])') - - -def _CUnescape(text): - def ReplaceHex(m): - return chr(int(m.group(0)[2:], 16)) - # This is required because the 'string_escape' encoding doesn't - # allow single-digit hex escapes (like '\xf'). - result = _CUNESCAPE_HEX.sub(ReplaceHex, text) - return result.decode('string_escape') diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/mox.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/mox.py deleted file mode 100755 index ce80ba50..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/mox.py +++ /dev/null @@ -1,1401 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is used for testing. The original is at: -# http://code.google.com/p/pymox/ - -"""Mox, an object-mocking framework for Python. - -Mox works in the record-replay-verify paradigm. When you first create -a mock object, it is in record mode. You then programmatically set -the expected behavior of the mock object (what methods are to be -called on it, with what parameters, what they should return, and in -what order). - -Once you have set up the expected mock behavior, you put it in replay -mode. Now the mock responds to method calls just as you told it to. -If an unexpected method (or an expected method with unexpected -parameters) is called, then an exception will be raised. - -Once you are done interacting with the mock, you need to verify that -all the expected interactions occured. (Maybe your code exited -prematurely without calling some cleanup method!) The verify phase -ensures that every expected method was called; otherwise, an exception -will be raised. - -Suggested usage / workflow: - - # Create Mox factory - my_mox = Mox() - - # Create a mock data access object - mock_dao = my_mox.CreateMock(DAOClass) - - # Set up expected behavior - mock_dao.RetrievePersonWithIdentifier('1').AndReturn(person) - mock_dao.DeletePerson(person) - - # Put mocks in replay mode - my_mox.ReplayAll() - - # Inject mock object and run test - controller.SetDao(mock_dao) - controller.DeletePersonById('1') - - # Verify all methods were called as expected - my_mox.VerifyAll() -""" - -from collections import deque -import re -import types -import unittest - -import stubout - -class Error(AssertionError): - """Base exception for this module.""" - - pass - - -class ExpectedMethodCallsError(Error): - """Raised when Verify() is called before all expected methods have been called - """ - - def __init__(self, expected_methods): - """Init exception. - - Args: - # expected_methods: A sequence of MockMethod objects that should have been - # called. - expected_methods: [MockMethod] - - Raises: - ValueError: if expected_methods contains no methods. - """ - - if not expected_methods: - raise ValueError("There must be at least one expected method") - Error.__init__(self) - self._expected_methods = expected_methods - - def __str__(self): - calls = "\n".join(["%3d. %s" % (i, m) - for i, m in enumerate(self._expected_methods)]) - return "Verify: Expected methods never called:\n%s" % (calls,) - - -class UnexpectedMethodCallError(Error): - """Raised when an unexpected method is called. - - This can occur if a method is called with incorrect parameters, or out of the - specified order. - """ - - def __init__(self, unexpected_method, expected): - """Init exception. - - Args: - # unexpected_method: MockMethod that was called but was not at the head of - # the expected_method queue. - # expected: MockMethod or UnorderedGroup the method should have - # been in. - unexpected_method: MockMethod - expected: MockMethod or UnorderedGroup - """ - - Error.__init__(self) - self._unexpected_method = unexpected_method - self._expected = expected - - def __str__(self): - return "Unexpected method call: %s. Expecting: %s" % \ - (self._unexpected_method, self._expected) - - -class UnknownMethodCallError(Error): - """Raised if an unknown method is requested of the mock object.""" - - def __init__(self, unknown_method_name): - """Init exception. - - Args: - # unknown_method_name: Method call that is not part of the mocked class's - # public interface. - unknown_method_name: str - """ - - Error.__init__(self) - self._unknown_method_name = unknown_method_name - - def __str__(self): - return "Method called is not a member of the object: %s" % \ - self._unknown_method_name - - -class Mox(object): - """Mox: a factory for creating mock objects.""" - - # A list of types that should be stubbed out with MockObjects (as - # opposed to MockAnythings). - _USE_MOCK_OBJECT = [types.ClassType, types.InstanceType, types.ModuleType, - types.ObjectType, types.TypeType] - - def __init__(self): - """Initialize a new Mox.""" - - self._mock_objects = [] - self.stubs = stubout.StubOutForTesting() - - def CreateMock(self, class_to_mock): - """Create a new mock object. - - Args: - # class_to_mock: the class to be mocked - class_to_mock: class - - Returns: - MockObject that can be used as the class_to_mock would be. - """ - - new_mock = MockObject(class_to_mock) - self._mock_objects.append(new_mock) - return new_mock - - def CreateMockAnything(self): - """Create a mock that will accept any method calls. - - This does not enforce an interface. - """ - - new_mock = MockAnything() - self._mock_objects.append(new_mock) - return new_mock - - def ReplayAll(self): - """Set all mock objects to replay mode.""" - - for mock_obj in self._mock_objects: - mock_obj._Replay() - - - def VerifyAll(self): - """Call verify on all mock objects created.""" - - for mock_obj in self._mock_objects: - mock_obj._Verify() - - def ResetAll(self): - """Call reset on all mock objects. This does not unset stubs.""" - - for mock_obj in self._mock_objects: - mock_obj._Reset() - - def StubOutWithMock(self, obj, attr_name, use_mock_anything=False): - """Replace a method, attribute, etc. with a Mock. - - This will replace a class or module with a MockObject, and everything else - (method, function, etc) with a MockAnything. This can be overridden to - always use a MockAnything by setting use_mock_anything to True. - - Args: - obj: A Python object (class, module, instance, callable). - attr_name: str. The name of the attribute to replace with a mock. - use_mock_anything: bool. True if a MockAnything should be used regardless - of the type of attribute. - """ - - attr_to_replace = getattr(obj, attr_name) - if type(attr_to_replace) in self._USE_MOCK_OBJECT and not use_mock_anything: - stub = self.CreateMock(attr_to_replace) - else: - stub = self.CreateMockAnything() - - self.stubs.Set(obj, attr_name, stub) - - def UnsetStubs(self): - """Restore stubs to their original state.""" - - self.stubs.UnsetAll() - -def Replay(*args): - """Put mocks into Replay mode. - - Args: - # args is any number of mocks to put into replay mode. - """ - - for mock in args: - mock._Replay() - - -def Verify(*args): - """Verify mocks. - - Args: - # args is any number of mocks to be verified. - """ - - for mock in args: - mock._Verify() - - -def Reset(*args): - """Reset mocks. - - Args: - # args is any number of mocks to be reset. - """ - - for mock in args: - mock._Reset() - - -class MockAnything: - """A mock that can be used to mock anything. - - This is helpful for mocking classes that do not provide a public interface. - """ - - def __init__(self): - """ """ - self._Reset() - - def __getattr__(self, method_name): - """Intercept method calls on this object. - - A new MockMethod is returned that is aware of the MockAnything's - state (record or replay). The call will be recorded or replayed - by the MockMethod's __call__. - - Args: - # method name: the name of the method being called. - method_name: str - - Returns: - A new MockMethod aware of MockAnything's state (record or replay). - """ - - return self._CreateMockMethod(method_name) - - def _CreateMockMethod(self, method_name): - """Create a new mock method call and return it. - - Args: - # method name: the name of the method being called. - method_name: str - - Returns: - A new MockMethod aware of MockAnything's state (record or replay). - """ - - return MockMethod(method_name, self._expected_calls_queue, - self._replay_mode) - - def __nonzero__(self): - """Return 1 for nonzero so the mock can be used as a conditional.""" - - return 1 - - def __eq__(self, rhs): - """Provide custom logic to compare objects.""" - - return (isinstance(rhs, MockAnything) and - self._replay_mode == rhs._replay_mode and - self._expected_calls_queue == rhs._expected_calls_queue) - - def __ne__(self, rhs): - """Provide custom logic to compare objects.""" - - return not self == rhs - - def _Replay(self): - """Start replaying expected method calls.""" - - self._replay_mode = True - - def _Verify(self): - """Verify that all of the expected calls have been made. - - Raises: - ExpectedMethodCallsError: if there are still more method calls in the - expected queue. - """ - - # If the list of expected calls is not empty, raise an exception - if self._expected_calls_queue: - # The last MultipleTimesGroup is not popped from the queue. - if (len(self._expected_calls_queue) == 1 and - isinstance(self._expected_calls_queue[0], MultipleTimesGroup) and - self._expected_calls_queue[0].IsSatisfied()): - pass - else: - raise ExpectedMethodCallsError(self._expected_calls_queue) - - def _Reset(self): - """Reset the state of this mock to record mode with an empty queue.""" - - # Maintain a list of method calls we are expecting - self._expected_calls_queue = deque() - - # Make sure we are in setup mode, not replay mode - self._replay_mode = False - - -class MockObject(MockAnything, object): - """A mock object that simulates the public/protected interface of a class.""" - - def __init__(self, class_to_mock): - """Initialize a mock object. - - This determines the methods and properties of the class and stores them. - - Args: - # class_to_mock: class to be mocked - class_to_mock: class - """ - - # This is used to hack around the mixin/inheritance of MockAnything, which - # is not a proper object (it can be anything. :-) - MockAnything.__dict__['__init__'](self) - - # Get a list of all the public and special methods we should mock. - self._known_methods = set() - self._known_vars = set() - self._class_to_mock = class_to_mock - for method in dir(class_to_mock): - if callable(getattr(class_to_mock, method)): - self._known_methods.add(method) - else: - self._known_vars.add(method) - - def __getattr__(self, name): - """Intercept attribute request on this object. - - If the attribute is a public class variable, it will be returned and not - recorded as a call. - - If the attribute is not a variable, it is handled like a method - call. The method name is checked against the set of mockable - methods, and a new MockMethod is returned that is aware of the - MockObject's state (record or replay). The call will be recorded - or replayed by the MockMethod's __call__. - - Args: - # name: the name of the attribute being requested. - name: str - - Returns: - Either a class variable or a new MockMethod that is aware of the state - of the mock (record or replay). - - Raises: - UnknownMethodCallError if the MockObject does not mock the requested - method. - """ - - if name in self._known_vars: - return getattr(self._class_to_mock, name) - - if name in self._known_methods: - return self._CreateMockMethod(name) - - raise UnknownMethodCallError(name) - - def __eq__(self, rhs): - """Provide custom logic to compare objects.""" - - return (isinstance(rhs, MockObject) and - self._class_to_mock == rhs._class_to_mock and - self._replay_mode == rhs._replay_mode and - self._expected_calls_queue == rhs._expected_calls_queue) - - def __setitem__(self, key, value): - """Provide custom logic for mocking classes that support item assignment. - - Args: - key: Key to set the value for. - value: Value to set. - - Returns: - Expected return value in replay mode. A MockMethod object for the - __setitem__ method that has already been called if not in replay mode. - - Raises: - TypeError if the underlying class does not support item assignment. - UnexpectedMethodCallError if the object does not expect the call to - __setitem__. - - """ - setitem = self._class_to_mock.__dict__.get('__setitem__', None) - - # Verify the class supports item assignment. - if setitem is None: - raise TypeError('object does not support item assignment') - - # If we are in replay mode then simply call the mock __setitem__ method. - if self._replay_mode: - return MockMethod('__setitem__', self._expected_calls_queue, - self._replay_mode)(key, value) - - - # Otherwise, create a mock method __setitem__. - return self._CreateMockMethod('__setitem__')(key, value) - - def __getitem__(self, key): - """Provide custom logic for mocking classes that are subscriptable. - - Args: - key: Key to return the value for. - - Returns: - Expected return value in replay mode. A MockMethod object for the - __getitem__ method that has already been called if not in replay mode. - - Raises: - TypeError if the underlying class is not subscriptable. - UnexpectedMethodCallError if the object does not expect the call to - __setitem__. - - """ - getitem = self._class_to_mock.__dict__.get('__getitem__', None) - - # Verify the class supports item assignment. - if getitem is None: - raise TypeError('unsubscriptable object') - - # If we are in replay mode then simply call the mock __getitem__ method. - if self._replay_mode: - return MockMethod('__getitem__', self._expected_calls_queue, - self._replay_mode)(key) - - - # Otherwise, create a mock method __getitem__. - return self._CreateMockMethod('__getitem__')(key) - - def __call__(self, *params, **named_params): - """Provide custom logic for mocking classes that are callable.""" - - # Verify the class we are mocking is callable - callable = self._class_to_mock.__dict__.get('__call__', None) - if callable is None: - raise TypeError('Not callable') - - # Because the call is happening directly on this object instead of a method, - # the call on the mock method is made right here - mock_method = self._CreateMockMethod('__call__') - return mock_method(*params, **named_params) - - @property - def __class__(self): - """Return the class that is being mocked.""" - - return self._class_to_mock - - -class MockMethod(object): - """Callable mock method. - - A MockMethod should act exactly like the method it mocks, accepting parameters - and returning a value, or throwing an exception (as specified). When this - method is called, it can optionally verify whether the called method (name and - signature) matches the expected method. - """ - - def __init__(self, method_name, call_queue, replay_mode): - """Construct a new mock method. - - Args: - # method_name: the name of the method - # call_queue: deque of calls, verify this call against the head, or add - # this call to the queue. - # replay_mode: False if we are recording, True if we are verifying calls - # against the call queue. - method_name: str - call_queue: list or deque - replay_mode: bool - """ - - self._name = method_name - self._call_queue = call_queue - if not isinstance(call_queue, deque): - self._call_queue = deque(self._call_queue) - self._replay_mode = replay_mode - - self._params = None - self._named_params = None - self._return_value = None - self._exception = None - self._side_effects = None - - def __call__(self, *params, **named_params): - """Log parameters and return the specified return value. - - If the Mock(Anything/Object) associated with this call is in record mode, - this MockMethod will be pushed onto the expected call queue. If the mock - is in replay mode, this will pop a MockMethod off the top of the queue and - verify this call is equal to the expected call. - - Raises: - UnexpectedMethodCall if this call is supposed to match an expected method - call and it does not. - """ - - self._params = params - self._named_params = named_params - - if not self._replay_mode: - self._call_queue.append(self) - return self - - expected_method = self._VerifyMethodCall() - - if expected_method._side_effects: - expected_method._side_effects(*params, **named_params) - - if expected_method._exception: - raise expected_method._exception - - return expected_method._return_value - - def __getattr__(self, name): - """Raise an AttributeError with a helpful message.""" - - raise AttributeError('MockMethod has no attribute "%s". ' - 'Did you remember to put your mocks in replay mode?' % name) - - def _PopNextMethod(self): - """Pop the next method from our call queue.""" - try: - return self._call_queue.popleft() - except IndexError: - raise UnexpectedMethodCallError(self, None) - - def _VerifyMethodCall(self): - """Verify the called method is expected. - - This can be an ordered method, or part of an unordered set. - - Returns: - The expected mock method. - - Raises: - UnexpectedMethodCall if the method called was not expected. - """ - - expected = self._PopNextMethod() - - # Loop here, because we might have a MethodGroup followed by another - # group. - while isinstance(expected, MethodGroup): - expected, method = expected.MethodCalled(self) - if method is not None: - return method - - # This is a mock method, so just check equality. - if expected != self: - raise UnexpectedMethodCallError(self, expected) - - return expected - - def __str__(self): - params = ', '.join( - [repr(p) for p in self._params or []] + - ['%s=%r' % x for x in sorted((self._named_params or {}).items())]) - desc = "%s(%s) -> %r" % (self._name, params, self._return_value) - return desc - - def __eq__(self, rhs): - """Test whether this MockMethod is equivalent to another MockMethod. - - Args: - # rhs: the right hand side of the test - rhs: MockMethod - """ - - return (isinstance(rhs, MockMethod) and - self._name == rhs._name and - self._params == rhs._params and - self._named_params == rhs._named_params) - - def __ne__(self, rhs): - """Test whether this MockMethod is not equivalent to another MockMethod. - - Args: - # rhs: the right hand side of the test - rhs: MockMethod - """ - - return not self == rhs - - def GetPossibleGroup(self): - """Returns a possible group from the end of the call queue or None if no - other methods are on the stack. - """ - - # Remove this method from the tail of the queue so we can add it to a group. - this_method = self._call_queue.pop() - assert this_method == self - - # Determine if the tail of the queue is a group, or just a regular ordered - # mock method. - group = None - try: - group = self._call_queue[-1] - except IndexError: - pass - - return group - - def _CheckAndCreateNewGroup(self, group_name, group_class): - """Checks if the last method (a possible group) is an instance of our - group_class. Adds the current method to this group or creates a new one. - - Args: - - group_name: the name of the group. - group_class: the class used to create instance of this new group - """ - group = self.GetPossibleGroup() - - # If this is a group, and it is the correct group, add the method. - if isinstance(group, group_class) and group.group_name() == group_name: - group.AddMethod(self) - return self - - # Create a new group and add the method. - new_group = group_class(group_name) - new_group.AddMethod(self) - self._call_queue.append(new_group) - return self - - def InAnyOrder(self, group_name="default"): - """Move this method into a group of unordered calls. - - A group of unordered calls must be defined together, and must be executed - in full before the next expected method can be called. There can be - multiple groups that are expected serially, if they are given - different group names. The same group name can be reused if there is a - standard method call, or a group with a different name, spliced between - usages. - - Args: - group_name: the name of the unordered group. - - Returns: - self - """ - return self._CheckAndCreateNewGroup(group_name, UnorderedGroup) - - def MultipleTimes(self, group_name="default"): - """Move this method into group of calls which may be called multiple times. - - A group of repeating calls must be defined together, and must be executed in - full before the next expected mehtod can be called. - - Args: - group_name: the name of the unordered group. - - Returns: - self - """ - return self._CheckAndCreateNewGroup(group_name, MultipleTimesGroup) - - def AndReturn(self, return_value): - """Set the value to return when this method is called. - - Args: - # return_value can be anything. - """ - - self._return_value = return_value - return return_value - - def AndRaise(self, exception): - """Set the exception to raise when this method is called. - - Args: - # exception: the exception to raise when this method is called. - exception: Exception - """ - - self._exception = exception - - def WithSideEffects(self, side_effects): - """Set the side effects that are simulated when this method is called. - - Args: - side_effects: A callable which modifies the parameters or other relevant - state which a given test case depends on. - - Returns: - Self for chaining with AndReturn and AndRaise. - """ - self._side_effects = side_effects - return self - -class Comparator: - """Base class for all Mox comparators. - - A Comparator can be used as a parameter to a mocked method when the exact - value is not known. For example, the code you are testing might build up a - long SQL string that is passed to your mock DAO. You're only interested that - the IN clause contains the proper primary keys, so you can set your mock - up as follows: - - mock_dao.RunQuery(StrContains('IN (1, 2, 4, 5)')).AndReturn(mock_result) - - Now whatever query is passed in must contain the string 'IN (1, 2, 4, 5)'. - - A Comparator may replace one or more parameters, for example: - # return at most 10 rows - mock_dao.RunQuery(StrContains('SELECT'), 10) - - or - - # Return some non-deterministic number of rows - mock_dao.RunQuery(StrContains('SELECT'), IsA(int)) - """ - - def equals(self, rhs): - """Special equals method that all comparators must implement. - - Args: - rhs: any python object - """ - - raise NotImplementedError, 'method must be implemented by a subclass.' - - def __eq__(self, rhs): - return self.equals(rhs) - - def __ne__(self, rhs): - return not self.equals(rhs) - - -class IsA(Comparator): - """This class wraps a basic Python type or class. It is used to verify - that a parameter is of the given type or class. - - Example: - mock_dao.Connect(IsA(DbConnectInfo)) - """ - - def __init__(self, class_name): - """Initialize IsA - - Args: - class_name: basic python type or a class - """ - - self._class_name = class_name - - def equals(self, rhs): - """Check to see if the RHS is an instance of class_name. - - Args: - # rhs: the right hand side of the test - rhs: object - - Returns: - bool - """ - - try: - return isinstance(rhs, self._class_name) - except TypeError: - # Check raw types if there was a type error. This is helpful for - # things like cStringIO.StringIO. - return type(rhs) == type(self._class_name) - - def __repr__(self): - return str(self._class_name) - -class IsAlmost(Comparator): - """Comparison class used to check whether a parameter is nearly equal - to a given value. Generally useful for floating point numbers. - - Example mock_dao.SetTimeout((IsAlmost(3.9))) - """ - - def __init__(self, float_value, places=7): - """Initialize IsAlmost. - - Args: - float_value: The value for making the comparison. - places: The number of decimal places to round to. - """ - - self._float_value = float_value - self._places = places - - def equals(self, rhs): - """Check to see if RHS is almost equal to float_value - - Args: - rhs: the value to compare to float_value - - Returns: - bool - """ - - try: - return round(rhs-self._float_value, self._places) == 0 - except TypeError: - # This is probably because either float_value or rhs is not a number. - return False - - def __repr__(self): - return str(self._float_value) - -class StrContains(Comparator): - """Comparison class used to check whether a substring exists in a - string parameter. This can be useful in mocking a database with SQL - passed in as a string parameter, for example. - - Example: - mock_dao.RunQuery(StrContains('IN (1, 2, 4, 5)')).AndReturn(mock_result) - """ - - def __init__(self, search_string): - """Initialize. - - Args: - # search_string: the string you are searching for - search_string: str - """ - - self._search_string = search_string - - def equals(self, rhs): - """Check to see if the search_string is contained in the rhs string. - - Args: - # rhs: the right hand side of the test - rhs: object - - Returns: - bool - """ - - try: - return rhs.find(self._search_string) > -1 - except Exception: - return False - - def __repr__(self): - return '' % self._search_string - - -class Regex(Comparator): - """Checks if a string matches a regular expression. - - This uses a given regular expression to determine equality. - """ - - def __init__(self, pattern, flags=0): - """Initialize. - - Args: - # pattern is the regular expression to search for - pattern: str - # flags passed to re.compile function as the second argument - flags: int - """ - - self.regex = re.compile(pattern, flags=flags) - - def equals(self, rhs): - """Check to see if rhs matches regular expression pattern. - - Returns: - bool - """ - - return self.regex.search(rhs) is not None - - def __repr__(self): - s = '' % self._key - - -class ContainsKeyValue(Comparator): - """Checks whether a key/value pair is in a dict parameter. - - Example: - mock_dao.UpdateUsers(ContainsKeyValue('stevepm', stevepm_user_info)) - """ - - def __init__(self, key, value): - """Initialize. - - Args: - # key: a key in a dict - # value: the corresponding value - """ - - self._key = key - self._value = value - - def equals(self, rhs): - """Check whether the given key/value pair is in the rhs dict. - - Returns: - bool - """ - - try: - return rhs[self._key] == self._value - except Exception: - return False - - def __repr__(self): - return '' % (self._key, self._value) - - -class SameElementsAs(Comparator): - """Checks whether iterables contain the same elements (ignoring order). - - Example: - mock_dao.ProcessUsers(SameElementsAs('stevepm', 'salomaki')) - """ - - def __init__(self, expected_seq): - """Initialize. - - Args: - expected_seq: a sequence - """ - - self._expected_seq = expected_seq - - def equals(self, actual_seq): - """Check to see whether actual_seq has same elements as expected_seq. - - Args: - actual_seq: sequence - - Returns: - bool - """ - - try: - expected = dict([(element, None) for element in self._expected_seq]) - actual = dict([(element, None) for element in actual_seq]) - except TypeError: - # Fall back to slower list-compare if any of the objects are unhashable. - expected = list(self._expected_seq) - actual = list(actual_seq) - expected.sort() - actual.sort() - return expected == actual - - def __repr__(self): - return '' % self._expected_seq - - -class And(Comparator): - """Evaluates one or more Comparators on RHS and returns an AND of the results. - """ - - def __init__(self, *args): - """Initialize. - - Args: - *args: One or more Comparator - """ - - self._comparators = args - - def equals(self, rhs): - """Checks whether all Comparators are equal to rhs. - - Args: - # rhs: can be anything - - Returns: - bool - """ - - for comparator in self._comparators: - if not comparator.equals(rhs): - return False - - return True - - def __repr__(self): - return '' % str(self._comparators) - - -class Or(Comparator): - """Evaluates one or more Comparators on RHS and returns an OR of the results. - """ - - def __init__(self, *args): - """Initialize. - - Args: - *args: One or more Mox comparators - """ - - self._comparators = args - - def equals(self, rhs): - """Checks whether any Comparator is equal to rhs. - - Args: - # rhs: can be anything - - Returns: - bool - """ - - for comparator in self._comparators: - if comparator.equals(rhs): - return True - - return False - - def __repr__(self): - return '' % str(self._comparators) - - -class Func(Comparator): - """Call a function that should verify the parameter passed in is correct. - - You may need the ability to perform more advanced operations on the parameter - in order to validate it. You can use this to have a callable validate any - parameter. The callable should return either True or False. - - - Example: - - def myParamValidator(param): - # Advanced logic here - return True - - mock_dao.DoSomething(Func(myParamValidator), true) - """ - - def __init__(self, func): - """Initialize. - - Args: - func: callable that takes one parameter and returns a bool - """ - - self._func = func - - def equals(self, rhs): - """Test whether rhs passes the function test. - - rhs is passed into func. - - Args: - rhs: any python object - - Returns: - the result of func(rhs) - """ - - return self._func(rhs) - - def __repr__(self): - return str(self._func) - - -class IgnoreArg(Comparator): - """Ignore an argument. - - This can be used when we don't care about an argument of a method call. - - Example: - # Check if CastMagic is called with 3 as first arg and 'disappear' as third. - mymock.CastMagic(3, IgnoreArg(), 'disappear') - """ - - def equals(self, unused_rhs): - """Ignores arguments and returns True. - - Args: - unused_rhs: any python object - - Returns: - always returns True - """ - - return True - - def __repr__(self): - return '' - - -class MethodGroup(object): - """Base class containing common behaviour for MethodGroups.""" - - def __init__(self, group_name): - self._group_name = group_name - - def group_name(self): - return self._group_name - - def __str__(self): - return '<%s "%s">' % (self.__class__.__name__, self._group_name) - - def AddMethod(self, mock_method): - raise NotImplementedError - - def MethodCalled(self, mock_method): - raise NotImplementedError - - def IsSatisfied(self): - raise NotImplementedError - -class UnorderedGroup(MethodGroup): - """UnorderedGroup holds a set of method calls that may occur in any order. - - This construct is helpful for non-deterministic events, such as iterating - over the keys of a dict. - """ - - def __init__(self, group_name): - super(UnorderedGroup, self).__init__(group_name) - self._methods = [] - - def AddMethod(self, mock_method): - """Add a method to this group. - - Args: - mock_method: A mock method to be added to this group. - """ - - self._methods.append(mock_method) - - def MethodCalled(self, mock_method): - """Remove a method call from the group. - - If the method is not in the set, an UnexpectedMethodCallError will be - raised. - - Args: - mock_method: a mock method that should be equal to a method in the group. - - Returns: - The mock method from the group - - Raises: - UnexpectedMethodCallError if the mock_method was not in the group. - """ - - # Check to see if this method exists, and if so, remove it from the set - # and return it. - for method in self._methods: - if method == mock_method: - # Remove the called mock_method instead of the method in the group. - # The called method will match any comparators when equality is checked - # during removal. The method in the group could pass a comparator to - # another comparator during the equality check. - self._methods.remove(mock_method) - - # If this group is not empty, put it back at the head of the queue. - if not self.IsSatisfied(): - mock_method._call_queue.appendleft(self) - - return self, method - - raise UnexpectedMethodCallError(mock_method, self) - - def IsSatisfied(self): - """Return True if there are not any methods in this group.""" - - return len(self._methods) == 0 - - -class MultipleTimesGroup(MethodGroup): - """MultipleTimesGroup holds methods that may be called any number of times. - - Note: Each method must be called at least once. - - This is helpful, if you don't know or care how many times a method is called. - """ - - def __init__(self, group_name): - super(MultipleTimesGroup, self).__init__(group_name) - self._methods = set() - self._methods_called = set() - - def AddMethod(self, mock_method): - """Add a method to this group. - - Args: - mock_method: A mock method to be added to this group. - """ - - self._methods.add(mock_method) - - def MethodCalled(self, mock_method): - """Remove a method call from the group. - - If the method is not in the set, an UnexpectedMethodCallError will be - raised. - - Args: - mock_method: a mock method that should be equal to a method in the group. - - Returns: - The mock method from the group - - Raises: - UnexpectedMethodCallError if the mock_method was not in the group. - """ - - # Check to see if this method exists, and if so add it to the set of - # called methods. - - for method in self._methods: - if method == mock_method: - self._methods_called.add(mock_method) - # Always put this group back on top of the queue, because we don't know - # when we are done. - mock_method._call_queue.appendleft(self) - return self, method - - if self.IsSatisfied(): - next_method = mock_method._PopNextMethod(); - return next_method, None - else: - raise UnexpectedMethodCallError(mock_method, self) - - def IsSatisfied(self): - """Return True if all methods in this group are called at least once.""" - # NOTE(psycho): We can't use the simple set difference here because we want - # to match different parameters which are considered the same e.g. IsA(str) - # and some string. This solution is O(n^2) but n should be small. - tmp = self._methods.copy() - for called in self._methods_called: - for expected in tmp: - if called == expected: - tmp.remove(expected) - if not tmp: - return True - break - return False - - -class MoxMetaTestBase(type): - """Metaclass to add mox cleanup and verification to every test. - - As the mox unit testing class is being constructed (MoxTestBase or a - subclass), this metaclass will modify all test functions to call the - CleanUpMox method of the test class after they finish. This means that - unstubbing and verifying will happen for every test with no additional code, - and any failures will result in test failures as opposed to errors. - """ - - def __init__(cls, name, bases, d): - type.__init__(cls, name, bases, d) - - # also get all the attributes from the base classes to account - # for a case when test class is not the immediate child of MoxTestBase - for base in bases: - for attr_name in dir(base): - d[attr_name] = getattr(base, attr_name) - - for func_name, func in d.items(): - if func_name.startswith('test') and callable(func): - setattr(cls, func_name, MoxMetaTestBase.CleanUpTest(cls, func)) - - @staticmethod - def CleanUpTest(cls, func): - """Adds Mox cleanup code to any MoxTestBase method. - - Always unsets stubs after a test. Will verify all mocks for tests that - otherwise pass. - - Args: - cls: MoxTestBase or subclass; the class whose test method we are altering. - func: method; the method of the MoxTestBase test class we wish to alter. - - Returns: - The modified method. - """ - def new_method(self, *args, **kwargs): - mox_obj = getattr(self, 'mox', None) - cleanup_mox = False - if mox_obj and isinstance(mox_obj, Mox): - cleanup_mox = True - try: - func(self, *args, **kwargs) - finally: - if cleanup_mox: - mox_obj.UnsetStubs() - if cleanup_mox: - mox_obj.VerifyAll() - new_method.__name__ = func.__name__ - new_method.__doc__ = func.__doc__ - new_method.__module__ = func.__module__ - return new_method - - -class MoxTestBase(unittest.TestCase): - """Convenience test class to make stubbing easier. - - Sets up a "mox" attribute which is an instance of Mox - any mox tests will - want this. Also automatically unsets any stubs and verifies that all mock - methods have been called at the end of each test, eliminating boilerplate - code. - """ - - __metaclass__ = MoxMetaTestBase - - def setUp(self): - self.mox = Mox() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/setup.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/setup.py deleted file mode 100755 index 77cfdd31..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/setup.py +++ /dev/null @@ -1,154 +0,0 @@ -#! /usr/bin/python -# -# See README for usage instructions. - -# We must use setuptools, not distutils, because we need to use the -# namespace_packages option for the "google" package. -from ez_setup import use_setuptools -use_setuptools() - -from setuptools import setup, Extension -from distutils.spawn import find_executable -import sys -import os -import subprocess - -maintainer_email = "protobuf@googlegroups.com" - -# Find the Protocol Compiler. -if os.path.exists("../src/protoc"): - protoc = "../src/protoc" -elif os.path.exists("../src/protoc.exe"): - protoc = "../src/protoc.exe" -elif os.path.exists("../vsprojects/Debug/protoc.exe"): - protoc = "../vsprojects/Debug/protoc.exe" -elif os.path.exists("../vsprojects/Release/protoc.exe"): - protoc = "../vsprojects/Release/protoc.exe" -else: - protoc = find_executable("protoc") - -def generate_proto(source): - """Invokes the Protocol Compiler to generate a _pb2.py from the given - .proto file. Does nothing if the output already exists and is newer than - the input.""" - - output = source.replace(".proto", "_pb2.py").replace("../src/", "") - - if not os.path.exists(source): - print "Can't find required file: " + source - sys.exit(-1) - - if (not os.path.exists(output) or - (os.path.exists(source) and - os.path.getmtime(source) > os.path.getmtime(output))): - print "Generating %s..." % output - - if protoc == None: - sys.stderr.write( - "protoc is not installed nor found in ../src. Please compile it " - "or install the binary package.\n") - sys.exit(-1) - - protoc_command = [ protoc, "-I../src", "-I.", "--python_out=.", source ] - if subprocess.call(protoc_command) != 0: - sys.exit(-1) - -def MakeTestSuite(): - # This is apparently needed on some systems to make sure that the tests - # work even if a previous version is already installed. - if 'google' in sys.modules: - del sys.modules['google'] - - generate_proto("../src/google/protobuf/unittest.proto") - generate_proto("../src/google/protobuf/unittest_custom_options.proto") - generate_proto("../src/google/protobuf/unittest_import.proto") - generate_proto("../src/google/protobuf/unittest_mset.proto") - generate_proto("../src/google/protobuf/unittest_no_generic_services.proto") - generate_proto("google/protobuf/internal/more_extensions.proto") - generate_proto("google/protobuf/internal/more_messages.proto") - - import unittest - import google.protobuf.internal.generator_test as generator_test - import google.protobuf.internal.descriptor_test as descriptor_test - import google.protobuf.internal.reflection_test as reflection_test - import google.protobuf.internal.service_reflection_test \ - as service_reflection_test - import google.protobuf.internal.text_format_test as text_format_test - import google.protobuf.internal.wire_format_test as wire_format_test - - loader = unittest.defaultTestLoader - suite = unittest.TestSuite() - for test in [ generator_test, - descriptor_test, - reflection_test, - service_reflection_test, - text_format_test, - wire_format_test ]: - suite.addTest(loader.loadTestsFromModule(test)) - - return suite - -if __name__ == '__main__': - # TODO(kenton): Integrate this into setuptools somehow? - if len(sys.argv) >= 2 and sys.argv[1] == "clean": - # Delete generated _pb2.py files and .pyc files in the code tree. - for (dirpath, dirnames, filenames) in os.walk("."): - for filename in filenames: - filepath = os.path.join(dirpath, filename) - if filepath.endswith("_pb2.py") or filepath.endswith(".pyc") or \ - filepath.endswith(".so") or filepath.endswith(".o"): - os.remove(filepath) - else: - # Generate necessary .proto file if it doesn't exist. - # TODO(kenton): Maybe we should hook this into a distutils command? - generate_proto("../src/google/protobuf/descriptor.proto") - generate_proto("../src/google/protobuf/compiler/plugin.proto") - - ext_module_list = [] - - # C++ implementation extension - if os.getenv("PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION", "python") == "cpp": - print "Using EXPERIMENTAL C++ Implmenetation." - ext_module_list.append(Extension( - "google.protobuf.internal._net_proto2___python", - [ "google/protobuf/pyext/python_descriptor.cc", - "google/protobuf/pyext/python_protobuf.cc", - "google/protobuf/pyext/python-proto2.cc" ], - include_dirs = [ "../src", ".", ], - libraries = [ "protobuf" ], - runtime_library_dirs = [ "../src/.libs" ], - library_dirs = [ "../src/.libs" ])) - - setup(name = 'protobuf', - version = '2.4.1-pre', - packages = [ 'google' ], - namespace_packages = [ 'google' ], - test_suite = 'setup.MakeTestSuite', - # Must list modules explicitly so that we don't install tests. - py_modules = [ - 'google.protobuf.internal.api_implementation', - 'google.protobuf.internal.containers', - 'google.protobuf.internal.cpp_message', - 'google.protobuf.internal.decoder', - 'google.protobuf.internal.encoder', - 'google.protobuf.internal.message_listener', - 'google.protobuf.internal.python_message', - 'google.protobuf.internal.type_checkers', - 'google.protobuf.internal.wire_format', - 'google.protobuf.descriptor', - 'google.protobuf.descriptor_pb2', - 'google.protobuf.compiler.plugin_pb2', - 'google.protobuf.message', - 'google.protobuf.reflection', - 'google.protobuf.service', - 'google.protobuf.service_reflection', - 'google.protobuf.text_format' ], - ext_modules = ext_module_list, - url = 'http://code.google.com/p/protobuf/', - maintainer = maintainer_email, - maintainer_email = 'protobuf@googlegroups.com', - license = 'New BSD License', - description = 'Protocol Buffers', - long_description = - "Protocol Buffers are Google's data interchange format.", - ) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/stubout.py b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/stubout.py deleted file mode 100755 index aee4f2da..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/python/stubout.py +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/python2.4 -# -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is used for testing. The original is at: -# http://code.google.com/p/pymox/ - -class StubOutForTesting: - """Sample Usage: - You want os.path.exists() to always return true during testing. - - stubs = StubOutForTesting() - stubs.Set(os.path, 'exists', lambda x: 1) - ... - stubs.UnsetAll() - - The above changes os.path.exists into a lambda that returns 1. Once - the ... part of the code finishes, the UnsetAll() looks up the old value - of os.path.exists and restores it. - - """ - def __init__(self): - self.cache = [] - self.stubs = [] - - def __del__(self): - self.SmartUnsetAll() - self.UnsetAll() - - def SmartSet(self, obj, attr_name, new_attr): - """Replace obj.attr_name with new_attr. This method is smart and works - at the module, class, and instance level while preserving proper - inheritance. It will not stub out C types however unless that has been - explicitly allowed by the type. - - This method supports the case where attr_name is a staticmethod or a - classmethod of obj. - - Notes: - - If obj is an instance, then it is its class that will actually be - stubbed. Note that the method Set() does not do that: if obj is - an instance, it (and not its class) will be stubbed. - - The stubbing is using the builtin getattr and setattr. So, the __get__ - and __set__ will be called when stubbing (TODO: A better idea would - probably be to manipulate obj.__dict__ instead of getattr() and - setattr()). - - Raises AttributeError if the attribute cannot be found. - """ - if (inspect.ismodule(obj) or - (not inspect.isclass(obj) and obj.__dict__.has_key(attr_name))): - orig_obj = obj - orig_attr = getattr(obj, attr_name) - - else: - if not inspect.isclass(obj): - mro = list(inspect.getmro(obj.__class__)) - else: - mro = list(inspect.getmro(obj)) - - mro.reverse() - - orig_attr = None - - for cls in mro: - try: - orig_obj = cls - orig_attr = getattr(obj, attr_name) - except AttributeError: - continue - - if orig_attr is None: - raise AttributeError("Attribute not found.") - - # Calling getattr() on a staticmethod transforms it to a 'normal' function. - # We need to ensure that we put it back as a staticmethod. - old_attribute = obj.__dict__.get(attr_name) - if old_attribute is not None and isinstance(old_attribute, staticmethod): - orig_attr = staticmethod(orig_attr) - - self.stubs.append((orig_obj, attr_name, orig_attr)) - setattr(orig_obj, attr_name, new_attr) - - def SmartUnsetAll(self): - """Reverses all the SmartSet() calls, restoring things to their original - definition. Its okay to call SmartUnsetAll() repeatedly, as later calls - have no effect if no SmartSet() calls have been made. - - """ - self.stubs.reverse() - - for args in self.stubs: - setattr(*args) - - self.stubs = [] - - def Set(self, parent, child_name, new_child): - """Replace child_name's old definition with new_child, in the context - of the given parent. The parent could be a module when the child is a - function at module scope. Or the parent could be a class when a class' - method is being replaced. The named child is set to new_child, while - the prior definition is saved away for later, when UnsetAll() is called. - - This method supports the case where child_name is a staticmethod or a - classmethod of parent. - """ - old_child = getattr(parent, child_name) - - old_attribute = parent.__dict__.get(child_name) - if old_attribute is not None and isinstance(old_attribute, staticmethod): - old_child = staticmethod(old_child) - - self.cache.append((parent, old_child, child_name)) - setattr(parent, child_name, new_child) - - def UnsetAll(self): - """Reverses all the Set() calls, restoring things to their original - definition. Its okay to call UnsetAll() repeatedly, as later calls have - no effect if no Set() calls have been made. - - """ - # Undo calls to Set() in reverse order, in case Set() was called on the - # same arguments repeatedly (want the original call to be last one undone) - self.cache.reverse() - - for (parent, old_child, child_name) in self.cache: - setattr(parent, child_name, old_child) - self.cache = [] diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/Makefile.am b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/Makefile.am deleted file mode 100644 index 327339a9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/Makefile.am +++ /dev/null @@ -1,363 +0,0 @@ -## Process this file with automake to produce Makefile.in - -if HAVE_ZLIB -GZCHECKPROGRAMS = zcgzip zcgunzip -GZHEADERS = google/protobuf/io/gzip_stream.h -GZTESTS = google/protobuf/io/gzip_stream_unittest.sh -else -GZCHECKPROGRAMS = -GZHEADERS = -GZTESTS = -endif - -if GCC -# These are good warnings to turn on by default -NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -else -NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -endif - -AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG) - -AM_LDFLAGS = $(PTHREAD_CFLAGS) - -# If I say "dist_include_DATA", automake complains that $(includedir) is not -# a "legitimate" directory for DATA. Screw you, automake. -protodir = $(includedir) -nobase_dist_proto_DATA = google/protobuf/descriptor.proto \ - google/protobuf/compiler/plugin.proto - -# Not sure why these don't get cleaned automatically. -clean-local: - rm -f *.loT - -CLEANFILES = $(protoc_outputs) unittest_proto_middleman \ - testzip.jar testzip.list testzip.proto testzip.zip - -MAINTAINERCLEANFILES = \ - Makefile.in - -nobase_include_HEADERS = \ - google/protobuf/stubs/common.h \ - google/protobuf/stubs/once.h \ - google/protobuf/descriptor.h \ - google/protobuf/descriptor.pb.h \ - google/protobuf/descriptor_database.h \ - google/protobuf/dynamic_message.h \ - google/protobuf/extension_set.h \ - google/protobuf/generated_message_util.h \ - google/protobuf/generated_message_reflection.h \ - google/protobuf/message.h \ - google/protobuf/message_lite.h \ - google/protobuf/reflection_ops.h \ - google/protobuf/repeated_field.h \ - google/protobuf/service.h \ - google/protobuf/text_format.h \ - google/protobuf/unknown_field_set.h \ - google/protobuf/wire_format.h \ - google/protobuf/wire_format_lite.h \ - google/protobuf/wire_format_lite_inl.h \ - google/protobuf/io/coded_stream.h \ - $(GZHEADERS) \ - google/protobuf/io/printer.h \ - google/protobuf/io/tokenizer.h \ - google/protobuf/io/zero_copy_stream.h \ - google/protobuf/io/zero_copy_stream_impl.h \ - google/protobuf/io/zero_copy_stream_impl_lite.h \ - google/protobuf/compiler/code_generator.h \ - google/protobuf/compiler/command_line_interface.h \ - google/protobuf/compiler/importer.h \ - google/protobuf/compiler/parser.h \ - google/protobuf/compiler/plugin.h \ - google/protobuf/compiler/plugin.pb.h \ - google/protobuf/compiler/cpp/cpp_generator.h \ - google/protobuf/compiler/java/java_generator.h \ - google/protobuf/compiler/python/python_generator.h - -lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la - -libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_lite_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined -libprotobuf_lite_la_SOURCES = \ - google/protobuf/stubs/common.cc \ - google/protobuf/stubs/once.cc \ - google/protobuf/stubs/hash.h \ - google/protobuf/stubs/map-util.h \ - google/protobuf/stubs/stl_util-inl.h \ - google/protobuf/extension_set.cc \ - google/protobuf/generated_message_util.cc \ - google/protobuf/message_lite.cc \ - google/protobuf/repeated_field.cc \ - google/protobuf/wire_format_lite.cc \ - google/protobuf/io/coded_stream.cc \ - google/protobuf/io/coded_stream_inl.h \ - google/protobuf/io/zero_copy_stream.cc \ - google/protobuf/io/zero_copy_stream_impl_lite.cc - -libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -libprotobuf_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined -libprotobuf_la_SOURCES = \ - $(libprotobuf_lite_la_SOURCES) \ - google/protobuf/stubs/strutil.cc \ - google/protobuf/stubs/strutil.h \ - google/protobuf/stubs/substitute.cc \ - google/protobuf/stubs/substitute.h \ - google/protobuf/stubs/structurally_valid.cc \ - google/protobuf/descriptor.cc \ - google/protobuf/descriptor.pb.cc \ - google/protobuf/descriptor_database.cc \ - google/protobuf/dynamic_message.cc \ - google/protobuf/extension_set_heavy.cc \ - google/protobuf/generated_message_reflection.cc \ - google/protobuf/message.cc \ - google/protobuf/reflection_ops.cc \ - google/protobuf/service.cc \ - google/protobuf/text_format.cc \ - google/protobuf/unknown_field_set.cc \ - google/protobuf/wire_format.cc \ - google/protobuf/io/gzip_stream.cc \ - google/protobuf/io/printer.cc \ - google/protobuf/io/tokenizer.cc \ - google/protobuf/io/zero_copy_stream_impl.cc \ - google/protobuf/compiler/importer.cc \ - google/protobuf/compiler/parser.cc - -libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la -libprotoc_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined -libprotoc_la_SOURCES = \ - google/protobuf/compiler/code_generator.cc \ - google/protobuf/compiler/command_line_interface.cc \ - google/protobuf/compiler/plugin.cc \ - google/protobuf/compiler/plugin.pb.cc \ - google/protobuf/compiler/subprocess.cc \ - google/protobuf/compiler/subprocess.h \ - google/protobuf/compiler/zip_writer.cc \ - google/protobuf/compiler/zip_writer.h \ - google/protobuf/compiler/cpp/cpp_enum.cc \ - google/protobuf/compiler/cpp/cpp_enum.h \ - google/protobuf/compiler/cpp/cpp_enum_field.cc \ - google/protobuf/compiler/cpp/cpp_enum_field.h \ - google/protobuf/compiler/cpp/cpp_extension.cc \ - google/protobuf/compiler/cpp/cpp_extension.h \ - google/protobuf/compiler/cpp/cpp_field.cc \ - google/protobuf/compiler/cpp/cpp_field.h \ - google/protobuf/compiler/cpp/cpp_file.cc \ - google/protobuf/compiler/cpp/cpp_file.h \ - google/protobuf/compiler/cpp/cpp_generator.cc \ - google/protobuf/compiler/cpp/cpp_helpers.cc \ - google/protobuf/compiler/cpp/cpp_helpers.h \ - google/protobuf/compiler/cpp/cpp_message.cc \ - google/protobuf/compiler/cpp/cpp_message.h \ - google/protobuf/compiler/cpp/cpp_message_field.cc \ - google/protobuf/compiler/cpp/cpp_message_field.h \ - google/protobuf/compiler/cpp/cpp_primitive_field.cc \ - google/protobuf/compiler/cpp/cpp_primitive_field.h \ - google/protobuf/compiler/cpp/cpp_service.cc \ - google/protobuf/compiler/cpp/cpp_service.h \ - google/protobuf/compiler/cpp/cpp_string_field.cc \ - google/protobuf/compiler/cpp/cpp_string_field.h \ - google/protobuf/compiler/java/java_enum.cc \ - google/protobuf/compiler/java/java_enum.h \ - google/protobuf/compiler/java/java_enum_field.cc \ - google/protobuf/compiler/java/java_enum_field.h \ - google/protobuf/compiler/java/java_extension.cc \ - google/protobuf/compiler/java/java_extension.h \ - google/protobuf/compiler/java/java_field.cc \ - google/protobuf/compiler/java/java_field.h \ - google/protobuf/compiler/java/java_file.cc \ - google/protobuf/compiler/java/java_file.h \ - google/protobuf/compiler/java/java_generator.cc \ - google/protobuf/compiler/java/java_helpers.cc \ - google/protobuf/compiler/java/java_helpers.h \ - google/protobuf/compiler/java/java_message.cc \ - google/protobuf/compiler/java/java_message.h \ - google/protobuf/compiler/java/java_message_field.cc \ - google/protobuf/compiler/java/java_message_field.h \ - google/protobuf/compiler/java/java_primitive_field.cc \ - google/protobuf/compiler/java/java_primitive_field.h \ - google/protobuf/compiler/java/java_service.cc \ - google/protobuf/compiler/java/java_service.h \ - google/protobuf/compiler/java/java_string_field.cc \ - google/protobuf/compiler/java/java_string_field.h \ - google/protobuf/compiler/python/python_generator.cc - -bin_PROGRAMS = protoc -protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la -protoc_SOURCES = google/protobuf/compiler/main.cc - -# Tests ============================================================== - -protoc_inputs = \ - google/protobuf/unittest.proto \ - google/protobuf/unittest_empty.proto \ - google/protobuf/unittest_import.proto \ - google/protobuf/unittest_mset.proto \ - google/protobuf/unittest_optimize_for.proto \ - google/protobuf/unittest_embed_optimize_for.proto \ - google/protobuf/unittest_custom_options.proto \ - google/protobuf/unittest_lite.proto \ - google/protobuf/unittest_import_lite.proto \ - google/protobuf/unittest_lite_imports_nonlite.proto \ - google/protobuf/unittest_no_generic_services.proto \ - google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto - -EXTRA_DIST = \ - $(protoc_inputs) \ - solaris/libstdc++.la \ - google/protobuf/io/gzip_stream.h \ - google/protobuf/io/gzip_stream_unittest.sh \ - google/protobuf/testdata/golden_message \ - google/protobuf/testdata/golden_packed_fields_message \ - google/protobuf/testdata/text_format_unittest_data.txt \ - google/protobuf/testdata/text_format_unittest_extensions_data.txt \ - google/protobuf/package_info.h \ - google/protobuf/io/package_info.h \ - google/protobuf/compiler/package_info.h \ - google/protobuf/compiler/zip_output_unittest.sh \ - google/protobuf/unittest_enormous_descriptor.proto - -protoc_lite_outputs = \ - google/protobuf/unittest_lite.pb.cc \ - google/protobuf/unittest_lite.pb.h \ - google/protobuf/unittest_import_lite.pb.cc \ - google/protobuf/unittest_import_lite.pb.h - -protoc_outputs = \ - $(protoc_lite_outputs) \ - google/protobuf/unittest.pb.cc \ - google/protobuf/unittest.pb.h \ - google/protobuf/unittest_empty.pb.cc \ - google/protobuf/unittest_empty.pb.h \ - google/protobuf/unittest_import.pb.cc \ - google/protobuf/unittest_import.pb.h \ - google/protobuf/unittest_mset.pb.cc \ - google/protobuf/unittest_mset.pb.h \ - google/protobuf/unittest_optimize_for.pb.cc \ - google/protobuf/unittest_optimize_for.pb.h \ - google/protobuf/unittest_embed_optimize_for.pb.cc \ - google/protobuf/unittest_embed_optimize_for.pb.h \ - google/protobuf/unittest_custom_options.pb.cc \ - google/protobuf/unittest_custom_options.pb.h \ - google/protobuf/unittest_lite_imports_nonlite.pb.cc \ - google/protobuf/unittest_lite_imports_nonlite.pb.h \ - google/protobuf/unittest_no_generic_services.pb.cc \ - google/protobuf/unittest_no_generic_services.pb.h \ - google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \ - google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h - -BUILT_SOURCES = $(protoc_outputs) - -if USE_EXTERNAL_PROTOC - -unittest_proto_middleman: $(protoc_inputs) - $(PROTOC) -I$(srcdir) --cpp_out=. $^ - touch unittest_proto_middleman - -else - -# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is -# relative to srcdir, which may not be the same as the current directory when -# building out-of-tree. -unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) - oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) ) - touch unittest_proto_middleman - -endif - -$(protoc_outputs): unittest_proto_middleman - -COMMON_TEST_SOURCES = \ - google/protobuf/test_util.cc \ - google/protobuf/test_util.h \ - google/protobuf/testing/googletest.cc \ - google/protobuf/testing/googletest.h \ - google/protobuf/testing/file.cc \ - google/protobuf/testing/file.h - -check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ - protobuf-lite-test test_plugin $(GZCHECKPROGRAMS) -protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - $(top_builddir)/gtest/lib/libgtest.la \ - $(top_builddir)/gtest/lib/libgtest_main.la -protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ - -I$(top_builddir)/gtest/include -# Disable optimization for tests unless the user explicitly asked for it, -# since test_util.cc takes forever to compile with optimization (with GCC). -# See configure.ac for more info. -protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -protobuf_test_SOURCES = \ - google/protobuf/stubs/common_unittest.cc \ - google/protobuf/stubs/once_unittest.cc \ - google/protobuf/stubs/strutil_unittest.cc \ - google/protobuf/stubs/structurally_valid_unittest.cc \ - google/protobuf/descriptor_database_unittest.cc \ - google/protobuf/descriptor_unittest.cc \ - google/protobuf/dynamic_message_unittest.cc \ - google/protobuf/extension_set_unittest.cc \ - google/protobuf/generated_message_reflection_unittest.cc \ - google/protobuf/message_unittest.cc \ - google/protobuf/reflection_ops_unittest.cc \ - google/protobuf/repeated_field_unittest.cc \ - google/protobuf/text_format_unittest.cc \ - google/protobuf/unknown_field_set_unittest.cc \ - google/protobuf/wire_format_unittest.cc \ - google/protobuf/io/coded_stream_unittest.cc \ - google/protobuf/io/printer_unittest.cc \ - google/protobuf/io/tokenizer_unittest.cc \ - google/protobuf/io/zero_copy_stream_unittest.cc \ - google/protobuf/compiler/command_line_interface_unittest.cc \ - google/protobuf/compiler/importer_unittest.cc \ - google/protobuf/compiler/mock_code_generator.cc \ - google/protobuf/compiler/mock_code_generator.h \ - google/protobuf/compiler/parser_unittest.cc \ - google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ - google/protobuf/compiler/cpp/cpp_unittest.cc \ - google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \ - google/protobuf/compiler/java/java_plugin_unittest.cc \ - google/protobuf/compiler/python/python_plugin_unittest.cc \ - $(COMMON_TEST_SOURCES) -nodist_protobuf_test_SOURCES = $(protoc_outputs) - -# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. -protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ - $(top_builddir)/gtest/lib/libgtest.la \ - $(top_builddir)/gtest/lib/libgtest_main.la -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ - -I$(top_builddir)/gtest/include \ - -DPROTOBUF_TEST_NO_DESCRIPTORS -protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -protobuf_lazy_descriptor_test_SOURCES = \ - google/protobuf/compiler/cpp/cpp_unittest.cc \ - $(COMMON_TEST_SOURCES) -nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) - -# Build lite_unittest separately, since it doesn't use gtest. -protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la -protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -protobuf_lite_test_SOURCES = \ - google/protobuf/lite_unittest.cc \ - google/protobuf/test_util_lite.cc \ - google/protobuf/test_util_lite.h -nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs) - -# Test plugin binary. -test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - $(top_builddir)/gtest/lib/libgtest.la -test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \ - -I$(top_builddir)/gtest/include -test_plugin_SOURCES = \ - google/protobuf/compiler/mock_code_generator.cc \ - google/protobuf/testing/file.cc \ - google/protobuf/testing/file.h \ - google/protobuf/compiler/test_plugin.cc - -if HAVE_ZLIB -zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la -zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc - -zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la -zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc -endif - -TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ - google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/SEBS b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/SEBS deleted file mode 100644 index ba33c732..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/SEBS +++ /dev/null @@ -1,240 +0,0 @@ -# **EXPERIMENTAL** -# -# See http://sebs.googlecode.com -# -# This is an experimental build definition file using the SEBS build system. -# I (Kenton Varda, maintainer of Protocol Buffers) happen to be the author of -# SEBS, though SEBS is not a Google project. I'm sticking this file in -# protobuf's SVN because that's the easiest place for me to put it, and it -# shouldn't harm anyone. This file is not included in the distribution. -# -# Currently, to use this file, you must generate config.h and put it at the -# top level of the source tree. - -_cpp = sebs.import_("//sebs/cpp.sebs") - -# ==================================================================== -# Public targets - -protobuf_lite = _cpp.Library( - name = "protobuf-lite", - srcs = [ "stubs/common.cc", - "stubs/once.cc", - "stubs/hash.cc", - "stubs/hash.h", - "stubs/map-util.h", - "stubs/stl_util-inl.h", - "extension_set.cc", - "generated_message_util.cc", - "message_lite.cc", - "repeated_field.cc", - "wire_format_lite.cc", - "io/coded_stream.cc", - "io/zero_copy_stream.cc", - "io/zero_copy_stream_impl_lite.cc" ], - deps = [ _cpp.SystemLibrary(name = "pthread") ]) - -protobuf = _cpp.Library( - name = "protobuf", - srcs = [ "stubs/strutil.cc", - "stubs/strutil.h", - "stubs/substitute.cc", - "stubs/substitute.h", - "stubs/structurally_valid.cc", - "descriptor.cc", - "descriptor.pb.cc", - "descriptor_database.cc", - "dynamic_message.cc", - "extension_set_heavy.cc", - "generated_message_reflection.cc", - "message.cc", - "reflection_ops.cc", - "service.cc", - "text_format.cc", - "unknown_field_set.cc", - "wire_format.cc", - "io/gzip_stream.cc", - "io/printer.cc", - "io/tokenizer.cc", - "io/zero_copy_stream_impl.cc", - "compiler/importer.cc", - "compiler/parser.cc" ], - deps = [ protobuf_lite, - _cpp.SystemLibrary(name = "z") ]) - -libprotoc = _cpp.Library( - name = "protoc", - srcs = [ "compiler/code_generator.cc", - "compiler/command_line_interface.cc", - "compiler/cpp/cpp_enum.cc", - "compiler/cpp/cpp_enum.h", - "compiler/cpp/cpp_enum_field.cc", - "compiler/cpp/cpp_enum_field.h", - "compiler/cpp/cpp_extension.cc", - "compiler/cpp/cpp_extension.h", - "compiler/cpp/cpp_field.cc", - "compiler/cpp/cpp_field.h", - "compiler/cpp/cpp_file.cc", - "compiler/cpp/cpp_file.h", - "compiler/cpp/cpp_generator.cc", - "compiler/cpp/cpp_helpers.cc", - "compiler/cpp/cpp_helpers.h", - "compiler/cpp/cpp_message.cc", - "compiler/cpp/cpp_message.h", - "compiler/cpp/cpp_message_field.cc", - "compiler/cpp/cpp_message_field.h", - "compiler/cpp/cpp_primitive_field.cc", - "compiler/cpp/cpp_primitive_field.h", - "compiler/cpp/cpp_service.cc", - "compiler/cpp/cpp_service.h", - "compiler/cpp/cpp_string_field.cc", - "compiler/cpp/cpp_string_field.h", - "compiler/java/java_enum.cc", - "compiler/java/java_enum.h", - "compiler/java/java_enum_field.cc", - "compiler/java/java_enum_field.h", - "compiler/java/java_extension.cc", - "compiler/java/java_extension.h", - "compiler/java/java_field.cc", - "compiler/java/java_field.h", - "compiler/java/java_file.cc", - "compiler/java/java_file.h", - "compiler/java/java_generator.cc", - "compiler/java/java_helpers.cc", - "compiler/java/java_helpers.h", - "compiler/java/java_message.cc", - "compiler/java/java_message.h", - "compiler/java/java_message_field.cc", - "compiler/java/java_message_field.h", - "compiler/java/java_primitive_field.cc", - "compiler/java/java_primitive_field.h", - "compiler/java/java_service.cc", - "compiler/java/java_service.h", - "compiler/python/python_generator.cc" ], - deps = [ protobuf ]) - -protoc = _cpp.Binary( - name = "protoc", - srcs = [ "compiler/main.cc" ], - deps = [ libprotoc ]) - -# ==================================================================== -# ProtobufLibrary rule class - -class ProtobufLibrary(sebs.Rule): - argument_spec = sebs.ArgumentSpec(srcs = [sebs.Artifact], - deps = ([sebs.Rule], []), - lite = (bool, False)) - - def _expand(self, args): - for dep in args.deps: - if not isinstance(dep, ProtobufLibrary): - raise sebs.DefinitionError( - "Dependency of ProtobufLibrary is not a ProtobufLibrary: %s" % dep) - - protoc.expand_once() - - # We must build protoc for the host configuration to allow cross-compiling. - host_protoc = self.context.configured_artifact(protoc.binary, "host") - - protoc_action = self.context.action(self, "protobuf") - protoc_args = [host_protoc, "-Isrc", "-Itmp", "-Iinclude","--cpp_out=tmp"] - - cpp_srcs = [] - for src in args.srcs: - protoc_args.append(src) - - # We cannot build .proto files from other packages because the .pb.cc - # and .pb.h files would be written to that package, and we aren't allowed - # to write to other packages. - if self.context.local_filename(src) is None: - raise sebs.DefinitionError( - "Source file is not in this package: %s" % src) - - cc_artifact = self.context.derived_artifact(src, ".pb.cc", protoc_action) - header_artifact = self.context.derived_artifact( - src, ".pb.h", protoc_action) - - cpp_srcs.append(cc_artifact) - cpp_srcs.append(header_artifact) - - protoc_action.set_command( - sebs.SubprocessCommand(protoc_action, protoc_args, implicit = cpp_srcs)) - - deps = list(args.deps) - if args.lite: - deps.append(protobuf_lite) - else: - deps.append(protobuf) - - self.__cpp_library = _cpp.Library(srcs = cpp_srcs, deps = deps, - context = self.context) - self.__cpp_library.label = self.label - self.outputs = [] - - def as_cpp_library(self): - self.expand_once() - return self.__cpp_library - -# ==================================================================== -# Tests - -_lite_test_protos = ProtobufLibrary( - srcs = [ "unittest_lite.proto", - "unittest_import_lite.proto" ], - lite = True) -_test_protos = ProtobufLibrary( - srcs = [ "unittest.proto", - "unittest_empty.proto", - "unittest_import.proto", - "unittest_mset.proto", - "unittest_optimize_for.proto", - "unittest_embed_optimize_for.proto", - "unittest_custom_options.proto", - "unittest_lite_imports_nonlite.proto", - "compiler/cpp/cpp_test_bad_identifiers.proto" ], - deps = [ _lite_test_protos ]) - -_test_util = _cpp.Library( - name = "test_util", - srcs = [ "test_util.cc", - "test_util.h", - "testing/googletest.cc", - "testing/googletest.h", - "testing/file.cc", - "testing/file.h" ], - deps = [ protobuf, _test_protos, _cpp.SystemLibrary(name = "gtest")] ) - -protobuf_lite_test = _cpp.Test( - srcs = [ "lite_unittest.cc", - "test_util_lite.cc", - "test_util_lite.h" ], - deps = [ _lite_test_protos ]) - -protobuf_test = _cpp.Test( - srcs = [ "stubs/common_unittest.cc", - "stubs/once_unittest.cc", - "stubs/strutil_unittest.cc", - "stubs/structurally_valid_unittest.cc", - "descriptor_database_unittest.cc", - "descriptor_unittest.cc", - "dynamic_message_unittest.cc", - "extension_set_unittest.cc", - "generated_message_reflection_unittest.cc", - "message_unittest.cc", - "reflection_ops_unittest.cc", - "repeated_field_unittest.cc", - "text_format_unittest.cc", - "unknown_field_set_unittest.cc", - "wire_format_unittest.cc", - "io/coded_stream_unittest.cc", - "io/printer_unittest.cc", - "io/tokenizer_unittest.cc", - "io/zero_copy_stream_unittest.cc", - "compiler/command_line_interface_unittest.cc", - "compiler/importer_unittest.cc", - "compiler/parser_unittest.cc", - "compiler/cpp/cpp_bootstrap_unittest.cc", - "compiler/cpp/cpp_unittest.cc" ], - deps = [ protobuf, libprotoc, _test_util, - _cpp.SystemLibrary(name = "gtest_main") ]) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.cc deleted file mode 100644 index 455c239a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.cc +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -CodeGenerator::~CodeGenerator() {} -GeneratorContext::~GeneratorContext() {} - -io::ZeroCopyOutputStream* GeneratorContext::OpenForInsert( - const string& filename, const string& insertion_point) { - GOOGLE_LOG(FATAL) << "This GeneratorContext does not support insertion."; - return NULL; // make compiler happy -} - -void GeneratorContext::ListParsedFiles( - vector* output) { - GOOGLE_LOG(FATAL) << "This GeneratorContext does not support ListParsedFiles"; -} - -// Parses a set of comma-delimited name/value pairs. -void ParseGeneratorParameter(const string& text, - vector >* output) { - vector parts; - SplitStringUsing(text, ",", &parts); - - for (int i = 0; i < parts.size(); i++) { - string::size_type equals_pos = parts[i].find_first_of('='); - pair value; - if (equals_pos == string::npos) { - value.first = parts[i]; - value.second = ""; - } else { - value.first = parts[i].substr(0, equals_pos); - value.second = parts[i].substr(equals_pos + 1); - } - output->push_back(value); - } -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.h deleted file mode 100644 index 252f68d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/code_generator.h +++ /dev/null @@ -1,142 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Defines the abstract interface implemented by each of the language-specific -// code generators. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CODE_GENERATOR_H__ -#define GOOGLE_PROTOBUF_COMPILER_CODE_GENERATOR_H__ - -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -namespace io { class ZeroCopyOutputStream; } -class FileDescriptor; - -namespace compiler { - -// Defined in this file. -class CodeGenerator; -class GeneratorContext; - -// The abstract interface to a class which generates code implementing a -// particular proto file in a particular language. A number of these may -// be registered with CommandLineInterface to support various languages. -class LIBPROTOC_EXPORT CodeGenerator { - public: - inline CodeGenerator() {} - virtual ~CodeGenerator(); - - // Generates code for the given proto file, generating one or more files in - // the given output directory. - // - // A parameter to be passed to the generator can be specified on the - // command line. This is intended to be used by Java and similar languages - // to specify which specific class from the proto file is to be generated, - // though it could have other uses as well. It is empty if no parameter was - // given. - // - // Returns true if successful. Otherwise, sets *error to a description of - // the problem (e.g. "invalid parameter") and returns false. - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodeGenerator); -}; - -// CodeGenerators generate one or more files in a given directory. This -// abstract interface represents the directory to which the CodeGenerator is -// to write and other information about the context in which the Generator -// runs. -class LIBPROTOC_EXPORT GeneratorContext { - public: - inline GeneratorContext() {} - virtual ~GeneratorContext(); - - // Opens the given file, truncating it if it exists, and returns a - // ZeroCopyOutputStream that writes to the file. The caller takes ownership - // of the returned object. This method never fails (a dummy stream will be - // returned instead). - // - // The filename given should be relative to the root of the source tree. - // E.g. the C++ generator, when generating code for "foo/bar.proto", will - // generate the files "foo/bar.pb.h" and "foo/bar.pb.cc"; note that - // "foo/" is included in these filenames. The filename is not allowed to - // contain "." or ".." components. - virtual io::ZeroCopyOutputStream* Open(const string& filename) = 0; - - // Creates a ZeroCopyOutputStream which will insert code into the given file - // at the given insertion point. See plugin.proto (plugin.pb.h) for more - // information on insertion points. The default implementation - // assert-fails -- it exists only for backwards-compatibility. - // - // WARNING: This feature is currently EXPERIMENTAL and is subject to change. - virtual io::ZeroCopyOutputStream* OpenForInsert( - const string& filename, const string& insertion_point); - - // Returns a vector of FileDescriptors for all the files being compiled - // in this run. Useful for languages, such as Go, that treat files - // differently when compiled as a set rather than individually. - virtual void ListParsedFiles(vector* output); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratorContext); -}; - -// The type GeneratorContext was once called OutputDirectory. This typedef -// provides backward compatibility. -typedef GeneratorContext OutputDirectory; - -// Several code generators treat the parameter argument as holding a -// list of options separated by commas. This helper function parses -// a set of comma-delimited name/value pairs: e.g., -// "foo=bar,baz,qux=corge" -// parses to the pairs: -// ("foo", "bar"), ("baz", ""), ("qux", "corge") -extern void ParseGeneratorParameter(const string&, - vector >*); - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CODE_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.cc deleted file mode 100644 index 1c76994b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.cc +++ /dev/null @@ -1,1357 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include -#include -#include -#ifdef _MSC_VER -#include -#include -#else -#include -#endif -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace compiler { - -#if defined(_WIN32) -#define mkdir(name, mode) mkdir(name) -#ifndef W_OK -#define W_OK 02 // not defined by MSVC for whatever reason -#endif -#ifndef F_OK -#define F_OK 00 // not defined by MSVC for whatever reason -#endif -#ifndef STDIN_FILENO -#define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 -#endif -#endif - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 // If this isn't defined, the platform doesn't need it. -#endif -#endif - -namespace { -#if defined(_WIN32) && !defined(__CYGWIN__) -static const char* kPathSeparator = ";"; -#else -static const char* kPathSeparator = ":"; -#endif - -// Returns true if the text looks like a Windows-style absolute path, starting -// with a drive letter. Example: "C:\foo". TODO(kenton): Share this with -// copy in importer.cc? -static bool IsWindowsAbsolutePath(const string& text) { -#if defined(_WIN32) || defined(__CYGWIN__) - return text.size() >= 3 && text[1] == ':' && - isalpha(text[0]) && - (text[2] == '/' || text[2] == '\\') && - text.find_last_of(':') == 1; -#else - return false; -#endif -} - -void SetFdToTextMode(int fd) { -#ifdef _WIN32 - if (_setmode(fd, _O_TEXT) == -1) { - // This should never happen, I think. - GOOGLE_LOG(WARNING) << "_setmode(" << fd << ", _O_TEXT): " << strerror(errno); - } -#endif - // (Text and binary are the same on non-Windows platforms.) -} - -void SetFdToBinaryMode(int fd) { -#ifdef _WIN32 - if (_setmode(fd, _O_BINARY) == -1) { - // This should never happen, I think. - GOOGLE_LOG(WARNING) << "_setmode(" << fd << ", _O_BINARY): " << strerror(errno); - } -#endif - // (Text and binary are the same on non-Windows platforms.) -} - -void AddTrailingSlash(string* path) { - if (!path->empty() && path->at(path->size() - 1) != '/') { - path->push_back('/'); - } -} - -bool VerifyDirectoryExists(const string& path) { - if (path.empty()) return true; - - if (access(path.c_str(), W_OK) == -1) { - cerr << path << ": " << strerror(errno) << endl; - return false; - } else { - return true; - } -} - -// Try to create the parent directory of the given file, creating the parent's -// parent if necessary, and so on. The full file name is actually -// (prefix + filename), but we assume |prefix| already exists and only create -// directories listed in |filename|. -bool TryCreateParentDirectory(const string& prefix, const string& filename) { - // Recursively create parent directories to the output file. - vector parts; - SplitStringUsing(filename, "/", &parts); - string path_so_far = prefix; - for (int i = 0; i < parts.size() - 1; i++) { - path_so_far += parts[i]; - if (mkdir(path_so_far.c_str(), 0777) != 0) { - if (errno != EEXIST) { - cerr << filename << ": while trying to create directory " - << path_so_far << ": " << strerror(errno) << endl; - return false; - } - } - path_so_far += '/'; - } - - return true; -} - -} // namespace - -// A MultiFileErrorCollector that prints errors to stderr. -class CommandLineInterface::ErrorPrinter : public MultiFileErrorCollector, - public io::ErrorCollector { - public: - ErrorPrinter(ErrorFormat format, DiskSourceTree *tree = NULL) - : format_(format), tree_(tree) {} - ~ErrorPrinter() {} - - // implements MultiFileErrorCollector ------------------------------ - void AddError(const string& filename, int line, int column, - const string& message) { - - // Print full path when running under MSVS - string dfile; - if (format_ == CommandLineInterface::ERROR_FORMAT_MSVS && - tree_ != NULL && - tree_->VirtualFileToDiskFile(filename, &dfile)) { - cerr << dfile; - } else { - cerr << filename; - } - - // Users typically expect 1-based line/column numbers, so we add 1 - // to each here. - if (line != -1) { - // Allow for both GCC- and Visual-Studio-compatible output. - switch (format_) { - case CommandLineInterface::ERROR_FORMAT_GCC: - cerr << ":" << (line + 1) << ":" << (column + 1); - break; - case CommandLineInterface::ERROR_FORMAT_MSVS: - cerr << "(" << (line + 1) << ") : error in column=" << (column + 1); - break; - } - } - - cerr << ": " << message << endl; - } - - // implements io::ErrorCollector ----------------------------------- - void AddError(int line, int column, const string& message) { - AddError("input", line, column, message); - } - - private: - const ErrorFormat format_; - DiskSourceTree *tree_; -}; - -// ------------------------------------------------------------------- - -// A GeneratorContext implementation that buffers files in memory, then dumps -// them all to disk on demand. -class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { - public: - GeneratorContextImpl(const vector& parsed_files); - ~GeneratorContextImpl(); - - // Write all files in the directory to disk at the given output location, - // which must end in a '/'. - bool WriteAllToDisk(const string& prefix); - - // Write the contents of this directory to a ZIP-format archive with the - // given name. - bool WriteAllToZip(const string& filename); - - // Add a boilerplate META-INF/MANIFEST.MF file as required by the Java JAR - // format, unless one has already been written. - void AddJarManifest(); - - // implements GeneratorContext -------------------------------------- - io::ZeroCopyOutputStream* Open(const string& filename); - io::ZeroCopyOutputStream* OpenForInsert( - const string& filename, const string& insertion_point); - void ListParsedFiles(vector* output) { - *output = parsed_files_; - } - - private: - friend class MemoryOutputStream; - - // map instead of hash_map so that files are written in order (good when - // writing zips). - map files_; - const vector& parsed_files_; - bool had_error_; -}; - -class CommandLineInterface::MemoryOutputStream - : public io::ZeroCopyOutputStream { - public: - MemoryOutputStream(GeneratorContextImpl* directory, const string& filename); - MemoryOutputStream(GeneratorContextImpl* directory, const string& filename, - const string& insertion_point); - virtual ~MemoryOutputStream(); - - // implements ZeroCopyOutputStream --------------------------------- - virtual bool Next(void** data, int* size) { return inner_->Next(data, size); } - virtual void BackUp(int count) { inner_->BackUp(count); } - virtual int64 ByteCount() const { return inner_->ByteCount(); } - - private: - // Where to insert the string when it's done. - GeneratorContextImpl* directory_; - string filename_; - string insertion_point_; - - // The string we're building. - string data_; - - // StringOutputStream writing to data_. - scoped_ptr inner_; -}; - -// ------------------------------------------------------------------- - -CommandLineInterface::GeneratorContextImpl::GeneratorContextImpl( - const vector& parsed_files) - : parsed_files_(parsed_files), - had_error_(false) { -} - -CommandLineInterface::GeneratorContextImpl::~GeneratorContextImpl() { - STLDeleteValues(&files_); -} - -bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( - const string& prefix) { - if (had_error_) { - return false; - } - - if (!VerifyDirectoryExists(prefix)) { - return false; - } - - for (map::const_iterator iter = files_.begin(); - iter != files_.end(); ++iter) { - const string& relative_filename = iter->first; - const char* data = iter->second->data(); - int size = iter->second->size(); - - if (!TryCreateParentDirectory(prefix, relative_filename)) { - return false; - } - string filename = prefix + relative_filename; - - // Create the output file. - int file_descriptor; - do { - file_descriptor = - open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666); - } while (file_descriptor < 0 && errno == EINTR); - - if (file_descriptor < 0) { - int error = errno; - cerr << filename << ": " << strerror(error); - return false; - } - - // Write the file. - while (size > 0) { - int write_result; - do { - write_result = write(file_descriptor, data, size); - } while (write_result < 0 && errno == EINTR); - - if (write_result <= 0) { - // Write error. - - // FIXME(kenton): According to the man page, if write() returns zero, - // there was no error; write() simply did not write anything. It's - // unclear under what circumstances this might happen, but presumably - // errno won't be set in this case. I am confused as to how such an - // event should be handled. For now I'm treating it as an error, - // since retrying seems like it could lead to an infinite loop. I - // suspect this never actually happens anyway. - - if (write_result < 0) { - int error = errno; - cerr << filename << ": write: " << strerror(error); - } else { - cerr << filename << ": write() returned zero?" << endl; - } - return false; - } - - data += write_result; - size -= write_result; - } - - if (close(file_descriptor) != 0) { - int error = errno; - cerr << filename << ": close: " << strerror(error); - return false; - } - } - - return true; -} - -bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( - const string& filename) { - if (had_error_) { - return false; - } - - // Create the output file. - int file_descriptor; - do { - file_descriptor = - open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666); - } while (file_descriptor < 0 && errno == EINTR); - - if (file_descriptor < 0) { - int error = errno; - cerr << filename << ": " << strerror(error); - return false; - } - - // Create the ZipWriter - io::FileOutputStream stream(file_descriptor); - ZipWriter zip_writer(&stream); - - for (map::const_iterator iter = files_.begin(); - iter != files_.end(); ++iter) { - zip_writer.Write(iter->first, *iter->second); - } - - zip_writer.WriteDirectory(); - - if (stream.GetErrno() != 0) { - cerr << filename << ": " << strerror(stream.GetErrno()) << endl; - } - - if (!stream.Close()) { - cerr << filename << ": " << strerror(stream.GetErrno()) << endl; - } - - return true; -} - -void CommandLineInterface::GeneratorContextImpl::AddJarManifest() { - string** map_slot = &files_["META-INF/MANIFEST.MF"]; - if (*map_slot == NULL) { - *map_slot = new string( - "Manifest-Version: 1.0\n" - "Created-By: 1.6.0 (protoc)\n" - "\n"); - } -} - -io::ZeroCopyOutputStream* CommandLineInterface::GeneratorContextImpl::Open( - const string& filename) { - return new MemoryOutputStream(this, filename); -} - -io::ZeroCopyOutputStream* -CommandLineInterface::GeneratorContextImpl::OpenForInsert( - const string& filename, const string& insertion_point) { - return new MemoryOutputStream(this, filename, insertion_point); -} - -// ------------------------------------------------------------------- - -CommandLineInterface::MemoryOutputStream::MemoryOutputStream( - GeneratorContextImpl* directory, const string& filename) - : directory_(directory), - filename_(filename), - inner_(new io::StringOutputStream(&data_)) { -} - -CommandLineInterface::MemoryOutputStream::MemoryOutputStream( - GeneratorContextImpl* directory, const string& filename, - const string& insertion_point) - : directory_(directory), - filename_(filename), - insertion_point_(insertion_point), - inner_(new io::StringOutputStream(&data_)) { -} - -CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { - // Make sure all data has been written. - inner_.reset(); - - // Insert into the directory. - string** map_slot = &directory_->files_[filename_]; - - if (insertion_point_.empty()) { - // This was just a regular Open(). - if (*map_slot != NULL) { - cerr << filename_ << ": Tried to write the same file twice." << endl; - directory_->had_error_ = true; - return; - } - - *map_slot = new string; - (*map_slot)->swap(data_); - } else { - // This was an OpenForInsert(). - - // If the data doens't end with a clean line break, add one. - if (!data_.empty() && data_[data_.size() - 1] != '\n') { - data_.push_back('\n'); - } - - // Find the file we are going to insert into. - if (*map_slot == NULL) { - cerr << filename_ << ": Tried to insert into file that doesn't exist." - << endl; - directory_->had_error_ = true; - return; - } - string* target = *map_slot; - - // Find the insertion point. - string magic_string = strings::Substitute( - "@@protoc_insertion_point($0)", insertion_point_); - string::size_type pos = target->find(magic_string); - - if (pos == string::npos) { - cerr << filename_ << ": insertion point \"" << insertion_point_ - << "\" not found." << endl; - directory_->had_error_ = true; - return; - } - - // Seek backwards to the beginning of the line, which is where we will - // insert the data. Note that this has the effect of pushing the insertion - // point down, so the data is inserted before it. This is intentional - // because it means that multiple insertions at the same point will end - // up in the expected order in the final output. - pos = target->find_last_of('\n', pos); - if (pos == string::npos) { - // Insertion point is on the first line. - pos = 0; - } else { - // Advance to character after '\n'. - ++pos; - } - - // Extract indent. - string indent_(*target, pos, target->find_first_not_of(" \t", pos) - pos); - - if (indent_.empty()) { - // No indent. This makes things easier. - target->insert(pos, data_); - } else { - // Calculate how much space we need. - int indent_size = 0; - for (int i = 0; i < data_.size(); i++) { - if (data_[i] == '\n') indent_size += indent_.size(); - } - - // Make a hole for it. - target->insert(pos, data_.size() + indent_size, '\0'); - - // Now copy in the data. - string::size_type data_pos = 0; - char* target_ptr = string_as_array(target) + pos; - while (data_pos < data_.size()) { - // Copy indent. - memcpy(target_ptr, indent_.data(), indent_.size()); - target_ptr += indent_.size(); - - // Copy line from data_. - // We already guaranteed that data_ ends with a newline (above), so this - // search can't fail. - string::size_type line_length = - data_.find_first_of('\n', data_pos) + 1 - data_pos; - memcpy(target_ptr, data_.data() + data_pos, line_length); - target_ptr += line_length; - data_pos += line_length; - } - - GOOGLE_CHECK_EQ(target_ptr, - string_as_array(target) + pos + data_.size() + indent_size); - } - } -} - -// =================================================================== - -CommandLineInterface::CommandLineInterface() - : mode_(MODE_COMPILE), - error_format_(ERROR_FORMAT_GCC), - imports_in_descriptor_set_(false), - disallow_services_(false), - inputs_are_proto_path_relative_(false) {} -CommandLineInterface::~CommandLineInterface() {} - -void CommandLineInterface::RegisterGenerator(const string& flag_name, - CodeGenerator* generator, - const string& help_text) { - GeneratorInfo info; - info.generator = generator; - info.help_text = help_text; - generators_[flag_name] = info; -} - -void CommandLineInterface::AllowPlugins(const string& exe_name_prefix) { - plugin_prefix_ = exe_name_prefix; -} - -int CommandLineInterface::Run(int argc, const char* const argv[]) { - Clear(); - if (!ParseArguments(argc, argv)) return 1; - - // Set up the source tree. - DiskSourceTree source_tree; - for (int i = 0; i < proto_path_.size(); i++) { - source_tree.MapPath(proto_path_[i].first, proto_path_[i].second); - } - - // Map input files to virtual paths if necessary. - if (!inputs_are_proto_path_relative_) { - if (!MakeInputsBeProtoPathRelative(&source_tree)) { - return 1; - } - } - - // Allocate the Importer. - ErrorPrinter error_collector(error_format_, &source_tree); - Importer importer(&source_tree, &error_collector); - - vector parsed_files; - - // Parse each file. - for (int i = 0; i < input_files_.size(); i++) { - // Import the file. - const FileDescriptor* parsed_file = importer.Import(input_files_[i]); - if (parsed_file == NULL) return 1; - parsed_files.push_back(parsed_file); - - // Enforce --disallow_services. - if (disallow_services_ && parsed_file->service_count() > 0) { - cerr << parsed_file->name() << ": This file contains services, but " - "--disallow_services was used." << endl; - return 1; - } - } - - // We construct a separate GeneratorContext for each output location. Note - // that two code generators may output to the same location, in which case - // they should share a single GeneratorContext so that OpenForInsert() works. - typedef hash_map GeneratorContextMap; - GeneratorContextMap output_directories; - - // Generate output. - if (mode_ == MODE_COMPILE) { - for (int i = 0; i < output_directives_.size(); i++) { - string output_location = output_directives_[i].output_location; - if (!HasSuffixString(output_location, ".zip") && - !HasSuffixString(output_location, ".jar")) { - AddTrailingSlash(&output_location); - } - GeneratorContextImpl** map_slot = &output_directories[output_location]; - - if (*map_slot == NULL) { - // First time we've seen this output location. - *map_slot = new GeneratorContextImpl(parsed_files); - } - - if (!GenerateOutput(parsed_files, output_directives_[i], *map_slot)) { - STLDeleteValues(&output_directories); - return 1; - } - } - } - - // Write all output to disk. - for (GeneratorContextMap::iterator iter = output_directories.begin(); - iter != output_directories.end(); ++iter) { - const string& location = iter->first; - GeneratorContextImpl* directory = iter->second; - if (HasSuffixString(location, "/")) { - if (!directory->WriteAllToDisk(location)) { - STLDeleteValues(&output_directories); - return 1; - } - } else { - if (HasSuffixString(location, ".jar")) { - directory->AddJarManifest(); - } - - if (!directory->WriteAllToZip(location)) { - STLDeleteValues(&output_directories); - return 1; - } - } - } - - STLDeleteValues(&output_directories); - - if (!descriptor_set_name_.empty()) { - if (!WriteDescriptorSet(parsed_files)) { - return 1; - } - } - - if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) { - if (codec_type_.empty()) { - // HACK: Define an EmptyMessage type to use for decoding. - DescriptorPool pool; - FileDescriptorProto file; - file.set_name("empty_message.proto"); - file.add_message_type()->set_name("EmptyMessage"); - GOOGLE_CHECK(pool.BuildFile(file) != NULL); - codec_type_ = "EmptyMessage"; - if (!EncodeOrDecode(&pool)) { - return 1; - } - } else { - if (!EncodeOrDecode(importer.pool())) { - return 1; - } - } - } - - return 0; -} - -void CommandLineInterface::Clear() { - // Clear all members that are set by Run(). Note that we must not clear - // members which are set by other methods before Run() is called. - executable_name_.clear(); - proto_path_.clear(); - input_files_.clear(); - output_directives_.clear(); - codec_type_.clear(); - descriptor_set_name_.clear(); - - mode_ = MODE_COMPILE; - imports_in_descriptor_set_ = false; - disallow_services_ = false; -} - -bool CommandLineInterface::MakeInputsBeProtoPathRelative( - DiskSourceTree* source_tree) { - for (int i = 0; i < input_files_.size(); i++) { - string virtual_file, shadowing_disk_file; - switch (source_tree->DiskFileToVirtualFile( - input_files_[i], &virtual_file, &shadowing_disk_file)) { - case DiskSourceTree::SUCCESS: - input_files_[i] = virtual_file; - break; - case DiskSourceTree::SHADOWED: - cerr << input_files_[i] << ": Input is shadowed in the --proto_path " - "by \"" << shadowing_disk_file << "\". Either use the latter " - "file as your input or reorder the --proto_path so that the " - "former file's location comes first." << endl; - return false; - case DiskSourceTree::CANNOT_OPEN: - cerr << input_files_[i] << ": " << strerror(errno) << endl; - return false; - case DiskSourceTree::NO_MAPPING: - // First check if the file exists at all. - if (access(input_files_[i].c_str(), F_OK) < 0) { - // File does not even exist. - cerr << input_files_[i] << ": " << strerror(ENOENT) << endl; - } else { - cerr << input_files_[i] << ": File does not reside within any path " - "specified using --proto_path (or -I). You must specify a " - "--proto_path which encompasses this file. Note that the " - "proto_path must be an exact prefix of the .proto file " - "names -- protoc is too dumb to figure out when two paths " - "(e.g. absolute and relative) are equivalent (it's harder " - "than you think)." << endl; - } - return false; - } - } - - return true; -} - -bool CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { - executable_name_ = argv[0]; - - // Iterate through all arguments and parse them. - for (int i = 1; i < argc; i++) { - string name, value; - - if (ParseArgument(argv[i], &name, &value)) { - // Returned true => Use the next argument as the flag value. - if (i + 1 == argc || argv[i+1][0] == '-') { - cerr << "Missing value for flag: " << name << endl; - if (name == "--decode") { - cerr << "To decode an unknown message, use --decode_raw." << endl; - } - return false; - } else { - ++i; - value = argv[i]; - } - } - - if (!InterpretArgument(name, value)) return false; - } - - // If no --proto_path was given, use the current working directory. - if (proto_path_.empty()) { - proto_path_.push_back(make_pair("", ".")); - } - - // Check some errror cases. - bool decoding_raw = (mode_ == MODE_DECODE) && codec_type_.empty(); - if (decoding_raw && !input_files_.empty()) { - cerr << "When using --decode_raw, no input files should be given." << endl; - return false; - } else if (!decoding_raw && input_files_.empty()) { - cerr << "Missing input file." << endl; - return false; - } - if (mode_ == MODE_COMPILE && output_directives_.empty() && - descriptor_set_name_.empty()) { - cerr << "Missing output directives." << endl; - return false; - } - if (imports_in_descriptor_set_ && descriptor_set_name_.empty()) { - cerr << "--include_imports only makes sense when combined with " - "--descriptor_set_out." << endl; - } - - return true; -} - -bool CommandLineInterface::ParseArgument(const char* arg, - string* name, string* value) { - bool parsed_value = false; - - if (arg[0] != '-') { - // Not a flag. - name->clear(); - parsed_value = true; - *value = arg; - } else if (arg[1] == '-') { - // Two dashes: Multi-character name, with '=' separating name and - // value. - const char* equals_pos = strchr(arg, '='); - if (equals_pos != NULL) { - *name = string(arg, equals_pos - arg); - *value = equals_pos + 1; - parsed_value = true; - } else { - *name = arg; - } - } else { - // One dash: One-character name, all subsequent characters are the - // value. - if (arg[1] == '\0') { - // arg is just "-". We treat this as an input file, except that at - // present this will just lead to a "file not found" error. - name->clear(); - *value = arg; - parsed_value = true; - } else { - *name = string(arg, 2); - *value = arg + 2; - parsed_value = !value->empty(); - } - } - - // Need to return true iff the next arg should be used as the value for this - // one, false otherwise. - - if (parsed_value) { - // We already parsed a value for this flag. - return false; - } - - if (*name == "-h" || *name == "--help" || - *name == "--disallow_services" || - *name == "--include_imports" || - *name == "--version" || - *name == "--decode_raw") { - // HACK: These are the only flags that don't take a value. - // They probably should not be hard-coded like this but for now it's - // not worth doing better. - return false; - } - - // Next argument is the flag value. - return true; -} - -bool CommandLineInterface::InterpretArgument(const string& name, - const string& value) { - if (name.empty()) { - // Not a flag. Just a filename. - if (value.empty()) { - cerr << "You seem to have passed an empty string as one of the " - "arguments to " << executable_name_ << ". This is actually " - "sort of hard to do. Congrats. Unfortunately it is not valid " - "input so the program is going to die now." << endl; - return false; - } - - input_files_.push_back(value); - - } else if (name == "-I" || name == "--proto_path") { - // Java's -classpath (and some other languages) delimits path components - // with colons. Let's accept that syntax too just to make things more - // intuitive. - vector parts; - SplitStringUsing(value, kPathSeparator, &parts); - - for (int i = 0; i < parts.size(); i++) { - string virtual_path; - string disk_path; - - int equals_pos = parts[i].find_first_of('='); - if (equals_pos == string::npos) { - virtual_path = ""; - disk_path = parts[i]; - } else { - virtual_path = parts[i].substr(0, equals_pos); - disk_path = parts[i].substr(equals_pos + 1); - } - - if (disk_path.empty()) { - cerr << "--proto_path passed empty directory name. (Use \".\" for " - "current directory.)" << endl; - return false; - } - - // Make sure disk path exists, warn otherwise. - if (access(disk_path.c_str(), F_OK) < 0) { - cerr << disk_path << ": warning: directory does not exist." << endl; - } - - proto_path_.push_back(make_pair(virtual_path, disk_path)); - } - - } else if (name == "-o" || name == "--descriptor_set_out") { - if (!descriptor_set_name_.empty()) { - cerr << name << " may only be passed once." << endl; - return false; - } - if (value.empty()) { - cerr << name << " requires a non-empty value." << endl; - return false; - } - if (mode_ != MODE_COMPILE) { - cerr << "Cannot use --encode or --decode and generate descriptors at the " - "same time." << endl; - return false; - } - descriptor_set_name_ = value; - - } else if (name == "--include_imports") { - if (imports_in_descriptor_set_) { - cerr << name << " may only be passed once." << endl; - return false; - } - imports_in_descriptor_set_ = true; - - } else if (name == "-h" || name == "--help") { - PrintHelpText(); - return false; // Exit without running compiler. - - } else if (name == "--version") { - if (!version_info_.empty()) { - cout << version_info_ << endl; - } - cout << "libprotoc " - << protobuf::internal::VersionString(GOOGLE_PROTOBUF_VERSION) - << endl; - return false; // Exit without running compiler. - - } else if (name == "--disallow_services") { - disallow_services_ = true; - - } else if (name == "--encode" || name == "--decode" || - name == "--decode_raw") { - if (mode_ != MODE_COMPILE) { - cerr << "Only one of --encode and --decode can be specified." << endl; - return false; - } - if (!output_directives_.empty() || !descriptor_set_name_.empty()) { - cerr << "Cannot use " << name - << " and generate code or descriptors at the same time." << endl; - return false; - } - - mode_ = (name == "--encode") ? MODE_ENCODE : MODE_DECODE; - - if (value.empty() && name != "--decode_raw") { - cerr << "Type name for " << name << " cannot be blank." << endl; - if (name == "--decode") { - cerr << "To decode an unknown message, use --decode_raw." << endl; - } - return false; - } else if (!value.empty() && name == "--decode_raw") { - cerr << "--decode_raw does not take a parameter." << endl; - return false; - } - - codec_type_ = value; - - } else if (name == "--error_format") { - if (value == "gcc") { - error_format_ = ERROR_FORMAT_GCC; - } else if (value == "msvs") { - error_format_ = ERROR_FORMAT_MSVS; - } else { - cerr << "Unknown error format: " << value << endl; - return false; - } - - } else if (name == "--plugin") { - if (plugin_prefix_.empty()) { - cerr << "This compiler does not support plugins." << endl; - return false; - } - - string name; - string path; - - string::size_type equals_pos = value.find_first_of('='); - if (equals_pos == string::npos) { - // Use the basename of the file. - string::size_type slash_pos = value.find_last_of('/'); - if (slash_pos == string::npos) { - name = value; - } else { - name = value.substr(slash_pos + 1); - } - path = value; - } else { - name = value.substr(0, equals_pos); - path = value.substr(equals_pos + 1); - } - - plugins_[name] = path; - - } else { - // Some other flag. Look it up in the generators list. - const GeneratorInfo* generator_info = FindOrNull(generators_, name); - if (generator_info == NULL && - (plugin_prefix_.empty() || !HasSuffixString(name, "_out"))) { - cerr << "Unknown flag: " << name << endl; - return false; - } - - // It's an output flag. Add it to the output directives. - if (mode_ != MODE_COMPILE) { - cerr << "Cannot use --encode or --decode and generate code at the " - "same time." << endl; - return false; - } - - OutputDirective directive; - directive.name = name; - if (generator_info == NULL) { - directive.generator = NULL; - } else { - directive.generator = generator_info->generator; - } - - // Split value at ':' to separate the generator parameter from the - // filename. However, avoid doing this if the colon is part of a valid - // Windows-style absolute path. - string::size_type colon_pos = value.find_first_of(':'); - if (colon_pos == string::npos || IsWindowsAbsolutePath(value)) { - directive.output_location = value; - } else { - directive.parameter = value.substr(0, colon_pos); - directive.output_location = value.substr(colon_pos + 1); - } - - output_directives_.push_back(directive); - } - - return true; -} - -void CommandLineInterface::PrintHelpText() { - // Sorry for indentation here; line wrapping would be uglier. - cerr << -"Usage: " << executable_name_ << " [OPTION] PROTO_FILES\n" -"Parse PROTO_FILES and generate output based on the options given:\n" -" -IPATH, --proto_path=PATH Specify the directory in which to search for\n" -" imports. May be specified multiple times;\n" -" directories will be searched in order. If not\n" -" given, the current working directory is used.\n" -" --version Show version info and exit.\n" -" -h, --help Show this text and exit.\n" -" --encode=MESSAGE_TYPE Read a text-format message of the given type\n" -" from standard input and write it in binary\n" -" to standard output. The message type must\n" -" be defined in PROTO_FILES or their imports.\n" -" --decode=MESSAGE_TYPE Read a binary message of the given type from\n" -" standard input and write it in text format\n" -" to standard output. The message type must\n" -" be defined in PROTO_FILES or their imports.\n" -" --decode_raw Read an arbitrary protocol message from\n" -" standard input and write the raw tag/value\n" -" pairs in text format to standard output. No\n" -" PROTO_FILES should be given when using this\n" -" flag.\n" -" -oFILE, Writes a FileDescriptorSet (a protocol buffer,\n" -" --descriptor_set_out=FILE defined in descriptor.proto) containing all of\n" -" the input files to FILE.\n" -" --include_imports When using --descriptor_set_out, also include\n" -" all dependencies of the input files in the\n" -" set, so that the set is self-contained.\n" -" --error_format=FORMAT Set the format in which to print errors.\n" -" FORMAT may be 'gcc' (the default) or 'msvs'\n" -" (Microsoft Visual Studio format)." << endl; - if (!plugin_prefix_.empty()) { - cerr << -" --plugin=EXECUTABLE Specifies a plugin executable to use.\n" -" Normally, protoc searches the PATH for\n" -" plugins, but you may specify additional\n" -" executables not in the path using this flag.\n" -" Additionally, EXECUTABLE may be of the form\n" -" NAME=PATH, in which case the given plugin name\n" -" is mapped to the given executable even if\n" -" the executable's own name differs." << endl; - } - - for (GeneratorMap::iterator iter = generators_.begin(); - iter != generators_.end(); ++iter) { - // FIXME(kenton): If the text is long enough it will wrap, which is ugly, - // but fixing this nicely (e.g. splitting on spaces) is probably more - // trouble than it's worth. - cerr << " " << iter->first << "=OUT_DIR " - << string(19 - iter->first.size(), ' ') // Spaces for alignment. - << iter->second.help_text << endl; - } -} - -bool CommandLineInterface::GenerateOutput( - const vector& parsed_files, - const OutputDirective& output_directive, - GeneratorContext* generator_context) { - // Call the generator. - string error; - if (output_directive.generator == NULL) { - // This is a plugin. - GOOGLE_CHECK(HasPrefixString(output_directive.name, "--") && - HasSuffixString(output_directive.name, "_out")) - << "Bad name for plugin generator: " << output_directive.name; - - // Strip the "--" and "_out" and add the plugin prefix. - string plugin_name = plugin_prefix_ + "gen-" + - output_directive.name.substr(2, output_directive.name.size() - 6); - - if (!GeneratePluginOutput(parsed_files, plugin_name, - output_directive.parameter, - generator_context, &error)) { - cerr << output_directive.name << ": " << error << endl; - return false; - } - } else { - // Regular generator. - for (int i = 0; i < parsed_files.size(); i++) { - if (!output_directive.generator->Generate( - parsed_files[i], output_directive.parameter, - generator_context, &error)) { - // Generator returned an error. - cerr << output_directive.name << ": " << parsed_files[i]->name() << ": " - << error << endl; - return false; - } - } - } - - return true; -} - -bool CommandLineInterface::GeneratePluginOutput( - const vector& parsed_files, - const string& plugin_name, - const string& parameter, - GeneratorContext* generator_context, - string* error) { - CodeGeneratorRequest request; - CodeGeneratorResponse response; - - // Build the request. - if (!parameter.empty()) { - request.set_parameter(parameter); - } - - set already_seen; - for (int i = 0; i < parsed_files.size(); i++) { - request.add_file_to_generate(parsed_files[i]->name()); - GetTransitiveDependencies(parsed_files[i], &already_seen, - request.mutable_proto_file()); - } - - // Invoke the plugin. - Subprocess subprocess; - - if (plugins_.count(plugin_name) > 0) { - subprocess.Start(plugins_[plugin_name], Subprocess::EXACT_NAME); - } else { - subprocess.Start(plugin_name, Subprocess::SEARCH_PATH); - } - - string communicate_error; - if (!subprocess.Communicate(request, &response, &communicate_error)) { - *error = strings::Substitute("$0: $1", plugin_name, communicate_error); - return false; - } - - // Write the files. We do this even if there was a generator error in order - // to match the behavior of a compiled-in generator. - scoped_ptr current_output; - for (int i = 0; i < response.file_size(); i++) { - const CodeGeneratorResponse::File& output_file = response.file(i); - - if (!output_file.insertion_point().empty()) { - // Open a file for insert. - // We reset current_output to NULL first so that the old file is closed - // before the new one is opened. - current_output.reset(); - current_output.reset(generator_context->OpenForInsert( - output_file.name(), output_file.insertion_point())); - } else if (!output_file.name().empty()) { - // Starting a new file. Open it. - // We reset current_output to NULL first so that the old file is closed - // before the new one is opened. - current_output.reset(); - current_output.reset(generator_context->Open(output_file.name())); - } else if (current_output == NULL) { - *error = strings::Substitute( - "$0: First file chunk returned by plugin did not specify a file name.", - plugin_name); - return false; - } - - // Use CodedOutputStream for convenience; otherwise we'd need to provide - // our own buffer-copying loop. - io::CodedOutputStream writer(current_output.get()); - writer.WriteString(output_file.content()); - } - - // Check for errors. - if (!response.error().empty()) { - // Generator returned an error. - *error = response.error(); - return false; - } - - return true; -} - -bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) { - // Look up the type. - const Descriptor* type = pool->FindMessageTypeByName(codec_type_); - if (type == NULL) { - cerr << "Type not defined: " << codec_type_ << endl; - return false; - } - - DynamicMessageFactory dynamic_factory(pool); - scoped_ptr message(dynamic_factory.GetPrototype(type)->New()); - - if (mode_ == MODE_ENCODE) { - SetFdToTextMode(STDIN_FILENO); - SetFdToBinaryMode(STDOUT_FILENO); - } else { - SetFdToBinaryMode(STDIN_FILENO); - SetFdToTextMode(STDOUT_FILENO); - } - - io::FileInputStream in(STDIN_FILENO); - io::FileOutputStream out(STDOUT_FILENO); - - if (mode_ == MODE_ENCODE) { - // Input is text. - ErrorPrinter error_collector(error_format_); - TextFormat::Parser parser; - parser.RecordErrorsTo(&error_collector); - parser.AllowPartialMessage(true); - - if (!parser.Parse(&in, message.get())) { - cerr << "Failed to parse input." << endl; - return false; - } - } else { - // Input is binary. - if (!message->ParsePartialFromZeroCopyStream(&in)) { - cerr << "Failed to parse input." << endl; - return false; - } - } - - if (!message->IsInitialized()) { - cerr << "warning: Input message is missing required fields: " - << message->InitializationErrorString() << endl; - } - - if (mode_ == MODE_ENCODE) { - // Output is binary. - if (!message->SerializePartialToZeroCopyStream(&out)) { - cerr << "output: I/O error." << endl; - return false; - } - } else { - // Output is text. - if (!TextFormat::Print(*message, &out)) { - cerr << "output: I/O error." << endl; - return false; - } - } - - return true; -} - -bool CommandLineInterface::WriteDescriptorSet( - const vector parsed_files) { - FileDescriptorSet file_set; - - if (imports_in_descriptor_set_) { - set already_seen; - for (int i = 0; i < parsed_files.size(); i++) { - GetTransitiveDependencies( - parsed_files[i], &already_seen, file_set.mutable_file()); - } - } else { - for (int i = 0; i < parsed_files.size(); i++) { - parsed_files[i]->CopyTo(file_set.add_file()); - } - } - - int fd; - do { - fd = open(descriptor_set_name_.c_str(), - O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666); - } while (fd < 0 && errno == EINTR); - - if (fd < 0) { - perror(descriptor_set_name_.c_str()); - return false; - } - - io::FileOutputStream out(fd); - if (!file_set.SerializeToZeroCopyStream(&out)) { - cerr << descriptor_set_name_ << ": " << strerror(out.GetErrno()) << endl; - out.Close(); - return false; - } - if (!out.Close()) { - cerr << descriptor_set_name_ << ": " << strerror(out.GetErrno()) << endl; - return false; - } - - return true; -} - -void CommandLineInterface::GetTransitiveDependencies( - const FileDescriptor* file, - set* already_seen, - RepeatedPtrField* output) { - if (!already_seen->insert(file).second) { - // Already saw this file. Skip. - return; - } - - // Add all dependencies. - for (int i = 0; i < file->dependency_count(); i++) { - GetTransitiveDependencies(file->dependency(i), already_seen, output); - } - - // Add this file. - file->CopyTo(output->Add()); -} - - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.h deleted file mode 100644 index 0b507d80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface.h +++ /dev/null @@ -1,318 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Implements the Protocol Compiler front-end such that it may be reused by -// custom compilers written to support other languages. - -#ifndef GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__ -#define GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__ - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -class FileDescriptor; // descriptor.h -class DescriptorPool; // descriptor.h -class FileDescriptorProto; // descriptor.pb.h -template class RepeatedPtrField; // repeated_field.h - -namespace compiler { - -class CodeGenerator; // code_generator.h -class GeneratorContext; // code_generator.h -class DiskSourceTree; // importer.h - -// This class implements the command-line interface to the protocol compiler. -// It is designed to make it very easy to create a custom protocol compiler -// supporting the languages of your choice. For example, if you wanted to -// create a custom protocol compiler binary which includes both the regular -// C++ support plus support for your own custom output "Foo", you would -// write a class "FooGenerator" which implements the CodeGenerator interface, -// then write a main() procedure like this: -// -// int main(int argc, char* argv[]) { -// google::protobuf::compiler::CommandLineInterface cli; -// -// // Support generation of C++ source and headers. -// google::protobuf::compiler::cpp::CppGenerator cpp_generator; -// cli.RegisterGenerator("--cpp_out", &cpp_generator, -// "Generate C++ source and header."); -// -// // Support generation of Foo code. -// FooGenerator foo_generator; -// cli.RegisterGenerator("--foo_out", &foo_generator, -// "Generate Foo file."); -// -// return cli.Run(argc, argv); -// } -// -// The compiler is invoked with syntax like: -// protoc --cpp_out=outdir --foo_out=outdir --proto_path=src src/foo.proto -// -// For a full description of the command-line syntax, invoke it with --help. -class LIBPROTOC_EXPORT CommandLineInterface { - public: - CommandLineInterface(); - ~CommandLineInterface(); - - // Register a code generator for a language. - // - // Parameters: - // * flag_name: The command-line flag used to specify an output file of - // this type. The name must start with a '-'. If the name is longer - // than one letter, it must start with two '-'s. - // * generator: The CodeGenerator which will be called to generate files - // of this type. - // * help_text: Text describing this flag in the --help output. - // - // Some generators accept extra parameters. You can specify this parameter - // on the command-line by placing it before the output directory, separated - // by a colon: - // protoc --foo_out=enable_bar:outdir - // The text before the colon is passed to CodeGenerator::Generate() as the - // "parameter". - void RegisterGenerator(const string& flag_name, - CodeGenerator* generator, - const string& help_text); - - // Enables "plugins". In this mode, if a command-line flag ends with "_out" - // but does not match any registered generator, the compiler will attempt to - // find a "plugin" to implement the generator. Plugins are just executables. - // They should live somewhere in the PATH. - // - // The compiler determines the executable name to search for by concatenating - // exe_name_prefix with the unrecognized flag name, removing "_out". So, for - // example, if exe_name_prefix is "protoc-" and you pass the flag --foo_out, - // the compiler will try to run the program "protoc-foo". - // - // The plugin program should implement the following usage: - // plugin [--out=OUTDIR] [--parameter=PARAMETER] PROTO_FILES < DESCRIPTORS - // --out indicates the output directory (as passed to the --foo_out - // parameter); if omitted, the current directory should be used. --parameter - // gives the generator parameter, if any was provided. The PROTO_FILES list - // the .proto files which were given on the compiler command-line; these are - // the files for which the plugin is expected to generate output code. - // Finally, DESCRIPTORS is an encoded FileDescriptorSet (as defined in - // descriptor.proto). This is piped to the plugin's stdin. The set will - // include descriptors for all the files listed in PROTO_FILES as well as - // all files that they import. The plugin MUST NOT attempt to read the - // PROTO_FILES directly -- it must use the FileDescriptorSet. - // - // The plugin should generate whatever files are necessary, as code generators - // normally do. It should write the names of all files it generates to - // stdout. The names should be relative to the output directory, NOT absolute - // names or relative to the current directory. If any errors occur, error - // messages should be written to stderr. If an error is fatal, the plugin - // should exit with a non-zero exit code. - void AllowPlugins(const string& exe_name_prefix); - - // Run the Protocol Compiler with the given command-line parameters. - // Returns the error code which should be returned by main(). - // - // It may not be safe to call Run() in a multi-threaded environment because - // it calls strerror(). I'm not sure why you'd want to do this anyway. - int Run(int argc, const char* const argv[]); - - // Call SetInputsAreCwdRelative(true) if the input files given on the command - // line should be interpreted relative to the proto import path specified - // using --proto_path or -I flags. Otherwise, input file names will be - // interpreted relative to the current working directory (or as absolute - // paths if they start with '/'), though they must still reside inside - // a directory given by --proto_path or the compiler will fail. The latter - // mode is generally more intuitive and easier to use, especially e.g. when - // defining implicit rules in Makefiles. - void SetInputsAreProtoPathRelative(bool enable) { - inputs_are_proto_path_relative_ = enable; - } - - // Provides some text which will be printed when the --version flag is - // used. The version of libprotoc will also be printed on the next line - // after this text. - void SetVersionInfo(const string& text) { - version_info_ = text; - } - - - private: - // ----------------------------------------------------------------- - - class ErrorPrinter; - class GeneratorContextImpl; - class MemoryOutputStream; - - // Clear state from previous Run(). - void Clear(); - - // Remaps each file in input_files_ so that it is relative to one of the - // directories in proto_path_. Returns false if an error occurred. This - // is only used if inputs_are_proto_path_relative_ is false. - bool MakeInputsBeProtoPathRelative( - DiskSourceTree* source_tree); - - // Parse all command-line arguments. - bool ParseArguments(int argc, const char* const argv[]); - - // Parses a command-line argument into a name/value pair. Returns - // true if the next argument in the argv should be used as the value, - // false otherwise. - // - // Exmaples: - // "-Isrc/protos" -> - // name = "-I", value = "src/protos" - // "--cpp_out=src/foo.pb2.cc" -> - // name = "--cpp_out", value = "src/foo.pb2.cc" - // "foo.proto" -> - // name = "", value = "foo.proto" - bool ParseArgument(const char* arg, string* name, string* value); - - // Interprets arguments parsed with ParseArgument. - bool InterpretArgument(const string& name, const string& value); - - // Print the --help text to stderr. - void PrintHelpText(); - - // Generate the given output file from the given input. - struct OutputDirective; // see below - bool GenerateOutput(const vector& parsed_files, - const OutputDirective& output_directive, - GeneratorContext* generator_context); - bool GeneratePluginOutput(const vector& parsed_files, - const string& plugin_name, - const string& parameter, - GeneratorContext* generator_context, - string* error); - - // Implements --encode and --decode. - bool EncodeOrDecode(const DescriptorPool* pool); - - // Implements the --descriptor_set_out option. - bool WriteDescriptorSet(const vector parsed_files); - - // Get all transitive dependencies of the given file (including the file - // itself), adding them to the given list of FileDescriptorProtos. The - // protos will be ordered such that every file is listed before any file that - // depends on it, so that you can call DescriptorPool::BuildFile() on them - // in order. Any files in *already_seen will not be added, and each file - // added will be inserted into *already_seen. - static void GetTransitiveDependencies( - const FileDescriptor* file, - set* already_seen, - RepeatedPtrField* output); - - // ----------------------------------------------------------------- - - // The name of the executable as invoked (i.e. argv[0]). - string executable_name_; - - // Version info set with SetVersionInfo(). - string version_info_; - - // Map from flag names to registered generators. - struct GeneratorInfo { - CodeGenerator* generator; - string help_text; - }; - typedef map GeneratorMap; - GeneratorMap generators_; - - // See AllowPlugins(). If this is empty, plugins aren't allowed. - string plugin_prefix_; - - // Maps specific plugin names to files. When executing a plugin, this map - // is searched first to find the plugin executable. If not found here, the - // PATH (or other OS-specific search strategy) is searched. - map plugins_; - - // Stuff parsed from command line. - enum Mode { - MODE_COMPILE, // Normal mode: parse .proto files and compile them. - MODE_ENCODE, // --encode: read text from stdin, write binary to stdout. - MODE_DECODE // --decode: read binary from stdin, write text to stdout. - }; - - Mode mode_; - - enum ErrorFormat { - ERROR_FORMAT_GCC, // GCC error output format (default). - ERROR_FORMAT_MSVS // Visual Studio output (--error_format=msvs). - }; - - ErrorFormat error_format_; - - vector > proto_path_; // Search path for proto files. - vector input_files_; // Names of the input proto files. - - // output_directives_ lists all the files we are supposed to output and what - // generator to use for each. - struct OutputDirective { - string name; // E.g. "--foo_out" - CodeGenerator* generator; // NULL for plugins - string parameter; - string output_location; - }; - vector output_directives_; - - // When using --encode or --decode, this names the type we are encoding or - // decoding. (Empty string indicates --decode_raw.) - string codec_type_; - - // If --descriptor_set_out was given, this is the filename to which the - // FileDescriptorSet should be written. Otherwise, empty. - string descriptor_set_name_; - - // True if --include_imports was given, meaning that we should - // write all transitive dependencies to the DescriptorSet. Otherwise, only - // the .proto files listed on the command-line are added. - bool imports_in_descriptor_set_; - - // Was the --disallow_services flag used? - bool disallow_services_; - - // See SetInputsAreProtoPathRelative(). - bool inputs_are_proto_path_relative_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CommandLineInterface); -}; - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_COMMAND_LINE_INTERFACE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc deleted file mode 100644 index d5b3a1dc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ /dev/null @@ -1,1452 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#ifdef _MSC_VER -#include -#else -#include -#endif -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -#if defined(_WIN32) -#ifndef STDIN_FILENO -#define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 -#endif -#ifndef F_OK -#define F_OK 00 // not defined by MSVC for whatever reason -#endif -#endif - -namespace { - -class CommandLineInterfaceTest : public testing::Test { - protected: - virtual void SetUp(); - virtual void TearDown(); - - // Runs the CommandLineInterface with the given command line. The - // command is automatically split on spaces, and the string "$tmpdir" - // is replaced with TestTempDir(). - void Run(const string& command); - - // ----------------------------------------------------------------- - // Methods to set up the test (called before Run()). - - class NullCodeGenerator; - - // Normally plugins are allowed for all tests. Call this to explicitly - // disable them. - void DisallowPlugins() { disallow_plugins_ = true; } - - // Create a temp file within temp_directory_ with the given name. - // The containing directory is also created if necessary. - void CreateTempFile(const string& name, const string& contents); - - // Create a subdirectory within temp_directory_. - void CreateTempDir(const string& name); - - void SetInputsAreProtoPathRelative(bool enable) { - cli_.SetInputsAreProtoPathRelative(enable); - } - - // ----------------------------------------------------------------- - // Methods to check the test results (called after Run()). - - // Checks that no text was written to stderr during Run(), and Run() - // returned 0. - void ExpectNoErrors(); - - // Checks that Run() returned non-zero and the stderr output is exactly - // the text given. expected_test may contain references to "$tmpdir", - // which will be replaced by the temporary directory path. - void ExpectErrorText(const string& expected_text); - - // Checks that Run() returned non-zero and the stderr contains the given - // substring. - void ExpectErrorSubstring(const string& expected_substring); - - // Returns true if ExpectErrorSubstring(expected_substring) would pass, but - // does not fail otherwise. - bool HasAlternateErrorSubstring(const string& expected_substring); - - // Checks that MockCodeGenerator::Generate() was called in the given - // context (or the generator in test_plugin.cc, which produces the same - // output). That is, this tests if the generator with the given name - // was called with the given parameter and proto file and produced the - // given output file. This is checked by reading the output file and - // checking that it contains the content that MockCodeGenerator would - // generate given these inputs. message_name is the name of the first - // message that appeared in the proto file; this is just to make extra - // sure that the correct file was parsed. - void ExpectGenerated(const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name); - void ExpectGenerated(const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name, - const string& output_directory); - void ExpectGeneratedWithMultipleInputs(const string& generator_name, - const string& all_proto_names, - const string& proto_name, - const string& message_name); - void ExpectGeneratedWithInsertions(const string& generator_name, - const string& parameter, - const string& insertions, - const string& proto_name, - const string& message_name); - - void ExpectNullCodeGeneratorCalled(const string& parameter); - - void ReadDescriptorSet(const string& filename, - FileDescriptorSet* descriptor_set); - - private: - // The object we are testing. - CommandLineInterface cli_; - - // Was DisallowPlugins() called? - bool disallow_plugins_; - - // We create a directory within TestTempDir() in order to add extra - // protection against accidentally deleting user files (since we recursively - // delete this directory during the test). This is the full path of that - // directory. - string temp_directory_; - - // The result of Run(). - int return_code_; - - // The captured stderr output. - string error_text_; - - // Pointers which need to be deleted later. - vector mock_generators_to_delete_; - - NullCodeGenerator* null_generator_; -}; - -class CommandLineInterfaceTest::NullCodeGenerator : public CodeGenerator { - public: - NullCodeGenerator() : called_(false) {} - ~NullCodeGenerator() {} - - mutable bool called_; - mutable string parameter_; - - // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - called_ = true; - parameter_ = parameter; - return true; - } -}; - -// =================================================================== - -void CommandLineInterfaceTest::SetUp() { - // Most of these tests were written before this option was added, so we - // run with the option on (which used to be the only way) except in certain - // tests where we turn it off. - cli_.SetInputsAreProtoPathRelative(true); - - temp_directory_ = TestTempDir() + "/proto2_cli_test_temp"; - - // If the temp directory already exists, it must be left over from a - // previous run. Delete it. - if (File::Exists(temp_directory_)) { - File::DeleteRecursively(temp_directory_, NULL, NULL); - } - - // Create the temp directory. - GOOGLE_CHECK(File::CreateDir(temp_directory_.c_str(), DEFAULT_FILE_MODE)); - - // Register generators. - CodeGenerator* generator = new MockCodeGenerator("test_generator"); - mock_generators_to_delete_.push_back(generator); - cli_.RegisterGenerator("--test_out", generator, "Test output."); - cli_.RegisterGenerator("-t", generator, "Test output."); - - generator = new MockCodeGenerator("alt_generator"); - mock_generators_to_delete_.push_back(generator); - cli_.RegisterGenerator("--alt_out", generator, "Alt output."); - - generator = null_generator_ = new NullCodeGenerator(); - mock_generators_to_delete_.push_back(generator); - cli_.RegisterGenerator("--null_out", generator, "Null output."); - - disallow_plugins_ = false; -} - -void CommandLineInterfaceTest::TearDown() { - // Delete the temp directory. - File::DeleteRecursively(temp_directory_, NULL, NULL); - - // Delete all the MockCodeGenerators. - for (int i = 0; i < mock_generators_to_delete_.size(); i++) { - delete mock_generators_to_delete_[i]; - } - mock_generators_to_delete_.clear(); -} - -void CommandLineInterfaceTest::Run(const string& command) { - vector args; - SplitStringUsing(command, " ", &args); - - if (!disallow_plugins_) { - cli_.AllowPlugins("prefix-"); - const char* possible_paths[] = { - // When building with shared libraries, libtool hides the real executable - // in .libs and puts a fake wrapper in the current directory. - // Unfortunately, due to an apparent bug on Cygwin/MinGW, if one program - // wrapped in this way (e.g. protobuf-tests.exe) tries to execute another - // program wrapped in this way (e.g. test_plugin.exe), the latter fails - // with error code 127 and no explanation message. Presumably the problem - // is that the wrapper for protobuf-tests.exe set some environment - // variables that confuse the wrapper for test_plugin.exe. Luckily, it - // turns out that if we simply invoke the wrapped test_plugin.exe - // directly, it works -- I guess the environment variables set by the - // protobuf-tests.exe wrapper happen to be correct for it too. So we do - // that. - ".libs/test_plugin.exe", // Win32 w/autotool (Cygwin / MinGW) - "test_plugin.exe", // Other Win32 (MSVC) - "test_plugin", // Unix - }; - - string plugin_path; - - for (int i = 0; i < GOOGLE_ARRAYSIZE(possible_paths); i++) { - if (access(possible_paths[i], F_OK) == 0) { - plugin_path = possible_paths[i]; - break; - } - } - - if (plugin_path.empty()) { - GOOGLE_LOG(ERROR) - << "Plugin executable not found. Plugin tests are likely to fail."; - } else { - args.push_back("--plugin=prefix-gen-plug=" + plugin_path); - } - } - - scoped_array argv(new const char*[args.size()]); - - for (int i = 0; i < args.size(); i++) { - args[i] = StringReplace(args[i], "$tmpdir", temp_directory_, true); - argv[i] = args[i].c_str(); - } - - CaptureTestStderr(); - - return_code_ = cli_.Run(args.size(), argv.get()); - - error_text_ = GetCapturedTestStderr(); -} - -// ------------------------------------------------------------------- - -void CommandLineInterfaceTest::CreateTempFile( - const string& name, - const string& contents) { - // Create parent directory, if necessary. - string::size_type slash_pos = name.find_last_of('/'); - if (slash_pos != string::npos) { - string dir = name.substr(0, slash_pos); - File::RecursivelyCreateDir(temp_directory_ + "/" + dir, 0777); - } - - // Write file. - string full_name = temp_directory_ + "/" + name; - File::WriteStringToFileOrDie(contents, full_name); -} - -void CommandLineInterfaceTest::CreateTempDir(const string& name) { - File::RecursivelyCreateDir(temp_directory_ + "/" + name, 0777); -} - -// ------------------------------------------------------------------- - -void CommandLineInterfaceTest::ExpectNoErrors() { - EXPECT_EQ(0, return_code_); - EXPECT_EQ("", error_text_); -} - -void CommandLineInterfaceTest::ExpectErrorText(const string& expected_text) { - EXPECT_NE(0, return_code_); - EXPECT_EQ(StringReplace(expected_text, "$tmpdir", temp_directory_, true), - error_text_); -} - -void CommandLineInterfaceTest::ExpectErrorSubstring( - const string& expected_substring) { - EXPECT_NE(0, return_code_); - EXPECT_PRED_FORMAT2(testing::IsSubstring, expected_substring, error_text_); -} - -bool CommandLineInterfaceTest::HasAlternateErrorSubstring( - const string& expected_substring) { - EXPECT_NE(0, return_code_); - return error_text_.find(expected_substring) != string::npos; -} - -void CommandLineInterfaceTest::ExpectGenerated( - const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name) { - MockCodeGenerator::ExpectGenerated( - generator_name, parameter, "", proto_name, message_name, proto_name, - temp_directory_); -} - -void CommandLineInterfaceTest::ExpectGenerated( - const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name, - const string& output_directory) { - MockCodeGenerator::ExpectGenerated( - generator_name, parameter, "", proto_name, message_name, proto_name, - temp_directory_ + "/" + output_directory); -} - -void CommandLineInterfaceTest::ExpectGeneratedWithMultipleInputs( - const string& generator_name, - const string& all_proto_names, - const string& proto_name, - const string& message_name) { - MockCodeGenerator::ExpectGenerated( - generator_name, "", "", proto_name, message_name, - all_proto_names, - temp_directory_); -} - -void CommandLineInterfaceTest::ExpectGeneratedWithInsertions( - const string& generator_name, - const string& parameter, - const string& insertions, - const string& proto_name, - const string& message_name) { - MockCodeGenerator::ExpectGenerated( - generator_name, parameter, insertions, proto_name, message_name, - proto_name, temp_directory_); -} - -void CommandLineInterfaceTest::ExpectNullCodeGeneratorCalled( - const string& parameter) { - EXPECT_TRUE(null_generator_->called_); - EXPECT_EQ(parameter, null_generator_->parameter_); -} - -void CommandLineInterfaceTest::ReadDescriptorSet( - const string& filename, FileDescriptorSet* descriptor_set) { - string path = temp_directory_ + "/" + filename; - string file_contents; - if (!File::ReadFileToString(path, &file_contents)) { - FAIL() << "File not found: " << path; - } - if (!descriptor_set->ParseFromString(file_contents)) { - FAIL() << "Could not parse file contents: " << path; - } -} - -// =================================================================== - -TEST_F(CommandLineInterfaceTest, BasicOutput) { - // Test that the common case works. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, BasicPlugin) { - // Test that basic plugins work. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --plug_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_plugin", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, GeneratorAndPlugin) { - // Invoke a generator and a plugin at the same time. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); - ExpectGenerated("test_plugin", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, MultipleInputs) { - // Test parsing multiple input files. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempFile("bar.proto", - "syntax = \"proto2\";\n" - "message Bar {}\n"); - - Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " - "--proto_path=$tmpdir foo.proto bar.proto"); - - ExpectNoErrors(); - ExpectGeneratedWithMultipleInputs("test_generator", "foo.proto,bar.proto", - "foo.proto", "Foo"); - ExpectGeneratedWithMultipleInputs("test_generator", "foo.proto,bar.proto", - "bar.proto", "Bar"); - ExpectGeneratedWithMultipleInputs("test_plugin", "foo.proto,bar.proto", - "foo.proto", "Foo"); - ExpectGeneratedWithMultipleInputs("test_plugin", "foo.proto,bar.proto", - "bar.proto", "Bar"); -} - -TEST_F(CommandLineInterfaceTest, MultipleInputsWithImport) { - // Test parsing multiple input files with an import of a separate file. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempFile("bar.proto", - "syntax = \"proto2\";\n" - "import \"baz.proto\";\n" - "message Bar {\n" - " optional Baz a = 1;\n" - "}\n"); - CreateTempFile("baz.proto", - "syntax = \"proto2\";\n" - "message Baz {}\n"); - - Run("protocol_compiler --test_out=$tmpdir --plug_out=$tmpdir " - "--proto_path=$tmpdir foo.proto bar.proto"); - - ExpectNoErrors(); - ExpectGeneratedWithMultipleInputs("test_generator", "foo.proto,bar.proto", - "foo.proto", "Foo"); - ExpectGeneratedWithMultipleInputs("test_generator", "foo.proto,bar.proto", - "bar.proto", "Bar"); - ExpectGeneratedWithMultipleInputs("test_plugin", "foo.proto,bar.proto", - "foo.proto", "Foo"); - ExpectGeneratedWithMultipleInputs("test_plugin", "foo.proto,bar.proto", - "bar.proto", "Bar"); -} - -TEST_F(CommandLineInterfaceTest, CreateDirectory) { - // Test that when we output to a sub-directory, it is created. - - CreateTempFile("bar/baz/foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempDir("out"); - CreateTempDir("plugout"); - - Run("protocol_compiler --test_out=$tmpdir/out --plug_out=$tmpdir/plugout " - "--proto_path=$tmpdir bar/baz/foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "bar/baz/foo.proto", "Foo", "out"); - ExpectGenerated("test_plugin", "", "bar/baz/foo.proto", "Foo", "plugout"); -} - -TEST_F(CommandLineInterfaceTest, GeneratorParameters) { - // Test that generator parameters are correctly parsed from the command line. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=TestParameter:$tmpdir " - "--plug_out=TestPluginParameter:$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "TestParameter", "foo.proto", "Foo"); - ExpectGenerated("test_plugin", "TestPluginParameter", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, Insert) { - // Test running a generator that inserts code into another's output. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler " - "--test_out=TestParameter:$tmpdir " - "--plug_out=TestPluginParameter:$tmpdir " - "--test_out=insert=test_generator,test_plugin:$tmpdir " - "--plug_out=insert=test_generator,test_plugin:$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGeneratedWithInsertions( - "test_generator", "TestParameter", "test_generator,test_plugin", - "foo.proto", "Foo"); - ExpectGeneratedWithInsertions( - "test_plugin", "TestPluginParameter", "test_generator,test_plugin", - "foo.proto", "Foo"); -} - -#if defined(_WIN32) - -TEST_F(CommandLineInterfaceTest, WindowsOutputPath) { - // Test that the output path can be a Windows-style path. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n"); - - Run("protocol_compiler --null_out=C:\\ " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectNullCodeGeneratorCalled(""); -} - -TEST_F(CommandLineInterfaceTest, WindowsOutputPathAndParameter) { - // Test that we can have a windows-style output path and a parameter. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n"); - - Run("protocol_compiler --null_out=bar:C:\\ " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectNullCodeGeneratorCalled("bar"); -} - -TEST_F(CommandLineInterfaceTest, TrailingBackslash) { - // Test that the directories can end in backslashes. Some users claim this - // doesn't work on their system. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir\\ " - "--proto_path=$tmpdir\\ foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -#endif // defined(_WIN32) || defined(__CYGWIN__) - -TEST_F(CommandLineInterfaceTest, PathLookup) { - // Test that specifying multiple directories in the proto search path works. - - CreateTempFile("b/bar.proto", - "syntax = \"proto2\";\n" - "message Bar {}\n"); - CreateTempFile("a/foo.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n" - "message Foo {\n" - " optional Bar a = 1;\n" - "}\n"); - CreateTempFile("b/foo.proto", "this should not be parsed\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/a --proto_path=$tmpdir/b foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, ColonDelimitedPath) { - // Same as PathLookup, but we provide the proto_path in a single flag. - - CreateTempFile("b/bar.proto", - "syntax = \"proto2\";\n" - "message Bar {}\n"); - CreateTempFile("a/foo.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n" - "message Foo {\n" - " optional Bar a = 1;\n" - "}\n"); - CreateTempFile("b/foo.proto", "this should not be parsed\n"); - -#undef PATH_SEPARATOR -#if defined(_WIN32) -#define PATH_SEPARATOR ";" -#else -#define PATH_SEPARATOR ":" -#endif - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/a"PATH_SEPARATOR"$tmpdir/b foo.proto"); - -#undef PATH_SEPARATOR - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, NonRootMapping) { - // Test setting up a search path mapping a directory to a non-root location. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=bar=$tmpdir bar/foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "bar/foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, MultipleGenerators) { - // Test that we can have multiple generators and use both in one invocation, - // each with a different output directory. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - // Create the "a" and "b" sub-directories. - CreateTempDir("a"); - CreateTempDir("b"); - - Run("protocol_compiler " - "--test_out=$tmpdir/a " - "--alt_out=$tmpdir/b " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo", "a"); - ExpectGenerated("alt_generator", "", "foo.proto", "Foo", "b"); -} - -TEST_F(CommandLineInterfaceTest, DisallowServicesNoServices) { - // Test that --disallow_services doesn't cause a problem when there are no - // services. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --disallow_services --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, DisallowServicesHasService) { - // Test that --disallow_services produces an error when there are services. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n" - "service Bar {}\n"); - - Run("protocol_compiler --disallow_services --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring("foo.proto: This file contains services"); -} - -TEST_F(CommandLineInterfaceTest, AllowServicesHasService) { - // Test that services work fine as long as --disallow_services is not used. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n" - "service Bar {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, CwdRelativeInputs) { - // Test that we can accept working-directory-relative input files. - - SetInputsAreProtoPathRelative(false); - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir $tmpdir/foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, WriteDescriptorSet) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempFile("bar.proto", - "syntax = \"proto2\";\n" - "import \"foo.proto\";\n" - "message Bar {\n" - " optional Foo foo = 1;\n" - "}\n"); - - Run("protocol_compiler --descriptor_set_out=$tmpdir/descriptor_set " - "--proto_path=$tmpdir bar.proto"); - - ExpectNoErrors(); - - FileDescriptorSet descriptor_set; - ReadDescriptorSet("descriptor_set", &descriptor_set); - if (HasFatalFailure()) return; - ASSERT_EQ(1, descriptor_set.file_size()); - EXPECT_EQ("bar.proto", descriptor_set.file(0).name()); -} - -TEST_F(CommandLineInterfaceTest, WriteTransitiveDescriptorSet) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempFile("bar.proto", - "syntax = \"proto2\";\n" - "import \"foo.proto\";\n" - "message Bar {\n" - " optional Foo foo = 1;\n" - "}\n"); - - Run("protocol_compiler --descriptor_set_out=$tmpdir/descriptor_set " - "--include_imports --proto_path=$tmpdir bar.proto"); - - ExpectNoErrors(); - - FileDescriptorSet descriptor_set; - ReadDescriptorSet("descriptor_set", &descriptor_set); - if (HasFatalFailure()) return; - ASSERT_EQ(2, descriptor_set.file_size()); - if (descriptor_set.file(0).name() == "bar.proto") { - std::swap(descriptor_set.mutable_file()->mutable_data()[0], - descriptor_set.mutable_file()->mutable_data()[1]); - } - EXPECT_EQ("foo.proto", descriptor_set.file(0).name()); - EXPECT_EQ("bar.proto", descriptor_set.file(1).name()); -} - -// ------------------------------------------------------------------- - -TEST_F(CommandLineInterfaceTest, ParseErrors) { - // Test that parse errors are reported. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "badsyntax\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorText( - "foo.proto:2:1: Expected top-level statement (e.g. \"message\").\n"); -} - -TEST_F(CommandLineInterfaceTest, ParseErrorsMultipleFiles) { - // Test that parse errors are reported from multiple files. - - // We set up files such that foo.proto actually depends on bar.proto in - // two ways: Directly and through baz.proto. bar.proto's errors should - // only be reported once. - CreateTempFile("bar.proto", - "syntax = \"proto2\";\n" - "badsyntax\n"); - CreateTempFile("baz.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n"); - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n" - "import \"baz.proto\";\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorText( - "bar.proto:2:1: Expected top-level statement (e.g. \"message\").\n" - "baz.proto: Import \"bar.proto\" was not found or had errors.\n" - "foo.proto: Import \"bar.proto\" was not found or had errors.\n" - "foo.proto: Import \"baz.proto\" was not found or had errors.\n"); -} - -TEST_F(CommandLineInterfaceTest, InputNotFoundError) { - // Test what happens if the input file is not found. - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorText( - "foo.proto: File not found.\n"); -} - -TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotFoundError) { - // Test what happens when a working-directory-relative input file is not - // found. - - SetInputsAreProtoPathRelative(false); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir $tmpdir/foo.proto"); - - ExpectErrorText( - "$tmpdir/foo.proto: No such file or directory\n"); -} - -TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotMappedError) { - // Test what happens when a working-directory-relative input file is not - // mapped to a virtual path. - - SetInputsAreProtoPathRelative(false); - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - // Create a directory called "bar" so that we can point --proto_path at it. - CreateTempFile("bar/dummy", ""); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/bar $tmpdir/foo.proto"); - - ExpectErrorText( - "$tmpdir/foo.proto: File does not reside within any path " - "specified using --proto_path (or -I). You must specify a " - "--proto_path which encompasses this file. Note that the " - "proto_path must be an exact prefix of the .proto file " - "names -- protoc is too dumb to figure out when two paths " - "(e.g. absolute and relative) are equivalent (it's harder " - "than you think).\n"); -} - -TEST_F(CommandLineInterfaceTest, CwdRelativeInputNotFoundAndNotMappedError) { - // Check what happens if the input file is not found *and* is not mapped - // in the proto_path. - - SetInputsAreProtoPathRelative(false); - - // Create a directory called "bar" so that we can point --proto_path at it. - CreateTempFile("bar/dummy", ""); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/bar $tmpdir/foo.proto"); - - ExpectErrorText( - "$tmpdir/foo.proto: No such file or directory\n"); -} - -TEST_F(CommandLineInterfaceTest, CwdRelativeInputShadowedError) { - // Test what happens when a working-directory-relative input file is shadowed - // by another file in the virtual path. - - SetInputsAreProtoPathRelative(false); - - CreateTempFile("foo/foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - CreateTempFile("bar/foo.proto", - "syntax = \"proto2\";\n" - "message Bar {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/foo --proto_path=$tmpdir/bar " - "$tmpdir/bar/foo.proto"); - - ExpectErrorText( - "$tmpdir/bar/foo.proto: Input is shadowed in the --proto_path " - "by \"$tmpdir/foo/foo.proto\". Either use the latter " - "file as your input or reorder the --proto_path so that the " - "former file's location comes first.\n"); -} - -TEST_F(CommandLineInterfaceTest, ProtoPathNotFoundError) { - // Test what happens if the input file is not found. - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir/foo foo.proto"); - - ExpectErrorText( - "$tmpdir/foo: warning: directory does not exist.\n" - "foo.proto: File not found.\n"); -} - -TEST_F(CommandLineInterfaceTest, MissingInputError) { - // Test that we get an error if no inputs are given. - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir"); - - ExpectErrorText("Missing input file.\n"); -} - -TEST_F(CommandLineInterfaceTest, MissingOutputError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --proto_path=$tmpdir foo.proto"); - - ExpectErrorText("Missing output directives.\n"); -} - -TEST_F(CommandLineInterfaceTest, OutputWriteError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - string output_file = - MockCodeGenerator::GetOutputFileName("test_generator", "foo.proto"); - - // Create a directory blocking our output location. - CreateTempDir(output_file); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - // MockCodeGenerator no longer detects an error because we actually write to - // an in-memory location first, then dump to disk at the end. This is no - // big deal. - // ExpectErrorSubstring("MockCodeGenerator detected write error."); - -#if defined(_WIN32) && !defined(__CYGWIN__) - // Windows with MSVCRT.dll produces EPERM instead of EISDIR. - if (HasAlternateErrorSubstring(output_file + ": Permission denied")) { - return; - } -#endif - - ExpectErrorSubstring(output_file + ": Is a directory"); -} - -TEST_F(CommandLineInterfaceTest, PluginOutputWriteError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - string output_file = - MockCodeGenerator::GetOutputFileName("test_plugin", "foo.proto"); - - // Create a directory blocking our output location. - CreateTempDir(output_file); - - Run("protocol_compiler --plug_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - -#if defined(_WIN32) && !defined(__CYGWIN__) - // Windows with MSVCRT.dll produces EPERM instead of EISDIR. - if (HasAlternateErrorSubstring(output_file + ": Permission denied")) { - return; - } -#endif - - ExpectErrorSubstring(output_file + ": Is a directory"); -} - -TEST_F(CommandLineInterfaceTest, OutputDirectoryNotFoundError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir/nosuchdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring("nosuchdir/: No such file or directory"); -} - -TEST_F(CommandLineInterfaceTest, PluginOutputDirectoryNotFoundError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --plug_out=$tmpdir/nosuchdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring("nosuchdir/: No such file or directory"); -} - -TEST_F(CommandLineInterfaceTest, OutputDirectoryIsFileError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out=$tmpdir/foo.proto " - "--proto_path=$tmpdir foo.proto"); - -#if defined(_WIN32) && !defined(__CYGWIN__) - // Windows with MSVCRT.dll produces EINVAL instead of ENOTDIR. - if (HasAlternateErrorSubstring("foo.proto/: Invalid argument")) { - return; - } -#endif - - ExpectErrorSubstring("foo.proto/: Not a directory"); -} - -TEST_F(CommandLineInterfaceTest, GeneratorError) { - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message MockCodeGenerator_Error {}\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring( - "--test_out: foo.proto: Saw message type MockCodeGenerator_Error."); -} - -TEST_F(CommandLineInterfaceTest, GeneratorPluginError) { - // Test a generator plugin that returns an error. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message MockCodeGenerator_Error {}\n"); - - Run("protocol_compiler --plug_out=TestParameter:$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring( - "--plug_out: foo.proto: Saw message type MockCodeGenerator_Error."); -} - -TEST_F(CommandLineInterfaceTest, GeneratorPluginFail) { - // Test a generator plugin that exits with an error code. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message MockCodeGenerator_Exit {}\n"); - - Run("protocol_compiler --plug_out=TestParameter:$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring("Saw message type MockCodeGenerator_Exit."); - ExpectErrorSubstring( - "--plug_out: prefix-gen-plug: Plugin failed with status code 123."); -} - -TEST_F(CommandLineInterfaceTest, GeneratorPluginCrash) { - // Test a generator plugin that crashes. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message MockCodeGenerator_Abort {}\n"); - - Run("protocol_compiler --plug_out=TestParameter:$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectErrorSubstring("Saw message type MockCodeGenerator_Abort."); - -#ifdef _WIN32 - // Windows doesn't have signals. It looks like abort()ing causes the process - // to exit with status code 3, but let's not depend on the exact number here. - ExpectErrorSubstring( - "--plug_out: prefix-gen-plug: Plugin failed with status code"); -#else - // Don't depend on the exact signal number. - ExpectErrorSubstring( - "--plug_out: prefix-gen-plug: Plugin killed by signal"); -#endif -} - -TEST_F(CommandLineInterfaceTest, GeneratorPluginNotFound) { - // Test what happens if the plugin isn't found. - - CreateTempFile("error.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --badplug_out=TestParameter:$tmpdir " - "--plugin=prefix-gen-badplug=no_such_file " - "--proto_path=$tmpdir error.proto"); - -#ifdef _WIN32 - ExpectErrorSubstring("--badplug_out: prefix-gen-badplug: " + - Subprocess::Win32ErrorMessage(ERROR_FILE_NOT_FOUND)); -#else - // Error written to stdout by child process after exec() fails. - ExpectErrorSubstring( - "no_such_file: program not found or is not executable"); - - // Error written by parent process when child fails. - ExpectErrorSubstring( - "--badplug_out: prefix-gen-badplug: Plugin failed with status code 1."); -#endif -} - -TEST_F(CommandLineInterfaceTest, GeneratorPluginNotAllowed) { - // Test what happens if plugins aren't allowed. - - CreateTempFile("error.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - DisallowPlugins(); - Run("protocol_compiler --plug_out=TestParameter:$tmpdir " - "--proto_path=$tmpdir error.proto"); - - ExpectErrorSubstring("Unknown flag: --plug_out"); -} - -TEST_F(CommandLineInterfaceTest, HelpText) { - Run("test_exec_name --help"); - - ExpectErrorSubstring("Usage: test_exec_name "); - ExpectErrorSubstring("--test_out=OUT_DIR"); - ExpectErrorSubstring("Test output."); - ExpectErrorSubstring("--alt_out=OUT_DIR"); - ExpectErrorSubstring("Alt output."); -} - -TEST_F(CommandLineInterfaceTest, GccFormatErrors) { - // Test --error_format=gcc (which is the default, but we want to verify - // that it can be set explicitly). - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "badsyntax\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir --error_format=gcc foo.proto"); - - ExpectErrorText( - "foo.proto:2:1: Expected top-level statement (e.g. \"message\").\n"); -} - -TEST_F(CommandLineInterfaceTest, MsvsFormatErrors) { - // Test --error_format=msvs - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "badsyntax\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir --error_format=msvs foo.proto"); - - ExpectErrorText( - "$tmpdir/foo.proto(2) : error in column=1: Expected top-level statement " - "(e.g. \"message\").\n"); -} - -TEST_F(CommandLineInterfaceTest, InvalidErrorFormat) { - // Test --error_format=msvs - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "badsyntax\n"); - - Run("protocol_compiler --test_out=$tmpdir " - "--proto_path=$tmpdir --error_format=invalid foo.proto"); - - ExpectErrorText( - "Unknown error format: invalid\n"); -} - -// ------------------------------------------------------------------- -// Flag parsing tests - -TEST_F(CommandLineInterfaceTest, ParseSingleCharacterFlag) { - // Test that a single-character flag works. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler -t$tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, ParseSpaceDelimitedValue) { - // Test that separating the flag value with a space works. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler --test_out $tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, ParseSingleCharacterSpaceDelimitedValue) { - // Test that separating the flag value with a space works for - // single-character flags. - - CreateTempFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - Run("protocol_compiler -t $tmpdir " - "--proto_path=$tmpdir foo.proto"); - - ExpectNoErrors(); - ExpectGenerated("test_generator", "", "foo.proto", "Foo"); -} - -TEST_F(CommandLineInterfaceTest, MissingValueError) { - // Test that we get an error if a flag is missing its value. - - Run("protocol_compiler --test_out --proto_path=$tmpdir foo.proto"); - - ExpectErrorText("Missing value for flag: --test_out\n"); -} - -TEST_F(CommandLineInterfaceTest, MissingValueAtEndError) { - // Test that we get an error if the last argument is a flag requiring a - // value. - - Run("protocol_compiler --test_out"); - - ExpectErrorText("Missing value for flag: --test_out\n"); -} - -// =================================================================== - -// Test for --encode and --decode. Note that it would be easier to do this -// test as a shell script, but we'd like to be able to run the test on -// platforms that don't have a Bourne-compatible shell available (especially -// Windows/MSVC). -class EncodeDecodeTest : public testing::Test { - protected: - virtual void SetUp() { - duped_stdin_ = dup(STDIN_FILENO); - } - - virtual void TearDown() { - dup2(duped_stdin_, STDIN_FILENO); - close(duped_stdin_); - } - - void RedirectStdinFromText(const string& input) { - string filename = TestTempDir() + "/test_stdin"; - File::WriteStringToFileOrDie(input, filename); - GOOGLE_CHECK(RedirectStdinFromFile(filename)); - } - - bool RedirectStdinFromFile(const string& filename) { - int fd = open(filename.c_str(), O_RDONLY); - if (fd < 0) return false; - dup2(fd, STDIN_FILENO); - close(fd); - return true; - } - - // Remove '\r' characters from text. - string StripCR(const string& text) { - string result; - - for (int i = 0; i < text.size(); i++) { - if (text[i] != '\r') { - result.push_back(text[i]); - } - } - - return result; - } - - enum Type { TEXT, BINARY }; - enum ReturnCode { SUCCESS, ERROR }; - - bool Run(const string& command) { - vector args; - args.push_back("protoc"); - SplitStringUsing(command, " ", &args); - args.push_back("--proto_path=" + TestSourceDir()); - - scoped_array argv(new const char*[args.size()]); - for (int i = 0; i < args.size(); i++) { - argv[i] = args[i].c_str(); - } - - CommandLineInterface cli; - cli.SetInputsAreProtoPathRelative(true); - - CaptureTestStdout(); - CaptureTestStderr(); - - int result = cli.Run(args.size(), argv.get()); - - captured_stdout_ = GetCapturedTestStdout(); - captured_stderr_ = GetCapturedTestStderr(); - - return result == 0; - } - - void ExpectStdoutMatchesBinaryFile(const string& filename) { - string expected_output; - ASSERT_TRUE(File::ReadFileToString(filename, &expected_output)); - - // Don't use EXPECT_EQ because we don't want to print raw binary data to - // stdout on failure. - EXPECT_TRUE(captured_stdout_ == expected_output); - } - - void ExpectStdoutMatchesTextFile(const string& filename) { - string expected_output; - ASSERT_TRUE(File::ReadFileToString(filename, &expected_output)); - - ExpectStdoutMatchesText(expected_output); - } - - void ExpectStdoutMatchesText(const string& expected_text) { - EXPECT_EQ(StripCR(expected_text), StripCR(captured_stdout_)); - } - - void ExpectStderrMatchesText(const string& expected_text) { - EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_)); - } - - private: - int duped_stdin_; - string captured_stdout_; - string captured_stderr_; -}; - -TEST_F(EncodeDecodeTest, Encode) { - RedirectStdinFromFile(TestSourceDir() + - "/google/protobuf/testdata/text_format_unittest_data.txt"); - EXPECT_TRUE(Run("google/protobuf/unittest.proto " - "--encode=protobuf_unittest.TestAllTypes")); - ExpectStdoutMatchesBinaryFile(TestSourceDir() + - "/google/protobuf/testdata/golden_message"); - ExpectStderrMatchesText(""); -} - -TEST_F(EncodeDecodeTest, Decode) { - RedirectStdinFromFile(TestSourceDir() + - "/google/protobuf/testdata/golden_message"); - EXPECT_TRUE(Run("google/protobuf/unittest.proto " - "--decode=protobuf_unittest.TestAllTypes")); - ExpectStdoutMatchesTextFile(TestSourceDir() + - "/google/protobuf/testdata/text_format_unittest_data.txt"); - ExpectStderrMatchesText(""); -} - -TEST_F(EncodeDecodeTest, Partial) { - RedirectStdinFromText(""); - EXPECT_TRUE(Run("google/protobuf/unittest.proto " - "--encode=protobuf_unittest.TestRequired")); - ExpectStdoutMatchesText(""); - ExpectStderrMatchesText( - "warning: Input message is missing required fields: a, b, c\n"); -} - -TEST_F(EncodeDecodeTest, DecodeRaw) { - protobuf_unittest::TestAllTypes message; - message.set_optional_int32(123); - message.set_optional_string("foo"); - string data; - message.SerializeToString(&data); - - RedirectStdinFromText(data); - EXPECT_TRUE(Run("--decode_raw")); - ExpectStdoutMatchesText("1: 123\n" - "14: \"foo\"\n"); - ExpectStderrMatchesText(""); -} - -TEST_F(EncodeDecodeTest, UnknownType) { - EXPECT_FALSE(Run("google/protobuf/unittest.proto " - "--encode=NoSuchType")); - ExpectStdoutMatchesText(""); - ExpectStderrMatchesText("Type not defined: NoSuchType\n"); -} - -TEST_F(EncodeDecodeTest, ProtoParseError) { - EXPECT_FALSE(Run("google/protobuf/no_such_file.proto " - "--encode=NoSuchType")); - ExpectStdoutMatchesText(""); - ExpectStderrMatchesText( - "google/protobuf/no_such_file.proto: File not found.\n"); -} - -} // anonymous namespace - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc deleted file mode 100644 index bcfa5020..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +++ /dev/null @@ -1,158 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This test insures that google/protobuf/descriptor.pb.{h,cc} match exactly -// what would be generated by the protocol compiler. These files are not -// generated automatically at build time because they are compiled into the -// protocol compiler itself. So, if they were auto-generated, you'd have a -// chicken-and-egg problem. -// -// If this test fails, run the script -// "generate_descriptor_proto.sh" and add -// descriptor.pb.{h,cc} to your changelist. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -class MockErrorCollector : public MultiFileErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", - filename, line, column, message); - } -}; - -class MockGeneratorContext : public GeneratorContext { - public: - MockGeneratorContext() {} - ~MockGeneratorContext() { - STLDeleteValues(&files_); - } - - void ExpectFileMatches(const string& virtual_filename, - const string& physical_filename) { - string* expected_contents = FindPtrOrNull(files_, virtual_filename); - ASSERT_TRUE(expected_contents != NULL) - << "Generator failed to generate file: " << virtual_filename; - - string actual_contents; - File::ReadFileToStringOrDie( - TestSourceDir() + "/" + physical_filename, - &actual_contents); - EXPECT_TRUE(actual_contents == *expected_contents) - << physical_filename << " needs to be regenerated. Please run " - "generate_descriptor_proto.sh and add this file " - "to your CL."; - } - - // implements GeneratorContext -------------------------------------- - - virtual io::ZeroCopyOutputStream* Open(const string& filename) { - string** map_slot = &files_[filename]; - if (*map_slot != NULL) delete *map_slot; - *map_slot = new string; - - return new io::StringOutputStream(*map_slot); - } - - private: - map files_; -}; - -TEST(BootstrapTest, GeneratedDescriptorMatches) { - MockErrorCollector error_collector; - DiskSourceTree source_tree; - source_tree.MapPath("", TestSourceDir()); - Importer importer(&source_tree, &error_collector); - const FileDescriptor* proto_file = - importer.Import("google/protobuf/descriptor.proto"); - const FileDescriptor* plugin_proto_file = - importer.Import("google/protobuf/compiler/plugin.proto"); - EXPECT_EQ("", error_collector.text_); - ASSERT_TRUE(proto_file != NULL); - ASSERT_TRUE(plugin_proto_file != NULL); - - CppGenerator generator; - MockGeneratorContext context; - string error; - string parameter; - parameter = "dllexport_decl=LIBPROTOBUF_EXPORT"; - ASSERT_TRUE(generator.Generate(proto_file, parameter, - &context, &error)); - parameter = "dllexport_decl=LIBPROTOC_EXPORT"; - ASSERT_TRUE(generator.Generate(plugin_proto_file, parameter, - &context, &error)); - - context.ExpectFileMatches("google/protobuf/descriptor.pb.h", - "google/protobuf/descriptor.pb.h"); - context.ExpectFileMatches("google/protobuf/descriptor.pb.cc", - "google/protobuf/descriptor.pb.cc"); - context.ExpectFileMatches("google/protobuf/compiler/plugin.pb.h", - "google/protobuf/compiler/plugin.pb.h"); - context.ExpectFileMatches("google/protobuf/compiler/plugin.pb.cc", - "google/protobuf/compiler/plugin.pb.cc"); -} - -} // namespace - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc deleted file mode 100644 index 76d2b798..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc +++ /dev/null @@ -1,258 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor, - const string& dllexport_decl) - : descriptor_(descriptor), - classname_(ClassName(descriptor, false)), - dllexport_decl_(dllexport_decl) { -} - -EnumGenerator::~EnumGenerator() {} - -void EnumGenerator::GenerateDefinition(io::Printer* printer) { - map vars; - vars["classname"] = classname_; - vars["short_name"] = descriptor_->name(); - - printer->Print(vars, "enum $classname$ {\n"); - printer->Indent(); - - const EnumValueDescriptor* min_value = descriptor_->value(0); - const EnumValueDescriptor* max_value = descriptor_->value(0); - - for (int i = 0; i < descriptor_->value_count(); i++) { - vars["name"] = descriptor_->value(i)->name(); - vars["number"] = SimpleItoa(descriptor_->value(i)->number()); - vars["prefix"] = (descriptor_->containing_type() == NULL) ? - "" : classname_ + "_"; - - if (i > 0) printer->Print(",\n"); - printer->Print(vars, "$prefix$$name$ = $number$"); - - if (descriptor_->value(i)->number() < min_value->number()) { - min_value = descriptor_->value(i); - } - if (descriptor_->value(i)->number() > max_value->number()) { - max_value = descriptor_->value(i); - } - } - - printer->Outdent(); - printer->Print("\n};\n"); - - vars["min_name"] = min_value->name(); - vars["max_name"] = max_value->name(); - - if (dllexport_decl_.empty()) { - vars["dllexport"] = ""; - } else { - vars["dllexport"] = dllexport_decl_ + " "; - } - - printer->Print(vars, - "$dllexport$bool $classname$_IsValid(int value);\n" - "const $classname$ $prefix$$short_name$_MIN = $prefix$$min_name$;\n" - "const $classname$ $prefix$$short_name$_MAX = $prefix$$max_name$;\n" - "const int $prefix$$short_name$_ARRAYSIZE = $prefix$$short_name$_MAX + 1;\n" - "\n"); - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print(vars, - "$dllexport$const ::google::protobuf::EnumDescriptor* $classname$_descriptor();\n"); - // The _Name and _Parse methods - printer->Print(vars, - "inline const ::std::string& $classname$_Name($classname$ value) {\n" - " return ::google::protobuf::internal::NameOfEnum(\n" - " $classname$_descriptor(), value);\n" - "}\n"); - printer->Print(vars, - "inline bool $classname$_Parse(\n" - " const ::std::string& name, $classname$* value) {\n" - " return ::google::protobuf::internal::ParseNamedEnum<$classname$>(\n" - " $classname$_descriptor(), name, value);\n" - "}\n"); - } -} - -void EnumGenerator:: -GenerateGetEnumDescriptorSpecializations(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print( - "template <>\n" - "inline const EnumDescriptor* GetEnumDescriptor< $classname$>() {\n" - " return $classname$_descriptor();\n" - "}\n", - "classname", ClassName(descriptor_, true)); - } -} - -void EnumGenerator::GenerateSymbolImports(io::Printer* printer) { - map vars; - vars["nested_name"] = descriptor_->name(); - vars["classname"] = classname_; - printer->Print(vars, "typedef $classname$ $nested_name$;\n"); - - for (int j = 0; j < descriptor_->value_count(); j++) { - vars["tag"] = descriptor_->value(j)->name(); - printer->Print(vars, - "static const $nested_name$ $tag$ = $classname$_$tag$;\n"); - } - - printer->Print(vars, - "static inline bool $nested_name$_IsValid(int value) {\n" - " return $classname$_IsValid(value);\n" - "}\n" - "static const $nested_name$ $nested_name$_MIN =\n" - " $classname$_$nested_name$_MIN;\n" - "static const $nested_name$ $nested_name$_MAX =\n" - " $classname$_$nested_name$_MAX;\n" - "static const int $nested_name$_ARRAYSIZE =\n" - " $classname$_$nested_name$_ARRAYSIZE;\n"); - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print(vars, - "static inline const ::google::protobuf::EnumDescriptor*\n" - "$nested_name$_descriptor() {\n" - " return $classname$_descriptor();\n" - "}\n"); - printer->Print(vars, - "static inline const ::std::string& $nested_name$_Name($nested_name$ value) {\n" - " return $classname$_Name(value);\n" - "}\n"); - printer->Print(vars, - "static inline bool $nested_name$_Parse(const ::std::string& name,\n" - " $nested_name$* value) {\n" - " return $classname$_Parse(name, value);\n" - "}\n"); - } -} - -void EnumGenerator::GenerateDescriptorInitializer( - io::Printer* printer, int index) { - map vars; - vars["classname"] = classname_; - vars["index"] = SimpleItoa(index); - - if (descriptor_->containing_type() == NULL) { - printer->Print(vars, - "$classname$_descriptor_ = file->enum_type($index$);\n"); - } else { - vars["parent"] = ClassName(descriptor_->containing_type(), false); - printer->Print(vars, - "$classname$_descriptor_ = $parent$_descriptor_->enum_type($index$);\n"); - } -} - -void EnumGenerator::GenerateMethods(io::Printer* printer) { - map vars; - vars["classname"] = classname_; - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print(vars, - "const ::google::protobuf::EnumDescriptor* $classname$_descriptor() {\n" - " protobuf_AssignDescriptorsOnce();\n" - " return $classname$_descriptor_;\n" - "}\n"); - } - - printer->Print(vars, - "bool $classname$_IsValid(int value) {\n" - " switch(value) {\n"); - - // Multiple values may have the same number. Make sure we only cover - // each number once by first constructing a set containing all valid - // numbers, then printing a case statement for each element. - - set numbers; - for (int j = 0; j < descriptor_->value_count(); j++) { - const EnumValueDescriptor* value = descriptor_->value(j); - numbers.insert(value->number()); - } - - for (set::iterator iter = numbers.begin(); - iter != numbers.end(); ++iter) { - printer->Print( - " case $number$:\n", - "number", SimpleItoa(*iter)); - } - - printer->Print(vars, - " return true;\n" - " default:\n" - " return false;\n" - " }\n" - "}\n" - "\n"); - - if (descriptor_->containing_type() != NULL) { - // We need to "define" the static constants which were declared in the - // header, to give the linker a place to put them. Or at least the C++ - // standard says we have to. MSVC actually insists tha we do _not_ define - // them again in the .cc file. - printer->Print("#ifndef _MSC_VER\n"); - - vars["parent"] = ClassName(descriptor_->containing_type(), false); - vars["nested_name"] = descriptor_->name(); - for (int i = 0; i < descriptor_->value_count(); i++) { - vars["value"] = descriptor_->value(i)->name(); - printer->Print(vars, - "const $classname$ $parent$::$value$;\n"); - } - printer->Print(vars, - "const $classname$ $parent$::$nested_name$_MIN;\n" - "const $classname$ $parent$::$nested_name$_MAX;\n" - "const int $parent$::$nested_name$_ARRAYSIZE;\n"); - - printer->Print("#endif // _MSC_VER\n"); - } -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h deleted file mode 100644 index 58f7721e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h +++ /dev/null @@ -1,99 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_H__ - -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -class EnumGenerator { - public: - // See generator.cc for the meaning of dllexport_decl. - explicit EnumGenerator(const EnumDescriptor* descriptor, - const string& dllexport_decl); - ~EnumGenerator(); - - // Header stuff. - - // Generate header code defining the enum. This code should be placed - // within the enum's package namespace, but NOT within any class, even for - // nested enums. - void GenerateDefinition(io::Printer* printer); - - // Generate specialization of GetEnumDescriptor(). - // Precondition: in ::google::protobuf namespace. - void GenerateGetEnumDescriptorSpecializations(io::Printer* printer); - - // For enums nested within a message, generate code to import all the enum's - // symbols (e.g. the enum type name, all its values, etc.) into the class's - // namespace. This should be placed inside the class definition in the - // header. - void GenerateSymbolImports(io::Printer* printer); - - // Source file stuff. - - // Generate code that initializes the global variable storing the enum's - // descriptor. - void GenerateDescriptorInitializer(io::Printer* printer, int index); - - // Generate non-inline methods related to the enum, such as IsValidValue(). - // Goes in the .cc file. - void GenerateMethods(io::Printer* printer); - - private: - const EnumDescriptor* descriptor_; - string classname_; - string dllexport_decl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc deleted file mode 100644 index a369f417..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +++ /dev/null @@ -1,361 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -void SetEnumVariables(const FieldDescriptor* descriptor, - map* variables) { - SetCommonFieldVariables(descriptor, variables); - const EnumValueDescriptor* default_value = descriptor->default_value_enum(); - (*variables)["type"] = ClassName(descriptor->enum_type(), true); - (*variables)["default"] = SimpleItoa(default_value->number()); -} - -} // namespace - -// =================================================================== - -EnumFieldGenerator:: -EnumFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetEnumVariables(descriptor, &variables_); -} - -EnumFieldGenerator::~EnumFieldGenerator() {} - -void EnumFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, "int $name$_;\n"); -} - -void EnumFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $name$() const$deprecation$;\n" - "inline void set_$name$($type$ value)$deprecation$;\n"); -} - -void EnumFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $classname$::$name$() const {\n" - " return static_cast< $type$ >($name$_);\n" - "}\n" - "inline void $classname$::set_$name$($type$ value) {\n" - " GOOGLE_DCHECK($type$_IsValid(value));\n" - " set_has_$name$();\n" - " $name$_ = value;\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void EnumFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "set_$name$(from.$name$());\n"); -} - -void EnumFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "std::swap($name$_, other->$name$_);\n"); -} - -void EnumFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void EnumFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - printer->Print(variables_, - "int value;\n" - "DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<\n" - " int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(\n" - " input, &value)));\n" - "if ($type$_IsValid(value)) {\n" - " set_$name$(static_cast< $type$ >(value));\n"); - if (HasUnknownFields(descriptor_->file())) { - printer->Print(variables_, - "} else {\n" - " mutable_unknown_fields()->AddVarint($number$, value);\n"); - } - printer->Print(variables_, - "}\n"); -} - -void EnumFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::internal::WireFormatLite::WriteEnum(\n" - " $number$, this->$name$(), output);\n"); -} - -void EnumFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - printer->Print(variables_, - "target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(\n" - " $number$, this->$name$(), target);\n"); -} - -void EnumFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::EnumSize(this->$name$());\n"); -} - -// =================================================================== - -RepeatedEnumFieldGenerator:: -RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetEnumVariables(descriptor, &variables_); -} - -RepeatedEnumFieldGenerator::~RepeatedEnumFieldGenerator() {} - -void RepeatedEnumFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::RepeatedField $name$_;\n"); - if (descriptor_->options().packed() && HasGeneratedMethods(descriptor_->file())) { - printer->Print(variables_, - "mutable int _$name$_cached_byte_size_;\n"); - } -} - -void RepeatedEnumFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $name$(int index) const$deprecation$;\n" - "inline void set_$name$(int index, $type$ value)$deprecation$;\n" - "inline void add_$name$($type$ value)$deprecation$;\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedField& $name$() const$deprecation$;\n" - "inline ::google::protobuf::RepeatedField* mutable_$name$()$deprecation$;\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $classname$::$name$(int index) const {\n" - " return static_cast< $type$ >($name$_.Get(index));\n" - "}\n" - "inline void $classname$::set_$name$(int index, $type$ value) {\n" - " GOOGLE_DCHECK($type$_IsValid(value));\n" - " $name$_.Set(index, value);\n" - "}\n" - "inline void $classname$::add_$name$($type$ value) {\n" - " GOOGLE_DCHECK($type$_IsValid(value));\n" - " $name$_.Add(value);\n" - "}\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedField&\n" - "$classname$::$name$() const {\n" - " return $name$_;\n" - "}\n" - "inline ::google::protobuf::RepeatedField*\n" - "$classname$::mutable_$name$() {\n" - " return &$name$_;\n" - "}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Clear();\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.MergeFrom(from.$name$_);\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Swap(&other->$name$_);\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - // Not needed for repeated fields. -} - -void RepeatedEnumFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - // Don't use ReadRepeatedPrimitive here so that the enum can be validated. - printer->Print(variables_, - "int value;\n" - "DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<\n" - " int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(\n" - " input, &value)));\n" - "if ($type$_IsValid(value)) {\n" - " add_$name$(static_cast< $type$ >(value));\n"); - if (HasUnknownFields(descriptor_->file())) { - printer->Print(variables_, - "} else {\n" - " mutable_unknown_fields()->AddVarint($number$, value);\n"); - } - printer->Print("}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { - if (!descriptor_->options().packed()) { - // We use a non-inlined implementation in this case, since this path will - // rarely be executed. - printer->Print(variables_, - "DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumNoInline(\n" - " input,\n" - " &$type$_IsValid,\n" - " this->mutable_$name$())));\n"); - } else { - printer->Print(variables_, - "::google::protobuf::uint32 length;\n" - "DO_(input->ReadVarint32(&length));\n" - "::google::protobuf::io::CodedInputStream::Limit limit = " - "input->PushLimit(length);\n" - "while (input->BytesUntilLimit() > 0) {\n" - " int value;\n" - " DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<\n" - " int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(\n" - " input, &value)));\n" - " if ($type$_IsValid(value)) {\n" - " add_$name$(static_cast< $type$ >(value));\n" - " }\n" - "}\n" - "input->PopLimit(limit);\n"); - } -} - -void RepeatedEnumFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - if (descriptor_->options().packed()) { - // Write the tag and the size. - printer->Print(variables_, - "if (this->$name$_size() > 0) {\n" - " ::google::protobuf::internal::WireFormatLite::WriteTag(\n" - " $number$,\n" - " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " output);\n" - " output->WriteVarint32(_$name$_cached_byte_size_);\n" - "}\n"); - } - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (descriptor_->options().packed()) { - printer->Print(variables_, - " ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(\n" - " this->$name$(i), output);\n"); - } else { - printer->Print(variables_, - " ::google::protobuf::internal::WireFormatLite::WriteEnum(\n" - " $number$, this->$name$(i), output);\n"); - } - printer->Print("}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - if (descriptor_->options().packed()) { - // Write the tag and the size. - printer->Print(variables_, - "if (this->$name$_size() > 0) {\n" - " target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(\n" - " $number$,\n" - " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " target);\n" - " target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(" - " _$name$_cached_byte_size_, target);\n" - "}\n"); - } - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (descriptor_->options().packed()) { - printer->Print(variables_, - " target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(\n" - " this->$name$(i), target);\n"); - } else { - printer->Print(variables_, - " target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(\n" - " $number$, this->$name$(i), target);\n"); - } - printer->Print("}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "{\n" - " int data_size = 0;\n"); - printer->Indent(); - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(\n" - " this->$name$(i));\n" - "}\n"); - - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (data_size > 0) {\n" - " total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);\n" - "}\n" - "_$name$_cached_byte_size_ = data_size;\n" - "total_size += data_size;\n"); - } else { - printer->Print(variables_, - "total_size += $tag_size$ * this->$name$_size() + data_size;\n"); - } - printer->Outdent(); - printer->Print("}\n"); -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h deleted file mode 100644 index 0793430c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h +++ /dev/null @@ -1,103 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -class EnumFieldGenerator : public FieldGenerator { - public: - explicit EnumFieldGenerator(const FieldDescriptor* descriptor); - ~EnumFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); -}; - -class RepeatedEnumFieldGenerator : public FieldGenerator { - public: - explicit RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor); - ~RepeatedEnumFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc deleted file mode 100644 index 658a7077..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc +++ /dev/null @@ -1,210 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -// Returns the fully-qualified class name of the message that this field -// extends. This function is used in the Google-internal code to handle some -// legacy cases. -string ExtendeeClassName(const FieldDescriptor* descriptor) { - const Descriptor* extendee = descriptor->containing_type(); - return ClassName(extendee, true); -} - -} // anonymous namespace - -ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor, - const string& dllexport_decl) - : descriptor_(descriptor), - dllexport_decl_(dllexport_decl) { - // Construct type_traits_. - if (descriptor_->is_repeated()) { - type_traits_ = "Repeated"; - } - - switch (descriptor_->cpp_type()) { - case FieldDescriptor::CPPTYPE_ENUM: - type_traits_.append("EnumTypeTraits< "); - type_traits_.append(ClassName(descriptor_->enum_type(), true)); - type_traits_.append(", "); - type_traits_.append(ClassName(descriptor_->enum_type(), true)); - type_traits_.append("_IsValid>"); - break; - case FieldDescriptor::CPPTYPE_STRING: - type_traits_.append("StringTypeTraits"); - break; - case FieldDescriptor::CPPTYPE_MESSAGE: - type_traits_.append("MessageTypeTraits< "); - type_traits_.append(ClassName(descriptor_->message_type(), true)); - type_traits_.append(" >"); - break; - default: - type_traits_.append("PrimitiveTypeTraits< "); - type_traits_.append(PrimitiveTypeName(descriptor_->cpp_type())); - type_traits_.append(" >"); - break; - } -} - -ExtensionGenerator::~ExtensionGenerator() {} - -void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) { - map vars; - vars["extendee" ] = ExtendeeClassName(descriptor_); - vars["number" ] = SimpleItoa(descriptor_->number()); - vars["type_traits" ] = type_traits_; - vars["name" ] = descriptor_->name(); - vars["field_type" ] = SimpleItoa(static_cast(descriptor_->type())); - vars["packed" ] = descriptor_->options().packed() ? "true" : "false"; - vars["constant_name"] = FieldConstantName(descriptor_); - - // If this is a class member, it needs to be declared "static". Otherwise, - // it needs to be "extern". In the latter case, it also needs the DLL - // export/import specifier. - if (descriptor_->extension_scope() == NULL) { - vars["qualifier"] = "extern"; - if (!dllexport_decl_.empty()) { - vars["qualifier"] = dllexport_decl_ + " " + vars["qualifier"]; - } - } else { - vars["qualifier"] = "static"; - } - - printer->Print(vars, - "static const int $constant_name$ = $number$;\n" - "$qualifier$ ::google::protobuf::internal::ExtensionIdentifier< $extendee$,\n" - " ::google::protobuf::internal::$type_traits$, $field_type$, $packed$ >\n" - " $name$;\n" - ); - -} - -void ExtensionGenerator::GenerateDefinition(io::Printer* printer) { - // If this is a class member, it needs to be declared in its class scope. - string scope = (descriptor_->extension_scope() == NULL) ? "" : - ClassName(descriptor_->extension_scope(), false) + "::"; - string name = scope + descriptor_->name(); - - map vars; - vars["extendee" ] = ExtendeeClassName(descriptor_); - vars["type_traits" ] = type_traits_; - vars["name" ] = name; - vars["constant_name"] = FieldConstantName(descriptor_); - vars["default" ] = DefaultValue(descriptor_); - vars["field_type" ] = SimpleItoa(static_cast(descriptor_->type())); - vars["packed" ] = descriptor_->options().packed() ? "true" : "false"; - vars["scope" ] = scope; - - if (descriptor_->cpp_type() == FieldDescriptor::CPPTYPE_STRING) { - // We need to declare a global string which will contain the default value. - // We cannot declare it at class scope because that would require exposing - // it in the header which would be annoying for other reasons. So we - // replace :: with _ in the name and declare it as a global. - string global_name = StringReplace(name, "::", "_", true); - vars["global_name"] = global_name; - printer->Print(vars, - "const ::std::string $global_name$_default($default$);\n"); - - // Update the default to refer to the string global. - vars["default"] = global_name + "_default"; - } - - // Likewise, class members need to declare the field constant variable. - if (descriptor_->extension_scope() != NULL) { - printer->Print(vars, - "#ifndef _MSC_VER\n" - "const int $scope$$constant_name$;\n" - "#endif\n"); - } - - printer->Print(vars, - "::google::protobuf::internal::ExtensionIdentifier< $extendee$,\n" - " ::google::protobuf::internal::$type_traits$, $field_type$, $packed$ >\n" - " $name$($constant_name$, $default$);\n"); -} - -void ExtensionGenerator::GenerateRegistration(io::Printer* printer) { - map vars; - vars["extendee" ] = ExtendeeClassName(descriptor_); - vars["number" ] = SimpleItoa(descriptor_->number()); - vars["field_type" ] = SimpleItoa(static_cast(descriptor_->type())); - vars["is_repeated"] = descriptor_->is_repeated() ? "true" : "false"; - vars["is_packed" ] = (descriptor_->is_repeated() && - descriptor_->options().packed()) - ? "true" : "false"; - - switch (descriptor_->cpp_type()) { - case FieldDescriptor::CPPTYPE_ENUM: - printer->Print(vars, - "::google::protobuf::internal::ExtensionSet::RegisterEnumExtension(\n" - " &$extendee$::default_instance(),\n" - " $number$, $field_type$, $is_repeated$, $is_packed$,\n"); - printer->Print( - " &$type$_IsValid);\n", - "type", ClassName(descriptor_->enum_type(), true)); - break; - case FieldDescriptor::CPPTYPE_MESSAGE: - printer->Print(vars, - "::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(\n" - " &$extendee$::default_instance(),\n" - " $number$, $field_type$, $is_repeated$, $is_packed$,\n"); - printer->Print( - " &$type$::default_instance());\n", - "type", ClassName(descriptor_->message_type(), true)); - break; - default: - printer->Print(vars, - "::google::protobuf::internal::ExtensionSet::RegisterExtension(\n" - " &$extendee$::default_instance(),\n" - " $number$, $field_type$, $is_repeated$, $is_packed$);\n"); - break; - } -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h deleted file mode 100644 index 3068b091..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h +++ /dev/null @@ -1,85 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_EXTENSION_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_EXTENSION_H__ - -#include -#include - -namespace google { -namespace protobuf { - class FieldDescriptor; // descriptor.h - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -// Generates code for an extension, which may be within the scope of some -// message or may be at file scope. This is much simpler than FieldGenerator -// since extensions are just simple identifiers with interesting types. -class ExtensionGenerator { - public: - // See generator.cc for the meaning of dllexport_decl. - explicit ExtensionGenerator(const FieldDescriptor* descriptor, - const string& dllexport_decl); - ~ExtensionGenerator(); - - // Header stuff. - void GenerateDeclaration(io::Printer* printer); - - // Source file stuff. - void GenerateDefinition(io::Printer* printer); - - // Generate code to register the extension. - void GenerateRegistration(io::Printer* printer); - - private: - const FieldDescriptor* descriptor_; - string type_traits_; - string dllexport_decl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc deleted file mode 100644 index 103cac4a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc +++ /dev/null @@ -1,139 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -using internal::WireFormat; - -void SetCommonFieldVariables(const FieldDescriptor* descriptor, - map* variables) { - (*variables)["name"] = FieldName(descriptor); - (*variables)["index"] = SimpleItoa(descriptor->index()); - (*variables)["number"] = SimpleItoa(descriptor->number()); - (*variables)["classname"] = ClassName(FieldScope(descriptor), false); - (*variables)["declared_type"] = DeclaredTypeMethodName(descriptor->type()); - - (*variables)["tag_size"] = SimpleItoa( - WireFormat::TagSize(descriptor->number(), descriptor->type())); - (*variables)["deprecation"] = descriptor->options().deprecated() - ? " PROTOBUF_DEPRECATED" : ""; - -} - -FieldGenerator::~FieldGenerator() {} - -void FieldGenerator:: -GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { - // Reaching here indicates a bug. Cases are: - // - This FieldGenerator should support packing, but this method should be - // overridden. - // - This FieldGenerator doesn't support packing, and this method should - // never have been called. - GOOGLE_LOG(FATAL) << "GenerateMergeFromCodedStreamWithPacking() " - << "called on field generator that does not support packing."; - -} - -FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor) - : descriptor_(descriptor), - field_generators_( - new scoped_ptr[descriptor->field_count()]) { - // Construct all the FieldGenerators. - for (int i = 0; i < descriptor->field_count(); i++) { - field_generators_[i].reset(MakeGenerator(descriptor->field(i))); - } -} - -FieldGenerator* FieldGeneratorMap::MakeGenerator(const FieldDescriptor* field) { - if (field->is_repeated()) { - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_MESSAGE: - return new RepeatedMessageFieldGenerator(field); - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // RepeatedStringFieldGenerator handles unknown ctypes. - case FieldOptions::STRING: - return new RepeatedStringFieldGenerator(field); - } - case FieldDescriptor::CPPTYPE_ENUM: - return new RepeatedEnumFieldGenerator(field); - default: - return new RepeatedPrimitiveFieldGenerator(field); - } - } else { - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_MESSAGE: - return new MessageFieldGenerator(field); - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // StringFieldGenerator handles unknown ctypes. - case FieldOptions::STRING: - return new StringFieldGenerator(field); - } - case FieldDescriptor::CPPTYPE_ENUM: - return new EnumFieldGenerator(field); - default: - return new PrimitiveFieldGenerator(field); - } - } -} - -FieldGeneratorMap::~FieldGeneratorMap() {} - -const FieldGenerator& FieldGeneratorMap::get( - const FieldDescriptor* field) const { - GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); - return *field_generators_[field->index()]; -} - - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h deleted file mode 100644 index c303a337..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h +++ /dev/null @@ -1,167 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ - -#include -#include - -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -// Helper function: set variables in the map that are the same for all -// field code generators. -// ['name', 'index', 'number', 'classname', 'declared_type', 'tag_size', -// 'deprecation']. -void SetCommonFieldVariables(const FieldDescriptor* descriptor, - map* variables); - -class FieldGenerator { - public: - FieldGenerator() {} - virtual ~FieldGenerator(); - - // Generate lines of code declaring members fields of the message class - // needed to represent this field. These are placed inside the message - // class. - virtual void GeneratePrivateMembers(io::Printer* printer) const = 0; - - // Generate prototypes for all of the accessor functions related to this - // field. These are placed inside the class definition. - virtual void GenerateAccessorDeclarations(io::Printer* printer) const = 0; - - // Generate inline definitions of accessor functions for this field. - // These are placed inside the header after all class definitions. - virtual void GenerateInlineAccessorDefinitions( - io::Printer* printer) const = 0; - - // Generate definitions of accessors that aren't inlined. These are - // placed somewhere in the .cc file. - // Most field types don't need this, so the default implementation is empty. - virtual void GenerateNonInlineAccessorDefinitions( - io::Printer* printer) const {} - - // Generate lines of code (statements, not declarations) which clear the - // field. This is used to define the clear_$name$() method as well as - // the Clear() method for the whole message. - virtual void GenerateClearingCode(io::Printer* printer) const = 0; - - // Generate lines of code (statements, not declarations) which merges the - // contents of the field from the current message to the target message, - // which is stored in the generated code variable "from". - // This is used to fill in the MergeFrom method for the whole message. - // Details of this usage can be found in message.cc under the - // GenerateMergeFrom method. - virtual void GenerateMergingCode(io::Printer* printer) const = 0; - - // Generate lines of code (statements, not declarations) which swaps - // this field and the corresponding field of another message, which - // is stored in the generated code variable "other". This is used to - // define the Swap method. Details of usage can be found in - // message.cc under the GenerateSwap method. - virtual void GenerateSwappingCode(io::Printer* printer) const = 0; - - // Generate initialization code for private members declared by - // GeneratePrivateMembers(). These go into the message class's SharedCtor() - // method, invoked by each of the generated constructors. - virtual void GenerateConstructorCode(io::Printer* printer) const = 0; - - // Generate any code that needs to go in the class's SharedDtor() method, - // invoked by the destructor. - // Most field types don't need this, so the default implementation is empty. - virtual void GenerateDestructorCode(io::Printer* printer) const {} - - // Generate lines to decode this field, which will be placed inside the - // message's MergeFromCodedStream() method. - virtual void GenerateMergeFromCodedStream(io::Printer* printer) const = 0; - - // Generate lines to decode this field from a packed value, which will be - // placed inside the message's MergeFromCodedStream() method. - virtual void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) - const; - - // Generate lines to serialize this field, which are placed within the - // message's SerializeWithCachedSizes() method. - virtual void GenerateSerializeWithCachedSizes(io::Printer* printer) const = 0; - - // Generate lines to serialize this field directly to the array "target", - // which are placed within the message's SerializeWithCachedSizesToArray() - // method. This must also advance "target" past the written bytes. - virtual void GenerateSerializeWithCachedSizesToArray( - io::Printer* printer) const = 0; - - // Generate lines to compute the serialized size of this field, which - // are placed in the message's ByteSize() method. - virtual void GenerateByteSize(io::Printer* printer) const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); -}; - -// Convenience class which constructs FieldGenerators for a Descriptor. -class FieldGeneratorMap { - public: - explicit FieldGeneratorMap(const Descriptor* descriptor); - ~FieldGeneratorMap(); - - const FieldGenerator& get(const FieldDescriptor* field) const; - - private: - const Descriptor* descriptor_; - scoped_array > field_generators_; - - static FieldGenerator* MakeGenerator(const FieldDescriptor* field); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); -}; - - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc deleted file mode 100644 index 312ebc86..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc +++ /dev/null @@ -1,611 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -// =================================================================== - -FileGenerator::FileGenerator(const FileDescriptor* file, - const string& dllexport_decl) - : file_(file), - message_generators_( - new scoped_ptr[file->message_type_count()]), - enum_generators_( - new scoped_ptr[file->enum_type_count()]), - service_generators_( - new scoped_ptr[file->service_count()]), - extension_generators_( - new scoped_ptr[file->extension_count()]), - dllexport_decl_(dllexport_decl) { - - for (int i = 0; i < file->message_type_count(); i++) { - message_generators_[i].reset( - new MessageGenerator(file->message_type(i), dllexport_decl)); - } - - for (int i = 0; i < file->enum_type_count(); i++) { - enum_generators_[i].reset( - new EnumGenerator(file->enum_type(i), dllexport_decl)); - } - - for (int i = 0; i < file->service_count(); i++) { - service_generators_[i].reset( - new ServiceGenerator(file->service(i), dllexport_decl)); - } - - for (int i = 0; i < file->extension_count(); i++) { - extension_generators_[i].reset( - new ExtensionGenerator(file->extension(i), dllexport_decl)); - } - - SplitStringUsing(file_->package(), ".", &package_parts_); -} - -FileGenerator::~FileGenerator() {} - -void FileGenerator::GenerateHeader(io::Printer* printer) { - string filename_identifier = FilenameIdentifier(file_->name()); - - // Generate top of header. - printer->Print( - "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" - "// source: $filename$\n" - "\n" - "#ifndef PROTOBUF_$filename_identifier$__INCLUDED\n" - "#define PROTOBUF_$filename_identifier$__INCLUDED\n" - "\n" - "#include \n" - "\n", - "filename", file_->name(), - "filename_identifier", filename_identifier); - - printer->Print( - "#include \n" - "\n"); - - // Verify the protobuf library header version is compatible with the protoc - // version before going any further. - printer->Print( - "#if GOOGLE_PROTOBUF_VERSION < $min_header_version$\n" - "#error This file was generated by a newer version of protoc which is\n" - "#error incompatible with your Protocol Buffer headers. Please update\n" - "#error your headers.\n" - "#endif\n" - "#if $protoc_version$ < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION\n" - "#error This file was generated by an older version of protoc which is\n" - "#error incompatible with your Protocol Buffer headers. Please\n" - "#error regenerate this file with a newer version of protoc.\n" - "#endif\n" - "\n", - "min_header_version", - SimpleItoa(protobuf::internal::kMinHeaderVersionForProtoc), - "protoc_version", SimpleItoa(GOOGLE_PROTOBUF_VERSION)); - - // OK, it's now safe to #include other files. - printer->Print( - "#include \n" - "#include \n" - "#include \n"); - - if (HasDescriptorMethods(file_)) { - printer->Print( - "#include \n"); - } - - if (HasGenericServices(file_)) { - printer->Print( - "#include \n"); - } - - - for (int i = 0; i < file_->dependency_count(); i++) { - printer->Print( - "#include \"$dependency$.pb.h\"\n", - "dependency", StripProto(file_->dependency(i)->name())); - } - - printer->Print( - "// @@protoc_insertion_point(includes)\n"); - - // Open namespace. - GenerateNamespaceOpeners(printer); - - // Forward-declare the AddDescriptors, AssignDescriptors, and ShutdownFile - // functions, so that we can declare them to be friends of each class. - printer->Print( - "\n" - "// Internal implementation detail -- do not call these.\n" - "void $dllexport_decl$ $adddescriptorsname$();\n", - "adddescriptorsname", GlobalAddDescriptorsName(file_->name()), - "dllexport_decl", dllexport_decl_); - - printer->Print( - // Note that we don't put dllexport_decl on these because they are only - // called by the .pb.cc file in which they are defined. - "void $assigndescriptorsname$();\n" - "void $shutdownfilename$();\n" - "\n", - "assigndescriptorsname", GlobalAssignDescriptorsName(file_->name()), - "shutdownfilename", GlobalShutdownFileName(file_->name())); - - // Generate forward declarations of classes. - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateForwardDeclaration(printer); - } - - printer->Print("\n"); - - // Generate enum definitions. - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateEnumDefinitions(printer); - } - for (int i = 0; i < file_->enum_type_count(); i++) { - enum_generators_[i]->GenerateDefinition(printer); - } - - printer->Print(kThickSeparator); - printer->Print("\n"); - - // Generate class definitions. - for (int i = 0; i < file_->message_type_count(); i++) { - if (i > 0) { - printer->Print("\n"); - printer->Print(kThinSeparator); - printer->Print("\n"); - } - message_generators_[i]->GenerateClassDefinition(printer); - } - - printer->Print("\n"); - printer->Print(kThickSeparator); - printer->Print("\n"); - - if (HasGenericServices(file_)) { - // Generate service definitions. - for (int i = 0; i < file_->service_count(); i++) { - if (i > 0) { - printer->Print("\n"); - printer->Print(kThinSeparator); - printer->Print("\n"); - } - service_generators_[i]->GenerateDeclarations(printer); - } - - printer->Print("\n"); - printer->Print(kThickSeparator); - printer->Print("\n"); - } - - // Declare extension identifiers. - for (int i = 0; i < file_->extension_count(); i++) { - extension_generators_[i]->GenerateDeclaration(printer); - } - - printer->Print("\n"); - printer->Print(kThickSeparator); - printer->Print("\n"); - - // Generate class inline methods. - for (int i = 0; i < file_->message_type_count(); i++) { - if (i > 0) { - printer->Print(kThinSeparator); - printer->Print("\n"); - } - message_generators_[i]->GenerateInlineMethods(printer); - } - - printer->Print( - "\n" - "// @@protoc_insertion_point(namespace_scope)\n"); - - // Close up namespace. - GenerateNamespaceClosers(printer); - - // Emit GetEnumDescriptor specializations into google::protobuf namespace: - if (HasDescriptorMethods(file_)) { - // The SWIG conditional is to avoid a null-pointer dereference - // (bug 1984964) in swig-1.3.21 resulting from the following syntax: - // namespace X { void Y(); } - // which appears in GetEnumDescriptor() specializations. - printer->Print( - "\n" - "#ifndef SWIG\n" - "namespace google {\nnamespace protobuf {\n" - "\n"); - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateGetEnumDescriptorSpecializations(printer); - } - for (int i = 0; i < file_->enum_type_count(); i++) { - enum_generators_[i]->GenerateGetEnumDescriptorSpecializations(printer); - } - printer->Print( - "\n" - "} // namespace google\n} // namespace protobuf\n" - "#endif // SWIG\n"); - } - - printer->Print( - "\n" - "// @@protoc_insertion_point(global_scope)\n" - "\n"); - - printer->Print( - "#endif // PROTOBUF_$filename_identifier$__INCLUDED\n", - "filename_identifier", filename_identifier); -} - -void FileGenerator::GenerateSource(io::Printer* printer) { - printer->Print( - "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" - "\n" - - // The generated code calls accessors that might be deprecated. We don't - // want the compiler to warn in generated code. - "#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION\n" - "#include \"$basename$.pb.h\"\n" - "\n" - "#include \n" // for swap() - "\n" - "#include \n" - "#include \n" - "#include \n", - "basename", StripProto(file_->name())); - - if (HasDescriptorMethods(file_)) { - printer->Print( - "#include \n" - "#include \n" - "#include \n"); - } - - printer->Print( - "// @@protoc_insertion_point(includes)\n"); - - GenerateNamespaceOpeners(printer); - - if (HasDescriptorMethods(file_)) { - printer->Print( - "\n" - "namespace {\n" - "\n"); - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateDescriptorDeclarations(printer); - } - for (int i = 0; i < file_->enum_type_count(); i++) { - printer->Print( - "const ::google::protobuf::EnumDescriptor* $name$_descriptor_ = NULL;\n", - "name", ClassName(file_->enum_type(i), false)); - } - - if (HasGenericServices(file_)) { - for (int i = 0; i < file_->service_count(); i++) { - printer->Print( - "const ::google::protobuf::ServiceDescriptor* $name$_descriptor_ = NULL;\n", - "name", file_->service(i)->name()); - } - } - - printer->Print( - "\n" - "} // namespace\n" - "\n"); - } - - // Define our externally-visible BuildDescriptors() function. (For the lite - // library, all this does is initialize default instances.) - GenerateBuildDescriptors(printer); - - // Generate enums. - for (int i = 0; i < file_->enum_type_count(); i++) { - enum_generators_[i]->GenerateMethods(printer); - } - - // Generate classes. - for (int i = 0; i < file_->message_type_count(); i++) { - printer->Print("\n"); - printer->Print(kThickSeparator); - printer->Print("\n"); - message_generators_[i]->GenerateClassMethods(printer); - } - - if (HasGenericServices(file_)) { - // Generate services. - for (int i = 0; i < file_->service_count(); i++) { - if (i == 0) printer->Print("\n"); - printer->Print(kThickSeparator); - printer->Print("\n"); - service_generators_[i]->GenerateImplementation(printer); - } - } - - // Define extensions. - for (int i = 0; i < file_->extension_count(); i++) { - extension_generators_[i]->GenerateDefinition(printer); - } - - printer->Print( - "\n" - "// @@protoc_insertion_point(namespace_scope)\n"); - - GenerateNamespaceClosers(printer); - - printer->Print( - "\n" - "// @@protoc_insertion_point(global_scope)\n"); -} - -void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) { - // AddDescriptors() is a file-level procedure which adds the encoded - // FileDescriptorProto for this .proto file to the global DescriptorPool - // for generated files (DescriptorPool::generated_pool()). It always runs - // at static initialization time, so all files will be registered before - // main() starts. This procedure also constructs default instances and - // registers extensions. - // - // Its sibling, AssignDescriptors(), actually pulls the compiled - // FileDescriptor from the DescriptorPool and uses it to populate all of - // the global variables which store pointers to the descriptor objects. - // It also constructs the reflection objects. It is called the first time - // anyone calls descriptor() or GetReflection() on one of the types defined - // in the file. - - // In optimize_for = LITE_RUNTIME mode, we don't generate AssignDescriptors() - // and we only use AddDescriptors() to allocate default instances. - if (HasDescriptorMethods(file_)) { - printer->Print( - "\n" - "void $assigndescriptorsname$() {\n", - "assigndescriptorsname", GlobalAssignDescriptorsName(file_->name())); - printer->Indent(); - - // Make sure the file has found its way into the pool. If a descriptor - // is requested *during* static init then AddDescriptors() may not have - // been called yet, so we call it manually. Note that it's fine if - // AddDescriptors() is called multiple times. - printer->Print( - "$adddescriptorsname$();\n", - "adddescriptorsname", GlobalAddDescriptorsName(file_->name())); - - // Get the file's descriptor from the pool. - printer->Print( - "const ::google::protobuf::FileDescriptor* file =\n" - " ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(\n" - " \"$filename$\");\n" - // Note that this GOOGLE_CHECK is necessary to prevent a warning about "file" - // being unused when compiling an empty .proto file. - "GOOGLE_CHECK(file != NULL);\n", - "filename", file_->name()); - - // Go through all the stuff defined in this file and generated code to - // assign the global descriptor pointers based on the file descriptor. - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateDescriptorInitializer(printer, i); - } - for (int i = 0; i < file_->enum_type_count(); i++) { - enum_generators_[i]->GenerateDescriptorInitializer(printer, i); - } - if (HasGenericServices(file_)) { - for (int i = 0; i < file_->service_count(); i++) { - service_generators_[i]->GenerateDescriptorInitializer(printer, i); - } - } - - printer->Outdent(); - printer->Print( - "}\n" - "\n"); - - // --------------------------------------------------------------- - - // protobuf_AssignDescriptorsOnce(): The first time it is called, calls - // AssignDescriptors(). All later times, waits for the first call to - // complete and then returns. - printer->Print( - "namespace {\n" - "\n" - "GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);\n" - "inline void protobuf_AssignDescriptorsOnce() {\n" - " ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,\n" - " &$assigndescriptorsname$);\n" - "}\n" - "\n", - "assigndescriptorsname", GlobalAssignDescriptorsName(file_->name())); - - // protobuf_RegisterTypes(): Calls - // MessageFactory::InternalRegisterGeneratedType() for each message type. - printer->Print( - "void protobuf_RegisterTypes(const ::std::string&) {\n" - " protobuf_AssignDescriptorsOnce();\n"); - printer->Indent(); - - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateTypeRegistrations(printer); - } - - printer->Outdent(); - printer->Print( - "}\n" - "\n" - "} // namespace\n"); - } - - // ----------------------------------------------------------------- - - // ShutdownFile(): Deletes descriptors, default instances, etc. on shutdown. - printer->Print( - "\n" - "void $shutdownfilename$() {\n", - "shutdownfilename", GlobalShutdownFileName(file_->name())); - printer->Indent(); - - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateShutdownCode(printer); - } - - printer->Outdent(); - printer->Print( - "}\n"); - - // ----------------------------------------------------------------- - - // Now generate the AddDescriptors() function. - printer->Print( - "\n" - "void $adddescriptorsname$() {\n" - // We don't need any special synchronization here because this code is - // called at static init time before any threads exist. - " static bool already_here = false;\n" - " if (already_here) return;\n" - " already_here = true;\n" - " GOOGLE_PROTOBUF_VERIFY_VERSION;\n" - "\n", - "adddescriptorsname", GlobalAddDescriptorsName(file_->name())); - printer->Indent(); - - // Call the AddDescriptors() methods for all of our dependencies, to make - // sure they get added first. - for (int i = 0; i < file_->dependency_count(); i++) { - const FileDescriptor* dependency = file_->dependency(i); - // Print the namespace prefix for the dependency. - vector dependency_package_parts; - SplitStringUsing(dependency->package(), ".", &dependency_package_parts); - printer->Print("::"); - for (int i = 0; i < dependency_package_parts.size(); i++) { - printer->Print("$name$::", - "name", dependency_package_parts[i]); - } - // Call its AddDescriptors function. - printer->Print( - "$name$();\n", - "name", GlobalAddDescriptorsName(dependency->name())); - } - - if (HasDescriptorMethods(file_)) { - // Embed the descriptor. We simply serialize the entire FileDescriptorProto - // and embed it as a string literal, which is parsed and built into real - // descriptors at initialization time. - FileDescriptorProto file_proto; - file_->CopyTo(&file_proto); - string file_data; - file_proto.SerializeToString(&file_data); - - printer->Print( - "::google::protobuf::DescriptorPool::InternalAddGeneratedFile("); - - // Only write 40 bytes per line. - static const int kBytesPerLine = 40; - for (int i = 0; i < file_data.size(); i += kBytesPerLine) { - printer->Print("\n \"$data$\"", - "data", EscapeTrigraphs(CEscape(file_data.substr(i, kBytesPerLine)))); - } - printer->Print( - ", $size$);\n", - "size", SimpleItoa(file_data.size())); - - // Call MessageFactory::InternalRegisterGeneratedFile(). - printer->Print( - "::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(\n" - " \"$filename$\", &protobuf_RegisterTypes);\n", - "filename", file_->name()); - } - - // Allocate and initialize default instances. This can't be done lazily - // since default instances are returned by simple accessors and are used with - // extensions. Speaking of which, we also register extensions at this time. - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateDefaultInstanceAllocator(printer); - } - for (int i = 0; i < file_->extension_count(); i++) { - extension_generators_[i]->GenerateRegistration(printer); - } - for (int i = 0; i < file_->message_type_count(); i++) { - message_generators_[i]->GenerateDefaultInstanceInitializer(printer); - } - - printer->Print( - "::google::protobuf::internal::OnShutdown(&$shutdownfilename$);\n", - "shutdownfilename", GlobalShutdownFileName(file_->name())); - - printer->Outdent(); - - printer->Print( - "}\n" - "\n" - "// Force AddDescriptors() to be called at static initialization time.\n" - "struct StaticDescriptorInitializer_$filename$ {\n" - " StaticDescriptorInitializer_$filename$() {\n" - " $adddescriptorsname$();\n" - " }\n" - "} static_descriptor_initializer_$filename$_;\n" - "\n", - "adddescriptorsname", GlobalAddDescriptorsName(file_->name()), - "filename", FilenameIdentifier(file_->name())); -} - -void FileGenerator::GenerateNamespaceOpeners(io::Printer* printer) { - if (package_parts_.size() > 0) printer->Print("\n"); - - for (int i = 0; i < package_parts_.size(); i++) { - printer->Print("namespace $part$ {\n", - "part", package_parts_[i]); - } -} - -void FileGenerator::GenerateNamespaceClosers(io::Printer* printer) { - if (package_parts_.size() > 0) printer->Print("\n"); - - for (int i = package_parts_.size() - 1; i >= 0; i--) { - printer->Print("} // namespace $part$\n", - "part", package_parts_[i]); - } -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h deleted file mode 100644 index b4e01285..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h +++ /dev/null @@ -1,98 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_FILE_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_FILE_H__ - -#include -#include -#include -#include - -namespace google { -namespace protobuf { - class FileDescriptor; // descriptor.h - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -class EnumGenerator; // enum.h -class MessageGenerator; // message.h -class ServiceGenerator; // service.h -class ExtensionGenerator; // extension.h - -class FileGenerator { - public: - // See generator.cc for the meaning of dllexport_decl. - explicit FileGenerator(const FileDescriptor* file, - const string& dllexport_decl); - ~FileGenerator(); - - void GenerateHeader(io::Printer* printer); - void GenerateSource(io::Printer* printer); - - private: - // Generate the BuildDescriptors() procedure, which builds all descriptors - // for types defined in the file. - void GenerateBuildDescriptors(io::Printer* printer); - - void GenerateNamespaceOpeners(io::Printer* printer); - void GenerateNamespaceClosers(io::Printer* printer); - - const FileDescriptor* file_; - - scoped_array > message_generators_; - scoped_array > enum_generators_; - scoped_array > service_generators_; - scoped_array > extension_generators_; - - // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}. - vector package_parts_; - - string dllexport_decl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_FILE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc deleted file mode 100644 index bb84e2ab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc +++ /dev/null @@ -1,122 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -CppGenerator::CppGenerator() {} -CppGenerator::~CppGenerator() {} - -bool CppGenerator::Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const { - vector > options; - ParseGeneratorParameter(parameter, &options); - - // ----------------------------------------------------------------- - // parse generator options - - // TODO(kenton): If we ever have more options, we may want to create a - // class that encapsulates them which we can pass down to all the - // generator classes. Currently we pass dllexport_decl down to all of - // them via the constructors, but we don't want to have to add another - // constructor parameter for every option. - - // If the dllexport_decl option is passed to the compiler, we need to write - // it in front of every symbol that should be exported if this .proto is - // compiled into a Windows DLL. E.g., if the user invokes the protocol - // compiler as: - // protoc --cpp_out=dllexport_decl=FOO_EXPORT:outdir foo.proto - // then we'll define classes like this: - // class FOO_EXPORT Foo { - // ... - // } - // FOO_EXPORT is a macro which should expand to __declspec(dllexport) or - // __declspec(dllimport) depending on what is being compiled. - string dllexport_decl; - - for (int i = 0; i < options.size(); i++) { - if (options[i].first == "dllexport_decl") { - dllexport_decl = options[i].second; - } else { - *error = "Unknown generator option: " + options[i].first; - return false; - } - } - - // ----------------------------------------------------------------- - - - string basename = StripProto(file->name()); - basename.append(".pb"); - - FileGenerator file_generator(file, dllexport_decl); - - // Generate header. - { - scoped_ptr output( - generator_context->Open(basename + ".h")); - io::Printer printer(output.get(), '$'); - file_generator.GenerateHeader(&printer); - } - - // Generate cc file. - { - scoped_ptr output( - generator_context->Open(basename + ".cc")); - io::Printer printer(output.get(), '$'); - file_generator.GenerateSource(&printer); - } - - return true; -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h deleted file mode 100644 index a90e84d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h +++ /dev/null @@ -1,72 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Generates C++ code for a given .proto file. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -// CodeGenerator implementation which generates a C++ source file and -// header. If you create your own protocol compiler binary and you want -// it to support C++ output, you can do so by registering an instance of this -// CodeGenerator with the CommandLineInterface in your main() function. -class LIBPROTOC_EXPORT CppGenerator : public CodeGenerator { - public: - CppGenerator(); - ~CppGenerator(); - - // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CppGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc deleted file mode 100644 index 25b05a85..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc +++ /dev/null @@ -1,347 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -string DotsToUnderscores(const string& name) { - return StringReplace(name, ".", "_", true); -} - -string DotsToColons(const string& name) { - return StringReplace(name, ".", "::", true); -} - -const char* const kKeywordList[] = { - "and", "and_eq", "asm", "auto", "bitand", "bitor", "bool", "break", "case", - "catch", "char", "class", "compl", "const", "const_cast", "continue", - "default", "delete", "do", "double", "dynamic_cast", "else", "enum", - "explicit", "extern", "false", "float", "for", "friend", "goto", "if", - "inline", "int", "long", "mutable", "namespace", "new", "not", "not_eq", - "operator", "or", "or_eq", "private", "protected", "public", "register", - "reinterpret_cast", "return", "short", "signed", "sizeof", "static", - "static_cast", "struct", "switch", "template", "this", "throw", "true", "try", - "typedef", "typeid", "typename", "union", "unsigned", "using", "virtual", - "void", "volatile", "wchar_t", "while", "xor", "xor_eq" -}; - -hash_set MakeKeywordsMap() { - hash_set result; - for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) { - result.insert(kKeywordList[i]); - } - return result; -} - -hash_set kKeywords = MakeKeywordsMap(); - -string UnderscoresToCamelCase(const string& input, bool cap_next_letter) { - string result; - // Note: I distrust ctype.h due to locales. - for (int i = 0; i < input.size(); i++) { - if ('a' <= input[i] && input[i] <= 'z') { - if (cap_next_letter) { - result += input[i] + ('A' - 'a'); - } else { - result += input[i]; - } - cap_next_letter = false; - } else if ('A' <= input[i] && input[i] <= 'Z') { - // Capital letters are left as-is. - result += input[i]; - cap_next_letter = false; - } else if ('0' <= input[i] && input[i] <= '9') { - result += input[i]; - cap_next_letter = true; - } else { - cap_next_letter = true; - } - } - return result; -} - -} // namespace - -const char kThickSeparator[] = - "// ===================================================================\n"; -const char kThinSeparator[] = - "// -------------------------------------------------------------------\n"; - -string ClassName(const Descriptor* descriptor, bool qualified) { - - // Find "outer", the descriptor of the top-level message in which - // "descriptor" is embedded. - const Descriptor* outer = descriptor; - while (outer->containing_type() != NULL) outer = outer->containing_type(); - - const string& outer_name = outer->full_name(); - string inner_name = descriptor->full_name().substr(outer_name.size()); - - if (qualified) { - return "::" + DotsToColons(outer_name) + DotsToUnderscores(inner_name); - } else { - return outer->name() + DotsToUnderscores(inner_name); - } -} - -string ClassName(const EnumDescriptor* enum_descriptor, bool qualified) { - if (enum_descriptor->containing_type() == NULL) { - if (qualified) { - return DotsToColons(enum_descriptor->full_name()); - } else { - return enum_descriptor->name(); - } - } else { - string result = ClassName(enum_descriptor->containing_type(), qualified); - result += '_'; - result += enum_descriptor->name(); - return result; - } -} - - -string SuperClassName(const Descriptor* descriptor) { - return HasDescriptorMethods(descriptor->file()) ? - "::google::protobuf::Message" : "::google::protobuf::MessageLite"; -} - -string FieldName(const FieldDescriptor* field) { - string result = field->name(); - LowerString(&result); - if (kKeywords.count(result) > 0) { - result.append("_"); - } - return result; -} - -string FieldConstantName(const FieldDescriptor *field) { - string field_name = UnderscoresToCamelCase(field->name(), true); - string result = "k" + field_name + "FieldNumber"; - - if (!field->is_extension() && - field->containing_type()->FindFieldByCamelcaseName( - field->camelcase_name()) != field) { - // This field's camelcase name is not unique. As a hack, add the field - // number to the constant name. This makes the constant rather useless, - // but what can we do? - result += "_" + SimpleItoa(field->number()); - } - - return result; -} - -string FieldMessageTypeName(const FieldDescriptor* field) { - // Note: The Google-internal version of Protocol Buffers uses this function - // as a hook point for hacks to support legacy code. - return ClassName(field->message_type(), true); -} - -string StripProto(const string& filename) { - if (HasSuffixString(filename, ".protodevel")) { - return StripSuffixString(filename, ".protodevel"); - } else { - return StripSuffixString(filename, ".proto"); - } -} - -const char* PrimitiveTypeName(FieldDescriptor::CppType type) { - switch (type) { - case FieldDescriptor::CPPTYPE_INT32 : return "::google::protobuf::int32"; - case FieldDescriptor::CPPTYPE_INT64 : return "::google::protobuf::int64"; - case FieldDescriptor::CPPTYPE_UINT32 : return "::google::protobuf::uint32"; - case FieldDescriptor::CPPTYPE_UINT64 : return "::google::protobuf::uint64"; - case FieldDescriptor::CPPTYPE_DOUBLE : return "double"; - case FieldDescriptor::CPPTYPE_FLOAT : return "float"; - case FieldDescriptor::CPPTYPE_BOOL : return "bool"; - case FieldDescriptor::CPPTYPE_ENUM : return "int"; - case FieldDescriptor::CPPTYPE_STRING : return "::std::string"; - case FieldDescriptor::CPPTYPE_MESSAGE: return NULL; - - // No default because we want the compiler to complain if any new - // CppTypes are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; -} - -const char* DeclaredTypeMethodName(FieldDescriptor::Type type) { - switch (type) { - case FieldDescriptor::TYPE_INT32 : return "Int32"; - case FieldDescriptor::TYPE_INT64 : return "Int64"; - case FieldDescriptor::TYPE_UINT32 : return "UInt32"; - case FieldDescriptor::TYPE_UINT64 : return "UInt64"; - case FieldDescriptor::TYPE_SINT32 : return "SInt32"; - case FieldDescriptor::TYPE_SINT64 : return "SInt64"; - case FieldDescriptor::TYPE_FIXED32 : return "Fixed32"; - case FieldDescriptor::TYPE_FIXED64 : return "Fixed64"; - case FieldDescriptor::TYPE_SFIXED32: return "SFixed32"; - case FieldDescriptor::TYPE_SFIXED64: return "SFixed64"; - case FieldDescriptor::TYPE_FLOAT : return "Float"; - case FieldDescriptor::TYPE_DOUBLE : return "Double"; - - case FieldDescriptor::TYPE_BOOL : return "Bool"; - case FieldDescriptor::TYPE_ENUM : return "Enum"; - - case FieldDescriptor::TYPE_STRING : return "String"; - case FieldDescriptor::TYPE_BYTES : return "Bytes"; - case FieldDescriptor::TYPE_GROUP : return "Group"; - case FieldDescriptor::TYPE_MESSAGE : return "Message"; - - // No default because we want the compiler to complain if any new - // types are added. - } - GOOGLE_LOG(FATAL) << "Can't get here."; - return ""; -} - -string DefaultValue(const FieldDescriptor* field) { - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - return SimpleItoa(field->default_value_int32()); - case FieldDescriptor::CPPTYPE_UINT32: - return SimpleItoa(field->default_value_uint32()) + "u"; - case FieldDescriptor::CPPTYPE_INT64: - return "GOOGLE_LONGLONG(" + SimpleItoa(field->default_value_int64()) + ")"; - case FieldDescriptor::CPPTYPE_UINT64: - return "GOOGLE_ULONGLONG(" + SimpleItoa(field->default_value_uint64())+ ")"; - case FieldDescriptor::CPPTYPE_DOUBLE: { - double value = field->default_value_double(); - if (value == numeric_limits::infinity()) { - return "::google::protobuf::internal::Infinity()"; - } else if (value == -numeric_limits::infinity()) { - return "-::google::protobuf::internal::Infinity()"; - } else if (value != value) { - return "::google::protobuf::internal::NaN()"; - } else { - return SimpleDtoa(value); - } - } - case FieldDescriptor::CPPTYPE_FLOAT: - { - float value = field->default_value_float(); - if (value == numeric_limits::infinity()) { - return "static_cast(::google::protobuf::internal::Infinity())"; - } else if (value == -numeric_limits::infinity()) { - return "static_cast(-::google::protobuf::internal::Infinity())"; - } else if (value != value) { - return "static_cast(::google::protobuf::internal::NaN())"; - } else { - string float_value = SimpleFtoa(value); - // If floating point value contains a period (.) or an exponent - // (either E or e), then append suffix 'f' to make it a float - // literal. - if (float_value.find_first_of(".eE") != string::npos) { - float_value.push_back('f'); - } - return float_value; - } - } - case FieldDescriptor::CPPTYPE_BOOL: - return field->default_value_bool() ? "true" : "false"; - case FieldDescriptor::CPPTYPE_ENUM: - // Lazy: Generate a static_cast because we don't have a helper function - // that constructs the full name of an enum value. - return strings::Substitute( - "static_cast< $0 >($1)", - ClassName(field->enum_type(), true), - field->default_value_enum()->number()); - case FieldDescriptor::CPPTYPE_STRING: - return "\"" + EscapeTrigraphs(CEscape(field->default_value_string())) + - "\""; - case FieldDescriptor::CPPTYPE_MESSAGE: - return FieldMessageTypeName(field) + "::default_instance()"; - } - // Can't actually get here; make compiler happy. (We could add a default - // case above but then we wouldn't get the nice compiler warning when a - // new type is added.) - GOOGLE_LOG(FATAL) << "Can't get here."; - return ""; -} - -// Convert a file name into a valid identifier. -string FilenameIdentifier(const string& filename) { - string result; - for (int i = 0; i < filename.size(); i++) { - if (ascii_isalnum(filename[i])) { - result.push_back(filename[i]); - } else { - // Not alphanumeric. To avoid any possibility of name conflicts we - // use the hex code for the character. - result.push_back('_'); - char buffer[kFastToBufferSize]; - result.append(FastHexToBuffer(static_cast(filename[i]), buffer)); - } - } - return result; -} - -// Return the name of the AddDescriptors() function for a given file. -string GlobalAddDescriptorsName(const string& filename) { - return "protobuf_AddDesc_" + FilenameIdentifier(filename); -} - -// Return the name of the AssignDescriptors() function for a given file. -string GlobalAssignDescriptorsName(const string& filename) { - return "protobuf_AssignDesc_" + FilenameIdentifier(filename); -} - -// Return the name of the ShutdownFile() function for a given file. -string GlobalShutdownFileName(const string& filename) { - return "protobuf_ShutdownFile_" + FilenameIdentifier(filename); -} - -// Escape C++ trigraphs by escaping question marks to \? -string EscapeTrigraphs(const string& to_escape) { - return StringReplace(to_escape, "?", "\\?", true); -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h deleted file mode 100644 index b13d53be..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -// Commonly-used separator comments. Thick is a line of '=', thin is a line -// of '-'. -extern const char kThickSeparator[]; -extern const char kThinSeparator[]; - -// Returns the non-nested type name for the given type. If "qualified" is -// true, prefix the type with the full namespace. For example, if you had: -// package foo.bar; -// message Baz { message Qux {} } -// Then the qualified ClassName for Qux would be: -// ::foo::bar::Baz_Qux -// While the non-qualified version would be: -// Baz_Qux -string ClassName(const Descriptor* descriptor, bool qualified); -string ClassName(const EnumDescriptor* enum_descriptor, bool qualified); - -string SuperClassName(const Descriptor* descriptor); - -// Get the (unqualified) name that should be used for this field in C++ code. -// The name is coerced to lower-case to emulate proto1 behavior. People -// should be using lowercase-with-underscores style for proto field names -// anyway, so normally this just returns field->name(). -string FieldName(const FieldDescriptor* field); - -// Get the unqualified name that should be used for a field's field -// number constant. -string FieldConstantName(const FieldDescriptor *field); - -// Returns the scope where the field was defined (for extensions, this is -// different from the message type to which the field applies). -inline const Descriptor* FieldScope(const FieldDescriptor* field) { - return field->is_extension() ? - field->extension_scope() : field->containing_type(); -} - -// Returns the fully-qualified type name field->message_type(). Usually this -// is just ClassName(field->message_type(), true); -string FieldMessageTypeName(const FieldDescriptor* field); - -// Strips ".proto" or ".protodevel" from the end of a filename. -string StripProto(const string& filename); - -// Get the C++ type name for a primitive type (e.g. "double", "::google::protobuf::int32", etc.). -// Note: non-built-in type names will be qualified, meaning they will start -// with a ::. If you are using the type as a template parameter, you will -// need to insure there is a space between the < and the ::, because the -// ridiculous C++ standard defines "<:" to be a synonym for "[". -const char* PrimitiveTypeName(FieldDescriptor::CppType type); - -// Get the declared type name in CamelCase format, as is used e.g. for the -// methods of WireFormat. For example, TYPE_INT32 becomes "Int32". -const char* DeclaredTypeMethodName(FieldDescriptor::Type type); - -// Get code that evaluates to the field's default value. -string DefaultValue(const FieldDescriptor* field); - -// Convert a file name into a valid identifier. -string FilenameIdentifier(const string& filename); - -// Return the name of the AddDescriptors() function for a given file. -string GlobalAddDescriptorsName(const string& filename); - -// Return the name of the AssignDescriptors() function for a given file. -string GlobalAssignDescriptorsName(const string& filename); - -// Return the name of the ShutdownFile() function for a given file. -string GlobalShutdownFileName(const string& filename); - -// Escape C++ trigraphs by escaping question marks to \? -string EscapeTrigraphs(const string& to_escape); - -// Do message classes in this file keep track of unknown fields? -inline bool HasUnknownFields(const FileDescriptor *file) { - return file->options().optimize_for() != FileOptions::LITE_RUNTIME; -} - -// Does this file have generated parsing, serialization, and other -// standard methods for which reflection-based fallback implementations exist? -inline bool HasGeneratedMethods(const FileDescriptor *file) { - return file->options().optimize_for() != FileOptions::CODE_SIZE; -} - -// Do message classes in this file have descriptor and refelction methods? -inline bool HasDescriptorMethods(const FileDescriptor *file) { - return file->options().optimize_for() != FileOptions::LITE_RUNTIME; -} - -// Should we generate generic services for this file? -inline bool HasGenericServices(const FileDescriptor *file) { - return file->service_count() > 0 && - file->options().optimize_for() != FileOptions::LITE_RUNTIME && - file->options().cc_generic_services(); -} - -// Should string fields in this file verify that their contents are UTF-8? -inline bool HasUtf8Verification(const FileDescriptor* file) { - return file->options().optimize_for() != FileOptions::LITE_RUNTIME; -} - -// Should we generate a separate, super-optimized code path for serializing to -// flat arrays? We don't do this in Lite mode because we'd rather reduce code -// size. -inline bool HasFastArraySerialization(const FileDescriptor* file) { - return file->options().optimize_for() == FileOptions::SPEED; -} - - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_HELPERS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc deleted file mode 100644 index c4e6fb2c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +++ /dev/null @@ -1,1933 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -using internal::WireFormat; -using internal::WireFormatLite; - -namespace { - -void PrintFieldComment(io::Printer* printer, const FieldDescriptor* field) { - // Print the field's proto-syntax definition as a comment. We don't want to - // print group bodies so we cut off after the first line. - string def = field->DebugString(); - printer->Print("// $def$\n", - "def", def.substr(0, def.find_first_of('\n'))); -} - -struct FieldOrderingByNumber { - inline bool operator()(const FieldDescriptor* a, - const FieldDescriptor* b) const { - return a->number() < b->number(); - } -}; - -const char* kWireTypeNames[] = { - "VARINT", - "FIXED64", - "LENGTH_DELIMITED", - "START_GROUP", - "END_GROUP", - "FIXED32", -}; - -// Sort the fields of the given Descriptor by number into a new[]'d array -// and return it. -const FieldDescriptor** SortFieldsByNumber(const Descriptor* descriptor) { - const FieldDescriptor** fields = - new const FieldDescriptor*[descriptor->field_count()]; - for (int i = 0; i < descriptor->field_count(); i++) { - fields[i] = descriptor->field(i); - } - sort(fields, fields + descriptor->field_count(), - FieldOrderingByNumber()); - return fields; -} - -// Functor for sorting extension ranges by their "start" field number. -struct ExtensionRangeSorter { - bool operator()(const Descriptor::ExtensionRange* left, - const Descriptor::ExtensionRange* right) const { - return left->start < right->start; - } -}; - -// Returns true if the message type has any required fields. If it doesn't, -// we can optimize out calls to its IsInitialized() method. -// -// already_seen is used to avoid checking the same type multiple times -// (and also to protect against recursion). -static bool HasRequiredFields( - const Descriptor* type, - hash_set* already_seen) { - if (already_seen->count(type) > 0) { - // Since the first occurrence of a required field causes the whole - // function to return true, we can assume that if the type is already - // in the cache it didn't have any required fields. - return false; - } - already_seen->insert(type); - - // If the type has extensions, an extension with message type could contain - // required fields, so we have to be conservative and assume such an - // extension exists. - if (type->extension_range_count() > 0) return true; - - for (int i = 0; i < type->field_count(); i++) { - const FieldDescriptor* field = type->field(i); - if (field->is_required()) { - return true; - } - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (HasRequiredFields(field->message_type(), already_seen)) { - return true; - } - } - } - - return false; -} - -static bool HasRequiredFields(const Descriptor* type) { - hash_set already_seen; - return HasRequiredFields(type, &already_seen); -} - -// This returns an estimate of the compiler's alignment for the field. This -// can't guarantee to be correct because the generated code could be compiled on -// different systems with different alignment rules. The estimates below assume -// 64-bit pointers. -int EstimateAlignmentSize(const FieldDescriptor* field) { - if (field == NULL) return 0; - if (field->is_repeated()) return 8; - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_BOOL: - return 1; - - case FieldDescriptor::CPPTYPE_INT32: - case FieldDescriptor::CPPTYPE_UINT32: - case FieldDescriptor::CPPTYPE_ENUM: - case FieldDescriptor::CPPTYPE_FLOAT: - return 4; - - case FieldDescriptor::CPPTYPE_INT64: - case FieldDescriptor::CPPTYPE_UINT64: - case FieldDescriptor::CPPTYPE_DOUBLE: - case FieldDescriptor::CPPTYPE_STRING: - case FieldDescriptor::CPPTYPE_MESSAGE: - return 8; - } - GOOGLE_LOG(FATAL) << "Can't get here."; - return -1; // Make compiler happy. -} - -// FieldGroup is just a helper for OptimizePadding below. It holds a vector of -// fields that are grouped together because they have compatible alignment, and -// a preferred location in the final field ordering. -class FieldGroup { - public: - FieldGroup() - : preferred_location_(0) {} - - // A group with a single field. - FieldGroup(float preferred_location, const FieldDescriptor* field) - : preferred_location_(preferred_location), - fields_(1, field) {} - - // Append the fields in 'other' to this group. - void Append(const FieldGroup& other) { - if (other.fields_.empty()) { - return; - } - // Preferred location is the average among all the fields, so we weight by - // the number of fields on each FieldGroup object. - preferred_location_ = - (preferred_location_ * fields_.size() + - (other.preferred_location_ * other.fields_.size())) / - (fields_.size() + other.fields_.size()); - fields_.insert(fields_.end(), other.fields_.begin(), other.fields_.end()); - } - - void SetPreferredLocation(float location) { preferred_location_ = location; } - const vector& fields() const { return fields_; } - - // FieldGroup objects sort by their preferred location. - bool operator<(const FieldGroup& other) const { - return preferred_location_ < other.preferred_location_; - } - - private: - // "preferred_location_" is an estimate of where this group should go in the - // final list of fields. We compute this by taking the average index of each - // field in this group in the original ordering of fields. This is very - // approximate, but should put this group close to where its member fields - // originally went. - float preferred_location_; - vector fields_; - // We rely on the default copy constructor and operator= so this type can be - // used in a vector. -}; - -// Reorder 'fields' so that if the fields are output into a c++ class in the new -// order, the alignment padding is minimized. We try to do this while keeping -// each field as close as possible to its original position so that we don't -// reduce cache locality much for function that access each field in order. -void OptimizePadding(vector* fields) { - // First divide fields into those that align to 1 byte, 4 bytes or 8 bytes. - vector aligned_to_1, aligned_to_4, aligned_to_8; - for (int i = 0; i < fields->size(); ++i) { - switch (EstimateAlignmentSize((*fields)[i])) { - case 1: aligned_to_1.push_back(FieldGroup(i, (*fields)[i])); break; - case 4: aligned_to_4.push_back(FieldGroup(i, (*fields)[i])); break; - case 8: aligned_to_8.push_back(FieldGroup(i, (*fields)[i])); break; - default: - GOOGLE_LOG(FATAL) << "Unknown alignment size."; - } - } - - // Now group fields aligned to 1 byte into sets of 4, and treat those like a - // single field aligned to 4 bytes. - for (int i = 0; i < aligned_to_1.size(); i += 4) { - FieldGroup field_group; - for (int j = i; j < aligned_to_1.size() && j < i + 4; ++j) { - field_group.Append(aligned_to_1[j]); - } - aligned_to_4.push_back(field_group); - } - // Sort by preferred location to keep fields as close to their original - // location as possible. - sort(aligned_to_4.begin(), aligned_to_4.end()); - - // Now group fields aligned to 4 bytes (or the 4-field groups created above) - // into pairs, and treat those like a single field aligned to 8 bytes. - for (int i = 0; i < aligned_to_4.size(); i += 2) { - FieldGroup field_group; - for (int j = i; j < aligned_to_4.size() && j < i + 2; ++j) { - field_group.Append(aligned_to_4[j]); - } - if (i == aligned_to_4.size() - 1) { - // Move incomplete 4-byte block to the end. - field_group.SetPreferredLocation(fields->size() + 1); - } - aligned_to_8.push_back(field_group); - } - // Sort by preferred location to keep fields as close to their original - // location as possible. - sort(aligned_to_8.begin(), aligned_to_8.end()); - - // Now pull out all the FieldDescriptors in order. - fields->clear(); - for (int i = 0; i < aligned_to_8.size(); ++i) { - fields->insert(fields->end(), - aligned_to_8[i].fields().begin(), - aligned_to_8[i].fields().end()); - } -} - -} - -// =================================================================== - -MessageGenerator::MessageGenerator(const Descriptor* descriptor, - const string& dllexport_decl) - : descriptor_(descriptor), - classname_(ClassName(descriptor, false)), - dllexport_decl_(dllexport_decl), - field_generators_(descriptor), - nested_generators_(new scoped_ptr[ - descriptor->nested_type_count()]), - enum_generators_(new scoped_ptr[ - descriptor->enum_type_count()]), - extension_generators_(new scoped_ptr[ - descriptor->extension_count()]) { - - for (int i = 0; i < descriptor->nested_type_count(); i++) { - nested_generators_[i].reset( - new MessageGenerator(descriptor->nested_type(i), dllexport_decl)); - } - - for (int i = 0; i < descriptor->enum_type_count(); i++) { - enum_generators_[i].reset( - new EnumGenerator(descriptor->enum_type(i), dllexport_decl)); - } - - for (int i = 0; i < descriptor->extension_count(); i++) { - extension_generators_[i].reset( - new ExtensionGenerator(descriptor->extension(i), dllexport_decl)); - } -} - -MessageGenerator::~MessageGenerator() {} - -void MessageGenerator:: -GenerateForwardDeclaration(io::Printer* printer) { - printer->Print("class $classname$;\n", - "classname", classname_); - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateForwardDeclaration(printer); - } -} - -void MessageGenerator:: -GenerateEnumDefinitions(io::Printer* printer) { - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateEnumDefinitions(printer); - } - - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - enum_generators_[i]->GenerateDefinition(printer); - } -} - -void MessageGenerator:: -GenerateGetEnumDescriptorSpecializations(io::Printer* printer) { - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateGetEnumDescriptorSpecializations(printer); - } - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - enum_generators_[i]->GenerateGetEnumDescriptorSpecializations(printer); - } -} - -void MessageGenerator:: -GenerateFieldAccessorDeclarations(io::Printer* printer) { - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - PrintFieldComment(printer, field); - - map vars; - SetCommonFieldVariables(field, &vars); - vars["constant_name"] = FieldConstantName(field); - - if (field->is_repeated()) { - printer->Print(vars, "inline int $name$_size() const$deprecation$;\n"); - } else { - printer->Print(vars, "inline bool has_$name$() const$deprecation$;\n"); - } - - printer->Print(vars, "inline void clear_$name$()$deprecation$;\n"); - printer->Print(vars, "static const int $constant_name$ = $number$;\n"); - - // Generate type-specific accessor declarations. - field_generators_.get(field).GenerateAccessorDeclarations(printer); - - printer->Print("\n"); - } - - if (descriptor_->extension_range_count() > 0) { - // Generate accessors for extensions. We just call a macro located in - // extension_set.h since the accessors about 80 lines of static code. - printer->Print( - "GOOGLE_PROTOBUF_EXTENSION_ACCESSORS($classname$)\n", - "classname", classname_); - } -} - -void MessageGenerator:: -GenerateFieldAccessorDefinitions(io::Printer* printer) { - printer->Print("// $classname$\n\n", "classname", classname_); - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - PrintFieldComment(printer, field); - - map vars; - SetCommonFieldVariables(field, &vars); - - // Generate has_$name$() or $name$_size(). - if (field->is_repeated()) { - printer->Print(vars, - "inline int $classname$::$name$_size() const {\n" - " return $name$_.size();\n" - "}\n"); - } else { - // Singular field. - char buffer[kFastToBufferSize]; - vars["has_array_index"] = SimpleItoa(field->index() / 32); - vars["has_mask"] = FastHex32ToBuffer(1u << (field->index() % 32), buffer); - printer->Print(vars, - "inline bool $classname$::has_$name$() const {\n" - " return (_has_bits_[$has_array_index$] & 0x$has_mask$u) != 0;\n" - "}\n" - "inline void $classname$::set_has_$name$() {\n" - " _has_bits_[$has_array_index$] |= 0x$has_mask$u;\n" - "}\n" - "inline void $classname$::clear_has_$name$() {\n" - " _has_bits_[$has_array_index$] &= ~0x$has_mask$u;\n" - "}\n" - ); - } - - // Generate clear_$name$() - printer->Print(vars, - "inline void $classname$::clear_$name$() {\n"); - - printer->Indent(); - field_generators_.get(field).GenerateClearingCode(printer); - printer->Outdent(); - - if (!field->is_repeated()) { - printer->Print(vars, - " clear_has_$name$();\n"); - } - - printer->Print("}\n"); - - // Generate type-specific accessors. - field_generators_.get(field).GenerateInlineAccessorDefinitions(printer); - - printer->Print("\n"); - } -} - -void MessageGenerator:: -GenerateClassDefinition(io::Printer* printer) { - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateClassDefinition(printer); - printer->Print("\n"); - printer->Print(kThinSeparator); - printer->Print("\n"); - } - - map vars; - vars["classname"] = classname_; - vars["field_count"] = SimpleItoa(descriptor_->field_count()); - if (dllexport_decl_.empty()) { - vars["dllexport"] = ""; - } else { - vars["dllexport"] = dllexport_decl_ + " "; - } - vars["superclass"] = SuperClassName(descriptor_); - - printer->Print(vars, - "class $dllexport$$classname$ : public $superclass$ {\n" - " public:\n"); - printer->Indent(); - - printer->Print(vars, - "$classname$();\n" - "virtual ~$classname$();\n" - "\n" - "$classname$(const $classname$& from);\n" - "\n" - "inline $classname$& operator=(const $classname$& from) {\n" - " CopyFrom(from);\n" - " return *this;\n" - "}\n" - "\n"); - - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - "inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {\n" - " return _unknown_fields_;\n" - "}\n" - "\n" - "inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {\n" - " return &_unknown_fields_;\n" - "}\n" - "\n"); - } - - // Only generate this member if it's not disabled. - if (HasDescriptorMethods(descriptor_->file()) && - !descriptor_->options().no_standard_descriptor_accessor()) { - printer->Print(vars, - "static const ::google::protobuf::Descriptor* descriptor();\n"); - } - - printer->Print(vars, - "static const $classname$& default_instance();\n" - "\n"); - - - printer->Print(vars, - "void Swap($classname$* other);\n" - "\n" - "// implements Message ----------------------------------------------\n" - "\n" - "$classname$* New() const;\n"); - - if (HasGeneratedMethods(descriptor_->file())) { - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print(vars, - "void CopyFrom(const ::google::protobuf::Message& from);\n" - "void MergeFrom(const ::google::protobuf::Message& from);\n"); - } else { - printer->Print(vars, - "void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);\n"); - } - - printer->Print(vars, - "void CopyFrom(const $classname$& from);\n" - "void MergeFrom(const $classname$& from);\n" - "void Clear();\n" - "bool IsInitialized() const;\n" - "\n" - "int ByteSize() const;\n" - "bool MergePartialFromCodedStream(\n" - " ::google::protobuf::io::CodedInputStream* input);\n" - "void SerializeWithCachedSizes(\n" - " ::google::protobuf::io::CodedOutputStream* output) const;\n"); - if (HasFastArraySerialization(descriptor_->file())) { - printer->Print( - "::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;\n"); - } - } - - printer->Print(vars, - "int GetCachedSize() const { return _cached_size_; }\n" - "private:\n" - "void SharedCtor();\n" - "void SharedDtor();\n" - "void SetCachedSize(int size) const;\n" - "public:\n" - "\n"); - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print( - "::google::protobuf::Metadata GetMetadata() const;\n" - "\n"); - } else { - printer->Print( - "::std::string GetTypeName() const;\n" - "\n"); - } - - printer->Print( - "// nested types ----------------------------------------------------\n" - "\n"); - - // Import all nested message classes into this class's scope with typedefs. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - const Descriptor* nested_type = descriptor_->nested_type(i); - printer->Print("typedef $nested_full_name$ $nested_name$;\n", - "nested_name", nested_type->name(), - "nested_full_name", ClassName(nested_type, false)); - } - - if (descriptor_->nested_type_count() > 0) { - printer->Print("\n"); - } - - // Import all nested enums and their values into this class's scope with - // typedefs and constants. - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - enum_generators_[i]->GenerateSymbolImports(printer); - printer->Print("\n"); - } - - printer->Print( - "// accessors -------------------------------------------------------\n" - "\n"); - - // Generate accessor methods for all fields. - GenerateFieldAccessorDeclarations(printer); - - // Declare extension identifiers. - for (int i = 0; i < descriptor_->extension_count(); i++) { - extension_generators_[i]->GenerateDeclaration(printer); - } - - - printer->Print( - "// @@protoc_insertion_point(class_scope:$full_name$)\n", - "full_name", descriptor_->full_name()); - - // Generate private members. - printer->Outdent(); - printer->Print(" private:\n"); - printer->Indent(); - - for (int i = 0; i < descriptor_->field_count(); i++) { - if (!descriptor_->field(i)->is_repeated()) { - printer->Print( - "inline void set_has_$name$();\n", - "name", FieldName(descriptor_->field(i))); - printer->Print( - "inline void clear_has_$name$();\n", - "name", FieldName(descriptor_->field(i))); - } - } - printer->Print("\n"); - - // To minimize padding, data members are divided into three sections: - // (1) members assumed to align to 8 bytes - // (2) members corresponding to message fields, re-ordered to optimize - // alignment. - // (3) members assumed to align to 4 bytes. - - // Members assumed to align to 8 bytes: - - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "::google::protobuf::internal::ExtensionSet _extensions_;\n" - "\n"); - } - - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - "::google::protobuf::UnknownFieldSet _unknown_fields_;\n" - "\n"); - } - - // Field members: - - vector fields; - for (int i = 0; i < descriptor_->field_count(); i++) { - fields.push_back(descriptor_->field(i)); - } - OptimizePadding(&fields); - for (int i = 0; i < fields.size(); ++i) { - field_generators_.get(fields[i]).GeneratePrivateMembers(printer); - } - - // Members assumed to align to 4 bytes: - - // TODO(kenton): Make _cached_size_ an atomic when C++ supports it. - printer->Print( - "\n" - "mutable int _cached_size_;\n"); - - // Generate _has_bits_. - if (descriptor_->field_count() > 0) { - printer->Print(vars, - "::google::protobuf::uint32 _has_bits_[($field_count$ + 31) / 32];\n" - "\n"); - } else { - // Zero-size arrays aren't technically allowed, and MSVC in particular - // doesn't like them. We still need to declare these arrays to make - // other code compile. Since this is an uncommon case, we'll just declare - // them with size 1 and waste some space. Oh well. - printer->Print( - "::google::protobuf::uint32 _has_bits_[1];\n" - "\n"); - } - - // Declare AddDescriptors(), BuildDescriptors(), and ShutdownFile() as - // friends so that they can access private static variables like - // default_instance_ and reflection_. - printer->Print( - "friend void $dllexport_decl$ $adddescriptorsname$();\n", - "dllexport_decl", dllexport_decl_, - "adddescriptorsname", - GlobalAddDescriptorsName(descriptor_->file()->name())); - printer->Print( - "friend void $assigndescriptorsname$();\n" - "friend void $shutdownfilename$();\n" - "\n", - "assigndescriptorsname", - GlobalAssignDescriptorsName(descriptor_->file()->name()), - "shutdownfilename", GlobalShutdownFileName(descriptor_->file()->name())); - - printer->Print( - "void InitAsDefaultInstance();\n" - "static $classname$* default_instance_;\n", - "classname", classname_); - - printer->Outdent(); - printer->Print(vars, "};"); -} - -void MessageGenerator:: -GenerateInlineMethods(io::Printer* printer) { - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateInlineMethods(printer); - printer->Print(kThinSeparator); - printer->Print("\n"); - } - - GenerateFieldAccessorDefinitions(printer); -} - -void MessageGenerator:: -GenerateDescriptorDeclarations(io::Printer* printer) { - printer->Print( - "const ::google::protobuf::Descriptor* $name$_descriptor_ = NULL;\n" - "const ::google::protobuf::internal::GeneratedMessageReflection*\n" - " $name$_reflection_ = NULL;\n", - "name", classname_); - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateDescriptorDeclarations(printer); - } - - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - printer->Print( - "const ::google::protobuf::EnumDescriptor* $name$_descriptor_ = NULL;\n", - "name", ClassName(descriptor_->enum_type(i), false)); - } -} - -void MessageGenerator:: -GenerateDescriptorInitializer(io::Printer* printer, int index) { - // TODO(kenton): Passing the index to this method is redundant; just use - // descriptor_->index() instead. - map vars; - vars["classname"] = classname_; - vars["index"] = SimpleItoa(index); - - // Obtain the descriptor from the parent's descriptor. - if (descriptor_->containing_type() == NULL) { - printer->Print(vars, - "$classname$_descriptor_ = file->message_type($index$);\n"); - } else { - vars["parent"] = ClassName(descriptor_->containing_type(), false); - printer->Print(vars, - "$classname$_descriptor_ = " - "$parent$_descriptor_->nested_type($index$);\n"); - } - - // Generate the offsets. - GenerateOffsets(printer); - - // Construct the reflection object. - printer->Print(vars, - "$classname$_reflection_ =\n" - " new ::google::protobuf::internal::GeneratedMessageReflection(\n" - " $classname$_descriptor_,\n" - " $classname$::default_instance_,\n" - " $classname$_offsets_,\n" - " GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET($classname$, _has_bits_[0]),\n" - " GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(" - "$classname$, _unknown_fields_),\n"); - if (descriptor_->extension_range_count() > 0) { - printer->Print(vars, - " GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(" - "$classname$, _extensions_),\n"); - } else { - // No extensions. - printer->Print(vars, - " -1,\n"); - } - printer->Print(vars, - " ::google::protobuf::DescriptorPool::generated_pool(),\n" - " ::google::protobuf::MessageFactory::generated_factory(),\n" - " sizeof($classname$));\n"); - - // Handle nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateDescriptorInitializer(printer, i); - } - - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - enum_generators_[i]->GenerateDescriptorInitializer(printer, i); - } -} - -void MessageGenerator:: -GenerateTypeRegistrations(io::Printer* printer) { - // Register this message type with the message factory. - printer->Print( - "::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(\n" - " $classname$_descriptor_, &$classname$::default_instance());\n", - "classname", classname_); - - // Handle nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateTypeRegistrations(printer); - } -} - -void MessageGenerator:: -GenerateDefaultInstanceAllocator(io::Printer* printer) { - // Construct the default instance. We can't call InitAsDefaultInstance() yet - // because we need to make sure all default instances that this one might - // depend on are constructed first. - printer->Print( - "$classname$::default_instance_ = new $classname$();\n", - "classname", classname_); - - // Handle nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateDefaultInstanceAllocator(printer); - } - -} - -void MessageGenerator:: -GenerateDefaultInstanceInitializer(io::Printer* printer) { - printer->Print( - "$classname$::default_instance_->InitAsDefaultInstance();\n", - "classname", classname_); - - // Register extensions. - for (int i = 0; i < descriptor_->extension_count(); i++) { - extension_generators_[i]->GenerateRegistration(printer); - } - - // Handle nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateDefaultInstanceInitializer(printer); - } -} - -void MessageGenerator:: -GenerateShutdownCode(io::Printer* printer) { - printer->Print( - "delete $classname$::default_instance_;\n", - "classname", classname_); - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print( - "delete $classname$_reflection_;\n", - "classname", classname_); - } - - // Handle nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateShutdownCode(printer); - } -} - -void MessageGenerator:: -GenerateClassMethods(io::Printer* printer) { - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - enum_generators_[i]->GenerateMethods(printer); - } - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - nested_generators_[i]->GenerateClassMethods(printer); - printer->Print("\n"); - printer->Print(kThinSeparator); - printer->Print("\n"); - } - - // Generate non-inline field definitions. - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateNonInlineAccessorDefinitions(printer); - } - - // Generate field number constants. - printer->Print("#ifndef _MSC_VER\n"); - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor *field = descriptor_->field(i); - printer->Print( - "const int $classname$::$constant_name$;\n", - "classname", ClassName(FieldScope(field), false), - "constant_name", FieldConstantName(field)); - } - printer->Print( - "#endif // !_MSC_VER\n" - "\n"); - - // Define extension identifiers. - for (int i = 0; i < descriptor_->extension_count(); i++) { - extension_generators_[i]->GenerateDefinition(printer); - } - - GenerateStructors(printer); - printer->Print("\n"); - - if (HasGeneratedMethods(descriptor_->file())) { - GenerateClear(printer); - printer->Print("\n"); - - GenerateMergeFromCodedStream(printer); - printer->Print("\n"); - - GenerateSerializeWithCachedSizes(printer); - printer->Print("\n"); - - if (HasFastArraySerialization(descriptor_->file())) { - GenerateSerializeWithCachedSizesToArray(printer); - printer->Print("\n"); - } - - GenerateByteSize(printer); - printer->Print("\n"); - - GenerateMergeFrom(printer); - printer->Print("\n"); - - GenerateCopyFrom(printer); - printer->Print("\n"); - - GenerateIsInitialized(printer); - printer->Print("\n"); - } - - GenerateSwap(printer); - printer->Print("\n"); - - if (HasDescriptorMethods(descriptor_->file())) { - printer->Print( - "::google::protobuf::Metadata $classname$::GetMetadata() const {\n" - " protobuf_AssignDescriptorsOnce();\n" - " ::google::protobuf::Metadata metadata;\n" - " metadata.descriptor = $classname$_descriptor_;\n" - " metadata.reflection = $classname$_reflection_;\n" - " return metadata;\n" - "}\n" - "\n", - "classname", classname_); - } else { - printer->Print( - "::std::string $classname$::GetTypeName() const {\n" - " return \"$type_name$\";\n" - "}\n" - "\n", - "classname", classname_, - "type_name", descriptor_->full_name()); - } - -} - -void MessageGenerator:: -GenerateOffsets(io::Printer* printer) { - printer->Print( - "static const int $classname$_offsets_[$field_count$] = {\n", - "classname", classname_, - "field_count", SimpleItoa(max(1, descriptor_->field_count()))); - printer->Indent(); - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - printer->Print( - "GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET($classname$, $name$_),\n", - "classname", classname_, - "name", FieldName(field)); - } - - printer->Outdent(); - printer->Print("};\n"); -} - -void MessageGenerator:: -GenerateSharedConstructorCode(io::Printer* printer) { - printer->Print( - "void $classname$::SharedCtor() {\n", - "classname", classname_); - printer->Indent(); - - printer->Print( - "_cached_size_ = 0;\n"); - - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateConstructorCode(printer); - } - - printer->Print( - "::memset(_has_bits_, 0, sizeof(_has_bits_));\n"); - - printer->Outdent(); - printer->Print("}\n\n"); -} - -void MessageGenerator:: -GenerateSharedDestructorCode(io::Printer* printer) { - printer->Print( - "void $classname$::SharedDtor() {\n", - "classname", classname_); - printer->Indent(); - // Write the destructors for each field. - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateDestructorCode(printer); - } - - printer->Print( - "if (this != default_instance_) {\n"); - - // We need to delete all embedded messages. - // TODO(kenton): If we make unset messages point at default instances - // instead of NULL, then it would make sense to move this code into - // MessageFieldGenerator::GenerateDestructorCode(). - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (!field->is_repeated() && - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - printer->Print(" delete $name$_;\n", - "name", FieldName(field)); - } - } - - printer->Outdent(); - printer->Print( - " }\n" - "}\n" - "\n"); -} - -void MessageGenerator:: -GenerateStructors(io::Printer* printer) { - string superclass = SuperClassName(descriptor_); - - // Generate the default constructor. - printer->Print( - "$classname$::$classname$()\n" - " : $superclass$() {\n" - " SharedCtor();\n" - "}\n", - "classname", classname_, - "superclass", superclass); - - printer->Print( - "\n" - "void $classname$::InitAsDefaultInstance() {\n", - "classname", classname_); - - // The default instance needs all of its embedded message pointers - // cross-linked to other default instances. We can't do this initialization - // in the constructor because some other default instances may not have been - // constructed yet at that time. - // TODO(kenton): Maybe all message fields (even for non-default messages) - // should be initialized to point at default instances rather than NULL? - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (!field->is_repeated() && - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - printer->Print( - " $name$_ = const_cast< $type$*>(&$type$::default_instance());\n", - "name", FieldName(field), - "type", FieldMessageTypeName(field)); - } - } - printer->Print( - "}\n" - "\n"); - - // Generate the copy constructor. - printer->Print( - "$classname$::$classname$(const $classname$& from)\n" - " : $superclass$() {\n" - " SharedCtor();\n" - " MergeFrom(from);\n" - "}\n" - "\n", - "classname", classname_, - "superclass", superclass); - - // Generate the shared constructor code. - GenerateSharedConstructorCode(printer); - - // Generate the destructor. - printer->Print( - "$classname$::~$classname$() {\n" - " SharedDtor();\n" - "}\n" - "\n", - "classname", classname_); - - // Generate the shared destructor code. - GenerateSharedDestructorCode(printer); - - // Generate SetCachedSize. - printer->Print( - "void $classname$::SetCachedSize(int size) const {\n" - " GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" - " _cached_size_ = size;\n" - " GOOGLE_SAFE_CONCURRENT_WRITES_END();\n" - "}\n", - "classname", classname_); - - // Only generate this member if it's not disabled. - if (HasDescriptorMethods(descriptor_->file()) && - !descriptor_->options().no_standard_descriptor_accessor()) { - printer->Print( - "const ::google::protobuf::Descriptor* $classname$::descriptor() {\n" - " protobuf_AssignDescriptorsOnce();\n" - " return $classname$_descriptor_;\n" - "}\n" - "\n", - "classname", classname_, - "adddescriptorsname", - GlobalAddDescriptorsName(descriptor_->file()->name())); - } - - printer->Print( - "const $classname$& $classname$::default_instance() {\n" - " if (default_instance_ == NULL) $adddescriptorsname$();" - " return *default_instance_;\n" - "}\n" - "\n" - "$classname$* $classname$::default_instance_ = NULL;\n" - "\n" - "$classname$* $classname$::New() const {\n" - " return new $classname$;\n" - "}\n", - "classname", classname_, - "adddescriptorsname", - GlobalAddDescriptorsName(descriptor_->file()->name())); - -} - -void MessageGenerator:: -GenerateClear(io::Printer* printer) { - printer->Print("void $classname$::Clear() {\n", - "classname", classname_); - printer->Indent(); - - int last_index = -1; - - if (descriptor_->extension_range_count() > 0) { - printer->Print("_extensions_.Clear();\n"); - } - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (!field->is_repeated()) { - // We can use the fact that _has_bits_ is a giant bitfield to our - // advantage: We can check up to 32 bits at a time for equality to - // zero, and skip the whole range if so. This can improve the speed - // of Clear() for messages which contain a very large number of - // optional fields of which only a few are used at a time. Here, - // we've chosen to check 8 bits at a time rather than 32. - if (i / 8 != last_index / 8 || last_index < 0) { - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - printer->Print( - "if (_has_bits_[$index$ / 32] & (0xffu << ($index$ % 32))) {\n", - "index", SimpleItoa(field->index())); - printer->Indent(); - } - last_index = i; - - // It's faster to just overwrite primitive types, but we should - // only clear strings and messages if they were set. - // TODO(kenton): Let the CppFieldGenerator decide this somehow. - bool should_check_bit = - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || - field->cpp_type() == FieldDescriptor::CPPTYPE_STRING; - - if (should_check_bit) { - printer->Print( - "if (has_$name$()) {\n", - "name", FieldName(field)); - printer->Indent(); - } - - field_generators_.get(field).GenerateClearingCode(printer); - - if (should_check_bit) { - printer->Outdent(); - printer->Print("}\n"); - } - } - } - - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - - // Repeated fields don't use _has_bits_ so we clear them in a separate - // pass. - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (field->is_repeated()) { - field_generators_.get(field).GenerateClearingCode(printer); - } - } - - printer->Print( - "::memset(_has_bits_, 0, sizeof(_has_bits_));\n"); - - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - "mutable_unknown_fields()->Clear();\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator:: -GenerateSwap(io::Printer* printer) { - // Generate the Swap member function. - printer->Print("void $classname$::Swap($classname$* other) {\n", - "classname", classname_); - printer->Indent(); - printer->Print("if (other != this) {\n"); - printer->Indent(); - - if (HasGeneratedMethods(descriptor_->file())) { - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - field_generators_.get(field).GenerateSwappingCode(printer); - } - - for (int i = 0; i < (descriptor_->field_count() + 31) / 32; ++i) { - printer->Print("std::swap(_has_bits_[$i$], other->_has_bits_[$i$]);\n", - "i", SimpleItoa(i)); - } - - if (HasUnknownFields(descriptor_->file())) { - printer->Print("_unknown_fields_.Swap(&other->_unknown_fields_);\n"); - } - printer->Print("std::swap(_cached_size_, other->_cached_size_);\n"); - if (descriptor_->extension_range_count() > 0) { - printer->Print("_extensions_.Swap(&other->_extensions_);\n"); - } - } else { - printer->Print("GetReflection()->Swap(this, other);"); - } - - printer->Outdent(); - printer->Print("}\n"); - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator:: -GenerateMergeFrom(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_->file())) { - // Generate the generalized MergeFrom (aka that which takes in the Message - // base class as a parameter). - printer->Print( - "void $classname$::MergeFrom(const ::google::protobuf::Message& from) {\n" - " GOOGLE_CHECK_NE(&from, this);\n", - "classname", classname_); - printer->Indent(); - - // Cast the message to the proper type. If we find that the message is - // *not* of the proper type, we can still call Merge via the reflection - // system, as the GOOGLE_CHECK above ensured that we have the same descriptor - // for each message. - printer->Print( - "const $classname$* source =\n" - " ::google::protobuf::internal::dynamic_cast_if_available(\n" - " &from);\n" - "if (source == NULL) {\n" - " ::google::protobuf::internal::ReflectionOps::Merge(from, this);\n" - "} else {\n" - " MergeFrom(*source);\n" - "}\n", - "classname", classname_); - - printer->Outdent(); - printer->Print("}\n\n"); - } else { - // Generate CheckTypeAndMergeFrom(). - printer->Print( - "void $classname$::CheckTypeAndMergeFrom(\n" - " const ::google::protobuf::MessageLite& from) {\n" - " MergeFrom(*::google::protobuf::down_cast(&from));\n" - "}\n" - "\n", - "classname", classname_); - } - - // Generate the class-specific MergeFrom, which avoids the GOOGLE_CHECK and cast. - printer->Print( - "void $classname$::MergeFrom(const $classname$& from) {\n" - " GOOGLE_CHECK_NE(&from, this);\n", - "classname", classname_); - printer->Indent(); - - // Merge Repeated fields. These fields do not require a - // check as we can simply iterate over them. - for (int i = 0; i < descriptor_->field_count(); ++i) { - const FieldDescriptor* field = descriptor_->field(i); - - if (field->is_repeated()) { - field_generators_.get(field).GenerateMergingCode(printer); - } - } - - // Merge Optional and Required fields (after a _has_bit check). - int last_index = -1; - - for (int i = 0; i < descriptor_->field_count(); ++i) { - const FieldDescriptor* field = descriptor_->field(i); - - if (!field->is_repeated()) { - // See above in GenerateClear for an explanation of this. - if (i / 8 != last_index / 8 || last_index < 0) { - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - printer->Print( - "if (from._has_bits_[$index$ / 32] & (0xffu << ($index$ % 32))) {\n", - "index", SimpleItoa(field->index())); - printer->Indent(); - } - - last_index = i; - - printer->Print( - "if (from.has_$name$()) {\n", - "name", FieldName(field)); - printer->Indent(); - - field_generators_.get(field).GenerateMergingCode(printer); - - printer->Outdent(); - printer->Print("}\n"); - } - } - - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - - if (descriptor_->extension_range_count() > 0) { - printer->Print("_extensions_.MergeFrom(from._extensions_);\n"); - } - - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - "mutable_unknown_fields()->MergeFrom(from.unknown_fields());\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator:: -GenerateCopyFrom(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_->file())) { - // Generate the generalized CopyFrom (aka that which takes in the Message - // base class as a parameter). - printer->Print( - "void $classname$::CopyFrom(const ::google::protobuf::Message& from) {\n", - "classname", classname_); - printer->Indent(); - - printer->Print( - "if (&from == this) return;\n" - "Clear();\n" - "MergeFrom(from);\n"); - - printer->Outdent(); - printer->Print("}\n\n"); - } - - // Generate the class-specific CopyFrom. - printer->Print( - "void $classname$::CopyFrom(const $classname$& from) {\n", - "classname", classname_); - printer->Indent(); - - printer->Print( - "if (&from == this) return;\n" - "Clear();\n" - "MergeFrom(from);\n"); - - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) { - if (descriptor_->options().message_set_wire_format()) { - // Special-case MessageSet. - printer->Print( - "bool $classname$::MergePartialFromCodedStream(\n" - " ::google::protobuf::io::CodedInputStream* input) {\n" - " return _extensions_.ParseMessageSet(input, default_instance_,\n" - " mutable_unknown_fields());\n" - "}\n", - "classname", classname_); - return; - } - - printer->Print( - "bool $classname$::MergePartialFromCodedStream(\n" - " ::google::protobuf::io::CodedInputStream* input) {\n" - "#define DO_(EXPRESSION) if (!(EXPRESSION)) return false\n" - " ::google::protobuf::uint32 tag;\n" - " while ((tag = input->ReadTag()) != 0) {\n", - "classname", classname_); - - printer->Indent(); - printer->Indent(); - - if (descriptor_->field_count() > 0) { - // We don't even want to print the switch() if we have no fields because - // MSVC dislikes switch() statements that contain only a default value. - - // Note: If we just switched on the tag rather than the field number, we - // could avoid the need for the if() to check the wire type at the beginning - // of each case. However, this is actually a bit slower in practice as it - // creates a jump table that is 8x larger and sparser, and meanwhile the - // if()s are highly predictable. - printer->Print( - "switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {\n"); - - printer->Indent(); - - scoped_array ordered_fields( - SortFieldsByNumber(descriptor_)); - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = ordered_fields[i]; - - PrintFieldComment(printer, field); - - printer->Print( - "case $number$: {\n", - "number", SimpleItoa(field->number())); - printer->Indent(); - const FieldGenerator& field_generator = field_generators_.get(field); - - // Emit code to parse the common, expected case. - printer->Print( - "if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==\n" - " ::google::protobuf::internal::WireFormatLite::WIRETYPE_$wiretype$) {\n", - "wiretype", kWireTypeNames[WireFormat::WireTypeForField(field)]); - - if (i > 0 || (field->is_repeated() && !field->options().packed())) { - printer->Print( - " parse_$name$:\n", - "name", field->name()); - } - - printer->Indent(); - if (field->options().packed()) { - field_generator.GenerateMergeFromCodedStreamWithPacking(printer); - } else { - field_generator.GenerateMergeFromCodedStream(printer); - } - printer->Outdent(); - - // Emit code to parse unexpectedly packed or unpacked values. - if (field->is_packable() && field->options().packed()) { - printer->Print( - "} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)\n" - " == ::google::protobuf::internal::WireFormatLite::\n" - " WIRETYPE_$wiretype$) {\n", - "wiretype", - kWireTypeNames[WireFormat::WireTypeForFieldType(field->type())]); - printer->Indent(); - field_generator.GenerateMergeFromCodedStream(printer); - printer->Outdent(); - } else if (field->is_packable() && !field->options().packed()) { - printer->Print( - "} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)\n" - " == ::google::protobuf::internal::WireFormatLite::\n" - " WIRETYPE_LENGTH_DELIMITED) {\n"); - printer->Indent(); - field_generator.GenerateMergeFromCodedStreamWithPacking(printer); - printer->Outdent(); - } - - printer->Print( - "} else {\n" - " goto handle_uninterpreted;\n" - "}\n"); - - // switch() is slow since it can't be predicted well. Insert some if()s - // here that attempt to predict the next tag. - if (field->is_repeated() && !field->options().packed()) { - // Expect repeats of this field. - printer->Print( - "if (input->ExpectTag($tag$)) goto parse_$name$;\n", - "tag", SimpleItoa(WireFormat::MakeTag(field)), - "name", field->name()); - } - - if (i + 1 < descriptor_->field_count()) { - // Expect the next field in order. - const FieldDescriptor* next_field = ordered_fields[i + 1]; - printer->Print( - "if (input->ExpectTag($next_tag$)) goto parse_$next_name$;\n", - "next_tag", SimpleItoa(WireFormat::MakeTag(next_field)), - "next_name", next_field->name()); - } else { - // Expect EOF. - // TODO(kenton): Expect group end-tag? - printer->Print( - "if (input->ExpectAtEnd()) return true;\n"); - } - - printer->Print( - "break;\n"); - - printer->Outdent(); - printer->Print("}\n\n"); - } - - printer->Print( - "default: {\n" - "handle_uninterpreted:\n"); - printer->Indent(); - } - - // Is this an end-group tag? If so, this must be the end of the message. - printer->Print( - "if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==\n" - " ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {\n" - " return true;\n" - "}\n"); - - // Handle extension ranges. - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "if ("); - for (int i = 0; i < descriptor_->extension_range_count(); i++) { - const Descriptor::ExtensionRange* range = - descriptor_->extension_range(i); - if (i > 0) printer->Print(" ||\n "); - - uint32 start_tag = WireFormatLite::MakeTag( - range->start, static_cast(0)); - uint32 end_tag = WireFormatLite::MakeTag( - range->end, static_cast(0)); - - if (range->end > FieldDescriptor::kMaxNumber) { - printer->Print( - "($start$u <= tag)", - "start", SimpleItoa(start_tag)); - } else { - printer->Print( - "($start$u <= tag && tag < $end$u)", - "start", SimpleItoa(start_tag), - "end", SimpleItoa(end_tag)); - } - } - printer->Print(") {\n"); - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - " DO_(_extensions_.ParseField(tag, input, default_instance_,\n" - " mutable_unknown_fields()));\n"); - } else { - printer->Print( - " DO_(_extensions_.ParseField(tag, input, default_instance_));\n"); - } - printer->Print( - " continue;\n" - "}\n"); - } - - // We really don't recognize this tag. Skip it. - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - "DO_(::google::protobuf::internal::WireFormat::SkipField(\n" - " input, tag, mutable_unknown_fields()));\n"); - } else { - printer->Print( - "DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));\n"); - } - - if (descriptor_->field_count() > 0) { - printer->Print("break;\n"); - printer->Outdent(); - printer->Print("}\n"); // default: - printer->Outdent(); - printer->Print("}\n"); // switch - } - - printer->Outdent(); - printer->Outdent(); - printer->Print( - " }\n" // while - " return true;\n" - "#undef DO_\n" - "}\n"); -} - -void MessageGenerator::GenerateSerializeOneField( - io::Printer* printer, const FieldDescriptor* field, bool to_array) { - PrintFieldComment(printer, field); - - if (!field->is_repeated()) { - printer->Print( - "if (has_$name$()) {\n", - "name", FieldName(field)); - printer->Indent(); - } - - if (to_array) { - field_generators_.get(field).GenerateSerializeWithCachedSizesToArray( - printer); - } else { - field_generators_.get(field).GenerateSerializeWithCachedSizes(printer); - } - - if (!field->is_repeated()) { - printer->Outdent(); - printer->Print("}\n"); - } - printer->Print("\n"); -} - -void MessageGenerator::GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range, - bool to_array) { - map vars; - vars["start"] = SimpleItoa(range->start); - vars["end"] = SimpleItoa(range->end); - printer->Print(vars, - "// Extension range [$start$, $end$)\n"); - if (to_array) { - printer->Print(vars, - "target = _extensions_.SerializeWithCachedSizesToArray(\n" - " $start$, $end$, target);\n\n"); - } else { - printer->Print(vars, - "_extensions_.SerializeWithCachedSizes(\n" - " $start$, $end$, output);\n\n"); - } -} - -void MessageGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) { - if (descriptor_->options().message_set_wire_format()) { - // Special-case MessageSet. - printer->Print( - "void $classname$::SerializeWithCachedSizes(\n" - " ::google::protobuf::io::CodedOutputStream* output) const {\n" - " _extensions_.SerializeMessageSetWithCachedSizes(output);\n", - "classname", classname_); - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - " ::google::protobuf::internal::WireFormat::SerializeUnknownMessageSetItems(\n" - " unknown_fields(), output);\n"); - } - printer->Print( - "}\n"); - return; - } - - printer->Print( - "void $classname$::SerializeWithCachedSizes(\n" - " ::google::protobuf::io::CodedOutputStream* output) const {\n", - "classname", classname_); - printer->Indent(); - - GenerateSerializeWithCachedSizesBody(printer, false); - - printer->Outdent(); - printer->Print( - "}\n"); -} - -void MessageGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) { - if (descriptor_->options().message_set_wire_format()) { - // Special-case MessageSet. - printer->Print( - "::google::protobuf::uint8* $classname$::SerializeWithCachedSizesToArray(\n" - " ::google::protobuf::uint8* target) const {\n" - " target =\n" - " _extensions_.SerializeMessageSetWithCachedSizesToArray(target);\n", - "classname", classname_); - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - " target = ::google::protobuf::internal::WireFormat::\n" - " SerializeUnknownMessageSetItemsToArray(\n" - " unknown_fields(), target);\n"); - } - printer->Print( - " return target;\n" - "}\n"); - return; - } - - printer->Print( - "::google::protobuf::uint8* $classname$::SerializeWithCachedSizesToArray(\n" - " ::google::protobuf::uint8* target) const {\n", - "classname", classname_); - printer->Indent(); - - GenerateSerializeWithCachedSizesBody(printer, true); - - printer->Outdent(); - printer->Print( - " return target;\n" - "}\n"); -} - -void MessageGenerator:: -GenerateSerializeWithCachedSizesBody(io::Printer* printer, bool to_array) { - scoped_array ordered_fields( - SortFieldsByNumber(descriptor_)); - - vector sorted_extensions; - for (int i = 0; i < descriptor_->extension_range_count(); ++i) { - sorted_extensions.push_back(descriptor_->extension_range(i)); - } - sort(sorted_extensions.begin(), sorted_extensions.end(), - ExtensionRangeSorter()); - - // Merge the fields and the extension ranges, both sorted by field number. - int i, j; - for (i = 0, j = 0; - i < descriptor_->field_count() || j < sorted_extensions.size(); - ) { - if (i == descriptor_->field_count()) { - GenerateSerializeOneExtensionRange(printer, - sorted_extensions[j++], - to_array); - } else if (j == sorted_extensions.size()) { - GenerateSerializeOneField(printer, ordered_fields[i++], to_array); - } else if (ordered_fields[i]->number() < sorted_extensions[j]->start) { - GenerateSerializeOneField(printer, ordered_fields[i++], to_array); - } else { - GenerateSerializeOneExtensionRange(printer, - sorted_extensions[j++], - to_array); - } - } - - if (HasUnknownFields(descriptor_->file())) { - printer->Print("if (!unknown_fields().empty()) {\n"); - printer->Indent(); - if (to_array) { - printer->Print( - "target = " - "::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(\n" - " unknown_fields(), target);\n"); - } else { - printer->Print( - "::google::protobuf::internal::WireFormat::SerializeUnknownFields(\n" - " unknown_fields(), output);\n"); - } - printer->Outdent(); - - printer->Print( - "}\n"); - } -} - -void MessageGenerator:: -GenerateByteSize(io::Printer* printer) { - if (descriptor_->options().message_set_wire_format()) { - // Special-case MessageSet. - printer->Print( - "int $classname$::ByteSize() const {\n" - " int total_size = _extensions_.MessageSetByteSize();\n", - "classname", classname_); - if (HasUnknownFields(descriptor_->file())) { - printer->Print( - " total_size += ::google::protobuf::internal::WireFormat::\n" - " ComputeUnknownMessageSetItemsSize(unknown_fields());\n"); - } - printer->Print( - " GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" - " _cached_size_ = total_size;\n" - " GOOGLE_SAFE_CONCURRENT_WRITES_END();\n" - " return total_size;\n" - "}\n"); - return; - } - - printer->Print( - "int $classname$::ByteSize() const {\n", - "classname", classname_); - printer->Indent(); - printer->Print( - "int total_size = 0;\n" - "\n"); - - int last_index = -1; - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (!field->is_repeated()) { - // See above in GenerateClear for an explanation of this. - // TODO(kenton): Share code? Unclear how to do so without - // over-engineering. - if ((i / 8) != (last_index / 8) || - last_index < 0) { - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - printer->Print( - "if (_has_bits_[$index$ / 32] & (0xffu << ($index$ % 32))) {\n", - "index", SimpleItoa(field->index())); - printer->Indent(); - } - last_index = i; - - PrintFieldComment(printer, field); - - printer->Print( - "if (has_$name$()) {\n", - "name", FieldName(field)); - printer->Indent(); - - field_generators_.get(field).GenerateByteSize(printer); - - printer->Outdent(); - printer->Print( - "}\n" - "\n"); - } - } - - if (last_index >= 0) { - printer->Outdent(); - printer->Print("}\n"); - } - - // Repeated fields don't use _has_bits_ so we count them in a separate - // pass. - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (field->is_repeated()) { - PrintFieldComment(printer, field); - field_generators_.get(field).GenerateByteSize(printer); - printer->Print("\n"); - } - } - - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "total_size += _extensions_.ByteSize();\n" - "\n"); - } - - if (HasUnknownFields(descriptor_->file())) { - printer->Print("if (!unknown_fields().empty()) {\n"); - printer->Indent(); - printer->Print( - "total_size +=\n" - " ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(\n" - " unknown_fields());\n"); - printer->Outdent(); - printer->Print("}\n"); - } - - // We update _cached_size_ even though this is a const method. In theory, - // this is not thread-compatible, because concurrent writes have undefined - // results. In practice, since any concurrent writes will be writing the - // exact same value, it works on all common processors. In a future version - // of C++, _cached_size_ should be made into an atomic. - printer->Print( - "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" - "_cached_size_ = total_size;\n" - "GOOGLE_SAFE_CONCURRENT_WRITES_END();\n" - "return total_size;\n"); - - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator:: -GenerateIsInitialized(io::Printer* printer) { - printer->Print( - "bool $classname$::IsInitialized() const {\n", - "classname", classname_); - printer->Indent(); - - // Check that all required fields in this message are set. We can do this - // most efficiently by checking 32 "has bits" at a time. - int has_bits_array_size = (descriptor_->field_count() + 31) / 32; - for (int i = 0; i < has_bits_array_size; i++) { - uint32 mask = 0; - for (int bit = 0; bit < 32; bit++) { - int index = i * 32 + bit; - if (index >= descriptor_->field_count()) break; - const FieldDescriptor* field = descriptor_->field(index); - - if (field->is_required()) { - mask |= 1 << bit; - } - } - - if (mask != 0) { - char buffer[kFastToBufferSize]; - printer->Print( - "if ((_has_bits_[$i$] & 0x$mask$) != 0x$mask$) return false;\n", - "i", SimpleItoa(i), - "mask", FastHex32ToBuffer(mask, buffer)); - } - } - - // Now check that all embedded messages are initialized. - printer->Print("\n"); - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - HasRequiredFields(field->message_type())) { - if (field->is_repeated()) { - printer->Print( - "for (int i = 0; i < $name$_size(); i++) {\n" - " if (!this->$name$(i).IsInitialized()) return false;\n" - "}\n", - "name", FieldName(field)); - } else { - printer->Print( - "if (has_$name$()) {\n" - " if (!this->$name$().IsInitialized()) return false;\n" - "}\n", - "name", FieldName(field)); - } - } - } - - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "\n" - "if (!_extensions_.IsInitialized()) return false;"); - } - - printer->Outdent(); - printer->Print( - " return true;\n" - "}\n"); -} - - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h deleted file mode 100644 index 04778f6d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h +++ /dev/null @@ -1,170 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -class EnumGenerator; // enum.h -class ExtensionGenerator; // extension.h - -class MessageGenerator { - public: - // See generator.cc for the meaning of dllexport_decl. - explicit MessageGenerator(const Descriptor* descriptor, - const string& dllexport_decl); - ~MessageGenerator(); - - // Header stuff. - - // Generate foward declarations for this class and all its nested types. - void GenerateForwardDeclaration(io::Printer* printer); - - // Generate definitions of all nested enums (must come before class - // definitions because those classes use the enums definitions). - void GenerateEnumDefinitions(io::Printer* printer); - - // Generate specializations of GetEnumDescriptor(). - // Precondition: in ::google::protobuf namespace. - void GenerateGetEnumDescriptorSpecializations(io::Printer* printer); - - // Generate definitions for this class and all its nested types. - void GenerateClassDefinition(io::Printer* printer); - - // Generate definitions of inline methods (placed at the end of the header - // file). - void GenerateInlineMethods(io::Printer* printer); - - // Source file stuff. - - // Generate code which declares all the global descriptor pointers which - // will be initialized by the methods below. - void GenerateDescriptorDeclarations(io::Printer* printer); - - // Generate code that initializes the global variable storing the message's - // descriptor. - void GenerateDescriptorInitializer(io::Printer* printer, int index); - - // Generate code that calls MessageFactory::InternalRegisterGeneratedMessage() - // for all types. - void GenerateTypeRegistrations(io::Printer* printer); - - // Generates code that allocates the message's default instance. - void GenerateDefaultInstanceAllocator(io::Printer* printer); - - // Generates code that initializes the message's default instance. This - // is separate from allocating because all default instances must be - // allocated before any can be initialized. - void GenerateDefaultInstanceInitializer(io::Printer* printer); - - // Generates code that should be run when ShutdownProtobufLibrary() is called, - // to delete all dynamically-allocated objects. - void GenerateShutdownCode(io::Printer* printer); - - // Generate all non-inline methods for this class. - void GenerateClassMethods(io::Printer* printer); - - private: - // Generate declarations and definitions of accessors for fields. - void GenerateFieldAccessorDeclarations(io::Printer* printer); - void GenerateFieldAccessorDefinitions(io::Printer* printer); - - // Generate the field offsets array. - void GenerateOffsets(io::Printer* printer); - - // Generate constructors and destructor. - void GenerateStructors(io::Printer* printer); - - // The compiler typically generates multiple copies of each constructor and - // destructor: http://gcc.gnu.org/bugs.html#nonbugs_cxx - // Placing common code in a separate method reduces the generated code size. - // - // Generate the shared constructor code. - void GenerateSharedConstructorCode(io::Printer* printer); - // Generate the shared destructor code. - void GenerateSharedDestructorCode(io::Printer* printer); - - // Generate standard Message methods. - void GenerateClear(io::Printer* printer); - void GenerateMergeFromCodedStream(io::Printer* printer); - void GenerateSerializeWithCachedSizes(io::Printer* printer); - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer); - void GenerateSerializeWithCachedSizesBody(io::Printer* printer, - bool to_array); - void GenerateByteSize(io::Printer* printer); - void GenerateMergeFrom(io::Printer* printer); - void GenerateCopyFrom(io::Printer* printer); - void GenerateSwap(io::Printer* printer); - void GenerateIsInitialized(io::Printer* printer); - - // Helpers for GenerateSerializeWithCachedSizes(). - void GenerateSerializeOneField(io::Printer* printer, - const FieldDescriptor* field, - bool unbounded); - void GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range, - bool unbounded); - - - const Descriptor* descriptor_; - string classname_; - string dllexport_decl_; - FieldGeneratorMap field_generators_; - scoped_array > nested_generators_; - scoped_array > enum_generators_; - scoped_array > extension_generators_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc deleted file mode 100644 index 23e75b87..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc +++ /dev/null @@ -1,277 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -void SetMessageVariables(const FieldDescriptor* descriptor, - map* variables) { - SetCommonFieldVariables(descriptor, variables); - (*variables)["type"] = FieldMessageTypeName(descriptor); - (*variables)["stream_writer"] = (*variables)["declared_type"] + - (HasFastArraySerialization(descriptor->message_type()->file()) ? - "MaybeToArray" : - ""); -} - -} // namespace - -// =================================================================== - -MessageFieldGenerator:: -MessageFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetMessageVariables(descriptor, &variables_); -} - -MessageFieldGenerator::~MessageFieldGenerator() {} - -void MessageFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, "$type$* $name$_;\n"); -} - -void MessageFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline const $type$& $name$() const$deprecation$;\n" - "inline $type$* mutable_$name$()$deprecation$;\n" - "inline $type$* release_$name$()$deprecation$;\n"); -} - -void MessageFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline const $type$& $classname$::$name$() const {\n" - " return $name$_ != NULL ? *$name$_ : *default_instance_->$name$_;\n" - "}\n" - "inline $type$* $classname$::mutable_$name$() {\n" - " set_has_$name$();\n" - " if ($name$_ == NULL) $name$_ = new $type$;\n" - " return $name$_;\n" - "}\n" - "inline $type$* $classname$::release_$name$() {\n" - " clear_has_$name$();\n" - " $type$* temp = $name$_;\n" - " $name$_ = NULL;\n" - " return temp;\n" - "}\n"); -} - -void MessageFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($name$_ != NULL) $name$_->$type$::Clear();\n"); -} - -void MessageFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, - "mutable_$name$()->$type$::MergeFrom(from.$name$());\n"); -} - -void MessageFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "std::swap($name$_, other->$name$_);\n"); -} - -void MessageFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = NULL;\n"); -} - -void MessageFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE) { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(\n" - " input, mutable_$name$()));\n"); - } else { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::ReadGroupNoVirtual(\n" - " $number$, input, mutable_$name$()));\n"); - } -} - -void MessageFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::internal::WireFormatLite::Write$stream_writer$(\n" - " $number$, this->$name$(), output);\n"); -} - -void MessageFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - printer->Print(variables_, - "target = ::google::protobuf::internal::WireFormatLite::\n" - " Write$declared_type$NoVirtualToArray(\n" - " $number$, this->$name$(), target);\n"); -} - -void MessageFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::$declared_type$SizeNoVirtual(\n" - " this->$name$());\n"); -} - -// =================================================================== - -RepeatedMessageFieldGenerator:: -RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetMessageVariables(descriptor, &variables_); -} - -RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {} - -void RepeatedMessageFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::RepeatedPtrField< $type$ > $name$_;\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline const $type$& $name$(int index) const$deprecation$;\n" - "inline $type$* mutable_$name$(int index)$deprecation$;\n" - "inline $type$* add_$name$()$deprecation$;\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedPtrField< $type$ >&\n" - " $name$() const$deprecation$;\n" - "inline ::google::protobuf::RepeatedPtrField< $type$ >*\n" - " mutable_$name$()$deprecation$;\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline const $type$& $classname$::$name$(int index) const {\n" - " return $name$_.Get(index);\n" - "}\n" - "inline $type$* $classname$::mutable_$name$(int index) {\n" - " return $name$_.Mutable(index);\n" - "}\n" - "inline $type$* $classname$::add_$name$() {\n" - " return $name$_.Add();\n" - "}\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedPtrField< $type$ >&\n" - "$classname$::$name$() const {\n" - " return $name$_;\n" - "}\n" - "inline ::google::protobuf::RepeatedPtrField< $type$ >*\n" - "$classname$::mutable_$name$() {\n" - " return &$name$_;\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Clear();\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.MergeFrom(from.$name$_);\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Swap(&other->$name$_);\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - // Not needed for repeated fields. -} - -void RepeatedMessageFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE) { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(\n" - " input, add_$name$()));\n"); - } else { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::ReadGroupNoVirtual(\n" - " $number$, input, add_$name$()));\n"); - } -} - -void RepeatedMessageFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " ::google::protobuf::internal::WireFormatLite::Write$stream_writer$(\n" - " $number$, this->$name$(i), output);\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " target = ::google::protobuf::internal::WireFormatLite::\n" - " Write$declared_type$NoVirtualToArray(\n" - " $number$, this->$name$(i), target);\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "total_size += $tag_size$ * this->$name$_size();\n" - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " total_size +=\n" - " ::google::protobuf::internal::WireFormatLite::$declared_type$SizeNoVirtual(\n" - " this->$name$(i));\n" - "}\n"); -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h deleted file mode 100644 index f5147278..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h +++ /dev/null @@ -1,102 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -class MessageFieldGenerator : public FieldGenerator { - public: - explicit MessageFieldGenerator(const FieldDescriptor* descriptor); - ~MessageFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); -}; - -class RepeatedMessageFieldGenerator : public FieldGenerator { - public: - explicit RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor); - ~RepeatedMessageFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc deleted file mode 100644 index 5c4aa4fb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc +++ /dev/null @@ -1,121 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// TODO(kenton): Share code with the versions of this test in other languages? -// It seemed like parameterizing it would add more complexity than it is -// worth. - -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { -namespace { - -class TestGenerator : public CodeGenerator { - public: - TestGenerator() {} - ~TestGenerator() {} - - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - TryInsert("test.pb.h", "includes", context); - TryInsert("test.pb.h", "namespace_scope", context); - TryInsert("test.pb.h", "global_scope", context); - TryInsert("test.pb.h", "class_scope:foo.Bar", context); - TryInsert("test.pb.h", "class_scope:foo.Bar.Baz", context); - - TryInsert("test.pb.cc", "includes", context); - TryInsert("test.pb.cc", "namespace_scope", context); - TryInsert("test.pb.cc", "global_scope", context); - return true; - } - - void TryInsert(const string& filename, const string& insertion_point, - GeneratorContext* context) const { - scoped_ptr output( - context->OpenForInsert(filename, insertion_point)); - io::Printer printer(output.get(), '$'); - printer.Print("// inserted $name$\n", "name", insertion_point); - } -}; - -// This test verifies that all the expected insertion points exist. It does -// not verify that they are correctly-placed; that would require actually -// compiling the output which is a bit more than I care to do for this test. -TEST(CppPluginTest, PluginTest) { - File::WriteStringToFileOrDie( - "syntax = \"proto2\";\n" - "package foo;\n" - "message Bar {\n" - " message Baz {}\n" - "}\n", - TestTempDir() + "/test.proto"); - - google::protobuf::compiler::CommandLineInterface cli; - cli.SetInputsAreProtoPathRelative(true); - - CppGenerator cpp_generator; - TestGenerator test_generator; - cli.RegisterGenerator("--cpp_out", &cpp_generator, ""); - cli.RegisterGenerator("--test_out", &test_generator, ""); - - string proto_path = "-I" + TestTempDir(); - string cpp_out = "--cpp_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); - - const char* argv[] = { - "protoc", - proto_path.c_str(), - cpp_out.c_str(), - test_out.c_str(), - "test.proto" - }; - - EXPECT_EQ(0, cli.Run(5, argv)); -} - -} // namespace -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc deleted file mode 100644 index 5e8df0f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +++ /dev/null @@ -1,382 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -using internal::WireFormatLite; - -namespace { - -// For encodings with fixed sizes, returns that size in bytes. Otherwise -// returns -1. -int FixedSize(FieldDescriptor::Type type) { - switch (type) { - case FieldDescriptor::TYPE_INT32 : return -1; - case FieldDescriptor::TYPE_INT64 : return -1; - case FieldDescriptor::TYPE_UINT32 : return -1; - case FieldDescriptor::TYPE_UINT64 : return -1; - case FieldDescriptor::TYPE_SINT32 : return -1; - case FieldDescriptor::TYPE_SINT64 : return -1; - case FieldDescriptor::TYPE_FIXED32 : return WireFormatLite::kFixed32Size; - case FieldDescriptor::TYPE_FIXED64 : return WireFormatLite::kFixed64Size; - case FieldDescriptor::TYPE_SFIXED32: return WireFormatLite::kSFixed32Size; - case FieldDescriptor::TYPE_SFIXED64: return WireFormatLite::kSFixed64Size; - case FieldDescriptor::TYPE_FLOAT : return WireFormatLite::kFloatSize; - case FieldDescriptor::TYPE_DOUBLE : return WireFormatLite::kDoubleSize; - - case FieldDescriptor::TYPE_BOOL : return WireFormatLite::kBoolSize; - case FieldDescriptor::TYPE_ENUM : return -1; - - case FieldDescriptor::TYPE_STRING : return -1; - case FieldDescriptor::TYPE_BYTES : return -1; - case FieldDescriptor::TYPE_GROUP : return -1; - case FieldDescriptor::TYPE_MESSAGE : return -1; - - // No default because we want the compiler to complain if any new - // types are added. - } - GOOGLE_LOG(FATAL) << "Can't get here."; - return -1; -} - -void SetPrimitiveVariables(const FieldDescriptor* descriptor, - map* variables) { - SetCommonFieldVariables(descriptor, variables); - (*variables)["type"] = PrimitiveTypeName(descriptor->cpp_type()); - (*variables)["default"] = DefaultValue(descriptor); - (*variables)["tag"] = SimpleItoa(internal::WireFormat::MakeTag(descriptor)); - int fixed_size = FixedSize(descriptor->type()); - if (fixed_size != -1) { - (*variables)["fixed_size"] = SimpleItoa(fixed_size); - } - (*variables)["wire_format_field_type"] = - "::google::protobuf::internal::WireFormatLite::" + FieldDescriptorProto_Type_Name( - static_cast(descriptor->type())); -} - -} // namespace - -// =================================================================== - -PrimitiveFieldGenerator:: -PrimitiveFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetPrimitiveVariables(descriptor, &variables_); -} - -PrimitiveFieldGenerator::~PrimitiveFieldGenerator() {} - -void PrimitiveFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, "$type$ $name$_;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $name$() const$deprecation$;\n" - "inline void set_$name$($type$ value)$deprecation$;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $classname$::$name$() const {\n" - " return $name$_;\n" - "}\n" - "inline void $classname$::set_$name$($type$ value) {\n" - " set_has_$name$();\n" - " $name$_ = value;\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "set_$name$(from.$name$());\n"); -} - -void PrimitiveFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "std::swap($name$_, other->$name$_);\n"); -} - -void PrimitiveFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - printer->Print(variables_, - "DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<\n" - " $type$, $wire_format_field_type$>(\n" - " input, &$name$_)));\n" - "set_has_$name$();\n"); -} - -void PrimitiveFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::internal::WireFormatLite::Write$declared_type$(" - "$number$, this->$name$(), output);\n"); -} - -void PrimitiveFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - printer->Print(variables_, - "target = ::google::protobuf::internal::WireFormatLite::Write$declared_type$ToArray(" - "$number$, this->$name$(), target);\n"); -} - -void PrimitiveFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - int fixed_size = FixedSize(descriptor_->type()); - if (fixed_size == -1) { - printer->Print(variables_, - "total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$());\n"); - } else { - printer->Print(variables_, - "total_size += $tag_size$ + $fixed_size$;\n"); - } -} - -// =================================================================== - -RepeatedPrimitiveFieldGenerator:: -RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetPrimitiveVariables(descriptor, &variables_); - - if (descriptor->options().packed()) { - variables_["packed_reader"] = "ReadPackedPrimitive"; - variables_["repeated_reader"] = "ReadRepeatedPrimitiveNoInline"; - } else { - variables_["packed_reader"] = "ReadPackedPrimitiveNoInline"; - variables_["repeated_reader"] = "ReadRepeatedPrimitive"; - } -} - -RepeatedPrimitiveFieldGenerator::~RepeatedPrimitiveFieldGenerator() {} - -void RepeatedPrimitiveFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::RepeatedField< $type$ > $name$_;\n"); - if (descriptor_->options().packed() && HasGeneratedMethods(descriptor_->file())) { - printer->Print(variables_, - "mutable int _$name$_cached_byte_size_;\n"); - } -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $name$(int index) const$deprecation$;\n" - "inline void set_$name$(int index, $type$ value)$deprecation$;\n" - "inline void add_$name$($type$ value)$deprecation$;\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedField< $type$ >&\n" - " $name$() const$deprecation$;\n" - "inline ::google::protobuf::RepeatedField< $type$ >*\n" - " mutable_$name$()$deprecation$;\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline $type$ $classname$::$name$(int index) const {\n" - " return $name$_.Get(index);\n" - "}\n" - "inline void $classname$::set_$name$(int index, $type$ value) {\n" - " $name$_.Set(index, value);\n" - "}\n" - "inline void $classname$::add_$name$($type$ value) {\n" - " $name$_.Add(value);\n" - "}\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedField< $type$ >&\n" - "$classname$::$name$() const {\n" - " return $name$_;\n" - "}\n" - "inline ::google::protobuf::RepeatedField< $type$ >*\n" - "$classname$::mutable_$name$() {\n" - " return &$name$_;\n" - "}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Clear();\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.MergeFrom(from.$name$_);\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Swap(&other->$name$_);\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - // Not needed for repeated fields. -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - printer->Print(variables_, - "DO_((::google::protobuf::internal::WireFormatLite::$repeated_reader$<\n" - " $type$, $wire_format_field_type$>(\n" - " $tag_size$, $tag$, input, this->mutable_$name$())));\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { - printer->Print(variables_, - "DO_((::google::protobuf::internal::WireFormatLite::$packed_reader$<\n" - " $type$, $wire_format_field_type$>(\n" - " input, this->mutable_$name$())));\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - if (descriptor_->options().packed()) { - // Write the tag and the size. - printer->Print(variables_, - "if (this->$name$_size() > 0) {\n" - " ::google::protobuf::internal::WireFormatLite::WriteTag(" - "$number$, " - "::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, " - "output);\n" - " output->WriteVarint32(_$name$_cached_byte_size_);\n" - "}\n"); - } - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (descriptor_->options().packed()) { - printer->Print(variables_, - " ::google::protobuf::internal::WireFormatLite::Write$declared_type$NoTag(\n" - " this->$name$(i), output);\n"); - } else { - printer->Print(variables_, - " ::google::protobuf::internal::WireFormatLite::Write$declared_type$(\n" - " $number$, this->$name$(i), output);\n"); - } - printer->Print("}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - if (descriptor_->options().packed()) { - // Write the tag and the size. - printer->Print(variables_, - "if (this->$name$_size() > 0) {\n" - " target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(\n" - " $number$,\n" - " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" - " target);\n" - " target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(\n" - " _$name$_cached_byte_size_, target);\n" - "}\n"); - } - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (descriptor_->options().packed()) { - printer->Print(variables_, - " target = ::google::protobuf::internal::WireFormatLite::\n" - " Write$declared_type$NoTagToArray(this->$name$(i), target);\n"); - } else { - printer->Print(variables_, - " target = ::google::protobuf::internal::WireFormatLite::\n" - " Write$declared_type$ToArray($number$, this->$name$(i), target);\n"); - } - printer->Print("}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "{\n" - " int data_size = 0;\n"); - printer->Indent(); - int fixed_size = FixedSize(descriptor_->type()); - if (fixed_size == -1) { - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " data_size += ::google::protobuf::internal::WireFormatLite::\n" - " $declared_type$Size(this->$name$(i));\n" - "}\n"); - } else { - printer->Print(variables_, - "data_size = $fixed_size$ * this->$name$_size();\n"); - } - - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (data_size > 0) {\n" - " total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);\n" - "}\n" - "_$name$_cached_byte_size_ = data_size;\n" - "total_size += data_size;\n"); - } else { - printer->Print(variables_, - "total_size += $tag_size$ * this->$name$_size() + data_size;\n"); - } - printer->Outdent(); - printer->Print("}\n"); -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h deleted file mode 100644 index 8fcd74ae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h +++ /dev/null @@ -1,103 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -class PrimitiveFieldGenerator : public FieldGenerator { - public: - explicit PrimitiveFieldGenerator(const FieldDescriptor* descriptor); - ~PrimitiveFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); -}; - -class RepeatedPrimitiveFieldGenerator : public FieldGenerator { - public: - explicit RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor); - ~RepeatedPrimitiveFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_PRIMITIVE_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc deleted file mode 100644 index c2825683..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc +++ /dev/null @@ -1,334 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -ServiceGenerator::ServiceGenerator(const ServiceDescriptor* descriptor, - const string& dllexport_decl) - : descriptor_(descriptor) { - vars_["classname"] = descriptor_->name(); - vars_["full_name"] = descriptor_->full_name(); - if (dllexport_decl.empty()) { - vars_["dllexport"] = ""; - } else { - vars_["dllexport"] = dllexport_decl + " "; - } -} - -ServiceGenerator::~ServiceGenerator() {} - -void ServiceGenerator::GenerateDeclarations(io::Printer* printer) { - // Forward-declare the stub type. - printer->Print(vars_, - "class $classname$_Stub;\n" - "\n"); - - GenerateInterface(printer); - GenerateStubDefinition(printer); -} - -void ServiceGenerator::GenerateInterface(io::Printer* printer) { - printer->Print(vars_, - "class $dllexport$$classname$ : public ::google::protobuf::Service {\n" - " protected:\n" - " // This class should be treated as an abstract interface.\n" - " inline $classname$() {};\n" - " public:\n" - " virtual ~$classname$();\n"); - printer->Indent(); - - printer->Print(vars_, - "\n" - "typedef $classname$_Stub Stub;\n" - "\n" - "static const ::google::protobuf::ServiceDescriptor* descriptor();\n" - "\n"); - - GenerateMethodSignatures(VIRTUAL, printer); - - printer->Print( - "\n" - "// implements Service ----------------------------------------------\n" - "\n" - "const ::google::protobuf::ServiceDescriptor* GetDescriptor();\n" - "void CallMethod(const ::google::protobuf::MethodDescriptor* method,\n" - " ::google::protobuf::RpcController* controller,\n" - " const ::google::protobuf::Message* request,\n" - " ::google::protobuf::Message* response,\n" - " ::google::protobuf::Closure* done);\n" - "const ::google::protobuf::Message& GetRequestPrototype(\n" - " const ::google::protobuf::MethodDescriptor* method) const;\n" - "const ::google::protobuf::Message& GetResponsePrototype(\n" - " const ::google::protobuf::MethodDescriptor* method) const;\n"); - - printer->Outdent(); - printer->Print(vars_, - "\n" - " private:\n" - " GOOGLE_DISALLOW_EVIL_CONSTRUCTORS($classname$);\n" - "};\n" - "\n"); -} - -void ServiceGenerator::GenerateStubDefinition(io::Printer* printer) { - printer->Print(vars_, - "class $dllexport$$classname$_Stub : public $classname$ {\n" - " public:\n"); - - printer->Indent(); - - printer->Print(vars_, - "$classname$_Stub(::google::protobuf::RpcChannel* channel);\n" - "$classname$_Stub(::google::protobuf::RpcChannel* channel,\n" - " ::google::protobuf::Service::ChannelOwnership ownership);\n" - "~$classname$_Stub();\n" - "\n" - "inline ::google::protobuf::RpcChannel* channel() { return channel_; }\n" - "\n" - "// implements $classname$ ------------------------------------------\n" - "\n"); - - GenerateMethodSignatures(NON_VIRTUAL, printer); - - printer->Outdent(); - printer->Print(vars_, - " private:\n" - " ::google::protobuf::RpcChannel* channel_;\n" - " bool owns_channel_;\n" - " GOOGLE_DISALLOW_EVIL_CONSTRUCTORS($classname$_Stub);\n" - "};\n" - "\n"); -} - -void ServiceGenerator::GenerateMethodSignatures( - VirtualOrNon virtual_or_non, io::Printer* printer) { - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map sub_vars; - sub_vars["name"] = method->name(); - sub_vars["input_type"] = ClassName(method->input_type(), true); - sub_vars["output_type"] = ClassName(method->output_type(), true); - sub_vars["virtual"] = virtual_or_non == VIRTUAL ? "virtual " : ""; - - printer->Print(sub_vars, - "$virtual$void $name$(::google::protobuf::RpcController* controller,\n" - " const $input_type$* request,\n" - " $output_type$* response,\n" - " ::google::protobuf::Closure* done);\n"); - } -} - -// =================================================================== - -void ServiceGenerator::GenerateDescriptorInitializer( - io::Printer* printer, int index) { - map vars; - vars["classname"] = descriptor_->name(); - vars["index"] = SimpleItoa(index); - - printer->Print(vars, - "$classname$_descriptor_ = file->service($index$);\n"); -} - -// =================================================================== - -void ServiceGenerator::GenerateImplementation(io::Printer* printer) { - printer->Print(vars_, - "$classname$::~$classname$() {}\n" - "\n" - "const ::google::protobuf::ServiceDescriptor* $classname$::descriptor() {\n" - " protobuf_AssignDescriptorsOnce();\n" - " return $classname$_descriptor_;\n" - "}\n" - "\n" - "const ::google::protobuf::ServiceDescriptor* $classname$::GetDescriptor() {\n" - " protobuf_AssignDescriptorsOnce();\n" - " return $classname$_descriptor_;\n" - "}\n" - "\n"); - - // Generate methods of the interface. - GenerateNotImplementedMethods(printer); - GenerateCallMethod(printer); - GenerateGetPrototype(REQUEST, printer); - GenerateGetPrototype(RESPONSE, printer); - - // Generate stub implementation. - printer->Print(vars_, - "$classname$_Stub::$classname$_Stub(::google::protobuf::RpcChannel* channel)\n" - " : channel_(channel), owns_channel_(false) {}\n" - "$classname$_Stub::$classname$_Stub(\n" - " ::google::protobuf::RpcChannel* channel,\n" - " ::google::protobuf::Service::ChannelOwnership ownership)\n" - " : channel_(channel),\n" - " owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}\n" - "$classname$_Stub::~$classname$_Stub() {\n" - " if (owns_channel_) delete channel_;\n" - "}\n" - "\n"); - - GenerateStubMethods(printer); -} - -void ServiceGenerator::GenerateNotImplementedMethods(io::Printer* printer) { - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map sub_vars; - sub_vars["classname"] = descriptor_->name(); - sub_vars["name"] = method->name(); - sub_vars["index"] = SimpleItoa(i); - sub_vars["input_type"] = ClassName(method->input_type(), true); - sub_vars["output_type"] = ClassName(method->output_type(), true); - - printer->Print(sub_vars, - "void $classname$::$name$(::google::protobuf::RpcController* controller,\n" - " const $input_type$*,\n" - " $output_type$*,\n" - " ::google::protobuf::Closure* done) {\n" - " controller->SetFailed(\"Method $name$() not implemented.\");\n" - " done->Run();\n" - "}\n" - "\n"); - } -} - -void ServiceGenerator::GenerateCallMethod(io::Printer* printer) { - printer->Print(vars_, - "void $classname$::CallMethod(const ::google::protobuf::MethodDescriptor* method,\n" - " ::google::protobuf::RpcController* controller,\n" - " const ::google::protobuf::Message* request,\n" - " ::google::protobuf::Message* response,\n" - " ::google::protobuf::Closure* done) {\n" - " GOOGLE_DCHECK_EQ(method->service(), $classname$_descriptor_);\n" - " switch(method->index()) {\n"); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map sub_vars; - sub_vars["name"] = method->name(); - sub_vars["index"] = SimpleItoa(i); - sub_vars["input_type"] = ClassName(method->input_type(), true); - sub_vars["output_type"] = ClassName(method->output_type(), true); - - // Note: down_cast does not work here because it only works on pointers, - // not references. - printer->Print(sub_vars, - " case $index$:\n" - " $name$(controller,\n" - " ::google::protobuf::down_cast(request),\n" - " ::google::protobuf::down_cast< $output_type$*>(response),\n" - " done);\n" - " break;\n"); - } - - printer->Print(vars_, - " default:\n" - " GOOGLE_LOG(FATAL) << \"Bad method index; this should never happen.\";\n" - " break;\n" - " }\n" - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which, - io::Printer* printer) { - if (which == REQUEST) { - printer->Print(vars_, - "const ::google::protobuf::Message& $classname$::GetRequestPrototype(\n"); - } else { - printer->Print(vars_, - "const ::google::protobuf::Message& $classname$::GetResponsePrototype(\n"); - } - - printer->Print(vars_, - " const ::google::protobuf::MethodDescriptor* method) const {\n" - " GOOGLE_DCHECK_EQ(method->service(), descriptor());\n" - " switch(method->index()) {\n"); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - const Descriptor* type = - (which == REQUEST) ? method->input_type() : method->output_type(); - - map sub_vars; - sub_vars["index"] = SimpleItoa(i); - sub_vars["type"] = ClassName(type, true); - - printer->Print(sub_vars, - " case $index$:\n" - " return $type$::default_instance();\n"); - } - - printer->Print(vars_, - " default:\n" - " GOOGLE_LOG(FATAL) << \"Bad method index; this should never happen.\";\n" - " return *reinterpret_cast< ::google::protobuf::Message*>(NULL);\n" - " }\n" - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateStubMethods(io::Printer* printer) { - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map sub_vars; - sub_vars["classname"] = descriptor_->name(); - sub_vars["name"] = method->name(); - sub_vars["index"] = SimpleItoa(i); - sub_vars["input_type"] = ClassName(method->input_type(), true); - sub_vars["output_type"] = ClassName(method->output_type(), true); - - printer->Print(sub_vars, - "void $classname$_Stub::$name$(::google::protobuf::RpcController* controller,\n" - " const $input_type$* request,\n" - " $output_type$* response,\n" - " ::google::protobuf::Closure* done) {\n" - " channel_->CallMethod(descriptor()->method($index$),\n" - " controller, request, response, done);\n" - "}\n"); - } -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h deleted file mode 100644 index 10e9dd3c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h +++ /dev/null @@ -1,118 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_SERVICE_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_SERVICE_H__ - -#include -#include -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace cpp { - -class ServiceGenerator { - public: - // See generator.cc for the meaning of dllexport_decl. - explicit ServiceGenerator(const ServiceDescriptor* descriptor, - const string& dllexport_decl); - ~ServiceGenerator(); - - // Header stuff. - - // Generate the class definitions for the service's interface and the - // stub implementation. - void GenerateDeclarations(io::Printer* printer); - - // Source file stuff. - - // Generate code that initializes the global variable storing the service's - // descriptor. - void GenerateDescriptorInitializer(io::Printer* printer, int index); - - // Generate implementations of everything declared by GenerateDeclarations(). - void GenerateImplementation(io::Printer* printer); - - private: - enum RequestOrResponse { REQUEST, RESPONSE }; - enum VirtualOrNon { VIRTUAL, NON_VIRTUAL }; - - // Header stuff. - - // Generate the service abstract interface. - void GenerateInterface(io::Printer* printer); - - // Generate the stub class definition. - void GenerateStubDefinition(io::Printer* printer); - - // Prints signatures for all methods in the - void GenerateMethodSignatures(VirtualOrNon virtual_or_non, - io::Printer* printer); - - // Source file stuff. - - // Generate the default implementations of the service methods, which - // produce a "not implemented" error. - void GenerateNotImplementedMethods(io::Printer* printer); - - // Generate the CallMethod() method of the service. - void GenerateCallMethod(io::Printer* printer); - - // Generate the Get{Request,Response}Prototype() methods. - void GenerateGetPrototype(RequestOrResponse which, io::Printer* printer); - - // Generate the stub's implementations of the service methods. - void GenerateStubMethods(io::Printer* printer); - - const ServiceDescriptor* descriptor_; - map vars_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_SERVICE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc deleted file mode 100644 index 8d611b69..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc +++ /dev/null @@ -1,453 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -namespace { - -void SetStringVariables(const FieldDescriptor* descriptor, - map* variables) { - SetCommonFieldVariables(descriptor, variables); - (*variables)["default"] = DefaultValue(descriptor); - (*variables)["default_variable"] = descriptor->default_value_string().empty() - ? "::google::protobuf::internal::kEmptyString" - : "_default_" + FieldName(descriptor) + "_"; - (*variables)["pointer_type"] = - descriptor->type() == FieldDescriptor::TYPE_BYTES ? "void" : "char"; -} - -} // namespace - -// =================================================================== - -StringFieldGenerator:: -StringFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetStringVariables(descriptor, &variables_); -} - -StringFieldGenerator::~StringFieldGenerator() {} - -void StringFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, "::std::string* $name$_;\n"); - if (!descriptor_->default_value_string().empty()) { - printer->Print(variables_, "static const ::std::string $default_variable$;\n"); - } -} - -void StringFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - // If we're using StringFieldGenerator for a field with a ctype, it's - // because that ctype isn't actually implemented. In particular, this is - // true of ctype=CORD and ctype=STRING_PIECE in the open source release. - // We aren't releasing Cord because it has too many Google-specific - // dependencies and we aren't releasing StringPiece because it's hardly - // useful outside of Google and because it would get confusing to have - // multiple instances of the StringPiece class in different libraries (PCRE - // already includes it for their C++ bindings, which came from Google). - // - // In any case, we make all the accessors private while still actually - // using a string to represent the field internally. This way, we can - // guarantee that if we do ever implement the ctype, it won't break any - // existing users who might be -- for whatever reason -- already using .proto - // files that applied the ctype. The field can still be accessed via the - // reflection interface since the reflection interface is independent of - // the string's underlying representation. - if (descriptor_->options().ctype() != FieldOptions::STRING) { - printer->Outdent(); - printer->Print( - " private:\n" - " // Hidden due to unknown ctype option.\n"); - printer->Indent(); - } - - printer->Print(variables_, - "inline const ::std::string& $name$() const$deprecation$;\n" - "inline void set_$name$(const ::std::string& value)$deprecation$;\n" - "inline void set_$name$(const char* value)$deprecation$;\n" - "inline void set_$name$(const $pointer_type$* value, size_t size)" - "$deprecation$;\n" - "inline ::std::string* mutable_$name$()$deprecation$;\n" - "inline ::std::string* release_$name$()$deprecation$;\n"); - - if (descriptor_->options().ctype() != FieldOptions::STRING) { - printer->Outdent(); - printer->Print(" public:\n"); - printer->Indent(); - } -} - -void StringFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline const ::std::string& $classname$::$name$() const {\n" - " return *$name$_;\n" - "}\n" - "inline void $classname$::set_$name$(const ::std::string& value) {\n" - " set_has_$name$();\n" - " if ($name$_ == &$default_variable$) {\n" - " $name$_ = new ::std::string;\n" - " }\n" - " $name$_->assign(value);\n" - "}\n" - "inline void $classname$::set_$name$(const char* value) {\n" - " set_has_$name$();\n" - " if ($name$_ == &$default_variable$) {\n" - " $name$_ = new ::std::string;\n" - " }\n" - " $name$_->assign(value);\n" - "}\n" - "inline " - "void $classname$::set_$name$(const $pointer_type$* value, size_t size) {\n" - " set_has_$name$();\n" - " if ($name$_ == &$default_variable$) {\n" - " $name$_ = new ::std::string;\n" - " }\n" - " $name$_->assign(reinterpret_cast(value), size);\n" - "}\n" - "inline ::std::string* $classname$::mutable_$name$() {\n" - " set_has_$name$();\n" - " if ($name$_ == &$default_variable$) {\n"); - if (descriptor_->default_value_string().empty()) { - printer->Print(variables_, - " $name$_ = new ::std::string;\n"); - } else { - printer->Print(variables_, - " $name$_ = new ::std::string($default_variable$);\n"); - } - printer->Print(variables_, - " }\n" - " return $name$_;\n" - "}\n" - "inline ::std::string* $classname$::release_$name$() {\n" - " clear_has_$name$();\n" - " if ($name$_ == &$default_variable$) {\n" - " return NULL;\n" - " } else {\n" - " ::std::string* temp = $name$_;\n" - " $name$_ = const_cast< ::std::string*>(&$default_variable$);\n" - " return temp;\n" - " }\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateNonInlineAccessorDefinitions(io::Printer* printer) const { - if (!descriptor_->default_value_string().empty()) { - printer->Print(variables_, - "const ::std::string $classname$::$default_variable$($default$);\n"); - } -} - -void StringFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - if (descriptor_->default_value_string().empty()) { - printer->Print(variables_, - "if ($name$_ != &$default_variable$) {\n" - " $name$_->clear();\n" - "}\n"); - } else { - printer->Print(variables_, - "if ($name$_ != &$default_variable$) {\n" - " $name$_->assign($default_variable$);\n" - "}\n"); - } -} - -void StringFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "set_$name$(from.$name$());\n"); -} - -void StringFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "std::swap($name$_, other->$name$_);\n"); -} - -void StringFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = const_cast< ::std::string*>(&$default_variable$);\n"); -} - -void StringFieldGenerator:: -GenerateDestructorCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($name$_ != &$default_variable$) {\n" - " delete $name$_;\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->mutable_$name$()));\n"); - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - "::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$().data(), this->$name$().length(),\n" - " ::google::protobuf::internal::WireFormat::PARSE);\n"); - } -} - -void StringFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - "::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$().data(), this->$name$().length(),\n" - " ::google::protobuf::internal::WireFormat::SERIALIZE);\n"); - } - printer->Print(variables_, - "::google::protobuf::internal::WireFormatLite::Write$declared_type$(\n" - " $number$, this->$name$(), output);\n"); -} - -void StringFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - "::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$().data(), this->$name$().length(),\n" - " ::google::protobuf::internal::WireFormat::SERIALIZE);\n"); - } - printer->Print(variables_, - "target =\n" - " ::google::protobuf::internal::WireFormatLite::Write$declared_type$ToArray(\n" - " $number$, this->$name$(), target);\n"); -} - -void StringFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$());\n"); -} - -// =================================================================== - -RepeatedStringFieldGenerator:: -RepeatedStringFieldGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - SetStringVariables(descriptor, &variables_); -} - -RepeatedStringFieldGenerator::~RepeatedStringFieldGenerator() {} - -void RepeatedStringFieldGenerator:: -GeneratePrivateMembers(io::Printer* printer) const { - printer->Print(variables_, - "::google::protobuf::RepeatedPtrField< ::std::string> $name$_;\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateAccessorDeclarations(io::Printer* printer) const { - // See comment above about unknown ctypes. - if (descriptor_->options().ctype() != FieldOptions::STRING) { - printer->Outdent(); - printer->Print( - " private:\n" - " // Hidden due to unknown ctype option.\n"); - printer->Indent(); - } - - printer->Print(variables_, - "inline const ::std::string& $name$(int index) const$deprecation$;\n" - "inline ::std::string* mutable_$name$(int index)$deprecation$;\n" - "inline void set_$name$(int index, const ::std::string& value)$deprecation$;\n" - "inline void set_$name$(int index, const char* value)$deprecation$;\n" - "inline " - "void set_$name$(int index, const $pointer_type$* value, size_t size)" - "$deprecation$;\n" - "inline ::std::string* add_$name$()$deprecation$;\n" - "inline void add_$name$(const ::std::string& value)$deprecation$;\n" - "inline void add_$name$(const char* value)$deprecation$;\n" - "inline void add_$name$(const $pointer_type$* value, size_t size)" - "$deprecation$;\n"); - - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedPtrField< ::std::string>& $name$() const" - "$deprecation$;\n" - "inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_$name$()" - "$deprecation$;\n"); - - if (descriptor_->options().ctype() != FieldOptions::STRING) { - printer->Outdent(); - printer->Print(" public:\n"); - printer->Indent(); - } -} - -void RepeatedStringFieldGenerator:: -GenerateInlineAccessorDefinitions(io::Printer* printer) const { - printer->Print(variables_, - "inline const ::std::string& $classname$::$name$(int index) const {\n" - " return $name$_.Get(index);\n" - "}\n" - "inline ::std::string* $classname$::mutable_$name$(int index) {\n" - " return $name$_.Mutable(index);\n" - "}\n" - "inline void $classname$::set_$name$(int index, const ::std::string& value) {\n" - " $name$_.Mutable(index)->assign(value);\n" - "}\n" - "inline void $classname$::set_$name$(int index, const char* value) {\n" - " $name$_.Mutable(index)->assign(value);\n" - "}\n" - "inline void " - "$classname$::set_$name$" - "(int index, const $pointer_type$* value, size_t size) {\n" - " $name$_.Mutable(index)->assign(\n" - " reinterpret_cast(value), size);\n" - "}\n" - "inline ::std::string* $classname$::add_$name$() {\n" - " return $name$_.Add();\n" - "}\n" - "inline void $classname$::add_$name$(const ::std::string& value) {\n" - " $name$_.Add()->assign(value);\n" - "}\n" - "inline void $classname$::add_$name$(const char* value) {\n" - " $name$_.Add()->assign(value);\n" - "}\n" - "inline void " - "$classname$::add_$name$(const $pointer_type$* value, size_t size) {\n" - " $name$_.Add()->assign(reinterpret_cast(value), size);\n" - "}\n"); - printer->Print(variables_, - "inline const ::google::protobuf::RepeatedPtrField< ::std::string>&\n" - "$classname$::$name$() const {\n" - " return $name$_;\n" - "}\n" - "inline ::google::protobuf::RepeatedPtrField< ::std::string>*\n" - "$classname$::mutable_$name$() {\n" - " return &$name$_;\n" - "}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateClearingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Clear();\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.MergeFrom(from.$name$_);\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateSwappingCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_.Swap(&other->$name$_);\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateConstructorCode(io::Printer* printer) const { - // Not needed for repeated fields. -} - -void RepeatedStringFieldGenerator:: -GenerateMergeFromCodedStream(io::Printer* printer) const { - printer->Print(variables_, - "DO_(::google::protobuf::internal::WireFormatLite::Read$declared_type$(\n" - " input, this->add_$name$()));\n"); - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - "::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$(0).data(), this->$name$(0).length(),\n" - " ::google::protobuf::internal::WireFormat::PARSE);\n"); - } -} - -void RepeatedStringFieldGenerator:: -GenerateSerializeWithCachedSizes(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - "::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$(i).data(), this->$name$(i).length(),\n" - " ::google::protobuf::internal::WireFormat::SERIALIZE);\n"); - } - printer->Print(variables_, - " ::google::protobuf::internal::WireFormatLite::Write$declared_type$(\n" - " $number$, this->$name$(i), output);\n" - "}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < this->$name$_size(); i++) {\n"); - if (HasUtf8Verification(descriptor_->file()) && - descriptor_->type() == FieldDescriptor::TYPE_STRING) { - printer->Print(variables_, - " ::google::protobuf::internal::WireFormat::VerifyUTF8String(\n" - " this->$name$(i).data(), this->$name$(i).length(),\n" - " ::google::protobuf::internal::WireFormat::SERIALIZE);\n"); - } - printer->Print(variables_, - " target = ::google::protobuf::internal::WireFormatLite::\n" - " Write$declared_type$ToArray($number$, this->$name$(i), target);\n" - "}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateByteSize(io::Printer* printer) const { - printer->Print(variables_, - "total_size += $tag_size$ * this->$name$_size();\n" - "for (int i = 0; i < this->$name$_size(); i++) {\n" - " total_size += ::google::protobuf::internal::WireFormatLite::$declared_type$Size(\n" - " this->$name$(i));\n" - "}\n"); -} - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h deleted file mode 100644 index 7f45107d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_STRING_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_CPP_STRING_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -class StringFieldGenerator : public FieldGenerator { - public: - explicit StringFieldGenerator(const FieldDescriptor* descriptor); - ~StringFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateNonInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateDestructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); -}; - -class RepeatedStringFieldGenerator : public FieldGenerator { - public: - explicit RepeatedStringFieldGenerator(const FieldDescriptor* descriptor); - ~RepeatedStringFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - void GeneratePrivateMembers(io::Printer* printer) const; - void GenerateAccessorDeclarations(io::Printer* printer) const; - void GenerateInlineAccessorDefinitions(io::Printer* printer) const; - void GenerateClearingCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateSwappingCode(io::Printer* printer) const; - void GenerateConstructorCode(io::Printer* printer) const; - void GenerateMergeFromCodedStream(io::Printer* printer) const; - void GenerateSerializeWithCachedSizes(io::Printer* printer) const; - void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; - void GenerateByteSize(io::Printer* printer) const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedStringFieldGenerator); -}; - -} // namespace cpp -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_CPP_STRING_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto deleted file mode 100644 index 54d830fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file tests that various identifiers work as field and type names even -// though the same identifiers are used internally by the C++ code generator. - - -// Some generic_services option(s) added automatically. -// See: http://go/proto2-generic-services-default -option cc_generic_services = true; // auto-added - -// We don't put this in a package within proto2 because we need to make sure -// that the generated code doesn't depend on being in the proto2 namespace. -package protobuf_unittest; - -// Test that fields can have names like "input" and "i" which are also used -// internally by the code generator for local variables. -message TestConflictingSymbolNames { - message BuildDescriptors {} - message TypeTraits {} - - optional int32 input = 1; - optional int32 output = 2; - optional string length = 3; - repeated int32 i = 4; - repeated string new_element = 5 [ctype=STRING_PIECE]; - optional int32 total_size = 6; - optional int32 tag = 7; - - enum TestEnum { FOO = 1; } - message Data1 { repeated int32 data = 1; } - message Data2 { repeated TestEnum data = 1; } - message Data3 { repeated string data = 1; } - message Data4 { repeated Data4 data = 1; } - message Data5 { repeated string data = 1 [ctype=STRING_PIECE]; } - message Data6 { repeated string data = 1 [ctype=CORD]; } - - optional int32 source = 8; - optional int32 value = 9; - optional int32 file = 10; - optional int32 from = 11; - optional int32 handle_uninterpreted = 12; - repeated int32 index = 13; - optional int32 controller = 14; - optional int32 already_here = 15; - - optional uint32 uint32 = 16; - optional uint64 uint64 = 17; - optional string string = 18; - optional int32 memset = 19; - optional int32 int32 = 20; - optional int64 int64 = 21; - - optional uint32 cached_size = 22; - optional uint32 extensions = 23; - optional uint32 bit = 24; - optional uint32 bits = 25; - optional uint32 offsets = 26; - optional uint32 reflection = 27; - - message Cord {} - optional string some_cord = 28 [ctype=CORD]; - - message StringPiece {} - optional string some_string_piece = 29 [ctype=STRING_PIECE]; - - // Some keywords. - optional uint32 int = 30; - optional uint32 friend = 31; - - // The generator used to #define a macro called "DO" inside the .cc file. - message DO {} - optional DO do = 32; - - extensions 1000 to max; -} - -message DummyMessage {} - -service TestConflictingMethodNames { - rpc Closure(DummyMessage) returns (DummyMessage); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc deleted file mode 100644 index 301a7ce6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc +++ /dev/null @@ -1,1281 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// To test the code generator, we actually use it to generate code for -// google/protobuf/unittest.proto, then test that. This means that we -// are actually testing the parser and other parts of the system at the same -// time, and that problems in the generator may show up as compile-time errors -// rather than unittest failures, which may be surprising. However, testing -// the output of the C++ generator directly would be very hard. We can't very -// well just check it against golden files since those files would have to be -// updated for any small change; such a test would be very brittle and probably -// not very helpful. What we really want to test is that the code compiles -// correctly and produces the interfaces we expect, which is why this test -// is written this way. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace cpp { - -// Can't use an anonymous namespace here due to brokenness of Tru64 compiler. -namespace cpp_unittest { - - -class MockErrorCollector : public MultiFileErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", - filename, line, column, message); - } -}; - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - -// Test that generated code has proper descriptors: -// Parse a descriptor directly (using google::protobuf::compiler::Importer) and -// compare it to the one that was produced by generated code. -TEST(GeneratedDescriptorTest, IdenticalDescriptors) { - const FileDescriptor* generated_descriptor = - unittest::TestAllTypes::descriptor()->file(); - - // Set up the Importer. - MockErrorCollector error_collector; - DiskSourceTree source_tree; - source_tree.MapPath("", TestSourceDir()); - Importer importer(&source_tree, &error_collector); - - // Import (parse) unittest.proto. - const FileDescriptor* parsed_descriptor = - importer.Import("google/protobuf/unittest.proto"); - EXPECT_EQ("", error_collector.text_); - ASSERT_TRUE(parsed_descriptor != NULL); - - // Test that descriptors are generated correctly by converting them to - // FileDescriptorProtos and comparing. - FileDescriptorProto generated_decsriptor_proto, parsed_descriptor_proto; - generated_descriptor->CopyTo(&generated_decsriptor_proto); - parsed_descriptor->CopyTo(&parsed_descriptor_proto); - - EXPECT_EQ(parsed_descriptor_proto.DebugString(), - generated_decsriptor_proto.DebugString()); -} - -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - -// =================================================================== - -TEST(GeneratedMessageTest, Defaults) { - // Check that all default values are set correctly in the initial message. - unittest::TestAllTypes message; - - TestUtil::ExpectClear(message); - - // Messages should return pointers to default instances until first use. - // (This is not checked by ExpectClear() since it is not actually true after - // the fields have been set and then cleared.) - EXPECT_EQ(&unittest::TestAllTypes::OptionalGroup::default_instance(), - &message.optionalgroup()); - EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.optional_nested_message()); - EXPECT_EQ(&unittest::ForeignMessage::default_instance(), - &message.optional_foreign_message()); - EXPECT_EQ(&unittest_import::ImportMessage::default_instance(), - &message.optional_import_message()); -} - -TEST(GeneratedMessageTest, FloatingPointDefaults) { - const unittest::TestExtremeDefaultValues& extreme_default = - unittest::TestExtremeDefaultValues::default_instance(); - - EXPECT_EQ(0.0f, extreme_default.zero_float()); - EXPECT_EQ(1.0f, extreme_default.one_float()); - EXPECT_EQ(1.5f, extreme_default.small_float()); - EXPECT_EQ(-1.0f, extreme_default.negative_one_float()); - EXPECT_EQ(-1.5f, extreme_default.negative_float()); - EXPECT_EQ(2.0e8f, extreme_default.large_float()); - EXPECT_EQ(-8e-28f, extreme_default.small_negative_float()); - EXPECT_EQ(numeric_limits::infinity(), - extreme_default.inf_double()); - EXPECT_EQ(-numeric_limits::infinity(), - extreme_default.neg_inf_double()); - EXPECT_TRUE(extreme_default.nan_double() != extreme_default.nan_double()); - EXPECT_EQ(numeric_limits::infinity(), - extreme_default.inf_float()); - EXPECT_EQ(-numeric_limits::infinity(), - extreme_default.neg_inf_float()); - EXPECT_TRUE(extreme_default.nan_float() != extreme_default.nan_float()); -} - -TEST(GeneratedMessageTest, Trigraph) { - const unittest::TestExtremeDefaultValues& extreme_default = - unittest::TestExtremeDefaultValues::default_instance(); - - EXPECT_EQ("? ? ?? ?? ??? ?\?/ ?\?-", extreme_default.cpp_trigraph()); -} - -TEST(GeneratedMessageTest, Accessors) { - // Set every field to a unique value then go back and check all those - // values. - unittest::TestAllTypes message; - - TestUtil::SetAllFields(&message); - TestUtil::ExpectAllFieldsSet(message); - - TestUtil::ModifyRepeatedFields(&message); - TestUtil::ExpectRepeatedFieldsModified(message); -} - -TEST(GeneratedMessageTest, MutableStringDefault) { - // mutable_foo() for a string should return a string initialized to its - // default value. - unittest::TestAllTypes message; - - EXPECT_EQ("hello", *message.mutable_default_string()); - - // Note that the first time we call mutable_foo(), we get a newly-allocated - // string, but if we clear it and call it again, we get the same object again. - // We should verify that it has its default value in both cases. - message.set_default_string("blah"); - message.Clear(); - - EXPECT_EQ("hello", *message.mutable_default_string()); -} - -TEST(GeneratedMessageTest, ReleaseString) { - // Check that release_foo() starts out NULL, and gives us a value - // that we can delete after it's been set. - unittest::TestAllTypes message; - - EXPECT_EQ(NULL, message.release_default_string()); - EXPECT_FALSE(message.has_default_string()); - EXPECT_EQ("hello", message.default_string()); - - message.set_default_string("blah"); - EXPECT_TRUE(message.has_default_string()); - string* str = message.release_default_string(); - EXPECT_FALSE(message.has_default_string()); - ASSERT_TRUE(str != NULL); - EXPECT_EQ("blah", *str); - delete str; - - EXPECT_EQ(NULL, message.release_default_string()); - EXPECT_FALSE(message.has_default_string()); - EXPECT_EQ("hello", message.default_string()); -} - -TEST(GeneratedMessageTest, ReleaseMessage) { - // Check that release_foo() starts out NULL, and gives us a value - // that we can delete after it's been set. - unittest::TestAllTypes message; - - EXPECT_EQ(NULL, message.release_optional_nested_message()); - EXPECT_FALSE(message.has_optional_nested_message()); - - message.mutable_optional_nested_message()->set_bb(1); - unittest::TestAllTypes::NestedMessage* nest = - message.release_optional_nested_message(); - EXPECT_FALSE(message.has_optional_nested_message()); - ASSERT_TRUE(nest != NULL); - EXPECT_EQ(1, nest->bb()); - delete nest; - - EXPECT_EQ(NULL, message.release_optional_nested_message()); - EXPECT_FALSE(message.has_optional_nested_message()); -} - -TEST(GeneratedMessageTest, Clear) { - // Set every field to a unique value, clear the message, then check that - // it is cleared. - unittest::TestAllTypes message; - - TestUtil::SetAllFields(&message); - message.Clear(); - TestUtil::ExpectClear(message); - - // Unlike with the defaults test, we do NOT expect that requesting embedded - // messages will return a pointer to the default instance. Instead, they - // should return the objects that were created when mutable_blah() was - // called. - EXPECT_NE(&unittest::TestAllTypes::OptionalGroup::default_instance(), - &message.optionalgroup()); - EXPECT_NE(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.optional_nested_message()); - EXPECT_NE(&unittest::ForeignMessage::default_instance(), - &message.optional_foreign_message()); - EXPECT_NE(&unittest_import::ImportMessage::default_instance(), - &message.optional_import_message()); -} - -TEST(GeneratedMessageTest, EmbeddedNullsInBytesCharStar) { - unittest::TestAllTypes message; - - const char* value = "\0lalala\0\0"; - message.set_optional_bytes(value, 9); - ASSERT_EQ(9, message.optional_bytes().size()); - EXPECT_EQ(0, memcmp(value, message.optional_bytes().data(), 9)); - - message.add_repeated_bytes(value, 9); - ASSERT_EQ(9, message.repeated_bytes(0).size()); - EXPECT_EQ(0, memcmp(value, message.repeated_bytes(0).data(), 9)); -} - -TEST(GeneratedMessageTest, ClearOneField) { - // Set every field to a unique value, then clear one value and insure that - // only that one value is cleared. - unittest::TestAllTypes message; - - TestUtil::SetAllFields(&message); - int64 original_value = message.optional_int64(); - - // Clear the field and make sure it shows up as cleared. - message.clear_optional_int64(); - EXPECT_FALSE(message.has_optional_int64()); - EXPECT_EQ(0, message.optional_int64()); - - // Other adjacent fields should not be cleared. - EXPECT_TRUE(message.has_optional_int32()); - EXPECT_TRUE(message.has_optional_uint32()); - - // Make sure if we set it again, then all fields are set. - message.set_optional_int64(original_value); - TestUtil::ExpectAllFieldsSet(message); -} - -TEST(GeneratedMessageTest, StringCharStarLength) { - // Verify that we can use a char*,length to set one of the string fields. - unittest::TestAllTypes message; - message.set_optional_string("abcdef", 3); - EXPECT_EQ("abc", message.optional_string()); - - // Verify that we can use a char*,length to add to a repeated string field. - message.add_repeated_string("abcdef", 3); - EXPECT_EQ(1, message.repeated_string_size()); - EXPECT_EQ("abc", message.repeated_string(0)); - - // Verify that we can use a char*,length to set a repeated string field. - message.set_repeated_string(0, "wxyz", 2); - EXPECT_EQ("wx", message.repeated_string(0)); -} - - -TEST(GeneratedMessageTest, CopyFrom) { - unittest::TestAllTypes message1, message2; - - TestUtil::SetAllFields(&message1); - message2.CopyFrom(message1); - TestUtil::ExpectAllFieldsSet(message2); - - // Copying from self should be a no-op. - message2.CopyFrom(message2); - TestUtil::ExpectAllFieldsSet(message2); -} - - -TEST(GeneratedMessageTest, SwapWithEmpty) { - unittest::TestAllTypes message1, message2; - TestUtil::SetAllFields(&message1); - - TestUtil::ExpectAllFieldsSet(message1); - TestUtil::ExpectClear(message2); - message1.Swap(&message2); - TestUtil::ExpectAllFieldsSet(message2); - TestUtil::ExpectClear(message1); -} - -TEST(GeneratedMessageTest, SwapWithSelf) { - unittest::TestAllTypes message; - TestUtil::SetAllFields(&message); - TestUtil::ExpectAllFieldsSet(message); - message.Swap(&message); - TestUtil::ExpectAllFieldsSet(message); -} - -TEST(GeneratedMessageTest, SwapWithOther) { - unittest::TestAllTypes message1, message2; - - message1.set_optional_int32(123); - message1.set_optional_string("abc"); - message1.mutable_optional_nested_message()->set_bb(1); - message1.set_optional_nested_enum(unittest::TestAllTypes::FOO); - message1.add_repeated_int32(1); - message1.add_repeated_int32(2); - message1.add_repeated_string("a"); - message1.add_repeated_string("b"); - message1.add_repeated_nested_message()->set_bb(7); - message1.add_repeated_nested_message()->set_bb(8); - message1.add_repeated_nested_enum(unittest::TestAllTypes::FOO); - message1.add_repeated_nested_enum(unittest::TestAllTypes::BAR); - - message2.set_optional_int32(456); - message2.set_optional_string("def"); - message2.mutable_optional_nested_message()->set_bb(2); - message2.set_optional_nested_enum(unittest::TestAllTypes::BAR); - message2.add_repeated_int32(3); - message2.add_repeated_string("c"); - message2.add_repeated_nested_message()->set_bb(9); - message2.add_repeated_nested_enum(unittest::TestAllTypes::BAZ); - - message1.Swap(&message2); - - EXPECT_EQ(456, message1.optional_int32()); - EXPECT_EQ("def", message1.optional_string()); - EXPECT_EQ(2, message1.optional_nested_message().bb()); - EXPECT_EQ(unittest::TestAllTypes::BAR, message1.optional_nested_enum()); - ASSERT_EQ(1, message1.repeated_int32_size()); - EXPECT_EQ(3, message1.repeated_int32(0)); - ASSERT_EQ(1, message1.repeated_string_size()); - EXPECT_EQ("c", message1.repeated_string(0)); - ASSERT_EQ(1, message1.repeated_nested_message_size()); - EXPECT_EQ(9, message1.repeated_nested_message(0).bb()); - ASSERT_EQ(1, message1.repeated_nested_enum_size()); - EXPECT_EQ(unittest::TestAllTypes::BAZ, message1.repeated_nested_enum(0)); - - EXPECT_EQ(123, message2.optional_int32()); - EXPECT_EQ("abc", message2.optional_string()); - EXPECT_EQ(1, message2.optional_nested_message().bb()); - EXPECT_EQ(unittest::TestAllTypes::FOO, message2.optional_nested_enum()); - ASSERT_EQ(2, message2.repeated_int32_size()); - EXPECT_EQ(1, message2.repeated_int32(0)); - EXPECT_EQ(2, message2.repeated_int32(1)); - ASSERT_EQ(2, message2.repeated_string_size()); - EXPECT_EQ("a", message2.repeated_string(0)); - EXPECT_EQ("b", message2.repeated_string(1)); - ASSERT_EQ(2, message2.repeated_nested_message_size()); - EXPECT_EQ(7, message2.repeated_nested_message(0).bb()); - EXPECT_EQ(8, message2.repeated_nested_message(1).bb()); - ASSERT_EQ(2, message2.repeated_nested_enum_size()); - EXPECT_EQ(unittest::TestAllTypes::FOO, message2.repeated_nested_enum(0)); - EXPECT_EQ(unittest::TestAllTypes::BAR, message2.repeated_nested_enum(1)); -} - -TEST(GeneratedMessageTest, CopyConstructor) { - unittest::TestAllTypes message1; - TestUtil::SetAllFields(&message1); - - unittest::TestAllTypes message2(message1); - TestUtil::ExpectAllFieldsSet(message2); -} - -TEST(GeneratedMessageTest, CopyAssignmentOperator) { - unittest::TestAllTypes message1; - TestUtil::SetAllFields(&message1); - - unittest::TestAllTypes message2; - message2 = message1; - TestUtil::ExpectAllFieldsSet(message2); - - // Make sure that self-assignment does something sane. - message2.operator=(message2); - TestUtil::ExpectAllFieldsSet(message2); -} - -TEST(GeneratedMessageTest, UpcastCopyFrom) { - // Test the CopyFrom method that takes in the generic const Message& - // parameter. - unittest::TestAllTypes message1, message2; - - TestUtil::SetAllFields(&message1); - - const Message* source = implicit_cast(&message1); - message2.CopyFrom(*source); - - TestUtil::ExpectAllFieldsSet(message2); -} - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - -TEST(GeneratedMessageTest, DynamicMessageCopyFrom) { - // Test copying from a DynamicMessage, which must fall back to using - // reflection. - unittest::TestAllTypes message2; - - // Construct a new version of the dynamic message via the factory. - DynamicMessageFactory factory; - scoped_ptr message1; - message1.reset(factory.GetPrototype( - unittest::TestAllTypes::descriptor())->New()); - - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - reflection_tester.SetAllFieldsViaReflection(message1.get()); - - message2.CopyFrom(*message1); - - TestUtil::ExpectAllFieldsSet(message2); -} - -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - -TEST(GeneratedMessageTest, NonEmptyMergeFrom) { - // Test merging with a non-empty message. Code is a modified form - // of that found in google/protobuf/reflection_ops_unittest.cc. - unittest::TestAllTypes message1, message2; - - TestUtil::SetAllFields(&message1); - - // This field will test merging into an empty spot. - message2.set_optional_int32(message1.optional_int32()); - message1.clear_optional_int32(); - - // This tests overwriting. - message2.set_optional_string(message1.optional_string()); - message1.set_optional_string("something else"); - - // This tests concatenating. - message2.add_repeated_int32(message1.repeated_int32(1)); - int32 i = message1.repeated_int32(0); - message1.clear_repeated_int32(); - message1.add_repeated_int32(i); - - message1.MergeFrom(message2); - - TestUtil::ExpectAllFieldsSet(message1); -} - -#ifdef GTEST_HAS_DEATH_TEST - -TEST(GeneratedMessageTest, MergeFromSelf) { - unittest::TestAllTypes message; - EXPECT_DEATH(message.MergeFrom(message), "&from"); - EXPECT_DEATH(message.MergeFrom(implicit_cast(message)), - "&from"); -} - -#endif // GTEST_HAS_DEATH_TEST - -// Test the generated SerializeWithCachedSizesToArray(), -TEST(GeneratedMessageTest, SerializationToArray) { - unittest::TestAllTypes message1, message2; - string data; - TestUtil::SetAllFields(&message1); - int size = message1.ByteSize(); - data.resize(size); - uint8* start = reinterpret_cast(string_as_array(&data)); - uint8* end = message1.SerializeWithCachedSizesToArray(start); - EXPECT_EQ(size, end - start); - EXPECT_TRUE(message2.ParseFromString(data)); - TestUtil::ExpectAllFieldsSet(message2); - -} - -TEST(GeneratedMessageTest, PackedFieldsSerializationToArray) { - unittest::TestPackedTypes packed_message1, packed_message2; - string packed_data; - TestUtil::SetPackedFields(&packed_message1); - int packed_size = packed_message1.ByteSize(); - packed_data.resize(packed_size); - uint8* start = reinterpret_cast(string_as_array(&packed_data)); - uint8* end = packed_message1.SerializeWithCachedSizesToArray(start); - EXPECT_EQ(packed_size, end - start); - EXPECT_TRUE(packed_message2.ParseFromString(packed_data)); - TestUtil::ExpectPackedFieldsSet(packed_message2); -} - -// Test the generated SerializeWithCachedSizes() by forcing the buffer to write -// one byte at a time. -TEST(GeneratedMessageTest, SerializationToStream) { - unittest::TestAllTypes message1, message2; - TestUtil::SetAllFields(&message1); - int size = message1.ByteSize(); - string data; - data.resize(size); - { - // Allow the output stream to buffer only one byte at a time. - io::ArrayOutputStream array_stream(string_as_array(&data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - message1.SerializeWithCachedSizes(&output_stream); - EXPECT_FALSE(output_stream.HadError()); - EXPECT_EQ(size, output_stream.ByteCount()); - } - EXPECT_TRUE(message2.ParseFromString(data)); - TestUtil::ExpectAllFieldsSet(message2); - -} - -TEST(GeneratedMessageTest, PackedFieldsSerializationToStream) { - unittest::TestPackedTypes message1, message2; - TestUtil::SetPackedFields(&message1); - int size = message1.ByteSize(); - string data; - data.resize(size); - { - // Allow the output stream to buffer only one byte at a time. - io::ArrayOutputStream array_stream(string_as_array(&data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - message1.SerializeWithCachedSizes(&output_stream); - EXPECT_FALSE(output_stream.HadError()); - EXPECT_EQ(size, output_stream.ByteCount()); - } - EXPECT_TRUE(message2.ParseFromString(data)); - TestUtil::ExpectPackedFieldsSet(message2); -} - - -TEST(GeneratedMessageTest, Required) { - // Test that IsInitialized() returns false if required fields are missing. - unittest::TestRequired message; - - EXPECT_FALSE(message.IsInitialized()); - message.set_a(1); - EXPECT_FALSE(message.IsInitialized()); - message.set_b(2); - EXPECT_FALSE(message.IsInitialized()); - message.set_c(3); - EXPECT_TRUE(message.IsInitialized()); -} - -TEST(GeneratedMessageTest, RequiredForeign) { - // Test that IsInitialized() returns false if required fields in nested - // messages are missing. - unittest::TestRequiredForeign message; - - EXPECT_TRUE(message.IsInitialized()); - - message.mutable_optional_message(); - EXPECT_FALSE(message.IsInitialized()); - - message.mutable_optional_message()->set_a(1); - message.mutable_optional_message()->set_b(2); - message.mutable_optional_message()->set_c(3); - EXPECT_TRUE(message.IsInitialized()); - - message.add_repeated_message(); - EXPECT_FALSE(message.IsInitialized()); - - message.mutable_repeated_message(0)->set_a(1); - message.mutable_repeated_message(0)->set_b(2); - message.mutable_repeated_message(0)->set_c(3); - EXPECT_TRUE(message.IsInitialized()); -} - -TEST(GeneratedMessageTest, ForeignNested) { - // Test that TestAllTypes::NestedMessage can be embedded directly into - // another message. - unittest::TestForeignNested message; - - // If this compiles and runs without crashing, it must work. We have - // nothing more to test. - unittest::TestAllTypes::NestedMessage* nested = - message.mutable_foreign_nested(); - nested->set_bb(1); -} - -TEST(GeneratedMessageTest, ReallyLargeTagNumber) { - // Test that really large tag numbers don't break anything. - unittest::TestReallyLargeTagNumber message1, message2; - string data; - - // For the most part, if this compiles and runs then we're probably good. - // (The most likely cause for failure would be if something were attempting - // to allocate a lookup table of some sort using tag numbers as the index.) - // We'll try serializing just for fun. - message1.set_a(1234); - message1.set_bb(5678); - message1.SerializeToString(&data); - EXPECT_TRUE(message2.ParseFromString(data)); - EXPECT_EQ(1234, message2.a()); - EXPECT_EQ(5678, message2.bb()); -} - -TEST(GeneratedMessageTest, MutualRecursion) { - // Test that mutually-recursive message types work. - unittest::TestMutualRecursionA message; - unittest::TestMutualRecursionA* nested = message.mutable_bb()->mutable_a(); - unittest::TestMutualRecursionA* nested2 = nested->mutable_bb()->mutable_a(); - - // Again, if the above compiles and runs, that's all we really have to - // test, but just for run we'll check that the system didn't somehow come - // up with a pointer loop... - EXPECT_NE(&message, nested); - EXPECT_NE(&message, nested2); - EXPECT_NE(nested, nested2); -} - -TEST(GeneratedMessageTest, CamelCaseFieldNames) { - // This test is mainly checking that the following compiles, which verifies - // that the field names were coerced to lower-case. - // - // Protocol buffers standard style is to use lowercase-with-underscores for - // field names. Some old proto1 .protos unfortunately used camel-case field - // names. In proto1, these names were forced to lower-case. So, we do the - // same thing in proto2. - - unittest::TestCamelCaseFieldNames message; - - message.set_primitivefield(2); - message.set_stringfield("foo"); - message.set_enumfield(unittest::FOREIGN_FOO); - message.mutable_messagefield()->set_c(6); - - message.add_repeatedprimitivefield(8); - message.add_repeatedstringfield("qux"); - message.add_repeatedenumfield(unittest::FOREIGN_BAR); - message.add_repeatedmessagefield()->set_c(15); - - EXPECT_EQ(2, message.primitivefield()); - EXPECT_EQ("foo", message.stringfield()); - EXPECT_EQ(unittest::FOREIGN_FOO, message.enumfield()); - EXPECT_EQ(6, message.messagefield().c()); - - EXPECT_EQ(8, message.repeatedprimitivefield(0)); - EXPECT_EQ("qux", message.repeatedstringfield(0)); - EXPECT_EQ(unittest::FOREIGN_BAR, message.repeatedenumfield(0)); - EXPECT_EQ(15, message.repeatedmessagefield(0).c()); -} - -TEST(GeneratedMessageTest, TestConflictingSymbolNames) { - // test_bad_identifiers.proto successfully compiled, then it works. The - // following is just a token usage to insure that the code is, in fact, - // being compiled and linked. - - protobuf_unittest::TestConflictingSymbolNames message; - message.set_uint32(1); - EXPECT_EQ(3, message.ByteSize()); - - message.set_friend_(5); - EXPECT_EQ(5, message.friend_()); -} - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - -TEST(GeneratedMessageTest, TestOptimizedForSize) { - // We rely on the tests in reflection_ops_unittest and wire_format_unittest - // to really test that reflection-based methods work. Here we are mostly - // just making sure that TestOptimizedForSize actually builds and seems to - // function. - - protobuf_unittest::TestOptimizedForSize message, message2; - message.set_i(1); - message.mutable_msg()->set_c(2); - message2.CopyFrom(message); - EXPECT_EQ(1, message2.i()); - EXPECT_EQ(2, message2.msg().c()); -} - -TEST(GeneratedMessageTest, TestEmbedOptimizedForSize) { - // Verifies that something optimized for speed can contain something optimized - // for size. - - protobuf_unittest::TestEmbedOptimizedForSize message, message2; - message.mutable_optional_message()->set_i(1); - message.add_repeated_message()->mutable_msg()->set_c(2); - string data; - message.SerializeToString(&data); - ASSERT_TRUE(message2.ParseFromString(data)); - EXPECT_EQ(1, message2.optional_message().i()); - EXPECT_EQ(2, message2.repeated_message(0).msg().c()); -} - -TEST(GeneratedMessageTest, TestSpaceUsed) { - unittest::TestAllTypes message1; - // sizeof provides a lower bound on SpaceUsed(). - EXPECT_LE(sizeof(unittest::TestAllTypes), message1.SpaceUsed()); - const int empty_message_size = message1.SpaceUsed(); - - // Setting primitive types shouldn't affect the space used. - message1.set_optional_int32(123); - message1.set_optional_int64(12345); - message1.set_optional_uint32(123); - message1.set_optional_uint64(12345); - EXPECT_EQ(empty_message_size, message1.SpaceUsed()); - - // On some STL implementations, setting the string to a small value should - // only increase SpaceUsed() by the size of a string object, though this is - // not true everywhere. - message1.set_optional_string("abc"); - EXPECT_LE(empty_message_size + sizeof(string), message1.SpaceUsed()); - - // Setting a string to a value larger than the string object itself should - // increase SpaceUsed(), because it cannot store the value internally. - message1.set_optional_string(string(sizeof(string) + 1, 'x')); - int min_expected_increase = message1.optional_string().capacity() + - sizeof(string); - EXPECT_LE(empty_message_size + min_expected_increase, - message1.SpaceUsed()); - - int previous_size = message1.SpaceUsed(); - // Adding an optional message should increase the size by the size of the - // nested message type. NestedMessage is simple enough (1 int field) that it - // is equal to sizeof(NestedMessage) - message1.mutable_optional_nested_message(); - ASSERT_EQ(sizeof(unittest::TestAllTypes::NestedMessage), - message1.optional_nested_message().SpaceUsed()); - EXPECT_EQ(previous_size + - sizeof(unittest::TestAllTypes::NestedMessage), - message1.SpaceUsed()); -} - -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - - -TEST(GeneratedMessageTest, FieldConstantValues) { - unittest::TestRequired message; - EXPECT_EQ(unittest::TestAllTypes_NestedMessage::kBbFieldNumber, 1); - EXPECT_EQ(unittest::TestAllTypes::kOptionalInt32FieldNumber, 1); - EXPECT_EQ(unittest::TestAllTypes::kOptionalgroupFieldNumber, 16); - EXPECT_EQ(unittest::TestAllTypes::kOptionalNestedMessageFieldNumber, 18); - EXPECT_EQ(unittest::TestAllTypes::kOptionalNestedEnumFieldNumber, 21); - EXPECT_EQ(unittest::TestAllTypes::kRepeatedInt32FieldNumber, 31); - EXPECT_EQ(unittest::TestAllTypes::kRepeatedgroupFieldNumber, 46); - EXPECT_EQ(unittest::TestAllTypes::kRepeatedNestedMessageFieldNumber, 48); - EXPECT_EQ(unittest::TestAllTypes::kRepeatedNestedEnumFieldNumber, 51); -} - -TEST(GeneratedMessageTest, ExtensionConstantValues) { - EXPECT_EQ(unittest::TestRequired::kSingleFieldNumber, 1000); - EXPECT_EQ(unittest::TestRequired::kMultiFieldNumber, 1001); - EXPECT_EQ(unittest::kOptionalInt32ExtensionFieldNumber, 1); - EXPECT_EQ(unittest::kOptionalgroupExtensionFieldNumber, 16); - EXPECT_EQ(unittest::kOptionalNestedMessageExtensionFieldNumber, 18); - EXPECT_EQ(unittest::kOptionalNestedEnumExtensionFieldNumber, 21); - EXPECT_EQ(unittest::kRepeatedInt32ExtensionFieldNumber, 31); - EXPECT_EQ(unittest::kRepeatedgroupExtensionFieldNumber, 46); - EXPECT_EQ(unittest::kRepeatedNestedMessageExtensionFieldNumber, 48); - EXPECT_EQ(unittest::kRepeatedNestedEnumExtensionFieldNumber, 51); -} - -// =================================================================== - -TEST(GeneratedEnumTest, EnumValuesAsSwitchCases) { - // Test that our nested enum values can be used as switch cases. This test - // doesn't actually do anything, the proof that it works is that it - // compiles. - int i =0; - unittest::TestAllTypes::NestedEnum a = unittest::TestAllTypes::BAR; - switch (a) { - case unittest::TestAllTypes::FOO: - i = 1; - break; - case unittest::TestAllTypes::BAR: - i = 2; - break; - case unittest::TestAllTypes::BAZ: - i = 3; - break; - // no default case: We want to make sure the compiler recognizes that - // all cases are covered. (GCC warns if you do not cover all cases of - // an enum in a switch.) - } - - // Token check just for fun. - EXPECT_EQ(2, i); -} - -TEST(GeneratedEnumTest, IsValidValue) { - // Test enum IsValidValue. - EXPECT_TRUE(unittest::TestAllTypes::NestedEnum_IsValid(1)); - EXPECT_TRUE(unittest::TestAllTypes::NestedEnum_IsValid(2)); - EXPECT_TRUE(unittest::TestAllTypes::NestedEnum_IsValid(3)); - - EXPECT_FALSE(unittest::TestAllTypes::NestedEnum_IsValid(0)); - EXPECT_FALSE(unittest::TestAllTypes::NestedEnum_IsValid(4)); - - // Make sure it also works when there are dups. - EXPECT_TRUE(unittest::TestEnumWithDupValue_IsValid(1)); - EXPECT_TRUE(unittest::TestEnumWithDupValue_IsValid(2)); - EXPECT_TRUE(unittest::TestEnumWithDupValue_IsValid(3)); - - EXPECT_FALSE(unittest::TestEnumWithDupValue_IsValid(0)); - EXPECT_FALSE(unittest::TestEnumWithDupValue_IsValid(4)); -} - -TEST(GeneratedEnumTest, MinAndMax) { - EXPECT_EQ(unittest::TestAllTypes::FOO, - unittest::TestAllTypes::NestedEnum_MIN); - EXPECT_EQ(unittest::TestAllTypes::BAZ, - unittest::TestAllTypes::NestedEnum_MAX); - EXPECT_EQ(4, unittest::TestAllTypes::NestedEnum_ARRAYSIZE); - - EXPECT_EQ(unittest::FOREIGN_FOO, unittest::ForeignEnum_MIN); - EXPECT_EQ(unittest::FOREIGN_BAZ, unittest::ForeignEnum_MAX); - EXPECT_EQ(7, unittest::ForeignEnum_ARRAYSIZE); - - EXPECT_EQ(1, unittest::TestEnumWithDupValue_MIN); - EXPECT_EQ(3, unittest::TestEnumWithDupValue_MAX); - EXPECT_EQ(4, unittest::TestEnumWithDupValue_ARRAYSIZE); - - EXPECT_EQ(unittest::SPARSE_E, unittest::TestSparseEnum_MIN); - EXPECT_EQ(unittest::SPARSE_C, unittest::TestSparseEnum_MAX); - EXPECT_EQ(12589235, unittest::TestSparseEnum_ARRAYSIZE); - - // Make sure we can take the address of _MIN, _MAX and _ARRAYSIZE. - void* null_pointer = 0; // NULL may be integer-type, not pointer-type. - EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_MIN); - EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_MAX); - EXPECT_NE(null_pointer, &unittest::TestAllTypes::NestedEnum_ARRAYSIZE); - - EXPECT_NE(null_pointer, &unittest::ForeignEnum_MIN); - EXPECT_NE(null_pointer, &unittest::ForeignEnum_MAX); - EXPECT_NE(null_pointer, &unittest::ForeignEnum_ARRAYSIZE); - - // Make sure we can use _MIN, _MAX and _ARRAYSIZE as switch cases. - switch (unittest::SPARSE_A) { - case unittest::TestSparseEnum_MIN: - case unittest::TestSparseEnum_MAX: - case unittest::TestSparseEnum_ARRAYSIZE: - break; - default: - break; - } -} - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - -TEST(GeneratedEnumTest, Name) { - // "Names" in the presence of dup values are a bit arbitrary. - EXPECT_EQ("FOO1", unittest::TestEnumWithDupValue_Name(unittest::FOO1)); - EXPECT_EQ("FOO1", unittest::TestEnumWithDupValue_Name(unittest::FOO2)); - - EXPECT_EQ("SPARSE_A", unittest::TestSparseEnum_Name(unittest::SPARSE_A)); - EXPECT_EQ("SPARSE_B", unittest::TestSparseEnum_Name(unittest::SPARSE_B)); - EXPECT_EQ("SPARSE_C", unittest::TestSparseEnum_Name(unittest::SPARSE_C)); - EXPECT_EQ("SPARSE_D", unittest::TestSparseEnum_Name(unittest::SPARSE_D)); - EXPECT_EQ("SPARSE_E", unittest::TestSparseEnum_Name(unittest::SPARSE_E)); - EXPECT_EQ("SPARSE_F", unittest::TestSparseEnum_Name(unittest::SPARSE_F)); - EXPECT_EQ("SPARSE_G", unittest::TestSparseEnum_Name(unittest::SPARSE_G)); -} - -TEST(GeneratedEnumTest, Parse) { - unittest::TestEnumWithDupValue dup_value = unittest::FOO1; - EXPECT_TRUE(unittest::TestEnumWithDupValue_Parse("FOO1", &dup_value)); - EXPECT_EQ(unittest::FOO1, dup_value); - EXPECT_TRUE(unittest::TestEnumWithDupValue_Parse("FOO2", &dup_value)); - EXPECT_EQ(unittest::FOO2, dup_value); - EXPECT_FALSE(unittest::TestEnumWithDupValue_Parse("FOO", &dup_value)); -} - -TEST(GeneratedEnumTest, GetEnumDescriptor) { - EXPECT_EQ(unittest::TestAllTypes::NestedEnum_descriptor(), - GetEnumDescriptor()); - EXPECT_EQ(unittest::ForeignEnum_descriptor(), - GetEnumDescriptor()); - EXPECT_EQ(unittest::TestEnumWithDupValue_descriptor(), - GetEnumDescriptor()); - EXPECT_EQ(unittest::TestSparseEnum_descriptor(), - GetEnumDescriptor()); -} - -#endif // PROTOBUF_TEST_NO_DESCRIPTORS - -// =================================================================== - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - -// Support code for testing services. -class GeneratedServiceTest : public testing::Test { - protected: - class MockTestService : public unittest::TestService { - public: - MockTestService() - : called_(false), - method_(""), - controller_(NULL), - request_(NULL), - response_(NULL), - done_(NULL) {} - - ~MockTestService() {} - - void Reset() { called_ = false; } - - // implements TestService ---------------------------------------- - - void Foo(RpcController* controller, - const unittest::FooRequest* request, - unittest::FooResponse* response, - Closure* done) { - ASSERT_FALSE(called_); - called_ = true; - method_ = "Foo"; - controller_ = controller; - request_ = request; - response_ = response; - done_ = done; - } - - void Bar(RpcController* controller, - const unittest::BarRequest* request, - unittest::BarResponse* response, - Closure* done) { - ASSERT_FALSE(called_); - called_ = true; - method_ = "Bar"; - controller_ = controller; - request_ = request; - response_ = response; - done_ = done; - } - - // --------------------------------------------------------------- - - bool called_; - string method_; - RpcController* controller_; - const Message* request_; - Message* response_; - Closure* done_; - }; - - class MockRpcChannel : public RpcChannel { - public: - MockRpcChannel() - : called_(false), - method_(NULL), - controller_(NULL), - request_(NULL), - response_(NULL), - done_(NULL), - destroyed_(NULL) {} - - ~MockRpcChannel() { - if (destroyed_ != NULL) *destroyed_ = true; - } - - void Reset() { called_ = false; } - - // implements TestService ---------------------------------------- - - void CallMethod(const MethodDescriptor* method, - RpcController* controller, - const Message* request, - Message* response, - Closure* done) { - ASSERT_FALSE(called_); - called_ = true; - method_ = method; - controller_ = controller; - request_ = request; - response_ = response; - done_ = done; - } - - // --------------------------------------------------------------- - - bool called_; - const MethodDescriptor* method_; - RpcController* controller_; - const Message* request_; - Message* response_; - Closure* done_; - bool* destroyed_; - }; - - class MockController : public RpcController { - public: - void Reset() { - ADD_FAILURE() << "Reset() not expected during this test."; - } - bool Failed() const { - ADD_FAILURE() << "Failed() not expected during this test."; - return false; - } - string ErrorText() const { - ADD_FAILURE() << "ErrorText() not expected during this test."; - return ""; - } - void StartCancel() { - ADD_FAILURE() << "StartCancel() not expected during this test."; - } - void SetFailed(const string& reason) { - ADD_FAILURE() << "SetFailed() not expected during this test."; - } - bool IsCanceled() const { - ADD_FAILURE() << "IsCanceled() not expected during this test."; - return false; - } - void NotifyOnCancel(Closure* callback) { - ADD_FAILURE() << "NotifyOnCancel() not expected during this test."; - } - }; - - GeneratedServiceTest() - : descriptor_(unittest::TestService::descriptor()), - foo_(descriptor_->FindMethodByName("Foo")), - bar_(descriptor_->FindMethodByName("Bar")), - stub_(&mock_channel_), - done_(NewPermanentCallback(&DoNothing)) {} - - virtual void SetUp() { - ASSERT_TRUE(foo_ != NULL); - ASSERT_TRUE(bar_ != NULL); - } - - const ServiceDescriptor* descriptor_; - const MethodDescriptor* foo_; - const MethodDescriptor* bar_; - - MockTestService mock_service_; - MockController mock_controller_; - - MockRpcChannel mock_channel_; - unittest::TestService::Stub stub_; - - // Just so we don't have to re-define these with every test. - unittest::FooRequest foo_request_; - unittest::FooResponse foo_response_; - unittest::BarRequest bar_request_; - unittest::BarResponse bar_response_; - scoped_ptr done_; -}; - -TEST_F(GeneratedServiceTest, GetDescriptor) { - // Test that GetDescriptor() works. - - EXPECT_EQ(descriptor_, mock_service_.GetDescriptor()); -} - -TEST_F(GeneratedServiceTest, GetChannel) { - EXPECT_EQ(&mock_channel_, stub_.channel()); -} - -TEST_F(GeneratedServiceTest, OwnsChannel) { - MockRpcChannel* channel = new MockRpcChannel; - bool destroyed = false; - channel->destroyed_ = &destroyed; - - { - unittest::TestService::Stub owning_stub(channel, - Service::STUB_OWNS_CHANNEL); - EXPECT_FALSE(destroyed); - } - - EXPECT_TRUE(destroyed); -} - -TEST_F(GeneratedServiceTest, CallMethod) { - // Test that CallMethod() works. - - // Call Foo() via CallMethod(). - mock_service_.CallMethod(foo_, &mock_controller_, - &foo_request_, &foo_response_, done_.get()); - - ASSERT_TRUE(mock_service_.called_); - - EXPECT_EQ("Foo" , mock_service_.method_ ); - EXPECT_EQ(&mock_controller_, mock_service_.controller_); - EXPECT_EQ(&foo_request_ , mock_service_.request_ ); - EXPECT_EQ(&foo_response_ , mock_service_.response_ ); - EXPECT_EQ(done_.get() , mock_service_.done_ ); - - // Try again, but call Bar() instead. - mock_service_.Reset(); - mock_service_.CallMethod(bar_, &mock_controller_, - &bar_request_, &bar_response_, done_.get()); - - ASSERT_TRUE(mock_service_.called_); - EXPECT_EQ("Bar", mock_service_.method_); -} - -TEST_F(GeneratedServiceTest, CallMethodTypeFailure) { - // Verify death if we call Foo() with Bar's message types. - -#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet - EXPECT_DEBUG_DEATH( - mock_service_.CallMethod(foo_, &mock_controller_, - &foo_request_, &bar_response_, done_.get()), - "dynamic_cast"); - - mock_service_.Reset(); - EXPECT_DEBUG_DEATH( - mock_service_.CallMethod(foo_, &mock_controller_, - &bar_request_, &foo_response_, done_.get()), - "dynamic_cast"); -#endif // GTEST_HAS_DEATH_TEST -} - -TEST_F(GeneratedServiceTest, GetPrototypes) { - // Test Get{Request,Response}Prototype() methods. - - EXPECT_EQ(&unittest::FooRequest::default_instance(), - &mock_service_.GetRequestPrototype(foo_)); - EXPECT_EQ(&unittest::BarRequest::default_instance(), - &mock_service_.GetRequestPrototype(bar_)); - - EXPECT_EQ(&unittest::FooResponse::default_instance(), - &mock_service_.GetResponsePrototype(foo_)); - EXPECT_EQ(&unittest::BarResponse::default_instance(), - &mock_service_.GetResponsePrototype(bar_)); -} - -TEST_F(GeneratedServiceTest, Stub) { - // Test that the stub class works. - - // Call Foo() via the stub. - stub_.Foo(&mock_controller_, &foo_request_, &foo_response_, done_.get()); - - ASSERT_TRUE(mock_channel_.called_); - - EXPECT_EQ(foo_ , mock_channel_.method_ ); - EXPECT_EQ(&mock_controller_, mock_channel_.controller_); - EXPECT_EQ(&foo_request_ , mock_channel_.request_ ); - EXPECT_EQ(&foo_response_ , mock_channel_.response_ ); - EXPECT_EQ(done_.get() , mock_channel_.done_ ); - - // Call Bar() via the stub. - mock_channel_.Reset(); - stub_.Bar(&mock_controller_, &bar_request_, &bar_response_, done_.get()); - - ASSERT_TRUE(mock_channel_.called_); - EXPECT_EQ(bar_, mock_channel_.method_); -} - -TEST_F(GeneratedServiceTest, NotImplemented) { - // Test that failing to implement a method of a service causes it to fail - // with a "not implemented" error message. - - // A service which doesn't implement any methods. - class UnimplementedService : public unittest::TestService { - public: - UnimplementedService() {} - }; - - UnimplementedService unimplemented_service; - - // And a controller which expects to get a "not implemented" error. - class ExpectUnimplementedController : public MockController { - public: - ExpectUnimplementedController() : called_(false) {} - - void SetFailed(const string& reason) { - EXPECT_FALSE(called_); - called_ = true; - EXPECT_EQ("Method Foo() not implemented.", reason); - } - - bool called_; - }; - - ExpectUnimplementedController controller; - - // Call Foo. - unimplemented_service.Foo(&controller, &foo_request_, &foo_response_, - done_.get()); - - EXPECT_TRUE(controller.called_); -} - -} // namespace cpp_unittest -} // namespace cpp -} // namespace compiler - -namespace no_generic_services_test { - // Verify that no class called "TestService" was defined in - // unittest_no_generic_services.pb.h by defining a different type by the same - // name. If such a service was generated, this will not compile. - struct TestService { - int i; - }; -} - -namespace compiler { -namespace cpp { -namespace cpp_unittest { - -TEST_F(GeneratedServiceTest, NoGenericServices) { - // Verify that non-services in unittest_no_generic_services.proto were - // generated. - no_generic_services_test::TestMessage message; - message.set_a(1); - message.SetExtension(no_generic_services_test::test_extension, 123); - no_generic_services_test::TestEnum e = no_generic_services_test::FOO; - EXPECT_EQ(e, 1); - - // Verify that a ServiceDescriptor is generated for the service even if the - // class itself is not. - const FileDescriptor* file = - no_generic_services_test::TestMessage::descriptor()->file(); - - ASSERT_EQ(1, file->service_count()); - EXPECT_EQ("TestService", file->service(0)->name()); - ASSERT_EQ(1, file->service(0)->method_count()); - EXPECT_EQ("Foo", file->service(0)->method(0)->name()); -} - -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - -// =================================================================== - -// This test must run last. It verifies that descriptors were or were not -// initialized depending on whether PROTOBUF_TEST_NO_DESCRIPTORS was defined. -// When this is defined, we skip all tests which are expected to trigger -// descriptor initialization. This verifies that everything else still works -// if descriptors are not initialized. -TEST(DescriptorInitializationTest, Initialized) { -#ifdef PROTOBUF_TEST_NO_DESCRIPTORS - bool should_have_descriptors = false; -#else - bool should_have_descriptors = true; -#endif - - EXPECT_EQ(should_have_descriptors, - DescriptorPool::generated_pool()->InternalIsFileLoaded( - "google/protobuf/unittest.proto")); -} - -} // namespace cpp_unittest - -} // namespace cpp -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.cc deleted file mode 100644 index 422f759f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.cc +++ /dev/null @@ -1,459 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifdef _MSC_VER -#include -#else -#include -#endif -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -#ifdef _WIN32 -#ifndef F_OK -#define F_OK 00 // not defined by MSVC for whatever reason -#endif -#include -#endif - -// Returns true if the text looks like a Windows-style absolute path, starting -// with a drive letter. Example: "C:\foo". TODO(kenton): Share this with -// copy in command_line_interface.cc? -static bool IsWindowsAbsolutePath(const string& text) { -#if defined(_WIN32) || defined(__CYGWIN__) - return text.size() >= 3 && text[1] == ':' && - isalpha(text[0]) && - (text[2] == '/' || text[2] == '\\') && - text.find_last_of(':') == 1; -#else - return false; -#endif -} - -MultiFileErrorCollector::~MultiFileErrorCollector() {} - -// This class serves two purposes: -// - It implements the ErrorCollector interface (used by Tokenizer and Parser) -// in terms of MultiFileErrorCollector, using a particular filename. -// - It lets us check if any errors have occurred. -class SourceTreeDescriptorDatabase::SingleFileErrorCollector - : public io::ErrorCollector { - public: - SingleFileErrorCollector(const string& filename, - MultiFileErrorCollector* multi_file_error_collector) - : filename_(filename), - multi_file_error_collector_(multi_file_error_collector), - had_errors_(false) {} - ~SingleFileErrorCollector() {} - - bool had_errors() { return had_errors_; } - - // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { - if (multi_file_error_collector_ != NULL) { - multi_file_error_collector_->AddError(filename_, line, column, message); - } - had_errors_ = true; - } - - private: - string filename_; - MultiFileErrorCollector* multi_file_error_collector_; - bool had_errors_; -}; - -// =================================================================== - -SourceTreeDescriptorDatabase::SourceTreeDescriptorDatabase( - SourceTree* source_tree) - : source_tree_(source_tree), - error_collector_(NULL), - using_validation_error_collector_(false), - validation_error_collector_(this) {} - -SourceTreeDescriptorDatabase::~SourceTreeDescriptorDatabase() {} - -bool SourceTreeDescriptorDatabase::FindFileByName( - const string& filename, FileDescriptorProto* output) { - scoped_ptr input(source_tree_->Open(filename)); - if (input == NULL) { - if (error_collector_ != NULL) { - error_collector_->AddError(filename, -1, 0, "File not found."); - } - return false; - } - - // Set up the tokenizer and parser. - SingleFileErrorCollector file_error_collector(filename, error_collector_); - io::Tokenizer tokenizer(input.get(), &file_error_collector); - - Parser parser; - if (error_collector_ != NULL) { - parser.RecordErrorsTo(&file_error_collector); - } - if (using_validation_error_collector_) { - parser.RecordSourceLocationsTo(&source_locations_); - } - - // Parse it. - output->set_name(filename); - return parser.Parse(&tokenizer, output) && - !file_error_collector.had_errors(); -} - -bool SourceTreeDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, FileDescriptorProto* output) { - return false; -} - -bool SourceTreeDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, int field_number, - FileDescriptorProto* output) { - return false; -} - -// ------------------------------------------------------------------- - -SourceTreeDescriptorDatabase::ValidationErrorCollector:: -ValidationErrorCollector(SourceTreeDescriptorDatabase* owner) - : owner_(owner) {} - -SourceTreeDescriptorDatabase::ValidationErrorCollector:: -~ValidationErrorCollector() {} - -void SourceTreeDescriptorDatabase::ValidationErrorCollector::AddError( - const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { - if (owner_->error_collector_ == NULL) return; - - int line, column; - owner_->source_locations_.Find(descriptor, location, &line, &column); - owner_->error_collector_->AddError(filename, line, column, message); -} - -// =================================================================== - -Importer::Importer(SourceTree* source_tree, - MultiFileErrorCollector* error_collector) - : database_(source_tree), - pool_(&database_, database_.GetValidationErrorCollector()) { - database_.RecordErrorsTo(error_collector); -} - -Importer::~Importer() {} - -const FileDescriptor* Importer::Import(const string& filename) { - return pool_.FindFileByName(filename); -} - -// =================================================================== - -SourceTree::~SourceTree() {} - -DiskSourceTree::DiskSourceTree() {} - -DiskSourceTree::~DiskSourceTree() {} - -static inline char LastChar(const string& str) { - return str[str.size() - 1]; -} - -// Given a path, returns an equivalent path with these changes: -// - On Windows, any backslashes are replaced with forward slashes. -// - Any instances of the directory "." are removed. -// - Any consecutive '/'s are collapsed into a single slash. -// Note that the resulting string may be empty. -// -// TODO(kenton): It would be nice to handle "..", e.g. so that we can figure -// out that "foo/bar.proto" is inside "baz/../foo". However, if baz is a -// symlink or doesn't exist, then things get complicated, and we can't -// actually determine this without investigating the filesystem, probably -// in non-portable ways. So, we punt. -// -// TODO(kenton): It would be nice to use realpath() here except that it -// resolves symbolic links. This could cause problems if people place -// symbolic links in their source tree. For example, if you executed: -// protoc --proto_path=foo foo/bar/baz.proto -// then if foo/bar is a symbolic link, foo/bar/baz.proto will canonicalize -// to a path which does not appear to be under foo, and thus the compiler -// will complain that baz.proto is not inside the --proto_path. -static string CanonicalizePath(string path) { -#ifdef _WIN32 - // The Win32 API accepts forward slashes as a path delimiter even though - // backslashes are standard. Let's avoid confusion and use only forward - // slashes. - if (HasPrefixString(path, "\\\\")) { - // Avoid converting two leading backslashes. - path = "\\\\" + StringReplace(path.substr(2), "\\", "/", true); - } else { - path = StringReplace(path, "\\", "/", true); - } -#endif - - vector parts; - vector canonical_parts; - SplitStringUsing(path, "/", &parts); // Note: Removes empty parts. - for (int i = 0; i < parts.size(); i++) { - if (parts[i] == ".") { - // Ignore. - } else { - canonical_parts.push_back(parts[i]); - } - } - string result = JoinStrings(canonical_parts, "/"); - if (!path.empty() && path[0] == '/') { - // Restore leading slash. - result = '/' + result; - } - if (!path.empty() && LastChar(path) == '/' && - !result.empty() && LastChar(result) != '/') { - // Restore trailing slash. - result += '/'; - } - return result; -} - -static inline bool ContainsParentReference(const string& path) { - return path == ".." || - HasPrefixString(path, "../") || - HasSuffixString(path, "/..") || - path.find("/../") != string::npos; -} - -// Maps a file from an old location to a new one. Typically, old_prefix is -// a virtual path and new_prefix is its corresponding disk path. Returns -// false if the filename did not start with old_prefix, otherwise replaces -// old_prefix with new_prefix and stores the result in *result. Examples: -// string result; -// assert(ApplyMapping("foo/bar", "", "baz", &result)); -// assert(result == "baz/foo/bar"); -// -// assert(ApplyMapping("foo/bar", "foo", "baz", &result)); -// assert(result == "baz/bar"); -// -// assert(ApplyMapping("foo", "foo", "bar", &result)); -// assert(result == "bar"); -// -// assert(!ApplyMapping("foo/bar", "baz", "qux", &result)); -// assert(!ApplyMapping("foo/bar", "baz", "qux", &result)); -// assert(!ApplyMapping("foobar", "foo", "baz", &result)); -static bool ApplyMapping(const string& filename, - const string& old_prefix, - const string& new_prefix, - string* result) { - if (old_prefix.empty()) { - // old_prefix matches any relative path. - if (ContainsParentReference(filename)) { - // We do not allow the file name to use "..". - return false; - } - if (HasPrefixString(filename, "/") || - IsWindowsAbsolutePath(filename)) { - // This is an absolute path, so it isn't matched by the empty string. - return false; - } - result->assign(new_prefix); - if (!result->empty()) result->push_back('/'); - result->append(filename); - return true; - } else if (HasPrefixString(filename, old_prefix)) { - // old_prefix is a prefix of the filename. Is it the whole filename? - if (filename.size() == old_prefix.size()) { - // Yep, it's an exact match. - *result = new_prefix; - return true; - } else { - // Not an exact match. Is the next character a '/'? Otherwise, - // this isn't actually a match at all. E.g. the prefix "foo/bar" - // does not match the filename "foo/barbaz". - int after_prefix_start = -1; - if (filename[old_prefix.size()] == '/') { - after_prefix_start = old_prefix.size() + 1; - } else if (filename[old_prefix.size() - 1] == '/') { - // old_prefix is never empty, and canonicalized paths never have - // consecutive '/' characters. - after_prefix_start = old_prefix.size(); - } - if (after_prefix_start != -1) { - // Yep. So the prefixes are directories and the filename is a file - // inside them. - string after_prefix = filename.substr(after_prefix_start); - if (ContainsParentReference(after_prefix)) { - // We do not allow the file name to use "..". - return false; - } - result->assign(new_prefix); - if (!result->empty()) result->push_back('/'); - result->append(after_prefix); - return true; - } - } - } - - return false; -} - -void DiskSourceTree::MapPath(const string& virtual_path, - const string& disk_path) { - mappings_.push_back(Mapping(virtual_path, CanonicalizePath(disk_path))); -} - -DiskSourceTree::DiskFileToVirtualFileResult -DiskSourceTree::DiskFileToVirtualFile( - const string& disk_file, - string* virtual_file, - string* shadowing_disk_file) { - int mapping_index = -1; - string canonical_disk_file = CanonicalizePath(disk_file); - - for (int i = 0; i < mappings_.size(); i++) { - // Apply the mapping in reverse. - if (ApplyMapping(canonical_disk_file, mappings_[i].disk_path, - mappings_[i].virtual_path, virtual_file)) { - // Success. - mapping_index = i; - break; - } - } - - if (mapping_index == -1) { - return NO_MAPPING; - } - - // Iterate through all mappings with higher precedence and verify that none - // of them map this file to some other existing file. - for (int i = 0; i < mapping_index; i++) { - if (ApplyMapping(*virtual_file, mappings_[i].virtual_path, - mappings_[i].disk_path, shadowing_disk_file)) { - if (access(shadowing_disk_file->c_str(), F_OK) >= 0) { - // File exists. - return SHADOWED; - } - } - } - shadowing_disk_file->clear(); - - // Verify that we can open the file. Note that this also has the side-effect - // of verifying that we are not canonicalizing away any non-existent - // directories. - scoped_ptr stream(OpenDiskFile(disk_file)); - if (stream == NULL) { - return CANNOT_OPEN; - } - - return SUCCESS; -} - -bool DiskSourceTree::VirtualFileToDiskFile(const string& virtual_file, - string* disk_file) { - scoped_ptr stream(OpenVirtualFile(virtual_file, - disk_file)); - return stream != NULL; -} - -io::ZeroCopyInputStream* DiskSourceTree::Open(const string& filename) { - return OpenVirtualFile(filename, NULL); -} - -io::ZeroCopyInputStream* DiskSourceTree::OpenVirtualFile( - const string& virtual_file, - string* disk_file) { - if (virtual_file != CanonicalizePath(virtual_file) || - ContainsParentReference(virtual_file)) { - // We do not allow importing of paths containing things like ".." or - // consecutive slashes since the compiler expects files to be uniquely - // identified by file name. - return NULL; - } - - for (int i = 0; i < mappings_.size(); i++) { - string temp_disk_file; - if (ApplyMapping(virtual_file, mappings_[i].virtual_path, - mappings_[i].disk_path, &temp_disk_file)) { - io::ZeroCopyInputStream* stream = OpenDiskFile(temp_disk_file); - if (stream != NULL) { - if (disk_file != NULL) { - *disk_file = temp_disk_file; - } - return stream; - } - - if (errno == EACCES) { - // The file exists but is not readable. - // TODO(kenton): Find a way to report this more nicely. - GOOGLE_LOG(WARNING) << "Read access is denied for file: " << temp_disk_file; - return NULL; - } - } - } - - return NULL; -} - -io::ZeroCopyInputStream* DiskSourceTree::OpenDiskFile( - const string& filename) { - int file_descriptor; - do { - file_descriptor = open(filename.c_str(), O_RDONLY); - } while (file_descriptor < 0 && errno == EINTR); - if (file_descriptor >= 0) { - io::FileInputStream* result = new io::FileInputStream(file_descriptor); - result->SetCloseOnDelete(true); - return result; - } else { - return NULL; - } -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.h deleted file mode 100644 index 7a2efc29..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer.h +++ /dev/null @@ -1,303 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file is the public interface to the .proto file parser. - -#ifndef GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__ -#define GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__ - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -namespace io { class ZeroCopyInputStream; } - -namespace compiler { - -// Defined in this file. -class Importer; -class MultiFileErrorCollector; -class SourceTree; -class DiskSourceTree; - -// TODO(kenton): Move all SourceTree stuff to a separate file? - -// An implementation of DescriptorDatabase which loads files from a SourceTree -// and parses them. -// -// Note: This class is not thread-safe since it maintains a table of source -// code locations for error reporting. However, when a DescriptorPool wraps -// a DescriptorDatabase, it uses mutex locking to make sure only one method -// of the database is called at a time, even if the DescriptorPool is used -// from multiple threads. Therefore, there is only a problem if you create -// multiple DescriptorPools wrapping the same SourceTreeDescriptorDatabase -// and use them from multiple threads. -// -// Note: This class does not implement FindFileContainingSymbol() or -// FindFileContainingExtension(); these will always return false. -class LIBPROTOBUF_EXPORT SourceTreeDescriptorDatabase : public DescriptorDatabase { - public: - SourceTreeDescriptorDatabase(SourceTree* source_tree); - ~SourceTreeDescriptorDatabase(); - - // Instructs the SourceTreeDescriptorDatabase to report any parse errors - // to the given MultiFileErrorCollector. This should be called before - // parsing. error_collector must remain valid until either this method - // is called again or the SourceTreeDescriptorDatabase is destroyed. - void RecordErrorsTo(MultiFileErrorCollector* error_collector) { - error_collector_ = error_collector; - } - - // Gets a DescriptorPool::ErrorCollector which records errors to the - // MultiFileErrorCollector specified with RecordErrorsTo(). This collector - // has the ability to determine exact line and column numbers of errors - // from the information given to it by the DescriptorPool. - DescriptorPool::ErrorCollector* GetValidationErrorCollector() { - using_validation_error_collector_ = true; - return &validation_error_collector_; - } - - // implements DescriptorDatabase ----------------------------------- - bool FindFileByName(const string& filename, FileDescriptorProto* output); - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output); - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output); - - private: - class SingleFileErrorCollector; - - SourceTree* source_tree_; - MultiFileErrorCollector* error_collector_; - - class LIBPROTOBUF_EXPORT ValidationErrorCollector : public DescriptorPool::ErrorCollector { - public: - ValidationErrorCollector(SourceTreeDescriptorDatabase* owner); - ~ValidationErrorCollector(); - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message); - - private: - SourceTreeDescriptorDatabase* owner_; - }; - friend class ValidationErrorCollector; - - bool using_validation_error_collector_; - SourceLocationTable source_locations_; - ValidationErrorCollector validation_error_collector_; -}; - -// Simple interface for parsing .proto files. This wraps the process -// of opening the file, parsing it with a Parser, recursively parsing all its -// imports, and then cross-linking the results to produce a FileDescriptor. -// -// This is really just a thin wrapper around SourceTreeDescriptorDatabase. -// You may find that SourceTreeDescriptorDatabase is more flexible. -// -// TODO(kenton): I feel like this class is not well-named. -class LIBPROTOBUF_EXPORT Importer { - public: - Importer(SourceTree* source_tree, - MultiFileErrorCollector* error_collector); - ~Importer(); - - // Import the given file and build a FileDescriptor representing it. If - // the file is already in the DescriptorPool, the existing FileDescriptor - // will be returned. The FileDescriptor is property of the DescriptorPool, - // and will remain valid until it is destroyed. If any errors occur, they - // will be reported using the error collector and Import() will return NULL. - // - // A particular Importer object will only report errors for a particular - // file once. All future attempts to import the same file will return NULL - // without reporting any errors. The idea is that you might want to import - // a lot of files without seeing the same errors over and over again. If - // you want to see errors for the same files repeatedly, you can use a - // separate Importer object to import each one (but use the same - // DescriptorPool so that they can be cross-linked). - const FileDescriptor* Import(const string& filename); - - // The DescriptorPool in which all imported FileDescriptors and their - // contents are stored. - inline const DescriptorPool* pool() const { - return &pool_; - } - - private: - SourceTreeDescriptorDatabase database_; - DescriptorPool pool_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Importer); -}; - -// If the importer encounters problems while trying to import the proto files, -// it reports them to a MultiFileErrorCollector. -class LIBPROTOBUF_EXPORT MultiFileErrorCollector { - public: - inline MultiFileErrorCollector() {} - virtual ~MultiFileErrorCollector(); - - // Line and column numbers are zero-based. A line number of -1 indicates - // an error with the entire file (e.g. "not found"). - virtual void AddError(const string& filename, int line, int column, - const string& message) = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MultiFileErrorCollector); -}; - -// Abstract interface which represents a directory tree containing proto files. -// Used by the default implementation of Importer to resolve import statements -// Most users will probably want to use the DiskSourceTree implementation, -// below. -class LIBPROTOBUF_EXPORT SourceTree { - public: - inline SourceTree() {} - virtual ~SourceTree(); - - // Open the given file and return a stream that reads it, or NULL if not - // found. The caller takes ownership of the returned object. The filename - // must be a path relative to the root of the source tree and must not - // contain "." or ".." components. - virtual io::ZeroCopyInputStream* Open(const string& filename) = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(SourceTree); -}; - -// An implementation of SourceTree which loads files from locations on disk. -// Multiple mappings can be set up to map locations in the DiskSourceTree to -// locations in the physical filesystem. -class LIBPROTOBUF_EXPORT DiskSourceTree : public SourceTree { - public: - DiskSourceTree(); - ~DiskSourceTree(); - - // Map a path on disk to a location in the SourceTree. The path may be - // either a file or a directory. If it is a directory, the entire tree - // under it will be mapped to the given virtual location. To map a directory - // to the root of the source tree, pass an empty string for virtual_path. - // - // If multiple mapped paths apply when opening a file, they will be searched - // in order. For example, if you do: - // MapPath("bar", "foo/bar"); - // MapPath("", "baz"); - // and then you do: - // Open("bar/qux"); - // the DiskSourceTree will first try to open foo/bar/qux, then baz/bar/qux, - // returning the first one that opens successfuly. - // - // disk_path may be an absolute path or relative to the current directory, - // just like a path you'd pass to open(). - void MapPath(const string& virtual_path, const string& disk_path); - - // Return type for DiskFileToVirtualFile(). - enum DiskFileToVirtualFileResult { - SUCCESS, - SHADOWED, - CANNOT_OPEN, - NO_MAPPING - }; - - // Given a path to a file on disk, find a virtual path mapping to that - // file. The first mapping created with MapPath() whose disk_path contains - // the filename is used. However, that virtual path may not actually be - // usable to open the given file. Possible return values are: - // * SUCCESS: The mapping was found. *virtual_file is filled in so that - // calling Open(*virtual_file) will open the file named by disk_file. - // * SHADOWED: A mapping was found, but using Open() to open this virtual - // path will end up returning some different file. This is because some - // other mapping with a higher precedence also matches this virtual path - // and maps it to a different file that exists on disk. *virtual_file - // is filled in as it would be in the SUCCESS case. *shadowing_disk_file - // is filled in with the disk path of the file which would be opened if - // you were to call Open(*virtual_file). - // * CANNOT_OPEN: The mapping was found and was not shadowed, but the - // file specified cannot be opened. When this value is returned, - // errno will indicate the reason the file cannot be opened. *virtual_file - // will be set to the virtual path as in the SUCCESS case, even though - // it is not useful. - // * NO_MAPPING: Indicates that no mapping was found which contains this - // file. - DiskFileToVirtualFileResult - DiskFileToVirtualFile(const string& disk_file, - string* virtual_file, - string* shadowing_disk_file); - - // Given a virtual path, find the path to the file on disk. - // Return true and update disk_file with the on-disk path if the file exists. - // Return false and leave disk_file untouched if the file doesn't exist. - bool VirtualFileToDiskFile(const string& virtual_file, string* disk_file); - - // implements SourceTree ------------------------------------------- - io::ZeroCopyInputStream* Open(const string& filename); - - private: - struct Mapping { - string virtual_path; - string disk_path; - - inline Mapping(const string& virtual_path, const string& disk_path) - : virtual_path(virtual_path), disk_path(disk_path) {} - }; - vector mappings_; - - // Like Open(), but returns the on-disk path in disk_file if disk_file is - // non-NULL and the file could be successfully opened. - io::ZeroCopyInputStream* OpenVirtualFile(const string& virtual_file, - string* disk_file); - - // Like Open() but given the actual on-disk path. - io::ZeroCopyInputStream* OpenDiskFile(const string& filename); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DiskSourceTree); -}; - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_IMPORTER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer_unittest.cc deleted file mode 100644 index 56fad56e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/importer_unittest.cc +++ /dev/null @@ -1,600 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -namespace { - -#define EXPECT_SUBSTRING(needle, haystack) \ - EXPECT_PRED_FORMAT2(testing::IsSubstring, (needle), (haystack)) - -class MockErrorCollector : public MultiFileErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", - filename, line, column, message); - } -}; - -// ------------------------------------------------------------------- - -// A dummy implementation of SourceTree backed by a simple map. -class MockSourceTree : public SourceTree { - public: - MockSourceTree() {} - ~MockSourceTree() {} - - void AddFile(const string& name, const char* contents) { - files_[name] = contents; - } - - // implements SourceTree ------------------------------------------- - io::ZeroCopyInputStream* Open(const string& filename) { - const char* contents = FindPtrOrNull(files_, filename); - if (contents == NULL) { - return NULL; - } else { - return new io::ArrayInputStream(contents, strlen(contents)); - } - } - - private: - hash_map files_; -}; - -// =================================================================== - -class ImporterTest : public testing::Test { - protected: - ImporterTest() - : importer_(&source_tree_, &error_collector_) {} - - void AddFile(const string& filename, const char* text) { - source_tree_.AddFile(filename, text); - } - - // Return the collected error text - string error() const { return error_collector_.text_; } - - MockErrorCollector error_collector_; - MockSourceTree source_tree_; - Importer importer_; -}; - -TEST_F(ImporterTest, Import) { - // Test normal importing. - AddFile("foo.proto", - "syntax = \"proto2\";\n" - "message Foo {}\n"); - - const FileDescriptor* file = importer_.Import("foo.proto"); - EXPECT_EQ("", error_collector_.text_); - ASSERT_TRUE(file != NULL); - - ASSERT_EQ(1, file->message_type_count()); - EXPECT_EQ("Foo", file->message_type(0)->name()); - - // Importing again should return same object. - EXPECT_EQ(file, importer_.Import("foo.proto")); -} - -TEST_F(ImporterTest, ImportNested) { - // Test that importing a file which imports another file works. - AddFile("foo.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n" - "message Foo {\n" - " optional Bar bar = 1;\n" - "}\n"); - AddFile("bar.proto", - "syntax = \"proto2\";\n" - "message Bar {}\n"); - - // Note that both files are actually parsed by the first call to Import() - // here, since foo.proto imports bar.proto. The second call just returns - // the same ProtoFile for bar.proto which was constructed while importing - // foo.proto. We test that this is the case below by checking that bar - // is among foo's dependencies (by pointer). - const FileDescriptor* foo = importer_.Import("foo.proto"); - const FileDescriptor* bar = importer_.Import("bar.proto"); - EXPECT_EQ("", error_collector_.text_); - ASSERT_TRUE(foo != NULL); - ASSERT_TRUE(bar != NULL); - - // Check that foo's dependency is the same object as bar. - ASSERT_EQ(1, foo->dependency_count()); - EXPECT_EQ(bar, foo->dependency(0)); - - // Check that foo properly cross-links bar. - ASSERT_EQ(1, foo->message_type_count()); - ASSERT_EQ(1, bar->message_type_count()); - ASSERT_EQ(1, foo->message_type(0)->field_count()); - ASSERT_EQ(FieldDescriptor::TYPE_MESSAGE, - foo->message_type(0)->field(0)->type()); - EXPECT_EQ(bar->message_type(0), - foo->message_type(0)->field(0)->message_type()); -} - -TEST_F(ImporterTest, FileNotFound) { - // Error: Parsing a file that doesn't exist. - EXPECT_TRUE(importer_.Import("foo.proto") == NULL); - EXPECT_EQ( - "foo.proto:-1:0: File not found.\n", - error_collector_.text_); -} - -TEST_F(ImporterTest, ImportNotFound) { - // Error: Importing a file that doesn't exist. - AddFile("foo.proto", - "syntax = \"proto2\";\n" - "import \"bar.proto\";\n"); - - EXPECT_TRUE(importer_.Import("foo.proto") == NULL); - EXPECT_EQ( - "bar.proto:-1:0: File not found.\n" - "foo.proto:-1:0: Import \"bar.proto\" was not found or had errors.\n", - error_collector_.text_); -} - -TEST_F(ImporterTest, RecursiveImport) { - // Error: Recursive import. - AddFile("recursive1.proto", - "syntax = \"proto2\";\n" - "import \"recursive2.proto\";\n"); - AddFile("recursive2.proto", - "syntax = \"proto2\";\n" - "import \"recursive1.proto\";\n"); - - EXPECT_TRUE(importer_.Import("recursive1.proto") == NULL); - EXPECT_EQ( - "recursive1.proto:-1:0: File recursively imports itself: recursive1.proto " - "-> recursive2.proto -> recursive1.proto\n" - "recursive2.proto:-1:0: Import \"recursive1.proto\" was not found " - "or had errors.\n" - "recursive1.proto:-1:0: Import \"recursive2.proto\" was not found " - "or had errors.\n", - error_collector_.text_); -} - -// TODO(sanjay): The MapField tests below more properly belong in -// descriptor_unittest, but are more convenient to test here. -TEST_F(ImporterTest, MapFieldValid) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Item {\n" - " required string key = 1;\n" - "}\n" - "message Map {\n" - " repeated Item items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - const FileDescriptor* file = importer_.Import("map.proto"); - ASSERT_TRUE(file != NULL) << error_collector_.text_; - EXPECT_EQ("", error_collector_.text_); - - // Check that Map::items points to Item::key - const Descriptor* item_type = file->FindMessageTypeByName("Item"); - ASSERT_TRUE(item_type != NULL); - const Descriptor* map_type = file->FindMessageTypeByName("Map"); - ASSERT_TRUE(map_type != NULL); - const FieldDescriptor* key_field = item_type->FindFieldByName("key"); - ASSERT_TRUE(key_field != NULL); - const FieldDescriptor* items_field = map_type->FindFieldByName("items"); - ASSERT_TRUE(items_field != NULL); - EXPECT_EQ(items_field->experimental_map_key(), key_field); -} - -TEST_F(ImporterTest, MapFieldNotRepeated) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Item {\n" - " required string key = 1;\n" - "}\n" - "message Map {\n" - " required Item items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("only allowed for repeated fields", error()); -} - -TEST_F(ImporterTest, MapFieldNotMessageType) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Map {\n" - " repeated int32 items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("only allowed for fields with a message type", error()); -} - -TEST_F(ImporterTest, MapFieldTypeNotFound) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Map {\n" - " repeated Unknown items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("not defined", error()); -} - -TEST_F(ImporterTest, MapFieldKeyNotFound) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Item {\n" - " required string key = 1;\n" - "}\n" - "message Map {\n" - " repeated Item items = 1 [experimental_map_key = \"badkey\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("Could not find field", error()); -} - -TEST_F(ImporterTest, MapFieldKeyRepeated) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message Item {\n" - " repeated string key = 1;\n" - "}\n" - "message Map {\n" - " repeated Item items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("must not name a repeated field", error()); -} - -TEST_F(ImporterTest, MapFieldKeyNotScalar) { - AddFile( - "map.proto", - "syntax = \"proto2\";\n" - "message ItemKey { }\n" - "message Item {\n" - " required ItemKey key = 1;\n" - "}\n" - "message Map {\n" - " repeated Item items = 1 [experimental_map_key = \"key\"];\n" - "}\n" - ); - EXPECT_TRUE(importer_.Import("map.proto") == NULL); - EXPECT_SUBSTRING("must name a scalar or string", error()); -} - -// =================================================================== - -class DiskSourceTreeTest : public testing::Test { - protected: - virtual void SetUp() { - dirnames_.push_back(TestTempDir() + "/test_proto2_import_path_1"); - dirnames_.push_back(TestTempDir() + "/test_proto2_import_path_2"); - - for (int i = 0; i < dirnames_.size(); i++) { - if (File::Exists(dirnames_[i])) { - File::DeleteRecursively(dirnames_[i], NULL, NULL); - } - GOOGLE_CHECK(File::CreateDir(dirnames_[i].c_str(), DEFAULT_FILE_MODE)); - } - } - - virtual void TearDown() { - for (int i = 0; i < dirnames_.size(); i++) { - File::DeleteRecursively(dirnames_[i], NULL, NULL); - } - } - - void AddFile(const string& filename, const char* contents) { - File::WriteStringToFileOrDie(contents, filename); - } - - void AddSubdir(const string& dirname) { - GOOGLE_CHECK(File::CreateDir(dirname.c_str(), DEFAULT_FILE_MODE)); - } - - void ExpectFileContents(const string& filename, - const char* expected_contents) { - scoped_ptr input(source_tree_.Open(filename)); - - ASSERT_FALSE(input == NULL); - - // Read all the data from the file. - string file_contents; - const void* data; - int size; - while (input->Next(&data, &size)) { - file_contents.append(reinterpret_cast(data), size); - } - - EXPECT_EQ(expected_contents, file_contents); - } - - void ExpectFileNotFound(const string& filename) { - scoped_ptr input(source_tree_.Open(filename)); - EXPECT_TRUE(input == NULL); - } - - DiskSourceTree source_tree_; - - // Paths of two on-disk directories to use during the test. - vector dirnames_; -}; - -TEST_F(DiskSourceTreeTest, MapRoot) { - // Test opening a file in a directory that is mapped to the root of the - // source tree. - AddFile(dirnames_[0] + "/foo", "Hello World!"); - source_tree_.MapPath("", dirnames_[0]); - - ExpectFileContents("foo", "Hello World!"); - ExpectFileNotFound("bar"); -} - -TEST_F(DiskSourceTreeTest, MapDirectory) { - // Test opening a file in a directory that is mapped to somewhere other - // than the root of the source tree. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - source_tree_.MapPath("baz", dirnames_[0]); - - ExpectFileContents("baz/foo", "Hello World!"); - ExpectFileNotFound("baz/bar"); - ExpectFileNotFound("foo"); - ExpectFileNotFound("bar"); - - // Non-canonical file names should not work. - ExpectFileNotFound("baz//foo"); - ExpectFileNotFound("baz/../baz/foo"); - ExpectFileNotFound("baz/./foo"); - ExpectFileNotFound("baz/foo/"); -} - -TEST_F(DiskSourceTreeTest, NoParent) { - // Test that we cannot open files in a parent of a mapped directory. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - AddSubdir(dirnames_[0] + "/bar"); - AddFile(dirnames_[0] + "/bar/baz", "Blah."); - source_tree_.MapPath("", dirnames_[0] + "/bar"); - - ExpectFileContents("baz", "Blah."); - ExpectFileNotFound("../foo"); - ExpectFileNotFound("../bar/baz"); -} - -TEST_F(DiskSourceTreeTest, MapFile) { - // Test opening a file that is mapped directly into the source tree. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - source_tree_.MapPath("foo", dirnames_[0] + "/foo"); - - ExpectFileContents("foo", "Hello World!"); - ExpectFileNotFound("bar"); -} - -TEST_F(DiskSourceTreeTest, SearchMultipleDirectories) { - // Test mapping and searching multiple directories. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - AddFile(dirnames_[1] + "/foo", "This file should be hidden."); - AddFile(dirnames_[1] + "/bar", "Goodbye World!"); - source_tree_.MapPath("", dirnames_[0]); - source_tree_.MapPath("", dirnames_[1]); - - ExpectFileContents("foo", "Hello World!"); - ExpectFileContents("bar", "Goodbye World!"); - ExpectFileNotFound("baz"); -} - -TEST_F(DiskSourceTreeTest, OrderingTrumpsSpecificity) { - // Test that directories are always searched in order, even when a latter - // directory is more-specific than a former one. - - // Create the "bar" directory so we can put a file in it. - ASSERT_TRUE(File::CreateDir((dirnames_[0] + "/bar").c_str(), - DEFAULT_FILE_MODE)); - - // Add files and map paths. - AddFile(dirnames_[0] + "/bar/foo", "Hello World!"); - AddFile(dirnames_[1] + "/foo", "This file should be hidden."); - source_tree_.MapPath("", dirnames_[0]); - source_tree_.MapPath("bar", dirnames_[1]); - - // Check. - ExpectFileContents("bar/foo", "Hello World!"); -} - -TEST_F(DiskSourceTreeTest, DiskFileToVirtualFile) { - // Test DiskFileToVirtualFile. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - AddFile(dirnames_[1] + "/foo", "This file should be hidden."); - source_tree_.MapPath("bar", dirnames_[0]); - source_tree_.MapPath("bar", dirnames_[1]); - - string virtual_file; - string shadowing_disk_file; - - EXPECT_EQ(DiskSourceTree::NO_MAPPING, - source_tree_.DiskFileToVirtualFile( - "/foo", &virtual_file, &shadowing_disk_file)); - - EXPECT_EQ(DiskSourceTree::SHADOWED, - source_tree_.DiskFileToVirtualFile( - dirnames_[1] + "/foo", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("bar/foo", virtual_file); - EXPECT_EQ(dirnames_[0] + "/foo", shadowing_disk_file); - - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - dirnames_[1] + "/baz", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("bar/baz", virtual_file); - - EXPECT_EQ(DiskSourceTree::SUCCESS, - source_tree_.DiskFileToVirtualFile( - dirnames_[0] + "/foo", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("bar/foo", virtual_file); -} - -TEST_F(DiskSourceTreeTest, DiskFileToVirtualFileCanonicalization) { - // Test handling of "..", ".", etc. in DiskFileToVirtualFile(). - - source_tree_.MapPath("dir1", ".."); - source_tree_.MapPath("dir2", "../../foo"); - source_tree_.MapPath("dir3", "./foo/bar/."); - source_tree_.MapPath("dir4", "."); - source_tree_.MapPath("", "/qux"); - source_tree_.MapPath("dir5", "/quux/"); - - string virtual_file; - string shadowing_disk_file; - - // "../.." should not be considered to be under "..". - EXPECT_EQ(DiskSourceTree::NO_MAPPING, - source_tree_.DiskFileToVirtualFile( - "../../baz", &virtual_file, &shadowing_disk_file)); - - // "/foo" is not mapped (it should not be misintepreted as being under "."). - EXPECT_EQ(DiskSourceTree::NO_MAPPING, - source_tree_.DiskFileToVirtualFile( - "/foo", &virtual_file, &shadowing_disk_file)); - -#ifdef WIN32 - // "C:\foo" is not mapped (it should not be misintepreted as being under "."). - EXPECT_EQ(DiskSourceTree::NO_MAPPING, - source_tree_.DiskFileToVirtualFile( - "C:\\foo", &virtual_file, &shadowing_disk_file)); -#endif // WIN32 - - // But "../baz" should be. - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "../baz", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("dir1/baz", virtual_file); - - // "../../foo/baz" is under "../../foo". - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "../../foo/baz", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("dir2/baz", virtual_file); - - // "foo/./bar/baz" is under "./foo/bar/.". - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "foo/bar/baz", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("dir3/baz", virtual_file); - - // "bar" is under ".". - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "bar", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("dir4/bar", virtual_file); - - // "/qux/baz" is under "/qux". - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "/qux/baz", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("baz", virtual_file); - - // "/quux/bar" is under "/quux". - EXPECT_EQ(DiskSourceTree::CANNOT_OPEN, - source_tree_.DiskFileToVirtualFile( - "/quux/bar", &virtual_file, &shadowing_disk_file)); - EXPECT_EQ("dir5/bar", virtual_file); -} - -TEST_F(DiskSourceTreeTest, VirtualFileToDiskFile) { - // Test VirtualFileToDiskFile. - - AddFile(dirnames_[0] + "/foo", "Hello World!"); - AddFile(dirnames_[1] + "/foo", "This file should be hidden."); - AddFile(dirnames_[1] + "/quux", "This file should not be hidden."); - source_tree_.MapPath("bar", dirnames_[0]); - source_tree_.MapPath("bar", dirnames_[1]); - - // Existent files, shadowed and non-shadowed case. - string disk_file; - EXPECT_TRUE(source_tree_.VirtualFileToDiskFile("bar/foo", &disk_file)); - EXPECT_EQ(dirnames_[0] + "/foo", disk_file); - EXPECT_TRUE(source_tree_.VirtualFileToDiskFile("bar/quux", &disk_file)); - EXPECT_EQ(dirnames_[1] + "/quux", disk_file); - - // Nonexistent file in existent directory and vice versa. - string not_touched = "not touched"; - EXPECT_FALSE(source_tree_.VirtualFileToDiskFile("bar/baz", ¬_touched)); - EXPECT_EQ("not touched", not_touched); - EXPECT_FALSE(source_tree_.VirtualFileToDiskFile("baz/foo", ¬_touched)); - EXPECT_EQ("not touched", not_touched); - - // Accept NULL as output parameter. - EXPECT_TRUE(source_tree_.VirtualFileToDiskFile("bar/foo", NULL)); - EXPECT_FALSE(source_tree_.VirtualFileToDiskFile("baz/foo", NULL)); -} - -} // namespace - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.cc deleted file mode 100644 index 9d7bcab6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.cc +++ /dev/null @@ -1,243 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor) - : descriptor_(descriptor) { - for (int i = 0; i < descriptor_->value_count(); i++) { - const EnumValueDescriptor* value = descriptor_->value(i); - const EnumValueDescriptor* canonical_value = - descriptor_->FindValueByNumber(value->number()); - - if (value == canonical_value) { - canonical_values_.push_back(value); - } else { - Alias alias; - alias.value = value; - alias.canonical_value = canonical_value; - aliases_.push_back(alias); - } - } -} - -EnumGenerator::~EnumGenerator() {} - -void EnumGenerator::Generate(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public enum $classname$\n" - " implements com.google.protobuf.ProtocolMessageEnum {\n", - "classname", descriptor_->name()); - } else { - printer->Print( - "public enum $classname$\n" - " implements com.google.protobuf.Internal.EnumLite {\n", - "classname", descriptor_->name()); - } - printer->Indent(); - - for (int i = 0; i < canonical_values_.size(); i++) { - map vars; - vars["name"] = canonical_values_[i]->name(); - vars["index"] = SimpleItoa(canonical_values_[i]->index()); - vars["number"] = SimpleItoa(canonical_values_[i]->number()); - printer->Print(vars, - "$name$($index$, $number$),\n"); - } - - printer->Print( - ";\n" - "\n"); - - // ----------------------------------------------------------------- - - for (int i = 0; i < aliases_.size(); i++) { - map vars; - vars["classname"] = descriptor_->name(); - vars["name"] = aliases_[i].value->name(); - vars["canonical_name"] = aliases_[i].canonical_value->name(); - printer->Print(vars, - "public static final $classname$ $name$ = $canonical_name$;\n"); - } - - for (int i = 0; i < descriptor_->value_count(); i++) { - map vars; - vars["name"] = descriptor_->value(i)->name(); - vars["number"] = SimpleItoa(descriptor_->value(i)->number()); - printer->Print(vars, - "public static final int $name$_VALUE = $number$;\n"); - } - printer->Print("\n"); - - // ----------------------------------------------------------------- - - printer->Print( - "\n" - "public final int getNumber() { return value; }\n" - "\n" - "public static $classname$ valueOf(int value) {\n" - " switch (value) {\n", - "classname", descriptor_->name()); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < canonical_values_.size(); i++) { - printer->Print( - "case $number$: return $name$;\n", - "name", canonical_values_[i]->name(), - "number", SimpleItoa(canonical_values_[i]->number())); - } - - printer->Outdent(); - printer->Outdent(); - printer->Print( - " default: return null;\n" - " }\n" - "}\n" - "\n" - "public static com.google.protobuf.Internal.EnumLiteMap<$classname$>\n" - " internalGetValueMap() {\n" - " return internalValueMap;\n" - "}\n" - "private static com.google.protobuf.Internal.EnumLiteMap<$classname$>\n" - " internalValueMap =\n" - " new com.google.protobuf.Internal.EnumLiteMap<$classname$>() {\n" - " public $classname$ findValueByNumber(int number) {\n" - " return $classname$.valueOf(number);\n" - " }\n" - " };\n" - "\n", - "classname", descriptor_->name()); - - // ----------------------------------------------------------------- - // Reflection - - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public final com.google.protobuf.Descriptors.EnumValueDescriptor\n" - " getValueDescriptor() {\n" - " return getDescriptor().getValues().get(index);\n" - "}\n" - "public final com.google.protobuf.Descriptors.EnumDescriptor\n" - " getDescriptorForType() {\n" - " return getDescriptor();\n" - "}\n" - "public static final com.google.protobuf.Descriptors.EnumDescriptor\n" - " getDescriptor() {\n"); - - // TODO(kenton): Cache statically? Note that we can't access descriptors - // at module init time because it wouldn't work with descriptor.proto, but - // we can cache the value the first time getDescriptor() is called. - if (descriptor_->containing_type() == NULL) { - printer->Print( - " return $file$.getDescriptor().getEnumTypes().get($index$);\n", - "file", ClassName(descriptor_->file()), - "index", SimpleItoa(descriptor_->index())); - } else { - printer->Print( - " return $parent$.getDescriptor().getEnumTypes().get($index$);\n", - "parent", ClassName(descriptor_->containing_type()), - "index", SimpleItoa(descriptor_->index())); - } - - printer->Print( - "}\n" - "\n" - "private static final $classname$[] VALUES = {\n" - " ", - "classname", descriptor_->name()); - - for (int i = 0; i < descriptor_->value_count(); i++) { - printer->Print("$name$, ", - "name", descriptor_->value(i)->name()); - } - - printer->Print( - "\n" - "};\n" - "\n" - "public static $classname$ valueOf(\n" - " com.google.protobuf.Descriptors.EnumValueDescriptor desc) {\n" - " if (desc.getType() != getDescriptor()) {\n" - " throw new java.lang.IllegalArgumentException(\n" - " \"EnumValueDescriptor is not for this type.\");\n" - " }\n" - " return VALUES[desc.getIndex()];\n" - "}\n" - "\n", - "classname", descriptor_->name()); - - // index is only used for reflection; lite implementation does not need it - printer->Print("private final int index;\n"); - } - - // ----------------------------------------------------------------- - - printer->Print( - "private final int value;\n\n" - "private $classname$(int index, int value) {\n", - "classname", descriptor_->name()); - if (HasDescriptorMethods(descriptor_)) { - printer->Print(" this.index = index;\n"); - } - printer->Print( - " this.value = value;\n" - "}\n"); - - printer->Print( - "\n" - "// @@protoc_insertion_point(enum_scope:$full_name$)\n", - "full_name", descriptor_->full_name()); - - printer->Outdent(); - printer->Print("}\n\n"); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.h deleted file mode 100644 index 05ece1f1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum.h +++ /dev/null @@ -1,84 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -class EnumGenerator { - public: - explicit EnumGenerator(const EnumDescriptor* descriptor); - ~EnumGenerator(); - - void Generate(io::Printer* printer); - - private: - const EnumDescriptor* descriptor_; - - // The proto language allows multiple enum constants to have the same numeric - // value. Java, however, does not allow multiple enum constants to be - // considered equivalent. We treat the first defined constant for any - // given numeric value as "canonical" and the rest as aliases of that - // canonical value. - vector canonical_values_; - - struct Alias { - const EnumValueDescriptor* value; - const EnumValueDescriptor* canonical_value; - }; - vector aliases_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc deleted file mode 100644 index 72caa10b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc +++ /dev/null @@ -1,537 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -namespace { - -// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of -// repeat code between this and the other field types. -void SetEnumVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - map* variables) { - (*variables)["name"] = - UnderscoresToCamelCase(descriptor); - (*variables)["capitalized_name"] = - UnderscoresToCapitalizedCamelCase(descriptor); - (*variables)["constant_name"] = FieldConstantName(descriptor); - (*variables)["number"] = SimpleItoa(descriptor->number()); - (*variables)["type"] = ClassName(descriptor->enum_type()); - (*variables)["default"] = DefaultValue(descriptor); - (*variables)["tag"] = SimpleItoa(internal::WireFormat::MakeTag(descriptor)); - (*variables)["tag_size"] = SimpleItoa( - internal::WireFormat::TagSize(descriptor->number(), GetType(descriptor))); - // TODO(birdo): Add @deprecated javadoc when generating javadoc is supported - // by the proto compiler - (*variables)["deprecation"] = descriptor->options().deprecated() - ? "@java.lang.Deprecated " : ""; - (*variables)["on_changed"] = - HasDescriptorMethods(descriptor->containing_type()) ? "onChanged();" : ""; - - // For singular messages and builders, one bit is used for the hasField bit. - (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); - - (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_has_field_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_has_field_bit_builder"] = - GenerateClearBit(builderBitIndex); - - // For repated builders, one bit is used for whether the array is immutable. - (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); - - (*variables)["get_has_field_bit_from_local"] = - GenerateGetBitFromLocal(builderBitIndex); - (*variables)["set_has_field_bit_to_local"] = - GenerateSetBitToLocal(messageBitIndex); -} - -} // namespace - -// =================================================================== - -EnumFieldGenerator:: -EnumFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetEnumVariables(descriptor, messageBitIndex, builderBitIndex, &variables_); -} - -EnumFieldGenerator::~EnumFieldGenerator() {} - -int EnumFieldGenerator::GetNumBitsForMessage() const { - return 1; -} - -int EnumFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void EnumFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$boolean has$capitalized_name$();\n" - "$deprecation$$type$ get$capitalized_name$();\n"); -} - -void EnumFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $type$ $name$_;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_message$;\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$() {\n" - " return $name$_;\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $type$ $name$_ = $default$;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_builder$;\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$() {\n" - " return $name$_;\n" - "}\n" - "$deprecation$public Builder set$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" - " $set_has_field_bit_builder$;\n" - " $name$_ = value;\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $clear_has_field_bit_builder$;\n" - " $name$_ = $default$;\n" - " $on_changed$\n" - " return this;\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for enums -} - -void EnumFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void EnumFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = $default$;\n" - "$clear_has_field_bit_builder$;\n"); -} - -void EnumFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, - "if (other.has$capitalized_name$()) {\n" - " set$capitalized_name$(other.get$capitalized_name$());\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_from_local$) {\n" - " $set_has_field_bit_to_local$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void EnumFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "int rawValue = input.readEnum();\n" - "$type$ value = $type$.valueOf(rawValue);\n"); - if (HasUnknownFields(descriptor_->containing_type())) { - printer->Print(variables_, - "if (value == null) {\n" - " unknownFields.mergeVarintField($number$, rawValue);\n" - "} else {\n"); - } else { - printer->Print(variables_, - "if (value != null) {\n"); - } - printer->Print(variables_, - " $set_has_field_bit_builder$;\n" - " $name$_ = value;\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " output.writeEnum($number$, $name$_.getNumber());\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .computeEnumSize($number$, $name$_.getNumber());\n" - "}\n"); -} - -void EnumFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result &&\n" - " (get$capitalized_name$() == other.get$capitalized_name$());\n"); -} - -void EnumFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "hash = (37 * hash) + $constant_name$;\n" - "hash = (53 * hash) + hashEnum(get$capitalized_name$());\n"); -} - -string EnumFieldGenerator::GetBoxedType() const { - return ClassName(descriptor_->enum_type()); -} - -// =================================================================== - -RepeatedEnumFieldGenerator:: -RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetEnumVariables(descriptor, messageBitIndex, builderBitIndex, &variables_); -} - -RepeatedEnumFieldGenerator::~RepeatedEnumFieldGenerator() {} - -int RepeatedEnumFieldGenerator::GetNumBitsForMessage() const { - return 0; -} - -int RepeatedEnumFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void RepeatedEnumFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$java.util.List<$type$> get$capitalized_name$List();\n" - "$deprecation$int get$capitalized_name$Count();\n" - "$deprecation$$type$ get$capitalized_name$(int index);\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private java.util.List<$type$> $name$_;\n" - "$deprecation$public java.util.List<$type$> get$capitalized_name$List() {\n" - " return $name$_;\n" // note: unmodifiable list - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n"); - - if (descriptor_->options().packed() && - HasGeneratedMethods(descriptor_->containing_type())) { - printer->Print(variables_, - "private int $name$MemoizedSerializedSize;\n"); - } -} - -void RepeatedEnumFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - printer->Print(variables_, - // One field is the list and the other field keeps track of whether the - // list is immutable. If it's immutable, the invariant is that it must - // either an instance of Collections.emptyList() or it's an ArrayList - // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to - // share instances of lists between protocol buffers avoiding expensive - // memory allocations. Note, immutable is a strong guarantee here -- not - // just that the list cannot be modified via the reference but that the - // list can never be modified. - "private java.util.List<$type$> $name$_ =\n" - " java.util.Collections.emptyList();\n" - - "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$get_mutable_bit_builder$) {\n" - " $name$_ = new java.util.ArrayList<$type$>($name$_);\n" - " $set_mutable_bit_builder$;\n" - " }\n" - "}\n" - - // Note: We return an unmodifiable list because otherwise the caller - // could hold on to the returned list and modify it after the message - // has been built, thus mutating the message which is supposed to be - // immutable. - "$deprecation$public java.util.List<$type$> get$capitalized_name$List() {\n" - " return java.util.Collections.unmodifiableList($name$_);\n" - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n" - "$deprecation$public Builder set$capitalized_name$(\n" - " int index, $type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.set(index, value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder add$capitalized_name$($type$ value) {\n" - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder addAll$capitalized_name$(\n" - " java.lang.Iterable values) {\n" - " ensure$capitalized_name$IsMutable();\n" - " super.addAll(values, $name$_);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $name$_ = java.util.Collections.emptyList();\n" - " $clear_mutable_bit_builder$;\n" - " $on_changed$\n" - " return this;\n" - "}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for enums -} - -void RepeatedEnumFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = java.util.Collections.emptyList();\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = java.util.Collections.emptyList();\n" - "$clear_mutable_bit_builder$;\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - // The code below does two optimizations: - // 1. If the other list is empty, there's nothing to do. This ensures we - // don't allocate a new array if we already have an immutable one. - // 2. If the other list is non-empty and our current list is empty, we can - // reuse the other list which is guaranteed to be immutable. - printer->Print(variables_, - "if (!other.$name$_.isEmpty()) {\n" - " if ($name$_.isEmpty()) {\n" - " $name$_ = other.$name$_;\n" - " $clear_mutable_bit_builder$;\n" - " } else {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.addAll(other.$name$_);\n" - " }\n" - " $on_changed$\n" - "}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - // The code below ensures that the result has an immutable list. If our - // list is immutable, we can just reuse it. If not, we make it immutable. - printer->Print(variables_, - "if ($get_mutable_bit_builder$) {\n" - " $name$_ = java.util.Collections.unmodifiableList($name$_);\n" - " $clear_mutable_bit_builder$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - // Read and store the enum - printer->Print(variables_, - "int rawValue = input.readEnum();\n" - "$type$ value = $type$.valueOf(rawValue);\n"); - if (HasUnknownFields(descriptor_->containing_type())) { - printer->Print(variables_, - "if (value == null) {\n" - " unknownFields.mergeVarintField($number$, rawValue);\n" - "} else {\n"); - } else { - printer->Print(variables_, - "if (value != null) {\n"); - } - printer->Print(variables_, - " add$capitalized_name$(value);\n" - "}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateParsingCodeFromPacked(io::Printer* printer) const { - // Wrap GenerateParsingCode's contents with a while loop. - - printer->Print(variables_, - "int length = input.readRawVarint32();\n" - "int oldLimit = input.pushLimit(length);\n" - "while(input.getBytesUntilLimit() > 0) {\n"); - printer->Indent(); - - GenerateParsingCode(printer); - - printer->Outdent(); - printer->Print(variables_, - "}\n" - "input.popLimit(oldLimit);\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (get$capitalized_name$List().size() > 0) {\n" - " output.writeRawVarint32($tag$);\n" - " output.writeRawVarint32($name$MemoizedSerializedSize);\n" - "}\n" - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.writeEnumNoTag($name$_.get(i).getNumber());\n" - "}\n"); - } else { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.writeEnum($number$, $name$_.get(i).getNumber());\n" - "}\n"); - } -} - -void RepeatedEnumFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "{\n" - " int dataSize = 0;\n"); - printer->Indent(); - - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " dataSize += com.google.protobuf.CodedOutputStream\n" - " .computeEnumSizeNoTag($name$_.get(i).getNumber());\n" - "}\n"); - printer->Print( - "size += dataSize;\n"); - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (!get$capitalized_name$List().isEmpty()) {" - " size += $tag_size$;\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .computeRawVarint32Size(dataSize);\n" - "}"); - } else { - printer->Print(variables_, - "size += $tag_size$ * $name$_.size();\n"); - } - - // cache the data size for packed fields. - if (descriptor_->options().packed()) { - printer->Print(variables_, - "$name$MemoizedSerializedSize = dataSize;\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$List()\n" - " .equals(other.get$capitalized_name$List());\n"); -} - -void RepeatedEnumFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "if (get$capitalized_name$Count() > 0) {\n" - " hash = (37 * hash) + $constant_name$;\n" - " hash = (53 * hash) + hashEnumList(get$capitalized_name$List());\n" - "}\n"); -} - -string RepeatedEnumFieldGenerator::GetBoxedType() const { - return ClassName(descriptor_->enum_type()); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.h deleted file mode 100644 index 0cad6be0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_enum_field.h +++ /dev/null @@ -1,121 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -class EnumFieldGenerator : public FieldGenerator { - public: - explicit EnumFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~EnumFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); -}; - -class RepeatedEnumFieldGenerator : public FieldGenerator { - public: - explicit RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~RepeatedEnumFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateParsingCodeFromPacked(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.cc deleted file mode 100644 index 9b147c77..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.cc +++ /dev/null @@ -1,216 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -namespace { - -const char* TypeName(FieldDescriptor::Type field_type) { - switch (field_type) { - case FieldDescriptor::TYPE_INT32 : return "INT32"; - case FieldDescriptor::TYPE_UINT32 : return "UINT32"; - case FieldDescriptor::TYPE_SINT32 : return "SINT32"; - case FieldDescriptor::TYPE_FIXED32 : return "FIXED32"; - case FieldDescriptor::TYPE_SFIXED32: return "SFIXED32"; - case FieldDescriptor::TYPE_INT64 : return "INT64"; - case FieldDescriptor::TYPE_UINT64 : return "UINT64"; - case FieldDescriptor::TYPE_SINT64 : return "SINT64"; - case FieldDescriptor::TYPE_FIXED64 : return "FIXED64"; - case FieldDescriptor::TYPE_SFIXED64: return "SFIXED64"; - case FieldDescriptor::TYPE_FLOAT : return "FLOAT"; - case FieldDescriptor::TYPE_DOUBLE : return "DOUBLE"; - case FieldDescriptor::TYPE_BOOL : return "BOOL"; - case FieldDescriptor::TYPE_STRING : return "STRING"; - case FieldDescriptor::TYPE_BYTES : return "BYTES"; - case FieldDescriptor::TYPE_ENUM : return "ENUM"; - case FieldDescriptor::TYPE_GROUP : return "GROUP"; - case FieldDescriptor::TYPE_MESSAGE : return "MESSAGE"; - - // No default because we want the compiler to complain if any new - // types are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; -} - -} - -ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor) - : descriptor_(descriptor) { - if (descriptor_->extension_scope() != NULL) { - scope_ = ClassName(descriptor_->extension_scope()); - } else { - scope_ = ClassName(descriptor_->file()); - } -} - -ExtensionGenerator::~ExtensionGenerator() {} - -// Initializes the vars referenced in the generated code templates. -void InitTemplateVars(const FieldDescriptor* descriptor, - const string& scope, - map* vars_pointer) { - map &vars = *vars_pointer; - vars["scope"] = scope; - vars["name"] = UnderscoresToCamelCase(descriptor); - vars["containing_type"] = ClassName(descriptor->containing_type()); - vars["number"] = SimpleItoa(descriptor->number()); - vars["constant_name"] = FieldConstantName(descriptor); - vars["index"] = SimpleItoa(descriptor->index()); - vars["default"] = - descriptor->is_repeated() ? "" : DefaultValue(descriptor); - vars["type_constant"] = TypeName(GetType(descriptor)); - vars["packed"] = descriptor->options().packed() ? "true" : "false"; - vars["enum_map"] = "null"; - vars["prototype"] = "null"; - - JavaType java_type = GetJavaType(descriptor); - string singular_type; - switch (java_type) { - case JAVATYPE_MESSAGE: - singular_type = ClassName(descriptor->message_type()); - vars["prototype"] = singular_type + ".getDefaultInstance()"; - break; - case JAVATYPE_ENUM: - singular_type = ClassName(descriptor->enum_type()); - vars["enum_map"] = singular_type + ".internalGetValueMap()"; - break; - default: - singular_type = BoxedPrimitiveTypeName(java_type); - break; - } - vars["type"] = descriptor->is_repeated() ? - "java.util.List<" + singular_type + ">" : singular_type; - vars["singular_type"] = singular_type; -} - -void ExtensionGenerator::Generate(io::Printer* printer) { - map vars; - InitTemplateVars(descriptor_, scope_, &vars); - printer->Print(vars, - "public static final int $constant_name$ = $number$;\n"); - - if (HasDescriptorMethods(descriptor_->file())) { - // Non-lite extensions - if (descriptor_->extension_scope() == NULL) { - // Non-nested - printer->Print( - vars, - "public static final\n" - " com.google.protobuf.GeneratedMessage.GeneratedExtension<\n" - " $containing_type$,\n" - " $type$> $name$ = com.google.protobuf.GeneratedMessage\n" - " .newFileScopedGeneratedExtension(\n" - " $singular_type$.class,\n" - " $prototype$);\n"); - } else { - // Nested - printer->Print( - vars, - "public static final\n" - " com.google.protobuf.GeneratedMessage.GeneratedExtension<\n" - " $containing_type$,\n" - " $type$> $name$ = com.google.protobuf.GeneratedMessage\n" - " .newMessageScopedGeneratedExtension(\n" - " $scope$.getDefaultInstance(),\n" - " $index$,\n" - " $singular_type$.class,\n" - " $prototype$);\n"); - } - } else { - // Lite extensions - if (descriptor_->is_repeated()) { - printer->Print( - vars, - "public static final\n" - " com.google.protobuf.GeneratedMessageLite.GeneratedExtension<\n" - " $containing_type$,\n" - " $type$> $name$ = com.google.protobuf.GeneratedMessageLite\n" - " .newRepeatedGeneratedExtension(\n" - " $containing_type$.getDefaultInstance(),\n" - " $prototype$,\n" - " $enum_map$,\n" - " $number$,\n" - " com.google.protobuf.WireFormat.FieldType.$type_constant$,\n" - " $packed$);\n"); - } else { - printer->Print( - vars, - "public static final\n" - " com.google.protobuf.GeneratedMessageLite.GeneratedExtension<\n" - " $containing_type$,\n" - " $type$> $name$ = com.google.protobuf.GeneratedMessageLite\n" - " .newSingularGeneratedExtension(\n" - " $containing_type$.getDefaultInstance(),\n" - " $default$,\n" - " $prototype$,\n" - " $enum_map$,\n" - " $number$,\n" - " com.google.protobuf.WireFormat.FieldType.$type_constant$);\n"); - } - } -} - -void ExtensionGenerator::GenerateNonNestedInitializationCode( - io::Printer* printer) { - if (descriptor_->extension_scope() == NULL && - HasDescriptorMethods(descriptor_->file())) { - // Only applies to non-nested, non-lite extensions. - printer->Print( - "$name$.internalInit(descriptor.getExtensions().get($index$));\n", - "name", UnderscoresToCamelCase(descriptor_), - "index", SimpleItoa(descriptor_->index())); - } -} - -void ExtensionGenerator::GenerateRegistrationCode(io::Printer* printer) { - printer->Print( - "registry.add($scope$.$name$);\n", - "scope", scope_, - "name", UnderscoresToCamelCase(descriptor_)); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.h deleted file mode 100644 index 009ed9ff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_extension.h +++ /dev/null @@ -1,77 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__ - -#include - -#include - -namespace google { -namespace protobuf { - class FieldDescriptor; // descriptor.h - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -// Generates code for an extension, which may be within the scope of some -// message or may be at file scope. This is much simpler than FieldGenerator -// since extensions are just simple identifiers with interesting types. -class ExtensionGenerator { - public: - explicit ExtensionGenerator(const FieldDescriptor* descriptor); - ~ExtensionGenerator(); - - void Generate(io::Printer* printer); - void GenerateNonNestedInitializationCode(io::Printer* printer); - void GenerateRegistrationCode(io::Printer* printer); - - private: - const FieldDescriptor* descriptor_; - string scope_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.cc deleted file mode 100644 index c7d433c8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.cc +++ /dev/null @@ -1,137 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -FieldGenerator::~FieldGenerator() {} - -void FieldGenerator::GenerateParsingCodeFromPacked(io::Printer* printer) const { - // Reaching here indicates a bug. Cases are: - // - This FieldGenerator should support packing, but this method should be - // overridden. - // - This FieldGenerator doesn't support packing, and this method should - // never have been called. - GOOGLE_LOG(FATAL) << "GenerateParsingCodeFromPacked() " - << "called on field generator that does not support packing."; -} - -FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor) - : descriptor_(descriptor), - field_generators_( - new scoped_ptr[descriptor->field_count()]), - extension_generators_( - new scoped_ptr[descriptor->extension_count()]) { - - // Construct all the FieldGenerators and assign them bit indices for their - // bit fields. - int messageBitIndex = 0; - int builderBitIndex = 0; - for (int i = 0; i < descriptor->field_count(); i++) { - FieldGenerator* generator = MakeGenerator(descriptor->field(i), - messageBitIndex, builderBitIndex); - field_generators_[i].reset(generator); - messageBitIndex += generator->GetNumBitsForMessage(); - builderBitIndex += generator->GetNumBitsForBuilder(); - } - for (int i = 0; i < descriptor->extension_count(); i++) { - FieldGenerator* generator = MakeGenerator(descriptor->extension(i), - messageBitIndex, builderBitIndex); - extension_generators_[i].reset(generator); - messageBitIndex += generator->GetNumBitsForMessage(); - builderBitIndex += generator->GetNumBitsForBuilder(); - } -} - -FieldGenerator* FieldGeneratorMap::MakeGenerator( - const FieldDescriptor* field, int messageBitIndex, int builderBitIndex) { - if (field->is_repeated()) { - switch (GetJavaType(field)) { - case JAVATYPE_MESSAGE: - return new RepeatedMessageFieldGenerator( - field, messageBitIndex, builderBitIndex); - case JAVATYPE_ENUM: - return new RepeatedEnumFieldGenerator( - field, messageBitIndex, builderBitIndex); - case JAVATYPE_STRING: - return new RepeatedStringFieldGenerator( - field, messageBitIndex, builderBitIndex); - default: - return new RepeatedPrimitiveFieldGenerator( - field, messageBitIndex, builderBitIndex); - } - } else { - switch (GetJavaType(field)) { - case JAVATYPE_MESSAGE: - return new MessageFieldGenerator( - field, messageBitIndex, builderBitIndex); - case JAVATYPE_ENUM: - return new EnumFieldGenerator( - field, messageBitIndex, builderBitIndex); - case JAVATYPE_STRING: - return new StringFieldGenerator( - field, messageBitIndex, builderBitIndex); - default: - return new PrimitiveFieldGenerator( - field, messageBitIndex, builderBitIndex); - } - } -} - -FieldGeneratorMap::~FieldGeneratorMap() {} - -const FieldGenerator& FieldGeneratorMap::get( - const FieldDescriptor* field) const { - GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); - return *field_generators_[field->index()]; -} - -const FieldGenerator& FieldGeneratorMap::get_extension(int index) const { - return *extension_generators_[index]; -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.h deleted file mode 100644 index 6097f357..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_field.h +++ /dev/null @@ -1,108 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -class FieldGenerator { - public: - FieldGenerator() {} - virtual ~FieldGenerator(); - - virtual int GetNumBitsForMessage() const = 0; - virtual int GetNumBitsForBuilder() const = 0; - virtual void GenerateInterfaceMembers(io::Printer* printer) const = 0; - virtual void GenerateMembers(io::Printer* printer) const = 0; - virtual void GenerateBuilderMembers(io::Printer* printer) const = 0; - virtual void GenerateInitializationCode(io::Printer* printer) const = 0; - virtual void GenerateBuilderClearCode(io::Printer* printer) const = 0; - virtual void GenerateMergingCode(io::Printer* printer) const = 0; - virtual void GenerateBuildingCode(io::Printer* printer) const = 0; - virtual void GenerateParsingCode(io::Printer* printer) const = 0; - virtual void GenerateParsingCodeFromPacked(io::Printer* printer) const; - virtual void GenerateSerializationCode(io::Printer* printer) const = 0; - virtual void GenerateSerializedSizeCode(io::Printer* printer) const = 0; - virtual void GenerateFieldBuilderInitializationCode(io::Printer* printer) - const = 0; - - virtual void GenerateEqualsCode(io::Printer* printer) const = 0; - virtual void GenerateHashCode(io::Printer* printer) const = 0; - - virtual string GetBoxedType() const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); -}; - -// Convenience class which constructs FieldGenerators for a Descriptor. -class FieldGeneratorMap { - public: - explicit FieldGeneratorMap(const Descriptor* descriptor); - ~FieldGeneratorMap(); - - const FieldGenerator& get(const FieldDescriptor* field) const; - const FieldGenerator& get_extension(int index) const; - - private: - const Descriptor* descriptor_; - scoped_array > field_generators_; - scoped_array > extension_generators_; - - static FieldGenerator* MakeGenerator(const FieldDescriptor* field, - int messageBitIndex, int builderBitIndex); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.cc deleted file mode 100644 index 8968069f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.cc +++ /dev/null @@ -1,428 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -namespace { - -// Recursively searches the given message to see if it contains any extensions. -bool UsesExtensions(const Message& message) { - const Reflection* reflection = message.GetReflection(); - - // We conservatively assume that unknown fields are extensions. - if (reflection->GetUnknownFields(message).field_count() > 0) return true; - - vector fields; - reflection->ListFields(message, &fields); - - for (int i = 0; i < fields.size(); i++) { - if (fields[i]->is_extension()) return true; - - if (GetJavaType(fields[i]) == JAVATYPE_MESSAGE) { - if (fields[i]->is_repeated()) { - int size = reflection->FieldSize(message, fields[i]); - for (int j = 0; j < size; j++) { - const Message& sub_message = - reflection->GetRepeatedMessage(message, fields[i], j); - if (UsesExtensions(sub_message)) return true; - } - } else { - const Message& sub_message = reflection->GetMessage(message, fields[i]); - if (UsesExtensions(sub_message)) return true; - } - } - } - - return false; -} - - -} // namespace - -FileGenerator::FileGenerator(const FileDescriptor* file) - : file_(file), - java_package_(FileJavaPackage(file)), - classname_(FileClassName(file)) { -} - -FileGenerator::~FileGenerator() {} - -bool FileGenerator::Validate(string* error) { - // Check that no class name matches the file's class name. This is a common - // problem that leads to Java compile errors that can be hard to understand. - // It's especially bad when using the java_multiple_files, since we would - // end up overwriting the outer class with one of the inner ones. - - bool found_conflict = false; - for (int i = 0; i < file_->enum_type_count() && !found_conflict; i++) { - if (file_->enum_type(i)->name() == classname_) { - found_conflict = true; - } - } - for (int i = 0; i < file_->message_type_count() && !found_conflict; i++) { - if (file_->message_type(i)->name() == classname_) { - found_conflict = true; - } - } - for (int i = 0; i < file_->service_count() && !found_conflict; i++) { - if (file_->service(i)->name() == classname_) { - found_conflict = true; - } - } - - if (found_conflict) { - error->assign(file_->name()); - error->append( - ": Cannot generate Java output because the file's outer class name, \""); - error->append(classname_); - error->append( - "\", matches the name of one of the types declared inside it. " - "Please either rename the type or use the java_outer_classname " - "option to specify a different outer class name for the .proto file."); - return false; - } - - return true; -} - -void FileGenerator::Generate(io::Printer* printer) { - // We don't import anything because we refer to all classes by their - // fully-qualified names in the generated source. - printer->Print( - "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" - "// source: $filename$\n" - "\n", - "filename", file_->name()); - if (!java_package_.empty()) { - printer->Print( - "package $package$;\n" - "\n", - "package", java_package_); - } - printer->Print( - "public final class $classname$ {\n" - " private $classname$() {}\n", - "classname", classname_); - printer->Indent(); - - // ----------------------------------------------------------------- - - printer->Print( - "public static void registerAllExtensions(\n" - " com.google.protobuf.ExtensionRegistry$lite$ registry) {\n", - "lite", HasDescriptorMethods(file_) ? "" : "Lite"); - - printer->Indent(); - - for (int i = 0; i < file_->extension_count(); i++) { - ExtensionGenerator(file_->extension(i)).GenerateRegistrationCode(printer); - } - - for (int i = 0; i < file_->message_type_count(); i++) { - MessageGenerator(file_->message_type(i)) - .GenerateExtensionRegistrationCode(printer); - } - - printer->Outdent(); - printer->Print( - "}\n"); - - // ----------------------------------------------------------------- - - if (!file_->options().java_multiple_files()) { - for (int i = 0; i < file_->enum_type_count(); i++) { - EnumGenerator(file_->enum_type(i)).Generate(printer); - } - for (int i = 0; i < file_->message_type_count(); i++) { - MessageGenerator messageGenerator(file_->message_type(i)); - messageGenerator.GenerateInterface(printer); - messageGenerator.Generate(printer); - } - if (HasGenericServices(file_)) { - for (int i = 0; i < file_->service_count(); i++) { - ServiceGenerator(file_->service(i)).Generate(printer); - } - } - } - - // Extensions must be generated in the outer class since they are values, - // not classes. - for (int i = 0; i < file_->extension_count(); i++) { - ExtensionGenerator(file_->extension(i)).Generate(printer); - } - - // Static variables. - for (int i = 0; i < file_->message_type_count(); i++) { - // TODO(kenton): Reuse MessageGenerator objects? - MessageGenerator(file_->message_type(i)).GenerateStaticVariables(printer); - } - - printer->Print("\n"); - - if (HasDescriptorMethods(file_)) { - GenerateEmbeddedDescriptor(printer); - } else { - printer->Print( - "static {\n"); - printer->Indent(); - - for (int i = 0; i < file_->message_type_count(); i++) { - // TODO(kenton): Reuse MessageGenerator objects? - MessageGenerator(file_->message_type(i)) - .GenerateStaticVariableInitializers(printer); - } - - printer->Outdent(); - printer->Print( - "}\n"); - } - - printer->Print( - "\n" - "// @@protoc_insertion_point(outer_class_scope)\n"); - - printer->Outdent(); - printer->Print("}\n"); -} - -void FileGenerator::GenerateEmbeddedDescriptor(io::Printer* printer) { - // Embed the descriptor. We simply serialize the entire FileDescriptorProto - // and embed it as a string literal, which is parsed and built into real - // descriptors at initialization time. We unfortunately have to put it in - // a string literal, not a byte array, because apparently using a literal - // byte array causes the Java compiler to generate *instructions* to - // initialize each and every byte of the array, e.g. as if you typed: - // b[0] = 123; b[1] = 456; b[2] = 789; - // This makes huge bytecode files and can easily hit the compiler's internal - // code size limits (error "code to large"). String literals are apparently - // embedded raw, which is what we want. - FileDescriptorProto file_proto; - file_->CopyTo(&file_proto); - - string file_data; - file_proto.SerializeToString(&file_data); - - printer->Print( - "public static com.google.protobuf.Descriptors.FileDescriptor\n" - " getDescriptor() {\n" - " return descriptor;\n" - "}\n" - "private static com.google.protobuf.Descriptors.FileDescriptor\n" - " descriptor;\n" - "static {\n" - " java.lang.String[] descriptorData = {\n"); - printer->Indent(); - printer->Indent(); - - // Only write 40 bytes per line. - static const int kBytesPerLine = 40; - for (int i = 0; i < file_data.size(); i += kBytesPerLine) { - if (i > 0) { - // Every 400 lines, start a new string literal, in order to avoid the - // 64k length limit. - if (i % 400 == 0) { - printer->Print(",\n"); - } else { - printer->Print(" +\n"); - } - } - printer->Print("\"$data$\"", - "data", CEscape(file_data.substr(i, kBytesPerLine))); - } - - printer->Outdent(); - printer->Print("\n};\n"); - - // ----------------------------------------------------------------- - // Create the InternalDescriptorAssigner. - - printer->Print( - "com.google.protobuf.Descriptors.FileDescriptor." - "InternalDescriptorAssigner assigner =\n" - " new com.google.protobuf.Descriptors.FileDescriptor." - "InternalDescriptorAssigner() {\n" - " public com.google.protobuf.ExtensionRegistry assignDescriptors(\n" - " com.google.protobuf.Descriptors.FileDescriptor root) {\n" - " descriptor = root;\n"); - - printer->Indent(); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < file_->message_type_count(); i++) { - // TODO(kenton): Reuse MessageGenerator objects? - MessageGenerator(file_->message_type(i)) - .GenerateStaticVariableInitializers(printer); - } - for (int i = 0; i < file_->extension_count(); i++) { - // TODO(kenton): Reuse ExtensionGenerator objects? - ExtensionGenerator(file_->extension(i)) - .GenerateNonNestedInitializationCode(printer); - } - - if (UsesExtensions(file_proto)) { - // Must construct an ExtensionRegistry containing all possible extensions - // and return it. - printer->Print( - "com.google.protobuf.ExtensionRegistry registry =\n" - " com.google.protobuf.ExtensionRegistry.newInstance();\n" - "registerAllExtensions(registry);\n"); - for (int i = 0; i < file_->dependency_count(); i++) { - if (ShouldIncludeDependency(file_->dependency(i))) { - printer->Print( - "$dependency$.registerAllExtensions(registry);\n", - "dependency", ClassName(file_->dependency(i))); - } - } - printer->Print( - "return registry;\n"); - } else { - printer->Print( - "return null;\n"); - } - - printer->Outdent(); - printer->Outdent(); - printer->Outdent(); - - printer->Print( - " }\n" - " };\n"); - - // ----------------------------------------------------------------- - // Invoke internalBuildGeneratedFileFrom() to build the file. - - printer->Print( - "com.google.protobuf.Descriptors.FileDescriptor\n" - " .internalBuildGeneratedFileFrom(descriptorData,\n" - " new com.google.protobuf.Descriptors.FileDescriptor[] {\n"); - - for (int i = 0; i < file_->dependency_count(); i++) { - if (ShouldIncludeDependency(file_->dependency(i))) { - printer->Print( - " $dependency$.getDescriptor(),\n", - "dependency", ClassName(file_->dependency(i))); - } - } - - printer->Print( - " }, assigner);\n"); - - printer->Outdent(); - printer->Print( - "}\n"); -} - -template -static void GenerateSibling(const string& package_dir, - const string& java_package, - const DescriptorClass* descriptor, - GeneratorContext* context, - vector* file_list, - const string& name_suffix, - void (GeneratorClass::*pfn)(io::Printer* printer)) { - string filename = package_dir + descriptor->name() + name_suffix + ".java"; - file_list->push_back(filename); - - scoped_ptr output(context->Open(filename)); - io::Printer printer(output.get(), '$'); - - printer.Print( - "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" - "\n"); - if (!java_package.empty()) { - printer.Print( - "package $package$;\n" - "\n", - "package", java_package); - } - - GeneratorClass generator(descriptor); - (generator.*pfn)(&printer); -} - -void FileGenerator::GenerateSiblings(const string& package_dir, - GeneratorContext* context, - vector* file_list) { - if (file_->options().java_multiple_files()) { - for (int i = 0; i < file_->enum_type_count(); i++) { - GenerateSibling(package_dir, java_package_, - file_->enum_type(i), - context, file_list, "", - &EnumGenerator::Generate); - } - for (int i = 0; i < file_->message_type_count(); i++) { - GenerateSibling(package_dir, java_package_, - file_->message_type(i), - context, file_list, "OrBuilder", - &MessageGenerator::GenerateInterface); - GenerateSibling(package_dir, java_package_, - file_->message_type(i), - context, file_list, "", - &MessageGenerator::Generate); - } - if (HasGenericServices(file_)) { - for (int i = 0; i < file_->service_count(); i++) { - GenerateSibling(package_dir, java_package_, - file_->service(i), - context, file_list, "", - &ServiceGenerator::Generate); - } - } - } -} - -bool FileGenerator::ShouldIncludeDependency(const FileDescriptor* descriptor) { - return true; -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.h deleted file mode 100644 index 59911462..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_file.h +++ /dev/null @@ -1,101 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - class FileDescriptor; // descriptor.h - namespace io { - class Printer; // printer.h - } - namespace compiler { - class GeneratorContext; // code_generator.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -class FileGenerator { - public: - explicit FileGenerator(const FileDescriptor* file); - ~FileGenerator(); - - // Checks for problems that would otherwise lead to cryptic compile errors. - // Returns true if there are no problems, or writes an error description to - // the given string and returns false otherwise. - bool Validate(string* error); - - void Generate(io::Printer* printer); - - // If we aren't putting everything into one file, this will write all the - // files other than the outer file (i.e. one for each message, enum, and - // service type). - void GenerateSiblings(const string& package_dir, - GeneratorContext* generator_context, - vector* file_list); - - const string& java_package() { return java_package_; } - const string& classname() { return classname_; } - - - private: - // Returns whether the dependency should be included in the output file. - // Always returns true for opensource, but used internally at Google to help - // improve compatibility with version 1 of protocol buffers. - bool ShouldIncludeDependency(const FileDescriptor* descriptor); - - const FileDescriptor* file_; - string java_package_; - string classname_; - - - void GenerateEmbeddedDescriptor(io::Printer* printer); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.cc deleted file mode 100644 index e6c79abc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.cc +++ /dev/null @@ -1,128 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - - -JavaGenerator::JavaGenerator() {} -JavaGenerator::~JavaGenerator() {} - -bool JavaGenerator::Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - // ----------------------------------------------------------------- - // parse generator options - - // Name a file where we will write a list of generated file names, one - // per line. - string output_list_file; - - - vector > options; - ParseGeneratorParameter(parameter, &options); - - for (int i = 0; i < options.size(); i++) { - if (options[i].first == "output_list_file") { - output_list_file = options[i].second; - } else { - *error = "Unknown generator option: " + options[i].first; - return false; - } - } - - // ----------------------------------------------------------------- - - - if (file->options().optimize_for() == FileOptions::LITE_RUNTIME && - file->options().java_generate_equals_and_hash()) { - *error = "The \"java_generate_equals_and_hash\" option is incompatible " - "with \"optimize_for = LITE_RUNTIME\". You must optimize for " - "SPEED or CODE_SIZE if you want to use this option."; - return false; - } - - FileGenerator file_generator(file); - if (!file_generator.Validate(error)) { - return false; - } - - string package_dir = JavaPackageToDir(file_generator.java_package()); - - vector all_files; - - string java_filename = package_dir; - java_filename += file_generator.classname(); - java_filename += ".java"; - all_files.push_back(java_filename); - - // Generate main java file. - scoped_ptr output( - context->Open(java_filename)); - io::Printer printer(output.get(), '$'); - file_generator.Generate(&printer); - - // Generate sibling files. - file_generator.GenerateSiblings(package_dir, context, &all_files); - - // Generate output list if requested. - if (!output_list_file.empty()) { - // Generate output list. This is just a simple text file placed in a - // deterministic location which lists the .java files being generated. - scoped_ptr srclist_raw_output( - context->Open(output_list_file)); - io::Printer srclist_printer(srclist_raw_output.get(), '$'); - for (int i = 0; i < all_files.size(); i++) { - srclist_printer.Print("$filename$\n", "filename", all_files[i]); - } - } - - return true; -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.h deleted file mode 100644 index 888b8d85..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_generator.h +++ /dev/null @@ -1,72 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Generates Java code for a given .proto file. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -// CodeGenerator implementation which generates Java code. If you create your -// own protocol compiler binary and you want it to support Java output, you -// can do so by registering an instance of this CodeGenerator with the -// CommandLineInterface in your main() function. -class LIBPROTOC_EXPORT JavaGenerator : public CodeGenerator { - public: - JavaGenerator(); - ~JavaGenerator(); - - // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.cc deleted file mode 100644 index 1b6f1653..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.cc +++ /dev/null @@ -1,478 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -const char kThickSeparator[] = - "// ===================================================================\n"; -const char kThinSeparator[] = - "// -------------------------------------------------------------------\n"; - -namespace { - -const char* kDefaultPackage = ""; - -const string& FieldName(const FieldDescriptor* field) { - // Groups are hacky: The name of the field is just the lower-cased name - // of the group type. In Java, though, we would like to retain the original - // capitalization of the type name. - if (GetType(field) == FieldDescriptor::TYPE_GROUP) { - return field->message_type()->name(); - } else { - return field->name(); - } -} - -string UnderscoresToCamelCaseImpl(const string& input, bool cap_next_letter) { - string result; - // Note: I distrust ctype.h due to locales. - for (int i = 0; i < input.size(); i++) { - if ('a' <= input[i] && input[i] <= 'z') { - if (cap_next_letter) { - result += input[i] + ('A' - 'a'); - } else { - result += input[i]; - } - cap_next_letter = false; - } else if ('A' <= input[i] && input[i] <= 'Z') { - if (i == 0 && !cap_next_letter) { - // Force first letter to lower-case unless explicitly told to - // capitalize it. - result += input[i] + ('a' - 'A'); - } else { - // Capital letters after the first are left as-is. - result += input[i]; - } - cap_next_letter = false; - } else if ('0' <= input[i] && input[i] <= '9') { - result += input[i]; - cap_next_letter = true; - } else { - cap_next_letter = true; - } - } - return result; -} - -} // namespace - -string UnderscoresToCamelCase(const FieldDescriptor* field) { - return UnderscoresToCamelCaseImpl(FieldName(field), false); -} - -string UnderscoresToCapitalizedCamelCase(const FieldDescriptor* field) { - return UnderscoresToCamelCaseImpl(FieldName(field), true); -} - -string UnderscoresToCamelCase(const MethodDescriptor* method) { - return UnderscoresToCamelCaseImpl(method->name(), false); -} - -string StripProto(const string& filename) { - if (HasSuffixString(filename, ".protodevel")) { - return StripSuffixString(filename, ".protodevel"); - } else { - return StripSuffixString(filename, ".proto"); - } -} - -string FileClassName(const FileDescriptor* file) { - if (file->options().has_java_outer_classname()) { - return file->options().java_outer_classname(); - } else { - string basename; - string::size_type last_slash = file->name().find_last_of('/'); - if (last_slash == string::npos) { - basename = file->name(); - } else { - basename = file->name().substr(last_slash + 1); - } - return UnderscoresToCamelCaseImpl(StripProto(basename), true); - } -} - -string FileJavaPackage(const FileDescriptor* file) { - string result; - - if (file->options().has_java_package()) { - result = file->options().java_package(); - } else { - result = kDefaultPackage; - if (!file->package().empty()) { - if (!result.empty()) result += '.'; - result += file->package(); - } - } - - - return result; -} - -string JavaPackageToDir(string package_name) { - string package_dir = - StringReplace(package_name, ".", "/", true); - if (!package_dir.empty()) package_dir += "/"; - return package_dir; -} - -string ToJavaName(const string& full_name, const FileDescriptor* file) { - string result; - if (file->options().java_multiple_files()) { - result = FileJavaPackage(file); - } else { - result = ClassName(file); - } - if (!result.empty()) { - result += '.'; - } - if (file->package().empty()) { - result += full_name; - } else { - // Strip the proto package from full_name since we've replaced it with - // the Java package. - result += full_name.substr(file->package().size() + 1); - } - return result; -} - -string ClassName(const FileDescriptor* descriptor) { - string result = FileJavaPackage(descriptor); - if (!result.empty()) result += '.'; - result += FileClassName(descriptor); - return result; -} - -string FieldConstantName(const FieldDescriptor *field) { - string name = field->name() + "_FIELD_NUMBER"; - UpperString(&name); - return name; -} - -FieldDescriptor::Type GetType(const FieldDescriptor* field) { - return field->type(); -} - -JavaType GetJavaType(const FieldDescriptor* field) { - switch (GetType(field)) { - case FieldDescriptor::TYPE_INT32: - case FieldDescriptor::TYPE_UINT32: - case FieldDescriptor::TYPE_SINT32: - case FieldDescriptor::TYPE_FIXED32: - case FieldDescriptor::TYPE_SFIXED32: - return JAVATYPE_INT; - - case FieldDescriptor::TYPE_INT64: - case FieldDescriptor::TYPE_UINT64: - case FieldDescriptor::TYPE_SINT64: - case FieldDescriptor::TYPE_FIXED64: - case FieldDescriptor::TYPE_SFIXED64: - return JAVATYPE_LONG; - - case FieldDescriptor::TYPE_FLOAT: - return JAVATYPE_FLOAT; - - case FieldDescriptor::TYPE_DOUBLE: - return JAVATYPE_DOUBLE; - - case FieldDescriptor::TYPE_BOOL: - return JAVATYPE_BOOLEAN; - - case FieldDescriptor::TYPE_STRING: - return JAVATYPE_STRING; - - case FieldDescriptor::TYPE_BYTES: - return JAVATYPE_BYTES; - - case FieldDescriptor::TYPE_ENUM: - return JAVATYPE_ENUM; - - case FieldDescriptor::TYPE_GROUP: - case FieldDescriptor::TYPE_MESSAGE: - return JAVATYPE_MESSAGE; - - // No default because we want the compiler to complain if any new - // types are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return JAVATYPE_INT; -} - -const char* BoxedPrimitiveTypeName(JavaType type) { - switch (type) { - case JAVATYPE_INT : return "java.lang.Integer"; - case JAVATYPE_LONG : return "java.lang.Long"; - case JAVATYPE_FLOAT : return "java.lang.Float"; - case JAVATYPE_DOUBLE : return "java.lang.Double"; - case JAVATYPE_BOOLEAN: return "java.lang.Boolean"; - case JAVATYPE_STRING : return "java.lang.String"; - case JAVATYPE_BYTES : return "com.google.protobuf.ByteString"; - case JAVATYPE_ENUM : return NULL; - case JAVATYPE_MESSAGE: return NULL; - - // No default because we want the compiler to complain if any new - // JavaTypes are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; -} - -bool AllAscii(const string& text) { - for (int i = 0; i < text.size(); i++) { - if ((text[i] & 0x80) != 0) { - return false; - } - } - return true; -} - -string DefaultValue(const FieldDescriptor* field) { - // Switch on CppType since we need to know which default_value_* method - // of FieldDescriptor to call. - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - return SimpleItoa(field->default_value_int32()); - case FieldDescriptor::CPPTYPE_UINT32: - // Need to print as a signed int since Java has no unsigned. - return SimpleItoa(static_cast(field->default_value_uint32())); - case FieldDescriptor::CPPTYPE_INT64: - return SimpleItoa(field->default_value_int64()) + "L"; - case FieldDescriptor::CPPTYPE_UINT64: - return SimpleItoa(static_cast(field->default_value_uint64())) + - "L"; - case FieldDescriptor::CPPTYPE_DOUBLE: { - double value = field->default_value_double(); - if (value == numeric_limits::infinity()) { - return "Double.POSITIVE_INFINITY"; - } else if (value == -numeric_limits::infinity()) { - return "Double.NEGATIVE_INFINITY"; - } else if (value != value) { - return "Double.NaN"; - } else { - return SimpleDtoa(value) + "D"; - } - } - case FieldDescriptor::CPPTYPE_FLOAT: { - float value = field->default_value_float(); - if (value == numeric_limits::infinity()) { - return "Float.POSITIVE_INFINITY"; - } else if (value == -numeric_limits::infinity()) { - return "Float.NEGATIVE_INFINITY"; - } else if (value != value) { - return "Float.NaN"; - } else { - return SimpleFtoa(value) + "F"; - } - } - case FieldDescriptor::CPPTYPE_BOOL: - return field->default_value_bool() ? "true" : "false"; - case FieldDescriptor::CPPTYPE_STRING: - if (GetType(field) == FieldDescriptor::TYPE_BYTES) { - if (field->has_default_value()) { - // See comments in Internal.java for gory details. - return strings::Substitute( - "com.google.protobuf.Internal.bytesDefaultValue(\"$0\")", - CEscape(field->default_value_string())); - } else { - return "com.google.protobuf.ByteString.EMPTY"; - } - } else { - if (AllAscii(field->default_value_string())) { - // All chars are ASCII. In this case CEscape() works fine. - return "\"" + CEscape(field->default_value_string()) + "\""; - } else { - // See comments in Internal.java for gory details. - return strings::Substitute( - "com.google.protobuf.Internal.stringDefaultValue(\"$0\")", - CEscape(field->default_value_string())); - } - } - - case FieldDescriptor::CPPTYPE_ENUM: - return ClassName(field->enum_type()) + "." + - field->default_value_enum()->name(); - - case FieldDescriptor::CPPTYPE_MESSAGE: - return ClassName(field->message_type()) + ".getDefaultInstance()"; - - // No default because we want the compiler to complain if any new - // types are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return ""; -} - -bool IsDefaultValueJavaDefault(const FieldDescriptor* field) { - // Switch on CppType since we need to know which default_value_* method - // of FieldDescriptor to call. - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - return field->default_value_int32() == 0; - case FieldDescriptor::CPPTYPE_UINT32: - return field->default_value_uint32() == 0; - case FieldDescriptor::CPPTYPE_INT64: - return field->default_value_int64() == 0L; - case FieldDescriptor::CPPTYPE_UINT64: - return field->default_value_uint64() == 0L; - case FieldDescriptor::CPPTYPE_DOUBLE: - return field->default_value_double() == 0.0; - case FieldDescriptor::CPPTYPE_FLOAT: - return field->default_value_float() == 0.0; - case FieldDescriptor::CPPTYPE_BOOL: - return field->default_value_bool() == false; - - case FieldDescriptor::CPPTYPE_STRING: - case FieldDescriptor::CPPTYPE_ENUM: - case FieldDescriptor::CPPTYPE_MESSAGE: - return false; - - // No default because we want the compiler to complain if any new - // types are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return false; -} - -const char* bit_masks[] = { - "0x00000001", - "0x00000002", - "0x00000004", - "0x00000008", - "0x00000010", - "0x00000020", - "0x00000040", - "0x00000080", - - "0x00000100", - "0x00000200", - "0x00000400", - "0x00000800", - "0x00001000", - "0x00002000", - "0x00004000", - "0x00008000", - - "0x00010000", - "0x00020000", - "0x00040000", - "0x00080000", - "0x00100000", - "0x00200000", - "0x00400000", - "0x00800000", - - "0x01000000", - "0x02000000", - "0x04000000", - "0x08000000", - "0x10000000", - "0x20000000", - "0x40000000", - "0x80000000", -}; - -string GetBitFieldName(int index) { - string varName = "bitField"; - varName += SimpleItoa(index); - varName += "_"; - return varName; -} - -string GetBitFieldNameForBit(int bitIndex) { - return GetBitFieldName(bitIndex / 32); -} - -string GenerateGetBit(int bitIndex) { - string varName = GetBitFieldNameForBit(bitIndex); - int bitInVarIndex = bitIndex % 32; - - string mask = bit_masks[bitInVarIndex]; - string result = "((" + varName + " & " + mask + ") == " + mask + ")"; - return result; -} - -string GenerateSetBit(int bitIndex) { - string varName = GetBitFieldNameForBit(bitIndex); - int bitInVarIndex = bitIndex % 32; - - string mask = bit_masks[bitInVarIndex]; - string result = varName + " |= " + mask; - return result; -} - -string GenerateClearBit(int bitIndex) { - string varName = GetBitFieldNameForBit(bitIndex); - int bitInVarIndex = bitIndex % 32; - - string mask = bit_masks[bitInVarIndex]; - string result = varName + " = (" + varName + " & ~" + mask + ")"; - return result; -} - -string GenerateGetBitFromLocal(int bitIndex) { - string varName = "from_" + GetBitFieldNameForBit(bitIndex); - int bitInVarIndex = bitIndex % 32; - - string mask = bit_masks[bitInVarIndex]; - string result = "((" + varName + " & " + mask + ") == " + mask + ")"; - return result; -} - -string GenerateSetBitToLocal(int bitIndex) { - string varName = "to_" + GetBitFieldNameForBit(bitIndex); - int bitInVarIndex = bitIndex % 32; - - string mask = bit_masks[bitInVarIndex]; - string result = varName + " |= " + mask; - return result; -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.h deleted file mode 100644 index 4ae07f15..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_helpers.h +++ /dev/null @@ -1,213 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_HELPERS_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_HELPERS_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -// Commonly-used separator comments. Thick is a line of '=', thin is a line -// of '-'. -extern const char kThickSeparator[]; -extern const char kThinSeparator[]; - -// Converts the field's name to camel-case, e.g. "foo_bar_baz" becomes -// "fooBarBaz" or "FooBarBaz", respectively. -string UnderscoresToCamelCase(const FieldDescriptor* field); -string UnderscoresToCapitalizedCamelCase(const FieldDescriptor* field); - -// Similar, but for method names. (Typically, this merely has the effect -// of lower-casing the first letter of the name.) -string UnderscoresToCamelCase(const MethodDescriptor* method); - -// Strips ".proto" or ".protodevel" from the end of a filename. -string StripProto(const string& filename); - -// Gets the unqualified class name for the file. Each .proto file becomes a -// single Java class, with all its contents nested in that class. -string FileClassName(const FileDescriptor* file); - -// Returns the file's Java package name. -string FileJavaPackage(const FileDescriptor* file); - -// Returns output directory for the given package name. -string JavaPackageToDir(string package_name); - -// Converts the given fully-qualified name in the proto namespace to its -// fully-qualified name in the Java namespace, given that it is in the given -// file. -string ToJavaName(const string& full_name, const FileDescriptor* file); - -// These return the fully-qualified class name corresponding to the given -// descriptor. -inline string ClassName(const Descriptor* descriptor) { - return ToJavaName(descriptor->full_name(), descriptor->file()); -} -inline string ClassName(const EnumDescriptor* descriptor) { - return ToJavaName(descriptor->full_name(), descriptor->file()); -} -inline string ClassName(const ServiceDescriptor* descriptor) { - return ToJavaName(descriptor->full_name(), descriptor->file()); -} -inline string ExtensionIdentifierName(const FieldDescriptor* descriptor) { - return ToJavaName(descriptor->full_name(), descriptor->file()); -} -string ClassName(const FileDescriptor* descriptor); - -// Get the unqualified name that should be used for a field's field -// number constant. -string FieldConstantName(const FieldDescriptor *field); - -// Returns the type of the FieldDescriptor. -// This does nothing interesting for the open source release, but is used for -// hacks that improve compatability with version 1 protocol buffers at Google. -FieldDescriptor::Type GetType(const FieldDescriptor* field); - -enum JavaType { - JAVATYPE_INT, - JAVATYPE_LONG, - JAVATYPE_FLOAT, - JAVATYPE_DOUBLE, - JAVATYPE_BOOLEAN, - JAVATYPE_STRING, - JAVATYPE_BYTES, - JAVATYPE_ENUM, - JAVATYPE_MESSAGE -}; - -JavaType GetJavaType(const FieldDescriptor* field); - -// Get the fully-qualified class name for a boxed primitive type, e.g. -// "java.lang.Integer" for JAVATYPE_INT. Returns NULL for enum and message -// types. -const char* BoxedPrimitiveTypeName(JavaType type); - -string DefaultValue(const FieldDescriptor* field); -bool IsDefaultValueJavaDefault(const FieldDescriptor* field); - -// Does this message class keep track of unknown fields? -inline bool HasUnknownFields(const Descriptor* descriptor) { - return descriptor->file()->options().optimize_for() != - FileOptions::LITE_RUNTIME; -} - -// Does this message class have generated parsing, serialization, and other -// standard methods for which reflection-based fallback implementations exist? -inline bool HasGeneratedMethods(const Descriptor* descriptor) { - return descriptor->file()->options().optimize_for() != - FileOptions::CODE_SIZE; -} - -// Does this message have specialized equals() and hashCode() methods? -inline bool HasEqualsAndHashCode(const Descriptor* descriptor) { - return descriptor->file()->options().java_generate_equals_and_hash(); -} - -// Does this message class have descriptor and reflection methods? -inline bool HasDescriptorMethods(const Descriptor* descriptor) { - return descriptor->file()->options().optimize_for() != - FileOptions::LITE_RUNTIME; -} -inline bool HasDescriptorMethods(const EnumDescriptor* descriptor) { - return descriptor->file()->options().optimize_for() != - FileOptions::LITE_RUNTIME; -} -inline bool HasDescriptorMethods(const FileDescriptor* descriptor) { - return descriptor->options().optimize_for() != - FileOptions::LITE_RUNTIME; -} - -inline bool HasNestedBuilders(const Descriptor* descriptor) { - // The proto-lite version doesn't support nested builders. - return descriptor->file()->options().optimize_for() != - FileOptions::LITE_RUNTIME; -} - -// Should we generate generic services for this file? -inline bool HasGenericServices(const FileDescriptor *file) { - return file->service_count() > 0 && - file->options().optimize_for() != FileOptions::LITE_RUNTIME && - file->options().java_generic_services(); -} - - -// Methods for shared bitfields. - -// Gets the name of the shared bitfield for the given index. -string GetBitFieldName(int index); - -// Gets the name of the shared bitfield for the given bit index. -// Effectively, GetBitFieldName(bitIndex / 32) -string GetBitFieldNameForBit(int bitIndex); - -// Generates the java code for the expression that returns the boolean value -// of the bit of the shared bitfields for the given bit index. -// Example: "((bitField1_ & 0x04) == 0x04)" -string GenerateGetBit(int bitIndex); - -// Generates the java code for the expression that sets the bit of the shared -// bitfields for the given bit index. -// Example: "bitField1_ = (bitField1_ | 0x04)" -string GenerateSetBit(int bitIndex); - -// Generates the java code for the expression that clears the bit of the shared -// bitfields for the given bit index. -// Example: "bitField1_ = (bitField1_ & ~0x04)" -string GenerateClearBit(int bitIndex); - -// Does the same as GenerateGetBit but operates on the bit field on a local -// variable. This is used by the builder to copy the value in the builder to -// the message. -// Example: "((from_bitField1_ & 0x04) == 0x04)" -string GenerateGetBitFromLocal(int bitIndex); - -// Does the same as GenerateSetBit but operates on the bit field on a local -// variable. This is used by the builder to copy the value in the builder to -// the message. -// Example: "to_bitField1_ = (to_bitField1_ | 0x04)" -string GenerateSetBitToLocal(int bitIndex); - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_HELPERS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.cc deleted file mode 100644 index f51a7524..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.cc +++ /dev/null @@ -1,1286 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -using internal::WireFormat; -using internal::WireFormatLite; - -namespace { - -void PrintFieldComment(io::Printer* printer, const FieldDescriptor* field) { - // Print the field's proto-syntax definition as a comment. We don't want to - // print group bodies so we cut off after the first line. - string def = field->DebugString(); - printer->Print("// $def$\n", - "def", def.substr(0, def.find_first_of('\n'))); -} - -struct FieldOrderingByNumber { - inline bool operator()(const FieldDescriptor* a, - const FieldDescriptor* b) const { - return a->number() < b->number(); - } -}; - -struct ExtensionRangeOrdering { - bool operator()(const Descriptor::ExtensionRange* a, - const Descriptor::ExtensionRange* b) const { - return a->start < b->start; - } -}; - -// Sort the fields of the given Descriptor by number into a new[]'d array -// and return it. -const FieldDescriptor** SortFieldsByNumber(const Descriptor* descriptor) { - const FieldDescriptor** fields = - new const FieldDescriptor*[descriptor->field_count()]; - for (int i = 0; i < descriptor->field_count(); i++) { - fields[i] = descriptor->field(i); - } - sort(fields, fields + descriptor->field_count(), - FieldOrderingByNumber()); - return fields; -} - -// Get an identifier that uniquely identifies this type within the file. -// This is used to declare static variables related to this type at the -// outermost file scope. -string UniqueFileScopeIdentifier(const Descriptor* descriptor) { - return "static_" + StringReplace(descriptor->full_name(), ".", "_", true); -} - -// Returns true if the message type has any required fields. If it doesn't, -// we can optimize out calls to its isInitialized() method. -// -// already_seen is used to avoid checking the same type multiple times -// (and also to protect against recursion). -static bool HasRequiredFields( - const Descriptor* type, - hash_set* already_seen) { - if (already_seen->count(type) > 0) { - // The type is already in cache. This means that either: - // a. The type has no required fields. - // b. We are in the midst of checking if the type has required fields, - // somewhere up the stack. In this case, we know that if the type - // has any required fields, they'll be found when we return to it, - // and the whole call to HasRequiredFields() will return true. - // Therefore, we don't have to check if this type has required fields - // here. - return false; - } - already_seen->insert(type); - - // If the type has extensions, an extension with message type could contain - // required fields, so we have to be conservative and assume such an - // extension exists. - if (type->extension_range_count() > 0) return true; - - for (int i = 0; i < type->field_count(); i++) { - const FieldDescriptor* field = type->field(i); - if (field->is_required()) { - return true; - } - if (GetJavaType(field) == JAVATYPE_MESSAGE) { - if (HasRequiredFields(field->message_type(), already_seen)) { - return true; - } - } - } - - return false; -} - -static bool HasRequiredFields(const Descriptor* type) { - hash_set already_seen; - return HasRequiredFields(type, &already_seen); -} - -} // namespace - -// =================================================================== - -MessageGenerator::MessageGenerator(const Descriptor* descriptor) - : descriptor_(descriptor), - field_generators_(descriptor) { -} - -MessageGenerator::~MessageGenerator() {} - -void MessageGenerator::GenerateStaticVariables(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_)) { - // Because descriptor.proto (com.google.protobuf.DescriptorProtos) is - // used in the construction of descriptors, we have a tricky bootstrapping - // problem. To help control static initialization order, we make sure all - // descriptors and other static data that depends on them are members of - // the outermost class in the file. This way, they will be initialized in - // a deterministic order. - - map vars; - vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); - vars["index"] = SimpleItoa(descriptor_->index()); - vars["classname"] = ClassName(descriptor_); - if (descriptor_->containing_type() != NULL) { - vars["parent"] = UniqueFileScopeIdentifier( - descriptor_->containing_type()); - } - if (descriptor_->file()->options().java_multiple_files()) { - // We can only make these package-private since the classes that use them - // are in separate files. - vars["private"] = ""; - } else { - vars["private"] = "private "; - } - - // The descriptor for this type. - printer->Print(vars, - "$private$static com.google.protobuf.Descriptors.Descriptor\n" - " internal_$identifier$_descriptor;\n"); - - // And the FieldAccessorTable. - printer->Print(vars, - "$private$static\n" - " com.google.protobuf.GeneratedMessage.FieldAccessorTable\n" - " internal_$identifier$_fieldAccessorTable;\n"); - } - - // Generate static members for all nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - // TODO(kenton): Reuse MessageGenerator objects? - MessageGenerator(descriptor_->nested_type(i)) - .GenerateStaticVariables(printer); - } -} - -void MessageGenerator::GenerateStaticVariableInitializers( - io::Printer* printer) { - if (HasDescriptorMethods(descriptor_)) { - map vars; - vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); - vars["index"] = SimpleItoa(descriptor_->index()); - vars["classname"] = ClassName(descriptor_); - if (descriptor_->containing_type() != NULL) { - vars["parent"] = UniqueFileScopeIdentifier( - descriptor_->containing_type()); - } - - // The descriptor for this type. - if (descriptor_->containing_type() == NULL) { - printer->Print(vars, - "internal_$identifier$_descriptor =\n" - " getDescriptor().getMessageTypes().get($index$);\n"); - } else { - printer->Print(vars, - "internal_$identifier$_descriptor =\n" - " internal_$parent$_descriptor.getNestedTypes().get($index$);\n"); - } - - // And the FieldAccessorTable. - printer->Print(vars, - "internal_$identifier$_fieldAccessorTable = new\n" - " com.google.protobuf.GeneratedMessage.FieldAccessorTable(\n" - " internal_$identifier$_descriptor,\n" - " new java.lang.String[] { "); - for (int i = 0; i < descriptor_->field_count(); i++) { - printer->Print( - "\"$field_name$\", ", - "field_name", - UnderscoresToCapitalizedCamelCase(descriptor_->field(i))); - } - printer->Print("},\n" - " $classname$.class,\n" - " $classname$.Builder.class);\n", - "classname", ClassName(descriptor_)); - } - - // Generate static member initializers for all nested types. - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - // TODO(kenton): Reuse MessageGenerator objects? - MessageGenerator(descriptor_->nested_type(i)) - .GenerateStaticVariableInitializers(printer); - } -} - -// =================================================================== - -void MessageGenerator::GenerateInterface(io::Printer* printer) { - - if (descriptor_->extension_range_count() > 0) { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public interface $classname$OrBuilder extends\n" - " com.google.protobuf.GeneratedMessage.\n" - " ExtendableMessageOrBuilder<$classname$> {\n", - "classname", descriptor_->name()); - } else { - printer->Print( - "public interface $classname$OrBuilder extends \n" - " com.google.protobuf.GeneratedMessageLite.\n" - " ExtendableMessageOrBuilder<$classname$> {\n", - "classname", descriptor_->name()); - } - } else { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public interface $classname$OrBuilder\n" - " extends com.google.protobuf.MessageOrBuilder {\n", - "classname", descriptor_->name()); - } else { - printer->Print( - "public interface $classname$OrBuilder\n" - " extends com.google.protobuf.MessageLiteOrBuilder {\n", - "classname", descriptor_->name()); - } - } - - printer->Indent(); - for (int i = 0; i < descriptor_->field_count(); i++) { - printer->Print("\n"); - PrintFieldComment(printer, descriptor_->field(i)); - field_generators_.get(descriptor_->field(i)) - .GenerateInterfaceMembers(printer); - } - printer->Outdent(); - - printer->Print("}\n"); -} - -// =================================================================== - -void MessageGenerator::Generate(io::Printer* printer) { - bool is_own_file = - descriptor_->containing_type() == NULL && - descriptor_->file()->options().java_multiple_files(); - - if (descriptor_->extension_range_count() > 0) { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public $static$ final class $classname$ extends\n" - " com.google.protobuf.GeneratedMessage.ExtendableMessage<\n" - " $classname$> implements $classname$OrBuilder {\n", - "static", is_own_file ? "" : "static", - "classname", descriptor_->name()); - } else { - printer->Print( - "public $static$ final class $classname$ extends\n" - " com.google.protobuf.GeneratedMessageLite.ExtendableMessage<\n" - " $classname$> implements $classname$OrBuilder {\n", - "static", is_own_file ? "" : "static", - "classname", descriptor_->name()); - } - } else { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public $static$ final class $classname$ extends\n" - " com.google.protobuf.GeneratedMessage\n" - " implements $classname$OrBuilder {\n", - "static", is_own_file ? "" : "static", - "classname", descriptor_->name()); - } else { - printer->Print( - "public $static$ final class $classname$ extends\n" - " com.google.protobuf.GeneratedMessageLite\n" - " implements $classname$OrBuilder {\n", - "static", is_own_file ? "" : "static", - "classname", descriptor_->name()); - } - } - printer->Indent(); - printer->Print( - "// Use $classname$.newBuilder() to construct.\n" - "private $classname$(Builder builder) {\n" - " super(builder);\n" - "}\n" - // Used when constructing the default instance, which cannot be initialized - // immediately because it may cyclically refer to other default instances. - "private $classname$(boolean noInit) {}\n" - "\n" - "private static final $classname$ defaultInstance;\n" - "public static $classname$ getDefaultInstance() {\n" - " return defaultInstance;\n" - "}\n" - "\n" - "public $classname$ getDefaultInstanceForType() {\n" - " return defaultInstance;\n" - "}\n" - "\n", - "classname", descriptor_->name()); - - GenerateDescriptorMethods(printer); - - // Nested types - for (int i = 0; i < descriptor_->enum_type_count(); i++) { - EnumGenerator(descriptor_->enum_type(i)).Generate(printer); - } - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - MessageGenerator messageGenerator(descriptor_->nested_type(i)); - messageGenerator.GenerateInterface(printer); - messageGenerator.Generate(printer); - } - - // Integers for bit fields. - int totalBits = 0; - for (int i = 0; i < descriptor_->field_count(); i++) { - totalBits += field_generators_.get(descriptor_->field(i)) - .GetNumBitsForMessage(); - } - int totalInts = (totalBits + 31) / 32; - for (int i = 0; i < totalInts; i++) { - printer->Print("private int $bit_field_name$;\n", - "bit_field_name", GetBitFieldName(i)); - } - - // Fields - for (int i = 0; i < descriptor_->field_count(); i++) { - PrintFieldComment(printer, descriptor_->field(i)); - printer->Print("public static final int $constant_name$ = $number$;\n", - "constant_name", FieldConstantName(descriptor_->field(i)), - "number", SimpleItoa(descriptor_->field(i)->number())); - field_generators_.get(descriptor_->field(i)).GenerateMembers(printer); - printer->Print("\n"); - } - - // Called by the constructor, except in the case of the default instance, - // in which case this is called by static init code later on. - printer->Print("private void initFields() {\n"); - printer->Indent(); - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateInitializationCode(printer); - } - printer->Outdent(); - printer->Print("}\n"); - - if (HasGeneratedMethods(descriptor_)) { - GenerateIsInitialized(printer, MEMOIZE); - GenerateMessageSerializationMethods(printer); - } - - if (HasEqualsAndHashCode(descriptor_)) { - GenerateEqualsAndHashCode(printer); - } - - GenerateParseFromMethods(printer); - GenerateBuilder(printer); - - // Carefully initialize the default instance in such a way that it doesn't - // conflict with other initialization. - printer->Print( - "\n" - "static {\n" - " defaultInstance = new $classname$(true);\n" - " defaultInstance.initFields();\n" - "}\n" - "\n" - "// @@protoc_insertion_point(class_scope:$full_name$)\n", - "classname", descriptor_->name(), - "full_name", descriptor_->full_name()); - - // Extensions must be declared after the defaultInstance is initialized - // because the defaultInstance is used by the extension to lazily retrieve - // the outer class's FileDescriptor. - for (int i = 0; i < descriptor_->extension_count(); i++) { - ExtensionGenerator(descriptor_->extension(i)).Generate(printer); - } - - printer->Outdent(); - printer->Print("}\n\n"); -} - - -// =================================================================== - -void MessageGenerator:: -GenerateMessageSerializationMethods(io::Printer* printer) { - scoped_array sorted_fields( - SortFieldsByNumber(descriptor_)); - - vector sorted_extensions; - for (int i = 0; i < descriptor_->extension_range_count(); ++i) { - sorted_extensions.push_back(descriptor_->extension_range(i)); - } - sort(sorted_extensions.begin(), sorted_extensions.end(), - ExtensionRangeOrdering()); - - printer->Print( - "public void writeTo(com.google.protobuf.CodedOutputStream output)\n" - " throws java.io.IOException {\n"); - printer->Indent(); - // writeTo(CodedOutputStream output) might be invoked without - // getSerializedSize() ever being called, but we need the memoized - // sizes in case this message has packed fields. Rather than emit checks for - // each packed field, just call getSerializedSize() up front for all messages. - // In most cases, getSerializedSize() will have already been called anyway by - // one of the wrapper writeTo() methods, making this call cheap. - printer->Print( - "getSerializedSize();\n"); - - if (descriptor_->extension_range_count() > 0) { - if (descriptor_->options().message_set_wire_format()) { - printer->Print( - "com.google.protobuf.GeneratedMessage$lite$\n" - " .ExtendableMessage<$classname$>.ExtensionWriter extensionWriter =\n" - " newMessageSetExtensionWriter();\n", - "lite", HasDescriptorMethods(descriptor_) ? "" : "Lite", - "classname", ClassName(descriptor_)); - } else { - printer->Print( - "com.google.protobuf.GeneratedMessage$lite$\n" - " .ExtendableMessage<$classname$>.ExtensionWriter extensionWriter =\n" - " newExtensionWriter();\n", - "lite", HasDescriptorMethods(descriptor_) ? "" : "Lite", - "classname", ClassName(descriptor_)); - } - } - - // Merge the fields and the extension ranges, both sorted by field number. - for (int i = 0, j = 0; - i < descriptor_->field_count() || j < sorted_extensions.size(); - ) { - if (i == descriptor_->field_count()) { - GenerateSerializeOneExtensionRange(printer, sorted_extensions[j++]); - } else if (j == sorted_extensions.size()) { - GenerateSerializeOneField(printer, sorted_fields[i++]); - } else if (sorted_fields[i]->number() < sorted_extensions[j]->start) { - GenerateSerializeOneField(printer, sorted_fields[i++]); - } else { - GenerateSerializeOneExtensionRange(printer, sorted_extensions[j++]); - } - } - - if (HasUnknownFields(descriptor_)) { - if (descriptor_->options().message_set_wire_format()) { - printer->Print( - "getUnknownFields().writeAsMessageSetTo(output);\n"); - } else { - printer->Print( - "getUnknownFields().writeTo(output);\n"); - } - } - - printer->Outdent(); - printer->Print( - "}\n" - "\n" - "private int memoizedSerializedSize = -1;\n" - "public int getSerializedSize() {\n" - " int size = memoizedSerializedSize;\n" - " if (size != -1) return size;\n" - "\n" - " size = 0;\n"); - printer->Indent(); - - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(sorted_fields[i]).GenerateSerializedSizeCode(printer); - } - - if (descriptor_->extension_range_count() > 0) { - if (descriptor_->options().message_set_wire_format()) { - printer->Print( - "size += extensionsSerializedSizeAsMessageSet();\n"); - } else { - printer->Print( - "size += extensionsSerializedSize();\n"); - } - } - - if (HasUnknownFields(descriptor_)) { - if (descriptor_->options().message_set_wire_format()) { - printer->Print( - "size += getUnknownFields().getSerializedSizeAsMessageSet();\n"); - } else { - printer->Print( - "size += getUnknownFields().getSerializedSize();\n"); - } - } - - printer->Outdent(); - printer->Print( - " memoizedSerializedSize = size;\n" - " return size;\n" - "}\n" - "\n"); - - printer->Print( - "@java.lang.Override\n" - "protected java.lang.Object writeReplace()\n" - " throws java.io.ObjectStreamException {\n" - " return super.writeReplace();\n" - "}\n" - "\n"); -} - -void MessageGenerator:: -GenerateParseFromMethods(io::Printer* printer) { - // Note: These are separate from GenerateMessageSerializationMethods() - // because they need to be generated even for messages that are optimized - // for code size. - printer->Print( - "public static $classname$ parseFrom(\n" - " com.google.protobuf.ByteString data)\n" - " throws com.google.protobuf.InvalidProtocolBufferException {\n" - " return newBuilder().mergeFrom(data).buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(\n" - " com.google.protobuf.ByteString data,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws com.google.protobuf.InvalidProtocolBufferException {\n" - " return newBuilder().mergeFrom(data, extensionRegistry)\n" - " .buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(byte[] data)\n" - " throws com.google.protobuf.InvalidProtocolBufferException {\n" - " return newBuilder().mergeFrom(data).buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(\n" - " byte[] data,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws com.google.protobuf.InvalidProtocolBufferException {\n" - " return newBuilder().mergeFrom(data, extensionRegistry)\n" - " .buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(java.io.InputStream input)\n" - " throws java.io.IOException {\n" - " return newBuilder().mergeFrom(input).buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(\n" - " java.io.InputStream input,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws java.io.IOException {\n" - " return newBuilder().mergeFrom(input, extensionRegistry)\n" - " .buildParsed();\n" - "}\n" - "public static $classname$ parseDelimitedFrom(java.io.InputStream input)\n" - " throws java.io.IOException {\n" - " Builder builder = newBuilder();\n" - " if (builder.mergeDelimitedFrom(input)) {\n" - " return builder.buildParsed();\n" - " } else {\n" - " return null;\n" - " }\n" - "}\n" - "public static $classname$ parseDelimitedFrom(\n" - " java.io.InputStream input,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws java.io.IOException {\n" - " Builder builder = newBuilder();\n" - " if (builder.mergeDelimitedFrom(input, extensionRegistry)) {\n" - " return builder.buildParsed();\n" - " } else {\n" - " return null;\n" - " }\n" - "}\n" - "public static $classname$ parseFrom(\n" - " com.google.protobuf.CodedInputStream input)\n" - " throws java.io.IOException {\n" - " return newBuilder().mergeFrom(input).buildParsed();\n" - "}\n" - "public static $classname$ parseFrom(\n" - " com.google.protobuf.CodedInputStream input,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws java.io.IOException {\n" - " return newBuilder().mergeFrom(input, extensionRegistry)\n" - " .buildParsed();\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); -} - -void MessageGenerator::GenerateSerializeOneField( - io::Printer* printer, const FieldDescriptor* field) { - field_generators_.get(field).GenerateSerializationCode(printer); -} - -void MessageGenerator::GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range) { - printer->Print( - "extensionWriter.writeUntil($end$, output);\n", - "end", SimpleItoa(range->end)); -} - -// =================================================================== - -void MessageGenerator::GenerateBuilder(io::Printer* printer) { - printer->Print( - "public static Builder newBuilder() { return Builder.create(); }\n" - "public Builder newBuilderForType() { return newBuilder(); }\n" - "public static Builder newBuilder($classname$ prototype) {\n" - " return newBuilder().mergeFrom(prototype);\n" - "}\n" - "public Builder toBuilder() { return newBuilder(this); }\n" - "\n", - "classname", ClassName(descriptor_)); - - if (HasNestedBuilders(descriptor_)) { - printer->Print( - "@java.lang.Override\n" - "protected Builder newBuilderForType(\n" - " com.google.protobuf.GeneratedMessage.BuilderParent parent) {\n" - " Builder builder = new Builder(parent);\n" - " return builder;\n" - "}\n"); - } - - if (descriptor_->extension_range_count() > 0) { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public static final class Builder extends\n" - " com.google.protobuf.GeneratedMessage.ExtendableBuilder<\n" - " $classname$, Builder> implements $classname$OrBuilder {\n", - "classname", ClassName(descriptor_)); - } else { - printer->Print( - "public static final class Builder extends\n" - " com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<\n" - " $classname$, Builder> implements $classname$OrBuilder {\n", - "classname", ClassName(descriptor_)); - } - } else { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public static final class Builder extends\n" - " com.google.protobuf.GeneratedMessage.Builder\n" - " implements $classname$OrBuilder {\n", - "classname", ClassName(descriptor_)); - } else { - printer->Print( - "public static final class Builder extends\n" - " com.google.protobuf.GeneratedMessageLite.Builder<\n" - " $classname$, Builder>\n" - " implements $classname$OrBuilder {\n", - "classname", ClassName(descriptor_)); - } - } - printer->Indent(); - - GenerateDescriptorMethods(printer); - GenerateCommonBuilderMethods(printer); - - if (HasGeneratedMethods(descriptor_)) { - GenerateIsInitialized(printer, DONT_MEMOIZE); - GenerateBuilderParsingMethods(printer); - } - - // Integers for bit fields. - int totalBits = 0; - for (int i = 0; i < descriptor_->field_count(); i++) { - totalBits += field_generators_.get(descriptor_->field(i)) - .GetNumBitsForBuilder(); - } - int totalInts = (totalBits + 31) / 32; - for (int i = 0; i < totalInts; i++) { - printer->Print("private int $bit_field_name$;\n", - "bit_field_name", GetBitFieldName(i)); - } - - for (int i = 0; i < descriptor_->field_count(); i++) { - printer->Print("\n"); - PrintFieldComment(printer, descriptor_->field(i)); - field_generators_.get(descriptor_->field(i)) - .GenerateBuilderMembers(printer); - } - - printer->Print( - "\n" - "// @@protoc_insertion_point(builder_scope:$full_name$)\n", - "full_name", descriptor_->full_name()); - - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageGenerator::GenerateDescriptorMethods(io::Printer* printer) { - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public static final com.google.protobuf.Descriptors.Descriptor\n" - " getDescriptor() {\n" - " return $fileclass$.internal_$identifier$_descriptor;\n" - "}\n" - "\n" - "protected com.google.protobuf.GeneratedMessage.FieldAccessorTable\n" - " internalGetFieldAccessorTable() {\n" - " return $fileclass$.internal_$identifier$_fieldAccessorTable;\n" - "}\n" - "\n", - "fileclass", ClassName(descriptor_->file()), - "identifier", UniqueFileScopeIdentifier(descriptor_)); - } -} - -// =================================================================== - -void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) { - printer->Print( - "// Construct using $classname$.newBuilder()\n" - "private Builder() {\n" - " maybeForceBuilderInitialization();\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "private Builder(BuilderParent parent) {\n" - " super(parent);\n" - " maybeForceBuilderInitialization();\n" - "}\n", - "classname", ClassName(descriptor_)); - } - - - if (HasNestedBuilders(descriptor_)) { - printer->Print( - "private void maybeForceBuilderInitialization() {\n" - " if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {\n"); - - printer->Indent(); - printer->Indent(); - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateFieldBuilderInitializationCode(printer); - } - printer->Outdent(); - printer->Outdent(); - - printer->Print( - " }\n" - "}\n"); - } else { - printer->Print( - "private void maybeForceBuilderInitialization() {\n" - "}\n"); - } - - printer->Print( - "private static Builder create() {\n" - " return new Builder();\n" - "}\n" - "\n" - "public Builder clear() {\n" - " super.clear();\n", - "classname", ClassName(descriptor_)); - - printer->Indent(); - - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)) - .GenerateBuilderClearCode(printer); - } - - printer->Outdent(); - - printer->Print( - " return this;\n" - "}\n" - "\n" - "public Builder clone() {\n" - " return create().mergeFrom(buildPartial());\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public com.google.protobuf.Descriptors.Descriptor\n" - " getDescriptorForType() {\n" - " return $classname$.getDescriptor();\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - } - printer->Print( - "public $classname$ getDefaultInstanceForType() {\n" - " return $classname$.getDefaultInstance();\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - - // ----------------------------------------------------------------- - - printer->Print( - "public $classname$ build() {\n" - " $classname$ result = buildPartial();\n" - " if (!result.isInitialized()) {\n" - " throw newUninitializedMessageException(result);\n" - " }\n" - " return result;\n" - "}\n" - "\n" - "private $classname$ buildParsed()\n" - " throws com.google.protobuf.InvalidProtocolBufferException {\n" - " $classname$ result = buildPartial();\n" - " if (!result.isInitialized()) {\n" - " throw newUninitializedMessageException(\n" - " result).asInvalidProtocolBufferException();\n" - " }\n" - " return result;\n" - "}\n" - "\n" - "public $classname$ buildPartial() {\n" - " $classname$ result = new $classname$(this);\n", - "classname", ClassName(descriptor_)); - - printer->Indent(); - - // Local vars for from and to bit fields to avoid accessing the builder and - // message over and over for these fields. Seems to provide a slight - // perforamance improvement in micro benchmark and this is also what proto1 - // code does. - int totalBuilderBits = 0; - int totalMessageBits = 0; - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldGenerator& field = field_generators_.get(descriptor_->field(i)); - totalBuilderBits += field.GetNumBitsForBuilder(); - totalMessageBits += field.GetNumBitsForMessage(); - } - int totalBuilderInts = (totalBuilderBits + 31) / 32; - int totalMessageInts = (totalMessageBits + 31) / 32; - for (int i = 0; i < totalBuilderInts; i++) { - printer->Print("int from_$bit_field_name$ = $bit_field_name$;\n", - "bit_field_name", GetBitFieldName(i)); - } - for (int i = 0; i < totalMessageInts; i++) { - printer->Print("int to_$bit_field_name$ = 0;\n", - "bit_field_name", GetBitFieldName(i)); - } - - // Output generation code for each field. - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)).GenerateBuildingCode(printer); - } - - // Copy the bit field results to the generated message - for (int i = 0; i < totalMessageInts; i++) { - printer->Print("result.$bit_field_name$ = to_$bit_field_name$;\n", - "bit_field_name", GetBitFieldName(i)); - } - - printer->Outdent(); - - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - " onBuilt();\n"); - } - - printer->Print( - " return result;\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - - // ----------------------------------------------------------------- - - if (HasGeneratedMethods(descriptor_)) { - // MergeFrom(Message other) requires the ability to distinguish the other - // messages type by its descriptor. - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "public Builder mergeFrom(com.google.protobuf.Message other) {\n" - " if (other instanceof $classname$) {\n" - " return mergeFrom(($classname$)other);\n" - " } else {\n" - " super.mergeFrom(other);\n" - " return this;\n" - " }\n" - "}\n" - "\n", - "classname", ClassName(descriptor_)); - } - - printer->Print( - "public Builder mergeFrom($classname$ other) {\n" - // Optimization: If other is the default instance, we know none of its - // fields are set so we can skip the merge. - " if (other == $classname$.getDefaultInstance()) return this;\n", - "classname", ClassName(descriptor_)); - printer->Indent(); - - for (int i = 0; i < descriptor_->field_count(); i++) { - field_generators_.get(descriptor_->field(i)).GenerateMergingCode(printer); - } - - printer->Outdent(); - - // if message type has extensions - if (descriptor_->extension_range_count() > 0) { - printer->Print( - " this.mergeExtensionFields(other);\n"); - } - - if (HasUnknownFields(descriptor_)) { - printer->Print( - " this.mergeUnknownFields(other.getUnknownFields());\n"); - } - - printer->Print( - " return this;\n" - "}\n" - "\n"); - } -} - -// =================================================================== - -void MessageGenerator::GenerateBuilderParsingMethods(io::Printer* printer) { - scoped_array sorted_fields( - SortFieldsByNumber(descriptor_)); - - printer->Print( - "public Builder mergeFrom(\n" - " com.google.protobuf.CodedInputStream input,\n" - " com.google.protobuf.ExtensionRegistryLite extensionRegistry)\n" - " throws java.io.IOException {\n"); - printer->Indent(); - - if (HasUnknownFields(descriptor_)) { - printer->Print( - "com.google.protobuf.UnknownFieldSet.Builder unknownFields =\n" - " com.google.protobuf.UnknownFieldSet.newBuilder(\n" - " this.getUnknownFields());\n"); - } - - printer->Print( - "while (true) {\n"); - printer->Indent(); - - printer->Print( - "int tag = input.readTag();\n" - "switch (tag) {\n"); - printer->Indent(); - - if (HasUnknownFields(descriptor_)) { - printer->Print( - "case 0:\n" // zero signals EOF / limit reached - " this.setUnknownFields(unknownFields.build());\n" - " $on_changed$\n" - " return this;\n" - "default: {\n" - " if (!parseUnknownField(input, unknownFields,\n" - " extensionRegistry, tag)) {\n" - " this.setUnknownFields(unknownFields.build());\n" - " $on_changed$\n" - " return this;\n" // it's an endgroup tag - " }\n" - " break;\n" - "}\n", - "on_changed", HasDescriptorMethods(descriptor_) ? "onChanged();" : ""); - } else { - printer->Print( - "case 0:\n" // zero signals EOF / limit reached - " $on_changed$\n" - " return this;\n" - "default: {\n" - " if (!parseUnknownField(input, extensionRegistry, tag)) {\n" - " $on_changed$\n" - " return this;\n" // it's an endgroup tag - " }\n" - " break;\n" - "}\n", - "on_changed", HasDescriptorMethods(descriptor_) ? "onChanged();" : ""); - } - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = sorted_fields[i]; - uint32 tag = WireFormatLite::MakeTag(field->number(), - WireFormat::WireTypeForFieldType(field->type())); - - printer->Print( - "case $tag$: {\n", - "tag", SimpleItoa(tag)); - printer->Indent(); - - field_generators_.get(field).GenerateParsingCode(printer); - - printer->Outdent(); - printer->Print( - " break;\n" - "}\n"); - - if (field->is_packable()) { - // To make packed = true wire compatible, we generate parsing code from a - // packed version of this field regardless of field->options().packed(). - uint32 packed_tag = WireFormatLite::MakeTag(field->number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - printer->Print( - "case $tag$: {\n", - "tag", SimpleItoa(packed_tag)); - printer->Indent(); - - field_generators_.get(field).GenerateParsingCodeFromPacked(printer); - - printer->Outdent(); - printer->Print( - " break;\n" - "}\n"); - } - } - - printer->Outdent(); - printer->Outdent(); - printer->Outdent(); - printer->Print( - " }\n" // switch (tag) - " }\n" // while (true) - "}\n" - - "\n"); -} - -// =================================================================== - -void MessageGenerator::GenerateIsInitialized( - io::Printer* printer, UseMemoization useMemoization) { - bool memoization = useMemoization == MEMOIZE; - if (memoization) { - // Memoizes whether the protocol buffer is fully initialized (has all - // required fields). -1 means not yet computed. 0 means false and 1 means - // true. - printer->Print( - "private byte memoizedIsInitialized = -1;\n"); - } - printer->Print( - "public final boolean isInitialized() {\n"); - printer->Indent(); - - if (memoization) { - printer->Print( - "byte isInitialized = memoizedIsInitialized;\n" - "if (isInitialized != -1) return isInitialized == 1;\n" - "\n"); - } - - // Check that all required fields in this message are set. - // TODO(kenton): We can optimize this when we switch to putting all the - // "has" fields into a single bitfield. - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (field->is_required()) { - printer->Print( - "if (!has$name$()) {\n" - " $memoize$\n" - " return false;\n" - "}\n", - "name", UnderscoresToCapitalizedCamelCase(field), - "memoize", memoization ? "memoizedIsInitialized = 0;" : ""); - } - } - - // Now check that all embedded messages are initialized. - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (GetJavaType(field) == JAVATYPE_MESSAGE && - HasRequiredFields(field->message_type())) { - switch (field->label()) { - case FieldDescriptor::LABEL_REQUIRED: - printer->Print( - "if (!get$name$().isInitialized()) {\n" - " $memoize$\n" - " return false;\n" - "}\n", - "type", ClassName(field->message_type()), - "name", UnderscoresToCapitalizedCamelCase(field), - "memoize", memoization ? "memoizedIsInitialized = 0;" : ""); - break; - case FieldDescriptor::LABEL_OPTIONAL: - printer->Print( - "if (has$name$()) {\n" - " if (!get$name$().isInitialized()) {\n" - " $memoize$\n" - " return false;\n" - " }\n" - "}\n", - "type", ClassName(field->message_type()), - "name", UnderscoresToCapitalizedCamelCase(field), - "memoize", memoization ? "memoizedIsInitialized = 0;" : ""); - break; - case FieldDescriptor::LABEL_REPEATED: - printer->Print( - "for (int i = 0; i < get$name$Count(); i++) {\n" - " if (!get$name$(i).isInitialized()) {\n" - " $memoize$\n" - " return false;\n" - " }\n" - "}\n", - "type", ClassName(field->message_type()), - "name", UnderscoresToCapitalizedCamelCase(field), - "memoize", memoization ? "memoizedIsInitialized = 0;" : ""); - break; - } - } - } - - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "if (!extensionsAreInitialized()) {\n" - " $memoize$\n" - " return false;\n" - "}\n", - "memoize", memoization ? "memoizedIsInitialized = 0;" : ""); - } - - printer->Outdent(); - - if (memoization) { - printer->Print( - " memoizedIsInitialized = 1;\n"); - } - - printer->Print( - " return true;\n" - "}\n" - "\n"); -} - -// =================================================================== - -void MessageGenerator::GenerateEqualsAndHashCode(io::Printer* printer) { - printer->Print( - "@java.lang.Override\n" - "public boolean equals(final java.lang.Object obj) {\n"); - printer->Indent(); - printer->Print( - "if (obj == this) {\n" - " return true;\n" - "}\n" - "if (!(obj instanceof $classname$)) {\n" - " return super.equals(obj);\n" - "}\n" - "$classname$ other = ($classname$) obj;\n" - "\n", - "classname", ClassName(descriptor_)); - - printer->Print("boolean result = true;\n"); - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (!field->is_repeated()) { - printer->Print( - "result = result && (has$name$() == other.has$name$());\n" - "if (has$name$()) {\n", - "name", UnderscoresToCapitalizedCamelCase(field)); - printer->Indent(); - } - field_generators_.get(field).GenerateEqualsCode(printer); - if (!field->is_repeated()) { - printer->Outdent(); - printer->Print( - "}\n"); - } - } - if (HasDescriptorMethods(descriptor_)) { - printer->Print( - "result = result &&\n" - " getUnknownFields().equals(other.getUnknownFields());\n"); - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "result = result &&\n" - " getExtensionFields().equals(other.getExtensionFields());\n"); - } - } - printer->Print( - "return result;\n"); - printer->Outdent(); - printer->Print( - "}\n" - "\n"); - - printer->Print( - "@java.lang.Override\n" - "public int hashCode() {\n"); - printer->Indent(); - printer->Print( - "int hash = 41;\n" - "hash = (19 * hash) + getDescriptorForType().hashCode();\n"); - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (!field->is_repeated()) { - printer->Print( - "if (has$name$()) {\n", - "name", UnderscoresToCapitalizedCamelCase(field)); - printer->Indent(); - } - field_generators_.get(field).GenerateHashCode(printer); - if (!field->is_repeated()) { - printer->Outdent(); - printer->Print("}\n"); - } - } - if (HasDescriptorMethods(descriptor_)) { - if (descriptor_->extension_range_count() > 0) { - printer->Print( - "hash = hashFields(hash, getExtensionFields());\n"); - } - } - printer->Print( - "hash = (29 * hash) + getUnknownFields().hashCode();\n" - "return hash;\n"); - printer->Outdent(); - printer->Print( - "}\n" - "\n"); -} - -// =================================================================== - -void MessageGenerator::GenerateExtensionRegistrationCode(io::Printer* printer) { - for (int i = 0; i < descriptor_->extension_count(); i++) { - ExtensionGenerator(descriptor_->extension(i)) - .GenerateRegistrationCode(printer); - } - - for (int i = 0; i < descriptor_->nested_type_count(); i++) { - MessageGenerator(descriptor_->nested_type(i)) - .GenerateExtensionRegistrationCode(printer); - } -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.h deleted file mode 100644 index 4c6fbbe5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message.h +++ /dev/null @@ -1,109 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -class MessageGenerator { - public: - explicit MessageGenerator(const Descriptor* descriptor); - ~MessageGenerator(); - - // All static variables have to be declared at the top-level of the file - // so that we can control initialization order, which is important for - // DescriptorProto bootstrapping to work. - void GenerateStaticVariables(io::Printer* printer); - - // Output code which initializes the static variables generated by - // GenerateStaticVariables(). - void GenerateStaticVariableInitializers(io::Printer* printer); - - // Generate the class itself. - void Generate(io::Printer* printer); - - // Generates the base interface that both the class and its builder implement - void GenerateInterface(io::Printer* printer); - - // Generate code to register all contained extensions with an - // ExtensionRegistry. - void GenerateExtensionRegistrationCode(io::Printer* printer); - - private: - enum UseMemoization { - MEMOIZE, - DONT_MEMOIZE - }; - - void GenerateMessageSerializationMethods(io::Printer* printer); - void GenerateParseFromMethods(io::Printer* printer); - void GenerateSerializeOneField(io::Printer* printer, - const FieldDescriptor* field); - void GenerateSerializeOneExtensionRange( - io::Printer* printer, const Descriptor::ExtensionRange* range); - - void GenerateBuilder(io::Printer* printer); - void GenerateCommonBuilderMethods(io::Printer* printer); - void GenerateDescriptorMethods(io::Printer* printer); - void GenerateBuilderParsingMethods(io::Printer* printer); - void GenerateIsInitialized(io::Printer* printer, - UseMemoization useMemoization); - void GenerateEqualsAndHashCode(io::Printer* printer); - - const Descriptor* descriptor_; - FieldGeneratorMap field_generators_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.cc deleted file mode 100644 index 251945af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.cc +++ /dev/null @@ -1,884 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -namespace { - -// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of -// repeat code between this and the other field types. -void SetMessageVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - map* variables) { - (*variables)["name"] = - UnderscoresToCamelCase(descriptor); - (*variables)["capitalized_name"] = - UnderscoresToCapitalizedCamelCase(descriptor); - (*variables)["constant_name"] = FieldConstantName(descriptor); - (*variables)["number"] = SimpleItoa(descriptor->number()); - (*variables)["type"] = ClassName(descriptor->message_type()); - (*variables)["group_or_message"] = - (GetType(descriptor) == FieldDescriptor::TYPE_GROUP) ? - "Group" : "Message"; - // TODO(birdo): Add @deprecated javadoc when generating javadoc is supported - // by the proto compiler - (*variables)["deprecation"] = descriptor->options().deprecated() - ? "@java.lang.Deprecated " : ""; - (*variables)["on_changed"] = - HasDescriptorMethods(descriptor->containing_type()) ? "onChanged();" : ""; - - // For singular messages and builders, one bit is used for the hasField bit. - (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); - - (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_has_field_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_has_field_bit_builder"] = - GenerateClearBit(builderBitIndex); - - // For repated builders, one bit is used for whether the array is immutable. - (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); - - (*variables)["get_has_field_bit_from_local"] = - GenerateGetBitFromLocal(builderBitIndex); - (*variables)["set_has_field_bit_to_local"] = - GenerateSetBitToLocal(messageBitIndex); -} - -} // namespace - -// =================================================================== - -MessageFieldGenerator:: -MessageFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetMessageVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -MessageFieldGenerator::~MessageFieldGenerator() {} - -int MessageFieldGenerator::GetNumBitsForMessage() const { - return 1; -} - -int MessageFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void MessageFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - // TODO(jonp): In the future, consider having a method specific to the - // interface so that builders can choose dynamically to either return a - // message or a nested builder, so that asking for the interface doesn't - // cause a message to ever be built. - printer->Print(variables_, - "$deprecation$boolean has$capitalized_name$();\n" - "$deprecation$$type$ get$capitalized_name$();\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - "$deprecation$$type$OrBuilder get$capitalized_name$OrBuilder();\n"); - } -} - -void MessageFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $type$ $name$_;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_message$;\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$() {\n" - " return $name$_;\n" - "}\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - "$deprecation$public $type$OrBuilder get$capitalized_name$OrBuilder() {\n" - " return $name$_;\n" - "}\n"); - } -} - -void MessageFieldGenerator::PrintNestedBuilderCondition( - io::Printer* printer, - const char* regular_case, - const char* nested_builder_case) const { - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, "if ($name$Builder_ == null) {\n"); - printer->Indent(); - printer->Print(variables_, regular_case); - printer->Outdent(); - printer->Print("} else {\n"); - printer->Indent(); - printer->Print(variables_, nested_builder_case); - printer->Outdent(); - printer->Print("}\n"); - } else { - printer->Print(variables_, regular_case); - } -} - -void MessageFieldGenerator::PrintNestedBuilderFunction( - io::Printer* printer, - const char* method_prototype, - const char* regular_case, - const char* nested_builder_case, - const char* trailing_code) const { - printer->Print(variables_, method_prototype); - printer->Print(" {\n"); - printer->Indent(); - PrintNestedBuilderCondition(printer, regular_case, nested_builder_case); - if (trailing_code != NULL) { - printer->Print(variables_, trailing_code); - } - printer->Outdent(); - printer->Print("}\n"); -} - -void MessageFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - // When using nested-builders, the code initially works just like the - // non-nested builder case. It only creates a nested builder lazily on - // demand and then forever delegates to it after creation. - - printer->Print(variables_, - // Used when the builder is null. - "private $type$ $name$_ = $type$.getDefaultInstance();\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - // If this builder is non-null, it is used and the other fields are - // ignored. - "private com.google.protobuf.SingleFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder> $name$Builder_;" - "\n"); - } - - // The comments above the methods below are based on a hypothetical - // field of type "Field" called "Field". - - // boolean hasField() - printer->Print(variables_, - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_builder$;\n" - "}\n"); - - // Field getField() - PrintNestedBuilderFunction(printer, - "$deprecation$public $type$ get$capitalized_name$()", - - "return $name$_;\n", - - "return $name$Builder_.getMessage();\n", - - NULL); - - // Field.Builder setField(Field value) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder set$capitalized_name$($type$ value)", - - "if (value == null) {\n" - " throw new NullPointerException();\n" - "}\n" - "$name$_ = value;\n" - "$on_changed$\n", - - "$name$Builder_.setMessage(value);\n", - - "$set_has_field_bit_builder$;\n" - "return this;\n"); - - // Field.Builder setField(Field.Builder builderForValue) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder set$capitalized_name$(\n" - " $type$.Builder builderForValue)", - - "$name$_ = builderForValue.build();\n" - "$on_changed$\n", - - "$name$Builder_.setMessage(builderForValue.build());\n", - - "$set_has_field_bit_builder$;\n" - "return this;\n"); - - // Field.Builder mergeField(Field value) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder merge$capitalized_name$($type$ value)", - - "if ($get_has_field_bit_builder$ &&\n" - " $name$_ != $type$.getDefaultInstance()) {\n" - " $name$_ =\n" - " $type$.newBuilder($name$_).mergeFrom(value).buildPartial();\n" - "} else {\n" - " $name$_ = value;\n" - "}\n" - "$on_changed$\n", - - "$name$Builder_.mergeFrom(value);\n", - - "$set_has_field_bit_builder$;\n" - "return this;\n"); - - // Field.Builder clearField() - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder clear$capitalized_name$()", - - "$name$_ = $type$.getDefaultInstance();\n" - "$on_changed$\n", - - "$name$Builder_.clear();\n", - - "$clear_has_field_bit_builder$;\n" - "return this;\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - "$deprecation$public $type$.Builder get$capitalized_name$Builder() {\n" - " $set_has_field_bit_builder$;\n" - " $on_changed$\n" - " return get$capitalized_name$FieldBuilder().getBuilder();\n" - "}\n" - "$deprecation$public $type$OrBuilder get$capitalized_name$OrBuilder() {\n" - " if ($name$Builder_ != null) {\n" - " return $name$Builder_.getMessageOrBuilder();\n" - " } else {\n" - " return $name$_;\n" - " }\n" - "}\n" - "private com.google.protobuf.SingleFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder> \n" - " get$capitalized_name$FieldBuilder() {\n" - " if ($name$Builder_ == null) {\n" - " $name$Builder_ = new com.google.protobuf.SingleFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder>(\n" - " $name$_,\n" - " getParentForChildren(),\n" - " isClean());\n" - " $name$_ = null;\n" - " }\n" - " return $name$Builder_;\n" - "}\n"); - } -} - -void MessageFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - printer->Print(variables_, - "get$capitalized_name$FieldBuilder();\n"); -} - - -void MessageFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $type$.getDefaultInstance();\n"); -} - -void MessageFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - PrintNestedBuilderCondition(printer, - "$name$_ = $type$.getDefaultInstance();\n", - - "$name$Builder_.clear();\n"); - printer->Print(variables_, "$clear_has_field_bit_builder$;\n"); -} - -void MessageFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, - "if (other.has$capitalized_name$()) {\n" - " merge$capitalized_name$(other.get$capitalized_name$());\n" - "}\n"); -} - -void MessageFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - - printer->Print(variables_, - "if ($get_has_field_bit_from_local$) {\n" - " $set_has_field_bit_to_local$;\n" - "}\n"); - - PrintNestedBuilderCondition(printer, - "result.$name$_ = $name$_;\n", - - "result.$name$_ = $name$Builder_.build();\n"); -} - -void MessageFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "$type$.Builder subBuilder = $type$.newBuilder();\n" - "if (has$capitalized_name$()) {\n" - " subBuilder.mergeFrom(get$capitalized_name$());\n" - "}\n"); - - if (GetType(descriptor_) == FieldDescriptor::TYPE_GROUP) { - printer->Print(variables_, - "input.readGroup($number$, subBuilder, extensionRegistry);\n"); - } else { - printer->Print(variables_, - "input.readMessage(subBuilder, extensionRegistry);\n"); - } - - printer->Print(variables_, - "set$capitalized_name$(subBuilder.buildPartial());\n"); -} - -void MessageFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " output.write$group_or_message$($number$, $name$_);\n" - "}\n"); -} - -void MessageFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .compute$group_or_message$Size($number$, $name$_);\n" - "}\n"); -} - -void MessageFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$()\n" - " .equals(other.get$capitalized_name$());\n"); -} - -void MessageFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "hash = (37 * hash) + $constant_name$;\n" - "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); -} - -string MessageFieldGenerator::GetBoxedType() const { - return ClassName(descriptor_->message_type()); -} - -// =================================================================== - -RepeatedMessageFieldGenerator:: -RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetMessageVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {} - -int RepeatedMessageFieldGenerator::GetNumBitsForMessage() const { - return 0; -} - -int RepeatedMessageFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void RepeatedMessageFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - // TODO(jonp): In the future, consider having methods specific to the - // interface so that builders can choose dynamically to either return a - // message or a nested builder, so that asking for the interface doesn't - // cause a message to ever be built. - printer->Print(variables_, - "$deprecation$java.util.List<$type$> \n" - " get$capitalized_name$List();\n" - "$deprecation$$type$ get$capitalized_name$(int index);\n" - "$deprecation$int get$capitalized_name$Count();\n"); - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - "$deprecation$java.util.List \n" - " get$capitalized_name$OrBuilderList();\n" - "$deprecation$$type$OrBuilder get$capitalized_name$OrBuilder(\n" - " int index);\n"); - } -} - -void RepeatedMessageFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private java.util.List<$type$> $name$_;\n" - "$deprecation$public java.util.List<$type$> get$capitalized_name$List() {\n" - " return $name$_;\n" // note: unmodifiable list - "}\n" - "$deprecation$public java.util.List \n" - " get$capitalized_name$OrBuilderList() {\n" - " return $name$_;\n" - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n" - "$deprecation$public $type$OrBuilder get$capitalized_name$OrBuilder(\n" - " int index) {\n" - " return $name$_.get(index);\n" - "}\n"); - -} - -void RepeatedMessageFieldGenerator::PrintNestedBuilderCondition( - io::Printer* printer, - const char* regular_case, - const char* nested_builder_case) const { - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, "if ($name$Builder_ == null) {\n"); - printer->Indent(); - printer->Print(variables_, regular_case); - printer->Outdent(); - printer->Print("} else {\n"); - printer->Indent(); - printer->Print(variables_, nested_builder_case); - printer->Outdent(); - printer->Print("}\n"); - } else { - printer->Print(variables_, regular_case); - } -} - -void RepeatedMessageFieldGenerator::PrintNestedBuilderFunction( - io::Printer* printer, - const char* method_prototype, - const char* regular_case, - const char* nested_builder_case, - const char* trailing_code) const { - printer->Print(variables_, method_prototype); - printer->Print(" {\n"); - printer->Indent(); - PrintNestedBuilderCondition(printer, regular_case, nested_builder_case); - if (trailing_code != NULL) { - printer->Print(variables_, trailing_code); - } - printer->Outdent(); - printer->Print("}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - // When using nested-builders, the code initially works just like the - // non-nested builder case. It only creates a nested builder lazily on - // demand and then forever delegates to it after creation. - - printer->Print(variables_, - // Used when the builder is null. - // One field is the list and the other field keeps track of whether the - // list is immutable. If it's immutable, the invariant is that it must - // either an instance of Collections.emptyList() or it's an ArrayList - // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to - // share instances of lists between protocol buffers avoiding expensive - // memory allocations. Note, immutable is a strong guarantee here -- not - // just that the list cannot be modified via the reference but that the - // list can never be modified. - "private java.util.List<$type$> $name$_ =\n" - " java.util.Collections.emptyList();\n" - - "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$get_mutable_bit_builder$) {\n" - " $name$_ = new java.util.ArrayList<$type$>($name$_);\n" - " $set_mutable_bit_builder$;\n" - " }\n" - "}\n" - "\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - // If this builder is non-null, it is used and the other fields are - // ignored. - "private com.google.protobuf.RepeatedFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder> $name$Builder_;\n" - "\n"); - } - - // The comments above the methods below are based on a hypothetical - // repeated field of type "Field" called "RepeatedField". - - // List getRepeatedFieldList() - PrintNestedBuilderFunction(printer, - "$deprecation$public java.util.List<$type$> get$capitalized_name$List()", - - "return java.util.Collections.unmodifiableList($name$_);\n", - "return $name$Builder_.getMessageList();\n", - - NULL); - - // int getRepeatedFieldCount() - PrintNestedBuilderFunction(printer, - "$deprecation$public int get$capitalized_name$Count()", - - "return $name$_.size();\n", - "return $name$Builder_.getCount();\n", - - NULL); - - // Field getRepeatedField(int index) - PrintNestedBuilderFunction(printer, - "$deprecation$public $type$ get$capitalized_name$(int index)", - - "return $name$_.get(index);\n", - - "return $name$Builder_.getMessage(index);\n", - - NULL); - - // Builder setRepeatedField(int index, Field value) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder set$capitalized_name$(\n" - " int index, $type$ value)", - "if (value == null) {\n" - " throw new NullPointerException();\n" - "}\n" - "ensure$capitalized_name$IsMutable();\n" - "$name$_.set(index, value);\n" - "$on_changed$\n", - "$name$Builder_.setMessage(index, value);\n", - "return this;\n"); - - // Builder setRepeatedField(int index, Field.Builder builderForValue) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder set$capitalized_name$(\n" - " int index, $type$.Builder builderForValue)", - - "ensure$capitalized_name$IsMutable();\n" - "$name$_.set(index, builderForValue.build());\n" - "$on_changed$\n", - - "$name$Builder_.setMessage(index, builderForValue.build());\n", - - "return this;\n"); - - // Builder addRepeatedField(Field value) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder add$capitalized_name$($type$ value)", - - "if (value == null) {\n" - " throw new NullPointerException();\n" - "}\n" - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(value);\n" - - "$on_changed$\n", - - "$name$Builder_.addMessage(value);\n", - - "return this;\n"); - - // Builder addRepeatedField(int index, Field value) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder add$capitalized_name$(\n" - " int index, $type$ value)", - - "if (value == null) {\n" - " throw new NullPointerException();\n" - "}\n" - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(index, value);\n" - "$on_changed$\n", - - "$name$Builder_.addMessage(index, value);\n", - - "return this;\n"); - - // Builder addRepeatedField(Field.Builder builderForValue) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder add$capitalized_name$(\n" - " $type$.Builder builderForValue)", - - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(builderForValue.build());\n" - "$on_changed$\n", - - "$name$Builder_.addMessage(builderForValue.build());\n", - - "return this;\n"); - - // Builder addRepeatedField(int index, Field.Builder builderForValue) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder add$capitalized_name$(\n" - " int index, $type$.Builder builderForValue)", - - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(index, builderForValue.build());\n" - "$on_changed$\n", - - "$name$Builder_.addMessage(index, builderForValue.build());\n", - - "return this;\n"); - - // Builder addAllRepeatedField(Iterable values) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder addAll$capitalized_name$(\n" - " java.lang.Iterable values)", - - "ensure$capitalized_name$IsMutable();\n" - "super.addAll(values, $name$_);\n" - "$on_changed$\n", - - "$name$Builder_.addAllMessages(values);\n", - - "return this;\n"); - - // Builder clearAllRepeatedField() - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder clear$capitalized_name$()", - - "$name$_ = java.util.Collections.emptyList();\n" - "$clear_mutable_bit_builder$;\n" - "$on_changed$\n", - - "$name$Builder_.clear();\n", - - "return this;\n"); - - // Builder removeRepeatedField(int index) - PrintNestedBuilderFunction(printer, - "$deprecation$public Builder remove$capitalized_name$(int index)", - - "ensure$capitalized_name$IsMutable();\n" - "$name$_.remove(index);\n" - "$on_changed$\n", - - "$name$Builder_.remove(index);\n", - - "return this;\n"); - - if (HasNestedBuilders(descriptor_->containing_type())) { - printer->Print(variables_, - "$deprecation$public $type$.Builder get$capitalized_name$Builder(\n" - " int index) {\n" - " return get$capitalized_name$FieldBuilder().getBuilder(index);\n" - "}\n" - - "$deprecation$public $type$OrBuilder get$capitalized_name$OrBuilder(\n" - " int index) {\n" - " if ($name$Builder_ == null) {\n" - " return $name$_.get(index);" - " } else {\n" - " return $name$Builder_.getMessageOrBuilder(index);\n" - " }\n" - "}\n" - - "$deprecation$public java.util.List \n" - " get$capitalized_name$OrBuilderList() {\n" - " if ($name$Builder_ != null) {\n" - " return $name$Builder_.getMessageOrBuilderList();\n" - " } else {\n" - " return java.util.Collections.unmodifiableList($name$_);\n" - " }\n" - "}\n" - - "$deprecation$public $type$.Builder add$capitalized_name$Builder() {\n" - " return get$capitalized_name$FieldBuilder().addBuilder(\n" - " $type$.getDefaultInstance());\n" - "}\n" - "$deprecation$public $type$.Builder add$capitalized_name$Builder(\n" - " int index) {\n" - " return get$capitalized_name$FieldBuilder().addBuilder(\n" - " index, $type$.getDefaultInstance());\n" - "}\n" - "$deprecation$public java.util.List<$type$.Builder> \n" - " get$capitalized_name$BuilderList() {\n" - " return get$capitalized_name$FieldBuilder().getBuilderList();\n" - "}\n" - "private com.google.protobuf.RepeatedFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder> \n" - " get$capitalized_name$FieldBuilder() {\n" - " if ($name$Builder_ == null) {\n" - " $name$Builder_ = new com.google.protobuf.RepeatedFieldBuilder<\n" - " $type$, $type$.Builder, $type$OrBuilder>(\n" - " $name$_,\n" - " $get_mutable_bit_builder$,\n" - " getParentForChildren(),\n" - " isClean());\n" - " $name$_ = null;\n" - " }\n" - " return $name$Builder_;\n" - "}\n"); - } -} - -void RepeatedMessageFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - printer->Print(variables_, - "get$capitalized_name$FieldBuilder();\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = java.util.Collections.emptyList();\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - PrintNestedBuilderCondition(printer, - "$name$_ = java.util.Collections.emptyList();\n" - "$clear_mutable_bit_builder$;\n", - - "$name$Builder_.clear();\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - // The code below does two optimizations (non-nested builder case): - // 1. If the other list is empty, there's nothing to do. This ensures we - // don't allocate a new array if we already have an immutable one. - // 2. If the other list is non-empty and our current list is empty, we can - // reuse the other list which is guaranteed to be immutable. - PrintNestedBuilderCondition(printer, - "if (!other.$name$_.isEmpty()) {\n" - " if ($name$_.isEmpty()) {\n" - " $name$_ = other.$name$_;\n" - " $clear_mutable_bit_builder$;\n" - " } else {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.addAll(other.$name$_);\n" - " }\n" - " $on_changed$\n" - "}\n", - - "if (!other.$name$_.isEmpty()) {\n" - " if ($name$Builder_.isEmpty()) {\n" - " $name$Builder_.dispose();\n" - " $name$Builder_ = null;\n" - " $name$_ = other.$name$_;\n" - " $clear_mutable_bit_builder$;\n" - " $name$Builder_ = \n" - " com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?\n" - " get$capitalized_name$FieldBuilder() : null;\n" - " } else {\n" - " $name$Builder_.addAllMessages(other.$name$_);\n" - " }\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - // The code below (non-nested builder case) ensures that the result has an - // immutable list. If our list is immutable, we can just reuse it. If not, - // we make it immutable. - PrintNestedBuilderCondition(printer, - "if ($get_mutable_bit_builder$) {\n" - " $name$_ = java.util.Collections.unmodifiableList($name$_);\n" - " $clear_mutable_bit_builder$;\n" - "}\n" - "result.$name$_ = $name$_;\n", - - "result.$name$_ = $name$Builder_.build();\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "$type$.Builder subBuilder = $type$.newBuilder();\n"); - - if (GetType(descriptor_) == FieldDescriptor::TYPE_GROUP) { - printer->Print(variables_, - "input.readGroup($number$, subBuilder, extensionRegistry);\n"); - } else { - printer->Print(variables_, - "input.readMessage(subBuilder, extensionRegistry);\n"); - } - - printer->Print(variables_, - "add$capitalized_name$(subBuilder.buildPartial());\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.write$group_or_message$($number$, $name$_.get(i));\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .compute$group_or_message$Size($number$, $name$_.get(i));\n" - "}\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$List()\n" - " .equals(other.get$capitalized_name$List());\n"); -} - -void RepeatedMessageFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "if (get$capitalized_name$Count() > 0) {\n" - " hash = (37 * hash) + $constant_name$;\n" - " hash = (53 * hash) + get$capitalized_name$List().hashCode();\n" - "}\n"); -} - -string RepeatedMessageFieldGenerator::GetBoxedType() const { - return ClassName(descriptor_->message_type()); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.h deleted file mode 100644 index 2efbcd97..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_message_field.h +++ /dev/null @@ -1,134 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -class MessageFieldGenerator : public FieldGenerator { - public: - explicit MessageFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~MessageFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); - - void PrintNestedBuilderCondition(io::Printer* printer, - const char* regular_case, const char* nested_builder_case) const; - void PrintNestedBuilderFunction(io::Printer* printer, - const char* method_prototype, const char* regular_case, - const char* nested_builder_case, - const char* trailing_code) const; -}; - -class RepeatedMessageFieldGenerator : public FieldGenerator { - public: - explicit RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~RepeatedMessageFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); - - void PrintNestedBuilderCondition(io::Printer* printer, - const char* regular_case, const char* nested_builder_case) const; - void PrintNestedBuilderFunction(io::Printer* printer, - const char* method_prototype, const char* regular_case, - const char* nested_builder_case, - const char* trailing_code) const; -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc deleted file mode 100644 index ccc94c9d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc +++ /dev/null @@ -1,122 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// TODO(kenton): Share code with the versions of this test in other languages? -// It seemed like parameterizing it would add more complexity than it is -// worth. - -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { -namespace { - -class TestGenerator : public CodeGenerator { - public: - TestGenerator() {} - ~TestGenerator() {} - - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - string filename = "Test.java"; - TryInsert(filename, "outer_class_scope", context); - TryInsert(filename, "class_scope:foo.Bar", context); - TryInsert(filename, "class_scope:foo.Bar.Baz", context); - TryInsert(filename, "builder_scope:foo.Bar", context); - TryInsert(filename, "builder_scope:foo.Bar.Baz", context); - TryInsert(filename, "enum_scope:foo.Qux", context); - return true; - } - - void TryInsert(const string& filename, const string& insertion_point, - GeneratorContext* context) const { - scoped_ptr output( - context->OpenForInsert(filename, insertion_point)); - io::Printer printer(output.get(), '$'); - printer.Print("// inserted $name$\n", "name", insertion_point); - } -}; - -// This test verifies that all the expected insertion points exist. It does -// not verify that they are correctly-placed; that would require actually -// compiling the output which is a bit more than I care to do for this test. -TEST(JavaPluginTest, PluginTest) { - File::WriteStringToFileOrDie( - "syntax = \"proto2\";\n" - "package foo;\n" - "option java_package = \"\";\n" - "option java_outer_classname = \"Test\";\n" - "message Bar {\n" - " message Baz {}\n" - "}\n" - "enum Qux { BLAH = 1; }\n", - TestTempDir() + "/test.proto"); - - google::protobuf::compiler::CommandLineInterface cli; - cli.SetInputsAreProtoPathRelative(true); - - JavaGenerator java_generator; - TestGenerator test_generator; - cli.RegisterGenerator("--java_out", &java_generator, ""); - cli.RegisterGenerator("--test_out", &test_generator, ""); - - string proto_path = "-I" + TestTempDir(); - string java_out = "--java_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); - - const char* argv[] = { - "protoc", - proto_path.c_str(), - java_out.c_str(), - test_out.c_str(), - "test.proto" - }; - - EXPECT_EQ(0, cli.Run(5, argv)); -} - -} // namespace -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc deleted file mode 100644 index addb8819..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc +++ /dev/null @@ -1,719 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -using internal::WireFormat; -using internal::WireFormatLite; - -namespace { - -const char* PrimitiveTypeName(JavaType type) { - switch (type) { - case JAVATYPE_INT : return "int"; - case JAVATYPE_LONG : return "long"; - case JAVATYPE_FLOAT : return "float"; - case JAVATYPE_DOUBLE : return "double"; - case JAVATYPE_BOOLEAN: return "boolean"; - case JAVATYPE_STRING : return "java.lang.String"; - case JAVATYPE_BYTES : return "com.google.protobuf.ByteString"; - case JAVATYPE_ENUM : return NULL; - case JAVATYPE_MESSAGE: return NULL; - - // No default because we want the compiler to complain if any new - // JavaTypes are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; -} - -bool IsReferenceType(JavaType type) { - switch (type) { - case JAVATYPE_INT : return false; - case JAVATYPE_LONG : return false; - case JAVATYPE_FLOAT : return false; - case JAVATYPE_DOUBLE : return false; - case JAVATYPE_BOOLEAN: return false; - case JAVATYPE_STRING : return true; - case JAVATYPE_BYTES : return true; - case JAVATYPE_ENUM : return true; - case JAVATYPE_MESSAGE: return true; - - // No default because we want the compiler to complain if any new - // JavaTypes are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return false; -} - -const char* GetCapitalizedType(const FieldDescriptor* field) { - switch (GetType(field)) { - case FieldDescriptor::TYPE_INT32 : return "Int32" ; - case FieldDescriptor::TYPE_UINT32 : return "UInt32" ; - case FieldDescriptor::TYPE_SINT32 : return "SInt32" ; - case FieldDescriptor::TYPE_FIXED32 : return "Fixed32" ; - case FieldDescriptor::TYPE_SFIXED32: return "SFixed32"; - case FieldDescriptor::TYPE_INT64 : return "Int64" ; - case FieldDescriptor::TYPE_UINT64 : return "UInt64" ; - case FieldDescriptor::TYPE_SINT64 : return "SInt64" ; - case FieldDescriptor::TYPE_FIXED64 : return "Fixed64" ; - case FieldDescriptor::TYPE_SFIXED64: return "SFixed64"; - case FieldDescriptor::TYPE_FLOAT : return "Float" ; - case FieldDescriptor::TYPE_DOUBLE : return "Double" ; - case FieldDescriptor::TYPE_BOOL : return "Bool" ; - case FieldDescriptor::TYPE_STRING : return "String" ; - case FieldDescriptor::TYPE_BYTES : return "Bytes" ; - case FieldDescriptor::TYPE_ENUM : return "Enum" ; - case FieldDescriptor::TYPE_GROUP : return "Group" ; - case FieldDescriptor::TYPE_MESSAGE : return "Message" ; - - // No default because we want the compiler to complain if any new - // types are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return NULL; -} - -// For encodings with fixed sizes, returns that size in bytes. Otherwise -// returns -1. -int FixedSize(FieldDescriptor::Type type) { - switch (type) { - case FieldDescriptor::TYPE_INT32 : return -1; - case FieldDescriptor::TYPE_INT64 : return -1; - case FieldDescriptor::TYPE_UINT32 : return -1; - case FieldDescriptor::TYPE_UINT64 : return -1; - case FieldDescriptor::TYPE_SINT32 : return -1; - case FieldDescriptor::TYPE_SINT64 : return -1; - case FieldDescriptor::TYPE_FIXED32 : return WireFormatLite::kFixed32Size; - case FieldDescriptor::TYPE_FIXED64 : return WireFormatLite::kFixed64Size; - case FieldDescriptor::TYPE_SFIXED32: return WireFormatLite::kSFixed32Size; - case FieldDescriptor::TYPE_SFIXED64: return WireFormatLite::kSFixed64Size; - case FieldDescriptor::TYPE_FLOAT : return WireFormatLite::kFloatSize; - case FieldDescriptor::TYPE_DOUBLE : return WireFormatLite::kDoubleSize; - - case FieldDescriptor::TYPE_BOOL : return WireFormatLite::kBoolSize; - case FieldDescriptor::TYPE_ENUM : return -1; - - case FieldDescriptor::TYPE_STRING : return -1; - case FieldDescriptor::TYPE_BYTES : return -1; - case FieldDescriptor::TYPE_GROUP : return -1; - case FieldDescriptor::TYPE_MESSAGE : return -1; - - // No default because we want the compiler to complain if any new - // types are added. - } - GOOGLE_LOG(FATAL) << "Can't get here."; - return -1; -} - -void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - map* variables) { - (*variables)["name"] = - UnderscoresToCamelCase(descriptor); - (*variables)["capitalized_name"] = - UnderscoresToCapitalizedCamelCase(descriptor); - (*variables)["constant_name"] = FieldConstantName(descriptor); - (*variables)["number"] = SimpleItoa(descriptor->number()); - (*variables)["type"] = PrimitiveTypeName(GetJavaType(descriptor)); - (*variables)["boxed_type"] = BoxedPrimitiveTypeName(GetJavaType(descriptor)); - (*variables)["field_type"] = (*variables)["type"]; - (*variables)["field_list_type"] = "java.util.List<" + - (*variables)["boxed_type"] + ">"; - (*variables)["empty_list"] = "java.util.Collections.emptyList();"; - (*variables)["default"] = DefaultValue(descriptor); - (*variables)["default_init"] = IsDefaultValueJavaDefault(descriptor) ? - "" : ("= " + DefaultValue(descriptor)); - (*variables)["capitalized_type"] = GetCapitalizedType(descriptor); - (*variables)["tag"] = SimpleItoa(WireFormat::MakeTag(descriptor)); - (*variables)["tag_size"] = SimpleItoa( - WireFormat::TagSize(descriptor->number(), GetType(descriptor))); - if (IsReferenceType(GetJavaType(descriptor))) { - (*variables)["null_check"] = - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n"; - } else { - (*variables)["null_check"] = ""; - } - // TODO(birdo): Add @deprecated javadoc when generating javadoc is supported - // by the proto compiler - (*variables)["deprecation"] = descriptor->options().deprecated() - ? "@java.lang.Deprecated " : ""; - int fixed_size = FixedSize(GetType(descriptor)); - if (fixed_size != -1) { - (*variables)["fixed_size"] = SimpleItoa(fixed_size); - } - (*variables)["on_changed"] = - HasDescriptorMethods(descriptor->containing_type()) ? "onChanged();" : ""; - - // For singular messages and builders, one bit is used for the hasField bit. - (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); - - (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_has_field_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_has_field_bit_builder"] = - GenerateClearBit(builderBitIndex); - - // For repated builders, one bit is used for whether the array is immutable. - (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); - - (*variables)["get_has_field_bit_from_local"] = - GenerateGetBitFromLocal(builderBitIndex); - (*variables)["set_has_field_bit_to_local"] = - GenerateSetBitToLocal(messageBitIndex); -} - -} // namespace - -// =================================================================== - -PrimitiveFieldGenerator:: -PrimitiveFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetPrimitiveVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -PrimitiveFieldGenerator::~PrimitiveFieldGenerator() {} - -int PrimitiveFieldGenerator::GetNumBitsForMessage() const { - return 1; -} - -int PrimitiveFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void PrimitiveFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$boolean has$capitalized_name$();\n" - "$deprecation$$type$ get$capitalized_name$();\n"); -} - -void PrimitiveFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $field_type$ $name$_;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_message$;\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public $type$ get$capitalized_name$() {\n" - " return $name$_;\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $field_type$ $name$_ $default_init$;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_builder$;\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public $type$ get$capitalized_name$() {\n" - " return $name$_;\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public Builder set$capitalized_name$($type$ value) {\n" - "$null_check$" - " $set_has_field_bit_builder$;\n" - " $name$_ = value;\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $clear_has_field_bit_builder$;\n"); - JavaType type = GetJavaType(descriptor_); - if (type == JAVATYPE_STRING || type == JAVATYPE_BYTES) { - // The default value is not a simple literal so we want to avoid executing - // it multiple times. Instead, get the default out of the default instance. - printer->Print(variables_, - " $name$_ = getDefaultInstance().get$capitalized_name$();\n"); - } else { - printer->Print(variables_, - " $name$_ = $default$;\n"); - } - printer->Print(variables_, - " $on_changed$\n" - " return this;\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for primitives -} - -void PrimitiveFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = $default$;\n" - "$clear_has_field_bit_builder$;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, - "if (other.has$capitalized_name$()) {\n" - " set$capitalized_name$(other.get$capitalized_name$());\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_from_local$) {\n" - " $set_has_field_bit_to_local$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void PrimitiveFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "$set_has_field_bit_builder$;\n" - "$name$_ = input.read$capitalized_type$();\n"); -} - -void PrimitiveFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " output.write$capitalized_type$($number$, $name$_);\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .compute$capitalized_type$Size($number$, $name$_);\n" - "}\n"); -} - -void PrimitiveFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - switch (GetJavaType(descriptor_)) { - case JAVATYPE_INT: - case JAVATYPE_LONG: - case JAVATYPE_BOOLEAN: - printer->Print(variables_, - "result = result && (get$capitalized_name$()\n" - " == other.get$capitalized_name$());\n"); - break; - - case JAVATYPE_FLOAT: - printer->Print(variables_, - "result = result && (Float.floatToIntBits(get$capitalized_name$())" - " == Float.floatToIntBits(other.get$capitalized_name$()));\n"); - break; - - case JAVATYPE_DOUBLE: - printer->Print(variables_, - "result = result && (Double.doubleToLongBits(get$capitalized_name$())" - " == Double.doubleToLongBits(other.get$capitalized_name$()));\n"); - break; - - case JAVATYPE_STRING: - case JAVATYPE_BYTES: - printer->Print(variables_, - "result = result && get$capitalized_name$()\n" - " .equals(other.get$capitalized_name$());\n"); - break; - - case JAVATYPE_ENUM: - case JAVATYPE_MESSAGE: - default: - GOOGLE_LOG(FATAL) << "Can't get here."; - break; - } -} - -void PrimitiveFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "hash = (37 * hash) + $constant_name$;\n"); - switch (GetJavaType(descriptor_)) { - case JAVATYPE_INT: - printer->Print(variables_, - "hash = (53 * hash) + get$capitalized_name$();\n"); - break; - - case JAVATYPE_LONG: - printer->Print(variables_, - "hash = (53 * hash) + hashLong(get$capitalized_name$());\n"); - break; - - case JAVATYPE_BOOLEAN: - printer->Print(variables_, - "hash = (53 * hash) + hashBoolean(get$capitalized_name$());\n"); - break; - - case JAVATYPE_FLOAT: - printer->Print(variables_, - "hash = (53 * hash) + Float.floatToIntBits(\n" - " get$capitalized_name$());\n"); - break; - - case JAVATYPE_DOUBLE: - printer->Print(variables_, - "hash = (53 * hash) + hashLong(\n" - " Double.doubleToLongBits(get$capitalized_name$()));\n"); - break; - - case JAVATYPE_STRING: - case JAVATYPE_BYTES: - printer->Print(variables_, - "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); - break; - - case JAVATYPE_ENUM: - case JAVATYPE_MESSAGE: - default: - GOOGLE_LOG(FATAL) << "Can't get here."; - break; - } -} - -string PrimitiveFieldGenerator::GetBoxedType() const { - return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); -} - -// =================================================================== - -RepeatedPrimitiveFieldGenerator:: -RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetPrimitiveVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -RepeatedPrimitiveFieldGenerator::~RepeatedPrimitiveFieldGenerator() {} - -int RepeatedPrimitiveFieldGenerator::GetNumBitsForMessage() const { - return 0; -} - -int RepeatedPrimitiveFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$java.util.List<$boxed_type$> get$capitalized_name$List();\n" - "$deprecation$int get$capitalized_name$Count();\n" - "$deprecation$$type$ get$capitalized_name$(int index);\n"); -} - - -void RepeatedPrimitiveFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private $field_list_type$ $name$_;\n" - "$deprecation$public java.util.List<$boxed_type$>\n" - " get$capitalized_name$List() {\n" - " return $name$_;\n" // note: unmodifiable list - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n"); - - if (descriptor_->options().packed() && - HasGeneratedMethods(descriptor_->containing_type())) { - printer->Print(variables_, - "private int $name$MemoizedSerializedSize = -1;\n"); - } -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - // One field is the list and the bit field keeps track of whether the - // list is immutable. If it's immutable, the invariant is that it must - // either an instance of Collections.emptyList() or it's an ArrayList - // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to - // share instances of lists between protocol buffers avoiding expensive - // memory allocations. Note, immutable is a strong guarantee here -- not - // just that the list cannot be modified via the reference but that the - // list can never be modified. - printer->Print(variables_, - "private $field_list_type$ $name$_ = $empty_list$;\n"); - - printer->Print(variables_, - "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$get_mutable_bit_builder$) {\n" - " $name$_ = new java.util.ArrayList<$boxed_type$>($name$_);\n" - " $set_mutable_bit_builder$;\n" - " }\n" - "}\n"); - - // Note: We return an unmodifiable list because otherwise the caller - // could hold on to the returned list and modify it after the message - // has been built, thus mutating the message which is supposed to be - // immutable. - printer->Print(variables_, - "$deprecation$public java.util.List<$boxed_type$>\n" - " get$capitalized_name$List() {\n" - " return java.util.Collections.unmodifiableList($name$_);\n" - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public $type$ get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n" - "$deprecation$public Builder set$capitalized_name$(\n" - " int index, $type$ value) {\n" - "$null_check$" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.set(index, value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder add$capitalized_name$($type$ value) {\n" - "$null_check$" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder addAll$capitalized_name$(\n" - " java.lang.Iterable values) {\n" - " ensure$capitalized_name$IsMutable();\n" - " super.addAll(values, $name$_);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $name$_ = $empty_list$;\n" - " $clear_mutable_bit_builder$;\n" - " $on_changed$\n" - " return this;\n" - "}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for primitives -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $empty_list$;\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = $empty_list$;\n" - "$clear_mutable_bit_builder$;\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - // The code below does two optimizations: - // 1. If the other list is empty, there's nothing to do. This ensures we - // don't allocate a new array if we already have an immutable one. - // 2. If the other list is non-empty and our current list is empty, we can - // reuse the other list which is guaranteed to be immutable. - printer->Print(variables_, - "if (!other.$name$_.isEmpty()) {\n" - " if ($name$_.isEmpty()) {\n" - " $name$_ = other.$name$_;\n" - " $clear_mutable_bit_builder$;\n" - " } else {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.addAll(other.$name$_);\n" - " }\n" - " $on_changed$\n" - "}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - // The code below ensures that the result has an immutable list. If our - // list is immutable, we can just reuse it. If not, we make it immutable. - printer->Print(variables_, - "if ($get_mutable_bit_builder$) {\n" - " $name$_ = java.util.Collections.unmodifiableList($name$_);\n" - " $clear_mutable_bit_builder$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(input.read$capitalized_type$());\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateParsingCodeFromPacked(io::Printer* printer) const { - printer->Print(variables_, - "int length = input.readRawVarint32();\n" - "int limit = input.pushLimit(length);\n" - "while (input.getBytesUntilLimit() > 0) {\n" - " add$capitalized_name$(input.read$capitalized_type$());\n" - "}\n" - "input.popLimit(limit);\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (get$capitalized_name$List().size() > 0) {\n" - " output.writeRawVarint32($tag$);\n" - " output.writeRawVarint32($name$MemoizedSerializedSize);\n" - "}\n" - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.write$capitalized_type$NoTag($name$_.get(i));\n" - "}\n"); - } else { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.write$capitalized_type$($number$, $name$_.get(i));\n" - "}\n"); - } -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "{\n" - " int dataSize = 0;\n"); - printer->Indent(); - - if (FixedSize(GetType(descriptor_)) == -1) { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " dataSize += com.google.protobuf.CodedOutputStream\n" - " .compute$capitalized_type$SizeNoTag($name$_.get(i));\n" - "}\n"); - } else { - printer->Print(variables_, - "dataSize = $fixed_size$ * get$capitalized_name$List().size();\n"); - } - - printer->Print( - "size += dataSize;\n"); - - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (!get$capitalized_name$List().isEmpty()) {\n" - " size += $tag_size$;\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .computeInt32SizeNoTag(dataSize);\n" - "}\n"); - } else { - printer->Print(variables_, - "size += $tag_size$ * get$capitalized_name$List().size();\n"); - } - - // cache the data size for packed fields. - if (descriptor_->options().packed()) { - printer->Print(variables_, - "$name$MemoizedSerializedSize = dataSize;\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$List()\n" - " .equals(other.get$capitalized_name$List());\n"); -} - -void RepeatedPrimitiveFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "if (get$capitalized_name$Count() > 0) {\n" - " hash = (37 * hash) + $constant_name$;\n" - " hash = (53 * hash) + get$capitalized_name$List().hashCode();\n" - "}\n"); -} - -string RepeatedPrimitiveFieldGenerator::GetBoxedType() const { - return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h deleted file mode 100644 index 7900fac5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h +++ /dev/null @@ -1,121 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_PRIMITIVE_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_PRIMITIVE_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -class PrimitiveFieldGenerator : public FieldGenerator { - public: - explicit PrimitiveFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~PrimitiveFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); -}; - -class RepeatedPrimitiveFieldGenerator : public FieldGenerator { - public: - explicit RepeatedPrimitiveFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~RepeatedPrimitiveFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateParsingCodeFromPacked(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_PRIMITIVE_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.cc deleted file mode 100644 index 1ae4f461..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.cc +++ /dev/null @@ -1,444 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -ServiceGenerator::ServiceGenerator(const ServiceDescriptor* descriptor) - : descriptor_(descriptor) {} - -ServiceGenerator::~ServiceGenerator() {} - -void ServiceGenerator::Generate(io::Printer* printer) { - bool is_own_file = descriptor_->file()->options().java_multiple_files(); - printer->Print( - "public $static$ abstract class $classname$\n" - " implements com.google.protobuf.Service {\n", - "static", is_own_file ? "" : "static", - "classname", descriptor_->name()); - printer->Indent(); - - printer->Print( - "protected $classname$() {}\n\n", - "classname", descriptor_->name()); - - GenerateInterface(printer); - - GenerateNewReflectiveServiceMethod(printer); - GenerateNewReflectiveBlockingServiceMethod(printer); - - GenerateAbstractMethods(printer); - - // Generate getDescriptor() and getDescriptorForType(). - printer->Print( - "public static final\n" - " com.google.protobuf.Descriptors.ServiceDescriptor\n" - " getDescriptor() {\n" - " return $file$.getDescriptor().getServices().get($index$);\n" - "}\n", - "file", ClassName(descriptor_->file()), - "index", SimpleItoa(descriptor_->index())); - GenerateGetDescriptorForType(printer); - - // Generate more stuff. - GenerateCallMethod(printer); - GenerateGetPrototype(REQUEST, printer); - GenerateGetPrototype(RESPONSE, printer); - GenerateStub(printer); - GenerateBlockingStub(printer); - - printer->Outdent(); - printer->Print("}\n\n"); -} - -void ServiceGenerator::GenerateGetDescriptorForType(io::Printer* printer) { - printer->Print( - "public final com.google.protobuf.Descriptors.ServiceDescriptor\n" - " getDescriptorForType() {\n" - " return getDescriptor();\n" - "}\n"); -} - -void ServiceGenerator::GenerateInterface(io::Printer* printer) { - printer->Print("public interface Interface {\n"); - printer->Indent(); - GenerateAbstractMethods(printer); - printer->Outdent(); - printer->Print("}\n\n"); -} - -void ServiceGenerator::GenerateNewReflectiveServiceMethod( - io::Printer* printer) { - printer->Print( - "public static com.google.protobuf.Service newReflectiveService(\n" - " final Interface impl) {\n" - " return new $classname$() {\n", - "classname", descriptor_->name()); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - printer->Print("@java.lang.Override\n"); - GenerateMethodSignature(printer, method, IS_CONCRETE); - printer->Print( - " {\n" - " impl.$method$(controller, request, done);\n" - "}\n\n", - "method", UnderscoresToCamelCase(method)); - } - - printer->Outdent(); - printer->Print("};\n"); - printer->Outdent(); - printer->Print("}\n\n"); -} - -void ServiceGenerator::GenerateNewReflectiveBlockingServiceMethod( - io::Printer* printer) { - printer->Print( - "public static com.google.protobuf.BlockingService\n" - " newReflectiveBlockingService(final BlockingInterface impl) {\n" - " return new com.google.protobuf.BlockingService() {\n"); - printer->Indent(); - printer->Indent(); - - GenerateGetDescriptorForType(printer); - - GenerateCallBlockingMethod(printer); - GenerateGetPrototype(REQUEST, printer); - GenerateGetPrototype(RESPONSE, printer); - - printer->Outdent(); - printer->Print("};\n"); - printer->Outdent(); - printer->Print("}\n\n"); -} - -void ServiceGenerator::GenerateAbstractMethods(io::Printer* printer) { - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - GenerateMethodSignature(printer, method, IS_ABSTRACT); - printer->Print(";\n\n"); - } -} - -void ServiceGenerator::GenerateCallMethod(io::Printer* printer) { - printer->Print( - "\n" - "public final void callMethod(\n" - " com.google.protobuf.Descriptors.MethodDescriptor method,\n" - " com.google.protobuf.RpcController controller,\n" - " com.google.protobuf.Message request,\n" - " com.google.protobuf.RpcCallback<\n" - " com.google.protobuf.Message> done) {\n" - " if (method.getService() != getDescriptor()) {\n" - " throw new java.lang.IllegalArgumentException(\n" - " \"Service.callMethod() given method descriptor for wrong \" +\n" - " \"service type.\");\n" - " }\n" - " switch(method.getIndex()) {\n"); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map vars; - vars["index"] = SimpleItoa(i); - vars["method"] = UnderscoresToCamelCase(method); - vars["input"] = ClassName(method->input_type()); - vars["output"] = ClassName(method->output_type()); - printer->Print(vars, - "case $index$:\n" - " this.$method$(controller, ($input$)request,\n" - " com.google.protobuf.RpcUtil.<$output$>specializeCallback(\n" - " done));\n" - " return;\n"); - } - - printer->Print( - "default:\n" - " throw new java.lang.AssertionError(\"Can't get here.\");\n"); - - printer->Outdent(); - printer->Outdent(); - - printer->Print( - " }\n" - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateCallBlockingMethod(io::Printer* printer) { - printer->Print( - "\n" - "public final com.google.protobuf.Message callBlockingMethod(\n" - " com.google.protobuf.Descriptors.MethodDescriptor method,\n" - " com.google.protobuf.RpcController controller,\n" - " com.google.protobuf.Message request)\n" - " throws com.google.protobuf.ServiceException {\n" - " if (method.getService() != getDescriptor()) {\n" - " throw new java.lang.IllegalArgumentException(\n" - " \"Service.callBlockingMethod() given method descriptor for \" +\n" - " \"wrong service type.\");\n" - " }\n" - " switch(method.getIndex()) {\n"); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map vars; - vars["index"] = SimpleItoa(i); - vars["method"] = UnderscoresToCamelCase(method); - vars["input"] = ClassName(method->input_type()); - vars["output"] = ClassName(method->output_type()); - printer->Print(vars, - "case $index$:\n" - " return impl.$method$(controller, ($input$)request);\n"); - } - - printer->Print( - "default:\n" - " throw new java.lang.AssertionError(\"Can't get here.\");\n"); - - printer->Outdent(); - printer->Outdent(); - - printer->Print( - " }\n" - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which, - io::Printer* printer) { - /* - * TODO(cpovirk): The exception message says "Service.foo" when it may be - * "BlockingService.foo." Consider fixing. - */ - printer->Print( - "public final com.google.protobuf.Message\n" - " get$request_or_response$Prototype(\n" - " com.google.protobuf.Descriptors.MethodDescriptor method) {\n" - " if (method.getService() != getDescriptor()) {\n" - " throw new java.lang.IllegalArgumentException(\n" - " \"Service.get$request_or_response$Prototype() given method \" +\n" - " \"descriptor for wrong service type.\");\n" - " }\n" - " switch(method.getIndex()) {\n", - "request_or_response", (which == REQUEST) ? "Request" : "Response"); - printer->Indent(); - printer->Indent(); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - map vars; - vars["index"] = SimpleItoa(i); - vars["type"] = ClassName( - (which == REQUEST) ? method->input_type() : method->output_type()); - printer->Print(vars, - "case $index$:\n" - " return $type$.getDefaultInstance();\n"); - } - - printer->Print( - "default:\n" - " throw new java.lang.AssertionError(\"Can't get here.\");\n"); - - printer->Outdent(); - printer->Outdent(); - - printer->Print( - " }\n" - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateStub(io::Printer* printer) { - printer->Print( - "public static Stub newStub(\n" - " com.google.protobuf.RpcChannel channel) {\n" - " return new Stub(channel);\n" - "}\n" - "\n" - "public static final class Stub extends $classname$ implements Interface {" - "\n", - "classname", ClassName(descriptor_)); - printer->Indent(); - - printer->Print( - "private Stub(com.google.protobuf.RpcChannel channel) {\n" - " this.channel = channel;\n" - "}\n" - "\n" - "private final com.google.protobuf.RpcChannel channel;\n" - "\n" - "public com.google.protobuf.RpcChannel getChannel() {\n" - " return channel;\n" - "}\n"); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - printer->Print("\n"); - GenerateMethodSignature(printer, method, IS_CONCRETE); - printer->Print(" {\n"); - printer->Indent(); - - map vars; - vars["index"] = SimpleItoa(i); - vars["output"] = ClassName(method->output_type()); - printer->Print(vars, - "channel.callMethod(\n" - " getDescriptor().getMethods().get($index$),\n" - " controller,\n" - " request,\n" - " $output$.getDefaultInstance(),\n" - " com.google.protobuf.RpcUtil.generalizeCallback(\n" - " done,\n" - " $output$.class,\n" - " $output$.getDefaultInstance()));\n"); - - printer->Outdent(); - printer->Print("}\n"); - } - - printer->Outdent(); - printer->Print( - "}\n" - "\n"); -} - -void ServiceGenerator::GenerateBlockingStub(io::Printer* printer) { - printer->Print( - "public static BlockingInterface newBlockingStub(\n" - " com.google.protobuf.BlockingRpcChannel channel) {\n" - " return new BlockingStub(channel);\n" - "}\n" - "\n"); - - printer->Print( - "public interface BlockingInterface {"); - printer->Indent(); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - GenerateBlockingMethodSignature(printer, method); - printer->Print(";\n"); - } - - printer->Outdent(); - printer->Print( - "}\n" - "\n"); - - printer->Print( - "private static final class BlockingStub implements BlockingInterface {\n"); - printer->Indent(); - - printer->Print( - "private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {\n" - " this.channel = channel;\n" - "}\n" - "\n" - "private final com.google.protobuf.BlockingRpcChannel channel;\n"); - - for (int i = 0; i < descriptor_->method_count(); i++) { - const MethodDescriptor* method = descriptor_->method(i); - GenerateBlockingMethodSignature(printer, method); - printer->Print(" {\n"); - printer->Indent(); - - map vars; - vars["index"] = SimpleItoa(i); - vars["output"] = ClassName(method->output_type()); - printer->Print(vars, - "return ($output$) channel.callBlockingMethod(\n" - " getDescriptor().getMethods().get($index$),\n" - " controller,\n" - " request,\n" - " $output$.getDefaultInstance());\n"); - - printer->Outdent(); - printer->Print( - "}\n" - "\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void ServiceGenerator::GenerateMethodSignature(io::Printer* printer, - const MethodDescriptor* method, - IsAbstract is_abstract) { - map vars; - vars["name"] = UnderscoresToCamelCase(method); - vars["input"] = ClassName(method->input_type()); - vars["output"] = ClassName(method->output_type()); - vars["abstract"] = (is_abstract == IS_ABSTRACT) ? "abstract" : ""; - printer->Print(vars, - "public $abstract$ void $name$(\n" - " com.google.protobuf.RpcController controller,\n" - " $input$ request,\n" - " com.google.protobuf.RpcCallback<$output$> done)"); -} - -void ServiceGenerator::GenerateBlockingMethodSignature( - io::Printer* printer, - const MethodDescriptor* method) { - map vars; - vars["method"] = UnderscoresToCamelCase(method); - vars["input"] = ClassName(method->input_type()); - vars["output"] = ClassName(method->output_type()); - printer->Print(vars, - "\n" - "public $output$ $method$(\n" - " com.google.protobuf.RpcController controller,\n" - " $input$ request)\n" - " throws com.google.protobuf.ServiceException"); -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.h deleted file mode 100644 index e07eebf7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_service.h +++ /dev/null @@ -1,113 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_SERVICE_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_SERVICE_H__ - -#include -#include - -namespace google { -namespace protobuf { - namespace io { - class Printer; // printer.h - } -} - -namespace protobuf { -namespace compiler { -namespace java { - -class ServiceGenerator { - public: - explicit ServiceGenerator(const ServiceDescriptor* descriptor); - ~ServiceGenerator(); - - void Generate(io::Printer* printer); - - private: - - // Generate the getDescriptorForType() method. - void GenerateGetDescriptorForType(io::Printer* printer); - - // Generate a Java interface for the service. - void GenerateInterface(io::Printer* printer); - - // Generate newReflectiveService() method. - void GenerateNewReflectiveServiceMethod(io::Printer* printer); - - // Generate newReflectiveBlockingService() method. - void GenerateNewReflectiveBlockingServiceMethod(io::Printer* printer); - - // Generate abstract method declarations for all methods. - void GenerateAbstractMethods(io::Printer* printer); - - // Generate the implementation of Service.callMethod(). - void GenerateCallMethod(io::Printer* printer); - - // Generate the implementation of BlockingService.callBlockingMethod(). - void GenerateCallBlockingMethod(io::Printer* printer); - - // Generate the implementations of Service.get{Request,Response}Prototype(). - enum RequestOrResponse { REQUEST, RESPONSE }; - void GenerateGetPrototype(RequestOrResponse which, io::Printer* printer); - - // Generate a stub implementation of the service. - void GenerateStub(io::Printer* printer); - - // Generate a method signature, possibly abstract, without body or trailing - // semicolon. - enum IsAbstract { IS_ABSTRACT, IS_CONCRETE }; - void GenerateMethodSignature(io::Printer* printer, - const MethodDescriptor* method, - IsAbstract is_abstract); - - // Generate a blocking stub interface and implementation of the service. - void GenerateBlockingStub(io::Printer* printer); - - // Generate the method signature for one method of a blocking stub. - void GenerateBlockingMethodSignature(io::Printer* printer, - const MethodDescriptor* method); - - const ServiceDescriptor* descriptor_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -#endif // NET_PROTO2_COMPILER_JAVA_SERVICE_H__ -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.cc deleted file mode 100644 index 4f1fb14c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.cc +++ /dev/null @@ -1,605 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Author: jonp@google.com (Jon Perlow) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -using internal::WireFormat; -using internal::WireFormatLite; - -namespace { - -void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - map* variables) { - (*variables)["name"] = - UnderscoresToCamelCase(descriptor); - (*variables)["capitalized_name"] = - UnderscoresToCapitalizedCamelCase(descriptor); - (*variables)["constant_name"] = FieldConstantName(descriptor); - (*variables)["number"] = SimpleItoa(descriptor->number()); - (*variables)["empty_list"] = "com.google.protobuf.LazyStringArrayList.EMPTY"; - - (*variables)["default"] = DefaultValue(descriptor); - (*variables)["default_init"] = ("= " + DefaultValue(descriptor)); - (*variables)["capitalized_type"] = "String"; - (*variables)["tag"] = SimpleItoa(WireFormat::MakeTag(descriptor)); - (*variables)["tag_size"] = SimpleItoa( - WireFormat::TagSize(descriptor->number(), GetType(descriptor))); - (*variables)["null_check"] = - " if (value == null) {\n" - " throw new NullPointerException();\n" - " }\n"; - - // TODO(birdo): Add @deprecated javadoc when generating javadoc is supported - // by the proto compiler - (*variables)["deprecation"] = descriptor->options().deprecated() - ? "@java.lang.Deprecated " : ""; - (*variables)["on_changed"] = - HasDescriptorMethods(descriptor->containing_type()) ? "onChanged();" : ""; - - // For singular messages and builders, one bit is used for the hasField bit. - (*variables)["get_has_field_bit_message"] = GenerateGetBit(messageBitIndex); - - (*variables)["get_has_field_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_has_field_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_has_field_bit_builder"] = - GenerateClearBit(builderBitIndex); - - // For repated builders, one bit is used for whether the array is immutable. - (*variables)["get_mutable_bit_builder"] = GenerateGetBit(builderBitIndex); - (*variables)["set_mutable_bit_builder"] = GenerateSetBit(builderBitIndex); - (*variables)["clear_mutable_bit_builder"] = GenerateClearBit(builderBitIndex); - - (*variables)["get_has_field_bit_from_local"] = - GenerateGetBitFromLocal(builderBitIndex); - (*variables)["set_has_field_bit_to_local"] = - GenerateSetBitToLocal(messageBitIndex); -} - -} // namespace - -// =================================================================== - -StringFieldGenerator:: -StringFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetPrimitiveVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -StringFieldGenerator::~StringFieldGenerator() {} - -int StringFieldGenerator::GetNumBitsForMessage() const { - return 1; -} - -int StringFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -// A note about how strings are handled. This code used to just store a String -// in the Message. This had two issues: -// -// 1. It wouldn't roundtrip byte arrays that were not vaid UTF-8 encoded -// strings, but rather fields that were raw bytes incorrectly marked -// as strings in the proto file. This is common because in the proto1 -// syntax, string was the way to indicate bytes and C++ engineers can -// easily make this mistake without affecting the C++ API. By converting to -// strings immediately, some java code might corrupt these byte arrays as -// it passes through a java server even if the field was never accessed by -// application code. -// -// 2. There's a performance hit to converting between bytes and strings and -// it many cases, the field is never even read by the application code. This -// avoids unnecessary conversions in the common use cases. -// -// So now, the field for String is maintained as an Object reference which can -// either store a String or a ByteString. The code uses an instanceof check -// to see which one it has and converts to the other one if needed. It remembers -// the last value requested (in a thread safe manner) as this is most likely -// the one needed next. The thread safety is such that if two threads both -// convert the field because the changes made by each thread were not visible to -// the other, they may cause a conversion to happen more times than would -// otherwise be necessary. This was deemed better than adding synchronization -// overhead. It will not cause any corruption issues or affect the behavior of -// the API. The instanceof check is also highly optimized in the JVM and we -// decided it was better to reduce the memory overhead by not having two -// separate fields but rather use dynamic type checking. -// -// For single fields, the logic for this is done inside the generated code. For -// repeated fields, the logic is done in LazyStringArrayList and -// UnmodifiableLazyStringList. -void StringFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$boolean has$capitalized_name$();\n" - "$deprecation$String get$capitalized_name$();\n"); -} - -void StringFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private java.lang.Object $name$_;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_message$;\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public String get$capitalized_name$() {\n" - " java.lang.Object ref = $name$_;\n" - " if (ref instanceof String) {\n" - " return (String) ref;\n" - " } else {\n" - " com.google.protobuf.ByteString bs = \n" - " (com.google.protobuf.ByteString) ref;\n" - " String s = bs.toStringUtf8();\n" - " if (com.google.protobuf.Internal.isValidUtf8(bs)) {\n" - " $name$_ = s;\n" - " }\n" - " return s;\n" - " }\n" - "}\n" - "private com.google.protobuf.ByteString get$capitalized_name$Bytes() {\n" - " java.lang.Object ref = $name$_;\n" - " if (ref instanceof String) {\n" - " com.google.protobuf.ByteString b = \n" - " com.google.protobuf.ByteString.copyFromUtf8((String) ref);\n" - " $name$_ = b;\n" - " return b;\n" - " } else {\n" - " return (com.google.protobuf.ByteString) ref;\n" - " }\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - printer->Print(variables_, - "private java.lang.Object $name$_ $default_init$;\n" - "$deprecation$public boolean has$capitalized_name$() {\n" - " return $get_has_field_bit_builder$;\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public String get$capitalized_name$() {\n" - " java.lang.Object ref = $name$_;\n" - " if (!(ref instanceof String)) {\n" - " String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n" - " $name$_ = s;\n" - " return s;\n" - " } else {\n" - " return (String) ref;\n" - " }\n" - "}\n"); - - printer->Print(variables_, - "$deprecation$public Builder set$capitalized_name$(String value) {\n" - "$null_check$" - " $set_has_field_bit_builder$;\n" - " $name$_ = value;\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $clear_has_field_bit_builder$;\n"); - // The default value is not a simple literal so we want to avoid executing - // it multiple times. Instead, get the default out of the default instance. - printer->Print(variables_, - " $name$_ = getDefaultInstance().get$capitalized_name$();\n"); - printer->Print(variables_, - " $on_changed$\n" - " return this;\n" - "}\n"); - - printer->Print(variables_, - "void set$capitalized_name$(com.google.protobuf.ByteString value) {\n" - " $set_has_field_bit_builder$;\n" - " $name$_ = value;\n" - " $on_changed$\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for primitives -} - -void StringFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $default$;\n"); -} - -void StringFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = $default$;\n" - "$clear_has_field_bit_builder$;\n"); -} - -void StringFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - printer->Print(variables_, - "if (other.has$capitalized_name$()) {\n" - " set$capitalized_name$(other.get$capitalized_name$());\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_from_local$) {\n" - " $set_has_field_bit_to_local$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void StringFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "$set_has_field_bit_builder$;\n" - "$name$_ = input.readBytes();\n"); -} - -void StringFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " output.writeBytes($number$, get$capitalized_name$Bytes());\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "if ($get_has_field_bit_message$) {\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .computeBytesSize($number$, get$capitalized_name$Bytes());\n" - "}\n"); -} - -void StringFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$()\n" - " .equals(other.get$capitalized_name$());\n"); -} - -void StringFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "hash = (37 * hash) + $constant_name$;\n"); - printer->Print(variables_, - "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); -} - -string StringFieldGenerator::GetBoxedType() const { - return "String"; -} - - -// =================================================================== - -RepeatedStringFieldGenerator:: -RepeatedStringFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex) - : descriptor_(descriptor), messageBitIndex_(messageBitIndex), - builderBitIndex_(builderBitIndex) { - SetPrimitiveVariables(descriptor, messageBitIndex, builderBitIndex, - &variables_); -} - -RepeatedStringFieldGenerator::~RepeatedStringFieldGenerator() {} - -int RepeatedStringFieldGenerator::GetNumBitsForMessage() const { - return 0; -} - -int RepeatedStringFieldGenerator::GetNumBitsForBuilder() const { - return 1; -} - -void RepeatedStringFieldGenerator:: -GenerateInterfaceMembers(io::Printer* printer) const { - printer->Print(variables_, - "$deprecation$java.util.List get$capitalized_name$List();\n" - "$deprecation$int get$capitalized_name$Count();\n" - "$deprecation$String get$capitalized_name$(int index);\n"); -} - - -void RepeatedStringFieldGenerator:: -GenerateMembers(io::Printer* printer) const { - printer->Print(variables_, - "private com.google.protobuf.LazyStringList $name$_;\n" - "$deprecation$public java.util.List\n" - " get$capitalized_name$List() {\n" - " return $name$_;\n" // note: unmodifiable list - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public String get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n"); - - if (descriptor_->options().packed() && - HasGeneratedMethods(descriptor_->containing_type())) { - printer->Print(variables_, - "private int $name$MemoizedSerializedSize = -1;\n"); - } -} - -void RepeatedStringFieldGenerator:: -GenerateBuilderMembers(io::Printer* printer) const { - // One field is the list and the bit field keeps track of whether the - // list is immutable. If it's immutable, the invariant is that it must - // either an instance of Collections.emptyList() or it's an ArrayList - // wrapped in a Collections.unmodifiableList() wrapper and nobody else has - // a refererence to the underlying ArrayList. This invariant allows us to - // share instances of lists between protocol buffers avoiding expensive - // memory allocations. Note, immutable is a strong guarantee here -- not - // just that the list cannot be modified via the reference but that the - // list can never be modified. - printer->Print(variables_, - "private com.google.protobuf.LazyStringList $name$_ = $empty_list$;\n"); - - printer->Print(variables_, - "private void ensure$capitalized_name$IsMutable() {\n" - " if (!$get_mutable_bit_builder$) {\n" - " $name$_ = new com.google.protobuf.LazyStringArrayList($name$_);\n" - " $set_mutable_bit_builder$;\n" - " }\n" - "}\n"); - - // Note: We return an unmodifiable list because otherwise the caller - // could hold on to the returned list and modify it after the message - // has been built, thus mutating the message which is supposed to be - // immutable. - printer->Print(variables_, - "$deprecation$public java.util.List\n" - " get$capitalized_name$List() {\n" - " return java.util.Collections.unmodifiableList($name$_);\n" - "}\n" - "$deprecation$public int get$capitalized_name$Count() {\n" - " return $name$_.size();\n" - "}\n" - "$deprecation$public String get$capitalized_name$(int index) {\n" - " return $name$_.get(index);\n" - "}\n" - "$deprecation$public Builder set$capitalized_name$(\n" - " int index, String value) {\n" - "$null_check$" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.set(index, value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder add$capitalized_name$(String value) {\n" - "$null_check$" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(value);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder addAll$capitalized_name$(\n" - " java.lang.Iterable values) {\n" - " ensure$capitalized_name$IsMutable();\n" - " super.addAll(values, $name$_);\n" - " $on_changed$\n" - " return this;\n" - "}\n" - "$deprecation$public Builder clear$capitalized_name$() {\n" - " $name$_ = $empty_list$;\n" - " $clear_mutable_bit_builder$;\n" - " $on_changed$\n" - " return this;\n" - "}\n"); - - printer->Print(variables_, - "void add$capitalized_name$(com.google.protobuf.ByteString value) {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.add(value);\n" - " $on_changed$\n" - "}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateFieldBuilderInitializationCode(io::Printer* printer) const { - // noop for primitives -} - -void RepeatedStringFieldGenerator:: -GenerateInitializationCode(io::Printer* printer) const { - printer->Print(variables_, "$name$_ = $empty_list$;\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateBuilderClearCode(io::Printer* printer) const { - printer->Print(variables_, - "$name$_ = $empty_list$;\n" - "$clear_mutable_bit_builder$;\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateMergingCode(io::Printer* printer) const { - // The code below does two optimizations: - // 1. If the other list is empty, there's nothing to do. This ensures we - // don't allocate a new array if we already have an immutable one. - // 2. If the other list is non-empty and our current list is empty, we can - // reuse the other list which is guaranteed to be immutable. - printer->Print(variables_, - "if (!other.$name$_.isEmpty()) {\n" - " if ($name$_.isEmpty()) {\n" - " $name$_ = other.$name$_;\n" - " $clear_mutable_bit_builder$;\n" - " } else {\n" - " ensure$capitalized_name$IsMutable();\n" - " $name$_.addAll(other.$name$_);\n" - " }\n" - " $on_changed$\n" - "}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateBuildingCode(io::Printer* printer) const { - // The code below ensures that the result has an immutable list. If our - // list is immutable, we can just reuse it. If not, we make it immutable. - - printer->Print(variables_, - "if ($get_mutable_bit_builder$) {\n" - " $name$_ = new com.google.protobuf.UnmodifiableLazyStringList(\n" - " $name$_);\n" - " $clear_mutable_bit_builder$;\n" - "}\n" - "result.$name$_ = $name$_;\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateParsingCode(io::Printer* printer) const { - printer->Print(variables_, - "ensure$capitalized_name$IsMutable();\n" - "$name$_.add(input.readBytes());\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateParsingCodeFromPacked(io::Printer* printer) const { - printer->Print(variables_, - "int length = input.readRawVarint32();\n" - "int limit = input.pushLimit(length);\n" - "while (input.getBytesUntilLimit() > 0) {\n" - " add$capitalized_name$(input.read$capitalized_type$());\n" - "}\n" - "input.popLimit(limit);\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateSerializationCode(io::Printer* printer) const { - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (get$capitalized_name$List().size() > 0) {\n" - " output.writeRawVarint32($tag$);\n" - " output.writeRawVarint32($name$MemoizedSerializedSize);\n" - "}\n" - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.write$capitalized_type$NoTag($name$_.get(i));\n" - "}\n"); - } else { - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " output.writeBytes($number$, $name$_.getByteString(i));\n" - "}\n"); - } -} - -void RepeatedStringFieldGenerator:: -GenerateSerializedSizeCode(io::Printer* printer) const { - printer->Print(variables_, - "{\n" - " int dataSize = 0;\n"); - printer->Indent(); - - printer->Print(variables_, - "for (int i = 0; i < $name$_.size(); i++) {\n" - " dataSize += com.google.protobuf.CodedOutputStream\n" - " .computeBytesSizeNoTag($name$_.getByteString(i));\n" - "}\n"); - - printer->Print( - "size += dataSize;\n"); - - if (descriptor_->options().packed()) { - printer->Print(variables_, - "if (!get$capitalized_name$List().isEmpty()) {\n" - " size += $tag_size$;\n" - " size += com.google.protobuf.CodedOutputStream\n" - " .computeInt32SizeNoTag(dataSize);\n" - "}\n"); - } else { - printer->Print(variables_, - "size += $tag_size$ * get$capitalized_name$List().size();\n"); - } - - // cache the data size for packed fields. - if (descriptor_->options().packed()) { - printer->Print(variables_, - "$name$MemoizedSerializedSize = dataSize;\n"); - } - - printer->Outdent(); - printer->Print("}\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "result = result && get$capitalized_name$List()\n" - " .equals(other.get$capitalized_name$List());\n"); -} - -void RepeatedStringFieldGenerator:: -GenerateHashCode(io::Printer* printer) const { - printer->Print(variables_, - "if (get$capitalized_name$Count() > 0) {\n" - " hash = (37 * hash) + $constant_name$;\n" - " hash = (53 * hash) + get$capitalized_name$List().hashCode();\n" - "}\n"); -} - -string RepeatedStringFieldGenerator::GetBoxedType() const { - return "String"; -} - -} // namespace java -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.h deleted file mode 100644 index 8cb41469..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/java/java_string_field.h +++ /dev/null @@ -1,120 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Author: jonp@google.com (Jon Perlow) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_STRING_FIELD_H__ -#define GOOGLE_PROTOBUF_COMPILER_JAVA_STRING_FIELD_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace java { - -class StringFieldGenerator : public FieldGenerator { - public: - explicit StringFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~StringFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); -}; - -class RepeatedStringFieldGenerator : public FieldGenerator { - public: - explicit RepeatedStringFieldGenerator(const FieldDescriptor* descriptor, - int messageBitIndex, int builderBitIndex); - ~RepeatedStringFieldGenerator(); - - // implements FieldGenerator --------------------------------------- - int GetNumBitsForMessage() const; - int GetNumBitsForBuilder() const; - void GenerateInterfaceMembers(io::Printer* printer) const; - void GenerateMembers(io::Printer* printer) const; - void GenerateBuilderMembers(io::Printer* printer) const; - void GenerateInitializationCode(io::Printer* printer) const; - void GenerateBuilderClearCode(io::Printer* printer) const; - void GenerateMergingCode(io::Printer* printer) const; - void GenerateBuildingCode(io::Printer* printer) const; - void GenerateParsingCode(io::Printer* printer) const; - void GenerateParsingCodeFromPacked(io::Printer* printer) const; - void GenerateSerializationCode(io::Printer* printer) const; - void GenerateSerializedSizeCode(io::Printer* printer) const; - void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; - void GenerateEqualsCode(io::Printer* printer) const; - void GenerateHashCode(io::Printer* printer) const; - string GetBoxedType() const; - - private: - const FieldDescriptor* descriptor_; - map variables_; - const int messageBitIndex_; - const int builderBitIndex_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedStringFieldGenerator); -}; - -} // namespace java -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_STRING_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/main.cc deleted file mode 100644 index d9b0c3f9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/main.cc +++ /dev/null @@ -1,61 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include -#include -#include - - -int main(int argc, char* argv[]) { - - google::protobuf::compiler::CommandLineInterface cli; - cli.AllowPlugins("protoc-"); - - // Proto2 C++ - google::protobuf::compiler::cpp::CppGenerator cpp_generator; - cli.RegisterGenerator("--cpp_out", &cpp_generator, - "Generate C++ header and source."); - - // Proto2 Java - google::protobuf::compiler::java::JavaGenerator java_generator; - cli.RegisterGenerator("--java_out", &java_generator, - "Generate Java source file."); - - - // Proto2 Python - google::protobuf::compiler::python::Generator py_generator; - cli.RegisterGenerator("--python_out", &py_generator, - "Generate Python source file."); - - return cli.Run(argc, argv); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.cc deleted file mode 100644 index 5b76af25..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.cc +++ /dev/null @@ -1,231 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -// Returns the list of the names of files in all_files in the form of a -// comma-separated string. -string CommaSeparatedList(const vector all_files) { - vector names; - for (int i = 0; i < all_files.size(); i++) { - names.push_back(all_files[i]->name()); - } - return JoinStrings(names, ","); -} - -static const char* kFirstInsertionPointName = "first_mock_insertion_point"; -static const char* kSecondInsertionPointName = "second_mock_insertion_point"; -static const char* kFirstInsertionPoint = - "# @@protoc_insertion_point(first_mock_insertion_point) is here\n"; -static const char* kSecondInsertionPoint = - " # @@protoc_insertion_point(second_mock_insertion_point) is here\n"; - -MockCodeGenerator::MockCodeGenerator(const string& name) - : name_(name) {} - -MockCodeGenerator::~MockCodeGenerator() {} - -void MockCodeGenerator::ExpectGenerated( - const string& name, - const string& parameter, - const string& insertions, - const string& file, - const string& first_message_name, - const string& first_parsed_file_name, - const string& output_directory) { - string content; - ASSERT_TRUE(File::ReadFileToString( - output_directory + "/" + GetOutputFileName(name, file), &content)); - - vector lines; - SplitStringUsing(content, "\n", &lines); - - while (!lines.empty() && lines.back().empty()) { - lines.pop_back(); - } - for (int i = 0; i < lines.size(); i++) { - lines[i] += "\n"; - } - - vector insertion_list; - if (!insertions.empty()) { - SplitStringUsing(insertions, ",", &insertion_list); - } - - ASSERT_EQ(lines.size(), 3 + insertion_list.size() * 2); - EXPECT_EQ(GetOutputFileContent(name, parameter, file, - first_parsed_file_name, first_message_name), - lines[0]); - - EXPECT_EQ(kFirstInsertionPoint, lines[1 + insertion_list.size()]); - EXPECT_EQ(kSecondInsertionPoint, lines[2 + insertion_list.size() * 2]); - - for (int i = 0; i < insertion_list.size(); i++) { - EXPECT_EQ(GetOutputFileContent(insertion_list[i], "first_insert", - file, file, first_message_name), - lines[1 + i]); - // Second insertion point is indented, so the inserted text should - // automatically be indented too. - EXPECT_EQ(" " + GetOutputFileContent(insertion_list[i], "second_insert", - file, file, first_message_name), - lines[2 + insertion_list.size() + i]); - } -} - -bool MockCodeGenerator::Generate( - const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - for (int i = 0; i < file->message_type_count(); i++) { - if (HasPrefixString(file->message_type(i)->name(), "MockCodeGenerator_")) { - string command = StripPrefixString(file->message_type(i)->name(), - "MockCodeGenerator_"); - if (command == "Error") { - *error = "Saw message type MockCodeGenerator_Error."; - return false; - } else if (command == "Exit") { - cerr << "Saw message type MockCodeGenerator_Exit." << endl; - exit(123); - } else if (command == "Abort") { - cerr << "Saw message type MockCodeGenerator_Abort." << endl; - abort(); - } else { - GOOGLE_LOG(FATAL) << "Unknown MockCodeGenerator command: " << command; - } - } - } - - if (HasPrefixString(parameter, "insert=")) { - vector insert_into; - SplitStringUsing(StripPrefixString(parameter, "insert="), - ",", &insert_into); - - for (int i = 0; i < insert_into.size(); i++) { - { - scoped_ptr output( - context->OpenForInsert( - GetOutputFileName(insert_into[i], file), - kFirstInsertionPointName)); - io::Printer printer(output.get(), '$'); - printer.PrintRaw(GetOutputFileContent(name_, "first_insert", - file, context)); - if (printer.failed()) { - *error = "MockCodeGenerator detected write error."; - return false; - } - } - - { - scoped_ptr output( - context->OpenForInsert( - GetOutputFileName(insert_into[i], file), - kSecondInsertionPointName)); - io::Printer printer(output.get(), '$'); - printer.PrintRaw(GetOutputFileContent(name_, "second_insert", - file, context)); - if (printer.failed()) { - *error = "MockCodeGenerator detected write error."; - return false; - } - } - } - } else { - scoped_ptr output( - context->Open(GetOutputFileName(name_, file))); - - io::Printer printer(output.get(), '$'); - printer.PrintRaw(GetOutputFileContent(name_, parameter, - file, context)); - printer.PrintRaw(kFirstInsertionPoint); - printer.PrintRaw(kSecondInsertionPoint); - - if (printer.failed()) { - *error = "MockCodeGenerator detected write error."; - return false; - } - } - - return true; -} - -string MockCodeGenerator::GetOutputFileName(const string& generator_name, - const FileDescriptor* file) { - return GetOutputFileName(generator_name, file->name()); -} - -string MockCodeGenerator::GetOutputFileName(const string& generator_name, - const string& file) { - return file + ".MockCodeGenerator." + generator_name; -} - -string MockCodeGenerator::GetOutputFileContent( - const string& generator_name, - const string& parameter, - const FileDescriptor* file, - GeneratorContext *context) { - vector all_files; - context->ListParsedFiles(&all_files); - return GetOutputFileContent( - generator_name, parameter, file->name(), - CommaSeparatedList(all_files), - file->message_type_count() > 0 ? - file->message_type(0)->name() : "(none)"); -} - -string MockCodeGenerator::GetOutputFileContent( - const string& generator_name, - const string& parameter, - const string& file, - const string& parsed_file_list, - const string& first_message_name) { - return strings::Substitute("$0: $1, $2, $3, $4\n", - generator_name, parameter, file, - first_message_name, parsed_file_list); -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.h deleted file mode 100644 index 5c7942bd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/mock_code_generator.h +++ /dev/null @@ -1,113 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#ifndef GOOGLE_PROTOBUF_COMPILER_MOCK_CODE_GENERATOR_H__ -#define GOOGLE_PROTOBUF_COMPILER_MOCK_CODE_GENERATOR_H__ - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -// A mock CodeGenerator, used by command_line_interface_unittest. This is in -// its own file so that it can be used both directly and as a plugin. -// -// Generate() produces some output which can be checked by ExpectCalled(). The -// generator can run in a different process (e.g. a plugin). -// -// If the parameter is "insert=NAMES", the MockCodeGenerator will insert lines -// into the files generated by other MockCodeGenerators instead of creating -// its own file. NAMES is a comma-separated list of the names of those other -// MockCodeGenerators. -// -// MockCodeGenerator will also modify its behavior slightly if the input file -// contains a message type with one of the following names: -// MockCodeGenerator_Error: Causes Generate() to return false and set the -// error message to "Saw message type MockCodeGenerator_Error." -// MockCodeGenerator_Exit: Generate() prints "Saw message type -// MockCodeGenerator_Exit." to stderr and then calls exit(123). -// MockCodeGenerator_Abort: Generate() prints "Saw message type -// MockCodeGenerator_Abort." to stderr and then calls abort(). -class MockCodeGenerator : public CodeGenerator { - public: - MockCodeGenerator(const string& name); - virtual ~MockCodeGenerator(); - - // Expect (via gTest) that a MockCodeGenerator with the given name was called - // with the given parameters by inspecting the output location. - // - // |insertions| is a comma-separated list of names of MockCodeGenerators which - // should have inserted lines into this file. - // |parsed_file_list| is a comma-separated list of names of the files - // that are being compiled together in this run. - static void ExpectGenerated(const string& name, - const string& parameter, - const string& insertions, - const string& file, - const string& first_message_name, - const string& parsed_file_list, - const string& output_directory); - - // Get the name of the file which would be written by the given generator. - static string GetOutputFileName(const string& generator_name, - const FileDescriptor* file); - static string GetOutputFileName(const string& generator_name, - const string& file); - - // implements CodeGenerator ---------------------------------------- - - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const; - - private: - string name_; - - static string GetOutputFileContent(const string& generator_name, - const string& parameter, - const FileDescriptor* file, - GeneratorContext *context); - static string GetOutputFileContent(const string& generator_name, - const string& parameter, - const string& file, - const string& parsed_file_list, - const string& first_message_name); -}; - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_MOCK_CODE_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/package_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/package_info.h deleted file mode 100644 index b8971267..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/package_info.h +++ /dev/null @@ -1,64 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file exists solely to document the google::protobuf::compiler namespace. -// It is not compiled into anything, but it may be read by an automated -// documentation generator. - -namespace google { - -namespace protobuf { - -// Implementation of the Protocol Buffer compiler. -// -// This package contains code for parsing .proto files and generating code -// based on them. There are two reasons you might be interested in this -// package: -// - You want to parse .proto files at runtime. In this case, you should -// look at importer.h. Since this functionality is widely useful, it is -// included in the libprotobuf base library; you do not have to link against -// libprotoc. -// - You want to write a custom protocol compiler which generates different -// kinds of code, e.g. code in a different language which is not supported -// by the official compiler. For this purpose, command_line_interface.h -// provides you with a complete compiler front-end, so all you need to do -// is write a custom implementation of CodeGenerator and a trivial main() -// function. You can even make your compiler support the official languages -// in addition to your own. Since this functionality is only useful to those -// writing custom compilers, it is in a separate library called "libprotoc" -// which you will have to link against. -namespace compiler {} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.cc deleted file mode 100644 index 34317b1f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.cc +++ /dev/null @@ -1,1473 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Recursive descent FTW. - -#include -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -using internal::WireFormat; - -namespace { - -typedef hash_map TypeNameMap; - -TypeNameMap MakeTypeNameTable() { - TypeNameMap result; - - result["double" ] = FieldDescriptorProto::TYPE_DOUBLE; - result["float" ] = FieldDescriptorProto::TYPE_FLOAT; - result["uint64" ] = FieldDescriptorProto::TYPE_UINT64; - result["fixed64" ] = FieldDescriptorProto::TYPE_FIXED64; - result["fixed32" ] = FieldDescriptorProto::TYPE_FIXED32; - result["bool" ] = FieldDescriptorProto::TYPE_BOOL; - result["string" ] = FieldDescriptorProto::TYPE_STRING; - result["group" ] = FieldDescriptorProto::TYPE_GROUP; - - result["bytes" ] = FieldDescriptorProto::TYPE_BYTES; - result["uint32" ] = FieldDescriptorProto::TYPE_UINT32; - result["sfixed32"] = FieldDescriptorProto::TYPE_SFIXED32; - result["sfixed64"] = FieldDescriptorProto::TYPE_SFIXED64; - result["int32" ] = FieldDescriptorProto::TYPE_INT32; - result["int64" ] = FieldDescriptorProto::TYPE_INT64; - result["sint32" ] = FieldDescriptorProto::TYPE_SINT32; - result["sint64" ] = FieldDescriptorProto::TYPE_SINT64; - - return result; -} - -const TypeNameMap kTypeNames = MakeTypeNameTable(); - -} // anonymous namespace - -// Makes code slightly more readable. The meaning of "DO(foo)" is -// "Execute foo and fail if it fails.", where failure is indicated by -// returning false. -#define DO(STATEMENT) if (STATEMENT) {} else return false - -// =================================================================== - -Parser::Parser() - : input_(NULL), - error_collector_(NULL), - source_location_table_(NULL), - had_errors_(false), - require_syntax_identifier_(false), - stop_after_syntax_identifier_(false) { -} - -Parser::~Parser() { -} - -// =================================================================== - -inline bool Parser::LookingAt(const char* text) { - return input_->current().text == text; -} - -inline bool Parser::LookingAtType(io::Tokenizer::TokenType token_type) { - return input_->current().type == token_type; -} - -inline bool Parser::AtEnd() { - return LookingAtType(io::Tokenizer::TYPE_END); -} - -bool Parser::TryConsume(const char* text) { - if (LookingAt(text)) { - input_->Next(); - return true; - } else { - return false; - } -} - -bool Parser::Consume(const char* text, const char* error) { - if (TryConsume(text)) { - return true; - } else { - AddError(error); - return false; - } -} - -bool Parser::Consume(const char* text) { - if (TryConsume(text)) { - return true; - } else { - AddError("Expected \"" + string(text) + "\"."); - return false; - } -} - -bool Parser::ConsumeIdentifier(string* output, const char* error) { - if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - *output = input_->current().text; - input_->Next(); - return true; - } else { - AddError(error); - return false; - } -} - -bool Parser::ConsumeInteger(int* output, const char* error) { - if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - uint64 value = 0; - if (!io::Tokenizer::ParseInteger(input_->current().text, - kint32max, &value)) { - AddError("Integer out of range."); - // We still return true because we did, in fact, parse an integer. - } - *output = value; - input_->Next(); - return true; - } else { - AddError(error); - return false; - } -} - -bool Parser::ConsumeInteger64(uint64 max_value, uint64* output, - const char* error) { - if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - if (!io::Tokenizer::ParseInteger(input_->current().text, max_value, - output)) { - AddError("Integer out of range."); - // We still return true because we did, in fact, parse an integer. - *output = 0; - } - input_->Next(); - return true; - } else { - AddError(error); - return false; - } -} - -bool Parser::ConsumeNumber(double* output, const char* error) { - if (LookingAtType(io::Tokenizer::TYPE_FLOAT)) { - *output = io::Tokenizer::ParseFloat(input_->current().text); - input_->Next(); - return true; - } else if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - // Also accept integers. - uint64 value = 0; - if (!io::Tokenizer::ParseInteger(input_->current().text, - kuint64max, &value)) { - AddError("Integer out of range."); - // We still return true because we did, in fact, parse a number. - } - *output = value; - input_->Next(); - return true; - } else if (LookingAt("inf")) { - *output = numeric_limits::infinity(); - input_->Next(); - return true; - } else if (LookingAt("nan")) { - *output = numeric_limits::quiet_NaN(); - input_->Next(); - return true; - } else { - AddError(error); - return false; - } -} - -bool Parser::ConsumeString(string* output, const char* error) { - if (LookingAtType(io::Tokenizer::TYPE_STRING)) { - io::Tokenizer::ParseString(input_->current().text, output); - input_->Next(); - // Allow C++ like concatenation of adjacent string tokens. - while (LookingAtType(io::Tokenizer::TYPE_STRING)) { - io::Tokenizer::ParseStringAppend(input_->current().text, output); - input_->Next(); - } - return true; - } else { - AddError(error); - return false; - } -} - -// ------------------------------------------------------------------- - -void Parser::AddError(int line, int column, const string& error) { - if (error_collector_ != NULL) { - error_collector_->AddError(line, column, error); - } - had_errors_ = true; -} - -void Parser::AddError(const string& error) { - AddError(input_->current().line, input_->current().column, error); -} - -// ------------------------------------------------------------------- - -Parser::LocationRecorder::LocationRecorder(Parser* parser) - : parser_(parser), - location_(parser_->source_code_info_->add_location()) { - location_->add_span(parser_->input_->current().line); - location_->add_span(parser_->input_->current().column); -} - -Parser::LocationRecorder::LocationRecorder(const LocationRecorder& parent) { - Init(parent); -} - -Parser::LocationRecorder::LocationRecorder(const LocationRecorder& parent, - int path1) { - Init(parent); - AddPath(path1); -} - -Parser::LocationRecorder::LocationRecorder(const LocationRecorder& parent, - int path1, int path2) { - Init(parent); - AddPath(path1); - AddPath(path2); -} - -void Parser::LocationRecorder::Init(const LocationRecorder& parent) { - parser_ = parent.parser_; - location_ = parser_->source_code_info_->add_location(); - location_->mutable_path()->CopyFrom(parent.location_->path()); - - location_->add_span(parser_->input_->current().line); - location_->add_span(parser_->input_->current().column); -} - -Parser::LocationRecorder::~LocationRecorder() { - if (location_->span_size() <= 2) { - EndAt(parser_->input_->previous()); - } -} - -void Parser::LocationRecorder::AddPath(int path_component) { - location_->add_path(path_component); -} - -void Parser::LocationRecorder::StartAt(const io::Tokenizer::Token& token) { - location_->set_span(0, token.line); - location_->set_span(1, token.column); -} - -void Parser::LocationRecorder::EndAt(const io::Tokenizer::Token& token) { - if (token.line != location_->span(0)) { - location_->add_span(token.line); - } - location_->add_span(token.end_column); -} - -void Parser::LocationRecorder::RecordLegacyLocation(const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location) { - if (parser_->source_location_table_ != NULL) { - parser_->source_location_table_->Add( - descriptor, location, location_->span(0), location_->span(1)); - } -} - -// ------------------------------------------------------------------- - -void Parser::SkipStatement() { - while (true) { - if (AtEnd()) { - return; - } else if (LookingAtType(io::Tokenizer::TYPE_SYMBOL)) { - if (TryConsume(";")) { - return; - } else if (TryConsume("{")) { - SkipRestOfBlock(); - return; - } else if (LookingAt("}")) { - return; - } - } - input_->Next(); - } -} - -void Parser::SkipRestOfBlock() { - while (true) { - if (AtEnd()) { - return; - } else if (LookingAtType(io::Tokenizer::TYPE_SYMBOL)) { - if (TryConsume("}")) { - return; - } else if (TryConsume("{")) { - SkipRestOfBlock(); - } - } - input_->Next(); - } -} - -// =================================================================== - -bool Parser::Parse(io::Tokenizer* input, FileDescriptorProto* file) { - input_ = input; - had_errors_ = false; - syntax_identifier_.clear(); - - // Note that |file| could be NULL at this point if - // stop_after_syntax_identifier_ is true. So, we conservatively allocate - // SourceCodeInfo on the stack, then swap it into the FileDescriptorProto - // later on. - SourceCodeInfo source_code_info; - source_code_info_ = &source_code_info; - - if (LookingAtType(io::Tokenizer::TYPE_START)) { - // Advance to first token. - input_->Next(); - } - - { - LocationRecorder root_location(this); - - if (require_syntax_identifier_ || LookingAt("syntax")) { - if (!ParseSyntaxIdentifier()) { - // Don't attempt to parse the file if we didn't recognize the syntax - // identifier. - return false; - } - } else if (!stop_after_syntax_identifier_) { - syntax_identifier_ = "proto2"; - } - - if (stop_after_syntax_identifier_) return !had_errors_; - - // Repeatedly parse statements until we reach the end of the file. - while (!AtEnd()) { - if (!ParseTopLevelStatement(file, root_location)) { - // This statement failed to parse. Skip it, but keep looping to parse - // other statements. - SkipStatement(); - - if (LookingAt("}")) { - AddError("Unmatched \"}\"."); - input_->Next(); - } - } - } - } - - input_ = NULL; - source_code_info_ = NULL; - source_code_info.Swap(file->mutable_source_code_info()); - return !had_errors_; -} - -bool Parser::ParseSyntaxIdentifier() { - DO(Consume("syntax", "File must begin with 'syntax = \"proto2\";'.")); - DO(Consume("=")); - io::Tokenizer::Token syntax_token = input_->current(); - string syntax; - DO(ConsumeString(&syntax, "Expected syntax identifier.")); - DO(Consume(";")); - - syntax_identifier_ = syntax; - - if (syntax != "proto2" && !stop_after_syntax_identifier_) { - AddError(syntax_token.line, syntax_token.column, - "Unrecognized syntax identifier \"" + syntax + "\". This parser " - "only recognizes \"proto2\"."); - return false; - } - - return true; -} - -bool Parser::ParseTopLevelStatement(FileDescriptorProto* file, - const LocationRecorder& root_location) { - if (TryConsume(";")) { - // empty statement; ignore - return true; - } else if (LookingAt("message")) { - LocationRecorder location(root_location, - FileDescriptorProto::kMessageTypeFieldNumber, file->message_type_size()); - return ParseMessageDefinition(file->add_message_type(), location); - } else if (LookingAt("enum")) { - LocationRecorder location(root_location, - FileDescriptorProto::kEnumTypeFieldNumber, file->enum_type_size()); - return ParseEnumDefinition(file->add_enum_type(), location); - } else if (LookingAt("service")) { - LocationRecorder location(root_location, - FileDescriptorProto::kServiceFieldNumber, file->service_size()); - return ParseServiceDefinition(file->add_service(), location); - } else if (LookingAt("extend")) { - LocationRecorder location(root_location, - FileDescriptorProto::kExtensionFieldNumber); - return ParseExtend(file->mutable_extension(), - file->mutable_message_type(), - root_location, - FileDescriptorProto::kMessageTypeFieldNumber, - location); - } else if (LookingAt("import")) { - int index = file->dependency_size(); - return ParseImport(file->add_dependency(), root_location, index); - } else if (LookingAt("package")) { - return ParsePackage(file, root_location); - } else if (LookingAt("option")) { - LocationRecorder location(root_location, - FileDescriptorProto::kOptionsFieldNumber); - return ParseOption(file->mutable_options(), location); - } else { - AddError("Expected top-level statement (e.g. \"message\")."); - return false; - } -} - -// ------------------------------------------------------------------- -// Messages - -bool Parser::ParseMessageDefinition(DescriptorProto* message, - const LocationRecorder& message_location) { - DO(Consume("message")); - { - LocationRecorder location(message_location, - DescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation( - message, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(message->mutable_name(), "Expected message name.")); - } - DO(ParseMessageBlock(message, message_location)); - return true; -} - -bool Parser::ParseMessageBlock(DescriptorProto* message, - const LocationRecorder& message_location) { - DO(Consume("{")); - - while (!TryConsume("}")) { - if (AtEnd()) { - AddError("Reached end of input in message definition (missing '}')."); - return false; - } - - if (!ParseMessageStatement(message, message_location)) { - // This statement failed to parse. Skip it, but keep looping to parse - // other statements. - SkipStatement(); - } - } - - return true; -} - -bool Parser::ParseMessageStatement(DescriptorProto* message, - const LocationRecorder& message_location) { - if (TryConsume(";")) { - // empty statement; ignore - return true; - } else if (LookingAt("message")) { - LocationRecorder location(message_location, - DescriptorProto::kNestedTypeFieldNumber, - message->nested_type_size()); - return ParseMessageDefinition(message->add_nested_type(), location); - } else if (LookingAt("enum")) { - LocationRecorder location(message_location, - DescriptorProto::kEnumTypeFieldNumber, - message->enum_type_size()); - return ParseEnumDefinition(message->add_enum_type(), location); - } else if (LookingAt("extensions")) { - LocationRecorder location(message_location, - DescriptorProto::kExtensionRangeFieldNumber); - return ParseExtensions(message, location); - } else if (LookingAt("extend")) { - LocationRecorder location(message_location, - DescriptorProto::kExtensionFieldNumber); - return ParseExtend(message->mutable_extension(), - message->mutable_nested_type(), - message_location, - DescriptorProto::kNestedTypeFieldNumber, - location); - } else if (LookingAt("option")) { - LocationRecorder location(message_location, - DescriptorProto::kOptionsFieldNumber); - return ParseOption(message->mutable_options(), location); - } else { - LocationRecorder location(message_location, - DescriptorProto::kFieldFieldNumber, - message->field_size()); - return ParseMessageField(message->add_field(), - message->mutable_nested_type(), - message_location, - DescriptorProto::kNestedTypeFieldNumber, - location); - } -} - -bool Parser::ParseMessageField(FieldDescriptorProto* field, - RepeatedPtrField* messages, - const LocationRecorder& parent_location, - int location_field_number_for_nested_type, - const LocationRecorder& field_location) { - // Parse label and type. - io::Tokenizer::Token label_token = input_->current(); - { - LocationRecorder location(field_location, - FieldDescriptorProto::kLabelFieldNumber); - FieldDescriptorProto::Label label; - DO(ParseLabel(&label)); - field->set_label(label); - } - - { - LocationRecorder location(field_location); // add path later - location.RecordLegacyLocation(field, DescriptorPool::ErrorCollector::TYPE); - - FieldDescriptorProto::Type type = FieldDescriptorProto::TYPE_INT32; - string type_name; - DO(ParseType(&type, &type_name)); - if (type_name.empty()) { - location.AddPath(FieldDescriptorProto::kTypeFieldNumber); - field->set_type(type); - } else { - location.AddPath(FieldDescriptorProto::kTypeNameFieldNumber); - field->set_type_name(type_name); - } - } - - // Parse name and '='. - io::Tokenizer::Token name_token = input_->current(); - { - LocationRecorder location(field_location, - FieldDescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation(field, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(field->mutable_name(), "Expected field name.")); - } - DO(Consume("=", "Missing field number.")); - - // Parse field number. - { - LocationRecorder location(field_location, - FieldDescriptorProto::kNumberFieldNumber); - location.RecordLegacyLocation( - field, DescriptorPool::ErrorCollector::NUMBER); - int number; - DO(ConsumeInteger(&number, "Expected field number.")); - field->set_number(number); - } - - // Parse options. - DO(ParseFieldOptions(field, field_location)); - - // Deal with groups. - if (field->has_type() && field->type() == FieldDescriptorProto::TYPE_GROUP) { - // Awkward: Since a group declares both a message type and a field, we - // have to create overlapping locations. - LocationRecorder group_location(parent_location); - group_location.StartAt(label_token); - group_location.AddPath(location_field_number_for_nested_type); - group_location.AddPath(messages->size()); - - DescriptorProto* group = messages->Add(); - group->set_name(field->name()); - - // Record name location to match the field name's location. - { - LocationRecorder location(group_location, - DescriptorProto::kNameFieldNumber); - location.StartAt(name_token); - location.EndAt(name_token); - location.RecordLegacyLocation( - group, DescriptorPool::ErrorCollector::NAME); - } - - // The field's type_name also comes from the name. Confusing! - { - LocationRecorder location(field_location, - FieldDescriptorProto::kTypeNameFieldNumber); - location.StartAt(name_token); - location.EndAt(name_token); - } - - // As a hack for backwards-compatibility, we force the group name to start - // with a capital letter and lower-case the field name. New code should - // not use groups; it should use nested messages. - if (group->name()[0] < 'A' || 'Z' < group->name()[0]) { - AddError(name_token.line, name_token.column, - "Group names must start with a capital letter."); - } - LowerString(field->mutable_name()); - - field->set_type_name(group->name()); - if (LookingAt("{")) { - DO(ParseMessageBlock(group, group_location)); - } else { - AddError("Missing group body."); - return false; - } - } else { - DO(Consume(";")); - } - - return true; -} - -bool Parser::ParseFieldOptions(FieldDescriptorProto* field, - const LocationRecorder& field_location) { - if (!LookingAt("[")) return true; - - LocationRecorder location(field_location, - FieldDescriptorProto::kOptionsFieldNumber); - - DO(Consume("[")); - - // Parse field options. - do { - if (LookingAt("default")) { - // We intentionally pass field_location rather than location here, since - // the default value is not actually an option. - DO(ParseDefaultAssignment(field, field_location)); - } else { - DO(ParseOptionAssignment(field->mutable_options(), location)); - } - } while (TryConsume(",")); - - DO(Consume("]")); - return true; -} - -bool Parser::ParseDefaultAssignment(FieldDescriptorProto* field, - const LocationRecorder& field_location) { - if (field->has_default_value()) { - AddError("Already set option \"default\"."); - field->clear_default_value(); - } - - DO(Consume("default")); - DO(Consume("=")); - - LocationRecorder location(field_location, - FieldDescriptorProto::kDefaultValueFieldNumber); - location.RecordLegacyLocation( - field, DescriptorPool::ErrorCollector::DEFAULT_VALUE); - string* default_value = field->mutable_default_value(); - - if (!field->has_type()) { - // The field has a type name, but we don't know if it is a message or an - // enum yet. Assume an enum for now. - DO(ConsumeIdentifier(default_value, "Expected identifier.")); - return true; - } - - switch (field->type()) { - case FieldDescriptorProto::TYPE_INT32: - case FieldDescriptorProto::TYPE_INT64: - case FieldDescriptorProto::TYPE_SINT32: - case FieldDescriptorProto::TYPE_SINT64: - case FieldDescriptorProto::TYPE_SFIXED32: - case FieldDescriptorProto::TYPE_SFIXED64: { - uint64 max_value = kint64max; - if (field->type() == FieldDescriptorProto::TYPE_INT32 || - field->type() == FieldDescriptorProto::TYPE_SINT32 || - field->type() == FieldDescriptorProto::TYPE_SFIXED32) { - max_value = kint32max; - } - - // These types can be negative. - if (TryConsume("-")) { - default_value->append("-"); - // Two's complement always has one more negative value than positive. - ++max_value; - } - // Parse the integer to verify that it is not out-of-range. - uint64 value; - DO(ConsumeInteger64(max_value, &value, "Expected integer.")); - // And stringify it again. - default_value->append(SimpleItoa(value)); - break; - } - - case FieldDescriptorProto::TYPE_UINT32: - case FieldDescriptorProto::TYPE_UINT64: - case FieldDescriptorProto::TYPE_FIXED32: - case FieldDescriptorProto::TYPE_FIXED64: { - uint64 max_value = kuint64max; - if (field->type() == FieldDescriptorProto::TYPE_UINT32 || - field->type() == FieldDescriptorProto::TYPE_FIXED32) { - max_value = kuint32max; - } - - // Numeric, not negative. - if (TryConsume("-")) { - AddError("Unsigned field can't have negative default value."); - } - // Parse the integer to verify that it is not out-of-range. - uint64 value; - DO(ConsumeInteger64(max_value, &value, "Expected integer.")); - // And stringify it again. - default_value->append(SimpleItoa(value)); - break; - } - - case FieldDescriptorProto::TYPE_FLOAT: - case FieldDescriptorProto::TYPE_DOUBLE: - // These types can be negative. - if (TryConsume("-")) { - default_value->append("-"); - } - // Parse the integer because we have to convert hex integers to decimal - // floats. - double value; - DO(ConsumeNumber(&value, "Expected number.")); - // And stringify it again. - default_value->append(SimpleDtoa(value)); - break; - - case FieldDescriptorProto::TYPE_BOOL: - if (TryConsume("true")) { - default_value->assign("true"); - } else if (TryConsume("false")) { - default_value->assign("false"); - } else { - AddError("Expected \"true\" or \"false\"."); - return false; - } - break; - - case FieldDescriptorProto::TYPE_STRING: - DO(ConsumeString(default_value, "Expected string.")); - break; - - case FieldDescriptorProto::TYPE_BYTES: - DO(ConsumeString(default_value, "Expected string.")); - *default_value = CEscape(*default_value); - break; - - case FieldDescriptorProto::TYPE_ENUM: - DO(ConsumeIdentifier(default_value, "Expected identifier.")); - break; - - case FieldDescriptorProto::TYPE_MESSAGE: - case FieldDescriptorProto::TYPE_GROUP: - AddError("Messages can't have default values."); - return false; - } - - return true; -} - -bool Parser::ParseOptionNamePart(UninterpretedOption* uninterpreted_option, - const LocationRecorder& part_location) { - UninterpretedOption::NamePart* name = uninterpreted_option->add_name(); - string identifier; // We parse identifiers into this string. - if (LookingAt("(")) { // This is an extension. - DO(Consume("(")); - - { - LocationRecorder location( - part_location, UninterpretedOption::NamePart::kNamePartFieldNumber); - // An extension name consists of dot-separated identifiers, and may begin - // with a dot. - if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - DO(ConsumeIdentifier(&identifier, "Expected identifier.")); - name->mutable_name_part()->append(identifier); - } - while (LookingAt(".")) { - DO(Consume(".")); - name->mutable_name_part()->append("."); - DO(ConsumeIdentifier(&identifier, "Expected identifier.")); - name->mutable_name_part()->append(identifier); - } - } - - DO(Consume(")")); - name->set_is_extension(true); - } else { // This is a regular field. - LocationRecorder location( - part_location, UninterpretedOption::NamePart::kNamePartFieldNumber); - DO(ConsumeIdentifier(&identifier, "Expected identifier.")); - name->mutable_name_part()->append(identifier); - name->set_is_extension(false); - } - return true; -} - -bool Parser::ParseUninterpretedBlock(string* value) { - // Note that enclosing braces are not added to *value. - DO(Consume("{")); - int brace_depth = 1; - while (!AtEnd()) { - if (LookingAt("{")) { - brace_depth++; - } else if (LookingAt("}")) { - brace_depth--; - if (brace_depth == 0) { - input_->Next(); - return true; - } - } - // TODO(sanjay): Interpret line/column numbers to preserve formatting - if (!value->empty()) value->push_back(' '); - value->append(input_->current().text); - input_->Next(); - } - AddError("Unexpected end of stream while parsing aggregate value."); - return false; -} - -// We don't interpret the option here. Instead we store it in an -// UninterpretedOption, to be interpreted later. -bool Parser::ParseOptionAssignment(Message* options, - const LocationRecorder& options_location) { - // Create an entry in the uninterpreted_option field. - const FieldDescriptor* uninterpreted_option_field = options->GetDescriptor()-> - FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(uninterpreted_option_field != NULL) - << "No field named \"uninterpreted_option\" in the Options proto."; - - const Reflection* reflection = options->GetReflection(); - - LocationRecorder location( - options_location, uninterpreted_option_field->number(), - reflection->FieldSize(*options, uninterpreted_option_field)); - - UninterpretedOption* uninterpreted_option = down_cast( - options->GetReflection()->AddMessage(options, - uninterpreted_option_field)); - - // Parse dot-separated name. - { - LocationRecorder name_location(location, - UninterpretedOption::kNameFieldNumber); - name_location.RecordLegacyLocation( - uninterpreted_option, DescriptorPool::ErrorCollector::OPTION_NAME); - - { - LocationRecorder part_location(name_location, - uninterpreted_option->name_size()); - DO(ParseOptionNamePart(uninterpreted_option, part_location)); - } - - while (LookingAt(".")) { - DO(Consume(".")); - LocationRecorder part_location(name_location, - uninterpreted_option->name_size()); - DO(ParseOptionNamePart(uninterpreted_option, part_location)); - } - } - - DO(Consume("=")); - - LocationRecorder value_location(location); - value_location.RecordLegacyLocation( - uninterpreted_option, DescriptorPool::ErrorCollector::OPTION_VALUE); - - // All values are a single token, except for negative numbers, which consist - // of a single '-' symbol, followed by a positive number. - bool is_negative = TryConsume("-"); - - switch (input_->current().type) { - case io::Tokenizer::TYPE_START: - GOOGLE_LOG(FATAL) << "Trying to read value before any tokens have been read."; - return false; - - case io::Tokenizer::TYPE_END: - AddError("Unexpected end of stream while parsing option value."); - return false; - - case io::Tokenizer::TYPE_IDENTIFIER: { - value_location.AddPath(UninterpretedOption::kIdentifierValueFieldNumber); - if (is_negative) { - AddError("Invalid '-' symbol before identifier."); - return false; - } - string value; - DO(ConsumeIdentifier(&value, "Expected identifier.")); - uninterpreted_option->set_identifier_value(value); - break; - } - - case io::Tokenizer::TYPE_INTEGER: { - uint64 value; - uint64 max_value = - is_negative ? static_cast(kint64max) + 1 : kuint64max; - DO(ConsumeInteger64(max_value, &value, "Expected integer.")); - if (is_negative) { - value_location.AddPath( - UninterpretedOption::kNegativeIntValueFieldNumber); - uninterpreted_option->set_negative_int_value(-static_cast(value)); - } else { - value_location.AddPath( - UninterpretedOption::kPositiveIntValueFieldNumber); - uninterpreted_option->set_positive_int_value(value); - } - break; - } - - case io::Tokenizer::TYPE_FLOAT: { - value_location.AddPath(UninterpretedOption::kDoubleValueFieldNumber); - double value; - DO(ConsumeNumber(&value, "Expected number.")); - uninterpreted_option->set_double_value(is_negative ? -value : value); - break; - } - - case io::Tokenizer::TYPE_STRING: { - value_location.AddPath(UninterpretedOption::kStringValueFieldNumber); - if (is_negative) { - AddError("Invalid '-' symbol before string."); - return false; - } - string value; - DO(ConsumeString(&value, "Expected string.")); - uninterpreted_option->set_string_value(value); - break; - } - - case io::Tokenizer::TYPE_SYMBOL: - if (LookingAt("{")) { - value_location.AddPath(UninterpretedOption::kAggregateValueFieldNumber); - DO(ParseUninterpretedBlock( - uninterpreted_option->mutable_aggregate_value())); - } else { - AddError("Expected option value."); - return false; - } - break; - } - - return true; -} - -bool Parser::ParseExtensions(DescriptorProto* message, - const LocationRecorder& extensions_location) { - // Parse the declaration. - DO(Consume("extensions")); - - do { - // Note that kExtensionRangeFieldNumber was already pushed by the parent. - LocationRecorder location(extensions_location, - message->extension_range_size()); - - DescriptorProto::ExtensionRange* range = message->add_extension_range(); - location.RecordLegacyLocation( - range, DescriptorPool::ErrorCollector::NUMBER); - - int start, end; - io::Tokenizer::Token start_token; - - { - LocationRecorder start_location( - location, DescriptorProto::ExtensionRange::kStartFieldNumber); - start_token = input_->current(); - DO(ConsumeInteger(&start, "Expected field number range.")); - } - - if (TryConsume("to")) { - LocationRecorder end_location( - location, DescriptorProto::ExtensionRange::kEndFieldNumber); - if (TryConsume("max")) { - end = FieldDescriptor::kMaxNumber; - } else { - DO(ConsumeInteger(&end, "Expected integer.")); - } - } else { - LocationRecorder end_location( - location, DescriptorProto::ExtensionRange::kEndFieldNumber); - end_location.StartAt(start_token); - end_location.EndAt(start_token); - end = start; - } - - // Users like to specify inclusive ranges, but in code we like the end - // number to be exclusive. - ++end; - - range->set_start(start); - range->set_end(end); - } while (TryConsume(",")); - - DO(Consume(";")); - return true; -} - -bool Parser::ParseExtend(RepeatedPtrField* extensions, - RepeatedPtrField* messages, - const LocationRecorder& parent_location, - int location_field_number_for_nested_type, - const LocationRecorder& extend_location) { - DO(Consume("extend")); - - // Parse the extendee type. - io::Tokenizer::Token extendee_start = input_->current(); - string extendee; - DO(ParseUserDefinedType(&extendee)); - io::Tokenizer::Token extendee_end = input_->previous(); - - // Parse the block. - DO(Consume("{")); - - bool is_first = true; - - do { - if (AtEnd()) { - AddError("Reached end of input in extend definition (missing '}')."); - return false; - } - - // Note that kExtensionFieldNumber was already pushed by the parent. - LocationRecorder location(extend_location, extensions->size()); - - FieldDescriptorProto* field = extensions->Add(); - - { - LocationRecorder extendee_location( - location, FieldDescriptorProto::kExtendeeFieldNumber); - extendee_location.StartAt(extendee_start); - extendee_location.EndAt(extendee_end); - - if (is_first) { - extendee_location.RecordLegacyLocation( - field, DescriptorPool::ErrorCollector::EXTENDEE); - is_first = false; - } - } - - field->set_extendee(extendee); - - if (!ParseMessageField(field, messages, parent_location, - location_field_number_for_nested_type, - location)) { - // This statement failed to parse. Skip it, but keep looping to parse - // other statements. - SkipStatement(); - } - } while(!TryConsume("}")); - - return true; -} - -// ------------------------------------------------------------------- -// Enums - -bool Parser::ParseEnumDefinition(EnumDescriptorProto* enum_type, - const LocationRecorder& enum_location) { - DO(Consume("enum")); - - { - LocationRecorder location(enum_location, - EnumDescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation( - enum_type, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(enum_type->mutable_name(), "Expected enum name.")); - } - - DO(ParseEnumBlock(enum_type, enum_location)); - return true; -} - -bool Parser::ParseEnumBlock(EnumDescriptorProto* enum_type, - const LocationRecorder& enum_location) { - DO(Consume("{")); - - while (!TryConsume("}")) { - if (AtEnd()) { - AddError("Reached end of input in enum definition (missing '}')."); - return false; - } - - if (!ParseEnumStatement(enum_type, enum_location)) { - // This statement failed to parse. Skip it, but keep looping to parse - // other statements. - SkipStatement(); - } - } - - return true; -} - -bool Parser::ParseEnumStatement(EnumDescriptorProto* enum_type, - const LocationRecorder& enum_location) { - if (TryConsume(";")) { - // empty statement; ignore - return true; - } else if (LookingAt("option")) { - LocationRecorder location(enum_location, - EnumDescriptorProto::kOptionsFieldNumber); - return ParseOption(enum_type->mutable_options(), location); - } else { - LocationRecorder location(enum_location, - EnumDescriptorProto::kValueFieldNumber, enum_type->value_size()); - return ParseEnumConstant(enum_type->add_value(), location); - } -} - -bool Parser::ParseEnumConstant(EnumValueDescriptorProto* enum_value, - const LocationRecorder& enum_value_location) { - // Parse name. - { - LocationRecorder location(enum_value_location, - EnumValueDescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation( - enum_value, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(enum_value->mutable_name(), - "Expected enum constant name.")); - } - - DO(Consume("=", "Missing numeric value for enum constant.")); - - // Parse value. - { - LocationRecorder location( - enum_value_location, EnumValueDescriptorProto::kNumberFieldNumber); - location.RecordLegacyLocation( - enum_value, DescriptorPool::ErrorCollector::NUMBER); - - bool is_negative = TryConsume("-"); - int number; - DO(ConsumeInteger(&number, "Expected integer.")); - if (is_negative) number *= -1; - enum_value->set_number(number); - } - - DO(ParseEnumConstantOptions(enum_value, enum_value_location)); - - DO(Consume(";")); - - return true; -} - -bool Parser::ParseEnumConstantOptions( - EnumValueDescriptorProto* value, - const LocationRecorder& enum_value_location) { - if (!LookingAt("[")) return true; - - LocationRecorder location( - enum_value_location, EnumValueDescriptorProto::kOptionsFieldNumber); - - DO(Consume("[")); - - do { - DO(ParseOptionAssignment(value->mutable_options(), location)); - } while (TryConsume(",")); - - DO(Consume("]")); - return true; -} - -// ------------------------------------------------------------------- -// Services - -bool Parser::ParseServiceDefinition(ServiceDescriptorProto* service, - const LocationRecorder& service_location) { - DO(Consume("service")); - - { - LocationRecorder location(service_location, - ServiceDescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation( - service, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(service->mutable_name(), "Expected service name.")); - } - - DO(ParseServiceBlock(service, service_location)); - return true; -} - -bool Parser::ParseServiceBlock(ServiceDescriptorProto* service, - const LocationRecorder& service_location) { - DO(Consume("{")); - - while (!TryConsume("}")) { - if (AtEnd()) { - AddError("Reached end of input in service definition (missing '}')."); - return false; - } - - if (!ParseServiceStatement(service, service_location)) { - // This statement failed to parse. Skip it, but keep looping to parse - // other statements. - SkipStatement(); - } - } - - return true; -} - -bool Parser::ParseServiceStatement(ServiceDescriptorProto* service, - const LocationRecorder& service_location) { - if (TryConsume(";")) { - // empty statement; ignore - return true; - } else if (LookingAt("option")) { - LocationRecorder location( - service_location, ServiceDescriptorProto::kOptionsFieldNumber); - return ParseOption(service->mutable_options(), location); - } else { - LocationRecorder location(service_location, - ServiceDescriptorProto::kMethodFieldNumber, service->method_size()); - return ParseServiceMethod(service->add_method(), location); - } -} - -bool Parser::ParseServiceMethod(MethodDescriptorProto* method, - const LocationRecorder& method_location) { - DO(Consume("rpc")); - - { - LocationRecorder location(method_location, - MethodDescriptorProto::kNameFieldNumber); - location.RecordLegacyLocation( - method, DescriptorPool::ErrorCollector::NAME); - DO(ConsumeIdentifier(method->mutable_name(), "Expected method name.")); - } - - // Parse input type. - DO(Consume("(")); - { - LocationRecorder location(method_location, - MethodDescriptorProto::kInputTypeFieldNumber); - location.RecordLegacyLocation( - method, DescriptorPool::ErrorCollector::INPUT_TYPE); - DO(ParseUserDefinedType(method->mutable_input_type())); - } - DO(Consume(")")); - - // Parse output type. - DO(Consume("returns")); - DO(Consume("(")); - { - LocationRecorder location(method_location, - MethodDescriptorProto::kOutputTypeFieldNumber); - location.RecordLegacyLocation( - method, DescriptorPool::ErrorCollector::OUTPUT_TYPE); - DO(ParseUserDefinedType(method->mutable_output_type())); - } - DO(Consume(")")); - - if (TryConsume("{")) { - // Options! - while (!TryConsume("}")) { - if (AtEnd()) { - AddError("Reached end of input in method options (missing '}')."); - return false; - } - - if (TryConsume(";")) { - // empty statement; ignore - } else { - LocationRecorder location(method_location, - MethodDescriptorProto::kOptionsFieldNumber); - if (!ParseOption(method->mutable_options(), location)) { - // This statement failed to parse. Skip it, but keep looping to - // parse other statements. - SkipStatement(); - } - } - } - } else { - DO(Consume(";")); - } - - return true; -} - -// ------------------------------------------------------------------- - -bool Parser::ParseLabel(FieldDescriptorProto::Label* label) { - if (TryConsume("optional")) { - *label = FieldDescriptorProto::LABEL_OPTIONAL; - return true; - } else if (TryConsume("repeated")) { - *label = FieldDescriptorProto::LABEL_REPEATED; - return true; - } else if (TryConsume("required")) { - *label = FieldDescriptorProto::LABEL_REQUIRED; - return true; - } else { - AddError("Expected \"required\", \"optional\", or \"repeated\"."); - // We can actually reasonably recover here by just assuming the user - // forgot the label altogether. - *label = FieldDescriptorProto::LABEL_OPTIONAL; - return true; - } -} - -bool Parser::ParseType(FieldDescriptorProto::Type* type, - string* type_name) { - TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text); - if (iter != kTypeNames.end()) { - *type = iter->second; - input_->Next(); - } else { - DO(ParseUserDefinedType(type_name)); - } - return true; -} - -bool Parser::ParseUserDefinedType(string* type_name) { - type_name->clear(); - - TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text); - if (iter != kTypeNames.end()) { - // Note: The only place enum types are allowed is for field types, but - // if we are parsing a field type then we would not get here because - // primitives are allowed there as well. So this error message doesn't - // need to account for enums. - AddError("Expected message type."); - - // Pretend to accept this type so that we can go on parsing. - *type_name = input_->current().text; - input_->Next(); - return true; - } - - // A leading "." means the name is fully-qualified. - if (TryConsume(".")) type_name->append("."); - - // Consume the first part of the name. - string identifier; - DO(ConsumeIdentifier(&identifier, "Expected type name.")); - type_name->append(identifier); - - // Consume more parts. - while (TryConsume(".")) { - type_name->append("."); - DO(ConsumeIdentifier(&identifier, "Expected identifier.")); - type_name->append(identifier); - } - - return true; -} - -// =================================================================== - -bool Parser::ParsePackage(FileDescriptorProto* file, - const LocationRecorder& root_location) { - if (file->has_package()) { - AddError("Multiple package definitions."); - // Don't append the new package to the old one. Just replace it. Not - // that it really matters since this is an error anyway. - file->clear_package(); - } - - DO(Consume("package")); - - { - LocationRecorder location(root_location, - FileDescriptorProto::kPackageFieldNumber); - location.RecordLegacyLocation(file, DescriptorPool::ErrorCollector::NAME); - - while (true) { - string identifier; - DO(ConsumeIdentifier(&identifier, "Expected identifier.")); - file->mutable_package()->append(identifier); - if (!TryConsume(".")) break; - file->mutable_package()->append("."); - } - } - - DO(Consume(";")); - return true; -} - -bool Parser::ParseImport(string* import_filename, - const LocationRecorder& root_location, - int index) { - DO(Consume("import")); - { - LocationRecorder location(root_location, - FileDescriptorProto::kDependencyFieldNumber, - index); - DO(ConsumeString(import_filename, - "Expected a string naming the file to import.")); - } - DO(Consume(";")); - return true; -} - -bool Parser::ParseOption(Message* options, - const LocationRecorder& options_location) { - DO(Consume("option")); - DO(ParseOptionAssignment(options, options_location)); - DO(Consume(";")); - return true; -} - -// =================================================================== - -SourceLocationTable::SourceLocationTable() {} -SourceLocationTable::~SourceLocationTable() {} - -bool SourceLocationTable::Find( - const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - int* line, int* column) const { - const pair* result = - FindOrNull(location_map_, make_pair(descriptor, location)); - if (result == NULL) { - *line = -1; - *column = 0; - return false; - } else { - *line = result->first; - *column = result->second; - return true; - } -} - -void SourceLocationTable::Add( - const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - int line, int column) { - location_map_[make_pair(descriptor, location)] = make_pair(line, column); -} - -void SourceLocationTable::Clear() { - location_map_.clear(); -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.h deleted file mode 100644 index 4cc90a29..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser.h +++ /dev/null @@ -1,434 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Implements parsing of .proto files to FileDescriptorProtos. - -#ifndef GOOGLE_PROTOBUF_COMPILER_PARSER_H__ -#define GOOGLE_PROTOBUF_COMPILER_PARSER_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { class Message; } - -namespace protobuf { -namespace compiler { - -// Defined in this file. -class Parser; -class SourceLocationTable; - -// Implements parsing of protocol definitions (such as .proto files). -// -// Note that most users will be more interested in the Importer class. -// Parser is a lower-level class which simply converts a single .proto file -// to a FileDescriptorProto. It does not resolve import directives or perform -// many other kinds of validation needed to construct a complete -// FileDescriptor. -class LIBPROTOBUF_EXPORT Parser { - public: - Parser(); - ~Parser(); - - // Parse the entire input and construct a FileDescriptorProto representing - // it. Returns true if no errors occurred, false otherwise. - bool Parse(io::Tokenizer* input, FileDescriptorProto* file); - - // Optional fetaures: - - // DEPRECATED: New code should use the SourceCodeInfo embedded in the - // FileDescriptorProto. - // - // Requests that locations of certain definitions be recorded to the given - // SourceLocationTable while parsing. This can be used to look up exact line - // and column numbers for errors reported by DescriptorPool during validation. - // Set to NULL (the default) to discard source location information. - void RecordSourceLocationsTo(SourceLocationTable* location_table) { - source_location_table_ = location_table; - } - - // Requests that errors be recorded to the given ErrorCollector while - // parsing. Set to NULL (the default) to discard error messages. - void RecordErrorsTo(io::ErrorCollector* error_collector) { - error_collector_ = error_collector; - } - - // Returns the identifier used in the "syntax = " declaration, if one was - // seen during the last call to Parse(), or the empty string otherwise. - const string& GetSyntaxIdentifier() { return syntax_identifier_; } - - // If set true, input files will be required to begin with a syntax - // identifier. Otherwise, files may omit this. If a syntax identifier - // is provided, it must be 'syntax = "proto2";' and must appear at the - // top of this file regardless of whether or not it was required. - void SetRequireSyntaxIdentifier(bool value) { - require_syntax_identifier_ = value; - } - - // Call SetStopAfterSyntaxIdentifier(true) to tell the parser to stop - // parsing as soon as it has seen the syntax identifier, or lack thereof. - // This is useful for quickly identifying the syntax of the file without - // parsing the whole thing. If this is enabled, no error will be recorded - // if the syntax identifier is something other than "proto2" (since - // presumably the caller intends to deal with that), but other kinds of - // errors (e.g. parse errors) will still be reported. When this is enabled, - // you may pass a NULL FileDescriptorProto to Parse(). - void SetStopAfterSyntaxIdentifier(bool value) { - stop_after_syntax_identifier_ = value; - } - - private: - // ================================================================= - // Error recovery helpers - - // Consume the rest of the current statement. This consumes tokens - // until it sees one of: - // ';' Consumes the token and returns. - // '{' Consumes the brace then calls SkipRestOfBlock(). - // '}' Returns without consuming. - // EOF Returns (can't consume). - // The Parser often calls SkipStatement() after encountering a syntax - // error. This allows it to go on parsing the following lines, allowing - // it to report more than just one error in the file. - void SkipStatement(); - - // Consume the rest of the current block, including nested blocks, - // ending after the closing '}' is encountered and consumed, or at EOF. - void SkipRestOfBlock(); - - // ----------------------------------------------------------------- - // Single-token consuming helpers - // - // These make parsing code more readable. - - // True if the current token is TYPE_END. - inline bool AtEnd(); - - // True if the next token matches the given text. - inline bool LookingAt(const char* text); - // True if the next token is of the given type. - inline bool LookingAtType(io::Tokenizer::TokenType token_type); - - // If the next token exactly matches the text given, consume it and return - // true. Otherwise, return false without logging an error. - bool TryConsume(const char* text); - - // These attempt to read some kind of token from the input. If successful, - // they return true. Otherwise they return false and add the given error - // to the error list. - - // Consume a token with the exact text given. - bool Consume(const char* text, const char* error); - // Same as above, but automatically generates the error "Expected \"text\".", - // where "text" is the expected token text. - bool Consume(const char* text); - // Consume a token of type IDENTIFIER and store its text in "output". - bool ConsumeIdentifier(string* output, const char* error); - // Consume an integer and store its value in "output". - bool ConsumeInteger(int* output, const char* error); - // Consume a 64-bit integer and store its value in "output". If the value - // is greater than max_value, an error will be reported. - bool ConsumeInteger64(uint64 max_value, uint64* output, const char* error); - // Consume a number and store its value in "output". This will accept - // tokens of either INTEGER or FLOAT type. - bool ConsumeNumber(double* output, const char* error); - // Consume a string literal and store its (unescaped) value in "output". - bool ConsumeString(string* output, const char* error); - - // ----------------------------------------------------------------- - // Error logging helpers - - // Invokes error_collector_->AddError(), if error_collector_ is not NULL. - void AddError(int line, int column, const string& error); - - // Invokes error_collector_->AddError() with the line and column number - // of the current token. - void AddError(const string& error); - - // Records a location in the SourceCodeInfo.location table (see - // descriptor.proto). We use RAII to ensure that the start and end locations - // are recorded -- the constructor records the start location and the - // destructor records the end location. Since the parser is - // recursive-descent, this works out beautifully. - class LIBPROTOBUF_EXPORT LocationRecorder { - public: - // Construct the file's "root" location. - LocationRecorder(Parser* parser); - - // Construct a location that represents a declaration nested within the - // given parent. E.g. a field's location is nested within the location - // for a message type. The parent's path will be copied, so you should - // call AddPath() only to add the path components leading from the parent - // to the child (as opposed to leading from the root to the child). - LocationRecorder(const LocationRecorder& parent); - - // Convenience constructors that call AddPath() one or two times. - LocationRecorder(const LocationRecorder& parent, int path1); - LocationRecorder(const LocationRecorder& parent, int path1, int path2); - - ~LocationRecorder(); - - // Add a path component. See SourceCodeInfo.Location.path in - // descriptor.proto. - void AddPath(int path_component); - - // By default the location is considered to start at the current token at - // the time the LocationRecorder is created. StartAt() sets the start - // location to the given token instead. - void StartAt(const io::Tokenizer::Token& token); - - // By default the location is considered to end at the previous token at - // the time the LocationRecorder is destroyed. EndAt() sets the end - // location to the given token instead. - void EndAt(const io::Tokenizer::Token& token); - - // Records the start point of this location to the SourceLocationTable that - // was passed to RecordSourceLocationsTo(), if any. SourceLocationTable - // is an older way of keeping track of source locations which is still - // used in some places. - void RecordLegacyLocation(const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location); - - private: - Parser* parser_; - SourceCodeInfo::Location* location_; - - void Init(const LocationRecorder& parent); - }; - - // ================================================================= - // Parsers for various language constructs - - // Parses the "syntax = \"proto2\";" line at the top of the file. Returns - // false if it failed to parse or if the syntax identifier was not - // recognized. - bool ParseSyntaxIdentifier(); - - // These methods parse various individual bits of code. They return - // false if they completely fail to parse the construct. In this case, - // it is probably necessary to skip the rest of the statement to recover. - // However, if these methods return true, it does NOT mean that there - // were no errors; only that there were no *syntax* errors. For instance, - // if a service method is defined using proper syntax but uses a primitive - // type as its input or output, ParseMethodField() still returns true - // and only reports the error by calling AddError(). In practice, this - // makes logic much simpler for the caller. - - // Parse a top-level message, enum, service, etc. - bool ParseTopLevelStatement(FileDescriptorProto* file, - const LocationRecorder& root_location); - - // Parse various language high-level language construrcts. - bool ParseMessageDefinition(DescriptorProto* message, - const LocationRecorder& message_location); - bool ParseEnumDefinition(EnumDescriptorProto* enum_type, - const LocationRecorder& enum_location); - bool ParseServiceDefinition(ServiceDescriptorProto* service, - const LocationRecorder& service_location); - bool ParsePackage(FileDescriptorProto* file, - const LocationRecorder& root_location); - bool ParseImport(string* import_filename, - const LocationRecorder& root_location, - int index); - bool ParseOption(Message* options, - const LocationRecorder& options_location); - - // These methods parse the contents of a message, enum, or service type and - // add them to the given object. They consume the entire block including - // the beginning and ending brace. - bool ParseMessageBlock(DescriptorProto* message, - const LocationRecorder& message_location); - bool ParseEnumBlock(EnumDescriptorProto* enum_type, - const LocationRecorder& enum_location); - bool ParseServiceBlock(ServiceDescriptorProto* service, - const LocationRecorder& service_location); - - // Parse one statement within a message, enum, or service block, inclunding - // final semicolon. - bool ParseMessageStatement(DescriptorProto* message, - const LocationRecorder& message_location); - bool ParseEnumStatement(EnumDescriptorProto* message, - const LocationRecorder& enum_location); - bool ParseServiceStatement(ServiceDescriptorProto* message, - const LocationRecorder& service_location); - - // Parse a field of a message. If the field is a group, its type will be - // added to "messages". - // - // parent_location and location_field_number_for_nested_type are needed when - // parsing groups -- we need to generate a nested message type within the - // parent and record its location accordingly. Since the parent could be - // either a FileDescriptorProto or a DescriptorProto, we must pass in the - // correct field number to use. - bool ParseMessageField(FieldDescriptorProto* field, - RepeatedPtrField* messages, - const LocationRecorder& parent_location, - int location_field_number_for_nested_type, - const LocationRecorder& field_location); - - // Parse an "extensions" declaration. - bool ParseExtensions(DescriptorProto* message, - const LocationRecorder& extensions_location); - - // Parse an "extend" declaration. (See also comments for - // ParseMessageField().) - bool ParseExtend(RepeatedPtrField* extensions, - RepeatedPtrField* messages, - const LocationRecorder& parent_location, - int location_field_number_for_nested_type, - const LocationRecorder& extend_location); - - // Parse a single enum value within an enum block. - bool ParseEnumConstant(EnumValueDescriptorProto* enum_value, - const LocationRecorder& enum_value_location); - - // Parse enum constant options, i.e. the list in square brackets at the end - // of the enum constant value definition. - bool ParseEnumConstantOptions(EnumValueDescriptorProto* value, - const LocationRecorder& enum_value_location); - - // Parse a single method within a service definition. - bool ParseServiceMethod(MethodDescriptorProto* method, - const LocationRecorder& method_location); - - // Parse "required", "optional", or "repeated" and fill in "label" - // with the value. - bool ParseLabel(FieldDescriptorProto::Label* label); - - // Parse a type name and fill in "type" (if it is a primitive) or - // "type_name" (if it is not) with the type parsed. - bool ParseType(FieldDescriptorProto::Type* type, - string* type_name); - // Parse a user-defined type and fill in "type_name" with the name. - // If a primitive type is named, it is treated as an error. - bool ParseUserDefinedType(string* type_name); - - // Parses field options, i.e. the stuff in square brackets at the end - // of a field definition. Also parses default value. - bool ParseFieldOptions(FieldDescriptorProto* field, - const LocationRecorder& field_location); - - // Parse the "default" option. This needs special handling because its - // type is the field's type. - bool ParseDefaultAssignment(FieldDescriptorProto* field, - const LocationRecorder& field_location); - - // Parse a single option name/value pair, e.g. "ctype = CORD". The name - // identifies a field of the given Message, and the value of that field - // is set to the parsed value. - bool ParseOptionAssignment(Message* options, - const LocationRecorder& options_location); - - // Parses a single part of a multipart option name. A multipart name consists - // of names separated by dots. Each name is either an identifier or a series - // of identifiers separated by dots and enclosed in parentheses. E.g., - // "foo.(bar.baz).qux". - bool ParseOptionNamePart(UninterpretedOption* uninterpreted_option, - const LocationRecorder& part_location); - - // Parses a string surrounded by balanced braces. Strips off the outer - // braces and stores the enclosed string in *value. - // E.g., - // { foo } *value gets 'foo' - // { foo { bar: box } } *value gets 'foo { bar: box }' - // {} *value gets '' - // - // REQUIRES: LookingAt("{") - // When finished successfully, we are looking at the first token past - // the ending brace. - bool ParseUninterpretedBlock(string* value); - - // ================================================================= - - io::Tokenizer* input_; - io::ErrorCollector* error_collector_; - SourceCodeInfo* source_code_info_; - SourceLocationTable* source_location_table_; // legacy - bool had_errors_; - bool require_syntax_identifier_; - bool stop_after_syntax_identifier_; - string syntax_identifier_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Parser); -}; - -// A table mapping (descriptor, ErrorLocation) pairs -- as reported by -// DescriptorPool when validating descriptors -- to line and column numbers -// within the original source code. -// -// This is semi-obsolete: FileDescriptorProto.source_code_info now contains -// far more complete information about source locations. However, as of this -// writing you still need to use SourceLocationTable when integrating with -// DescriptorPool. -class LIBPROTOBUF_EXPORT SourceLocationTable { - public: - SourceLocationTable(); - ~SourceLocationTable(); - - // Finds the precise location of the given error and fills in *line and - // *column with the line and column numbers. If not found, sets *line to - // -1 and *column to 0 (since line = -1 is used to mean "error has no exact - // location" in the ErrorCollector interface). Returns true if found, false - // otherwise. - bool Find(const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - int* line, int* column) const; - - // Adds a location to the table. - void Add(const Message* descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - int line, int column); - - // Clears the contents of the table. - void Clear(); - - private: - typedef map< - pair, - pair > LocationMap; - LocationMap location_map_; -}; - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_PARSER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser_unittest.cc deleted file mode 100644 index 156c0dc3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/parser_unittest.cc +++ /dev/null @@ -1,2122 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -namespace { - -class MockErrorCollector : public io::ErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", - line, column, message); - } -}; - -class MockValidationErrorCollector : public DescriptorPool::ErrorCollector { - public: - MockValidationErrorCollector(const SourceLocationTable& source_locations, - io::ErrorCollector* wrapped_collector) - : source_locations_(source_locations), - wrapped_collector_(wrapped_collector) {} - ~MockValidationErrorCollector() {} - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { - int line, column; - source_locations_.Find(descriptor, location, &line, &column); - wrapped_collector_->AddError(line, column, message); - } - - private: - const SourceLocationTable& source_locations_; - io::ErrorCollector* wrapped_collector_; -}; - -class ParserTest : public testing::Test { - protected: - ParserTest() - : require_syntax_identifier_(false) {} - - // Set up the parser to parse the given text. - void SetupParser(const char* text) { - raw_input_.reset(new io::ArrayInputStream(text, strlen(text))); - input_.reset(new io::Tokenizer(raw_input_.get(), &error_collector_)); - parser_.reset(new Parser()); - parser_->RecordErrorsTo(&error_collector_); - parser_->SetRequireSyntaxIdentifier(require_syntax_identifier_); - } - - // Parse the input and expect that the resulting FileDescriptorProto matches - // the given output. The output is a FileDescriptorProto in protocol buffer - // text format. - void ExpectParsesTo(const char* input, const char* output) { - SetupParser(input); - FileDescriptorProto actual, expected; - - parser_->Parse(input_.get(), &actual); - EXPECT_EQ(io::Tokenizer::TYPE_END, input_->current().type); - ASSERT_EQ("", error_collector_.text_); - - // We don't cover SourceCodeInfo in these tests. - actual.clear_source_code_info(); - - // Parse the ASCII representation in order to canonicalize it. We could - // just compare directly to actual.DebugString(), but that would require - // that the caller precisely match the formatting that DebugString() - // produces. - ASSERT_TRUE(TextFormat::ParseFromString(output, &expected)); - - // Compare by comparing debug strings. - // TODO(kenton): Use differencer, once it is available. - EXPECT_EQ(expected.DebugString(), actual.DebugString()); - } - - // Parse the text and expect that the given errors are reported. - void ExpectHasErrors(const char* text, const char* expected_errors) { - ExpectHasEarlyExitErrors(text, expected_errors); - EXPECT_EQ(io::Tokenizer::TYPE_END, input_->current().type); - } - - // Same as above but does not expect that the parser parses the complete - // input. - void ExpectHasEarlyExitErrors(const char* text, const char* expected_errors) { - SetupParser(text); - FileDescriptorProto file; - parser_->Parse(input_.get(), &file); - EXPECT_EQ(expected_errors, error_collector_.text_); - } - - // Parse the text as a file and validate it (with a DescriptorPool), and - // expect that the validation step reports the given errors. - void ExpectHasValidationErrors(const char* text, - const char* expected_errors) { - SetupParser(text); - SourceLocationTable source_locations; - parser_->RecordSourceLocationsTo(&source_locations); - - FileDescriptorProto file; - file.set_name("foo.proto"); - parser_->Parse(input_.get(), &file); - EXPECT_EQ(io::Tokenizer::TYPE_END, input_->current().type); - ASSERT_EQ("", error_collector_.text_); - - MockValidationErrorCollector validation_error_collector( - source_locations, &error_collector_); - EXPECT_TRUE(pool_.BuildFileCollectingErrors( - file, &validation_error_collector) == NULL); - EXPECT_EQ(expected_errors, error_collector_.text_); - } - - MockErrorCollector error_collector_; - DescriptorPool pool_; - - scoped_ptr raw_input_; - scoped_ptr input_; - scoped_ptr parser_; - bool require_syntax_identifier_; -}; - -// =================================================================== - -TEST_F(ParserTest, StopAfterSyntaxIdentifier) { - SetupParser( - "// blah\n" - "syntax = \"foobar\";\n" - "this line will not be parsed\n"); - parser_->SetStopAfterSyntaxIdentifier(true); - EXPECT_TRUE(parser_->Parse(input_.get(), NULL)); - EXPECT_EQ("", error_collector_.text_); - EXPECT_EQ("foobar", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParserTest, StopAfterOmittedSyntaxIdentifier) { - SetupParser( - "// blah\n" - "this line will not be parsed\n"); - parser_->SetStopAfterSyntaxIdentifier(true); - EXPECT_TRUE(parser_->Parse(input_.get(), NULL)); - EXPECT_EQ("", error_collector_.text_); - EXPECT_EQ("", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParserTest, StopAfterSyntaxIdentifierWithErrors) { - SetupParser( - "// blah\n" - "syntax = error;\n"); - parser_->SetStopAfterSyntaxIdentifier(true); - EXPECT_FALSE(parser_->Parse(input_.get(), NULL)); - EXPECT_EQ("1:9: Expected syntax identifier.\n", error_collector_.text_); -} - -// =================================================================== - -typedef ParserTest ParseMessageTest; - -TEST_F(ParseMessageTest, SimpleMessage) { - ExpectParsesTo( - "message TestMessage {\n" - " required int32 foo = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:1 }" - "}"); -} - -TEST_F(ParseMessageTest, ImplicitSyntaxIdentifier) { - require_syntax_identifier_ = false; - ExpectParsesTo( - "message TestMessage {\n" - " required int32 foo = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:1 }" - "}"); - EXPECT_EQ("proto2", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseMessageTest, ExplicitSyntaxIdentifier) { - ExpectParsesTo( - "syntax = \"proto2\";\n" - "message TestMessage {\n" - " required int32 foo = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:1 }" - "}"); - EXPECT_EQ("proto2", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseMessageTest, ExplicitRequiredSyntaxIdentifier) { - require_syntax_identifier_ = true; - ExpectParsesTo( - "syntax = \"proto2\";\n" - "message TestMessage {\n" - " required int32 foo = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:1 }" - "}"); - EXPECT_EQ("proto2", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseMessageTest, SimpleFields) { - ExpectParsesTo( - "message TestMessage {\n" - " required int32 foo = 15;\n" - " optional int32 bar = 34;\n" - " repeated int32 baz = 3;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:15 }" - " field { name:\"bar\" label:LABEL_OPTIONAL type:TYPE_INT32 number:34 }" - " field { name:\"baz\" label:LABEL_REPEATED type:TYPE_INT32 number:3 }" - "}"); -} - -TEST_F(ParseMessageTest, PrimitiveFieldTypes) { - ExpectParsesTo( - "message TestMessage {\n" - " required int32 foo = 1;\n" - " required int64 foo = 1;\n" - " required uint32 foo = 1;\n" - " required uint64 foo = 1;\n" - " required sint32 foo = 1;\n" - " required sint64 foo = 1;\n" - " required fixed32 foo = 1;\n" - " required fixed64 foo = 1;\n" - " required sfixed32 foo = 1;\n" - " required sfixed64 foo = 1;\n" - " required float foo = 1;\n" - " required double foo = 1;\n" - " required string foo = 1;\n" - " required bytes foo = 1;\n" - " required bool foo = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT32 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_INT64 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_UINT32 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_UINT64 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_SINT32 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_SINT64 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_FIXED32 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_FIXED64 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_SFIXED32 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_SFIXED64 number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_FLOAT number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_DOUBLE number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_STRING number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_BYTES number:1 }" - " field { name:\"foo\" label:LABEL_REQUIRED type:TYPE_BOOL number:1 }" - "}"); -} - -TEST_F(ParseMessageTest, FieldDefaults) { - ExpectParsesTo( - "message TestMessage {\n" - " required int32 foo = 1 [default= 1 ];\n" - " required int32 foo = 1 [default= -2 ];\n" - " required int64 foo = 1 [default= 3 ];\n" - " required int64 foo = 1 [default= -4 ];\n" - " required uint32 foo = 1 [default= 5 ];\n" - " required uint64 foo = 1 [default= 6 ];\n" - " required float foo = 1 [default= 7.5];\n" - " required float foo = 1 [default= -8.5];\n" - " required float foo = 1 [default= 9 ];\n" - " required double foo = 1 [default= 10.5];\n" - " required double foo = 1 [default=-11.5];\n" - " required double foo = 1 [default= 12 ];\n" - " required double foo = 1 [default= inf ];\n" - " required double foo = 1 [default=-inf ];\n" - " required double foo = 1 [default= nan ];\n" - " required string foo = 1 [default='13\\001'];\n" - " required string foo = 1 [default='a' \"b\" \n \"c\"];\n" - " required bytes foo = 1 [default='14\\002'];\n" - " required bytes foo = 1 [default='a' \"b\" \n 'c'];\n" - " required bool foo = 1 [default=true ];\n" - " required Foo foo = 1 [default=FOO ];\n" - - " required int32 foo = 1 [default= 0x7FFFFFFF];\n" - " required int32 foo = 1 [default=-0x80000000];\n" - " required uint32 foo = 1 [default= 0xFFFFFFFF];\n" - " required int64 foo = 1 [default= 0x7FFFFFFFFFFFFFFF];\n" - " required int64 foo = 1 [default=-0x8000000000000000];\n" - " required uint64 foo = 1 [default= 0xFFFFFFFFFFFFFFFF];\n" - " required double foo = 1 [default= 0xabcd];\n" - "}\n", - -#define ETC "name:\"foo\" label:LABEL_REQUIRED number:1" - "message_type {" - " name: \"TestMessage\"" - " field { type:TYPE_INT32 default_value:\"1\" "ETC" }" - " field { type:TYPE_INT32 default_value:\"-2\" "ETC" }" - " field { type:TYPE_INT64 default_value:\"3\" "ETC" }" - " field { type:TYPE_INT64 default_value:\"-4\" "ETC" }" - " field { type:TYPE_UINT32 default_value:\"5\" "ETC" }" - " field { type:TYPE_UINT64 default_value:\"6\" "ETC" }" - " field { type:TYPE_FLOAT default_value:\"7.5\" "ETC" }" - " field { type:TYPE_FLOAT default_value:\"-8.5\" "ETC" }" - " field { type:TYPE_FLOAT default_value:\"9\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"10.5\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"-11.5\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"12\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"inf\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"-inf\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"nan\" "ETC" }" - " field { type:TYPE_STRING default_value:\"13\\001\" "ETC" }" - " field { type:TYPE_STRING default_value:\"abc\" "ETC" }" - " field { type:TYPE_BYTES default_value:\"14\\\\002\" "ETC" }" - " field { type:TYPE_BYTES default_value:\"abc\" "ETC" }" - " field { type:TYPE_BOOL default_value:\"true\" "ETC" }" - " field { type_name:\"Foo\" default_value:\"FOO\" "ETC" }" - - " field { type:TYPE_INT32 default_value:\"2147483647\" "ETC" }" - " field { type:TYPE_INT32 default_value:\"-2147483648\" "ETC" }" - " field { type:TYPE_UINT32 default_value:\"4294967295\" "ETC" }" - " field { type:TYPE_INT64 default_value:\"9223372036854775807\" "ETC" }" - " field { type:TYPE_INT64 default_value:\"-9223372036854775808\" "ETC" }" - " field { type:TYPE_UINT64 default_value:\"18446744073709551615\" "ETC" }" - " field { type:TYPE_DOUBLE default_value:\"43981\" "ETC" }" - "}"); -#undef ETC -} - -TEST_F(ParseMessageTest, FieldOptions) { - ExpectParsesTo( - "message TestMessage {\n" - " optional string foo = 1\n" - " [ctype=CORD, (foo)=7, foo.(.bar.baz).qux.quux.(corge)=-33, \n" - " (quux)=\"x\040y\", (baz.qux)=hey];\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " field { name: \"foo\" label: LABEL_OPTIONAL type: TYPE_STRING number: 1" - " options { uninterpreted_option: { name { name_part: \"ctype\" " - " is_extension: false } " - " identifier_value: \"CORD\" }" - " uninterpreted_option: { name { name_part: \"foo\" " - " is_extension: true } " - " positive_int_value: 7 }" - " uninterpreted_option: { name { name_part: \"foo\" " - " is_extension: false } " - " name { name_part: \".bar.baz\"" - " is_extension: true } " - " name { name_part: \"qux\" " - " is_extension: false } " - " name { name_part: \"quux\" " - " is_extension: false } " - " name { name_part: \"corge\" " - " is_extension: true } " - " negative_int_value: -33 }" - " uninterpreted_option: { name { name_part: \"quux\" " - " is_extension: true } " - " string_value: \"x y\" }" - " uninterpreted_option: { name { name_part: \"baz.qux\" " - " is_extension: true } " - " identifier_value: \"hey\" }" - " }" - " }" - "}"); -} - -TEST_F(ParseMessageTest, Group) { - ExpectParsesTo( - "message TestMessage {\n" - " optional group TestGroup = 1 {};\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " nested_type { name: \"TestGroup\" }" - " field { name:\"testgroup\" label:LABEL_OPTIONAL number:1" - " type:TYPE_GROUP type_name: \"TestGroup\" }" - "}"); -} - -TEST_F(ParseMessageTest, NestedMessage) { - ExpectParsesTo( - "message TestMessage {\n" - " message Nested {}\n" - " optional Nested test_nested = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " nested_type { name: \"Nested\" }" - " field { name:\"test_nested\" label:LABEL_OPTIONAL number:1" - " type_name: \"Nested\" }" - "}"); -} - -TEST_F(ParseMessageTest, NestedEnum) { - ExpectParsesTo( - "message TestMessage {\n" - " enum NestedEnum {}\n" - " optional NestedEnum test_enum = 1;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " enum_type { name: \"NestedEnum\" }" - " field { name:\"test_enum\" label:LABEL_OPTIONAL number:1" - " type_name: \"NestedEnum\" }" - "}"); -} - -TEST_F(ParseMessageTest, ExtensionRange) { - ExpectParsesTo( - "message TestMessage {\n" - " extensions 10 to 19;\n" - " extensions 30 to max;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " extension_range { start:10 end:20 }" - " extension_range { start:30 end:536870912 }" - "}"); -} - -TEST_F(ParseMessageTest, CompoundExtensionRange) { - ExpectParsesTo( - "message TestMessage {\n" - " extensions 2, 15, 9 to 11, 100 to max, 3;\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " extension_range { start:2 end:3 }" - " extension_range { start:15 end:16 }" - " extension_range { start:9 end:12 }" - " extension_range { start:100 end:536870912 }" - " extension_range { start:3 end:4 }" - "}"); -} - -TEST_F(ParseMessageTest, Extensions) { - ExpectParsesTo( - "extend Extendee1 { optional int32 foo = 12; }\n" - "extend Extendee2 { repeated TestMessage bar = 22; }\n", - - "extension { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:12" - " extendee: \"Extendee1\" } " - "extension { name:\"bar\" label:LABEL_REPEATED number:22" - " type_name:\"TestMessage\" extendee: \"Extendee2\" }"); -} - -TEST_F(ParseMessageTest, ExtensionsInMessageScope) { - ExpectParsesTo( - "message TestMessage {\n" - " extend Extendee1 { optional int32 foo = 12; }\n" - " extend Extendee2 { repeated TestMessage bar = 22; }\n" - "}\n", - - "message_type {" - " name: \"TestMessage\"" - " extension { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:12" - " extendee: \"Extendee1\" }" - " extension { name:\"bar\" label:LABEL_REPEATED number:22" - " type_name:\"TestMessage\" extendee: \"Extendee2\" }" - "}"); -} - -TEST_F(ParseMessageTest, MultipleExtensionsOneExtendee) { - ExpectParsesTo( - "extend Extendee1 {\n" - " optional int32 foo = 12;\n" - " repeated TestMessage bar = 22;\n" - "}\n", - - "extension { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:12" - " extendee: \"Extendee1\" } " - "extension { name:\"bar\" label:LABEL_REPEATED number:22" - " type_name:\"TestMessage\" extendee: \"Extendee1\" }"); -} - -// =================================================================== - -typedef ParserTest ParseEnumTest; - -TEST_F(ParseEnumTest, SimpleEnum) { - ExpectParsesTo( - "enum TestEnum {\n" - " FOO = 0;\n" - "}\n", - - "enum_type {" - " name: \"TestEnum\"" - " value { name:\"FOO\" number:0 }" - "}"); -} - -TEST_F(ParseEnumTest, Values) { - ExpectParsesTo( - "enum TestEnum {\n" - " FOO = 13;\n" - " BAR = -10;\n" - " BAZ = 500;\n" - "}\n", - - "enum_type {" - " name: \"TestEnum\"" - " value { name:\"FOO\" number:13 }" - " value { name:\"BAR\" number:-10 }" - " value { name:\"BAZ\" number:500 }" - "}"); -} - -TEST_F(ParseEnumTest, ValueOptions) { - ExpectParsesTo( - "enum TestEnum {\n" - " FOO = 13;\n" - " BAR = -10 [ (something.text) = 'abc' ];\n" - " BAZ = 500 [ (something.text) = 'def', other = 1 ];\n" - "}\n", - - "enum_type {" - " name: \"TestEnum\"" - " value { name: \"FOO\" number: 13 }" - " value { name: \"BAR\" number: -10 " - " options { " - " uninterpreted_option { " - " name { name_part: \"something.text\" is_extension: true } " - " string_value: \"abc\" " - " } " - " } " - " } " - " value { name: \"BAZ\" number: 500 " - " options { " - " uninterpreted_option { " - " name { name_part: \"something.text\" is_extension: true } " - " string_value: \"def\" " - " } " - " uninterpreted_option { " - " name { name_part: \"other\" is_extension: false } " - " positive_int_value: 1 " - " } " - " } " - " } " - "}"); -} - -// =================================================================== - -typedef ParserTest ParseServiceTest; - -TEST_F(ParseServiceTest, SimpleService) { - ExpectParsesTo( - "service TestService {\n" - " rpc Foo(In) returns (Out);\n" - "}\n", - - "service {" - " name: \"TestService\"" - " method { name:\"Foo\" input_type:\"In\" output_type:\"Out\" }" - "}"); -} - -TEST_F(ParseServiceTest, Methods) { - ExpectParsesTo( - "service TestService {\n" - " rpc Foo(In1) returns (Out1);\n" - " rpc Bar(In2) returns (Out2);\n" - " rpc Baz(In3) returns (Out3);\n" - "}\n", - - "service {" - " name: \"TestService\"" - " method { name:\"Foo\" input_type:\"In1\" output_type:\"Out1\" }" - " method { name:\"Bar\" input_type:\"In2\" output_type:\"Out2\" }" - " method { name:\"Baz\" input_type:\"In3\" output_type:\"Out3\" }" - "}"); -} - -// =================================================================== -// imports and packages - -typedef ParserTest ParseMiscTest; - -TEST_F(ParseMiscTest, ParseImport) { - ExpectParsesTo( - "import \"foo/bar/baz.proto\";\n", - "dependency: \"foo/bar/baz.proto\""); -} - -TEST_F(ParseMiscTest, ParseMultipleImports) { - ExpectParsesTo( - "import \"foo.proto\";\n" - "import \"bar.proto\";\n" - "import \"baz.proto\";\n", - "dependency: \"foo.proto\"" - "dependency: \"bar.proto\"" - "dependency: \"baz.proto\""); -} - -TEST_F(ParseMiscTest, ParsePackage) { - ExpectParsesTo( - "package foo.bar.baz;\n", - "package: \"foo.bar.baz\""); -} - -TEST_F(ParseMiscTest, ParsePackageWithSpaces) { - ExpectParsesTo( - "package foo . bar. \n" - " baz;\n", - "package: \"foo.bar.baz\""); -} - -// =================================================================== -// options - -TEST_F(ParseMiscTest, ParseFileOptions) { - ExpectParsesTo( - "option java_package = \"com.google.foo\";\n" - "option optimize_for = CODE_SIZE;", - - "options {" - "uninterpreted_option { name { name_part: \"java_package\" " - " is_extension: false }" - " string_value: \"com.google.foo\"} " - "uninterpreted_option { name { name_part: \"optimize_for\" " - " is_extension: false }" - " identifier_value: \"CODE_SIZE\" } " - "}"); -} - -// =================================================================== -// Error tests -// -// There are a very large number of possible errors that the parser could -// report, so it's infeasible to test every single one of them. Instead, -// we test each unique call to AddError() in parser.h. This does not mean -// we are testing every possible error that Parser can generate because -// each variant of the Consume() helper only counts as one unique call to -// AddError(). - -typedef ParserTest ParseErrorTest; - -TEST_F(ParseErrorTest, MissingSyntaxIdentifier) { - require_syntax_identifier_ = true; - ExpectHasEarlyExitErrors( - "message TestMessage {}", - "0:0: File must begin with 'syntax = \"proto2\";'.\n"); - EXPECT_EQ("", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseErrorTest, UnknownSyntaxIdentifier) { - ExpectHasEarlyExitErrors( - "syntax = \"no_such_syntax\";", - "0:9: Unrecognized syntax identifier \"no_such_syntax\". This parser " - "only recognizes \"proto2\".\n"); - EXPECT_EQ("no_such_syntax", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseErrorTest, SimpleSyntaxError) { - ExpectHasErrors( - "message TestMessage @#$ { blah }", - "0:20: Expected \"{\".\n"); - EXPECT_EQ("proto2", parser_->GetSyntaxIdentifier()); -} - -TEST_F(ParseErrorTest, ExpectedTopLevel) { - ExpectHasErrors( - "blah;", - "0:0: Expected top-level statement (e.g. \"message\").\n"); -} - -TEST_F(ParseErrorTest, UnmatchedCloseBrace) { - // This used to cause an infinite loop. Doh. - ExpectHasErrors( - "}", - "0:0: Expected top-level statement (e.g. \"message\").\n" - "0:0: Unmatched \"}\".\n"); -} - -// ------------------------------------------------------------------- -// Message errors - -TEST_F(ParseErrorTest, MessageMissingName) { - ExpectHasErrors( - "message {}", - "0:8: Expected message name.\n"); -} - -TEST_F(ParseErrorTest, MessageMissingBody) { - ExpectHasErrors( - "message TestMessage;", - "0:19: Expected \"{\".\n"); -} - -TEST_F(ParseErrorTest, EofInMessage) { - ExpectHasErrors( - "message TestMessage {", - "0:21: Reached end of input in message definition (missing '}').\n"); -} - -TEST_F(ParseErrorTest, MissingFieldNumber) { - ExpectHasErrors( - "message TestMessage {\n" - " optional int32 foo;\n" - "}\n", - "1:20: Missing field number.\n"); -} - -TEST_F(ParseErrorTest, ExpectedFieldNumber) { - ExpectHasErrors( - "message TestMessage {\n" - " optional int32 foo = ;\n" - "}\n", - "1:23: Expected field number.\n"); -} - -TEST_F(ParseErrorTest, FieldNumberOutOfRange) { - ExpectHasErrors( - "message TestMessage {\n" - " optional int32 foo = 0x100000000;\n" - "}\n", - "1:23: Integer out of range.\n"); -} - -TEST_F(ParseErrorTest, MissingLabel) { - ExpectHasErrors( - "message TestMessage {\n" - " int32 foo = 1;\n" - "}\n", - "1:2: Expected \"required\", \"optional\", or \"repeated\".\n"); -} - -TEST_F(ParseErrorTest, ExpectedOptionName) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [];\n" - "}\n", - "1:27: Expected identifier.\n"); -} - -TEST_F(ParseErrorTest, NonExtensionOptionNameBeginningWithDot) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [.foo=1];\n" - "}\n", - "1:27: Expected identifier.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueTypeMismatch) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [default=true];\n" - "}\n", - "1:35: Expected integer.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueNotBoolean) { - ExpectHasErrors( - "message TestMessage {\n" - " optional bool foo = 1 [default=blah];\n" - "}\n", - "1:33: Expected \"true\" or \"false\".\n"); -} - -TEST_F(ParseErrorTest, DefaultValueNotString) { - ExpectHasErrors( - "message TestMessage {\n" - " optional string foo = 1 [default=1];\n" - "}\n", - "1:35: Expected string.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueUnsignedNegative) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [default=-1];\n" - "}\n", - "1:36: Unsigned field can't have negative default value.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueTooLarge) { - ExpectHasErrors( - "message TestMessage {\n" - " optional int32 foo = 1 [default= 0x80000000];\n" - " optional int32 foo = 1 [default=-0x80000001];\n" - " optional uint32 foo = 1 [default= 0x100000000];\n" - " optional int64 foo = 1 [default= 0x80000000000000000];\n" - " optional int64 foo = 1 [default=-0x80000000000000001];\n" - " optional uint64 foo = 1 [default= 0x100000000000000000];\n" - "}\n", - "1:36: Integer out of range.\n" - "2:36: Integer out of range.\n" - "3:36: Integer out of range.\n" - "4:36: Integer out of range.\n" - "5:36: Integer out of range.\n" - "6:36: Integer out of range.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueMissing) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [default=];\n" - "}\n", - "1:35: Expected integer.\n"); -} - -TEST_F(ParseErrorTest, DefaultValueForGroup) { - ExpectHasErrors( - "message TestMessage {\n" - " optional group Foo = 1 [default=blah] {}\n" - "}\n", - "1:34: Messages can't have default values.\n"); -} - -TEST_F(ParseErrorTest, DuplicateDefaultValue) { - ExpectHasErrors( - "message TestMessage {\n" - " optional uint32 foo = 1 [default=1,default=2];\n" - "}\n", - "1:37: Already set option \"default\".\n"); -} - -TEST_F(ParseErrorTest, GroupNotCapitalized) { - ExpectHasErrors( - "message TestMessage {\n" - " optional group foo = 1 {}\n" - "}\n", - "1:17: Group names must start with a capital letter.\n"); -} - -TEST_F(ParseErrorTest, GroupMissingBody) { - ExpectHasErrors( - "message TestMessage {\n" - " optional group Foo = 1;\n" - "}\n", - "1:24: Missing group body.\n"); -} - -TEST_F(ParseErrorTest, ExtendingPrimitive) { - ExpectHasErrors( - "extend int32 { optional string foo = 4; }\n", - "0:7: Expected message type.\n"); -} - -TEST_F(ParseErrorTest, ErrorInExtension) { - ExpectHasErrors( - "message Foo { extensions 100 to 199; }\n" - "extend Foo { optional string foo; }\n", - "1:32: Missing field number.\n"); -} - -TEST_F(ParseErrorTest, MultipleParseErrors) { - // When a statement has a parse error, the parser should be able to continue - // parsing at the next statement. - ExpectHasErrors( - "message TestMessage {\n" - " optional int32 foo;\n" - " !invalid statement ending in a block { blah blah { blah } blah }\n" - " optional int32 bar = 3 {}\n" - "}\n", - "1:20: Missing field number.\n" - "2:2: Expected \"required\", \"optional\", or \"repeated\".\n" - "2:2: Expected type name.\n" - "3:25: Expected \";\".\n"); -} - -TEST_F(ParseErrorTest, EofInAggregateValue) { - ExpectHasErrors( - "option (fileopt) = { i:100\n", - "1:0: Unexpected end of stream while parsing aggregate value.\n"); -} - -// ------------------------------------------------------------------- -// Enum errors - -TEST_F(ParseErrorTest, EofInEnum) { - ExpectHasErrors( - "enum TestEnum {", - "0:15: Reached end of input in enum definition (missing '}').\n"); -} - -TEST_F(ParseErrorTest, EnumValueMissingNumber) { - ExpectHasErrors( - "enum TestEnum {\n" - " FOO;\n" - "}\n", - "1:5: Missing numeric value for enum constant.\n"); -} - -// ------------------------------------------------------------------- -// Service errors - -TEST_F(ParseErrorTest, EofInService) { - ExpectHasErrors( - "service TestService {", - "0:21: Reached end of input in service definition (missing '}').\n"); -} - -TEST_F(ParseErrorTest, ServiceMethodPrimitiveParams) { - ExpectHasErrors( - "service TestService {\n" - " rpc Foo(int32) returns (string);\n" - "}\n", - "1:10: Expected message type.\n" - "1:26: Expected message type.\n"); -} - -TEST_F(ParseErrorTest, EofInMethodOptions) { - ExpectHasErrors( - "service TestService {\n" - " rpc Foo(Bar) returns(Bar) {", - "1:29: Reached end of input in method options (missing '}').\n" - "1:29: Reached end of input in service definition (missing '}').\n"); -} - -TEST_F(ParseErrorTest, PrimitiveMethodInput) { - ExpectHasErrors( - "service TestService {\n" - " rpc Foo(int32) returns(Bar);\n" - "}\n", - "1:10: Expected message type.\n"); -} - -TEST_F(ParseErrorTest, MethodOptionTypeError) { - // This used to cause an infinite loop. - ExpectHasErrors( - "message Baz {}\n" - "service Foo {\n" - " rpc Bar(Baz) returns(Baz) { option invalid syntax; }\n" - "}\n", - "2:45: Expected \"=\".\n"); -} - -// ------------------------------------------------------------------- -// Import and package errors - -TEST_F(ParseErrorTest, ImportNotQuoted) { - ExpectHasErrors( - "import foo;\n", - "0:7: Expected a string naming the file to import.\n"); -} - -TEST_F(ParseErrorTest, MultiplePackagesInFile) { - ExpectHasErrors( - "package foo;\n" - "package bar;\n", - "1:0: Multiple package definitions.\n"); -} - -// =================================================================== -// Test that errors detected by DescriptorPool correctly report line and -// column numbers. We have one test for every call to RecordLocation() in -// parser.cc. - -typedef ParserTest ParserValidationErrorTest; - -TEST_F(ParserValidationErrorTest, PackageNameError) { - // Create another file which defines symbol "foo". - FileDescriptorProto other_file; - other_file.set_name("bar.proto"); - other_file.add_message_type()->set_name("foo"); - EXPECT_TRUE(pool_.BuildFile(other_file) != NULL); - - // Now try to define it as a package. - ExpectHasValidationErrors( - "package foo.bar;", - "0:8: \"foo\" is already defined (as something other than a package) " - "in file \"bar.proto\".\n"); -} - -TEST_F(ParserValidationErrorTest, MessageNameError) { - ExpectHasValidationErrors( - "message Foo {}\n" - "message Foo {}\n", - "1:8: \"Foo\" is already defined.\n"); -} - -TEST_F(ParserValidationErrorTest, FieldNameError) { - ExpectHasValidationErrors( - "message Foo {\n" - " optional int32 bar = 1;\n" - " optional int32 bar = 2;\n" - "}\n", - "2:17: \"bar\" is already defined in \"Foo\".\n"); -} - -TEST_F(ParserValidationErrorTest, FieldTypeError) { - ExpectHasValidationErrors( - "message Foo {\n" - " optional Baz bar = 1;\n" - "}\n", - "1:11: \"Baz\" is not defined.\n"); -} - -TEST_F(ParserValidationErrorTest, FieldNumberError) { - ExpectHasValidationErrors( - "message Foo {\n" - " optional int32 bar = 0;\n" - "}\n", - "1:23: Field numbers must be positive integers.\n"); -} - -TEST_F(ParserValidationErrorTest, FieldExtendeeError) { - ExpectHasValidationErrors( - "extend Baz { optional int32 bar = 1; }\n", - "0:7: \"Baz\" is not defined.\n"); -} - -TEST_F(ParserValidationErrorTest, FieldDefaultValueError) { - ExpectHasValidationErrors( - "enum Baz { QUX = 1; }\n" - "message Foo {\n" - " optional Baz bar = 1 [default=NO_SUCH_VALUE];\n" - "}\n", - "2:32: Enum type \"Baz\" has no value named \"NO_SUCH_VALUE\".\n"); -} - -TEST_F(ParserValidationErrorTest, FileOptionNameError) { - ExpectHasValidationErrors( - "option foo = 5;", - "0:7: Option \"foo\" unknown.\n"); -} - -TEST_F(ParserValidationErrorTest, FileOptionValueError) { - ExpectHasValidationErrors( - "option java_outer_classname = 5;", - "0:30: Value must be quoted string for string option " - "\"google.protobuf.FileOptions.java_outer_classname\".\n"); -} - -TEST_F(ParserValidationErrorTest, FieldOptionNameError) { - ExpectHasValidationErrors( - "message Foo {\n" - " optional bool bar = 1 [foo=1];\n" - "}\n", - "1:25: Option \"foo\" unknown.\n"); -} - -TEST_F(ParserValidationErrorTest, FieldOptionValueError) { - ExpectHasValidationErrors( - "message Foo {\n" - " optional int32 bar = 1 [ctype=1];\n" - "}\n", - "1:32: Value must be identifier for enum-valued option " - "\"google.protobuf.FieldOptions.ctype\".\n"); -} - -TEST_F(ParserValidationErrorTest, ExtensionRangeNumberError) { - ExpectHasValidationErrors( - "message Foo {\n" - " extensions 0;\n" - "}\n", - "1:13: Extension numbers must be positive integers.\n"); -} - -TEST_F(ParserValidationErrorTest, EnumNameError) { - ExpectHasValidationErrors( - "enum Foo {A = 1;}\n" - "enum Foo {B = 1;}\n", - "1:5: \"Foo\" is already defined.\n"); -} - -TEST_F(ParserValidationErrorTest, EnumValueNameError) { - ExpectHasValidationErrors( - "enum Foo {\n" - " BAR = 1;\n" - " BAR = 1;\n" - "}\n", - "2:2: \"BAR\" is already defined.\n"); -} - -TEST_F(ParserValidationErrorTest, ServiceNameError) { - ExpectHasValidationErrors( - "service Foo {}\n" - "service Foo {}\n", - "1:8: \"Foo\" is already defined.\n"); -} - -TEST_F(ParserValidationErrorTest, MethodNameError) { - ExpectHasValidationErrors( - "message Baz {}\n" - "service Foo {\n" - " rpc Bar(Baz) returns(Baz);\n" - " rpc Bar(Baz) returns(Baz);\n" - "}\n", - "3:6: \"Bar\" is already defined in \"Foo\".\n"); -} - -TEST_F(ParserValidationErrorTest, MethodInputTypeError) { - ExpectHasValidationErrors( - "message Baz {}\n" - "service Foo {\n" - " rpc Bar(Qux) returns(Baz);\n" - "}\n", - "2:10: \"Qux\" is not defined.\n"); -} - -TEST_F(ParserValidationErrorTest, MethodOutputTypeError) { - ExpectHasValidationErrors( - "message Baz {}\n" - "service Foo {\n" - " rpc Bar(Baz) returns(Qux);\n" - "}\n", - "2:23: \"Qux\" is not defined.\n"); -} - -// =================================================================== -// Test that the output from FileDescriptor::DebugString() (and all other -// descriptor types) is parseable, and results in the same Descriptor -// definitions again afoter parsing (not, however, that the order of messages -// cannot be guaranteed to be the same) - -typedef ParserTest ParseDecriptorDebugTest; - -class CompareDescriptorNames { - public: - bool operator()(const DescriptorProto* left, const DescriptorProto* right) { - return left->name() < right->name(); - } -}; - -// Sorts nested DescriptorProtos of a DescriptoProto, by name. -void SortMessages(DescriptorProto *descriptor_proto) { - int size = descriptor_proto->nested_type_size(); - // recursively sort; we can't guarantee the order of nested messages either - for (int i = 0; i < size; ++i) { - SortMessages(descriptor_proto->mutable_nested_type(i)); - } - DescriptorProto **data = - descriptor_proto->mutable_nested_type()->mutable_data(); - sort(data, data + size, CompareDescriptorNames()); -} - -// Sorts DescriptorProtos belonging to a FileDescriptorProto, by name. -void SortMessages(FileDescriptorProto *file_descriptor_proto) { - int size = file_descriptor_proto->message_type_size(); - // recursively sort; we can't guarantee the order of nested messages either - for (int i = 0; i < size; ++i) { - SortMessages(file_descriptor_proto->mutable_message_type(i)); - } - DescriptorProto **data = - file_descriptor_proto->mutable_message_type()->mutable_data(); - sort(data, data + size, CompareDescriptorNames()); -} - -TEST_F(ParseDecriptorDebugTest, TestAllDescriptorTypes) { - const FileDescriptor* original_file = - protobuf_unittest::TestAllTypes::descriptor()->file(); - FileDescriptorProto expected; - original_file->CopyTo(&expected); - - // Get the DebugString of the unittest.proto FileDecriptor, which includes - // all other descriptor types - string debug_string = original_file->DebugString(); - - // Parse the debug string - SetupParser(debug_string.c_str()); - FileDescriptorProto parsed; - parser_->Parse(input_.get(), &parsed); - EXPECT_EQ(io::Tokenizer::TYPE_END, input_->current().type); - ASSERT_EQ("", error_collector_.text_); - - // We now have a FileDescriptorProto, but to compare with the expected we - // need to link to a FileDecriptor, then output back to a proto. We'll - // also need to give it the same name as the original. - parsed.set_name("google/protobuf/unittest.proto"); - // We need the imported dependency before we can build our parsed proto - const FileDescriptor* import = - protobuf_unittest_import::ImportMessage::descriptor()->file(); - FileDescriptorProto import_proto; - import->CopyTo(&import_proto); - ASSERT_TRUE(pool_.BuildFile(import_proto) != NULL); - const FileDescriptor* actual = pool_.BuildFile(parsed); - parsed.Clear(); - actual->CopyTo(&parsed); - ASSERT_TRUE(actual != NULL); - - // The messages might be in different orders, making them hard to compare. - // So, sort the messages in the descriptor protos (including nested messages, - // recursively). - SortMessages(&expected); - SortMessages(&parsed); - - // I really wanted to use StringDiff here for the debug output on fail, - // but the strings are too long for it, and if I increase its max size, - // we get a memory allocation failure :( - EXPECT_EQ(expected.DebugString(), parsed.DebugString()); -} - -// =================================================================== -// SourceCodeInfo tests. - -// Follows a path -- as defined by SourceCodeInfo.Location.path -- from a -// message to a particular sub-field. -// * If the target is itself a message, sets *output_message to point at it, -// *output_field to NULL, and *output_index to -1. -// * Otherwise, if the target is an element of a repeated field, sets -// *output_message to the containing message, *output_field to the descriptor -// of the field, and *output_index to the index of the element. -// * Otherwise, the target is a field (possibly a repeated field, but not any -// one element). Sets *output_message to the containing message, -// *output_field to the descriptor of the field, and *output_index to -1. -// Returns true if the path was valid, false otherwise. A gTest failure is -// recorded before returning false. -bool FollowPath(const Message& root, - const int* path_begin, const int* path_end, - const Message** output_message, - const FieldDescriptor** output_field, - int* output_index) { - if (path_begin == path_end) { - // Path refers to this whole message. - *output_message = &root; - *output_field = NULL; - *output_index = -1; - return true; - } - - const Descriptor* descriptor = root.GetDescriptor(); - const Reflection* reflection = root.GetReflection(); - - const FieldDescriptor* field = descriptor->FindFieldByNumber(*path_begin); - - if (field == NULL) { - ADD_FAILURE() << descriptor->name() << " has no field number: " - << *path_begin; - return false; - } - - ++path_begin; - - if (field->is_repeated()) { - if (path_begin == path_end) { - // Path refers to the whole repeated field. - *output_message = &root; - *output_field = field; - *output_index = -1; - return true; - } - - int index = *path_begin++; - int size = reflection->FieldSize(root, field); - - if (index >= size) { - ADD_FAILURE() << descriptor->name() << "." << field->name() - << " has size " << size << ", but path contained index: " - << index; - return false; - } - - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - // Descend into child message. - const Message& child = reflection->GetRepeatedMessage(root, field, index); - return FollowPath(child, path_begin, path_end, - output_message, output_field, output_index); - } else if (path_begin == path_end) { - // Path refers to this element. - *output_message = &root; - *output_field = field; - *output_index = index; - return true; - } else { - ADD_FAILURE() << descriptor->name() << "." << field->name() - << " is not a message; cannot descend into it."; - return false; - } - } else { - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - const Message& child = reflection->GetMessage(root, field); - return FollowPath(child, path_begin, path_end, - output_message, output_field, output_index); - } else if (path_begin == path_end) { - // Path refers to this field. - *output_message = &root; - *output_field = field; - *output_index = -1; - return true; - } else { - ADD_FAILURE() << descriptor->name() << "." << field->name() - << " is not a message; cannot descend into it."; - return false; - } - } -} - -// Split some text on line breaks. The line breaks are retained in the output, -// so each line (except the last) ends with a '\n', and the lines can be -// concatenated to produce the original text. -// -// I couldn't find the proper string utility function for this. Our -// split-on-delimiter functions don't include the delimiter in the output. -void SplitLines(const string& text, vector* lines) { - string::size_type pos = 0; - - while (pos != string::npos) { - string::size_type last_pos = pos; - pos = text.find_first_of('\n', pos); - if (pos != string::npos) ++pos; - lines->push_back(text.substr(last_pos, pos - last_pos)); - } -} - -// Look for the given tags in the given text and construct a span (as defined -// by SourceCodeInfo.Location.span) from them. E.g. for text like: -// /*a*/message /*b*/Foo/*c*/ {}/*d*/ -// There are four tags: "a", "b", "c", and "d". The constructed span starts -// immediately after the start tag's trailing '/' and ends immediately before -// the end tags leading '/'. -void MakeExpectedSpan(const vector& lines, - const string& start_tag, const string& end_tag, - RepeatedField* output) { - string start_comment = "/*" + start_tag + "*/"; - string end_comment = "/*" + end_tag + "*/"; - - int start_line = -1; - int start_column = -1; - for (int i = 0; i < lines.size(); i++) { - string::size_type pos = lines[i].find(start_comment); - if (pos != string::npos) { - start_line = i; - start_column = pos + start_comment.size(); - break; - } - } - ASSERT_NE(start_line, -1) - << "Tag \"" << start_comment << "\" not found in text."; - - int end_line = -1; - int end_column = -1; - for (int i = start_line; i < lines.size(); i++) { - string::size_type pos = lines[i].find(end_comment); - if (pos != string::npos) { - end_line = i; - end_column = pos; - break; - } - } - ASSERT_NE(end_line, -1) - << "Tag \"" << end_comment << "\" not found in text."; - - output->Add(start_line); - output->Add(start_column); - if (end_line != start_line) output->Add(end_line); - output->Add(end_column); -} - -// Check if two spans are equal. -bool CompareSpans(const RepeatedField& span1, - const RepeatedField& span2) { - if (span1.size() != span2.size()) return false; - for (int i = 0; i < span1.size(); i++) { - if (span1.Get(i) != span2.Get(i)) return false; - } - return true; -} - -// Test fixture for source info tests, which check that source locations are -// recorded correctly in FileDescriptorProto.source_code_info.location. -class SourceInfoTest : public ParserTest { - protected: - // The parsed file (initialized by Parse()). - FileDescriptorProto file_; - - // Parse the given text as a .proto file and populate the spans_ map with - // all the source location spans in its SourceCodeInfo table. - bool Parse(const char* text) { - SetupParser(text); - SplitLines(text, &lines_); - if (!parser_->Parse(input_.get(), &file_)) { - return false; - } - - const SourceCodeInfo& source_info = file_.source_code_info(); - for (int i = 0; i < source_info.location_size(); i++) { - const SourceCodeInfo::Location& location = source_info.location(i); - const Message* descriptor_proto = NULL; - const FieldDescriptor* field = NULL; - int index = 0; - if (!FollowPath(file_, location.path().begin(), location.path().end(), - &descriptor_proto, &field, &index)) { - return false; - } - - spans_.insert(make_pair(SpanKey(*descriptor_proto, field, index), - &location)); - } - - return true; - } - - virtual void TearDown() { - EXPECT_TRUE(spans_.empty()) - << "Forgot to call HasSpan() for:\n" - << spans_.begin()->second->DebugString(); - } - - // ----------------------------------------------------------------- - // HasSpan() checks that the span of source code delimited by the given - // tags (comments) correspond via the SourceCodeInfo table to the given - // part of the FileDescriptorProto. (If unclear, look at the actual tests; - // it should quickly become obvious.) - - bool HasSpan(const char* start_tag, const char* end_tag, - const Message& descriptor_proto) { - return HasSpan(start_tag, end_tag, descriptor_proto, NULL, -1); - } - - bool HasSpan(const char* start_tag, const char* end_tag, - const Message& descriptor_proto, const string& field_name) { - return HasSpan(start_tag, end_tag, descriptor_proto, field_name, -1); - } - - bool HasSpan(const char* start_tag, const char* end_tag, - const Message& descriptor_proto, const string& field_name, - int index) { - const FieldDescriptor* field = - descriptor_proto.GetDescriptor()->FindFieldByName(field_name); - if (field == NULL) { - ADD_FAILURE() << descriptor_proto.GetDescriptor()->name() - << " has no such field: " << field_name; - return false; - } - - return HasSpan(start_tag, end_tag, descriptor_proto, field, index); - } - - bool HasSpan(const Message& descriptor_proto) { - return HasSpan(NULL, NULL, descriptor_proto, NULL, -1); - } - - bool HasSpan(const Message& descriptor_proto, const string& field_name) { - return HasSpan(NULL, NULL, descriptor_proto, field_name, -1); - } - - bool HasSpan(const Message& descriptor_proto, const string& field_name, - int index) { - return HasSpan(NULL, NULL, descriptor_proto, field_name, index); - } - - bool HasSpan(const char* start_tag, const char* end_tag, - const Message& descriptor_proto, const FieldDescriptor* field, - int index) { - pair range = - spans_.equal_range(SpanKey(descriptor_proto, field, index)); - - if (start_tag == NULL) { - if (range.first == range.second) { - return false; - } else { - spans_.erase(range.first); - return true; - } - } else { - RepeatedField expected_span; - MakeExpectedSpan(lines_, start_tag, end_tag, &expected_span); - - for (SpanMap::iterator iter = range.first; iter != range.second; ++iter) { - if (CompareSpans(expected_span, iter->second->span())) { - spans_.erase(iter); - return true; - } - } - - return false; - } - } - - private: - struct SpanKey { - const Message* descriptor_proto; - const FieldDescriptor* field; - int index; - - inline SpanKey() {} - inline SpanKey(const Message& descriptor_proto, - const FieldDescriptor* field, - int index) - : descriptor_proto(&descriptor_proto), field(field), index(index) {} - - inline bool operator<(const SpanKey& other) const { - if (descriptor_proto < other.descriptor_proto) return true; - if (descriptor_proto > other.descriptor_proto) return false; - if (field < other.field) return true; - if (field > other.field) return false; - return index < other.index; - } - }; - - typedef multimap SpanMap; - SpanMap spans_; - vector lines_; -}; - -TEST_F(SourceInfoTest, BasicFileDecls) { - EXPECT_TRUE(Parse( - "/*a*/syntax = \"proto2\";\n" - "package /*b*/foo.bar/*c*/;\n" - "import /*d*/\"baz.proto\"/*e*/;\n" - "import /*f*/\"qux.proto\"/*g*/;/*h*/\n" - "// comment ignored\n")); - - EXPECT_TRUE(HasSpan("a", "h", file_)); - EXPECT_TRUE(HasSpan("b", "c", file_, "package")); - EXPECT_TRUE(HasSpan("d", "e", file_, "dependency", 0)); - EXPECT_TRUE(HasSpan("f", "g", file_, "dependency", 1)); -} - -TEST_F(SourceInfoTest, Messages) { - EXPECT_TRUE(Parse( - "/*a*/message /*b*/Foo/*c*/ {}/*d*/\n" - "/*e*/message /*f*/Bar/*g*/ {}/*h*/\n")); - - EXPECT_TRUE(HasSpan("a", "d", file_.message_type(0))); - EXPECT_TRUE(HasSpan("b", "c", file_.message_type(0), "name")); - EXPECT_TRUE(HasSpan("e", "h", file_.message_type(1))); - EXPECT_TRUE(HasSpan("f", "g", file_.message_type(1), "name")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); -} - -TEST_F(SourceInfoTest, Fields) { - EXPECT_TRUE(Parse( - "message Foo {\n" - " /*a*/optional/*b*/ /*c*/int32/*d*/ /*e*/bar/*f*/ = /*g*/1/*h*/;/*i*/\n" - " /*j*/repeated/*k*/ /*l*/X.Y/*m*/ /*n*/baz/*o*/ = /*p*/2/*q*/;/*r*/\n" - "}\n")); - - const FieldDescriptorProto& field1 = file_.message_type(0).field(0); - const FieldDescriptorProto& field2 = file_.message_type(0).field(1); - - EXPECT_TRUE(HasSpan("a", "i", field1)); - EXPECT_TRUE(HasSpan("a", "b", field1, "label")); - EXPECT_TRUE(HasSpan("c", "d", field1, "type")); - EXPECT_TRUE(HasSpan("e", "f", field1, "name")); - EXPECT_TRUE(HasSpan("g", "h", field1, "number")); - - EXPECT_TRUE(HasSpan("j", "r", field2)); - EXPECT_TRUE(HasSpan("j", "k", field2, "label")); - EXPECT_TRUE(HasSpan("l", "m", field2, "type_name")); - EXPECT_TRUE(HasSpan("n", "o", field2, "name")); - EXPECT_TRUE(HasSpan("p", "q", field2, "number")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); -} - -TEST_F(SourceInfoTest, Extensions) { - EXPECT_TRUE(Parse( - "/*a*/extend /*b*/Foo/*c*/ {\n" - " /*d*/optional/*e*/ int32 bar = 1;/*f*/\n" - " /*g*/repeated/*h*/ X.Y baz = 2;/*i*/\n" - "}/*j*/\n" - "/*k*/extend /*l*/Bar/*m*/ {\n" - " /*n*/optional int32 qux = 1;/*o*/\n" - "}/*p*/\n")); - - const FieldDescriptorProto& field1 = file_.extension(0); - const FieldDescriptorProto& field2 = file_.extension(1); - const FieldDescriptorProto& field3 = file_.extension(2); - - EXPECT_TRUE(HasSpan("a", "j", file_, "extension")); - EXPECT_TRUE(HasSpan("k", "p", file_, "extension")); - - EXPECT_TRUE(HasSpan("d", "f", field1)); - EXPECT_TRUE(HasSpan("d", "e", field1, "label")); - EXPECT_TRUE(HasSpan("b", "c", field1, "extendee")); - - EXPECT_TRUE(HasSpan("g", "i", field2)); - EXPECT_TRUE(HasSpan("g", "h", field2, "label")); - EXPECT_TRUE(HasSpan("b", "c", field2, "extendee")); - - EXPECT_TRUE(HasSpan("n", "o", field3)); - EXPECT_TRUE(HasSpan("l", "m", field3, "extendee")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(field1, "type")); - EXPECT_TRUE(HasSpan(field1, "name")); - EXPECT_TRUE(HasSpan(field1, "number")); - EXPECT_TRUE(HasSpan(field2, "type_name")); - EXPECT_TRUE(HasSpan(field2, "name")); - EXPECT_TRUE(HasSpan(field2, "number")); - EXPECT_TRUE(HasSpan(field3, "label")); - EXPECT_TRUE(HasSpan(field3, "type")); - EXPECT_TRUE(HasSpan(field3, "name")); - EXPECT_TRUE(HasSpan(field3, "number")); -} - -TEST_F(SourceInfoTest, NestedExtensions) { - EXPECT_TRUE(Parse( - "message Message {\n" - " /*a*/extend /*b*/Foo/*c*/ {\n" - " /*d*/optional/*e*/ int32 bar = 1;/*f*/\n" - " /*g*/repeated/*h*/ X.Y baz = 2;/*i*/\n" - " }/*j*/\n" - " /*k*/extend /*l*/Bar/*m*/ {\n" - " /*n*/optional int32 qux = 1;/*o*/\n" - " }/*p*/\n" - "}\n")); - - const FieldDescriptorProto& field1 = file_.message_type(0).extension(0); - const FieldDescriptorProto& field2 = file_.message_type(0).extension(1); - const FieldDescriptorProto& field3 = file_.message_type(0).extension(2); - - EXPECT_TRUE(HasSpan("a", "j", file_.message_type(0), "extension")); - EXPECT_TRUE(HasSpan("k", "p", file_.message_type(0), "extension")); - - EXPECT_TRUE(HasSpan("d", "f", field1)); - EXPECT_TRUE(HasSpan("d", "e", field1, "label")); - EXPECT_TRUE(HasSpan("b", "c", field1, "extendee")); - - EXPECT_TRUE(HasSpan("g", "i", field2)); - EXPECT_TRUE(HasSpan("g", "h", field2, "label")); - EXPECT_TRUE(HasSpan("b", "c", field2, "extendee")); - - EXPECT_TRUE(HasSpan("n", "o", field3)); - EXPECT_TRUE(HasSpan("l", "m", field3, "extendee")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); - EXPECT_TRUE(HasSpan(field1, "type")); - EXPECT_TRUE(HasSpan(field1, "name")); - EXPECT_TRUE(HasSpan(field1, "number")); - EXPECT_TRUE(HasSpan(field2, "type_name")); - EXPECT_TRUE(HasSpan(field2, "name")); - EXPECT_TRUE(HasSpan(field2, "number")); - EXPECT_TRUE(HasSpan(field3, "label")); - EXPECT_TRUE(HasSpan(field3, "type")); - EXPECT_TRUE(HasSpan(field3, "name")); - EXPECT_TRUE(HasSpan(field3, "number")); -} - -TEST_F(SourceInfoTest, ExtensionRanges) { - EXPECT_TRUE(Parse( - "message Message {\n" - " /*a*/extensions /*b*/1/*c*/ to /*d*/4/*e*/, /*f*/6/*g*/;/*h*/\n" - " /*i*/extensions /*j*/8/*k*/ to /*l*/max/*m*/;/*n*/\n" - "}\n")); - - const DescriptorProto::ExtensionRange& range1 = - file_.message_type(0).extension_range(0); - const DescriptorProto::ExtensionRange& range2 = - file_.message_type(0).extension_range(1); - const DescriptorProto::ExtensionRange& range3 = - file_.message_type(0).extension_range(2); - - EXPECT_TRUE(HasSpan("a", "h", file_.message_type(0), "extension_range")); - EXPECT_TRUE(HasSpan("i", "n", file_.message_type(0), "extension_range")); - - EXPECT_TRUE(HasSpan("b", "e", range1)); - EXPECT_TRUE(HasSpan("b", "c", range1, "start")); - EXPECT_TRUE(HasSpan("d", "e", range1, "end")); - - EXPECT_TRUE(HasSpan("f", "g", range2)); - EXPECT_TRUE(HasSpan("f", "g", range2, "start")); - EXPECT_TRUE(HasSpan("f", "g", range2, "end")); - - EXPECT_TRUE(HasSpan("j", "m", range3)); - EXPECT_TRUE(HasSpan("j", "k", range3, "start")); - EXPECT_TRUE(HasSpan("l", "m", range3, "end")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); -} - -TEST_F(SourceInfoTest, NestedMessages) { - EXPECT_TRUE(Parse( - "message Foo {\n" - " /*a*/message /*b*/Bar/*c*/ {\n" - " /*d*/message /*e*/Baz/*f*/ {}/*g*/\n" - " }/*h*/\n" - " /*i*/message /*j*/Qux/*k*/ {}/*l*/\n" - "}\n")); - - const DescriptorProto& bar = file_.message_type(0).nested_type(0); - const DescriptorProto& baz = bar.nested_type(0); - const DescriptorProto& qux = file_.message_type(0).nested_type(1); - - EXPECT_TRUE(HasSpan("a", "h", bar)); - EXPECT_TRUE(HasSpan("b", "c", bar, "name")); - EXPECT_TRUE(HasSpan("d", "g", baz)); - EXPECT_TRUE(HasSpan("e", "f", baz, "name")); - EXPECT_TRUE(HasSpan("i", "l", qux)); - EXPECT_TRUE(HasSpan("j", "k", qux, "name")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); -} - -TEST_F(SourceInfoTest, Groups) { - EXPECT_TRUE(Parse( - "message Foo {\n" - " message Bar {}\n" - " /*a*/optional/*b*/ /*c*/group/*d*/ /*e*/Baz/*f*/ = /*g*/1/*h*/ {\n" - " /*i*/message Qux {}/*j*/\n" - " }/*k*/\n" - "}\n")); - - const DescriptorProto& bar = file_.message_type(0).nested_type(0); - const DescriptorProto& baz = file_.message_type(0).nested_type(1); - const DescriptorProto& qux = baz.nested_type(0); - const FieldDescriptorProto& field = file_.message_type(0).field(0); - - EXPECT_TRUE(HasSpan("a", "k", field)); - EXPECT_TRUE(HasSpan("a", "b", field, "label")); - EXPECT_TRUE(HasSpan("c", "d", field, "type")); - EXPECT_TRUE(HasSpan("e", "f", field, "name")); - EXPECT_TRUE(HasSpan("e", "f", field, "type_name")); - EXPECT_TRUE(HasSpan("g", "h", field, "number")); - - EXPECT_TRUE(HasSpan("a", "k", baz)); - EXPECT_TRUE(HasSpan("e", "f", baz, "name")); - EXPECT_TRUE(HasSpan("i", "j", qux)); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); - EXPECT_TRUE(HasSpan(bar)); - EXPECT_TRUE(HasSpan(bar, "name")); - EXPECT_TRUE(HasSpan(qux, "name")); -} - -TEST_F(SourceInfoTest, Enums) { - EXPECT_TRUE(Parse( - "/*a*/enum /*b*/Foo/*c*/ {}/*d*/\n" - "/*e*/enum /*f*/Bar/*g*/ {}/*h*/\n")); - - EXPECT_TRUE(HasSpan("a", "d", file_.enum_type(0))); - EXPECT_TRUE(HasSpan("b", "c", file_.enum_type(0), "name")); - EXPECT_TRUE(HasSpan("e", "h", file_.enum_type(1))); - EXPECT_TRUE(HasSpan("f", "g", file_.enum_type(1), "name")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); -} - -TEST_F(SourceInfoTest, EnumValues) { - EXPECT_TRUE(Parse( - "enum Foo {\n" - " /*a*/BAR/*b*/ = /*c*/1/*d*/;/*e*/\n" - " /*f*/BAZ/*g*/ = /*h*/2/*i*/;/*j*/\n" - "}")); - - const EnumValueDescriptorProto& bar = file_.enum_type(0).value(0); - const EnumValueDescriptorProto& baz = file_.enum_type(0).value(1); - - EXPECT_TRUE(HasSpan("a", "e", bar)); - EXPECT_TRUE(HasSpan("a", "b", bar, "name")); - EXPECT_TRUE(HasSpan("c", "d", bar, "number")); - EXPECT_TRUE(HasSpan("f", "j", baz)); - EXPECT_TRUE(HasSpan("f", "g", baz, "name")); - EXPECT_TRUE(HasSpan("h", "i", baz, "number")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.enum_type(0))); - EXPECT_TRUE(HasSpan(file_.enum_type(0), "name")); -} - -TEST_F(SourceInfoTest, NestedEnums) { - EXPECT_TRUE(Parse( - "message Foo {\n" - " /*a*/enum /*b*/Bar/*c*/ {}/*d*/\n" - " /*e*/enum /*f*/Baz/*g*/ {}/*h*/\n" - "}\n")); - - const EnumDescriptorProto& bar = file_.message_type(0).enum_type(0); - const EnumDescriptorProto& baz = file_.message_type(0).enum_type(1); - - EXPECT_TRUE(HasSpan("a", "d", bar)); - EXPECT_TRUE(HasSpan("b", "c", bar, "name")); - EXPECT_TRUE(HasSpan("e", "h", baz)); - EXPECT_TRUE(HasSpan("f", "g", baz, "name")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); -} - -TEST_F(SourceInfoTest, Services) { - EXPECT_TRUE(Parse( - "/*a*/service /*b*/Foo/*c*/ {}/*d*/\n" - "/*e*/service /*f*/Bar/*g*/ {}/*h*/\n")); - - EXPECT_TRUE(HasSpan("a", "d", file_.service(0))); - EXPECT_TRUE(HasSpan("b", "c", file_.service(0), "name")); - EXPECT_TRUE(HasSpan("e", "h", file_.service(1))); - EXPECT_TRUE(HasSpan("f", "g", file_.service(1), "name")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); -} - -TEST_F(SourceInfoTest, Methods) { - EXPECT_TRUE(Parse( - "service Foo {\n" - " /*a*/rpc /*b*/Bar/*c*/(/*d*/X/*e*/) returns(/*f*/Y/*g*/);/*h*/" - " /*i*/rpc /*j*/Baz/*k*/(/*l*/Z/*m*/) returns(/*n*/W/*o*/);/*p*/" - "}")); - - const MethodDescriptorProto& bar = file_.service(0).method(0); - const MethodDescriptorProto& baz = file_.service(0).method(1); - - EXPECT_TRUE(HasSpan("a", "h", bar)); - EXPECT_TRUE(HasSpan("b", "c", bar, "name")); - EXPECT_TRUE(HasSpan("d", "e", bar, "input_type")); - EXPECT_TRUE(HasSpan("f", "g", bar, "output_type")); - - EXPECT_TRUE(HasSpan("i", "p", baz)); - EXPECT_TRUE(HasSpan("j", "k", baz, "name")); - EXPECT_TRUE(HasSpan("l", "m", baz, "input_type")); - EXPECT_TRUE(HasSpan("n", "o", baz, "output_type")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.service(0))); - EXPECT_TRUE(HasSpan(file_.service(0), "name")); -} - -TEST_F(SourceInfoTest, Options) { - EXPECT_TRUE(Parse( - "/*a*/option /*b*/foo/*c*/./*d*/(/*e*/bar.baz/*f*/)/*g*/ = " - "/*h*/123/*i*/;/*j*/\n" - "/*k*/option qux = /*l*/-123/*m*/;/*n*/\n" - "/*o*/option corge = /*p*/abc/*q*/;/*r*/\n" - "/*s*/option grault = /*t*/'blah'/*u*/;/*v*/\n" - "/*w*/option garply = /*x*/{ yadda yadda }/*y*/;/*z*/\n" - "/*0*/option waldo = /*1*/123.0/*2*/;/*3*/\n" - )); - - const UninterpretedOption& option1 = file_.options().uninterpreted_option(0); - const UninterpretedOption& option2 = file_.options().uninterpreted_option(1); - const UninterpretedOption& option3 = file_.options().uninterpreted_option(2); - const UninterpretedOption& option4 = file_.options().uninterpreted_option(3); - const UninterpretedOption& option5 = file_.options().uninterpreted_option(4); - const UninterpretedOption& option6 = file_.options().uninterpreted_option(5); - - EXPECT_TRUE(HasSpan("a", "j", file_.options())); - EXPECT_TRUE(HasSpan("b", "i", option1)); - EXPECT_TRUE(HasSpan("b", "g", option1, "name")); - EXPECT_TRUE(HasSpan("b", "c", option1.name(0))); - EXPECT_TRUE(HasSpan("b", "c", option1.name(0), "name_part")); - EXPECT_TRUE(HasSpan("d", "g", option1.name(1))); - EXPECT_TRUE(HasSpan("e", "f", option1.name(1), "name_part")); - EXPECT_TRUE(HasSpan("h", "i", option1, "positive_int_value")); - - EXPECT_TRUE(HasSpan("k", "n", file_.options())); - EXPECT_TRUE(HasSpan("l", "m", option2, "negative_int_value")); - - EXPECT_TRUE(HasSpan("o", "r", file_.options())); - EXPECT_TRUE(HasSpan("p", "q", option3, "identifier_value")); - - EXPECT_TRUE(HasSpan("s", "v", file_.options())); - EXPECT_TRUE(HasSpan("t", "u", option4, "string_value")); - - EXPECT_TRUE(HasSpan("w", "z", file_.options())); - EXPECT_TRUE(HasSpan("x", "y", option5, "aggregate_value")); - - EXPECT_TRUE(HasSpan("0", "3", file_.options())); - EXPECT_TRUE(HasSpan("1", "2", option6, "double_value")); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(option2)); - EXPECT_TRUE(HasSpan(option3)); - EXPECT_TRUE(HasSpan(option4)); - EXPECT_TRUE(HasSpan(option5)); - EXPECT_TRUE(HasSpan(option6)); - EXPECT_TRUE(HasSpan(option2, "name")); - EXPECT_TRUE(HasSpan(option3, "name")); - EXPECT_TRUE(HasSpan(option4, "name")); - EXPECT_TRUE(HasSpan(option5, "name")); - EXPECT_TRUE(HasSpan(option6, "name")); - EXPECT_TRUE(HasSpan(option2.name(0))); - EXPECT_TRUE(HasSpan(option3.name(0))); - EXPECT_TRUE(HasSpan(option4.name(0))); - EXPECT_TRUE(HasSpan(option5.name(0))); - EXPECT_TRUE(HasSpan(option6.name(0))); - EXPECT_TRUE(HasSpan(option2.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option3.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option4.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option5.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option6.name(0), "name_part")); -} - -TEST_F(SourceInfoTest, ScopedOptions) { - EXPECT_TRUE(Parse( - "message Foo {\n" - " /*a*/option mopt = 1;/*b*/\n" - "}\n" - "enum Bar {\n" - " /*c*/option eopt = 1;/*d*/\n" - "}\n" - "service Baz {\n" - " /*e*/option sopt = 1;/*f*/\n" - " rpc M(X) returns(Y) {\n" - " /*g*/option mopt = 1;/*h*/\n" - " }\n" - "}\n")); - - EXPECT_TRUE(HasSpan("a", "b", file_.message_type(0).options())); - EXPECT_TRUE(HasSpan("c", "d", file_.enum_type(0).options())); - EXPECT_TRUE(HasSpan("e", "f", file_.service(0).options())); - EXPECT_TRUE(HasSpan("g", "h", file_.service(0).method(0).options())); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); - EXPECT_TRUE(HasSpan(file_.message_type(0).options() - .uninterpreted_option(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0).options() - .uninterpreted_option(0), "name")); - EXPECT_TRUE(HasSpan(file_.message_type(0).options() - .uninterpreted_option(0).name(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0).options() - .uninterpreted_option(0).name(0), "name_part")); - EXPECT_TRUE(HasSpan(file_.message_type(0).options() - .uninterpreted_option(0), "positive_int_value")); - EXPECT_TRUE(HasSpan(file_.enum_type(0))); - EXPECT_TRUE(HasSpan(file_.enum_type(0), "name")); - EXPECT_TRUE(HasSpan(file_.enum_type(0).options() - .uninterpreted_option(0))); - EXPECT_TRUE(HasSpan(file_.enum_type(0).options() - .uninterpreted_option(0), "name")); - EXPECT_TRUE(HasSpan(file_.enum_type(0).options() - .uninterpreted_option(0).name(0))); - EXPECT_TRUE(HasSpan(file_.enum_type(0).options() - .uninterpreted_option(0).name(0), "name_part")); - EXPECT_TRUE(HasSpan(file_.enum_type(0).options() - .uninterpreted_option(0), "positive_int_value")); - EXPECT_TRUE(HasSpan(file_.service(0))); - EXPECT_TRUE(HasSpan(file_.service(0), "name")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0))); - EXPECT_TRUE(HasSpan(file_.service(0).options() - .uninterpreted_option(0))); - EXPECT_TRUE(HasSpan(file_.service(0).options() - .uninterpreted_option(0), "name")); - EXPECT_TRUE(HasSpan(file_.service(0).options() - .uninterpreted_option(0).name(0))); - EXPECT_TRUE(HasSpan(file_.service(0).options() - .uninterpreted_option(0).name(0), "name_part")); - EXPECT_TRUE(HasSpan(file_.service(0).options() - .uninterpreted_option(0), "positive_int_value")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0), "name")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0), "input_type")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0), "output_type")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0).options() - .uninterpreted_option(0))); - EXPECT_TRUE(HasSpan(file_.service(0).method(0).options() - .uninterpreted_option(0), "name")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0).options() - .uninterpreted_option(0).name(0))); - EXPECT_TRUE(HasSpan(file_.service(0).method(0).options() - .uninterpreted_option(0).name(0), "name_part")); - EXPECT_TRUE(HasSpan(file_.service(0).method(0).options() - .uninterpreted_option(0), "positive_int_value")); -} - -TEST_F(SourceInfoTest, FieldOptions) { - // The actual "name = value" pairs are parsed by the same code as for - // top-level options so we won't re-test that -- just make sure that the - // syntax used for field options is understood. - EXPECT_TRUE(Parse( - "message Foo {" - " optional int32 bar = 1 " - "/*a*/[default=/*b*/123/*c*/,/*d*/opt1=123/*e*/," - "/*f*/opt2='hi'/*g*/]/*h*/;" - "}\n" - )); - - const FieldDescriptorProto& field = file_.message_type(0).field(0); - const UninterpretedOption& option1 = field.options().uninterpreted_option(0); - const UninterpretedOption& option2 = field.options().uninterpreted_option(1); - - EXPECT_TRUE(HasSpan("a", "h", field.options())); - EXPECT_TRUE(HasSpan("b", "c", field, "default_value")); - EXPECT_TRUE(HasSpan("d", "e", option1)); - EXPECT_TRUE(HasSpan("f", "g", option2)); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.message_type(0))); - EXPECT_TRUE(HasSpan(file_.message_type(0), "name")); - EXPECT_TRUE(HasSpan(field)); - EXPECT_TRUE(HasSpan(field, "label")); - EXPECT_TRUE(HasSpan(field, "type")); - EXPECT_TRUE(HasSpan(field, "name")); - EXPECT_TRUE(HasSpan(field, "number")); - EXPECT_TRUE(HasSpan(option1, "name")); - EXPECT_TRUE(HasSpan(option2, "name")); - EXPECT_TRUE(HasSpan(option1.name(0))); - EXPECT_TRUE(HasSpan(option2.name(0))); - EXPECT_TRUE(HasSpan(option1.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option2.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option1, "positive_int_value")); - EXPECT_TRUE(HasSpan(option2, "string_value")); -} - -TEST_F(SourceInfoTest, EnumValueOptions) { - // The actual "name = value" pairs are parsed by the same code as for - // top-level options so we won't re-test that -- just make sure that the - // syntax used for enum options is understood. - EXPECT_TRUE(Parse( - "enum Foo {" - " BAR = 1 /*a*/[/*b*/opt1=123/*c*/,/*d*/opt2='hi'/*e*/]/*f*/;" - "}\n" - )); - - const EnumValueDescriptorProto& value = file_.enum_type(0).value(0); - const UninterpretedOption& option1 = value.options().uninterpreted_option(0); - const UninterpretedOption& option2 = value.options().uninterpreted_option(1); - - EXPECT_TRUE(HasSpan("a", "f", value.options())); - EXPECT_TRUE(HasSpan("b", "c", option1)); - EXPECT_TRUE(HasSpan("d", "e", option2)); - - // Ignore these. - EXPECT_TRUE(HasSpan(file_)); - EXPECT_TRUE(HasSpan(file_.enum_type(0))); - EXPECT_TRUE(HasSpan(file_.enum_type(0), "name")); - EXPECT_TRUE(HasSpan(value)); - EXPECT_TRUE(HasSpan(value, "name")); - EXPECT_TRUE(HasSpan(value, "number")); - EXPECT_TRUE(HasSpan(option1, "name")); - EXPECT_TRUE(HasSpan(option2, "name")); - EXPECT_TRUE(HasSpan(option1.name(0))); - EXPECT_TRUE(HasSpan(option2.name(0))); - EXPECT_TRUE(HasSpan(option1.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option2.name(0), "name_part")); - EXPECT_TRUE(HasSpan(option1, "positive_int_value")); - EXPECT_TRUE(HasSpan(option2, "string_value")); -} - -// =================================================================== - -} // anonymous namespace - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.cc deleted file mode 100644 index 727f9421..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.cc +++ /dev/null @@ -1,163 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include - -#include -#include - -#ifdef _WIN32 -#include -#include -#ifndef STDIN_FILENO -#define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 -#endif -#else -#include -#endif - -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace compiler { - -class GeneratorResponseContext : public GeneratorContext { - public: - GeneratorResponseContext(CodeGeneratorResponse* response, - const vector& parsed_files) - : response_(response), - parsed_files_(parsed_files) {} - virtual ~GeneratorResponseContext() {} - - // implements GeneratorContext -------------------------------------- - - virtual io::ZeroCopyOutputStream* Open(const string& filename) { - CodeGeneratorResponse::File* file = response_->add_file(); - file->set_name(filename); - return new io::StringOutputStream(file->mutable_content()); - } - - virtual io::ZeroCopyOutputStream* OpenForInsert( - const string& filename, const string& insertion_point) { - CodeGeneratorResponse::File* file = response_->add_file(); - file->set_name(filename); - file->set_insertion_point(insertion_point); - return new io::StringOutputStream(file->mutable_content()); - } - - void ListParsedFiles(vector* output) { - *output = parsed_files_; - } - - private: - CodeGeneratorResponse* response_; - const vector& parsed_files_; -}; - -int PluginMain(int argc, char* argv[], const CodeGenerator* generator) { - - if (argc > 1) { - cerr << argv[0] << ": Unknown option: " << argv[1] << endl; - return 1; - } - -#ifdef _WIN32 - _setmode(STDIN_FILENO, _O_BINARY); - _setmode(STDOUT_FILENO, _O_BINARY); -#endif - - CodeGeneratorRequest request; - if (!request.ParseFromFileDescriptor(STDIN_FILENO)) { - cerr << argv[0] << ": protoc sent unparseable request to plugin." << endl; - return 1; - } - - DescriptorPool pool; - for (int i = 0; i < request.proto_file_size(); i++) { - const FileDescriptor* file = pool.BuildFile(request.proto_file(i)); - if (file == NULL) { - // BuildFile() already wrote an error message. - return 1; - } - } - - vector parsed_files; - for (int i = 0; i < request.file_to_generate_size(); i++) { - parsed_files.push_back(pool.FindFileByName(request.file_to_generate(i))); - if (parsed_files.back() == NULL) { - cerr << argv[0] << ": protoc asked plugin to generate a file but " - "did not provide a descriptor for the file: " - << request.file_to_generate(i) << endl; - return 1; - } - } - - CodeGeneratorResponse response; - GeneratorResponseContext context(&response, parsed_files); - - for (int i = 0; i < parsed_files.size(); i++) { - const FileDescriptor* file = parsed_files[i]; - - string error; - bool succeeded = generator->Generate( - file, request.parameter(), &context, &error); - - if (!succeeded && error.empty()) { - error = "Code generator returned false but provided no error " - "description."; - } - if (!error.empty()) { - response.set_error(file->name() + ": " + error); - break; - } - } - - if (!response.SerializeToFileDescriptor(STDOUT_FILENO)) { - cerr << argv[0] << ": Error writing to stdout." << endl; - return 1; - } - - return 0; -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.h deleted file mode 100644 index 64dfb1d2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.h +++ /dev/null @@ -1,73 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// Front-end for protoc code generator plugins written in C++. -// -// To implement a protoc plugin in C++, simply write an implementation of -// CodeGenerator, then create a main() function like: -// int main(int argc, char* argv[]) { -// MyCodeGenerator generator; -// return google::protobuf::compiler::PluginMain(argc, argv, &generator); -// } -// You must link your plugin against libprotobuf and libprotoc. -// -// To get protoc to use the plugin, do one of the following: -// * Place the plugin binary somewhere in the PATH and give it the name -// "protoc-gen-NAME" (replacing "NAME" with the name of your plugin). If you -// then invoke protoc with the parameter --NAME_out=OUT_DIR (again, replace -// "NAME" with your plugin's name), protoc will invoke your plugin to generate -// the output, which will be placed in OUT_DIR. -// * Place the plugin binary anywhere, with any name, and pass the --plugin -// parameter to protoc to direct it to your plugin like so: -// protoc --plugin=protoc-gen-NAME=path/to/mybinary --NAME_out=OUT_DIR -// On Windows, make sure to include the .exe suffix: -// protoc --plugin=protoc-gen-NAME=path/to/mybinary.exe --NAME_out=OUT_DIR - -#ifndef GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ -#define GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ - -#include - -namespace google { -namespace protobuf { -namespace compiler { - -class CodeGenerator; // code_generator.h - -// Implements main() for a protoc plugin exposing the given code generator. -int PluginMain(int argc, char* argv[], const CodeGenerator* generator); - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc deleted file mode 100644 index ad4b4deb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc +++ /dev/null @@ -1,1082 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include "google/protobuf/compiler/plugin.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace google { -namespace protobuf { -namespace compiler { - -namespace { - -const ::google::protobuf::Descriptor* CodeGeneratorRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - CodeGeneratorRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* CodeGeneratorResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - CodeGeneratorResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* CodeGeneratorResponse_File_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - CodeGeneratorResponse_File_reflection_ = NULL; - -} // namespace - - -void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "google/protobuf/compiler/plugin.proto"); - GOOGLE_CHECK(file != NULL); - CodeGeneratorRequest_descriptor_ = file->message_type(0); - static const int CodeGeneratorRequest_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_), - }; - CodeGeneratorRequest_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - CodeGeneratorRequest_descriptor_, - CodeGeneratorRequest::default_instance_, - CodeGeneratorRequest_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(CodeGeneratorRequest)); - CodeGeneratorResponse_descriptor_ = file->message_type(1); - static const int CodeGeneratorResponse_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_), - }; - CodeGeneratorResponse_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - CodeGeneratorResponse_descriptor_, - CodeGeneratorResponse::default_instance_, - CodeGeneratorResponse_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(CodeGeneratorResponse)); - CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0); - static const int CodeGeneratorResponse_File_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, insertion_point_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, content_), - }; - CodeGeneratorResponse_File_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - CodeGeneratorResponse_File_descriptor_, - CodeGeneratorResponse_File::default_instance_, - CodeGeneratorResponse_File_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(CodeGeneratorResponse_File)); -} - -namespace { - -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto); -} - -void protobuf_RegisterTypes(const ::std::string&) { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - CodeGeneratorRequest_descriptor_, &CodeGeneratorRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - CodeGeneratorResponse_descriptor_, &CodeGeneratorResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - CodeGeneratorResponse_File_descriptor_, &CodeGeneratorResponse_File::default_instance()); -} - -} // namespace - -void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - delete CodeGeneratorRequest::default_instance_; - delete CodeGeneratorRequest_reflection_; - delete CodeGeneratorResponse::default_instance_; - delete CodeGeneratorResponse_reflection_; - delete CodeGeneratorResponse_File::default_instance_; - delete CodeGeneratorResponse_File_reflection_; -} - -void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n%google/protobuf/compiler/plugin.proto\022" - "\030google.protobuf.compiler\032 google/protob" - "uf/descriptor.proto\"}\n\024CodeGeneratorRequ" - "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet" - "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr" - "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener" - "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003(" - "\01324.google.protobuf.compiler.CodeGenerat" - "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n" - "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\t", 399); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes); - CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest(); - CodeGeneratorResponse::default_instance_ = new CodeGeneratorResponse(); - CodeGeneratorResponse_File::default_instance_ = new CodeGeneratorResponse_File(); - CodeGeneratorRequest::default_instance_->InitAsDefaultInstance(); - CodeGeneratorResponse::default_instance_->InitAsDefaultInstance(); - CodeGeneratorResponse_File::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto { - StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - } -} static_descriptor_initializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto_; - - -// =================================================================== - -#ifndef _MSC_VER -const int CodeGeneratorRequest::kFileToGenerateFieldNumber; -const int CodeGeneratorRequest::kParameterFieldNumber; -const int CodeGeneratorRequest::kProtoFileFieldNumber; -#endif // !_MSC_VER - -CodeGeneratorRequest::CodeGeneratorRequest() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void CodeGeneratorRequest::InitAsDefaultInstance() { -} - -CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void CodeGeneratorRequest::SharedCtor() { - _cached_size_ = 0; - parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -CodeGeneratorRequest::~CodeGeneratorRequest() { - SharedDtor(); -} - -void CodeGeneratorRequest::SharedDtor() { - if (parameter_ != &::google::protobuf::internal::kEmptyString) { - delete parameter_; - } - if (this != default_instance_) { - } -} - -void CodeGeneratorRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return CodeGeneratorRequest_descriptor_; -} - -const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; -} - -CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL; - -CodeGeneratorRequest* CodeGeneratorRequest::New() const { - return new CodeGeneratorRequest; -} - -void CodeGeneratorRequest::Clear() { - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (has_parameter()) { - if (parameter_ != &::google::protobuf::internal::kEmptyString) { - parameter_->clear(); - } - } - } - file_to_generate_.Clear(); - proto_file_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool CodeGeneratorRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated string file_to_generate = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_file_to_generate: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_file_to_generate())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_to_generate(0).data(), this->file_to_generate(0).length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(10)) goto parse_file_to_generate; - if (input->ExpectTag(18)) goto parse_parameter; - break; - } - - // optional string parameter = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_parameter: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_parameter())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->parameter().data(), this->parameter().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(122)) goto parse_proto_file; - break; - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - case 15: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_proto_file: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_proto_file())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(122)) goto parse_proto_file; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void CodeGeneratorRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated string file_to_generate = 1; - for (int i = 0; i < this->file_to_generate_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_to_generate(i).data(), this->file_to_generate(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->file_to_generate(i), output); - } - - // optional string parameter = 2; - if (has_parameter()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->parameter().data(), this->parameter().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->parameter(), output); - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - for (int i = 0; i < this->proto_file_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 15, this->proto_file(i), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* CodeGeneratorRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated string file_to_generate = 1; - for (int i = 0; i < this->file_to_generate_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->file_to_generate(i).data(), this->file_to_generate(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(1, this->file_to_generate(i), target); - } - - // optional string parameter = 2; - if (has_parameter()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->parameter().data(), this->parameter().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->parameter(), target); - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - for (int i = 0; i < this->proto_file_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 15, this->proto_file(i), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int CodeGeneratorRequest::ByteSize() const { - int total_size = 0; - - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - // optional string parameter = 2; - if (has_parameter()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->parameter()); - } - - } - // repeated string file_to_generate = 1; - total_size += 1 * this->file_to_generate_size(); - for (int i = 0; i < this->file_to_generate_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->file_to_generate(i)); - } - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - total_size += 1 * this->proto_file_size(); - for (int i = 0; i < this->proto_file_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->proto_file(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const CodeGeneratorRequest* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { - GOOGLE_CHECK_NE(&from, this); - file_to_generate_.MergeFrom(from.file_to_generate_); - proto_file_.MergeFrom(from.proto_file_); - if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (from.has_parameter()) { - set_parameter(from.parameter()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool CodeGeneratorRequest::IsInitialized() const { - - for (int i = 0; i < proto_file_size(); i++) { - if (!this->proto_file(i).IsInitialized()) return false; - } - return true; -} - -void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) { - if (other != this) { - file_to_generate_.Swap(&other->file_to_generate_); - std::swap(parameter_, other->parameter_); - proto_file_.Swap(&other->proto_file_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = CodeGeneratorRequest_descriptor_; - metadata.reflection = CodeGeneratorRequest_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int CodeGeneratorResponse_File::kNameFieldNumber; -const int CodeGeneratorResponse_File::kInsertionPointFieldNumber; -const int CodeGeneratorResponse_File::kContentFieldNumber; -#endif // !_MSC_VER - -CodeGeneratorResponse_File::CodeGeneratorResponse_File() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void CodeGeneratorResponse_File::InitAsDefaultInstance() { -} - -CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void CodeGeneratorResponse_File::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { - SharedDtor(); -} - -void CodeGeneratorResponse_File::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (insertion_point_ != &::google::protobuf::internal::kEmptyString) { - delete insertion_point_; - } - if (content_ != &::google::protobuf::internal::kEmptyString) { - delete content_; - } - if (this != default_instance_) { - } -} - -void CodeGeneratorResponse_File::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() { - protobuf_AssignDescriptorsOnce(); - return CodeGeneratorResponse_File_descriptor_; -} - -const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; -} - -CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL; - -CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const { - return new CodeGeneratorResponse_File; -} - -void CodeGeneratorResponse_File::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_insertion_point()) { - if (insertion_point_ != &::google::protobuf::internal::kEmptyString) { - insertion_point_->clear(); - } - } - if (has_content()) { - if (content_ != &::google::protobuf::internal::kEmptyString) { - content_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool CodeGeneratorResponse_File::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_insertion_point; - break; - } - - // optional string insertion_point = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_insertion_point: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_insertion_point())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->insertion_point().data(), this->insertion_point().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(122)) goto parse_content; - break; - } - - // optional string content = 15; - case 15: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_content: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_content())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->content().data(), this->content().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void CodeGeneratorResponse_File::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // optional string insertion_point = 2; - if (has_insertion_point()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->insertion_point().data(), this->insertion_point().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->insertion_point(), output); - } - - // optional string content = 15; - if (has_content()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->content().data(), this->content().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 15, this->content(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // optional string insertion_point = 2; - if (has_insertion_point()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->insertion_point().data(), this->insertion_point().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->insertion_point(), target); - } - - // optional string content = 15; - if (has_content()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->content().data(), this->content().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 15, this->content(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int CodeGeneratorResponse_File::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional string insertion_point = 2; - if (has_insertion_point()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->insertion_point()); - } - - // optional string content = 15; - if (has_content()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->content()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const CodeGeneratorResponse_File* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_insertion_point()) { - set_insertion_point(from.insertion_point()); - } - if (from.has_content()) { - set_content(from.content()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool CodeGeneratorResponse_File::IsInitialized() const { - - return true; -} - -void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(insertion_point_, other->insertion_point_); - std::swap(content_, other->content_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = CodeGeneratorResponse_File_descriptor_; - metadata.reflection = CodeGeneratorResponse_File_reflection_; - return metadata; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int CodeGeneratorResponse::kErrorFieldNumber; -const int CodeGeneratorResponse::kFileFieldNumber; -#endif // !_MSC_VER - -CodeGeneratorResponse::CodeGeneratorResponse() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void CodeGeneratorResponse::InitAsDefaultInstance() { -} - -CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void CodeGeneratorResponse::SharedCtor() { - _cached_size_ = 0; - error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -CodeGeneratorResponse::~CodeGeneratorResponse() { - SharedDtor(); -} - -void CodeGeneratorResponse::SharedDtor() { - if (error_ != &::google::protobuf::internal::kEmptyString) { - delete error_; - } - if (this != default_instance_) { - } -} - -void CodeGeneratorResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return CodeGeneratorResponse_descriptor_; -} - -const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_; -} - -CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL; - -CodeGeneratorResponse* CodeGeneratorResponse::New() const { - return new CodeGeneratorResponse; -} - -void CodeGeneratorResponse::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_error()) { - if (error_ != &::google::protobuf::internal::kEmptyString) { - error_->clear(); - } - } - } - file_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool CodeGeneratorResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string error = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_error())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->error().data(), this->error().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(122)) goto parse_file; - break; - } - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - case 15: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_file: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_file())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(122)) goto parse_file; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void CodeGeneratorResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string error = 1; - if (has_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->error().data(), this->error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->error(), output); - } - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - for (int i = 0; i < this->file_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 15, this->file(i), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string error = 1; - if (has_error()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->error().data(), this->error().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->error(), target); - } - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - for (int i = 0; i < this->file_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 15, this->file(i), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int CodeGeneratorResponse::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string error = 1; - if (has_error()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->error()); - } - - } - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - total_size += 1 * this->file_size(); - for (int i = 0; i < this->file_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->file(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const CodeGeneratorResponse* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) { - GOOGLE_CHECK_NE(&from, this); - file_.MergeFrom(from.file_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_error()) { - set_error(from.error()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool CodeGeneratorResponse::IsInitialized() const { - - return true; -} - -void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) { - if (other != this) { - std::swap(error_, other->error_); - file_.Swap(&other->file_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = CodeGeneratorResponse_descriptor_; - metadata.reflection = CodeGeneratorResponse_reflection_; - return metadata; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace compiler -} // namespace protobuf -} // namespace google - -// @@protoc_insertion_point(global_scope) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.h deleted file mode 100644 index 14216c2a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.h +++ /dev/null @@ -1,790 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/compiler/plugin.proto - -#ifndef PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED -#define PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED - -#include - -#include - -#if GOOGLE_PROTOBUF_VERSION < 2004000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include "google/protobuf/descriptor.pb.h" -// @@protoc_insertion_point(includes) - -namespace google { -namespace protobuf { -namespace compiler { - -// Internal implementation detail -- do not call these. -void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); -void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); -void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - -class CodeGeneratorRequest; -class CodeGeneratorResponse; -class CodeGeneratorResponse_File; - -// =================================================================== - -class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message { - public: - CodeGeneratorRequest(); - virtual ~CodeGeneratorRequest(); - - CodeGeneratorRequest(const CodeGeneratorRequest& from); - - inline CodeGeneratorRequest& operator=(const CodeGeneratorRequest& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const CodeGeneratorRequest& default_instance(); - - void Swap(CodeGeneratorRequest* other); - - // implements Message ---------------------------------------------- - - CodeGeneratorRequest* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const CodeGeneratorRequest& from); - void MergeFrom(const CodeGeneratorRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated string file_to_generate = 1; - inline int file_to_generate_size() const; - inline void clear_file_to_generate(); - static const int kFileToGenerateFieldNumber = 1; - inline const ::std::string& file_to_generate(int index) const; - inline ::std::string* mutable_file_to_generate(int index); - inline void set_file_to_generate(int index, const ::std::string& value); - inline void set_file_to_generate(int index, const char* value); - inline void set_file_to_generate(int index, const char* value, size_t size); - inline ::std::string* add_file_to_generate(); - inline void add_file_to_generate(const ::std::string& value); - inline void add_file_to_generate(const char* value); - inline void add_file_to_generate(const char* value, size_t size); - inline const ::google::protobuf::RepeatedPtrField< ::std::string>& file_to_generate() const; - inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_to_generate(); - - // optional string parameter = 2; - inline bool has_parameter() const; - inline void clear_parameter(); - static const int kParameterFieldNumber = 2; - inline const ::std::string& parameter() const; - inline void set_parameter(const ::std::string& value); - inline void set_parameter(const char* value); - inline void set_parameter(const char* value, size_t size); - inline ::std::string* mutable_parameter(); - inline ::std::string* release_parameter(); - - // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - inline int proto_file_size() const; - inline void clear_proto_file(); - static const int kProtoFileFieldNumber = 15; - inline const ::google::protobuf::FileDescriptorProto& proto_file(int index) const; - inline ::google::protobuf::FileDescriptorProto* mutable_proto_file(int index); - inline ::google::protobuf::FileDescriptorProto* add_proto_file(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& - proto_file() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* - mutable_proto_file(); - - // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest) - private: - inline void set_has_parameter(); - inline void clear_has_parameter(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::std::string> file_to_generate_; - ::std::string* parameter_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - - void InitAsDefaultInstance(); - static CodeGeneratorRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::Message { - public: - CodeGeneratorResponse_File(); - virtual ~CodeGeneratorResponse_File(); - - CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from); - - inline CodeGeneratorResponse_File& operator=(const CodeGeneratorResponse_File& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const CodeGeneratorResponse_File& default_instance(); - - void Swap(CodeGeneratorResponse_File* other); - - // implements Message ---------------------------------------------- - - CodeGeneratorResponse_File* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const CodeGeneratorResponse_File& from); - void MergeFrom(const CodeGeneratorResponse_File& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // optional string insertion_point = 2; - inline bool has_insertion_point() const; - inline void clear_insertion_point(); - static const int kInsertionPointFieldNumber = 2; - inline const ::std::string& insertion_point() const; - inline void set_insertion_point(const ::std::string& value); - inline void set_insertion_point(const char* value); - inline void set_insertion_point(const char* value, size_t size); - inline ::std::string* mutable_insertion_point(); - inline ::std::string* release_insertion_point(); - - // optional string content = 15; - inline bool has_content() const; - inline void clear_content(); - static const int kContentFieldNumber = 15; - inline const ::std::string& content() const; - inline void set_content(const ::std::string& value); - inline void set_content(const char* value); - inline void set_content(const char* value, size_t size); - inline ::std::string* mutable_content(); - inline ::std::string* release_content(); - - // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_insertion_point(); - inline void clear_has_insertion_point(); - inline void set_has_content(); - inline void clear_has_content(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::std::string* insertion_point_; - ::std::string* content_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - - void InitAsDefaultInstance(); - static CodeGeneratorResponse_File* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Message { - public: - CodeGeneratorResponse(); - virtual ~CodeGeneratorResponse(); - - CodeGeneratorResponse(const CodeGeneratorResponse& from); - - inline CodeGeneratorResponse& operator=(const CodeGeneratorResponse& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const CodeGeneratorResponse& default_instance(); - - void Swap(CodeGeneratorResponse* other); - - // implements Message ---------------------------------------------- - - CodeGeneratorResponse* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const CodeGeneratorResponse& from); - void MergeFrom(const CodeGeneratorResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef CodeGeneratorResponse_File File; - - // accessors ------------------------------------------------------- - - // optional string error = 1; - inline bool has_error() const; - inline void clear_error(); - static const int kErrorFieldNumber = 1; - inline const ::std::string& error() const; - inline void set_error(const ::std::string& value); - inline void set_error(const char* value); - inline void set_error(const char* value, size_t size); - inline ::std::string* mutable_error(); - inline ::std::string* release_error(); - - // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - inline int file_size() const; - inline void clear_file(); - static const int kFileFieldNumber = 15; - inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& file(int index) const; - inline ::google::protobuf::compiler::CodeGeneratorResponse_File* mutable_file(int index); - inline ::google::protobuf::compiler::CodeGeneratorResponse_File* add_file(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >& - file() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >* - mutable_file(); - - // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse) - private: - inline void set_has_error(); - inline void clear_has_error(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* error_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); - - void InitAsDefaultInstance(); - static CodeGeneratorResponse* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -// CodeGeneratorRequest - -// repeated string file_to_generate = 1; -inline int CodeGeneratorRequest::file_to_generate_size() const { - return file_to_generate_.size(); -} -inline void CodeGeneratorRequest::clear_file_to_generate() { - file_to_generate_.Clear(); -} -inline const ::std::string& CodeGeneratorRequest::file_to_generate(int index) const { - return file_to_generate_.Get(index); -} -inline ::std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) { - return file_to_generate_.Mutable(index); -} -inline void CodeGeneratorRequest::set_file_to_generate(int index, const ::std::string& value) { - file_to_generate_.Mutable(index)->assign(value); -} -inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) { - file_to_generate_.Mutable(index)->assign(value); -} -inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) { - file_to_generate_.Mutable(index)->assign( - reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorRequest::add_file_to_generate() { - return file_to_generate_.Add(); -} -inline void CodeGeneratorRequest::add_file_to_generate(const ::std::string& value) { - file_to_generate_.Add()->assign(value); -} -inline void CodeGeneratorRequest::add_file_to_generate(const char* value) { - file_to_generate_.Add()->assign(value); -} -inline void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) { - file_to_generate_.Add()->assign(reinterpret_cast(value), size); -} -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -CodeGeneratorRequest::file_to_generate() const { - return file_to_generate_; -} -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -CodeGeneratorRequest::mutable_file_to_generate() { - return &file_to_generate_; -} - -// optional string parameter = 2; -inline bool CodeGeneratorRequest::has_parameter() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void CodeGeneratorRequest::set_has_parameter() { - _has_bits_[0] |= 0x00000002u; -} -inline void CodeGeneratorRequest::clear_has_parameter() { - _has_bits_[0] &= ~0x00000002u; -} -inline void CodeGeneratorRequest::clear_parameter() { - if (parameter_ != &::google::protobuf::internal::kEmptyString) { - parameter_->clear(); - } - clear_has_parameter(); -} -inline const ::std::string& CodeGeneratorRequest::parameter() const { - return *parameter_; -} -inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) { - set_has_parameter(); - if (parameter_ == &::google::protobuf::internal::kEmptyString) { - parameter_ = new ::std::string; - } - parameter_->assign(value); -} -inline void CodeGeneratorRequest::set_parameter(const char* value) { - set_has_parameter(); - if (parameter_ == &::google::protobuf::internal::kEmptyString) { - parameter_ = new ::std::string; - } - parameter_->assign(value); -} -inline void CodeGeneratorRequest::set_parameter(const char* value, size_t size) { - set_has_parameter(); - if (parameter_ == &::google::protobuf::internal::kEmptyString) { - parameter_ = new ::std::string; - } - parameter_->assign(reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorRequest::mutable_parameter() { - set_has_parameter(); - if (parameter_ == &::google::protobuf::internal::kEmptyString) { - parameter_ = new ::std::string; - } - return parameter_; -} -inline ::std::string* CodeGeneratorRequest::release_parameter() { - clear_has_parameter(); - if (parameter_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = parameter_; - parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.FileDescriptorProto proto_file = 15; -inline int CodeGeneratorRequest::proto_file_size() const { - return proto_file_.size(); -} -inline void CodeGeneratorRequest::clear_proto_file() { - proto_file_.Clear(); -} -inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const { - return proto_file_.Get(index); -} -inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) { - return proto_file_.Mutable(index); -} -inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() { - return proto_file_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& -CodeGeneratorRequest::proto_file() const { - return proto_file_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* -CodeGeneratorRequest::mutable_proto_file() { - return &proto_file_; -} - -// ------------------------------------------------------------------- - -// CodeGeneratorResponse_File - -// optional string name = 1; -inline bool CodeGeneratorResponse_File::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void CodeGeneratorResponse_File::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void CodeGeneratorResponse_File::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void CodeGeneratorResponse_File::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& CodeGeneratorResponse_File::name() const { - return *name_; -} -inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void CodeGeneratorResponse_File::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void CodeGeneratorResponse_File::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorResponse_File::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* CodeGeneratorResponse_File::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string insertion_point = 2; -inline bool CodeGeneratorResponse_File::has_insertion_point() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void CodeGeneratorResponse_File::set_has_insertion_point() { - _has_bits_[0] |= 0x00000002u; -} -inline void CodeGeneratorResponse_File::clear_has_insertion_point() { - _has_bits_[0] &= ~0x00000002u; -} -inline void CodeGeneratorResponse_File::clear_insertion_point() { - if (insertion_point_ != &::google::protobuf::internal::kEmptyString) { - insertion_point_->clear(); - } - clear_has_insertion_point(); -} -inline const ::std::string& CodeGeneratorResponse_File::insertion_point() const { - return *insertion_point_; -} -inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) { - set_has_insertion_point(); - if (insertion_point_ == &::google::protobuf::internal::kEmptyString) { - insertion_point_ = new ::std::string; - } - insertion_point_->assign(value); -} -inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) { - set_has_insertion_point(); - if (insertion_point_ == &::google::protobuf::internal::kEmptyString) { - insertion_point_ = new ::std::string; - } - insertion_point_->assign(value); -} -inline void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) { - set_has_insertion_point(); - if (insertion_point_ == &::google::protobuf::internal::kEmptyString) { - insertion_point_ = new ::std::string; - } - insertion_point_->assign(reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() { - set_has_insertion_point(); - if (insertion_point_ == &::google::protobuf::internal::kEmptyString) { - insertion_point_ = new ::std::string; - } - return insertion_point_; -} -inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() { - clear_has_insertion_point(); - if (insertion_point_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = insertion_point_; - insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string content = 15; -inline bool CodeGeneratorResponse_File::has_content() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void CodeGeneratorResponse_File::set_has_content() { - _has_bits_[0] |= 0x00000004u; -} -inline void CodeGeneratorResponse_File::clear_has_content() { - _has_bits_[0] &= ~0x00000004u; -} -inline void CodeGeneratorResponse_File::clear_content() { - if (content_ != &::google::protobuf::internal::kEmptyString) { - content_->clear(); - } - clear_has_content(); -} -inline const ::std::string& CodeGeneratorResponse_File::content() const { - return *content_; -} -inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) { - set_has_content(); - if (content_ == &::google::protobuf::internal::kEmptyString) { - content_ = new ::std::string; - } - content_->assign(value); -} -inline void CodeGeneratorResponse_File::set_content(const char* value) { - set_has_content(); - if (content_ == &::google::protobuf::internal::kEmptyString) { - content_ = new ::std::string; - } - content_->assign(value); -} -inline void CodeGeneratorResponse_File::set_content(const char* value, size_t size) { - set_has_content(); - if (content_ == &::google::protobuf::internal::kEmptyString) { - content_ = new ::std::string; - } - content_->assign(reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorResponse_File::mutable_content() { - set_has_content(); - if (content_ == &::google::protobuf::internal::kEmptyString) { - content_ = new ::std::string; - } - return content_; -} -inline ::std::string* CodeGeneratorResponse_File::release_content() { - clear_has_content(); - if (content_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = content_; - content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - -// CodeGeneratorResponse - -// optional string error = 1; -inline bool CodeGeneratorResponse::has_error() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void CodeGeneratorResponse::set_has_error() { - _has_bits_[0] |= 0x00000001u; -} -inline void CodeGeneratorResponse::clear_has_error() { - _has_bits_[0] &= ~0x00000001u; -} -inline void CodeGeneratorResponse::clear_error() { - if (error_ != &::google::protobuf::internal::kEmptyString) { - error_->clear(); - } - clear_has_error(); -} -inline const ::std::string& CodeGeneratorResponse::error() const { - return *error_; -} -inline void CodeGeneratorResponse::set_error(const ::std::string& value) { - set_has_error(); - if (error_ == &::google::protobuf::internal::kEmptyString) { - error_ = new ::std::string; - } - error_->assign(value); -} -inline void CodeGeneratorResponse::set_error(const char* value) { - set_has_error(); - if (error_ == &::google::protobuf::internal::kEmptyString) { - error_ = new ::std::string; - } - error_->assign(value); -} -inline void CodeGeneratorResponse::set_error(const char* value, size_t size) { - set_has_error(); - if (error_ == &::google::protobuf::internal::kEmptyString) { - error_ = new ::std::string; - } - error_->assign(reinterpret_cast(value), size); -} -inline ::std::string* CodeGeneratorResponse::mutable_error() { - set_has_error(); - if (error_ == &::google::protobuf::internal::kEmptyString) { - error_ = new ::std::string; - } - return error_; -} -inline ::std::string* CodeGeneratorResponse::release_error() { - clear_has_error(); - if (error_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = error_; - error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; -inline int CodeGeneratorResponse::file_size() const { - return file_.size(); -} -inline void CodeGeneratorResponse::clear_file() { - file_.Clear(); -} -inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const { - return file_.Get(index); -} -inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) { - return file_.Mutable(index); -} -inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() { - return file_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >& -CodeGeneratorResponse::file() const { - return file_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >* -CodeGeneratorResponse::mutable_file() { - return &file_; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace compiler -} // namespace protobuf -} // namespace google - -#ifndef SWIG -namespace google { -namespace protobuf { - - -} // namespace google -} // namespace protobuf -#endif // SWIG - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.proto deleted file mode 100644 index 651ed10c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to -// change. -// -// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is -// just a program that reads a CodeGeneratorRequest from stdin and writes a -// CodeGeneratorResponse to stdout. -// -// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead -// of dealing with the raw protocol defined here. -// -// A plugin executable needs only to be placed somewhere in the path. The -// plugin should be named "protoc-gen-$NAME", and will then be used when the -// flag "--${NAME}_out" is passed to protoc. - -package google.protobuf.compiler; - -import "google/protobuf/descriptor.proto"; - -// An encoded CodeGeneratorRequest is written to the plugin's stdin. -message CodeGeneratorRequest { - // The .proto files that were explicitly listed on the command-line. The - // code generator should generate code only for these files. Each file's - // descriptor will be included in proto_file, below. - repeated string file_to_generate = 1; - - // The generator parameter passed on the command-line. - optional string parameter = 2; - - // FileDescriptorProtos for all files in files_to_generate and everything - // they import. The files will appear in topological order, so each file - // appears before any file that imports it. - // - // protoc guarantees that all proto_files will be written after - // the fields above, even though this is not technically guaranteed by the - // protobuf wire format. This theoretically could allow a plugin to stream - // in the FileDescriptorProtos and handle them one by one rather than read - // the entire set into memory at once. However, as of this writing, this - // is not similarly optimized on protoc's end -- it will store all fields in - // memory at once before sending them to the plugin. - repeated FileDescriptorProto proto_file = 15; -} - -// The plugin writes an encoded CodeGeneratorResponse to stdout. -message CodeGeneratorResponse { - // Error message. If non-empty, code generation failed. The plugin process - // should exit with status code zero even if it reports an error in this way. - // - // This should be used to indicate errors in .proto files which prevent the - // code generator from generating correct code. Errors which indicate a - // problem in protoc itself -- such as the input CodeGeneratorRequest being - // unparseable -- should be reported by writing a message to stderr and - // exiting with a non-zero status code. - optional string error = 1; - - // Represents a single generated file. - message File { - // The file name, relative to the output directory. The name must not - // contain "." or ".." components and must be relative, not be absolute (so, - // the file cannot lie outside the output directory). "/" must be used as - // the path separator, not "\". - // - // If the name is omitted, the content will be appended to the previous - // file. This allows the generator to break large files into small chunks, - // and allows the generated text to be streamed back to protoc so that large - // files need not reside completely in memory at one time. Note that as of - // this writing protoc does not optimize for this -- it will read the entire - // CodeGeneratorResponse before writing files to disk. - optional string name = 1; - - // If non-empty, indicates that the named file should already exist, and the - // content here is to be inserted into that file at a defined insertion - // point. This feature allows a code generator to extend the output - // produced by another code generator. The original generator may provide - // insertion points by placing special annotations in the file that look - // like: - // @@protoc_insertion_point(NAME) - // The annotation can have arbitrary text before and after it on the line, - // which allows it to be placed in a comment. NAME should be replaced with - // an identifier naming the point -- this is what other generators will use - // as the insertion_point. Code inserted at this point will be placed - // immediately above the line containing the insertion point (thus multiple - // insertions to the same point will come out in the order they were added). - // The double-@ is intended to make it unlikely that the generated code - // could contain things that look like insertion points by accident. - // - // For example, the C++ code generator places the following line in the - // .pb.h files that it generates: - // // @@protoc_insertion_point(namespace_scope) - // This line appears within the scope of the file's package namespace, but - // outside of any particular class. Another plugin can then specify the - // insertion_point "namespace_scope" to generate additional classes or - // other declarations that should be placed in this scope. - // - // Note that if the line containing the insertion point begins with - // whitespace, the same whitespace will be added to every line of the - // inserted text. This is useful for languages like Python, where - // indentation matters. In these languages, the insertion point comment - // should be indented the same amount as any inserted code will need to be - // in order to work correctly in that context. - // - // The code generator that generates the initial file and the one which - // inserts into it must both run as part of a single invocation of protoc. - // Code generators are executed in the order in which they appear on the - // command line. - // - // If |insertion_point| is present, |name| must also be present. - optional string insertion_point = 2; - - // The file contents. - optional string content = 15; - } - repeated File file = 15; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.cc deleted file mode 100644 index 9b109378..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.cc +++ /dev/null @@ -1,1006 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: robinson@google.com (Will Robinson) -// -// This module outputs pure-Python protocol message classes that will -// largely be constructed at runtime via the metaclass in reflection.py. -// In other words, our job is basically to output a Python equivalent -// of the C++ *Descriptor objects, and fix up all circular references -// within these objects. -// -// Note that the runtime performance of protocol message classes created in -// this way is expected to be lousy. The plan is to create an alternate -// generator that outputs a Python/C extension module that lets -// performance-minded Python code leverage the fast C++ implementation -// directly. - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace python { - -namespace { - -// Returns a copy of |filename| with any trailing ".protodevel" or ".proto -// suffix stripped. -// TODO(robinson): Unify with copy in compiler/cpp/internal/helpers.cc. -string StripProto(const string& filename) { - const char* suffix = HasSuffixString(filename, ".protodevel") - ? ".protodevel" : ".proto"; - return StripSuffixString(filename, suffix); -} - - -// Returns the Python module name expected for a given .proto filename. -string ModuleName(const string& filename) { - string basename = StripProto(filename); - StripString(&basename, "-", '_'); - StripString(&basename, "/", '.'); - return basename + "_pb2"; -} - - -// Returns the name of all containing types for descriptor, -// in order from outermost to innermost, followed by descriptor's -// own name. Each name is separated by |separator|. -template -string NamePrefixedWithNestedTypes(const DescriptorT& descriptor, - const string& separator) { - string name = descriptor.name(); - for (const Descriptor* current = descriptor.containing_type(); - current != NULL; current = current->containing_type()) { - name = current->name() + separator + name; - } - return name; -} - - -// Name of the class attribute where we store the Python -// descriptor.Descriptor instance for the generated class. -// Must stay consistent with the _DESCRIPTOR_KEY constant -// in proto2/public/reflection.py. -const char kDescriptorKey[] = "DESCRIPTOR"; - - -// Should we generate generic services for this file? -inline bool HasGenericServices(const FileDescriptor *file) { - return file->service_count() > 0 && - file->options().py_generic_services(); -} - - -// Prints the common boilerplate needed at the top of every .py -// file output by this generator. -void PrintTopBoilerplate( - io::Printer* printer, const FileDescriptor* file, bool descriptor_proto) { - // TODO(robinson): Allow parameterization of Python version? - printer->Print( - "# Generated by the protocol buffer compiler. DO NOT EDIT!\n" - "\n" - "from google.protobuf import descriptor\n" - "from google.protobuf import message\n" - "from google.protobuf import reflection\n"); - if (HasGenericServices(file)) { - printer->Print( - "from google.protobuf import service\n" - "from google.protobuf import service_reflection\n"); - } - - // Avoid circular imports if this module is descriptor_pb2. - if (!descriptor_proto) { - printer->Print( - "from google.protobuf import descriptor_pb2\n"); - } - printer->Print( - "# @@protoc_insertion_point(imports)\n"); - printer->Print("\n\n"); -} - - -// Returns a Python literal giving the default value for a field. -// If the field specifies no explicit default value, we'll return -// the default default value for the field type (zero for numbers, -// empty string for strings, empty list for repeated fields, and -// None for non-repeated, composite fields). -// -// TODO(robinson): Unify with code from -// //compiler/cpp/internal/primitive_field.cc -// //compiler/cpp/internal/enum_field.cc -// //compiler/cpp/internal/string_field.cc -string StringifyDefaultValue(const FieldDescriptor& field) { - if (field.is_repeated()) { - return "[]"; - } - - switch (field.cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - return SimpleItoa(field.default_value_int32()); - case FieldDescriptor::CPPTYPE_UINT32: - return SimpleItoa(field.default_value_uint32()); - case FieldDescriptor::CPPTYPE_INT64: - return SimpleItoa(field.default_value_int64()); - case FieldDescriptor::CPPTYPE_UINT64: - return SimpleItoa(field.default_value_uint64()); - case FieldDescriptor::CPPTYPE_DOUBLE: { - double value = field.default_value_double(); - if (value == numeric_limits::infinity()) { - // Python pre-2.6 on Windows does not parse "inf" correctly. However, - // a numeric literal that is too big for a double will become infinity. - return "1e10000"; - } else if (value == -numeric_limits::infinity()) { - // See above. - return "-1e10000"; - } else if (value != value) { - // infinity * 0 = nan - return "(1e10000 * 0)"; - } else { - return SimpleDtoa(value); - } - } - case FieldDescriptor::CPPTYPE_FLOAT: { - float value = field.default_value_float(); - if (value == numeric_limits::infinity()) { - // Python pre-2.6 on Windows does not parse "inf" correctly. However, - // a numeric literal that is too big for a double will become infinity. - return "1e10000"; - } else if (value == -numeric_limits::infinity()) { - // See above. - return "-1e10000"; - } else if (value != value) { - // infinity - infinity = nan - return "(1e10000 * 0)"; - } else { - return SimpleFtoa(value); - } - } - case FieldDescriptor::CPPTYPE_BOOL: - return field.default_value_bool() ? "True" : "False"; - case FieldDescriptor::CPPTYPE_ENUM: - return SimpleItoa(field.default_value_enum()->number()); - case FieldDescriptor::CPPTYPE_STRING: - if (field.type() == FieldDescriptor::TYPE_STRING) { - return "unicode(\"" + CEscape(field.default_value_string()) + - "\", \"utf-8\")"; - } else { - return "\"" + CEscape(field.default_value_string()) + "\""; - } - case FieldDescriptor::CPPTYPE_MESSAGE: - return "None"; - } - // (We could add a default case above but then we wouldn't get the nice - // compiler warning when a new type is added.) - GOOGLE_LOG(FATAL) << "Not reached."; - return ""; -} - - - -} // namespace - - -Generator::Generator() : file_(NULL) { -} - -Generator::~Generator() { -} - -bool Generator::Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - - // Completely serialize all Generate() calls on this instance. The - // thread-safety constraints of the CodeGenerator interface aren't clear so - // just be as conservative as possible. It's easier to relax this later if - // we need to, but I doubt it will be an issue. - // TODO(kenton): The proper thing to do would be to allocate any state on - // the stack and use that, so that the Generator class itself does not need - // to have any mutable members. Then it is implicitly thread-safe. - MutexLock lock(&mutex_); - file_ = file; - string module_name = ModuleName(file->name()); - string filename = module_name; - StripString(&filename, ".", '/'); - filename += ".py"; - - FileDescriptorProto fdp; - file_->CopyTo(&fdp); - fdp.SerializeToString(&file_descriptor_serialized_); - - - scoped_ptr output(context->Open(filename)); - GOOGLE_CHECK(output.get()); - io::Printer printer(output.get(), '$'); - printer_ = &printer; - - PrintTopBoilerplate(printer_, file_, GeneratingDescriptorProto()); - PrintImports(); - PrintFileDescriptor(); - PrintTopLevelEnums(); - PrintTopLevelExtensions(); - PrintAllNestedEnumsInFile(); - PrintMessageDescriptors(); - FixForeignFieldsInDescriptors(); - PrintMessages(); - // We have to fix up the extensions after the message classes themselves, - // since they need to call static RegisterExtension() methods on these - // classes. - FixForeignFieldsInExtensions(); - if (HasGenericServices(file)) { - PrintServices(); - } - - printer.Print( - "# @@protoc_insertion_point(module_scope)\n"); - - return !printer.failed(); -} - -// Prints Python imports for all modules imported by |file|. -void Generator::PrintImports() const { - for (int i = 0; i < file_->dependency_count(); ++i) { - string module_name = ModuleName(file_->dependency(i)->name()); - printer_->Print("import $module$\n", "module", - module_name); - } - printer_->Print("\n"); -} - -// Prints the single file descriptor for this file. -void Generator::PrintFileDescriptor() const { - map m; - m["descriptor_name"] = kDescriptorKey; - m["name"] = file_->name(); - m["package"] = file_->package(); - const char file_descriptor_template[] = - "$descriptor_name$ = descriptor.FileDescriptor(\n" - " name='$name$',\n" - " package='$package$',\n"; - printer_->Print(m, file_descriptor_template); - printer_->Indent(); - printer_->Print( - "serialized_pb='$value$'", - "value", strings::CHexEscape(file_descriptor_serialized_)); - - // TODO(falk): Also print options and fix the message_type, enum_type, - // service and extension later in the generation. - - printer_->Outdent(); - printer_->Print(")\n"); - printer_->Print("\n"); -} - -// Prints descriptors and module-level constants for all top-level -// enums defined in |file|. -void Generator::PrintTopLevelEnums() const { - vector > top_level_enum_values; - for (int i = 0; i < file_->enum_type_count(); ++i) { - const EnumDescriptor& enum_descriptor = *file_->enum_type(i); - PrintEnum(enum_descriptor); - printer_->Print("\n"); - - for (int j = 0; j < enum_descriptor.value_count(); ++j) { - const EnumValueDescriptor& value_descriptor = *enum_descriptor.value(j); - top_level_enum_values.push_back( - make_pair(value_descriptor.name(), value_descriptor.number())); - } - } - - for (int i = 0; i < top_level_enum_values.size(); ++i) { - printer_->Print("$name$ = $value$\n", - "name", top_level_enum_values[i].first, - "value", SimpleItoa(top_level_enum_values[i].second)); - } - printer_->Print("\n"); -} - -// Prints all enums contained in all message types in |file|. -void Generator::PrintAllNestedEnumsInFile() const { - for (int i = 0; i < file_->message_type_count(); ++i) { - PrintNestedEnums(*file_->message_type(i)); - } -} - -// Prints a Python statement assigning the appropriate module-level -// enum name to a Python EnumDescriptor object equivalent to -// enum_descriptor. -void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { - map m; - m["descriptor_name"] = ModuleLevelDescriptorName(enum_descriptor); - m["name"] = enum_descriptor.name(); - m["full_name"] = enum_descriptor.full_name(); - m["file"] = kDescriptorKey; - const char enum_descriptor_template[] = - "$descriptor_name$ = descriptor.EnumDescriptor(\n" - " name='$name$',\n" - " full_name='$full_name$',\n" - " filename=None,\n" - " file=$file$,\n" - " values=[\n"; - string options_string; - enum_descriptor.options().SerializeToString(&options_string); - printer_->Print(m, enum_descriptor_template); - printer_->Indent(); - printer_->Indent(); - for (int i = 0; i < enum_descriptor.value_count(); ++i) { - PrintEnumValueDescriptor(*enum_descriptor.value(i)); - printer_->Print(",\n"); - } - printer_->Outdent(); - printer_->Print("],\n"); - printer_->Print("containing_type=None,\n"); - printer_->Print("options=$options_value$,\n", - "options_value", - OptionsValue("EnumOptions", options_string)); - EnumDescriptorProto edp; - PrintSerializedPbInterval(enum_descriptor, edp); - printer_->Outdent(); - printer_->Print(")\n"); - printer_->Print("\n"); -} - -// Recursively prints enums in nested types within descriptor, then -// prints enums contained at the top level in descriptor. -void Generator::PrintNestedEnums(const Descriptor& descriptor) const { - for (int i = 0; i < descriptor.nested_type_count(); ++i) { - PrintNestedEnums(*descriptor.nested_type(i)); - } - - for (int i = 0; i < descriptor.enum_type_count(); ++i) { - PrintEnum(*descriptor.enum_type(i)); - } -} - -void Generator::PrintTopLevelExtensions() const { - const bool is_extension = true; - for (int i = 0; i < file_->extension_count(); ++i) { - const FieldDescriptor& extension_field = *file_->extension(i); - string constant_name = extension_field.name() + "_FIELD_NUMBER"; - UpperString(&constant_name); - printer_->Print("$constant_name$ = $number$\n", - "constant_name", constant_name, - "number", SimpleItoa(extension_field.number())); - printer_->Print("$name$ = ", "name", extension_field.name()); - PrintFieldDescriptor(extension_field, is_extension); - printer_->Print("\n"); - } - printer_->Print("\n"); -} - -// Prints Python equivalents of all Descriptors in |file|. -void Generator::PrintMessageDescriptors() const { - for (int i = 0; i < file_->message_type_count(); ++i) { - PrintDescriptor(*file_->message_type(i)); - printer_->Print("\n"); - } -} - -void Generator::PrintServices() const { - for (int i = 0; i < file_->service_count(); ++i) { - PrintServiceDescriptor(*file_->service(i)); - PrintServiceClass(*file_->service(i)); - PrintServiceStub(*file_->service(i)); - printer_->Print("\n"); - } -} - -void Generator::PrintServiceDescriptor( - const ServiceDescriptor& descriptor) const { - printer_->Print("\n"); - string service_name = ModuleLevelServiceDescriptorName(descriptor); - string options_string; - descriptor.options().SerializeToString(&options_string); - - printer_->Print( - "$service_name$ = descriptor.ServiceDescriptor(\n", - "service_name", service_name); - printer_->Indent(); - map m; - m["name"] = descriptor.name(); - m["full_name"] = descriptor.full_name(); - m["file"] = kDescriptorKey; - m["index"] = SimpleItoa(descriptor.index()); - m["options_value"] = OptionsValue("ServiceOptions", options_string); - const char required_function_arguments[] = - "name='$name$',\n" - "full_name='$full_name$',\n" - "file=$file$,\n" - "index=$index$,\n" - "options=$options_value$,\n"; - printer_->Print(m, required_function_arguments); - - ServiceDescriptorProto sdp; - PrintSerializedPbInterval(descriptor, sdp); - - printer_->Print("methods=[\n"); - for (int i = 0; i < descriptor.method_count(); ++i) { - const MethodDescriptor* method = descriptor.method(i); - string options_string; - method->options().SerializeToString(&options_string); - - m.clear(); - m["name"] = method->name(); - m["full_name"] = method->full_name(); - m["index"] = SimpleItoa(method->index()); - m["serialized_options"] = CEscape(options_string); - m["input_type"] = ModuleLevelDescriptorName(*(method->input_type())); - m["output_type"] = ModuleLevelDescriptorName(*(method->output_type())); - m["options_value"] = OptionsValue("MethodOptions", options_string); - printer_->Print("descriptor.MethodDescriptor(\n"); - printer_->Indent(); - printer_->Print( - m, - "name='$name$',\n" - "full_name='$full_name$',\n" - "index=$index$,\n" - "containing_service=None,\n" - "input_type=$input_type$,\n" - "output_type=$output_type$,\n" - "options=$options_value$,\n"); - printer_->Outdent(); - printer_->Print("),\n"); - } - - printer_->Outdent(); - printer_->Print("])\n\n"); -} - -void Generator::PrintServiceClass(const ServiceDescriptor& descriptor) const { - // Print the service. - printer_->Print("class $class_name$(service.Service):\n", - "class_name", descriptor.name()); - printer_->Indent(); - printer_->Print( - "__metaclass__ = service_reflection.GeneratedServiceType\n" - "$descriptor_key$ = $descriptor_name$\n", - "descriptor_key", kDescriptorKey, - "descriptor_name", ModuleLevelServiceDescriptorName(descriptor)); - printer_->Outdent(); -} - -void Generator::PrintServiceStub(const ServiceDescriptor& descriptor) const { - // Print the service stub. - printer_->Print("class $class_name$_Stub($class_name$):\n", - "class_name", descriptor.name()); - printer_->Indent(); - printer_->Print( - "__metaclass__ = service_reflection.GeneratedServiceStubType\n" - "$descriptor_key$ = $descriptor_name$\n", - "descriptor_key", kDescriptorKey, - "descriptor_name", ModuleLevelServiceDescriptorName(descriptor)); - printer_->Outdent(); -} - -// Prints statement assigning ModuleLevelDescriptorName(message_descriptor) -// to a Python Descriptor object for message_descriptor. -// -// Mutually recursive with PrintNestedDescriptors(). -void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { - PrintNestedDescriptors(message_descriptor); - - printer_->Print("\n"); - printer_->Print("$descriptor_name$ = descriptor.Descriptor(\n", - "descriptor_name", - ModuleLevelDescriptorName(message_descriptor)); - printer_->Indent(); - map m; - m["name"] = message_descriptor.name(); - m["full_name"] = message_descriptor.full_name(); - m["file"] = kDescriptorKey; - const char required_function_arguments[] = - "name='$name$',\n" - "full_name='$full_name$',\n" - "filename=None,\n" - "file=$file$,\n" - "containing_type=None,\n"; - printer_->Print(m, required_function_arguments); - PrintFieldsInDescriptor(message_descriptor); - PrintExtensionsInDescriptor(message_descriptor); - - // Nested types - printer_->Print("nested_types=["); - for (int i = 0; i < message_descriptor.nested_type_count(); ++i) { - const string nested_name = ModuleLevelDescriptorName( - *message_descriptor.nested_type(i)); - printer_->Print("$name$, ", "name", nested_name); - } - printer_->Print("],\n"); - - // Enum types - printer_->Print("enum_types=[\n"); - printer_->Indent(); - for (int i = 0; i < message_descriptor.enum_type_count(); ++i) { - const string descriptor_name = ModuleLevelDescriptorName( - *message_descriptor.enum_type(i)); - printer_->Print(descriptor_name.c_str()); - printer_->Print(",\n"); - } - printer_->Outdent(); - printer_->Print("],\n"); - string options_string; - message_descriptor.options().SerializeToString(&options_string); - printer_->Print( - "options=$options_value$,\n" - "is_extendable=$extendable$", - "options_value", OptionsValue("MessageOptions", options_string), - "extendable", message_descriptor.extension_range_count() > 0 ? - "True" : "False"); - printer_->Print(",\n"); - - // Extension ranges - printer_->Print("extension_ranges=["); - for (int i = 0; i < message_descriptor.extension_range_count(); ++i) { - const Descriptor::ExtensionRange* range = - message_descriptor.extension_range(i); - printer_->Print("($start$, $end$), ", - "start", SimpleItoa(range->start), - "end", SimpleItoa(range->end)); - } - printer_->Print("],\n"); - - // Serialization of proto - DescriptorProto edp; - PrintSerializedPbInterval(message_descriptor, edp); - - printer_->Outdent(); - printer_->Print(")\n"); -} - -// Prints Python Descriptor objects for all nested types contained in -// message_descriptor. -// -// Mutually recursive with PrintDescriptor(). -void Generator::PrintNestedDescriptors( - const Descriptor& containing_descriptor) const { - for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) { - PrintDescriptor(*containing_descriptor.nested_type(i)); - } -} - -// Prints all messages in |file|. -void Generator::PrintMessages() const { - for (int i = 0; i < file_->message_type_count(); ++i) { - PrintMessage(*file_->message_type(i)); - printer_->Print("\n"); - } -} - -// Prints a Python class for the given message descriptor. We defer to the -// metaclass to do almost all of the work of actually creating a useful class. -// The purpose of this function and its many helper functions above is merely -// to output a Python version of the descriptors, which the metaclass in -// reflection.py will use to construct the meat of the class itself. -// -// Mutually recursive with PrintNestedMessages(). -void Generator::PrintMessage( - const Descriptor& message_descriptor) const { - printer_->Print("class $name$(message.Message):\n", "name", - message_descriptor.name()); - printer_->Indent(); - printer_->Print("__metaclass__ = reflection.GeneratedProtocolMessageType\n"); - PrintNestedMessages(message_descriptor); - map m; - m["descriptor_key"] = kDescriptorKey; - m["descriptor_name"] = ModuleLevelDescriptorName(message_descriptor); - printer_->Print(m, "$descriptor_key$ = $descriptor_name$\n"); - - printer_->Print( - "\n" - "# @@protoc_insertion_point(class_scope:$full_name$)\n", - "full_name", message_descriptor.full_name()); - - printer_->Outdent(); -} - -// Prints all nested messages within |containing_descriptor|. -// Mutually recursive with PrintMessage(). -void Generator::PrintNestedMessages( - const Descriptor& containing_descriptor) const { - for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) { - printer_->Print("\n"); - PrintMessage(*containing_descriptor.nested_type(i)); - } -} - -// Recursively fixes foreign fields in all nested types in |descriptor|, then -// sets the message_type and enum_type of all message and enum fields to point -// to their respective descriptors. -// Args: -// descriptor: descriptor to print fields for. -// containing_descriptor: if descriptor is a nested type, this is its -// containing type, or NULL if this is a root/top-level type. -void Generator::FixForeignFieldsInDescriptor( - const Descriptor& descriptor, - const Descriptor* containing_descriptor) const { - for (int i = 0; i < descriptor.nested_type_count(); ++i) { - FixForeignFieldsInDescriptor(*descriptor.nested_type(i), &descriptor); - } - - for (int i = 0; i < descriptor.field_count(); ++i) { - const FieldDescriptor& field_descriptor = *descriptor.field(i); - FixForeignFieldsInField(&descriptor, field_descriptor, "fields_by_name"); - } - - FixContainingTypeInDescriptor(descriptor, containing_descriptor); - for (int i = 0; i < descriptor.enum_type_count(); ++i) { - const EnumDescriptor& enum_descriptor = *descriptor.enum_type(i); - FixContainingTypeInDescriptor(enum_descriptor, &descriptor); - } -} - -void Generator::AddMessageToFileDescriptor(const Descriptor& descriptor) const { - map m; - m["descriptor_name"] = kDescriptorKey; - m["message_name"] = descriptor.name(); - m["message_descriptor_name"] = ModuleLevelDescriptorName(descriptor); - const char file_descriptor_template[] = - "$descriptor_name$.message_types_by_name['$message_name$'] = " - "$message_descriptor_name$\n"; - printer_->Print(m, file_descriptor_template); -} - -// Sets any necessary message_type and enum_type attributes -// for the Python version of |field|. -// -// containing_type may be NULL, in which case this is a module-level field. -// -// python_dict_name is the name of the Python dict where we should -// look the field up in the containing type. (e.g., fields_by_name -// or extensions_by_name). We ignore python_dict_name if containing_type -// is NULL. -void Generator::FixForeignFieldsInField(const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const { - const string field_referencing_expression = FieldReferencingExpression( - containing_type, field, python_dict_name); - map m; - m["field_ref"] = field_referencing_expression; - const Descriptor* foreign_message_type = field.message_type(); - if (foreign_message_type) { - m["foreign_type"] = ModuleLevelDescriptorName(*foreign_message_type); - printer_->Print(m, "$field_ref$.message_type = $foreign_type$\n"); - } - const EnumDescriptor* enum_type = field.enum_type(); - if (enum_type) { - m["enum_type"] = ModuleLevelDescriptorName(*enum_type); - printer_->Print(m, "$field_ref$.enum_type = $enum_type$\n"); - } -} - -// Returns the module-level expression for the given FieldDescriptor. -// Only works for fields in the .proto file this Generator is generating for. -// -// containing_type may be NULL, in which case this is a module-level field. -// -// python_dict_name is the name of the Python dict where we should -// look the field up in the containing type. (e.g., fields_by_name -// or extensions_by_name). We ignore python_dict_name if containing_type -// is NULL. -string Generator::FieldReferencingExpression( - const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const { - // We should only ever be looking up fields in the current file. - // The only things we refer to from other files are message descriptors. - GOOGLE_CHECK_EQ(field.file(), file_) << field.file()->name() << " vs. " - << file_->name(); - if (!containing_type) { - return field.name(); - } - return strings::Substitute( - "$0.$1['$2']", - ModuleLevelDescriptorName(*containing_type), - python_dict_name, field.name()); -} - -// Prints containing_type for nested descriptors or enum descriptors. -template -void Generator::FixContainingTypeInDescriptor( - const DescriptorT& descriptor, - const Descriptor* containing_descriptor) const { - if (containing_descriptor != NULL) { - const string nested_name = ModuleLevelDescriptorName(descriptor); - const string parent_name = ModuleLevelDescriptorName( - *containing_descriptor); - printer_->Print( - "$nested_name$.containing_type = $parent_name$;\n", - "nested_name", nested_name, - "parent_name", parent_name); - } -} - -// Prints statements setting the message_type and enum_type fields in the -// Python descriptor objects we've already output in ths file. We must -// do this in a separate step due to circular references (otherwise, we'd -// just set everything in the initial assignment statements). -void Generator::FixForeignFieldsInDescriptors() const { - for (int i = 0; i < file_->message_type_count(); ++i) { - FixForeignFieldsInDescriptor(*file_->message_type(i), NULL); - } - for (int i = 0; i < file_->message_type_count(); ++i) { - AddMessageToFileDescriptor(*file_->message_type(i)); - } - printer_->Print("\n"); -} - -// We need to not only set any necessary message_type fields, but -// also need to call RegisterExtension() on each message we're -// extending. -void Generator::FixForeignFieldsInExtensions() const { - // Top-level extensions. - for (int i = 0; i < file_->extension_count(); ++i) { - FixForeignFieldsInExtension(*file_->extension(i)); - } - // Nested extensions. - for (int i = 0; i < file_->message_type_count(); ++i) { - FixForeignFieldsInNestedExtensions(*file_->message_type(i)); - } -} - -void Generator::FixForeignFieldsInExtension( - const FieldDescriptor& extension_field) const { - GOOGLE_CHECK(extension_field.is_extension()); - // extension_scope() will be NULL for top-level extensions, which is - // exactly what FixForeignFieldsInField() wants. - FixForeignFieldsInField(extension_field.extension_scope(), extension_field, - "extensions_by_name"); - - map m; - // Confusingly, for FieldDescriptors that happen to be extensions, - // containing_type() means "extended type." - // On the other hand, extension_scope() will give us what we normally - // mean by containing_type(). - m["extended_message_class"] = ModuleLevelMessageName( - *extension_field.containing_type()); - m["field"] = FieldReferencingExpression(extension_field.extension_scope(), - extension_field, - "extensions_by_name"); - printer_->Print(m, "$extended_message_class$.RegisterExtension($field$)\n"); -} - -void Generator::FixForeignFieldsInNestedExtensions( - const Descriptor& descriptor) const { - // Recursively fix up extensions in all nested types. - for (int i = 0; i < descriptor.nested_type_count(); ++i) { - FixForeignFieldsInNestedExtensions(*descriptor.nested_type(i)); - } - // Fix up extensions directly contained within this type. - for (int i = 0; i < descriptor.extension_count(); ++i) { - FixForeignFieldsInExtension(*descriptor.extension(i)); - } -} - -// Returns a Python expression that instantiates a Python EnumValueDescriptor -// object for the given C++ descriptor. -void Generator::PrintEnumValueDescriptor( - const EnumValueDescriptor& descriptor) const { - // TODO(robinson): Fix up EnumValueDescriptor "type" fields. - // More circular references. ::sigh:: - string options_string; - descriptor.options().SerializeToString(&options_string); - map m; - m["name"] = descriptor.name(); - m["index"] = SimpleItoa(descriptor.index()); - m["number"] = SimpleItoa(descriptor.number()); - m["options"] = OptionsValue("EnumValueOptions", options_string); - printer_->Print( - m, - "descriptor.EnumValueDescriptor(\n" - " name='$name$', index=$index$, number=$number$,\n" - " options=$options$,\n" - " type=None)"); -} - -// Returns a Python expression that calls descriptor._ParseOptions using -// the given descriptor class name and serialized options protobuf string. -string Generator::OptionsValue( - const string& class_name, const string& serialized_options) const { - if (serialized_options.length() == 0 || GeneratingDescriptorProto()) { - return "None"; - } else { - string full_class_name = "descriptor_pb2." + class_name; - return "descriptor._ParseOptions(" + full_class_name + "(), '" - + CEscape(serialized_options)+ "')"; - } -} - -// Prints an expression for a Python FieldDescriptor for |field|. -void Generator::PrintFieldDescriptor( - const FieldDescriptor& field, bool is_extension) const { - string options_string; - field.options().SerializeToString(&options_string); - map m; - m["name"] = field.name(); - m["full_name"] = field.full_name(); - m["index"] = SimpleItoa(field.index()); - m["number"] = SimpleItoa(field.number()); - m["type"] = SimpleItoa(field.type()); - m["cpp_type"] = SimpleItoa(field.cpp_type()); - m["label"] = SimpleItoa(field.label()); - m["has_default_value"] = field.has_default_value() ? "True" : "False"; - m["default_value"] = StringifyDefaultValue(field); - m["is_extension"] = is_extension ? "True" : "False"; - m["options"] = OptionsValue("FieldOptions", options_string); - // We always set message_type and enum_type to None at this point, and then - // these fields in correctly after all referenced descriptors have been - // defined and/or imported (see FixForeignFieldsInDescriptors()). - const char field_descriptor_decl[] = - "descriptor.FieldDescriptor(\n" - " name='$name$', full_name='$full_name$', index=$index$,\n" - " number=$number$, type=$type$, cpp_type=$cpp_type$, label=$label$,\n" - " has_default_value=$has_default_value$, default_value=$default_value$,\n" - " message_type=None, enum_type=None, containing_type=None,\n" - " is_extension=$is_extension$, extension_scope=None,\n" - " options=$options$)"; - printer_->Print(m, field_descriptor_decl); -} - -// Helper for Print{Fields,Extensions}InDescriptor(). -void Generator::PrintFieldDescriptorsInDescriptor( - const Descriptor& message_descriptor, - bool is_extension, - const string& list_variable_name, - int (Descriptor::*CountFn)() const, - const FieldDescriptor* (Descriptor::*GetterFn)(int) const) const { - printer_->Print("$list$=[\n", "list", list_variable_name); - printer_->Indent(); - for (int i = 0; i < (message_descriptor.*CountFn)(); ++i) { - PrintFieldDescriptor(*(message_descriptor.*GetterFn)(i), - is_extension); - printer_->Print(",\n"); - } - printer_->Outdent(); - printer_->Print("],\n"); -} - -// Prints a statement assigning "fields" to a list of Python FieldDescriptors, -// one for each field present in message_descriptor. -void Generator::PrintFieldsInDescriptor( - const Descriptor& message_descriptor) const { - const bool is_extension = false; - PrintFieldDescriptorsInDescriptor( - message_descriptor, is_extension, "fields", - &Descriptor::field_count, &Descriptor::field); -} - -// Prints a statement assigning "extensions" to a list of Python -// FieldDescriptors, one for each extension present in message_descriptor. -void Generator::PrintExtensionsInDescriptor( - const Descriptor& message_descriptor) const { - const bool is_extension = true; - PrintFieldDescriptorsInDescriptor( - message_descriptor, is_extension, "extensions", - &Descriptor::extension_count, &Descriptor::extension); -} - -bool Generator::GeneratingDescriptorProto() const { - return file_->name() == "google/protobuf/descriptor.proto"; -} - -// Returns the unique Python module-level identifier given to a descriptor. -// This name is module-qualified iff the given descriptor describes an -// entity that doesn't come from the current file. -template -string Generator::ModuleLevelDescriptorName( - const DescriptorT& descriptor) const { - // FIXME(robinson): - // We currently don't worry about collisions with underscores in the type - // names, so these would collide in nasty ways if found in the same file: - // OuterProto.ProtoA.ProtoB - // OuterProto_ProtoA.ProtoB # Underscore instead of period. - // As would these: - // OuterProto.ProtoA_.ProtoB - // OuterProto.ProtoA._ProtoB # Leading vs. trailing underscore. - // (Contrived, but certainly possible). - // - // The C++ implementation doesn't guard against this either. Leaving - // it for now... - string name = NamePrefixedWithNestedTypes(descriptor, "_"); - UpperString(&name); - // Module-private for now. Easy to make public later; almost impossible - // to make private later. - name = "_" + name; - // We now have the name relative to its own module. Also qualify with - // the module name iff this descriptor is from a different .proto file. - if (descriptor.file() != file_) { - name = ModuleName(descriptor.file()->name()) + "." + name; - } - return name; -} - -// Returns the name of the message class itself, not the descriptor. -// Like ModuleLevelDescriptorName(), module-qualifies the name iff -// the given descriptor describes an entity that doesn't come from -// the current file. -string Generator::ModuleLevelMessageName(const Descriptor& descriptor) const { - string name = NamePrefixedWithNestedTypes(descriptor, "."); - if (descriptor.file() != file_) { - name = ModuleName(descriptor.file()->name()) + "." + name; - } - return name; -} - -// Returns the unique Python module-level identifier given to a service -// descriptor. -string Generator::ModuleLevelServiceDescriptorName( - const ServiceDescriptor& descriptor) const { - string name = descriptor.name(); - UpperString(&name); - name = "_" + name; - if (descriptor.file() != file_) { - name = ModuleName(descriptor.file()->name()) + "." + name; - } - return name; -} - -// Prints standard constructor arguments serialized_start and serialized_end. -// Args: -// descriptor: The cpp descriptor to have a serialized reference. -// proto: A proto -// Example printer output: -// serialized_start=41, -// serialized_end=43, -// -template -void Generator::PrintSerializedPbInterval( - const DescriptorT& descriptor, DescriptorProtoT& proto) const { - descriptor.CopyTo(&proto); - string sp; - proto.SerializeToString(&sp); - int offset = file_descriptor_serialized_.find(sp); - GOOGLE_CHECK_GE(offset, 0); - - printer_->Print("serialized_start=$serialized_start$,\n" - "serialized_end=$serialized_end$,\n", - "serialized_start", SimpleItoa(offset), - "serialized_end", SimpleItoa(offset + sp.size())); -} - -} // namespace python -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.h deleted file mode 100644 index 84eaf8ab..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_generator.h +++ /dev/null @@ -1,156 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: robinson@google.com (Will Robinson) -// -// Generates Python code for a given .proto file. - -#ifndef GOOGLE_PROTOBUF_COMPILER_PYTHON_GENERATOR_H__ -#define GOOGLE_PROTOBUF_COMPILER_PYTHON_GENERATOR_H__ - -#include - -#include -#include - -namespace google { -namespace protobuf { - -class Descriptor; -class EnumDescriptor; -class EnumValueDescriptor; -class FieldDescriptor; -class ServiceDescriptor; - -namespace io { class Printer; } - -namespace compiler { -namespace python { - -// CodeGenerator implementation for generated Python protocol buffer classes. -// If you create your own protocol compiler binary and you want it to support -// Python output, you can do so by registering an instance of this -// CodeGenerator with the CommandLineInterface in your main() function. -class LIBPROTOC_EXPORT Generator : public CodeGenerator { - public: - Generator(); - virtual ~Generator(); - - // CodeGenerator methods. - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* generator_context, - string* error) const; - - private: - void PrintImports() const; - void PrintFileDescriptor() const; - void PrintTopLevelEnums() const; - void PrintAllNestedEnumsInFile() const; - void PrintNestedEnums(const Descriptor& descriptor) const; - void PrintEnum(const EnumDescriptor& enum_descriptor) const; - - void PrintTopLevelExtensions() const; - - void PrintFieldDescriptor( - const FieldDescriptor& field, bool is_extension) const; - void PrintFieldDescriptorsInDescriptor( - const Descriptor& message_descriptor, - bool is_extension, - const string& list_variable_name, - int (Descriptor::*CountFn)() const, - const FieldDescriptor* (Descriptor::*GetterFn)(int) const) const; - void PrintFieldsInDescriptor(const Descriptor& message_descriptor) const; - void PrintExtensionsInDescriptor(const Descriptor& message_descriptor) const; - void PrintMessageDescriptors() const; - void PrintDescriptor(const Descriptor& message_descriptor) const; - void PrintNestedDescriptors(const Descriptor& containing_descriptor) const; - - void PrintMessages() const; - void PrintMessage(const Descriptor& message_descriptor) const; - void PrintNestedMessages(const Descriptor& containing_descriptor) const; - - void FixForeignFieldsInDescriptors() const; - void FixForeignFieldsInDescriptor( - const Descriptor& descriptor, - const Descriptor* containing_descriptor) const; - void FixForeignFieldsInField(const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const; - void AddMessageToFileDescriptor(const Descriptor& descriptor) const; - string FieldReferencingExpression(const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const; - template - void FixContainingTypeInDescriptor( - const DescriptorT& descriptor, - const Descriptor* containing_descriptor) const; - - void FixForeignFieldsInExtensions() const; - void FixForeignFieldsInExtension( - const FieldDescriptor& extension_field) const; - void FixForeignFieldsInNestedExtensions(const Descriptor& descriptor) const; - - void PrintServices() const; - void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const; - void PrintServiceClass(const ServiceDescriptor& descriptor) const; - void PrintServiceStub(const ServiceDescriptor& descriptor) const; - - void PrintEnumValueDescriptor(const EnumValueDescriptor& descriptor) const; - string OptionsValue(const string& class_name, - const string& serialized_options) const; - bool GeneratingDescriptorProto() const; - - template - string ModuleLevelDescriptorName(const DescriptorT& descriptor) const; - string ModuleLevelMessageName(const Descriptor& descriptor) const; - string ModuleLevelServiceDescriptorName( - const ServiceDescriptor& descriptor) const; - - template - void PrintSerializedPbInterval( - const DescriptorT& descriptor, DescriptorProtoT& proto) const; - - // Very coarse-grained lock to ensure that Generate() is reentrant. - // Guards file_, printer_ and file_descriptor_serialized_. - mutable Mutex mutex_; - mutable const FileDescriptor* file_; // Set in Generate(). Under mutex_. - mutable string file_descriptor_serialized_; - mutable io::Printer* printer_; // Set in Generate(). Under mutex_. - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator); -}; - -} // namespace python -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_PYTHON_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc deleted file mode 100644 index da619ad3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc +++ /dev/null @@ -1,116 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// TODO(kenton): Share code with the versions of this test in other languages? -// It seemed like parameterizing it would add more complexity than it is -// worth. - -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { -namespace python { -namespace { - -class TestGenerator : public CodeGenerator { - public: - TestGenerator() {} - ~TestGenerator() {} - - virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - TryInsert("test_pb2.py", "imports", context); - TryInsert("test_pb2.py", "module_scope", context); - TryInsert("test_pb2.py", "class_scope:foo.Bar", context); - TryInsert("test_pb2.py", "class_scope:foo.Bar.Baz", context); - return true; - } - - void TryInsert(const string& filename, const string& insertion_point, - GeneratorContext* context) const { - scoped_ptr output( - context->OpenForInsert(filename, insertion_point)); - io::Printer printer(output.get(), '$'); - printer.Print("// inserted $name$\n", "name", insertion_point); - } -}; - -// This test verifies that all the expected insertion points exist. It does -// not verify that they are correctly-placed; that would require actually -// compiling the output which is a bit more than I care to do for this test. -TEST(PythonPluginTest, PluginTest) { - File::WriteStringToFileOrDie( - "syntax = \"proto2\";\n" - "package foo;\n" - "message Bar {\n" - " message Baz {}\n" - "}\n", - TestTempDir() + "/test.proto"); - - google::protobuf::compiler::CommandLineInterface cli; - cli.SetInputsAreProtoPathRelative(true); - - python::Generator python_generator; - TestGenerator test_generator; - cli.RegisterGenerator("--python_out", &python_generator, ""); - cli.RegisterGenerator("--test_out", &test_generator, ""); - - string proto_path = "-I" + TestTempDir(); - string python_out = "--python_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); - - const char* argv[] = { - "protoc", - proto_path.c_str(), - python_out.c_str(), - test_out.c_str(), - "test.proto" - }; - - EXPECT_EQ(0, cli.Run(5, argv)); -} - -} // namespace -} // namespace python -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.cc deleted file mode 100644 index 5fb5d5cb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.cc +++ /dev/null @@ -1,460 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include - -#include - -#ifndef _WIN32 -#include -#include -#include -#include -#endif - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -#ifdef _WIN32 - -static void CloseHandleOrDie(HANDLE handle) { - if (!CloseHandle(handle)) { - GOOGLE_LOG(FATAL) << "CloseHandle: " - << Subprocess::Win32ErrorMessage(GetLastError()); - } -} - -Subprocess::Subprocess() - : process_start_error_(ERROR_SUCCESS), - child_handle_(NULL), child_stdin_(NULL), child_stdout_(NULL) {} - -Subprocess::~Subprocess() { - if (child_stdin_ != NULL) { - CloseHandleOrDie(child_stdin_); - } - if (child_stdout_ != NULL) { - CloseHandleOrDie(child_stdout_); - } -} - -void Subprocess::Start(const string& program, SearchMode search_mode) { - // Create the pipes. - HANDLE stdin_pipe_read; - HANDLE stdin_pipe_write; - HANDLE stdout_pipe_read; - HANDLE stdout_pipe_write; - - if (!CreatePipe(&stdin_pipe_read, &stdin_pipe_write, NULL, 0)) { - GOOGLE_LOG(FATAL) << "CreatePipe: " << Win32ErrorMessage(GetLastError()); - } - if (!CreatePipe(&stdout_pipe_read, &stdout_pipe_write, NULL, 0)) { - GOOGLE_LOG(FATAL) << "CreatePipe: " << Win32ErrorMessage(GetLastError()); - } - - // Make child side of the pipes inheritable. - if (!SetHandleInformation(stdin_pipe_read, - HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) { - GOOGLE_LOG(FATAL) << "SetHandleInformation: " - << Win32ErrorMessage(GetLastError()); - } - if (!SetHandleInformation(stdout_pipe_write, - HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT)) { - GOOGLE_LOG(FATAL) << "SetHandleInformation: " - << Win32ErrorMessage(GetLastError()); - } - - // Setup STARTUPINFO to redirect handles. - STARTUPINFOA startup_info; - ZeroMemory(&startup_info, sizeof(startup_info)); - startup_info.cb = sizeof(startup_info); - startup_info.dwFlags = STARTF_USESTDHANDLES; - startup_info.hStdInput = stdin_pipe_read; - startup_info.hStdOutput = stdout_pipe_write; - startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE); - - if (startup_info.hStdError == INVALID_HANDLE_VALUE) { - GOOGLE_LOG(FATAL) << "GetStdHandle: " - << Win32ErrorMessage(GetLastError()); - } - - // CreateProcess() mutates its second parameter. WTF? - char* name_copy = strdup(program.c_str()); - - // Create the process. - PROCESS_INFORMATION process_info; - - if (CreateProcessA((search_mode == SEARCH_PATH) ? NULL : program.c_str(), - (search_mode == SEARCH_PATH) ? name_copy : NULL, - NULL, // process security attributes - NULL, // thread security attributes - TRUE, // inherit handles? - 0, // obscure creation flags - NULL, // environment (inherit from parent) - NULL, // current directory (inherit from parent) - &startup_info, - &process_info)) { - child_handle_ = process_info.hProcess; - CloseHandleOrDie(process_info.hThread); - child_stdin_ = stdin_pipe_write; - child_stdout_ = stdout_pipe_read; - } else { - process_start_error_ = GetLastError(); - CloseHandleOrDie(stdin_pipe_write); - CloseHandleOrDie(stdout_pipe_read); - } - - CloseHandleOrDie(stdin_pipe_read); - CloseHandleOrDie(stdout_pipe_write); - free(name_copy); -} - -bool Subprocess::Communicate(const Message& input, Message* output, - string* error) { - if (process_start_error_ != ERROR_SUCCESS) { - *error = Win32ErrorMessage(process_start_error_); - return false; - } - - GOOGLE_CHECK(child_handle_ != NULL) << "Must call Start() first."; - - string input_data = input.SerializeAsString(); - string output_data; - - int input_pos = 0; - - while (child_stdout_ != NULL) { - HANDLE handles[2]; - int handle_count = 0; - - if (child_stdin_ != NULL) { - handles[handle_count++] = child_stdin_; - } - if (child_stdout_ != NULL) { - handles[handle_count++] = child_stdout_; - } - - DWORD wait_result = - WaitForMultipleObjects(handle_count, handles, FALSE, INFINITE); - - HANDLE signaled_handle; - if (wait_result >= WAIT_OBJECT_0 && - wait_result < WAIT_OBJECT_0 + handle_count) { - signaled_handle = handles[wait_result - WAIT_OBJECT_0]; - } else if (wait_result == WAIT_FAILED) { - GOOGLE_LOG(FATAL) << "WaitForMultipleObjects: " - << Win32ErrorMessage(GetLastError()); - } else { - GOOGLE_LOG(FATAL) << "WaitForMultipleObjects: Unexpected return code: " - << wait_result; - } - - if (signaled_handle == child_stdin_) { - DWORD n; - if (!WriteFile(child_stdin_, - input_data.data() + input_pos, - input_data.size() - input_pos, - &n, NULL)) { - // Child closed pipe. Presumably it will report an error later. - // Pretend we're done for now. - input_pos = input_data.size(); - } else { - input_pos += n; - } - - if (input_pos == input_data.size()) { - // We're done writing. Close. - CloseHandleOrDie(child_stdin_); - child_stdin_ = NULL; - } - } else if (signaled_handle == child_stdout_) { - char buffer[4096]; - DWORD n; - - if (!ReadFile(child_stdout_, buffer, sizeof(buffer), &n, NULL)) { - // We're done reading. Close. - CloseHandleOrDie(child_stdout_); - child_stdout_ = NULL; - } else { - output_data.append(buffer, n); - } - } - } - - if (child_stdin_ != NULL) { - // Child did not finish reading input before it closed the output. - // Presumably it exited with an error. - CloseHandleOrDie(child_stdin_); - child_stdin_ = NULL; - } - - DWORD wait_result = WaitForSingleObject(child_handle_, INFINITE); - - if (wait_result == WAIT_FAILED) { - GOOGLE_LOG(FATAL) << "WaitForSingleObject: " - << Win32ErrorMessage(GetLastError()); - } else if (wait_result != WAIT_OBJECT_0) { - GOOGLE_LOG(FATAL) << "WaitForSingleObject: Unexpected return code: " - << wait_result; - } - - DWORD exit_code; - if (!GetExitCodeProcess(child_handle_, &exit_code)) { - GOOGLE_LOG(FATAL) << "GetExitCodeProcess: " - << Win32ErrorMessage(GetLastError()); - } - - CloseHandleOrDie(child_handle_); - child_handle_ = NULL; - - if (exit_code != 0) { - *error = strings::Substitute( - "Plugin failed with status code $0.", exit_code); - return false; - } - - if (!output->ParseFromString(output_data)) { - *error = "Plugin output is unparseable: " + CEscape(output_data); - return false; - } - - return true; -} - -string Subprocess::Win32ErrorMessage(DWORD error_code) { - char* message; - - // WTF? - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, error_code, 0, - (LPTSTR)&message, // NOT A BUG! - 0, NULL); - - string result = message; - LocalFree(message); - return result; -} - -// =================================================================== - -#else // _WIN32 - -Subprocess::Subprocess() - : child_pid_(-1), child_stdin_(-1), child_stdout_(-1) {} - -Subprocess::~Subprocess() { - if (child_stdin_ != -1) { - close(child_stdin_); - } - if (child_stdout_ != -1) { - close(child_stdout_); - } -} - -void Subprocess::Start(const string& program, SearchMode search_mode) { - // Note that we assume that there are no other threads, thus we don't have to - // do crazy stuff like using socket pairs or avoiding libc locks. - - // [0] is read end, [1] is write end. - int stdin_pipe[2]; - int stdout_pipe[2]; - - pipe(stdin_pipe); - pipe(stdout_pipe); - - char* argv[2] = { strdup(program.c_str()), NULL }; - - child_pid_ = fork(); - if (child_pid_ == -1) { - GOOGLE_LOG(FATAL) << "fork: " << strerror(errno); - } else if (child_pid_ == 0) { - // We are the child. - dup2(stdin_pipe[0], STDIN_FILENO); - dup2(stdout_pipe[1], STDOUT_FILENO); - - close(stdin_pipe[0]); - close(stdin_pipe[1]); - close(stdout_pipe[0]); - close(stdout_pipe[1]); - - switch (search_mode) { - case SEARCH_PATH: - execvp(argv[0], argv); - break; - case EXACT_NAME: - execv(argv[0], argv); - break; - } - - // Write directly to STDERR_FILENO to avoid stdio code paths that may do - // stuff that is unsafe here. - write(STDERR_FILENO, argv[0], strlen(argv[0])); - const char* message = ": program not found or is not executable\n"; - write(STDERR_FILENO, message, strlen(message)); - - // Must use _exit() rather than exit() to avoid flushing output buffers - // that will also be flushed by the parent. - _exit(1); - } else { - free(argv[0]); - - close(stdin_pipe[0]); - close(stdout_pipe[1]); - - child_stdin_ = stdin_pipe[1]; - child_stdout_ = stdout_pipe[0]; - } -} - -bool Subprocess::Communicate(const Message& input, Message* output, - string* error) { - - GOOGLE_CHECK_NE(child_stdin_, -1) << "Must call Start() first."; - - // The "sighandler_t" typedef is GNU-specific, so define our own. - typedef void SignalHandler(int); - - // Make sure SIGPIPE is disabled so that if the child dies it doesn't kill us. - SignalHandler* old_pipe_handler = signal(SIGPIPE, SIG_IGN); - - string input_data = input.SerializeAsString(); - string output_data; - - int input_pos = 0; - int max_fd = max(child_stdin_, child_stdout_); - - while (child_stdout_ != -1) { - fd_set read_fds; - fd_set write_fds; - FD_ZERO(&read_fds); - FD_ZERO(&write_fds); - if (child_stdout_ != -1) { - FD_SET(child_stdout_, &read_fds); - } - if (child_stdin_ != -1) { - FD_SET(child_stdin_, &write_fds); - } - - if (select(max_fd + 1, &read_fds, &write_fds, NULL, NULL) < 0) { - if (errno == EINTR) { - // Interrupted by signal. Try again. - continue; - } else { - GOOGLE_LOG(FATAL) << "select: " << strerror(errno); - } - } - - if (child_stdin_ != -1 && FD_ISSET(child_stdin_, &write_fds)) { - int n = write(child_stdin_, input_data.data() + input_pos, - input_data.size() - input_pos); - if (n < 0) { - // Child closed pipe. Presumably it will report an error later. - // Pretend we're done for now. - input_pos = input_data.size(); - } else { - input_pos += n; - } - - if (input_pos == input_data.size()) { - // We're done writing. Close. - close(child_stdin_); - child_stdin_ = -1; - } - } - - if (child_stdout_ != -1 && FD_ISSET(child_stdout_, &read_fds)) { - char buffer[4096]; - int n = read(child_stdout_, buffer, sizeof(buffer)); - - if (n > 0) { - output_data.append(buffer, n); - } else { - // We're done reading. Close. - close(child_stdout_); - child_stdout_ = -1; - } - } - } - - if (child_stdin_ != -1) { - // Child did not finish reading input before it closed the output. - // Presumably it exited with an error. - close(child_stdin_); - child_stdin_ = -1; - } - - int status; - while (waitpid(child_pid_, &status, 0) == -1) { - if (errno != EINTR) { - GOOGLE_LOG(FATAL) << "waitpid: " << strerror(errno); - } - } - - // Restore SIGPIPE handling. - signal(SIGPIPE, old_pipe_handler); - - if (WIFEXITED(status)) { - if (WEXITSTATUS(status) != 0) { - int error_code = WEXITSTATUS(status); - *error = strings::Substitute( - "Plugin failed with status code $0.", error_code); - return false; - } - } else if (WIFSIGNALED(status)) { - int signal = WTERMSIG(status); - *error = strings::Substitute( - "Plugin killed by signal $0.", signal); - return false; - } else { - *error = "Neither WEXITSTATUS nor WTERMSIG is true?"; - return false; - } - - if (!output->ParseFromString(output_data)) { - *error = "Plugin output is unparseable."; - return false; - } - - return true; -} - -#endif // !_WIN32 - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.h deleted file mode 100644 index de9fce9e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/subprocess.h +++ /dev/null @@ -1,108 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#ifndef GOOGLE_PROTOBUF_COMPILER_SUBPROCESS_H__ -#define GOOGLE_PROTOBUF_COMPILER_SUBPROCESS_H__ - -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN // right... -#include -#else // _WIN32 -#include -#include -#endif // !_WIN32 -#include - -#include - - -namespace google { -namespace protobuf { - -class Message; - -namespace compiler { - -// Utility class for launching sub-processes. -class Subprocess { - public: - Subprocess(); - ~Subprocess(); - - enum SearchMode { - SEARCH_PATH, // Use PATH environment variable. - EXACT_NAME // Program is an exact file name; don't use the PATH. - }; - - // Start the subprocess. Currently we don't provide a way to specify - // arguments as protoc plugins don't have any. - void Start(const string& program, SearchMode search_mode); - - // Serialize the input message and pipe it to the subprocess's stdin, then - // close the pipe. Meanwhile, read from the subprocess's stdout and parse - // the data into *output. All this is done carefully to avoid deadlocks. - // Returns true if successful. On any sort of error, returns false and sets - // *error to a description of the problem. - bool Communicate(const Message& input, Message* output, string* error); - -#ifdef _WIN32 - // Given an error code, returns a human-readable error message. This is - // defined here so that CommandLineInterface can share it. - static string Win32ErrorMessage(DWORD error_code); -#endif - - private: -#ifdef _WIN32 - DWORD process_start_error_; - HANDLE child_handle_; - - // The file handles for our end of the child's pipes. We close each and - // set it to NULL when no longer needed. - HANDLE child_stdin_; - HANDLE child_stdout_; - -#else // _WIN32 - pid_t child_pid_; - - // The file descriptors for our end of the child's pipes. We close each and - // set it to -1 when no longer needed. - int child_stdin_; - int child_stdout_; - -#endif // !_WIN32 -}; - -} // namespace compiler -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_COMPILER_SUBPROCESS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/test_plugin.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/test_plugin.cc deleted file mode 100644 index 5cbbf3d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/test_plugin.cc +++ /dev/null @@ -1,51 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// This is a dummy code generator plugin used by -// command_line_interface_unittest. - -#include -#include -#include -#include -#include - -int main(int argc, char* argv[]) { -#ifdef _MSC_VER - // Don't print a silly message or stick a modal dialog box in my face, - // please. - _set_abort_behavior(0, ~0); -#endif // !_MSC_VER - - google::protobuf::compiler::MockCodeGenerator generator("test_plugin"); - return google::protobuf::compiler::PluginMain(argc, argv, &generator); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh deleted file mode 100755 index 3a024364..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# -# Protocol Buffers - Google's data interchange format -# Copyright 2009 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Author: kenton@google.com (Kenton Varda) -# -# Test protoc's zip output mode. - -fail() { - echo "$@" >&2 - exit 1 -} - -TEST_TMPDIR=. -PROTOC=./protoc - -echo ' - syntax = "proto2"; - option java_multiple_files = true; - option java_package = "test.jar"; - option java_outer_classname = "Outer"; - message Foo {} - message Bar {} -' > $TEST_TMPDIR/testzip.proto - -$PROTOC \ - --cpp_out=$TEST_TMPDIR/testzip.zip --python_out=$TEST_TMPDIR/testzip.zip \ - --java_out=$TEST_TMPDIR/testzip.jar -I$TEST_TMPDIR testzip.proto \ - || fail 'protoc failed.' - -echo "Testing output to zip..." -if unzip -h > /dev/null; then - unzip -t $TEST_TMPDIR/testzip.zip > $TEST_TMPDIR/testzip.list || fail 'unzip failed.' - - grep 'testing: testzip\.pb\.cc *OK$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'testzip.pb.cc not found in output zip.' - grep 'testing: testzip\.pb\.h *OK$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'testzip.pb.h not found in output zip.' - grep 'testing: testzip_pb2\.py *OK$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'testzip_pb2.py not found in output zip.' - grep -i 'manifest' $TEST_TMPDIR/testzip.list > /dev/null \ - && fail 'Zip file contained manifest.' -else - echo "Warning: 'unzip' command not available. Skipping test." -fi - -echo "Testing output to jar..." -if jar c $TEST_TMPDIR/testzip.proto > /dev/null; then - jar tf $TEST_TMPDIR/testzip.jar > $TEST_TMPDIR/testzip.list || fail 'jar failed.' - - grep '^test/jar/Foo\.java$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'Foo.java not found in output jar.' - grep '^test/jar/Bar\.java$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'Bar.java not found in output jar.' - grep '^test/jar/Outer\.java$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'Outer.java not found in output jar.' - grep '^META-INF/MANIFEST\.MF$' $TEST_TMPDIR/testzip.list > /dev/null \ - || fail 'Manifest not found in output jar.' -else - echo "Warning: 'jar' command not available. Skipping test." -fi - -echo PASS diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.cc deleted file mode 100644 index 65d73527..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.cc +++ /dev/null @@ -1,218 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: ambrose@google.com (Ambrose Feinstein), -// kenton@google.com (Kenton Varda) -// -// Based on http://www.pkware.com/documents/casestudies/APPNOTE.TXT - -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -static const uint32 kCRC32Table[256] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, - 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, - 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, - 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, - 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, - 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, - 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, - 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, - 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, - 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, - 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, - 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, - 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, - 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, - 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, - 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, - 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d -}; - -static uint32 ComputeCRC32(const string &buf) { - uint32 x = ~0U; - for (int i = 0; i < buf.size(); ++i) { - unsigned char c = buf[i]; - x = kCRC32Table[(x ^ c) & 0xff] ^ (x >> 8); - } - return ~x; -} - -static void WriteShort(io::CodedOutputStream *out, uint16 val) { - uint8 p[2]; - p[0] = static_cast(val); - p[1] = static_cast(val >> 8); - out->WriteRaw(p, 2); -} - -ZipWriter::ZipWriter(io::ZeroCopyOutputStream* raw_output) - : raw_output_(raw_output) {} -ZipWriter::~ZipWriter() {} - -bool ZipWriter::Write(const string& filename, const string& contents) { - FileInfo info; - - info.name = filename; - uint16 filename_size = filename.size(); - info.offset = raw_output_->ByteCount(); - info.size = contents.size(); - info.crc32 = ComputeCRC32(contents); - - files_.push_back(info); - - // write file header - io::CodedOutputStream output(raw_output_); - output.WriteLittleEndian32(0x04034b50); // magic - WriteShort(&output, 10); // version needed to extract - WriteShort(&output, 0); // flags - WriteShort(&output, 0); // compression method: stored - WriteShort(&output, 0); // last modified time - WriteShort(&output, 0); // last modified date - output.WriteLittleEndian32(info.crc32); // crc-32 - output.WriteLittleEndian32(info.size); // compressed size - output.WriteLittleEndian32(info.size); // uncompressed size - WriteShort(&output, filename_size); // file name length - WriteShort(&output, 0); // extra field length - output.WriteString(filename); // file name - output.WriteString(contents); // file data - - return !output.HadError(); -} - -bool ZipWriter::WriteDirectory() { - uint16 num_entries = files_.size(); - uint32 dir_ofs = raw_output_->ByteCount(); - - // write central directory - io::CodedOutputStream output(raw_output_); - for (int i = 0; i < num_entries; ++i) { - const string &filename = files_[i].name; - uint16 filename_size = filename.size(); - uint32 crc32 = files_[i].crc32; - uint32 size = files_[i].size; - uint32 offset = files_[i].offset; - - output.WriteLittleEndian32(0x02014b50); // magic - WriteShort(&output, 10); // version made by - WriteShort(&output, 10); // version needed to extract - WriteShort(&output, 0); // flags - WriteShort(&output, 0); // compression method: stored - WriteShort(&output, 0); // last modified time - WriteShort(&output, 0); // last modified date - output.WriteLittleEndian32(crc32); // crc-32 - output.WriteLittleEndian32(size); // compressed size - output.WriteLittleEndian32(size); // uncompressed size - WriteShort(&output, filename_size); // file name length - WriteShort(&output, 0); // extra field length - WriteShort(&output, 0); // file comment length - WriteShort(&output, 0); // starting disk number - WriteShort(&output, 0); // internal file attributes - output.WriteLittleEndian32(0); // external file attributes - output.WriteLittleEndian32(offset); // local header offset - output.WriteString(filename); // file name - } - uint32 dir_len = output.ByteCount(); - - // write end of central directory marker - output.WriteLittleEndian32(0x06054b50); // magic - WriteShort(&output, 0); // disk number - WriteShort(&output, 0); // disk with start of central directory - WriteShort(&output, num_entries); // central directory entries (this disk) - WriteShort(&output, num_entries); // central directory entries (total) - output.WriteLittleEndian32(dir_len); // central directory byte size - output.WriteLittleEndian32(dir_ofs); // central directory offset - WriteShort(&output, 0); // comment length - - return output.HadError(); -} - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.h deleted file mode 100644 index be73972a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/compiler/zip_writer.h +++ /dev/null @@ -1,93 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace compiler { - -class ZipWriter { - public: - ZipWriter(io::ZeroCopyOutputStream* raw_output); - ~ZipWriter(); - - bool Write(const string& filename, const string& contents); - bool WriteDirectory(); - - private: - struct FileInfo { - string name; - uint32 offset; - uint32 size; - uint32 crc32; - }; - - io::ZeroCopyOutputStream* raw_output_; - vector files_; -}; - -} // namespace compiler -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.cc deleted file mode 100644 index 754b5628..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.cc +++ /dev/null @@ -1,4497 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef PACKAGE // autoheader #defines this. :( - -namespace google { -namespace protobuf { - -const FieldDescriptor::CppType -FieldDescriptor::kTypeToCppTypeMap[MAX_TYPE + 1] = { - static_cast(0), // 0 is reserved for errors - - CPPTYPE_DOUBLE, // TYPE_DOUBLE - CPPTYPE_FLOAT, // TYPE_FLOAT - CPPTYPE_INT64, // TYPE_INT64 - CPPTYPE_UINT64, // TYPE_UINT64 - CPPTYPE_INT32, // TYPE_INT32 - CPPTYPE_UINT64, // TYPE_FIXED64 - CPPTYPE_UINT32, // TYPE_FIXED32 - CPPTYPE_BOOL, // TYPE_BOOL - CPPTYPE_STRING, // TYPE_STRING - CPPTYPE_MESSAGE, // TYPE_GROUP - CPPTYPE_MESSAGE, // TYPE_MESSAGE - CPPTYPE_STRING, // TYPE_BYTES - CPPTYPE_UINT32, // TYPE_UINT32 - CPPTYPE_ENUM, // TYPE_ENUM - CPPTYPE_INT32, // TYPE_SFIXED32 - CPPTYPE_INT64, // TYPE_SFIXED64 - CPPTYPE_INT32, // TYPE_SINT32 - CPPTYPE_INT64, // TYPE_SINT64 -}; - -const char * const FieldDescriptor::kTypeToName[MAX_TYPE + 1] = { - "ERROR", // 0 is reserved for errors - - "double", // TYPE_DOUBLE - "float", // TYPE_FLOAT - "int64", // TYPE_INT64 - "uint64", // TYPE_UINT64 - "int32", // TYPE_INT32 - "fixed64", // TYPE_FIXED64 - "fixed32", // TYPE_FIXED32 - "bool", // TYPE_BOOL - "string", // TYPE_STRING - "group", // TYPE_GROUP - "message", // TYPE_MESSAGE - "bytes", // TYPE_BYTES - "uint32", // TYPE_UINT32 - "enum", // TYPE_ENUM - "sfixed32", // TYPE_SFIXED32 - "sfixed64", // TYPE_SFIXED64 - "sint32", // TYPE_SINT32 - "sint64", // TYPE_SINT64 -}; - -const char * const FieldDescriptor::kLabelToName[MAX_LABEL + 1] = { - "ERROR", // 0 is reserved for errors - - "optional", // LABEL_OPTIONAL - "required", // LABEL_REQUIRED - "repeated", // LABEL_REPEATED -}; - -#ifndef _MSC_VER // MSVC doesn't need these and won't even accept them. -const int FieldDescriptor::kMaxNumber; -const int FieldDescriptor::kFirstReservedNumber; -const int FieldDescriptor::kLastReservedNumber; -#endif - -namespace { - -const string kEmptyString; - -string ToCamelCase(const string& input) { - bool capitalize_next = false; - string result; - result.reserve(input.size()); - - for (int i = 0; i < input.size(); i++) { - if (input[i] == '_') { - capitalize_next = true; - } else if (capitalize_next) { - // Note: I distrust ctype.h due to locales. - if ('a' <= input[i] && input[i] <= 'z') { - result.push_back(input[i] - 'a' + 'A'); - } else { - result.push_back(input[i]); - } - capitalize_next = false; - } else { - result.push_back(input[i]); - } - } - - // Lower-case the first letter. - if (!result.empty() && 'A' <= result[0] && result[0] <= 'Z') { - result[0] = result[0] - 'A' + 'a'; - } - - return result; -} - -// A DescriptorPool contains a bunch of hash_maps to implement the -// various Find*By*() methods. Since hashtable lookups are O(1), it's -// most efficient to construct a fixed set of large hash_maps used by -// all objects in the pool rather than construct one or more small -// hash_maps for each object. -// -// The keys to these hash_maps are (parent, name) or (parent, number) -// pairs. Unfortunately STL doesn't provide hash functions for pair<>, -// so we must invent our own. -// -// TODO(kenton): Use StringPiece rather than const char* in keys? It would -// be a lot cleaner but we'd just have to convert it back to const char* -// for the open source release. - -typedef pair PointerStringPair; - -struct PointerStringPairEqual { - inline bool operator()(const PointerStringPair& a, - const PointerStringPair& b) const { - return a.first == b.first && strcmp(a.second, b.second) == 0; - } -}; - -template -struct PointerIntegerPairHash { - size_t operator()(const PairType& p) const { - // FIXME(kenton): What is the best way to compute this hash? I have - // no idea! This seems a bit better than an XOR. - return reinterpret_cast(p.first) * ((1 << 16) - 1) + p.second; - } - - // Used only by MSVC and platforms where hash_map is not available. - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - inline bool operator()(const PairType& a, const PairType& b) const { - return a.first < b.first || - (a.first == b.first && a.second < b.second); - } -}; - -typedef pair DescriptorIntPair; -typedef pair EnumIntPair; - -struct PointerStringPairHash { - size_t operator()(const PointerStringPair& p) const { - // FIXME(kenton): What is the best way to compute this hash? I have - // no idea! This seems a bit better than an XOR. - hash cstring_hash; - return reinterpret_cast(p.first) * ((1 << 16) - 1) + - cstring_hash(p.second); - } - - // Used only by MSVC and platforms where hash_map is not available. - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - inline bool operator()(const PointerStringPair& a, - const PointerStringPair& b) const { - if (a.first < b.first) return true; - if (a.first > b.first) return false; - return strcmp(a.second, b.second) < 0; - } -}; - - -struct Symbol { - enum Type { - NULL_SYMBOL, MESSAGE, FIELD, ENUM, ENUM_VALUE, SERVICE, METHOD, PACKAGE - }; - Type type; - union { - const Descriptor* descriptor; - const FieldDescriptor* field_descriptor; - const EnumDescriptor* enum_descriptor; - const EnumValueDescriptor* enum_value_descriptor; - const ServiceDescriptor* service_descriptor; - const MethodDescriptor* method_descriptor; - const FileDescriptor* package_file_descriptor; - }; - - inline Symbol() : type(NULL_SYMBOL) { descriptor = NULL; } - inline bool IsNull() const { return type == NULL_SYMBOL; } - inline bool IsType() const { - return type == MESSAGE || type == ENUM; - } - inline bool IsAggregate() const { - return type == MESSAGE || type == PACKAGE - || type == ENUM || type == SERVICE; - } - -#define CONSTRUCTOR(TYPE, TYPE_CONSTANT, FIELD) \ - inline explicit Symbol(const TYPE* value) { \ - type = TYPE_CONSTANT; \ - this->FIELD = value; \ - } - - CONSTRUCTOR(Descriptor , MESSAGE , descriptor ) - CONSTRUCTOR(FieldDescriptor , FIELD , field_descriptor ) - CONSTRUCTOR(EnumDescriptor , ENUM , enum_descriptor ) - CONSTRUCTOR(EnumValueDescriptor, ENUM_VALUE, enum_value_descriptor ) - CONSTRUCTOR(ServiceDescriptor , SERVICE , service_descriptor ) - CONSTRUCTOR(MethodDescriptor , METHOD , method_descriptor ) - CONSTRUCTOR(FileDescriptor , PACKAGE , package_file_descriptor) -#undef CONSTRUCTOR - - const FileDescriptor* GetFile() const { - switch (type) { - case NULL_SYMBOL: return NULL; - case MESSAGE : return descriptor ->file(); - case FIELD : return field_descriptor ->file(); - case ENUM : return enum_descriptor ->file(); - case ENUM_VALUE : return enum_value_descriptor->type()->file(); - case SERVICE : return service_descriptor ->file(); - case METHOD : return method_descriptor ->service()->file(); - case PACKAGE : return package_file_descriptor; - } - return NULL; - } -}; - -const Symbol kNullSymbol; - -typedef hash_map, streq> - SymbolsByNameMap; -typedef hash_map - SymbolsByParentMap; -typedef hash_map, streq> - FilesByNameMap; -typedef hash_map - FieldsByNameMap; -typedef hash_map > - FieldsByNumberMap; -typedef hash_map > - EnumValuesByNumberMap; -// This is a map rather than a hash_map, since we use it to iterate -// through all the extensions that extend a given Descriptor, and an -// ordered data structure that implements lower_bound is convenient -// for that. -typedef map - ExtensionsGroupedByDescriptorMap; - -} // anonymous namespace - -// =================================================================== -// DescriptorPool::Tables - -class DescriptorPool::Tables { - public: - Tables(); - ~Tables(); - - // Checkpoint the state of the tables. Future calls to Rollback() will - // return the Tables to this state. This is used when building files, since - // some kinds of validation errors cannot be detected until the file's - // descriptors have already been added to the tables. BuildFile() calls - // Checkpoint() before it starts building and Rollback() if it encounters - // an error. - void Checkpoint(); - - // Roll back the Tables to the state of the last Checkpoint(), removing - // everything that was added after that point. - void Rollback(); - - // The stack of files which are currently being built. Used to detect - // cyclic dependencies when loading files from a DescriptorDatabase. Not - // used when fallback_database_ == NULL. - vector pending_files_; - - // A set of files which we have tried to load from the fallback database - // and encountered errors. We will not attempt to load them again. - // Not used when fallback_database_ == NULL. - hash_set known_bad_files_; - - // The set of descriptors for which we've already loaded the full - // set of extensions numbers from fallback_database_. - hash_set extensions_loaded_from_db_; - - // ----------------------------------------------------------------- - // Finding items. - - // Find symbols. This returns a null Symbol (symbol.IsNull() is true) - // if not found. - inline Symbol FindSymbol(const string& key) const; - - // This implements the body of DescriptorPool::Find*ByName(). It should - // really be a private method of DescriptorPool, but that would require - // declaring Symbol in descriptor.h, which would drag all kinds of other - // stuff into the header. Yay C++. - Symbol FindByNameHelper( - const DescriptorPool* pool, const string& name) const; - - // These return NULL if not found. - inline const FileDescriptor* FindFile(const string& key) const; - inline const FieldDescriptor* FindExtension(const Descriptor* extendee, - int number); - inline void FindAllExtensions(const Descriptor* extendee, - vector* out) const; - - // ----------------------------------------------------------------- - // Adding items. - - // These add items to the corresponding tables. They return false if - // the key already exists in the table. For AddSymbol(), the string passed - // in must be one that was constructed using AllocateString(), as it will - // be used as a key in the symbols_by_name_ map without copying. - bool AddSymbol(const string& full_name, Symbol symbol); - bool AddFile(const FileDescriptor* file); - bool AddExtension(const FieldDescriptor* field); - - // ----------------------------------------------------------------- - // Allocating memory. - - // Allocate an object which will be reclaimed when the pool is - // destroyed. Note that the object's destructor will never be called, - // so its fields must be plain old data (primitive data types and - // pointers). All of the descriptor types are such objects. - template Type* Allocate(); - - // Allocate an array of objects which will be reclaimed when the - // pool in destroyed. Again, destructors are never called. - template Type* AllocateArray(int count); - - // Allocate a string which will be destroyed when the pool is destroyed. - // The string is initialized to the given value for convenience. - string* AllocateString(const string& value); - - // Allocate a protocol message object. Some older versions of GCC have - // trouble understanding explicit template instantiations in some cases, so - // in those cases we have to pass a dummy pointer of the right type as the - // parameter instead of specifying the type explicitly. - template Type* AllocateMessage(Type* dummy = NULL); - - // Allocate a FileDescriptorTables object. - FileDescriptorTables* AllocateFileTables(); - - private: - vector strings_; // All strings in the pool. - vector messages_; // All messages in the pool. - vector file_tables_; // All file tables in the pool. - vector allocations_; // All other memory allocated in the pool. - - SymbolsByNameMap symbols_by_name_; - FilesByNameMap files_by_name_; - ExtensionsGroupedByDescriptorMap extensions_; - - int strings_before_checkpoint_; - int messages_before_checkpoint_; - int file_tables_before_checkpoint_; - int allocations_before_checkpoint_; - vector symbols_after_checkpoint_; - vector files_after_checkpoint_; - vector extensions_after_checkpoint_; - - // Allocate some bytes which will be reclaimed when the pool is - // destroyed. - void* AllocateBytes(int size); -}; - -// Contains tables specific to a particular file. These tables are not -// modified once the file has been constructed, so they need not be -// protected by a mutex. This makes operations that depend only on the -// contents of a single file -- e.g. Descriptor::FindFieldByName() -- -// lock-free. -// -// For historical reasons, the definitions of the methods of -// FileDescriptorTables and DescriptorPool::Tables are interleaved below. -// These used to be a single class. -class FileDescriptorTables { - public: - FileDescriptorTables(); - ~FileDescriptorTables(); - - // Empty table, used with placeholder files. - static const FileDescriptorTables kEmpty; - - // ----------------------------------------------------------------- - // Finding items. - - // Find symbols. These return a null Symbol (symbol.IsNull() is true) - // if not found. - inline Symbol FindNestedSymbol(const void* parent, - const string& name) const; - inline Symbol FindNestedSymbolOfType(const void* parent, - const string& name, - const Symbol::Type type) const; - - // These return NULL if not found. - inline const FieldDescriptor* FindFieldByNumber( - const Descriptor* parent, int number) const; - inline const FieldDescriptor* FindFieldByLowercaseName( - const void* parent, const string& lowercase_name) const; - inline const FieldDescriptor* FindFieldByCamelcaseName( - const void* parent, const string& camelcase_name) const; - inline const EnumValueDescriptor* FindEnumValueByNumber( - const EnumDescriptor* parent, int number) const; - - // ----------------------------------------------------------------- - // Adding items. - - // These add items to the corresponding tables. They return false if - // the key already exists in the table. For AddAliasUnderParent(), the - // string passed in must be one that was constructed using AllocateString(), - // as it will be used as a key in the symbols_by_parent_ map without copying. - bool AddAliasUnderParent(const void* parent, const string& name, - Symbol symbol); - bool AddFieldByNumber(const FieldDescriptor* field); - bool AddEnumValueByNumber(const EnumValueDescriptor* value); - - // Adds the field to the lowercase_name and camelcase_name maps. Never - // fails because we allow duplicates; the first field by the name wins. - void AddFieldByStylizedNames(const FieldDescriptor* field); - - private: - SymbolsByParentMap symbols_by_parent_; - FieldsByNameMap fields_by_lowercase_name_; - FieldsByNameMap fields_by_camelcase_name_; - FieldsByNumberMap fields_by_number_; // Not including extensions. - EnumValuesByNumberMap enum_values_by_number_; -}; - -DescriptorPool::Tables::Tables() - : strings_before_checkpoint_(0), - messages_before_checkpoint_(0), - allocations_before_checkpoint_(0) {} - -DescriptorPool::Tables::~Tables() { - // Note that the deletion order is important, since the destructors of some - // messages may refer to objects in allocations_. - STLDeleteElements(&messages_); - for (int i = 0; i < allocations_.size(); i++) { - operator delete(allocations_[i]); - } - STLDeleteElements(&strings_); - STLDeleteElements(&file_tables_); -} - -FileDescriptorTables::FileDescriptorTables() {} -FileDescriptorTables::~FileDescriptorTables() {} - -const FileDescriptorTables FileDescriptorTables::kEmpty; - -void DescriptorPool::Tables::Checkpoint() { - strings_before_checkpoint_ = strings_.size(); - messages_before_checkpoint_ = messages_.size(); - file_tables_before_checkpoint_ = file_tables_.size(); - allocations_before_checkpoint_ = allocations_.size(); - - symbols_after_checkpoint_.clear(); - files_after_checkpoint_.clear(); - extensions_after_checkpoint_.clear(); -} - -void DescriptorPool::Tables::Rollback() { - for (int i = 0; i < symbols_after_checkpoint_.size(); i++) { - symbols_by_name_.erase(symbols_after_checkpoint_[i]); - } - for (int i = 0; i < files_after_checkpoint_.size(); i++) { - files_by_name_.erase(files_after_checkpoint_[i]); - } - for (int i = 0; i < extensions_after_checkpoint_.size(); i++) { - extensions_.erase(extensions_after_checkpoint_[i]); - } - - symbols_after_checkpoint_.clear(); - files_after_checkpoint_.clear(); - extensions_after_checkpoint_.clear(); - - STLDeleteContainerPointers( - strings_.begin() + strings_before_checkpoint_, strings_.end()); - STLDeleteContainerPointers( - messages_.begin() + messages_before_checkpoint_, messages_.end()); - STLDeleteContainerPointers( - file_tables_.begin() + file_tables_before_checkpoint_, file_tables_.end()); - for (int i = allocations_before_checkpoint_; i < allocations_.size(); i++) { - operator delete(allocations_[i]); - } - - strings_.resize(strings_before_checkpoint_); - messages_.resize(messages_before_checkpoint_); - file_tables_.resize(file_tables_before_checkpoint_); - allocations_.resize(allocations_before_checkpoint_); -} - -// ------------------------------------------------------------------- - -inline Symbol DescriptorPool::Tables::FindSymbol(const string& key) const { - const Symbol* result = FindOrNull(symbols_by_name_, key.c_str()); - if (result == NULL) { - return kNullSymbol; - } else { - return *result; - } -} - -inline Symbol FileDescriptorTables::FindNestedSymbol( - const void* parent, const string& name) const { - const Symbol* result = - FindOrNull(symbols_by_parent_, PointerStringPair(parent, name.c_str())); - if (result == NULL) { - return kNullSymbol; - } else { - return *result; - } -} - -inline Symbol FileDescriptorTables::FindNestedSymbolOfType( - const void* parent, const string& name, const Symbol::Type type) const { - Symbol result = FindNestedSymbol(parent, name); - if (result.type != type) return kNullSymbol; - return result; -} - -Symbol DescriptorPool::Tables::FindByNameHelper( - const DescriptorPool* pool, const string& name) const { - MutexLockMaybe lock(pool->mutex_); - Symbol result = FindSymbol(name); - - if (result.IsNull() && pool->underlay_ != NULL) { - // Symbol not found; check the underlay. - result = - pool->underlay_->tables_->FindByNameHelper(pool->underlay_, name); - } - - if (result.IsNull()) { - // Symbol still not found, so check fallback database. - if (pool->TryFindSymbolInFallbackDatabase(name)) { - result = FindSymbol(name); - } - } - - return result; -} - -inline const FileDescriptor* DescriptorPool::Tables::FindFile( - const string& key) const { - return FindPtrOrNull(files_by_name_, key.c_str()); -} - -inline const FieldDescriptor* FileDescriptorTables::FindFieldByNumber( - const Descriptor* parent, int number) const { - return FindPtrOrNull(fields_by_number_, make_pair(parent, number)); -} - -inline const FieldDescriptor* FileDescriptorTables::FindFieldByLowercaseName( - const void* parent, const string& lowercase_name) const { - return FindPtrOrNull(fields_by_lowercase_name_, - PointerStringPair(parent, lowercase_name.c_str())); -} - -inline const FieldDescriptor* FileDescriptorTables::FindFieldByCamelcaseName( - const void* parent, const string& camelcase_name) const { - return FindPtrOrNull(fields_by_camelcase_name_, - PointerStringPair(parent, camelcase_name.c_str())); -} - -inline const EnumValueDescriptor* FileDescriptorTables::FindEnumValueByNumber( - const EnumDescriptor* parent, int number) const { - return FindPtrOrNull(enum_values_by_number_, make_pair(parent, number)); -} - -inline const FieldDescriptor* DescriptorPool::Tables::FindExtension( - const Descriptor* extendee, int number) { - return FindPtrOrNull(extensions_, make_pair(extendee, number)); -} - -inline void DescriptorPool::Tables::FindAllExtensions( - const Descriptor* extendee, vector* out) const { - ExtensionsGroupedByDescriptorMap::const_iterator it = - extensions_.lower_bound(make_pair(extendee, 0)); - for (; it != extensions_.end() && it->first.first == extendee; ++it) { - out->push_back(it->second); - } -} - -// ------------------------------------------------------------------- - -bool DescriptorPool::Tables::AddSymbol( - const string& full_name, Symbol symbol) { - if (InsertIfNotPresent(&symbols_by_name_, full_name.c_str(), symbol)) { - symbols_after_checkpoint_.push_back(full_name.c_str()); - return true; - } else { - return false; - } -} - -bool FileDescriptorTables::AddAliasUnderParent( - const void* parent, const string& name, Symbol symbol) { - PointerStringPair by_parent_key(parent, name.c_str()); - return InsertIfNotPresent(&symbols_by_parent_, by_parent_key, symbol); -} - -bool DescriptorPool::Tables::AddFile(const FileDescriptor* file) { - if (InsertIfNotPresent(&files_by_name_, file->name().c_str(), file)) { - files_after_checkpoint_.push_back(file->name().c_str()); - return true; - } else { - return false; - } -} - -void FileDescriptorTables::AddFieldByStylizedNames( - const FieldDescriptor* field) { - const void* parent; - if (field->is_extension()) { - if (field->extension_scope() == NULL) { - parent = field->file(); - } else { - parent = field->extension_scope(); - } - } else { - parent = field->containing_type(); - } - - PointerStringPair lowercase_key(parent, field->lowercase_name().c_str()); - InsertIfNotPresent(&fields_by_lowercase_name_, lowercase_key, field); - - PointerStringPair camelcase_key(parent, field->camelcase_name().c_str()); - InsertIfNotPresent(&fields_by_camelcase_name_, camelcase_key, field); -} - -bool FileDescriptorTables::AddFieldByNumber(const FieldDescriptor* field) { - DescriptorIntPair key(field->containing_type(), field->number()); - return InsertIfNotPresent(&fields_by_number_, key, field); -} - -bool FileDescriptorTables::AddEnumValueByNumber( - const EnumValueDescriptor* value) { - EnumIntPair key(value->type(), value->number()); - return InsertIfNotPresent(&enum_values_by_number_, key, value); -} - -bool DescriptorPool::Tables::AddExtension(const FieldDescriptor* field) { - DescriptorIntPair key(field->containing_type(), field->number()); - if (InsertIfNotPresent(&extensions_, key, field)) { - extensions_after_checkpoint_.push_back(key); - return true; - } else { - return false; - } -} - -// ------------------------------------------------------------------- - -template -Type* DescriptorPool::Tables::Allocate() { - return reinterpret_cast(AllocateBytes(sizeof(Type))); -} - -template -Type* DescriptorPool::Tables::AllocateArray(int count) { - return reinterpret_cast(AllocateBytes(sizeof(Type) * count)); -} - -string* DescriptorPool::Tables::AllocateString(const string& value) { - string* result = new string(value); - strings_.push_back(result); - return result; -} - -template -Type* DescriptorPool::Tables::AllocateMessage(Type* dummy) { - Type* result = new Type; - messages_.push_back(result); - return result; -} - -FileDescriptorTables* DescriptorPool::Tables::AllocateFileTables() { - FileDescriptorTables* result = new FileDescriptorTables; - file_tables_.push_back(result); - return result; -} - -void* DescriptorPool::Tables::AllocateBytes(int size) { - // TODO(kenton): Would it be worthwhile to implement this in some more - // sophisticated way? Probably not for the open source release, but for - // internal use we could easily plug in one of our existing memory pool - // allocators... - if (size == 0) return NULL; - - void* result = operator new(size); - allocations_.push_back(result); - return result; -} - -// =================================================================== -// DescriptorPool - -DescriptorPool::ErrorCollector::~ErrorCollector() {} - -DescriptorPool::DescriptorPool() - : mutex_(NULL), - fallback_database_(NULL), - default_error_collector_(NULL), - underlay_(NULL), - tables_(new Tables), - enforce_dependencies_(true), - allow_unknown_(false) {} - -DescriptorPool::DescriptorPool(DescriptorDatabase* fallback_database, - ErrorCollector* error_collector) - : mutex_(new Mutex), - fallback_database_(fallback_database), - default_error_collector_(error_collector), - underlay_(NULL), - tables_(new Tables), - enforce_dependencies_(true), - allow_unknown_(false) { -} - -DescriptorPool::DescriptorPool(const DescriptorPool* underlay) - : mutex_(NULL), - fallback_database_(NULL), - default_error_collector_(NULL), - underlay_(underlay), - tables_(new Tables), - enforce_dependencies_(true), - allow_unknown_(false) {} - -DescriptorPool::~DescriptorPool() { - if (mutex_ != NULL) delete mutex_; -} - -// DescriptorPool::BuildFile() defined later. -// DescriptorPool::BuildFileCollectingErrors() defined later. - -void DescriptorPool::InternalDontEnforceDependencies() { - enforce_dependencies_ = false; -} - -bool DescriptorPool::InternalIsFileLoaded(const string& filename) const { - MutexLockMaybe lock(mutex_); - return tables_->FindFile(filename) != NULL; -} - -// generated_pool ==================================================== - -namespace { - - -EncodedDescriptorDatabase* generated_database_ = NULL; -DescriptorPool* generated_pool_ = NULL; -GOOGLE_PROTOBUF_DECLARE_ONCE(generated_pool_init_); - -void DeleteGeneratedPool() { - delete generated_database_; - generated_database_ = NULL; - delete generated_pool_; - generated_pool_ = NULL; -} - -void InitGeneratedPool() { - generated_database_ = new EncodedDescriptorDatabase; - generated_pool_ = new DescriptorPool(generated_database_); - - internal::OnShutdown(&DeleteGeneratedPool); -} - -inline void InitGeneratedPoolOnce() { - ::google::protobuf::GoogleOnceInit(&generated_pool_init_, &InitGeneratedPool); -} - -} // anonymous namespace - -const DescriptorPool* DescriptorPool::generated_pool() { - InitGeneratedPoolOnce(); - return generated_pool_; -} - -DescriptorPool* DescriptorPool::internal_generated_pool() { - InitGeneratedPoolOnce(); - return generated_pool_; -} - -void DescriptorPool::InternalAddGeneratedFile( - const void* encoded_file_descriptor, int size) { - // So, this function is called in the process of initializing the - // descriptors for generated proto classes. Each generated .pb.cc file - // has an internal procedure called AddDescriptors() which is called at - // process startup, and that function calls this one in order to register - // the raw bytes of the FileDescriptorProto representing the file. - // - // We do not actually construct the descriptor objects right away. We just - // hang on to the bytes until they are actually needed. We actually construct - // the descriptor the first time one of the following things happens: - // * Someone calls a method like descriptor(), GetDescriptor(), or - // GetReflection() on the generated types, which requires returning the - // descriptor or an object based on it. - // * Someone looks up the descriptor in DescriptorPool::generated_pool(). - // - // Once one of these happens, the DescriptorPool actually parses the - // FileDescriptorProto and generates a FileDescriptor (and all its children) - // based on it. - // - // Note that FileDescriptorProto is itself a generated protocol message. - // Therefore, when we parse one, we have to be very careful to avoid using - // any descriptor-based operations, since this might cause infinite recursion - // or deadlock. - InitGeneratedPoolOnce(); - GOOGLE_CHECK(generated_database_->Add(encoded_file_descriptor, size)); -} - - -// Find*By* methods ================================================== - -// TODO(kenton): There's a lot of repeated code here, but I'm not sure if -// there's any good way to factor it out. Think about this some time when -// there's nothing more important to do (read: never). - -const FileDescriptor* DescriptorPool::FindFileByName(const string& name) const { - MutexLockMaybe lock(mutex_); - const FileDescriptor* result = tables_->FindFile(name); - if (result != NULL) return result; - if (underlay_ != NULL) { - const FileDescriptor* result = underlay_->FindFileByName(name); - if (result != NULL) return result; - } - if (TryFindFileInFallbackDatabase(name)) { - const FileDescriptor* result = tables_->FindFile(name); - if (result != NULL) return result; - } - return NULL; -} - -const FileDescriptor* DescriptorPool::FindFileContainingSymbol( - const string& symbol_name) const { - MutexLockMaybe lock(mutex_); - Symbol result = tables_->FindSymbol(symbol_name); - if (!result.IsNull()) return result.GetFile(); - if (underlay_ != NULL) { - const FileDescriptor* result = - underlay_->FindFileContainingSymbol(symbol_name); - if (result != NULL) return result; - } - if (TryFindSymbolInFallbackDatabase(symbol_name)) { - Symbol result = tables_->FindSymbol(symbol_name); - if (!result.IsNull()) return result.GetFile(); - } - return NULL; -} - -const Descriptor* DescriptorPool::FindMessageTypeByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::MESSAGE) ? result.descriptor : NULL; -} - -const FieldDescriptor* DescriptorPool::FindFieldByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - if (result.type == Symbol::FIELD && - !result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } -} - -const FieldDescriptor* DescriptorPool::FindExtensionByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - if (result.type == Symbol::FIELD && - result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } -} - -const EnumDescriptor* DescriptorPool::FindEnumTypeByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::ENUM) ? result.enum_descriptor : NULL; -} - -const EnumValueDescriptor* DescriptorPool::FindEnumValueByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::ENUM_VALUE) ? - result.enum_value_descriptor : NULL; -} - -const ServiceDescriptor* DescriptorPool::FindServiceByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::SERVICE) ? result.service_descriptor : NULL; -} - -const MethodDescriptor* DescriptorPool::FindMethodByName( - const string& name) const { - Symbol result = tables_->FindByNameHelper(this, name); - return (result.type == Symbol::METHOD) ? result.method_descriptor : NULL; -} - -const FieldDescriptor* DescriptorPool::FindExtensionByNumber( - const Descriptor* extendee, int number) const { - MutexLockMaybe lock(mutex_); - const FieldDescriptor* result = tables_->FindExtension(extendee, number); - if (result != NULL) { - return result; - } - if (underlay_ != NULL) { - const FieldDescriptor* result = - underlay_->FindExtensionByNumber(extendee, number); - if (result != NULL) return result; - } - if (TryFindExtensionInFallbackDatabase(extendee, number)) { - const FieldDescriptor* result = tables_->FindExtension(extendee, number); - if (result != NULL) { - return result; - } - } - return NULL; -} - -void DescriptorPool::FindAllExtensions( - const Descriptor* extendee, vector* out) const { - MutexLockMaybe lock(mutex_); - - // Initialize tables_->extensions_ from the fallback database first - // (but do this only once per descriptor). - if (fallback_database_ != NULL && - tables_->extensions_loaded_from_db_.count(extendee) == 0) { - vector numbers; - if (fallback_database_->FindAllExtensionNumbers(extendee->full_name(), - &numbers)) { - for (int i = 0; i < numbers.size(); ++i) { - int number = numbers[i]; - if (tables_->FindExtension(extendee, number) == NULL) { - TryFindExtensionInFallbackDatabase(extendee, number); - } - } - tables_->extensions_loaded_from_db_.insert(extendee); - } - } - - tables_->FindAllExtensions(extendee, out); - if (underlay_ != NULL) { - underlay_->FindAllExtensions(extendee, out); - } -} - -// ------------------------------------------------------------------- - -const FieldDescriptor* -Descriptor::FindFieldByNumber(int key) const { - const FieldDescriptor* result = - file()->tables_->FindFieldByNumber(this, key); - if (result == NULL || result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const FieldDescriptor* -Descriptor::FindFieldByLowercaseName(const string& key) const { - const FieldDescriptor* result = - file()->tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const FieldDescriptor* -Descriptor::FindFieldByCamelcaseName(const string& key) const { - const FieldDescriptor* result = - file()->tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const FieldDescriptor* -Descriptor::FindFieldByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); - if (!result.IsNull() && !result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } -} - -const FieldDescriptor* -Descriptor::FindExtensionByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); - if (!result.IsNull() && result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } -} - -const FieldDescriptor* -Descriptor::FindExtensionByLowercaseName(const string& key) const { - const FieldDescriptor* result = - file()->tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const FieldDescriptor* -Descriptor::FindExtensionByCamelcaseName(const string& key) const { - const FieldDescriptor* result = - file()->tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const Descriptor* -Descriptor::FindNestedTypeByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE); - if (!result.IsNull()) { - return result.descriptor; - } else { - return NULL; - } -} - -const EnumDescriptor* -Descriptor::FindEnumTypeByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM); - if (!result.IsNull()) { - return result.enum_descriptor; - } else { - return NULL; - } -} - -const EnumValueDescriptor* -Descriptor::FindEnumValueByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); - if (!result.IsNull()) { - return result.enum_value_descriptor; - } else { - return NULL; - } -} - -const EnumValueDescriptor* -EnumDescriptor::FindValueByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); - if (!result.IsNull()) { - return result.enum_value_descriptor; - } else { - return NULL; - } -} - -const EnumValueDescriptor* -EnumDescriptor::FindValueByNumber(int key) const { - return file()->tables_->FindEnumValueByNumber(this, key); -} - -const MethodDescriptor* -ServiceDescriptor::FindMethodByName(const string& key) const { - Symbol result = - file()->tables_->FindNestedSymbolOfType(this, key, Symbol::METHOD); - if (!result.IsNull()) { - return result.method_descriptor; - } else { - return NULL; - } -} - -const Descriptor* -FileDescriptor::FindMessageTypeByName(const string& key) const { - Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE); - if (!result.IsNull()) { - return result.descriptor; - } else { - return NULL; - } -} - -const EnumDescriptor* -FileDescriptor::FindEnumTypeByName(const string& key) const { - Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM); - if (!result.IsNull()) { - return result.enum_descriptor; - } else { - return NULL; - } -} - -const EnumValueDescriptor* -FileDescriptor::FindEnumValueByName(const string& key) const { - Symbol result = - tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); - if (!result.IsNull()) { - return result.enum_value_descriptor; - } else { - return NULL; - } -} - -const ServiceDescriptor* -FileDescriptor::FindServiceByName(const string& key) const { - Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::SERVICE); - if (!result.IsNull()) { - return result.service_descriptor; - } else { - return NULL; - } -} - -const FieldDescriptor* -FileDescriptor::FindExtensionByName(const string& key) const { - Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); - if (!result.IsNull() && result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } -} - -const FieldDescriptor* -FileDescriptor::FindExtensionByLowercaseName(const string& key) const { - const FieldDescriptor* result = tables_->FindFieldByLowercaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; - } else { - return result; - } -} - -const FieldDescriptor* -FileDescriptor::FindExtensionByCamelcaseName(const string& key) const { - const FieldDescriptor* result = tables_->FindFieldByCamelcaseName(this, key); - if (result == NULL || !result->is_extension()) { - return NULL; - } else { - return result; - } -} - -bool Descriptor::IsExtensionNumber(int number) const { - // Linear search should be fine because we don't expect a message to have - // more than a couple extension ranges. - for (int i = 0; i < extension_range_count(); i++) { - if (number >= extension_range(i)->start && - number < extension_range(i)->end) { - return true; - } - } - return false; -} - -// ------------------------------------------------------------------- - -bool DescriptorPool::TryFindFileInFallbackDatabase(const string& name) const { - if (fallback_database_ == NULL) return false; - - if (tables_->known_bad_files_.count(name) > 0) return false; - - FileDescriptorProto file_proto; - if (!fallback_database_->FindFileByName(name, &file_proto) || - BuildFileFromDatabase(file_proto) == NULL) { - tables_->known_bad_files_.insert(name); - return false; - } - - return true; -} - -bool DescriptorPool::TryFindSymbolInFallbackDatabase(const string& name) const { - if (fallback_database_ == NULL) return false; - - FileDescriptorProto file_proto; - if (!fallback_database_->FindFileContainingSymbol(name, &file_proto)) { - return false; - } - - if (tables_->FindFile(file_proto.name()) != NULL) { - // We've already loaded this file, and it apparently doesn't contain the - // symbol we're looking for. Some DescriptorDatabases return false - // positives. - return false; - } - - if (BuildFileFromDatabase(file_proto) == NULL) { - return false; - } - - return true; -} - -bool DescriptorPool::TryFindExtensionInFallbackDatabase( - const Descriptor* containing_type, int field_number) const { - if (fallback_database_ == NULL) return false; - - FileDescriptorProto file_proto; - if (!fallback_database_->FindFileContainingExtension( - containing_type->full_name(), field_number, &file_proto)) { - return false; - } - - if (tables_->FindFile(file_proto.name()) != NULL) { - // We've already loaded this file, and it apparently doesn't contain the - // extension we're looking for. Some DescriptorDatabases return false - // positives. - return false; - } - - if (BuildFileFromDatabase(file_proto) == NULL) { - return false; - } - - return true; -} - -// =================================================================== - -string FieldDescriptor::DefaultValueAsString(bool quote_string_type) const { - GOOGLE_CHECK(has_default_value()) << "No default value"; - switch (cpp_type()) { - case CPPTYPE_INT32: - return SimpleItoa(default_value_int32()); - break; - case CPPTYPE_INT64: - return SimpleItoa(default_value_int64()); - break; - case CPPTYPE_UINT32: - return SimpleItoa(default_value_uint32()); - break; - case CPPTYPE_UINT64: - return SimpleItoa(default_value_uint64()); - break; - case CPPTYPE_FLOAT: - return SimpleFtoa(default_value_float()); - break; - case CPPTYPE_DOUBLE: - return SimpleDtoa(default_value_double()); - break; - case CPPTYPE_BOOL: - return default_value_bool() ? "true" : "false"; - break; - case CPPTYPE_STRING: - if (quote_string_type) { - return "\"" + CEscape(default_value_string()) + "\""; - } else { - if (type() == TYPE_BYTES) { - return CEscape(default_value_string()); - } else { - return default_value_string(); - } - } - break; - case CPPTYPE_ENUM: - return default_value_enum()->name(); - break; - case CPPTYPE_MESSAGE: - GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; - break; - } - GOOGLE_LOG(FATAL) << "Can't get here: failed to get default value as string"; - return ""; -} - -// CopyTo methods ==================================================== - -void FileDescriptor::CopyTo(FileDescriptorProto* proto) const { - proto->set_name(name()); - if (!package().empty()) proto->set_package(package()); - - for (int i = 0; i < dependency_count(); i++) { - proto->add_dependency(dependency(i)->name()); - } - - for (int i = 0; i < message_type_count(); i++) { - message_type(i)->CopyTo(proto->add_message_type()); - } - for (int i = 0; i < enum_type_count(); i++) { - enum_type(i)->CopyTo(proto->add_enum_type()); - } - for (int i = 0; i < service_count(); i++) { - service(i)->CopyTo(proto->add_service()); - } - for (int i = 0; i < extension_count(); i++) { - extension(i)->CopyTo(proto->add_extension()); - } - - if (&options() != &FileOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void Descriptor::CopyTo(DescriptorProto* proto) const { - proto->set_name(name()); - - for (int i = 0; i < field_count(); i++) { - field(i)->CopyTo(proto->add_field()); - } - for (int i = 0; i < nested_type_count(); i++) { - nested_type(i)->CopyTo(proto->add_nested_type()); - } - for (int i = 0; i < enum_type_count(); i++) { - enum_type(i)->CopyTo(proto->add_enum_type()); - } - for (int i = 0; i < extension_range_count(); i++) { - DescriptorProto::ExtensionRange* range = proto->add_extension_range(); - range->set_start(extension_range(i)->start); - range->set_end(extension_range(i)->end); - } - for (int i = 0; i < extension_count(); i++) { - extension(i)->CopyTo(proto->add_extension()); - } - - if (&options() != &MessageOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const { - proto->set_name(name()); - proto->set_number(number()); - - // Some compilers do not allow static_cast directly between two enum types, - // so we must cast to int first. - proto->set_label(static_cast( - implicit_cast(label()))); - proto->set_type(static_cast( - implicit_cast(type()))); - - if (is_extension()) { - if (!containing_type()->is_unqualified_placeholder_) { - proto->set_extendee("."); - } - proto->mutable_extendee()->append(containing_type()->full_name()); - } - - if (cpp_type() == CPPTYPE_MESSAGE) { - if (message_type()->is_placeholder_) { - // We don't actually know if the type is a message type. It could be - // an enum. - proto->clear_type(); - } - - if (!message_type()->is_unqualified_placeholder_) { - proto->set_type_name("."); - } - proto->mutable_type_name()->append(message_type()->full_name()); - } else if (cpp_type() == CPPTYPE_ENUM) { - if (!enum_type()->is_unqualified_placeholder_) { - proto->set_type_name("."); - } - proto->mutable_type_name()->append(enum_type()->full_name()); - } - - if (has_default_value()) { - proto->set_default_value(DefaultValueAsString(false)); - } - - if (&options() != &FieldOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void EnumDescriptor::CopyTo(EnumDescriptorProto* proto) const { - proto->set_name(name()); - - for (int i = 0; i < value_count(); i++) { - value(i)->CopyTo(proto->add_value()); - } - - if (&options() != &EnumOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void EnumValueDescriptor::CopyTo(EnumValueDescriptorProto* proto) const { - proto->set_name(name()); - proto->set_number(number()); - - if (&options() != &EnumValueOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void ServiceDescriptor::CopyTo(ServiceDescriptorProto* proto) const { - proto->set_name(name()); - - for (int i = 0; i < method_count(); i++) { - method(i)->CopyTo(proto->add_method()); - } - - if (&options() != &ServiceOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -void MethodDescriptor::CopyTo(MethodDescriptorProto* proto) const { - proto->set_name(name()); - - if (!input_type()->is_unqualified_placeholder_) { - proto->set_input_type("."); - } - proto->mutable_input_type()->append(input_type()->full_name()); - - if (!output_type()->is_unqualified_placeholder_) { - proto->set_output_type("."); - } - proto->mutable_output_type()->append(output_type()->full_name()); - - if (&options() != &MethodOptions::default_instance()) { - proto->mutable_options()->CopyFrom(options()); - } -} - -// DebugString methods =============================================== - -namespace { - -// Used by each of the option formatters. -bool RetrieveOptions(const Message &options, vector *option_entries) { - option_entries->clear(); - const Reflection* reflection = options.GetReflection(); - vector fields; - reflection->ListFields(options, &fields); - for (int i = 0; i < fields.size(); i++) { - // Doesn't make sense to have message type fields here - if (fields[i]->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - continue; - } - int count = 1; - bool repeated = false; - if (fields[i]->is_repeated()) { - count = reflection->FieldSize(options, fields[i]); - repeated = true; - } - for (int j = 0; j < count; j++) { - string fieldval; - TextFormat::PrintFieldValueToString(options, fields[i], - repeated ? count : -1, &fieldval); - option_entries->push_back(fields[i]->name() + " = " + fieldval); - } - } - return !option_entries->empty(); -} - -// Formats options that all appear together in brackets. Does not include -// brackets. -bool FormatBracketedOptions(const Message &options, string *output) { - vector all_options; - if (RetrieveOptions(options, &all_options)) { - output->append(JoinStrings(all_options, ", ")); - } - return !all_options.empty(); -} - -// Formats options one per line -bool FormatLineOptions(int depth, const Message &options, string *output) { - string prefix(depth * 2, ' '); - vector all_options; - if (RetrieveOptions(options, &all_options)) { - for (int i = 0; i < all_options.size(); i++) { - strings::SubstituteAndAppend(output, "$0option $1;\n", - prefix, all_options[i]); - } - } - return !all_options.empty(); -} - -} // anonymous namespace - -string FileDescriptor::DebugString() const { - string contents = "syntax = \"proto2\";\n\n"; - - for (int i = 0; i < dependency_count(); i++) { - strings::SubstituteAndAppend(&contents, "import \"$0\";\n", - dependency(i)->name()); - } - - if (!package().empty()) { - strings::SubstituteAndAppend(&contents, "package $0;\n\n", package()); - } - - if (FormatLineOptions(0, options(), &contents)) { - contents.append("\n"); // add some space if we had options - } - - for (int i = 0; i < enum_type_count(); i++) { - enum_type(i)->DebugString(0, &contents); - contents.append("\n"); - } - - // Find all the 'group' type extensions; we will not output their nested - // definitions (those will be done with their group field descriptor). - set groups; - for (int i = 0; i < extension_count(); i++) { - if (extension(i)->type() == FieldDescriptor::TYPE_GROUP) { - groups.insert(extension(i)->message_type()); - } - } - - for (int i = 0; i < message_type_count(); i++) { - if (groups.count(message_type(i)) == 0) { - strings::SubstituteAndAppend(&contents, "message $0", - message_type(i)->name()); - message_type(i)->DebugString(0, &contents); - contents.append("\n"); - } - } - - for (int i = 0; i < service_count(); i++) { - service(i)->DebugString(&contents); - contents.append("\n"); - } - - const Descriptor* containing_type = NULL; - for (int i = 0; i < extension_count(); i++) { - if (extension(i)->containing_type() != containing_type) { - if (i > 0) contents.append("}\n\n"); - containing_type = extension(i)->containing_type(); - strings::SubstituteAndAppend(&contents, "extend .$0 {\n", - containing_type->full_name()); - } - extension(i)->DebugString(1, &contents); - } - if (extension_count() > 0) contents.append("}\n\n"); - - return contents; -} - -string Descriptor::DebugString() const { - string contents; - strings::SubstituteAndAppend(&contents, "message $0", name()); - DebugString(0, &contents); - return contents; -} - -void Descriptor::DebugString(int depth, string *contents) const { - string prefix(depth * 2, ' '); - ++depth; - contents->append(" {\n"); - - FormatLineOptions(depth, options(), contents); - - // Find all the 'group' types for fields and extensions; we will not output - // their nested definitions (those will be done with their group field - // descriptor). - set groups; - for (int i = 0; i < field_count(); i++) { - if (field(i)->type() == FieldDescriptor::TYPE_GROUP) { - groups.insert(field(i)->message_type()); - } - } - for (int i = 0; i < extension_count(); i++) { - if (extension(i)->type() == FieldDescriptor::TYPE_GROUP) { - groups.insert(extension(i)->message_type()); - } - } - - for (int i = 0; i < nested_type_count(); i++) { - if (groups.count(nested_type(i)) == 0) { - strings::SubstituteAndAppend(contents, "$0 message $1", - prefix, nested_type(i)->name()); - nested_type(i)->DebugString(depth, contents); - } - } - for (int i = 0; i < enum_type_count(); i++) { - enum_type(i)->DebugString(depth, contents); - } - for (int i = 0; i < field_count(); i++) { - field(i)->DebugString(depth, contents); - } - - for (int i = 0; i < extension_range_count(); i++) { - strings::SubstituteAndAppend(contents, "$0 extensions $1 to $2;\n", - prefix, - extension_range(i)->start, - extension_range(i)->end - 1); - } - - // Group extensions by what they extend, so they can be printed out together. - const Descriptor* containing_type = NULL; - for (int i = 0; i < extension_count(); i++) { - if (extension(i)->containing_type() != containing_type) { - if (i > 0) strings::SubstituteAndAppend(contents, "$0 }\n", prefix); - containing_type = extension(i)->containing_type(); - strings::SubstituteAndAppend(contents, "$0 extend .$1 {\n", - prefix, containing_type->full_name()); - } - extension(i)->DebugString(depth + 1, contents); - } - if (extension_count() > 0) - strings::SubstituteAndAppend(contents, "$0 }\n", prefix); - - strings::SubstituteAndAppend(contents, "$0}\n", prefix); -} - -string FieldDescriptor::DebugString() const { - string contents; - int depth = 0; - if (is_extension()) { - strings::SubstituteAndAppend(&contents, "extend .$0 {\n", - containing_type()->full_name()); - depth = 1; - } - DebugString(depth, &contents); - if (is_extension()) { - contents.append("}\n"); - } - return contents; -} - -void FieldDescriptor::DebugString(int depth, string *contents) const { - string prefix(depth * 2, ' '); - string field_type; - switch (type()) { - case TYPE_MESSAGE: - field_type = "." + message_type()->full_name(); - break; - case TYPE_ENUM: - field_type = "." + enum_type()->full_name(); - break; - default: - field_type = kTypeToName[type()]; - } - - strings::SubstituteAndAppend(contents, "$0$1 $2 $3 = $4", - prefix, - kLabelToName[label()], - field_type, - type() == TYPE_GROUP ? message_type()->name() : - name(), - number()); - - bool bracketed = false; - if (has_default_value()) { - bracketed = true; - strings::SubstituteAndAppend(contents, " [default = $0", - DefaultValueAsString(true)); - } - - string formatted_options; - if (FormatBracketedOptions(options(), &formatted_options)) { - contents->append(bracketed ? ", " : " ["); - bracketed = true; - contents->append(formatted_options); - } - - if (bracketed) { - contents->append("]"); - } - - if (type() == TYPE_GROUP) { - message_type()->DebugString(depth, contents); - } else { - contents->append(";\n"); - } -} - -string EnumDescriptor::DebugString() const { - string contents; - DebugString(0, &contents); - return contents; -} - -void EnumDescriptor::DebugString(int depth, string *contents) const { - string prefix(depth * 2, ' '); - ++depth; - strings::SubstituteAndAppend(contents, "$0enum $1 {\n", - prefix, name()); - - FormatLineOptions(depth, options(), contents); - - for (int i = 0; i < value_count(); i++) { - value(i)->DebugString(depth, contents); - } - strings::SubstituteAndAppend(contents, "$0}\n", prefix); -} - -string EnumValueDescriptor::DebugString() const { - string contents; - DebugString(0, &contents); - return contents; -} - -void EnumValueDescriptor::DebugString(int depth, string *contents) const { - string prefix(depth * 2, ' '); - strings::SubstituteAndAppend(contents, "$0$1 = $2", - prefix, name(), number()); - - string formatted_options; - if (FormatBracketedOptions(options(), &formatted_options)) { - strings::SubstituteAndAppend(contents, " [$0]", formatted_options); - } - contents->append(";\n"); -} - -string ServiceDescriptor::DebugString() const { - string contents; - DebugString(&contents); - return contents; -} - -void ServiceDescriptor::DebugString(string *contents) const { - strings::SubstituteAndAppend(contents, "service $0 {\n", name()); - - FormatLineOptions(1, options(), contents); - - for (int i = 0; i < method_count(); i++) { - method(i)->DebugString(1, contents); - } - - contents->append("}\n"); -} - -string MethodDescriptor::DebugString() const { - string contents; - DebugString(0, &contents); - return contents; -} - -void MethodDescriptor::DebugString(int depth, string *contents) const { - string prefix(depth * 2, ' '); - ++depth; - strings::SubstituteAndAppend(contents, "$0rpc $1(.$2) returns (.$3)", - prefix, name(), - input_type()->full_name(), - output_type()->full_name()); - - string formatted_options; - if (FormatLineOptions(depth, options(), &formatted_options)) { - strings::SubstituteAndAppend(contents, " {\n$0$1}\n", - formatted_options, prefix); - } else { - contents->append(";\n"); - } -} -// =================================================================== - -namespace { - -// Represents an options message to interpret. Extension names in the option -// name are respolved relative to name_scope. element_name and orig_opt are -// used only for error reporting (since the parser records locations against -// pointers in the original options, not the mutable copy). The Message must be -// one of the Options messages in descriptor.proto. -struct OptionsToInterpret { - OptionsToInterpret(const string& ns, - const string& el, - const Message* orig_opt, - Message* opt) - : name_scope(ns), - element_name(el), - original_options(orig_opt), - options(opt) { - } - string name_scope; - string element_name; - const Message* original_options; - Message* options; -}; - -} // namespace - -class DescriptorBuilder { - public: - DescriptorBuilder(const DescriptorPool* pool, - DescriptorPool::Tables* tables, - DescriptorPool::ErrorCollector* error_collector); - ~DescriptorBuilder(); - - const FileDescriptor* BuildFile(const FileDescriptorProto& proto); - - private: - friend class OptionInterpreter; - - const DescriptorPool* pool_; - DescriptorPool::Tables* tables_; // for convenience - DescriptorPool::ErrorCollector* error_collector_; - - // As we build descriptors we store copies of the options messages in - // them. We put pointers to those copies in this vector, as we build, so we - // can later (after cross-linking) interpret those options. - vector options_to_interpret_; - - bool had_errors_; - string filename_; - FileDescriptor* file_; - FileDescriptorTables* file_tables_; - - // If LookupSymbol() finds a symbol that is in a file which is not a declared - // dependency of this file, it will fail, but will set - // possible_undeclared_dependency_ to point at that file. This is only used - // by AddNotDefinedError() to report a more useful error message. - // possible_undeclared_dependency_name_ is the name of the symbol that was - // actually found in possible_undeclared_dependency_, which may be a parent - // of the symbol actually looked for. - const FileDescriptor* possible_undeclared_dependency_; - string possible_undeclared_dependency_name_; - - void AddError(const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error); - - // Adds an error indicating that undefined_symbol was not defined. Must - // only be called after LookupSymbol() fails. - void AddNotDefinedError( - const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const string& undefined_symbol); - - // Silly helper which determines if the given file is in the given package. - // I.e., either file->package() == package_name or file->package() is a - // nested package within package_name. - bool IsInPackage(const FileDescriptor* file, const string& package_name); - - // Like tables_->FindSymbol(), but additionally: - // - Search the pool's underlay if not found in tables_. - // - Insure that the resulting Symbol is from one of the file's declared - // dependencies. - Symbol FindSymbol(const string& name); - - // Like FindSymbol() but does not require that the symbol is in one of the - // file's declared dependencies. - Symbol FindSymbolNotEnforcingDeps(const string& name); - - // Like FindSymbol(), but looks up the name relative to some other symbol - // name. This first searches siblings of relative_to, then siblings of its - // parents, etc. For example, LookupSymbol("foo.bar", "baz.qux.corge") makes - // the following calls, returning the first non-null result: - // FindSymbol("baz.qux.foo.bar"), FindSymbol("baz.foo.bar"), - // FindSymbol("foo.bar"). If AllowUnknownDependencies() has been called - // on the DescriptorPool, this will generate a placeholder type if - // the name is not found (unless the name itself is malformed). The - // placeholder_type parameter indicates what kind of placeholder should be - // constructed in this case. The resolve_mode parameter determines whether - // any symbol is returned, or only symbols that are types. Note, however, - // that LookupSymbol may still return a non-type symbol in LOOKUP_TYPES mode, - // if it believes that's all it could refer to. The caller should always - // check that it receives the type of symbol it was expecting. - enum PlaceholderType { - PLACEHOLDER_MESSAGE, - PLACEHOLDER_ENUM, - PLACEHOLDER_EXTENDABLE_MESSAGE - }; - enum ResolveMode { - LOOKUP_ALL, LOOKUP_TYPES - }; - Symbol LookupSymbol(const string& name, const string& relative_to, - PlaceholderType placeholder_type = PLACEHOLDER_MESSAGE, - ResolveMode resolve_mode = LOOKUP_ALL); - - // Like LookupSymbol() but will not return a placeholder even if - // AllowUnknownDependencies() has been used. - Symbol LookupSymbolNoPlaceholder(const string& name, - const string& relative_to, - ResolveMode resolve_mode = LOOKUP_ALL); - - // Creates a placeholder type suitable for return from LookupSymbol(). May - // return kNullSymbol if the name is not a valid type name. - Symbol NewPlaceholder(const string& name, PlaceholderType placeholder_type); - - // Creates a placeholder file. Never returns NULL. This is used when an - // import is not found and AllowUnknownDependencies() is enabled. - const FileDescriptor* NewPlaceholderFile(const string& name); - - // Calls tables_->AddSymbol() and records an error if it fails. Returns - // true if successful or false if failed, though most callers can ignore - // the return value since an error has already been recorded. - bool AddSymbol(const string& full_name, - const void* parent, const string& name, - const Message& proto, Symbol symbol); - - // Like AddSymbol(), but succeeds if the symbol is already defined as long - // as the existing definition is also a package (because it's OK to define - // the same package in two different files). Also adds all parents of the - // packgae to the symbol table (e.g. AddPackage("foo.bar", ...) will add - // "foo.bar" and "foo" to the table). - void AddPackage(const string& name, const Message& proto, - const FileDescriptor* file); - - // Checks that the symbol name contains only alphanumeric characters and - // underscores. Records an error otherwise. - void ValidateSymbolName(const string& name, const string& full_name, - const Message& proto); - - // Like ValidateSymbolName(), but the name is allowed to contain periods and - // an error is indicated by returning false (not recording the error). - bool ValidateQualifiedName(const string& name); - - // Used by BUILD_ARRAY macro (below) to avoid having to have the type - // specified as a macro parameter. - template - inline void AllocateArray(int size, Type** output) { - *output = tables_->AllocateArray(size); - } - - // Allocates a copy of orig_options in tables_ and stores it in the - // descriptor. Remembers its uninterpreted options, to be interpreted - // later. DescriptorT must be one of the Descriptor messages from - // descriptor.proto. - template void AllocateOptions( - const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor); - // Specialization for FileOptions. - void AllocateOptions(const FileOptions& orig_options, - FileDescriptor* descriptor); - - // Implementation for AllocateOptions(). Don't call this directly. - template void AllocateOptionsImpl( - const string& name_scope, - const string& element_name, - const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor); - - // These methods all have the same signature for the sake of the BUILD_ARRAY - // macro, below. - void BuildMessage(const DescriptorProto& proto, - const Descriptor* parent, - Descriptor* result); - void BuildFieldOrExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, - FieldDescriptor* result, - bool is_extension); - void BuildField(const FieldDescriptorProto& proto, - const Descriptor* parent, - FieldDescriptor* result) { - BuildFieldOrExtension(proto, parent, result, false); - } - void BuildExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, - FieldDescriptor* result) { - BuildFieldOrExtension(proto, parent, result, true); - } - void BuildExtensionRange(const DescriptorProto::ExtensionRange& proto, - const Descriptor* parent, - Descriptor::ExtensionRange* result); - void BuildEnum(const EnumDescriptorProto& proto, - const Descriptor* parent, - EnumDescriptor* result); - void BuildEnumValue(const EnumValueDescriptorProto& proto, - const EnumDescriptor* parent, - EnumValueDescriptor* result); - void BuildService(const ServiceDescriptorProto& proto, - const void* dummy, - ServiceDescriptor* result); - void BuildMethod(const MethodDescriptorProto& proto, - const ServiceDescriptor* parent, - MethodDescriptor* result); - - // Must be run only after building. - // - // NOTE: Options will not be available during cross-linking, as they - // have not yet been interpreted. Defer any handling of options to the - // Validate*Options methods. - void CrossLinkFile(FileDescriptor* file, const FileDescriptorProto& proto); - void CrossLinkMessage(Descriptor* message, const DescriptorProto& proto); - void CrossLinkField(FieldDescriptor* field, - const FieldDescriptorProto& proto); - void CrossLinkEnum(EnumDescriptor* enum_type, - const EnumDescriptorProto& proto); - void CrossLinkEnumValue(EnumValueDescriptor* enum_value, - const EnumValueDescriptorProto& proto); - void CrossLinkService(ServiceDescriptor* service, - const ServiceDescriptorProto& proto); - void CrossLinkMethod(MethodDescriptor* method, - const MethodDescriptorProto& proto); - - // Must be run only after cross-linking. - void InterpretOptions(); - - // A helper class for interpreting options. - class OptionInterpreter { - public: - // Creates an interpreter that operates in the context of the pool of the - // specified builder, which must not be NULL. We don't take ownership of the - // builder. - explicit OptionInterpreter(DescriptorBuilder* builder); - - ~OptionInterpreter(); - - // Interprets the uninterpreted options in the specified Options message. - // On error, calls AddError() on the underlying builder and returns false. - // Otherwise returns true. - bool InterpretOptions(OptionsToInterpret* options_to_interpret); - - class AggregateOptionFinder; - - private: - // Interprets uninterpreted_option_ on the specified message, which - // must be the mutable copy of the original options message to which - // uninterpreted_option_ belongs. - bool InterpretSingleOption(Message* options); - - // Adds the uninterpreted_option to the given options message verbatim. - // Used when AllowUnknownDependencies() is in effect and we can't find - // the option's definition. - void AddWithoutInterpreting(const UninterpretedOption& uninterpreted_option, - Message* options); - - // A recursive helper function that drills into the intermediate fields - // in unknown_fields to check if field innermost_field is set on the - // innermost message. Returns false and sets an error if so. - bool ExamineIfOptionIsSet( - vector::const_iterator intermediate_fields_iter, - vector::const_iterator intermediate_fields_end, - const FieldDescriptor* innermost_field, const string& debug_msg_name, - const UnknownFieldSet& unknown_fields); - - // Validates the value for the option field of the currently interpreted - // option and then sets it on the unknown_field. - bool SetOptionValue(const FieldDescriptor* option_field, - UnknownFieldSet* unknown_fields); - - // Parses an aggregate value for a CPPTYPE_MESSAGE option and - // saves it into *unknown_fields. - bool SetAggregateOption(const FieldDescriptor* option_field, - UnknownFieldSet* unknown_fields); - - // Convenience functions to set an int field the right way, depending on - // its wire type (a single int CppType can represent multiple wire types). - void SetInt32(int number, int32 value, FieldDescriptor::Type type, - UnknownFieldSet* unknown_fields); - void SetInt64(int number, int64 value, FieldDescriptor::Type type, - UnknownFieldSet* unknown_fields); - void SetUInt32(int number, uint32 value, FieldDescriptor::Type type, - UnknownFieldSet* unknown_fields); - void SetUInt64(int number, uint64 value, FieldDescriptor::Type type, - UnknownFieldSet* unknown_fields); - - // A helper function that adds an error at the specified location of the - // option we're currently interpreting, and returns false. - bool AddOptionError(DescriptorPool::ErrorCollector::ErrorLocation location, - const string& msg) { - builder_->AddError(options_to_interpret_->element_name, - *uninterpreted_option_, location, msg); - return false; - } - - // A helper function that adds an error at the location of the option name - // and returns false. - bool AddNameError(const string& msg) { - return AddOptionError(DescriptorPool::ErrorCollector::OPTION_NAME, msg); - } - - // A helper function that adds an error at the location of the option name - // and returns false. - bool AddValueError(const string& msg) { - return AddOptionError(DescriptorPool::ErrorCollector::OPTION_VALUE, msg); - } - - // We interpret against this builder's pool. Is never NULL. We don't own - // this pointer. - DescriptorBuilder* builder_; - - // The options we're currently interpreting, or NULL if we're not in a call - // to InterpretOptions. - const OptionsToInterpret* options_to_interpret_; - - // The option we're currently interpreting within options_to_interpret_, or - // NULL if we're not in a call to InterpretOptions(). This points to a - // submessage of the original option, not the mutable copy. Therefore we - // can use it to find locations recorded by the parser. - const UninterpretedOption* uninterpreted_option_; - - // Factory used to create the dynamic messages we need to parse - // any aggregate option values we encounter. - DynamicMessageFactory dynamic_factory_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OptionInterpreter); - }; - - // Work-around for broken compilers: According to the C++ standard, - // OptionInterpreter should have access to the private members of any class - // which has declared DescriptorBuilder as a friend. Unfortunately some old - // versions of GCC and other compilers do not implement this correctly. So, - // we have to have these intermediate methods to provide access. We also - // redundantly declare OptionInterpreter a friend just to make things extra - // clear for these bad compilers. - friend class OptionInterpreter; - friend class OptionInterpreter::AggregateOptionFinder; - - static inline bool get_allow_unknown(const DescriptorPool* pool) { - return pool->allow_unknown_; - } - static inline bool get_is_placeholder(const Descriptor* descriptor) { - return descriptor->is_placeholder_; - } - static inline void assert_mutex_held(const DescriptorPool* pool) { - if (pool->mutex_ != NULL) { - pool->mutex_->AssertHeld(); - } - } - - // Must be run only after options have been interpreted. - // - // NOTE: Validation code must only reference the options in the mutable - // descriptors, which are the ones that have been interpreted. The const - // proto references are passed in only so they can be provided to calls to - // AddError(). Do not look at their options, which have not been interpreted. - void ValidateFileOptions(FileDescriptor* file, - const FileDescriptorProto& proto); - void ValidateMessageOptions(Descriptor* message, - const DescriptorProto& proto); - void ValidateFieldOptions(FieldDescriptor* field, - const FieldDescriptorProto& proto); - void ValidateEnumOptions(EnumDescriptor* enm, - const EnumDescriptorProto& proto); - void ValidateEnumValueOptions(EnumValueDescriptor* enum_value, - const EnumValueDescriptorProto& proto); - void ValidateServiceOptions(ServiceDescriptor* service, - const ServiceDescriptorProto& proto); - void ValidateMethodOptions(MethodDescriptor* method, - const MethodDescriptorProto& proto); - - void ValidateMapKey(FieldDescriptor* field, - const FieldDescriptorProto& proto); -}; - -const FileDescriptor* DescriptorPool::BuildFile( - const FileDescriptorProto& proto) { - GOOGLE_CHECK(fallback_database_ == NULL) - << "Cannot call BuildFile on a DescriptorPool that uses a " - "DescriptorDatabase. You must instead find a way to get your file " - "into the underlying database."; - GOOGLE_CHECK(mutex_ == NULL); // Implied by the above GOOGLE_CHECK. - return DescriptorBuilder(this, tables_.get(), NULL).BuildFile(proto); -} - -const FileDescriptor* DescriptorPool::BuildFileCollectingErrors( - const FileDescriptorProto& proto, - ErrorCollector* error_collector) { - GOOGLE_CHECK(fallback_database_ == NULL) - << "Cannot call BuildFile on a DescriptorPool that uses a " - "DescriptorDatabase. You must instead find a way to get your file " - "into the underlying database."; - GOOGLE_CHECK(mutex_ == NULL); // Implied by the above GOOGLE_CHECK. - return DescriptorBuilder(this, tables_.get(), - error_collector).BuildFile(proto); -} - -const FileDescriptor* DescriptorPool::BuildFileFromDatabase( - const FileDescriptorProto& proto) const { - mutex_->AssertHeld(); - return DescriptorBuilder(this, tables_.get(), - default_error_collector_).BuildFile(proto); -} - -DescriptorBuilder::DescriptorBuilder( - const DescriptorPool* pool, - DescriptorPool::Tables* tables, - DescriptorPool::ErrorCollector* error_collector) - : pool_(pool), - tables_(tables), - error_collector_(error_collector), - had_errors_(false), - possible_undeclared_dependency_(NULL) {} - -DescriptorBuilder::~DescriptorBuilder() {} - -void DescriptorBuilder::AddError( - const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error) { - if (error_collector_ == NULL) { - if (!had_errors_) { - GOOGLE_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ - << "\":"; - } - GOOGLE_LOG(ERROR) << " " << element_name << ": " << error; - } else { - error_collector_->AddError(filename_, element_name, - &descriptor, location, error); - } - had_errors_ = true; -} - -void DescriptorBuilder::AddNotDefinedError( - const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const string& undefined_symbol) { - if (possible_undeclared_dependency_ == NULL) { - AddError(element_name, descriptor, location, - "\"" + undefined_symbol + "\" is not defined."); - } else { - AddError(element_name, descriptor, location, - "\"" + possible_undeclared_dependency_name_ + - "\" seems to be defined in \"" + - possible_undeclared_dependency_->name() + "\", which is not " - "imported by \"" + filename_ + "\". To use it here, please " - "add the necessary import."); - } -} - -bool DescriptorBuilder::IsInPackage(const FileDescriptor* file, - const string& package_name) { - return HasPrefixString(file->package(), package_name) && - (file->package().size() == package_name.size() || - file->package()[package_name.size()] == '.'); -} - -Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const string& name) { - Symbol result; - - // We need to search our pool and all its underlays. - const DescriptorPool* pool = pool_; - while (true) { - // If we are looking at an underlay, we must lock its mutex_, since we are - // accessing the underlay's tables_ dircetly. - MutexLockMaybe lock((pool == pool_) ? NULL : pool->mutex_); - - // Note that we don't have to check fallback_database_ here because the - // symbol has to be in one of its file's direct dependencies, and we have - // already loaded those by the time we get here. - result = pool->tables_->FindSymbol(name); - if (!result.IsNull()) break; - if (pool->underlay_ == NULL) return kNullSymbol; - pool = pool->underlay_; - } - - return result; -} - -Symbol DescriptorBuilder::FindSymbol(const string& name) { - Symbol result = FindSymbolNotEnforcingDeps(name); - - if (!pool_->enforce_dependencies_) { - // Hack for CompilerUpgrader. - return result; - } - - // Only find symbols which were defined in this file or one of its - // dependencies. - const FileDescriptor* file = result.GetFile(); - if (file == file_) return result; - for (int i = 0; i < file_->dependency_count(); i++) { - if (file == file_->dependency(i)) return result; - } - - if (result.type == Symbol::PACKAGE) { - // Arg, this is overcomplicated. The symbol is a package name. It could - // be that the package was defined in multiple files. result.GetFile() - // returns the first file we saw that used this package. We've determined - // that that file is not a direct dependency of the file we are currently - // building, but it could be that some other file which *is* a direct - // dependency also defines the same package. We can't really rule out this - // symbol unless none of the dependencies define it. - if (IsInPackage(file_, name)) return result; - for (int i = 0; i < file_->dependency_count(); i++) { - // Note: A dependency may be NULL if it was not found or had errors. - if (file_->dependency(i) != NULL && - IsInPackage(file_->dependency(i), name)) { - return result; - } - } - } - - possible_undeclared_dependency_ = file; - possible_undeclared_dependency_name_ = name; - return kNullSymbol; -} - -Symbol DescriptorBuilder::LookupSymbolNoPlaceholder( - const string& name, const string& relative_to, ResolveMode resolve_mode) { - possible_undeclared_dependency_ = NULL; - - if (name.size() > 0 && name[0] == '.') { - // Fully-qualified name. - return FindSymbol(name.substr(1)); - } - - // If name is something like "Foo.Bar.baz", and symbols named "Foo" are - // defined in multiple parent scopes, we only want to find "Bar.baz" in the - // innermost one. E.g., the following should produce an error: - // message Bar { message Baz {} } - // message Foo { - // message Bar { - // } - // optional Bar.Baz baz = 1; - // } - // So, we look for just "Foo" first, then look for "Bar.baz" within it if - // found. - int name_dot_pos = name.find_first_of('.'); - string first_part_of_name; - if (name_dot_pos == string::npos) { - first_part_of_name = name; - } else { - first_part_of_name = name.substr(0, name_dot_pos); - } - - string scope_to_try(relative_to); - - while (true) { - // Chop off the last component of the scope. - string::size_type dot_pos = scope_to_try.find_last_of('.'); - if (dot_pos == string::npos) { - return FindSymbol(name); - } else { - scope_to_try.erase(dot_pos); - } - - // Append ".first_part_of_name" and try to find. - string::size_type old_size = scope_to_try.size(); - scope_to_try.append(1, '.'); - scope_to_try.append(first_part_of_name); - Symbol result = FindSymbol(scope_to_try); - if (!result.IsNull()) { - if (first_part_of_name.size() < name.size()) { - // name is a compound symbol, of which we only found the first part. - // Now try to look up the rest of it. - if (result.IsAggregate()) { - scope_to_try.append(name, first_part_of_name.size(), - name.size() - first_part_of_name.size()); - return FindSymbol(scope_to_try); - } else { - // We found a symbol but it's not an aggregate. Continue the loop. - } - } else { - if (resolve_mode == LOOKUP_TYPES && !result.IsType()) { - // We found a symbol but it's not a type. Continue the loop. - } else { - return result; - } - } - } - - // Not found. Remove the name so we can try again. - scope_to_try.erase(old_size); - } -} - -Symbol DescriptorBuilder::LookupSymbol( - const string& name, const string& relative_to, - PlaceholderType placeholder_type, ResolveMode resolve_mode) { - Symbol result = LookupSymbolNoPlaceholder( - name, relative_to, resolve_mode); - if (result.IsNull() && pool_->allow_unknown_) { - // Not found, but AllowUnknownDependencies() is enabled. Return a - // placeholder instead. - result = NewPlaceholder(name, placeholder_type); - } - return result; -} - -Symbol DescriptorBuilder::NewPlaceholder(const string& name, - PlaceholderType placeholder_type) { - // Compute names. - const string* placeholder_full_name; - const string* placeholder_name; - const string* placeholder_package; - - if (!ValidateQualifiedName(name)) return kNullSymbol; - if (name[0] == '.') { - // Fully-qualified. - placeholder_full_name = tables_->AllocateString(name.substr(1)); - } else { - placeholder_full_name = tables_->AllocateString(name); - } - - string::size_type dotpos = placeholder_full_name->find_last_of('.'); - if (dotpos != string::npos) { - placeholder_package = tables_->AllocateString( - placeholder_full_name->substr(0, dotpos)); - placeholder_name = tables_->AllocateString( - placeholder_full_name->substr(dotpos + 1)); - } else { - placeholder_package = &kEmptyString; - placeholder_name = placeholder_full_name; - } - - // Create the placeholders. - FileDescriptor* placeholder_file = tables_->Allocate(); - memset(placeholder_file, 0, sizeof(*placeholder_file)); - - placeholder_file->name_ = - tables_->AllocateString(*placeholder_full_name + ".placeholder.proto"); - placeholder_file->package_ = placeholder_package; - placeholder_file->pool_ = pool_; - placeholder_file->options_ = &FileOptions::default_instance(); - placeholder_file->tables_ = &FileDescriptorTables::kEmpty; - // All other fields are zero or NULL. - - if (placeholder_type == PLACEHOLDER_ENUM) { - placeholder_file->enum_type_count_ = 1; - placeholder_file->enum_types_ = - tables_->AllocateArray(1); - - EnumDescriptor* placeholder_enum = &placeholder_file->enum_types_[0]; - memset(placeholder_enum, 0, sizeof(*placeholder_enum)); - - placeholder_enum->full_name_ = placeholder_full_name; - placeholder_enum->name_ = placeholder_name; - placeholder_enum->file_ = placeholder_file; - placeholder_enum->options_ = &EnumOptions::default_instance(); - placeholder_enum->is_placeholder_ = true; - placeholder_enum->is_unqualified_placeholder_ = (name[0] != '.'); - - // Enums must have at least one value. - placeholder_enum->value_count_ = 1; - placeholder_enum->values_ = tables_->AllocateArray(1); - - EnumValueDescriptor* placeholder_value = &placeholder_enum->values_[0]; - memset(placeholder_value, 0, sizeof(*placeholder_value)); - - placeholder_value->name_ = tables_->AllocateString("PLACEHOLDER_VALUE"); - // Note that enum value names are siblings of their type, not children. - placeholder_value->full_name_ = - placeholder_package->empty() ? placeholder_value->name_ : - tables_->AllocateString(*placeholder_package + ".PLACEHOLDER_VALUE"); - - placeholder_value->number_ = 0; - placeholder_value->type_ = placeholder_enum; - placeholder_value->options_ = &EnumValueOptions::default_instance(); - - return Symbol(placeholder_enum); - } else { - placeholder_file->message_type_count_ = 1; - placeholder_file->message_types_ = - tables_->AllocateArray(1); - - Descriptor* placeholder_message = &placeholder_file->message_types_[0]; - memset(placeholder_message, 0, sizeof(*placeholder_message)); - - placeholder_message->full_name_ = placeholder_full_name; - placeholder_message->name_ = placeholder_name; - placeholder_message->file_ = placeholder_file; - placeholder_message->options_ = &MessageOptions::default_instance(); - placeholder_message->is_placeholder_ = true; - placeholder_message->is_unqualified_placeholder_ = (name[0] != '.'); - - if (placeholder_type == PLACEHOLDER_EXTENDABLE_MESSAGE) { - placeholder_message->extension_range_count_ = 1; - placeholder_message->extension_ranges_ = - tables_->AllocateArray(1); - placeholder_message->extension_ranges_->start = 1; - // kMaxNumber + 1 because ExtensionRange::end is exclusive. - placeholder_message->extension_ranges_->end = - FieldDescriptor::kMaxNumber + 1; - } - - return Symbol(placeholder_message); - } -} - -const FileDescriptor* DescriptorBuilder::NewPlaceholderFile( - const string& name) { - FileDescriptor* placeholder = tables_->Allocate(); - memset(placeholder, 0, sizeof(*placeholder)); - - placeholder->name_ = tables_->AllocateString(name); - placeholder->package_ = &kEmptyString; - placeholder->pool_ = pool_; - placeholder->options_ = &FileOptions::default_instance(); - placeholder->tables_ = &FileDescriptorTables::kEmpty; - // All other fields are zero or NULL. - - return placeholder; -} - -bool DescriptorBuilder::AddSymbol( - const string& full_name, const void* parent, const string& name, - const Message& proto, Symbol symbol) { - // If the caller passed NULL for the parent, the symbol is at file scope. - // Use its file as the parent instead. - if (parent == NULL) parent = file_; - - if (tables_->AddSymbol(full_name, symbol)) { - if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) { - GOOGLE_LOG(DFATAL) << "\"" << full_name << "\" not previously defined in " - "symbols_by_name_, but was defined in symbols_by_parent_; " - "this shouldn't be possible."; - return false; - } - return true; - } else { - const FileDescriptor* other_file = tables_->FindSymbol(full_name).GetFile(); - if (other_file == file_) { - string::size_type dot_pos = full_name.find_last_of('.'); - if (dot_pos == string::npos) { - AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, - "\"" + full_name + "\" is already defined."); - } else { - AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, - "\"" + full_name.substr(dot_pos + 1) + - "\" is already defined in \"" + - full_name.substr(0, dot_pos) + "\"."); - } - } else { - // Symbol seems to have been defined in a different file. - AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, - "\"" + full_name + "\" is already defined in file \"" + - other_file->name() + "\"."); - } - return false; - } -} - -void DescriptorBuilder::AddPackage( - const string& name, const Message& proto, const FileDescriptor* file) { - if (tables_->AddSymbol(name, Symbol(file))) { - // Success. Also add parent package, if any. - string::size_type dot_pos = name.find_last_of('.'); - if (dot_pos == string::npos) { - // No parents. - ValidateSymbolName(name, name, proto); - } else { - // Has parent. - string* parent_name = tables_->AllocateString(name.substr(0, dot_pos)); - AddPackage(*parent_name, proto, file); - ValidateSymbolName(name.substr(dot_pos + 1), name, proto); - } - } else { - Symbol existing_symbol = tables_->FindSymbol(name); - // It's OK to redefine a package. - if (existing_symbol.type != Symbol::PACKAGE) { - // Symbol seems to have been defined in a different file. - AddError(name, proto, DescriptorPool::ErrorCollector::NAME, - "\"" + name + "\" is already defined (as something other than " - "a package) in file \"" + existing_symbol.GetFile()->name() + - "\"."); - } - } -} - -void DescriptorBuilder::ValidateSymbolName( - const string& name, const string& full_name, const Message& proto) { - if (name.empty()) { - AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, - "Missing name."); - } else { - for (int i = 0; i < name.size(); i++) { - // I don't trust isalnum() due to locales. :( - if ((name[i] < 'a' || 'z' < name[i]) && - (name[i] < 'A' || 'Z' < name[i]) && - (name[i] < '0' || '9' < name[i]) && - (name[i] != '_')) { - AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, - "\"" + name + "\" is not a valid identifier."); - } - } - } -} - -bool DescriptorBuilder::ValidateQualifiedName(const string& name) { - bool last_was_period = false; - - for (int i = 0; i < name.size(); i++) { - // I don't trust isalnum() due to locales. :( - if (('a' <= name[i] && name[i] <= 'z') || - ('A' <= name[i] && name[i] <= 'Z') || - ('0' <= name[i] && name[i] <= '9') || - (name[i] == '_')) { - last_was_period = false; - } else if (name[i] == '.') { - if (last_was_period) return false; - last_was_period = true; - } else { - return false; - } - } - - return !name.empty() && !last_was_period; -} - -// ------------------------------------------------------------------- - -// This generic implementation is good for all descriptors except -// FileDescriptor. -template void DescriptorBuilder::AllocateOptions( - const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor) { - AllocateOptionsImpl(descriptor->full_name(), descriptor->full_name(), - orig_options, descriptor); -} - -// We specialize for FileDescriptor. -void DescriptorBuilder::AllocateOptions(const FileOptions& orig_options, - FileDescriptor* descriptor) { - // We add the dummy token so that LookupSymbol does the right thing. - AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor->name(), - orig_options, descriptor); -} - -template void DescriptorBuilder::AllocateOptionsImpl( - const string& name_scope, - const string& element_name, - const typename DescriptorT::OptionsType& orig_options, - DescriptorT* descriptor) { - // We need to use a dummy pointer to work around a bug in older versions of - // GCC. Otherwise, the following two lines could be replaced with: - // typename DescriptorT::OptionsType* options = - // tables_->AllocateMessage(); - typename DescriptorT::OptionsType* const dummy = NULL; - typename DescriptorT::OptionsType* options = tables_->AllocateMessage(dummy); - options->CopyFrom(orig_options); - descriptor->options_ = options; - - // Don't add to options_to_interpret_ unless there were uninterpreted - // options. This not only avoids unnecessary work, but prevents a - // bootstrapping problem when building descriptors for descriptor.proto. - // descriptor.proto does not contain any uninterpreted options, but - // attempting to interpret options anyway will cause - // OptionsType::GetDescriptor() to be called which may then deadlock since - // we're still trying to build it. - if (options->uninterpreted_option_size() > 0) { - options_to_interpret_.push_back( - OptionsToInterpret(name_scope, element_name, &orig_options, options)); - } -} - - -// A common pattern: We want to convert a repeated field in the descriptor -// to an array of values, calling some method to build each value. -#define BUILD_ARRAY(INPUT, OUTPUT, NAME, METHOD, PARENT) \ - OUTPUT->NAME##_count_ = INPUT.NAME##_size(); \ - AllocateArray(INPUT.NAME##_size(), &OUTPUT->NAME##s_); \ - for (int i = 0; i < INPUT.NAME##_size(); i++) { \ - METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i); \ - } - -const FileDescriptor* DescriptorBuilder::BuildFile( - const FileDescriptorProto& proto) { - filename_ = proto.name(); - - // Check if the file already exists and is identical to the one being built. - // Note: This only works if the input is canonical -- that is, it - // fully-qualifies all type names, has no UninterpretedOptions, etc. - // This is fine, because this idempotency "feature" really only exists to - // accomodate one hack in the proto1->proto2 migration layer. - const FileDescriptor* existing_file = tables_->FindFile(filename_); - if (existing_file != NULL) { - // File already in pool. Compare the existing one to the input. - FileDescriptorProto existing_proto; - existing_file->CopyTo(&existing_proto); - if (existing_proto.SerializeAsString() == proto.SerializeAsString()) { - // They're identical. Return the existing descriptor. - return existing_file; - } - - // Not a match. The error will be detected and handled later. - } - - // Check to see if this file is already on the pending files list. - // TODO(kenton): Allow recursive imports? It may not work with some - // (most?) programming languages. E.g., in C++, a forward declaration - // of a type is not sufficient to allow it to be used even in a - // generated header file due to inlining. This could perhaps be - // worked around using tricks involving inserting #include statements - // mid-file, but that's pretty ugly, and I'm pretty sure there are - // some languages out there that do not allow recursive dependencies - // at all. - for (int i = 0; i < tables_->pending_files_.size(); i++) { - if (tables_->pending_files_[i] == proto.name()) { - string error_message("File recursively imports itself: "); - for (; i < tables_->pending_files_.size(); i++) { - error_message.append(tables_->pending_files_[i]); - error_message.append(" -> "); - } - error_message.append(proto.name()); - - AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, - error_message); - return NULL; - } - } - - // If we have a fallback_database_, attempt to load all dependencies now, - // before checkpointing tables_. This avoids confusion with recursive - // checkpoints. - if (pool_->fallback_database_ != NULL) { - tables_->pending_files_.push_back(proto.name()); - for (int i = 0; i < proto.dependency_size(); i++) { - if (tables_->FindFile(proto.dependency(i)) == NULL && - (pool_->underlay_ == NULL || - pool_->underlay_->FindFileByName(proto.dependency(i)) == NULL)) { - // We don't care what this returns since we'll find out below anyway. - pool_->TryFindFileInFallbackDatabase(proto.dependency(i)); - } - } - tables_->pending_files_.pop_back(); - } - - // Checkpoint the tables so that we can roll back if something goes wrong. - tables_->Checkpoint(); - - FileDescriptor* result = tables_->Allocate(); - file_ = result; - - file_tables_ = tables_->AllocateFileTables(); - file_->tables_ = file_tables_; - - if (!proto.has_name()) { - AddError("", proto, DescriptorPool::ErrorCollector::OTHER, - "Missing field: FileDescriptorProto.name."); - } - - result->name_ = tables_->AllocateString(proto.name()); - if (proto.has_package()) { - result->package_ = tables_->AllocateString(proto.package()); - } else { - // We cannot rely on proto.package() returning a valid string if - // proto.has_package() is false, because we might be running at static - // initialization time, in which case default values have not yet been - // initialized. - result->package_ = tables_->AllocateString(""); - } - result->pool_ = pool_; - - // Add to tables. - if (!tables_->AddFile(result)) { - AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, - "A file with this name is already in the pool."); - // Bail out early so that if this is actually the exact same file, we - // don't end up reporting that every single symbol is already defined. - tables_->Rollback(); - return NULL; - } - if (!result->package().empty()) { - AddPackage(result->package(), proto, result); - } - - // Make sure all dependencies are loaded. - set seen_dependencies; - result->dependency_count_ = proto.dependency_size(); - result->dependencies_ = - tables_->AllocateArray(proto.dependency_size()); - for (int i = 0; i < proto.dependency_size(); i++) { - if (!seen_dependencies.insert(proto.dependency(i)).second) { - AddError(proto.name(), proto, - DescriptorPool::ErrorCollector::OTHER, - "Import \"" + proto.dependency(i) + "\" was listed twice."); - } - - const FileDescriptor* dependency = tables_->FindFile(proto.dependency(i)); - if (dependency == NULL && pool_->underlay_ != NULL) { - dependency = pool_->underlay_->FindFileByName(proto.dependency(i)); - } - - if (dependency == NULL) { - if (pool_->allow_unknown_) { - dependency = NewPlaceholderFile(proto.dependency(i)); - } else { - string message; - if (pool_->fallback_database_ == NULL) { - message = "Import \"" + proto.dependency(i) + - "\" has not been loaded."; - } else { - message = "Import \"" + proto.dependency(i) + - "\" was not found or had errors."; - } - AddError(proto.name(), proto, - DescriptorPool::ErrorCollector::OTHER, - message); - } - } - - result->dependencies_[i] = dependency; - } - - // Convert children. - BUILD_ARRAY(proto, result, message_type, BuildMessage , NULL); - BUILD_ARRAY(proto, result, enum_type , BuildEnum , NULL); - BUILD_ARRAY(proto, result, service , BuildService , NULL); - BUILD_ARRAY(proto, result, extension , BuildExtension, NULL); - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - // Note that the following steps must occur in exactly the specified order. - - // Cross-link. - CrossLinkFile(result, proto); - - // Interpret any remaining uninterpreted options gathered into - // options_to_interpret_ during descriptor building. Cross-linking has made - // extension options known, so all interpretations should now succeed. - if (!had_errors_) { - OptionInterpreter option_interpreter(this); - for (vector::iterator iter = - options_to_interpret_.begin(); - iter != options_to_interpret_.end(); ++iter) { - option_interpreter.InterpretOptions(&(*iter)); - } - options_to_interpret_.clear(); - } - - // Validate options. - if (!had_errors_) { - ValidateFileOptions(result, proto); - } - - if (had_errors_) { - tables_->Rollback(); - return NULL; - } else { - tables_->Checkpoint(); - return result; - } -} - -void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, - const Descriptor* parent, - Descriptor* result) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - - ValidateSymbolName(proto.name(), *full_name, proto); - - result->name_ = tables_->AllocateString(proto.name()); - result->full_name_ = full_name; - result->file_ = file_; - result->containing_type_ = parent; - result->is_placeholder_ = false; - result->is_unqualified_placeholder_ = false; - - BUILD_ARRAY(proto, result, field , BuildField , result); - BUILD_ARRAY(proto, result, nested_type , BuildMessage , result); - BUILD_ARRAY(proto, result, enum_type , BuildEnum , result); - BUILD_ARRAY(proto, result, extension_range, BuildExtensionRange, result); - BUILD_ARRAY(proto, result, extension , BuildExtension , result); - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - AddSymbol(result->full_name(), parent, result->name(), - proto, Symbol(result)); - - // Check that no fields have numbers in extension ranges. - for (int i = 0; i < result->field_count(); i++) { - const FieldDescriptor* field = result->field(i); - for (int j = 0; j < result->extension_range_count(); j++) { - const Descriptor::ExtensionRange* range = result->extension_range(j); - if (range->start <= field->number() && field->number() < range->end) { - AddError(field->full_name(), proto.extension_range(j), - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute( - "Extension range $0 to $1 includes field \"$2\" ($3).", - range->start, range->end - 1, - field->name(), field->number())); - } - } - } - - // Check that extension ranges don't overlap. - for (int i = 0; i < result->extension_range_count(); i++) { - const Descriptor::ExtensionRange* range1 = result->extension_range(i); - for (int j = i + 1; j < result->extension_range_count(); j++) { - const Descriptor::ExtensionRange* range2 = result->extension_range(j); - if (range1->end > range2->start && range2->end > range1->start) { - AddError(result->full_name(), proto.extension_range(j), - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Extension range $0 to $1 overlaps with " - "already-defined range $2 to $3.", - range2->start, range2->end - 1, - range1->start, range1->end - 1)); - } - } - } -} - -void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, - const Descriptor* parent, - FieldDescriptor* result, - bool is_extension) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - - ValidateSymbolName(proto.name(), *full_name, proto); - - result->name_ = tables_->AllocateString(proto.name()); - result->full_name_ = full_name; - result->file_ = file_; - result->number_ = proto.number(); - result->is_extension_ = is_extension; - - // If .proto files follow the style guide then the name should already be - // lower-cased. If that's the case we can just reuse the string we already - // allocated rather than allocate a new one. - string lowercase_name(proto.name()); - LowerString(&lowercase_name); - if (lowercase_name == proto.name()) { - result->lowercase_name_ = result->name_; - } else { - result->lowercase_name_ = tables_->AllocateString(lowercase_name); - } - - // Don't bother with the above optimization for camel-case names since - // .proto files that follow the guide shouldn't be using names in this - // format, so the optimization wouldn't help much. - result->camelcase_name_ = tables_->AllocateString(ToCamelCase(proto.name())); - - // Some compilers do not allow static_cast directly between two enum types, - // so we must cast to int first. - result->type_ = static_cast( - implicit_cast(proto.type())); - result->label_ = static_cast( - implicit_cast(proto.label())); - - // Some of these may be filled in when cross-linking. - result->containing_type_ = NULL; - result->extension_scope_ = NULL; - result->experimental_map_key_ = NULL; - result->message_type_ = NULL; - result->enum_type_ = NULL; - - result->has_default_value_ = proto.has_default_value(); - if (proto.has_default_value() && result->is_repeated()) { - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Repeated fields can't have default values."); - } - - if (proto.has_type()) { - if (proto.has_default_value()) { - char* end_pos = NULL; - switch (result->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - result->default_value_int32_ = - strtol(proto.default_value().c_str(), &end_pos, 0); - break; - case FieldDescriptor::CPPTYPE_INT64: - result->default_value_int64_ = - strto64(proto.default_value().c_str(), &end_pos, 0); - break; - case FieldDescriptor::CPPTYPE_UINT32: - result->default_value_uint32_ = - strtoul(proto.default_value().c_str(), &end_pos, 0); - break; - case FieldDescriptor::CPPTYPE_UINT64: - result->default_value_uint64_ = - strtou64(proto.default_value().c_str(), &end_pos, 0); - break; - case FieldDescriptor::CPPTYPE_FLOAT: - if (proto.default_value() == "inf") { - result->default_value_float_ = numeric_limits::infinity(); - } else if (proto.default_value() == "-inf") { - result->default_value_float_ = -numeric_limits::infinity(); - } else if (proto.default_value() == "nan") { - result->default_value_float_ = numeric_limits::quiet_NaN(); - } else { - result->default_value_float_ = - NoLocaleStrtod(proto.default_value().c_str(), &end_pos); - } - break; - case FieldDescriptor::CPPTYPE_DOUBLE: - if (proto.default_value() == "inf") { - result->default_value_double_ = numeric_limits::infinity(); - } else if (proto.default_value() == "-inf") { - result->default_value_double_ = -numeric_limits::infinity(); - } else if (proto.default_value() == "nan") { - result->default_value_double_ = numeric_limits::quiet_NaN(); - } else { - result->default_value_double_ = - NoLocaleStrtod(proto.default_value().c_str(), &end_pos); - } - break; - case FieldDescriptor::CPPTYPE_BOOL: - if (proto.default_value() == "true") { - result->default_value_bool_ = true; - } else if (proto.default_value() == "false") { - result->default_value_bool_ = false; - } else { - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Boolean default must be true or false."); - } - break; - case FieldDescriptor::CPPTYPE_ENUM: - // This will be filled in when cross-linking. - result->default_value_enum_ = NULL; - break; - case FieldDescriptor::CPPTYPE_STRING: - if (result->type() == FieldDescriptor::TYPE_BYTES) { - result->default_value_string_ = tables_->AllocateString( - UnescapeCEscapeString(proto.default_value())); - } else { - result->default_value_string_ = - tables_->AllocateString(proto.default_value()); - } - break; - case FieldDescriptor::CPPTYPE_MESSAGE: - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Messages can't have default values."); - result->has_default_value_ = false; - break; - } - - if (end_pos != NULL) { - // end_pos is only set non-NULL by the parsers for numeric types, above. - // This checks that the default was non-empty and had no extra junk - // after the end of the number. - if (proto.default_value().empty() || *end_pos != '\0') { - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Couldn't parse default value."); - } - } - } else { - // No explicit default value - switch (result->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: - result->default_value_int32_ = 0; - break; - case FieldDescriptor::CPPTYPE_INT64: - result->default_value_int64_ = 0; - break; - case FieldDescriptor::CPPTYPE_UINT32: - result->default_value_uint32_ = 0; - break; - case FieldDescriptor::CPPTYPE_UINT64: - result->default_value_uint64_ = 0; - break; - case FieldDescriptor::CPPTYPE_FLOAT: - result->default_value_float_ = 0.0f; - break; - case FieldDescriptor::CPPTYPE_DOUBLE: - result->default_value_double_ = 0.0; - break; - case FieldDescriptor::CPPTYPE_BOOL: - result->default_value_bool_ = false; - break; - case FieldDescriptor::CPPTYPE_ENUM: - // This will be filled in when cross-linking. - result->default_value_enum_ = NULL; - break; - case FieldDescriptor::CPPTYPE_STRING: - result->default_value_string_ = &kEmptyString; - break; - case FieldDescriptor::CPPTYPE_MESSAGE: - break; - } - } - } - - if (result->number() <= 0) { - AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, - "Field numbers must be positive integers."); - } else if (result->number() > FieldDescriptor::kMaxNumber) { - AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Field numbers cannot be greater than $0.", - FieldDescriptor::kMaxNumber)); - } else if (result->number() >= FieldDescriptor::kFirstReservedNumber && - result->number() <= FieldDescriptor::kLastReservedNumber) { - AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute( - "Field numbers $0 through $1 are reserved for the protocol " - "buffer library implementation.", - FieldDescriptor::kFirstReservedNumber, - FieldDescriptor::kLastReservedNumber)); - } - - if (is_extension) { - if (!proto.has_extendee()) { - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::EXTENDEE, - "FieldDescriptorProto.extendee not set for extension field."); - } - - result->extension_scope_ = parent; - } else { - if (proto.has_extendee()) { - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::EXTENDEE, - "FieldDescriptorProto.extendee set for non-extension field."); - } - - result->containing_type_ = parent; - } - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - AddSymbol(result->full_name(), parent, result->name(), - proto, Symbol(result)); -} - -void DescriptorBuilder::BuildExtensionRange( - const DescriptorProto::ExtensionRange& proto, - const Descriptor* parent, - Descriptor::ExtensionRange* result) { - result->start = proto.start(); - result->end = proto.end(); - if (result->start <= 0) { - AddError(parent->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - "Extension numbers must be positive integers."); - } - - if (result->end > FieldDescriptor::kMaxNumber + 1) { - AddError(parent->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Extension numbers cannot be greater than $0.", - FieldDescriptor::kMaxNumber)); - } - - if (result->start >= result->end) { - AddError(parent->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - "Extension range end number must be greater than start number."); - } -} - -void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, - const Descriptor* parent, - EnumDescriptor* result) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - - ValidateSymbolName(proto.name(), *full_name, proto); - - result->name_ = tables_->AllocateString(proto.name()); - result->full_name_ = full_name; - result->file_ = file_; - result->containing_type_ = parent; - result->is_placeholder_ = false; - result->is_unqualified_placeholder_ = false; - - if (proto.value_size() == 0) { - // We cannot allow enums with no values because this would mean there - // would be no valid default value for fields of this type. - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::NAME, - "Enums must contain at least one value."); - } - - BUILD_ARRAY(proto, result, value, BuildEnumValue, result); - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - AddSymbol(result->full_name(), parent, result->name(), - proto, Symbol(result)); -} - -void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, - const EnumDescriptor* parent, - EnumValueDescriptor* result) { - result->name_ = tables_->AllocateString(proto.name()); - result->number_ = proto.number(); - result->type_ = parent; - - // Note: full_name for enum values is a sibling to the parent's name, not a - // child of it. - string* full_name = tables_->AllocateString(*parent->full_name_); - full_name->resize(full_name->size() - parent->name_->size()); - full_name->append(*result->name_); - result->full_name_ = full_name; - - ValidateSymbolName(proto.name(), *full_name, proto); - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - // Again, enum values are weird because we makes them appear as siblings - // of the enum type instead of children of it. So, we use - // parent->containing_type() as the value's parent. - bool added_to_outer_scope = - AddSymbol(result->full_name(), parent->containing_type(), result->name(), - proto, Symbol(result)); - - // However, we also want to be able to search for values within a single - // enum type, so we add it as a child of the enum type itself, too. - // Note: This could fail, but if it does, the error has already been - // reported by the above AddSymbol() call, so we ignore the return code. - bool added_to_inner_scope = - file_tables_->AddAliasUnderParent(parent, result->name(), Symbol(result)); - - if (added_to_inner_scope && !added_to_outer_scope) { - // This value did not conflict with any values defined in the same enum, - // but it did conflict with some other symbol defined in the enum type's - // scope. Let's print an additional error to explain this. - string outer_scope; - if (parent->containing_type() == NULL) { - outer_scope = file_->package(); - } else { - outer_scope = parent->containing_type()->full_name(); - } - - if (outer_scope.empty()) { - outer_scope = "the global scope"; - } else { - outer_scope = "\"" + outer_scope + "\""; - } - - AddError(result->full_name(), proto, - DescriptorPool::ErrorCollector::NAME, - "Note that enum values use C++ scoping rules, meaning that " - "enum values are siblings of their type, not children of it. " - "Therefore, \"" + result->name() + "\" must be unique within " - + outer_scope + ", not just within \"" + parent->name() + "\"."); - } - - // An enum is allowed to define two numbers that refer to the same value. - // FindValueByNumber() should return the first such value, so we simply - // ignore AddEnumValueByNumber()'s return code. - file_tables_->AddEnumValueByNumber(result); -} - -void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, - const void* dummy, - ServiceDescriptor* result) { - string* full_name = tables_->AllocateString(file_->package()); - if (!full_name->empty()) full_name->append(1, '.'); - full_name->append(proto.name()); - - ValidateSymbolName(proto.name(), *full_name, proto); - - result->name_ = tables_->AllocateString(proto.name()); - result->full_name_ = full_name; - result->file_ = file_; - - BUILD_ARRAY(proto, result, method, BuildMethod, result); - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - AddSymbol(result->full_name(), NULL, result->name(), - proto, Symbol(result)); -} - -void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, - const ServiceDescriptor* parent, - MethodDescriptor* result) { - result->name_ = tables_->AllocateString(proto.name()); - result->service_ = parent; - - string* full_name = tables_->AllocateString(parent->full_name()); - full_name->append(1, '.'); - full_name->append(*result->name_); - result->full_name_ = full_name; - - ValidateSymbolName(proto.name(), *full_name, proto); - - // These will be filled in when cross-linking. - result->input_type_ = NULL; - result->output_type_ = NULL; - - // Copy options. - if (!proto.has_options()) { - result->options_ = NULL; // Will set to default_instance later. - } else { - AllocateOptions(proto.options(), result); - } - - AddSymbol(result->full_name(), parent, result->name(), - proto, Symbol(result)); -} - -#undef BUILD_ARRAY - -// ------------------------------------------------------------------- - -void DescriptorBuilder::CrossLinkFile( - FileDescriptor* file, const FileDescriptorProto& proto) { - if (file->options_ == NULL) { - file->options_ = &FileOptions::default_instance(); - } - - for (int i = 0; i < file->message_type_count(); i++) { - CrossLinkMessage(&file->message_types_[i], proto.message_type(i)); - } - - for (int i = 0; i < file->extension_count(); i++) { - CrossLinkField(&file->extensions_[i], proto.extension(i)); - } - - for (int i = 0; i < file->enum_type_count(); i++) { - CrossLinkEnum(&file->enum_types_[i], proto.enum_type(i)); - } - - for (int i = 0; i < file->service_count(); i++) { - CrossLinkService(&file->services_[i], proto.service(i)); - } -} - -void DescriptorBuilder::CrossLinkMessage( - Descriptor* message, const DescriptorProto& proto) { - if (message->options_ == NULL) { - message->options_ = &MessageOptions::default_instance(); - } - - for (int i = 0; i < message->nested_type_count(); i++) { - CrossLinkMessage(&message->nested_types_[i], proto.nested_type(i)); - } - - for (int i = 0; i < message->enum_type_count(); i++) { - CrossLinkEnum(&message->enum_types_[i], proto.enum_type(i)); - } - - for (int i = 0; i < message->field_count(); i++) { - CrossLinkField(&message->fields_[i], proto.field(i)); - } - - for (int i = 0; i < message->extension_count(); i++) { - CrossLinkField(&message->extensions_[i], proto.extension(i)); - } -} - -void DescriptorBuilder::CrossLinkField( - FieldDescriptor* field, const FieldDescriptorProto& proto) { - if (field->options_ == NULL) { - field->options_ = &FieldOptions::default_instance(); - } - - if (proto.has_extendee()) { - Symbol extendee = LookupSymbol(proto.extendee(), field->full_name(), - PLACEHOLDER_EXTENDABLE_MESSAGE); - if (extendee.IsNull()) { - AddNotDefinedError(field->full_name(), proto, - DescriptorPool::ErrorCollector::EXTENDEE, - proto.extendee()); - return; - } else if (extendee.type != Symbol::MESSAGE) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::EXTENDEE, - "\"" + proto.extendee() + "\" is not a message type."); - return; - } - field->containing_type_ = extendee.descriptor; - - if (!field->containing_type()->IsExtensionNumber(field->number())) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("\"$0\" does not declare $1 as an " - "extension number.", - field->containing_type()->full_name(), - field->number())); - } - } - - if (proto.has_type_name()) { - // Assume we are expecting a message type unless the proto contains some - // evidence that it expects an enum type. This only makes a difference if - // we end up creating a placeholder. - bool expecting_enum = (proto.type() == FieldDescriptorProto::TYPE_ENUM) || - proto.has_default_value(); - - Symbol type = - LookupSymbol(proto.type_name(), field->full_name(), - expecting_enum ? PLACEHOLDER_ENUM : PLACEHOLDER_MESSAGE, - LOOKUP_TYPES); - - if (type.IsNull()) { - AddNotDefinedError(field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - proto.type_name()); - return; - } - - if (!proto.has_type()) { - // Choose field type based on symbol. - if (type.type == Symbol::MESSAGE) { - field->type_ = FieldDescriptor::TYPE_MESSAGE; - } else if (type.type == Symbol::ENUM) { - field->type_ = FieldDescriptor::TYPE_ENUM; - } else { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - "\"" + proto.type_name() + "\" is not a type."); - return; - } - } - - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (type.type != Symbol::MESSAGE) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - "\"" + proto.type_name() + "\" is not a message type."); - return; - } - field->message_type_ = type.descriptor; - - if (field->has_default_value()) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Messages can't have default values."); - } - } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) { - if (type.type != Symbol::ENUM) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - "\"" + proto.type_name() + "\" is not an enum type."); - return; - } - field->enum_type_ = type.enum_descriptor; - - if (field->enum_type()->is_placeholder_) { - // We can't look up default values for placeholder types. We'll have - // to just drop them. - field->has_default_value_ = false; - } - - if (field->has_default_value()) { - // We can't just use field->enum_type()->FindValueByName() here - // because that locks the pool's mutex, which we have already locked - // at this point. - Symbol default_value = - LookupSymbolNoPlaceholder(proto.default_value(), - field->enum_type()->full_name()); - - if (default_value.type == Symbol::ENUM_VALUE && - default_value.enum_value_descriptor->type() == field->enum_type()) { - field->default_value_enum_ = default_value.enum_value_descriptor; - } else { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::DEFAULT_VALUE, - "Enum type \"" + field->enum_type()->full_name() + - "\" has no value named \"" + proto.default_value() + "\"."); - } - } else if (field->enum_type()->value_count() > 0) { - // All enums must have at least one value, or we would have reported - // an error elsewhere. We use the first defined value as the default - // if a default is not explicitly defined. - field->default_value_enum_ = field->enum_type()->value(0); - } - } else { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "Field with primitive type has type_name."); - } - } else { - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE || - field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "Field with message or enum type missing type_name."); - } - } - - // Add the field to the fields-by-number table. - // Note: We have to do this *after* cross-linking because extensions do not - // know their containing type until now. - if (!file_tables_->AddFieldByNumber(field)) { - const FieldDescriptor* conflicting_field = - file_tables_->FindFieldByNumber(field->containing_type(), - field->number()); - if (field->is_extension()) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Extension number $0 has already been used " - "in \"$1\" by extension \"$2\".", - field->number(), - field->containing_type()->full_name(), - conflicting_field->full_name())); - } else { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::NUMBER, - strings::Substitute("Field number $0 has already been used in " - "\"$1\" by field \"$2\".", - field->number(), - field->containing_type()->full_name(), - conflicting_field->name())); - } - } - - if (field->is_extension()) { - // No need for error checking: if the extension number collided, - // we've already been informed of it by the if() above. - tables_->AddExtension(field); - } - - // Add the field to the lowercase-name and camelcase-name tables. - file_tables_->AddFieldByStylizedNames(field); -} - -void DescriptorBuilder::CrossLinkEnum( - EnumDescriptor* enum_type, const EnumDescriptorProto& proto) { - if (enum_type->options_ == NULL) { - enum_type->options_ = &EnumOptions::default_instance(); - } - - for (int i = 0; i < enum_type->value_count(); i++) { - CrossLinkEnumValue(&enum_type->values_[i], proto.value(i)); - } -} - -void DescriptorBuilder::CrossLinkEnumValue( - EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& proto) { - if (enum_value->options_ == NULL) { - enum_value->options_ = &EnumValueOptions::default_instance(); - } -} - -void DescriptorBuilder::CrossLinkService( - ServiceDescriptor* service, const ServiceDescriptorProto& proto) { - if (service->options_ == NULL) { - service->options_ = &ServiceOptions::default_instance(); - } - - for (int i = 0; i < service->method_count(); i++) { - CrossLinkMethod(&service->methods_[i], proto.method(i)); - } -} - -void DescriptorBuilder::CrossLinkMethod( - MethodDescriptor* method, const MethodDescriptorProto& proto) { - if (method->options_ == NULL) { - method->options_ = &MethodOptions::default_instance(); - } - - Symbol input_type = LookupSymbol(proto.input_type(), method->full_name()); - if (input_type.IsNull()) { - AddNotDefinedError(method->full_name(), proto, - DescriptorPool::ErrorCollector::INPUT_TYPE, - proto.input_type()); - } else if (input_type.type != Symbol::MESSAGE) { - AddError(method->full_name(), proto, - DescriptorPool::ErrorCollector::INPUT_TYPE, - "\"" + proto.input_type() + "\" is not a message type."); - } else { - method->input_type_ = input_type.descriptor; - } - - Symbol output_type = LookupSymbol(proto.output_type(), method->full_name()); - if (output_type.IsNull()) { - AddNotDefinedError(method->full_name(), proto, - DescriptorPool::ErrorCollector::OUTPUT_TYPE, - proto.output_type()); - } else if (output_type.type != Symbol::MESSAGE) { - AddError(method->full_name(), proto, - DescriptorPool::ErrorCollector::OUTPUT_TYPE, - "\"" + proto.output_type() + "\" is not a message type."); - } else { - method->output_type_ = output_type.descriptor; - } -} - -// ------------------------------------------------------------------- - -#define VALIDATE_OPTIONS_FROM_ARRAY(descriptor, array_name, type) \ - for (int i = 0; i < descriptor->array_name##_count(); ++i) { \ - Validate##type##Options(descriptor->array_name##s_ + i, \ - proto.array_name(i)); \ - } - -// Determine if the file uses optimize_for = LITE_RUNTIME, being careful to -// avoid problems that exist at init time. -static bool IsLite(const FileDescriptor* file) { - // TODO(kenton): I don't even remember how many of these conditions are - // actually possible. I'm just being super-safe. - return file != NULL && - &file->options() != NULL && - &file->options() != &FileOptions::default_instance() && - file->options().optimize_for() == FileOptions::LITE_RUNTIME; -} - -void DescriptorBuilder::ValidateFileOptions(FileDescriptor* file, - const FileDescriptorProto& proto) { - VALIDATE_OPTIONS_FROM_ARRAY(file, message_type, Message); - VALIDATE_OPTIONS_FROM_ARRAY(file, enum_type, Enum); - VALIDATE_OPTIONS_FROM_ARRAY(file, service, Service); - VALIDATE_OPTIONS_FROM_ARRAY(file, extension, Field); - - // Lite files can only be imported by other Lite files. - if (!IsLite(file)) { - for (int i = 0; i < file->dependency_count(); i++) { - if (IsLite(file->dependency(i))) { - AddError( - file->name(), proto, - DescriptorPool::ErrorCollector::OTHER, - "Files that do not use optimize_for = LITE_RUNTIME cannot import " - "files which do use this option. This file is not lite, but it " - "imports \"" + file->dependency(i)->name() + "\" which is."); - break; - } - } - } -} - -void DescriptorBuilder::ValidateMessageOptions(Descriptor* message, - const DescriptorProto& proto) { - VALIDATE_OPTIONS_FROM_ARRAY(message, field, Field); - VALIDATE_OPTIONS_FROM_ARRAY(message, nested_type, Message); - VALIDATE_OPTIONS_FROM_ARRAY(message, enum_type, Enum); - VALIDATE_OPTIONS_FROM_ARRAY(message, extension, Field); -} - -void DescriptorBuilder::ValidateFieldOptions(FieldDescriptor* field, - const FieldDescriptorProto& proto) { - if (field->options().has_experimental_map_key()) { - ValidateMapKey(field, proto); - } - - // Only repeated primitive fields may be packed. - if (field->options().packed() && !field->is_packable()) { - AddError( - field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - "[packed = true] can only be specified for repeated primitive fields."); - } - - // Note: Default instance may not yet be initialized here, so we have to - // avoid reading from it. - if (field->containing_type_ != NULL && - &field->containing_type()->options() != - &MessageOptions::default_instance() && - field->containing_type()->options().message_set_wire_format()) { - if (field->is_extension()) { - if (!field->is_optional() || - field->type() != FieldDescriptor::TYPE_MESSAGE) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::TYPE, - "Extensions of MessageSets must be optional messages."); - } - } else { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::NAME, - "MessageSets cannot have fields, only extensions."); - } - } - - // Lite extensions can only be of Lite types. - if (IsLite(field->file()) && - field->containing_type_ != NULL && - !IsLite(field->containing_type()->file())) { - AddError(field->full_name(), proto, - DescriptorPool::ErrorCollector::EXTENDEE, - "Extensions to non-lite types can only be declared in non-lite " - "files. Note that you cannot extend a non-lite type to contain " - "a lite type, but the reverse is allowed."); - } -} - -void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm, - const EnumDescriptorProto& proto) { - VALIDATE_OPTIONS_FROM_ARRAY(enm, value, EnumValue); -} - -void DescriptorBuilder::ValidateEnumValueOptions( - EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& proto) { - // Nothing to do so far. -} -void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service, - const ServiceDescriptorProto& proto) { - if (IsLite(service->file()) && - (service->file()->options().cc_generic_services() || - service->file()->options().java_generic_services())) { - AddError(service->full_name(), proto, - DescriptorPool::ErrorCollector::NAME, - "Files with optimize_for = LITE_RUNTIME cannot define services " - "unless you set both options cc_generic_services and " - "java_generic_sevices to false."); - } - - VALIDATE_OPTIONS_FROM_ARRAY(service, method, Method); -} - -void DescriptorBuilder::ValidateMethodOptions(MethodDescriptor* method, - const MethodDescriptorProto& proto) { - // Nothing to do so far. -} - -void DescriptorBuilder::ValidateMapKey(FieldDescriptor* field, - const FieldDescriptorProto& proto) { - if (!field->is_repeated()) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "map type is only allowed for repeated fields."); - return; - } - - if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "map type is only allowed for fields with a message type."); - return; - } - - const Descriptor* item_type = field->message_type(); - if (item_type == NULL) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "Could not find field type."); - return; - } - - // Find the field in item_type named by "experimental_map_key" - const string& key_name = field->options().experimental_map_key(); - const Symbol key_symbol = LookupSymbol( - key_name, - // We append ".key_name" to the containing type's name since - // LookupSymbol() searches for peers of the supplied name, not - // children of the supplied name. - item_type->full_name() + "." + key_name); - - if (key_symbol.IsNull() || key_symbol.field_descriptor->is_extension()) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "Could not find field named \"" + key_name + "\" in type \"" + - item_type->full_name() + "\"."); - return; - } - const FieldDescriptor* key_field = key_symbol.field_descriptor; - - if (key_field->is_repeated()) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "map_key must not name a repeated field."); - return; - } - - if (key_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, - "map key must name a scalar or string field."); - return; - } - - field->experimental_map_key_ = key_field; -} - -#undef VALIDATE_OPTIONS_FROM_ARRAY - -// ------------------------------------------------------------------- - -DescriptorBuilder::OptionInterpreter::OptionInterpreter( - DescriptorBuilder* builder) : builder_(builder) { - GOOGLE_CHECK(builder_); -} - -DescriptorBuilder::OptionInterpreter::~OptionInterpreter() { -} - -bool DescriptorBuilder::OptionInterpreter::InterpretOptions( - OptionsToInterpret* options_to_interpret) { - // Note that these may be in different pools, so we can't use the same - // descriptor and reflection objects on both. - Message* options = options_to_interpret->options; - const Message* original_options = options_to_interpret->original_options; - - bool failed = false; - options_to_interpret_ = options_to_interpret; - - // Find the uninterpreted_option field in the mutable copy of the options - // and clear them, since we're about to interpret them. - const FieldDescriptor* uninterpreted_options_field = - options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(uninterpreted_options_field != NULL) - << "No field named \"uninterpreted_option\" in the Options proto."; - options->GetReflection()->ClearField(options, uninterpreted_options_field); - - // Find the uninterpreted_option field in the original options. - const FieldDescriptor* original_uninterpreted_options_field = - original_options->GetDescriptor()-> - FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(original_uninterpreted_options_field != NULL) - << "No field named \"uninterpreted_option\" in the Options proto."; - - const int num_uninterpreted_options = original_options->GetReflection()-> - FieldSize(*original_options, original_uninterpreted_options_field); - for (int i = 0; i < num_uninterpreted_options; ++i) { - uninterpreted_option_ = down_cast( - &original_options->GetReflection()->GetRepeatedMessage( - *original_options, original_uninterpreted_options_field, i)); - if (!InterpretSingleOption(options)) { - // Error already added by InterpretSingleOption(). - failed = true; - break; - } - } - // Reset these, so we don't have any dangling pointers. - uninterpreted_option_ = NULL; - options_to_interpret_ = NULL; - - if (!failed) { - // InterpretSingleOption() added the interpreted options in the - // UnknownFieldSet, in case the option isn't yet known to us. Now we - // serialize the options message and deserialize it back. That way, any - // option fields that we do happen to know about will get moved from the - // UnknownFieldSet into the real fields, and thus be available right away. - // If they are not known, that's OK too. They will get reparsed into the - // UnknownFieldSet and wait there until the message is parsed by something - // that does know about the options. - string buf; - options->AppendToString(&buf); - GOOGLE_CHECK(options->ParseFromString(buf)) - << "Protocol message serialized itself in invalid fashion."; - } - - return !failed; -} - -bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( - Message* options) { - // First do some basic validation. - if (uninterpreted_option_->name_size() == 0) { - // This should never happen unless the parser has gone seriously awry or - // someone has manually created the uninterpreted option badly. - return AddNameError("Option must have a name."); - } - if (uninterpreted_option_->name(0).name_part() == "uninterpreted_option") { - return AddNameError("Option must not use reserved name " - "\"uninterpreted_option\"."); - } - - const Descriptor* options_descriptor = NULL; - // Get the options message's descriptor from the builder's pool, so that we - // get the version that knows about any extension options declared in the - // file we're currently building. The descriptor should be there as long as - // the file we're building imported "google/protobuf/descriptors.proto". - - // Note that we use DescriptorBuilder::FindSymbol(), not - // DescriptorPool::FindMessageTypeByName() because we're already holding the - // pool's mutex, and the latter method locks it again. - Symbol symbol = builder_->FindSymbolNotEnforcingDeps( - options->GetDescriptor()->full_name()); - if (!symbol.IsNull() && symbol.type == Symbol::MESSAGE) { - options_descriptor = symbol.descriptor; - } else { - // The options message's descriptor was not in the builder's pool, so use - // the standard version from the generated pool. We're not holding the - // generated pool's mutex, so we can search it the straightforward way. - options_descriptor = options->GetDescriptor(); - } - GOOGLE_CHECK(options_descriptor); - - // We iterate over the name parts to drill into the submessages until we find - // the leaf field for the option. As we drill down we remember the current - // submessage's descriptor in |descriptor| and the next field in that - // submessage in |field|. We also track the fields we're drilling down - // through in |intermediate_fields|. As we go, we reconstruct the full option - // name in |debug_msg_name|, for use in error messages. - const Descriptor* descriptor = options_descriptor; - const FieldDescriptor* field = NULL; - vector intermediate_fields; - string debug_msg_name = ""; - - for (int i = 0; i < uninterpreted_option_->name_size(); ++i) { - const string& name_part = uninterpreted_option_->name(i).name_part(); - if (debug_msg_name.size() > 0) { - debug_msg_name += "."; - } - if (uninterpreted_option_->name(i).is_extension()) { - debug_msg_name += "(" + name_part + ")"; - // Search for the extension's descriptor as an extension in the builder's - // pool. Note that we use DescriptorBuilder::LookupSymbol(), not - // DescriptorPool::FindExtensionByName(), for two reasons: 1) It allows - // relative lookups, and 2) because we're already holding the pool's - // mutex, and the latter method locks it again. - Symbol symbol = builder_->LookupSymbol(name_part, - options_to_interpret_->name_scope); - if (!symbol.IsNull() && symbol.type == Symbol::FIELD) { - field = symbol.field_descriptor; - } - // If we don't find the field then the field's descriptor was not in the - // builder's pool, but there's no point in looking in the generated - // pool. We require that you import the file that defines any extensions - // you use, so they must be present in the builder's pool. - } else { - debug_msg_name += name_part; - // Search for the field's descriptor as a regular field. - field = descriptor->FindFieldByName(name_part); - } - - if (field == NULL) { - if (get_allow_unknown(builder_->pool_)) { - // We can't find the option, but AllowUnknownDependencies() is enabled, - // so we will just leave it as uninterpreted. - AddWithoutInterpreting(*uninterpreted_option_, options); - return true; - } else { - return AddNameError("Option \"" + debug_msg_name + "\" unknown."); - } - } else if (field->containing_type() != descriptor) { - if (get_is_placeholder(field->containing_type())) { - // The field is an extension of a placeholder type, so we can't - // reliably verify whether it is a valid extension to use here (e.g. - // we don't know if it is an extension of the correct *Options message, - // or if it has a valid field number, etc.). Just leave it as - // uninterpreted instead. - AddWithoutInterpreting(*uninterpreted_option_, options); - return true; - } else { - // This can only happen if, due to some insane misconfiguration of the - // pools, we find the options message in one pool but the field in - // another. This would probably imply a hefty bug somewhere. - return AddNameError("Option field \"" + debug_msg_name + - "\" is not a field or extension of message \"" + - descriptor->name() + "\"."); - } - } else if (field->is_repeated()) { - return AddNameError("Option field \"" + debug_msg_name + - "\" is repeated. Repeated options are not " - "supported."); - } else if (i < uninterpreted_option_->name_size() - 1) { - if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { - return AddNameError("Option \"" + debug_msg_name + - "\" is an atomic type, not a message."); - } else { - // Drill down into the submessage. - intermediate_fields.push_back(field); - descriptor = field->message_type(); - } - } - } - - // We've found the leaf field. Now we use UnknownFieldSets to set its value - // on the options message. We do so because the message may not yet know - // about its extension fields, so we may not be able to set the fields - // directly. But the UnknownFieldSets will serialize to the same wire-format - // message, so reading that message back in once the extension fields are - // known will populate them correctly. - - // First see if the option is already set. - if (!ExamineIfOptionIsSet( - intermediate_fields.begin(), - intermediate_fields.end(), - field, debug_msg_name, - options->GetReflection()->GetUnknownFields(*options))) { - return false; // ExamineIfOptionIsSet() already added the error. - } - - - // First set the value on the UnknownFieldSet corresponding to the - // innermost message. - scoped_ptr unknown_fields(new UnknownFieldSet()); - if (!SetOptionValue(field, unknown_fields.get())) { - return false; // SetOptionValue() already added the error. - } - - // Now wrap the UnknownFieldSet with UnknownFieldSets corresponding to all - // the intermediate messages. - for (vector::reverse_iterator iter = - intermediate_fields.rbegin(); - iter != intermediate_fields.rend(); ++iter) { - scoped_ptr parent_unknown_fields(new UnknownFieldSet()); - switch ((*iter)->type()) { - case FieldDescriptor::TYPE_MESSAGE: { - io::StringOutputStream outstr( - parent_unknown_fields->AddLengthDelimited((*iter)->number())); - io::CodedOutputStream out(&outstr); - internal::WireFormat::SerializeUnknownFields(*unknown_fields, &out); - GOOGLE_CHECK(!out.HadError()) - << "Unexpected failure while serializing option submessage " - << debug_msg_name << "\"."; - break; - } - - case FieldDescriptor::TYPE_GROUP: { - parent_unknown_fields->AddGroup((*iter)->number()) - ->MergeFrom(*unknown_fields); - break; - } - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " - << (*iter)->type(); - return false; - } - unknown_fields.reset(parent_unknown_fields.release()); - } - - // Now merge the UnknownFieldSet corresponding to the top-level message into - // the options message. - options->GetReflection()->MutableUnknownFields(options)->MergeFrom( - *unknown_fields); - - return true; -} - -void DescriptorBuilder::OptionInterpreter::AddWithoutInterpreting( - const UninterpretedOption& uninterpreted_option, Message* options) { - const FieldDescriptor* field = - options->GetDescriptor()->FindFieldByName("uninterpreted_option"); - GOOGLE_CHECK(field != NULL); - - options->GetReflection()->AddMessage(options, field) - ->CopyFrom(uninterpreted_option); -} - -bool DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet( - vector::const_iterator intermediate_fields_iter, - vector::const_iterator intermediate_fields_end, - const FieldDescriptor* innermost_field, const string& debug_msg_name, - const UnknownFieldSet& unknown_fields) { - // We do linear searches of the UnknownFieldSet and its sub-groups. This - // should be fine since it's unlikely that any one options structure will - // contain more than a handful of options. - - if (intermediate_fields_iter == intermediate_fields_end) { - // We're at the innermost submessage. - for (int i = 0; i < unknown_fields.field_count(); i++) { - if (unknown_fields.field(i).number() == innermost_field->number()) { - return AddNameError("Option \"" + debug_msg_name + - "\" was already set."); - } - } - return true; - } - - for (int i = 0; i < unknown_fields.field_count(); i++) { - if (unknown_fields.field(i).number() == - (*intermediate_fields_iter)->number()) { - const UnknownField* unknown_field = &unknown_fields.field(i); - FieldDescriptor::Type type = (*intermediate_fields_iter)->type(); - // Recurse into the next submessage. - switch (type) { - case FieldDescriptor::TYPE_MESSAGE: - if (unknown_field->type() == UnknownField::TYPE_LENGTH_DELIMITED) { - UnknownFieldSet intermediate_unknown_fields; - if (intermediate_unknown_fields.ParseFromString( - unknown_field->length_delimited()) && - !ExamineIfOptionIsSet(intermediate_fields_iter + 1, - intermediate_fields_end, - innermost_field, debug_msg_name, - intermediate_unknown_fields)) { - return false; // Error already added. - } - } - break; - - case FieldDescriptor::TYPE_GROUP: - if (unknown_field->type() == UnknownField::TYPE_GROUP) { - if (!ExamineIfOptionIsSet(intermediate_fields_iter + 1, - intermediate_fields_end, - innermost_field, debug_msg_name, - unknown_field->group())) { - return false; // Error already added. - } - } - break; - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_MESSAGE: " << type; - return false; - } - } - } - return true; -} - -bool DescriptorBuilder::OptionInterpreter::SetOptionValue( - const FieldDescriptor* option_field, - UnknownFieldSet* unknown_fields) { - // We switch on the CppType to validate. - switch (option_field->cpp_type()) { - - case FieldDescriptor::CPPTYPE_INT32: - if (uninterpreted_option_->has_positive_int_value()) { - if (uninterpreted_option_->positive_int_value() > - static_cast(kint32max)) { - return AddValueError("Value out of range for int32 option \"" + - option_field->full_name() + "\"."); - } else { - SetInt32(option_field->number(), - uninterpreted_option_->positive_int_value(), - option_field->type(), unknown_fields); - } - } else if (uninterpreted_option_->has_negative_int_value()) { - if (uninterpreted_option_->negative_int_value() < - static_cast(kint32min)) { - return AddValueError("Value out of range for int32 option \"" + - option_field->full_name() + "\"."); - } else { - SetInt32(option_field->number(), - uninterpreted_option_->negative_int_value(), - option_field->type(), unknown_fields); - } - } else { - return AddValueError("Value must be integer for int32 option \"" + - option_field->full_name() + "\"."); - } - break; - - case FieldDescriptor::CPPTYPE_INT64: - if (uninterpreted_option_->has_positive_int_value()) { - if (uninterpreted_option_->positive_int_value() > - static_cast(kint64max)) { - return AddValueError("Value out of range for int64 option \"" + - option_field->full_name() + "\"."); - } else { - SetInt64(option_field->number(), - uninterpreted_option_->positive_int_value(), - option_field->type(), unknown_fields); - } - } else if (uninterpreted_option_->has_negative_int_value()) { - SetInt64(option_field->number(), - uninterpreted_option_->negative_int_value(), - option_field->type(), unknown_fields); - } else { - return AddValueError("Value must be integer for int64 option \"" + - option_field->full_name() + "\"."); - } - break; - - case FieldDescriptor::CPPTYPE_UINT32: - if (uninterpreted_option_->has_positive_int_value()) { - if (uninterpreted_option_->positive_int_value() > kuint32max) { - return AddValueError("Value out of range for uint32 option \"" + - option_field->name() + "\"."); - } else { - SetUInt32(option_field->number(), - uninterpreted_option_->positive_int_value(), - option_field->type(), unknown_fields); - } - } else { - return AddValueError("Value must be non-negative integer for uint32 " - "option \"" + option_field->full_name() + "\"."); - } - break; - - case FieldDescriptor::CPPTYPE_UINT64: - if (uninterpreted_option_->has_positive_int_value()) { - SetUInt64(option_field->number(), - uninterpreted_option_->positive_int_value(), - option_field->type(), unknown_fields); - } else { - return AddValueError("Value must be non-negative integer for uint64 " - "option \"" + option_field->full_name() + "\"."); - } - break; - - case FieldDescriptor::CPPTYPE_FLOAT: { - float value; - if (uninterpreted_option_->has_double_value()) { - value = uninterpreted_option_->double_value(); - } else if (uninterpreted_option_->has_positive_int_value()) { - value = uninterpreted_option_->positive_int_value(); - } else if (uninterpreted_option_->has_negative_int_value()) { - value = uninterpreted_option_->negative_int_value(); - } else { - return AddValueError("Value must be number for float option \"" + - option_field->full_name() + "\"."); - } - unknown_fields->AddFixed32(option_field->number(), - google::protobuf::internal::WireFormatLite::EncodeFloat(value)); - break; - } - - case FieldDescriptor::CPPTYPE_DOUBLE: { - double value; - if (uninterpreted_option_->has_double_value()) { - value = uninterpreted_option_->double_value(); - } else if (uninterpreted_option_->has_positive_int_value()) { - value = uninterpreted_option_->positive_int_value(); - } else if (uninterpreted_option_->has_negative_int_value()) { - value = uninterpreted_option_->negative_int_value(); - } else { - return AddValueError("Value must be number for double option \"" + - option_field->full_name() + "\"."); - } - unknown_fields->AddFixed64(option_field->number(), - google::protobuf::internal::WireFormatLite::EncodeDouble(value)); - break; - } - - case FieldDescriptor::CPPTYPE_BOOL: - uint64 value; - if (!uninterpreted_option_->has_identifier_value()) { - return AddValueError("Value must be identifier for boolean option " - "\"" + option_field->full_name() + "\"."); - } - if (uninterpreted_option_->identifier_value() == "true") { - value = 1; - } else if (uninterpreted_option_->identifier_value() == "false") { - value = 0; - } else { - return AddValueError("Value must be \"true\" or \"false\" for boolean " - "option \"" + option_field->full_name() + "\"."); - } - unknown_fields->AddVarint(option_field->number(), value); - break; - - case FieldDescriptor::CPPTYPE_ENUM: { - if (!uninterpreted_option_->has_identifier_value()) { - return AddValueError("Value must be identifier for enum-valued option " - "\"" + option_field->full_name() + "\"."); - } - const EnumDescriptor* enum_type = option_field->enum_type(); - const string& value_name = uninterpreted_option_->identifier_value(); - const EnumValueDescriptor* enum_value = NULL; - - if (enum_type->file()->pool() != DescriptorPool::generated_pool()) { - // Note that the enum value's fully-qualified name is a sibling of the - // enum's name, not a child of it. - string fully_qualified_name = enum_type->full_name(); - fully_qualified_name.resize(fully_qualified_name.size() - - enum_type->name().size()); - fully_qualified_name += value_name; - - // Search for the enum value's descriptor in the builder's pool. Note - // that we use DescriptorBuilder::FindSymbolNotEnforcingDeps(), not - // DescriptorPool::FindEnumValueByName() because we're already holding - // the pool's mutex, and the latter method locks it again. - Symbol symbol = - builder_->FindSymbolNotEnforcingDeps(fully_qualified_name); - if (!symbol.IsNull() && symbol.type == Symbol::ENUM_VALUE) { - if (symbol.enum_value_descriptor->type() != enum_type) { - return AddValueError("Enum type \"" + enum_type->full_name() + - "\" has no value named \"" + value_name + "\" for option \"" + - option_field->full_name() + - "\". This appears to be a value from a sibling type."); - } else { - enum_value = symbol.enum_value_descriptor; - } - } - } else { - // The enum type is in the generated pool, so we can search for the - // value there. - enum_value = enum_type->FindValueByName(value_name); - } - - if (enum_value == NULL) { - return AddValueError("Enum type \"" + - option_field->enum_type()->full_name() + - "\" has no value named \"" + value_name + "\" for " - "option \"" + option_field->full_name() + "\"."); - } else { - // Sign-extension is not a problem, since we cast directly from int32 to - // uint64, without first going through uint32. - unknown_fields->AddVarint(option_field->number(), - static_cast(static_cast(enum_value->number()))); - } - break; - } - - case FieldDescriptor::CPPTYPE_STRING: - if (!uninterpreted_option_->has_string_value()) { - return AddValueError("Value must be quoted string for string option " - "\"" + option_field->full_name() + "\"."); - } - // The string has already been unquoted and unescaped by the parser. - unknown_fields->AddLengthDelimited(option_field->number(), - uninterpreted_option_->string_value()); - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: - if (!SetAggregateOption(option_field, unknown_fields)) { - return false; - } - break; - } - - return true; -} - -class DescriptorBuilder::OptionInterpreter::AggregateOptionFinder - : public TextFormat::Finder { - public: - DescriptorBuilder* builder_; - - virtual const FieldDescriptor* FindExtension( - Message* message, const string& name) const { - assert_mutex_held(builder_->pool_); - Symbol result = builder_->LookupSymbolNoPlaceholder( - name, message->GetDescriptor()->full_name()); - if (result.type == Symbol::FIELD && - result.field_descriptor->is_extension()) { - return result.field_descriptor; - } else { - return NULL; - } - } -}; - -// A custom error collector to record any text-format parsing errors -namespace { -class AggregateErrorCollector : public io::ErrorCollector { - public: - string error_; - - virtual void AddError(int line, int column, const string& message) { - if (!error_.empty()) { - error_ += "; "; - } - error_ += message; - } - - virtual void AddWarning(int line, int column, const string& message) { - // Ignore warnings - } -}; -} - -// We construct a dynamic message of the type corresponding to -// option_field, parse the supplied text-format string into this -// message, and serialize the resulting message to produce the value. -bool DescriptorBuilder::OptionInterpreter::SetAggregateOption( - const FieldDescriptor* option_field, - UnknownFieldSet* unknown_fields) { - if (!uninterpreted_option_->has_aggregate_value()) { - return AddValueError("Option \"" + option_field->full_name() + - "\" is a message. To set the entire message, use " - "syntax like \"" + option_field->name() + - " = { }\". " - "To set fields within it, use " - "syntax like \"" + option_field->name() + - ".foo = value\"."); - } - - const Descriptor* type = option_field->message_type(); - scoped_ptr dynamic(dynamic_factory_.GetPrototype(type)->New()); - GOOGLE_CHECK(dynamic.get() != NULL) - << "Could not create an instance of " << option_field->DebugString(); - - AggregateErrorCollector collector; - AggregateOptionFinder finder; - finder.builder_ = builder_; - TextFormat::Parser parser; - parser.RecordErrorsTo(&collector); - parser.SetFinder(&finder); - if (!parser.ParseFromString(uninterpreted_option_->aggregate_value(), - dynamic.get())) { - AddValueError("Error while parsing option value for \"" + - option_field->name() + "\": " + collector.error_); - return false; - } else { - string serial; - dynamic->SerializeToString(&serial); // Never fails - unknown_fields->AddLengthDelimited(option_field->number(), serial); - return true; - } -} - -void DescriptorBuilder::OptionInterpreter::SetInt32(int number, int32 value, - FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { - switch (type) { - case FieldDescriptor::TYPE_INT32: - unknown_fields->AddVarint(number, - static_cast(static_cast(value))); - break; - - case FieldDescriptor::TYPE_SFIXED32: - unknown_fields->AddFixed32(number, static_cast(value)); - break; - - case FieldDescriptor::TYPE_SINT32: - unknown_fields->AddVarint(number, - google::protobuf::internal::WireFormatLite::ZigZagEncode32(value)); - break; - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT32: " << type; - break; - } -} - -void DescriptorBuilder::OptionInterpreter::SetInt64(int number, int64 value, - FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { - switch (type) { - case FieldDescriptor::TYPE_INT64: - unknown_fields->AddVarint(number, static_cast(value)); - break; - - case FieldDescriptor::TYPE_SFIXED64: - unknown_fields->AddFixed64(number, static_cast(value)); - break; - - case FieldDescriptor::TYPE_SINT64: - unknown_fields->AddVarint(number, - google::protobuf::internal::WireFormatLite::ZigZagEncode64(value)); - break; - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT64: " << type; - break; - } -} - -void DescriptorBuilder::OptionInterpreter::SetUInt32(int number, uint32 value, - FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { - switch (type) { - case FieldDescriptor::TYPE_UINT32: - unknown_fields->AddVarint(number, static_cast(value)); - break; - - case FieldDescriptor::TYPE_FIXED32: - unknown_fields->AddFixed32(number, static_cast(value)); - break; - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT32: " << type; - break; - } -} - -void DescriptorBuilder::OptionInterpreter::SetUInt64(int number, uint64 value, - FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { - switch (type) { - case FieldDescriptor::TYPE_UINT64: - unknown_fields->AddVarint(number, value); - break; - - case FieldDescriptor::TYPE_FIXED64: - unknown_fields->AddFixed64(number, value); - break; - - default: - GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_UINT64: " << type; - break; - } -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.h deleted file mode 100644 index 7f87dd80..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.h +++ /dev/null @@ -1,1367 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains classes which describe a type of protocol message. -// You can use a message's descriptor to learn at runtime what fields -// it contains and what the types of those fields are. The Message -// interface also allows you to dynamically access and modify individual -// fields by passing the FieldDescriptor of the field you are interested -// in. -// -// Most users will not care about descriptors, because they will write -// code specific to certain protocol types and will simply use the classes -// generated by the protocol compiler directly. Advanced users who want -// to operate on arbitrary types (not known at compile time) may want to -// read descriptors in order to learn about the contents of a message. -// A very small number of users will want to construct their own -// Descriptors, either because they are implementing Message manually or -// because they are writing something like the protocol compiler. -// -// For an example of how you might use descriptors, see the code example -// at the top of message.h. - -#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__ -#define GOOGLE_PROTOBUF_DESCRIPTOR_H__ - -#include -#include -#include - - -namespace google { -namespace protobuf { - -// Defined in this file. -class Descriptor; -class FieldDescriptor; -class EnumDescriptor; -class EnumValueDescriptor; -class ServiceDescriptor; -class MethodDescriptor; -class FileDescriptor; -class DescriptorDatabase; -class DescriptorPool; - -// Defined in descriptor.proto -class DescriptorProto; -class FieldDescriptorProto; -class EnumDescriptorProto; -class EnumValueDescriptorProto; -class ServiceDescriptorProto; -class MethodDescriptorProto; -class FileDescriptorProto; -class MessageOptions; -class FieldOptions; -class EnumOptions; -class EnumValueOptions; -class ServiceOptions; -class MethodOptions; -class FileOptions; -class UninterpretedOption; - -// Defined in message.h -class Message; - -// Defined in descriptor.cc -class DescriptorBuilder; -class FileDescriptorTables; - -// Defined in unknown_field_set.h. -class UnknownField; - -// Describes a type of protocol message, or a particular group within a -// message. To obtain the Descriptor for a given message object, call -// Message::GetDescriptor(). Generated message classes also have a -// static method called descriptor() which returns the type's descriptor. -// Use DescriptorPool to construct your own descriptors. -class LIBPROTOBUF_EXPORT Descriptor { - public: - // The name of the message type, not including its scope. - const string& name() const; - - // The fully-qualified name of the message type, scope delimited by - // periods. For example, message type "Foo" which is declared in package - // "bar" has full name "bar.Foo". If a type "Baz" is nested within - // Foo, Baz's full_name is "bar.Foo.Baz". To get only the part that - // comes after the last '.', use name(). - const string& full_name() const; - - // Index of this descriptor within the file or containing type's message - // type array. - int index() const; - - // The .proto file in which this message type was defined. Never NULL. - const FileDescriptor* file() const; - - // If this Descriptor describes a nested type, this returns the type - // in which it is nested. Otherwise, returns NULL. - const Descriptor* containing_type() const; - - // Get options for this message type. These are specified in the .proto file - // by placing lines like "option foo = 1234;" in the message definition. - // Allowed options are defined by MessageOptions in - // google/protobuf/descriptor.proto, and any available extensions of that - // message. - const MessageOptions& options() const; - - // Write the contents of this Descriptor into the given DescriptorProto. - // The target DescriptorProto must be clear before calling this; if it - // isn't, the result may be garbage. - void CopyTo(DescriptorProto* proto) const; - - // Write the contents of this decriptor in a human-readable form. Output - // will be suitable for re-parsing. - string DebugString() const; - - // Field stuff ----------------------------------------------------- - - // The number of fields in this message type. - int field_count() const; - // Gets a field by index, where 0 <= index < field_count(). - // These are returned in the order they were defined in the .proto file. - const FieldDescriptor* field(int index) const; - - // Looks up a field by declared tag number. Returns NULL if no such field - // exists. - const FieldDescriptor* FindFieldByNumber(int number) const; - // Looks up a field by name. Returns NULL if no such field exists. - const FieldDescriptor* FindFieldByName(const string& name) const; - - // Looks up a field by lowercased name (as returned by lowercase_name()). - // This lookup may be ambiguous if multiple field names differ only by case, - // in which case the field returned is chosen arbitrarily from the matches. - const FieldDescriptor* FindFieldByLowercaseName( - const string& lowercase_name) const; - - // Looks up a field by camel-case name (as returned by camelcase_name()). - // This lookup may be ambiguous if multiple field names differ in a way that - // leads them to have identical camel-case names, in which case the field - // returned is chosen arbitrarily from the matches. - const FieldDescriptor* FindFieldByCamelcaseName( - const string& camelcase_name) const; - - // Nested type stuff ----------------------------------------------- - - // The number of nested types in this message type. - int nested_type_count() const; - // Gets a nested type by index, where 0 <= index < nested_type_count(). - // These are returned in the order they were defined in the .proto file. - const Descriptor* nested_type(int index) const; - - // Looks up a nested type by name. Returns NULL if no such nested type - // exists. - const Descriptor* FindNestedTypeByName(const string& name) const; - - // Enum stuff ------------------------------------------------------ - - // The number of enum types in this message type. - int enum_type_count() const; - // Gets an enum type by index, where 0 <= index < enum_type_count(). - // These are returned in the order they were defined in the .proto file. - const EnumDescriptor* enum_type(int index) const; - - // Looks up an enum type by name. Returns NULL if no such enum type exists. - const EnumDescriptor* FindEnumTypeByName(const string& name) const; - - // Looks up an enum value by name, among all enum types in this message. - // Returns NULL if no such value exists. - const EnumValueDescriptor* FindEnumValueByName(const string& name) const; - - // Extensions ------------------------------------------------------ - - // A range of field numbers which are designated for third-party - // extensions. - struct ExtensionRange { - int start; // inclusive - int end; // exclusive - }; - - // The number of extension ranges in this message type. - int extension_range_count() const; - // Gets an extension range by index, where 0 <= index < - // extension_range_count(). These are returned in the order they were defined - // in the .proto file. - const ExtensionRange* extension_range(int index) const; - - // Returns true if the number is in one of the extension ranges. - bool IsExtensionNumber(int number) const; - - // The number of extensions -- extending *other* messages -- that were - // defined nested within this message type's scope. - int extension_count() const; - // Get an extension by index, where 0 <= index < extension_count(). - // These are returned in the order they were defined in the .proto file. - const FieldDescriptor* extension(int index) const; - - // Looks up a named extension (which extends some *other* message type) - // defined within this message type's scope. - const FieldDescriptor* FindExtensionByName(const string& name) const; - - // Similar to FindFieldByLowercaseName(), but finds extensions defined within - // this message type's scope. - const FieldDescriptor* FindExtensionByLowercaseName(const string& name) const; - - // Similar to FindFieldByCamelcaseName(), but finds extensions defined within - // this message type's scope. - const FieldDescriptor* FindExtensionByCamelcaseName(const string& name) const; - - private: - typedef MessageOptions OptionsType; - - // Internal version of DebugString; controls the level of indenting for - // correct depth - void DebugString(int depth, string *contents) const; - - const string* name_; - const string* full_name_; - const FileDescriptor* file_; - const Descriptor* containing_type_; - const MessageOptions* options_; - - // True if this is a placeholder for an unknown type. - bool is_placeholder_; - // True if this is a placeholder and the type name wasn't fully-qualified. - bool is_unqualified_placeholder_; - - int field_count_; - FieldDescriptor* fields_; - int nested_type_count_; - Descriptor* nested_types_; - int enum_type_count_; - EnumDescriptor* enum_types_; - int extension_range_count_; - ExtensionRange* extension_ranges_; - int extension_count_; - FieldDescriptor* extensions_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in descriptor.cc - // and update them to initialize the field. - - // Must be constructed using DescriptorPool. - Descriptor() {} - friend class DescriptorBuilder; - friend class EnumDescriptor; - friend class FieldDescriptor; - friend class MethodDescriptor; - friend class FileDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Descriptor); -}; - -// Describes a single field of a message. To get the descriptor for a given -// field, first get the Descriptor for the message in which it is defined, -// then call Descriptor::FindFieldByName(). To get a FieldDescriptor for -// an extension, do one of the following: -// - Get the Descriptor or FileDescriptor for its containing scope, then -// call Descriptor::FindExtensionByName() or -// FileDescriptor::FindExtensionByName(). -// - Given a DescriptorPool, call DescriptorPool::FindExtensionByNumber(). -// - Given a Reflection for a message object, call -// Reflection::FindKnownExtensionByName() or -// Reflection::FindKnownExtensionByNumber(). -// Use DescriptorPool to construct your own descriptors. -class LIBPROTOBUF_EXPORT FieldDescriptor { - public: - // Identifies a field type. 0 is reserved for errors. The order is weird - // for historical reasons. Types 12 and up are new in proto2. - enum Type { - TYPE_DOUBLE = 1, // double, exactly eight bytes on the wire. - TYPE_FLOAT = 2, // float, exactly four bytes on the wire. - TYPE_INT64 = 3, // int64, varint on the wire. Negative numbers - // take 10 bytes. Use TYPE_SINT64 if negative - // values are likely. - TYPE_UINT64 = 4, // uint64, varint on the wire. - TYPE_INT32 = 5, // int32, varint on the wire. Negative numbers - // take 10 bytes. Use TYPE_SINT32 if negative - // values are likely. - TYPE_FIXED64 = 6, // uint64, exactly eight bytes on the wire. - TYPE_FIXED32 = 7, // uint32, exactly four bytes on the wire. - TYPE_BOOL = 8, // bool, varint on the wire. - TYPE_STRING = 9, // UTF-8 text. - TYPE_GROUP = 10, // Tag-delimited message. Deprecated. - TYPE_MESSAGE = 11, // Length-delimited message. - - TYPE_BYTES = 12, // Arbitrary byte array. - TYPE_UINT32 = 13, // uint32, varint on the wire - TYPE_ENUM = 14, // Enum, varint on the wire - TYPE_SFIXED32 = 15, // int32, exactly four bytes on the wire - TYPE_SFIXED64 = 16, // int64, exactly eight bytes on the wire - TYPE_SINT32 = 17, // int32, ZigZag-encoded varint on the wire - TYPE_SINT64 = 18, // int64, ZigZag-encoded varint on the wire - - MAX_TYPE = 18, // Constant useful for defining lookup tables - // indexed by Type. - }; - - // Specifies the C++ data type used to represent the field. There is a - // fixed mapping from Type to CppType where each Type maps to exactly one - // CppType. 0 is reserved for errors. - enum CppType { - CPPTYPE_INT32 = 1, // TYPE_INT32, TYPE_SINT32, TYPE_SFIXED32 - CPPTYPE_INT64 = 2, // TYPE_INT64, TYPE_SINT64, TYPE_SFIXED64 - CPPTYPE_UINT32 = 3, // TYPE_UINT32, TYPE_FIXED32 - CPPTYPE_UINT64 = 4, // TYPE_UINT64, TYPE_FIXED64 - CPPTYPE_DOUBLE = 5, // TYPE_DOUBLE - CPPTYPE_FLOAT = 6, // TYPE_FLOAT - CPPTYPE_BOOL = 7, // TYPE_BOOL - CPPTYPE_ENUM = 8, // TYPE_ENUM - CPPTYPE_STRING = 9, // TYPE_STRING, TYPE_BYTES - CPPTYPE_MESSAGE = 10, // TYPE_MESSAGE, TYPE_GROUP - - MAX_CPPTYPE = 10, // Constant useful for defining lookup tables - // indexed by CppType. - }; - - // Identifies whether the field is optional, required, or repeated. 0 is - // reserved for errors. - enum Label { - LABEL_OPTIONAL = 1, // optional - LABEL_REQUIRED = 2, // required - LABEL_REPEATED = 3, // repeated - - MAX_LABEL = 3, // Constant useful for defining lookup tables - // indexed by Label. - }; - - // Valid field numbers are positive integers up to kMaxNumber. - static const int kMaxNumber = (1 << 29) - 1; - - // First field number reserved for the protocol buffer library implementation. - // Users may not declare fields that use reserved numbers. - static const int kFirstReservedNumber = 19000; - // Last field number reserved for the protocol buffer library implementation. - // Users may not declare fields that use reserved numbers. - static const int kLastReservedNumber = 19999; - - const string& name() const; // Name of this field within the message. - const string& full_name() const; // Fully-qualified name of the field. - const FileDescriptor* file() const;// File in which this field was defined. - bool is_extension() const; // Is this an extension field? - int number() const; // Declared tag number. - - // Same as name() except converted to lower-case. This (and especially the - // FindFieldByLowercaseName() method) can be useful when parsing formats - // which prefer to use lowercase naming style. (Although, technically - // field names should be lowercased anyway according to the protobuf style - // guide, so this only makes a difference when dealing with old .proto files - // which do not follow the guide.) - const string& lowercase_name() const; - - // Same as name() except converted to camel-case. In this conversion, any - // time an underscore appears in the name, it is removed and the next - // letter is capitalized. Furthermore, the first letter of the name is - // lower-cased. Examples: - // FooBar -> fooBar - // foo_bar -> fooBar - // fooBar -> fooBar - // This (and especially the FindFieldByCamelcaseName() method) can be useful - // when parsing formats which prefer to use camel-case naming style. - const string& camelcase_name() const; - - Type type() const; // Declared type of this field. - CppType cpp_type() const; // C++ type of this field. - Label label() const; // optional/required/repeated - - bool is_required() const; // shorthand for label() == LABEL_REQUIRED - bool is_optional() const; // shorthand for label() == LABEL_OPTIONAL - bool is_repeated() const; // shorthand for label() == LABEL_REPEATED - bool is_packable() const; // shorthand for is_repeated() && - // IsTypePackable(type()) - - // Index of this field within the message's field array, or the file or - // extension scope's extensions array. - int index() const; - - // Does this field have an explicitly-declared default value? - bool has_default_value() const; - - // Get the field default value if cpp_type() == CPPTYPE_INT32. If no - // explicit default was defined, the default is 0. - int32 default_value_int32() const; - // Get the field default value if cpp_type() == CPPTYPE_INT64. If no - // explicit default was defined, the default is 0. - int64 default_value_int64() const; - // Get the field default value if cpp_type() == CPPTYPE_UINT32. If no - // explicit default was defined, the default is 0. - uint32 default_value_uint32() const; - // Get the field default value if cpp_type() == CPPTYPE_UINT64. If no - // explicit default was defined, the default is 0. - uint64 default_value_uint64() const; - // Get the field default value if cpp_type() == CPPTYPE_FLOAT. If no - // explicit default was defined, the default is 0.0. - float default_value_float() const; - // Get the field default value if cpp_type() == CPPTYPE_DOUBLE. If no - // explicit default was defined, the default is 0.0. - double default_value_double() const; - // Get the field default value if cpp_type() == CPPTYPE_BOOL. If no - // explicit default was defined, the default is false. - bool default_value_bool() const; - // Get the field default value if cpp_type() == CPPTYPE_ENUM. If no - // explicit default was defined, the default is the first value defined - // in the enum type (all enum types are required to have at least one value). - // This never returns NULL. - const EnumValueDescriptor* default_value_enum() const; - // Get the field default value if cpp_type() == CPPTYPE_STRING. If no - // explicit default was defined, the default is the empty string. - const string& default_value_string() const; - - // The Descriptor for the message of which this is a field. For extensions, - // this is the extended type. Never NULL. - const Descriptor* containing_type() const; - - // An extension may be declared within the scope of another message. If this - // field is an extension (is_extension() is true), then extension_scope() - // returns that message, or NULL if the extension was declared at global - // scope. If this is not an extension, extension_scope() is undefined (may - // assert-fail). - const Descriptor* extension_scope() const; - - // If type is TYPE_MESSAGE or TYPE_GROUP, returns a descriptor for the - // message or the group type. Otherwise, undefined. - const Descriptor* message_type() const; - // If type is TYPE_ENUM, returns a descriptor for the enum. Otherwise, - // undefined. - const EnumDescriptor* enum_type() const; - - // EXPERIMENTAL; DO NOT USE. - // If this field is a map field, experimental_map_key() is the field - // that is the key for this map. - // experimental_map_key()->containing_type() is the same as message_type(). - const FieldDescriptor* experimental_map_key() const; - - // Get the FieldOptions for this field. This includes things listed in - // square brackets after the field definition. E.g., the field: - // optional string text = 1 [ctype=CORD]; - // has the "ctype" option set. Allowed options are defined by FieldOptions - // in google/protobuf/descriptor.proto, and any available extensions of that - // message. - const FieldOptions& options() const; - - // See Descriptor::CopyTo(). - void CopyTo(FieldDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - // Helper method to get the CppType for a particular Type. - static CppType TypeToCppType(Type type); - - // Return true iff [packed = true] is valid for fields of this type. - static inline bool IsTypePackable(Type field_type); - - private: - typedef FieldOptions OptionsType; - - // See Descriptor::DebugString(). - void DebugString(int depth, string *contents) const; - - // formats the default value appropriately and returns it as a string. - // Must have a default value to call this. If quote_string_type is true, then - // types of CPPTYPE_STRING whill be surrounded by quotes and CEscaped. - string DefaultValueAsString(bool quote_string_type) const; - - const string* name_; - const string* full_name_; - const string* lowercase_name_; - const string* camelcase_name_; - const FileDescriptor* file_; - int number_; - Type type_; - Label label_; - bool is_extension_; - const Descriptor* containing_type_; - const Descriptor* extension_scope_; - const Descriptor* message_type_; - const EnumDescriptor* enum_type_; - const FieldDescriptor* experimental_map_key_; - const FieldOptions* options_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in - // descriptor.cc and update them to initialize the field. - - bool has_default_value_; - union { - int32 default_value_int32_; - int64 default_value_int64_; - uint32 default_value_uint32_; - uint64 default_value_uint64_; - float default_value_float_; - double default_value_double_; - bool default_value_bool_; - - const EnumValueDescriptor* default_value_enum_; - const string* default_value_string_; - }; - - static const CppType kTypeToCppTypeMap[MAX_TYPE + 1]; - - static const char * const kTypeToName[MAX_TYPE + 1]; - - static const char * const kLabelToName[MAX_LABEL + 1]; - - // Must be constructed using DescriptorPool. - FieldDescriptor() {} - friend class DescriptorBuilder; - friend class FileDescriptor; - friend class Descriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldDescriptor); -}; - -// Describes an enum type defined in a .proto file. To get the EnumDescriptor -// for a generated enum type, call TypeName_descriptor(). Use DescriptorPool -// to construct your own descriptors. -class LIBPROTOBUF_EXPORT EnumDescriptor { - public: - // The name of this enum type in the containing scope. - const string& name() const; - - // The fully-qualified name of the enum type, scope delimited by periods. - const string& full_name() const; - - // Index of this enum within the file or containing message's enum array. - int index() const; - - // The .proto file in which this enum type was defined. Never NULL. - const FileDescriptor* file() const; - - // The number of values for this EnumDescriptor. Guaranteed to be greater - // than zero. - int value_count() const; - // Gets a value by index, where 0 <= index < value_count(). - // These are returned in the order they were defined in the .proto file. - const EnumValueDescriptor* value(int index) const; - - // Looks up a value by name. Returns NULL if no such value exists. - const EnumValueDescriptor* FindValueByName(const string& name) const; - // Looks up a value by number. Returns NULL if no such value exists. If - // multiple values have this number, the first one defined is returned. - const EnumValueDescriptor* FindValueByNumber(int number) const; - - // If this enum type is nested in a message type, this is that message type. - // Otherwise, NULL. - const Descriptor* containing_type() const; - - // Get options for this enum type. These are specified in the .proto file by - // placing lines like "option foo = 1234;" in the enum definition. Allowed - // options are defined by EnumOptions in google/protobuf/descriptor.proto, - // and any available extensions of that message. - const EnumOptions& options() const; - - // See Descriptor::CopyTo(). - void CopyTo(EnumDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - private: - typedef EnumOptions OptionsType; - - // See Descriptor::DebugString(). - void DebugString(int depth, string *contents) const; - - const string* name_; - const string* full_name_; - const FileDescriptor* file_; - const Descriptor* containing_type_; - const EnumOptions* options_; - - // True if this is a placeholder for an unknown type. - bool is_placeholder_; - // True if this is a placeholder and the type name wasn't fully-qualified. - bool is_unqualified_placeholder_; - - int value_count_; - EnumValueDescriptor* values_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in - // descriptor.cc and update them to initialize the field. - - // Must be constructed using DescriptorPool. - EnumDescriptor() {} - friend class DescriptorBuilder; - friend class Descriptor; - friend class FieldDescriptor; - friend class EnumValueDescriptor; - friend class FileDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumDescriptor); -}; - -// Describes an individual enum constant of a particular type. To get the -// EnumValueDescriptor for a given enum value, first get the EnumDescriptor -// for its type, then use EnumDescriptor::FindValueByName() or -// EnumDescriptor::FindValueByNumber(). Use DescriptorPool to construct -// your own descriptors. -class LIBPROTOBUF_EXPORT EnumValueDescriptor { - public: - const string& name() const; // Name of this enum constant. - int index() const; // Index within the enums's Descriptor. - int number() const; // Numeric value of this enum constant. - - // The full_name of an enum value is a sibling symbol of the enum type. - // e.g. the full name of FieldDescriptorProto::TYPE_INT32 is actually - // "google.protobuf.FieldDescriptorProto.TYPE_INT32", NOT - // "google.protobuf.FieldDescriptorProto.Type.TYPE_INT32". This is to conform - // with C++ scoping rules for enums. - const string& full_name() const; - - // The type of this value. Never NULL. - const EnumDescriptor* type() const; - - // Get options for this enum value. These are specified in the .proto file - // by adding text like "[foo = 1234]" after an enum value definition. - // Allowed options are defined by EnumValueOptions in - // google/protobuf/descriptor.proto, and any available extensions of that - // message. - const EnumValueOptions& options() const; - - // See Descriptor::CopyTo(). - void CopyTo(EnumValueDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - private: - typedef EnumValueOptions OptionsType; - - // See Descriptor::DebugString(). - void DebugString(int depth, string *contents) const; - - const string* name_; - const string* full_name_; - int number_; - const EnumDescriptor* type_; - const EnumValueOptions* options_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() - // in descriptor.cc and update them to initialize the field. - - // Must be constructed using DescriptorPool. - EnumValueDescriptor() {} - friend class DescriptorBuilder; - friend class EnumDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumValueDescriptor); -}; - -// Describes an RPC service. To get the ServiceDescriptor for a service, -// call Service::GetDescriptor(). Generated service classes also have a -// static method called descriptor() which returns the type's -// ServiceDescriptor. Use DescriptorPool to construct your own descriptors. -class LIBPROTOBUF_EXPORT ServiceDescriptor { - public: - // The name of the service, not including its containing scope. - const string& name() const; - // The fully-qualified name of the service, scope delimited by periods. - const string& full_name() const; - // Index of this service within the file's services array. - int index() const; - - // The .proto file in which this service was defined. Never NULL. - const FileDescriptor* file() const; - - // Get options for this service type. These are specified in the .proto file - // by placing lines like "option foo = 1234;" in the service definition. - // Allowed options are defined by ServiceOptions in - // google/protobuf/descriptor.proto, and any available extensions of that - // message. - const ServiceOptions& options() const; - - // The number of methods this service defines. - int method_count() const; - // Gets a MethodDescriptor by index, where 0 <= index < method_count(). - // These are returned in the order they were defined in the .proto file. - const MethodDescriptor* method(int index) const; - - // Look up a MethodDescriptor by name. - const MethodDescriptor* FindMethodByName(const string& name) const; - - // See Descriptor::CopyTo(). - void CopyTo(ServiceDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - private: - typedef ServiceOptions OptionsType; - - // See Descriptor::DebugString(). - void DebugString(string *contents) const; - - const string* name_; - const string* full_name_; - const FileDescriptor* file_; - const ServiceOptions* options_; - int method_count_; - MethodDescriptor* methods_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in - // descriptor.cc and update them to initialize the field. - - // Must be constructed using DescriptorPool. - ServiceDescriptor() {} - friend class DescriptorBuilder; - friend class FileDescriptor; - friend class MethodDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceDescriptor); -}; - -// Describes an individual service method. To obtain a MethodDescriptor given -// a service, first get its ServiceDescriptor, then call -// ServiceDescriptor::FindMethodByName(). Use DescriptorPool to construct your -// own descriptors. -class LIBPROTOBUF_EXPORT MethodDescriptor { - public: - // Name of this method, not including containing scope. - const string& name() const; - // The fully-qualified name of the method, scope delimited by periods. - const string& full_name() const; - // Index within the service's Descriptor. - int index() const; - - // Gets the service to which this method belongs. Never NULL. - const ServiceDescriptor* service() const; - - // Gets the type of protocol message which this method accepts as input. - const Descriptor* input_type() const; - // Gets the type of protocol message which this message produces as output. - const Descriptor* output_type() const; - - // Get options for this method. These are specified in the .proto file by - // placing lines like "option foo = 1234;" in curly-braces after a method - // declaration. Allowed options are defined by MethodOptions in - // google/protobuf/descriptor.proto, and any available extensions of that - // message. - const MethodOptions& options() const; - - // See Descriptor::CopyTo(). - void CopyTo(MethodDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - private: - typedef MethodOptions OptionsType; - - // See Descriptor::DebugString(). - void DebugString(int depth, string *contents) const; - - const string* name_; - const string* full_name_; - const ServiceDescriptor* service_; - const Descriptor* input_type_; - const Descriptor* output_type_; - const MethodOptions* options_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in - // descriptor.cc and update them to initialize the field. - - // Must be constructed using DescriptorPool. - MethodDescriptor() {} - friend class DescriptorBuilder; - friend class ServiceDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MethodDescriptor); -}; - -// Describes a whole .proto file. To get the FileDescriptor for a compiled-in -// file, get the descriptor for something defined in that file and call -// descriptor->file(). Use DescriptorPool to construct your own descriptors. -class LIBPROTOBUF_EXPORT FileDescriptor { - public: - // The filename, relative to the source tree. - // e.g. "google/protobuf/descriptor.proto" - const string& name() const; - - // The package, e.g. "google.protobuf.compiler". - const string& package() const; - - // The DescriptorPool in which this FileDescriptor and all its contents were - // allocated. Never NULL. - const DescriptorPool* pool() const; - - // The number of files imported by this one. - int dependency_count() const; - // Gets an imported file by index, where 0 <= index < dependency_count(). - // These are returned in the order they were defined in the .proto file. - const FileDescriptor* dependency(int index) const; - - // Number of top-level message types defined in this file. (This does not - // include nested types.) - int message_type_count() const; - // Gets a top-level message type, where 0 <= index < message_type_count(). - // These are returned in the order they were defined in the .proto file. - const Descriptor* message_type(int index) const; - - // Number of top-level enum types defined in this file. (This does not - // include nested types.) - int enum_type_count() const; - // Gets a top-level enum type, where 0 <= index < enum_type_count(). - // These are returned in the order they were defined in the .proto file. - const EnumDescriptor* enum_type(int index) const; - - // Number of services defined in this file. - int service_count() const; - // Gets a service, where 0 <= index < service_count(). - // These are returned in the order they were defined in the .proto file. - const ServiceDescriptor* service(int index) const; - - // Number of extensions defined at file scope. (This does not include - // extensions nested within message types.) - int extension_count() const; - // Gets an extension's descriptor, where 0 <= index < extension_count(). - // These are returned in the order they were defined in the .proto file. - const FieldDescriptor* extension(int index) const; - - // Get options for this file. These are specified in the .proto file by - // placing lines like "option foo = 1234;" at the top level, outside of any - // other definitions. Allowed options are defined by FileOptions in - // google/protobuf/descriptor.proto, and any available extensions of that - // message. - const FileOptions& options() const; - - // Find a top-level message type by name. Returns NULL if not found. - const Descriptor* FindMessageTypeByName(const string& name) const; - // Find a top-level enum type by name. Returns NULL if not found. - const EnumDescriptor* FindEnumTypeByName(const string& name) const; - // Find an enum value defined in any top-level enum by name. Returns NULL if - // not found. - const EnumValueDescriptor* FindEnumValueByName(const string& name) const; - // Find a service definition by name. Returns NULL if not found. - const ServiceDescriptor* FindServiceByName(const string& name) const; - // Find a top-level extension definition by name. Returns NULL if not found. - const FieldDescriptor* FindExtensionByName(const string& name) const; - // Similar to FindExtensionByName(), but searches by lowercased-name. See - // Descriptor::FindFieldByLowercaseName(). - const FieldDescriptor* FindExtensionByLowercaseName(const string& name) const; - // Similar to FindExtensionByName(), but searches by camelcased-name. See - // Descriptor::FindFieldByCamelcaseName(). - const FieldDescriptor* FindExtensionByCamelcaseName(const string& name) const; - - // See Descriptor::CopyTo(). - void CopyTo(FileDescriptorProto* proto) const; - - // See Descriptor::DebugString(). - string DebugString() const; - - private: - typedef FileOptions OptionsType; - - const string* name_; - const string* package_; - const DescriptorPool* pool_; - int dependency_count_; - const FileDescriptor** dependencies_; - int message_type_count_; - Descriptor* message_types_; - int enum_type_count_; - EnumDescriptor* enum_types_; - int service_count_; - ServiceDescriptor* services_; - int extension_count_; - FieldDescriptor* extensions_; - const FileOptions* options_; - - const FileDescriptorTables* tables_; - // IMPORTANT: If you add a new field, make sure to search for all instances - // of Allocate() and AllocateArray() in - // descriptor.cc and update them to initialize the field. - - FileDescriptor() {} - friend class DescriptorBuilder; - friend class Descriptor; - friend class FieldDescriptor; - friend class EnumDescriptor; - friend class ServiceDescriptor; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileDescriptor); -}; - -// =================================================================== - -// Used to construct descriptors. -// -// Normally you won't want to build your own descriptors. Message classes -// constructed by the protocol compiler will provide them for you. However, -// if you are implementing Message on your own, or if you are writing a -// program which can operate on totally arbitrary types and needs to load -// them from some sort of database, you might need to. -// -// Since Descriptors are composed of a whole lot of cross-linked bits of -// data that would be a pain to put together manually, the -// DescriptorPool class is provided to make the process easier. It can -// take a FileDescriptorProto (defined in descriptor.proto), validate it, -// and convert it to a set of nicely cross-linked Descriptors. -// -// DescriptorPool also helps with memory management. Descriptors are -// composed of many objects containing static data and pointers to each -// other. In all likelihood, when it comes time to delete this data, -// you'll want to delete it all at once. In fact, it is not uncommon to -// have a whole pool of descriptors all cross-linked with each other which -// you wish to delete all at once. This class represents such a pool, and -// handles the memory management for you. -// -// You can also search for descriptors within a DescriptorPool by name, and -// extensions by number. -class LIBPROTOBUF_EXPORT DescriptorPool { - public: - // Create a normal, empty DescriptorPool. - DescriptorPool(); - - // Constructs a DescriptorPool that, when it can't find something among the - // descriptors already in the pool, looks for it in the given - // DescriptorDatabase. - // Notes: - // - If a DescriptorPool is constructed this way, its BuildFile*() methods - // must not be called (they will assert-fail). The only way to populate - // the pool with descriptors is to call the Find*By*() methods. - // - The Find*By*() methods may block the calling thread if the - // DescriptorDatabase blocks. This in turn means that parsing messages - // may block if they need to look up extensions. - // - The Find*By*() methods will use mutexes for thread-safety, thus making - // them slower even when they don't have to fall back to the database. - // In fact, even the Find*By*() methods of descriptor objects owned by - // this pool will be slower, since they will have to obtain locks too. - // - An ErrorCollector may optionally be given to collect validation errors - // in files loaded from the database. If not given, errors will be printed - // to GOOGLE_LOG(ERROR). Remember that files are built on-demand, so this - // ErrorCollector may be called from any thread that calls one of the - // Find*By*() methods. - class ErrorCollector; - explicit DescriptorPool(DescriptorDatabase* fallback_database, - ErrorCollector* error_collector = NULL); - - ~DescriptorPool(); - - // Get a pointer to the generated pool. Generated protocol message classes - // which are compiled into the binary will allocate their descriptors in - // this pool. Do not add your own descriptors to this pool. - static const DescriptorPool* generated_pool(); - - // Find a FileDescriptor in the pool by file name. Returns NULL if not - // found. - const FileDescriptor* FindFileByName(const string& name) const; - - // Find the FileDescriptor in the pool which defines the given symbol. - // If any of the Find*ByName() methods below would succeed, then this is - // equivalent to calling that method and calling the result's file() method. - // Otherwise this returns NULL. - const FileDescriptor* FindFileContainingSymbol( - const string& symbol_name) const; - - // Looking up descriptors ------------------------------------------ - // These find descriptors by fully-qualified name. These will find both - // top-level descriptors and nested descriptors. They return NULL if not - // found. - - const Descriptor* FindMessageTypeByName(const string& name) const; - const FieldDescriptor* FindFieldByName(const string& name) const; - const FieldDescriptor* FindExtensionByName(const string& name) const; - const EnumDescriptor* FindEnumTypeByName(const string& name) const; - const EnumValueDescriptor* FindEnumValueByName(const string& name) const; - const ServiceDescriptor* FindServiceByName(const string& name) const; - const MethodDescriptor* FindMethodByName(const string& name) const; - - // Finds an extension of the given type by number. The extendee must be - // a member of this DescriptorPool or one of its underlays. - const FieldDescriptor* FindExtensionByNumber(const Descriptor* extendee, - int number) const; - - // Finds extensions of extendee. The extensions will be appended to - // out in an undefined order. Only extensions defined directly in - // this DescriptorPool or one of its underlays are guaranteed to be - // found: extensions defined in the fallback database might not be found - // depending on the database implementation. - void FindAllExtensions(const Descriptor* extendee, - vector* out) const; - - // Building descriptors -------------------------------------------- - - // When converting a FileDescriptorProto to a FileDescriptor, various - // errors might be detected in the input. The caller may handle these - // programmatically by implementing an ErrorCollector. - class LIBPROTOBUF_EXPORT ErrorCollector { - public: - inline ErrorCollector() {} - virtual ~ErrorCollector(); - - // These constants specify what exact part of the construct is broken. - // This is useful e.g. for mapping the error back to an exact location - // in a .proto file. - enum ErrorLocation { - NAME, // the symbol name, or the package name for files - NUMBER, // field or extension range number - TYPE, // field type - EXTENDEE, // field extendee - DEFAULT_VALUE, // field default value - INPUT_TYPE, // method input type - OUTPUT_TYPE, // method output type - OPTION_NAME, // name in assignment - OPTION_VALUE, // value in option assignment - OTHER // some other problem - }; - - // Reports an error in the FileDescriptorProto. - virtual void AddError( - const string& filename, // File name in which the error occurred. - const string& element_name, // Full name of the erroneous element. - const Message* descriptor, // Descriptor of the erroneous element. - ErrorLocation location, // One of the location constants, above. - const string& message // Human-readable error message. - ) = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector); - }; - - // Convert the FileDescriptorProto to real descriptors and place them in - // this DescriptorPool. All dependencies of the file must already be in - // the pool. Returns the resulting FileDescriptor, or NULL if there were - // problems with the input (e.g. the message was invalid, or dependencies - // were missing). Details about the errors are written to GOOGLE_LOG(ERROR). - const FileDescriptor* BuildFile(const FileDescriptorProto& proto); - - // Same as BuildFile() except errors are sent to the given ErrorCollector. - const FileDescriptor* BuildFileCollectingErrors( - const FileDescriptorProto& proto, - ErrorCollector* error_collector); - - // By default, it is an error if a FileDescriptorProto contains references - // to types or other files that are not found in the DescriptorPool (or its - // backing DescriptorDatabase, if any). If you call - // AllowUnknownDependencies(), however, then unknown types and files - // will be replaced by placeholder descriptors. This can allow you to - // perform some useful operations with a .proto file even if you do not - // have access to other .proto files on which it depends. However, some - // heuristics must be used to fill in the gaps in information, and these - // can lead to descriptors which are inaccurate. For example, the - // DescriptorPool may be forced to guess whether an unknown type is a message - // or an enum, as well as what package it resides in. Furthermore, - // placeholder types will not be discoverable via FindMessageTypeByName() - // and similar methods, which could confuse some descriptor-based algorithms. - // Generally, the results of this option should only be relied upon for - // debugging purposes. - void AllowUnknownDependencies() { allow_unknown_ = true; } - - // Internal stuff -------------------------------------------------- - // These methods MUST NOT be called from outside the proto2 library. - // These methods may contain hidden pitfalls and may be removed in a - // future library version. - - // Create a DescriptorPool which is overlaid on top of some other pool. - // If you search for a descriptor in the overlay and it is not found, the - // underlay will be searched as a backup. If the underlay has its own - // underlay, that will be searched next, and so on. This also means that - // files built in the overlay will be cross-linked with the underlay's - // descriptors if necessary. The underlay remains property of the caller; - // it must remain valid for the lifetime of the newly-constructed pool. - // - // Example: Say you want to parse a .proto file at runtime in order to use - // its type with a DynamicMessage. Say this .proto file has dependencies, - // but you know that all the dependencies will be things that are already - // compiled into the binary. For ease of use, you'd like to load the types - // right out of generated_pool() rather than have to parse redundant copies - // of all these .protos and runtime. But, you don't want to add the parsed - // types directly into generated_pool(): this is not allowed, and would be - // bad design anyway. So, instead, you could use generated_pool() as an - // underlay for a new DescriptorPool in which you add only the new file. - // - // WARNING: Use of underlays can lead to many subtle gotchas. Instead, - // try to formulate what you want to do in terms of DescriptorDatabases. - explicit DescriptorPool(const DescriptorPool* underlay); - - // Called by generated classes at init time to add their descriptors to - // generated_pool. Do NOT call this in your own code! filename must be a - // permanent string (e.g. a string literal). - static void InternalAddGeneratedFile( - const void* encoded_file_descriptor, int size); - - - // For internal use only: Gets a non-const pointer to the generated pool. - // This is called at static-initialization time only, so thread-safety is - // not a concern. If both an underlay and a fallback database are present, - // the fallback database takes precedence. - static DescriptorPool* internal_generated_pool(); - - // For internal use only: Changes the behavior of BuildFile() such that it - // allows the file to make reference to message types declared in other files - // which it did not officially declare as dependencies. - void InternalDontEnforceDependencies(); - - // For internal use only. - void internal_set_underlay(const DescriptorPool* underlay) { - underlay_ = underlay; - } - - // For internal (unit test) use only: Returns true if a FileDescriptor has - // been constructed for the given file, false otherwise. Useful for testing - // lazy descriptor initialization behavior. - bool InternalIsFileLoaded(const string& filename) const; - - private: - friend class Descriptor; - friend class FieldDescriptor; - friend class EnumDescriptor; - friend class ServiceDescriptor; - friend class FileDescriptor; - friend class DescriptorBuilder; - - // Tries to find something in the fallback database and link in the - // corresponding proto file. Returns true if successful, in which case - // the caller should search for the thing again. These are declared - // const because they are called by (semantically) const methods. - bool TryFindFileInFallbackDatabase(const string& name) const; - bool TryFindSymbolInFallbackDatabase(const string& name) const; - bool TryFindExtensionInFallbackDatabase(const Descriptor* containing_type, - int field_number) const; - - // Like BuildFile() but called internally when the file has been loaded from - // fallback_database_. Declared const because it is called by (semantically) - // const methods. - const FileDescriptor* BuildFileFromDatabase( - const FileDescriptorProto& proto) const; - - // If fallback_database_ is NULL, this is NULL. Otherwise, this is a mutex - // which must be locked while accessing tables_. - Mutex* mutex_; - - // See constructor. - DescriptorDatabase* fallback_database_; - ErrorCollector* default_error_collector_; - const DescriptorPool* underlay_; - - // This class contains a lot of hash maps with complicated types that - // we'd like to keep out of the header. - class Tables; - scoped_ptr tables_; - - bool enforce_dependencies_; - bool allow_unknown_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorPool); -}; - -// inline methods ==================================================== - -// These macros makes this repetitive code more readable. -#define PROTOBUF_DEFINE_ACCESSOR(CLASS, FIELD, TYPE) \ - inline TYPE CLASS::FIELD() const { return FIELD##_; } - -// Strings fields are stored as pointers but returned as const references. -#define PROTOBUF_DEFINE_STRING_ACCESSOR(CLASS, FIELD) \ - inline const string& CLASS::FIELD() const { return *FIELD##_; } - -// Arrays take an index parameter, obviously. -#define PROTOBUF_DEFINE_ARRAY_ACCESSOR(CLASS, FIELD, TYPE) \ - inline TYPE CLASS::FIELD(int index) const { return FIELD##s_ + index; } - -#define PROTOBUF_DEFINE_OPTIONS_ACCESSOR(CLASS, TYPE) \ - inline const TYPE& CLASS::options() const { return *options_; } - -PROTOBUF_DEFINE_STRING_ACCESSOR(Descriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(Descriptor, full_name) -PROTOBUF_DEFINE_ACCESSOR(Descriptor, file, const FileDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(Descriptor, containing_type, const Descriptor*) - -PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int) -PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int) -PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int) - -PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, field, const FieldDescriptor*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, nested_type, const Descriptor*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, enum_type, const EnumDescriptor*) - -PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_range_count, int) -PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_count, int) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range, - const Descriptor::ExtensionRange*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension, - const FieldDescriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions); - -PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name) -PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, lowercase_name) -PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, camelcase_name) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, file, const FileDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, number, int) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, type, FieldDescriptor::Type) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, label, FieldDescriptor::Label) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_type, const Descriptor*) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, message_type, const Descriptor*) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, enum_type, const EnumDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, experimental_map_key, - const FieldDescriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions); -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32 , int32 ) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int64 , int64 ) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint32, uint32) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint64, uint64) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_float , float ) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_double, double) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_bool , bool ) -PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_enum, - const EnumValueDescriptor*) -PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, default_value_string) - -PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, full_name) -PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, file, const FileDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*) -PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value, - const EnumValueDescriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions); - -PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, full_name) -PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, number, int) -PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, type, const EnumDescriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions); - -PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, full_name) -PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method, - const MethodDescriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions); - -PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name) -PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*) -PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*) -PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions); - -PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name) -PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, dependency_count, int) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int) -PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int) -PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions); - -PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, service, - const ServiceDescriptor*) -PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, extension, - const FieldDescriptor*) - -#undef PROTOBUF_DEFINE_ACCESSOR -#undef PROTOBUF_DEFINE_STRING_ACCESSOR -#undef PROTOBUF_DEFINE_ARRAY_ACCESSOR - -// A few accessors differ from the macros... - -inline bool FieldDescriptor::is_required() const { - return label() == LABEL_REQUIRED; -} - -inline bool FieldDescriptor::is_optional() const { - return label() == LABEL_OPTIONAL; -} - -inline bool FieldDescriptor::is_repeated() const { - return label() == LABEL_REPEATED; -} - -inline bool FieldDescriptor::is_packable() const { - return is_repeated() && IsTypePackable(type()); -} - -// To save space, index() is computed by looking at the descriptor's position -// in the parent's array of children. -inline int FieldDescriptor::index() const { - if (!is_extension_) { - return this - containing_type_->fields_; - } else if (extension_scope_ != NULL) { - return this - extension_scope_->extensions_; - } else { - return this - file_->extensions_; - } -} - -inline int Descriptor::index() const { - if (containing_type_ == NULL) { - return this - file_->message_types_; - } else { - return this - containing_type_->nested_types_; - } -} - -inline int EnumDescriptor::index() const { - if (containing_type_ == NULL) { - return this - file_->enum_types_; - } else { - return this - containing_type_->enum_types_; - } -} - -inline int EnumValueDescriptor::index() const { - return this - type_->values_; -} - -inline int ServiceDescriptor::index() const { - return this - file_->services_; -} - -inline int MethodDescriptor::index() const { - return this - service_->methods_; -} - -inline FieldDescriptor::CppType FieldDescriptor::cpp_type() const { - return kTypeToCppTypeMap[type_]; -} - -inline FieldDescriptor::CppType FieldDescriptor::TypeToCppType(Type type) { - return kTypeToCppTypeMap[type]; -} - -inline bool FieldDescriptor::IsTypePackable(Type field_type) { - return (field_type != FieldDescriptor::TYPE_STRING && - field_type != FieldDescriptor::TYPE_GROUP && - field_type != FieldDescriptor::TYPE_MESSAGE && - field_type != FieldDescriptor::TYPE_BYTES); -} - -inline const FileDescriptor* FileDescriptor::dependency(int index) const { - return dependencies_[index]; -} - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_DESCRIPTOR_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.cc deleted file mode 100644 index 87303ef8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.cc +++ /dev/null @@ -1,7708 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include "google/protobuf/descriptor.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace google { -namespace protobuf { - -namespace { - -const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileDescriptorSet_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileDescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - DescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - DescriptorProto_ExtensionRange_reflection_ = NULL; -const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FieldDescriptorProto_reflection_ = NULL; -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL; -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL; -const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - EnumDescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - EnumValueDescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ServiceDescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - MethodDescriptorProto_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileOptions_reflection_ = NULL; -const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL; -const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - MessageOptions_reflection_ = NULL; -const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FieldOptions_reflection_ = NULL; -const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL; -const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - EnumOptions_reflection_ = NULL; -const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - EnumValueOptions_reflection_ = NULL; -const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ServiceOptions_reflection_ = NULL; -const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - MethodOptions_reflection_ = NULL; -const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - UninterpretedOption_reflection_ = NULL; -const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - UninterpretedOption_NamePart_reflection_ = NULL; -const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SourceCodeInfo_reflection_ = NULL; -const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SourceCodeInfo_Location_reflection_ = NULL; - -} // namespace - - -void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() { - protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "google/protobuf/descriptor.proto"); - GOOGLE_CHECK(file != NULL); - FileDescriptorSet_descriptor_ = file->message_type(0); - static const int FileDescriptorSet_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_), - }; - FileDescriptorSet_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileDescriptorSet_descriptor_, - FileDescriptorSet::default_instance_, - FileDescriptorSet_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(FileDescriptorSet)); - FileDescriptorProto_descriptor_ = file->message_type(1); - static const int FileDescriptorProto_offsets_[9] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_), - }; - FileDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileDescriptorProto_descriptor_, - FileDescriptorProto::default_instance_, - FileDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(FileDescriptorProto)); - DescriptorProto_descriptor_ = file->message_type(2); - static const int DescriptorProto_offsets_[7] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_), - }; - DescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - DescriptorProto_descriptor_, - DescriptorProto::default_instance_, - DescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(DescriptorProto)); - DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0); - static const int DescriptorProto_ExtensionRange_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_), - }; - DescriptorProto_ExtensionRange_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - DescriptorProto_ExtensionRange_descriptor_, - DescriptorProto_ExtensionRange::default_instance_, - DescriptorProto_ExtensionRange_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(DescriptorProto_ExtensionRange)); - FieldDescriptorProto_descriptor_ = file->message_type(3); - static const int FieldDescriptorProto_offsets_[8] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_), - }; - FieldDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FieldDescriptorProto_descriptor_, - FieldDescriptorProto::default_instance_, - FieldDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(FieldDescriptorProto)); - FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0); - FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1); - EnumDescriptorProto_descriptor_ = file->message_type(4); - static const int EnumDescriptorProto_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_), - }; - EnumDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumDescriptorProto_descriptor_, - EnumDescriptorProto::default_instance_, - EnumDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(EnumDescriptorProto)); - EnumValueDescriptorProto_descriptor_ = file->message_type(5); - static const int EnumValueDescriptorProto_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_), - }; - EnumValueDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumValueDescriptorProto_descriptor_, - EnumValueDescriptorProto::default_instance_, - EnumValueDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(EnumValueDescriptorProto)); - ServiceDescriptorProto_descriptor_ = file->message_type(6); - static const int ServiceDescriptorProto_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_), - }; - ServiceDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - ServiceDescriptorProto_descriptor_, - ServiceDescriptorProto::default_instance_, - ServiceDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(ServiceDescriptorProto)); - MethodDescriptorProto_descriptor_ = file->message_type(7); - static const int MethodDescriptorProto_offsets_[4] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_), - }; - MethodDescriptorProto_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MethodDescriptorProto_descriptor_, - MethodDescriptorProto::default_instance_, - MethodDescriptorProto_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(MethodDescriptorProto)); - FileOptions_descriptor_ = file->message_type(8); - static const int FileOptions_offsets_[9] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_), - }; - FileOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FileOptions_descriptor_, - FileOptions::default_instance_, - FileOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(FileOptions)); - FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0); - MessageOptions_descriptor_ = file->message_type(9); - static const int MessageOptions_offsets_[3] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_), - }; - MessageOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MessageOptions_descriptor_, - MessageOptions::default_instance_, - MessageOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(MessageOptions)); - FieldOptions_descriptor_ = file->message_type(10); - static const int FieldOptions_offsets_[5] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, experimental_map_key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_), - }; - FieldOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - FieldOptions_descriptor_, - FieldOptions::default_instance_, - FieldOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(FieldOptions)); - FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0); - EnumOptions_descriptor_ = file->message_type(11); - static const int EnumOptions_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_), - }; - EnumOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumOptions_descriptor_, - EnumOptions::default_instance_, - EnumOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(EnumOptions)); - EnumValueOptions_descriptor_ = file->message_type(12); - static const int EnumValueOptions_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_), - }; - EnumValueOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - EnumValueOptions_descriptor_, - EnumValueOptions::default_instance_, - EnumValueOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(EnumValueOptions)); - ServiceOptions_descriptor_ = file->message_type(13); - static const int ServiceOptions_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_), - }; - ServiceOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - ServiceOptions_descriptor_, - ServiceOptions::default_instance_, - ServiceOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(ServiceOptions)); - MethodOptions_descriptor_ = file->message_type(14); - static const int MethodOptions_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_), - }; - MethodOptions_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - MethodOptions_descriptor_, - MethodOptions::default_instance_, - MethodOptions_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _unknown_fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_), - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(MethodOptions)); - UninterpretedOption_descriptor_ = file->message_type(15); - static const int UninterpretedOption_offsets_[7] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_), - }; - UninterpretedOption_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - UninterpretedOption_descriptor_, - UninterpretedOption::default_instance_, - UninterpretedOption_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(UninterpretedOption)); - UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0); - static const int UninterpretedOption_NamePart_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_), - }; - UninterpretedOption_NamePart_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - UninterpretedOption_NamePart_descriptor_, - UninterpretedOption_NamePart::default_instance_, - UninterpretedOption_NamePart_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(UninterpretedOption_NamePart)); - SourceCodeInfo_descriptor_ = file->message_type(16); - static const int SourceCodeInfo_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_), - }; - SourceCodeInfo_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SourceCodeInfo_descriptor_, - SourceCodeInfo::default_instance_, - SourceCodeInfo_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SourceCodeInfo)); - SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0); - static const int SourceCodeInfo_Location_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_), - }; - SourceCodeInfo_Location_reflection_ = - new ::google::protobuf::internal::GeneratedMessageReflection( - SourceCodeInfo_Location_descriptor_, - SourceCodeInfo_Location::default_instance_, - SourceCodeInfo_Location_offsets_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _unknown_fields_), - -1, - ::google::protobuf::DescriptorPool::generated_pool(), - ::google::protobuf::MessageFactory::generated_factory(), - sizeof(SourceCodeInfo_Location)); -} - -namespace { - -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto); -} - -void protobuf_RegisterTypes(const ::std::string&) { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - DescriptorProto_descriptor_, &DescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileOptions_descriptor_, &FileOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - MessageOptions_descriptor_, &MessageOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FieldOptions_descriptor_, &FieldOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EnumOptions_descriptor_, &EnumOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EnumValueOptions_descriptor_, &EnumValueOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ServiceOptions_descriptor_, &ServiceOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - MethodOptions_descriptor_, &MethodOptions::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - UninterpretedOption_descriptor_, &UninterpretedOption::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance()); -} - -} // namespace - -void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() { - delete FileDescriptorSet::default_instance_; - delete FileDescriptorSet_reflection_; - delete FileDescriptorProto::default_instance_; - delete FileDescriptorProto_reflection_; - delete DescriptorProto::default_instance_; - delete DescriptorProto_reflection_; - delete DescriptorProto_ExtensionRange::default_instance_; - delete DescriptorProto_ExtensionRange_reflection_; - delete FieldDescriptorProto::default_instance_; - delete FieldDescriptorProto_reflection_; - delete EnumDescriptorProto::default_instance_; - delete EnumDescriptorProto_reflection_; - delete EnumValueDescriptorProto::default_instance_; - delete EnumValueDescriptorProto_reflection_; - delete ServiceDescriptorProto::default_instance_; - delete ServiceDescriptorProto_reflection_; - delete MethodDescriptorProto::default_instance_; - delete MethodDescriptorProto_reflection_; - delete FileOptions::default_instance_; - delete FileOptions_reflection_; - delete MessageOptions::default_instance_; - delete MessageOptions_reflection_; - delete FieldOptions::default_instance_; - delete FieldOptions_reflection_; - delete EnumOptions::default_instance_; - delete EnumOptions_reflection_; - delete EnumValueOptions::default_instance_; - delete EnumValueOptions_reflection_; - delete ServiceOptions::default_instance_; - delete ServiceOptions_reflection_; - delete MethodOptions::default_instance_; - delete MethodOptions_reflection_; - delete UninterpretedOption::default_instance_; - delete UninterpretedOption_reflection_; - delete UninterpretedOption_NamePart::default_instance_; - delete UninterpretedOption_NamePart_reflection_; - delete SourceCodeInfo::default_instance_; - delete SourceCodeInfo_reflection_; - delete SourceCodeInfo_Location::default_instance_; - delete SourceCodeInfo_Location_reflection_; -} - -void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n google/protobuf/descriptor.proto\022\017goog" - "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file" - "\030\001 \003(\0132$.google.protobuf.FileDescriptorP" - "roto\"\227\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001" - "(\t\022\017\n\007package\030\002 \001(\t\022\022\n\ndependency\030\003 \003(\t\022" - "6\n\014message_type\030\004 \003(\0132 .google.protobuf." - "DescriptorProto\0227\n\tenum_type\030\005 \003(\0132$.goo" - "gle.protobuf.EnumDescriptorProto\0228\n\007serv" - "ice\030\006 \003(\0132\'.google.protobuf.ServiceDescr" - "iptorProto\0228\n\textension\030\007 \003(\0132%.google.p" - "rotobuf.FieldDescriptorProto\022-\n\007options\030" - "\010 \001(\0132\034.google.protobuf.FileOptions\0229\n\020s" - "ource_code_info\030\t \001(\0132\037.google.protobuf." - "SourceCodeInfo\"\251\003\n\017DescriptorProto\022\014\n\004na" - "me\030\001 \001(\t\0224\n\005field\030\002 \003(\0132%.google.protobu" - "f.FieldDescriptorProto\0228\n\textension\030\006 \003(" - "\0132%.google.protobuf.FieldDescriptorProto" - "\0225\n\013nested_type\030\003 \003(\0132 .google.protobuf." - "DescriptorProto\0227\n\tenum_type\030\004 \003(\0132$.goo" - "gle.protobuf.EnumDescriptorProto\022H\n\017exte" - "nsion_range\030\005 \003(\0132/.google.protobuf.Desc" - "riptorProto.ExtensionRange\0220\n\007options\030\007 " - "\001(\0132\037.google.protobuf.MessageOptions\032,\n\016" - "ExtensionRange\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001" - "(\005\"\224\005\n\024FieldDescriptorProto\022\014\n\004name\030\001 \001(" - "\t\022\016\n\006number\030\003 \001(\005\022:\n\005label\030\004 \001(\0162+.googl" - "e.protobuf.FieldDescriptorProto.Label\0228\n" - "\004type\030\005 \001(\0162*.google.protobuf.FieldDescr" - "iptorProto.Type\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010ex" - "tendee\030\002 \001(\t\022\025\n\rdefault_value\030\007 \001(\t\022.\n\007o" - "ptions\030\010 \001(\0132\035.google.protobuf.FieldOpti" - "ons\"\266\002\n\004Type\022\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FL" - "OAT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016" - "\n\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE" - "_FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING" - "\020\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\n" - "TYPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_EN" - "UM\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_SFIXED64" - "\020\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005" - "Label\022\022\n\016LABEL_OPTIONAL\020\001\022\022\n\016LABEL_REQUI" - "RED\020\002\022\022\n\016LABEL_REPEATED\020\003\"\214\001\n\023EnumDescri" - "ptorProto\022\014\n\004name\030\001 \001(\t\0228\n\005value\030\002 \003(\0132)" - ".google.protobuf.EnumValueDescriptorProt" - "o\022-\n\007options\030\003 \001(\0132\034.google.protobuf.Enu" - "mOptions\"l\n\030EnumValueDescriptorProto\022\014\n\004" - "name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\0222\n\007options\030\003 " - "\001(\0132!.google.protobuf.EnumValueOptions\"\220" - "\001\n\026ServiceDescriptorProto\022\014\n\004name\030\001 \001(\t\022" - "6\n\006method\030\002 \003(\0132&.google.protobuf.Method" - "DescriptorProto\0220\n\007options\030\003 \001(\0132\037.googl" - "e.protobuf.ServiceOptions\"\177\n\025MethodDescr" - "iptorProto\022\014\n\004name\030\001 \001(\t\022\022\n\ninput_type\030\002" - " \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007options\030\004 \001" - "(\0132\036.google.protobuf.MethodOptions\"\325\003\n\013F" - "ileOptions\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java" - "_outer_classname\030\010 \001(\t\022\"\n\023java_multiple_" - "files\030\n \001(\010:\005false\022,\n\035java_generate_equa" - "ls_and_hash\030\024 \001(\010:\005false\022F\n\014optimize_for" - "\030\t \001(\0162).google.protobuf.FileOptions.Opt" - "imizeMode:\005SPEED\022\"\n\023cc_generic_services\030" - "\020 \001(\010:\005false\022$\n\025java_generic_services\030\021 " - "\001(\010:\005false\022\"\n\023py_generic_services\030\022 \001(\010:" - "\005false\022C\n\024uninterpreted_option\030\347\007 \003(\0132$." - "google.protobuf.UninterpretedOption\":\n\014O" - "ptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n" - "\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\270\001\n\016MessageOp" - "tions\022&\n\027message_set_wire_format\030\001 \001(\010:\005" - "false\022.\n\037no_standard_descriptor_accessor" - "\030\002 \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007" - " \003(\0132$.google.protobuf.UninterpretedOpti" - "on*\t\010\350\007\020\200\200\200\200\002\"\224\002\n\014FieldOptions\022:\n\005ctype\030" - "\001 \001(\0162#.google.protobuf.FieldOptions.CTy" - "pe:\006STRING\022\016\n\006packed\030\002 \001(\010\022\031\n\ndeprecated" - "\030\003 \001(\010:\005false\022\034\n\024experimental_map_key\030\t " - "\001(\t\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo" - "gle.protobuf.UninterpretedOption\"/\n\005CTyp" - "e\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020" - "\002*\t\010\350\007\020\200\200\200\200\002\"]\n\013EnumOptions\022C\n\024uninterpr" - "eted_option\030\347\007 \003(\0132$.google.protobuf.Uni" - "nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"b\n\020EnumValue" - "Options\022C\n\024uninterpreted_option\030\347\007 \003(\0132$" - ".google.protobuf.UninterpretedOption*\t\010\350" - "\007\020\200\200\200\200\002\"`\n\016ServiceOptions\022C\n\024uninterpret" - "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint" - "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"_\n\rMethodOptio" - "ns\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goog" - "le.protobuf.UninterpretedOption*\t\010\350\007\020\200\200\200" - "\200\002\"\236\002\n\023UninterpretedOption\022;\n\004name\030\002 \003(\013" - "2-.google.protobuf.UninterpretedOption.N" - "amePart\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022pos" - "itive_int_value\030\004 \001(\004\022\032\n\022negative_int_va" - "lue\030\005 \001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014strin" - "g_value\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323" - "\n\010NamePart\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_exte" - "nsion\030\002 \002(\010\"|\n\016SourceCodeInfo\022:\n\010locatio" - "n\030\001 \003(\0132(.google.protobuf.SourceCodeInfo" - ".Location\032.\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022" - "\020\n\004span\030\002 \003(\005B\002\020\001B)\n\023com.google.protobuf" - "B\020DescriptorProtosH\001", 3940); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); - FileDescriptorSet::default_instance_ = new FileDescriptorSet(); - FileDescriptorProto::default_instance_ = new FileDescriptorProto(); - DescriptorProto::default_instance_ = new DescriptorProto(); - DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange(); - FieldDescriptorProto::default_instance_ = new FieldDescriptorProto(); - EnumDescriptorProto::default_instance_ = new EnumDescriptorProto(); - EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto(); - ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto(); - MethodDescriptorProto::default_instance_ = new MethodDescriptorProto(); - FileOptions::default_instance_ = new FileOptions(); - MessageOptions::default_instance_ = new MessageOptions(); - FieldOptions::default_instance_ = new FieldOptions(); - EnumOptions::default_instance_ = new EnumOptions(); - EnumValueOptions::default_instance_ = new EnumValueOptions(); - ServiceOptions::default_instance_ = new ServiceOptions(); - MethodOptions::default_instance_ = new MethodOptions(); - UninterpretedOption::default_instance_ = new UninterpretedOption(); - UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart(); - SourceCodeInfo::default_instance_ = new SourceCodeInfo(); - SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location(); - FileDescriptorSet::default_instance_->InitAsDefaultInstance(); - FileDescriptorProto::default_instance_->InitAsDefaultInstance(); - DescriptorProto::default_instance_->InitAsDefaultInstance(); - DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance(); - FieldDescriptorProto::default_instance_->InitAsDefaultInstance(); - EnumDescriptorProto::default_instance_->InitAsDefaultInstance(); - EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance(); - ServiceDescriptorProto::default_instance_->InitAsDefaultInstance(); - MethodDescriptorProto::default_instance_->InitAsDefaultInstance(); - FileOptions::default_instance_->InitAsDefaultInstance(); - MessageOptions::default_instance_->InitAsDefaultInstance(); - FieldOptions::default_instance_->InitAsDefaultInstance(); - EnumOptions::default_instance_->InitAsDefaultInstance(); - EnumValueOptions::default_instance_->InitAsDefaultInstance(); - ServiceOptions::default_instance_->InitAsDefaultInstance(); - MethodOptions::default_instance_->InitAsDefaultInstance(); - UninterpretedOption::default_instance_->InitAsDefaultInstance(); - UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance(); - SourceCodeInfo::default_instance_->InitAsDefaultInstance(); - SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto { - StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() { - protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - } -} static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_; - - -// =================================================================== - -#ifndef _MSC_VER -const int FileDescriptorSet::kFileFieldNumber; -#endif // !_MSC_VER - -FileDescriptorSet::FileDescriptorSet() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void FileDescriptorSet::InitAsDefaultInstance() { -} - -FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void FileDescriptorSet::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -FileDescriptorSet::~FileDescriptorSet() { - SharedDtor(); -} - -void FileDescriptorSet::SharedDtor() { - if (this != default_instance_) { - } -} - -void FileDescriptorSet::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileDescriptorSet_descriptor_; -} - -const FileDescriptorSet& FileDescriptorSet::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL; - -FileDescriptorSet* FileDescriptorSet::New() const { - return new FileDescriptorSet; -} - -void FileDescriptorSet::Clear() { - file_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool FileDescriptorSet::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.FileDescriptorProto file = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_file: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_file())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(10)) goto parse_file; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void FileDescriptorSet::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.FileDescriptorProto file = 1; - for (int i = 0; i < this->file_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->file(i), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.FileDescriptorProto file = 1; - for (int i = 0; i < this->file_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->file(i), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int FileDescriptorSet::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.FileDescriptorProto file = 1; - total_size += 1 * this->file_size(); - for (int i = 0; i < this->file_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->file(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const FileDescriptorSet* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) { - GOOGLE_CHECK_NE(&from, this); - file_.MergeFrom(from.file_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FileDescriptorSet::IsInitialized() const { - - for (int i = 0; i < file_size(); i++) { - if (!this->file(i).IsInitialized()) return false; - } - return true; -} - -void FileDescriptorSet::Swap(FileDescriptorSet* other) { - if (other != this) { - file_.Swap(&other->file_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FileDescriptorSet_descriptor_; - metadata.reflection = FileDescriptorSet_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int FileDescriptorProto::kNameFieldNumber; -const int FileDescriptorProto::kPackageFieldNumber; -const int FileDescriptorProto::kDependencyFieldNumber; -const int FileDescriptorProto::kMessageTypeFieldNumber; -const int FileDescriptorProto::kEnumTypeFieldNumber; -const int FileDescriptorProto::kServiceFieldNumber; -const int FileDescriptorProto::kExtensionFieldNumber; -const int FileDescriptorProto::kOptionsFieldNumber; -const int FileDescriptorProto::kSourceCodeInfoFieldNumber; -#endif // !_MSC_VER - -FileDescriptorProto::FileDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void FileDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance()); - source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance()); -} - -FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void FileDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - source_code_info_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -FileDescriptorProto::~FileDescriptorProto() { - SharedDtor(); -} - -void FileDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (package_ != &::google::protobuf::internal::kEmptyString) { - delete package_; - } - if (this != default_instance_) { - delete options_; - delete source_code_info_; - } -} - -void FileDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileDescriptorProto_descriptor_; -} - -const FileDescriptorProto& FileDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL; - -FileDescriptorProto* FileDescriptorProto::New() const { - return new FileDescriptorProto; -} - -void FileDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_package()) { - if (package_ != &::google::protobuf::internal::kEmptyString) { - package_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); - } - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - if (has_source_code_info()) { - if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); - } - } - dependency_.Clear(); - message_type_.Clear(); - enum_type_.Clear(); - service_.Clear(); - extension_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool FileDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_package; - break; - } - - // optional string package = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_package: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->package().data(), this->package().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_dependency; - break; - } - - // repeated string dependency = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_dependency: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_dependency())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->dependency(0).data(), this->dependency(0).length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_dependency; - if (input->ExpectTag(34)) goto parse_message_type; - break; - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_message_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_message_type())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_message_type; - if (input->ExpectTag(42)) goto parse_enum_type; - break; - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_enum_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_enum_type())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_enum_type; - if (input->ExpectTag(50)) goto parse_service; - break; - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_service: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_service())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(50)) goto parse_service; - if (input->ExpectTag(58)) goto parse_extension; - break; - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_extension: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_extension())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(58)) goto parse_extension; - if (input->ExpectTag(66)) goto parse_options; - break; - } - - // optional .google.protobuf.FileOptions options = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(74)) goto parse_source_code_info; - break; - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_source_code_info: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_source_code_info())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void FileDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // optional string package = 2; - if (has_package()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->package().data(), this->package().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->package(), output); - } - - // repeated string dependency = 3; - for (int i = 0; i < this->dependency_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->dependency(i).data(), this->dependency(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->dependency(i), output); - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - for (int i = 0; i < this->message_type_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, this->message_type(i), output); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (int i = 0; i < this->enum_type_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, this->enum_type(i), output); - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (int i = 0; i < this->service_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, this->service(i), output); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (int i = 0; i < this->extension_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, this->extension(i), output); - } - - // optional .google.protobuf.FileOptions options = 8; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, this->options(), output); - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (has_source_code_info()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 9, this->source_code_info(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // optional string package = 2; - if (has_package()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->package().data(), this->package().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->package(), target); - } - - // repeated string dependency = 3; - for (int i = 0; i < this->dependency_size(); i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->dependency(i).data(), this->dependency(i).length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(3, this->dependency(i), target); - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - for (int i = 0; i < this->message_type_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 4, this->message_type(i), target); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - for (int i = 0; i < this->enum_type_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 5, this->enum_type(i), target); - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - for (int i = 0; i < this->service_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 6, this->service(i), target); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - for (int i = 0; i < this->extension_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->extension(i), target); - } - - // optional .google.protobuf.FileOptions options = 8; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 8, this->options(), target); - } - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (has_source_code_info()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 9, this->source_code_info(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int FileDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional string package = 2; - if (has_package()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->package()); - } - - // optional .google.protobuf.FileOptions options = 8; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - if (has_source_code_info()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->source_code_info()); - } - - } - // repeated string dependency = 3; - total_size += 1 * this->dependency_size(); - for (int i = 0; i < this->dependency_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->dependency(i)); - } - - // repeated .google.protobuf.DescriptorProto message_type = 4; - total_size += 1 * this->message_type_size(); - for (int i = 0; i < this->message_type_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->message_type(i)); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - total_size += 1 * this->enum_type_size(); - for (int i = 0; i < this->enum_type_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->enum_type(i)); - } - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - total_size += 1 * this->service_size(); - for (int i = 0; i < this->service_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->service(i)); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - total_size += 1 * this->extension_size(); - for (int i = 0; i < this->extension_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const FileDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - dependency_.MergeFrom(from.dependency_); - message_type_.MergeFrom(from.message_type_); - enum_type_.MergeFrom(from.enum_type_); - service_.MergeFrom(from.service_); - extension_.MergeFrom(from.extension_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_package()) { - set_package(from.package()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options()); - } - } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { - if (from.has_source_code_info()) { - mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FileDescriptorProto::IsInitialized() const { - - for (int i = 0; i < message_type_size(); i++) { - if (!this->message_type(i).IsInitialized()) return false; - } - for (int i = 0; i < enum_type_size(); i++) { - if (!this->enum_type(i).IsInitialized()) return false; - } - for (int i = 0; i < service_size(); i++) { - if (!this->service(i).IsInitialized()) return false; - } - for (int i = 0; i < extension_size(); i++) { - if (!this->extension(i).IsInitialized()) return false; - } - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void FileDescriptorProto::Swap(FileDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(package_, other->package_); - dependency_.Swap(&other->dependency_); - message_type_.Swap(&other->message_type_); - enum_type_.Swap(&other->enum_type_); - service_.Swap(&other->service_); - extension_.Swap(&other->extension_); - std::swap(options_, other->options_); - std::swap(source_code_info_, other->source_code_info_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FileDescriptorProto_descriptor_; - metadata.reflection = FileDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int DescriptorProto_ExtensionRange::kStartFieldNumber; -const int DescriptorProto_ExtensionRange::kEndFieldNumber; -#endif // !_MSC_VER - -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void DescriptorProto_ExtensionRange::InitAsDefaultInstance() { -} - -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void DescriptorProto_ExtensionRange::SharedCtor() { - _cached_size_ = 0; - start_ = 0; - end_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { - SharedDtor(); -} - -void DescriptorProto_ExtensionRange::SharedDtor() { - if (this != default_instance_) { - } -} - -void DescriptorProto_ExtensionRange::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() { - protobuf_AssignDescriptorsOnce(); - return DescriptorProto_ExtensionRange_descriptor_; -} - -const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL; - -DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New() const { - return new DescriptorProto_ExtensionRange; -} - -void DescriptorProto_ExtensionRange::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - start_ = 0; - end_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 start = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &start_))); - set_has_start(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_end; - break; - } - - // optional int32 end = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_end: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &end_))); - set_has_end(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional int32 start = 1; - if (has_start()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); - } - - // optional int32 end = 2; - if (has_end()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional int32 start = 1; - if (has_start()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); - } - - // optional int32 end = 2; - if (has_end()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int DescriptorProto_ExtensionRange::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int32 start = 1; - if (has_start()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->start()); - } - - // optional int32 end = 2; - if (has_end()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->end()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const DescriptorProto_ExtensionRange* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_start()) { - set_start(from.start()); - } - if (from.has_end()) { - set_end(from.end()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool DescriptorProto_ExtensionRange::IsInitialized() const { - - return true; -} - -void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) { - if (other != this) { - std::swap(start_, other->start_); - std::swap(end_, other->end_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_; - metadata.reflection = DescriptorProto_ExtensionRange_reflection_; - return metadata; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int DescriptorProto::kNameFieldNumber; -const int DescriptorProto::kFieldFieldNumber; -const int DescriptorProto::kExtensionFieldNumber; -const int DescriptorProto::kNestedTypeFieldNumber; -const int DescriptorProto::kEnumTypeFieldNumber; -const int DescriptorProto::kExtensionRangeFieldNumber; -const int DescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -DescriptorProto::DescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void DescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance()); -} - -DescriptorProto::DescriptorProto(const DescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void DescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -DescriptorProto::~DescriptorProto() { - SharedDtor(); -} - -void DescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - delete options_; - } -} - -void DescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* DescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return DescriptorProto_descriptor_; -} - -const DescriptorProto& DescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -DescriptorProto* DescriptorProto::default_instance_ = NULL; - -DescriptorProto* DescriptorProto::New() const { - return new DescriptorProto; -} - -void DescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); - } - } - field_.Clear(); - extension_.Clear(); - nested_type_.Clear(); - enum_type_.Clear(); - extension_range_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool DescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_field; - break; - } - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_field: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_field())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_field; - if (input->ExpectTag(26)) goto parse_nested_type; - break; - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_nested_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_nested_type())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_nested_type; - if (input->ExpectTag(34)) goto parse_enum_type; - break; - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_enum_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_enum_type())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_enum_type; - if (input->ExpectTag(42)) goto parse_extension_range; - break; - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_extension_range: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_extension_range())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_extension_range; - if (input->ExpectTag(50)) goto parse_extension; - break; - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_extension: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_extension())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(50)) goto parse_extension; - if (input->ExpectTag(58)) goto parse_options; - break; - } - - // optional .google.protobuf.MessageOptions options = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void DescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (int i = 0; i < this->field_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->field(i), output); - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (int i = 0; i < this->nested_type_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->nested_type(i), output); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (int i = 0; i < this->enum_type_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, this->enum_type(i), output); - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (int i = 0; i < this->extension_range_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, this->extension_range(i), output); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (int i = 0; i < this->extension_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, this->extension(i), output); - } - - // optional .google.protobuf.MessageOptions options = 7; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - for (int i = 0; i < this->field_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->field(i), target); - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - for (int i = 0; i < this->nested_type_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->nested_type(i), target); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - for (int i = 0; i < this->enum_type_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 4, this->enum_type(i), target); - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - for (int i = 0; i < this->extension_range_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 5, this->extension_range(i), target); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - for (int i = 0; i < this->extension_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 6, this->extension(i), target); - } - - // optional .google.protobuf.MessageOptions options = 7; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int DescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional .google.protobuf.MessageOptions options = 7; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - // repeated .google.protobuf.FieldDescriptorProto field = 2; - total_size += 1 * this->field_size(); - for (int i = 0; i < this->field_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->field(i)); - } - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - total_size += 1 * this->extension_size(); - for (int i = 0; i < this->extension_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension(i)); - } - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - total_size += 1 * this->nested_type_size(); - for (int i = 0; i < this->nested_type_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->nested_type(i)); - } - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - total_size += 1 * this->enum_type_size(); - for (int i = 0; i < this->enum_type_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->enum_type(i)); - } - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - total_size += 1 * this->extension_range_size(); - for (int i = 0; i < this->extension_range_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->extension_range(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const DescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void DescriptorProto::MergeFrom(const DescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - field_.MergeFrom(from.field_); - extension_.MergeFrom(from.extension_); - nested_type_.MergeFrom(from.nested_type_); - enum_type_.MergeFrom(from.enum_type_); - extension_range_.MergeFrom(from.extension_range_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void DescriptorProto::CopyFrom(const DescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool DescriptorProto::IsInitialized() const { - - for (int i = 0; i < field_size(); i++) { - if (!this->field(i).IsInitialized()) return false; - } - for (int i = 0; i < extension_size(); i++) { - if (!this->extension(i).IsInitialized()) return false; - } - for (int i = 0; i < nested_type_size(); i++) { - if (!this->nested_type(i).IsInitialized()) return false; - } - for (int i = 0; i < enum_type_size(); i++) { - if (!this->enum_type(i).IsInitialized()) return false; - } - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void DescriptorProto::Swap(DescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - field_.Swap(&other->field_); - extension_.Swap(&other->extension_); - nested_type_.Swap(&other->nested_type_); - enum_type_.Swap(&other->enum_type_); - extension_range_.Swap(&other->extension_range_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata DescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = DescriptorProto_descriptor_; - metadata.reflection = DescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { - protobuf_AssignDescriptorsOnce(); - return FieldDescriptorProto_Type_descriptor_; -} -bool FieldDescriptorProto_Type_IsValid(int value) { - switch(value) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32; -const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64; -const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN; -const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX; -const int FieldDescriptorProto::Type_ARRAYSIZE; -#endif // _MSC_VER -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { - protobuf_AssignDescriptorsOnce(); - return FieldDescriptorProto_Label_descriptor_; -} -bool FieldDescriptorProto_Label_IsValid(int value) { - switch(value) { - case 1: - case 2: - case 3: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL; -const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED; -const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED; -const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN; -const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX; -const int FieldDescriptorProto::Label_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER -const int FieldDescriptorProto::kNameFieldNumber; -const int FieldDescriptorProto::kNumberFieldNumber; -const int FieldDescriptorProto::kLabelFieldNumber; -const int FieldDescriptorProto::kTypeFieldNumber; -const int FieldDescriptorProto::kTypeNameFieldNumber; -const int FieldDescriptorProto::kExtendeeFieldNumber; -const int FieldDescriptorProto::kDefaultValueFieldNumber; -const int FieldDescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -FieldDescriptorProto::FieldDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void FieldDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance()); -} - -FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void FieldDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - number_ = 0; - label_ = 1; - type_ = 1; - type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -FieldDescriptorProto::~FieldDescriptorProto() { - SharedDtor(); -} - -void FieldDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (type_name_ != &::google::protobuf::internal::kEmptyString) { - delete type_name_; - } - if (extendee_ != &::google::protobuf::internal::kEmptyString) { - delete extendee_; - } - if (default_value_ != &::google::protobuf::internal::kEmptyString) { - delete default_value_; - } - if (this != default_instance_) { - delete options_; - } -} - -void FieldDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FieldDescriptorProto_descriptor_; -} - -const FieldDescriptorProto& FieldDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL; - -FieldDescriptorProto* FieldDescriptorProto::New() const { - return new FieldDescriptorProto; -} - -void FieldDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - number_ = 0; - label_ = 1; - type_ = 1; - if (has_type_name()) { - if (type_name_ != &::google::protobuf::internal::kEmptyString) { - type_name_->clear(); - } - } - if (has_extendee()) { - if (extendee_ != &::google::protobuf::internal::kEmptyString) { - extendee_->clear(); - } - } - if (has_default_value()) { - if (default_value_ != &::google::protobuf::internal::kEmptyString) { - default_value_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool FieldDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_extendee; - break; - } - - // optional string extendee = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_extendee: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_extendee())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->extendee().data(), this->extendee().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(24)) goto parse_number; - break; - } - - // optional int32 number = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_number: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - set_has_number(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_label; - break; - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_label: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) { - set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); - } else { - mutable_unknown_fields()->AddVarint(4, value); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(40)) goto parse_type; - break; - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_type: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) { - set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); - } else { - mutable_unknown_fields()->AddVarint(5, value); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(50)) goto parse_type_name; - break; - } - - // optional string type_name = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_type_name: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_type_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->type_name().data(), this->type_name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(58)) goto parse_default_value; - break; - } - - // optional string default_value = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_default_value: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_default_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->default_value().data(), this->default_value().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(66)) goto parse_options; - break; - } - - // optional .google.protobuf.FieldOptions options = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void FieldDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // optional string extendee = 2; - if (has_extendee()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->extendee().data(), this->extendee().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->extendee(), output); - } - - // optional int32 number = 3; - if (has_number()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output); - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (has_label()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 4, this->label(), output); - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (has_type()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 5, this->type(), output); - } - - // optional string type_name = 6; - if (has_type_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->type_name().data(), this->type_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 6, this->type_name(), output); - } - - // optional string default_value = 7; - if (has_default_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->default_value().data(), this->default_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 7, this->default_value(), output); - } - - // optional .google.protobuf.FieldOptions options = 8; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // optional string extendee = 2; - if (has_extendee()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->extendee().data(), this->extendee().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->extendee(), target); - } - - // optional int32 number = 3; - if (has_number()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (has_label()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 4, this->label(), target); - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (has_type()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 5, this->type(), target); - } - - // optional string type_name = 6; - if (has_type_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->type_name().data(), this->type_name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 6, this->type_name(), target); - } - - // optional string default_value = 7; - if (has_default_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->default_value().data(), this->default_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 7, this->default_value(), target); - } - - // optional .google.protobuf.FieldOptions options = 8; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 8, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int FieldDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional int32 number = 3; - if (has_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->number()); - } - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - if (has_label()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->label()); - } - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - if (has_type()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); - } - - // optional string type_name = 6; - if (has_type_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->type_name()); - } - - // optional string extendee = 2; - if (has_extendee()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->extendee()); - } - - // optional string default_value = 7; - if (has_default_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->default_value()); - } - - // optional .google.protobuf.FieldOptions options = 8; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const FieldDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_number()) { - set_number(from.number()); - } - if (from.has_label()) { - set_label(from.label()); - } - if (from.has_type()) { - set_type(from.type()); - } - if (from.has_type_name()) { - set_type_name(from.type_name()); - } - if (from.has_extendee()) { - set_extendee(from.extendee()); - } - if (from.has_default_value()) { - set_default_value(from.default_value()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FieldDescriptorProto::IsInitialized() const { - - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void FieldDescriptorProto::Swap(FieldDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(number_, other->number_); - std::swap(label_, other->label_); - std::swap(type_, other->type_); - std::swap(type_name_, other->type_name_); - std::swap(extendee_, other->extendee_); - std::swap(default_value_, other->default_value_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FieldDescriptorProto_descriptor_; - metadata.reflection = FieldDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int EnumDescriptorProto::kNameFieldNumber; -const int EnumDescriptorProto::kValueFieldNumber; -const int EnumDescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -EnumDescriptorProto::EnumDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void EnumDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance()); -} - -EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void EnumDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -EnumDescriptorProto::~EnumDescriptorProto() { - SharedDtor(); -} - -void EnumDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - delete options_; - } -} - -void EnumDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return EnumDescriptorProto_descriptor_; -} - -const EnumDescriptorProto& EnumDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL; - -EnumDescriptorProto* EnumDescriptorProto::New() const { - return new EnumDescriptorProto; -} - -void EnumDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); - } - } - value_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool EnumDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_value; - break; - } - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_value: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_value())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_value; - if (input->ExpectTag(26)) goto parse_options; - break; - } - - // optional .google.protobuf.EnumOptions options = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void EnumDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (int i = 0; i < this->value_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->value(i), output); - } - - // optional .google.protobuf.EnumOptions options = 3; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - for (int i = 0; i < this->value_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->value(i), target); - } - - // optional .google.protobuf.EnumOptions options = 3; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int EnumDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional .google.protobuf.EnumOptions options = 3; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - total_size += 1 * this->value_size(); - for (int i = 0; i < this->value_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->value(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const EnumDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - value_.MergeFrom(from.value_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EnumDescriptorProto::IsInitialized() const { - - for (int i = 0; i < value_size(); i++) { - if (!this->value(i).IsInitialized()) return false; - } - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void EnumDescriptorProto::Swap(EnumDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - value_.Swap(&other->value_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EnumDescriptorProto_descriptor_; - metadata.reflection = EnumDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int EnumValueDescriptorProto::kNameFieldNumber; -const int EnumValueDescriptorProto::kNumberFieldNumber; -const int EnumValueDescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -EnumValueDescriptorProto::EnumValueDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void EnumValueDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance()); -} - -EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void EnumValueDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - number_ = 0; - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -EnumValueDescriptorProto::~EnumValueDescriptorProto() { - SharedDtor(); -} - -void EnumValueDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - delete options_; - } -} - -void EnumValueDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return EnumValueDescriptorProto_descriptor_; -} - -const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL; - -EnumValueDescriptorProto* EnumValueDescriptorProto::New() const { - return new EnumValueDescriptorProto; -} - -void EnumValueDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - number_ = 0; - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool EnumValueDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_number; - break; - } - - // optional int32 number = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_number: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &number_))); - set_has_number(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_options; - break; - } - - // optional .google.protobuf.EnumValueOptions options = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void EnumValueDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // optional int32 number = 2; - if (has_number()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output); - } - - // optional .google.protobuf.EnumValueOptions options = 3; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // optional int32 number = 2; - if (has_number()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); - } - - // optional .google.protobuf.EnumValueOptions options = 3; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int EnumValueDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional int32 number = 2; - if (has_number()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->number()); - } - - // optional .google.protobuf.EnumValueOptions options = 3; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const EnumValueDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_number()) { - set_number(from.number()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EnumValueDescriptorProto::IsInitialized() const { - - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(number_, other->number_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EnumValueDescriptorProto_descriptor_; - metadata.reflection = EnumValueDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int ServiceDescriptorProto::kNameFieldNumber; -const int ServiceDescriptorProto::kMethodFieldNumber; -const int ServiceDescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -ServiceDescriptorProto::ServiceDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void ServiceDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance()); -} - -ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void ServiceDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ServiceDescriptorProto::~ServiceDescriptorProto() { - SharedDtor(); -} - -void ServiceDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - delete options_; - } -} - -void ServiceDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ServiceDescriptorProto_descriptor_; -} - -const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL; - -ServiceDescriptorProto* ServiceDescriptorProto::New() const { - return new ServiceDescriptorProto; -} - -void ServiceDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); - } - } - method_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool ServiceDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_method; - break; - } - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_method: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_method())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_method; - if (input->ExpectTag(26)) goto parse_options; - break; - } - - // optional .google.protobuf.ServiceOptions options = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void ServiceDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (int i = 0; i < this->method_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->method(i), output); - } - - // optional .google.protobuf.ServiceOptions options = 3; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - for (int i = 0; i < this->method_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->method(i), target); - } - - // optional .google.protobuf.ServiceOptions options = 3; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 3, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int ServiceDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional .google.protobuf.ServiceOptions options = 3; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - // repeated .google.protobuf.MethodDescriptorProto method = 2; - total_size += 1 * this->method_size(); - for (int i = 0; i < this->method_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->method(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const ServiceDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - method_.MergeFrom(from.method_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ServiceDescriptorProto::IsInitialized() const { - - for (int i = 0; i < method_size(); i++) { - if (!this->method(i).IsInitialized()) return false; - } - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - method_.Swap(&other->method_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ServiceDescriptorProto_descriptor_; - metadata.reflection = ServiceDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int MethodDescriptorProto::kNameFieldNumber; -const int MethodDescriptorProto::kInputTypeFieldNumber; -const int MethodDescriptorProto::kOutputTypeFieldNumber; -const int MethodDescriptorProto::kOptionsFieldNumber; -#endif // !_MSC_VER - -MethodDescriptorProto::MethodDescriptorProto() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void MethodDescriptorProto::InitAsDefaultInstance() { - options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance()); -} - -MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void MethodDescriptorProto::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - options_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -MethodDescriptorProto::~MethodDescriptorProto() { - SharedDtor(); -} - -void MethodDescriptorProto::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (input_type_ != &::google::protobuf::internal::kEmptyString) { - delete input_type_; - } - if (output_type_ != &::google::protobuf::internal::kEmptyString) { - delete output_type_; - } - if (this != default_instance_) { - delete options_; - } -} - -void MethodDescriptorProto::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() { - protobuf_AssignDescriptorsOnce(); - return MethodDescriptorProto_descriptor_; -} - -const MethodDescriptorProto& MethodDescriptorProto::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL; - -MethodDescriptorProto* MethodDescriptorProto::New() const { - return new MethodDescriptorProto; -} - -void MethodDescriptorProto::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - if (has_input_type()) { - if (input_type_ != &::google::protobuf::internal::kEmptyString) { - input_type_->clear(); - } - } - if (has_output_type()) { - if (output_type_ != &::google::protobuf::internal::kEmptyString) { - output_type_->clear(); - } - } - if (has_options()) { - if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool MethodDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_input_type; - break; - } - - // optional string input_type = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_input_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_input_type())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->input_type().data(), this->input_type().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_output_type; - break; - } - - // optional string output_type = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_output_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_output_type())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->output_type().data(), this->output_type().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_options; - break; - } - - // optional .google.protobuf.MethodOptions options = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_options: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_options())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void MethodDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // optional string input_type = 2; - if (has_input_type()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->input_type().data(), this->input_type().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->input_type(), output); - } - - // optional string output_type = 3; - if (has_output_type()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->output_type().data(), this->output_type().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->output_type(), output); - } - - // optional .google.protobuf.MethodOptions options = 4; - if (has_options()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, this->options(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // optional string input_type = 2; - if (has_input_type()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->input_type().data(), this->input_type().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->input_type(), target); - } - - // optional string output_type = 3; - if (has_output_type()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->output_type().data(), this->output_type().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->output_type(), target); - } - - // optional .google.protobuf.MethodOptions options = 4; - if (has_options()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 4, this->options(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int MethodDescriptorProto::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // optional string input_type = 2; - if (has_input_type()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->input_type()); - } - - // optional string output_type = 3; - if (has_output_type()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->output_type()); - } - - // optional .google.protobuf.MethodOptions options = 4; - if (has_options()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->options()); - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const MethodDescriptorProto* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_input_type()) { - set_input_type(from.input_type()); - } - if (from.has_output_type()) { - set_output_type(from.output_type()); - } - if (from.has_options()) { - mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MethodDescriptorProto::IsInitialized() const { - - if (has_options()) { - if (!this->options().IsInitialized()) return false; - } - return true; -} - -void MethodDescriptorProto::Swap(MethodDescriptorProto* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(input_type_, other->input_type_); - std::swap(output_type_, other->output_type_); - std::swap(options_, other->options_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = MethodDescriptorProto_descriptor_; - metadata.reflection = MethodDescriptorProto_reflection_; - return metadata; -} - - -// =================================================================== - -const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileOptions_OptimizeMode_descriptor_; -} -bool FileOptions_OptimizeMode_IsValid(int value) { - switch(value) { - case 1: - case 2: - case 3: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const FileOptions_OptimizeMode FileOptions::SPEED; -const FileOptions_OptimizeMode FileOptions::CODE_SIZE; -const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME; -const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN; -const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX; -const int FileOptions::OptimizeMode_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER -const int FileOptions::kJavaPackageFieldNumber; -const int FileOptions::kJavaOuterClassnameFieldNumber; -const int FileOptions::kJavaMultipleFilesFieldNumber; -const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber; -const int FileOptions::kOptimizeForFieldNumber; -const int FileOptions::kCcGenericServicesFieldNumber; -const int FileOptions::kJavaGenericServicesFieldNumber; -const int FileOptions::kPyGenericServicesFieldNumber; -const int FileOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -FileOptions::FileOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void FileOptions::InitAsDefaultInstance() { -} - -FileOptions::FileOptions(const FileOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void FileOptions::SharedCtor() { - _cached_size_ = 0; - java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - java_multiple_files_ = false; - java_generate_equals_and_hash_ = false; - optimize_for_ = 1; - cc_generic_services_ = false; - java_generic_services_ = false; - py_generic_services_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -FileOptions::~FileOptions() { - SharedDtor(); -} - -void FileOptions::SharedDtor() { - if (java_package_ != &::google::protobuf::internal::kEmptyString) { - delete java_package_; - } - if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) { - delete java_outer_classname_; - } - if (this != default_instance_) { - } -} - -void FileOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileOptions_descriptor_; -} - -const FileOptions& FileOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -FileOptions* FileOptions::default_instance_ = NULL; - -FileOptions* FileOptions::New() const { - return new FileOptions; -} - -void FileOptions::Clear() { - _extensions_.Clear(); - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_java_package()) { - if (java_package_ != &::google::protobuf::internal::kEmptyString) { - java_package_->clear(); - } - } - if (has_java_outer_classname()) { - if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) { - java_outer_classname_->clear(); - } - } - java_multiple_files_ = false; - java_generate_equals_and_hash_ = false; - optimize_for_ = 1; - cc_generic_services_ = false; - java_generic_services_ = false; - py_generic_services_ = false; - } - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool FileOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string java_package = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_java_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_package().data(), this->java_package().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(66)) goto parse_java_outer_classname; - break; - } - - // optional string java_outer_classname = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_java_outer_classname: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_java_outer_classname())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_outer_classname().data(), this->java_outer_classname().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(72)) goto parse_optimize_for; - break; - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_optimize_for: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) { - set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); - } else { - mutable_unknown_fields()->AddVarint(9, value); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(80)) goto parse_java_multiple_files; - break; - } - - // optional bool java_multiple_files = 10 [default = false]; - case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_java_multiple_files: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &java_multiple_files_))); - set_has_java_multiple_files(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(128)) goto parse_cc_generic_services; - break; - } - - // optional bool cc_generic_services = 16 [default = false]; - case 16: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_cc_generic_services: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &cc_generic_services_))); - set_has_cc_generic_services(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(136)) goto parse_java_generic_services; - break; - } - - // optional bool java_generic_services = 17 [default = false]; - case 17: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_java_generic_services: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &java_generic_services_))); - set_has_java_generic_services(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(144)) goto parse_py_generic_services; - break; - } - - // optional bool py_generic_services = 18 [default = false]; - case 18: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_py_generic_services: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &py_generic_services_))); - set_has_py_generic_services(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash; - break; - } - - // optional bool java_generate_equals_and_hash = 20 [default = false]; - case 20: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_java_generate_equals_and_hash: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &java_generate_equals_and_hash_))); - set_has_java_generate_equals_and_hash(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void FileOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string java_package = 1; - if (has_java_package()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_package().data(), this->java_package().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->java_package(), output); - } - - // optional string java_outer_classname = 8; - if (has_java_outer_classname()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_outer_classname().data(), this->java_outer_classname().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 8, this->java_outer_classname(), output); - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (has_optimize_for()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 9, this->optimize_for(), output); - } - - // optional bool java_multiple_files = 10 [default = false]; - if (has_java_multiple_files()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); - } - - // optional bool cc_generic_services = 16 [default = false]; - if (has_cc_generic_services()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); - } - - // optional bool java_generic_services = 17 [default = false]; - if (has_java_generic_services()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); - } - - // optional bool py_generic_services = 18 [default = false]; - if (has_py_generic_services()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); - } - - // optional bool java_generate_equals_and_hash = 20 [default = false]; - if (has_java_generate_equals_and_hash()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional string java_package = 1; - if (has_java_package()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_package().data(), this->java_package().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->java_package(), target); - } - - // optional string java_outer_classname = 8; - if (has_java_outer_classname()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->java_outer_classname().data(), this->java_outer_classname().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 8, this->java_outer_classname(), target); - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (has_optimize_for()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 9, this->optimize_for(), target); - } - - // optional bool java_multiple_files = 10 [default = false]; - if (has_java_multiple_files()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); - } - - // optional bool cc_generic_services = 16 [default = false]; - if (has_cc_generic_services()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); - } - - // optional bool java_generic_services = 17 [default = false]; - if (has_java_generic_services()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); - } - - // optional bool py_generic_services = 18 [default = false]; - if (has_py_generic_services()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); - } - - // optional bool java_generate_equals_and_hash = 20 [default = false]; - if (has_java_generate_equals_and_hash()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int FileOptions::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string java_package = 1; - if (has_java_package()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->java_package()); - } - - // optional string java_outer_classname = 8; - if (has_java_outer_classname()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->java_outer_classname()); - } - - // optional bool java_multiple_files = 10 [default = false]; - if (has_java_multiple_files()) { - total_size += 1 + 1; - } - - // optional bool java_generate_equals_and_hash = 20 [default = false]; - if (has_java_generate_equals_and_hash()) { - total_size += 2 + 1; - } - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - if (has_optimize_for()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for()); - } - - // optional bool cc_generic_services = 16 [default = false]; - if (has_cc_generic_services()) { - total_size += 2 + 1; - } - - // optional bool java_generic_services = 17 [default = false]; - if (has_java_generic_services()) { - total_size += 2 + 1; - } - - // optional bool py_generic_services = 18 [default = false]; - if (has_py_generic_services()) { - total_size += 2 + 1; - } - - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FileOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const FileOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void FileOptions::MergeFrom(const FileOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_java_package()) { - set_java_package(from.java_package()); - } - if (from.has_java_outer_classname()) { - set_java_outer_classname(from.java_outer_classname()); - } - if (from.has_java_multiple_files()) { - set_java_multiple_files(from.java_multiple_files()); - } - if (from.has_java_generate_equals_and_hash()) { - set_java_generate_equals_and_hash(from.java_generate_equals_and_hash()); - } - if (from.has_optimize_for()) { - set_optimize_for(from.optimize_for()); - } - if (from.has_cc_generic_services()) { - set_cc_generic_services(from.cc_generic_services()); - } - if (from.has_java_generic_services()) { - set_java_generic_services(from.java_generic_services()); - } - if (from.has_py_generic_services()) { - set_py_generic_services(from.py_generic_services()); - } - } - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void FileOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FileOptions::CopyFrom(const FileOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FileOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void FileOptions::Swap(FileOptions* other) { - if (other != this) { - std::swap(java_package_, other->java_package_); - std::swap(java_outer_classname_, other->java_outer_classname_); - std::swap(java_multiple_files_, other->java_multiple_files_); - std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); - std::swap(optimize_for_, other->optimize_for_); - std::swap(cc_generic_services_, other->cc_generic_services_); - std::swap(java_generic_services_, other->java_generic_services_); - std::swap(py_generic_services_, other->py_generic_services_); - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata FileOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FileOptions_descriptor_; - metadata.reflection = FileOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int MessageOptions::kMessageSetWireFormatFieldNumber; -const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber; -const int MessageOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -MessageOptions::MessageOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void MessageOptions::InitAsDefaultInstance() { -} - -MessageOptions::MessageOptions(const MessageOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void MessageOptions::SharedCtor() { - _cached_size_ = 0; - message_set_wire_format_ = false; - no_standard_descriptor_accessor_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -MessageOptions::~MessageOptions() { - SharedDtor(); -} - -void MessageOptions::SharedDtor() { - if (this != default_instance_) { - } -} - -void MessageOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* MessageOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return MessageOptions_descriptor_; -} - -const MessageOptions& MessageOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -MessageOptions* MessageOptions::default_instance_ = NULL; - -MessageOptions* MessageOptions::New() const { - return new MessageOptions; -} - -void MessageOptions::Clear() { - _extensions_.Clear(); - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - message_set_wire_format_ = false; - no_standard_descriptor_accessor_ = false; - } - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool MessageOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bool message_set_wire_format = 1 [default = false]; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &message_set_wire_format_))); - set_has_message_set_wire_format(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor; - break; - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_no_standard_descriptor_accessor: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &no_standard_descriptor_accessor_))); - set_has_no_standard_descriptor_accessor(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void MessageOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional bool message_set_wire_format = 1 [default = false]; - if (has_message_set_wire_format()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (has_no_standard_descriptor_accessor()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional bool message_set_wire_format = 1 [default = false]; - if (has_message_set_wire_format()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (has_no_standard_descriptor_accessor()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int MessageOptions::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional bool message_set_wire_format = 1 [default = false]; - if (has_message_set_wire_format()) { - total_size += 1 + 1; - } - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - if (has_no_standard_descriptor_accessor()) { - total_size += 1 + 1; - } - - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const MessageOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void MessageOptions::MergeFrom(const MessageOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_message_set_wire_format()) { - set_message_set_wire_format(from.message_set_wire_format()); - } - if (from.has_no_standard_descriptor_accessor()) { - set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor()); - } - } - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void MessageOptions::CopyFrom(const MessageOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MessageOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void MessageOptions::Swap(MessageOptions* other) { - if (other != this) { - std::swap(message_set_wire_format_, other->message_set_wire_format_); - std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata MessageOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = MessageOptions_descriptor_; - metadata.reflection = MessageOptions_reflection_; - return metadata; -} - - -// =================================================================== - -const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() { - protobuf_AssignDescriptorsOnce(); - return FieldOptions_CType_descriptor_; -} -bool FieldOptions_CType_IsValid(int value) { - switch(value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const FieldOptions_CType FieldOptions::STRING; -const FieldOptions_CType FieldOptions::CORD; -const FieldOptions_CType FieldOptions::STRING_PIECE; -const FieldOptions_CType FieldOptions::CType_MIN; -const FieldOptions_CType FieldOptions::CType_MAX; -const int FieldOptions::CType_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER -const int FieldOptions::kCtypeFieldNumber; -const int FieldOptions::kPackedFieldNumber; -const int FieldOptions::kDeprecatedFieldNumber; -const int FieldOptions::kExperimentalMapKeyFieldNumber; -const int FieldOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -FieldOptions::FieldOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void FieldOptions::InitAsDefaultInstance() { -} - -FieldOptions::FieldOptions(const FieldOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void FieldOptions::SharedCtor() { - _cached_size_ = 0; - ctype_ = 0; - packed_ = false; - deprecated_ = false; - experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -FieldOptions::~FieldOptions() { - SharedDtor(); -} - -void FieldOptions::SharedDtor() { - if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) { - delete experimental_map_key_; - } - if (this != default_instance_) { - } -} - -void FieldOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FieldOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FieldOptions_descriptor_; -} - -const FieldOptions& FieldOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -FieldOptions* FieldOptions::default_instance_ = NULL; - -FieldOptions* FieldOptions::New() const { - return new FieldOptions; -} - -void FieldOptions::Clear() { - _extensions_.Clear(); - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - ctype_ = 0; - packed_ = false; - deprecated_ = false; - if (has_experimental_map_key()) { - if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) { - experimental_map_key_->clear(); - } - } - } - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool FieldOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::google::protobuf::FieldOptions_CType_IsValid(value)) { - set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); - } else { - mutable_unknown_fields()->AddVarint(1, value); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_packed; - break; - } - - // optional bool packed = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_packed: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &packed_))); - set_has_packed(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(24)) goto parse_deprecated; - break; - } - - // optional bool deprecated = 3 [default = false]; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_deprecated: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &deprecated_))); - set_has_deprecated(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(74)) goto parse_experimental_map_key; - break; - } - - // optional string experimental_map_key = 9; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_experimental_map_key: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_experimental_map_key())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->experimental_map_key().data(), this->experimental_map_key().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - break; - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void FieldOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (has_ctype()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->ctype(), output); - } - - // optional bool packed = 2; - if (has_packed()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output); - } - - // optional bool deprecated = 3 [default = false]; - if (has_deprecated()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); - } - - // optional string experimental_map_key = 9; - if (has_experimental_map_key()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->experimental_map_key().data(), this->experimental_map_key().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 9, this->experimental_map_key(), output); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (has_ctype()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 1, this->ctype(), target); - } - - // optional bool packed = 2; - if (has_packed()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); - } - - // optional bool deprecated = 3 [default = false]; - if (has_deprecated()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); - } - - // optional string experimental_map_key = 9; - if (has_experimental_map_key()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->experimental_map_key().data(), this->experimental_map_key().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 9, this->experimental_map_key(), target); - } - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int FieldOptions::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - if (has_ctype()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype()); - } - - // optional bool packed = 2; - if (has_packed()) { - total_size += 1 + 1; - } - - // optional bool deprecated = 3 [default = false]; - if (has_deprecated()) { - total_size += 1 + 1; - } - - // optional string experimental_map_key = 9; - if (has_experimental_map_key()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->experimental_map_key()); - } - - } - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const FieldOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void FieldOptions::MergeFrom(const FieldOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_ctype()) { - set_ctype(from.ctype()); - } - if (from.has_packed()) { - set_packed(from.packed()); - } - if (from.has_deprecated()) { - set_deprecated(from.deprecated()); - } - if (from.has_experimental_map_key()) { - set_experimental_map_key(from.experimental_map_key()); - } - } - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FieldOptions::CopyFrom(const FieldOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FieldOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void FieldOptions::Swap(FieldOptions* other) { - if (other != this) { - std::swap(ctype_, other->ctype_); - std::swap(packed_, other->packed_); - std::swap(deprecated_, other->deprecated_); - std::swap(experimental_map_key_, other->experimental_map_key_); - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata FieldOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FieldOptions_descriptor_; - metadata.reflection = FieldOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int EnumOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -EnumOptions::EnumOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void EnumOptions::InitAsDefaultInstance() { -} - -EnumOptions::EnumOptions(const EnumOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void EnumOptions::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -EnumOptions::~EnumOptions() { - SharedDtor(); -} - -void EnumOptions::SharedDtor() { - if (this != default_instance_) { - } -} - -void EnumOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* EnumOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return EnumOptions_descriptor_; -} - -const EnumOptions& EnumOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -EnumOptions* EnumOptions::default_instance_ = NULL; - -EnumOptions* EnumOptions::New() const { - return new EnumOptions; -} - -void EnumOptions::Clear() { - _extensions_.Clear(); - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool EnumOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void EnumOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int EnumOptions::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const EnumOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EnumOptions::MergeFrom(const EnumOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EnumOptions::CopyFrom(const EnumOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EnumOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void EnumOptions::Swap(EnumOptions* other) { - if (other != this) { - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata EnumOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EnumOptions_descriptor_; - metadata.reflection = EnumOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int EnumValueOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -EnumValueOptions::EnumValueOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void EnumValueOptions::InitAsDefaultInstance() { -} - -EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void EnumValueOptions::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -EnumValueOptions::~EnumValueOptions() { - SharedDtor(); -} - -void EnumValueOptions::SharedDtor() { - if (this != default_instance_) { - } -} - -void EnumValueOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return EnumValueOptions_descriptor_; -} - -const EnumValueOptions& EnumValueOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -EnumValueOptions* EnumValueOptions::default_instance_ = NULL; - -EnumValueOptions* EnumValueOptions::New() const { - return new EnumValueOptions; -} - -void EnumValueOptions::Clear() { - _extensions_.Clear(); - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool EnumValueOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void EnumValueOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int EnumValueOptions::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const EnumValueOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EnumValueOptions::CopyFrom(const EnumValueOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EnumValueOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void EnumValueOptions::Swap(EnumValueOptions* other) { - if (other != this) { - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata EnumValueOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EnumValueOptions_descriptor_; - metadata.reflection = EnumValueOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int ServiceOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -ServiceOptions::ServiceOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void ServiceOptions::InitAsDefaultInstance() { -} - -ServiceOptions::ServiceOptions(const ServiceOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void ServiceOptions::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ServiceOptions::~ServiceOptions() { - SharedDtor(); -} - -void ServiceOptions::SharedDtor() { - if (this != default_instance_) { - } -} - -void ServiceOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ServiceOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ServiceOptions_descriptor_; -} - -const ServiceOptions& ServiceOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -ServiceOptions* ServiceOptions::default_instance_ = NULL; - -ServiceOptions* ServiceOptions::New() const { - return new ServiceOptions; -} - -void ServiceOptions::Clear() { - _extensions_.Clear(); - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool ServiceOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void ServiceOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int ServiceOptions::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const ServiceOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void ServiceOptions::MergeFrom(const ServiceOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ServiceOptions::CopyFrom(const ServiceOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ServiceOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void ServiceOptions::Swap(ServiceOptions* other) { - if (other != this) { - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata ServiceOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ServiceOptions_descriptor_; - metadata.reflection = ServiceOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int MethodOptions::kUninterpretedOptionFieldNumber; -#endif // !_MSC_VER - -MethodOptions::MethodOptions() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void MethodOptions::InitAsDefaultInstance() { -} - -MethodOptions::MethodOptions(const MethodOptions& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void MethodOptions::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -MethodOptions::~MethodOptions() { - SharedDtor(); -} - -void MethodOptions::SharedDtor() { - if (this != default_instance_) { - } -} - -void MethodOptions::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* MethodOptions::descriptor() { - protobuf_AssignDescriptorsOnce(); - return MethodOptions_descriptor_; -} - -const MethodOptions& MethodOptions::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -MethodOptions* MethodOptions::default_instance_ = NULL; - -MethodOptions* MethodOptions::New() const { - return new MethodOptions; -} - -void MethodOptions::Clear() { - _extensions_.Clear(); - uninterpreted_option_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool MethodOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - case 999: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_uninterpreted_option: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_uninterpreted_option())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(7994)) goto parse_uninterpreted_option; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - if ((8000u <= tag)) { - DO_(_extensions_.ParseField(tag, input, default_instance_, - mutable_unknown_fields())); - continue; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void MethodOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 999, this->uninterpreted_option(i), output); - } - - // Extension range [1000, 536870912) - _extensions_.SerializeWithCachedSizes( - 1000, 536870912, output); - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 999, this->uninterpreted_option(i), target); - } - - // Extension range [1000, 536870912) - target = _extensions_.SerializeWithCachedSizesToArray( - 1000, 536870912, target); - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int MethodOptions::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - total_size += 2 * this->uninterpreted_option_size(); - for (int i = 0; i < this->uninterpreted_option_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->uninterpreted_option(i)); - } - - total_size += _extensions_.ByteSize(); - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const MethodOptions* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void MethodOptions::MergeFrom(const MethodOptions& from) { - GOOGLE_CHECK_NE(&from, this); - uninterpreted_option_.MergeFrom(from.uninterpreted_option_); - _extensions_.MergeFrom(from._extensions_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void MethodOptions::CopyFrom(const MethodOptions& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MethodOptions::IsInitialized() const { - - for (int i = 0; i < uninterpreted_option_size(); i++) { - if (!this->uninterpreted_option(i).IsInitialized()) return false; - } - - if (!_extensions_.IsInitialized()) return false; return true; -} - -void MethodOptions::Swap(MethodOptions* other) { - if (other != this) { - uninterpreted_option_.Swap(&other->uninterpreted_option_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - _extensions_.Swap(&other->_extensions_); - } -} - -::google::protobuf::Metadata MethodOptions::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = MethodOptions_descriptor_; - metadata.reflection = MethodOptions_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int UninterpretedOption_NamePart::kNamePartFieldNumber; -const int UninterpretedOption_NamePart::kIsExtensionFieldNumber; -#endif // !_MSC_VER - -UninterpretedOption_NamePart::UninterpretedOption_NamePart() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void UninterpretedOption_NamePart::InitAsDefaultInstance() { -} - -UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void UninterpretedOption_NamePart::SharedCtor() { - _cached_size_ = 0; - name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - is_extension_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { - SharedDtor(); -} - -void UninterpretedOption_NamePart::SharedDtor() { - if (name_part_ != &::google::protobuf::internal::kEmptyString) { - delete name_part_; - } - if (this != default_instance_) { - } -} - -void UninterpretedOption_NamePart::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() { - protobuf_AssignDescriptorsOnce(); - return UninterpretedOption_NamePart_descriptor_; -} - -const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL; - -UninterpretedOption_NamePart* UninterpretedOption_NamePart::New() const { - return new UninterpretedOption_NamePart; -} - -void UninterpretedOption_NamePart::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name_part()) { - if (name_part_ != &::google::protobuf::internal::kEmptyString) { - name_part_->clear(); - } - } - is_extension_ = false; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool UninterpretedOption_NamePart::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name_part = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name_part())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name_part().data(), this->name_part().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_is_extension; - break; - } - - // required bool is_extension = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_is_extension: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &is_extension_))); - set_has_is_extension(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void UninterpretedOption_NamePart::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required string name_part = 1; - if (has_name_part()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name_part().data(), this->name_part().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name_part(), output); - } - - // required bool is_extension = 2; - if (has_is_extension()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // required string name_part = 1; - if (has_name_part()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->name_part().data(), this->name_part().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name_part(), target); - } - - // required bool is_extension = 2; - if (has_is_extension()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int UninterpretedOption_NamePart::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string name_part = 1; - if (has_name_part()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name_part()); - } - - // required bool is_extension = 2; - if (has_is_extension()) { - total_size += 1 + 1; - } - - } - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const UninterpretedOption_NamePart* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name_part()) { - set_name_part(from.name_part()); - } - if (from.has_is_extension()) { - set_is_extension(from.is_extension()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool UninterpretedOption_NamePart::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - - return true; -} - -void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) { - if (other != this) { - std::swap(name_part_, other->name_part_); - std::swap(is_extension_, other->is_extension_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = UninterpretedOption_NamePart_descriptor_; - metadata.reflection = UninterpretedOption_NamePart_reflection_; - return metadata; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int UninterpretedOption::kNameFieldNumber; -const int UninterpretedOption::kIdentifierValueFieldNumber; -const int UninterpretedOption::kPositiveIntValueFieldNumber; -const int UninterpretedOption::kNegativeIntValueFieldNumber; -const int UninterpretedOption::kDoubleValueFieldNumber; -const int UninterpretedOption::kStringValueFieldNumber; -const int UninterpretedOption::kAggregateValueFieldNumber; -#endif // !_MSC_VER - -UninterpretedOption::UninterpretedOption() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void UninterpretedOption::InitAsDefaultInstance() { -} - -UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void UninterpretedOption::SharedCtor() { - _cached_size_ = 0; - identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - positive_int_value_ = GOOGLE_ULONGLONG(0); - negative_int_value_ = GOOGLE_LONGLONG(0); - double_value_ = 0; - string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -UninterpretedOption::~UninterpretedOption() { - SharedDtor(); -} - -void UninterpretedOption::SharedDtor() { - if (identifier_value_ != &::google::protobuf::internal::kEmptyString) { - delete identifier_value_; - } - if (string_value_ != &::google::protobuf::internal::kEmptyString) { - delete string_value_; - } - if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) { - delete aggregate_value_; - } - if (this != default_instance_) { - } -} - -void UninterpretedOption::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() { - protobuf_AssignDescriptorsOnce(); - return UninterpretedOption_descriptor_; -} - -const UninterpretedOption& UninterpretedOption::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -UninterpretedOption* UninterpretedOption::default_instance_ = NULL; - -UninterpretedOption* UninterpretedOption::New() const { - return new UninterpretedOption; -} - -void UninterpretedOption::Clear() { - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (has_identifier_value()) { - if (identifier_value_ != &::google::protobuf::internal::kEmptyString) { - identifier_value_->clear(); - } - } - positive_int_value_ = GOOGLE_ULONGLONG(0); - negative_int_value_ = GOOGLE_LONGLONG(0); - double_value_ = 0; - if (has_string_value()) { - if (string_value_ != &::google::protobuf::internal::kEmptyString) { - string_value_->clear(); - } - } - if (has_aggregate_value()) { - if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) { - aggregate_value_->clear(); - } - } - } - name_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool UninterpretedOption::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_name: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_name())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_name; - if (input->ExpectTag(26)) goto parse_identifier_value; - break; - } - - // optional string identifier_value = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_identifier_value: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_identifier_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->identifier_value().data(), this->identifier_value().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_positive_int_value; - break; - } - - // optional uint64 positive_int_value = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_positive_int_value: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( - input, &positive_int_value_))); - set_has_positive_int_value(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(40)) goto parse_negative_int_value; - break; - } - - // optional int64 negative_int_value = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_negative_int_value: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, &negative_int_value_))); - set_has_negative_int_value(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(49)) goto parse_double_value; - break; - } - - // optional double double_value = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_double_value: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - input, &double_value_))); - set_has_double_value(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(58)) goto parse_string_value; - break; - } - - // optional bytes string_value = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_string_value: - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_string_value())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(66)) goto parse_aggregate_value; - break; - } - - // optional string aggregate_value = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_aggregate_value: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_aggregate_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->aggregate_value().data(), this->aggregate_value().length(), - ::google::protobuf::internal::WireFormat::PARSE); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void UninterpretedOption::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (int i = 0; i < this->name_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->name(i), output); - } - - // optional string identifier_value = 3; - if (has_identifier_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->identifier_value().data(), this->identifier_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->identifier_value(), output); - } - - // optional uint64 positive_int_value = 4; - if (has_positive_int_value()) { - ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); - } - - // optional int64 negative_int_value = 5; - if (has_negative_int_value()) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); - } - - // optional double double_value = 6; - if (has_double_value()) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); - } - - // optional bytes string_value = 7; - if (has_string_value()) { - ::google::protobuf::internal::WireFormatLite::WriteBytes( - 7, this->string_value(), output); - } - - // optional string aggregate_value = 8; - if (has_aggregate_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->aggregate_value().data(), this->aggregate_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - ::google::protobuf::internal::WireFormatLite::WriteString( - 8, this->aggregate_value(), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - for (int i = 0; i < this->name_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, this->name(i), target); - } - - // optional string identifier_value = 3; - if (has_identifier_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->identifier_value().data(), this->identifier_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->identifier_value(), target); - } - - // optional uint64 positive_int_value = 4; - if (has_positive_int_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target); - } - - // optional int64 negative_int_value = 5; - if (has_negative_int_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target); - } - - // optional double double_value = 6; - if (has_double_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); - } - - // optional bytes string_value = 7; - if (has_string_value()) { - target = - ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( - 7, this->string_value(), target); - } - - // optional string aggregate_value = 8; - if (has_aggregate_value()) { - ::google::protobuf::internal::WireFormat::VerifyUTF8String( - this->aggregate_value().data(), this->aggregate_value().length(), - ::google::protobuf::internal::WireFormat::SERIALIZE); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 8, this->aggregate_value(), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int UninterpretedOption::ByteSize() const { - int total_size = 0; - - if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { - // optional string identifier_value = 3; - if (has_identifier_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->identifier_value()); - } - - // optional uint64 positive_int_value = 4; - if (has_positive_int_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt64Size( - this->positive_int_value()); - } - - // optional int64 negative_int_value = 5; - if (has_negative_int_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->negative_int_value()); - } - - // optional double double_value = 6; - if (has_double_value()) { - total_size += 1 + 8; - } - - // optional bytes string_value = 7; - if (has_string_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( - this->string_value()); - } - - // optional string aggregate_value = 8; - if (has_aggregate_value()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->aggregate_value()); - } - - } - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - total_size += 1 * this->name_size(); - for (int i = 0; i < this->name_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->name(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const UninterpretedOption* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { - GOOGLE_CHECK_NE(&from, this); - name_.MergeFrom(from.name_); - if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { - if (from.has_identifier_value()) { - set_identifier_value(from.identifier_value()); - } - if (from.has_positive_int_value()) { - set_positive_int_value(from.positive_int_value()); - } - if (from.has_negative_int_value()) { - set_negative_int_value(from.negative_int_value()); - } - if (from.has_double_value()) { - set_double_value(from.double_value()); - } - if (from.has_string_value()) { - set_string_value(from.string_value()); - } - if (from.has_aggregate_value()) { - set_aggregate_value(from.aggregate_value()); - } - } - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void UninterpretedOption::CopyFrom(const UninterpretedOption& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool UninterpretedOption::IsInitialized() const { - - for (int i = 0; i < name_size(); i++) { - if (!this->name(i).IsInitialized()) return false; - } - return true; -} - -void UninterpretedOption::Swap(UninterpretedOption* other) { - if (other != this) { - name_.Swap(&other->name_); - std::swap(identifier_value_, other->identifier_value_); - std::swap(positive_int_value_, other->positive_int_value_); - std::swap(negative_int_value_, other->negative_int_value_); - std::swap(double_value_, other->double_value_); - std::swap(string_value_, other->string_value_); - std::swap(aggregate_value_, other->aggregate_value_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata UninterpretedOption::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = UninterpretedOption_descriptor_; - metadata.reflection = UninterpretedOption_reflection_; - return metadata; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int SourceCodeInfo_Location::kPathFieldNumber; -const int SourceCodeInfo_Location::kSpanFieldNumber; -#endif // !_MSC_VER - -SourceCodeInfo_Location::SourceCodeInfo_Location() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void SourceCodeInfo_Location::InitAsDefaultInstance() { -} - -SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void SourceCodeInfo_Location::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -SourceCodeInfo_Location::~SourceCodeInfo_Location() { - SharedDtor(); -} - -void SourceCodeInfo_Location::SharedDtor() { - if (this != default_instance_) { - } -} - -void SourceCodeInfo_Location::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() { - protobuf_AssignDescriptorsOnce(); - return SourceCodeInfo_Location_descriptor_; -} - -const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL; - -SourceCodeInfo_Location* SourceCodeInfo_Location::New() const { - return new SourceCodeInfo_Location; -} - -void SourceCodeInfo_Location::Clear() { - path_.Clear(); - span_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool SourceCodeInfo_Location::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated int32 path = 1 [packed = true]; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_path()))); - } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) - == ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 10, input, this->mutable_path()))); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_span; - break; - } - - // repeated int32 span = 2 [packed = true]; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_span: - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_span()))); - } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) - == ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 18, input, this->mutable_span()))); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void SourceCodeInfo_Location::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_path_cached_byte_size_); - } - for (int i = 0; i < this->path_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->path(i), output); - } - - // repeated int32 span = 2 [packed = true]; - if (this->span_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_span_cached_byte_size_); - } - for (int i = 0; i < this->span_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->span(i), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated int32 path = 1 [packed = true]; - if (this->path_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _path_cached_byte_size_, target); - } - for (int i = 0; i < this->path_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->path(i), target); - } - - // repeated int32 span = 2 [packed = true]; - if (this->span_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 2, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _span_cached_byte_size_, target); - } - for (int i = 0; i < this->span_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->span(i), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int SourceCodeInfo_Location::ByteSize() const { - int total_size = 0; - - // repeated int32 path = 1 [packed = true]; - { - int data_size = 0; - for (int i = 0; i < this->path_size(); i++) { - data_size += ::google::protobuf::internal::WireFormatLite:: - Int32Size(this->path(i)); - } - if (data_size > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); - } - _path_cached_byte_size_ = data_size; - total_size += data_size; - } - - // repeated int32 span = 2 [packed = true]; - { - int data_size = 0; - for (int i = 0; i < this->span_size(); i++) { - data_size += ::google::protobuf::internal::WireFormatLite:: - Int32Size(this->span(i)); - } - if (data_size > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); - } - _span_cached_byte_size_ = data_size; - total_size += data_size; - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const SourceCodeInfo_Location* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { - GOOGLE_CHECK_NE(&from, this); - path_.MergeFrom(from.path_); - span_.MergeFrom(from.span_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SourceCodeInfo_Location::IsInitialized() const { - - return true; -} - -void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) { - if (other != this) { - path_.Swap(&other->path_); - span_.Swap(&other->span_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SourceCodeInfo_Location_descriptor_; - metadata.reflection = SourceCodeInfo_Location_reflection_; - return metadata; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int SourceCodeInfo::kLocationFieldNumber; -#endif // !_MSC_VER - -SourceCodeInfo::SourceCodeInfo() - : ::google::protobuf::Message() { - SharedCtor(); -} - -void SourceCodeInfo::InitAsDefaultInstance() { -} - -SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) - : ::google::protobuf::Message() { - SharedCtor(); - MergeFrom(from); -} - -void SourceCodeInfo::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -SourceCodeInfo::~SourceCodeInfo() { - SharedDtor(); -} - -void SourceCodeInfo::SharedDtor() { - if (this != default_instance_) { - } -} - -void SourceCodeInfo::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() { - protobuf_AssignDescriptorsOnce(); - return SourceCodeInfo_descriptor_; -} - -const SourceCodeInfo& SourceCodeInfo::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); return *default_instance_; -} - -SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL; - -SourceCodeInfo* SourceCodeInfo::New() const { - return new SourceCodeInfo; -} - -void SourceCodeInfo::Clear() { - location_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); - mutable_unknown_fields()->Clear(); -} - -bool SourceCodeInfo::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_location: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_location())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(10)) goto parse_location; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, mutable_unknown_fields())); - break; - } - } - } - return true; -#undef DO_ -} - -void SourceCodeInfo::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (int i = 0; i < this->location_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->location(i), output); - } - - if (!unknown_fields().empty()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - unknown_fields(), output); - } -} - -::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - for (int i = 0; i < this->location_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->location(i), target); - } - - if (!unknown_fields().empty()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - unknown_fields(), target); - } - return target; -} - -int SourceCodeInfo::ByteSize() const { - int total_size = 0; - - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - total_size += 1 * this->location_size(); - for (int i = 0; i < this->location_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->location(i)); - } - - if (!unknown_fields().empty()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - unknown_fields()); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { - GOOGLE_CHECK_NE(&from, this); - const SourceCodeInfo* source = - ::google::protobuf::internal::dynamic_cast_if_available( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) { - GOOGLE_CHECK_NE(&from, this); - location_.MergeFrom(from.location_); - mutable_unknown_fields()->MergeFrom(from.unknown_fields()); -} - -void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SourceCodeInfo::IsInitialized() const { - - return true; -} - -void SourceCodeInfo::Swap(SourceCodeInfo* other) { - if (other != this) { - location_.Swap(&other->location_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - _unknown_fields_.Swap(&other->_unknown_fields_); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SourceCodeInfo_descriptor_; - metadata.reflection = SourceCodeInfo_reflection_; - return metadata; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protobuf -} // namespace google - -// @@protoc_insertion_point(global_scope) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.h deleted file mode 100644 index 95febb81..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.pb.h +++ /dev/null @@ -1,5223 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/descriptor.proto - -#ifndef PROTOBUF_google_2fprotobuf_2fdescriptor_2eproto__INCLUDED -#define PROTOBUF_google_2fprotobuf_2fdescriptor_2eproto__INCLUDED - -#include - -#include - -#if GOOGLE_PROTOBUF_VERSION < 2004000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace google { -namespace protobuf { - -// Internal implementation detail -- do not call these. -void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); -void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); -void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - -class FileDescriptorSet; -class FileDescriptorProto; -class DescriptorProto; -class DescriptorProto_ExtensionRange; -class FieldDescriptorProto; -class EnumDescriptorProto; -class EnumValueDescriptorProto; -class ServiceDescriptorProto; -class MethodDescriptorProto; -class FileOptions; -class MessageOptions; -class FieldOptions; -class EnumOptions; -class EnumValueOptions; -class ServiceOptions; -class MethodOptions; -class UninterpretedOption; -class UninterpretedOption_NamePart; -class SourceCodeInfo; -class SourceCodeInfo_Location; - -enum FieldDescriptorProto_Type { - FieldDescriptorProto_Type_TYPE_DOUBLE = 1, - FieldDescriptorProto_Type_TYPE_FLOAT = 2, - FieldDescriptorProto_Type_TYPE_INT64 = 3, - FieldDescriptorProto_Type_TYPE_UINT64 = 4, - FieldDescriptorProto_Type_TYPE_INT32 = 5, - FieldDescriptorProto_Type_TYPE_FIXED64 = 6, - FieldDescriptorProto_Type_TYPE_FIXED32 = 7, - FieldDescriptorProto_Type_TYPE_BOOL = 8, - FieldDescriptorProto_Type_TYPE_STRING = 9, - FieldDescriptorProto_Type_TYPE_GROUP = 10, - FieldDescriptorProto_Type_TYPE_MESSAGE = 11, - FieldDescriptorProto_Type_TYPE_BYTES = 12, - FieldDescriptorProto_Type_TYPE_UINT32 = 13, - FieldDescriptorProto_Type_TYPE_ENUM = 14, - FieldDescriptorProto_Type_TYPE_SFIXED32 = 15, - FieldDescriptorProto_Type_TYPE_SFIXED64 = 16, - FieldDescriptorProto_Type_TYPE_SINT32 = 17, - FieldDescriptorProto_Type_TYPE_SINT64 = 18 -}; -LIBPROTOBUF_EXPORT bool FieldDescriptorProto_Type_IsValid(int value); -const FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MIN = FieldDescriptorProto_Type_TYPE_DOUBLE; -const FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MAX = FieldDescriptorProto_Type_TYPE_SINT64; -const int FieldDescriptorProto_Type_Type_ARRAYSIZE = FieldDescriptorProto_Type_Type_MAX + 1; - -LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor(); -inline const ::std::string& FieldDescriptorProto_Type_Name(FieldDescriptorProto_Type value) { - return ::google::protobuf::internal::NameOfEnum( - FieldDescriptorProto_Type_descriptor(), value); -} -inline bool FieldDescriptorProto_Type_Parse( - const ::std::string& name, FieldDescriptorProto_Type* value) { - return ::google::protobuf::internal::ParseNamedEnum( - FieldDescriptorProto_Type_descriptor(), name, value); -} -enum FieldDescriptorProto_Label { - FieldDescriptorProto_Label_LABEL_OPTIONAL = 1, - FieldDescriptorProto_Label_LABEL_REQUIRED = 2, - FieldDescriptorProto_Label_LABEL_REPEATED = 3 -}; -LIBPROTOBUF_EXPORT bool FieldDescriptorProto_Label_IsValid(int value); -const FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MIN = FieldDescriptorProto_Label_LABEL_OPTIONAL; -const FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MAX = FieldDescriptorProto_Label_LABEL_REPEATED; -const int FieldDescriptorProto_Label_Label_ARRAYSIZE = FieldDescriptorProto_Label_Label_MAX + 1; - -LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor(); -inline const ::std::string& FieldDescriptorProto_Label_Name(FieldDescriptorProto_Label value) { - return ::google::protobuf::internal::NameOfEnum( - FieldDescriptorProto_Label_descriptor(), value); -} -inline bool FieldDescriptorProto_Label_Parse( - const ::std::string& name, FieldDescriptorProto_Label* value) { - return ::google::protobuf::internal::ParseNamedEnum( - FieldDescriptorProto_Label_descriptor(), name, value); -} -enum FileOptions_OptimizeMode { - FileOptions_OptimizeMode_SPEED = 1, - FileOptions_OptimizeMode_CODE_SIZE = 2, - FileOptions_OptimizeMode_LITE_RUNTIME = 3 -}; -LIBPROTOBUF_EXPORT bool FileOptions_OptimizeMode_IsValid(int value); -const FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MIN = FileOptions_OptimizeMode_SPEED; -const FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MAX = FileOptions_OptimizeMode_LITE_RUNTIME; -const int FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE = FileOptions_OptimizeMode_OptimizeMode_MAX + 1; - -LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor(); -inline const ::std::string& FileOptions_OptimizeMode_Name(FileOptions_OptimizeMode value) { - return ::google::protobuf::internal::NameOfEnum( - FileOptions_OptimizeMode_descriptor(), value); -} -inline bool FileOptions_OptimizeMode_Parse( - const ::std::string& name, FileOptions_OptimizeMode* value) { - return ::google::protobuf::internal::ParseNamedEnum( - FileOptions_OptimizeMode_descriptor(), name, value); -} -enum FieldOptions_CType { - FieldOptions_CType_STRING = 0, - FieldOptions_CType_CORD = 1, - FieldOptions_CType_STRING_PIECE = 2 -}; -LIBPROTOBUF_EXPORT bool FieldOptions_CType_IsValid(int value); -const FieldOptions_CType FieldOptions_CType_CType_MIN = FieldOptions_CType_STRING; -const FieldOptions_CType FieldOptions_CType_CType_MAX = FieldOptions_CType_STRING_PIECE; -const int FieldOptions_CType_CType_ARRAYSIZE = FieldOptions_CType_CType_MAX + 1; - -LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor(); -inline const ::std::string& FieldOptions_CType_Name(FieldOptions_CType value) { - return ::google::protobuf::internal::NameOfEnum( - FieldOptions_CType_descriptor(), value); -} -inline bool FieldOptions_CType_Parse( - const ::std::string& name, FieldOptions_CType* value) { - return ::google::protobuf::internal::ParseNamedEnum( - FieldOptions_CType_descriptor(), name, value); -} -// =================================================================== - -class LIBPROTOBUF_EXPORT FileDescriptorSet : public ::google::protobuf::Message { - public: - FileDescriptorSet(); - virtual ~FileDescriptorSet(); - - FileDescriptorSet(const FileDescriptorSet& from); - - inline FileDescriptorSet& operator=(const FileDescriptorSet& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FileDescriptorSet& default_instance(); - - void Swap(FileDescriptorSet* other); - - // implements Message ---------------------------------------------- - - FileDescriptorSet* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileDescriptorSet& from); - void MergeFrom(const FileDescriptorSet& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.FileDescriptorProto file = 1; - inline int file_size() const; - inline void clear_file(); - static const int kFileFieldNumber = 1; - inline const ::google::protobuf::FileDescriptorProto& file(int index) const; - inline ::google::protobuf::FileDescriptorProto* mutable_file(int index); - inline ::google::protobuf::FileDescriptorProto* add_file(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& - file() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* - mutable_file(); - - // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet) - private: - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static FileDescriptorSet* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Message { - public: - FileDescriptorProto(); - virtual ~FileDescriptorProto(); - - FileDescriptorProto(const FileDescriptorProto& from); - - inline FileDescriptorProto& operator=(const FileDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FileDescriptorProto& default_instance(); - - void Swap(FileDescriptorProto* other); - - // implements Message ---------------------------------------------- - - FileDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileDescriptorProto& from); - void MergeFrom(const FileDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // optional string package = 2; - inline bool has_package() const; - inline void clear_package(); - static const int kPackageFieldNumber = 2; - inline const ::std::string& package() const; - inline void set_package(const ::std::string& value); - inline void set_package(const char* value); - inline void set_package(const char* value, size_t size); - inline ::std::string* mutable_package(); - inline ::std::string* release_package(); - - // repeated string dependency = 3; - inline int dependency_size() const; - inline void clear_dependency(); - static const int kDependencyFieldNumber = 3; - inline const ::std::string& dependency(int index) const; - inline ::std::string* mutable_dependency(int index); - inline void set_dependency(int index, const ::std::string& value); - inline void set_dependency(int index, const char* value); - inline void set_dependency(int index, const char* value, size_t size); - inline ::std::string* add_dependency(); - inline void add_dependency(const ::std::string& value); - inline void add_dependency(const char* value); - inline void add_dependency(const char* value, size_t size); - inline const ::google::protobuf::RepeatedPtrField< ::std::string>& dependency() const; - inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_dependency(); - - // repeated .google.protobuf.DescriptorProto message_type = 4; - inline int message_type_size() const; - inline void clear_message_type(); - static const int kMessageTypeFieldNumber = 4; - inline const ::google::protobuf::DescriptorProto& message_type(int index) const; - inline ::google::protobuf::DescriptorProto* mutable_message_type(int index); - inline ::google::protobuf::DescriptorProto* add_message_type(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& - message_type() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* - mutable_message_type(); - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - inline int enum_type_size() const; - inline void clear_enum_type(); - static const int kEnumTypeFieldNumber = 5; - inline const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const; - inline ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index); - inline ::google::protobuf::EnumDescriptorProto* add_enum_type(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& - enum_type() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* - mutable_enum_type(); - - // repeated .google.protobuf.ServiceDescriptorProto service = 6; - inline int service_size() const; - inline void clear_service(); - static const int kServiceFieldNumber = 6; - inline const ::google::protobuf::ServiceDescriptorProto& service(int index) const; - inline ::google::protobuf::ServiceDescriptorProto* mutable_service(int index); - inline ::google::protobuf::ServiceDescriptorProto* add_service(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& - service() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* - mutable_service(); - - // repeated .google.protobuf.FieldDescriptorProto extension = 7; - inline int extension_size() const; - inline void clear_extension(); - static const int kExtensionFieldNumber = 7; - inline const ::google::protobuf::FieldDescriptorProto& extension(int index) const; - inline ::google::protobuf::FieldDescriptorProto* mutable_extension(int index); - inline ::google::protobuf::FieldDescriptorProto* add_extension(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& - extension() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* - mutable_extension(); - - // optional .google.protobuf.FileOptions options = 8; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 8; - inline const ::google::protobuf::FileOptions& options() const; - inline ::google::protobuf::FileOptions* mutable_options(); - inline ::google::protobuf::FileOptions* release_options(); - - // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - inline bool has_source_code_info() const; - inline void clear_source_code_info(); - static const int kSourceCodeInfoFieldNumber = 9; - inline const ::google::protobuf::SourceCodeInfo& source_code_info() const; - inline ::google::protobuf::SourceCodeInfo* mutable_source_code_info(); - inline ::google::protobuf::SourceCodeInfo* release_source_code_info(); - - // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_package(); - inline void clear_has_package(); - inline void set_has_options(); - inline void clear_has_options(); - inline void set_has_source_code_info(); - inline void clear_has_source_code_info(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::std::string* package_; - ::google::protobuf::RepeatedPtrField< ::std::string> dependency_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > message_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto > enum_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto > service_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; - ::google::protobuf::FileOptions* options_; - ::google::protobuf::SourceCodeInfo* source_code_info_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static FileDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT DescriptorProto_ExtensionRange : public ::google::protobuf::Message { - public: - DescriptorProto_ExtensionRange(); - virtual ~DescriptorProto_ExtensionRange(); - - DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from); - - inline DescriptorProto_ExtensionRange& operator=(const DescriptorProto_ExtensionRange& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const DescriptorProto_ExtensionRange& default_instance(); - - void Swap(DescriptorProto_ExtensionRange* other); - - // implements Message ---------------------------------------------- - - DescriptorProto_ExtensionRange* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const DescriptorProto_ExtensionRange& from); - void MergeFrom(const DescriptorProto_ExtensionRange& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional int32 start = 1; - inline bool has_start() const; - inline void clear_start(); - static const int kStartFieldNumber = 1; - inline ::google::protobuf::int32 start() const; - inline void set_start(::google::protobuf::int32 value); - - // optional int32 end = 2; - inline bool has_end() const; - inline void clear_end(); - static const int kEndFieldNumber = 2; - inline ::google::protobuf::int32 end() const; - inline void set_end(::google::protobuf::int32 value); - - // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange) - private: - inline void set_has_start(); - inline void clear_has_start(); - inline void set_has_end(); - inline void clear_has_end(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::int32 start_; - ::google::protobuf::int32 end_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static DescriptorProto_ExtensionRange* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message { - public: - DescriptorProto(); - virtual ~DescriptorProto(); - - DescriptorProto(const DescriptorProto& from); - - inline DescriptorProto& operator=(const DescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const DescriptorProto& default_instance(); - - void Swap(DescriptorProto* other); - - // implements Message ---------------------------------------------- - - DescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const DescriptorProto& from); - void MergeFrom(const DescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef DescriptorProto_ExtensionRange ExtensionRange; - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // repeated .google.protobuf.FieldDescriptorProto field = 2; - inline int field_size() const; - inline void clear_field(); - static const int kFieldFieldNumber = 2; - inline const ::google::protobuf::FieldDescriptorProto& field(int index) const; - inline ::google::protobuf::FieldDescriptorProto* mutable_field(int index); - inline ::google::protobuf::FieldDescriptorProto* add_field(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& - field() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* - mutable_field(); - - // repeated .google.protobuf.FieldDescriptorProto extension = 6; - inline int extension_size() const; - inline void clear_extension(); - static const int kExtensionFieldNumber = 6; - inline const ::google::protobuf::FieldDescriptorProto& extension(int index) const; - inline ::google::protobuf::FieldDescriptorProto* mutable_extension(int index); - inline ::google::protobuf::FieldDescriptorProto* add_extension(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& - extension() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* - mutable_extension(); - - // repeated .google.protobuf.DescriptorProto nested_type = 3; - inline int nested_type_size() const; - inline void clear_nested_type(); - static const int kNestedTypeFieldNumber = 3; - inline const ::google::protobuf::DescriptorProto& nested_type(int index) const; - inline ::google::protobuf::DescriptorProto* mutable_nested_type(int index); - inline ::google::protobuf::DescriptorProto* add_nested_type(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& - nested_type() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* - mutable_nested_type(); - - // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - inline int enum_type_size() const; - inline void clear_enum_type(); - static const int kEnumTypeFieldNumber = 4; - inline const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const; - inline ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index); - inline ::google::protobuf::EnumDescriptorProto* add_enum_type(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& - enum_type() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* - mutable_enum_type(); - - // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - inline int extension_range_size() const; - inline void clear_extension_range(); - static const int kExtensionRangeFieldNumber = 5; - inline const ::google::protobuf::DescriptorProto_ExtensionRange& extension_range(int index) const; - inline ::google::protobuf::DescriptorProto_ExtensionRange* mutable_extension_range(int index); - inline ::google::protobuf::DescriptorProto_ExtensionRange* add_extension_range(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& - extension_range() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* - mutable_extension_range(); - - // optional .google.protobuf.MessageOptions options = 7; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 7; - inline const ::google::protobuf::MessageOptions& options() const; - inline ::google::protobuf::MessageOptions* mutable_options(); - inline ::google::protobuf::MessageOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > field_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > nested_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto > enum_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange > extension_range_; - ::google::protobuf::MessageOptions* options_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static DescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Message { - public: - FieldDescriptorProto(); - virtual ~FieldDescriptorProto(); - - FieldDescriptorProto(const FieldDescriptorProto& from); - - inline FieldDescriptorProto& operator=(const FieldDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FieldDescriptorProto& default_instance(); - - void Swap(FieldDescriptorProto* other); - - // implements Message ---------------------------------------------- - - FieldDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FieldDescriptorProto& from); - void MergeFrom(const FieldDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef FieldDescriptorProto_Type Type; - static const Type TYPE_DOUBLE = FieldDescriptorProto_Type_TYPE_DOUBLE; - static const Type TYPE_FLOAT = FieldDescriptorProto_Type_TYPE_FLOAT; - static const Type TYPE_INT64 = FieldDescriptorProto_Type_TYPE_INT64; - static const Type TYPE_UINT64 = FieldDescriptorProto_Type_TYPE_UINT64; - static const Type TYPE_INT32 = FieldDescriptorProto_Type_TYPE_INT32; - static const Type TYPE_FIXED64 = FieldDescriptorProto_Type_TYPE_FIXED64; - static const Type TYPE_FIXED32 = FieldDescriptorProto_Type_TYPE_FIXED32; - static const Type TYPE_BOOL = FieldDescriptorProto_Type_TYPE_BOOL; - static const Type TYPE_STRING = FieldDescriptorProto_Type_TYPE_STRING; - static const Type TYPE_GROUP = FieldDescriptorProto_Type_TYPE_GROUP; - static const Type TYPE_MESSAGE = FieldDescriptorProto_Type_TYPE_MESSAGE; - static const Type TYPE_BYTES = FieldDescriptorProto_Type_TYPE_BYTES; - static const Type TYPE_UINT32 = FieldDescriptorProto_Type_TYPE_UINT32; - static const Type TYPE_ENUM = FieldDescriptorProto_Type_TYPE_ENUM; - static const Type TYPE_SFIXED32 = FieldDescriptorProto_Type_TYPE_SFIXED32; - static const Type TYPE_SFIXED64 = FieldDescriptorProto_Type_TYPE_SFIXED64; - static const Type TYPE_SINT32 = FieldDescriptorProto_Type_TYPE_SINT32; - static const Type TYPE_SINT64 = FieldDescriptorProto_Type_TYPE_SINT64; - static inline bool Type_IsValid(int value) { - return FieldDescriptorProto_Type_IsValid(value); - } - static const Type Type_MIN = - FieldDescriptorProto_Type_Type_MIN; - static const Type Type_MAX = - FieldDescriptorProto_Type_Type_MAX; - static const int Type_ARRAYSIZE = - FieldDescriptorProto_Type_Type_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* - Type_descriptor() { - return FieldDescriptorProto_Type_descriptor(); - } - static inline const ::std::string& Type_Name(Type value) { - return FieldDescriptorProto_Type_Name(value); - } - static inline bool Type_Parse(const ::std::string& name, - Type* value) { - return FieldDescriptorProto_Type_Parse(name, value); - } - - typedef FieldDescriptorProto_Label Label; - static const Label LABEL_OPTIONAL = FieldDescriptorProto_Label_LABEL_OPTIONAL; - static const Label LABEL_REQUIRED = FieldDescriptorProto_Label_LABEL_REQUIRED; - static const Label LABEL_REPEATED = FieldDescriptorProto_Label_LABEL_REPEATED; - static inline bool Label_IsValid(int value) { - return FieldDescriptorProto_Label_IsValid(value); - } - static const Label Label_MIN = - FieldDescriptorProto_Label_Label_MIN; - static const Label Label_MAX = - FieldDescriptorProto_Label_Label_MAX; - static const int Label_ARRAYSIZE = - FieldDescriptorProto_Label_Label_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* - Label_descriptor() { - return FieldDescriptorProto_Label_descriptor(); - } - static inline const ::std::string& Label_Name(Label value) { - return FieldDescriptorProto_Label_Name(value); - } - static inline bool Label_Parse(const ::std::string& name, - Label* value) { - return FieldDescriptorProto_Label_Parse(name, value); - } - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // optional int32 number = 3; - inline bool has_number() const; - inline void clear_number(); - static const int kNumberFieldNumber = 3; - inline ::google::protobuf::int32 number() const; - inline void set_number(::google::protobuf::int32 value); - - // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - inline bool has_label() const; - inline void clear_label(); - static const int kLabelFieldNumber = 4; - inline ::google::protobuf::FieldDescriptorProto_Label label() const; - inline void set_label(::google::protobuf::FieldDescriptorProto_Label value); - - // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - inline bool has_type() const; - inline void clear_type(); - static const int kTypeFieldNumber = 5; - inline ::google::protobuf::FieldDescriptorProto_Type type() const; - inline void set_type(::google::protobuf::FieldDescriptorProto_Type value); - - // optional string type_name = 6; - inline bool has_type_name() const; - inline void clear_type_name(); - static const int kTypeNameFieldNumber = 6; - inline const ::std::string& type_name() const; - inline void set_type_name(const ::std::string& value); - inline void set_type_name(const char* value); - inline void set_type_name(const char* value, size_t size); - inline ::std::string* mutable_type_name(); - inline ::std::string* release_type_name(); - - // optional string extendee = 2; - inline bool has_extendee() const; - inline void clear_extendee(); - static const int kExtendeeFieldNumber = 2; - inline const ::std::string& extendee() const; - inline void set_extendee(const ::std::string& value); - inline void set_extendee(const char* value); - inline void set_extendee(const char* value, size_t size); - inline ::std::string* mutable_extendee(); - inline ::std::string* release_extendee(); - - // optional string default_value = 7; - inline bool has_default_value() const; - inline void clear_default_value(); - static const int kDefaultValueFieldNumber = 7; - inline const ::std::string& default_value() const; - inline void set_default_value(const ::std::string& value); - inline void set_default_value(const char* value); - inline void set_default_value(const char* value, size_t size); - inline ::std::string* mutable_default_value(); - inline ::std::string* release_default_value(); - - // optional .google.protobuf.FieldOptions options = 8; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 8; - inline const ::google::protobuf::FieldOptions& options() const; - inline ::google::protobuf::FieldOptions* mutable_options(); - inline ::google::protobuf::FieldOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_number(); - inline void clear_has_number(); - inline void set_has_label(); - inline void clear_has_label(); - inline void set_has_type(); - inline void clear_has_type(); - inline void set_has_type_name(); - inline void clear_has_type_name(); - inline void set_has_extendee(); - inline void clear_has_extendee(); - inline void set_has_default_value(); - inline void clear_has_default_value(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::int32 number_; - int label_; - ::std::string* type_name_; - ::std::string* extendee_; - ::std::string* default_value_; - ::google::protobuf::FieldOptions* options_; - int type_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static FieldDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Message { - public: - EnumDescriptorProto(); - virtual ~EnumDescriptorProto(); - - EnumDescriptorProto(const EnumDescriptorProto& from); - - inline EnumDescriptorProto& operator=(const EnumDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const EnumDescriptorProto& default_instance(); - - void Swap(EnumDescriptorProto* other); - - // implements Message ---------------------------------------------- - - EnumDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EnumDescriptorProto& from); - void MergeFrom(const EnumDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - inline int value_size() const; - inline void clear_value(); - static const int kValueFieldNumber = 2; - inline const ::google::protobuf::EnumValueDescriptorProto& value(int index) const; - inline ::google::protobuf::EnumValueDescriptorProto* mutable_value(int index); - inline ::google::protobuf::EnumValueDescriptorProto* add_value(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& - value() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* - mutable_value(); - - // optional .google.protobuf.EnumOptions options = 3; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 3; - inline const ::google::protobuf::EnumOptions& options() const; - inline ::google::protobuf::EnumOptions* mutable_options(); - inline ::google::protobuf::EnumOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto > value_; - ::google::protobuf::EnumOptions* options_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static EnumDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::Message { - public: - EnumValueDescriptorProto(); - virtual ~EnumValueDescriptorProto(); - - EnumValueDescriptorProto(const EnumValueDescriptorProto& from); - - inline EnumValueDescriptorProto& operator=(const EnumValueDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const EnumValueDescriptorProto& default_instance(); - - void Swap(EnumValueDescriptorProto* other); - - // implements Message ---------------------------------------------- - - EnumValueDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EnumValueDescriptorProto& from); - void MergeFrom(const EnumValueDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // optional int32 number = 2; - inline bool has_number() const; - inline void clear_number(); - static const int kNumberFieldNumber = 2; - inline ::google::protobuf::int32 number() const; - inline void set_number(::google::protobuf::int32 value); - - // optional .google.protobuf.EnumValueOptions options = 3; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 3; - inline const ::google::protobuf::EnumValueOptions& options() const; - inline ::google::protobuf::EnumValueOptions* mutable_options(); - inline ::google::protobuf::EnumValueOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_number(); - inline void clear_has_number(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::EnumValueOptions* options_; - ::google::protobuf::int32 number_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static EnumValueDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Message { - public: - ServiceDescriptorProto(); - virtual ~ServiceDescriptorProto(); - - ServiceDescriptorProto(const ServiceDescriptorProto& from); - - inline ServiceDescriptorProto& operator=(const ServiceDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ServiceDescriptorProto& default_instance(); - - void Swap(ServiceDescriptorProto* other); - - // implements Message ---------------------------------------------- - - ServiceDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ServiceDescriptorProto& from); - void MergeFrom(const ServiceDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // repeated .google.protobuf.MethodDescriptorProto method = 2; - inline int method_size() const; - inline void clear_method(); - static const int kMethodFieldNumber = 2; - inline const ::google::protobuf::MethodDescriptorProto& method(int index) const; - inline ::google::protobuf::MethodDescriptorProto* mutable_method(int index); - inline ::google::protobuf::MethodDescriptorProto* add_method(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& - method() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* - mutable_method(); - - // optional .google.protobuf.ServiceOptions options = 3; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 3; - inline const ::google::protobuf::ServiceOptions& options() const; - inline ::google::protobuf::ServiceOptions* mutable_options(); - inline ::google::protobuf::ServiceOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_; - ::google::protobuf::ServiceOptions* options_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static ServiceDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Message { - public: - MethodDescriptorProto(); - virtual ~MethodDescriptorProto(); - - MethodDescriptorProto(const MethodDescriptorProto& from); - - inline MethodDescriptorProto& operator=(const MethodDescriptorProto& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const MethodDescriptorProto& default_instance(); - - void Swap(MethodDescriptorProto* other); - - // implements Message ---------------------------------------------- - - MethodDescriptorProto* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const MethodDescriptorProto& from); - void MergeFrom(const MethodDescriptorProto& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // optional string input_type = 2; - inline bool has_input_type() const; - inline void clear_input_type(); - static const int kInputTypeFieldNumber = 2; - inline const ::std::string& input_type() const; - inline void set_input_type(const ::std::string& value); - inline void set_input_type(const char* value); - inline void set_input_type(const char* value, size_t size); - inline ::std::string* mutable_input_type(); - inline ::std::string* release_input_type(); - - // optional string output_type = 3; - inline bool has_output_type() const; - inline void clear_output_type(); - static const int kOutputTypeFieldNumber = 3; - inline const ::std::string& output_type() const; - inline void set_output_type(const ::std::string& value); - inline void set_output_type(const char* value); - inline void set_output_type(const char* value, size_t size); - inline ::std::string* mutable_output_type(); - inline ::std::string* release_output_type(); - - // optional .google.protobuf.MethodOptions options = 4; - inline bool has_options() const; - inline void clear_options(); - static const int kOptionsFieldNumber = 4; - inline const ::google::protobuf::MethodOptions& options() const; - inline ::google::protobuf::MethodOptions* mutable_options(); - inline ::google::protobuf::MethodOptions* release_options(); - - // @@protoc_insertion_point(class_scope:google.protobuf.MethodDescriptorProto) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_input_type(); - inline void clear_has_input_type(); - inline void set_has_output_type(); - inline void clear_has_output_type(); - inline void set_has_options(); - inline void clear_has_options(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_; - ::std::string* input_type_; - ::std::string* output_type_; - ::google::protobuf::MethodOptions* options_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static MethodDescriptorProto* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message { - public: - FileOptions(); - virtual ~FileOptions(); - - FileOptions(const FileOptions& from); - - inline FileOptions& operator=(const FileOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FileOptions& default_instance(); - - void Swap(FileOptions* other); - - // implements Message ---------------------------------------------- - - FileOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileOptions& from); - void MergeFrom(const FileOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef FileOptions_OptimizeMode OptimizeMode; - static const OptimizeMode SPEED = FileOptions_OptimizeMode_SPEED; - static const OptimizeMode CODE_SIZE = FileOptions_OptimizeMode_CODE_SIZE; - static const OptimizeMode LITE_RUNTIME = FileOptions_OptimizeMode_LITE_RUNTIME; - static inline bool OptimizeMode_IsValid(int value) { - return FileOptions_OptimizeMode_IsValid(value); - } - static const OptimizeMode OptimizeMode_MIN = - FileOptions_OptimizeMode_OptimizeMode_MIN; - static const OptimizeMode OptimizeMode_MAX = - FileOptions_OptimizeMode_OptimizeMode_MAX; - static const int OptimizeMode_ARRAYSIZE = - FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* - OptimizeMode_descriptor() { - return FileOptions_OptimizeMode_descriptor(); - } - static inline const ::std::string& OptimizeMode_Name(OptimizeMode value) { - return FileOptions_OptimizeMode_Name(value); - } - static inline bool OptimizeMode_Parse(const ::std::string& name, - OptimizeMode* value) { - return FileOptions_OptimizeMode_Parse(name, value); - } - - // accessors ------------------------------------------------------- - - // optional string java_package = 1; - inline bool has_java_package() const; - inline void clear_java_package(); - static const int kJavaPackageFieldNumber = 1; - inline const ::std::string& java_package() const; - inline void set_java_package(const ::std::string& value); - inline void set_java_package(const char* value); - inline void set_java_package(const char* value, size_t size); - inline ::std::string* mutable_java_package(); - inline ::std::string* release_java_package(); - - // optional string java_outer_classname = 8; - inline bool has_java_outer_classname() const; - inline void clear_java_outer_classname(); - static const int kJavaOuterClassnameFieldNumber = 8; - inline const ::std::string& java_outer_classname() const; - inline void set_java_outer_classname(const ::std::string& value); - inline void set_java_outer_classname(const char* value); - inline void set_java_outer_classname(const char* value, size_t size); - inline ::std::string* mutable_java_outer_classname(); - inline ::std::string* release_java_outer_classname(); - - // optional bool java_multiple_files = 10 [default = false]; - inline bool has_java_multiple_files() const; - inline void clear_java_multiple_files(); - static const int kJavaMultipleFilesFieldNumber = 10; - inline bool java_multiple_files() const; - inline void set_java_multiple_files(bool value); - - // optional bool java_generate_equals_and_hash = 20 [default = false]; - inline bool has_java_generate_equals_and_hash() const; - inline void clear_java_generate_equals_and_hash(); - static const int kJavaGenerateEqualsAndHashFieldNumber = 20; - inline bool java_generate_equals_and_hash() const; - inline void set_java_generate_equals_and_hash(bool value); - - // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - inline bool has_optimize_for() const; - inline void clear_optimize_for(); - static const int kOptimizeForFieldNumber = 9; - inline ::google::protobuf::FileOptions_OptimizeMode optimize_for() const; - inline void set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value); - - // optional bool cc_generic_services = 16 [default = false]; - inline bool has_cc_generic_services() const; - inline void clear_cc_generic_services(); - static const int kCcGenericServicesFieldNumber = 16; - inline bool cc_generic_services() const; - inline void set_cc_generic_services(bool value); - - // optional bool java_generic_services = 17 [default = false]; - inline bool has_java_generic_services() const; - inline void clear_java_generic_services(); - static const int kJavaGenericServicesFieldNumber = 17; - inline bool java_generic_services() const; - inline void set_java_generic_services(bool value); - - // optional bool py_generic_services = 18 [default = false]; - inline bool has_py_generic_services() const; - inline void clear_py_generic_services(); - static const int kPyGenericServicesFieldNumber = 18; - inline bool py_generic_services() const; - inline void set_py_generic_services(bool value); - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FileOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.FileOptions) - private: - inline void set_has_java_package(); - inline void clear_has_java_package(); - inline void set_has_java_outer_classname(); - inline void clear_has_java_outer_classname(); - inline void set_has_java_multiple_files(); - inline void clear_has_java_multiple_files(); - inline void set_has_java_generate_equals_and_hash(); - inline void clear_has_java_generate_equals_and_hash(); - inline void set_has_optimize_for(); - inline void clear_has_optimize_for(); - inline void set_has_cc_generic_services(); - inline void clear_has_cc_generic_services(); - inline void set_has_java_generic_services(); - inline void clear_has_java_generic_services(); - inline void set_has_py_generic_services(); - inline void clear_has_py_generic_services(); - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* java_package_; - ::std::string* java_outer_classname_; - int optimize_for_; - bool java_multiple_files_; - bool java_generate_equals_and_hash_; - bool cc_generic_services_; - bool java_generic_services_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - bool py_generic_services_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static FileOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT MessageOptions : public ::google::protobuf::Message { - public: - MessageOptions(); - virtual ~MessageOptions(); - - MessageOptions(const MessageOptions& from); - - inline MessageOptions& operator=(const MessageOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const MessageOptions& default_instance(); - - void Swap(MessageOptions* other); - - // implements Message ---------------------------------------------- - - MessageOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const MessageOptions& from); - void MergeFrom(const MessageOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional bool message_set_wire_format = 1 [default = false]; - inline bool has_message_set_wire_format() const; - inline void clear_message_set_wire_format(); - static const int kMessageSetWireFormatFieldNumber = 1; - inline bool message_set_wire_format() const; - inline void set_message_set_wire_format(bool value); - - // optional bool no_standard_descriptor_accessor = 2 [default = false]; - inline bool has_no_standard_descriptor_accessor() const; - inline void clear_no_standard_descriptor_accessor(); - static const int kNoStandardDescriptorAccessorFieldNumber = 2; - inline bool no_standard_descriptor_accessor() const; - inline void set_no_standard_descriptor_accessor(bool value); - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MessageOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.MessageOptions) - private: - inline void set_has_message_set_wire_format(); - inline void clear_has_message_set_wire_format(); - inline void set_has_no_standard_descriptor_accessor(); - inline void clear_has_no_standard_descriptor_accessor(); - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - bool message_set_wire_format_; - bool no_standard_descriptor_accessor_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static MessageOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message { - public: - FieldOptions(); - virtual ~FieldOptions(); - - FieldOptions(const FieldOptions& from); - - inline FieldOptions& operator=(const FieldOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FieldOptions& default_instance(); - - void Swap(FieldOptions* other); - - // implements Message ---------------------------------------------- - - FieldOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FieldOptions& from); - void MergeFrom(const FieldOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef FieldOptions_CType CType; - static const CType STRING = FieldOptions_CType_STRING; - static const CType CORD = FieldOptions_CType_CORD; - static const CType STRING_PIECE = FieldOptions_CType_STRING_PIECE; - static inline bool CType_IsValid(int value) { - return FieldOptions_CType_IsValid(value); - } - static const CType CType_MIN = - FieldOptions_CType_CType_MIN; - static const CType CType_MAX = - FieldOptions_CType_CType_MAX; - static const int CType_ARRAYSIZE = - FieldOptions_CType_CType_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* - CType_descriptor() { - return FieldOptions_CType_descriptor(); - } - static inline const ::std::string& CType_Name(CType value) { - return FieldOptions_CType_Name(value); - } - static inline bool CType_Parse(const ::std::string& name, - CType* value) { - return FieldOptions_CType_Parse(name, value); - } - - // accessors ------------------------------------------------------- - - // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - inline bool has_ctype() const; - inline void clear_ctype(); - static const int kCtypeFieldNumber = 1; - inline ::google::protobuf::FieldOptions_CType ctype() const; - inline void set_ctype(::google::protobuf::FieldOptions_CType value); - - // optional bool packed = 2; - inline bool has_packed() const; - inline void clear_packed(); - static const int kPackedFieldNumber = 2; - inline bool packed() const; - inline void set_packed(bool value); - - // optional bool deprecated = 3 [default = false]; - inline bool has_deprecated() const; - inline void clear_deprecated(); - static const int kDeprecatedFieldNumber = 3; - inline bool deprecated() const; - inline void set_deprecated(bool value); - - // optional string experimental_map_key = 9; - inline bool has_experimental_map_key() const; - inline void clear_experimental_map_key(); - static const int kExperimentalMapKeyFieldNumber = 9; - inline const ::std::string& experimental_map_key() const; - inline void set_experimental_map_key(const ::std::string& value); - inline void set_experimental_map_key(const char* value); - inline void set_experimental_map_key(const char* value, size_t size); - inline ::std::string* mutable_experimental_map_key(); - inline ::std::string* release_experimental_map_key(); - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FieldOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions) - private: - inline void set_has_ctype(); - inline void clear_has_ctype(); - inline void set_has_packed(); - inline void clear_has_packed(); - inline void set_has_deprecated(); - inline void clear_has_deprecated(); - inline void set_has_experimental_map_key(); - inline void clear_has_experimental_map_key(); - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - int ctype_; - bool packed_; - bool deprecated_; - ::std::string* experimental_map_key_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static FieldOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT EnumOptions : public ::google::protobuf::Message { - public: - EnumOptions(); - virtual ~EnumOptions(); - - EnumOptions(const EnumOptions& from); - - inline EnumOptions& operator=(const EnumOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const EnumOptions& default_instance(); - - void Swap(EnumOptions* other); - - // implements Message ---------------------------------------------- - - EnumOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EnumOptions& from); - void MergeFrom(const EnumOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.EnumOptions) - private: - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static EnumOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT EnumValueOptions : public ::google::protobuf::Message { - public: - EnumValueOptions(); - virtual ~EnumValueOptions(); - - EnumValueOptions(const EnumValueOptions& from); - - inline EnumValueOptions& operator=(const EnumValueOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const EnumValueOptions& default_instance(); - - void Swap(EnumValueOptions* other); - - // implements Message ---------------------------------------------- - - EnumValueOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EnumValueOptions& from); - void MergeFrom(const EnumValueOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(EnumValueOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueOptions) - private: - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static EnumValueOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT ServiceOptions : public ::google::protobuf::Message { - public: - ServiceOptions(); - virtual ~ServiceOptions(); - - ServiceOptions(const ServiceOptions& from); - - inline ServiceOptions& operator=(const ServiceOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ServiceOptions& default_instance(); - - void Swap(ServiceOptions* other); - - // implements Message ---------------------------------------------- - - ServiceOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ServiceOptions& from); - void MergeFrom(const ServiceOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ServiceOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.ServiceOptions) - private: - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static ServiceOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT MethodOptions : public ::google::protobuf::Message { - public: - MethodOptions(); - virtual ~MethodOptions(); - - MethodOptions(const MethodOptions& from); - - inline MethodOptions& operator=(const MethodOptions& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const MethodOptions& default_instance(); - - void Swap(MethodOptions* other); - - // implements Message ---------------------------------------------- - - MethodOptions* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const MethodOptions& from); - void MergeFrom(const MethodOptions& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - inline int uninterpreted_option_size() const; - inline void clear_uninterpreted_option(); - static const int kUninterpretedOptionFieldNumber = 999; - inline const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - inline ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - inline ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& - uninterpreted_option() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* - mutable_uninterpreted_option(); - - GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions) - // @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions) - private: - - ::google::protobuf::internal::ExtensionSet _extensions_; - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static MethodOptions* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobuf::Message { - public: - UninterpretedOption_NamePart(); - virtual ~UninterpretedOption_NamePart(); - - UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from); - - inline UninterpretedOption_NamePart& operator=(const UninterpretedOption_NamePart& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const UninterpretedOption_NamePart& default_instance(); - - void Swap(UninterpretedOption_NamePart* other); - - // implements Message ---------------------------------------------- - - UninterpretedOption_NamePart* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const UninterpretedOption_NamePart& from); - void MergeFrom(const UninterpretedOption_NamePart& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required string name_part = 1; - inline bool has_name_part() const; - inline void clear_name_part(); - static const int kNamePartFieldNumber = 1; - inline const ::std::string& name_part() const; - inline void set_name_part(const ::std::string& value); - inline void set_name_part(const char* value); - inline void set_name_part(const char* value, size_t size); - inline ::std::string* mutable_name_part(); - inline ::std::string* release_name_part(); - - // required bool is_extension = 2; - inline bool has_is_extension() const; - inline void clear_is_extension(); - static const int kIsExtensionFieldNumber = 2; - inline bool is_extension() const; - inline void set_is_extension(bool value); - - // @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption.NamePart) - private: - inline void set_has_name_part(); - inline void clear_has_name_part(); - inline void set_has_is_extension(); - inline void clear_has_is_extension(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::std::string* name_part_; - bool is_extension_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static UninterpretedOption_NamePart* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Message { - public: - UninterpretedOption(); - virtual ~UninterpretedOption(); - - UninterpretedOption(const UninterpretedOption& from); - - inline UninterpretedOption& operator=(const UninterpretedOption& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const UninterpretedOption& default_instance(); - - void Swap(UninterpretedOption* other); - - // implements Message ---------------------------------------------- - - UninterpretedOption* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const UninterpretedOption& from); - void MergeFrom(const UninterpretedOption& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef UninterpretedOption_NamePart NamePart; - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - inline int name_size() const; - inline void clear_name(); - static const int kNameFieldNumber = 2; - inline const ::google::protobuf::UninterpretedOption_NamePart& name(int index) const; - inline ::google::protobuf::UninterpretedOption_NamePart* mutable_name(int index); - inline ::google::protobuf::UninterpretedOption_NamePart* add_name(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& - name() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* - mutable_name(); - - // optional string identifier_value = 3; - inline bool has_identifier_value() const; - inline void clear_identifier_value(); - static const int kIdentifierValueFieldNumber = 3; - inline const ::std::string& identifier_value() const; - inline void set_identifier_value(const ::std::string& value); - inline void set_identifier_value(const char* value); - inline void set_identifier_value(const char* value, size_t size); - inline ::std::string* mutable_identifier_value(); - inline ::std::string* release_identifier_value(); - - // optional uint64 positive_int_value = 4; - inline bool has_positive_int_value() const; - inline void clear_positive_int_value(); - static const int kPositiveIntValueFieldNumber = 4; - inline ::google::protobuf::uint64 positive_int_value() const; - inline void set_positive_int_value(::google::protobuf::uint64 value); - - // optional int64 negative_int_value = 5; - inline bool has_negative_int_value() const; - inline void clear_negative_int_value(); - static const int kNegativeIntValueFieldNumber = 5; - inline ::google::protobuf::int64 negative_int_value() const; - inline void set_negative_int_value(::google::protobuf::int64 value); - - // optional double double_value = 6; - inline bool has_double_value() const; - inline void clear_double_value(); - static const int kDoubleValueFieldNumber = 6; - inline double double_value() const; - inline void set_double_value(double value); - - // optional bytes string_value = 7; - inline bool has_string_value() const; - inline void clear_string_value(); - static const int kStringValueFieldNumber = 7; - inline const ::std::string& string_value() const; - inline void set_string_value(const ::std::string& value); - inline void set_string_value(const char* value); - inline void set_string_value(const void* value, size_t size); - inline ::std::string* mutable_string_value(); - inline ::std::string* release_string_value(); - - // optional string aggregate_value = 8; - inline bool has_aggregate_value() const; - inline void clear_aggregate_value(); - static const int kAggregateValueFieldNumber = 8; - inline const ::std::string& aggregate_value() const; - inline void set_aggregate_value(const ::std::string& value); - inline void set_aggregate_value(const char* value); - inline void set_aggregate_value(const char* value, size_t size); - inline ::std::string* mutable_aggregate_value(); - inline ::std::string* release_aggregate_value(); - - // @@protoc_insertion_point(class_scope:google.protobuf.UninterpretedOption) - private: - inline void set_has_identifier_value(); - inline void clear_has_identifier_value(); - inline void set_has_positive_int_value(); - inline void clear_has_positive_int_value(); - inline void set_has_negative_int_value(); - inline void clear_has_negative_int_value(); - inline void set_has_double_value(); - inline void clear_has_double_value(); - inline void set_has_string_value(); - inline void clear_has_string_value(); - inline void set_has_aggregate_value(); - inline void clear_has_aggregate_value(); - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart > name_; - ::std::string* identifier_value_; - ::google::protobuf::uint64 positive_int_value_; - ::google::protobuf::int64 negative_int_value_; - double double_value_; - ::std::string* string_value_; - ::std::string* aggregate_value_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static UninterpretedOption* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Message { - public: - SourceCodeInfo_Location(); - virtual ~SourceCodeInfo_Location(); - - SourceCodeInfo_Location(const SourceCodeInfo_Location& from); - - inline SourceCodeInfo_Location& operator=(const SourceCodeInfo_Location& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const SourceCodeInfo_Location& default_instance(); - - void Swap(SourceCodeInfo_Location* other); - - // implements Message ---------------------------------------------- - - SourceCodeInfo_Location* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const SourceCodeInfo_Location& from); - void MergeFrom(const SourceCodeInfo_Location& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated int32 path = 1 [packed = true]; - inline int path_size() const; - inline void clear_path(); - static const int kPathFieldNumber = 1; - inline ::google::protobuf::int32 path(int index) const; - inline void set_path(int index, ::google::protobuf::int32 value); - inline void add_path(::google::protobuf::int32 value); - inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& - path() const; - inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* - mutable_path(); - - // repeated int32 span = 2 [packed = true]; - inline int span_size() const; - inline void clear_span(); - static const int kSpanFieldNumber = 2; - inline ::google::protobuf::int32 span(int index) const; - inline void set_span(int index, ::google::protobuf::int32 value); - inline void add_span(::google::protobuf::int32 value); - inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& - span() const; - inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* - mutable_span(); - - // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location) - private: - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_; - mutable int _path_cached_byte_size_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > span_; - mutable int _span_cached_byte_size_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static SourceCodeInfo_Location* default_instance_; -}; -// ------------------------------------------------------------------- - -class LIBPROTOBUF_EXPORT SourceCodeInfo : public ::google::protobuf::Message { - public: - SourceCodeInfo(); - virtual ~SourceCodeInfo(); - - SourceCodeInfo(const SourceCodeInfo& from); - - inline SourceCodeInfo& operator=(const SourceCodeInfo& from) { - CopyFrom(from); - return *this; - } - - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { - return _unknown_fields_; - } - - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { - return &_unknown_fields_; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const SourceCodeInfo& default_instance(); - - void Swap(SourceCodeInfo* other); - - // implements Message ---------------------------------------------- - - SourceCodeInfo* New() const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const SourceCodeInfo& from); - void MergeFrom(const SourceCodeInfo& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - typedef SourceCodeInfo_Location Location; - - // accessors ------------------------------------------------------- - - // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - inline int location_size() const; - inline void clear_location(); - static const int kLocationFieldNumber = 1; - inline const ::google::protobuf::SourceCodeInfo_Location& location(int index) const; - inline ::google::protobuf::SourceCodeInfo_Location* mutable_location(int index); - inline ::google::protobuf::SourceCodeInfo_Location* add_location(); - inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& - location() const; - inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* - mutable_location(); - - // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo) - private: - - ::google::protobuf::UnknownFieldSet _unknown_fields_; - - ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto(); - friend void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto(); - - void InitAsDefaultInstance(); - static SourceCodeInfo* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -// FileDescriptorSet - -// repeated .google.protobuf.FileDescriptorProto file = 1; -inline int FileDescriptorSet::file_size() const { - return file_.size(); -} -inline void FileDescriptorSet::clear_file() { - file_.Clear(); -} -inline const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const { - return file_.Get(index); -} -inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) { - return file_.Mutable(index); -} -inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() { - return file_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& -FileDescriptorSet::file() const { - return file_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* -FileDescriptorSet::mutable_file() { - return &file_; -} - -// ------------------------------------------------------------------- - -// FileDescriptorProto - -// optional string name = 1; -inline bool FileDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void FileDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void FileDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void FileDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& FileDescriptorProto::name() const { - return *name_; -} -inline void FileDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void FileDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void FileDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FileDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* FileDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string package = 2; -inline bool FileDescriptorProto::has_package() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void FileDescriptorProto::set_has_package() { - _has_bits_[0] |= 0x00000002u; -} -inline void FileDescriptorProto::clear_has_package() { - _has_bits_[0] &= ~0x00000002u; -} -inline void FileDescriptorProto::clear_package() { - if (package_ != &::google::protobuf::internal::kEmptyString) { - package_->clear(); - } - clear_has_package(); -} -inline const ::std::string& FileDescriptorProto::package() const { - return *package_; -} -inline void FileDescriptorProto::set_package(const ::std::string& value) { - set_has_package(); - if (package_ == &::google::protobuf::internal::kEmptyString) { - package_ = new ::std::string; - } - package_->assign(value); -} -inline void FileDescriptorProto::set_package(const char* value) { - set_has_package(); - if (package_ == &::google::protobuf::internal::kEmptyString) { - package_ = new ::std::string; - } - package_->assign(value); -} -inline void FileDescriptorProto::set_package(const char* value, size_t size) { - set_has_package(); - if (package_ == &::google::protobuf::internal::kEmptyString) { - package_ = new ::std::string; - } - package_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FileDescriptorProto::mutable_package() { - set_has_package(); - if (package_ == &::google::protobuf::internal::kEmptyString) { - package_ = new ::std::string; - } - return package_; -} -inline ::std::string* FileDescriptorProto::release_package() { - clear_has_package(); - if (package_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = package_; - package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated string dependency = 3; -inline int FileDescriptorProto::dependency_size() const { - return dependency_.size(); -} -inline void FileDescriptorProto::clear_dependency() { - dependency_.Clear(); -} -inline const ::std::string& FileDescriptorProto::dependency(int index) const { - return dependency_.Get(index); -} -inline ::std::string* FileDescriptorProto::mutable_dependency(int index) { - return dependency_.Mutable(index); -} -inline void FileDescriptorProto::set_dependency(int index, const ::std::string& value) { - dependency_.Mutable(index)->assign(value); -} -inline void FileDescriptorProto::set_dependency(int index, const char* value) { - dependency_.Mutable(index)->assign(value); -} -inline void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) { - dependency_.Mutable(index)->assign( - reinterpret_cast(value), size); -} -inline ::std::string* FileDescriptorProto::add_dependency() { - return dependency_.Add(); -} -inline void FileDescriptorProto::add_dependency(const ::std::string& value) { - dependency_.Add()->assign(value); -} -inline void FileDescriptorProto::add_dependency(const char* value) { - dependency_.Add()->assign(value); -} -inline void FileDescriptorProto::add_dependency(const char* value, size_t size) { - dependency_.Add()->assign(reinterpret_cast(value), size); -} -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -FileDescriptorProto::dependency() const { - return dependency_; -} -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -FileDescriptorProto::mutable_dependency() { - return &dependency_; -} - -// repeated .google.protobuf.DescriptorProto message_type = 4; -inline int FileDescriptorProto::message_type_size() const { - return message_type_.size(); -} -inline void FileDescriptorProto::clear_message_type() { - message_type_.Clear(); -} -inline const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const { - return message_type_.Get(index); -} -inline ::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) { - return message_type_.Mutable(index); -} -inline ::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() { - return message_type_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& -FileDescriptorProto::message_type() const { - return message_type_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* -FileDescriptorProto::mutable_message_type() { - return &message_type_; -} - -// repeated .google.protobuf.EnumDescriptorProto enum_type = 5; -inline int FileDescriptorProto::enum_type_size() const { - return enum_type_.size(); -} -inline void FileDescriptorProto::clear_enum_type() { - enum_type_.Clear(); -} -inline const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const { - return enum_type_.Get(index); -} -inline ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) { - return enum_type_.Mutable(index); -} -inline ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { - return enum_type_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& -FileDescriptorProto::enum_type() const { - return enum_type_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* -FileDescriptorProto::mutable_enum_type() { - return &enum_type_; -} - -// repeated .google.protobuf.ServiceDescriptorProto service = 6; -inline int FileDescriptorProto::service_size() const { - return service_.size(); -} -inline void FileDescriptorProto::clear_service() { - service_.Clear(); -} -inline const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { - return service_.Get(index); -} -inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) { - return service_.Mutable(index); -} -inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() { - return service_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& -FileDescriptorProto::service() const { - return service_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* -FileDescriptorProto::mutable_service() { - return &service_; -} - -// repeated .google.protobuf.FieldDescriptorProto extension = 7; -inline int FileDescriptorProto::extension_size() const { - return extension_.size(); -} -inline void FileDescriptorProto::clear_extension() { - extension_.Clear(); -} -inline const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { - return extension_.Get(index); -} -inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) { - return extension_.Mutable(index); -} -inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() { - return extension_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& -FileDescriptorProto::extension() const { - return extension_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* -FileDescriptorProto::mutable_extension() { - return &extension_; -} - -// optional .google.protobuf.FileOptions options = 8; -inline bool FileDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000080u) != 0; -} -inline void FileDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000080u; -} -inline void FileDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000080u; -} -inline void FileDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::FileOptions; - return options_; -} -inline ::google::protobuf::FileOptions* FileDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::FileOptions* temp = options_; - options_ = NULL; - return temp; -} - -// optional .google.protobuf.SourceCodeInfo source_code_info = 9; -inline bool FileDescriptorProto::has_source_code_info() const { - return (_has_bits_[0] & 0x00000100u) != 0; -} -inline void FileDescriptorProto::set_has_source_code_info() { - _has_bits_[0] |= 0x00000100u; -} -inline void FileDescriptorProto::clear_has_source_code_info() { - _has_bits_[0] &= ~0x00000100u; -} -inline void FileDescriptorProto::clear_source_code_info() { - if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); - clear_has_source_code_info(); -} -inline const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { - return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_; -} -inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { - set_has_source_code_info(); - if (source_code_info_ == NULL) source_code_info_ = new ::google::protobuf::SourceCodeInfo; - return source_code_info_; -} -inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { - clear_has_source_code_info(); - ::google::protobuf::SourceCodeInfo* temp = source_code_info_; - source_code_info_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// DescriptorProto_ExtensionRange - -// optional int32 start = 1; -inline bool DescriptorProto_ExtensionRange::has_start() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void DescriptorProto_ExtensionRange::set_has_start() { - _has_bits_[0] |= 0x00000001u; -} -inline void DescriptorProto_ExtensionRange::clear_has_start() { - _has_bits_[0] &= ~0x00000001u; -} -inline void DescriptorProto_ExtensionRange::clear_start() { - start_ = 0; - clear_has_start(); -} -inline ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const { - return start_; -} -inline void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) { - set_has_start(); - start_ = value; -} - -// optional int32 end = 2; -inline bool DescriptorProto_ExtensionRange::has_end() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void DescriptorProto_ExtensionRange::set_has_end() { - _has_bits_[0] |= 0x00000002u; -} -inline void DescriptorProto_ExtensionRange::clear_has_end() { - _has_bits_[0] &= ~0x00000002u; -} -inline void DescriptorProto_ExtensionRange::clear_end() { - end_ = 0; - clear_has_end(); -} -inline ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const { - return end_; -} -inline void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) { - set_has_end(); - end_ = value; -} - -// ------------------------------------------------------------------- - -// DescriptorProto - -// optional string name = 1; -inline bool DescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void DescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void DescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void DescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& DescriptorProto::name() const { - return *name_; -} -inline void DescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void DescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void DescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* DescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* DescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.FieldDescriptorProto field = 2; -inline int DescriptorProto::field_size() const { - return field_.size(); -} -inline void DescriptorProto::clear_field() { - field_.Clear(); -} -inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const { - return field_.Get(index); -} -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) { - return field_.Mutable(index); -} -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() { - return field_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& -DescriptorProto::field() const { - return field_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* -DescriptorProto::mutable_field() { - return &field_; -} - -// repeated .google.protobuf.FieldDescriptorProto extension = 6; -inline int DescriptorProto::extension_size() const { - return extension_.size(); -} -inline void DescriptorProto::clear_extension() { - extension_.Clear(); -} -inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const { - return extension_.Get(index); -} -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) { - return extension_.Mutable(index); -} -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() { - return extension_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& -DescriptorProto::extension() const { - return extension_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* -DescriptorProto::mutable_extension() { - return &extension_; -} - -// repeated .google.protobuf.DescriptorProto nested_type = 3; -inline int DescriptorProto::nested_type_size() const { - return nested_type_.size(); -} -inline void DescriptorProto::clear_nested_type() { - nested_type_.Clear(); -} -inline const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const { - return nested_type_.Get(index); -} -inline ::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) { - return nested_type_.Mutable(index); -} -inline ::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() { - return nested_type_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& -DescriptorProto::nested_type() const { - return nested_type_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* -DescriptorProto::mutable_nested_type() { - return &nested_type_; -} - -// repeated .google.protobuf.EnumDescriptorProto enum_type = 4; -inline int DescriptorProto::enum_type_size() const { - return enum_type_.size(); -} -inline void DescriptorProto::clear_enum_type() { - enum_type_.Clear(); -} -inline const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const { - return enum_type_.Get(index); -} -inline ::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) { - return enum_type_.Mutable(index); -} -inline ::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() { - return enum_type_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& -DescriptorProto::enum_type() const { - return enum_type_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* -DescriptorProto::mutable_enum_type() { - return &enum_type_; -} - -// repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; -inline int DescriptorProto::extension_range_size() const { - return extension_range_.size(); -} -inline void DescriptorProto::clear_extension_range() { - extension_range_.Clear(); -} -inline const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const { - return extension_range_.Get(index); -} -inline ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) { - return extension_range_.Mutable(index); -} -inline ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { - return extension_range_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& -DescriptorProto::extension_range() const { - return extension_range_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* -DescriptorProto::mutable_extension_range() { - return &extension_range_; -} - -// optional .google.protobuf.MessageOptions options = 7; -inline bool DescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000040u) != 0; -} -inline void DescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000040u; -} -inline void DescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000040u; -} -inline void DescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::MessageOptions& DescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::MessageOptions; - return options_; -} -inline ::google::protobuf::MessageOptions* DescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::MessageOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// FieldDescriptorProto - -// optional string name = 1; -inline bool FieldDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void FieldDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void FieldDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void FieldDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& FieldDescriptorProto::name() const { - return *name_; -} -inline void FieldDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void FieldDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void FieldDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FieldDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* FieldDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional int32 number = 3; -inline bool FieldDescriptorProto::has_number() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void FieldDescriptorProto::set_has_number() { - _has_bits_[0] |= 0x00000002u; -} -inline void FieldDescriptorProto::clear_has_number() { - _has_bits_[0] &= ~0x00000002u; -} -inline void FieldDescriptorProto::clear_number() { - number_ = 0; - clear_has_number(); -} -inline ::google::protobuf::int32 FieldDescriptorProto::number() const { - return number_; -} -inline void FieldDescriptorProto::set_number(::google::protobuf::int32 value) { - set_has_number(); - number_ = value; -} - -// optional .google.protobuf.FieldDescriptorProto.Label label = 4; -inline bool FieldDescriptorProto::has_label() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void FieldDescriptorProto::set_has_label() { - _has_bits_[0] |= 0x00000004u; -} -inline void FieldDescriptorProto::clear_has_label() { - _has_bits_[0] &= ~0x00000004u; -} -inline void FieldDescriptorProto::clear_label() { - label_ = 1; - clear_has_label(); -} -inline ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const { - return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_); -} -inline void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) { - GOOGLE_DCHECK(::google::protobuf::FieldDescriptorProto_Label_IsValid(value)); - set_has_label(); - label_ = value; -} - -// optional .google.protobuf.FieldDescriptorProto.Type type = 5; -inline bool FieldDescriptorProto::has_type() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void FieldDescriptorProto::set_has_type() { - _has_bits_[0] |= 0x00000008u; -} -inline void FieldDescriptorProto::clear_has_type() { - _has_bits_[0] &= ~0x00000008u; -} -inline void FieldDescriptorProto::clear_type() { - type_ = 1; - clear_has_type(); -} -inline ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const { - return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_); -} -inline void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) { - GOOGLE_DCHECK(::google::protobuf::FieldDescriptorProto_Type_IsValid(value)); - set_has_type(); - type_ = value; -} - -// optional string type_name = 6; -inline bool FieldDescriptorProto::has_type_name() const { - return (_has_bits_[0] & 0x00000010u) != 0; -} -inline void FieldDescriptorProto::set_has_type_name() { - _has_bits_[0] |= 0x00000010u; -} -inline void FieldDescriptorProto::clear_has_type_name() { - _has_bits_[0] &= ~0x00000010u; -} -inline void FieldDescriptorProto::clear_type_name() { - if (type_name_ != &::google::protobuf::internal::kEmptyString) { - type_name_->clear(); - } - clear_has_type_name(); -} -inline const ::std::string& FieldDescriptorProto::type_name() const { - return *type_name_; -} -inline void FieldDescriptorProto::set_type_name(const ::std::string& value) { - set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::kEmptyString) { - type_name_ = new ::std::string; - } - type_name_->assign(value); -} -inline void FieldDescriptorProto::set_type_name(const char* value) { - set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::kEmptyString) { - type_name_ = new ::std::string; - } - type_name_->assign(value); -} -inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) { - set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::kEmptyString) { - type_name_ = new ::std::string; - } - type_name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FieldDescriptorProto::mutable_type_name() { - set_has_type_name(); - if (type_name_ == &::google::protobuf::internal::kEmptyString) { - type_name_ = new ::std::string; - } - return type_name_; -} -inline ::std::string* FieldDescriptorProto::release_type_name() { - clear_has_type_name(); - if (type_name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = type_name_; - type_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string extendee = 2; -inline bool FieldDescriptorProto::has_extendee() const { - return (_has_bits_[0] & 0x00000020u) != 0; -} -inline void FieldDescriptorProto::set_has_extendee() { - _has_bits_[0] |= 0x00000020u; -} -inline void FieldDescriptorProto::clear_has_extendee() { - _has_bits_[0] &= ~0x00000020u; -} -inline void FieldDescriptorProto::clear_extendee() { - if (extendee_ != &::google::protobuf::internal::kEmptyString) { - extendee_->clear(); - } - clear_has_extendee(); -} -inline const ::std::string& FieldDescriptorProto::extendee() const { - return *extendee_; -} -inline void FieldDescriptorProto::set_extendee(const ::std::string& value) { - set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::kEmptyString) { - extendee_ = new ::std::string; - } - extendee_->assign(value); -} -inline void FieldDescriptorProto::set_extendee(const char* value) { - set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::kEmptyString) { - extendee_ = new ::std::string; - } - extendee_->assign(value); -} -inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) { - set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::kEmptyString) { - extendee_ = new ::std::string; - } - extendee_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FieldDescriptorProto::mutable_extendee() { - set_has_extendee(); - if (extendee_ == &::google::protobuf::internal::kEmptyString) { - extendee_ = new ::std::string; - } - return extendee_; -} -inline ::std::string* FieldDescriptorProto::release_extendee() { - clear_has_extendee(); - if (extendee_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = extendee_; - extendee_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string default_value = 7; -inline bool FieldDescriptorProto::has_default_value() const { - return (_has_bits_[0] & 0x00000040u) != 0; -} -inline void FieldDescriptorProto::set_has_default_value() { - _has_bits_[0] |= 0x00000040u; -} -inline void FieldDescriptorProto::clear_has_default_value() { - _has_bits_[0] &= ~0x00000040u; -} -inline void FieldDescriptorProto::clear_default_value() { - if (default_value_ != &::google::protobuf::internal::kEmptyString) { - default_value_->clear(); - } - clear_has_default_value(); -} -inline const ::std::string& FieldDescriptorProto::default_value() const { - return *default_value_; -} -inline void FieldDescriptorProto::set_default_value(const ::std::string& value) { - set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::kEmptyString) { - default_value_ = new ::std::string; - } - default_value_->assign(value); -} -inline void FieldDescriptorProto::set_default_value(const char* value) { - set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::kEmptyString) { - default_value_ = new ::std::string; - } - default_value_->assign(value); -} -inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) { - set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::kEmptyString) { - default_value_ = new ::std::string; - } - default_value_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FieldDescriptorProto::mutable_default_value() { - set_has_default_value(); - if (default_value_ == &::google::protobuf::internal::kEmptyString) { - default_value_ = new ::std::string; - } - return default_value_; -} -inline ::std::string* FieldDescriptorProto::release_default_value() { - clear_has_default_value(); - if (default_value_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = default_value_; - default_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional .google.protobuf.FieldOptions options = 8; -inline bool FieldDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000080u) != 0; -} -inline void FieldDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000080u; -} -inline void FieldDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000080u; -} -inline void FieldDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::FieldOptions; - return options_; -} -inline ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::FieldOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// EnumDescriptorProto - -// optional string name = 1; -inline bool EnumDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void EnumDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void EnumDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void EnumDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& EnumDescriptorProto::name() const { - return *name_; -} -inline void EnumDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void EnumDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void EnumDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* EnumDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* EnumDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.EnumValueDescriptorProto value = 2; -inline int EnumDescriptorProto::value_size() const { - return value_.size(); -} -inline void EnumDescriptorProto::clear_value() { - value_.Clear(); -} -inline const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { - return value_.Get(index); -} -inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) { - return value_.Mutable(index); -} -inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { - return value_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& -EnumDescriptorProto::value() const { - return value_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* -EnumDescriptorProto::mutable_value() { - return &value_; -} - -// optional .google.protobuf.EnumOptions options = 3; -inline bool EnumDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void EnumDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000004u; -} -inline void EnumDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000004u; -} -inline void EnumDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::EnumOptions; - return options_; -} -inline ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::EnumOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// EnumValueDescriptorProto - -// optional string name = 1; -inline bool EnumValueDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void EnumValueDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void EnumValueDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void EnumValueDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& EnumValueDescriptorProto::name() const { - return *name_; -} -inline void EnumValueDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void EnumValueDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* EnumValueDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* EnumValueDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional int32 number = 2; -inline bool EnumValueDescriptorProto::has_number() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void EnumValueDescriptorProto::set_has_number() { - _has_bits_[0] |= 0x00000002u; -} -inline void EnumValueDescriptorProto::clear_has_number() { - _has_bits_[0] &= ~0x00000002u; -} -inline void EnumValueDescriptorProto::clear_number() { - number_ = 0; - clear_has_number(); -} -inline ::google::protobuf::int32 EnumValueDescriptorProto::number() const { - return number_; -} -inline void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) { - set_has_number(); - number_ = value; -} - -// optional .google.protobuf.EnumValueOptions options = 3; -inline bool EnumValueDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void EnumValueDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000004u; -} -inline void EnumValueDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000004u; -} -inline void EnumValueDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::EnumValueOptions; - return options_; -} -inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::EnumValueOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// ServiceDescriptorProto - -// optional string name = 1; -inline bool ServiceDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ServiceDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void ServiceDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ServiceDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& ServiceDescriptorProto::name() const { - return *name_; -} -inline void ServiceDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ServiceDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ServiceDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ServiceDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* ServiceDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.MethodDescriptorProto method = 2; -inline int ServiceDescriptorProto::method_size() const { - return method_.size(); -} -inline void ServiceDescriptorProto::clear_method() { - method_.Clear(); -} -inline const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { - return method_.Get(index); -} -inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) { - return method_.Mutable(index); -} -inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() { - return method_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& -ServiceDescriptorProto::method() const { - return method_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* -ServiceDescriptorProto::mutable_method() { - return &method_; -} - -// optional .google.protobuf.ServiceOptions options = 3; -inline bool ServiceDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void ServiceDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000004u; -} -inline void ServiceDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000004u; -} -inline void ServiceDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::ServiceOptions; - return options_; -} -inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::ServiceOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// MethodDescriptorProto - -// optional string name = 1; -inline bool MethodDescriptorProto::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void MethodDescriptorProto::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void MethodDescriptorProto::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void MethodDescriptorProto::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& MethodDescriptorProto::name() const { - return *name_; -} -inline void MethodDescriptorProto::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void MethodDescriptorProto::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void MethodDescriptorProto::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* MethodDescriptorProto::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* MethodDescriptorProto::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string input_type = 2; -inline bool MethodDescriptorProto::has_input_type() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void MethodDescriptorProto::set_has_input_type() { - _has_bits_[0] |= 0x00000002u; -} -inline void MethodDescriptorProto::clear_has_input_type() { - _has_bits_[0] &= ~0x00000002u; -} -inline void MethodDescriptorProto::clear_input_type() { - if (input_type_ != &::google::protobuf::internal::kEmptyString) { - input_type_->clear(); - } - clear_has_input_type(); -} -inline const ::std::string& MethodDescriptorProto::input_type() const { - return *input_type_; -} -inline void MethodDescriptorProto::set_input_type(const ::std::string& value) { - set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::kEmptyString) { - input_type_ = new ::std::string; - } - input_type_->assign(value); -} -inline void MethodDescriptorProto::set_input_type(const char* value) { - set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::kEmptyString) { - input_type_ = new ::std::string; - } - input_type_->assign(value); -} -inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) { - set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::kEmptyString) { - input_type_ = new ::std::string; - } - input_type_->assign(reinterpret_cast(value), size); -} -inline ::std::string* MethodDescriptorProto::mutable_input_type() { - set_has_input_type(); - if (input_type_ == &::google::protobuf::internal::kEmptyString) { - input_type_ = new ::std::string; - } - return input_type_; -} -inline ::std::string* MethodDescriptorProto::release_input_type() { - clear_has_input_type(); - if (input_type_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = input_type_; - input_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string output_type = 3; -inline bool MethodDescriptorProto::has_output_type() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void MethodDescriptorProto::set_has_output_type() { - _has_bits_[0] |= 0x00000004u; -} -inline void MethodDescriptorProto::clear_has_output_type() { - _has_bits_[0] &= ~0x00000004u; -} -inline void MethodDescriptorProto::clear_output_type() { - if (output_type_ != &::google::protobuf::internal::kEmptyString) { - output_type_->clear(); - } - clear_has_output_type(); -} -inline const ::std::string& MethodDescriptorProto::output_type() const { - return *output_type_; -} -inline void MethodDescriptorProto::set_output_type(const ::std::string& value) { - set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::kEmptyString) { - output_type_ = new ::std::string; - } - output_type_->assign(value); -} -inline void MethodDescriptorProto::set_output_type(const char* value) { - set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::kEmptyString) { - output_type_ = new ::std::string; - } - output_type_->assign(value); -} -inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) { - set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::kEmptyString) { - output_type_ = new ::std::string; - } - output_type_->assign(reinterpret_cast(value), size); -} -inline ::std::string* MethodDescriptorProto::mutable_output_type() { - set_has_output_type(); - if (output_type_ == &::google::protobuf::internal::kEmptyString) { - output_type_ = new ::std::string; - } - return output_type_; -} -inline ::std::string* MethodDescriptorProto::release_output_type() { - clear_has_output_type(); - if (output_type_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = output_type_; - output_type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional .google.protobuf.MethodOptions options = 4; -inline bool MethodDescriptorProto::has_options() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void MethodDescriptorProto::set_has_options() { - _has_bits_[0] |= 0x00000008u; -} -inline void MethodDescriptorProto::clear_has_options() { - _has_bits_[0] &= ~0x00000008u; -} -inline void MethodDescriptorProto::clear_options() { - if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); - clear_has_options(); -} -inline const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { - return options_ != NULL ? *options_ : *default_instance_->options_; -} -inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { - set_has_options(); - if (options_ == NULL) options_ = new ::google::protobuf::MethodOptions; - return options_; -} -inline ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() { - clear_has_options(); - ::google::protobuf::MethodOptions* temp = options_; - options_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// FileOptions - -// optional string java_package = 1; -inline bool FileOptions::has_java_package() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void FileOptions::set_has_java_package() { - _has_bits_[0] |= 0x00000001u; -} -inline void FileOptions::clear_has_java_package() { - _has_bits_[0] &= ~0x00000001u; -} -inline void FileOptions::clear_java_package() { - if (java_package_ != &::google::protobuf::internal::kEmptyString) { - java_package_->clear(); - } - clear_has_java_package(); -} -inline const ::std::string& FileOptions::java_package() const { - return *java_package_; -} -inline void FileOptions::set_java_package(const ::std::string& value) { - set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::kEmptyString) { - java_package_ = new ::std::string; - } - java_package_->assign(value); -} -inline void FileOptions::set_java_package(const char* value) { - set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::kEmptyString) { - java_package_ = new ::std::string; - } - java_package_->assign(value); -} -inline void FileOptions::set_java_package(const char* value, size_t size) { - set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::kEmptyString) { - java_package_ = new ::std::string; - } - java_package_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FileOptions::mutable_java_package() { - set_has_java_package(); - if (java_package_ == &::google::protobuf::internal::kEmptyString) { - java_package_ = new ::std::string; - } - return java_package_; -} -inline ::std::string* FileOptions::release_java_package() { - clear_has_java_package(); - if (java_package_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = java_package_; - java_package_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string java_outer_classname = 8; -inline bool FileOptions::has_java_outer_classname() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void FileOptions::set_has_java_outer_classname() { - _has_bits_[0] |= 0x00000002u; -} -inline void FileOptions::clear_has_java_outer_classname() { - _has_bits_[0] &= ~0x00000002u; -} -inline void FileOptions::clear_java_outer_classname() { - if (java_outer_classname_ != &::google::protobuf::internal::kEmptyString) { - java_outer_classname_->clear(); - } - clear_has_java_outer_classname(); -} -inline const ::std::string& FileOptions::java_outer_classname() const { - return *java_outer_classname_; -} -inline void FileOptions::set_java_outer_classname(const ::std::string& value) { - set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(value); -} -inline void FileOptions::set_java_outer_classname(const char* value) { - set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(value); -} -inline void FileOptions::set_java_outer_classname(const char* value, size_t size) { - set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) { - java_outer_classname_ = new ::std::string; - } - java_outer_classname_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FileOptions::mutable_java_outer_classname() { - set_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) { - java_outer_classname_ = new ::std::string; - } - return java_outer_classname_; -} -inline ::std::string* FileOptions::release_java_outer_classname() { - clear_has_java_outer_classname(); - if (java_outer_classname_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = java_outer_classname_; - java_outer_classname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional bool java_multiple_files = 10 [default = false]; -inline bool FileOptions::has_java_multiple_files() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void FileOptions::set_has_java_multiple_files() { - _has_bits_[0] |= 0x00000004u; -} -inline void FileOptions::clear_has_java_multiple_files() { - _has_bits_[0] &= ~0x00000004u; -} -inline void FileOptions::clear_java_multiple_files() { - java_multiple_files_ = false; - clear_has_java_multiple_files(); -} -inline bool FileOptions::java_multiple_files() const { - return java_multiple_files_; -} -inline void FileOptions::set_java_multiple_files(bool value) { - set_has_java_multiple_files(); - java_multiple_files_ = value; -} - -// optional bool java_generate_equals_and_hash = 20 [default = false]; -inline bool FileOptions::has_java_generate_equals_and_hash() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void FileOptions::set_has_java_generate_equals_and_hash() { - _has_bits_[0] |= 0x00000008u; -} -inline void FileOptions::clear_has_java_generate_equals_and_hash() { - _has_bits_[0] &= ~0x00000008u; -} -inline void FileOptions::clear_java_generate_equals_and_hash() { - java_generate_equals_and_hash_ = false; - clear_has_java_generate_equals_and_hash(); -} -inline bool FileOptions::java_generate_equals_and_hash() const { - return java_generate_equals_and_hash_; -} -inline void FileOptions::set_java_generate_equals_and_hash(bool value) { - set_has_java_generate_equals_and_hash(); - java_generate_equals_and_hash_ = value; -} - -// optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; -inline bool FileOptions::has_optimize_for() const { - return (_has_bits_[0] & 0x00000010u) != 0; -} -inline void FileOptions::set_has_optimize_for() { - _has_bits_[0] |= 0x00000010u; -} -inline void FileOptions::clear_has_optimize_for() { - _has_bits_[0] &= ~0x00000010u; -} -inline void FileOptions::clear_optimize_for() { - optimize_for_ = 1; - clear_has_optimize_for(); -} -inline ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const { - return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_); -} -inline void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) { - GOOGLE_DCHECK(::google::protobuf::FileOptions_OptimizeMode_IsValid(value)); - set_has_optimize_for(); - optimize_for_ = value; -} - -// optional bool cc_generic_services = 16 [default = false]; -inline bool FileOptions::has_cc_generic_services() const { - return (_has_bits_[0] & 0x00000020u) != 0; -} -inline void FileOptions::set_has_cc_generic_services() { - _has_bits_[0] |= 0x00000020u; -} -inline void FileOptions::clear_has_cc_generic_services() { - _has_bits_[0] &= ~0x00000020u; -} -inline void FileOptions::clear_cc_generic_services() { - cc_generic_services_ = false; - clear_has_cc_generic_services(); -} -inline bool FileOptions::cc_generic_services() const { - return cc_generic_services_; -} -inline void FileOptions::set_cc_generic_services(bool value) { - set_has_cc_generic_services(); - cc_generic_services_ = value; -} - -// optional bool java_generic_services = 17 [default = false]; -inline bool FileOptions::has_java_generic_services() const { - return (_has_bits_[0] & 0x00000040u) != 0; -} -inline void FileOptions::set_has_java_generic_services() { - _has_bits_[0] |= 0x00000040u; -} -inline void FileOptions::clear_has_java_generic_services() { - _has_bits_[0] &= ~0x00000040u; -} -inline void FileOptions::clear_java_generic_services() { - java_generic_services_ = false; - clear_has_java_generic_services(); -} -inline bool FileOptions::java_generic_services() const { - return java_generic_services_; -} -inline void FileOptions::set_java_generic_services(bool value) { - set_has_java_generic_services(); - java_generic_services_ = value; -} - -// optional bool py_generic_services = 18 [default = false]; -inline bool FileOptions::has_py_generic_services() const { - return (_has_bits_[0] & 0x00000080u) != 0; -} -inline void FileOptions::set_has_py_generic_services() { - _has_bits_[0] |= 0x00000080u; -} -inline void FileOptions::clear_has_py_generic_services() { - _has_bits_[0] &= ~0x00000080u; -} -inline void FileOptions::clear_py_generic_services() { - py_generic_services_ = false; - clear_has_py_generic_services(); -} -inline bool FileOptions::py_generic_services() const { - return py_generic_services_; -} -inline void FileOptions::set_py_generic_services(bool value) { - set_has_py_generic_services(); - py_generic_services_ = value; -} - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int FileOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void FileOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -FileOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -FileOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// MessageOptions - -// optional bool message_set_wire_format = 1 [default = false]; -inline bool MessageOptions::has_message_set_wire_format() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void MessageOptions::set_has_message_set_wire_format() { - _has_bits_[0] |= 0x00000001u; -} -inline void MessageOptions::clear_has_message_set_wire_format() { - _has_bits_[0] &= ~0x00000001u; -} -inline void MessageOptions::clear_message_set_wire_format() { - message_set_wire_format_ = false; - clear_has_message_set_wire_format(); -} -inline bool MessageOptions::message_set_wire_format() const { - return message_set_wire_format_; -} -inline void MessageOptions::set_message_set_wire_format(bool value) { - set_has_message_set_wire_format(); - message_set_wire_format_ = value; -} - -// optional bool no_standard_descriptor_accessor = 2 [default = false]; -inline bool MessageOptions::has_no_standard_descriptor_accessor() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void MessageOptions::set_has_no_standard_descriptor_accessor() { - _has_bits_[0] |= 0x00000002u; -} -inline void MessageOptions::clear_has_no_standard_descriptor_accessor() { - _has_bits_[0] &= ~0x00000002u; -} -inline void MessageOptions::clear_no_standard_descriptor_accessor() { - no_standard_descriptor_accessor_ = false; - clear_has_no_standard_descriptor_accessor(); -} -inline bool MessageOptions::no_standard_descriptor_accessor() const { - return no_standard_descriptor_accessor_; -} -inline void MessageOptions::set_no_standard_descriptor_accessor(bool value) { - set_has_no_standard_descriptor_accessor(); - no_standard_descriptor_accessor_ = value; -} - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int MessageOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void MessageOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -MessageOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -MessageOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// FieldOptions - -// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; -inline bool FieldOptions::has_ctype() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void FieldOptions::set_has_ctype() { - _has_bits_[0] |= 0x00000001u; -} -inline void FieldOptions::clear_has_ctype() { - _has_bits_[0] &= ~0x00000001u; -} -inline void FieldOptions::clear_ctype() { - ctype_ = 0; - clear_has_ctype(); -} -inline ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const { - return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_); -} -inline void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) { - GOOGLE_DCHECK(::google::protobuf::FieldOptions_CType_IsValid(value)); - set_has_ctype(); - ctype_ = value; -} - -// optional bool packed = 2; -inline bool FieldOptions::has_packed() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void FieldOptions::set_has_packed() { - _has_bits_[0] |= 0x00000002u; -} -inline void FieldOptions::clear_has_packed() { - _has_bits_[0] &= ~0x00000002u; -} -inline void FieldOptions::clear_packed() { - packed_ = false; - clear_has_packed(); -} -inline bool FieldOptions::packed() const { - return packed_; -} -inline void FieldOptions::set_packed(bool value) { - set_has_packed(); - packed_ = value; -} - -// optional bool deprecated = 3 [default = false]; -inline bool FieldOptions::has_deprecated() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void FieldOptions::set_has_deprecated() { - _has_bits_[0] |= 0x00000004u; -} -inline void FieldOptions::clear_has_deprecated() { - _has_bits_[0] &= ~0x00000004u; -} -inline void FieldOptions::clear_deprecated() { - deprecated_ = false; - clear_has_deprecated(); -} -inline bool FieldOptions::deprecated() const { - return deprecated_; -} -inline void FieldOptions::set_deprecated(bool value) { - set_has_deprecated(); - deprecated_ = value; -} - -// optional string experimental_map_key = 9; -inline bool FieldOptions::has_experimental_map_key() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void FieldOptions::set_has_experimental_map_key() { - _has_bits_[0] |= 0x00000008u; -} -inline void FieldOptions::clear_has_experimental_map_key() { - _has_bits_[0] &= ~0x00000008u; -} -inline void FieldOptions::clear_experimental_map_key() { - if (experimental_map_key_ != &::google::protobuf::internal::kEmptyString) { - experimental_map_key_->clear(); - } - clear_has_experimental_map_key(); -} -inline const ::std::string& FieldOptions::experimental_map_key() const { - return *experimental_map_key_; -} -inline void FieldOptions::set_experimental_map_key(const ::std::string& value) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(value); -} -inline void FieldOptions::set_experimental_map_key(const char* value) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(value); -} -inline void FieldOptions::set_experimental_map_key(const char* value, size_t size) { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) { - experimental_map_key_ = new ::std::string; - } - experimental_map_key_->assign(reinterpret_cast(value), size); -} -inline ::std::string* FieldOptions::mutable_experimental_map_key() { - set_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) { - experimental_map_key_ = new ::std::string; - } - return experimental_map_key_; -} -inline ::std::string* FieldOptions::release_experimental_map_key() { - clear_has_experimental_map_key(); - if (experimental_map_key_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = experimental_map_key_; - experimental_map_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int FieldOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void FieldOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -FieldOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -FieldOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// EnumOptions - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int EnumOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void EnumOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -EnumOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -EnumOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// EnumValueOptions - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int EnumValueOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void EnumValueOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -EnumValueOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -EnumValueOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// ServiceOptions - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int ServiceOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void ServiceOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -ServiceOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -ServiceOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// MethodOptions - -// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; -inline int MethodOptions::uninterpreted_option_size() const { - return uninterpreted_option_.size(); -} -inline void MethodOptions::clear_uninterpreted_option() { - uninterpreted_option_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const { - return uninterpreted_option_.Get(index); -} -inline ::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) { - return uninterpreted_option_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() { - return uninterpreted_option_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& -MethodOptions::uninterpreted_option() const { - return uninterpreted_option_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* -MethodOptions::mutable_uninterpreted_option() { - return &uninterpreted_option_; -} - -// ------------------------------------------------------------------- - -// UninterpretedOption_NamePart - -// required string name_part = 1; -inline bool UninterpretedOption_NamePart::has_name_part() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void UninterpretedOption_NamePart::set_has_name_part() { - _has_bits_[0] |= 0x00000001u; -} -inline void UninterpretedOption_NamePart::clear_has_name_part() { - _has_bits_[0] &= ~0x00000001u; -} -inline void UninterpretedOption_NamePart::clear_name_part() { - if (name_part_ != &::google::protobuf::internal::kEmptyString) { - name_part_->clear(); - } - clear_has_name_part(); -} -inline const ::std::string& UninterpretedOption_NamePart::name_part() const { - return *name_part_; -} -inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { - set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::kEmptyString) { - name_part_ = new ::std::string; - } - name_part_->assign(value); -} -inline void UninterpretedOption_NamePart::set_name_part(const char* value) { - set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::kEmptyString) { - name_part_ = new ::std::string; - } - name_part_->assign(value); -} -inline void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { - set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::kEmptyString) { - name_part_ = new ::std::string; - } - name_part_->assign(reinterpret_cast(value), size); -} -inline ::std::string* UninterpretedOption_NamePart::mutable_name_part() { - set_has_name_part(); - if (name_part_ == &::google::protobuf::internal::kEmptyString) { - name_part_ = new ::std::string; - } - return name_part_; -} -inline ::std::string* UninterpretedOption_NamePart::release_name_part() { - clear_has_name_part(); - if (name_part_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_part_; - name_part_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// required bool is_extension = 2; -inline bool UninterpretedOption_NamePart::has_is_extension() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void UninterpretedOption_NamePart::set_has_is_extension() { - _has_bits_[0] |= 0x00000002u; -} -inline void UninterpretedOption_NamePart::clear_has_is_extension() { - _has_bits_[0] &= ~0x00000002u; -} -inline void UninterpretedOption_NamePart::clear_is_extension() { - is_extension_ = false; - clear_has_is_extension(); -} -inline bool UninterpretedOption_NamePart::is_extension() const { - return is_extension_; -} -inline void UninterpretedOption_NamePart::set_is_extension(bool value) { - set_has_is_extension(); - is_extension_ = value; -} - -// ------------------------------------------------------------------- - -// UninterpretedOption - -// repeated .google.protobuf.UninterpretedOption.NamePart name = 2; -inline int UninterpretedOption::name_size() const { - return name_.size(); -} -inline void UninterpretedOption::clear_name() { - name_.Clear(); -} -inline const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const { - return name_.Get(index); -} -inline ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) { - return name_.Mutable(index); -} -inline ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() { - return name_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& -UninterpretedOption::name() const { - return name_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* -UninterpretedOption::mutable_name() { - return &name_; -} - -// optional string identifier_value = 3; -inline bool UninterpretedOption::has_identifier_value() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void UninterpretedOption::set_has_identifier_value() { - _has_bits_[0] |= 0x00000002u; -} -inline void UninterpretedOption::clear_has_identifier_value() { - _has_bits_[0] &= ~0x00000002u; -} -inline void UninterpretedOption::clear_identifier_value() { - if (identifier_value_ != &::google::protobuf::internal::kEmptyString) { - identifier_value_->clear(); - } - clear_has_identifier_value(); -} -inline const ::std::string& UninterpretedOption::identifier_value() const { - return *identifier_value_; -} -inline void UninterpretedOption::set_identifier_value(const ::std::string& value) { - set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::kEmptyString) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(value); -} -inline void UninterpretedOption::set_identifier_value(const char* value) { - set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::kEmptyString) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(value); -} -inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) { - set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::kEmptyString) { - identifier_value_ = new ::std::string; - } - identifier_value_->assign(reinterpret_cast(value), size); -} -inline ::std::string* UninterpretedOption::mutable_identifier_value() { - set_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::kEmptyString) { - identifier_value_ = new ::std::string; - } - return identifier_value_; -} -inline ::std::string* UninterpretedOption::release_identifier_value() { - clear_has_identifier_value(); - if (identifier_value_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = identifier_value_; - identifier_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional uint64 positive_int_value = 4; -inline bool UninterpretedOption::has_positive_int_value() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void UninterpretedOption::set_has_positive_int_value() { - _has_bits_[0] |= 0x00000004u; -} -inline void UninterpretedOption::clear_has_positive_int_value() { - _has_bits_[0] &= ~0x00000004u; -} -inline void UninterpretedOption::clear_positive_int_value() { - positive_int_value_ = GOOGLE_ULONGLONG(0); - clear_has_positive_int_value(); -} -inline ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const { - return positive_int_value_; -} -inline void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) { - set_has_positive_int_value(); - positive_int_value_ = value; -} - -// optional int64 negative_int_value = 5; -inline bool UninterpretedOption::has_negative_int_value() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void UninterpretedOption::set_has_negative_int_value() { - _has_bits_[0] |= 0x00000008u; -} -inline void UninterpretedOption::clear_has_negative_int_value() { - _has_bits_[0] &= ~0x00000008u; -} -inline void UninterpretedOption::clear_negative_int_value() { - negative_int_value_ = GOOGLE_LONGLONG(0); - clear_has_negative_int_value(); -} -inline ::google::protobuf::int64 UninterpretedOption::negative_int_value() const { - return negative_int_value_; -} -inline void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) { - set_has_negative_int_value(); - negative_int_value_ = value; -} - -// optional double double_value = 6; -inline bool UninterpretedOption::has_double_value() const { - return (_has_bits_[0] & 0x00000010u) != 0; -} -inline void UninterpretedOption::set_has_double_value() { - _has_bits_[0] |= 0x00000010u; -} -inline void UninterpretedOption::clear_has_double_value() { - _has_bits_[0] &= ~0x00000010u; -} -inline void UninterpretedOption::clear_double_value() { - double_value_ = 0; - clear_has_double_value(); -} -inline double UninterpretedOption::double_value() const { - return double_value_; -} -inline void UninterpretedOption::set_double_value(double value) { - set_has_double_value(); - double_value_ = value; -} - -// optional bytes string_value = 7; -inline bool UninterpretedOption::has_string_value() const { - return (_has_bits_[0] & 0x00000020u) != 0; -} -inline void UninterpretedOption::set_has_string_value() { - _has_bits_[0] |= 0x00000020u; -} -inline void UninterpretedOption::clear_has_string_value() { - _has_bits_[0] &= ~0x00000020u; -} -inline void UninterpretedOption::clear_string_value() { - if (string_value_ != &::google::protobuf::internal::kEmptyString) { - string_value_->clear(); - } - clear_has_string_value(); -} -inline const ::std::string& UninterpretedOption::string_value() const { - return *string_value_; -} -inline void UninterpretedOption::set_string_value(const ::std::string& value) { - set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::kEmptyString) { - string_value_ = new ::std::string; - } - string_value_->assign(value); -} -inline void UninterpretedOption::set_string_value(const char* value) { - set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::kEmptyString) { - string_value_ = new ::std::string; - } - string_value_->assign(value); -} -inline void UninterpretedOption::set_string_value(const void* value, size_t size) { - set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::kEmptyString) { - string_value_ = new ::std::string; - } - string_value_->assign(reinterpret_cast(value), size); -} -inline ::std::string* UninterpretedOption::mutable_string_value() { - set_has_string_value(); - if (string_value_ == &::google::protobuf::internal::kEmptyString) { - string_value_ = new ::std::string; - } - return string_value_; -} -inline ::std::string* UninterpretedOption::release_string_value() { - clear_has_string_value(); - if (string_value_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = string_value_; - string_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional string aggregate_value = 8; -inline bool UninterpretedOption::has_aggregate_value() const { - return (_has_bits_[0] & 0x00000040u) != 0; -} -inline void UninterpretedOption::set_has_aggregate_value() { - _has_bits_[0] |= 0x00000040u; -} -inline void UninterpretedOption::clear_has_aggregate_value() { - _has_bits_[0] &= ~0x00000040u; -} -inline void UninterpretedOption::clear_aggregate_value() { - if (aggregate_value_ != &::google::protobuf::internal::kEmptyString) { - aggregate_value_->clear(); - } - clear_has_aggregate_value(); -} -inline const ::std::string& UninterpretedOption::aggregate_value() const { - return *aggregate_value_; -} -inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) { - set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(value); -} -inline void UninterpretedOption::set_aggregate_value(const char* value) { - set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(value); -} -inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { - set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) { - aggregate_value_ = new ::std::string; - } - aggregate_value_->assign(reinterpret_cast(value), size); -} -inline ::std::string* UninterpretedOption::mutable_aggregate_value() { - set_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) { - aggregate_value_ = new ::std::string; - } - return aggregate_value_; -} -inline ::std::string* UninterpretedOption::release_aggregate_value() { - clear_has_aggregate_value(); - if (aggregate_value_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = aggregate_value_; - aggregate_value_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - -// SourceCodeInfo_Location - -// repeated int32 path = 1 [packed = true]; -inline int SourceCodeInfo_Location::path_size() const { - return path_.size(); -} -inline void SourceCodeInfo_Location::clear_path() { - path_.Clear(); -} -inline ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const { - return path_.Get(index); -} -inline void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) { - path_.Set(index, value); -} -inline void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) { - path_.Add(value); -} -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& -SourceCodeInfo_Location::path() const { - return path_; -} -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* -SourceCodeInfo_Location::mutable_path() { - return &path_; -} - -// repeated int32 span = 2 [packed = true]; -inline int SourceCodeInfo_Location::span_size() const { - return span_.size(); -} -inline void SourceCodeInfo_Location::clear_span() { - span_.Clear(); -} -inline ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const { - return span_.Get(index); -} -inline void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) { - span_.Set(index, value); -} -inline void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) { - span_.Add(value); -} -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& -SourceCodeInfo_Location::span() const { - return span_; -} -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* -SourceCodeInfo_Location::mutable_span() { - return &span_; -} - -// ------------------------------------------------------------------- - -// SourceCodeInfo - -// repeated .google.protobuf.SourceCodeInfo.Location location = 1; -inline int SourceCodeInfo::location_size() const { - return location_.size(); -} -inline void SourceCodeInfo::clear_location() { - location_.Clear(); -} -inline const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const { - return location_.Get(index); -} -inline ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) { - return location_.Mutable(index); -} -inline ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() { - return location_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& -SourceCodeInfo::location() const { - return location_; -} -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* -SourceCodeInfo::mutable_location() { - return &location_; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protobuf -} // namespace google - -#ifndef SWIG -namespace google { -namespace protobuf { - -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Type>() { - return ::google::protobuf::FieldDescriptorProto_Type_descriptor(); -} -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Label>() { - return ::google::protobuf::FieldDescriptorProto_Label_descriptor(); -} -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FileOptions_OptimizeMode>() { - return ::google::protobuf::FileOptions_OptimizeMode_descriptor(); -} -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_CType>() { - return ::google::protobuf::FieldOptions_CType_descriptor(); -} - -} // namespace google -} // namespace protobuf -#endif // SWIG - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_google_2fprotobuf_2fdescriptor_2eproto__INCLUDED diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.proto deleted file mode 100644 index 233f8794..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor.proto +++ /dev/null @@ -1,533 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - - -package google.protobuf; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field whithout harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; - } - repeated ExtensionRange extension_range = 5; - - optional MessageOptions options = 7; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - TYPE_INT64 = 3; // Not ZigZag encoded. Negative numbers - // take 10 bytes. Use TYPE_SINT64 if negative - // values are likely. - TYPE_UINT64 = 4; - TYPE_INT32 = 5; // Not ZigZag encoded. Negative numbers - // take 10 bytes. Use TYPE_SINT32 if negative - // values are likely. - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; // Tag-delimited aggregate. - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - // TODO(sanjay): Should we add LABEL_MAP? - }; - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be either TYPE_ENUM or TYPE_MESSAGE. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - optional FieldOptions options = 8; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; -} - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail kenton@google.com to reserve extension -// numbers. Simply tell me how many you need and I'll send you back a -// set of numbers to use -- there's no need to explain how you intend to -// use them. If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; - - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. This is - // purely a speed optimization, as the AbstractMessage base class includes - // reflection-based implementations of these methods. - optional bool java_generate_equals_and_hash = 20 [default=false]; - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default=SPEED]; - - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of proto2. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. - optional bool packed = 2; - - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; - - // EXPERIMENTAL. DO NOT USE. - // For "map" fields, the name of the field in the enclosed type that - // is the key for this map. For example, suppose we have: - // message Item { - // required string name = 1; - // required string value = 2; - // } - // message Config { - // repeated Item items = 1 [experimental_map_key="name"]; - // } - // In this situation, the map key for Item will be set to "name". - // TODO: Fully-implement this, then remove the "experimental_" prefix. - optional string experimental_map_key = 9; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; - - // TODO(kenton): Record comments appearing before and after the - // declaration. - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.cc deleted file mode 100644 index 23e48a67..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.cc +++ /dev/null @@ -1,541 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -DescriptorDatabase::~DescriptorDatabase() {} - -// =================================================================== - -template -bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( - const FileDescriptorProto& file, - Value value) { - if (!InsertIfNotPresent(&by_name_, file.name(), value)) { - GOOGLE_LOG(ERROR) << "File already exists in database: " << file.name(); - return false; - } - - // We must be careful here -- calling file.package() if file.has_package() is - // false could access an uninitialized static-storage variable if we are being - // run at startup time. - string path = file.has_package() ? file.package() : string(); - if (!path.empty()) path += '.'; - - for (int i = 0; i < file.message_type_size(); i++) { - if (!AddSymbol(path + file.message_type(i).name(), value)) return false; - if (!AddNestedExtensions(file.message_type(i), value)) return false; - } - for (int i = 0; i < file.enum_type_size(); i++) { - if (!AddSymbol(path + file.enum_type(i).name(), value)) return false; - } - for (int i = 0; i < file.extension_size(); i++) { - if (!AddSymbol(path + file.extension(i).name(), value)) return false; - if (!AddExtension(file.extension(i), value)) return false; - } - for (int i = 0; i < file.service_size(); i++) { - if (!AddSymbol(path + file.service(i).name(), value)) return false; - } - - return true; -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( - const string& name, Value value) { - // We need to make sure not to violate our map invariant. - - // If the symbol name is invalid it could break our lookup algorithm (which - // relies on the fact that '.' sorts before all other characters that are - // valid in symbol names). - if (!ValidateSymbolName(name)) { - GOOGLE_LOG(ERROR) << "Invalid symbol name: " << name; - return false; - } - - // Try to look up the symbol to make sure a super-symbol doesn't already - // exist. - typename map::iterator iter = FindLastLessOrEqual(name); - - if (iter == by_symbol_.end()) { - // Apparently the map is currently empty. Just insert and be done with it. - by_symbol_.insert(typename map::value_type(name, value)); - return true; - } - - if (IsSubSymbol(iter->first, name)) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << name << "\" conflicts with the existing " - "symbol \"" << iter->first << "\"."; - return false; - } - - // OK, that worked. Now we have to make sure that no symbol in the map is - // a sub-symbol of the one we are inserting. The only symbol which could - // be so is the first symbol that is greater than the new symbol. Since - // |iter| points at the last symbol that is less than or equal, we just have - // to increment it. - ++iter; - - if (iter != by_symbol_.end() && IsSubSymbol(name, iter->first)) { - GOOGLE_LOG(ERROR) << "Symbol name \"" << name << "\" conflicts with the existing " - "symbol \"" << iter->first << "\"."; - return false; - } - - // OK, no conflicts. - - // Insert the new symbol using the iterator as a hint, the new entry will - // appear immediately before the one the iterator is pointing at. - by_symbol_.insert(iter, typename map::value_type(name, value)); - - return true; -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::AddNestedExtensions( - const DescriptorProto& message_type, - Value value) { - for (int i = 0; i < message_type.nested_type_size(); i++) { - if (!AddNestedExtensions(message_type.nested_type(i), value)) return false; - } - for (int i = 0; i < message_type.extension_size(); i++) { - if (!AddExtension(message_type.extension(i), value)) return false; - } - return true; -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::AddExtension( - const FieldDescriptorProto& field, - Value value) { - if (!field.extendee().empty() && field.extendee()[0] == '.') { - // The extension is fully-qualified. We can use it as a lookup key in - // the by_symbol_ table. - if (!InsertIfNotPresent(&by_extension_, - make_pair(field.extendee().substr(1), - field.number()), - value)) { - GOOGLE_LOG(ERROR) << "Extension conflicts with extension already in database: " - "extend " << field.extendee() << " { " - << field.name() << " = " << field.number() << " }"; - return false; - } - } else { - // Not fully-qualified. We can't really do anything here, unfortunately. - // We don't consider this an error, though, because the descriptor is - // valid. - } - return true; -} - -template -Value SimpleDescriptorDatabase::DescriptorIndex::FindFile( - const string& filename) { - return FindWithDefault(by_name_, filename, Value()); -} - -template -Value SimpleDescriptorDatabase::DescriptorIndex::FindSymbol( - const string& name) { - typename map::iterator iter = FindLastLessOrEqual(name); - - return (iter != by_symbol_.end() && IsSubSymbol(iter->first, name)) ? - iter->second : Value(); -} - -template -Value SimpleDescriptorDatabase::DescriptorIndex::FindExtension( - const string& containing_type, - int field_number) { - return FindWithDefault(by_extension_, - make_pair(containing_type, field_number), - Value()); -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::FindAllExtensionNumbers( - const string& containing_type, - vector* output) { - typename map, Value >::const_iterator it = - by_extension_.lower_bound(make_pair(containing_type, 0)); - bool success = false; - - for (; it != by_extension_.end() && it->first.first == containing_type; - ++it) { - output->push_back(it->first.second); - success = true; - } - - return success; -} - -template -typename map::iterator -SimpleDescriptorDatabase::DescriptorIndex::FindLastLessOrEqual( - const string& name) { - // Find the last key in the map which sorts less than or equal to the - // symbol name. Since upper_bound() returns the *first* key that sorts - // *greater* than the input, we want the element immediately before that. - typename map::iterator iter = by_symbol_.upper_bound(name); - if (iter != by_symbol_.begin()) --iter; - return iter; -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::IsSubSymbol( - const string& sub_symbol, const string& super_symbol) { - return sub_symbol == super_symbol || - (HasPrefixString(super_symbol, sub_symbol) && - super_symbol[sub_symbol.size()] == '.'); -} - -template -bool SimpleDescriptorDatabase::DescriptorIndex::ValidateSymbolName( - const string& name) { - for (int i = 0; i < name.size(); i++) { - // I don't trust ctype.h due to locales. :( - if (name[i] != '.' && name[i] != '_' && - (name[i] < '0' || name[i] > '9') && - (name[i] < 'A' || name[i] > 'Z') && - (name[i] < 'a' || name[i] > 'z')) { - return false; - } - } - return true; -} - -// ------------------------------------------------------------------- - -SimpleDescriptorDatabase::SimpleDescriptorDatabase() {} -SimpleDescriptorDatabase::~SimpleDescriptorDatabase() { - STLDeleteElements(&files_to_delete_); -} - -bool SimpleDescriptorDatabase::Add(const FileDescriptorProto& file) { - FileDescriptorProto* new_file = new FileDescriptorProto; - new_file->CopyFrom(file); - return AddAndOwn(new_file); -} - -bool SimpleDescriptorDatabase::AddAndOwn(const FileDescriptorProto* file) { - files_to_delete_.push_back(file); - return index_.AddFile(*file, file); -} - -bool SimpleDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { - return MaybeCopy(index_.FindFile(filename), output); -} - -bool SimpleDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { - return MaybeCopy(index_.FindSymbol(symbol_name), output); -} - -bool SimpleDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, - FileDescriptorProto* output) { - return MaybeCopy(index_.FindExtension(containing_type, field_number), output); -} - -bool SimpleDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - vector* output) { - return index_.FindAllExtensionNumbers(extendee_type, output); -} - -bool SimpleDescriptorDatabase::MaybeCopy(const FileDescriptorProto* file, - FileDescriptorProto* output) { - if (file == NULL) return false; - output->CopyFrom(*file); - return true; -} - -// ------------------------------------------------------------------- - -EncodedDescriptorDatabase::EncodedDescriptorDatabase() {} -EncodedDescriptorDatabase::~EncodedDescriptorDatabase() { - for (int i = 0; i < files_to_delete_.size(); i++) { - operator delete(files_to_delete_[i]); - } -} - -bool EncodedDescriptorDatabase::Add( - const void* encoded_file_descriptor, int size) { - FileDescriptorProto file; - if (file.ParseFromArray(encoded_file_descriptor, size)) { - return index_.AddFile(file, make_pair(encoded_file_descriptor, size)); - } else { - GOOGLE_LOG(ERROR) << "Invalid file descriptor data passed to " - "EncodedDescriptorDatabase::Add()."; - return false; - } -} - -bool EncodedDescriptorDatabase::AddCopy( - const void* encoded_file_descriptor, int size) { - void* copy = operator new(size); - memcpy(copy, encoded_file_descriptor, size); - files_to_delete_.push_back(copy); - return Add(copy, size); -} - -bool EncodedDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { - return MaybeParse(index_.FindFile(filename), output); -} - -bool EncodedDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { - return MaybeParse(index_.FindSymbol(symbol_name), output); -} - -bool EncodedDescriptorDatabase::FindNameOfFileContainingSymbol( - const string& symbol_name, - string* output) { - pair encoded_file = index_.FindSymbol(symbol_name); - if (encoded_file.first == NULL) return false; - - // Optimization: The name should be the first field in the encoded message. - // Try to just read it directly. - io::CodedInputStream input(reinterpret_cast(encoded_file.first), - encoded_file.second); - - const uint32 kNameTag = internal::WireFormatLite::MakeTag( - FileDescriptorProto::kNameFieldNumber, - internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - - if (input.ReadTag() == kNameTag) { - // Success! - return internal::WireFormatLite::ReadString(&input, output); - } else { - // Slow path. Parse whole message. - FileDescriptorProto file_proto; - if (!file_proto.ParseFromArray(encoded_file.first, encoded_file.second)) { - return false; - } - *output = file_proto.name(); - return true; - } -} - -bool EncodedDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, - FileDescriptorProto* output) { - return MaybeParse(index_.FindExtension(containing_type, field_number), - output); -} - -bool EncodedDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - vector* output) { - return index_.FindAllExtensionNumbers(extendee_type, output); -} - -bool EncodedDescriptorDatabase::MaybeParse( - pair encoded_file, - FileDescriptorProto* output) { - if (encoded_file.first == NULL) return false; - return output->ParseFromArray(encoded_file.first, encoded_file.second); -} - -// =================================================================== - -DescriptorPoolDatabase::DescriptorPoolDatabase(const DescriptorPool& pool) - : pool_(pool) {} -DescriptorPoolDatabase::~DescriptorPoolDatabase() {} - -bool DescriptorPoolDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { - const FileDescriptor* file = pool_.FindFileByName(filename); - if (file == NULL) return false; - output->Clear(); - file->CopyTo(output); - return true; -} - -bool DescriptorPoolDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { - const FileDescriptor* file = pool_.FindFileContainingSymbol(symbol_name); - if (file == NULL) return false; - output->Clear(); - file->CopyTo(output); - return true; -} - -bool DescriptorPoolDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, - FileDescriptorProto* output) { - const Descriptor* extendee = pool_.FindMessageTypeByName(containing_type); - if (extendee == NULL) return false; - - const FieldDescriptor* extension = - pool_.FindExtensionByNumber(extendee, field_number); - if (extension == NULL) return false; - - output->Clear(); - extension->file()->CopyTo(output); - return true; -} - -bool DescriptorPoolDatabase::FindAllExtensionNumbers( - const string& extendee_type, - vector* output) { - const Descriptor* extendee = pool_.FindMessageTypeByName(extendee_type); - if (extendee == NULL) return false; - - vector extensions; - pool_.FindAllExtensions(extendee, &extensions); - - for (int i = 0; i < extensions.size(); ++i) { - output->push_back(extensions[i]->number()); - } - - return true; -} - -// =================================================================== - -MergedDescriptorDatabase::MergedDescriptorDatabase( - DescriptorDatabase* source1, - DescriptorDatabase* source2) { - sources_.push_back(source1); - sources_.push_back(source2); -} -MergedDescriptorDatabase::MergedDescriptorDatabase( - const vector& sources) - : sources_(sources) {} -MergedDescriptorDatabase::~MergedDescriptorDatabase() {} - -bool MergedDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { - for (int i = 0; i < sources_.size(); i++) { - if (sources_[i]->FindFileByName(filename, output)) { - return true; - } - } - return false; -} - -bool MergedDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { - for (int i = 0; i < sources_.size(); i++) { - if (sources_[i]->FindFileContainingSymbol(symbol_name, output)) { - // The symbol was found in source i. However, if one of the previous - // sources defines a file with the same name (which presumably doesn't - // contain the symbol, since it wasn't found in that source), then we - // must hide it from the caller. - FileDescriptorProto temp; - for (int j = 0; j < i; j++) { - if (sources_[j]->FindFileByName(output->name(), &temp)) { - // Found conflicting file in a previous source. - return false; - } - } - return true; - } - } - return false; -} - -bool MergedDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, - FileDescriptorProto* output) { - for (int i = 0; i < sources_.size(); i++) { - if (sources_[i]->FindFileContainingExtension( - containing_type, field_number, output)) { - // The symbol was found in source i. However, if one of the previous - // sources defines a file with the same name (which presumably doesn't - // contain the symbol, since it wasn't found in that source), then we - // must hide it from the caller. - FileDescriptorProto temp; - for (int j = 0; j < i; j++) { - if (sources_[j]->FindFileByName(output->name(), &temp)) { - // Found conflicting file in a previous source. - return false; - } - } - return true; - } - } - return false; -} - -bool MergedDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - vector* output) { - set merged_results; - vector results; - bool success = false; - - for (int i = 0; i < sources_.size(); i++) { - if (sources_[i]->FindAllExtensionNumbers(extendee_type, &results)) { - copy(results.begin(), results.end(), - insert_iterator >(merged_results, merged_results.begin())); - success = true; - } - results.clear(); - } - - copy(merged_results.begin(), merged_results.end(), - insert_iterator >(*output, output->end())); - - return success; -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.h deleted file mode 100644 index f32b1db9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database.h +++ /dev/null @@ -1,366 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Interface for manipulating databases of descriptors. - -#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_DATABASE_H__ -#define GOOGLE_PROTOBUF_DESCRIPTOR_DATABASE_H__ - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -// Defined in this file. -class DescriptorDatabase; -class SimpleDescriptorDatabase; -class EncodedDescriptorDatabase; -class DescriptorPoolDatabase; -class MergedDescriptorDatabase; - -// Abstract interface for a database of descriptors. -// -// This is useful if you want to create a DescriptorPool which loads -// descriptors on-demand from some sort of large database. If the database -// is large, it may be inefficient to enumerate every .proto file inside it -// calling DescriptorPool::BuildFile() for each one. Instead, a DescriptorPool -// can be created which wraps a DescriptorDatabase and only builds particular -// descriptors when they are needed. -class LIBPROTOBUF_EXPORT DescriptorDatabase { - public: - inline DescriptorDatabase() {} - virtual ~DescriptorDatabase(); - - // Find a file by file name. Fills in in *output and returns true if found. - // Otherwise, returns false, leaving the contents of *output undefined. - virtual bool FindFileByName(const string& filename, - FileDescriptorProto* output) = 0; - - // Find the file that declares the given fully-qualified symbol name. - // If found, fills in *output and returns true, otherwise returns false - // and leaves *output undefined. - virtual bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output) = 0; - - // Find the file which defines an extension extending the given message type - // with the given field number. If found, fills in *output and returns true, - // otherwise returns false and leaves *output undefined. containing_type - // must be a fully-qualified type name. - virtual bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output) = 0; - - // Finds the tag numbers used by all known extensions of - // extendee_type, and appends them to output in an undefined - // order. This method is best-effort: it's not guaranteed that the - // database will find all extensions, and it's not guaranteed that - // FindFileContainingExtension will return true on all of the found - // numbers. Returns true if the search was successful, otherwise - // returns false and leaves output unchanged. - // - // This method has a default implementation that always returns - // false. - virtual bool FindAllExtensionNumbers(const string& extendee_type, - vector* output) { - return false; - } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorDatabase); -}; - -// A DescriptorDatabase into which you can insert files manually. -// -// FindFileContainingSymbol() is fully-implemented. When you add a file, its -// symbols will be indexed for this purpose. Note that the implementation -// may return false positives, but only if it isn't possible for the symbol -// to be defined in any other file. In particular, if a file defines a symbol -// "Foo", then searching for "Foo.[anything]" will match that file. This way, -// the database does not need to aggressively index all children of a symbol. -// -// FindFileContainingExtension() is mostly-implemented. It works if and only -// if the original FieldDescriptorProto defining the extension has a -// fully-qualified type name in its "extendee" field (i.e. starts with a '.'). -// If the extendee is a relative name, SimpleDescriptorDatabase will not -// attempt to resolve the type, so it will not know what type the extension is -// extending. Therefore, calling FindFileContainingExtension() with the -// extension's containing type will never actually find that extension. Note -// that this is an unlikely problem, as all FileDescriptorProtos created by the -// protocol compiler (as well as ones created by calling -// FileDescriptor::CopyTo()) will always use fully-qualified names for all -// types. You only need to worry if you are constructing FileDescriptorProtos -// yourself, or are calling compiler::Parser directly. -class LIBPROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { - public: - SimpleDescriptorDatabase(); - ~SimpleDescriptorDatabase(); - - // Adds the FileDescriptorProto to the database, making a copy. The object - // can be deleted after Add() returns. Returns false if the file conflicted - // with a file already in the database, in which case an error will have - // been written to GOOGLE_LOG(ERROR). - bool Add(const FileDescriptorProto& file); - - // Adds the FileDescriptorProto to the database and takes ownership of it. - bool AddAndOwn(const FileDescriptorProto* file); - - // implements DescriptorDatabase ----------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output); - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output); - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output); - bool FindAllExtensionNumbers(const string& extendee_type, - vector* output); - - private: - // So that it can use DescriptorIndex. - friend class EncodedDescriptorDatabase; - - // An index mapping file names, symbol names, and extension numbers to - // some sort of values. - template - class DescriptorIndex { - public: - // Helpers to recursively add particular descriptors and all their contents - // to the index. - bool AddFile(const FileDescriptorProto& file, - Value value); - bool AddSymbol(const string& name, Value value); - bool AddNestedExtensions(const DescriptorProto& message_type, - Value value); - bool AddExtension(const FieldDescriptorProto& field, - Value value); - - Value FindFile(const string& filename); - Value FindSymbol(const string& name); - Value FindExtension(const string& containing_type, int field_number); - bool FindAllExtensionNumbers(const string& containing_type, - vector* output); - - private: - map by_name_; - map by_symbol_; - map, Value> by_extension_; - - // Invariant: The by_symbol_ map does not contain any symbols which are - // prefixes of other symbols in the map. For example, "foo.bar" is a - // prefix of "foo.bar.baz" (but is not a prefix of "foo.barbaz"). - // - // This invariant is important because it means that given a symbol name, - // we can find a key in the map which is a prefix of the symbol in O(lg n) - // time, and we know that there is at most one such key. - // - // The prefix lookup algorithm works like so: - // 1) Find the last key in the map which is less than or equal to the - // search key. - // 2) If the found key is a prefix of the search key, then return it. - // Otherwise, there is no match. - // - // I am sure this algorithm has been described elsewhere, but since I - // wasn't able to find it quickly I will instead prove that it works - // myself. The key to the algorithm is that if a match exists, step (1) - // will find it. Proof: - // 1) Define the "search key" to be the key we are looking for, the "found - // key" to be the key found in step (1), and the "match key" to be the - // key which actually matches the serach key (i.e. the key we're trying - // to find). - // 2) The found key must be less than or equal to the search key by - // definition. - // 3) The match key must also be less than or equal to the search key - // (because it is a prefix). - // 4) The match key cannot be greater than the found key, because if it - // were, then step (1) of the algorithm would have returned the match - // key instead (since it finds the *greatest* key which is less than or - // equal to the search key). - // 5) Therefore, the found key must be between the match key and the search - // key, inclusive. - // 6) Since the search key must be a sub-symbol of the match key, if it is - // not equal to the match key, then search_key[match_key.size()] must - // be '.'. - // 7) Since '.' sorts before any other character that is valid in a symbol - // name, then if the found key is not equal to the match key, then - // found_key[match_key.size()] must also be '.', because any other value - // would make it sort after the search key. - // 8) Therefore, if the found key is not equal to the match key, then the - // found key must be a sub-symbol of the match key. However, this would - // contradict our map invariant which says that no symbol in the map is - // a sub-symbol of any other. - // 9) Therefore, the found key must match the match key. - // - // The above proof assumes the match key exists. In the case that the - // match key does not exist, then step (1) will return some other symbol. - // That symbol cannot be a super-symbol of the search key since if it were, - // then it would be a match, and we're assuming the match key doesn't exist. - // Therefore, step 2 will correctly return no match. - - // Find the last entry in the by_symbol_ map whose key is less than or - // equal to the given name. - typename map::iterator FindLastLessOrEqual( - const string& name); - - // True if either the arguments are equal or super_symbol identifies a - // parent symbol of sub_symbol (e.g. "foo.bar" is a parent of - // "foo.bar.baz", but not a parent of "foo.barbaz"). - bool IsSubSymbol(const string& sub_symbol, const string& super_symbol); - - // Returns true if and only if all characters in the name are alphanumerics, - // underscores, or periods. - bool ValidateSymbolName(const string& name); - }; - - - DescriptorIndex index_; - vector files_to_delete_; - - // If file is non-NULL, copy it into *output and return true, otherwise - // return false. - bool MaybeCopy(const FileDescriptorProto* file, - FileDescriptorProto* output); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(SimpleDescriptorDatabase); -}; - -// Very similar to SimpleDescriptorDatabase, but stores all the descriptors -// as raw bytes and generally tries to use as little memory as possible. -// -// The same caveats regarding FindFileContainingExtension() apply as with -// SimpleDescriptorDatabase. -class LIBPROTOBUF_EXPORT EncodedDescriptorDatabase : public DescriptorDatabase { - public: - EncodedDescriptorDatabase(); - ~EncodedDescriptorDatabase(); - - // Adds the FileDescriptorProto to the database. The descriptor is provided - // in encoded form. The database does not make a copy of the bytes, nor - // does it take ownership; it's up to the caller to make sure the bytes - // remain valid for the life of the database. Returns false and logs an error - // if the bytes are not a valid FileDescriptorProto or if the file conflicted - // with a file already in the database. - bool Add(const void* encoded_file_descriptor, int size); - - // Like Add(), but makes a copy of the data, so that the caller does not - // need to keep it around. - bool AddCopy(const void* encoded_file_descriptor, int size); - - // Like FindFileContainingSymbol but returns only the name of the file. - bool FindNameOfFileContainingSymbol(const string& symbol_name, - string* output); - - // implements DescriptorDatabase ----------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output); - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output); - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output); - bool FindAllExtensionNumbers(const string& extendee_type, - vector* output); - - private: - SimpleDescriptorDatabase::DescriptorIndex > index_; - vector files_to_delete_; - - // If encoded_file.first is non-NULL, parse the data into *output and return - // true, otherwise return false. - bool MaybeParse(pair encoded_file, - FileDescriptorProto* output); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EncodedDescriptorDatabase); -}; - -// A DescriptorDatabase that fetches files from a given pool. -class LIBPROTOBUF_EXPORT DescriptorPoolDatabase : public DescriptorDatabase { - public: - DescriptorPoolDatabase(const DescriptorPool& pool); - ~DescriptorPoolDatabase(); - - // implements DescriptorDatabase ----------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output); - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output); - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output); - bool FindAllExtensionNumbers(const string& extendee_type, - vector* output); - - private: - const DescriptorPool& pool_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DescriptorPoolDatabase); -}; - -// A DescriptorDatabase that wraps two or more others. It first searches the -// first database and, if that fails, tries the second, and so on. -class LIBPROTOBUF_EXPORT MergedDescriptorDatabase : public DescriptorDatabase { - public: - // Merge just two databases. The sources remain property of the caller. - MergedDescriptorDatabase(DescriptorDatabase* source1, - DescriptorDatabase* source2); - // Merge more than two databases. The sources remain property of the caller. - // The vector may be deleted after the constructor returns but the - // DescriptorDatabases need to stick around. - MergedDescriptorDatabase(const vector& sources); - ~MergedDescriptorDatabase(); - - // implements DescriptorDatabase ----------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output); - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output); - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output); - // Merges the results of calling all databases. Returns true iff any - // of the databases returned true. - bool FindAllExtensionNumbers(const string& extendee_type, - vector* output); - - private: - vector sources_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MergedDescriptorDatabase); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_DESCRIPTOR_DATABASE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database_unittest.cc deleted file mode 100644 index ac72ddcd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_database_unittest.cc +++ /dev/null @@ -1,748 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file makes extensive use of RFC 3092. :) - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace { - -static void AddToDatabase(SimpleDescriptorDatabase* database, - const char* file_text) { - FileDescriptorProto file_proto; - EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); - database->Add(file_proto); -} - -static void ExpectContainsType(const FileDescriptorProto& proto, - const string& type_name) { - for (int i = 0; i < proto.message_type_size(); i++) { - if (proto.message_type(i).name() == type_name) return; - } - ADD_FAILURE() << "\"" << proto.name() - << "\" did not contain expected type \"" - << type_name << "\"."; -} - -// =================================================================== - -#if GTEST_HAS_PARAM_TEST - -// SimpleDescriptorDatabase, EncodedDescriptorDatabase, and -// DescriptorPoolDatabase call for very similar tests. Instead of writing -// three nearly-identical sets of tests, we use parameterized tests to apply -// the same code to all three. - -// The parameterized test runs against a DescriptarDatabaseTestCase. We have -// implementations for each of the three classes we want to test. -class DescriptorDatabaseTestCase { - public: - virtual ~DescriptorDatabaseTestCase() {} - - virtual DescriptorDatabase* GetDatabase() = 0; - virtual bool AddToDatabase(const FileDescriptorProto& file) = 0; -}; - -// Factory function type. -typedef DescriptorDatabaseTestCase* DescriptorDatabaseTestCaseFactory(); - -// Specialization for SimpleDescriptorDatabase. -class SimpleDescriptorDatabaseTestCase : public DescriptorDatabaseTestCase { - public: - static DescriptorDatabaseTestCase* New() { - return new SimpleDescriptorDatabaseTestCase; - } - - virtual ~SimpleDescriptorDatabaseTestCase() {} - - virtual DescriptorDatabase* GetDatabase() { - return &database_; - } - virtual bool AddToDatabase(const FileDescriptorProto& file) { - return database_.Add(file); - } - - private: - SimpleDescriptorDatabase database_; -}; - -// Specialization for EncodedDescriptorDatabase. -class EncodedDescriptorDatabaseTestCase : public DescriptorDatabaseTestCase { - public: - static DescriptorDatabaseTestCase* New() { - return new EncodedDescriptorDatabaseTestCase; - } - - virtual ~EncodedDescriptorDatabaseTestCase() {} - - virtual DescriptorDatabase* GetDatabase() { - return &database_; - } - virtual bool AddToDatabase(const FileDescriptorProto& file) { - string data; - file.SerializeToString(&data); - return database_.AddCopy(data.data(), data.size()); - } - - private: - EncodedDescriptorDatabase database_; -}; - -// Specialization for DescriptorPoolDatabase. -class DescriptorPoolDatabaseTestCase : public DescriptorDatabaseTestCase { - public: - static DescriptorDatabaseTestCase* New() { - return new EncodedDescriptorDatabaseTestCase; - } - - DescriptorPoolDatabaseTestCase() : database_(pool_) {} - virtual ~DescriptorPoolDatabaseTestCase() {} - - virtual DescriptorDatabase* GetDatabase() { - return &database_; - } - virtual bool AddToDatabase(const FileDescriptorProto& file) { - return pool_.BuildFile(file); - } - - private: - DescriptorPool pool_; - DescriptorPoolDatabase database_; -}; - -// ------------------------------------------------------------------- - -class DescriptorDatabaseTest - : public testing::TestWithParam { - protected: - virtual void SetUp() { - test_case_.reset(GetParam()()); - database_ = test_case_->GetDatabase(); - } - - void AddToDatabase(const char* file_descriptor_text) { - FileDescriptorProto file_proto; - EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); - EXPECT_TRUE(test_case_->AddToDatabase(file_proto)); - } - - void AddToDatabaseWithError(const char* file_descriptor_text) { - FileDescriptorProto file_proto; - EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); - EXPECT_FALSE(test_case_->AddToDatabase(file_proto)); - } - - scoped_ptr test_case_; - DescriptorDatabase* database_; -}; - -TEST_P(DescriptorDatabaseTest, FindFileByName) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { name:\"Foo\" }"); - AddToDatabase( - "name: \"bar.proto\" " - "message_type { name:\"Bar\" }"); - - { - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileByName("foo.proto", &file)); - EXPECT_EQ("foo.proto", file.name()); - ExpectContainsType(file, "Foo"); - } - - { - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileByName("bar.proto", &file)); - EXPECT_EQ("bar.proto", file.name()); - ExpectContainsType(file, "Bar"); - } - - { - // Fails to find undefined files. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileByName("baz.proto", &file)); - } -} - -TEST_P(DescriptorDatabaseTest, FindFileContainingSymbol) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { " - " name: \"Foo\" " - " field { name:\"qux\" }" - " nested_type { name: \"Grault\" } " - " enum_type { name: \"Garply\" } " - "} " - "enum_type { " - " name: \"Waldo\" " - " value { name:\"FRED\" } " - "} " - "extension { name: \"plugh\" } " - "service { " - " name: \"Xyzzy\" " - " method { name: \"Thud\" } " - "}" - ); - AddToDatabase( - "name: \"bar.proto\" " - "package: \"corge\" " - "message_type { name: \"Bar\" }"); - - { - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Foo", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find fields. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Foo.qux", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find nested types. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Foo.Grault", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find nested enums. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Foo.Garply", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find enum types. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Waldo", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find enum values. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Waldo.FRED", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find extensions. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("plugh", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find services. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Xyzzy", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find methods. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("Xyzzy.Thud", &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - // Can find things in packages. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingSymbol("corge.Bar", &file)); - EXPECT_EQ("bar.proto", file.name()); - } - - { - // Fails to find undefined symbols. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileContainingSymbol("Baz", &file)); - } - - { - // Names must be fully-qualified. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileContainingSymbol("Bar", &file)); - } -} - -TEST_P(DescriptorDatabaseTest, FindFileContainingExtension) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { " - " name: \"Foo\" " - " extension_range { start: 1 end: 1000 } " - " extension { name:\"qux\" label:LABEL_OPTIONAL type:TYPE_INT32 number:5 " - " extendee: \".Foo\" }" - "}"); - AddToDatabase( - "name: \"bar.proto\" " - "package: \"corge\" " - "dependency: \"foo.proto\" " - "message_type { " - " name: \"Bar\" " - " extension_range { start: 1 end: 1000 } " - "} " - "extension { name:\"grault\" extendee: \".Foo\" number:32 } " - "extension { name:\"garply\" extendee: \".corge.Bar\" number:70 } " - "extension { name:\"waldo\" extendee: \"Bar\" number:56 } "); - - { - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingExtension("Foo", 5, &file)); - EXPECT_EQ("foo.proto", file.name()); - } - - { - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingExtension("Foo", 32, &file)); - EXPECT_EQ("bar.proto", file.name()); - } - - { - // Can find extensions for qualified type names. - FileDescriptorProto file; - EXPECT_TRUE(database_->FindFileContainingExtension("corge.Bar", 70, &file)); - EXPECT_EQ("bar.proto", file.name()); - } - - { - // Can't find extensions whose extendee was not fully-qualified in the - // FileDescriptorProto. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileContainingExtension("Bar", 56, &file)); - EXPECT_FALSE( - database_->FindFileContainingExtension("corge.Bar", 56, &file)); - } - - { - // Can't find non-existent extension numbers. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileContainingExtension("Foo", 12, &file)); - } - - { - // Can't find extensions for non-existent types. - FileDescriptorProto file; - EXPECT_FALSE( - database_->FindFileContainingExtension("NoSuchType", 5, &file)); - } - - { - // Can't find extensions for unqualified type names. - FileDescriptorProto file; - EXPECT_FALSE(database_->FindFileContainingExtension("Bar", 70, &file)); - } -} - -TEST_P(DescriptorDatabaseTest, FindAllExtensionNumbers) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { " - " name: \"Foo\" " - " extension_range { start: 1 end: 1000 } " - " extension { name:\"qux\" label:LABEL_OPTIONAL type:TYPE_INT32 number:5 " - " extendee: \".Foo\" }" - "}"); - AddToDatabase( - "name: \"bar.proto\" " - "package: \"corge\" " - "dependency: \"foo.proto\" " - "message_type { " - " name: \"Bar\" " - " extension_range { start: 1 end: 1000 } " - "} " - "extension { name:\"grault\" extendee: \".Foo\" number:32 } " - "extension { name:\"garply\" extendee: \".corge.Bar\" number:70 } " - "extension { name:\"waldo\" extendee: \"Bar\" number:56 } "); - - { - vector numbers; - EXPECT_TRUE(database_->FindAllExtensionNumbers("Foo", &numbers)); - ASSERT_EQ(2, numbers.size()); - sort(numbers.begin(), numbers.end()); - EXPECT_EQ(5, numbers[0]); - EXPECT_EQ(32, numbers[1]); - } - - { - vector numbers; - EXPECT_TRUE(database_->FindAllExtensionNumbers("corge.Bar", &numbers)); - // Note: won't find extension 56 due to the name not being fully qualified. - ASSERT_EQ(1, numbers.size()); - EXPECT_EQ(70, numbers[0]); - } - - { - // Can't find extensions for non-existent types. - vector numbers; - EXPECT_FALSE(database_->FindAllExtensionNumbers("NoSuchType", &numbers)); - } - - { - // Can't find extensions for unqualified types. - vector numbers; - EXPECT_FALSE(database_->FindAllExtensionNumbers("Bar", &numbers)); - } -} - -TEST_P(DescriptorDatabaseTest, ConflictingFileError) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { " - " name: \"Foo\" " - "}"); - AddToDatabaseWithError( - "name: \"foo.proto\" " - "message_type { " - " name: \"Bar\" " - "}"); -} - -TEST_P(DescriptorDatabaseTest, ConflictingTypeError) { - AddToDatabase( - "name: \"foo.proto\" " - "message_type { " - " name: \"Foo\" " - "}"); - AddToDatabaseWithError( - "name: \"bar.proto\" " - "message_type { " - " name: \"Foo\" " - "}"); -} - -TEST_P(DescriptorDatabaseTest, ConflictingExtensionError) { - AddToDatabase( - "name: \"foo.proto\" " - "extension { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:5 " - " extendee: \".Foo\" }"); - AddToDatabaseWithError( - "name: \"bar.proto\" " - "extension { name:\"bar\" label:LABEL_OPTIONAL type:TYPE_INT32 number:5 " - " extendee: \".Foo\" }"); -} - -INSTANTIATE_TEST_CASE_P(Simple, DescriptorDatabaseTest, - testing::Values(&SimpleDescriptorDatabaseTestCase::New)); -INSTANTIATE_TEST_CASE_P(MemoryConserving, DescriptorDatabaseTest, - testing::Values(&EncodedDescriptorDatabaseTestCase::New)); -INSTANTIATE_TEST_CASE_P(Pool, DescriptorDatabaseTest, - testing::Values(&DescriptorPoolDatabaseTestCase::New)); - -#endif // GTEST_HAS_PARAM_TEST - -TEST(EncodedDescriptorDatabaseExtraTest, FindNameOfFileContainingSymbol) { - // Create two files, one of which is in two parts. - FileDescriptorProto file1, file2a, file2b; - file1.set_name("foo.proto"); - file1.set_package("foo"); - file1.add_message_type()->set_name("Foo"); - file2a.set_name("bar.proto"); - file2b.set_package("bar"); - file2b.add_message_type()->set_name("Bar"); - - // Normal serialization allows our optimization to kick in. - string data1 = file1.SerializeAsString(); - - // Force out-of-order serialization to test slow path. - string data2 = file2b.SerializeAsString() + file2a.SerializeAsString(); - - // Create EncodedDescriptorDatabase containing both files. - EncodedDescriptorDatabase db; - db.Add(data1.data(), data1.size()); - db.Add(data2.data(), data2.size()); - - // Test! - string filename; - EXPECT_TRUE(db.FindNameOfFileContainingSymbol("foo.Foo", &filename)); - EXPECT_EQ("foo.proto", filename); - EXPECT_TRUE(db.FindNameOfFileContainingSymbol("foo.Foo.Blah", &filename)); - EXPECT_EQ("foo.proto", filename); - EXPECT_TRUE(db.FindNameOfFileContainingSymbol("bar.Bar", &filename)); - EXPECT_EQ("bar.proto", filename); - EXPECT_FALSE(db.FindNameOfFileContainingSymbol("foo", &filename)); - EXPECT_FALSE(db.FindNameOfFileContainingSymbol("bar", &filename)); - EXPECT_FALSE(db.FindNameOfFileContainingSymbol("baz.Baz", &filename)); -} - -// =================================================================== - -class MergedDescriptorDatabaseTest : public testing::Test { - protected: - MergedDescriptorDatabaseTest() - : forward_merged_(&database1_, &database2_), - reverse_merged_(&database2_, &database1_) {} - - virtual void SetUp() { - AddToDatabase(&database1_, - "name: \"foo.proto\" " - "message_type { name:\"Foo\" extension_range { start: 1 end: 100 } } " - "extension { name:\"foo_ext\" extendee: \".Foo\" number:3 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } "); - AddToDatabase(&database2_, - "name: \"bar.proto\" " - "message_type { name:\"Bar\" extension_range { start: 1 end: 100 } } " - "extension { name:\"bar_ext\" extendee: \".Bar\" number:5 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } "); - - // baz.proto exists in both pools, with different definitions. - AddToDatabase(&database1_, - "name: \"baz.proto\" " - "message_type { name:\"Baz\" extension_range { start: 1 end: 100 } } " - "message_type { name:\"FromPool1\" } " - "extension { name:\"baz_ext\" extendee: \".Baz\" number:12 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } " - "extension { name:\"database1_only_ext\" extendee: \".Baz\" number:13 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } "); - AddToDatabase(&database2_, - "name: \"baz.proto\" " - "message_type { name:\"Baz\" extension_range { start: 1 end: 100 } } " - "message_type { name:\"FromPool2\" } " - "extension { name:\"baz_ext\" extendee: \".Baz\" number:12 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } "); - } - - SimpleDescriptorDatabase database1_; - SimpleDescriptorDatabase database2_; - - MergedDescriptorDatabase forward_merged_; - MergedDescriptorDatabase reverse_merged_; -}; - -TEST_F(MergedDescriptorDatabaseTest, FindFileByName) { - { - // Can find file that is only in database1_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileByName("foo.proto", &file)); - EXPECT_EQ("foo.proto", file.name()); - ExpectContainsType(file, "Foo"); - } - - { - // Can find file that is only in database2_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileByName("bar.proto", &file)); - EXPECT_EQ("bar.proto", file.name()); - ExpectContainsType(file, "Bar"); - } - - { - // In forward_merged_, database1_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileByName("baz.proto", &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool1"); - } - - { - // In reverse_merged_, database2_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE(reverse_merged_.FindFileByName("baz.proto", &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool2"); - } - - { - // Can't find non-existent file. - FileDescriptorProto file; - EXPECT_FALSE(forward_merged_.FindFileByName("no_such.proto", &file)); - } -} - -TEST_F(MergedDescriptorDatabaseTest, FindFileContainingSymbol) { - { - // Can find file that is only in database1_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileContainingSymbol("Foo", &file)); - EXPECT_EQ("foo.proto", file.name()); - ExpectContainsType(file, "Foo"); - } - - { - // Can find file that is only in database2_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileContainingSymbol("Bar", &file)); - EXPECT_EQ("bar.proto", file.name()); - ExpectContainsType(file, "Bar"); - } - - { - // In forward_merged_, database1_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileContainingSymbol("Baz", &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool1"); - } - - { - // In reverse_merged_, database2_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE(reverse_merged_.FindFileContainingSymbol("Baz", &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool2"); - } - - { - // FromPool1 only shows up in forward_merged_ because it is masked by - // database2_'s baz.proto in reverse_merged_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileContainingSymbol("FromPool1", &file)); - EXPECT_FALSE(reverse_merged_.FindFileContainingSymbol("FromPool1", &file)); - } - - { - // Can't find non-existent symbol. - FileDescriptorProto file; - EXPECT_FALSE( - forward_merged_.FindFileContainingSymbol("NoSuchType", &file)); - } -} - -TEST_F(MergedDescriptorDatabaseTest, FindFileContainingExtension) { - { - // Can find file that is only in database1_. - FileDescriptorProto file; - EXPECT_TRUE( - forward_merged_.FindFileContainingExtension("Foo", 3, &file)); - EXPECT_EQ("foo.proto", file.name()); - ExpectContainsType(file, "Foo"); - } - - { - // Can find file that is only in database2_. - FileDescriptorProto file; - EXPECT_TRUE( - forward_merged_.FindFileContainingExtension("Bar", 5, &file)); - EXPECT_EQ("bar.proto", file.name()); - ExpectContainsType(file, "Bar"); - } - - { - // In forward_merged_, database1_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE( - forward_merged_.FindFileContainingExtension("Baz", 12, &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool1"); - } - - { - // In reverse_merged_, database2_'s baz.proto takes precedence. - FileDescriptorProto file; - EXPECT_TRUE( - reverse_merged_.FindFileContainingExtension("Baz", 12, &file)); - EXPECT_EQ("baz.proto", file.name()); - ExpectContainsType(file, "FromPool2"); - } - - { - // Baz's extension 13 only shows up in forward_merged_ because it is - // masked by database2_'s baz.proto in reverse_merged_. - FileDescriptorProto file; - EXPECT_TRUE(forward_merged_.FindFileContainingExtension("Baz", 13, &file)); - EXPECT_FALSE(reverse_merged_.FindFileContainingExtension("Baz", 13, &file)); - } - - { - // Can't find non-existent extension. - FileDescriptorProto file; - EXPECT_FALSE( - forward_merged_.FindFileContainingExtension("Foo", 6, &file)); - } -} - -TEST_F(MergedDescriptorDatabaseTest, FindAllExtensionNumbers) { - { - // Message only has extension in database1_ - vector numbers; - EXPECT_TRUE(forward_merged_.FindAllExtensionNumbers("Foo", &numbers)); - ASSERT_EQ(1, numbers.size()); - EXPECT_EQ(3, numbers[0]); - } - - { - // Message only has extension in database2_ - vector numbers; - EXPECT_TRUE(forward_merged_.FindAllExtensionNumbers("Bar", &numbers)); - ASSERT_EQ(1, numbers.size()); - EXPECT_EQ(5, numbers[0]); - } - - { - // Merge results from the two databases. - vector numbers; - EXPECT_TRUE(forward_merged_.FindAllExtensionNumbers("Baz", &numbers)); - ASSERT_EQ(2, numbers.size()); - sort(numbers.begin(), numbers.end()); - EXPECT_EQ(12, numbers[0]); - EXPECT_EQ(13, numbers[1]); - } - - { - vector numbers; - EXPECT_TRUE(reverse_merged_.FindAllExtensionNumbers("Baz", &numbers)); - ASSERT_EQ(2, numbers.size()); - sort(numbers.begin(), numbers.end()); - EXPECT_EQ(12, numbers[0]); - EXPECT_EQ(13, numbers[1]); - } - - { - // Can't find extensions for a non-existent message. - vector numbers; - EXPECT_FALSE(reverse_merged_.FindAllExtensionNumbers("Blah", &numbers)); - } -} - -} // anonymous namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_unittest.cc deleted file mode 100644 index 55aebfd1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/descriptor_unittest.cc +++ /dev/null @@ -1,4034 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file makes extensive use of RFC 3092. :) - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { - -// Can't use an anonymous namespace here due to brokenness of Tru64 compiler. -namespace descriptor_unittest { - -// Some helpers to make assembling descriptors faster. -DescriptorProto* AddMessage(FileDescriptorProto* file, const string& name) { - DescriptorProto* result = file->add_message_type(); - result->set_name(name); - return result; -} - -DescriptorProto* AddNestedMessage(DescriptorProto* parent, const string& name) { - DescriptorProto* result = parent->add_nested_type(); - result->set_name(name); - return result; -} - -EnumDescriptorProto* AddEnum(FileDescriptorProto* file, const string& name) { - EnumDescriptorProto* result = file->add_enum_type(); - result->set_name(name); - return result; -} - -EnumDescriptorProto* AddNestedEnum(DescriptorProto* parent, - const string& name) { - EnumDescriptorProto* result = parent->add_enum_type(); - result->set_name(name); - return result; -} - -ServiceDescriptorProto* AddService(FileDescriptorProto* file, - const string& name) { - ServiceDescriptorProto* result = file->add_service(); - result->set_name(name); - return result; -} - -FieldDescriptorProto* AddField(DescriptorProto* parent, - const string& name, int number, - FieldDescriptorProto::Label label, - FieldDescriptorProto::Type type) { - FieldDescriptorProto* result = parent->add_field(); - result->set_name(name); - result->set_number(number); - result->set_label(label); - result->set_type(type); - return result; -} - -FieldDescriptorProto* AddExtension(FileDescriptorProto* file, - const string& extendee, - const string& name, int number, - FieldDescriptorProto::Label label, - FieldDescriptorProto::Type type) { - FieldDescriptorProto* result = file->add_extension(); - result->set_name(name); - result->set_number(number); - result->set_label(label); - result->set_type(type); - result->set_extendee(extendee); - return result; -} - -FieldDescriptorProto* AddNestedExtension(DescriptorProto* parent, - const string& extendee, - const string& name, int number, - FieldDescriptorProto::Label label, - FieldDescriptorProto::Type type) { - FieldDescriptorProto* result = parent->add_extension(); - result->set_name(name); - result->set_number(number); - result->set_label(label); - result->set_type(type); - result->set_extendee(extendee); - return result; -} - -DescriptorProto::ExtensionRange* AddExtensionRange(DescriptorProto* parent, - int start, int end) { - DescriptorProto::ExtensionRange* result = parent->add_extension_range(); - result->set_start(start); - result->set_end(end); - return result; -} - -EnumValueDescriptorProto* AddEnumValue(EnumDescriptorProto* enum_proto, - const string& name, int number) { - EnumValueDescriptorProto* result = enum_proto->add_value(); - result->set_name(name); - result->set_number(number); - return result; -} - -MethodDescriptorProto* AddMethod(ServiceDescriptorProto* service, - const string& name, - const string& input_type, - const string& output_type) { - MethodDescriptorProto* result = service->add_method(); - result->set_name(name); - result->set_input_type(input_type); - result->set_output_type(output_type); - return result; -} - -// Empty enums technically aren't allowed. We need to insert a dummy value -// into them. -void AddEmptyEnum(FileDescriptorProto* file, const string& name) { - AddEnumValue(AddEnum(file, name), name + "_DUMMY", 1); -} - -// =================================================================== - -// Test simple files. -class FileDescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following definitions: - // - // // in "foo.proto" - // message FooMessage { extensions 1; } - // enum FooEnum {FOO_ENUM_VALUE = 1;} - // service FooService {} - // extend FooMessage { optional int32 foo_extension = 1; } - // - // // in "bar.proto" - // package bar_package; - // message BarMessage { extensions 1; } - // enum BarEnum {BAR_ENUM_VALUE = 1;} - // service BarService {} - // extend BarMessage { optional int32 bar_extension = 1; } - // - // Also, we have an empty file "baz.proto". This file's purpose is to - // make sure that even though it has the same package as foo.proto, - // searching it for members of foo.proto won't work. - - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - AddExtensionRange(AddMessage(&foo_file, "FooMessage"), 1, 2); - AddEnumValue(AddEnum(&foo_file, "FooEnum"), "FOO_ENUM_VALUE", 1); - AddService(&foo_file, "FooService"); - AddExtension(&foo_file, "FooMessage", "foo_extension", 1, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - FileDescriptorProto bar_file; - bar_file.set_name("bar.proto"); - bar_file.set_package("bar_package"); - bar_file.add_dependency("foo.proto"); - AddExtensionRange(AddMessage(&bar_file, "BarMessage"), 1, 2); - AddEnumValue(AddEnum(&bar_file, "BarEnum"), "BAR_ENUM_VALUE", 1); - AddService(&bar_file, "BarService"); - AddExtension(&bar_file, "bar_package.BarMessage", "bar_extension", 1, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - FileDescriptorProto baz_file; - baz_file.set_name("baz.proto"); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); - - baz_file_ = pool_.BuildFile(baz_file); - ASSERT_TRUE(baz_file_ != NULL); - - ASSERT_EQ(1, foo_file_->message_type_count()); - foo_message_ = foo_file_->message_type(0); - ASSERT_EQ(1, foo_file_->enum_type_count()); - foo_enum_ = foo_file_->enum_type(0); - ASSERT_EQ(1, foo_enum_->value_count()); - foo_enum_value_ = foo_enum_->value(0); - ASSERT_EQ(1, foo_file_->service_count()); - foo_service_ = foo_file_->service(0); - ASSERT_EQ(1, foo_file_->extension_count()); - foo_extension_ = foo_file_->extension(0); - - ASSERT_EQ(1, bar_file_->message_type_count()); - bar_message_ = bar_file_->message_type(0); - ASSERT_EQ(1, bar_file_->enum_type_count()); - bar_enum_ = bar_file_->enum_type(0); - ASSERT_EQ(1, bar_enum_->value_count()); - bar_enum_value_ = bar_enum_->value(0); - ASSERT_EQ(1, bar_file_->service_count()); - bar_service_ = bar_file_->service(0); - ASSERT_EQ(1, bar_file_->extension_count()); - bar_extension_ = bar_file_->extension(0); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - const FileDescriptor* bar_file_; - const FileDescriptor* baz_file_; - - const Descriptor* foo_message_; - const EnumDescriptor* foo_enum_; - const EnumValueDescriptor* foo_enum_value_; - const ServiceDescriptor* foo_service_; - const FieldDescriptor* foo_extension_; - - const Descriptor* bar_message_; - const EnumDescriptor* bar_enum_; - const EnumValueDescriptor* bar_enum_value_; - const ServiceDescriptor* bar_service_; - const FieldDescriptor* bar_extension_; -}; - -TEST_F(FileDescriptorTest, Name) { - EXPECT_EQ("foo.proto", foo_file_->name()); - EXPECT_EQ("bar.proto", bar_file_->name()); - EXPECT_EQ("baz.proto", baz_file_->name()); -} - -TEST_F(FileDescriptorTest, Package) { - EXPECT_EQ("", foo_file_->package()); - EXPECT_EQ("bar_package", bar_file_->package()); -} - -TEST_F(FileDescriptorTest, Dependencies) { - EXPECT_EQ(0, foo_file_->dependency_count()); - EXPECT_EQ(1, bar_file_->dependency_count()); - EXPECT_EQ(foo_file_, bar_file_->dependency(0)); -} - -TEST_F(FileDescriptorTest, FindMessageTypeByName) { - EXPECT_EQ(foo_message_, foo_file_->FindMessageTypeByName("FooMessage")); - EXPECT_EQ(bar_message_, bar_file_->FindMessageTypeByName("BarMessage")); - - EXPECT_TRUE(foo_file_->FindMessageTypeByName("BarMessage") == NULL); - EXPECT_TRUE(bar_file_->FindMessageTypeByName("FooMessage") == NULL); - EXPECT_TRUE(baz_file_->FindMessageTypeByName("FooMessage") == NULL); - - EXPECT_TRUE(foo_file_->FindMessageTypeByName("NoSuchMessage") == NULL); - EXPECT_TRUE(foo_file_->FindMessageTypeByName("FooEnum") == NULL); -} - -TEST_F(FileDescriptorTest, FindEnumTypeByName) { - EXPECT_EQ(foo_enum_, foo_file_->FindEnumTypeByName("FooEnum")); - EXPECT_EQ(bar_enum_, bar_file_->FindEnumTypeByName("BarEnum")); - - EXPECT_TRUE(foo_file_->FindEnumTypeByName("BarEnum") == NULL); - EXPECT_TRUE(bar_file_->FindEnumTypeByName("FooEnum") == NULL); - EXPECT_TRUE(baz_file_->FindEnumTypeByName("FooEnum") == NULL); - - EXPECT_TRUE(foo_file_->FindEnumTypeByName("NoSuchEnum") == NULL); - EXPECT_TRUE(foo_file_->FindEnumTypeByName("FooMessage") == NULL); -} - -TEST_F(FileDescriptorTest, FindEnumValueByName) { - EXPECT_EQ(foo_enum_value_, foo_file_->FindEnumValueByName("FOO_ENUM_VALUE")); - EXPECT_EQ(bar_enum_value_, bar_file_->FindEnumValueByName("BAR_ENUM_VALUE")); - - EXPECT_TRUE(foo_file_->FindEnumValueByName("BAR_ENUM_VALUE") == NULL); - EXPECT_TRUE(bar_file_->FindEnumValueByName("FOO_ENUM_VALUE") == NULL); - EXPECT_TRUE(baz_file_->FindEnumValueByName("FOO_ENUM_VALUE") == NULL); - - EXPECT_TRUE(foo_file_->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(foo_file_->FindEnumValueByName("FooMessage") == NULL); -} - -TEST_F(FileDescriptorTest, FindServiceByName) { - EXPECT_EQ(foo_service_, foo_file_->FindServiceByName("FooService")); - EXPECT_EQ(bar_service_, bar_file_->FindServiceByName("BarService")); - - EXPECT_TRUE(foo_file_->FindServiceByName("BarService") == NULL); - EXPECT_TRUE(bar_file_->FindServiceByName("FooService") == NULL); - EXPECT_TRUE(baz_file_->FindServiceByName("FooService") == NULL); - - EXPECT_TRUE(foo_file_->FindServiceByName("NoSuchService") == NULL); - EXPECT_TRUE(foo_file_->FindServiceByName("FooMessage") == NULL); -} - -TEST_F(FileDescriptorTest, FindExtensionByName) { - EXPECT_EQ(foo_extension_, foo_file_->FindExtensionByName("foo_extension")); - EXPECT_EQ(bar_extension_, bar_file_->FindExtensionByName("bar_extension")); - - EXPECT_TRUE(foo_file_->FindExtensionByName("bar_extension") == NULL); - EXPECT_TRUE(bar_file_->FindExtensionByName("foo_extension") == NULL); - EXPECT_TRUE(baz_file_->FindExtensionByName("foo_extension") == NULL); - - EXPECT_TRUE(foo_file_->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo_file_->FindExtensionByName("FooMessage") == NULL); -} - -TEST_F(FileDescriptorTest, FindExtensionByNumber) { - EXPECT_EQ(foo_extension_, pool_.FindExtensionByNumber(foo_message_, 1)); - EXPECT_EQ(bar_extension_, pool_.FindExtensionByNumber(bar_message_, 1)); - - EXPECT_TRUE(pool_.FindExtensionByNumber(foo_message_, 2) == NULL); -} - -TEST_F(FileDescriptorTest, BuildAgain) { - // Test that if te call BuildFile again on the same input we get the same - // FileDescriptor back. - FileDescriptorProto file; - foo_file_->CopyTo(&file); - EXPECT_EQ(foo_file_, pool_.BuildFile(file)); - - // But if we change the file then it won't work. - file.set_package("some.other.package"); - EXPECT_TRUE(pool_.BuildFile(file) == NULL); -} - -// =================================================================== - -// Test simple flat messages and fields. -class DescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following definitions: - // - // // in "foo.proto" - // message TestForeign {} - // enum TestEnum {} - // - // message TestMessage { - // required string foo = 1; - // optional TestEnum bar = 6; - // repeated TestForeign baz = 500000000; - // optional group qux = 15 {} - // } - // - // // in "bar.proto" - // package corge.grault; - // message TestMessage2 { - // required string foo = 1; - // required string bar = 2; - // required string quux = 6; - // } - // - // We cheat and use TestForeign as the type for qux rather than create - // an actual nested type. - // - // Since all primitive types (including string) use the same building - // code, there's no need to test each one individually. - // - // TestMessage2 is primarily here to test FindFieldByName and friends. - // All messages created from the same DescriptorPool share the same lookup - // table, so we need to insure that they don't interfere. - - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - AddMessage(&foo_file, "TestForeign"); - AddEmptyEnum(&foo_file, "TestEnum"); - - DescriptorProto* message = AddMessage(&foo_file, "TestMessage"); - AddField(message, "foo", 1, - FieldDescriptorProto::LABEL_REQUIRED, - FieldDescriptorProto::TYPE_STRING); - AddField(message, "bar", 6, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_ENUM) - ->set_type_name("TestEnum"); - AddField(message, "baz", 500000000, - FieldDescriptorProto::LABEL_REPEATED, - FieldDescriptorProto::TYPE_MESSAGE) - ->set_type_name("TestForeign"); - AddField(message, "qux", 15, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_GROUP) - ->set_type_name("TestForeign"); - - FileDescriptorProto bar_file; - bar_file.set_name("bar.proto"); - bar_file.set_package("corge.grault"); - - DescriptorProto* message2 = AddMessage(&bar_file, "TestMessage2"); - AddField(message2, "foo", 1, - FieldDescriptorProto::LABEL_REQUIRED, - FieldDescriptorProto::TYPE_STRING); - AddField(message2, "bar", 2, - FieldDescriptorProto::LABEL_REQUIRED, - FieldDescriptorProto::TYPE_STRING); - AddField(message2, "quux", 6, - FieldDescriptorProto::LABEL_REQUIRED, - FieldDescriptorProto::TYPE_STRING); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); - - ASSERT_EQ(1, foo_file_->enum_type_count()); - enum_ = foo_file_->enum_type(0); - - ASSERT_EQ(2, foo_file_->message_type_count()); - foreign_ = foo_file_->message_type(0); - message_ = foo_file_->message_type(1); - - ASSERT_EQ(4, message_->field_count()); - foo_ = message_->field(0); - bar_ = message_->field(1); - baz_ = message_->field(2); - qux_ = message_->field(3); - - ASSERT_EQ(1, bar_file_->message_type_count()); - message2_ = bar_file_->message_type(0); - - ASSERT_EQ(3, message2_->field_count()); - foo2_ = message2_->field(0); - bar2_ = message2_->field(1); - quux2_ = message2_->field(2); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - const FileDescriptor* bar_file_; - - const Descriptor* message_; - const Descriptor* message2_; - const Descriptor* foreign_; - const EnumDescriptor* enum_; - - const FieldDescriptor* foo_; - const FieldDescriptor* bar_; - const FieldDescriptor* baz_; - const FieldDescriptor* qux_; - - const FieldDescriptor* foo2_; - const FieldDescriptor* bar2_; - const FieldDescriptor* quux2_; -}; - -TEST_F(DescriptorTest, Name) { - EXPECT_EQ("TestMessage", message_->name()); - EXPECT_EQ("TestMessage", message_->full_name()); - EXPECT_EQ(foo_file_, message_->file()); - - EXPECT_EQ("TestMessage2", message2_->name()); - EXPECT_EQ("corge.grault.TestMessage2", message2_->full_name()); - EXPECT_EQ(bar_file_, message2_->file()); -} - -TEST_F(DescriptorTest, ContainingType) { - EXPECT_TRUE(message_->containing_type() == NULL); - EXPECT_TRUE(message2_->containing_type() == NULL); -} - -TEST_F(DescriptorTest, FieldsByIndex) { - ASSERT_EQ(4, message_->field_count()); - EXPECT_EQ(foo_, message_->field(0)); - EXPECT_EQ(bar_, message_->field(1)); - EXPECT_EQ(baz_, message_->field(2)); - EXPECT_EQ(qux_, message_->field(3)); -} - -TEST_F(DescriptorTest, FindFieldByName) { - // All messages in the same DescriptorPool share a single lookup table for - // fields. So, in addition to testing that FindFieldByName finds the fields - // of the message, we need to test that it does *not* find the fields of - // *other* messages. - - EXPECT_EQ(foo_, message_->FindFieldByName("foo")); - EXPECT_EQ(bar_, message_->FindFieldByName("bar")); - EXPECT_EQ(baz_, message_->FindFieldByName("baz")); - EXPECT_EQ(qux_, message_->FindFieldByName("qux")); - EXPECT_TRUE(message_->FindFieldByName("no_such_field") == NULL); - EXPECT_TRUE(message_->FindFieldByName("quux") == NULL); - - EXPECT_EQ(foo2_ , message2_->FindFieldByName("foo" )); - EXPECT_EQ(bar2_ , message2_->FindFieldByName("bar" )); - EXPECT_EQ(quux2_, message2_->FindFieldByName("quux")); - EXPECT_TRUE(message2_->FindFieldByName("baz") == NULL); - EXPECT_TRUE(message2_->FindFieldByName("qux") == NULL); -} - -TEST_F(DescriptorTest, FindFieldByNumber) { - EXPECT_EQ(foo_, message_->FindFieldByNumber(1)); - EXPECT_EQ(bar_, message_->FindFieldByNumber(6)); - EXPECT_EQ(baz_, message_->FindFieldByNumber(500000000)); - EXPECT_EQ(qux_, message_->FindFieldByNumber(15)); - EXPECT_TRUE(message_->FindFieldByNumber(837592) == NULL); - EXPECT_TRUE(message_->FindFieldByNumber(2) == NULL); - - EXPECT_EQ(foo2_ , message2_->FindFieldByNumber(1)); - EXPECT_EQ(bar2_ , message2_->FindFieldByNumber(2)); - EXPECT_EQ(quux2_, message2_->FindFieldByNumber(6)); - EXPECT_TRUE(message2_->FindFieldByNumber(15) == NULL); - EXPECT_TRUE(message2_->FindFieldByNumber(500000000) == NULL); -} - -TEST_F(DescriptorTest, FieldName) { - EXPECT_EQ("foo", foo_->name()); - EXPECT_EQ("bar", bar_->name()); - EXPECT_EQ("baz", baz_->name()); - EXPECT_EQ("qux", qux_->name()); -} - -TEST_F(DescriptorTest, FieldFullName) { - EXPECT_EQ("TestMessage.foo", foo_->full_name()); - EXPECT_EQ("TestMessage.bar", bar_->full_name()); - EXPECT_EQ("TestMessage.baz", baz_->full_name()); - EXPECT_EQ("TestMessage.qux", qux_->full_name()); - - EXPECT_EQ("corge.grault.TestMessage2.foo", foo2_->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.bar", bar2_->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.quux", quux2_->full_name()); -} - -TEST_F(DescriptorTest, FieldFile) { - EXPECT_EQ(foo_file_, foo_->file()); - EXPECT_EQ(foo_file_, bar_->file()); - EXPECT_EQ(foo_file_, baz_->file()); - EXPECT_EQ(foo_file_, qux_->file()); - - EXPECT_EQ(bar_file_, foo2_->file()); - EXPECT_EQ(bar_file_, bar2_->file()); - EXPECT_EQ(bar_file_, quux2_->file()); -} - -TEST_F(DescriptorTest, FieldIndex) { - EXPECT_EQ(0, foo_->index()); - EXPECT_EQ(1, bar_->index()); - EXPECT_EQ(2, baz_->index()); - EXPECT_EQ(3, qux_->index()); -} - -TEST_F(DescriptorTest, FieldNumber) { - EXPECT_EQ( 1, foo_->number()); - EXPECT_EQ( 6, bar_->number()); - EXPECT_EQ(500000000, baz_->number()); - EXPECT_EQ( 15, qux_->number()); -} - -TEST_F(DescriptorTest, FieldType) { - EXPECT_EQ(FieldDescriptor::TYPE_STRING , foo_->type()); - EXPECT_EQ(FieldDescriptor::TYPE_ENUM , bar_->type()); - EXPECT_EQ(FieldDescriptor::TYPE_MESSAGE, baz_->type()); - EXPECT_EQ(FieldDescriptor::TYPE_GROUP , qux_->type()); -} - -TEST_F(DescriptorTest, FieldLabel) { - EXPECT_EQ(FieldDescriptor::LABEL_REQUIRED, foo_->label()); - EXPECT_EQ(FieldDescriptor::LABEL_OPTIONAL, bar_->label()); - EXPECT_EQ(FieldDescriptor::LABEL_REPEATED, baz_->label()); - EXPECT_EQ(FieldDescriptor::LABEL_OPTIONAL, qux_->label()); - - EXPECT_TRUE (foo_->is_required()); - EXPECT_FALSE(foo_->is_optional()); - EXPECT_FALSE(foo_->is_repeated()); - - EXPECT_FALSE(bar_->is_required()); - EXPECT_TRUE (bar_->is_optional()); - EXPECT_FALSE(bar_->is_repeated()); - - EXPECT_FALSE(baz_->is_required()); - EXPECT_FALSE(baz_->is_optional()); - EXPECT_TRUE (baz_->is_repeated()); -} - -TEST_F(DescriptorTest, FieldHasDefault) { - EXPECT_FALSE(foo_->has_default_value()); - EXPECT_FALSE(bar_->has_default_value()); - EXPECT_FALSE(baz_->has_default_value()); - EXPECT_FALSE(qux_->has_default_value()); -} - -TEST_F(DescriptorTest, FieldContainingType) { - EXPECT_EQ(message_, foo_->containing_type()); - EXPECT_EQ(message_, bar_->containing_type()); - EXPECT_EQ(message_, baz_->containing_type()); - EXPECT_EQ(message_, qux_->containing_type()); - - EXPECT_EQ(message2_, foo2_ ->containing_type()); - EXPECT_EQ(message2_, bar2_ ->containing_type()); - EXPECT_EQ(message2_, quux2_->containing_type()); -} - -TEST_F(DescriptorTest, FieldMessageType) { - EXPECT_TRUE(foo_->message_type() == NULL); - EXPECT_TRUE(bar_->message_type() == NULL); - - EXPECT_EQ(foreign_, baz_->message_type()); - EXPECT_EQ(foreign_, qux_->message_type()); -} - -TEST_F(DescriptorTest, FieldEnumType) { - EXPECT_TRUE(foo_->enum_type() == NULL); - EXPECT_TRUE(baz_->enum_type() == NULL); - EXPECT_TRUE(qux_->enum_type() == NULL); - - EXPECT_EQ(enum_, bar_->enum_type()); -} - -// =================================================================== - -class StylizedFieldNamesTest : public testing::Test { - protected: - void SetUp() { - FileDescriptorProto file; - file.set_name("foo.proto"); - - AddExtensionRange(AddMessage(&file, "ExtendableMessage"), 1, 1000); - - DescriptorProto* message = AddMessage(&file, "TestMessage"); - AddField(message, "foo_foo", 1, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddField(message, "FooBar", 2, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddField(message, "fooBaz", 3, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddField(message, "fooFoo", 4, // Camel-case conflict with foo_foo. - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddField(message, "foobar", 5, // Lower-case conflict with FooBar. - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - AddNestedExtension(message, "ExtendableMessage", "bar_foo", 1, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddNestedExtension(message, "ExtendableMessage", "BarBar", 2, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddNestedExtension(message, "ExtendableMessage", "BarBaz", 3, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddNestedExtension(message, "ExtendableMessage", "barFoo", 4, // Conflict - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddNestedExtension(message, "ExtendableMessage", "barbar", 5, // Conflict - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - AddExtension(&file, "ExtendableMessage", "baz_foo", 11, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddExtension(&file, "ExtendableMessage", "BazBar", 12, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddExtension(&file, "ExtendableMessage", "BazBaz", 13, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddExtension(&file, "ExtendableMessage", "bazFoo", 14, // Conflict - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddExtension(&file, "ExtendableMessage", "bazbar", 15, // Conflict - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - file_ = pool_.BuildFile(file); - ASSERT_TRUE(file_ != NULL); - ASSERT_EQ(2, file_->message_type_count()); - message_ = file_->message_type(1); - ASSERT_EQ("TestMessage", message_->name()); - ASSERT_EQ(5, message_->field_count()); - ASSERT_EQ(5, message_->extension_count()); - ASSERT_EQ(5, file_->extension_count()); - } - - DescriptorPool pool_; - const FileDescriptor* file_; - const Descriptor* message_; -}; - -TEST_F(StylizedFieldNamesTest, LowercaseName) { - EXPECT_EQ("foo_foo", message_->field(0)->lowercase_name()); - EXPECT_EQ("foobar" , message_->field(1)->lowercase_name()); - EXPECT_EQ("foobaz" , message_->field(2)->lowercase_name()); - EXPECT_EQ("foofoo" , message_->field(3)->lowercase_name()); - EXPECT_EQ("foobar" , message_->field(4)->lowercase_name()); - - EXPECT_EQ("bar_foo", message_->extension(0)->lowercase_name()); - EXPECT_EQ("barbar" , message_->extension(1)->lowercase_name()); - EXPECT_EQ("barbaz" , message_->extension(2)->lowercase_name()); - EXPECT_EQ("barfoo" , message_->extension(3)->lowercase_name()); - EXPECT_EQ("barbar" , message_->extension(4)->lowercase_name()); - - EXPECT_EQ("baz_foo", file_->extension(0)->lowercase_name()); - EXPECT_EQ("bazbar" , file_->extension(1)->lowercase_name()); - EXPECT_EQ("bazbaz" , file_->extension(2)->lowercase_name()); - EXPECT_EQ("bazfoo" , file_->extension(3)->lowercase_name()); - EXPECT_EQ("bazbar" , file_->extension(4)->lowercase_name()); -} - -TEST_F(StylizedFieldNamesTest, CamelcaseName) { - EXPECT_EQ("fooFoo", message_->field(0)->camelcase_name()); - EXPECT_EQ("fooBar", message_->field(1)->camelcase_name()); - EXPECT_EQ("fooBaz", message_->field(2)->camelcase_name()); - EXPECT_EQ("fooFoo", message_->field(3)->camelcase_name()); - EXPECT_EQ("foobar", message_->field(4)->camelcase_name()); - - EXPECT_EQ("barFoo", message_->extension(0)->camelcase_name()); - EXPECT_EQ("barBar", message_->extension(1)->camelcase_name()); - EXPECT_EQ("barBaz", message_->extension(2)->camelcase_name()); - EXPECT_EQ("barFoo", message_->extension(3)->camelcase_name()); - EXPECT_EQ("barbar", message_->extension(4)->camelcase_name()); - - EXPECT_EQ("bazFoo", file_->extension(0)->camelcase_name()); - EXPECT_EQ("bazBar", file_->extension(1)->camelcase_name()); - EXPECT_EQ("bazBaz", file_->extension(2)->camelcase_name()); - EXPECT_EQ("bazFoo", file_->extension(3)->camelcase_name()); - EXPECT_EQ("bazbar", file_->extension(4)->camelcase_name()); -} - -TEST_F(StylizedFieldNamesTest, FindByLowercaseName) { - EXPECT_EQ(message_->field(0), - message_->FindFieldByLowercaseName("foo_foo")); - EXPECT_EQ(message_->field(1), - message_->FindFieldByLowercaseName("foobar")); - EXPECT_EQ(message_->field(2), - message_->FindFieldByLowercaseName("foobaz")); - EXPECT_TRUE(message_->FindFieldByLowercaseName("FooBar") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("fooBaz") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("bar_foo") == NULL); - EXPECT_TRUE(message_->FindFieldByLowercaseName("nosuchfield") == NULL); - - EXPECT_EQ(message_->extension(0), - message_->FindExtensionByLowercaseName("bar_foo")); - EXPECT_EQ(message_->extension(1), - message_->FindExtensionByLowercaseName("barbar")); - EXPECT_EQ(message_->extension(2), - message_->FindExtensionByLowercaseName("barbaz")); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("BarBar") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("barBaz") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("foo_foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByLowercaseName("nosuchfield") == NULL); - - EXPECT_EQ(file_->extension(0), - file_->FindExtensionByLowercaseName("baz_foo")); - EXPECT_EQ(file_->extension(1), - file_->FindExtensionByLowercaseName("bazbar")); - EXPECT_EQ(file_->extension(2), - file_->FindExtensionByLowercaseName("bazbaz")); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("BazBar") == NULL); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("bazBaz") == NULL); - EXPECT_TRUE(file_->FindExtensionByLowercaseName("nosuchfield") == NULL); -} - -TEST_F(StylizedFieldNamesTest, FindByCamelcaseName) { - EXPECT_EQ(message_->field(0), - message_->FindFieldByCamelcaseName("fooFoo")); - EXPECT_EQ(message_->field(1), - message_->FindFieldByCamelcaseName("fooBar")); - EXPECT_EQ(message_->field(2), - message_->FindFieldByCamelcaseName("fooBaz")); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("foo_foo") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("FooBar") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("barFoo") == NULL); - EXPECT_TRUE(message_->FindFieldByCamelcaseName("nosuchfield") == NULL); - - EXPECT_EQ(message_->extension(0), - message_->FindExtensionByCamelcaseName("barFoo")); - EXPECT_EQ(message_->extension(1), - message_->FindExtensionByCamelcaseName("barBar")); - EXPECT_EQ(message_->extension(2), - message_->FindExtensionByCamelcaseName("barBaz")); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("bar_foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("BarBar") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("fooFoo") == NULL); - EXPECT_TRUE(message_->FindExtensionByCamelcaseName("nosuchfield") == NULL); - - EXPECT_EQ(file_->extension(0), - file_->FindExtensionByCamelcaseName("bazFoo")); - EXPECT_EQ(file_->extension(1), - file_->FindExtensionByCamelcaseName("bazBar")); - EXPECT_EQ(file_->extension(2), - file_->FindExtensionByCamelcaseName("bazBaz")); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("baz_foo") == NULL); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("BazBar") == NULL); - EXPECT_TRUE(file_->FindExtensionByCamelcaseName("nosuchfield") == NULL); -} - -// =================================================================== - -// Test enum descriptors. -class EnumDescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following definitions: - // - // // in "foo.proto" - // enum TestEnum { - // FOO = 1; - // BAR = 2; - // } - // - // // in "bar.proto" - // package corge.grault; - // enum TestEnum2 { - // FOO = 1; - // BAZ = 3; - // } - // - // TestEnum2 is primarily here to test FindValueByName and friends. - // All enums created from the same DescriptorPool share the same lookup - // table, so we need to insure that they don't interfere. - - // TestEnum - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - - EnumDescriptorProto* enum_proto = AddEnum(&foo_file, "TestEnum"); - AddEnumValue(enum_proto, "FOO", 1); - AddEnumValue(enum_proto, "BAR", 2); - - // TestEnum2 - FileDescriptorProto bar_file; - bar_file.set_name("bar.proto"); - bar_file.set_package("corge.grault"); - - EnumDescriptorProto* enum2_proto = AddEnum(&bar_file, "TestEnum2"); - AddEnumValue(enum2_proto, "FOO", 1); - AddEnumValue(enum2_proto, "BAZ", 3); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); - - ASSERT_EQ(1, foo_file_->enum_type_count()); - enum_ = foo_file_->enum_type(0); - - ASSERT_EQ(2, enum_->value_count()); - foo_ = enum_->value(0); - bar_ = enum_->value(1); - - ASSERT_EQ(1, bar_file_->enum_type_count()); - enum2_ = bar_file_->enum_type(0); - - ASSERT_EQ(2, enum2_->value_count()); - foo2_ = enum2_->value(0); - baz2_ = enum2_->value(1); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - const FileDescriptor* bar_file_; - - const EnumDescriptor* enum_; - const EnumDescriptor* enum2_; - - const EnumValueDescriptor* foo_; - const EnumValueDescriptor* bar_; - - const EnumValueDescriptor* foo2_; - const EnumValueDescriptor* baz2_; -}; - -TEST_F(EnumDescriptorTest, Name) { - EXPECT_EQ("TestEnum", enum_->name()); - EXPECT_EQ("TestEnum", enum_->full_name()); - EXPECT_EQ(foo_file_, enum_->file()); - - EXPECT_EQ("TestEnum2", enum2_->name()); - EXPECT_EQ("corge.grault.TestEnum2", enum2_->full_name()); - EXPECT_EQ(bar_file_, enum2_->file()); -} - -TEST_F(EnumDescriptorTest, ContainingType) { - EXPECT_TRUE(enum_->containing_type() == NULL); - EXPECT_TRUE(enum2_->containing_type() == NULL); -} - -TEST_F(EnumDescriptorTest, ValuesByIndex) { - ASSERT_EQ(2, enum_->value_count()); - EXPECT_EQ(foo_, enum_->value(0)); - EXPECT_EQ(bar_, enum_->value(1)); -} - -TEST_F(EnumDescriptorTest, FindValueByName) { - EXPECT_EQ(foo_ , enum_ ->FindValueByName("FOO")); - EXPECT_EQ(bar_ , enum_ ->FindValueByName("BAR")); - EXPECT_EQ(foo2_, enum2_->FindValueByName("FOO")); - EXPECT_EQ(baz2_, enum2_->FindValueByName("BAZ")); - - EXPECT_TRUE(enum_ ->FindValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(enum_ ->FindValueByName("BAZ" ) == NULL); - EXPECT_TRUE(enum2_->FindValueByName("BAR" ) == NULL); -} - -TEST_F(EnumDescriptorTest, FindValueByNumber) { - EXPECT_EQ(foo_ , enum_ ->FindValueByNumber(1)); - EXPECT_EQ(bar_ , enum_ ->FindValueByNumber(2)); - EXPECT_EQ(foo2_, enum2_->FindValueByNumber(1)); - EXPECT_EQ(baz2_, enum2_->FindValueByNumber(3)); - - EXPECT_TRUE(enum_ ->FindValueByNumber(416) == NULL); - EXPECT_TRUE(enum_ ->FindValueByNumber(3) == NULL); - EXPECT_TRUE(enum2_->FindValueByNumber(2) == NULL); -} - -TEST_F(EnumDescriptorTest, ValueName) { - EXPECT_EQ("FOO", foo_->name()); - EXPECT_EQ("BAR", bar_->name()); -} - -TEST_F(EnumDescriptorTest, ValueFullName) { - EXPECT_EQ("FOO", foo_->full_name()); - EXPECT_EQ("BAR", bar_->full_name()); - EXPECT_EQ("corge.grault.FOO", foo2_->full_name()); - EXPECT_EQ("corge.grault.BAZ", baz2_->full_name()); -} - -TEST_F(EnumDescriptorTest, ValueIndex) { - EXPECT_EQ(0, foo_->index()); - EXPECT_EQ(1, bar_->index()); -} - -TEST_F(EnumDescriptorTest, ValueNumber) { - EXPECT_EQ(1, foo_->number()); - EXPECT_EQ(2, bar_->number()); -} - -TEST_F(EnumDescriptorTest, ValueType) { - EXPECT_EQ(enum_ , foo_ ->type()); - EXPECT_EQ(enum_ , bar_ ->type()); - EXPECT_EQ(enum2_, foo2_->type()); - EXPECT_EQ(enum2_, baz2_->type()); -} - -// =================================================================== - -// Test service descriptors. -class ServiceDescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following messages and service: - // // in "foo.proto" - // message FooRequest {} - // message FooResponse {} - // message BarRequest {} - // message BarResponse {} - // message BazRequest {} - // message BazResponse {} - // - // service TestService { - // rpc Foo(FooRequest) returns (FooResponse); - // rpc Bar(BarRequest) returns (BarResponse); - // } - // - // // in "bar.proto" - // package corge.grault - // service TestService2 { - // rpc Foo(FooRequest) returns (FooResponse); - // rpc Baz(BazRequest) returns (BazResponse); - // } - - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - - AddMessage(&foo_file, "FooRequest"); - AddMessage(&foo_file, "FooResponse"); - AddMessage(&foo_file, "BarRequest"); - AddMessage(&foo_file, "BarResponse"); - AddMessage(&foo_file, "BazRequest"); - AddMessage(&foo_file, "BazResponse"); - - ServiceDescriptorProto* service = AddService(&foo_file, "TestService"); - AddMethod(service, "Foo", "FooRequest", "FooResponse"); - AddMethod(service, "Bar", "BarRequest", "BarResponse"); - - FileDescriptorProto bar_file; - bar_file.set_name("bar.proto"); - bar_file.set_package("corge.grault"); - bar_file.add_dependency("foo.proto"); - - ServiceDescriptorProto* service2 = AddService(&bar_file, "TestService2"); - AddMethod(service2, "Foo", "FooRequest", "FooResponse"); - AddMethod(service2, "Baz", "BazRequest", "BazResponse"); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); - - ASSERT_EQ(6, foo_file_->message_type_count()); - foo_request_ = foo_file_->message_type(0); - foo_response_ = foo_file_->message_type(1); - bar_request_ = foo_file_->message_type(2); - bar_response_ = foo_file_->message_type(3); - baz_request_ = foo_file_->message_type(4); - baz_response_ = foo_file_->message_type(5); - - ASSERT_EQ(1, foo_file_->service_count()); - service_ = foo_file_->service(0); - - ASSERT_EQ(2, service_->method_count()); - foo_ = service_->method(0); - bar_ = service_->method(1); - - ASSERT_EQ(1, bar_file_->service_count()); - service2_ = bar_file_->service(0); - - ASSERT_EQ(2, service2_->method_count()); - foo2_ = service2_->method(0); - baz2_ = service2_->method(1); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - const FileDescriptor* bar_file_; - - const Descriptor* foo_request_; - const Descriptor* foo_response_; - const Descriptor* bar_request_; - const Descriptor* bar_response_; - const Descriptor* baz_request_; - const Descriptor* baz_response_; - - const ServiceDescriptor* service_; - const ServiceDescriptor* service2_; - - const MethodDescriptor* foo_; - const MethodDescriptor* bar_; - - const MethodDescriptor* foo2_; - const MethodDescriptor* baz2_; -}; - -TEST_F(ServiceDescriptorTest, Name) { - EXPECT_EQ("TestService", service_->name()); - EXPECT_EQ("TestService", service_->full_name()); - EXPECT_EQ(foo_file_, service_->file()); - - EXPECT_EQ("TestService2", service2_->name()); - EXPECT_EQ("corge.grault.TestService2", service2_->full_name()); - EXPECT_EQ(bar_file_, service2_->file()); -} - -TEST_F(ServiceDescriptorTest, MethodsByIndex) { - ASSERT_EQ(2, service_->method_count()); - EXPECT_EQ(foo_, service_->method(0)); - EXPECT_EQ(bar_, service_->method(1)); -} - -TEST_F(ServiceDescriptorTest, FindMethodByName) { - EXPECT_EQ(foo_ , service_ ->FindMethodByName("Foo")); - EXPECT_EQ(bar_ , service_ ->FindMethodByName("Bar")); - EXPECT_EQ(foo2_, service2_->FindMethodByName("Foo")); - EXPECT_EQ(baz2_, service2_->FindMethodByName("Baz")); - - EXPECT_TRUE(service_ ->FindMethodByName("NoSuchMethod") == NULL); - EXPECT_TRUE(service_ ->FindMethodByName("Baz" ) == NULL); - EXPECT_TRUE(service2_->FindMethodByName("Bar" ) == NULL); -} - -TEST_F(ServiceDescriptorTest, MethodName) { - EXPECT_EQ("Foo", foo_->name()); - EXPECT_EQ("Bar", bar_->name()); -} - -TEST_F(ServiceDescriptorTest, MethodFullName) { - EXPECT_EQ("TestService.Foo", foo_->full_name()); - EXPECT_EQ("TestService.Bar", bar_->full_name()); - EXPECT_EQ("corge.grault.TestService2.Foo", foo2_->full_name()); - EXPECT_EQ("corge.grault.TestService2.Baz", baz2_->full_name()); -} - -TEST_F(ServiceDescriptorTest, MethodIndex) { - EXPECT_EQ(0, foo_->index()); - EXPECT_EQ(1, bar_->index()); -} - -TEST_F(ServiceDescriptorTest, MethodParent) { - EXPECT_EQ(service_, foo_->service()); - EXPECT_EQ(service_, bar_->service()); -} - -TEST_F(ServiceDescriptorTest, MethodInputType) { - EXPECT_EQ(foo_request_, foo_->input_type()); - EXPECT_EQ(bar_request_, bar_->input_type()); -} - -TEST_F(ServiceDescriptorTest, MethodOutputType) { - EXPECT_EQ(foo_response_, foo_->output_type()); - EXPECT_EQ(bar_response_, bar_->output_type()); -} - -// =================================================================== - -// Test nested types. -class NestedDescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following definitions: - // - // // in "foo.proto" - // message TestMessage { - // message Foo {} - // message Bar {} - // enum Baz { A = 1; } - // enum Qux { B = 1; } - // } - // - // // in "bar.proto" - // package corge.grault; - // message TestMessage2 { - // message Foo {} - // message Baz {} - // enum Qux { A = 1; } - // enum Quux { C = 1; } - // } - // - // TestMessage2 is primarily here to test FindNestedTypeByName and friends. - // All messages created from the same DescriptorPool share the same lookup - // table, so we need to insure that they don't interfere. - // - // We add enum values to the enums in order to test searching for enum - // values across a message's scope. - - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - - DescriptorProto* message = AddMessage(&foo_file, "TestMessage"); - AddNestedMessage(message, "Foo"); - AddNestedMessage(message, "Bar"); - EnumDescriptorProto* baz = AddNestedEnum(message, "Baz"); - AddEnumValue(baz, "A", 1); - EnumDescriptorProto* qux = AddNestedEnum(message, "Qux"); - AddEnumValue(qux, "B", 1); - - FileDescriptorProto bar_file; - bar_file.set_name("bar.proto"); - bar_file.set_package("corge.grault"); - - DescriptorProto* message2 = AddMessage(&bar_file, "TestMessage2"); - AddNestedMessage(message2, "Foo"); - AddNestedMessage(message2, "Baz"); - EnumDescriptorProto* qux2 = AddNestedEnum(message2, "Qux"); - AddEnumValue(qux2, "A", 1); - EnumDescriptorProto* quux2 = AddNestedEnum(message2, "Quux"); - AddEnumValue(quux2, "C", 1); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - bar_file_ = pool_.BuildFile(bar_file); - ASSERT_TRUE(bar_file_ != NULL); - - ASSERT_EQ(1, foo_file_->message_type_count()); - message_ = foo_file_->message_type(0); - - ASSERT_EQ(2, message_->nested_type_count()); - foo_ = message_->nested_type(0); - bar_ = message_->nested_type(1); - - ASSERT_EQ(2, message_->enum_type_count()); - baz_ = message_->enum_type(0); - qux_ = message_->enum_type(1); - - ASSERT_EQ(1, baz_->value_count()); - a_ = baz_->value(0); - ASSERT_EQ(1, qux_->value_count()); - b_ = qux_->value(0); - - ASSERT_EQ(1, bar_file_->message_type_count()); - message2_ = bar_file_->message_type(0); - - ASSERT_EQ(2, message2_->nested_type_count()); - foo2_ = message2_->nested_type(0); - baz2_ = message2_->nested_type(1); - - ASSERT_EQ(2, message2_->enum_type_count()); - qux2_ = message2_->enum_type(0); - quux2_ = message2_->enum_type(1); - - ASSERT_EQ(1, qux2_->value_count()); - a2_ = qux2_->value(0); - ASSERT_EQ(1, quux2_->value_count()); - c2_ = quux2_->value(0); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - const FileDescriptor* bar_file_; - - const Descriptor* message_; - const Descriptor* message2_; - - const Descriptor* foo_; - const Descriptor* bar_; - const EnumDescriptor* baz_; - const EnumDescriptor* qux_; - const EnumValueDescriptor* a_; - const EnumValueDescriptor* b_; - - const Descriptor* foo2_; - const Descriptor* baz2_; - const EnumDescriptor* qux2_; - const EnumDescriptor* quux2_; - const EnumValueDescriptor* a2_; - const EnumValueDescriptor* c2_; -}; - -TEST_F(NestedDescriptorTest, MessageName) { - EXPECT_EQ("Foo", foo_ ->name()); - EXPECT_EQ("Bar", bar_ ->name()); - EXPECT_EQ("Foo", foo2_->name()); - EXPECT_EQ("Baz", baz2_->name()); - - EXPECT_EQ("TestMessage.Foo", foo_->full_name()); - EXPECT_EQ("TestMessage.Bar", bar_->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.Foo", foo2_->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.Baz", baz2_->full_name()); -} - -TEST_F(NestedDescriptorTest, MessageContainingType) { - EXPECT_EQ(message_ , foo_ ->containing_type()); - EXPECT_EQ(message_ , bar_ ->containing_type()); - EXPECT_EQ(message2_, foo2_->containing_type()); - EXPECT_EQ(message2_, baz2_->containing_type()); -} - -TEST_F(NestedDescriptorTest, NestedMessagesByIndex) { - ASSERT_EQ(2, message_->nested_type_count()); - EXPECT_EQ(foo_, message_->nested_type(0)); - EXPECT_EQ(bar_, message_->nested_type(1)); -} - -TEST_F(NestedDescriptorTest, FindFieldByNameDoesntFindNestedTypes) { - EXPECT_TRUE(message_->FindFieldByName("Foo") == NULL); - EXPECT_TRUE(message_->FindFieldByName("Qux") == NULL); - EXPECT_TRUE(message_->FindExtensionByName("Foo") == NULL); - EXPECT_TRUE(message_->FindExtensionByName("Qux") == NULL); -} - -TEST_F(NestedDescriptorTest, FindNestedTypeByName) { - EXPECT_EQ(foo_ , message_ ->FindNestedTypeByName("Foo")); - EXPECT_EQ(bar_ , message_ ->FindNestedTypeByName("Bar")); - EXPECT_EQ(foo2_, message2_->FindNestedTypeByName("Foo")); - EXPECT_EQ(baz2_, message2_->FindNestedTypeByName("Baz")); - - EXPECT_TRUE(message_ ->FindNestedTypeByName("NoSuchType") == NULL); - EXPECT_TRUE(message_ ->FindNestedTypeByName("Baz" ) == NULL); - EXPECT_TRUE(message2_->FindNestedTypeByName("Bar" ) == NULL); - - EXPECT_TRUE(message_->FindNestedTypeByName("Qux") == NULL); -} - -TEST_F(NestedDescriptorTest, EnumName) { - EXPECT_EQ("Baz" , baz_ ->name()); - EXPECT_EQ("Qux" , qux_ ->name()); - EXPECT_EQ("Qux" , qux2_->name()); - EXPECT_EQ("Quux", quux2_->name()); - - EXPECT_EQ("TestMessage.Baz", baz_->full_name()); - EXPECT_EQ("TestMessage.Qux", qux_->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.Qux" , qux2_ ->full_name()); - EXPECT_EQ("corge.grault.TestMessage2.Quux", quux2_->full_name()); -} - -TEST_F(NestedDescriptorTest, EnumContainingType) { - EXPECT_EQ(message_ , baz_ ->containing_type()); - EXPECT_EQ(message_ , qux_ ->containing_type()); - EXPECT_EQ(message2_, qux2_ ->containing_type()); - EXPECT_EQ(message2_, quux2_->containing_type()); -} - -TEST_F(NestedDescriptorTest, NestedEnumsByIndex) { - ASSERT_EQ(2, message_->nested_type_count()); - EXPECT_EQ(foo_, message_->nested_type(0)); - EXPECT_EQ(bar_, message_->nested_type(1)); -} - -TEST_F(NestedDescriptorTest, FindEnumTypeByName) { - EXPECT_EQ(baz_ , message_ ->FindEnumTypeByName("Baz" )); - EXPECT_EQ(qux_ , message_ ->FindEnumTypeByName("Qux" )); - EXPECT_EQ(qux2_ , message2_->FindEnumTypeByName("Qux" )); - EXPECT_EQ(quux2_, message2_->FindEnumTypeByName("Quux")); - - EXPECT_TRUE(message_ ->FindEnumTypeByName("NoSuchType") == NULL); - EXPECT_TRUE(message_ ->FindEnumTypeByName("Quux" ) == NULL); - EXPECT_TRUE(message2_->FindEnumTypeByName("Baz" ) == NULL); - - EXPECT_TRUE(message_->FindEnumTypeByName("Foo") == NULL); -} - -TEST_F(NestedDescriptorTest, FindEnumValueByName) { - EXPECT_EQ(a_ , message_ ->FindEnumValueByName("A")); - EXPECT_EQ(b_ , message_ ->FindEnumValueByName("B")); - EXPECT_EQ(a2_, message2_->FindEnumValueByName("A")); - EXPECT_EQ(c2_, message2_->FindEnumValueByName("C")); - - EXPECT_TRUE(message_ ->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(message_ ->FindEnumValueByName("C" ) == NULL); - EXPECT_TRUE(message2_->FindEnumValueByName("B" ) == NULL); - - EXPECT_TRUE(message_->FindEnumValueByName("Foo") == NULL); -} - -// =================================================================== - -// Test extensions. -class ExtensionDescriptorTest : public testing::Test { - protected: - virtual void SetUp() { - // Build descriptors for the following definitions: - // - // enum Baz {} - // message Qux {} - // - // message Foo { - // extensions 10 to 19; - // extensions 30 to 39; - // } - // extends Foo with optional int32 foo_int32 = 10; - // extends Foo with repeated TestEnum foo_enum = 19; - // message Bar { - // extends Foo with optional Qux foo_message = 30; - // // (using Qux as the group type) - // extends Foo with repeated group foo_group = 39; - // } - - FileDescriptorProto foo_file; - foo_file.set_name("foo.proto"); - - AddEmptyEnum(&foo_file, "Baz"); - AddMessage(&foo_file, "Qux"); - - DescriptorProto* foo = AddMessage(&foo_file, "Foo"); - AddExtensionRange(foo, 10, 20); - AddExtensionRange(foo, 30, 40); - - AddExtension(&foo_file, "Foo", "foo_int32", 10, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - AddExtension(&foo_file, "Foo", "foo_enum", 19, - FieldDescriptorProto::LABEL_REPEATED, - FieldDescriptorProto::TYPE_ENUM) - ->set_type_name("Baz"); - - DescriptorProto* bar = AddMessage(&foo_file, "Bar"); - AddNestedExtension(bar, "Foo", "foo_message", 30, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_MESSAGE) - ->set_type_name("Qux"); - AddNestedExtension(bar, "Foo", "foo_group", 39, - FieldDescriptorProto::LABEL_REPEATED, - FieldDescriptorProto::TYPE_GROUP) - ->set_type_name("Qux"); - - // Build the descriptors and get the pointers. - foo_file_ = pool_.BuildFile(foo_file); - ASSERT_TRUE(foo_file_ != NULL); - - ASSERT_EQ(1, foo_file_->enum_type_count()); - baz_ = foo_file_->enum_type(0); - - ASSERT_EQ(3, foo_file_->message_type_count()); - qux_ = foo_file_->message_type(0); - foo_ = foo_file_->message_type(1); - bar_ = foo_file_->message_type(2); - } - - DescriptorPool pool_; - - const FileDescriptor* foo_file_; - - const Descriptor* foo_; - const Descriptor* bar_; - const EnumDescriptor* baz_; - const Descriptor* qux_; -}; - -TEST_F(ExtensionDescriptorTest, ExtensionRanges) { - EXPECT_EQ(0, bar_->extension_range_count()); - ASSERT_EQ(2, foo_->extension_range_count()); - - EXPECT_EQ(10, foo_->extension_range(0)->start); - EXPECT_EQ(30, foo_->extension_range(1)->start); - - EXPECT_EQ(20, foo_->extension_range(0)->end); - EXPECT_EQ(40, foo_->extension_range(1)->end); -}; - -TEST_F(ExtensionDescriptorTest, Extensions) { - EXPECT_EQ(0, foo_->extension_count()); - ASSERT_EQ(2, foo_file_->extension_count()); - ASSERT_EQ(2, bar_->extension_count()); - - EXPECT_TRUE(foo_file_->extension(0)->is_extension()); - EXPECT_TRUE(foo_file_->extension(1)->is_extension()); - EXPECT_TRUE(bar_->extension(0)->is_extension()); - EXPECT_TRUE(bar_->extension(1)->is_extension()); - - EXPECT_EQ("foo_int32" , foo_file_->extension(0)->name()); - EXPECT_EQ("foo_enum" , foo_file_->extension(1)->name()); - EXPECT_EQ("foo_message", bar_->extension(0)->name()); - EXPECT_EQ("foo_group" , bar_->extension(1)->name()); - - EXPECT_EQ(10, foo_file_->extension(0)->number()); - EXPECT_EQ(19, foo_file_->extension(1)->number()); - EXPECT_EQ(30, bar_->extension(0)->number()); - EXPECT_EQ(39, bar_->extension(1)->number()); - - EXPECT_EQ(FieldDescriptor::TYPE_INT32 , foo_file_->extension(0)->type()); - EXPECT_EQ(FieldDescriptor::TYPE_ENUM , foo_file_->extension(1)->type()); - EXPECT_EQ(FieldDescriptor::TYPE_MESSAGE, bar_->extension(0)->type()); - EXPECT_EQ(FieldDescriptor::TYPE_GROUP , bar_->extension(1)->type()); - - EXPECT_EQ(baz_, foo_file_->extension(1)->enum_type()); - EXPECT_EQ(qux_, bar_->extension(0)->message_type()); - EXPECT_EQ(qux_, bar_->extension(1)->message_type()); - - EXPECT_EQ(FieldDescriptor::LABEL_OPTIONAL, foo_file_->extension(0)->label()); - EXPECT_EQ(FieldDescriptor::LABEL_REPEATED, foo_file_->extension(1)->label()); - EXPECT_EQ(FieldDescriptor::LABEL_OPTIONAL, bar_->extension(0)->label()); - EXPECT_EQ(FieldDescriptor::LABEL_REPEATED, bar_->extension(1)->label()); - - EXPECT_EQ(foo_, foo_file_->extension(0)->containing_type()); - EXPECT_EQ(foo_, foo_file_->extension(1)->containing_type()); - EXPECT_EQ(foo_, bar_->extension(0)->containing_type()); - EXPECT_EQ(foo_, bar_->extension(1)->containing_type()); - - EXPECT_TRUE(foo_file_->extension(0)->extension_scope() == NULL); - EXPECT_TRUE(foo_file_->extension(1)->extension_scope() == NULL); - EXPECT_EQ(bar_, bar_->extension(0)->extension_scope()); - EXPECT_EQ(bar_, bar_->extension(1)->extension_scope()); -}; - -TEST_F(ExtensionDescriptorTest, IsExtensionNumber) { - EXPECT_FALSE(foo_->IsExtensionNumber( 9)); - EXPECT_TRUE (foo_->IsExtensionNumber(10)); - EXPECT_TRUE (foo_->IsExtensionNumber(19)); - EXPECT_FALSE(foo_->IsExtensionNumber(20)); - EXPECT_FALSE(foo_->IsExtensionNumber(29)); - EXPECT_TRUE (foo_->IsExtensionNumber(30)); - EXPECT_TRUE (foo_->IsExtensionNumber(39)); - EXPECT_FALSE(foo_->IsExtensionNumber(40)); -} - -TEST_F(ExtensionDescriptorTest, FindExtensionByName) { - // Note that FileDescriptor::FindExtensionByName() is tested by - // FileDescriptorTest. - ASSERT_EQ(2, bar_->extension_count()); - - EXPECT_EQ(bar_->extension(0), bar_->FindExtensionByName("foo_message")); - EXPECT_EQ(bar_->extension(1), bar_->FindExtensionByName("foo_group" )); - - EXPECT_TRUE(bar_->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo_->FindExtensionByName("foo_int32") == NULL); - EXPECT_TRUE(foo_->FindExtensionByName("foo_message") == NULL); -} - -TEST_F(ExtensionDescriptorTest, FindAllExtensions) { - vector extensions; - pool_.FindAllExtensions(foo_, &extensions); - ASSERT_EQ(4, extensions.size()); - EXPECT_EQ(10, extensions[0]->number()); - EXPECT_EQ(19, extensions[1]->number()); - EXPECT_EQ(30, extensions[2]->number()); - EXPECT_EQ(39, extensions[3]->number()); -} - -// =================================================================== - -class MiscTest : public testing::Test { - protected: - // Function which makes a field of the given type just to find out what its - // cpp_type is. - FieldDescriptor::CppType GetCppTypeForFieldType(FieldDescriptor::Type type) { - FileDescriptorProto file_proto; - file_proto.set_name("foo.proto"); - AddEmptyEnum(&file_proto, "DummyEnum"); - - DescriptorProto* message = AddMessage(&file_proto, "TestMessage"); - FieldDescriptorProto* field = - AddField(message, "foo", 1, FieldDescriptorProto::LABEL_OPTIONAL, - static_cast(static_cast(type))); - - if (type == FieldDescriptor::TYPE_MESSAGE || - type == FieldDescriptor::TYPE_GROUP) { - field->set_type_name("TestMessage"); - } else if (type == FieldDescriptor::TYPE_ENUM) { - field->set_type_name("DummyEnum"); - } - - // Build the descriptors and get the pointers. - DescriptorPool pool; - const FileDescriptor* file = pool.BuildFile(file_proto); - - if (file != NULL && - file->message_type_count() == 1 && - file->message_type(0)->field_count() == 1) { - return file->message_type(0)->field(0)->cpp_type(); - } else { - return static_cast(0); - } - } -}; - -TEST_F(MiscTest, CppTypes) { - // Test that CPP types are assigned correctly. - - typedef FieldDescriptor FD; // avoid ugly line wrapping - - EXPECT_EQ(FD::CPPTYPE_DOUBLE , GetCppTypeForFieldType(FD::TYPE_DOUBLE )); - EXPECT_EQ(FD::CPPTYPE_FLOAT , GetCppTypeForFieldType(FD::TYPE_FLOAT )); - EXPECT_EQ(FD::CPPTYPE_INT64 , GetCppTypeForFieldType(FD::TYPE_INT64 )); - EXPECT_EQ(FD::CPPTYPE_UINT64 , GetCppTypeForFieldType(FD::TYPE_UINT64 )); - EXPECT_EQ(FD::CPPTYPE_INT32 , GetCppTypeForFieldType(FD::TYPE_INT32 )); - EXPECT_EQ(FD::CPPTYPE_UINT64 , GetCppTypeForFieldType(FD::TYPE_FIXED64 )); - EXPECT_EQ(FD::CPPTYPE_UINT32 , GetCppTypeForFieldType(FD::TYPE_FIXED32 )); - EXPECT_EQ(FD::CPPTYPE_BOOL , GetCppTypeForFieldType(FD::TYPE_BOOL )); - EXPECT_EQ(FD::CPPTYPE_STRING , GetCppTypeForFieldType(FD::TYPE_STRING )); - EXPECT_EQ(FD::CPPTYPE_MESSAGE, GetCppTypeForFieldType(FD::TYPE_GROUP )); - EXPECT_EQ(FD::CPPTYPE_MESSAGE, GetCppTypeForFieldType(FD::TYPE_MESSAGE )); - EXPECT_EQ(FD::CPPTYPE_STRING , GetCppTypeForFieldType(FD::TYPE_BYTES )); - EXPECT_EQ(FD::CPPTYPE_UINT32 , GetCppTypeForFieldType(FD::TYPE_UINT32 )); - EXPECT_EQ(FD::CPPTYPE_ENUM , GetCppTypeForFieldType(FD::TYPE_ENUM )); - EXPECT_EQ(FD::CPPTYPE_INT32 , GetCppTypeForFieldType(FD::TYPE_SFIXED32)); - EXPECT_EQ(FD::CPPTYPE_INT64 , GetCppTypeForFieldType(FD::TYPE_SFIXED64)); - EXPECT_EQ(FD::CPPTYPE_INT32 , GetCppTypeForFieldType(FD::TYPE_SINT32 )); - EXPECT_EQ(FD::CPPTYPE_INT64 , GetCppTypeForFieldType(FD::TYPE_SINT64 )); -} - -TEST_F(MiscTest, DefaultValues) { - // Test that setting default values works. - FileDescriptorProto file_proto; - file_proto.set_name("foo.proto"); - - EnumDescriptorProto* enum_type_proto = AddEnum(&file_proto, "DummyEnum"); - AddEnumValue(enum_type_proto, "A", 1); - AddEnumValue(enum_type_proto, "B", 2); - - DescriptorProto* message_proto = AddMessage(&file_proto, "TestMessage"); - - typedef FieldDescriptorProto FD; // avoid ugly line wrapping - const FD::Label label = FD::LABEL_OPTIONAL; - - // Create fields of every CPP type with default values. - AddField(message_proto, "int32" , 1, label, FD::TYPE_INT32 ) - ->set_default_value("-1"); - AddField(message_proto, "int64" , 2, label, FD::TYPE_INT64 ) - ->set_default_value("-1000000000000"); - AddField(message_proto, "uint32", 3, label, FD::TYPE_UINT32) - ->set_default_value("42"); - AddField(message_proto, "uint64", 4, label, FD::TYPE_UINT64) - ->set_default_value("2000000000000"); - AddField(message_proto, "float" , 5, label, FD::TYPE_FLOAT ) - ->set_default_value("4.5"); - AddField(message_proto, "double", 6, label, FD::TYPE_DOUBLE) - ->set_default_value("10e100"); - AddField(message_proto, "bool" , 7, label, FD::TYPE_BOOL ) - ->set_default_value("true"); - AddField(message_proto, "string", 8, label, FD::TYPE_STRING) - ->set_default_value("hello"); - AddField(message_proto, "data" , 9, label, FD::TYPE_BYTES ) - ->set_default_value("\\001\\002\\003"); - - FieldDescriptorProto* enum_field = - AddField(message_proto, "enum", 10, label, FD::TYPE_ENUM); - enum_field->set_type_name("DummyEnum"); - enum_field->set_default_value("B"); - - // Strings are allowed to have empty defaults. (At one point, due to - // a bug, empty defaults for strings were rejected. Oops.) - AddField(message_proto, "empty_string", 11, label, FD::TYPE_STRING) - ->set_default_value(""); - - // Add a second set of fields with implicit defalut values. - AddField(message_proto, "implicit_int32" , 21, label, FD::TYPE_INT32 ); - AddField(message_proto, "implicit_int64" , 22, label, FD::TYPE_INT64 ); - AddField(message_proto, "implicit_uint32", 23, label, FD::TYPE_UINT32); - AddField(message_proto, "implicit_uint64", 24, label, FD::TYPE_UINT64); - AddField(message_proto, "implicit_float" , 25, label, FD::TYPE_FLOAT ); - AddField(message_proto, "implicit_double", 26, label, FD::TYPE_DOUBLE); - AddField(message_proto, "implicit_bool" , 27, label, FD::TYPE_BOOL ); - AddField(message_proto, "implicit_string", 28, label, FD::TYPE_STRING); - AddField(message_proto, "implicit_data" , 29, label, FD::TYPE_BYTES ); - AddField(message_proto, "implicit_enum" , 30, label, FD::TYPE_ENUM) - ->set_type_name("DummyEnum"); - - // Build it. - DescriptorPool pool; - const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); - - ASSERT_EQ(1, file->enum_type_count()); - const EnumDescriptor* enum_type = file->enum_type(0); - ASSERT_EQ(2, enum_type->value_count()); - const EnumValueDescriptor* enum_value_a = enum_type->value(0); - const EnumValueDescriptor* enum_value_b = enum_type->value(1); - - ASSERT_EQ(1, file->message_type_count()); - const Descriptor* message = file->message_type(0); - - ASSERT_EQ(21, message->field_count()); - - // Check the default values. - ASSERT_TRUE(message->field(0)->has_default_value()); - ASSERT_TRUE(message->field(1)->has_default_value()); - ASSERT_TRUE(message->field(2)->has_default_value()); - ASSERT_TRUE(message->field(3)->has_default_value()); - ASSERT_TRUE(message->field(4)->has_default_value()); - ASSERT_TRUE(message->field(5)->has_default_value()); - ASSERT_TRUE(message->field(6)->has_default_value()); - ASSERT_TRUE(message->field(7)->has_default_value()); - ASSERT_TRUE(message->field(8)->has_default_value()); - ASSERT_TRUE(message->field(9)->has_default_value()); - ASSERT_TRUE(message->field(10)->has_default_value()); - - EXPECT_EQ(-1 , message->field(0)->default_value_int32 ()); - EXPECT_EQ(-GOOGLE_ULONGLONG(1000000000000), - message->field(1)->default_value_int64 ()); - EXPECT_EQ(42 , message->field(2)->default_value_uint32()); - EXPECT_EQ(GOOGLE_ULONGLONG(2000000000000), - message->field(3)->default_value_uint64()); - EXPECT_EQ(4.5 , message->field(4)->default_value_float ()); - EXPECT_EQ(10e100 , message->field(5)->default_value_double()); - EXPECT_EQ(true , message->field(6)->default_value_bool ()); - EXPECT_EQ("hello" , message->field(7)->default_value_string()); - EXPECT_EQ("\001\002\003" , message->field(8)->default_value_string()); - EXPECT_EQ(enum_value_b , message->field(9)->default_value_enum ()); - EXPECT_EQ("" , message->field(10)->default_value_string()); - - ASSERT_FALSE(message->field(11)->has_default_value()); - ASSERT_FALSE(message->field(12)->has_default_value()); - ASSERT_FALSE(message->field(13)->has_default_value()); - ASSERT_FALSE(message->field(14)->has_default_value()); - ASSERT_FALSE(message->field(15)->has_default_value()); - ASSERT_FALSE(message->field(16)->has_default_value()); - ASSERT_FALSE(message->field(17)->has_default_value()); - ASSERT_FALSE(message->field(18)->has_default_value()); - ASSERT_FALSE(message->field(19)->has_default_value()); - ASSERT_FALSE(message->field(20)->has_default_value()); - - EXPECT_EQ(0 , message->field(11)->default_value_int32 ()); - EXPECT_EQ(0 , message->field(12)->default_value_int64 ()); - EXPECT_EQ(0 , message->field(13)->default_value_uint32()); - EXPECT_EQ(0 , message->field(14)->default_value_uint64()); - EXPECT_EQ(0.0f , message->field(15)->default_value_float ()); - EXPECT_EQ(0.0 , message->field(16)->default_value_double()); - EXPECT_EQ(false, message->field(17)->default_value_bool ()); - EXPECT_EQ("" , message->field(18)->default_value_string()); - EXPECT_EQ("" , message->field(19)->default_value_string()); - EXPECT_EQ(enum_value_a, message->field(20)->default_value_enum()); -} - -TEST_F(MiscTest, FieldOptions) { - // Try setting field options. - - FileDescriptorProto file_proto; - file_proto.set_name("foo.proto"); - - DescriptorProto* message_proto = AddMessage(&file_proto, "TestMessage"); - AddField(message_proto, "foo", 1, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - FieldDescriptorProto* bar_proto = - AddField(message_proto, "bar", 2, - FieldDescriptorProto::LABEL_OPTIONAL, - FieldDescriptorProto::TYPE_INT32); - - FieldOptions* options = bar_proto->mutable_options(); - options->set_ctype(FieldOptions::CORD); - - // Build the descriptors and get the pointers. - DescriptorPool pool; - const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); - - ASSERT_EQ(1, file->message_type_count()); - const Descriptor* message = file->message_type(0); - - ASSERT_EQ(2, message->field_count()); - const FieldDescriptor* foo = message->field(0); - const FieldDescriptor* bar = message->field(1); - - // "foo" had no options set, so it should return the default options. - EXPECT_EQ(&FieldOptions::default_instance(), &foo->options()); - - // "bar" had options set. - EXPECT_NE(&FieldOptions::default_instance(), options); - EXPECT_TRUE(bar->options().has_ctype()); - EXPECT_EQ(FieldOptions::CORD, bar->options().ctype()); -} - -// =================================================================== - -class AllowUnknownDependenciesTest : public testing::Test { - protected: - virtual void SetUp() { - FileDescriptorProto foo_proto, bar_proto; - - pool_.AllowUnknownDependencies(); - - ASSERT_TRUE(TextFormat::ParseFromString( - "name: 'foo.proto'" - "dependency: 'bar.proto'" - "dependency: 'baz.proto'" - "message_type {" - " name: 'Foo'" - " field { name:'bar' number:1 label:LABEL_OPTIONAL type_name:'Bar' }" - " field { name:'baz' number:2 label:LABEL_OPTIONAL type_name:'Baz' }" - " field { name:'qux' number:3 label:LABEL_OPTIONAL" - " type_name: '.corge.Qux'" - " type: TYPE_ENUM" - " options {" - " uninterpreted_option {" - " name {" - " name_part: 'grault'" - " is_extension: true" - " }" - " positive_int_value: 1234" - " }" - " }" - " }" - "}", - &foo_proto)); - ASSERT_TRUE(TextFormat::ParseFromString( - "name: 'bar.proto'" - "message_type { name: 'Bar' }", - &bar_proto)); - - // Collect pointers to stuff. - bar_file_ = pool_.BuildFile(bar_proto); - ASSERT_TRUE(bar_file_ != NULL); - - ASSERT_EQ(1, bar_file_->message_type_count()); - bar_type_ = bar_file_->message_type(0); - - foo_file_ = pool_.BuildFile(foo_proto); - ASSERT_TRUE(foo_file_ != NULL); - - ASSERT_EQ(1, foo_file_->message_type_count()); - foo_type_ = foo_file_->message_type(0); - - ASSERT_EQ(3, foo_type_->field_count()); - bar_field_ = foo_type_->field(0); - baz_field_ = foo_type_->field(1); - qux_field_ = foo_type_->field(2); - } - - const FileDescriptor* bar_file_; - const Descriptor* bar_type_; - const FileDescriptor* foo_file_; - const Descriptor* foo_type_; - const FieldDescriptor* bar_field_; - const FieldDescriptor* baz_field_; - const FieldDescriptor* qux_field_; - - DescriptorPool pool_; -}; - -TEST_F(AllowUnknownDependenciesTest, PlaceholderFile) { - ASSERT_EQ(2, foo_file_->dependency_count()); - EXPECT_EQ(bar_file_, foo_file_->dependency(0)); - - const FileDescriptor* baz_file = foo_file_->dependency(1); - EXPECT_EQ("baz.proto", baz_file->name()); - EXPECT_EQ(0, baz_file->message_type_count()); - - // Placeholder files should not be findable. - EXPECT_EQ(bar_file_, pool_.FindFileByName(bar_file_->name())); - EXPECT_TRUE(pool_.FindFileByName(baz_file->name()) == NULL); -} - -TEST_F(AllowUnknownDependenciesTest, PlaceholderTypes) { - ASSERT_EQ(FieldDescriptor::TYPE_MESSAGE, bar_field_->type()); - EXPECT_EQ(bar_type_, bar_field_->message_type()); - - ASSERT_EQ(FieldDescriptor::TYPE_MESSAGE, baz_field_->type()); - const Descriptor* baz_type = baz_field_->message_type(); - EXPECT_EQ("Baz", baz_type->name()); - EXPECT_EQ("Baz", baz_type->full_name()); - EXPECT_EQ("Baz.placeholder.proto", baz_type->file()->name()); - EXPECT_EQ(0, baz_type->extension_range_count()); - - ASSERT_EQ(FieldDescriptor::TYPE_ENUM, qux_field_->type()); - const EnumDescriptor* qux_type = qux_field_->enum_type(); - EXPECT_EQ("Qux", qux_type->name()); - EXPECT_EQ("corge.Qux", qux_type->full_name()); - EXPECT_EQ("corge.Qux.placeholder.proto", qux_type->file()->name()); - - // Placeholder types should not be findable. - EXPECT_EQ(bar_type_, pool_.FindMessageTypeByName(bar_type_->full_name())); - EXPECT_TRUE(pool_.FindMessageTypeByName(baz_type->full_name()) == NULL); - EXPECT_TRUE(pool_.FindEnumTypeByName(qux_type->full_name()) == NULL); -} - -TEST_F(AllowUnknownDependenciesTest, CopyTo) { - // FieldDescriptor::CopyTo() should write non-fully-qualified type names - // for placeholder types which were not originally fully-qualified. - FieldDescriptorProto proto; - - // Bar is not a placeholder, so it is fully-qualified. - bar_field_->CopyTo(&proto); - EXPECT_EQ(".Bar", proto.type_name()); - EXPECT_EQ(FieldDescriptorProto::TYPE_MESSAGE, proto.type()); - - // Baz is an unqualified placeholder. - proto.Clear(); - baz_field_->CopyTo(&proto); - EXPECT_EQ("Baz", proto.type_name()); - EXPECT_FALSE(proto.has_type()); - - // Qux is a fully-qualified placeholder. - proto.Clear(); - qux_field_->CopyTo(&proto); - EXPECT_EQ(".corge.Qux", proto.type_name()); - EXPECT_EQ(FieldDescriptorProto::TYPE_ENUM, proto.type()); -} - -TEST_F(AllowUnknownDependenciesTest, CustomOptions) { - // Qux should still have the uninterpreted option attached. - ASSERT_EQ(1, qux_field_->options().uninterpreted_option_size()); - const UninterpretedOption& option = - qux_field_->options().uninterpreted_option(0); - ASSERT_EQ(1, option.name_size()); - EXPECT_EQ("grault", option.name(0).name_part()); -} - -TEST_F(AllowUnknownDependenciesTest, UnknownExtendee) { - // Test that we can extend an unknown type. This is slightly tricky because - // it means that the placeholder type must have an extension range. - - FileDescriptorProto extension_proto; - - ASSERT_TRUE(TextFormat::ParseFromString( - "name: 'extension.proto'" - "extension { extendee: 'UnknownType' name:'some_extension' number:123" - " label:LABEL_OPTIONAL type:TYPE_INT32 }", - &extension_proto)); - const FileDescriptor* file = pool_.BuildFile(extension_proto); - - ASSERT_TRUE(file != NULL); - - ASSERT_EQ(1, file->extension_count()); - const Descriptor* extendee = file->extension(0)->containing_type(); - EXPECT_EQ("UnknownType", extendee->name()); - ASSERT_EQ(1, extendee->extension_range_count()); - EXPECT_EQ(1, extendee->extension_range(0)->start); - EXPECT_EQ(FieldDescriptor::kMaxNumber + 1, extendee->extension_range(0)->end); -} - -TEST_F(AllowUnknownDependenciesTest, CustomOption) { - // Test that we can use a custom option without having parsed - // descriptor.proto. - - FileDescriptorProto option_proto; - - ASSERT_TRUE(TextFormat::ParseFromString( - "name: \"unknown_custom_options.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { " - " extendee: \"google.protobuf.FileOptions\" " - " name: \"some_option\" " - " number: 123456 " - " label: LABEL_OPTIONAL " - " type: TYPE_INT32 " - "} " - "options { " - " uninterpreted_option { " - " name { " - " name_part: \"some_option\" " - " is_extension: true " - " } " - " positive_int_value: 1234 " - " } " - " uninterpreted_option { " - " name { " - " name_part: \"unknown_option\" " - " is_extension: true " - " } " - " positive_int_value: 1234 " - " } " - " uninterpreted_option { " - " name { " - " name_part: \"optimize_for\" " - " is_extension: false " - " } " - " identifier_value: \"SPEED\" " - " } " - "}", - &option_proto)); - - const FileDescriptor* file = pool_.BuildFile(option_proto); - ASSERT_TRUE(file != NULL); - - // Verify that no extension options were set, but they were left as - // uninterpreted_options. - vector fields; - file->options().GetReflection()->ListFields(file->options(), &fields); - ASSERT_EQ(2, fields.size()); - EXPECT_TRUE(file->options().has_optimize_for()); - EXPECT_EQ(2, file->options().uninterpreted_option_size()); -} - -// =================================================================== - -TEST(CustomOptions, OptionLocations) { - const Descriptor* message = - protobuf_unittest::TestMessageWithCustomOptions::descriptor(); - const FileDescriptor* file = message->file(); - const FieldDescriptor* field = message->FindFieldByName("field1"); - const EnumDescriptor* enm = message->FindEnumTypeByName("AnEnum"); - // TODO(benjy): Support EnumValue options, once the compiler does. - const ServiceDescriptor* service = - file->FindServiceByName("TestServiceWithCustomOptions"); - const MethodDescriptor* method = service->FindMethodByName("Foo"); - - EXPECT_EQ(GOOGLE_LONGLONG(9876543210), - file->options().GetExtension(protobuf_unittest::file_opt1)); - EXPECT_EQ(-56, - message->options().GetExtension(protobuf_unittest::message_opt1)); - EXPECT_EQ(GOOGLE_LONGLONG(8765432109), - field->options().GetExtension(protobuf_unittest::field_opt1)); - EXPECT_EQ(42, // Check that we get the default for an option we don't set. - field->options().GetExtension(protobuf_unittest::field_opt2)); - EXPECT_EQ(-789, - enm->options().GetExtension(protobuf_unittest::enum_opt1)); - EXPECT_EQ(123, - enm->value(1)->options().GetExtension( - protobuf_unittest::enum_value_opt1)); - EXPECT_EQ(GOOGLE_LONGLONG(-9876543210), - service->options().GetExtension(protobuf_unittest::service_opt1)); - EXPECT_EQ(protobuf_unittest::METHODOPT1_VAL2, - method->options().GetExtension(protobuf_unittest::method_opt1)); - - // See that the regular options went through unscathed. - EXPECT_TRUE(message->options().has_message_set_wire_format()); - EXPECT_EQ(FieldOptions::CORD, field->options().ctype()); -} - -TEST(CustomOptions, OptionTypes) { - const MessageOptions* options = NULL; - - options = - &protobuf_unittest::CustomOptionMinIntegerValues::descriptor()->options(); - EXPECT_EQ(false , options->GetExtension(protobuf_unittest::bool_opt)); - EXPECT_EQ(kint32min, options->GetExtension(protobuf_unittest::int32_opt)); - EXPECT_EQ(kint64min, options->GetExtension(protobuf_unittest::int64_opt)); - EXPECT_EQ(0 , options->GetExtension(protobuf_unittest::uint32_opt)); - EXPECT_EQ(0 , options->GetExtension(protobuf_unittest::uint64_opt)); - EXPECT_EQ(kint32min, options->GetExtension(protobuf_unittest::sint32_opt)); - EXPECT_EQ(kint64min, options->GetExtension(protobuf_unittest::sint64_opt)); - EXPECT_EQ(0 , options->GetExtension(protobuf_unittest::fixed32_opt)); - EXPECT_EQ(0 , options->GetExtension(protobuf_unittest::fixed64_opt)); - EXPECT_EQ(kint32min, options->GetExtension(protobuf_unittest::sfixed32_opt)); - EXPECT_EQ(kint64min, options->GetExtension(protobuf_unittest::sfixed64_opt)); - - options = - &protobuf_unittest::CustomOptionMaxIntegerValues::descriptor()->options(); - EXPECT_EQ(true , options->GetExtension(protobuf_unittest::bool_opt)); - EXPECT_EQ(kint32max , options->GetExtension(protobuf_unittest::int32_opt)); - EXPECT_EQ(kint64max , options->GetExtension(protobuf_unittest::int64_opt)); - EXPECT_EQ(kuint32max, options->GetExtension(protobuf_unittest::uint32_opt)); - EXPECT_EQ(kuint64max, options->GetExtension(protobuf_unittest::uint64_opt)); - EXPECT_EQ(kint32max , options->GetExtension(protobuf_unittest::sint32_opt)); - EXPECT_EQ(kint64max , options->GetExtension(protobuf_unittest::sint64_opt)); - EXPECT_EQ(kuint32max, options->GetExtension(protobuf_unittest::fixed32_opt)); - EXPECT_EQ(kuint64max, options->GetExtension(protobuf_unittest::fixed64_opt)); - EXPECT_EQ(kint32max , options->GetExtension(protobuf_unittest::sfixed32_opt)); - EXPECT_EQ(kint64max , options->GetExtension(protobuf_unittest::sfixed64_opt)); - - options = - &protobuf_unittest::CustomOptionOtherValues::descriptor()->options(); - EXPECT_EQ(-100, options->GetExtension(protobuf_unittest::int32_opt)); - EXPECT_FLOAT_EQ(12.3456789, - options->GetExtension(protobuf_unittest::float_opt)); - EXPECT_DOUBLE_EQ(1.234567890123456789, - options->GetExtension(protobuf_unittest::double_opt)); - EXPECT_EQ("Hello, \"World\"", - options->GetExtension(protobuf_unittest::string_opt)); - - EXPECT_EQ(string("Hello\0World", 11), - options->GetExtension(protobuf_unittest::bytes_opt)); - - EXPECT_EQ(protobuf_unittest::DummyMessageContainingEnum::TEST_OPTION_ENUM_TYPE2, - options->GetExtension(protobuf_unittest::enum_opt)); - - options = - &protobuf_unittest::SettingRealsFromPositiveInts::descriptor()->options(); - EXPECT_FLOAT_EQ(12, options->GetExtension(protobuf_unittest::float_opt)); - EXPECT_DOUBLE_EQ(154, options->GetExtension(protobuf_unittest::double_opt)); - - options = - &protobuf_unittest::SettingRealsFromNegativeInts::descriptor()->options(); - EXPECT_FLOAT_EQ(-12, options->GetExtension(protobuf_unittest::float_opt)); - EXPECT_DOUBLE_EQ(-154, options->GetExtension(protobuf_unittest::double_opt)); -} - -TEST(CustomOptions, ComplexExtensionOptions) { - const MessageOptions* options = - &protobuf_unittest::VariousComplexOptions::descriptor()->options(); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt1).foo(), 42); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt1). - GetExtension(protobuf_unittest::quux), 324); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt1). - GetExtension(protobuf_unittest::corge).qux(), 876); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2).baz(), 987); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2). - GetExtension(protobuf_unittest::grault), 654); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2).bar().foo(), - 743); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2).bar(). - GetExtension(protobuf_unittest::quux), 1999); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2).bar(). - GetExtension(protobuf_unittest::corge).qux(), 2008); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2). - GetExtension(protobuf_unittest::garply).foo(), 741); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2). - GetExtension(protobuf_unittest::garply). - GetExtension(protobuf_unittest::quux), 1998); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2). - GetExtension(protobuf_unittest::garply). - GetExtension(protobuf_unittest::corge).qux(), 2121); - EXPECT_EQ(options->GetExtension( - protobuf_unittest::ComplexOptionType2::ComplexOptionType4::complex_opt4). - waldo(), 1971); - EXPECT_EQ(options->GetExtension(protobuf_unittest::complex_opt2). - fred().waldo(), 321); - EXPECT_EQ(9, options->GetExtension(protobuf_unittest::complex_opt3).qux()); - EXPECT_EQ(22, options->GetExtension(protobuf_unittest::complex_opt3). - complexoptiontype5().plugh()); - EXPECT_EQ(24, options->GetExtension(protobuf_unittest::complexopt6).xyzzy()); -} - -TEST(CustomOptions, OptionsFromOtherFile) { - // Test that to use a custom option, we only need to import the file - // defining the option; we do not also have to import descriptor.proto. - DescriptorPool pool; - - FileDescriptorProto file_proto; - FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); - - protobuf_unittest::TestMessageWithCustomOptions::descriptor() - ->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); - - ASSERT_TRUE(TextFormat::ParseFromString( - "name: \"custom_options_import.proto\" " - "package: \"protobuf_unittest\" " - "dependency: \"google/protobuf/unittest_custom_options.proto\" " - "options { " - " uninterpreted_option { " - " name { " - " name_part: \"file_opt1\" " - " is_extension: true " - " } " - " positive_int_value: 1234 " - " } " - // Test a non-extension option too. (At one point this failed due to a - // bug.) - " uninterpreted_option { " - " name { " - " name_part: \"java_package\" " - " is_extension: false " - " } " - " string_value: \"foo\" " - " } " - // Test that enum-typed options still work too. (At one point this also - // failed due to a bug.) - " uninterpreted_option { " - " name { " - " name_part: \"optimize_for\" " - " is_extension: false " - " } " - " identifier_value: \"SPEED\" " - " } " - "}" - , - &file_proto)); - - const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); - EXPECT_EQ(1234, file->options().GetExtension(protobuf_unittest::file_opt1)); - EXPECT_TRUE(file->options().has_java_package()); - EXPECT_EQ("foo", file->options().java_package()); - EXPECT_TRUE(file->options().has_optimize_for()); - EXPECT_EQ(FileOptions::SPEED, file->options().optimize_for()); -} - -TEST(CustomOptions, MessageOptionThreeFieldsSet) { - // This tests a bug which previously existed in custom options parsing. The - // bug occurred when you defined a custom option with message type and then - // set three fields of that option on a single definition (see the example - // below). The bug is a bit hard to explain, so check the change history if - // you want to know more. - DescriptorPool pool; - - FileDescriptorProto file_proto; - FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); - - protobuf_unittest::TestMessageWithCustomOptions::descriptor() - ->file()->CopyTo(&file_proto); - ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); - - // The following represents the definition: - // - // import "google/protobuf/unittest_custom_options.proto" - // package protobuf_unittest; - // message Foo { - // option (complex_opt1).foo = 1234; - // option (complex_opt1).foo2 = 1234; - // option (complex_opt1).foo3 = 1234; - // } - ASSERT_TRUE(TextFormat::ParseFromString( - "name: \"custom_options_import.proto\" " - "package: \"protobuf_unittest\" " - "dependency: \"google/protobuf/unittest_custom_options.proto\" " - "message_type { " - " name: \"Foo\" " - " options { " - " uninterpreted_option { " - " name { " - " name_part: \"complex_opt1\" " - " is_extension: true " - " } " - " name { " - " name_part: \"foo\" " - " is_extension: false " - " } " - " positive_int_value: 1234 " - " } " - " uninterpreted_option { " - " name { " - " name_part: \"complex_opt1\" " - " is_extension: true " - " } " - " name { " - " name_part: \"foo2\" " - " is_extension: false " - " } " - " positive_int_value: 1234 " - " } " - " uninterpreted_option { " - " name { " - " name_part: \"complex_opt1\" " - " is_extension: true " - " } " - " name { " - " name_part: \"foo3\" " - " is_extension: false " - " } " - " positive_int_value: 1234 " - " } " - " } " - "}", - &file_proto)); - - const FileDescriptor* file = pool.BuildFile(file_proto); - ASSERT_TRUE(file != NULL); - ASSERT_EQ(1, file->message_type_count()); - - const MessageOptions& options = file->message_type(0)->options(); - EXPECT_EQ(1234, options.GetExtension(protobuf_unittest::complex_opt1).foo()); -} - -// Check that aggregate options were parsed and saved correctly in -// the appropriate descriptors. -TEST(CustomOptions, AggregateOptions) { - const Descriptor* msg = protobuf_unittest::AggregateMessage::descriptor(); - const FileDescriptor* file = msg->file(); - const FieldDescriptor* field = msg->FindFieldByName("fieldname"); - const EnumDescriptor* enumd = file->FindEnumTypeByName("AggregateEnum"); - const EnumValueDescriptor* enumv = enumd->FindValueByName("VALUE"); - const ServiceDescriptor* service = file->FindServiceByName( - "AggregateService"); - const MethodDescriptor* method = service->FindMethodByName("Method"); - - // Tests for the different types of data embedded in fileopt - const protobuf_unittest::Aggregate& file_options = - file->options().GetExtension(protobuf_unittest::fileopt); - EXPECT_EQ(100, file_options.i()); - EXPECT_EQ("FileAnnotation", file_options.s()); - EXPECT_EQ("NestedFileAnnotation", file_options.sub().s()); - EXPECT_EQ("FileExtensionAnnotation", - file_options.file().GetExtension(protobuf_unittest::fileopt).s()); - EXPECT_EQ("EmbeddedMessageSetElement", - file_options.mset().GetExtension( - protobuf_unittest::AggregateMessageSetElement - ::message_set_extension).s()); - - // Simple tests for all the other types of annotations - EXPECT_EQ("MessageAnnotation", - msg->options().GetExtension(protobuf_unittest::msgopt).s()); - EXPECT_EQ("FieldAnnotation", - field->options().GetExtension(protobuf_unittest::fieldopt).s()); - EXPECT_EQ("EnumAnnotation", - enumd->options().GetExtension(protobuf_unittest::enumopt).s()); - EXPECT_EQ("EnumValueAnnotation", - enumv->options().GetExtension(protobuf_unittest::enumvalopt).s()); - EXPECT_EQ("ServiceAnnotation", - service->options().GetExtension(protobuf_unittest::serviceopt).s()); - EXPECT_EQ("MethodAnnotation", - method->options().GetExtension(protobuf_unittest::methodopt).s()); -} - -// =================================================================== - -// The tests below trigger every unique call to AddError() in descriptor.cc, -// in the order in which they appear in that file. I'm using TextFormat here -// to specify the input descriptors because building them using code would -// be too bulky. - -class MockErrorCollector : public DescriptorPool::ErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, - const string& element_name, const Message* descriptor, - ErrorLocation location, const string& message) { - const char* location_name = NULL; - switch (location) { - case NAME : location_name = "NAME" ; break; - case NUMBER : location_name = "NUMBER" ; break; - case TYPE : location_name = "TYPE" ; break; - case EXTENDEE : location_name = "EXTENDEE" ; break; - case DEFAULT_VALUE: location_name = "DEFAULT_VALUE"; break; - case OPTION_NAME : location_name = "OPTION_NAME" ; break; - case OPTION_VALUE : location_name = "OPTION_VALUE" ; break; - case INPUT_TYPE : location_name = "INPUT_TYPE" ; break; - case OUTPUT_TYPE : location_name = "OUTPUT_TYPE" ; break; - case OTHER : location_name = "OTHER" ; break; - } - - strings::SubstituteAndAppend( - &text_, "$0: $1: $2: $3\n", - filename, element_name, location_name, message); - } -}; - -class ValidationErrorTest : public testing::Test { - protected: - // Parse file_text as a FileDescriptorProto in text format and add it - // to the DescriptorPool. Expect no errors. - void BuildFile(const string& file_text) { - FileDescriptorProto file_proto; - ASSERT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); - ASSERT_TRUE(pool_.BuildFile(file_proto) != NULL); - } - - // Parse file_text as a FileDescriptorProto in text format and add it - // to the DescriptorPool. Expect errors to be produced which match the - // given error text. - void BuildFileWithErrors(const string& file_text, - const string& expected_errors) { - FileDescriptorProto file_proto; - ASSERT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); - - MockErrorCollector error_collector; - EXPECT_TRUE( - pool_.BuildFileCollectingErrors(file_proto, &error_collector) == NULL); - EXPECT_EQ(expected_errors, error_collector.text_); - } - - // Builds some already-parsed file in our test pool. - void BuildFileInTestPool(const FileDescriptor* file) { - FileDescriptorProto file_proto; - file->CopyTo(&file_proto); - ASSERT_TRUE(pool_.BuildFile(file_proto) != NULL); - } - - // Build descriptor.proto in our test pool. This allows us to extend it in - // the test pool, so we can test custom options. - void BuildDescriptorMessagesInTestPool() { - BuildFileInTestPool(DescriptorProto::descriptor()->file()); - } - - DescriptorPool pool_; -}; - -TEST_F(ValidationErrorTest, AlreadyDefined) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" }" - "message_type { name: \"Foo\" }", - - "foo.proto: Foo: NAME: \"Foo\" is already defined.\n"); -} - -TEST_F(ValidationErrorTest, AlreadyDefinedInPackage) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "package: \"foo.bar\" " - "message_type { name: \"Foo\" }" - "message_type { name: \"Foo\" }", - - "foo.proto: foo.bar.Foo: NAME: \"Foo\" is already defined in " - "\"foo.bar\".\n"); -} - -TEST_F(ValidationErrorTest, AlreadyDefinedInOtherFile) { - BuildFile( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" }"); - - BuildFileWithErrors( - "name: \"bar.proto\" " - "message_type { name: \"Foo\" }", - - "bar.proto: Foo: NAME: \"Foo\" is already defined in file " - "\"foo.proto\".\n"); -} - -TEST_F(ValidationErrorTest, PackageAlreadyDefined) { - BuildFile( - "name: \"foo.proto\" " - "message_type { name: \"foo\" }"); - BuildFileWithErrors( - "name: \"bar.proto\" " - "package: \"foo.bar\"", - - "bar.proto: foo: NAME: \"foo\" is already defined (as something other " - "than a package) in file \"foo.proto\".\n"); -} - -TEST_F(ValidationErrorTest, EnumValueAlreadyDefinedInParent) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "enum_type { name: \"Foo\" value { name: \"FOO\" number: 1 } } " - "enum_type { name: \"Bar\" value { name: \"FOO\" number: 1 } } ", - - "foo.proto: FOO: NAME: \"FOO\" is already defined.\n" - "foo.proto: FOO: NAME: Note that enum values use C++ scoping rules, " - "meaning that enum values are siblings of their type, not children of " - "it. Therefore, \"FOO\" must be unique within the global scope, not " - "just within \"Bar\".\n"); -} - -TEST_F(ValidationErrorTest, EnumValueAlreadyDefinedInParentNonGlobal) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "package: \"pkg\" " - "enum_type { name: \"Foo\" value { name: \"FOO\" number: 1 } } " - "enum_type { name: \"Bar\" value { name: \"FOO\" number: 1 } } ", - - "foo.proto: pkg.FOO: NAME: \"FOO\" is already defined in \"pkg\".\n" - "foo.proto: pkg.FOO: NAME: Note that enum values use C++ scoping rules, " - "meaning that enum values are siblings of their type, not children of " - "it. Therefore, \"FOO\" must be unique within \"pkg\", not just within " - "\"Bar\".\n"); -} - -TEST_F(ValidationErrorTest, MissingName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { }", - - "foo.proto: : NAME: Missing name.\n"); -} - -TEST_F(ValidationErrorTest, InvalidName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"$\" }", - - "foo.proto: $: NAME: \"$\" is not a valid identifier.\n"); -} - -TEST_F(ValidationErrorTest, InvalidPackageName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "package: \"foo.$\"", - - "foo.proto: foo.$: NAME: \"$\" is not a valid identifier.\n"); -} - -TEST_F(ValidationErrorTest, MissingFileName) { - BuildFileWithErrors( - "", - - ": : OTHER: Missing field: FileDescriptorProto.name.\n"); -} - -TEST_F(ValidationErrorTest, DupeDependency) { - BuildFile("name: \"foo.proto\""); - BuildFileWithErrors( - "name: \"bar.proto\" " - "dependency: \"foo.proto\" " - "dependency: \"foo.proto\" ", - - "bar.proto: bar.proto: OTHER: Import \"foo.proto\" was listed twice.\n"); -} - -TEST_F(ValidationErrorTest, UnknownDependency) { - BuildFileWithErrors( - "name: \"bar.proto\" " - "dependency: \"foo.proto\" ", - - "bar.proto: bar.proto: OTHER: Import \"foo.proto\" has not been loaded.\n"); -} - -TEST_F(ValidationErrorTest, ForeignUnimportedPackageNoCrash) { - // Used to crash: If we depend on a non-existent file and then refer to a - // package defined in a file that we didn't import, and that package is - // nested within a parent package which this file is also in, and we don't - // include that parent package in the name (i.e. we do a relative lookup)... - // Yes, really. - BuildFile( - "name: 'foo.proto' " - "package: 'outer.foo' "); - BuildFileWithErrors( - "name: 'bar.proto' " - "dependency: 'baz.proto' " - "package: 'outer.bar' " - "message_type { " - " name: 'Bar' " - " field { name:'bar' number:1 label:LABEL_OPTIONAL type_name:'foo.Foo' }" - "}", - - "bar.proto: bar.proto: OTHER: Import \"baz.proto\" has not been loaded.\n" - "bar.proto: outer.bar.Bar.bar: TYPE: \"outer.foo\" seems to be defined in " - "\"foo.proto\", which is not imported by \"bar.proto\". To use it here, " - "please add the necessary import.\n"); -} - -TEST_F(ValidationErrorTest, DupeFile) { - BuildFile( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" }"); - // Note: We should *not* get redundant errors about "Foo" already being - // defined. - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - // Add another type so that the files aren't identical (in which case there - // would be no error). - "enum_type { name: \"Bar\" }", - - "foo.proto: foo.proto: OTHER: A file with this name is already in the " - "pool.\n"); -} - -TEST_F(ValidationErrorTest, FieldInExtensionRange) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name: \"foo\" number: 9 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field { name: \"bar\" number: 10 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field { name: \"baz\" number: 19 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field { name: \"qux\" number: 20 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " extension_range { start: 10 end: 20 }" - "}", - - "foo.proto: Foo.bar: NUMBER: Extension range 10 to 19 includes field " - "\"bar\" (10).\n" - "foo.proto: Foo.baz: NUMBER: Extension range 10 to 19 includes field " - "\"baz\" (19).\n"); -} - -TEST_F(ValidationErrorTest, OverlappingExtensionRanges) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension_range { start: 10 end: 20 }" - " extension_range { start: 20 end: 30 }" - " extension_range { start: 19 end: 21 }" - "}", - - "foo.proto: Foo: NUMBER: Extension range 19 to 20 overlaps with " - "already-defined range 10 to 19.\n" - "foo.proto: Foo: NUMBER: Extension range 19 to 20 overlaps with " - "already-defined range 20 to 29.\n"); -} - -TEST_F(ValidationErrorTest, InvalidDefaults) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - - // Invalid number. - " field { name: \"foo\" number: 1 label: LABEL_OPTIONAL type: TYPE_INT32" - " default_value: \"abc\" }" - - // Empty default value. - " field { name: \"bar\" number: 2 label: LABEL_OPTIONAL type: TYPE_INT32" - " default_value: \"\" }" - - // Invalid boolean. - " field { name: \"baz\" number: 3 label: LABEL_OPTIONAL type: TYPE_BOOL" - " default_value: \"abc\" }" - - // Messages can't have defaults. - " field { name: \"qux\" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE" - " default_value: \"abc\" type_name: \"Foo\" }" - - // Same thing, but we don't know that this field has message type until - // we look up the type name. - " field { name: \"quux\" number: 5 label: LABEL_OPTIONAL" - " default_value: \"abc\" type_name: \"Foo\" }" - - // Repeateds can't have defaults. - " field { name: \"corge\" number: 6 label: LABEL_REPEATED type: TYPE_INT32" - " default_value: \"1\" }" - "}", - - "foo.proto: Foo.foo: DEFAULT_VALUE: Couldn't parse default value.\n" - "foo.proto: Foo.bar: DEFAULT_VALUE: Couldn't parse default value.\n" - "foo.proto: Foo.baz: DEFAULT_VALUE: Boolean default must be true or " - "false.\n" - "foo.proto: Foo.qux: DEFAULT_VALUE: Messages can't have default values.\n" - "foo.proto: Foo.corge: DEFAULT_VALUE: Repeated fields can't have default " - "values.\n" - // This ends up being reported later because the error is detected at - // cross-linking time. - "foo.proto: Foo.quux: DEFAULT_VALUE: Messages can't have default " - "values.\n"); -} - -TEST_F(ValidationErrorTest, NegativeFieldNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name: \"foo\" number: -1 label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.foo: NUMBER: Field numbers must be positive integers.\n"); -} - -TEST_F(ValidationErrorTest, HugeFieldNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name: \"foo\" number: 0x70000000 " - " label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.foo: NUMBER: Field numbers cannot be greater than " - "536870911.\n"); -} - -TEST_F(ValidationErrorTest, ReservedFieldNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field {name:\"foo\" number: 18999 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field {name:\"bar\" number: 19000 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field {name:\"baz\" number: 19999 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field {name:\"qux\" number: 20000 label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.bar: NUMBER: Field numbers 19000 through 19999 are " - "reserved for the protocol buffer library implementation.\n" - "foo.proto: Foo.baz: NUMBER: Field numbers 19000 through 19999 are " - "reserved for the protocol buffer library implementation.\n"); -} - -TEST_F(ValidationErrorTest, ExtensionMissingExtendee) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension { name: \"foo\" number: 1 label: LABEL_OPTIONAL" - " type_name: \"Foo\" }" - "}", - - "foo.proto: Foo.foo: EXTENDEE: FieldDescriptorProto.extendee not set for " - "extension field.\n"); -} - -TEST_F(ValidationErrorTest, NonExtensionWithExtendee) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Bar\"" - " extension_range { start: 1 end: 2 }" - "}" - "message_type {" - " name: \"Foo\"" - " field { name: \"foo\" number: 1 label: LABEL_OPTIONAL" - " type_name: \"Foo\" extendee: \"Bar\" }" - "}", - - "foo.proto: Foo.foo: EXTENDEE: FieldDescriptorProto.extendee set for " - "non-extension field.\n"); -} - -TEST_F(ValidationErrorTest, FieldNumberConflict) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name: \"foo\" number: 1 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " field { name: \"bar\" number: 1 label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.bar: NUMBER: Field number 1 has already been used in " - "\"Foo\" by field \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, BadMessageSetExtensionType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"MessageSet\"" - " options { message_set_wire_format: true }" - " extension_range { start: 4 end: 5 }" - "}" - "message_type {" - " name: \"Foo\"" - " extension { name:\"foo\" number:4 label:LABEL_OPTIONAL type:TYPE_INT32" - " extendee: \"MessageSet\" }" - "}", - - "foo.proto: Foo.foo: TYPE: Extensions of MessageSets must be optional " - "messages.\n"); -} - -TEST_F(ValidationErrorTest, BadMessageSetExtensionLabel) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"MessageSet\"" - " options { message_set_wire_format: true }" - " extension_range { start: 4 end: 5 }" - "}" - "message_type {" - " name: \"Foo\"" - " extension { name:\"foo\" number:4 label:LABEL_REPEATED type:TYPE_MESSAGE" - " type_name: \"Foo\" extendee: \"MessageSet\" }" - "}", - - "foo.proto: Foo.foo: TYPE: Extensions of MessageSets must be optional " - "messages.\n"); -} - -TEST_F(ValidationErrorTest, FieldInMessageSet) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " options { message_set_wire_format: true }" - " field { name: \"foo\" number: 1 label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.foo: NAME: MessageSets cannot have fields, only " - "extensions.\n"); -} - -TEST_F(ValidationErrorTest, NegativeExtensionRangeNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension_range { start: -10 end: -1 }" - "}", - - "foo.proto: Foo: NUMBER: Extension numbers must be positive integers.\n"); -} - -TEST_F(ValidationErrorTest, HugeExtensionRangeNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension_range { start: 1 end: 0x70000000 }" - "}", - - "foo.proto: Foo: NUMBER: Extension numbers cannot be greater than " - "536870911.\n"); -} - -TEST_F(ValidationErrorTest, ExtensionRangeEndBeforeStart) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension_range { start: 10 end: 10 }" - " extension_range { start: 10 end: 5 }" - "}", - - "foo.proto: Foo: NUMBER: Extension range end number must be greater than " - "start number.\n" - "foo.proto: Foo: NUMBER: Extension range end number must be greater than " - "start number.\n"); -} - -TEST_F(ValidationErrorTest, EmptyEnum) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "enum_type { name: \"Foo\" }" - // Also use the empty enum in a message to make sure there are no crashes - // during validation (possible if the code attempts to derive a default - // value for the field). - "message_type {" - " name: \"Bar\"" - " field { name: \"foo\" number: 1 label:LABEL_OPTIONAL type_name:\"Foo\" }" - " field { name: \"bar\" number: 2 label:LABEL_OPTIONAL type_name:\"Foo\" " - " default_value: \"NO_SUCH_VALUE\" }" - "}", - - "foo.proto: Foo: NAME: Enums must contain at least one value.\n" - "foo.proto: Bar.bar: DEFAULT_VALUE: Enum type \"Foo\" has no value named " - "\"NO_SUCH_VALUE\".\n"); -} - -TEST_F(ValidationErrorTest, UndefinedExtendee) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " extension { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_INT32" - " extendee: \"Bar\" }" - "}", - - "foo.proto: Foo.foo: EXTENDEE: \"Bar\" is not defined.\n"); -} - -TEST_F(ValidationErrorTest, NonMessageExtendee) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "enum_type { name: \"Bar\" value { name:\"DUMMY\" number:0 } }" - "message_type {" - " name: \"Foo\"" - " extension { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_INT32" - " extendee: \"Bar\" }" - "}", - - "foo.proto: Foo.foo: EXTENDEE: \"Bar\" is not a message type.\n"); -} - -TEST_F(ValidationErrorTest, NotAnExtensionNumber) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Bar\"" - "}" - "message_type {" - " name: \"Foo\"" - " extension { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_INT32" - " extendee: \"Bar\" }" - "}", - - "foo.proto: Foo.foo: NUMBER: \"Bar\" does not declare 1 as an extension " - "number.\n"); -} - -TEST_F(ValidationErrorTest, UndefinedFieldType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type_name:\"Bar\" }" - "}", - - "foo.proto: Foo.foo: TYPE: \"Bar\" is not defined.\n"); -} - -TEST_F(ValidationErrorTest, FieldTypeDefinedInUndeclaredDependency) { - BuildFile( - "name: \"bar.proto\" " - "message_type { name: \"Bar\" } "); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type_name:\"Bar\" }" - "}", - "foo.proto: Foo.foo: TYPE: \"Bar\" seems to be defined in \"bar.proto\", " - "which is not imported by \"foo.proto\". To use it here, please add the " - "necessary import.\n"); -} - -TEST_F(ValidationErrorTest, SearchMostLocalFirst) { - // The following should produce an error that Bar.Baz is not defined: - // message Bar { message Baz {} } - // message Foo { - // message Bar { - // // Placing "message Baz{}" here, or removing Foo.Bar altogether, - // // would fix the error. - // } - // optional Bar.Baz baz = 1; - // } - // An one point the lookup code incorrectly did not produce an error in this - // case, because when looking for Bar.Baz, it would try "Foo.Bar.Baz" first, - // fail, and ten try "Bar.Baz" and succeed, even though "Bar" should actually - // refer to the inner Bar, not the outer one. - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Bar\"" - " nested_type { name: \"Baz\" }" - "}" - "message_type {" - " name: \"Foo\"" - " nested_type { name: \"Bar\" }" - " field { name:\"baz\" number:1 label:LABEL_OPTIONAL" - " type_name:\"Bar.Baz\" }" - "}", - - "foo.proto: Foo.baz: TYPE: \"Bar.Baz\" is not defined.\n"); -} - -TEST_F(ValidationErrorTest, SearchMostLocalFirst2) { - // This test would find the most local "Bar" first, and does, but - // proceeds to find the outer one because the inner one's not an - // aggregate. - BuildFile( - "name: \"foo.proto\" " - "message_type {" - " name: \"Bar\"" - " nested_type { name: \"Baz\" }" - "}" - "message_type {" - " name: \"Foo\"" - " field { name: \"Bar\" number:1 type:TYPE_BYTES } " - " field { name:\"baz\" number:2 label:LABEL_OPTIONAL" - " type_name:\"Bar.Baz\" }" - "}"); -} - -TEST_F(ValidationErrorTest, PackageOriginallyDeclaredInTransitiveDependent) { - // Imagine we have the following: - // - // foo.proto: - // package foo.bar; - // bar.proto: - // package foo.bar; - // import "foo.proto"; - // message Bar {} - // baz.proto: - // package foo; - // import "bar.proto" - // message Baz { optional bar.Bar qux = 1; } - // - // When validating baz.proto, we will look up "bar.Bar". As part of this - // lookup, we first lookup "bar" then try to find "Bar" within it. "bar" - // should resolve to "foo.bar". Note, though, that "foo.bar" was originally - // defined in foo.proto, which is not a direct dependency of baz.proto. The - // implementation of FindSymbol() normally only returns symbols in direct - // dependencies, not indirect ones. This test insures that this does not - // prevent it from finding "foo.bar". - - BuildFile( - "name: \"foo.proto\" " - "package: \"foo.bar\" "); - BuildFile( - "name: \"bar.proto\" " - "package: \"foo.bar\" " - "dependency: \"foo.proto\" " - "message_type { name: \"Bar\" }"); - BuildFile( - "name: \"baz.proto\" " - "package: \"foo\" " - "dependency: \"bar.proto\" " - "message_type { " - " name: \"Baz\" " - " field { name:\"qux\" number:1 label:LABEL_OPTIONAL " - " type_name:\"bar.Bar\" }" - "}"); -} - -TEST_F(ValidationErrorTest, FieldTypeNotAType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL " - " type_name:\".Foo.bar\" }" - " field { name:\"bar\" number:2 label:LABEL_OPTIONAL type:TYPE_INT32 }" - "}", - - "foo.proto: Foo.foo: TYPE: \".Foo.bar\" is not a type.\n"); -} - -TEST_F(ValidationErrorTest, RelativeFieldTypeNotAType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " nested_type {" - " name: \"Bar\"" - " field { name:\"Baz\" number:2 label:LABEL_OPTIONAL type:TYPE_INT32 }" - " }" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL " - " type_name:\"Bar.Baz\" }" - "}", - "foo.proto: Foo.foo: TYPE: \"Bar.Baz\" is not a type.\n"); -} - -TEST_F(ValidationErrorTest, FieldTypeMayBeItsName) { - BuildFile( - "name: \"foo.proto\" " - "message_type {" - " name: \"Bar\"" - "}" - "message_type {" - " name: \"Foo\"" - " field { name:\"Bar\" number:1 label:LABEL_OPTIONAL type_name:\"Bar\" }" - "}"); -} - -TEST_F(ValidationErrorTest, EnumFieldTypeIsMessage) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Bar\" } " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_ENUM" - " type_name:\"Bar\" }" - "}", - - "foo.proto: Foo.foo: TYPE: \"Bar\" is not an enum type.\n"); -} - -TEST_F(ValidationErrorTest, MessageFieldTypeIsEnum) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "enum_type { name: \"Bar\" value { name:\"DUMMY\" number:0 } } " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_MESSAGE" - " type_name:\"Bar\" }" - "}", - - "foo.proto: Foo.foo: TYPE: \"Bar\" is not a message type.\n"); -} - -TEST_F(ValidationErrorTest, BadEnumDefaultValue) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "enum_type { name: \"Bar\" value { name:\"DUMMY\" number:0 } } " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type_name:\"Bar\"" - " default_value:\"NO_SUCH_VALUE\" }" - "}", - - "foo.proto: Foo.foo: DEFAULT_VALUE: Enum type \"Bar\" has no value named " - "\"NO_SUCH_VALUE\".\n"); -} - -TEST_F(ValidationErrorTest, PrimitiveWithTypeName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_INT32" - " type_name:\"Foo\" }" - "}", - - "foo.proto: Foo.foo: TYPE: Field with primitive type has type_name.\n"); -} - -TEST_F(ValidationErrorTest, NonPrimitiveWithoutTypeName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"Foo\"" - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_MESSAGE }" - "}", - - "foo.proto: Foo.foo: TYPE: Field with message or enum type missing " - "type_name.\n"); -} - -TEST_F(ValidationErrorTest, InputTypeNotDefined) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - "service {" - " name: \"TestService\"" - " method { name: \"A\" input_type: \"Bar\" output_type: \"Foo\" }" - "}", - - "foo.proto: TestService.A: INPUT_TYPE: \"Bar\" is not defined.\n"); -} - -TEST_F(ValidationErrorTest, InputTypeNotAMessage) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - "enum_type { name: \"Bar\" value { name:\"DUMMY\" number:0 } } " - "service {" - " name: \"TestService\"" - " method { name: \"A\" input_type: \"Bar\" output_type: \"Foo\" }" - "}", - - "foo.proto: TestService.A: INPUT_TYPE: \"Bar\" is not a message type.\n"); -} - -TEST_F(ValidationErrorTest, OutputTypeNotDefined) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - "service {" - " name: \"TestService\"" - " method { name: \"A\" input_type: \"Foo\" output_type: \"Bar\" }" - "}", - - "foo.proto: TestService.A: OUTPUT_TYPE: \"Bar\" is not defined.\n"); -} - -TEST_F(ValidationErrorTest, OutputTypeNotAMessage) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - "enum_type { name: \"Bar\" value { name:\"DUMMY\" number:0 } } " - "service {" - " name: \"TestService\"" - " method { name: \"A\" input_type: \"Foo\" output_type: \"Bar\" }" - "}", - - "foo.proto: TestService.A: OUTPUT_TYPE: \"Bar\" is not a message type.\n"); -} - -TEST_F(ValidationErrorTest, IllegalPackedField) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {\n" - " name: \"Foo\"" - " field { name:\"packed_string\" number:1 label:LABEL_REPEATED " - " type:TYPE_STRING " - " options { uninterpreted_option {" - " name { name_part: \"packed\" is_extension: false }" - " identifier_value: \"true\" }}}\n" - " field { name:\"packed_message\" number:3 label:LABEL_REPEATED " - " type_name: \"Foo\"" - " options { uninterpreted_option {" - " name { name_part: \"packed\" is_extension: false }" - " identifier_value: \"true\" }}}\n" - " field { name:\"optional_int32\" number: 4 label: LABEL_OPTIONAL " - " type:TYPE_INT32 " - " options { uninterpreted_option {" - " name { name_part: \"packed\" is_extension: false }" - " identifier_value: \"true\" }}}\n" - "}", - - "foo.proto: Foo.packed_string: TYPE: [packed = true] can only be " - "specified for repeated primitive fields.\n" - "foo.proto: Foo.packed_message: TYPE: [packed = true] can only be " - "specified for repeated primitive fields.\n" - "foo.proto: Foo.optional_int32: TYPE: [packed = true] can only be " - "specified for repeated primitive fields.\n" - ); -} - -TEST_F(ValidationErrorTest, OptionWrongType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { " - " name: \"TestMessage\" " - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_STRING " - " options { uninterpreted_option { name { name_part: \"ctype\" " - " is_extension: false }" - " positive_int_value: 1 }" - " }" - " }" - "}\n", - - "foo.proto: TestMessage.foo: OPTION_VALUE: Value must be identifier for " - "enum-valued option \"google.protobuf.FieldOptions.ctype\".\n"); -} - -TEST_F(ValidationErrorTest, OptionExtendsAtomicType) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { " - " name: \"TestMessage\" " - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_STRING " - " options { uninterpreted_option { name { name_part: \"ctype\" " - " is_extension: false }" - " name { name_part: \"foo\" " - " is_extension: true }" - " positive_int_value: 1 }" - " }" - " }" - "}\n", - - "foo.proto: TestMessage.foo: OPTION_NAME: Option \"ctype\" is an " - "atomic type, not a message.\n"); -} - -TEST_F(ValidationErrorTest, DupOption) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { " - " name: \"TestMessage\" " - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_UINT32 " - " options { uninterpreted_option { name { name_part: \"ctype\" " - " is_extension: false }" - " identifier_value: \"CORD\" }" - " uninterpreted_option { name { name_part: \"ctype\" " - " is_extension: false }" - " identifier_value: \"CORD\" }" - " }" - " }" - "}\n", - - "foo.proto: TestMessage.foo: OPTION_NAME: Option \"ctype\" was " - "already set.\n"); -} - -TEST_F(ValidationErrorTest, InvalidOptionName) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type { " - " name: \"TestMessage\" " - " field { name:\"foo\" number:1 label:LABEL_OPTIONAL type:TYPE_BOOL " - " options { uninterpreted_option { " - " name { name_part: \"uninterpreted_option\" " - " is_extension: false }" - " positive_int_value: 1 " - " }" - " }" - " }" - "}\n", - - "foo.proto: TestMessage.foo: OPTION_NAME: Option must not use " - "reserved name \"uninterpreted_option\".\n"); -} - -TEST_F(ValidationErrorTest, RepeatedOption) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_REPEATED " - " type: TYPE_FLOAT extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " double_value: 1.2 } }", - - "foo.proto: foo.proto: OPTION_NAME: Option field \"(foo)\" is repeated. " - "Repeated options are not supported.\n"); -} - -TEST_F(ValidationErrorTest, CustomOptionConflictingFieldNumber) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo1\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"google.protobuf.FieldOptions\" }" - "extension { name: \"foo2\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"google.protobuf.FieldOptions\" }", - - "foo.proto: foo2: NUMBER: Extension number 7672757 has already been used " - "in \"google.protobuf.FieldOptions\" by extension \"foo1\".\n"); -} - -TEST_F(ValidationErrorTest, Int32OptionValueOutOfPositiveRange) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " positive_int_value: 0x80000000 } " - "}", - - "foo.proto: foo.proto: OPTION_VALUE: Value out of range " - "for int32 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, Int32OptionValueOutOfNegativeRange) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " negative_int_value: -0x80000001 } " - "}", - - "foo.proto: foo.proto: OPTION_VALUE: Value out of range " - "for int32 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, Int32OptionValueIsNotPositiveInt) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " string_value: \"5\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be integer " - "for int32 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, Int64OptionValueOutOfRange) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT64 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " positive_int_value: 0x8000000000000000 } " - "}", - - "foo.proto: foo.proto: OPTION_VALUE: Value out of range " - "for int64 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, Int64OptionValueIsNotPositiveInt) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_INT64 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"5\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be integer " - "for int64 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, UInt32OptionValueOutOfRange) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_UINT32 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " positive_int_value: 0x100000000 } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value out of range " - "for uint32 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, UInt32OptionValueIsNotPositiveInt) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_UINT32 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " double_value: -5.6 } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be non-negative integer " - "for uint32 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, UInt64OptionValueIsNotPositiveInt) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_UINT64 extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " negative_int_value: -5 } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be non-negative integer " - "for uint64 option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, FloatOptionValueIsNotNumber) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_FLOAT extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " string_value: \"bar\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be number " - "for float option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, DoubleOptionValueIsNotNumber) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_DOUBLE extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " string_value: \"bar\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be number " - "for double option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, BoolOptionValueIsNotTrueOrFalse) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_BOOL extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"bar\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be \"true\" or \"false\" " - "for boolean option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, EnumOptionValueIsNotIdentifier) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "enum_type { name: \"FooEnum\" value { name: \"BAR\" number: 1 } " - " value { name: \"BAZ\" number: 2 } }" - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_ENUM type_name: \"FooEnum\" " - " extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " string_value: \"QUUX\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be identifier for " - "enum-valued option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, EnumOptionValueIsNotEnumValueName) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "enum_type { name: \"FooEnum\" value { name: \"BAR\" number: 1 } " - " value { name: \"BAZ\" number: 2 } }" - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_ENUM type_name: \"FooEnum\" " - " extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"QUUX\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Enum type \"FooEnum\" has no value " - "named \"QUUX\" for option \"foo\".\n"); -} - -TEST_F(ValidationErrorTest, EnumOptionValueIsSiblingEnumValueName) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "enum_type { name: \"FooEnum1\" value { name: \"BAR\" number: 1 } " - " value { name: \"BAZ\" number: 2 } }" - "enum_type { name: \"FooEnum2\" value { name: \"QUX\" number: 1 } " - " value { name: \"QUUX\" number: 2 } }" - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_ENUM type_name: \"FooEnum1\" " - " extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"QUUX\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Enum type \"FooEnum1\" has no value " - "named \"QUUX\" for option \"foo\". This appears to be a value from a " - "sibling type.\n"); -} - -TEST_F(ValidationErrorTest, StringOptionValueIsNotString) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_STRING extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"QUUX\" } }", - - "foo.proto: foo.proto: OPTION_VALUE: Value must be quoted string for " - "string option \"foo\".\n"); -} - -// Helper function for tests that check for aggregate value parsing -// errors. The "value" argument is embedded inside the -// "uninterpreted_option" portion of the result. -static string EmbedAggregateValue(const char* value) { - return strings::Substitute( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "message_type { name: \"Foo\" } " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_MESSAGE type_name: \"Foo\" " - " extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " $0 } }", - value); -} - -TEST_F(ValidationErrorTest, AggregateValueNotFound) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - EmbedAggregateValue("string_value: \"\""), - "foo.proto: foo.proto: OPTION_VALUE: Option \"foo\" is a message. " - "To set the entire message, use syntax like " - "\"foo = { }\". To set fields within it, use " - "syntax like \"foo.foo = value\".\n"); -} - -TEST_F(ValidationErrorTest, AggregateValueParseError) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - EmbedAggregateValue("aggregate_value: \"1+2\""), - "foo.proto: foo.proto: OPTION_VALUE: Error while parsing option " - "value for \"foo\": Expected identifier.\n"); -} - -TEST_F(ValidationErrorTest, AggregateValueUnknownFields) { - BuildDescriptorMessagesInTestPool(); - - BuildFileWithErrors( - EmbedAggregateValue("aggregate_value: \"x:100\""), - "foo.proto: foo.proto: OPTION_VALUE: Error while parsing option " - "value for \"foo\": Message type \"Foo\" has no field named \"x\".\n"); -} - -TEST_F(ValidationErrorTest, NotLiteImportsLite) { - BuildFile( - "name: \"bar.proto\" " - "options { optimize_for: LITE_RUNTIME } "); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"bar.proto\" ", - - "foo.proto: foo.proto: OTHER: Files that do not use optimize_for = " - "LITE_RUNTIME cannot import files which do use this option. This file " - "is not lite, but it imports \"bar.proto\" which is.\n"); -} - -TEST_F(ValidationErrorTest, LiteExtendsNotLite) { - BuildFile( - "name: \"bar.proto\" " - "message_type: {" - " name: \"Bar\"" - " extension_range { start: 1 end: 1000 }" - "}"); - - BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"bar.proto\" " - "options { optimize_for: LITE_RUNTIME } " - "extension { name: \"ext\" number: 123 label: LABEL_OPTIONAL " - " type: TYPE_INT32 extendee: \"Bar\" }", - - "foo.proto: ext: EXTENDEE: Extensions to non-lite types can only be " - "declared in non-lite files. Note that you cannot extend a non-lite " - "type to contain a lite type, but the reverse is allowed.\n"); -} - -TEST_F(ValidationErrorTest, NoLiteServices) { - BuildFileWithErrors( - "name: \"foo.proto\" " - "options {" - " optimize_for: LITE_RUNTIME" - " cc_generic_services: true" - " java_generic_services: true" - "} " - "service { name: \"Foo\" }", - - "foo.proto: Foo: NAME: Files with optimize_for = LITE_RUNTIME cannot " - "define services unless you set both options cc_generic_services and " - "java_generic_sevices to false.\n"); - - BuildFile( - "name: \"bar.proto\" " - "options {" - " optimize_for: LITE_RUNTIME" - " cc_generic_services: false" - " java_generic_services: false" - "} " - "service { name: \"Bar\" }"); -} - -TEST_F(ValidationErrorTest, RollbackAfterError) { - // Build a file which contains every kind of construct but references an - // undefined type. All these constructs will be added to the symbol table - // before the undefined type error is noticed. The DescriptorPool will then - // have to roll everything back. - BuildFileWithErrors( - "name: \"foo.proto\" " - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:1 }" - "} " - "enum_type {" - " name: \"TestEnum\"" - " value { name:\"BAR\" number:1 }" - "} " - "service {" - " name: \"TestService\"" - " method {" - " name: \"Baz\"" - " input_type: \"NoSuchType\"" // error - " output_type: \"TestMessage\"" - " }" - "}", - - "foo.proto: TestService.Baz: INPUT_TYPE: \"NoSuchType\" is not defined.\n"); - - // Make sure that if we build the same file again with the error fixed, - // it works. If the above rollback was incomplete, then some symbols will - // be left defined, and this second attempt will fail since it tries to - // re-define the same symbols. - BuildFile( - "name: \"foo.proto\" " - "message_type {" - " name: \"TestMessage\"" - " field { name:\"foo\" label:LABEL_OPTIONAL type:TYPE_INT32 number:1 }" - "} " - "enum_type {" - " name: \"TestEnum\"" - " value { name:\"BAR\" number:1 }" - "} " - "service {" - " name: \"TestService\"" - " method { name:\"Baz\"" - " input_type:\"TestMessage\"" - " output_type:\"TestMessage\" }" - "}"); -} - -TEST_F(ValidationErrorTest, ErrorsReportedToLogError) { - // Test that errors are reported to GOOGLE_LOG(ERROR) if no error collector is - // provided. - - FileDescriptorProto file_proto; - ASSERT_TRUE(TextFormat::ParseFromString( - "name: \"foo.proto\" " - "message_type { name: \"Foo\" } " - "message_type { name: \"Foo\" } ", - &file_proto)); - - vector errors; - - { - ScopedMemoryLog log; - EXPECT_TRUE(pool_.BuildFile(file_proto) == NULL); - errors = log.GetMessages(ERROR); - } - - ASSERT_EQ(2, errors.size()); - - EXPECT_EQ("Invalid proto descriptor for file \"foo.proto\":", errors[0]); - EXPECT_EQ(" Foo: \"Foo\" is already defined.", errors[1]); -} - -// =================================================================== -// DescriptorDatabase - -static void AddToDatabase(SimpleDescriptorDatabase* database, - const char* file_text) { - FileDescriptorProto file_proto; - EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); - database->Add(file_proto); -} - -class DatabaseBackedPoolTest : public testing::Test { - protected: - DatabaseBackedPoolTest() {} - - SimpleDescriptorDatabase database_; - - virtual void SetUp() { - AddToDatabase(&database_, - "name: \"foo.proto\" " - "message_type { name:\"Foo\" extension_range { start: 1 end: 100 } } " - "enum_type { name:\"TestEnum\" value { name:\"DUMMY\" number:0 } } " - "service { name:\"TestService\" } "); - AddToDatabase(&database_, - "name: \"bar.proto\" " - "dependency: \"foo.proto\" " - "message_type { name:\"Bar\" } " - "extension { name:\"foo_ext\" extendee: \".Foo\" number:5 " - " label:LABEL_OPTIONAL type:TYPE_INT32 } "); - } - - // We can't inject a file containing errors into a DescriptorPool, so we - // need an actual mock DescriptorDatabase to test errors. - class ErrorDescriptorDatabase : public DescriptorDatabase { - public: - ErrorDescriptorDatabase() {} - ~ErrorDescriptorDatabase() {} - - // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output) { - // error.proto and error2.proto cyclically import each other. - if (filename == "error.proto") { - output->Clear(); - output->set_name("error.proto"); - output->add_dependency("error2.proto"); - return true; - } else if (filename == "error2.proto") { - output->Clear(); - output->set_name("error2.proto"); - output->add_dependency("error.proto"); - return true; - } else { - return false; - } - } - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output) { - return false; - } - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output) { - return false; - } - }; - - // A DescriptorDatabase that counts how many times each method has been - // called and forwards to some other DescriptorDatabase. - class CallCountingDatabase : public DescriptorDatabase { - public: - CallCountingDatabase(DescriptorDatabase* wrapped_db) - : wrapped_db_(wrapped_db) { - Clear(); - } - ~CallCountingDatabase() {} - - DescriptorDatabase* wrapped_db_; - - int call_count_; - - void Clear() { - call_count_ = 0; - } - - // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output) { - ++call_count_; - return wrapped_db_->FindFileByName(filename, output); - } - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output) { - ++call_count_; - return wrapped_db_->FindFileContainingSymbol(symbol_name, output); - } - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output) { - ++call_count_; - return wrapped_db_->FindFileContainingExtension( - containing_type, field_number, output); - } - }; - - // A DescriptorDatabase which falsely always returns foo.proto when searching - // for any symbol or extension number. This shouldn't cause the - // DescriptorPool to reload foo.proto if it is already loaded. - class FalsePositiveDatabase : public DescriptorDatabase { - public: - FalsePositiveDatabase(DescriptorDatabase* wrapped_db) - : wrapped_db_(wrapped_db) {} - ~FalsePositiveDatabase() {} - - DescriptorDatabase* wrapped_db_; - - // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, - FileDescriptorProto* output) { - return wrapped_db_->FindFileByName(filename, output); - } - bool FindFileContainingSymbol(const string& symbol_name, - FileDescriptorProto* output) { - return FindFileByName("foo.proto", output); - } - bool FindFileContainingExtension(const string& containing_type, - int field_number, - FileDescriptorProto* output) { - return FindFileByName("foo.proto", output); - } - }; -}; - -TEST_F(DatabaseBackedPoolTest, FindFileByName) { - DescriptorPool pool(&database_); - - const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); - EXPECT_EQ("foo.proto", foo->name()); - ASSERT_EQ(1, foo->message_type_count()); - EXPECT_EQ("Foo", foo->message_type(0)->name()); - - EXPECT_EQ(foo, pool.FindFileByName("foo.proto")); - - EXPECT_TRUE(pool.FindFileByName("no_such_file.proto") == NULL); -} - -TEST_F(DatabaseBackedPoolTest, FindDependencyBeforeDependent) { - DescriptorPool pool(&database_); - - const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); - EXPECT_EQ("foo.proto", foo->name()); - ASSERT_EQ(1, foo->message_type_count()); - EXPECT_EQ("Foo", foo->message_type(0)->name()); - - const FileDescriptor* bar = pool.FindFileByName("bar.proto"); - ASSERT_TRUE(bar != NULL); - EXPECT_EQ("bar.proto", bar->name()); - ASSERT_EQ(1, bar->message_type_count()); - EXPECT_EQ("Bar", bar->message_type(0)->name()); - - ASSERT_EQ(1, bar->dependency_count()); - EXPECT_EQ(foo, bar->dependency(0)); -} - -TEST_F(DatabaseBackedPoolTest, FindDependentBeforeDependency) { - DescriptorPool pool(&database_); - - const FileDescriptor* bar = pool.FindFileByName("bar.proto"); - ASSERT_TRUE(bar != NULL); - EXPECT_EQ("bar.proto", bar->name()); - ASSERT_EQ(1, bar->message_type_count()); - ASSERT_EQ("Bar", bar->message_type(0)->name()); - - const FileDescriptor* foo = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(foo != NULL); - EXPECT_EQ("foo.proto", foo->name()); - ASSERT_EQ(1, foo->message_type_count()); - ASSERT_EQ("Foo", foo->message_type(0)->name()); - - ASSERT_EQ(1, bar->dependency_count()); - EXPECT_EQ(foo, bar->dependency(0)); -} - -TEST_F(DatabaseBackedPoolTest, FindFileContainingSymbol) { - DescriptorPool pool(&database_); - - const FileDescriptor* file = pool.FindFileContainingSymbol("Foo"); - ASSERT_TRUE(file != NULL); - EXPECT_EQ("foo.proto", file->name()); - EXPECT_EQ(file, pool.FindFileByName("foo.proto")); - - EXPECT_TRUE(pool.FindFileContainingSymbol("NoSuchSymbol") == NULL); -} - -TEST_F(DatabaseBackedPoolTest, FindMessageTypeByName) { - DescriptorPool pool(&database_); - - const Descriptor* type = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(type != NULL); - EXPECT_EQ("Foo", type->name()); - EXPECT_EQ(type->file(), pool.FindFileByName("foo.proto")); - - EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchType") == NULL); -} - -TEST_F(DatabaseBackedPoolTest, FindExtensionByNumber) { - DescriptorPool pool(&database_); - - const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); - - const FieldDescriptor* extension = pool.FindExtensionByNumber(foo, 5); - ASSERT_TRUE(extension != NULL); - EXPECT_EQ("foo_ext", extension->name()); - EXPECT_EQ(extension->file(), pool.FindFileByName("bar.proto")); - - EXPECT_TRUE(pool.FindExtensionByNumber(foo, 12) == NULL); -} - -TEST_F(DatabaseBackedPoolTest, FindAllExtensions) { - DescriptorPool pool(&database_); - - const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - - for (int i = 0; i < 2; ++i) { - // Repeat the lookup twice, to check that we get consistent - // results despite the fallback database lookup mutating the pool. - vector extensions; - pool.FindAllExtensions(foo, &extensions); - ASSERT_EQ(1, extensions.size()); - EXPECT_EQ(5, extensions[0]->number()); - } -} - -TEST_F(DatabaseBackedPoolTest, ErrorWithoutErrorCollector) { - ErrorDescriptorDatabase error_database; - DescriptorPool pool(&error_database); - - vector errors; - - { - ScopedMemoryLog log; - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); - errors = log.GetMessages(ERROR); - } - - EXPECT_FALSE(errors.empty()); -} - -TEST_F(DatabaseBackedPoolTest, ErrorWithErrorCollector) { - ErrorDescriptorDatabase error_database; - MockErrorCollector error_collector; - DescriptorPool pool(&error_database, &error_collector); - - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); - EXPECT_EQ( - "error.proto: error.proto: OTHER: File recursively imports itself: " - "error.proto -> error2.proto -> error.proto\n" - "error2.proto: error2.proto: OTHER: Import \"error.proto\" was not " - "found or had errors.\n" - "error.proto: error.proto: OTHER: Import \"error2.proto\" was not " - "found or had errors.\n", - error_collector.text_); -} - -TEST_F(DatabaseBackedPoolTest, UnittestProto) { - // Try to load all of unittest.proto from a DescriptorDatabase. This should - // thoroughly test all paths through DescriptorBuilder to insure that there - // are no deadlocking problems when pool_->mutex_ is non-NULL. - const FileDescriptor* original_file = - protobuf_unittest::TestAllTypes::descriptor()->file(); - - DescriptorPoolDatabase database(*DescriptorPool::generated_pool()); - DescriptorPool pool(&database); - const FileDescriptor* file_from_database = - pool.FindFileByName(original_file->name()); - - ASSERT_TRUE(file_from_database != NULL); - - FileDescriptorProto original_file_proto; - original_file->CopyTo(&original_file_proto); - - FileDescriptorProto file_from_database_proto; - file_from_database->CopyTo(&file_from_database_proto); - - EXPECT_EQ(original_file_proto.DebugString(), - file_from_database_proto.DebugString()); -} - -TEST_F(DatabaseBackedPoolTest, DoesntRetryDbUnnecessarily) { - // Searching for a child of an existing descriptor should never fall back - // to the DescriptorDatabase even if it isn't found, because we know all - // children are already loaded. - CallCountingDatabase call_counter(&database_); - DescriptorPool pool(&call_counter); - - const FileDescriptor* file = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(file != NULL); - const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); - const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum"); - ASSERT_TRUE(test_enum != NULL); - const ServiceDescriptor* test_service = pool.FindServiceByName("TestService"); - ASSERT_TRUE(test_service != NULL); - - EXPECT_NE(0, call_counter.call_count_); - call_counter.Clear(); - - EXPECT_TRUE(foo->FindFieldByName("no_such_field") == NULL); - EXPECT_TRUE(foo->FindExtensionByName("no_such_extension") == NULL); - EXPECT_TRUE(foo->FindNestedTypeByName("NoSuchMessageType") == NULL); - EXPECT_TRUE(foo->FindEnumTypeByName("NoSuchEnumType") == NULL); - EXPECT_TRUE(foo->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(test_enum->FindValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(test_service->FindMethodByName("NoSuchMethod") == NULL); - - EXPECT_TRUE(file->FindMessageTypeByName("NoSuchMessageType") == NULL); - EXPECT_TRUE(file->FindEnumTypeByName("NoSuchEnumType") == NULL); - EXPECT_TRUE(file->FindEnumValueByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(file->FindServiceByName("NO_SUCH_VALUE") == NULL); - EXPECT_TRUE(file->FindExtensionByName("no_such_extension") == NULL); - EXPECT_EQ(0, call_counter.call_count_); -} - -TEST_F(DatabaseBackedPoolTest, DoesntReloadFilesUncesessarily) { - // If FindFileContainingSymbol() or FindFileContainingExtension() return a - // file that is already in the DescriptorPool, it should not attempt to - // reload the file. - FalsePositiveDatabase false_positive_database(&database_); - MockErrorCollector error_collector; - DescriptorPool pool(&false_positive_database, &error_collector); - - // First make sure foo.proto is loaded. - const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); - - // Try inducing false positives. - EXPECT_TRUE(pool.FindMessageTypeByName("NoSuchSymbol") == NULL); - EXPECT_TRUE(pool.FindExtensionByNumber(foo, 22) == NULL); - - // No errors should have been reported. (If foo.proto was incorrectly - // loaded multiple times, errors would have been reported.) - EXPECT_EQ("", error_collector.text_); -} - -TEST_F(DatabaseBackedPoolTest, DoesntReloadKnownBadFiles) { - ErrorDescriptorDatabase error_database; - MockErrorCollector error_collector; - DescriptorPool pool(&error_database, &error_collector); - - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); - error_collector.text_.clear(); - EXPECT_TRUE(pool.FindFileByName("error.proto") == NULL); - EXPECT_EQ("", error_collector.text_); -} - -TEST_F(DatabaseBackedPoolTest, DoesntFallbackOnWrongType) { - // If a lookup finds a symbol of the wrong type (e.g. we pass a type name - // to FindFieldByName()), we should fail fast, without checking the fallback - // database. - CallCountingDatabase call_counter(&database_); - DescriptorPool pool(&call_counter); - - const FileDescriptor* file = pool.FindFileByName("foo.proto"); - ASSERT_TRUE(file != NULL); - const Descriptor* foo = pool.FindMessageTypeByName("Foo"); - ASSERT_TRUE(foo != NULL); - const EnumDescriptor* test_enum = pool.FindEnumTypeByName("TestEnum"); - ASSERT_TRUE(test_enum != NULL); - - EXPECT_NE(0, call_counter.call_count_); - call_counter.Clear(); - - EXPECT_TRUE(pool.FindMessageTypeByName("TestEnum") == NULL); - EXPECT_TRUE(pool.FindFieldByName("Foo") == NULL); - EXPECT_TRUE(pool.FindExtensionByName("Foo") == NULL); - EXPECT_TRUE(pool.FindEnumTypeByName("Foo") == NULL); - EXPECT_TRUE(pool.FindEnumValueByName("Foo") == NULL); - EXPECT_TRUE(pool.FindServiceByName("Foo") == NULL); - EXPECT_TRUE(pool.FindMethodByName("Foo") == NULL); - - EXPECT_EQ(0, call_counter.call_count_); -} - -// =================================================================== - - -} // namespace descriptor_unittest -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.cc deleted file mode 100644 index c711a2da..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.cc +++ /dev/null @@ -1,558 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// DynamicMessage is implemented by constructing a data structure which -// has roughly the same memory layout as a generated message would have. -// Then, we use GeneratedMessageReflection to implement our reflection -// interface. All the other operations we need to implement (e.g. -// parsing, copying, etc.) are already implemented in terms of -// Reflection, so the rest is easy. -// -// The up side of this strategy is that it's very efficient. We don't -// need to use hash_maps or generic representations of fields. The -// down side is that this is a low-level memory management hack which -// can be tricky to get right. -// -// As mentioned in the header, we only expose a DynamicMessageFactory -// publicly, not the DynamicMessage class itself. This is because -// GenericMessageReflection wants to have a pointer to a "default" -// copy of the class, with all fields initialized to their default -// values. We only want to construct one of these per message type, -// so DynamicMessageFactory stores a cache of default messages for -// each type it sees (each unique Descriptor pointer). The code -// refers to the "default" copy of the class as the "prototype". -// -// Note on memory allocation: This module often calls "operator new()" -// to allocate untyped memory, rather than calling something like -// "new uint8[]". This is because "operator new()" means "Give me some -// space which I can use as I please." while "new uint8[]" means "Give -// me an array of 8-bit integers.". In practice, the later may return -// a pointer that is not aligned correctly for general use. I believe -// Item 8 of "More Effective C++" discusses this in more detail, though -// I don't have the book on me right now so I'm not sure. - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -using internal::WireFormat; -using internal::ExtensionSet; -using internal::GeneratedMessageReflection; - - -// =================================================================== -// Some helper tables and functions... - -namespace { - -// Compute the byte size of the in-memory representation of the field. -int FieldSpaceUsed(const FieldDescriptor* field) { - typedef FieldDescriptor FD; // avoid line wrapping - if (field->label() == FD::LABEL_REPEATED) { - switch (field->cpp_type()) { - case FD::CPPTYPE_INT32 : return sizeof(RepeatedField); - case FD::CPPTYPE_INT64 : return sizeof(RepeatedField); - case FD::CPPTYPE_UINT32 : return sizeof(RepeatedField); - case FD::CPPTYPE_UINT64 : return sizeof(RepeatedField); - case FD::CPPTYPE_DOUBLE : return sizeof(RepeatedField); - case FD::CPPTYPE_FLOAT : return sizeof(RepeatedField); - case FD::CPPTYPE_BOOL : return sizeof(RepeatedField); - case FD::CPPTYPE_ENUM : return sizeof(RepeatedField); - case FD::CPPTYPE_MESSAGE: return sizeof(RepeatedPtrField); - - case FD::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return sizeof(RepeatedPtrField); - } - break; - } - } else { - switch (field->cpp_type()) { - case FD::CPPTYPE_INT32 : return sizeof(int32 ); - case FD::CPPTYPE_INT64 : return sizeof(int64 ); - case FD::CPPTYPE_UINT32 : return sizeof(uint32 ); - case FD::CPPTYPE_UINT64 : return sizeof(uint64 ); - case FD::CPPTYPE_DOUBLE : return sizeof(double ); - case FD::CPPTYPE_FLOAT : return sizeof(float ); - case FD::CPPTYPE_BOOL : return sizeof(bool ); - case FD::CPPTYPE_ENUM : return sizeof(int ); - case FD::CPPTYPE_MESSAGE: return sizeof(Message*); - - case FD::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return sizeof(string*); - } - break; - } - } - - GOOGLE_LOG(DFATAL) << "Can't get here."; - return 0; -} - -inline int DivideRoundingUp(int i, int j) { - return (i + (j - 1)) / j; -} - -static const int kSafeAlignment = sizeof(uint64); - -inline int AlignTo(int offset, int alignment) { - return DivideRoundingUp(offset, alignment) * alignment; -} - -// Rounds the given byte offset up to the next offset aligned such that any -// type may be stored at it. -inline int AlignOffset(int offset) { - return AlignTo(offset, kSafeAlignment); -} - -#define bitsizeof(T) (sizeof(T) * 8) - -} // namespace - -// =================================================================== - -class DynamicMessage : public Message { - public: - struct TypeInfo { - int size; - int has_bits_offset; - int unknown_fields_offset; - int extensions_offset; - - // Not owned by the TypeInfo. - DynamicMessageFactory* factory; // The factory that created this object. - const DescriptorPool* pool; // The factory's DescriptorPool. - const Descriptor* type; // Type of this DynamicMessage. - - // Warning: The order in which the following pointers are defined is - // important (the prototype must be deleted *before* the offsets). - scoped_array offsets; - scoped_ptr reflection; - scoped_ptr prototype; - }; - - DynamicMessage(const TypeInfo* type_info); - ~DynamicMessage(); - - // Called on the prototype after construction to initialize message fields. - void CrossLinkPrototypes(); - - // implements Message ---------------------------------------------- - - Message* New() const; - - int GetCachedSize() const; - void SetCachedSize(int size) const; - - Metadata GetMetadata() const; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessage); - - inline bool is_prototype() const { - return type_info_->prototype == this || - // If type_info_->prototype is NULL, then we must be constructing - // the prototype now, which means we must be the prototype. - type_info_->prototype == NULL; - } - - inline void* OffsetToPointer(int offset) { - return reinterpret_cast(this) + offset; - } - inline const void* OffsetToPointer(int offset) const { - return reinterpret_cast(this) + offset; - } - - const TypeInfo* type_info_; - - // TODO(kenton): Make this an atomic when C++ supports it. - mutable int cached_byte_size_; -}; - -DynamicMessage::DynamicMessage(const TypeInfo* type_info) - : type_info_(type_info), - cached_byte_size_(0) { - // We need to call constructors for various fields manually and set - // default values where appropriate. We use placement new to call - // constructors. If you haven't heard of placement new, I suggest Googling - // it now. We use placement new even for primitive types that don't have - // constructors for consistency. (In theory, placement new should be used - // any time you are trying to convert untyped memory to typed memory, though - // in practice that's not strictly necessary for types that don't have a - // constructor.) - - const Descriptor* descriptor = type_info_->type; - - new(OffsetToPointer(type_info_->unknown_fields_offset)) UnknownFieldSet; - - if (type_info_->extensions_offset != -1) { - new(OffsetToPointer(type_info_->extensions_offset)) ExtensionSet; - } - - for (int i = 0; i < descriptor->field_count(); i++) { - const FieldDescriptor* field = descriptor->field(i); - void* field_ptr = OffsetToPointer(type_info_->offsets[i]); - switch (field->cpp_type()) { -#define HANDLE_TYPE(CPPTYPE, TYPE) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - if (!field->is_repeated()) { \ - new(field_ptr) TYPE(field->default_value_##TYPE()); \ - } else { \ - new(field_ptr) RepeatedField(); \ - } \ - break; - - HANDLE_TYPE(INT32 , int32 ); - HANDLE_TYPE(INT64 , int64 ); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE(FLOAT , float ); - HANDLE_TYPE(BOOL , bool ); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_ENUM: - if (!field->is_repeated()) { - new(field_ptr) int(field->default_value_enum()->number()); - } else { - new(field_ptr) RepeatedField(); - } - break; - - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - if (!field->is_repeated()) { - if (is_prototype()) { - new(field_ptr) const string*(&field->default_value_string()); - } else { - string* default_value = - *reinterpret_cast( - type_info_->prototype->OffsetToPointer( - type_info_->offsets[i])); - new(field_ptr) string*(default_value); - } - } else { - new(field_ptr) RepeatedPtrField(); - } - break; - } - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: { - if (!field->is_repeated()) { - new(field_ptr) Message*(NULL); - } else { - new(field_ptr) RepeatedPtrField(); - } - break; - } - } - } -} - -DynamicMessage::~DynamicMessage() { - const Descriptor* descriptor = type_info_->type; - - reinterpret_cast( - OffsetToPointer(type_info_->unknown_fields_offset))->~UnknownFieldSet(); - - if (type_info_->extensions_offset != -1) { - reinterpret_cast( - OffsetToPointer(type_info_->extensions_offset))->~ExtensionSet(); - } - - // We need to manually run the destructors for repeated fields and strings, - // just as we ran their constructors in the the DynamicMessage constructor. - // Additionally, if any singular embedded messages have been allocated, we - // need to delete them, UNLESS we are the prototype message of this type, - // in which case any embedded messages are other prototypes and shouldn't - // be touched. - for (int i = 0; i < descriptor->field_count(); i++) { - const FieldDescriptor* field = descriptor->field(i); - void* field_ptr = OffsetToPointer(type_info_->offsets[i]); - - if (field->is_repeated()) { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - reinterpret_cast*>(field_ptr) \ - ->~RepeatedField(); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - reinterpret_cast*>(field_ptr) - ->~RepeatedPtrField(); - break; - } - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: - reinterpret_cast*>(field_ptr) - ->~RepeatedPtrField(); - break; - } - - } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING) { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: { - string* ptr = *reinterpret_cast(field_ptr); - if (ptr != &field->default_value_string()) { - delete ptr; - } - break; - } - } - } else if ((field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) && - !is_prototype()) { - Message* message = *reinterpret_cast(field_ptr); - if (message != NULL) { - delete message; - } - } - } -} - -void DynamicMessage::CrossLinkPrototypes() { - // This should only be called on the prototype message. - GOOGLE_CHECK(is_prototype()); - - DynamicMessageFactory* factory = type_info_->factory; - const Descriptor* descriptor = type_info_->type; - - // Cross-link default messages. - for (int i = 0; i < descriptor->field_count(); i++) { - const FieldDescriptor* field = descriptor->field(i); - void* field_ptr = OffsetToPointer(type_info_->offsets[i]); - - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - !field->is_repeated()) { - // For fields with message types, we need to cross-link with the - // prototype for the field's type. - // For singular fields, the field is just a pointer which should - // point to the prototype. - *reinterpret_cast(field_ptr) = - factory->GetPrototypeNoLock(field->message_type()); - } - } -} - -Message* DynamicMessage::New() const { - void* new_base = reinterpret_cast(operator new(type_info_->size)); - memset(new_base, 0, type_info_->size); - return new(new_base) DynamicMessage(type_info_); -} - -int DynamicMessage::GetCachedSize() const { - return cached_byte_size_; -} - -void DynamicMessage::SetCachedSize(int size) const { - // This is theoretically not thread-compatible, but in practice it works - // because if multiple threads write this simultaneously, they will be - // writing the exact same value. - cached_byte_size_ = size; -} - -Metadata DynamicMessage::GetMetadata() const { - Metadata metadata; - metadata.descriptor = type_info_->type; - metadata.reflection = type_info_->reflection.get(); - return metadata; -} - -// =================================================================== - -struct DynamicMessageFactory::PrototypeMap { - typedef hash_map Map; - Map map_; -}; - -DynamicMessageFactory::DynamicMessageFactory() - : pool_(NULL), delegate_to_generated_factory_(false), - prototypes_(new PrototypeMap) { -} - -DynamicMessageFactory::DynamicMessageFactory(const DescriptorPool* pool) - : pool_(pool), delegate_to_generated_factory_(false), - prototypes_(new PrototypeMap) { -} - -DynamicMessageFactory::~DynamicMessageFactory() { - for (PrototypeMap::Map::iterator iter = prototypes_->map_.begin(); - iter != prototypes_->map_.end(); ++iter) { - delete iter->second; - } -} - -const Message* DynamicMessageFactory::GetPrototype(const Descriptor* type) { - MutexLock lock(&prototypes_mutex_); - return GetPrototypeNoLock(type); -} - -const Message* DynamicMessageFactory::GetPrototypeNoLock( - const Descriptor* type) { - if (delegate_to_generated_factory_ && - type->file()->pool() == DescriptorPool::generated_pool()) { - return MessageFactory::generated_factory()->GetPrototype(type); - } - - const DynamicMessage::TypeInfo** target = &prototypes_->map_[type]; - if (*target != NULL) { - // Already exists. - return (*target)->prototype.get(); - } - - DynamicMessage::TypeInfo* type_info = new DynamicMessage::TypeInfo; - *target = type_info; - - type_info->type = type; - type_info->pool = (pool_ == NULL) ? type->file()->pool() : pool_; - type_info->factory = this; - - // We need to construct all the structures passed to - // GeneratedMessageReflection's constructor. This includes: - // - A block of memory that contains space for all the message's fields. - // - An array of integers indicating the byte offset of each field within - // this block. - // - A big bitfield containing a bit for each field indicating whether - // or not that field is set. - - // Compute size and offsets. - int* offsets = new int[type->field_count()]; - type_info->offsets.reset(offsets); - - // Decide all field offsets by packing in order. - // We place the DynamicMessage object itself at the beginning of the allocated - // space. - int size = sizeof(DynamicMessage); - size = AlignOffset(size); - - // Next the has_bits, which is an array of uint32s. - type_info->has_bits_offset = size; - int has_bits_array_size = - DivideRoundingUp(type->field_count(), bitsizeof(uint32)); - size += has_bits_array_size * sizeof(uint32); - size = AlignOffset(size); - - // The ExtensionSet, if any. - if (type->extension_range_count() > 0) { - type_info->extensions_offset = size; - size += sizeof(ExtensionSet); - size = AlignOffset(size); - } else { - // No extensions. - type_info->extensions_offset = -1; - } - - // All the fields. - for (int i = 0; i < type->field_count(); i++) { - // Make sure field is aligned to avoid bus errors. - int field_size = FieldSpaceUsed(type->field(i)); - size = AlignTo(size, min(kSafeAlignment, field_size)); - offsets[i] = size; - size += field_size; - } - - // Add the UnknownFieldSet to the end. - size = AlignOffset(size); - type_info->unknown_fields_offset = size; - size += sizeof(UnknownFieldSet); - - // Align the final size to make sure no clever allocators think that - // alignment is not necessary. - size = AlignOffset(size); - type_info->size = size; - - // Allocate the prototype. - void* base = operator new(size); - memset(base, 0, size); - DynamicMessage* prototype = new(base) DynamicMessage(type_info); - type_info->prototype.reset(prototype); - - // Construct the reflection object. - type_info->reflection.reset( - new GeneratedMessageReflection( - type_info->type, - type_info->prototype.get(), - type_info->offsets.get(), - type_info->has_bits_offset, - type_info->unknown_fields_offset, - type_info->extensions_offset, - type_info->pool, - this, - type_info->size)); - - // Cross link prototypes. - prototype->CrossLinkPrototypes(); - - return prototype; -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.h deleted file mode 100644 index 81dd2c63..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message.h +++ /dev/null @@ -1,136 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Defines an implementation of Message which can emulate types which are not -// known at compile-time. - -#ifndef GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ -#define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ - -#include -#include - -namespace google { -namespace protobuf { - -// Defined in other files. -class Descriptor; // descriptor.h -class DescriptorPool; // descriptor.h - -// Constructs implementations of Message which can emulate types which are not -// known at compile-time. -// -// Sometimes you want to be able to manipulate protocol types that you don't -// know about at compile time. It would be nice to be able to construct -// a Message object which implements the message type given by any arbitrary -// Descriptor. DynamicMessage provides this. -// -// As it turns out, a DynamicMessage needs to construct extra -// information about its type in order to operate. Most of this information -// can be shared between all DynamicMessages of the same type. But, caching -// this information in some sort of global map would be a bad idea, since -// the cached information for a particular descriptor could outlive the -// descriptor itself. To avoid this problem, DynamicMessageFactory -// encapsulates this "cache". All DynamicMessages of the same type created -// from the same factory will share the same support data. Any Descriptors -// used with a particular factory must outlive the factory. -class LIBPROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory { - public: - // Construct a DynamicMessageFactory that will search for extensions in - // the DescriptorPool in which the exendee is defined. - DynamicMessageFactory(); - - // Construct a DynamicMessageFactory that will search for extensions in - // the given DescriptorPool. - // - // DEPRECATED: Use CodedInputStream::SetExtensionRegistry() to tell the - // parser to look for extensions in an alternate pool. However, note that - // this is almost never what you want to do. Almost all users should use - // the zero-arg constructor. - DynamicMessageFactory(const DescriptorPool* pool); - - ~DynamicMessageFactory(); - - // Call this to tell the DynamicMessageFactory that if it is given a - // Descriptor d for which: - // d->file()->pool() == DescriptorPool::generated_pool(), - // then it should delegate to MessageFactory::generated_factory() instead - // of constructing a dynamic implementation of the message. In theory there - // is no down side to doing this, so it may become the default in the future. - void SetDelegateToGeneratedFactory(bool enable) { - delegate_to_generated_factory_ = enable; - } - - // implements MessageFactory --------------------------------------- - - // Given a Descriptor, constructs the default (prototype) Message of that - // type. You can then call that message's New() method to construct a - // mutable message of that type. - // - // Calling this method twice with the same Descriptor returns the same - // object. The returned object remains property of the factory and will - // be destroyed when the factory is destroyed. Also, any objects created - // by calling the prototype's New() method share some data with the - // prototype, so these must be destoyed before the DynamicMessageFactory - // is destroyed. - // - // The given descriptor must outlive the returned message, and hence must - // outlive the DynamicMessageFactory. - // - // The method is thread-safe. - const Message* GetPrototype(const Descriptor* type); - - private: - const DescriptorPool* pool_; - bool delegate_to_generated_factory_; - - // This struct just contains a hash_map. We can't #include from - // this header due to hacks needed for hash_map portability in the open source - // release. Namely, stubs/hash.h, which defines hash_map portably, is not a - // public header (for good reason), but dynamic_message.h is, and public - // headers may only #include other public headers. - struct PrototypeMap; - scoped_ptr prototypes_; - mutable Mutex prototypes_mutex_; - - friend class DynamicMessage; - const Message* GetPrototypeNoLock(const Descriptor* type); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message_unittest.cc deleted file mode 100644 index 41b89ab5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/dynamic_message_unittest.cc +++ /dev/null @@ -1,162 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Since the reflection interface for DynamicMessage is implemented by -// GenericMessageReflection, the only thing we really have to test is -// that DynamicMessage correctly sets up the information that -// GenericMessageReflection needs to use. So, we focus on that in this -// test. Other tests, such as generic_message_reflection_unittest and -// reflection_ops_unittest, cover the rest of the functionality used by -// DynamicMessage. - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace google { -namespace protobuf { - -class DynamicMessageTest : public testing::Test { - protected: - DescriptorPool pool_; - DynamicMessageFactory factory_; - const Descriptor* descriptor_; - const Message* prototype_; - const Descriptor* extensions_descriptor_; - const Message* extensions_prototype_; - const Descriptor* packed_descriptor_; - const Message* packed_prototype_; - - DynamicMessageTest(): factory_(&pool_) {} - - virtual void SetUp() { - // We want to make sure that DynamicMessage works (particularly with - // extensions) even if we use descriptors that are *not* from compiled-in - // types, so we make copies of the descriptors for unittest.proto and - // unittest_import.proto. - FileDescriptorProto unittest_file; - FileDescriptorProto unittest_import_file; - - unittest::TestAllTypes::descriptor()->file()->CopyTo(&unittest_file); - unittest_import::ImportMessage::descriptor()->file()->CopyTo( - &unittest_import_file); - - ASSERT_TRUE(pool_.BuildFile(unittest_import_file) != NULL); - ASSERT_TRUE(pool_.BuildFile(unittest_file) != NULL); - - descriptor_ = pool_.FindMessageTypeByName("protobuf_unittest.TestAllTypes"); - ASSERT_TRUE(descriptor_ != NULL); - prototype_ = factory_.GetPrototype(descriptor_); - - extensions_descriptor_ = - pool_.FindMessageTypeByName("protobuf_unittest.TestAllExtensions"); - ASSERT_TRUE(extensions_descriptor_ != NULL); - extensions_prototype_ = factory_.GetPrototype(extensions_descriptor_); - - packed_descriptor_ = - pool_.FindMessageTypeByName("protobuf_unittest.TestPackedTypes"); - ASSERT_TRUE(packed_descriptor_ != NULL); - packed_prototype_ = factory_.GetPrototype(packed_descriptor_); - } -}; - -TEST_F(DynamicMessageTest, Descriptor) { - // Check that the descriptor on the DynamicMessage matches the descriptor - // passed to GetPrototype(). - EXPECT_EQ(prototype_->GetDescriptor(), descriptor_); -} - -TEST_F(DynamicMessageTest, OnePrototype) { - // Check that requesting the same prototype twice produces the same object. - EXPECT_EQ(prototype_, factory_.GetPrototype(descriptor_)); -} - -TEST_F(DynamicMessageTest, Defaults) { - // Check that all default values are set correctly in the initial message. - TestUtil::ReflectionTester reflection_tester(descriptor_); - reflection_tester.ExpectClearViaReflection(*prototype_); -} - -TEST_F(DynamicMessageTest, IndependentOffsets) { - // Check that all fields have independent offsets by setting each - // one to a unique value then checking that they all still have those - // unique values (i.e. they don't stomp each other). - scoped_ptr message(prototype_->New()); - TestUtil::ReflectionTester reflection_tester(descriptor_); - - reflection_tester.SetAllFieldsViaReflection(message.get()); - reflection_tester.ExpectAllFieldsSetViaReflection(*message); -} - -TEST_F(DynamicMessageTest, Extensions) { - // Check that extensions work. - scoped_ptr message(extensions_prototype_->New()); - TestUtil::ReflectionTester reflection_tester(extensions_descriptor_); - - reflection_tester.SetAllFieldsViaReflection(message.get()); - reflection_tester.ExpectAllFieldsSetViaReflection(*message); -} - -TEST_F(DynamicMessageTest, PackedFields) { - // Check that packed fields work properly. - scoped_ptr message(packed_prototype_->New()); - TestUtil::ReflectionTester reflection_tester(packed_descriptor_); - - reflection_tester.SetPackedFieldsViaReflection(message.get()); - reflection_tester.ExpectPackedFieldsSetViaReflection(*message); -} - -TEST_F(DynamicMessageTest, SpaceUsed) { - // Test that SpaceUsed() works properly - - // Since we share the implementation with generated messages, we don't need - // to test very much here. Just make sure it appears to be working. - - scoped_ptr message(prototype_->New()); - TestUtil::ReflectionTester reflection_tester(descriptor_); - - int initial_space_used = message->SpaceUsed(); - - reflection_tester.SetAllFieldsViaReflection(message.get()); - EXPECT_LT(initial_space_used, message->SpaceUsed()); -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.cc deleted file mode 100644 index 1a6f5dfc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.cc +++ /dev/null @@ -1,1464 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { - -namespace { - -inline WireFormatLite::FieldType real_type(FieldType type) { - GOOGLE_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE); - return static_cast(type); -} - -inline WireFormatLite::CppType cpp_type(FieldType type) { - return WireFormatLite::FieldTypeToCppType(real_type(type)); -} - -// Registry stuff. -typedef hash_map, - ExtensionInfo> ExtensionRegistry; -ExtensionRegistry* registry_ = NULL; -GOOGLE_PROTOBUF_DECLARE_ONCE(registry_init_); - -void DeleteRegistry() { - delete registry_; - registry_ = NULL; -} - -void InitRegistry() { - registry_ = new ExtensionRegistry; - internal::OnShutdown(&DeleteRegistry); -} - -// This function is only called at startup, so there is no need for thread- -// safety. -void Register(const MessageLite* containing_type, - int number, ExtensionInfo info) { - ::google::protobuf::GoogleOnceInit(®istry_init_, &InitRegistry); - - if (!InsertIfNotPresent(registry_, make_pair(containing_type, number), - info)) { - GOOGLE_LOG(FATAL) << "Multiple extension registrations for type \"" - << containing_type->GetTypeName() - << "\", field number " << number << "."; - } -} - -const ExtensionInfo* FindRegisteredExtension( - const MessageLite* containing_type, int number) { - return (registry_ == NULL) ? NULL : - FindOrNull(*registry_, make_pair(containing_type, number)); -} - -} // namespace - -ExtensionFinder::~ExtensionFinder() {} - -bool GeneratedExtensionFinder::Find(int number, ExtensionInfo* output) { - const ExtensionInfo* extension = - FindRegisteredExtension(containing_type_, number); - if (extension == NULL) { - return false; - } else { - *output = *extension; - return true; - } -} - -void ExtensionSet::RegisterExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed) { - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_ENUM); - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_MESSAGE); - GOOGLE_CHECK_NE(type, WireFormatLite::TYPE_GROUP); - ExtensionInfo info(type, is_repeated, is_packed); - Register(containing_type, number, info); -} - -static bool CallNoArgValidityFunc(const void* arg, int number) { - // Note: Must use C-style cast here rather than reinterpret_cast because - // the C++ standard at one point did not allow casts between function and - // data pointers and some compilers enforce this for C++-style casts. No - // compiler enforces it for C-style casts since lots of C-style code has - // relied on these kinds of casts for a long time, despite being - // technically undefined. See: - // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#195 - // Also note: Some compilers do not allow function pointers to be "const". - // Which makes sense, I suppose, because it's meaningless. - return ((EnumValidityFunc*)arg)(number); -} - -void ExtensionSet::RegisterEnumExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed, - EnumValidityFunc* is_valid) { - GOOGLE_CHECK_EQ(type, WireFormatLite::TYPE_ENUM); - ExtensionInfo info(type, is_repeated, is_packed); - info.enum_validity_check.func = CallNoArgValidityFunc; - // See comment in CallNoArgValidityFunc() about why we use a c-style cast. - info.enum_validity_check.arg = (void*)is_valid; - Register(containing_type, number, info); -} - -void ExtensionSet::RegisterMessageExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed, - const MessageLite* prototype) { - GOOGLE_CHECK(type == WireFormatLite::TYPE_MESSAGE || - type == WireFormatLite::TYPE_GROUP); - ExtensionInfo info(type, is_repeated, is_packed); - info.message_prototype = prototype; - Register(containing_type, number, info); -} - - -// =================================================================== -// Constructors and basic methods. - -ExtensionSet::ExtensionSet() {} - -ExtensionSet::~ExtensionSet() { - for (map::iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - iter->second.Free(); - } -} - -// Defined in extension_set_heavy.cc. -// void ExtensionSet::AppendToList(const Descriptor* containing_type, -// const DescriptorPool* pool, -// vector* output) const - -bool ExtensionSet::Has(int number) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end()) return false; - GOOGLE_DCHECK(!iter->second.is_repeated); - return !iter->second.is_cleared; -} - -int ExtensionSet::ExtensionSize(int number) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end()) return false; - return iter->second.GetSize(); -} - -FieldType ExtensionSet::ExtensionType(int number) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end()) { - GOOGLE_LOG(DFATAL) << "Don't lookup extension types if they aren't present (1). "; - return 0; - } - if (iter->second.is_cleared) { - GOOGLE_LOG(DFATAL) << "Don't lookup extension types if they aren't present (2). "; - } - return iter->second.type; -} - -void ExtensionSet::ClearExtension(int number) { - map::iterator iter = extensions_.find(number); - if (iter == extensions_.end()) return; - iter->second.Clear(); -} - -// =================================================================== -// Field accessors - -namespace { - -enum Cardinality { - REPEATED, - OPTIONAL -}; - -} // namespace - -#define GOOGLE_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ - GOOGLE_DCHECK_EQ((EXTENSION).is_repeated ? REPEATED : OPTIONAL, LABEL); \ - GOOGLE_DCHECK_EQ(cpp_type((EXTENSION).type), WireFormatLite::CPPTYPE_##CPPTYPE) - -// ------------------------------------------------------------------- -// Primitives - -#define PRIMITIVE_ACCESSORS(UPPERCASE, LOWERCASE, CAMELCASE) \ - \ -LOWERCASE ExtensionSet::Get##CAMELCASE(int number, \ - LOWERCASE default_value) const { \ - map::const_iterator iter = extensions_.find(number); \ - if (iter == extensions_.end() || iter->second.is_cleared) { \ - return default_value; \ - } else { \ - GOOGLE_DCHECK_TYPE(iter->second, OPTIONAL, UPPERCASE); \ - return iter->second.LOWERCASE##_value; \ - } \ -} \ - \ -void ExtensionSet::Set##CAMELCASE(int number, FieldType type, \ - LOWERCASE value, \ - const FieldDescriptor* descriptor) { \ - Extension* extension; \ - if (MaybeNewExtension(number, descriptor, &extension)) { \ - extension->type = type; \ - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_##UPPERCASE); \ - extension->is_repeated = false; \ - } else { \ - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, UPPERCASE); \ - } \ - extension->is_cleared = false; \ - extension->LOWERCASE##_value = value; \ -} \ - \ -LOWERCASE ExtensionSet::GetRepeated##CAMELCASE(int number, int index) const { \ - map::const_iterator iter = extensions_.find(number); \ - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; \ - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, UPPERCASE); \ - return iter->second.repeated_##LOWERCASE##_value->Get(index); \ -} \ - \ -void ExtensionSet::SetRepeated##CAMELCASE( \ - int number, int index, LOWERCASE value) { \ - map::iterator iter = extensions_.find(number); \ - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; \ - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, UPPERCASE); \ - iter->second.repeated_##LOWERCASE##_value->Set(index, value); \ -} \ - \ -void ExtensionSet::Add##CAMELCASE(int number, FieldType type, \ - bool packed, LOWERCASE value, \ - const FieldDescriptor* descriptor) { \ - Extension* extension; \ - if (MaybeNewExtension(number, descriptor, &extension)) { \ - extension->type = type; \ - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_##UPPERCASE); \ - extension->is_repeated = true; \ - extension->is_packed = packed; \ - extension->repeated_##LOWERCASE##_value = new RepeatedField(); \ - } else { \ - GOOGLE_DCHECK_TYPE(*extension, REPEATED, UPPERCASE); \ - GOOGLE_DCHECK_EQ(extension->is_packed, packed); \ - } \ - extension->repeated_##LOWERCASE##_value->Add(value); \ -} - -PRIMITIVE_ACCESSORS( INT32, int32, Int32) -PRIMITIVE_ACCESSORS( INT64, int64, Int64) -PRIMITIVE_ACCESSORS(UINT32, uint32, UInt32) -PRIMITIVE_ACCESSORS(UINT64, uint64, UInt64) -PRIMITIVE_ACCESSORS( FLOAT, float, Float) -PRIMITIVE_ACCESSORS(DOUBLE, double, Double) -PRIMITIVE_ACCESSORS( BOOL, bool, Bool) - -#undef PRIMITIVE_ACCESSORS - -// ------------------------------------------------------------------- -// Enums - -int ExtensionSet::GetEnum(int number, int default_value) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end() || iter->second.is_cleared) { - // Not present. Return the default value. - return default_value; - } else { - GOOGLE_DCHECK_TYPE(iter->second, OPTIONAL, ENUM); - return iter->second.enum_value; - } -} - -void ExtensionSet::SetEnum(int number, FieldType type, int value, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); - extension->is_repeated = false; - } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, ENUM); - } - extension->is_cleared = false; - extension->enum_value = value; -} - -int ExtensionSet::GetRepeatedEnum(int number, int index) const { - map::const_iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, ENUM); - return iter->second.repeated_enum_value->Get(index); -} - -void ExtensionSet::SetRepeatedEnum(int number, int index, int value) { - map::iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, ENUM); - iter->second.repeated_enum_value->Set(index, value); -} - -void ExtensionSet::AddEnum(int number, FieldType type, - bool packed, int value, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_ENUM); - extension->is_repeated = true; - extension->is_packed = packed; - extension->repeated_enum_value = new RepeatedField(); - } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED, ENUM); - GOOGLE_DCHECK_EQ(extension->is_packed, packed); - } - extension->repeated_enum_value->Add(value); -} - -// ------------------------------------------------------------------- -// Strings - -const string& ExtensionSet::GetString(int number, - const string& default_value) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end() || iter->second.is_cleared) { - // Not present. Return the default value. - return default_value; - } else { - GOOGLE_DCHECK_TYPE(iter->second, OPTIONAL, STRING); - return *iter->second.string_value; - } -} - -string* ExtensionSet::MutableString(int number, FieldType type, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); - extension->is_repeated = false; - extension->string_value = new string; - } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, STRING); - } - extension->is_cleared = false; - return extension->string_value; -} - -const string& ExtensionSet::GetRepeatedString(int number, int index) const { - map::const_iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, STRING); - return iter->second.repeated_string_value->Get(index); -} - -string* ExtensionSet::MutableRepeatedString(int number, int index) { - map::iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, STRING); - return iter->second.repeated_string_value->Mutable(index); -} - -string* ExtensionSet::AddString(int number, FieldType type, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); - extension->is_repeated = true; - extension->is_packed = false; - extension->repeated_string_value = new RepeatedPtrField(); - } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED, STRING); - } - return extension->repeated_string_value->Add(); -} - -// ------------------------------------------------------------------- -// Messages - -const MessageLite& ExtensionSet::GetMessage( - int number, const MessageLite& default_value) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end()) { - // Not present. Return the default value. - return default_value; - } else { - GOOGLE_DCHECK_TYPE(iter->second, OPTIONAL, MESSAGE); - return *iter->second.message_value; - } -} - -// Defined in extension_set_heavy.cc. -// const MessageLite& ExtensionSet::GetMessage(int number, -// const Descriptor* message_type, -// MessageFactory* factory) const - -MessageLite* ExtensionSet::MutableMessage(int number, FieldType type, - const MessageLite& prototype, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); - extension->is_repeated = false; - extension->message_value = prototype.New(); - } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); - } - extension->is_cleared = false; - return extension->message_value; -} - -// Defined in extension_set_heavy.cc. -// MessageLite* ExtensionSet::MutableMessage(int number, FieldType type, -// const Descriptor* message_type, -// MessageFactory* factory) - -const MessageLite& ExtensionSet::GetRepeatedMessage( - int number, int index) const { - map::const_iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, MESSAGE); - return iter->second.repeated_message_value->Get(index); -} - -MessageLite* ExtensionSet::MutableRepeatedMessage(int number, int index) { - map::iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - GOOGLE_DCHECK_TYPE(iter->second, REPEATED, MESSAGE); - return iter->second.repeated_message_value->Mutable(index); -} - -MessageLite* ExtensionSet::AddMessage(int number, FieldType type, - const MessageLite& prototype, - const FieldDescriptor* descriptor) { - Extension* extension; - if (MaybeNewExtension(number, descriptor, &extension)) { - extension->type = type; - GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE); - extension->is_repeated = true; - extension->repeated_message_value = - new RepeatedPtrField(); - } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED, MESSAGE); - } - - // RepeatedPtrField does not know how to Add() since it cannot - // allocate an abstract object, so we have to be tricky. - MessageLite* result = extension->repeated_message_value - ->AddFromCleared >(); - if (result == NULL) { - result = prototype.New(); - extension->repeated_message_value->AddAllocated(result); - } - return result; -} - -// Defined in extension_set_heavy.cc. -// MessageLite* ExtensionSet::AddMessage(int number, FieldType type, -// const Descriptor* message_type, -// MessageFactory* factory) - -#undef GOOGLE_DCHECK_TYPE - -void ExtensionSet::RemoveLast(int number) { - map::iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - - Extension* extension = &iter->second; - GOOGLE_DCHECK(extension->is_repeated); - - switch(cpp_type(extension->type)) { - case WireFormatLite::CPPTYPE_INT32: - extension->repeated_int32_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_INT64: - extension->repeated_int64_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_UINT32: - extension->repeated_uint32_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_UINT64: - extension->repeated_uint64_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_FLOAT: - extension->repeated_float_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_DOUBLE: - extension->repeated_double_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_BOOL: - extension->repeated_bool_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_ENUM: - extension->repeated_enum_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_STRING: - extension->repeated_string_value->RemoveLast(); - break; - case WireFormatLite::CPPTYPE_MESSAGE: - extension->repeated_message_value->RemoveLast(); - break; - } -} - -void ExtensionSet::SwapElements(int number, int index1, int index2) { - map::iterator iter = extensions_.find(number); - GOOGLE_CHECK(iter != extensions_.end()) << "Index out-of-bounds (field is empty)."; - - Extension* extension = &iter->second; - GOOGLE_DCHECK(extension->is_repeated); - - switch(cpp_type(extension->type)) { - case WireFormatLite::CPPTYPE_INT32: - extension->repeated_int32_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_INT64: - extension->repeated_int64_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_UINT32: - extension->repeated_uint32_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_UINT64: - extension->repeated_uint64_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_FLOAT: - extension->repeated_float_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_DOUBLE: - extension->repeated_double_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_BOOL: - extension->repeated_bool_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_ENUM: - extension->repeated_enum_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_STRING: - extension->repeated_string_value->SwapElements(index1, index2); - break; - case WireFormatLite::CPPTYPE_MESSAGE: - extension->repeated_message_value->SwapElements(index1, index2); - break; - } -} - -// =================================================================== - -void ExtensionSet::Clear() { - for (map::iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - iter->second.Clear(); - } -} - -void ExtensionSet::MergeFrom(const ExtensionSet& other) { - for (map::const_iterator iter = other.extensions_.begin(); - iter != other.extensions_.end(); ++iter) { - const Extension& other_extension = iter->second; - - if (other_extension.is_repeated) { - Extension* extension; - bool is_new = MaybeNewExtension(iter->first, other_extension.descriptor, - &extension); - if (is_new) { - // Extension did not already exist in set. - extension->type = other_extension.type; - extension->is_repeated = true; - } else { - GOOGLE_DCHECK_EQ(extension->type, other_extension.type); - GOOGLE_DCHECK(extension->is_repeated); - } - - switch (cpp_type(other_extension.type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE, REPEATED_TYPE) \ - case WireFormatLite::CPPTYPE_##UPPERCASE: \ - if (is_new) { \ - extension->repeated_##LOWERCASE##_value = \ - new REPEATED_TYPE; \ - } \ - extension->repeated_##LOWERCASE##_value->MergeFrom( \ - *other_extension.repeated_##LOWERCASE##_value); \ - break; - - HANDLE_TYPE( INT32, int32, RepeatedField < int32>); - HANDLE_TYPE( INT64, int64, RepeatedField < int64>); - HANDLE_TYPE( UINT32, uint32, RepeatedField < uint32>); - HANDLE_TYPE( UINT64, uint64, RepeatedField < uint64>); - HANDLE_TYPE( FLOAT, float, RepeatedField < float>); - HANDLE_TYPE( DOUBLE, double, RepeatedField < double>); - HANDLE_TYPE( BOOL, bool, RepeatedField < bool>); - HANDLE_TYPE( ENUM, enum, RepeatedField < int>); - HANDLE_TYPE( STRING, string, RepeatedPtrField< string>); -#undef HANDLE_TYPE - - case WireFormatLite::CPPTYPE_MESSAGE: - if (is_new) { - extension->repeated_message_value = - new RepeatedPtrField(); - } - // We can't call RepeatedPtrField::MergeFrom() because - // it would attempt to allocate new objects. - RepeatedPtrField* other_repeated_message = - other_extension.repeated_message_value; - for (int i = 0; i < other_repeated_message->size(); i++) { - const MessageLite& other_message = other_repeated_message->Get(i); - MessageLite* target = extension->repeated_message_value - ->AddFromCleared >(); - if (target == NULL) { - target = other_message.New(); - extension->repeated_message_value->AddAllocated(target); - } - target->CheckTypeAndMergeFrom(other_message); - } - break; - } - } else { - if (!other_extension.is_cleared) { - switch (cpp_type(other_extension.type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE, CAMELCASE) \ - case WireFormatLite::CPPTYPE_##UPPERCASE: \ - Set##CAMELCASE(iter->first, other_extension.type, \ - other_extension.LOWERCASE##_value, \ - other_extension.descriptor); \ - break; - - HANDLE_TYPE( INT32, int32, Int32); - HANDLE_TYPE( INT64, int64, Int64); - HANDLE_TYPE(UINT32, uint32, UInt32); - HANDLE_TYPE(UINT64, uint64, UInt64); - HANDLE_TYPE( FLOAT, float, Float); - HANDLE_TYPE(DOUBLE, double, Double); - HANDLE_TYPE( BOOL, bool, Bool); - HANDLE_TYPE( ENUM, enum, Enum); -#undef HANDLE_TYPE - case WireFormatLite::CPPTYPE_STRING: - SetString(iter->first, other_extension.type, - *other_extension.string_value, - other_extension.descriptor); - break; - case WireFormatLite::CPPTYPE_MESSAGE: - MutableMessage(iter->first, other_extension.type, - *other_extension.message_value, - other_extension.descriptor) - ->CheckTypeAndMergeFrom(*other_extension.message_value); - break; - } - } - } - } -} - -void ExtensionSet::Swap(ExtensionSet* x) { - extensions_.swap(x->extensions_); -} - -bool ExtensionSet::IsInitialized() const { - // Extensions are never required. However, we need to check that all - // embedded messages are initialized. - for (map::const_iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - const Extension& extension = iter->second; - if (cpp_type(extension.type) == WireFormatLite::CPPTYPE_MESSAGE) { - if (extension.is_repeated) { - for (int i = 0; i < extension.repeated_message_value->size(); i++) { - if (!extension.repeated_message_value->Get(i).IsInitialized()) { - return false; - } - } - } else { - if (!extension.is_cleared) { - if (!extension.message_value->IsInitialized()) return false; - } - } - } - } - - return true; -} - -bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper) { - int number = WireFormatLite::GetTagFieldNumber(tag); - WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag); - - ExtensionInfo extension; - bool is_unknown; - if (!extension_finder->Find(number, &extension)) { - is_unknown = true; - } else if (extension.is_packed) { - is_unknown = (wire_type != WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - } else { - WireFormatLite::WireType expected_wire_type = - WireFormatLite::WireTypeForFieldType(real_type(extension.type)); - is_unknown = (wire_type != expected_wire_type); - } - - if (is_unknown) { - field_skipper->SkipField(input, tag); - } else if (extension.is_packed) { - uint32 size; - if (!input->ReadVarint32(&size)) return false; - io::CodedInputStream::Limit limit = input->PushLimit(size); - - switch (extension.type) { -#define HANDLE_TYPE(UPPERCASE, CPP_CAMELCASE, CPP_LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - while (input->BytesUntilLimit() > 0) { \ - CPP_LOWERCASE value; \ - if (!WireFormatLite::ReadPrimitive< \ - CPP_LOWERCASE, WireFormatLite::TYPE_##UPPERCASE>( \ - input, &value)) return false; \ - Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ - true, value, extension.descriptor); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, Int32, int32); - HANDLE_TYPE( SINT64, Int64, int64); - HANDLE_TYPE( FIXED32, UInt32, uint32); - HANDLE_TYPE( FIXED64, UInt64, uint64); - HANDLE_TYPE(SFIXED32, Int32, int32); - HANDLE_TYPE(SFIXED64, Int64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_ENUM: - while (input->BytesUntilLimit() > 0) { - int value; - if (!WireFormatLite::ReadPrimitive( - input, &value)) return false; - if (extension.enum_validity_check.func( - extension.enum_validity_check.arg, value)) { - AddEnum(number, WireFormatLite::TYPE_ENUM, true, value, - extension.descriptor); - } - } - break; - - case WireFormatLite::TYPE_STRING: - case WireFormatLite::TYPE_BYTES: - case WireFormatLite::TYPE_GROUP: - case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - - input->PopLimit(limit); - } else { - switch (extension.type) { -#define HANDLE_TYPE(UPPERCASE, CPP_CAMELCASE, CPP_LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: { \ - CPP_LOWERCASE value; \ - if (!WireFormatLite::ReadPrimitive< \ - CPP_LOWERCASE, WireFormatLite::TYPE_##UPPERCASE>( \ - input, &value)) return false; \ - if (extension.is_repeated) { \ - Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, \ - false, value, extension.descriptor); \ - } else { \ - Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value, \ - extension.descriptor); \ - } \ - } break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, Int32, int32); - HANDLE_TYPE( SINT64, Int64, int64); - HANDLE_TYPE( FIXED32, UInt32, uint32); - HANDLE_TYPE( FIXED64, UInt64, uint64); - HANDLE_TYPE(SFIXED32, Int32, int32); - HANDLE_TYPE(SFIXED64, Int64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_ENUM: { - int value; - if (!WireFormatLite::ReadPrimitive( - input, &value)) return false; - - if (!extension.enum_validity_check.func( - extension.enum_validity_check.arg, value)) { - // Invalid value. Treat as unknown. - field_skipper->SkipUnknownEnum(number, value); - } else if (extension.is_repeated) { - AddEnum(number, WireFormatLite::TYPE_ENUM, false, value, - extension.descriptor); - } else { - SetEnum(number, WireFormatLite::TYPE_ENUM, value, - extension.descriptor); - } - break; - } - - case WireFormatLite::TYPE_STRING: { - string* value = extension.is_repeated ? - AddString(number, WireFormatLite::TYPE_STRING, extension.descriptor) : - MutableString(number, WireFormatLite::TYPE_STRING, - extension.descriptor); - if (!WireFormatLite::ReadString(input, value)) return false; - break; - } - - case WireFormatLite::TYPE_BYTES: { - string* value = extension.is_repeated ? - AddString(number, WireFormatLite::TYPE_STRING, extension.descriptor) : - MutableString(number, WireFormatLite::TYPE_STRING, - extension.descriptor); - if (!WireFormatLite::ReadBytes(input, value)) return false; - break; - } - - case WireFormatLite::TYPE_GROUP: { - MessageLite* value = extension.is_repeated ? - AddMessage(number, WireFormatLite::TYPE_GROUP, - *extension.message_prototype, extension.descriptor) : - MutableMessage(number, WireFormatLite::TYPE_GROUP, - *extension.message_prototype, extension.descriptor); - if (!WireFormatLite::ReadGroup(number, input, value)) return false; - break; - } - - case WireFormatLite::TYPE_MESSAGE: { - MessageLite* value = extension.is_repeated ? - AddMessage(number, WireFormatLite::TYPE_MESSAGE, - *extension.message_prototype, extension.descriptor) : - MutableMessage(number, WireFormatLite::TYPE_MESSAGE, - *extension.message_prototype, extension.descriptor); - if (!WireFormatLite::ReadMessage(input, value)) return false; - break; - } - } - } - - return true; -} - -bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, - const MessageLite* containing_type) { - FieldSkipper skipper; - GeneratedExtensionFinder finder(containing_type); - return ParseField(tag, input, &finder, &skipper); -} - -// Defined in extension_set_heavy.cc. -// bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, -// const MessageLite* containing_type, -// UnknownFieldSet* unknown_fields) - -bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper) { - while (true) { - uint32 tag = input->ReadTag(); - switch (tag) { - case 0: - return true; - case WireFormatLite::kMessageSetItemStartTag: - if (!ParseMessageSetItem(input, extension_finder, field_skipper)) { - return false; - } - break; - default: - if (!ParseField(tag, input, extension_finder, field_skipper)) { - return false; - } - break; - } - } -} - -bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, - const MessageLite* containing_type) { - FieldSkipper skipper; - GeneratedExtensionFinder finder(containing_type); - return ParseMessageSet(input, &finder, &skipper); -} - -// Defined in extension_set_heavy.cc. -// bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, -// const MessageLite* containing_type, -// UnknownFieldSet* unknown_fields); - -bool ExtensionSet::ParseMessageSetItem(io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper) { - // TODO(kenton): It would be nice to share code between this and - // WireFormatLite::ParseAndMergeMessageSetItem(), but I think the - // differences would be hard to factor out. - - // This method parses a group which should contain two fields: - // required int32 type_id = 2; - // required data message = 3; - - // Once we see a type_id, we'll construct a fake tag for this extension - // which is the tag it would have had under the proto2 extensions wire - // format. - uint32 fake_tag = 0; - - // If we see message data before the type_id, we'll append it to this so - // we can parse it later. This will probably never happen in practice, - // as no MessageSet encoder I know of writes the message before the type ID. - // But, it's technically valid so we should allow it. - // TODO(kenton): Use a Cord instead? Do I care? - string message_data; - - while (true) { - uint32 tag = input->ReadTag(); - if (tag == 0) return false; - - switch (tag) { - case WireFormatLite::kMessageSetTypeIdTag: { - uint32 type_id; - if (!input->ReadVarint32(&type_id)) return false; - fake_tag = WireFormatLite::MakeTag(type_id, - WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - - if (!message_data.empty()) { - // We saw some message data before the type_id. Have to parse it - // now. - io::CodedInputStream sub_input( - reinterpret_cast(message_data.data()), - message_data.size()); - if (!ParseField(fake_tag, &sub_input, - extension_finder, field_skipper)) { - return false; - } - message_data.clear(); - } - - break; - } - - case WireFormatLite::kMessageSetMessageTag: { - if (fake_tag == 0) { - // We haven't seen a type_id yet. Append this data to message_data. - string temp; - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->ReadString(&temp, length)) return false; - message_data.append(temp); - } else { - // Already saw type_id, so we can parse this directly. - if (!ParseField(fake_tag, input, - extension_finder, field_skipper)) { - return false; - } - } - - break; - } - - case WireFormatLite::kMessageSetItemEndTag: { - return true; - } - - default: { - if (!field_skipper->SkipField(input, tag)) return false; - } - } - } -} - -void ExtensionSet::SerializeWithCachedSizes( - int start_field_number, int end_field_number, - io::CodedOutputStream* output) const { - map::const_iterator iter; - for (iter = extensions_.lower_bound(start_field_number); - iter != extensions_.end() && iter->first < end_field_number; - ++iter) { - iter->second.SerializeFieldWithCachedSizes(iter->first, output); - } -} - -void ExtensionSet::SerializeMessageSetWithCachedSizes( - io::CodedOutputStream* output) const { - map::const_iterator iter; - for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) { - iter->second.SerializeMessageSetItemWithCachedSizes(iter->first, output); - } -} - -int ExtensionSet::ByteSize() const { - int total_size = 0; - - for (map::const_iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - total_size += iter->second.ByteSize(iter->first); - } - - return total_size; -} - -int ExtensionSet::MessageSetByteSize() const { - int total_size = 0; - - for (map::const_iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - total_size += iter->second.MessageSetItemByteSize(iter->first); - } - - return total_size; -} - -// Defined in extension_set_heavy.cc. -// int ExtensionSet::SpaceUsedExcludingSelf() const - -bool ExtensionSet::MaybeNewExtension(int number, - const FieldDescriptor* descriptor, - Extension** result) { - pair::iterator, bool> insert_result = - extensions_.insert(make_pair(number, Extension())); - *result = &insert_result.first->second; - (*result)->descriptor = descriptor; - return insert_result.second; -} - -// =================================================================== -// Methods of ExtensionSet::Extension - -void ExtensionSet::Extension::Clear() { - if (is_repeated) { - switch (cpp_type(type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case WireFormatLite::CPPTYPE_##UPPERCASE: \ - repeated_##LOWERCASE##_value->Clear(); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE( UINT32, uint32); - HANDLE_TYPE( UINT64, uint64); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( DOUBLE, double); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, enum); - HANDLE_TYPE( STRING, string); - HANDLE_TYPE(MESSAGE, message); -#undef HANDLE_TYPE - } - } else { - if (!is_cleared) { - switch (cpp_type(type)) { - case WireFormatLite::CPPTYPE_STRING: - string_value->clear(); - break; - case WireFormatLite::CPPTYPE_MESSAGE: - message_value->Clear(); - break; - default: - // No need to do anything. Get*() will return the default value - // as long as is_cleared is true and Set*() will overwrite the - // previous value. - break; - } - - is_cleared = true; - } - } -} - -void ExtensionSet::Extension::SerializeFieldWithCachedSizes( - int number, - io::CodedOutputStream* output) const { - if (is_repeated) { - if (is_packed) { - if (cached_size == 0) return; - - WireFormatLite::WriteTag(number, - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(cached_size); - - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - WireFormatLite::Write##CAMELCASE##NoTag( \ - repeated_##LOWERCASE##_value->Get(i), output); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); - HANDLE_TYPE( ENUM, Enum, enum); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_STRING: - case WireFormatLite::TYPE_BYTES: - case WireFormatLite::TYPE_GROUP: - case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - } else { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - WireFormatLite::Write##CAMELCASE(number, \ - repeated_##LOWERCASE##_value->Get(i), output); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); - HANDLE_TYPE( STRING, String, string); - HANDLE_TYPE( BYTES, Bytes, string); - HANDLE_TYPE( ENUM, Enum, enum); - HANDLE_TYPE( GROUP, Group, message); - HANDLE_TYPE( MESSAGE, Message, message); -#undef HANDLE_TYPE - } - } - } else if (!is_cleared) { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - WireFormatLite::Write##CAMELCASE(number, VALUE, output); \ - break - - HANDLE_TYPE( INT32, Int32, int32_value); - HANDLE_TYPE( INT64, Int64, int64_value); - HANDLE_TYPE( UINT32, UInt32, uint32_value); - HANDLE_TYPE( UINT64, UInt64, uint64_value); - HANDLE_TYPE( SINT32, SInt32, int32_value); - HANDLE_TYPE( SINT64, SInt64, int64_value); - HANDLE_TYPE( FIXED32, Fixed32, uint32_value); - HANDLE_TYPE( FIXED64, Fixed64, uint64_value); - HANDLE_TYPE(SFIXED32, SFixed32, int32_value); - HANDLE_TYPE(SFIXED64, SFixed64, int64_value); - HANDLE_TYPE( FLOAT, Float, float_value); - HANDLE_TYPE( DOUBLE, Double, double_value); - HANDLE_TYPE( BOOL, Bool, bool_value); - HANDLE_TYPE( STRING, String, *string_value); - HANDLE_TYPE( BYTES, Bytes, *string_value); - HANDLE_TYPE( ENUM, Enum, enum_value); - HANDLE_TYPE( GROUP, Group, *message_value); - HANDLE_TYPE( MESSAGE, Message, *message_value); -#undef HANDLE_TYPE - } - } -} - -void ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizes( - int number, - io::CodedOutputStream* output) const { - if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { - // Not a valid MessageSet extension, but serialize it the normal way. - SerializeFieldWithCachedSizes(number, output); - return; - } - - if (is_cleared) return; - - // Start group. - output->WriteTag(WireFormatLite::kMessageSetItemStartTag); - - // Write type ID. - WireFormatLite::WriteUInt32(WireFormatLite::kMessageSetTypeIdNumber, - number, - output); - // Write message. - WireFormatLite::WriteMessageMaybeToArray( - WireFormatLite::kMessageSetMessageNumber, - *message_value, - output); - - // End group. - output->WriteTag(WireFormatLite::kMessageSetItemEndTag); -} - -int ExtensionSet::Extension::ByteSize(int number) const { - int result = 0; - - if (is_repeated) { - if (is_packed) { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - result += WireFormatLite::CAMELCASE##Size( \ - repeated_##LOWERCASE##_value->Get(i)); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( ENUM, Enum, enum); -#undef HANDLE_TYPE - - // Stuff with fixed size. -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - result += WireFormatLite::k##CAMELCASE##Size * \ - repeated_##LOWERCASE##_value->size(); \ - break - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_STRING: - case WireFormatLite::TYPE_BYTES: - case WireFormatLite::TYPE_GROUP: - case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - - cached_size = result; - if (result > 0) { - result += io::CodedOutputStream::VarintSize32(result); - result += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(number, - WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); - } - } else { - int tag_size = WireFormatLite::TagSize(number, real_type(type)); - - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - result += tag_size * repeated_##LOWERCASE##_value->size(); \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - result += WireFormatLite::CAMELCASE##Size( \ - repeated_##LOWERCASE##_value->Get(i)); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( STRING, String, string); - HANDLE_TYPE( BYTES, Bytes, string); - HANDLE_TYPE( ENUM, Enum, enum); - HANDLE_TYPE( GROUP, Group, message); - HANDLE_TYPE( MESSAGE, Message, message); -#undef HANDLE_TYPE - - // Stuff with fixed size. -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - result += (tag_size + WireFormatLite::k##CAMELCASE##Size) * \ - repeated_##LOWERCASE##_value->size(); \ - break - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); -#undef HANDLE_TYPE - } - } - } else if (!is_cleared) { - result += WireFormatLite::TagSize(number, real_type(type)); - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \ - break - - HANDLE_TYPE( INT32, Int32, int32_value); - HANDLE_TYPE( INT64, Int64, int64_value); - HANDLE_TYPE( UINT32, UInt32, uint32_value); - HANDLE_TYPE( UINT64, UInt64, uint64_value); - HANDLE_TYPE( SINT32, SInt32, int32_value); - HANDLE_TYPE( SINT64, SInt64, int64_value); - HANDLE_TYPE( STRING, String, *string_value); - HANDLE_TYPE( BYTES, Bytes, *string_value); - HANDLE_TYPE( ENUM, Enum, enum_value); - HANDLE_TYPE( GROUP, Group, *message_value); - HANDLE_TYPE( MESSAGE, Message, *message_value); -#undef HANDLE_TYPE - - // Stuff with fixed size. -#define HANDLE_TYPE(UPPERCASE, CAMELCASE) \ - case WireFormatLite::TYPE_##UPPERCASE: \ - result += WireFormatLite::k##CAMELCASE##Size; \ - break - HANDLE_TYPE( FIXED32, Fixed32); - HANDLE_TYPE( FIXED64, Fixed64); - HANDLE_TYPE(SFIXED32, SFixed32); - HANDLE_TYPE(SFIXED64, SFixed64); - HANDLE_TYPE( FLOAT, Float); - HANDLE_TYPE( DOUBLE, Double); - HANDLE_TYPE( BOOL, Bool); -#undef HANDLE_TYPE - } - } - - return result; -} - -int ExtensionSet::Extension::MessageSetItemByteSize(int number) const { - if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { - // Not a valid MessageSet extension, but compute the byte size for it the - // normal way. - return ByteSize(number); - } - - if (is_cleared) return 0; - - int our_size = WireFormatLite::kMessageSetItemTagsSize; - - // type_id - our_size += io::CodedOutputStream::VarintSize32(number); - - // message - int message_size = message_value->ByteSize(); - - our_size += io::CodedOutputStream::VarintSize32(message_size); - our_size += message_size; - - return our_size; -} - -int ExtensionSet::Extension::GetSize() const { - GOOGLE_DCHECK(is_repeated); - switch (cpp_type(type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case WireFormatLite::CPPTYPE_##UPPERCASE: \ - return repeated_##LOWERCASE##_value->size() - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE( UINT32, uint32); - HANDLE_TYPE( UINT64, uint64); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( DOUBLE, double); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, enum); - HANDLE_TYPE( STRING, string); - HANDLE_TYPE(MESSAGE, message); -#undef HANDLE_TYPE - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return 0; -} - -void ExtensionSet::Extension::Free() { - if (is_repeated) { - switch (cpp_type(type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case WireFormatLite::CPPTYPE_##UPPERCASE: \ - delete repeated_##LOWERCASE##_value; \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE( UINT32, uint32); - HANDLE_TYPE( UINT64, uint64); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( DOUBLE, double); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, enum); - HANDLE_TYPE( STRING, string); - HANDLE_TYPE(MESSAGE, message); -#undef HANDLE_TYPE - } - } else { - switch (cpp_type(type)) { - case WireFormatLite::CPPTYPE_STRING: - delete string_value; - break; - case WireFormatLite::CPPTYPE_MESSAGE: - delete message_value; - break; - default: - break; - } - } -} - -// Defined in extension_set_heavy.cc. -// int ExtensionSet::Extension::SpaceUsedExcludingSelf() const - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.h deleted file mode 100644 index ac1ada02..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set.h +++ /dev/null @@ -1,904 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This header is logically internal, but is made public because it is used -// from protocol-compiler-generated code, which may reside in other components. - -#ifndef GOOGLE_PROTOBUF_EXTENSION_SET_H__ -#define GOOGLE_PROTOBUF_EXTENSION_SET_H__ - -#include -#include -#include -#include - - -#include - -namespace google { - -namespace protobuf { - class Descriptor; // descriptor.h - class FieldDescriptor; // descriptor.h - class DescriptorPool; // descriptor.h - class MessageLite; // message_lite.h - class Message; // message.h - class MessageFactory; // message.h - class UnknownFieldSet; // unknown_field_set.h - namespace io { - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h - } - namespace internal { - class FieldSkipper; // wire_format_lite.h - class RepeatedPtrFieldBase; // repeated_field.h - } - template class RepeatedField; // repeated_field.h - template class RepeatedPtrField; // repeated_field.h -} - -namespace protobuf { -namespace internal { - -// Used to store values of type WireFormatLite::FieldType without having to -// #include wire_format_lite.h. Also, ensures that we use only one byte to -// store these values, which is important to keep the layout of -// ExtensionSet::Extension small. -typedef uint8 FieldType; - -// A function which, given an integer value, returns true if the number -// matches one of the defined values for the corresponding enum type. This -// is used with RegisterEnumExtension, below. -typedef bool EnumValidityFunc(int number); - -// Version of the above which takes an argument. This is needed to deal with -// extensions that are not compiled in. -typedef bool EnumValidityFuncWithArg(const void* arg, int number); - -// Information about a registered extension. -struct ExtensionInfo { - inline ExtensionInfo() {} - inline ExtensionInfo(FieldType type, bool is_repeated, bool is_packed) - : type(type), is_repeated(is_repeated), is_packed(is_packed), - descriptor(NULL) {} - - FieldType type; - bool is_repeated; - bool is_packed; - - struct EnumValidityCheck { - EnumValidityFuncWithArg* func; - const void* arg; - }; - - union { - EnumValidityCheck enum_validity_check; - const MessageLite* message_prototype; - }; - - // The descriptor for this extension, if one exists and is known. May be - // NULL. Must not be NULL if the descriptor for the extension does not - // live in the same pool as the descriptor for the containing type. - const FieldDescriptor* descriptor; -}; - -// Abstract interface for an object which looks up extension definitions. Used -// when parsing. -class LIBPROTOBUF_EXPORT ExtensionFinder { - public: - virtual ~ExtensionFinder(); - - // Find the extension with the given containing type and number. - virtual bool Find(int number, ExtensionInfo* output) = 0; -}; - -// Implementation of ExtensionFinder which finds extensions defined in .proto -// files which have been compiled into the binary. -class LIBPROTOBUF_EXPORT GeneratedExtensionFinder : public ExtensionFinder { - public: - GeneratedExtensionFinder(const MessageLite* containing_type) - : containing_type_(containing_type) {} - virtual ~GeneratedExtensionFinder() {} - - // Returns true and fills in *output if found, otherwise returns false. - virtual bool Find(int number, ExtensionInfo* output); - - private: - const MessageLite* containing_type_; -}; - -// Note: extension_set_heavy.cc defines DescriptorPoolExtensionFinder for -// finding extensions from a DescriptorPool. - -// This is an internal helper class intended for use within the protocol buffer -// library and generated classes. Clients should not use it directly. Instead, -// use the generated accessors such as GetExtension() of the class being -// extended. -// -// This class manages extensions for a protocol message object. The -// message's HasExtension(), GetExtension(), MutableExtension(), and -// ClearExtension() methods are just thin wrappers around the embedded -// ExtensionSet. When parsing, if a tag number is encountered which is -// inside one of the message type's extension ranges, the tag is passed -// off to the ExtensionSet for parsing. Etc. -class LIBPROTOBUF_EXPORT ExtensionSet { - public: - ExtensionSet(); - ~ExtensionSet(); - - // These are called at startup by protocol-compiler-generated code to - // register known extensions. The registrations are used by ParseField() - // to look up extensions for parsed field numbers. Note that dynamic parsing - // does not use ParseField(); only protocol-compiler-generated parsing - // methods do. - static void RegisterExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed); - static void RegisterEnumExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed, - EnumValidityFunc* is_valid); - static void RegisterMessageExtension(const MessageLite* containing_type, - int number, FieldType type, - bool is_repeated, bool is_packed, - const MessageLite* prototype); - - // ================================================================= - - // Add all fields which are currently present to the given vector. This - // is useful to implement Reflection::ListFields(). - void AppendToList(const Descriptor* containing_type, - const DescriptorPool* pool, - vector* output) const; - - // ================================================================= - // Accessors - // - // Generated message classes include type-safe templated wrappers around - // these methods. Generally you should use those rather than call these - // directly, unless you are doing low-level memory management. - // - // When calling any of these accessors, the extension number requested - // MUST exist in the DescriptorPool provided to the constructor. Otheriwse, - // the method will fail an assert. Normally, though, you would not call - // these directly; you would either call the generated accessors of your - // message class (e.g. GetExtension()) or you would call the accessors - // of the reflection interface. In both cases, it is impossible to - // trigger this assert failure: the generated accessors only accept - // linked-in extension types as parameters, while the Reflection interface - // requires you to provide the FieldDescriptor describing the extension. - // - // When calling any of these accessors, a protocol-compiler-generated - // implementation of the extension corresponding to the number MUST - // be linked in, and the FieldDescriptor used to refer to it MUST be - // the one generated by that linked-in code. Otherwise, the method will - // die on an assert failure. The message objects returned by the message - // accessors are guaranteed to be of the correct linked-in type. - // - // These methods pretty much match Reflection except that: - // - They're not virtual. - // - They identify fields by number rather than FieldDescriptors. - // - They identify enum values using integers rather than descriptors. - // - Strings provide Mutable() in addition to Set() accessors. - - bool Has(int number) const; - int ExtensionSize(int number) const; // Size of a repeated extension. - FieldType ExtensionType(int number) const; - void ClearExtension(int number); - - // singular fields ------------------------------------------------- - - int32 GetInt32 (int number, int32 default_value) const; - int64 GetInt64 (int number, int64 default_value) const; - uint32 GetUInt32(int number, uint32 default_value) const; - uint64 GetUInt64(int number, uint64 default_value) const; - float GetFloat (int number, float default_value) const; - double GetDouble(int number, double default_value) const; - bool GetBool (int number, bool default_value) const; - int GetEnum (int number, int default_value) const; - const string & GetString (int number, const string& default_value) const; - const MessageLite& GetMessage(int number, - const MessageLite& default_value) const; - const MessageLite& GetMessage(int number, const Descriptor* message_type, - MessageFactory* factory) const; - - // |descriptor| may be NULL so long as it is known that the descriptor for - // the extension lives in the same pool as the descriptor for the containing - // type. -#define desc const FieldDescriptor* descriptor // avoid line wrapping - void SetInt32 (int number, FieldType type, int32 value, desc); - void SetInt64 (int number, FieldType type, int64 value, desc); - void SetUInt32(int number, FieldType type, uint32 value, desc); - void SetUInt64(int number, FieldType type, uint64 value, desc); - void SetFloat (int number, FieldType type, float value, desc); - void SetDouble(int number, FieldType type, double value, desc); - void SetBool (int number, FieldType type, bool value, desc); - void SetEnum (int number, FieldType type, int value, desc); - void SetString(int number, FieldType type, const string& value, desc); - string * MutableString (int number, FieldType type, desc); - MessageLite* MutableMessage(int number, FieldType type, - const MessageLite& prototype, desc); - MessageLite* MutableMessage(const FieldDescriptor* decsriptor, - MessageFactory* factory); -#undef desc - - // repeated fields ------------------------------------------------- - - int32 GetRepeatedInt32 (int number, int index) const; - int64 GetRepeatedInt64 (int number, int index) const; - uint32 GetRepeatedUInt32(int number, int index) const; - uint64 GetRepeatedUInt64(int number, int index) const; - float GetRepeatedFloat (int number, int index) const; - double GetRepeatedDouble(int number, int index) const; - bool GetRepeatedBool (int number, int index) const; - int GetRepeatedEnum (int number, int index) const; - const string & GetRepeatedString (int number, int index) const; - const MessageLite& GetRepeatedMessage(int number, int index) const; - - void SetRepeatedInt32 (int number, int index, int32 value); - void SetRepeatedInt64 (int number, int index, int64 value); - void SetRepeatedUInt32(int number, int index, uint32 value); - void SetRepeatedUInt64(int number, int index, uint64 value); - void SetRepeatedFloat (int number, int index, float value); - void SetRepeatedDouble(int number, int index, double value); - void SetRepeatedBool (int number, int index, bool value); - void SetRepeatedEnum (int number, int index, int value); - void SetRepeatedString(int number, int index, const string& value); - string * MutableRepeatedString (int number, int index); - MessageLite* MutableRepeatedMessage(int number, int index); - -#define desc const FieldDescriptor* descriptor // avoid line wrapping - void AddInt32 (int number, FieldType type, bool packed, int32 value, desc); - void AddInt64 (int number, FieldType type, bool packed, int64 value, desc); - void AddUInt32(int number, FieldType type, bool packed, uint32 value, desc); - void AddUInt64(int number, FieldType type, bool packed, uint64 value, desc); - void AddFloat (int number, FieldType type, bool packed, float value, desc); - void AddDouble(int number, FieldType type, bool packed, double value, desc); - void AddBool (int number, FieldType type, bool packed, bool value, desc); - void AddEnum (int number, FieldType type, bool packed, int value, desc); - void AddString(int number, FieldType type, const string& value, desc); - string * AddString (int number, FieldType type, desc); - MessageLite* AddMessage(int number, FieldType type, - const MessageLite& prototype, desc); - MessageLite* AddMessage(const FieldDescriptor* descriptor, - MessageFactory* factory); -#undef desc - - void RemoveLast(int number); - void SwapElements(int number, int index1, int index2); - - // ----------------------------------------------------------------- - // TODO(kenton): Hardcore memory management accessors - - // ================================================================= - // convenience methods for implementing methods of Message - // - // These could all be implemented in terms of the other methods of this - // class, but providing them here helps keep the generated code size down. - - void Clear(); - void MergeFrom(const ExtensionSet& other); - void Swap(ExtensionSet* other); - bool IsInitialized() const; - - // Parses a single extension from the input. The input should start out - // positioned immediately after the tag. |containing_type| is the default - // instance for the containing message; it is used only to look up the - // extension by number. See RegisterExtension(), above. Unlike the other - // methods of ExtensionSet, this only works for generated message types -- - // it looks up extensions registered using RegisterExtension(). - bool ParseField(uint32 tag, io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper); - - // Specific versions for lite or full messages (constructs the appropriate - // FieldSkipper automatically). - bool ParseField(uint32 tag, io::CodedInputStream* input, - const MessageLite* containing_type); - bool ParseField(uint32 tag, io::CodedInputStream* input, - const Message* containing_type, - UnknownFieldSet* unknown_fields); - - // Parse an entire message in MessageSet format. Such messages have no - // fields, only extensions. - bool ParseMessageSet(io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper); - - // Specific versions for lite or full messages (constructs the appropriate - // FieldSkipper automatically). - bool ParseMessageSet(io::CodedInputStream* input, - const MessageLite* containing_type); - bool ParseMessageSet(io::CodedInputStream* input, - const Message* containing_type, - UnknownFieldSet* unknown_fields); - - // Write all extension fields with field numbers in the range - // [start_field_number, end_field_number) - // to the output stream, using the cached sizes computed when ByteSize() was - // last called. Note that the range bounds are inclusive-exclusive. - void SerializeWithCachedSizes(int start_field_number, - int end_field_number, - io::CodedOutputStream* output) const; - - // Same as SerializeWithCachedSizes, but without any bounds checking. - // The caller must ensure that target has sufficient capacity for the - // serialized extensions. - // - // Returns a pointer past the last written byte. - uint8* SerializeWithCachedSizesToArray(int start_field_number, - int end_field_number, - uint8* target) const; - - // Like above but serializes in MessageSet format. - void SerializeMessageSetWithCachedSizes(io::CodedOutputStream* output) const; - uint8* SerializeMessageSetWithCachedSizesToArray(uint8* target) const; - - // Returns the total serialized size of all the extensions. - int ByteSize() const; - - // Like ByteSize() but uses MessageSet format. - int MessageSetByteSize() const; - - // Returns (an estimate of) the total number of bytes used for storing the - // extensions in memory, excluding sizeof(*this). If the ExtensionSet is - // for a lite message (and thus possibly contains lite messages), the results - // are undefined (might work, might crash, might corrupt data, might not even - // be linked in). It's up to the protocol compiler to avoid calling this on - // such ExtensionSets (easy enough since lite messages don't implement - // SpaceUsed()). - int SpaceUsedExcludingSelf() const; - - private: - - struct Extension { - union { - int32 int32_value; - int64 int64_value; - uint32 uint32_value; - uint64 uint64_value; - float float_value; - double double_value; - bool bool_value; - int enum_value; - string* string_value; - MessageLite* message_value; - - RepeatedField * repeated_int32_value; - RepeatedField * repeated_int64_value; - RepeatedField * repeated_uint32_value; - RepeatedField * repeated_uint64_value; - RepeatedField * repeated_float_value; - RepeatedField * repeated_double_value; - RepeatedField * repeated_bool_value; - RepeatedField * repeated_enum_value; - RepeatedPtrField* repeated_string_value; - RepeatedPtrField* repeated_message_value; - }; - - FieldType type; - bool is_repeated; - - // For singular types, indicates if the extension is "cleared". This - // happens when an extension is set and then later cleared by the caller. - // We want to keep the Extension object around for reuse, so instead of - // removing it from the map, we just set is_cleared = true. This has no - // meaning for repeated types; for those, the size of the RepeatedField - // simply becomes zero when cleared. - bool is_cleared; - - // For repeated types, this indicates if the [packed=true] option is set. - bool is_packed; - - // The descriptor for this extension, if one exists and is known. May be - // NULL. Must not be NULL if the descriptor for the extension does not - // live in the same pool as the descriptor for the containing type. - const FieldDescriptor* descriptor; - - // For packed fields, the size of the packed data is recorded here when - // ByteSize() is called then used during serialization. - // TODO(kenton): Use atomic when C++ supports it. - mutable int cached_size; - - // Some helper methods for operations on a single Extension. - void SerializeFieldWithCachedSizes( - int number, - io::CodedOutputStream* output) const; - uint8* SerializeFieldWithCachedSizesToArray( - int number, - uint8* target) const; - void SerializeMessageSetItemWithCachedSizes( - int number, - io::CodedOutputStream* output) const; - uint8* SerializeMessageSetItemWithCachedSizesToArray( - int number, - uint8* target) const; - int ByteSize(int number) const; - int MessageSetItemByteSize(int number) const; - void Clear(); - int GetSize() const; - void Free(); - int SpaceUsedExcludingSelf() const; - }; - - - // Gets the extension with the given number, creating it if it does not - // already exist. Returns true if the extension did not already exist. - bool MaybeNewExtension(int number, const FieldDescriptor* descriptor, - Extension** result); - - // Parse a single MessageSet item -- called just after the item group start - // tag has been read. - bool ParseMessageSetItem(io::CodedInputStream* input, - ExtensionFinder* extension_finder, - FieldSkipper* field_skipper); - - - // Hack: RepeatedPtrFieldBase declares ExtensionSet as a friend. This - // friendship should automatically extend to ExtensionSet::Extension, but - // unfortunately some older compilers (e.g. GCC 3.4.4) do not implement this - // correctly. So, we must provide helpers for calling methods of that - // class. - - // Defined in extension_set_heavy.cc. - static inline int RepeatedMessage_SpaceUsedExcludingSelf( - RepeatedPtrFieldBase* field); - - // The Extension struct is small enough to be passed by value, so we use it - // directly as the value type in the map rather than use pointers. We use - // a map rather than hash_map here because we expect most ExtensionSets will - // only contain a small number of extensions whereas hash_map is optimized - // for 100 elements or more. Also, we want AppendToList() to order fields - // by field number. - map extensions_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionSet); -}; - -// These are just for convenience... -inline void ExtensionSet::SetString(int number, FieldType type, - const string& value, - const FieldDescriptor* descriptor) { - MutableString(number, type, descriptor)->assign(value); -} -inline void ExtensionSet::SetRepeatedString(int number, int index, - const string& value) { - MutableRepeatedString(number, index)->assign(value); -} -inline void ExtensionSet::AddString(int number, FieldType type, - const string& value, - const FieldDescriptor* descriptor) { - AddString(number, type, descriptor)->assign(value); -} - -// =================================================================== -// Glue for generated extension accessors - -// ------------------------------------------------------------------- -// Template magic - -// First we have a set of classes representing "type traits" for different -// field types. A type traits class knows how to implement basic accessors -// for extensions of a particular type given an ExtensionSet. The signature -// for a type traits class looks like this: -// -// class TypeTraits { -// public: -// typedef ? ConstType; -// typedef ? MutableType; -// -// static inline ConstType Get(int number, const ExtensionSet& set); -// static inline void Set(int number, ConstType value, ExtensionSet* set); -// static inline MutableType Mutable(int number, ExtensionSet* set); -// -// // Variants for repeated fields. -// static inline ConstType Get(int number, const ExtensionSet& set, -// int index); -// static inline void Set(int number, int index, -// ConstType value, ExtensionSet* set); -// static inline MutableType Mutable(int number, int index, -// ExtensionSet* set); -// static inline void Add(int number, ConstType value, ExtensionSet* set); -// static inline MutableType Add(int number, ExtensionSet* set); -// }; -// -// Not all of these methods make sense for all field types. For example, the -// "Mutable" methods only make sense for strings and messages, and the -// repeated methods only make sense for repeated types. So, each type -// traits class implements only the set of methods from this signature that it -// actually supports. This will cause a compiler error if the user tries to -// access an extension using a method that doesn't make sense for its type. -// For example, if "foo" is an extension of type "optional int32", then if you -// try to write code like: -// my_message.MutableExtension(foo) -// you will get a compile error because PrimitiveTypeTraits does not -// have a "Mutable()" method. - -// ------------------------------------------------------------------- -// PrimitiveTypeTraits - -// Since the ExtensionSet has different methods for each primitive type, -// we must explicitly define the methods of the type traits class for each -// known type. -template -class PrimitiveTypeTraits { - public: - typedef Type ConstType; - - static inline ConstType Get(int number, const ExtensionSet& set, - ConstType default_value); - static inline void Set(int number, FieldType field_type, - ConstType value, ExtensionSet* set); -}; - -template -class RepeatedPrimitiveTypeTraits { - public: - typedef Type ConstType; - - static inline Type Get(int number, const ExtensionSet& set, int index); - static inline void Set(int number, int index, Type value, ExtensionSet* set); - static inline void Add(int number, FieldType field_type, - bool is_packed, Type value, ExtensionSet* set); -}; - -#define PROTOBUF_DEFINE_PRIMITIVE_TYPE(TYPE, METHOD) \ -template<> inline TYPE PrimitiveTypeTraits::Get( \ - int number, const ExtensionSet& set, TYPE default_value) { \ - return set.Get##METHOD(number, default_value); \ -} \ -template<> inline void PrimitiveTypeTraits::Set( \ - int number, FieldType field_type, TYPE value, ExtensionSet* set) { \ - set->Set##METHOD(number, field_type, value, NULL); \ -} \ - \ -template<> inline TYPE RepeatedPrimitiveTypeTraits::Get( \ - int number, const ExtensionSet& set, int index) { \ - return set.GetRepeated##METHOD(number, index); \ -} \ -template<> inline void RepeatedPrimitiveTypeTraits::Set( \ - int number, int index, TYPE value, ExtensionSet* set) { \ - set->SetRepeated##METHOD(number, index, value); \ -} \ -template<> inline void RepeatedPrimitiveTypeTraits::Add( \ - int number, FieldType field_type, bool is_packed, \ - TYPE value, ExtensionSet* set) { \ - set->Add##METHOD(number, field_type, is_packed, value, NULL); \ -} - -PROTOBUF_DEFINE_PRIMITIVE_TYPE( int32, Int32) -PROTOBUF_DEFINE_PRIMITIVE_TYPE( int64, Int64) -PROTOBUF_DEFINE_PRIMITIVE_TYPE(uint32, UInt32) -PROTOBUF_DEFINE_PRIMITIVE_TYPE(uint64, UInt64) -PROTOBUF_DEFINE_PRIMITIVE_TYPE( float, Float) -PROTOBUF_DEFINE_PRIMITIVE_TYPE(double, Double) -PROTOBUF_DEFINE_PRIMITIVE_TYPE( bool, Bool) - -#undef PROTOBUF_DEFINE_PRIMITIVE_TYPE - -// ------------------------------------------------------------------- -// StringTypeTraits - -// Strings support both Set() and Mutable(). -class LIBPROTOBUF_EXPORT StringTypeTraits { - public: - typedef const string& ConstType; - typedef string* MutableType; - - static inline const string& Get(int number, const ExtensionSet& set, - ConstType default_value) { - return set.GetString(number, default_value); - } - static inline void Set(int number, FieldType field_type, - const string& value, ExtensionSet* set) { - set->SetString(number, field_type, value, NULL); - } - static inline string* Mutable(int number, FieldType field_type, - ExtensionSet* set) { - return set->MutableString(number, field_type, NULL); - } -}; - -class LIBPROTOBUF_EXPORT RepeatedStringTypeTraits { - public: - typedef const string& ConstType; - typedef string* MutableType; - - static inline const string& Get(int number, const ExtensionSet& set, - int index) { - return set.GetRepeatedString(number, index); - } - static inline void Set(int number, int index, - const string& value, ExtensionSet* set) { - set->SetRepeatedString(number, index, value); - } - static inline string* Mutable(int number, int index, ExtensionSet* set) { - return set->MutableRepeatedString(number, index); - } - static inline void Add(int number, FieldType field_type, - bool /*is_packed*/, const string& value, - ExtensionSet* set) { - set->AddString(number, field_type, value, NULL); - } - static inline string* Add(int number, FieldType field_type, - ExtensionSet* set) { - return set->AddString(number, field_type, NULL); - } -}; - -// ------------------------------------------------------------------- -// EnumTypeTraits - -// ExtensionSet represents enums using integers internally, so we have to -// static_cast around. -template -class EnumTypeTraits { - public: - typedef Type ConstType; - - static inline ConstType Get(int number, const ExtensionSet& set, - ConstType default_value) { - return static_cast(set.GetEnum(number, default_value)); - } - static inline void Set(int number, FieldType field_type, - ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); - set->SetEnum(number, field_type, value, NULL); - } -}; - -template -class RepeatedEnumTypeTraits { - public: - typedef Type ConstType; - - static inline ConstType Get(int number, const ExtensionSet& set, int index) { - return static_cast(set.GetRepeatedEnum(number, index)); - } - static inline void Set(int number, int index, - ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); - set->SetRepeatedEnum(number, index, value); - } - static inline void Add(int number, FieldType field_type, - bool is_packed, ConstType value, ExtensionSet* set) { - GOOGLE_DCHECK(IsValid(value)); - set->AddEnum(number, field_type, is_packed, value, NULL); - } -}; - -// ------------------------------------------------------------------- -// MessageTypeTraits - -// ExtensionSet guarantees that when manipulating extensions with message -// types, the implementation used will be the compiled-in class representing -// that type. So, we can static_cast down to the exact type we expect. -template -class MessageTypeTraits { - public: - typedef const Type& ConstType; - typedef Type* MutableType; - - static inline ConstType Get(int number, const ExtensionSet& set, - ConstType default_value) { - return static_cast( - set.GetMessage(number, default_value)); - } - static inline MutableType Mutable(int number, FieldType field_type, - ExtensionSet* set) { - return static_cast( - set->MutableMessage(number, field_type, Type::default_instance(), NULL)); - } -}; - -template -class RepeatedMessageTypeTraits { - public: - typedef const Type& ConstType; - typedef Type* MutableType; - - static inline ConstType Get(int number, const ExtensionSet& set, int index) { - return static_cast(set.GetRepeatedMessage(number, index)); - } - static inline MutableType Mutable(int number, int index, ExtensionSet* set) { - return static_cast(set->MutableRepeatedMessage(number, index)); - } - static inline MutableType Add(int number, FieldType field_type, - ExtensionSet* set) { - return static_cast( - set->AddMessage(number, field_type, Type::default_instance(), NULL)); - } -}; - -// ------------------------------------------------------------------- -// ExtensionIdentifier - -// This is the type of actual extension objects. E.g. if you have: -// extends Foo with optional int32 bar = 1234; -// then "bar" will be defined in C++ as: -// ExtensionIdentifier, 1, false> bar(1234); -// -// Note that we could, in theory, supply the field number as a template -// parameter, and thus make an instance of ExtensionIdentifier have no -// actual contents. However, if we did that, then using at extension -// identifier would not necessarily cause the compiler to output any sort -// of reference to any simple defined in the extension's .pb.o file. Some -// linkers will actually drop object files that are not explicitly referenced, -// but that would be bad because it would cause this extension to not be -// registered at static initialization, and therefore using it would crash. - -template -class ExtensionIdentifier { - public: - typedef TypeTraitsType TypeTraits; - typedef ExtendeeType Extendee; - - ExtensionIdentifier(int number, typename TypeTraits::ConstType default_value) - : number_(number), default_value_(default_value) {} - inline int number() const { return number_; } - typename TypeTraits::ConstType default_value() const { - return default_value_; - } - - private: - const int number_; - typename TypeTraits::ConstType default_value_; -}; - -// ------------------------------------------------------------------- -// Generated accessors - -// This macro should be expanded in the context of a generated type which -// has extensions. -// -// We use "_proto_TypeTraits" as a type name below because "TypeTraits" -// causes problems if the class has a nested message or enum type with that -// name and "_TypeTraits" is technically reserved for the C++ library since -// it starts with an underscore followed by a capital letter. -#define GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(CLASSNAME) \ - /* Has, Size, Clear */ \ - template \ - inline bool HasExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) const { \ - return _extensions_.Has(id.number()); \ - } \ - \ - template \ - inline void ClearExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) { \ - _extensions_.ClearExtension(id.number()); \ - } \ - \ - template \ - inline int ExtensionSize( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) const { \ - return _extensions_.ExtensionSize(id.number()); \ - } \ - \ - /* Singular accessors */ \ - template \ - inline typename _proto_TypeTraits::ConstType GetExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) const { \ - return _proto_TypeTraits::Get(id.number(), _extensions_, \ - id.default_value()); \ - } \ - \ - template \ - inline typename _proto_TypeTraits::MutableType MutableExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) { \ - return _proto_TypeTraits::Mutable(id.number(), field_type, &_extensions_);\ - } \ - \ - template \ - inline void SetExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id, \ - typename _proto_TypeTraits::ConstType value) { \ - _proto_TypeTraits::Set(id.number(), field_type, value, &_extensions_); \ - } \ - \ - /* Repeated accessors */ \ - template \ - inline typename _proto_TypeTraits::ConstType GetExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id, \ - int index) const { \ - return _proto_TypeTraits::Get(id.number(), _extensions_, index); \ - } \ - \ - template \ - inline typename _proto_TypeTraits::MutableType MutableExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id, \ - int index) { \ - return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_); \ - } \ - \ - template \ - inline void SetExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id, \ - int index, typename _proto_TypeTraits::ConstType value) { \ - _proto_TypeTraits::Set(id.number(), index, value, &_extensions_); \ - } \ - \ - template \ - inline typename _proto_TypeTraits::MutableType AddExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id) { \ - return _proto_TypeTraits::Add(id.number(), field_type, &_extensions_); \ - } \ - \ - template \ - inline void AddExtension( \ - const ::google::protobuf::internal::ExtensionIdentifier< \ - CLASSNAME, _proto_TypeTraits, field_type, is_packed>& id, \ - typename _proto_TypeTraits::ConstType value) { \ - _proto_TypeTraits::Add(id.number(), field_type, is_packed, \ - value, &_extensions_); \ - } - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_EXTENSION_SET_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_heavy.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_heavy.cc deleted file mode 100644 index 2721f15d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_heavy.cc +++ /dev/null @@ -1,457 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Contains methods defined in extension_set.h which cannot be part of the -// lite library because they use descriptors or reflection. - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { - -// Implementation of ExtensionFinder which finds extensions in a given -// DescriptorPool, using the given MessageFactory to construct sub-objects. -// This class is implemented in extension_set_heavy.cc. -class DescriptorPoolExtensionFinder : public ExtensionFinder { - public: - DescriptorPoolExtensionFinder(const DescriptorPool* pool, - MessageFactory* factory, - const Descriptor* containing_type) - : pool_(pool), factory_(factory), containing_type_(containing_type) {} - virtual ~DescriptorPoolExtensionFinder() {} - - virtual bool Find(int number, ExtensionInfo* output); - - private: - const DescriptorPool* pool_; - MessageFactory* factory_; - const Descriptor* containing_type_; -}; - -void ExtensionSet::AppendToList(const Descriptor* containing_type, - const DescriptorPool* pool, - vector* output) const { - for (map::const_iterator iter = extensions_.begin(); - iter != extensions_.end(); ++iter) { - bool has = false; - if (iter->second.is_repeated) { - has = iter->second.GetSize() > 0; - } else { - has = !iter->second.is_cleared; - } - - if (has) { - // TODO(kenton): Looking up each field by number is somewhat unfortunate. - // Is there a better way? The problem is that descriptors are lazily- - // initialized, so they might not even be constructed until - // AppendToList() is called. - - if (iter->second.descriptor == NULL) { - output->push_back(pool->FindExtensionByNumber( - containing_type, iter->first)); - } else { - output->push_back(iter->second.descriptor); - } - } - } -} - -inline FieldDescriptor::Type real_type(FieldType type) { - GOOGLE_DCHECK(type > 0 && type <= FieldDescriptor::MAX_TYPE); - return static_cast(type); -} - -inline FieldDescriptor::CppType cpp_type(FieldType type) { - return FieldDescriptor::TypeToCppType( - static_cast(type)); -} - -#define GOOGLE_DCHECK_TYPE(EXTENSION, LABEL, CPPTYPE) \ - GOOGLE_DCHECK_EQ((EXTENSION).is_repeated ? FieldDescriptor::LABEL_REPEATED \ - : FieldDescriptor::LABEL_OPTIONAL, \ - FieldDescriptor::LABEL_##LABEL); \ - GOOGLE_DCHECK_EQ(cpp_type((EXTENSION).type), FieldDescriptor::CPPTYPE_##CPPTYPE) - -const MessageLite& ExtensionSet::GetMessage(int number, - const Descriptor* message_type, - MessageFactory* factory) const { - map::const_iterator iter = extensions_.find(number); - if (iter == extensions_.end() || iter->second.is_cleared) { - // Not present. Return the default value. - return *factory->GetPrototype(message_type); - } else { - GOOGLE_DCHECK_TYPE(iter->second, OPTIONAL, MESSAGE); - return *iter->second.message_value; - } -} - -MessageLite* ExtensionSet::MutableMessage(const FieldDescriptor* descriptor, - MessageFactory* factory) { - Extension* extension; - if (MaybeNewExtension(descriptor->number(), descriptor, &extension)) { - extension->type = descriptor->type(); - GOOGLE_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); - extension->is_repeated = false; - extension->is_packed = false; - const MessageLite* prototype = - factory->GetPrototype(descriptor->message_type()); - GOOGLE_CHECK(prototype != NULL); - extension->message_value = prototype->New(); - } else { - GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); - } - extension->is_cleared = false; - return extension->message_value; -} - -MessageLite* ExtensionSet::AddMessage(const FieldDescriptor* descriptor, - MessageFactory* factory) { - Extension* extension; - if (MaybeNewExtension(descriptor->number(), descriptor, &extension)) { - extension->type = descriptor->type(); - GOOGLE_DCHECK_EQ(cpp_type(extension->type), FieldDescriptor::CPPTYPE_MESSAGE); - extension->is_repeated = true; - extension->repeated_message_value = - new RepeatedPtrField(); - } else { - GOOGLE_DCHECK_TYPE(*extension, REPEATED, MESSAGE); - } - - // RepeatedPtrField does not know how to Add() since it cannot - // allocate an abstract object, so we have to be tricky. - MessageLite* result = extension->repeated_message_value - ->AddFromCleared >(); - if (result == NULL) { - const MessageLite* prototype; - if (extension->repeated_message_value->size() == 0) { - prototype = factory->GetPrototype(descriptor->message_type()); - GOOGLE_CHECK(prototype != NULL); - } else { - prototype = &extension->repeated_message_value->Get(0); - } - result = prototype->New(); - extension->repeated_message_value->AddAllocated(result); - } - return result; -} - -static bool ValidateEnumUsingDescriptor(const void* arg, int number) { - return reinterpret_cast(arg) - ->FindValueByNumber(number) != NULL; -} - -bool DescriptorPoolExtensionFinder::Find(int number, ExtensionInfo* output) { - const FieldDescriptor* extension = - pool_->FindExtensionByNumber(containing_type_, number); - if (extension == NULL) { - return false; - } else { - output->type = extension->type(); - output->is_repeated = extension->is_repeated(); - output->is_packed = extension->options().packed(); - output->descriptor = extension; - if (extension->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - output->message_prototype = - factory_->GetPrototype(extension->message_type()); - GOOGLE_CHECK(output->message_prototype != NULL) - << "Extension factory's GetPrototype() returned NULL for extension: " - << extension->full_name(); - } else if (extension->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) { - output->enum_validity_check.func = ValidateEnumUsingDescriptor; - output->enum_validity_check.arg = extension->enum_type(); - } - - return true; - } -} - -bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input, - const Message* containing_type, - UnknownFieldSet* unknown_fields) { - UnknownFieldSetFieldSkipper skipper(unknown_fields); - if (input->GetExtensionPool() == NULL) { - GeneratedExtensionFinder finder(containing_type); - return ParseField(tag, input, &finder, &skipper); - } else { - DescriptorPoolExtensionFinder finder(input->GetExtensionPool(), - input->GetExtensionFactory(), - containing_type->GetDescriptor()); - return ParseField(tag, input, &finder, &skipper); - } -} - -bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, - const Message* containing_type, - UnknownFieldSet* unknown_fields) { - UnknownFieldSetFieldSkipper skipper(unknown_fields); - if (input->GetExtensionPool() == NULL) { - GeneratedExtensionFinder finder(containing_type); - return ParseMessageSet(input, &finder, &skipper); - } else { - DescriptorPoolExtensionFinder finder(input->GetExtensionPool(), - input->GetExtensionFactory(), - containing_type->GetDescriptor()); - return ParseMessageSet(input, &finder, &skipper); - } -} - -int ExtensionSet::SpaceUsedExcludingSelf() const { - int total_size = - extensions_.size() * sizeof(map::value_type); - for (map::const_iterator iter = extensions_.begin(), - end = extensions_.end(); - iter != end; - ++iter) { - total_size += iter->second.SpaceUsedExcludingSelf(); - } - return total_size; -} - -inline int ExtensionSet::RepeatedMessage_SpaceUsedExcludingSelf( - RepeatedPtrFieldBase* field) { - return field->SpaceUsedExcludingSelf >(); -} - -int ExtensionSet::Extension::SpaceUsedExcludingSelf() const { - int total_size = 0; - if (is_repeated) { - switch (cpp_type(type)) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE: \ - total_size += sizeof(*repeated_##LOWERCASE##_value) + \ - repeated_##LOWERCASE##_value->SpaceUsedExcludingSelf();\ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE( UINT32, uint32); - HANDLE_TYPE( UINT64, uint64); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( DOUBLE, double); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, enum); - HANDLE_TYPE( STRING, string); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_MESSAGE: - // repeated_message_value is actually a RepeatedPtrField, - // but MessageLite has no SpaceUsed(), so we must directly call - // RepeatedPtrFieldBase::SpaceUsedExcludingSelf() with a different type - // handler. - total_size += sizeof(*repeated_message_value) + - RepeatedMessage_SpaceUsedExcludingSelf(repeated_message_value); - break; - } - } else { - switch (cpp_type(type)) { - case FieldDescriptor::CPPTYPE_STRING: - total_size += sizeof(*string_value) + - StringSpaceUsedExcludingSelf(*string_value); - break; - case FieldDescriptor::CPPTYPE_MESSAGE: - total_size += down_cast(message_value)->SpaceUsed(); - break; - default: - // No extra storage costs for primitive types. - break; - } - } - return total_size; -} - -// The Serialize*ToArray methods are only needed in the heavy library, as -// the lite library only generates SerializeWithCachedSizes. -uint8* ExtensionSet::SerializeWithCachedSizesToArray( - int start_field_number, int end_field_number, - uint8* target) const { - map::const_iterator iter; - for (iter = extensions_.lower_bound(start_field_number); - iter != extensions_.end() && iter->first < end_field_number; - ++iter) { - target = iter->second.SerializeFieldWithCachedSizesToArray(iter->first, - target); - } - return target; -} - -uint8* ExtensionSet::SerializeMessageSetWithCachedSizesToArray( - uint8* target) const { - map::const_iterator iter; - for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) { - target = iter->second.SerializeMessageSetItemWithCachedSizesToArray( - iter->first, target); - } - return target; -} - -uint8* ExtensionSet::Extension::SerializeFieldWithCachedSizesToArray( - int number, uint8* target) const { - if (is_repeated) { - if (is_packed) { - if (cached_size == 0) return target; - - target = WireFormatLite::WriteTagToArray(number, - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = WireFormatLite::WriteInt32NoTagToArray(cached_size, target); - - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - target = WireFormatLite::Write##CAMELCASE##NoTagToArray( \ - repeated_##LOWERCASE##_value->Get(i), target); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); - HANDLE_TYPE( ENUM, Enum, enum); -#undef HANDLE_TYPE - - case WireFormatLite::TYPE_STRING: - case WireFormatLite::TYPE_BYTES: - case WireFormatLite::TYPE_GROUP: - case WireFormatLite::TYPE_MESSAGE: - GOOGLE_LOG(FATAL) << "Non-primitive types can't be packed."; - break; - } - } else { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - for (int i = 0; i < repeated_##LOWERCASE##_value->size(); i++) { \ - target = WireFormatLite::Write##CAMELCASE##ToArray(number, \ - repeated_##LOWERCASE##_value->Get(i), target); \ - } \ - break - - HANDLE_TYPE( INT32, Int32, int32); - HANDLE_TYPE( INT64, Int64, int64); - HANDLE_TYPE( UINT32, UInt32, uint32); - HANDLE_TYPE( UINT64, UInt64, uint64); - HANDLE_TYPE( SINT32, SInt32, int32); - HANDLE_TYPE( SINT64, SInt64, int64); - HANDLE_TYPE( FIXED32, Fixed32, uint32); - HANDLE_TYPE( FIXED64, Fixed64, uint64); - HANDLE_TYPE(SFIXED32, SFixed32, int32); - HANDLE_TYPE(SFIXED64, SFixed64, int64); - HANDLE_TYPE( FLOAT, Float, float); - HANDLE_TYPE( DOUBLE, Double, double); - HANDLE_TYPE( BOOL, Bool, bool); - HANDLE_TYPE( STRING, String, string); - HANDLE_TYPE( BYTES, Bytes, string); - HANDLE_TYPE( ENUM, Enum, enum); - HANDLE_TYPE( GROUP, Group, message); - HANDLE_TYPE( MESSAGE, Message, message); -#undef HANDLE_TYPE - } - } - } else if (!is_cleared) { - switch (real_type(type)) { -#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE) \ - case FieldDescriptor::TYPE_##UPPERCASE: \ - target = WireFormatLite::Write##CAMELCASE##ToArray( \ - number, VALUE, target); \ - break - - HANDLE_TYPE( INT32, Int32, int32_value); - HANDLE_TYPE( INT64, Int64, int64_value); - HANDLE_TYPE( UINT32, UInt32, uint32_value); - HANDLE_TYPE( UINT64, UInt64, uint64_value); - HANDLE_TYPE( SINT32, SInt32, int32_value); - HANDLE_TYPE( SINT64, SInt64, int64_value); - HANDLE_TYPE( FIXED32, Fixed32, uint32_value); - HANDLE_TYPE( FIXED64, Fixed64, uint64_value); - HANDLE_TYPE(SFIXED32, SFixed32, int32_value); - HANDLE_TYPE(SFIXED64, SFixed64, int64_value); - HANDLE_TYPE( FLOAT, Float, float_value); - HANDLE_TYPE( DOUBLE, Double, double_value); - HANDLE_TYPE( BOOL, Bool, bool_value); - HANDLE_TYPE( STRING, String, *string_value); - HANDLE_TYPE( BYTES, Bytes, *string_value); - HANDLE_TYPE( ENUM, Enum, enum_value); - HANDLE_TYPE( GROUP, Group, *message_value); - HANDLE_TYPE( MESSAGE, Message, *message_value); -#undef HANDLE_TYPE - } - } - return target; -} - -uint8* ExtensionSet::Extension::SerializeMessageSetItemWithCachedSizesToArray( - int number, - uint8* target) const { - if (type != WireFormatLite::TYPE_MESSAGE || is_repeated) { - // Not a valid MessageSet extension, but serialize it the normal way. - GOOGLE_LOG(WARNING) << "Invalid message set extension."; - return SerializeFieldWithCachedSizesToArray(number, target); - } - - if (is_cleared) return target; - - // Start group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemStartTag, target); - // Write type ID. - target = WireFormatLite::WriteUInt32ToArray( - WireFormatLite::kMessageSetTypeIdNumber, number, target); - // Write message. - target = WireFormatLite::WriteMessageToArray( - WireFormatLite::kMessageSetMessageNumber, *message_value, target); - // End group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemEndTag, target); - return target; -} - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_unittest.cc deleted file mode 100644 index 000f846c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/extension_set_unittest.cc +++ /dev/null @@ -1,642 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { -namespace { - -// This test closely mirrors google/protobuf/compiler/cpp/unittest.cc -// except that it uses extensions rather than regular fields. - -TEST(ExtensionSetTest, Defaults) { - // Check that all default values are set correctly in the initial message. - unittest::TestAllExtensions message; - - TestUtil::ExpectExtensionsClear(message); - - // Messages should return pointers to default instances until first use. - // (This is not checked by ExpectClear() since it is not actually true after - // the fields have been set and then cleared.) - EXPECT_EQ(&unittest::OptionalGroup_extension::default_instance(), - &message.GetExtension(unittest::optionalgroup_extension)); - EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.GetExtension(unittest::optional_nested_message_extension)); - EXPECT_EQ(&unittest::ForeignMessage::default_instance(), - &message.GetExtension( - unittest::optional_foreign_message_extension)); - EXPECT_EQ(&unittest_import::ImportMessage::default_instance(), - &message.GetExtension(unittest::optional_import_message_extension)); -} - -TEST(ExtensionSetTest, Accessors) { - // Set every field to a unique value then go back and check all those - // values. - unittest::TestAllExtensions message; - - TestUtil::SetAllExtensions(&message); - TestUtil::ExpectAllExtensionsSet(message); - - TestUtil::ModifyRepeatedExtensions(&message); - TestUtil::ExpectRepeatedExtensionsModified(message); -} - -TEST(ExtensionSetTest, Clear) { - // Set every field to a unique value, clear the message, then check that - // it is cleared. - unittest::TestAllExtensions message; - - TestUtil::SetAllExtensions(&message); - message.Clear(); - TestUtil::ExpectExtensionsClear(message); - - // Unlike with the defaults test, we do NOT expect that requesting embedded - // messages will return a pointer to the default instance. Instead, they - // should return the objects that were created when mutable_blah() was - // called. - EXPECT_NE(&unittest::OptionalGroup_extension::default_instance(), - &message.GetExtension(unittest::optionalgroup_extension)); - EXPECT_NE(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.GetExtension(unittest::optional_nested_message_extension)); - EXPECT_NE(&unittest::ForeignMessage::default_instance(), - &message.GetExtension( - unittest::optional_foreign_message_extension)); - EXPECT_NE(&unittest_import::ImportMessage::default_instance(), - &message.GetExtension(unittest::optional_import_message_extension)); - - // Make sure setting stuff again after clearing works. (This takes slightly - // different code paths since the objects are reused.) - TestUtil::SetAllExtensions(&message); - TestUtil::ExpectAllExtensionsSet(message); -} - -TEST(ExtensionSetTest, ClearOneField) { - // Set every field to a unique value, then clear one value and insure that - // only that one value is cleared. - unittest::TestAllExtensions message; - - TestUtil::SetAllExtensions(&message); - int64 original_value = - message.GetExtension(unittest::optional_int64_extension); - - // Clear the field and make sure it shows up as cleared. - message.ClearExtension(unittest::optional_int64_extension); - EXPECT_FALSE(message.HasExtension(unittest::optional_int64_extension)); - EXPECT_EQ(0, message.GetExtension(unittest::optional_int64_extension)); - - // Other adjacent fields should not be cleared. - EXPECT_TRUE(message.HasExtension(unittest::optional_int32_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_uint32_extension)); - - // Make sure if we set it again, then all fields are set. - message.SetExtension(unittest::optional_int64_extension, original_value); - TestUtil::ExpectAllExtensionsSet(message); -} - -TEST(ExtensionSetTest, CopyFrom) { - unittest::TestAllExtensions message1, message2; - string data; - - TestUtil::SetAllExtensions(&message1); - message2.CopyFrom(message1); - TestUtil::ExpectAllExtensionsSet(message2); -} - -TEST(ExtensionSetTest, CopyFromUpcasted) { - unittest::TestAllExtensions message1, message2; - string data; - const Message& upcasted_message = message1; - - TestUtil::SetAllExtensions(&message1); - message2.CopyFrom(upcasted_message); - TestUtil::ExpectAllExtensionsSet(message2); -} - -TEST(ExtensionSetTest, SwapWithEmpty) { - unittest::TestAllExtensions message1, message2; - TestUtil::SetAllExtensions(&message1); - - TestUtil::ExpectAllExtensionsSet(message1); - TestUtil::ExpectExtensionsClear(message2); - message1.Swap(&message2); - TestUtil::ExpectAllExtensionsSet(message2); - TestUtil::ExpectExtensionsClear(message1); -} - -TEST(ExtensionSetTest, SwapWithSelf) { - unittest::TestAllExtensions message; - TestUtil::SetAllExtensions(&message); - - TestUtil::ExpectAllExtensionsSet(message); - message.Swap(&message); - TestUtil::ExpectAllExtensionsSet(message); -} - -TEST(ExtensionSetTest, SerializationToArray) { - // Serialize as TestAllExtensions and parse as TestAllTypes to insure wire - // compatibility of extensions. - // - // This checks serialization to a flat array by explicitly reserving space in - // the string and calling the generated message's - // SerializeWithCachedSizesToArray. - unittest::TestAllExtensions source; - unittest::TestAllTypes destination; - TestUtil::SetAllExtensions(&source); - int size = source.ByteSize(); - string data; - data.resize(size); - uint8* target = reinterpret_cast(string_as_array(&data)); - uint8* end = source.SerializeWithCachedSizesToArray(target); - EXPECT_EQ(size, end - target); - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectAllFieldsSet(destination); -} - -TEST(ExtensionSetTest, SerializationToStream) { - // Serialize as TestAllExtensions and parse as TestAllTypes to insure wire - // compatibility of extensions. - // - // This checks serialization to an output stream by creating an array output - // stream that can only buffer 1 byte at a time - this prevents the message - // from ever jumping to the fast path, ensuring that serialization happens via - // the CodedOutputStream. - unittest::TestAllExtensions source; - unittest::TestAllTypes destination; - TestUtil::SetAllExtensions(&source); - int size = source.ByteSize(); - string data; - data.resize(size); - { - io::ArrayOutputStream array_stream(string_as_array(&data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - source.SerializeWithCachedSizes(&output_stream); - ASSERT_FALSE(output_stream.HadError()); - } - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectAllFieldsSet(destination); -} - -TEST(ExtensionSetTest, PackedSerializationToArray) { - // Serialize as TestPackedExtensions and parse as TestPackedTypes to insure - // wire compatibility of extensions. - // - // This checks serialization to a flat array by explicitly reserving space in - // the string and calling the generated message's - // SerializeWithCachedSizesToArray. - unittest::TestPackedExtensions source; - unittest::TestPackedTypes destination; - TestUtil::SetPackedExtensions(&source); - int size = source.ByteSize(); - string data; - data.resize(size); - uint8* target = reinterpret_cast(string_as_array(&data)); - uint8* end = source.SerializeWithCachedSizesToArray(target); - EXPECT_EQ(size, end - target); - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectPackedFieldsSet(destination); -} - -TEST(ExtensionSetTest, PackedSerializationToStream) { - // Serialize as TestPackedExtensions and parse as TestPackedTypes to insure - // wire compatibility of extensions. - // - // This checks serialization to an output stream by creating an array output - // stream that can only buffer 1 byte at a time - this prevents the message - // from ever jumping to the fast path, ensuring that serialization happens via - // the CodedOutputStream. - unittest::TestPackedExtensions source; - unittest::TestPackedTypes destination; - TestUtil::SetPackedExtensions(&source); - int size = source.ByteSize(); - string data; - data.resize(size); - { - io::ArrayOutputStream array_stream(string_as_array(&data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - source.SerializeWithCachedSizes(&output_stream); - ASSERT_FALSE(output_stream.HadError()); - } - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectPackedFieldsSet(destination); -} - -TEST(ExtensionSetTest, Parsing) { - // Serialize as TestAllTypes and parse as TestAllExtensions. - unittest::TestAllTypes source; - unittest::TestAllExtensions destination; - string data; - - TestUtil::SetAllFields(&source); - source.SerializeToString(&data); - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectAllExtensionsSet(destination); -} - -TEST(ExtensionSetTest, PackedParsing) { - // Serialize as TestPackedTypes and parse as TestPackedExtensions. - unittest::TestPackedTypes source; - unittest::TestPackedExtensions destination; - string data; - - TestUtil::SetPackedFields(&source); - source.SerializeToString(&data); - EXPECT_TRUE(destination.ParseFromString(data)); - TestUtil::ExpectPackedExtensionsSet(destination); -} - -TEST(ExtensionSetTest, IsInitialized) { - // Test that IsInitialized() returns false if required fields in nested - // extensions are missing. - unittest::TestAllExtensions message; - - EXPECT_TRUE(message.IsInitialized()); - - message.MutableExtension(unittest::TestRequired::single); - EXPECT_FALSE(message.IsInitialized()); - - message.MutableExtension(unittest::TestRequired::single)->set_a(1); - EXPECT_FALSE(message.IsInitialized()); - message.MutableExtension(unittest::TestRequired::single)->set_b(2); - EXPECT_FALSE(message.IsInitialized()); - message.MutableExtension(unittest::TestRequired::single)->set_c(3); - EXPECT_TRUE(message.IsInitialized()); - - message.AddExtension(unittest::TestRequired::multi); - EXPECT_FALSE(message.IsInitialized()); - - message.MutableExtension(unittest::TestRequired::multi, 0)->set_a(1); - EXPECT_FALSE(message.IsInitialized()); - message.MutableExtension(unittest::TestRequired::multi, 0)->set_b(2); - EXPECT_FALSE(message.IsInitialized()); - message.MutableExtension(unittest::TestRequired::multi, 0)->set_c(3); - EXPECT_TRUE(message.IsInitialized()); -} - -TEST(ExtensionSetTest, MutableString) { - // Test the mutable string accessors. - unittest::TestAllExtensions message; - - message.MutableExtension(unittest::optional_string_extension)->assign("foo"); - EXPECT_TRUE(message.HasExtension(unittest::optional_string_extension)); - EXPECT_EQ("foo", message.GetExtension(unittest::optional_string_extension)); - - message.AddExtension(unittest::repeated_string_extension)->assign("bar"); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_string_extension)); - EXPECT_EQ("bar", - message.GetExtension(unittest::repeated_string_extension, 0)); -} - -TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { - // Scalar primitive extensions should increase the extension set size by a - // minimum of the size of the primitive type. -#define TEST_SCALAR_EXTENSIONS_SPACE_USED(type, value) \ - do { \ - unittest::TestAllExtensions message; \ - const int base_size = message.SpaceUsed(); \ - message.SetExtension(unittest::optional_##type##_extension, value); \ - int min_expected_size = base_size + \ - sizeof(message.GetExtension(unittest::optional_##type##_extension)); \ - EXPECT_LE(min_expected_size, message.SpaceUsed()); \ - } while (0) - - TEST_SCALAR_EXTENSIONS_SPACE_USED(int32 , 101); - TEST_SCALAR_EXTENSIONS_SPACE_USED(int64 , 102); - TEST_SCALAR_EXTENSIONS_SPACE_USED(uint32 , 103); - TEST_SCALAR_EXTENSIONS_SPACE_USED(uint64 , 104); - TEST_SCALAR_EXTENSIONS_SPACE_USED(sint32 , 105); - TEST_SCALAR_EXTENSIONS_SPACE_USED(sint64 , 106); - TEST_SCALAR_EXTENSIONS_SPACE_USED(fixed32 , 107); - TEST_SCALAR_EXTENSIONS_SPACE_USED(fixed64 , 108); - TEST_SCALAR_EXTENSIONS_SPACE_USED(sfixed32, 109); - TEST_SCALAR_EXTENSIONS_SPACE_USED(sfixed64, 110); - TEST_SCALAR_EXTENSIONS_SPACE_USED(float , 111); - TEST_SCALAR_EXTENSIONS_SPACE_USED(double , 112); - TEST_SCALAR_EXTENSIONS_SPACE_USED(bool , true); -#undef TEST_SCALAR_EXTENSIONS_SPACE_USED - { - unittest::TestAllExtensions message; - const int base_size = message.SpaceUsed(); - message.SetExtension(unittest::optional_nested_enum_extension, - unittest::TestAllTypes::FOO); - int min_expected_size = base_size + - sizeof(message.GetExtension(unittest::optional_nested_enum_extension)); - EXPECT_LE(min_expected_size, message.SpaceUsed()); - } - { - // Strings may cause extra allocations depending on their length; ensure - // that gets included as well. - unittest::TestAllExtensions message; - const int base_size = message.SpaceUsed(); - const string s("this is a fairly large string that will cause some " - "allocation in order to store it in the extension"); - message.SetExtension(unittest::optional_string_extension, s); - int min_expected_size = base_size + s.length(); - EXPECT_LE(min_expected_size, message.SpaceUsed()); - } - { - // Messages also have additional allocation that need to be counted. - unittest::TestAllExtensions message; - const int base_size = message.SpaceUsed(); - unittest::ForeignMessage foreign; - foreign.set_c(42); - message.MutableExtension(unittest::optional_foreign_message_extension)-> - CopyFrom(foreign); - int min_expected_size = base_size + foreign.SpaceUsed(); - EXPECT_LE(min_expected_size, message.SpaceUsed()); - } - - // Repeated primitive extensions will increase space used by at least a - // RepeatedField, and will cause additional allocations when the array - // gets too big for the initial space. - // This macro: - // - Adds a value to the repeated extension, then clears it, establishing - // the base size. - // - Adds a small number of values, testing that it doesn't increase the - // SpaceUsed() - // - Adds a large number of values (requiring allocation in the repeated - // field), and ensures that that allocation is included in SpaceUsed() -#define TEST_REPEATED_EXTENSIONS_SPACE_USED(type, cpptype, value) \ - do { \ - unittest::TestAllExtensions message; \ - const int base_size = message.SpaceUsed(); \ - int min_expected_size = sizeof(RepeatedField) + base_size; \ - message.AddExtension(unittest::repeated_##type##_extension, value); \ - message.ClearExtension(unittest::repeated_##type##_extension); \ - const int empty_repeated_field_size = message.SpaceUsed(); \ - EXPECT_LE(min_expected_size, empty_repeated_field_size) << #type; \ - message.AddExtension(unittest::repeated_##type##_extension, value); \ - message.AddExtension(unittest::repeated_##type##_extension, value); \ - EXPECT_EQ(empty_repeated_field_size, message.SpaceUsed()) << #type; \ - message.ClearExtension(unittest::repeated_##type##_extension); \ - for (int i = 0; i < 16; ++i) { \ - message.AddExtension(unittest::repeated_##type##_extension, value); \ - } \ - int expected_size = sizeof(cpptype) * 16 + empty_repeated_field_size; \ - EXPECT_EQ(expected_size, message.SpaceUsed()) << #type; \ - } while (0) - - TEST_REPEATED_EXTENSIONS_SPACE_USED(int32 , int32 , 101); - TEST_REPEATED_EXTENSIONS_SPACE_USED(int64 , int64 , 102); - TEST_REPEATED_EXTENSIONS_SPACE_USED(uint32 , uint32, 103); - TEST_REPEATED_EXTENSIONS_SPACE_USED(uint64 , uint64, 104); - TEST_REPEATED_EXTENSIONS_SPACE_USED(sint32 , int32 , 105); - TEST_REPEATED_EXTENSIONS_SPACE_USED(sint64 , int64 , 106); - TEST_REPEATED_EXTENSIONS_SPACE_USED(fixed32 , uint32, 107); - TEST_REPEATED_EXTENSIONS_SPACE_USED(fixed64 , uint64, 108); - TEST_REPEATED_EXTENSIONS_SPACE_USED(sfixed32, int32 , 109); - TEST_REPEATED_EXTENSIONS_SPACE_USED(sfixed64, int64 , 110); - TEST_REPEATED_EXTENSIONS_SPACE_USED(float , float , 111); - TEST_REPEATED_EXTENSIONS_SPACE_USED(double , double, 112); - TEST_REPEATED_EXTENSIONS_SPACE_USED(bool , bool , true); - TEST_REPEATED_EXTENSIONS_SPACE_USED(nested_enum, int, - unittest::TestAllTypes::FOO); -#undef TEST_REPEATED_EXTENSIONS_SPACE_USED - // Repeated strings - { - unittest::TestAllExtensions message; - const int base_size = message.SpaceUsed(); - int min_expected_size = sizeof(RepeatedPtrField) + base_size; - const string value(256, 'x'); - // Once items are allocated, they may stick around even when cleared so - // without the hardcore memory management accessors there isn't a notion of - // the empty repeated field memory usage as there is with primitive types. - for (int i = 0; i < 16; ++i) { - message.AddExtension(unittest::repeated_string_extension, value); - } - min_expected_size += (sizeof(value) + value.size()) * 16; - EXPECT_LE(min_expected_size, message.SpaceUsed()); - } - // Repeated messages - { - unittest::TestAllExtensions message; - const int base_size = message.SpaceUsed(); - int min_expected_size = sizeof(RepeatedPtrField) + - base_size; - unittest::ForeignMessage prototype; - prototype.set_c(2); - for (int i = 0; i < 16; ++i) { - message.AddExtension(unittest::repeated_foreign_message_extension)-> - CopyFrom(prototype); - } - min_expected_size += 16 * prototype.SpaceUsed(); - EXPECT_LE(min_expected_size, message.SpaceUsed()); - } -} - -#ifdef GTEST_HAS_DEATH_TEST - -TEST(ExtensionSetTest, InvalidEnumDeath) { - unittest::TestAllExtensions message; - EXPECT_DEBUG_DEATH( - message.SetExtension(unittest::optional_foreign_enum_extension, - static_cast(53)), - "IsValid"); -} - -#endif // GTEST_HAS_DEATH_TEST - -TEST(ExtensionSetTest, DynamicExtensions) { - // Test adding a dynamic extension to a compiled-in message object. - - FileDescriptorProto dynamic_proto; - dynamic_proto.set_name("dynamic_extensions_test.proto"); - dynamic_proto.add_dependency( - unittest::TestAllExtensions::descriptor()->file()->name()); - dynamic_proto.set_package("dynamic_extensions"); - - // Copy the fields and nested types from TestDynamicExtensions into our new - // proto, converting the fields into extensions. - const Descriptor* template_descriptor = - unittest::TestDynamicExtensions::descriptor(); - DescriptorProto template_descriptor_proto; - template_descriptor->CopyTo(&template_descriptor_proto); - dynamic_proto.mutable_message_type()->MergeFrom( - template_descriptor_proto.nested_type()); - dynamic_proto.mutable_enum_type()->MergeFrom( - template_descriptor_proto.enum_type()); - dynamic_proto.mutable_extension()->MergeFrom( - template_descriptor_proto.field()); - - // For each extension that we added... - for (int i = 0; i < dynamic_proto.extension_size(); i++) { - // Set its extendee to TestAllExtensions. - FieldDescriptorProto* extension = dynamic_proto.mutable_extension(i); - extension->set_extendee( - unittest::TestAllExtensions::descriptor()->full_name()); - - // If the field refers to one of the types nested in TestDynamicExtensions, - // make it refer to the type in our dynamic proto instead. - string prefix = "." + template_descriptor->full_name() + "."; - if (extension->has_type_name()) { - string* type_name = extension->mutable_type_name(); - if (HasPrefixString(*type_name, prefix)) { - type_name->replace(0, prefix.size(), ".dynamic_extensions."); - } - } - } - - // Now build the file, using the generated pool as an underlay. - DescriptorPool dynamic_pool(DescriptorPool::generated_pool()); - const FileDescriptor* file = dynamic_pool.BuildFile(dynamic_proto); - ASSERT_TRUE(file != NULL); - DynamicMessageFactory dynamic_factory(&dynamic_pool); - dynamic_factory.SetDelegateToGeneratedFactory(true); - - // Construct a message that we can parse with the extensions we defined. - // Since the extensions were based off of the fields of TestDynamicExtensions, - // we can use that message to create this test message. - string data; - { - unittest::TestDynamicExtensions message; - message.set_scalar_extension(123); - message.set_enum_extension(unittest::FOREIGN_BAR); - message.set_dynamic_enum_extension( - unittest::TestDynamicExtensions::DYNAMIC_BAZ); - message.mutable_message_extension()->set_c(456); - message.mutable_dynamic_message_extension()->set_dynamic_field(789); - message.add_repeated_extension("foo"); - message.add_repeated_extension("bar"); - message.add_packed_extension(12); - message.add_packed_extension(-34); - message.add_packed_extension(56); - message.add_packed_extension(-78); - - // Also add some unknown fields. - - // An unknown enum value (for a known field). - message.mutable_unknown_fields()->AddVarint( - unittest::TestDynamicExtensions::kDynamicEnumExtensionFieldNumber, - 12345); - // A regular unknown field. - message.mutable_unknown_fields()->AddLengthDelimited(54321, "unknown"); - - message.SerializeToString(&data); - } - - // Now we can parse this using our dynamic extension definitions... - unittest::TestAllExtensions message; - { - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetExtensionRegistry(&dynamic_pool, &dynamic_factory); - ASSERT_TRUE(message.ParseFromCodedStream(&input)); - ASSERT_TRUE(input.ConsumedEntireMessage()); - } - - // Can we print it? - EXPECT_EQ( - "[dynamic_extensions.scalar_extension]: 123\n" - "[dynamic_extensions.enum_extension]: FOREIGN_BAR\n" - "[dynamic_extensions.dynamic_enum_extension]: DYNAMIC_BAZ\n" - "[dynamic_extensions.message_extension] {\n" - " c: 456\n" - "}\n" - "[dynamic_extensions.dynamic_message_extension] {\n" - " dynamic_field: 789\n" - "}\n" - "[dynamic_extensions.repeated_extension]: \"foo\"\n" - "[dynamic_extensions.repeated_extension]: \"bar\"\n" - "[dynamic_extensions.packed_extension]: 12\n" - "[dynamic_extensions.packed_extension]: -34\n" - "[dynamic_extensions.packed_extension]: 56\n" - "[dynamic_extensions.packed_extension]: -78\n" - "2002: 12345\n" - "54321: \"unknown\"\n", - message.DebugString()); - - // Can we serialize it? - // (Don't use EXPECT_EQ because we don't want to dump raw binary data to the - // terminal on failure.) - EXPECT_TRUE(message.SerializeAsString() == data); - - // What if we parse using the reflection-based parser? - { - unittest::TestAllExtensions message2; - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetExtensionRegistry(&dynamic_pool, &dynamic_factory); - ASSERT_TRUE(WireFormat::ParseAndMergePartial(&input, &message2)); - ASSERT_TRUE(input.ConsumedEntireMessage()); - EXPECT_EQ(message.DebugString(), message2.DebugString()); - } - - // Are the embedded generated types actually using the generated objects? - { - const FieldDescriptor* message_extension = - file->FindExtensionByName("message_extension"); - ASSERT_TRUE(message_extension != NULL); - const Message& sub_message = - message.GetReflection()->GetMessage(message, message_extension); - const unittest::ForeignMessage* typed_sub_message = - dynamic_cast(&sub_message); - ASSERT_TRUE(typed_sub_message != NULL); - EXPECT_EQ(456, typed_sub_message->c()); - } - - // What does GetMessage() return for the embedded dynamic type if it isn't - // present? - { - const FieldDescriptor* dynamic_message_extension = - file->FindExtensionByName("dynamic_message_extension"); - ASSERT_TRUE(dynamic_message_extension != NULL); - const Message& parent = unittest::TestAllExtensions::default_instance(); - const Message& sub_message = - parent.GetReflection()->GetMessage(parent, dynamic_message_extension, - &dynamic_factory); - const Message* prototype = - dynamic_factory.GetPrototype(dynamic_message_extension->message_type()); - EXPECT_EQ(prototype, &sub_message); - } -} - -} // namespace -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc deleted file mode 100644 index a0dd75c6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc +++ /dev/null @@ -1,1228 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { - -int StringSpaceUsedExcludingSelf(const string& str) { - const void* start = &str; - const void* end = &str + 1; - - if (start <= str.data() && str.data() <= end) { - // The string's data is stored inside the string object itself. - return 0; - } else { - return str.capacity(); - } -} - -bool ParseNamedEnum(const EnumDescriptor* descriptor, - const string& name, - int* value) { - const EnumValueDescriptor* d = descriptor->FindValueByName(name); - if (d == NULL) return false; - *value = d->number(); - return true; -} - -const string& NameOfEnum(const EnumDescriptor* descriptor, int value) { - const EnumValueDescriptor* d = descriptor->FindValueByNumber(value); - return (d == NULL ? kEmptyString : d->name()); -} - -// =================================================================== -// Helpers for reporting usage errors (e.g. trying to use GetInt32() on -// a string field). - -namespace { - -void ReportReflectionUsageError( - const Descriptor* descriptor, const FieldDescriptor* field, - const char* method, const char* description) { - GOOGLE_LOG(FATAL) - << "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::" << method << "\n" - " Message type: " << descriptor->full_name() << "\n" - " Field : " << field->full_name() << "\n" - " Problem : " << description; -} - -const char* cpptype_names_[FieldDescriptor::MAX_CPPTYPE + 1] = { - "INVALID_CPPTYPE", - "CPPTYPE_INT32", - "CPPTYPE_INT64", - "CPPTYPE_UINT32", - "CPPTYPE_UINT64", - "CPPTYPE_DOUBLE", - "CPPTYPE_FLOAT", - "CPPTYPE_BOOL", - "CPPTYPE_ENUM", - "CPPTYPE_STRING", - "CPPTYPE_MESSAGE" -}; - -static void ReportReflectionUsageTypeError( - const Descriptor* descriptor, const FieldDescriptor* field, - const char* method, - FieldDescriptor::CppType expected_type) { - GOOGLE_LOG(FATAL) - << "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::" << method << "\n" - " Message type: " << descriptor->full_name() << "\n" - " Field : " << field->full_name() << "\n" - " Problem : Field is not the right type for this message:\n" - " Expected : " << cpptype_names_[expected_type] << "\n" - " Field type: " << cpptype_names_[field->cpp_type()]; -} - -static void ReportReflectionUsageEnumTypeError( - const Descriptor* descriptor, const FieldDescriptor* field, - const char* method, const EnumValueDescriptor* value) { - GOOGLE_LOG(FATAL) - << "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::" << method << "\n" - " Message type: " << descriptor->full_name() << "\n" - " Field : " << field->full_name() << "\n" - " Problem : Enum value did not match field type:\n" - " Expected : " << field->enum_type()->full_name() << "\n" - " Actual : " << value->full_name(); -} - -#define USAGE_CHECK(CONDITION, METHOD, ERROR_DESCRIPTION) \ - if (!(CONDITION)) \ - ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION) -#define USAGE_CHECK_EQ(A, B, METHOD, ERROR_DESCRIPTION) \ - USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION) -#define USAGE_CHECK_NE(A, B, METHOD, ERROR_DESCRIPTION) \ - USAGE_CHECK((A) != (B), METHOD, ERROR_DESCRIPTION) - -#define USAGE_CHECK_TYPE(METHOD, CPPTYPE) \ - if (field->cpp_type() != FieldDescriptor::CPPTYPE_##CPPTYPE) \ - ReportReflectionUsageTypeError(descriptor_, field, #METHOD, \ - FieldDescriptor::CPPTYPE_##CPPTYPE) - -#define USAGE_CHECK_ENUM_VALUE(METHOD) \ - if (value->type() != field->enum_type()) \ - ReportReflectionUsageEnumTypeError(descriptor_, field, #METHOD, value) - -#define USAGE_CHECK_MESSAGE_TYPE(METHOD) \ - USAGE_CHECK_EQ(field->containing_type(), descriptor_, \ - METHOD, "Field does not match message type."); -#define USAGE_CHECK_SINGULAR(METHOD) \ - USAGE_CHECK_NE(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \ - "Field is repeated; the method requires a singular field.") -#define USAGE_CHECK_REPEATED(METHOD) \ - USAGE_CHECK_EQ(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \ - "Field is singular; the method requires a repeated field.") - -#define USAGE_CHECK_ALL(METHOD, LABEL, CPPTYPE) \ - USAGE_CHECK_MESSAGE_TYPE(METHOD); \ - USAGE_CHECK_##LABEL(METHOD); \ - USAGE_CHECK_TYPE(METHOD, CPPTYPE) - -} // namespace - -// =================================================================== - -GeneratedMessageReflection::GeneratedMessageReflection( - const Descriptor* descriptor, - const Message* default_instance, - const int offsets[], - int has_bits_offset, - int unknown_fields_offset, - int extensions_offset, - const DescriptorPool* descriptor_pool, - MessageFactory* factory, - int object_size) - : descriptor_ (descriptor), - default_instance_ (default_instance), - offsets_ (offsets), - has_bits_offset_ (has_bits_offset), - unknown_fields_offset_(unknown_fields_offset), - extensions_offset_(extensions_offset), - object_size_ (object_size), - descriptor_pool_ ((descriptor_pool == NULL) ? - DescriptorPool::generated_pool() : - descriptor_pool), - message_factory_ (factory) { -} - -GeneratedMessageReflection::~GeneratedMessageReflection() {} - -const UnknownFieldSet& GeneratedMessageReflection::GetUnknownFields( - const Message& message) const { - const void* ptr = reinterpret_cast(&message) + - unknown_fields_offset_; - return *reinterpret_cast(ptr); -} -UnknownFieldSet* GeneratedMessageReflection::MutableUnknownFields( - Message* message) const { - void* ptr = reinterpret_cast(message) + unknown_fields_offset_; - return reinterpret_cast(ptr); -} - -int GeneratedMessageReflection::SpaceUsed(const Message& message) const { - // object_size_ already includes the in-memory representation of each field - // in the message, so we only need to account for additional memory used by - // the fields. - int total_size = object_size_; - - total_size += GetUnknownFields(message).SpaceUsedExcludingSelf(); - - if (extensions_offset_ != -1) { - total_size += GetExtensionSet(message).SpaceUsedExcludingSelf(); - } - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - - if (field->is_repeated()) { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - total_size += GetRaw >(message, field) \ - .SpaceUsedExcludingSelf(); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - total_size += GetRaw >(message, field) - .SpaceUsedExcludingSelf(); - break; - } - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: - // We don't know which subclass of RepeatedPtrFieldBase the type is, - // so we use RepeatedPtrFieldBase directly. - total_size += - GetRaw(message, field) - .SpaceUsedExcludingSelf >(); - break; - } - } else { - switch (field->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32 : - case FieldDescriptor::CPPTYPE_INT64 : - case FieldDescriptor::CPPTYPE_UINT32: - case FieldDescriptor::CPPTYPE_UINT64: - case FieldDescriptor::CPPTYPE_DOUBLE: - case FieldDescriptor::CPPTYPE_FLOAT : - case FieldDescriptor::CPPTYPE_BOOL : - case FieldDescriptor::CPPTYPE_ENUM : - // Field is inline, so we've already counted it. - break; - - case FieldDescriptor::CPPTYPE_STRING: { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: { - const string* ptr = GetField(message, field); - - // Initially, the string points to the default value stored in - // the prototype. Only count the string if it has been changed - // from the default value. - const string* default_ptr = DefaultRaw(field); - - if (ptr != default_ptr) { - // string fields are represented by just a pointer, so also - // include sizeof(string) as well. - total_size += sizeof(*ptr) + StringSpaceUsedExcludingSelf(*ptr); - } - break; - } - } - break; - } - - case FieldDescriptor::CPPTYPE_MESSAGE: - if (&message == default_instance_) { - // For singular fields, the prototype just stores a pointer to the - // external type's prototype, so there is no extra memory usage. - } else { - const Message* sub_message = GetRaw(message, field); - if (sub_message != NULL) { - total_size += sub_message->SpaceUsed(); - } - } - break; - } - } - } - - return total_size; -} - -void GeneratedMessageReflection::Swap( - Message* message1, - Message* message2) const { - if (message1 == message2) return; - - // TODO(kenton): Other Reflection methods should probably check this too. - GOOGLE_CHECK_EQ(message1->GetReflection(), this) - << "First argument to Swap() (of type \"" - << message1->GetDescriptor()->full_name() - << "\") is not compatible with this reflection object (which is for type \"" - << descriptor_->full_name() - << "\"). Note that the exact same class is required; not just the same " - "descriptor."; - GOOGLE_CHECK_EQ(message2->GetReflection(), this) - << "Second argument to Swap() (of type \"" - << message1->GetDescriptor()->full_name() - << "\") is not compatible with this reflection object (which is for type \"" - << descriptor_->full_name() - << "\"). Note that the exact same class is required; not just the same " - "descriptor."; - - uint32* has_bits1 = MutableHasBits(message1); - uint32* has_bits2 = MutableHasBits(message2); - int has_bits_size = (descriptor_->field_count() + 31) / 32; - - for (int i = 0; i < has_bits_size; i++) { - std::swap(has_bits1[i], has_bits2[i]); - } - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (field->is_repeated()) { - switch (field->cpp_type()) { -#define SWAP_ARRAYS(CPPTYPE, TYPE) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - MutableRaw >(message1, field)->Swap( \ - MutableRaw >(message2, field)); \ - break; - - SWAP_ARRAYS(INT32 , int32 ); - SWAP_ARRAYS(INT64 , int64 ); - SWAP_ARRAYS(UINT32, uint32); - SWAP_ARRAYS(UINT64, uint64); - SWAP_ARRAYS(FLOAT , float ); - SWAP_ARRAYS(DOUBLE, double); - SWAP_ARRAYS(BOOL , bool ); - SWAP_ARRAYS(ENUM , int ); -#undef SWAP_ARRAYS - - case FieldDescriptor::CPPTYPE_STRING: - case FieldDescriptor::CPPTYPE_MESSAGE: - MutableRaw(message1, field)->Swap( - MutableRaw(message2, field)); - break; - - default: - GOOGLE_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); - } - } else { - switch (field->cpp_type()) { -#define SWAP_VALUES(CPPTYPE, TYPE) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - std::swap(*MutableRaw(message1, field), \ - *MutableRaw(message2, field)); \ - break; - - SWAP_VALUES(INT32 , int32 ); - SWAP_VALUES(INT64 , int64 ); - SWAP_VALUES(UINT32, uint32); - SWAP_VALUES(UINT64, uint64); - SWAP_VALUES(FLOAT , float ); - SWAP_VALUES(DOUBLE, double); - SWAP_VALUES(BOOL , bool ); - SWAP_VALUES(ENUM , int ); - SWAP_VALUES(MESSAGE, Message*); -#undef SWAP_VALUES - - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - std::swap(*MutableRaw(message1, field), - *MutableRaw(message2, field)); - break; - } - break; - - default: - GOOGLE_LOG(FATAL) << "Unimplemented type: " << field->cpp_type(); - } - } - } - - if (extensions_offset_ != -1) { - MutableExtensionSet(message1)->Swap(MutableExtensionSet(message2)); - } - - MutableUnknownFields(message1)->Swap(MutableUnknownFields(message2)); -} - -// ------------------------------------------------------------------- - -bool GeneratedMessageReflection::HasField(const Message& message, - const FieldDescriptor* field) const { - USAGE_CHECK_MESSAGE_TYPE(HasField); - USAGE_CHECK_SINGULAR(HasField); - - if (field->is_extension()) { - return GetExtensionSet(message).Has(field->number()); - } else { - return HasBit(message, field); - } -} - -int GeneratedMessageReflection::FieldSize(const Message& message, - const FieldDescriptor* field) const { - USAGE_CHECK_MESSAGE_TYPE(FieldSize); - USAGE_CHECK_REPEATED(FieldSize); - - if (field->is_extension()) { - return GetExtensionSet(message).ExtensionSize(field->number()); - } else { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - return GetRaw >(message, field).size() - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: - case FieldDescriptor::CPPTYPE_MESSAGE: - return GetRaw(message, field).size(); - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return 0; - } -} - -void GeneratedMessageReflection::ClearField( - Message* message, const FieldDescriptor* field) const { - USAGE_CHECK_MESSAGE_TYPE(ClearField); - - if (field->is_extension()) { - MutableExtensionSet(message)->ClearExtension(field->number()); - } else if (!field->is_repeated()) { - if (HasBit(*message, field)) { - ClearBit(message, field); - - // We need to set the field back to its default value. - switch (field->cpp_type()) { -#define CLEAR_TYPE(CPPTYPE, TYPE) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - *MutableRaw(message, field) = \ - field->default_value_##TYPE(); \ - break; - - CLEAR_TYPE(INT32 , int32 ); - CLEAR_TYPE(INT64 , int64 ); - CLEAR_TYPE(UINT32, uint32); - CLEAR_TYPE(UINT64, uint64); - CLEAR_TYPE(FLOAT , float ); - CLEAR_TYPE(DOUBLE, double); - CLEAR_TYPE(BOOL , bool ); -#undef CLEAR_TYPE - - case FieldDescriptor::CPPTYPE_ENUM: - *MutableRaw(message, field) = - field->default_value_enum()->number(); - break; - - case FieldDescriptor::CPPTYPE_STRING: { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - const string* default_ptr = DefaultRaw(field); - string** value = MutableRaw(message, field); - if (*value != default_ptr) { - if (field->has_default_value()) { - (*value)->assign(field->default_value_string()); - } else { - (*value)->clear(); - } - } - break; - } - break; - } - - case FieldDescriptor::CPPTYPE_MESSAGE: - (*MutableRaw(message, field))->Clear(); - break; - } - } - } else { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - MutableRaw >(message, field)->Clear(); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - MutableRaw >(message, field)->Clear(); - break; - } - break; - } - - case FieldDescriptor::CPPTYPE_MESSAGE: { - // We don't know which subclass of RepeatedPtrFieldBase the type is, - // so we use RepeatedPtrFieldBase directly. - MutableRaw(message, field) - ->Clear >(); - break; - } - } - } -} - -void GeneratedMessageReflection::RemoveLast( - Message* message, - const FieldDescriptor* field) const { - USAGE_CHECK_MESSAGE_TYPE(RemoveLast); - USAGE_CHECK_REPEATED(RemoveLast); - - if (field->is_extension()) { - MutableExtensionSet(message)->RemoveLast(field->number()); - } else { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - MutableRaw >(message, field)->RemoveLast(); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - MutableRaw >(message, field)->RemoveLast(); - break; - } - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: - MutableRaw(message, field) - ->RemoveLast >(); - break; - } - } -} - -void GeneratedMessageReflection::SwapElements( - Message* message, - const FieldDescriptor* field, - int index1, - int index2) const { - USAGE_CHECK_MESSAGE_TYPE(Swap); - USAGE_CHECK_REPEATED(Swap); - - if (field->is_extension()) { - MutableExtensionSet(message)->SwapElements(field->number(), index1, index2); - } else { - switch (field->cpp_type()) { -#define HANDLE_TYPE(UPPERCASE, LOWERCASE) \ - case FieldDescriptor::CPPTYPE_##UPPERCASE : \ - MutableRaw >(message, field) \ - ->SwapElements(index1, index2); \ - break - - HANDLE_TYPE( INT32, int32); - HANDLE_TYPE( INT64, int64); - HANDLE_TYPE(UINT32, uint32); - HANDLE_TYPE(UINT64, uint64); - HANDLE_TYPE(DOUBLE, double); - HANDLE_TYPE( FLOAT, float); - HANDLE_TYPE( BOOL, bool); - HANDLE_TYPE( ENUM, int); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_STRING: - case FieldDescriptor::CPPTYPE_MESSAGE: - MutableRaw(message, field) - ->SwapElements(index1, index2); - break; - } - } -} - -namespace { -// Comparison functor for sorting FieldDescriptors by field number. -struct FieldNumberSorter { - bool operator()(const FieldDescriptor* left, - const FieldDescriptor* right) const { - return left->number() < right->number(); - } -}; -} // namespace - -void GeneratedMessageReflection::ListFields( - const Message& message, - vector* output) const { - output->clear(); - - // Optimization: The default instance never has any fields set. - if (&message == default_instance_) return; - - for (int i = 0; i < descriptor_->field_count(); i++) { - const FieldDescriptor* field = descriptor_->field(i); - if (field->is_repeated()) { - if (FieldSize(message, field) > 0) { - output->push_back(field); - } - } else { - if (HasBit(message, field)) { - output->push_back(field); - } - } - } - - if (extensions_offset_ != -1) { - GetExtensionSet(message).AppendToList(descriptor_, descriptor_pool_, - output); - } - - // ListFields() must sort output by field number. - sort(output->begin(), output->end(), FieldNumberSorter()); -} - -// ------------------------------------------------------------------- - -#undef DEFINE_PRIMITIVE_ACCESSORS -#define DEFINE_PRIMITIVE_ACCESSORS(TYPENAME, TYPE, PASSTYPE, CPPTYPE) \ - PASSTYPE GeneratedMessageReflection::Get##TYPENAME( \ - const Message& message, const FieldDescriptor* field) const { \ - USAGE_CHECK_ALL(Get##TYPENAME, SINGULAR, CPPTYPE); \ - if (field->is_extension()) { \ - return GetExtensionSet(message).Get##TYPENAME( \ - field->number(), field->default_value_##PASSTYPE()); \ - } else { \ - return GetField(message, field); \ - } \ - } \ - \ - void GeneratedMessageReflection::Set##TYPENAME( \ - Message* message, const FieldDescriptor* field, \ - PASSTYPE value) const { \ - USAGE_CHECK_ALL(Set##TYPENAME, SINGULAR, CPPTYPE); \ - if (field->is_extension()) { \ - return MutableExtensionSet(message)->Set##TYPENAME( \ - field->number(), field->type(), value, field); \ - } else { \ - SetField(message, field, value); \ - } \ - } \ - \ - PASSTYPE GeneratedMessageReflection::GetRepeated##TYPENAME( \ - const Message& message, \ - const FieldDescriptor* field, int index) const { \ - USAGE_CHECK_ALL(GetRepeated##TYPENAME, REPEATED, CPPTYPE); \ - if (field->is_extension()) { \ - return GetExtensionSet(message).GetRepeated##TYPENAME( \ - field->number(), index); \ - } else { \ - return GetRepeatedField(message, field, index); \ - } \ - } \ - \ - void GeneratedMessageReflection::SetRepeated##TYPENAME( \ - Message* message, const FieldDescriptor* field, \ - int index, PASSTYPE value) const { \ - USAGE_CHECK_ALL(SetRepeated##TYPENAME, REPEATED, CPPTYPE); \ - if (field->is_extension()) { \ - MutableExtensionSet(message)->SetRepeated##TYPENAME( \ - field->number(), index, value); \ - } else { \ - SetRepeatedField(message, field, index, value); \ - } \ - } \ - \ - void GeneratedMessageReflection::Add##TYPENAME( \ - Message* message, const FieldDescriptor* field, \ - PASSTYPE value) const { \ - USAGE_CHECK_ALL(Add##TYPENAME, REPEATED, CPPTYPE); \ - if (field->is_extension()) { \ - MutableExtensionSet(message)->Add##TYPENAME( \ - field->number(), field->type(), field->options().packed(), value, \ - field); \ - } else { \ - AddField(message, field, value); \ - } \ - } - -DEFINE_PRIMITIVE_ACCESSORS(Int32 , int32 , int32 , INT32 ) -DEFINE_PRIMITIVE_ACCESSORS(Int64 , int64 , int64 , INT64 ) -DEFINE_PRIMITIVE_ACCESSORS(UInt32, uint32, uint32, UINT32) -DEFINE_PRIMITIVE_ACCESSORS(UInt64, uint64, uint64, UINT64) -DEFINE_PRIMITIVE_ACCESSORS(Float , float , float , FLOAT ) -DEFINE_PRIMITIVE_ACCESSORS(Double, double, double, DOUBLE) -DEFINE_PRIMITIVE_ACCESSORS(Bool , bool , bool , BOOL ) -#undef DEFINE_PRIMITIVE_ACCESSORS - -// ------------------------------------------------------------------- - -string GeneratedMessageReflection::GetString( - const Message& message, const FieldDescriptor* field) const { - USAGE_CHECK_ALL(GetString, SINGULAR, STRING); - if (field->is_extension()) { - return GetExtensionSet(message).GetString(field->number(), - field->default_value_string()); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return *GetField(message, field); - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return kEmptyString; // Make compiler happy. - } -} - -const string& GeneratedMessageReflection::GetStringReference( - const Message& message, - const FieldDescriptor* field, string* scratch) const { - USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING); - if (field->is_extension()) { - return GetExtensionSet(message).GetString(field->number(), - field->default_value_string()); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return *GetField(message, field); - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return kEmptyString; // Make compiler happy. - } -} - - -void GeneratedMessageReflection::SetString( - Message* message, const FieldDescriptor* field, - const string& value) const { - USAGE_CHECK_ALL(SetString, SINGULAR, STRING); - if (field->is_extension()) { - return MutableExtensionSet(message)->SetString(field->number(), - field->type(), value, field); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: { - string** ptr = MutableField(message, field); - if (*ptr == DefaultRaw(field)) { - *ptr = new string(value); - } else { - (*ptr)->assign(value); - } - break; - } - } - } -} - - -string GeneratedMessageReflection::GetRepeatedString( - const Message& message, const FieldDescriptor* field, int index) const { - USAGE_CHECK_ALL(GetRepeatedString, REPEATED, STRING); - if (field->is_extension()) { - return GetExtensionSet(message).GetRepeatedString(field->number(), index); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return GetRepeatedPtrField(message, field, index); - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return kEmptyString; // Make compiler happy. - } -} - -const string& GeneratedMessageReflection::GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, - int index, string* scratch) const { - USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING); - if (field->is_extension()) { - return GetExtensionSet(message).GetRepeatedString(field->number(), index); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - return GetRepeatedPtrField(message, field, index); - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return kEmptyString; // Make compiler happy. - } -} - - -void GeneratedMessageReflection::SetRepeatedString( - Message* message, const FieldDescriptor* field, - int index, const string& value) const { - USAGE_CHECK_ALL(SetRepeatedString, REPEATED, STRING); - if (field->is_extension()) { - MutableExtensionSet(message)->SetRepeatedString( - field->number(), index, value); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - *MutableRepeatedField(message, field, index) = value; - break; - } - } -} - - -void GeneratedMessageReflection::AddString( - Message* message, const FieldDescriptor* field, - const string& value) const { - USAGE_CHECK_ALL(AddString, REPEATED, STRING); - if (field->is_extension()) { - MutableExtensionSet(message)->AddString(field->number(), - field->type(), value, field); - } else { - switch (field->options().ctype()) { - default: // TODO(kenton): Support other string reps. - case FieldOptions::STRING: - *AddField(message, field) = value; - break; - } - } -} - - -// ------------------------------------------------------------------- - -const EnumValueDescriptor* GeneratedMessageReflection::GetEnum( - const Message& message, const FieldDescriptor* field) const { - USAGE_CHECK_ALL(GetEnum, SINGULAR, ENUM); - - int value; - if (field->is_extension()) { - value = GetExtensionSet(message).GetEnum( - field->number(), field->default_value_enum()->number()); - } else { - value = GetField(message, field); - } - const EnumValueDescriptor* result = - field->enum_type()->FindValueByNumber(value); - GOOGLE_CHECK(result != NULL); - return result; -} - -void GeneratedMessageReflection::SetEnum( - Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const { - USAGE_CHECK_ALL(SetEnum, SINGULAR, ENUM); - USAGE_CHECK_ENUM_VALUE(SetEnum); - - if (field->is_extension()) { - MutableExtensionSet(message)->SetEnum(field->number(), field->type(), - value->number(), field); - } else { - SetField(message, field, value->number()); - } -} - -const EnumValueDescriptor* GeneratedMessageReflection::GetRepeatedEnum( - const Message& message, const FieldDescriptor* field, int index) const { - USAGE_CHECK_ALL(GetRepeatedEnum, REPEATED, ENUM); - - int value; - if (field->is_extension()) { - value = GetExtensionSet(message).GetRepeatedEnum(field->number(), index); - } else { - value = GetRepeatedField(message, field, index); - } - const EnumValueDescriptor* result = - field->enum_type()->FindValueByNumber(value); - GOOGLE_CHECK(result != NULL); - return result; -} - -void GeneratedMessageReflection::SetRepeatedEnum( - Message* message, - const FieldDescriptor* field, int index, - const EnumValueDescriptor* value) const { - USAGE_CHECK_ALL(SetRepeatedEnum, REPEATED, ENUM); - USAGE_CHECK_ENUM_VALUE(SetRepeatedEnum); - - if (field->is_extension()) { - MutableExtensionSet(message)->SetRepeatedEnum( - field->number(), index, value->number()); - } else { - SetRepeatedField(message, field, index, value->number()); - } -} - -void GeneratedMessageReflection::AddEnum( - Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const { - USAGE_CHECK_ALL(AddEnum, REPEATED, ENUM); - USAGE_CHECK_ENUM_VALUE(AddEnum); - - if (field->is_extension()) { - MutableExtensionSet(message)->AddEnum(field->number(), field->type(), - field->options().packed(), - value->number(), field); - } else { - AddField(message, field, value->number()); - } -} - -// ------------------------------------------------------------------- - -const Message& GeneratedMessageReflection::GetMessage( - const Message& message, const FieldDescriptor* field, - MessageFactory* factory) const { - USAGE_CHECK_ALL(GetMessage, SINGULAR, MESSAGE); - - if (field->is_extension()) { - return static_cast( - GetExtensionSet(message).GetMessage( - field->number(), field->message_type(), - factory == NULL ? message_factory_ : factory)); - } else { - const Message* result = GetRaw(message, field); - if (result == NULL) { - result = DefaultRaw(field); - } - return *result; - } -} - -Message* GeneratedMessageReflection::MutableMessage( - Message* message, const FieldDescriptor* field, - MessageFactory* factory) const { - USAGE_CHECK_ALL(MutableMessage, SINGULAR, MESSAGE); - - if (field->is_extension()) { - return static_cast( - MutableExtensionSet(message)->MutableMessage(field, - factory == NULL ? message_factory_ : factory)); - } else { - Message** result = MutableField(message, field); - if (*result == NULL) { - const Message* default_message = DefaultRaw(field); - *result = default_message->New(); - } - return *result; - } -} - -const Message& GeneratedMessageReflection::GetRepeatedMessage( - const Message& message, const FieldDescriptor* field, int index) const { - USAGE_CHECK_ALL(GetRepeatedMessage, REPEATED, MESSAGE); - - if (field->is_extension()) { - return static_cast( - GetExtensionSet(message).GetRepeatedMessage(field->number(), index)); - } else { - return GetRaw(message, field) - .Get >(index); - } -} - -Message* GeneratedMessageReflection::MutableRepeatedMessage( - Message* message, const FieldDescriptor* field, int index) const { - USAGE_CHECK_ALL(MutableRepeatedMessage, REPEATED, MESSAGE); - - if (field->is_extension()) { - return static_cast( - MutableExtensionSet(message)->MutableRepeatedMessage( - field->number(), index)); - } else { - return MutableRaw(message, field) - ->Mutable >(index); - } -} - -Message* GeneratedMessageReflection::AddMessage( - Message* message, const FieldDescriptor* field, - MessageFactory* factory) const { - USAGE_CHECK_ALL(AddMessage, REPEATED, MESSAGE); - - if (factory == NULL) factory = message_factory_; - - if (field->is_extension()) { - return static_cast( - MutableExtensionSet(message)->AddMessage(field, factory)); - } else { - // We can't use AddField() because RepeatedPtrFieldBase doesn't - // know how to allocate one. - RepeatedPtrFieldBase* repeated = - MutableRaw(message, field); - Message* result = repeated->AddFromCleared >(); - if (result == NULL) { - // We must allocate a new object. - const Message* prototype; - if (repeated->size() == 0) { - prototype = factory->GetPrototype(field->message_type()); - } else { - prototype = &repeated->Get >(0); - } - result = prototype->New(); - repeated->AddAllocated >(result); - } - return result; - } -} - -// ------------------------------------------------------------------- - -const FieldDescriptor* GeneratedMessageReflection::FindKnownExtensionByName( - const string& name) const { - if (extensions_offset_ == -1) return NULL; - - const FieldDescriptor* result = descriptor_pool_->FindExtensionByName(name); - if (result != NULL && result->containing_type() == descriptor_) { - return result; - } - - if (descriptor_->options().message_set_wire_format()) { - // MessageSet extensions may be identified by type name. - const Descriptor* type = descriptor_pool_->FindMessageTypeByName(name); - if (type != NULL) { - // Look for a matching extension in the foreign type's scope. - for (int i = 0; i < type->extension_count(); i++) { - const FieldDescriptor* extension = type->extension(i); - if (extension->containing_type() == descriptor_ && - extension->type() == FieldDescriptor::TYPE_MESSAGE && - extension->is_optional() && - extension->message_type() == type) { - // Found it. - return extension; - } - } - } - } - - return NULL; -} - -const FieldDescriptor* GeneratedMessageReflection::FindKnownExtensionByNumber( - int number) const { - if (extensions_offset_ == -1) return NULL; - return descriptor_pool_->FindExtensionByNumber(descriptor_, number); -} - -// =================================================================== -// Some private helpers. - -// These simple template accessors obtain pointers (or references) to -// the given field. -template -inline const Type& GeneratedMessageReflection::GetRaw( - const Message& message, const FieldDescriptor* field) const { - const void* ptr = reinterpret_cast(&message) + - offsets_[field->index()]; - return *reinterpret_cast(ptr); -} - -template -inline Type* GeneratedMessageReflection::MutableRaw( - Message* message, const FieldDescriptor* field) const { - void* ptr = reinterpret_cast(message) + offsets_[field->index()]; - return reinterpret_cast(ptr); -} - -template -inline const Type& GeneratedMessageReflection::DefaultRaw( - const FieldDescriptor* field) const { - const void* ptr = reinterpret_cast(default_instance_) + - offsets_[field->index()]; - return *reinterpret_cast(ptr); -} - -inline const uint32* GeneratedMessageReflection::GetHasBits( - const Message& message) const { - const void* ptr = reinterpret_cast(&message) + has_bits_offset_; - return reinterpret_cast(ptr); -} -inline uint32* GeneratedMessageReflection::MutableHasBits( - Message* message) const { - void* ptr = reinterpret_cast(message) + has_bits_offset_; - return reinterpret_cast(ptr); -} - -inline const ExtensionSet& GeneratedMessageReflection::GetExtensionSet( - const Message& message) const { - GOOGLE_DCHECK_NE(extensions_offset_, -1); - const void* ptr = reinterpret_cast(&message) + - extensions_offset_; - return *reinterpret_cast(ptr); -} -inline ExtensionSet* GeneratedMessageReflection::MutableExtensionSet( - Message* message) const { - GOOGLE_DCHECK_NE(extensions_offset_, -1); - void* ptr = reinterpret_cast(message) + extensions_offset_; - return reinterpret_cast(ptr); -} - -// Simple accessors for manipulating has_bits_. -inline bool GeneratedMessageReflection::HasBit( - const Message& message, const FieldDescriptor* field) const { - return GetHasBits(message)[field->index() / 32] & - (1 << (field->index() % 32)); -} - -inline void GeneratedMessageReflection::SetBit( - Message* message, const FieldDescriptor* field) const { - MutableHasBits(message)[field->index() / 32] |= (1 << (field->index() % 32)); -} - -inline void GeneratedMessageReflection::ClearBit( - Message* message, const FieldDescriptor* field) const { - MutableHasBits(message)[field->index() / 32] &= ~(1 << (field->index() % 32)); -} - -// Template implementations of basic accessors. Inline because each -// template instance is only called from one location. These are -// used for all types except messages. -template -inline const Type& GeneratedMessageReflection::GetField( - const Message& message, const FieldDescriptor* field) const { - return GetRaw(message, field); -} - -template -inline void GeneratedMessageReflection::SetField( - Message* message, const FieldDescriptor* field, const Type& value) const { - *MutableRaw(message, field) = value; - SetBit(message, field); -} - -template -inline Type* GeneratedMessageReflection::MutableField( - Message* message, const FieldDescriptor* field) const { - SetBit(message, field); - return MutableRaw(message, field); -} - -template -inline const Type& GeneratedMessageReflection::GetRepeatedField( - const Message& message, const FieldDescriptor* field, int index) const { - return GetRaw >(message, field).Get(index); -} - -template -inline const Type& GeneratedMessageReflection::GetRepeatedPtrField( - const Message& message, const FieldDescriptor* field, int index) const { - return GetRaw >(message, field).Get(index); -} - -template -inline void GeneratedMessageReflection::SetRepeatedField( - Message* message, const FieldDescriptor* field, - int index, Type value) const { - MutableRaw >(message, field)->Set(index, value); -} - -template -inline Type* GeneratedMessageReflection::MutableRepeatedField( - Message* message, const FieldDescriptor* field, int index) const { - RepeatedPtrField* repeated = - MutableRaw >(message, field); - return repeated->Mutable(index); -} - -template -inline void GeneratedMessageReflection::AddField( - Message* message, const FieldDescriptor* field, const Type& value) const { - MutableRaw >(message, field)->Add(value); -} - -template -inline Type* GeneratedMessageReflection::AddField( - Message* message, const FieldDescriptor* field) const { - RepeatedPtrField* repeated = - MutableRaw >(message, field); - return repeated->Add(); -} - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.h deleted file mode 100644 index b545fa1a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection.h +++ /dev/null @@ -1,424 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This header is logically internal, but is made public because it is used -// from protocol-compiler-generated code, which may reside in other components. - -#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_REFLECTION_H__ -#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_REFLECTION_H__ - -#include -#include -#include -#include - - -namespace google { -namespace protobuf { - class DescriptorPool; - // Generated code needs these to have been forward-declared. Easier to do it - // here than to print them inside every .pb.h file. - class FileDescriptor; - class EnumDescriptor; -} - -namespace protobuf { -namespace internal { - -// Defined in this file. -class GeneratedMessageReflection; - -// Defined in other files. -class ExtensionSet; // extension_set.h - -// THIS CLASS IS NOT INTENDED FOR DIRECT USE. It is intended for use -// by generated code. This class is just a big hack that reduces code -// size. -// -// A GeneratedMessageReflection is an implementation of Reflection -// which expects all fields to be backed by simple variables located in -// memory. The locations are given using a base pointer and a set of -// offsets. -// -// It is required that the user represents fields of each type in a standard -// way, so that GeneratedMessageReflection can cast the void* pointer to -// the appropriate type. For primitive fields and string fields, each field -// should be represented using the obvious C++ primitive type. Enums and -// Messages are different: -// - Singular Message fields are stored as a pointer to a Message. These -// should start out NULL, except for in the default instance where they -// should start out pointing to other default instances. -// - Enum fields are stored as an int. This int must always contain -// a valid value, such that EnumDescriptor::FindValueByNumber() would -// not return NULL. -// - Repeated fields are stored as RepeatedFields or RepeatedPtrFields -// of whatever type the individual field would be. Strings and -// Messages use RepeatedPtrFields while everything else uses -// RepeatedFields. -class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection { - public: - // Constructs a GeneratedMessageReflection. - // Parameters: - // descriptor: The descriptor for the message type being implemented. - // default_instance: The default instance of the message. This is only - // used to obtain pointers to default instances of embedded - // messages, which GetMessage() will return if the particular - // sub-message has not been initialized yet. (Thus, all - // embedded message fields *must* have non-NULL pointers - // in the default instance.) - // offsets: An array of ints giving the byte offsets, relative to - // the start of the message object, of each field. These can - // be computed at compile time using the - // GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET() macro, defined - // below. - // has_bits_offset: Offset in the message of an array of uint32s of size - // descriptor->field_count()/32, rounded up. This is a - // bitfield where each bit indicates whether or not the - // corresponding field of the message has been initialized. - // The bit for field index i is obtained by the expression: - // has_bits[i / 32] & (1 << (i % 32)) - // unknown_fields_offset: Offset in the message of the UnknownFieldSet for - // the message. - // extensions_offset: Offset in the message of the ExtensionSet for the - // message, or -1 if the message type has no extension - // ranges. - // pool: DescriptorPool to search for extension definitions. Only - // used by FindKnownExtensionByName() and - // FindKnownExtensionByNumber(). - // factory: MessageFactory to use to construct extension messages. - // object_size: The size of a message object of this type, as measured - // by sizeof(). - GeneratedMessageReflection(const Descriptor* descriptor, - const Message* default_instance, - const int offsets[], - int has_bits_offset, - int unknown_fields_offset, - int extensions_offset, - const DescriptorPool* pool, - MessageFactory* factory, - int object_size); - ~GeneratedMessageReflection(); - - // implements Reflection ------------------------------------------- - - const UnknownFieldSet& GetUnknownFields(const Message& message) const; - UnknownFieldSet* MutableUnknownFields(Message* message) const; - - int SpaceUsed(const Message& message) const; - - bool HasField(const Message& message, const FieldDescriptor* field) const; - int FieldSize(const Message& message, const FieldDescriptor* field) const; - void ClearField(Message* message, const FieldDescriptor* field) const; - void RemoveLast(Message* message, const FieldDescriptor* field) const; - void Swap(Message* message1, Message* message2) const; - void SwapElements(Message* message, const FieldDescriptor* field, - int index1, int index2) const; - void ListFields(const Message& message, - vector* output) const; - - int32 GetInt32 (const Message& message, - const FieldDescriptor* field) const; - int64 GetInt64 (const Message& message, - const FieldDescriptor* field) const; - uint32 GetUInt32(const Message& message, - const FieldDescriptor* field) const; - uint64 GetUInt64(const Message& message, - const FieldDescriptor* field) const; - float GetFloat (const Message& message, - const FieldDescriptor* field) const; - double GetDouble(const Message& message, - const FieldDescriptor* field) const; - bool GetBool (const Message& message, - const FieldDescriptor* field) const; - string GetString(const Message& message, - const FieldDescriptor* field) const; - const string& GetStringReference(const Message& message, - const FieldDescriptor* field, - string* scratch) const; - const EnumValueDescriptor* GetEnum(const Message& message, - const FieldDescriptor* field) const; - const Message& GetMessage(const Message& message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const; - - void SetInt32 (Message* message, - const FieldDescriptor* field, int32 value) const; - void SetInt64 (Message* message, - const FieldDescriptor* field, int64 value) const; - void SetUInt32(Message* message, - const FieldDescriptor* field, uint32 value) const; - void SetUInt64(Message* message, - const FieldDescriptor* field, uint64 value) const; - void SetFloat (Message* message, - const FieldDescriptor* field, float value) const; - void SetDouble(Message* message, - const FieldDescriptor* field, double value) const; - void SetBool (Message* message, - const FieldDescriptor* field, bool value) const; - void SetString(Message* message, - const FieldDescriptor* field, - const string& value) const; - void SetEnum (Message* message, const FieldDescriptor* field, - const EnumValueDescriptor* value) const; - Message* MutableMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const; - - int32 GetRepeatedInt32 (const Message& message, - const FieldDescriptor* field, int index) const; - int64 GetRepeatedInt64 (const Message& message, - const FieldDescriptor* field, int index) const; - uint32 GetRepeatedUInt32(const Message& message, - const FieldDescriptor* field, int index) const; - uint64 GetRepeatedUInt64(const Message& message, - const FieldDescriptor* field, int index) const; - float GetRepeatedFloat (const Message& message, - const FieldDescriptor* field, int index) const; - double GetRepeatedDouble(const Message& message, - const FieldDescriptor* field, int index) const; - bool GetRepeatedBool (const Message& message, - const FieldDescriptor* field, int index) const; - string GetRepeatedString(const Message& message, - const FieldDescriptor* field, int index) const; - const string& GetRepeatedStringReference(const Message& message, - const FieldDescriptor* field, - int index, string* scratch) const; - const EnumValueDescriptor* GetRepeatedEnum(const Message& message, - const FieldDescriptor* field, - int index) const; - const Message& GetRepeatedMessage(const Message& message, - const FieldDescriptor* field, - int index) const; - - // Set the value of a field. - void SetRepeatedInt32 (Message* message, - const FieldDescriptor* field, int index, int32 value) const; - void SetRepeatedInt64 (Message* message, - const FieldDescriptor* field, int index, int64 value) const; - void SetRepeatedUInt32(Message* message, - const FieldDescriptor* field, int index, uint32 value) const; - void SetRepeatedUInt64(Message* message, - const FieldDescriptor* field, int index, uint64 value) const; - void SetRepeatedFloat (Message* message, - const FieldDescriptor* field, int index, float value) const; - void SetRepeatedDouble(Message* message, - const FieldDescriptor* field, int index, double value) const; - void SetRepeatedBool (Message* message, - const FieldDescriptor* field, int index, bool value) const; - void SetRepeatedString(Message* message, - const FieldDescriptor* field, int index, - const string& value) const; - void SetRepeatedEnum(Message* message, const FieldDescriptor* field, - int index, const EnumValueDescriptor* value) const; - // Get a mutable pointer to a field with a message type. - Message* MutableRepeatedMessage(Message* message, - const FieldDescriptor* field, - int index) const; - - void AddInt32 (Message* message, - const FieldDescriptor* field, int32 value) const; - void AddInt64 (Message* message, - const FieldDescriptor* field, int64 value) const; - void AddUInt32(Message* message, - const FieldDescriptor* field, uint32 value) const; - void AddUInt64(Message* message, - const FieldDescriptor* field, uint64 value) const; - void AddFloat (Message* message, - const FieldDescriptor* field, float value) const; - void AddDouble(Message* message, - const FieldDescriptor* field, double value) const; - void AddBool (Message* message, - const FieldDescriptor* field, bool value) const; - void AddString(Message* message, - const FieldDescriptor* field, const string& value) const; - void AddEnum(Message* message, - const FieldDescriptor* field, - const EnumValueDescriptor* value) const; - Message* AddMessage(Message* message, const FieldDescriptor* field, - MessageFactory* factory = NULL) const; - - const FieldDescriptor* FindKnownExtensionByName(const string& name) const; - const FieldDescriptor* FindKnownExtensionByNumber(int number) const; - - private: - friend class GeneratedMessage; - - const Descriptor* descriptor_; - const Message* default_instance_; - const int* offsets_; - - int has_bits_offset_; - int unknown_fields_offset_; - int extensions_offset_; - int object_size_; - - const DescriptorPool* descriptor_pool_; - MessageFactory* message_factory_; - - template - inline const Type& GetRaw(const Message& message, - const FieldDescriptor* field) const; - template - inline Type* MutableRaw(Message* message, - const FieldDescriptor* field) const; - template - inline const Type& DefaultRaw(const FieldDescriptor* field) const; - inline const Message* GetMessagePrototype(const FieldDescriptor* field) const; - - inline const uint32* GetHasBits(const Message& message) const; - inline uint32* MutableHasBits(Message* message) const; - inline const ExtensionSet& GetExtensionSet(const Message& message) const; - inline ExtensionSet* MutableExtensionSet(Message* message) const; - - inline bool HasBit(const Message& message, - const FieldDescriptor* field) const; - inline void SetBit(Message* message, - const FieldDescriptor* field) const; - inline void ClearBit(Message* message, - const FieldDescriptor* field) const; - - template - inline const Type& GetField(const Message& message, - const FieldDescriptor* field) const; - template - inline void SetField(Message* message, - const FieldDescriptor* field, const Type& value) const; - template - inline Type* MutableField(Message* message, - const FieldDescriptor* field) const; - template - inline const Type& GetRepeatedField(const Message& message, - const FieldDescriptor* field, - int index) const; - template - inline const Type& GetRepeatedPtrField(const Message& message, - const FieldDescriptor* field, - int index) const; - template - inline void SetRepeatedField(Message* message, - const FieldDescriptor* field, int index, - Type value) const; - template - inline Type* MutableRepeatedField(Message* message, - const FieldDescriptor* field, - int index) const; - template - inline void AddField(Message* message, - const FieldDescriptor* field, const Type& value) const; - template - inline Type* AddField(Message* message, - const FieldDescriptor* field) const; - - int GetExtensionNumberOrDie(const Descriptor* type) const; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GeneratedMessageReflection); -}; - -// Returns the offset of the given field within the given aggregate type. -// This is equivalent to the ANSI C offsetof() macro. However, according -// to the C++ standard, offsetof() only works on POD types, and GCC -// enforces this requirement with a warning. In practice, this rule is -// unnecessarily strict; there is probably no compiler or platform on -// which the offsets of the direct fields of a class are non-constant. -// Fields inherited from superclasses *can* have non-constant offsets, -// but that's not what this macro will be used for. -// -// Note that we calculate relative to the pointer value 16 here since if we -// just use zero, GCC complains about dereferencing a NULL pointer. We -// choose 16 rather than some other number just in case the compiler would -// be confused by an unaligned pointer. -#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TYPE, FIELD) \ - static_cast( \ - reinterpret_cast( \ - &reinterpret_cast(16)->FIELD) - \ - reinterpret_cast(16)) - -// There are some places in proto2 where dynamic_cast would be useful as an -// optimization. For example, take Message::MergeFrom(const Message& other). -// For a given generated message FooMessage, we generate these two methods: -// void MergeFrom(const FooMessage& other); -// void MergeFrom(const Message& other); -// The former method can be implemented directly in terms of FooMessage's -// inline accessors, but the latter method must work with the reflection -// interface. However, if the parameter to the latter method is actually of -// type FooMessage, then we'd like to be able to just call the other method -// as an optimization. So, we use dynamic_cast to check this. -// -// That said, dynamic_cast requires RTTI, which many people like to disable -// for performance and code size reasons. When RTTI is not available, we -// still need to produce correct results. So, in this case we have to fall -// back to using reflection, which is what we would have done anyway if the -// objects were not of the exact same class. -// -// dynamic_cast_if_available() implements this logic. If RTTI is -// enabled, it does a dynamic_cast. If RTTI is disabled, it just returns -// NULL. -// -// If you need to compile without RTTI, simply #define GOOGLE_PROTOBUF_NO_RTTI. -// On MSVC, this should be detected automatically. -template -inline To dynamic_cast_if_available(From from) { -#if defined(GOOGLE_PROTOBUF_NO_RTTI) || (defined(_MSC_VER)&&!defined(_CPPRTTI)) - return NULL; -#else - return dynamic_cast(from); -#endif -} - -// Helper for EnumType_Parse functions: try to parse the string 'name' as an -// enum name of the given type, returning true and filling in value on success, -// or returning false and leaving value unchanged on failure. -LIBPROTOBUF_EXPORT bool ParseNamedEnum(const EnumDescriptor* descriptor, - const string& name, - int* value); - -template -bool ParseNamedEnum(const EnumDescriptor* descriptor, - const string& name, - EnumType* value) { - int tmp; - if (!ParseNamedEnum(descriptor, name, &tmp)) return false; - *value = static_cast(tmp); - return true; -} - -// Just a wrapper around printing the name of a value. The main point of this -// function is not to be inlined, so that you can do this without including -// descriptor.h. -LIBPROTOBUF_EXPORT const string& NameOfEnum(const EnumDescriptor* descriptor, int value); - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_REFLECTION_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc deleted file mode 100644 index a03bcdb7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc +++ /dev/null @@ -1,384 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// To test GeneratedMessageReflection, we actually let the protocol compiler -// generate a full protocol message implementation and then test its -// reflection interface. This is much easier and more maintainable than -// trying to create our own Message class for GeneratedMessageReflection -// to wrap. -// -// The tests here closely mirror some of the tests in -// compiler/cpp/unittest, except using the reflection interface -// rather than generated accessors. - -#include -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { - -namespace { - -// Shorthand to get a FieldDescriptor for a field of unittest::TestAllTypes. -const FieldDescriptor* F(const string& name) { - const FieldDescriptor* result = - unittest::TestAllTypes::descriptor()->FindFieldByName(name); - GOOGLE_CHECK(result != NULL); - return result; -} - -TEST(GeneratedMessageReflectionTest, Defaults) { - // Check that all default values are set correctly in the initial message. - unittest::TestAllTypes message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - - reflection_tester.ExpectClearViaReflection(message); - - const Reflection* reflection = message.GetReflection(); - - // Messages should return pointers to default instances until first use. - // (This is not checked by ExpectClear() since it is not actually true after - // the fields have been set and then cleared.) - EXPECT_EQ(&unittest::TestAllTypes::OptionalGroup::default_instance(), - &reflection->GetMessage(message, F("optionalgroup"))); - EXPECT_EQ(&unittest::TestAllTypes::NestedMessage::default_instance(), - &reflection->GetMessage(message, F("optional_nested_message"))); - EXPECT_EQ(&unittest::ForeignMessage::default_instance(), - &reflection->GetMessage(message, F("optional_foreign_message"))); - EXPECT_EQ(&unittest_import::ImportMessage::default_instance(), - &reflection->GetMessage(message, F("optional_import_message"))); -} - -TEST(GeneratedMessageReflectionTest, Accessors) { - // Set every field to a unique value then go back and check all those - // values. - unittest::TestAllTypes message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - - reflection_tester.SetAllFieldsViaReflection(&message); - TestUtil::ExpectAllFieldsSet(message); - reflection_tester.ExpectAllFieldsSetViaReflection(message); - - reflection_tester.ModifyRepeatedFieldsViaReflection(&message); - TestUtil::ExpectRepeatedFieldsModified(message); -} - -TEST(GeneratedMessageReflectionTest, GetStringReference) { - // Test that GetStringReference() returns the underlying string when it is - // a normal string field. - unittest::TestAllTypes message; - message.set_optional_string("foo"); - message.add_repeated_string("foo"); - - const Reflection* reflection = message.GetReflection(); - string scratch; - - EXPECT_EQ(&message.optional_string(), - &reflection->GetStringReference(message, F("optional_string"), &scratch)) - << "For simple string fields, GetStringReference() should return a " - "reference to the underlying string."; - EXPECT_EQ(&message.repeated_string(0), - &reflection->GetRepeatedStringReference(message, F("repeated_string"), - 0, &scratch)) - << "For simple string fields, GetRepeatedStringReference() should return " - "a reference to the underlying string."; -} - - -TEST(GeneratedMessageReflectionTest, DefaultsAfterClear) { - // Check that after setting all fields and then clearing, getting an - // embedded message does NOT return the default instance. - unittest::TestAllTypes message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - - TestUtil::SetAllFields(&message); - message.Clear(); - - const Reflection* reflection = message.GetReflection(); - - EXPECT_NE(&unittest::TestAllTypes::OptionalGroup::default_instance(), - &reflection->GetMessage(message, F("optionalgroup"))); - EXPECT_NE(&unittest::TestAllTypes::NestedMessage::default_instance(), - &reflection->GetMessage(message, F("optional_nested_message"))); - EXPECT_NE(&unittest::ForeignMessage::default_instance(), - &reflection->GetMessage(message, F("optional_foreign_message"))); - EXPECT_NE(&unittest_import::ImportMessage::default_instance(), - &reflection->GetMessage(message, F("optional_import_message"))); -} - - -TEST(GeneratedMessageReflectionTest, Swap) { - unittest::TestAllTypes message1; - unittest::TestAllTypes message2; - - TestUtil::SetAllFields(&message1); - - const Reflection* reflection = message1.GetReflection(); - reflection->Swap(&message1, &message2); - - TestUtil::ExpectClear(message1); - TestUtil::ExpectAllFieldsSet(message2); -} - -TEST(GeneratedMessageReflectionTest, SwapWithBothSet) { - unittest::TestAllTypes message1; - unittest::TestAllTypes message2; - - TestUtil::SetAllFields(&message1); - TestUtil::SetAllFields(&message2); - TestUtil::ModifyRepeatedFields(&message2); - - const Reflection* reflection = message1.GetReflection(); - reflection->Swap(&message1, &message2); - - TestUtil::ExpectRepeatedFieldsModified(message1); - TestUtil::ExpectAllFieldsSet(message2); - - message1.set_optional_int32(532819); - - reflection->Swap(&message1, &message2); - - EXPECT_EQ(532819, message2.optional_int32()); -} - -TEST(GeneratedMessageReflectionTest, SwapExtensions) { - unittest::TestAllExtensions message1; - unittest::TestAllExtensions message2; - - TestUtil::SetAllExtensions(&message1); - - const Reflection* reflection = message1.GetReflection(); - reflection->Swap(&message1, &message2); - - TestUtil::ExpectExtensionsClear(message1); - TestUtil::ExpectAllExtensionsSet(message2); -} - -TEST(GeneratedMessageReflectionTest, SwapUnknown) { - unittest::TestEmptyMessage message1, message2; - - message1.mutable_unknown_fields()->AddVarint(1234, 1); - - EXPECT_EQ(1, message1.unknown_fields().field_count()); - EXPECT_EQ(0, message2.unknown_fields().field_count()); - const Reflection* reflection = message1.GetReflection(); - reflection->Swap(&message1, &message2); - EXPECT_EQ(0, message1.unknown_fields().field_count()); - EXPECT_EQ(1, message2.unknown_fields().field_count()); -} - -TEST(GeneratedMessageReflectionTest, RemoveLast) { - unittest::TestAllTypes message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - - TestUtil::SetAllFields(&message); - - reflection_tester.RemoveLastRepeatedsViaReflection(&message); - - TestUtil::ExpectLastRepeatedsRemoved(message); -} - -TEST(GeneratedMessageReflectionTest, RemoveLastExtensions) { - unittest::TestAllExtensions message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllExtensions::descriptor()); - - TestUtil::SetAllExtensions(&message); - reflection_tester.RemoveLastRepeatedsViaReflection(&message); - - TestUtil::ExpectLastRepeatedExtensionsRemoved(message); -} - -TEST(GeneratedMessageReflectionTest, SwapRepeatedElements) { - unittest::TestAllTypes message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllTypes::descriptor()); - - TestUtil::SetAllFields(&message); - - // Swap and test that fields are all swapped. - reflection_tester.SwapRepeatedsViaReflection(&message); - TestUtil::ExpectRepeatedsSwapped(message); - - // Swap back and test that fields are all back to original values. - reflection_tester.SwapRepeatedsViaReflection(&message); - TestUtil::ExpectAllFieldsSet(message); -} - -TEST(GeneratedMessageReflectionTest, SwapRepeatedElementsExtension) { - unittest::TestAllExtensions message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllExtensions::descriptor()); - - TestUtil::SetAllExtensions(&message); - - // Swap and test that fields are all swapped. - reflection_tester.SwapRepeatedsViaReflection(&message); - TestUtil::ExpectRepeatedExtensionsSwapped(message); - - // Swap back and test that fields are all back to original values. - reflection_tester.SwapRepeatedsViaReflection(&message); - TestUtil::ExpectAllExtensionsSet(message); -} - -TEST(GeneratedMessageReflectionTest, Extensions) { - // Set every extension to a unique value then go back and check all those - // values. - unittest::TestAllExtensions message; - TestUtil::ReflectionTester reflection_tester( - unittest::TestAllExtensions::descriptor()); - - reflection_tester.SetAllFieldsViaReflection(&message); - TestUtil::ExpectAllExtensionsSet(message); - reflection_tester.ExpectAllFieldsSetViaReflection(message); - - reflection_tester.ModifyRepeatedFieldsViaReflection(&message); - TestUtil::ExpectRepeatedExtensionsModified(message); -} - -TEST(GeneratedMessageReflectionTest, FindExtensionTypeByNumber) { - const Reflection* reflection = - unittest::TestAllExtensions::default_instance().GetReflection(); - - const FieldDescriptor* extension1 = - unittest::TestAllExtensions::descriptor()->file()->FindExtensionByName( - "optional_int32_extension"); - const FieldDescriptor* extension2 = - unittest::TestAllExtensions::descriptor()->file()->FindExtensionByName( - "repeated_string_extension"); - - EXPECT_EQ(extension1, - reflection->FindKnownExtensionByNumber(extension1->number())); - EXPECT_EQ(extension2, - reflection->FindKnownExtensionByNumber(extension2->number())); - - // Non-existent extension. - EXPECT_TRUE(reflection->FindKnownExtensionByNumber(62341) == NULL); - - // Extensions of TestAllExtensions should not show up as extensions of - // other types. - EXPECT_TRUE(unittest::TestAllTypes::default_instance().GetReflection()-> - FindKnownExtensionByNumber(extension1->number()) == NULL); -} - -TEST(GeneratedMessageReflectionTest, FindKnownExtensionByName) { - const Reflection* reflection = - unittest::TestAllExtensions::default_instance().GetReflection(); - - const FieldDescriptor* extension1 = - unittest::TestAllExtensions::descriptor()->file()->FindExtensionByName( - "optional_int32_extension"); - const FieldDescriptor* extension2 = - unittest::TestAllExtensions::descriptor()->file()->FindExtensionByName( - "repeated_string_extension"); - - EXPECT_EQ(extension1, - reflection->FindKnownExtensionByName(extension1->full_name())); - EXPECT_EQ(extension2, - reflection->FindKnownExtensionByName(extension2->full_name())); - - // Non-existent extension. - EXPECT_TRUE(reflection->FindKnownExtensionByName("no_such_ext") == NULL); - - // Extensions of TestAllExtensions should not show up as extensions of - // other types. - EXPECT_TRUE(unittest::TestAllTypes::default_instance().GetReflection()-> - FindKnownExtensionByName(extension1->full_name()) == NULL); -} - -#ifdef GTEST_HAS_DEATH_TEST - -TEST(GeneratedMessageReflectionTest, UsageErrors) { - unittest::TestAllTypes message; - const Reflection* reflection = message.GetReflection(); - const Descriptor* descriptor = message.GetDescriptor(); - -#define f(NAME) descriptor->FindFieldByName(NAME) - - // Testing every single failure mode would be too much work. Let's just - // check a few. - EXPECT_DEATH( - reflection->GetInt32( - message, descriptor->FindFieldByName("optional_int64")), - "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::GetInt32\n" - " Message type: protobuf_unittest\\.TestAllTypes\n" - " Field : protobuf_unittest\\.TestAllTypes\\.optional_int64\n" - " Problem : Field is not the right type for this message:\n" - " Expected : CPPTYPE_INT32\n" - " Field type: CPPTYPE_INT64"); - EXPECT_DEATH( - reflection->GetInt32( - message, descriptor->FindFieldByName("repeated_int32")), - "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::GetInt32\n" - " Message type: protobuf_unittest.TestAllTypes\n" - " Field : protobuf_unittest.TestAllTypes.repeated_int32\n" - " Problem : Field is repeated; the method requires a singular field."); - EXPECT_DEATH( - reflection->GetInt32( - message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")), - "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::GetInt32\n" - " Message type: protobuf_unittest.TestAllTypes\n" - " Field : protobuf_unittest.ForeignMessage.c\n" - " Problem : Field does not match message type."); - EXPECT_DEATH( - reflection->HasField( - message, unittest::ForeignMessage::descriptor()->FindFieldByName("c")), - "Protocol Buffer reflection usage error:\n" - " Method : google::protobuf::Reflection::HasField\n" - " Message type: protobuf_unittest.TestAllTypes\n" - " Field : protobuf_unittest.ForeignMessage.c\n" - " Problem : Field does not match message type."); - -#undef f -} - -#endif // GTEST_HAS_DEATH_TEST - - -} // namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.cc deleted file mode 100644 index 76e547bb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include - -namespace google { -namespace protobuf { -namespace internal { - -double Infinity() { - return std::numeric_limits::infinity(); -} -double NaN() { - return std::numeric_limits::quiet_NaN(); -} - -const ::std::string kEmptyString; - - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.h deleted file mode 100644 index 1a2343d4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/generated_message_util.h +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains miscellaneous helper code used by generated code -- -// including lite types -- but which should not be used directly by users. - -#ifndef GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__ -#define GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__ - -#include - -#include - - -namespace google { -namespace protobuf { - namespace io { - class CodedInputStream; // coded_stream.h - } -} - -namespace protobuf { -namespace internal { - -// Annotation for the compiler to emit a deprecation message if a field marked -// with option 'deprecated=true' is used in the code, or for other things in -// generated code which are deprecated. -// -// For internal use in the pb.cc files, deprecation warnings are suppressed -// there. -#undef DEPRECATED_PROTOBUF_FIELD -#if !defined(INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION) -# define PROTOBUF_DEPRECATED GOOGLE_ATTRIBUTE_DEPRECATED -#else -# define PROTOBUF_DEPRECATED -#endif - - -// Constants for special floating point values. -double Infinity(); -double NaN(); - -// Constant used for empty default strings. -extern const ::std::string kEmptyString; - - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_GENERATED_MESSAGE_UTIL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.cc deleted file mode 100644 index 57d486f9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.cc +++ /dev/null @@ -1,839 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This implementation is heavily optimized to make reads and writes -// of small values (especially varints) as fast as possible. In -// particular, we optimize for the common case that a read or a write -// will not cross the end of the buffer, since we can avoid a lot -// of branching in this case. - -#include -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace io { - -namespace { - -static const int kMaxVarintBytes = 10; -static const int kMaxVarint32Bytes = 5; - - -inline bool NextNonEmpty(ZeroCopyInputStream* input, - const void** data, int* size) { - bool success; - do { - success = input->Next(data, size); - } while (success && *size == 0); - return success; -} - -} // namespace - -// CodedInputStream ================================================== - - -void CodedInputStream::BackUpInputToCurrentPosition() { - int backup_bytes = BufferSize() + buffer_size_after_limit_ + overflow_bytes_; - if (backup_bytes > 0) { - input_->BackUp(backup_bytes); - - // total_bytes_read_ doesn't include overflow_bytes_. - total_bytes_read_ -= BufferSize() + buffer_size_after_limit_; - buffer_end_ = buffer_; - buffer_size_after_limit_ = 0; - overflow_bytes_ = 0; - } -} - -inline void CodedInputStream::RecomputeBufferLimits() { - buffer_end_ += buffer_size_after_limit_; - int closest_limit = min(current_limit_, total_bytes_limit_); - if (closest_limit < total_bytes_read_) { - // The limit position is in the current buffer. We must adjust - // the buffer size accordingly. - buffer_size_after_limit_ = total_bytes_read_ - closest_limit; - buffer_end_ -= buffer_size_after_limit_; - } else { - buffer_size_after_limit_ = 0; - } -} - -CodedInputStream::Limit CodedInputStream::PushLimit(int byte_limit) { - // Current position relative to the beginning of the stream. - int current_position = total_bytes_read_ - - (BufferSize() + buffer_size_after_limit_); - - Limit old_limit = current_limit_; - - // security: byte_limit is possibly evil, so check for negative values - // and overflow. - if (byte_limit >= 0 && - byte_limit <= INT_MAX - current_position) { - current_limit_ = current_position + byte_limit; - } else { - // Negative or overflow. - current_limit_ = INT_MAX; - } - - // We need to enforce all limits, not just the new one, so if the previous - // limit was before the new requested limit, we continue to enforce the - // previous limit. - current_limit_ = min(current_limit_, old_limit); - - RecomputeBufferLimits(); - return old_limit; -} - -void CodedInputStream::PopLimit(Limit limit) { - // The limit passed in is actually the *old* limit, which we returned from - // PushLimit(). - current_limit_ = limit; - RecomputeBufferLimits(); - - // We may no longer be at a legitimate message end. ReadTag() needs to be - // called again to find out. - legitimate_message_end_ = false; -} - -int CodedInputStream::BytesUntilLimit() { - if (current_limit_ == INT_MAX) return -1; - int current_position = total_bytes_read_ - - (BufferSize() + buffer_size_after_limit_); - - return current_limit_ - current_position; -} - -void CodedInputStream::SetTotalBytesLimit( - int total_bytes_limit, int warning_threshold) { - // Make sure the limit isn't already past, since this could confuse other - // code. - int current_position = total_bytes_read_ - - (BufferSize() + buffer_size_after_limit_); - total_bytes_limit_ = max(current_position, total_bytes_limit); - total_bytes_warning_threshold_ = warning_threshold; - RecomputeBufferLimits(); -} - -void CodedInputStream::PrintTotalBytesLimitError() { - GOOGLE_LOG(ERROR) << "A protocol message was rejected because it was too " - "big (more than " << total_bytes_limit_ - << " bytes). To increase the limit (or to disable these " - "warnings), see CodedInputStream::SetTotalBytesLimit() " - "in google/protobuf/io/coded_stream.h."; -} - -bool CodedInputStream::Skip(int count) { - if (count < 0) return false; // security: count is often user-supplied - - const int original_buffer_size = BufferSize(); - - if (count <= original_buffer_size) { - // Just skipping within the current buffer. Easy. - Advance(count); - return true; - } - - if (buffer_size_after_limit_ > 0) { - // We hit a limit inside this buffer. Advance to the limit and fail. - Advance(original_buffer_size); - return false; - } - - count -= original_buffer_size; - buffer_ = NULL; - buffer_end_ = buffer_; - - // Make sure this skip doesn't try to skip past the current limit. - int closest_limit = min(current_limit_, total_bytes_limit_); - int bytes_until_limit = closest_limit - total_bytes_read_; - if (bytes_until_limit < count) { - // We hit the limit. Skip up to it then fail. - if (bytes_until_limit > 0) { - total_bytes_read_ = closest_limit; - input_->Skip(bytes_until_limit); - } - return false; - } - - total_bytes_read_ += count; - return input_->Skip(count); -} - -bool CodedInputStream::GetDirectBufferPointer(const void** data, int* size) { - if (BufferSize() == 0 && !Refresh()) return false; - - *data = buffer_; - *size = BufferSize(); - return true; -} - -bool CodedInputStream::ReadRaw(void* buffer, int size) { - int current_buffer_size; - while ((current_buffer_size = BufferSize()) < size) { - // Reading past end of buffer. Copy what we have, then refresh. - memcpy(buffer, buffer_, current_buffer_size); - buffer = reinterpret_cast(buffer) + current_buffer_size; - size -= current_buffer_size; - Advance(current_buffer_size); - if (!Refresh()) return false; - } - - memcpy(buffer, buffer_, size); - Advance(size); - - return true; -} - -bool CodedInputStream::ReadString(string* buffer, int size) { - if (size < 0) return false; // security: size is often user-supplied - return InternalReadStringInline(buffer, size); -} - -bool CodedInputStream::ReadStringFallback(string* buffer, int size) { - if (!buffer->empty()) { - buffer->clear(); - } - - int current_buffer_size; - while ((current_buffer_size = BufferSize()) < size) { - // Some STL implementations "helpfully" crash on buffer->append(NULL, 0). - if (current_buffer_size != 0) { - // Note: string1.append(string2) is O(string2.size()) (as opposed to - // O(string1.size() + string2.size()), which would be bad). - buffer->append(reinterpret_cast(buffer_), - current_buffer_size); - } - size -= current_buffer_size; - Advance(current_buffer_size); - if (!Refresh()) return false; - } - - buffer->append(reinterpret_cast(buffer_), size); - Advance(size); - - return true; -} - - -bool CodedInputStream::ReadLittleEndian32Fallback(uint32* value) { - uint8 bytes[sizeof(*value)]; - - const uint8* ptr; - if (BufferSize() >= sizeof(*value)) { - // Fast path: Enough bytes in the buffer to read directly. - ptr = buffer_; - Advance(sizeof(*value)); - } else { - // Slow path: Had to read past the end of the buffer. - if (!ReadRaw(bytes, sizeof(*value))) return false; - ptr = bytes; - } - ReadLittleEndian32FromArray(ptr, value); - return true; -} - -bool CodedInputStream::ReadLittleEndian64Fallback(uint64* value) { - uint8 bytes[sizeof(*value)]; - - const uint8* ptr; - if (BufferSize() >= sizeof(*value)) { - // Fast path: Enough bytes in the buffer to read directly. - ptr = buffer_; - Advance(sizeof(*value)); - } else { - // Slow path: Had to read past the end of the buffer. - if (!ReadRaw(bytes, sizeof(*value))) return false; - ptr = bytes; - } - ReadLittleEndian64FromArray(ptr, value); - return true; -} - -namespace { - -inline const uint8* ReadVarint32FromArray( - const uint8* buffer, uint32* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; -inline const uint8* ReadVarint32FromArray(const uint8* buffer, uint32* value) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this read won't cross the end, so we can skip the checks. - const uint8* ptr = buffer; - uint32 b; - uint32 result; - - b = *(ptr++); result = (b & 0x7F) ; if (!(b & 0x80)) goto done; - b = *(ptr++); result |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; - b = *(ptr++); result |= (b & 0x7F) << 14; if (!(b & 0x80)) goto done; - b = *(ptr++); result |= (b & 0x7F) << 21; if (!(b & 0x80)) goto done; - b = *(ptr++); result |= b << 28; if (!(b & 0x80)) goto done; - - // If the input is larger than 32 bits, we still need to read it all - // and discard the high-order bits. - for (int i = 0; i < kMaxVarintBytes - kMaxVarint32Bytes; i++) { - b = *(ptr++); if (!(b & 0x80)) goto done; - } - - // We have overrun the maximum size of a varint (10 bytes). Assume - // the data is corrupt. - return NULL; - - done: - *value = result; - return ptr; -} - -} // namespace - -bool CodedInputStream::ReadVarint32Slow(uint32* value) { - uint64 result; - // Directly invoke ReadVarint64Fallback, since we already tried to optimize - // for one-byte varints. - if (!ReadVarint64Fallback(&result)) return false; - *value = (uint32)result; - return true; -} - -bool CodedInputStream::ReadVarint32Fallback(uint32* value) { - if (BufferSize() >= kMaxVarintBytes || - // Optimization: If the varint ends at exactly the end of the buffer, - // we can detect that and still use the fast path. - (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { - const uint8* end = ReadVarint32FromArray(buffer_, value); - if (end == NULL) return false; - buffer_ = end; - return true; - } else { - // Really slow case: we will incur the cost of an extra function call here, - // but moving this out of line reduces the size of this function, which - // improves the common case. In micro benchmarks, this is worth about 10-15% - return ReadVarint32Slow(value); - } -} - -uint32 CodedInputStream::ReadTagSlow() { - if (buffer_ == buffer_end_) { - // Call refresh. - if (!Refresh()) { - // Refresh failed. Make sure that it failed due to EOF, not because - // we hit total_bytes_limit_, which, unlike normal limits, is not a - // valid place to end a message. - int current_position = total_bytes_read_ - buffer_size_after_limit_; - if (current_position >= total_bytes_limit_) { - // Hit total_bytes_limit_. But if we also hit the normal limit, - // we're still OK. - legitimate_message_end_ = current_limit_ == total_bytes_limit_; - } else { - legitimate_message_end_ = true; - } - return 0; - } - } - - // For the slow path, just do a 64-bit read. Try to optimize for one-byte tags - // again, since we have now refreshed the buffer. - uint64 result; - if (!ReadVarint64(&result)) return 0; - return static_cast(result); -} - -uint32 CodedInputStream::ReadTagFallback() { - if (BufferSize() >= kMaxVarintBytes || - // Optimization: If the varint ends at exactly the end of the buffer, - // we can detect that and still use the fast path. - (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { - uint32 tag; - const uint8* end = ReadVarint32FromArray(buffer_, &tag); - if (end == NULL) { - return 0; - } - buffer_ = end; - return tag; - } else { - // We are commonly at a limit when attempting to read tags. Try to quickly - // detect this case without making another function call. - if (buffer_ == buffer_end_ && buffer_size_after_limit_ > 0 && - // Make sure that the limit we hit is not total_bytes_limit_, since - // in that case we still need to call Refresh() so that it prints an - // error. - total_bytes_read_ - buffer_size_after_limit_ < total_bytes_limit_) { - // We hit a byte limit. - legitimate_message_end_ = true; - return 0; - } - return ReadTagSlow(); - } -} - -bool CodedInputStream::ReadVarint64Slow(uint64* value) { - // Slow path: This read might cross the end of the buffer, so we - // need to check and refresh the buffer if and when it does. - - uint64 result = 0; - int count = 0; - uint32 b; - - do { - if (count == kMaxVarintBytes) return false; - while (buffer_ == buffer_end_) { - if (!Refresh()) return false; - } - b = *buffer_; - result |= static_cast(b & 0x7F) << (7 * count); - Advance(1); - ++count; - } while (b & 0x80); - - *value = result; - return true; -} - -bool CodedInputStream::ReadVarint64Fallback(uint64* value) { - if (BufferSize() >= kMaxVarintBytes || - // Optimization: If the varint ends at exactly the end of the buffer, - // we can detect that and still use the fast path. - (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this read won't cross the end, so we can skip the checks. - - const uint8* ptr = buffer_; - uint32 b; - - // Splitting into 32-bit pieces gives better performance on 32-bit - // processors. - uint32 part0 = 0, part1 = 0, part2 = 0; - - b = *(ptr++); part0 = (b & 0x7F) ; if (!(b & 0x80)) goto done; - b = *(ptr++); part0 |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; - b = *(ptr++); part0 |= (b & 0x7F) << 14; if (!(b & 0x80)) goto done; - b = *(ptr++); part0 |= (b & 0x7F) << 21; if (!(b & 0x80)) goto done; - b = *(ptr++); part1 = (b & 0x7F) ; if (!(b & 0x80)) goto done; - b = *(ptr++); part1 |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; - b = *(ptr++); part1 |= (b & 0x7F) << 14; if (!(b & 0x80)) goto done; - b = *(ptr++); part1 |= (b & 0x7F) << 21; if (!(b & 0x80)) goto done; - b = *(ptr++); part2 = (b & 0x7F) ; if (!(b & 0x80)) goto done; - b = *(ptr++); part2 |= (b & 0x7F) << 7; if (!(b & 0x80)) goto done; - - // We have overrun the maximum size of a varint (10 bytes). The data - // must be corrupt. - return NULL; - - done: - Advance(ptr - buffer_); - *value = (static_cast(part0) ) | - (static_cast(part1) << 28) | - (static_cast(part2) << 56); - return true; - } else { - return ReadVarint64Slow(value); - } -} - -bool CodedInputStream::Refresh() { - GOOGLE_DCHECK_EQ(0, BufferSize()); - - if (buffer_size_after_limit_ > 0 || overflow_bytes_ > 0 || - total_bytes_read_ == current_limit_) { - // We've hit a limit. Stop. - int current_position = total_bytes_read_ - buffer_size_after_limit_; - - if (current_position >= total_bytes_limit_ && - total_bytes_limit_ != current_limit_) { - // Hit total_bytes_limit_. - PrintTotalBytesLimitError(); - } - - return false; - } - - if (total_bytes_warning_threshold_ >= 0 && - total_bytes_read_ >= total_bytes_warning_threshold_) { - GOOGLE_LOG(WARNING) << "Reading dangerously large protocol message. If the " - "message turns out to be larger than " - << total_bytes_limit_ << " bytes, parsing will be halted " - "for security reasons. To increase the limit (or to " - "disable these warnings), see " - "CodedInputStream::SetTotalBytesLimit() in " - "google/protobuf/io/coded_stream.h."; - - // Don't warn again for this stream. - total_bytes_warning_threshold_ = -1; - } - - const void* void_buffer; - int buffer_size; - if (NextNonEmpty(input_, &void_buffer, &buffer_size)) { - buffer_ = reinterpret_cast(void_buffer); - buffer_end_ = buffer_ + buffer_size; - GOOGLE_CHECK_GE(buffer_size, 0); - - if (total_bytes_read_ <= INT_MAX - buffer_size) { - total_bytes_read_ += buffer_size; - } else { - // Overflow. Reset buffer_end_ to not include the bytes beyond INT_MAX. - // We can't get that far anyway, because total_bytes_limit_ is guaranteed - // to be less than it. We need to keep track of the number of bytes - // we discarded, though, so that we can call input_->BackUp() to back - // up over them on destruction. - - // The following line is equivalent to: - // overflow_bytes_ = total_bytes_read_ + buffer_size - INT_MAX; - // except that it avoids overflows. Signed integer overflow has - // undefined results according to the C standard. - overflow_bytes_ = total_bytes_read_ - (INT_MAX - buffer_size); - buffer_end_ -= overflow_bytes_; - total_bytes_read_ = INT_MAX; - } - - RecomputeBufferLimits(); - return true; - } else { - buffer_ = NULL; - buffer_end_ = NULL; - return false; - } -} - -// CodedOutputStream ================================================= - -CodedOutputStream::CodedOutputStream(ZeroCopyOutputStream* output) - : output_(output), - buffer_(NULL), - buffer_size_(0), - total_bytes_(0), - had_error_(false) { - // Eagerly Refresh() so buffer space is immediately available. - Refresh(); - // The Refresh() may have failed. If the client doesn't write any data, - // though, don't consider this an error. If the client does write data, then - // another Refresh() will be attempted and it will set the error once again. - had_error_ = false; -} - -CodedOutputStream::~CodedOutputStream() { - if (buffer_size_ > 0) { - output_->BackUp(buffer_size_); - } -} - -bool CodedOutputStream::Skip(int count) { - if (count < 0) return false; - - while (count > buffer_size_) { - count -= buffer_size_; - if (!Refresh()) return false; - } - - Advance(count); - return true; -} - -bool CodedOutputStream::GetDirectBufferPointer(void** data, int* size) { - if (buffer_size_ == 0 && !Refresh()) return false; - - *data = buffer_; - *size = buffer_size_; - return true; -} - -void CodedOutputStream::WriteRaw(const void* data, int size) { - while (buffer_size_ < size) { - memcpy(buffer_, data, buffer_size_); - size -= buffer_size_; - data = reinterpret_cast(data) + buffer_size_; - if (!Refresh()) return; - } - - memcpy(buffer_, data, size); - Advance(size); -} - -uint8* CodedOutputStream::WriteRawToArray( - const void* data, int size, uint8* target) { - memcpy(target, data, size); - return target + size; -} - - -void CodedOutputStream::WriteLittleEndian32(uint32 value) { - uint8 bytes[sizeof(value)]; - - bool use_fast = buffer_size_ >= sizeof(value); - uint8* ptr = use_fast ? buffer_ : bytes; - - WriteLittleEndian32ToArray(value, ptr); - - if (use_fast) { - Advance(sizeof(value)); - } else { - WriteRaw(bytes, sizeof(value)); - } -} - -void CodedOutputStream::WriteLittleEndian64(uint64 value) { - uint8 bytes[sizeof(value)]; - - bool use_fast = buffer_size_ >= sizeof(value); - uint8* ptr = use_fast ? buffer_ : bytes; - - WriteLittleEndian64ToArray(value, ptr); - - if (use_fast) { - Advance(sizeof(value)); - } else { - WriteRaw(bytes, sizeof(value)); - } -} - -inline uint8* CodedOutputStream::WriteVarint32FallbackToArrayInline( - uint32 value, uint8* target) { - target[0] = static_cast(value | 0x80); - if (value >= (1 << 7)) { - target[1] = static_cast((value >> 7) | 0x80); - if (value >= (1 << 14)) { - target[2] = static_cast((value >> 14) | 0x80); - if (value >= (1 << 21)) { - target[3] = static_cast((value >> 21) | 0x80); - if (value >= (1 << 28)) { - target[4] = static_cast(value >> 28); - return target + 5; - } else { - target[3] &= 0x7F; - return target + 4; - } - } else { - target[2] &= 0x7F; - return target + 3; - } - } else { - target[1] &= 0x7F; - return target + 2; - } - } else { - target[0] &= 0x7F; - return target + 1; - } -} - -void CodedOutputStream::WriteVarint32(uint32 value) { - if (buffer_size_ >= kMaxVarint32Bytes) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this write won't cross the end, so we can skip the checks. - uint8* target = buffer_; - uint8* end = WriteVarint32FallbackToArrayInline(value, target); - int size = end - target; - Advance(size); - } else { - // Slow path: This write might cross the end of the buffer, so we - // compose the bytes first then use WriteRaw(). - uint8 bytes[kMaxVarint32Bytes]; - int size = 0; - while (value > 0x7F) { - bytes[size++] = (static_cast(value) & 0x7F) | 0x80; - value >>= 7; - } - bytes[size++] = static_cast(value) & 0x7F; - WriteRaw(bytes, size); - } -} - -uint8* CodedOutputStream::WriteVarint32FallbackToArray( - uint32 value, uint8* target) { - return WriteVarint32FallbackToArrayInline(value, target); -} - -inline uint8* CodedOutputStream::WriteVarint64ToArrayInline( - uint64 value, uint8* target) { - // Splitting into 32-bit pieces gives better performance on 32-bit - // processors. - uint32 part0 = static_cast(value ); - uint32 part1 = static_cast(value >> 28); - uint32 part2 = static_cast(value >> 56); - - int size; - - // Here we can't really optimize for small numbers, since the value is - // split into three parts. Cheking for numbers < 128, for instance, - // would require three comparisons, since you'd have to make sure part1 - // and part2 are zero. However, if the caller is using 64-bit integers, - // it is likely that they expect the numbers to often be very large, so - // we probably don't want to optimize for small numbers anyway. Thus, - // we end up with a hardcoded binary search tree... - if (part2 == 0) { - if (part1 == 0) { - if (part0 < (1 << 14)) { - if (part0 < (1 << 7)) { - size = 1; goto size1; - } else { - size = 2; goto size2; - } - } else { - if (part0 < (1 << 21)) { - size = 3; goto size3; - } else { - size = 4; goto size4; - } - } - } else { - if (part1 < (1 << 14)) { - if (part1 < (1 << 7)) { - size = 5; goto size5; - } else { - size = 6; goto size6; - } - } else { - if (part1 < (1 << 21)) { - size = 7; goto size7; - } else { - size = 8; goto size8; - } - } - } - } else { - if (part2 < (1 << 7)) { - size = 9; goto size9; - } else { - size = 10; goto size10; - } - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - - size10: target[9] = static_cast((part2 >> 7) | 0x80); - size9 : target[8] = static_cast((part2 ) | 0x80); - size8 : target[7] = static_cast((part1 >> 21) | 0x80); - size7 : target[6] = static_cast((part1 >> 14) | 0x80); - size6 : target[5] = static_cast((part1 >> 7) | 0x80); - size5 : target[4] = static_cast((part1 ) | 0x80); - size4 : target[3] = static_cast((part0 >> 21) | 0x80); - size3 : target[2] = static_cast((part0 >> 14) | 0x80); - size2 : target[1] = static_cast((part0 >> 7) | 0x80); - size1 : target[0] = static_cast((part0 ) | 0x80); - - target[size-1] &= 0x7F; - return target + size; -} - -void CodedOutputStream::WriteVarint64(uint64 value) { - if (buffer_size_ >= kMaxVarintBytes) { - // Fast path: We have enough bytes left in the buffer to guarantee that - // this write won't cross the end, so we can skip the checks. - uint8* target = buffer_; - - uint8* end = WriteVarint64ToArrayInline(value, target); - int size = end - target; - Advance(size); - } else { - // Slow path: This write might cross the end of the buffer, so we - // compose the bytes first then use WriteRaw(). - uint8 bytes[kMaxVarintBytes]; - int size = 0; - while (value > 0x7F) { - bytes[size++] = (static_cast(value) & 0x7F) | 0x80; - value >>= 7; - } - bytes[size++] = static_cast(value) & 0x7F; - WriteRaw(bytes, size); - } -} - -uint8* CodedOutputStream::WriteVarint64ToArray( - uint64 value, uint8* target) { - return WriteVarint64ToArrayInline(value, target); -} - -bool CodedOutputStream::Refresh() { - void* void_buffer; - if (output_->Next(&void_buffer, &buffer_size_)) { - buffer_ = reinterpret_cast(void_buffer); - total_bytes_ += buffer_size_; - return true; - } else { - buffer_ = NULL; - buffer_size_ = 0; - had_error_ = true; - return false; - } -} - -int CodedOutputStream::VarintSize32Fallback(uint32 value) { - if (value < (1 << 7)) { - return 1; - } else if (value < (1 << 14)) { - return 2; - } else if (value < (1 << 21)) { - return 3; - } else if (value < (1 << 28)) { - return 4; - } else { - return 5; - } -} - -int CodedOutputStream::VarintSize64(uint64 value) { - if (value < (1ull << 35)) { - if (value < (1ull << 7)) { - return 1; - } else if (value < (1ull << 14)) { - return 2; - } else if (value < (1ull << 21)) { - return 3; - } else if (value < (1ull << 28)) { - return 4; - } else { - return 5; - } - } else { - if (value < (1ull << 42)) { - return 6; - } else if (value < (1ull << 49)) { - return 7; - } else if (value < (1ull << 56)) { - return 8; - } else if (value < (1ull << 63)) { - return 9; - } else { - return 10; - } - } -} - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.h deleted file mode 100644 index 1b6b4e18..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream.h +++ /dev/null @@ -1,1102 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains the CodedInputStream and CodedOutputStream classes, -// which wrap a ZeroCopyInputStream or ZeroCopyOutputStream, respectively, -// and allow you to read or write individual pieces of data in various -// formats. In particular, these implement the varint encoding for -// integers, a simple variable-length encoding in which smaller numbers -// take fewer bytes. -// -// Typically these classes will only be used internally by the protocol -// buffer library in order to encode and decode protocol buffers. Clients -// of the library only need to know about this class if they wish to write -// custom message parsing or serialization procedures. -// -// CodedOutputStream example: -// // Write some data to "myfile". First we write a 4-byte "magic number" -// // to identify the file type, then write a length-delimited string. The -// // string is composed of a varint giving the length followed by the raw -// // bytes. -// int fd = open("myfile", O_WRONLY); -// ZeroCopyOutputStream* raw_output = new FileOutputStream(fd); -// CodedOutputStream* coded_output = new CodedOutputStream(raw_output); -// -// int magic_number = 1234; -// char text[] = "Hello world!"; -// coded_output->WriteLittleEndian32(magic_number); -// coded_output->WriteVarint32(strlen(text)); -// coded_output->WriteRaw(text, strlen(text)); -// -// delete coded_output; -// delete raw_output; -// close(fd); -// -// CodedInputStream example: -// // Read a file created by the above code. -// int fd = open("myfile", O_RDONLY); -// ZeroCopyInputStream* raw_input = new FileInputStream(fd); -// CodedInputStream coded_input = new CodedInputStream(raw_input); -// -// coded_input->ReadLittleEndian32(&magic_number); -// if (magic_number != 1234) { -// cerr << "File not in expected format." << endl; -// return; -// } -// -// uint32 size; -// coded_input->ReadVarint32(&size); -// -// char* text = new char[size + 1]; -// coded_input->ReadRaw(buffer, size); -// text[size] = '\0'; -// -// delete coded_input; -// delete raw_input; -// close(fd); -// -// cout << "Text is: " << text << endl; -// delete [] text; -// -// For those who are interested, varint encoding is defined as follows: -// -// The encoding operates on unsigned integers of up to 64 bits in length. -// Each byte of the encoded value has the format: -// * bits 0-6: Seven bits of the number being encoded. -// * bit 7: Zero if this is the last byte in the encoding (in which -// case all remaining bits of the number are zero) or 1 if -// more bytes follow. -// The first byte contains the least-significant 7 bits of the number, the -// second byte (if present) contains the next-least-significant 7 bits, -// and so on. So, the binary number 1011000101011 would be encoded in two -// bytes as "10101011 00101100". -// -// In theory, varint could be used to encode integers of any length. -// However, for practicality we set a limit at 64 bits. The maximum encoded -// length of a number is thus 10 bytes. - -#ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ -#define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ - -#include -#ifdef _MSC_VER - #if defined(_M_IX86) && \ - !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) - #define PROTOBUF_LITTLE_ENDIAN 1 - #endif - #if _MSC_VER >= 1300 - // If MSVC has "/RTCc" set, it will complain about truncating casts at - // runtime. This file contains some intentional truncating casts. - #pragma runtime_checks("c", off) - #endif -#else - #include // __BYTE_ORDER - #if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN && \ - !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) - #define PROTOBUF_LITTLE_ENDIAN 1 - #endif -#endif -#include - - -namespace google { -namespace protobuf { - -class DescriptorPool; -class MessageFactory; - -namespace io { - -// Defined in this file. -class CodedInputStream; -class CodedOutputStream; - -// Defined in other files. -class ZeroCopyInputStream; // zero_copy_stream.h -class ZeroCopyOutputStream; // zero_copy_stream.h - -// Class which reads and decodes binary data which is composed of varint- -// encoded integers and fixed-width pieces. Wraps a ZeroCopyInputStream. -// Most users will not need to deal with CodedInputStream. -// -// Most methods of CodedInputStream that return a bool return false if an -// underlying I/O error occurs or if the data is malformed. Once such a -// failure occurs, the CodedInputStream is broken and is no longer useful. -class LIBPROTOBUF_EXPORT CodedInputStream { - public: - // Create a CodedInputStream that reads from the given ZeroCopyInputStream. - explicit CodedInputStream(ZeroCopyInputStream* input); - - // Create a CodedInputStream that reads from the given flat array. This is - // faster than using an ArrayInputStream. PushLimit(size) is implied by - // this constructor. - explicit CodedInputStream(const uint8* buffer, int size); - - // Destroy the CodedInputStream and position the underlying - // ZeroCopyInputStream at the first unread byte. If an error occurred while - // reading (causing a method to return false), then the exact position of - // the input stream may be anywhere between the last value that was read - // successfully and the stream's byte limit. - ~CodedInputStream(); - - - // Skips a number of bytes. Returns false if an underlying read error - // occurs. - bool Skip(int count); - - // Sets *data to point directly at the unread part of the CodedInputStream's - // underlying buffer, and *size to the size of that buffer, but does not - // advance the stream's current position. This will always either produce - // a non-empty buffer or return false. If the caller consumes any of - // this data, it should then call Skip() to skip over the consumed bytes. - // This may be useful for implementing external fast parsing routines for - // types of data not covered by the CodedInputStream interface. - bool GetDirectBufferPointer(const void** data, int* size); - - // Like GetDirectBufferPointer, but this method is inlined, and does not - // attempt to Refresh() if the buffer is currently empty. - inline void GetDirectBufferPointerInline(const void** data, - int* size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - // Read raw bytes, copying them into the given buffer. - bool ReadRaw(void* buffer, int size); - - // Like ReadRaw, but reads into a string. - // - // Implementation Note: ReadString() grows the string gradually as it - // reads in the data, rather than allocating the entire requested size - // upfront. This prevents denial-of-service attacks in which a client - // could claim that a string is going to be MAX_INT bytes long in order to - // crash the server because it can't allocate this much space at once. - bool ReadString(string* buffer, int size); - // Like the above, with inlined optimizations. This should only be used - // by the protobuf implementation. - inline bool InternalReadStringInline(string* buffer, - int size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - - // Read a 32-bit little-endian integer. - bool ReadLittleEndian32(uint32* value); - // Read a 64-bit little-endian integer. - bool ReadLittleEndian64(uint64* value); - - // These methods read from an externally provided buffer. The caller is - // responsible for ensuring that the buffer has sufficient space. - // Read a 32-bit little-endian integer. - static const uint8* ReadLittleEndian32FromArray(const uint8* buffer, - uint32* value); - // Read a 64-bit little-endian integer. - static const uint8* ReadLittleEndian64FromArray(const uint8* buffer, - uint64* value); - - // Read an unsigned integer with Varint encoding, truncating to 32 bits. - // Reading a 32-bit value is equivalent to reading a 64-bit one and casting - // it to uint32, but may be more efficient. - bool ReadVarint32(uint32* value); - // Read an unsigned integer with Varint encoding. - bool ReadVarint64(uint64* value); - - // Read a tag. This calls ReadVarint32() and returns the result, or returns - // zero (which is not a valid tag) if ReadVarint32() fails. Also, it updates - // the last tag value, which can be checked with LastTagWas(). - // Always inline because this is only called in once place per parse loop - // but it is called for every iteration of said loop, so it should be fast. - // GCC doesn't want to inline this by default. - uint32 ReadTag() GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - // Usually returns true if calling ReadVarint32() now would produce the given - // value. Will always return false if ReadVarint32() would not return the - // given value. If ExpectTag() returns true, it also advances past - // the varint. For best performance, use a compile-time constant as the - // parameter. - // Always inline because this collapses to a small number of instructions - // when given a constant parameter, but GCC doesn't want to inline by default. - bool ExpectTag(uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - // Like above, except this reads from the specified buffer. The caller is - // responsible for ensuring that the buffer is large enough to read a varint - // of the expected size. For best performance, use a compile-time constant as - // the expected tag parameter. - // - // Returns a pointer beyond the expected tag if it was found, or NULL if it - // was not. - static const uint8* ExpectTagFromArray( - const uint8* buffer, - uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - // Usually returns true if no more bytes can be read. Always returns false - // if more bytes can be read. If ExpectAtEnd() returns true, a subsequent - // call to LastTagWas() will act as if ReadTag() had been called and returned - // zero, and ConsumedEntireMessage() will return true. - bool ExpectAtEnd(); - - // If the last call to ReadTag() returned the given value, returns true. - // Otherwise, returns false; - // - // This is needed because parsers for some types of embedded messages - // (with field type TYPE_GROUP) don't actually know that they've reached the - // end of a message until they see an ENDGROUP tag, which was actually part - // of the enclosing message. The enclosing message would like to check that - // tag to make sure it had the right number, so it calls LastTagWas() on - // return from the embedded parser to check. - bool LastTagWas(uint32 expected); - - // When parsing message (but NOT a group), this method must be called - // immediately after MergeFromCodedStream() returns (if it returns true) - // to further verify that the message ended in a legitimate way. For - // example, this verifies that parsing did not end on an end-group tag. - // It also checks for some cases where, due to optimizations, - // MergeFromCodedStream() can incorrectly return true. - bool ConsumedEntireMessage(); - - // Limits ---------------------------------------------------------- - // Limits are used when parsing length-delimited embedded messages. - // After the message's length is read, PushLimit() is used to prevent - // the CodedInputStream from reading beyond that length. Once the - // embedded message has been parsed, PopLimit() is called to undo the - // limit. - - // Opaque type used with PushLimit() and PopLimit(). Do not modify - // values of this type yourself. The only reason that this isn't a - // struct with private internals is for efficiency. - typedef int Limit; - - // Places a limit on the number of bytes that the stream may read, - // starting from the current position. Once the stream hits this limit, - // it will act like the end of the input has been reached until PopLimit() - // is called. - // - // As the names imply, the stream conceptually has a stack of limits. The - // shortest limit on the stack is always enforced, even if it is not the - // top limit. - // - // The value returned by PushLimit() is opaque to the caller, and must - // be passed unchanged to the corresponding call to PopLimit(). - Limit PushLimit(int byte_limit); - - // Pops the last limit pushed by PushLimit(). The input must be the value - // returned by that call to PushLimit(). - void PopLimit(Limit limit); - - // Returns the number of bytes left until the nearest limit on the - // stack is hit, or -1 if no limits are in place. - int BytesUntilLimit(); - - // Total Bytes Limit ----------------------------------------------- - // To prevent malicious users from sending excessively large messages - // and causing integer overflows or memory exhaustion, CodedInputStream - // imposes a hard limit on the total number of bytes it will read. - - // Sets the maximum number of bytes that this CodedInputStream will read - // before refusing to continue. To prevent integer overflows in the - // protocol buffers implementation, as well as to prevent servers from - // allocating enormous amounts of memory to hold parsed messages, the - // maximum message length should be limited to the shortest length that - // will not harm usability. The theoretical shortest message that could - // cause integer overflows is 512MB. The default limit is 64MB. Apps - // should set shorter limits if possible. If warning_threshold is not -1, - // a warning will be printed to stderr after warning_threshold bytes are - // read. An error will always be printed to stderr if the limit is - // reached. - // - // This is unrelated to PushLimit()/PopLimit(). - // - // Hint: If you are reading this because your program is printing a - // warning about dangerously large protocol messages, you may be - // confused about what to do next. The best option is to change your - // design such that excessively large messages are not necessary. - // For example, try to design file formats to consist of many small - // messages rather than a single large one. If this is infeasible, - // you will need to increase the limit. Chances are, though, that - // your code never constructs a CodedInputStream on which the limit - // can be set. You probably parse messages by calling things like - // Message::ParseFromString(). In this case, you will need to change - // your code to instead construct some sort of ZeroCopyInputStream - // (e.g. an ArrayInputStream), construct a CodedInputStream around - // that, then call Message::ParseFromCodedStream() instead. Then - // you can adjust the limit. Yes, it's more work, but you're doing - // something unusual. - void SetTotalBytesLimit(int total_bytes_limit, int warning_threshold); - - // Recursion Limit ------------------------------------------------- - // To prevent corrupt or malicious messages from causing stack overflows, - // we must keep track of the depth of recursion when parsing embedded - // messages and groups. CodedInputStream keeps track of this because it - // is the only object that is passed down the stack during parsing. - - // Sets the maximum recursion depth. The default is 64. - void SetRecursionLimit(int limit); - - // Increments the current recursion depth. Returns true if the depth is - // under the limit, false if it has gone over. - bool IncrementRecursionDepth(); - - // Decrements the recursion depth. - void DecrementRecursionDepth(); - - // Extension Registry ---------------------------------------------- - // ADVANCED USAGE: 99.9% of people can ignore this section. - // - // By default, when parsing extensions, the parser looks for extension - // definitions in the pool which owns the outer message's Descriptor. - // However, you may call SetExtensionRegistry() to provide an alternative - // pool instead. This makes it possible, for example, to parse a message - // using a generated class, but represent some extensions using - // DynamicMessage. - - // Set the pool used to look up extensions. Most users do not need to call - // this as the correct pool will be chosen automatically. - // - // WARNING: It is very easy to misuse this. Carefully read the requirements - // below. Do not use this unless you are sure you need it. Almost no one - // does. - // - // Let's say you are parsing a message into message object m, and you want - // to take advantage of SetExtensionRegistry(). You must follow these - // requirements: - // - // The given DescriptorPool must contain m->GetDescriptor(). It is not - // sufficient for it to simply contain a descriptor that has the same name - // and content -- it must be the *exact object*. In other words: - // assert(pool->FindMessageTypeByName(m->GetDescriptor()->full_name()) == - // m->GetDescriptor()); - // There are two ways to satisfy this requirement: - // 1) Use m->GetDescriptor()->pool() as the pool. This is generally useless - // because this is the pool that would be used anyway if you didn't call - // SetExtensionRegistry() at all. - // 2) Use a DescriptorPool which has m->GetDescriptor()->pool() as an - // "underlay". Read the documentation for DescriptorPool for more - // information about underlays. - // - // You must also provide a MessageFactory. This factory will be used to - // construct Message objects representing extensions. The factory's - // GetPrototype() MUST return non-NULL for any Descriptor which can be found - // through the provided pool. - // - // If the provided factory might return instances of protocol-compiler- - // generated (i.e. compiled-in) types, or if the outer message object m is - // a generated type, then the given factory MUST have this property: If - // GetPrototype() is given a Descriptor which resides in - // DescriptorPool::generated_pool(), the factory MUST return the same - // prototype which MessageFactory::generated_factory() would return. That - // is, given a descriptor for a generated type, the factory must return an - // instance of the generated class (NOT DynamicMessage). However, when - // given a descriptor for a type that is NOT in generated_pool, the factory - // is free to return any implementation. - // - // The reason for this requirement is that generated sub-objects may be - // accessed via the standard (non-reflection) extension accessor methods, - // and these methods will down-cast the object to the generated class type. - // If the object is not actually of that type, the results would be undefined. - // On the other hand, if an extension is not compiled in, then there is no - // way the code could end up accessing it via the standard accessors -- the - // only way to access the extension is via reflection. When using reflection, - // DynamicMessage and generated messages are indistinguishable, so it's fine - // if these objects are represented using DynamicMessage. - // - // Using DynamicMessageFactory on which you have called - // SetDelegateToGeneratedFactory(true) should be sufficient to satisfy the - // above requirement. - // - // If either pool or factory is NULL, both must be NULL. - // - // Note that this feature is ignored when parsing "lite" messages as they do - // not have descriptors. - void SetExtensionRegistry(DescriptorPool* pool, MessageFactory* factory); - - // Get the DescriptorPool set via SetExtensionRegistry(), or NULL if no pool - // has been provided. - const DescriptorPool* GetExtensionPool(); - - // Get the MessageFactory set via SetExtensionRegistry(), or NULL if no - // factory has been provided. - MessageFactory* GetExtensionFactory(); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedInputStream); - - ZeroCopyInputStream* input_; - const uint8* buffer_; - const uint8* buffer_end_; // pointer to the end of the buffer. - int total_bytes_read_; // total bytes read from input_, including - // the current buffer - - // If total_bytes_read_ surpasses INT_MAX, we record the extra bytes here - // so that we can BackUp() on destruction. - int overflow_bytes_; - - // LastTagWas() stuff. - uint32 last_tag_; // result of last ReadTag(). - - // This is set true by ReadTag{Fallback/Slow}() if it is called when exactly - // at EOF, or by ExpectAtEnd() when it returns true. This happens when we - // reach the end of a message and attempt to read another tag. - bool legitimate_message_end_; - - // See EnableAliasing(). - bool aliasing_enabled_; - - // Limits - Limit current_limit_; // if position = -1, no limit is applied - - // For simplicity, if the current buffer crosses a limit (either a normal - // limit created by PushLimit() or the total bytes limit), buffer_size_ - // only tracks the number of bytes before that limit. This field - // contains the number of bytes after it. Note that this implies that if - // buffer_size_ == 0 and buffer_size_after_limit_ > 0, we know we've - // hit a limit. However, if both are zero, it doesn't necessarily mean - // we aren't at a limit -- the buffer may have ended exactly at the limit. - int buffer_size_after_limit_; - - // Maximum number of bytes to read, period. This is unrelated to - // current_limit_. Set using SetTotalBytesLimit(). - int total_bytes_limit_; - int total_bytes_warning_threshold_; - - // Current recursion depth, controlled by IncrementRecursionDepth() and - // DecrementRecursionDepth(). - int recursion_depth_; - // Recursion depth limit, set by SetRecursionLimit(). - int recursion_limit_; - - // See SetExtensionRegistry(). - const DescriptorPool* extension_pool_; - MessageFactory* extension_factory_; - - // Private member functions. - - // Advance the buffer by a given number of bytes. - void Advance(int amount); - - // Back up input_ to the current buffer position. - void BackUpInputToCurrentPosition(); - - // Recomputes the value of buffer_size_after_limit_. Must be called after - // current_limit_ or total_bytes_limit_ changes. - void RecomputeBufferLimits(); - - // Writes an error message saying that we hit total_bytes_limit_. - void PrintTotalBytesLimitError(); - - // Called when the buffer runs out to request more data. Implies an - // Advance(BufferSize()). - bool Refresh(); - - // When parsing varints, we optimize for the common case of small values, and - // then optimize for the case when the varint fits within the current buffer - // piece. The Fallback method is used when we can't use the one-byte - // optimization. The Slow method is yet another fallback when the buffer is - // not large enough. Making the slow path out-of-line speeds up the common - // case by 10-15%. The slow path is fairly uncommon: it only triggers when a - // message crosses multiple buffers. - bool ReadVarint32Fallback(uint32* value); - bool ReadVarint64Fallback(uint64* value); - bool ReadVarint32Slow(uint32* value); - bool ReadVarint64Slow(uint64* value); - bool ReadLittleEndian32Fallback(uint32* value); - bool ReadLittleEndian64Fallback(uint64* value); - // Fallback/slow methods for reading tags. These do not update last_tag_, - // but will set legitimate_message_end_ if we are at the end of the input - // stream. - uint32 ReadTagFallback(); - uint32 ReadTagSlow(); - bool ReadStringFallback(string* buffer, int size); - - // Return the size of the buffer. - int BufferSize() const; - - static const int kDefaultTotalBytesLimit = 64 << 20; // 64MB - - static const int kDefaultTotalBytesWarningThreshold = 32 << 20; // 32MB - static const int kDefaultRecursionLimit = 64; -}; - -// Class which encodes and writes binary data which is composed of varint- -// encoded integers and fixed-width pieces. Wraps a ZeroCopyOutputStream. -// Most users will not need to deal with CodedOutputStream. -// -// Most methods of CodedOutputStream which return a bool return false if an -// underlying I/O error occurs. Once such a failure occurs, the -// CodedOutputStream is broken and is no longer useful. The Write* methods do -// not return the stream status, but will invalidate the stream if an error -// occurs. The client can probe HadError() to determine the status. -// -// Note that every method of CodedOutputStream which writes some data has -// a corresponding static "ToArray" version. These versions write directly -// to the provided buffer, returning a pointer past the last written byte. -// They require that the buffer has sufficient capacity for the encoded data. -// This allows an optimization where we check if an output stream has enough -// space for an entire message before we start writing and, if there is, we -// call only the ToArray methods to avoid doing bound checks for each -// individual value. -// i.e., in the example above: -// -// CodedOutputStream coded_output = new CodedOutputStream(raw_output); -// int magic_number = 1234; -// char text[] = "Hello world!"; -// -// int coded_size = sizeof(magic_number) + -// CodedOutputStream::VarintSize32(strlen(text)) + -// strlen(text); -// -// uint8* buffer = -// coded_output->GetDirectBufferForNBytesAndAdvance(coded_size); -// if (buffer != NULL) { -// // The output stream has enough space in the buffer: write directly to -// // the array. -// buffer = CodedOutputStream::WriteLittleEndian32ToArray(magic_number, -// buffer); -// buffer = CodedOutputStream::WriteVarint32ToArray(strlen(text), buffer); -// buffer = CodedOutputStream::WriteRawToArray(text, strlen(text), buffer); -// } else { -// // Make bound-checked writes, which will ask the underlying stream for -// // more space as needed. -// coded_output->WriteLittleEndian32(magic_number); -// coded_output->WriteVarint32(strlen(text)); -// coded_output->WriteRaw(text, strlen(text)); -// } -// -// delete coded_output; -class LIBPROTOBUF_EXPORT CodedOutputStream { - public: - // Create an CodedOutputStream that writes to the given ZeroCopyOutputStream. - explicit CodedOutputStream(ZeroCopyOutputStream* output); - - // Destroy the CodedOutputStream and position the underlying - // ZeroCopyOutputStream immediately after the last byte written. - ~CodedOutputStream(); - - // Skips a number of bytes, leaving the bytes unmodified in the underlying - // buffer. Returns false if an underlying write error occurs. This is - // mainly useful with GetDirectBufferPointer(). - bool Skip(int count); - - // Sets *data to point directly at the unwritten part of the - // CodedOutputStream's underlying buffer, and *size to the size of that - // buffer, but does not advance the stream's current position. This will - // always either produce a non-empty buffer or return false. If the caller - // writes any data to this buffer, it should then call Skip() to skip over - // the consumed bytes. This may be useful for implementing external fast - // serialization routines for types of data not covered by the - // CodedOutputStream interface. - bool GetDirectBufferPointer(void** data, int* size); - - // If there are at least "size" bytes available in the current buffer, - // returns a pointer directly into the buffer and advances over these bytes. - // The caller may then write directly into this buffer (e.g. using the - // *ToArray static methods) rather than go through CodedOutputStream. If - // there are not enough bytes available, returns NULL. The return pointer is - // invalidated as soon as any other non-const method of CodedOutputStream - // is called. - inline uint8* GetDirectBufferForNBytesAndAdvance(int size); - - // Write raw bytes, copying them from the given buffer. - void WriteRaw(const void* buffer, int size); - // Like WriteRaw() but writing directly to the target array. - // This is _not_ inlined, as the compiler often optimizes memcpy into inline - // copy loops. Since this gets called by every field with string or bytes - // type, inlining may lead to a significant amount of code bloat, with only a - // minor performance gain. - static uint8* WriteRawToArray(const void* buffer, int size, uint8* target); - - // Equivalent to WriteRaw(str.data(), str.size()). - void WriteString(const string& str); - // Like WriteString() but writing directly to the target array. - static uint8* WriteStringToArray(const string& str, uint8* target); - - - // Write a 32-bit little-endian integer. - void WriteLittleEndian32(uint32 value); - // Like WriteLittleEndian32() but writing directly to the target array. - static uint8* WriteLittleEndian32ToArray(uint32 value, uint8* target); - // Write a 64-bit little-endian integer. - void WriteLittleEndian64(uint64 value); - // Like WriteLittleEndian64() but writing directly to the target array. - static uint8* WriteLittleEndian64ToArray(uint64 value, uint8* target); - - // Write an unsigned integer with Varint encoding. Writing a 32-bit value - // is equivalent to casting it to uint64 and writing it as a 64-bit value, - // but may be more efficient. - void WriteVarint32(uint32 value); - // Like WriteVarint32() but writing directly to the target array. - static uint8* WriteVarint32ToArray(uint32 value, uint8* target); - // Write an unsigned integer with Varint encoding. - void WriteVarint64(uint64 value); - // Like WriteVarint64() but writing directly to the target array. - static uint8* WriteVarint64ToArray(uint64 value, uint8* target); - - // Equivalent to WriteVarint32() except when the value is negative, - // in which case it must be sign-extended to a full 10 bytes. - void WriteVarint32SignExtended(int32 value); - // Like WriteVarint32SignExtended() but writing directly to the target array. - static uint8* WriteVarint32SignExtendedToArray(int32 value, uint8* target); - - // This is identical to WriteVarint32(), but optimized for writing tags. - // In particular, if the input is a compile-time constant, this method - // compiles down to a couple instructions. - // Always inline because otherwise the aformentioned optimization can't work, - // but GCC by default doesn't want to inline this. - void WriteTag(uint32 value); - // Like WriteTag() but writing directly to the target array. - static uint8* WriteTagToArray( - uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - // Returns the number of bytes needed to encode the given value as a varint. - static int VarintSize32(uint32 value); - // Returns the number of bytes needed to encode the given value as a varint. - static int VarintSize64(uint64 value); - - // If negative, 10 bytes. Otheriwse, same as VarintSize32(). - static int VarintSize32SignExtended(int32 value); - - // Returns the total number of bytes written since this object was created. - inline int ByteCount() const; - - // Returns true if there was an underlying I/O error since this object was - // created. - bool HadError() const { return had_error_; } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream); - - ZeroCopyOutputStream* output_; - uint8* buffer_; - int buffer_size_; - int total_bytes_; // Sum of sizes of all buffers seen so far. - bool had_error_; // Whether an error occurred during output. - - // Advance the buffer by a given number of bytes. - void Advance(int amount); - - // Called when the buffer runs out to request more data. Implies an - // Advance(buffer_size_). - bool Refresh(); - - static uint8* WriteVarint32FallbackToArray(uint32 value, uint8* target); - - // Always-inlined versions of WriteVarint* functions so that code can be - // reused, while still controlling size. For instance, WriteVarint32ToArray() - // should not directly call this: since it is inlined itself, doing so - // would greatly increase the size of generated code. Instead, it should call - // WriteVarint32FallbackToArray. Meanwhile, WriteVarint32() is already - // out-of-line, so it should just invoke this directly to avoid any extra - // function call overhead. - static uint8* WriteVarint32FallbackToArrayInline( - uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - static uint8* WriteVarint64ToArrayInline( - uint64 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - static int VarintSize32Fallback(uint32 value); -}; - -// inline methods ==================================================== -// The vast majority of varints are only one byte. These inline -// methods optimize for that case. - -inline bool CodedInputStream::ReadVarint32(uint32* value) { - if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) { - *value = *buffer_; - Advance(1); - return true; - } else { - return ReadVarint32Fallback(value); - } -} - -inline bool CodedInputStream::ReadVarint64(uint64* value) { - if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) { - *value = *buffer_; - Advance(1); - return true; - } else { - return ReadVarint64Fallback(value); - } -} - -// static -inline const uint8* CodedInputStream::ReadLittleEndian32FromArray( - const uint8* buffer, - uint32* value) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - memcpy(value, buffer, sizeof(*value)); - return buffer + sizeof(*value); -#else - *value = (static_cast(buffer[0]) ) | - (static_cast(buffer[1]) << 8) | - (static_cast(buffer[2]) << 16) | - (static_cast(buffer[3]) << 24); - return buffer + sizeof(*value); -#endif -} -// static -inline const uint8* CodedInputStream::ReadLittleEndian64FromArray( - const uint8* buffer, - uint64* value) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - memcpy(value, buffer, sizeof(*value)); - return buffer + sizeof(*value); -#else - uint32 part0 = (static_cast(buffer[0]) ) | - (static_cast(buffer[1]) << 8) | - (static_cast(buffer[2]) << 16) | - (static_cast(buffer[3]) << 24); - uint32 part1 = (static_cast(buffer[4]) ) | - (static_cast(buffer[5]) << 8) | - (static_cast(buffer[6]) << 16) | - (static_cast(buffer[7]) << 24); - *value = static_cast(part0) | - (static_cast(part1) << 32); - return buffer + sizeof(*value); -#endif -} - -inline bool CodedInputStream::ReadLittleEndian32(uint32* value) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast(sizeof(*value)))) { - memcpy(value, buffer_, sizeof(*value)); - Advance(sizeof(*value)); - return true; - } else { - return ReadLittleEndian32Fallback(value); - } -#else - return ReadLittleEndian32Fallback(value); -#endif -} - -inline bool CodedInputStream::ReadLittleEndian64(uint64* value) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast(sizeof(*value)))) { - memcpy(value, buffer_, sizeof(*value)); - Advance(sizeof(*value)); - return true; - } else { - return ReadLittleEndian64Fallback(value); - } -#else - return ReadLittleEndian64Fallback(value); -#endif -} - -inline uint32 CodedInputStream::ReadTag() { - if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] < 0x80) { - last_tag_ = buffer_[0]; - Advance(1); - return last_tag_; - } else { - last_tag_ = ReadTagFallback(); - return last_tag_; - } -} - -inline bool CodedInputStream::LastTagWas(uint32 expected) { - return last_tag_ == expected; -} - -inline bool CodedInputStream::ConsumedEntireMessage() { - return legitimate_message_end_; -} - -inline bool CodedInputStream::ExpectTag(uint32 expected) { - if (expected < (1 << 7)) { - if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] == expected) { - Advance(1); - return true; - } else { - return false; - } - } else if (expected < (1 << 14)) { - if (GOOGLE_PREDICT_TRUE(BufferSize() >= 2) && - buffer_[0] == static_cast(expected | 0x80) && - buffer_[1] == static_cast(expected >> 7)) { - Advance(2); - return true; - } else { - return false; - } - } else { - // Don't bother optimizing for larger values. - return false; - } -} - -inline const uint8* CodedInputStream::ExpectTagFromArray( - const uint8* buffer, uint32 expected) { - if (expected < (1 << 7)) { - if (buffer[0] == expected) { - return buffer + 1; - } - } else if (expected < (1 << 14)) { - if (buffer[0] == static_cast(expected | 0x80) && - buffer[1] == static_cast(expected >> 7)) { - return buffer + 2; - } - } - return NULL; -} - -inline void CodedInputStream::GetDirectBufferPointerInline(const void** data, - int* size) { - *data = buffer_; - *size = buffer_end_ - buffer_; -} - -inline bool CodedInputStream::ExpectAtEnd() { - // If we are at a limit we know no more bytes can be read. Otherwise, it's - // hard to say without calling Refresh(), and we'd rather not do that. - - if (buffer_ == buffer_end_ && buffer_size_after_limit_ != 0) { - last_tag_ = 0; // Pretend we called ReadTag()... - legitimate_message_end_ = true; // ... and it hit EOF. - return true; - } else { - return false; - } -} - -inline uint8* CodedOutputStream::GetDirectBufferForNBytesAndAdvance(int size) { - if (buffer_size_ < size) { - return NULL; - } else { - uint8* result = buffer_; - Advance(size); - return result; - } -} - -inline uint8* CodedOutputStream::WriteVarint32ToArray(uint32 value, - uint8* target) { - if (value < 0x80) { - *target = value; - return target + 1; - } else { - return WriteVarint32FallbackToArray(value, target); - } -} - -inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) { - if (value < 0) { - WriteVarint64(static_cast(value)); - } else { - WriteVarint32(static_cast(value)); - } -} - -inline uint8* CodedOutputStream::WriteVarint32SignExtendedToArray( - int32 value, uint8* target) { - if (value < 0) { - return WriteVarint64ToArray(static_cast(value), target); - } else { - return WriteVarint32ToArray(static_cast(value), target); - } -} - -inline uint8* CodedOutputStream::WriteLittleEndian32ToArray(uint32 value, - uint8* target) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - memcpy(target, &value, sizeof(value)); -#else - target[0] = static_cast(value); - target[1] = static_cast(value >> 8); - target[2] = static_cast(value >> 16); - target[3] = static_cast(value >> 24); -#endif - return target + sizeof(value); -} - -inline uint8* CodedOutputStream::WriteLittleEndian64ToArray(uint64 value, - uint8* target) { -#if defined(PROTOBUF_LITTLE_ENDIAN) - memcpy(target, &value, sizeof(value)); -#else - uint32 part0 = static_cast(value); - uint32 part1 = static_cast(value >> 32); - - target[0] = static_cast(part0); - target[1] = static_cast(part0 >> 8); - target[2] = static_cast(part0 >> 16); - target[3] = static_cast(part0 >> 24); - target[4] = static_cast(part1); - target[5] = static_cast(part1 >> 8); - target[6] = static_cast(part1 >> 16); - target[7] = static_cast(part1 >> 24); -#endif - return target + sizeof(value); -} - -inline void CodedOutputStream::WriteTag(uint32 value) { - WriteVarint32(value); -} - -inline uint8* CodedOutputStream::WriteTagToArray( - uint32 value, uint8* target) { - if (value < (1 << 7)) { - target[0] = value; - return target + 1; - } else if (value < (1 << 14)) { - target[0] = static_cast(value | 0x80); - target[1] = static_cast(value >> 7); - return target + 2; - } else { - return WriteVarint32FallbackToArray(value, target); - } -} - -inline int CodedOutputStream::VarintSize32(uint32 value) { - if (value < (1 << 7)) { - return 1; - } else { - return VarintSize32Fallback(value); - } -} - -inline int CodedOutputStream::VarintSize32SignExtended(int32 value) { - if (value < 0) { - return 10; // TODO(kenton): Make this a symbolic constant. - } else { - return VarintSize32(static_cast(value)); - } -} - -inline void CodedOutputStream::WriteString(const string& str) { - WriteRaw(str.data(), static_cast(str.size())); -} - -inline uint8* CodedOutputStream::WriteStringToArray( - const string& str, uint8* target) { - return WriteRawToArray(str.data(), static_cast(str.size()), target); -} - -inline int CodedOutputStream::ByteCount() const { - return total_bytes_ - buffer_size_; -} - -inline void CodedInputStream::Advance(int amount) { - buffer_ += amount; -} - -inline void CodedOutputStream::Advance(int amount) { - buffer_ += amount; - buffer_size_ -= amount; -} - -inline void CodedInputStream::SetRecursionLimit(int limit) { - recursion_limit_ = limit; -} - -inline bool CodedInputStream::IncrementRecursionDepth() { - ++recursion_depth_; - return recursion_depth_ <= recursion_limit_; -} - -inline void CodedInputStream::DecrementRecursionDepth() { - if (recursion_depth_ > 0) --recursion_depth_; -} - -inline void CodedInputStream::SetExtensionRegistry(DescriptorPool* pool, - MessageFactory* factory) { - extension_pool_ = pool; - extension_factory_ = factory; -} - -inline const DescriptorPool* CodedInputStream::GetExtensionPool() { - return extension_pool_; -} - -inline MessageFactory* CodedInputStream::GetExtensionFactory() { - return extension_factory_; -} - -inline int CodedInputStream::BufferSize() const { - return buffer_end_ - buffer_; -} - -inline CodedInputStream::CodedInputStream(ZeroCopyInputStream* input) - : input_(input), - buffer_(NULL), - buffer_end_(NULL), - total_bytes_read_(0), - overflow_bytes_(0), - last_tag_(0), - legitimate_message_end_(false), - aliasing_enabled_(false), - current_limit_(kint32max), - buffer_size_after_limit_(0), - total_bytes_limit_(kDefaultTotalBytesLimit), - total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold), - recursion_depth_(0), - recursion_limit_(kDefaultRecursionLimit), - extension_pool_(NULL), - extension_factory_(NULL) { - // Eagerly Refresh() so buffer space is immediately available. - Refresh(); -} - -inline CodedInputStream::CodedInputStream(const uint8* buffer, int size) - : input_(NULL), - buffer_(buffer), - buffer_end_(buffer + size), - total_bytes_read_(size), - overflow_bytes_(0), - last_tag_(0), - legitimate_message_end_(false), - aliasing_enabled_(false), - current_limit_(size), - buffer_size_after_limit_(0), - total_bytes_limit_(kDefaultTotalBytesLimit), - total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold), - recursion_depth_(0), - recursion_limit_(kDefaultRecursionLimit), - extension_pool_(NULL), - extension_factory_(NULL) { - // Note that setting current_limit_ == size is important to prevent some - // code paths from trying to access input_ and segfaulting. -} - -inline CodedInputStream::~CodedInputStream() { - if (input_ != NULL) { - BackUpInputToCurrentPosition(); - } -} - -} // namespace io -} // namespace protobuf - - -#if defined(_MSC_VER) && _MSC_VER >= 1300 - #pragma runtime_checks("c", restore) -#endif // _MSC_VER - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_inl.h deleted file mode 100644 index e9799d47..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_inl.h +++ /dev/null @@ -1,64 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jasonh@google.com (Jason Hsueh) -// -// Implements methods of coded_stream.h that need to be inlined for performance -// reasons, but should not be defined in a public header. - -#ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ -#define GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -inline bool CodedInputStream::InternalReadStringInline(string* buffer, - int size) { - if (size < 0) return false; // security: size is often user-supplied - - if (BufferSize() >= size) { - STLStringResizeUninitialized(buffer, size); - memcpy(string_as_array(buffer), buffer_, size); - Advance(size); - return true; - } - - return ReadStringFallback(buffer, size); -} - -} // namespace io -} // namespace protobuf -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_unittest.cc deleted file mode 100644 index ff268ab9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/coded_stream_unittest.cc +++ /dev/null @@ -1,1131 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains tests and benchmarks. - -#include - -#include - -#include - -#include -#include -#include -#include -#include - - -// This declares an unsigned long long integer literal in a portable way. -// (The original macro is way too big and ruins my formatting.) -#undef ULL -#define ULL(x) GOOGLE_ULONGLONG(x) - -namespace google { -namespace protobuf { -namespace io { -namespace { - -// =================================================================== -// Data-Driven Test Infrastructure - -// TEST_1D and TEST_2D are macros I'd eventually like to see added to -// gTest. These macros can be used to declare tests which should be -// run multiple times, once for each item in some input array. TEST_1D -// tests all cases in a single input array. TEST_2D tests all -// combinations of cases from two arrays. The arrays must be statically -// defined such that the GOOGLE_ARRAYSIZE() macro works on them. Example: -// -// int kCases[] = {1, 2, 3, 4} -// TEST_1D(MyFixture, MyTest, kCases) { -// EXPECT_GT(kCases_case, 0); -// } -// -// This test iterates through the numbers 1, 2, 3, and 4 and tests that -// they are all grater than zero. In case of failure, the exact case -// which failed will be printed. The case type must be printable using -// ostream::operator<<. - -// TODO(kenton): gTest now supports "parameterized tests" which would be -// a better way to accomplish this. Rewrite when time permits. - -#define TEST_1D(FIXTURE, NAME, CASES) \ - class FIXTURE##_##NAME##_DD : public FIXTURE { \ - protected: \ - template \ - void DoSingleCase(const CaseType& CASES##_case); \ - }; \ - \ - TEST_F(FIXTURE##_##NAME##_DD, NAME) { \ - for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES); i++) { \ - SCOPED_TRACE(testing::Message() \ - << #CASES " case #" << i << ": " << CASES[i]); \ - DoSingleCase(CASES[i]); \ - } \ - } \ - \ - template \ - void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType& CASES##_case) - -#define TEST_2D(FIXTURE, NAME, CASES1, CASES2) \ - class FIXTURE##_##NAME##_DD : public FIXTURE { \ - protected: \ - template \ - void DoSingleCase(const CaseType1& CASES1##_case, \ - const CaseType2& CASES2##_case); \ - }; \ - \ - TEST_F(FIXTURE##_##NAME##_DD, NAME) { \ - for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES1); i++) { \ - for (int j = 0; j < GOOGLE_ARRAYSIZE(CASES2); j++) { \ - SCOPED_TRACE(testing::Message() \ - << #CASES1 " case #" << i << ": " << CASES1[i] << ", " \ - << #CASES2 " case #" << j << ": " << CASES2[j]); \ - DoSingleCase(CASES1[i], CASES2[j]); \ - } \ - } \ - } \ - \ - template \ - void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType1& CASES1##_case, \ - const CaseType2& CASES2##_case) - -// =================================================================== - -class CodedStreamTest : public testing::Test { - protected: - static const int kBufferSize = 1024 * 64; - static uint8 buffer_[kBufferSize]; -}; - -uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; - -// We test each operation over a variety of block sizes to insure that -// we test cases where reads or writes cross buffer boundaries, cases -// where they don't, and cases where there is so much buffer left that -// we can use special optimized paths that don't worry about bounds -// checks. -const int kBlockSizes[] = {1, 2, 3, 5, 7, 13, 32, 1024}; - -// ------------------------------------------------------------------- -// Varint tests. - -struct VarintCase { - uint8 bytes[10]; // Encoded bytes. - int size; // Encoded size, in bytes. - uint64 value; // Parsed value. -}; - -inline std::ostream& operator<<(std::ostream& os, const VarintCase& c) { - return os << c.value; -} - -VarintCase kVarintCases[] = { - // 32-bit values - {{0x00} , 1, 0}, - {{0x01} , 1, 1}, - {{0x7f} , 1, 127}, - {{0xa2, 0x74}, 2, (0x22 << 0) | (0x74 << 7)}, // 14882 - {{0xbe, 0xf7, 0x92, 0x84, 0x0b}, 5, // 2961488830 - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (ULL(0x0b) << 28)}, - - // 64-bit - {{0xbe, 0xf7, 0x92, 0x84, 0x1b}, 5, // 7256456126 - (0x3e << 0) | (0x77 << 7) | (0x12 << 14) | (0x04 << 21) | - (ULL(0x1b) << 28)}, - {{0x80, 0xe6, 0xeb, 0x9c, 0xc3, 0xc9, 0xa4, 0x49}, 8, // 41256202580718336 - (0x00 << 0) | (0x66 << 7) | (0x6b << 14) | (0x1c << 21) | - (ULL(0x43) << 28) | (ULL(0x49) << 35) | (ULL(0x24) << 42) | - (ULL(0x49) << 49)}, - // 11964378330978735131 - {{0x9b, 0xa8, 0xf9, 0xc2, 0xbb, 0xd6, 0x80, 0x85, 0xa6, 0x01}, 10, - (0x1b << 0) | (0x28 << 7) | (0x79 << 14) | (0x42 << 21) | - (ULL(0x3b) << 28) | (ULL(0x56) << 35) | (ULL(0x00) << 42) | - (ULL(0x05) << 49) | (ULL(0x26) << 56) | (ULL(0x01) << 63)}, -}; - -TEST_2D(CodedStreamTest, ReadVarint32, kVarintCases, kBlockSizes) { - memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - uint32 value; - EXPECT_TRUE(coded_input.ReadVarint32(&value)); - EXPECT_EQ(static_cast(kVarintCases_case.value), value); - } - - EXPECT_EQ(kVarintCases_case.size, input.ByteCount()); -} - -TEST_2D(CodedStreamTest, ReadTag, kVarintCases, kBlockSizes) { - memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - uint32 expected_value = static_cast(kVarintCases_case.value); - EXPECT_EQ(expected_value, coded_input.ReadTag()); - - EXPECT_TRUE(coded_input.LastTagWas(expected_value)); - EXPECT_FALSE(coded_input.LastTagWas(expected_value + 1)); - } - - EXPECT_EQ(kVarintCases_case.size, input.ByteCount()); -} - -// This is the regression test that verifies that there is no issues -// with the empty input buffers handling. -TEST_F(CodedStreamTest, EmptyInputBeforeEos) { - class In : public ZeroCopyInputStream { - public: - In() : count_(0) {} - private: - virtual bool Next(const void** data, int* size) { - *data = NULL; - *size = 0; - return count_++ < 2; - } - virtual void BackUp(int count) { - GOOGLE_LOG(FATAL) << "Tests never call this."; - } - virtual bool Skip(int count) { - GOOGLE_LOG(FATAL) << "Tests never call this."; - return false; - } - virtual int64 ByteCount() const { return 0; } - int count_; - } in; - CodedInputStream input(&in); - input.ReadTag(); - EXPECT_TRUE(input.ConsumedEntireMessage()); -} - -TEST_1D(CodedStreamTest, ExpectTag, kVarintCases) { - // Leave one byte at the beginning of the buffer so we can read it - // to force the first buffer to be loaded. - buffer_[0] = '\0'; - memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); - ArrayInputStream input(buffer_, sizeof(buffer_)); - - { - CodedInputStream coded_input(&input); - - // Read one byte to force coded_input.Refill() to be called. Otherwise, - // ExpectTag() will return a false negative. - uint8 dummy; - coded_input.ReadRaw(&dummy, 1); - EXPECT_EQ((uint)'\0', (uint)dummy); - - uint32 expected_value = static_cast(kVarintCases_case.value); - - // ExpectTag() produces false negatives for large values. - if (kVarintCases_case.size <= 2) { - EXPECT_FALSE(coded_input.ExpectTag(expected_value + 1)); - EXPECT_TRUE(coded_input.ExpectTag(expected_value)); - } else { - EXPECT_FALSE(coded_input.ExpectTag(expected_value)); - } - } - - if (kVarintCases_case.size <= 2) { - EXPECT_EQ(kVarintCases_case.size + 1, input.ByteCount()); - } else { - EXPECT_EQ(1, input.ByteCount()); - } -} - -TEST_1D(CodedStreamTest, ExpectTagFromArray, kVarintCases) { - memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); - - const uint32 expected_value = static_cast(kVarintCases_case.value); - - // If the expectation succeeds, it should return a pointer past the tag. - if (kVarintCases_case.size <= 2) { - EXPECT_TRUE(NULL == - CodedInputStream::ExpectTagFromArray(buffer_, - expected_value + 1)); - EXPECT_TRUE(buffer_ + kVarintCases_case.size == - CodedInputStream::ExpectTagFromArray(buffer_, expected_value)); - } else { - EXPECT_TRUE(NULL == - CodedInputStream::ExpectTagFromArray(buffer_, expected_value)); - } -} - -TEST_2D(CodedStreamTest, ReadVarint64, kVarintCases, kBlockSizes) { - memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - uint64 value; - EXPECT_TRUE(coded_input.ReadVarint64(&value)); - EXPECT_EQ(kVarintCases_case.value, value); - } - - EXPECT_EQ(kVarintCases_case.size, input.ByteCount()); -} - -TEST_2D(CodedStreamTest, WriteVarint32, kVarintCases, kBlockSizes) { - if (kVarintCases_case.value > ULL(0x00000000FFFFFFFF)) { - // Skip this test for the 64-bit values. - return; - } - - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteVarint32(static_cast(kVarintCases_case.value)); - EXPECT_FALSE(coded_output.HadError()); - - EXPECT_EQ(kVarintCases_case.size, coded_output.ByteCount()); - } - - EXPECT_EQ(kVarintCases_case.size, output.ByteCount()); - EXPECT_EQ(0, - memcmp(buffer_, kVarintCases_case.bytes, kVarintCases_case.size)); -} - -TEST_2D(CodedStreamTest, WriteVarint64, kVarintCases, kBlockSizes) { - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteVarint64(kVarintCases_case.value); - EXPECT_FALSE(coded_output.HadError()); - - EXPECT_EQ(kVarintCases_case.size, coded_output.ByteCount()); - } - - EXPECT_EQ(kVarintCases_case.size, output.ByteCount()); - EXPECT_EQ(0, - memcmp(buffer_, kVarintCases_case.bytes, kVarintCases_case.size)); -} - -// This test causes gcc 3.3.5 (and earlier?) to give the cryptic error: -// "sorry, unimplemented: `method_call_expr' not supported by dump_expr" -#if !defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) - -int32 kSignExtendedVarintCases[] = { - 0, 1, -1, 1237894, -37895138 -}; - -TEST_2D(CodedStreamTest, WriteVarint32SignExtended, - kSignExtendedVarintCases, kBlockSizes) { - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteVarint32SignExtended(kSignExtendedVarintCases_case); - EXPECT_FALSE(coded_output.HadError()); - - if (kSignExtendedVarintCases_case < 0) { - EXPECT_EQ(10, coded_output.ByteCount()); - } else { - EXPECT_LE(coded_output.ByteCount(), 5); - } - } - - if (kSignExtendedVarintCases_case < 0) { - EXPECT_EQ(10, output.ByteCount()); - } else { - EXPECT_LE(output.ByteCount(), 5); - } - - // Read value back in as a varint64 and insure it matches. - ArrayInputStream input(buffer_, sizeof(buffer_)); - - { - CodedInputStream coded_input(&input); - - uint64 value; - EXPECT_TRUE(coded_input.ReadVarint64(&value)); - - EXPECT_EQ(kSignExtendedVarintCases_case, static_cast(value)); - } - - EXPECT_EQ(output.ByteCount(), input.ByteCount()); -} - -#endif - - -// ------------------------------------------------------------------- -// Varint failure test. - -struct VarintErrorCase { - uint8 bytes[12]; - int size; - bool can_parse; -}; - -inline std::ostream& operator<<(std::ostream& os, const VarintErrorCase& c) { - return os << "size " << c.size; -} - -const VarintErrorCase kVarintErrorCases[] = { - // Control case. (Insures that there isn't something else wrong that - // makes parsing always fail.) - {{0x00}, 1, true}, - - // No input data. - {{}, 0, false}, - - // Input ends unexpectedly. - {{0xf0, 0xab}, 2, false}, - - // Input ends unexpectedly after 32 bits. - {{0xf0, 0xab, 0xc9, 0x9a, 0xf8, 0xb2}, 6, false}, - - // Longer than 10 bytes. - {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01}, - 11, false}, -}; - -TEST_2D(CodedStreamTest, ReadVarint32Error, kVarintErrorCases, kBlockSizes) { - memcpy(buffer_, kVarintErrorCases_case.bytes, kVarintErrorCases_case.size); - ArrayInputStream input(buffer_, kVarintErrorCases_case.size, - kBlockSizes_case); - CodedInputStream coded_input(&input); - - uint32 value; - EXPECT_EQ(kVarintErrorCases_case.can_parse, coded_input.ReadVarint32(&value)); -} - -TEST_2D(CodedStreamTest, ReadVarint64Error, kVarintErrorCases, kBlockSizes) { - memcpy(buffer_, kVarintErrorCases_case.bytes, kVarintErrorCases_case.size); - ArrayInputStream input(buffer_, kVarintErrorCases_case.size, - kBlockSizes_case); - CodedInputStream coded_input(&input); - - uint64 value; - EXPECT_EQ(kVarintErrorCases_case.can_parse, coded_input.ReadVarint64(&value)); -} - -// ------------------------------------------------------------------- -// VarintSize - -struct VarintSizeCase { - uint64 value; - int size; -}; - -inline std::ostream& operator<<(std::ostream& os, const VarintSizeCase& c) { - return os << c.value; -} - -VarintSizeCase kVarintSizeCases[] = { - {0u, 1}, - {1u, 1}, - {127u, 1}, - {128u, 2}, - {758923u, 3}, - {4000000000u, 5}, - {ULL(41256202580718336), 8}, - {ULL(11964378330978735131), 10}, -}; - -TEST_1D(CodedStreamTest, VarintSize32, kVarintSizeCases) { - if (kVarintSizeCases_case.value > 0xffffffffu) { - // Skip 64-bit values. - return; - } - - EXPECT_EQ(kVarintSizeCases_case.size, - CodedOutputStream::VarintSize32( - static_cast(kVarintSizeCases_case.value))); -} - -TEST_1D(CodedStreamTest, VarintSize64, kVarintSizeCases) { - EXPECT_EQ(kVarintSizeCases_case.size, - CodedOutputStream::VarintSize64(kVarintSizeCases_case.value)); -} - -// ------------------------------------------------------------------- -// Fixed-size int tests - -struct Fixed32Case { - uint8 bytes[sizeof(uint32)]; // Encoded bytes. - uint32 value; // Parsed value. -}; - -struct Fixed64Case { - uint8 bytes[sizeof(uint64)]; // Encoded bytes. - uint64 value; // Parsed value. -}; - -inline std::ostream& operator<<(std::ostream& os, const Fixed32Case& c) { - return os << "0x" << hex << c.value << dec; -} - -inline std::ostream& operator<<(std::ostream& os, const Fixed64Case& c) { - return os << "0x" << hex << c.value << dec; -} - -Fixed32Case kFixed32Cases[] = { - {{0xef, 0xcd, 0xab, 0x90}, 0x90abcdefu}, - {{0x12, 0x34, 0x56, 0x78}, 0x78563412u}, -}; - -Fixed64Case kFixed64Cases[] = { - {{0xef, 0xcd, 0xab, 0x90, 0x12, 0x34, 0x56, 0x78}, ULL(0x7856341290abcdef)}, - {{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}, ULL(0x8877665544332211)}, -}; - -TEST_2D(CodedStreamTest, ReadLittleEndian32, kFixed32Cases, kBlockSizes) { - memcpy(buffer_, kFixed32Cases_case.bytes, sizeof(kFixed32Cases_case.bytes)); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - uint32 value; - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(kFixed32Cases_case.value, value); - } - - EXPECT_EQ(sizeof(uint32), input.ByteCount()); -} - -TEST_2D(CodedStreamTest, ReadLittleEndian64, kFixed64Cases, kBlockSizes) { - memcpy(buffer_, kFixed64Cases_case.bytes, sizeof(kFixed64Cases_case.bytes)); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - uint64 value; - EXPECT_TRUE(coded_input.ReadLittleEndian64(&value)); - EXPECT_EQ(kFixed64Cases_case.value, value); - } - - EXPECT_EQ(sizeof(uint64), input.ByteCount()); -} - -TEST_2D(CodedStreamTest, WriteLittleEndian32, kFixed32Cases, kBlockSizes) { - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteLittleEndian32(kFixed32Cases_case.value); - EXPECT_FALSE(coded_output.HadError()); - - EXPECT_EQ(sizeof(uint32), coded_output.ByteCount()); - } - - EXPECT_EQ(sizeof(uint32), output.ByteCount()); - EXPECT_EQ(0, memcmp(buffer_, kFixed32Cases_case.bytes, sizeof(uint32))); -} - -TEST_2D(CodedStreamTest, WriteLittleEndian64, kFixed64Cases, kBlockSizes) { - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteLittleEndian64(kFixed64Cases_case.value); - EXPECT_FALSE(coded_output.HadError()); - - EXPECT_EQ(sizeof(uint64), coded_output.ByteCount()); - } - - EXPECT_EQ(sizeof(uint64), output.ByteCount()); - EXPECT_EQ(0, memcmp(buffer_, kFixed64Cases_case.bytes, sizeof(uint64))); -} - -// Tests using the static methods to read fixed-size values from raw arrays. - -TEST_1D(CodedStreamTest, ReadLittleEndian32FromArray, kFixed32Cases) { - memcpy(buffer_, kFixed32Cases_case.bytes, sizeof(kFixed32Cases_case.bytes)); - - uint32 value; - const uint8* end = CodedInputStream::ReadLittleEndian32FromArray( - buffer_, &value); - EXPECT_EQ(kFixed32Cases_case.value, value); - EXPECT_TRUE(end == buffer_ + sizeof(value)); -} - -TEST_1D(CodedStreamTest, ReadLittleEndian64FromArray, kFixed64Cases) { - memcpy(buffer_, kFixed64Cases_case.bytes, sizeof(kFixed64Cases_case.bytes)); - - uint64 value; - const uint8* end = CodedInputStream::ReadLittleEndian64FromArray( - buffer_, &value); - EXPECT_EQ(kFixed64Cases_case.value, value); - EXPECT_TRUE(end == buffer_ + sizeof(value)); -} - -// ------------------------------------------------------------------- -// Raw reads and writes - -const char kRawBytes[] = "Some bytes which will be written and read raw."; - -TEST_1D(CodedStreamTest, ReadRaw, kBlockSizes) { - memcpy(buffer_, kRawBytes, sizeof(kRawBytes)); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - char read_buffer[sizeof(kRawBytes)]; - - { - CodedInputStream coded_input(&input); - - EXPECT_TRUE(coded_input.ReadRaw(read_buffer, sizeof(kRawBytes))); - EXPECT_EQ(0, memcmp(kRawBytes, read_buffer, sizeof(kRawBytes))); - } - - EXPECT_EQ(sizeof(kRawBytes), input.ByteCount()); -} - -TEST_1D(CodedStreamTest, WriteRaw, kBlockSizes) { - ArrayOutputStream output(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedOutputStream coded_output(&output); - - coded_output.WriteRaw(kRawBytes, sizeof(kRawBytes)); - EXPECT_FALSE(coded_output.HadError()); - - EXPECT_EQ(sizeof(kRawBytes), coded_output.ByteCount()); - } - - EXPECT_EQ(sizeof(kRawBytes), output.ByteCount()); - EXPECT_EQ(0, memcmp(buffer_, kRawBytes, sizeof(kRawBytes))); -} - -TEST_1D(CodedStreamTest, ReadString, kBlockSizes) { - memcpy(buffer_, kRawBytes, sizeof(kRawBytes)); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - string str; - EXPECT_TRUE(coded_input.ReadString(&str, strlen(kRawBytes))); - EXPECT_EQ(kRawBytes, str); - } - - EXPECT_EQ(strlen(kRawBytes), input.ByteCount()); -} - -// Check to make sure ReadString doesn't crash on impossibly large strings. -TEST_1D(CodedStreamTest, ReadStringImpossiblyLarge, kBlockSizes) { - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - string str; - // Try to read a gigabyte. - EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); - } -} - -TEST_F(CodedStreamTest, ReadStringImpossiblyLargeFromStringOnStack) { - // Same test as above, except directly use a buffer. This used to cause - // crashes while the above did not. - uint8 buffer[8]; - CodedInputStream coded_input(buffer, 8); - string str; - EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); -} - -TEST_F(CodedStreamTest, ReadStringImpossiblyLargeFromStringOnHeap) { - scoped_array buffer(new uint8[8]); - CodedInputStream coded_input(buffer.get(), 8); - string str; - EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); -} - - -// ------------------------------------------------------------------- -// Skip - -const char kSkipTestBytes[] = - ""; -const char kSkipOutputTestBytes[] = - "---------------------------------"; - -TEST_1D(CodedStreamTest, SkipInput, kBlockSizes) { - memcpy(buffer_, kSkipTestBytes, sizeof(kSkipTestBytes)); - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - string str; - EXPECT_TRUE(coded_input.ReadString(&str, strlen(""))); - EXPECT_EQ("", str); - EXPECT_TRUE(coded_input.Skip(strlen(""))); - EXPECT_TRUE(coded_input.ReadString(&str, strlen(""))); - EXPECT_EQ("", str); - } - - EXPECT_EQ(strlen(kSkipTestBytes), input.ByteCount()); -} - -// ------------------------------------------------------------------- -// GetDirectBufferPointer - -TEST_F(CodedStreamTest, GetDirectBufferPointerInput) { - ArrayInputStream input(buffer_, sizeof(buffer_), 8); - CodedInputStream coded_input(&input); - - const void* ptr; - int size; - - EXPECT_TRUE(coded_input.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Peeking again should return the same pointer. - EXPECT_TRUE(coded_input.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Skip forward in the same buffer then peek again. - EXPECT_TRUE(coded_input.Skip(3)); - EXPECT_TRUE(coded_input.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 3, ptr); - EXPECT_EQ(5, size); - - // Skip to end of buffer and peek -- should get next buffer. - EXPECT_TRUE(coded_input.Skip(5)); - EXPECT_TRUE(coded_input.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 8, ptr); - EXPECT_EQ(8, size); -} - -TEST_F(CodedStreamTest, GetDirectBufferPointerInlineInput) { - ArrayInputStream input(buffer_, sizeof(buffer_), 8); - CodedInputStream coded_input(&input); - - const void* ptr; - int size; - - coded_input.GetDirectBufferPointerInline(&ptr, &size); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Peeking again should return the same pointer. - coded_input.GetDirectBufferPointerInline(&ptr, &size); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Skip forward in the same buffer then peek again. - EXPECT_TRUE(coded_input.Skip(3)); - coded_input.GetDirectBufferPointerInline(&ptr, &size); - EXPECT_EQ(buffer_ + 3, ptr); - EXPECT_EQ(5, size); - - // Skip to end of buffer and peek -- should return false and provide an empty - // buffer. It does not try to Refresh(). - EXPECT_TRUE(coded_input.Skip(5)); - coded_input.GetDirectBufferPointerInline(&ptr, &size); - EXPECT_EQ(buffer_ + 8, ptr); - EXPECT_EQ(0, size); -} - -TEST_F(CodedStreamTest, GetDirectBufferPointerOutput) { - ArrayOutputStream output(buffer_, sizeof(buffer_), 8); - CodedOutputStream coded_output(&output); - - void* ptr; - int size; - - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Peeking again should return the same pointer. - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_, ptr); - EXPECT_EQ(8, size); - - // Skip forward in the same buffer then peek again. - EXPECT_TRUE(coded_output.Skip(3)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 3, ptr); - EXPECT_EQ(5, size); - - // Skip to end of buffer and peek -- should get next buffer. - EXPECT_TRUE(coded_output.Skip(5)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 8, ptr); - EXPECT_EQ(8, size); - - // Skip over multiple buffers. - EXPECT_TRUE(coded_output.Skip(22)); - EXPECT_TRUE(coded_output.GetDirectBufferPointer(&ptr, &size)); - EXPECT_EQ(buffer_ + 30, ptr); - EXPECT_EQ(2, size); -} - -// ------------------------------------------------------------------- -// Limits - -TEST_1D(CodedStreamTest, BasicLimit, kBlockSizes) { - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - CodedInputStream::Limit limit = coded_input.PushLimit(8); - - // Read until we hit the limit. - uint32 value; - EXPECT_EQ(8, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(4, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - EXPECT_FALSE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - - coded_input.PopLimit(limit); - - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - } - - EXPECT_EQ(12, input.ByteCount()); -} - -// Test what happens when we push two limits where the second (top) one is -// shorter. -TEST_1D(CodedStreamTest, SmallLimitOnTopOfBigLimit, kBlockSizes) { - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - CodedInputStream::Limit limit1 = coded_input.PushLimit(8); - EXPECT_EQ(8, coded_input.BytesUntilLimit()); - CodedInputStream::Limit limit2 = coded_input.PushLimit(4); - - uint32 value; - - // Read until we hit limit2, the top and shortest limit. - EXPECT_EQ(4, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - EXPECT_FALSE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - - coded_input.PopLimit(limit2); - - // Read until we hit limit1. - EXPECT_EQ(4, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - EXPECT_FALSE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - - coded_input.PopLimit(limit1); - - // No more limits. - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - } - - EXPECT_EQ(12, input.ByteCount()); -} - -// Test what happens when we push two limits where the second (top) one is -// longer. In this case, the top limit is shortened to match the previous -// limit. -TEST_1D(CodedStreamTest, BigLimitOnTopOfSmallLimit, kBlockSizes) { - ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); - - { - CodedInputStream coded_input(&input); - - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - CodedInputStream::Limit limit1 = coded_input.PushLimit(4); - EXPECT_EQ(4, coded_input.BytesUntilLimit()); - CodedInputStream::Limit limit2 = coded_input.PushLimit(8); - - uint32 value; - - // Read until we hit limit2. Except, wait! limit1 is shorter, so - // we end up hitting that first, despite having 4 bytes to go on - // limit2. - EXPECT_EQ(4, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - EXPECT_FALSE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - - coded_input.PopLimit(limit2); - - // OK, popped limit2, now limit1 is on top, which we've already hit. - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - EXPECT_FALSE(coded_input.ReadLittleEndian32(&value)); - EXPECT_EQ(0, coded_input.BytesUntilLimit()); - - coded_input.PopLimit(limit1); - - // No more limits. - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - } - - EXPECT_EQ(8, input.ByteCount()); -} - -TEST_F(CodedStreamTest, ExpectAtEnd) { - // Test ExpectAtEnd(), which is based on limits. - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - - EXPECT_FALSE(coded_input.ExpectAtEnd()); - - CodedInputStream::Limit limit = coded_input.PushLimit(4); - - uint32 value; - EXPECT_TRUE(coded_input.ReadLittleEndian32(&value)); - EXPECT_TRUE(coded_input.ExpectAtEnd()); - - coded_input.PopLimit(limit); - EXPECT_FALSE(coded_input.ExpectAtEnd()); -} - -TEST_F(CodedStreamTest, NegativeLimit) { - // Check what happens when we push a negative limit. - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - - CodedInputStream::Limit limit = coded_input.PushLimit(-1234); - // BytesUntilLimit() returns -1 to mean "no limit", which actually means - // "the limit is INT_MAX relative to the beginning of the stream". - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - coded_input.PopLimit(limit); -} - -TEST_F(CodedStreamTest, NegativeLimitAfterReading) { - // Check what happens when we push a negative limit. - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - ASSERT_TRUE(coded_input.Skip(128)); - - CodedInputStream::Limit limit = coded_input.PushLimit(-64); - // BytesUntilLimit() returns -1 to mean "no limit", which actually means - // "the limit is INT_MAX relative to the beginning of the stream". - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - coded_input.PopLimit(limit); -} - -TEST_F(CodedStreamTest, OverflowLimit) { - // Check what happens when we push a limit large enough that its absolute - // position is more than 2GB into the stream. - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - ASSERT_TRUE(coded_input.Skip(128)); - - CodedInputStream::Limit limit = coded_input.PushLimit(INT_MAX); - // BytesUntilLimit() returns -1 to mean "no limit", which actually means - // "the limit is INT_MAX relative to the beginning of the stream". - EXPECT_EQ(-1, coded_input.BytesUntilLimit()); - coded_input.PopLimit(limit); -} - -TEST_F(CodedStreamTest, TotalBytesLimit) { - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - coded_input.SetTotalBytesLimit(16, -1); - - string str; - EXPECT_TRUE(coded_input.ReadString(&str, 16)); - - vector errors; - - { - ScopedMemoryLog error_log; - EXPECT_FALSE(coded_input.ReadString(&str, 1)); - errors = error_log.GetMessages(ERROR); - } - - ASSERT_EQ(1, errors.size()); - EXPECT_PRED_FORMAT2(testing::IsSubstring, - "A protocol message was rejected because it was too big", errors[0]); - - coded_input.SetTotalBytesLimit(32, -1); - EXPECT_TRUE(coded_input.ReadString(&str, 16)); -} - -TEST_F(CodedStreamTest, TotalBytesLimitNotValidMessageEnd) { - // total_bytes_limit_ is not a valid place for a message to end. - - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - - // Set both total_bytes_limit and a regular limit at 16 bytes. - coded_input.SetTotalBytesLimit(16, -1); - CodedInputStream::Limit limit = coded_input.PushLimit(16); - - // Read 16 bytes. - string str; - EXPECT_TRUE(coded_input.ReadString(&str, 16)); - - // Read a tag. Should fail, but report being a valid endpoint since it's - // a regular limit. - EXPECT_EQ(0, coded_input.ReadTag()); - EXPECT_TRUE(coded_input.ConsumedEntireMessage()); - - // Pop the limit. - coded_input.PopLimit(limit); - - // Read a tag. Should fail, and report *not* being a valid endpoint, since - // this time we're hitting the total bytes limit. - EXPECT_EQ(0, coded_input.ReadTag()); - EXPECT_FALSE(coded_input.ConsumedEntireMessage()); -} - - -TEST_F(CodedStreamTest, RecursionLimit) { - ArrayInputStream input(buffer_, sizeof(buffer_)); - CodedInputStream coded_input(&input); - coded_input.SetRecursionLimit(4); - - // This is way too much testing for a counter. - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 1 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 2 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 3 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 4 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 5 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 6 - coded_input.DecrementRecursionDepth(); // 5 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 6 - coded_input.DecrementRecursionDepth(); // 5 - coded_input.DecrementRecursionDepth(); // 4 - coded_input.DecrementRecursionDepth(); // 3 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 4 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 5 - coded_input.DecrementRecursionDepth(); // 4 - coded_input.DecrementRecursionDepth(); // 3 - coded_input.DecrementRecursionDepth(); // 2 - coded_input.DecrementRecursionDepth(); // 1 - coded_input.DecrementRecursionDepth(); // 0 - coded_input.DecrementRecursionDepth(); // 0 - coded_input.DecrementRecursionDepth(); // 0 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 1 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 2 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 3 - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 4 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 5 - - coded_input.SetRecursionLimit(6); - EXPECT_TRUE(coded_input.IncrementRecursionDepth()); // 6 - EXPECT_FALSE(coded_input.IncrementRecursionDepth()); // 7 -} - -class ReallyBigInputStream : public ZeroCopyInputStream { - public: - ReallyBigInputStream() : backup_amount_(0), buffer_count_(0) {} - ~ReallyBigInputStream() {} - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size) { - // We only expect BackUp() to be called at the end. - EXPECT_EQ(0, backup_amount_); - - switch (buffer_count_++) { - case 0: - *data = buffer_; - *size = sizeof(buffer_); - return true; - case 1: - // Return an enormously large buffer that, when combined with the 1k - // returned already, should overflow the total_bytes_read_ counter in - // CodedInputStream. Note that we'll only read the first 1024 bytes - // of this buffer so it's OK that we have it point at buffer_. - *data = buffer_; - *size = INT_MAX; - return true; - default: - return false; - } - } - - void BackUp(int count) { - backup_amount_ = count; - } - - bool Skip(int count) { GOOGLE_LOG(FATAL) << "Not implemented."; return false; } - int64 ByteCount() const { GOOGLE_LOG(FATAL) << "Not implemented."; return 0; } - - int backup_amount_; - - private: - char buffer_[1024]; - int64 buffer_count_; -}; - -TEST_F(CodedStreamTest, InputOver2G) { - // CodedInputStream should gracefully handle input over 2G and call - // input.BackUp() with the correct number of bytes on destruction. - ReallyBigInputStream input; - - vector errors; - - { - ScopedMemoryLog error_log; - CodedInputStream coded_input(&input); - string str; - EXPECT_TRUE(coded_input.ReadString(&str, 512)); - EXPECT_TRUE(coded_input.ReadString(&str, 1024)); - errors = error_log.GetMessages(ERROR); - } - - EXPECT_EQ(INT_MAX - 512, input.backup_amount_); - EXPECT_EQ(0, errors.size()); -} - -// =================================================================== - - -} // namespace -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.cc deleted file mode 100644 index 0f1ff872..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.cc +++ /dev/null @@ -1,335 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: brianolson@google.com (Brian Olson) -// -// This file contains the implementation of classes GzipInputStream and -// GzipOutputStream. - -#include "config.h" - -#if HAVE_ZLIB -#include - -#include - -namespace google { -namespace protobuf { -namespace io { - -static const int kDefaultBufferSize = 65536; - -GzipInputStream::GzipInputStream( - ZeroCopyInputStream* sub_stream, Format format, int buffer_size) - : format_(format), sub_stream_(sub_stream), zerror_(Z_OK) { - zcontext_.zalloc = Z_NULL; - zcontext_.zfree = Z_NULL; - zcontext_.opaque = Z_NULL; - zcontext_.total_out = 0; - zcontext_.next_in = NULL; - zcontext_.avail_in = 0; - zcontext_.total_in = 0; - zcontext_.msg = NULL; - if (buffer_size == -1) { - output_buffer_length_ = kDefaultBufferSize; - } else { - output_buffer_length_ = buffer_size; - } - output_buffer_ = operator new(output_buffer_length_); - GOOGLE_CHECK(output_buffer_ != NULL); - zcontext_.next_out = static_cast(output_buffer_); - zcontext_.avail_out = output_buffer_length_; - output_position_ = output_buffer_; -} -GzipInputStream::~GzipInputStream() { - operator delete(output_buffer_); - zerror_ = inflateEnd(&zcontext_); -} - -static inline int internalInflateInit2( - z_stream* zcontext, GzipInputStream::Format format) { - int windowBitsFormat = 0; - switch (format) { - case GzipInputStream::GZIP: windowBitsFormat = 16; break; - case GzipInputStream::AUTO: windowBitsFormat = 32; break; - case GzipInputStream::ZLIB: windowBitsFormat = 0; break; - } - return inflateInit2(zcontext, /* windowBits */15 | windowBitsFormat); -} - -int GzipInputStream::Inflate(int flush) { - if ((zerror_ == Z_OK) && (zcontext_.avail_out == 0)) { - // previous inflate filled output buffer. don't change input params yet. - } else if (zcontext_.avail_in == 0) { - const void* in; - int in_size; - bool first = zcontext_.next_in == NULL; - bool ok = sub_stream_->Next(&in, &in_size); - if (!ok) { - zcontext_.next_out = NULL; - zcontext_.avail_out = 0; - return Z_STREAM_END; - } - zcontext_.next_in = static_cast(const_cast(in)); - zcontext_.avail_in = in_size; - if (first) { - int error = internalInflateInit2(&zcontext_, format_); - if (error != Z_OK) { - return error; - } - } - } - zcontext_.next_out = static_cast(output_buffer_); - zcontext_.avail_out = output_buffer_length_; - output_position_ = output_buffer_; - int error = inflate(&zcontext_, flush); - return error; -} - -void GzipInputStream::DoNextOutput(const void** data, int* size) { - *data = output_position_; - *size = ((uintptr_t)zcontext_.next_out) - ((uintptr_t)output_position_); - output_position_ = zcontext_.next_out; -} - -// implements ZeroCopyInputStream ---------------------------------- -bool GzipInputStream::Next(const void** data, int* size) { - bool ok = (zerror_ == Z_OK) || (zerror_ == Z_STREAM_END) - || (zerror_ == Z_BUF_ERROR); - if ((!ok) || (zcontext_.next_out == NULL)) { - return false; - } - if (zcontext_.next_out != output_position_) { - DoNextOutput(data, size); - return true; - } - if (zerror_ == Z_STREAM_END) { - if (zcontext_.next_out != NULL) { - // sub_stream_ may have concatenated streams to follow - zerror_ = inflateEnd(&zcontext_); - if (zerror_ != Z_OK) { - return false; - } - zerror_ = internalInflateInit2(&zcontext_, format_); - if (zerror_ != Z_OK) { - return false; - } - } else { - *data = NULL; - *size = 0; - return false; - } - } - zerror_ = Inflate(Z_NO_FLUSH); - if ((zerror_ == Z_STREAM_END) && (zcontext_.next_out == NULL)) { - // The underlying stream's Next returned false inside Inflate. - return false; - } - ok = (zerror_ == Z_OK) || (zerror_ == Z_STREAM_END) - || (zerror_ == Z_BUF_ERROR); - if (!ok) { - return false; - } - DoNextOutput(data, size); - return true; -} -void GzipInputStream::BackUp(int count) { - output_position_ = reinterpret_cast( - reinterpret_cast(output_position_) - count); -} -bool GzipInputStream::Skip(int count) { - const void* data; - int size; - bool ok = Next(&data, &size); - while (ok && (size < count)) { - count -= size; - ok = Next(&data, &size); - } - if (size > count) { - BackUp(size - count); - } - return ok; -} -int64 GzipInputStream::ByteCount() const { - return zcontext_.total_out + - (((uintptr_t)zcontext_.next_out) - ((uintptr_t)output_position_)); -} - -// ========================================================================= - -GzipOutputStream::Options::Options() - : format(GZIP), - buffer_size(kDefaultBufferSize), - compression_level(Z_DEFAULT_COMPRESSION), - compression_strategy(Z_DEFAULT_STRATEGY) {} - -GzipOutputStream::GzipOutputStream(ZeroCopyOutputStream* sub_stream) { - Init(sub_stream, Options()); -} - -GzipOutputStream::GzipOutputStream(ZeroCopyOutputStream* sub_stream, - const Options& options) { - Init(sub_stream, options); -} - -GzipOutputStream::GzipOutputStream( - ZeroCopyOutputStream* sub_stream, Format format, int buffer_size) { - Options options; - options.format = format; - if (buffer_size != -1) { - options.buffer_size = buffer_size; - } - Init(sub_stream, options); -} - -void GzipOutputStream::Init(ZeroCopyOutputStream* sub_stream, - const Options& options) { - sub_stream_ = sub_stream; - sub_data_ = NULL; - sub_data_size_ = 0; - - input_buffer_length_ = options.buffer_size; - input_buffer_ = operator new(input_buffer_length_); - GOOGLE_CHECK(input_buffer_ != NULL); - - zcontext_.zalloc = Z_NULL; - zcontext_.zfree = Z_NULL; - zcontext_.opaque = Z_NULL; - zcontext_.next_out = NULL; - zcontext_.avail_out = 0; - zcontext_.total_out = 0; - zcontext_.next_in = NULL; - zcontext_.avail_in = 0; - zcontext_.total_in = 0; - zcontext_.msg = NULL; - // default to GZIP format - int windowBitsFormat = 16; - if (options.format == ZLIB) { - windowBitsFormat = 0; - } - zerror_ = deflateInit2( - &zcontext_, - options.compression_level, - Z_DEFLATED, - /* windowBits */15 | windowBitsFormat, - /* memLevel (default) */8, - options.compression_strategy); -} - -GzipOutputStream::~GzipOutputStream() { - Close(); - if (input_buffer_ != NULL) { - operator delete(input_buffer_); - } -} - -// private -int GzipOutputStream::Deflate(int flush) { - int error = Z_OK; - do { - if ((sub_data_ == NULL) || (zcontext_.avail_out == 0)) { - bool ok = sub_stream_->Next(&sub_data_, &sub_data_size_); - if (!ok) { - sub_data_ = NULL; - sub_data_size_ = 0; - return Z_BUF_ERROR; - } - GOOGLE_CHECK_GT(sub_data_size_, 0); - zcontext_.next_out = static_cast(sub_data_); - zcontext_.avail_out = sub_data_size_; - } - error = deflate(&zcontext_, flush); - } while (error == Z_OK && zcontext_.avail_out == 0); - if ((flush == Z_FULL_FLUSH) || (flush == Z_FINISH)) { - // Notify lower layer of data. - sub_stream_->BackUp(zcontext_.avail_out); - // We don't own the buffer anymore. - sub_data_ = NULL; - sub_data_size_ = 0; - } - return error; -} - -// implements ZeroCopyOutputStream --------------------------------- -bool GzipOutputStream::Next(void** data, int* size) { - if ((zerror_ != Z_OK) && (zerror_ != Z_BUF_ERROR)) { - return false; - } - if (zcontext_.avail_in != 0) { - zerror_ = Deflate(Z_NO_FLUSH); - if (zerror_ != Z_OK) { - return false; - } - } - if (zcontext_.avail_in == 0) { - // all input was consumed. reset the buffer. - zcontext_.next_in = static_cast(input_buffer_); - zcontext_.avail_in = input_buffer_length_; - *data = input_buffer_; - *size = input_buffer_length_; - } else { - // The loop in Deflate should consume all avail_in - GOOGLE_LOG(DFATAL) << "Deflate left bytes unconsumed"; - } - return true; -} -void GzipOutputStream::BackUp(int count) { - GOOGLE_CHECK_GE(zcontext_.avail_in, count); - zcontext_.avail_in -= count; -} -int64 GzipOutputStream::ByteCount() const { - return zcontext_.total_in + zcontext_.avail_in; -} - -bool GzipOutputStream::Flush() { - do { - zerror_ = Deflate(Z_FULL_FLUSH); - } while (zerror_ == Z_OK); - return zerror_ == Z_OK; -} - -bool GzipOutputStream::Close() { - if ((zerror_ != Z_OK) && (zerror_ != Z_BUF_ERROR)) { - return false; - } - do { - zerror_ = Deflate(Z_FINISH); - } while (zerror_ == Z_OK); - zerror_ = deflateEnd(&zcontext_); - bool ok = zerror_ == Z_OK; - zerror_ = Z_STREAM_END; - return ok; -} - -} // namespace io -} // namespace protobuf -} // namespace google - -#endif // HAVE_ZLIB diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.h deleted file mode 100644 index 65dbc5b5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream.h +++ /dev/null @@ -1,207 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: brianolson@google.com (Brian Olson) -// -// This file contains the definition for classes GzipInputStream and -// GzipOutputStream. -// -// GzipInputStream decompresses data from an underlying -// ZeroCopyInputStream and provides the decompressed data as a -// ZeroCopyInputStream. -// -// GzipOutputStream is an ZeroCopyOutputStream that compresses data to -// an underlying ZeroCopyOutputStream. - -#ifndef GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__ -#define GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__ - -#include - -#include - -namespace google { -namespace protobuf { -namespace io { - -// A ZeroCopyInputStream that reads compressed data through zlib -class LIBPROTOBUF_EXPORT GzipInputStream : public ZeroCopyInputStream { - public: - // Format key for constructor - enum Format { - // zlib will autodetect gzip header or deflate stream - AUTO = 0, - - // GZIP streams have some extra header data for file attributes. - GZIP = 1, - - // Simpler zlib stream format. - ZLIB = 2, - }; - - // buffer_size and format may be -1 for default of 64kB and GZIP format - explicit GzipInputStream( - ZeroCopyInputStream* sub_stream, - Format format = AUTO, - int buffer_size = -1); - virtual ~GzipInputStream(); - - // Return last error message or NULL if no error. - inline const char* ZlibErrorMessage() const { - return zcontext_.msg; - } - inline int ZlibErrorCode() const { - return zerror_; - } - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - private: - Format format_; - - ZeroCopyInputStream* sub_stream_; - - z_stream zcontext_; - int zerror_; - - void* output_buffer_; - void* output_position_; - size_t output_buffer_length_; - - int Inflate(int flush); - void DoNextOutput(const void** data, int* size); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GzipInputStream); -}; - - -class LIBPROTOBUF_EXPORT GzipOutputStream : public ZeroCopyOutputStream { - public: - // Format key for constructor - enum Format { - // GZIP streams have some extra header data for file attributes. - GZIP = 1, - - // Simpler zlib stream format. - ZLIB = 2, - }; - - struct Options { - // Defaults to GZIP. - Format format; - - // What size buffer to use internally. Defaults to 64kB. - int buffer_size; - - // A number between 0 and 9, where 0 is no compression and 9 is best - // compression. Defaults to Z_DEFAULT_COMPRESSION (see zlib.h). - int compression_level; - - // Defaults to Z_DEFAULT_STRATEGY. Can also be set to Z_FILTERED, - // Z_HUFFMAN_ONLY, or Z_RLE. See the documentation for deflateInit2 in - // zlib.h for definitions of these constants. - int compression_strategy; - - Options(); // Initializes with default values. - }; - - // Create a GzipOutputStream with default options. - explicit GzipOutputStream(ZeroCopyOutputStream* sub_stream); - - // Create a GzipOutputStream with the given options. - GzipOutputStream( - ZeroCopyOutputStream* sub_stream, - const Options& options); - - // DEPRECATED: Use one of the above constructors instead. - GzipOutputStream( - ZeroCopyOutputStream* sub_stream, - Format format, - int buffer_size = -1) GOOGLE_ATTRIBUTE_DEPRECATED; - - virtual ~GzipOutputStream(); - - // Return last error message or NULL if no error. - inline const char* ZlibErrorMessage() const { - return zcontext_.msg; - } - inline int ZlibErrorCode() const { - return zerror_; - } - - // Flushes data written so far to zipped data in the underlying stream. - // It is the caller's responsibility to flush the underlying stream if - // necessary. - // Compression may be less efficient stopping and starting around flushes. - // Returns true if no error. - bool Flush(); - - // Writes out all data and closes the gzip stream. - // It is the caller's responsibility to close the underlying stream if - // necessary. - // Returns true if no error. - bool Close(); - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - ZeroCopyOutputStream* sub_stream_; - // Result from calling Next() on sub_stream_ - void* sub_data_; - int sub_data_size_; - - z_stream zcontext_; - int zerror_; - void* input_buffer_; - size_t input_buffer_length_; - - // Shared constructor code. - void Init(ZeroCopyOutputStream* sub_stream, const Options& options); - - // Do some compression. - // Takes zlib flush mode. - // Returns zlib error code. - int Deflate(int flush); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GzipOutputStream); -}; - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_GZIP_STREAM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh deleted file mode 100755 index 6e8a0943..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -x -# -# Protocol Buffers - Google's data interchange format -# Copyright 2009 Google Inc. All rights reserved. -# http://code.google.com/p/protobuf/ -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: brianolson@google.com (Brian Olson) -# -# Test compatibility between command line gzip/gunzip binaries and -# ZeroCopyStream versions. - -TESTFILE=Makefile - -(./zcgzip < ${TESTFILE} | gunzip | cmp - ${TESTFILE}) && \ -(gzip < ${TESTFILE} | ./zcgunzip | cmp - ${TESTFILE}) - -# Result of "(cmd) && (cmd)" implicitly becomes result of this script -# and thus the test. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/package_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/package_info.h deleted file mode 100644 index 7a7a4e77..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/package_info.h +++ /dev/null @@ -1,54 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file exists solely to document the google::protobuf::io namespace. -// It is not compiled into anything, but it may be read by an automated -// documentation generator. - -namespace google { - -namespace protobuf { - -// Auxiliary classes used for I/O. -// -// The Protocol Buffer library uses the classes in this package to deal with -// I/O and encoding/decoding raw bytes. Most users will not need to -// deal with this package. However, users who want to adapt the system to -// work with their own I/O abstractions -- e.g., to allow Protocol Buffers -// to be read from a different kind of input stream without the need for a -// temporary buffer -- should take a closer look. -namespace io {} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.cc deleted file mode 100644 index 9ab90dee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.cc +++ /dev/null @@ -1,199 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -Printer::Printer(ZeroCopyOutputStream* output, char variable_delimiter) - : variable_delimiter_(variable_delimiter), - output_(output), - buffer_(NULL), - buffer_size_(0), - at_start_of_line_(true), - failed_(false) { -} - -Printer::~Printer() { - // Only BackUp() if we're sure we've successfully called Next() at least once. - if (buffer_size_ > 0) { - output_->BackUp(buffer_size_); - } -} - -void Printer::Print(const map& variables, const char* text) { - int size = strlen(text); - int pos = 0; // The number of bytes we've written so far. - - for (int i = 0; i < size; i++) { - if (text[i] == '\n') { - // Saw newline. If there is more text, we may need to insert an indent - // here. So, write what we have so far, including the '\n'. - WriteRaw(text + pos, i - pos + 1); - pos = i + 1; - - // Setting this true will cause the next WriteRaw() to insert an indent - // first. - at_start_of_line_ = true; - - } else if (text[i] == variable_delimiter_) { - // Saw the start of a variable name. - - // Write what we have so far. - WriteRaw(text + pos, i - pos); - pos = i + 1; - - // Find closing delimiter. - const char* end = strchr(text + pos, variable_delimiter_); - if (end == NULL) { - GOOGLE_LOG(DFATAL) << " Unclosed variable name."; - end = text + pos; - } - int endpos = end - text; - - string varname(text + pos, endpos - pos); - if (varname.empty()) { - // Two delimiters in a row reduce to a literal delimiter character. - WriteRaw(&variable_delimiter_, 1); - } else { - // Replace with the variable's value. - map::const_iterator iter = variables.find(varname); - if (iter == variables.end()) { - GOOGLE_LOG(DFATAL) << " Undefined variable: " << varname; - } else { - WriteRaw(iter->second.data(), iter->second.size()); - } - } - - // Advance past this variable. - i = endpos; - pos = endpos + 1; - } - } - - // Write the rest. - WriteRaw(text + pos, size - pos); -} - -void Printer::Print(const char* text) { - static map empty; - Print(empty, text); -} - -void Printer::Print(const char* text, - const char* variable, const string& value) { - map vars; - vars[variable] = value; - Print(vars, text); -} - -void Printer::Print(const char* text, - const char* variable1, const string& value1, - const char* variable2, const string& value2) { - map vars; - vars[variable1] = value1; - vars[variable2] = value2; - Print(vars, text); -} - -void Printer::Print(const char* text, - const char* variable1, const string& value1, - const char* variable2, const string& value2, - const char* variable3, const string& value3) { - map vars; - vars[variable1] = value1; - vars[variable2] = value2; - vars[variable3] = value3; - Print(vars, text); -} - -void Printer::Indent() { - indent_ += " "; -} - -void Printer::Outdent() { - if (indent_.empty()) { - GOOGLE_LOG(DFATAL) << " Outdent() without matching Indent()."; - return; - } - - indent_.resize(indent_.size() - 2); -} - -void Printer::PrintRaw(const string& data) { - WriteRaw(data.data(), data.size()); -} - -void Printer::PrintRaw(const char* data) { - if (failed_) return; - WriteRaw(data, strlen(data)); -} - -void Printer::WriteRaw(const char* data, int size) { - if (failed_) return; - if (size == 0) return; - - if (at_start_of_line_) { - // Insert an indent. - at_start_of_line_ = false; - WriteRaw(indent_.data(), indent_.size()); - if (failed_) return; - } - - while (size > buffer_size_) { - // Data exceeds space in the buffer. Copy what we can and request a - // new buffer. - memcpy(buffer_, data, buffer_size_); - data += buffer_size_; - size -= buffer_size_; - void* void_buffer; - failed_ = !output_->Next(&void_buffer, &buffer_size_); - if (failed_) return; - buffer_ = reinterpret_cast(void_buffer); - } - - // Buffer is big enough to receive the data; copy it. - memcpy(buffer_, data, size); - buffer_ += size; - buffer_size_ -= size; -} - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.h deleted file mode 100644 index 5be48543..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer.h +++ /dev/null @@ -1,136 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Utility class for writing text to a ZeroCopyOutputStream. - -#ifndef GOOGLE_PROTOBUF_IO_PRINTER_H__ -#define GOOGLE_PROTOBUF_IO_PRINTER_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -class ZeroCopyOutputStream; // zero_copy_stream.h - -// This simple utility class assists in code generation. It basically -// allows the caller to define a set of variables and then output some -// text with variable substitutions. Example usage: -// -// Printer printer(output, '$'); -// map vars; -// vars["name"] = "Bob"; -// printer.Print(vars, "My name is $name$."); -// -// The above writes "My name is Bob." to the output stream. -// -// Printer aggressively enforces correct usage, crashing (with assert failures) -// in the case of undefined variables in debug builds. This helps greatly in -// debugging code which uses it. -class LIBPROTOBUF_EXPORT Printer { - public: - // Create a printer that writes text to the given output stream. Use the - // given character as the delimiter for variables. - Printer(ZeroCopyOutputStream* output, char variable_delimiter); - ~Printer(); - - // Print some text after applying variable substitutions. If a particular - // variable in the text is not defined, this will crash. Variables to be - // substituted are identified by their names surrounded by delimiter - // characters (as given to the constructor). The variable bindings are - // defined by the given map. - void Print(const map& variables, const char* text); - - // Like the first Print(), except the substitutions are given as parameters. - void Print(const char* text); - // Like the first Print(), except the substitutions are given as parameters. - void Print(const char* text, const char* variable, const string& value); - // Like the first Print(), except the substitutions are given as parameters. - void Print(const char* text, const char* variable1, const string& value1, - const char* variable2, const string& value2); - // Like the first Print(), except the substitutions are given as parameters. - void Print(const char* text, const char* variable1, const string& value1, - const char* variable2, const string& value2, - const char* variable3, const string& value3); - // TODO(kenton): Overloaded versions with more variables? Three seems - // to be enough. - - // Indent text by two spaces. After calling Indent(), two spaces will be - // inserted at the beginning of each line of text. Indent() may be called - // multiple times to produce deeper indents. - void Indent(); - - // Reduces the current indent level by two spaces, or crashes if the indent - // level is zero. - void Outdent(); - - // Write a string to the output buffer. - // This method does not look for newlines to add indentation. - void PrintRaw(const string& data); - - // Write a zero-delimited string to output buffer. - // This method does not look for newlines to add indentation. - void PrintRaw(const char* data); - - // Write some bytes to the output buffer. - // This method does not look for newlines to add indentation. - void WriteRaw(const char* data, int size); - - // True if any write to the underlying stream failed. (We don't just - // crash in this case because this is an I/O failure, not a programming - // error.) - bool failed() const { return failed_; } - - private: - const char variable_delimiter_; - - ZeroCopyOutputStream* const output_; - char* buffer_; - int buffer_size_; - - string indent_; - bool at_start_of_line_; - bool failed_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Printer); -}; - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_PRINTER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer_unittest.cc deleted file mode 100644 index 580a53da..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/printer_unittest.cc +++ /dev/null @@ -1,261 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { -namespace { - -// Each test repeats over several block sizes in order to test both cases -// where particular writes cross a buffer boundary and cases where they do -// not. - -TEST(Printer, EmptyPrinter) { - char buffer[8192]; - const int block_size = 100; - ArrayOutputStream output(buffer, GOOGLE_ARRAYSIZE(buffer), block_size); - Printer printer(&output, '\0'); - EXPECT_TRUE(!printer.failed()); -} - -TEST(Printer, BasicPrinting) { - char buffer[8192]; - - for (int block_size = 1; block_size < 512; block_size *= 2) { - ArrayOutputStream output(buffer, sizeof(buffer), block_size); - - { - Printer printer(&output, '\0'); - - printer.Print("Hello World!"); - printer.Print(" This is the same line.\n"); - printer.Print("But this is a new one.\nAnd this is another one."); - - EXPECT_FALSE(printer.failed()); - } - - buffer[output.ByteCount()] = '\0'; - - EXPECT_STREQ("Hello World! This is the same line.\n" - "But this is a new one.\n" - "And this is another one.", - buffer); - } -} - -TEST(Printer, WriteRaw) { - char buffer[8192]; - - for (int block_size = 1; block_size < 512; block_size *= 2) { - ArrayOutputStream output(buffer, sizeof(buffer), block_size); - - { - string string_obj = "From an object\n"; - Printer printer(&output, '$'); - printer.WriteRaw("Hello World!", 12); - printer.PrintRaw(" This is the same line.\n"); - printer.PrintRaw("But this is a new one.\nAnd this is another one."); - printer.WriteRaw("\n", 1); - printer.PrintRaw(string_obj); - EXPECT_FALSE(printer.failed()); - } - - buffer[output.ByteCount()] = '\0'; - - EXPECT_STREQ("Hello World! This is the same line.\n" - "But this is a new one.\n" - "And this is another one." - "\n" - "From an object\n", - buffer); - } -} - -TEST(Printer, VariableSubstitution) { - char buffer[8192]; - - for (int block_size = 1; block_size < 512; block_size *= 2) { - ArrayOutputStream output(buffer, sizeof(buffer), block_size); - - { - Printer printer(&output, '$'); - map vars; - - vars["foo"] = "World"; - vars["bar"] = "$foo$"; - vars["abcdefg"] = "1234"; - - printer.Print(vars, "Hello $foo$!\nbar = $bar$\n"); - printer.PrintRaw("RawBit\n"); - printer.Print(vars, "$abcdefg$\nA literal dollar sign: $$"); - - vars["foo"] = "blah"; - printer.Print(vars, "\nNow foo = $foo$."); - - EXPECT_FALSE(printer.failed()); - } - - buffer[output.ByteCount()] = '\0'; - - EXPECT_STREQ("Hello World!\n" - "bar = $foo$\n" - "RawBit\n" - "1234\n" - "A literal dollar sign: $\n" - "Now foo = blah.", - buffer); - } -} - -TEST(Printer, InlineVariableSubstitution) { - char buffer[8192]; - - ArrayOutputStream output(buffer, sizeof(buffer)); - - { - Printer printer(&output, '$'); - printer.Print("Hello $foo$!\n", "foo", "World"); - printer.PrintRaw("RawBit\n"); - printer.Print("$foo$ $bar$\n", "foo", "one", "bar", "two"); - EXPECT_FALSE(printer.failed()); - } - - buffer[output.ByteCount()] = '\0'; - - EXPECT_STREQ("Hello World!\n" - "RawBit\n" - "one two\n", - buffer); -} - -TEST(Printer, Indenting) { - char buffer[8192]; - - for (int block_size = 1; block_size < 512; block_size *= 2) { - ArrayOutputStream output(buffer, sizeof(buffer), block_size); - - { - Printer printer(&output, '$'); - map vars; - - vars["newline"] = "\n"; - - printer.Print("This is not indented.\n"); - printer.Indent(); - printer.Print("This is indented\nAnd so is this\n"); - printer.Outdent(); - printer.Print("But this is not."); - printer.Indent(); - printer.Print(" And this is still the same line.\n" - "But this is indented.\n"); - printer.PrintRaw("RawBit has indent at start\n"); - printer.PrintRaw("but not after a raw newline\n"); - printer.Print(vars, "Note that a newline in a variable will break " - "indenting, as we see$newline$here.\n"); - printer.Indent(); - printer.Print("And this"); - printer.Outdent(); - printer.Outdent(); - printer.Print(" is double-indented\nBack to normal."); - - EXPECT_FALSE(printer.failed()); - } - - buffer[output.ByteCount()] = '\0'; - - EXPECT_STREQ( - "This is not indented.\n" - " This is indented\n" - " And so is this\n" - "But this is not. And this is still the same line.\n" - " But this is indented.\n" - " RawBit has indent at start\n" - "but not after a raw newline\n" - "Note that a newline in a variable will break indenting, as we see\n" - "here.\n" - " And this is double-indented\n" - "Back to normal.", - buffer); - } -} - -// Death tests do not work on Windows as of yet. -#ifdef GTEST_HAS_DEATH_TEST -TEST(Printer, Death) { - char buffer[8192]; - - ArrayOutputStream output(buffer, sizeof(buffer)); - Printer printer(&output, '$'); - - EXPECT_DEBUG_DEATH(printer.Print("$nosuchvar$"), "Undefined variable"); - EXPECT_DEBUG_DEATH(printer.Print("$unclosed"), "Unclosed variable name"); - EXPECT_DEBUG_DEATH(printer.Outdent(), "without matching Indent"); -} -#endif // GTEST_HAS_DEATH_TEST - -TEST(Printer, WriteFailure) { - char buffer[16]; - - ArrayOutputStream output(buffer, sizeof(buffer)); - Printer printer(&output, '$'); - - // Print 16 bytes to fill the buffer exactly (should not fail). - printer.Print("0123456789abcdef"); - EXPECT_FALSE(printer.failed()); - - // Try to print one more byte (should fail). - printer.Print(" "); - EXPECT_TRUE(printer.failed()); - - // Should not crash - printer.Print("blah"); - EXPECT_TRUE(printer.failed()); - - // Buffer should contain the first 16 bytes written. - EXPECT_EQ("0123456789abcdef", string(buffer, sizeof(buffer))); -} - -} // namespace -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.cc deleted file mode 100644 index 513831d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.cc +++ /dev/null @@ -1,694 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Here we have a hand-written lexer. At first you might ask yourself, -// "Hand-written text processing? Is Kenton crazy?!" Well, first of all, -// yes I am crazy, but that's beside the point. There are actually reasons -// why I ended up writing this this way. -// -// The traditional approach to lexing is to use lex to generate a lexer for -// you. Unfortunately, lex's output is ridiculously ugly and difficult to -// integrate cleanly with C++ code, especially abstract code or code meant -// as a library. Better parser-generators exist but would add dependencies -// which most users won't already have, which we'd like to avoid. (GNU flex -// has a C++ output option, but it's still ridiculously ugly, non-abstract, -// and not library-friendly.) -// -// The next approach that any good software engineer should look at is to -// use regular expressions. And, indeed, I did. I have code which -// implements this same class using regular expressions. It's about 200 -// lines shorter. However: -// - Rather than error messages telling you "This string has an invalid -// escape sequence at line 5, column 45", you get error messages like -// "Parse error on line 5". Giving more precise errors requires adding -// a lot of code that ends up basically as complex as the hand-coded -// version anyway. -// - The regular expression to match a string literal looks like this: -// kString = new RE("(\"([^\"\\\\]|" // non-escaped -// "\\\\[abfnrtv?\"'\\\\0-7]|" // normal escape -// "\\\\x[0-9a-fA-F])*\"|" // hex escape -// "\'([^\'\\\\]|" // Also support single-quotes. -// "\\\\[abfnrtv?\"'\\\\0-7]|" -// "\\\\x[0-9a-fA-F])*\')"); -// Verifying the correctness of this line noise is actually harder than -// verifying the correctness of ConsumeString(), defined below. I'm not -// even confident that the above is correct, after staring at it for some -// time. -// - PCRE is fast, but there's still more overhead involved than the code -// below. -// - Sadly, regular expressions are not part of the C standard library, so -// using them would require depending on some other library. For the -// open source release, this could be really annoying. Nobody likes -// downloading one piece of software just to find that they need to -// download something else to make it work, and in all likelihood -// people downloading Protocol Buffers will already be doing so just -// to make something else work. We could include a copy of PCRE with -// our code, but that obligates us to keep it up-to-date and just seems -// like a big waste just to save 200 lines of code. -// -// On a similar but unrelated note, I'm even scared to use ctype.h. -// Apparently functions like isalpha() are locale-dependent. So, if we used -// that, then if this code is being called from some program that doesn't -// have its locale set to "C", it would behave strangely. We can't just set -// the locale to "C" ourselves since we might break the calling program that -// way, particularly if it is multi-threaded. WTF? Someone please let me -// (Kenton) know if I'm missing something here... -// -// I'd love to hear about other alternatives, though, as this code isn't -// exactly pretty. - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { -namespace { - -// As mentioned above, I don't trust ctype.h due to the presence of "locales". -// So, I have written replacement functions here. Someone please smack me if -// this is a bad idea or if there is some way around this. -// -// These "character classes" are designed to be used in template methods. -// For instance, Tokenizer::ConsumeZeroOrMore() will eat -// whitespace. - -// Note: No class is allowed to contain '\0', since this is used to mark end- -// of-input and is handled specially. - -#define CHARACTER_CLASS(NAME, EXPRESSION) \ - class NAME { \ - public: \ - static inline bool InClass(char c) { \ - return EXPRESSION; \ - } \ - } - -CHARACTER_CLASS(Whitespace, c == ' ' || c == '\n' || c == '\t' || - c == '\r' || c == '\v' || c == '\f'); - -CHARACTER_CLASS(Unprintable, c < ' ' && c > '\0'); - -CHARACTER_CLASS(Digit, '0' <= c && c <= '9'); -CHARACTER_CLASS(OctalDigit, '0' <= c && c <= '7'); -CHARACTER_CLASS(HexDigit, ('0' <= c && c <= '9') || - ('a' <= c && c <= 'f') || - ('A' <= c && c <= 'F')); - -CHARACTER_CLASS(Letter, ('a' <= c && c <= 'z') || - ('A' <= c && c <= 'Z') || - (c == '_')); - -CHARACTER_CLASS(Alphanumeric, ('a' <= c && c <= 'z') || - ('A' <= c && c <= 'Z') || - ('0' <= c && c <= '9') || - (c == '_')); - -CHARACTER_CLASS(Escape, c == 'a' || c == 'b' || c == 'f' || c == 'n' || - c == 'r' || c == 't' || c == 'v' || c == '\\' || - c == '?' || c == '\'' || c == '\"'); - -#undef CHARACTER_CLASS - -// Given a char, interpret it as a numeric digit and return its value. -// This supports any number base up to 36. -inline int DigitValue(char digit) { - if ('0' <= digit && digit <= '9') return digit - '0'; - if ('a' <= digit && digit <= 'z') return digit - 'a' + 10; - if ('A' <= digit && digit <= 'Z') return digit - 'A' + 10; - return -1; -} - -// Inline because it's only used in one place. -inline char TranslateEscape(char c) { - switch (c) { - case 'a': return '\a'; - case 'b': return '\b'; - case 'f': return '\f'; - case 'n': return '\n'; - case 'r': return '\r'; - case 't': return '\t'; - case 'v': return '\v'; - case '\\': return '\\'; - case '?': return '\?'; // Trigraphs = :( - case '\'': return '\''; - case '"': return '\"'; - - // We expect escape sequences to have been validated separately. - default: return '?'; - } -} - -} // anonymous namespace - -ErrorCollector::~ErrorCollector() {} - -// =================================================================== - -Tokenizer::Tokenizer(ZeroCopyInputStream* input, - ErrorCollector* error_collector) - : input_(input), - error_collector_(error_collector), - buffer_(NULL), - buffer_size_(0), - buffer_pos_(0), - read_error_(false), - line_(0), - column_(0), - token_start_(-1), - allow_f_after_float_(false), - comment_style_(CPP_COMMENT_STYLE) { - - current_.line = 0; - current_.column = 0; - current_.end_column = 0; - current_.type = TYPE_START; - - Refresh(); -} - -Tokenizer::~Tokenizer() { - // If we had any buffer left unread, return it to the underlying stream - // so that someone else can read it. - if (buffer_size_ > buffer_pos_) { - input_->BackUp(buffer_size_ - buffer_pos_); - } -} - -// ------------------------------------------------------------------- -// Internal helpers. - -void Tokenizer::NextChar() { - // Update our line and column counters based on the character being - // consumed. - if (current_char_ == '\n') { - ++line_; - column_ = 0; - } else if (current_char_ == '\t') { - column_ += kTabWidth - column_ % kTabWidth; - } else { - ++column_; - } - - // Advance to the next character. - ++buffer_pos_; - if (buffer_pos_ < buffer_size_) { - current_char_ = buffer_[buffer_pos_]; - } else { - Refresh(); - } -} - -void Tokenizer::Refresh() { - if (read_error_) { - current_char_ = '\0'; - return; - } - - // If we're in a token, append the rest of the buffer to it. - if (token_start_ >= 0 && token_start_ < buffer_size_) { - current_.text.append(buffer_ + token_start_, buffer_size_ - token_start_); - token_start_ = 0; - } - - const void* data = NULL; - buffer_ = NULL; - buffer_pos_ = 0; - do { - if (!input_->Next(&data, &buffer_size_)) { - // end of stream (or read error) - buffer_size_ = 0; - read_error_ = true; - current_char_ = '\0'; - return; - } - } while (buffer_size_ == 0); - - buffer_ = static_cast(data); - - current_char_ = buffer_[0]; -} - -inline void Tokenizer::StartToken() { - token_start_ = buffer_pos_; - current_.type = TYPE_START; // Just for the sake of initializing it. - current_.text.clear(); - current_.line = line_; - current_.column = column_; -} - -inline void Tokenizer::EndToken() { - // Note: The if() is necessary because some STL implementations crash when - // you call string::append(NULL, 0), presumably because they are trying to - // be helpful by detecting the NULL pointer, even though there's nothing - // wrong with reading zero bytes from NULL. - if (buffer_pos_ != token_start_) { - current_.text.append(buffer_ + token_start_, buffer_pos_ - token_start_); - } - token_start_ = -1; - current_.end_column = column_; -} - -// ------------------------------------------------------------------- -// Helper methods that consume characters. - -template -inline bool Tokenizer::LookingAt() { - return CharacterClass::InClass(current_char_); -} - -template -inline bool Tokenizer::TryConsumeOne() { - if (CharacterClass::InClass(current_char_)) { - NextChar(); - return true; - } else { - return false; - } -} - -inline bool Tokenizer::TryConsume(char c) { - if (current_char_ == c) { - NextChar(); - return true; - } else { - return false; - } -} - -template -inline void Tokenizer::ConsumeZeroOrMore() { - while (CharacterClass::InClass(current_char_)) { - NextChar(); - } -} - -template -inline void Tokenizer::ConsumeOneOrMore(const char* error) { - if (!CharacterClass::InClass(current_char_)) { - AddError(error); - } else { - do { - NextChar(); - } while (CharacterClass::InClass(current_char_)); - } -} - -// ------------------------------------------------------------------- -// Methods that read whole patterns matching certain kinds of tokens -// or comments. - -void Tokenizer::ConsumeString(char delimiter) { - while (true) { - switch (current_char_) { - case '\0': - case '\n': { - AddError("String literals cannot cross line boundaries."); - return; - } - - case '\\': { - // An escape sequence. - NextChar(); - if (TryConsumeOne()) { - // Valid escape sequence. - } else if (TryConsumeOne()) { - // Possibly followed by two more octal digits, but these will - // just be consumed by the main loop anyway so we don't need - // to do so explicitly here. - } else if (TryConsume('x') || TryConsume('X')) { - if (!TryConsumeOne()) { - AddError("Expected hex digits for escape sequence."); - } - // Possibly followed by another hex digit, but again we don't care. - } else { - AddError("Invalid escape sequence in string literal."); - } - break; - } - - default: { - if (current_char_ == delimiter) { - NextChar(); - return; - } - NextChar(); - break; - } - } - } -} - -Tokenizer::TokenType Tokenizer::ConsumeNumber(bool started_with_zero, - bool started_with_dot) { - bool is_float = false; - - if (started_with_zero && (TryConsume('x') || TryConsume('X'))) { - // A hex number (started with "0x"). - ConsumeOneOrMore("\"0x\" must be followed by hex digits."); - - } else if (started_with_zero && LookingAt()) { - // An octal number (had a leading zero). - ConsumeZeroOrMore(); - if (LookingAt()) { - AddError("Numbers starting with leading zero must be in octal."); - ConsumeZeroOrMore(); - } - - } else { - // A decimal number. - if (started_with_dot) { - is_float = true; - ConsumeZeroOrMore(); - } else { - ConsumeZeroOrMore(); - - if (TryConsume('.')) { - is_float = true; - ConsumeZeroOrMore(); - } - } - - if (TryConsume('e') || TryConsume('E')) { - is_float = true; - TryConsume('-') || TryConsume('+'); - ConsumeOneOrMore("\"e\" must be followed by exponent."); - } - - if (allow_f_after_float_ && (TryConsume('f') || TryConsume('F'))) { - is_float = true; - } - } - - if (LookingAt()) { - AddError("Need space between number and identifier."); - } else if (current_char_ == '.') { - if (is_float) { - AddError( - "Already saw decimal point or exponent; can't have another one."); - } else { - AddError("Hex and octal numbers must be integers."); - } - } - - return is_float ? TYPE_FLOAT : TYPE_INTEGER; -} - -void Tokenizer::ConsumeLineComment() { - while (current_char_ != '\0' && current_char_ != '\n') { - NextChar(); - } - TryConsume('\n'); -} - -void Tokenizer::ConsumeBlockComment() { - int start_line = line_; - int start_column = column_ - 2; - - while (true) { - while (current_char_ != '\0' && - current_char_ != '*' && - current_char_ != '/') { - NextChar(); - } - - if (TryConsume('*') && TryConsume('/')) { - // End of comment. - break; - } else if (TryConsume('/') && current_char_ == '*') { - // Note: We didn't consume the '*' because if there is a '/' after it - // we want to interpret that as the end of the comment. - AddError( - "\"/*\" inside block comment. Block comments cannot be nested."); - } else if (current_char_ == '\0') { - AddError("End-of-file inside block comment."); - error_collector_->AddError( - start_line, start_column, " Comment started here."); - break; - } - } -} - -// ------------------------------------------------------------------- - -bool Tokenizer::Next() { - previous_ = current_; - - // Did we skip any characters after the last token? - bool skipped_stuff = false; - - while (!read_error_) { - if (TryConsumeOne()) { - ConsumeZeroOrMore(); - - } else if (comment_style_ == CPP_COMMENT_STYLE && TryConsume('/')) { - // Starting a comment? - if (TryConsume('/')) { - ConsumeLineComment(); - } else if (TryConsume('*')) { - ConsumeBlockComment(); - } else { - // Oops, it was just a slash. Return it. - current_.type = TYPE_SYMBOL; - current_.text = "/"; - current_.line = line_; - current_.column = column_ - 1; - return true; - } - - } else if (comment_style_ == SH_COMMENT_STYLE && TryConsume('#')) { - ConsumeLineComment(); - - } else if (LookingAt() || current_char_ == '\0') { - AddError("Invalid control characters encountered in text."); - NextChar(); - // Skip more unprintable characters, too. But, remember that '\0' is - // also what current_char_ is set to after EOF / read error. We have - // to be careful not to go into an infinite loop of trying to consume - // it, so make sure to check read_error_ explicitly before consuming - // '\0'. - while (TryConsumeOne() || - (!read_error_ && TryConsume('\0'))) { - // Ignore. - } - - } else { - // Reading some sort of token. - StartToken(); - - if (TryConsumeOne()) { - ConsumeZeroOrMore(); - current_.type = TYPE_IDENTIFIER; - } else if (TryConsume('0')) { - current_.type = ConsumeNumber(true, false); - } else if (TryConsume('.')) { - // This could be the beginning of a floating-point number, or it could - // just be a '.' symbol. - - if (TryConsumeOne()) { - // It's a floating-point number. - if (previous_.type == TYPE_IDENTIFIER && !skipped_stuff) { - // We don't accept syntax like "blah.123". - error_collector_->AddError(line_, column_ - 2, - "Need space between identifier and decimal point."); - } - current_.type = ConsumeNumber(false, true); - } else { - current_.type = TYPE_SYMBOL; - } - } else if (TryConsumeOne()) { - current_.type = ConsumeNumber(false, false); - } else if (TryConsume('\"')) { - ConsumeString('\"'); - current_.type = TYPE_STRING; - } else if (TryConsume('\'')) { - ConsumeString('\''); - current_.type = TYPE_STRING; - } else { - NextChar(); - current_.type = TYPE_SYMBOL; - } - - EndToken(); - return true; - } - - skipped_stuff = true; - } - - // EOF - current_.type = TYPE_END; - current_.text.clear(); - current_.line = line_; - current_.column = column_; - current_.end_column = column_; - return false; -} - -// ------------------------------------------------------------------- -// Token-parsing helpers. Remember that these don't need to report -// errors since any errors should already have been reported while -// tokenizing. Also, these can assume that whatever text they -// are given is text that the tokenizer actually parsed as a token -// of the given type. - -bool Tokenizer::ParseInteger(const string& text, uint64 max_value, - uint64* output) { - // Sadly, we can't just use strtoul() since it is only 32-bit and strtoull() - // is non-standard. I hate the C standard library. :( - -// return strtoull(text.c_str(), NULL, 0); - - const char* ptr = text.c_str(); - int base = 10; - if (ptr[0] == '0') { - if (ptr[1] == 'x' || ptr[1] == 'X') { - // This is hex. - base = 16; - ptr += 2; - } else { - // This is octal. - base = 8; - } - } - - uint64 result = 0; - for (; *ptr != '\0'; ptr++) { - int digit = DigitValue(*ptr); - GOOGLE_LOG_IF(DFATAL, digit < 0 || digit >= base) - << " Tokenizer::ParseInteger() passed text that could not have been" - " tokenized as an integer: " << CEscape(text); - if (digit > max_value || result > (max_value - digit) / base) { - // Overflow. - return false; - } - result = result * base + digit; - } - - *output = result; - return true; -} - -double Tokenizer::ParseFloat(const string& text) { - const char* start = text.c_str(); - char* end; - double result = NoLocaleStrtod(start, &end); - - // "1e" is not a valid float, but if the tokenizer reads it, it will - // report an error but still return it as a valid token. We need to - // accept anything the tokenizer could possibly return, error or not. - if (*end == 'e' || *end == 'E') { - ++end; - if (*end == '-' || *end == '+') ++end; - } - - // If the Tokenizer had allow_f_after_float_ enabled, the float may be - // suffixed with the letter 'f'. - if (*end == 'f' || *end == 'F') { - ++end; - } - - GOOGLE_LOG_IF(DFATAL, end - start != text.size() || *start == '-') - << " Tokenizer::ParseFloat() passed text that could not have been" - " tokenized as a float: " << CEscape(text); - return result; -} - -void Tokenizer::ParseStringAppend(const string& text, string* output) { - // Reminder: text[0] is always the quote character. (If text is - // empty, it's invalid, so we'll just return.) - if (text.empty()) { - GOOGLE_LOG(DFATAL) - << " Tokenizer::ParseStringAppend() passed text that could not" - " have been tokenized as a string: " << CEscape(text); - return; - } - - output->reserve(output->size() + text.size()); - - // Loop through the string copying characters to "output" and - // interpreting escape sequences. Note that any invalid escape - // sequences or other errors were already reported while tokenizing. - // In this case we do not need to produce valid results. - for (const char* ptr = text.c_str() + 1; *ptr != '\0'; ptr++) { - if (*ptr == '\\' && ptr[1] != '\0') { - // An escape sequence. - ++ptr; - - if (OctalDigit::InClass(*ptr)) { - // An octal escape. May one, two, or three digits. - int code = DigitValue(*ptr); - if (OctalDigit::InClass(ptr[1])) { - ++ptr; - code = code * 8 + DigitValue(*ptr); - } - if (OctalDigit::InClass(ptr[1])) { - ++ptr; - code = code * 8 + DigitValue(*ptr); - } - output->push_back(static_cast(code)); - - } else if (*ptr == 'x') { - // A hex escape. May zero, one, or two digits. (The zero case - // will have been caught as an error earlier.) - int code = 0; - if (HexDigit::InClass(ptr[1])) { - ++ptr; - code = DigitValue(*ptr); - } - if (HexDigit::InClass(ptr[1])) { - ++ptr; - code = code * 16 + DigitValue(*ptr); - } - output->push_back(static_cast(code)); - - } else { - // Some other escape code. - output->push_back(TranslateEscape(*ptr)); - } - - } else if (*ptr == text[0]) { - // Ignore quote matching the starting quote. - } else { - output->push_back(*ptr); - } - } - - return; -} - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.h deleted file mode 100644 index 8f759abb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer.h +++ /dev/null @@ -1,313 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Class for parsing tokenized text from a ZeroCopyInputStream. - -#ifndef GOOGLE_PROTOBUF_IO_TOKENIZER_H__ -#define GOOGLE_PROTOBUF_IO_TOKENIZER_H__ - -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -class ZeroCopyInputStream; // zero_copy_stream.h - -// Defined in this file. -class ErrorCollector; -class Tokenizer; - -// Abstract interface for an object which collects the errors that occur -// during parsing. A typical implementation might simply print the errors -// to stdout. -class LIBPROTOBUF_EXPORT ErrorCollector { - public: - inline ErrorCollector() {} - virtual ~ErrorCollector(); - - // Indicates that there was an error in the input at the given line and - // column numbers. The numbers are zero-based, so you may want to add - // 1 to each before printing them. - virtual void AddError(int line, int column, const string& message) = 0; - - // Indicates that there was a warning in the input at the given line and - // column numbers. The numbers are zero-based, so you may want to add - // 1 to each before printing them. - virtual void AddWarning(int line, int column, const string& message) { } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector); -}; - -// This class converts a stream of raw text into a stream of tokens for -// the protocol definition parser to parse. The tokens recognized are -// similar to those that make up the C language; see the TokenType enum for -// precise descriptions. Whitespace and comments are skipped. By default, -// C- and C++-style comments are recognized, but other styles can be used by -// calling set_comment_style(). -class LIBPROTOBUF_EXPORT Tokenizer { - public: - // Construct a Tokenizer that reads and tokenizes text from the given - // input stream and writes errors to the given error_collector. - // The caller keeps ownership of input and error_collector. - Tokenizer(ZeroCopyInputStream* input, ErrorCollector* error_collector); - ~Tokenizer(); - - enum TokenType { - TYPE_START, // Next() has not yet been called. - TYPE_END, // End of input reached. "text" is empty. - - TYPE_IDENTIFIER, // A sequence of letters, digits, and underscores, not - // starting with a digit. It is an error for a number - // to be followed by an identifier with no space in - // between. - TYPE_INTEGER, // A sequence of digits representing an integer. Normally - // the digits are decimal, but a prefix of "0x" indicates - // a hex number and a leading zero indicates octal, just - // like with C numeric literals. A leading negative sign - // is NOT included in the token; it's up to the parser to - // interpret the unary minus operator on its own. - TYPE_FLOAT, // A floating point literal, with a fractional part and/or - // an exponent. Always in decimal. Again, never - // negative. - TYPE_STRING, // A quoted sequence of escaped characters. Either single - // or double quotes can be used, but they must match. - // A string literal cannot cross a line break. - TYPE_SYMBOL, // Any other printable character, like '!' or '+'. - // Symbols are always a single character, so "!+$%" is - // four tokens. - }; - - // Structure representing a token read from the token stream. - struct Token { - TokenType type; - string text; // The exact text of the token as it appeared in - // the input. e.g. tokens of TYPE_STRING will still - // be escaped and in quotes. - - // "line" and "column" specify the position of the first character of - // the token within the input stream. They are zero-based. - int line; - int column; - int end_column; - }; - - // Get the current token. This is updated when Next() is called. Before - // the first call to Next(), current() has type TYPE_START and no contents. - const Token& current(); - - // Return the previous token -- i.e. what current() returned before the - // previous call to Next(). - const Token& previous(); - - // Advance to the next token. Returns false if the end of the input is - // reached. - bool Next(); - - // Parse helpers --------------------------------------------------- - - // Parses a TYPE_FLOAT token. This never fails, so long as the text actually - // comes from a TYPE_FLOAT token parsed by Tokenizer. If it doesn't, the - // result is undefined (possibly an assert failure). - static double ParseFloat(const string& text); - - // Parses a TYPE_STRING token. This never fails, so long as the text actually - // comes from a TYPE_STRING token parsed by Tokenizer. If it doesn't, the - // result is undefined (possibly an assert failure). - static void ParseString(const string& text, string* output); - - // Identical to ParseString, but appends to output. - static void ParseStringAppend(const string& text, string* output); - - // Parses a TYPE_INTEGER token. Returns false if the result would be - // greater than max_value. Otherwise, returns true and sets *output to the - // result. If the text is not from a Token of type TYPE_INTEGER originally - // parsed by a Tokenizer, the result is undefined (possibly an assert - // failure). - static bool ParseInteger(const string& text, uint64 max_value, - uint64* output); - - // Options --------------------------------------------------------- - - // Set true to allow floats to be suffixed with the letter 'f'. Tokens - // which would otherwise be integers but which have the 'f' suffix will be - // forced to be interpreted as floats. For all other purposes, the 'f' is - // ignored. - void set_allow_f_after_float(bool value) { allow_f_after_float_ = value; } - - // Valid values for set_comment_style(). - enum CommentStyle { - // Line comments begin with "//", block comments are delimited by "/*" and - // "*/". - CPP_COMMENT_STYLE, - // Line comments begin with "#". No way to write block comments. - SH_COMMENT_STYLE - }; - - // Sets the comment style. - void set_comment_style(CommentStyle style) { comment_style_ = style; } - - // ----------------------------------------------------------------- - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Tokenizer); - - Token current_; // Returned by current(). - Token previous_; // Returned by previous(). - - ZeroCopyInputStream* input_; - ErrorCollector* error_collector_; - - char current_char_; // == buffer_[buffer_pos_], updated by NextChar(). - const char* buffer_; // Current buffer returned from input_. - int buffer_size_; // Size of buffer_. - int buffer_pos_; // Current position within the buffer. - bool read_error_; // Did we previously encounter a read error? - - // Line and column number of current_char_ within the whole input stream. - int line_; - int column_; - - // Position in buffer_ where StartToken() was called. If the token - // started in the previous buffer, this is zero, and current_.text already - // contains the part of the token from the previous buffer. If not - // currently parsing a token, this is -1. - int token_start_; - - // Options. - bool allow_f_after_float_; - CommentStyle comment_style_; - - // Since we count columns we need to interpret tabs somehow. We'll take - // the standard 8-character definition for lack of any way to do better. - static const int kTabWidth = 8; - - // ----------------------------------------------------------------- - // Helper methods. - - // Consume this character and advance to the next one. - void NextChar(); - - // Read a new buffer from the input. - void Refresh(); - - // Called when the current character is the first character of a new - // token (not including whitespace or comments). - inline void StartToken(); - // Called when the current character is the first character after the - // end of the last token. After this returns, current_.text will - // contain all text consumed since StartToken() was called. - inline void EndToken(); - - // Convenience method to add an error at the current line and column. - void AddError(const string& message) { - error_collector_->AddError(line_, column_, message); - } - - // ----------------------------------------------------------------- - // The following four methods are used to consume tokens of specific - // types. They are actually used to consume all characters *after* - // the first, since the calling function consumes the first character - // in order to decide what kind of token is being read. - - // Read and consume a string, ending when the given delimiter is - // consumed. - void ConsumeString(char delimiter); - - // Read and consume a number, returning TYPE_FLOAT or TYPE_INTEGER - // depending on what was read. This needs to know if the first - // character was a zero in order to correctly recognize hex and octal - // numbers. - // It also needs to know if the first characted was a . to parse floating - // point correctly. - TokenType ConsumeNumber(bool started_with_zero, bool started_with_dot); - - // Consume the rest of a line. - void ConsumeLineComment(); - // Consume until "*/". - void ConsumeBlockComment(); - - // ----------------------------------------------------------------- - // These helper methods make the parsing code more readable. The - // "character classes" refered to are defined at the top of the .cc file. - // Basically it is a C++ class with one method: - // static bool InClass(char c); - // The method returns true if c is a member of this "class", like "Letter" - // or "Digit". - - // Returns true if the current character is of the given character - // class, but does not consume anything. - template - inline bool LookingAt(); - - // If the current character is in the given class, consume it and return - // true. Otherwise return false. - // e.g. TryConsumeOne() - template - inline bool TryConsumeOne(); - - // Like above, but try to consume the specific character indicated. - inline bool TryConsume(char c); - - // Consume zero or more of the given character class. - template - inline void ConsumeZeroOrMore(); - - // Consume one or more of the given character class or log the given - // error message. - // e.g. ConsumeOneOrMore("Expected digits."); - template - inline void ConsumeOneOrMore(const char* error); -}; - -// inline methods ==================================================== -inline const Tokenizer::Token& Tokenizer::current() { - return current_; -} - -inline const Tokenizer::Token& Tokenizer::previous() { - return previous_; -} - -inline void Tokenizer::ParseString(const string& text, string* output) { - output->clear(); - ParseStringAppend(text, output); -} - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_TOKENIZER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer_unittest.cc deleted file mode 100644 index 106d080f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/tokenizer_unittest.cc +++ /dev/null @@ -1,766 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { -namespace { - -// =================================================================== -// Data-Driven Test Infrastructure - -// TODO(kenton): This is copied from coded_stream_unittest. This is -// temporary until these fetaures are integrated into gTest itself. - -// TEST_1D and TEST_2D are macros I'd eventually like to see added to -// gTest. These macros can be used to declare tests which should be -// run multiple times, once for each item in some input array. TEST_1D -// tests all cases in a single input array. TEST_2D tests all -// combinations of cases from two arrays. The arrays must be statically -// defined such that the GOOGLE_ARRAYSIZE() macro works on them. Example: -// -// int kCases[] = {1, 2, 3, 4} -// TEST_1D(MyFixture, MyTest, kCases) { -// EXPECT_GT(kCases_case, 0); -// } -// -// This test iterates through the numbers 1, 2, 3, and 4 and tests that -// they are all grater than zero. In case of failure, the exact case -// which failed will be printed. The case type must be printable using -// ostream::operator<<. - -#define TEST_1D(FIXTURE, NAME, CASES) \ - class FIXTURE##_##NAME##_DD : public FIXTURE { \ - protected: \ - template \ - void DoSingleCase(const CaseType& CASES##_case); \ - }; \ - \ - TEST_F(FIXTURE##_##NAME##_DD, NAME) { \ - for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES); i++) { \ - SCOPED_TRACE(testing::Message() \ - << #CASES " case #" << i << ": " << CASES[i]); \ - DoSingleCase(CASES[i]); \ - } \ - } \ - \ - template \ - void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType& CASES##_case) - -#define TEST_2D(FIXTURE, NAME, CASES1, CASES2) \ - class FIXTURE##_##NAME##_DD : public FIXTURE { \ - protected: \ - template \ - void DoSingleCase(const CaseType1& CASES1##_case, \ - const CaseType2& CASES2##_case); \ - }; \ - \ - TEST_F(FIXTURE##_##NAME##_DD, NAME) { \ - for (int i = 0; i < GOOGLE_ARRAYSIZE(CASES1); i++) { \ - for (int j = 0; j < GOOGLE_ARRAYSIZE(CASES2); j++) { \ - SCOPED_TRACE(testing::Message() \ - << #CASES1 " case #" << i << ": " << CASES1[i] << ", " \ - << #CASES2 " case #" << j << ": " << CASES2[j]); \ - DoSingleCase(CASES1[i], CASES2[j]); \ - } \ - } \ - } \ - \ - template \ - void FIXTURE##_##NAME##_DD::DoSingleCase(const CaseType1& CASES1##_case, \ - const CaseType2& CASES2##_case) - -// ------------------------------------------------------------------- - -// An input stream that is basically like an ArrayInputStream but sometimes -// returns empty buffers, just to throw us off. -class TestInputStream : public ZeroCopyInputStream { - public: - TestInputStream(const void* data, int size, int block_size) - : array_stream_(data, size, block_size), counter_(0) {} - ~TestInputStream() {} - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size) { - // We'll return empty buffers starting with the first buffer, and every - // 3 and 5 buffers after that. - if (counter_ % 3 == 0 || counter_ % 5 == 0) { - *data = NULL; - *size = 0; - ++counter_; - return true; - } else { - ++counter_; - return array_stream_.Next(data, size); - } - } - - void BackUp(int count) { return array_stream_.BackUp(count); } - bool Skip(int count) { return array_stream_.Skip(count); } - int64 ByteCount() const { return array_stream_.ByteCount(); } - - private: - ArrayInputStream array_stream_; - int counter_; -}; - -// ------------------------------------------------------------------- - -// An error collector which simply concatenates all its errors into a big -// block of text which can be checked. -class TestErrorCollector : public ErrorCollector { - public: - TestErrorCollector() {} - ~TestErrorCollector() {} - - string text_; - - // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", - line, column, message); - } -}; - -// ------------------------------------------------------------------- - -// We test each operation over a variety of block sizes to insure that -// we test cases where reads cross buffer boundaries as well as cases -// where they don't. This is sort of a brute-force approach to this, -// but it's easy to write and easy to understand. -const int kBlockSizes[] = {1, 2, 3, 5, 7, 13, 32, 1024}; - -class TokenizerTest : public testing::Test { - protected: - // For easy testing. - uint64 ParseInteger(const string& text) { - uint64 result; - EXPECT_TRUE(Tokenizer::ParseInteger(text, kuint64max, &result)); - return result; - } -}; - -// =================================================================== - -// These tests causes gcc 3.3.5 (and earlier?) to give the cryptic error: -// "sorry, unimplemented: `method_call_expr' not supported by dump_expr" -#if !defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) - -// In each test case, the entire input text should parse as a single token -// of the given type. -struct SimpleTokenCase { - string input; - Tokenizer::TokenType type; -}; - -inline ostream& operator<<(ostream& out, - const SimpleTokenCase& test_case) { - return out << CEscape(test_case.input); -} - -SimpleTokenCase kSimpleTokenCases[] = { - // Test identifiers. - { "hello", Tokenizer::TYPE_IDENTIFIER }, - - // Test integers. - { "123", Tokenizer::TYPE_INTEGER }, - { "0xab6", Tokenizer::TYPE_INTEGER }, - { "0XAB6", Tokenizer::TYPE_INTEGER }, - { "0X1234567", Tokenizer::TYPE_INTEGER }, - { "0x89abcdef", Tokenizer::TYPE_INTEGER }, - { "0x89ABCDEF", Tokenizer::TYPE_INTEGER }, - { "01234567", Tokenizer::TYPE_INTEGER }, - - // Test floats. - { "123.45", Tokenizer::TYPE_FLOAT }, - { "1.", Tokenizer::TYPE_FLOAT }, - { "1e3", Tokenizer::TYPE_FLOAT }, - { "1E3", Tokenizer::TYPE_FLOAT }, - { "1e-3", Tokenizer::TYPE_FLOAT }, - { "1e+3", Tokenizer::TYPE_FLOAT }, - { "1.e3", Tokenizer::TYPE_FLOAT }, - { "1.2e3", Tokenizer::TYPE_FLOAT }, - { ".1", Tokenizer::TYPE_FLOAT }, - { ".1e3", Tokenizer::TYPE_FLOAT }, - { ".1e-3", Tokenizer::TYPE_FLOAT }, - { ".1e+3", Tokenizer::TYPE_FLOAT }, - - // Test strings. - { "'hello'", Tokenizer::TYPE_STRING }, - { "\"foo\"", Tokenizer::TYPE_STRING }, - { "'a\"b'", Tokenizer::TYPE_STRING }, - { "\"a'b\"", Tokenizer::TYPE_STRING }, - { "'a\\'b'", Tokenizer::TYPE_STRING }, - { "\"a\\\"b\"", Tokenizer::TYPE_STRING }, - { "'\\xf'", Tokenizer::TYPE_STRING }, - { "'\\0'", Tokenizer::TYPE_STRING }, - - // Test symbols. - { "+", Tokenizer::TYPE_SYMBOL }, - { ".", Tokenizer::TYPE_SYMBOL }, -}; - -TEST_2D(TokenizerTest, SimpleTokens, kSimpleTokenCases, kBlockSizes) { - // Set up the tokenizer. - TestInputStream input(kSimpleTokenCases_case.input.data(), - kSimpleTokenCases_case.input.size(), - kBlockSizes_case); - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - - // Before Next() is called, the initial token should always be TYPE_START. - EXPECT_EQ(Tokenizer::TYPE_START, tokenizer.current().type); - EXPECT_EQ("", tokenizer.current().text); - EXPECT_EQ(0, tokenizer.current().line); - EXPECT_EQ(0, tokenizer.current().column); - EXPECT_EQ(0, tokenizer.current().end_column); - - // Parse the token. - ASSERT_TRUE(tokenizer.Next()); - - // Check that it has the right type. - EXPECT_EQ(kSimpleTokenCases_case.type, tokenizer.current().type); - // Check that it contains the complete input text. - EXPECT_EQ(kSimpleTokenCases_case.input, tokenizer.current().text); - // Check that it is located at the beginning of the input - EXPECT_EQ(0, tokenizer.current().line); - EXPECT_EQ(0, tokenizer.current().column); - EXPECT_EQ(kSimpleTokenCases_case.input.size(), - tokenizer.current().end_column); - - // There should be no more input. - EXPECT_FALSE(tokenizer.Next()); - - // After Next() returns false, the token should have type TYPE_END. - EXPECT_EQ(Tokenizer::TYPE_END, tokenizer.current().type); - EXPECT_EQ("", tokenizer.current().text); - EXPECT_EQ(0, tokenizer.current().line); - EXPECT_EQ(kSimpleTokenCases_case.input.size(), tokenizer.current().column); - EXPECT_EQ(kSimpleTokenCases_case.input.size(), - tokenizer.current().end_column); - - // There should be no errors. - EXPECT_TRUE(error_collector.text_.empty()); -} - -TEST_1D(TokenizerTest, FloatSuffix, kBlockSizes) { - // Test the "allow_f_after_float" option. - - // Set up the tokenizer. - const char* text = "1f 2.5f 6e3f 7F"; - TestInputStream input(text, strlen(text), kBlockSizes_case); - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - tokenizer.set_allow_f_after_float(true); - - // Advance through tokens and check that they are parsed as expected. - ASSERT_TRUE(tokenizer.Next()); - EXPECT_EQ(tokenizer.current().text, "1f"); - EXPECT_EQ(tokenizer.current().type, Tokenizer::TYPE_FLOAT); - ASSERT_TRUE(tokenizer.Next()); - EXPECT_EQ(tokenizer.current().text, "2.5f"); - EXPECT_EQ(tokenizer.current().type, Tokenizer::TYPE_FLOAT); - ASSERT_TRUE(tokenizer.Next()); - EXPECT_EQ(tokenizer.current().text, "6e3f"); - EXPECT_EQ(tokenizer.current().type, Tokenizer::TYPE_FLOAT); - ASSERT_TRUE(tokenizer.Next()); - EXPECT_EQ(tokenizer.current().text, "7F"); - EXPECT_EQ(tokenizer.current().type, Tokenizer::TYPE_FLOAT); - - // There should be no more input. - EXPECT_FALSE(tokenizer.Next()); - // There should be no errors. - EXPECT_TRUE(error_collector.text_.empty()); -} - -#endif - -// ------------------------------------------------------------------- - -// In each case, the input is parsed to produce a list of tokens. The -// last token in "output" must have type TYPE_END. -struct MultiTokenCase { - string input; - Tokenizer::Token output[10]; // The compiler wants a constant array - // size for initialization to work. There - // is no reason this can't be increased if - // needed. -}; - -inline ostream& operator<<(ostream& out, - const MultiTokenCase& test_case) { - return out << CEscape(test_case.input); -} - -MultiTokenCase kMultiTokenCases[] = { - // Test empty input. - { "", { - { Tokenizer::TYPE_END , "" , 0, 0 }, - }}, - - // Test all token types at the same time. - { "foo 1 1.2 + 'bar'", { - { Tokenizer::TYPE_IDENTIFIER, "foo" , 0, 0, 3 }, - { Tokenizer::TYPE_INTEGER , "1" , 0, 4, 5 }, - { Tokenizer::TYPE_FLOAT , "1.2" , 0, 6, 9 }, - { Tokenizer::TYPE_SYMBOL , "+" , 0, 10, 11 }, - { Tokenizer::TYPE_STRING , "'bar'", 0, 12, 17 }, - { Tokenizer::TYPE_END , "" , 0, 17, 17 }, - }}, - - // Test that consecutive symbols are parsed as separate tokens. - { "!@+%", { - { Tokenizer::TYPE_SYMBOL , "!" , 0, 0, 1 }, - { Tokenizer::TYPE_SYMBOL , "@" , 0, 1, 2 }, - { Tokenizer::TYPE_SYMBOL , "+" , 0, 2, 3 }, - { Tokenizer::TYPE_SYMBOL , "%" , 0, 3, 4 }, - { Tokenizer::TYPE_END , "" , 0, 4, 4 }, - }}, - - // Test that newlines affect line numbers correctly. - { "foo bar\nrab oof", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 0, 4, 7 }, - { Tokenizer::TYPE_IDENTIFIER, "rab", 1, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "oof", 1, 4, 7 }, - { Tokenizer::TYPE_END , "" , 1, 7, 7 }, - }}, - - // Test that tabs affect column numbers correctly. - { "foo\tbar \tbaz", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 0, 8, 11 }, - { Tokenizer::TYPE_IDENTIFIER, "baz", 0, 16, 19 }, - { Tokenizer::TYPE_END , "" , 0, 19, 19 }, - }}, - - // Test that tabs in string literals affect column numbers correctly. - { "\"foo\tbar\" baz", { - { Tokenizer::TYPE_STRING , "\"foo\tbar\"", 0, 0, 12 }, - { Tokenizer::TYPE_IDENTIFIER, "baz" , 0, 13, 16 }, - { Tokenizer::TYPE_END , "" , 0, 16, 16 }, - }}, - - // Test that line comments are ignored. - { "foo // This is a comment\n" - "bar // This is another comment", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 1, 0, 3 }, - { Tokenizer::TYPE_END , "" , 1, 30, 30 }, - }}, - - // Test that block comments are ignored. - { "foo /* This is a block comment */ bar", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 0, 34, 37 }, - { Tokenizer::TYPE_END , "" , 0, 37, 37 }, - }}, - - // Test that sh-style comments are not ignored by default. - { "foo # bar\n" - "baz", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_SYMBOL , "#" , 0, 4, 5 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 0, 6, 9 }, - { Tokenizer::TYPE_IDENTIFIER, "baz", 1, 0, 3 }, - { Tokenizer::TYPE_END , "" , 1, 3, 3 }, - }}, - - // Bytes with the high-order bit set should not be seen as control characters. - { "\300", { - { Tokenizer::TYPE_SYMBOL, "\300", 0, 0, 1 }, - { Tokenizer::TYPE_END , "" , 0, 1, 1 }, - }}, - - // Test all whitespace chars - { "foo\n\t\r\v\fbar", { - { Tokenizer::TYPE_IDENTIFIER, "foo", 0, 0, 3 }, - { Tokenizer::TYPE_IDENTIFIER, "bar", 1, 11, 14 }, - { Tokenizer::TYPE_END , "" , 1, 14, 14 }, - }}, -}; - -TEST_2D(TokenizerTest, MultipleTokens, kMultiTokenCases, kBlockSizes) { - // Set up the tokenizer. - TestInputStream input(kMultiTokenCases_case.input.data(), - kMultiTokenCases_case.input.size(), - kBlockSizes_case); - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - - // Before Next() is called, the initial token should always be TYPE_START. - EXPECT_EQ(Tokenizer::TYPE_START, tokenizer.current().type); - EXPECT_EQ("", tokenizer.current().text); - EXPECT_EQ(0, tokenizer.current().line); - EXPECT_EQ(0, tokenizer.current().column); - EXPECT_EQ(0, tokenizer.current().end_column); - - // Loop through all expected tokens. - int i = 0; - Tokenizer::Token token; - do { - token = kMultiTokenCases_case.output[i++]; - - SCOPED_TRACE(testing::Message() << "Token #" << i << ": " << token.text); - - Tokenizer::Token previous = tokenizer.current(); - - // Next() should only return false when it hits the end token. - if (token.type != Tokenizer::TYPE_END) { - ASSERT_TRUE(tokenizer.Next()); - } else { - ASSERT_FALSE(tokenizer.Next()); - } - - // Check that the previous token is set correctly. - EXPECT_EQ(previous.type, tokenizer.previous().type); - EXPECT_EQ(previous.text, tokenizer.previous().text); - EXPECT_EQ(previous.line, tokenizer.previous().line); - EXPECT_EQ(previous.column, tokenizer.previous().column); - EXPECT_EQ(previous.end_column, tokenizer.previous().end_column); - - // Check that the token matches the expected one. - EXPECT_EQ(token.type, tokenizer.current().type); - EXPECT_EQ(token.text, tokenizer.current().text); - EXPECT_EQ(token.line, tokenizer.current().line); - EXPECT_EQ(token.column, tokenizer.current().column); - EXPECT_EQ(token.end_column, tokenizer.current().end_column); - - } while (token.type != Tokenizer::TYPE_END); - - // There should be no errors. - EXPECT_TRUE(error_collector.text_.empty()); -} - -// This test causes gcc 3.3.5 (and earlier?) to give the cryptic error: -// "sorry, unimplemented: `method_call_expr' not supported by dump_expr" -#if !defined(__GNUC__) || __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) - -TEST_1D(TokenizerTest, ShCommentStyle, kBlockSizes) { - // Test the "comment_style" option. - - const char* text = "foo # bar\n" - "baz // qux\n" - "corge /* grault */\n" - "garply"; - const char* const kTokens[] = {"foo", // "# bar" is ignored - "baz", "/", "/", "qux", - "corge", "/", "*", "grault", "*", "/", - "garply"}; - - // Set up the tokenizer. - TestInputStream input(text, strlen(text), kBlockSizes_case); - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - tokenizer.set_comment_style(Tokenizer::SH_COMMENT_STYLE); - - // Advance through tokens and check that they are parsed as expected. - for (int i = 0; i < GOOGLE_ARRAYSIZE(kTokens); i++) { - EXPECT_TRUE(tokenizer.Next()); - EXPECT_EQ(tokenizer.current().text, kTokens[i]); - } - - // There should be no more input. - EXPECT_FALSE(tokenizer.Next()); - // There should be no errors. - EXPECT_TRUE(error_collector.text_.empty()); -} - -#endif - -// ------------------------------------------------------------------- - -// Test parse helpers. It's not really worth setting up a full data-driven -// test here. -TEST_F(TokenizerTest, ParseInteger) { - EXPECT_EQ(0, ParseInteger("0")); - EXPECT_EQ(123, ParseInteger("123")); - EXPECT_EQ(0xabcdef12u, ParseInteger("0xabcdef12")); - EXPECT_EQ(0xabcdef12u, ParseInteger("0xABCDEF12")); - EXPECT_EQ(kuint64max, ParseInteger("0xFFFFFFFFFFFFFFFF")); - EXPECT_EQ(01234567, ParseInteger("01234567")); - EXPECT_EQ(0X123, ParseInteger("0X123")); - - // Test invalid integers that may still be tokenized as integers. - EXPECT_EQ(0, ParseInteger("0x")); - - uint64 i; -#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet - // Test invalid integers that will never be tokenized as integers. - EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("zxy", kuint64max, &i), - "passed text that could not have been tokenized as an integer"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("1.2", kuint64max, &i), - "passed text that could not have been tokenized as an integer"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("08", kuint64max, &i), - "passed text that could not have been tokenized as an integer"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("0xg", kuint64max, &i), - "passed text that could not have been tokenized as an integer"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("-1", kuint64max, &i), - "passed text that could not have been tokenized as an integer"); -#endif // GTEST_HAS_DEATH_TEST - - // Test overflows. - EXPECT_TRUE (Tokenizer::ParseInteger("0", 0, &i)); - EXPECT_FALSE(Tokenizer::ParseInteger("1", 0, &i)); - EXPECT_TRUE (Tokenizer::ParseInteger("1", 1, &i)); - EXPECT_TRUE (Tokenizer::ParseInteger("12345", 12345, &i)); - EXPECT_FALSE(Tokenizer::ParseInteger("12346", 12345, &i)); - EXPECT_TRUE (Tokenizer::ParseInteger("0xFFFFFFFFFFFFFFFF" , kuint64max, &i)); - EXPECT_FALSE(Tokenizer::ParseInteger("0x10000000000000000", kuint64max, &i)); -} - -TEST_F(TokenizerTest, ParseFloat) { - EXPECT_DOUBLE_EQ(1 , Tokenizer::ParseFloat("1.")); - EXPECT_DOUBLE_EQ(1e3 , Tokenizer::ParseFloat("1e3")); - EXPECT_DOUBLE_EQ(1e3 , Tokenizer::ParseFloat("1E3")); - EXPECT_DOUBLE_EQ(1.5e3, Tokenizer::ParseFloat("1.5e3")); - EXPECT_DOUBLE_EQ(.1 , Tokenizer::ParseFloat(".1")); - EXPECT_DOUBLE_EQ(.25 , Tokenizer::ParseFloat(".25")); - EXPECT_DOUBLE_EQ(.1e3 , Tokenizer::ParseFloat(".1e3")); - EXPECT_DOUBLE_EQ(.25e3, Tokenizer::ParseFloat(".25e3")); - EXPECT_DOUBLE_EQ(.1e+3, Tokenizer::ParseFloat(".1e+3")); - EXPECT_DOUBLE_EQ(.1e-3, Tokenizer::ParseFloat(".1e-3")); - EXPECT_DOUBLE_EQ(5 , Tokenizer::ParseFloat("5")); - EXPECT_DOUBLE_EQ(6e-12, Tokenizer::ParseFloat("6e-12")); - EXPECT_DOUBLE_EQ(1.2 , Tokenizer::ParseFloat("1.2")); - EXPECT_DOUBLE_EQ(1.e2 , Tokenizer::ParseFloat("1.e2")); - - // Test invalid integers that may still be tokenized as integers. - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1e")); - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1e-")); - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1.e")); - - // Test 'f' suffix. - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1f")); - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1.0f")); - EXPECT_DOUBLE_EQ(1, Tokenizer::ParseFloat("1F")); - - // These should parse successfully even though they are out of range. - // Overflows become infinity and underflows become zero. - EXPECT_EQ( 0.0, Tokenizer::ParseFloat("1e-9999999999999999999999999999")); - EXPECT_EQ(HUGE_VAL, Tokenizer::ParseFloat("1e+9999999999999999999999999999")); - -#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet - // Test invalid integers that will never be tokenized as integers. - EXPECT_DEBUG_DEATH(Tokenizer::ParseFloat("zxy"), - "passed text that could not have been tokenized as a float"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseFloat("1-e0"), - "passed text that could not have been tokenized as a float"); - EXPECT_DEBUG_DEATH(Tokenizer::ParseFloat("-1.0"), - "passed text that could not have been tokenized as a float"); -#endif // GTEST_HAS_DEATH_TEST -} - -TEST_F(TokenizerTest, ParseString) { - string output; - Tokenizer::ParseString("'hello'", &output); - EXPECT_EQ("hello", output); - Tokenizer::ParseString("\"blah\\nblah2\"", &output); - EXPECT_EQ("blah\nblah2", output); - Tokenizer::ParseString("'\\1x\\1\\123\\739\\52\\334n\\3'", &output); - EXPECT_EQ("\1x\1\123\739\52\334n\3", output); - Tokenizer::ParseString("'\\x20\\x4'", &output); - EXPECT_EQ("\x20\x4", output); - - // Test invalid strings that may still be tokenized as strings. - Tokenizer::ParseString("\"\\a\\l\\v\\t", &output); // \l is invalid - EXPECT_EQ("\a?\v\t", output); - Tokenizer::ParseString("'", &output); - EXPECT_EQ("", output); - Tokenizer::ParseString("'\\", &output); - EXPECT_EQ("\\", output); - - // Test invalid strings that will never be tokenized as strings. -#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet - EXPECT_DEBUG_DEATH(Tokenizer::ParseString("", &output), - "passed text that could not have been tokenized as a string"); -#endif // GTEST_HAS_DEATH_TEST -} - -TEST_F(TokenizerTest, ParseStringAppend) { - // Check that ParseString and ParseStringAppend differ. - string output("stuff+"); - Tokenizer::ParseStringAppend("'hello'", &output); - EXPECT_EQ("stuff+hello", output); - Tokenizer::ParseString("'hello'", &output); - EXPECT_EQ("hello", output); -} - -// ------------------------------------------------------------------- - -// Each case parses some input text, ignoring the tokens produced, and -// checks that the error output matches what is expected. -struct ErrorCase { - string input; - bool recoverable; // True if the tokenizer should be able to recover and - // parse more tokens after seeing this error. Cases - // for which this is true must end with "foo" as - // the last token, which the test will check for. - const char* errors; -}; - -inline ostream& operator<<(ostream& out, - const ErrorCase& test_case) { - return out << CEscape(test_case.input); -} - -ErrorCase kErrorCases[] = { - // String errors. - { "'\\l' foo", true, - "0:2: Invalid escape sequence in string literal.\n" }, - { "'\\x' foo", true, - "0:3: Expected hex digits for escape sequence.\n" }, - { "'foo", false, - "0:4: String literals cannot cross line boundaries.\n" }, - { "'bar\nfoo", true, - "0:4: String literals cannot cross line boundaries.\n" }, - - // Integer errors. - { "123foo", true, - "0:3: Need space between number and identifier.\n" }, - - // Hex/octal errors. - { "0x foo", true, - "0:2: \"0x\" must be followed by hex digits.\n" }, - { "0541823 foo", true, - "0:4: Numbers starting with leading zero must be in octal.\n" }, - { "0x123z foo", true, - "0:5: Need space between number and identifier.\n" }, - { "0x123.4 foo", true, - "0:5: Hex and octal numbers must be integers.\n" }, - { "0123.4 foo", true, - "0:4: Hex and octal numbers must be integers.\n" }, - - // Float errors. - { "1e foo", true, - "0:2: \"e\" must be followed by exponent.\n" }, - { "1e- foo", true, - "0:3: \"e\" must be followed by exponent.\n" }, - { "1.2.3 foo", true, - "0:3: Already saw decimal point or exponent; can't have another one.\n" }, - { "1e2.3 foo", true, - "0:3: Already saw decimal point or exponent; can't have another one.\n" }, - { "a.1 foo", true, - "0:1: Need space between identifier and decimal point.\n" }, - // allow_f_after_float not enabled, so this should be an error. - { "1.0f foo", true, - "0:3: Need space between number and identifier.\n" }, - - // Block comment errors. - { "/*", false, - "0:2: End-of-file inside block comment.\n" - "0:0: Comment started here.\n"}, - { "/*/*/ foo", true, - "0:3: \"/*\" inside block comment. Block comments cannot be nested.\n"}, - - // Control characters. Multiple consecutive control characters should only - // produce one error. - { "\b foo", true, - "0:0: Invalid control characters encountered in text.\n" }, - { "\b\b foo", true, - "0:0: Invalid control characters encountered in text.\n" }, - - // Check that control characters at end of input don't result in an - // infinite loop. - { "\b", false, - "0:0: Invalid control characters encountered in text.\n" }, - - // Check recovery from '\0'. We have to explicitly specify the length of - // these strings because otherwise the string constructor will just call - // strlen() which will see the first '\0' and think that is the end of the - // string. - { string("\0foo", 4), true, - "0:0: Invalid control characters encountered in text.\n" }, - { string("\0\0foo", 5), true, - "0:0: Invalid control characters encountered in text.\n" }, -}; - -TEST_2D(TokenizerTest, Errors, kErrorCases, kBlockSizes) { - // Set up the tokenizer. - TestInputStream input(kErrorCases_case.input.data(), - kErrorCases_case.input.size(), - kBlockSizes_case); - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - - // Ignore all input, except remember if the last token was "foo". - bool last_was_foo = false; - while (tokenizer.Next()) { - last_was_foo = tokenizer.current().text == "foo"; - } - - // Check that the errors match what was expected. - EXPECT_EQ(error_collector.text_, kErrorCases_case.errors); - - // If the error was recoverable, make sure we saw "foo" after it. - if (kErrorCases_case.recoverable) { - EXPECT_TRUE(last_was_foo); - } -} - -// ------------------------------------------------------------------- - -TEST_1D(TokenizerTest, BackUpOnDestruction, kBlockSizes) { - string text = "foo bar"; - TestInputStream input(text.data(), text.size(), kBlockSizes_case); - - // Create a tokenizer, read one token, then destroy it. - { - TestErrorCollector error_collector; - Tokenizer tokenizer(&input, &error_collector); - - tokenizer.Next(); - } - - // Only "foo" should have been read. - EXPECT_EQ(strlen("foo"), input.ByteCount()); -} - -} // namespace -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.cc deleted file mode 100644 index dad6ff14..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.cc +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - - -namespace google { -namespace protobuf { -namespace io { - -ZeroCopyInputStream::~ZeroCopyInputStream() {} -ZeroCopyOutputStream::~ZeroCopyOutputStream() {} - - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.h deleted file mode 100644 index db5326f7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream.h +++ /dev/null @@ -1,238 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains the ZeroCopyInputStream and ZeroCopyOutputStream -// interfaces, which represent abstract I/O streams to and from which -// protocol buffers can be read and written. For a few simple -// implementations of these interfaces, see zero_copy_stream_impl.h. -// -// These interfaces are different from classic I/O streams in that they -// try to minimize the amount of data copying that needs to be done. -// To accomplish this, responsibility for allocating buffers is moved to -// the stream object, rather than being the responsibility of the caller. -// So, the stream can return a buffer which actually points directly into -// the final data structure where the bytes are to be stored, and the caller -// can interact directly with that buffer, eliminating an intermediate copy -// operation. -// -// As an example, consider the common case in which you are reading bytes -// from an array that is already in memory (or perhaps an mmap()ed file). -// With classic I/O streams, you would do something like: -// char buffer[BUFFER_SIZE]; -// input->Read(buffer, BUFFER_SIZE); -// DoSomething(buffer, BUFFER_SIZE); -// Then, the stream basically just calls memcpy() to copy the data from -// the array into your buffer. With a ZeroCopyInputStream, you would do -// this instead: -// const void* buffer; -// int size; -// input->Next(&buffer, &size); -// DoSomething(buffer, size); -// Here, no copy is performed. The input stream returns a pointer directly -// into the backing array, and the caller ends up reading directly from it. -// -// If you want to be able to read the old-fashion way, you can create -// a CodedInputStream or CodedOutputStream wrapping these objects and use -// their ReadRaw()/WriteRaw() methods. These will, of course, add a copy -// step, but Coded*Stream will handle buffering so at least it will be -// reasonably efficient. -// -// ZeroCopyInputStream example: -// // Read in a file and print its contents to stdout. -// int fd = open("myfile", O_RDONLY); -// ZeroCopyInputStream* input = new FileInputStream(fd); -// -// const void* buffer; -// int size; -// while (input->Next(&buffer, &size)) { -// cout.write(buffer, size); -// } -// -// delete input; -// close(fd); -// -// ZeroCopyOutputStream example: -// // Copy the contents of "infile" to "outfile", using plain read() for -// // "infile" but a ZeroCopyOutputStream for "outfile". -// int infd = open("infile", O_RDONLY); -// int outfd = open("outfile", O_WRONLY); -// ZeroCopyOutputStream* output = new FileOutputStream(outfd); -// -// void* buffer; -// int size; -// while (output->Next(&buffer, &size)) { -// int bytes = read(infd, buffer, size); -// if (bytes < size) { -// // Reached EOF. -// output->BackUp(size - bytes); -// break; -// } -// } -// -// delete output; -// close(infd); -// close(outfd); - -#ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__ -#define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__ - -#include -#include - -namespace google { - -namespace protobuf { -namespace io { - -// Defined in this file. -class ZeroCopyInputStream; -class ZeroCopyOutputStream; - -// Abstract interface similar to an input stream but designed to minimize -// copying. -class LIBPROTOBUF_EXPORT ZeroCopyInputStream { - public: - inline ZeroCopyInputStream() {} - virtual ~ZeroCopyInputStream(); - - // Obtains a chunk of data from the stream. - // - // Preconditions: - // * "size" and "data" are not NULL. - // - // Postconditions: - // * If the returned value is false, there is no more data to return or - // an error occurred. All errors are permanent. - // * Otherwise, "size" points to the actual number of bytes read and "data" - // points to a pointer to a buffer containing these bytes. - // * Ownership of this buffer remains with the stream, and the buffer - // remains valid only until some other method of the stream is called - // or the stream is destroyed. - // * It is legal for the returned buffer to have zero size, as long - // as repeatedly calling Next() eventually yields a buffer with non-zero - // size. - virtual bool Next(const void** data, int* size) = 0; - - // Backs up a number of bytes, so that the next call to Next() returns - // data again that was already returned by the last call to Next(). This - // is useful when writing procedures that are only supposed to read up - // to a certain point in the input, then return. If Next() returns a - // buffer that goes beyond what you wanted to read, you can use BackUp() - // to return to the point where you intended to finish. - // - // Preconditions: - // * The last method called must have been Next(). - // * count must be less than or equal to the size of the last buffer - // returned by Next(). - // - // Postconditions: - // * The last "count" bytes of the last buffer returned by Next() will be - // pushed back into the stream. Subsequent calls to Next() will return - // the same data again before producing new data. - virtual void BackUp(int count) = 0; - - // Skips a number of bytes. Returns false if the end of the stream is - // reached or some input error occurred. In the end-of-stream case, the - // stream is advanced to the end of the stream (so ByteCount() will return - // the total size of the stream). - virtual bool Skip(int count) = 0; - - // Returns the total number of bytes read since this object was created. - virtual int64 ByteCount() const = 0; - - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyInputStream); -}; - -// Abstract interface similar to an output stream but designed to minimize -// copying. -class LIBPROTOBUF_EXPORT ZeroCopyOutputStream { - public: - inline ZeroCopyOutputStream() {} - virtual ~ZeroCopyOutputStream(); - - // Obtains a buffer into which data can be written. Any data written - // into this buffer will eventually (maybe instantly, maybe later on) - // be written to the output. - // - // Preconditions: - // * "size" and "data" are not NULL. - // - // Postconditions: - // * If the returned value is false, an error occurred. All errors are - // permanent. - // * Otherwise, "size" points to the actual number of bytes in the buffer - // and "data" points to the buffer. - // * Ownership of this buffer remains with the stream, and the buffer - // remains valid only until some other method of the stream is called - // or the stream is destroyed. - // * Any data which the caller stores in this buffer will eventually be - // written to the output (unless BackUp() is called). - // * It is legal for the returned buffer to have zero size, as long - // as repeatedly calling Next() eventually yields a buffer with non-zero - // size. - virtual bool Next(void** data, int* size) = 0; - - // Backs up a number of bytes, so that the end of the last buffer returned - // by Next() is not actually written. This is needed when you finish - // writing all the data you want to write, but the last buffer was bigger - // than you needed. You don't want to write a bunch of garbage after the - // end of your data, so you use BackUp() to back up. - // - // Preconditions: - // * The last method called must have been Next(). - // * count must be less than or equal to the size of the last buffer - // returned by Next(). - // * The caller must not have written anything to the last "count" bytes - // of that buffer. - // - // Postconditions: - // * The last "count" bytes of the last buffer returned by Next() will be - // ignored. - virtual void BackUp(int count) = 0; - - // Returns the total number of bytes written since this object was created. - virtual int64 ByteCount() const = 0; - - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ZeroCopyOutputStream); -}; - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc deleted file mode 100644 index 1384c746..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +++ /dev/null @@ -1,470 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifdef _MSC_VER -#include -#else -#include -#include -#include -#include -#endif -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -#ifdef _WIN32 -// Win32 lseek is broken: If invoked on a non-seekable file descriptor, its -// return value is undefined. We re-define it to always produce an error. -#define lseek(fd, offset, origin) ((off_t)-1) -#endif - -namespace { - -// EINTR sucks. -int close_no_eintr(int fd) { - int result; - do { - result = close(fd); - } while (result < 0 && errno == EINTR); - return result; -} - -} // namespace - - -// =================================================================== - -FileInputStream::FileInputStream(int file_descriptor, int block_size) - : copying_input_(file_descriptor), - impl_(©ing_input_, block_size) { -} - -FileInputStream::~FileInputStream() {} - -bool FileInputStream::Close() { - return copying_input_.Close(); -} - -bool FileInputStream::Next(const void** data, int* size) { - return impl_.Next(data, size); -} - -void FileInputStream::BackUp(int count) { - impl_.BackUp(count); -} - -bool FileInputStream::Skip(int count) { - return impl_.Skip(count); -} - -int64 FileInputStream::ByteCount() const { - return impl_.ByteCount(); -} - -FileInputStream::CopyingFileInputStream::CopyingFileInputStream( - int file_descriptor) - : file_(file_descriptor), - close_on_delete_(false), - is_closed_(false), - errno_(0), - previous_seek_failed_(false) { -} - -FileInputStream::CopyingFileInputStream::~CopyingFileInputStream() { - if (close_on_delete_) { - if (!Close()) { - GOOGLE_LOG(ERROR) << "close() failed: " << strerror(errno_); - } - } -} - -bool FileInputStream::CopyingFileInputStream::Close() { - GOOGLE_CHECK(!is_closed_); - - is_closed_ = true; - if (close_no_eintr(file_) != 0) { - // The docs on close() do not specify whether a file descriptor is still - // open after close() fails with EIO. However, the glibc source code - // seems to indicate that it is not. - errno_ = errno; - return false; - } - - return true; -} - -int FileInputStream::CopyingFileInputStream::Read(void* buffer, int size) { - GOOGLE_CHECK(!is_closed_); - - int result; - do { - result = read(file_, buffer, size); - } while (result < 0 && errno == EINTR); - - if (result < 0) { - // Read error (not EOF). - errno_ = errno; - } - - return result; -} - -int FileInputStream::CopyingFileInputStream::Skip(int count) { - GOOGLE_CHECK(!is_closed_); - - if (!previous_seek_failed_ && - lseek(file_, count, SEEK_CUR) != (off_t)-1) { - // Seek succeeded. - return count; - } else { - // Failed to seek. - - // Note to self: Don't seek again. This file descriptor doesn't - // support it. - previous_seek_failed_ = true; - - // Use the default implementation. - return CopyingInputStream::Skip(count); - } -} - -// =================================================================== - -FileOutputStream::FileOutputStream(int file_descriptor, int block_size) - : copying_output_(file_descriptor), - impl_(©ing_output_, block_size) { -} - -FileOutputStream::~FileOutputStream() { - impl_.Flush(); -} - -bool FileOutputStream::Close() { - bool flush_succeeded = impl_.Flush(); - return copying_output_.Close() && flush_succeeded; -} - -bool FileOutputStream::Flush() { - return impl_.Flush(); -} - -bool FileOutputStream::Next(void** data, int* size) { - return impl_.Next(data, size); -} - -void FileOutputStream::BackUp(int count) { - impl_.BackUp(count); -} - -int64 FileOutputStream::ByteCount() const { - return impl_.ByteCount(); -} - -FileOutputStream::CopyingFileOutputStream::CopyingFileOutputStream( - int file_descriptor) - : file_(file_descriptor), - close_on_delete_(false), - is_closed_(false), - errno_(0) { -} - -FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream() { - if (close_on_delete_) { - if (!Close()) { - GOOGLE_LOG(ERROR) << "close() failed: " << strerror(errno_); - } - } -} - -bool FileOutputStream::CopyingFileOutputStream::Close() { - GOOGLE_CHECK(!is_closed_); - - is_closed_ = true; - if (close_no_eintr(file_) != 0) { - // The docs on close() do not specify whether a file descriptor is still - // open after close() fails with EIO. However, the glibc source code - // seems to indicate that it is not. - errno_ = errno; - return false; - } - - return true; -} - -bool FileOutputStream::CopyingFileOutputStream::Write( - const void* buffer, int size) { - GOOGLE_CHECK(!is_closed_); - int total_written = 0; - - const uint8* buffer_base = reinterpret_cast(buffer); - - while (total_written < size) { - int bytes; - do { - bytes = write(file_, buffer_base + total_written, size - total_written); - } while (bytes < 0 && errno == EINTR); - - if (bytes <= 0) { - // Write error. - - // FIXME(kenton): According to the man page, if write() returns zero, - // there was no error; write() simply did not write anything. It's - // unclear under what circumstances this might happen, but presumably - // errno won't be set in this case. I am confused as to how such an - // event should be handled. For now I'm treating it as an error, since - // retrying seems like it could lead to an infinite loop. I suspect - // this never actually happens anyway. - - if (bytes < 0) { - errno_ = errno; - } - return false; - } - total_written += bytes; - } - - return true; -} - -// =================================================================== - -IstreamInputStream::IstreamInputStream(istream* input, int block_size) - : copying_input_(input), - impl_(©ing_input_, block_size) { -} - -IstreamInputStream::~IstreamInputStream() {} - -bool IstreamInputStream::Next(const void** data, int* size) { - return impl_.Next(data, size); -} - -void IstreamInputStream::BackUp(int count) { - impl_.BackUp(count); -} - -bool IstreamInputStream::Skip(int count) { - return impl_.Skip(count); -} - -int64 IstreamInputStream::ByteCount() const { - return impl_.ByteCount(); -} - -IstreamInputStream::CopyingIstreamInputStream::CopyingIstreamInputStream( - istream* input) - : input_(input) { -} - -IstreamInputStream::CopyingIstreamInputStream::~CopyingIstreamInputStream() {} - -int IstreamInputStream::CopyingIstreamInputStream::Read( - void* buffer, int size) { - input_->read(reinterpret_cast(buffer), size); - int result = input_->gcount(); - if (result == 0 && input_->fail() && !input_->eof()) { - return -1; - } - return result; -} - -// =================================================================== - -OstreamOutputStream::OstreamOutputStream(ostream* output, int block_size) - : copying_output_(output), - impl_(©ing_output_, block_size) { -} - -OstreamOutputStream::~OstreamOutputStream() { - impl_.Flush(); -} - -bool OstreamOutputStream::Next(void** data, int* size) { - return impl_.Next(data, size); -} - -void OstreamOutputStream::BackUp(int count) { - impl_.BackUp(count); -} - -int64 OstreamOutputStream::ByteCount() const { - return impl_.ByteCount(); -} - -OstreamOutputStream::CopyingOstreamOutputStream::CopyingOstreamOutputStream( - ostream* output) - : output_(output) { -} - -OstreamOutputStream::CopyingOstreamOutputStream::~CopyingOstreamOutputStream() { -} - -bool OstreamOutputStream::CopyingOstreamOutputStream::Write( - const void* buffer, int size) { - output_->write(reinterpret_cast(buffer), size); - return output_->good(); -} - -// =================================================================== - -ConcatenatingInputStream::ConcatenatingInputStream( - ZeroCopyInputStream* const streams[], int count) - : streams_(streams), stream_count_(count), bytes_retired_(0) { -} - -ConcatenatingInputStream::~ConcatenatingInputStream() { -} - -bool ConcatenatingInputStream::Next(const void** data, int* size) { - while (stream_count_ > 0) { - if (streams_[0]->Next(data, size)) return true; - - // That stream is done. Advance to the next one. - bytes_retired_ += streams_[0]->ByteCount(); - ++streams_; - --stream_count_; - } - - // No more streams. - return false; -} - -void ConcatenatingInputStream::BackUp(int count) { - if (stream_count_ > 0) { - streams_[0]->BackUp(count); - } else { - GOOGLE_LOG(DFATAL) << "Can't BackUp() after failed Next()."; - } -} - -bool ConcatenatingInputStream::Skip(int count) { - while (stream_count_ > 0) { - // Assume that ByteCount() can be used to find out how much we actually - // skipped when Skip() fails. - int64 target_byte_count = streams_[0]->ByteCount() + count; - if (streams_[0]->Skip(count)) return true; - - // Hit the end of the stream. Figure out how many more bytes we still have - // to skip. - int64 final_byte_count = streams_[0]->ByteCount(); - GOOGLE_DCHECK_LT(final_byte_count, target_byte_count); - count = target_byte_count - final_byte_count; - - // That stream is done. Advance to the next one. - bytes_retired_ += final_byte_count; - ++streams_; - --stream_count_; - } - - return false; -} - -int64 ConcatenatingInputStream::ByteCount() const { - if (stream_count_ == 0) { - return bytes_retired_; - } else { - return bytes_retired_ + streams_[0]->ByteCount(); - } -} - - -// =================================================================== - -LimitingInputStream::LimitingInputStream(ZeroCopyInputStream* input, - int64 limit) - : input_(input), limit_(limit) {} - -LimitingInputStream::~LimitingInputStream() { - // If we overshot the limit, back up. - if (limit_ < 0) input_->BackUp(-limit_); -} - -bool LimitingInputStream::Next(const void** data, int* size) { - if (limit_ <= 0) return false; - if (!input_->Next(data, size)) return false; - - limit_ -= *size; - if (limit_ < 0) { - // We overshot the limit. Reduce *size to hide the rest of the buffer. - *size += limit_; - } - return true; -} - -void LimitingInputStream::BackUp(int count) { - if (limit_ < 0) { - input_->BackUp(count - limit_); - limit_ = count; - } else { - input_->BackUp(count); - limit_ += count; - } -} - -bool LimitingInputStream::Skip(int count) { - if (count > limit_) { - if (limit_ < 0) return false; - input_->Skip(limit_); - limit_ = 0; - return false; - } else { - if (!input_->Skip(count)) return false; - limit_ -= count; - return true; - } -} - -int64 LimitingInputStream::ByteCount() const { - if (limit_ < 0) { - return input_->ByteCount() + limit_; - } else { - return input_->ByteCount(); - } -} - - -// =================================================================== - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h deleted file mode 100644 index 9fedb005..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +++ /dev/null @@ -1,357 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains common implementations of the interfaces defined in -// zero_copy_stream.h which are only included in the full (non-lite) -// protobuf library. These implementations include Unix file descriptors -// and C++ iostreams. See also: zero_copy_stream_impl_lite.h - -#ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ -#define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ - -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace io { - - -// =================================================================== - -// A ZeroCopyInputStream which reads from a file descriptor. -// -// FileInputStream is preferred over using an ifstream with IstreamInputStream. -// The latter will introduce an extra layer of buffering, harming performance. -// Also, it's conceivable that FileInputStream could someday be enhanced -// to use zero-copy file descriptors on OSs which support them. -class LIBPROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream { - public: - // Creates a stream that reads from the given Unix file descriptor. - // If a block_size is given, it specifies the number of bytes that - // should be read and returned with each call to Next(). Otherwise, - // a reasonable default is used. - explicit FileInputStream(int file_descriptor, int block_size = -1); - ~FileInputStream(); - - // Flushes any buffers and closes the underlying file. Returns false if - // an error occurs during the process; use GetErrno() to examine the error. - // Even if an error occurs, the file descriptor is closed when this returns. - bool Close(); - - // By default, the file descriptor is not closed when the stream is - // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: - // This leaves no way for the caller to detect if close() fails. If - // detecting close() errors is important to you, you should arrange - // to close the descriptor yourself. - void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } - - // If an I/O error has occurred on this file descriptor, this is the - // errno from that error. Otherwise, this is zero. Once an error - // occurs, the stream is broken and all subsequent operations will - // fail. - int GetErrno() { return copying_input_.GetErrno(); } - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - private: - class LIBPROTOBUF_EXPORT CopyingFileInputStream : public CopyingInputStream { - public: - CopyingFileInputStream(int file_descriptor); - ~CopyingFileInputStream(); - - bool Close(); - void SetCloseOnDelete(bool value) { close_on_delete_ = value; } - int GetErrno() { return errno_; } - - // implements CopyingInputStream --------------------------------- - int Read(void* buffer, int size); - int Skip(int count); - - private: - // The file descriptor. - const int file_; - bool close_on_delete_; - bool is_closed_; - - // The errno of the I/O error, if one has occurred. Otherwise, zero. - int errno_; - - // Did we try to seek once and fail? If so, we assume this file descriptor - // doesn't support seeking and won't try again. - bool previous_seek_failed_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); - }; - - CopyingFileInputStream copying_input_; - CopyingInputStreamAdaptor impl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileInputStream); -}; - -// =================================================================== - -// A ZeroCopyOutputStream which writes to a file descriptor. -// -// FileOutputStream is preferred over using an ofstream with -// OstreamOutputStream. The latter will introduce an extra layer of buffering, -// harming performance. Also, it's conceivable that FileOutputStream could -// someday be enhanced to use zero-copy file descriptors on OSs which -// support them. -class LIBPROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream { - public: - // Creates a stream that writes to the given Unix file descriptor. - // If a block_size is given, it specifies the size of the buffers - // that should be returned by Next(). Otherwise, a reasonable default - // is used. - explicit FileOutputStream(int file_descriptor, int block_size = -1); - ~FileOutputStream(); - - // Flushes any buffers and closes the underlying file. Returns false if - // an error occurs during the process; use GetErrno() to examine the error. - // Even if an error occurs, the file descriptor is closed when this returns. - bool Close(); - - // Flushes FileOutputStream's buffers but does not close the - // underlying file. No special measures are taken to ensure that - // underlying operating system file object is synchronized to disk. - bool Flush(); - - // By default, the file descriptor is not closed when the stream is - // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: - // This leaves no way for the caller to detect if close() fails. If - // detecting close() errors is important to you, you should arrange - // to close the descriptor yourself. - void SetCloseOnDelete(bool value) { copying_output_.SetCloseOnDelete(value); } - - // If an I/O error has occurred on this file descriptor, this is the - // errno from that error. Otherwise, this is zero. Once an error - // occurs, the stream is broken and all subsequent operations will - // fail. - int GetErrno() { return copying_output_.GetErrno(); } - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - class LIBPROTOBUF_EXPORT CopyingFileOutputStream : public CopyingOutputStream { - public: - CopyingFileOutputStream(int file_descriptor); - ~CopyingFileOutputStream(); - - bool Close(); - void SetCloseOnDelete(bool value) { close_on_delete_ = value; } - int GetErrno() { return errno_; } - - // implements CopyingOutputStream -------------------------------- - bool Write(const void* buffer, int size); - - private: - // The file descriptor. - const int file_; - bool close_on_delete_; - bool is_closed_; - - // The errno of the I/O error, if one has occurred. Otherwise, zero. - int errno_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileOutputStream); - }; - - CopyingFileOutputStream copying_output_; - CopyingOutputStreamAdaptor impl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileOutputStream); -}; - -// =================================================================== - -// A ZeroCopyInputStream which reads from a C++ istream. -// -// Note that for reading files (or anything represented by a file descriptor), -// FileInputStream is more efficient. -class LIBPROTOBUF_EXPORT IstreamInputStream : public ZeroCopyInputStream { - public: - // Creates a stream that reads from the given C++ istream. - // If a block_size is given, it specifies the number of bytes that - // should be read and returned with each call to Next(). Otherwise, - // a reasonable default is used. - explicit IstreamInputStream(istream* stream, int block_size = -1); - ~IstreamInputStream(); - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - private: - class LIBPROTOBUF_EXPORT CopyingIstreamInputStream : public CopyingInputStream { - public: - CopyingIstreamInputStream(istream* input); - ~CopyingIstreamInputStream(); - - // implements CopyingInputStream --------------------------------- - int Read(void* buffer, int size); - // (We use the default implementation of Skip().) - - private: - // The stream. - istream* input_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingIstreamInputStream); - }; - - CopyingIstreamInputStream copying_input_; - CopyingInputStreamAdaptor impl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(IstreamInputStream); -}; - -// =================================================================== - -// A ZeroCopyOutputStream which writes to a C++ ostream. -// -// Note that for writing files (or anything represented by a file descriptor), -// FileOutputStream is more efficient. -class LIBPROTOBUF_EXPORT OstreamOutputStream : public ZeroCopyOutputStream { - public: - // Creates a stream that writes to the given C++ ostream. - // If a block_size is given, it specifies the size of the buffers - // that should be returned by Next(). Otherwise, a reasonable default - // is used. - explicit OstreamOutputStream(ostream* stream, int block_size = -1); - ~OstreamOutputStream(); - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - class LIBPROTOBUF_EXPORT CopyingOstreamOutputStream : public CopyingOutputStream { - public: - CopyingOstreamOutputStream(ostream* output); - ~CopyingOstreamOutputStream(); - - // implements CopyingOutputStream -------------------------------- - bool Write(const void* buffer, int size); - - private: - // The stream. - ostream* output_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingOstreamOutputStream); - }; - - CopyingOstreamOutputStream copying_output_; - CopyingOutputStreamAdaptor impl_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OstreamOutputStream); -}; - -// =================================================================== - -// A ZeroCopyInputStream which reads from several other streams in sequence. -// ConcatenatingInputStream is unable to distinguish between end-of-stream -// and read errors in the underlying streams, so it assumes any errors mean -// end-of-stream. So, if the underlying streams fail for any other reason, -// ConcatenatingInputStream may do odd things. It is suggested that you do -// not use ConcatenatingInputStream on streams that might produce read errors -// other than end-of-stream. -class LIBPROTOBUF_EXPORT ConcatenatingInputStream : public ZeroCopyInputStream { - public: - // All streams passed in as well as the array itself must remain valid - // until the ConcatenatingInputStream is destroyed. - ConcatenatingInputStream(ZeroCopyInputStream* const streams[], int count); - ~ConcatenatingInputStream(); - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - - private: - // As streams are retired, streams_ is incremented and count_ is - // decremented. - ZeroCopyInputStream* const* streams_; - int stream_count_; - int64 bytes_retired_; // Bytes read from previous streams. - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ConcatenatingInputStream); -}; - -// =================================================================== - -// A ZeroCopyInputStream which wraps some other stream and limits it to -// a particular byte count. -class LIBPROTOBUF_EXPORT LimitingInputStream : public ZeroCopyInputStream { - public: - LimitingInputStream(ZeroCopyInputStream* input, int64 limit); - ~LimitingInputStream(); - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - - private: - ZeroCopyInputStream* input_; - int64 limit_; // Decreases as we go, becomes negative if we overshoot. - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LimitingInputStream); -}; - -// =================================================================== - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc deleted file mode 100644 index e8012510..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +++ /dev/null @@ -1,393 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { - -namespace { - -// Default block size for Copying{In,Out}putStreamAdaptor. -static const int kDefaultBlockSize = 8192; - -} // namespace - -// =================================================================== - -ArrayInputStream::ArrayInputStream(const void* data, int size, - int block_size) - : data_(reinterpret_cast(data)), - size_(size), - block_size_(block_size > 0 ? block_size : size), - position_(0), - last_returned_size_(0) { -} - -ArrayInputStream::~ArrayInputStream() { -} - -bool ArrayInputStream::Next(const void** data, int* size) { - if (position_ < size_) { - last_returned_size_ = min(block_size_, size_ - position_); - *data = data_ + position_; - *size = last_returned_size_; - position_ += last_returned_size_; - return true; - } else { - // We're at the end of the array. - last_returned_size_ = 0; // Don't let caller back up. - return false; - } -} - -void ArrayInputStream::BackUp(int count) { - GOOGLE_CHECK_GT(last_returned_size_, 0) - << "BackUp() can only be called after a successful Next()."; - GOOGLE_CHECK_LE(count, last_returned_size_); - GOOGLE_CHECK_GE(count, 0); - position_ -= count; - last_returned_size_ = 0; // Don't let caller back up further. -} - -bool ArrayInputStream::Skip(int count) { - GOOGLE_CHECK_GE(count, 0); - last_returned_size_ = 0; // Don't let caller back up. - if (count > size_ - position_) { - position_ = size_; - return false; - } else { - position_ += count; - return true; - } -} - -int64 ArrayInputStream::ByteCount() const { - return position_; -} - - -// =================================================================== - -ArrayOutputStream::ArrayOutputStream(void* data, int size, int block_size) - : data_(reinterpret_cast(data)), - size_(size), - block_size_(block_size > 0 ? block_size : size), - position_(0), - last_returned_size_(0) { -} - -ArrayOutputStream::~ArrayOutputStream() { -} - -bool ArrayOutputStream::Next(void** data, int* size) { - if (position_ < size_) { - last_returned_size_ = min(block_size_, size_ - position_); - *data = data_ + position_; - *size = last_returned_size_; - position_ += last_returned_size_; - return true; - } else { - // We're at the end of the array. - last_returned_size_ = 0; // Don't let caller back up. - return false; - } -} - -void ArrayOutputStream::BackUp(int count) { - GOOGLE_CHECK_GT(last_returned_size_, 0) - << "BackUp() can only be called after a successful Next()."; - GOOGLE_CHECK_LE(count, last_returned_size_); - GOOGLE_CHECK_GE(count, 0); - position_ -= count; - last_returned_size_ = 0; // Don't let caller back up further. -} - -int64 ArrayOutputStream::ByteCount() const { - return position_; -} - -// =================================================================== - -StringOutputStream::StringOutputStream(string* target) - : target_(target) { -} - -StringOutputStream::~StringOutputStream() { -} - -bool StringOutputStream::Next(void** data, int* size) { - int old_size = target_->size(); - - // Grow the string. - if (old_size < target_->capacity()) { - // Resize the string to match its capacity, since we can get away - // without a memory allocation this way. - STLStringResizeUninitialized(target_, target_->capacity()); - } else { - // Size has reached capacity, so double the size. Also make sure - // that the new size is at least kMinimumSize. - STLStringResizeUninitialized( - target_, - max(old_size * 2, - kMinimumSize + 0)); // "+ 0" works around GCC4 weirdness. - } - - *data = string_as_array(target_) + old_size; - *size = target_->size() - old_size; - return true; -} - -void StringOutputStream::BackUp(int count) { - GOOGLE_CHECK_GE(count, 0); - GOOGLE_CHECK_LE(count, target_->size()); - target_->resize(target_->size() - count); -} - -int64 StringOutputStream::ByteCount() const { - return target_->size(); -} - -// =================================================================== - -CopyingInputStream::~CopyingInputStream() {} - -int CopyingInputStream::Skip(int count) { - char junk[4096]; - int skipped = 0; - while (skipped < count) { - int bytes = Read(junk, min(count - skipped, - implicit_cast(sizeof(junk)))); - if (bytes <= 0) { - // EOF or read error. - return skipped; - } - skipped += bytes; - } - return skipped; -} - -CopyingInputStreamAdaptor::CopyingInputStreamAdaptor( - CopyingInputStream* copying_stream, int block_size) - : copying_stream_(copying_stream), - owns_copying_stream_(false), - failed_(false), - position_(0), - buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize), - buffer_used_(0), - backup_bytes_(0) { -} - -CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor() { - if (owns_copying_stream_) { - delete copying_stream_; - } -} - -bool CopyingInputStreamAdaptor::Next(const void** data, int* size) { - if (failed_) { - // Already failed on a previous read. - return false; - } - - AllocateBufferIfNeeded(); - - if (backup_bytes_ > 0) { - // We have data left over from a previous BackUp(), so just return that. - *data = buffer_.get() + buffer_used_ - backup_bytes_; - *size = backup_bytes_; - backup_bytes_ = 0; - return true; - } - - // Read new data into the buffer. - buffer_used_ = copying_stream_->Read(buffer_.get(), buffer_size_); - if (buffer_used_ <= 0) { - // EOF or read error. We don't need the buffer anymore. - if (buffer_used_ < 0) { - // Read error (not EOF). - failed_ = true; - } - FreeBuffer(); - return false; - } - position_ += buffer_used_; - - *size = buffer_used_; - *data = buffer_.get(); - return true; -} - -void CopyingInputStreamAdaptor::BackUp(int count) { - GOOGLE_CHECK(backup_bytes_ == 0 && buffer_.get() != NULL) - << " BackUp() can only be called after Next()."; - GOOGLE_CHECK_LE(count, buffer_used_) - << " Can't back up over more bytes than were returned by the last call" - " to Next()."; - GOOGLE_CHECK_GE(count, 0) - << " Parameter to BackUp() can't be negative."; - - backup_bytes_ = count; -} - -bool CopyingInputStreamAdaptor::Skip(int count) { - GOOGLE_CHECK_GE(count, 0); - - if (failed_) { - // Already failed on a previous read. - return false; - } - - // First skip any bytes left over from a previous BackUp(). - if (backup_bytes_ >= count) { - // We have more data left over than we're trying to skip. Just chop it. - backup_bytes_ -= count; - return true; - } - - count -= backup_bytes_; - backup_bytes_ = 0; - - int skipped = copying_stream_->Skip(count); - position_ += skipped; - return skipped == count; -} - -int64 CopyingInputStreamAdaptor::ByteCount() const { - return position_ - backup_bytes_; -} - -void CopyingInputStreamAdaptor::AllocateBufferIfNeeded() { - if (buffer_.get() == NULL) { - buffer_.reset(new uint8[buffer_size_]); - } -} - -void CopyingInputStreamAdaptor::FreeBuffer() { - GOOGLE_CHECK_EQ(backup_bytes_, 0); - buffer_used_ = 0; - buffer_.reset(); -} - -// =================================================================== - -CopyingOutputStream::~CopyingOutputStream() {} - -CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor( - CopyingOutputStream* copying_stream, int block_size) - : copying_stream_(copying_stream), - owns_copying_stream_(false), - failed_(false), - position_(0), - buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize), - buffer_used_(0) { -} - -CopyingOutputStreamAdaptor::~CopyingOutputStreamAdaptor() { - WriteBuffer(); - if (owns_copying_stream_) { - delete copying_stream_; - } -} - -bool CopyingOutputStreamAdaptor::Flush() { - return WriteBuffer(); -} - -bool CopyingOutputStreamAdaptor::Next(void** data, int* size) { - if (buffer_used_ == buffer_size_) { - if (!WriteBuffer()) return false; - } - - AllocateBufferIfNeeded(); - - *data = buffer_.get() + buffer_used_; - *size = buffer_size_ - buffer_used_; - buffer_used_ = buffer_size_; - return true; -} - -void CopyingOutputStreamAdaptor::BackUp(int count) { - GOOGLE_CHECK_GE(count, 0); - GOOGLE_CHECK_EQ(buffer_used_, buffer_size_) - << " BackUp() can only be called after Next()."; - GOOGLE_CHECK_LE(count, buffer_used_) - << " Can't back up over more bytes than were returned by the last call" - " to Next()."; - - buffer_used_ -= count; -} - -int64 CopyingOutputStreamAdaptor::ByteCount() const { - return position_ + buffer_used_; -} - -bool CopyingOutputStreamAdaptor::WriteBuffer() { - if (failed_) { - // Already failed on a previous write. - return false; - } - - if (buffer_used_ == 0) return true; - - if (copying_stream_->Write(buffer_.get(), buffer_used_)) { - position_ += buffer_used_; - buffer_used_ = 0; - return true; - } else { - failed_ = true; - FreeBuffer(); - return false; - } -} - -void CopyingOutputStreamAdaptor::AllocateBufferIfNeeded() { - if (buffer_ == NULL) { - buffer_.reset(new uint8[buffer_size_]); - } -} - -void CopyingOutputStreamAdaptor::FreeBuffer() { - buffer_used_ = 0; - buffer_.reset(); -} - -// =================================================================== - -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h deleted file mode 100644 index 153f543e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +++ /dev/null @@ -1,340 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains common implementations of the interfaces defined in -// zero_copy_stream.h which are included in the "lite" protobuf library. -// These implementations cover I/O on raw arrays and strings, as well as -// adaptors which make it easy to implement streams based on traditional -// streams. Of course, many users will probably want to write their own -// implementations of these interfaces specific to the particular I/O -// abstractions they prefer to use, but these should cover the most common -// cases. - -#ifndef GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__ -#define GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__ - -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace io { - -// =================================================================== - -// A ZeroCopyInputStream backed by an in-memory array of bytes. -class LIBPROTOBUF_EXPORT ArrayInputStream : public ZeroCopyInputStream { - public: - // Create an InputStream that returns the bytes pointed to by "data". - // "data" remains the property of the caller but must remain valid until - // the stream is destroyed. If a block_size is given, calls to Next() - // will return data blocks no larger than the given size. Otherwise, the - // first call to Next() returns the entire array. block_size is mainly - // useful for testing; in production you would probably never want to set - // it. - ArrayInputStream(const void* data, int size, int block_size = -1); - ~ArrayInputStream(); - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - - private: - const uint8* const data_; // The byte array. - const int size_; // Total size of the array. - const int block_size_; // How many bytes to return at a time. - - int position_; - int last_returned_size_; // How many bytes we returned last time Next() - // was called (used for error checking only). - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ArrayInputStream); -}; - -// =================================================================== - -// A ZeroCopyOutputStream backed by an in-memory array of bytes. -class LIBPROTOBUF_EXPORT ArrayOutputStream : public ZeroCopyOutputStream { - public: - // Create an OutputStream that writes to the bytes pointed to by "data". - // "data" remains the property of the caller but must remain valid until - // the stream is destroyed. If a block_size is given, calls to Next() - // will return data blocks no larger than the given size. Otherwise, the - // first call to Next() returns the entire array. block_size is mainly - // useful for testing; in production you would probably never want to set - // it. - ArrayOutputStream(void* data, int size, int block_size = -1); - ~ArrayOutputStream(); - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - uint8* const data_; // The byte array. - const int size_; // Total size of the array. - const int block_size_; // How many bytes to return at a time. - - int position_; - int last_returned_size_; // How many bytes we returned last time Next() - // was called (used for error checking only). - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ArrayOutputStream); -}; - -// =================================================================== - -// A ZeroCopyOutputStream which appends bytes to a string. -class LIBPROTOBUF_EXPORT StringOutputStream : public ZeroCopyOutputStream { - public: - // Create a StringOutputStream which appends bytes to the given string. - // The string remains property of the caller, but it MUST NOT be accessed - // in any way until the stream is destroyed. - // - // Hint: If you call target->reserve(n) before creating the stream, - // the first call to Next() will return at least n bytes of buffer - // space. - explicit StringOutputStream(string* target); - ~StringOutputStream(); - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - static const int kMinimumSize = 16; - - string* target_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringOutputStream); -}; - -// Note: There is no StringInputStream. Instead, just create an -// ArrayInputStream as follows: -// ArrayInputStream input(str.data(), str.size()); - -// =================================================================== - -// A generic traditional input stream interface. -// -// Lots of traditional input streams (e.g. file descriptors, C stdio -// streams, and C++ iostreams) expose an interface where every read -// involves copying bytes into a buffer. If you want to take such an -// interface and make a ZeroCopyInputStream based on it, simply implement -// CopyingInputStream and then use CopyingInputStreamAdaptor. -// -// CopyingInputStream implementations should avoid buffering if possible. -// CopyingInputStreamAdaptor does its own buffering and will read data -// in large blocks. -class LIBPROTOBUF_EXPORT CopyingInputStream { - public: - virtual ~CopyingInputStream(); - - // Reads up to "size" bytes into the given buffer. Returns the number of - // bytes read. Read() waits until at least one byte is available, or - // returns zero if no bytes will ever become available (EOF), or -1 if a - // permanent read error occurred. - virtual int Read(void* buffer, int size) = 0; - - // Skips the next "count" bytes of input. Returns the number of bytes - // actually skipped. This will always be exactly equal to "count" unless - // EOF was reached or a permanent read error occurred. - // - // The default implementation just repeatedly calls Read() into a scratch - // buffer. - virtual int Skip(int count); -}; - -// A ZeroCopyInputStream which reads from a CopyingInputStream. This is -// useful for implementing ZeroCopyInputStreams that read from traditional -// streams. Note that this class is not really zero-copy. -// -// If you want to read from file descriptors or C++ istreams, this is -// already implemented for you: use FileInputStream or IstreamInputStream -// respectively. -class LIBPROTOBUF_EXPORT CopyingInputStreamAdaptor : public ZeroCopyInputStream { - public: - // Creates a stream that reads from the given CopyingInputStream. - // If a block_size is given, it specifies the number of bytes that - // should be read and returned with each call to Next(). Otherwise, - // a reasonable default is used. The caller retains ownership of - // copying_stream unless SetOwnsCopyingStream(true) is called. - explicit CopyingInputStreamAdaptor(CopyingInputStream* copying_stream, - int block_size = -1); - ~CopyingInputStreamAdaptor(); - - // Call SetOwnsCopyingStream(true) to tell the CopyingInputStreamAdaptor to - // delete the underlying CopyingInputStream when it is destroyed. - void SetOwnsCopyingStream(bool value) { owns_copying_stream_ = value; } - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size); - void BackUp(int count); - bool Skip(int count); - int64 ByteCount() const; - - private: - // Insures that buffer_ is not NULL. - void AllocateBufferIfNeeded(); - // Frees the buffer and resets buffer_used_. - void FreeBuffer(); - - // The underlying copying stream. - CopyingInputStream* copying_stream_; - bool owns_copying_stream_; - - // True if we have seen a permenant error from the underlying stream. - bool failed_; - - // The current position of copying_stream_, relative to the point where - // we started reading. - int64 position_; - - // Data is read into this buffer. It may be NULL if no buffer is currently - // in use. Otherwise, it points to an array of size buffer_size_. - scoped_array buffer_; - const int buffer_size_; - - // Number of valid bytes currently in the buffer (i.e. the size last - // returned by Next()). 0 <= buffer_used_ <= buffer_size_. - int buffer_used_; - - // Number of bytes in the buffer which were backed up over by a call to - // BackUp(). These need to be returned again. - // 0 <= backup_bytes_ <= buffer_used_ - int backup_bytes_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingInputStreamAdaptor); -}; - -// =================================================================== - -// A generic traditional output stream interface. -// -// Lots of traditional output streams (e.g. file descriptors, C stdio -// streams, and C++ iostreams) expose an interface where every write -// involves copying bytes from a buffer. If you want to take such an -// interface and make a ZeroCopyOutputStream based on it, simply implement -// CopyingOutputStream and then use CopyingOutputStreamAdaptor. -// -// CopyingOutputStream implementations should avoid buffering if possible. -// CopyingOutputStreamAdaptor does its own buffering and will write data -// in large blocks. -class LIBPROTOBUF_EXPORT CopyingOutputStream { - public: - virtual ~CopyingOutputStream(); - - // Writes "size" bytes from the given buffer to the output. Returns true - // if successful, false on a write error. - virtual bool Write(const void* buffer, int size) = 0; -}; - -// A ZeroCopyOutputStream which writes to a CopyingOutputStream. This is -// useful for implementing ZeroCopyOutputStreams that write to traditional -// streams. Note that this class is not really zero-copy. -// -// If you want to write to file descriptors or C++ ostreams, this is -// already implemented for you: use FileOutputStream or OstreamOutputStream -// respectively. -class LIBPROTOBUF_EXPORT CopyingOutputStreamAdaptor : public ZeroCopyOutputStream { - public: - // Creates a stream that writes to the given Unix file descriptor. - // If a block_size is given, it specifies the size of the buffers - // that should be returned by Next(). Otherwise, a reasonable default - // is used. - explicit CopyingOutputStreamAdaptor(CopyingOutputStream* copying_stream, - int block_size = -1); - ~CopyingOutputStreamAdaptor(); - - // Writes all pending data to the underlying stream. Returns false if a - // write error occurred on the underlying stream. (The underlying - // stream itself is not necessarily flushed.) - bool Flush(); - - // Call SetOwnsCopyingStream(true) to tell the CopyingOutputStreamAdaptor to - // delete the underlying CopyingOutputStream when it is destroyed. - void SetOwnsCopyingStream(bool value) { owns_copying_stream_ = value; } - - // implements ZeroCopyOutputStream --------------------------------- - bool Next(void** data, int* size); - void BackUp(int count); - int64 ByteCount() const; - - private: - // Write the current buffer, if it is present. - bool WriteBuffer(); - // Insures that buffer_ is not NULL. - void AllocateBufferIfNeeded(); - // Frees the buffer. - void FreeBuffer(); - - // The underlying copying stream. - CopyingOutputStream* copying_stream_; - bool owns_copying_stream_; - - // True if we have seen a permenant error from the underlying stream. - bool failed_; - - // The current position of copying_stream_, relative to the point where - // we started writing. - int64 position_; - - // Data is written from this buffer. It may be NULL if no buffer is - // currently in use. Otherwise, it points to an array of size buffer_size_. - scoped_array buffer_; - const int buffer_size_; - - // Number of valid bytes currently in the buffer (i.e. the size last - // returned by Next()). When BackUp() is called, we just reduce this. - // 0 <= buffer_used_ <= buffer_size_. - int buffer_used_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingOutputStreamAdaptor); -}; - -// =================================================================== - -} // namespace io -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_IO_ZERO_COPY_STREAM_IMPL_LITE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc deleted file mode 100644 index 5196d905..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ /dev/null @@ -1,850 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Testing strategy: For each type of I/O (array, string, file, etc.) we -// create an output stream and write some data to it, then create a -// corresponding input stream to read the same data back and expect it to -// match. When the data is written, it is written in several small chunks -// of varying sizes, with a BackUp() after each chunk. It is read back -// similarly, but with chunks separated at different points. The whole -// process is run with a variety of block sizes for both the input and -// the output. -// -// TODO(kenton): Rewrite this test to bring it up to the standards of all -// the other proto2 tests. May want to wait for gTest to implement -// "parametized tests" so that one set of tests can be used on all the -// implementations. - -#include "config.h" - -#ifdef _MSC_VER -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include - -#include -#include - -#if HAVE_ZLIB -#include -#endif - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace io { -namespace { - -#ifdef _WIN32 -#define pipe(fds) _pipe(fds, 4096, O_BINARY) -#endif - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 // If this isn't defined, the platform doesn't need it. -#endif -#endif - -class IoTest : public testing::Test { - protected: - // Test helpers. - - // Helper to write an array of data to an output stream. - bool WriteToOutput(ZeroCopyOutputStream* output, const void* data, int size); - // Helper to read a fixed-length array of data from an input stream. - int ReadFromInput(ZeroCopyInputStream* input, void* data, int size); - // Write a string to the output stream. - void WriteString(ZeroCopyOutputStream* output, const string& str); - // Read a number of bytes equal to the size of the given string and checks - // that it matches the string. - void ReadString(ZeroCopyInputStream* input, const string& str); - // Writes some text to the output stream in a particular order. Returns - // the number of bytes written, incase the caller needs that to set up an - // input stream. - int WriteStuff(ZeroCopyOutputStream* output); - // Reads text from an input stream and expects it to match what - // WriteStuff() writes. - void ReadStuff(ZeroCopyInputStream* input); - - // Similar to WriteStuff, but performs more sophisticated testing. - int WriteStuffLarge(ZeroCopyOutputStream* output); - // Reads and tests a stream that should have been written to - // via WriteStuffLarge(). - void ReadStuffLarge(ZeroCopyInputStream* input); - -#if HAVE_ZLIB - string Compress(const string& data, const GzipOutputStream::Options& options); - string Uncompress(const string& data); -#endif - - static const int kBlockSizes[]; - static const int kBlockSizeCount; -}; - -const int IoTest::kBlockSizes[] = {-1, 1, 2, 5, 7, 10, 23, 64}; -const int IoTest::kBlockSizeCount = GOOGLE_ARRAYSIZE(IoTest::kBlockSizes); - -bool IoTest::WriteToOutput(ZeroCopyOutputStream* output, - const void* data, int size) { - const uint8* in = reinterpret_cast(data); - int in_size = size; - - void* out; - int out_size; - - while (true) { - if (!output->Next(&out, &out_size)) { - return false; - } - EXPECT_GT(out_size, 0); - - if (in_size <= out_size) { - memcpy(out, in, in_size); - output->BackUp(out_size - in_size); - return true; - } - - memcpy(out, in, out_size); - in += out_size; - in_size -= out_size; - } -} - -#define MAX_REPEATED_ZEROS 100 - -int IoTest::ReadFromInput(ZeroCopyInputStream* input, void* data, int size) { - uint8* out = reinterpret_cast(data); - int out_size = size; - - const void* in; - int in_size = 0; - - int repeated_zeros = 0; - - while (true) { - if (!input->Next(&in, &in_size)) { - return size - out_size; - } - EXPECT_GT(in_size, -1); - if (in_size == 0) { - repeated_zeros++; - } else { - repeated_zeros = 0; - } - EXPECT_LT(repeated_zeros, MAX_REPEATED_ZEROS); - - if (out_size <= in_size) { - memcpy(out, in, out_size); - if (in_size > out_size) { - input->BackUp(in_size - out_size); - } - return size; // Copied all of it. - } - - memcpy(out, in, in_size); - out += in_size; - out_size -= in_size; - } -} - -void IoTest::WriteString(ZeroCopyOutputStream* output, const string& str) { - EXPECT_TRUE(WriteToOutput(output, str.c_str(), str.size())); -} - -void IoTest::ReadString(ZeroCopyInputStream* input, const string& str) { - scoped_array buffer(new char[str.size() + 1]); - buffer[str.size()] = '\0'; - EXPECT_EQ(ReadFromInput(input, buffer.get(), str.size()), str.size()); - EXPECT_STREQ(str.c_str(), buffer.get()); -} - -int IoTest::WriteStuff(ZeroCopyOutputStream* output) { - WriteString(output, "Hello world!\n"); - WriteString(output, "Some te"); - WriteString(output, "xt. Blah blah."); - WriteString(output, "abcdefg"); - WriteString(output, "01234567890123456789"); - WriteString(output, "foobar"); - - EXPECT_EQ(output->ByteCount(), 68); - - int result = output->ByteCount(); - return result; -} - -// Reads text from an input stream and expects it to match what WriteStuff() -// writes. -void IoTest::ReadStuff(ZeroCopyInputStream* input) { - ReadString(input, "Hello world!\n"); - ReadString(input, "Some text. "); - ReadString(input, "Blah "); - ReadString(input, "blah."); - ReadString(input, "abcdefg"); - EXPECT_TRUE(input->Skip(20)); - ReadString(input, "foo"); - ReadString(input, "bar"); - - EXPECT_EQ(input->ByteCount(), 68); - - uint8 byte; - EXPECT_EQ(ReadFromInput(input, &byte, 1), 0); -} - -int IoTest::WriteStuffLarge(ZeroCopyOutputStream* output) { - WriteString(output, "Hello world!\n"); - WriteString(output, "Some te"); - WriteString(output, "xt. Blah blah."); - WriteString(output, string(100000, 'x')); // A very long string - WriteString(output, string(100000, 'y')); // A very long string - WriteString(output, "01234567890123456789"); - - EXPECT_EQ(output->ByteCount(), 200055); - - int result = output->ByteCount(); - return result; -} - -// Reads text from an input stream and expects it to match what WriteStuff() -// writes. -void IoTest::ReadStuffLarge(ZeroCopyInputStream* input) { - ReadString(input, "Hello world!\nSome text. "); - EXPECT_TRUE(input->Skip(5)); - ReadString(input, "blah."); - EXPECT_TRUE(input->Skip(100000 - 10)); - ReadString(input, string(10, 'x') + string(100000 - 20000, 'y')); - EXPECT_TRUE(input->Skip(20000 - 10)); - ReadString(input, "yyyyyyyyyy01234567890123456789"); - - EXPECT_EQ(input->ByteCount(), 200055); - - uint8 byte; - EXPECT_EQ(ReadFromInput(input, &byte, 1), 0); -} - -// =================================================================== - -TEST_F(IoTest, ArrayIo) { - const int kBufferSize = 256; - uint8 buffer[kBufferSize]; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - int size; - { - ArrayOutputStream output(buffer, kBufferSize, kBlockSizes[i]); - size = WriteStuff(&output); - } - { - ArrayInputStream input(buffer, size, kBlockSizes[j]); - ReadStuff(&input); - } - } - } -} - -TEST_F(IoTest, TwoSessionWrite) { - // Test that two concatenated write sessions read correctly - - static const char* strA = "0123456789"; - static const char* strB = "WhirledPeas"; - const int kBufferSize = 2*1024; - uint8* buffer = new uint8[kBufferSize]; - char* temp_buffer = new char[40]; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - ArrayOutputStream* output = - new ArrayOutputStream(buffer, kBufferSize, kBlockSizes[i]); - CodedOutputStream* coded_output = new CodedOutputStream(output); - coded_output->WriteVarint32(strlen(strA)); - coded_output->WriteRaw(strA, strlen(strA)); - delete coded_output; // flush - int64 pos = output->ByteCount(); - delete output; - output = new ArrayOutputStream( - buffer + pos, kBufferSize - pos, kBlockSizes[i]); - coded_output = new CodedOutputStream(output); - coded_output->WriteVarint32(strlen(strB)); - coded_output->WriteRaw(strB, strlen(strB)); - delete coded_output; // flush - int64 size = pos + output->ByteCount(); - delete output; - - ArrayInputStream* input = - new ArrayInputStream(buffer, size, kBlockSizes[j]); - CodedInputStream* coded_input = new CodedInputStream(input); - uint32 insize; - EXPECT_TRUE(coded_input->ReadVarint32(&insize)); - EXPECT_EQ(strlen(strA), insize); - EXPECT_TRUE(coded_input->ReadRaw(temp_buffer, insize)); - EXPECT_EQ(0, memcmp(temp_buffer, strA, insize)); - - EXPECT_TRUE(coded_input->ReadVarint32(&insize)); - EXPECT_EQ(strlen(strB), insize); - EXPECT_TRUE(coded_input->ReadRaw(temp_buffer, insize)); - EXPECT_EQ(0, memcmp(temp_buffer, strB, insize)); - - delete coded_input; - delete input; - } - } - - delete [] temp_buffer; - delete [] buffer; -} - -#if HAVE_ZLIB -TEST_F(IoTest, GzipIo) { - const int kBufferSize = 2*1024; - uint8* buffer = new uint8[kBufferSize]; - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - for (int z = 0; z < kBlockSizeCount; z++) { - int gzip_buffer_size = kBlockSizes[z]; - int size; - { - ArrayOutputStream output(buffer, kBufferSize, kBlockSizes[i]); - GzipOutputStream::Options options; - options.format = GzipOutputStream::GZIP; - if (gzip_buffer_size != -1) { - options.buffer_size = gzip_buffer_size; - } - GzipOutputStream gzout(&output, options); - WriteStuff(&gzout); - gzout.Close(); - size = output.ByteCount(); - } - { - ArrayInputStream input(buffer, size, kBlockSizes[j]); - GzipInputStream gzin( - &input, GzipInputStream::GZIP, gzip_buffer_size); - ReadStuff(&gzin); - } - } - } - } - delete [] buffer; -} - -TEST_F(IoTest, ZlibIo) { - const int kBufferSize = 2*1024; - uint8* buffer = new uint8[kBufferSize]; - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - for (int z = 0; z < kBlockSizeCount; z++) { - int gzip_buffer_size = kBlockSizes[z]; - int size; - { - ArrayOutputStream output(buffer, kBufferSize, kBlockSizes[i]); - GzipOutputStream::Options options; - options.format = GzipOutputStream::ZLIB; - if (gzip_buffer_size != -1) { - options.buffer_size = gzip_buffer_size; - } - GzipOutputStream gzout(&output, options); - WriteStuff(&gzout); - gzout.Close(); - size = output.ByteCount(); - } - { - ArrayInputStream input(buffer, size, kBlockSizes[j]); - GzipInputStream gzin( - &input, GzipInputStream::ZLIB, gzip_buffer_size); - ReadStuff(&gzin); - } - } - } - } - delete [] buffer; -} - -TEST_F(IoTest, ZlibIoInputAutodetect) { - const int kBufferSize = 2*1024; - uint8* buffer = new uint8[kBufferSize]; - int size; - { - ArrayOutputStream output(buffer, kBufferSize); - GzipOutputStream::Options options; - options.format = GzipOutputStream::ZLIB; - GzipOutputStream gzout(&output, options); - WriteStuff(&gzout); - gzout.Close(); - size = output.ByteCount(); - } - { - ArrayInputStream input(buffer, size); - GzipInputStream gzin(&input, GzipInputStream::AUTO); - ReadStuff(&gzin); - } - { - ArrayOutputStream output(buffer, kBufferSize); - GzipOutputStream::Options options; - options.format = GzipOutputStream::GZIP; - GzipOutputStream gzout(&output, options); - WriteStuff(&gzout); - gzout.Close(); - size = output.ByteCount(); - } - { - ArrayInputStream input(buffer, size); - GzipInputStream gzin(&input, GzipInputStream::AUTO); - ReadStuff(&gzin); - } - delete [] buffer; -} - -string IoTest::Compress(const string& data, - const GzipOutputStream::Options& options) { - string result; - { - StringOutputStream output(&result); - GzipOutputStream gzout(&output, options); - WriteToOutput(&gzout, data.data(), data.size()); - } - return result; -} - -string IoTest::Uncompress(const string& data) { - string result; - { - ArrayInputStream input(data.data(), data.size()); - GzipInputStream gzin(&input); - const void* buffer; - int size; - while (gzin.Next(&buffer, &size)) { - result.append(reinterpret_cast(buffer), size); - } - } - return result; -} - -TEST_F(IoTest, CompressionOptions) { - // Some ad-hoc testing of compression options. - - string golden; - File::ReadFileToStringOrDie( - TestSourceDir() + "/google/protobuf/testdata/golden_message", - &golden); - - GzipOutputStream::Options options; - string gzip_compressed = Compress(golden, options); - - options.compression_level = 0; - string not_compressed = Compress(golden, options); - - // Try zlib compression for fun. - options = GzipOutputStream::Options(); - options.format = GzipOutputStream::ZLIB; - string zlib_compressed = Compress(golden, options); - - // Uncompressed should be bigger than the original since it should have some - // sort of header. - EXPECT_GT(not_compressed.size(), golden.size()); - - // Higher compression levels should result in smaller sizes. - EXPECT_LT(zlib_compressed.size(), not_compressed.size()); - - // ZLIB format should differ from GZIP format. - EXPECT_TRUE(zlib_compressed != gzip_compressed); - - // Everything should decompress correctly. - EXPECT_TRUE(Uncompress(not_compressed) == golden); - EXPECT_TRUE(Uncompress(gzip_compressed) == golden); - EXPECT_TRUE(Uncompress(zlib_compressed) == golden); -} - -TEST_F(IoTest, TwoSessionWriteGzip) { - // Test that two concatenated gzip streams can be read correctly - - static const char* strA = "0123456789"; - static const char* strB = "QuickBrownFox"; - const int kBufferSize = 2*1024; - uint8* buffer = new uint8[kBufferSize]; - char* temp_buffer = new char[40]; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - ArrayOutputStream* output = - new ArrayOutputStream(buffer, kBufferSize, kBlockSizes[i]); - GzipOutputStream* gzout = new GzipOutputStream(output); - CodedOutputStream* coded_output = new CodedOutputStream(gzout); - int32 outlen = strlen(strA) + 1; - coded_output->WriteVarint32(outlen); - coded_output->WriteRaw(strA, outlen); - delete coded_output; // flush - delete gzout; // flush - int64 pos = output->ByteCount(); - delete output; - output = new ArrayOutputStream( - buffer + pos, kBufferSize - pos, kBlockSizes[i]); - gzout = new GzipOutputStream(output); - coded_output = new CodedOutputStream(gzout); - outlen = strlen(strB) + 1; - coded_output->WriteVarint32(outlen); - coded_output->WriteRaw(strB, outlen); - delete coded_output; // flush - delete gzout; // flush - int64 size = pos + output->ByteCount(); - delete output; - - ArrayInputStream* input = - new ArrayInputStream(buffer, size, kBlockSizes[j]); - GzipInputStream* gzin = new GzipInputStream(input); - CodedInputStream* coded_input = new CodedInputStream(gzin); - uint32 insize; - EXPECT_TRUE(coded_input->ReadVarint32(&insize)); - EXPECT_EQ(strlen(strA) + 1, insize); - EXPECT_TRUE(coded_input->ReadRaw(temp_buffer, insize)); - EXPECT_EQ(0, memcmp(temp_buffer, strA, insize)) - << "strA=" << strA << " in=" << temp_buffer; - - EXPECT_TRUE(coded_input->ReadVarint32(&insize)); - EXPECT_EQ(strlen(strB) + 1, insize); - EXPECT_TRUE(coded_input->ReadRaw(temp_buffer, insize)); - EXPECT_EQ(0, memcmp(temp_buffer, strB, insize)) - << " out_block_size=" << kBlockSizes[i] - << " in_block_size=" << kBlockSizes[j] - << " pos=" << pos - << " size=" << size - << " strB=" << strB << " in=" << temp_buffer; - - delete coded_input; - delete gzin; - delete input; - } - } - - delete [] temp_buffer; - delete [] buffer; -} -#endif - -// There is no string input, only string output. Also, it doesn't support -// explicit block sizes. So, we'll only run one test and we'll use -// ArrayInput to read back the results. -TEST_F(IoTest, StringIo) { - string str; - { - StringOutputStream output(&str); - WriteStuff(&output); - } - { - ArrayInputStream input(str.data(), str.size()); - ReadStuff(&input); - } -} - - -// To test files, we create a temporary file, write, read, truncate, repeat. -TEST_F(IoTest, FileIo) { - string filename = TestTempDir() + "/zero_copy_stream_test_file"; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - // Make a temporary file. - int file = - open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0777); - ASSERT_GE(file, 0); - - { - FileOutputStream output(file, kBlockSizes[i]); - WriteStuff(&output); - EXPECT_EQ(0, output.GetErrno()); - } - - // Rewind. - ASSERT_NE(lseek(file, 0, SEEK_SET), (off_t)-1); - - { - FileInputStream input(file, kBlockSizes[j]); - ReadStuff(&input); - EXPECT_EQ(0, input.GetErrno()); - } - - close(file); - } - } -} - -#if HAVE_ZLIB -TEST_F(IoTest, GzipFileIo) { - string filename = TestTempDir() + "/zero_copy_stream_test_file"; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - // Make a temporary file. - int file = - open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0777); - ASSERT_GE(file, 0); - { - FileOutputStream output(file, kBlockSizes[i]); - GzipOutputStream gzout(&output); - WriteStuffLarge(&gzout); - gzout.Close(); - output.Flush(); - EXPECT_EQ(0, output.GetErrno()); - } - - // Rewind. - ASSERT_NE(lseek(file, 0, SEEK_SET), (off_t)-1); - - { - FileInputStream input(file, kBlockSizes[j]); - GzipInputStream gzin(&input); - ReadStuffLarge(&gzin); - EXPECT_EQ(0, input.GetErrno()); - } - - close(file); - } - } -} -#endif - -// MSVC raises various debugging exceptions if we try to use a file -// descriptor of -1, defeating our tests below. This class will disable -// these debug assertions while in scope. -class MsvcDebugDisabler { - public: -#if defined(_MSC_VER) && _MSC_VER >= 1400 - MsvcDebugDisabler() { - old_handler_ = _set_invalid_parameter_handler(MyHandler); - old_mode_ = _CrtSetReportMode(_CRT_ASSERT, 0); - } - ~MsvcDebugDisabler() { - old_handler_ = _set_invalid_parameter_handler(old_handler_); - old_mode_ = _CrtSetReportMode(_CRT_ASSERT, old_mode_); - } - - static void MyHandler(const wchar_t *expr, - const wchar_t *func, - const wchar_t *file, - unsigned int line, - uintptr_t pReserved) { - // do nothing - } - - _invalid_parameter_handler old_handler_; - int old_mode_; -#else - // Dummy constructor and destructor to ensure that GCC doesn't complain - // that debug_disabler is an unused variable. - MsvcDebugDisabler() {} - ~MsvcDebugDisabler() {} -#endif -}; - -// Test that FileInputStreams report errors correctly. -TEST_F(IoTest, FileReadError) { - MsvcDebugDisabler debug_disabler; - - // -1 = invalid file descriptor. - FileInputStream input(-1); - - const void* buffer; - int size; - EXPECT_FALSE(input.Next(&buffer, &size)); - EXPECT_EQ(EBADF, input.GetErrno()); -} - -// Test that FileOutputStreams report errors correctly. -TEST_F(IoTest, FileWriteError) { - MsvcDebugDisabler debug_disabler; - - // -1 = invalid file descriptor. - FileOutputStream input(-1); - - void* buffer; - int size; - - // The first call to Next() succeeds because it doesn't have anything to - // write yet. - EXPECT_TRUE(input.Next(&buffer, &size)); - - // Second call fails. - EXPECT_FALSE(input.Next(&buffer, &size)); - - EXPECT_EQ(EBADF, input.GetErrno()); -} - -// Pipes are not seekable, so File{Input,Output}Stream ends up doing some -// different things to handle them. We'll test by writing to a pipe and -// reading back from it. -TEST_F(IoTest, PipeIo) { - int files[2]; - - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - // Need to create a new pipe each time because ReadStuff() expects - // to see EOF at the end. - ASSERT_EQ(pipe(files), 0); - - { - FileOutputStream output(files[1], kBlockSizes[i]); - WriteStuff(&output); - EXPECT_EQ(0, output.GetErrno()); - } - close(files[1]); // Send EOF. - - { - FileInputStream input(files[0], kBlockSizes[j]); - ReadStuff(&input); - EXPECT_EQ(0, input.GetErrno()); - } - close(files[0]); - } - } -} - -// Test using C++ iostreams. -TEST_F(IoTest, IostreamIo) { - for (int i = 0; i < kBlockSizeCount; i++) { - for (int j = 0; j < kBlockSizeCount; j++) { - { - stringstream stream; - - { - OstreamOutputStream output(&stream, kBlockSizes[i]); - WriteStuff(&output); - EXPECT_FALSE(stream.fail()); - } - - { - IstreamInputStream input(&stream, kBlockSizes[j]); - ReadStuff(&input); - EXPECT_TRUE(stream.eof()); - } - } - - { - stringstream stream; - - { - OstreamOutputStream output(&stream, kBlockSizes[i]); - WriteStuffLarge(&output); - EXPECT_FALSE(stream.fail()); - } - - { - IstreamInputStream input(&stream, kBlockSizes[j]); - ReadStuffLarge(&input); - EXPECT_TRUE(stream.eof()); - } - } - } - } -} - -// To test ConcatenatingInputStream, we create several ArrayInputStreams -// covering a buffer and then concatenate them. -TEST_F(IoTest, ConcatenatingInputStream) { - const int kBufferSize = 256; - uint8 buffer[kBufferSize]; - - // Fill the buffer. - ArrayOutputStream output(buffer, kBufferSize); - WriteStuff(&output); - - // Now split it up into multiple streams of varying sizes. - ASSERT_EQ(68, output.ByteCount()); // Test depends on this. - ArrayInputStream input1(buffer , 12); - ArrayInputStream input2(buffer + 12, 7); - ArrayInputStream input3(buffer + 19, 6); - ArrayInputStream input4(buffer + 25, 15); - ArrayInputStream input5(buffer + 40, 0); - // Note: We want to make sure we have a stream boundary somewhere between - // bytes 42 and 62, which is the range that it Skip()ed by ReadStuff(). This - // tests that a bug that existed in the original code for Skip() is fixed. - ArrayInputStream input6(buffer + 40, 10); - ArrayInputStream input7(buffer + 50, 18); // Total = 68 bytes. - - ZeroCopyInputStream* streams[] = - {&input1, &input2, &input3, &input4, &input5, &input6, &input7}; - - // Create the concatenating stream and read. - ConcatenatingInputStream input(streams, GOOGLE_ARRAYSIZE(streams)); - ReadStuff(&input); -} - -// To test LimitingInputStream, we write our golden text to a buffer, then -// create an ArrayInputStream that contains the whole buffer (not just the -// bytes written), then use a LimitingInputStream to limit it just to the -// bytes written. -TEST_F(IoTest, LimitingInputStream) { - const int kBufferSize = 256; - uint8 buffer[kBufferSize]; - - // Fill the buffer. - ArrayOutputStream output(buffer, kBufferSize); - WriteStuff(&output); - - // Set up input. - ArrayInputStream array_input(buffer, kBufferSize); - LimitingInputStream input(&array_input, output.ByteCount()); - - ReadStuff(&input); -} - -// Check that a zero-size array doesn't confuse the code. -TEST(ZeroSizeArray, Input) { - ArrayInputStream input(NULL, 0); - const void* data; - int size; - EXPECT_FALSE(input.Next(&data, &size)); -} - -TEST(ZeroSizeArray, Output) { - ArrayOutputStream output(NULL, 0); - void* data; - int size; - EXPECT_FALSE(output.Next(&data, &size)); -} - -} // namespace -} // namespace io -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/lite_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/lite_unittest.cc deleted file mode 100644 index ffeec3c4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/lite_unittest.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include - -#include -#include - -using namespace std; - -int main(int argc, char* argv[]) { - string data, packed_data; - - { - protobuf_unittest::TestAllTypesLite message, message2, message3; - google::protobuf::TestUtilLite::ExpectClear(message); - google::protobuf::TestUtilLite::SetAllFields(&message); - message2.CopyFrom(message); - data = message.SerializeAsString(); - message3.ParseFromString(data); - google::protobuf::TestUtilLite::ExpectAllFieldsSet(message); - google::protobuf::TestUtilLite::ExpectAllFieldsSet(message2); - google::protobuf::TestUtilLite::ExpectAllFieldsSet(message3); - google::protobuf::TestUtilLite::ModifyRepeatedFields(&message); - google::protobuf::TestUtilLite::ExpectRepeatedFieldsModified(message); - message.Clear(); - google::protobuf::TestUtilLite::ExpectClear(message); - } - - { - protobuf_unittest::TestAllExtensionsLite message, message2, message3; - google::protobuf::TestUtilLite::ExpectExtensionsClear(message); - google::protobuf::TestUtilLite::SetAllExtensions(&message); - message2.CopyFrom(message); - string extensions_data = message.SerializeAsString(); - GOOGLE_CHECK(extensions_data == data); - message3.ParseFromString(extensions_data); - google::protobuf::TestUtilLite::ExpectAllExtensionsSet(message); - google::protobuf::TestUtilLite::ExpectAllExtensionsSet(message2); - google::protobuf::TestUtilLite::ExpectAllExtensionsSet(message3); - google::protobuf::TestUtilLite::ModifyRepeatedExtensions(&message); - google::protobuf::TestUtilLite::ExpectRepeatedExtensionsModified(message); - message.Clear(); - google::protobuf::TestUtilLite::ExpectExtensionsClear(message); - } - - { - protobuf_unittest::TestPackedTypesLite message, message2, message3; - google::protobuf::TestUtilLite::ExpectPackedClear(message); - google::protobuf::TestUtilLite::SetPackedFields(&message); - message2.CopyFrom(message); - packed_data = message.SerializeAsString(); - message3.ParseFromString(packed_data); - google::protobuf::TestUtilLite::ExpectPackedFieldsSet(message); - google::protobuf::TestUtilLite::ExpectPackedFieldsSet(message2); - google::protobuf::TestUtilLite::ExpectPackedFieldsSet(message3); - google::protobuf::TestUtilLite::ModifyPackedFields(&message); - google::protobuf::TestUtilLite::ExpectPackedFieldsModified(message); - message.Clear(); - google::protobuf::TestUtilLite::ExpectPackedClear(message); - } - - { - protobuf_unittest::TestPackedExtensionsLite message, message2, message3; - google::protobuf::TestUtilLite::ExpectPackedExtensionsClear(message); - google::protobuf::TestUtilLite::SetPackedExtensions(&message); - message2.CopyFrom(message); - string packed_extensions_data = message.SerializeAsString(); - GOOGLE_CHECK(packed_extensions_data == packed_data); - message3.ParseFromString(packed_extensions_data); - google::protobuf::TestUtilLite::ExpectPackedExtensionsSet(message); - google::protobuf::TestUtilLite::ExpectPackedExtensionsSet(message2); - google::protobuf::TestUtilLite::ExpectPackedExtensionsSet(message3); - google::protobuf::TestUtilLite::ModifyPackedExtensions(&message); - google::protobuf::TestUtilLite::ExpectPackedExtensionsModified(message); - message.Clear(); - google::protobuf::TestUtilLite::ExpectPackedExtensionsClear(message); - } - - cout << "PASS" << endl; - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.cc deleted file mode 100644 index 91e6878e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.cc +++ /dev/null @@ -1,318 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -using internal::WireFormat; -using internal::ReflectionOps; - -Message::~Message() {} - -void Message::MergeFrom(const Message& from) { - const Descriptor* descriptor = GetDescriptor(); - GOOGLE_CHECK_EQ(from.GetDescriptor(), descriptor) - << ": Tried to merge from a message with a different type. " - "to: " << descriptor->full_name() << ", " - "from:" << from.GetDescriptor()->full_name(); - ReflectionOps::Merge(from, this); -} - -void Message::CheckTypeAndMergeFrom(const MessageLite& other) { - MergeFrom(*down_cast(&other)); -} - -void Message::CopyFrom(const Message& from) { - const Descriptor* descriptor = GetDescriptor(); - GOOGLE_CHECK_EQ(from.GetDescriptor(), descriptor) - << ": Tried to copy from a message with a different type." - "to: " << descriptor->full_name() << ", " - "from:" << from.GetDescriptor()->full_name(); - ReflectionOps::Copy(from, this); -} - -string Message::GetTypeName() const { - return GetDescriptor()->full_name(); -} - -void Message::Clear() { - ReflectionOps::Clear(this); -} - -bool Message::IsInitialized() const { - return ReflectionOps::IsInitialized(*this); -} - -void Message::FindInitializationErrors(vector* errors) const { - return ReflectionOps::FindInitializationErrors(*this, "", errors); -} - -string Message::InitializationErrorString() const { - vector errors; - FindInitializationErrors(&errors); - return JoinStrings(errors, ", "); -} - -void Message::CheckInitialized() const { - GOOGLE_CHECK(IsInitialized()) - << "Message of type \"" << GetDescriptor()->full_name() - << "\" is missing required fields: " << InitializationErrorString(); -} - -void Message::DiscardUnknownFields() { - return ReflectionOps::DiscardUnknownFields(this); -} - -bool Message::MergePartialFromCodedStream(io::CodedInputStream* input) { - return WireFormat::ParseAndMergePartial(input, this); -} - -bool Message::ParseFromFileDescriptor(int file_descriptor) { - io::FileInputStream input(file_descriptor); - return ParseFromZeroCopyStream(&input) && input.GetErrno() == 0; -} - -bool Message::ParsePartialFromFileDescriptor(int file_descriptor) { - io::FileInputStream input(file_descriptor); - return ParsePartialFromZeroCopyStream(&input) && input.GetErrno() == 0; -} - -bool Message::ParseFromIstream(istream* input) { - io::IstreamInputStream zero_copy_input(input); - return ParseFromZeroCopyStream(&zero_copy_input) && input->eof(); -} - -bool Message::ParsePartialFromIstream(istream* input) { - io::IstreamInputStream zero_copy_input(input); - return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof(); -} - - -void Message::SerializeWithCachedSizes( - io::CodedOutputStream* output) const { - WireFormat::SerializeWithCachedSizes(*this, GetCachedSize(), output); -} - -int Message::ByteSize() const { - int size = WireFormat::ByteSize(*this); - SetCachedSize(size); - return size; -} - -void Message::SetCachedSize(int size) const { - GOOGLE_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name() - << "\" implements neither SetCachedSize() nor ByteSize(). " - "Must implement one or the other."; -} - -int Message::SpaceUsed() const { - return GetReflection()->SpaceUsed(*this); -} - -bool Message::SerializeToFileDescriptor(int file_descriptor) const { - io::FileOutputStream output(file_descriptor); - return SerializeToZeroCopyStream(&output); -} - -bool Message::SerializePartialToFileDescriptor(int file_descriptor) const { - io::FileOutputStream output(file_descriptor); - return SerializePartialToZeroCopyStream(&output); -} - -bool Message::SerializeToOstream(ostream* output) const { - { - io::OstreamOutputStream zero_copy_output(output); - if (!SerializeToZeroCopyStream(&zero_copy_output)) return false; - } - return output->good(); -} - -bool Message::SerializePartialToOstream(ostream* output) const { - io::OstreamOutputStream zero_copy_output(output); - return SerializePartialToZeroCopyStream(&zero_copy_output); -} - - -Reflection::~Reflection() {} - -// =================================================================== -// MessageFactory - -MessageFactory::~MessageFactory() {} - -namespace { - -class GeneratedMessageFactory : public MessageFactory { - public: - GeneratedMessageFactory(); - ~GeneratedMessageFactory(); - - static GeneratedMessageFactory* singleton(); - - typedef void RegistrationFunc(const string&); - void RegisterFile(const char* file, RegistrationFunc* registration_func); - void RegisterType(const Descriptor* descriptor, const Message* prototype); - - // implements MessageFactory --------------------------------------- - const Message* GetPrototype(const Descriptor* type); - - private: - // Only written at static init time, so does not require locking. - hash_map, streq> file_map_; - - // Initialized lazily, so requires locking. - Mutex mutex_; - hash_map type_map_; -}; - -GeneratedMessageFactory* generated_message_factory_ = NULL; -GOOGLE_PROTOBUF_DECLARE_ONCE(generated_message_factory_once_init_); - -void ShutdownGeneratedMessageFactory() { - delete generated_message_factory_; -} - -void InitGeneratedMessageFactory() { - generated_message_factory_ = new GeneratedMessageFactory; - internal::OnShutdown(&ShutdownGeneratedMessageFactory); -} - -GeneratedMessageFactory::GeneratedMessageFactory() {} -GeneratedMessageFactory::~GeneratedMessageFactory() {} - -GeneratedMessageFactory* GeneratedMessageFactory::singleton() { - ::google::protobuf::GoogleOnceInit(&generated_message_factory_once_init_, - &InitGeneratedMessageFactory); - return generated_message_factory_; -} - -void GeneratedMessageFactory::RegisterFile( - const char* file, RegistrationFunc* registration_func) { - if (!InsertIfNotPresent(&file_map_, file, registration_func)) { - GOOGLE_LOG(FATAL) << "File is already registered: " << file; - } -} - -void GeneratedMessageFactory::RegisterType(const Descriptor* descriptor, - const Message* prototype) { - GOOGLE_DCHECK_EQ(descriptor->file()->pool(), DescriptorPool::generated_pool()) - << "Tried to register a non-generated type with the generated " - "type registry."; - - // This should only be called as a result of calling a file registration - // function during GetPrototype(), in which case we already have locked - // the mutex. - mutex_.AssertHeld(); - if (!InsertIfNotPresent(&type_map_, descriptor, prototype)) { - GOOGLE_LOG(DFATAL) << "Type is already registered: " << descriptor->full_name(); - } -} - -const Message* GeneratedMessageFactory::GetPrototype(const Descriptor* type) { - { - ReaderMutexLock lock(&mutex_); - const Message* result = FindPtrOrNull(type_map_, type); - if (result != NULL) return result; - } - - // If the type is not in the generated pool, then we can't possibly handle - // it. - if (type->file()->pool() != DescriptorPool::generated_pool()) return NULL; - - // Apparently the file hasn't been registered yet. Let's do that now. - RegistrationFunc* registration_func = - FindPtrOrNull(file_map_, type->file()->name().c_str()); - if (registration_func == NULL) { - GOOGLE_LOG(DFATAL) << "File appears to be in generated pool but wasn't " - "registered: " << type->file()->name(); - return NULL; - } - - WriterMutexLock lock(&mutex_); - - // Check if another thread preempted us. - const Message* result = FindPtrOrNull(type_map_, type); - if (result == NULL) { - // Nope. OK, register everything. - registration_func(type->file()->name()); - // Should be here now. - result = FindPtrOrNull(type_map_, type); - } - - if (result == NULL) { - GOOGLE_LOG(DFATAL) << "Type appears to be in generated pool but wasn't " - << "registered: " << type->full_name(); - } - - return result; -} - -} // namespace - -MessageFactory* MessageFactory::generated_factory() { - return GeneratedMessageFactory::singleton(); -} - -void MessageFactory::InternalRegisterGeneratedFile( - const char* filename, void (*register_messages)(const string&)) { - GeneratedMessageFactory::singleton()->RegisterFile(filename, - register_messages); -} - -void MessageFactory::InternalRegisterGeneratedMessage( - const Descriptor* descriptor, const Message* prototype) { - GeneratedMessageFactory::singleton()->RegisterType(descriptor, prototype); -} - - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.h deleted file mode 100644 index 4bbc6418..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message.h +++ /dev/null @@ -1,692 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Defines Message, the abstract interface implemented by non-lite -// protocol message objects. Although it's possible to implement this -// interface manually, most users will use the protocol compiler to -// generate implementations. -// -// Example usage: -// -// Say you have a message defined as: -// -// message Foo { -// optional string text = 1; -// repeated int32 numbers = 2; -// } -// -// Then, if you used the protocol compiler to generate a class from the above -// definition, you could use it like so: -// -// string data; // Will store a serialized version of the message. -// -// { -// // Create a message and serialize it. -// Foo foo; -// foo.set_text("Hello World!"); -// foo.add_numbers(1); -// foo.add_numbers(5); -// foo.add_numbers(42); -// -// foo.SerializeToString(&data); -// } -// -// { -// // Parse the serialized message and check that it contains the -// // correct data. -// Foo foo; -// foo.ParseFromString(data); -// -// assert(foo.text() == "Hello World!"); -// assert(foo.numbers_size() == 3); -// assert(foo.numbers(0) == 1); -// assert(foo.numbers(1) == 5); -// assert(foo.numbers(2) == 42); -// } -// -// { -// // Same as the last block, but do it dynamically via the Message -// // reflection interface. -// Message* foo = new Foo; -// Descriptor* descriptor = foo->GetDescriptor(); -// -// // Get the descriptors for the fields we're interested in and verify -// // their types. -// FieldDescriptor* text_field = descriptor->FindFieldByName("text"); -// assert(text_field != NULL); -// assert(text_field->type() == FieldDescriptor::TYPE_STRING); -// assert(text_field->label() == FieldDescriptor::TYPE_OPTIONAL); -// FieldDescriptor* numbers_field = descriptor->FindFieldByName("numbers"); -// assert(numbers_field != NULL); -// assert(numbers_field->type() == FieldDescriptor::TYPE_INT32); -// assert(numbers_field->label() == FieldDescriptor::TYPE_REPEATED); -// -// // Parse the message. -// foo->ParseFromString(data); -// -// // Use the reflection interface to examine the contents. -// const Reflection* reflection = foo->GetReflection(); -// assert(reflection->GetString(foo, text_field) == "Hello World!"); -// assert(reflection->FieldSize(foo, numbers_field) == 3); -// assert(reflection->GetRepeatedInt32(foo, numbers_field, 0) == 1); -// assert(reflection->GetRepeatedInt32(foo, numbers_field, 1) == 5); -// assert(reflection->GetRepeatedInt32(foo, numbers_field, 2) == 42); -// -// delete foo; -// } - -#ifndef GOOGLE_PROTOBUF_MESSAGE_H__ -#define GOOGLE_PROTOBUF_MESSAGE_H__ - -#include -#include - -#ifdef __DECCXX -// HP C++'s iosfwd doesn't work. -#include -#else -#include -#endif - -#include - -#include - - -namespace google { -namespace protobuf { - -// Defined in this file. -class Message; -class Reflection; -class MessageFactory; - -// Defined in other files. -class Descriptor; // descriptor.h -class FieldDescriptor; // descriptor.h -class EnumDescriptor; // descriptor.h -class EnumValueDescriptor; // descriptor.h -namespace io { - class ZeroCopyInputStream; // zero_copy_stream.h - class ZeroCopyOutputStream; // zero_copy_stream.h - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h -} -class UnknownFieldSet; // unknown_field_set.h - -// A container to hold message metadata. -struct Metadata { - const Descriptor* descriptor; - const Reflection* reflection; -}; - -// Returns the EnumDescriptor for enum type E, which must be a -// proto-declared enum type. Code generated by the protocol compiler -// will include specializations of this template for each enum type declared. -template -const EnumDescriptor* GetEnumDescriptor(); - -// Abstract interface for protocol messages. -// -// See also MessageLite, which contains most every-day operations. Message -// adds descriptors and reflection on top of that. -// -// The methods of this class that are virtual but not pure-virtual have -// default implementations based on reflection. Message classes which are -// optimized for speed will want to override these with faster implementations, -// but classes optimized for code size may be happy with keeping them. See -// the optimize_for option in descriptor.proto. -class LIBPROTOBUF_EXPORT Message : public MessageLite { - public: - inline Message() {} - virtual ~Message(); - - // Basic Operations ------------------------------------------------ - - // Construct a new instance of the same type. Ownership is passed to the - // caller. (This is also defined in MessageLite, but is defined again here - // for return-type covariance.) - virtual Message* New() const = 0; - - // Make this message into a copy of the given message. The given message - // must have the same descriptor, but need not necessarily be the same class. - // By default this is just implemented as "Clear(); MergeFrom(from);". - virtual void CopyFrom(const Message& from); - - // Merge the fields from the given message into this message. Singular - // fields will be overwritten, except for embedded messages which will - // be merged. Repeated fields will be concatenated. The given message - // must be of the same type as this message (i.e. the exact same class). - virtual void MergeFrom(const Message& from); - - // Verifies that IsInitialized() returns true. GOOGLE_CHECK-fails otherwise, with - // a nice error message. - void CheckInitialized() const; - - // Slowly build a list of all required fields that are not set. - // This is much, much slower than IsInitialized() as it is implemented - // purely via reflection. Generally, you should not call this unless you - // have already determined that an error exists by calling IsInitialized(). - void FindInitializationErrors(vector* errors) const; - - // Like FindInitializationErrors, but joins all the strings, delimited by - // commas, and returns them. - string InitializationErrorString() const; - - // Clears all unknown fields from this message and all embedded messages. - // Normally, if unknown tag numbers are encountered when parsing a message, - // the tag and value are stored in the message's UnknownFieldSet and - // then written back out when the message is serialized. This allows servers - // which simply route messages to other servers to pass through messages - // that have new field definitions which they don't yet know about. However, - // this behavior can have security implications. To avoid it, call this - // method after parsing. - // - // See Reflection::GetUnknownFields() for more on unknown fields. - virtual void DiscardUnknownFields(); - - // Computes (an estimate of) the total number of bytes currently used for - // storing the message in memory. The default implementation calls the - // Reflection object's SpaceUsed() method. - virtual int SpaceUsed() const; - - // Debugging & Testing---------------------------------------------- - - // Generates a human readable form of this message, useful for debugging - // and other purposes. - string DebugString() const; - // Like DebugString(), but with less whitespace. - string ShortDebugString() const; - // Like DebugString(), but do not escape UTF-8 byte sequences. - string Utf8DebugString() const; - // Convenience function useful in GDB. Prints DebugString() to stdout. - void PrintDebugString() const; - - // Heavy I/O ------------------------------------------------------- - // Additional parsing and serialization methods not implemented by - // MessageLite because they are not supported by the lite library. - - // Parse a protocol buffer from a file descriptor. If successful, the entire - // input will be consumed. - bool ParseFromFileDescriptor(int file_descriptor); - // Like ParseFromFileDescriptor(), but accepts messages that are missing - // required fields. - bool ParsePartialFromFileDescriptor(int file_descriptor); - // Parse a protocol buffer from a C++ istream. If successful, the entire - // input will be consumed. - bool ParseFromIstream(istream* input); - // Like ParseFromIstream(), but accepts messages that are missing - // required fields. - bool ParsePartialFromIstream(istream* input); - - // Serialize the message and write it to the given file descriptor. All - // required fields must be set. - bool SerializeToFileDescriptor(int file_descriptor) const; - // Like SerializeToFileDescriptor(), but allows missing required fields. - bool SerializePartialToFileDescriptor(int file_descriptor) const; - // Serialize the message and write it to the given C++ ostream. All - // required fields must be set. - bool SerializeToOstream(ostream* output) const; - // Like SerializeToOstream(), but allows missing required fields. - bool SerializePartialToOstream(ostream* output) const; - - - // Reflection-based methods ---------------------------------------- - // These methods are pure-virtual in MessageLite, but Message provides - // reflection-based default implementations. - - virtual string GetTypeName() const; - virtual void Clear(); - virtual bool IsInitialized() const; - virtual void CheckTypeAndMergeFrom(const MessageLite& other); - virtual bool MergePartialFromCodedStream(io::CodedInputStream* input); - virtual int ByteSize() const; - virtual void SerializeWithCachedSizes(io::CodedOutputStream* output) const; - - private: - // This is called only by the default implementation of ByteSize(), to - // update the cached size. If you override ByteSize(), you do not need - // to override this. If you do not override ByteSize(), you MUST override - // this; the default implementation will crash. - // - // The method is private because subclasses should never call it; only - // override it. Yes, C++ lets you do that. Crazy, huh? - virtual void SetCachedSize(int size) const; - - public: - - // Introspection --------------------------------------------------- - - // Typedef for backwards-compatibility. - typedef google::protobuf::Reflection Reflection; - - // Get a Descriptor for this message's type. This describes what - // fields the message contains, the types of those fields, etc. - const Descriptor* GetDescriptor() const { return GetMetadata().descriptor; } - - // Get the Reflection interface for this Message, which can be used to - // read and modify the fields of the Message dynamically (in other words, - // without knowing the message type at compile time). This object remains - // property of the Message. - // - // This method remains virtual in case a subclass does not implement - // reflection and wants to override the default behavior. - virtual const Reflection* GetReflection() const { - return GetMetadata().reflection; - } - - protected: - // Get a struct containing the metadata for the Message. Most subclasses only - // need to implement this method, rather than the GetDescriptor() and - // GetReflection() wrappers. - virtual Metadata GetMetadata() const = 0; - - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Message); -}; - -// This interface contains methods that can be used to dynamically access -// and modify the fields of a protocol message. Their semantics are -// similar to the accessors the protocol compiler generates. -// -// To get the Reflection for a given Message, call Message::GetReflection(). -// -// This interface is separate from Message only for efficiency reasons; -// the vast majority of implementations of Message will share the same -// implementation of Reflection (GeneratedMessageReflection, -// defined in generated_message.h), and all Messages of a particular class -// should share the same Reflection object (though you should not rely on -// the latter fact). -// -// There are several ways that these methods can be used incorrectly. For -// example, any of the following conditions will lead to undefined -// results (probably assertion failures): -// - The FieldDescriptor is not a field of this message type. -// - The method called is not appropriate for the field's type. For -// each field type in FieldDescriptor::TYPE_*, there is only one -// Get*() method, one Set*() method, and one Add*() method that is -// valid for that type. It should be obvious which (except maybe -// for TYPE_BYTES, which are represented using strings in C++). -// - A Get*() or Set*() method for singular fields is called on a repeated -// field. -// - GetRepeated*(), SetRepeated*(), or Add*() is called on a non-repeated -// field. -// - The Message object passed to any method is not of the right type for -// this Reflection object (i.e. message.GetReflection() != reflection). -// -// You might wonder why there is not any abstract representation for a field -// of arbitrary type. E.g., why isn't there just a "GetField()" method that -// returns "const Field&", where "Field" is some class with accessors like -// "GetInt32Value()". The problem is that someone would have to deal with -// allocating these Field objects. For generated message classes, having to -// allocate space for an additional object to wrap every field would at least -// double the message's memory footprint, probably worse. Allocating the -// objects on-demand, on the other hand, would be expensive and prone to -// memory leaks. So, instead we ended up with this flat interface. -// -// TODO(kenton): Create a utility class which callers can use to read and -// write fields from a Reflection without paying attention to the type. -class LIBPROTOBUF_EXPORT Reflection { - public: - // TODO(kenton): Remove parameter. - inline Reflection() {} - virtual ~Reflection(); - - // Get the UnknownFieldSet for the message. This contains fields which - // were seen when the Message was parsed but were not recognized according - // to the Message's definition. - virtual const UnknownFieldSet& GetUnknownFields( - const Message& message) const = 0; - // Get a mutable pointer to the UnknownFieldSet for the message. This - // contains fields which were seen when the Message was parsed but were not - // recognized according to the Message's definition. - virtual UnknownFieldSet* MutableUnknownFields(Message* message) const = 0; - - // Estimate the amount of memory used by the message object. - virtual int SpaceUsed(const Message& message) const = 0; - - // Check if the given non-repeated field is set. - virtual bool HasField(const Message& message, - const FieldDescriptor* field) const = 0; - - // Get the number of elements of a repeated field. - virtual int FieldSize(const Message& message, - const FieldDescriptor* field) const = 0; - - // Clear the value of a field, so that HasField() returns false or - // FieldSize() returns zero. - virtual void ClearField(Message* message, - const FieldDescriptor* field) const = 0; - - // Remove the last element of a repeated field. - // We don't provide a way to remove any element other than the last - // because it invites inefficient use, such as O(n^2) filtering loops - // that should have been O(n). If you want to remove an element other - // than the last, the best way to do it is to re-arrange the elements - // (using Swap()) so that the one you want removed is at the end, then - // call RemoveLast(). - virtual void RemoveLast(Message* message, - const FieldDescriptor* field) const = 0; - - // Swap the complete contents of two messages. - virtual void Swap(Message* message1, Message* message2) const = 0; - - // Swap two elements of a repeated field. - virtual void SwapElements(Message* message, - const FieldDescriptor* field, - int index1, - int index2) const = 0; - - // List all fields of the message which are currently set. This includes - // extensions. Singular fields will only be listed if HasField(field) would - // return true and repeated fields will only be listed if FieldSize(field) - // would return non-zero. Fields (both normal fields and extension fields) - // will be listed ordered by field number. - virtual void ListFields(const Message& message, - vector* output) const = 0; - - // Singular field getters ------------------------------------------ - // These get the value of a non-repeated field. They return the default - // value for fields that aren't set. - - virtual int32 GetInt32 (const Message& message, - const FieldDescriptor* field) const = 0; - virtual int64 GetInt64 (const Message& message, - const FieldDescriptor* field) const = 0; - virtual uint32 GetUInt32(const Message& message, - const FieldDescriptor* field) const = 0; - virtual uint64 GetUInt64(const Message& message, - const FieldDescriptor* field) const = 0; - virtual float GetFloat (const Message& message, - const FieldDescriptor* field) const = 0; - virtual double GetDouble(const Message& message, - const FieldDescriptor* field) const = 0; - virtual bool GetBool (const Message& message, - const FieldDescriptor* field) const = 0; - virtual string GetString(const Message& message, - const FieldDescriptor* field) const = 0; - virtual const EnumValueDescriptor* GetEnum( - const Message& message, const FieldDescriptor* field) const = 0; - // See MutableMessage() for the meaning of the "factory" parameter. - virtual const Message& GetMessage(const Message& message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; - - // Get a string value without copying, if possible. - // - // GetString() necessarily returns a copy of the string. This can be - // inefficient when the string is already stored in a string object in the - // underlying message. GetStringReference() will return a reference to the - // underlying string in this case. Otherwise, it will copy the string into - // *scratch and return that. - // - // Note: It is perfectly reasonable and useful to write code like: - // str = reflection->GetStringReference(field, &str); - // This line would ensure that only one copy of the string is made - // regardless of the field's underlying representation. When initializing - // a newly-constructed string, though, it's just as fast and more readable - // to use code like: - // string str = reflection->GetString(field); - virtual const string& GetStringReference(const Message& message, - const FieldDescriptor* field, - string* scratch) const = 0; - - - // Singular field mutators ----------------------------------------- - // These mutate the value of a non-repeated field. - - virtual void SetInt32 (Message* message, - const FieldDescriptor* field, int32 value) const = 0; - virtual void SetInt64 (Message* message, - const FieldDescriptor* field, int64 value) const = 0; - virtual void SetUInt32(Message* message, - const FieldDescriptor* field, uint32 value) const = 0; - virtual void SetUInt64(Message* message, - const FieldDescriptor* field, uint64 value) const = 0; - virtual void SetFloat (Message* message, - const FieldDescriptor* field, float value) const = 0; - virtual void SetDouble(Message* message, - const FieldDescriptor* field, double value) const = 0; - virtual void SetBool (Message* message, - const FieldDescriptor* field, bool value) const = 0; - virtual void SetString(Message* message, - const FieldDescriptor* field, - const string& value) const = 0; - virtual void SetEnum (Message* message, - const FieldDescriptor* field, - const EnumValueDescriptor* value) const = 0; - // Get a mutable pointer to a field with a message type. If a MessageFactory - // is provided, it will be used to construct instances of the sub-message; - // otherwise, the default factory is used. If the field is an extension that - // does not live in the same pool as the containing message's descriptor (e.g. - // it lives in an overlay pool), then a MessageFactory must be provided. - // If you have no idea what that meant, then you probably don't need to worry - // about it (don't provide a MessageFactory). WARNING: If the - // FieldDescriptor is for a compiled-in extension, then - // factory->GetPrototype(field->message_type() MUST return an instance of the - // compiled-in class for this type, NOT DynamicMessage. - virtual Message* MutableMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; - - - // Repeated field getters ------------------------------------------ - // These get the value of one element of a repeated field. - - virtual int32 GetRepeatedInt32 (const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual int64 GetRepeatedInt64 (const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual uint32 GetRepeatedUInt32(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual uint64 GetRepeatedUInt64(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual float GetRepeatedFloat (const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual double GetRepeatedDouble(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual bool GetRepeatedBool (const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual string GetRepeatedString(const Message& message, - const FieldDescriptor* field, - int index) const = 0; - virtual const EnumValueDescriptor* GetRepeatedEnum( - const Message& message, - const FieldDescriptor* field, int index) const = 0; - virtual const Message& GetRepeatedMessage( - const Message& message, - const FieldDescriptor* field, int index) const = 0; - - // See GetStringReference(), above. - virtual const string& GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, - int index, string* scratch) const = 0; - - - // Repeated field mutators ----------------------------------------- - // These mutate the value of one element of a repeated field. - - virtual void SetRepeatedInt32 (Message* message, - const FieldDescriptor* field, - int index, int32 value) const = 0; - virtual void SetRepeatedInt64 (Message* message, - const FieldDescriptor* field, - int index, int64 value) const = 0; - virtual void SetRepeatedUInt32(Message* message, - const FieldDescriptor* field, - int index, uint32 value) const = 0; - virtual void SetRepeatedUInt64(Message* message, - const FieldDescriptor* field, - int index, uint64 value) const = 0; - virtual void SetRepeatedFloat (Message* message, - const FieldDescriptor* field, - int index, float value) const = 0; - virtual void SetRepeatedDouble(Message* message, - const FieldDescriptor* field, - int index, double value) const = 0; - virtual void SetRepeatedBool (Message* message, - const FieldDescriptor* field, - int index, bool value) const = 0; - virtual void SetRepeatedString(Message* message, - const FieldDescriptor* field, - int index, const string& value) const = 0; - virtual void SetRepeatedEnum(Message* message, - const FieldDescriptor* field, int index, - const EnumValueDescriptor* value) const = 0; - // Get a mutable pointer to an element of a repeated field with a message - // type. - virtual Message* MutableRepeatedMessage( - Message* message, const FieldDescriptor* field, int index) const = 0; - - - // Repeated field adders ------------------------------------------- - // These add an element to a repeated field. - - virtual void AddInt32 (Message* message, - const FieldDescriptor* field, int32 value) const = 0; - virtual void AddInt64 (Message* message, - const FieldDescriptor* field, int64 value) const = 0; - virtual void AddUInt32(Message* message, - const FieldDescriptor* field, uint32 value) const = 0; - virtual void AddUInt64(Message* message, - const FieldDescriptor* field, uint64 value) const = 0; - virtual void AddFloat (Message* message, - const FieldDescriptor* field, float value) const = 0; - virtual void AddDouble(Message* message, - const FieldDescriptor* field, double value) const = 0; - virtual void AddBool (Message* message, - const FieldDescriptor* field, bool value) const = 0; - virtual void AddString(Message* message, - const FieldDescriptor* field, - const string& value) const = 0; - virtual void AddEnum (Message* message, - const FieldDescriptor* field, - const EnumValueDescriptor* value) const = 0; - // See MutableMessage() for comments on the "factory" parameter. - virtual Message* AddMessage(Message* message, - const FieldDescriptor* field, - MessageFactory* factory = NULL) const = 0; - - - // Extensions ------------------------------------------------------ - - // Try to find an extension of this message type by fully-qualified field - // name. Returns NULL if no extension is known for this name or number. - virtual const FieldDescriptor* FindKnownExtensionByName( - const string& name) const = 0; - - // Try to find an extension of this message type by field number. - // Returns NULL if no extension is known for this name or number. - virtual const FieldDescriptor* FindKnownExtensionByNumber( - int number) const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Reflection); -}; - -// Abstract interface for a factory for message objects. -class LIBPROTOBUF_EXPORT MessageFactory { - public: - inline MessageFactory() {} - virtual ~MessageFactory(); - - // Given a Descriptor, gets or constructs the default (prototype) Message - // of that type. You can then call that message's New() method to construct - // a mutable message of that type. - // - // Calling this method twice with the same Descriptor returns the same - // object. The returned object remains property of the factory. Also, any - // objects created by calling the prototype's New() method share some data - // with the prototype, so these must be destoyed before the MessageFactory - // is destroyed. - // - // The given descriptor must outlive the returned message, and hence must - // outlive the MessageFactory. - // - // Some implementations do not support all types. GetPrototype() will - // return NULL if the descriptor passed in is not supported. - // - // This method may or may not be thread-safe depending on the implementation. - // Each implementation should document its own degree thread-safety. - virtual const Message* GetPrototype(const Descriptor* type) = 0; - - // Gets a MessageFactory which supports all generated, compiled-in messages. - // In other words, for any compiled-in type FooMessage, the following is true: - // MessageFactory::generated_factory()->GetPrototype( - // FooMessage::descriptor()) == FooMessage::default_instance() - // This factory supports all types which are found in - // DescriptorPool::generated_pool(). If given a descriptor from any other - // pool, GetPrototype() will return NULL. (You can also check if a - // descriptor is for a generated message by checking if - // descriptor->file()->pool() == DescriptorPool::generated_pool().) - // - // This factory is 100% thread-safe; calling GetPrototype() does not modify - // any shared data. - // - // This factory is a singleton. The caller must not delete the object. - static MessageFactory* generated_factory(); - - // For internal use only: Registers a .proto file at static initialization - // time, to be placed in generated_factory. The first time GetPrototype() - // is called with a descriptor from this file, |register_messages| will be - // called, with the file name as the parameter. It must call - // InternalRegisterGeneratedMessage() (below) to register each message type - // in the file. This strange mechanism is necessary because descriptors are - // built lazily, so we can't register types by their descriptor until we - // know that the descriptor exists. |filename| must be a permanent string. - static void InternalRegisterGeneratedFile( - const char* filename, void (*register_messages)(const string&)); - - // For internal use only: Registers a message type. Called only by the - // functions which are registered with InternalRegisterGeneratedFile(), - // above. - static void InternalRegisterGeneratedMessage(const Descriptor* descriptor, - const Message* prototype); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFactory); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_MESSAGE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.cc deleted file mode 100644 index 7c8f37dc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.cc +++ /dev/null @@ -1,334 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Authors: wink@google.com (Wink Saville), -// kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -MessageLite::~MessageLite() {} - -string MessageLite::InitializationErrorString() const { - return "(cannot determine missing fields for lite message)"; -} - -namespace { - -// When serializing, we first compute the byte size, then serialize the message. -// If serialization produces a different number of bytes than expected, we -// call this function, which crashes. The problem could be due to a bug in the -// protobuf implementation but is more likely caused by concurrent modification -// of the message. This function attempts to distinguish between the two and -// provide a useful error message. -void ByteSizeConsistencyError(int byte_size_before_serialization, - int byte_size_after_serialization, - int bytes_produced_by_serialization) { - GOOGLE_CHECK_EQ(byte_size_before_serialization, byte_size_after_serialization) - << "Protocol message was modified concurrently during serialization."; - GOOGLE_CHECK_EQ(bytes_produced_by_serialization, byte_size_before_serialization) - << "Byte size calculation and serialization were inconsistent. This " - "may indicate a bug in protocol buffers or it may be caused by " - "concurrent modification of the message."; - GOOGLE_LOG(FATAL) << "This shouldn't be called if all the sizes are equal."; -} - -string InitializationErrorMessage(const char* action, - const MessageLite& message) { - // Note: We want to avoid depending on strutil in the lite library, otherwise - // we'd use: - // - // return strings::Substitute( - // "Can't $0 message of type \"$1\" because it is missing required " - // "fields: $2", - // action, message.GetTypeName(), - // message.InitializationErrorString()); - - string result; - result += "Can't "; - result += action; - result += " message of type \""; - result += message.GetTypeName(); - result += "\" because it is missing required fields: "; - result += message.InitializationErrorString(); - return result; -} - -// Several of the Parse methods below just do one thing and then call another -// method. In a naive implementation, we might have ParseFromString() call -// ParseFromArray() which would call ParseFromZeroCopyStream() which would call -// ParseFromCodedStream() which would call MergeFromCodedStream() which would -// call MergePartialFromCodedStream(). However, when parsing very small -// messages, every function call introduces significant overhead. To avoid -// this without reproducing code, we use these forced-inline helpers. -// -// Note: GCC only allows GOOGLE_ATTRIBUTE_ALWAYS_INLINE on declarations, not -// definitions. -inline bool InlineMergeFromCodedStream(io::CodedInputStream* input, - MessageLite* message) - GOOGLE_ATTRIBUTE_ALWAYS_INLINE; -inline bool InlineParseFromCodedStream(io::CodedInputStream* input, - MessageLite* message) - GOOGLE_ATTRIBUTE_ALWAYS_INLINE; -inline bool InlineParsePartialFromCodedStream(io::CodedInputStream* input, - MessageLite* message) - GOOGLE_ATTRIBUTE_ALWAYS_INLINE; -inline bool InlineParseFromArray(const void* data, int size, - MessageLite* message) - GOOGLE_ATTRIBUTE_ALWAYS_INLINE; -inline bool InlineParsePartialFromArray(const void* data, int size, - MessageLite* message) - GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - -bool InlineMergeFromCodedStream(io::CodedInputStream* input, - MessageLite* message) { - if (!message->MergePartialFromCodedStream(input)) return false; - if (!message->IsInitialized()) { - GOOGLE_LOG(ERROR) << InitializationErrorMessage("parse", *message); - return false; - } - return true; -} - -bool InlineParseFromCodedStream(io::CodedInputStream* input, - MessageLite* message) { - message->Clear(); - return InlineMergeFromCodedStream(input, message); -} - -bool InlineParsePartialFromCodedStream(io::CodedInputStream* input, - MessageLite* message) { - message->Clear(); - return message->MergePartialFromCodedStream(input); -} - -bool InlineParseFromArray(const void* data, int size, MessageLite* message) { - io::CodedInputStream input(reinterpret_cast(data), size); - return InlineParseFromCodedStream(&input, message) && - input.ConsumedEntireMessage(); -} - -bool InlineParsePartialFromArray(const void* data, int size, - MessageLite* message) { - io::CodedInputStream input(reinterpret_cast(data), size); - return InlineParsePartialFromCodedStream(&input, message) && - input.ConsumedEntireMessage(); -} - -} // namespace - -bool MessageLite::MergeFromCodedStream(io::CodedInputStream* input) { - return InlineMergeFromCodedStream(input, this); -} - -bool MessageLite::ParseFromCodedStream(io::CodedInputStream* input) { - return InlineParseFromCodedStream(input, this); -} - -bool MessageLite::ParsePartialFromCodedStream(io::CodedInputStream* input) { - return InlineParsePartialFromCodedStream(input, this); -} - -bool MessageLite::ParseFromZeroCopyStream(io::ZeroCopyInputStream* input) { - io::CodedInputStream decoder(input); - return ParseFromCodedStream(&decoder) && decoder.ConsumedEntireMessage(); -} - -bool MessageLite::ParsePartialFromZeroCopyStream( - io::ZeroCopyInputStream* input) { - io::CodedInputStream decoder(input); - return ParsePartialFromCodedStream(&decoder) && - decoder.ConsumedEntireMessage(); -} - -bool MessageLite::ParseFromBoundedZeroCopyStream( - io::ZeroCopyInputStream* input, int size) { - io::CodedInputStream decoder(input); - decoder.PushLimit(size); - return ParseFromCodedStream(&decoder) && - decoder.ConsumedEntireMessage() && - decoder.BytesUntilLimit() == 0; -} - -bool MessageLite::ParsePartialFromBoundedZeroCopyStream( - io::ZeroCopyInputStream* input, int size) { - io::CodedInputStream decoder(input); - decoder.PushLimit(size); - return ParsePartialFromCodedStream(&decoder) && - decoder.ConsumedEntireMessage() && - decoder.BytesUntilLimit() == 0; -} - -bool MessageLite::ParseFromString(const string& data) { - return InlineParseFromArray(data.data(), data.size(), this); -} - -bool MessageLite::ParsePartialFromString(const string& data) { - return InlineParsePartialFromArray(data.data(), data.size(), this); -} - -bool MessageLite::ParseFromArray(const void* data, int size) { - return InlineParseFromArray(data, size, this); -} - -bool MessageLite::ParsePartialFromArray(const void* data, int size) { - return InlineParsePartialFromArray(data, size, this); -} - - -// =================================================================== - -uint8* MessageLite::SerializeWithCachedSizesToArray(uint8* target) const { - // We only optimize this when using optimize_for = SPEED. In other cases - // we just use the CodedOutputStream path. - int size = GetCachedSize(); - io::ArrayOutputStream out(target, size); - io::CodedOutputStream coded_out(&out); - SerializeWithCachedSizes(&coded_out); - GOOGLE_CHECK(!coded_out.HadError()); - return target + size; -} - -bool MessageLite::SerializeToCodedStream(io::CodedOutputStream* output) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); - return SerializePartialToCodedStream(output); -} - -bool MessageLite::SerializePartialToCodedStream( - io::CodedOutputStream* output) const { - const int size = ByteSize(); // Force size to be cached. - uint8* buffer = output->GetDirectBufferForNBytesAndAdvance(size); - if (buffer != NULL) { - uint8* end = SerializeWithCachedSizesToArray(buffer); - if (end - buffer != size) { - ByteSizeConsistencyError(size, ByteSize(), end - buffer); - } - return true; - } else { - int original_byte_count = output->ByteCount(); - SerializeWithCachedSizes(output); - if (output->HadError()) { - return false; - } - int final_byte_count = output->ByteCount(); - - if (final_byte_count - original_byte_count != size) { - ByteSizeConsistencyError(size, ByteSize(), - final_byte_count - original_byte_count); - } - - return true; - } -} - -bool MessageLite::SerializeToZeroCopyStream( - io::ZeroCopyOutputStream* output) const { - io::CodedOutputStream encoder(output); - return SerializeToCodedStream(&encoder); -} - -bool MessageLite::SerializePartialToZeroCopyStream( - io::ZeroCopyOutputStream* output) const { - io::CodedOutputStream encoder(output); - return SerializePartialToCodedStream(&encoder); -} - -bool MessageLite::AppendToString(string* output) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); - return AppendPartialToString(output); -} - -bool MessageLite::AppendPartialToString(string* output) const { - int old_size = output->size(); - int byte_size = ByteSize(); - STLStringResizeUninitialized(output, old_size + byte_size); - uint8* start = reinterpret_cast(string_as_array(output) + old_size); - uint8* end = SerializeWithCachedSizesToArray(start); - if (end - start != byte_size) { - ByteSizeConsistencyError(byte_size, ByteSize(), end - start); - } - return true; -} - -bool MessageLite::SerializeToString(string* output) const { - output->clear(); - return AppendToString(output); -} - -bool MessageLite::SerializePartialToString(string* output) const { - output->clear(); - return AppendPartialToString(output); -} - -bool MessageLite::SerializeToArray(void* data, int size) const { - GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); - return SerializePartialToArray(data, size); -} - -bool MessageLite::SerializePartialToArray(void* data, int size) const { - int byte_size = ByteSize(); - if (size < byte_size) return false; - uint8* start = reinterpret_cast(data); - uint8* end = SerializeWithCachedSizesToArray(start); - if (end - start != byte_size) { - ByteSizeConsistencyError(byte_size, ByteSize(), end - start); - } - return true; -} - -string MessageLite::SerializeAsString() const { - // If the compiler implements the (Named) Return Value Optimization, - // the local variable 'result' will not actually reside on the stack - // of this function, but will be overlaid with the object that the - // caller supplied for the return value to be constructed in. - string output; - if (!AppendToString(&output)) - output.clear(); - return output; -} - -string MessageLite::SerializePartialAsString() const { - string output; - if (!AppendPartialToString(&output)) - output.clear(); - return output; -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.h deleted file mode 100644 index ebf4ba3c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_lite.h +++ /dev/null @@ -1,239 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Authors: wink@google.com (Wink Saville), -// kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Defines MessageLite, the abstract interface implemented by all (lite -// and non-lite) protocol message objects. - -#ifndef GOOGLE_PROTOBUF_MESSAGE_LITE_H__ -#define GOOGLE_PROTOBUF_MESSAGE_LITE_H__ - -#include -#include - -namespace google { -namespace protobuf { - -// Interface to light weight protocol messages. -// -// This interface is implemented by all protocol message objects. Non-lite -// messages additionally implement the Message interface, which is a -// subclass of MessageLite. Use MessageLite instead when you only need -// the subset of features which it supports -- namely, nothing that uses -// descriptors or reflection. You can instruct the protocol compiler -// to generate classes which implement only MessageLite, not the full -// Message interface, by adding the following line to the .proto file: -// -// option optimize_for = LITE_RUNTIME; -// -// This is particularly useful on resource-constrained systems where -// the full protocol buffers runtime library is too big. -// -// Note that on non-constrained systems (e.g. servers) when you need -// to link in lots of protocol definitions, a better way to reduce -// total code footprint is to use optimize_for = CODE_SIZE. This -// will make the generated code smaller while still supporting all the -// same features (at the expense of speed). optimize_for = LITE_RUNTIME -// is best when you only have a small number of message types linked -// into your binary, in which case the size of the protocol buffers -// runtime itself is the biggest problem. -class LIBPROTOBUF_EXPORT MessageLite { - public: - inline MessageLite() {} - virtual ~MessageLite(); - - // Basic Operations ------------------------------------------------ - - // Get the name of this message type, e.g. "foo.bar.BazProto". - virtual string GetTypeName() const = 0; - - // Construct a new instance of the same type. Ownership is passed to the - // caller. - virtual MessageLite* New() const = 0; - - // Clear all fields of the message and set them to their default values. - // Clear() avoids freeing memory, assuming that any memory allocated - // to hold parts of the message will be needed again to hold the next - // message. If you actually want to free the memory used by a Message, - // you must delete it. - virtual void Clear() = 0; - - // Quickly check if all required fields have values set. - virtual bool IsInitialized() const = 0; - - // This is not implemented for Lite messages -- it just returns "(cannot - // determine missing fields for lite message)". However, it is implemented - // for full messages. See message.h. - virtual string InitializationErrorString() const; - - // If |other| is the exact same class as this, calls MergeFrom(). Otherwise, - // results are undefined (probably crash). - virtual void CheckTypeAndMergeFrom(const MessageLite& other) = 0; - - // Parsing --------------------------------------------------------- - // Methods for parsing in protocol buffer format. Most of these are - // just simple wrappers around MergeFromCodedStream(). - - // Fill the message with a protocol buffer parsed from the given input - // stream. Returns false on a read error or if the input is in the - // wrong format. - bool ParseFromCodedStream(io::CodedInputStream* input); - // Like ParseFromCodedStream(), but accepts messages that are missing - // required fields. - bool ParsePartialFromCodedStream(io::CodedInputStream* input); - // Read a protocol buffer from the given zero-copy input stream. If - // successful, the entire input will be consumed. - bool ParseFromZeroCopyStream(io::ZeroCopyInputStream* input); - // Like ParseFromZeroCopyStream(), but accepts messages that are missing - // required fields. - bool ParsePartialFromZeroCopyStream(io::ZeroCopyInputStream* input); - // Read a protocol buffer from the given zero-copy input stream, expecting - // the message to be exactly "size" bytes long. If successful, exactly - // this many bytes will have been consumed from the input. - bool ParseFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input, int size); - // Like ParseFromBoundedZeroCopyStream(), but accepts messages that are - // missing required fields. - bool ParsePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input, - int size); - // Parse a protocol buffer contained in a string. - bool ParseFromString(const string& data); - // Like ParseFromString(), but accepts messages that are missing - // required fields. - bool ParsePartialFromString(const string& data); - // Parse a protocol buffer contained in an array of bytes. - bool ParseFromArray(const void* data, int size); - // Like ParseFromArray(), but accepts messages that are missing - // required fields. - bool ParsePartialFromArray(const void* data, int size); - - - // Reads a protocol buffer from the stream and merges it into this - // Message. Singular fields read from the input overwrite what is - // already in the Message and repeated fields are appended to those - // already present. - // - // It is the responsibility of the caller to call input->LastTagWas() - // (for groups) or input->ConsumedEntireMessage() (for non-groups) after - // this returns to verify that the message's end was delimited correctly. - // - // ParsefromCodedStream() is implemented as Clear() followed by - // MergeFromCodedStream(). - bool MergeFromCodedStream(io::CodedInputStream* input); - - // Like MergeFromCodedStream(), but succeeds even if required fields are - // missing in the input. - // - // MergeFromCodedStream() is just implemented as MergePartialFromCodedStream() - // followed by IsInitialized(). - virtual bool MergePartialFromCodedStream(io::CodedInputStream* input) = 0; - - // Serialization --------------------------------------------------- - // Methods for serializing in protocol buffer format. Most of these - // are just simple wrappers around ByteSize() and SerializeWithCachedSizes(). - - // Write a protocol buffer of this message to the given output. Returns - // false on a write error. If the message is missing required fields, - // this may GOOGLE_CHECK-fail. - bool SerializeToCodedStream(io::CodedOutputStream* output) const; - // Like SerializeToCodedStream(), but allows missing required fields. - bool SerializePartialToCodedStream(io::CodedOutputStream* output) const; - // Write the message to the given zero-copy output stream. All required - // fields must be set. - bool SerializeToZeroCopyStream(io::ZeroCopyOutputStream* output) const; - // Like SerializeToZeroCopyStream(), but allows missing required fields. - bool SerializePartialToZeroCopyStream(io::ZeroCopyOutputStream* output) const; - // Serialize the message and store it in the given string. All required - // fields must be set. - bool SerializeToString(string* output) const; - // Like SerializeToString(), but allows missing required fields. - bool SerializePartialToString(string* output) const; - // Serialize the message and store it in the given byte array. All required - // fields must be set. - bool SerializeToArray(void* data, int size) const; - // Like SerializeToArray(), but allows missing required fields. - bool SerializePartialToArray(void* data, int size) const; - - // Make a string encoding the message. Is equivalent to calling - // SerializeToString() on a string and using that. Returns the empty - // string if SerializeToString() would have returned an error. - // Note: If you intend to generate many such strings, you may - // reduce heap fragmentation by instead re-using the same string - // object with calls to SerializeToString(). - string SerializeAsString() const; - // Like SerializeAsString(), but allows missing required fields. - string SerializePartialAsString() const; - - // Like SerializeToString(), but appends to the data to the string's existing - // contents. All required fields must be set. - bool AppendToString(string* output) const; - // Like AppendToString(), but allows missing required fields. - bool AppendPartialToString(string* output) const; - - // Computes the serialized size of the message. This recursively calls - // ByteSize() on all embedded messages. If a subclass does not override - // this, it MUST override SetCachedSize(). - virtual int ByteSize() const = 0; - - // Serializes the message without recomputing the size. The message must - // not have changed since the last call to ByteSize(); if it has, the results - // are undefined. - virtual void SerializeWithCachedSizes( - io::CodedOutputStream* output) const = 0; - - // Like SerializeWithCachedSizes, but writes directly to *target, returning - // a pointer to the byte immediately after the last byte written. "target" - // must point at a byte array of at least ByteSize() bytes. - virtual uint8* SerializeWithCachedSizesToArray(uint8* target) const; - - // Returns the result of the last call to ByteSize(). An embedded message's - // size is needed both to serialize it (because embedded messages are - // length-delimited) and to compute the outer message's size. Caching - // the size avoids computing it multiple times. - // - // ByteSize() does not automatically use the cached size when available - // because this would require invalidating it every time the message was - // modified, which would be too hard and expensive. (E.g. if a deeply-nested - // sub-message is changed, all of its parents' cached sizes would need to be - // invalidated, which is too much work for an otherwise inlined setter - // method.) - virtual int GetCachedSize() const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageLite); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_MESSAGE_LITE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_unittest.cc deleted file mode 100644 index 33b9e77c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/message_unittest.cc +++ /dev/null @@ -1,281 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include -#include -#ifdef _MSC_VER -#include -#else -#include -#endif -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace google { -namespace protobuf { - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 // If this isn't defined, the platform doesn't need it. -#endif -#endif - -TEST(MessageTest, SerializeHelpers) { - // TODO(kenton): Test more helpers? They're all two-liners so it seems - // like a waste of time. - - protobuf_unittest::TestAllTypes message; - TestUtil::SetAllFields(&message); - stringstream stream; - - string str1("foo"); - string str2("bar"); - - EXPECT_TRUE(message.SerializeToString(&str1)); - EXPECT_TRUE(message.AppendToString(&str2)); - EXPECT_TRUE(message.SerializeToOstream(&stream)); - - EXPECT_EQ(str1.size() + 3, str2.size()); - EXPECT_EQ("bar", str2.substr(0, 3)); - // Don't use EXPECT_EQ because we don't want to dump raw binary data to - // stdout. - EXPECT_TRUE(str2.substr(3) == str1); - - // GCC gives some sort of error if we try to just do stream.str() == str1. - string temp = stream.str(); - EXPECT_TRUE(temp == str1); - - EXPECT_TRUE(message.SerializeAsString() == str1); - -} - -TEST(MessageTest, SerializeToBrokenOstream) { - ofstream out; - protobuf_unittest::TestAllTypes message; - message.set_optional_int32(123); - - EXPECT_FALSE(message.SerializeToOstream(&out)); -} - -TEST(MessageTest, ParseFromFileDescriptor) { - string filename = TestSourceDir() + - "/google/protobuf/testdata/golden_message"; - int file = open(filename.c_str(), O_RDONLY | O_BINARY); - - unittest::TestAllTypes message; - EXPECT_TRUE(message.ParseFromFileDescriptor(file)); - TestUtil::ExpectAllFieldsSet(message); - - EXPECT_GE(close(file), 0); -} - -TEST(MessageTest, ParsePackedFromFileDescriptor) { - string filename = - TestSourceDir() + - "/google/protobuf/testdata/golden_packed_fields_message"; - int file = open(filename.c_str(), O_RDONLY | O_BINARY); - - unittest::TestPackedTypes message; - EXPECT_TRUE(message.ParseFromFileDescriptor(file)); - TestUtil::ExpectPackedFieldsSet(message); - - EXPECT_GE(close(file), 0); -} - -TEST(MessageTest, ParseHelpers) { - // TODO(kenton): Test more helpers? They're all two-liners so it seems - // like a waste of time. - string data; - - { - // Set up. - protobuf_unittest::TestAllTypes message; - TestUtil::SetAllFields(&message); - message.SerializeToString(&data); - } - - { - // Test ParseFromString. - protobuf_unittest::TestAllTypes message; - EXPECT_TRUE(message.ParseFromString(data)); - TestUtil::ExpectAllFieldsSet(message); - } - - { - // Test ParseFromIstream. - protobuf_unittest::TestAllTypes message; - stringstream stream(data); - EXPECT_TRUE(message.ParseFromIstream(&stream)); - EXPECT_TRUE(stream.eof()); - TestUtil::ExpectAllFieldsSet(message); - } - - { - // Test ParseFromBoundedZeroCopyStream. - string data_with_junk(data); - data_with_junk.append("some junk on the end"); - io::ArrayInputStream stream(data_with_junk.data(), data_with_junk.size()); - protobuf_unittest::TestAllTypes message; - EXPECT_TRUE(message.ParseFromBoundedZeroCopyStream(&stream, data.size())); - TestUtil::ExpectAllFieldsSet(message); - } - - { - // Test that ParseFromBoundedZeroCopyStream fails (but doesn't crash) if - // EOF is reached before the expected number of bytes. - io::ArrayInputStream stream(data.data(), data.size()); - protobuf_unittest::TestAllTypes message; - EXPECT_FALSE( - message.ParseFromBoundedZeroCopyStream(&stream, data.size() + 1)); - } -} - -TEST(MessageTest, ParseFailsIfNotInitialized) { - unittest::TestRequired message; - vector errors; - - { - ScopedMemoryLog log; - EXPECT_FALSE(message.ParseFromString("")); - errors = log.GetMessages(ERROR); - } - - ASSERT_EQ(1, errors.size()); - EXPECT_EQ("Can't parse message of type \"protobuf_unittest.TestRequired\" " - "because it is missing required fields: a, b, c", - errors[0]); -} - -TEST(MessageTest, BypassInitializationCheckOnParse) { - unittest::TestRequired message; - io::ArrayInputStream raw_input(NULL, 0); - io::CodedInputStream input(&raw_input); - EXPECT_TRUE(message.MergePartialFromCodedStream(&input)); -} - -TEST(MessageTest, InitializationErrorString) { - unittest::TestRequired message; - EXPECT_EQ("a, b, c", message.InitializationErrorString()); -} - -#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet. - -TEST(MessageTest, SerializeFailsIfNotInitialized) { - unittest::TestRequired message; - string data; - EXPECT_DEBUG_DEATH(EXPECT_TRUE(message.SerializeToString(&data)), - "Can't serialize message of type \"protobuf_unittest.TestRequired\" because " - "it is missing required fields: a, b, c"); -} - -TEST(MessageTest, CheckInitialized) { - unittest::TestRequired message; - EXPECT_DEATH(message.CheckInitialized(), - "Message of type \"protobuf_unittest.TestRequired\" is missing required " - "fields: a, b, c"); -} - -#endif // GTEST_HAS_DEATH_TEST - -TEST(MessageTest, BypassInitializationCheckOnSerialize) { - unittest::TestRequired message; - io::ArrayOutputStream raw_output(NULL, 0); - io::CodedOutputStream output(&raw_output); - EXPECT_TRUE(message.SerializePartialToCodedStream(&output)); -} - -TEST(MessageTest, FindInitializationErrors) { - unittest::TestRequired message; - vector errors; - message.FindInitializationErrors(&errors); - ASSERT_EQ(3, errors.size()); - EXPECT_EQ("a", errors[0]); - EXPECT_EQ("b", errors[1]); - EXPECT_EQ("c", errors[2]); -} - -TEST(MessageTest, ParseFailsOnInvalidMessageEnd) { - unittest::TestAllTypes message; - - // Control case. - EXPECT_TRUE(message.ParseFromArray("", 0)); - - // The byte is a valid varint, but not a valid tag (zero). - EXPECT_FALSE(message.ParseFromArray("\0", 1)); - - // The byte is a malformed varint. - EXPECT_FALSE(message.ParseFromArray("\200", 1)); - - // The byte is an endgroup tag, but we aren't parsing a group. - EXPECT_FALSE(message.ParseFromArray("\014", 1)); -} - -TEST(MessageFactoryTest, GeneratedFactoryLookup) { - EXPECT_EQ( - MessageFactory::generated_factory()->GetPrototype( - protobuf_unittest::TestAllTypes::descriptor()), - &protobuf_unittest::TestAllTypes::default_instance()); -} - -TEST(MessageFactoryTest, GeneratedFactoryUnknownType) { - // Construct a new descriptor. - DescriptorPool pool; - FileDescriptorProto file; - file.set_name("foo.proto"); - file.add_message_type()->set_name("Foo"); - const Descriptor* descriptor = pool.BuildFile(file)->message_type(0); - - // Trying to construct it should return NULL. - EXPECT_TRUE( - MessageFactory::generated_factory()->GetPrototype(descriptor) == NULL); -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/package_info.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/package_info.h deleted file mode 100644 index 60cd3994..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/package_info.h +++ /dev/null @@ -1,64 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file exists solely to document the google::protobuf namespace. -// It is not compiled into anything, but it may be read by an automated -// documentation generator. - -namespace google { - -// Core components of the Protocol Buffers runtime library. -// -// The files in this package represent the core of the Protocol Buffer -// system. All of them are part of the libprotobuf library. -// -// A note on thread-safety: -// -// Thread-safety in the Protocol Buffer library follows a simple rule: -// unless explicitly noted otherwise, it is always safe to use an object -// from multiple threads simultaneously as long as the object is declared -// const in all threads (or, it is only used in ways that would be allowed -// if it were declared const). However, if an object is accessed in one -// thread in a way that would not be allowed if it were const, then it is -// not safe to access that object in any other thread simultaneously. -// -// Put simply, read-only access to an object can happen in multiple threads -// simultaneously, but write access can only happen in a single thread at -// a time. -// -// The implementation does contain some "const" methods which actually modify -// the object behind the scenes -- e.g., to cache results -- but in these cases -// mutex locking is used to make the access thread-safe. -namespace protobuf {} -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.cc deleted file mode 100644 index 897c0d7c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.cc +++ /dev/null @@ -1,262 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { - -void ReflectionOps::Copy(const Message& from, Message* to) { - if (&from == to) return; - Clear(to); - Merge(from, to); -} - -void ReflectionOps::Merge(const Message& from, Message* to) { - GOOGLE_CHECK_NE(&from, to); - - const Descriptor* descriptor = from.GetDescriptor(); - GOOGLE_CHECK_EQ(to->GetDescriptor(), descriptor) - << "Tried to merge messages of different types."; - - const Reflection* from_reflection = from.GetReflection(); - const Reflection* to_reflection = to->GetReflection(); - - vector fields; - from_reflection->ListFields(from, &fields); - for (int i = 0; i < fields.size(); i++) { - const FieldDescriptor* field = fields[i]; - - if (field->is_repeated()) { - int count = from_reflection->FieldSize(from, field); - for (int j = 0; j < count; j++) { - switch (field->cpp_type()) { -#define HANDLE_TYPE(CPPTYPE, METHOD) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - to_reflection->Add##METHOD(to, field, \ - from_reflection->GetRepeated##METHOD(from, field, j)); \ - break; - - HANDLE_TYPE(INT32 , Int32 ); - HANDLE_TYPE(INT64 , Int64 ); - HANDLE_TYPE(UINT32, UInt32); - HANDLE_TYPE(UINT64, UInt64); - HANDLE_TYPE(FLOAT , Float ); - HANDLE_TYPE(DOUBLE, Double); - HANDLE_TYPE(BOOL , Bool ); - HANDLE_TYPE(STRING, String); - HANDLE_TYPE(ENUM , Enum ); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_MESSAGE: - to_reflection->AddMessage(to, field)->MergeFrom( - from_reflection->GetRepeatedMessage(from, field, j)); - break; - } - } - } else { - switch (field->cpp_type()) { -#define HANDLE_TYPE(CPPTYPE, METHOD) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - to_reflection->Set##METHOD(to, field, \ - from_reflection->Get##METHOD(from, field)); \ - break; - - HANDLE_TYPE(INT32 , Int32 ); - HANDLE_TYPE(INT64 , Int64 ); - HANDLE_TYPE(UINT32, UInt32); - HANDLE_TYPE(UINT64, UInt64); - HANDLE_TYPE(FLOAT , Float ); - HANDLE_TYPE(DOUBLE, Double); - HANDLE_TYPE(BOOL , Bool ); - HANDLE_TYPE(STRING, String); - HANDLE_TYPE(ENUM , Enum ); -#undef HANDLE_TYPE - - case FieldDescriptor::CPPTYPE_MESSAGE: - to_reflection->MutableMessage(to, field)->MergeFrom( - from_reflection->GetMessage(from, field)); - break; - } - } - } - - to_reflection->MutableUnknownFields(to)->MergeFrom( - from_reflection->GetUnknownFields(from)); -} - -void ReflectionOps::Clear(Message* message) { - const Reflection* reflection = message->GetReflection(); - - vector fields; - reflection->ListFields(*message, &fields); - for (int i = 0; i < fields.size(); i++) { - reflection->ClearField(message, fields[i]); - } - - reflection->MutableUnknownFields(message)->Clear(); -} - -bool ReflectionOps::IsInitialized(const Message& message) { - const Descriptor* descriptor = message.GetDescriptor(); - const Reflection* reflection = message.GetReflection(); - - // Check required fields of this message. - for (int i = 0; i < descriptor->field_count(); i++) { - if (descriptor->field(i)->is_required()) { - if (!reflection->HasField(message, descriptor->field(i))) { - return false; - } - } - } - - // Check that sub-messages are initialized. - vector fields; - reflection->ListFields(message, &fields); - for (int i = 0; i < fields.size(); i++) { - const FieldDescriptor* field = fields[i]; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (field->is_repeated()) { - int size = reflection->FieldSize(message, field); - - for (int i = 0; i < size; i++) { - if (!reflection->GetRepeatedMessage(message, field, i) - .IsInitialized()) { - return false; - } - } - } else { - if (!reflection->GetMessage(message, field).IsInitialized()) { - return false; - } - } - } - } - - return true; -} - -void ReflectionOps::DiscardUnknownFields(Message* message) { - const Reflection* reflection = message->GetReflection(); - - reflection->MutableUnknownFields(message)->Clear(); - - vector fields; - reflection->ListFields(*message, &fields); - for (int i = 0; i < fields.size(); i++) { - const FieldDescriptor* field = fields[i]; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (field->is_repeated()) { - int size = reflection->FieldSize(*message, field); - for (int i = 0; i < size; i++) { - reflection->MutableRepeatedMessage(message, field, i) - ->DiscardUnknownFields(); - } - } else { - reflection->MutableMessage(message, field)->DiscardUnknownFields(); - } - } - } -} - -static string SubMessagePrefix(const string& prefix, - const FieldDescriptor* field, - int index) { - string result(prefix); - if (field->is_extension()) { - result.append("("); - result.append(field->full_name()); - result.append(")"); - } else { - result.append(field->name()); - } - if (index != -1) { - result.append("["); - result.append(SimpleItoa(index)); - result.append("]"); - } - result.append("."); - return result; -} - -void ReflectionOps::FindInitializationErrors( - const Message& message, - const string& prefix, - vector* errors) { - const Descriptor* descriptor = message.GetDescriptor(); - const Reflection* reflection = message.GetReflection(); - - // Check required fields of this message. - for (int i = 0; i < descriptor->field_count(); i++) { - if (descriptor->field(i)->is_required()) { - if (!reflection->HasField(message, descriptor->field(i))) { - errors->push_back(prefix + descriptor->field(i)->name()); - } - } - } - - // Check sub-messages. - vector fields; - reflection->ListFields(message, &fields); - for (int i = 0; i < fields.size(); i++) { - const FieldDescriptor* field = fields[i]; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - - if (field->is_repeated()) { - int size = reflection->FieldSize(message, field); - - for (int i = 0; i < size; i++) { - const Message& sub_message = - reflection->GetRepeatedMessage(message, field, i); - FindInitializationErrors(sub_message, - SubMessagePrefix(prefix, field, i), - errors); - } - } else { - const Message& sub_message = reflection->GetMessage(message, field); - FindInitializationErrors(sub_message, - SubMessagePrefix(prefix, field, -1), - errors); - } - } - } -} - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.h deleted file mode 100644 index 355a0a5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops.h +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This header is logically internal, but is made public because it is used -// from protocol-compiler-generated code, which may reside in other components. - -#ifndef GOOGLE_PROTOBUF_REFLECTION_OPS_H__ -#define GOOGLE_PROTOBUF_REFLECTION_OPS_H__ - -#include - -namespace google { -namespace protobuf { -namespace internal { - -// Basic operations that can be performed using reflection. -// These can be used as a cheap way to implement the corresponding -// methods of the Message interface, though they are likely to be -// slower than implementations tailored for the specific message type. -// -// This class should stay limited to operations needed to implement -// the Message interface. -// -// This class is really a namespace that contains only static methods. -class LIBPROTOBUF_EXPORT ReflectionOps { - public: - static void Copy(const Message& from, Message* to); - static void Merge(const Message& from, Message* to); - static void Clear(Message* message); - static bool IsInitialized(const Message& message); - static void DiscardUnknownFields(Message* message); - - // Finds all unset required fields in the message and adds their full - // paths (e.g. "foo.bar[5].baz") to *names. "prefix" will be attached to - // the front of each name. - static void FindInitializationErrors(const Message& message, - const string& prefix, - vector* errors); - - private: - // All methods are static. No need to construct. - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ReflectionOps); -}; - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_REFLECTION_OPS_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops_unittest.cc deleted file mode 100644 index 1cd56f1e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/reflection_ops_unittest.cc +++ /dev/null @@ -1,405 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { -namespace { - -TEST(ReflectionOpsTest, SanityCheck) { - unittest::TestAllTypes message; - - TestUtil::SetAllFields(&message); - TestUtil::ExpectAllFieldsSet(message); -} - -TEST(ReflectionOpsTest, Copy) { - unittest::TestAllTypes message, message2; - - TestUtil::SetAllFields(&message); - - ReflectionOps::Copy(message, &message2); - - TestUtil::ExpectAllFieldsSet(message2); - - // Copying from self should be a no-op. - ReflectionOps::Copy(message2, &message2); - TestUtil::ExpectAllFieldsSet(message2); -} - -TEST(ReflectionOpsTest, CopyExtensions) { - unittest::TestAllExtensions message, message2; - - TestUtil::SetAllExtensions(&message); - - ReflectionOps::Copy(message, &message2); - - TestUtil::ExpectAllExtensionsSet(message2); -} - -TEST(ReflectionOpsTest, Merge) { - // Note: Copy is implemented in terms of Merge() so technically the Copy - // test already tested most of this. - - unittest::TestAllTypes message, message2; - - TestUtil::SetAllFields(&message); - - // This field will test merging into an empty spot. - message2.set_optional_int32(message.optional_int32()); - message.clear_optional_int32(); - - // This tests overwriting. - message2.set_optional_string(message.optional_string()); - message.set_optional_string("something else"); - - // This tests concatenating. - message2.add_repeated_int32(message.repeated_int32(1)); - int32 i = message.repeated_int32(0); - message.clear_repeated_int32(); - message.add_repeated_int32(i); - - ReflectionOps::Merge(message2, &message); - - TestUtil::ExpectAllFieldsSet(message); -} - -TEST(ReflectionOpsTest, MergeExtensions) { - // Note: Copy is implemented in terms of Merge() so technically the Copy - // test already tested most of this. - - unittest::TestAllExtensions message, message2; - - TestUtil::SetAllExtensions(&message); - - // This field will test merging into an empty spot. - message2.SetExtension(unittest::optional_int32_extension, - message.GetExtension(unittest::optional_int32_extension)); - message.ClearExtension(unittest::optional_int32_extension); - - // This tests overwriting. - message2.SetExtension(unittest::optional_string_extension, - message.GetExtension(unittest::optional_string_extension)); - message.SetExtension(unittest::optional_string_extension, "something else"); - - // This tests concatenating. - message2.AddExtension(unittest::repeated_int32_extension, - message.GetExtension(unittest::repeated_int32_extension, 1)); - int32 i = message.GetExtension(unittest::repeated_int32_extension, 0); - message.ClearExtension(unittest::repeated_int32_extension); - message.AddExtension(unittest::repeated_int32_extension, i); - - ReflectionOps::Merge(message2, &message); - - TestUtil::ExpectAllExtensionsSet(message); -} - -TEST(ReflectionOpsTest, MergeUnknown) { - // Test that the messages' UnknownFieldSets are correctly merged. - unittest::TestEmptyMessage message1, message2; - message1.mutable_unknown_fields()->AddVarint(1234, 1); - message2.mutable_unknown_fields()->AddVarint(1234, 2); - - ReflectionOps::Merge(message2, &message1); - - ASSERT_EQ(2, message1.unknown_fields().field_count()); - ASSERT_EQ(UnknownField::TYPE_VARINT, - message1.unknown_fields().field(0).type()); - EXPECT_EQ(1, message1.unknown_fields().field(0).varint()); - ASSERT_EQ(UnknownField::TYPE_VARINT, - message1.unknown_fields().field(1).type()); - EXPECT_EQ(2, message1.unknown_fields().field(1).varint()); -} - -#ifdef GTEST_HAS_DEATH_TEST - -TEST(ReflectionOpsTest, MergeFromSelf) { - // Note: Copy is implemented in terms of Merge() so technically the Copy - // test already tested most of this. - - unittest::TestAllTypes message; - - EXPECT_DEATH( - ReflectionOps::Merge(message, &message), - "&from"); -} - -#endif // GTEST_HAS_DEATH_TEST - -TEST(ReflectionOpsTest, Clear) { - unittest::TestAllTypes message; - - TestUtil::SetAllFields(&message); - - ReflectionOps::Clear(&message); - - TestUtil::ExpectClear(message); - - // Check that getting embedded messages returns the objects created during - // SetAllFields() rather than default instances. - EXPECT_NE(&unittest::TestAllTypes::OptionalGroup::default_instance(), - &message.optionalgroup()); - EXPECT_NE(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.optional_nested_message()); - EXPECT_NE(&unittest::ForeignMessage::default_instance(), - &message.optional_foreign_message()); - EXPECT_NE(&unittest_import::ImportMessage::default_instance(), - &message.optional_import_message()); -} - -TEST(ReflectionOpsTest, ClearExtensions) { - unittest::TestAllExtensions message; - - TestUtil::SetAllExtensions(&message); - - ReflectionOps::Clear(&message); - - TestUtil::ExpectExtensionsClear(message); - - // Check that getting embedded messages returns the objects created during - // SetAllExtensions() rather than default instances. - EXPECT_NE(&unittest::OptionalGroup_extension::default_instance(), - &message.GetExtension(unittest::optionalgroup_extension)); - EXPECT_NE(&unittest::TestAllTypes::NestedMessage::default_instance(), - &message.GetExtension(unittest::optional_nested_message_extension)); - EXPECT_NE(&unittest::ForeignMessage::default_instance(), - &message.GetExtension( - unittest::optional_foreign_message_extension)); - EXPECT_NE(&unittest_import::ImportMessage::default_instance(), - &message.GetExtension(unittest::optional_import_message_extension)); -} - -TEST(ReflectionOpsTest, ClearUnknown) { - // Test that the message's UnknownFieldSet is correctly cleared. - unittest::TestEmptyMessage message; - message.mutable_unknown_fields()->AddVarint(1234, 1); - - ReflectionOps::Clear(&message); - - EXPECT_EQ(0, message.unknown_fields().field_count()); -} - -TEST(ReflectionOpsTest, DiscardUnknownFields) { - unittest::TestAllTypes message; - TestUtil::SetAllFields(&message); - - // Set some unknown fields in message. - message.mutable_unknown_fields() - ->AddVarint(123456, 654321); - message.mutable_optional_nested_message() - ->mutable_unknown_fields() - ->AddVarint(123456, 654321); - message.mutable_repeated_nested_message(0) - ->mutable_unknown_fields() - ->AddVarint(123456, 654321); - - EXPECT_EQ(1, message.unknown_fields().field_count()); - EXPECT_EQ(1, message.optional_nested_message() - .unknown_fields().field_count()); - EXPECT_EQ(1, message.repeated_nested_message(0) - .unknown_fields().field_count()); - - // Discard them. - ReflectionOps::DiscardUnknownFields(&message); - TestUtil::ExpectAllFieldsSet(message); - - EXPECT_EQ(0, message.unknown_fields().field_count()); - EXPECT_EQ(0, message.optional_nested_message() - .unknown_fields().field_count()); - EXPECT_EQ(0, message.repeated_nested_message(0) - .unknown_fields().field_count()); -} - -TEST(ReflectionOpsTest, DiscardUnknownExtensions) { - unittest::TestAllExtensions message; - TestUtil::SetAllExtensions(&message); - - // Set some unknown fields. - message.mutable_unknown_fields() - ->AddVarint(123456, 654321); - message.MutableExtension(unittest::optional_nested_message_extension) - ->mutable_unknown_fields() - ->AddVarint(123456, 654321); - message.MutableExtension(unittest::repeated_nested_message_extension, 0) - ->mutable_unknown_fields() - ->AddVarint(123456, 654321); - - EXPECT_EQ(1, message.unknown_fields().field_count()); - EXPECT_EQ(1, - message.GetExtension(unittest::optional_nested_message_extension) - .unknown_fields().field_count()); - EXPECT_EQ(1, - message.GetExtension(unittest::repeated_nested_message_extension, 0) - .unknown_fields().field_count()); - - // Discard them. - ReflectionOps::DiscardUnknownFields(&message); - TestUtil::ExpectAllExtensionsSet(message); - - EXPECT_EQ(0, message.unknown_fields().field_count()); - EXPECT_EQ(0, - message.GetExtension(unittest::optional_nested_message_extension) - .unknown_fields().field_count()); - EXPECT_EQ(0, - message.GetExtension(unittest::repeated_nested_message_extension, 0) - .unknown_fields().field_count()); -} - -TEST(ReflectionOpsTest, IsInitialized) { - unittest::TestRequired message; - - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - message.set_a(1); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - message.set_b(2); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - message.set_c(3); - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); -} - -TEST(ReflectionOpsTest, ForeignIsInitialized) { - unittest::TestRequiredForeign message; - - // Starts out initialized because the foreign message is itself an optional - // field. - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); - - // Once we create that field, the message is no longer initialized. - message.mutable_optional_message(); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - - // Initialize it. Now we're initialized. - message.mutable_optional_message()->set_a(1); - message.mutable_optional_message()->set_b(2); - message.mutable_optional_message()->set_c(3); - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); - - // Add a repeated version of the message. No longer initialized. - unittest::TestRequired* sub_message = message.add_repeated_message(); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - - // Initialize that repeated version. - sub_message->set_a(1); - sub_message->set_b(2); - sub_message->set_c(3); - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); -} - -TEST(ReflectionOpsTest, ExtensionIsInitialized) { - unittest::TestAllExtensions message; - - // Starts out initialized because the foreign message is itself an optional - // field. - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); - - // Once we create that field, the message is no longer initialized. - message.MutableExtension(unittest::TestRequired::single); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - - // Initialize it. Now we're initialized. - message.MutableExtension(unittest::TestRequired::single)->set_a(1); - message.MutableExtension(unittest::TestRequired::single)->set_b(2); - message.MutableExtension(unittest::TestRequired::single)->set_c(3); - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); - - // Add a repeated version of the message. No longer initialized. - message.AddExtension(unittest::TestRequired::multi); - EXPECT_FALSE(ReflectionOps::IsInitialized(message)); - - // Initialize that repeated version. - message.MutableExtension(unittest::TestRequired::multi, 0)->set_a(1); - message.MutableExtension(unittest::TestRequired::multi, 0)->set_b(2); - message.MutableExtension(unittest::TestRequired::multi, 0)->set_c(3); - EXPECT_TRUE(ReflectionOps::IsInitialized(message)); -} - -static string FindInitializationErrors(const Message& message) { - vector errors; - ReflectionOps::FindInitializationErrors(message, "", &errors); - return JoinStrings(errors, ","); -} - -TEST(ReflectionOpsTest, FindInitializationErrors) { - unittest::TestRequired message; - EXPECT_EQ("a,b,c", FindInitializationErrors(message)); -} - -TEST(ReflectionOpsTest, FindForeignInitializationErrors) { - unittest::TestRequiredForeign message; - message.mutable_optional_message(); - message.add_repeated_message(); - message.add_repeated_message(); - EXPECT_EQ("optional_message.a," - "optional_message.b," - "optional_message.c," - "repeated_message[0].a," - "repeated_message[0].b," - "repeated_message[0].c," - "repeated_message[1].a," - "repeated_message[1].b," - "repeated_message[1].c", - FindInitializationErrors(message)); -} - -TEST(ReflectionOpsTest, FindExtensionInitializationErrors) { - unittest::TestAllExtensions message; - message.MutableExtension(unittest::TestRequired::single); - message.AddExtension(unittest::TestRequired::multi); - message.AddExtension(unittest::TestRequired::multi); - EXPECT_EQ("(protobuf_unittest.TestRequired.single).a," - "(protobuf_unittest.TestRequired.single).b," - "(protobuf_unittest.TestRequired.single).c," - "(protobuf_unittest.TestRequired.multi)[0].a," - "(protobuf_unittest.TestRequired.multi)[0].b," - "(protobuf_unittest.TestRequired.multi)[0].c," - "(protobuf_unittest.TestRequired.multi)[1].a," - "(protobuf_unittest.TestRequired.multi)[1].b," - "(protobuf_unittest.TestRequired.multi)[1].c", - FindInitializationErrors(message)); -} - -} // namespace -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.cc deleted file mode 100644 index 09377742..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.cc +++ /dev/null @@ -1,98 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include - -namespace google { -namespace protobuf { - -namespace internal { - -void RepeatedPtrFieldBase::Reserve(int new_size) { - if (total_size_ >= new_size) return; - - void** old_elements = elements_; - total_size_ = max(total_size_ * 2, new_size); - elements_ = new void*[total_size_]; - memcpy(elements_, old_elements, allocated_size_ * sizeof(elements_[0])); - if (old_elements != initial_space_) { - delete [] old_elements; - } -} - -void RepeatedPtrFieldBase::Swap(RepeatedPtrFieldBase* other) { - void** swap_elements = elements_; - int swap_current_size = current_size_; - int swap_allocated_size = allocated_size_; - int swap_total_size = total_size_; - // We may not be using initial_space_ but it's not worth checking. Just - // copy it anyway. - void* swap_initial_space[kInitialSize]; - memcpy(swap_initial_space, initial_space_, sizeof(initial_space_)); - - elements_ = other->elements_; - current_size_ = other->current_size_; - allocated_size_ = other->allocated_size_; - total_size_ = other->total_size_; - memcpy(initial_space_, other->initial_space_, sizeof(initial_space_)); - - other->elements_ = swap_elements; - other->current_size_ = swap_current_size; - other->allocated_size_ = swap_allocated_size; - other->total_size_ = swap_total_size; - memcpy(other->initial_space_, swap_initial_space, sizeof(swap_initial_space)); - - if (elements_ == other->initial_space_) { - elements_ = initial_space_; - } - if (other->elements_ == initial_space_) { - other->elements_ = other->initial_space_; - } -} - -string* StringTypeHandlerBase::New() { - return new string; -} -void StringTypeHandlerBase::Delete(string* value) { - delete value; -} - -} // namespace internal - - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.h deleted file mode 100644 index 6080ddcc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field.h +++ /dev/null @@ -1,1295 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// RepeatedField and RepeatedPtrField are used by generated protocol message -// classes to manipulate repeated fields. These classes are very similar to -// STL's vector, but include a number of optimizations found to be useful -// specifically in the case of Protocol Buffers. RepeatedPtrField is -// particularly different from STL vector as it manages ownership of the -// pointers that it contains. -// -// Typically, clients should not need to access RepeatedField objects directly, -// but should instead use the accessor functions generated automatically by the -// protocol compiler. - -#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__ -#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__ - -#include -#include -#include -#include - -namespace google { - -namespace protobuf { - -class Message; - -namespace internal { - -// We need this (from generated_message_reflection.cc). -LIBPROTOBUF_EXPORT int StringSpaceUsedExcludingSelf(const string& str); - -} // namespace internal - -// RepeatedField is used to represent repeated fields of a primitive type (in -// other words, everything except strings and nested Messages). Most users will -// not ever use a RepeatedField directly; they will use the get-by-index, -// set-by-index, and add accessors that are generated for all repeated fields. -template -class RepeatedField { - public: - RepeatedField(); - RepeatedField(const RepeatedField& other); - ~RepeatedField(); - - RepeatedField& operator=(const RepeatedField& other); - - int size() const; - - const Element& Get(int index) const; - Element* Mutable(int index); - void Set(int index, const Element& value); - void Add(const Element& value); - Element* Add(); - // Remove the last element in the array. - // We don't provide a way to remove any element other than the last - // because it invites inefficient use, such as O(n^2) filtering loops - // that should have been O(n). If you want to remove an element other - // than the last, the best way to do it is to re-arrange the elements - // so that the one you want removed is at the end, then call RemoveLast(). - void RemoveLast(); - void Clear(); - void MergeFrom(const RepeatedField& other); - void CopyFrom(const RepeatedField& other); - - // Reserve space to expand the field to at least the given size. If the - // array is grown, it will always be at least doubled in size. - void Reserve(int new_size); - - // Resize the RepeatedField to a new, smaller size. This is O(1). - void Truncate(int new_size); - - void AddAlreadyReserved(const Element& value); - Element* AddAlreadyReserved(); - int Capacity() const; - - // Gets the underlying array. This pointer is possibly invalidated by - // any add or remove operation. - Element* mutable_data(); - const Element* data() const; - - // Swap entire contents with "other". - void Swap(RepeatedField* other); - - // Swap two elements. - void SwapElements(int index1, int index2); - - // STL-like iterator support - typedef Element* iterator; - typedef const Element* const_iterator; - typedef Element value_type; - - iterator begin(); - const_iterator begin() const; - iterator end(); - const_iterator end() const; - - // Returns the number of bytes used by the repeated field, excluding - // sizeof(*this) - int SpaceUsedExcludingSelf() const; - - private: - static const int kInitialSize = 4; - - Element* elements_; - int current_size_; - int total_size_; - - Element initial_space_[kInitialSize]; - - // Move the contents of |from| into |to|, possibly clobbering |from| in the - // process. For primitive types this is just a memcpy(), but it could be - // specialized for non-primitive types to, say, swap each element instead. - void MoveArray(Element to[], Element from[], int size); - - // Copy the elements of |from| into |to|. - void CopyArray(Element to[], const Element from[], int size); -}; - -namespace internal { -template class RepeatedPtrIterator; -template class RepeatedPtrOverPtrsIterator; -} // namespace internal - -namespace internal { - -// This is the common base class for RepeatedPtrFields. It deals only in void* -// pointers. Users should not use this interface directly. -// -// The methods of this interface correspond to the methods of RepeatedPtrField, -// but may have a template argument called TypeHandler. Its signature is: -// class TypeHandler { -// public: -// typedef MyType Type; -// static Type* New(); -// static void Delete(Type*); -// static void Clear(Type*); -// static void Merge(const Type& from, Type* to); -// -// // Only needs to be implemented if SpaceUsedExcludingSelf() is called. -// static int SpaceUsed(const Type&); -// }; -class LIBPROTOBUF_EXPORT RepeatedPtrFieldBase { - protected: - // The reflection implementation needs to call protected methods directly, - // reinterpreting pointers as being to Message instead of a specific Message - // subclass. - friend class GeneratedMessageReflection; - - // ExtensionSet stores repeated message extensions as - // RepeatedPtrField, but non-lite ExtensionSets need to - // implement SpaceUsed(), and thus need to call SpaceUsedExcludingSelf() - // reinterpreting MessageLite as Message. ExtensionSet also needs to make - // use of AddFromCleared(), which is not part of the public interface. - friend class ExtensionSet; - - RepeatedPtrFieldBase(); - - // Must be called from destructor. - template - void Destroy(); - - int size() const; - - template - const typename TypeHandler::Type& Get(int index) const; - template - typename TypeHandler::Type* Mutable(int index); - template - typename TypeHandler::Type* Add(); - template - void RemoveLast(); - template - void Clear(); - template - void MergeFrom(const RepeatedPtrFieldBase& other); - template - void CopyFrom(const RepeatedPtrFieldBase& other); - - void Reserve(int new_size); - - int Capacity() const; - - // Used for constructing iterators. - void* const* raw_data() const; - void** raw_mutable_data() const; - - template - typename TypeHandler::Type** mutable_data(); - template - const typename TypeHandler::Type* const* data() const; - - void Swap(RepeatedPtrFieldBase* other); - - void SwapElements(int index1, int index2); - - template - int SpaceUsedExcludingSelf() const; - - - // Advanced memory management -------------------------------------- - - // Like Add(), but if there are no cleared objects to use, returns NULL. - template - typename TypeHandler::Type* AddFromCleared(); - - template - void AddAllocated(typename TypeHandler::Type* value); - template - typename TypeHandler::Type* ReleaseLast(); - - int ClearedCount() const; - template - void AddCleared(typename TypeHandler::Type* value); - template - typename TypeHandler::Type* ReleaseCleared(); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPtrFieldBase); - - static const int kInitialSize = 4; - - void** elements_; - int current_size_; - int allocated_size_; - int total_size_; - - void* initial_space_[kInitialSize]; - - template - static inline typename TypeHandler::Type* cast(void* element) { - return reinterpret_cast(element); - } - template - static inline const typename TypeHandler::Type* cast(const void* element) { - return reinterpret_cast(element); - } -}; - -template -class GenericTypeHandler { - public: - typedef GenericType Type; - static GenericType* New() { return new GenericType; } - static void Delete(GenericType* value) { delete value; } - static void Clear(GenericType* value) { value->Clear(); } - static void Merge(const GenericType& from, GenericType* to) { - to->MergeFrom(from); - } - static int SpaceUsed(const GenericType& value) { return value.SpaceUsed(); } -}; - -template <> -inline void GenericTypeHandler::Merge( - const MessageLite& from, MessageLite* to) { - to->CheckTypeAndMergeFrom(from); -} - -// HACK: If a class is declared as DLL-exported in MSVC, it insists on -// generating copies of all its methods -- even inline ones -- to include -// in the DLL. But SpaceUsed() calls StringSpaceUsedExcludingSelf() which -// isn't in the lite library, therefore the lite library cannot link if -// StringTypeHandler is exported. So, we factor out StringTypeHandlerBase, -// export that, then make StringTypeHandler be a subclass which is NOT -// exported. -// TODO(kenton): There has to be a better way. -class LIBPROTOBUF_EXPORT StringTypeHandlerBase { - public: - typedef string Type; - static string* New(); - static void Delete(string* value); - static void Clear(string* value) { value->clear(); } - static void Merge(const string& from, string* to) { *to = from; } -}; - -class LIBPROTOBUF_EXPORT StringTypeHandler : public StringTypeHandlerBase { - public: - static int SpaceUsed(const string& value) { - return sizeof(value) + StringSpaceUsedExcludingSelf(value); - } -}; - - -} // namespace internal - -// RepeatedPtrField is like RepeatedField, but used for repeated strings or -// Messages. -template -class RepeatedPtrField : public internal::RepeatedPtrFieldBase { - public: - RepeatedPtrField(); - RepeatedPtrField(const RepeatedPtrField& other); - ~RepeatedPtrField(); - - RepeatedPtrField& operator=(const RepeatedPtrField& other); - - int size() const; - - const Element& Get(int index) const; - Element* Mutable(int index); - Element* Add(); - void RemoveLast(); // Remove the last element in the array. - void Clear(); - void MergeFrom(const RepeatedPtrField& other); - void CopyFrom(const RepeatedPtrField& other); - - // Reserve space to expand the field to at least the given size. This only - // resizes the pointer array; it doesn't allocate any objects. If the - // array is grown, it will always be at least doubled in size. - void Reserve(int new_size); - - int Capacity() const; - - // Gets the underlying array. This pointer is possibly invalidated by - // any add or remove operation. - Element** mutable_data(); - const Element* const* data() const; - - // Swap entire contents with "other". - void Swap(RepeatedPtrField* other); - - // Swap two elements. - void SwapElements(int index1, int index2); - - // STL-like iterator support - typedef internal::RepeatedPtrIterator iterator; - typedef internal::RepeatedPtrIterator const_iterator; - typedef Element value_type; - - iterator begin(); - const_iterator begin() const; - iterator end(); - const_iterator end() const; - - // Custom STL-like iterator that iterates over and returns the underlying - // pointers to Element rather than Element itself. - typedef internal::RepeatedPtrOverPtrsIterator pointer_iterator; - pointer_iterator pointer_begin(); - pointer_iterator pointer_end(); - - // Returns (an estimate of) the number of bytes used by the repeated field, - // excluding sizeof(*this). - int SpaceUsedExcludingSelf() const; - - // Advanced memory management -------------------------------------- - // When hardcore memory management becomes necessary -- as it often - // does here at Google -- the following methods may be useful. - - // Add an already-allocated object, passing ownership to the - // RepeatedPtrField. - void AddAllocated(Element* value); - // Remove the last element and return it, passing ownership to the - // caller. - // Requires: size() > 0 - Element* ReleaseLast(); - - // When elements are removed by calls to RemoveLast() or Clear(), they - // are not actually freed. Instead, they are cleared and kept so that - // they can be reused later. This can save lots of CPU time when - // repeatedly reusing a protocol message for similar purposes. - // - // Really, extremely hardcore programs may actually want to manipulate - // these objects to better-optimize memory management. These methods - // allow that. - - // Get the number of cleared objects that are currently being kept - // around for reuse. - int ClearedCount() const; - // Add an element to the pool of cleared objects, passing ownership to - // the RepeatedPtrField. The element must be cleared prior to calling - // this method. - void AddCleared(Element* value); - // Remove a single element from the cleared pool and return it, passing - // ownership to the caller. The element is guaranteed to be cleared. - // Requires: ClearedCount() > 0 - Element* ReleaseCleared(); - - protected: - // Note: RepeatedPtrField SHOULD NOT be subclassed by users. We only - // subclass it in one place as a hack for compatibility with proto1. The - // subclass needs to know about TypeHandler in order to call protected - // methods on RepeatedPtrFieldBase. - class TypeHandler; - -}; - -// implementation ==================================================== - -template -inline RepeatedField::RepeatedField() - : elements_(initial_space_), - current_size_(0), - total_size_(kInitialSize) { -} - -template -inline RepeatedField::RepeatedField(const RepeatedField& other) - : elements_(initial_space_), - current_size_(0), - total_size_(kInitialSize) { - CopyFrom(other); -} - -template -RepeatedField::~RepeatedField() { - if (elements_ != initial_space_) { - delete [] elements_; - } -} - -template -inline RepeatedField& -RepeatedField::operator=(const RepeatedField& other) { - CopyFrom(other); - return *this; -} - -template -inline int RepeatedField::size() const { - return current_size_; -} - -template -inline int RepeatedField::Capacity() const { - return total_size_; -} - -template -inline void RepeatedField::AddAlreadyReserved(const Element& value) { - GOOGLE_DCHECK_LT(size(), Capacity()); - elements_[current_size_++] = value; -} - -template -inline Element* RepeatedField::AddAlreadyReserved() { - GOOGLE_DCHECK_LT(size(), Capacity()); - return &elements_[current_size_++]; -} - -template -inline const Element& RepeatedField::Get(int index) const { - GOOGLE_DCHECK_LT(index, size()); - return elements_[index]; -} - -template -inline Element* RepeatedField::Mutable(int index) { - GOOGLE_DCHECK_LT(index, size()); - return elements_ + index; -} - -template -inline void RepeatedField::Set(int index, const Element& value) { - GOOGLE_DCHECK_LT(index, size()); - elements_[index] = value; -} - -template -inline void RepeatedField::Add(const Element& value) { - if (current_size_ == total_size_) Reserve(total_size_ + 1); - elements_[current_size_++] = value; -} - -template -inline Element* RepeatedField::Add() { - if (current_size_ == total_size_) Reserve(total_size_ + 1); - return &elements_[current_size_++]; -} - -template -inline void RepeatedField::RemoveLast() { - GOOGLE_DCHECK_GT(current_size_, 0); - --current_size_; -} - -template -inline void RepeatedField::Clear() { - current_size_ = 0; -} - -template -inline void RepeatedField::MergeFrom(const RepeatedField& other) { - Reserve(current_size_ + other.current_size_); - CopyArray(elements_ + current_size_, other.elements_, other.current_size_); - current_size_ += other.current_size_; -} - -template -inline void RepeatedField::CopyFrom(const RepeatedField& other) { - Clear(); - MergeFrom(other); -} - -template -inline Element* RepeatedField::mutable_data() { - return elements_; -} - -template -inline const Element* RepeatedField::data() const { - return elements_; -} - - -template -void RepeatedField::Swap(RepeatedField* other) { - Element* swap_elements = elements_; - int swap_current_size = current_size_; - int swap_total_size = total_size_; - // We may not be using initial_space_ but it's not worth checking. Just - // copy it anyway. - Element swap_initial_space[kInitialSize]; - MoveArray(swap_initial_space, initial_space_, kInitialSize); - - elements_ = other->elements_; - current_size_ = other->current_size_; - total_size_ = other->total_size_; - MoveArray(initial_space_, other->initial_space_, kInitialSize); - - other->elements_ = swap_elements; - other->current_size_ = swap_current_size; - other->total_size_ = swap_total_size; - MoveArray(other->initial_space_, swap_initial_space, kInitialSize); - - if (elements_ == other->initial_space_) { - elements_ = initial_space_; - } - if (other->elements_ == initial_space_) { - other->elements_ = other->initial_space_; - } -} - -template -void RepeatedField::SwapElements(int index1, int index2) { - std::swap(elements_[index1], elements_[index2]); -} - -template -inline typename RepeatedField::iterator -RepeatedField::begin() { - return elements_; -} -template -inline typename RepeatedField::const_iterator -RepeatedField::begin() const { - return elements_; -} -template -inline typename RepeatedField::iterator -RepeatedField::end() { - return elements_ + current_size_; -} -template -inline typename RepeatedField::const_iterator -RepeatedField::end() const { - return elements_ + current_size_; -} - -template -inline int RepeatedField::SpaceUsedExcludingSelf() const { - return (elements_ != initial_space_) ? total_size_ * sizeof(elements_[0]) : 0; -} - -// Avoid inlining of Reserve(): new, memcpy, and delete[] lead to a significant -// amount of code bloat. -template -void RepeatedField::Reserve(int new_size) { - if (total_size_ >= new_size) return; - - Element* old_elements = elements_; - total_size_ = max(total_size_ * 2, new_size); - elements_ = new Element[total_size_]; - MoveArray(elements_, old_elements, current_size_); - if (old_elements != initial_space_) { - delete [] old_elements; - } -} - -template -inline void RepeatedField::Truncate(int new_size) { - GOOGLE_DCHECK_LE(new_size, current_size_); - current_size_ = new_size; -} - -template -inline void RepeatedField::MoveArray( - Element to[], Element from[], int array_size) { - memcpy(to, from, array_size * sizeof(Element)); -} - -template -inline void RepeatedField::CopyArray( - Element to[], const Element from[], int array_size) { - memcpy(to, from, array_size * sizeof(Element)); -} - - -// ------------------------------------------------------------------- - -namespace internal { - -inline RepeatedPtrFieldBase::RepeatedPtrFieldBase() - : elements_(initial_space_), - current_size_(0), - allocated_size_(0), - total_size_(kInitialSize) { -} - -template -void RepeatedPtrFieldBase::Destroy() { - for (int i = 0; i < allocated_size_; i++) { - TypeHandler::Delete(cast(elements_[i])); - } - if (elements_ != initial_space_) { - delete [] elements_; - } -} - -inline int RepeatedPtrFieldBase::size() const { - return current_size_; -} - - -template -inline const typename TypeHandler::Type& -RepeatedPtrFieldBase::Get(int index) const { - GOOGLE_DCHECK_LT(index, size()); - return *cast(elements_[index]); -} - -template -inline typename TypeHandler::Type* -RepeatedPtrFieldBase::Mutable(int index) { - GOOGLE_DCHECK_LT(index, size()); - return cast(elements_[index]); -} - -template -inline typename TypeHandler::Type* RepeatedPtrFieldBase::Add() { - if (current_size_ < allocated_size_) { - return cast(elements_[current_size_++]); - } - if (allocated_size_ == total_size_) Reserve(total_size_ + 1); - ++allocated_size_; - typename TypeHandler::Type* result = TypeHandler::New(); - elements_[current_size_++] = result; - return result; -} - -template -inline void RepeatedPtrFieldBase::RemoveLast() { - GOOGLE_DCHECK_GT(current_size_, 0); - TypeHandler::Clear(cast(elements_[--current_size_])); -} - -template -void RepeatedPtrFieldBase::Clear() { - for (int i = 0; i < current_size_; i++) { - TypeHandler::Clear(cast(elements_[i])); - } - current_size_ = 0; -} - -template -inline void RepeatedPtrFieldBase::MergeFrom(const RepeatedPtrFieldBase& other) { - Reserve(current_size_ + other.current_size_); - for (int i = 0; i < other.current_size_; i++) { - TypeHandler::Merge(other.template Get(i), Add()); - } -} - -template -inline void RepeatedPtrFieldBase::CopyFrom(const RepeatedPtrFieldBase& other) { - RepeatedPtrFieldBase::Clear(); - RepeatedPtrFieldBase::MergeFrom(other); -} - -inline int RepeatedPtrFieldBase::Capacity() const { - return total_size_; -} - -inline void* const* RepeatedPtrFieldBase::raw_data() const { - return elements_; -} - -inline void** RepeatedPtrFieldBase::raw_mutable_data() const { - return elements_; -} - -template -inline typename TypeHandler::Type** RepeatedPtrFieldBase::mutable_data() { - // TODO(kenton): Breaks C++ aliasing rules. We should probably remove this - // method entirely. - return reinterpret_cast(elements_); -} - -template -inline const typename TypeHandler::Type* const* -RepeatedPtrFieldBase::data() const { - // TODO(kenton): Breaks C++ aliasing rules. We should probably remove this - // method entirely. - return reinterpret_cast(elements_); -} - -inline void RepeatedPtrFieldBase::SwapElements(int index1, int index2) { - std::swap(elements_[index1], elements_[index2]); -} - -template -inline int RepeatedPtrFieldBase::SpaceUsedExcludingSelf() const { - int allocated_bytes = - (elements_ != initial_space_) ? total_size_ * sizeof(elements_[0]) : 0; - for (int i = 0; i < allocated_size_; ++i) { - allocated_bytes += TypeHandler::SpaceUsed(*cast(elements_[i])); - } - return allocated_bytes; -} - -template -inline typename TypeHandler::Type* RepeatedPtrFieldBase::AddFromCleared() { - if (current_size_ < allocated_size_) { - return cast(elements_[current_size_++]); - } else { - return NULL; - } -} - -template -void RepeatedPtrFieldBase::AddAllocated( - typename TypeHandler::Type* value) { - // Make room for the new pointer. - if (current_size_ == total_size_) { - // The array is completely full with no cleared objects, so grow it. - Reserve(total_size_ + 1); - ++allocated_size_; - } else if (allocated_size_ == total_size_) { - // There is no more space in the pointer array because it contains some - // cleared objects awaiting reuse. We don't want to grow the array in this - // case because otherwise a loop calling AddAllocated() followed by Clear() - // would leak memory. - TypeHandler::Delete(cast(elements_[current_size_])); - } else if (current_size_ < allocated_size_) { - // We have some cleared objects. We don't care about their order, so we - // can just move the first one to the end to make space. - elements_[allocated_size_] = elements_[current_size_]; - ++allocated_size_; - } else { - // There are no cleared objects. - ++allocated_size_; - } - - elements_[current_size_++] = value; -} - -template -inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseLast() { - GOOGLE_DCHECK_GT(current_size_, 0); - typename TypeHandler::Type* result = - cast(elements_[--current_size_]); - --allocated_size_; - if (current_size_ < allocated_size_) { - // There are cleared elements on the end; replace the removed element - // with the last allocated element. - elements_[current_size_] = elements_[allocated_size_]; - } - return result; -} - - -inline int RepeatedPtrFieldBase::ClearedCount() const { - return allocated_size_ - current_size_; -} - -template -inline void RepeatedPtrFieldBase::AddCleared( - typename TypeHandler::Type* value) { - if (allocated_size_ == total_size_) Reserve(total_size_ + 1); - elements_[allocated_size_++] = value; -} - -template -inline typename TypeHandler::Type* RepeatedPtrFieldBase::ReleaseCleared() { - GOOGLE_DCHECK_GT(allocated_size_, current_size_); - return cast(elements_[--allocated_size_]); -} - -} // namespace internal - -// ------------------------------------------------------------------- - -template -class RepeatedPtrField::TypeHandler - : public internal::GenericTypeHandler {}; - -template <> -class RepeatedPtrField::TypeHandler - : public internal::StringTypeHandler {}; - - -template -inline RepeatedPtrField::RepeatedPtrField() {} - -template -inline RepeatedPtrField::RepeatedPtrField( - const RepeatedPtrField& other) { - CopyFrom(other); -} - -template -RepeatedPtrField::~RepeatedPtrField() { - Destroy(); -} - -template -inline RepeatedPtrField& RepeatedPtrField::operator=( - const RepeatedPtrField& other) { - CopyFrom(other); - return *this; -} - -template -inline int RepeatedPtrField::size() const { - return RepeatedPtrFieldBase::size(); -} - -template -inline const Element& RepeatedPtrField::Get(int index) const { - return RepeatedPtrFieldBase::Get(index); -} - -template -inline Element* RepeatedPtrField::Mutable(int index) { - return RepeatedPtrFieldBase::Mutable(index); -} - -template -inline Element* RepeatedPtrField::Add() { - return RepeatedPtrFieldBase::Add(); -} - -template -inline void RepeatedPtrField::RemoveLast() { - RepeatedPtrFieldBase::RemoveLast(); -} - -template -inline void RepeatedPtrField::Clear() { - RepeatedPtrFieldBase::Clear(); -} - -template -inline void RepeatedPtrField::MergeFrom( - const RepeatedPtrField& other) { - RepeatedPtrFieldBase::MergeFrom(other); -} - -template -inline void RepeatedPtrField::CopyFrom( - const RepeatedPtrField& other) { - RepeatedPtrFieldBase::CopyFrom(other); -} - -template -inline Element** RepeatedPtrField::mutable_data() { - return RepeatedPtrFieldBase::mutable_data(); -} - -template -inline const Element* const* RepeatedPtrField::data() const { - return RepeatedPtrFieldBase::data(); -} - -template -void RepeatedPtrField::Swap(RepeatedPtrField* other) { - RepeatedPtrFieldBase::Swap(other); -} - -template -void RepeatedPtrField::SwapElements(int index1, int index2) { - RepeatedPtrFieldBase::SwapElements(index1, index2); -} - -template -inline int RepeatedPtrField::SpaceUsedExcludingSelf() const { - return RepeatedPtrFieldBase::SpaceUsedExcludingSelf(); -} - -template -inline void RepeatedPtrField::AddAllocated(Element* value) { - RepeatedPtrFieldBase::AddAllocated(value); -} - -template -inline Element* RepeatedPtrField::ReleaseLast() { - return RepeatedPtrFieldBase::ReleaseLast(); -} - - -template -inline int RepeatedPtrField::ClearedCount() const { - return RepeatedPtrFieldBase::ClearedCount(); -} - -template -inline void RepeatedPtrField::AddCleared(Element* value) { - return RepeatedPtrFieldBase::AddCleared(value); -} - -template -inline Element* RepeatedPtrField::ReleaseCleared() { - return RepeatedPtrFieldBase::ReleaseCleared(); -} - -template -inline void RepeatedPtrField::Reserve(int new_size) { - return RepeatedPtrFieldBase::Reserve(new_size); -} - -template -inline int RepeatedPtrField::Capacity() const { - return RepeatedPtrFieldBase::Capacity(); -} - -// ------------------------------------------------------------------- - -namespace internal { - -// STL-like iterator implementation for RepeatedPtrField. You should not -// refer to this class directly; use RepeatedPtrField::iterator instead. -// -// The iterator for RepeatedPtrField, RepeatedPtrIterator, is -// very similar to iterator_ptr in util/gtl/iterator_adaptors-inl.h, -// but adds random-access operators and is modified to wrap a void** base -// iterator (since RepeatedPtrField stores its array as a void* array and -// casting void** to T** would violate C++ aliasing rules). -// -// This code based on net/proto/proto-array-internal.h by Jeffrey Yasskin -// (jyasskin@google.com). -template -class RepeatedPtrIterator - : public std::iterator< - std::random_access_iterator_tag, Element> { - public: - typedef RepeatedPtrIterator iterator; - typedef std::iterator< - std::random_access_iterator_tag, Element> superclass; - - // Let the compiler know that these are type names, so we don't have to - // write "typename" in front of them everywhere. - typedef typename superclass::reference reference; - typedef typename superclass::pointer pointer; - typedef typename superclass::difference_type difference_type; - - RepeatedPtrIterator() : it_(NULL) {} - explicit RepeatedPtrIterator(void* const* it) : it_(it) {} - - // Allow "upcasting" from RepeatedPtrIterator to - // RepeatedPtrIterator. - template - RepeatedPtrIterator(const RepeatedPtrIterator& other) - : it_(other.it_) { - // Force a compiler error if the other type is not convertible to ours. - if (false) { - implicit_cast(0); - } - } - - // dereferenceable - reference operator*() const { return *reinterpret_cast(*it_); } - pointer operator->() const { return &(operator*()); } - - // {inc,dec}rementable - iterator& operator++() { ++it_; return *this; } - iterator operator++(int) { return iterator(it_++); } - iterator& operator--() { --it_; return *this; } - iterator operator--(int) { return iterator(it_--); } - - // equality_comparable - bool operator==(const iterator& x) const { return it_ == x.it_; } - bool operator!=(const iterator& x) const { return it_ != x.it_; } - - // less_than_comparable - bool operator<(const iterator& x) const { return it_ < x.it_; } - bool operator<=(const iterator& x) const { return it_ <= x.it_; } - bool operator>(const iterator& x) const { return it_ > x.it_; } - bool operator>=(const iterator& x) const { return it_ >= x.it_; } - - // addable, subtractable - iterator& operator+=(difference_type d) { - it_ += d; - return *this; - } - friend iterator operator+(iterator it, difference_type d) { - it += d; - return it; - } - friend iterator operator+(difference_type d, iterator it) { - it += d; - return it; - } - iterator& operator-=(difference_type d) { - it_ -= d; - return *this; - } - friend iterator operator-(iterator it, difference_type d) { - it -= d; - return it; - } - - // indexable - reference operator[](difference_type d) const { return *(*this + d); } - - // random access iterator - difference_type operator-(const iterator& x) const { return it_ - x.it_; } - - private: - template - friend class RepeatedPtrIterator; - - // The internal iterator. - void* const* it_; -}; - -// Provide an iterator that operates on pointers to the underlying objects -// rather than the objects themselves as RepeatedPtrIterator does. -// Consider using this when working with stl algorithms that change -// the array. -template -class RepeatedPtrOverPtrsIterator - : public std::iterator { - public: - typedef RepeatedPtrOverPtrsIterator iterator; - typedef std::iterator< - std::random_access_iterator_tag, Element*> superclass; - - // Let the compiler know that these are type names, so we don't have to - // write "typename" in front of them everywhere. - typedef typename superclass::reference reference; - typedef typename superclass::pointer pointer; - typedef typename superclass::difference_type difference_type; - - RepeatedPtrOverPtrsIterator() : it_(NULL) {} - explicit RepeatedPtrOverPtrsIterator(void** it) : it_(it) {} - - // dereferenceable - reference operator*() const { return *reinterpret_cast(it_); } - pointer operator->() const { return &(operator*()); } - - // {inc,dec}rementable - iterator& operator++() { ++it_; return *this; } - iterator operator++(int) { return iterator(it_++); } - iterator& operator--() { --it_; return *this; } - iterator operator--(int) { return iterator(it_--); } - - // equality_comparable - bool operator==(const iterator& x) const { return it_ == x.it_; } - bool operator!=(const iterator& x) const { return it_ != x.it_; } - - // less_than_comparable - bool operator<(const iterator& x) const { return it_ < x.it_; } - bool operator<=(const iterator& x) const { return it_ <= x.it_; } - bool operator>(const iterator& x) const { return it_ > x.it_; } - bool operator>=(const iterator& x) const { return it_ >= x.it_; } - - // addable, subtractable - iterator& operator+=(difference_type d) { - it_ += d; - return *this; - } - friend iterator operator+(iterator it, difference_type d) { - it += d; - return it; - } - friend iterator operator+(difference_type d, iterator it) { - it += d; - return it; - } - iterator& operator-=(difference_type d) { - it_ -= d; - return *this; - } - friend iterator operator-(iterator it, difference_type d) { - it -= d; - return it; - } - - // indexable - reference operator[](difference_type d) const { return *(*this + d); } - - // random access iterator - difference_type operator-(const iterator& x) const { return it_ - x.it_; } - - private: - template - friend class RepeatedPtrIterator; - - // The internal iterator. - void** it_; -}; - - -} // namespace internal - -template -inline typename RepeatedPtrField::iterator -RepeatedPtrField::begin() { - return iterator(raw_data()); -} -template -inline typename RepeatedPtrField::const_iterator -RepeatedPtrField::begin() const { - return iterator(raw_data()); -} -template -inline typename RepeatedPtrField::iterator -RepeatedPtrField::end() { - return iterator(raw_data() + size()); -} -template -inline typename RepeatedPtrField::const_iterator -RepeatedPtrField::end() const { - return iterator(raw_data() + size()); -} - -template -inline typename RepeatedPtrField::pointer_iterator -RepeatedPtrField::pointer_begin() { - return pointer_iterator(raw_mutable_data()); -} -template -inline typename RepeatedPtrField::pointer_iterator -RepeatedPtrField::pointer_end() { - return pointer_iterator(raw_mutable_data() + size()); -} - - -// Iterators and helper functions that follow the spirit of the STL -// std::back_insert_iterator and std::back_inserter but are tailor-made -// for RepeatedField and RepatedPtrField. Typical usage would be: -// -// std::copy(some_sequence.begin(), some_sequence.end(), -// google::protobuf::RepeatedFieldBackInserter(proto.mutable_sequence())); -// -// Ported by johannes from util/gtl/proto-array-iterators-inl.h - -namespace internal { -// A back inserter for RepeatedField objects. -template class RepeatedFieldBackInsertIterator - : public std::iterator { - public: - explicit RepeatedFieldBackInsertIterator( - RepeatedField* const mutable_field) - : field_(mutable_field) { - } - RepeatedFieldBackInsertIterator& operator=(const T& value) { - field_->Add(value); - return *this; - } - RepeatedFieldBackInsertIterator& operator*() { - return *this; - } - RepeatedFieldBackInsertIterator& operator++() { - return *this; - } - RepeatedFieldBackInsertIterator& operator++(int ignores_parameter) { - return *this; - } - - private: - RepeatedField* field_; -}; - -// A back inserter for RepeatedPtrField objects. -template class RepeatedPtrFieldBackInsertIterator - : public std::iterator { - public: - RepeatedPtrFieldBackInsertIterator( - RepeatedPtrField* const mutable_field) - : field_(mutable_field) { - } - RepeatedPtrFieldBackInsertIterator& operator=(const T& value) { - *field_->Add() = value; - return *this; - } - RepeatedPtrFieldBackInsertIterator& operator=( - const T* const ptr_to_value) { - *field_->Add() = *ptr_to_value; - return *this; - } - RepeatedPtrFieldBackInsertIterator& operator*() { - return *this; - } - RepeatedPtrFieldBackInsertIterator& operator++() { - return *this; - } - RepeatedPtrFieldBackInsertIterator& operator++(int ignores_parameter) { - return *this; - } - - private: - RepeatedPtrField* field_; -}; - -// A back inserter for RepeatedPtrFields that inserts by transfering ownership -// of a pointer. -template class AllocatedRepeatedPtrFieldBackInsertIterator - : public std::iterator { - public: - explicit AllocatedRepeatedPtrFieldBackInsertIterator( - RepeatedPtrField* const mutable_field) - : field_(mutable_field) { - } - AllocatedRepeatedPtrFieldBackInsertIterator& operator=( - T* const ptr_to_value) { - field_->AddAllocated(ptr_to_value); - return *this; - } - AllocatedRepeatedPtrFieldBackInsertIterator& operator*() { - return *this; - } - AllocatedRepeatedPtrFieldBackInsertIterator& operator++() { - return *this; - } - AllocatedRepeatedPtrFieldBackInsertIterator& operator++( - int ignores_parameter) { - return *this; - } - - private: - RepeatedPtrField* field_; -}; -} // namespace internal - -// Provides a back insert iterator for RepeatedField instances, -// similar to std::back_inserter(). Note the identically named -// function for RepeatedPtrField instances. -template internal::RepeatedFieldBackInsertIterator -RepeatedFieldBackInserter(RepeatedField* const mutable_field) { - return internal::RepeatedFieldBackInsertIterator(mutable_field); -} - -// Provides a back insert iterator for RepeatedPtrField instances, -// similar to std::back_inserter(). Note the identically named -// function for RepeatedField instances. -template internal::RepeatedPtrFieldBackInsertIterator -RepeatedFieldBackInserter(RepeatedPtrField* const mutable_field) { - return internal::RepeatedPtrFieldBackInsertIterator(mutable_field); -} - -// Provides a back insert iterator for RepeatedPtrField instances -// similar to std::back_inserter() which transfers the ownership while -// copying elements. -template internal::AllocatedRepeatedPtrFieldBackInsertIterator -AllocatedRepeatedPtrFieldBackInserter( - RepeatedPtrField* const mutable_field) { - return internal::AllocatedRepeatedPtrFieldBackInsertIterator( - mutable_field); -} - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_REPEATED_FIELD_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field_unittest.cc deleted file mode 100644 index e7e1e99b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/repeated_field_unittest.cc +++ /dev/null @@ -1,1086 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// TODO(kenton): Improve this unittest to bring it up to the standards of -// other proto2 unittests. - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -using protobuf_unittest::TestAllTypes; - -namespace protobuf { -namespace { - -// Test operations on a RepeatedField which is small enough that it does -// not allocate a separate array for storage. -TEST(RepeatedField, Small) { - RepeatedField field; - - EXPECT_EQ(field.size(), 0); - - field.Add(5); - - EXPECT_EQ(field.size(), 1); - EXPECT_EQ(field.Get(0), 5); - - field.Add(42); - - EXPECT_EQ(field.size(), 2); - EXPECT_EQ(field.Get(0), 5); - EXPECT_EQ(field.Get(1), 42); - - field.Set(1, 23); - - EXPECT_EQ(field.size(), 2); - EXPECT_EQ(field.Get(0), 5); - EXPECT_EQ(field.Get(1), 23); - EXPECT_EQ(field.SpaceUsedExcludingSelf(), 0); - - field.RemoveLast(); - - EXPECT_EQ(field.size(), 1); - EXPECT_EQ(field.Get(0), 5); - - field.Clear(); - - EXPECT_EQ(field.size(), 0); - EXPECT_EQ(field.SpaceUsedExcludingSelf(), 0); -} - -// Test operations on a RepeatedField which is large enough to allocate a -// separate array. -TEST(RepeatedField, Large) { - RepeatedField field; - - for (int i = 0; i < 16; i++) { - field.Add(i * i); - } - - EXPECT_EQ(field.size(), 16); - - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field.Get(i), i * i); - } - - int expected_usage = 16 * sizeof(int); - EXPECT_GE(field.SpaceUsedExcludingSelf(), expected_usage); -} - -// Test swapping between various types of RepeatedFields. -TEST(RepeatedField, SwapSmallSmall) { - RepeatedField field1; - RepeatedField field2; - - field1.Add(5); - field1.Add(42); - - field1.Swap(&field2); - - EXPECT_EQ(field1.size(), 0); - EXPECT_EQ(field2.size(), 2); - EXPECT_EQ(field2.Get(0), 5); - EXPECT_EQ(field2.Get(1), 42); -} - -TEST(RepeatedField, SwapLargeSmall) { - RepeatedField field1; - RepeatedField field2; - - for (int i = 0; i < 16; i++) { - field1.Add(i * i); - } - field2.Add(5); - field2.Add(42); - field1.Swap(&field2); - - EXPECT_EQ(field1.size(), 2); - EXPECT_EQ(field1.Get(0), 5); - EXPECT_EQ(field1.Get(1), 42); - EXPECT_EQ(field2.size(), 16); - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field2.Get(i), i * i); - } -} - -TEST(RepeatedField, SwapLargeLarge) { - RepeatedField field1; - RepeatedField field2; - - field1.Add(5); - field1.Add(42); - for (int i = 0; i < 16; i++) { - field1.Add(i); - field2.Add(i * i); - } - field2.Swap(&field1); - - EXPECT_EQ(field1.size(), 16); - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field1.Get(i), i * i); - } - EXPECT_EQ(field2.size(), 18); - EXPECT_EQ(field2.Get(0), 5); - EXPECT_EQ(field2.Get(1), 42); - for (int i = 2; i < 18; i++) { - EXPECT_EQ(field2.Get(i), i - 2); - } -} - -// Determines how much space was reserved by the given field by adding elements -// to it until it re-allocates its space. -static int ReservedSpace(RepeatedField* field) { - const int* ptr = field->data(); - do { - field->Add(0); - } while (field->data() == ptr); - - return field->size() - 1; -} - -TEST(RepeatedField, ReserveMoreThanDouble) { - // Reserve more than double the previous space in the field and expect the - // field to reserve exactly the amount specified. - RepeatedField field; - field.Reserve(20); - - EXPECT_EQ(20, ReservedSpace(&field)); -} - -TEST(RepeatedField, ReserveLessThanDouble) { - // Reserve less than double the previous space in the field and expect the - // field to grow by double instead. - RepeatedField field; - field.Reserve(20); - field.Reserve(30); - - EXPECT_EQ(40, ReservedSpace(&field)); -} - -TEST(RepeatedField, ReserveLessThanExisting) { - // Reserve less than the previous space in the field and expect the - // field to not re-allocate at all. - RepeatedField field; - field.Reserve(20); - const int* previous_ptr = field.data(); - field.Reserve(10); - - EXPECT_EQ(previous_ptr, field.data()); - EXPECT_EQ(20, ReservedSpace(&field)); -} - -TEST(RepeatedField, MergeFrom) { - RepeatedField source, destination; - - source.Add(4); - source.Add(5); - - destination.Add(1); - destination.Add(2); - destination.Add(3); - - destination.MergeFrom(source); - - ASSERT_EQ(5, destination.size()); - - EXPECT_EQ(1, destination.Get(0)); - EXPECT_EQ(2, destination.Get(1)); - EXPECT_EQ(3, destination.Get(2)); - EXPECT_EQ(4, destination.Get(3)); - EXPECT_EQ(5, destination.Get(4)); -} - -TEST(RepeatedField, CopyFrom) { - RepeatedField source, destination; - - source.Add(4); - source.Add(5); - - destination.Add(1); - destination.Add(2); - destination.Add(3); - - destination.CopyFrom(source); - - ASSERT_EQ(2, destination.size()); - - EXPECT_EQ(4, destination.Get(0)); - EXPECT_EQ(5, destination.Get(1)); -} - -TEST(RepeatedField, CopyConstruct) { - RepeatedField source; - source.Add(1); - source.Add(2); - - RepeatedField destination(source); - - ASSERT_EQ(2, destination.size()); - EXPECT_EQ(1, destination.Get(0)); - EXPECT_EQ(2, destination.Get(1)); -} - -TEST(RepeatedField, CopyAssign) { - RepeatedField source, destination; - - source.Add(4); - source.Add(5); - - destination.Add(1); - destination.Add(2); - destination.Add(3); - - destination = source; - - ASSERT_EQ(2, destination.size()); - - EXPECT_EQ(4, destination.Get(0)); - EXPECT_EQ(5, destination.Get(1)); -} - -TEST(RepeatedField, MutableDataIsMutable) { - RepeatedField field; - field.Add(1); - EXPECT_EQ(1, field.Get(0)); - // The fact that this line compiles would be enough, but we'll check the - // value anyway. - *field.mutable_data() = 2; - EXPECT_EQ(2, field.Get(0)); -} - -TEST(RepeatedField, Truncate) { - RepeatedField field; - - field.Add(12); - field.Add(34); - field.Add(56); - field.Add(78); - EXPECT_EQ(4, field.size()); - - field.Truncate(3); - EXPECT_EQ(3, field.size()); - - field.Add(90); - EXPECT_EQ(4, field.size()); - EXPECT_EQ(90, field.Get(3)); - - // Truncations that don't change the size are allowed, but growing is not - // allowed. - field.Truncate(field.size()); -#ifdef GTEST_HAS_DEATH_TEST - EXPECT_DEBUG_DEATH(field.Truncate(field.size() + 1), "new_size"); -#endif -} - - -// =================================================================== -// RepeatedPtrField tests. These pretty much just mirror the RepeatedField -// tests above. - -TEST(RepeatedPtrField, Small) { - RepeatedPtrField field; - - EXPECT_EQ(field.size(), 0); - - field.Add()->assign("foo"); - - EXPECT_EQ(field.size(), 1); - EXPECT_EQ(field.Get(0), "foo"); - - field.Add()->assign("bar"); - - EXPECT_EQ(field.size(), 2); - EXPECT_EQ(field.Get(0), "foo"); - EXPECT_EQ(field.Get(1), "bar"); - - field.Mutable(1)->assign("baz"); - - EXPECT_EQ(field.size(), 2); - EXPECT_EQ(field.Get(0), "foo"); - EXPECT_EQ(field.Get(1), "baz"); - - field.RemoveLast(); - - EXPECT_EQ(field.size(), 1); - EXPECT_EQ(field.Get(0), "foo"); - - field.Clear(); - - EXPECT_EQ(field.size(), 0); -} - -TEST(RepeatedPtrField, Large) { - RepeatedPtrField field; - - for (int i = 0; i < 16; i++) { - *field.Add() += 'a' + i; - } - - EXPECT_EQ(field.size(), 16); - - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field.Get(i).size(), 1); - EXPECT_EQ(field.Get(i)[0], 'a' + i); - } - - int min_expected_usage = 16 * sizeof(string); - EXPECT_GE(field.SpaceUsedExcludingSelf(), min_expected_usage); -} - -TEST(RepeatedPtrField, SwapSmallSmall) { - RepeatedPtrField field1; - RepeatedPtrField field2; - - field1.Add()->assign("foo"); - field1.Add()->assign("bar"); - field1.Swap(&field2); - - EXPECT_EQ(field1.size(), 0); - EXPECT_EQ(field2.size(), 2); - EXPECT_EQ(field2.Get(0), "foo"); - EXPECT_EQ(field2.Get(1), "bar"); -} - -TEST(RepeatedPtrField, SwapLargeSmall) { - RepeatedPtrField field1; - RepeatedPtrField field2; - - field2.Add()->assign("foo"); - field2.Add()->assign("bar"); - for (int i = 0; i < 16; i++) { - *field1.Add() += 'a' + i; - } - field1.Swap(&field2); - - EXPECT_EQ(field1.size(), 2); - EXPECT_EQ(field1.Get(0), "foo"); - EXPECT_EQ(field1.Get(1), "bar"); - EXPECT_EQ(field2.size(), 16); - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field2.Get(i).size(), 1); - EXPECT_EQ(field2.Get(i)[0], 'a' + i); - } -} - -TEST(RepeatedPtrField, SwapLargeLarge) { - RepeatedPtrField field1; - RepeatedPtrField field2; - - field1.Add()->assign("foo"); - field1.Add()->assign("bar"); - for (int i = 0; i < 16; i++) { - *field1.Add() += 'A' + i; - *field2.Add() += 'a' + i; - } - field2.Swap(&field1); - - EXPECT_EQ(field1.size(), 16); - for (int i = 0; i < 16; i++) { - EXPECT_EQ(field1.Get(i).size(), 1); - EXPECT_EQ(field1.Get(i)[0], 'a' + i); - } - EXPECT_EQ(field2.size(), 18); - EXPECT_EQ(field2.Get(0), "foo"); - EXPECT_EQ(field2.Get(1), "bar"); - for (int i = 2; i < 18; i++) { - EXPECT_EQ(field2.Get(i).size(), 1); - EXPECT_EQ(field2.Get(i)[0], 'A' + i - 2); - } -} - -static int ReservedSpace(RepeatedPtrField* field) { - const string* const* ptr = field->data(); - do { - field->Add(); - } while (field->data() == ptr); - - return field->size() - 1; -} - -TEST(RepeatedPtrField, ReserveMoreThanDouble) { - RepeatedPtrField field; - field.Reserve(20); - - EXPECT_EQ(20, ReservedSpace(&field)); -} - -TEST(RepeatedPtrField, ReserveLessThanDouble) { - RepeatedPtrField field; - field.Reserve(20); - field.Reserve(30); - - EXPECT_EQ(40, ReservedSpace(&field)); -} - -TEST(RepeatedPtrField, ReserveLessThanExisting) { - RepeatedPtrField field; - field.Reserve(20); - const string* const* previous_ptr = field.data(); - field.Reserve(10); - - EXPECT_EQ(previous_ptr, field.data()); - EXPECT_EQ(20, ReservedSpace(&field)); -} - -TEST(RepeatedPtrField, ReserveDoesntLoseAllocated) { - // Check that a bug is fixed: An earlier implementation of Reserve() - // failed to copy pointers to allocated-but-cleared objects, possibly - // leading to segfaults. - RepeatedPtrField field; - string* first = field.Add(); - field.RemoveLast(); - - field.Reserve(20); - EXPECT_EQ(first, field.Add()); -} - -// Clearing elements is tricky with RepeatedPtrFields since the memory for -// the elements is retained and reused. -TEST(RepeatedPtrField, ClearedElements) { - RepeatedPtrField field; - - string* original = field.Add(); - *original = "foo"; - - EXPECT_EQ(field.ClearedCount(), 0); - - field.RemoveLast(); - EXPECT_TRUE(original->empty()); - EXPECT_EQ(field.ClearedCount(), 1); - - EXPECT_EQ(field.Add(), original); // Should return same string for reuse. - - EXPECT_EQ(field.ReleaseLast(), original); // We take ownership. - EXPECT_EQ(field.ClearedCount(), 0); - - EXPECT_NE(field.Add(), original); // Should NOT return the same string. - EXPECT_EQ(field.ClearedCount(), 0); - - field.AddAllocated(original); // Give ownership back. - EXPECT_EQ(field.ClearedCount(), 0); - EXPECT_EQ(field.Mutable(1), original); - - field.Clear(); - EXPECT_EQ(field.ClearedCount(), 2); - EXPECT_EQ(field.ReleaseCleared(), original); // Take ownership again. - EXPECT_EQ(field.ClearedCount(), 1); - EXPECT_NE(field.Add(), original); - EXPECT_EQ(field.ClearedCount(), 0); - EXPECT_NE(field.Add(), original); - EXPECT_EQ(field.ClearedCount(), 0); - - field.AddCleared(original); // Give ownership back, but as a cleared object. - EXPECT_EQ(field.ClearedCount(), 1); - EXPECT_EQ(field.Add(), original); - EXPECT_EQ(field.ClearedCount(), 0); -} - -// Test all code paths in AddAllocated(). -TEST(RepeatedPtrField, AddAlocated) { - RepeatedPtrField field; - while (field.size() < field.Capacity()) { - field.Add()->assign("filler"); - } - - int index = field.size(); - - // First branch: Field is at capacity with no cleared objects. - string* foo = new string("foo"); - field.AddAllocated(foo); - EXPECT_EQ(index + 1, field.size()); - EXPECT_EQ(0, field.ClearedCount()); - EXPECT_EQ(foo, &field.Get(index)); - - // Last branch: Field is not at capacity and there are no cleared objects. - string* bar = new string("bar"); - field.AddAllocated(bar); - ++index; - EXPECT_EQ(index + 1, field.size()); - EXPECT_EQ(0, field.ClearedCount()); - EXPECT_EQ(bar, &field.Get(index)); - - // Third branch: Field is not at capacity and there are no cleared objects. - field.RemoveLast(); - string* baz = new string("baz"); - field.AddAllocated(baz); - EXPECT_EQ(index + 1, field.size()); - EXPECT_EQ(1, field.ClearedCount()); - EXPECT_EQ(baz, &field.Get(index)); - - // Second branch: Field is at capacity but has some cleared objects. - while (field.size() < field.Capacity()) { - field.Add()->assign("filler2"); - } - field.RemoveLast(); - index = field.size(); - string* qux = new string("qux"); - field.AddAllocated(qux); - EXPECT_EQ(index + 1, field.size()); - // We should have discarded the cleared object. - EXPECT_EQ(0, field.ClearedCount()); - EXPECT_EQ(qux, &field.Get(index)); -} - -TEST(RepeatedPtrField, MergeFrom) { - RepeatedPtrField source, destination; - - source.Add()->assign("4"); - source.Add()->assign("5"); - - destination.Add()->assign("1"); - destination.Add()->assign("2"); - destination.Add()->assign("3"); - - destination.MergeFrom(source); - - ASSERT_EQ(5, destination.size()); - - EXPECT_EQ("1", destination.Get(0)); - EXPECT_EQ("2", destination.Get(1)); - EXPECT_EQ("3", destination.Get(2)); - EXPECT_EQ("4", destination.Get(3)); - EXPECT_EQ("5", destination.Get(4)); -} - -TEST(RepeatedPtrField, CopyFrom) { - RepeatedPtrField source, destination; - - source.Add()->assign("4"); - source.Add()->assign("5"); - - destination.Add()->assign("1"); - destination.Add()->assign("2"); - destination.Add()->assign("3"); - - destination.CopyFrom(source); - - ASSERT_EQ(2, destination.size()); - - EXPECT_EQ("4", destination.Get(0)); - EXPECT_EQ("5", destination.Get(1)); -} - -TEST(RepeatedPtrField, CopyConstruct) { - RepeatedPtrField source; - - source.Add()->assign("1"); - source.Add()->assign("2"); - - RepeatedPtrField destination(source); - - ASSERT_EQ(2, destination.size()); - EXPECT_EQ("1", destination.Get(0)); - EXPECT_EQ("2", destination.Get(1)); -} - -TEST(RepeatedPtrField, CopyAssign) { - RepeatedPtrField source, destination; - - source.Add()->assign("4"); - source.Add()->assign("5"); - - destination.Add()->assign("1"); - destination.Add()->assign("2"); - destination.Add()->assign("3"); - - destination = source; - - ASSERT_EQ(2, destination.size()); - - EXPECT_EQ("4", destination.Get(0)); - EXPECT_EQ("5", destination.Get(1)); -} - -TEST(RepeatedPtrField, MutableDataIsMutable) { - RepeatedPtrField field; - *field.Add() = "1"; - EXPECT_EQ("1", field.Get(0)); - // The fact that this line compiles would be enough, but we'll check the - // value anyway. - string** data = field.mutable_data(); - **data = "2"; - EXPECT_EQ("2", field.Get(0)); -} - -// =================================================================== - -// Iterator tests stolen from net/proto/proto-array_unittest. -class RepeatedFieldIteratorTest : public testing::Test { - protected: - virtual void SetUp() { - for (int i = 0; i < 3; ++i) { - proto_array_.Add(i); - } - } - - RepeatedField proto_array_; -}; - -TEST_F(RepeatedFieldIteratorTest, Convertible) { - RepeatedField::iterator iter = proto_array_.begin(); - RepeatedField::const_iterator c_iter = iter; - RepeatedField::value_type value = *c_iter; - EXPECT_EQ(0, value); -} - -TEST_F(RepeatedFieldIteratorTest, MutableIteration) { - RepeatedField::iterator iter = proto_array_.begin(); - EXPECT_EQ(0, *iter); - ++iter; - EXPECT_EQ(1, *iter++); - EXPECT_EQ(2, *iter); - ++iter; - EXPECT_TRUE(proto_array_.end() == iter); - - EXPECT_EQ(2, *(proto_array_.end() - 1)); -} - -TEST_F(RepeatedFieldIteratorTest, ConstIteration) { - const RepeatedField& const_proto_array = proto_array_; - RepeatedField::const_iterator iter = const_proto_array.begin(); - EXPECT_EQ(0, *iter); - ++iter; - EXPECT_EQ(1, *iter++); - EXPECT_EQ(2, *iter); - ++iter; - EXPECT_TRUE(proto_array_.end() == iter); - EXPECT_EQ(2, *(proto_array_.end() - 1)); -} - -TEST_F(RepeatedFieldIteratorTest, Mutation) { - RepeatedField::iterator iter = proto_array_.begin(); - *iter = 7; - EXPECT_EQ(7, proto_array_.Get(0)); -} - -// ------------------------------------------------------------------- - -class RepeatedPtrFieldIteratorTest : public testing::Test { - protected: - virtual void SetUp() { - proto_array_.Add()->assign("foo"); - proto_array_.Add()->assign("bar"); - proto_array_.Add()->assign("baz"); - } - - RepeatedPtrField proto_array_; -}; - -TEST_F(RepeatedPtrFieldIteratorTest, Convertible) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - RepeatedPtrField::const_iterator c_iter = iter; - RepeatedPtrField::value_type value = *c_iter; - EXPECT_EQ("foo", value); -} - -TEST_F(RepeatedPtrFieldIteratorTest, MutableIteration) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - EXPECT_EQ("foo", *iter); - ++iter; - EXPECT_EQ("bar", *(iter++)); - EXPECT_EQ("baz", *iter); - ++iter; - EXPECT_TRUE(proto_array_.end() == iter); - EXPECT_EQ("baz", *(--proto_array_.end())); -} - -TEST_F(RepeatedPtrFieldIteratorTest, ConstIteration) { - const RepeatedPtrField& const_proto_array = proto_array_; - RepeatedPtrField::const_iterator iter = const_proto_array.begin(); - EXPECT_EQ("foo", *iter); - ++iter; - EXPECT_EQ("bar", *(iter++)); - EXPECT_EQ("baz", *iter); - ++iter; - EXPECT_TRUE(const_proto_array.end() == iter); - EXPECT_EQ("baz", *(--const_proto_array.end())); -} - -TEST_F(RepeatedPtrFieldIteratorTest, RandomAccess) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - RepeatedPtrField::iterator iter2 = iter; - ++iter2; - ++iter2; - EXPECT_TRUE(iter + 2 == iter2); - EXPECT_TRUE(iter == iter2 - 2); - EXPECT_EQ("baz", iter[2]); - EXPECT_EQ("baz", *(iter + 2)); - EXPECT_EQ(3, proto_array_.end() - proto_array_.begin()); -} - -TEST_F(RepeatedPtrFieldIteratorTest, Comparable) { - RepeatedPtrField::const_iterator iter = proto_array_.begin(); - RepeatedPtrField::const_iterator iter2 = iter + 1; - EXPECT_TRUE(iter == iter); - EXPECT_TRUE(iter != iter2); - EXPECT_TRUE(iter < iter2); - EXPECT_TRUE(iter <= iter2); - EXPECT_TRUE(iter <= iter); - EXPECT_TRUE(iter2 > iter); - EXPECT_TRUE(iter2 >= iter); - EXPECT_TRUE(iter >= iter); -} - -// Uninitialized iterator does not point to any of the RepeatedPtrField. -TEST_F(RepeatedPtrFieldIteratorTest, UninitializedIterator) { - RepeatedPtrField::iterator iter; - EXPECT_TRUE(iter != proto_array_.begin()); - EXPECT_TRUE(iter != proto_array_.begin() + 1); - EXPECT_TRUE(iter != proto_array_.begin() + 2); - EXPECT_TRUE(iter != proto_array_.begin() + 3); - EXPECT_TRUE(iter != proto_array_.end()); -} - -TEST_F(RepeatedPtrFieldIteratorTest, STLAlgorithms_lower_bound) { - proto_array_.Clear(); - proto_array_.Add()->assign("a"); - proto_array_.Add()->assign("c"); - proto_array_.Add()->assign("d"); - proto_array_.Add()->assign("n"); - proto_array_.Add()->assign("p"); - proto_array_.Add()->assign("x"); - proto_array_.Add()->assign("y"); - - string v = "f"; - RepeatedPtrField::const_iterator it = - lower_bound(proto_array_.begin(), proto_array_.end(), v); - - EXPECT_EQ(*it, "n"); - EXPECT_TRUE(it == proto_array_.begin() + 3); -} - -TEST_F(RepeatedPtrFieldIteratorTest, Mutation) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - *iter = "qux"; - EXPECT_EQ("qux", proto_array_.Get(0)); -} - -// ------------------------------------------------------------------- - -class RepeatedPtrFieldPtrsIteratorTest : public testing::Test { - protected: - virtual void SetUp() { - proto_array_.Add()->assign("foo"); - proto_array_.Add()->assign("bar"); - proto_array_.Add()->assign("baz"); - } - - RepeatedPtrField proto_array_; -}; - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, ConvertiblePtr) { - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); -} - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutablePtrIteration) { - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); - EXPECT_EQ("foo", **iter); - ++iter; - EXPECT_EQ("bar", **(iter++)); - EXPECT_EQ("baz", **iter); - ++iter; - EXPECT_TRUE(proto_array_.pointer_end() == iter); - EXPECT_EQ("baz", **(--proto_array_.pointer_end())); -} - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, RandomPtrAccess) { - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); - RepeatedPtrField::pointer_iterator iter2 = iter; - ++iter2; - ++iter2; - EXPECT_TRUE(iter + 2 == iter2); - EXPECT_TRUE(iter == iter2 - 2); - EXPECT_EQ("baz", *iter[2]); - EXPECT_EQ("baz", **(iter + 2)); - EXPECT_EQ(3, proto_array_.end() - proto_array_.begin()); -} - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, ComparablePtr) { - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); - RepeatedPtrField::pointer_iterator iter2 = iter + 1; - EXPECT_TRUE(iter == iter); - EXPECT_TRUE(iter != iter2); - EXPECT_TRUE(iter < iter2); - EXPECT_TRUE(iter <= iter2); - EXPECT_TRUE(iter <= iter); - EXPECT_TRUE(iter2 > iter); - EXPECT_TRUE(iter2 >= iter); - EXPECT_TRUE(iter >= iter); -} - -// Uninitialized iterator does not point to any of the RepeatedPtrOverPtrs. -// Dereferencing an uninitialized iterator crashes the process. -TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedPtrIterator) { - RepeatedPtrField::pointer_iterator iter; - EXPECT_TRUE(iter != proto_array_.pointer_begin()); - EXPECT_TRUE(iter != proto_array_.pointer_begin() + 1); - EXPECT_TRUE(iter != proto_array_.pointer_begin() + 2); - EXPECT_TRUE(iter != proto_array_.pointer_begin() + 3); - EXPECT_TRUE(iter != proto_array_.pointer_end()); -} - - -// This comparison functor is required by the tests for RepeatedPtrOverPtrs. -// They operate on strings and need to compare strings as strings in -// any stl algorithm, even though the iterator returns a pointer to a string -// - i.e. *iter has type string*. -struct StringLessThan { - bool operator()(const string* z, const string& y) { - return *z < y; - } - bool operator()(const string* z, const string* y) { - return *z < *y; - } -}; - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { - proto_array_.Clear(); - proto_array_.Add()->assign("a"); - proto_array_.Add()->assign("c"); - proto_array_.Add()->assign("d"); - proto_array_.Add()->assign("n"); - proto_array_.Add()->assign("p"); - proto_array_.Add()->assign("x"); - proto_array_.Add()->assign("y"); - - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); - string v = "f"; - RepeatedPtrField::pointer_iterator it = - lower_bound(proto_array_.pointer_begin(), proto_array_.pointer_end(), - &v, StringLessThan()); - - GOOGLE_CHECK(*it != NULL); - - EXPECT_EQ(**it, "n"); - EXPECT_TRUE(it == proto_array_.pointer_begin() + 3); -} - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrMutation) { - RepeatedPtrField::pointer_iterator iter = - proto_array_.pointer_begin(); - **iter = "qux"; - EXPECT_EQ("qux", proto_array_.Get(0)); - - EXPECT_EQ("bar", proto_array_.Get(1)); - EXPECT_EQ("baz", proto_array_.Get(2)); - ++iter; - delete *iter; - *iter = new string("a"); - ++iter; - delete *iter; - *iter = new string("b"); - EXPECT_EQ("a", proto_array_.Get(1)); - EXPECT_EQ("b", proto_array_.Get(2)); -} - -TEST_F(RepeatedPtrFieldPtrsIteratorTest, Sort) { - proto_array_.Add()->assign("c"); - proto_array_.Add()->assign("d"); - proto_array_.Add()->assign("n"); - proto_array_.Add()->assign("p"); - proto_array_.Add()->assign("a"); - proto_array_.Add()->assign("y"); - proto_array_.Add()->assign("x"); - EXPECT_EQ("foo", proto_array_.Get(0)); - EXPECT_EQ("n", proto_array_.Get(5)); - EXPECT_EQ("x", proto_array_.Get(9)); - sort(proto_array_.pointer_begin(), - proto_array_.pointer_end(), - StringLessThan()); - EXPECT_EQ("a", proto_array_.Get(0)); - EXPECT_EQ("baz", proto_array_.Get(2)); - EXPECT_EQ("y", proto_array_.Get(9)); -} - - -// ----------------------------------------------------------------------------- -// Unit-tests for the insert iterators -// google::protobuf::RepeatedFieldBackInserter, -// google::protobuf::AllocatedRepeatedPtrFieldBackInserter -// Ported from util/gtl/proto-array-iterators_unittest. - -class RepeatedFieldInsertionIteratorsTest : public testing::Test { - protected: - std::list halves; - std::list fibonacci; - std::vector words; - typedef TestAllTypes::NestedMessage Nested; - Nested nesteds[2]; - std::vector nested_ptrs; - TestAllTypes protobuffer; - - virtual void SetUp() { - fibonacci.push_back(1); - fibonacci.push_back(1); - fibonacci.push_back(2); - fibonacci.push_back(3); - fibonacci.push_back(5); - fibonacci.push_back(8); - std::copy(fibonacci.begin(), fibonacci.end(), - RepeatedFieldBackInserter(protobuffer.mutable_repeated_int32())); - - halves.push_back(1.0); - halves.push_back(0.5); - halves.push_back(0.25); - halves.push_back(0.125); - halves.push_back(0.0625); - std::copy(halves.begin(), halves.end(), - RepeatedFieldBackInserter(protobuffer.mutable_repeated_double())); - - words.push_back("Able"); - words.push_back("was"); - words.push_back("I"); - words.push_back("ere"); - words.push_back("I"); - words.push_back("saw"); - words.push_back("Elba"); - std::copy(words.begin(), words.end(), - RepeatedFieldBackInserter(protobuffer.mutable_repeated_string())); - - nesteds[0].set_bb(17); - nesteds[1].set_bb(4711); - std::copy(&nesteds[0], &nesteds[2], - RepeatedFieldBackInserter( - protobuffer.mutable_repeated_nested_message())); - - nested_ptrs.push_back(new Nested); - nested_ptrs.back()->set_bb(170); - nested_ptrs.push_back(new Nested); - nested_ptrs.back()->set_bb(47110); - std::copy(nested_ptrs.begin(), nested_ptrs.end(), - RepeatedFieldBackInserter( - protobuffer.mutable_repeated_nested_message())); - - } - - virtual void TearDown() { - STLDeleteContainerPointers(nested_ptrs.begin(), nested_ptrs.end()); - } -}; - -TEST_F(RepeatedFieldInsertionIteratorsTest, Fibonacci) { - EXPECT_TRUE(std::equal(fibonacci.begin(), - fibonacci.end(), - protobuffer.repeated_int32().begin())); - EXPECT_TRUE(std::equal(protobuffer.repeated_int32().begin(), - protobuffer.repeated_int32().end(), - fibonacci.begin())); -} - -TEST_F(RepeatedFieldInsertionIteratorsTest, Halves) { - EXPECT_TRUE(std::equal(halves.begin(), - halves.end(), - protobuffer.repeated_double().begin())); - EXPECT_TRUE(std::equal(protobuffer.repeated_double().begin(), - protobuffer.repeated_double().end(), - halves.begin())); -} - -TEST_F(RepeatedFieldInsertionIteratorsTest, Words) { - ASSERT_EQ(words.size(), protobuffer.repeated_string_size()); - EXPECT_EQ(words.at(0), protobuffer.repeated_string(0)); - EXPECT_EQ(words.at(1), protobuffer.repeated_string(1)); - EXPECT_EQ(words.at(2), protobuffer.repeated_string(2)); - EXPECT_EQ(words.at(3), protobuffer.repeated_string(3)); - EXPECT_EQ(words.at(4), protobuffer.repeated_string(4)); - EXPECT_EQ(words.at(5), protobuffer.repeated_string(5)); - EXPECT_EQ(words.at(6), protobuffer.repeated_string(6)); -} - -TEST_F(RepeatedFieldInsertionIteratorsTest, Nesteds) { - ASSERT_EQ(protobuffer.repeated_nested_message_size(), 4); - EXPECT_EQ(protobuffer.repeated_nested_message(0).bb(), 17); - EXPECT_EQ(protobuffer.repeated_nested_message(1).bb(), 4711); - EXPECT_EQ(protobuffer.repeated_nested_message(2).bb(), 170); - EXPECT_EQ(protobuffer.repeated_nested_message(3).bb(), 47110); -} - -TEST_F(RepeatedFieldInsertionIteratorsTest, - AllocatedRepeatedPtrFieldWithStringIntData) { - vector data; - TestAllTypes goldenproto; - for (int i = 0; i < 10; ++i) { - Nested* new_data = new Nested; - new_data->set_bb(i); - data.push_back(new_data); - - new_data = goldenproto.add_repeated_nested_message(); - new_data->set_bb(i); - } - TestAllTypes testproto; - copy(data.begin(), data.end(), - AllocatedRepeatedPtrFieldBackInserter( - testproto.mutable_repeated_nested_message())); - EXPECT_EQ(testproto.DebugString(), goldenproto.DebugString()); -} - -TEST_F(RepeatedFieldInsertionIteratorsTest, - AllocatedRepeatedPtrFieldWithString) { - vector data; - TestAllTypes goldenproto; - for (int i = 0; i < 10; ++i) { - string* new_data = new string; - *new_data = "name-" + SimpleItoa(i); - data.push_back(new_data); - - new_data = goldenproto.add_repeated_string(); - *new_data = "name-" + SimpleItoa(i); - } - TestAllTypes testproto; - copy(data.begin(), data.end(), - AllocatedRepeatedPtrFieldBackInserter( - testproto.mutable_repeated_string())); - EXPECT_EQ(testproto.DebugString(), goldenproto.DebugString()); -} - -} // namespace - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.cc deleted file mode 100644 index caf968ca..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -namespace google { -namespace protobuf { - -Service::~Service() {} -RpcChannel::~RpcChannel() {} -RpcController::~RpcController() {} - -} // namespace protobuf - -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.h deleted file mode 100644 index a6a7d16d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/service.h +++ /dev/null @@ -1,291 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// DEPRECATED: This module declares the abstract interfaces underlying proto2 -// RPC services. These are intented to be independent of any particular RPC -// implementation, so that proto2 services can be used on top of a variety -// of implementations. Starting with version 2.3.0, RPC implementations should -// not try to build on these, but should instead provide code generator plugins -// which generate code specific to the particular RPC implementation. This way -// the generated code can be more appropriate for the implementation in use -// and can avoid unnecessary layers of indirection. -// -// -// When you use the protocol compiler to compile a service definition, it -// generates two classes: An abstract interface for the service (with -// methods matching the service definition) and a "stub" implementation. -// A stub is just a type-safe wrapper around an RpcChannel which emulates a -// local implementation of the service. -// -// For example, the service definition: -// service MyService { -// rpc Foo(MyRequest) returns(MyResponse); -// } -// will generate abstract interface "MyService" and class "MyService::Stub". -// You could implement a MyService as follows: -// class MyServiceImpl : public MyService { -// public: -// MyServiceImpl() {} -// ~MyServiceImpl() {} -// -// // implements MyService --------------------------------------- -// -// void Foo(google::protobuf::RpcController* controller, -// const MyRequest* request, -// MyResponse* response, -// Closure* done) { -// // ... read request and fill in response ... -// done->Run(); -// } -// }; -// You would then register an instance of MyServiceImpl with your RPC server -// implementation. (How to do that depends on the implementation.) -// -// To call a remote MyServiceImpl, first you need an RpcChannel connected to it. -// How to construct a channel depends, again, on your RPC implementation. -// Here we use a hypothentical "MyRpcChannel" as an example: -// MyRpcChannel channel("rpc:hostname:1234/myservice"); -// MyRpcController controller; -// MyServiceImpl::Stub stub(&channel); -// FooRequest request; -// FooRespnose response; -// -// // ... fill in request ... -// -// stub.Foo(&controller, request, &response, NewCallback(HandleResponse)); -// -// On Thread-Safety: -// -// Different RPC implementations may make different guarantees about what -// threads they may run callbacks on, and what threads the application is -// allowed to use to call the RPC system. Portable software should be ready -// for callbacks to be called on any thread, but should not try to call the -// RPC system from any thread except for the ones on which it received the -// callbacks. Realistically, though, simple software will probably want to -// use a single-threaded RPC system while high-end software will want to -// use multiple threads. RPC implementations should provide multiple -// choices. - -#ifndef GOOGLE_PROTOBUF_SERVICE_H__ -#define GOOGLE_PROTOBUF_SERVICE_H__ - -#include -#include - -namespace google { -namespace protobuf { - -// Defined in this file. -class Service; -class RpcController; -class RpcChannel; - -// Defined in other files. -class Descriptor; // descriptor.h -class ServiceDescriptor; // descriptor.h -class MethodDescriptor; // descriptor.h -class Message; // message.h - -// Abstract base interface for protocol-buffer-based RPC services. Services -// themselves are abstract interfaces (implemented either by servers or as -// stubs), but they subclass this base interface. The methods of this -// interface can be used to call the methods of the Service without knowing -// its exact type at compile time (analogous to Reflection). -class LIBPROTOBUF_EXPORT Service { - public: - inline Service() {} - virtual ~Service(); - - // When constructing a stub, you may pass STUB_OWNS_CHANNEL as the second - // parameter to the constructor to tell it to delete its RpcChannel when - // destroyed. - enum ChannelOwnership { - STUB_OWNS_CHANNEL, - STUB_DOESNT_OWN_CHANNEL - }; - - // Get the ServiceDescriptor describing this service and its methods. - virtual const ServiceDescriptor* GetDescriptor() = 0; - - // Call a method of the service specified by MethodDescriptor. This is - // normally implemented as a simple switch() that calls the standard - // definitions of the service's methods. - // - // Preconditions: - // * method->service() == GetDescriptor() - // * request and response are of the exact same classes as the objects - // returned by GetRequestPrototype(method) and - // GetResponsePrototype(method). - // * After the call has started, the request must not be modified and the - // response must not be accessed at all until "done" is called. - // * "controller" is of the correct type for the RPC implementation being - // used by this Service. For stubs, the "correct type" depends on the - // RpcChannel which the stub is using. Server-side Service - // implementations are expected to accept whatever type of RpcController - // the server-side RPC implementation uses. - // - // Postconditions: - // * "done" will be called when the method is complete. This may be - // before CallMethod() returns or it may be at some point in the future. - // * If the RPC succeeded, "response" contains the response returned by - // the server. - // * If the RPC failed, "response"'s contents are undefined. The - // RpcController can be queried to determine if an error occurred and - // possibly to get more information about the error. - virtual void CallMethod(const MethodDescriptor* method, - RpcController* controller, - const Message* request, - Message* response, - Closure* done) = 0; - - // CallMethod() requires that the request and response passed in are of a - // particular subclass of Message. GetRequestPrototype() and - // GetResponsePrototype() get the default instances of these required types. - // You can then call Message::New() on these instances to construct mutable - // objects which you can then pass to CallMethod(). - // - // Example: - // const MethodDescriptor* method = - // service->GetDescriptor()->FindMethodByName("Foo"); - // Message* request = stub->GetRequestPrototype (method)->New(); - // Message* response = stub->GetResponsePrototype(method)->New(); - // request->ParseFromString(input); - // service->CallMethod(method, *request, response, callback); - virtual const Message& GetRequestPrototype( - const MethodDescriptor* method) const = 0; - virtual const Message& GetResponsePrototype( - const MethodDescriptor* method) const = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Service); -}; - -// An RpcController mediates a single method call. The primary purpose of -// the controller is to provide a way to manipulate settings specific to the -// RPC implementation and to find out about RPC-level errors. -// -// The methods provided by the RpcController interface are intended to be a -// "least common denominator" set of features which we expect all -// implementations to support. Specific implementations may provide more -// advanced features (e.g. deadline propagation). -class LIBPROTOBUF_EXPORT RpcController { - public: - inline RpcController() {} - virtual ~RpcController(); - - // Client-side methods --------------------------------------------- - // These calls may be made from the client side only. Their results - // are undefined on the server side (may crash). - - // Resets the RpcController to its initial state so that it may be reused in - // a new call. Must not be called while an RPC is in progress. - virtual void Reset() = 0; - - // After a call has finished, returns true if the call failed. The possible - // reasons for failure depend on the RPC implementation. Failed() must not - // be called before a call has finished. If Failed() returns true, the - // contents of the response message are undefined. - virtual bool Failed() const = 0; - - // If Failed() is true, returns a human-readable description of the error. - virtual string ErrorText() const = 0; - - // Advises the RPC system that the caller desires that the RPC call be - // canceled. The RPC system may cancel it immediately, may wait awhile and - // then cancel it, or may not even cancel the call at all. If the call is - // canceled, the "done" callback will still be called and the RpcController - // will indicate that the call failed at that time. - virtual void StartCancel() = 0; - - // Server-side methods --------------------------------------------- - // These calls may be made from the server side only. Their results - // are undefined on the client side (may crash). - - // Causes Failed() to return true on the client side. "reason" will be - // incorporated into the message returned by ErrorText(). If you find - // you need to return machine-readable information about failures, you - // should incorporate it into your response protocol buffer and should - // NOT call SetFailed(). - virtual void SetFailed(const string& reason) = 0; - - // If true, indicates that the client canceled the RPC, so the server may - // as well give up on replying to it. The server should still call the - // final "done" callback. - virtual bool IsCanceled() const = 0; - - // Asks that the given callback be called when the RPC is canceled. The - // callback will always be called exactly once. If the RPC completes without - // being canceled, the callback will be called after completion. If the RPC - // has already been canceled when NotifyOnCancel() is called, the callback - // will be called immediately. - // - // NotifyOnCancel() must be called no more than once per request. - virtual void NotifyOnCancel(Closure* callback) = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RpcController); -}; - -// Abstract interface for an RPC channel. An RpcChannel represents a -// communication line to a Service which can be used to call that Service's -// methods. The Service may be running on another machine. Normally, you -// should not call an RpcChannel directly, but instead construct a stub Service -// wrapping it. Example: -// RpcChannel* channel = new MyRpcChannel("remotehost.example.com:1234"); -// MyService* service = new MyService::Stub(channel); -// service->MyMethod(request, &response, callback); -class LIBPROTOBUF_EXPORT RpcChannel { - public: - inline RpcChannel() {} - virtual ~RpcChannel(); - - // Call the given method of the remote service. The signature of this - // procedure looks the same as Service::CallMethod(), but the requirements - // are less strict in one important way: the request and response objects - // need not be of any specific class as long as their descriptors are - // method->input_type() and method->output_type(). - virtual void CallMethod(const MethodDescriptor* method, - RpcController* controller, - const Message* request, - Message* response, - Closure* done) = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RpcChannel); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_SERVICE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.cc deleted file mode 100644 index 7b15be44..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.cc +++ /dev/null @@ -1,377 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include -#include -#include -#include - -#include "config.h" - -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN // We only need minimal includes -#include -#define snprintf _snprintf // see comment in strutil.cc -#elif defined(HAVE_PTHREAD) -#include -#else -#error "No suitable threading library available." -#endif - -namespace google { -namespace protobuf { - -namespace internal { - -void VerifyVersion(int headerVersion, - int minLibraryVersion, - const char* filename) { - if (GOOGLE_PROTOBUF_VERSION < minLibraryVersion) { - // Library is too old for headers. - GOOGLE_LOG(FATAL) - << "This program requires version " << VersionString(minLibraryVersion) - << " of the Protocol Buffer runtime library, but the installed version " - "is " << VersionString(GOOGLE_PROTOBUF_VERSION) << ". Please update " - "your library. If you compiled the program yourself, make sure that " - "your headers are from the same version of Protocol Buffers as your " - "link-time library. (Version verification failed in \"" - << filename << "\".)"; - } - if (headerVersion < kMinHeaderVersionForLibrary) { - // Headers are too old for library. - GOOGLE_LOG(FATAL) - << "This program was compiled against version " - << VersionString(headerVersion) << " of the Protocol Buffer runtime " - "library, which is not compatible with the installed version (" - << VersionString(GOOGLE_PROTOBUF_VERSION) << "). Contact the program " - "author for an update. If you compiled the program yourself, make " - "sure that your headers are from the same version of Protocol Buffers " - "as your link-time library. (Version verification failed in \"" - << filename << "\".)"; - } -} - -string VersionString(int version) { - int major = version / 1000000; - int minor = (version / 1000) % 1000; - int micro = version % 1000; - - // 128 bytes should always be enough, but we use snprintf() anyway to be - // safe. - char buffer[128]; - snprintf(buffer, sizeof(buffer), "%d.%d.%d", major, minor, micro); - - // Guard against broken MSVC snprintf(). - buffer[sizeof(buffer)-1] = '\0'; - - return buffer; -} - -} // namespace internal - -// =================================================================== -// emulates google3/base/logging.cc - -namespace internal { - -void DefaultLogHandler(LogLevel level, const char* filename, int line, - const string& message) { - static const char* level_names[] = { "INFO", "WARNING", "ERROR", "FATAL" }; - - // We use fprintf() instead of cerr because we want this to work at static - // initialization time. - fprintf(stderr, "libprotobuf %s %s:%d] %s\n", - level_names[level], filename, line, message.c_str()); - fflush(stderr); // Needed on MSVC. -} - -void NullLogHandler(LogLevel level, const char* filename, int line, - const string& message) { - // Nothing. -} - -static LogHandler* log_handler_ = &DefaultLogHandler; -static int log_silencer_count_ = 0; - -static Mutex* log_silencer_count_mutex_ = NULL; -GOOGLE_PROTOBUF_DECLARE_ONCE(log_silencer_count_init_); - -void DeleteLogSilencerCount() { - delete log_silencer_count_mutex_; - log_silencer_count_mutex_ = NULL; -} -void InitLogSilencerCount() { - log_silencer_count_mutex_ = new Mutex; - OnShutdown(&DeleteLogSilencerCount); -} -void InitLogSilencerCountOnce() { - GoogleOnceInit(&log_silencer_count_init_, &InitLogSilencerCount); -} - -LogMessage& LogMessage::operator<<(const string& value) { - message_ += value; - return *this; -} - -LogMessage& LogMessage::operator<<(const char* value) { - message_ += value; - return *this; -} - -// Since this is just for logging, we don't care if the current locale changes -// the results -- in fact, we probably prefer that. So we use snprintf() -// instead of Simple*toa(). -#undef DECLARE_STREAM_OPERATOR -#define DECLARE_STREAM_OPERATOR(TYPE, FORMAT) \ - LogMessage& LogMessage::operator<<(TYPE value) { \ - /* 128 bytes should be big enough for any of the primitive */ \ - /* values which we print with this, but well use snprintf() */ \ - /* anyway to be extra safe. */ \ - char buffer[128]; \ - snprintf(buffer, sizeof(buffer), FORMAT, value); \ - /* Guard against broken MSVC snprintf(). */ \ - buffer[sizeof(buffer)-1] = '\0'; \ - message_ += buffer; \ - return *this; \ - } - -DECLARE_STREAM_OPERATOR(char , "%c" ) -DECLARE_STREAM_OPERATOR(int , "%d" ) -DECLARE_STREAM_OPERATOR(uint , "%u" ) -DECLARE_STREAM_OPERATOR(long , "%ld") -DECLARE_STREAM_OPERATOR(unsigned long, "%lu") -DECLARE_STREAM_OPERATOR(double , "%g" ) -#undef DECLARE_STREAM_OPERATOR - -LogMessage::LogMessage(LogLevel level, const char* filename, int line) - : level_(level), filename_(filename), line_(line) {} -LogMessage::~LogMessage() {} - -void LogMessage::Finish() { - bool suppress = false; - - if (level_ != LOGLEVEL_FATAL) { - InitLogSilencerCountOnce(); - MutexLock lock(log_silencer_count_mutex_); - suppress = internal::log_silencer_count_ > 0; - } - - if (!suppress) { - internal::log_handler_(level_, filename_, line_, message_); - } - - if (level_ == LOGLEVEL_FATAL) { -#ifdef PROTOBUF_USE_EXCEPTIONS - throw FatalException(filename_, line_, message_); -#else - abort(); -#endif - } -} - -void LogFinisher::operator=(LogMessage& other) { - other.Finish(); -} - -} // namespace internal - -LogHandler* SetLogHandler(LogHandler* new_func) { - LogHandler* old = internal::log_handler_; - if (old == &internal::NullLogHandler) { - old = NULL; - } - if (new_func == NULL) { - internal::log_handler_ = &internal::NullLogHandler; - } else { - internal::log_handler_ = new_func; - } - return old; -} - -LogSilencer::LogSilencer() { - internal::InitLogSilencerCountOnce(); - MutexLock lock(internal::log_silencer_count_mutex_); - ++internal::log_silencer_count_; -}; - -LogSilencer::~LogSilencer() { - internal::InitLogSilencerCountOnce(); - MutexLock lock(internal::log_silencer_count_mutex_); - --internal::log_silencer_count_; -}; - -// =================================================================== -// emulates google3/base/callback.cc - -Closure::~Closure() {} - -namespace internal { FunctionClosure0::~FunctionClosure0() {} } - -void DoNothing() {} - -// =================================================================== -// emulates google3/base/mutex.cc - -#ifdef _WIN32 - -struct Mutex::Internal { - CRITICAL_SECTION mutex; -#ifndef NDEBUG - // Used only to implement AssertHeld(). - DWORD thread_id; -#endif -}; - -Mutex::Mutex() - : mInternal(new Internal) { - InitializeCriticalSection(&mInternal->mutex); -} - -Mutex::~Mutex() { - DeleteCriticalSection(&mInternal->mutex); - delete mInternal; -} - -void Mutex::Lock() { - EnterCriticalSection(&mInternal->mutex); -#ifndef NDEBUG - mInternal->thread_id = GetCurrentThreadId(); -#endif -} - -void Mutex::Unlock() { -#ifndef NDEBUG - mInternal->thread_id = 0; -#endif - LeaveCriticalSection(&mInternal->mutex); -} - -void Mutex::AssertHeld() { -#ifndef NDEBUG - GOOGLE_DCHECK_EQ(mInternal->thread_id, GetCurrentThreadId()); -#endif -} - -#elif defined(HAVE_PTHREAD) - -struct Mutex::Internal { - pthread_mutex_t mutex; -}; - -Mutex::Mutex() - : mInternal(new Internal) { - pthread_mutex_init(&mInternal->mutex, NULL); -} - -Mutex::~Mutex() { - pthread_mutex_destroy(&mInternal->mutex); - delete mInternal; -} - -void Mutex::Lock() { - int result = pthread_mutex_lock(&mInternal->mutex); - if (result != 0) { - GOOGLE_LOG(FATAL) << "pthread_mutex_lock: " << strerror(result); - } -} - -void Mutex::Unlock() { - int result = pthread_mutex_unlock(&mInternal->mutex); - if (result != 0) { - GOOGLE_LOG(FATAL) << "pthread_mutex_unlock: " << strerror(result); - } -} - -void Mutex::AssertHeld() { - // pthreads dosn't provide a way to check which thread holds the mutex. - // TODO(kenton): Maybe keep track of locking thread ID like with WIN32? -} - -#endif - -// =================================================================== -// Shutdown support. - -namespace internal { - -typedef void OnShutdownFunc(); -vector* shutdown_functions = NULL; -Mutex* shutdown_functions_mutex = NULL; -GOOGLE_PROTOBUF_DECLARE_ONCE(shutdown_functions_init); - -void InitShutdownFunctions() { - shutdown_functions = new vector; - shutdown_functions_mutex = new Mutex; -} - -inline void InitShutdownFunctionsOnce() { - GoogleOnceInit(&shutdown_functions_init, &InitShutdownFunctions); -} - -void OnShutdown(void (*func)()) { - InitShutdownFunctionsOnce(); - MutexLock lock(shutdown_functions_mutex); - shutdown_functions->push_back(func); -} - -} // namespace internal - -void ShutdownProtobufLibrary() { - internal::InitShutdownFunctionsOnce(); - - // We don't need to lock shutdown_functions_mutex because it's up to the - // caller to make sure that no one is using the library before this is - // called. - - // Make it safe to call this multiple times. - if (internal::shutdown_functions == NULL) return; - - for (int i = 0; i < internal::shutdown_functions->size(); i++) { - internal::shutdown_functions->at(i)(); - } - delete internal::shutdown_functions; - internal::shutdown_functions = NULL; - delete internal::shutdown_functions_mutex; - internal::shutdown_functions_mutex = NULL; -} - -#ifdef PROTOBUF_USE_EXCEPTIONS -FatalException::~FatalException() throw() {} - -const char* FatalException::what() const throw() { - return message_.c_str(); -} -#endif - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.h deleted file mode 100644 index 7173a84d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common.h +++ /dev/null @@ -1,1211 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) and others -// -// Contains basic types and utilities used by the rest of the library. - -#ifndef GOOGLE_PROTOBUF_COMMON_H__ -#define GOOGLE_PROTOBUF_COMMON_H__ - -#include -#include -#include -#include -#include -#if defined(__osf__) -// Tru64 lacks stdint.h, but has inttypes.h which defines a superset of -// what stdint.h would define. -#include -#elif !defined(_MSC_VER) -#include -#endif - -#if defined(_MSC_VER) && defined(_CPPUNWIND) - #define PROTOBUF_USE_EXCEPTIONS -#elif defined(__EXCEPTIONS) - #define PROTOBUF_USE_EXCEPTIONS -#endif -#ifdef PROTOBUF_USE_EXCEPTIONS -#include -#endif - -#if defined(_WIN32) && defined(GetMessage) -// Allow GetMessage to be used as a valid method name in protobuf classes. -// windows.h defines GetMessage() as a macro. Let's re-define it as an inline -// function. The inline function should be equivalent for C++ users. -inline BOOL GetMessage_Win32( - LPMSG lpMsg, HWND hWnd, - UINT wMsgFilterMin, UINT wMsgFilterMax) { - return GetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); -} -#undef GetMessage -inline BOOL GetMessage( - LPMSG lpMsg, HWND hWnd, - UINT wMsgFilterMin, UINT wMsgFilterMax) { - return GetMessage_Win32(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); -} -#endif - - -namespace std {} - -namespace google { -namespace protobuf { - -#undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS -#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \ - TypeName(const TypeName&); \ - void operator=(const TypeName&) - -#if defined(_MSC_VER) && defined(PROTOBUF_USE_DLLS) - #ifdef LIBPROTOBUF_EXPORTS - #define LIBPROTOBUF_EXPORT __declspec(dllexport) - #else - #define LIBPROTOBUF_EXPORT __declspec(dllimport) - #endif - #ifdef LIBPROTOC_EXPORTS - #define LIBPROTOC_EXPORT __declspec(dllexport) - #else - #define LIBPROTOC_EXPORT __declspec(dllimport) - #endif -#else - #define LIBPROTOBUF_EXPORT - #define LIBPROTOC_EXPORT -#endif - -namespace internal { - -// Some of these constants are macros rather than const ints so that they can -// be used in #if directives. - -// The current version, represented as a single integer to make comparison -// easier: major * 10^6 + minor * 10^3 + micro -#define GOOGLE_PROTOBUF_VERSION 2004001 - -// The minimum library version which works with the current version of the -// headers. -#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2004000 - -// The minimum header version which works with the current version of -// the library. This constant should only be used by protoc's C++ code -// generator. -static const int kMinHeaderVersionForLibrary = 2004000; - -// The minimum protoc version which works with the current version of the -// headers. -#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2004000 - -// The minimum header version which works with the current version of -// protoc. This constant should only be used in VerifyVersion(). -static const int kMinHeaderVersionForProtoc = 2004000; - -// Verifies that the headers and libraries are compatible. Use the macro -// below to call this. -void LIBPROTOBUF_EXPORT VerifyVersion(int headerVersion, int minLibraryVersion, - const char* filename); - -// Converts a numeric version number to a string. -std::string LIBPROTOBUF_EXPORT VersionString(int version); - -} // namespace internal - -// Place this macro in your main() function (or somewhere before you attempt -// to use the protobuf library) to verify that the version you link against -// matches the headers you compiled against. If a version mismatch is -// detected, the process will abort. -#define GOOGLE_PROTOBUF_VERIFY_VERSION \ - ::google::protobuf::internal::VerifyVersion( \ - GOOGLE_PROTOBUF_VERSION, GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION, \ - __FILE__) - -// =================================================================== -// from google3/base/port.h - -typedef unsigned int uint; - -#ifdef _MSC_VER -typedef __int8 int8; -typedef __int16 int16; -typedef __int32 int32; -typedef __int64 int64; - -typedef unsigned __int8 uint8; -typedef unsigned __int16 uint16; -typedef unsigned __int32 uint32; -typedef unsigned __int64 uint64; -#else -typedef int8_t int8; -typedef int16_t int16; -typedef int32_t int32; -typedef int64_t int64; - -typedef uint8_t uint8; -typedef uint16_t uint16; -typedef uint32_t uint32; -typedef uint64_t uint64; -#endif - -// long long macros to be used because gcc and vc++ use different suffixes, -// and different size specifiers in format strings -#undef GOOGLE_LONGLONG -#undef GOOGLE_ULONGLONG -#undef GOOGLE_LL_FORMAT - -#ifdef _MSC_VER -#define GOOGLE_LONGLONG(x) x##I64 -#define GOOGLE_ULONGLONG(x) x##UI64 -#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...) -#else -#define GOOGLE_LONGLONG(x) x##LL -#define GOOGLE_ULONGLONG(x) x##ULL -#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also. -#endif - -static const int32 kint32max = 0x7FFFFFFF; -static const int32 kint32min = -kint32max - 1; -static const int64 kint64max = GOOGLE_LONGLONG(0x7FFFFFFFFFFFFFFF); -static const int64 kint64min = -kint64max - 1; -static const uint32 kuint32max = 0xFFFFFFFFu; -static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF); - -// ------------------------------------------------------------------- -// Annotations: Some parts of the code have been annotated in ways that might -// be useful to some compilers or tools, but are not supported universally. -// You can #define these annotations yourself if the default implementation -// is not right for you. - -#ifndef GOOGLE_ATTRIBUTE_ALWAYS_INLINE -#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) -// For functions we want to force inline. -// Introduced in gcc 3.1. -#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline)) -#else -// Other compilers will have to figure it out for themselves. -#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE -#endif -#endif - -#ifndef GOOGLE_ATTRIBUTE_DEPRECATED -#ifdef __GNUC__ -// If the method/variable/type is used anywhere, produce a warning. -#define GOOGLE_ATTRIBUTE_DEPRECATED __attribute__((deprecated)) -#else -#define GOOGLE_ATTRIBUTE_DEPRECATED -#endif -#endif - -#ifndef GOOGLE_PREDICT_TRUE -#ifdef __GNUC__ -// Provided at least since GCC 3.0. -#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1)) -#else -#define GOOGLE_PREDICT_TRUE -#endif -#endif - -// Delimits a block of code which may write to memory which is simultaneously -// written by other threads, but which has been determined to be thread-safe -// (e.g. because it is an idempotent write). -#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN -#define GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN() -#endif -#ifndef GOOGLE_SAFE_CONCURRENT_WRITES_END -#define GOOGLE_SAFE_CONCURRENT_WRITES_END() -#endif - -// =================================================================== -// from google3/base/basictypes.h - -// The GOOGLE_ARRAYSIZE(arr) macro returns the # of elements in an array arr. -// The expression is a compile-time constant, and therefore can be -// used in defining new arrays, for example. -// -// GOOGLE_ARRAYSIZE catches a few type errors. If you see a compiler error -// -// "warning: division by zero in ..." -// -// when using GOOGLE_ARRAYSIZE, you are (wrongfully) giving it a pointer. -// You should only use GOOGLE_ARRAYSIZE on statically allocated arrays. -// -// The following comments are on the implementation details, and can -// be ignored by the users. -// -// ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in -// the array) and sizeof(*(arr)) (the # of bytes in one array -// element). If the former is divisible by the latter, perhaps arr is -// indeed an array, in which case the division result is the # of -// elements in the array. Otherwise, arr cannot possibly be an array, -// and we generate a compiler error to prevent the code from -// compiling. -// -// Since the size of bool is implementation-defined, we need to cast -// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final -// result has type size_t. -// -// This macro is not perfect as it wrongfully accepts certain -// pointers, namely where the pointer size is divisible by the pointee -// size. Since all our code has to go through a 32-bit compiler, -// where a pointer is 4 bytes, this means all pointers to a type whose -// size is 3 or greater than 4 will be (righteously) rejected. -// -// Kudos to Jorg Brown for this simple and elegant implementation. - -#undef GOOGLE_ARRAYSIZE -#define GOOGLE_ARRAYSIZE(a) \ - ((sizeof(a) / sizeof(*(a))) / \ - static_cast(!(sizeof(a) % sizeof(*(a))))) - -namespace internal { - -// Use implicit_cast as a safe version of static_cast or const_cast -// for upcasting in the type hierarchy (i.e. casting a pointer to Foo -// to a pointer to SuperclassOfFoo or casting a pointer to Foo to -// a const pointer to Foo). -// When you use implicit_cast, the compiler checks that the cast is safe. -// Such explicit implicit_casts are necessary in surprisingly many -// situations where C++ demands an exact type match instead of an -// argument type convertable to a target type. -// -// The From type can be inferred, so the preferred syntax for using -// implicit_cast is the same as for static_cast etc.: -// -// implicit_cast(expr) -// -// implicit_cast would have been part of the C++ standard library, -// but the proposal was submitted too late. It will probably make -// its way into the language in the future. -template -inline To implicit_cast(From const &f) { - return f; -} - -// When you upcast (that is, cast a pointer from type Foo to type -// SuperclassOfFoo), it's fine to use implicit_cast<>, since upcasts -// always succeed. When you downcast (that is, cast a pointer from -// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because -// how do you know the pointer is really of type SubclassOfFoo? It -// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, -// when you downcast, you should use this macro. In debug mode, we -// use dynamic_cast<> to double-check the downcast is legal (we die -// if it's not). In normal mode, we do the efficient static_cast<> -// instead. Thus, it's important to test in debug mode to make sure -// the cast is legal! -// This is the only place in the code we should use dynamic_cast<>. -// In particular, you SHOULDN'T be using dynamic_cast<> in order to -// do RTTI (eg code like this: -// if (dynamic_cast(foo)) HandleASubclass1Object(foo); -// if (dynamic_cast(foo)) HandleASubclass2Object(foo); -// You should design the code some other way not to need this. - -template // use like this: down_cast(foo); -inline To down_cast(From* f) { // so we only accept pointers - // Ensures that To is a sub-type of From *. This test is here only - // for compile-time type checking, and has no overhead in an - // optimized build at run-time, as it will be optimized away - // completely. - if (false) { - implicit_cast(0); - } - -#if !defined(NDEBUG) && !defined(GOOGLE_PROTOBUF_NO_RTTI) - assert(f == NULL || dynamic_cast(f) != NULL); // RTTI: debug mode only! -#endif - return static_cast(f); -} - -} // namespace internal - -// We made these internal so that they would show up as such in the docs, -// but we don't want to stick "internal::" in front of them everywhere. -using internal::implicit_cast; -using internal::down_cast; - -// The COMPILE_ASSERT macro can be used to verify that a compile time -// expression is true. For example, you could use it to verify the -// size of a static array: -// -// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, -// content_type_names_incorrect_size); -// -// or to make sure a struct is smaller than a certain size: -// -// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); -// -// The second argument to the macro is the name of the variable. If -// the expression is false, most compilers will issue a warning/error -// containing the name of the variable. - -namespace internal { - -template -struct CompileAssert { -}; - -} // namespace internal - -#undef GOOGLE_COMPILE_ASSERT -#define GOOGLE_COMPILE_ASSERT(expr, msg) \ - typedef ::google::protobuf::internal::CompileAssert<(bool(expr))> \ - msg[bool(expr) ? 1 : -1] - - -// Implementation details of COMPILE_ASSERT: -// -// - COMPILE_ASSERT works by defining an array type that has -1 -// elements (and thus is invalid) when the expression is false. -// -// - The simpler definition -// -// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1] -// -// does not work, as gcc supports variable-length arrays whose sizes -// are determined at run-time (this is gcc's extension and not part -// of the C++ standard). As a result, gcc fails to reject the -// following code with the simple definition: -// -// int foo; -// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is -// // not a compile-time constant. -// -// - By using the type CompileAssert<(bool(expr))>, we ensures that -// expr is a compile-time constant. (Template arguments must be -// determined at compile-time.) -// -// - The outter parentheses in CompileAssert<(bool(expr))> are necessary -// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written -// -// CompileAssert -// -// instead, these compilers will refuse to compile -// -// COMPILE_ASSERT(5 > 0, some_message); -// -// (They seem to think the ">" in "5 > 0" marks the end of the -// template argument list.) -// -// - The array size is (bool(expr) ? 1 : -1), instead of simply -// -// ((expr) ? 1 : -1). -// -// This is to avoid running into a bug in MS VC 7.1, which -// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. - -// =================================================================== -// from google3/base/scoped_ptr.h - -namespace internal { - -// This is an implementation designed to match the anticipated future TR2 -// implementation of the scoped_ptr class, and its closely-related brethren, -// scoped_array, scoped_ptr_malloc, and make_scoped_ptr. - -template class scoped_ptr; -template class scoped_array; - -// A scoped_ptr is like a T*, except that the destructor of scoped_ptr -// automatically deletes the pointer it holds (if any). -// That is, scoped_ptr owns the T object that it points to. -// Like a T*, a scoped_ptr may hold either NULL or a pointer to a T object. -// -// The size of a scoped_ptr is small: -// sizeof(scoped_ptr) == sizeof(C*) -template -class scoped_ptr { - public: - - // The element type - typedef C element_type; - - // Constructor. Defaults to intializing with NULL. - // There is no way to create an uninitialized scoped_ptr. - // The input parameter must be allocated with new. - explicit scoped_ptr(C* p = NULL) : ptr_(p) { } - - // Destructor. If there is a C object, delete it. - // We don't need to test ptr_ == NULL because C++ does that for us. - ~scoped_ptr() { - enum { type_must_be_complete = sizeof(C) }; - delete ptr_; - } - - // Reset. Deletes the current owned object, if any. - // Then takes ownership of a new object, if given. - // this->reset(this->get()) works. - void reset(C* p = NULL) { - if (p != ptr_) { - enum { type_must_be_complete = sizeof(C) }; - delete ptr_; - ptr_ = p; - } - } - - // Accessors to get the owned object. - // operator* and operator-> will assert() if there is no current object. - C& operator*() const { - assert(ptr_ != NULL); - return *ptr_; - } - C* operator->() const { - assert(ptr_ != NULL); - return ptr_; - } - C* get() const { return ptr_; } - - // Comparison operators. - // These return whether two scoped_ptr refer to the same object, not just to - // two different but equal objects. - bool operator==(C* p) const { return ptr_ == p; } - bool operator!=(C* p) const { return ptr_ != p; } - - // Swap two scoped pointers. - void swap(scoped_ptr& p2) { - C* tmp = ptr_; - ptr_ = p2.ptr_; - p2.ptr_ = tmp; - } - - // Release a pointer. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - C* release() { - C* retVal = ptr_; - ptr_ = NULL; - return retVal; - } - - private: - C* ptr_; - - // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't - // make sense, and if C2 == C, it still doesn't make sense because you should - // never have the same object owned by two different scoped_ptrs. - template bool operator==(scoped_ptr const& p2) const; - template bool operator!=(scoped_ptr const& p2) const; - - // Disallow evil constructors - scoped_ptr(const scoped_ptr&); - void operator=(const scoped_ptr&); -}; - -// scoped_array is like scoped_ptr, except that the caller must allocate -// with new [] and the destructor deletes objects with delete []. -// -// As with scoped_ptr, a scoped_array either points to an object -// or is NULL. A scoped_array owns the object that it points to. -// -// Size: sizeof(scoped_array) == sizeof(C*) -template -class scoped_array { - public: - - // The element type - typedef C element_type; - - // Constructor. Defaults to intializing with NULL. - // There is no way to create an uninitialized scoped_array. - // The input parameter must be allocated with new []. - explicit scoped_array(C* p = NULL) : array_(p) { } - - // Destructor. If there is a C object, delete it. - // We don't need to test ptr_ == NULL because C++ does that for us. - ~scoped_array() { - enum { type_must_be_complete = sizeof(C) }; - delete[] array_; - } - - // Reset. Deletes the current owned object, if any. - // Then takes ownership of a new object, if given. - // this->reset(this->get()) works. - void reset(C* p = NULL) { - if (p != array_) { - enum { type_must_be_complete = sizeof(C) }; - delete[] array_; - array_ = p; - } - } - - // Get one element of the current object. - // Will assert() if there is no current object, or index i is negative. - C& operator[](std::ptrdiff_t i) const { - assert(i >= 0); - assert(array_ != NULL); - return array_[i]; - } - - // Get a pointer to the zeroth element of the current object. - // If there is no current object, return NULL. - C* get() const { - return array_; - } - - // Comparison operators. - // These return whether two scoped_array refer to the same object, not just to - // two different but equal objects. - bool operator==(C* p) const { return array_ == p; } - bool operator!=(C* p) const { return array_ != p; } - - // Swap two scoped arrays. - void swap(scoped_array& p2) { - C* tmp = array_; - array_ = p2.array_; - p2.array_ = tmp; - } - - // Release an array. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - C* release() { - C* retVal = array_; - array_ = NULL; - return retVal; - } - - private: - C* array_; - - // Forbid comparison of different scoped_array types. - template bool operator==(scoped_array const& p2) const; - template bool operator!=(scoped_array const& p2) const; - - // Disallow evil constructors - scoped_array(const scoped_array&); - void operator=(const scoped_array&); -}; - -} // namespace internal - -// We made these internal so that they would show up as such in the docs, -// but we don't want to stick "internal::" in front of them everywhere. -using internal::scoped_ptr; -using internal::scoped_array; - -// =================================================================== -// emulates google3/base/logging.h - -enum LogLevel { - LOGLEVEL_INFO, // Informational. This is never actually used by - // libprotobuf. - LOGLEVEL_WARNING, // Warns about issues that, although not technically a - // problem now, could cause problems in the future. For - // example, a // warning will be printed when parsing a - // message that is near the message size limit. - LOGLEVEL_ERROR, // An error occurred which should never happen during - // normal use. - LOGLEVEL_FATAL, // An error occurred from which the library cannot - // recover. This usually indicates a programming error - // in the code which calls the library, especially when - // compiled in debug mode. - -#ifdef NDEBUG - LOGLEVEL_DFATAL = LOGLEVEL_ERROR -#else - LOGLEVEL_DFATAL = LOGLEVEL_FATAL -#endif -}; - -namespace internal { - -class LogFinisher; - -class LIBPROTOBUF_EXPORT LogMessage { - public: - LogMessage(LogLevel level, const char* filename, int line); - ~LogMessage(); - - LogMessage& operator<<(const std::string& value); - LogMessage& operator<<(const char* value); - LogMessage& operator<<(char value); - LogMessage& operator<<(int value); - LogMessage& operator<<(uint value); - LogMessage& operator<<(long value); - LogMessage& operator<<(unsigned long value); - LogMessage& operator<<(double value); - - private: - friend class LogFinisher; - void Finish(); - - LogLevel level_; - const char* filename_; - int line_; - std::string message_; -}; - -// Used to make the entire "LOG(BLAH) << etc." expression have a void return -// type and print a newline after each message. -class LIBPROTOBUF_EXPORT LogFinisher { - public: - void operator=(LogMessage& other); -}; - -} // namespace internal - -// Undef everything in case we're being mixed with some other Google library -// which already defined them itself. Presumably all Google libraries will -// support the same syntax for these so it should not be a big deal if they -// end up using our definitions instead. -#undef GOOGLE_LOG -#undef GOOGLE_LOG_IF - -#undef GOOGLE_CHECK -#undef GOOGLE_CHECK_EQ -#undef GOOGLE_CHECK_NE -#undef GOOGLE_CHECK_LT -#undef GOOGLE_CHECK_LE -#undef GOOGLE_CHECK_GT -#undef GOOGLE_CHECK_GE - -#undef GOOGLE_DLOG -#undef GOOGLE_DCHECK -#undef GOOGLE_DCHECK_EQ -#undef GOOGLE_DCHECK_NE -#undef GOOGLE_DCHECK_LT -#undef GOOGLE_DCHECK_LE -#undef GOOGLE_DCHECK_GT -#undef GOOGLE_DCHECK_GE - -#define GOOGLE_LOG(LEVEL) \ - ::google::protobuf::internal::LogFinisher() = \ - ::google::protobuf::internal::LogMessage( \ - ::google::protobuf::LOGLEVEL_##LEVEL, __FILE__, __LINE__) -#define GOOGLE_LOG_IF(LEVEL, CONDITION) \ - !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL) - -#define GOOGLE_CHECK(EXPRESSION) \ - GOOGLE_LOG_IF(FATAL, !(EXPRESSION)) << "CHECK failed: " #EXPRESSION ": " -#define GOOGLE_CHECK_EQ(A, B) GOOGLE_CHECK((A) == (B)) -#define GOOGLE_CHECK_NE(A, B) GOOGLE_CHECK((A) != (B)) -#define GOOGLE_CHECK_LT(A, B) GOOGLE_CHECK((A) < (B)) -#define GOOGLE_CHECK_LE(A, B) GOOGLE_CHECK((A) <= (B)) -#define GOOGLE_CHECK_GT(A, B) GOOGLE_CHECK((A) > (B)) -#define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B)) - -#ifdef NDEBUG - -#define GOOGLE_DLOG GOOGLE_LOG_IF(INFO, false) - -#define GOOGLE_DCHECK(EXPRESSION) while(false) GOOGLE_CHECK(EXPRESSION) -#define GOOGLE_DCHECK_EQ(A, B) GOOGLE_DCHECK((A) == (B)) -#define GOOGLE_DCHECK_NE(A, B) GOOGLE_DCHECK((A) != (B)) -#define GOOGLE_DCHECK_LT(A, B) GOOGLE_DCHECK((A) < (B)) -#define GOOGLE_DCHECK_LE(A, B) GOOGLE_DCHECK((A) <= (B)) -#define GOOGLE_DCHECK_GT(A, B) GOOGLE_DCHECK((A) > (B)) -#define GOOGLE_DCHECK_GE(A, B) GOOGLE_DCHECK((A) >= (B)) - -#else // NDEBUG - -#define GOOGLE_DLOG GOOGLE_LOG - -#define GOOGLE_DCHECK GOOGLE_CHECK -#define GOOGLE_DCHECK_EQ GOOGLE_CHECK_EQ -#define GOOGLE_DCHECK_NE GOOGLE_CHECK_NE -#define GOOGLE_DCHECK_LT GOOGLE_CHECK_LT -#define GOOGLE_DCHECK_LE GOOGLE_CHECK_LE -#define GOOGLE_DCHECK_GT GOOGLE_CHECK_GT -#define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE - -#endif // !NDEBUG - -typedef void LogHandler(LogLevel level, const char* filename, int line, - const std::string& message); - -// The protobuf library sometimes writes warning and error messages to -// stderr. These messages are primarily useful for developers, but may -// also help end users figure out a problem. If you would prefer that -// these messages be sent somewhere other than stderr, call SetLogHandler() -// to set your own handler. This returns the old handler. Set the handler -// to NULL to ignore log messages (but see also LogSilencer, below). -// -// Obviously, SetLogHandler is not thread-safe. You should only call it -// at initialization time, and probably not from library code. If you -// simply want to suppress log messages temporarily (e.g. because you -// have some code that tends to trigger them frequently and you know -// the warnings are not important to you), use the LogSilencer class -// below. -LIBPROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func); - -// Create a LogSilencer if you want to temporarily suppress all log -// messages. As long as any LogSilencer objects exist, non-fatal -// log messages will be discarded (the current LogHandler will *not* -// be called). Constructing a LogSilencer is thread-safe. You may -// accidentally suppress log messages occurring in another thread, but -// since messages are generally for debugging purposes only, this isn't -// a big deal. If you want to intercept log messages, use SetLogHandler(). -class LIBPROTOBUF_EXPORT LogSilencer { - public: - LogSilencer(); - ~LogSilencer(); -}; - -// =================================================================== -// emulates google3/base/callback.h - -// Abstract interface for a callback. When calling an RPC, you must provide -// a Closure to call when the procedure completes. See the Service interface -// in service.h. -// -// To automatically construct a Closure which calls a particular function or -// method with a particular set of parameters, use the NewCallback() function. -// Example: -// void FooDone(const FooResponse* response) { -// ... -// } -// -// void CallFoo() { -// ... -// // When done, call FooDone() and pass it a pointer to the response. -// Closure* callback = NewCallback(&FooDone, response); -// // Make the call. -// service->Foo(controller, request, response, callback); -// } -// -// Example that calls a method: -// class Handler { -// public: -// ... -// -// void FooDone(const FooResponse* response) { -// ... -// } -// -// void CallFoo() { -// ... -// // When done, call FooDone() and pass it a pointer to the response. -// Closure* callback = NewCallback(this, &Handler::FooDone, response); -// // Make the call. -// service->Foo(controller, request, response, callback); -// } -// }; -// -// Currently NewCallback() supports binding zero, one, or two arguments. -// -// Callbacks created with NewCallback() automatically delete themselves when -// executed. They should be used when a callback is to be called exactly -// once (usually the case with RPC callbacks). If a callback may be called -// a different number of times (including zero), create it with -// NewPermanentCallback() instead. You are then responsible for deleting the -// callback (using the "delete" keyword as normal). -// -// Note that NewCallback() is a bit touchy regarding argument types. Generally, -// the values you provide for the parameter bindings must exactly match the -// types accepted by the callback function. For example: -// void Foo(string s); -// NewCallback(&Foo, "foo"); // WON'T WORK: const char* != string -// NewCallback(&Foo, string("foo")); // WORKS -// Also note that the arguments cannot be references: -// void Foo(const string& s); -// string my_str; -// NewCallback(&Foo, my_str); // WON'T WORK: Can't use referecnes. -// However, correctly-typed pointers will work just fine. -class LIBPROTOBUF_EXPORT Closure { - public: - Closure() {} - virtual ~Closure(); - - virtual void Run() = 0; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Closure); -}; - -namespace internal { - -class LIBPROTOBUF_EXPORT FunctionClosure0 : public Closure { - public: - typedef void (*FunctionType)(); - - FunctionClosure0(FunctionType function, bool self_deleting) - : function_(function), self_deleting_(self_deleting) {} - ~FunctionClosure0(); - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - function_(); - if (needs_delete) delete this; - } - - private: - FunctionType function_; - bool self_deleting_; -}; - -template -class MethodClosure0 : public Closure { - public: - typedef void (Class::*MethodType)(); - - MethodClosure0(Class* object, MethodType method, bool self_deleting) - : object_(object), method_(method), self_deleting_(self_deleting) {} - ~MethodClosure0() {} - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - (object_->*method_)(); - if (needs_delete) delete this; - } - - private: - Class* object_; - MethodType method_; - bool self_deleting_; -}; - -template -class FunctionClosure1 : public Closure { - public: - typedef void (*FunctionType)(Arg1 arg1); - - FunctionClosure1(FunctionType function, bool self_deleting, - Arg1 arg1) - : function_(function), self_deleting_(self_deleting), - arg1_(arg1) {} - ~FunctionClosure1() {} - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - function_(arg1_); - if (needs_delete) delete this; - } - - private: - FunctionType function_; - bool self_deleting_; - Arg1 arg1_; -}; - -template -class MethodClosure1 : public Closure { - public: - typedef void (Class::*MethodType)(Arg1 arg1); - - MethodClosure1(Class* object, MethodType method, bool self_deleting, - Arg1 arg1) - : object_(object), method_(method), self_deleting_(self_deleting), - arg1_(arg1) {} - ~MethodClosure1() {} - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - (object_->*method_)(arg1_); - if (needs_delete) delete this; - } - - private: - Class* object_; - MethodType method_; - bool self_deleting_; - Arg1 arg1_; -}; - -template -class FunctionClosure2 : public Closure { - public: - typedef void (*FunctionType)(Arg1 arg1, Arg2 arg2); - - FunctionClosure2(FunctionType function, bool self_deleting, - Arg1 arg1, Arg2 arg2) - : function_(function), self_deleting_(self_deleting), - arg1_(arg1), arg2_(arg2) {} - ~FunctionClosure2() {} - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - function_(arg1_, arg2_); - if (needs_delete) delete this; - } - - private: - FunctionType function_; - bool self_deleting_; - Arg1 arg1_; - Arg2 arg2_; -}; - -template -class MethodClosure2 : public Closure { - public: - typedef void (Class::*MethodType)(Arg1 arg1, Arg2 arg2); - - MethodClosure2(Class* object, MethodType method, bool self_deleting, - Arg1 arg1, Arg2 arg2) - : object_(object), method_(method), self_deleting_(self_deleting), - arg1_(arg1), arg2_(arg2) {} - ~MethodClosure2() {} - - void Run() { - bool needs_delete = self_deleting_; // read in case callback deletes - (object_->*method_)(arg1_, arg2_); - if (needs_delete) delete this; - } - - private: - Class* object_; - MethodType method_; - bool self_deleting_; - Arg1 arg1_; - Arg2 arg2_; -}; - -} // namespace internal - -// See Closure. -inline Closure* NewCallback(void (*function)()) { - return new internal::FunctionClosure0(function, true); -} - -// See Closure. -inline Closure* NewPermanentCallback(void (*function)()) { - return new internal::FunctionClosure0(function, false); -} - -// See Closure. -template -inline Closure* NewCallback(Class* object, void (Class::*method)()) { - return new internal::MethodClosure0(object, method, true); -} - -// See Closure. -template -inline Closure* NewPermanentCallback(Class* object, void (Class::*method)()) { - return new internal::MethodClosure0(object, method, false); -} - -// See Closure. -template -inline Closure* NewCallback(void (*function)(Arg1), - Arg1 arg1) { - return new internal::FunctionClosure1(function, true, arg1); -} - -// See Closure. -template -inline Closure* NewPermanentCallback(void (*function)(Arg1), - Arg1 arg1) { - return new internal::FunctionClosure1(function, false, arg1); -} - -// See Closure. -template -inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1), - Arg1 arg1) { - return new internal::MethodClosure1(object, method, true, arg1); -} - -// See Closure. -template -inline Closure* NewPermanentCallback(Class* object, void (Class::*method)(Arg1), - Arg1 arg1) { - return new internal::MethodClosure1(object, method, false, arg1); -} - -// See Closure. -template -inline Closure* NewCallback(void (*function)(Arg1, Arg2), - Arg1 arg1, Arg2 arg2) { - return new internal::FunctionClosure2( - function, true, arg1, arg2); -} - -// See Closure. -template -inline Closure* NewPermanentCallback(void (*function)(Arg1, Arg2), - Arg1 arg1, Arg2 arg2) { - return new internal::FunctionClosure2( - function, false, arg1, arg2); -} - -// See Closure. -template -inline Closure* NewCallback(Class* object, void (Class::*method)(Arg1, Arg2), - Arg1 arg1, Arg2 arg2) { - return new internal::MethodClosure2( - object, method, true, arg1, arg2); -} - -// See Closure. -template -inline Closure* NewPermanentCallback( - Class* object, void (Class::*method)(Arg1, Arg2), - Arg1 arg1, Arg2 arg2) { - return new internal::MethodClosure2( - object, method, false, arg1, arg2); -} - -// A function which does nothing. Useful for creating no-op callbacks, e.g.: -// Closure* nothing = NewCallback(&DoNothing); -void LIBPROTOBUF_EXPORT DoNothing(); - -// =================================================================== -// emulates google3/base/mutex.h - -namespace internal { - -// A Mutex is a non-reentrant (aka non-recursive) mutex. At most one thread T -// may hold a mutex at a given time. If T attempts to Lock() the same Mutex -// while holding it, T will deadlock. -class LIBPROTOBUF_EXPORT Mutex { - public: - // Create a Mutex that is not held by anybody. - Mutex(); - - // Destructor - ~Mutex(); - - // Block if necessary until this Mutex is free, then acquire it exclusively. - void Lock(); - - // Release this Mutex. Caller must hold it exclusively. - void Unlock(); - - // Crash if this Mutex is not held exclusively by this thread. - // May fail to crash when it should; will never crash when it should not. - void AssertHeld(); - - private: - struct Internal; - Internal* mInternal; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Mutex); -}; - -// MutexLock(mu) acquires mu when constructed and releases it when destroyed. -class LIBPROTOBUF_EXPORT MutexLock { - public: - explicit MutexLock(Mutex *mu) : mu_(mu) { this->mu_->Lock(); } - ~MutexLock() { this->mu_->Unlock(); } - private: - Mutex *const mu_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLock); -}; - -// TODO(kenton): Implement these? Hard to implement portably. -typedef MutexLock ReaderMutexLock; -typedef MutexLock WriterMutexLock; - -// MutexLockMaybe is like MutexLock, but is a no-op when mu is NULL. -class LIBPROTOBUF_EXPORT MutexLockMaybe { - public: - explicit MutexLockMaybe(Mutex *mu) : - mu_(mu) { if (this->mu_ != NULL) { this->mu_->Lock(); } } - ~MutexLockMaybe() { if (this->mu_ != NULL) { this->mu_->Unlock(); } } - private: - Mutex *const mu_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MutexLockMaybe); -}; - -} // namespace internal - -// We made these internal so that they would show up as such in the docs, -// but we don't want to stick "internal::" in front of them everywhere. -using internal::Mutex; -using internal::MutexLock; -using internal::ReaderMutexLock; -using internal::WriterMutexLock; -using internal::MutexLockMaybe; - -// =================================================================== -// from google3/base/type_traits.h - -namespace internal { - -// Specified by TR1 [4.7.4] Pointer modifications. -template struct remove_pointer { typedef T type; }; -template struct remove_pointer { typedef T type; }; -template struct remove_pointer { typedef T type; }; -template struct remove_pointer { typedef T type; }; -template struct remove_pointer { - typedef T type; }; - -// =================================================================== - -// Checks if the buffer contains structurally-valid UTF-8. Implemented in -// structurally_valid.cc. -LIBPROTOBUF_EXPORT bool IsStructurallyValidUTF8(const char* buf, int len); - -} // namespace internal - -// =================================================================== -// Shutdown support. - -// Shut down the entire protocol buffers library, deleting all static-duration -// objects allocated by the library or by generated .pb.cc files. -// -// There are two reasons you might want to call this: -// * You use a draconian definition of "memory leak" in which you expect -// every single malloc() to have a corresponding free(), even for objects -// which live until program exit. -// * You are writing a dynamically-loaded library which needs to clean up -// after itself when the library is unloaded. -// -// It is safe to call this multiple times. However, it is not safe to use -// any other part of the protocol buffers library after -// ShutdownProtobufLibrary() has been called. -LIBPROTOBUF_EXPORT void ShutdownProtobufLibrary(); - -namespace internal { - -// Register a function to be called when ShutdownProtocolBuffers() is called. -LIBPROTOBUF_EXPORT void OnShutdown(void (*func)()); - -} // namespace internal - -#ifdef PROTOBUF_USE_EXCEPTIONS -class FatalException : public std::exception { - public: - FatalException(const char* filename, int line, const std::string& message) - : filename_(filename), line_(line), message_(message) {} - virtual ~FatalException() throw(); - - virtual const char* what() const throw(); - - const char* filename() const { return filename_; } - int line() const { return line_; } - const std::string& message() const { return message_; } - - private: - const char* filename_; - const int line_; - const std::string message_; -}; -#endif - -// This is at the end of the file instead of the beginning to work around a bug -// in some versions of MSVC. -using namespace std; // Don't do this at home, kids. - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_COMMON_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common_unittest.cc deleted file mode 100644 index 4109a52c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/common_unittest.cc +++ /dev/null @@ -1,357 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include -#include -#include - -#include -#include - -#include "config.h" - -namespace google { -namespace protobuf { -namespace { - -// TODO(kenton): More tests. - -#ifdef PACKAGE_VERSION // only defined when using automake, not MSVC - -TEST(VersionTest, VersionMatchesConfig) { - // Verify that the version string specified in config.h matches the one - // in common.h. The config.h version is a string which may have a suffix - // like "beta" or "rc1", so we remove that. - string version = PACKAGE_VERSION; - int pos = 0; - while (pos < version.size() && - (ascii_isdigit(version[pos]) || version[pos] == '.')) { - ++pos; - } - version.erase(pos); - - EXPECT_EQ(version, internal::VersionString(GOOGLE_PROTOBUF_VERSION)); -} - -#endif // PACKAGE_VERSION - -TEST(CommonTest, IntMinMaxConstants) { - // kint32min was declared incorrectly in the first release of protobufs. - // Ugh. - EXPECT_LT(kint32min, kint32max); - EXPECT_EQ(static_cast(kint32min), static_cast(kint32max) + 1); - EXPECT_LT(kint64min, kint64max); - EXPECT_EQ(static_cast(kint64min), static_cast(kint64max) + 1); - EXPECT_EQ(0, kuint32max + 1); - EXPECT_EQ(0, kuint64max + 1); -} - -vector captured_messages_; - -void CaptureLog(LogLevel level, const char* filename, int line, - const string& message) { - captured_messages_.push_back( - strings::Substitute("$0 $1:$2: $3", - implicit_cast(level), filename, line, message)); -} - -TEST(LoggingTest, DefaultLogging) { - CaptureTestStderr(); - int line = __LINE__; - GOOGLE_LOG(INFO ) << "A message."; - GOOGLE_LOG(WARNING) << "A warning."; - GOOGLE_LOG(ERROR ) << "An error."; - - string text = GetCapturedTestStderr(); - EXPECT_EQ( - "libprotobuf INFO "__FILE__":" + SimpleItoa(line + 1) + "] A message.\n" - "libprotobuf WARNING "__FILE__":" + SimpleItoa(line + 2) + "] A warning.\n" - "libprotobuf ERROR "__FILE__":" + SimpleItoa(line + 3) + "] An error.\n", - text); -} - -TEST(LoggingTest, NullLogging) { - LogHandler* old_handler = SetLogHandler(NULL); - - CaptureTestStderr(); - GOOGLE_LOG(INFO ) << "A message."; - GOOGLE_LOG(WARNING) << "A warning."; - GOOGLE_LOG(ERROR ) << "An error."; - - EXPECT_TRUE(SetLogHandler(old_handler) == NULL); - - string text = GetCapturedTestStderr(); - EXPECT_EQ("", text); -} - -TEST(LoggingTest, CaptureLogging) { - captured_messages_.clear(); - - LogHandler* old_handler = SetLogHandler(&CaptureLog); - - int start_line = __LINE__; - GOOGLE_LOG(ERROR) << "An error."; - GOOGLE_LOG(WARNING) << "A warning."; - - EXPECT_TRUE(SetLogHandler(old_handler) == &CaptureLog); - - ASSERT_EQ(2, captured_messages_.size()); - EXPECT_EQ( - "2 "__FILE__":" + SimpleItoa(start_line + 1) + ": An error.", - captured_messages_[0]); - EXPECT_EQ( - "1 "__FILE__":" + SimpleItoa(start_line + 2) + ": A warning.", - captured_messages_[1]); -} - -TEST(LoggingTest, SilenceLogging) { - captured_messages_.clear(); - - LogHandler* old_handler = SetLogHandler(&CaptureLog); - - int line1 = __LINE__; GOOGLE_LOG(INFO) << "Visible1"; - LogSilencer* silencer1 = new LogSilencer; - GOOGLE_LOG(INFO) << "Not visible."; - LogSilencer* silencer2 = new LogSilencer; - GOOGLE_LOG(INFO) << "Not visible."; - delete silencer1; - GOOGLE_LOG(INFO) << "Not visible."; - delete silencer2; - int line2 = __LINE__; GOOGLE_LOG(INFO) << "Visible2"; - - EXPECT_TRUE(SetLogHandler(old_handler) == &CaptureLog); - - ASSERT_EQ(2, captured_messages_.size()); - EXPECT_EQ( - "0 "__FILE__":" + SimpleItoa(line1) + ": Visible1", - captured_messages_[0]); - EXPECT_EQ( - "0 "__FILE__":" + SimpleItoa(line2) + ": Visible2", - captured_messages_[1]); -} - -class ClosureTest : public testing::Test { - public: - void SetA123Method() { a_ = 123; } - static void SetA123Function() { current_instance_->a_ = 123; } - - void SetAMethod(int a) { a_ = a; } - void SetCMethod(string c) { c_ = c; } - - static void SetAFunction(int a) { current_instance_->a_ = a; } - static void SetCFunction(string c) { current_instance_->c_ = c; } - - void SetABMethod(int a, const char* b) { a_ = a; b_ = b; } - static void SetABFunction(int a, const char* b) { - current_instance_->a_ = a; - current_instance_->b_ = b; - } - - virtual void SetUp() { - current_instance_ = this; - a_ = 0; - b_ = NULL; - c_.clear(); - permanent_closure_ = NULL; - } - - void DeleteClosureInCallback() { - delete permanent_closure_; - } - - int a_; - const char* b_; - string c_; - Closure* permanent_closure_; - - static ClosureTest* current_instance_; -}; - -ClosureTest* ClosureTest::current_instance_ = NULL; - -TEST_F(ClosureTest, TestClosureFunction0) { - Closure* closure = NewCallback(&SetA123Function); - EXPECT_NE(123, a_); - closure->Run(); - EXPECT_EQ(123, a_); -} - -TEST_F(ClosureTest, TestClosureMethod0) { - Closure* closure = NewCallback(current_instance_, - &ClosureTest::SetA123Method); - EXPECT_NE(123, a_); - closure->Run(); - EXPECT_EQ(123, a_); -} - -TEST_F(ClosureTest, TestClosureFunction1) { - Closure* closure = NewCallback(&SetAFunction, 456); - EXPECT_NE(456, a_); - closure->Run(); - EXPECT_EQ(456, a_); -} - -TEST_F(ClosureTest, TestClosureMethod1) { - Closure* closure = NewCallback(current_instance_, - &ClosureTest::SetAMethod, 456); - EXPECT_NE(456, a_); - closure->Run(); - EXPECT_EQ(456, a_); -} - -TEST_F(ClosureTest, TestClosureFunction1String) { - Closure* closure = NewCallback(&SetCFunction, string("test")); - EXPECT_NE("test", c_); - closure->Run(); - EXPECT_EQ("test", c_); -} - -TEST_F(ClosureTest, TestClosureMethod1String) { - Closure* closure = NewCallback(current_instance_, - &ClosureTest::SetCMethod, string("test")); - EXPECT_NE("test", c_); - closure->Run(); - EXPECT_EQ("test", c_); -} - -TEST_F(ClosureTest, TestClosureFunction2) { - const char* cstr = "hello"; - Closure* closure = NewCallback(&SetABFunction, 789, cstr); - EXPECT_NE(789, a_); - EXPECT_NE(cstr, b_); - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); -} - -TEST_F(ClosureTest, TestClosureMethod2) { - const char* cstr = "hello"; - Closure* closure = NewCallback(current_instance_, - &ClosureTest::SetABMethod, 789, cstr); - EXPECT_NE(789, a_); - EXPECT_NE(cstr, b_); - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); -} - -// Repeat all of the above with NewPermanentCallback() - -TEST_F(ClosureTest, TestPermanentClosureFunction0) { - Closure* closure = NewPermanentCallback(&SetA123Function); - EXPECT_NE(123, a_); - closure->Run(); - EXPECT_EQ(123, a_); - a_ = 0; - closure->Run(); - EXPECT_EQ(123, a_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureMethod0) { - Closure* closure = NewPermanentCallback(current_instance_, - &ClosureTest::SetA123Method); - EXPECT_NE(123, a_); - closure->Run(); - EXPECT_EQ(123, a_); - a_ = 0; - closure->Run(); - EXPECT_EQ(123, a_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureFunction1) { - Closure* closure = NewPermanentCallback(&SetAFunction, 456); - EXPECT_NE(456, a_); - closure->Run(); - EXPECT_EQ(456, a_); - a_ = 0; - closure->Run(); - EXPECT_EQ(456, a_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureMethod1) { - Closure* closure = NewPermanentCallback(current_instance_, - &ClosureTest::SetAMethod, 456); - EXPECT_NE(456, a_); - closure->Run(); - EXPECT_EQ(456, a_); - a_ = 0; - closure->Run(); - EXPECT_EQ(456, a_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureFunction2) { - const char* cstr = "hello"; - Closure* closure = NewPermanentCallback(&SetABFunction, 789, cstr); - EXPECT_NE(789, a_); - EXPECT_NE(cstr, b_); - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); - a_ = 0; - b_ = NULL; - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureMethod2) { - const char* cstr = "hello"; - Closure* closure = NewPermanentCallback(current_instance_, - &ClosureTest::SetABMethod, 789, cstr); - EXPECT_NE(789, a_); - EXPECT_NE(cstr, b_); - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); - a_ = 0; - b_ = NULL; - closure->Run(); - EXPECT_EQ(789, a_); - EXPECT_EQ(cstr, b_); - delete closure; -} - -TEST_F(ClosureTest, TestPermanentClosureDeleteInCallback) { - permanent_closure_ = NewPermanentCallback((ClosureTest*) this, - &ClosureTest::DeleteClosureInCallback); - permanent_closure_->Run(); -} - -} // anonymous namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/hash.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/hash.h deleted file mode 100644 index 822d6050..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/hash.h +++ /dev/null @@ -1,220 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// Deals with the fact that hash_map is not defined everywhere. - -#ifndef GOOGLE_PROTOBUF_STUBS_HASH_H__ -#define GOOGLE_PROTOBUF_STUBS_HASH_H__ - -#include -#include -#include "config.h" - -#if defined(HAVE_HASH_MAP) && defined(HAVE_HASH_SET) -#include HASH_MAP_H -#include HASH_SET_H -#else -#define MISSING_HASH -#include -#include -#endif - -namespace google { -namespace protobuf { - -#ifdef MISSING_HASH - -// This system doesn't have hash_map or hash_set. Emulate them using map and -// set. - -// Make hash be the same as less. Note that everywhere where custom -// hash functions are defined in the protobuf code, they are also defined such -// that they can be used as "less" functions, which is required by MSVC anyway. -template -struct hash { - // Dummy, just to make derivative hash functions compile. - int operator()(const Key& key) { - GOOGLE_LOG(FATAL) << "Should never be called."; - return 0; - } - - inline bool operator()(const Key& a, const Key& b) const { - return a < b; - } -}; - -// Make sure char* is compared by value. -template <> -struct hash { - // Dummy, just to make derivative hash functions compile. - int operator()(const char* key) { - GOOGLE_LOG(FATAL) << "Should never be called."; - return 0; - } - - inline bool operator()(const char* a, const char* b) const { - return strcmp(a, b) < 0; - } -}; - -template , - typename EqualKey = int > -class hash_map : public std::map { -}; - -template , - typename EqualKey = int > -class hash_set : public std::set { -}; - -#elif defined(_MSC_VER) && !defined(_STLPORT_VERSION) - -template -struct hash : public HASH_NAMESPACE::hash_compare { -}; - -// MSVC's hash_compare hashes based on the string contents but -// compares based on the string pointer. WTF? -class CstringLess { - public: - inline bool operator()(const char* a, const char* b) const { - return strcmp(a, b) < 0; - } -}; - -template <> -struct hash - : public HASH_NAMESPACE::hash_compare { -}; - -template , - typename EqualKey = int > -class hash_map : public HASH_NAMESPACE::hash_map< - Key, Data, HashFcn> { -}; - -template , - typename EqualKey = int > -class hash_set : public HASH_NAMESPACE::hash_set< - Key, HashFcn> { -}; - -#else - -template -struct hash : public HASH_NAMESPACE::hash { -}; - -template -struct hash { - inline size_t operator()(const Key* key) const { - return reinterpret_cast(key); - } -}; - -// Unlike the old SGI version, the TR1 "hash" does not special-case char*. So, -// we go ahead and provide our own implementation. -template <> -struct hash { - inline size_t operator()(const char* str) const { - size_t result = 0; - for (; *str != '\0'; str++) { - result = 5 * result + *str; - } - return result; - } -}; - -template , - typename EqualKey = std::equal_to > -class hash_map : public HASH_NAMESPACE::HASH_MAP_CLASS< - Key, Data, HashFcn, EqualKey> { -}; - -template , - typename EqualKey = std::equal_to > -class hash_set : public HASH_NAMESPACE::HASH_SET_CLASS< - Key, HashFcn, EqualKey> { -}; - -#endif - -template <> -struct hash { - inline size_t operator()(const string& key) const { - return hash()(key.c_str()); - } - - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - inline size_t operator()(const string& a, const string& b) const { - return a < b; - } -}; - -template -struct hash > { - inline size_t operator()(const pair& key) const { - size_t first_hash = hash()(key.first); - size_t second_hash = hash()(key.second); - - // FIXME(kenton): What is the best way to compute this hash? I have - // no idea! This seems a bit better than an XOR. - return first_hash * ((1 << 16) - 1) + second_hash; - } - - static const size_t bucket_size = 4; - static const size_t min_buckets = 8; - inline size_t operator()(const pair& a, - const pair& b) const { - return a < b; - } -}; - -// Used by GCC/SGI STL only. (Why isn't this provided by the standard -// library? :( ) -struct streq { - inline bool operator()(const char* a, const char* b) const { - return strcmp(a, b) == 0; - } -}; - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_HASH_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/map-util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/map-util.h deleted file mode 100644 index f5c9d6b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/map-util.h +++ /dev/null @@ -1,119 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// from google3/util/gtl/map-util.h -// Author: Anton Carver - -#ifndef GOOGLE_PROTOBUF_STUBS_MAP_UTIL_H__ -#define GOOGLE_PROTOBUF_STUBS_MAP_UTIL_H__ - -#include - -namespace google { -namespace protobuf { - -// Perform a lookup in a map or hash_map. -// If the key is present in the map then the value associated with that -// key is returned, otherwise the value passed as a default is returned. -template -const typename Collection::value_type::second_type& -FindWithDefault(const Collection& collection, - const typename Collection::value_type::first_type& key, - const typename Collection::value_type::second_type& value) { - typename Collection::const_iterator it = collection.find(key); - if (it == collection.end()) { - return value; - } - return it->second; -} - -// Perform a lookup in a map or hash_map. -// If the key is present a const pointer to the associated value is returned, -// otherwise a NULL pointer is returned. -template -const typename Collection::value_type::second_type* -FindOrNull(const Collection& collection, - const typename Collection::value_type::first_type& key) { - typename Collection::const_iterator it = collection.find(key); - if (it == collection.end()) { - return 0; - } - return &it->second; -} - -// Perform a lookup in a map or hash_map whose values are pointers. -// If the key is present a const pointer to the associated value is returned, -// otherwise a NULL pointer is returned. -// This function does not distinguish between a missing key and a key mapped -// to a NULL value. -template -const typename Collection::value_type::second_type -FindPtrOrNull(const Collection& collection, - const typename Collection::value_type::first_type& key) { - typename Collection::const_iterator it = collection.find(key); - if (it == collection.end()) { - return 0; - } - return it->second; -} - -// Change the value associated with a particular key in a map or hash_map. -// If the key is not present in the map the key and value are inserted, -// otherwise the value is updated to be a copy of the value provided. -// True indicates that an insert took place, false indicates an update. -template -bool InsertOrUpdate(Collection * const collection, - const Key& key, const Value& value) { - pair ret = - collection->insert(typename Collection::value_type(key, value)); - if (!ret.second) { - // update - ret.first->second = value; - return false; - } - return true; -} - -// Insert a new key and value into a map or hash_map. -// If the key is not present in the map the key and value are -// inserted, otherwise nothing happens. True indicates that an insert -// took place, false indicates the key was already present. -template -bool InsertIfNotPresent(Collection * const collection, - const Key& key, const Value& value) { - pair ret = - collection->insert(typename Collection::value_type(key, value)); - return ret.second; -} - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_MAP_UTIL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.cc deleted file mode 100644 index 5b7af9ce..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.cc +++ /dev/null @@ -1,88 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// emulates google3/base/once.h -// -// This header is intended to be included only by internal .cc files and -// generated .pb.cc files. Users should not use this directly. - -#ifdef _WIN32 -#include -#endif - -#include - -namespace google { -namespace protobuf { - -#ifdef _WIN32 - -struct ProtobufOnceInternal { - ProtobufOnceInternal() { - InitializeCriticalSection(&critical_section); - } - ~ProtobufOnceInternal() { - DeleteCriticalSection(&critical_section); - } - CRITICAL_SECTION critical_section; -}; - -ProtobufOnceType::~ProtobufOnceType() -{ - delete internal_; - internal_ = NULL; -} - -ProtobufOnceType::ProtobufOnceType() { - // internal_ may be non-NULL if Init() was already called. - if (internal_ == NULL) internal_ = new ProtobufOnceInternal; -} - -void ProtobufOnceType::Init(void (*init_func)()) { - // internal_ may be NULL if we're still in dynamic initialization and the - // constructor has not been called yet. As mentioned in once.h, we assume - // that the program is still single-threaded at this time, and therefore it - // should be safe to initialize internal_ like so. - if (internal_ == NULL) internal_ = new ProtobufOnceInternal; - - EnterCriticalSection(&internal_->critical_section); - if (!initialized_) { - init_func(); - initialized_ = true; - } - LeaveCriticalSection(&internal_->critical_section); -} - -#endif - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.h deleted file mode 100644 index 0dee4076..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once.h +++ /dev/null @@ -1,123 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// emulates google3/base/once.h -// -// This header is intended to be included only by internal .cc files and -// generated .pb.cc files. Users should not use this directly. -// -// This is basically a portable version of pthread_once(). -// -// This header declares three things: -// * A type called ProtobufOnceType. -// * A macro GOOGLE_PROTOBUF_DECLARE_ONCE() which declares a variable of type -// ProtobufOnceType. This is the only legal way to declare such a variable. -// The macro may only be used at the global scope (you cannot create local -// or class member variables of this type). -// * A function GogoleOnceInit(ProtobufOnceType* once, void (*init_func)()). -// This function, when invoked multiple times given the same ProtobufOnceType -// object, will invoke init_func on the first call only, and will make sure -// none of the calls return before that first call to init_func has finished. -// -// This implements a way to perform lazy initialization. It's more efficient -// than using mutexes as no lock is needed if initialization has already -// happened. -// -// Example usage: -// void Init(); -// GOOGLE_PROTOBUF_DECLARE_ONCE(once_init); -// -// // Calls Init() exactly once. -// void InitOnce() { -// GoogleOnceInit(&once_init, &Init); -// } -// -// Note that if GoogleOnceInit() is called before main() has begun, it must -// only be called by the thread that will eventually call main() -- that is, -// the thread that performs dynamic initialization. In general this is a safe -// assumption since people don't usually construct threads before main() starts, -// but it is technically not guaranteed. Unfortunately, Win32 provides no way -// whatsoever to statically-initialize its synchronization primitives, so our -// only choice is to assume that dynamic initialization is single-threaded. - -#ifndef GOOGLE_PROTOBUF_STUBS_ONCE_H__ -#define GOOGLE_PROTOBUF_STUBS_ONCE_H__ - -#include - -#ifndef _WIN32 -#include -#endif - -namespace google { -namespace protobuf { - -#ifdef _WIN32 - -struct ProtobufOnceInternal; - -struct LIBPROTOBUF_EXPORT ProtobufOnceType { - ProtobufOnceType(); - ~ProtobufOnceType(); - void Init(void (*init_func)()); - - volatile bool initialized_; - ProtobufOnceInternal* internal_; -}; - -#define GOOGLE_PROTOBUF_DECLARE_ONCE(NAME) \ - ::google::protobuf::ProtobufOnceType NAME - -inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) { - // Note: Double-checked locking is safe on x86. - if (!once->initialized_) { - once->Init(init_func); - } -} - -#else - -typedef pthread_once_t ProtobufOnceType; - -#define GOOGLE_PROTOBUF_DECLARE_ONCE(NAME) \ - pthread_once_t NAME = PTHREAD_ONCE_INIT - -inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) { - pthread_once(once, init_func); -} - -#endif - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_ONCE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once_unittest.cc deleted file mode 100644 index b8f86a0f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/once_unittest.cc +++ /dev/null @@ -1,253 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#ifdef _WIN32 -#include -#else -#include -#include -#endif - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace { - -class OnceInitTest : public testing::Test { - protected: - void SetUp() { - state_ = INIT_NOT_STARTED; - current_test_ = this; - } - - // Since ProtobufOnceType is only allowed to be allocated in static storage, - // each test must use a different pair of ProtobufOnceType objects which it - // must declare itself. - void SetOnces(ProtobufOnceType* once, ProtobufOnceType* recursive_once) { - once_ = once; - recursive_once_ = recursive_once; - } - - void InitOnce() { - GoogleOnceInit(once_, &InitStatic); - } - void InitRecursiveOnce() { - GoogleOnceInit(recursive_once_, &InitRecursiveStatic); - } - - void BlockInit() { init_blocker_.Lock(); } - void UnblockInit() { init_blocker_.Unlock(); } - - class TestThread { - public: - TestThread(Closure* callback) - : done_(false), joined_(false), callback_(callback) { -#ifdef _WIN32 - thread_ = CreateThread(NULL, 0, &Start, this, 0, NULL); -#else - pthread_create(&thread_, NULL, &Start, this); -#endif - } - ~TestThread() { - if (!joined_) Join(); - } - - bool IsDone() { - MutexLock lock(&done_mutex_); - return done_; - } - void Join() { - joined_ = true; -#ifdef _WIN32 - WaitForSingleObject(thread_, INFINITE); - CloseHandle(thread_); -#else - pthread_join(thread_, NULL); -#endif - } - - private: -#ifdef _WIN32 - HANDLE thread_; -#else - pthread_t thread_; -#endif - - Mutex done_mutex_; - bool done_; - bool joined_; - Closure* callback_; - -#ifdef _WIN32 - static DWORD WINAPI Start(LPVOID arg) { -#else - static void* Start(void* arg) { -#endif - reinterpret_cast(arg)->Run(); - return 0; - } - - void Run() { - callback_->Run(); - MutexLock lock(&done_mutex_); - done_ = true; - } - }; - - TestThread* RunInitOnceInNewThread() { - return new TestThread(NewCallback(this, &OnceInitTest::InitOnce)); - } - TestThread* RunInitRecursiveOnceInNewThread() { - return new TestThread(NewCallback(this, &OnceInitTest::InitRecursiveOnce)); - } - - enum State { - INIT_NOT_STARTED, - INIT_STARTED, - INIT_DONE - }; - State CurrentState() { - MutexLock lock(&mutex_); - return state_; - } - - void WaitABit() { -#ifdef _WIN32 - Sleep(1000); -#else - sleep(1); -#endif - } - - private: - Mutex mutex_; - Mutex init_blocker_; - State state_; - ProtobufOnceType* once_; - ProtobufOnceType* recursive_once_; - - void Init() { - MutexLock lock(&mutex_); - EXPECT_EQ(INIT_NOT_STARTED, state_); - state_ = INIT_STARTED; - mutex_.Unlock(); - init_blocker_.Lock(); - init_blocker_.Unlock(); - mutex_.Lock(); - state_ = INIT_DONE; - } - - static OnceInitTest* current_test_; - static void InitStatic() { current_test_->Init(); } - static void InitRecursiveStatic() { current_test_->InitOnce(); } -}; - -OnceInitTest* OnceInitTest::current_test_ = NULL; - -GOOGLE_PROTOBUF_DECLARE_ONCE(simple_once); - -TEST_F(OnceInitTest, Simple) { - SetOnces(&simple_once, NULL); - - EXPECT_EQ(INIT_NOT_STARTED, CurrentState()); - InitOnce(); - EXPECT_EQ(INIT_DONE, CurrentState()); - - // Calling again has no effect. - InitOnce(); - EXPECT_EQ(INIT_DONE, CurrentState()); -} - -GOOGLE_PROTOBUF_DECLARE_ONCE(recursive_once1); -GOOGLE_PROTOBUF_DECLARE_ONCE(recursive_once2); - -TEST_F(OnceInitTest, Recursive) { - SetOnces(&recursive_once1, &recursive_once2); - - EXPECT_EQ(INIT_NOT_STARTED, CurrentState()); - InitRecursiveOnce(); - EXPECT_EQ(INIT_DONE, CurrentState()); -} - -GOOGLE_PROTOBUF_DECLARE_ONCE(multiple_threads_once); - -TEST_F(OnceInitTest, MultipleThreads) { - SetOnces(&multiple_threads_once, NULL); - - scoped_ptr threads[4]; - EXPECT_EQ(INIT_NOT_STARTED, CurrentState()); - for (int i = 0; i < 4; i++) { - threads[i].reset(RunInitOnceInNewThread()); - } - for (int i = 0; i < 4; i++) { - threads[i]->Join(); - } - EXPECT_EQ(INIT_DONE, CurrentState()); -} - -GOOGLE_PROTOBUF_DECLARE_ONCE(multiple_threads_blocked_once1); -GOOGLE_PROTOBUF_DECLARE_ONCE(multiple_threads_blocked_once2); - -TEST_F(OnceInitTest, MultipleThreadsBlocked) { - SetOnces(&multiple_threads_blocked_once1, &multiple_threads_blocked_once2); - - scoped_ptr threads[8]; - EXPECT_EQ(INIT_NOT_STARTED, CurrentState()); - - BlockInit(); - for (int i = 0; i < 4; i++) { - threads[i].reset(RunInitOnceInNewThread()); - } - for (int i = 4; i < 8; i++) { - threads[i].reset(RunInitRecursiveOnceInNewThread()); - } - - WaitABit(); - - // We should now have one thread blocked inside Init(), four blocked waiting - // for Init() to complete, and three blocked waiting for InitRecursive() to - // complete. - EXPECT_EQ(INIT_STARTED, CurrentState()); - UnblockInit(); - - for (int i = 0; i < 8; i++) { - threads[i]->Join(); - } - EXPECT_EQ(INIT_DONE, CurrentState()); -} - -} // anonymous namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/stl_util-inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/stl_util-inl.h deleted file mode 100644 index a2e671bb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/stl_util-inl.h +++ /dev/null @@ -1,121 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// from google3/util/gtl/stl_util-inl.h - -#ifndef GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__ -#define GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__ - -#include - -namespace google { -namespace protobuf { - -// STLDeleteContainerPointers() -// For a range within a container of pointers, calls delete -// (non-array version) on these pointers. -// NOTE: for these three functions, we could just implement a DeleteObject -// functor and then call for_each() on the range and functor, but this -// requires us to pull in all of algorithm.h, which seems expensive. -// For hash_[multi]set, it is important that this deletes behind the iterator -// because the hash_set may call the hash function on the iterator when it is -// advanced, which could result in the hash function trying to deference a -// stale pointer. -template -void STLDeleteContainerPointers(ForwardIterator begin, - ForwardIterator end) { - while (begin != end) { - ForwardIterator temp = begin; - ++begin; - delete *temp; - } -} - -// Inside Google, this function implements a horrible, disgusting hack in which -// we reach into the string's private implementation and resize it without -// initializing the new bytes. In some cases doing this can significantly -// improve performance. However, since it's totally non-portable it has no -// place in open source code. Feel free to fill this function in with your -// own disgusting hack if you want the perf boost. -inline void STLStringResizeUninitialized(string* s, size_t new_size) { - s->resize(new_size); -} - -// Return a mutable char* pointing to a string's internal buffer, -// which may not be null-terminated. Writing through this pointer will -// modify the string. -// -// string_as_array(&str)[i] is valid for 0 <= i < str.size() until the -// next call to a string method that invalidates iterators. -// -// As of 2006-04, there is no standard-blessed way of getting a -// mutable reference to a string's internal buffer. However, issue 530 -// (http://www.open-std.org/JTC1/SC22/WG21/docs/lwg-active.html#530) -// proposes this as the method. According to Matt Austern, this should -// already work on all current implementations. -inline char* string_as_array(string* str) { - // DO NOT USE const_cast(str->data())! See the unittest for why. - return str->empty() ? NULL : &*str->begin(); -} - -// STLDeleteElements() deletes all the elements in an STL container and clears -// the container. This function is suitable for use with a vector, set, -// hash_set, or any other STL container which defines sensible begin(), end(), -// and clear() methods. -// -// If container is NULL, this function is a no-op. -// -// As an alternative to calling STLDeleteElements() directly, consider -// ElementDeleter (defined below), which ensures that your container's elements -// are deleted when the ElementDeleter goes out of scope. -template -void STLDeleteElements(T *container) { - if (!container) return; - STLDeleteContainerPointers(container->begin(), container->end()); - container->clear(); -} - -// Given an STL container consisting of (key, value) pairs, STLDeleteValues -// deletes all the "value" components and clears the container. Does nothing -// in the case it's given a NULL pointer. - -template -void STLDeleteValues(T *v) { - if (!v) return; - for (typename T::iterator i = v->begin(); i != v->end(); ++i) { - delete i->second; - } - v->clear(); -} - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid.cc deleted file mode 100644 index 0f6afe6d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid.cc +++ /dev/null @@ -1,536 +0,0 @@ -// Copyright 2005-2008 Google Inc. All Rights Reserved. -// Author: jrm@google.com (Jim Meehan) - -#include - -namespace google { -namespace protobuf { -namespace internal { - -// These four-byte entries compactly encode how many bytes 0..255 to delete -// in making a string replacement, how many bytes to add 0..255, and the offset -// 0..64k-1 of the replacement string in remap_string. -struct RemapEntry { - uint8 delete_bytes; - uint8 add_bytes; - uint16 bytes_offset; -}; - -// Exit type codes for state tables. All but the first get stuffed into -// signed one-byte entries. The first is only generated by executable code. -// To distinguish from next-state entries, these must be contiguous and -// all <= kExitNone -typedef enum { - kExitDstSpaceFull = 239, - kExitIllegalStructure, // 240 - kExitOK, // 241 - kExitReject, // ... - kExitReplace1, - kExitReplace2, - kExitReplace3, - kExitReplace21, - kExitReplace31, - kExitReplace32, - kExitReplaceOffset1, - kExitReplaceOffset2, - kExitReplace1S0, - kExitSpecial, - kExitDoAgain, - kExitRejectAlt, - kExitNone // 255 -} ExitReason; - - -// This struct represents one entire state table. The three initialized byte -// areas are state_table, remap_base, and remap_string. state0 and state0_size -// give the byte offset and length within state_table of the initial state -- -// table lookups are expected to start and end in this state, but for -// truncated UTF-8 strings, may end in a different state. These allow a quick -// test for that condition. entry_shift is 8 for tables subscripted by a full -// byte value and 6 for space-optimized tables subscripted by only six -// significant bits in UTF-8 continuation bytes. -typedef struct { - const uint32 state0; - const uint32 state0_size; - const uint32 total_size; - const int max_expand; - const int entry_shift; - const int bytes_per_entry; - const uint32 losub; - const uint32 hiadd; - const uint8* state_table; - const RemapEntry* remap_base; - const uint8* remap_string; - const uint8* fast_state; -} UTF8StateMachineObj; - -typedef UTF8StateMachineObj UTF8ScanObj; - -#define X__ (kExitIllegalStructure) -#define RJ_ (kExitReject) -#define S1_ (kExitReplace1) -#define S2_ (kExitReplace2) -#define S3_ (kExitReplace3) -#define S21 (kExitReplace21) -#define S31 (kExitReplace31) -#define S32 (kExitReplace32) -#define T1_ (kExitReplaceOffset1) -#define T2_ (kExitReplaceOffset2) -#define S11 (kExitReplace1S0) -#define SP_ (kExitSpecial) -#define D__ (kExitDoAgain) -#define RJA (kExitRejectAlt) - -// Entire table has 9 state blocks of 256 entries each -static const unsigned int utf8acceptnonsurrogates_STATE0 = 0; // state[0] -static const unsigned int utf8acceptnonsurrogates_STATE0_SIZE = 256; // =[1] -static const unsigned int utf8acceptnonsurrogates_TOTAL_SIZE = 2304; -static const unsigned int utf8acceptnonsurrogates_MAX_EXPAND_X4 = 0; -static const unsigned int utf8acceptnonsurrogates_SHIFT = 8; -static const unsigned int utf8acceptnonsurrogates_BYTES = 1; -static const unsigned int utf8acceptnonsurrogates_LOSUB = 0x20202020; -static const unsigned int utf8acceptnonsurrogates_HIADD = 0x00000000; - -static const uint8 utf8acceptnonsurrogates[] = { -// state[0] 0x000000 Byte 1 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 3, - 4, 5, 5, 5, 6, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[1] 0x000080 Byte 2 of 2 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[2] 0x000000 Byte 2 of 3 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[3] 0x001000 Byte 2 of 3 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[4] 0x000000 Byte 2 of 4 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[5] 0x040000 Byte 2 of 4 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[6] 0x100000 Byte 2 of 4 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[7] 0x00d000 Byte 2 of 3 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -// state[8] 0x00d800 Byte 3 of 3 -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, - -RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, -RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, -RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, -RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, RJ_, - -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, X__, -}; - -// Remap base[0] = (del, add, string_offset) -static const RemapEntry utf8acceptnonsurrogates_remap_base[] = { -{0, 0, 0} }; - -// Remap string[0] -static const unsigned char utf8acceptnonsurrogates_remap_string[] = { -0 }; - -static const unsigned char utf8acceptnonsurrogates_fast[256] = { -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -}; - -static const UTF8ScanObj utf8acceptnonsurrogates_obj = { - utf8acceptnonsurrogates_STATE0, - utf8acceptnonsurrogates_STATE0_SIZE, - utf8acceptnonsurrogates_TOTAL_SIZE, - utf8acceptnonsurrogates_MAX_EXPAND_X4, - utf8acceptnonsurrogates_SHIFT, - utf8acceptnonsurrogates_BYTES, - utf8acceptnonsurrogates_LOSUB, - utf8acceptnonsurrogates_HIADD, - utf8acceptnonsurrogates, - utf8acceptnonsurrogates_remap_base, - utf8acceptnonsurrogates_remap_string, - utf8acceptnonsurrogates_fast -}; - - -#undef X__ -#undef RJ_ -#undef S1_ -#undef S2_ -#undef S3_ -#undef S21 -#undef S31 -#undef S32 -#undef T1_ -#undef T2_ -#undef S11 -#undef SP_ -#undef D__ -#undef RJA - -// Return true if current Tbl pointer is within state0 range -// Note that unsigned compare checks both ends of range simultaneously -static inline bool InStateZero(const UTF8ScanObj* st, const uint8* Tbl) { - const uint8* Tbl0 = &st->state_table[st->state0]; - return (static_cast(Tbl - Tbl0) < st->state0_size); -} - -// Scan a UTF-8 string based on state table. -// Always scan complete UTF-8 characters -// Set number of bytes scanned. Return reason for exiting -int UTF8GenericScan(const UTF8ScanObj* st, - const char * str, - int str_length, - int* bytes_consumed) { - *bytes_consumed = 0; - if (str_length == 0) return kExitOK; - - int eshift = st->entry_shift; - const uint8* isrc = reinterpret_cast(str); - const uint8* src = isrc; - const uint8* srclimit = isrc + str_length; - const uint8* srclimit8 = srclimit - 7; - const uint8* Tbl_0 = &st->state_table[st->state0]; - - DoAgain: - // Do state-table scan - int e = 0; - uint8 c; - const uint8* Tbl2 = &st->fast_state[0]; - const uint32 losub = st->losub; - const uint32 hiadd = st->hiadd; - // Check initial few bytes one at a time until 8-byte aligned - //---------------------------- - while ((((uintptr_t)src & 0x07) != 0) && - (src < srclimit) && - Tbl2[src[0]] == 0) { - src++; - } - if (((uintptr_t)src & 0x07) == 0) { - // Do fast for groups of 8 identity bytes. - // This covers a lot of 7-bit ASCII ~8x faster then the 1-byte loop, - // including slowing slightly on cr/lf/ht - //---------------------------- - while (src < srclimit8) { - uint32 s0123 = (reinterpret_cast(src))[0]; - uint32 s4567 = (reinterpret_cast(src))[1]; - src += 8; - // This is a fast range check for all bytes in [lowsub..0x80-hiadd) - uint32 temp = (s0123 - losub) | (s0123 + hiadd) | - (s4567 - losub) | (s4567 + hiadd); - if ((temp & 0x80808080) != 0) { - // We typically end up here on cr/lf/ht; src was incremented - int e0123 = (Tbl2[src[-8]] | Tbl2[src[-7]]) | - (Tbl2[src[-6]] | Tbl2[src[-5]]); - if (e0123 != 0) { - src -= 8; - break; - } // Exit on Non-interchange - e0123 = (Tbl2[src[-4]] | Tbl2[src[-3]]) | - (Tbl2[src[-2]] | Tbl2[src[-1]]); - if (e0123 != 0) { - src -= 4; - break; - } // Exit on Non-interchange - // Else OK, go around again - } - } - } - //---------------------------- - - // Byte-at-a-time scan - //---------------------------- - const uint8* Tbl = Tbl_0; - while (src < srclimit) { - c = *src; - e = Tbl[c]; - src++; - if (e >= kExitIllegalStructure) {break;} - Tbl = &Tbl_0[e << eshift]; - } - //---------------------------- - - - // Exit posibilities: - // Some exit code, !state0, back up over last char - // Some exit code, state0, back up one byte exactly - // source consumed, !state0, back up over partial char - // source consumed, state0, exit OK - // For illegal byte in state0, avoid backup up over PREVIOUS char - // For truncated last char, back up to beginning of it - - if (e >= kExitIllegalStructure) { - // Back up over exactly one byte of rejected/illegal UTF-8 character - src--; - // Back up more if needed - if (!InStateZero(st, Tbl)) { - do { - src--; - } while ((src > isrc) && ((src[0] & 0xc0) == 0x80)); - } - } else if (!InStateZero(st, Tbl)) { - // Back up over truncated UTF-8 character - e = kExitIllegalStructure; - do { - src--; - } while ((src > isrc) && ((src[0] & 0xc0) == 0x80)); - } else { - // Normal termination, source fully consumed - e = kExitOK; - } - - if (e == kExitDoAgain) { - // Loop back up to the fast scan - goto DoAgain; - } - - *bytes_consumed = src - isrc; - return e; -} - -int UTF8GenericScanFastAscii(const UTF8ScanObj* st, - const char * str, - int str_length, - int* bytes_consumed) { - *bytes_consumed = 0; - if (str_length == 0) return kExitOK; - - const uint8* isrc = reinterpret_cast(str); - const uint8* src = isrc; - const uint8* srclimit = isrc + str_length; - const uint8* srclimit8 = srclimit - 7; - int n; - int rest_consumed; - int exit_reason; - do { - // Check initial few bytes one at a time until 8-byte aligned - while ((((uintptr_t)src & 0x07) != 0) && - (src < srclimit) && (src[0] < 0x80)) { - src++; - } - if (((uintptr_t)src & 0x07) == 0) { - while ((src < srclimit8) && - (((reinterpret_cast(src)[0] | - reinterpret_cast(src)[1]) & 0x80808080) == 0)) { - src += 8; - } - } - while ((src < srclimit) && (src[0] < 0x80)) { - src++; - } - // Run state table on the rest - n = src - isrc; - exit_reason = UTF8GenericScan(st, str + n, str_length - n, &rest_consumed); - src += rest_consumed; - } while ( exit_reason == kExitDoAgain ); - - *bytes_consumed = src - isrc; - return exit_reason; -} - -// Hack: On some compilers the static tables are initialized at startup. -// We can't use them until they are initialized. However, some Protocol -// Buffer parsing happens at static init time and may try to validate -// UTF-8 strings. Since UTF-8 validation is only used for debugging -// anyway, we simply always return success if initialization hasn't -// occurred yet. -namespace { - -bool module_initialized_ = false; - -struct InitDetector { - InitDetector() { - module_initialized_ = true; - } -}; -InitDetector init_detector; - -} // namespace - -bool IsStructurallyValidUTF8(const char* buf, int len) { - if (!module_initialized_) return true; - - int bytes_consumed = 0; - UTF8GenericScanFastAscii(&utf8acceptnonsurrogates_obj, - buf, len, &bytes_consumed); - return (bytes_consumed == len); -} - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc deleted file mode 100644 index 90888885..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2008 Google Inc. All Rights Reserved. -// Author: xpeng@google.com (Peter Peng) - -#include -#include - -namespace google { -namespace protobuf { -namespace internal { -namespace { - -TEST(StructurallyValidTest, ValidUTF8String) { - // On GCC, this string can be written as: - // "abcd 1234 - \u2014\u2013\u2212" - // MSVC seems to interpret \u differently. - string valid_str("abcd 1234 - \342\200\224\342\200\223\342\210\222 - xyz789"); - EXPECT_TRUE(IsStructurallyValidUTF8(valid_str.data(), - valid_str.size())); - // Additional check for pointer alignment - for (int i = 1; i < 8; ++i) { - EXPECT_TRUE(IsStructurallyValidUTF8(valid_str.data() + i, - valid_str.size() - i)); - } -} - -TEST(StructurallyValidTest, InvalidUTF8String) { - const string invalid_str("abcd\xA0\xB0\xA0\xB0\xA0\xB0 - xyz789"); - EXPECT_FALSE(IsStructurallyValidUTF8(invalid_str.data(), - invalid_str.size())); - // Additional check for pointer alignment - for (int i = 1; i < 8; ++i) { - EXPECT_FALSE(IsStructurallyValidUTF8(invalid_str.data() + i, - invalid_str.size() - i)); - } -} - -} // namespace -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.cc deleted file mode 100644 index bb658ba8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.cc +++ /dev/null @@ -1,1166 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// from google3/strings/strutil.cc - -#include -#include -#include // FLT_DIG and DBL_DIG -#include -#include -#include -#include - -#ifdef _WIN32 -// MSVC has only _snprintf, not snprintf. -// -// MinGW has both snprintf and _snprintf, but they appear to be different -// functions. The former is buggy. When invoked like so: -// char buffer[32]; -// snprintf(buffer, 32, "%.*g\n", FLT_DIG, 1.23e10f); -// it prints "1.23000e+10". This is plainly wrong: %g should never print -// trailing zeros after the decimal point. For some reason this bug only -// occurs with some input values, not all. In any case, _snprintf does the -// right thing, so we use it. -#define snprintf _snprintf -#endif - -namespace google { -namespace protobuf { - -inline bool IsNaN(double value) { - // NaN is never equal to anything, even itself. - return value != value; -} - -// These are defined as macros on some platforms. #undef them so that we can -// redefine them. -#undef isxdigit -#undef isprint - -// The definitions of these in ctype.h change based on locale. Since our -// string manipulation is all in relation to the protocol buffer and C++ -// languages, we always want to use the C locale. So, we re-define these -// exactly as we want them. -inline bool isxdigit(char c) { - return ('0' <= c && c <= '9') || - ('a' <= c && c <= 'f') || - ('A' <= c && c <= 'F'); -} - -inline bool isprint(char c) { - return c >= 0x20 && c <= 0x7E; -} - -// ---------------------------------------------------------------------- -// StripString -// Replaces any occurrence of the character 'remove' (or the characters -// in 'remove') with the character 'replacewith'. -// ---------------------------------------------------------------------- -void StripString(string* s, const char* remove, char replacewith) { - const char * str_start = s->c_str(); - const char * str = str_start; - for (str = strpbrk(str, remove); - str != NULL; - str = strpbrk(str + 1, remove)) { - (*s)[str - str_start] = replacewith; - } -} - -// ---------------------------------------------------------------------- -// StringReplace() -// Replace the "old" pattern with the "new" pattern in a string, -// and append the result to "res". If replace_all is false, -// it only replaces the first instance of "old." -// ---------------------------------------------------------------------- - -void StringReplace(const string& s, const string& oldsub, - const string& newsub, bool replace_all, - string* res) { - if (oldsub.empty()) { - res->append(s); // if empty, append the given string. - return; - } - - string::size_type start_pos = 0; - string::size_type pos; - do { - pos = s.find(oldsub, start_pos); - if (pos == string::npos) { - break; - } - res->append(s, start_pos, pos - start_pos); - res->append(newsub); - start_pos = pos + oldsub.size(); // start searching again after the "old" - } while (replace_all); - res->append(s, start_pos, s.length() - start_pos); -} - -// ---------------------------------------------------------------------- -// StringReplace() -// Give me a string and two patterns "old" and "new", and I replace -// the first instance of "old" in the string with "new", if it -// exists. If "global" is true; call this repeatedly until it -// fails. RETURN a new string, regardless of whether the replacement -// happened or not. -// ---------------------------------------------------------------------- - -string StringReplace(const string& s, const string& oldsub, - const string& newsub, bool replace_all) { - string ret; - StringReplace(s, oldsub, newsub, replace_all, &ret); - return ret; -} - -// ---------------------------------------------------------------------- -// SplitStringUsing() -// Split a string using a character delimiter. Append the components -// to 'result'. -// -// Note: For multi-character delimiters, this routine will split on *ANY* of -// the characters in the string, not the entire string as a single delimiter. -// ---------------------------------------------------------------------- -template -static inline -void SplitStringToIteratorUsing(const string& full, - const char* delim, - ITR& result) { - // Optimize the common case where delim is a single character. - if (delim[0] != '\0' && delim[1] == '\0') { - char c = delim[0]; - const char* p = full.data(); - const char* end = p + full.size(); - while (p != end) { - if (*p == c) { - ++p; - } else { - const char* start = p; - while (++p != end && *p != c); - *result++ = string(start, p - start); - } - } - return; - } - - string::size_type begin_index, end_index; - begin_index = full.find_first_not_of(delim); - while (begin_index != string::npos) { - end_index = full.find_first_of(delim, begin_index); - if (end_index == string::npos) { - *result++ = full.substr(begin_index); - return; - } - *result++ = full.substr(begin_index, (end_index - begin_index)); - begin_index = full.find_first_not_of(delim, end_index); - } -} - -void SplitStringUsing(const string& full, - const char* delim, - vector* result) { - back_insert_iterator< vector > it(*result); - SplitStringToIteratorUsing(full, delim, it); -} - -// ---------------------------------------------------------------------- -// JoinStrings() -// This merges a vector of string components with delim inserted -// as separaters between components. -// -// ---------------------------------------------------------------------- -template -static void JoinStringsIterator(const ITERATOR& start, - const ITERATOR& end, - const char* delim, - string* result) { - GOOGLE_CHECK(result != NULL); - result->clear(); - int delim_length = strlen(delim); - - // Precompute resulting length so we can reserve() memory in one shot. - int length = 0; - for (ITERATOR iter = start; iter != end; ++iter) { - if (iter != start) { - length += delim_length; - } - length += iter->size(); - } - result->reserve(length); - - // Now combine everything. - for (ITERATOR iter = start; iter != end; ++iter) { - if (iter != start) { - result->append(delim, delim_length); - } - result->append(iter->data(), iter->size()); - } -} - -void JoinStrings(const vector& components, - const char* delim, - string * result) { - JoinStringsIterator(components.begin(), components.end(), delim, result); -} - -// ---------------------------------------------------------------------- -// UnescapeCEscapeSequences() -// This does all the unescaping that C does: \ooo, \r, \n, etc -// Returns length of resulting string. -// The implementation of \x parses any positive number of hex digits, -// but it is an error if the value requires more than 8 bits, and the -// result is truncated to 8 bits. -// -// The second call stores its errors in a supplied string vector. -// If the string vector pointer is NULL, it reports the errors with LOG(). -// ---------------------------------------------------------------------- - -#define IS_OCTAL_DIGIT(c) (((c) >= '0') && ((c) <= '7')) - -inline int hex_digit_to_int(char c) { - /* Assume ASCII. */ - assert('0' == 0x30 && 'A' == 0x41 && 'a' == 0x61); - assert(isxdigit(c)); - int x = static_cast(c); - if (x > '9') { - x += 9; - } - return x & 0xf; -} - -// Protocol buffers doesn't ever care about errors, but I don't want to remove -// the code. -#define LOG_STRING(LEVEL, VECTOR) GOOGLE_LOG_IF(LEVEL, false) - -int UnescapeCEscapeSequences(const char* source, char* dest) { - return UnescapeCEscapeSequences(source, dest, NULL); -} - -int UnescapeCEscapeSequences(const char* source, char* dest, - vector *errors) { - GOOGLE_DCHECK(errors == NULL) << "Error reporting not implemented."; - - char* d = dest; - const char* p = source; - - // Small optimization for case where source = dest and there's no escaping - while ( p == d && *p != '\0' && *p != '\\' ) - p++, d++; - - while (*p != '\0') { - if (*p != '\\') { - *d++ = *p++; - } else { - switch ( *++p ) { // skip past the '\\' - case '\0': - LOG_STRING(ERROR, errors) << "String cannot end with \\"; - *d = '\0'; - return d - dest; // we're done with p - case 'a': *d++ = '\a'; break; - case 'b': *d++ = '\b'; break; - case 'f': *d++ = '\f'; break; - case 'n': *d++ = '\n'; break; - case 'r': *d++ = '\r'; break; - case 't': *d++ = '\t'; break; - case 'v': *d++ = '\v'; break; - case '\\': *d++ = '\\'; break; - case '?': *d++ = '\?'; break; // \? Who knew? - case '\'': *d++ = '\''; break; - case '"': *d++ = '\"'; break; - case '0': case '1': case '2': case '3': // octal digit: 1 to 3 digits - case '4': case '5': case '6': case '7': { - char ch = *p - '0'; - if ( IS_OCTAL_DIGIT(p[1]) ) - ch = ch * 8 + *++p - '0'; - if ( IS_OCTAL_DIGIT(p[1]) ) // safe (and easy) to do this twice - ch = ch * 8 + *++p - '0'; // now points at last digit - *d++ = ch; - break; - } - case 'x': case 'X': { - if (!isxdigit(p[1])) { - if (p[1] == '\0') { - LOG_STRING(ERROR, errors) << "String cannot end with \\x"; - } else { - LOG_STRING(ERROR, errors) << - "\\x cannot be followed by non-hex digit: \\" << *p << p[1]; - } - break; - } - unsigned int ch = 0; - const char *hex_start = p; - while (isxdigit(p[1])) // arbitrarily many hex digits - ch = (ch << 4) + hex_digit_to_int(*++p); - if (ch > 0xFF) - LOG_STRING(ERROR, errors) << "Value of " << - "\\" << string(hex_start, p+1-hex_start) << " exceeds 8 bits"; - *d++ = ch; - break; - } -#if 0 // TODO(kenton): Support \u and \U? Requires runetochar(). - case 'u': { - // \uhhhh => convert 4 hex digits to UTF-8 - char32 rune = 0; - const char *hex_start = p; - for (int i = 0; i < 4; ++i) { - if (isxdigit(p[1])) { // Look one char ahead. - rune = (rune << 4) + hex_digit_to_int(*++p); // Advance p. - } else { - LOG_STRING(ERROR, errors) - << "\\u must be followed by 4 hex digits: \\" - << string(hex_start, p+1-hex_start); - break; - } - } - d += runetochar(d, &rune); - break; - } - case 'U': { - // \Uhhhhhhhh => convert 8 hex digits to UTF-8 - char32 rune = 0; - const char *hex_start = p; - for (int i = 0; i < 8; ++i) { - if (isxdigit(p[1])) { // Look one char ahead. - // Don't change rune until we're sure this - // is within the Unicode limit, but do advance p. - char32 newrune = (rune << 4) + hex_digit_to_int(*++p); - if (newrune > 0x10FFFF) { - LOG_STRING(ERROR, errors) - << "Value of \\" - << string(hex_start, p + 1 - hex_start) - << " exceeds Unicode limit (0x10FFFF)"; - break; - } else { - rune = newrune; - } - } else { - LOG_STRING(ERROR, errors) - << "\\U must be followed by 8 hex digits: \\" - << string(hex_start, p+1-hex_start); - break; - } - } - d += runetochar(d, &rune); - break; - } -#endif - default: - LOG_STRING(ERROR, errors) << "Unknown escape sequence: \\" << *p; - } - p++; // read past letter we escaped - } - } - *d = '\0'; - return d - dest; -} - -// ---------------------------------------------------------------------- -// UnescapeCEscapeString() -// This does the same thing as UnescapeCEscapeSequences, but creates -// a new string. The caller does not need to worry about allocating -// a dest buffer. This should be used for non performance critical -// tasks such as printing debug messages. It is safe for src and dest -// to be the same. -// -// The second call stores its errors in a supplied string vector. -// If the string vector pointer is NULL, it reports the errors with LOG(). -// -// In the first and second calls, the length of dest is returned. In the -// the third call, the new string is returned. -// ---------------------------------------------------------------------- -int UnescapeCEscapeString(const string& src, string* dest) { - return UnescapeCEscapeString(src, dest, NULL); -} - -int UnescapeCEscapeString(const string& src, string* dest, - vector *errors) { - scoped_array unescaped(new char[src.size() + 1]); - int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), errors); - GOOGLE_CHECK(dest); - dest->assign(unescaped.get(), len); - return len; -} - -string UnescapeCEscapeString(const string& src) { - scoped_array unescaped(new char[src.size() + 1]); - int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), NULL); - return string(unescaped.get(), len); -} - -// ---------------------------------------------------------------------- -// CEscapeString() -// CHexEscapeString() -// Copies 'src' to 'dest', escaping dangerous characters using -// C-style escape sequences. This is very useful for preparing query -// flags. 'src' and 'dest' should not overlap. The 'Hex' version uses -// hexadecimal rather than octal sequences. -// Returns the number of bytes written to 'dest' (not including the \0) -// or -1 if there was insufficient space. -// -// Currently only \n, \r, \t, ", ', \ and !isprint() chars are escaped. -// ---------------------------------------------------------------------- -int CEscapeInternal(const char* src, int src_len, char* dest, - int dest_len, bool use_hex, bool utf8_safe) { - const char* src_end = src + src_len; - int used = 0; - bool last_hex_escape = false; // true if last output char was \xNN - - for (; src < src_end; src++) { - if (dest_len - used < 2) // Need space for two letter escape - return -1; - - bool is_hex_escape = false; - switch (*src) { - case '\n': dest[used++] = '\\'; dest[used++] = 'n'; break; - case '\r': dest[used++] = '\\'; dest[used++] = 'r'; break; - case '\t': dest[used++] = '\\'; dest[used++] = 't'; break; - case '\"': dest[used++] = '\\'; dest[used++] = '\"'; break; - case '\'': dest[used++] = '\\'; dest[used++] = '\''; break; - case '\\': dest[used++] = '\\'; dest[used++] = '\\'; break; - default: - // Note that if we emit \xNN and the src character after that is a hex - // digit then that digit must be escaped too to prevent it being - // interpreted as part of the character code by C. - if ((!utf8_safe || static_cast(*src) < 0x80) && - (!isprint(*src) || - (last_hex_escape && isxdigit(*src)))) { - if (dest_len - used < 4) // need space for 4 letter escape - return -1; - sprintf(dest + used, (use_hex ? "\\x%02x" : "\\%03o"), - static_cast(*src)); - is_hex_escape = use_hex; - used += 4; - } else { - dest[used++] = *src; break; - } - } - last_hex_escape = is_hex_escape; - } - - if (dest_len - used < 1) // make sure that there is room for \0 - return -1; - - dest[used] = '\0'; // doesn't count towards return value though - return used; -} - -int CEscapeString(const char* src, int src_len, char* dest, int dest_len) { - return CEscapeInternal(src, src_len, dest, dest_len, false, false); -} - -// ---------------------------------------------------------------------- -// CEscape() -// CHexEscape() -// Copies 'src' to result, escaping dangerous characters using -// C-style escape sequences. This is very useful for preparing query -// flags. 'src' and 'dest' should not overlap. The 'Hex' version -// hexadecimal rather than octal sequences. -// -// Currently only \n, \r, \t, ", ', \ and !isprint() chars are escaped. -// ---------------------------------------------------------------------- -string CEscape(const string& src) { - const int dest_length = src.size() * 4 + 1; // Maximum possible expansion - scoped_array dest(new char[dest_length]); - const int len = CEscapeInternal(src.data(), src.size(), - dest.get(), dest_length, false, false); - GOOGLE_DCHECK_GE(len, 0); - return string(dest.get(), len); -} - -namespace strings { - -string Utf8SafeCEscape(const string& src) { - const int dest_length = src.size() * 4 + 1; // Maximum possible expansion - scoped_array dest(new char[dest_length]); - const int len = CEscapeInternal(src.data(), src.size(), - dest.get(), dest_length, false, true); - GOOGLE_DCHECK_GE(len, 0); - return string(dest.get(), len); -} - -string CHexEscape(const string& src) { - const int dest_length = src.size() * 4 + 1; // Maximum possible expansion - scoped_array dest(new char[dest_length]); - const int len = CEscapeInternal(src.data(), src.size(), - dest.get(), dest_length, true, false); - GOOGLE_DCHECK_GE(len, 0); - return string(dest.get(), len); -} - -} // namespace strings - -// ---------------------------------------------------------------------- -// strto32_adaptor() -// strtou32_adaptor() -// Implementation of strto[u]l replacements that have identical -// overflow and underflow characteristics for both ILP-32 and LP-64 -// platforms, including errno preservation in error-free calls. -// ---------------------------------------------------------------------- - -int32 strto32_adaptor(const char *nptr, char **endptr, int base) { - const int saved_errno = errno; - errno = 0; - const long result = strtol(nptr, endptr, base); - if (errno == ERANGE && result == LONG_MIN) { - return kint32min; - } else if (errno == ERANGE && result == LONG_MAX) { - return kint32max; - } else if (errno == 0 && result < kint32min) { - errno = ERANGE; - return kint32min; - } else if (errno == 0 && result > kint32max) { - errno = ERANGE; - return kint32max; - } - if (errno == 0) - errno = saved_errno; - return static_cast(result); -} - -uint32 strtou32_adaptor(const char *nptr, char **endptr, int base) { - const int saved_errno = errno; - errno = 0; - const unsigned long result = strtoul(nptr, endptr, base); - if (errno == ERANGE && result == ULONG_MAX) { - return kuint32max; - } else if (errno == 0 && result > kuint32max) { - errno = ERANGE; - return kuint32max; - } - if (errno == 0) - errno = saved_errno; - return static_cast(result); -} - -// ---------------------------------------------------------------------- -// FastIntToBuffer() -// FastInt64ToBuffer() -// FastHexToBuffer() -// FastHex64ToBuffer() -// FastHex32ToBuffer() -// ---------------------------------------------------------------------- - -// Offset into buffer where FastInt64ToBuffer places the end of string -// null character. Also used by FastInt64ToBufferLeft. -static const int kFastInt64ToBufferOffset = 21; - -char *FastInt64ToBuffer(int64 i, char* buffer) { - // We could collapse the positive and negative sections, but that - // would be slightly slower for positive numbers... - // 22 bytes is enough to store -2**64, -18446744073709551616. - char* p = buffer + kFastInt64ToBufferOffset; - *p-- = '\0'; - if (i >= 0) { - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - return p + 1; - } else { - // On different platforms, % and / have different behaviors for - // negative numbers, so we need to jump through hoops to make sure - // we don't divide negative numbers. - if (i > -10) { - i = -i; - *p-- = '0' + i; - *p = '-'; - return p; - } else { - // Make sure we aren't at MIN_INT, in which case we can't say i = -i - i = i + 10; - i = -i; - *p-- = '0' + i % 10; - // Undo what we did a moment ago - i = i / 10 + 1; - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - *p = '-'; - return p; - } - } -} - -// Offset into buffer where FastInt32ToBuffer places the end of string -// null character. Also used by FastInt32ToBufferLeft -static const int kFastInt32ToBufferOffset = 11; - -// Yes, this is a duplicate of FastInt64ToBuffer. But, we need this for the -// compiler to generate 32 bit arithmetic instructions. It's much faster, at -// least with 32 bit binaries. -char *FastInt32ToBuffer(int32 i, char* buffer) { - // We could collapse the positive and negative sections, but that - // would be slightly slower for positive numbers... - // 12 bytes is enough to store -2**32, -4294967296. - char* p = buffer + kFastInt32ToBufferOffset; - *p-- = '\0'; - if (i >= 0) { - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - return p + 1; - } else { - // On different platforms, % and / have different behaviors for - // negative numbers, so we need to jump through hoops to make sure - // we don't divide negative numbers. - if (i > -10) { - i = -i; - *p-- = '0' + i; - *p = '-'; - return p; - } else { - // Make sure we aren't at MIN_INT, in which case we can't say i = -i - i = i + 10; - i = -i; - *p-- = '0' + i % 10; - // Undo what we did a moment ago - i = i / 10 + 1; - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - *p = '-'; - return p; - } - } -} - -char *FastHexToBuffer(int i, char* buffer) { - GOOGLE_CHECK(i >= 0) << "FastHexToBuffer() wants non-negative integers, not " << i; - - static const char *hexdigits = "0123456789abcdef"; - char *p = buffer + 21; - *p-- = '\0'; - do { - *p-- = hexdigits[i & 15]; // mod by 16 - i >>= 4; // divide by 16 - } while (i > 0); - return p + 1; -} - -char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) { - static const char *hexdigits = "0123456789abcdef"; - buffer[num_byte] = '\0'; - for (int i = num_byte - 1; i >= 0; i--) { - buffer[i] = hexdigits[uint32(value) & 0xf]; - value >>= 4; - } - return buffer; -} - -char *FastHex64ToBuffer(uint64 value, char* buffer) { - return InternalFastHexToBuffer(value, buffer, 16); -} - -char *FastHex32ToBuffer(uint32 value, char* buffer) { - return InternalFastHexToBuffer(value, buffer, 8); -} - -static inline char* PlaceNum(char* p, int num, char prev_sep) { - *p-- = '0' + num % 10; - *p-- = '0' + num / 10; - *p-- = prev_sep; - return p; -} - -// ---------------------------------------------------------------------- -// FastInt32ToBufferLeft() -// FastUInt32ToBufferLeft() -// FastInt64ToBufferLeft() -// FastUInt64ToBufferLeft() -// -// Like the Fast*ToBuffer() functions above, these are intended for speed. -// Unlike the Fast*ToBuffer() functions, however, these functions write -// their output to the beginning of the buffer (hence the name, as the -// output is left-aligned). The caller is responsible for ensuring that -// the buffer has enough space to hold the output. -// -// Returns a pointer to the end of the string (i.e. the null character -// terminating the string). -// ---------------------------------------------------------------------- - -static const char two_ASCII_digits[100][2] = { - {'0','0'}, {'0','1'}, {'0','2'}, {'0','3'}, {'0','4'}, - {'0','5'}, {'0','6'}, {'0','7'}, {'0','8'}, {'0','9'}, - {'1','0'}, {'1','1'}, {'1','2'}, {'1','3'}, {'1','4'}, - {'1','5'}, {'1','6'}, {'1','7'}, {'1','8'}, {'1','9'}, - {'2','0'}, {'2','1'}, {'2','2'}, {'2','3'}, {'2','4'}, - {'2','5'}, {'2','6'}, {'2','7'}, {'2','8'}, {'2','9'}, - {'3','0'}, {'3','1'}, {'3','2'}, {'3','3'}, {'3','4'}, - {'3','5'}, {'3','6'}, {'3','7'}, {'3','8'}, {'3','9'}, - {'4','0'}, {'4','1'}, {'4','2'}, {'4','3'}, {'4','4'}, - {'4','5'}, {'4','6'}, {'4','7'}, {'4','8'}, {'4','9'}, - {'5','0'}, {'5','1'}, {'5','2'}, {'5','3'}, {'5','4'}, - {'5','5'}, {'5','6'}, {'5','7'}, {'5','8'}, {'5','9'}, - {'6','0'}, {'6','1'}, {'6','2'}, {'6','3'}, {'6','4'}, - {'6','5'}, {'6','6'}, {'6','7'}, {'6','8'}, {'6','9'}, - {'7','0'}, {'7','1'}, {'7','2'}, {'7','3'}, {'7','4'}, - {'7','5'}, {'7','6'}, {'7','7'}, {'7','8'}, {'7','9'}, - {'8','0'}, {'8','1'}, {'8','2'}, {'8','3'}, {'8','4'}, - {'8','5'}, {'8','6'}, {'8','7'}, {'8','8'}, {'8','9'}, - {'9','0'}, {'9','1'}, {'9','2'}, {'9','3'}, {'9','4'}, - {'9','5'}, {'9','6'}, {'9','7'}, {'9','8'}, {'9','9'} -}; - -char* FastUInt32ToBufferLeft(uint32 u, char* buffer) { - int digits; - const char *ASCII_digits = NULL; - // The idea of this implementation is to trim the number of divides to as few - // as possible by using multiplication and subtraction rather than mod (%), - // and by outputting two digits at a time rather than one. - // The huge-number case is first, in the hopes that the compiler will output - // that case in one branch-free block of code, and only output conditional - // branches into it from below. - if (u >= 1000000000) { // >= 1,000,000,000 - digits = u / 100000000; // 100,000,000 - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; -sublt100_000_000: - u -= digits * 100000000; // 100,000,000 -lt100_000_000: - digits = u / 1000000; // 1,000,000 - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; -sublt1_000_000: - u -= digits * 1000000; // 1,000,000 -lt1_000_000: - digits = u / 10000; // 10,000 - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; -sublt10_000: - u -= digits * 10000; // 10,000 -lt10_000: - digits = u / 100; - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; -sublt100: - u -= digits * 100; -lt100: - digits = u; - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; -done: - *buffer = 0; - return buffer; - } - - if (u < 100) { - digits = u; - if (u >= 10) goto lt100; - *buffer++ = '0' + digits; - goto done; - } - if (u < 10000) { // 10,000 - if (u >= 1000) goto lt10_000; - digits = u / 100; - *buffer++ = '0' + digits; - goto sublt100; - } - if (u < 1000000) { // 1,000,000 - if (u >= 100000) goto lt1_000_000; - digits = u / 10000; // 10,000 - *buffer++ = '0' + digits; - goto sublt10_000; - } - if (u < 100000000) { // 100,000,000 - if (u >= 10000000) goto lt100_000_000; - digits = u / 1000000; // 1,000,000 - *buffer++ = '0' + digits; - goto sublt1_000_000; - } - // we already know that u < 1,000,000,000 - digits = u / 100000000; // 100,000,000 - *buffer++ = '0' + digits; - goto sublt100_000_000; -} - -char* FastInt32ToBufferLeft(int32 i, char* buffer) { - uint32 u = i; - if (i < 0) { - *buffer++ = '-'; - u = -i; - } - return FastUInt32ToBufferLeft(u, buffer); -} - -char* FastUInt64ToBufferLeft(uint64 u64, char* buffer) { - int digits; - const char *ASCII_digits = NULL; - - uint32 u = static_cast(u64); - if (u == u64) return FastUInt32ToBufferLeft(u, buffer); - - uint64 top_11_digits = u64 / 1000000000; - buffer = FastUInt64ToBufferLeft(top_11_digits, buffer); - u = u64 - (top_11_digits * 1000000000); - - digits = u / 10000000; // 10,000,000 - GOOGLE_DCHECK_LT(digits, 100); - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; - u -= digits * 10000000; // 10,000,000 - digits = u / 100000; // 100,000 - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; - u -= digits * 100000; // 100,000 - digits = u / 1000; // 1,000 - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; - u -= digits * 1000; // 1,000 - digits = u / 10; - ASCII_digits = two_ASCII_digits[digits]; - buffer[0] = ASCII_digits[0]; - buffer[1] = ASCII_digits[1]; - buffer += 2; - u -= digits * 10; - digits = u; - *buffer++ = '0' + digits; - *buffer = 0; - return buffer; -} - -char* FastInt64ToBufferLeft(int64 i, char* buffer) { - uint64 u = i; - if (i < 0) { - *buffer++ = '-'; - u = -i; - } - return FastUInt64ToBufferLeft(u, buffer); -} - -// ---------------------------------------------------------------------- -// SimpleItoa() -// Description: converts an integer to a string. -// -// Return value: string -// ---------------------------------------------------------------------- - -string SimpleItoa(int i) { - char buffer[kFastToBufferSize]; - return (sizeof(i) == 4) ? - FastInt32ToBuffer(i, buffer) : - FastInt64ToBuffer(i, buffer); -} - -string SimpleItoa(unsigned int i) { - char buffer[kFastToBufferSize]; - return string(buffer, (sizeof(i) == 4) ? - FastUInt32ToBufferLeft(i, buffer) : - FastUInt64ToBufferLeft(i, buffer)); -} - -string SimpleItoa(long i) { - char buffer[kFastToBufferSize]; - return (sizeof(i) == 4) ? - FastInt32ToBuffer(i, buffer) : - FastInt64ToBuffer(i, buffer); -} - -string SimpleItoa(unsigned long i) { - char buffer[kFastToBufferSize]; - return string(buffer, (sizeof(i) == 4) ? - FastUInt32ToBufferLeft(i, buffer) : - FastUInt64ToBufferLeft(i, buffer)); -} - -string SimpleItoa(long long i) { - char buffer[kFastToBufferSize]; - return (sizeof(i) == 4) ? - FastInt32ToBuffer(i, buffer) : - FastInt64ToBuffer(i, buffer); -} - -string SimpleItoa(unsigned long long i) { - char buffer[kFastToBufferSize]; - return string(buffer, (sizeof(i) == 4) ? - FastUInt32ToBufferLeft(i, buffer) : - FastUInt64ToBufferLeft(i, buffer)); -} - -// ---------------------------------------------------------------------- -// SimpleDtoa() -// SimpleFtoa() -// DoubleToBuffer() -// FloatToBuffer() -// We want to print the value without losing precision, but we also do -// not want to print more digits than necessary. This turns out to be -// trickier than it sounds. Numbers like 0.2 cannot be represented -// exactly in binary. If we print 0.2 with a very large precision, -// e.g. "%.50g", we get "0.2000000000000000111022302462515654042363167". -// On the other hand, if we set the precision too low, we lose -// significant digits when printing numbers that actually need them. -// It turns out there is no precision value that does the right thing -// for all numbers. -// -// Our strategy is to first try printing with a precision that is never -// over-precise, then parse the result with strtod() to see if it -// matches. If not, we print again with a precision that will always -// give a precise result, but may use more digits than necessary. -// -// An arguably better strategy would be to use the algorithm described -// in "How to Print Floating-Point Numbers Accurately" by Steele & -// White, e.g. as implemented by David M. Gay's dtoa(). It turns out, -// however, that the following implementation is about as fast as -// DMG's code. Furthermore, DMG's code locks mutexes, which means it -// will not scale well on multi-core machines. DMG's code is slightly -// more accurate (in that it will never use more digits than -// necessary), but this is probably irrelevant for most users. -// -// Rob Pike and Ken Thompson also have an implementation of dtoa() in -// third_party/fmt/fltfmt.cc. Their implementation is similar to this -// one in that it makes guesses and then uses strtod() to check them. -// Their implementation is faster because they use their own code to -// generate the digits in the first place rather than use snprintf(), -// thus avoiding format string parsing overhead. However, this makes -// it considerably more complicated than the following implementation, -// and it is embedded in a larger library. If speed turns out to be -// an issue, we could re-implement this in terms of their -// implementation. -// ---------------------------------------------------------------------- - -string SimpleDtoa(double value) { - char buffer[kDoubleToBufferSize]; - return DoubleToBuffer(value, buffer); -} - -string SimpleFtoa(float value) { - char buffer[kFloatToBufferSize]; - return FloatToBuffer(value, buffer); -} - -static inline bool IsValidFloatChar(char c) { - return ('0' <= c && c <= '9') || - c == 'e' || c == 'E' || - c == '+' || c == '-'; -} - -void DelocalizeRadix(char* buffer) { - // Fast check: if the buffer has a normal decimal point, assume no - // translation is needed. - if (strchr(buffer, '.') != NULL) return; - - // Find the first unknown character. - while (IsValidFloatChar(*buffer)) ++buffer; - - if (*buffer == '\0') { - // No radix character found. - return; - } - - // We are now pointing at the locale-specific radix character. Replace it - // with '.'. - *buffer = '.'; - ++buffer; - - if (!IsValidFloatChar(*buffer) && *buffer != '\0') { - // It appears the radix was a multi-byte character. We need to remove the - // extra bytes. - char* target = buffer; - do { ++buffer; } while (!IsValidFloatChar(*buffer) && *buffer != '\0'); - memmove(target, buffer, strlen(buffer) + 1); - } -} - -char* DoubleToBuffer(double value, char* buffer) { - // DBL_DIG is 15 for IEEE-754 doubles, which are used on almost all - // platforms these days. Just in case some system exists where DBL_DIG - // is significantly larger -- and risks overflowing our buffer -- we have - // this assert. - GOOGLE_COMPILE_ASSERT(DBL_DIG < 20, DBL_DIG_is_too_big); - - if (value == numeric_limits::infinity()) { - strcpy(buffer, "inf"); - return buffer; - } else if (value == -numeric_limits::infinity()) { - strcpy(buffer, "-inf"); - return buffer; - } else if (IsNaN(value)) { - strcpy(buffer, "nan"); - return buffer; - } - - int snprintf_result = - snprintf(buffer, kDoubleToBufferSize, "%.*g", DBL_DIG, value); - - // The snprintf should never overflow because the buffer is significantly - // larger than the precision we asked for. - GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kDoubleToBufferSize); - - // We need to make parsed_value volatile in order to force the compiler to - // write it out to the stack. Otherwise, it may keep the value in a - // register, and if it does that, it may keep it as a long double instead - // of a double. This long double may have extra bits that make it compare - // unequal to "value" even though it would be exactly equal if it were - // truncated to a double. - volatile double parsed_value = strtod(buffer, NULL); - if (parsed_value != value) { - int snprintf_result = - snprintf(buffer, kDoubleToBufferSize, "%.*g", DBL_DIG+2, value); - - // Should never overflow; see above. - GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kDoubleToBufferSize); - } - - DelocalizeRadix(buffer); - return buffer; -} - -bool safe_strtof(const char* str, float* value) { - char* endptr; - errno = 0; // errno only gets set on errors -#if defined(_WIN32) || defined (__hpux) // has no strtof() - *value = strtod(str, &endptr); -#else - *value = strtof(str, &endptr); -#endif - return *str != 0 && *endptr == 0 && errno == 0; -} - -char* FloatToBuffer(float value, char* buffer) { - // FLT_DIG is 6 for IEEE-754 floats, which are used on almost all - // platforms these days. Just in case some system exists where FLT_DIG - // is significantly larger -- and risks overflowing our buffer -- we have - // this assert. - GOOGLE_COMPILE_ASSERT(FLT_DIG < 10, FLT_DIG_is_too_big); - - if (value == numeric_limits::infinity()) { - strcpy(buffer, "inf"); - return buffer; - } else if (value == -numeric_limits::infinity()) { - strcpy(buffer, "-inf"); - return buffer; - } else if (IsNaN(value)) { - strcpy(buffer, "nan"); - return buffer; - } - - int snprintf_result = - snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG, value); - - // The snprintf should never overflow because the buffer is significantly - // larger than the precision we asked for. - GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize); - - float parsed_value; - if (!safe_strtof(buffer, &parsed_value) || parsed_value != value) { - int snprintf_result = - snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG+2, value); - - // Should never overflow; see above. - GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize); - } - - DelocalizeRadix(buffer); - return buffer; -} - -// ---------------------------------------------------------------------- -// NoLocaleStrtod() -// This code will make you cry. -// ---------------------------------------------------------------------- - -// Returns a string identical to *input except that the character pointed to -// by radix_pos (which should be '.') is replaced with the locale-specific -// radix character. -string LocalizeRadix(const char* input, const char* radix_pos) { - // Determine the locale-specific radix character by calling sprintf() to - // print the number 1.5, then stripping off the digits. As far as I can - // tell, this is the only portable, thread-safe way to get the C library - // to divuldge the locale's radix character. No, localeconv() is NOT - // thread-safe. - char temp[16]; - int size = sprintf(temp, "%.1f", 1.5); - GOOGLE_CHECK_EQ(temp[0], '1'); - GOOGLE_CHECK_EQ(temp[size-1], '5'); - GOOGLE_CHECK_LE(size, 6); - - // Now replace the '.' in the input with it. - string result; - result.reserve(strlen(input) + size - 3); - result.append(input, radix_pos); - result.append(temp + 1, size - 2); - result.append(radix_pos + 1); - return result; -} - -double NoLocaleStrtod(const char* text, char** original_endptr) { - // We cannot simply set the locale to "C" temporarily with setlocale() - // as this is not thread-safe. Instead, we try to parse in the current - // locale first. If parsing stops at a '.' character, then this is a - // pretty good hint that we're actually in some other locale in which - // '.' is not the radix character. - - char* temp_endptr; - double result = strtod(text, &temp_endptr); - if (original_endptr != NULL) *original_endptr = temp_endptr; - if (*temp_endptr != '.') return result; - - // Parsing halted on a '.'. Perhaps we're in a different locale? Let's - // try to replace the '.' with a locale-specific radix character and - // try again. - string localized = LocalizeRadix(text, temp_endptr); - const char* localized_cstr = localized.c_str(); - char* localized_endptr; - result = strtod(localized_cstr, &localized_endptr); - if ((localized_endptr - localized_cstr) > - (temp_endptr - text)) { - // This attempt got further, so replacing the decimal must have helped. - // Update original_endptr to point at the right location. - if (original_endptr != NULL) { - // size_diff is non-zero if the localized radix has multiple bytes. - int size_diff = localized.size() - strlen(text); - // const_cast is necessary to match the strtod() interface. - *original_endptr = const_cast( - text + (localized_endptr - localized_cstr - size_diff)); - } - } - - return result; -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.h deleted file mode 100644 index 4a79c224..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil.h +++ /dev/null @@ -1,457 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// from google3/strings/strutil.h - -#ifndef GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ -#define GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - -#ifdef _MSC_VER -#define strtoll _strtoi64 -#define strtoull _strtoui64 -#elif defined(__DECCXX) && defined(__osf__) -// HP C++ on Tru64 does not have strtoll, but strtol is already 64-bit. -#define strtoll strtol -#define strtoull strtoul -#endif - -// ---------------------------------------------------------------------- -// ascii_isalnum() -// Check if an ASCII character is alphanumeric. We can't use ctype's -// isalnum() because it is affected by locale. This function is applied -// to identifiers in the protocol buffer language, not to natural-language -// strings, so locale should not be taken into account. -// ascii_isdigit() -// Like above, but only accepts digits. -// ---------------------------------------------------------------------- - -inline bool ascii_isalnum(char c) { - return ('a' <= c && c <= 'z') || - ('A' <= c && c <= 'Z') || - ('0' <= c && c <= '9'); -} - -inline bool ascii_isdigit(char c) { - return ('0' <= c && c <= '9'); -} - -// ---------------------------------------------------------------------- -// HasPrefixString() -// Check if a string begins with a given prefix. -// StripPrefixString() -// Given a string and a putative prefix, returns the string minus the -// prefix string if the prefix matches, otherwise the original -// string. -// ---------------------------------------------------------------------- -inline bool HasPrefixString(const string& str, - const string& prefix) { - return str.size() >= prefix.size() && - str.compare(0, prefix.size(), prefix) == 0; -} - -inline string StripPrefixString(const string& str, const string& prefix) { - if (HasPrefixString(str, prefix)) { - return str.substr(prefix.size()); - } else { - return str; - } -} - -// ---------------------------------------------------------------------- -// HasSuffixString() -// Return true if str ends in suffix. -// StripSuffixString() -// Given a string and a putative suffix, returns the string minus the -// suffix string if the suffix matches, otherwise the original -// string. -// ---------------------------------------------------------------------- -inline bool HasSuffixString(const string& str, - const string& suffix) { - return str.size() >= suffix.size() && - str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; -} - -inline string StripSuffixString(const string& str, const string& suffix) { - if (HasSuffixString(str, suffix)) { - return str.substr(0, str.size() - suffix.size()); - } else { - return str; - } -} - -// ---------------------------------------------------------------------- -// StripString -// Replaces any occurrence of the character 'remove' (or the characters -// in 'remove') with the character 'replacewith'. -// Good for keeping html characters or protocol characters (\t) out -// of places where they might cause a problem. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT void StripString(string* s, const char* remove, - char replacewith); - -// ---------------------------------------------------------------------- -// LowerString() -// UpperString() -// Convert the characters in "s" to lowercase or uppercase. ASCII-only: -// these functions intentionally ignore locale because they are applied to -// identifiers used in the Protocol Buffer language, not to natural-language -// strings. -// ---------------------------------------------------------------------- - -inline void LowerString(string * s) { - string::iterator end = s->end(); - for (string::iterator i = s->begin(); i != end; ++i) { - // tolower() changes based on locale. We don't want this! - if ('A' <= *i && *i <= 'Z') *i += 'a' - 'A'; - } -} - -inline void UpperString(string * s) { - string::iterator end = s->end(); - for (string::iterator i = s->begin(); i != end; ++i) { - // toupper() changes based on locale. We don't want this! - if ('a' <= *i && *i <= 'z') *i += 'A' - 'a'; - } -} - -// ---------------------------------------------------------------------- -// StringReplace() -// Give me a string and two patterns "old" and "new", and I replace -// the first instance of "old" in the string with "new", if it -// exists. RETURN a new string, regardless of whether the replacement -// happened or not. -// ---------------------------------------------------------------------- - -LIBPROTOBUF_EXPORT string StringReplace(const string& s, const string& oldsub, - const string& newsub, bool replace_all); - -// ---------------------------------------------------------------------- -// SplitStringUsing() -// Split a string using a character delimiter. Append the components -// to 'result'. If there are consecutive delimiters, this function skips -// over all of them. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT void SplitStringUsing(const string& full, const char* delim, - vector* res); - -// ---------------------------------------------------------------------- -// JoinStrings() -// These methods concatenate a vector of strings into a C++ string, using -// the C-string "delim" as a separator between components. There are two -// flavors of the function, one flavor returns the concatenated string, -// another takes a pointer to the target string. In the latter case the -// target string is cleared and overwritten. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT void JoinStrings(const vector& components, - const char* delim, string* result); - -inline string JoinStrings(const vector& components, - const char* delim) { - string result; - JoinStrings(components, delim, &result); - return result; -} - -// ---------------------------------------------------------------------- -// UnescapeCEscapeSequences() -// Copies "source" to "dest", rewriting C-style escape sequences -// -- '\n', '\r', '\\', '\ooo', etc -- to their ASCII -// equivalents. "dest" must be sufficiently large to hold all -// the characters in the rewritten string (i.e. at least as large -// as strlen(source) + 1 should be safe, since the replacements -// are always shorter than the original escaped sequences). It's -// safe for source and dest to be the same. RETURNS the length -// of dest. -// -// It allows hex sequences \xhh, or generally \xhhhhh with an -// arbitrary number of hex digits, but all of them together must -// specify a value of a single byte (e.g. \x0045 is equivalent -// to \x45, and \x1234 is erroneous). -// -// It also allows escape sequences of the form \uhhhh (exactly four -// hex digits, upper or lower case) or \Uhhhhhhhh (exactly eight -// hex digits, upper or lower case) to specify a Unicode code -// point. The dest array will contain the UTF8-encoded version of -// that code-point (e.g., if source contains \u2019, then dest will -// contain the three bytes 0xE2, 0x80, and 0x99). -// -// Errors: In the first form of the call, errors are reported with -// LOG(ERROR). The same is true for the second form of the call if -// the pointer to the string vector is NULL; otherwise, error -// messages are stored in the vector. In either case, the effect on -// the dest array is not defined, but rest of the source will be -// processed. -// ---------------------------------------------------------------------- - -LIBPROTOBUF_EXPORT int UnescapeCEscapeSequences(const char* source, char* dest); -LIBPROTOBUF_EXPORT int UnescapeCEscapeSequences(const char* source, char* dest, - vector *errors); - -// ---------------------------------------------------------------------- -// UnescapeCEscapeString() -// This does the same thing as UnescapeCEscapeSequences, but creates -// a new string. The caller does not need to worry about allocating -// a dest buffer. This should be used for non performance critical -// tasks such as printing debug messages. It is safe for src and dest -// to be the same. -// -// The second call stores its errors in a supplied string vector. -// If the string vector pointer is NULL, it reports the errors with LOG(). -// -// In the first and second calls, the length of dest is returned. In the -// the third call, the new string is returned. -// ---------------------------------------------------------------------- - -LIBPROTOBUF_EXPORT int UnescapeCEscapeString(const string& src, string* dest); -LIBPROTOBUF_EXPORT int UnescapeCEscapeString(const string& src, string* dest, - vector *errors); -LIBPROTOBUF_EXPORT string UnescapeCEscapeString(const string& src); - -// ---------------------------------------------------------------------- -// CEscapeString() -// Copies 'src' to 'dest', escaping dangerous characters using -// C-style escape sequences. This is very useful for preparing query -// flags. 'src' and 'dest' should not overlap. -// Returns the number of bytes written to 'dest' (not including the \0) -// or -1 if there was insufficient space. -// -// Currently only \n, \r, \t, ", ', \ and !isprint() chars are escaped. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT int CEscapeString(const char* src, int src_len, - char* dest, int dest_len); - -// ---------------------------------------------------------------------- -// CEscape() -// More convenient form of CEscapeString: returns result as a "string". -// This version is slower than CEscapeString() because it does more -// allocation. However, it is much more convenient to use in -// non-speed-critical code like logging messages etc. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT string CEscape(const string& src); - -namespace strings { -// Like CEscape() but does not escape bytes with the upper bit set. -LIBPROTOBUF_EXPORT string Utf8SafeCEscape(const string& src); - -// Like CEscape() but uses hex (\x) escapes instead of octals. -LIBPROTOBUF_EXPORT string CHexEscape(const string& src); -} // namespace strings - -// ---------------------------------------------------------------------- -// strto32() -// strtou32() -// strto64() -// strtou64() -// Architecture-neutral plug compatible replacements for strtol() and -// strtoul(). Long's have different lengths on ILP-32 and LP-64 -// platforms, so using these is safer, from the point of view of -// overflow behavior, than using the standard libc functions. -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT int32 strto32_adaptor(const char *nptr, char **endptr, - int base); -LIBPROTOBUF_EXPORT uint32 strtou32_adaptor(const char *nptr, char **endptr, - int base); - -inline int32 strto32(const char *nptr, char **endptr, int base) { - if (sizeof(int32) == sizeof(long)) - return strtol(nptr, endptr, base); - else - return strto32_adaptor(nptr, endptr, base); -} - -inline uint32 strtou32(const char *nptr, char **endptr, int base) { - if (sizeof(uint32) == sizeof(unsigned long)) - return strtoul(nptr, endptr, base); - else - return strtou32_adaptor(nptr, endptr, base); -} - -// For now, long long is 64-bit on all the platforms we care about, so these -// functions can simply pass the call to strto[u]ll. -inline int64 strto64(const char *nptr, char **endptr, int base) { - GOOGLE_COMPILE_ASSERT(sizeof(int64) == sizeof(long long), - sizeof_int64_is_not_sizeof_long_long); - return strtoll(nptr, endptr, base); -} - -inline uint64 strtou64(const char *nptr, char **endptr, int base) { - GOOGLE_COMPILE_ASSERT(sizeof(uint64) == sizeof(unsigned long long), - sizeof_uint64_is_not_sizeof_long_long); - return strtoull(nptr, endptr, base); -} - -// ---------------------------------------------------------------------- -// FastIntToBuffer() -// FastHexToBuffer() -// FastHex64ToBuffer() -// FastHex32ToBuffer() -// FastTimeToBuffer() -// These are intended for speed. FastIntToBuffer() assumes the -// integer is non-negative. FastHexToBuffer() puts output in -// hex rather than decimal. FastTimeToBuffer() puts the output -// into RFC822 format. -// -// FastHex64ToBuffer() puts a 64-bit unsigned value in hex-format, -// padded to exactly 16 bytes (plus one byte for '\0') -// -// FastHex32ToBuffer() puts a 32-bit unsigned value in hex-format, -// padded to exactly 8 bytes (plus one byte for '\0') -// -// All functions take the output buffer as an arg. -// They all return a pointer to the beginning of the output, -// which may not be the beginning of the input buffer. -// ---------------------------------------------------------------------- - -// Suggested buffer size for FastToBuffer functions. Also works with -// DoubleToBuffer() and FloatToBuffer(). -static const int kFastToBufferSize = 32; - -LIBPROTOBUF_EXPORT char* FastInt32ToBuffer(int32 i, char* buffer); -LIBPROTOBUF_EXPORT char* FastInt64ToBuffer(int64 i, char* buffer); -char* FastUInt32ToBuffer(uint32 i, char* buffer); // inline below -char* FastUInt64ToBuffer(uint64 i, char* buffer); // inline below -LIBPROTOBUF_EXPORT char* FastHexToBuffer(int i, char* buffer); -LIBPROTOBUF_EXPORT char* FastHex64ToBuffer(uint64 i, char* buffer); -LIBPROTOBUF_EXPORT char* FastHex32ToBuffer(uint32 i, char* buffer); - -// at least 22 bytes long -inline char* FastIntToBuffer(int i, char* buffer) { - return (sizeof(i) == 4 ? - FastInt32ToBuffer(i, buffer) : FastInt64ToBuffer(i, buffer)); -} -inline char* FastUIntToBuffer(unsigned int i, char* buffer) { - return (sizeof(i) == 4 ? - FastUInt32ToBuffer(i, buffer) : FastUInt64ToBuffer(i, buffer)); -} -inline char* FastLongToBuffer(long i, char* buffer) { - return (sizeof(i) == 4 ? - FastInt32ToBuffer(i, buffer) : FastInt64ToBuffer(i, buffer)); -} -inline char* FastULongToBuffer(unsigned long i, char* buffer) { - return (sizeof(i) == 4 ? - FastUInt32ToBuffer(i, buffer) : FastUInt64ToBuffer(i, buffer)); -} - -// ---------------------------------------------------------------------- -// FastInt32ToBufferLeft() -// FastUInt32ToBufferLeft() -// FastInt64ToBufferLeft() -// FastUInt64ToBufferLeft() -// -// Like the Fast*ToBuffer() functions above, these are intended for speed. -// Unlike the Fast*ToBuffer() functions, however, these functions write -// their output to the beginning of the buffer (hence the name, as the -// output is left-aligned). The caller is responsible for ensuring that -// the buffer has enough space to hold the output. -// -// Returns a pointer to the end of the string (i.e. the null character -// terminating the string). -// ---------------------------------------------------------------------- - -LIBPROTOBUF_EXPORT char* FastInt32ToBufferLeft(int32 i, char* buffer); -LIBPROTOBUF_EXPORT char* FastUInt32ToBufferLeft(uint32 i, char* buffer); -LIBPROTOBUF_EXPORT char* FastInt64ToBufferLeft(int64 i, char* buffer); -LIBPROTOBUF_EXPORT char* FastUInt64ToBufferLeft(uint64 i, char* buffer); - -// Just define these in terms of the above. -inline char* FastUInt32ToBuffer(uint32 i, char* buffer) { - FastUInt32ToBufferLeft(i, buffer); - return buffer; -} -inline char* FastUInt64ToBuffer(uint64 i, char* buffer) { - FastUInt64ToBufferLeft(i, buffer); - return buffer; -} - -// ---------------------------------------------------------------------- -// SimpleItoa() -// Description: converts an integer to a string. -// -// Return value: string -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT string SimpleItoa(int i); -LIBPROTOBUF_EXPORT string SimpleItoa(unsigned int i); -LIBPROTOBUF_EXPORT string SimpleItoa(long i); -LIBPROTOBUF_EXPORT string SimpleItoa(unsigned long i); -LIBPROTOBUF_EXPORT string SimpleItoa(long long i); -LIBPROTOBUF_EXPORT string SimpleItoa(unsigned long long i); - -// ---------------------------------------------------------------------- -// SimpleDtoa() -// SimpleFtoa() -// DoubleToBuffer() -// FloatToBuffer() -// Description: converts a double or float to a string which, if -// passed to NoLocaleStrtod(), will produce the exact same original double -// (except in case of NaN; all NaNs are considered the same value). -// We try to keep the string short but it's not guaranteed to be as -// short as possible. -// -// DoubleToBuffer() and FloatToBuffer() write the text to the given -// buffer and return it. The buffer must be at least -// kDoubleToBufferSize bytes for doubles and kFloatToBufferSize -// bytes for floats. kFastToBufferSize is also guaranteed to be large -// enough to hold either. -// -// Return value: string -// ---------------------------------------------------------------------- -LIBPROTOBUF_EXPORT string SimpleDtoa(double value); -LIBPROTOBUF_EXPORT string SimpleFtoa(float value); - -LIBPROTOBUF_EXPORT char* DoubleToBuffer(double i, char* buffer); -LIBPROTOBUF_EXPORT char* FloatToBuffer(float i, char* buffer); - -// In practice, doubles should never need more than 24 bytes and floats -// should never need more than 14 (including null terminators), but we -// overestimate to be safe. -static const int kDoubleToBufferSize = 32; -static const int kFloatToBufferSize = 24; - -// ---------------------------------------------------------------------- -// NoLocaleStrtod() -// Exactly like strtod(), except it always behaves as if in the "C" -// locale (i.e. decimal points must be '.'s). -// ---------------------------------------------------------------------- - -LIBPROTOBUF_EXPORT double NoLocaleStrtod(const char* text, char** endptr); - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_STRUTIL_H__ - - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil_unittest.cc deleted file mode 100644 index b9c9253b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/strutil_unittest.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace { - -// TODO(kenton): Copy strutil tests from google3? - -TEST(StringUtilityTest, ImmuneToLocales) { - // Remember the old locale. - char* old_locale_cstr = setlocale(LC_NUMERIC, NULL); - ASSERT_TRUE(old_locale_cstr != NULL); - string old_locale = old_locale_cstr; - - // Set the locale to "C". - ASSERT_TRUE(setlocale(LC_NUMERIC, "C") != NULL); - - EXPECT_EQ(1.5, NoLocaleStrtod("1.5", NULL)); - EXPECT_EQ("1.5", SimpleDtoa(1.5)); - EXPECT_EQ("1.5", SimpleFtoa(1.5)); - - // Verify that the endptr is set correctly even if not all text was parsed. - const char* text = "1.5f"; - char* endptr; - EXPECT_EQ(1.5, NoLocaleStrtod(text, &endptr)); - EXPECT_EQ(3, endptr - text); - - if (setlocale(LC_NUMERIC, "es_ES") == NULL && - setlocale(LC_NUMERIC, "es_ES.utf8") == NULL) { - // Some systems may not have the desired locale available. - GOOGLE_LOG(WARNING) - << "Couldn't set locale to es_ES. Skipping this test."; - } else { - EXPECT_EQ(1.5, NoLocaleStrtod("1.5", NULL)); - EXPECT_EQ("1.5", SimpleDtoa(1.5)); - EXPECT_EQ("1.5", SimpleFtoa(1.5)); - EXPECT_EQ(1.5, NoLocaleStrtod(text, &endptr)); - EXPECT_EQ(3, endptr - text); - } - - // Return to original locale. - setlocale(LC_NUMERIC, old_locale.c_str()); -} - -} // anonymous namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.cc deleted file mode 100644 index b542aaa4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.cc +++ /dev/null @@ -1,134 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -#include -#include -#include - -namespace google { -namespace protobuf { -namespace strings { - -using internal::SubstituteArg; - -// Returns the number of args in arg_array which were passed explicitly -// to Substitute(). -static int CountSubstituteArgs(const SubstituteArg* const* args_array) { - int count = 0; - while (args_array[count] != NULL && args_array[count]->size() != -1) { - ++count; - } - return count; -} - -string Substitute( - const char* format, - const SubstituteArg& arg0, const SubstituteArg& arg1, - const SubstituteArg& arg2, const SubstituteArg& arg3, - const SubstituteArg& arg4, const SubstituteArg& arg5, - const SubstituteArg& arg6, const SubstituteArg& arg7, - const SubstituteArg& arg8, const SubstituteArg& arg9) { - string result; - SubstituteAndAppend(&result, format, arg0, arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8, arg9); - return result; -} - -void SubstituteAndAppend( - string* output, const char* format, - const SubstituteArg& arg0, const SubstituteArg& arg1, - const SubstituteArg& arg2, const SubstituteArg& arg3, - const SubstituteArg& arg4, const SubstituteArg& arg5, - const SubstituteArg& arg6, const SubstituteArg& arg7, - const SubstituteArg& arg8, const SubstituteArg& arg9) { - const SubstituteArg* const args_array[] = { - &arg0, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7, &arg8, &arg9, NULL - }; - - // Determine total size needed. - int size = 0; - for (int i = 0; format[i] != '\0'; i++) { - if (format[i] == '$') { - if (ascii_isdigit(format[i+1])) { - int index = format[i+1] - '0'; - if (args_array[index]->size() == -1) { - GOOGLE_LOG(DFATAL) - << "strings::Substitute format string invalid: asked for \"$" - << index << "\", but only " << CountSubstituteArgs(args_array) - << " args were given. Full format string was: \"" - << CEscape(format) << "\"."; - return; - } - size += args_array[index]->size(); - ++i; // Skip next char. - } else if (format[i+1] == '$') { - ++size; - ++i; // Skip next char. - } else { - GOOGLE_LOG(DFATAL) - << "Invalid strings::Substitute() format string: \"" - << CEscape(format) << "\"."; - return; - } - } else { - ++size; - } - } - - if (size == 0) return; - - // Build the string. - int original_size = output->size(); - STLStringResizeUninitialized(output, original_size + size); - char* target = string_as_array(output) + original_size; - for (int i = 0; format[i] != '\0'; i++) { - if (format[i] == '$') { - if (ascii_isdigit(format[i+1])) { - const SubstituteArg* src = args_array[format[i+1] - '0']; - memcpy(target, src->data(), src->size()); - target += src->size(); - ++i; // Skip next char. - } else if (format[i+1] == '$') { - *target++ = '$'; - ++i; // Skip next char. - } - } else { - *target++ = format[i]; - } - } - - GOOGLE_DCHECK_EQ(target - output->data(), output->size()); -} - -} // namespace strings -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.h deleted file mode 100644 index 2581793b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/stubs/substitute.h +++ /dev/null @@ -1,170 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// from google3/strings/substitute.h - -#include -#include -#include - -#ifndef GOOGLE_PROTOBUF_STUBS_SUBSTITUTE_H_ -#define GOOGLE_PROTOBUF_STUBS_SUBSTITUTE_H_ - -namespace google { -namespace protobuf { -namespace strings { - -// ---------------------------------------------------------------------- -// strings::Substitute() -// strings::SubstituteAndAppend() -// Kind of like StringPrintf, but different. -// -// Example: -// string GetMessage(string first_name, string last_name, int age) { -// return strings::Substitute("My name is $0 $1 and I am $2 years old.", -// first_name, last_name, age); -// } -// -// Differences from StringPrintf: -// * The format string does not identify the types of arguments. -// Instead, the magic of C++ deals with this for us. See below -// for a list of accepted types. -// * Substitutions in the format string are identified by a '$' -// followed by a digit. So, you can use arguments out-of-order and -// use the same argument multiple times. -// * It's much faster than StringPrintf. -// -// Supported types: -// * Strings (const char*, const string&) -// * Note that this means you do not have to add .c_str() to all of -// your strings. In fact, you shouldn't; it will be slower. -// * int32, int64, uint32, uint64: Formatted using SimpleItoa(). -// * float, double: Formatted using SimpleFtoa() and SimpleDtoa(). -// * bool: Printed as "true" or "false". -// -// SubstituteAndAppend() is like Substitute() but appends the result to -// *output. Example: -// -// string str; -// strings::SubstituteAndAppend(&str, -// "My name is $0 $1 and I am $2 years old.", -// first_name, last_name, age); -// -// Substitute() is significantly faster than StringPrintf(). For very -// large strings, it may be orders of magnitude faster. -// ---------------------------------------------------------------------- - -namespace internal { // Implementation details. - -class SubstituteArg { - public: - inline SubstituteArg(const char* value) - : text_(value), size_(strlen(text_)) {} - inline SubstituteArg(const string& value) - : text_(value.data()), size_(value.size()) {} - - // Indicates that no argument was given. - inline explicit SubstituteArg() - : text_(NULL), size_(-1) {} - - // Primitives - // We don't overload for signed and unsigned char because if people are - // explicitly declaring their chars as signed or unsigned then they are - // probably actually using them as 8-bit integers and would probably - // prefer an integer representation. But, we don't really know. So, we - // make the caller decide what to do. - inline SubstituteArg(char value) - : text_(scratch_), size_(1) { scratch_[0] = value; } - inline SubstituteArg(short value) - : text_(FastInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(unsigned short value) - : text_(FastUInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(int value) - : text_(FastInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(unsigned int value) - : text_(FastUInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(long value) - : text_(FastLongToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(unsigned long value) - : text_(FastULongToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(long long value) - : text_(FastInt64ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(unsigned long long value) - : text_(FastUInt64ToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(float value) - : text_(FloatToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(double value) - : text_(DoubleToBuffer(value, scratch_)), size_(strlen(text_)) {} - inline SubstituteArg(bool value) - : text_(value ? "true" : "false"), size_(strlen(text_)) {} - - inline const char* data() const { return text_; } - inline int size() const { return size_; } - - private: - const char* text_; - int size_; - char scratch_[kFastToBufferSize]; -}; - -} // namespace internal - -LIBPROTOBUF_EXPORT string Substitute( - const char* format, - const internal::SubstituteArg& arg0 = internal::SubstituteArg(), - const internal::SubstituteArg& arg1 = internal::SubstituteArg(), - const internal::SubstituteArg& arg2 = internal::SubstituteArg(), - const internal::SubstituteArg& arg3 = internal::SubstituteArg(), - const internal::SubstituteArg& arg4 = internal::SubstituteArg(), - const internal::SubstituteArg& arg5 = internal::SubstituteArg(), - const internal::SubstituteArg& arg6 = internal::SubstituteArg(), - const internal::SubstituteArg& arg7 = internal::SubstituteArg(), - const internal::SubstituteArg& arg8 = internal::SubstituteArg(), - const internal::SubstituteArg& arg9 = internal::SubstituteArg()); - -LIBPROTOBUF_EXPORT void SubstituteAndAppend( - string* output, const char* format, - const internal::SubstituteArg& arg0 = internal::SubstituteArg(), - const internal::SubstituteArg& arg1 = internal::SubstituteArg(), - const internal::SubstituteArg& arg2 = internal::SubstituteArg(), - const internal::SubstituteArg& arg3 = internal::SubstituteArg(), - const internal::SubstituteArg& arg4 = internal::SubstituteArg(), - const internal::SubstituteArg& arg5 = internal::SubstituteArg(), - const internal::SubstituteArg& arg6 = internal::SubstituteArg(), - const internal::SubstituteArg& arg7 = internal::SubstituteArg(), - const internal::SubstituteArg& arg8 = internal::SubstituteArg(), - const internal::SubstituteArg& arg9 = internal::SubstituteArg()); - -} // namespace strings -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_STUBS_SUBSTITUTE_H_ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.cc deleted file mode 100644 index af8b3909..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.cc +++ /dev/null @@ -1,2854 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifdef _WIN32 -// Verify that #including windows.h does not break anything (e.g. because -// windows.h #defines GetMessage() as a macro). -#include -#endif - -#include -#include -#include - -#include -#include -#include - -namespace google { -namespace protobuf { - -void TestUtil::SetAllFields(unittest::TestAllTypes* message) { - message->set_optional_int32 (101); - message->set_optional_int64 (102); - message->set_optional_uint32 (103); - message->set_optional_uint64 (104); - message->set_optional_sint32 (105); - message->set_optional_sint64 (106); - message->set_optional_fixed32 (107); - message->set_optional_fixed64 (108); - message->set_optional_sfixed32(109); - message->set_optional_sfixed64(110); - message->set_optional_float (111); - message->set_optional_double (112); - message->set_optional_bool (true); - message->set_optional_string ("115"); - message->set_optional_bytes ("116"); - - message->mutable_optionalgroup ()->set_a(117); - message->mutable_optional_nested_message ()->set_bb(118); - message->mutable_optional_foreign_message()->set_c(119); - message->mutable_optional_import_message ()->set_d(120); - - message->set_optional_nested_enum (unittest::TestAllTypes::BAZ); - message->set_optional_foreign_enum(unittest::FOREIGN_BAZ ); - message->set_optional_import_enum (unittest_import::IMPORT_BAZ); - - // StringPiece and Cord fields are only accessible via reflection in the - // open source release; see comments in compiler/cpp/string_field.cc. -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - message->GetReflection()->SetString( - message, - message->GetDescriptor()->FindFieldByName("optional_string_piece"), - "124"); - message->GetReflection()->SetString( - message, - message->GetDescriptor()->FindFieldByName("optional_cord"), - "125"); -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - - // ----------------------------------------------------------------- - - message->add_repeated_int32 (201); - message->add_repeated_int64 (202); - message->add_repeated_uint32 (203); - message->add_repeated_uint64 (204); - message->add_repeated_sint32 (205); - message->add_repeated_sint64 (206); - message->add_repeated_fixed32 (207); - message->add_repeated_fixed64 (208); - message->add_repeated_sfixed32(209); - message->add_repeated_sfixed64(210); - message->add_repeated_float (211); - message->add_repeated_double (212); - message->add_repeated_bool (true); - message->add_repeated_string ("215"); - message->add_repeated_bytes ("216"); - - message->add_repeatedgroup ()->set_a(217); - message->add_repeated_nested_message ()->set_bb(218); - message->add_repeated_foreign_message()->set_c(219); - message->add_repeated_import_message ()->set_d(220); - - message->add_repeated_nested_enum (unittest::TestAllTypes::BAR); - message->add_repeated_foreign_enum(unittest::FOREIGN_BAR ); - message->add_repeated_import_enum (unittest_import::IMPORT_BAR); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - message->GetReflection()->AddString( - message, - message->GetDescriptor()->FindFieldByName("repeated_string_piece"), - "224"); - message->GetReflection()->AddString( - message, - message->GetDescriptor()->FindFieldByName("repeated_cord"), - "225"); -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - - // Add a second one of each field. - message->add_repeated_int32 (301); - message->add_repeated_int64 (302); - message->add_repeated_uint32 (303); - message->add_repeated_uint64 (304); - message->add_repeated_sint32 (305); - message->add_repeated_sint64 (306); - message->add_repeated_fixed32 (307); - message->add_repeated_fixed64 (308); - message->add_repeated_sfixed32(309); - message->add_repeated_sfixed64(310); - message->add_repeated_float (311); - message->add_repeated_double (312); - message->add_repeated_bool (false); - message->add_repeated_string ("315"); - message->add_repeated_bytes ("316"); - - message->add_repeatedgroup ()->set_a(317); - message->add_repeated_nested_message ()->set_bb(318); - message->add_repeated_foreign_message()->set_c(319); - message->add_repeated_import_message ()->set_d(320); - - message->add_repeated_nested_enum (unittest::TestAllTypes::BAZ); - message->add_repeated_foreign_enum(unittest::FOREIGN_BAZ ); - message->add_repeated_import_enum (unittest_import::IMPORT_BAZ); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - message->GetReflection()->AddString( - message, - message->GetDescriptor()->FindFieldByName("repeated_string_piece"), - "324"); - message->GetReflection()->AddString( - message, - message->GetDescriptor()->FindFieldByName("repeated_cord"), - "325"); -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS - - // ----------------------------------------------------------------- - - message->set_default_int32 (401); - message->set_default_int64 (402); - message->set_default_uint32 (403); - message->set_default_uint64 (404); - message->set_default_sint32 (405); - message->set_default_sint64 (406); - message->set_default_fixed32 (407); - message->set_default_fixed64 (408); - message->set_default_sfixed32(409); - message->set_default_sfixed64(410); - message->set_default_float (411); - message->set_default_double (412); - message->set_default_bool (false); - message->set_default_string ("415"); - message->set_default_bytes ("416"); - - message->set_default_nested_enum (unittest::TestAllTypes::FOO); - message->set_default_foreign_enum(unittest::FOREIGN_FOO ); - message->set_default_import_enum (unittest_import::IMPORT_FOO); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - message->GetReflection()->SetString( - message, - message->GetDescriptor()->FindFieldByName("default_string_piece"), - "424"); - message->GetReflection()->SetString( - message, - message->GetDescriptor()->FindFieldByName("default_cord"), - "425"); -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS -} - -// ------------------------------------------------------------------- - -void TestUtil::ModifyRepeatedFields(unittest::TestAllTypes* message) { - message->set_repeated_int32 (1, 501); - message->set_repeated_int64 (1, 502); - message->set_repeated_uint32 (1, 503); - message->set_repeated_uint64 (1, 504); - message->set_repeated_sint32 (1, 505); - message->set_repeated_sint64 (1, 506); - message->set_repeated_fixed32 (1, 507); - message->set_repeated_fixed64 (1, 508); - message->set_repeated_sfixed32(1, 509); - message->set_repeated_sfixed64(1, 510); - message->set_repeated_float (1, 511); - message->set_repeated_double (1, 512); - message->set_repeated_bool (1, true); - message->set_repeated_string (1, "515"); - message->set_repeated_bytes (1, "516"); - - message->mutable_repeatedgroup (1)->set_a(517); - message->mutable_repeated_nested_message (1)->set_bb(518); - message->mutable_repeated_foreign_message(1)->set_c(519); - message->mutable_repeated_import_message (1)->set_d(520); - - message->set_repeated_nested_enum (1, unittest::TestAllTypes::FOO); - message->set_repeated_foreign_enum(1, unittest::FOREIGN_FOO ); - message->set_repeated_import_enum (1, unittest_import::IMPORT_FOO); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - message->GetReflection()->SetRepeatedString( - message, - message->GetDescriptor()->FindFieldByName("repeated_string_piece"), - 1, "524"); - message->GetReflection()->SetRepeatedString( - message, - message->GetDescriptor()->FindFieldByName("repeated_cord"), - 1, "525"); -#endif // !PROTOBUF_TEST_NO_DESCRIPTORS -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectAllFieldsSet(const unittest::TestAllTypes& message) { - EXPECT_TRUE(message.has_optional_int32 ()); - EXPECT_TRUE(message.has_optional_int64 ()); - EXPECT_TRUE(message.has_optional_uint32 ()); - EXPECT_TRUE(message.has_optional_uint64 ()); - EXPECT_TRUE(message.has_optional_sint32 ()); - EXPECT_TRUE(message.has_optional_sint64 ()); - EXPECT_TRUE(message.has_optional_fixed32 ()); - EXPECT_TRUE(message.has_optional_fixed64 ()); - EXPECT_TRUE(message.has_optional_sfixed32()); - EXPECT_TRUE(message.has_optional_sfixed64()); - EXPECT_TRUE(message.has_optional_float ()); - EXPECT_TRUE(message.has_optional_double ()); - EXPECT_TRUE(message.has_optional_bool ()); - EXPECT_TRUE(message.has_optional_string ()); - EXPECT_TRUE(message.has_optional_bytes ()); - - EXPECT_TRUE(message.has_optionalgroup ()); - EXPECT_TRUE(message.has_optional_nested_message ()); - EXPECT_TRUE(message.has_optional_foreign_message()); - EXPECT_TRUE(message.has_optional_import_message ()); - - EXPECT_TRUE(message.optionalgroup ().has_a()); - EXPECT_TRUE(message.optional_nested_message ().has_bb()); - EXPECT_TRUE(message.optional_foreign_message().has_c()); - EXPECT_TRUE(message.optional_import_message ().has_d()); - - EXPECT_TRUE(message.has_optional_nested_enum ()); - EXPECT_TRUE(message.has_optional_foreign_enum()); - EXPECT_TRUE(message.has_optional_import_enum ()); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - EXPECT_TRUE(message.has_optional_string_piece()); - EXPECT_TRUE(message.has_optional_cord()); -#endif - - EXPECT_EQ(101 , message.optional_int32 ()); - EXPECT_EQ(102 , message.optional_int64 ()); - EXPECT_EQ(103 , message.optional_uint32 ()); - EXPECT_EQ(104 , message.optional_uint64 ()); - EXPECT_EQ(105 , message.optional_sint32 ()); - EXPECT_EQ(106 , message.optional_sint64 ()); - EXPECT_EQ(107 , message.optional_fixed32 ()); - EXPECT_EQ(108 , message.optional_fixed64 ()); - EXPECT_EQ(109 , message.optional_sfixed32()); - EXPECT_EQ(110 , message.optional_sfixed64()); - EXPECT_EQ(111 , message.optional_float ()); - EXPECT_EQ(112 , message.optional_double ()); - EXPECT_EQ(true , message.optional_bool ()); - EXPECT_EQ("115", message.optional_string ()); - EXPECT_EQ("116", message.optional_bytes ()); - - EXPECT_EQ(117, message.optionalgroup ().a()); - EXPECT_EQ(118, message.optional_nested_message ().bb()); - EXPECT_EQ(119, message.optional_foreign_message().c()); - EXPECT_EQ(120, message.optional_import_message ().d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.optional_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.optional_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.optional_import_enum ()); - - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, message.repeated_int32_size ()); - ASSERT_EQ(2, message.repeated_int64_size ()); - ASSERT_EQ(2, message.repeated_uint32_size ()); - ASSERT_EQ(2, message.repeated_uint64_size ()); - ASSERT_EQ(2, message.repeated_sint32_size ()); - ASSERT_EQ(2, message.repeated_sint64_size ()); - ASSERT_EQ(2, message.repeated_fixed32_size ()); - ASSERT_EQ(2, message.repeated_fixed64_size ()); - ASSERT_EQ(2, message.repeated_sfixed32_size()); - ASSERT_EQ(2, message.repeated_sfixed64_size()); - ASSERT_EQ(2, message.repeated_float_size ()); - ASSERT_EQ(2, message.repeated_double_size ()); - ASSERT_EQ(2, message.repeated_bool_size ()); - ASSERT_EQ(2, message.repeated_string_size ()); - ASSERT_EQ(2, message.repeated_bytes_size ()); - - ASSERT_EQ(2, message.repeatedgroup_size ()); - ASSERT_EQ(2, message.repeated_nested_message_size ()); - ASSERT_EQ(2, message.repeated_foreign_message_size()); - ASSERT_EQ(2, message.repeated_import_message_size ()); - ASSERT_EQ(2, message.repeated_nested_enum_size ()); - ASSERT_EQ(2, message.repeated_foreign_enum_size ()); - ASSERT_EQ(2, message.repeated_import_enum_size ()); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - ASSERT_EQ(2, message.repeated_string_piece_size()); - ASSERT_EQ(2, message.repeated_cord_size()); -#endif - - EXPECT_EQ(201 , message.repeated_int32 (0)); - EXPECT_EQ(202 , message.repeated_int64 (0)); - EXPECT_EQ(203 , message.repeated_uint32 (0)); - EXPECT_EQ(204 , message.repeated_uint64 (0)); - EXPECT_EQ(205 , message.repeated_sint32 (0)); - EXPECT_EQ(206 , message.repeated_sint64 (0)); - EXPECT_EQ(207 , message.repeated_fixed32 (0)); - EXPECT_EQ(208 , message.repeated_fixed64 (0)); - EXPECT_EQ(209 , message.repeated_sfixed32(0)); - EXPECT_EQ(210 , message.repeated_sfixed64(0)); - EXPECT_EQ(211 , message.repeated_float (0)); - EXPECT_EQ(212 , message.repeated_double (0)); - EXPECT_EQ(true , message.repeated_bool (0)); - EXPECT_EQ("215", message.repeated_string (0)); - EXPECT_EQ("216", message.repeated_bytes (0)); - - EXPECT_EQ(217, message.repeatedgroup (0).a()); - EXPECT_EQ(218, message.repeated_nested_message (0).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(0).c()); - EXPECT_EQ(220, message.repeated_import_message (0).d()); - - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.repeated_import_enum (0)); - - EXPECT_EQ(301 , message.repeated_int32 (1)); - EXPECT_EQ(302 , message.repeated_int64 (1)); - EXPECT_EQ(303 , message.repeated_uint32 (1)); - EXPECT_EQ(304 , message.repeated_uint64 (1)); - EXPECT_EQ(305 , message.repeated_sint32 (1)); - EXPECT_EQ(306 , message.repeated_sint64 (1)); - EXPECT_EQ(307 , message.repeated_fixed32 (1)); - EXPECT_EQ(308 , message.repeated_fixed64 (1)); - EXPECT_EQ(309 , message.repeated_sfixed32(1)); - EXPECT_EQ(310 , message.repeated_sfixed64(1)); - EXPECT_EQ(311 , message.repeated_float (1)); - EXPECT_EQ(312 , message.repeated_double (1)); - EXPECT_EQ(false, message.repeated_bool (1)); - EXPECT_EQ("315", message.repeated_string (1)); - EXPECT_EQ("316", message.repeated_bytes (1)); - - EXPECT_EQ(317, message.repeatedgroup (1).a()); - EXPECT_EQ(318, message.repeated_nested_message (1).bb()); - EXPECT_EQ(319, message.repeated_foreign_message(1).c()); - EXPECT_EQ(320, message.repeated_import_message (1).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.repeated_nested_enum (1)); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.repeated_foreign_enum(1)); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.repeated_import_enum (1)); - - - // ----------------------------------------------------------------- - - EXPECT_TRUE(message.has_default_int32 ()); - EXPECT_TRUE(message.has_default_int64 ()); - EXPECT_TRUE(message.has_default_uint32 ()); - EXPECT_TRUE(message.has_default_uint64 ()); - EXPECT_TRUE(message.has_default_sint32 ()); - EXPECT_TRUE(message.has_default_sint64 ()); - EXPECT_TRUE(message.has_default_fixed32 ()); - EXPECT_TRUE(message.has_default_fixed64 ()); - EXPECT_TRUE(message.has_default_sfixed32()); - EXPECT_TRUE(message.has_default_sfixed64()); - EXPECT_TRUE(message.has_default_float ()); - EXPECT_TRUE(message.has_default_double ()); - EXPECT_TRUE(message.has_default_bool ()); - EXPECT_TRUE(message.has_default_string ()); - EXPECT_TRUE(message.has_default_bytes ()); - - EXPECT_TRUE(message.has_default_nested_enum ()); - EXPECT_TRUE(message.has_default_foreign_enum()); - EXPECT_TRUE(message.has_default_import_enum ()); - - - EXPECT_EQ(401 , message.default_int32 ()); - EXPECT_EQ(402 , message.default_int64 ()); - EXPECT_EQ(403 , message.default_uint32 ()); - EXPECT_EQ(404 , message.default_uint64 ()); - EXPECT_EQ(405 , message.default_sint32 ()); - EXPECT_EQ(406 , message.default_sint64 ()); - EXPECT_EQ(407 , message.default_fixed32 ()); - EXPECT_EQ(408 , message.default_fixed64 ()); - EXPECT_EQ(409 , message.default_sfixed32()); - EXPECT_EQ(410 , message.default_sfixed64()); - EXPECT_EQ(411 , message.default_float ()); - EXPECT_EQ(412 , message.default_double ()); - EXPECT_EQ(false, message.default_bool ()); - EXPECT_EQ("415", message.default_string ()); - EXPECT_EQ("416", message.default_bytes ()); - - EXPECT_EQ(unittest::TestAllTypes::FOO, message.default_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_FOO , message.default_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.default_import_enum ()); - -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectClear(const unittest::TestAllTypes& message) { - // has_blah() should initially be false for all optional fields. - EXPECT_FALSE(message.has_optional_int32 ()); - EXPECT_FALSE(message.has_optional_int64 ()); - EXPECT_FALSE(message.has_optional_uint32 ()); - EXPECT_FALSE(message.has_optional_uint64 ()); - EXPECT_FALSE(message.has_optional_sint32 ()); - EXPECT_FALSE(message.has_optional_sint64 ()); - EXPECT_FALSE(message.has_optional_fixed32 ()); - EXPECT_FALSE(message.has_optional_fixed64 ()); - EXPECT_FALSE(message.has_optional_sfixed32()); - EXPECT_FALSE(message.has_optional_sfixed64()); - EXPECT_FALSE(message.has_optional_float ()); - EXPECT_FALSE(message.has_optional_double ()); - EXPECT_FALSE(message.has_optional_bool ()); - EXPECT_FALSE(message.has_optional_string ()); - EXPECT_FALSE(message.has_optional_bytes ()); - - EXPECT_FALSE(message.has_optionalgroup ()); - EXPECT_FALSE(message.has_optional_nested_message ()); - EXPECT_FALSE(message.has_optional_foreign_message()); - EXPECT_FALSE(message.has_optional_import_message ()); - - EXPECT_FALSE(message.has_optional_nested_enum ()); - EXPECT_FALSE(message.has_optional_foreign_enum()); - EXPECT_FALSE(message.has_optional_import_enum ()); - - EXPECT_FALSE(message.has_optional_string_piece()); - EXPECT_FALSE(message.has_optional_cord()); - - // Optional fields without defaults are set to zero or something like it. - EXPECT_EQ(0 , message.optional_int32 ()); - EXPECT_EQ(0 , message.optional_int64 ()); - EXPECT_EQ(0 , message.optional_uint32 ()); - EXPECT_EQ(0 , message.optional_uint64 ()); - EXPECT_EQ(0 , message.optional_sint32 ()); - EXPECT_EQ(0 , message.optional_sint64 ()); - EXPECT_EQ(0 , message.optional_fixed32 ()); - EXPECT_EQ(0 , message.optional_fixed64 ()); - EXPECT_EQ(0 , message.optional_sfixed32()); - EXPECT_EQ(0 , message.optional_sfixed64()); - EXPECT_EQ(0 , message.optional_float ()); - EXPECT_EQ(0 , message.optional_double ()); - EXPECT_EQ(false, message.optional_bool ()); - EXPECT_EQ("" , message.optional_string ()); - EXPECT_EQ("" , message.optional_bytes ()); - - // Embedded messages should also be clear. - EXPECT_FALSE(message.optionalgroup ().has_a()); - EXPECT_FALSE(message.optional_nested_message ().has_bb()); - EXPECT_FALSE(message.optional_foreign_message().has_c()); - EXPECT_FALSE(message.optional_import_message ().has_d()); - - EXPECT_EQ(0, message.optionalgroup ().a()); - EXPECT_EQ(0, message.optional_nested_message ().bb()); - EXPECT_EQ(0, message.optional_foreign_message().c()); - EXPECT_EQ(0, message.optional_import_message ().d()); - - // Enums without defaults are set to the first value in the enum. - EXPECT_EQ(unittest::TestAllTypes::FOO, message.optional_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_FOO , message.optional_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.optional_import_enum ()); - - - // Repeated fields are empty. - EXPECT_EQ(0, message.repeated_int32_size ()); - EXPECT_EQ(0, message.repeated_int64_size ()); - EXPECT_EQ(0, message.repeated_uint32_size ()); - EXPECT_EQ(0, message.repeated_uint64_size ()); - EXPECT_EQ(0, message.repeated_sint32_size ()); - EXPECT_EQ(0, message.repeated_sint64_size ()); - EXPECT_EQ(0, message.repeated_fixed32_size ()); - EXPECT_EQ(0, message.repeated_fixed64_size ()); - EXPECT_EQ(0, message.repeated_sfixed32_size()); - EXPECT_EQ(0, message.repeated_sfixed64_size()); - EXPECT_EQ(0, message.repeated_float_size ()); - EXPECT_EQ(0, message.repeated_double_size ()); - EXPECT_EQ(0, message.repeated_bool_size ()); - EXPECT_EQ(0, message.repeated_string_size ()); - EXPECT_EQ(0, message.repeated_bytes_size ()); - - EXPECT_EQ(0, message.repeatedgroup_size ()); - EXPECT_EQ(0, message.repeated_nested_message_size ()); - EXPECT_EQ(0, message.repeated_foreign_message_size()); - EXPECT_EQ(0, message.repeated_import_message_size ()); - EXPECT_EQ(0, message.repeated_nested_enum_size ()); - EXPECT_EQ(0, message.repeated_foreign_enum_size ()); - EXPECT_EQ(0, message.repeated_import_enum_size ()); - - EXPECT_EQ(0, message.repeated_string_piece_size()); - EXPECT_EQ(0, message.repeated_cord_size()); - - // has_blah() should also be false for all default fields. - EXPECT_FALSE(message.has_default_int32 ()); - EXPECT_FALSE(message.has_default_int64 ()); - EXPECT_FALSE(message.has_default_uint32 ()); - EXPECT_FALSE(message.has_default_uint64 ()); - EXPECT_FALSE(message.has_default_sint32 ()); - EXPECT_FALSE(message.has_default_sint64 ()); - EXPECT_FALSE(message.has_default_fixed32 ()); - EXPECT_FALSE(message.has_default_fixed64 ()); - EXPECT_FALSE(message.has_default_sfixed32()); - EXPECT_FALSE(message.has_default_sfixed64()); - EXPECT_FALSE(message.has_default_float ()); - EXPECT_FALSE(message.has_default_double ()); - EXPECT_FALSE(message.has_default_bool ()); - EXPECT_FALSE(message.has_default_string ()); - EXPECT_FALSE(message.has_default_bytes ()); - - EXPECT_FALSE(message.has_default_nested_enum ()); - EXPECT_FALSE(message.has_default_foreign_enum()); - EXPECT_FALSE(message.has_default_import_enum ()); - - - // Fields with defaults have their default values (duh). - EXPECT_EQ( 41 , message.default_int32 ()); - EXPECT_EQ( 42 , message.default_int64 ()); - EXPECT_EQ( 43 , message.default_uint32 ()); - EXPECT_EQ( 44 , message.default_uint64 ()); - EXPECT_EQ(-45 , message.default_sint32 ()); - EXPECT_EQ( 46 , message.default_sint64 ()); - EXPECT_EQ( 47 , message.default_fixed32 ()); - EXPECT_EQ( 48 , message.default_fixed64 ()); - EXPECT_EQ( 49 , message.default_sfixed32()); - EXPECT_EQ(-50 , message.default_sfixed64()); - EXPECT_EQ( 51.5 , message.default_float ()); - EXPECT_EQ( 52e3 , message.default_double ()); - EXPECT_EQ(true , message.default_bool ()); - EXPECT_EQ("hello", message.default_string ()); - EXPECT_EQ("world", message.default_bytes ()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.default_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_BAR , message.default_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.default_import_enum ()); - -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectRepeatedFieldsModified( - const unittest::TestAllTypes& message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - ASSERT_EQ(2, message.repeated_int32_size ()); - ASSERT_EQ(2, message.repeated_int64_size ()); - ASSERT_EQ(2, message.repeated_uint32_size ()); - ASSERT_EQ(2, message.repeated_uint64_size ()); - ASSERT_EQ(2, message.repeated_sint32_size ()); - ASSERT_EQ(2, message.repeated_sint64_size ()); - ASSERT_EQ(2, message.repeated_fixed32_size ()); - ASSERT_EQ(2, message.repeated_fixed64_size ()); - ASSERT_EQ(2, message.repeated_sfixed32_size()); - ASSERT_EQ(2, message.repeated_sfixed64_size()); - ASSERT_EQ(2, message.repeated_float_size ()); - ASSERT_EQ(2, message.repeated_double_size ()); - ASSERT_EQ(2, message.repeated_bool_size ()); - ASSERT_EQ(2, message.repeated_string_size ()); - ASSERT_EQ(2, message.repeated_bytes_size ()); - - ASSERT_EQ(2, message.repeatedgroup_size ()); - ASSERT_EQ(2, message.repeated_nested_message_size ()); - ASSERT_EQ(2, message.repeated_foreign_message_size()); - ASSERT_EQ(2, message.repeated_import_message_size ()); - ASSERT_EQ(2, message.repeated_nested_enum_size ()); - ASSERT_EQ(2, message.repeated_foreign_enum_size ()); - ASSERT_EQ(2, message.repeated_import_enum_size ()); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - ASSERT_EQ(2, message.repeated_string_piece_size()); - ASSERT_EQ(2, message.repeated_cord_size()); -#endif - - EXPECT_EQ(201 , message.repeated_int32 (0)); - EXPECT_EQ(202 , message.repeated_int64 (0)); - EXPECT_EQ(203 , message.repeated_uint32 (0)); - EXPECT_EQ(204 , message.repeated_uint64 (0)); - EXPECT_EQ(205 , message.repeated_sint32 (0)); - EXPECT_EQ(206 , message.repeated_sint64 (0)); - EXPECT_EQ(207 , message.repeated_fixed32 (0)); - EXPECT_EQ(208 , message.repeated_fixed64 (0)); - EXPECT_EQ(209 , message.repeated_sfixed32(0)); - EXPECT_EQ(210 , message.repeated_sfixed64(0)); - EXPECT_EQ(211 , message.repeated_float (0)); - EXPECT_EQ(212 , message.repeated_double (0)); - EXPECT_EQ(true , message.repeated_bool (0)); - EXPECT_EQ("215", message.repeated_string (0)); - EXPECT_EQ("216", message.repeated_bytes (0)); - - EXPECT_EQ(217, message.repeatedgroup (0).a()); - EXPECT_EQ(218, message.repeated_nested_message (0).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(0).c()); - EXPECT_EQ(220, message.repeated_import_message (0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.repeated_import_enum (0)); - - - // Actually verify the second (modified) elements now. - EXPECT_EQ(501 , message.repeated_int32 (1)); - EXPECT_EQ(502 , message.repeated_int64 (1)); - EXPECT_EQ(503 , message.repeated_uint32 (1)); - EXPECT_EQ(504 , message.repeated_uint64 (1)); - EXPECT_EQ(505 , message.repeated_sint32 (1)); - EXPECT_EQ(506 , message.repeated_sint64 (1)); - EXPECT_EQ(507 , message.repeated_fixed32 (1)); - EXPECT_EQ(508 , message.repeated_fixed64 (1)); - EXPECT_EQ(509 , message.repeated_sfixed32(1)); - EXPECT_EQ(510 , message.repeated_sfixed64(1)); - EXPECT_EQ(511 , message.repeated_float (1)); - EXPECT_EQ(512 , message.repeated_double (1)); - EXPECT_EQ(true , message.repeated_bool (1)); - EXPECT_EQ("515", message.repeated_string (1)); - EXPECT_EQ("516", message.repeated_bytes (1)); - - EXPECT_EQ(517, message.repeatedgroup (1).a()); - EXPECT_EQ(518, message.repeated_nested_message (1).bb()); - EXPECT_EQ(519, message.repeated_foreign_message(1).c()); - EXPECT_EQ(520, message.repeated_import_message (1).d()); - - EXPECT_EQ(unittest::TestAllTypes::FOO, message.repeated_nested_enum (1)); - EXPECT_EQ(unittest::FOREIGN_FOO , message.repeated_foreign_enum(1)); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.repeated_import_enum (1)); - -} - -// ------------------------------------------------------------------- - -void TestUtil::SetPackedFields(unittest::TestPackedTypes* message) { - message->add_packed_int32 (601); - message->add_packed_int64 (602); - message->add_packed_uint32 (603); - message->add_packed_uint64 (604); - message->add_packed_sint32 (605); - message->add_packed_sint64 (606); - message->add_packed_fixed32 (607); - message->add_packed_fixed64 (608); - message->add_packed_sfixed32(609); - message->add_packed_sfixed64(610); - message->add_packed_float (611); - message->add_packed_double (612); - message->add_packed_bool (true); - message->add_packed_enum (unittest::FOREIGN_BAR); - // add a second one of each field - message->add_packed_int32 (701); - message->add_packed_int64 (702); - message->add_packed_uint32 (703); - message->add_packed_uint64 (704); - message->add_packed_sint32 (705); - message->add_packed_sint64 (706); - message->add_packed_fixed32 (707); - message->add_packed_fixed64 (708); - message->add_packed_sfixed32(709); - message->add_packed_sfixed64(710); - message->add_packed_float (711); - message->add_packed_double (712); - message->add_packed_bool (false); - message->add_packed_enum (unittest::FOREIGN_BAZ); -} - -void TestUtil::SetUnpackedFields(unittest::TestUnpackedTypes* message) { - // The values applied here must match those of SetPackedFields. - - message->add_unpacked_int32 (601); - message->add_unpacked_int64 (602); - message->add_unpacked_uint32 (603); - message->add_unpacked_uint64 (604); - message->add_unpacked_sint32 (605); - message->add_unpacked_sint64 (606); - message->add_unpacked_fixed32 (607); - message->add_unpacked_fixed64 (608); - message->add_unpacked_sfixed32(609); - message->add_unpacked_sfixed64(610); - message->add_unpacked_float (611); - message->add_unpacked_double (612); - message->add_unpacked_bool (true); - message->add_unpacked_enum (unittest::FOREIGN_BAR); - // add a second one of each field - message->add_unpacked_int32 (701); - message->add_unpacked_int64 (702); - message->add_unpacked_uint32 (703); - message->add_unpacked_uint64 (704); - message->add_unpacked_sint32 (705); - message->add_unpacked_sint64 (706); - message->add_unpacked_fixed32 (707); - message->add_unpacked_fixed64 (708); - message->add_unpacked_sfixed32(709); - message->add_unpacked_sfixed64(710); - message->add_unpacked_float (711); - message->add_unpacked_double (712); - message->add_unpacked_bool (false); - message->add_unpacked_enum (unittest::FOREIGN_BAZ); -} - -// ------------------------------------------------------------------- - -void TestUtil::ModifyPackedFields(unittest::TestPackedTypes* message) { - message->set_packed_int32 (1, 801); - message->set_packed_int64 (1, 802); - message->set_packed_uint32 (1, 803); - message->set_packed_uint64 (1, 804); - message->set_packed_sint32 (1, 805); - message->set_packed_sint64 (1, 806); - message->set_packed_fixed32 (1, 807); - message->set_packed_fixed64 (1, 808); - message->set_packed_sfixed32(1, 809); - message->set_packed_sfixed64(1, 810); - message->set_packed_float (1, 811); - message->set_packed_double (1, 812); - message->set_packed_bool (1, true); - message->set_packed_enum (1, unittest::FOREIGN_FOO); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedFieldsSet(const unittest::TestPackedTypes& message) { - ASSERT_EQ(2, message.packed_int32_size ()); - ASSERT_EQ(2, message.packed_int64_size ()); - ASSERT_EQ(2, message.packed_uint32_size ()); - ASSERT_EQ(2, message.packed_uint64_size ()); - ASSERT_EQ(2, message.packed_sint32_size ()); - ASSERT_EQ(2, message.packed_sint64_size ()); - ASSERT_EQ(2, message.packed_fixed32_size ()); - ASSERT_EQ(2, message.packed_fixed64_size ()); - ASSERT_EQ(2, message.packed_sfixed32_size()); - ASSERT_EQ(2, message.packed_sfixed64_size()); - ASSERT_EQ(2, message.packed_float_size ()); - ASSERT_EQ(2, message.packed_double_size ()); - ASSERT_EQ(2, message.packed_bool_size ()); - ASSERT_EQ(2, message.packed_enum_size ()); - - EXPECT_EQ(601 , message.packed_int32 (0)); - EXPECT_EQ(602 , message.packed_int64 (0)); - EXPECT_EQ(603 , message.packed_uint32 (0)); - EXPECT_EQ(604 , message.packed_uint64 (0)); - EXPECT_EQ(605 , message.packed_sint32 (0)); - EXPECT_EQ(606 , message.packed_sint64 (0)); - EXPECT_EQ(607 , message.packed_fixed32 (0)); - EXPECT_EQ(608 , message.packed_fixed64 (0)); - EXPECT_EQ(609 , message.packed_sfixed32(0)); - EXPECT_EQ(610 , message.packed_sfixed64(0)); - EXPECT_EQ(611 , message.packed_float (0)); - EXPECT_EQ(612 , message.packed_double (0)); - EXPECT_EQ(true , message.packed_bool (0)); - EXPECT_EQ(unittest::FOREIGN_BAR, message.packed_enum(0)); - - EXPECT_EQ(701 , message.packed_int32 (1)); - EXPECT_EQ(702 , message.packed_int64 (1)); - EXPECT_EQ(703 , message.packed_uint32 (1)); - EXPECT_EQ(704 , message.packed_uint64 (1)); - EXPECT_EQ(705 , message.packed_sint32 (1)); - EXPECT_EQ(706 , message.packed_sint64 (1)); - EXPECT_EQ(707 , message.packed_fixed32 (1)); - EXPECT_EQ(708 , message.packed_fixed64 (1)); - EXPECT_EQ(709 , message.packed_sfixed32(1)); - EXPECT_EQ(710 , message.packed_sfixed64(1)); - EXPECT_EQ(711 , message.packed_float (1)); - EXPECT_EQ(712 , message.packed_double (1)); - EXPECT_EQ(false, message.packed_bool (1)); - EXPECT_EQ(unittest::FOREIGN_BAZ, message.packed_enum(1)); -} - -void TestUtil::ExpectUnpackedFieldsSet( - const unittest::TestUnpackedTypes& message) { - // The values expected here must match those of ExpectPackedFieldsSet. - - ASSERT_EQ(2, message.unpacked_int32_size ()); - ASSERT_EQ(2, message.unpacked_int64_size ()); - ASSERT_EQ(2, message.unpacked_uint32_size ()); - ASSERT_EQ(2, message.unpacked_uint64_size ()); - ASSERT_EQ(2, message.unpacked_sint32_size ()); - ASSERT_EQ(2, message.unpacked_sint64_size ()); - ASSERT_EQ(2, message.unpacked_fixed32_size ()); - ASSERT_EQ(2, message.unpacked_fixed64_size ()); - ASSERT_EQ(2, message.unpacked_sfixed32_size()); - ASSERT_EQ(2, message.unpacked_sfixed64_size()); - ASSERT_EQ(2, message.unpacked_float_size ()); - ASSERT_EQ(2, message.unpacked_double_size ()); - ASSERT_EQ(2, message.unpacked_bool_size ()); - ASSERT_EQ(2, message.unpacked_enum_size ()); - - EXPECT_EQ(601 , message.unpacked_int32 (0)); - EXPECT_EQ(602 , message.unpacked_int64 (0)); - EXPECT_EQ(603 , message.unpacked_uint32 (0)); - EXPECT_EQ(604 , message.unpacked_uint64 (0)); - EXPECT_EQ(605 , message.unpacked_sint32 (0)); - EXPECT_EQ(606 , message.unpacked_sint64 (0)); - EXPECT_EQ(607 , message.unpacked_fixed32 (0)); - EXPECT_EQ(608 , message.unpacked_fixed64 (0)); - EXPECT_EQ(609 , message.unpacked_sfixed32(0)); - EXPECT_EQ(610 , message.unpacked_sfixed64(0)); - EXPECT_EQ(611 , message.unpacked_float (0)); - EXPECT_EQ(612 , message.unpacked_double (0)); - EXPECT_EQ(true , message.unpacked_bool (0)); - EXPECT_EQ(unittest::FOREIGN_BAR, message.unpacked_enum(0)); - - EXPECT_EQ(701 , message.unpacked_int32 (1)); - EXPECT_EQ(702 , message.unpacked_int64 (1)); - EXPECT_EQ(703 , message.unpacked_uint32 (1)); - EXPECT_EQ(704 , message.unpacked_uint64 (1)); - EXPECT_EQ(705 , message.unpacked_sint32 (1)); - EXPECT_EQ(706 , message.unpacked_sint64 (1)); - EXPECT_EQ(707 , message.unpacked_fixed32 (1)); - EXPECT_EQ(708 , message.unpacked_fixed64 (1)); - EXPECT_EQ(709 , message.unpacked_sfixed32(1)); - EXPECT_EQ(710 , message.unpacked_sfixed64(1)); - EXPECT_EQ(711 , message.unpacked_float (1)); - EXPECT_EQ(712 , message.unpacked_double (1)); - EXPECT_EQ(false, message.unpacked_bool (1)); - EXPECT_EQ(unittest::FOREIGN_BAZ, message.unpacked_enum(1)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedClear( - const unittest::TestPackedTypes& message) { - // Packed repeated fields are empty. - EXPECT_EQ(0, message.packed_int32_size ()); - EXPECT_EQ(0, message.packed_int64_size ()); - EXPECT_EQ(0, message.packed_uint32_size ()); - EXPECT_EQ(0, message.packed_uint64_size ()); - EXPECT_EQ(0, message.packed_sint32_size ()); - EXPECT_EQ(0, message.packed_sint64_size ()); - EXPECT_EQ(0, message.packed_fixed32_size ()); - EXPECT_EQ(0, message.packed_fixed64_size ()); - EXPECT_EQ(0, message.packed_sfixed32_size()); - EXPECT_EQ(0, message.packed_sfixed64_size()); - EXPECT_EQ(0, message.packed_float_size ()); - EXPECT_EQ(0, message.packed_double_size ()); - EXPECT_EQ(0, message.packed_bool_size ()); - EXPECT_EQ(0, message.packed_enum_size ()); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedFieldsModified( - const unittest::TestPackedTypes& message) { - // Do the same for packed repeated fields. - ASSERT_EQ(2, message.packed_int32_size ()); - ASSERT_EQ(2, message.packed_int64_size ()); - ASSERT_EQ(2, message.packed_uint32_size ()); - ASSERT_EQ(2, message.packed_uint64_size ()); - ASSERT_EQ(2, message.packed_sint32_size ()); - ASSERT_EQ(2, message.packed_sint64_size ()); - ASSERT_EQ(2, message.packed_fixed32_size ()); - ASSERT_EQ(2, message.packed_fixed64_size ()); - ASSERT_EQ(2, message.packed_sfixed32_size()); - ASSERT_EQ(2, message.packed_sfixed64_size()); - ASSERT_EQ(2, message.packed_float_size ()); - ASSERT_EQ(2, message.packed_double_size ()); - ASSERT_EQ(2, message.packed_bool_size ()); - ASSERT_EQ(2, message.packed_enum_size ()); - - EXPECT_EQ(601 , message.packed_int32 (0)); - EXPECT_EQ(602 , message.packed_int64 (0)); - EXPECT_EQ(603 , message.packed_uint32 (0)); - EXPECT_EQ(604 , message.packed_uint64 (0)); - EXPECT_EQ(605 , message.packed_sint32 (0)); - EXPECT_EQ(606 , message.packed_sint64 (0)); - EXPECT_EQ(607 , message.packed_fixed32 (0)); - EXPECT_EQ(608 , message.packed_fixed64 (0)); - EXPECT_EQ(609 , message.packed_sfixed32(0)); - EXPECT_EQ(610 , message.packed_sfixed64(0)); - EXPECT_EQ(611 , message.packed_float (0)); - EXPECT_EQ(612 , message.packed_double (0)); - EXPECT_EQ(true , message.packed_bool (0)); - EXPECT_EQ(unittest::FOREIGN_BAR, message.packed_enum(0)); - // Actually verify the second (modified) elements now. - EXPECT_EQ(801 , message.packed_int32 (1)); - EXPECT_EQ(802 , message.packed_int64 (1)); - EXPECT_EQ(803 , message.packed_uint32 (1)); - EXPECT_EQ(804 , message.packed_uint64 (1)); - EXPECT_EQ(805 , message.packed_sint32 (1)); - EXPECT_EQ(806 , message.packed_sint64 (1)); - EXPECT_EQ(807 , message.packed_fixed32 (1)); - EXPECT_EQ(808 , message.packed_fixed64 (1)); - EXPECT_EQ(809 , message.packed_sfixed32(1)); - EXPECT_EQ(810 , message.packed_sfixed64(1)); - EXPECT_EQ(811 , message.packed_float (1)); - EXPECT_EQ(812 , message.packed_double (1)); - EXPECT_EQ(true , message.packed_bool (1)); - EXPECT_EQ(unittest::FOREIGN_FOO, message.packed_enum(1)); -} - -// =================================================================== -// Extensions -// -// All this code is exactly equivalent to the above code except that it's -// manipulating extension fields instead of normal ones. -// -// I gave up on the 80-char limit here. Sorry. - -void TestUtil::SetAllExtensions(unittest::TestAllExtensions* message) { - message->SetExtension(unittest::optional_int32_extension , 101); - message->SetExtension(unittest::optional_int64_extension , 102); - message->SetExtension(unittest::optional_uint32_extension , 103); - message->SetExtension(unittest::optional_uint64_extension , 104); - message->SetExtension(unittest::optional_sint32_extension , 105); - message->SetExtension(unittest::optional_sint64_extension , 106); - message->SetExtension(unittest::optional_fixed32_extension , 107); - message->SetExtension(unittest::optional_fixed64_extension , 108); - message->SetExtension(unittest::optional_sfixed32_extension, 109); - message->SetExtension(unittest::optional_sfixed64_extension, 110); - message->SetExtension(unittest::optional_float_extension , 111); - message->SetExtension(unittest::optional_double_extension , 112); - message->SetExtension(unittest::optional_bool_extension , true); - message->SetExtension(unittest::optional_string_extension , "115"); - message->SetExtension(unittest::optional_bytes_extension , "116"); - - message->MutableExtension(unittest::optionalgroup_extension )->set_a(117); - message->MutableExtension(unittest::optional_nested_message_extension )->set_bb(118); - message->MutableExtension(unittest::optional_foreign_message_extension)->set_c(119); - message->MutableExtension(unittest::optional_import_message_extension )->set_d(120); - - message->SetExtension(unittest::optional_nested_enum_extension , unittest::TestAllTypes::BAZ); - message->SetExtension(unittest::optional_foreign_enum_extension, unittest::FOREIGN_BAZ ); - message->SetExtension(unittest::optional_import_enum_extension , unittest_import::IMPORT_BAZ); - - message->SetExtension(unittest::optional_string_piece_extension, "124"); - message->SetExtension(unittest::optional_cord_extension, "125"); - - // ----------------------------------------------------------------- - - message->AddExtension(unittest::repeated_int32_extension , 201); - message->AddExtension(unittest::repeated_int64_extension , 202); - message->AddExtension(unittest::repeated_uint32_extension , 203); - message->AddExtension(unittest::repeated_uint64_extension , 204); - message->AddExtension(unittest::repeated_sint32_extension , 205); - message->AddExtension(unittest::repeated_sint64_extension , 206); - message->AddExtension(unittest::repeated_fixed32_extension , 207); - message->AddExtension(unittest::repeated_fixed64_extension , 208); - message->AddExtension(unittest::repeated_sfixed32_extension, 209); - message->AddExtension(unittest::repeated_sfixed64_extension, 210); - message->AddExtension(unittest::repeated_float_extension , 211); - message->AddExtension(unittest::repeated_double_extension , 212); - message->AddExtension(unittest::repeated_bool_extension , true); - message->AddExtension(unittest::repeated_string_extension , "215"); - message->AddExtension(unittest::repeated_bytes_extension , "216"); - - message->AddExtension(unittest::repeatedgroup_extension )->set_a(217); - message->AddExtension(unittest::repeated_nested_message_extension )->set_bb(218); - message->AddExtension(unittest::repeated_foreign_message_extension)->set_c(219); - message->AddExtension(unittest::repeated_import_message_extension )->set_d(220); - - message->AddExtension(unittest::repeated_nested_enum_extension , unittest::TestAllTypes::BAR); - message->AddExtension(unittest::repeated_foreign_enum_extension, unittest::FOREIGN_BAR ); - message->AddExtension(unittest::repeated_import_enum_extension , unittest_import::IMPORT_BAR); - - message->AddExtension(unittest::repeated_string_piece_extension, "224"); - message->AddExtension(unittest::repeated_cord_extension, "225"); - - // Add a second one of each field. - message->AddExtension(unittest::repeated_int32_extension , 301); - message->AddExtension(unittest::repeated_int64_extension , 302); - message->AddExtension(unittest::repeated_uint32_extension , 303); - message->AddExtension(unittest::repeated_uint64_extension , 304); - message->AddExtension(unittest::repeated_sint32_extension , 305); - message->AddExtension(unittest::repeated_sint64_extension , 306); - message->AddExtension(unittest::repeated_fixed32_extension , 307); - message->AddExtension(unittest::repeated_fixed64_extension , 308); - message->AddExtension(unittest::repeated_sfixed32_extension, 309); - message->AddExtension(unittest::repeated_sfixed64_extension, 310); - message->AddExtension(unittest::repeated_float_extension , 311); - message->AddExtension(unittest::repeated_double_extension , 312); - message->AddExtension(unittest::repeated_bool_extension , false); - message->AddExtension(unittest::repeated_string_extension , "315"); - message->AddExtension(unittest::repeated_bytes_extension , "316"); - - message->AddExtension(unittest::repeatedgroup_extension )->set_a(317); - message->AddExtension(unittest::repeated_nested_message_extension )->set_bb(318); - message->AddExtension(unittest::repeated_foreign_message_extension)->set_c(319); - message->AddExtension(unittest::repeated_import_message_extension )->set_d(320); - - message->AddExtension(unittest::repeated_nested_enum_extension , unittest::TestAllTypes::BAZ); - message->AddExtension(unittest::repeated_foreign_enum_extension, unittest::FOREIGN_BAZ ); - message->AddExtension(unittest::repeated_import_enum_extension , unittest_import::IMPORT_BAZ); - - message->AddExtension(unittest::repeated_string_piece_extension, "324"); - message->AddExtension(unittest::repeated_cord_extension, "325"); - - // ----------------------------------------------------------------- - - message->SetExtension(unittest::default_int32_extension , 401); - message->SetExtension(unittest::default_int64_extension , 402); - message->SetExtension(unittest::default_uint32_extension , 403); - message->SetExtension(unittest::default_uint64_extension , 404); - message->SetExtension(unittest::default_sint32_extension , 405); - message->SetExtension(unittest::default_sint64_extension , 406); - message->SetExtension(unittest::default_fixed32_extension , 407); - message->SetExtension(unittest::default_fixed64_extension , 408); - message->SetExtension(unittest::default_sfixed32_extension, 409); - message->SetExtension(unittest::default_sfixed64_extension, 410); - message->SetExtension(unittest::default_float_extension , 411); - message->SetExtension(unittest::default_double_extension , 412); - message->SetExtension(unittest::default_bool_extension , false); - message->SetExtension(unittest::default_string_extension , "415"); - message->SetExtension(unittest::default_bytes_extension , "416"); - - message->SetExtension(unittest::default_nested_enum_extension , unittest::TestAllTypes::FOO); - message->SetExtension(unittest::default_foreign_enum_extension, unittest::FOREIGN_FOO ); - message->SetExtension(unittest::default_import_enum_extension , unittest_import::IMPORT_FOO); - - message->SetExtension(unittest::default_string_piece_extension, "424"); - message->SetExtension(unittest::default_cord_extension, "425"); -} - -// ------------------------------------------------------------------- - -void TestUtil::SetAllFieldsAndExtensions( - unittest::TestFieldOrderings* message) { - GOOGLE_CHECK(message); - message->set_my_int(1); - message->set_my_string("foo"); - message->set_my_float(1.0); - message->SetExtension(unittest::my_extension_int, 23); - message->SetExtension(unittest::my_extension_string, "bar"); -} - -// ------------------------------------------------------------------- - -void TestUtil::ModifyRepeatedExtensions(unittest::TestAllExtensions* message) { - message->SetExtension(unittest::repeated_int32_extension , 1, 501); - message->SetExtension(unittest::repeated_int64_extension , 1, 502); - message->SetExtension(unittest::repeated_uint32_extension , 1, 503); - message->SetExtension(unittest::repeated_uint64_extension , 1, 504); - message->SetExtension(unittest::repeated_sint32_extension , 1, 505); - message->SetExtension(unittest::repeated_sint64_extension , 1, 506); - message->SetExtension(unittest::repeated_fixed32_extension , 1, 507); - message->SetExtension(unittest::repeated_fixed64_extension , 1, 508); - message->SetExtension(unittest::repeated_sfixed32_extension, 1, 509); - message->SetExtension(unittest::repeated_sfixed64_extension, 1, 510); - message->SetExtension(unittest::repeated_float_extension , 1, 511); - message->SetExtension(unittest::repeated_double_extension , 1, 512); - message->SetExtension(unittest::repeated_bool_extension , 1, true); - message->SetExtension(unittest::repeated_string_extension , 1, "515"); - message->SetExtension(unittest::repeated_bytes_extension , 1, "516"); - - message->MutableExtension(unittest::repeatedgroup_extension , 1)->set_a(517); - message->MutableExtension(unittest::repeated_nested_message_extension , 1)->set_bb(518); - message->MutableExtension(unittest::repeated_foreign_message_extension, 1)->set_c(519); - message->MutableExtension(unittest::repeated_import_message_extension , 1)->set_d(520); - - message->SetExtension(unittest::repeated_nested_enum_extension , 1, unittest::TestAllTypes::FOO); - message->SetExtension(unittest::repeated_foreign_enum_extension, 1, unittest::FOREIGN_FOO ); - message->SetExtension(unittest::repeated_import_enum_extension , 1, unittest_import::IMPORT_FOO); - - message->SetExtension(unittest::repeated_string_piece_extension, 1, "524"); - message->SetExtension(unittest::repeated_cord_extension, 1, "525"); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectAllExtensionsSet( - const unittest::TestAllExtensions& message) { - EXPECT_TRUE(message.HasExtension(unittest::optional_int32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_int64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_uint32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_uint64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sint32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sint64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_fixed32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_fixed64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sfixed32_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_sfixed64_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_float_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_double_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_bool_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_string_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_bytes_extension )); - - EXPECT_TRUE(message.HasExtension(unittest::optionalgroup_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_nested_message_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_foreign_message_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_import_message_extension )); - - EXPECT_TRUE(message.GetExtension(unittest::optionalgroup_extension ).has_a()); - EXPECT_TRUE(message.GetExtension(unittest::optional_nested_message_extension ).has_bb()); - EXPECT_TRUE(message.GetExtension(unittest::optional_foreign_message_extension).has_c()); - EXPECT_TRUE(message.GetExtension(unittest::optional_import_message_extension ).has_d()); - - EXPECT_TRUE(message.HasExtension(unittest::optional_nested_enum_extension )); - EXPECT_TRUE(message.HasExtension(unittest::optional_foreign_enum_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_import_enum_extension )); - - EXPECT_TRUE(message.HasExtension(unittest::optional_string_piece_extension)); - EXPECT_TRUE(message.HasExtension(unittest::optional_cord_extension)); - - EXPECT_EQ(101 , message.GetExtension(unittest::optional_int32_extension )); - EXPECT_EQ(102 , message.GetExtension(unittest::optional_int64_extension )); - EXPECT_EQ(103 , message.GetExtension(unittest::optional_uint32_extension )); - EXPECT_EQ(104 , message.GetExtension(unittest::optional_uint64_extension )); - EXPECT_EQ(105 , message.GetExtension(unittest::optional_sint32_extension )); - EXPECT_EQ(106 , message.GetExtension(unittest::optional_sint64_extension )); - EXPECT_EQ(107 , message.GetExtension(unittest::optional_fixed32_extension )); - EXPECT_EQ(108 , message.GetExtension(unittest::optional_fixed64_extension )); - EXPECT_EQ(109 , message.GetExtension(unittest::optional_sfixed32_extension)); - EXPECT_EQ(110 , message.GetExtension(unittest::optional_sfixed64_extension)); - EXPECT_EQ(111 , message.GetExtension(unittest::optional_float_extension )); - EXPECT_EQ(112 , message.GetExtension(unittest::optional_double_extension )); - EXPECT_EQ(true , message.GetExtension(unittest::optional_bool_extension )); - EXPECT_EQ("115", message.GetExtension(unittest::optional_string_extension )); - EXPECT_EQ("116", message.GetExtension(unittest::optional_bytes_extension )); - - EXPECT_EQ(117, message.GetExtension(unittest::optionalgroup_extension ).a()); - EXPECT_EQ(118, message.GetExtension(unittest::optional_nested_message_extension ).bb()); - EXPECT_EQ(119, message.GetExtension(unittest::optional_foreign_message_extension).c()); - EXPECT_EQ(120, message.GetExtension(unittest::optional_import_message_extension ).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.GetExtension(unittest::optional_nested_enum_extension )); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.GetExtension(unittest::optional_foreign_enum_extension)); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.GetExtension(unittest::optional_import_enum_extension )); - - EXPECT_EQ("124", message.GetExtension(unittest::optional_string_piece_extension)); - EXPECT_EQ("125", message.GetExtension(unittest::optional_cord_extension)); - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_float_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_double_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bool_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bytes_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeatedgroup_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_message_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_enum_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_piece_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_cord_extension)); - - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension , 0)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension , 0)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension , 0)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension , 0)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension , 0)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension , 0)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension , 0)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension , 0)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension, 0)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension , 0).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension , 0).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension, 0).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension , 0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.GetExtension(unittest::repeated_nested_enum_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension, 0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.GetExtension(unittest::repeated_import_enum_extension , 0)); - - EXPECT_EQ("224", message.GetExtension(unittest::repeated_string_piece_extension, 0)); - EXPECT_EQ("225", message.GetExtension(unittest::repeated_cord_extension, 0)); - - EXPECT_EQ(301 , message.GetExtension(unittest::repeated_int32_extension , 1)); - EXPECT_EQ(302 , message.GetExtension(unittest::repeated_int64_extension , 1)); - EXPECT_EQ(303 , message.GetExtension(unittest::repeated_uint32_extension , 1)); - EXPECT_EQ(304 , message.GetExtension(unittest::repeated_uint64_extension , 1)); - EXPECT_EQ(305 , message.GetExtension(unittest::repeated_sint32_extension , 1)); - EXPECT_EQ(306 , message.GetExtension(unittest::repeated_sint64_extension , 1)); - EXPECT_EQ(307 , message.GetExtension(unittest::repeated_fixed32_extension , 1)); - EXPECT_EQ(308 , message.GetExtension(unittest::repeated_fixed64_extension , 1)); - EXPECT_EQ(309 , message.GetExtension(unittest::repeated_sfixed32_extension, 1)); - EXPECT_EQ(310 , message.GetExtension(unittest::repeated_sfixed64_extension, 1)); - EXPECT_EQ(311 , message.GetExtension(unittest::repeated_float_extension , 1)); - EXPECT_EQ(312 , message.GetExtension(unittest::repeated_double_extension , 1)); - EXPECT_EQ(false, message.GetExtension(unittest::repeated_bool_extension , 1)); - EXPECT_EQ("315", message.GetExtension(unittest::repeated_string_extension , 1)); - EXPECT_EQ("316", message.GetExtension(unittest::repeated_bytes_extension , 1)); - - EXPECT_EQ(317, message.GetExtension(unittest::repeatedgroup_extension , 1).a()); - EXPECT_EQ(318, message.GetExtension(unittest::repeated_nested_message_extension , 1).bb()); - EXPECT_EQ(319, message.GetExtension(unittest::repeated_foreign_message_extension, 1).c()); - EXPECT_EQ(320, message.GetExtension(unittest::repeated_import_message_extension , 1).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.GetExtension(unittest::repeated_nested_enum_extension , 1)); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.GetExtension(unittest::repeated_foreign_enum_extension, 1)); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.GetExtension(unittest::repeated_import_enum_extension , 1)); - - EXPECT_EQ("324", message.GetExtension(unittest::repeated_string_piece_extension, 1)); - EXPECT_EQ("325", message.GetExtension(unittest::repeated_cord_extension, 1)); - - // ----------------------------------------------------------------- - - EXPECT_TRUE(message.HasExtension(unittest::default_int32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_int64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_uint32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_uint64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_sint32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_sint64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_fixed32_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_fixed64_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_sfixed32_extension)); - EXPECT_TRUE(message.HasExtension(unittest::default_sfixed64_extension)); - EXPECT_TRUE(message.HasExtension(unittest::default_float_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_double_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_bool_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_string_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_bytes_extension )); - - EXPECT_TRUE(message.HasExtension(unittest::default_nested_enum_extension )); - EXPECT_TRUE(message.HasExtension(unittest::default_foreign_enum_extension)); - EXPECT_TRUE(message.HasExtension(unittest::default_import_enum_extension )); - - EXPECT_TRUE(message.HasExtension(unittest::default_string_piece_extension)); - EXPECT_TRUE(message.HasExtension(unittest::default_cord_extension)); - - EXPECT_EQ(401 , message.GetExtension(unittest::default_int32_extension )); - EXPECT_EQ(402 , message.GetExtension(unittest::default_int64_extension )); - EXPECT_EQ(403 , message.GetExtension(unittest::default_uint32_extension )); - EXPECT_EQ(404 , message.GetExtension(unittest::default_uint64_extension )); - EXPECT_EQ(405 , message.GetExtension(unittest::default_sint32_extension )); - EXPECT_EQ(406 , message.GetExtension(unittest::default_sint64_extension )); - EXPECT_EQ(407 , message.GetExtension(unittest::default_fixed32_extension )); - EXPECT_EQ(408 , message.GetExtension(unittest::default_fixed64_extension )); - EXPECT_EQ(409 , message.GetExtension(unittest::default_sfixed32_extension)); - EXPECT_EQ(410 , message.GetExtension(unittest::default_sfixed64_extension)); - EXPECT_EQ(411 , message.GetExtension(unittest::default_float_extension )); - EXPECT_EQ(412 , message.GetExtension(unittest::default_double_extension )); - EXPECT_EQ(false, message.GetExtension(unittest::default_bool_extension )); - EXPECT_EQ("415", message.GetExtension(unittest::default_string_extension )); - EXPECT_EQ("416", message.GetExtension(unittest::default_bytes_extension )); - - EXPECT_EQ(unittest::TestAllTypes::FOO, message.GetExtension(unittest::default_nested_enum_extension )); - EXPECT_EQ(unittest::FOREIGN_FOO , message.GetExtension(unittest::default_foreign_enum_extension)); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.GetExtension(unittest::default_import_enum_extension )); - - EXPECT_EQ("424", message.GetExtension(unittest::default_string_piece_extension)); - EXPECT_EQ("425", message.GetExtension(unittest::default_cord_extension)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectExtensionsClear( - const unittest::TestAllExtensions& message) { - string serialized; - ASSERT_TRUE(message.SerializeToString(&serialized)); - EXPECT_EQ("", serialized); - EXPECT_EQ(0, message.ByteSize()); - - // has_blah() should initially be false for all optional fields. - EXPECT_FALSE(message.HasExtension(unittest::optional_int32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_int64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_uint32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_uint64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sint32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sint64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_fixed32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_fixed64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sfixed32_extension)); - EXPECT_FALSE(message.HasExtension(unittest::optional_sfixed64_extension)); - EXPECT_FALSE(message.HasExtension(unittest::optional_float_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_double_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_bool_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_string_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_bytes_extension )); - - EXPECT_FALSE(message.HasExtension(unittest::optionalgroup_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_nested_message_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_foreign_message_extension)); - EXPECT_FALSE(message.HasExtension(unittest::optional_import_message_extension )); - - EXPECT_FALSE(message.HasExtension(unittest::optional_nested_enum_extension )); - EXPECT_FALSE(message.HasExtension(unittest::optional_foreign_enum_extension)); - EXPECT_FALSE(message.HasExtension(unittest::optional_import_enum_extension )); - - EXPECT_FALSE(message.HasExtension(unittest::optional_string_piece_extension)); - EXPECT_FALSE(message.HasExtension(unittest::optional_cord_extension)); - - // Optional fields without defaults are set to zero or something like it. - EXPECT_EQ(0 , message.GetExtension(unittest::optional_int32_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_int64_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_uint32_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_uint64_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sint32_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sint64_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_fixed32_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_fixed64_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sfixed32_extension)); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sfixed64_extension)); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_float_extension )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_double_extension )); - EXPECT_EQ(false, message.GetExtension(unittest::optional_bool_extension )); - EXPECT_EQ("" , message.GetExtension(unittest::optional_string_extension )); - EXPECT_EQ("" , message.GetExtension(unittest::optional_bytes_extension )); - - // Embedded messages should also be clear. - EXPECT_FALSE(message.GetExtension(unittest::optionalgroup_extension ).has_a()); - EXPECT_FALSE(message.GetExtension(unittest::optional_nested_message_extension ).has_bb()); - EXPECT_FALSE(message.GetExtension(unittest::optional_foreign_message_extension).has_c()); - EXPECT_FALSE(message.GetExtension(unittest::optional_import_message_extension ).has_d()); - - EXPECT_EQ(0, message.GetExtension(unittest::optionalgroup_extension ).a()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_nested_message_extension ).bb()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_foreign_message_extension).c()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_import_message_extension ).d()); - - // Enums without defaults are set to the first value in the enum. - EXPECT_EQ(unittest::TestAllTypes::FOO, message.GetExtension(unittest::optional_nested_enum_extension )); - EXPECT_EQ(unittest::FOREIGN_FOO , message.GetExtension(unittest::optional_foreign_enum_extension)); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.GetExtension(unittest::optional_import_enum_extension )); - - EXPECT_EQ("", message.GetExtension(unittest::optional_string_piece_extension)); - EXPECT_EQ("", message.GetExtension(unittest::optional_cord_extension)); - - // Repeated fields are empty. - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_int32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_int64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_uint32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_uint64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sint32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sint64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_fixed32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_fixed64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sfixed32_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sfixed64_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_float_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_double_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_bool_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_string_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_bytes_extension )); - - EXPECT_EQ(0, message.ExtensionSize(unittest::repeatedgroup_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_nested_message_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_foreign_message_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_import_message_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_nested_enum_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_foreign_enum_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_import_enum_extension )); - - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_string_piece_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_cord_extension)); - - // has_blah() should also be false for all default fields. - EXPECT_FALSE(message.HasExtension(unittest::default_int32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_int64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_uint32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_uint64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_sint32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_sint64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_fixed32_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_fixed64_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_sfixed32_extension)); - EXPECT_FALSE(message.HasExtension(unittest::default_sfixed64_extension)); - EXPECT_FALSE(message.HasExtension(unittest::default_float_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_double_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_bool_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_string_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_bytes_extension )); - - EXPECT_FALSE(message.HasExtension(unittest::default_nested_enum_extension )); - EXPECT_FALSE(message.HasExtension(unittest::default_foreign_enum_extension)); - EXPECT_FALSE(message.HasExtension(unittest::default_import_enum_extension )); - - EXPECT_FALSE(message.HasExtension(unittest::default_string_piece_extension)); - EXPECT_FALSE(message.HasExtension(unittest::default_cord_extension)); - - // Fields with defaults have their default values (duh). - EXPECT_EQ( 41 , message.GetExtension(unittest::default_int32_extension )); - EXPECT_EQ( 42 , message.GetExtension(unittest::default_int64_extension )); - EXPECT_EQ( 43 , message.GetExtension(unittest::default_uint32_extension )); - EXPECT_EQ( 44 , message.GetExtension(unittest::default_uint64_extension )); - EXPECT_EQ(-45 , message.GetExtension(unittest::default_sint32_extension )); - EXPECT_EQ( 46 , message.GetExtension(unittest::default_sint64_extension )); - EXPECT_EQ( 47 , message.GetExtension(unittest::default_fixed32_extension )); - EXPECT_EQ( 48 , message.GetExtension(unittest::default_fixed64_extension )); - EXPECT_EQ( 49 , message.GetExtension(unittest::default_sfixed32_extension)); - EXPECT_EQ(-50 , message.GetExtension(unittest::default_sfixed64_extension)); - EXPECT_EQ( 51.5 , message.GetExtension(unittest::default_float_extension )); - EXPECT_EQ( 52e3 , message.GetExtension(unittest::default_double_extension )); - EXPECT_EQ(true , message.GetExtension(unittest::default_bool_extension )); - EXPECT_EQ("hello", message.GetExtension(unittest::default_string_extension )); - EXPECT_EQ("world", message.GetExtension(unittest::default_bytes_extension )); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.GetExtension(unittest::default_nested_enum_extension )); - EXPECT_EQ(unittest::FOREIGN_BAR , message.GetExtension(unittest::default_foreign_enum_extension)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.GetExtension(unittest::default_import_enum_extension )); - - EXPECT_EQ("abc", message.GetExtension(unittest::default_string_piece_extension)); - EXPECT_EQ("123", message.GetExtension(unittest::default_cord_extension)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectRepeatedExtensionsModified( - const unittest::TestAllExtensions& message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_float_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_double_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bool_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bytes_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeatedgroup_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_message_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_enum_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_piece_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_cord_extension)); - - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension , 0)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension , 0)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension , 0)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension , 0)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension , 0)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension , 0)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension , 0)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension , 0)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension, 0)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension , 0).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension , 0).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension, 0).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension , 0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.GetExtension(unittest::repeated_nested_enum_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension, 0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.GetExtension(unittest::repeated_import_enum_extension , 0)); - - EXPECT_EQ("224", message.GetExtension(unittest::repeated_string_piece_extension, 0)); - EXPECT_EQ("225", message.GetExtension(unittest::repeated_cord_extension, 0)); - - // Actually verify the second (modified) elements now. - EXPECT_EQ(501 , message.GetExtension(unittest::repeated_int32_extension , 1)); - EXPECT_EQ(502 , message.GetExtension(unittest::repeated_int64_extension , 1)); - EXPECT_EQ(503 , message.GetExtension(unittest::repeated_uint32_extension , 1)); - EXPECT_EQ(504 , message.GetExtension(unittest::repeated_uint64_extension , 1)); - EXPECT_EQ(505 , message.GetExtension(unittest::repeated_sint32_extension , 1)); - EXPECT_EQ(506 , message.GetExtension(unittest::repeated_sint64_extension , 1)); - EXPECT_EQ(507 , message.GetExtension(unittest::repeated_fixed32_extension , 1)); - EXPECT_EQ(508 , message.GetExtension(unittest::repeated_fixed64_extension , 1)); - EXPECT_EQ(509 , message.GetExtension(unittest::repeated_sfixed32_extension, 1)); - EXPECT_EQ(510 , message.GetExtension(unittest::repeated_sfixed64_extension, 1)); - EXPECT_EQ(511 , message.GetExtension(unittest::repeated_float_extension , 1)); - EXPECT_EQ(512 , message.GetExtension(unittest::repeated_double_extension , 1)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 1)); - EXPECT_EQ("515", message.GetExtension(unittest::repeated_string_extension , 1)); - EXPECT_EQ("516", message.GetExtension(unittest::repeated_bytes_extension , 1)); - - EXPECT_EQ(517, message.GetExtension(unittest::repeatedgroup_extension , 1).a()); - EXPECT_EQ(518, message.GetExtension(unittest::repeated_nested_message_extension , 1).bb()); - EXPECT_EQ(519, message.GetExtension(unittest::repeated_foreign_message_extension, 1).c()); - EXPECT_EQ(520, message.GetExtension(unittest::repeated_import_message_extension , 1).d()); - - EXPECT_EQ(unittest::TestAllTypes::FOO, message.GetExtension(unittest::repeated_nested_enum_extension , 1)); - EXPECT_EQ(unittest::FOREIGN_FOO , message.GetExtension(unittest::repeated_foreign_enum_extension, 1)); - EXPECT_EQ(unittest_import::IMPORT_FOO, message.GetExtension(unittest::repeated_import_enum_extension , 1)); - - EXPECT_EQ("524", message.GetExtension(unittest::repeated_string_piece_extension, 1)); - EXPECT_EQ("525", message.GetExtension(unittest::repeated_cord_extension, 1)); -} - -// ------------------------------------------------------------------- - -void TestUtil::SetPackedExtensions(unittest::TestPackedExtensions* message) { - message->AddExtension(unittest::packed_int32_extension , 601); - message->AddExtension(unittest::packed_int64_extension , 602); - message->AddExtension(unittest::packed_uint32_extension , 603); - message->AddExtension(unittest::packed_uint64_extension , 604); - message->AddExtension(unittest::packed_sint32_extension , 605); - message->AddExtension(unittest::packed_sint64_extension , 606); - message->AddExtension(unittest::packed_fixed32_extension , 607); - message->AddExtension(unittest::packed_fixed64_extension , 608); - message->AddExtension(unittest::packed_sfixed32_extension, 609); - message->AddExtension(unittest::packed_sfixed64_extension, 610); - message->AddExtension(unittest::packed_float_extension , 611); - message->AddExtension(unittest::packed_double_extension , 612); - message->AddExtension(unittest::packed_bool_extension , true); - message->AddExtension(unittest::packed_enum_extension, unittest::FOREIGN_BAR); - // add a second one of each field - message->AddExtension(unittest::packed_int32_extension , 701); - message->AddExtension(unittest::packed_int64_extension , 702); - message->AddExtension(unittest::packed_uint32_extension , 703); - message->AddExtension(unittest::packed_uint64_extension , 704); - message->AddExtension(unittest::packed_sint32_extension , 705); - message->AddExtension(unittest::packed_sint64_extension , 706); - message->AddExtension(unittest::packed_fixed32_extension , 707); - message->AddExtension(unittest::packed_fixed64_extension , 708); - message->AddExtension(unittest::packed_sfixed32_extension, 709); - message->AddExtension(unittest::packed_sfixed64_extension, 710); - message->AddExtension(unittest::packed_float_extension , 711); - message->AddExtension(unittest::packed_double_extension , 712); - message->AddExtension(unittest::packed_bool_extension , false); - message->AddExtension(unittest::packed_enum_extension, unittest::FOREIGN_BAZ); -} - -// ------------------------------------------------------------------- - -void TestUtil::ModifyPackedExtensions(unittest::TestPackedExtensions* message) { - message->SetExtension(unittest::packed_int32_extension , 1, 801); - message->SetExtension(unittest::packed_int64_extension , 1, 802); - message->SetExtension(unittest::packed_uint32_extension , 1, 803); - message->SetExtension(unittest::packed_uint64_extension , 1, 804); - message->SetExtension(unittest::packed_sint32_extension , 1, 805); - message->SetExtension(unittest::packed_sint64_extension , 1, 806); - message->SetExtension(unittest::packed_fixed32_extension , 1, 807); - message->SetExtension(unittest::packed_fixed64_extension , 1, 808); - message->SetExtension(unittest::packed_sfixed32_extension, 1, 809); - message->SetExtension(unittest::packed_sfixed64_extension, 1, 810); - message->SetExtension(unittest::packed_float_extension , 1, 811); - message->SetExtension(unittest::packed_double_extension , 1, 812); - message->SetExtension(unittest::packed_bool_extension , 1, true); - message->SetExtension(unittest::packed_enum_extension , 1, - unittest::FOREIGN_FOO); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedExtensionsSet( - const unittest::TestPackedExtensions& message) { - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_float_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_double_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_bool_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_enum_extension )); - - EXPECT_EQ(601 , message.GetExtension(unittest::packed_int32_extension , 0)); - EXPECT_EQ(602 , message.GetExtension(unittest::packed_int64_extension , 0)); - EXPECT_EQ(603 , message.GetExtension(unittest::packed_uint32_extension , 0)); - EXPECT_EQ(604 , message.GetExtension(unittest::packed_uint64_extension , 0)); - EXPECT_EQ(605 , message.GetExtension(unittest::packed_sint32_extension , 0)); - EXPECT_EQ(606 , message.GetExtension(unittest::packed_sint64_extension , 0)); - EXPECT_EQ(607 , message.GetExtension(unittest::packed_fixed32_extension , 0)); - EXPECT_EQ(608 , message.GetExtension(unittest::packed_fixed64_extension , 0)); - EXPECT_EQ(609 , message.GetExtension(unittest::packed_sfixed32_extension, 0)); - EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension, 0)); - EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension , 0)); - EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAR, - message.GetExtension(unittest::packed_enum_extension, 0)); - EXPECT_EQ(701 , message.GetExtension(unittest::packed_int32_extension , 1)); - EXPECT_EQ(702 , message.GetExtension(unittest::packed_int64_extension , 1)); - EXPECT_EQ(703 , message.GetExtension(unittest::packed_uint32_extension , 1)); - EXPECT_EQ(704 , message.GetExtension(unittest::packed_uint64_extension , 1)); - EXPECT_EQ(705 , message.GetExtension(unittest::packed_sint32_extension , 1)); - EXPECT_EQ(706 , message.GetExtension(unittest::packed_sint64_extension , 1)); - EXPECT_EQ(707 , message.GetExtension(unittest::packed_fixed32_extension , 1)); - EXPECT_EQ(708 , message.GetExtension(unittest::packed_fixed64_extension , 1)); - EXPECT_EQ(709 , message.GetExtension(unittest::packed_sfixed32_extension, 1)); - EXPECT_EQ(710 , message.GetExtension(unittest::packed_sfixed64_extension, 1)); - EXPECT_EQ(711 , message.GetExtension(unittest::packed_float_extension , 1)); - EXPECT_EQ(712 , message.GetExtension(unittest::packed_double_extension , 1)); - EXPECT_EQ(false, message.GetExtension(unittest::packed_bool_extension , 1)); - EXPECT_EQ(unittest::FOREIGN_BAZ, - message.GetExtension(unittest::packed_enum_extension, 1)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedExtensionsClear( - const unittest::TestPackedExtensions& message) { - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_int32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_int64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_uint32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_uint64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sint32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sint64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_fixed32_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_fixed64_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sfixed32_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sfixed64_extension)); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_float_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_double_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_bool_extension )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_enum_extension )); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectPackedExtensionsModified( - const unittest::TestPackedExtensions& message) { - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_float_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_double_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_bool_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_enum_extension )); - EXPECT_EQ(601 , message.GetExtension(unittest::packed_int32_extension , 0)); - EXPECT_EQ(602 , message.GetExtension(unittest::packed_int64_extension , 0)); - EXPECT_EQ(603 , message.GetExtension(unittest::packed_uint32_extension , 0)); - EXPECT_EQ(604 , message.GetExtension(unittest::packed_uint64_extension , 0)); - EXPECT_EQ(605 , message.GetExtension(unittest::packed_sint32_extension , 0)); - EXPECT_EQ(606 , message.GetExtension(unittest::packed_sint64_extension , 0)); - EXPECT_EQ(607 , message.GetExtension(unittest::packed_fixed32_extension , 0)); - EXPECT_EQ(608 , message.GetExtension(unittest::packed_fixed64_extension , 0)); - EXPECT_EQ(609 , message.GetExtension(unittest::packed_sfixed32_extension, 0)); - EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension, 0)); - EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension , 0)); - EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAR, - message.GetExtension(unittest::packed_enum_extension, 0)); - - // Actually verify the second (modified) elements now. - EXPECT_EQ(801 , message.GetExtension(unittest::packed_int32_extension , 1)); - EXPECT_EQ(802 , message.GetExtension(unittest::packed_int64_extension , 1)); - EXPECT_EQ(803 , message.GetExtension(unittest::packed_uint32_extension , 1)); - EXPECT_EQ(804 , message.GetExtension(unittest::packed_uint64_extension , 1)); - EXPECT_EQ(805 , message.GetExtension(unittest::packed_sint32_extension , 1)); - EXPECT_EQ(806 , message.GetExtension(unittest::packed_sint64_extension , 1)); - EXPECT_EQ(807 , message.GetExtension(unittest::packed_fixed32_extension , 1)); - EXPECT_EQ(808 , message.GetExtension(unittest::packed_fixed64_extension , 1)); - EXPECT_EQ(809 , message.GetExtension(unittest::packed_sfixed32_extension, 1)); - EXPECT_EQ(810 , message.GetExtension(unittest::packed_sfixed64_extension, 1)); - EXPECT_EQ(811 , message.GetExtension(unittest::packed_float_extension , 1)); - EXPECT_EQ(812 , message.GetExtension(unittest::packed_double_extension , 1)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 1)); - EXPECT_EQ(unittest::FOREIGN_FOO, - message.GetExtension(unittest::packed_enum_extension, 1)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ExpectAllFieldsAndExtensionsInOrder(const string& serialized) { - // We set each field individually, serialize separately, and concatenate all - // the strings in canonical order to determine the expected serialization. - string expected; - unittest::TestFieldOrderings message; - message.set_my_int(1); // Field 1. - message.AppendToString(&expected); - message.Clear(); - message.SetExtension(unittest::my_extension_int, 23); // Field 5. - message.AppendToString(&expected); - message.Clear(); - message.set_my_string("foo"); // Field 11. - message.AppendToString(&expected); - message.Clear(); - message.SetExtension(unittest::my_extension_string, "bar"); // Field 50. - message.AppendToString(&expected); - message.Clear(); - message.set_my_float(1.0); // Field 101. - message.AppendToString(&expected); - message.Clear(); - - // We don't EXPECT_EQ() since we don't want to print raw bytes to stdout. - EXPECT_TRUE(serialized == expected); -} - -void TestUtil::ExpectLastRepeatedsRemoved( - const unittest::TestAllTypes& message) { - ASSERT_EQ(1, message.repeated_int32_size ()); - ASSERT_EQ(1, message.repeated_int64_size ()); - ASSERT_EQ(1, message.repeated_uint32_size ()); - ASSERT_EQ(1, message.repeated_uint64_size ()); - ASSERT_EQ(1, message.repeated_sint32_size ()); - ASSERT_EQ(1, message.repeated_sint64_size ()); - ASSERT_EQ(1, message.repeated_fixed32_size ()); - ASSERT_EQ(1, message.repeated_fixed64_size ()); - ASSERT_EQ(1, message.repeated_sfixed32_size()); - ASSERT_EQ(1, message.repeated_sfixed64_size()); - ASSERT_EQ(1, message.repeated_float_size ()); - ASSERT_EQ(1, message.repeated_double_size ()); - ASSERT_EQ(1, message.repeated_bool_size ()); - ASSERT_EQ(1, message.repeated_string_size ()); - ASSERT_EQ(1, message.repeated_bytes_size ()); - - ASSERT_EQ(1, message.repeatedgroup_size ()); - ASSERT_EQ(1, message.repeated_nested_message_size ()); - ASSERT_EQ(1, message.repeated_foreign_message_size()); - ASSERT_EQ(1, message.repeated_import_message_size ()); - ASSERT_EQ(1, message.repeated_nested_enum_size ()); - ASSERT_EQ(1, message.repeated_foreign_enum_size ()); - ASSERT_EQ(1, message.repeated_import_enum_size ()); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - ASSERT_EQ(1, message.repeated_string_piece_size()); - ASSERT_EQ(1, message.repeated_cord_size()); -#endif - - // Test that the remaining element is the correct one. - EXPECT_EQ(201 , message.repeated_int32 (0)); - EXPECT_EQ(202 , message.repeated_int64 (0)); - EXPECT_EQ(203 , message.repeated_uint32 (0)); - EXPECT_EQ(204 , message.repeated_uint64 (0)); - EXPECT_EQ(205 , message.repeated_sint32 (0)); - EXPECT_EQ(206 , message.repeated_sint64 (0)); - EXPECT_EQ(207 , message.repeated_fixed32 (0)); - EXPECT_EQ(208 , message.repeated_fixed64 (0)); - EXPECT_EQ(209 , message.repeated_sfixed32(0)); - EXPECT_EQ(210 , message.repeated_sfixed64(0)); - EXPECT_EQ(211 , message.repeated_float (0)); - EXPECT_EQ(212 , message.repeated_double (0)); - EXPECT_EQ(true , message.repeated_bool (0)); - EXPECT_EQ("215", message.repeated_string (0)); - EXPECT_EQ("216", message.repeated_bytes (0)); - - EXPECT_EQ(217, message.repeatedgroup (0).a()); - EXPECT_EQ(218, message.repeated_nested_message (0).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(0).c()); - EXPECT_EQ(220, message.repeated_import_message (0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.repeated_import_enum (0)); -} - -void TestUtil::ExpectLastRepeatedExtensionsRemoved( - const unittest::TestAllExtensions& message) { - - // Test that one element was removed. - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_int32_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_int64_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_uint32_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_uint64_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_sint32_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_sint64_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_fixed32_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_fixed64_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_sfixed32_extension)); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_sfixed64_extension)); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_float_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_double_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_bool_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_string_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_bytes_extension )); - - ASSERT_EQ(1, message.ExtensionSize(unittest::repeatedgroup_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_nested_message_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_foreign_message_extension)); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_import_message_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_nested_enum_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_foreign_enum_extension )); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_import_enum_extension )); - - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_string_piece_extension)); - ASSERT_EQ(1, message.ExtensionSize(unittest::repeated_cord_extension)); - - // Test that the remaining element is the correct one. - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension , 0)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension , 0)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension , 0)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension , 0)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension , 0)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension , 0)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension , 0)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension , 0)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension, 0)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension , 0).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension , 0).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension, 0).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension , 0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.GetExtension(unittest::repeated_nested_enum_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension, 0)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.GetExtension(unittest::repeated_import_enum_extension , 0)); - - EXPECT_EQ("224", message.GetExtension(unittest::repeated_string_piece_extension, 0)); - EXPECT_EQ("225", message.GetExtension(unittest::repeated_cord_extension, 0)); -} - -void TestUtil::ExpectRepeatedsSwapped( - const unittest::TestAllTypes& message) { - ASSERT_EQ(2, message.repeated_int32_size ()); - ASSERT_EQ(2, message.repeated_int64_size ()); - ASSERT_EQ(2, message.repeated_uint32_size ()); - ASSERT_EQ(2, message.repeated_uint64_size ()); - ASSERT_EQ(2, message.repeated_sint32_size ()); - ASSERT_EQ(2, message.repeated_sint64_size ()); - ASSERT_EQ(2, message.repeated_fixed32_size ()); - ASSERT_EQ(2, message.repeated_fixed64_size ()); - ASSERT_EQ(2, message.repeated_sfixed32_size()); - ASSERT_EQ(2, message.repeated_sfixed64_size()); - ASSERT_EQ(2, message.repeated_float_size ()); - ASSERT_EQ(2, message.repeated_double_size ()); - ASSERT_EQ(2, message.repeated_bool_size ()); - ASSERT_EQ(2, message.repeated_string_size ()); - ASSERT_EQ(2, message.repeated_bytes_size ()); - - ASSERT_EQ(2, message.repeatedgroup_size ()); - ASSERT_EQ(2, message.repeated_nested_message_size ()); - ASSERT_EQ(2, message.repeated_foreign_message_size()); - ASSERT_EQ(2, message.repeated_import_message_size ()); - ASSERT_EQ(2, message.repeated_nested_enum_size ()); - ASSERT_EQ(2, message.repeated_foreign_enum_size ()); - ASSERT_EQ(2, message.repeated_import_enum_size ()); - -#ifndef PROTOBUF_TEST_NO_DESCRIPTORS - ASSERT_EQ(2, message.repeated_string_piece_size()); - ASSERT_EQ(2, message.repeated_cord_size()); -#endif - - // Test that the first element and second element are flipped. - EXPECT_EQ(201 , message.repeated_int32 (1)); - EXPECT_EQ(202 , message.repeated_int64 (1)); - EXPECT_EQ(203 , message.repeated_uint32 (1)); - EXPECT_EQ(204 , message.repeated_uint64 (1)); - EXPECT_EQ(205 , message.repeated_sint32 (1)); - EXPECT_EQ(206 , message.repeated_sint64 (1)); - EXPECT_EQ(207 , message.repeated_fixed32 (1)); - EXPECT_EQ(208 , message.repeated_fixed64 (1)); - EXPECT_EQ(209 , message.repeated_sfixed32(1)); - EXPECT_EQ(210 , message.repeated_sfixed64(1)); - EXPECT_EQ(211 , message.repeated_float (1)); - EXPECT_EQ(212 , message.repeated_double (1)); - EXPECT_EQ(true , message.repeated_bool (1)); - EXPECT_EQ("215", message.repeated_string (1)); - EXPECT_EQ("216", message.repeated_bytes (1)); - - EXPECT_EQ(217, message.repeatedgroup (1).a()); - EXPECT_EQ(218, message.repeated_nested_message (1).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(1).c()); - EXPECT_EQ(220, message.repeated_import_message (1).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.repeated_nested_enum (1)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.repeated_foreign_enum(1)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.repeated_import_enum (1)); - - EXPECT_EQ(301 , message.repeated_int32 (0)); - EXPECT_EQ(302 , message.repeated_int64 (0)); - EXPECT_EQ(303 , message.repeated_uint32 (0)); - EXPECT_EQ(304 , message.repeated_uint64 (0)); - EXPECT_EQ(305 , message.repeated_sint32 (0)); - EXPECT_EQ(306 , message.repeated_sint64 (0)); - EXPECT_EQ(307 , message.repeated_fixed32 (0)); - EXPECT_EQ(308 , message.repeated_fixed64 (0)); - EXPECT_EQ(309 , message.repeated_sfixed32(0)); - EXPECT_EQ(310 , message.repeated_sfixed64(0)); - EXPECT_EQ(311 , message.repeated_float (0)); - EXPECT_EQ(312 , message.repeated_double (0)); - EXPECT_EQ(false, message.repeated_bool (0)); - EXPECT_EQ("315", message.repeated_string (0)); - EXPECT_EQ("316", message.repeated_bytes (0)); - - EXPECT_EQ(317, message.repeatedgroup (0).a()); - EXPECT_EQ(318, message.repeated_nested_message (0).bb()); - EXPECT_EQ(319, message.repeated_foreign_message(0).c()); - EXPECT_EQ(320, message.repeated_import_message (0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.repeated_import_enum (0)); -} - -void TestUtil::ExpectRepeatedExtensionsSwapped( - const unittest::TestAllExtensions& message) { - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed32_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed64_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed32_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed64_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_float_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_double_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bool_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bytes_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeatedgroup_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_message_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_message_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_enum_extension )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_enum_extension )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_piece_extension)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_cord_extension)); - - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension , 1)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension , 1)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension , 1)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension , 1)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension , 1)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension , 1)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension , 1)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension , 1)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension, 1)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 1)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 1)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 1)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 1)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 1)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 1)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension , 1).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension , 1).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension, 1).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension , 1).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAR, message.GetExtension(unittest::repeated_nested_enum_extension , 1)); - EXPECT_EQ(unittest::FOREIGN_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension, 1)); - EXPECT_EQ(unittest_import::IMPORT_BAR, message.GetExtension(unittest::repeated_import_enum_extension , 1)); - - EXPECT_EQ("224", message.GetExtension(unittest::repeated_string_piece_extension, 1)); - EXPECT_EQ("225", message.GetExtension(unittest::repeated_cord_extension, 1)); - - EXPECT_EQ(301 , message.GetExtension(unittest::repeated_int32_extension , 0)); - EXPECT_EQ(302 , message.GetExtension(unittest::repeated_int64_extension , 0)); - EXPECT_EQ(303 , message.GetExtension(unittest::repeated_uint32_extension , 0)); - EXPECT_EQ(304 , message.GetExtension(unittest::repeated_uint64_extension , 0)); - EXPECT_EQ(305 , message.GetExtension(unittest::repeated_sint32_extension , 0)); - EXPECT_EQ(306 , message.GetExtension(unittest::repeated_sint64_extension , 0)); - EXPECT_EQ(307 , message.GetExtension(unittest::repeated_fixed32_extension , 0)); - EXPECT_EQ(308 , message.GetExtension(unittest::repeated_fixed64_extension , 0)); - EXPECT_EQ(309 , message.GetExtension(unittest::repeated_sfixed32_extension, 0)); - EXPECT_EQ(310 , message.GetExtension(unittest::repeated_sfixed64_extension, 0)); - EXPECT_EQ(311 , message.GetExtension(unittest::repeated_float_extension , 0)); - EXPECT_EQ(312 , message.GetExtension(unittest::repeated_double_extension , 0)); - EXPECT_EQ(false, message.GetExtension(unittest::repeated_bool_extension , 0)); - EXPECT_EQ("315", message.GetExtension(unittest::repeated_string_extension , 0)); - EXPECT_EQ("316", message.GetExtension(unittest::repeated_bytes_extension , 0)); - - EXPECT_EQ(317, message.GetExtension(unittest::repeatedgroup_extension , 0).a()); - EXPECT_EQ(318, message.GetExtension(unittest::repeated_nested_message_extension , 0).bb()); - EXPECT_EQ(319, message.GetExtension(unittest::repeated_foreign_message_extension, 0).c()); - EXPECT_EQ(320, message.GetExtension(unittest::repeated_import_message_extension , 0).d()); - - EXPECT_EQ(unittest::TestAllTypes::BAZ, message.GetExtension(unittest::repeated_nested_enum_extension , 0)); - EXPECT_EQ(unittest::FOREIGN_BAZ , message.GetExtension(unittest::repeated_foreign_enum_extension, 0)); - EXPECT_EQ(unittest_import::IMPORT_BAZ, message.GetExtension(unittest::repeated_import_enum_extension , 0)); - - EXPECT_EQ("324", message.GetExtension(unittest::repeated_string_piece_extension, 0)); - EXPECT_EQ("325", message.GetExtension(unittest::repeated_cord_extension, 0)); -} - -// =================================================================== - -TestUtil::ReflectionTester::ReflectionTester( - const Descriptor* base_descriptor) - : base_descriptor_(base_descriptor) { - - const DescriptorPool* pool = base_descriptor->file()->pool(); - - nested_b_ = - pool->FindFieldByName("protobuf_unittest.TestAllTypes.NestedMessage.bb"); - foreign_c_ = - pool->FindFieldByName("protobuf_unittest.ForeignMessage.c"); - import_d_ = - pool->FindFieldByName("protobuf_unittest_import.ImportMessage.d"); - nested_foo_ = - pool->FindEnumValueByName("protobuf_unittest.TestAllTypes.FOO"); - nested_bar_ = - pool->FindEnumValueByName("protobuf_unittest.TestAllTypes.BAR"); - nested_baz_ = - pool->FindEnumValueByName("protobuf_unittest.TestAllTypes.BAZ"); - foreign_foo_ = - pool->FindEnumValueByName("protobuf_unittest.FOREIGN_FOO"); - foreign_bar_ = - pool->FindEnumValueByName("protobuf_unittest.FOREIGN_BAR"); - foreign_baz_ = - pool->FindEnumValueByName("protobuf_unittest.FOREIGN_BAZ"); - import_foo_ = - pool->FindEnumValueByName("protobuf_unittest_import.IMPORT_FOO"); - import_bar_ = - pool->FindEnumValueByName("protobuf_unittest_import.IMPORT_BAR"); - import_baz_ = - pool->FindEnumValueByName("protobuf_unittest_import.IMPORT_BAZ"); - - if (base_descriptor_->name() == "TestAllExtensions") { - group_a_ = - pool->FindFieldByName("protobuf_unittest.OptionalGroup_extension.a"); - repeated_group_a_ = - pool->FindFieldByName("protobuf_unittest.RepeatedGroup_extension.a"); - } else { - group_a_ = - pool->FindFieldByName("protobuf_unittest.TestAllTypes.OptionalGroup.a"); - repeated_group_a_ = - pool->FindFieldByName("protobuf_unittest.TestAllTypes.RepeatedGroup.a"); - } - - EXPECT_TRUE(group_a_ != NULL); - EXPECT_TRUE(repeated_group_a_ != NULL); - EXPECT_TRUE(nested_b_ != NULL); - EXPECT_TRUE(foreign_c_ != NULL); - EXPECT_TRUE(import_d_ != NULL); - EXPECT_TRUE(nested_foo_ != NULL); - EXPECT_TRUE(nested_bar_ != NULL); - EXPECT_TRUE(nested_baz_ != NULL); - EXPECT_TRUE(foreign_foo_ != NULL); - EXPECT_TRUE(foreign_bar_ != NULL); - EXPECT_TRUE(foreign_baz_ != NULL); - EXPECT_TRUE(import_foo_ != NULL); - EXPECT_TRUE(import_bar_ != NULL); - EXPECT_TRUE(import_baz_ != NULL); -} - -// Shorthand to get a FieldDescriptor for a field of unittest::TestAllTypes. -const FieldDescriptor* TestUtil::ReflectionTester::F(const string& name) { - const FieldDescriptor* result = NULL; - if (base_descriptor_->name() == "TestAllExtensions" || - base_descriptor_->name() == "TestPackedExtensions") { - result = base_descriptor_->file()->FindExtensionByName(name + "_extension"); - } else { - result = base_descriptor_->FindFieldByName(name); - } - GOOGLE_CHECK(result != NULL); - return result; -} - -// ------------------------------------------------------------------- - -void TestUtil::ReflectionTester::SetAllFieldsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - Message* sub_message; - - reflection->SetInt32 (message, F("optional_int32" ), 101); - reflection->SetInt64 (message, F("optional_int64" ), 102); - reflection->SetUInt32(message, F("optional_uint32" ), 103); - reflection->SetUInt64(message, F("optional_uint64" ), 104); - reflection->SetInt32 (message, F("optional_sint32" ), 105); - reflection->SetInt64 (message, F("optional_sint64" ), 106); - reflection->SetUInt32(message, F("optional_fixed32" ), 107); - reflection->SetUInt64(message, F("optional_fixed64" ), 108); - reflection->SetInt32 (message, F("optional_sfixed32"), 109); - reflection->SetInt64 (message, F("optional_sfixed64"), 110); - reflection->SetFloat (message, F("optional_float" ), 111); - reflection->SetDouble(message, F("optional_double" ), 112); - reflection->SetBool (message, F("optional_bool" ), true); - reflection->SetString(message, F("optional_string" ), "115"); - reflection->SetString(message, F("optional_bytes" ), "116"); - - sub_message = reflection->MutableMessage(message, F("optionalgroup")); - sub_message->GetReflection()->SetInt32(sub_message, group_a_, 117); - sub_message = reflection->MutableMessage(message, F("optional_nested_message")); - sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 118); - sub_message = reflection->MutableMessage(message, F("optional_foreign_message")); - sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 119); - sub_message = reflection->MutableMessage(message, F("optional_import_message")); - sub_message->GetReflection()->SetInt32(sub_message, import_d_, 120); - - reflection->SetEnum(message, F("optional_nested_enum" ), nested_baz_); - reflection->SetEnum(message, F("optional_foreign_enum"), foreign_baz_); - reflection->SetEnum(message, F("optional_import_enum" ), import_baz_); - - reflection->SetString(message, F("optional_string_piece"), "124"); - reflection->SetString(message, F("optional_cord"), "125"); - - // ----------------------------------------------------------------- - - reflection->AddInt32 (message, F("repeated_int32" ), 201); - reflection->AddInt64 (message, F("repeated_int64" ), 202); - reflection->AddUInt32(message, F("repeated_uint32" ), 203); - reflection->AddUInt64(message, F("repeated_uint64" ), 204); - reflection->AddInt32 (message, F("repeated_sint32" ), 205); - reflection->AddInt64 (message, F("repeated_sint64" ), 206); - reflection->AddUInt32(message, F("repeated_fixed32" ), 207); - reflection->AddUInt64(message, F("repeated_fixed64" ), 208); - reflection->AddInt32 (message, F("repeated_sfixed32"), 209); - reflection->AddInt64 (message, F("repeated_sfixed64"), 210); - reflection->AddFloat (message, F("repeated_float" ), 211); - reflection->AddDouble(message, F("repeated_double" ), 212); - reflection->AddBool (message, F("repeated_bool" ), true); - reflection->AddString(message, F("repeated_string" ), "215"); - reflection->AddString(message, F("repeated_bytes" ), "216"); - - sub_message = reflection->AddMessage(message, F("repeatedgroup")); - sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 217); - sub_message = reflection->AddMessage(message, F("repeated_nested_message")); - sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 218); - sub_message = reflection->AddMessage(message, F("repeated_foreign_message")); - sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 219); - sub_message = reflection->AddMessage(message, F("repeated_import_message")); - sub_message->GetReflection()->SetInt32(sub_message, import_d_, 220); - - reflection->AddEnum(message, F("repeated_nested_enum" ), nested_bar_); - reflection->AddEnum(message, F("repeated_foreign_enum"), foreign_bar_); - reflection->AddEnum(message, F("repeated_import_enum" ), import_bar_); - - reflection->AddString(message, F("repeated_string_piece"), "224"); - reflection->AddString(message, F("repeated_cord"), "225"); - - // Add a second one of each field. - reflection->AddInt32 (message, F("repeated_int32" ), 301); - reflection->AddInt64 (message, F("repeated_int64" ), 302); - reflection->AddUInt32(message, F("repeated_uint32" ), 303); - reflection->AddUInt64(message, F("repeated_uint64" ), 304); - reflection->AddInt32 (message, F("repeated_sint32" ), 305); - reflection->AddInt64 (message, F("repeated_sint64" ), 306); - reflection->AddUInt32(message, F("repeated_fixed32" ), 307); - reflection->AddUInt64(message, F("repeated_fixed64" ), 308); - reflection->AddInt32 (message, F("repeated_sfixed32"), 309); - reflection->AddInt64 (message, F("repeated_sfixed64"), 310); - reflection->AddFloat (message, F("repeated_float" ), 311); - reflection->AddDouble(message, F("repeated_double" ), 312); - reflection->AddBool (message, F("repeated_bool" ), false); - reflection->AddString(message, F("repeated_string" ), "315"); - reflection->AddString(message, F("repeated_bytes" ), "316"); - - sub_message = reflection->AddMessage(message, F("repeatedgroup")); - sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 317); - sub_message = reflection->AddMessage(message, F("repeated_nested_message")); - sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 318); - sub_message = reflection->AddMessage(message, F("repeated_foreign_message")); - sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 319); - sub_message = reflection->AddMessage(message, F("repeated_import_message")); - sub_message->GetReflection()->SetInt32(sub_message, import_d_, 320); - - reflection->AddEnum(message, F("repeated_nested_enum" ), nested_baz_); - reflection->AddEnum(message, F("repeated_foreign_enum"), foreign_baz_); - reflection->AddEnum(message, F("repeated_import_enum" ), import_baz_); - - reflection->AddString(message, F("repeated_string_piece"), "324"); - reflection->AddString(message, F("repeated_cord"), "325"); - - // ----------------------------------------------------------------- - - reflection->SetInt32 (message, F("default_int32" ), 401); - reflection->SetInt64 (message, F("default_int64" ), 402); - reflection->SetUInt32(message, F("default_uint32" ), 403); - reflection->SetUInt64(message, F("default_uint64" ), 404); - reflection->SetInt32 (message, F("default_sint32" ), 405); - reflection->SetInt64 (message, F("default_sint64" ), 406); - reflection->SetUInt32(message, F("default_fixed32" ), 407); - reflection->SetUInt64(message, F("default_fixed64" ), 408); - reflection->SetInt32 (message, F("default_sfixed32"), 409); - reflection->SetInt64 (message, F("default_sfixed64"), 410); - reflection->SetFloat (message, F("default_float" ), 411); - reflection->SetDouble(message, F("default_double" ), 412); - reflection->SetBool (message, F("default_bool" ), false); - reflection->SetString(message, F("default_string" ), "415"); - reflection->SetString(message, F("default_bytes" ), "416"); - - reflection->SetEnum(message, F("default_nested_enum" ), nested_foo_); - reflection->SetEnum(message, F("default_foreign_enum"), foreign_foo_); - reflection->SetEnum(message, F("default_import_enum" ), import_foo_); - - reflection->SetString(message, F("default_string_piece"), "424"); - reflection->SetString(message, F("default_cord"), "425"); -} - -void TestUtil::ReflectionTester::SetPackedFieldsViaReflection( - Message* message) { - const Reflection* reflection = message->GetReflection(); - reflection->AddInt32 (message, F("packed_int32" ), 601); - reflection->AddInt64 (message, F("packed_int64" ), 602); - reflection->AddUInt32(message, F("packed_uint32" ), 603); - reflection->AddUInt64(message, F("packed_uint64" ), 604); - reflection->AddInt32 (message, F("packed_sint32" ), 605); - reflection->AddInt64 (message, F("packed_sint64" ), 606); - reflection->AddUInt32(message, F("packed_fixed32" ), 607); - reflection->AddUInt64(message, F("packed_fixed64" ), 608); - reflection->AddInt32 (message, F("packed_sfixed32"), 609); - reflection->AddInt64 (message, F("packed_sfixed64"), 610); - reflection->AddFloat (message, F("packed_float" ), 611); - reflection->AddDouble(message, F("packed_double" ), 612); - reflection->AddBool (message, F("packed_bool" ), true); - reflection->AddEnum (message, F("packed_enum" ), foreign_bar_); - - reflection->AddInt32 (message, F("packed_int32" ), 701); - reflection->AddInt64 (message, F("packed_int64" ), 702); - reflection->AddUInt32(message, F("packed_uint32" ), 703); - reflection->AddUInt64(message, F("packed_uint64" ), 704); - reflection->AddInt32 (message, F("packed_sint32" ), 705); - reflection->AddInt64 (message, F("packed_sint64" ), 706); - reflection->AddUInt32(message, F("packed_fixed32" ), 707); - reflection->AddUInt64(message, F("packed_fixed64" ), 708); - reflection->AddInt32 (message, F("packed_sfixed32"), 709); - reflection->AddInt64 (message, F("packed_sfixed64"), 710); - reflection->AddFloat (message, F("packed_float" ), 711); - reflection->AddDouble(message, F("packed_double" ), 712); - reflection->AddBool (message, F("packed_bool" ), false); - reflection->AddEnum (message, F("packed_enum" ), foreign_baz_); -} - -// ------------------------------------------------------------------- - -void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection( - const Message& message) { - // We have to split this into three function otherwise it creates a stack - // frame so large that it triggers a warning. - ExpectAllFieldsSetViaReflection1(message); - ExpectAllFieldsSetViaReflection2(message); - ExpectAllFieldsSetViaReflection3(message); -} - -void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection1( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - string scratch; - const Message* sub_message; - - EXPECT_TRUE(reflection->HasField(message, F("optional_int32" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_int64" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_uint32" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_uint64" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_sint32" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_sint64" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_fixed32" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_fixed64" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_sfixed32"))); - EXPECT_TRUE(reflection->HasField(message, F("optional_sfixed64"))); - EXPECT_TRUE(reflection->HasField(message, F("optional_float" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_double" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_bool" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_string" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_bytes" ))); - - EXPECT_TRUE(reflection->HasField(message, F("optionalgroup" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_nested_message" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_foreign_message"))); - EXPECT_TRUE(reflection->HasField(message, F("optional_import_message" ))); - - sub_message = &reflection->GetMessage(message, F("optionalgroup")); - EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, group_a_)); - sub_message = &reflection->GetMessage(message, F("optional_nested_message")); - EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, nested_b_)); - sub_message = &reflection->GetMessage(message, F("optional_foreign_message")); - EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, foreign_c_)); - sub_message = &reflection->GetMessage(message, F("optional_import_message")); - EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, import_d_)); - - EXPECT_TRUE(reflection->HasField(message, F("optional_nested_enum" ))); - EXPECT_TRUE(reflection->HasField(message, F("optional_foreign_enum"))); - EXPECT_TRUE(reflection->HasField(message, F("optional_import_enum" ))); - - EXPECT_TRUE(reflection->HasField(message, F("optional_string_piece"))); - EXPECT_TRUE(reflection->HasField(message, F("optional_cord"))); - - EXPECT_EQ(101 , reflection->GetInt32 (message, F("optional_int32" ))); - EXPECT_EQ(102 , reflection->GetInt64 (message, F("optional_int64" ))); - EXPECT_EQ(103 , reflection->GetUInt32(message, F("optional_uint32" ))); - EXPECT_EQ(104 , reflection->GetUInt64(message, F("optional_uint64" ))); - EXPECT_EQ(105 , reflection->GetInt32 (message, F("optional_sint32" ))); - EXPECT_EQ(106 , reflection->GetInt64 (message, F("optional_sint64" ))); - EXPECT_EQ(107 , reflection->GetUInt32(message, F("optional_fixed32" ))); - EXPECT_EQ(108 , reflection->GetUInt64(message, F("optional_fixed64" ))); - EXPECT_EQ(109 , reflection->GetInt32 (message, F("optional_sfixed32"))); - EXPECT_EQ(110 , reflection->GetInt64 (message, F("optional_sfixed64"))); - EXPECT_EQ(111 , reflection->GetFloat (message, F("optional_float" ))); - EXPECT_EQ(112 , reflection->GetDouble(message, F("optional_double" ))); - EXPECT_EQ(true , reflection->GetBool (message, F("optional_bool" ))); - EXPECT_EQ("115", reflection->GetString(message, F("optional_string" ))); - EXPECT_EQ("116", reflection->GetString(message, F("optional_bytes" ))); - - EXPECT_EQ("115", reflection->GetStringReference(message, F("optional_string"), &scratch)); - EXPECT_EQ("116", reflection->GetStringReference(message, F("optional_bytes" ), &scratch)); - - sub_message = &reflection->GetMessage(message, F("optionalgroup")); - EXPECT_EQ(117, sub_message->GetReflection()->GetInt32(*sub_message, group_a_)); - sub_message = &reflection->GetMessage(message, F("optional_nested_message")); - EXPECT_EQ(118, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_)); - sub_message = &reflection->GetMessage(message, F("optional_foreign_message")); - EXPECT_EQ(119, sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_)); - sub_message = &reflection->GetMessage(message, F("optional_import_message")); - EXPECT_EQ(120, sub_message->GetReflection()->GetInt32(*sub_message, import_d_)); - - EXPECT_EQ( nested_baz_, reflection->GetEnum(message, F("optional_nested_enum" ))); - EXPECT_EQ(foreign_baz_, reflection->GetEnum(message, F("optional_foreign_enum"))); - EXPECT_EQ( import_baz_, reflection->GetEnum(message, F("optional_import_enum" ))); - - EXPECT_EQ("124", reflection->GetString(message, F("optional_string_piece"))); - EXPECT_EQ("124", reflection->GetStringReference(message, F("optional_string_piece"), &scratch)); - - EXPECT_EQ("125", reflection->GetString(message, F("optional_cord"))); - EXPECT_EQ("125", reflection->GetStringReference(message, F("optional_cord"), &scratch)); -} - -void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection2( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - string scratch; - const Message* sub_message; - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_int32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_int64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_uint32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_uint64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sint32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sint64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_fixed32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_fixed64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sfixed32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sfixed64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_float" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_double" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_bool" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_string" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_bytes" ))); - - ASSERT_EQ(2, reflection->FieldSize(message, F("repeatedgroup" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_nested_message" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_foreign_message"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_import_message" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_nested_enum" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_foreign_enum" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_import_enum" ))); - - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_string_piece"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_cord"))); - - EXPECT_EQ(201 , reflection->GetRepeatedInt32 (message, F("repeated_int32" ), 0)); - EXPECT_EQ(202 , reflection->GetRepeatedInt64 (message, F("repeated_int64" ), 0)); - EXPECT_EQ(203 , reflection->GetRepeatedUInt32(message, F("repeated_uint32" ), 0)); - EXPECT_EQ(204 , reflection->GetRepeatedUInt64(message, F("repeated_uint64" ), 0)); - EXPECT_EQ(205 , reflection->GetRepeatedInt32 (message, F("repeated_sint32" ), 0)); - EXPECT_EQ(206 , reflection->GetRepeatedInt64 (message, F("repeated_sint64" ), 0)); - EXPECT_EQ(207 , reflection->GetRepeatedUInt32(message, F("repeated_fixed32" ), 0)); - EXPECT_EQ(208 , reflection->GetRepeatedUInt64(message, F("repeated_fixed64" ), 0)); - EXPECT_EQ(209 , reflection->GetRepeatedInt32 (message, F("repeated_sfixed32"), 0)); - EXPECT_EQ(210 , reflection->GetRepeatedInt64 (message, F("repeated_sfixed64"), 0)); - EXPECT_EQ(211 , reflection->GetRepeatedFloat (message, F("repeated_float" ), 0)); - EXPECT_EQ(212 , reflection->GetRepeatedDouble(message, F("repeated_double" ), 0)); - EXPECT_EQ(true , reflection->GetRepeatedBool (message, F("repeated_bool" ), 0)); - EXPECT_EQ("215", reflection->GetRepeatedString(message, F("repeated_string" ), 0)); - EXPECT_EQ("216", reflection->GetRepeatedString(message, F("repeated_bytes" ), 0)); - - EXPECT_EQ("215", reflection->GetRepeatedStringReference(message, F("repeated_string"), 0, &scratch)); - EXPECT_EQ("216", reflection->GetRepeatedStringReference(message, F("repeated_bytes"), 0, &scratch)); - - sub_message = &reflection->GetRepeatedMessage(message, F("repeatedgroup"), 0); - EXPECT_EQ(217, sub_message->GetReflection()->GetInt32(*sub_message, repeated_group_a_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_nested_message"), 0); - EXPECT_EQ(218, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_foreign_message"), 0); - EXPECT_EQ(219, sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_import_message"), 0); - EXPECT_EQ(220, sub_message->GetReflection()->GetInt32(*sub_message, import_d_)); - - EXPECT_EQ( nested_bar_, reflection->GetRepeatedEnum(message, F("repeated_nested_enum" ),0)); - EXPECT_EQ(foreign_bar_, reflection->GetRepeatedEnum(message, F("repeated_foreign_enum"),0)); - EXPECT_EQ( import_bar_, reflection->GetRepeatedEnum(message, F("repeated_import_enum" ),0)); - - EXPECT_EQ("224", reflection->GetRepeatedString(message, F("repeated_string_piece"), 0)); - EXPECT_EQ("224", reflection->GetRepeatedStringReference( - message, F("repeated_string_piece"), 0, &scratch)); - - EXPECT_EQ("225", reflection->GetRepeatedString(message, F("repeated_cord"), 0)); - EXPECT_EQ("225", reflection->GetRepeatedStringReference( - message, F("repeated_cord"), 0, &scratch)); - - EXPECT_EQ(301 , reflection->GetRepeatedInt32 (message, F("repeated_int32" ), 1)); - EXPECT_EQ(302 , reflection->GetRepeatedInt64 (message, F("repeated_int64" ), 1)); - EXPECT_EQ(303 , reflection->GetRepeatedUInt32(message, F("repeated_uint32" ), 1)); - EXPECT_EQ(304 , reflection->GetRepeatedUInt64(message, F("repeated_uint64" ), 1)); - EXPECT_EQ(305 , reflection->GetRepeatedInt32 (message, F("repeated_sint32" ), 1)); - EXPECT_EQ(306 , reflection->GetRepeatedInt64 (message, F("repeated_sint64" ), 1)); - EXPECT_EQ(307 , reflection->GetRepeatedUInt32(message, F("repeated_fixed32" ), 1)); - EXPECT_EQ(308 , reflection->GetRepeatedUInt64(message, F("repeated_fixed64" ), 1)); - EXPECT_EQ(309 , reflection->GetRepeatedInt32 (message, F("repeated_sfixed32"), 1)); - EXPECT_EQ(310 , reflection->GetRepeatedInt64 (message, F("repeated_sfixed64"), 1)); - EXPECT_EQ(311 , reflection->GetRepeatedFloat (message, F("repeated_float" ), 1)); - EXPECT_EQ(312 , reflection->GetRepeatedDouble(message, F("repeated_double" ), 1)); - EXPECT_EQ(false, reflection->GetRepeatedBool (message, F("repeated_bool" ), 1)); - EXPECT_EQ("315", reflection->GetRepeatedString(message, F("repeated_string" ), 1)); - EXPECT_EQ("316", reflection->GetRepeatedString(message, F("repeated_bytes" ), 1)); - - EXPECT_EQ("315", reflection->GetRepeatedStringReference(message, F("repeated_string"), - 1, &scratch)); - EXPECT_EQ("316", reflection->GetRepeatedStringReference(message, F("repeated_bytes"), - 1, &scratch)); - - sub_message = &reflection->GetRepeatedMessage(message, F("repeatedgroup"), 1); - EXPECT_EQ(317, sub_message->GetReflection()->GetInt32(*sub_message, repeated_group_a_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_nested_message"), 1); - EXPECT_EQ(318, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_foreign_message"), 1); - EXPECT_EQ(319, sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_)); - sub_message = &reflection->GetRepeatedMessage(message, F("repeated_import_message"), 1); - EXPECT_EQ(320, sub_message->GetReflection()->GetInt32(*sub_message, import_d_)); - - EXPECT_EQ( nested_baz_, reflection->GetRepeatedEnum(message, F("repeated_nested_enum" ),1)); - EXPECT_EQ(foreign_baz_, reflection->GetRepeatedEnum(message, F("repeated_foreign_enum"),1)); - EXPECT_EQ( import_baz_, reflection->GetRepeatedEnum(message, F("repeated_import_enum" ),1)); - - EXPECT_EQ("324", reflection->GetRepeatedString(message, F("repeated_string_piece"), 1)); - EXPECT_EQ("324", reflection->GetRepeatedStringReference( - message, F("repeated_string_piece"), 1, &scratch)); - - EXPECT_EQ("325", reflection->GetRepeatedString(message, F("repeated_cord"), 1)); - EXPECT_EQ("325", reflection->GetRepeatedStringReference( - message, F("repeated_cord"), 1, &scratch)); -} - -void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection3( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - string scratch; - - // ----------------------------------------------------------------- - - EXPECT_TRUE(reflection->HasField(message, F("default_int32" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_int64" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_uint32" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_uint64" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_sint32" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_sint64" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_fixed32" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_fixed64" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_sfixed32"))); - EXPECT_TRUE(reflection->HasField(message, F("default_sfixed64"))); - EXPECT_TRUE(reflection->HasField(message, F("default_float" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_double" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_bool" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_string" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_bytes" ))); - - EXPECT_TRUE(reflection->HasField(message, F("default_nested_enum" ))); - EXPECT_TRUE(reflection->HasField(message, F("default_foreign_enum"))); - EXPECT_TRUE(reflection->HasField(message, F("default_import_enum" ))); - - EXPECT_TRUE(reflection->HasField(message, F("default_string_piece"))); - EXPECT_TRUE(reflection->HasField(message, F("default_cord"))); - - EXPECT_EQ(401 , reflection->GetInt32 (message, F("default_int32" ))); - EXPECT_EQ(402 , reflection->GetInt64 (message, F("default_int64" ))); - EXPECT_EQ(403 , reflection->GetUInt32(message, F("default_uint32" ))); - EXPECT_EQ(404 , reflection->GetUInt64(message, F("default_uint64" ))); - EXPECT_EQ(405 , reflection->GetInt32 (message, F("default_sint32" ))); - EXPECT_EQ(406 , reflection->GetInt64 (message, F("default_sint64" ))); - EXPECT_EQ(407 , reflection->GetUInt32(message, F("default_fixed32" ))); - EXPECT_EQ(408 , reflection->GetUInt64(message, F("default_fixed64" ))); - EXPECT_EQ(409 , reflection->GetInt32 (message, F("default_sfixed32"))); - EXPECT_EQ(410 , reflection->GetInt64 (message, F("default_sfixed64"))); - EXPECT_EQ(411 , reflection->GetFloat (message, F("default_float" ))); - EXPECT_EQ(412 , reflection->GetDouble(message, F("default_double" ))); - EXPECT_EQ(false, reflection->GetBool (message, F("default_bool" ))); - EXPECT_EQ("415", reflection->GetString(message, F("default_string" ))); - EXPECT_EQ("416", reflection->GetString(message, F("default_bytes" ))); - - EXPECT_EQ("415", reflection->GetStringReference(message, F("default_string"), &scratch)); - EXPECT_EQ("416", reflection->GetStringReference(message, F("default_bytes" ), &scratch)); - - EXPECT_EQ( nested_foo_, reflection->GetEnum(message, F("default_nested_enum" ))); - EXPECT_EQ(foreign_foo_, reflection->GetEnum(message, F("default_foreign_enum"))); - EXPECT_EQ( import_foo_, reflection->GetEnum(message, F("default_import_enum" ))); - - EXPECT_EQ("424", reflection->GetString(message, F("default_string_piece"))); - EXPECT_EQ("424", reflection->GetStringReference(message, F("default_string_piece"), - &scratch)); - - EXPECT_EQ("425", reflection->GetString(message, F("default_cord"))); - EXPECT_EQ("425", reflection->GetStringReference(message, F("default_cord"), &scratch)); -} - -void TestUtil::ReflectionTester::ExpectPackedFieldsSetViaReflection( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_int32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_int64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_uint32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_uint64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sint32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sint64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_fixed32" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_fixed64" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sfixed32"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sfixed64"))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_float" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_double" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_bool" ))); - ASSERT_EQ(2, reflection->FieldSize(message, F("packed_enum" ))); - - EXPECT_EQ(601 , reflection->GetRepeatedInt32 (message, F("packed_int32" ), 0)); - EXPECT_EQ(602 , reflection->GetRepeatedInt64 (message, F("packed_int64" ), 0)); - EXPECT_EQ(603 , reflection->GetRepeatedUInt32(message, F("packed_uint32" ), 0)); - EXPECT_EQ(604 , reflection->GetRepeatedUInt64(message, F("packed_uint64" ), 0)); - EXPECT_EQ(605 , reflection->GetRepeatedInt32 (message, F("packed_sint32" ), 0)); - EXPECT_EQ(606 , reflection->GetRepeatedInt64 (message, F("packed_sint64" ), 0)); - EXPECT_EQ(607 , reflection->GetRepeatedUInt32(message, F("packed_fixed32" ), 0)); - EXPECT_EQ(608 , reflection->GetRepeatedUInt64(message, F("packed_fixed64" ), 0)); - EXPECT_EQ(609 , reflection->GetRepeatedInt32 (message, F("packed_sfixed32"), 0)); - EXPECT_EQ(610 , reflection->GetRepeatedInt64 (message, F("packed_sfixed64"), 0)); - EXPECT_EQ(611 , reflection->GetRepeatedFloat (message, F("packed_float" ), 0)); - EXPECT_EQ(612 , reflection->GetRepeatedDouble(message, F("packed_double" ), 0)); - EXPECT_EQ(true , reflection->GetRepeatedBool (message, F("packed_bool" ), 0)); - EXPECT_EQ(foreign_bar_, - reflection->GetRepeatedEnum(message, F("packed_enum"), 0)); - - EXPECT_EQ(701 , reflection->GetRepeatedInt32 (message, F("packed_int32" ), 1)); - EXPECT_EQ(702 , reflection->GetRepeatedInt64 (message, F("packed_int64" ), 1)); - EXPECT_EQ(703 , reflection->GetRepeatedUInt32(message, F("packed_uint32" ), 1)); - EXPECT_EQ(704 , reflection->GetRepeatedUInt64(message, F("packed_uint64" ), 1)); - EXPECT_EQ(705 , reflection->GetRepeatedInt32 (message, F("packed_sint32" ), 1)); - EXPECT_EQ(706 , reflection->GetRepeatedInt64 (message, F("packed_sint64" ), 1)); - EXPECT_EQ(707 , reflection->GetRepeatedUInt32(message, F("packed_fixed32" ), 1)); - EXPECT_EQ(708 , reflection->GetRepeatedUInt64(message, F("packed_fixed64" ), 1)); - EXPECT_EQ(709 , reflection->GetRepeatedInt32 (message, F("packed_sfixed32"), 1)); - EXPECT_EQ(710 , reflection->GetRepeatedInt64 (message, F("packed_sfixed64"), 1)); - EXPECT_EQ(711 , reflection->GetRepeatedFloat (message, F("packed_float" ), 1)); - EXPECT_EQ(712 , reflection->GetRepeatedDouble(message, F("packed_double" ), 1)); - EXPECT_EQ(false, reflection->GetRepeatedBool (message, F("packed_bool" ), 1)); - EXPECT_EQ(foreign_baz_, - reflection->GetRepeatedEnum(message, F("packed_enum"), 1)); -} - -// ------------------------------------------------------------------- - -void TestUtil::ReflectionTester::ExpectClearViaReflection( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - string scratch; - const Message* sub_message; - - // has_blah() should initially be false for all optional fields. - EXPECT_FALSE(reflection->HasField(message, F("optional_int32" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_int64" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_uint32" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_uint64" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_sint32" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_sint64" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_fixed32" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_fixed64" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_sfixed32"))); - EXPECT_FALSE(reflection->HasField(message, F("optional_sfixed64"))); - EXPECT_FALSE(reflection->HasField(message, F("optional_float" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_double" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_bool" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_string" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_bytes" ))); - - EXPECT_FALSE(reflection->HasField(message, F("optionalgroup" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_nested_message" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_foreign_message"))); - EXPECT_FALSE(reflection->HasField(message, F("optional_import_message" ))); - - EXPECT_FALSE(reflection->HasField(message, F("optional_nested_enum" ))); - EXPECT_FALSE(reflection->HasField(message, F("optional_foreign_enum"))); - EXPECT_FALSE(reflection->HasField(message, F("optional_import_enum" ))); - - EXPECT_FALSE(reflection->HasField(message, F("optional_string_piece"))); - EXPECT_FALSE(reflection->HasField(message, F("optional_cord"))); - - // Optional fields without defaults are set to zero or something like it. - EXPECT_EQ(0 , reflection->GetInt32 (message, F("optional_int32" ))); - EXPECT_EQ(0 , reflection->GetInt64 (message, F("optional_int64" ))); - EXPECT_EQ(0 , reflection->GetUInt32(message, F("optional_uint32" ))); - EXPECT_EQ(0 , reflection->GetUInt64(message, F("optional_uint64" ))); - EXPECT_EQ(0 , reflection->GetInt32 (message, F("optional_sint32" ))); - EXPECT_EQ(0 , reflection->GetInt64 (message, F("optional_sint64" ))); - EXPECT_EQ(0 , reflection->GetUInt32(message, F("optional_fixed32" ))); - EXPECT_EQ(0 , reflection->GetUInt64(message, F("optional_fixed64" ))); - EXPECT_EQ(0 , reflection->GetInt32 (message, F("optional_sfixed32"))); - EXPECT_EQ(0 , reflection->GetInt64 (message, F("optional_sfixed64"))); - EXPECT_EQ(0 , reflection->GetFloat (message, F("optional_float" ))); - EXPECT_EQ(0 , reflection->GetDouble(message, F("optional_double" ))); - EXPECT_EQ(false, reflection->GetBool (message, F("optional_bool" ))); - EXPECT_EQ("" , reflection->GetString(message, F("optional_string" ))); - EXPECT_EQ("" , reflection->GetString(message, F("optional_bytes" ))); - - EXPECT_EQ("", reflection->GetStringReference(message, F("optional_string"), &scratch)); - EXPECT_EQ("", reflection->GetStringReference(message, F("optional_bytes" ), &scratch)); - - // Embedded messages should also be clear. - sub_message = &reflection->GetMessage(message, F("optionalgroup")); - EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, group_a_)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, group_a_)); - sub_message = &reflection->GetMessage(message, F("optional_nested_message")); - EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, nested_b_)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_)); - sub_message = &reflection->GetMessage(message, F("optional_foreign_message")); - EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, foreign_c_)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_)); - sub_message = &reflection->GetMessage(message, F("optional_import_message")); - EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, import_d_)); - EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, import_d_)); - - // Enums without defaults are set to the first value in the enum. - EXPECT_EQ( nested_foo_, reflection->GetEnum(message, F("optional_nested_enum" ))); - EXPECT_EQ(foreign_foo_, reflection->GetEnum(message, F("optional_foreign_enum"))); - EXPECT_EQ( import_foo_, reflection->GetEnum(message, F("optional_import_enum" ))); - - EXPECT_EQ("", reflection->GetString(message, F("optional_string_piece"))); - EXPECT_EQ("", reflection->GetStringReference(message, F("optional_string_piece"), &scratch)); - - EXPECT_EQ("", reflection->GetString(message, F("optional_cord"))); - EXPECT_EQ("", reflection->GetStringReference(message, F("optional_cord"), &scratch)); - - // Repeated fields are empty. - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_int32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_int64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_uint32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_uint64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sint32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sint64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_fixed32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_fixed64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sfixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sfixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_float" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_double" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_bool" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_string" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_bytes" ))); - - EXPECT_EQ(0, reflection->FieldSize(message, F("repeatedgroup" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_nested_message" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_foreign_message"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_import_message" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_nested_enum" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_foreign_enum" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_import_enum" ))); - - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_string_piece"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_cord"))); - - // has_blah() should also be false for all default fields. - EXPECT_FALSE(reflection->HasField(message, F("default_int32" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_int64" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_uint32" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_uint64" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_sint32" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_sint64" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_fixed32" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_fixed64" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_sfixed32"))); - EXPECT_FALSE(reflection->HasField(message, F("default_sfixed64"))); - EXPECT_FALSE(reflection->HasField(message, F("default_float" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_double" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_bool" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_string" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_bytes" ))); - - EXPECT_FALSE(reflection->HasField(message, F("default_nested_enum" ))); - EXPECT_FALSE(reflection->HasField(message, F("default_foreign_enum"))); - EXPECT_FALSE(reflection->HasField(message, F("default_import_enum" ))); - - EXPECT_FALSE(reflection->HasField(message, F("default_string_piece"))); - EXPECT_FALSE(reflection->HasField(message, F("default_cord"))); - - // Fields with defaults have their default values (duh). - EXPECT_EQ( 41 , reflection->GetInt32 (message, F("default_int32" ))); - EXPECT_EQ( 42 , reflection->GetInt64 (message, F("default_int64" ))); - EXPECT_EQ( 43 , reflection->GetUInt32(message, F("default_uint32" ))); - EXPECT_EQ( 44 , reflection->GetUInt64(message, F("default_uint64" ))); - EXPECT_EQ(-45 , reflection->GetInt32 (message, F("default_sint32" ))); - EXPECT_EQ( 46 , reflection->GetInt64 (message, F("default_sint64" ))); - EXPECT_EQ( 47 , reflection->GetUInt32(message, F("default_fixed32" ))); - EXPECT_EQ( 48 , reflection->GetUInt64(message, F("default_fixed64" ))); - EXPECT_EQ( 49 , reflection->GetInt32 (message, F("default_sfixed32"))); - EXPECT_EQ(-50 , reflection->GetInt64 (message, F("default_sfixed64"))); - EXPECT_EQ( 51.5 , reflection->GetFloat (message, F("default_float" ))); - EXPECT_EQ( 52e3 , reflection->GetDouble(message, F("default_double" ))); - EXPECT_EQ(true , reflection->GetBool (message, F("default_bool" ))); - EXPECT_EQ("hello", reflection->GetString(message, F("default_string" ))); - EXPECT_EQ("world", reflection->GetString(message, F("default_bytes" ))); - - EXPECT_EQ("hello", reflection->GetStringReference(message, F("default_string"), &scratch)); - EXPECT_EQ("world", reflection->GetStringReference(message, F("default_bytes" ), &scratch)); - - EXPECT_EQ( nested_bar_, reflection->GetEnum(message, F("default_nested_enum" ))); - EXPECT_EQ(foreign_bar_, reflection->GetEnum(message, F("default_foreign_enum"))); - EXPECT_EQ( import_bar_, reflection->GetEnum(message, F("default_import_enum" ))); - - EXPECT_EQ("abc", reflection->GetString(message, F("default_string_piece"))); - EXPECT_EQ("abc", reflection->GetStringReference(message, F("default_string_piece"), &scratch)); - - EXPECT_EQ("123", reflection->GetString(message, F("default_cord"))); - EXPECT_EQ("123", reflection->GetStringReference(message, F("default_cord"), &scratch)); -} - -void TestUtil::ReflectionTester::ExpectPackedClearViaReflection( - const Message& message) { - const Reflection* reflection = message.GetReflection(); - - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_int32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_int64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_uint32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_uint64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sint32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sint64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_fixed32" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_fixed64" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sfixed32"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_sfixed64"))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_float" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_double" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_bool" ))); - EXPECT_EQ(0, reflection->FieldSize(message, F("packed_enum" ))); -} - -// ------------------------------------------------------------------- - -void TestUtil::ReflectionTester::ModifyRepeatedFieldsViaReflection( - Message* message) { - const Reflection* reflection = message->GetReflection(); - Message* sub_message; - - reflection->SetRepeatedInt32 (message, F("repeated_int32" ), 1, 501); - reflection->SetRepeatedInt64 (message, F("repeated_int64" ), 1, 502); - reflection->SetRepeatedUInt32(message, F("repeated_uint32" ), 1, 503); - reflection->SetRepeatedUInt64(message, F("repeated_uint64" ), 1, 504); - reflection->SetRepeatedInt32 (message, F("repeated_sint32" ), 1, 505); - reflection->SetRepeatedInt64 (message, F("repeated_sint64" ), 1, 506); - reflection->SetRepeatedUInt32(message, F("repeated_fixed32" ), 1, 507); - reflection->SetRepeatedUInt64(message, F("repeated_fixed64" ), 1, 508); - reflection->SetRepeatedInt32 (message, F("repeated_sfixed32"), 1, 509); - reflection->SetRepeatedInt64 (message, F("repeated_sfixed64"), 1, 510); - reflection->SetRepeatedFloat (message, F("repeated_float" ), 1, 511); - reflection->SetRepeatedDouble(message, F("repeated_double" ), 1, 512); - reflection->SetRepeatedBool (message, F("repeated_bool" ), 1, true); - reflection->SetRepeatedString(message, F("repeated_string" ), 1, "515"); - reflection->SetRepeatedString(message, F("repeated_bytes" ), 1, "516"); - - sub_message = reflection->MutableRepeatedMessage(message, F("repeatedgroup"), 1); - sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 517); - sub_message = reflection->MutableRepeatedMessage(message, F("repeated_nested_message"), 1); - sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 518); - sub_message = reflection->MutableRepeatedMessage(message, F("repeated_foreign_message"), 1); - sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 519); - sub_message = reflection->MutableRepeatedMessage(message, F("repeated_import_message"), 1); - sub_message->GetReflection()->SetInt32(sub_message, import_d_, 520); - - reflection->SetRepeatedEnum(message, F("repeated_nested_enum" ), 1, nested_foo_); - reflection->SetRepeatedEnum(message, F("repeated_foreign_enum"), 1, foreign_foo_); - reflection->SetRepeatedEnum(message, F("repeated_import_enum" ), 1, import_foo_); - - reflection->SetRepeatedString(message, F("repeated_string_piece"), 1, "524"); - reflection->SetRepeatedString(message, F("repeated_cord"), 1, "525"); -} - -void TestUtil::ReflectionTester::ModifyPackedFieldsViaReflection( - Message* message) { - const Reflection* reflection = message->GetReflection(); - reflection->SetRepeatedInt32 (message, F("packed_int32" ), 1, 801); - reflection->SetRepeatedInt64 (message, F("packed_int64" ), 1, 802); - reflection->SetRepeatedUInt32(message, F("packed_uint32" ), 1, 803); - reflection->SetRepeatedUInt64(message, F("packed_uint64" ), 1, 804); - reflection->SetRepeatedInt32 (message, F("packed_sint32" ), 1, 805); - reflection->SetRepeatedInt64 (message, F("packed_sint64" ), 1, 806); - reflection->SetRepeatedUInt32(message, F("packed_fixed32" ), 1, 807); - reflection->SetRepeatedUInt64(message, F("packed_fixed64" ), 1, 808); - reflection->SetRepeatedInt32 (message, F("packed_sfixed32"), 1, 809); - reflection->SetRepeatedInt64 (message, F("packed_sfixed64"), 1, 810); - reflection->SetRepeatedFloat (message, F("packed_float" ), 1, 811); - reflection->SetRepeatedDouble(message, F("packed_double" ), 1, 812); - reflection->SetRepeatedBool (message, F("packed_bool" ), 1, true); - reflection->SetRepeatedEnum (message, F("packed_enum" ), 1, foreign_foo_); -} - -void TestUtil::ReflectionTester::RemoveLastRepeatedsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - vector output; - reflection->ListFields(*message, &output); - for (int i=0; iis_repeated()) continue; - - reflection->RemoveLast(message, field); - } -} - -void TestUtil::ReflectionTester::SwapRepeatedsViaReflection(Message* message) { - const Reflection* reflection = message->GetReflection(); - - vector output; - reflection->ListFields(*message, &output); - for (int i=0; iis_repeated()) continue; - - reflection->SwapElements(message, field, 0, 1); - } -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.h deleted file mode 100644 index 25165f3a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util.h +++ /dev/null @@ -1,174 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_TEST_UTIL_H__ -#define GOOGLE_PROTOBUF_TEST_UTIL_H__ - -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -namespace unittest = protobuf_unittest; -namespace unittest_import = protobuf_unittest_import; - -class TestUtil { - public: - // Set every field in the message to a unique value. - static void SetAllFields(unittest::TestAllTypes* message); - static void SetAllExtensions(unittest::TestAllExtensions* message); - static void SetAllFieldsAndExtensions(unittest::TestFieldOrderings* message); - static void SetPackedFields(unittest::TestPackedTypes* message); - static void SetPackedExtensions(unittest::TestPackedExtensions* message); - static void SetUnpackedFields(unittest::TestUnpackedTypes* message); - - // Use the repeated versions of the set_*() accessors to modify all the - // repeated fields of the messsage (which should already have been - // initialized with Set*Fields()). Set*Fields() itself only tests - // the add_*() accessors. - static void ModifyRepeatedFields(unittest::TestAllTypes* message); - static void ModifyRepeatedExtensions(unittest::TestAllExtensions* message); - static void ModifyPackedFields(unittest::TestPackedTypes* message); - static void ModifyPackedExtensions(unittest::TestPackedExtensions* message); - - // Check that all fields have the values that they should have after - // Set*Fields() is called. - static void ExpectAllFieldsSet(const unittest::TestAllTypes& message); - static void ExpectAllExtensionsSet( - const unittest::TestAllExtensions& message); - static void ExpectPackedFieldsSet(const unittest::TestPackedTypes& message); - static void ExpectPackedExtensionsSet( - const unittest::TestPackedExtensions& message); - static void ExpectUnpackedFieldsSet( - const unittest::TestUnpackedTypes& message); - - // Expect that the message is modified as would be expected from - // Modify*Fields(). - static void ExpectRepeatedFieldsModified( - const unittest::TestAllTypes& message); - static void ExpectRepeatedExtensionsModified( - const unittest::TestAllExtensions& message); - static void ExpectPackedFieldsModified( - const unittest::TestPackedTypes& message); - static void ExpectPackedExtensionsModified( - const unittest::TestPackedExtensions& message); - - // Check that all fields have their default values. - static void ExpectClear(const unittest::TestAllTypes& message); - static void ExpectExtensionsClear(const unittest::TestAllExtensions& message); - static void ExpectPackedClear(const unittest::TestPackedTypes& message); - static void ExpectPackedExtensionsClear( - const unittest::TestPackedExtensions& message); - - // Check that the passed-in serialization is the canonical serialization we - // expect for a TestFieldOrderings message filled in by - // SetAllFieldsAndExtensions(). - static void ExpectAllFieldsAndExtensionsInOrder(const string& serialized); - - // Check that all repeated fields have had their last elements removed. - static void ExpectLastRepeatedsRemoved( - const unittest::TestAllTypes& message); - static void ExpectLastRepeatedExtensionsRemoved( - const unittest::TestAllExtensions& message); - - // Check that all repeated fields have had their first and last elements - // swapped. - static void ExpectRepeatedsSwapped(const unittest::TestAllTypes& message); - static void ExpectRepeatedExtensionsSwapped( - const unittest::TestAllExtensions& message); - - // Like above, but use the reflection interface. - class ReflectionTester { - public: - // base_descriptor must be a descriptor for TestAllTypes or - // TestAllExtensions. In the former case, ReflectionTester fetches from - // it the FieldDescriptors needed to use the reflection interface. In - // the latter case, ReflectionTester searches for extension fields in - // its file. - explicit ReflectionTester(const Descriptor* base_descriptor); - - void SetAllFieldsViaReflection(Message* message); - void ModifyRepeatedFieldsViaReflection(Message* message); - void ExpectAllFieldsSetViaReflection(const Message& message); - void ExpectClearViaReflection(const Message& message); - - void SetPackedFieldsViaReflection(Message* message); - void ModifyPackedFieldsViaReflection(Message* message); - void ExpectPackedFieldsSetViaReflection(const Message& message); - void ExpectPackedClearViaReflection(const Message& message); - - void RemoveLastRepeatedsViaReflection(Message* message); - void SwapRepeatedsViaReflection(Message* message); - - private: - const FieldDescriptor* F(const string& name); - - const Descriptor* base_descriptor_; - - const FieldDescriptor* group_a_; - const FieldDescriptor* repeated_group_a_; - const FieldDescriptor* nested_b_; - const FieldDescriptor* foreign_c_; - const FieldDescriptor* import_d_; - - const EnumValueDescriptor* nested_foo_; - const EnumValueDescriptor* nested_bar_; - const EnumValueDescriptor* nested_baz_; - const EnumValueDescriptor* foreign_foo_; - const EnumValueDescriptor* foreign_bar_; - const EnumValueDescriptor* foreign_baz_; - const EnumValueDescriptor* import_foo_; - const EnumValueDescriptor* import_bar_; - const EnumValueDescriptor* import_baz_; - - // We have to split this into three function otherwise it creates a stack - // frame so large that it triggers a warning. - void ExpectAllFieldsSetViaReflection1(const Message& message); - void ExpectAllFieldsSetViaReflection2(const Message& message); - void ExpectAllFieldsSetViaReflection3(const Message& message); - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ReflectionTester); - }; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestUtil); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_TEST_UTIL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.cc deleted file mode 100644 index d7140e0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.cc +++ /dev/null @@ -1,1502 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include - - -#define EXPECT_TRUE GOOGLE_CHECK -#define ASSERT_TRUE GOOGLE_CHECK -#define EXPECT_FALSE(COND) GOOGLE_CHECK(!(COND)) -#define EXPECT_EQ GOOGLE_CHECK_EQ -#define ASSERT_EQ GOOGLE_CHECK_EQ - -namespace google { -namespace protobuf { - -void TestUtilLite::SetAllFields(unittest::TestAllTypesLite* message) { - message->set_optional_int32 (101); - message->set_optional_int64 (102); - message->set_optional_uint32 (103); - message->set_optional_uint64 (104); - message->set_optional_sint32 (105); - message->set_optional_sint64 (106); - message->set_optional_fixed32 (107); - message->set_optional_fixed64 (108); - message->set_optional_sfixed32(109); - message->set_optional_sfixed64(110); - message->set_optional_float (111); - message->set_optional_double (112); - message->set_optional_bool (true); - message->set_optional_string ("115"); - message->set_optional_bytes ("116"); - - message->mutable_optionalgroup ()->set_a(117); - message->mutable_optional_nested_message ()->set_bb(118); - message->mutable_optional_foreign_message()->set_c(119); - message->mutable_optional_import_message ()->set_d(120); - - message->set_optional_nested_enum (unittest::TestAllTypesLite::BAZ ); - message->set_optional_foreign_enum(unittest::FOREIGN_LITE_BAZ ); - message->set_optional_import_enum (unittest_import::IMPORT_LITE_BAZ); - - - // ----------------------------------------------------------------- - - message->add_repeated_int32 (201); - message->add_repeated_int64 (202); - message->add_repeated_uint32 (203); - message->add_repeated_uint64 (204); - message->add_repeated_sint32 (205); - message->add_repeated_sint64 (206); - message->add_repeated_fixed32 (207); - message->add_repeated_fixed64 (208); - message->add_repeated_sfixed32(209); - message->add_repeated_sfixed64(210); - message->add_repeated_float (211); - message->add_repeated_double (212); - message->add_repeated_bool (true); - message->add_repeated_string ("215"); - message->add_repeated_bytes ("216"); - - message->add_repeatedgroup ()->set_a(217); - message->add_repeated_nested_message ()->set_bb(218); - message->add_repeated_foreign_message()->set_c(219); - message->add_repeated_import_message ()->set_d(220); - - message->add_repeated_nested_enum (unittest::TestAllTypesLite::BAR ); - message->add_repeated_foreign_enum(unittest::FOREIGN_LITE_BAR ); - message->add_repeated_import_enum (unittest_import::IMPORT_LITE_BAR); - - - // Add a second one of each field. - message->add_repeated_int32 (301); - message->add_repeated_int64 (302); - message->add_repeated_uint32 (303); - message->add_repeated_uint64 (304); - message->add_repeated_sint32 (305); - message->add_repeated_sint64 (306); - message->add_repeated_fixed32 (307); - message->add_repeated_fixed64 (308); - message->add_repeated_sfixed32(309); - message->add_repeated_sfixed64(310); - message->add_repeated_float (311); - message->add_repeated_double (312); - message->add_repeated_bool (false); - message->add_repeated_string ("315"); - message->add_repeated_bytes ("316"); - - message->add_repeatedgroup ()->set_a(317); - message->add_repeated_nested_message ()->set_bb(318); - message->add_repeated_foreign_message()->set_c(319); - message->add_repeated_import_message ()->set_d(320); - - message->add_repeated_nested_enum (unittest::TestAllTypesLite::BAZ ); - message->add_repeated_foreign_enum(unittest::FOREIGN_LITE_BAZ ); - message->add_repeated_import_enum (unittest_import::IMPORT_LITE_BAZ); - - - // ----------------------------------------------------------------- - - message->set_default_int32 (401); - message->set_default_int64 (402); - message->set_default_uint32 (403); - message->set_default_uint64 (404); - message->set_default_sint32 (405); - message->set_default_sint64 (406); - message->set_default_fixed32 (407); - message->set_default_fixed64 (408); - message->set_default_sfixed32(409); - message->set_default_sfixed64(410); - message->set_default_float (411); - message->set_default_double (412); - message->set_default_bool (false); - message->set_default_string ("415"); - message->set_default_bytes ("416"); - - message->set_default_nested_enum (unittest::TestAllTypesLite::FOO ); - message->set_default_foreign_enum(unittest::FOREIGN_LITE_FOO ); - message->set_default_import_enum (unittest_import::IMPORT_LITE_FOO); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ModifyRepeatedFields(unittest::TestAllTypesLite* message) { - message->set_repeated_int32 (1, 501); - message->set_repeated_int64 (1, 502); - message->set_repeated_uint32 (1, 503); - message->set_repeated_uint64 (1, 504); - message->set_repeated_sint32 (1, 505); - message->set_repeated_sint64 (1, 506); - message->set_repeated_fixed32 (1, 507); - message->set_repeated_fixed64 (1, 508); - message->set_repeated_sfixed32(1, 509); - message->set_repeated_sfixed64(1, 510); - message->set_repeated_float (1, 511); - message->set_repeated_double (1, 512); - message->set_repeated_bool (1, true); - message->set_repeated_string (1, "515"); - message->set_repeated_bytes (1, "516"); - - message->mutable_repeatedgroup (1)->set_a(517); - message->mutable_repeated_nested_message (1)->set_bb(518); - message->mutable_repeated_foreign_message(1)->set_c(519); - message->mutable_repeated_import_message (1)->set_d(520); - - message->set_repeated_nested_enum (1, unittest::TestAllTypesLite::FOO ); - message->set_repeated_foreign_enum(1, unittest::FOREIGN_LITE_FOO ); - message->set_repeated_import_enum (1, unittest_import::IMPORT_LITE_FOO); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectAllFieldsSet( - const unittest::TestAllTypesLite& message) { - EXPECT_TRUE(message.has_optional_int32 ()); - EXPECT_TRUE(message.has_optional_int64 ()); - EXPECT_TRUE(message.has_optional_uint32 ()); - EXPECT_TRUE(message.has_optional_uint64 ()); - EXPECT_TRUE(message.has_optional_sint32 ()); - EXPECT_TRUE(message.has_optional_sint64 ()); - EXPECT_TRUE(message.has_optional_fixed32 ()); - EXPECT_TRUE(message.has_optional_fixed64 ()); - EXPECT_TRUE(message.has_optional_sfixed32()); - EXPECT_TRUE(message.has_optional_sfixed64()); - EXPECT_TRUE(message.has_optional_float ()); - EXPECT_TRUE(message.has_optional_double ()); - EXPECT_TRUE(message.has_optional_bool ()); - EXPECT_TRUE(message.has_optional_string ()); - EXPECT_TRUE(message.has_optional_bytes ()); - - EXPECT_TRUE(message.has_optionalgroup ()); - EXPECT_TRUE(message.has_optional_nested_message ()); - EXPECT_TRUE(message.has_optional_foreign_message()); - EXPECT_TRUE(message.has_optional_import_message ()); - - EXPECT_TRUE(message.optionalgroup ().has_a()); - EXPECT_TRUE(message.optional_nested_message ().has_bb()); - EXPECT_TRUE(message.optional_foreign_message().has_c()); - EXPECT_TRUE(message.optional_import_message ().has_d()); - - EXPECT_TRUE(message.has_optional_nested_enum ()); - EXPECT_TRUE(message.has_optional_foreign_enum()); - EXPECT_TRUE(message.has_optional_import_enum ()); - - - EXPECT_EQ(101 , message.optional_int32 ()); - EXPECT_EQ(102 , message.optional_int64 ()); - EXPECT_EQ(103 , message.optional_uint32 ()); - EXPECT_EQ(104 , message.optional_uint64 ()); - EXPECT_EQ(105 , message.optional_sint32 ()); - EXPECT_EQ(106 , message.optional_sint64 ()); - EXPECT_EQ(107 , message.optional_fixed32 ()); - EXPECT_EQ(108 , message.optional_fixed64 ()); - EXPECT_EQ(109 , message.optional_sfixed32()); - EXPECT_EQ(110 , message.optional_sfixed64()); - EXPECT_EQ(111 , message.optional_float ()); - EXPECT_EQ(112 , message.optional_double ()); - EXPECT_EQ(true , message.optional_bool ()); - EXPECT_EQ("115", message.optional_string ()); - EXPECT_EQ("116", message.optional_bytes ()); - - EXPECT_EQ(117, message.optionalgroup ().a()); - EXPECT_EQ(118, message.optional_nested_message ().bb()); - EXPECT_EQ(119, message.optional_foreign_message().c()); - EXPECT_EQ(120, message.optional_import_message ().d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAZ , message.optional_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ , message.optional_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAZ, message.optional_import_enum ()); - - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, message.repeated_int32_size ()); - ASSERT_EQ(2, message.repeated_int64_size ()); - ASSERT_EQ(2, message.repeated_uint32_size ()); - ASSERT_EQ(2, message.repeated_uint64_size ()); - ASSERT_EQ(2, message.repeated_sint32_size ()); - ASSERT_EQ(2, message.repeated_sint64_size ()); - ASSERT_EQ(2, message.repeated_fixed32_size ()); - ASSERT_EQ(2, message.repeated_fixed64_size ()); - ASSERT_EQ(2, message.repeated_sfixed32_size()); - ASSERT_EQ(2, message.repeated_sfixed64_size()); - ASSERT_EQ(2, message.repeated_float_size ()); - ASSERT_EQ(2, message.repeated_double_size ()); - ASSERT_EQ(2, message.repeated_bool_size ()); - ASSERT_EQ(2, message.repeated_string_size ()); - ASSERT_EQ(2, message.repeated_bytes_size ()); - - ASSERT_EQ(2, message.repeatedgroup_size ()); - ASSERT_EQ(2, message.repeated_nested_message_size ()); - ASSERT_EQ(2, message.repeated_foreign_message_size()); - ASSERT_EQ(2, message.repeated_import_message_size ()); - ASSERT_EQ(2, message.repeated_nested_enum_size ()); - ASSERT_EQ(2, message.repeated_foreign_enum_size ()); - ASSERT_EQ(2, message.repeated_import_enum_size ()); - - - EXPECT_EQ(201 , message.repeated_int32 (0)); - EXPECT_EQ(202 , message.repeated_int64 (0)); - EXPECT_EQ(203 , message.repeated_uint32 (0)); - EXPECT_EQ(204 , message.repeated_uint64 (0)); - EXPECT_EQ(205 , message.repeated_sint32 (0)); - EXPECT_EQ(206 , message.repeated_sint64 (0)); - EXPECT_EQ(207 , message.repeated_fixed32 (0)); - EXPECT_EQ(208 , message.repeated_fixed64 (0)); - EXPECT_EQ(209 , message.repeated_sfixed32(0)); - EXPECT_EQ(210 , message.repeated_sfixed64(0)); - EXPECT_EQ(211 , message.repeated_float (0)); - EXPECT_EQ(212 , message.repeated_double (0)); - EXPECT_EQ(true , message.repeated_bool (0)); - EXPECT_EQ("215", message.repeated_string (0)); - EXPECT_EQ("216", message.repeated_bytes (0)); - - EXPECT_EQ(217, message.repeatedgroup (0).a()); - EXPECT_EQ(218, message.repeated_nested_message (0).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(0).c()); - EXPECT_EQ(220, message.repeated_import_message (0).d()); - - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.repeated_import_enum (0)); - - EXPECT_EQ(301 , message.repeated_int32 (1)); - EXPECT_EQ(302 , message.repeated_int64 (1)); - EXPECT_EQ(303 , message.repeated_uint32 (1)); - EXPECT_EQ(304 , message.repeated_uint64 (1)); - EXPECT_EQ(305 , message.repeated_sint32 (1)); - EXPECT_EQ(306 , message.repeated_sint64 (1)); - EXPECT_EQ(307 , message.repeated_fixed32 (1)); - EXPECT_EQ(308 , message.repeated_fixed64 (1)); - EXPECT_EQ(309 , message.repeated_sfixed32(1)); - EXPECT_EQ(310 , message.repeated_sfixed64(1)); - EXPECT_EQ(311 , message.repeated_float (1)); - EXPECT_EQ(312 , message.repeated_double (1)); - EXPECT_EQ(false, message.repeated_bool (1)); - EXPECT_EQ("315", message.repeated_string (1)); - EXPECT_EQ("316", message.repeated_bytes (1)); - - EXPECT_EQ(317, message.repeatedgroup (1).a()); - EXPECT_EQ(318, message.repeated_nested_message (1).bb()); - EXPECT_EQ(319, message.repeated_foreign_message(1).c()); - EXPECT_EQ(320, message.repeated_import_message (1).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAZ , message.repeated_nested_enum (1)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ , message.repeated_foreign_enum(1)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAZ, message.repeated_import_enum (1)); - - - // ----------------------------------------------------------------- - - EXPECT_TRUE(message.has_default_int32 ()); - EXPECT_TRUE(message.has_default_int64 ()); - EXPECT_TRUE(message.has_default_uint32 ()); - EXPECT_TRUE(message.has_default_uint64 ()); - EXPECT_TRUE(message.has_default_sint32 ()); - EXPECT_TRUE(message.has_default_sint64 ()); - EXPECT_TRUE(message.has_default_fixed32 ()); - EXPECT_TRUE(message.has_default_fixed64 ()); - EXPECT_TRUE(message.has_default_sfixed32()); - EXPECT_TRUE(message.has_default_sfixed64()); - EXPECT_TRUE(message.has_default_float ()); - EXPECT_TRUE(message.has_default_double ()); - EXPECT_TRUE(message.has_default_bool ()); - EXPECT_TRUE(message.has_default_string ()); - EXPECT_TRUE(message.has_default_bytes ()); - - EXPECT_TRUE(message.has_default_nested_enum ()); - EXPECT_TRUE(message.has_default_foreign_enum()); - EXPECT_TRUE(message.has_default_import_enum ()); - - - EXPECT_EQ(401 , message.default_int32 ()); - EXPECT_EQ(402 , message.default_int64 ()); - EXPECT_EQ(403 , message.default_uint32 ()); - EXPECT_EQ(404 , message.default_uint64 ()); - EXPECT_EQ(405 , message.default_sint32 ()); - EXPECT_EQ(406 , message.default_sint64 ()); - EXPECT_EQ(407 , message.default_fixed32 ()); - EXPECT_EQ(408 , message.default_fixed64 ()); - EXPECT_EQ(409 , message.default_sfixed32()); - EXPECT_EQ(410 , message.default_sfixed64()); - EXPECT_EQ(411 , message.default_float ()); - EXPECT_EQ(412 , message.default_double ()); - EXPECT_EQ(false, message.default_bool ()); - EXPECT_EQ("415", message.default_string ()); - EXPECT_EQ("416", message.default_bytes ()); - - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.default_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.default_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.default_import_enum ()); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectClear(const unittest::TestAllTypesLite& message) { - // has_blah() should initially be false for all optional fields. - EXPECT_FALSE(message.has_optional_int32 ()); - EXPECT_FALSE(message.has_optional_int64 ()); - EXPECT_FALSE(message.has_optional_uint32 ()); - EXPECT_FALSE(message.has_optional_uint64 ()); - EXPECT_FALSE(message.has_optional_sint32 ()); - EXPECT_FALSE(message.has_optional_sint64 ()); - EXPECT_FALSE(message.has_optional_fixed32 ()); - EXPECT_FALSE(message.has_optional_fixed64 ()); - EXPECT_FALSE(message.has_optional_sfixed32()); - EXPECT_FALSE(message.has_optional_sfixed64()); - EXPECT_FALSE(message.has_optional_float ()); - EXPECT_FALSE(message.has_optional_double ()); - EXPECT_FALSE(message.has_optional_bool ()); - EXPECT_FALSE(message.has_optional_string ()); - EXPECT_FALSE(message.has_optional_bytes ()); - - EXPECT_FALSE(message.has_optionalgroup ()); - EXPECT_FALSE(message.has_optional_nested_message ()); - EXPECT_FALSE(message.has_optional_foreign_message()); - EXPECT_FALSE(message.has_optional_import_message ()); - - EXPECT_FALSE(message.has_optional_nested_enum ()); - EXPECT_FALSE(message.has_optional_foreign_enum()); - EXPECT_FALSE(message.has_optional_import_enum ()); - - - // Optional fields without defaults are set to zero or something like it. - EXPECT_EQ(0 , message.optional_int32 ()); - EXPECT_EQ(0 , message.optional_int64 ()); - EXPECT_EQ(0 , message.optional_uint32 ()); - EXPECT_EQ(0 , message.optional_uint64 ()); - EXPECT_EQ(0 , message.optional_sint32 ()); - EXPECT_EQ(0 , message.optional_sint64 ()); - EXPECT_EQ(0 , message.optional_fixed32 ()); - EXPECT_EQ(0 , message.optional_fixed64 ()); - EXPECT_EQ(0 , message.optional_sfixed32()); - EXPECT_EQ(0 , message.optional_sfixed64()); - EXPECT_EQ(0 , message.optional_float ()); - EXPECT_EQ(0 , message.optional_double ()); - EXPECT_EQ(false, message.optional_bool ()); - EXPECT_EQ("" , message.optional_string ()); - EXPECT_EQ("" , message.optional_bytes ()); - - // Embedded messages should also be clear. - EXPECT_FALSE(message.optionalgroup ().has_a()); - EXPECT_FALSE(message.optional_nested_message ().has_bb()); - EXPECT_FALSE(message.optional_foreign_message().has_c()); - EXPECT_FALSE(message.optional_import_message ().has_d()); - - EXPECT_EQ(0, message.optionalgroup ().a()); - EXPECT_EQ(0, message.optional_nested_message ().bb()); - EXPECT_EQ(0, message.optional_foreign_message().c()); - EXPECT_EQ(0, message.optional_import_message ().d()); - - // Enums without defaults are set to the first value in the enum. - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.optional_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.optional_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.optional_import_enum ()); - - - // Repeated fields are empty. - EXPECT_EQ(0, message.repeated_int32_size ()); - EXPECT_EQ(0, message.repeated_int64_size ()); - EXPECT_EQ(0, message.repeated_uint32_size ()); - EXPECT_EQ(0, message.repeated_uint64_size ()); - EXPECT_EQ(0, message.repeated_sint32_size ()); - EXPECT_EQ(0, message.repeated_sint64_size ()); - EXPECT_EQ(0, message.repeated_fixed32_size ()); - EXPECT_EQ(0, message.repeated_fixed64_size ()); - EXPECT_EQ(0, message.repeated_sfixed32_size()); - EXPECT_EQ(0, message.repeated_sfixed64_size()); - EXPECT_EQ(0, message.repeated_float_size ()); - EXPECT_EQ(0, message.repeated_double_size ()); - EXPECT_EQ(0, message.repeated_bool_size ()); - EXPECT_EQ(0, message.repeated_string_size ()); - EXPECT_EQ(0, message.repeated_bytes_size ()); - - EXPECT_EQ(0, message.repeatedgroup_size ()); - EXPECT_EQ(0, message.repeated_nested_message_size ()); - EXPECT_EQ(0, message.repeated_foreign_message_size()); - EXPECT_EQ(0, message.repeated_import_message_size ()); - EXPECT_EQ(0, message.repeated_nested_enum_size ()); - EXPECT_EQ(0, message.repeated_foreign_enum_size ()); - EXPECT_EQ(0, message.repeated_import_enum_size ()); - - - // has_blah() should also be false for all default fields. - EXPECT_FALSE(message.has_default_int32 ()); - EXPECT_FALSE(message.has_default_int64 ()); - EXPECT_FALSE(message.has_default_uint32 ()); - EXPECT_FALSE(message.has_default_uint64 ()); - EXPECT_FALSE(message.has_default_sint32 ()); - EXPECT_FALSE(message.has_default_sint64 ()); - EXPECT_FALSE(message.has_default_fixed32 ()); - EXPECT_FALSE(message.has_default_fixed64 ()); - EXPECT_FALSE(message.has_default_sfixed32()); - EXPECT_FALSE(message.has_default_sfixed64()); - EXPECT_FALSE(message.has_default_float ()); - EXPECT_FALSE(message.has_default_double ()); - EXPECT_FALSE(message.has_default_bool ()); - EXPECT_FALSE(message.has_default_string ()); - EXPECT_FALSE(message.has_default_bytes ()); - - EXPECT_FALSE(message.has_default_nested_enum ()); - EXPECT_FALSE(message.has_default_foreign_enum()); - EXPECT_FALSE(message.has_default_import_enum ()); - - - // Fields with defaults have their default values (duh). - EXPECT_EQ( 41 , message.default_int32 ()); - EXPECT_EQ( 42 , message.default_int64 ()); - EXPECT_EQ( 43 , message.default_uint32 ()); - EXPECT_EQ( 44 , message.default_uint64 ()); - EXPECT_EQ(-45 , message.default_sint32 ()); - EXPECT_EQ( 46 , message.default_sint64 ()); - EXPECT_EQ( 47 , message.default_fixed32 ()); - EXPECT_EQ( 48 , message.default_fixed64 ()); - EXPECT_EQ( 49 , message.default_sfixed32()); - EXPECT_EQ(-50 , message.default_sfixed64()); - EXPECT_EQ( 51.5 , message.default_float ()); - EXPECT_EQ( 52e3 , message.default_double ()); - EXPECT_EQ(true , message.default_bool ()); - EXPECT_EQ("hello", message.default_string ()); - EXPECT_EQ("world", message.default_bytes ()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.default_nested_enum ()); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.default_foreign_enum()); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.default_import_enum ()); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectRepeatedFieldsModified( - const unittest::TestAllTypesLite& message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - ASSERT_EQ(2, message.repeated_int32_size ()); - ASSERT_EQ(2, message.repeated_int64_size ()); - ASSERT_EQ(2, message.repeated_uint32_size ()); - ASSERT_EQ(2, message.repeated_uint64_size ()); - ASSERT_EQ(2, message.repeated_sint32_size ()); - ASSERT_EQ(2, message.repeated_sint64_size ()); - ASSERT_EQ(2, message.repeated_fixed32_size ()); - ASSERT_EQ(2, message.repeated_fixed64_size ()); - ASSERT_EQ(2, message.repeated_sfixed32_size()); - ASSERT_EQ(2, message.repeated_sfixed64_size()); - ASSERT_EQ(2, message.repeated_float_size ()); - ASSERT_EQ(2, message.repeated_double_size ()); - ASSERT_EQ(2, message.repeated_bool_size ()); - ASSERT_EQ(2, message.repeated_string_size ()); - ASSERT_EQ(2, message.repeated_bytes_size ()); - - ASSERT_EQ(2, message.repeatedgroup_size ()); - ASSERT_EQ(2, message.repeated_nested_message_size ()); - ASSERT_EQ(2, message.repeated_foreign_message_size()); - ASSERT_EQ(2, message.repeated_import_message_size ()); - ASSERT_EQ(2, message.repeated_nested_enum_size ()); - ASSERT_EQ(2, message.repeated_foreign_enum_size ()); - ASSERT_EQ(2, message.repeated_import_enum_size ()); - - - EXPECT_EQ(201 , message.repeated_int32 (0)); - EXPECT_EQ(202 , message.repeated_int64 (0)); - EXPECT_EQ(203 , message.repeated_uint32 (0)); - EXPECT_EQ(204 , message.repeated_uint64 (0)); - EXPECT_EQ(205 , message.repeated_sint32 (0)); - EXPECT_EQ(206 , message.repeated_sint64 (0)); - EXPECT_EQ(207 , message.repeated_fixed32 (0)); - EXPECT_EQ(208 , message.repeated_fixed64 (0)); - EXPECT_EQ(209 , message.repeated_sfixed32(0)); - EXPECT_EQ(210 , message.repeated_sfixed64(0)); - EXPECT_EQ(211 , message.repeated_float (0)); - EXPECT_EQ(212 , message.repeated_double (0)); - EXPECT_EQ(true , message.repeated_bool (0)); - EXPECT_EQ("215", message.repeated_string (0)); - EXPECT_EQ("216", message.repeated_bytes (0)); - - EXPECT_EQ(217, message.repeatedgroup (0).a()); - EXPECT_EQ(218, message.repeated_nested_message (0).bb()); - EXPECT_EQ(219, message.repeated_foreign_message(0).c()); - EXPECT_EQ(220, message.repeated_import_message (0).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.repeated_nested_enum (0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.repeated_foreign_enum(0)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.repeated_import_enum (0)); - - - // Actually verify the second (modified) elements now. - EXPECT_EQ(501 , message.repeated_int32 (1)); - EXPECT_EQ(502 , message.repeated_int64 (1)); - EXPECT_EQ(503 , message.repeated_uint32 (1)); - EXPECT_EQ(504 , message.repeated_uint64 (1)); - EXPECT_EQ(505 , message.repeated_sint32 (1)); - EXPECT_EQ(506 , message.repeated_sint64 (1)); - EXPECT_EQ(507 , message.repeated_fixed32 (1)); - EXPECT_EQ(508 , message.repeated_fixed64 (1)); - EXPECT_EQ(509 , message.repeated_sfixed32(1)); - EXPECT_EQ(510 , message.repeated_sfixed64(1)); - EXPECT_EQ(511 , message.repeated_float (1)); - EXPECT_EQ(512 , message.repeated_double (1)); - EXPECT_EQ(true , message.repeated_bool (1)); - EXPECT_EQ("515", message.repeated_string (1)); - EXPECT_EQ("516", message.repeated_bytes (1)); - - EXPECT_EQ(517, message.repeatedgroup (1).a()); - EXPECT_EQ(518, message.repeated_nested_message (1).bb()); - EXPECT_EQ(519, message.repeated_foreign_message(1).c()); - EXPECT_EQ(520, message.repeated_import_message (1).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.repeated_nested_enum (1)); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.repeated_foreign_enum(1)); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.repeated_import_enum (1)); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::SetPackedFields(unittest::TestPackedTypesLite* message) { - message->add_packed_int32 (601); - message->add_packed_int64 (602); - message->add_packed_uint32 (603); - message->add_packed_uint64 (604); - message->add_packed_sint32 (605); - message->add_packed_sint64 (606); - message->add_packed_fixed32 (607); - message->add_packed_fixed64 (608); - message->add_packed_sfixed32(609); - message->add_packed_sfixed64(610); - message->add_packed_float (611); - message->add_packed_double (612); - message->add_packed_bool (true); - message->add_packed_enum (unittest::FOREIGN_LITE_BAR); - // add a second one of each field - message->add_packed_int32 (701); - message->add_packed_int64 (702); - message->add_packed_uint32 (703); - message->add_packed_uint64 (704); - message->add_packed_sint32 (705); - message->add_packed_sint64 (706); - message->add_packed_fixed32 (707); - message->add_packed_fixed64 (708); - message->add_packed_sfixed32(709); - message->add_packed_sfixed64(710); - message->add_packed_float (711); - message->add_packed_double (712); - message->add_packed_bool (false); - message->add_packed_enum (unittest::FOREIGN_LITE_BAZ); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ModifyPackedFields(unittest::TestPackedTypesLite* message) { - message->set_packed_int32 (1, 801); - message->set_packed_int64 (1, 802); - message->set_packed_uint32 (1, 803); - message->set_packed_uint64 (1, 804); - message->set_packed_sint32 (1, 805); - message->set_packed_sint64 (1, 806); - message->set_packed_fixed32 (1, 807); - message->set_packed_fixed64 (1, 808); - message->set_packed_sfixed32(1, 809); - message->set_packed_sfixed64(1, 810); - message->set_packed_float (1, 811); - message->set_packed_double (1, 812); - message->set_packed_bool (1, true); - message->set_packed_enum (1, unittest::FOREIGN_LITE_FOO); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedFieldsSet( - const unittest::TestPackedTypesLite& message) { - ASSERT_EQ(2, message.packed_int32_size ()); - ASSERT_EQ(2, message.packed_int64_size ()); - ASSERT_EQ(2, message.packed_uint32_size ()); - ASSERT_EQ(2, message.packed_uint64_size ()); - ASSERT_EQ(2, message.packed_sint32_size ()); - ASSERT_EQ(2, message.packed_sint64_size ()); - ASSERT_EQ(2, message.packed_fixed32_size ()); - ASSERT_EQ(2, message.packed_fixed64_size ()); - ASSERT_EQ(2, message.packed_sfixed32_size()); - ASSERT_EQ(2, message.packed_sfixed64_size()); - ASSERT_EQ(2, message.packed_float_size ()); - ASSERT_EQ(2, message.packed_double_size ()); - ASSERT_EQ(2, message.packed_bool_size ()); - ASSERT_EQ(2, message.packed_enum_size ()); - - EXPECT_EQ(601 , message.packed_int32 (0)); - EXPECT_EQ(602 , message.packed_int64 (0)); - EXPECT_EQ(603 , message.packed_uint32 (0)); - EXPECT_EQ(604 , message.packed_uint64 (0)); - EXPECT_EQ(605 , message.packed_sint32 (0)); - EXPECT_EQ(606 , message.packed_sint64 (0)); - EXPECT_EQ(607 , message.packed_fixed32 (0)); - EXPECT_EQ(608 , message.packed_fixed64 (0)); - EXPECT_EQ(609 , message.packed_sfixed32(0)); - EXPECT_EQ(610 , message.packed_sfixed64(0)); - EXPECT_EQ(611 , message.packed_float (0)); - EXPECT_EQ(612 , message.packed_double (0)); - EXPECT_EQ(true , message.packed_bool (0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR, message.packed_enum(0)); - - EXPECT_EQ(701 , message.packed_int32 (1)); - EXPECT_EQ(702 , message.packed_int64 (1)); - EXPECT_EQ(703 , message.packed_uint32 (1)); - EXPECT_EQ(704 , message.packed_uint64 (1)); - EXPECT_EQ(705 , message.packed_sint32 (1)); - EXPECT_EQ(706 , message.packed_sint64 (1)); - EXPECT_EQ(707 , message.packed_fixed32 (1)); - EXPECT_EQ(708 , message.packed_fixed64 (1)); - EXPECT_EQ(709 , message.packed_sfixed32(1)); - EXPECT_EQ(710 , message.packed_sfixed64(1)); - EXPECT_EQ(711 , message.packed_float (1)); - EXPECT_EQ(712 , message.packed_double (1)); - EXPECT_EQ(false, message.packed_bool (1)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ, message.packed_enum(1)); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedClear( - const unittest::TestPackedTypesLite& message) { - // Packed repeated fields are empty. - EXPECT_EQ(0, message.packed_int32_size ()); - EXPECT_EQ(0, message.packed_int64_size ()); - EXPECT_EQ(0, message.packed_uint32_size ()); - EXPECT_EQ(0, message.packed_uint64_size ()); - EXPECT_EQ(0, message.packed_sint32_size ()); - EXPECT_EQ(0, message.packed_sint64_size ()); - EXPECT_EQ(0, message.packed_fixed32_size ()); - EXPECT_EQ(0, message.packed_fixed64_size ()); - EXPECT_EQ(0, message.packed_sfixed32_size()); - EXPECT_EQ(0, message.packed_sfixed64_size()); - EXPECT_EQ(0, message.packed_float_size ()); - EXPECT_EQ(0, message.packed_double_size ()); - EXPECT_EQ(0, message.packed_bool_size ()); - EXPECT_EQ(0, message.packed_enum_size ()); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedFieldsModified( - const unittest::TestPackedTypesLite& message) { - // Do the same for packed repeated fields. - ASSERT_EQ(2, message.packed_int32_size ()); - ASSERT_EQ(2, message.packed_int64_size ()); - ASSERT_EQ(2, message.packed_uint32_size ()); - ASSERT_EQ(2, message.packed_uint64_size ()); - ASSERT_EQ(2, message.packed_sint32_size ()); - ASSERT_EQ(2, message.packed_sint64_size ()); - ASSERT_EQ(2, message.packed_fixed32_size ()); - ASSERT_EQ(2, message.packed_fixed64_size ()); - ASSERT_EQ(2, message.packed_sfixed32_size()); - ASSERT_EQ(2, message.packed_sfixed64_size()); - ASSERT_EQ(2, message.packed_float_size ()); - ASSERT_EQ(2, message.packed_double_size ()); - ASSERT_EQ(2, message.packed_bool_size ()); - ASSERT_EQ(2, message.packed_enum_size ()); - - EXPECT_EQ(601 , message.packed_int32 (0)); - EXPECT_EQ(602 , message.packed_int64 (0)); - EXPECT_EQ(603 , message.packed_uint32 (0)); - EXPECT_EQ(604 , message.packed_uint64 (0)); - EXPECT_EQ(605 , message.packed_sint32 (0)); - EXPECT_EQ(606 , message.packed_sint64 (0)); - EXPECT_EQ(607 , message.packed_fixed32 (0)); - EXPECT_EQ(608 , message.packed_fixed64 (0)); - EXPECT_EQ(609 , message.packed_sfixed32(0)); - EXPECT_EQ(610 , message.packed_sfixed64(0)); - EXPECT_EQ(611 , message.packed_float (0)); - EXPECT_EQ(612 , message.packed_double (0)); - EXPECT_EQ(true , message.packed_bool (0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR, message.packed_enum(0)); - // Actually verify the second (modified) elements now. - EXPECT_EQ(801 , message.packed_int32 (1)); - EXPECT_EQ(802 , message.packed_int64 (1)); - EXPECT_EQ(803 , message.packed_uint32 (1)); - EXPECT_EQ(804 , message.packed_uint64 (1)); - EXPECT_EQ(805 , message.packed_sint32 (1)); - EXPECT_EQ(806 , message.packed_sint64 (1)); - EXPECT_EQ(807 , message.packed_fixed32 (1)); - EXPECT_EQ(808 , message.packed_fixed64 (1)); - EXPECT_EQ(809 , message.packed_sfixed32(1)); - EXPECT_EQ(810 , message.packed_sfixed64(1)); - EXPECT_EQ(811 , message.packed_float (1)); - EXPECT_EQ(812 , message.packed_double (1)); - EXPECT_EQ(true , message.packed_bool (1)); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO, message.packed_enum(1)); -} - -// =================================================================== -// Extensions -// -// All this code is exactly equivalent to the above code except that it's -// manipulating extension fields instead of normal ones. -// -// I gave up on the 80-char limit here. Sorry. - -void TestUtilLite::SetAllExtensions(unittest::TestAllExtensionsLite* message) { - message->SetExtension(unittest::optional_int32_extension_lite , 101); - message->SetExtension(unittest::optional_int64_extension_lite , 102); - message->SetExtension(unittest::optional_uint32_extension_lite , 103); - message->SetExtension(unittest::optional_uint64_extension_lite , 104); - message->SetExtension(unittest::optional_sint32_extension_lite , 105); - message->SetExtension(unittest::optional_sint64_extension_lite , 106); - message->SetExtension(unittest::optional_fixed32_extension_lite , 107); - message->SetExtension(unittest::optional_fixed64_extension_lite , 108); - message->SetExtension(unittest::optional_sfixed32_extension_lite, 109); - message->SetExtension(unittest::optional_sfixed64_extension_lite, 110); - message->SetExtension(unittest::optional_float_extension_lite , 111); - message->SetExtension(unittest::optional_double_extension_lite , 112); - message->SetExtension(unittest::optional_bool_extension_lite , true); - message->SetExtension(unittest::optional_string_extension_lite , "115"); - message->SetExtension(unittest::optional_bytes_extension_lite , "116"); - - message->MutableExtension(unittest::optionalgroup_extension_lite )->set_a(117); - message->MutableExtension(unittest::optional_nested_message_extension_lite )->set_bb(118); - message->MutableExtension(unittest::optional_foreign_message_extension_lite)->set_c(119); - message->MutableExtension(unittest::optional_import_message_extension_lite )->set_d(120); - - message->SetExtension(unittest::optional_nested_enum_extension_lite , unittest::TestAllTypesLite::BAZ ); - message->SetExtension(unittest::optional_foreign_enum_extension_lite, unittest::FOREIGN_LITE_BAZ ); - message->SetExtension(unittest::optional_import_enum_extension_lite , unittest_import::IMPORT_LITE_BAZ); - - - // ----------------------------------------------------------------- - - message->AddExtension(unittest::repeated_int32_extension_lite , 201); - message->AddExtension(unittest::repeated_int64_extension_lite , 202); - message->AddExtension(unittest::repeated_uint32_extension_lite , 203); - message->AddExtension(unittest::repeated_uint64_extension_lite , 204); - message->AddExtension(unittest::repeated_sint32_extension_lite , 205); - message->AddExtension(unittest::repeated_sint64_extension_lite , 206); - message->AddExtension(unittest::repeated_fixed32_extension_lite , 207); - message->AddExtension(unittest::repeated_fixed64_extension_lite , 208); - message->AddExtension(unittest::repeated_sfixed32_extension_lite, 209); - message->AddExtension(unittest::repeated_sfixed64_extension_lite, 210); - message->AddExtension(unittest::repeated_float_extension_lite , 211); - message->AddExtension(unittest::repeated_double_extension_lite , 212); - message->AddExtension(unittest::repeated_bool_extension_lite , true); - message->AddExtension(unittest::repeated_string_extension_lite , "215"); - message->AddExtension(unittest::repeated_bytes_extension_lite , "216"); - - message->AddExtension(unittest::repeatedgroup_extension_lite )->set_a(217); - message->AddExtension(unittest::repeated_nested_message_extension_lite )->set_bb(218); - message->AddExtension(unittest::repeated_foreign_message_extension_lite)->set_c(219); - message->AddExtension(unittest::repeated_import_message_extension_lite )->set_d(220); - - message->AddExtension(unittest::repeated_nested_enum_extension_lite , unittest::TestAllTypesLite::BAR ); - message->AddExtension(unittest::repeated_foreign_enum_extension_lite, unittest::FOREIGN_LITE_BAR ); - message->AddExtension(unittest::repeated_import_enum_extension_lite , unittest_import::IMPORT_LITE_BAR); - - - // Add a second one of each field. - message->AddExtension(unittest::repeated_int32_extension_lite , 301); - message->AddExtension(unittest::repeated_int64_extension_lite , 302); - message->AddExtension(unittest::repeated_uint32_extension_lite , 303); - message->AddExtension(unittest::repeated_uint64_extension_lite , 304); - message->AddExtension(unittest::repeated_sint32_extension_lite , 305); - message->AddExtension(unittest::repeated_sint64_extension_lite , 306); - message->AddExtension(unittest::repeated_fixed32_extension_lite , 307); - message->AddExtension(unittest::repeated_fixed64_extension_lite , 308); - message->AddExtension(unittest::repeated_sfixed32_extension_lite, 309); - message->AddExtension(unittest::repeated_sfixed64_extension_lite, 310); - message->AddExtension(unittest::repeated_float_extension_lite , 311); - message->AddExtension(unittest::repeated_double_extension_lite , 312); - message->AddExtension(unittest::repeated_bool_extension_lite , false); - message->AddExtension(unittest::repeated_string_extension_lite , "315"); - message->AddExtension(unittest::repeated_bytes_extension_lite , "316"); - - message->AddExtension(unittest::repeatedgroup_extension_lite )->set_a(317); - message->AddExtension(unittest::repeated_nested_message_extension_lite )->set_bb(318); - message->AddExtension(unittest::repeated_foreign_message_extension_lite)->set_c(319); - message->AddExtension(unittest::repeated_import_message_extension_lite )->set_d(320); - - message->AddExtension(unittest::repeated_nested_enum_extension_lite , unittest::TestAllTypesLite::BAZ ); - message->AddExtension(unittest::repeated_foreign_enum_extension_lite, unittest::FOREIGN_LITE_BAZ ); - message->AddExtension(unittest::repeated_import_enum_extension_lite , unittest_import::IMPORT_LITE_BAZ); - - - // ----------------------------------------------------------------- - - message->SetExtension(unittest::default_int32_extension_lite , 401); - message->SetExtension(unittest::default_int64_extension_lite , 402); - message->SetExtension(unittest::default_uint32_extension_lite , 403); - message->SetExtension(unittest::default_uint64_extension_lite , 404); - message->SetExtension(unittest::default_sint32_extension_lite , 405); - message->SetExtension(unittest::default_sint64_extension_lite , 406); - message->SetExtension(unittest::default_fixed32_extension_lite , 407); - message->SetExtension(unittest::default_fixed64_extension_lite , 408); - message->SetExtension(unittest::default_sfixed32_extension_lite, 409); - message->SetExtension(unittest::default_sfixed64_extension_lite, 410); - message->SetExtension(unittest::default_float_extension_lite , 411); - message->SetExtension(unittest::default_double_extension_lite , 412); - message->SetExtension(unittest::default_bool_extension_lite , false); - message->SetExtension(unittest::default_string_extension_lite , "415"); - message->SetExtension(unittest::default_bytes_extension_lite , "416"); - - message->SetExtension(unittest::default_nested_enum_extension_lite , unittest::TestAllTypesLite::FOO ); - message->SetExtension(unittest::default_foreign_enum_extension_lite, unittest::FOREIGN_LITE_FOO ); - message->SetExtension(unittest::default_import_enum_extension_lite , unittest_import::IMPORT_LITE_FOO); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ModifyRepeatedExtensions( - unittest::TestAllExtensionsLite* message) { - message->SetExtension(unittest::repeated_int32_extension_lite , 1, 501); - message->SetExtension(unittest::repeated_int64_extension_lite , 1, 502); - message->SetExtension(unittest::repeated_uint32_extension_lite , 1, 503); - message->SetExtension(unittest::repeated_uint64_extension_lite , 1, 504); - message->SetExtension(unittest::repeated_sint32_extension_lite , 1, 505); - message->SetExtension(unittest::repeated_sint64_extension_lite , 1, 506); - message->SetExtension(unittest::repeated_fixed32_extension_lite , 1, 507); - message->SetExtension(unittest::repeated_fixed64_extension_lite , 1, 508); - message->SetExtension(unittest::repeated_sfixed32_extension_lite, 1, 509); - message->SetExtension(unittest::repeated_sfixed64_extension_lite, 1, 510); - message->SetExtension(unittest::repeated_float_extension_lite , 1, 511); - message->SetExtension(unittest::repeated_double_extension_lite , 1, 512); - message->SetExtension(unittest::repeated_bool_extension_lite , 1, true); - message->SetExtension(unittest::repeated_string_extension_lite , 1, "515"); - message->SetExtension(unittest::repeated_bytes_extension_lite , 1, "516"); - - message->MutableExtension(unittest::repeatedgroup_extension_lite , 1)->set_a(517); - message->MutableExtension(unittest::repeated_nested_message_extension_lite , 1)->set_bb(518); - message->MutableExtension(unittest::repeated_foreign_message_extension_lite, 1)->set_c(519); - message->MutableExtension(unittest::repeated_import_message_extension_lite , 1)->set_d(520); - - message->SetExtension(unittest::repeated_nested_enum_extension_lite , 1, unittest::TestAllTypesLite::FOO ); - message->SetExtension(unittest::repeated_foreign_enum_extension_lite, 1, unittest::FOREIGN_LITE_FOO ); - message->SetExtension(unittest::repeated_import_enum_extension_lite , 1, unittest_import::IMPORT_LITE_FOO); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectAllExtensionsSet( - const unittest::TestAllExtensionsLite& message) { - EXPECT_TRUE(message.HasExtension(unittest::optional_int32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_int64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_uint32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_uint64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sint32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sint64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_fixed32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_fixed64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_sfixed32_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::optional_sfixed64_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::optional_float_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_double_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_bool_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_string_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_bytes_extension_lite )); - - EXPECT_TRUE(message.HasExtension(unittest::optionalgroup_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_nested_message_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_foreign_message_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::optional_import_message_extension_lite )); - - EXPECT_TRUE(message.GetExtension(unittest::optionalgroup_extension_lite ).has_a()); - EXPECT_TRUE(message.GetExtension(unittest::optional_nested_message_extension_lite ).has_bb()); - EXPECT_TRUE(message.GetExtension(unittest::optional_foreign_message_extension_lite).has_c()); - EXPECT_TRUE(message.GetExtension(unittest::optional_import_message_extension_lite ).has_d()); - - EXPECT_TRUE(message.HasExtension(unittest::optional_nested_enum_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::optional_foreign_enum_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::optional_import_enum_extension_lite )); - - - EXPECT_EQ(101 , message.GetExtension(unittest::optional_int32_extension_lite )); - EXPECT_EQ(102 , message.GetExtension(unittest::optional_int64_extension_lite )); - EXPECT_EQ(103 , message.GetExtension(unittest::optional_uint32_extension_lite )); - EXPECT_EQ(104 , message.GetExtension(unittest::optional_uint64_extension_lite )); - EXPECT_EQ(105 , message.GetExtension(unittest::optional_sint32_extension_lite )); - EXPECT_EQ(106 , message.GetExtension(unittest::optional_sint64_extension_lite )); - EXPECT_EQ(107 , message.GetExtension(unittest::optional_fixed32_extension_lite )); - EXPECT_EQ(108 , message.GetExtension(unittest::optional_fixed64_extension_lite )); - EXPECT_EQ(109 , message.GetExtension(unittest::optional_sfixed32_extension_lite)); - EXPECT_EQ(110 , message.GetExtension(unittest::optional_sfixed64_extension_lite)); - EXPECT_EQ(111 , message.GetExtension(unittest::optional_float_extension_lite )); - EXPECT_EQ(112 , message.GetExtension(unittest::optional_double_extension_lite )); - EXPECT_EQ(true , message.GetExtension(unittest::optional_bool_extension_lite )); - EXPECT_EQ("115", message.GetExtension(unittest::optional_string_extension_lite )); - EXPECT_EQ("116", message.GetExtension(unittest::optional_bytes_extension_lite )); - - EXPECT_EQ(117, message.GetExtension(unittest::optionalgroup_extension_lite ).a()); - EXPECT_EQ(118, message.GetExtension(unittest::optional_nested_message_extension_lite ).bb()); - EXPECT_EQ(119, message.GetExtension(unittest::optional_foreign_message_extension_lite).c()); - EXPECT_EQ(120, message.GetExtension(unittest::optional_import_message_extension_lite ).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAZ , message.GetExtension(unittest::optional_nested_enum_extension_lite )); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ , message.GetExtension(unittest::optional_foreign_enum_extension_lite)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAZ, message.GetExtension(unittest::optional_import_enum_extension_lite )); - - - // ----------------------------------------------------------------- - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed32_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed64_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_float_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_double_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bool_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bytes_extension_lite )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeatedgroup_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_message_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_message_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_message_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_enum_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_enum_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_enum_extension_lite )); - - - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension_lite , 0)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension_lite , 0)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension_lite , 0)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension_lite , 0)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension_lite , 0)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension_lite , 0)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension_lite , 0)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension_lite , 0)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension_lite, 0)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension_lite, 0)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension_lite , 0)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension_lite , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension_lite , 0)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension_lite , 0)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension_lite , 0)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension_lite , 0).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension_lite , 0).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension_lite, 0).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension_lite , 0).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.GetExtension(unittest::repeated_nested_enum_extension_lite , 0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension_lite, 0)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.GetExtension(unittest::repeated_import_enum_extension_lite , 0)); - - - EXPECT_EQ(301 , message.GetExtension(unittest::repeated_int32_extension_lite , 1)); - EXPECT_EQ(302 , message.GetExtension(unittest::repeated_int64_extension_lite , 1)); - EXPECT_EQ(303 , message.GetExtension(unittest::repeated_uint32_extension_lite , 1)); - EXPECT_EQ(304 , message.GetExtension(unittest::repeated_uint64_extension_lite , 1)); - EXPECT_EQ(305 , message.GetExtension(unittest::repeated_sint32_extension_lite , 1)); - EXPECT_EQ(306 , message.GetExtension(unittest::repeated_sint64_extension_lite , 1)); - EXPECT_EQ(307 , message.GetExtension(unittest::repeated_fixed32_extension_lite , 1)); - EXPECT_EQ(308 , message.GetExtension(unittest::repeated_fixed64_extension_lite , 1)); - EXPECT_EQ(309 , message.GetExtension(unittest::repeated_sfixed32_extension_lite, 1)); - EXPECT_EQ(310 , message.GetExtension(unittest::repeated_sfixed64_extension_lite, 1)); - EXPECT_EQ(311 , message.GetExtension(unittest::repeated_float_extension_lite , 1)); - EXPECT_EQ(312 , message.GetExtension(unittest::repeated_double_extension_lite , 1)); - EXPECT_EQ(false, message.GetExtension(unittest::repeated_bool_extension_lite , 1)); - EXPECT_EQ("315", message.GetExtension(unittest::repeated_string_extension_lite , 1)); - EXPECT_EQ("316", message.GetExtension(unittest::repeated_bytes_extension_lite , 1)); - - EXPECT_EQ(317, message.GetExtension(unittest::repeatedgroup_extension_lite , 1).a()); - EXPECT_EQ(318, message.GetExtension(unittest::repeated_nested_message_extension_lite , 1).bb()); - EXPECT_EQ(319, message.GetExtension(unittest::repeated_foreign_message_extension_lite, 1).c()); - EXPECT_EQ(320, message.GetExtension(unittest::repeated_import_message_extension_lite , 1).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAZ , message.GetExtension(unittest::repeated_nested_enum_extension_lite , 1)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ , message.GetExtension(unittest::repeated_foreign_enum_extension_lite, 1)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAZ, message.GetExtension(unittest::repeated_import_enum_extension_lite , 1)); - - - // ----------------------------------------------------------------- - - EXPECT_TRUE(message.HasExtension(unittest::default_int32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_int64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_uint32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_uint64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_sint32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_sint64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_fixed32_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_fixed64_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_sfixed32_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::default_sfixed64_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::default_float_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_double_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_bool_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_string_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_bytes_extension_lite )); - - EXPECT_TRUE(message.HasExtension(unittest::default_nested_enum_extension_lite )); - EXPECT_TRUE(message.HasExtension(unittest::default_foreign_enum_extension_lite)); - EXPECT_TRUE(message.HasExtension(unittest::default_import_enum_extension_lite )); - - - EXPECT_EQ(401 , message.GetExtension(unittest::default_int32_extension_lite )); - EXPECT_EQ(402 , message.GetExtension(unittest::default_int64_extension_lite )); - EXPECT_EQ(403 , message.GetExtension(unittest::default_uint32_extension_lite )); - EXPECT_EQ(404 , message.GetExtension(unittest::default_uint64_extension_lite )); - EXPECT_EQ(405 , message.GetExtension(unittest::default_sint32_extension_lite )); - EXPECT_EQ(406 , message.GetExtension(unittest::default_sint64_extension_lite )); - EXPECT_EQ(407 , message.GetExtension(unittest::default_fixed32_extension_lite )); - EXPECT_EQ(408 , message.GetExtension(unittest::default_fixed64_extension_lite )); - EXPECT_EQ(409 , message.GetExtension(unittest::default_sfixed32_extension_lite)); - EXPECT_EQ(410 , message.GetExtension(unittest::default_sfixed64_extension_lite)); - EXPECT_EQ(411 , message.GetExtension(unittest::default_float_extension_lite )); - EXPECT_EQ(412 , message.GetExtension(unittest::default_double_extension_lite )); - EXPECT_EQ(false, message.GetExtension(unittest::default_bool_extension_lite )); - EXPECT_EQ("415", message.GetExtension(unittest::default_string_extension_lite )); - EXPECT_EQ("416", message.GetExtension(unittest::default_bytes_extension_lite )); - - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.GetExtension(unittest::default_nested_enum_extension_lite )); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.GetExtension(unittest::default_foreign_enum_extension_lite)); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.GetExtension(unittest::default_import_enum_extension_lite )); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectExtensionsClear( - const unittest::TestAllExtensionsLite& message) { - string serialized; - ASSERT_TRUE(message.SerializeToString(&serialized)); - EXPECT_EQ("", serialized); - EXPECT_EQ(0, message.ByteSize()); - - // has_blah() should initially be false for all optional fields. - EXPECT_FALSE(message.HasExtension(unittest::optional_int32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_int64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_uint32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_uint64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sint32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sint64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_fixed32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_fixed64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_sfixed32_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::optional_sfixed64_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::optional_float_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_double_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_bool_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_string_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_bytes_extension_lite )); - - EXPECT_FALSE(message.HasExtension(unittest::optionalgroup_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_nested_message_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_foreign_message_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::optional_import_message_extension_lite )); - - EXPECT_FALSE(message.HasExtension(unittest::optional_nested_enum_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::optional_foreign_enum_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::optional_import_enum_extension_lite )); - - - // Optional fields without defaults are set to zero or something like it. - EXPECT_EQ(0 , message.GetExtension(unittest::optional_int32_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_int64_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_uint32_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_uint64_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sint32_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sint64_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_fixed32_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_fixed64_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sfixed32_extension_lite)); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_sfixed64_extension_lite)); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_float_extension_lite )); - EXPECT_EQ(0 , message.GetExtension(unittest::optional_double_extension_lite )); - EXPECT_EQ(false, message.GetExtension(unittest::optional_bool_extension_lite )); - EXPECT_EQ("" , message.GetExtension(unittest::optional_string_extension_lite )); - EXPECT_EQ("" , message.GetExtension(unittest::optional_bytes_extension_lite )); - - // Embedded messages should also be clear. - EXPECT_FALSE(message.GetExtension(unittest::optionalgroup_extension_lite ).has_a()); - EXPECT_FALSE(message.GetExtension(unittest::optional_nested_message_extension_lite ).has_bb()); - EXPECT_FALSE(message.GetExtension(unittest::optional_foreign_message_extension_lite).has_c()); - EXPECT_FALSE(message.GetExtension(unittest::optional_import_message_extension_lite ).has_d()); - - EXPECT_EQ(0, message.GetExtension(unittest::optionalgroup_extension_lite ).a()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_nested_message_extension_lite ).bb()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_foreign_message_extension_lite).c()); - EXPECT_EQ(0, message.GetExtension(unittest::optional_import_message_extension_lite ).d()); - - // Enums without defaults are set to the first value in the enum. - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.GetExtension(unittest::optional_nested_enum_extension_lite )); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.GetExtension(unittest::optional_foreign_enum_extension_lite)); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.GetExtension(unittest::optional_import_enum_extension_lite )); - - - // Repeated fields are empty. - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_int32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_int64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_uint32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_uint64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sint32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sint64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_fixed32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_fixed64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sfixed32_extension_lite)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_sfixed64_extension_lite)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_float_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_double_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_bool_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_string_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_bytes_extension_lite )); - - EXPECT_EQ(0, message.ExtensionSize(unittest::repeatedgroup_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_nested_message_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_foreign_message_extension_lite)); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_import_message_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_nested_enum_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_foreign_enum_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::repeated_import_enum_extension_lite )); - - - // has_blah() should also be false for all default fields. - EXPECT_FALSE(message.HasExtension(unittest::default_int32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_int64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_uint32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_uint64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_sint32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_sint64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_fixed32_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_fixed64_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_sfixed32_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::default_sfixed64_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::default_float_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_double_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_bool_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_string_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_bytes_extension_lite )); - - EXPECT_FALSE(message.HasExtension(unittest::default_nested_enum_extension_lite )); - EXPECT_FALSE(message.HasExtension(unittest::default_foreign_enum_extension_lite)); - EXPECT_FALSE(message.HasExtension(unittest::default_import_enum_extension_lite )); - - - // Fields with defaults have their default values (duh). - EXPECT_EQ( 41 , message.GetExtension(unittest::default_int32_extension_lite )); - EXPECT_EQ( 42 , message.GetExtension(unittest::default_int64_extension_lite )); - EXPECT_EQ( 43 , message.GetExtension(unittest::default_uint32_extension_lite )); - EXPECT_EQ( 44 , message.GetExtension(unittest::default_uint64_extension_lite )); - EXPECT_EQ(-45 , message.GetExtension(unittest::default_sint32_extension_lite )); - EXPECT_EQ( 46 , message.GetExtension(unittest::default_sint64_extension_lite )); - EXPECT_EQ( 47 , message.GetExtension(unittest::default_fixed32_extension_lite )); - EXPECT_EQ( 48 , message.GetExtension(unittest::default_fixed64_extension_lite )); - EXPECT_EQ( 49 , message.GetExtension(unittest::default_sfixed32_extension_lite)); - EXPECT_EQ(-50 , message.GetExtension(unittest::default_sfixed64_extension_lite)); - EXPECT_EQ( 51.5 , message.GetExtension(unittest::default_float_extension_lite )); - EXPECT_EQ( 52e3 , message.GetExtension(unittest::default_double_extension_lite )); - EXPECT_EQ(true , message.GetExtension(unittest::default_bool_extension_lite )); - EXPECT_EQ("hello", message.GetExtension(unittest::default_string_extension_lite )); - EXPECT_EQ("world", message.GetExtension(unittest::default_bytes_extension_lite )); - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.GetExtension(unittest::default_nested_enum_extension_lite )); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.GetExtension(unittest::default_foreign_enum_extension_lite)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.GetExtension(unittest::default_import_enum_extension_lite )); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectRepeatedExtensionsModified( - const unittest::TestAllExtensionsLite& message) { - // ModifyRepeatedFields only sets the second repeated element of each - // field. In addition to verifying this, we also verify that the first - // element and size were *not* modified. - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_int64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_uint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_fixed64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed32_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_sfixed64_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_float_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_double_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bool_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_string_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_bytes_extension_lite )); - - ASSERT_EQ(2, message.ExtensionSize(unittest::repeatedgroup_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_message_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_message_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_message_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_nested_enum_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_foreign_enum_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::repeated_import_enum_extension_lite )); - - - EXPECT_EQ(201 , message.GetExtension(unittest::repeated_int32_extension_lite , 0)); - EXPECT_EQ(202 , message.GetExtension(unittest::repeated_int64_extension_lite , 0)); - EXPECT_EQ(203 , message.GetExtension(unittest::repeated_uint32_extension_lite , 0)); - EXPECT_EQ(204 , message.GetExtension(unittest::repeated_uint64_extension_lite , 0)); - EXPECT_EQ(205 , message.GetExtension(unittest::repeated_sint32_extension_lite , 0)); - EXPECT_EQ(206 , message.GetExtension(unittest::repeated_sint64_extension_lite , 0)); - EXPECT_EQ(207 , message.GetExtension(unittest::repeated_fixed32_extension_lite , 0)); - EXPECT_EQ(208 , message.GetExtension(unittest::repeated_fixed64_extension_lite , 0)); - EXPECT_EQ(209 , message.GetExtension(unittest::repeated_sfixed32_extension_lite, 0)); - EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension_lite, 0)); - EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension_lite , 0)); - EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension_lite , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension_lite , 0)); - EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension_lite , 0)); - EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension_lite , 0)); - - EXPECT_EQ(217, message.GetExtension(unittest::repeatedgroup_extension_lite , 0).a()); - EXPECT_EQ(218, message.GetExtension(unittest::repeated_nested_message_extension_lite , 0).bb()); - EXPECT_EQ(219, message.GetExtension(unittest::repeated_foreign_message_extension_lite, 0).c()); - EXPECT_EQ(220, message.GetExtension(unittest::repeated_import_message_extension_lite , 0).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::BAR , message.GetExtension(unittest::repeated_nested_enum_extension_lite , 0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR , message.GetExtension(unittest::repeated_foreign_enum_extension_lite, 0)); - EXPECT_EQ(unittest_import::IMPORT_LITE_BAR, message.GetExtension(unittest::repeated_import_enum_extension_lite , 0)); - - - // Actually verify the second (modified) elements now. - EXPECT_EQ(501 , message.GetExtension(unittest::repeated_int32_extension_lite , 1)); - EXPECT_EQ(502 , message.GetExtension(unittest::repeated_int64_extension_lite , 1)); - EXPECT_EQ(503 , message.GetExtension(unittest::repeated_uint32_extension_lite , 1)); - EXPECT_EQ(504 , message.GetExtension(unittest::repeated_uint64_extension_lite , 1)); - EXPECT_EQ(505 , message.GetExtension(unittest::repeated_sint32_extension_lite , 1)); - EXPECT_EQ(506 , message.GetExtension(unittest::repeated_sint64_extension_lite , 1)); - EXPECT_EQ(507 , message.GetExtension(unittest::repeated_fixed32_extension_lite , 1)); - EXPECT_EQ(508 , message.GetExtension(unittest::repeated_fixed64_extension_lite , 1)); - EXPECT_EQ(509 , message.GetExtension(unittest::repeated_sfixed32_extension_lite, 1)); - EXPECT_EQ(510 , message.GetExtension(unittest::repeated_sfixed64_extension_lite, 1)); - EXPECT_EQ(511 , message.GetExtension(unittest::repeated_float_extension_lite , 1)); - EXPECT_EQ(512 , message.GetExtension(unittest::repeated_double_extension_lite , 1)); - EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension_lite , 1)); - EXPECT_EQ("515", message.GetExtension(unittest::repeated_string_extension_lite , 1)); - EXPECT_EQ("516", message.GetExtension(unittest::repeated_bytes_extension_lite , 1)); - - EXPECT_EQ(517, message.GetExtension(unittest::repeatedgroup_extension_lite , 1).a()); - EXPECT_EQ(518, message.GetExtension(unittest::repeated_nested_message_extension_lite , 1).bb()); - EXPECT_EQ(519, message.GetExtension(unittest::repeated_foreign_message_extension_lite, 1).c()); - EXPECT_EQ(520, message.GetExtension(unittest::repeated_import_message_extension_lite , 1).d()); - - EXPECT_EQ(unittest::TestAllTypesLite::FOO , message.GetExtension(unittest::repeated_nested_enum_extension_lite , 1)); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO , message.GetExtension(unittest::repeated_foreign_enum_extension_lite, 1)); - EXPECT_EQ(unittest_import::IMPORT_LITE_FOO, message.GetExtension(unittest::repeated_import_enum_extension_lite , 1)); - -} - -// ------------------------------------------------------------------- - -void TestUtilLite::SetPackedExtensions( - unittest::TestPackedExtensionsLite* message) { - message->AddExtension(unittest::packed_int32_extension_lite , 601); - message->AddExtension(unittest::packed_int64_extension_lite , 602); - message->AddExtension(unittest::packed_uint32_extension_lite , 603); - message->AddExtension(unittest::packed_uint64_extension_lite , 604); - message->AddExtension(unittest::packed_sint32_extension_lite , 605); - message->AddExtension(unittest::packed_sint64_extension_lite , 606); - message->AddExtension(unittest::packed_fixed32_extension_lite , 607); - message->AddExtension(unittest::packed_fixed64_extension_lite , 608); - message->AddExtension(unittest::packed_sfixed32_extension_lite, 609); - message->AddExtension(unittest::packed_sfixed64_extension_lite, 610); - message->AddExtension(unittest::packed_float_extension_lite , 611); - message->AddExtension(unittest::packed_double_extension_lite , 612); - message->AddExtension(unittest::packed_bool_extension_lite , true); - message->AddExtension(unittest::packed_enum_extension_lite, unittest::FOREIGN_LITE_BAR); - // add a second one of each field - message->AddExtension(unittest::packed_int32_extension_lite , 701); - message->AddExtension(unittest::packed_int64_extension_lite , 702); - message->AddExtension(unittest::packed_uint32_extension_lite , 703); - message->AddExtension(unittest::packed_uint64_extension_lite , 704); - message->AddExtension(unittest::packed_sint32_extension_lite , 705); - message->AddExtension(unittest::packed_sint64_extension_lite , 706); - message->AddExtension(unittest::packed_fixed32_extension_lite , 707); - message->AddExtension(unittest::packed_fixed64_extension_lite , 708); - message->AddExtension(unittest::packed_sfixed32_extension_lite, 709); - message->AddExtension(unittest::packed_sfixed64_extension_lite, 710); - message->AddExtension(unittest::packed_float_extension_lite , 711); - message->AddExtension(unittest::packed_double_extension_lite , 712); - message->AddExtension(unittest::packed_bool_extension_lite , false); - message->AddExtension(unittest::packed_enum_extension_lite, unittest::FOREIGN_LITE_BAZ); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ModifyPackedExtensions( - unittest::TestPackedExtensionsLite* message) { - message->SetExtension(unittest::packed_int32_extension_lite , 1, 801); - message->SetExtension(unittest::packed_int64_extension_lite , 1, 802); - message->SetExtension(unittest::packed_uint32_extension_lite , 1, 803); - message->SetExtension(unittest::packed_uint64_extension_lite , 1, 804); - message->SetExtension(unittest::packed_sint32_extension_lite , 1, 805); - message->SetExtension(unittest::packed_sint64_extension_lite , 1, 806); - message->SetExtension(unittest::packed_fixed32_extension_lite , 1, 807); - message->SetExtension(unittest::packed_fixed64_extension_lite , 1, 808); - message->SetExtension(unittest::packed_sfixed32_extension_lite, 1, 809); - message->SetExtension(unittest::packed_sfixed64_extension_lite, 1, 810); - message->SetExtension(unittest::packed_float_extension_lite , 1, 811); - message->SetExtension(unittest::packed_double_extension_lite , 1, 812); - message->SetExtension(unittest::packed_bool_extension_lite , 1, true); - message->SetExtension(unittest::packed_enum_extension_lite , 1, - unittest::FOREIGN_LITE_FOO); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedExtensionsSet( - const unittest::TestPackedExtensionsLite& message) { - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed32_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed64_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_float_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_double_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_bool_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_enum_extension_lite )); - - EXPECT_EQ(601 , message.GetExtension(unittest::packed_int32_extension_lite , 0)); - EXPECT_EQ(602 , message.GetExtension(unittest::packed_int64_extension_lite , 0)); - EXPECT_EQ(603 , message.GetExtension(unittest::packed_uint32_extension_lite , 0)); - EXPECT_EQ(604 , message.GetExtension(unittest::packed_uint64_extension_lite , 0)); - EXPECT_EQ(605 , message.GetExtension(unittest::packed_sint32_extension_lite , 0)); - EXPECT_EQ(606 , message.GetExtension(unittest::packed_sint64_extension_lite , 0)); - EXPECT_EQ(607 , message.GetExtension(unittest::packed_fixed32_extension_lite , 0)); - EXPECT_EQ(608 , message.GetExtension(unittest::packed_fixed64_extension_lite , 0)); - EXPECT_EQ(609 , message.GetExtension(unittest::packed_sfixed32_extension_lite, 0)); - EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension_lite, 0)); - EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension_lite , 0)); - EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension_lite , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension_lite , 0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR, - message.GetExtension(unittest::packed_enum_extension_lite, 0)); - EXPECT_EQ(701 , message.GetExtension(unittest::packed_int32_extension_lite , 1)); - EXPECT_EQ(702 , message.GetExtension(unittest::packed_int64_extension_lite , 1)); - EXPECT_EQ(703 , message.GetExtension(unittest::packed_uint32_extension_lite , 1)); - EXPECT_EQ(704 , message.GetExtension(unittest::packed_uint64_extension_lite , 1)); - EXPECT_EQ(705 , message.GetExtension(unittest::packed_sint32_extension_lite , 1)); - EXPECT_EQ(706 , message.GetExtension(unittest::packed_sint64_extension_lite , 1)); - EXPECT_EQ(707 , message.GetExtension(unittest::packed_fixed32_extension_lite , 1)); - EXPECT_EQ(708 , message.GetExtension(unittest::packed_fixed64_extension_lite , 1)); - EXPECT_EQ(709 , message.GetExtension(unittest::packed_sfixed32_extension_lite, 1)); - EXPECT_EQ(710 , message.GetExtension(unittest::packed_sfixed64_extension_lite, 1)); - EXPECT_EQ(711 , message.GetExtension(unittest::packed_float_extension_lite , 1)); - EXPECT_EQ(712 , message.GetExtension(unittest::packed_double_extension_lite , 1)); - EXPECT_EQ(false, message.GetExtension(unittest::packed_bool_extension_lite , 1)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAZ, - message.GetExtension(unittest::packed_enum_extension_lite, 1)); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedExtensionsClear( - const unittest::TestPackedExtensionsLite& message) { - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_int32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_int64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_uint32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_uint64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sint32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sint64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_fixed32_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_fixed64_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sfixed32_extension_lite)); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_sfixed64_extension_lite)); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_float_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_double_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_bool_extension_lite )); - EXPECT_EQ(0, message.ExtensionSize(unittest::packed_enum_extension_lite )); -} - -// ------------------------------------------------------------------- - -void TestUtilLite::ExpectPackedExtensionsModified( - const unittest::TestPackedExtensionsLite& message) { - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_int64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_uint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sint64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed32_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_fixed64_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed32_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_sfixed64_extension_lite)); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_float_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_double_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_bool_extension_lite )); - ASSERT_EQ(2, message.ExtensionSize(unittest::packed_enum_extension_lite )); - EXPECT_EQ(601 , message.GetExtension(unittest::packed_int32_extension_lite , 0)); - EXPECT_EQ(602 , message.GetExtension(unittest::packed_int64_extension_lite , 0)); - EXPECT_EQ(603 , message.GetExtension(unittest::packed_uint32_extension_lite , 0)); - EXPECT_EQ(604 , message.GetExtension(unittest::packed_uint64_extension_lite , 0)); - EXPECT_EQ(605 , message.GetExtension(unittest::packed_sint32_extension_lite , 0)); - EXPECT_EQ(606 , message.GetExtension(unittest::packed_sint64_extension_lite , 0)); - EXPECT_EQ(607 , message.GetExtension(unittest::packed_fixed32_extension_lite , 0)); - EXPECT_EQ(608 , message.GetExtension(unittest::packed_fixed64_extension_lite , 0)); - EXPECT_EQ(609 , message.GetExtension(unittest::packed_sfixed32_extension_lite, 0)); - EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension_lite, 0)); - EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension_lite , 0)); - EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension_lite , 0)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension_lite , 0)); - EXPECT_EQ(unittest::FOREIGN_LITE_BAR, - message.GetExtension(unittest::packed_enum_extension_lite, 0)); - - // Actually verify the second (modified) elements now. - EXPECT_EQ(801 , message.GetExtension(unittest::packed_int32_extension_lite , 1)); - EXPECT_EQ(802 , message.GetExtension(unittest::packed_int64_extension_lite , 1)); - EXPECT_EQ(803 , message.GetExtension(unittest::packed_uint32_extension_lite , 1)); - EXPECT_EQ(804 , message.GetExtension(unittest::packed_uint64_extension_lite , 1)); - EXPECT_EQ(805 , message.GetExtension(unittest::packed_sint32_extension_lite , 1)); - EXPECT_EQ(806 , message.GetExtension(unittest::packed_sint64_extension_lite , 1)); - EXPECT_EQ(807 , message.GetExtension(unittest::packed_fixed32_extension_lite , 1)); - EXPECT_EQ(808 , message.GetExtension(unittest::packed_fixed64_extension_lite , 1)); - EXPECT_EQ(809 , message.GetExtension(unittest::packed_sfixed32_extension_lite, 1)); - EXPECT_EQ(810 , message.GetExtension(unittest::packed_sfixed64_extension_lite, 1)); - EXPECT_EQ(811 , message.GetExtension(unittest::packed_float_extension_lite , 1)); - EXPECT_EQ(812 , message.GetExtension(unittest::packed_double_extension_lite , 1)); - EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension_lite , 1)); - EXPECT_EQ(unittest::FOREIGN_LITE_FOO, - message.GetExtension(unittest::packed_enum_extension_lite, 1)); -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.h deleted file mode 100644 index ca35aaa4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/test_util_lite.h +++ /dev/null @@ -1,101 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_TEST_UTIL_LITE_H__ -#define GOOGLE_PROTOBUF_TEST_UTIL_LITE_H__ - -#include - -namespace google { -namespace protobuf { - -namespace unittest = protobuf_unittest; -namespace unittest_import = protobuf_unittest_import; - -class TestUtilLite { - public: - // Set every field in the message to a unique value. - static void SetAllFields(unittest::TestAllTypesLite* message); - static void SetAllExtensions(unittest::TestAllExtensionsLite* message); - static void SetPackedFields(unittest::TestPackedTypesLite* message); - static void SetPackedExtensions(unittest::TestPackedExtensionsLite* message); - - // Use the repeated versions of the set_*() accessors to modify all the - // repeated fields of the messsage (which should already have been - // initialized with Set*Fields()). Set*Fields() itself only tests - // the add_*() accessors. - static void ModifyRepeatedFields(unittest::TestAllTypesLite* message); - static void ModifyRepeatedExtensions( - unittest::TestAllExtensionsLite* message); - static void ModifyPackedFields(unittest::TestPackedTypesLite* message); - static void ModifyPackedExtensions( - unittest::TestPackedExtensionsLite* message); - - // Check that all fields have the values that they should have after - // Set*Fields() is called. - static void ExpectAllFieldsSet(const unittest::TestAllTypesLite& message); - static void ExpectAllExtensionsSet( - const unittest::TestAllExtensionsLite& message); - static void ExpectPackedFieldsSet( - const unittest::TestPackedTypesLite& message); - static void ExpectPackedExtensionsSet( - const unittest::TestPackedExtensionsLite& message); - - // Expect that the message is modified as would be expected from - // Modify*Fields(). - static void ExpectRepeatedFieldsModified( - const unittest::TestAllTypesLite& message); - static void ExpectRepeatedExtensionsModified( - const unittest::TestAllExtensionsLite& message); - static void ExpectPackedFieldsModified( - const unittest::TestPackedTypesLite& message); - static void ExpectPackedExtensionsModified( - const unittest::TestPackedExtensionsLite& message); - - // Check that all fields have their default values. - static void ExpectClear(const unittest::TestAllTypesLite& message); - static void ExpectExtensionsClear( - const unittest::TestAllExtensionsLite& message); - static void ExpectPackedClear(const unittest::TestPackedTypesLite& message); - static void ExpectPackedExtensionsClear( - const unittest::TestPackedExtensionsLite& message); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TestUtilLite); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_TEST_UTIL_LITE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_message b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_message deleted file mode 100644 index 94898e49..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_message and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_packed_fields_message b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_packed_fields_message deleted file mode 100644 index ee28d388..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/golden_packed_fields_message and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt deleted file mode 100644 index feea8f7b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt +++ /dev/null @@ -1,116 +0,0 @@ -optional_int32: 101 -optional_int64: 102 -optional_uint32: 103 -optional_uint64: 104 -optional_sint32: 105 -optional_sint64: 106 -optional_fixed32: 107 -optional_fixed64: 108 -optional_sfixed32: 109 -optional_sfixed64: 110 -optional_float: 111 -optional_double: 112 -optional_bool: true -optional_string: "115" -optional_bytes: "116" -OptionalGroup { - a: 117 -} -optional_nested_message { - bb: 118 -} -optional_foreign_message { - c: 119 -} -optional_import_message { - d: 120 -} -optional_nested_enum: BAZ -optional_foreign_enum: FOREIGN_BAZ -optional_import_enum: IMPORT_BAZ -optional_string_piece: "124" -optional_cord: "125" -repeated_int32: 201 -repeated_int32: 301 -repeated_int64: 202 -repeated_int64: 302 -repeated_uint32: 203 -repeated_uint32: 303 -repeated_uint64: 204 -repeated_uint64: 304 -repeated_sint32: 205 -repeated_sint32: 305 -repeated_sint64: 206 -repeated_sint64: 306 -repeated_fixed32: 207 -repeated_fixed32: 307 -repeated_fixed64: 208 -repeated_fixed64: 308 -repeated_sfixed32: 209 -repeated_sfixed32: 309 -repeated_sfixed64: 210 -repeated_sfixed64: 310 -repeated_float: 211 -repeated_float: 311 -repeated_double: 212 -repeated_double: 312 -repeated_bool: true -repeated_bool: false -repeated_string: "215" -repeated_string: "315" -repeated_bytes: "216" -repeated_bytes: "316" -RepeatedGroup { - a: 217 -} -RepeatedGroup { - a: 317 -} -repeated_nested_message { - bb: 218 -} -repeated_nested_message { - bb: 318 -} -repeated_foreign_message { - c: 219 -} -repeated_foreign_message { - c: 319 -} -repeated_import_message { - d: 220 -} -repeated_import_message { - d: 320 -} -repeated_nested_enum: BAR -repeated_nested_enum: BAZ -repeated_foreign_enum: FOREIGN_BAR -repeated_foreign_enum: FOREIGN_BAZ -repeated_import_enum: IMPORT_BAR -repeated_import_enum: IMPORT_BAZ -repeated_string_piece: "224" -repeated_string_piece: "324" -repeated_cord: "225" -repeated_cord: "325" -default_int32: 401 -default_int64: 402 -default_uint32: 403 -default_uint64: 404 -default_sint32: 405 -default_sint64: 406 -default_fixed32: 407 -default_fixed64: 408 -default_sfixed32: 409 -default_sfixed64: 410 -default_float: 411 -default_double: 412 -default_bool: false -default_string: "415" -default_bytes: "416" -default_nested_enum: FOO -default_foreign_enum: FOREIGN_FOO -default_import_enum: IMPORT_FOO -default_string_piece: "424" -default_cord: "425" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt deleted file mode 100644 index 057beae8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt +++ /dev/null @@ -1,116 +0,0 @@ -[protobuf_unittest.optional_int32_extension]: 101 -[protobuf_unittest.optional_int64_extension]: 102 -[protobuf_unittest.optional_uint32_extension]: 103 -[protobuf_unittest.optional_uint64_extension]: 104 -[protobuf_unittest.optional_sint32_extension]: 105 -[protobuf_unittest.optional_sint64_extension]: 106 -[protobuf_unittest.optional_fixed32_extension]: 107 -[protobuf_unittest.optional_fixed64_extension]: 108 -[protobuf_unittest.optional_sfixed32_extension]: 109 -[protobuf_unittest.optional_sfixed64_extension]: 110 -[protobuf_unittest.optional_float_extension]: 111 -[protobuf_unittest.optional_double_extension]: 112 -[protobuf_unittest.optional_bool_extension]: true -[protobuf_unittest.optional_string_extension]: "115" -[protobuf_unittest.optional_bytes_extension]: "116" -[protobuf_unittest.optionalgroup_extension] { - a: 117 -} -[protobuf_unittest.optional_nested_message_extension] { - bb: 118 -} -[protobuf_unittest.optional_foreign_message_extension] { - c: 119 -} -[protobuf_unittest.optional_import_message_extension] { - d: 120 -} -[protobuf_unittest.optional_nested_enum_extension]: BAZ -[protobuf_unittest.optional_foreign_enum_extension]: FOREIGN_BAZ -[protobuf_unittest.optional_import_enum_extension]: IMPORT_BAZ -[protobuf_unittest.optional_string_piece_extension]: "124" -[protobuf_unittest.optional_cord_extension]: "125" -[protobuf_unittest.repeated_int32_extension]: 201 -[protobuf_unittest.repeated_int32_extension]: 301 -[protobuf_unittest.repeated_int64_extension]: 202 -[protobuf_unittest.repeated_int64_extension]: 302 -[protobuf_unittest.repeated_uint32_extension]: 203 -[protobuf_unittest.repeated_uint32_extension]: 303 -[protobuf_unittest.repeated_uint64_extension]: 204 -[protobuf_unittest.repeated_uint64_extension]: 304 -[protobuf_unittest.repeated_sint32_extension]: 205 -[protobuf_unittest.repeated_sint32_extension]: 305 -[protobuf_unittest.repeated_sint64_extension]: 206 -[protobuf_unittest.repeated_sint64_extension]: 306 -[protobuf_unittest.repeated_fixed32_extension]: 207 -[protobuf_unittest.repeated_fixed32_extension]: 307 -[protobuf_unittest.repeated_fixed64_extension]: 208 -[protobuf_unittest.repeated_fixed64_extension]: 308 -[protobuf_unittest.repeated_sfixed32_extension]: 209 -[protobuf_unittest.repeated_sfixed32_extension]: 309 -[protobuf_unittest.repeated_sfixed64_extension]: 210 -[protobuf_unittest.repeated_sfixed64_extension]: 310 -[protobuf_unittest.repeated_float_extension]: 211 -[protobuf_unittest.repeated_float_extension]: 311 -[protobuf_unittest.repeated_double_extension]: 212 -[protobuf_unittest.repeated_double_extension]: 312 -[protobuf_unittest.repeated_bool_extension]: true -[protobuf_unittest.repeated_bool_extension]: false -[protobuf_unittest.repeated_string_extension]: "215" -[protobuf_unittest.repeated_string_extension]: "315" -[protobuf_unittest.repeated_bytes_extension]: "216" -[protobuf_unittest.repeated_bytes_extension]: "316" -[protobuf_unittest.repeatedgroup_extension] { - a: 217 -} -[protobuf_unittest.repeatedgroup_extension] { - a: 317 -} -[protobuf_unittest.repeated_nested_message_extension] { - bb: 218 -} -[protobuf_unittest.repeated_nested_message_extension] { - bb: 318 -} -[protobuf_unittest.repeated_foreign_message_extension] { - c: 219 -} -[protobuf_unittest.repeated_foreign_message_extension] { - c: 319 -} -[protobuf_unittest.repeated_import_message_extension] { - d: 220 -} -[protobuf_unittest.repeated_import_message_extension] { - d: 320 -} -[protobuf_unittest.repeated_nested_enum_extension]: BAR -[protobuf_unittest.repeated_nested_enum_extension]: BAZ -[protobuf_unittest.repeated_foreign_enum_extension]: FOREIGN_BAR -[protobuf_unittest.repeated_foreign_enum_extension]: FOREIGN_BAZ -[protobuf_unittest.repeated_import_enum_extension]: IMPORT_BAR -[protobuf_unittest.repeated_import_enum_extension]: IMPORT_BAZ -[protobuf_unittest.repeated_string_piece_extension]: "224" -[protobuf_unittest.repeated_string_piece_extension]: "324" -[protobuf_unittest.repeated_cord_extension]: "225" -[protobuf_unittest.repeated_cord_extension]: "325" -[protobuf_unittest.default_int32_extension]: 401 -[protobuf_unittest.default_int64_extension]: 402 -[protobuf_unittest.default_uint32_extension]: 403 -[protobuf_unittest.default_uint64_extension]: 404 -[protobuf_unittest.default_sint32_extension]: 405 -[protobuf_unittest.default_sint64_extension]: 406 -[protobuf_unittest.default_fixed32_extension]: 407 -[protobuf_unittest.default_fixed64_extension]: 408 -[protobuf_unittest.default_sfixed32_extension]: 409 -[protobuf_unittest.default_sfixed64_extension]: 410 -[protobuf_unittest.default_float_extension]: 411 -[protobuf_unittest.default_double_extension]: 412 -[protobuf_unittest.default_bool_extension]: false -[protobuf_unittest.default_string_extension]: "415" -[protobuf_unittest.default_bytes_extension]: "416" -[protobuf_unittest.default_nested_enum_extension]: FOO -[protobuf_unittest.default_foreign_enum_extension]: FOREIGN_FOO -[protobuf_unittest.default_import_enum_extension]: IMPORT_FOO -[protobuf_unittest.default_string_piece_extension]: "424" -[protobuf_unittest.default_cord_extension]: "425" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.cc deleted file mode 100644 index e224781d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.cc +++ /dev/null @@ -1,176 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// emulates google3/file/base/file.cc - -#include -#include -#include -#include -#ifdef _MSC_VER -#define WIN32_LEAN_AND_MEAN // yeah, right -#include // Find*File(). :( -#include -#include -#else -#include -#include -#endif -#include - -namespace google { -namespace protobuf { - -#ifdef _WIN32 -#define mkdir(name, mode) mkdir(name) -// Windows doesn't have symbolic links. -#define lstat stat -#ifndef F_OK -#define F_OK 00 // not defined by MSVC for whatever reason -#endif -#endif - -bool File::Exists(const string& name) { - return access(name.c_str(), F_OK) == 0; -} - -bool File::ReadFileToString(const string& name, string* output) { - char buffer[1024]; - FILE* file = fopen(name.c_str(), "rb"); - if (file == NULL) return false; - - while (true) { - size_t n = fread(buffer, 1, sizeof(buffer), file); - if (n <= 0) break; - output->append(buffer, n); - } - - int error = ferror(file); - if (fclose(file) != 0) return false; - return error == 0; -} - -void File::ReadFileToStringOrDie(const string& name, string* output) { - GOOGLE_CHECK(ReadFileToString(name, output)) << "Could not read: " << name; -} - -void File::WriteStringToFileOrDie(const string& contents, const string& name) { - FILE* file = fopen(name.c_str(), "wb"); - GOOGLE_CHECK(file != NULL) - << "fopen(" << name << ", \"wb\"): " << strerror(errno); - GOOGLE_CHECK_EQ(fwrite(contents.data(), 1, contents.size(), file), - contents.size()) - << "fwrite(" << name << "): " << strerror(errno); - GOOGLE_CHECK(fclose(file) == 0) - << "fclose(" << name << "): " << strerror(errno); -} - -bool File::CreateDir(const string& name, int mode) { - return mkdir(name.c_str(), mode) == 0; -} - -bool File::RecursivelyCreateDir(const string& path, int mode) { - if (CreateDir(path, mode)) return true; - - if (Exists(path)) return false; - - // Try creating the parent. - string::size_type slashpos = path.find_last_of('/'); - if (slashpos == string::npos) { - // No parent given. - return false; - } - - return RecursivelyCreateDir(path.substr(0, slashpos), mode) && - CreateDir(path, mode); -} - -void File::DeleteRecursively(const string& name, - void* dummy1, void* dummy2) { - // We don't care too much about error checking here since this is only used - // in tests to delete temporary directories that are under /tmp anyway. - -#ifdef _MSC_VER - // This interface is so weird. - WIN32_FIND_DATA find_data; - HANDLE find_handle = FindFirstFile((name + "/*").c_str(), &find_data); - if (find_handle == INVALID_HANDLE_VALUE) { - // Just delete it, whatever it is. - DeleteFile(name.c_str()); - RemoveDirectory(name.c_str()); - return; - } - - do { - string entry_name = find_data.cFileName; - if (entry_name != "." && entry_name != "..") { - string path = name + "/" + entry_name; - if (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - DeleteRecursively(path, NULL, NULL); - RemoveDirectory(path.c_str()); - } else { - DeleteFile(path.c_str()); - } - } - } while(FindNextFile(find_handle, &find_data)); - FindClose(find_handle); - - RemoveDirectory(name.c_str()); -#else - // Use opendir()! Yay! - // lstat = Don't follow symbolic links. - struct stat stats; - if (lstat(name.c_str(), &stats) != 0) return; - - if (S_ISDIR(stats.st_mode)) { - DIR* dir = opendir(name.c_str()); - if (dir != NULL) { - while (true) { - struct dirent* entry = readdir(dir); - if (entry == NULL) break; - string entry_name = entry->d_name; - if (entry_name != "." && entry_name != "..") { - DeleteRecursively(name + "/" + entry_name, NULL, NULL); - } - } - } - - closedir(dir); - rmdir(name.c_str()); - - } else if (S_ISREG(stats.st_mode)) { - remove(name.c_str()); - } -#endif -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.h deleted file mode 100644 index a6b1c764..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/file.h +++ /dev/null @@ -1,83 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// emulates google3/file/base/file.h - -#ifndef GOOGLE_PROTOBUF_TESTING_FILE_H__ -#define GOOGLE_PROTOBUF_TESTING_FILE_H__ - -#include - -namespace google { -namespace protobuf { - -const int DEFAULT_FILE_MODE = 0777; - -// Protocol buffer code only uses a couple static methods of File, and only -// in tests. -class File { - public: - // Check if the file exists. - static bool Exists(const string& name); - - // Read an entire file to a string. Return true if successful, false - // otherwise. - static bool ReadFileToString(const string& name, string* output); - - // Same as above, but crash on failure. - static void ReadFileToStringOrDie(const string& name, string* output); - - // Create a file and write a string to it. - static void WriteStringToFileOrDie(const string& contents, - const string& name); - - // Create a directory. - static bool CreateDir(const string& name, int mode); - - // Create a directory and all parent directories if necessary. - static bool RecursivelyCreateDir(const string& path, int mode); - - // If "name" is a file, we delete it. If it is a directory, we - // call DeleteRecursively() for each file or directory (other than - // dot and double-dot) within it, and then delete the directory itself. - // The "dummy" parameters have a meaning in the original version of this - // method but they are not used anywhere in protocol buffers. - static void DeleteRecursively(const string& name, - void* dummy1, void* dummy2); - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(File); -}; - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_TESTING_FILE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.cc deleted file mode 100644 index cd094d0c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.cc +++ /dev/null @@ -1,254 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// emulates google3/testing/base/public/googletest.cc - -#include -#include -#include -#include -#include -#include -#include -#ifdef _MSC_VER -#include -#include -#else -#include -#endif -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -#ifdef _WIN32 -#define mkdir(name, mode) mkdir(name) -#endif - -#ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 // If this isn't defined, the platform doesn't need it. -#endif -#endif - -string TestSourceDir() { -#ifdef _MSC_VER - // Look for the "src" directory. - string prefix = "."; - - while (!File::Exists(prefix + "/src/google/protobuf")) { - if (!File::Exists(prefix)) { - GOOGLE_LOG(FATAL) - << "Could not find protobuf source code. Please run tests from " - "somewhere within the protobuf source package."; - } - prefix += "/.."; - } - return prefix + "/src"; -#else - // automake sets the "srcdir" environment variable. - char* result = getenv("srcdir"); - if (result == NULL) { - // Otherwise, the test must be run from the source directory. - return "."; - } else { - return result; - } -#endif -} - -namespace { - -string GetTemporaryDirectoryName() { - // tmpnam() is generally not considered safe but we're only using it for - // testing. We cannot use tmpfile() or mkstemp() since we're creating a - // directory. - char b[L_tmpnam + 1]; // HPUX multithread return 0 if s is 0 - string result = tmpnam(b); -#ifdef _WIN32 - // On Win32, tmpnam() returns a file prefixed with '\', but which is supposed - // to be used in the current working directory. WTF? - if (HasPrefixString(result, "\\")) { - result.erase(0, 1); - } -#endif // _WIN32 - return result; -} - -// Creates a temporary directory on demand and deletes it when the process -// quits. -class TempDirDeleter { - public: - TempDirDeleter() {} - ~TempDirDeleter() { - if (!name_.empty()) { - File::DeleteRecursively(name_, NULL, NULL); - } - } - - string GetTempDir() { - if (name_.empty()) { - name_ = GetTemporaryDirectoryName(); - GOOGLE_CHECK(mkdir(name_.c_str(), 0777) == 0) << strerror(errno); - - // Stick a file in the directory that tells people what this is, in case - // we abort and don't get a chance to delete it. - File::WriteStringToFileOrDie("", name_ + "/TEMP_DIR_FOR_PROTOBUF_TESTS"); - } - return name_; - } - - private: - string name_; -}; - -TempDirDeleter temp_dir_deleter_; - -} // namespace - -string TestTempDir() { - return temp_dir_deleter_.GetTempDir(); -} - -// TODO(kenton): Share duplicated code below. Too busy/lazy for now. - -static string stdout_capture_filename_; -static string stderr_capture_filename_; -static int original_stdout_ = -1; -static int original_stderr_ = -1; - -void CaptureTestStdout() { - GOOGLE_CHECK_EQ(original_stdout_, -1) << "Already capturing."; - - stdout_capture_filename_ = TestTempDir() + "/captured_stdout"; - - int fd = open(stdout_capture_filename_.c_str(), - O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0777); - GOOGLE_CHECK(fd >= 0) << "open: " << strerror(errno); - - original_stdout_ = dup(1); - close(1); - dup2(fd, 1); - close(fd); -} - -void CaptureTestStderr() { - GOOGLE_CHECK_EQ(original_stderr_, -1) << "Already capturing."; - - stderr_capture_filename_ = TestTempDir() + "/captured_stderr"; - - int fd = open(stderr_capture_filename_.c_str(), - O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0777); - GOOGLE_CHECK(fd >= 0) << "open: " << strerror(errno); - - original_stderr_ = dup(2); - close(2); - dup2(fd, 2); - close(fd); -} - -string GetCapturedTestStdout() { - GOOGLE_CHECK_NE(original_stdout_, -1) << "Not capturing."; - - close(1); - dup2(original_stdout_, 1); - original_stdout_ = -1; - - string result; - File::ReadFileToStringOrDie(stdout_capture_filename_, &result); - - remove(stdout_capture_filename_.c_str()); - - return result; -} - -string GetCapturedTestStderr() { - GOOGLE_CHECK_NE(original_stderr_, -1) << "Not capturing."; - - close(2); - dup2(original_stderr_, 2); - original_stderr_ = -1; - - string result; - File::ReadFileToStringOrDie(stderr_capture_filename_, &result); - - remove(stderr_capture_filename_.c_str()); - - return result; -} - -ScopedMemoryLog* ScopedMemoryLog::active_log_ = NULL; - -ScopedMemoryLog::ScopedMemoryLog() { - GOOGLE_CHECK(active_log_ == NULL); - active_log_ = this; - old_handler_ = SetLogHandler(&HandleLog); -} - -ScopedMemoryLog::~ScopedMemoryLog() { - SetLogHandler(old_handler_); - active_log_ = NULL; -} - -const vector& ScopedMemoryLog::GetMessages(LogLevel dummy) const { - GOOGLE_CHECK_EQ(dummy, ERROR); - return messages_; -} - -void ScopedMemoryLog::HandleLog(LogLevel level, const char* filename, - int line, const string& message) { - GOOGLE_CHECK(active_log_ != NULL); - if (level == ERROR) { - active_log_->messages_.push_back(message); - } -} - -namespace { - -// Force shutdown at process exit so that we can test for memory leaks. To -// actually check for leaks, I suggest using the heap checker included with -// google-perftools. Set it to "draconian" mode to ensure that every last -// call to malloc() has a corresponding free(). -struct ForceShutdown { - ~ForceShutdown() { - ShutdownProtobufLibrary(); - } -} force_shutdown; - -} // namespace - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.h deleted file mode 100644 index 71444c96..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/googletest.h +++ /dev/null @@ -1,98 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// emulates google3/testing/base/public/googletest.h - -#ifndef GOOGLE_PROTOBUF_GOOGLETEST_H__ -#define GOOGLE_PROTOBUF_GOOGLETEST_H__ - -#include -#include - -namespace google { -namespace protobuf { - -// When running unittests, get the directory containing the source code. -string TestSourceDir(); - -// When running unittests, get a directory where temporary files may be -// placed. -string TestTempDir(); - -// Capture all text written to stdout or stderr. -void CaptureTestStdout(); -void CaptureTestStderr(); - -// Stop capturing stdout or stderr and return the text captured. -string GetCapturedTestStdout(); -string GetCapturedTestStderr(); - -// For use with ScopedMemoryLog::GetMessages(). Inside Google the LogLevel -// constants don't have the LOGLEVEL_ prefix, so the code that used -// ScopedMemoryLog refers to LOGLEVEL_ERROR as just ERROR. -#undef ERROR // defend against promiscuous windows.h -static const LogLevel ERROR = LOGLEVEL_ERROR; - -// Receives copies of all LOG(ERROR) messages while in scope. Sample usage: -// { -// ScopedMemoryLog log; // constructor registers object as a log sink -// SomeRoutineThatMayLogMessages(); -// const vector& warnings = log.GetMessages(ERROR); -// } // destructor unregisters object as a log sink -// This is a dummy implementation which covers only what is used by protocol -// buffer unit tests. -class ScopedMemoryLog { - public: - ScopedMemoryLog(); - virtual ~ScopedMemoryLog(); - - // Fetches all messages logged. The internal version of this class - // would only fetch messages at the given security level, but the protobuf - // open source version ignores the argument since we always pass ERROR - // anyway. - const vector& GetMessages(LogLevel dummy) const; - - private: - vector messages_; - LogHandler* old_handler_; - - static void HandleLog(LogLevel level, const char* filename, int line, - const string& message); - - static ScopedMemoryLog* active_log_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ScopedMemoryLog); -}; - -} // namespace protobuf -} // namespace google - -#endif // GOOGLE_PROTOBUF_GOOGLETEST_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgunzip.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgunzip.cc deleted file mode 100644 index a6197854..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgunzip.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2009 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: brianolson@google.com (Brian Olson) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Test program to verify that GzipInputStream is compatible with command line -// gunzip or java.util.zip.GzipInputStream -// -// Reads gzip stream on standard input and writes decompressed data to standard -// output. - -#include "config.h" - -#include -#include -#include -#include - -#include -#include - -using google::protobuf::io::FileInputStream; -using google::protobuf::io::GzipInputStream; - -int main(int argc, const char** argv) { - FileInputStream fin(STDIN_FILENO); - GzipInputStream in(&fin); - - while (true) { - const void* inptr; - int inlen; - bool ok; - ok = in.Next(&inptr, &inlen); - if (!ok) { - break; - } - if (inlen > 0) { - int err = write(STDOUT_FILENO, inptr, inlen); - assert(err == inlen); - } - } - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgzip.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgzip.cc deleted file mode 100644 index 9133275c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/testing/zcgzip.cc +++ /dev/null @@ -1,79 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2009 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: brianolson@google.com (Brian Olson) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Test program to verify that GzipOutputStream is compatible with command line -// gzip or java.util.zip.GzipOutputStream -// -// Reads data on standard input and writes compressed gzip stream to standard -// output. - -#include "config.h" - -#include -#include -#include - -#include -#include - -using google::protobuf::io::FileOutputStream; -using google::protobuf::io::GzipOutputStream; - -int main(int argc, const char** argv) { - FileOutputStream fout(STDOUT_FILENO); - GzipOutputStream out(&fout); - int readlen; - - while (true) { - void* outptr; - int outlen; - bool ok; - do { - ok = out.Next(&outptr, &outlen); - if (!ok) { - break; - } - } while (outlen <= 0); - readlen = read(STDIN_FILENO, outptr, outlen); - if (readlen <= 0) { - out.BackUp(outlen); - break; - } - if (readlen < outlen) { - out.BackUp(outlen - readlen); - } - } - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.cc deleted file mode 100644 index 1494ebd7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.cc +++ /dev/null @@ -1,1285 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jschorr@google.com (Joseph Schorr) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -string Message::DebugString() const { - string debug_string; - - TextFormat::PrintToString(*this, &debug_string); - - return debug_string; -} - -string Message::ShortDebugString() const { - string debug_string; - - TextFormat::Printer printer; - printer.SetSingleLineMode(true); - - printer.PrintToString(*this, &debug_string); - // Single line mode currently might have an extra space at the end. - if (debug_string.size() > 0 && - debug_string[debug_string.size() - 1] == ' ') { - debug_string.resize(debug_string.size() - 1); - } - - return debug_string; -} - -string Message::Utf8DebugString() const { - string debug_string; - - TextFormat::Printer printer; - printer.SetUseUtf8StringEscaping(true); - - printer.PrintToString(*this, &debug_string); - - return debug_string; -} - -void Message::PrintDebugString() const { - printf("%s", DebugString().c_str()); -} - - -// =========================================================================== -// Internal class for parsing an ASCII representation of a Protocol Message. -// This class makes use of the Protocol Message compiler's tokenizer found -// in //google/protobuf/io/tokenizer.h. Note that class's Parse -// method is *not* thread-safe and should only be used in a single thread at -// a time. - -// Makes code slightly more readable. The meaning of "DO(foo)" is -// "Execute foo and fail if it fails.", where failure is indicated by -// returning false. Borrowed from parser.cc (Thanks Kenton!). -#define DO(STATEMENT) if (STATEMENT) {} else return false - -class TextFormat::Parser::ParserImpl { - public: - - // Determines if repeated values for a non-repeated field are - // permitted, e.g., the string "foo: 1 foo: 2" for a - // required/optional field named "foo". - enum SingularOverwritePolicy { - ALLOW_SINGULAR_OVERWRITES = 0, // the last value is retained - FORBID_SINGULAR_OVERWRITES = 1, // an error is issued - }; - - ParserImpl(const Descriptor* root_message_type, - io::ZeroCopyInputStream* input_stream, - io::ErrorCollector* error_collector, - TextFormat::Finder* finder, - SingularOverwritePolicy singular_overwrite_policy) - : error_collector_(error_collector), - finder_(finder), - tokenizer_error_collector_(this), - tokenizer_(input_stream, &tokenizer_error_collector_), - root_message_type_(root_message_type), - singular_overwrite_policy_(singular_overwrite_policy), - had_errors_(false) { - // For backwards-compatibility with proto1, we need to allow the 'f' suffix - // for floats. - tokenizer_.set_allow_f_after_float(true); - - // '#' starts a comment. - tokenizer_.set_comment_style(io::Tokenizer::SH_COMMENT_STYLE); - - // Consume the starting token. - tokenizer_.Next(); - } - ~ParserImpl() { } - - // Parses the ASCII representation specified in input and saves the - // information into the output pointer (a Message). Returns - // false if an error occurs (an error will also be logged to - // GOOGLE_LOG(ERROR)). - bool Parse(Message* output) { - // Consume fields until we cannot do so anymore. - while(true) { - if (LookingAtType(io::Tokenizer::TYPE_END)) { - return !had_errors_; - } - - DO(ConsumeField(output)); - } - } - - bool ParseField(const FieldDescriptor* field, Message* output) { - bool suc; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - suc = ConsumeFieldMessage(output, output->GetReflection(), field); - } else { - suc = ConsumeFieldValue(output, output->GetReflection(), field); - } - return suc && LookingAtType(io::Tokenizer::TYPE_END); - } - - void ReportError(int line, int col, const string& message) { - had_errors_ = true; - if (error_collector_ == NULL) { - if (line >= 0) { - GOOGLE_LOG(ERROR) << "Error parsing text-format " - << root_message_type_->full_name() - << ": " << (line + 1) << ":" - << (col + 1) << ": " << message; - } else { - GOOGLE_LOG(ERROR) << "Error parsing text-format " - << root_message_type_->full_name() - << ": " << message; - } - } else { - error_collector_->AddError(line, col, message); - } - } - - void ReportWarning(int line, int col, const string& message) { - if (error_collector_ == NULL) { - if (line >= 0) { - GOOGLE_LOG(WARNING) << "Warning parsing text-format " - << root_message_type_->full_name() - << ": " << (line + 1) << ":" - << (col + 1) << ": " << message; - } else { - GOOGLE_LOG(WARNING) << "Warning parsing text-format " - << root_message_type_->full_name() - << ": " << message; - } - } else { - error_collector_->AddWarning(line, col, message); - } - } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ParserImpl); - - // Reports an error with the given message with information indicating - // the position (as derived from the current token). - void ReportError(const string& message) { - ReportError(tokenizer_.current().line, tokenizer_.current().column, - message); - } - - // Reports a warning with the given message with information indicating - // the position (as derived from the current token). - void ReportWarning(const string& message) { - ReportWarning(tokenizer_.current().line, tokenizer_.current().column, - message); - } - - // Consumes the specified message with the given starting delimeter. - // This method checks to see that the end delimeter at the conclusion of - // the consumption matches the starting delimeter passed in here. - bool ConsumeMessage(Message* message, const string delimeter) { - while (!LookingAt(">") && !LookingAt("}")) { - DO(ConsumeField(message)); - } - - // Confirm that we have a valid ending delimeter. - DO(Consume(delimeter)); - - return true; - } - - // Consumes the current field (as returned by the tokenizer) on the - // passed in message. - bool ConsumeField(Message* message) { - const Reflection* reflection = message->GetReflection(); - const Descriptor* descriptor = message->GetDescriptor(); - - string field_name; - - const FieldDescriptor* field = NULL; - - if (TryConsume("[")) { - // Extension. - DO(ConsumeIdentifier(&field_name)); - while (TryConsume(".")) { - string part; - DO(ConsumeIdentifier(&part)); - field_name += "."; - field_name += part; - } - DO(Consume("]")); - - field = (finder_ != NULL - ? finder_->FindExtension(message, field_name) - : reflection->FindKnownExtensionByName(field_name)); - - if (field == NULL) { - ReportError("Extension \"" + field_name + "\" is not defined or " - "is not an extension of \"" + - descriptor->full_name() + "\"."); - return false; - } - } else { - DO(ConsumeIdentifier(&field_name)); - - field = descriptor->FindFieldByName(field_name); - // Group names are expected to be capitalized as they appear in the - // .proto file, which actually matches their type names, not their field - // names. - if (field == NULL) { - string lower_field_name = field_name; - LowerString(&lower_field_name); - field = descriptor->FindFieldByName(lower_field_name); - // If the case-insensitive match worked but the field is NOT a group, - if (field != NULL && field->type() != FieldDescriptor::TYPE_GROUP) { - field = NULL; - } - } - // Again, special-case group names as described above. - if (field != NULL && field->type() == FieldDescriptor::TYPE_GROUP - && field->message_type()->name() != field_name) { - field = NULL; - } - - if (field == NULL) { - ReportError("Message type \"" + descriptor->full_name() + - "\" has no field named \"" + field_name + "\"."); - return false; - } - } - - // Fail if the field is not repeated and it has already been specified. - if ((singular_overwrite_policy_ == FORBID_SINGULAR_OVERWRITES) && - !field->is_repeated() && reflection->HasField(*message, field)) { - ReportError("Non-repeated field \"" + field_name + - "\" is specified multiple times."); - return false; - } - - // Perform special handling for embedded message types. - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - // ':' is optional here. - TryConsume(":"); - DO(ConsumeFieldMessage(message, reflection, field)); - } else { - DO(Consume(":")); - if (field->is_repeated() && TryConsume("[")) { - // Short repeated format, e.g. "foo: [1, 2, 3]" - while (true) { - DO(ConsumeFieldValue(message, reflection, field)); - if (TryConsume("]")) { - break; - } - DO(Consume(",")); - } - } else { - DO(ConsumeFieldValue(message, reflection, field)); - } - } - - // For historical reasons, fields may optionally be separated by commas or - // semicolons. - TryConsume(";") || TryConsume(","); - - if (field->options().deprecated()) { - ReportWarning("text format contains deprecated field \"" - + field_name + "\""); - } - - return true; - } - - bool ConsumeFieldMessage(Message* message, - const Reflection* reflection, - const FieldDescriptor* field) { - string delimeter; - if (TryConsume("<")) { - delimeter = ">"; - } else { - DO(Consume("{")); - delimeter = "}"; - } - - if (field->is_repeated()) { - DO(ConsumeMessage(reflection->AddMessage(message, field), delimeter)); - } else { - DO(ConsumeMessage(reflection->MutableMessage(message, field), - delimeter)); - } - return true; - } - - bool ConsumeFieldValue(Message* message, - const Reflection* reflection, - const FieldDescriptor* field) { - -// Define an easy to use macro for setting fields. This macro checks -// to see if the field is repeated (in which case we need to use the Add -// methods or not (in which case we need to use the Set methods). -#define SET_FIELD(CPPTYPE, VALUE) \ - if (field->is_repeated()) { \ - reflection->Add##CPPTYPE(message, field, VALUE); \ - } else { \ - reflection->Set##CPPTYPE(message, field, VALUE); \ - } \ - - switch(field->cpp_type()) { - case FieldDescriptor::CPPTYPE_INT32: { - int64 value; - DO(ConsumeSignedInteger(&value, kint32max)); - SET_FIELD(Int32, static_cast(value)); - break; - } - - case FieldDescriptor::CPPTYPE_UINT32: { - uint64 value; - DO(ConsumeUnsignedInteger(&value, kuint32max)); - SET_FIELD(UInt32, static_cast(value)); - break; - } - - case FieldDescriptor::CPPTYPE_INT64: { - int64 value; - DO(ConsumeSignedInteger(&value, kint64max)); - SET_FIELD(Int64, value); - break; - } - - case FieldDescriptor::CPPTYPE_UINT64: { - uint64 value; - DO(ConsumeUnsignedInteger(&value, kuint64max)); - SET_FIELD(UInt64, value); - break; - } - - case FieldDescriptor::CPPTYPE_FLOAT: { - double value; - DO(ConsumeDouble(&value)); - SET_FIELD(Float, static_cast(value)); - break; - } - - case FieldDescriptor::CPPTYPE_DOUBLE: { - double value; - DO(ConsumeDouble(&value)); - SET_FIELD(Double, value); - break; - } - - case FieldDescriptor::CPPTYPE_STRING: { - string value; - DO(ConsumeString(&value)); - SET_FIELD(String, value); - break; - } - - case FieldDescriptor::CPPTYPE_BOOL: { - if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - uint64 value; - DO(ConsumeUnsignedInteger(&value, 1)); - SET_FIELD(Bool, value); - } else { - string value; - DO(ConsumeIdentifier(&value)); - if (value == "true" || value == "t") { - SET_FIELD(Bool, true); - } else if (value == "false" || value == "f") { - SET_FIELD(Bool, false); - } else { - ReportError("Invalid value for boolean field \"" + field->name() - + "\". Value: \"" + value + "\"."); - return false; - } - } - break; - } - - case FieldDescriptor::CPPTYPE_ENUM: { - string value; - const EnumDescriptor* enum_type = field->enum_type(); - const EnumValueDescriptor* enum_value = NULL; - - if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - DO(ConsumeIdentifier(&value)); - // Find the enumeration value. - enum_value = enum_type->FindValueByName(value); - - } else if (LookingAt("-") || - LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - int64 int_value; - DO(ConsumeSignedInteger(&int_value, kint32max)); - value = SimpleItoa(int_value); // for error reporting - enum_value = enum_type->FindValueByNumber(int_value); - } else { - ReportError("Expected integer or identifier."); - return false; - } - - if (enum_value == NULL) { - ReportError("Unknown enumeration value of \"" + value + "\" for " - "field \"" + field->name() + "\"."); - return false; - } - - SET_FIELD(Enum, enum_value); - break; - } - - case FieldDescriptor::CPPTYPE_MESSAGE: { - // We should never get here. Put here instead of a default - // so that if new types are added, we get a nice compiler warning. - GOOGLE_LOG(FATAL) << "Reached an unintended state: CPPTYPE_MESSAGE"; - break; - } - } -#undef SET_FIELD - return true; - } - - // Returns true if the current token's text is equal to that specified. - bool LookingAt(const string& text) { - return tokenizer_.current().text == text; - } - - // Returns true if the current token's type is equal to that specified. - bool LookingAtType(io::Tokenizer::TokenType token_type) { - return tokenizer_.current().type == token_type; - } - - // Consumes an identifier and saves its value in the identifier parameter. - // Returns false if the token is not of type IDENTFIER. - bool ConsumeIdentifier(string* identifier) { - if (!LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - ReportError("Expected identifier."); - return false; - } - - *identifier = tokenizer_.current().text; - - tokenizer_.Next(); - return true; - } - - // Consumes a string and saves its value in the text parameter. - // Returns false if the token is not of type STRING. - bool ConsumeString(string* text) { - if (!LookingAtType(io::Tokenizer::TYPE_STRING)) { - ReportError("Expected string."); - return false; - } - - text->clear(); - while (LookingAtType(io::Tokenizer::TYPE_STRING)) { - io::Tokenizer::ParseStringAppend(tokenizer_.current().text, text); - - tokenizer_.Next(); - } - - return true; - } - - // Consumes a uint64 and saves its value in the value parameter. - // Returns false if the token is not of type INTEGER. - bool ConsumeUnsignedInteger(uint64* value, uint64 max_value) { - if (!LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - ReportError("Expected integer."); - return false; - } - - if (!io::Tokenizer::ParseInteger(tokenizer_.current().text, - max_value, value)) { - ReportError("Integer out of range."); - return false; - } - - tokenizer_.Next(); - return true; - } - - // Consumes an int64 and saves its value in the value parameter. - // Note that since the tokenizer does not support negative numbers, - // we actually may consume an additional token (for the minus sign) in this - // method. Returns false if the token is not an integer - // (signed or otherwise). - bool ConsumeSignedInteger(int64* value, uint64 max_value) { - bool negative = false; - - if (TryConsume("-")) { - negative = true; - // Two's complement always allows one more negative integer than - // positive. - ++max_value; - } - - uint64 unsigned_value; - - DO(ConsumeUnsignedInteger(&unsigned_value, max_value)); - - *value = static_cast(unsigned_value); - - if (negative) { - *value = -*value; - } - - return true; - } - - // Consumes a double and saves its value in the value parameter. - // Note that since the tokenizer does not support negative numbers, - // we actually may consume an additional token (for the minus sign) in this - // method. Returns false if the token is not a double - // (signed or otherwise). - bool ConsumeDouble(double* value) { - bool negative = false; - - if (TryConsume("-")) { - negative = true; - } - - // A double can actually be an integer, according to the tokenizer. - // Therefore, we must check both cases here. - if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { - // We have found an integer value for the double. - uint64 integer_value; - DO(ConsumeUnsignedInteger(&integer_value, kuint64max)); - - *value = static_cast(integer_value); - } else if (LookingAtType(io::Tokenizer::TYPE_FLOAT)) { - // We have found a float value for the double. - *value = io::Tokenizer::ParseFloat(tokenizer_.current().text); - - // Mark the current token as consumed. - tokenizer_.Next(); - } else if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - string text = tokenizer_.current().text; - LowerString(&text); - if (text == "inf" || text == "infinity") { - *value = std::numeric_limits::infinity(); - tokenizer_.Next(); - } else if (text == "nan") { - *value = std::numeric_limits::quiet_NaN(); - tokenizer_.Next(); - } else { - ReportError("Expected double."); - return false; - } - } else { - ReportError("Expected double."); - return false; - } - - if (negative) { - *value = -*value; - } - - return true; - } - - // Consumes a token and confirms that it matches that specified in the - // value parameter. Returns false if the token found does not match that - // which was specified. - bool Consume(const string& value) { - const string& current_value = tokenizer_.current().text; - - if (current_value != value) { - ReportError("Expected \"" + value + "\", found \"" + current_value - + "\"."); - return false; - } - - tokenizer_.Next(); - - return true; - } - - // Attempts to consume the supplied value. Returns false if a the - // token found does not match the value specified. - bool TryConsume(const string& value) { - if (tokenizer_.current().text == value) { - tokenizer_.Next(); - return true; - } else { - return false; - } - } - - // An internal instance of the Tokenizer's error collector, used to - // collect any base-level parse errors and feed them to the ParserImpl. - class ParserErrorCollector : public io::ErrorCollector { - public: - explicit ParserErrorCollector(TextFormat::Parser::ParserImpl* parser) : - parser_(parser) { } - - virtual ~ParserErrorCollector() { }; - - virtual void AddError(int line, int column, const string& message) { - parser_->ReportError(line, column, message); - } - - virtual void AddWarning(int line, int column, const string& message) { - parser_->ReportWarning(line, column, message); - } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ParserErrorCollector); - TextFormat::Parser::ParserImpl* parser_; - }; - - io::ErrorCollector* error_collector_; - TextFormat::Finder* finder_; - ParserErrorCollector tokenizer_error_collector_; - io::Tokenizer tokenizer_; - const Descriptor* root_message_type_; - SingularOverwritePolicy singular_overwrite_policy_; - bool had_errors_; -}; - -#undef DO - -// =========================================================================== -// Internal class for writing text to the io::ZeroCopyOutputStream. Adapted -// from the Printer found in //google/protobuf/io/printer.h -class TextFormat::Printer::TextGenerator { - public: - explicit TextGenerator(io::ZeroCopyOutputStream* output, - int initial_indent_level) - : output_(output), - buffer_(NULL), - buffer_size_(0), - at_start_of_line_(true), - failed_(false), - indent_(""), - initial_indent_level_(initial_indent_level) { - indent_.resize(initial_indent_level_ * 2, ' '); - } - - ~TextGenerator() { - // Only BackUp() if we're sure we've successfully called Next() at least - // once. - if (buffer_size_ > 0) { - output_->BackUp(buffer_size_); - } - } - - // Indent text by two spaces. After calling Indent(), two spaces will be - // inserted at the beginning of each line of text. Indent() may be called - // multiple times to produce deeper indents. - void Indent() { - indent_ += " "; - } - - // Reduces the current indent level by two spaces, or crashes if the indent - // level is zero. - void Outdent() { - if (indent_.empty() || - indent_.size() < initial_indent_level_ * 2) { - GOOGLE_LOG(DFATAL) << " Outdent() without matching Indent()."; - return; - } - - indent_.resize(indent_.size() - 2); - } - - // Print text to the output stream. - void Print(const string& str) { - Print(str.data(), str.size()); - } - - // Print text to the output stream. - void Print(const char* text) { - Print(text, strlen(text)); - } - - // Print text to the output stream. - void Print(const char* text, int size) { - int pos = 0; // The number of bytes we've written so far. - - for (int i = 0; i < size; i++) { - if (text[i] == '\n') { - // Saw newline. If there is more text, we may need to insert an indent - // here. So, write what we have so far, including the '\n'. - Write(text + pos, i - pos + 1); - pos = i + 1; - - // Setting this true will cause the next Write() to insert an indent - // first. - at_start_of_line_ = true; - } - } - - // Write the rest. - Write(text + pos, size - pos); - } - - // True if any write to the underlying stream failed. (We don't just - // crash in this case because this is an I/O failure, not a programming - // error.) - bool failed() const { return failed_; } - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TextGenerator); - - void Write(const char* data, int size) { - if (failed_) return; - if (size == 0) return; - - if (at_start_of_line_) { - // Insert an indent. - at_start_of_line_ = false; - Write(indent_.data(), indent_.size()); - if (failed_) return; - } - - while (size > buffer_size_) { - // Data exceeds space in the buffer. Copy what we can and request a - // new buffer. - memcpy(buffer_, data, buffer_size_); - data += buffer_size_; - size -= buffer_size_; - void* void_buffer; - failed_ = !output_->Next(&void_buffer, &buffer_size_); - if (failed_) return; - buffer_ = reinterpret_cast(void_buffer); - } - - // Buffer is big enough to receive the data; copy it. - memcpy(buffer_, data, size); - buffer_ += size; - buffer_size_ -= size; - } - - io::ZeroCopyOutputStream* const output_; - char* buffer_; - int buffer_size_; - bool at_start_of_line_; - bool failed_; - - string indent_; - int initial_indent_level_; -}; - -// =========================================================================== - -TextFormat::Finder::~Finder() { -} - -TextFormat::Parser::Parser() - : error_collector_(NULL), - finder_(NULL), - allow_partial_(false) { -} - -TextFormat::Parser::~Parser() {} - -bool TextFormat::Parser::Parse(io::ZeroCopyInputStream* input, - Message* output) { - output->Clear(); - ParserImpl parser(output->GetDescriptor(), input, error_collector_, - finder_, ParserImpl::FORBID_SINGULAR_OVERWRITES); - return MergeUsingImpl(input, output, &parser); -} - -bool TextFormat::Parser::ParseFromString(const string& input, - Message* output) { - io::ArrayInputStream input_stream(input.data(), input.size()); - return Parse(&input_stream, output); -} - -bool TextFormat::Parser::Merge(io::ZeroCopyInputStream* input, - Message* output) { - ParserImpl parser(output->GetDescriptor(), input, error_collector_, - finder_, ParserImpl::ALLOW_SINGULAR_OVERWRITES); - return MergeUsingImpl(input, output, &parser); -} - -bool TextFormat::Parser::MergeFromString(const string& input, - Message* output) { - io::ArrayInputStream input_stream(input.data(), input.size()); - return Merge(&input_stream, output); -} - -bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* input, - Message* output, - ParserImpl* parser_impl) { - if (!parser_impl->Parse(output)) return false; - if (!allow_partial_ && !output->IsInitialized()) { - vector missing_fields; - output->FindInitializationErrors(&missing_fields); - parser_impl->ReportError(-1, 0, "Message missing required fields: " + - JoinStrings(missing_fields, ", ")); - return false; - } - return true; -} - -bool TextFormat::Parser::ParseFieldValueFromString( - const string& input, - const FieldDescriptor* field, - Message* output) { - io::ArrayInputStream input_stream(input.data(), input.size()); - ParserImpl parser(output->GetDescriptor(), &input_stream, error_collector_, - finder_, ParserImpl::ALLOW_SINGULAR_OVERWRITES); - return parser.ParseField(field, output); -} - -/* static */ bool TextFormat::Parse(io::ZeroCopyInputStream* input, - Message* output) { - return Parser().Parse(input, output); -} - -/* static */ bool TextFormat::Merge(io::ZeroCopyInputStream* input, - Message* output) { - return Parser().Merge(input, output); -} - -/* static */ bool TextFormat::ParseFromString(const string& input, - Message* output) { - return Parser().ParseFromString(input, output); -} - -/* static */ bool TextFormat::MergeFromString(const string& input, - Message* output) { - return Parser().MergeFromString(input, output); -} - -// =========================================================================== - -TextFormat::Printer::Printer() - : initial_indent_level_(0), - single_line_mode_(false), - use_short_repeated_primitives_(false), - utf8_string_escaping_(false) {} - -TextFormat::Printer::~Printer() {} - -bool TextFormat::Printer::PrintToString(const Message& message, - string* output) const { - GOOGLE_DCHECK(output) << "output specified is NULL"; - - output->clear(); - io::StringOutputStream output_stream(output); - - bool result = Print(message, &output_stream); - - return result; -} - -bool TextFormat::Printer::PrintUnknownFieldsToString( - const UnknownFieldSet& unknown_fields, - string* output) const { - GOOGLE_DCHECK(output) << "output specified is NULL"; - - output->clear(); - io::StringOutputStream output_stream(output); - return PrintUnknownFields(unknown_fields, &output_stream); -} - -bool TextFormat::Printer::Print(const Message& message, - io::ZeroCopyOutputStream* output) const { - TextGenerator generator(output, initial_indent_level_); - - Print(message, generator); - - // Output false if the generator failed internally. - return !generator.failed(); -} - -bool TextFormat::Printer::PrintUnknownFields( - const UnknownFieldSet& unknown_fields, - io::ZeroCopyOutputStream* output) const { - TextGenerator generator(output, initial_indent_level_); - - PrintUnknownFields(unknown_fields, generator); - - // Output false if the generator failed internally. - return !generator.failed(); -} - -void TextFormat::Printer::Print(const Message& message, - TextGenerator& generator) const { - const Reflection* reflection = message.GetReflection(); - vector fields; - reflection->ListFields(message, &fields); - for (int i = 0; i < fields.size(); i++) { - PrintField(message, reflection, fields[i], generator); - } - PrintUnknownFields(reflection->GetUnknownFields(message), generator); -} - -void TextFormat::Printer::PrintFieldValueToString( - const Message& message, - const FieldDescriptor* field, - int index, - string* output) const { - - GOOGLE_DCHECK(output) << "output specified is NULL"; - - output->clear(); - io::StringOutputStream output_stream(output); - TextGenerator generator(&output_stream, initial_indent_level_); - - PrintFieldValue(message, message.GetReflection(), field, index, generator); -} - -void TextFormat::Printer::PrintField(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const { - if (use_short_repeated_primitives_ && - field->is_repeated() && - field->cpp_type() != FieldDescriptor::CPPTYPE_STRING && - field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { - PrintShortRepeatedField(message, reflection, field, generator); - return; - } - - int count = 0; - - if (field->is_repeated()) { - count = reflection->FieldSize(message, field); - } else if (reflection->HasField(message, field)) { - count = 1; - } - - for (int j = 0; j < count; ++j) { - PrintFieldName(message, reflection, field, generator); - - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (single_line_mode_) { - generator.Print(" { "); - } else { - generator.Print(" {\n"); - generator.Indent(); - } - } else { - generator.Print(": "); - } - - // Write the field value. - int field_index = j; - if (!field->is_repeated()) { - field_index = -1; - } - - PrintFieldValue(message, reflection, field, field_index, generator); - - if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - if (single_line_mode_) { - generator.Print("} "); - } else { - generator.Outdent(); - generator.Print("}\n"); - } - } else { - if (single_line_mode_) { - generator.Print(" "); - } else { - generator.Print("\n"); - } - } - } -} - -void TextFormat::Printer::PrintShortRepeatedField( - const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const { - // Print primitive repeated field in short form. - PrintFieldName(message, reflection, field, generator); - - int size = reflection->FieldSize(message, field); - generator.Print(": ["); - for (int i = 0; i < size; i++) { - if (i > 0) generator.Print(", "); - PrintFieldValue(message, reflection, field, i, generator); - } - if (single_line_mode_) { - generator.Print("] "); - } else { - generator.Print("]\n"); - } -} - -void TextFormat::Printer::PrintFieldName(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const { - if (field->is_extension()) { - generator.Print("["); - // We special-case MessageSet elements for compatibility with proto1. - if (field->containing_type()->options().message_set_wire_format() - && field->type() == FieldDescriptor::TYPE_MESSAGE - && field->is_optional() - && field->extension_scope() == field->message_type()) { - generator.Print(field->message_type()->full_name()); - } else { - generator.Print(field->full_name()); - } - generator.Print("]"); - } else { - if (field->type() == FieldDescriptor::TYPE_GROUP) { - // Groups must be serialized with their original capitalization. - generator.Print(field->message_type()->name()); - } else { - generator.Print(field->name()); - } - } -} - -void TextFormat::Printer::PrintFieldValue( - const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - int index, - TextGenerator& generator) const { - GOOGLE_DCHECK(field->is_repeated() || (index == -1)) - << "Index must be -1 for non-repeated fields"; - - switch (field->cpp_type()) { -#define OUTPUT_FIELD(CPPTYPE, METHOD, TO_STRING) \ - case FieldDescriptor::CPPTYPE_##CPPTYPE: \ - generator.Print(TO_STRING(field->is_repeated() ? \ - reflection->GetRepeated##METHOD(message, field, index) : \ - reflection->Get##METHOD(message, field))); \ - break; \ - - OUTPUT_FIELD( INT32, Int32, SimpleItoa); - OUTPUT_FIELD( INT64, Int64, SimpleItoa); - OUTPUT_FIELD(UINT32, UInt32, SimpleItoa); - OUTPUT_FIELD(UINT64, UInt64, SimpleItoa); - OUTPUT_FIELD( FLOAT, Float, SimpleFtoa); - OUTPUT_FIELD(DOUBLE, Double, SimpleDtoa); -#undef OUTPUT_FIELD - - case FieldDescriptor::CPPTYPE_STRING: { - string scratch; - const string& value = field->is_repeated() ? - reflection->GetRepeatedStringReference( - message, field, index, &scratch) : - reflection->GetStringReference(message, field, &scratch); - - generator.Print("\""); - if (utf8_string_escaping_) { - generator.Print(strings::Utf8SafeCEscape(value)); - } else { - generator.Print(CEscape(value)); - } - generator.Print("\""); - - break; - } - - case FieldDescriptor::CPPTYPE_BOOL: - if (field->is_repeated()) { - generator.Print(reflection->GetRepeatedBool(message, field, index) - ? "true" : "false"); - } else { - generator.Print(reflection->GetBool(message, field) - ? "true" : "false"); - } - break; - - case FieldDescriptor::CPPTYPE_ENUM: - generator.Print(field->is_repeated() ? - reflection->GetRepeatedEnum(message, field, index)->name() : - reflection->GetEnum(message, field)->name()); - break; - - case FieldDescriptor::CPPTYPE_MESSAGE: - Print(field->is_repeated() ? - reflection->GetRepeatedMessage(message, field, index) : - reflection->GetMessage(message, field), - generator); - break; - } -} - -/* static */ bool TextFormat::Print(const Message& message, - io::ZeroCopyOutputStream* output) { - return Printer().Print(message, output); -} - -/* static */ bool TextFormat::PrintUnknownFields( - const UnknownFieldSet& unknown_fields, - io::ZeroCopyOutputStream* output) { - return Printer().PrintUnknownFields(unknown_fields, output); -} - -/* static */ bool TextFormat::PrintToString( - const Message& message, string* output) { - return Printer().PrintToString(message, output); -} - -/* static */ bool TextFormat::PrintUnknownFieldsToString( - const UnknownFieldSet& unknown_fields, string* output) { - return Printer().PrintUnknownFieldsToString(unknown_fields, output); -} - -/* static */ void TextFormat::PrintFieldValueToString( - const Message& message, - const FieldDescriptor* field, - int index, - string* output) { - return Printer().PrintFieldValueToString(message, field, index, output); -} - -/* static */ bool TextFormat::ParseFieldValueFromString( - const string& input, - const FieldDescriptor* field, - Message* message) { - return Parser().ParseFieldValueFromString(input, field, message); -} - -// Prints an integer as hex with a fixed number of digits dependent on the -// integer type. -template -static string PaddedHex(IntType value) { - string result; - result.reserve(sizeof(value) * 2); - for (int i = sizeof(value) * 2 - 1; i >= 0; i--) { - result.push_back(int_to_hex_digit(value >> (i*4) & 0x0F)); - } - return result; -} - -void TextFormat::Printer::PrintUnknownFields( - const UnknownFieldSet& unknown_fields, TextGenerator& generator) const { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - string field_number = SimpleItoa(field.number()); - - switch (field.type()) { - case UnknownField::TYPE_VARINT: - generator.Print(field_number); - generator.Print(": "); - generator.Print(SimpleItoa(field.varint())); - if (single_line_mode_) { - generator.Print(" "); - } else { - generator.Print("\n"); - } - break; - case UnknownField::TYPE_FIXED32: { - generator.Print(field_number); - generator.Print(": 0x"); - char buffer[kFastToBufferSize]; - generator.Print(FastHex32ToBuffer(field.fixed32(), buffer)); - if (single_line_mode_) { - generator.Print(" "); - } else { - generator.Print("\n"); - } - break; - } - case UnknownField::TYPE_FIXED64: { - generator.Print(field_number); - generator.Print(": 0x"); - char buffer[kFastToBufferSize]; - generator.Print(FastHex64ToBuffer(field.fixed64(), buffer)); - if (single_line_mode_) { - generator.Print(" "); - } else { - generator.Print("\n"); - } - break; - } - case UnknownField::TYPE_LENGTH_DELIMITED: { - generator.Print(field_number); - const string& value = field.length_delimited(); - UnknownFieldSet embedded_unknown_fields; - if (!value.empty() && embedded_unknown_fields.ParseFromString(value)) { - // This field is parseable as a Message. - // So it is probably an embedded message. - if (single_line_mode_) { - generator.Print(" { "); - } else { - generator.Print(" {\n"); - generator.Indent(); - } - PrintUnknownFields(embedded_unknown_fields, generator); - if (single_line_mode_) { - generator.Print("} "); - } else { - generator.Outdent(); - generator.Print("}\n"); - } - } else { - // This field is not parseable as a Message. - // So it is probably just a plain string. - generator.Print(": \""); - generator.Print(CEscape(value)); - generator.Print("\""); - if (single_line_mode_) { - generator.Print(" "); - } else { - generator.Print("\n"); - } - } - break; - } - case UnknownField::TYPE_GROUP: - generator.Print(field_number); - if (single_line_mode_) { - generator.Print(" { "); - } else { - generator.Print(" {\n"); - generator.Indent(); - } - PrintUnknownFields(field.group(), generator); - if (single_line_mode_) { - generator.Print("} "); - } else { - generator.Outdent(); - generator.Print("}\n"); - } - break; - } - } -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.h deleted file mode 100644 index 03c04910..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format.h +++ /dev/null @@ -1,285 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jschorr@google.com (Joseph Schorr) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Utilities for printing and parsing protocol messages in a human-readable, -// text-based format. - -#ifndef GOOGLE_PROTOBUF_TEXT_FORMAT_H__ -#define GOOGLE_PROTOBUF_TEXT_FORMAT_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - -namespace io { - class ErrorCollector; // tokenizer.h -} - -// This class implements protocol buffer text format. Printing and parsing -// protocol messages in text format is useful for debugging and human editing -// of messages. -// -// This class is really a namespace that contains only static methods. -class LIBPROTOBUF_EXPORT TextFormat { - public: - // Outputs a textual representation of the given message to the given - // output stream. - static bool Print(const Message& message, io::ZeroCopyOutputStream* output); - - // Print the fields in an UnknownFieldSet. They are printed by tag number - // only. Embedded messages are heuristically identified by attempting to - // parse them. - static bool PrintUnknownFields(const UnknownFieldSet& unknown_fields, - io::ZeroCopyOutputStream* output); - - // Like Print(), but outputs directly to a string. - static bool PrintToString(const Message& message, string* output); - - // Like PrintUnknownFields(), but outputs directly to a string. - static bool PrintUnknownFieldsToString(const UnknownFieldSet& unknown_fields, - string* output); - - // Outputs a textual representation of the value of the field supplied on - // the message supplied. For non-repeated fields, an index of -1 must - // be supplied. Note that this method will print the default value for a - // field if it is not set. - static void PrintFieldValueToString(const Message& message, - const FieldDescriptor* field, - int index, - string* output); - - // Class for those users which require more fine-grained control over how - // a protobuffer message is printed out. - class LIBPROTOBUF_EXPORT Printer { - public: - Printer(); - ~Printer(); - - // Like TextFormat::Print - bool Print(const Message& message, io::ZeroCopyOutputStream* output) const; - // Like TextFormat::PrintUnknownFields - bool PrintUnknownFields(const UnknownFieldSet& unknown_fields, - io::ZeroCopyOutputStream* output) const; - // Like TextFormat::PrintToString - bool PrintToString(const Message& message, string* output) const; - // Like TextFormat::PrintUnknownFieldsToString - bool PrintUnknownFieldsToString(const UnknownFieldSet& unknown_fields, - string* output) const; - // Like TextFormat::PrintFieldValueToString - void PrintFieldValueToString(const Message& message, - const FieldDescriptor* field, - int index, - string* output) const; - - // Adjust the initial indent level of all output. Each indent level is - // equal to two spaces. - void SetInitialIndentLevel(int indent_level) { - initial_indent_level_ = indent_level; - } - - // If printing in single line mode, then the entire message will be output - // on a single line with no line breaks. - void SetSingleLineMode(bool single_line_mode) { - single_line_mode_ = single_line_mode; - } - - // Set true to print repeated primitives in a format like: - // field_name: [1, 2, 3, 4] - // instead of printing each value on its own line. Short format applies - // only to primitive values -- i.e. everything except strings and - // sub-messages/groups. - void SetUseShortRepeatedPrimitives(bool use_short_repeated_primitives) { - use_short_repeated_primitives_ = use_short_repeated_primitives; - } - - // Set true to output UTF-8 instead of ASCII. The only difference - // is that bytes >= 0x80 in string fields will not be escaped, - // because they are assumed to be part of UTF-8 multi-byte - // sequences. - void SetUseUtf8StringEscaping(bool as_utf8) { - utf8_string_escaping_ = as_utf8; - } - - private: - // Forward declaration of an internal class used to print the text - // output to the OutputStream (see text_format.cc for implementation). - class TextGenerator; - - // Internal Print method, used for writing to the OutputStream via - // the TextGenerator class. - void Print(const Message& message, - TextGenerator& generator) const; - - // Print a single field. - void PrintField(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const; - - // Print a repeated primitive field in short form. - void PrintShortRepeatedField(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const; - - // Print the name of a field -- i.e. everything that comes before the - // ':' for a single name/value pair. - void PrintFieldName(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - TextGenerator& generator) const; - - // Outputs a textual representation of the value of the field supplied on - // the message supplied or the default value if not set. - void PrintFieldValue(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field, - int index, - TextGenerator& generator) const; - - // Print the fields in an UnknownFieldSet. They are printed by tag number - // only. Embedded messages are heuristically identified by attempting to - // parse them. - void PrintUnknownFields(const UnknownFieldSet& unknown_fields, - TextGenerator& generator) const; - - int initial_indent_level_; - - bool single_line_mode_; - - bool use_short_repeated_primitives_; - - bool utf8_string_escaping_; - }; - - // Parses a text-format protocol message from the given input stream to - // the given message object. This function parses the format written - // by Print(). - static bool Parse(io::ZeroCopyInputStream* input, Message* output); - // Like Parse(), but reads directly from a string. - static bool ParseFromString(const string& input, Message* output); - - // Like Parse(), but the data is merged into the given message, as if - // using Message::MergeFrom(). - static bool Merge(io::ZeroCopyInputStream* input, Message* output); - // Like Merge(), but reads directly from a string. - static bool MergeFromString(const string& input, Message* output); - - // Parse the given text as a single field value and store it into the - // given field of the given message. If the field is a repeated field, - // the new value will be added to the end - static bool ParseFieldValueFromString(const string& input, - const FieldDescriptor* field, - Message* message); - - // Interface that TextFormat::Parser can use to find extensions. - // This class may be extended in the future to find more information - // like fields, etc. - class LIBPROTOBUF_EXPORT Finder { - public: - virtual ~Finder(); - - // Try to find an extension of *message by fully-qualified field - // name. Returns NULL if no extension is known for this name or number. - virtual const FieldDescriptor* FindExtension( - Message* message, - const string& name) const = 0; - }; - - // For more control over parsing, use this class. - class LIBPROTOBUF_EXPORT Parser { - public: - Parser(); - ~Parser(); - - // Like TextFormat::Parse(). - bool Parse(io::ZeroCopyInputStream* input, Message* output); - // Like TextFormat::ParseFromString(). - bool ParseFromString(const string& input, Message* output); - // Like TextFormat::Merge(). - bool Merge(io::ZeroCopyInputStream* input, Message* output); - // Like TextFormat::MergeFromString(). - bool MergeFromString(const string& input, Message* output); - - // Set where to report parse errors. If NULL (the default), errors will - // be printed to stderr. - void RecordErrorsTo(io::ErrorCollector* error_collector) { - error_collector_ = error_collector; - } - - // Set how parser finds extensions. If NULL (the default), the - // parser will use the standard Reflection object associated with - // the message being parsed. - void SetFinder(Finder* finder) { - finder_ = finder; - } - - // Normally parsing fails if, after parsing, output->IsInitialized() - // returns false. Call AllowPartialMessage(true) to skip this check. - void AllowPartialMessage(bool allow) { - allow_partial_ = allow; - } - - // Like TextFormat::ParseFieldValueFromString - bool ParseFieldValueFromString(const string& input, - const FieldDescriptor* field, - Message* output); - - private: - // Forward declaration of an internal class used to parse text - // representations (see text_format.cc for implementation). - class ParserImpl; - - // Like TextFormat::Merge(). The provided implementation is used - // to do the parsing. - bool MergeUsingImpl(io::ZeroCopyInputStream* input, - Message* output, - ParserImpl* parser_impl); - - io::ErrorCollector* error_collector_; - Finder* finder_; - bool allow_partial_; - }; - - private: - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TextFormat); -}; - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_TEXT_FORMAT_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format_unittest.cc deleted file mode 100644 index 00ea8c3c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/text_format_unittest.cc +++ /dev/null @@ -1,1141 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: jschorr@google.com (Joseph Schorr) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -// Can't use an anonymous namespace here due to brokenness of Tru64 compiler. -namespace text_format_unittest { - -inline bool IsNaN(double value) { - // NaN is never equal to anything, even itself. - return value != value; -} - -// A basic string with different escapable characters for testing. -const string kEscapeTestString = - "\"A string with ' characters \n and \r newlines and \t tabs and \001 " - "slashes \\ and multiple spaces"; - -// A representation of the above string with all the characters escaped. -const string kEscapeTestStringEscaped = - "\"\\\"A string with \\' characters \\n and \\r newlines " - "and \\t tabs and \\001 slashes \\\\ and multiple spaces\""; - -class TextFormatTest : public testing::Test { - public: - static void SetUpTestCase() { - File::ReadFileToStringOrDie( - TestSourceDir() - + "/google/protobuf/testdata/text_format_unittest_data.txt", - &static_proto_debug_string_); - } - - TextFormatTest() : proto_debug_string_(static_proto_debug_string_) {} - - protected: - // Debug string read from text_format_unittest_data.txt. - const string proto_debug_string_; - unittest::TestAllTypes proto_; - - private: - static string static_proto_debug_string_; -}; -string TextFormatTest::static_proto_debug_string_; - -class TextFormatExtensionsTest : public testing::Test { - public: - static void SetUpTestCase() { - File::ReadFileToStringOrDie( - TestSourceDir() - + "/google/protobuf/testdata/" - "text_format_unittest_extensions_data.txt", - &static_proto_debug_string_); - } - - TextFormatExtensionsTest() - : proto_debug_string_(static_proto_debug_string_) {} - - protected: - // Debug string read from text_format_unittest_data.txt. - const string proto_debug_string_; - unittest::TestAllExtensions proto_; - - private: - static string static_proto_debug_string_; -}; -string TextFormatExtensionsTest::static_proto_debug_string_; - - -TEST_F(TextFormatTest, Basic) { - TestUtil::SetAllFields(&proto_); - EXPECT_EQ(proto_debug_string_, proto_.DebugString()); -} - -TEST_F(TextFormatExtensionsTest, Extensions) { - TestUtil::SetAllExtensions(&proto_); - EXPECT_EQ(proto_debug_string_, proto_.DebugString()); -} - -TEST_F(TextFormatTest, ShortDebugString) { - proto_.set_optional_int32(1); - proto_.set_optional_string("hello"); - proto_.mutable_optional_nested_message()->set_bb(2); - proto_.mutable_optional_foreign_message(); - - EXPECT_EQ("optional_int32: 1 optional_string: \"hello\" " - "optional_nested_message { bb: 2 } " - "optional_foreign_message { }", - proto_.ShortDebugString()); -} - -TEST_F(TextFormatTest, ShortPrimitiveRepeateds) { - proto_.set_optional_int32(123); - proto_.add_repeated_int32(456); - proto_.add_repeated_int32(789); - proto_.add_repeated_string("foo"); - proto_.add_repeated_string("bar"); - proto_.add_repeated_nested_message()->set_bb(2); - proto_.add_repeated_nested_message()->set_bb(3); - proto_.add_repeated_nested_enum(unittest::TestAllTypes::FOO); - proto_.add_repeated_nested_enum(unittest::TestAllTypes::BAR); - - TextFormat::Printer printer; - printer.SetUseShortRepeatedPrimitives(true); - string text; - printer.PrintToString(proto_, &text); - - EXPECT_EQ("optional_int32: 123\n" - "repeated_int32: [456, 789]\n" - "repeated_string: \"foo\"\n" - "repeated_string: \"bar\"\n" - "repeated_nested_message {\n bb: 2\n}\n" - "repeated_nested_message {\n bb: 3\n}\n" - "repeated_nested_enum: [FOO, BAR]\n", - text); - - // Try in single-line mode. - printer.SetSingleLineMode(true); - printer.PrintToString(proto_, &text); - - EXPECT_EQ("optional_int32: 123 " - "repeated_int32: [456, 789] " - "repeated_string: \"foo\" " - "repeated_string: \"bar\" " - "repeated_nested_message { bb: 2 } " - "repeated_nested_message { bb: 3 } " - "repeated_nested_enum: [FOO, BAR] ", - text); -} - - -TEST_F(TextFormatTest, StringEscape) { - // Set the string value to test. - proto_.set_optional_string(kEscapeTestString); - - // Get the DebugString from the proto. - string debug_string = proto_.DebugString(); - string utf8_debug_string = proto_.Utf8DebugString(); - - // Hardcode a correct value to test against. - string correct_string = "optional_string: " - + kEscapeTestStringEscaped - + "\n"; - - // Compare. - EXPECT_EQ(correct_string, debug_string); - // UTF-8 string is the same as non-UTF-8 because - // the protocol buffer contains no UTF-8 text. - EXPECT_EQ(correct_string, utf8_debug_string); - - string expected_short_debug_string = "optional_string: " - + kEscapeTestStringEscaped; - EXPECT_EQ(expected_short_debug_string, proto_.ShortDebugString()); -} - -TEST_F(TextFormatTest, Utf8DebugString) { - // Set the string value to test. - proto_.set_optional_string("\350\260\267\346\255\214"); - - // Get the DebugString from the proto. - string debug_string = proto_.DebugString(); - string utf8_debug_string = proto_.Utf8DebugString(); - - // Hardcode a correct value to test against. - string correct_utf8_string = "optional_string: " - "\"\350\260\267\346\255\214\"" - "\n"; - string correct_string = "optional_string: " - "\"\\350\\260\\267\\346\\255\\214\"" - "\n"; - - // Compare. - EXPECT_EQ(correct_utf8_string, utf8_debug_string); - EXPECT_EQ(correct_string, debug_string); -} - -TEST_F(TextFormatTest, PrintUnknownFields) { - // Test printing of unknown fields in a message. - - unittest::TestEmptyMessage message; - UnknownFieldSet* unknown_fields = message.mutable_unknown_fields(); - - unknown_fields->AddVarint(5, 1); - unknown_fields->AddFixed32(5, 2); - unknown_fields->AddFixed64(5, 3); - unknown_fields->AddLengthDelimited(5, "4"); - unknown_fields->AddGroup(5)->AddVarint(10, 5); - - unknown_fields->AddVarint(8, 1); - unknown_fields->AddVarint(8, 2); - unknown_fields->AddVarint(8, 3); - - EXPECT_EQ( - "5: 1\n" - "5: 0x00000002\n" - "5: 0x0000000000000003\n" - "5: \"4\"\n" - "5 {\n" - " 10: 5\n" - "}\n" - "8: 1\n" - "8: 2\n" - "8: 3\n", - message.DebugString()); -} - -TEST_F(TextFormatTest, PrintUnknownMessage) { - // Test heuristic printing of messages in an UnknownFieldSet. - - protobuf_unittest::TestAllTypes message; - - // Cases which should not be interpreted as sub-messages. - - // 'a' is a valid FIXED64 tag, so for the string to be parseable as a message - // it should be followed by 8 bytes. Since this string only has two - // subsequent bytes, it should be treated as a string. - message.add_repeated_string("abc"); - - // 'd' happens to be a valid ENDGROUP tag. So, - // UnknownFieldSet::MergeFromCodedStream() will successfully parse "def", but - // the ConsumedEntireMessage() check should fail. - message.add_repeated_string("def"); - - // A zero-length string should never be interpreted as a message even though - // it is technically valid as one. - message.add_repeated_string(""); - - // Case which should be interpreted as a sub-message. - - // An actual nested message with content should always be interpreted as a - // nested message. - message.add_repeated_nested_message()->set_bb(123); - - string data; - message.SerializeToString(&data); - - string text; - UnknownFieldSet unknown_fields; - EXPECT_TRUE(unknown_fields.ParseFromString(data)); - EXPECT_TRUE(TextFormat::PrintUnknownFieldsToString(unknown_fields, &text)); - EXPECT_EQ( - "44: \"abc\"\n" - "44: \"def\"\n" - "44: \"\"\n" - "48 {\n" - " 1: 123\n" - "}\n", - text); -} - -TEST_F(TextFormatTest, PrintMessageWithIndent) { - // Test adding an initial indent to printing. - - protobuf_unittest::TestAllTypes message; - - message.add_repeated_string("abc"); - message.add_repeated_string("def"); - message.add_repeated_nested_message()->set_bb(123); - - string text; - TextFormat::Printer printer; - printer.SetInitialIndentLevel(1); - EXPECT_TRUE(printer.PrintToString(message, &text)); - EXPECT_EQ( - " repeated_string: \"abc\"\n" - " repeated_string: \"def\"\n" - " repeated_nested_message {\n" - " bb: 123\n" - " }\n", - text); -} - -TEST_F(TextFormatTest, PrintMessageSingleLine) { - // Test printing a message on a single line. - - protobuf_unittest::TestAllTypes message; - - message.add_repeated_string("abc"); - message.add_repeated_string("def"); - message.add_repeated_nested_message()->set_bb(123); - - string text; - TextFormat::Printer printer; - printer.SetInitialIndentLevel(1); - printer.SetSingleLineMode(true); - EXPECT_TRUE(printer.PrintToString(message, &text)); - EXPECT_EQ( - " repeated_string: \"abc\" repeated_string: \"def\" " - "repeated_nested_message { bb: 123 } ", - text); -} - -TEST_F(TextFormatTest, ParseBasic) { - io::ArrayInputStream input_stream(proto_debug_string_.data(), - proto_debug_string_.size()); - TextFormat::Parse(&input_stream, &proto_); - TestUtil::ExpectAllFieldsSet(proto_); -} - -TEST_F(TextFormatExtensionsTest, ParseExtensions) { - io::ArrayInputStream input_stream(proto_debug_string_.data(), - proto_debug_string_.size()); - TextFormat::Parse(&input_stream, &proto_); - TestUtil::ExpectAllExtensionsSet(proto_); -} - -TEST_F(TextFormatTest, ParseEnumFieldFromNumber) { - // Create a parse string with a numerical value for an enum field. - string parse_string = strings::Substitute("optional_nested_enum: $0", - unittest::TestAllTypes::BAZ); - EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto_)); - EXPECT_TRUE(proto_.has_optional_nested_enum()); - EXPECT_EQ(unittest::TestAllTypes::BAZ, proto_.optional_nested_enum()); -} - -TEST_F(TextFormatTest, ParseEnumFieldFromNegativeNumber) { - ASSERT_LT(unittest::SPARSE_E, 0); - string parse_string = strings::Substitute("sparse_enum: $0", - unittest::SPARSE_E); - unittest::SparseEnumMessage proto; - EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto)); - EXPECT_TRUE(proto.has_sparse_enum()); - EXPECT_EQ(unittest::SPARSE_E, proto.sparse_enum()); -} - -TEST_F(TextFormatTest, ParseStringEscape) { - // Create a parse string with escpaed characters in it. - string parse_string = "optional_string: " - + kEscapeTestStringEscaped - + "\n"; - - io::ArrayInputStream input_stream(parse_string.data(), - parse_string.size()); - TextFormat::Parse(&input_stream, &proto_); - - // Compare. - EXPECT_EQ(kEscapeTestString, proto_.optional_string()); -} - -TEST_F(TextFormatTest, ParseConcatenatedString) { - // Create a parse string with multiple parts on one line. - string parse_string = "optional_string: \"foo\" \"bar\"\n"; - - io::ArrayInputStream input_stream1(parse_string.data(), - parse_string.size()); - TextFormat::Parse(&input_stream1, &proto_); - - // Compare. - EXPECT_EQ("foobar", proto_.optional_string()); - - // Create a parse string with multiple parts on seperate lines. - parse_string = "optional_string: \"foo\"\n" - "\"bar\"\n"; - - io::ArrayInputStream input_stream2(parse_string.data(), - parse_string.size()); - TextFormat::Parse(&input_stream2, &proto_); - - // Compare. - EXPECT_EQ("foobar", proto_.optional_string()); -} - -TEST_F(TextFormatTest, ParseFloatWithSuffix) { - // Test that we can parse a floating-point value with 'f' appended to the - // end. This is needed for backwards-compatibility with proto1. - - // Have it parse a float with the 'f' suffix. - string parse_string = "optional_float: 1.0f\n"; - - io::ArrayInputStream input_stream(parse_string.data(), - parse_string.size()); - - TextFormat::Parse(&input_stream, &proto_); - - // Compare. - EXPECT_EQ(1.0, proto_.optional_float()); -} - -TEST_F(TextFormatTest, ParseShortRepeatedForm) { - string parse_string = - // Mixed short-form and long-form are simply concatenated. - "repeated_int32: 1\n" - "repeated_int32: [456, 789]\n" - "repeated_nested_enum: [ FOO ,BAR, # comment\n" - " 3]\n" - // Note that while the printer won't print repeated strings in short-form, - // the parser will accept them. - "repeated_string: [ \"foo\", 'bar' ]\n"; - - ASSERT_TRUE(TextFormat::ParseFromString(parse_string, &proto_)); - - ASSERT_EQ(3, proto_.repeated_int32_size()); - EXPECT_EQ(1, proto_.repeated_int32(0)); - EXPECT_EQ(456, proto_.repeated_int32(1)); - EXPECT_EQ(789, proto_.repeated_int32(2)); - - ASSERT_EQ(3, proto_.repeated_nested_enum_size()); - EXPECT_EQ(unittest::TestAllTypes::FOO, proto_.repeated_nested_enum(0)); - EXPECT_EQ(unittest::TestAllTypes::BAR, proto_.repeated_nested_enum(1)); - EXPECT_EQ(unittest::TestAllTypes::BAZ, proto_.repeated_nested_enum(2)); - - ASSERT_EQ(2, proto_.repeated_string_size()); - EXPECT_EQ("foo", proto_.repeated_string(0)); - EXPECT_EQ("bar", proto_.repeated_string(1)); -} - -TEST_F(TextFormatTest, Comments) { - // Test that comments are ignored. - - string parse_string = "optional_int32: 1 # a comment\n" - "optional_int64: 2 # another comment"; - - io::ArrayInputStream input_stream(parse_string.data(), - parse_string.size()); - - TextFormat::Parse(&input_stream, &proto_); - - // Compare. - EXPECT_EQ(1, proto_.optional_int32()); - EXPECT_EQ(2, proto_.optional_int64()); -} - -TEST_F(TextFormatTest, OptionalColon) { - // Test that we can place a ':' after the field name of a nested message, - // even though we don't have to. - - string parse_string = "optional_nested_message: { bb: 1}\n"; - - io::ArrayInputStream input_stream(parse_string.data(), - parse_string.size()); - - TextFormat::Parse(&input_stream, &proto_); - - // Compare. - EXPECT_TRUE(proto_.has_optional_nested_message()); - EXPECT_EQ(1, proto_.optional_nested_message().bb()); -} - -// Some platforms (e.g. Windows) insist on padding the exponent to three -// digits when one or two would be just fine. -static string RemoveRedundantZeros(string text) { - text = StringReplace(text, "e+0", "e+", true); - text = StringReplace(text, "e-0", "e-", true); - return text; -} - -TEST_F(TextFormatTest, PrintExotic) { - unittest::TestAllTypes message; - - // Note: In C, a negative integer literal is actually the unary negation - // operator being applied to a positive integer literal, and - // 9223372036854775808 is outside the range of int64. However, it is not - // outside the range of uint64. Confusingly, this means that everything - // works if we make the literal unsigned, even though we are negating it. - message.add_repeated_int64(-GOOGLE_ULONGLONG(9223372036854775808)); - message.add_repeated_uint64(GOOGLE_ULONGLONG(18446744073709551615)); - message.add_repeated_double(123.456); - message.add_repeated_double(1.23e21); - message.add_repeated_double(1.23e-18); - message.add_repeated_double(std::numeric_limits::infinity()); - message.add_repeated_double(-std::numeric_limits::infinity()); - message.add_repeated_double(std::numeric_limits::quiet_NaN()); - message.add_repeated_string(string("\000\001\a\b\f\n\r\t\v\\\'\"", 12)); - - // Fun story: We used to use 1.23e22 instead of 1.23e21 above, but this - // seemed to trigger an odd case on MinGW/GCC 3.4.5 where GCC's parsing of - // the value differed from strtod()'s parsing. That is to say, the - // following assertion fails on MinGW: - // assert(1.23e22 == strtod("1.23e22", NULL)); - // As a result, SimpleDtoa() would print the value as - // "1.2300000000000001e+22" to make sure strtod() produce the exact same - // result. Our goal is to test runtime parsing, not compile-time parsing, - // so this wasn't our problem. It was found that using 1.23e21 did not - // have this problem, so we switched to that instead. - - EXPECT_EQ( - "repeated_int64: -9223372036854775808\n" - "repeated_uint64: 18446744073709551615\n" - "repeated_double: 123.456\n" - "repeated_double: 1.23e+21\n" - "repeated_double: 1.23e-18\n" - "repeated_double: inf\n" - "repeated_double: -inf\n" - "repeated_double: nan\n" - "repeated_string: \"\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\'\\\"\"\n", - RemoveRedundantZeros(message.DebugString())); -} - -TEST_F(TextFormatTest, PrintFloatPrecision) { - unittest::TestAllTypes message; - - message.add_repeated_float(1.2); - message.add_repeated_float(1.23); - message.add_repeated_float(1.234); - message.add_repeated_float(1.2345); - message.add_repeated_float(1.23456); - message.add_repeated_float(1.2e10); - message.add_repeated_float(1.23e10); - message.add_repeated_float(1.234e10); - message.add_repeated_float(1.2345e10); - message.add_repeated_float(1.23456e10); - message.add_repeated_double(1.2); - message.add_repeated_double(1.23); - message.add_repeated_double(1.234); - message.add_repeated_double(1.2345); - message.add_repeated_double(1.23456); - message.add_repeated_double(1.234567); - message.add_repeated_double(1.2345678); - message.add_repeated_double(1.23456789); - message.add_repeated_double(1.234567898); - message.add_repeated_double(1.2345678987); - message.add_repeated_double(1.23456789876); - message.add_repeated_double(1.234567898765); - message.add_repeated_double(1.2345678987654); - message.add_repeated_double(1.23456789876543); - message.add_repeated_double(1.2e100); - message.add_repeated_double(1.23e100); - message.add_repeated_double(1.234e100); - message.add_repeated_double(1.2345e100); - message.add_repeated_double(1.23456e100); - message.add_repeated_double(1.234567e100); - message.add_repeated_double(1.2345678e100); - message.add_repeated_double(1.23456789e100); - message.add_repeated_double(1.234567898e100); - message.add_repeated_double(1.2345678987e100); - message.add_repeated_double(1.23456789876e100); - message.add_repeated_double(1.234567898765e100); - message.add_repeated_double(1.2345678987654e100); - message.add_repeated_double(1.23456789876543e100); - - EXPECT_EQ( - "repeated_float: 1.2\n" - "repeated_float: 1.23\n" - "repeated_float: 1.234\n" - "repeated_float: 1.2345\n" - "repeated_float: 1.23456\n" - "repeated_float: 1.2e+10\n" - "repeated_float: 1.23e+10\n" - "repeated_float: 1.234e+10\n" - "repeated_float: 1.2345e+10\n" - "repeated_float: 1.23456e+10\n" - "repeated_double: 1.2\n" - "repeated_double: 1.23\n" - "repeated_double: 1.234\n" - "repeated_double: 1.2345\n" - "repeated_double: 1.23456\n" - "repeated_double: 1.234567\n" - "repeated_double: 1.2345678\n" - "repeated_double: 1.23456789\n" - "repeated_double: 1.234567898\n" - "repeated_double: 1.2345678987\n" - "repeated_double: 1.23456789876\n" - "repeated_double: 1.234567898765\n" - "repeated_double: 1.2345678987654\n" - "repeated_double: 1.23456789876543\n" - "repeated_double: 1.2e+100\n" - "repeated_double: 1.23e+100\n" - "repeated_double: 1.234e+100\n" - "repeated_double: 1.2345e+100\n" - "repeated_double: 1.23456e+100\n" - "repeated_double: 1.234567e+100\n" - "repeated_double: 1.2345678e+100\n" - "repeated_double: 1.23456789e+100\n" - "repeated_double: 1.234567898e+100\n" - "repeated_double: 1.2345678987e+100\n" - "repeated_double: 1.23456789876e+100\n" - "repeated_double: 1.234567898765e+100\n" - "repeated_double: 1.2345678987654e+100\n" - "repeated_double: 1.23456789876543e+100\n", - RemoveRedundantZeros(message.DebugString())); -} - - -TEST_F(TextFormatTest, AllowPartial) { - unittest::TestRequired message; - TextFormat::Parser parser; - parser.AllowPartialMessage(true); - EXPECT_TRUE(parser.ParseFromString("a: 1", &message)); - EXPECT_EQ(1, message.a()); - EXPECT_FALSE(message.has_b()); - EXPECT_FALSE(message.has_c()); -} - -TEST_F(TextFormatTest, ParseExotic) { - unittest::TestAllTypes message; - ASSERT_TRUE(TextFormat::ParseFromString( - "repeated_int32: -1\n" - "repeated_int32: -2147483648\n" - "repeated_int64: -1\n" - "repeated_int64: -9223372036854775808\n" - "repeated_uint32: 4294967295\n" - "repeated_uint32: 2147483648\n" - "repeated_uint64: 18446744073709551615\n" - "repeated_uint64: 9223372036854775808\n" - "repeated_double: 123.0\n" - "repeated_double: 123.5\n" - "repeated_double: 0.125\n" - "repeated_double: 1.23E17\n" - "repeated_double: 1.235E+22\n" - "repeated_double: 1.235e-18\n" - "repeated_double: 123.456789\n" - "repeated_double: inf\n" - "repeated_double: Infinity\n" - "repeated_double: -inf\n" - "repeated_double: -Infinity\n" - "repeated_double: nan\n" - "repeated_double: NaN\n" - "repeated_string: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"\"\n", - &message)); - - ASSERT_EQ(2, message.repeated_int32_size()); - EXPECT_EQ(-1, message.repeated_int32(0)); - // Note: In C, a negative integer literal is actually the unary negation - // operator being applied to a positive integer literal, and 2147483648 is - // outside the range of int32. However, it is not outside the range of - // uint32. Confusingly, this means that everything works if we make the - // literal unsigned, even though we are negating it. - EXPECT_EQ(-2147483648u, message.repeated_int32(1)); - - ASSERT_EQ(2, message.repeated_int64_size()); - EXPECT_EQ(-1, message.repeated_int64(0)); - // Note: In C, a negative integer literal is actually the unary negation - // operator being applied to a positive integer literal, and - // 9223372036854775808 is outside the range of int64. However, it is not - // outside the range of uint64. Confusingly, this means that everything - // works if we make the literal unsigned, even though we are negating it. - EXPECT_EQ(-GOOGLE_ULONGLONG(9223372036854775808), message.repeated_int64(1)); - - ASSERT_EQ(2, message.repeated_uint32_size()); - EXPECT_EQ(4294967295u, message.repeated_uint32(0)); - EXPECT_EQ(2147483648u, message.repeated_uint32(1)); - - ASSERT_EQ(2, message.repeated_uint64_size()); - EXPECT_EQ(GOOGLE_ULONGLONG(18446744073709551615), message.repeated_uint64(0)); - EXPECT_EQ(GOOGLE_ULONGLONG(9223372036854775808), message.repeated_uint64(1)); - - ASSERT_EQ(13, message.repeated_double_size()); - EXPECT_EQ(123.0 , message.repeated_double(0)); - EXPECT_EQ(123.5 , message.repeated_double(1)); - EXPECT_EQ(0.125 , message.repeated_double(2)); - EXPECT_EQ(1.23E17 , message.repeated_double(3)); - EXPECT_EQ(1.235E22 , message.repeated_double(4)); - EXPECT_EQ(1.235E-18 , message.repeated_double(5)); - EXPECT_EQ(123.456789, message.repeated_double(6)); - EXPECT_EQ(message.repeated_double(7), numeric_limits::infinity()); - EXPECT_EQ(message.repeated_double(8), numeric_limits::infinity()); - EXPECT_EQ(message.repeated_double(9), -numeric_limits::infinity()); - EXPECT_EQ(message.repeated_double(10), -numeric_limits::infinity()); - EXPECT_TRUE(IsNaN(message.repeated_double(11))); - EXPECT_TRUE(IsNaN(message.repeated_double(12))); - - // Note: Since these string literals have \0's in them, we must explicitly - // pass their sizes to string's constructor. - ASSERT_EQ(1, message.repeated_string_size()); - EXPECT_EQ(string("\000\001\a\b\f\n\r\t\v\\\'\"", 12), - message.repeated_string(0)); -} - -class TextFormatParserTest : public testing::Test { - protected: - void ExpectFailure(const string& input, const string& message, int line, - int col) { - scoped_ptr proto(new unittest::TestAllTypes); - ExpectFailure(input, message, line, col, proto.get()); - } - - void ExpectFailure(const string& input, const string& message, int line, - int col, Message* proto) { - ExpectMessage(input, message, line, col, proto, false); - } - - void ExpectMessage(const string& input, const string& message, int line, - int col, Message* proto, bool expected_result) { - TextFormat::Parser parser; - MockErrorCollector error_collector; - parser.RecordErrorsTo(&error_collector); - EXPECT_EQ(parser.ParseFromString(input, proto), expected_result); - EXPECT_EQ(SimpleItoa(line) + ":" + SimpleItoa(col) + ": " + message + "\n", - error_collector.text_); - } - - // An error collector which simply concatenates all its errors into a big - // block of text which can be checked. - class MockErrorCollector : public io::ErrorCollector { - public: - MockErrorCollector() {} - ~MockErrorCollector() {} - - string text_; - - // implements ErrorCollector ------------------------------------- - void AddError(int line, int column, const string& message) { - strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", - line + 1, column + 1, message); - } - - void AddWarning(int line, int column, const string& message) { - AddError(line, column, "WARNING:" + message); - } - }; -}; - -TEST_F(TextFormatParserTest, ParseFieldValueFromString) { - scoped_ptr message(new unittest::TestAllTypes); - const Descriptor* d = message->GetDescriptor(); - -#define EXPECT_FIELD(name, value, valuestring) \ - EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \ - valuestring, d->FindFieldByName("optional_" #name), message.get())); \ - EXPECT_EQ(value, message->optional_##name()); \ - EXPECT_TRUE(message->has_optional_##name()); - -#define EXPECT_FLOAT_FIELD(name, value, valuestring) \ - EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \ - valuestring, d->FindFieldByName("optional_" #name), message.get())); \ - EXPECT_FLOAT_EQ(value, message->optional_##name()); \ - EXPECT_TRUE(message->has_optional_##name()); - -#define EXPECT_DOUBLE_FIELD(name, value, valuestring) \ - EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \ - valuestring, d->FindFieldByName("optional_" #name), message.get())); \ - EXPECT_DOUBLE_EQ(value, message->optional_##name()); \ - EXPECT_TRUE(message->has_optional_##name()); - -#define EXPECT_INVALID(name, valuestring) \ - EXPECT_FALSE(TextFormat::ParseFieldValueFromString( \ - valuestring, d->FindFieldByName("optional_" #name), message.get())); - - // int32 - EXPECT_FIELD(int32, 1, "1"); - EXPECT_FIELD(int32, -1, "-1"); - EXPECT_FIELD(int32, 0x1234, "0x1234"); - EXPECT_INVALID(int32, "a"); - EXPECT_INVALID(int32, "999999999999999999999999999999999999"); - EXPECT_INVALID(int32, "1,2"); - - // int64 - EXPECT_FIELD(int64, 1, "1"); - EXPECT_FIELD(int64, -1, "-1"); - EXPECT_FIELD(int64, 0x1234567812345678LL, "0x1234567812345678"); - EXPECT_INVALID(int64, "a"); - EXPECT_INVALID(int64, "999999999999999999999999999999999999"); - EXPECT_INVALID(int64, "1,2"); - - // uint64 - EXPECT_FIELD(uint64, 1, "1"); - EXPECT_FIELD(uint64, 0xf234567812345678ULL, "0xf234567812345678"); - EXPECT_INVALID(uint64, "-1"); - EXPECT_INVALID(uint64, "a"); - EXPECT_INVALID(uint64, "999999999999999999999999999999999999"); - EXPECT_INVALID(uint64, "1,2"); - - // fixed32 - EXPECT_FIELD(fixed32, 1, "1"); - EXPECT_FIELD(fixed32, 0x12345678, "0x12345678"); - EXPECT_INVALID(fixed32, "-1"); - EXPECT_INVALID(fixed32, "a"); - EXPECT_INVALID(fixed32, "999999999999999999999999999999999999"); - EXPECT_INVALID(fixed32, "1,2"); - - // fixed64 - EXPECT_FIELD(fixed64, 1, "1"); - EXPECT_FIELD(fixed64, 0x1234567812345678ULL, "0x1234567812345678"); - EXPECT_INVALID(fixed64, "-1"); - EXPECT_INVALID(fixed64, "a"); - EXPECT_INVALID(fixed64, "999999999999999999999999999999999999"); - EXPECT_INVALID(fixed64, "1,2"); - - // bool - EXPECT_FIELD(bool, true, "true"); - EXPECT_FIELD(bool, false, "false"); - EXPECT_FIELD(bool, true, "1"); - EXPECT_FIELD(bool, true, "t"); - EXPECT_FIELD(bool, false, "0"); - EXPECT_FIELD(bool, false, "f"); - EXPECT_INVALID(bool, "2"); - EXPECT_INVALID(bool, "-0"); - EXPECT_INVALID(bool, "on"); - EXPECT_INVALID(bool, "a"); - EXPECT_INVALID(bool, "True"); - - // float - EXPECT_FIELD(float, 1, "1"); - EXPECT_FLOAT_FIELD(float, 1.5, "1.5"); - EXPECT_FLOAT_FIELD(float, 1.5e3, "1.5e3"); - EXPECT_FLOAT_FIELD(float, -4.55, "-4.55"); - EXPECT_INVALID(float, "a"); - EXPECT_INVALID(float, "1,2"); - - // double - EXPECT_FIELD(double, 1, "1"); - EXPECT_FIELD(double, -1, "-1"); - EXPECT_DOUBLE_FIELD(double, 2.3, "2.3"); - EXPECT_DOUBLE_FIELD(double, 3e5, "3e5"); - EXPECT_INVALID(double, "a"); - EXPECT_INVALID(double, "1,2"); - - // string - EXPECT_FIELD(string, "hello", "\"hello\""); - EXPECT_FIELD(string, "-1.87", "'-1.87'"); - EXPECT_INVALID(string, "hello"); // without quote for value - - // enum - EXPECT_FIELD(nested_enum, unittest::TestAllTypes::BAR, "BAR"); - EXPECT_FIELD(nested_enum, unittest::TestAllTypes::BAZ, - SimpleItoa(unittest::TestAllTypes::BAZ)); - EXPECT_INVALID(nested_enum, "FOOBAR"); - - // message - EXPECT_TRUE(TextFormat::ParseFieldValueFromString( - "", d->FindFieldByName("optional_nested_message"), message.get())); - EXPECT_EQ(12, message->optional_nested_message().bb()); \ - EXPECT_TRUE(message->has_optional_nested_message()); - EXPECT_INVALID(nested_message, "any"); - -#undef EXPECT_FIELD -#undef EXPECT_FLOAT_FIELD -#undef EXPECT_DOUBLE_FIELD -#undef EXPECT_INVALID -} - - -TEST_F(TextFormatParserTest, InvalidToken) { - ExpectFailure("optional_bool: true\n-5\n", "Expected identifier.", - 2, 1); - - ExpectFailure("optional_bool: true!\n", "Expected identifier.", 1, 20); - ExpectFailure("\"some string\"", "Expected identifier.", 1, 1); -} - -TEST_F(TextFormatParserTest, InvalidFieldName) { - ExpectFailure( - "invalid_field: somevalue\n", - "Message type \"protobuf_unittest.TestAllTypes\" has no field named " - "\"invalid_field\".", - 1, 14); -} - -TEST_F(TextFormatParserTest, InvalidCapitalization) { - // We require that group names be exactly as they appear in the .proto. - ExpectFailure( - "optionalgroup {\na: 15\n}\n", - "Message type \"protobuf_unittest.TestAllTypes\" has no field named " - "\"optionalgroup\".", - 1, 15); - ExpectFailure( - "OPTIONALgroup {\na: 15\n}\n", - "Message type \"protobuf_unittest.TestAllTypes\" has no field named " - "\"OPTIONALgroup\".", - 1, 15); - ExpectFailure( - "Optional_Double: 10.0\n", - "Message type \"protobuf_unittest.TestAllTypes\" has no field named " - "\"Optional_Double\".", - 1, 16); -} - -TEST_F(TextFormatParserTest, InvalidFieldValues) { - // Invalid values for a double/float field. - ExpectFailure("optional_double: \"hello\"\n", "Expected double.", 1, 18); - ExpectFailure("optional_double: true\n", "Expected double.", 1, 18); - ExpectFailure("optional_double: !\n", "Expected double.", 1, 18); - ExpectFailure("optional_double {\n \n}\n", "Expected \":\", found \"{\".", - 1, 17); - - // Invalid values for a signed integer field. - ExpectFailure("optional_int32: \"hello\"\n", "Expected integer.", 1, 17); - ExpectFailure("optional_int32: true\n", "Expected integer.", 1, 17); - ExpectFailure("optional_int32: 4.5\n", "Expected integer.", 1, 17); - ExpectFailure("optional_int32: !\n", "Expected integer.", 1, 17); - ExpectFailure("optional_int32 {\n \n}\n", "Expected \":\", found \"{\".", - 1, 16); - ExpectFailure("optional_int32: 0x80000000\n", - "Integer out of range.", 1, 17); - ExpectFailure("optional_int32: -0x80000001\n", - "Integer out of range.", 1, 18); - ExpectFailure("optional_int64: 0x8000000000000000\n", - "Integer out of range.", 1, 17); - ExpectFailure("optional_int64: -0x8000000000000001\n", - "Integer out of range.", 1, 18); - - // Invalid values for an unsigned integer field. - ExpectFailure("optional_uint64: \"hello\"\n", "Expected integer.", 1, 18); - ExpectFailure("optional_uint64: true\n", "Expected integer.", 1, 18); - ExpectFailure("optional_uint64: 4.5\n", "Expected integer.", 1, 18); - ExpectFailure("optional_uint64: -5\n", "Expected integer.", 1, 18); - ExpectFailure("optional_uint64: !\n", "Expected integer.", 1, 18); - ExpectFailure("optional_uint64 {\n \n}\n", "Expected \":\", found \"{\".", - 1, 17); - ExpectFailure("optional_uint32: 0x100000000\n", - "Integer out of range.", 1, 18); - ExpectFailure("optional_uint64: 0x10000000000000000\n", - "Integer out of range.", 1, 18); - - // Invalid values for a boolean field. - ExpectFailure("optional_bool: \"hello\"\n", "Expected identifier.", 1, 16); - ExpectFailure("optional_bool: 5\n", "Integer out of range.", 1, 16); - ExpectFailure("optional_bool: -7.5\n", "Expected identifier.", 1, 16); - ExpectFailure("optional_bool: !\n", "Expected identifier.", 1, 16); - - ExpectFailure( - "optional_bool: meh\n", - "Invalid value for boolean field \"optional_bool\". Value: \"meh\".", - 2, 1); - - ExpectFailure("optional_bool {\n \n}\n", "Expected \":\", found \"{\".", - 1, 15); - - // Invalid values for a string field. - ExpectFailure("optional_string: true\n", "Expected string.", 1, 18); - ExpectFailure("optional_string: 5\n", "Expected string.", 1, 18); - ExpectFailure("optional_string: -7.5\n", "Expected string.", 1, 18); - ExpectFailure("optional_string: !\n", "Expected string.", 1, 18); - ExpectFailure("optional_string {\n \n}\n", "Expected \":\", found \"{\".", - 1, 17); - - // Invalid values for an enumeration field. - ExpectFailure("optional_nested_enum: \"hello\"\n", - "Expected integer or identifier.", 1, 23); - - // Valid token, but enum value is not defined. - ExpectFailure("optional_nested_enum: 5\n", - "Unknown enumeration value of \"5\" for field " - "\"optional_nested_enum\".", 2, 1); - // We consume the negative sign, so the error position starts one character - // later. - ExpectFailure("optional_nested_enum: -7.5\n", "Expected integer.", 1, 24); - ExpectFailure("optional_nested_enum: !\n", - "Expected integer or identifier.", 1, 23); - - ExpectFailure( - "optional_nested_enum: grah\n", - "Unknown enumeration value of \"grah\" for field " - "\"optional_nested_enum\".", 2, 1); - - ExpectFailure( - "optional_nested_enum {\n \n}\n", - "Expected \":\", found \"{\".", 1, 22); -} - -TEST_F(TextFormatParserTest, MessageDelimeters) { - // Non-matching delimeters. - ExpectFailure("OptionalGroup <\n \n}\n", "Expected \">\", found \"}\".", - 3, 1); - - // Invalid delimeters. - ExpectFailure("OptionalGroup [\n \n]\n", "Expected \"{\", found \"[\".", - 1, 15); - - // Unending message. - ExpectFailure("optional_nested_message {\n \nbb: 118\n", - "Expected identifier.", - 4, 1); -} - -TEST_F(TextFormatParserTest, UnknownExtension) { - // Non-matching delimeters. - ExpectFailure("[blahblah]: 123", - "Extension \"blahblah\" is not defined or is not an " - "extension of \"protobuf_unittest.TestAllTypes\".", - 1, 11); -} - -TEST_F(TextFormatParserTest, MissingRequired) { - unittest::TestRequired message; - ExpectFailure("a: 1", - "Message missing required fields: b, c", - 0, 1, &message); -} - -TEST_F(TextFormatParserTest, ParseDuplicateRequired) { - unittest::TestRequired message; - ExpectFailure("a: 1 b: 2 c: 3 a: 1", - "Non-repeated field \"a\" is specified multiple times.", - 1, 17, &message); -} - -TEST_F(TextFormatParserTest, ParseDuplicateOptional) { - unittest::ForeignMessage message; - ExpectFailure("c: 1 c: 2", - "Non-repeated field \"c\" is specified multiple times.", - 1, 7, &message); -} - -TEST_F(TextFormatParserTest, MergeDuplicateRequired) { - unittest::TestRequired message; - TextFormat::Parser parser; - EXPECT_TRUE(parser.MergeFromString("a: 1 b: 2 c: 3 a: 4", &message)); - EXPECT_EQ(4, message.a()); -} - -TEST_F(TextFormatParserTest, MergeDuplicateOptional) { - unittest::ForeignMessage message; - TextFormat::Parser parser; - EXPECT_TRUE(parser.MergeFromString("c: 1 c: 2", &message)); - EXPECT_EQ(2, message.c()); -} - -TEST_F(TextFormatParserTest, ExplicitDelimiters) { - unittest::TestRequired message; - EXPECT_TRUE(TextFormat::ParseFromString("a:1,b:2;c:3", &message)); - EXPECT_EQ(1, message.a()); - EXPECT_EQ(2, message.b()); - EXPECT_EQ(3, message.c()); -} - -TEST_F(TextFormatParserTest, PrintErrorsToStderr) { - vector errors; - - { - ScopedMemoryLog log; - unittest::TestAllTypes proto; - EXPECT_FALSE(TextFormat::ParseFromString("no_such_field: 1", &proto)); - errors = log.GetMessages(ERROR); - } - - ASSERT_EQ(1, errors.size()); - EXPECT_EQ("Error parsing text-format protobuf_unittest.TestAllTypes: " - "1:14: Message type \"protobuf_unittest.TestAllTypes\" has no field " - "named \"no_such_field\".", - errors[0]); -} - -TEST_F(TextFormatParserTest, FailsOnTokenizationError) { - vector errors; - - { - ScopedMemoryLog log; - unittest::TestAllTypes proto; - EXPECT_FALSE(TextFormat::ParseFromString("\020", &proto)); - errors = log.GetMessages(ERROR); - } - - ASSERT_EQ(1, errors.size()); - EXPECT_EQ("Error parsing text-format protobuf_unittest.TestAllTypes: " - "1:1: Invalid control characters encountered in text.", - errors[0]); -} - -TEST_F(TextFormatParserTest, ParseDeprecatedField) { - unittest::TestDeprecatedFields message; - ExpectMessage("deprecated_int32: 42", - "WARNING:text format contains deprecated field " - "\"deprecated_int32\"", 1, 21, &message, true); -} - -class TextFormatMessageSetTest : public testing::Test { - protected: - static const char proto_debug_string_[]; -}; -const char TextFormatMessageSetTest::proto_debug_string_[] = -"message_set {\n" -" [protobuf_unittest.TestMessageSetExtension1] {\n" -" i: 23\n" -" }\n" -" [protobuf_unittest.TestMessageSetExtension2] {\n" -" str: \"foo\"\n" -" }\n" -"}\n"; - - -TEST_F(TextFormatMessageSetTest, Serialize) { - protobuf_unittest::TestMessageSetContainer proto; - protobuf_unittest::TestMessageSetExtension1* item_a = - proto.mutable_message_set()->MutableExtension( - protobuf_unittest::TestMessageSetExtension1::message_set_extension); - item_a->set_i(23); - protobuf_unittest::TestMessageSetExtension2* item_b = - proto.mutable_message_set()->MutableExtension( - protobuf_unittest::TestMessageSetExtension2::message_set_extension); - item_b->set_str("foo"); - EXPECT_EQ(proto_debug_string_, proto.DebugString()); -} - -TEST_F(TextFormatMessageSetTest, Deserialize) { - protobuf_unittest::TestMessageSetContainer proto; - ASSERT_TRUE(TextFormat::ParseFromString(proto_debug_string_, &proto)); - EXPECT_EQ(23, proto.message_set().GetExtension( - protobuf_unittest::TestMessageSetExtension1::message_set_extension).i()); - EXPECT_EQ("foo", proto.message_set().GetExtension( - protobuf_unittest::TestMessageSetExtension2::message_set_extension).str()); - - // Ensure that these are the only entries present. - vector descriptors; - proto.message_set().GetReflection()->ListFields( - proto.message_set(), &descriptors); - EXPECT_EQ(2, descriptors.size()); -} - -} // namespace text_format_unittest -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest.proto deleted file mode 100644 index 97ec6747..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest.proto +++ /dev/null @@ -1,630 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file we will use for unit testing. - - -// Some generic_services option(s) added automatically. -// See: http://go/proto2-generic-services-default -option cc_generic_services = true; // auto-added -option java_generic_services = true; // auto-added -option py_generic_services = true; // auto-added - -import "google/protobuf/unittest_import.proto"; - -// We don't put this in a package within proto2 because we need to make sure -// that the generated code doesn't depend on being in the proto2 namespace. -// In test_util.h we do "using namespace unittest = protobuf_unittest". -package protobuf_unittest; - -// Protos optimized for SPEED use a strict superset of the generated code -// of equivalent ones optimized for CODE_SIZE, so we should optimize all our -// tests for speed unless explicitly testing code size optimization. -option optimize_for = SPEED; - -option java_outer_classname = "UnittestProto"; - -// This proto includes every type of field in both singular and repeated -// forms. -message TestAllTypes { - message NestedMessage { - // The field name "b" fails to compile in proto1 because it conflicts with - // a local variable named "b" in one of the generated methods. Doh. - // This file needs to compile in proto1 to test backwards-compatibility. - optional int32 bb = 1; - } - - enum NestedEnum { - FOO = 1; - BAR = 2; - BAZ = 3; - } - - // Singular - optional int32 optional_int32 = 1; - optional int64 optional_int64 = 2; - optional uint32 optional_uint32 = 3; - optional uint64 optional_uint64 = 4; - optional sint32 optional_sint32 = 5; - optional sint64 optional_sint64 = 6; - optional fixed32 optional_fixed32 = 7; - optional fixed64 optional_fixed64 = 8; - optional sfixed32 optional_sfixed32 = 9; - optional sfixed64 optional_sfixed64 = 10; - optional float optional_float = 11; - optional double optional_double = 12; - optional bool optional_bool = 13; - optional string optional_string = 14; - optional bytes optional_bytes = 15; - - optional group OptionalGroup = 16 { - optional int32 a = 17; - } - - optional NestedMessage optional_nested_message = 18; - optional ForeignMessage optional_foreign_message = 19; - optional protobuf_unittest_import.ImportMessage optional_import_message = 20; - - optional NestedEnum optional_nested_enum = 21; - optional ForeignEnum optional_foreign_enum = 22; - optional protobuf_unittest_import.ImportEnum optional_import_enum = 23; - - optional string optional_string_piece = 24 [ctype=STRING_PIECE]; - optional string optional_cord = 25 [ctype=CORD]; - - // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; - repeated sfixed32 repeated_sfixed32 = 39; - repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; - - repeated group RepeatedGroup = 46 { - optional int32 a = 47; - } - - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50; - - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; - repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53; - - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; - - // Singular with defaults - optional int32 default_int32 = 61 [default = 41 ]; - optional int64 default_int64 = 62 [default = 42 ]; - optional uint32 default_uint32 = 63 [default = 43 ]; - optional uint64 default_uint64 = 64 [default = 44 ]; - optional sint32 default_sint32 = 65 [default = -45 ]; - optional sint64 default_sint64 = 66 [default = 46 ]; - optional fixed32 default_fixed32 = 67 [default = 47 ]; - optional fixed64 default_fixed64 = 68 [default = 48 ]; - optional sfixed32 default_sfixed32 = 69 [default = 49 ]; - optional sfixed64 default_sfixed64 = 70 [default = -50 ]; - optional float default_float = 71 [default = 51.5 ]; - optional double default_double = 72 [default = 52e3 ]; - optional bool default_bool = 73 [default = true ]; - optional string default_string = 74 [default = "hello"]; - optional bytes default_bytes = 75 [default = "world"]; - - optional NestedEnum default_nested_enum = 81 [default = BAR ]; - optional ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR]; - optional protobuf_unittest_import.ImportEnum - default_import_enum = 83 [default = IMPORT_BAR]; - - optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"]; - optional string default_cord = 85 [ctype=CORD,default="123"]; -} - -message TestDeprecatedFields { - optional int32 deprecated_int32 = 1 [deprecated=true]; -} - -// Define these after TestAllTypes to make sure the compiler can handle -// that. -message ForeignMessage { - optional int32 c = 1; -} - -enum ForeignEnum { - FOREIGN_FOO = 4; - FOREIGN_BAR = 5; - FOREIGN_BAZ = 6; -} - -message TestAllExtensions { - extensions 1 to max; -} - -extend TestAllExtensions { - // Singular - optional int32 optional_int32_extension = 1; - optional int64 optional_int64_extension = 2; - optional uint32 optional_uint32_extension = 3; - optional uint64 optional_uint64_extension = 4; - optional sint32 optional_sint32_extension = 5; - optional sint64 optional_sint64_extension = 6; - optional fixed32 optional_fixed32_extension = 7; - optional fixed64 optional_fixed64_extension = 8; - optional sfixed32 optional_sfixed32_extension = 9; - optional sfixed64 optional_sfixed64_extension = 10; - optional float optional_float_extension = 11; - optional double optional_double_extension = 12; - optional bool optional_bool_extension = 13; - optional string optional_string_extension = 14; - optional bytes optional_bytes_extension = 15; - - optional group OptionalGroup_extension = 16 { - optional int32 a = 17; - } - - optional TestAllTypes.NestedMessage optional_nested_message_extension = 18; - optional ForeignMessage optional_foreign_message_extension = 19; - optional protobuf_unittest_import.ImportMessage - optional_import_message_extension = 20; - - optional TestAllTypes.NestedEnum optional_nested_enum_extension = 21; - optional ForeignEnum optional_foreign_enum_extension = 22; - optional protobuf_unittest_import.ImportEnum - optional_import_enum_extension = 23; - - optional string optional_string_piece_extension = 24 [ctype=STRING_PIECE]; - optional string optional_cord_extension = 25 [ctype=CORD]; - - // Repeated - repeated int32 repeated_int32_extension = 31; - repeated int64 repeated_int64_extension = 32; - repeated uint32 repeated_uint32_extension = 33; - repeated uint64 repeated_uint64_extension = 34; - repeated sint32 repeated_sint32_extension = 35; - repeated sint64 repeated_sint64_extension = 36; - repeated fixed32 repeated_fixed32_extension = 37; - repeated fixed64 repeated_fixed64_extension = 38; - repeated sfixed32 repeated_sfixed32_extension = 39; - repeated sfixed64 repeated_sfixed64_extension = 40; - repeated float repeated_float_extension = 41; - repeated double repeated_double_extension = 42; - repeated bool repeated_bool_extension = 43; - repeated string repeated_string_extension = 44; - repeated bytes repeated_bytes_extension = 45; - - repeated group RepeatedGroup_extension = 46 { - optional int32 a = 47; - } - - repeated TestAllTypes.NestedMessage repeated_nested_message_extension = 48; - repeated ForeignMessage repeated_foreign_message_extension = 49; - repeated protobuf_unittest_import.ImportMessage - repeated_import_message_extension = 50; - - repeated TestAllTypes.NestedEnum repeated_nested_enum_extension = 51; - repeated ForeignEnum repeated_foreign_enum_extension = 52; - repeated protobuf_unittest_import.ImportEnum - repeated_import_enum_extension = 53; - - repeated string repeated_string_piece_extension = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord_extension = 55 [ctype=CORD]; - - // Singular with defaults - optional int32 default_int32_extension = 61 [default = 41 ]; - optional int64 default_int64_extension = 62 [default = 42 ]; - optional uint32 default_uint32_extension = 63 [default = 43 ]; - optional uint64 default_uint64_extension = 64 [default = 44 ]; - optional sint32 default_sint32_extension = 65 [default = -45 ]; - optional sint64 default_sint64_extension = 66 [default = 46 ]; - optional fixed32 default_fixed32_extension = 67 [default = 47 ]; - optional fixed64 default_fixed64_extension = 68 [default = 48 ]; - optional sfixed32 default_sfixed32_extension = 69 [default = 49 ]; - optional sfixed64 default_sfixed64_extension = 70 [default = -50 ]; - optional float default_float_extension = 71 [default = 51.5 ]; - optional double default_double_extension = 72 [default = 52e3 ]; - optional bool default_bool_extension = 73 [default = true ]; - optional string default_string_extension = 74 [default = "hello"]; - optional bytes default_bytes_extension = 75 [default = "world"]; - - optional TestAllTypes.NestedEnum - default_nested_enum_extension = 81 [default = BAR]; - optional ForeignEnum - default_foreign_enum_extension = 82 [default = FOREIGN_BAR]; - optional protobuf_unittest_import.ImportEnum - default_import_enum_extension = 83 [default = IMPORT_BAR]; - - optional string default_string_piece_extension = 84 [ctype=STRING_PIECE, - default="abc"]; - optional string default_cord_extension = 85 [ctype=CORD, default="123"]; -} - -message TestNestedExtension { - extend TestAllExtensions { - // Check for bug where string extensions declared in tested scope did not - // compile. - optional string test = 1002 [default="test"]; - } -} - -// We have separate messages for testing required fields because it's -// annoying to have to fill in required fields in TestProto in order to -// do anything with it. Note that we don't need to test every type of -// required filed because the code output is basically identical to -// optional fields for all types. -message TestRequired { - required int32 a = 1; - optional int32 dummy2 = 2; - required int32 b = 3; - - extend TestAllExtensions { - optional TestRequired single = 1000; - repeated TestRequired multi = 1001; - } - - // Pad the field count to 32 so that we can test that IsInitialized() - // properly checks multiple elements of has_bits_. - optional int32 dummy4 = 4; - optional int32 dummy5 = 5; - optional int32 dummy6 = 6; - optional int32 dummy7 = 7; - optional int32 dummy8 = 8; - optional int32 dummy9 = 9; - optional int32 dummy10 = 10; - optional int32 dummy11 = 11; - optional int32 dummy12 = 12; - optional int32 dummy13 = 13; - optional int32 dummy14 = 14; - optional int32 dummy15 = 15; - optional int32 dummy16 = 16; - optional int32 dummy17 = 17; - optional int32 dummy18 = 18; - optional int32 dummy19 = 19; - optional int32 dummy20 = 20; - optional int32 dummy21 = 21; - optional int32 dummy22 = 22; - optional int32 dummy23 = 23; - optional int32 dummy24 = 24; - optional int32 dummy25 = 25; - optional int32 dummy26 = 26; - optional int32 dummy27 = 27; - optional int32 dummy28 = 28; - optional int32 dummy29 = 29; - optional int32 dummy30 = 30; - optional int32 dummy31 = 31; - optional int32 dummy32 = 32; - - required int32 c = 33; -} - -message TestRequiredForeign { - optional TestRequired optional_message = 1; - repeated TestRequired repeated_message = 2; - optional int32 dummy = 3; -} - -// Test that we can use NestedMessage from outside TestAllTypes. -message TestForeignNested { - optional TestAllTypes.NestedMessage foreign_nested = 1; -} - -// TestEmptyMessage is used to test unknown field support. -message TestEmptyMessage { -} - -// Like above, but declare all field numbers as potential extensions. No -// actual extensions should ever be defined for this type. -message TestEmptyMessageWithExtensions { - extensions 1 to max; -} - -message TestMultipleExtensionRanges { - extensions 42; - extensions 4143 to 4243; - extensions 65536 to max; -} - -// Test that really large tag numbers don't break anything. -message TestReallyLargeTagNumber { - // The largest possible tag number is 2^28 - 1, since the wire format uses - // three bits to communicate wire type. - optional int32 a = 1; - optional int32 bb = 268435455; -} - -message TestRecursiveMessage { - optional TestRecursiveMessage a = 1; - optional int32 i = 2; -} - -// Test that mutual recursion works. -message TestMutualRecursionA { - optional TestMutualRecursionB bb = 1; -} - -message TestMutualRecursionB { - optional TestMutualRecursionA a = 1; - optional int32 optional_int32 = 2; -} - -// Test that groups have disjoint field numbers from their siblings and -// parents. This is NOT possible in proto1; only proto2. When attempting -// to compile with proto1, this will emit an error; so we only include it -// in protobuf_unittest_proto. -message TestDupFieldNumber { // NO_PROTO1 - optional int32 a = 1; // NO_PROTO1 - optional group Foo = 2 { optional int32 a = 1; } // NO_PROTO1 - optional group Bar = 3 { optional int32 a = 1; } // NO_PROTO1 -} // NO_PROTO1 - - -// Needed for a Python test. -message TestNestedMessageHasBits { - message NestedMessage { - repeated int32 nestedmessage_repeated_int32 = 1; - repeated ForeignMessage nestedmessage_repeated_foreignmessage = 2; - } - optional NestedMessage optional_nested_message = 1; -} - - -// Test an enum that has multiple values with the same number. -enum TestEnumWithDupValue { - FOO1 = 1; - BAR1 = 2; - BAZ = 3; - FOO2 = 1; - BAR2 = 2; -} - -// Test an enum with large, unordered values. -enum TestSparseEnum { - SPARSE_A = 123; - SPARSE_B = 62374; - SPARSE_C = 12589234; - SPARSE_D = -15; - SPARSE_E = -53452; - SPARSE_F = 0; - SPARSE_G = 2; -} - -// Test message with CamelCase field names. This violates Protocol Buffer -// standard style. -message TestCamelCaseFieldNames { - optional int32 PrimitiveField = 1; - optional string StringField = 2; - optional ForeignEnum EnumField = 3; - optional ForeignMessage MessageField = 4; - optional string StringPieceField = 5 [ctype=STRING_PIECE]; - optional string CordField = 6 [ctype=CORD]; - - repeated int32 RepeatedPrimitiveField = 7; - repeated string RepeatedStringField = 8; - repeated ForeignEnum RepeatedEnumField = 9; - repeated ForeignMessage RepeatedMessageField = 10; - repeated string RepeatedStringPieceField = 11 [ctype=STRING_PIECE]; - repeated string RepeatedCordField = 12 [ctype=CORD]; -} - - -// We list fields out of order, to ensure that we're using field number and not -// field index to determine serialization order. -message TestFieldOrderings { - optional string my_string = 11; - extensions 2 to 10; - optional int64 my_int = 1; - extensions 12 to 100; - optional float my_float = 101; -} - - -extend TestFieldOrderings { - optional string my_extension_string = 50; - optional int32 my_extension_int = 5; -} - - -message TestExtremeDefaultValues { - optional bytes escaped_bytes = 1 [default = "\0\001\a\b\f\n\r\t\v\\\'\"\xfe"]; - optional uint32 large_uint32 = 2 [default = 0xFFFFFFFF]; - optional uint64 large_uint64 = 3 [default = 0xFFFFFFFFFFFFFFFF]; - optional int32 small_int32 = 4 [default = -0x7FFFFFFF]; - optional int64 small_int64 = 5 [default = -0x7FFFFFFFFFFFFFFF]; - - // The default value here is UTF-8 for "\u1234". (We could also just type - // the UTF-8 text directly into this text file rather than escape it, but - // lots of people use editors that would be confused by this.) - optional string utf8_string = 6 [default = "\341\210\264"]; - - // Tests for single-precision floating-point values. - optional float zero_float = 7 [default = 0]; - optional float one_float = 8 [default = 1]; - optional float small_float = 9 [default = 1.5]; - optional float negative_one_float = 10 [default = -1]; - optional float negative_float = 11 [default = -1.5]; - // Using exponents - optional float large_float = 12 [default = 2E8]; - optional float small_negative_float = 13 [default = -8e-28]; - - // Text for nonfinite floating-point values. - optional double inf_double = 14 [default = inf]; - optional double neg_inf_double = 15 [default = -inf]; - optional double nan_double = 16 [default = nan]; - optional float inf_float = 17 [default = inf]; - optional float neg_inf_float = 18 [default = -inf]; - optional float nan_float = 19 [default = nan]; - - // Tests for C++ trigraphs. - // Trigraphs should be escaped in C++ generated files, but they should not be - // escaped for other languages. - // Note that in .proto file, "\?" is a valid way to escape ? in string - // literals. - optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"]; -} - -message SparseEnumMessage { - optional TestSparseEnum sparse_enum = 1; -} - -// Test String and Bytes: string is for valid UTF-8 strings -message OneString { - optional string data = 1; -} - -message OneBytes { - optional bytes data = 1; -} - -// Test messages for packed fields - -message TestPackedTypes { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnum packed_enum = 103 [packed = true]; -} - -// A message with the same fields as TestPackedTypes, but without packing. Used -// to test packed <-> unpacked wire compatibility. -message TestUnpackedTypes { - repeated int32 unpacked_int32 = 90 [packed = false]; - repeated int64 unpacked_int64 = 91 [packed = false]; - repeated uint32 unpacked_uint32 = 92 [packed = false]; - repeated uint64 unpacked_uint64 = 93 [packed = false]; - repeated sint32 unpacked_sint32 = 94 [packed = false]; - repeated sint64 unpacked_sint64 = 95 [packed = false]; - repeated fixed32 unpacked_fixed32 = 96 [packed = false]; - repeated fixed64 unpacked_fixed64 = 97 [packed = false]; - repeated sfixed32 unpacked_sfixed32 = 98 [packed = false]; - repeated sfixed64 unpacked_sfixed64 = 99 [packed = false]; - repeated float unpacked_float = 100 [packed = false]; - repeated double unpacked_double = 101 [packed = false]; - repeated bool unpacked_bool = 102 [packed = false]; - repeated ForeignEnum unpacked_enum = 103 [packed = false]; -} - -message TestPackedExtensions { - extensions 1 to max; -} - -extend TestPackedExtensions { - repeated int32 packed_int32_extension = 90 [packed = true]; - repeated int64 packed_int64_extension = 91 [packed = true]; - repeated uint32 packed_uint32_extension = 92 [packed = true]; - repeated uint64 packed_uint64_extension = 93 [packed = true]; - repeated sint32 packed_sint32_extension = 94 [packed = true]; - repeated sint64 packed_sint64_extension = 95 [packed = true]; - repeated fixed32 packed_fixed32_extension = 96 [packed = true]; - repeated fixed64 packed_fixed64_extension = 97 [packed = true]; - repeated sfixed32 packed_sfixed32_extension = 98 [packed = true]; - repeated sfixed64 packed_sfixed64_extension = 99 [packed = true]; - repeated float packed_float_extension = 100 [packed = true]; - repeated double packed_double_extension = 101 [packed = true]; - repeated bool packed_bool_extension = 102 [packed = true]; - repeated ForeignEnum packed_enum_extension = 103 [packed = true]; -} - -// Used by ExtensionSetTest/DynamicExtensions. The test actually builds -// a set of extensions to TestAllExtensions dynamically, based on the fields -// of this message type. -message TestDynamicExtensions { - enum DynamicEnumType { - DYNAMIC_FOO = 2200; - DYNAMIC_BAR = 2201; - DYNAMIC_BAZ = 2202; - } - message DynamicMessageType { - optional int32 dynamic_field = 2100; - } - - optional fixed32 scalar_extension = 2000; - optional ForeignEnum enum_extension = 2001; - optional DynamicEnumType dynamic_enum_extension = 2002; - - optional ForeignMessage message_extension = 2003; - optional DynamicMessageType dynamic_message_extension = 2004; - - repeated string repeated_extension = 2005; - repeated sint32 packed_extension = 2006 [packed = true]; -} - -message TestRepeatedScalarDifferentTagSizes { - // Parsing repeated fixed size values used to fail. This message needs to be - // used in order to get a tag of the right size; all of the repeated fields - // in TestAllTypes didn't trigger the check. - repeated fixed32 repeated_fixed32 = 12; - // Check for a varint type, just for good measure. - repeated int32 repeated_int32 = 13; - - // These have two-byte tags. - repeated fixed64 repeated_fixed64 = 2046; - repeated int64 repeated_int64 = 2047; - - // Three byte tags. - repeated float repeated_float = 262142; - repeated uint64 repeated_uint64 = 262143; -} - - -// Test that RPC services work. -message FooRequest {} -message FooResponse {} - -service TestService { - rpc Foo(FooRequest) returns (FooResponse); - rpc Bar(BarRequest) returns (BarResponse); -} - - -message BarRequest {} -message BarResponse {} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_custom_options.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_custom_options.proto deleted file mode 100644 index a610785f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_custom_options.proto +++ /dev/null @@ -1,366 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: benjy@google.com (Benjy Weinberger) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file used to test the "custom options" feature of proto2. - - -// Some generic_services option(s) added automatically. -// See: http://go/proto2-generic-services-default -option cc_generic_services = true; // auto-added -option java_generic_services = true; // auto-added -option py_generic_services = true; - -// A custom file option (defined below). -option (file_opt1) = 9876543210; - -import "google/protobuf/descriptor.proto"; - -// We don't put this in a package within proto2 because we need to make sure -// that the generated code doesn't depend on being in the proto2 namespace. -package protobuf_unittest; - - -// Some simple test custom options of various types. - -extend google.protobuf.FileOptions { - optional uint64 file_opt1 = 7736974; -} - -extend google.protobuf.MessageOptions { - optional int32 message_opt1 = 7739036; -} - -extend google.protobuf.FieldOptions { - optional fixed64 field_opt1 = 7740936; - // This is useful for testing that we correctly register default values for - // extension options. - optional int32 field_opt2 = 7753913 [default=42]; -} - -extend google.protobuf.EnumOptions { - optional sfixed32 enum_opt1 = 7753576; -} - -extend google.protobuf.EnumValueOptions { - optional int32 enum_value_opt1 = 1560678; -} - -extend google.protobuf.ServiceOptions { - optional sint64 service_opt1 = 7887650; -} - -enum MethodOpt1 { - METHODOPT1_VAL1 = 1; - METHODOPT1_VAL2 = 2; -} - -extend google.protobuf.MethodOptions { - optional MethodOpt1 method_opt1 = 7890860; -} - -// A test message with custom options at all possible locations (and also some -// regular options, to make sure they interact nicely). -message TestMessageWithCustomOptions { - option message_set_wire_format = false; - - option (message_opt1) = -56; - - optional string field1 = 1 [ctype=CORD, - (field_opt1)=8765432109]; - - enum AnEnum { - option (enum_opt1) = -789; - - ANENUM_VAL1 = 1; - ANENUM_VAL2 = 2 [(enum_value_opt1) = 123]; - } -} - - -// A test RPC service with custom options at all possible locations (and also -// some regular options, to make sure they interact nicely). -message CustomOptionFooRequest { -} - -message CustomOptionFooResponse { -} - -service TestServiceWithCustomOptions { - option (service_opt1) = -9876543210; - - rpc Foo(CustomOptionFooRequest) returns (CustomOptionFooResponse) { - option (method_opt1) = METHODOPT1_VAL2; - } -} - - - -// Options of every possible field type, so we can test them all exhaustively. - -message DummyMessageContainingEnum { - enum TestEnumType { - TEST_OPTION_ENUM_TYPE1 = 22; - TEST_OPTION_ENUM_TYPE2 = -23; - } -} - -message DummyMessageInvalidAsOptionType { -} - -extend google.protobuf.MessageOptions { - optional bool bool_opt = 7706090; - optional int32 int32_opt = 7705709; - optional int64 int64_opt = 7705542; - optional uint32 uint32_opt = 7704880; - optional uint64 uint64_opt = 7702367; - optional sint32 sint32_opt = 7701568; - optional sint64 sint64_opt = 7700863; - optional fixed32 fixed32_opt = 7700307; - optional fixed64 fixed64_opt = 7700194; - optional sfixed32 sfixed32_opt = 7698645; - optional sfixed64 sfixed64_opt = 7685475; - optional float float_opt = 7675390; - optional double double_opt = 7673293; - optional string string_opt = 7673285; - optional bytes bytes_opt = 7673238; - optional DummyMessageContainingEnum.TestEnumType enum_opt = 7673233; - optional DummyMessageInvalidAsOptionType message_type_opt = 7665967; -} - -message CustomOptionMinIntegerValues { - option (bool_opt) = false; - option (int32_opt) = -0x80000000; - option (int64_opt) = -0x8000000000000000; - option (uint32_opt) = 0; - option (uint64_opt) = 0; - option (sint32_opt) = -0x80000000; - option (sint64_opt) = -0x8000000000000000; - option (fixed32_opt) = 0; - option (fixed64_opt) = 0; - option (sfixed32_opt) = -0x80000000; - option (sfixed64_opt) = -0x8000000000000000; -} - -message CustomOptionMaxIntegerValues { - option (bool_opt) = true; - option (int32_opt) = 0x7FFFFFFF; - option (int64_opt) = 0x7FFFFFFFFFFFFFFF; - option (uint32_opt) = 0xFFFFFFFF; - option (uint64_opt) = 0xFFFFFFFFFFFFFFFF; - option (sint32_opt) = 0x7FFFFFFF; - option (sint64_opt) = 0x7FFFFFFFFFFFFFFF; - option (fixed32_opt) = 0xFFFFFFFF; - option (fixed64_opt) = 0xFFFFFFFFFFFFFFFF; - option (sfixed32_opt) = 0x7FFFFFFF; - option (sfixed64_opt) = 0x7FFFFFFFFFFFFFFF; -} - -message CustomOptionOtherValues { - option (int32_opt) = -100; // To test sign-extension. - option (float_opt) = 12.3456789; - option (double_opt) = 1.234567890123456789; - option (string_opt) = "Hello, \"World\""; - option (bytes_opt) = "Hello\0World"; - option (enum_opt) = TEST_OPTION_ENUM_TYPE2; -} - -message SettingRealsFromPositiveInts { - option (float_opt) = 12; - option (double_opt) = 154; -} - -message SettingRealsFromNegativeInts { - option (float_opt) = -12; - option (double_opt) = -154; -} - -// Options of complex message types, themselves combined and extended in -// various ways. - -message ComplexOptionType1 { - optional int32 foo = 1; - optional int32 foo2 = 2; - optional int32 foo3 = 3; - - extensions 100 to max; -} - -message ComplexOptionType2 { - optional ComplexOptionType1 bar = 1; - optional int32 baz = 2; - - message ComplexOptionType4 { - optional int32 waldo = 1; - - extend google.protobuf.MessageOptions { - optional ComplexOptionType4 complex_opt4 = 7633546; - } - } - - optional ComplexOptionType4 fred = 3; - - extensions 100 to max; -} - -message ComplexOptionType3 { - optional int32 qux = 1; - - optional group ComplexOptionType5 = 2 { - optional int32 plugh = 3; - } -} - -extend ComplexOptionType1 { - optional int32 quux = 7663707; - optional ComplexOptionType3 corge = 7663442; -} - -extend ComplexOptionType2 { - optional int32 grault = 7650927; - optional ComplexOptionType1 garply = 7649992; -} - -extend google.protobuf.MessageOptions { - optional protobuf_unittest.ComplexOptionType1 complex_opt1 = 7646756; - optional ComplexOptionType2 complex_opt2 = 7636949; - optional ComplexOptionType3 complex_opt3 = 7636463; - optional group ComplexOpt6 = 7595468 { - optional int32 xyzzy = 7593951; - } -} - -// Note that we try various different ways of naming the same extension. -message VariousComplexOptions { - option (.protobuf_unittest.complex_opt1).foo = 42; - option (protobuf_unittest.complex_opt1).(.protobuf_unittest.quux) = 324; - option (.protobuf_unittest.complex_opt1).(protobuf_unittest.corge).qux = 876; - option (complex_opt2).baz = 987; - option (complex_opt2).(grault) = 654; - option (complex_opt2).bar.foo = 743; - option (complex_opt2).bar.(quux) = 1999; - option (complex_opt2).bar.(protobuf_unittest.corge).qux = 2008; - option (complex_opt2).(garply).foo = 741; - option (complex_opt2).(garply).(.protobuf_unittest.quux) = 1998; - option (complex_opt2).(protobuf_unittest.garply).(corge).qux = 2121; - option (ComplexOptionType2.ComplexOptionType4.complex_opt4).waldo = 1971; - option (complex_opt2).fred.waldo = 321; - option (protobuf_unittest.complex_opt3).qux = 9; - option (complex_opt3).complexoptiontype5.plugh = 22; - option (complexopt6).xyzzy = 24; -} - -// ------------------------------------------------------ -// Definitions for testing aggregate option parsing. -// See descriptor_unittest.cc. - -message AggregateMessageSet { - option message_set_wire_format = true; - extensions 4 to max; -} - -message AggregateMessageSetElement { - extend AggregateMessageSet { - optional AggregateMessageSetElement message_set_extension = 15447542; - } - optional string s = 1; -} - -// A helper type used to test aggregate option parsing -message Aggregate { - optional int32 i = 1; - optional string s = 2; - - // A nested object - optional Aggregate sub = 3; - - // To test the parsing of extensions inside aggregate values - optional google.protobuf.FileOptions file = 4; - extend google.protobuf.FileOptions { - optional Aggregate nested = 15476903; - } - - // An embedded message set - optional AggregateMessageSet mset = 5; -} - -// Allow Aggregate to be used as an option at all possible locations -// in the .proto grammer. -extend google.protobuf.FileOptions { optional Aggregate fileopt = 15478479; } -extend google.protobuf.MessageOptions { optional Aggregate msgopt = 15480088; } -extend google.protobuf.FieldOptions { optional Aggregate fieldopt = 15481374; } -extend google.protobuf.EnumOptions { optional Aggregate enumopt = 15483218; } -extend google.protobuf.EnumValueOptions { optional Aggregate enumvalopt = 15486921; } -extend google.protobuf.ServiceOptions { optional Aggregate serviceopt = 15497145; } -extend google.protobuf.MethodOptions { optional Aggregate methodopt = 15512713; } - -// Try using AggregateOption at different points in the proto grammar -option (fileopt) = { - s: 'FileAnnotation' - // Also test the handling of comments - /* of both types */ i: 100 - - sub { s: 'NestedFileAnnotation' } - - // Include a google.protobuf.FileOptions and recursively extend it with - // another fileopt. - file { - [protobuf_unittest.fileopt] { - s:'FileExtensionAnnotation' - } - } - - // A message set inside an option value - mset { - [protobuf_unittest.AggregateMessageSetElement.message_set_extension] { - s: 'EmbeddedMessageSetElement' - } - } -}; - -message AggregateMessage { - option (msgopt) = { i:101 s:'MessageAnnotation' }; - optional int32 fieldname = 1 [(fieldopt) = { s:'FieldAnnotation' }]; -} - -service AggregateService { - option (serviceopt) = { s:'ServiceAnnotation' }; - rpc Method (AggregateMessage) returns (AggregateMessage) { - option (methodopt) = { s:'MethodAnnotation' }; - } -} - -enum AggregateEnum { - option (enumopt) = { s:'EnumAnnotation' }; - VALUE = 1 [(enumvalopt) = { s:'EnumValueAnnotation' }]; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto deleted file mode 100644 index fa176259..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file which imports a proto file that uses optimize_for = CODE_SIZE. - -import "google/protobuf/unittest_optimize_for.proto"; - -package protobuf_unittest; - -// We optimize for speed here, but we are importing a proto that is optimized -// for code size. -option optimize_for = SPEED; - -message TestEmbedOptimizedForSize { - // Test that embedding a message which has optimize_for = CODE_SIZE into - // one optimized for speed works. - optional TestOptimizedForSize optional_message = 1; - repeated TestOptimizedForSize repeated_message = 2; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_empty.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_empty.proto deleted file mode 100644 index ab12d1fb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_empty.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file intentionally left blank. (At one point this wouldn't compile -// correctly.) - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto deleted file mode 100644 index bc0b7c16..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto +++ /dev/null @@ -1,1046 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file that has an extremely large descriptor. Used to test that -// descriptors over 64k don't break the string literal length limit in Java. - - -package google.protobuf; -option java_package = "com.google.protobuf"; - -// Avoid generating insanely long methods. -option optimize_for = CODE_SIZE; - -message TestEnormousDescriptor { - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_1 = 1 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_2 = 2 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_3 = 3 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_4 = 4 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_5 = 5 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_6 = 6 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_7 = 7 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_8 = 8 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_9 = 9 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_10 = 10 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_11 = 11 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_12 = 12 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_13 = 13 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_14 = 14 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_15 = 15 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_16 = 16 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_17 = 17 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_18 = 18 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_19 = 19 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_20 = 20 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_21 = 21 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_22 = 22 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_23 = 23 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_24 = 24 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_25 = 25 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_26 = 26 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_27 = 27 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_28 = 28 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_29 = 29 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_30 = 30 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_31 = 31 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_32 = 32 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_33 = 33 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_34 = 34 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_35 = 35 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_36 = 36 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_37 = 37 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_38 = 38 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_39 = 39 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_40 = 40 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_41 = 41 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_42 = 42 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_43 = 43 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_44 = 44 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_45 = 45 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_46 = 46 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_47 = 47 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_48 = 48 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_49 = 49 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_50 = 50 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_51 = 51 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_52 = 52 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_53 = 53 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_54 = 54 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_55 = 55 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_56 = 56 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_57 = 57 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_58 = 58 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_59 = 59 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_60 = 60 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_61 = 61 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_62 = 62 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_63 = 63 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_64 = 64 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_65 = 65 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_66 = 66 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_67 = 67 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_68 = 68 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_69 = 69 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_70 = 70 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_71 = 71 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_72 = 72 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_73 = 73 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_74 = 74 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_75 = 75 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_76 = 76 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_77 = 77 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_78 = 78 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_79 = 79 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_80 = 80 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_81 = 81 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_82 = 82 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_83 = 83 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_84 = 84 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_85 = 85 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_86 = 86 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_87 = 87 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_88 = 88 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_89 = 89 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_90 = 90 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_91 = 91 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_92 = 92 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_93 = 93 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_94 = 94 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_95 = 95 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_96 = 96 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_97 = 97 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_98 = 98 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_99 = 99 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_100 = 100 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_101 = 101 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_102 = 102 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_103 = 103 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_104 = 104 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_105 = 105 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_106 = 106 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_107 = 107 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_108 = 108 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_109 = 109 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_110 = 110 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_111 = 111 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_112 = 112 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_113 = 113 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_114 = 114 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_115 = 115 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_116 = 116 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_117 = 117 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_118 = 118 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_119 = 119 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_120 = 120 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_121 = 121 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_122 = 122 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_123 = 123 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_124 = 124 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_125 = 125 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_126 = 126 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_127 = 127 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_128 = 128 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_129 = 129 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_130 = 130 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_131 = 131 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_132 = 132 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_133 = 133 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_134 = 134 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_135 = 135 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_136 = 136 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_137 = 137 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_138 = 138 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_139 = 139 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_140 = 140 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_141 = 141 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_142 = 142 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_143 = 143 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_144 = 144 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_145 = 145 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_146 = 146 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_147 = 147 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_148 = 148 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_149 = 149 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_150 = 150 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_151 = 151 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_152 = 152 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_153 = 153 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_154 = 154 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_155 = 155 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_156 = 156 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_157 = 157 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_158 = 158 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_159 = 159 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_160 = 160 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_161 = 161 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_162 = 162 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_163 = 163 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_164 = 164 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_165 = 165 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_166 = 166 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_167 = 167 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_168 = 168 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_169 = 169 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_170 = 170 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_171 = 171 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_172 = 172 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_173 = 173 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_174 = 174 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_175 = 175 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_176 = 176 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_177 = 177 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_178 = 178 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_179 = 179 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_180 = 180 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_181 = 181 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_182 = 182 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_183 = 183 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_184 = 184 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_185 = 185 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_186 = 186 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_187 = 187 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_188 = 188 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_189 = 189 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_190 = 190 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_191 = 191 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_192 = 192 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_193 = 193 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_194 = 194 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_195 = 195 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_196 = 196 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_197 = 197 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_198 = 198 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_199 = 199 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_200 = 200 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_201 = 201 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_202 = 202 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_203 = 203 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_204 = 204 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_205 = 205 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_206 = 206 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_207 = 207 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_208 = 208 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_209 = 209 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_210 = 210 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_211 = 211 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_212 = 212 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_213 = 213 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_214 = 214 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_215 = 215 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_216 = 216 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_217 = 217 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_218 = 218 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_219 = 219 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_220 = 220 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_221 = 221 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_222 = 222 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_223 = 223 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_224 = 224 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_225 = 225 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_226 = 226 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_227 = 227 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_228 = 228 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_229 = 229 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_230 = 230 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_231 = 231 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_232 = 232 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_233 = 233 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_234 = 234 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_235 = 235 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_236 = 236 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_237 = 237 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_238 = 238 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_239 = 239 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_240 = 240 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_241 = 241 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_242 = 242 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_243 = 243 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_244 = 244 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_245 = 245 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_246 = 246 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_247 = 247 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_248 = 248 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_249 = 249 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_250 = 250 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_251 = 251 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_252 = 252 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_253 = 253 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_254 = 254 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_255 = 255 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_256 = 256 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_257 = 257 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_258 = 258 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_259 = 259 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_260 = 260 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_261 = 261 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_262 = 262 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_263 = 263 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_264 = 264 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_265 = 265 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_266 = 266 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_267 = 267 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_268 = 268 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_269 = 269 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_270 = 270 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_271 = 271 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_272 = 272 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_273 = 273 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_274 = 274 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_275 = 275 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_276 = 276 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_277 = 277 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_278 = 278 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_279 = 279 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_280 = 280 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_281 = 281 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_282 = 282 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_283 = 283 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_284 = 284 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_285 = 285 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_286 = 286 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_287 = 287 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_288 = 288 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_289 = 289 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_290 = 290 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_291 = 291 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_292 = 292 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_293 = 293 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_294 = 294 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_295 = 295 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_296 = 296 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_297 = 297 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_298 = 298 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_299 = 299 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_300 = 300 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_301 = 301 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_302 = 302 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_303 = 303 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_304 = 304 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_305 = 305 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_306 = 306 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_307 = 307 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_308 = 308 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_309 = 309 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_310 = 310 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_311 = 311 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_312 = 312 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_313 = 313 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_314 = 314 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_315 = 315 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_316 = 316 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_317 = 317 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_318 = 318 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_319 = 319 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_320 = 320 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_321 = 321 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_322 = 322 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_323 = 323 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_324 = 324 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_325 = 325 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_326 = 326 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_327 = 327 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_328 = 328 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_329 = 329 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_330 = 330 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_331 = 331 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_332 = 332 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_333 = 333 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_334 = 334 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_335 = 335 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_336 = 336 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_337 = 337 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_338 = 338 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_339 = 339 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_340 = 340 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_341 = 341 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_342 = 342 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_343 = 343 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_344 = 344 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_345 = 345 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_346 = 346 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_347 = 347 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_348 = 348 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_349 = 349 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_350 = 350 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_351 = 351 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_352 = 352 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_353 = 353 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_354 = 354 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_355 = 355 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_356 = 356 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_357 = 357 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_358 = 358 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_359 = 359 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_360 = 360 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_361 = 361 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_362 = 362 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_363 = 363 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_364 = 364 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_365 = 365 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_366 = 366 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_367 = 367 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_368 = 368 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_369 = 369 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_370 = 370 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_371 = 371 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_372 = 372 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_373 = 373 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_374 = 374 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_375 = 375 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_376 = 376 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_377 = 377 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_378 = 378 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_379 = 379 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_380 = 380 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_381 = 381 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_382 = 382 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_383 = 383 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_384 = 384 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_385 = 385 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_386 = 386 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_387 = 387 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_388 = 388 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_389 = 389 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_390 = 390 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_391 = 391 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_392 = 392 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_393 = 393 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_394 = 394 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_395 = 395 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_396 = 396 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_397 = 397 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_398 = 398 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_399 = 399 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_400 = 400 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_401 = 401 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_402 = 402 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_403 = 403 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_404 = 404 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_405 = 405 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_406 = 406 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_407 = 407 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_408 = 408 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_409 = 409 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_410 = 410 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_411 = 411 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_412 = 412 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_413 = 413 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_414 = 414 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_415 = 415 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_416 = 416 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_417 = 417 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_418 = 418 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_419 = 419 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_420 = 420 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_421 = 421 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_422 = 422 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_423 = 423 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_424 = 424 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_425 = 425 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_426 = 426 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_427 = 427 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_428 = 428 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_429 = 429 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_430 = 430 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_431 = 431 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_432 = 432 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_433 = 433 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_434 = 434 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_435 = 435 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_436 = 436 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_437 = 437 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_438 = 438 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_439 = 439 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_440 = 440 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_441 = 441 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_442 = 442 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_443 = 443 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_444 = 444 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_445 = 445 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_446 = 446 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_447 = 447 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_448 = 448 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_449 = 449 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_450 = 450 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_451 = 451 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_452 = 452 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_453 = 453 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_454 = 454 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_455 = 455 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_456 = 456 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_457 = 457 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_458 = 458 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_459 = 459 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_460 = 460 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_461 = 461 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_462 = 462 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_463 = 463 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_464 = 464 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_465 = 465 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_466 = 466 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_467 = 467 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_468 = 468 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_469 = 469 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_470 = 470 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_471 = 471 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_472 = 472 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_473 = 473 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_474 = 474 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_475 = 475 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_476 = 476 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_477 = 477 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_478 = 478 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_479 = 479 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_480 = 480 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_481 = 481 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_482 = 482 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_483 = 483 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_484 = 484 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_485 = 485 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_486 = 486 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_487 = 487 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_488 = 488 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_489 = 489 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_490 = 490 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_491 = 491 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_492 = 492 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_493 = 493 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_494 = 494 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_495 = 495 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_496 = 496 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_497 = 497 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_498 = 498 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_499 = 499 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_500 = 500 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_501 = 501 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_502 = 502 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_503 = 503 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_504 = 504 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_505 = 505 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_506 = 506 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_507 = 507 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_508 = 508 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_509 = 509 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_510 = 510 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_511 = 511 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_512 = 512 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_513 = 513 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_514 = 514 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_515 = 515 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_516 = 516 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_517 = 517 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_518 = 518 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_519 = 519 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_520 = 520 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_521 = 521 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_522 = 522 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_523 = 523 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_524 = 524 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_525 = 525 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_526 = 526 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_527 = 527 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_528 = 528 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_529 = 529 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_530 = 530 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_531 = 531 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_532 = 532 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_533 = 533 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_534 = 534 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_535 = 535 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_536 = 536 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_537 = 537 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_538 = 538 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_539 = 539 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_540 = 540 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_541 = 541 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_542 = 542 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_543 = 543 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_544 = 544 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_545 = 545 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_546 = 546 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_547 = 547 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_548 = 548 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_549 = 549 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_550 = 550 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_551 = 551 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_552 = 552 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_553 = 553 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_554 = 554 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_555 = 555 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_556 = 556 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_557 = 557 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_558 = 558 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_559 = 559 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_560 = 560 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_561 = 561 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_562 = 562 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_563 = 563 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_564 = 564 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_565 = 565 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_566 = 566 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_567 = 567 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_568 = 568 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_569 = 569 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_570 = 570 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_571 = 571 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_572 = 572 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_573 = 573 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_574 = 574 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_575 = 575 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_576 = 576 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_577 = 577 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_578 = 578 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_579 = 579 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_580 = 580 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_581 = 581 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_582 = 582 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_583 = 583 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_584 = 584 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_585 = 585 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_586 = 586 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_587 = 587 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_588 = 588 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_589 = 589 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_590 = 590 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_591 = 591 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_592 = 592 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_593 = 593 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_594 = 594 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_595 = 595 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_596 = 596 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_597 = 597 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_598 = 598 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_599 = 599 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_600 = 600 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_601 = 601 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_602 = 602 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_603 = 603 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_604 = 604 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_605 = 605 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_606 = 606 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_607 = 607 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_608 = 608 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_609 = 609 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_610 = 610 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_611 = 611 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_612 = 612 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_613 = 613 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_614 = 614 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_615 = 615 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_616 = 616 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_617 = 617 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_618 = 618 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_619 = 619 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_620 = 620 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_621 = 621 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_622 = 622 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_623 = 623 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_624 = 624 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_625 = 625 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_626 = 626 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_627 = 627 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_628 = 628 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_629 = 629 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_630 = 630 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_631 = 631 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_632 = 632 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_633 = 633 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_634 = 634 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_635 = 635 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_636 = 636 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_637 = 637 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_638 = 638 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_639 = 639 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_640 = 640 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_641 = 641 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_642 = 642 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_643 = 643 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_644 = 644 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_645 = 645 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_646 = 646 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_647 = 647 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_648 = 648 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_649 = 649 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_650 = 650 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_651 = 651 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_652 = 652 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_653 = 653 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_654 = 654 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_655 = 655 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_656 = 656 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_657 = 657 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_658 = 658 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_659 = 659 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_660 = 660 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_661 = 661 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_662 = 662 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_663 = 663 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_664 = 664 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_665 = 665 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_666 = 666 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_667 = 667 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_668 = 668 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_669 = 669 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_670 = 670 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_671 = 671 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_672 = 672 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_673 = 673 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_674 = 674 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_675 = 675 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_676 = 676 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_677 = 677 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_678 = 678 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_679 = 679 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_680 = 680 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_681 = 681 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_682 = 682 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_683 = 683 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_684 = 684 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_685 = 685 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_686 = 686 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_687 = 687 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_688 = 688 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_689 = 689 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_690 = 690 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_691 = 691 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_692 = 692 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_693 = 693 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_694 = 694 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_695 = 695 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_696 = 696 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_697 = 697 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_698 = 698 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_699 = 699 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_700 = 700 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_701 = 701 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_702 = 702 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_703 = 703 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_704 = 704 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_705 = 705 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_706 = 706 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_707 = 707 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_708 = 708 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_709 = 709 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_710 = 710 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_711 = 711 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_712 = 712 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_713 = 713 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_714 = 714 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_715 = 715 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_716 = 716 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_717 = 717 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_718 = 718 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_719 = 719 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_720 = 720 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_721 = 721 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_722 = 722 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_723 = 723 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_724 = 724 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_725 = 725 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_726 = 726 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_727 = 727 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_728 = 728 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_729 = 729 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_730 = 730 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_731 = 731 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_732 = 732 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_733 = 733 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_734 = 734 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_735 = 735 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_736 = 736 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_737 = 737 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_738 = 738 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_739 = 739 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_740 = 740 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_741 = 741 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_742 = 742 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_743 = 743 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_744 = 744 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_745 = 745 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_746 = 746 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_747 = 747 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_748 = 748 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_749 = 749 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_750 = 750 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_751 = 751 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_752 = 752 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_753 = 753 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_754 = 754 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_755 = 755 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_756 = 756 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_757 = 757 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_758 = 758 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_759 = 759 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_760 = 760 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_761 = 761 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_762 = 762 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_763 = 763 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_764 = 764 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_765 = 765 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_766 = 766 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_767 = 767 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_768 = 768 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_769 = 769 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_770 = 770 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_771 = 771 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_772 = 772 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_773 = 773 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_774 = 774 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_775 = 775 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_776 = 776 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_777 = 777 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_778 = 778 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_779 = 779 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_780 = 780 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_781 = 781 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_782 = 782 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_783 = 783 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_784 = 784 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_785 = 785 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_786 = 786 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_787 = 787 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_788 = 788 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_789 = 789 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_790 = 790 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_791 = 791 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_792 = 792 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_793 = 793 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_794 = 794 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_795 = 795 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_796 = 796 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_797 = 797 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_798 = 798 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_799 = 799 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_800 = 800 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_801 = 801 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_802 = 802 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_803 = 803 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_804 = 804 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_805 = 805 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_806 = 806 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_807 = 807 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_808 = 808 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_809 = 809 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_810 = 810 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_811 = 811 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_812 = 812 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_813 = 813 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_814 = 814 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_815 = 815 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_816 = 816 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_817 = 817 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_818 = 818 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_819 = 819 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_820 = 820 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_821 = 821 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_822 = 822 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_823 = 823 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_824 = 824 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_825 = 825 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_826 = 826 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_827 = 827 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_828 = 828 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_829 = 829 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_830 = 830 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_831 = 831 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_832 = 832 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_833 = 833 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_834 = 834 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_835 = 835 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_836 = 836 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_837 = 837 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_838 = 838 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_839 = 839 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_840 = 840 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_841 = 841 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_842 = 842 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_843 = 843 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_844 = 844 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_845 = 845 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_846 = 846 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_847 = 847 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_848 = 848 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_849 = 849 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_850 = 850 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_851 = 851 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_852 = 852 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_853 = 853 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_854 = 854 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_855 = 855 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_856 = 856 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_857 = 857 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_858 = 858 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_859 = 859 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_860 = 860 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_861 = 861 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_862 = 862 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_863 = 863 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_864 = 864 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_865 = 865 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_866 = 866 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_867 = 867 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_868 = 868 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_869 = 869 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_870 = 870 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_871 = 871 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_872 = 872 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_873 = 873 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_874 = 874 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_875 = 875 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_876 = 876 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_877 = 877 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_878 = 878 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_879 = 879 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_880 = 880 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_881 = 881 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_882 = 882 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_883 = 883 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_884 = 884 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_885 = 885 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_886 = 886 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_887 = 887 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_888 = 888 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_889 = 889 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_890 = 890 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_891 = 891 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_892 = 892 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_893 = 893 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_894 = 894 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_895 = 895 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_896 = 896 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_897 = 897 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_898 = 898 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_899 = 899 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_900 = 900 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_901 = 901 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_902 = 902 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_903 = 903 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_904 = 904 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_905 = 905 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_906 = 906 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_907 = 907 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_908 = 908 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_909 = 909 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_910 = 910 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_911 = 911 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_912 = 912 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_913 = 913 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_914 = 914 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_915 = 915 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_916 = 916 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_917 = 917 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_918 = 918 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_919 = 919 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_920 = 920 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_921 = 921 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_922 = 922 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_923 = 923 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_924 = 924 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_925 = 925 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_926 = 926 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_927 = 927 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_928 = 928 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_929 = 929 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_930 = 930 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_931 = 931 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_932 = 932 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_933 = 933 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_934 = 934 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_935 = 935 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_936 = 936 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_937 = 937 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_938 = 938 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_939 = 939 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_940 = 940 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_941 = 941 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_942 = 942 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_943 = 943 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_944 = 944 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_945 = 945 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_946 = 946 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_947 = 947 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_948 = 948 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_949 = 949 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_950 = 950 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_951 = 951 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_952 = 952 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_953 = 953 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_954 = 954 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_955 = 955 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_956 = 956 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_957 = 957 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_958 = 958 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_959 = 959 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_960 = 960 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_961 = 961 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_962 = 962 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_963 = 963 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_964 = 964 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_965 = 965 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_966 = 966 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_967 = 967 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_968 = 968 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_969 = 969 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_970 = 970 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_971 = 971 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_972 = 972 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_973 = 973 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_974 = 974 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_975 = 975 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_976 = 976 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_977 = 977 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_978 = 978 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_979 = 979 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_980 = 980 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_981 = 981 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_982 = 982 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_983 = 983 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_984 = 984 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_985 = 985 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_986 = 986 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_987 = 987 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_988 = 988 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_989 = 989 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_990 = 990 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_991 = 991 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_992 = 992 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_993 = 993 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_994 = 994 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_995 = 995 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_996 = 996 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_997 = 997 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_998 = 998 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_999 = 999 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; - optional string long_field_name_is_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_1000 = 1000 [default="long default value is also loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"]; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import.proto deleted file mode 100644 index cd533ecd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file which is imported by unittest.proto to test importing. - - -// We don't put this in a package within proto2 because we need to make sure -// that the generated code doesn't depend on being in the proto2 namespace. -// In test_util.h we do -// "using namespace unittest_import = protobuf_unittest_import". -package protobuf_unittest_import; - -option optimize_for = SPEED; - -// Excercise the java_package option. -option java_package = "com.google.protobuf.test"; - -// Do not set a java_outer_classname here to verify that Proto2 works without -// one. - -message ImportMessage { - optional int32 d = 1; -} - -enum ImportEnum { - IMPORT_FOO = 7; - IMPORT_BAR = 8; - IMPORT_BAZ = 9; -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import_lite.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import_lite.proto deleted file mode 100644 index ebaab5c0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_import_lite.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// This is like unittest_import.proto but with optimize_for = LITE_RUNTIME. - -package protobuf_unittest_import; - -option optimize_for = LITE_RUNTIME; - -option java_package = "com.google.protobuf"; - -message ImportMessageLite { - optional int32 d = 1; -} - -enum ImportEnumLite { - IMPORT_LITE_FOO = 7; - IMPORT_LITE_BAR = 8; - IMPORT_LITE_BAZ = 9; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite.proto deleted file mode 100644 index cca6b497..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite.proto +++ /dev/null @@ -1,312 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// This is like unittest.proto but with optimize_for = LITE_RUNTIME. - -package protobuf_unittest; - -import "google/protobuf/unittest_import_lite.proto"; - -option optimize_for = LITE_RUNTIME; - -option java_package = "com.google.protobuf"; - -// Same as TestAllTypes but with the lite runtime. -message TestAllTypesLite { - message NestedMessage { - optional int32 bb = 1; - } - - enum NestedEnum { - FOO = 1; - BAR = 2; - BAZ = 3; - } - - // Singular - optional int32 optional_int32 = 1; - optional int64 optional_int64 = 2; - optional uint32 optional_uint32 = 3; - optional uint64 optional_uint64 = 4; - optional sint32 optional_sint32 = 5; - optional sint64 optional_sint64 = 6; - optional fixed32 optional_fixed32 = 7; - optional fixed64 optional_fixed64 = 8; - optional sfixed32 optional_sfixed32 = 9; - optional sfixed64 optional_sfixed64 = 10; - optional float optional_float = 11; - optional double optional_double = 12; - optional bool optional_bool = 13; - optional string optional_string = 14; - optional bytes optional_bytes = 15; - - optional group OptionalGroup = 16 { - optional int32 a = 17; - } - - optional NestedMessage optional_nested_message = 18; - optional ForeignMessageLite optional_foreign_message = 19; - optional protobuf_unittest_import.ImportMessageLite - optional_import_message = 20; - - optional NestedEnum optional_nested_enum = 21; - optional ForeignEnumLite optional_foreign_enum = 22; - optional protobuf_unittest_import.ImportEnumLite optional_import_enum = 23; - - optional string optional_string_piece = 24 [ctype=STRING_PIECE]; - optional string optional_cord = 25 [ctype=CORD]; - - // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; - repeated sfixed32 repeated_sfixed32 = 39; - repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; - - repeated group RepeatedGroup = 46 { - optional int32 a = 47; - } - - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessageLite repeated_foreign_message = 49; - repeated protobuf_unittest_import.ImportMessageLite - repeated_import_message = 50; - - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnumLite repeated_foreign_enum = 52; - repeated protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53; - - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; - - // Singular with defaults - optional int32 default_int32 = 61 [default = 41 ]; - optional int64 default_int64 = 62 [default = 42 ]; - optional uint32 default_uint32 = 63 [default = 43 ]; - optional uint64 default_uint64 = 64 [default = 44 ]; - optional sint32 default_sint32 = 65 [default = -45 ]; - optional sint64 default_sint64 = 66 [default = 46 ]; - optional fixed32 default_fixed32 = 67 [default = 47 ]; - optional fixed64 default_fixed64 = 68 [default = 48 ]; - optional sfixed32 default_sfixed32 = 69 [default = 49 ]; - optional sfixed64 default_sfixed64 = 70 [default = -50 ]; - optional float default_float = 71 [default = 51.5 ]; - optional double default_double = 72 [default = 52e3 ]; - optional bool default_bool = 73 [default = true ]; - optional string default_string = 74 [default = "hello"]; - optional bytes default_bytes = 75 [default = "world"]; - - optional NestedEnum default_nested_enum = 81 [default = BAR]; - optional ForeignEnumLite default_foreign_enum = 82 - [default = FOREIGN_LITE_BAR]; - optional protobuf_unittest_import.ImportEnumLite - default_import_enum = 83 [default = IMPORT_LITE_BAR]; - - optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"]; - optional string default_cord = 85 [ctype=CORD,default="123"]; -} - -message ForeignMessageLite { - optional int32 c = 1; -} - -enum ForeignEnumLite { - FOREIGN_LITE_FOO = 4; - FOREIGN_LITE_BAR = 5; - FOREIGN_LITE_BAZ = 6; -} - -message TestPackedTypesLite { - repeated int32 packed_int32 = 90 [packed = true]; - repeated int64 packed_int64 = 91 [packed = true]; - repeated uint32 packed_uint32 = 92 [packed = true]; - repeated uint64 packed_uint64 = 93 [packed = true]; - repeated sint32 packed_sint32 = 94 [packed = true]; - repeated sint64 packed_sint64 = 95 [packed = true]; - repeated fixed32 packed_fixed32 = 96 [packed = true]; - repeated fixed64 packed_fixed64 = 97 [packed = true]; - repeated sfixed32 packed_sfixed32 = 98 [packed = true]; - repeated sfixed64 packed_sfixed64 = 99 [packed = true]; - repeated float packed_float = 100 [packed = true]; - repeated double packed_double = 101 [packed = true]; - repeated bool packed_bool = 102 [packed = true]; - repeated ForeignEnumLite packed_enum = 103 [packed = true]; -} - -message TestAllExtensionsLite { - extensions 1 to max; -} - -extend TestAllExtensionsLite { - // Singular - optional int32 optional_int32_extension_lite = 1; - optional int64 optional_int64_extension_lite = 2; - optional uint32 optional_uint32_extension_lite = 3; - optional uint64 optional_uint64_extension_lite = 4; - optional sint32 optional_sint32_extension_lite = 5; - optional sint64 optional_sint64_extension_lite = 6; - optional fixed32 optional_fixed32_extension_lite = 7; - optional fixed64 optional_fixed64_extension_lite = 8; - optional sfixed32 optional_sfixed32_extension_lite = 9; - optional sfixed64 optional_sfixed64_extension_lite = 10; - optional float optional_float_extension_lite = 11; - optional double optional_double_extension_lite = 12; - optional bool optional_bool_extension_lite = 13; - optional string optional_string_extension_lite = 14; - optional bytes optional_bytes_extension_lite = 15; - - optional group OptionalGroup_extension_lite = 16 { - optional int32 a = 17; - } - - optional TestAllTypesLite.NestedMessage optional_nested_message_extension_lite - = 18; - optional ForeignMessageLite optional_foreign_message_extension_lite = 19; - optional protobuf_unittest_import.ImportMessageLite - optional_import_message_extension_lite = 20; - - optional TestAllTypesLite.NestedEnum optional_nested_enum_extension_lite = 21; - optional ForeignEnumLite optional_foreign_enum_extension_lite = 22; - optional protobuf_unittest_import.ImportEnumLite - optional_import_enum_extension_lite = 23; - - optional string optional_string_piece_extension_lite = 24 - [ctype=STRING_PIECE]; - optional string optional_cord_extension_lite = 25 [ctype=CORD]; - - // Repeated - repeated int32 repeated_int32_extension_lite = 31; - repeated int64 repeated_int64_extension_lite = 32; - repeated uint32 repeated_uint32_extension_lite = 33; - repeated uint64 repeated_uint64_extension_lite = 34; - repeated sint32 repeated_sint32_extension_lite = 35; - repeated sint64 repeated_sint64_extension_lite = 36; - repeated fixed32 repeated_fixed32_extension_lite = 37; - repeated fixed64 repeated_fixed64_extension_lite = 38; - repeated sfixed32 repeated_sfixed32_extension_lite = 39; - repeated sfixed64 repeated_sfixed64_extension_lite = 40; - repeated float repeated_float_extension_lite = 41; - repeated double repeated_double_extension_lite = 42; - repeated bool repeated_bool_extension_lite = 43; - repeated string repeated_string_extension_lite = 44; - repeated bytes repeated_bytes_extension_lite = 45; - - repeated group RepeatedGroup_extension_lite = 46 { - optional int32 a = 47; - } - - repeated TestAllTypesLite.NestedMessage repeated_nested_message_extension_lite - = 48; - repeated ForeignMessageLite repeated_foreign_message_extension_lite = 49; - repeated protobuf_unittest_import.ImportMessageLite - repeated_import_message_extension_lite = 50; - - repeated TestAllTypesLite.NestedEnum repeated_nested_enum_extension_lite = 51; - repeated ForeignEnumLite repeated_foreign_enum_extension_lite = 52; - repeated protobuf_unittest_import.ImportEnumLite - repeated_import_enum_extension_lite = 53; - - repeated string repeated_string_piece_extension_lite = 54 - [ctype=STRING_PIECE]; - repeated string repeated_cord_extension_lite = 55 [ctype=CORD]; - - // Singular with defaults - optional int32 default_int32_extension_lite = 61 [default = 41 ]; - optional int64 default_int64_extension_lite = 62 [default = 42 ]; - optional uint32 default_uint32_extension_lite = 63 [default = 43 ]; - optional uint64 default_uint64_extension_lite = 64 [default = 44 ]; - optional sint32 default_sint32_extension_lite = 65 [default = -45 ]; - optional sint64 default_sint64_extension_lite = 66 [default = 46 ]; - optional fixed32 default_fixed32_extension_lite = 67 [default = 47 ]; - optional fixed64 default_fixed64_extension_lite = 68 [default = 48 ]; - optional sfixed32 default_sfixed32_extension_lite = 69 [default = 49 ]; - optional sfixed64 default_sfixed64_extension_lite = 70 [default = -50 ]; - optional float default_float_extension_lite = 71 [default = 51.5 ]; - optional double default_double_extension_lite = 72 [default = 52e3 ]; - optional bool default_bool_extension_lite = 73 [default = true ]; - optional string default_string_extension_lite = 74 [default = "hello"]; - optional bytes default_bytes_extension_lite = 75 [default = "world"]; - - optional TestAllTypesLite.NestedEnum - default_nested_enum_extension_lite = 81 [default = BAR]; - optional ForeignEnumLite - default_foreign_enum_extension_lite = 82 [default = FOREIGN_LITE_BAR]; - optional protobuf_unittest_import.ImportEnumLite - default_import_enum_extension_lite = 83 [default = IMPORT_LITE_BAR]; - - optional string default_string_piece_extension_lite = 84 [ctype=STRING_PIECE, - default="abc"]; - optional string default_cord_extension_lite = 85 [ctype=CORD, default="123"]; -} - -message TestPackedExtensionsLite { - extensions 1 to max; -} - -extend TestPackedExtensionsLite { - repeated int32 packed_int32_extension_lite = 90 [packed = true]; - repeated int64 packed_int64_extension_lite = 91 [packed = true]; - repeated uint32 packed_uint32_extension_lite = 92 [packed = true]; - repeated uint64 packed_uint64_extension_lite = 93 [packed = true]; - repeated sint32 packed_sint32_extension_lite = 94 [packed = true]; - repeated sint64 packed_sint64_extension_lite = 95 [packed = true]; - repeated fixed32 packed_fixed32_extension_lite = 96 [packed = true]; - repeated fixed64 packed_fixed64_extension_lite = 97 [packed = true]; - repeated sfixed32 packed_sfixed32_extension_lite = 98 [packed = true]; - repeated sfixed64 packed_sfixed64_extension_lite = 99 [packed = true]; - repeated float packed_float_extension_lite = 100 [packed = true]; - repeated double packed_double_extension_lite = 101 [packed = true]; - repeated bool packed_bool_extension_lite = 102 [packed = true]; - repeated ForeignEnumLite packed_enum_extension_lite = 103 [packed = true]; -} - -message TestNestedExtensionLite { - extend TestAllExtensionsLite { - optional int32 nested_extension = 12345; - } -} - -// Test that deprecated fields work. We only verify that they compile (at one -// point this failed). -message TestDeprecatedLite { - optional int32 deprecated_field = 1 [deprecated = true]; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto deleted file mode 100644 index d52cb8cc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// -// Tests that a "lite" message can import a regular message. - -package protobuf_unittest; - -import "google/protobuf/unittest.proto"; - -option optimize_for = LITE_RUNTIME; - -message TestLiteImportsNonlite { - optional TestAllTypes message = 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_mset.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_mset.proto deleted file mode 100644 index 3497f09f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_mset.proto +++ /dev/null @@ -1,72 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This file contains messages for testing message_set_wire_format. - -package protobuf_unittest; - -option optimize_for = SPEED; - -// A message with message_set_wire_format. -message TestMessageSet { - option message_set_wire_format = true; - extensions 4 to max; -} - -message TestMessageSetContainer { - optional TestMessageSet message_set = 1; -} - -message TestMessageSetExtension1 { - extend TestMessageSet { - optional TestMessageSetExtension1 message_set_extension = 1545008; - } - optional int32 i = 15; -} - -message TestMessageSetExtension2 { - extend TestMessageSet { - optional TestMessageSetExtension2 message_set_extension = 1547769; - } - optional string str = 25; -} - -// MessageSet wire format is equivalent to this. -message RawMessageSet { - repeated group Item = 1 { - required int32 type_id = 2; - required bytes message = 3; - } -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_no_generic_services.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_no_generic_services.proto deleted file mode 100644 index cffb4122..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_no_generic_services.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) - -package google.protobuf.no_generic_services_test; - -// *_generic_services are false by default. - -message TestMessage { - optional int32 a = 1; - extensions 1000 to max; -} - -enum TestEnum { - FOO = 1; -} - -extend TestMessage { - optional int32 test_extension = 1000; -} - -service TestService { - rpc Foo(TestMessage) returns(TestMessage); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_optimize_for.proto b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_optimize_for.proto deleted file mode 100644 index feecbef8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unittest_optimize_for.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// A proto file which uses optimize_for = CODE_SIZE. - -import "google/protobuf/unittest.proto"; - -package protobuf_unittest; - -option optimize_for = CODE_SIZE; - -message TestOptimizedForSize { - optional int32 i = 1; - optional ForeignMessage msg = 19; - - extensions 1000 to max; - - extend TestOptimizedForSize { - optional int32 test_extension = 1234; - optional TestRequiredOptimizedForSize test_extension2 = 1235; - } -} - -message TestRequiredOptimizedForSize { - required int32 x = 1; -} - -message TestOptionalOptimizedForSize { - optional TestRequiredOptimizedForSize o = 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.cc deleted file mode 100644 index e1f8b838..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.cc +++ /dev/null @@ -1,204 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -UnknownFieldSet::UnknownFieldSet() - : fields_(NULL) {} - -UnknownFieldSet::~UnknownFieldSet() { - Clear(); - delete fields_; -} - -void UnknownFieldSet::ClearFallback() { - GOOGLE_DCHECK(fields_ != NULL); - for (int i = 0; i < fields_->size(); i++) { - (*fields_)[i].Delete(); - } - fields_->clear(); -} - -void UnknownFieldSet::MergeFrom(const UnknownFieldSet& other) { - for (int i = 0; i < other.field_count(); i++) { - AddField(other.field(i)); - } -} - -int UnknownFieldSet::SpaceUsedExcludingSelf() const { - if (fields_ == NULL) return 0; - - int total_size = sizeof(*fields_) + sizeof(UnknownField) * fields_->size(); - for (int i = 0; i < fields_->size(); i++) { - const UnknownField& field = (*fields_)[i]; - switch (field.type()) { - case UnknownField::TYPE_LENGTH_DELIMITED: - total_size += sizeof(*field.length_delimited_) + - internal::StringSpaceUsedExcludingSelf(*field.length_delimited_); - break; - case UnknownField::TYPE_GROUP: - total_size += field.group_->SpaceUsed(); - break; - default: - break; - } - } - return total_size; -} - -int UnknownFieldSet::SpaceUsed() const { - return sizeof(*this) + SpaceUsedExcludingSelf(); -} - -void UnknownFieldSet::AddVarint(int number, uint64 value) { - if (fields_ == NULL) fields_ = new vector; - UnknownField field; - field.number_ = number; - field.type_ = UnknownField::TYPE_VARINT; - field.varint_ = value; - fields_->push_back(field); -} - -void UnknownFieldSet::AddFixed32(int number, uint32 value) { - if (fields_ == NULL) fields_ = new vector; - UnknownField field; - field.number_ = number; - field.type_ = UnknownField::TYPE_FIXED32; - field.fixed32_ = value; - fields_->push_back(field); -} - -void UnknownFieldSet::AddFixed64(int number, uint64 value) { - if (fields_ == NULL) fields_ = new vector; - UnknownField field; - field.number_ = number; - field.type_ = UnknownField::TYPE_FIXED64; - field.fixed64_ = value; - fields_->push_back(field); -} - -string* UnknownFieldSet::AddLengthDelimited(int number) { - if (fields_ == NULL) fields_ = new vector; - UnknownField field; - field.number_ = number; - field.type_ = UnknownField::TYPE_LENGTH_DELIMITED; - field.length_delimited_ = new string; - fields_->push_back(field); - return field.length_delimited_; -} - -UnknownFieldSet* UnknownFieldSet::AddGroup(int number) { - if (fields_ == NULL) fields_ = new vector; - UnknownField field; - field.number_ = number; - field.type_ = UnknownField::TYPE_GROUP; - field.group_ = new UnknownFieldSet; - fields_->push_back(field); - return field.group_; -} - -void UnknownFieldSet::AddField(const UnknownField& field) { - if (fields_ == NULL) fields_ = new vector; - fields_->push_back(field); - fields_->back().DeepCopy(); -} - -bool UnknownFieldSet::MergeFromCodedStream(io::CodedInputStream* input) { - - UnknownFieldSet other; - if (internal::WireFormat::SkipMessage(input, &other) && - input->ConsumedEntireMessage()) { - MergeFrom(other); - return true; - } else { - return false; - } -} - -bool UnknownFieldSet::ParseFromCodedStream(io::CodedInputStream* input) { - Clear(); - return MergeFromCodedStream(input); -} - -bool UnknownFieldSet::ParseFromZeroCopyStream(io::ZeroCopyInputStream* input) { - io::CodedInputStream coded_input(input); - return ParseFromCodedStream(&coded_input) && - coded_input.ConsumedEntireMessage(); -} - -bool UnknownFieldSet::ParseFromArray(const void* data, int size) { - io::ArrayInputStream input(data, size); - return ParseFromZeroCopyStream(&input); -} - -void UnknownField::Delete() { - switch (type()) { - case UnknownField::TYPE_LENGTH_DELIMITED: - delete length_delimited_; - break; - case UnknownField::TYPE_GROUP: - delete group_; - break; - default: - break; - } -} - -void UnknownField::DeepCopy() { - switch (type()) { - case UnknownField::TYPE_LENGTH_DELIMITED: - length_delimited_ = new string(*length_delimited_); - break; - case UnknownField::TYPE_GROUP: { - UnknownFieldSet* group = new UnknownFieldSet; - group->MergeFrom(*group_); - group_ = group; - break; - } - default: - break; - } -} - -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.h deleted file mode 100644 index 84c2e2b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set.h +++ /dev/null @@ -1,268 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// Contains classes used to keep track of unrecognized fields seen while -// parsing a protocol message. - -#ifndef GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ -#define GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ - -#include -#include -#include - -namespace google { -namespace protobuf { - -class Message; // message.h -class UnknownField; // below - -// An UnknownFieldSet contains fields that were encountered while parsing a -// message but were not defined by its type. Keeping track of these can be -// useful, especially in that they may be written if the message is serialized -// again without being cleared in between. This means that software which -// simply receives messages and forwards them to other servers does not need -// to be updated every time a new field is added to the message definition. -// -// To get the UnknownFieldSet attached to any message, call -// Reflection::GetUnknownFields(). -// -// This class is necessarily tied to the protocol buffer wire format, unlike -// the Reflection interface which is independent of any serialization scheme. -class LIBPROTOBUF_EXPORT UnknownFieldSet { - public: - UnknownFieldSet(); - ~UnknownFieldSet(); - - // Remove all fields. - inline void Clear(); - - // Is this set empty? - inline bool empty() const; - - // Merge the contents of some other UnknownFieldSet with this one. - void MergeFrom(const UnknownFieldSet& other); - - // Swaps the contents of some other UnknownFieldSet with this one. - inline void Swap(UnknownFieldSet* x); - - // Computes (an estimate of) the total number of bytes currently used for - // storing the unknown fields in memory. Does NOT include - // sizeof(*this) in the calculation. - int SpaceUsedExcludingSelf() const; - - // Version of SpaceUsed() including sizeof(*this). - int SpaceUsed() const; - - // Returns the number of fields present in the UnknownFieldSet. - inline int field_count() const; - // Get a field in the set, where 0 <= index < field_count(). The fields - // appear in the order in which they were added. - inline const UnknownField& field(int index) const; - // Get a mutable pointer to a field in the set, where - // 0 <= index < field_count(). The fields appear in the order in which - // they were added. - inline UnknownField* mutable_field(int index); - - // Adding fields --------------------------------------------------- - - void AddVarint(int number, uint64 value); - void AddFixed32(int number, uint32 value); - void AddFixed64(int number, uint64 value); - void AddLengthDelimited(int number, const string& value); - string* AddLengthDelimited(int number); - UnknownFieldSet* AddGroup(int number); - - // Adds an unknown field from another set. - void AddField(const UnknownField& field); - - // Parsing helpers ------------------------------------------------- - // These work exactly like the similarly-named methods of Message. - - bool MergeFromCodedStream(io::CodedInputStream* input); - bool ParseFromCodedStream(io::CodedInputStream* input); - bool ParseFromZeroCopyStream(io::ZeroCopyInputStream* input); - bool ParseFromArray(const void* data, int size); - inline bool ParseFromString(const string& data) { - return ParseFromArray(data.data(), data.size()); - } - - private: - void ClearFallback(); - - vector* fields_; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UnknownFieldSet); -}; - -// Represents one field in an UnknownFieldSet. -class LIBPROTOBUF_EXPORT UnknownField { - public: - enum Type { - TYPE_VARINT, - TYPE_FIXED32, - TYPE_FIXED64, - TYPE_LENGTH_DELIMITED, - TYPE_GROUP - }; - - // The field's tag number, as seen on the wire. - inline int number() const; - - // The field type. - inline Type type() const; - - // Accessors ------------------------------------------------------- - // Each method works only for UnknownFields of the corresponding type. - - inline uint64 varint() const; - inline uint32 fixed32() const; - inline uint64 fixed64() const; - inline const string& length_delimited() const; - inline const UnknownFieldSet& group() const; - - inline void set_varint(uint64 value); - inline void set_fixed32(uint32 value); - inline void set_fixed64(uint64 value); - inline void set_length_delimited(const string& value); - inline string* mutable_length_delimited(); - inline UnknownFieldSet* mutable_group(); - - private: - friend class UnknownFieldSet; - - // If this UnknownField contains a pointer, delete it. - void Delete(); - - // Make a deep copy of any pointers in this UnknownField. - void DeepCopy(); - - unsigned int number_ : 29; - unsigned int type_ : 3; - union { - uint64 varint_; - uint32 fixed32_; - uint64 fixed64_; - string* length_delimited_; - UnknownFieldSet* group_; - }; -}; - -// =================================================================== -// inline implementations - -inline void UnknownFieldSet::Clear() { - if (fields_ != NULL) { - ClearFallback(); - } -} - -inline bool UnknownFieldSet::empty() const { - return fields_ == NULL || fields_->empty(); -} - -inline void UnknownFieldSet::Swap(UnknownFieldSet* x) { - std::swap(fields_, x->fields_); -} - -inline int UnknownFieldSet::field_count() const { - return (fields_ == NULL) ? 0 : fields_->size(); -} -inline const UnknownField& UnknownFieldSet::field(int index) const { - return (*fields_)[index]; -} -inline UnknownField* UnknownFieldSet::mutable_field(int index) { - return &(*fields_)[index]; -} - -inline void UnknownFieldSet::AddLengthDelimited( - int number, const string& value) { - AddLengthDelimited(number)->assign(value); -} - -inline int UnknownField::number() const { return number_; } -inline UnknownField::Type UnknownField::type() const { - return static_cast(type_); -} - -inline uint64 UnknownField::varint () const { - GOOGLE_DCHECK_EQ(type_, TYPE_VARINT); - return varint_; -} -inline uint32 UnknownField::fixed32() const { - GOOGLE_DCHECK_EQ(type_, TYPE_FIXED32); - return fixed32_; -} -inline uint64 UnknownField::fixed64() const { - GOOGLE_DCHECK_EQ(type_, TYPE_FIXED64); - return fixed64_; -} -inline const string& UnknownField::length_delimited() const { - GOOGLE_DCHECK_EQ(type_, TYPE_LENGTH_DELIMITED); - return *length_delimited_; -} -inline const UnknownFieldSet& UnknownField::group() const { - GOOGLE_DCHECK_EQ(type_, TYPE_GROUP); - return *group_; -} - -inline void UnknownField::set_varint(uint64 value) { - GOOGLE_DCHECK_EQ(type_, TYPE_VARINT); - varint_ = value; -} -inline void UnknownField::set_fixed32(uint32 value) { - GOOGLE_DCHECK_EQ(type_, TYPE_FIXED32); - fixed32_ = value; -} -inline void UnknownField::set_fixed64(uint64 value) { - GOOGLE_DCHECK_EQ(type_, TYPE_FIXED64); - fixed64_ = value; -} -inline void UnknownField::set_length_delimited(const string& value) { - GOOGLE_DCHECK_EQ(type_, TYPE_LENGTH_DELIMITED); - length_delimited_->assign(value); -} -inline string* UnknownField::mutable_length_delimited() { - GOOGLE_DCHECK_EQ(type_, TYPE_LENGTH_DELIMITED); - return length_delimited_; -} -inline UnknownFieldSet* UnknownField::mutable_group() { - GOOGLE_DCHECK_EQ(type_, TYPE_GROUP); - return group_; -} - -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_UNKNOWN_FIELD_SET_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set_unittest.cc deleted file mode 100644 index 1235c9ee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/unknown_field_set_unittest.cc +++ /dev/null @@ -1,512 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This test is testing a lot more than just the UnknownFieldSet class. It -// tests handling of unknown fields throughout the system. - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { - -using internal::WireFormat; - -namespace { - -class UnknownFieldSetTest : public testing::Test { - protected: - virtual void SetUp() { - descriptor_ = unittest::TestAllTypes::descriptor(); - TestUtil::SetAllFields(&all_fields_); - all_fields_.SerializeToString(&all_fields_data_); - ASSERT_TRUE(empty_message_.ParseFromString(all_fields_data_)); - unknown_fields_ = empty_message_.mutable_unknown_fields(); - } - - const UnknownField* GetField(const string& name) { - const FieldDescriptor* field = descriptor_->FindFieldByName(name); - if (field == NULL) return NULL; - for (int i = 0; i < unknown_fields_->field_count(); i++) { - if (unknown_fields_->field(i).number() == field->number()) { - return &unknown_fields_->field(i); - } - } - return NULL; - } - - // Constructs a protocol buffer which contains fields with all the same - // numbers as all_fields_data_ except that each field is some other wire - // type. - string GetBizarroData() { - unittest::TestEmptyMessage bizarro_message; - UnknownFieldSet* bizarro_unknown_fields = - bizarro_message.mutable_unknown_fields(); - for (int i = 0; i < unknown_fields_->field_count(); i++) { - const UnknownField& unknown_field = unknown_fields_->field(i); - if (unknown_field.type() == UnknownField::TYPE_VARINT) { - bizarro_unknown_fields->AddFixed32(unknown_field.number(), 1); - } else { - bizarro_unknown_fields->AddVarint(unknown_field.number(), 1); - } - } - - string data; - EXPECT_TRUE(bizarro_message.SerializeToString(&data)); - return data; - } - - const Descriptor* descriptor_; - unittest::TestAllTypes all_fields_; - string all_fields_data_; - - // An empty message that has been parsed from all_fields_data_. So, it has - // unknown fields of every type. - unittest::TestEmptyMessage empty_message_; - UnknownFieldSet* unknown_fields_; -}; - -TEST_F(UnknownFieldSetTest, AllFieldsPresent) { - // All fields of TestAllTypes should be present, in numeric order (because - // that's the order we parsed them in). Fields that are not valid field - // numbers of TestAllTypes should NOT be present. - - int pos = 0; - - for (int i = 0; i < 1000; i++) { - const FieldDescriptor* field = descriptor_->FindFieldByNumber(i); - if (field != NULL) { - ASSERT_LT(pos, unknown_fields_->field_count()); - EXPECT_EQ(i, unknown_fields_->field(pos++).number()); - if (field->is_repeated()) { - // Should have a second instance. - ASSERT_LT(pos, unknown_fields_->field_count()); - EXPECT_EQ(i, unknown_fields_->field(pos++).number()); - } - } - } - EXPECT_EQ(unknown_fields_->field_count(), pos); -} - -TEST_F(UnknownFieldSetTest, Varint) { - const UnknownField* field = GetField("optional_int32"); - ASSERT_TRUE(field != NULL); - - ASSERT_EQ(UnknownField::TYPE_VARINT, field->type()); - EXPECT_EQ(all_fields_.optional_int32(), field->varint()); -} - -TEST_F(UnknownFieldSetTest, Fixed32) { - const UnknownField* field = GetField("optional_fixed32"); - ASSERT_TRUE(field != NULL); - - ASSERT_EQ(UnknownField::TYPE_FIXED32, field->type()); - EXPECT_EQ(all_fields_.optional_fixed32(), field->fixed32()); -} - -TEST_F(UnknownFieldSetTest, Fixed64) { - const UnknownField* field = GetField("optional_fixed64"); - ASSERT_TRUE(field != NULL); - - ASSERT_EQ(UnknownField::TYPE_FIXED64, field->type()); - EXPECT_EQ(all_fields_.optional_fixed64(), field->fixed64()); -} - -TEST_F(UnknownFieldSetTest, LengthDelimited) { - const UnknownField* field = GetField("optional_string"); - ASSERT_TRUE(field != NULL); - - ASSERT_EQ(UnknownField::TYPE_LENGTH_DELIMITED, field->type()); - EXPECT_EQ(all_fields_.optional_string(), field->length_delimited()); -} - -TEST_F(UnknownFieldSetTest, Group) { - const UnknownField* field = GetField("optionalgroup"); - ASSERT_TRUE(field != NULL); - - ASSERT_EQ(UnknownField::TYPE_GROUP, field->type()); - ASSERT_EQ(1, field->group().field_count()); - - const UnknownField& nested_field = field->group().field(0); - const FieldDescriptor* nested_field_descriptor = - unittest::TestAllTypes::OptionalGroup::descriptor()->FindFieldByName("a"); - ASSERT_TRUE(nested_field_descriptor != NULL); - - EXPECT_EQ(nested_field_descriptor->number(), nested_field.number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, nested_field.type()); - EXPECT_EQ(all_fields_.optionalgroup().a(), nested_field.varint()); -} - -TEST_F(UnknownFieldSetTest, SerializeFastAndSlowAreEquivalent) { - int size = WireFormat::ComputeUnknownFieldsSize( - empty_message_.unknown_fields()); - string slow_buffer; - string fast_buffer; - slow_buffer.resize(size); - fast_buffer.resize(size); - - uint8* target = reinterpret_cast(string_as_array(&fast_buffer)); - uint8* result = WireFormat::SerializeUnknownFieldsToArray( - empty_message_.unknown_fields(), target); - EXPECT_EQ(size, result - target); - - { - io::ArrayOutputStream raw_stream(string_as_array(&slow_buffer), size, 1); - io::CodedOutputStream output_stream(&raw_stream); - WireFormat::SerializeUnknownFields(empty_message_.unknown_fields(), - &output_stream); - ASSERT_FALSE(output_stream.HadError()); - } - EXPECT_TRUE(fast_buffer == slow_buffer); -} - -TEST_F(UnknownFieldSetTest, Serialize) { - // Check that serializing the UnknownFieldSet produces the original data - // again. - - string data; - empty_message_.SerializeToString(&data); - - // Don't use EXPECT_EQ because we don't want to dump raw binary data to - // stdout. - EXPECT_TRUE(data == all_fields_data_); -} - -TEST_F(UnknownFieldSetTest, ParseViaReflection) { - // Make sure fields are properly parsed to the UnknownFieldSet when parsing - // via reflection. - - unittest::TestEmptyMessage message; - io::ArrayInputStream raw_input(all_fields_data_.data(), - all_fields_data_.size()); - io::CodedInputStream input(&raw_input); - ASSERT_TRUE(WireFormat::ParseAndMergePartial(&input, &message)); - - EXPECT_EQ(message.DebugString(), empty_message_.DebugString()); -} - -TEST_F(UnknownFieldSetTest, SerializeViaReflection) { - // Make sure fields are properly written from the UnknownFieldSet when - // serializing via reflection. - - string data; - - { - io::StringOutputStream raw_output(&data); - io::CodedOutputStream output(&raw_output); - int size = WireFormat::ByteSize(empty_message_); - WireFormat::SerializeWithCachedSizes(empty_message_, size, &output); - ASSERT_FALSE(output.HadError()); - } - - // Don't use EXPECT_EQ because we don't want to dump raw binary data to - // stdout. - EXPECT_TRUE(data == all_fields_data_); -} - -TEST_F(UnknownFieldSetTest, CopyFrom) { - unittest::TestEmptyMessage message; - - message.CopyFrom(empty_message_); - - EXPECT_EQ(empty_message_.DebugString(), message.DebugString()); -} - -TEST_F(UnknownFieldSetTest, Swap) { - unittest::TestEmptyMessage other_message; - ASSERT_TRUE(other_message.ParseFromString(GetBizarroData())); - - EXPECT_GT(empty_message_.unknown_fields().field_count(), 0); - EXPECT_GT(other_message.unknown_fields().field_count(), 0); - const string debug_string = empty_message_.DebugString(); - const string other_debug_string = other_message.DebugString(); - EXPECT_NE(debug_string, other_debug_string); - - empty_message_.Swap(&other_message); - EXPECT_EQ(debug_string, other_message.DebugString()); - EXPECT_EQ(other_debug_string, empty_message_.DebugString()); -} - -TEST_F(UnknownFieldSetTest, SwapWithSelf) { - const string debug_string = empty_message_.DebugString(); - EXPECT_GT(empty_message_.unknown_fields().field_count(), 0); - - empty_message_.Swap(&empty_message_); - EXPECT_GT(empty_message_.unknown_fields().field_count(), 0); - EXPECT_EQ(debug_string, empty_message_.DebugString()); -} - -TEST_F(UnknownFieldSetTest, MergeFrom) { - unittest::TestEmptyMessage source, destination; - - destination.mutable_unknown_fields()->AddVarint(1, 1); - destination.mutable_unknown_fields()->AddVarint(3, 2); - source.mutable_unknown_fields()->AddVarint(2, 3); - source.mutable_unknown_fields()->AddVarint(3, 4); - - destination.MergeFrom(source); - - EXPECT_EQ( - // Note: The ordering of fields here depends on the ordering of adds - // and merging, above. - "1: 1\n" - "3: 2\n" - "2: 3\n" - "3: 4\n", - destination.DebugString()); -} - -TEST_F(UnknownFieldSetTest, Clear) { - // Clear the set. - empty_message_.Clear(); - EXPECT_EQ(0, unknown_fields_->field_count()); -} - -TEST_F(UnknownFieldSetTest, ParseKnownAndUnknown) { - // Test mixing known and unknown fields when parsing. - - unittest::TestEmptyMessage source; - source.mutable_unknown_fields()->AddVarint(123456, 654321); - string data; - ASSERT_TRUE(source.SerializeToString(&data)); - - unittest::TestAllTypes destination; - ASSERT_TRUE(destination.ParseFromString(all_fields_data_ + data)); - - TestUtil::ExpectAllFieldsSet(destination); - ASSERT_EQ(1, destination.unknown_fields().field_count()); - ASSERT_EQ(UnknownField::TYPE_VARINT, - destination.unknown_fields().field(0).type()); - EXPECT_EQ(654321, destination.unknown_fields().field(0).varint()); -} - -TEST_F(UnknownFieldSetTest, WrongTypeTreatedAsUnknown) { - // Test that fields of the wrong wire type are treated like unknown fields - // when parsing. - - unittest::TestAllTypes all_types_message; - unittest::TestEmptyMessage empty_message; - string bizarro_data = GetBizarroData(); - ASSERT_TRUE(all_types_message.ParseFromString(bizarro_data)); - ASSERT_TRUE(empty_message.ParseFromString(bizarro_data)); - - // All fields should have been interpreted as unknown, so the debug strings - // should be the same. - EXPECT_EQ(empty_message.DebugString(), all_types_message.DebugString()); -} - -TEST_F(UnknownFieldSetTest, WrongTypeTreatedAsUnknownViaReflection) { - // Same as WrongTypeTreatedAsUnknown but via the reflection interface. - - unittest::TestAllTypes all_types_message; - unittest::TestEmptyMessage empty_message; - string bizarro_data = GetBizarroData(); - io::ArrayInputStream raw_input(bizarro_data.data(), bizarro_data.size()); - io::CodedInputStream input(&raw_input); - ASSERT_TRUE(WireFormat::ParseAndMergePartial(&input, &all_types_message)); - ASSERT_TRUE(empty_message.ParseFromString(bizarro_data)); - - EXPECT_EQ(empty_message.DebugString(), all_types_message.DebugString()); -} - -TEST_F(UnknownFieldSetTest, UnknownExtensions) { - // Make sure fields are properly parsed to the UnknownFieldSet even when - // they are declared as extension numbers. - - unittest::TestEmptyMessageWithExtensions message; - ASSERT_TRUE(message.ParseFromString(all_fields_data_)); - - EXPECT_EQ(message.DebugString(), empty_message_.DebugString()); -} - -TEST_F(UnknownFieldSetTest, UnknownExtensionsReflection) { - // Same as UnknownExtensions except parsing via reflection. - - unittest::TestEmptyMessageWithExtensions message; - io::ArrayInputStream raw_input(all_fields_data_.data(), - all_fields_data_.size()); - io::CodedInputStream input(&raw_input); - ASSERT_TRUE(WireFormat::ParseAndMergePartial(&input, &message)); - - EXPECT_EQ(message.DebugString(), empty_message_.DebugString()); -} - -TEST_F(UnknownFieldSetTest, WrongExtensionTypeTreatedAsUnknown) { - // Test that fields of the wrong wire type are treated like unknown fields - // when parsing extensions. - - unittest::TestAllExtensions all_extensions_message; - unittest::TestEmptyMessage empty_message; - string bizarro_data = GetBizarroData(); - ASSERT_TRUE(all_extensions_message.ParseFromString(bizarro_data)); - ASSERT_TRUE(empty_message.ParseFromString(bizarro_data)); - - // All fields should have been interpreted as unknown, so the debug strings - // should be the same. - EXPECT_EQ(empty_message.DebugString(), all_extensions_message.DebugString()); -} - -TEST_F(UnknownFieldSetTest, UnknownEnumValue) { - using unittest::TestAllTypes; - using unittest::TestAllExtensions; - using unittest::TestEmptyMessage; - - const FieldDescriptor* singular_field = - TestAllTypes::descriptor()->FindFieldByName("optional_nested_enum"); - const FieldDescriptor* repeated_field = - TestAllTypes::descriptor()->FindFieldByName("repeated_nested_enum"); - ASSERT_TRUE(singular_field != NULL); - ASSERT_TRUE(repeated_field != NULL); - - string data; - - { - TestEmptyMessage empty_message; - UnknownFieldSet* unknown_fields = empty_message.mutable_unknown_fields(); - unknown_fields->AddVarint(singular_field->number(), TestAllTypes::BAR); - unknown_fields->AddVarint(singular_field->number(), 5); // not valid - unknown_fields->AddVarint(repeated_field->number(), TestAllTypes::FOO); - unknown_fields->AddVarint(repeated_field->number(), 4); // not valid - unknown_fields->AddVarint(repeated_field->number(), TestAllTypes::BAZ); - unknown_fields->AddVarint(repeated_field->number(), 6); // not valid - empty_message.SerializeToString(&data); - } - - { - TestAllTypes message; - ASSERT_TRUE(message.ParseFromString(data)); - EXPECT_EQ(TestAllTypes::BAR, message.optional_nested_enum()); - ASSERT_EQ(2, message.repeated_nested_enum_size()); - EXPECT_EQ(TestAllTypes::FOO, message.repeated_nested_enum(0)); - EXPECT_EQ(TestAllTypes::BAZ, message.repeated_nested_enum(1)); - - const UnknownFieldSet& unknown_fields = message.unknown_fields(); - ASSERT_EQ(3, unknown_fields.field_count()); - - EXPECT_EQ(singular_field->number(), unknown_fields.field(0).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(0).type()); - EXPECT_EQ(5, unknown_fields.field(0).varint()); - - EXPECT_EQ(repeated_field->number(), unknown_fields.field(1).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(1).type()); - EXPECT_EQ(4, unknown_fields.field(1).varint()); - - EXPECT_EQ(repeated_field->number(), unknown_fields.field(2).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(2).type()); - EXPECT_EQ(6, unknown_fields.field(2).varint()); - } - - { - using unittest::optional_nested_enum_extension; - using unittest::repeated_nested_enum_extension; - - TestAllExtensions message; - ASSERT_TRUE(message.ParseFromString(data)); - EXPECT_EQ(TestAllTypes::BAR, - message.GetExtension(optional_nested_enum_extension)); - ASSERT_EQ(2, message.ExtensionSize(repeated_nested_enum_extension)); - EXPECT_EQ(TestAllTypes::FOO, - message.GetExtension(repeated_nested_enum_extension, 0)); - EXPECT_EQ(TestAllTypes::BAZ, - message.GetExtension(repeated_nested_enum_extension, 1)); - - const UnknownFieldSet& unknown_fields = message.unknown_fields(); - ASSERT_EQ(3, unknown_fields.field_count()); - - EXPECT_EQ(singular_field->number(), unknown_fields.field(0).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(0).type()); - EXPECT_EQ(5, unknown_fields.field(0).varint()); - - EXPECT_EQ(repeated_field->number(), unknown_fields.field(1).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(1).type()); - EXPECT_EQ(4, unknown_fields.field(1).varint()); - - EXPECT_EQ(repeated_field->number(), unknown_fields.field(2).number()); - ASSERT_EQ(UnknownField::TYPE_VARINT, unknown_fields.field(2).type()); - EXPECT_EQ(6, unknown_fields.field(2).varint()); - } -} - -TEST_F(UnknownFieldSetTest, SpaceUsed) { - unittest::TestEmptyMessage empty_message; - - // Make sure an unknown field set has zero space used until a field is - // actually added. - int base_size = empty_message.SpaceUsed(); - UnknownFieldSet* unknown_fields = empty_message.mutable_unknown_fields(); - EXPECT_EQ(base_size, empty_message.SpaceUsed()); - - // Make sure each thing we add to the set increases the SpaceUsed(). - unknown_fields->AddVarint(1, 0); - EXPECT_LT(base_size, empty_message.SpaceUsed()); - base_size = empty_message.SpaceUsed(); - - string* str = unknown_fields->AddLengthDelimited(1); - EXPECT_LT(base_size, empty_message.SpaceUsed()); - base_size = empty_message.SpaceUsed(); - - str->assign(sizeof(string) + 1, 'x'); - EXPECT_LT(base_size, empty_message.SpaceUsed()); - base_size = empty_message.SpaceUsed(); - - UnknownFieldSet* group = unknown_fields->AddGroup(1); - EXPECT_LT(base_size, empty_message.SpaceUsed()); - base_size = empty_message.SpaceUsed(); - - group->AddVarint(1, 0); - EXPECT_LT(base_size, empty_message.SpaceUsed()); -} - -TEST_F(UnknownFieldSetTest, Empty) { - UnknownFieldSet unknown_fields; - EXPECT_TRUE(unknown_fields.empty()); - unknown_fields.AddVarint(6, 123); - EXPECT_FALSE(unknown_fields.empty()); - unknown_fields.Clear(); - EXPECT_TRUE(unknown_fields.empty()); -} - -} // namespace -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.cc deleted file mode 100644 index 831a5794..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.cc +++ /dev/null @@ -1,1069 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace internal { - -using internal::WireFormatLite; - -namespace { - -// This function turns out to be convenient when using some macros later. -inline int GetEnumNumber(const EnumValueDescriptor* descriptor) { - return descriptor->number(); -} - -} // anonymous namespace - -// =================================================================== - -bool UnknownFieldSetFieldSkipper::SkipField( - io::CodedInputStream* input, uint32 tag) { - return WireFormat::SkipField(input, tag, unknown_fields_); -} - -bool UnknownFieldSetFieldSkipper::SkipMessage(io::CodedInputStream* input) { - return WireFormat::SkipMessage(input, unknown_fields_); -} - -void UnknownFieldSetFieldSkipper::SkipUnknownEnum( - int field_number, int value) { - unknown_fields_->AddVarint(field_number, value); -} - -bool WireFormat::SkipField(io::CodedInputStream* input, uint32 tag, - UnknownFieldSet* unknown_fields) { - int number = WireFormatLite::GetTagFieldNumber(tag); - - switch (WireFormatLite::GetTagWireType(tag)) { - case WireFormatLite::WIRETYPE_VARINT: { - uint64 value; - if (!input->ReadVarint64(&value)) return false; - if (unknown_fields != NULL) unknown_fields->AddVarint(number, value); - return true; - } - case WireFormatLite::WIRETYPE_FIXED64: { - uint64 value; - if (!input->ReadLittleEndian64(&value)) return false; - if (unknown_fields != NULL) unknown_fields->AddFixed64(number, value); - return true; - } - case WireFormatLite::WIRETYPE_LENGTH_DELIMITED: { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (unknown_fields == NULL) { - if (!input->Skip(length)) return false; - } else { - if (!input->ReadString(unknown_fields->AddLengthDelimited(number), - length)) { - return false; - } - } - return true; - } - case WireFormatLite::WIRETYPE_START_GROUP: { - if (!input->IncrementRecursionDepth()) return false; - if (!SkipMessage(input, (unknown_fields == NULL) ? - NULL : unknown_fields->AddGroup(number))) { - return false; - } - input->DecrementRecursionDepth(); - // Check that the ending tag matched the starting tag. - if (!input->LastTagWas(WireFormatLite::MakeTag( - WireFormatLite::GetTagFieldNumber(tag), - WireFormatLite::WIRETYPE_END_GROUP))) { - return false; - } - return true; - } - case WireFormatLite::WIRETYPE_END_GROUP: { - return false; - } - case WireFormatLite::WIRETYPE_FIXED32: { - uint32 value; - if (!input->ReadLittleEndian32(&value)) return false; - if (unknown_fields != NULL) unknown_fields->AddFixed32(number, value); - return true; - } - default: { - return false; - } - } -} - -bool WireFormat::SkipMessage(io::CodedInputStream* input, - UnknownFieldSet* unknown_fields) { - while(true) { - uint32 tag = input->ReadTag(); - if (tag == 0) { - // End of input. This is a valid place to end, so return true. - return true; - } - - WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag); - - if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) { - // Must be the end of the message. - return true; - } - - if (!SkipField(input, tag, unknown_fields)) return false; - } -} - -void WireFormat::SerializeUnknownFields(const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - switch (field.type()) { - case UnknownField::TYPE_VARINT: - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_VARINT)); - output->WriteVarint64(field.varint()); - break; - case UnknownField::TYPE_FIXED32: - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_FIXED32)); - output->WriteLittleEndian32(field.fixed32()); - break; - case UnknownField::TYPE_FIXED64: - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_FIXED64)); - output->WriteLittleEndian64(field.fixed64()); - break; - case UnknownField::TYPE_LENGTH_DELIMITED: - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); - output->WriteVarint32(field.length_delimited().size()); - output->WriteString(field.length_delimited()); - break; - case UnknownField::TYPE_GROUP: - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_START_GROUP)); - SerializeUnknownFields(field.group(), output); - output->WriteVarint32(WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_END_GROUP)); - break; - } - } -} - -uint8* WireFormat::SerializeUnknownFieldsToArray( - const UnknownFieldSet& unknown_fields, - uint8* target) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - - switch (field.type()) { - case UnknownField::TYPE_VARINT: - target = WireFormatLite::WriteInt64ToArray( - field.number(), field.varint(), target); - break; - case UnknownField::TYPE_FIXED32: - target = WireFormatLite::WriteFixed32ToArray( - field.number(), field.fixed32(), target); - break; - case UnknownField::TYPE_FIXED64: - target = WireFormatLite::WriteFixed64ToArray( - field.number(), field.fixed64(), target); - break; - case UnknownField::TYPE_LENGTH_DELIMITED: - target = WireFormatLite::WriteBytesToArray( - field.number(), field.length_delimited(), target); - break; - case UnknownField::TYPE_GROUP: - target = WireFormatLite::WriteTagToArray( - field.number(), WireFormatLite::WIRETYPE_START_GROUP, target); - target = SerializeUnknownFieldsToArray(field.group(), target); - target = WireFormatLite::WriteTagToArray( - field.number(), WireFormatLite::WIRETYPE_END_GROUP, target); - break; - } - } - return target; -} - -void WireFormat::SerializeUnknownMessageSetItems( - const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - // The only unknown fields that are allowed to exist in a MessageSet are - // messages, which are length-delimited. - if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { - const string& data = field.length_delimited(); - - // Start group. - output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); - - // Write type ID. - output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); - output->WriteVarint32(field.number()); - - // Write message. - output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); - output->WriteVarint32(data.size()); - output->WriteString(data); - - // End group. - output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); - } - } -} - -uint8* WireFormat::SerializeUnknownMessageSetItemsToArray( - const UnknownFieldSet& unknown_fields, - uint8* target) { - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - - // The only unknown fields that are allowed to exist in a MessageSet are - // messages, which are length-delimited. - if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { - const string& data = field.length_delimited(); - - // Start group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemStartTag, target); - - // Write type ID. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetTypeIdTag, target); - target = io::CodedOutputStream::WriteVarint32ToArray( - field.number(), target); - - // Write message. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetMessageTag, target); - target = io::CodedOutputStream::WriteVarint32ToArray(data.size(), target); - target = io::CodedOutputStream::WriteStringToArray(data, target); - - // End group. - target = io::CodedOutputStream::WriteTagToArray( - WireFormatLite::kMessageSetItemEndTag, target); - } - } - - return target; -} - -int WireFormat::ComputeUnknownFieldsSize( - const UnknownFieldSet& unknown_fields) { - int size = 0; - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - - switch (field.type()) { - case UnknownField::TYPE_VARINT: - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_VARINT)); - size += io::CodedOutputStream::VarintSize64(field.varint()); - break; - case UnknownField::TYPE_FIXED32: - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_FIXED32)); - size += sizeof(int32); - break; - case UnknownField::TYPE_FIXED64: - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_FIXED64)); - size += sizeof(int64); - break; - case UnknownField::TYPE_LENGTH_DELIMITED: - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED)); - size += io::CodedOutputStream::VarintSize32( - field.length_delimited().size()); - size += field.length_delimited().size(); - break; - case UnknownField::TYPE_GROUP: - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_START_GROUP)); - size += ComputeUnknownFieldsSize(field.group()); - size += io::CodedOutputStream::VarintSize32( - WireFormatLite::MakeTag(field.number(), - WireFormatLite::WIRETYPE_END_GROUP)); - break; - } - } - - return size; -} - -int WireFormat::ComputeUnknownMessageSetItemsSize( - const UnknownFieldSet& unknown_fields) { - int size = 0; - for (int i = 0; i < unknown_fields.field_count(); i++) { - const UnknownField& field = unknown_fields.field(i); - - // The only unknown fields that are allowed to exist in a MessageSet are - // messages, which are length-delimited. - if (field.type() == UnknownField::TYPE_LENGTH_DELIMITED) { - size += WireFormatLite::kMessageSetItemTagsSize; - size += io::CodedOutputStream::VarintSize32(field.number()); - size += io::CodedOutputStream::VarintSize32( - field.length_delimited().size()); - size += field.length_delimited().size(); - } - } - - return size; -} - -// =================================================================== - -bool WireFormat::ParseAndMergePartial(io::CodedInputStream* input, - Message* message) { - const Descriptor* descriptor = message->GetDescriptor(); - const Reflection* message_reflection = message->GetReflection(); - - while(true) { - uint32 tag = input->ReadTag(); - if (tag == 0) { - // End of input. This is a valid place to end, so return true. - return true; - } - - if (WireFormatLite::GetTagWireType(tag) == - WireFormatLite::WIRETYPE_END_GROUP) { - // Must be the end of the message. - return true; - } - - const FieldDescriptor* field = NULL; - - if (descriptor != NULL) { - int field_number = WireFormatLite::GetTagFieldNumber(tag); - field = descriptor->FindFieldByNumber(field_number); - - // If that failed, check if the field is an extension. - if (field == NULL && descriptor->IsExtensionNumber(field_number)) { - if (input->GetExtensionPool() == NULL) { - field = message_reflection->FindKnownExtensionByNumber(field_number); - } else { - field = input->GetExtensionPool() - ->FindExtensionByNumber(descriptor, field_number); - } - } - - // If that failed, but we're a MessageSet, and this is the tag for a - // MessageSet item, then parse that. - if (field == NULL && - descriptor->options().message_set_wire_format() && - tag == WireFormatLite::kMessageSetItemStartTag) { - if (!ParseAndMergeMessageSetItem(input, message)) { - return false; - } - continue; // Skip ParseAndMergeField(); already taken care of. - } - } - - if (!ParseAndMergeField(tag, field, message, input)) { - return false; - } - } -} - -bool WireFormat::ParseAndMergeField( - uint32 tag, - const FieldDescriptor* field, // May be NULL for unknown - Message* message, - io::CodedInputStream* input) { - const Reflection* message_reflection = message->GetReflection(); - - enum { UNKNOWN, NORMAL_FORMAT, PACKED_FORMAT } value_format; - - if (field == NULL) { - value_format = UNKNOWN; - } else if (WireFormatLite::GetTagWireType(tag) == - WireTypeForFieldType(field->type())) { - value_format = NORMAL_FORMAT; - } else if (field->is_packable() && - WireFormatLite::GetTagWireType(tag) == - WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - value_format = PACKED_FORMAT; - } else { - // We don't recognize this field. Either the field number is unknown - // or the wire type doesn't match. Put it in our unknown field set. - value_format = UNKNOWN; - } - - if (value_format == UNKNOWN) { - return SkipField(input, tag, - message_reflection->MutableUnknownFields(message)); - } else if (value_format == PACKED_FORMAT) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - - switch (field->type()) { -#define HANDLE_PACKED_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: { \ - while (input->BytesUntilLimit() > 0) { \ - CPPTYPE value; \ - if (!WireFormatLite::ReadPrimitive< \ - CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)) \ - return false; \ - message_reflection->Add##CPPTYPE_METHOD(message, field, value); \ - } \ - break; \ - } - - HANDLE_PACKED_TYPE( INT32, int32, Int32) - HANDLE_PACKED_TYPE( INT64, int64, Int64) - HANDLE_PACKED_TYPE(SINT32, int32, Int32) - HANDLE_PACKED_TYPE(SINT64, int64, Int64) - HANDLE_PACKED_TYPE(UINT32, uint32, UInt32) - HANDLE_PACKED_TYPE(UINT64, uint64, UInt64) - - HANDLE_PACKED_TYPE( FIXED32, uint32, UInt32) - HANDLE_PACKED_TYPE( FIXED64, uint64, UInt64) - HANDLE_PACKED_TYPE(SFIXED32, int32, Int32) - HANDLE_PACKED_TYPE(SFIXED64, int64, Int64) - - HANDLE_PACKED_TYPE(FLOAT , float , Float ) - HANDLE_PACKED_TYPE(DOUBLE, double, Double) - - HANDLE_PACKED_TYPE(BOOL, bool, Bool) -#undef HANDLE_PACKED_TYPE - - case FieldDescriptor::TYPE_ENUM: { - while (input->BytesUntilLimit() > 0) { - int value; - if (!WireFormatLite::ReadPrimitive( - input, &value)) return false; - const EnumValueDescriptor* enum_value = - field->enum_type()->FindValueByNumber(value); - if (enum_value != NULL) { - message_reflection->AddEnum(message, field, enum_value); - } - } - - break; - } - - case FieldDescriptor::TYPE_STRING: - case FieldDescriptor::TYPE_GROUP: - case FieldDescriptor::TYPE_MESSAGE: - case FieldDescriptor::TYPE_BYTES: - // Can't have packed fields of these types: these should be caught by - // the protocol compiler. - return false; - break; - } - - input->PopLimit(limit); - } else { - // Non-packed value (value_format == NORMAL_FORMAT) - switch (field->type()) { -#define HANDLE_TYPE(TYPE, CPPTYPE, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: { \ - CPPTYPE value; \ - if (!WireFormatLite::ReadPrimitive< \ - CPPTYPE, WireFormatLite::TYPE_##TYPE>(input, &value)) \ - return false; \ - if (field->is_repeated()) { \ - message_reflection->Add##CPPTYPE_METHOD(message, field, value); \ - } else { \ - message_reflection->Set##CPPTYPE_METHOD(message, field, value); \ - } \ - break; \ - } - - HANDLE_TYPE( INT32, int32, Int32) - HANDLE_TYPE( INT64, int64, Int64) - HANDLE_TYPE(SINT32, int32, Int32) - HANDLE_TYPE(SINT64, int64, Int64) - HANDLE_TYPE(UINT32, uint32, UInt32) - HANDLE_TYPE(UINT64, uint64, UInt64) - - HANDLE_TYPE( FIXED32, uint32, UInt32) - HANDLE_TYPE( FIXED64, uint64, UInt64) - HANDLE_TYPE(SFIXED32, int32, Int32) - HANDLE_TYPE(SFIXED64, int64, Int64) - - HANDLE_TYPE(FLOAT , float , Float ) - HANDLE_TYPE(DOUBLE, double, Double) - - HANDLE_TYPE(BOOL, bool, Bool) -#undef HANDLE_TYPE - - case FieldDescriptor::TYPE_ENUM: { - int value; - if (!WireFormatLite::ReadPrimitive( - input, &value)) return false; - const EnumValueDescriptor* enum_value = - field->enum_type()->FindValueByNumber(value); - if (enum_value != NULL) { - if (field->is_repeated()) { - message_reflection->AddEnum(message, field, enum_value); - } else { - message_reflection->SetEnum(message, field, enum_value); - } - } else { - // The enum value is not one of the known values. Add it to the - // UnknownFieldSet. - int64 sign_extended_value = static_cast(value); - message_reflection->MutableUnknownFields(message) - ->AddVarint(WireFormatLite::GetTagFieldNumber(tag), - sign_extended_value); - } - break; - } - - // Handle strings separately so that we can optimize the ctype=CORD case. - case FieldDescriptor::TYPE_STRING: { - string value; - if (!WireFormatLite::ReadString(input, &value)) return false; - VerifyUTF8String(value.data(), value.length(), PARSE); - if (field->is_repeated()) { - message_reflection->AddString(message, field, value); - } else { - message_reflection->SetString(message, field, value); - } - break; - } - - case FieldDescriptor::TYPE_BYTES: { - string value; - if (!WireFormatLite::ReadBytes(input, &value)) return false; - if (field->is_repeated()) { - message_reflection->AddString(message, field, value); - } else { - message_reflection->SetString(message, field, value); - } - break; - } - - case FieldDescriptor::TYPE_GROUP: { - Message* sub_message; - if (field->is_repeated()) { - sub_message = message_reflection->AddMessage( - message, field, input->GetExtensionFactory()); - } else { - sub_message = message_reflection->MutableMessage( - message, field, input->GetExtensionFactory()); - } - - if (!WireFormatLite::ReadGroup(WireFormatLite::GetTagFieldNumber(tag), - input, sub_message)) - return false; - break; - } - - case FieldDescriptor::TYPE_MESSAGE: { - Message* sub_message; - if (field->is_repeated()) { - sub_message = message_reflection->AddMessage( - message, field, input->GetExtensionFactory()); - } else { - sub_message = message_reflection->MutableMessage( - message, field, input->GetExtensionFactory()); - } - - if (!WireFormatLite::ReadMessage(input, sub_message)) return false; - break; - } - } - } - - return true; -} - -bool WireFormat::ParseAndMergeMessageSetItem( - io::CodedInputStream* input, - Message* message) { - const Reflection* message_reflection = message->GetReflection(); - - // This method parses a group which should contain two fields: - // required int32 type_id = 2; - // required data message = 3; - - // Once we see a type_id, we'll construct a fake tag for this extension - // which is the tag it would have had under the proto2 extensions wire - // format. - uint32 fake_tag = 0; - - // Once we see a type_id, we'll look up the FieldDescriptor for the - // extension. - const FieldDescriptor* field = NULL; - - // If we see message data before the type_id, we'll append it to this so - // we can parse it later. This will probably never happen in practice, - // as no MessageSet encoder I know of writes the message before the type ID. - // But, it's technically valid so we should allow it. - // TODO(kenton): Use a Cord instead? Do I care? - string message_data; - - while (true) { - uint32 tag = input->ReadTag(); - if (tag == 0) return false; - - switch (tag) { - case WireFormatLite::kMessageSetTypeIdTag: { - uint32 type_id; - if (!input->ReadVarint32(&type_id)) return false; - fake_tag = WireFormatLite::MakeTag( - type_id, WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - field = message_reflection->FindKnownExtensionByNumber(type_id); - - if (!message_data.empty()) { - // We saw some message data before the type_id. Have to parse it - // now. - io::ArrayInputStream raw_input(message_data.data(), - message_data.size()); - io::CodedInputStream sub_input(&raw_input); - if (!ParseAndMergeField(fake_tag, field, message, - &sub_input)) { - return false; - } - message_data.clear(); - } - - break; - } - - case WireFormatLite::kMessageSetMessageTag: { - if (fake_tag == 0) { - // We haven't seen a type_id yet. Append this data to message_data. - string temp; - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->ReadString(&temp, length)) return false; - message_data.append(temp); - } else { - // Already saw type_id, so we can parse this directly. - if (!ParseAndMergeField(fake_tag, field, message, input)) { - return false; - } - } - - break; - } - - case WireFormatLite::kMessageSetItemEndTag: { - return true; - } - - default: { - if (!SkipField(input, tag, NULL)) return false; - } - } - } -} - -// =================================================================== - -void WireFormat::SerializeWithCachedSizes( - const Message& message, - int size, io::CodedOutputStream* output) { - const Descriptor* descriptor = message.GetDescriptor(); - const Reflection* message_reflection = message.GetReflection(); - int expected_endpoint = output->ByteCount() + size; - - vector fields; - message_reflection->ListFields(message, &fields); - for (int i = 0; i < fields.size(); i++) { - SerializeFieldWithCachedSizes(fields[i], message, output); - } - - if (descriptor->options().message_set_wire_format()) { - SerializeUnknownMessageSetItems( - message_reflection->GetUnknownFields(message), output); - } else { - SerializeUnknownFields( - message_reflection->GetUnknownFields(message), output); - } - - GOOGLE_CHECK_EQ(output->ByteCount(), expected_endpoint) - << ": Protocol message serialized to a size different from what was " - "originally expected. Perhaps it was modified by another thread " - "during serialization?"; -} - -void WireFormat::SerializeFieldWithCachedSizes( - const FieldDescriptor* field, - const Message& message, - io::CodedOutputStream* output) { - const Reflection* message_reflection = message.GetReflection(); - - if (field->is_extension() && - field->containing_type()->options().message_set_wire_format() && - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - !field->is_repeated()) { - SerializeMessageSetItemWithCachedSizes(field, message, output); - return; - } - - int count = 0; - - if (field->is_repeated()) { - count = message_reflection->FieldSize(message, field); - } else if (message_reflection->HasField(message, field)) { - count = 1; - } - - const bool is_packed = field->options().packed(); - if (is_packed && count > 0) { - WireFormatLite::WriteTag(field->number(), - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - const int data_size = FieldDataOnlyByteSize(field, message); - output->WriteVarint32(data_size); - } - - for (int j = 0; j < count; j++) { - switch (field->type()) { -#define HANDLE_PRIMITIVE_TYPE(TYPE, CPPTYPE, TYPE_METHOD, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: { \ - const CPPTYPE value = field->is_repeated() ? \ - message_reflection->GetRepeated##CPPTYPE_METHOD( \ - message, field, j) : \ - message_reflection->Get##CPPTYPE_METHOD( \ - message, field); \ - if (is_packed) { \ - WireFormatLite::Write##TYPE_METHOD##NoTag(value, output); \ - } else { \ - WireFormatLite::Write##TYPE_METHOD(field->number(), value, output); \ - } \ - break; \ - } - - HANDLE_PRIMITIVE_TYPE( INT32, int32, Int32, Int32) - HANDLE_PRIMITIVE_TYPE( INT64, int64, Int64, Int64) - HANDLE_PRIMITIVE_TYPE(SINT32, int32, SInt32, Int32) - HANDLE_PRIMITIVE_TYPE(SINT64, int64, SInt64, Int64) - HANDLE_PRIMITIVE_TYPE(UINT32, uint32, UInt32, UInt32) - HANDLE_PRIMITIVE_TYPE(UINT64, uint64, UInt64, UInt64) - - HANDLE_PRIMITIVE_TYPE( FIXED32, uint32, Fixed32, UInt32) - HANDLE_PRIMITIVE_TYPE( FIXED64, uint64, Fixed64, UInt64) - HANDLE_PRIMITIVE_TYPE(SFIXED32, int32, SFixed32, Int32) - HANDLE_PRIMITIVE_TYPE(SFIXED64, int64, SFixed64, Int64) - - HANDLE_PRIMITIVE_TYPE(FLOAT , float , Float , Float ) - HANDLE_PRIMITIVE_TYPE(DOUBLE, double, Double, Double) - - HANDLE_PRIMITIVE_TYPE(BOOL, bool, Bool, Bool) -#undef HANDLE_PRIMITIVE_TYPE - -#define HANDLE_TYPE(TYPE, TYPE_METHOD, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: \ - WireFormatLite::Write##TYPE_METHOD( \ - field->number(), \ - field->is_repeated() ? \ - message_reflection->GetRepeated##CPPTYPE_METHOD( \ - message, field, j) : \ - message_reflection->Get##CPPTYPE_METHOD(message, field), \ - output); \ - break; - - HANDLE_TYPE(GROUP , Group , Message) - HANDLE_TYPE(MESSAGE, Message, Message) -#undef HANDLE_TYPE - - case FieldDescriptor::TYPE_ENUM: { - const EnumValueDescriptor* value = field->is_repeated() ? - message_reflection->GetRepeatedEnum(message, field, j) : - message_reflection->GetEnum(message, field); - if (is_packed) { - WireFormatLite::WriteEnumNoTag(value->number(), output); - } else { - WireFormatLite::WriteEnum(field->number(), value->number(), output); - } - break; - } - - // Handle strings separately so that we can get string references - // instead of copying. - case FieldDescriptor::TYPE_STRING: { - string scratch; - const string& value = field->is_repeated() ? - message_reflection->GetRepeatedStringReference( - message, field, j, &scratch) : - message_reflection->GetStringReference(message, field, &scratch); - VerifyUTF8String(value.data(), value.length(), SERIALIZE); - WireFormatLite::WriteString(field->number(), value, output); - break; - } - - case FieldDescriptor::TYPE_BYTES: { - string scratch; - const string& value = field->is_repeated() ? - message_reflection->GetRepeatedStringReference( - message, field, j, &scratch) : - message_reflection->GetStringReference(message, field, &scratch); - WireFormatLite::WriteBytes(field->number(), value, output); - break; - } - } - } -} - -void WireFormat::SerializeMessageSetItemWithCachedSizes( - const FieldDescriptor* field, - const Message& message, - io::CodedOutputStream* output) { - const Reflection* message_reflection = message.GetReflection(); - - // Start group. - output->WriteVarint32(WireFormatLite::kMessageSetItemStartTag); - - // Write type ID. - output->WriteVarint32(WireFormatLite::kMessageSetTypeIdTag); - output->WriteVarint32(field->number()); - - // Write message. - output->WriteVarint32(WireFormatLite::kMessageSetMessageTag); - - const Message& sub_message = message_reflection->GetMessage(message, field); - output->WriteVarint32(sub_message.GetCachedSize()); - sub_message.SerializeWithCachedSizes(output); - - // End group. - output->WriteVarint32(WireFormatLite::kMessageSetItemEndTag); -} - -// =================================================================== - -int WireFormat::ByteSize(const Message& message) { - const Descriptor* descriptor = message.GetDescriptor(); - const Reflection* message_reflection = message.GetReflection(); - - int our_size = 0; - - vector fields; - message_reflection->ListFields(message, &fields); - for (int i = 0; i < fields.size(); i++) { - our_size += FieldByteSize(fields[i], message); - } - - if (descriptor->options().message_set_wire_format()) { - our_size += ComputeUnknownMessageSetItemsSize( - message_reflection->GetUnknownFields(message)); - } else { - our_size += ComputeUnknownFieldsSize( - message_reflection->GetUnknownFields(message)); - } - - return our_size; -} - -int WireFormat::FieldByteSize( - const FieldDescriptor* field, - const Message& message) { - const Reflection* message_reflection = message.GetReflection(); - - if (field->is_extension() && - field->containing_type()->options().message_set_wire_format() && - field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && - !field->is_repeated()) { - return MessageSetItemByteSize(field, message); - } - - int count = 0; - if (field->is_repeated()) { - count = message_reflection->FieldSize(message, field); - } else if (message_reflection->HasField(message, field)) { - count = 1; - } - - const int data_size = FieldDataOnlyByteSize(field, message); - int our_size = data_size; - if (field->options().packed()) { - if (data_size > 0) { - // Packed fields get serialized like a string, not their native type. - // Technically this doesn't really matter; the size only changes if it's - // a GROUP - our_size += TagSize(field->number(), FieldDescriptor::TYPE_STRING); - our_size += io::CodedOutputStream::VarintSize32(data_size); - } - } else { - our_size += count * TagSize(field->number(), field->type()); - } - return our_size; -} - -int WireFormat::FieldDataOnlyByteSize( - const FieldDescriptor* field, - const Message& message) { - const Reflection* message_reflection = message.GetReflection(); - - int count = 0; - if (field->is_repeated()) { - count = message_reflection->FieldSize(message, field); - } else if (message_reflection->HasField(message, field)) { - count = 1; - } - - int data_size = 0; - switch (field->type()) { -#define HANDLE_TYPE(TYPE, TYPE_METHOD, CPPTYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: \ - if (field->is_repeated()) { \ - for (int j = 0; j < count; j++) { \ - data_size += WireFormatLite::TYPE_METHOD##Size( \ - message_reflection->GetRepeated##CPPTYPE_METHOD( \ - message, field, j)); \ - } \ - } else { \ - data_size += WireFormatLite::TYPE_METHOD##Size( \ - message_reflection->Get##CPPTYPE_METHOD(message, field)); \ - } \ - break; - -#define HANDLE_FIXED_TYPE(TYPE, TYPE_METHOD) \ - case FieldDescriptor::TYPE_##TYPE: \ - data_size += count * WireFormatLite::k##TYPE_METHOD##Size; \ - break; - - HANDLE_TYPE( INT32, Int32, Int32) - HANDLE_TYPE( INT64, Int64, Int64) - HANDLE_TYPE(SINT32, SInt32, Int32) - HANDLE_TYPE(SINT64, SInt64, Int64) - HANDLE_TYPE(UINT32, UInt32, UInt32) - HANDLE_TYPE(UINT64, UInt64, UInt64) - - HANDLE_FIXED_TYPE( FIXED32, Fixed32) - HANDLE_FIXED_TYPE( FIXED64, Fixed64) - HANDLE_FIXED_TYPE(SFIXED32, SFixed32) - HANDLE_FIXED_TYPE(SFIXED64, SFixed64) - - HANDLE_FIXED_TYPE(FLOAT , Float ) - HANDLE_FIXED_TYPE(DOUBLE, Double) - - HANDLE_FIXED_TYPE(BOOL, Bool) - - HANDLE_TYPE(GROUP , Group , Message) - HANDLE_TYPE(MESSAGE, Message, Message) -#undef HANDLE_TYPE -#undef HANDLE_FIXED_TYPE - - case FieldDescriptor::TYPE_ENUM: { - if (field->is_repeated()) { - for (int j = 0; j < count; j++) { - data_size += WireFormatLite::EnumSize( - message_reflection->GetRepeatedEnum(message, field, j)->number()); - } - } else { - data_size += WireFormatLite::EnumSize( - message_reflection->GetEnum(message, field)->number()); - } - break; - } - - // Handle strings separately so that we can get string references - // instead of copying. - case FieldDescriptor::TYPE_STRING: - case FieldDescriptor::TYPE_BYTES: { - for (int j = 0; j < count; j++) { - string scratch; - const string& value = field->is_repeated() ? - message_reflection->GetRepeatedStringReference( - message, field, j, &scratch) : - message_reflection->GetStringReference(message, field, &scratch); - data_size += WireFormatLite::StringSize(value); - } - break; - } - } - return data_size; -} - -int WireFormat::MessageSetItemByteSize( - const FieldDescriptor* field, - const Message& message) { - const Reflection* message_reflection = message.GetReflection(); - - int our_size = WireFormatLite::kMessageSetItemTagsSize; - - // type_id - our_size += io::CodedOutputStream::VarintSize32(field->number()); - - // message - const Message& sub_message = message_reflection->GetMessage(message, field); - int message_size = sub_message.ByteSize(); - - our_size += io::CodedOutputStream::VarintSize32(message_size); - our_size += message_size; - - return our_size; -} - -void WireFormat::VerifyUTF8StringFallback(const char* data, - int size, - Operation op) { - if (!IsStructurallyValidUTF8(data, size)) { - const char* operation_str = NULL; - switch (op) { - case PARSE: - operation_str = "parsing"; - break; - case SERIALIZE: - operation_str = "serializing"; - break; - // no default case: have the compiler warn if a case is not covered. - } - GOOGLE_LOG(ERROR) << "Encountered string containing invalid UTF-8 data while " - << operation_str - << " protocol buffer. Strings must contain only UTF-8; " - "use the 'bytes' type for raw bytes."; - } -} - - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.h deleted file mode 100644 index c7539250..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format.h +++ /dev/null @@ -1,304 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// atenasio@google.com (Chris Atenasio) (ZigZag transform) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This header is logically internal, but is made public because it is used -// from protocol-compiler-generated code, which may reside in other components. - -#ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_H__ -#define GOOGLE_PROTOBUF_WIRE_FORMAT_H__ - -#include -#include -#include -#include -#include - -// Do UTF-8 validation on string type in Debug build only -#ifndef NDEBUG -#define GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED -#endif - -namespace google { -namespace protobuf { - namespace io { - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h - } - class UnknownFieldSet; // unknown_field_set.h -} - -namespace protobuf { -namespace internal { - -// This class is for internal use by the protocol buffer library and by -// protocol-complier-generated message classes. It must not be called -// directly by clients. -// -// This class contains code for implementing the binary protocol buffer -// wire format via reflection. The WireFormatLite class implements the -// non-reflection based routines. -// -// This class is really a namespace that contains only static methods -class LIBPROTOBUF_EXPORT WireFormat { - public: - - // Given a field return its WireType - static inline WireFormatLite::WireType WireTypeForField( - const FieldDescriptor* field); - - // Given a FieldSescriptor::Type return its WireType - static inline WireFormatLite::WireType WireTypeForFieldType( - FieldDescriptor::Type type); - - // Compute the byte size of a tag. For groups, this includes both the start - // and end tags. - static inline int TagSize(int field_number, FieldDescriptor::Type type); - - // These procedures can be used to implement the methods of Message which - // handle parsing and serialization of the protocol buffer wire format - // using only the Reflection interface. When you ask the protocol - // compiler to optimize for code size rather than speed, it will implement - // those methods in terms of these procedures. Of course, these are much - // slower than the specialized implementations which the protocol compiler - // generates when told to optimize for speed. - - // Read a message in protocol buffer wire format. - // - // This procedure reads either to the end of the input stream or through - // a WIRETYPE_END_GROUP tag ending the message, whichever comes first. - // It returns false if the input is invalid. - // - // Required fields are NOT checked by this method. You must call - // IsInitialized() on the resulting message yourself. - static bool ParseAndMergePartial(io::CodedInputStream* input, - Message* message); - - // Serialize a message in protocol buffer wire format. - // - // Any embedded messages within the message must have their correct sizes - // cached. However, the top-level message need not; its size is passed as - // a parameter to this procedure. - // - // These return false iff the underlying stream returns a write error. - static void SerializeWithCachedSizes( - const Message& message, - int size, io::CodedOutputStream* output); - - // Implements Message::ByteSize() via reflection. WARNING: The result - // of this method is *not* cached anywhere. However, all embedded messages - // will have their ByteSize() methods called, so their sizes will be cached. - // Therefore, calling this method is sufficient to allow you to call - // WireFormat::SerializeWithCachedSizes() on the same object. - static int ByteSize(const Message& message); - - // ----------------------------------------------------------------- - // Helpers for dealing with unknown fields - - // Skips a field value of the given WireType. The input should start - // positioned immediately after the tag. If unknown_fields is non-NULL, - // the contents of the field will be added to it. - static bool SkipField(io::CodedInputStream* input, uint32 tag, - UnknownFieldSet* unknown_fields); - - // Reads and ignores a message from the input. If unknown_fields is non-NULL, - // the contents will be added to it. - static bool SkipMessage(io::CodedInputStream* input, - UnknownFieldSet* unknown_fields); - - // Write the contents of an UnknownFieldSet to the output. - static void SerializeUnknownFields(const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output); - // Same as above, except writing directly to the provided buffer. - // Requires that the buffer have sufficient capacity for - // ComputeUnknownFieldsSize(unknown_fields). - // - // Returns a pointer past the last written byte. - static uint8* SerializeUnknownFieldsToArray( - const UnknownFieldSet& unknown_fields, - uint8* target); - - // Same thing except for messages that have the message_set_wire_format - // option. - static void SerializeUnknownMessageSetItems( - const UnknownFieldSet& unknown_fields, - io::CodedOutputStream* output); - // Same as above, except writing directly to the provided buffer. - // Requires that the buffer have sufficient capacity for - // ComputeUnknownMessageSetItemsSize(unknown_fields). - // - // Returns a pointer past the last written byte. - static uint8* SerializeUnknownMessageSetItemsToArray( - const UnknownFieldSet& unknown_fields, - uint8* target); - - // Compute the size of the UnknownFieldSet on the wire. - static int ComputeUnknownFieldsSize(const UnknownFieldSet& unknown_fields); - - // Same thing except for messages that have the message_set_wire_format - // option. - static int ComputeUnknownMessageSetItemsSize( - const UnknownFieldSet& unknown_fields); - - - // Helper functions for encoding and decoding tags. (Inlined below and in - // _inl.h) - // - // This is different from MakeTag(field->number(), field->type()) in the case - // of packed repeated fields. - static uint32 MakeTag(const FieldDescriptor* field); - - // Parse a single field. The input should start out positioned immidately - // after the tag. - static bool ParseAndMergeField( - uint32 tag, - const FieldDescriptor* field, // May be NULL for unknown - Message* message, - io::CodedInputStream* input); - - // Serialize a single field. - static void SerializeFieldWithCachedSizes( - const FieldDescriptor* field, // Cannot be NULL - const Message& message, - io::CodedOutputStream* output); - - // Compute size of a single field. If the field is a message type, this - // will call ByteSize() for the embedded message, insuring that it caches - // its size. - static int FieldByteSize( - const FieldDescriptor* field, // Cannot be NULL - const Message& message); - - // Parse/serialize a MessageSet::Item group. Used with messages that use - // opion message_set_wire_format = true. - static bool ParseAndMergeMessageSetItem( - io::CodedInputStream* input, - Message* message); - static void SerializeMessageSetItemWithCachedSizes( - const FieldDescriptor* field, - const Message& message, - io::CodedOutputStream* output); - static int MessageSetItemByteSize( - const FieldDescriptor* field, - const Message& message); - - // Computes the byte size of a field, excluding tags. For packed fields, it - // only includes the size of the raw data, and not the size of the total - // length, but for other length-delimited types, the size of the length is - // included. - static int FieldDataOnlyByteSize( - const FieldDescriptor* field, // Cannot be NULL - const Message& message); - - enum Operation { - PARSE, - SERIALIZE, - }; - - // Verifies that a string field is valid UTF8, logging an error if not. - static void VerifyUTF8String(const char* data, int size, Operation op); - - private: - // Verifies that a string field is valid UTF8, logging an error if not. - static void VerifyUTF8StringFallback( - const char* data, - int size, - Operation op); - - - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormat); -}; - -// Subclass of FieldSkipper which saves skipped fields to an UnknownFieldSet. -class LIBPROTOBUF_EXPORT UnknownFieldSetFieldSkipper : public FieldSkipper { - public: - UnknownFieldSetFieldSkipper(UnknownFieldSet* unknown_fields) - : unknown_fields_(unknown_fields) {} - virtual ~UnknownFieldSetFieldSkipper() {} - - // implements FieldSkipper ----------------------------------------- - virtual bool SkipField(io::CodedInputStream* input, uint32 tag); - virtual bool SkipMessage(io::CodedInputStream* input); - virtual void SkipUnknownEnum(int field_number, int value); - - private: - UnknownFieldSet* unknown_fields_; -}; - -// inline methods ==================================================== - -inline WireFormatLite::WireType WireFormat::WireTypeForField( - const FieldDescriptor* field) { - if (field->options().packed()) { - return WireFormatLite::WIRETYPE_LENGTH_DELIMITED; - } else { - return WireTypeForFieldType(field->type()); - } -} - -inline WireFormatLite::WireType WireFormat::WireTypeForFieldType( - FieldDescriptor::Type type) { - // Some compilers don't like enum -> enum casts, so we implicit_cast to - // int first. - return WireFormatLite::WireTypeForFieldType( - static_cast( - implicit_cast(type))); -} - -inline uint32 WireFormat::MakeTag(const FieldDescriptor* field) { - return WireFormatLite::MakeTag(field->number(), WireTypeForField(field)); -} - -inline int WireFormat::TagSize(int field_number, FieldDescriptor::Type type) { - // Some compilers don't like enum -> enum casts, so we implicit_cast to - // int first. - return WireFormatLite::TagSize(field_number, - static_cast( - implicit_cast(type))); -} - -inline void WireFormat::VerifyUTF8String(const char* data, int size, - WireFormat::Operation op) { -#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED - WireFormat::VerifyUTF8StringFallback(data, size, op); -#endif -} - - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_WIRE_FORMAT_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.cc deleted file mode 100644 index d347d116..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.cc +++ /dev/null @@ -1,359 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { - -#ifndef _MSC_VER // MSVC doesn't like definitions of inline constants, GCC - // requires them. -const int WireFormatLite::kMessageSetItemStartTag; -const int WireFormatLite::kMessageSetItemEndTag; -const int WireFormatLite::kMessageSetTypeIdTag; -const int WireFormatLite::kMessageSetMessageTag; - -#endif - -const int WireFormatLite::kMessageSetItemTagsSize = - io::CodedOutputStream::VarintSize32(kMessageSetItemStartTag) + - io::CodedOutputStream::VarintSize32(kMessageSetItemEndTag) + - io::CodedOutputStream::VarintSize32(kMessageSetTypeIdTag) + - io::CodedOutputStream::VarintSize32(kMessageSetMessageTag); - -const WireFormatLite::CppType -WireFormatLite::kFieldTypeToCppTypeMap[MAX_FIELD_TYPE + 1] = { - static_cast(0), // 0 is reserved for errors - - CPPTYPE_DOUBLE, // TYPE_DOUBLE - CPPTYPE_FLOAT, // TYPE_FLOAT - CPPTYPE_INT64, // TYPE_INT64 - CPPTYPE_UINT64, // TYPE_UINT64 - CPPTYPE_INT32, // TYPE_INT32 - CPPTYPE_UINT64, // TYPE_FIXED64 - CPPTYPE_UINT32, // TYPE_FIXED32 - CPPTYPE_BOOL, // TYPE_BOOL - CPPTYPE_STRING, // TYPE_STRING - CPPTYPE_MESSAGE, // TYPE_GROUP - CPPTYPE_MESSAGE, // TYPE_MESSAGE - CPPTYPE_STRING, // TYPE_BYTES - CPPTYPE_UINT32, // TYPE_UINT32 - CPPTYPE_ENUM, // TYPE_ENUM - CPPTYPE_INT32, // TYPE_SFIXED32 - CPPTYPE_INT64, // TYPE_SFIXED64 - CPPTYPE_INT32, // TYPE_SINT32 - CPPTYPE_INT64, // TYPE_SINT64 -}; - -const WireFormatLite::WireType -WireFormatLite::kWireTypeForFieldType[MAX_FIELD_TYPE + 1] = { - static_cast(-1), // invalid - WireFormatLite::WIRETYPE_FIXED64, // TYPE_DOUBLE - WireFormatLite::WIRETYPE_FIXED32, // TYPE_FLOAT - WireFormatLite::WIRETYPE_VARINT, // TYPE_INT64 - WireFormatLite::WIRETYPE_VARINT, // TYPE_UINT64 - WireFormatLite::WIRETYPE_VARINT, // TYPE_INT32 - WireFormatLite::WIRETYPE_FIXED64, // TYPE_FIXED64 - WireFormatLite::WIRETYPE_FIXED32, // TYPE_FIXED32 - WireFormatLite::WIRETYPE_VARINT, // TYPE_BOOL - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, // TYPE_STRING - WireFormatLite::WIRETYPE_START_GROUP, // TYPE_GROUP - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, // TYPE_MESSAGE - WireFormatLite::WIRETYPE_LENGTH_DELIMITED, // TYPE_BYTES - WireFormatLite::WIRETYPE_VARINT, // TYPE_UINT32 - WireFormatLite::WIRETYPE_VARINT, // TYPE_ENUM - WireFormatLite::WIRETYPE_FIXED32, // TYPE_SFIXED32 - WireFormatLite::WIRETYPE_FIXED64, // TYPE_SFIXED64 - WireFormatLite::WIRETYPE_VARINT, // TYPE_SINT32 - WireFormatLite::WIRETYPE_VARINT, // TYPE_SINT64 -}; - -bool WireFormatLite::SkipField( - io::CodedInputStream* input, uint32 tag) { - switch (WireFormatLite::GetTagWireType(tag)) { - case WireFormatLite::WIRETYPE_VARINT: { - uint64 value; - if (!input->ReadVarint64(&value)) return false; - return true; - } - case WireFormatLite::WIRETYPE_FIXED64: { - uint64 value; - if (!input->ReadLittleEndian64(&value)) return false; - return true; - } - case WireFormatLite::WIRETYPE_LENGTH_DELIMITED: { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->Skip(length)) return false; - return true; - } - case WireFormatLite::WIRETYPE_START_GROUP: { - if (!input->IncrementRecursionDepth()) return false; - if (!SkipMessage(input)) return false; - input->DecrementRecursionDepth(); - // Check that the ending tag matched the starting tag. - if (!input->LastTagWas(WireFormatLite::MakeTag( - WireFormatLite::GetTagFieldNumber(tag), - WireFormatLite::WIRETYPE_END_GROUP))) { - return false; - } - return true; - } - case WireFormatLite::WIRETYPE_END_GROUP: { - return false; - } - case WireFormatLite::WIRETYPE_FIXED32: { - uint32 value; - if (!input->ReadLittleEndian32(&value)) return false; - return true; - } - default: { - return false; - } - } -} - -bool WireFormatLite::SkipMessage(io::CodedInputStream* input) { - while(true) { - uint32 tag = input->ReadTag(); - if (tag == 0) { - // End of input. This is a valid place to end, so return true. - return true; - } - - WireFormatLite::WireType wire_type = WireFormatLite::GetTagWireType(tag); - - if (wire_type == WireFormatLite::WIRETYPE_END_GROUP) { - // Must be the end of the message. - return true; - } - - if (!SkipField(input, tag)) return false; - } -} - -bool FieldSkipper::SkipField( - io::CodedInputStream* input, uint32 tag) { - return WireFormatLite::SkipField(input, tag); -} - -bool FieldSkipper::SkipMessage(io::CodedInputStream* input) { - return WireFormatLite::SkipMessage(input); -} - -void FieldSkipper::SkipUnknownEnum( - int field_number, int value) { - // Nothing. -} - -bool WireFormatLite::ReadPackedEnumNoInline(io::CodedInputStream* input, - bool (*is_valid)(int), - RepeatedField* values) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - while (input->BytesUntilLimit() > 0) { - int value; - if (!google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, WireFormatLite::TYPE_ENUM>(input, &value)) { - return false; - } - if (is_valid(value)) { - values->Add(value); - } - } - input->PopLimit(limit); - return true; -} - -void WireFormatLite::WriteInt32(int field_number, int32 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteInt32NoTag(value, output); -} -void WireFormatLite::WriteInt64(int field_number, int64 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteInt64NoTag(value, output); -} -void WireFormatLite::WriteUInt32(int field_number, uint32 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteUInt32NoTag(value, output); -} -void WireFormatLite::WriteUInt64(int field_number, uint64 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteUInt64NoTag(value, output); -} -void WireFormatLite::WriteSInt32(int field_number, int32 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteSInt32NoTag(value, output); -} -void WireFormatLite::WriteSInt64(int field_number, int64 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteSInt64NoTag(value, output); -} -void WireFormatLite::WriteFixed32(int field_number, uint32 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED32, output); - WriteFixed32NoTag(value, output); -} -void WireFormatLite::WriteFixed64(int field_number, uint64 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED64, output); - WriteFixed64NoTag(value, output); -} -void WireFormatLite::WriteSFixed32(int field_number, int32 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED32, output); - WriteSFixed32NoTag(value, output); -} -void WireFormatLite::WriteSFixed64(int field_number, int64 value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED64, output); - WriteSFixed64NoTag(value, output); -} -void WireFormatLite::WriteFloat(int field_number, float value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED32, output); - WriteFloatNoTag(value, output); -} -void WireFormatLite::WriteDouble(int field_number, double value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_FIXED64, output); - WriteDoubleNoTag(value, output); -} -void WireFormatLite::WriteBool(int field_number, bool value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteBoolNoTag(value, output); -} -void WireFormatLite::WriteEnum(int field_number, int value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_VARINT, output); - WriteEnumNoTag(value, output); -} - -void WireFormatLite::WriteString(int field_number, const string& value, - io::CodedOutputStream* output) { - // String is for UTF-8 text only - WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(value.size()); - output->WriteString(value); -} -void WireFormatLite::WriteBytes(int field_number, const string& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(value.size()); - output->WriteString(value); -} - - -void WireFormatLite::WriteGroup(int field_number, - const MessageLite& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_START_GROUP, output); - value.SerializeWithCachedSizes(output); - WriteTag(field_number, WIRETYPE_END_GROUP, output); -} - -void WireFormatLite::WriteMessage(int field_number, - const MessageLite& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - const int size = value.GetCachedSize(); - output->WriteVarint32(size); - value.SerializeWithCachedSizes(output); -} - -void WireFormatLite::WriteGroupMaybeToArray(int field_number, - const MessageLite& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_START_GROUP, output); - const int size = value.GetCachedSize(); - uint8* target = output->GetDirectBufferForNBytesAndAdvance(size); - if (target != NULL) { - uint8* end = value.SerializeWithCachedSizesToArray(target); - GOOGLE_DCHECK_EQ(end - target, size); - } else { - value.SerializeWithCachedSizes(output); - } - WriteTag(field_number, WIRETYPE_END_GROUP, output); -} - -void WireFormatLite::WriteMessageMaybeToArray(int field_number, - const MessageLite& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - const int size = value.GetCachedSize(); - output->WriteVarint32(size); - uint8* target = output->GetDirectBufferForNBytesAndAdvance(size); - if (target != NULL) { - uint8* end = value.SerializeWithCachedSizesToArray(target); - GOOGLE_DCHECK_EQ(end - target, size); - } else { - value.SerializeWithCachedSizes(output); - } -} - -bool WireFormatLite::ReadString(io::CodedInputStream* input, - string* value) { - // String is for UTF-8 text only - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->InternalReadStringInline(value, length)) return false; - return true; -} -bool WireFormatLite::ReadBytes(io::CodedInputStream* input, - string* value) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - return input->InternalReadStringInline(value, length); -} - -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.h deleted file mode 100644 index e3d5b2d8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite.h +++ /dev/null @@ -1,620 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// atenasio@google.com (Chris Atenasio) (ZigZag transform) -// wink@google.com (Wink Saville) (refactored from wire_format.h) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// This header is logically internal, but is made public because it is used -// from protocol-compiler-generated code, which may reside in other components. - -#ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ -#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ - -#include -#include - -namespace google { - -namespace protobuf { - template class RepeatedField; // repeated_field.h - namespace io { - class CodedInputStream; // coded_stream.h - class CodedOutputStream; // coded_stream.h - } -} - -namespace protobuf { -namespace internal { - -class StringPieceField; - -// This class is for internal use by the protocol buffer library and by -// protocol-complier-generated message classes. It must not be called -// directly by clients. -// -// This class contains helpers for implementing the binary protocol buffer -// wire format without the need for reflection. Use WireFormat when using -// reflection. -// -// This class is really a namespace that contains only static methods. -class LIBPROTOBUF_EXPORT WireFormatLite { - public: - - // ----------------------------------------------------------------- - // Helper constants and functions related to the format. These are - // mostly meant for internal and generated code to use. - - // The wire format is composed of a sequence of tag/value pairs, each - // of which contains the value of one field (or one element of a repeated - // field). Each tag is encoded as a varint. The lower bits of the tag - // identify its wire type, which specifies the format of the data to follow. - // The rest of the bits contain the field number. Each type of field (as - // declared by FieldDescriptor::Type, in descriptor.h) maps to one of - // these wire types. Immediately following each tag is the field's value, - // encoded in the format specified by the wire type. Because the tag - // identifies the encoding of this data, it is possible to skip - // unrecognized fields for forwards compatibility. - - enum WireType { - WIRETYPE_VARINT = 0, - WIRETYPE_FIXED64 = 1, - WIRETYPE_LENGTH_DELIMITED = 2, - WIRETYPE_START_GROUP = 3, - WIRETYPE_END_GROUP = 4, - WIRETYPE_FIXED32 = 5, - }; - - // Lite alternative to FieldDescriptor::Type. Must be kept in sync. - enum FieldType { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18, - MAX_FIELD_TYPE = 18, - }; - - // Lite alternative to FieldDescriptor::CppType. Must be kept in sync. - enum CppType { - CPPTYPE_INT32 = 1, - CPPTYPE_INT64 = 2, - CPPTYPE_UINT32 = 3, - CPPTYPE_UINT64 = 4, - CPPTYPE_DOUBLE = 5, - CPPTYPE_FLOAT = 6, - CPPTYPE_BOOL = 7, - CPPTYPE_ENUM = 8, - CPPTYPE_STRING = 9, - CPPTYPE_MESSAGE = 10, - MAX_CPPTYPE = 10, - }; - - // Helper method to get the CppType for a particular Type. - static CppType FieldTypeToCppType(FieldType type); - - // Given a FieldSescriptor::Type return its WireType - static inline WireFormatLite::WireType WireTypeForFieldType( - WireFormatLite::FieldType type) { - return kWireTypeForFieldType[type]; - } - - // Number of bits in a tag which identify the wire type. - static const int kTagTypeBits = 3; - // Mask for those bits. - static const uint32 kTagTypeMask = (1 << kTagTypeBits) - 1; - - // Helper functions for encoding and decoding tags. (Inlined below and in - // _inl.h) - // - // This is different from MakeTag(field->number(), field->type()) in the case - // of packed repeated fields. - static uint32 MakeTag(int field_number, WireType type); - static WireType GetTagWireType(uint32 tag); - static int GetTagFieldNumber(uint32 tag); - - // Compute the byte size of a tag. For groups, this includes both the start - // and end tags. - static inline int TagSize(int field_number, WireFormatLite::FieldType type); - - // Skips a field value with the given tag. The input should start - // positioned immediately after the tag. Skipped values are simply discarded, - // not recorded anywhere. See WireFormat::SkipField() for a version that - // records to an UnknownFieldSet. - static bool SkipField(io::CodedInputStream* input, uint32 tag); - - // Reads and ignores a message from the input. Skipped values are simply - // discarded, not recorded anywhere. See WireFormat::SkipMessage() for a - // version that records to an UnknownFieldSet. - static bool SkipMessage(io::CodedInputStream* input); - -// This macro does the same thing as WireFormatLite::MakeTag(), but the -// result is usable as a compile-time constant, which makes it usable -// as a switch case or a template input. WireFormatLite::MakeTag() is more -// type-safe, though, so prefer it if possible. -#define GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(FIELD_NUMBER, TYPE) \ - static_cast( \ - ((FIELD_NUMBER) << ::google::protobuf::internal::WireFormatLite::kTagTypeBits) \ - | (TYPE)) - - // These are the tags for the old MessageSet format, which was defined as: - // message MessageSet { - // repeated group Item = 1 { - // required int32 type_id = 2; - // required string message = 3; - // } - // } - static const int kMessageSetItemNumber = 1; - static const int kMessageSetTypeIdNumber = 2; - static const int kMessageSetMessageNumber = 3; - static const int kMessageSetItemStartTag = - GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kMessageSetItemNumber, - WireFormatLite::WIRETYPE_START_GROUP); - static const int kMessageSetItemEndTag = - GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kMessageSetItemNumber, - WireFormatLite::WIRETYPE_END_GROUP); - static const int kMessageSetTypeIdTag = - GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kMessageSetTypeIdNumber, - WireFormatLite::WIRETYPE_VARINT); - static const int kMessageSetMessageTag = - GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(kMessageSetMessageNumber, - WireFormatLite::WIRETYPE_LENGTH_DELIMITED); - - // Byte size of all tags of a MessageSet::Item combined. - static const int kMessageSetItemTagsSize; - - // Helper functions for converting between floats/doubles and IEEE-754 - // uint32s/uint64s so that they can be written. (Assumes your platform - // uses IEEE-754 floats.) - static uint32 EncodeFloat(float value); - static float DecodeFloat(uint32 value); - static uint64 EncodeDouble(double value); - static double DecodeDouble(uint64 value); - - // Helper functions for mapping signed integers to unsigned integers in - // such a way that numbers with small magnitudes will encode to smaller - // varints. If you simply static_cast a negative number to an unsigned - // number and varint-encode it, it will always take 10 bytes, defeating - // the purpose of varint. So, for the "sint32" and "sint64" field types, - // we ZigZag-encode the values. - static uint32 ZigZagEncode32(int32 n); - static int32 ZigZagDecode32(uint32 n); - static uint64 ZigZagEncode64(int64 n); - static int64 ZigZagDecode64(uint64 n); - - // ================================================================= - // Methods for reading/writing individual field. The implementations - // of these methods are defined in wire_format_lite_inl.h; you must #include - // that file to use these. - -// Avoid ugly line wrapping -#define input io::CodedInputStream* input -#define output io::CodedOutputStream* output -#define field_number int field_number -#define INL GOOGLE_ATTRIBUTE_ALWAYS_INLINE - - // Read fields, not including tags. The assumption is that you already - // read the tag to determine what field to read. - - // For primitive fields, we just use a templatized routine parameterized by - // the represented type and the FieldType. These are specialized with the - // appropriate definition for each declared type. - template - static inline bool ReadPrimitive(input, CType* value) INL; - - // Reads repeated primitive values, with optimizations for repeats. - // tag_size and tag should both be compile-time constants provided by the - // protocol compiler. - template - static inline bool ReadRepeatedPrimitive(int tag_size, - uint32 tag, - input, - RepeatedField* value) INL; - - // Identical to ReadRepeatedPrimitive, except will not inline the - // implementation. - template - static bool ReadRepeatedPrimitiveNoInline(int tag_size, - uint32 tag, - input, - RepeatedField* value); - - // Reads a primitive value directly from the provided buffer. It returns a - // pointer past the segment of data that was read. - // - // This is only implemented for the types with fixed wire size, e.g. - // float, double, and the (s)fixed* types. - template - static inline const uint8* ReadPrimitiveFromArray(const uint8* buffer, - CType* value) INL; - - // Reads a primitive packed field. - // - // This is only implemented for packable types. - template - static inline bool ReadPackedPrimitive(input, - RepeatedField* value) INL; - - // Identical to ReadPackedPrimitive, except will not inline the - // implementation. - template - static bool ReadPackedPrimitiveNoInline(input, RepeatedField* value); - - // Read a packed enum field. Values for which is_valid() returns false are - // dropped. - static bool ReadPackedEnumNoInline(input, - bool (*is_valid)(int), - RepeatedField* value); - - static bool ReadString(input, string* value); - static bool ReadBytes (input, string* value); - - static inline bool ReadGroup (field_number, input, MessageLite* value); - static inline bool ReadMessage(input, MessageLite* value); - - // Like above, but de-virtualize the call to MergePartialFromCodedStream(). - // The pointer must point at an instance of MessageType, *not* a subclass (or - // the subclass must not override MergePartialFromCodedStream()). - template - static inline bool ReadGroupNoVirtual(field_number, input, - MessageType* value); - template - static inline bool ReadMessageNoVirtual(input, MessageType* value); - - // Write a tag. The Write*() functions typically include the tag, so - // normally there's no need to call this unless using the Write*NoTag() - // variants. - static inline void WriteTag(field_number, WireType type, output) INL; - - // Write fields, without tags. - static inline void WriteInt32NoTag (int32 value, output) INL; - static inline void WriteInt64NoTag (int64 value, output) INL; - static inline void WriteUInt32NoTag (uint32 value, output) INL; - static inline void WriteUInt64NoTag (uint64 value, output) INL; - static inline void WriteSInt32NoTag (int32 value, output) INL; - static inline void WriteSInt64NoTag (int64 value, output) INL; - static inline void WriteFixed32NoTag (uint32 value, output) INL; - static inline void WriteFixed64NoTag (uint64 value, output) INL; - static inline void WriteSFixed32NoTag(int32 value, output) INL; - static inline void WriteSFixed64NoTag(int64 value, output) INL; - static inline void WriteFloatNoTag (float value, output) INL; - static inline void WriteDoubleNoTag (double value, output) INL; - static inline void WriteBoolNoTag (bool value, output) INL; - static inline void WriteEnumNoTag (int value, output) INL; - - // Write fields, including tags. - static void WriteInt32 (field_number, int32 value, output); - static void WriteInt64 (field_number, int64 value, output); - static void WriteUInt32 (field_number, uint32 value, output); - static void WriteUInt64 (field_number, uint64 value, output); - static void WriteSInt32 (field_number, int32 value, output); - static void WriteSInt64 (field_number, int64 value, output); - static void WriteFixed32 (field_number, uint32 value, output); - static void WriteFixed64 (field_number, uint64 value, output); - static void WriteSFixed32(field_number, int32 value, output); - static void WriteSFixed64(field_number, int64 value, output); - static void WriteFloat (field_number, float value, output); - static void WriteDouble (field_number, double value, output); - static void WriteBool (field_number, bool value, output); - static void WriteEnum (field_number, int value, output); - - static void WriteString(field_number, const string& value, output); - static void WriteBytes (field_number, const string& value, output); - - static void WriteGroup( - field_number, const MessageLite& value, output); - static void WriteMessage( - field_number, const MessageLite& value, output); - // Like above, but these will check if the output stream has enough - // space to write directly to a flat array. - static void WriteGroupMaybeToArray( - field_number, const MessageLite& value, output); - static void WriteMessageMaybeToArray( - field_number, const MessageLite& value, output); - - // Like above, but de-virtualize the call to SerializeWithCachedSizes(). The - // pointer must point at an instance of MessageType, *not* a subclass (or - // the subclass must not override SerializeWithCachedSizes()). - template - static inline void WriteGroupNoVirtual( - field_number, const MessageType& value, output); - template - static inline void WriteMessageNoVirtual( - field_number, const MessageType& value, output); - -#undef output -#define output uint8* target - - // Like above, but use only *ToArray methods of CodedOutputStream. - static inline uint8* WriteTagToArray(field_number, WireType type, output) INL; - - // Write fields, without tags. - static inline uint8* WriteInt32NoTagToArray (int32 value, output) INL; - static inline uint8* WriteInt64NoTagToArray (int64 value, output) INL; - static inline uint8* WriteUInt32NoTagToArray (uint32 value, output) INL; - static inline uint8* WriteUInt64NoTagToArray (uint64 value, output) INL; - static inline uint8* WriteSInt32NoTagToArray (int32 value, output) INL; - static inline uint8* WriteSInt64NoTagToArray (int64 value, output) INL; - static inline uint8* WriteFixed32NoTagToArray (uint32 value, output) INL; - static inline uint8* WriteFixed64NoTagToArray (uint64 value, output) INL; - static inline uint8* WriteSFixed32NoTagToArray(int32 value, output) INL; - static inline uint8* WriteSFixed64NoTagToArray(int64 value, output) INL; - static inline uint8* WriteFloatNoTagToArray (float value, output) INL; - static inline uint8* WriteDoubleNoTagToArray (double value, output) INL; - static inline uint8* WriteBoolNoTagToArray (bool value, output) INL; - static inline uint8* WriteEnumNoTagToArray (int value, output) INL; - - // Write fields, including tags. - static inline uint8* WriteInt32ToArray( - field_number, int32 value, output) INL; - static inline uint8* WriteInt64ToArray( - field_number, int64 value, output) INL; - static inline uint8* WriteUInt32ToArray( - field_number, uint32 value, output) INL; - static inline uint8* WriteUInt64ToArray( - field_number, uint64 value, output) INL; - static inline uint8* WriteSInt32ToArray( - field_number, int32 value, output) INL; - static inline uint8* WriteSInt64ToArray( - field_number, int64 value, output) INL; - static inline uint8* WriteFixed32ToArray( - field_number, uint32 value, output) INL; - static inline uint8* WriteFixed64ToArray( - field_number, uint64 value, output) INL; - static inline uint8* WriteSFixed32ToArray( - field_number, int32 value, output) INL; - static inline uint8* WriteSFixed64ToArray( - field_number, int64 value, output) INL; - static inline uint8* WriteFloatToArray( - field_number, float value, output) INL; - static inline uint8* WriteDoubleToArray( - field_number, double value, output) INL; - static inline uint8* WriteBoolToArray( - field_number, bool value, output) INL; - static inline uint8* WriteEnumToArray( - field_number, int value, output) INL; - - static inline uint8* WriteStringToArray( - field_number, const string& value, output) INL; - static inline uint8* WriteBytesToArray( - field_number, const string& value, output) INL; - - static inline uint8* WriteGroupToArray( - field_number, const MessageLite& value, output) INL; - static inline uint8* WriteMessageToArray( - field_number, const MessageLite& value, output) INL; - - // Like above, but de-virtualize the call to SerializeWithCachedSizes(). The - // pointer must point at an instance of MessageType, *not* a subclass (or - // the subclass must not override SerializeWithCachedSizes()). - template - static inline uint8* WriteGroupNoVirtualToArray( - field_number, const MessageType& value, output) INL; - template - static inline uint8* WriteMessageNoVirtualToArray( - field_number, const MessageType& value, output) INL; - -#undef output -#undef input -#undef INL - -#undef field_number - - // Compute the byte size of a field. The XxSize() functions do NOT include - // the tag, so you must also call TagSize(). (This is because, for repeated - // fields, you should only call TagSize() once and multiply it by the element - // count, but you may have to call XxSize() for each individual element.) - static inline int Int32Size ( int32 value); - static inline int Int64Size ( int64 value); - static inline int UInt32Size (uint32 value); - static inline int UInt64Size (uint64 value); - static inline int SInt32Size ( int32 value); - static inline int SInt64Size ( int64 value); - static inline int EnumSize ( int value); - - // These types always have the same size. - static const int kFixed32Size = 4; - static const int kFixed64Size = 8; - static const int kSFixed32Size = 4; - static const int kSFixed64Size = 8; - static const int kFloatSize = 4; - static const int kDoubleSize = 8; - static const int kBoolSize = 1; - - static inline int StringSize(const string& value); - static inline int BytesSize (const string& value); - - static inline int GroupSize (const MessageLite& value); - static inline int MessageSize(const MessageLite& value); - - // Like above, but de-virtualize the call to ByteSize(). The - // pointer must point at an instance of MessageType, *not* a subclass (or - // the subclass must not override ByteSize()). - template - static inline int GroupSizeNoVirtual (const MessageType& value); - template - static inline int MessageSizeNoVirtual(const MessageType& value); - - private: - // A helper method for the repeated primitive reader. This method has - // optimizations for primitive types that have fixed size on the wire, and - // can be read using potentially faster paths. - template - static inline bool ReadRepeatedFixedSizePrimitive( - int tag_size, - uint32 tag, - google::protobuf::io::CodedInputStream* input, - RepeatedField* value) GOOGLE_ATTRIBUTE_ALWAYS_INLINE; - - static const CppType kFieldTypeToCppTypeMap[]; - static const WireFormatLite::WireType kWireTypeForFieldType[]; - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(WireFormatLite); -}; - -// A class which deals with unknown values. The default implementation just -// discards them. WireFormat defines a subclass which writes to an -// UnknownFieldSet. This class is used by ExtensionSet::ParseField(), since -// ExtensionSet is part of the lite library but UnknownFieldSet is not. -class LIBPROTOBUF_EXPORT FieldSkipper { - public: - FieldSkipper() {} - virtual ~FieldSkipper() {} - - // Skip a field whose tag has already been consumed. - virtual bool SkipField(io::CodedInputStream* input, uint32 tag); - - // Skip an entire message or group, up to an end-group tag (which is consumed) - // or end-of-stream. - virtual bool SkipMessage(io::CodedInputStream* input); - - // Deal with an already-parsed unrecognized enum value. The default - // implementation does nothing, but the UnknownFieldSet-based implementation - // saves it as an unknown varint. - virtual void SkipUnknownEnum(int field_number, int value); -}; - -// inline methods ==================================================== - -inline WireFormatLite::CppType -WireFormatLite::FieldTypeToCppType(FieldType type) { - return kFieldTypeToCppTypeMap[type]; -} - -inline uint32 WireFormatLite::MakeTag(int field_number, WireType type) { - return GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(field_number, type); -} - -inline WireFormatLite::WireType WireFormatLite::GetTagWireType(uint32 tag) { - return static_cast(tag & kTagTypeMask); -} - -inline int WireFormatLite::GetTagFieldNumber(uint32 tag) { - return static_cast(tag >> kTagTypeBits); -} - -inline int WireFormatLite::TagSize(int field_number, - WireFormatLite::FieldType type) { - int result = io::CodedOutputStream::VarintSize32( - field_number << kTagTypeBits); - if (type == TYPE_GROUP) { - // Groups have both a start and an end tag. - return result * 2; - } else { - return result; - } -} - -inline uint32 WireFormatLite::EncodeFloat(float value) { - union {float f; uint32 i;}; - f = value; - return i; -} - -inline float WireFormatLite::DecodeFloat(uint32 value) { - union {float f; uint32 i;}; - i = value; - return f; -} - -inline uint64 WireFormatLite::EncodeDouble(double value) { - union {double f; uint64 i;}; - f = value; - return i; -} - -inline double WireFormatLite::DecodeDouble(uint64 value) { - union {double f; uint64 i;}; - i = value; - return f; -} - -// ZigZag Transform: Encodes signed integers so that they can be -// effectively used with varint encoding. -// -// varint operates on unsigned integers, encoding smaller numbers into -// fewer bytes. If you try to use it on a signed integer, it will treat -// this number as a very large unsigned integer, which means that even -// small signed numbers like -1 will take the maximum number of bytes -// (10) to encode. ZigZagEncode() maps signed integers to unsigned -// in such a way that those with a small absolute value will have smaller -// encoded values, making them appropriate for encoding using varint. -// -// int32 -> uint32 -// ------------------------- -// 0 -> 0 -// -1 -> 1 -// 1 -> 2 -// -2 -> 3 -// ... -> ... -// 2147483647 -> 4294967294 -// -2147483648 -> 4294967295 -// -// >> encode >> -// << decode << - -inline uint32 WireFormatLite::ZigZagEncode32(int32 n) { - // Note: the right-shift must be arithmetic - return (n << 1) ^ (n >> 31); -} - -inline int32 WireFormatLite::ZigZagDecode32(uint32 n) { - return (n >> 1) ^ -static_cast(n & 1); -} - -inline uint64 WireFormatLite::ZigZagEncode64(int64 n) { - // Note: the right-shift must be arithmetic - return (n << 1) ^ (n >> 63); -} - -inline int64 WireFormatLite::ZigZagDecode64(uint64 n) { - return (n >> 1) ^ -static_cast(n & 1); -} - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite_inl.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite_inl.h deleted file mode 100644 index 103b0bd0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_lite_inl.h +++ /dev/null @@ -1,774 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// wink@google.com (Wink Saville) (refactored from wire_format.h) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__ -#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__ - -#include -#include -#include -#include -#include -#include -#include - - -namespace google { -namespace protobuf { -namespace internal { - -// Implementation details of ReadPrimitive. - -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int32* value) { - uint32 temp; - if (!input->ReadVarint32(&temp)) return false; - *value = static_cast(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int64* value) { - uint64 temp; - if (!input->ReadVarint64(&temp)) return false; - *value = static_cast(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - uint32* value) { - return input->ReadVarint32(value); -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - uint64* value) { - return input->ReadVarint64(value); -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int32* value) { - uint32 temp; - if (!input->ReadVarint32(&temp)) return false; - *value = ZigZagDecode32(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int64* value) { - uint64 temp; - if (!input->ReadVarint64(&temp)) return false; - *value = ZigZagDecode64(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - uint32* value) { - return input->ReadLittleEndian32(value); -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - uint64* value) { - return input->ReadLittleEndian64(value); -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int32* value) { - uint32 temp; - if (!input->ReadLittleEndian32(&temp)) return false; - *value = static_cast(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int64* value) { - uint64 temp; - if (!input->ReadLittleEndian64(&temp)) return false; - *value = static_cast(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - float* value) { - uint32 temp; - if (!input->ReadLittleEndian32(&temp)) return false; - *value = DecodeFloat(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - double* value) { - uint64 temp; - if (!input->ReadLittleEndian64(&temp)) return false; - *value = DecodeDouble(temp); - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - bool* value) { - uint32 temp; - if (!input->ReadVarint32(&temp)) return false; - *value = temp != 0; - return true; -} -template <> -inline bool WireFormatLite::ReadPrimitive( - io::CodedInputStream* input, - int* value) { - uint32 temp; - if (!input->ReadVarint32(&temp)) return false; - *value = static_cast(temp); - return true; -} - -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - uint32, WireFormatLite::TYPE_FIXED32>( - const uint8* buffer, - uint32* value) { - return io::CodedInputStream::ReadLittleEndian32FromArray(buffer, value); -} -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - uint64, WireFormatLite::TYPE_FIXED64>( - const uint8* buffer, - uint64* value) { - return io::CodedInputStream::ReadLittleEndian64FromArray(buffer, value); -} -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - int32, WireFormatLite::TYPE_SFIXED32>( - const uint8* buffer, - int32* value) { - uint32 temp; - buffer = io::CodedInputStream::ReadLittleEndian32FromArray(buffer, &temp); - *value = static_cast(temp); - return buffer; -} -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - int64, WireFormatLite::TYPE_SFIXED64>( - const uint8* buffer, - int64* value) { - uint64 temp; - buffer = io::CodedInputStream::ReadLittleEndian64FromArray(buffer, &temp); - *value = static_cast(temp); - return buffer; -} -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - float, WireFormatLite::TYPE_FLOAT>( - const uint8* buffer, - float* value) { - uint32 temp; - buffer = io::CodedInputStream::ReadLittleEndian32FromArray(buffer, &temp); - *value = DecodeFloat(temp); - return buffer; -} -template <> -inline const uint8* WireFormatLite::ReadPrimitiveFromArray< - double, WireFormatLite::TYPE_DOUBLE>( - const uint8* buffer, - double* value) { - uint64 temp; - buffer = io::CodedInputStream::ReadLittleEndian64FromArray(buffer, &temp); - *value = DecodeDouble(temp); - return buffer; -} - -template -inline bool WireFormatLite::ReadRepeatedPrimitive(int, // tag_size, unused. - uint32 tag, - io::CodedInputStream* input, - RepeatedField* values) { - CType value; - if (!ReadPrimitive(input, &value)) return false; - values->Add(value); - int elements_already_reserved = values->Capacity() - values->size(); - while (elements_already_reserved > 0 && input->ExpectTag(tag)) { - if (!ReadPrimitive(input, &value)) return false; - values->AddAlreadyReserved(value); - elements_already_reserved--; - } - return true; -} - -template -inline bool WireFormatLite::ReadRepeatedFixedSizePrimitive( - int tag_size, - uint32 tag, - io::CodedInputStream* input, - RepeatedField* values) { - GOOGLE_DCHECK_EQ(UInt32Size(tag), tag_size); - CType value; - if (!ReadPrimitive(input, &value)) - return false; - values->Add(value); - - // For fixed size values, repeated values can be read more quickly by - // reading directly from a raw array. - // - // We can get a tight loop by only reading as many elements as can be - // added to the RepeatedField without having to do any resizing. Additionally, - // we only try to read as many elements as are available from the current - // buffer space. Doing so avoids having to perform boundary checks when - // reading the value: the maximum number of elements that can be read is - // known outside of the loop. - const void* void_pointer; - int size; - input->GetDirectBufferPointerInline(&void_pointer, &size); - if (size > 0) { - const uint8* buffer = reinterpret_cast(void_pointer); - // The number of bytes each type occupies on the wire. - const int per_value_size = tag_size + sizeof(value); - - int elements_available = min(values->Capacity() - values->size(), - size / per_value_size); - int num_read = 0; - while (num_read < elements_available && - (buffer = io::CodedInputStream::ExpectTagFromArray( - buffer, tag)) != NULL) { - buffer = ReadPrimitiveFromArray(buffer, &value); - values->AddAlreadyReserved(value); - ++num_read; - } - const int read_bytes = num_read * per_value_size; - if (read_bytes > 0) { - input->Skip(read_bytes); - } - } - return true; -} - -// Specializations of ReadRepeatedPrimitive for the fixed size types, which use -// the optimized code path. -#define READ_REPEATED_FIXED_SIZE_PRIMITIVE(CPPTYPE, DECLARED_TYPE) \ -template <> \ -inline bool WireFormatLite::ReadRepeatedPrimitive< \ - CPPTYPE, WireFormatLite::DECLARED_TYPE>( \ - int tag_size, \ - uint32 tag, \ - io::CodedInputStream* input, \ - RepeatedField* values) { \ - return ReadRepeatedFixedSizePrimitive< \ - CPPTYPE, WireFormatLite::DECLARED_TYPE>( \ - tag_size, tag, input, values); \ -} - -READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32); -READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64); -READ_REPEATED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32); -READ_REPEATED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64); -READ_REPEATED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT); -READ_REPEATED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE); - -#undef READ_REPEATED_FIXED_SIZE_PRIMITIVE - -template -bool WireFormatLite::ReadRepeatedPrimitiveNoInline( - int tag_size, - uint32 tag, - io::CodedInputStream* input, - RepeatedField* value) { - return ReadRepeatedPrimitive( - tag_size, tag, input, value); -} - -template -inline bool WireFormatLite::ReadPackedPrimitive(io::CodedInputStream* input, - RepeatedField* values) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - while (input->BytesUntilLimit() > 0) { - CType value; - if (!ReadPrimitive(input, &value)) return false; - values->Add(value); - } - input->PopLimit(limit); - return true; -} - -template -bool WireFormatLite::ReadPackedPrimitiveNoInline(io::CodedInputStream* input, - RepeatedField* values) { - return ReadPackedPrimitive(input, values); -} - - -inline bool WireFormatLite::ReadGroup(int field_number, - io::CodedInputStream* input, - MessageLite* value) { - if (!input->IncrementRecursionDepth()) return false; - if (!value->MergePartialFromCodedStream(input)) return false; - input->DecrementRecursionDepth(); - // Make sure the last thing read was an end tag for this group. - if (!input->LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP))) { - return false; - } - return true; -} -inline bool WireFormatLite::ReadMessage(io::CodedInputStream* input, - MessageLite* value) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->IncrementRecursionDepth()) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - if (!value->MergePartialFromCodedStream(input)) return false; - // Make sure that parsing stopped when the limit was hit, not at an endgroup - // tag. - if (!input->ConsumedEntireMessage()) return false; - input->PopLimit(limit); - input->DecrementRecursionDepth(); - return true; -} - -// We name the template parameter something long and extremely unlikely to occur -// elsewhere because a *qualified* member access expression designed to avoid -// virtual dispatch, C++03 [basic.lookup.classref] 3.4.5/4 requires that the -// name of the qualifying class to be looked up both in the context of the full -// expression (finding the template parameter) and in the context of the object -// whose member we are accessing. This could potentially find a nested type -// within that object. The standard goes on to require these names to refer to -// the same entity, which this collision would violate. The lack of a safe way -// to avoid this collision appears to be a defect in the standard, but until it -// is corrected, we choose the name to avoid accidental collisions. -template -inline bool WireFormatLite::ReadGroupNoVirtual( - int field_number, io::CodedInputStream* input, - MessageType_WorkAroundCppLookupDefect* value) { - if (!input->IncrementRecursionDepth()) return false; - if (!value-> - MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input)) - return false; - input->DecrementRecursionDepth(); - // Make sure the last thing read was an end tag for this group. - if (!input->LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP))) { - return false; - } - return true; -} -template -inline bool WireFormatLite::ReadMessageNoVirtual( - io::CodedInputStream* input, MessageType_WorkAroundCppLookupDefect* value) { - uint32 length; - if (!input->ReadVarint32(&length)) return false; - if (!input->IncrementRecursionDepth()) return false; - io::CodedInputStream::Limit limit = input->PushLimit(length); - if (!value-> - MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input)) - return false; - // Make sure that parsing stopped when the limit was hit, not at an endgroup - // tag. - if (!input->ConsumedEntireMessage()) return false; - input->PopLimit(limit); - input->DecrementRecursionDepth(); - return true; -} - -// =================================================================== - -inline void WireFormatLite::WriteTag(int field_number, WireType type, - io::CodedOutputStream* output) { - output->WriteTag(MakeTag(field_number, type)); -} - -inline void WireFormatLite::WriteInt32NoTag(int32 value, - io::CodedOutputStream* output) { - output->WriteVarint32SignExtended(value); -} -inline void WireFormatLite::WriteInt64NoTag(int64 value, - io::CodedOutputStream* output) { - output->WriteVarint64(static_cast(value)); -} -inline void WireFormatLite::WriteUInt32NoTag(uint32 value, - io::CodedOutputStream* output) { - output->WriteVarint32(value); -} -inline void WireFormatLite::WriteUInt64NoTag(uint64 value, - io::CodedOutputStream* output) { - output->WriteVarint64(value); -} -inline void WireFormatLite::WriteSInt32NoTag(int32 value, - io::CodedOutputStream* output) { - output->WriteVarint32(ZigZagEncode32(value)); -} -inline void WireFormatLite::WriteSInt64NoTag(int64 value, - io::CodedOutputStream* output) { - output->WriteVarint64(ZigZagEncode64(value)); -} -inline void WireFormatLite::WriteFixed32NoTag(uint32 value, - io::CodedOutputStream* output) { - output->WriteLittleEndian32(value); -} -inline void WireFormatLite::WriteFixed64NoTag(uint64 value, - io::CodedOutputStream* output) { - output->WriteLittleEndian64(value); -} -inline void WireFormatLite::WriteSFixed32NoTag(int32 value, - io::CodedOutputStream* output) { - output->WriteLittleEndian32(static_cast(value)); -} -inline void WireFormatLite::WriteSFixed64NoTag(int64 value, - io::CodedOutputStream* output) { - output->WriteLittleEndian64(static_cast(value)); -} -inline void WireFormatLite::WriteFloatNoTag(float value, - io::CodedOutputStream* output) { - output->WriteLittleEndian32(EncodeFloat(value)); -} -inline void WireFormatLite::WriteDoubleNoTag(double value, - io::CodedOutputStream* output) { - output->WriteLittleEndian64(EncodeDouble(value)); -} -inline void WireFormatLite::WriteBoolNoTag(bool value, - io::CodedOutputStream* output) { - output->WriteVarint32(value ? 1 : 0); -} -inline void WireFormatLite::WriteEnumNoTag(int value, - io::CodedOutputStream* output) { - output->WriteVarint32SignExtended(value); -} - -// See comment on ReadGroupNoVirtual to understand the need for this template -// parameter name. -template -inline void WireFormatLite::WriteGroupNoVirtual( - int field_number, const MessageType_WorkAroundCppLookupDefect& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_START_GROUP, output); - value.MessageType_WorkAroundCppLookupDefect::SerializeWithCachedSizes(output); - WriteTag(field_number, WIRETYPE_END_GROUP, output); -} -template -inline void WireFormatLite::WriteMessageNoVirtual( - int field_number, const MessageType_WorkAroundCppLookupDefect& value, - io::CodedOutputStream* output) { - WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32( - value.MessageType_WorkAroundCppLookupDefect::GetCachedSize()); - value.MessageType_WorkAroundCppLookupDefect::SerializeWithCachedSizes(output); -} - -// =================================================================== - -inline uint8* WireFormatLite::WriteTagToArray(int field_number, - WireType type, - uint8* target) { - return io::CodedOutputStream::WriteTagToArray(MakeTag(field_number, type), - target); -} - -inline uint8* WireFormatLite::WriteInt32NoTagToArray(int32 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint32SignExtendedToArray(value, target); -} -inline uint8* WireFormatLite::WriteInt64NoTagToArray(int64 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint64ToArray( - static_cast(value), target); -} -inline uint8* WireFormatLite::WriteUInt32NoTagToArray(uint32 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint32ToArray(value, target); -} -inline uint8* WireFormatLite::WriteUInt64NoTagToArray(uint64 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint64ToArray(value, target); -} -inline uint8* WireFormatLite::WriteSInt32NoTagToArray(int32 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint32ToArray(ZigZagEncode32(value), - target); -} -inline uint8* WireFormatLite::WriteSInt64NoTagToArray(int64 value, - uint8* target) { - return io::CodedOutputStream::WriteVarint64ToArray(ZigZagEncode64(value), - target); -} -inline uint8* WireFormatLite::WriteFixed32NoTagToArray(uint32 value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian32ToArray(value, target); -} -inline uint8* WireFormatLite::WriteFixed64NoTagToArray(uint64 value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian64ToArray(value, target); -} -inline uint8* WireFormatLite::WriteSFixed32NoTagToArray(int32 value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian32ToArray( - static_cast(value), target); -} -inline uint8* WireFormatLite::WriteSFixed64NoTagToArray(int64 value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian64ToArray( - static_cast(value), target); -} -inline uint8* WireFormatLite::WriteFloatNoTagToArray(float value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian32ToArray(EncodeFloat(value), - target); -} -inline uint8* WireFormatLite::WriteDoubleNoTagToArray(double value, - uint8* target) { - return io::CodedOutputStream::WriteLittleEndian64ToArray(EncodeDouble(value), - target); -} -inline uint8* WireFormatLite::WriteBoolNoTagToArray(bool value, - uint8* target) { - return io::CodedOutputStream::WriteVarint32ToArray(value ? 1 : 0, target); -} -inline uint8* WireFormatLite::WriteEnumNoTagToArray(int value, - uint8* target) { - return io::CodedOutputStream::WriteVarint32SignExtendedToArray(value, target); -} - -inline uint8* WireFormatLite::WriteInt32ToArray(int field_number, - int32 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteInt32NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteInt64ToArray(int field_number, - int64 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteInt64NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteUInt32ToArray(int field_number, - uint32 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteUInt32NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteUInt64ToArray(int field_number, - uint64 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteUInt64NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteSInt32ToArray(int field_number, - int32 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteSInt32NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteSInt64ToArray(int field_number, - int64 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteSInt64NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteFixed32ToArray(int field_number, - uint32 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target); - return WriteFixed32NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteFixed64ToArray(int field_number, - uint64 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target); - return WriteFixed64NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteSFixed32ToArray(int field_number, - int32 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target); - return WriteSFixed32NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteSFixed64ToArray(int field_number, - int64 value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target); - return WriteSFixed64NoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteFloatToArray(int field_number, - float value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target); - return WriteFloatNoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteDoubleToArray(int field_number, - double value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target); - return WriteDoubleNoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteBoolToArray(int field_number, - bool value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteBoolNoTagToArray(value, target); -} -inline uint8* WireFormatLite::WriteEnumToArray(int field_number, - int value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_VARINT, target); - return WriteEnumNoTagToArray(value, target); -} - -inline uint8* WireFormatLite::WriteStringToArray(int field_number, - const string& value, - uint8* target) { - // String is for UTF-8 text only - // WARNING: In wire_format.cc, both strings and bytes are handled by - // WriteString() to avoid code duplication. If the implementations become - // different, you will need to update that usage. - target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); - target = io::CodedOutputStream::WriteVarint32ToArray(value.size(), target); - return io::CodedOutputStream::WriteStringToArray(value, target); -} -inline uint8* WireFormatLite::WriteBytesToArray(int field_number, - const string& value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); - target = io::CodedOutputStream::WriteVarint32ToArray(value.size(), target); - return io::CodedOutputStream::WriteStringToArray(value, target); -} - - -inline uint8* WireFormatLite::WriteGroupToArray(int field_number, - const MessageLite& value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target); - target = value.SerializeWithCachedSizesToArray(target); - return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target); -} -inline uint8* WireFormatLite::WriteMessageToArray(int field_number, - const MessageLite& value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); - target = io::CodedOutputStream::WriteVarint32ToArray( - value.GetCachedSize(), target); - return value.SerializeWithCachedSizesToArray(target); -} - -// See comment on ReadGroupNoVirtual to understand the need for this template -// parameter name. -template -inline uint8* WireFormatLite::WriteGroupNoVirtualToArray( - int field_number, const MessageType_WorkAroundCppLookupDefect& value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target); - target = value.MessageType_WorkAroundCppLookupDefect - ::SerializeWithCachedSizesToArray(target); - return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target); -} -template -inline uint8* WireFormatLite::WriteMessageNoVirtualToArray( - int field_number, const MessageType_WorkAroundCppLookupDefect& value, - uint8* target) { - target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target); - target = io::CodedOutputStream::WriteVarint32ToArray( - value.MessageType_WorkAroundCppLookupDefect::GetCachedSize(), target); - return value.MessageType_WorkAroundCppLookupDefect - ::SerializeWithCachedSizesToArray(target); -} - -// =================================================================== - -inline int WireFormatLite::Int32Size(int32 value) { - return io::CodedOutputStream::VarintSize32SignExtended(value); -} -inline int WireFormatLite::Int64Size(int64 value) { - return io::CodedOutputStream::VarintSize64(static_cast(value)); -} -inline int WireFormatLite::UInt32Size(uint32 value) { - return io::CodedOutputStream::VarintSize32(value); -} -inline int WireFormatLite::UInt64Size(uint64 value) { - return io::CodedOutputStream::VarintSize64(value); -} -inline int WireFormatLite::SInt32Size(int32 value) { - return io::CodedOutputStream::VarintSize32(ZigZagEncode32(value)); -} -inline int WireFormatLite::SInt64Size(int64 value) { - return io::CodedOutputStream::VarintSize64(ZigZagEncode64(value)); -} -inline int WireFormatLite::EnumSize(int value) { - return io::CodedOutputStream::VarintSize32SignExtended(value); -} - -inline int WireFormatLite::StringSize(const string& value) { - return io::CodedOutputStream::VarintSize32(value.size()) + - value.size(); -} -inline int WireFormatLite::BytesSize(const string& value) { - return io::CodedOutputStream::VarintSize32(value.size()) + - value.size(); -} - - -inline int WireFormatLite::GroupSize(const MessageLite& value) { - return value.ByteSize(); -} -inline int WireFormatLite::MessageSize(const MessageLite& value) { - int size = value.ByteSize(); - return io::CodedOutputStream::VarintSize32(size) + size; -} - -// See comment on ReadGroupNoVirtual to understand the need for this template -// parameter name. -template -inline int WireFormatLite::GroupSizeNoVirtual( - const MessageType_WorkAroundCppLookupDefect& value) { - return value.MessageType_WorkAroundCppLookupDefect::ByteSize(); -} -template -inline int WireFormatLite::MessageSizeNoVirtual( - const MessageType_WorkAroundCppLookupDefect& value) { - int size = value.MessageType_WorkAroundCppLookupDefect::ByteSize(); - return io::CodedOutputStream::VarintSize32(size) + size; -} - -} // namespace internal -} // namespace protobuf - -} // namespace google -#endif // GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_unittest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_unittest.cc deleted file mode 100644 index 867970c4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/google/protobuf/wire_format_unittest.cc +++ /dev/null @@ -1,905 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace google { -namespace protobuf { -namespace internal { -namespace { - -TEST(WireFormatTest, EnumsInSync) { - // Verify that WireFormatLite::FieldType and WireFormatLite::CppType match - // FieldDescriptor::Type and FieldDescriptor::CppType. - - EXPECT_EQ(implicit_cast(FieldDescriptor::MAX_TYPE), - implicit_cast(WireFormatLite::MAX_FIELD_TYPE)); - EXPECT_EQ(implicit_cast(FieldDescriptor::MAX_CPPTYPE), - implicit_cast(WireFormatLite::MAX_CPPTYPE)); - - for (int i = 1; i <= WireFormatLite::MAX_FIELD_TYPE; i++) { - EXPECT_EQ( - implicit_cast(FieldDescriptor::TypeToCppType( - static_cast(i))), - implicit_cast(WireFormatLite::FieldTypeToCppType( - static_cast(i)))); - } -} - -TEST(WireFormatTest, MaxFieldNumber) { - // Make sure the max field number constant is accurate. - EXPECT_EQ((1 << (32 - WireFormatLite::kTagTypeBits)) - 1, - FieldDescriptor::kMaxNumber); -} - -TEST(WireFormatTest, Parse) { - unittest::TestAllTypes source, dest; - string data; - - // Serialize using the generated code. - TestUtil::SetAllFields(&source); - source.SerializeToString(&data); - - // Parse using WireFormat. - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectAllFieldsSet(dest); -} - -TEST(WireFormatTest, ParseExtensions) { - unittest::TestAllExtensions source, dest; - string data; - - // Serialize using the generated code. - TestUtil::SetAllExtensions(&source); - source.SerializeToString(&data); - - // Parse using WireFormat. - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectAllExtensionsSet(dest); -} - -TEST(WireFormatTest, ParsePacked) { - unittest::TestPackedTypes source, dest; - string data; - - // Serialize using the generated code. - TestUtil::SetPackedFields(&source); - source.SerializeToString(&data); - - // Parse using WireFormat. - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectPackedFieldsSet(dest); -} - -TEST(WireFormatTest, ParsePackedFromUnpacked) { - // Serialize using the generated code. - unittest::TestUnpackedTypes source; - TestUtil::SetUnpackedFields(&source); - string data = source.SerializeAsString(); - - // Parse using WireFormat. - unittest::TestPackedTypes dest; - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectPackedFieldsSet(dest); -} - -TEST(WireFormatTest, ParseUnpackedFromPacked) { - // Serialize using the generated code. - unittest::TestPackedTypes source; - TestUtil::SetPackedFields(&source); - string data = source.SerializeAsString(); - - // Parse using WireFormat. - unittest::TestUnpackedTypes dest; - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectUnpackedFieldsSet(dest); -} - -TEST(WireFormatTest, ParsePackedExtensions) { - unittest::TestPackedExtensions source, dest; - string data; - - // Serialize using the generated code. - TestUtil::SetPackedExtensions(&source); - source.SerializeToString(&data); - - // Parse using WireFormat. - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - WireFormat::ParseAndMergePartial(&input, &dest); - - // Check. - TestUtil::ExpectPackedExtensionsSet(dest); -} - -TEST(WireFormatTest, ByteSize) { - unittest::TestAllTypes message; - TestUtil::SetAllFields(&message); - - EXPECT_EQ(message.ByteSize(), WireFormat::ByteSize(message)); - message.Clear(); - EXPECT_EQ(0, message.ByteSize()); - EXPECT_EQ(0, WireFormat::ByteSize(message)); -} - -TEST(WireFormatTest, ByteSizeExtensions) { - unittest::TestAllExtensions message; - TestUtil::SetAllExtensions(&message); - - EXPECT_EQ(message.ByteSize(), - WireFormat::ByteSize(message)); - message.Clear(); - EXPECT_EQ(0, message.ByteSize()); - EXPECT_EQ(0, WireFormat::ByteSize(message)); -} - -TEST(WireFormatTest, ByteSizePacked) { - unittest::TestPackedTypes message; - TestUtil::SetPackedFields(&message); - - EXPECT_EQ(message.ByteSize(), WireFormat::ByteSize(message)); - message.Clear(); - EXPECT_EQ(0, message.ByteSize()); - EXPECT_EQ(0, WireFormat::ByteSize(message)); -} - -TEST(WireFormatTest, ByteSizePackedExtensions) { - unittest::TestPackedExtensions message; - TestUtil::SetPackedExtensions(&message); - - EXPECT_EQ(message.ByteSize(), - WireFormat::ByteSize(message)); - message.Clear(); - EXPECT_EQ(0, message.ByteSize()); - EXPECT_EQ(0, WireFormat::ByteSize(message)); -} - -TEST(WireFormatTest, Serialize) { - unittest::TestAllTypes message; - string generated_data; - string dynamic_data; - - TestUtil::SetAllFields(&message); - int size = message.ByteSize(); - - // Serialize using the generated code. - { - io::StringOutputStream raw_output(&generated_data); - io::CodedOutputStream output(&raw_output); - message.SerializeWithCachedSizes(&output); - ASSERT_FALSE(output.HadError()); - } - - // Serialize using WireFormat. - { - io::StringOutputStream raw_output(&dynamic_data); - io::CodedOutputStream output(&raw_output); - WireFormat::SerializeWithCachedSizes(message, size, &output); - ASSERT_FALSE(output.HadError()); - } - - // Should be the same. - // Don't use EXPECT_EQ here because we're comparing raw binary data and - // we really don't want it dumped to stdout on failure. - EXPECT_TRUE(dynamic_data == generated_data); -} - -TEST(WireFormatTest, SerializeExtensions) { - unittest::TestAllExtensions message; - string generated_data; - string dynamic_data; - - TestUtil::SetAllExtensions(&message); - int size = message.ByteSize(); - - // Serialize using the generated code. - { - io::StringOutputStream raw_output(&generated_data); - io::CodedOutputStream output(&raw_output); - message.SerializeWithCachedSizes(&output); - ASSERT_FALSE(output.HadError()); - } - - // Serialize using WireFormat. - { - io::StringOutputStream raw_output(&dynamic_data); - io::CodedOutputStream output(&raw_output); - WireFormat::SerializeWithCachedSizes(message, size, &output); - ASSERT_FALSE(output.HadError()); - } - - // Should be the same. - // Don't use EXPECT_EQ here because we're comparing raw binary data and - // we really don't want it dumped to stdout on failure. - EXPECT_TRUE(dynamic_data == generated_data); -} - -TEST(WireFormatTest, SerializeFieldsAndExtensions) { - unittest::TestFieldOrderings message; - string generated_data; - string dynamic_data; - - TestUtil::SetAllFieldsAndExtensions(&message); - int size = message.ByteSize(); - - // Serialize using the generated code. - { - io::StringOutputStream raw_output(&generated_data); - io::CodedOutputStream output(&raw_output); - message.SerializeWithCachedSizes(&output); - ASSERT_FALSE(output.HadError()); - } - - // Serialize using WireFormat. - { - io::StringOutputStream raw_output(&dynamic_data); - io::CodedOutputStream output(&raw_output); - WireFormat::SerializeWithCachedSizes(message, size, &output); - ASSERT_FALSE(output.HadError()); - } - - // Should be the same. - // Don't use EXPECT_EQ here because we're comparing raw binary data and - // we really don't want it dumped to stdout on failure. - EXPECT_TRUE(dynamic_data == generated_data); - - // Should output in canonical order. - TestUtil::ExpectAllFieldsAndExtensionsInOrder(dynamic_data); - TestUtil::ExpectAllFieldsAndExtensionsInOrder(generated_data); -} - -TEST(WireFormatTest, ParseMultipleExtensionRanges) { - // Make sure we can parse a message that contains multiple extensions ranges. - unittest::TestFieldOrderings source; - string data; - - TestUtil::SetAllFieldsAndExtensions(&source); - source.SerializeToString(&data); - - { - unittest::TestFieldOrderings dest; - EXPECT_TRUE(dest.ParseFromString(data)); - EXPECT_EQ(source.DebugString(), dest.DebugString()); - } - - // Also test using reflection-based parsing. - { - unittest::TestFieldOrderings dest; - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream coded_input(&raw_input); - EXPECT_TRUE(WireFormat::ParseAndMergePartial(&coded_input, &dest)); - EXPECT_EQ(source.DebugString(), dest.DebugString()); - } -} - -const int kUnknownTypeId = 1550055; - -TEST(WireFormatTest, SerializeMessageSet) { - // Set up a TestMessageSet with two known messages and an unknown one. - unittest::TestMessageSet message_set; - message_set.MutableExtension( - unittest::TestMessageSetExtension1::message_set_extension)->set_i(123); - message_set.MutableExtension( - unittest::TestMessageSetExtension2::message_set_extension)->set_str("foo"); - message_set.mutable_unknown_fields()->AddLengthDelimited( - kUnknownTypeId, "bar"); - - string data; - ASSERT_TRUE(message_set.SerializeToString(&data)); - - // Parse back using RawMessageSet and check the contents. - unittest::RawMessageSet raw; - ASSERT_TRUE(raw.ParseFromString(data)); - - EXPECT_EQ(0, raw.unknown_fields().field_count()); - - ASSERT_EQ(3, raw.item_size()); - EXPECT_EQ( - unittest::TestMessageSetExtension1::descriptor()->extension(0)->number(), - raw.item(0).type_id()); - EXPECT_EQ( - unittest::TestMessageSetExtension2::descriptor()->extension(0)->number(), - raw.item(1).type_id()); - EXPECT_EQ(kUnknownTypeId, raw.item(2).type_id()); - - unittest::TestMessageSetExtension1 message1; - EXPECT_TRUE(message1.ParseFromString(raw.item(0).message())); - EXPECT_EQ(123, message1.i()); - - unittest::TestMessageSetExtension2 message2; - EXPECT_TRUE(message2.ParseFromString(raw.item(1).message())); - EXPECT_EQ("foo", message2.str()); - - EXPECT_EQ("bar", raw.item(2).message()); -} - -TEST(WireFormatTest, SerializeMessageSetVariousWaysAreEqual) { - // Serialize a MessageSet to a stream and to a flat array using generated - // code, and also using WireFormat, and check that the results are equal. - // Set up a TestMessageSet with two known messages and an unknown one, as - // above. - - unittest::TestMessageSet message_set; - message_set.MutableExtension( - unittest::TestMessageSetExtension1::message_set_extension)->set_i(123); - message_set.MutableExtension( - unittest::TestMessageSetExtension2::message_set_extension)->set_str("foo"); - message_set.mutable_unknown_fields()->AddLengthDelimited( - kUnknownTypeId, "bar"); - - int size = message_set.ByteSize(); - EXPECT_EQ(size, message_set.GetCachedSize()); - ASSERT_EQ(size, WireFormat::ByteSize(message_set)); - - string flat_data; - string stream_data; - string dynamic_data; - flat_data.resize(size); - stream_data.resize(size); - - // Serialize to flat array - { - uint8* target = reinterpret_cast(string_as_array(&flat_data)); - uint8* end = message_set.SerializeWithCachedSizesToArray(target); - EXPECT_EQ(size, end - target); - } - - // Serialize to buffer - { - io::ArrayOutputStream array_stream(string_as_array(&stream_data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - message_set.SerializeWithCachedSizes(&output_stream); - ASSERT_FALSE(output_stream.HadError()); - } - - // Serialize to buffer with WireFormat. - { - io::StringOutputStream string_stream(&dynamic_data); - io::CodedOutputStream output_stream(&string_stream); - WireFormat::SerializeWithCachedSizes(message_set, size, &output_stream); - ASSERT_FALSE(output_stream.HadError()); - } - - EXPECT_TRUE(flat_data == stream_data); - EXPECT_TRUE(flat_data == dynamic_data); -} - -TEST(WireFormatTest, ParseMessageSet) { - // Set up a RawMessageSet with two known messages and an unknown one. - unittest::RawMessageSet raw; - - { - unittest::RawMessageSet::Item* item = raw.add_item(); - item->set_type_id( - unittest::TestMessageSetExtension1::descriptor()->extension(0)->number()); - unittest::TestMessageSetExtension1 message; - message.set_i(123); - message.SerializeToString(item->mutable_message()); - } - - { - unittest::RawMessageSet::Item* item = raw.add_item(); - item->set_type_id( - unittest::TestMessageSetExtension2::descriptor()->extension(0)->number()); - unittest::TestMessageSetExtension2 message; - message.set_str("foo"); - message.SerializeToString(item->mutable_message()); - } - - { - unittest::RawMessageSet::Item* item = raw.add_item(); - item->set_type_id(kUnknownTypeId); - item->set_message("bar"); - } - - string data; - ASSERT_TRUE(raw.SerializeToString(&data)); - - // Parse as a TestMessageSet and check the contents. - unittest::TestMessageSet message_set; - ASSERT_TRUE(message_set.ParseFromString(data)); - - EXPECT_EQ(123, message_set.GetExtension( - unittest::TestMessageSetExtension1::message_set_extension).i()); - EXPECT_EQ("foo", message_set.GetExtension( - unittest::TestMessageSetExtension2::message_set_extension).str()); - - ASSERT_EQ(1, message_set.unknown_fields().field_count()); - ASSERT_EQ(UnknownField::TYPE_LENGTH_DELIMITED, - message_set.unknown_fields().field(0).type()); - EXPECT_EQ("bar", message_set.unknown_fields().field(0).length_delimited()); - - // Also parse using WireFormat. - unittest::TestMessageSet dynamic_message_set; - io::CodedInputStream input(reinterpret_cast(data.data()), - data.size()); - ASSERT_TRUE(WireFormat::ParseAndMergePartial(&input, &dynamic_message_set)); - EXPECT_EQ(message_set.DebugString(), dynamic_message_set.DebugString()); -} - -TEST(WireFormatTest, RecursionLimit) { - unittest::TestRecursiveMessage message; - message.mutable_a()->mutable_a()->mutable_a()->mutable_a()->set_i(1); - string data; - message.SerializeToString(&data); - - { - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetRecursionLimit(4); - unittest::TestRecursiveMessage message2; - EXPECT_TRUE(message2.ParseFromCodedStream(&input)); - } - - { - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetRecursionLimit(3); - unittest::TestRecursiveMessage message2; - EXPECT_FALSE(message2.ParseFromCodedStream(&input)); - } -} - -TEST(WireFormatTest, UnknownFieldRecursionLimit) { - unittest::TestEmptyMessage message; - message.mutable_unknown_fields() - ->AddGroup(1234) - ->AddGroup(1234) - ->AddGroup(1234) - ->AddGroup(1234) - ->AddVarint(1234, 123); - string data; - message.SerializeToString(&data); - - { - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetRecursionLimit(4); - unittest::TestEmptyMessage message2; - EXPECT_TRUE(message2.ParseFromCodedStream(&input)); - } - - { - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream input(&raw_input); - input.SetRecursionLimit(3); - unittest::TestEmptyMessage message2; - EXPECT_FALSE(message2.ParseFromCodedStream(&input)); - } -} - -TEST(WireFormatTest, ZigZag) { -// avoid line-wrapping -#define LL(x) GOOGLE_LONGLONG(x) -#define ULL(x) GOOGLE_ULONGLONG(x) -#define ZigZagEncode32(x) WireFormatLite::ZigZagEncode32(x) -#define ZigZagDecode32(x) WireFormatLite::ZigZagDecode32(x) -#define ZigZagEncode64(x) WireFormatLite::ZigZagEncode64(x) -#define ZigZagDecode64(x) WireFormatLite::ZigZagDecode64(x) - - EXPECT_EQ(0u, ZigZagEncode32( 0)); - EXPECT_EQ(1u, ZigZagEncode32(-1)); - EXPECT_EQ(2u, ZigZagEncode32( 1)); - EXPECT_EQ(3u, ZigZagEncode32(-2)); - EXPECT_EQ(0x7FFFFFFEu, ZigZagEncode32(0x3FFFFFFF)); - EXPECT_EQ(0x7FFFFFFFu, ZigZagEncode32(0xC0000000)); - EXPECT_EQ(0xFFFFFFFEu, ZigZagEncode32(0x7FFFFFFF)); - EXPECT_EQ(0xFFFFFFFFu, ZigZagEncode32(0x80000000)); - - EXPECT_EQ( 0, ZigZagDecode32(0u)); - EXPECT_EQ(-1, ZigZagDecode32(1u)); - EXPECT_EQ( 1, ZigZagDecode32(2u)); - EXPECT_EQ(-2, ZigZagDecode32(3u)); - EXPECT_EQ(0x3FFFFFFF, ZigZagDecode32(0x7FFFFFFEu)); - EXPECT_EQ(0xC0000000, ZigZagDecode32(0x7FFFFFFFu)); - EXPECT_EQ(0x7FFFFFFF, ZigZagDecode32(0xFFFFFFFEu)); - EXPECT_EQ(0x80000000, ZigZagDecode32(0xFFFFFFFFu)); - - EXPECT_EQ(0u, ZigZagEncode64( 0)); - EXPECT_EQ(1u, ZigZagEncode64(-1)); - EXPECT_EQ(2u, ZigZagEncode64( 1)); - EXPECT_EQ(3u, ZigZagEncode64(-2)); - EXPECT_EQ(ULL(0x000000007FFFFFFE), ZigZagEncode64(LL(0x000000003FFFFFFF))); - EXPECT_EQ(ULL(0x000000007FFFFFFF), ZigZagEncode64(LL(0xFFFFFFFFC0000000))); - EXPECT_EQ(ULL(0x00000000FFFFFFFE), ZigZagEncode64(LL(0x000000007FFFFFFF))); - EXPECT_EQ(ULL(0x00000000FFFFFFFF), ZigZagEncode64(LL(0xFFFFFFFF80000000))); - EXPECT_EQ(ULL(0xFFFFFFFFFFFFFFFE), ZigZagEncode64(LL(0x7FFFFFFFFFFFFFFF))); - EXPECT_EQ(ULL(0xFFFFFFFFFFFFFFFF), ZigZagEncode64(LL(0x8000000000000000))); - - EXPECT_EQ( 0, ZigZagDecode64(0u)); - EXPECT_EQ(-1, ZigZagDecode64(1u)); - EXPECT_EQ( 1, ZigZagDecode64(2u)); - EXPECT_EQ(-2, ZigZagDecode64(3u)); - EXPECT_EQ(LL(0x000000003FFFFFFF), ZigZagDecode64(ULL(0x000000007FFFFFFE))); - EXPECT_EQ(LL(0xFFFFFFFFC0000000), ZigZagDecode64(ULL(0x000000007FFFFFFF))); - EXPECT_EQ(LL(0x000000007FFFFFFF), ZigZagDecode64(ULL(0x00000000FFFFFFFE))); - EXPECT_EQ(LL(0xFFFFFFFF80000000), ZigZagDecode64(ULL(0x00000000FFFFFFFF))); - EXPECT_EQ(LL(0x7FFFFFFFFFFFFFFF), ZigZagDecode64(ULL(0xFFFFFFFFFFFFFFFE))); - EXPECT_EQ(LL(0x8000000000000000), ZigZagDecode64(ULL(0xFFFFFFFFFFFFFFFF))); - - // Some easier-to-verify round-trip tests. The inputs (other than 0, 1, -1) - // were chosen semi-randomly via keyboard bashing. - EXPECT_EQ( 0, ZigZagDecode32(ZigZagEncode32( 0))); - EXPECT_EQ( 1, ZigZagDecode32(ZigZagEncode32( 1))); - EXPECT_EQ( -1, ZigZagDecode32(ZigZagEncode32( -1))); - EXPECT_EQ(14927, ZigZagDecode32(ZigZagEncode32(14927))); - EXPECT_EQ(-3612, ZigZagDecode32(ZigZagEncode32(-3612))); - - EXPECT_EQ( 0, ZigZagDecode64(ZigZagEncode64( 0))); - EXPECT_EQ( 1, ZigZagDecode64(ZigZagEncode64( 1))); - EXPECT_EQ( -1, ZigZagDecode64(ZigZagEncode64( -1))); - EXPECT_EQ(14927, ZigZagDecode64(ZigZagEncode64(14927))); - EXPECT_EQ(-3612, ZigZagDecode64(ZigZagEncode64(-3612))); - - EXPECT_EQ(LL(856912304801416), ZigZagDecode64(ZigZagEncode64( - LL(856912304801416)))); - EXPECT_EQ(LL(-75123905439571256), ZigZagDecode64(ZigZagEncode64( - LL(-75123905439571256)))); -} - -TEST(WireFormatTest, RepeatedScalarsDifferentTagSizes) { - // At one point checks would trigger when parsing repeated fixed scalar - // fields. - protobuf_unittest::TestRepeatedScalarDifferentTagSizes msg1, msg2; - for (int i = 0; i < 100; ++i) { - msg1.add_repeated_fixed32(i); - msg1.add_repeated_int32(i); - msg1.add_repeated_fixed64(i); - msg1.add_repeated_int64(i); - msg1.add_repeated_float(i); - msg1.add_repeated_uint64(i); - } - - // Make sure that we have a variety of tag sizes. - const google::protobuf::Descriptor* desc = msg1.GetDescriptor(); - const google::protobuf::FieldDescriptor* field; - field = desc->FindFieldByName("repeated_fixed32"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(1, WireFormat::TagSize(field->number(), field->type())); - field = desc->FindFieldByName("repeated_int32"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(1, WireFormat::TagSize(field->number(), field->type())); - field = desc->FindFieldByName("repeated_fixed64"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(2, WireFormat::TagSize(field->number(), field->type())); - field = desc->FindFieldByName("repeated_int64"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(2, WireFormat::TagSize(field->number(), field->type())); - field = desc->FindFieldByName("repeated_float"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(3, WireFormat::TagSize(field->number(), field->type())); - field = desc->FindFieldByName("repeated_uint64"); - ASSERT_TRUE(field != NULL); - ASSERT_EQ(3, WireFormat::TagSize(field->number(), field->type())); - - EXPECT_TRUE(msg2.ParseFromString(msg1.SerializeAsString())); - EXPECT_EQ(msg1.DebugString(), msg2.DebugString()); -} - -class WireFormatInvalidInputTest : public testing::Test { - protected: - // Make a serialized TestAllTypes in which the field optional_nested_message - // contains exactly the given bytes, which may be invalid. - string MakeInvalidEmbeddedMessage(const char* bytes, int size) { - const FieldDescriptor* field = - unittest::TestAllTypes::descriptor()->FindFieldByName( - "optional_nested_message"); - GOOGLE_CHECK(field != NULL); - - string result; - - { - io::StringOutputStream raw_output(&result); - io::CodedOutputStream output(&raw_output); - - WireFormatLite::WriteBytes(field->number(), string(bytes, size), &output); - } - - return result; - } - - // Make a serialized TestAllTypes in which the field optionalgroup - // contains exactly the given bytes -- which may be invalid -- and - // possibly no end tag. - string MakeInvalidGroup(const char* bytes, int size, bool include_end_tag) { - const FieldDescriptor* field = - unittest::TestAllTypes::descriptor()->FindFieldByName( - "optionalgroup"); - GOOGLE_CHECK(field != NULL); - - string result; - - { - io::StringOutputStream raw_output(&result); - io::CodedOutputStream output(&raw_output); - - output.WriteVarint32(WireFormat::MakeTag(field)); - output.WriteString(string(bytes, size)); - if (include_end_tag) { - output.WriteVarint32(WireFormatLite::MakeTag( - field->number(), WireFormatLite::WIRETYPE_END_GROUP)); - } - } - - return result; - } -}; - -TEST_F(WireFormatInvalidInputTest, InvalidSubMessage) { - unittest::TestAllTypes message; - - // Control case. - EXPECT_TRUE(message.ParseFromString(MakeInvalidEmbeddedMessage("", 0))); - - // The byte is a valid varint, but not a valid tag (zero). - EXPECT_FALSE(message.ParseFromString(MakeInvalidEmbeddedMessage("\0", 1))); - - // The byte is a malformed varint. - EXPECT_FALSE(message.ParseFromString(MakeInvalidEmbeddedMessage("\200", 1))); - - // The byte is an endgroup tag, but we aren't parsing a group. - EXPECT_FALSE(message.ParseFromString(MakeInvalidEmbeddedMessage("\014", 1))); - - // The byte is a valid varint but not a valid tag (bad wire type). - EXPECT_FALSE(message.ParseFromString(MakeInvalidEmbeddedMessage("\017", 1))); -} - -TEST_F(WireFormatInvalidInputTest, InvalidGroup) { - unittest::TestAllTypes message; - - // Control case. - EXPECT_TRUE(message.ParseFromString(MakeInvalidGroup("", 0, true))); - - // Missing end tag. Groups cannot end at EOF. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("", 0, false))); - - // The byte is a valid varint, but not a valid tag (zero). - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\0", 1, false))); - - // The byte is a malformed varint. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\200", 1, false))); - - // The byte is an endgroup tag, but not the right one for this group. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\014", 1, false))); - - // The byte is a valid varint but not a valid tag (bad wire type). - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\017", 1, true))); -} - -TEST_F(WireFormatInvalidInputTest, InvalidUnknownGroup) { - // Use TestEmptyMessage so that the group made by MakeInvalidGroup will not - // be a known tag number. - unittest::TestEmptyMessage message; - - // Control case. - EXPECT_TRUE(message.ParseFromString(MakeInvalidGroup("", 0, true))); - - // Missing end tag. Groups cannot end at EOF. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("", 0, false))); - - // The byte is a valid varint, but not a valid tag (zero). - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\0", 1, false))); - - // The byte is a malformed varint. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\200", 1, false))); - - // The byte is an endgroup tag, but not the right one for this group. - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\014", 1, false))); - - // The byte is a valid varint but not a valid tag (bad wire type). - EXPECT_FALSE(message.ParseFromString(MakeInvalidGroup("\017", 1, true))); -} - -TEST_F(WireFormatInvalidInputTest, InvalidStringInUnknownGroup) { - // Test a bug fix: SkipMessage should fail if the message contains a string - // whose length would extend beyond the message end. - - unittest::TestAllTypes message; - message.set_optional_string("foo foo foo foo"); - string data; - message.SerializeToString(&data); - - // Chop some bytes off the end. - data.resize(data.size() - 4); - - // Try to skip it. Note that the bug was only present when parsing to an - // UnknownFieldSet. - io::ArrayInputStream raw_input(data.data(), data.size()); - io::CodedInputStream coded_input(&raw_input); - UnknownFieldSet unknown_fields; - EXPECT_FALSE(WireFormat::SkipMessage(&coded_input, &unknown_fields)); -} - -// Test differences between string and bytes. -// Value of a string type must be valid UTF-8 string. When UTF-8 -// validation is enabled (GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED): -// WriteInvalidUTF8String: see error message. -// ReadInvalidUTF8String: see error message. -// WriteValidUTF8String: fine. -// ReadValidUTF8String: fine. -// WriteAnyBytes: fine. -// ReadAnyBytes: fine. -const char * kInvalidUTF8String = "Invalid UTF-8: \xA0\xB0\xC0\xD0"; -// This used to be "Valid UTF-8: \x01\x02\u8C37\u6B4C", but MSVC seems to -// interpret \u differently from GCC. -const char * kValidUTF8String = "Valid UTF-8: \x01\x02\350\260\267\346\255\214"; - -template -bool WriteMessage(const char *value, T *message, string *wire_buffer) { - message->set_data(value); - wire_buffer->clear(); - message->AppendToString(wire_buffer); - return (wire_buffer->size() > 0); -} - -template -bool ReadMessage(const string &wire_buffer, T *message) { - return message->ParseFromArray(wire_buffer.data(), wire_buffer.size()); -} - -TEST(Utf8ValidationTest, WriteInvalidUTF8String) { - string wire_buffer; - protobuf_unittest::OneString input; - vector errors; - { - ScopedMemoryLog log; - WriteMessage(kInvalidUTF8String, &input, &wire_buffer); - errors = log.GetMessages(ERROR); - } -#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED - ASSERT_EQ(1, errors.size()); - EXPECT_EQ("Encountered string containing invalid UTF-8 data while " - "serializing protocol buffer. Strings must contain only UTF-8; " - "use the 'bytes' type for raw bytes.", - errors[0]); - -#else - ASSERT_EQ(0, errors.size()); -#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED -} - -TEST(Utf8ValidationTest, ReadInvalidUTF8String) { - string wire_buffer; - protobuf_unittest::OneString input; - WriteMessage(kInvalidUTF8String, &input, &wire_buffer); - protobuf_unittest::OneString output; - vector errors; - { - ScopedMemoryLog log; - ReadMessage(wire_buffer, &output); - errors = log.GetMessages(ERROR); - } -#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED - ASSERT_EQ(1, errors.size()); - EXPECT_EQ("Encountered string containing invalid UTF-8 data while " - "parsing protocol buffer. Strings must contain only UTF-8; " - "use the 'bytes' type for raw bytes.", - errors[0]); - -#else - ASSERT_EQ(0, errors.size()); -#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED -} - -TEST(Utf8ValidationTest, WriteValidUTF8String) { - string wire_buffer; - protobuf_unittest::OneString input; - vector errors; - { - ScopedMemoryLog log; - WriteMessage(kValidUTF8String, &input, &wire_buffer); - errors = log.GetMessages(ERROR); - } - ASSERT_EQ(0, errors.size()); -} - -TEST(Utf8ValidationTest, ReadValidUTF8String) { - string wire_buffer; - protobuf_unittest::OneString input; - WriteMessage(kValidUTF8String, &input, &wire_buffer); - protobuf_unittest::OneString output; - vector errors; - { - ScopedMemoryLog log; - ReadMessage(wire_buffer, &output); - errors = log.GetMessages(ERROR); - } - ASSERT_EQ(0, errors.size()); - EXPECT_EQ(input.data(), output.data()); -} - -// Bytes: anything can pass as bytes, use invalid UTF-8 string to test -TEST(Utf8ValidationTest, WriteArbitraryBytes) { - string wire_buffer; - protobuf_unittest::OneBytes input; - vector errors; - { - ScopedMemoryLog log; - WriteMessage(kInvalidUTF8String, &input, &wire_buffer); - errors = log.GetMessages(ERROR); - } - ASSERT_EQ(0, errors.size()); -} - -TEST(Utf8ValidationTest, ReadArbitraryBytes) { - string wire_buffer; - protobuf_unittest::OneBytes input; - WriteMessage(kInvalidUTF8String, &input, &wire_buffer); - protobuf_unittest::OneBytes output; - vector errors; - { - ScopedMemoryLog log; - ReadMessage(wire_buffer, &output); - errors = log.GetMessages(ERROR); - } - ASSERT_EQ(0, errors.size()); - EXPECT_EQ(input.data(), output.data()); -} - -} // namespace -} // namespace internal -} // namespace protobuf -} // namespace google diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/solaris/libstdc++.la b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/solaris/libstdc++.la deleted file mode 100644 index 3edf4254..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/src/solaris/libstdc++.la +++ /dev/null @@ -1,51 +0,0 @@ -# libstdc++.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.4a-GCC3.0 (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# --- -# NOTE: This file lives in /usr/sfw/lib on Solaris 10. Unfortunately, -# due to an apparent bug in the Solaris 10 6/06 release, -# /usr/sfw/lib/libstdc++.la is empty. Below is the correct content, -# according to -# http://forum.java.sun.com/thread.jspa?threadID=5073150 -# By passing LDFLAGS='-Lsrc/solaris' to configure, make will pick up -# this copy of the file rather than the empty copy in /usr/sfw/lib. -# -# Also see -# http://www.technicalarticles.org/index.php/Compiling_MySQL_5.0_on_Solaris_10 -# -# Note: this is for 32-bit systems. If you have a 64-bit system, -# uncomment the appropriate dependency_libs line below. -# ---- - -# The name that we can dlopen(3). -dlname='libstdc++.so.6' - -# Names of this library. -library_names='libstdc++.so.6.0.3 libstdc++.so.6 libstdc++.so' - -# The name of the static archive. -old_library='libstdc++.a' - -# Libraries that this one depends upon. -# 32-bit version: -dependency_libs='-lc -lm -L/usr/sfw/lib -lgcc_s' -# 64-bit version: -#dependency_libs='-L/lib/64 -lc -lm -L/usr/sfw/lib/64 -lgcc_s' - -# Version information for libstdc++. -current=6 -age=0 -revision=3 - -# Is this an already installed library? -installed=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/sfw/lib' diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/config.h b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/config.h deleted file mode 100644 index 2c64450a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* protobuf config.h for MSVC. On other platforms, this is generated - * automatically by autoheader / autoconf / configure. */ - -/* the location of */ -#define HASH_MAP_H - -/* the namespace of hash_map/hash_set */ -// Apparently Microsoft decided to move hash_map *back* to the std namespace -// in MSVC 2010: -// http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx -// TODO(kenton): Use unordered_map instead, which is available in MSVC 2010. -#if _MSC_VER < 1310 || _MSC_VER >= 1600 -#define HASH_NAMESPACE std -#else -#define HASH_NAMESPACE stdext -#endif - -/* the location of */ -#define HASH_SET_H - -/* define if the compiler has hash_map */ -#define HAVE_HASH_MAP 1 - -/* define if the compiler has hash_set */ -#define HAVE_HASH_SET 1 - -/* define if you want to use zlib. See readme.txt for additional - * requirements. */ -// #define HAVE_ZLIB 1 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/convert2008to2005.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/convert2008to2005.sh deleted file mode 100755 index 60eccaf3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/convert2008to2005.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -e - -# This script downgrades MSVC 2008 projects to MSVC 2005 projects, allowing -# people with MSVC 2005 to open them. Otherwise, MSVC 2005 simply refuses to -# open projects created with 2008. We run this as part of our release process. -# If you obtained the code direct from version control and you want to use -# MSVC 2005, you may have to run this manually. (Hint: Use Cygwin or MSYS.) - -for file in *.sln; do - echo "downgrading $file..." - sed -i -re 's/Format Version 10.00/Format Version 9.00/g; - s/Visual Studio 2008/Visual Studio 2005/g;' $file -done - -for file in *.vcproj; do - echo "downgrading $file..." - sed -i -re 's/Version="9.00"/Version="8.00"/g;' $file -done - -# Yes, really, that's it. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/extract_includes.bat b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/extract_includes.bat deleted file mode 100755 index 5e513d73..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/extract_includes.bat +++ /dev/null @@ -1,42 +0,0 @@ -md include -md include\google -md include\google\protobuf -md include\google\protobuf\stubs -md include\google\protobuf\io -md include\google\protobuf\compiler -md include\google\protobuf\compiler\cpp -md include\google\protobuf\compiler\java -md include\google\protobuf\compiler\python -copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h -copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h -copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h -copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h -copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h -copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h -copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h -copy ..\src\google\protobuf\generated_message_util.h include\google\protobuf\generated_message_util.h -copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h -copy ..\src\google\protobuf\message.h include\google\protobuf\message.h -copy ..\src\google\protobuf\message_lite.h include\google\protobuf\message_lite.h -copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h -copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h -copy ..\src\google\protobuf\service.h include\google\protobuf\service.h -copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h -copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h -copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h -copy ..\src\google\protobuf\wire_format_lite.h include\google\protobuf\wire_format_lite.h -copy ..\src\google\protobuf\wire_format_lite_inl.h include\google\protobuf\wire_format_lite_inl.h -copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h -copy ..\src\google\protobuf\io\gzip_stream.h include\google\protobuf\io\gzip_stream.h -copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h -copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h -copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h -copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h -copy ..\src\google\protobuf\io\zero_copy_stream_impl_lite.h include\google\protobuf\io\zero_copy_stream_impl_lite.h -copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h -copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h -copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h -copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h -copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h -copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h -copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/readme.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/readme.txt deleted file mode 100644 index 288345ad..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/third_party/protobuf/protobuf/vsprojects/readme.txt +++ /dev/null @@ -1,114 +0,0 @@ -This directory contains project files for compiling Protocol Buffers using -MSVC. This is not the recommended way to do Protocol Buffer development -- -we prefer to develop under a Unix-like environment -- but it may be more -accessible to those who primarily work with MSVC. - -Compiling and Installing -======================== - -1) Open protobuf.sln in Microsoft Visual Studio. -2) Choose "Debug" or "Release" configuration as desired.* -3) From the Build menu, choose "Build Solution". Wait for compiling to finish. -4) From a command shell, run tests.exe and lite-test.exe and check that all - tests pass. -5) Run extract_includes.bat to copy all the public headers into a separate - "include" directory (under the top-level package directory). -6) Copy the contents of the include directory to wherever you want to put - headers. -7) Copy protoc.exe wherever you put build tools (probably somewhere in your - PATH). -8) Copy libprotobuf.lib, libprotobuf-lite.lib, and libprotoc.lib wherever you - put libraries. - -* To avoid conflicts between the MSVC debug and release runtime libraries, when - compiling a debug build of your application, you may need to link against a - debug build of libprotobuf.lib. Similarly, release builds should link against - release libs. - -DLLs vs. static linking -======================= - -Static linking is now the default for the Protocol Buffer libraries. Due to -issues with Win32's use of a separate heap for each DLL, as well as binary -compatibility issues between different versions of MSVC's STL library, it is -recommended that you use static linkage only. However, it is possible to -build libprotobuf and libprotoc as DLLs if you really want. To do this, -do the following: - - 1) Open protobuf.sln in MSVC. - 2) For each of the projects libprotobuf, libprotobuf-lite, and libprotoc, do - the following: - 2a) Right-click the project and choose "properties". - 2b) From the side bar, choose "General", under "Configuration Properties". - 2c) Change the "Configuration Type" to "Dynamic Library (.dll)". - 2d) From the side bar, choose "Preprocessor", under "C/C++". - 2e) Add PROTOBUF_USE_DLLS to the list of preprocessor defines. - 3) When compiling your project, make sure to #define PROTOBUF_USE_DLLS. - -When distributing your software to end users, we strongly recommend that you -do NOT install libprotobuf.dll or libprotoc.dll to any shared location. -Instead, keep these libraries next to your binaries, in your application's -own install directory. C++ makes it very difficult to maintain binary -compatibility between releases, so it is likely that future versions of these -libraries will *not* be usable as drop-in replacements. - -If your project is itself a DLL intended for use by third-party software, we -recommend that you do NOT expose protocol buffer objects in your library's -public interface, and that you statically link protocol buffers into your -library. - -ZLib support -============ - -If you want to include GzipInputStream and GzipOutputStream -(google/protobuf/io/gzip_stream.h) in libprotoc, you will need to do a few -additional steps: - -1) Obtain a copy of the zlib library. The pre-compiled DLL at zlib.net works. -2) Make sure zlib's two headers are in your include path and that the .lib file - is in your library path. You could place all three files directly into the - vsproject directory to compile libprotobuf, but they need to be visible to - your own project as well, so you should probably just put them into the - VC shared icnlude and library directories. -3) Right-click on the "tests" project and choose "properties". Navigate the - sidebar to "Configuration Properties" -> "Linker" -> "Input". -4) Under "Additional Dependencies", add the name of the zlib .lib file (e.g. - zdll.lib). Make sure to update both the Debug and Release configurations. -5) If you are compiling libprotobuf and libprotoc as DLLs (see previous - section), repeat steps 2 and 3 for the libprotobuf and libprotoc projects. - If you are compiling them as static libraries, then you will need to link - against the zlib library directly from your own app. -6) Edit config.h (in the vsprojects directory) and un-comment the line that - #defines HAVE_ZLIB. (Or, alternatively, define this macro via the project - settings.) - -Notes on Compiler Warnings -========================== - -The following warnings have been disabled while building the protobuf libraries -and compiler. You may have to disable some of them in your own project as -well, or live with them. - -C4018 - 'expression' : signed/unsigned mismatch -C4146 - unary minus operator applied to unsigned type, result still unsigned -C4244 - Conversion from 'type1' to 'type2', possible loss of data. -C4251 - 'identifier' : class 'type' needs to have dll-interface to be used by - clients of class 'type2' -C4267 - Conversion from 'size_t' to 'type', possible loss of data. -C4305 - 'identifier' : truncation from 'type1' to 'type2' -C4355 - 'this' : used in base member initializer list -C4800 - 'type' : forcing value to bool 'true' or 'false' (performance warning) -C4996 - 'function': was declared deprecated - -C4251 is of particular note, if you are compiling the Protocol Buffer library -as a DLL (see previous section). The protocol buffer library uses templates in -its public interfaces. MSVC does not provide any reasonable way to export -template classes from a DLL. However, in practice, it appears that exporting -templates is not necessary anyway. Since the complete definition of any -template is available in the header files, anyone importing the DLL will just -end up compiling instances of the templates into their own binary. The -Protocol Buffer implementation does not rely on static template members being -unique, so there should be no problem with this, but MSVC prints warning -nevertheless. So, we disable it. Unfortunately, this warning will also be -produced when compiling code which merely uses protocol buffers, meaning you -may have to disable it in your code too. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/AUTHORS b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/AUTHORS deleted file mode 100644 index f0b6752a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -# Names should be added to this file like so: -# Name or Organization - -Google Inc. -Steven Knight diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/DEPS b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/DEPS deleted file mode 100644 index 4a46eba7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/DEPS +++ /dev/null @@ -1,8 +0,0 @@ -# DEPS file for gclient use in buildbot execution of gyp tests. -# -# (You don't need to use gclient for normal GYP development work.) - -deps = { - "scons": - "svn://chrome-svn.corp.google.com/chrome/trunk/src/third_party/scons", -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/LICENSE b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/LICENSE deleted file mode 100644 index ab6b011a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/codereview.settings b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/codereview.settings deleted file mode 100644 index fe131994..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/codereview.settings +++ /dev/null @@ -1,10 +0,0 @@ -# This file is used by gcl to get repository specific information. -CODE_REVIEW_SERVER: codereview.chromium.org -CC_LIST: gyp-developer@googlegroups.com -VIEW_VC: http://code.google.com/p/gyp/source/detail?r= -TRY_ON_UPLOAD: True -TRYSERVER_HTTP_HOST: chrome-tryserver.corp.google.com -TRYSERVER_HTTP_PORT: 8023 -TRYSERVER_PROJECT: gyp -TRYSERVER_PATCHLEVEL: 1 -TRYSERVER_ROOT: trunk diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp deleted file mode 100755 index d52e7116..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -# TODO(mark): sys.path manipulation is some temporary testing stuff. -try: - import gyp -except ImportError, e: - import os.path - sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) - import gyp - -if __name__ == '__main__': - sys.exit(gyp.main(sys.argv[1:])) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp.bat b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp.bat deleted file mode 100644 index 90fbc6d3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp.bat +++ /dev/null @@ -1,5 +0,0 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python "%~dp0/gyp" %* diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp_dummy.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp_dummy.c deleted file mode 100644 index 4cce7f66..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyp_dummy.c +++ /dev/null @@ -1,3 +0,0 @@ -int main() { - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyptest.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyptest.py deleted file mode 100644 index 8ac75f19..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/gyptest.py +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -__doc__ = """ -gyptest.py -- test runner for GYP tests. -""" - -import os -import optparse -import subprocess -import sys - -class CommandRunner: - """ - Executor class for commands, including "commands" implemented by - Python functions. - """ - verbose = True - active = True - - def __init__(self, dictionary={}): - self.subst_dictionary(dictionary) - - def subst_dictionary(self, dictionary): - self._subst_dictionary = dictionary - - def subst(self, string, dictionary=None): - """ - Substitutes (via the format operator) the values in the specified - dictionary into the specified command. - - The command can be an (action, string) tuple. In all cases, we - perform substitution on strings and don't worry if something isn't - a string. (It's probably a Python function to be executed.) - """ - if dictionary is None: - dictionary = self._subst_dictionary - if dictionary: - try: - string = string % dictionary - except TypeError: - pass - return string - - def display(self, command, stdout=None, stderr=None): - if not self.verbose: - return - if type(command) == type(()): - func = command[0] - args = command[1:] - s = '%s(%s)' % (func.__name__, ', '.join(map(repr, args))) - if type(command) == type([]): - # TODO: quote arguments containing spaces - # TODO: handle meta characters? - s = ' '.join(command) - else: - s = self.subst(command) - if not s.endswith('\n'): - s += '\n' - sys.stdout.write(s) - sys.stdout.flush() - - def execute(self, command, stdout=None, stderr=None): - """ - Executes a single command. - """ - if not self.active: - return 0 - if type(command) == type(''): - command = self.subst(command) - cmdargs = shlex.split(command) - if cmdargs[0] == 'cd': - command = (os.chdir,) + tuple(cmdargs[1:]) - if type(command) == type(()): - func = command[0] - args = command[1:] - return func(*args) - else: - if stdout is sys.stdout: - # Same as passing sys.stdout, except python2.4 doesn't fail on it. - subout = None - else: - # Open pipe for anything else so Popen works on python2.4. - subout = subprocess.PIPE - if stderr is sys.stderr: - # Same as passing sys.stderr, except python2.4 doesn't fail on it. - suberr = None - elif stderr is None: - # Merge with stdout if stderr isn't specified. - suberr = subprocess.STDOUT - else: - # Open pipe for anything else so Popen works on python2.4. - suberr = subprocess.PIPE - p = subprocess.Popen(command, - shell=(sys.platform == 'win32'), - stdout=subout, - stderr=suberr) - p.wait() - if stdout is None: - self.stdout = p.stdout.read() - elif stdout is not sys.stdout: - stdout.write(p.stdout.read()) - if stderr not in (None, sys.stderr): - stderr.write(p.stderr.read()) - return p.returncode - - def run(self, command, display=None, stdout=None, stderr=None): - """ - Runs a single command, displaying it first. - """ - if display is None: - display = command - self.display(display) - return self.execute(command, stdout, stderr) - - -class Unbuffered: - def __init__(self, fp): - self.fp = fp - def write(self, arg): - self.fp.write(arg) - self.fp.flush() - def __getattr__(self, attr): - return getattr(self.fp, attr) - -sys.stdout = Unbuffered(sys.stdout) -sys.stderr = Unbuffered(sys.stderr) - - -def find_all_gyptest_files(directory): - result = [] - for root, dirs, files in os.walk(directory): - if '.svn' in dirs: - dirs.remove('.svn') - result.extend([ os.path.join(root, f) for f in files - if f.startswith('gyptest') and f.endswith('.py') ]) - result.sort() - return result - - -def main(argv=None): - if argv is None: - argv = sys.argv - - usage = "gyptest.py [-ahlnq] [-f formats] [test ...]" - parser = optparse.OptionParser(usage=usage) - parser.add_option("-a", "--all", action="store_true", - help="run all tests") - parser.add_option("-C", "--chdir", action="store", default=None, - help="chdir to the specified directory") - parser.add_option("-f", "--format", action="store", default='', - help="run tests with the specified formats") - parser.add_option("-l", "--list", action="store_true", - help="list available tests and exit") - parser.add_option("-n", "--no-exec", action="store_true", - help="no execute, just print the command line") - parser.add_option("--passed", action="store_true", - help="report passed tests") - parser.add_option("--path", action="append", default=[], - help="additional $PATH directory") - parser.add_option("-q", "--quiet", action="store_true", - help="quiet, don't print test command lines") - opts, args = parser.parse_args(argv[1:]) - - if opts.chdir: - os.chdir(opts.chdir) - - if opts.path: - os.environ['PATH'] += ':' + ':'.join(opts.path) - - if not args: - if not opts.all: - sys.stderr.write('Specify -a to get all tests.\n') - return 1 - args = ['test'] - - tests = [] - for arg in args: - if os.path.isdir(arg): - tests.extend(find_all_gyptest_files(os.path.normpath(arg))) - else: - tests.append(arg) - - if opts.list: - for test in tests: - print test - sys.exit(0) - - CommandRunner.verbose = not opts.quiet - CommandRunner.active = not opts.no_exec - cr = CommandRunner() - - os.environ['PYTHONPATH'] = os.path.abspath('test/lib') - if not opts.quiet: - sys.stdout.write('PYTHONPATH=%s\n' % os.environ['PYTHONPATH']) - - passed = [] - failed = [] - no_result = [] - - if opts.format: - format_list = opts.format.split(',') - else: - # TODO: not duplicate this mapping from pylib/gyp/__init__.py - format_list = [ { - 'freebsd7': 'make', - 'freebsd8': 'make', - 'cygwin': 'msvs', - 'win32': 'msvs', - 'linux2': 'scons', - 'darwin': 'xcode', - }[sys.platform] ] - - for format in format_list: - os.environ['TESTGYP_FORMAT'] = format - if not opts.quiet: - sys.stdout.write('TESTGYP_FORMAT=%s\n' % format) - - for test in tests: - status = cr.run([sys.executable, test], - stdout=sys.stdout, - stderr=sys.stderr) - if status == 2: - no_result.append(test) - elif status: - failed.append(test) - else: - passed.append(test) - - if not opts.quiet: - def report(description, tests): - if tests: - if len(tests) == 1: - sys.stdout.write("\n%s the following test:\n" % description) - else: - fmt = "\n%s the following %d tests:\n" - sys.stdout.write(fmt % (description, len(tests))) - sys.stdout.write("\t" + "\n\t".join(tests) + "\n") - - if opts.passed: - report("Passed", passed) - report("Failed", failed) - report("No result from", no_result) - - if failed: - return 1 - else: - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSNew.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSNew.py deleted file mode 100644 index f18e5b69..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSNew.py +++ /dev/null @@ -1,331 +0,0 @@ -#!/usr/bin/python2.4 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""New implementation of Visual Studio project generation for SCons.""" - -import common -import os -import random - -# hashlib is supplied as of Python 2.5 as the replacement interface for md5 -# and other secure hashes. In 2.6, md5 is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import md5 otherwise, -# preserving 2.4 compatibility. -try: - import hashlib - _new_md5 = hashlib.md5 -except ImportError: - import md5 - _new_md5 = md5.new - - -# Initialize random number generator -random.seed() - -# GUIDs for project types -ENTRY_TYPE_GUIDS = { - 'project': '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}', - 'folder': '{2150E333-8FDC-42A3-9474-1A3956D46DE8}', -} - -#------------------------------------------------------------------------------ -# Helper functions - - -def MakeGuid(name, seed='msvs_new'): - """Returns a GUID for the specified target name. - - Args: - name: Target name. - seed: Seed for MD5 hash. - Returns: - A GUID-line string calculated from the name and seed. - - This generates something which looks like a GUID, but depends only on the - name and seed. This means the same name/seed will always generate the same - GUID, so that projects and solutions which refer to each other can explicitly - determine the GUID to refer to explicitly. It also means that the GUID will - not change when the project for a target is rebuilt. - """ - # Calculate a MD5 signature for the seed and name. - d = _new_md5(str(seed) + str(name)).hexdigest().upper() - # Convert most of the signature to GUID form (discard the rest) - guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20] - + '-' + d[20:32] + '}') - return guid - -#------------------------------------------------------------------------------ - - -class MSVSFolder: - """Folder in a Visual Studio project or solution.""" - - def __init__(self, path, name = None, entries = None, - guid = None, items = None): - """Initializes the folder. - - Args: - path: Full path to the folder. - name: Name of the folder. - entries: List of folder entries to nest inside this folder. May contain - Folder or Project objects. May be None, if the folder is empty. - guid: GUID to use for folder, if not None. - items: List of solution items to include in the folder project. May be - None, if the folder does not directly contain items. - """ - if name: - self.name = name - else: - # Use last layer. - self.name = os.path.basename(path) - - self.path = path - self.guid = guid - - # Copy passed lists (or set to empty lists) - self.entries = list(entries or []) - self.items = list(items or []) - - self.entry_type_guid = ENTRY_TYPE_GUIDS['folder'] - - def get_guid(self): - if self.guid is None: - # Use consistent guids for folders (so things don't regenerate). - self.guid = MakeGuid(self.path, seed='msvs_folder') - return self.guid - - -#------------------------------------------------------------------------------ - - -class MSVSProject: - """Visual Studio project.""" - - def __init__(self, path, name = None, dependencies = None, guid = None, - config_platform_overrides = None): - """Initializes the project. - - Args: - path: Relative path to project file. - name: Name of project. If None, the name will be the same as the base - name of the project file. - dependencies: List of other Project objects this project is dependent - upon, if not None. - guid: GUID to use for project, if not None. - config_platform_overrides: optional dict of configuration platforms to - used in place of the default for this target. - """ - self.path = path - self.guid = guid - - if name: - self.name = name - else: - # Use project filename - self.name = os.path.splitext(os.path.basename(path))[0] - - # Copy passed lists (or set to empty lists) - self.dependencies = list(dependencies or []) - - self.entry_type_guid = ENTRY_TYPE_GUIDS['project'] - - if config_platform_overrides: - self.config_platform_overrides = config_platform_overrides - else: - self.config_platform_overrides = {} - - def get_guid(self): - if self.guid is None: - # Set GUID from path - # TODO(rspangler): This is fragile. - # 1. We can't just use the project filename sans path, since there could - # be multiple projects with the same base name (for example, - # foo/unittest.vcproj and bar/unittest.vcproj). - # 2. The path needs to be relative to $SOURCE_ROOT, so that the project - # GUID is the same whether it's included from base/base.sln or - # foo/bar/baz/baz.sln. - # 3. The GUID needs to be the same each time this builder is invoked, so - # that we don't need to rebuild the solution when the project changes. - # 4. We should be able to handle pre-built project files by reading the - # GUID from the files. - self.guid = MakeGuid(self.name) - return self.guid - -#------------------------------------------------------------------------------ - - -class MSVSSolution: - """Visual Studio solution.""" - - def __init__(self, path, version, entries=None, variants=None, - websiteProperties=True): - """Initializes the solution. - - Args: - path: Path to solution file. - version: Format version to emit. - entries: List of entries in solution. May contain Folder or Project - objects. May be None, if the folder is empty. - variants: List of build variant strings. If none, a default list will - be used. - websiteProperties: Flag to decide if the website properties section - is generated. - """ - self.path = path - self.websiteProperties = websiteProperties - self.version = version - - # Copy passed lists (or set to empty lists) - self.entries = list(entries or []) - - if variants: - # Copy passed list - self.variants = variants[:] - else: - # Use default - self.variants = ['Debug|Win32', 'Release|Win32'] - # TODO(rspangler): Need to be able to handle a mapping of solution config - # to project config. Should we be able to handle variants being a dict, - # or add a separate variant_map variable? If it's a dict, we can't - # guarantee the order of variants since dict keys aren't ordered. - - - # TODO(rspangler): Automatically write to disk for now; should delay until - # node-evaluation time. - self.Write() - - - def Write(self, writer=common.WriteOnDiff): - """Writes the solution file to disk. - - Raises: - IndexError: An entry appears multiple times. - """ - # Walk the entry tree and collect all the folders and projects. - all_entries = [] - entries_to_check = self.entries[:] - while entries_to_check: - # Pop from the beginning of the list to preserve the user's order. - e = entries_to_check.pop(0) - - # A project or folder can only appear once in the solution's folder tree. - # This also protects from cycles. - if e in all_entries: - #raise IndexError('Entry "%s" appears more than once in solution' % - # e.name) - continue - - all_entries.append(e) - - # If this is a folder, check its entries too. - if isinstance(e, MSVSFolder): - entries_to_check += e.entries - - # Sort by name then guid (so things are in order on vs2008). - def NameThenGuid(a, b): - if a.name < b.name: return -1 - if a.name > b.name: return 1 - if a.get_guid() < b.get_guid(): return -1 - if a.get_guid() > b.get_guid(): return 1 - return 0 - - all_entries = sorted(all_entries, NameThenGuid) - - # Open file and print header - f = writer(self.path) - f.write('Microsoft Visual Studio Solution File, ' - 'Format Version %s\r\n' % self.version.SolutionVersion()) - f.write('# %s\r\n' % self.version.Description()) - - # Project entries - for e in all_entries: - f.write('Project("%s") = "%s", "%s", "%s"\r\n' % ( - e.entry_type_guid, # Entry type GUID - e.name, # Folder name - e.path.replace('/', '\\'), # Folder name (again) - e.get_guid(), # Entry GUID - )) - - # TODO(rspangler): Need a way to configure this stuff - if self.websiteProperties: - f.write('\tProjectSection(WebsiteProperties) = preProject\r\n' - '\t\tDebug.AspNetCompiler.Debug = "True"\r\n' - '\t\tRelease.AspNetCompiler.Debug = "False"\r\n' - '\tEndProjectSection\r\n') - - if isinstance(e, MSVSFolder): - if e.items: - f.write('\tProjectSection(SolutionItems) = preProject\r\n') - for i in e.items: - f.write('\t\t%s = %s\r\n' % (i, i)) - f.write('\tEndProjectSection\r\n') - - if isinstance(e, MSVSProject): - if e.dependencies: - f.write('\tProjectSection(ProjectDependencies) = postProject\r\n') - for d in e.dependencies: - f.write('\t\t%s = %s\r\n' % (d.get_guid(), d.get_guid())) - f.write('\tEndProjectSection\r\n') - - f.write('EndProject\r\n') - - # Global section - f.write('Global\r\n') - - # Configurations (variants) - f.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n') - for v in self.variants: - f.write('\t\t%s = %s\r\n' % (v, v)) - f.write('\tEndGlobalSection\r\n') - - # Sort config guids for easier diffing of solution changes. - config_guids = [] - config_guids_overrides = {} - for e in all_entries: - if isinstance(e, MSVSProject): - config_guids.append(e.get_guid()) - config_guids_overrides[e.get_guid()] = e.config_platform_overrides - config_guids.sort() - - f.write('\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n') - for g in config_guids: - for v in self.variants: - nv = config_guids_overrides[g].get(v, v) - # Pick which project configuration to build for this solution - # configuration. - f.write('\t\t%s.%s.ActiveCfg = %s\r\n' % ( - g, # Project GUID - v, # Solution build configuration - nv, # Project build config for that solution config - )) - - # Enable project in this solution configuration. - f.write('\t\t%s.%s.Build.0 = %s\r\n' % ( - g, # Project GUID - v, # Solution build configuration - nv, # Project build config for that solution config - )) - f.write('\tEndGlobalSection\r\n') - - # TODO(rspangler): Should be able to configure this stuff too (though I've - # never seen this be any different) - f.write('\tGlobalSection(SolutionProperties) = preSolution\r\n') - f.write('\t\tHideSolutionNode = FALSE\r\n') - f.write('\tEndGlobalSection\r\n') - - # Folder mappings - # TODO(rspangler): Should omit this section if there are no folders - f.write('\tGlobalSection(NestedProjects) = preSolution\r\n') - for e in all_entries: - if not isinstance(e, MSVSFolder): - continue # Does not apply to projects, only folders - for subentry in e.entries: - f.write('\t\t%s = %s\r\n' % (subentry.get_guid(), e.get_guid())) - f.write('\tEndGlobalSection\r\n') - - f.write('EndGlobal\r\n') - - f.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSProject.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSProject.py deleted file mode 100644 index 18d98e71..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSProject.py +++ /dev/null @@ -1,244 +0,0 @@ -#!/usr/bin/python2.4 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio project reader/writer.""" - -import common -import xml.dom -import xml.dom.minidom -import MSVSNew - -#------------------------------------------------------------------------------ - - -class Tool(object): - """Visual Studio tool.""" - - def __init__(self, name, attrs=None): - """Initializes the tool. - - Args: - name: Tool name. - attrs: Dict of tool attributes; may be None. - """ - self.name = name - self.attrs = attrs or {} - - def CreateElement(self, doc): - """Creates an element for the tool. - - Args: - doc: xml.dom.Document object to use for node creation. - - Returns: - A new xml.dom.Element for the tool. - """ - node = doc.createElement('Tool') - node.setAttribute('Name', self.name) - for k, v in self.attrs.items(): - node.setAttribute(k, v) - return node - - -class Filter(object): - """Visual Studio filter - that is, a virtual folder.""" - - def __init__(self, name, contents=None): - """Initializes the folder. - - Args: - name: Filter (folder) name. - contents: List of filenames and/or Filter objects contained. - """ - self.name = name - self.contents = list(contents or []) - - -#------------------------------------------------------------------------------ - - -class Writer(object): - """Visual Studio XML project writer.""" - - def __init__(self, project_path, version): - """Initializes the project. - - Args: - project_path: Path to the project file. - version: Format version to emit. - """ - self.project_path = project_path - self.doc = None - self.version = version - - def Create(self, name, guid=None, platforms=None): - """Creates the project document. - - Args: - name: Name of the project. - guid: GUID to use for project, if not None. - """ - self.name = name - self.guid = guid or MSVSNew.MakeGuid(self.project_path) - - # Default to Win32 for platforms. - if not platforms: - platforms = ['Win32'] - - # Create XML doc - xml_impl = xml.dom.getDOMImplementation() - self.doc = xml_impl.createDocument(None, 'VisualStudioProject', None) - - # Add attributes to root element - self.n_root = self.doc.documentElement - self.n_root.setAttribute('ProjectType', 'Visual C++') - self.n_root.setAttribute('Version', self.version.ProjectVersion()) - self.n_root.setAttribute('Name', self.name) - self.n_root.setAttribute('ProjectGUID', self.guid) - self.n_root.setAttribute('RootNamespace', self.name) - self.n_root.setAttribute('Keyword', 'Win32Proj') - - # Add platform list - n_platform = self.doc.createElement('Platforms') - self.n_root.appendChild(n_platform) - for platform in platforms: - n = self.doc.createElement('Platform') - n.setAttribute('Name', platform) - n_platform.appendChild(n) - - # Add tool files section - self.n_tool_files = self.doc.createElement('ToolFiles') - self.n_root.appendChild(self.n_tool_files) - - # Add configurations section - self.n_configs = self.doc.createElement('Configurations') - self.n_root.appendChild(self.n_configs) - - # Add empty References section - self.n_root.appendChild(self.doc.createElement('References')) - - # Add files section - self.n_files = self.doc.createElement('Files') - self.n_root.appendChild(self.n_files) - # Keep a dict keyed on filename to speed up access. - self.n_files_dict = dict() - - # Add empty Globals section - self.n_root.appendChild(self.doc.createElement('Globals')) - - def AddToolFile(self, path): - """Adds a tool file to the project. - - Args: - path: Relative path from project to tool file. - """ - n_tool = self.doc.createElement('ToolFile') - n_tool.setAttribute('RelativePath', path) - self.n_tool_files.appendChild(n_tool) - - def _AddConfigToNode(self, parent, config_type, config_name, attrs=None, - tools=None): - """Adds a configuration to the parent node. - - Args: - parent: Destination node. - config_type: Type of configuration node. - config_name: Configuration name. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - """ - # Handle defaults - if not attrs: - attrs = {} - if not tools: - tools = [] - - # Add configuration node and its attributes - n_config = self.doc.createElement(config_type) - n_config.setAttribute('Name', config_name) - for k, v in attrs.items(): - n_config.setAttribute(k, v) - parent.appendChild(n_config) - - # Add tool nodes and their attributes - if tools: - for t in tools: - if isinstance(t, Tool): - n_config.appendChild(t.CreateElement(self.doc)) - else: - n_config.appendChild(Tool(t).CreateElement(self.doc)) - - def AddConfig(self, name, attrs=None, tools=None): - """Adds a configuration to the project. - - Args: - name: Configuration name. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - """ - self._AddConfigToNode(self.n_configs, 'Configuration', name, attrs, tools) - - def _AddFilesToNode(self, parent, files): - """Adds files and/or filters to the parent node. - - Args: - parent: Destination node - files: A list of Filter objects and/or relative paths to files. - - Will call itself recursively, if the files list contains Filter objects. - """ - for f in files: - if isinstance(f, Filter): - node = self.doc.createElement('Filter') - node.setAttribute('Name', f.name) - self._AddFilesToNode(node, f.contents) - else: - node = self.doc.createElement('File') - node.setAttribute('RelativePath', f) - self.n_files_dict[f] = node - parent.appendChild(node) - - def AddFiles(self, files): - """Adds files to the project. - - Args: - files: A list of Filter objects and/or relative paths to files. - - This makes a copy of the file/filter tree at the time of this call. If you - later add files to a Filter object which was passed into a previous call - to AddFiles(), it will not be reflected in this project. - """ - self._AddFilesToNode(self.n_files, files) - # TODO(rspangler) This also doesn't handle adding files to an existing - # filter. That is, it doesn't merge the trees. - - def AddFileConfig(self, path, config, attrs=None, tools=None): - """Adds a configuration to a file. - - Args: - path: Relative path to the file. - config: Name of configuration to add. - attrs: Dict of configuration attributes; may be None. - tools: List of tools (strings or Tool objects); may be None. - - Raises: - ValueError: Relative path does not match any file added via AddFiles(). - """ - # Find the file node with the right relative path - parent = self.n_files_dict.get(path) - if not parent: - raise ValueError('AddFileConfig: file "%s" not in project.' % path) - - # Add the config to the file node - self._AddConfigToNode(parent, 'FileConfiguration', config, attrs, tools) - - def Write(self, writer=common.WriteOnDiff): - """Writes the project file.""" - f = writer(self.project_path) - self.doc.writexml(f, encoding='Windows-1252', addindent=' ', newl='\r\n') - f.close() - -#------------------------------------------------------------------------------ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSToolFile.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSToolFile.py deleted file mode 100644 index bd8fd9ea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSToolFile.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/python2.4 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio project reader/writer.""" - -import common -import xml.dom -import xml.dom.minidom - - -#------------------------------------------------------------------------------ - - -class Writer(object): - """Visual Studio XML tool file writer.""" - - def __init__(self, tool_file_path): - """Initializes the tool file. - - Args: - tool_file_path: Path to the tool file. - """ - self.tool_file_path = tool_file_path - self.doc = None - - def Create(self, name): - """Creates the tool file document. - - Args: - name: Name of the tool file. - """ - self.name = name - - # Create XML doc - xml_impl = xml.dom.getDOMImplementation() - self.doc = xml_impl.createDocument(None, 'VisualStudioToolFile', None) - - # Add attributes to root element - self.n_root = self.doc.documentElement - self.n_root.setAttribute('Version', '8.00') - self.n_root.setAttribute('Name', self.name) - - # Add rules section - self.n_rules = self.doc.createElement('Rules') - self.n_root.appendChild(self.n_rules) - - def AddCustomBuildRule(self, name, cmd, description, - additional_dependencies, - outputs, extensions): - """Adds a rule to the tool file. - - Args: - name: Name of the rule. - description: Description of the rule. - cmd: Command line of the rule. - additional_dependencies: other files which may trigger the rule. - outputs: outputs of the rule. - extensions: extensions handled by the rule. - """ - n_rule = self.doc.createElement('CustomBuildRule') - n_rule.setAttribute('Name', name) - n_rule.setAttribute('ExecutionDescription', description) - n_rule.setAttribute('CommandLine', cmd) - n_rule.setAttribute('Outputs', ';'.join(outputs)) - n_rule.setAttribute('FileExtensions', ';'.join(extensions)) - n_rule.setAttribute('AdditionalDependencies', - ';'.join(additional_dependencies)) - self.n_rules.appendChild(n_rule) - - def Write(self, writer=common.WriteOnDiff): - """Writes the tool file.""" - f = writer(self.tool_file_path) - self.doc.writexml(f, encoding='Windows-1252', addindent=' ', newl='\r\n') - f.close() - -#------------------------------------------------------------------------------ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSUserFile.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSUserFile.py deleted file mode 100644 index 21098e3c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSUserFile.py +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/python2.4 - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Visual Studio user preferences file writer.""" - -import common -import os -import re -import socket # for gethostname -import xml.dom -import xml.dom.minidom - - -#------------------------------------------------------------------------------ - -def _FindCommandInPath(command): - """If there are no slashes in the command given, this function - searches the PATH env to find the given command, and converts it - to an absolute path. We have to do this because MSVS is looking - for an actual file to launch a debugger on, not just a command - line. Note that this happens at GYP time, so anything needing to - be built needs to have a full path.""" - if '/' in command or '\\' in command: - # If the command already has path elements (either relative or - # absolute), then assume it is constructed properly. - return command - else: - # Search through the path list and find an existing file that - # we can access. - paths = os.environ.get('PATH','').split(os.pathsep) - for path in paths: - item = os.path.join(path, command) - if os.path.isfile(item) and os.access(item, os.X_OK): - return item - return command - -def _QuoteWin32CommandLineArgs(args): - new_args = [] - for arg in args: - # Replace all double-quotes with double-double-quotes to escape - # them for cmd shell, and then quote the whole thing if there - # are any. - if arg.find('"') != -1: - arg = '""'.join(arg.split('"')) - arg = '"%s"' % arg - - # Otherwise, if there are any spaces, quote the whole arg. - elif re.search(r'[ \t\n]', arg): - arg = '"%s"' % arg - new_args.append(arg) - return new_args - -class Writer(object): - """Visual Studio XML user user file writer.""" - - def __init__(self, user_file_path, version): - """Initializes the user file. - - Args: - user_file_path: Path to the user file. - """ - self.user_file_path = user_file_path - self.version = version - self.doc = None - - def Create(self, name): - """Creates the user file document. - - Args: - name: Name of the user file. - """ - self.name = name - - # Create XML doc - xml_impl = xml.dom.getDOMImplementation() - self.doc = xml_impl.createDocument(None, 'VisualStudioUserFile', None) - - # Add attributes to root element - self.n_root = self.doc.documentElement - self.n_root.setAttribute('Version', self.version.ProjectVersion()) - self.n_root.setAttribute('Name', self.name) - - # Add configurations section - self.n_configs = self.doc.createElement('Configurations') - self.n_root.appendChild(self.n_configs) - - def _AddConfigToNode(self, parent, config_type, config_name): - """Adds a configuration to the parent node. - - Args: - parent: Destination node. - config_type: Type of configuration node. - config_name: Configuration name. - """ - # Add configuration node and its attributes - n_config = self.doc.createElement(config_type) - n_config.setAttribute('Name', config_name) - parent.appendChild(n_config) - - def AddConfig(self, name): - """Adds a configuration to the project. - - Args: - name: Configuration name. - """ - self._AddConfigToNode(self.n_configs, 'Configuration', name) - - - def AddDebugSettings(self, config_name, command, environment = {}, - working_directory=""): - """Adds a DebugSettings node to the user file for a particular config. - - Args: - command: command line to run. First element in the list is the - executable. All elements of the command will be quoted if - necessary. - working_directory: other files which may trigger the rule. (optional) - """ - command = _QuoteWin32CommandLineArgs(command) - - n_cmd = self.doc.createElement('DebugSettings') - abs_command = _FindCommandInPath(command[0]) - n_cmd.setAttribute('Command', abs_command) - n_cmd.setAttribute('WorkingDirectory', working_directory) - n_cmd.setAttribute('CommandArguments', " ".join(command[1:])) - n_cmd.setAttribute('RemoteMachine', socket.gethostname()) - - if environment and isinstance(environment, dict): - n_cmd.setAttribute('Environment', - " ".join(['%s="%s"' % (key, val) - for (key,val) in environment.iteritems()])) - else: - n_cmd.setAttribute('Environment', '') - - n_cmd.setAttribute('EnvironmentMerge', 'true') - - # Currently these are all "dummy" values that we're just setting - # in the default manner that MSVS does it. We could use some of - # these to add additional capabilities, I suppose, but they might - # not have parity with other platforms then. - n_cmd.setAttribute('Attach', 'false') - n_cmd.setAttribute('DebuggerType', '3') # 'auto' debugger - n_cmd.setAttribute('Remote', '1') - n_cmd.setAttribute('RemoteCommand', '') - n_cmd.setAttribute('HttpUrl', '') - n_cmd.setAttribute('PDBPath', '') - n_cmd.setAttribute('SQLDebugging', '') - n_cmd.setAttribute('DebuggerFlavor', '0') - n_cmd.setAttribute('MPIRunCommand', '') - n_cmd.setAttribute('MPIRunArguments', '') - n_cmd.setAttribute('MPIRunWorkingDirectory', '') - n_cmd.setAttribute('ApplicationCommand', '') - n_cmd.setAttribute('ApplicationArguments', '') - n_cmd.setAttribute('ShimCommand', '') - n_cmd.setAttribute('MPIAcceptMode', '') - n_cmd.setAttribute('MPIAcceptFilter', '') - - # Find the config, and add it if it doesn't exist. - found = False - for config in self.n_configs.childNodes: - if config.getAttribute("Name") == config_name: - found = True - - if not found: - self.AddConfig(config_name) - - # Add the DebugSettings onto the appropriate config. - for config in self.n_configs.childNodes: - if config.getAttribute("Name") == config_name: - config.appendChild(n_cmd) - break - - def Write(self, writer=common.WriteOnDiff): - """Writes the user file.""" - f = writer(self.user_file_path) - self.doc.writexml(f, encoding='Windows-1252', addindent=' ', newl='\r\n') - f.close() - -#------------------------------------------------------------------------------ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSVersion.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSVersion.py deleted file mode 100755 index 7c89ccfe..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/MSVSVersion.py +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Handle version information related to Visual Stuio.""" - -import os -import re -import subprocess -import sys - - -class VisualStudioVersion: - """Information regarding a version of Visual Studio.""" - - def __init__(self, short_name, description, - solution_version, project_version, flat_sln): - self.short_name = short_name - self.description = description - self.solution_version = solution_version - self.project_version = project_version - self.flat_sln = flat_sln - - def ShortName(self): - return self.short_name - - def Description(self): - """Get the full description of the version.""" - return self.description - - def SolutionVersion(self): - """Get the version number of the sln files.""" - return self.solution_version - - def ProjectVersion(self): - """Get the version number of the vcproj files.""" - return self.project_version - - def FlatSolution(self): - return self.flat_sln - - -def _RegistryGetValue(key, value): - """Use reg.exe to read a paricular key. - - While ideally we might use the win32 module, we would like gyp to be - python neutral, so for instance cygwin python lacks this module. - - Arguments: - key: The registry key to read from. - value: The particular value to read. - Return: - The contents there, or None for failure. - """ - # Run reg.exe. - cmd = [os.path.join(os.environ.get('WINDIR', ''), 'System32', 'reg.exe'), - 'query', key, '/v', value] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - text = p.communicate()[0] - # Require a successful return value. - if p.returncode: - return None - # Extract value. - match = re.search(r'REG_\w+[ ]+([^\r]+)\r\n', text) - if not match: - return None - return match.group(1) - - -def _CreateVersion(name): - versions = { - '2008': VisualStudioVersion('2008', - 'Visual Studio 2008', - solution_version='10.00', - project_version='9.00', - flat_sln=False), - '2008e': VisualStudioVersion('2008e', - 'Visual Studio 2008', - solution_version='10.00', - project_version='9.00', - flat_sln=True), - '2005': VisualStudioVersion('2005', - 'Visual Studio 2005', - solution_version='9.00', - project_version='8.00', - flat_sln=False), - '2005e': VisualStudioVersion('2005e', - 'Visual Studio 2005', - solution_version='9.00', - project_version='8.00', - flat_sln=True), - } - return versions.get(name) - - -def _DetectVisualStudioVersions(): - """Collect the list of installed visual studio versions. - - Returns: - A list of visual studio versions installed in descending order of - usage preference. - Base this on the registry and a quick check if devenv.exe exists. - Only versions 8-9 are considered. - Possibilities are: - 2005 - Visual Studio 2005 (8) - 2008 - Visual Studio 2008 (9) - """ - version_to_year = {'8.0': '2005', '9.0': '2008'} - versions = [] - for version in ['9.0', '8.0']: - # Get the install dir for this version. - key = r'HKLM\Software\Microsoft\VisualStudio\%s' % version - path = _RegistryGetValue(key, 'InstallDir') - if not path: - continue - # Check for full. - if os.path.exists(os.path.join(path, 'devenv.exe')): - # Add this one. - versions.append(_CreateVersion(version_to_year[version])) - # Check for express. - elif os.path.exists(os.path.join(path, 'vcexpress.exe')): - # Add this one. - versions.append(_CreateVersion(version_to_year[version] + 'e')) - return versions - - -def SelectVisualStudioVersion(version='auto'): - """Select which version of Visual Studio projects to generate. - - Arguments: - version: Hook to allow caller to force a particular version (vs auto). - Returns: - An object representing a visual studio project format version. - """ - # In auto mode, check environment variable for override. - if version == 'auto': - version = os.environ.get('GYP_MSVS_VERSION', 'auto') - # In auto mode, pick the most preferred version present. - if version == 'auto': - versions = _DetectVisualStudioVersions() - if not versions: - # Default to 2005. - return _CreateVersion('2005') - return versions[0] - # Convert version string into a version object. - return _CreateVersion(version) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/SCons.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/SCons.py deleted file mode 100644 index 76623028..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/SCons.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -SCons generator. - -This contains class definitions and supporting functions for generating -pieces of SCons files for the different types of GYP targets. -""" - -import os - - -def WriteList(fp, list, prefix='', - separator=',\n ', - preamble=None, - postamble=None): - fp.write(preamble or '') - fp.write((separator or ' ').join([prefix + l for l in list])) - fp.write(postamble or '') - - -class TargetBase(object): - """ - Base class for a SCons representation of a GYP target. - """ - is_ignored = False - target_prefix = '' - target_suffix = '' - def __init__(self, spec): - self.spec = spec - def full_product_name(self): - """ - Returns the full name of the product being built: - - * Uses 'product_name' if it's set, else 'target_name'. - * Appends SCons prefix and suffix variables for the target type. - * Prepends 'product_dir' if set. - """ - name = self.spec.get('product_name') or self.spec['target_name'] - name = self.target_prefix + name + self.target_suffix - product_dir = self.spec.get('product_dir') - if product_dir: - name = os.path.join(product_dir, name) - return name - - def write_input_files(self, fp): - """ - Writes the definition of the input files (sources). - """ - sources = self.spec.get('sources') - if not sources: - fp.write('\ninput_files = []\n') - return - preamble = '\ninput_files = [\n ' - postamble = ',\n]\n' - WriteList(fp, map(repr, sources), preamble=preamble, postamble=postamble) - - def builder_call(self): - """ - Returns the actual SCons builder call to build this target. - """ - name = self.full_product_name() - return 'env.%s(%r, input_files)' % (self.builder_name, name) - def write_target(self, fp, src_dir='', pre=''): - """ - Writes the lines necessary to build this target. - """ - fp.write('\n' + pre) - fp.write('_outputs = %s\n' % self.builder_call()) - fp.write('target_files.extend(_outputs)\n') - - -class NoneTarget(TargetBase): - """ - A GYP target type of 'none', implicitly or explicitly. - """ - def write_target(self, fp, pre=''): - fp.write('\ntarget_files.extend(input_files)\n') - - -class SettingsTarget(TargetBase): - """ - A GYP target type of 'settings'. - """ - is_ignored = True - - -compilable_sources_template = """ -_result = [] -for infile in input_files: - if env.compilable(infile): - if (type(infile) == type('') - and (infile.startswith(%(src_dir)r) - or not os.path.isabs(env.subst(infile)))): - # Force files below the build directory by replacing all '..' - # elements in the path with '__': - base, ext = os.path.splitext(os.path.normpath(infile)) - base = [d == '..' and '__' or d for d in base.split('/')] - base = os.path.join(*base) - object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base - if not infile.startswith(%(src_dir)r): - infile = %(src_dir)r + infile - infile = env.%(name)s(object, infile)[0] - else: - infile = env.%(name)s(infile)[0] - _result.append(infile) -input_files = _result -""" - -class CompilableSourcesTargetBase(TargetBase): - """ - An abstract base class for targets that compile their source files. - - We explicitly transform compilable files into object files, - even though SCons could infer that for us, because we want - to control where the object file ends up. (The implicit rules - in SCons always put the object file next to the source file.) - """ - intermediate_builder_name = None - def write_target(self, fp, src_dir='', pre=''): - if self.intermediate_builder_name is None: - raise NotImplementedError - if src_dir and not src_dir.endswith('/'): - src_dir += '/' - variables = { - 'src_dir': src_dir, - 'name': self.intermediate_builder_name, - } - fp.write(compilable_sources_template % variables) - super(CompilableSourcesTargetBase, self).write_target(fp) - - -class ProgramTarget(CompilableSourcesTargetBase): - """ - A GYP target type of 'executable'. - """ - builder_name = 'GypProgram' - intermediate_builder_name = 'StaticObject' - target_prefix = '${PROGPREFIX}' - target_suffix = '${PROGSUFFIX}' - - # TODO: remove these subclass methods by moving the env.File() - # into the base class. - def write_target(self, fp, src_dir='', pre=''): - fp.write('\n_program = env.File(%r)' % self.full_product_name()) - super(ProgramTarget, self).write_target(fp, src_dir, pre) - def builder_call(self): - return 'env.GypProgram(_program, input_files)' - - -class StaticLibraryTarget(CompilableSourcesTargetBase): - """ - A GYP target type of 'static_library'. - """ - builder_name = 'GypStaticLibrary' - intermediate_builder_name = 'StaticObject' - # TODO: enable these - #target_prefix = '${LIBPREFIX}' - #target_suffix = '${LIBSUFFIX}' - - -class SharedLibraryTarget(CompilableSourcesTargetBase): - """ - A GYP target type of 'shared_library'. - """ - builder_name = 'GypSharedLibrary' - intermediate_builder_name = 'SharedObject' - # TODO: enable these - #target_prefix = '${SHLIBPREFIX}' - #target_suffix = '${SHLIBSUFFIX}' - - -class LoadableModuleTarget(CompilableSourcesTargetBase): - """ - A GYP target type of 'loadable_module'. - """ - builder_name = 'GypLoadableModule' - intermediate_builder_name = 'SharedObject' - # TODO: enable these - #target_prefix = '${SHLIBPREFIX}' - #target_suffix = '${SHLIBSUFFIX}' - - -TargetMap = { - None : NoneTarget, - 'none' : NoneTarget, - 'settings' : SettingsTarget, - 'executable' : ProgramTarget, - 'static_library' : StaticLibraryTarget, - 'shared_library' : SharedLibraryTarget, - 'loadable_module' : LoadableModuleTarget, -} - -def Target(spec): - return TargetMap[spec.get('type')](spec) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/__init__.py deleted file mode 100644 index accc297e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/__init__.py +++ /dev/null @@ -1,439 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import copy -import gyp.input -import optparse -import os.path -import re -import shlex -import sys - -# Default debug modes for GYP -debug = {} - -# List of "official" debug modes, but you can use anything you like. -DEBUG_GENERAL = 'general' -DEBUG_VARIABLES = 'variables' -DEBUG_INCLUDES = 'includes' - -def DebugOutput(mode, message): - if mode in gyp.debug.keys(): - print "%s: %s" % (mode.upper(), message) - -def FindBuildFiles(): - extension = '.gyp' - files = os.listdir(os.getcwd()) - build_files = [] - for file in files: - if file[-len(extension):] == extension: - build_files.append(file) - return build_files - - -def Load(build_files, format, default_variables={}, - includes=[], depth='.', params={}, check=False): - """ - Loads one or more specified build files. - default_variables and includes will be copied before use. - Returns the generator for the specified format and the - data returned by loading the specified build files. - """ - default_variables = copy.copy(default_variables) - - # Default variables provided by this program and its modules should be - # named WITH_CAPITAL_LETTERS to provide a distinct "best practice" namespace, - # avoiding collisions with user and automatic variables. - default_variables['GENERATOR'] = format - - generator_name = 'gyp.generator.' + format - # These parameters are passed in order (as opposed to by key) - # because ActivePython cannot handle key parameters to __import__. - generator = __import__(generator_name, globals(), locals(), generator_name) - default_variables.update(generator.generator_default_variables) - - # Give the generator the opportunity to set additional variables based on - # the params it will receive in the output phase. - if getattr(generator, 'CalculateVariables', None): - generator.CalculateVariables(default_variables, params) - - # Fetch the generator specific info that gets fed to input, we use getattr - # so we can default things and the generators only have to provide what - # they need. - generator_input_info = { - 'generator_wants_absolute_build_file_paths': - getattr(generator, 'generator_wants_absolute_build_file_paths', False), - 'generator_handles_variants': - getattr(generator, 'generator_handles_variants', False), - 'non_configuration_keys': - getattr(generator, 'generator_additional_non_configuration_keys', []), - 'path_sections': - getattr(generator, 'generator_additional_path_sections', []), - 'extra_sources_for_rules': - getattr(generator, 'generator_extra_sources_for_rules', []), - 'generator_supports_multiple_toolsets': - getattr(generator, 'generator_supports_multiple_toolsets', False), - } - - # Process the input specific to this generator. - result = gyp.input.Load(build_files, default_variables, includes[:], - depth, generator_input_info, check) - return [generator] + result - -def NameValueListToDict(name_value_list): - """ - Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary - of the pairs. If a string is simply NAME, then the value in the dictionary - is set to True. If VALUE can be converted to an integer, it is. - """ - result = { } - for item in name_value_list: - tokens = item.split('=', 1) - if len(tokens) == 2: - # If we can make it an int, use that, otherwise, use the string. - try: - token_value = int(tokens[1]) - except ValueError: - token_value = tokens[1] - # Set the variable to the supplied value. - result[tokens[0]] = token_value - else: - # No value supplied, treat it as a boolean and set it. - result[tokens[0]] = True - return result - -def ShlexEnv(env_name): - flags = os.environ.get(env_name, []) - if flags: - flags = shlex.split(flags) - return flags - -def FormatOpt(opt, value): - if opt.startswith('--'): - return '%s=%s' % (opt, value) - return opt + value - -def RegenerateAppendFlag(flag, values, predicate, env_name, options): - """Regenerate a list of command line flags, for an option of action='append'. - - The |env_name|, if given, is checked in the environment and used to generate - an initial list of options, then the options that were specified on the - command line (given in |values|) are appended. This matches the handling of - environment variables and command line flags where command line flags override - the environment, while not requiring the environment to be set when the flags - are used again. - """ - flags = [] - if options.use_environment and env_name: - for flag_value in ShlexEnv(env_name): - flags.append(FormatOpt(flag, predicate(flag_value))) - if values: - for flag_value in values: - flags.append(FormatOpt(flag, predicate(flag_value))) - return flags - -def RegenerateFlags(options): - """Given a parsed options object, and taking the environment variables into - account, returns a list of flags that should regenerate an equivalent options - object (even in the absence of the environment variables.) - - Any path options will be normalized relative to depth. - - The format flag is not included, as it is assumed the calling generator will - set that as appropriate. - """ - def FixPath(path): - path = gyp.common.FixIfRelativePath(path, options.depth) - if not path: - return os.path.curdir - return path - - def Noop(value): - return value - - # We always want to ignore the environment when regenerating, to avoid - # duplicate or changed flags in the environment at the time of regeneration. - flags = ['--ignore-environment'] - for name, metadata in options._regeneration_metadata.iteritems(): - opt = metadata['opt'] - value = getattr(options, name) - value_predicate = metadata['type'] == 'path' and FixPath or Noop - action = metadata['action'] - env_name = metadata['env_name'] - if action == 'append': - flags.extend(RegenerateAppendFlag(opt, value, value_predicate, - env_name, options)) - elif action in ('store', None): # None is a synonym for 'store'. - if value: - flags.append(FormatOpt(opt, value_predicate(value))) - elif options.use_environment and env_name and os.environ.get(env_name): - flags.append(FormatOpt(opt, value_predicate(os.environ.get(env_name)))) - elif action in ('store_true', 'store_false'): - if ((action == 'store_true' and value) or - (action == 'store_false' and not value)): - flags.append(opt) - elif options.use_environment and env_name: - print >>sys.stderr, ('Warning: environment regeneration unimplemented ' - 'for %s flag %r env_name %r' % (action, opt, - env_name)) - else: - print >>sys.stderr, ('Warning: regeneration unimplemented for action %r ' - 'flag %r' % (action, opt)) - - return flags - -class RegeneratableOptionParser(optparse.OptionParser): - def __init__(self): - self.__regeneratable_options = {} - optparse.OptionParser.__init__(self) - - def add_option(self, *args, **kw): - """Add an option to the parser. - - This accepts the same arguments as OptionParser.add_option, plus the - following: - regenerate: can be set to False to prevent this option from being included - in regeneration. - env_name: name of environment variable that additional values for this - option come from. - type: adds type='path', to tell the regenerator that the values of - this option need to be made relative to options.depth - """ - env_name = kw.pop('env_name', None) - if 'dest' in kw and kw.pop('regenerate', True): - dest = kw['dest'] - - # The path type is needed for regenerating, for optparse we can just treat - # it as a string. - type = kw.get('type') - if type == 'path': - kw['type'] = 'string' - - self.__regeneratable_options[dest] = { - 'action': kw.get('action'), - 'type': type, - 'env_name': env_name, - 'opt': args[0], - } - - optparse.OptionParser.add_option(self, *args, **kw) - - def parse_args(self, *args): - values, args = optparse.OptionParser.parse_args(self, *args) - values._regeneration_metadata = self.__regeneratable_options - return values, args - -def main(args): - my_name = os.path.basename(sys.argv[0]) - - parser = RegeneratableOptionParser() - usage = 'usage: %s [options ...] [build_file ...]' - parser.set_usage(usage.replace('%s', '%prog')) - parser.add_option('-D', dest='defines', action='append', metavar='VAR=VAL', - env_name='GYP_DEFINES', - help='sets variable VAR to value VAL') - parser.add_option('-f', '--format', dest='formats', action='append', - env_name='GYP_GENERATORS', regenerate=False, - help='output formats to generate') - parser.add_option('--msvs-version', dest='msvs_version', - regenerate=False, - help='Deprecated; use -G msvs_version=MSVS_VERSION instead') - parser.add_option('-I', '--include', dest='includes', action='append', - metavar='INCLUDE', type='path', - help='files to include in all loaded .gyp files') - parser.add_option('--depth', dest='depth', metavar='PATH', type='path', - help='set DEPTH gyp variable to a relative path to PATH') - parser.add_option('-d', '--debug', dest='debug', metavar='DEBUGMODE', - action='append', default=[], help='turn on a debugging ' - 'mode for debugging GYP. Supported modes are "variables" ' - 'and "general"') - parser.add_option('-S', '--suffix', dest='suffix', default='', - help='suffix to add to generated files') - parser.add_option('-G', dest='generator_flags', action='append', default=[], - metavar='FLAG=VAL', env_name='GYP_GENERATOR_FLAGS', - help='sets generator flag FLAG to VAL') - parser.add_option('--generator-output', dest='generator_output', - action='store', default=None, metavar='DIR', type='path', - env_name='GYP_GENERATOR_OUTPUT', - help='puts generated build files under DIR') - parser.add_option('--ignore-environment', dest='use_environment', - action='store_false', default=True, regenerate=False, - help='do not read options from environment variables') - parser.add_option('--check', dest='check', action='store_true', - help='check format of gyp files') - - # We read a few things from ~/.gyp, so set up a var for that. - home_vars = ['HOME'] - if sys.platform in ('cygwin', 'win32'): - home_vars.append('USERPROFILE') - home = None - for home_var in home_vars: - home = os.getenv(home_var) - if home != None: - break - home_dot_gyp = None - if home != None: - home_dot_gyp = os.path.join(home, '.gyp') - if not os.path.exists(home_dot_gyp): - home_dot_gyp = None - - # TODO(thomasvl): add support for ~/.gyp/defaults - - (options, build_files_arg) = parser.parse_args(args) - build_files = build_files_arg - - if not options.formats: - # If no format was given on the command line, then check the env variable. - generate_formats = [] - if options.use_environment: - generate_formats = os.environ.get('GYP_GENERATORS', []) - if generate_formats: - generate_formats = re.split('[\s,]', generate_formats) - if generate_formats: - options.formats = generate_formats - else: - # Nothing in the variable, default based on platform. - options.formats = [ {'darwin': 'xcode', - 'win32': 'msvs', - 'cygwin': 'msvs', - 'freebsd7': 'make', - 'freebsd8': 'make', - 'linux2': 'scons',}[sys.platform] ] - - if not options.generator_output and options.use_environment: - g_o = os.environ.get('GYP_GENERATOR_OUTPUT') - if g_o: - options.generator_output = g_o - - for mode in options.debug: - gyp.debug[mode] = 1 - - # Do an extra check to avoid work when we're not debugging. - if DEBUG_GENERAL in gyp.debug.keys(): - DebugOutput(DEBUG_GENERAL, 'running with these options:') - for (option, value) in options.__dict__.items(): - if option[0] == '_': - continue - if isinstance(value, basestring): - DebugOutput(DEBUG_GENERAL, " %s: '%s'" % (option, value)) - else: - DebugOutput(DEBUG_GENERAL, " %s: %s" % (option, str(value))) - - if not build_files: - build_files = FindBuildFiles() - if not build_files: - print >>sys.stderr, (usage + '\n\n%s: error: no build_file') % \ - (my_name, my_name) - return 1 - - # TODO(mark): Chromium-specific hack! - # For Chromium, the gyp "depth" variable should always be a relative path - # to Chromium's top-level "src" directory. If no depth variable was set - # on the command line, try to find a "src" directory by looking at the - # absolute path to each build file's directory. The first "src" component - # found will be treated as though it were the path used for --depth. - if not options.depth: - for build_file in build_files: - build_file_dir = os.path.abspath(os.path.dirname(build_file)) - build_file_dir_components = build_file_dir.split(os.path.sep) - components_len = len(build_file_dir_components) - for index in xrange(components_len - 1, -1, -1): - if build_file_dir_components[index] == 'src': - options.depth = os.path.sep.join(build_file_dir_components) - break - del build_file_dir_components[index] - - # If the inner loop found something, break without advancing to another - # build file. - if options.depth: - break - - if not options.depth: - raise Exception, \ - 'Could not automatically locate src directory. This is a ' + \ - 'temporary Chromium feature that will be removed. Use ' + \ - '--depth as a workaround.' - - # -D on the command line sets variable defaults - D isn't just for define, - # it's for default. Perhaps there should be a way to force (-F?) a - # variable's value so that it can't be overridden by anything else. - cmdline_default_variables = {} - defines = [] - if options.use_environment: - defines += ShlexEnv('GYP_DEFINES') - if options.defines: - defines += options.defines - cmdline_default_variables = NameValueListToDict(defines) - if DEBUG_GENERAL in gyp.debug.keys(): - DebugOutput(DEBUG_GENERAL, - "cmdline_default_variables: %s" % cmdline_default_variables) - - # Set up includes. - includes = [] - - # If ~/.gyp/include.gypi exists, it'll be forcibly included into every - # .gyp file that's loaded, before anything else is included. - if home_dot_gyp != None: - default_include = os.path.join(home_dot_gyp, 'include.gypi') - if os.path.exists(default_include): - includes.append(default_include) - - # Command-line --include files come after the default include. - if options.includes: - includes.extend(options.includes) - - # Generator flags should be prefixed with the target generator since they - # are global across all generator runs. - gen_flags = [] - if options.use_environment: - gen_flags += ShlexEnv('GYP_GENERATOR_FLAGS') - if options.generator_flags: - gen_flags += options.generator_flags - generator_flags = NameValueListToDict(gen_flags) - if DEBUG_GENERAL in gyp.debug.keys(): - DebugOutput(DEBUG_GENERAL, "generator_flags: %s" % generator_flags) - - # TODO: Remove this and the option after we've gotten folks to move to the - # generator flag. - if options.msvs_version: - print >>sys.stderr, \ - 'DEPRECATED: Use generator flag (-G msvs_version=' + \ - options.msvs_version + ') instead of --msvs-version=' + \ - options.msvs_version - generator_flags['msvs_version'] = options.msvs_version - - # Generate all requested formats (use a set in case we got one format request - # twice) - for format in set(options.formats): - params = {'options': options, - 'build_files': build_files, - 'generator_flags': generator_flags, - 'cwd': os.getcwd(), - 'build_files_arg': build_files_arg, - 'gyp_binary': sys.argv[0], - 'home_dot_gyp': home_dot_gyp} - - # Start with the default variables from the command line. - [generator, flat_list, targets, data] = Load(build_files, format, - cmdline_default_variables, - includes, options.depth, - params, options.check) - - # TODO(mark): Pass |data| for now because the generator needs a list of - # build files that came in. In the future, maybe it should just accept - # a list, and not the whole data dict. - # NOTE: flat_list is the flattened dependency graph specifying the order - # that targets may be built. Build systems that operate serially or that - # need to have dependencies defined before dependents reference them should - # generate targets in the order specified in flat_list. - generator.GenerateOutput(flat_list, targets, data, params) - - # Done - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/common.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/common.py deleted file mode 100644 index f2070bf7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/common.py +++ /dev/null @@ -1,343 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import errno -import filecmp -import os.path -import re -import tempfile -import sys - -def ExceptionAppend(e, msg): - """Append a message to the given exception's message.""" - if not e.args: - e.args = (msg,) - elif len(e.args) == 1: - e.args = (str(e.args[0]) + ' ' + msg,) - else: - e.args = (str(e.args[0]) + ' ' + msg,) + e.args[1:] - - -def ParseQualifiedTarget(target): - # Splits a qualified target into a build file, target name and toolset. - - # NOTE: rsplit is used to disambiguate the Windows drive letter separator. - target_split = target.rsplit(':', 1) - if len(target_split) == 2: - [build_file, target] = target_split - else: - build_file = None - - target_split = target.rsplit('#', 1) - if len(target_split) == 2: - [target, toolset] = target_split - else: - toolset = None - - return [build_file, target, toolset] - - -def ResolveTarget(build_file, target, toolset): - # This function resolves a target into a canonical form: - # - a fully defined build file, either absolute or relative to the current - # directory - # - a target name - # - a toolset - # - # build_file is the file relative to which 'target' is defined. - # target is the qualified target. - # toolset is the default toolset for that target. - [parsed_build_file, target, parsed_toolset] = ParseQualifiedTarget(target) - - if parsed_build_file: - if build_file: - # If a relative path, parsed_build_file is relative to the directory - # containing build_file. If build_file is not in the current directory, - # parsed_build_file is not a usable path as-is. Resolve it by - # interpreting it as relative to build_file. If parsed_build_file is - # absolute, it is usable as a path regardless of the current directory, - # and os.path.join will return it as-is. - build_file = os.path.normpath(os.path.join(os.path.dirname(build_file), - parsed_build_file)) - else: - build_file = parsed_build_file - - if parsed_toolset: - toolset = parsed_toolset - - return [build_file, target, toolset] - - -def BuildFile(fully_qualified_target): - # Extracts the build file from the fully qualified target. - return ParseQualifiedTarget(fully_qualified_target)[0] - - -def QualifiedTarget(build_file, target, toolset): - # "Qualified" means the file that a target was defined in and the target - # name, separated by a colon, suffixed by a # and the toolset name: - # /path/to/file.gyp:target_name#toolset - fully_qualified = build_file + ':' + target - if toolset: - fully_qualified = fully_qualified + '#' + toolset - return fully_qualified - - -def RelativePath(path, relative_to): - # Assuming both |path| and |relative_to| are relative to the current - # directory, returns a relative path that identifies path relative to - # relative_to. - - # Convert to absolute (and therefore normalized paths). - path = os.path.abspath(path) - relative_to = os.path.abspath(relative_to) - - # Split the paths into components. - path_split = path.split(os.path.sep) - relative_to_split = relative_to.split(os.path.sep) - - # Determine how much of the prefix the two paths share. - prefix_len = len(os.path.commonprefix([path_split, relative_to_split])) - - # Put enough ".." components to back up out of relative_to to the common - # prefix, and then append the part of path_split after the common prefix. - relative_split = [os.path.pardir] * (len(relative_to_split) - prefix_len) + \ - path_split[prefix_len:] - - if len(relative_split) == 0: - # The paths were the same. - return '' - - # Turn it back into a string and we're done. - return os.path.join(*relative_split) - - -def FixIfRelativePath(path, relative_to): - # Like RelativePath but returns |path| unchanged if it is absolute. - if os.path.isabs(path): - return path - return RelativePath(path, relative_to) - - -def UnrelativePath(path, relative_to): - # Assuming that |relative_to| is relative to the current directory, and |path| - # is a path relative to the dirname of |relative_to|, returns a path that - # identifies |path| relative to the current directory. - rel_dir = os.path.dirname(relative_to) - return os.path.normpath(os.path.join(rel_dir, path)) - - -# re objects used by EncodePOSIXShellArgument. See IEEE 1003.1 XCU.2.2 at -# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02 -# and the documentation for various shells. - -# _quote is a pattern that should match any argument that needs to be quoted -# with double-quotes by EncodePOSIXShellArgument. It matches the following -# characters appearing anywhere in an argument: -# \t, \n, space parameter separators -# # comments -# $ expansions (quoted to always expand within one argument) -# % called out by IEEE 1003.1 XCU.2.2 -# & job control -# ' quoting -# (, ) subshell execution -# *, ?, [ pathname expansion -# ; command delimiter -# <, >, | redirection -# = assignment -# {, } brace expansion (bash) -# ~ tilde expansion -# It also matches the empty string, because "" (or '') is the only way to -# represent an empty string literal argument to a POSIX shell. -# -# This does not match the characters in _escape, because those need to be -# backslash-escaped regardless of whether they appear in a double-quoted -# string. -_quote = re.compile('[\t\n #$%&\'()*;<=>?[{|}~]|^$') - -# _escape is a pattern that should match any character that needs to be -# escaped with a backslash, whether or not the argument matched the _quote -# pattern. _escape is used with re.sub to backslash anything in _escape's -# first match group, hence the (parentheses) in the regular expression. -# -# _escape matches the following characters appearing anywhere in an argument: -# " to prevent POSIX shells from interpreting this character for quoting -# \ to prevent POSIX shells from interpreting this character for escaping -# ` to prevent POSIX shells from interpreting this character for command -# substitution -# Missing from this list is $, because the desired behavior of -# EncodePOSIXShellArgument is to permit parameter (variable) expansion. -# -# Also missing from this list is !, which bash will interpret as the history -# expansion character when history is enabled. bash does not enable history -# by default in non-interactive shells, so this is not thought to be a problem. -# ! was omitted from this list because bash interprets "\!" as a literal string -# including the backslash character (avoiding history expansion but retaining -# the backslash), which would not be correct for argument encoding. Handling -# this case properly would also be problematic because bash allows the history -# character to be changed with the histchars shell variable. Fortunately, -# as history is not enabled in non-interactive shells and -# EncodePOSIXShellArgument is only expected to encode for non-interactive -# shells, there is no room for error here by ignoring !. -_escape = re.compile(r'(["\\`])') - -def EncodePOSIXShellArgument(argument): - """Encodes |argument| suitably for consumption by POSIX shells. - - argument may be quoted and escaped as necessary to ensure that POSIX shells - treat the returned value as a literal representing the argument passed to - this function. Parameter (variable) expansions beginning with $ are allowed - to remain intact without escaping the $, to allow the argument to contain - references to variables to be expanded by the shell. - """ - - if not isinstance(argument, str): - argument = str(argument) - - if _quote.search(argument): - quote = '"' - else: - quote = '' - - encoded = quote + re.sub(_escape, r'\\\1', argument) + quote - - return encoded - - -def EncodePOSIXShellList(list): - """Encodes |list| suitably for consumption by POSIX shells. - - Returns EncodePOSIXShellArgument for each item in list, and joins them - together using the space character as an argument separator. - """ - - encoded_arguments = [] - for argument in list: - encoded_arguments.append(EncodePOSIXShellArgument(argument)) - return ' '.join(encoded_arguments) - - -def DeepDependencyTargets(target_dicts, roots): - """Returns the recursive list of target dependencies. - """ - dependencies = set() - for r in roots: - spec = target_dicts[r] - r_deps = list(set((spec.get('dependencies', []) + - spec.get('dependencies_original', [])))) - for d in r_deps: - if d not in roots: - dependencies.add(d) - for d in DeepDependencyTargets(target_dicts, r_deps): - if d not in roots: - dependencies.add(d) - return list(dependencies) - - -def BuildFileTargets(target_list, build_file): - """From a target_list, returns the subset from the specified build_file. - """ - return [p for p in target_list if BuildFile(p) == build_file] - - -def AllTargets(target_list, target_dicts, build_file): - """Returns all targets (direct and dependencies) for the specified build_file. - """ - bftargets = BuildFileTargets(target_list, build_file) - deptargets = DeepDependencyTargets(target_dicts, bftargets) - return bftargets + deptargets - - -def WriteOnDiff(filename): - """Write to a file only if the new contents differ. - - Arguments: - filename: name of the file to potentially write to. - Returns: - A file like object which will write to temporary file and only overwrite - the target if it differs (on close). - """ - - class Writer: - """Wrapper around file which only covers the target if it differs.""" - def __init__(self): - # Pick temporary file. - tmp_fd, self.tmp_path = tempfile.mkstemp( - suffix='.tmp', - prefix=os.path.split(filename)[1] + '.gyp.', - dir=os.path.split(filename)[0]) - try: - self.tmp_file = os.fdopen(tmp_fd, 'wb') - except Exception: - # Don't leave turds behind. - os.unlink(self.tmp_path) - raise - - def __getattr__(self, attrname): - # Delegate everything else to self.tmp_file - return getattr(self.tmp_file, attrname) - - def close(self): - try: - # Close tmp file. - self.tmp_file.close() - # Determine if different. - same = False - try: - same = filecmp.cmp(self.tmp_path, filename, False) - except OSError, e: - if e.errno != errno.ENOENT: - raise - - if same: - # The new file is identical to the old one, just get rid of the new - # one. - os.unlink(self.tmp_path) - else: - # The new file is different from the old one, or there is no old one. - # Rename the new file to the permanent name. - # - # tempfile.mkstemp uses an overly restrictive mode, resulting in a - # file that can only be read by the owner, regardless of the umask. - # There's no reason to not respect the umask here, which means that - # an extra hoop is required to fetch it and reset the new file's mode. - # - # No way to get the umask without setting a new one? Set a safe one - # and then set it back to the old value. - umask = os.umask(077) - os.umask(umask) - os.chmod(self.tmp_path, 0666 & ~umask) - if sys.platform == 'win32' and os.path.exists(filename): - # NOTE: on windows (but not cygwin) rename will not replace an - # existing file, so it must be preceded with a remove. Sadly there - # is no way to make the switch atomic. - os.remove(filename) - os.rename(self.tmp_path, filename) - except Exception: - # Don't leave turds behind. - os.unlink(self.tmp_path) - raise - - return Writer() - - -# From Alex Martelli, -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560 -# ASPN: Python Cookbook: Remove duplicates from a sequence -# First comment, dated 2001/10/13. -# (Also in the printed Python Cookbook.) - -def uniquer(seq, idfun=None): - if idfun is None: - def idfun(x): return x - seen = {} - result = [] - for item in seq: - marker = idfun(item) - if marker in seen: continue - seen[marker] = 1 - result.append(item) - return result diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/__init__.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypd.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypd.py deleted file mode 100644 index 948f0b85..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypd.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypd output module - -This module produces gyp input as its output. Output files are given the -.gypd extension to avoid overwriting the .gyp files that they are generated -from. Internal references to .gyp files (such as those found in -"dependencies" sections) are not adjusted to point to .gypd files instead; -unlike other paths, which are relative to the .gyp or .gypd file, such paths -are relative to the directory from which gyp was run to create the .gypd file. - -This generator module is intended to be a sample and a debugging aid, hence -the "d" for "debug" in .gypd. It is useful to inspect the results of the -various merges, expansions, and conditional evaluations performed by gyp -and to see a representation of what would be fed to a generator module. - -It's not advisable to rename .gypd files produced by this module to .gyp, -because they will have all merges, expansions, and evaluations already -performed and the relevant constructs not present in the output; paths to -dependencies may be wrong; and various sections that do not belong in .gyp -files such as such as "included_files" and "*_excluded" will be present. -Output will also be stripped of comments. This is not intended to be a -general-purpose gyp pretty-printer; for that, you probably just want to -run "pprint.pprint(eval(open('source.gyp').read()))", which will still strip -comments but won't do all of the other things done to this module's output. - -The specific formatting of the output generated by this module is subject -to change. -""" - - -import gyp.common -import errno -import os -import pprint - - -# These variables should just be spit back out as variable references. -_generator_identity_variables = [ - 'EXECUTABLE_PREFIX', - 'EXECUTABLE_SUFFIX', - 'INTERMEDIATE_DIR', - 'PRODUCT_DIR', - 'RULE_INPUT_ROOT', - 'RULE_INPUT_EXT', - 'RULE_INPUT_NAME', - 'RULE_INPUT_PATH', - 'SHARED_INTERMEDIATE_DIR', -] - -# gypd doesn't define a default value for OS like many other generator -# modules. Specify "-D OS=whatever" on the command line to provide a value. -generator_default_variables = { -} - -# gypd supports multiple toolsets -generator_supports_multiple_toolsets = True - -# TODO(mark): This always uses <, which isn't right. The input module should -# notify the generator to tell it which phase it is operating in, and this -# module should use < for the early phase and then switch to > for the late -# phase. Bonus points for carrying @ back into the output too. -for v in _generator_identity_variables: - generator_default_variables[v] = '<(%s)' % v - - -def GenerateOutput(target_list, target_dicts, data, params): - output_files = {} - for qualified_target in target_list: - [input_file, target] = \ - gyp.common.ParseQualifiedTarget(qualified_target)[0:2] - - if input_file[-4:] != '.gyp': - continue - input_file_stem = input_file[:-4] - output_file = input_file_stem + params['options'].suffix + '.gypd' - - if not output_file in output_files: - output_files[output_file] = input_file - - for output_file, input_file in output_files.iteritems(): - output = open(output_file, 'w') - pprint.pprint(data[input_file], output) - output.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypsh.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypsh.py deleted file mode 100644 index f48b03fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/gypsh.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypsh output module - -gypsh is a GYP shell. It's not really a generator per se. All it does is -fire up an interactive Python session with a few local variables set to the -variables passed to the generator. Like gypd, it's intended as a debugging -aid, to facilitate the exploration of .gyp structures after being processed -by the input module. - -The expected usage is "gyp -f gypsh -D OS=desired_os". -""" - - -import code -import sys - - -# All of this stuff about generator variables was lovingly ripped from gypd.py. -# That module has a much better description of what's going on and why. -_generator_identity_variables = [ - 'EXECUTABLE_PREFIX', - 'EXECUTABLE_SUFFIX', - 'INTERMEDIATE_DIR', - 'PRODUCT_DIR', - 'RULE_INPUT_ROOT', - 'RULE_INPUT_EXT', - 'RULE_INPUT_NAME', - 'RULE_INPUT_PATH', - 'SHARED_INTERMEDIATE_DIR', -] - -generator_default_variables = { -} - -for v in _generator_identity_variables: - generator_default_variables[v] = '<(%s)' % v - - -def GenerateOutput(target_list, target_dicts, data, params): - locals = { - 'target_list': target_list, - 'target_dicts': target_dicts, - 'data': data, - } - - # Use a banner that looks like the stock Python one and like what - # code.interact uses by default, but tack on something to indicate what - # locals are available, and identify gypsh. - banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \ - (sys.version, sys.platform, repr(sorted(locals.keys()))) - - code.interact(banner, local=locals) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/make.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/make.py deleted file mode 100644 index 6a42065f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/make.py +++ /dev/null @@ -1,1134 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Notes: -# -# This is all roughly based on the Makefile system used by the Linux -# kernel, but is a non-recursive make -- we put the entire dependency -# graph in front of make and let it figure it out. -# -# The code below generates a separate .mk file for each target, but -# all are sourced by the top-level Makefile. This means that all -# variables in .mk-files clobber one another. Be careful to use := -# where appropriate for immediate evaluation, and similarly to watch -# that you're not relying on a variable value to last beween different -# .mk files. -# -# TODOs: -# -# Global settings and utility functions are currently stuffed in the -# toplevel Makefile. It may make sense to generate some .mk files on -# the side to keep the the files readable. - -import gyp -import gyp.common -import os.path - -# Debugging-related imports -- remove me once we're solid. -import code -import pprint - -generator_default_variables = { - 'EXECUTABLE_PREFIX': '', - 'EXECUTABLE_SUFFIX': '', - 'OS': 'linux', - 'STATIC_LIB_PREFIX': 'lib', - 'SHARED_LIB_PREFIX': 'lib', - 'STATIC_LIB_SUFFIX': '.a', - 'SHARED_LIB_SUFFIX': '.so', - 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/geni', - 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen', - 'PRODUCT_DIR': '$(builddir)', - 'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)', - 'LIB_DIR': '$(obj).$(TOOLSET)', - 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python. - 'RULE_INPUT_PATH': '$(abspath $<)', - - # These appear unused -- ??? - 'RULE_INPUT_EXT': 'XXXEXT$(suffix $^)', - 'RULE_INPUT_NAME': 'XXXNAME$(notdir $(basename $^)0', - 'CONFIGURATION_NAME': '$(BUILDTYPE)', -} - -# Make supports multiple toolsets -generator_supports_multiple_toolsets = True - -def ensure_directory_exists(path): - dir = os.path.dirname(path) - if dir and not os.path.exists(dir): - os.makedirs(dir) - -# Header of toplevel Makefile. -# This should go into the build tree, but it's easier to keep it here for now. -SHARED_HEADER = ("""\ -# We borrow heavily from the kernel build setup, though we are simpler since -# we don't have Kconfig tweaking settings on us. - -# The implicit make rules have it looking for RCS files, among other things. -# We instead explicitly write all the rules we care about. -# It's even quicker (saves ~200ms) to pass -r on the command line. -MAKEFLAGS=-r - -# The V=1 flag on command line makes us verbosely print command lines. -ifdef V - quiet= -else - quiet=quiet_ -endif - -# Specify BUILDTYPE=Release on the command line for a release build. -BUILDTYPE ?= __default_configuration__ - -# Directory all our build output goes into. -# Note that this must be two directories beneath src/ for unit tests to pass, -# as they reach into the src/ directory for data with relative paths. -builddir ?= $(builddir_name)/$(BUILDTYPE) -abs_builddir := $(abspath $(builddir)) - -# Object output directory. -obj := $(builddir)/obj -abs_obj := $(abspath $(obj)) - -# We build up a list of each target that we want to be generated by default. -all_targets := - -# We build up a list of every single one of the targets so we can slurp in the -# generated dependency rule Makefiles in one pass. -all_deps := - -# C++ apps need to be linked with g++. Not sure what's appropriate. -LINK ?= $(CXX) - -CC.target ?= $(CC) -CXX.target ?= $(CXX) -LINK.target ?= $(LINK) -AR.target ?= $(AR) -RANLIB.target ?= ranlib - -CC.host ?= gcc -CXX.host ?= g++ -LINK.host ?= g++ -AR.host ?= ar -RANLIB.host ?= ranlib - -# Flags to make gcc output dependency info. Note that you need to be -# careful here to use the flags that ccache and distcc can understand. -# We write to a temporary dep file first and then rename at the end -# so we can't end up with a broken dep file. -depfile = $@.d -DEPFLAGS = -MMD -MF $(depfile).tmp - -# We have to fixup the deps output in a few ways. -# First, the file output should to mention the proper .o file. -# ccache or distcc lose the path to the target, so we convert a rule of -# the form: -# foobar.o: DEP1 DEP2 -# into -# path/to/foobar.o: DEP1 DEP2 -# Additionally, we want to make missing files not cause us to needlessly -# rebuild. We want to rewrite -# foobar.o: DEP1 DEP2 \\ -# DEP3 -# to -# DEP1 DEP2: -# DEP3: -# so if the files are missing, they're just considered phony rules. -# We have to do some pretty insane escaping to get those backslashes -# and dollar signs past make, the shell, and sed at the same time.""" -r""" -define fixup_dep -sed -i -e "s|^$(notdir $@)|$@|" $(depfile).tmp -sed -e "s|^[^:]*: *||" -e "s| *\\\\$$||" -e 's|^ *||' \ - -e "/./s|$$|:|" $(depfile).tmp >> $(depfile).tmp -cat $(depfile).tmp >> $(depfile) -rm -f $(depfile).tmp -endef -""" -""" -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) $(CFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) $(CXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_alink = AR+RANLIB($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) rc $@ $(filter %.o,$^) && $(RANLIB.$(TOOLSET)) $@ - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -cmd_copy = ln -f $< $@ || cp -af $< $@ - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(LDFLAGS) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) - -# Shared-object link (for generating .so). -# Set SONAME to the library filename so our binaries don't reference the local, -# absolute paths used on the link command-line. -# TODO: perhaps this can share with the LINK command above? -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(LDFLAGS) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) -""" -r""" -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines wth shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -""" -""" -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \\ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$@)),\\ - $(subst $(cmd_$@),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out $|,$?) - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do C/C++ dependency munging. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @echo ' $($(quiet)cmd_$(1))' - @mkdir -p $(dir $@) - @$(cmd_$(1)) - @echo '$(call escape_vars,$(call escape_quotes,cmd_$@ := $(cmd_$(1))))' > $(depfile) - @$(if $(2),$(fixup_dep)) -) -endef - -# Declare "all" target first so it is the default, even though we don't have the -# deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -""") - -ROOT_HEADER_SUFFIX_RULES = ("""\ -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -""") - -SHARED_HEADER_SUFFIX_RULES_COMMENT1 = ("""\ -# Suffix rules, putting all outputs into $(obj). -""") - -SHARED_HEADER_SUFFIX_RULES_SRCDIR = { - '.c': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -"""), - '.s': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc) -"""), - '.S': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc) -"""), - '.cpp': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), - '.cc': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), - '.cxx': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), -} - -SHARED_HEADER_SUFFIX_RULES_COMMENT2 = ("""\ -# Try building from generated source, too. -""") - -SHARED_HEADER_SUFFIX_RULES_OBJDIR1 = { - '.c': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -"""), - '.cc': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), - '.cpp': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), -} - -SHARED_HEADER_SUFFIX_RULES_OBJDIR2 = { - '.c': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -"""), - '.cc': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), - '.cpp': ("""\ -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -"""), -} - -SHARED_HEADER_SUFFIX_RULES = ( - SHARED_HEADER_SUFFIX_RULES_COMMENT1 + - ''.join(SHARED_HEADER_SUFFIX_RULES_SRCDIR.values()) + - SHARED_HEADER_SUFFIX_RULES_COMMENT2 + - ''.join(SHARED_HEADER_SUFFIX_RULES_OBJDIR1.values()) + - ''.join(SHARED_HEADER_SUFFIX_RULES_OBJDIR2.values()) -) - -# This gets added to the very beginning of the Makefile. -SHARED_HEADER_SRCDIR = ("""\ -# The source directory tree. -srcdir := %s - -""") - -SHARED_HEADER_BUILDDIR_NAME = ("""\ -# The name of the builddir. -builddir_name ?= %s - -""") - -SHARED_FOOTER = """\ -# Now that we've included the sub-makefiles, we can define the rule depending on -# all_targets. -all: $(all_targets) - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. First, only consider targets that already have been -# built, as unbuilt targets will be built regardless of dependency info: -all_deps := $(wildcard $(sort $(all_deps))) -# Of those, only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif -""" - -header = """\ -# This file is generated by gyp; do not edit. - -""" - - -def Compilable(filename): - """Return true if the file is compilable (should be in OBJS).""" - for res in (filename.endswith(e) for e - in ['.c', '.cc', '.cpp', '.cxx', '.s', '.S']): - if res: - return True - return False - - -def Target(filename): - """Translate a compilable filename to its .o target.""" - return os.path.splitext(filename)[0] + '.o' - - -def QuoteIfNecessary(string): - if '"' in string: - string = '"' + string.replace('"', '\\"') + '"' - return string - - -srcdir_prefix = '' -def Sourceify(path): - """Convert a path to its source directory form.""" - if '$(' in path: - return path - if os.path.isabs(path): - return path - return srcdir_prefix + path - - -# Map from qualified target to path to output. -target_outputs = {} -# Map from qualified target to a list of all linker dependencies, -# transitively expanded. -# Used in building shared-library-based executables. -target_link_deps = {} - - -class MakefileWriter: - """MakefileWriter packages up the writing of one target-specific foobar.mk. - - Its only real entry point is Write(), and is mostly used for namespacing. - """ - - def Write(self, qualified_target, base_path, output_filename, spec, configs, - part_of_all): - """The main entry point: writes a .mk file for a single target. - - Arguments: - qualified_target: target we're generating - base_path: path relative to source root we're building in, used to resolve - target-relative paths - output_filename: output .mk file name to write - spec, configs: gyp info - part_of_all: flag indicating this target is part of 'all' - """ - print 'Generating %s' % output_filename - - ensure_directory_exists(output_filename) - - self.fp = open(output_filename, 'w') - - self.fp.write(header) - - self.path = base_path - self.target = spec['target_name'] - self.type = spec['type'] - self.toolset = spec['toolset'] - - deps, link_deps = self.ComputeDeps(spec) - - # Some of the generation below can add extra output, sources, or - # link dependencies. All of the out params of the functions that - # follow use names like extra_foo. - extra_outputs = [] - extra_sources = [] - extra_link_deps = [] - - self.output = self.ComputeOutput(spec) - self._INSTALLABLE_TARGETS = ('executable', 'loadable_module', - 'shared_library') - if self.type in self._INSTALLABLE_TARGETS: - self.alias = os.path.basename(self.output) - else: - self.alias = self.output - - self.WriteLn("TOOLSET := " + self.toolset) - self.WriteLn("TARGET := " + self.target) - - # Actions must come first, since they can generate more OBJs for use below. - if 'actions' in spec: - self.WriteActions(spec['actions'], extra_sources, extra_outputs, - part_of_all) - - # Rules must be early like actions. - if 'rules' in spec: - self.WriteRules(spec['rules'], extra_sources, extra_outputs, part_of_all) - - if 'copies' in spec: - self.WriteCopies(spec['copies'], extra_outputs, part_of_all) - - all_sources = spec.get('sources', []) + extra_sources - if all_sources: - self.WriteSources(configs, deps, all_sources, - extra_outputs, extra_link_deps, part_of_all) - sources = filter(Compilable, all_sources) - if sources: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT1) - extensions = set([os.path.splitext(s)[1] for s in sources]) - for ext in extensions: - if ext in SHARED_HEADER_SUFFIX_RULES_SRCDIR: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_SRCDIR[ext]) - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT2) - for ext in extensions: - if ext in SHARED_HEADER_SUFFIX_RULES_OBJDIR1: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_OBJDIR1[ext]) - for ext in extensions: - if ext in SHARED_HEADER_SUFFIX_RULES_OBJDIR2: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_OBJDIR2[ext]) - self.WriteLn('# End of this set of suffix rules') - - - self.WriteTarget(spec, configs, deps, - extra_link_deps + link_deps, extra_outputs, part_of_all) - - # Update global list of target outputs, used in dependency tracking. - target_outputs[qualified_target] = self.alias - - # Update global list of link dependencies. - if self.type == 'static_library': - target_link_deps[qualified_target] = [self.output] - elif self.type == 'shared_library': - # Anyone that uses us transitively depend on all of our link - # dependencies. - target_link_deps[qualified_target] = [self.output] + link_deps - - self.fp.close() - - - def WriteActions(self, actions, extra_sources, extra_outputs, part_of_all): - """Write Makefile code for any 'actions' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - actions (used to make other pieces dependent on these - actions) - part_of_all: flag indicating this target is part of 'all' - """ - for action in actions: - name = self.target + '_' + action['action_name'] - self.WriteLn('### Rules for action "%s":' % action['action_name']) - inputs = action['inputs'] - outputs = action['outputs'] - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = set() - for out in outputs: - dir = os.path.split(out)[0] - if dir: - dirs.add(dir) - if int(action.get('process_outputs_as_sources', False)): - extra_sources += outputs - - # Write the actual command. - command = gyp.common.EncodePOSIXShellList(action['action']) - if 'message' in action: - self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, action['message'])) - else: - self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, name)) - if len(dirs) > 0: - command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command - # Set LD_LIBRARY_PATH in case the action runs an executable from this - # build which links to shared libs from this build. - if self.path: - cd_action = 'cd %s; ' % Sourceify(self.path) - else: - cd_action = '' - # actions run on the host, so they should in theory only use host - # libraries, but until everything is made cross-compile safe, also use - # target libraries. - # TODO(piman): when everything is cross-compile safe, remove lib.target - self.WriteLn('cmd_%s = export LD_LIBRARY_PATH=$(builddir)/lib.host:' - '$(builddir)/lib.target:$$LD_LIBRARY_PATH; %s%s' - % (name, cd_action, command)) - self.WriteLn() - outputs = map(self.Absolutify, outputs) - # The makefile rules are all relative to the top dir, but the gyp actions - # are defined relative to their containing dir. This replaces the obj - # variable for the action rule with an absolute version so that the output - # goes in the right place. - self.WriteMakeRule(outputs, ['obj := $(abs_obj)']) - self.WriteMakeRule(outputs, ['builddir := $(abs_builddir)']) - self.WriteDoCmd(outputs, map(Sourceify, map(self.Absolutify, inputs)), - part_of_all=part_of_all, command=name) - - # Stuff the outputs in a variable so we can refer to them later. - outputs_variable = 'action_%s_outputs' % name - self.WriteLn('%s := %s' % (outputs_variable, ' '.join(outputs))) - extra_outputs.append('$(%s)' % outputs_variable) - self.WriteLn() - - self.WriteLn() - - - def WriteRules(self, rules, extra_sources, extra_outputs, part_of_all): - """Write Makefile code for any 'rules' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - rules (used to make other pieces dependent on these rules) - part_of_all: flag indicating this target is part of 'all' - """ - for rule in rules: - name = self.target + '_' + rule['rule_name'] - count = 0 - self.WriteLn('### Generated for rule %s:' % name) - - all_outputs = [] - - for rule_source in rule['rule_sources']: - dirs = set() - rule_source_basename = os.path.basename(rule_source) - (rule_source_root, rule_source_ext) = \ - os.path.splitext(rule_source_basename) - - outputs = [self.ExpandInputRoot(out, rule_source_root) - for out in rule['outputs']] - for out in outputs: - dir = os.path.dirname(out) - if dir: - dirs.add(dir) - if int(rule.get('process_outputs_as_sources', False)): - extra_sources.append(out) - all_outputs += outputs - inputs = map(Sourceify, map(self.Absolutify, [rule_source] + - rule.get('inputs', []))) - actions = ['$(call do_cmd,%s_%d)' % (name, count)] - - if name == 'resources_grit': - # HACK: This is ugly. Grit intentionally doesn't touch the - # timestamp of its output file when the file doesn't change, - # which is fine in hash-based dependency systems like scons - # and forge, but not kosher in the make world. After some - # discussion, hacking around it here seems like the least - # amount of pain. - actions += ['@touch --no-create $@'] - - self.WriteMakeRule(outputs, ['obj := $(abs_obj)']) - self.WriteMakeRule(outputs, ['builddir := $(abs_builddir)']) - self.WriteMakeRule(outputs, inputs + ['FORCE_DO_CMD'], actions) - if part_of_all: - self.WriteLn('all_targets += %s' % ' '.join(outputs)) - self.WriteLn('all_deps += %s' % ' '.join(outputs)) - - action = [self.ExpandInputRoot(ac, rule_source_root) - for ac in rule['action']] - mkdirs = '' - if len(dirs) > 0: - mkdirs = 'mkdir -p %s; ' % ' '.join(dirs) - if self.path: - cd_action = 'cd %s; ' % Sourceify(self.path) - else: - cd_action = '' - self.WriteLn( - "cmd_%(name)s_%(count)d = %(cd_action)s%(mkdirs)s%(action)s" % { - 'action': gyp.common.EncodePOSIXShellList(action), - 'cd_action': cd_action, - 'count': count, - 'mkdirs': mkdirs, - 'name': name, - }) - self.WriteLn( - 'quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@' % { - 'count': count, - 'name': name, - }) - self.WriteLn() - count += 1 - - outputs_variable = 'rule_%s_outputs' % name - self.WriteList(all_outputs, outputs_variable) - extra_outputs.append('$(%s)' % outputs_variable) - - self.WriteLn('### Finished generating for rule: %s' % name) - self.WriteLn() - self.WriteLn('### Finished generating for all rules') - self.WriteLn('') - - - def WriteCopies(self, copies, extra_outputs, part_of_all): - """Write Makefile code for any 'copies' from the gyp input. - - extra_outputs: a list that will be filled in with any outputs of this action - (used to make other pieces dependent on this action) - part_of_all: flag indicating this target is part of 'all' - """ - self.WriteLn('### Generated for copy rule.') - - variable = self.target + '_copies' - outputs = [] - for copy in copies: - for path in copy['files']: - path = Sourceify(self.Absolutify(path)) - filename = os.path.split(path)[1] - output = Sourceify(self.Absolutify(os.path.join(copy['destination'], - filename))) - self.WriteDoCmd([output], [path], 'copy', part_of_all) - outputs.append(output) - self.WriteLn('%s = %s' % (variable, ' '.join(outputs))) - extra_outputs.append('$(%s)' % variable) - self.WriteLn() - - - def WriteSources(self, configs, deps, sources, - extra_outputs, extra_link_deps, - part_of_all): - """Write Makefile code for any 'sources' from the gyp input. - These are source files necessary to build the current target. - - configs, deps, sources: input from gyp. - extra_outputs: a list of extra outputs this action should be dependent on; - used to serialize action/rules before compilation - extra_link_deps: a list that will be filled in with any outputs of - compilation (to be used in link lines) - part_of_all: flag indicating this target is part of 'all' - """ - - # Write configuration-specific variables for CFLAGS, etc. - for configname in sorted(configs.keys()): - config = configs[configname] - self.WriteList(config.get('defines'), 'DEFS_%s' % configname, prefix='-D') - self.WriteLn("# Flags passed to both C and C++ files."); - self.WriteList(config.get('cflags'), 'CFLAGS_%s' % configname) - self.WriteLn("# Flags passed to only C (and not C++) files."); - self.WriteList(config.get('cflags_c'), 'CFLAGS_C_%s' % configname) - self.WriteLn("# Flags passed to only C++ (and not C) files."); - self.WriteList(config.get('cflags_cc'), 'CFLAGS_CC_%s' % configname) - includes = config.get('include_dirs') - if includes: - includes = map(Sourceify, map(self.Absolutify, includes)) - self.WriteList(includes, 'INCS_%s' % configname, prefix='-I') - - sources = filter(Compilable, sources) - objs = map(self.Objectify, map(self.Absolutify, map(Target, sources))) - self.WriteList(objs, 'OBJS') - - if part_of_all: - self.WriteLn('# Add to the list of dependencies for the default target') - self.WriteLn('all_targets += $(OBJS)') - self.WriteLn() - - self.WriteLn('# Add to the list of files we specially track ' - 'dependencies for.') - self.WriteLn('all_deps += $(OBJS)') - self.WriteLn() - - # Make sure our dependencies are built first. - if deps: - self.WriteMakeRule(['$(OBJS)'], deps, - comment = 'Make sure our dependencies are built ' - 'before any of us.', - order_only = True) - - # Make sure the actions and rules run first. - # If they generate any extra headers etc., the per-.o file dep tracking - # will catch the proper rebuilds, so order only is still ok here. - if extra_outputs: - self.WriteMakeRule(['$(OBJS)'], extra_outputs, - comment = 'Make sure our actions/rules run ' - 'before any of us.', - order_only = True) - - if objs: - extra_link_deps.append('$(OBJS)') - self.WriteLn("""\ -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual.""") - self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)") - self.WriteLn("$(OBJS): CFLAGS := $(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_C_$(BUILDTYPE)) " - "$(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE))") - self.WriteLn("$(OBJS): CXXFLAGS := $(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_CC_$(BUILDTYPE)) " - "$(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE))") - - self.WriteLn() - - - def ComputeOutput(self, spec): - """Return the 'output' (full output path) of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - '$(obj)/baz/libfoobar.so' - """ - output = None - target = spec['target_name'] - path = spec.get('product_dir', os.path.join('$(obj).' + self.toolset, - self.path)) - if self.type == 'static_library': - target = 'lib%s.a' % (target[:3] == 'lib' and [target[3:]] or [target])[0] - elif self.type in ('loadable_module', 'shared_library'): - target = 'lib%s.so' % (target[:3] == 'lib' and [target[3:]] or [target])[0] - path = spec.get('product_dir', os.path.join('$(builddir)', 'lib.' + - self.toolset, self.path)) - elif self.type == 'none': - target = '%s.stamp' % target - elif self.type == 'settings': - return None - elif self.type == 'executable': - target = spec.get('product_name', target) - path = spec.get('product_dir', os.path.join('$(builddir)')) - else: - print ("ERROR: What output file should be generated?", - "typ", self.type, "target", target) - - return os.path.join(path, target) - - - def ComputeDeps(self, spec): - """Compute the dependencies of a gyp spec. - - Returns a tuple (deps, link_deps), where each is a list of - filenames that will need to be put in front of make for either - building (deps) or linking (link_deps). - """ - deps = [] - link_deps = [] - if 'dependencies' in spec: - deps.extend([target_outputs[dep] for dep in spec['dependencies'] - if target_outputs[dep]]) - for dep in spec['dependencies']: - if dep in target_link_deps: - link_deps.extend(target_link_deps[dep]) - deps.extend(link_deps) - # TODO: It seems we need to transitively link in libraries (e.g. -lfoo)? - # This hack makes it work: - # link_deps.extend(spec.get('libraries', [])) - return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps)) - - - def WriteTarget(self, spec, configs, deps, link_deps, extra_outputs, - part_of_all): - """Write Makefile code to produce the final target of the gyp spec. - - spec, configs: input from gyp. - deps, link_deps: dependency lists; see ComputeDeps() - extra_outputs: any extra outputs that our target should depend on - part_of_all: flag indicating this target is part of 'all' - """ - - self.WriteLn('### Rules for final target.') - - if extra_outputs: - self.WriteMakeRule([self.output], extra_outputs, - comment = 'Build our special outputs first.', - order_only = True) - - if self.type not in ('settings', 'none'): - for configname in sorted(configs.keys()): - config = configs[configname] - self.WriteList(config.get('ldflags'), 'LDFLAGS_%s' % configname) - self.WriteList(spec.get('libraries'), 'LIBS') - self.WriteLn('%s: LDFLAGS := $(LDFLAGS_$(BUILDTYPE))' % self.output) - self.WriteLn('%s: LIBS := $(LIBS)' % self.output) - - if self.type == 'executable': - self.WriteDoCmd([self.output], link_deps, 'link', part_of_all) - elif self.type == 'static_library': - self.WriteDoCmd([self.output], link_deps, 'alink', part_of_all) - elif self.type in ('loadable_module', 'shared_library'): - self.WriteDoCmd([self.output], link_deps, 'solink', part_of_all) - elif self.type == 'none': - # Write a stamp line. - self.WriteDoCmd([self.output], deps, 'touch', part_of_all) - elif self.type == 'settings': - # Only used for passing flags around. - pass - else: - print "WARNING: no output for", self.type, target - - # Add an alias for each target (if there are any outputs). - if self.output and self.output != self.target: - self.WriteMakeRule([self.target], [self.output], - comment='Add target alias') - - # Add special-case rules for our installable targets. - # 1) They need to install to the build dir or "product" dir. - # 2) They get shortcuts for building (e.g. "make chrome"). - # 3) They are part of "make all". - if self.type in self._INSTALLABLE_TARGETS: - if self.type in ('shared_library'): - file_desc = 'shared library' - # Install all shared libs into a common directory (per toolset) for - # convenient access with LD_LIBRARY_PATH. - binpath = '$(builddir)/lib.%s/%s' % (self.toolset, self.alias) - else: - file_desc = 'executable' - binpath = '$(builddir)/' + self.alias - installable_deps = [self.output] - if binpath != self.output: - self.WriteDoCmd([binpath], [self.output], 'copy', - comment = 'Copy this to the %s output path.' % - file_desc, part_of_all=part_of_all) - installable_deps.append(binpath) - if self.output != self.alias: - self.WriteMakeRule([self.alias], installable_deps, - comment = 'Short alias for building this %s.' % - file_desc, phony = True) - if part_of_all: - self.WriteMakeRule(['all'], [binpath], - comment = 'Add %s to "all" target.' % file_desc, - phony = True) - - - def WriteList(self, list, variable=None, prefix=''): - """Write a variable definition that is a list of values. - - E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out - foo = blaha blahb - but in a pretty-printed style. - """ - self.fp.write(variable + " := ") - if list: - list = [QuoteIfNecessary(prefix + l) for l in list] - self.fp.write(" \\\n\t".join(list)) - self.fp.write("\n\n") - - - def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None): - """Write a Makefile rule that uses do_cmd. - - This makes the outputs dependent on the command line that was run, - as well as support the V= make command line flag. - """ - self.WriteMakeRule(outputs, inputs, - actions = ['$(call do_cmd,%s)' % command], - comment = comment, - force = True) - if part_of_all: - # Add our outputs to the list of dependencies of the default target - self.WriteLn('all_targets += %s' % ' '.join(outputs)) - # Add our outputs to the list of targets we read depfiles from. - self.WriteLn('all_deps += %s' % ' '.join(outputs)) - - - def WriteMakeRule(self, outputs, inputs, actions=None, comment=None, - order_only=False, force=False, phony=False): - """Write a Makefile rule, with some extra tricks. - - outputs: a list of outputs for the rule (note: this is not directly - supported by make; see comments below) - inputs: a list of inputs for the rule - actions: a list of shell commands to run for the rule - comment: a comment to put in the Makefile above the rule (also useful - for making this Python script's code self-documenting) - order_only: if true, makes the dependency order-only - force: if true, include FORCE_DO_CMD as an order-only dep - phony: if true, the rule does not actually generate the named output, the - output is just a name to run the rule - """ - if comment: - self.WriteLn('# ' + comment) - if phony: - self.WriteLn('.PHONY: ' + ' '.join(outputs)) - # TODO(evanm): just make order_only a list of deps instead of these hacks. - if order_only: - order_insert = '| ' - else: - order_insert = '' - if force: - force_append = ' FORCE_DO_CMD' - else: - force_append = '' - if actions: - self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0]) - self.WriteLn('%s: %s%s%s' % (outputs[0], order_insert, ' '.join(inputs), - force_append)) - if actions: - for action in actions: - self.WriteLn('\t%s' % action) - if len(outputs) > 1: - # If we have more than one output, a rule like - # foo bar: baz - # that for *each* output we must run the action, potentially - # in parallel. That is not what we're trying to write -- what - # we want is that we run the action once and it generates all - # the files. - # http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html - # discusses this problem and has this solution: - # 1) Write the naive rule that would produce parallel runs of - # the action. - # 2) Make the outputs seralized on each other, so we won't start - # a a parallel run until the first run finishes, at which point - # we'll have generated all the outputs and we're done. - self.WriteLn('%s: %s' % (' '.join(outputs[1:]), outputs[0])) - self.WriteLn() - - - def WriteLn(self, text=''): - self.fp.write(text + '\n') - - - def Objectify(self, path): - """Convert a path to its output directory form.""" - if '$(' in path: - path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/' % self.toolset) - return path - return '$(obj).%s/$(TARGET)/%s' % (self.toolset, path) - - def Absolutify(self, path): - """Convert a subdirectory-relative path into a base-relative path. - Skips over paths that contain variables.""" - if '$(' in path: - return path - return os.path.normpath(os.path.join(self.path, path)) - - - def FixupArgPath(self, arg): - if '/' in arg or '.h.' in arg: - return self.Absolutify(arg) - return arg - - - def ExpandInputRoot(self, template, expansion): - if '%(INPUT_ROOT)s' not in template: - return template - path = template % { 'INPUT_ROOT': expansion } - if not os.path.dirname(path): - # If it's just the file name, turn it into a path so FixupArgPath() - # will know to Absolutify() it. - path = os.path.join('.', path) - return path - - -def GenerateOutput(target_list, target_dicts, data, params): - options = params['options'] - generator_flags = params.get('generator_flags', {}) - builddir_name = generator_flags.get('output_dir', 'out') - - # TODO: search for the first non-'Default' target. This can go - # away when we add verification that all targets have the - # necessary configurations. - default_configuration = None - toolsets = set([target_dicts[target]['toolset'] for target in target_list]) - for target in target_list: - spec = target_dicts[target] - if spec['default_configuration'] != 'Default': - default_configuration = spec['default_configuration'] - break - if not default_configuration: - default_configuration = 'Default' - - srcdir = '.' - makefile_name = 'Makefile' + options.suffix - makefile_path = os.path.join(options.depth, makefile_name) - if options.generator_output: - global srcdir_prefix - makefile_path = os.path.join(options.generator_output, makefile_path) - srcdir = gyp.common.RelativePath(srcdir, options.generator_output) - srcdir_prefix = '$(srcdir)/' - ensure_directory_exists(makefile_path) - root_makefile = open(makefile_path, 'w') - root_makefile.write(SHARED_HEADER_SRCDIR % srcdir) - root_makefile.write(SHARED_HEADER_BUILDDIR_NAME % builddir_name) - root_makefile.write(SHARED_HEADER.replace('__default_configuration__', - default_configuration)) - for toolset in toolsets: - root_makefile.write('TOOLSET := %s\n' % toolset) - root_makefile.write(ROOT_HEADER_SUFFIX_RULES) - - # Find the list of targets that derive from the gyp file(s) being built. - needed_targets = set() - for build_file in params['build_files']: - for target in gyp.common.AllTargets(target_list, target_dicts, build_file): - needed_targets.add(target) - - build_files = set() - include_list = [] - for qualified_target in target_list: - build_file, target, toolset = gyp.common.ParseQualifiedTarget( - qualified_target) - build_files.add(gyp.common.RelativePath(build_file, options.depth)) - included_files = data[build_file]['included_files'] - for included_file in included_files: - # The included_files entries are relative to the dir of the build file - # that included them, so we have to undo that and then make them relative - # to the root dir. - relative_include_file = gyp.common.RelativePath( - gyp.common.UnrelativePath(included_file, build_file), options.depth) - abs_include_file = os.path.abspath(relative_include_file) - # If the include file is from the ~/.gyp dir, we should use absolute path - # so that relocating the src dir doesn't break the path. - if (params['home_dot_gyp'] and - abs_include_file.startswith(params['home_dot_gyp'])): - build_files.add(abs_include_file) - else: - build_files.add(relative_include_file) - - # Paths in gyp files are relative to the .gyp file, but we want - # paths relative to the source root for the master makefile. Grab - # the path of the .gyp file as the base to relativize against. - # E.g. "foo/bar" when we're constructing targets found "foo/bar/baz.gyp". - base_path = gyp.common.RelativePath(os.path.dirname(build_file), - options.depth) - # We write the .mk file in the base_path directory. - output_file = os.path.join(options.depth, - base_path, - target + '.' + toolset + options.suffix + '.mk') - - if options.generator_output: - output_file = os.path.join(options.generator_output, output_file) - - spec = target_dicts[qualified_target] - configs = spec['configurations'] - - writer = MakefileWriter() - writer.Write(qualified_target, base_path, output_file, spec, configs, - part_of_all=qualified_target in needed_targets) - - # Our root_makefile lives at the source root. Compute the relative path - # from there to the output_file for including. - submakefile_path = gyp.common.RelativePath(output_file, - os.path.dirname(makefile_path)) - include_list.append('include ' + submakefile_path + '\n') - - # Write out the sorted list of includes. - include_list.sort() - root_makefile.write('\n') - for include in include_list: - root_makefile.write(include) - root_makefile.write('\n') - - # Write the target to regenerate the Makefile. - if generator_flags.get('auto_regeneration', True): - build_files_args = [gyp.common.RelativePath(filename, options.depth) - for filename in params['build_files_arg']] - root_makefile.write("%s: %s\n\t%s\n" % ( - makefile_name, - ' '.join(map(Sourceify, build_files)), - gyp.common.EncodePOSIXShellList( - [gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth), - '-fmake'] + - gyp.RegenerateFlags(options) + - build_files_args))) - - root_makefile.write(SHARED_FOOTER) - - root_makefile.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/msvs.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/msvs.py deleted file mode 100644 index d4abed8f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/msvs.py +++ /dev/null @@ -1,1106 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import re -import subprocess -import sys - -import gyp.MSVSNew as MSVSNew -import gyp.MSVSProject as MSVSProject -import gyp.MSVSToolFile as MSVSToolFile -import gyp.MSVSUserFile as MSVSUserFile -import gyp.MSVSVersion as MSVSVersion -import gyp.common - - -# Regular expression for validating Visual Studio GUIDs. If the GUID -# contains lowercase hex letters, MSVS will be fine. However, -# IncrediBuild BuildConsole will parse the solution file, but then -# silently skip building the target causing hard to track down errors. -# Note that this only happens with the BuildConsole, and does not occur -# if IncrediBuild is executed from inside Visual Studio. This regex -# validates that the string looks like a GUID with all uppercase hex -# letters. -VALID_MSVS_GUID_CHARS = re.compile('^[A-F0-9\-]+$') - - -generator_default_variables = { - 'EXECUTABLE_PREFIX': '', - 'EXECUTABLE_SUFFIX': '.exe', - 'STATIC_LIB_PREFIX': '', - 'SHARED_LIB_PREFIX': '', - 'STATIC_LIB_SUFFIX': '.lib', - 'SHARED_LIB_SUFFIX': '.dll', - 'INTERMEDIATE_DIR': '$(IntDir)', - 'SHARED_INTERMEDIATE_DIR': '$(OutDir)/obj/global_intermediate', - 'OS': 'win', - 'PRODUCT_DIR': '$(OutDir)', - 'LIB_DIR': '$(OutDir)/lib', - 'RULE_INPUT_ROOT': '$(InputName)', - 'RULE_INPUT_EXT': '$(InputExt)', - 'RULE_INPUT_NAME': '$(InputFileName)', - 'RULE_INPUT_PATH': '$(InputPath)', - 'CONFIGURATION_NAME': '$(ConfigurationName)', -} - - -# The msvs specific sections that hold paths -generator_additional_path_sections = [ - 'msvs_cygwin_dirs', - 'msvs_props', -] - -generator_additional_non_configuration_keys = [ - 'msvs_cygwin_dirs', - 'msvs_cygwin_shell', -] - -cached_username = None -cached_domain = None - -# TODO(gspencer): Switch the os.environ calls to be -# win32api.GetDomainName() and win32api.GetUserName() once the -# python version in depot_tools has been updated to work on Vista -# 64-bit. -def _GetDomainAndUserName(): - global cached_username - global cached_domain - if not cached_domain or not cached_username: - domain = os.environ.get('USERDOMAIN') - username = os.environ.get('USERNAME') - if not domain or not username: - call = subprocess.Popen(['net', 'config', 'Workstation'], - stdout=subprocess.PIPE) - config = call.communicate()[0] - username_re = re.compile('^User name\s+(\S+)', re.MULTILINE) - username_match = username_re.search(config) - if username_match: - username = username_match.group(1) - domain_re = re.compile('^Logon domain\s+(\S+)', re.MULTILINE) - domain_match = domain_re.search(config) - if domain_match: - domain = domain_match.group(1) - cached_domain = domain - cached_username = username - return (cached_domain, cached_username) - -fixpath_prefix = None - -def _FixPath(path): - """Convert paths to a form that will make sense in a vcproj file. - - Arguments: - path: The path to convert, may contain / etc. - Returns: - The path with all slashes made into backslashes. - """ - if fixpath_prefix and path and not os.path.isabs(path) and not path[0] == '$': - path = os.path.join(fixpath_prefix, path) - return path.replace('/', '\\') - - -def _SourceInFolders(sources, prefix=None, excluded=None): - """Converts a list split source file paths into a vcproj folder hierarchy. - - Arguments: - sources: A list of source file paths split. - prefix: A list of source file path layers meant to apply to each of sources. - Returns: - A hierarchy of filenames and MSVSProject.Filter objects that matches the - layout of the source tree. - For example: - _SourceInFolders([['a', 'bob1.c'], ['b', 'bob2.c']], prefix=['joe']) - --> - [MSVSProject.Filter('a', contents=['joe\\a\\bob1.c']), - MSVSProject.Filter('b', contents=['joe\\b\\bob2.c'])] - """ - if not prefix: prefix = [] - result = [] - excluded_result = [] - folders = dict() - # Gather files into the final result, excluded, or folders. - for s in sources: - if len(s) == 1: - filename = '\\'.join(prefix + s) - if filename in excluded: - excluded_result.append(filename) - else: - result.append(filename) - else: - if not folders.get(s[0]): - folders[s[0]] = [] - folders[s[0]].append(s[1:]) - # Add a folder for excluded files. - if excluded_result: - excluded_folder = MSVSProject.Filter('_excluded_files', - contents=excluded_result) - result.append(excluded_folder) - # Populate all the folders. - for f in folders: - contents = _SourceInFolders(folders[f], prefix=prefix + [f], - excluded=excluded) - contents = MSVSProject.Filter(f, contents=contents) - result.append(contents) - - return result - - -def _ToolAppend(tools, tool_name, setting, value, only_if_unset=False): - if not value: return - if not tools.get(tool_name): - tools[tool_name] = dict() - tool = tools[tool_name] - if tool.get(setting): - if only_if_unset: return - if type(tool[setting]) == list: - tool[setting] += value - else: - raise TypeError( - 'Appending "%s" to a non-list setting "%s" for tool "%s" is ' - 'not allowed, previous value: %s' % ( - value, setting, tool_name, str(tool[setting]))) - else: - tool[setting] = value - - -def _ConfigPlatform(config_data): - return config_data.get('msvs_configuration_platform', 'Win32') - - -def _ConfigBaseName(config_name, platform_name): - if config_name.endswith('_' + platform_name): - return config_name[0:-len(platform_name)-1] - else: - return config_name - - -def _ConfigFullName(config_name, config_data): - platform_name = _ConfigPlatform(config_data) - return '%s|%s' % (_ConfigBaseName(config_name, platform_name), platform_name) - - -def _PrepareActionRaw(spec, cmd, cygwin_shell, has_input_path, quote_cmd): - if cygwin_shell: - # Find path to cygwin. - cygwin_dir = _FixPath(spec.get('msvs_cygwin_dirs', ['.'])[0]) - # Prepare command. - direct_cmd = cmd - direct_cmd = [i.replace('$(IntDir)', - '`cygpath -m "${INTDIR}"`') for i in direct_cmd] - direct_cmd = [i.replace('$(OutDir)', - '`cygpath -m "${OUTDIR}"`') for i in direct_cmd] - if has_input_path: - direct_cmd = [i.replace('$(InputPath)', - '`cygpath -m "${INPUTPATH}"`') - for i in direct_cmd] - direct_cmd = ['"%s"' % i for i in direct_cmd] - direct_cmd = [i.replace('"', '\\"') for i in direct_cmd] - #direct_cmd = gyp.common.EncodePOSIXShellList(direct_cmd) - direct_cmd = ' '.join(direct_cmd) - # TODO(quote): regularize quoting path names throughout the module - cmd = ( - '"$(ProjectDir)%(cygwin_dir)s\\setup_env.bat" && ' - 'set CYGWIN=nontsec&& ') - if direct_cmd.find('NUMBER_OF_PROCESSORS') >= 0: - cmd += 'set /a NUMBER_OF_PROCESSORS_PLUS_1=%%NUMBER_OF_PROCESSORS%%+1&& ' - if direct_cmd.find('INTDIR') >= 0: - cmd += 'set INTDIR=$(IntDir)&& ' - if direct_cmd.find('OUTDIR') >= 0: - cmd += 'set OUTDIR=$(OutDir)&& ' - if has_input_path and direct_cmd.find('INPUTPATH') >= 0: - cmd += 'set INPUTPATH=$(InputPath) && ' - cmd += ( - 'bash -c "%(cmd)s"') - cmd = cmd % {'cygwin_dir': cygwin_dir, - 'cmd': direct_cmd} - return cmd - else: - if quote_cmd: - # Support a mode for using cmd directly. - # Convert any paths to native form (first element is used directly). - # TODO(quote): regularize quoting path names throughout the module - direct_cmd = [cmd[0]] + ['"%s"' % _FixPath(i) for i in cmd[1:]] - else: - direct_cmd = [cmd[0]] + [_FixPath(i) for i in cmd[1:]] - # Collapse into a single command. - return ' '.join(direct_cmd) - -def _PrepareAction(spec, rule, has_input_path): - # Find path to cygwin. - cygwin_dir = _FixPath(spec.get('msvs_cygwin_dirs', ['.'])[0]) - - # Currently this weird argument munging is used to duplicate the way a - # python script would need to be run as part of the chrome tree. - # Eventually we should add some sort of rule_default option to set this - # per project. For now the behavior chrome needs is the default. - mcs = rule.get('msvs_cygwin_shell') - if mcs is None: - mcs = int(spec.get('msvs_cygwin_shell', 1)) - elif isinstance(mcs, str): - mcs = int(mcs) - quote_cmd = int(rule.get('msvs_quote_cmd', 1)) - return _PrepareActionRaw(spec, rule['action'], mcs, - has_input_path, quote_cmd) - - -def _PickPrimaryInput(inputs): - # Pick second input as the primary one, unless there's only one. - # TODO(bradnelson): this is a bit of a hack, - # find something more general. - if len(inputs) > 1: - return inputs[1] - else: - return inputs[0] - -def _SetRunAs(user_file, config_name, c_data, command, - environment={}, working_directory=""): - """Add a run_as rule to the user file. - - Arguments: - user_file: The MSVSUserFile to add the command to. - config_name: The name of the configuration to add it to - c_data: The dict of the configuration to add it to - command: The path to the command to execute. - args: An array of arguments to the command. (optional) - working_directory: Directory to run the command in. (optional) - """ - user_file.AddDebugSettings(_ConfigFullName(config_name, c_data), - command, environment, working_directory) - -def _AddCustomBuildTool(p, spec, inputs, outputs, description, cmd): - """Add a custom build tool to execute something. - - Arguments: - p: the target project - spec: the target project dict - inputs: list of inputs - outputs: list of outputs - description: description of the action - cmd: command line to execute - """ - inputs = [_FixPath(i) for i in inputs] - outputs = [_FixPath(i) for i in outputs] - tool = MSVSProject.Tool( - 'VCCustomBuildTool', { - 'Description': description, - 'AdditionalDependencies': ';'.join(inputs), - 'Outputs': ';'.join(outputs), - 'CommandLine': cmd, - }) - primary_input = _PickPrimaryInput(inputs) - # Add to the properties of primary input for each config. - for config_name, c_data in spec['configurations'].iteritems(): - p.AddFileConfig(primary_input, - _ConfigFullName(config_name, c_data), tools=[tool]) - - -def _RuleExpandPath(path, input_file): - """Given the input file to which a rule applied, string substitute a path. - - Arguments: - path: a path to string expand - input_file: the file to which the rule applied. - Returns: - The string substituted path. - """ - path = path.replace('$(InputName)', - os.path.splitext(os.path.split(input_file)[1])[0]) - path = path.replace('$(InputExt)', - os.path.splitext(os.path.split(input_file)[1])[1]) - path = path.replace('$(InputFileName)', os.path.split(input_file)[1]) - path = path.replace('$(InputPath)', input_file) - return path - - -def _FindRuleTriggerFiles(rule, sources): - """Find the list of files which a particular rule applies to. - - Arguments: - rule: the rule in question - sources: the set of all known source files for this project - Returns: - The list of sources that trigger a particular rule. - """ - rule_ext = rule['extension'] - return [s for s in sources if s.endswith('.' + rule_ext)] - - -def _RuleInputsAndOutputs(rule, trigger_file): - """Find the inputs and outputs generated by a rule. - - Arguments: - rule: the rule in question - sources: the set of all known source files for this project - Returns: - The pair of (inputs, outputs) involved in this rule. - """ - raw_inputs = rule.get('inputs', []) - raw_outputs = rule.get('outputs', []) - inputs = set() - outputs = set() - inputs.add(trigger_file) - for i in raw_inputs: - inputs.add(_RuleExpandPath(i, trigger_file)) - for o in raw_outputs: - outputs.add(_RuleExpandPath(o, trigger_file)) - return (inputs, outputs) - - -def _GenerateNativeRules(p, rules, output_dir, spec, options): - """Generate a native rules file. - - Arguments: - p: the target project - rules: the set of rules to include - output_dir: the directory in which the project/gyp resides - spec: the project dict - options: global generator options - """ - rules_filename = '%s%s.rules' % (spec['target_name'], - options.suffix) - rules_file = MSVSToolFile.Writer(os.path.join(output_dir, rules_filename)) - rules_file.Create(spec['target_name']) - # Add each rule. - for r in rules: - rule_name = r['rule_name'] - rule_ext = r['extension'] - inputs = [_FixPath(i) for i in r.get('inputs', [])] - outputs = [_FixPath(i) for i in r.get('outputs', [])] - cmd = _PrepareAction(spec, r, has_input_path=True) - rules_file.AddCustomBuildRule(name=rule_name, - description=r.get('message', rule_name), - extensions=[rule_ext], - additional_dependencies=inputs, - outputs=outputs, - cmd=cmd) - # Write out rules file. - rules_file.Write() - - # Add rules file to project. - p.AddToolFile(rules_filename) - - -def _Cygwinify(path): - path = path.replace('$(OutDir)', '$(OutDirCygwin)') - path = path.replace('$(IntDir)', '$(IntDirCygwin)') - return path - - -def _GenerateExternalRules(p, rules, output_dir, spec, - sources, options, actions_to_add): - """Generate an external makefile to do a set of rules. - - Arguments: - p: the target project - rules: the list of rules to include - output_dir: path containing project and gyp files - spec: project specification data - sources: set of sources known - options: global generator options - """ - filename = '%s_rules%s.mk' % (spec['target_name'], options.suffix) - file = gyp.common.WriteOnDiff(os.path.join(output_dir, filename)) - # Find cygwin style versions of some paths. - file.write('OutDirCygwin:=$(shell cygpath -u "$(OutDir)")\n') - file.write('IntDirCygwin:=$(shell cygpath -u "$(IntDir)")\n') - # Gather stuff needed to emit all: target. - all_inputs = set() - all_outputs = set() - all_output_dirs = set() - first_outputs = [] - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - all_inputs.update(set(inputs)) - all_outputs.update(set(outputs)) - # Only use one target from each rule as the dependency for - # 'all' so we don't try to build each rule multiple times. - first_outputs.append(list(outputs)[0]) - # Get the unique output directories for this rule. - output_dirs = [os.path.split(i)[0] for i in outputs] - for od in output_dirs: - all_output_dirs.add(od) - first_outputs_cyg = [_Cygwinify(i) for i in first_outputs] - # Write out all: target, including mkdir for each output directory. - file.write('all: %s\n' % ' '.join(first_outputs_cyg)) - for od in all_output_dirs: - file.write('\tmkdir -p %s\n' % od) - file.write('\n') - # Define how each output is generated. - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - # Get all the inputs and outputs for this rule for this trigger file. - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - inputs = [_Cygwinify(i) for i in inputs] - outputs = [_Cygwinify(i) for i in outputs] - # Prepare the command line for this rule. - cmd = [_RuleExpandPath(c, tf) for c in rule['action']] - cmd = ['"%s"' % i for i in cmd] - cmd = ' '.join(cmd) - # Add it to the makefile. - file.write('%s: %s\n' % (' '.join(outputs), ' '.join(inputs))) - file.write('\t%s\n\n' % cmd) - # Close up the file. - file.close() - - # Add makefile to list of sources. - sources.add(filename) - # Add a build action to call makefile. - cmd = ['make', - 'OutDir=$(OutDir)', - 'IntDir=$(IntDir)', - '-j', '${NUMBER_OF_PROCESSORS_PLUS_1}', - '-f', filename] - cmd = _PrepareActionRaw(spec, cmd, True, False, True) - # TODO(bradnelson): this won't be needed if we have a better way to pick - # the primary input. - all_inputs = list(all_inputs) - all_inputs.insert(1, filename) - actions_to_add.append({ - 'inputs': [_FixPath(i) for i in all_inputs], - 'outputs': [_FixPath(i) for i in all_outputs], - 'description': 'Running %s' % cmd, - 'cmd': cmd, - }) - - -def _GenerateRules(p, output_dir, options, spec, - sources, excluded_sources, - actions_to_add): - """Generate all the rules for a particular project. - - Arguments: - output_dir: directory to emit rules to - options: global options passed to the generator - spec: the specification for this project - sources: the set of all known source files in this project - excluded_sources: the set of sources excluded from normal processing - actions_to_add: deferred list of actions to add in - """ - rules = spec.get('rules', []) - rules_native = [r for r in rules if not int(r.get('msvs_external_rule', 0))] - rules_external = [r for r in rules if int(r.get('msvs_external_rule', 0))] - - # Handle rules that use a native rules file. - if rules_native: - _GenerateNativeRules(p, rules_native, output_dir, spec, options) - - # Handle external rules (non-native rules). - if rules_external: - _GenerateExternalRules(p, rules_external, output_dir, spec, - sources, options, actions_to_add) - - # Add outputs generated by each rule (if applicable). - for rule in rules: - # Done if not processing outputs as sources. - if int(rule.get('process_outputs_as_sources', False)): - # Add in the outputs from this rule. - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - inputs.remove(tf) - sources.update(inputs) - excluded_sources.update(inputs) - sources.update(outputs) - - -def _GenerateProject(vcproj_filename, build_file, spec, options, version): - """Generates a vcproj file. - - Arguments: - vcproj_filename: Filename of the vcproj file to generate. - build_file: Filename of the .gyp file that the vcproj file comes from. - spec: The target dictionary containing the properties of the target. - """ - # Pluck out the default configuration. - default_config = spec['configurations'][spec['default_configuration']] - # Decide the guid of the project. - guid = default_config.get('msvs_guid') - if guid: - if VALID_MSVS_GUID_CHARS.match(guid) == None: - raise ValueError('Invalid MSVS guid: "%s". Must match regex: "%s".' % - (guid, VALID_MSVS_GUID_CHARS.pattern)) - guid = '{%s}' % guid - - # Skip emitting anything if told to with msvs_existing_vcproj option. - if default_config.get('msvs_existing_vcproj'): - return guid - - #print 'Generating %s' % vcproj_filename - - vcproj_dir = os.path.dirname(vcproj_filename) - if vcproj_dir and not os.path.exists(vcproj_dir): - os.makedirs(vcproj_dir) - - # Gather list of unique platforms. - platforms = set() - for configuration in spec['configurations']: - platforms.add(_ConfigPlatform(spec['configurations'][configuration])) - platforms = list(platforms) - - p = MSVSProject.Writer(vcproj_filename, version=version) - p.Create(spec['target_name'], guid=guid, platforms=platforms) - - # Create the user file. - (domain, username) = _GetDomainAndUserName() - vcuser_filename = '.'.join([vcproj_filename, domain, username, 'user']) - user_file = MSVSUserFile.Writer(vcuser_filename, version=version) - user_file.Create(spec['target_name']) - - # Get directory project file is in. - gyp_dir = os.path.split(vcproj_filename)[0] - - # Pick target configuration type. - try: - config_type = { - 'executable': '1', # .exe - 'shared_library': '2', # .dll - 'loadable_module': '2', # .dll - 'static_library': '4', # .lib - 'none': '10', # Utility type - 'dummy_executable': '1', # .exe - }[spec['type']] - except KeyError, e: - if spec.get('type'): - raise Exception('Target type %s is not a valid target type for ' - 'target %s in %s.' % - (spec['type'], spec['target_name'], build_file)) - else: - raise Exception('Missing type field for target %s in %s.' % - (spec['target_name'], build_file)) - - for config_name, c in spec['configurations'].iteritems(): - # Process each configuration. - vsprops_dirs = c.get('msvs_props', []) - vsprops_dirs = [_FixPath(i) for i in vsprops_dirs] - - # Prepare the list of tools as a dictionary. - tools = dict() - - # Add in msvs_settings. - for tool in c.get('msvs_settings', {}): - settings = c['msvs_settings'][tool] - for setting in settings: - _ToolAppend(tools, tool, setting, settings[setting]) - - # Add in includes. - # TODO(bradnelson): include_dirs should really be flexible enough not to - # require this sort of thing. - include_dirs = ( - c.get('include_dirs', []) + - c.get('msvs_system_include_dirs', [])) - resource_include_dirs = c.get('resource_include_dirs', include_dirs) - include_dirs = [_FixPath(i) for i in include_dirs] - resource_include_dirs = [_FixPath(i) for i in resource_include_dirs] - _ToolAppend(tools, 'VCCLCompilerTool', - 'AdditionalIncludeDirectories', include_dirs) - _ToolAppend(tools, 'VCResourceCompilerTool', - 'AdditionalIncludeDirectories', resource_include_dirs) - - # Add in libraries. - libraries = spec.get('libraries', []) - # Strip out -l, as it is not used on windows (but is needed so we can pass - # in libraries that are assumed to be in the default library path). - libraries = [re.sub('^(\-l)', '', lib) for lib in libraries] - # Add them. - _ToolAppend(tools, 'VCLinkerTool', - 'AdditionalDependencies', libraries) - - # Select a name for the output file. - output_file_map = { - 'executable': ('VCLinkerTool', '$(OutDir)\\', '.exe'), - 'shared_library': ('VCLinkerTool', '$(OutDir)\\', '.dll'), - 'loadable_module': ('VCLinkerTool', '$(OutDir)\\', '.dll'), - 'static_library': ('VCLibrarianTool', '$(OutDir)\\lib\\', '.lib'), - 'dummy_executable': ('VCLinkerTool', '$(IntDir)\\', '.junk'), - } - output_file_props = output_file_map.get(spec['type']) - if output_file_props and int(spec.get('msvs_auto_output_file', 1)): - vc_tool, out_dir, suffix = output_file_props - out_dir = spec.get('msvs_product_directory', out_dir) - out_file = os.path.join(out_dir, - spec.get('product_name', - '$(ProjectName)') + suffix) - _ToolAppend(tools, vc_tool, 'OutputFile', out_file, - only_if_unset=True) - - # Add defines. - defines = [] - for d in c.get('defines', []): - if type(d) == list: - fd = '='.join([str(dpart).replace('"', '\\"') for dpart in d]) - else: - fd = str(d).replace('"', '\\"') - defines.append(fd) - - _ToolAppend(tools, 'VCCLCompilerTool', - 'PreprocessorDefinitions', defines) - _ToolAppend(tools, 'VCResourceCompilerTool', - 'PreprocessorDefinitions', defines) - - # Change program database directory to prevent collisions. - _ToolAppend(tools, 'VCCLCompilerTool', 'ProgramDataBaseFileName', - '$(IntDir)\\$(ProjectName)\\vc80.pdb') - - # Add disabled warnings. - disabled_warnings = [str(i) for i in c.get('msvs_disabled_warnings', [])] - _ToolAppend(tools, 'VCCLCompilerTool', - 'DisableSpecificWarnings', disabled_warnings) - - # Add Pre-build. - prebuild = c.get('msvs_prebuild') - _ToolAppend(tools, 'VCPreBuildEventTool', 'CommandLine', prebuild) - - # Add Post-build. - postbuild = c.get('msvs_postbuild') - _ToolAppend(tools, 'VCPostBuildEventTool', 'CommandLine', postbuild) - - # Turn on precompiled headers if appropriate. - header = c.get('msvs_precompiled_header') - if header: - header = os.path.split(header)[1] - _ToolAppend(tools, 'VCCLCompilerTool', 'UsePrecompiledHeader', '2') - _ToolAppend(tools, 'VCCLCompilerTool', - 'PrecompiledHeaderThrough', header) - _ToolAppend(tools, 'VCCLCompilerTool', - 'ForcedIncludeFiles', header) - - # Loadable modules don't generate import libraries; - # tell dependent projects to not expect one. - if spec['type'] == 'loadable_module': - _ToolAppend(tools, 'VCLinkerTool', 'IgnoreImportLibrary', 'true') - - # Set the module definition file if any. - if spec['type'] in ['shared_library', 'loadable_module']: - def_files = [s for s in spec.get('sources', []) if s.endswith('.def')] - if len(def_files) == 1: - _ToolAppend(tools, 'VCLinkerTool', 'ModuleDefinitionFile', - _FixPath(def_files[0])) - elif def_files: - raise ValueError('Multiple module definition files in one target, ' - 'target %s lists multiple .def files: %s' % ( - spec['target_name'], ' '.join(def_files))) - - # Convert tools to expected form. - tool_list = [] - for tool, settings in tools.iteritems(): - # Collapse settings with lists. - settings_fixed = {} - for setting, value in settings.iteritems(): - if type(value) == list: - if tool == 'VCLinkerTool' and setting == 'AdditionalDependencies': - settings_fixed[setting] = ' '.join(value) - else: - settings_fixed[setting] = ';'.join(value) - else: - settings_fixed[setting] = value - # Add in this tool. - tool_list.append(MSVSProject.Tool(tool, settings_fixed)) - - # Prepare configuration attributes. - prepared_attrs = {} - source_attrs = c.get('msvs_configuration_attributes', {}) - for a in source_attrs: - prepared_attrs[a] = source_attrs[a] - # Add props files. - if vsprops_dirs: - prepared_attrs['InheritedPropertySheets'] = ';'.join(vsprops_dirs) - # Set configuration type. - prepared_attrs['ConfigurationType'] = config_type - if not prepared_attrs.has_key('OutputDirectory'): - prepared_attrs['OutputDirectory'] = '$(SolutionDir)$(ConfigurationName)' - if not prepared_attrs.has_key('IntermediateDirectory'): - intermediate = '$(ConfigurationName)\\obj\\$(ProjectName)' - prepared_attrs['IntermediateDirectory'] = intermediate - - # Add in this configuration. - p.AddConfig(_ConfigFullName(config_name, c), - attrs=prepared_attrs, tools=tool_list) - - # Prepare list of sources and excluded sources. - sources = set(spec.get('sources', [])) - excluded_sources = set() - # Add in the gyp file. - gyp_file = os.path.split(build_file)[1] - sources.add(gyp_file) - # Add in 'action' inputs and outputs. - for a in spec.get('actions', []): - inputs = a.get('inputs') - if not inputs: - # This is an action with no inputs. Make the primary input - # by the .gyp file itself so Visual Studio has a place to - # hang the custom build rule. - inputs = [gyp_file] - a['inputs'] = inputs - primary_input = _PickPrimaryInput(inputs) - inputs = set(inputs) - sources.update(inputs) - inputs.remove(primary_input) - excluded_sources.update(inputs) - if int(a.get('process_outputs_as_sources', False)): - outputs = set(a.get('outputs', [])) - sources.update(outputs) - # Add in 'copies' inputs and outputs. - for cpy in spec.get('copies', []): - files = set(cpy.get('files', [])) - sources.update(files) - - # Add rules. - actions_to_add = [] - _GenerateRules(p, gyp_dir, options, spec, - sources, excluded_sources, - actions_to_add) - - # Exclude excluded sources coming into the generator. - excluded_sources.update(set(spec.get('sources_excluded', []))) - # Add excluded sources into sources for good measure. - sources.update(excluded_sources) - # Convert to proper windows form. - # NOTE: sources goes from being a set to a list here. - # NOTE: excluded_sources goes from being a set to a list here. - sources = [_FixPath(i) for i in sources] - # Convert to proper windows form. - excluded_sources = [_FixPath(i) for i in excluded_sources] - - # If any non-native rules use 'idl' as an extension exclude idl files. - # Gather a list here to use later. - using_idl = False - for rule in spec.get('rules', []): - if rule['extension'] == 'idl' and int(rule.get('msvs_external_rule', 0)): - using_idl = True - break - if using_idl: - excluded_idl = [i for i in sources if i.endswith('.idl')] - else: - excluded_idl = [] - - # List of precompiled header related keys. - precomp_keys = [ - 'msvs_precompiled_header', - 'msvs_precompiled_source', - ] - - # Gather a list of precompiled header related sources. - precompiled_related = [] - for config_name, c in spec['configurations'].iteritems(): - for k in precomp_keys: - f = c.get(k) - if f: - precompiled_related.append(_FixPath(f)) - - # Find the excluded ones, minus the precompiled header related ones. - fully_excluded = [i for i in excluded_sources if i not in precompiled_related] - - # Convert to folders and the right slashes. - sources = [i.split('\\') for i in sources] - sources = _SourceInFolders(sources, excluded=fully_excluded) - # Add in dummy file for type none. - if spec['type'] == 'dummy_executable': - # Pull in a dummy main so it can link successfully. - dummy_relpath = gyp.common.RelativePath( - options.depth + '\\tools\\gyp\\gyp_dummy.c', gyp_dir) - sources.append(dummy_relpath) - # Add in files. - p.AddFiles(sources) - - # Add deferred actions to add. - for a in actions_to_add: - _AddCustomBuildTool(p, spec, - inputs=a['inputs'], - outputs=a['outputs'], - description=a['description'], - cmd=a['cmd']) - - # Exclude excluded sources from being built. - for f in excluded_sources: - for config_name, c in spec['configurations'].iteritems(): - precomped = [_FixPath(c.get(i, '')) for i in precomp_keys] - # Don't do this for ones that are precompiled header related. - if f not in precomped: - p.AddFileConfig(f, _ConfigFullName(config_name, c), - {'ExcludedFromBuild': 'true'}) - - # If any non-native rules use 'idl' as an extension exclude idl files. - # Exclude them now. - for config_name, c in spec['configurations'].iteritems(): - for f in excluded_idl: - p.AddFileConfig(f, _ConfigFullName(config_name, c), - {'ExcludedFromBuild': 'true'}) - - # Add in tool files (rules). - tool_files = set() - for config_name, c in spec['configurations'].iteritems(): - for f in c.get('msvs_tool_files', []): - tool_files.add(f) - for f in tool_files: - p.AddToolFile(f) - - # Handle pre-compiled headers source stubs specially. - for config_name, c in spec['configurations'].iteritems(): - source = c.get('msvs_precompiled_source') - if source: - source = _FixPath(source) - # UsePrecompiledHeader=1 for if using precompiled headers. - tool = MSVSProject.Tool('VCCLCompilerTool', - {'UsePrecompiledHeader': '1'}) - p.AddFileConfig(source, _ConfigFullName(config_name, c), - {}, tools=[tool]) - - # Add actions. - actions = spec.get('actions', []) - for a in actions: - cmd = _PrepareAction(spec, a, has_input_path=False) - _AddCustomBuildTool(p, spec, - inputs=a.get('inputs', []), - outputs=a.get('outputs', []), - description=a.get('message', a['action_name']), - cmd=cmd) - - # Add run_as and test targets. - has_run_as = False - if spec.get('run_as') or int(spec.get('test', 0)): - has_run_as = True - run_as = spec.get('run_as', { - 'action' : ['$(TargetPath)', '--gtest_print_time'], - }) - working_directory = run_as.get('working_directory', '.') - action = run_as.get('action', []) - environment = run_as.get('environment', []) - for config_name, c_data in spec['configurations'].iteritems(): - _SetRunAs(user_file, config_name, c_data, - action, environment, working_directory) - - # Add copies. - for cpy in spec.get('copies', []): - for src in cpy.get('files', []): - dst = os.path.join(cpy['destination'], os.path.basename(src)) - # _AddCustomBuildTool() will call _FixPath() on the inputs and - # outputs, so do the same for our generated command line. - cmd = 'mkdir "%s" 2>nul & set ERRORLEVEL=0 & copy /Y "%s" "%s"' % ( - _FixPath(cpy['destination']), _FixPath(src), _FixPath(dst)) - _AddCustomBuildTool(p, spec, - inputs=[src], outputs=[dst], - description='Copying %s to %s' % (src, dst), - cmd=cmd) - - # Write it out. - p.Write() - - # Write out the user file, but only if we need to. - if has_run_as: - user_file.Write() - - # Return the guid so we can refer to it elsewhere. - return p.guid - - -def _GetPathDict(root, path): - if path == '': - return root - parent, folder = os.path.split(path) - parent_dict = _GetPathDict(root, parent) - if folder not in parent_dict: - parent_dict[folder] = dict() - return parent_dict[folder] - - -def _DictsToFolders(base_path, bucket, flat): - # Convert to folders recursively. - children = [] - for folder, contents in bucket.iteritems(): - if type(contents) == dict: - folder_children = _DictsToFolders(os.path.join(base_path, folder), - contents, flat) - if flat: - children += folder_children - else: - folder_children = MSVSNew.MSVSFolder(os.path.join(base_path, folder), - name='(' + folder + ')', - entries=folder_children) - children.append(folder_children) - else: - children.append(contents) - return children - - -def _CollapseSingles(parent, node): - # Recursively explorer the tree of dicts looking for projects which are - # the sole item in a folder which has the same name as the project. Bring - # such projects up one level. - if (type(node) == dict and - len(node) == 1 and - node.keys()[0] == parent + '.vcproj'): - return node[node.keys()[0]] - if type(node) != dict: - return node - for child in node.keys(): - node[child] = _CollapseSingles(child, node[child]) - return node - - -def _GatherSolutionFolders(project_objs, flat): - root = {} - # Convert into a tree of dicts on path. - for p in project_objs.keys(): - gyp_file, target = gyp.common.ParseQualifiedTarget(p)[0:2] - gyp_dir = os.path.dirname(gyp_file) - path_dict = _GetPathDict(root, gyp_dir) - path_dict[target + '.vcproj'] = project_objs[p] - # Walk down from the top until we hit a folder that has more than one entry. - # In practice, this strips the top-level "src/" dir from the hierarchy in - # the solution. - while len(root) == 1 and type(root[root.keys()[0]]) == dict: - root = root[root.keys()[0]] - # Collapse singles. - root = _CollapseSingles('', root) - # Merge buckets until everything is a root entry. - return _DictsToFolders('', root, flat) - - -def _ProjectObject(sln, qualified_target, project_objs, projects): - # Done if this project has an object. - if project_objs.get(qualified_target): - return project_objs[qualified_target] - # Get dependencies for this project. - spec = projects[qualified_target]['spec'] - deps = spec.get('dependencies', []) - # Get objects for each dependency. - deps = [_ProjectObject(sln, d, project_objs, projects) for d in deps] - # Find relative path to vcproj from sln. - vcproj_rel_path = gyp.common.RelativePath( - projects[qualified_target]['vcproj_path'], os.path.split(sln)[0]) - vcproj_rel_path = _FixPath(vcproj_rel_path) - # Prepare a dict indicating which project configurations are used for which - # solution configurations for this target. - config_platform_overrides = {} - for config_name, c in spec['configurations'].iteritems(): - config_fullname = _ConfigFullName(config_name, c) - platform = c.get('msvs_target_platform', _ConfigPlatform(c)) - fixed_config_fullname = '%s|%s' % ( - _ConfigBaseName(config_name, _ConfigPlatform(c)), platform) - config_platform_overrides[config_fullname] = fixed_config_fullname - # Create object for this project. - obj = MSVSNew.MSVSProject( - vcproj_rel_path, - name=spec['target_name'], - guid=projects[qualified_target]['guid'], - dependencies=deps, - config_platform_overrides=config_platform_overrides) - # Store it to the list of objects. - project_objs[qualified_target] = obj - # Return project object. - return obj - - -def CalculateVariables(default_variables, params): - """Generated variables that require params to be known.""" - - generator_flags = params.get('generator_flags', {}) - - # Select project file format version (if unset, default to auto detecting). - msvs_version = \ - MSVSVersion.SelectVisualStudioVersion(generator_flags.get('msvs_version', - 'auto')) - # Stash msvs_version for later (so we don't have to probe the system twice). - params['msvs_version'] = msvs_version - - # Set a variable so conditions can be based on msvs_version. - default_variables['MSVS_VERSION'] = msvs_version.ShortName() - - # To determine processor word size on Windows, in addition to checking - # PROCESSOR_ARCHITECTURE (which reflects the word size of the current - # process), it is also necessary to check PROCESSOR_ARCITEW6432 (which - # contains the actual word size of the system when running thru WOW64). - if (os.environ.get('PROCESSOR_ARCHITECTURE', '').find('64') >= 0 or - os.environ.get('PROCESSOR_ARCHITEW6432', '').find('64') >= 0): - default_variables['MSVS_OS_BITS'] = 64 - else: - default_variables['MSVS_OS_BITS'] = 32 - - -def GenerateOutput(target_list, target_dicts, data, params): - """Generate .sln and .vcproj files. - - This is the entry point for this generator. - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - data: Dictionary containing per .gyp data. - """ - global fixpath_prefix - - options = params['options'] - generator_flags = params.get('generator_flags', {}) - - # Get the project file format version back out of where we stashed it in - # GeneratorCalculatedVariables. - msvs_version = params['msvs_version'] - - # Prepare the set of configurations. - configs = set() - for qualified_target in target_list: - build_file = gyp.common.BuildFile(qualified_target) - spec = target_dicts[qualified_target] - for config_name, c in spec['configurations'].iteritems(): - configs.add(_ConfigFullName(config_name, c)) - configs = list(configs) - - # Generate each project. - projects = {} - for qualified_target in target_list: - build_file = gyp.common.BuildFile(qualified_target) - spec = target_dicts[qualified_target] - if spec['toolset'] != 'target': - raise Exception( - 'Multiple toolsets not supported in msvs build (target %s)' % - qualified_target) - default_config = spec['configurations'][spec['default_configuration']] - vcproj_filename = default_config.get('msvs_existing_vcproj') - if not vcproj_filename: - vcproj_filename = spec['target_name'] + options.suffix + '.vcproj' - vcproj_path = os.path.join(os.path.split(build_file)[0], vcproj_filename) - if options.generator_output: - projectDirPath = os.path.dirname(os.path.abspath(vcproj_path)) - vcproj_path = os.path.join(options.generator_output, vcproj_path) - fixpath_prefix = gyp.common.RelativePath(projectDirPath, - os.path.dirname(vcproj_path)) - projects[qualified_target] = { - 'vcproj_path': vcproj_path, - 'guid': _GenerateProject(vcproj_path, build_file, - spec, options, version=msvs_version), - 'spec': spec, - } - - fixpath_prefix = None - - for build_file in data.keys(): - # Validate build_file extension - if build_file[-4:] != '.gyp': - continue - sln_path = build_file[:-4] + options.suffix + '.sln' - if options.generator_output: - sln_path = os.path.join(options.generator_output, sln_path) - #print 'Generating %s' % sln_path - # Get projects in the solution, and their dependents. - sln_projects = gyp.common.BuildFileTargets(target_list, build_file) - sln_projects += gyp.common.DeepDependencyTargets(target_dicts, sln_projects) - # Convert projects to Project Objects. - project_objs = {} - for p in sln_projects: - _ProjectObject(sln_path, p, project_objs, projects) - # Create folder hierarchy. - root_entries = _GatherSolutionFolders( - project_objs, flat=msvs_version.FlatSolution()) - # Create solution. - sln = MSVSNew.MSVSSolution(sln_path, - entries=root_entries, - variants=configs, - websiteProperties=False, - version=msvs_version) - sln.Write() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/scons.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/scons.py deleted file mode 100644 index aea2b988..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/scons.py +++ /dev/null @@ -1,1015 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import gyp -import gyp.common -import gyp.SCons as SCons -import os.path -import pprint -import re - - -# TODO: remove when we delete the last WriteList() call in this module -WriteList = SCons.WriteList - - -generator_default_variables = { - 'EXECUTABLE_PREFIX': '', - 'EXECUTABLE_SUFFIX': '', - 'STATIC_LIB_PREFIX': '${LIBPREFIX}', - 'SHARED_LIB_PREFIX': '${SHLIBPREFIX}', - 'STATIC_LIB_SUFFIX': '${LIBSUFFIX}', - 'SHARED_LIB_SUFFIX': '${SHLIBSUFFIX}', - 'INTERMEDIATE_DIR': '${INTERMEDIATE_DIR}', - 'SHARED_INTERMEDIATE_DIR': '${SHARED_INTERMEDIATE_DIR}', - 'OS': 'linux', - 'PRODUCT_DIR': '$TOP_BUILDDIR', - 'SHARED_LIB_DIR': '$LIB_DIR', - 'LIB_DIR': '$LIB_DIR', - 'RULE_INPUT_ROOT': '${SOURCE.filebase}', - 'RULE_INPUT_EXT': '${SOURCE.suffix}', - 'RULE_INPUT_NAME': '${SOURCE.file}', - 'RULE_INPUT_PATH': '${SOURCE.abspath}', - 'CONFIGURATION_NAME': '${CONFIG_NAME}', -} - -# Tell GYP how to process the input for us. -generator_handles_variants = True -generator_wants_absolute_build_file_paths = True - - -def FixPath(path, prefix): - if not os.path.isabs(path) and not path[0] == '$': - path = prefix + path - return path - - -header = """\ -# This file is generated; do not edit. -""" - - -_alias_template = """ -if GetOption('verbose'): - _action = Action([%(action)s]) -else: - _action = Action([%(action)s], %(message)s) -_outputs = env.Alias( - ['_%(target_name)s_action'], - %(inputs)s, - _action -) -env.AlwaysBuild(_outputs) -""" - -_run_as_template = """ -if GetOption('verbose'): - _action = Action([%(action)s]) -else: - _action = Action([%(action)s], %(message)s) -""" - -_run_as_template_suffix = """ -_run_as_target = env.Alias('run_%(target_name)s', target_files, _action) -env.Requires(_run_as_target, [ - Alias('%(target_name)s'), -]) -env.AlwaysBuild(_run_as_target) -""" - -_command_template = """ -if GetOption('verbose'): - _action = Action([%(action)s]) -else: - _action = Action([%(action)s], %(message)s) -_outputs = env.Command( - %(outputs)s, - %(inputs)s, - _action -) -""" - -# This is copied from the default SCons action, updated to handle symlinks. -_copy_action_template = """ -import shutil -import SCons.Action - -def _copy_files_or_dirs_or_symlinks(dest, src): - SCons.Node.FS.invalidate_node_memos(dest) - if SCons.Util.is_List(src) and os.path.isdir(dest): - for file in src: - shutil.copy2(file, dest) - return 0 - elif os.path.islink(src): - linkto = os.readlink(src) - os.symlink(linkto, dest) - return 0 - elif os.path.isfile(src): - return shutil.copy2(src, dest) - else: - return shutil.copytree(src, dest, 1) - -def _copy_files_or_dirs_or_symlinks_str(dest, src): - return 'Copying %s to %s ...' % (src, dest) - -GYPCopy = SCons.Action.ActionFactory(_copy_files_or_dirs_or_symlinks, - _copy_files_or_dirs_or_symlinks_str, - convert=str) -""" - -_rule_template = """ -%(name)s_additional_inputs = %(inputs)s -%(name)s_outputs = %(outputs)s -def %(name)s_emitter(target, source, env): - return (%(name)s_outputs, source + %(name)s_additional_inputs) -if GetOption('verbose'): - %(name)s_action = Action([%(action)s]) -else: - %(name)s_action = Action([%(action)s], %(message)s) -env['BUILDERS']['%(name)s'] = Builder(action=%(name)s_action, - emitter=%(name)s_emitter) - -_outputs = [] -_processed_input_files = [] -for infile in input_files: - if (type(infile) == type('') - and not os.path.isabs(infile) - and not infile[0] == '$'): - infile = %(src_dir)r + infile - if str(infile).endswith('.%(extension)s'): - _generated = env.%(name)s(infile) - env.Precious(_generated) - _outputs.append(_generated) - %(process_outputs_as_sources_line)s - else: - _processed_input_files.append(infile) -prerequisites.extend(_outputs) -input_files = _processed_input_files -""" - -_spawn_hack = """ -import re -import SCons.Platform.posix -needs_shell = re.compile('["\\'>= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\\r', '|\\r', '\\\\\\r', '-\\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = %(sconscript_files)s - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = [%(default_configuration)r] - -sconsbuild_dir = Dir(%(sconsbuild_dir)s) - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program('$TOP_BUILDDIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program('$TOP_BUILDDIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library('$LIB_DIR/' + str(target), source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule('$TOP_BUILDDIR/' + str(target), source, *args, - **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary('$LIB_DIR/' + str(target), source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary('$LIB_DIR/' + str(target), source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = %(scons_tools)s, - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir(%(src_dir)r), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%%*s' %% (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%%-*s' %% (colwidth, items[i])) - sep = '\\n' + indent - result.append('\\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt %% columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\\n\\n%%s\\n" - help_text.append(fmt %% columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\\n\\n%%s\\n" - help_text.append(fmt %% columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) -""" - -# TEMPLATE END -############################################################################# - - -def GenerateSConscriptWrapper(build_file, build_file_data, name, - output_filename, sconscript_files, - default_configuration): - """ - Generates the "wrapper" SConscript file (analogous to the Visual Studio - solution) that calls all the individual target SConscript files. - """ - output_dir = os.path.dirname(output_filename) - src_dir = build_file_data['_DEPTH'] - src_dir_rel = gyp.common.RelativePath(src_dir, output_dir) - if not src_dir_rel: - src_dir_rel = '.' - scons_settings = build_file_data.get('scons_settings', {}) - sconsbuild_dir = scons_settings.get('sconsbuild_dir', '#') - scons_tools = scons_settings.get('tools', ['default']) - - sconscript_file_lines = ['dict('] - for target in sorted(sconscript_files.keys()): - sconscript = sconscript_files[target] - sconscript_file_lines.append(' %s = %r,' % (target, sconscript)) - sconscript_file_lines.append(')') - - fp = open(output_filename, 'w') - fp.write(header) - fp.write(_wrapper_template % { - 'default_configuration' : default_configuration, - 'name' : name, - 'scons_tools' : repr(scons_tools), - 'sconsbuild_dir' : repr(sconsbuild_dir), - 'sconscript_files' : '\n'.join(sconscript_file_lines), - 'src_dir' : src_dir_rel, - }) - fp.close() - - # Generate the SConstruct file that invokes the wrapper SConscript. - dir, fname = os.path.split(output_filename) - SConstruct = os.path.join(dir, 'SConstruct') - fp = open(SConstruct, 'w') - fp.write(header) - fp.write('SConscript(%s)\n' % repr(fname)) - fp.close() - - -def TargetFilename(target, build_file=None, output_suffix=''): - """Returns the .scons file name for the specified target. - """ - if build_file is None: - build_file, target = gyp.common.ParseQualifiedTarget(target)[:2] - output_file = os.path.join(os.path.dirname(build_file), - target + output_suffix + '.scons') - return output_file - - -def GenerateOutput(target_list, target_dicts, data, params): - """ - Generates all the output files for the specified targets. - """ - options = params['options'] - - if options.generator_output: - def output_path(filename): - return filename.replace(params['cwd'], options.generator_output) - else: - def output_path(filename): - return filename - - default_configuration = None - - for qualified_target in target_list: - spec = target_dicts[qualified_target] - if spec['toolset'] != 'target': - raise Exception( - 'Multiple toolsets not supported in scons build (target %s)' % - qualified_target) - scons_target = SCons.Target(spec) - if scons_target.is_ignored: - continue - - # TODO: assumes the default_configuration of the first target - # non-Default target is the correct default for all targets. - # Need a better model for handle variation between targets. - if (not default_configuration and - spec['default_configuration'] != 'Default'): - default_configuration = spec['default_configuration'] - - build_file, target = gyp.common.ParseQualifiedTarget(qualified_target)[:2] - output_file = TargetFilename(target, build_file, options.suffix) - if options.generator_output: - output_file = output_path(output_file) - - if not spec.has_key('libraries'): - spec['libraries'] = [] - - # Add dependent static library targets to the 'libraries' value. - deps = spec.get('dependencies', []) - spec['scons_dependencies'] = [] - for d in deps: - td = target_dicts[d] - target_name = td['target_name'] - spec['scons_dependencies'].append("Alias('%s')" % target_name) - if td['type'] in ('static_library', 'shared_library'): - libname = td.get('product_name', target_name) - spec['libraries'].append(libname) - if td['type'] == 'loadable_module': - prereqs = spec.get('scons_prerequisites', []) - # TODO: parameterize with <(SHARED_LIBRARY_*) variables? - td_target = SCons.Target(td) - td_target.target_prefix = '${SHLIBPREFIX}' - td_target.target_suffix = '${SHLIBSUFFIX}' - prereqs.append(td_target.full_product_name()) - spec['scons_prerequisites'] = prereqs - - GenerateSConscript(output_file, spec, build_file, data[build_file]) - - if not default_configuration: - default_configuration = 'Default' - - for build_file in sorted(data.keys()): - path, ext = os.path.splitext(build_file) - if ext != '.gyp': - continue - output_dir, basename = os.path.split(path) - output_filename = path + '_main' + options.suffix + '.scons' - - all_targets = gyp.common.AllTargets(target_list, target_dicts, build_file) - sconscript_files = {} - for t in all_targets: - scons_target = SCons.Target(target_dicts[t]) - if scons_target.is_ignored: - continue - bf, target = gyp.common.ParseQualifiedTarget(t)[:2] - target_filename = TargetFilename(target, bf, options.suffix) - tpath = gyp.common.RelativePath(target_filename, output_dir) - sconscript_files[target] = tpath - - output_filename = output_path(output_filename) - if sconscript_files: - GenerateSConscriptWrapper(build_file, data[build_file], basename, - output_filename, sconscript_files, - default_configuration) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/xcode.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/xcode.py deleted file mode 100644 index 92c6365d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/generator/xcode.py +++ /dev/null @@ -1,1134 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import filecmp -import gyp.common -import gyp.xcodeproj_file -import errno -import os -import posixpath -import re -import shutil -import subprocess -import tempfile - - -# Project files generated by this module will use _intermediate_var as a -# custom Xcode setting whose value is a DerivedSources-like directory that's -# project-specific and configuration-specific. The normal choice, -# DERIVED_FILE_DIR, is target-specific, which is thought to be too restrictive -# as it is likely that multiple targets within a single project file will want -# to access the same set of generated files. The other option, -# PROJECT_DERIVED_FILE_DIR, is unsuitable because while it is project-specific, -# it is not configuration-specific. INTERMEDIATE_DIR is defined as -# $(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION). -_intermediate_var = 'INTERMEDIATE_DIR' - -# SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all -# targets that share the same BUILT_PRODUCTS_DIR. -_shared_intermediate_var = 'SHARED_INTERMEDIATE_DIR' - -generator_default_variables = { - 'EXECUTABLE_PREFIX': '', - 'EXECUTABLE_SUFFIX': '', - 'STATIC_LIB_PREFIX': 'lib', - 'SHARED_LIB_PREFIX': '', - 'STATIC_LIB_SUFFIX': '.a', - 'SHARED_LIB_SUFFIX': '.dylib', - # INTERMEDIATE_DIR is a place for targets to build up intermediate products. - # It is specific to each build environment. It is only guaranteed to exist - # and be constant within the context of a project, corresponding to a single - # input file. Some build environments may allow their intermediate directory - # to be shared on a wider scale, but this is not guaranteed. - 'INTERMEDIATE_DIR': '$(%s)' % _intermediate_var, - 'OS': 'mac', - 'PRODUCT_DIR': '$(BUILT_PRODUCTS_DIR)', - 'LIB_DIR': '$(BUILT_PRODUCTS_DIR)', - 'RULE_INPUT_ROOT': '$(INPUT_FILE_BASE)', - 'RULE_INPUT_EXT': '$(INPUT_FILE_SUFFIX)', - 'RULE_INPUT_NAME': '$(INPUT_FILE_NAME)', - 'RULE_INPUT_PATH': '$(INPUT_FILE_PATH)', - 'SHARED_INTERMEDIATE_DIR': '$(%s)' % _shared_intermediate_var, - 'CONFIGURATION_NAME': '$(CONFIGURATION)', -} - -# The Xcode-specific sections that hold paths. -generator_additional_path_sections = [ - 'mac_bundle_resources', - # 'mac_framework_dirs', input already handles _dirs endings. -] - -# The Xcode-specific keys that exist on targets and aren't moved down to -# configurations. -generator_additional_non_configuration_keys = [ - 'mac_bundle', - 'mac_bundle_resources', - 'xcode_create_dependents_test_runner', -] - -# We want to let any rules apply to files that are resources also. -generator_extra_sources_for_rules = [ - 'mac_bundle_resources', -] - - -def CreateXCConfigurationList(configuration_names): - xccl = gyp.xcodeproj_file.XCConfigurationList({'buildConfigurations': []}) - for configuration_name in configuration_names: - xcbc = gyp.xcodeproj_file.XCBuildConfiguration({ - 'name': configuration_name}) - xccl.AppendProperty('buildConfigurations', xcbc) - xccl.SetProperty('defaultConfigurationName', configuration_names[0]) - return xccl - - -class XcodeProject(object): - def __init__(self, gyp_path, path, build_file_dict): - self.gyp_path = gyp_path - self.path = path - self.project = gyp.xcodeproj_file.PBXProject(path=path) - projectDirPath = gyp.common.RelativePath( - os.path.dirname(os.path.abspath(self.gyp_path)), - os.path.dirname(path) or '.') - self.project.SetProperty('projectDirPath', projectDirPath) - self.project_file = \ - gyp.xcodeproj_file.XCProjectFile({'rootObject': self.project}) - self.build_file_dict = build_file_dict - - # TODO(mark): add destructor that cleans up self.path if created_dir is - # True and things didn't complete successfully. Or do something even - # better with "try"? - self.created_dir = False - try: - os.makedirs(self.path) - self.created_dir = True - except OSError, e: - if e.errno != errno.EEXIST: - raise - - def Finalize1(self, xcode_targets, serialize_all_tests): - # Collect a list of all of the build configuration names used by the - # various targets in the file. It is very heavily advised to keep each - # target in an entire project (even across multiple project files) using - # the same set of configuration names. - configurations = [] - for xct in self.project.GetProperty('targets'): - xccl = xct.GetProperty('buildConfigurationList') - xcbcs = xccl.GetProperty('buildConfigurations') - for xcbc in xcbcs: - name = xcbc.GetProperty('name') - if name not in configurations: - configurations.append(name) - - # Replace the XCConfigurationList attached to the PBXProject object with - # a new one specifying all of the configuration names used by the various - # targets. - try: - xccl = CreateXCConfigurationList(configurations) - self.project.SetProperty('buildConfigurationList', xccl) - except: - import sys - sys.stderr.write("Problem with gyp file %s\n" % self.gyp_path) - raise - - # The need for this setting is explained above where _intermediate_var is - # defined. The comments below about wanting to avoid project-wide build - # settings apply here too, but this needs to be set on a project-wide basis - # so that files relative to the _intermediate_var setting can be displayed - # properly in the Xcode UI. - # - # Note that for configuration-relative files such as anything relative to - # _intermediate_var, for the purposes of UI tree view display, Xcode will - # only resolve the configuration name once, when the project file is - # opened. If the active build configuration is changed, the project file - # must be closed and reopened if it is desired for the tree view to update. - # This is filed as Apple radar 6588391. - xccl.SetBuildSetting(_intermediate_var, - '$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)') - xccl.SetBuildSetting(_shared_intermediate_var, - '$(SYMROOT)/DerivedSources/$(CONFIGURATION)') - - # Set user-specified project-wide build settings. This is intended to be - # used very sparingly. Really, almost everything should go into - # target-specific build settings sections. The project-wide settings are - # only intended to be used in cases where Xcode attempts to resolve - # variable references in a project context as opposed to a target context, - # such as when resolving sourceTree references while building up the tree - # tree view for UI display. - for xck, xcv in self.build_file_dict.get('xcode_settings', {}).iteritems(): - xccl.SetBuildSetting(xck, xcv) - - # Sort the targets based on how they appeared in the input. - # TODO(mark): Like a lot of other things here, this assumes internal - # knowledge of PBXProject - in this case, of its "targets" property. - - # ordinary_targets are ordinary targets that are already in the project - # file. run_test_targets are the targets that run unittests and should be - # used for the Run All Tests target. support_targets are the action/rule - # targets used by GYP file targets, just kept for the assert check. - ordinary_targets = [] - run_test_targets = [] - support_targets = [] - - # targets is full list of targets in the project. - targets = [] - - # does the it define it's own "all"? - has_custom_all = False - - # targets_for_all is the list of ordinary_targets that should be listed - # in this project's "All" target. It includes each non_runtest_target - # that does not have suppress_wildcard set. - targets_for_all = [] - - for target in self.build_file_dict['targets']: - target_name = target['target_name'] - toolset = target['toolset'] - qualified_target = gyp.common.QualifiedTarget(self.gyp_path, target_name, - toolset) - xcode_target = xcode_targets[qualified_target] - # Make sure that the target being added to the sorted list is already in - # the unsorted list. - assert xcode_target in self.project._properties['targets'] - targets.append(xcode_target) - ordinary_targets.append(xcode_target) - if xcode_target.support_target: - support_targets.append(xcode_target.support_target) - targets.append(xcode_target.support_target) - - if not int(target.get('suppress_wildcard', False)): - targets_for_all.append(xcode_target) - - if target_name.lower() == 'all': - has_custom_all = True; - - # If this target has a 'run_as' attribute, or is a test, add its - # target to the targets, and (if it's a test) add it the to the - # test targets. - is_test = int(target.get('test', 0)) - if target.get('run_as') or is_test: - # Make a target to run something. It should have one - # dependency, the parent xcode target. - xccl = CreateXCConfigurationList(configurations) - run_target = gyp.xcodeproj_file.PBXAggregateTarget({ - 'name': 'Run ' + target_name, - 'productName': xcode_target.GetProperty('productName'), - 'buildConfigurationList': xccl, - }, - parent=self.project) - run_target.AddDependency(xcode_target) - - # The test runner target has a build phase that executes the - # test, if this has the 'test' attribute. If the 'run_as' tag - # doesn't exist (meaning that this must be a test), then we - # define a default test command line. - command = target.get('run_as', { - 'action': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'] - }) - - script = '' - if command.get('working_directory'): - script = script + 'cd "%s"\n' % \ - gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - command.get('working_directory')) - - if command.get('environment'): - script = script + "\n".join( - ['export %s="%s"' % - (key, gyp.xcodeproj_file.ConvertVariablesToShellSyntax(val)) - for (key, val) in command.get('environment').iteritems()]) + "\n" - - # Some test end up using sockets, files on disk, etc. and can get - # confused if more then one test runs at a time. The generator - # flag 'xcode_serialize_all_test_runs' controls the forcing of all - # tests serially. It defaults to True. To get serial runs this - # little bit of python does the same as the linux flock utility to - # make sure only one runs at a time. - command_prefix = '' - if is_test and serialize_all_tests: - command_prefix = \ -"""python -c "import fcntl, subprocess, sys -file = open('$TMPDIR/GYP_serialize_test_runs', 'a') -fcntl.flock(file.fileno(), fcntl.LOCK_EX) -sys.exit(subprocess.call(sys.argv[1:]))" """ - - # If we were unable to exec for some reason, we want to exit - # with an error, and fixup variable references to be shell - # syntax instead of xcode syntax. - script = script + 'exec ' + command_prefix + '%s\nexit 1\n' % \ - gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - gyp.common.EncodePOSIXShellList(command.get('action'))) - - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ - 'shellScript': script, - 'showEnvVarsInLog': 0, - }) - run_target.AppendProperty('buildPhases', ssbp) - - # Add the run target to the project file. - targets.append(run_target) - if is_test: - run_test_targets.append(run_target) - xcode_target.test_runner = run_target - - - # Make sure that the list of targets being replaced is the same length as - # the one replacing it, but allow for the added test runner targets. - assert len(self.project._properties['targets']) == \ - len(ordinary_targets) + len(support_targets) - - self.project._properties['targets'] = targets - - # Get rid of unnecessary levels of depth in groups like the Source group. - self.project.RootGroupsTakeOverOnlyChildren(True) - - # Sort the groups nicely. Do this after sorting the targets, because the - # Products group is sorted based on the order of the targets. - self.project.SortGroups() - - # Create an "All" target if there's more than one target in this project - # file and the project didn't define its own "All" target. Put a generated - # "All" target first so that people opening up the project for the first - # time will build everything by default. - if len(targets_for_all) > 1 and not has_custom_all: - xccl = CreateXCConfigurationList(configurations) - all_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - 'buildConfigurationList': xccl, - 'name': 'All', - }, - parent=self.project) - - for target in targets_for_all: - all_target.AddDependency(target) - - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._properties. It's important to get the "All" target first, - # though. - self.project._properties['targets'].insert(0, all_target) - - # The same, but for run_test_targets. - if len(run_test_targets) > 1: - xccl = CreateXCConfigurationList(configurations) - run_all_tests_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - 'buildConfigurationList': xccl, - 'name': 'Run All Tests', - }, - parent=self.project) - for run_test_target in run_test_targets: - run_all_tests_target.AddDependency(run_test_target) - - # Insert after the "All" target, which must exist if there is more than - # one run_test_target. - self.project._properties['targets'].insert(1, run_all_tests_target) - - def Finalize2(self, xcode_targets, xcode_target_to_target_dict): - # Finalize2 needs to happen in a separate step because the process of - # updating references to other projects depends on the ordering of targets - # within remote project files. Finalize1 is responsible for sorting duty, - # and once all project files are sorted, Finalize2 can come in and update - # these references. - - # To support making a "test runner" target that will run all the tests - # that are direct dependents of any given target, we look for - # xcode_create_dependents_test_runner being set on an Aggregate target, - # and generate a second target that will run the tests runners found under - # the marked target. - for bf_tgt in self.build_file_dict['targets']: - if int(bf_tgt.get('xcode_create_dependents_test_runner', 0)): - tgt_name = bf_tgt['target_name'] - toolset = bf_tgt['toolset'] - qualified_target = gyp.common.QualifiedTarget(self.gyp_path, - tgt_name, toolset) - xcode_target = xcode_targets[qualified_target] - if isinstance(xcode_target, gyp.xcodeproj_file.PBXAggregateTarget): - # Collect all the run test targets. - all_run_tests = [] - pbxtds = xcode_target.GetProperty('dependencies') - for pbxtd in pbxtds: - pbxcip = pbxtd.GetProperty('targetProxy') - dependency_xct = pbxcip.GetProperty('remoteGlobalIDString') - target_dict = xcode_target_to_target_dict[dependency_xct] - if target_dict and int(target_dict.get('test', 0)): - assert dependency_xct.test_runner - all_run_tests.append(dependency_xct.test_runner) - - # Directly depend on all the runners as they depend on the target - # that builds them. - if len(all_run_tests) > 0: - run_all_target = gyp.xcodeproj_file.PBXAggregateTarget({ - 'name': 'Run %s Tests' % tgt_name, - 'productName': tgt_name, - }, - parent=self.project) - for run_test_target in all_run_tests: - run_all_target.AddDependency(run_test_target) - - # Insert the test runner after the related target. - idx = self.project._properties['targets'].index(xcode_target) - self.project._properties['targets'].insert(idx + 1, run_all_target) - - # Update all references to other projects, to make sure that the lists of - # remote products are complete. Otherwise, Xcode will fill them in when - # it opens the project file, which will result in unnecessary diffs. - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._other_pbxprojects. - for other_pbxproject in self.project._other_pbxprojects.keys(): - self.project.AddOrGetProjectReference(other_pbxproject) - - self.project.SortRemoteProductReferences() - - # Give everything an ID. - self.project_file.ComputeIDs() - - # Make sure that no two objects in the project file have the same ID. If - # multiple objects wind up with the same ID, upon loading the file, Xcode - # will only recognize one object (the last one in the file?) and the - # results are unpredictable. - self.project_file.EnsureNoIDCollisions() - - def Write(self): - # Write the project file to a temporary location first. Xcode watches for - # changes to the project file and presents a UI sheet offering to reload - # the project when it does change. However, in some cases, especially when - # multiple projects are open or when Xcode is busy, things don't work so - # seamlessly. Sometimes, Xcode is able to detect that a project file has - # changed but can't unload it because something else is referencing it. - # To mitigate this problem, and to avoid even having Xcode present the UI - # sheet when an open project is rewritten for inconsequential changes, the - # project file is written to a temporary file in the xcodeproj directory - # first. The new temporary file is then compared to the existing project - # file, if any. If they differ, the new file replaces the old; otherwise, - # the new project file is simply deleted. Xcode properly detects a file - # being renamed over an open project file as a change and so it remains - # able to present the "project file changed" sheet under this system. - # Writing to a temporary file first also avoids the possible problem of - # Xcode rereading an incomplete project file. - (output_fd, new_pbxproj_path) = \ - tempfile.mkstemp(suffix='.tmp', prefix='project.pbxproj.gyp.', - dir=self.path) - - try: - output_file = os.fdopen(output_fd, 'wb') - - self.project_file.Print(output_file) - output_file.close() - - pbxproj_path = os.path.join(self.path, 'project.pbxproj') - - same = False - try: - same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False) - except OSError, e: - if e.errno != errno.ENOENT: - raise - - if same: - # The new file is identical to the old one, just get rid of the new - # one. - os.unlink(new_pbxproj_path) - else: - # The new file is different from the old one, or there is no old one. - # Rename the new file to the permanent name. - # - # tempfile.mkstemp uses an overly restrictive mode, resulting in a - # file that can only be read by the owner, regardless of the umask. - # There's no reason to not respect the umask here, which means that - # an extra hoop is required to fetch it and reset the new file's mode. - # - # No way to get the umask without setting a new one? Set a safe one - # and then set it back to the old value. - umask = os.umask(077) - os.umask(umask) - - os.chmod(new_pbxproj_path, 0666 & ~umask) - os.rename(new_pbxproj_path, pbxproj_path) - - except Exception: - # Don't leave turds behind. In fact, if this code was responsible for - # creating the xcodeproj directory, get rid of that too. - os.unlink(new_pbxproj_path) - if self.created_dir: - shutil.rmtree(self.path, True) - raise - - -cached_xcode_version = None -def InstalledXcodeVersion(): - """Fetches the installed version of Xcode, returns empty string if it is - unable to figure it out.""" - - global cached_xcode_version - if not cached_xcode_version is None: - return cached_xcode_version - - # Default to an empty string - cached_xcode_version = '' - - # Collect the xcodebuild's version information. - try: - import subprocess - cmd = ['/usr/bin/xcodebuild', '-version'] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) - xcodebuild_version_info = proc.communicate()[0] - # Any error, return empty string - if proc.returncode: - xcodebuild_version_info = '' - except OSError: - # We failed to launch the tool - xcodebuild_version_info = '' - - # Pull out the Xcode version itself. - match_line = re.search('^Xcode (.*)$', xcodebuild_version_info, re.MULTILINE) - if match_line: - cached_xcode_version = match_line.group(1) - # Done! - return cached_xcode_version - - -def AddSourceToTarget(source, pbxp, xct): - # TODO(mark): Perhaps this can be made a little bit fancier. - source_extensions = ['c', 'cc', 'cpp', 'cxx', 'm', 'mm', 's'] - basename = posixpath.basename(source) - (root, ext) = posixpath.splitext(basename) - if ext != '': - ext = ext[1:].lower() - - if ext in source_extensions: - xct.SourcesPhase().AddFile(source) - else: - # Files that aren't added to a sources build phase can still go into - # the project file, just not as part of a build phase. - pbxp.AddOrGetFileInRootGroup(source) - - -def AddResourceToTarget(resource, pbxp, xct): - # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call - # where it's used. - xct.ResourcesPhase().AddFile(resource) - - -_xcode_variable_re = re.compile('(\$\((.*?)\))') -def ExpandXcodeVariables(string, expansions): - """Expands Xcode-style $(VARIABLES) in string per the expansions dict. - - In some rare cases, it is appropriate to expand Xcode variables when a - project file is generated. For any substring $(VAR) in string, if VAR is a - key in the expansions dict, $(VAR) will be replaced with expansions[VAR]. - Any $(VAR) substring in string for which VAR is not a key in the expansions - dict will remain in the returned string. - """ - - matches = _xcode_variable_re.findall(string) - if matches == None: - return string - - matches.reverse() - for match in matches: - (to_replace, variable) = match - if not variable in expansions: - continue - - replacement = expansions[variable] - string = re.sub(re.escape(to_replace), replacement, string) - - return string - - -def GenerateOutput(target_list, target_dicts, data, params): - options = params['options'] - generator_flags = params.get('generator_flags', {}) - parallel_builds = generator_flags.get('xcode_parallel_builds', True) - serialize_all_tests = \ - generator_flags.get('xcode_serialize_all_test_runs', True) - xcode_projects = {} - for build_file, build_file_dict in data.iteritems(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != '.gyp': - continue - xcodeproj_path = build_file_root + options.suffix + '.xcodeproj' - if options.generator_output: - xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) - xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict) - xcode_projects[build_file] = xcp - pbxp = xcp.project - - if parallel_builds: - pbxp.SetProperty('attributes', - {'BuildIndependentTargetsInParallel': 'YES'}) - - main_group = pbxp.GetProperty('mainGroup') - build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'}) - main_group.AppendChild(build_group) - for included_file in build_file_dict['included_files']: - build_group.AddOrGetFileByPath(included_file, False) - - xcode_targets = {} - xcode_target_to_target_dict = {} - for qualified_target in target_list: - [build_file, target_name, toolset] = \ - gyp.common.ParseQualifiedTarget(qualified_target) - - spec = target_dicts[qualified_target] - if spec['toolset'] != 'target': - raise Exception( - 'Multiple toolsets not supported in xcode build (target %s)' % - qualified_target) - configuration_names = [spec['default_configuration']] - for configuration_name in sorted(spec['configurations'].keys()): - if configuration_name not in configuration_names: - configuration_names.append(configuration_name) - xcp = xcode_projects[build_file] - pbxp = xcp.project - - # Set up the configurations for the target according to the list of names - # supplied. - xccl = CreateXCConfigurationList(configuration_names) - - # Create an XCTarget subclass object for the target. We use the type - # with "+bundle" appended if the target has "mac_bundle" set. - _types = { - 'executable': 'com.apple.product-type.tool', - 'loadable_module': 'com.apple.product-type.library.dynamic', - 'shared_library': 'com.apple.product-type.library.dynamic', - 'static_library': 'com.apple.product-type.library.static', - 'executable+bundle': 'com.apple.product-type.application', - 'loadable_module+bundle': 'com.apple.product-type.bundle', - 'shared_library+bundle': 'com.apple.product-type.framework', - } - - target_properties = { - 'buildConfigurationList': xccl, - 'name': target_name, - } - - type = spec['type'] - is_bundle = int(spec.get('mac_bundle', 0)) - if type != 'none': - type_bundle_key = type - if is_bundle: - type_bundle_key += '+bundle' - xctarget_type = gyp.xcodeproj_file.PBXNativeTarget - try: - target_properties['productType'] = _types[type_bundle_key] - except KeyError, e: - gyp.common.ExceptionAppend(e, "-- unknown product type while " - "writing target %s" % target_name) - raise - else: - xctarget_type = gyp.xcodeproj_file.PBXAggregateTarget - - target_product_name = spec.get('product_name', None) - if target_product_name: - target_properties['productName'] = target_product_name - - xct = xctarget_type(target_properties, parent=pbxp, - force_extension=spec.get('product_extension', None)) - pbxp.AppendProperty('targets', xct) - xcode_targets[qualified_target] = xct - xcode_target_to_target_dict[xct] = spec - - # Xcode does not have a distinct type for loadable_modules that are pure - # BSD targets (ie-unbundled). It uses the same setup as a shared_library - # but the mach-o type is explictly set in the settings. So before we do - # anything else, for this one case, we stuff in that one setting. This - # would allow the other data in the spec to change it if need be. - if type == 'loadable_module' and not is_bundle: - xccl.SetBuildSetting('MACH_O_TYPE', 'mh_bundle') - - spec_actions = spec.get('actions', []) - spec_rules = spec.get('rules', []) - - # Xcode has some "issues" with checking dependencies for the "Compile - # sources" step with any source files/headers generated by actions/rules. - # To work around this, if a target is building anything directly (not - # type "none"), then a second target as used to run the GYP actions/rules - # and is made a dependency of this target. This way the work is done - # before the dependency checks for what should be recompiled. - support_xct = None - if type != 'none' and (spec_actions or spec_rules): - support_xccl = CreateXCConfigurationList(configuration_names); - support_target_properties = { - 'buildConfigurationList': support_xccl, - 'name': target_name + ' Support', - } - if target_product_name: - support_target_properties['productName'] = \ - target_product_name + ' Support' - support_xct = \ - gyp.xcodeproj_file.PBXAggregateTarget(support_target_properties, - parent=pbxp) - pbxp.AppendProperty('targets', support_xct) - xct.AddDependency(support_xct) - # Hang the support target off the main target so it can be tested/found - # by the generator during Finalize. - xct.support_target = support_xct - - prebuild_index = 0 - - # Add custom shell script phases for "actions" sections. - for action in spec_actions: - # There's no need to write anything into the script to ensure that the - # output directories already exist, because Xcode will look at the - # declared outputs and automatically ensure that they exist for us. - - # Do we have a message to print when this action runs? - message = action.get('message') - if message: - message = 'echo note: ' + gyp.common.EncodePOSIXShellArgument(message) - else: - message = '' - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(action['action']) - - # Convert Xcode-type variable references to sh-compatible environment - # variable references. - message_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax(message) - action_string_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - action_string) - - script = '' - # Include the optional message - if message_sh: - script += message_sh + '\n' - # Be sure the script runs in exec, and that if exec fails, the script - # exits signalling an error. - script += 'exec ' + action_string_sh + '\nexit 1\n' - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ - 'inputPaths': action['inputs'], - 'name': 'Action "' + action['action_name'] + '"', - 'outputPaths': action['outputs'], - 'shellScript': script, - 'showEnvVarsInLog': 0, - }) - - if support_xct: - support_xct.AppendProperty('buildPhases', ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move into xcodeproj_file - # itself. - xct._properties['buildPhases'].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # TODO(mark): Should verify that at most one of these is specified. - if int(action.get('process_outputs_as_sources', False)): - for output in action['outputs']: - AddSourceToTarget(output, pbxp, xct) - - if int(action.get('process_outputs_as_mac_bundle_resources', False)): - for output in action['outputs']: - AddResourceToTarget(output, pbxp, xct) - - # tgt_mac_bundle_resources holds the list of bundle resources so - # the rule processing can check against it. - if is_bundle: - tgt_mac_bundle_resources = spec.get('mac_bundle_resources', []) - else: - tgt_mac_bundle_resources = [] - - # Add custom shell script phases driving "make" for "rules" sections. - # - # Xcode's built-in rule support is almost powerful enough to use directly, - # but there are a few significant deficiencies that render them unusable. - # There are workarounds for some of its inadequacies, but in aggregate, - # the workarounds added complexity to the generator, and some workarounds - # actually require input files to be crafted more carefully than I'd like. - # Consequently, until Xcode rules are made more capable, "rules" input - # sections will be handled in Xcode output by shell script build phases - # performed prior to the compilation phase. - # - # The following problems with Xcode rules were found. The numbers are - # Apple radar IDs. I hope that these shortcomings are addressed, I really - # liked having the rules handled directly in Xcode during the period that - # I was prototyping this. - # - # 6588600 Xcode compiles custom script rule outputs too soon, compilation - # fails. This occurs when rule outputs from distinct inputs are - # interdependent. The only workaround is to put rules and their - # inputs in a separate target from the one that compiles the rule - # outputs. This requires input file cooperation and it means that - # process_outputs_as_sources is unusable. - # 6584932 Need to declare that custom rule outputs should be excluded from - # compilation. A possible workaround is to lie to Xcode about a - # rule's output, giving it a dummy file it doesn't know how to - # compile. The rule action script would need to touch the dummy. - # 6584839 I need a way to declare additional inputs to a custom rule. - # A possible workaround is a shell script phase prior to - # compilation that touches a rule's primary input files if any - # would-be additional inputs are newer than the output. Modifying - # the source tree - even just modification times - feels dirty. - # 6564240 Xcode "custom script" build rules always dump all environment - # variables. This is a low-prioroty problem and is not a - # show-stopper. - rules_by_ext = {} - for rule in spec_rules: - rules_by_ext[rule['extension']] = rule - - # First, some definitions: - # - # A "rule source" is a file that was listed in a target's "sources" - # list and will have a rule applied to it on the basis of matching the - # rule's "extensions" attribute. Rule sources are direct inputs to - # rules. - # - # Rule definitions may specify additional inputs in their "inputs" - # attribute. These additional inputs are used for dependency tracking - # purposes. - # - # A "concrete output" is a rule output with input-dependent variables - # resolved. For example, given a rule with: - # 'extension': 'ext', 'outputs': ['$(INPUT_FILE_BASE).cc'], - # if the target's "sources" list contained "one.ext" and "two.ext", - # the "concrete output" for rule input "two.ext" would be "two.cc". If - # a rule specifies multiple outputs, each input file that the rule is - # applied to will have the same number of concrete outputs. - # - # If any concrete outputs are outdated or missing relative to their - # corresponding rule_source or to any specified additional input, the - # rule action must be performed to generate the concrete outputs. - - # concrete_outputs_by_rule_source will have an item at the same index - # as the rule['rule_sources'] that it corresponds to. Each item is a - # list of all of the concrete outputs for the rule_source. - concrete_outputs_by_rule_source = [] - - # concrete_outputs_all is a flat list of all concrete outputs that this - # rule is able to produce, given the known set of input files - # (rule_sources) that apply to it. - concrete_outputs_all = [] - - # messages & actions are keyed by the same indices as rule['rule_sources'] - # and concrete_outputs_by_rule_source. They contain the message and - # action to perform after resolving input-dependent variables. The - # message is optional, in which case None is stored for each rule source. - messages = [] - actions = [] - - for rule_source in rule.get('rule_sources', []): - rule_source_basename = posixpath.basename(rule_source) - (rule_source_root, rule_source_ext) = \ - posixpath.splitext(rule_source_basename) - - # These are the same variable names that Xcode uses for its own native - # rule support. Because Xcode's rule engine is not being used, they - # need to be expanded as they are written to the makefile. - rule_input_dict = { - 'INPUT_FILE_BASE': rule_source_root, - 'INPUT_FILE_SUFFIX': rule_source_ext, - 'INPUT_FILE_NAME': rule_source_basename, - 'INPUT_FILE_PATH': rule_source, - } - - concrete_outputs_for_this_rule_source = [] - for output in rule.get('outputs', []): - # Fortunately, Xcode and make both use $(VAR) format for their - # variables, so the expansion is the only transformation necessary. - # Any remaning $(VAR)-type variables in the string can be given - # directly to make, which will pick up the correct settings from - # what Xcode puts into the environment. - concrete_output = ExpandXcodeVariables(output, rule_input_dict) - concrete_outputs_for_this_rule_source.append(concrete_output) - - # Add all concrete outputs to the project. - pbxp.AddOrGetFileInRootGroup(concrete_output) - - concrete_outputs_by_rule_source.append( \ - concrete_outputs_for_this_rule_source) - concrete_outputs_all.extend(concrete_outputs_for_this_rule_source) - - # TODO(mark): Should verify that at most one of these is specified. - if int(rule.get('process_outputs_as_sources', False)): - for output in concrete_outputs_for_this_rule_source: - AddSourceToTarget(output, pbxp, xct) - - # If the file came from the mac_bundle_resources list or if the rule - # is marked to process outputs as bundle resource, do so. - was_mac_bundle_resource = rule_source in tgt_mac_bundle_resources - if was_mac_bundle_resource or \ - int(rule.get('process_outputs_as_mac_bundle_resources', False)): - for output in concrete_outputs_for_this_rule_source: - AddResourceToTarget(output, pbxp, xct) - - # Do we have a message to print when this rule runs? - message = rule.get('message') - if message: - message = gyp.common.EncodePOSIXShellArgument(message) - message = '@echo note: ' + ExpandXcodeVariables(message, - rule_input_dict) - messages.append(message) - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(rule['action']) - - action = ExpandXcodeVariables(action_string, rule_input_dict) - actions.append(action) - - if len(concrete_outputs_all) > 0: - # TODO(mark): There's a possibilty for collision here. Consider - # target "t" rule "A_r" and target "t_A" rule "r". - makefile_name = '%s_%s.make' % (target_name, rule['rule_name']) - makefile_path = os.path.join(xcode_projects[build_file].path, - makefile_name) - # TODO(mark): try/close? Write to a temporary file and swap it only - # if it's got changes? - makefile = open(makefile_path, 'wb') - - # make will build the first target in the makefile by default. By - # convention, it's called "all". List all (or at least one) - # concrete output for each rule source as a prerequisite of the "all" - # target. - makefile.write('all: \\\n') - for concrete_output_index in \ - xrange(0, len(concrete_outputs_by_rule_source)): - # Only list the first (index [0]) concrete output of each input - # in the "all" target. Otherwise, a parallel make (-j > 1) would - # attempt to process each input multiple times simultaneously. - # Otherwise, "all" could just contain the entire list of - # concrete_outputs_all. - concrete_output = \ - concrete_outputs_by_rule_source[concrete_output_index][0] - if concrete_output_index == len(concrete_outputs_by_rule_source) - 1: - eol = '' - else: - eol = ' \\' - makefile.write(' %s%s\n' % (concrete_output, eol)) - - for (rule_source, concrete_outputs, message, action) in \ - zip(rule['rule_sources'], concrete_outputs_by_rule_source, - messages, actions): - makefile.write('\n') - - # Add a rule that declares it can build each concrete output of a - # rule source. Collect the names of the directories that are - # required. - concrete_output_dirs = [] - for concrete_output_index in xrange(0, len(concrete_outputs)): - concrete_output = concrete_outputs[concrete_output_index] - if concrete_output_index == 0: - bol = '' - else: - bol = ' ' - makefile.write('%s%s \\\n' % (bol, concrete_output)) - - concrete_output_dir = posixpath.dirname(concrete_output) - if (concrete_output_dir and - concrete_output_dir not in concrete_output_dirs): - concrete_output_dirs.append(concrete_output_dir) - - makefile.write(' : \\\n') - - # The prerequisites for this rule are the rule source itself and - # the set of additional rule inputs, if any. - prerequisites = [rule_source] - prerequisites.extend(rule.get('inputs', [])) - for prerequisite_index in xrange(0, len(prerequisites)): - prerequisite = prerequisites[prerequisite_index] - if prerequisite_index == len(prerequisites) - 1: - eol = '' - else: - eol = ' \\' - makefile.write(' %s%s\n' % (prerequisite, eol)) - - # Make sure that output directories exist before executing the rule - # action. - # TODO(mark): quote the list of concrete_output_dirs. - if len(concrete_output_dirs) > 0: - makefile.write('\tmkdir -p %s\n' % ' '.join(concrete_output_dirs)) - - # The rule message and action have already had the necessary variable - # substitutions performed. - if message: - makefile.write('\t%s\n' % message) - makefile.write('\t%s\n' % action) - - makefile.close() - - # It might be nice to ensure that needed output directories exist - # here rather than in each target in the Makefile, but that wouldn't - # work if there ever was a concrete output that had an input-dependent - # variable anywhere other than in the leaf position. - - # Don't declare any inputPaths or outputPaths. If they're present, - # Xcode will provide a slight optimization by only running the script - # phase if any output is missing or outdated relative to any input. - # Unfortunately, it will also assume that all outputs are touched by - # the script, and if the outputs serve as files in a compilation - # phase, they will be unconditionally rebuilt. Since make might not - # rebuild everything that could be declared here as an output, this - # extra compilation activity is unnecessary. With inputPaths and - # outputPaths not supplied, make will always be called, but it knows - # enough to not do anything when everything is up-to-date. - - # To help speed things up, pass -j COUNT to make so it does some work - # in parallel. Don't use ncpus because Xcode will build ncpus targets - # in parallel and if each target happens to have a rules step, there - # would be ncpus^2 things going. With a machine that has 2 quad-core - # Xeons, a build can quickly run out of processes based on - # scheduling/other tasks, and randomly failing builds are no good. - script = \ -"""JOB_COUNT="$(sysctl -n hw.ncpu)" -if [ "${JOB_COUNT}" -gt 4 ]; then - JOB_COUNT=4 -fi -exec "${DEVELOPER_BIN_DIR}/make" -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" -exit 1 -""" % makefile_name - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ - 'name': 'Rule "' + rule['rule_name'] + '"', - 'shellScript': script, - 'showEnvVarsInLog': 0, - }) - - if support_xct: - support_xct.AppendProperty('buildPhases', ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move into xcodeproj_file - # itself. - xct._properties['buildPhases'].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # Extra rule inputs also go into the project file. Concrete outputs were - # already added when they were computed. - for group in ['inputs', 'inputs_excluded']: - for item in rule.get(group, []): - pbxp.AddOrGetFileInRootGroup(item) - - # Add "sources". - for source in spec.get('sources', []): - (source_root, source_extension) = posixpath.splitext(source) - if source_extension[1:] not in rules_by_ext: - # AddSourceToTarget will add the file to a root group if it's not - # already there. - AddSourceToTarget(source, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(source) - - # Add "mac_bundle_resources" if it's a bundle of any type. - if is_bundle: - for resource in tgt_mac_bundle_resources: - (resource_root, resource_extension) = posixpath.splitext(resource) - if resource_extension[1:] not in rules_by_ext: - AddResourceToTarget(resource, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(resource) - - # Add "copies". - for copy_group in spec.get('copies', []): - pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase({ - 'name': 'Copy to ' + copy_group['destination'] - }, - parent=xct) - dest = copy_group['destination'] - if dest[0] not in ('/', '$'): - # Relative paths are relative to $(SRCROOT). - dest = '$(SRCROOT)/' + dest - pbxcp.SetDestination(dest) - - # TODO(mark): The usual comment about this knowing too much about - # gyp.xcodeproj_file internals applies. - xct._properties['buildPhases'].insert(prebuild_index, pbxcp) - - for file in copy_group['files']: - pbxcp.AddFile(file) - - # Excluded files can also go into the project file. - for key in ['sources', 'mac_bundle_resources']: - excluded_key = key + '_excluded' - for item in spec.get(excluded_key, []): - pbxp.AddOrGetFileInRootGroup(item) - - # So can "inputs" and "outputs" sections of "actions" groups. - for action in spec.get('actions', []): - groups = ['inputs', 'inputs_excluded', 'outputs', 'outputs_excluded'] - for group in groups: - for item in action.get(group, []): - # Exclude anything in BUILT_PRODUCTS_DIR. They're products, not - # sources. - if not item.startswith('$(BUILT_PRODUCTS_DIR)/'): - pbxp.AddOrGetFileInRootGroup(item) - - for postbuild in spec.get('postbuilds', []): - action_string_sh = gyp.common.EncodePOSIXShellList(postbuild['action']) - script = 'exec ' + action_string_sh + '\nexit 1\n' - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ - 'name': 'Postbuild "' + postbuild['postbuild_name'] + '"', - 'shellScript': script, - 'showEnvVarsInLog': 0, - }) - xct.AppendProperty('buildPhases', ssbp) - - # Add dependencies before libraries, because adding a dependency may imply - # adding a library. It's preferable to keep dependencies listed first - # during a link phase so that they can override symbols that would - # otherwise be provided by libraries, which will usually include system - # libraries. On some systems, ld is finicky and even requires the - # libraries to be ordered in such a way that unresolved symbols in - # earlier-listed libraries may only be resolved by later-listed libraries. - # The Mac linker doesn't work that way, but other platforms do, and so - # their linker invocations need to be constructed in this way. There's - # no compelling reason for Xcode's linker invocations to differ. - - if 'dependencies' in spec: - for dependency in spec['dependencies']: - xct.AddDependency(xcode_targets[dependency]) - # The support project also gets the dependencies (in case they are - # needed for the actions/rules to work). - if support_xct: - support_xct.AddDependency(xcode_targets[dependency]) - - if 'libraries' in spec: - for library in spec['libraries']: - xct.FrameworksPhase().AddFile(library) - # Add the library's directory to LIBRARY_SEARCH_PATHS if necessary. - # I wish Xcode handled this automatically. - # TODO(mark): this logic isn't right. There are certain directories - # that are always searched, we should check to see if the library is - # in one of those directories, and if not, we should do the - # AppendBuildSetting thing. - if not posixpath.isabs(library) and not library.startswith('$'): - # TODO(mark): Need to check to see if library_dir is already in - # LIBRARY_SEARCH_PATHS. - library_dir = posixpath.dirname(library) - xct.AppendBuildSetting('LIBRARY_SEARCH_PATHS', library_dir) - - for configuration_name in configuration_names: - configuration = spec['configurations'][configuration_name] - xcbc = xct.ConfigurationNamed(configuration_name) - for include_dir in configuration.get('mac_framework_dirs', []): - xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir) - for include_dir in configuration.get('include_dirs', []): - xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir) - if 'defines' in configuration: - for define in configuration['defines']: - # If the define is of the form A="B", escape the quotes - # yielding A=\"\\\"B\\\"\". The extra set of quotes tell - # Xcode NOT to split on spaces, and still define a string - # literal (with quotes). - set_define = re.sub(r'^([^=]*=)"([^"]*)"$', - r'\1"\"\2\""', define) - xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) - if 'xcode_settings' in configuration: - for xck, xcv in configuration['xcode_settings'].iteritems(): - xcbc.SetBuildSetting(xck, xcv) - - build_files = [] - for build_file, build_file_dict in data.iteritems(): - if build_file.endswith('.gyp'): - build_files.append(build_file) - - for build_file in build_files: - xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) - - for build_file in build_files: - xcode_projects[build_file].Finalize2(xcode_targets, - xcode_target_to_target_dict) - - for build_file in build_files: - xcode_projects[build_file].Write() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/input.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/input.py deleted file mode 100644 index 7d33cdd5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/input.py +++ /dev/null @@ -1,2071 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from compiler.ast import Const -from compiler.ast import Dict -from compiler.ast import Discard -from compiler.ast import List -from compiler.ast import Module -from compiler.ast import Node -from compiler.ast import Stmt -import compiler -import copy -import gyp.common -import optparse -import os.path -import re -import shlex -import subprocess -import sys - - -# A list of types that are treated as linkable. -linkable_types = ['executable', 'shared_library', 'loadable_module'] - -# A list of sections that contain links to other targets. -dependency_sections = ['dependencies', 'export_dependent_settings'] - -# base_path_sections is a list of sections defined by GYP that contain -# pathnames. The generators can provide more keys, the two lists are merged -# into path_sections, but you should call IsPathSection instead of using either -# list directly. -base_path_sections = [ - 'destination', - 'files', - 'include_dirs', - 'inputs', - 'libraries', - 'outputs', - 'sources', -] -path_sections = [] - - -def IsPathSection(section): - if section in path_sections or \ - section.endswith('_dir') or section.endswith('_dirs') or \ - section.endswith('_file') or section.endswith('_files') or \ - section.endswith('_path') or section.endswith('_paths'): - return True - return False - - -# base_non_configuraiton_keys is a list of key names that belong in the target -# itself and should not be propagated into its configurations. It is merged -# with a list that can come from the generator to -# create non_configuration_keys. -base_non_configuration_keys = [ - # Sections that must exist inside targets and not configurations. - 'actions', - 'configurations', - 'copies', - 'default_configuration', - 'dependencies', - 'dependencies_original', - 'link_languages', - 'libraries', - 'postbuilds', - 'product_dir', - 'product_extension', - 'product_name', - 'rules', - 'run_as', - 'sources', - 'suppress_wildcard', - 'target_name', - 'test', - 'toolset', - 'toolsets', - 'type', - 'variants', - - # Sections that can be found inside targets or configurations, but that - # should not be propagated from targets into their configurations. - 'variables', -] -non_configuration_keys = [] - -# Controls how the generator want the build file paths. -absolute_build_file_paths = False - -# Controls whether or not the generator supports multiple toolsets. -multiple_toolsets = False - - -def GetIncludedBuildFiles(build_file_path, aux_data, included=None): - """Return a list of all build files included into build_file_path. - - The returned list will contain build_file_path as well as all other files - that it included, either directly or indirectly. Note that the list may - contain files that were included into a conditional section that evaluated - to false and was not merged into build_file_path's dict. - - aux_data is a dict containing a key for each build file or included build - file. Those keys provide access to dicts whose "included" keys contain - lists of all other files included by the build file. - - included should be left at its default None value by external callers. It - is used for recursion. - - The returned list will not contain any duplicate entries. Each build file - in the list will be relative to the current directory. - """ - - if included == None: - included = [] - - if build_file_path in included: - return included - - included.append(build_file_path) - - for included_build_file in aux_data[build_file_path].get('included', []): - GetIncludedBuildFiles(included_build_file, aux_data, included) - - return included - - -def CheckedEval(file_contents): - """Return the eval of a gyp file. - - The gyp file is restricted to dictionaries and lists only, and - repeated keys are not allowed. - - Note that this is slower than eval() is. - """ - - ast = compiler.parse(file_contents) - assert isinstance(ast, Module) - c1 = ast.getChildren() - assert c1[0] is None - assert isinstance(c1[1], Stmt) - c2 = c1[1].getChildren() - assert isinstance(c2[0], Discard) - c3 = c2[0].getChildren() - assert len(c3) == 1 - return CheckNode(c3[0],0) - - -def CheckNode(node, level): - if isinstance(node, Dict): - c = node.getChildren() - dict = {} - for n in range(0, len(c), 2): - assert isinstance(c[n], Const) - key = c[n].getChildren()[0] - if key in dict: - raise KeyError, "Key '" + key + "' repeated at level " + \ - repr(level) - dict[key] = CheckNode(c[n + 1], level + 1) - return dict - elif isinstance(node, List): - c = node.getChildren() - list = [] - for child in c: - list.append(CheckNode(child, level + 1)) - return list - elif isinstance(node, Const): - return node.getChildren()[0] - else: - raise TypeError, "Unknown AST node " + repr(node) - - -def LoadOneBuildFile(build_file_path, data, aux_data, variables, includes, - is_target, check): - if build_file_path in data: - return data[build_file_path] - - if os.path.exists(build_file_path): - build_file_contents = open(build_file_path).read() - else: - raise Exception("%s not found (cwd: %s)" % (build_file_path, os.getcwd())) - - build_file_data = None - try: - if check: - build_file_data = CheckedEval(build_file_contents) - else: - build_file_data = eval(build_file_contents, {'__builtins__': None}, - None) - except SyntaxError, e: - e.filename = build_file_path - raise - except Exception, e: - gyp.common.ExceptionAppend(e, 'while reading ' + build_file_path) - raise - - data[build_file_path] = build_file_data - aux_data[build_file_path] = {} - - # Scan for includes and merge them in. - try: - if is_target: - LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data, - aux_data, variables, includes, check) - else: - LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data, - aux_data, variables, None, check) - except Exception, e: - gyp.common.ExceptionAppend(e, - 'while reading includes of ' + build_file_path) - raise - - return build_file_data - - -def LoadBuildFileIncludesIntoDict(subdict, subdict_path, data, aux_data, - variables, includes, check): - includes_list = [] - if includes != None: - includes_list.extend(includes) - if 'includes' in subdict: - for include in subdict['includes']: - # "include" is specified relative to subdict_path, so compute the real - # path to include by appending the provided "include" to the directory - # in which subdict_path resides. - relative_include = \ - os.path.normpath(os.path.join(os.path.dirname(subdict_path), include)) - includes_list.append(relative_include) - # Unhook the includes list, it's no longer needed. - del subdict['includes'] - - # Merge in the included files. - for include in includes_list: - if not 'included' in aux_data[subdict_path]: - aux_data[subdict_path]['included'] = [] - aux_data[subdict_path]['included'].append(include) - - gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Included File: '%s'" % include) - - MergeDicts(subdict, - LoadOneBuildFile(include, data, aux_data, variables, None, - False, check), - subdict_path, include) - - # Recurse into subdictionaries. - for k, v in subdict.iteritems(): - if v.__class__ == dict: - LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, variables, - None, check) - elif v.__class__ == list: - LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data, variables, - check) - - -# This recurses into lists so that it can look for dicts. -def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data, - variables, check): - for item in sublist: - if item.__class__ == dict: - LoadBuildFileIncludesIntoDict(item, sublist_path, data, aux_data, - variables, None, check) - elif item.__class__ == list: - LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data, - variables, check) - -# Processes toolsets in all the targets. This recurses into condition entries -# since they can contain toolsets as well. -def ProcessToolsetsInDict(data): - if 'targets' in data: - target_list = data['targets'] - new_target_list = [] - for target in target_list: - global multiple_toolsets - if multiple_toolsets: - toolsets = target.get('toolsets', ['target']) - else: - toolsets = ['target'] - if len(toolsets) > 0: - # Optimization: only do copies if more than one toolset is specified. - for build in toolsets[1:]: - new_target = copy.deepcopy(target) - new_target['toolset'] = build - new_target_list.append(new_target) - target['toolset'] = toolsets[0] - new_target_list.append(target) - data['targets'] = new_target_list - if 'conditions' in data: - for condition in data['conditions']: - if isinstance(condition, list): - for condition_dict in condition[1:]: - ProcessToolsetsInDict(condition_dict) - - -# TODO(mark): I don't love this name. It just means that it's going to load -# a build file that contains targets and is expected to provide a targets dict -# that contains the targets... -def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, - depth, check): - global absolute_build_file_paths - - # If depth is set, predefine the DEPTH variable to be a relative path from - # this build file's directory to the directory identified by depth. - if depth: - d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) - if d == '': - variables['DEPTH'] = '.' - else: - variables['DEPTH'] = d - - # If the generator needs absolue paths, then do so. - if absolute_build_file_paths: - build_file_path = os.path.abspath(build_file_path) - - if build_file_path in data['target_build_files']: - # Already loaded. - return - data['target_build_files'].add(build_file_path) - - gyp.DebugOutput(gyp.DEBUG_INCLUDES, - "Loading Target Build File '%s'" % build_file_path) - - build_file_data = LoadOneBuildFile(build_file_path, data, aux_data, variables, - includes, True, check) - - # Store DEPTH for later use in generators. - build_file_data['_DEPTH'] = depth - - # Set up the included_files key indicating which .gyp files contributed to - # this target dict. - if 'included_files' in build_file_data: - raise KeyError, build_file_path + ' must not contain included_files key' - - included = GetIncludedBuildFiles(build_file_path, aux_data) - build_file_data['included_files'] = [] - for included_file in included: - # included_file is relative to the current directory, but it needs to - # be made relative to build_file_path's directory. - included_relative = \ - gyp.common.RelativePath(included_file, - os.path.dirname(build_file_path)) - build_file_data['included_files'].append(included_relative) - - ProcessToolsetsInDict(build_file_data) - - # Apply "pre"/"early" variable expansions and condition evaluations. - ProcessVariablesAndConditionsInDict(build_file_data, False, variables, - build_file_path) - - # Look at each project's target_defaults dict, and merge settings into - # targets. - if 'target_defaults' in build_file_data: - index = 0 - if 'targets' in build_file_data: - while index < len(build_file_data['targets']): - # This procedure needs to give the impression that target_defaults is - # used as defaults, and the individual targets inherit from that. - # The individual targets need to be merged into the defaults. Make - # a deep copy of the defaults for each target, merge the target dict - # as found in the input file into that copy, and then hook up the - # copy with the target-specific data merged into it as the replacement - # target dict. - old_target_dict = build_file_data['targets'][index] - new_target_dict = copy.deepcopy(build_file_data['target_defaults']) - MergeDicts(new_target_dict, old_target_dict, - build_file_path, build_file_path) - build_file_data['targets'][index] = new_target_dict - index = index + 1 - else: - raise Exception, \ - "Unable to find targets in build file %s" % build_file_path - - # No longer needed. - del build_file_data['target_defaults'] - - # Look for dependencies. This means that dependency resolution occurs - # after "pre" conditionals and variable expansion, but before "post" - - # in other words, you can't put a "dependencies" section inside a "post" - # conditional within a target. - - if 'targets' in build_file_data: - for target_dict in build_file_data['targets']: - if 'dependencies' not in target_dict: - continue - for dependency in target_dict['dependencies']: - other_build_file = \ - gyp.common.ResolveTarget(build_file_path, dependency, None)[0] - try: - LoadTargetBuildFile(other_build_file, data, aux_data, variables, - includes, depth, check) - except Exception, e: - gyp.common.ExceptionAppend( - e, 'while loading dependencies of %s' % build_file_path) - raise - - return data - - -# Look for the bracket that matches the first bracket seen in a -# string, and return the start and end as a tuple. For example, if -# the input is something like "<(foo <(bar)) blah", then it would -# return (1, 13), indicating the entire string except for the leading -# "<" and trailing " blah". -def FindEnclosingBracketGroup(input): - brackets = { '}': '{', - ']': '[', - ')': '(', } - stack = [] - count = 0 - start = -1 - for char in input: - if char in brackets.values(): - stack.append(char) - if start == -1: - start = count - if char in brackets.keys(): - try: - last_bracket = stack.pop() - except IndexError: - return (-1, -1) - if last_bracket != brackets[char]: - return (-1, -1) - if len(stack) == 0: - return (start, count + 1) - count = count + 1 - return (-1, -1) - - -canonical_int_re = re.compile('^(0|-?[1-9][0-9]*)$') - - -def IsStrCanonicalInt(string): - """Returns True if |string| is in its canonical integer form. - - The canonical form is such that str(int(string)) == string. - """ - if not isinstance(string, str) or not canonical_int_re.match(string): - return False - - return True - - -early_variable_re = re.compile('(?P(?P\s*\[?)' - '(?P.*?)(\]?)\))') -late_variable_re = re.compile('(?P(?P>!?@?)' - '\((?P\s*\[?)' - '(?P.*?)(\]?)\))') - -# Global cache of results from running commands so they don't have to be run -# more then once. -cached_command_results = {} - -def ExpandVariables(input, is_late, variables, build_file): - # Look for the pattern that gets expanded into variables - if not is_late: - variable_re = early_variable_re - else: - variable_re = late_variable_re - - input_str = str(input) - - # Get the entire list of matches as a list of MatchObject instances. - # (using findall here would return strings, and we want - # MatchObjects). - matches = [match for match in variable_re.finditer(input_str)] - - output = input_str - if matches: - # Reverse the list of matches so that replacements are done right-to-left. - # That ensures that earlier replacements won't mess up the string in a - # way that causes later calls to find the earlier substituted text instead - # of what's intended for replacement. - matches.reverse() - for match_group in matches: - match = match_group.groupdict() - gyp.DebugOutput(gyp.DEBUG_VARIABLES, - "Matches: %s" % repr(match)) - # match['replace'] is the substring to look for, match['type'] - # is the character code for the replacement type (< > ! <@ - # >@ !@), match['is_array'] contains a '[' for command - # arrays, and match['content'] is the name of the variable (< >) - # or command to run (!). - - # run_command is true if a ! variant is used. - run_command = '!' in match['type'] - - # Capture these now so we can adjust them later. - replace_start = match_group.start('replace') - replace_end = match_group.end('replace') - - # Find the ending paren, and re-evaluate the contained string. - (c_start, c_end) = FindEnclosingBracketGroup(input_str[replace_start:]) - - # Adjust the replacement range to match the entire command - # found by FindEnclosingBracketGroup (since the variable_re - # probably doesn't match the entire command if it contained - # nested variables). - replace_end = replace_start + c_end - - # Find the "real" replacement, matching the appropriate closing - # paren, and adjust the replacement start and end. - replacement = input_str[replace_start:replace_end] - - # Figure out what the contents of the variable parens are. - contents_start = replace_start + c_start + 1 - contents_end = replace_end - 1 - contents = input_str[contents_start:contents_end] - - # Recurse to expand variables in the contents - contents = ExpandVariables(contents, is_late, variables, build_file) - - # Strip off leading/trailing whitespace so that variable matches are - # simpler below (and because they are rarely needed). - contents = contents.strip() - - # expand_to_list is true if an @ variant is used. In that case, - # the expansion should result in a list. Note that the caller - # is to be expecting a list in return, and not all callers do - # because not all are working in list context. Also, for list - # expansions, there can be no other text besides the variable - # expansion in the input string. - expand_to_list = '@' in match['type'] and input_str == replacement - - if run_command: - # Run the command in the build file's directory. - build_file_dir = os.path.dirname(build_file) - if build_file_dir == '': - # If build_file is just a leaf filename indicating a file in the - # current directory, build_file_dir might be an empty string. Set - # it to None to signal to subprocess.Popen that it should run the - # command in the current directory. - build_file_dir = None - - use_shell = True - if match['is_array']: - contents = eval(contents) - use_shell = False - - # Check for a cached value to avoid executing commands more than once. - # TODO(http://code.google.com/p/gyp/issues/detail?id=112): It is - # possible that the command being invoked depends on the current - # directory. For that case the syntax needs to be extended so that the - # directory is also used in cache_key (it becomes a tuple). - # TODO(http://code.google.com/p/gyp/issues/detail?id=111): In theory, - # someone could author a set of GYP files where each time the command - # is invoked it produces different output by design. When the need - # arises, the syntax should be extended to support no caching off a - # command's output so it is run every time. - cache_key = str(contents) - cached_value = cached_command_results.get(cache_key, None) - if cached_value is None: - gyp.DebugOutput(gyp.DEBUG_VARIABLES, - "Executing command '%s' in directory '%s'" % - (contents,build_file_dir)) - - p = subprocess.Popen(contents, shell=use_shell, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - stdin=subprocess.PIPE, - cwd=build_file_dir) - - (p_stdout, p_stderr) = p.communicate('') - - if p.wait() != 0 or p_stderr: - sys.stderr.write(p_stderr) - # Simulate check_call behavior, since check_call only exists - # in python 2.5 and later. - raise Exception("Call to '%s' returned exit status %d." % - (contents, p.returncode)) - - replacement = p_stdout.rstrip() - cached_command_results[cache_key] = replacement - else: - gyp.DebugOutput(gyp.DEBUG_VARIABLES, - "Had cache value for command '%s' in directory '%s'" % - (contents,build_file_dir)) - replacement = cached_value - - else: - if not contents in variables: - raise KeyError, 'Undefined variable ' + contents + \ - ' in ' + build_file - replacement = variables[contents] - - if isinstance(replacement, list): - for item in replacement: - if not isinstance(item, str) and not isinstance(item, int): - raise TypeError, 'Variable ' + contents + \ - ' must expand to a string or list of strings; ' + \ - 'list contains a ' + \ - item.__class__.__name__ - # Run through the list and handle variable expansions in it. Since - # the list is guaranteed not to contain dicts, this won't do anything - # with conditions sections. - ProcessVariablesAndConditionsInList(replacement, is_late, variables, - build_file) - elif not isinstance(replacement, str) and \ - not isinstance(replacement, int): - raise TypeError, 'Variable ' + contents + \ - ' must expand to a string or list of strings; ' + \ - 'found a ' + replacement.__class__.__name__ - - if expand_to_list: - # Expanding in list context. It's guaranteed that there's only one - # replacement to do in |input_str| and that it's this replacement. See - # above. - if isinstance(replacement, list): - # If it's already a list, make a copy. - output = replacement[:] - else: - # Split it the same way sh would split arguments. - output = shlex.split(str(replacement)) - else: - # Expanding in string context. - encoded_replacement = '' - if isinstance(replacement, list): - # When expanding a list into string context, turn the list items - # into a string in a way that will work with a subprocess call. - # - # TODO(mark): This isn't completely correct. This should - # call a generator-provided function that observes the - # proper list-to-argument quoting rules on a specific - # platform instead of just calling the POSIX encoding - # routine. - encoded_replacement = gyp.common.EncodePOSIXShellList(replacement) - else: - encoded_replacement = replacement - - output = output[:replace_start] + str(encoded_replacement) + \ - output[replace_end:] - # Prepare for the next match iteration. - input_str = output - - # Look for more matches now that we've replaced some, to deal with - # expanding local variables (variables defined in the same - # variables block as this one). - gyp.DebugOutput(gyp.DEBUG_VARIABLES, - "Found output %s, recursing." % repr(output)) - if isinstance(output, list): - new_output = [] - for item in output: - new_output.append(ExpandVariables(item, is_late, variables, build_file)) - output = new_output - else: - output = ExpandVariables(output, is_late, variables, build_file) - - # Convert all strings that are canonically-represented integers into integers. - if isinstance(output, list): - for index in xrange(0, len(output)): - if IsStrCanonicalInt(output[index]): - output[index] = int(output[index]) - elif IsStrCanonicalInt(output): - output = int(output) - - gyp.DebugOutput(gyp.DEBUG_VARIABLES, - "Expanding %s to %s" % (repr(input), repr(output))) - return output - - -def ProcessConditionsInDict(the_dict, is_late, variables, build_file): - # Process a 'conditions' or 'target_conditions' section in the_dict, - # depending on is_late. If is_late is False, 'conditions' is used. - # - # Each item in a conditions list consists of cond_expr, a string expression - # evaluated as the condition, and true_dict, a dict that will be merged into - # the_dict if cond_expr evaluates to true. Optionally, a third item, - # false_dict, may be present. false_dict is merged into the_dict if - # cond_expr evaluates to false. - # - # Any dict merged into the_dict will be recursively processed for nested - # conditionals and other expansions, also according to is_late, immediately - # prior to being merged. - - if not is_late: - conditions_key = 'conditions' - else: - conditions_key = 'target_conditions' - - if not conditions_key in the_dict: - return - - conditions_list = the_dict[conditions_key] - # Unhook the conditions list, it's no longer needed. - del the_dict[conditions_key] - - for condition in conditions_list: - if not isinstance(condition, list): - raise TypeError, conditions_key + ' must be a list' - if len(condition) != 2 and len(condition) != 3: - # It's possible that condition[0] won't work in which case this - # attempt will raise its own IndexError. That's probably fine. - raise IndexError, conditions_key + ' ' + condition[0] + \ - ' must be length 2 or 3, not ' + len(condition) - - [cond_expr, true_dict] = condition[0:2] - false_dict = None - if len(condition) == 3: - false_dict = condition[2] - - # Do expansions on the condition itself. Since the conditon can naturally - # contain variable references without needing to resort to GYP expansion - # syntax, this is of dubious value for variables, but someone might want to - # use a command expansion directly inside a condition. - cond_expr_expanded = ExpandVariables(cond_expr, is_late, variables, - build_file) - if not isinstance(cond_expr_expanded, str) and \ - not isinstance(cond_expr_expanded, int): - raise ValueError, \ - 'Variable expansion in this context permits str and int ' + \ - 'only, found ' + expanded.__class__.__name__ - - try: - ast_code = compile(cond_expr_expanded, '', 'eval') - - if eval(ast_code, {'__builtins__': None}, variables): - merge_dict = true_dict - else: - merge_dict = false_dict - except SyntaxError, e: - syntax_error = SyntaxError('%s while evaluating condition \'%s\' in %s ' - 'at character %d.' % - (str(e.args[0]), e.text, build_file, e.offset), - e.filename, e.lineno, e.offset, e.text) - raise syntax_error - except NameError, e: - gyp.common.ExceptionAppend(e, 'while evaluating condition \'%s\' in %s' % - (cond_expr_expanded, build_file)) - raise - - if merge_dict != None: - # Expand variables and nested conditinals in the merge_dict before - # merging it. - ProcessVariablesAndConditionsInDict(merge_dict, is_late, - variables, build_file) - - MergeDicts(the_dict, merge_dict, build_file, build_file) - - -def LoadAutomaticVariablesFromDict(variables, the_dict): - # Any keys with plain string values in the_dict become automatic variables. - # The variable name is the key name with a "_" character prepended. - for key, value in the_dict.iteritems(): - if isinstance(value, str) or isinstance(value, int) or \ - isinstance(value, list): - variables['_' + key] = value - - -def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key): - # Any keys in the_dict's "variables" dict, if it has one, becomes a - # variable. The variable name is the key name in the "variables" dict. - # Variables that end with the % character are set only if they are unset in - # the variables dict. the_dict_key is the name of the key that accesses - # the_dict in the_dict's parent dict. If the_dict's parent is not a dict - # (it could be a list or it could be parentless because it is a root dict), - # the_dict_key will be None. - for key, value in the_dict.get('variables', {}).iteritems(): - if not isinstance(value, str) and not isinstance(value, int) and \ - not isinstance(value, list): - continue - - if key.endswith('%'): - variable_name = key[:-1] - if variable_name in variables: - # If the variable is already set, don't set it. - continue - if the_dict_key is 'variables' and variable_name in the_dict: - # If the variable is set without a % in the_dict, and the_dict is a - # variables dict (making |variables| a varaibles sub-dict of a - # variables dict), use the_dict's definition. - value = the_dict[variable_name] - else: - variable_name = key - - variables[variable_name] = value - - -def ProcessVariablesAndConditionsInDict(the_dict, is_late, variables_in, - build_file, the_dict_key=None): - """Handle all variable and command expansion and conditional evaluation. - - This function is the public entry point for all variable expansions and - conditional evaluations. The variables_in dictionary will not be modified - by this function. - """ - - # Make a copy of the variables_in dict that can be modified during the - # loading of automatics and the loading of the variables dict. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - - if 'variables' in the_dict: - # Make sure all the local variables are added to the variables - # list before we process them so that you can reference one - # variable from another. They will be fully expanded by recursion - # in ExpandVariables. - for key, value in the_dict['variables'].iteritems(): - variables[key] = value - - # Handle the associated variables dict first, so that any variable - # references within can be resolved prior to using them as variables. - # Pass a copy of the variables dict to avoid having it be tainted. - # Otherwise, it would have extra automatics added for everything that - # should just be an ordinary variable in this scope. - ProcessVariablesAndConditionsInDict(the_dict['variables'], is_late, - variables, build_file, 'variables') - - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - for key, value in the_dict.iteritems(): - # Skip "variables", which was already processed if present. - if key != 'variables' and isinstance(value, str): - expanded = ExpandVariables(value, is_late, variables, build_file) - if not isinstance(expanded, str) and not isinstance(expanded, int): - raise ValueError, \ - 'Variable expansion in this context permits str and int ' + \ - 'only, found ' + expanded.__class__.__name__ + ' for ' + key - the_dict[key] = expanded - - # Variable expansion may have resulted in changes to automatics. Reload. - # TODO(mark): Optimization: only reload if no changes were made. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Process conditions in this dict. This is done after variable expansion - # so that conditions may take advantage of expanded variables. For example, - # if the_dict contains: - # {'type': '<(library_type)', - # 'conditions': [['_type=="static_library"', { ... }]]}, - # _type, as used in the condition, will only be set to the value of - # library_type if variable expansion is performed before condition - # processing. However, condition processing should occur prior to recursion - # so that variables (both automatic and "variables" dict type) may be - # adjusted by conditions sections, merged into the_dict, and have the - # intended impact on contained dicts. - # - # This arrangement means that a "conditions" section containing a "variables" - # section will only have those variables effective in subdicts, not in - # the_dict. The workaround is to put a "conditions" section within a - # "variables" section. For example: - # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]], - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will not result in "IS_MAC" being appended to the "defines" list in the - # current scope but would result in it being appended to the "defines" list - # within "my_subdict". By comparison: - # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]}, - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will append "IS_MAC" to both "defines" lists. - - # Evaluate conditions sections, allowing variable expansions within them - # as well as nested conditionals. This will process a 'conditions' or - # 'target_conditions' section, perform appropriate merging and recursive - # conditional and variable processing, and then remove the conditions section - # from the_dict if it is present. - ProcessConditionsInDict(the_dict, is_late, variables, build_file) - - # Conditional processing may have resulted in changes to automatics or the - # variables dict. Reload. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Recurse into child dicts, or process child lists which may result in - # further recursion into descendant dicts. - for key, value in the_dict.iteritems(): - # Skip "variables" and string values, which were already processed if - # present. - if key == 'variables' or isinstance(value, str): - continue - if isinstance(value, dict): - # Pass a copy of the variables dict so that subdicts can't influence - # parents. - ProcessVariablesAndConditionsInDict(value, is_late, variables, - build_file, key) - elif isinstance(value, list): - # The list itself can't influence the variables dict, and - # ProcessVariablesAndConditionsInList will make copies of the variables - # dict if it needs to pass it to something that can influence it. No - # copy is necessary here. - ProcessVariablesAndConditionsInList(value, is_late, variables, - build_file) - elif not isinstance(value, int): - raise TypeError, 'Unknown type ' + value.__class__.__name__ + \ - ' for ' + key - - -def ProcessVariablesAndConditionsInList(the_list, is_late, variables, - build_file): - # Iterate using an index so that new values can be assigned into the_list. - index = 0 - while index < len(the_list): - item = the_list[index] - if isinstance(item, dict): - # Make a copy of the variables dict so that it won't influence anything - # outside of its own scope. - ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file) - elif isinstance(item, list): - ProcessVariablesAndConditionsInList(item, is_late, variables, build_file) - elif isinstance(item, str): - expanded = ExpandVariables(item, is_late, variables, build_file) - if isinstance(expanded, str) or isinstance(expanded, int): - the_list[index] = expanded - elif isinstance(expanded, list): - del the_list[index] - for expanded_item in expanded: - the_list.insert(index, expanded_item) - index = index + 1 - - # index now identifies the next item to examine. Continue right now - # without falling into the index increment below. - continue - else: - raise ValueError, \ - 'Variable expansion in this context permits strings and ' + \ - 'lists only, found ' + expanded.__class__.__name__ + ' at ' + \ - index - elif not isinstance(item, int): - raise TypeError, 'Unknown type ' + item.__class__.__name__ + \ - ' at index ' + index - index = index + 1 - - -def BuildTargetsDict(data): - """Builds a dict mapping fully-qualified target names to their target dicts. - - |data| is a dict mapping loaded build files by pathname relative to the - current directory. Values in |data| are build file contents. For each - |data| value with a "targets" key, the value of the "targets" key is taken - as a list containing target dicts. Each target's fully-qualified name is - constructed from the pathname of the build file (|data| key) and its - "target_name" property. These fully-qualified names are used as the keys - in the returned dict. These keys provide access to the target dicts, - the dicts in the "targets" lists. - """ - - targets = {} - for build_file in data['target_build_files']: - for target in data[build_file].get('targets', []): - target_name = gyp.common.QualifiedTarget(build_file, - target['target_name'], - target['toolset']) - if target_name in targets: - raise KeyError, 'Duplicate target definitions for ' + target_name - targets[target_name] = target - - return targets - - -def QualifyDependencies(targets): - """Make dependency links fully-qualified relative to the current directory. - - |targets| is a dict mapping fully-qualified target names to their target - dicts. For each target in this dict, keys known to contain dependency - links are examined, and any dependencies referenced will be rewritten - so that they are fully-qualified and relative to the current directory. - All rewritten dependencies are suitable for use as keys to |targets| or a - similar dict. - """ - - for target, target_dict in targets.iteritems(): - target_build_file = gyp.common.BuildFile(target) - toolset = target_dict['toolset'] - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - for index in xrange(0, len(dependencies)): - dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget( - target_build_file, dependencies[index], toolset) - global multiple_toolsets - if not multiple_toolsets: - # Ignore toolset specification in the dependency if it is specified. - dep_toolset = toolset - dependency = gyp.common.QualifiedTarget(dep_file, - dep_target, - dep_toolset) - dependencies[index] = dependency - - # Make sure anything appearing in a list other than "dependencies" also - # appears in the "dependencies" list. - if dependency_key != 'dependencies' and \ - dependency not in target_dict['dependencies']: - raise KeyError, 'Found ' + dependency + ' in ' + dependency_key + \ - ' of ' + target + ', but not in dependencies' - - -def ExpandWildcardDependencies(targets, data): - """Expands dependencies specified as build_file:*. - - For each target in |targets|, examines sections containing links to other - targets. If any such section contains a link of the form build_file:*, it - is taken as a wildcard link, and is expanded to list each target in - build_file. The |data| dict provides access to build file dicts. - - Any target that does not wish to be included by wildcard can provide an - optional "suppress_wildcard" key in its target dict. When present and - true, a wildcard dependency link will not include such targets. - - All dependency names, including the keys to |targets| and the values in each - dependency list, must be qualified when this function is called. - """ - - for target, target_dict in targets.iteritems(): - toolset = target_dict['toolset'] - target_build_file = gyp.common.BuildFile(target) - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - - # Loop this way instead of "for dependency in" or "for index in xrange" - # because the dependencies list will be modified within the loop body. - index = 0 - while index < len(dependencies): - (dependency_build_file, dependency_target, dependency_toolset) = \ - gyp.common.ParseQualifiedTarget(dependencies[index]) - if dependency_target != '*' and dependency_toolset != '*': - # Not a wildcard. Keep it moving. - index = index + 1 - continue - - if dependency_build_file == target_build_file: - # It's an error for a target to depend on all other targets in - # the same file, because a target cannot depend on itself. - raise KeyError, 'Found wildcard in ' + dependency_key + ' of ' + \ - target + ' referring to same build file' - - # Take the wildcard out and adjust the index so that the next - # dependency in the list will be processed the next time through the - # loop. - del dependencies[index] - index = index - 1 - - # Loop through the targets in the other build file, adding them to - # this target's list of dependencies in place of the removed - # wildcard. - dependency_target_dicts = data[dependency_build_file]['targets'] - for dependency_target_dict in dependency_target_dicts: - if int(dependency_target_dict.get('suppress_wildcard', False)): - continue - dependency_target_name = dependency_target_dict['target_name'] - if (dependency_target != '*' and - dependency_target != dependency_target_name): - continue - dependency_target_toolset = dependency_target_dict['toolset'] - if (dependency_toolset != '*' and - dependency_toolset != dependency_target_toolset): - continue - dependency = gyp.common.QualifiedTarget(dependency_build_file, - dependency_target_name, - dependency_target_toolset) - index = index + 1 - dependencies.insert(index, dependency) - - index = index + 1 - - -class DependencyGraphNode(object): - """ - - Attributes: - ref: A reference to an object that this DependencyGraphNode represents. - dependencies: List of DependencyGraphNodes on which this one depends. - dependents: List of DependencyGraphNodes that depend on this one. - """ - - class CircularException(Exception): - pass - - def __init__(self, ref): - self.ref = ref - self.dependencies = [] - self.dependents = [] - - def FlattenToList(self): - # flat_list is the sorted list of dependencies - actually, the list items - # are the "ref" attributes of DependencyGraphNodes. Every target will - # appear in flat_list after all of its dependencies, and before all of its - # dependents. - flat_list = [] - - # in_degree_zeros is the list of DependencyGraphNodes that have no - # dependencies not in flat_list. Initially, it is a copy of the children - # of this node, because when the graph was built, nodes with no - # dependencies were made implicit dependents of the root node. - in_degree_zeros = self.dependents[:] - - while in_degree_zeros: - # Nodes in in_degree_zeros have no dependencies not in flat_list, so they - # can be appended to flat_list. Take these nodes out of in_degree_zeros - # as work progresses, so that the next node to process from the list can - # always be accessed at a consistent position. - node = in_degree_zeros.pop(0) - flat_list.append(node.ref) - - # Look at dependents of the node just added to flat_list. Some of them - # may now belong in in_degree_zeros. - for node_dependent in node.dependents: - is_in_degree_zero = True - for node_dependent_dependency in node_dependent.dependencies: - if not node_dependent_dependency.ref in flat_list: - # The dependent one or more dependencies not in flat_list. There - # will be more chances to add it to flat_list when examining - # it again as a dependent of those other dependencies, provided - # that there are no cycles. - is_in_degree_zero = False - break - - if is_in_degree_zero: - # All of the dependent's dependencies are already in flat_list. Add - # it to in_degree_zeros where it will be processed in a future - # iteration of the outer loop. - in_degree_zeros.append(node_dependent) - - return flat_list - - def DirectDependencies(self, dependencies=None): - """Returns a list of just direct dependencies.""" - if dependencies == None: - dependencies = [] - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref != None and dependency.ref not in dependencies: - dependencies.append(dependency.ref) - - return dependencies - - def _AddImportedDependencies(self, targets, dependencies=None): - """Given a list of direct dependencies, adds indirect dependencies that - other dependencies have declared to export their settings. - - This method does not operate on self. Rather, it operates on the list - of dependencies in the |dependencies| argument. For each dependency in - that list, if any declares that it exports the settings of one of its - own dependencies, those dependencies whose settings are "passed through" - are added to the list. As new items are added to the list, they too will - be processed, so it is possible to import settings through multiple levels - of dependencies. - - This method is not terribly useful on its own, it depends on being - "primed" with a list of direct dependencies such as one provided by - DirectDependencies. DirectAndImportedDependencies is intended to be the - public entry point. - """ - - if dependencies == None: - dependencies = [] - - index = 0 - while index < len(dependencies): - dependency = dependencies[index] - dependency_dict = targets[dependency] - # Add any dependencies whose settings should be imported to the list - # if not already present. Newly-added items will be checked for - # their own imports when the list iteration reaches them. - # Rather than simply appending new items, insert them after the - # dependency that exported them. This is done to more closely match - # the depth-first method used by DeepDependencies. - add_index = 1 - for imported_dependency in \ - dependency_dict.get('export_dependent_settings', []): - if imported_dependency not in dependencies: - dependencies.insert(index + add_index, imported_dependency) - add_index = add_index + 1 - index = index + 1 - - return dependencies - - def DirectAndImportedDependencies(self, targets, dependencies=None): - """Returns a list of a target's direct dependencies and all indirect - dependencies that a dependency has advertised settings should be exported - through the dependency for. - """ - - dependencies = self.DirectDependencies(dependencies) - return self._AddImportedDependencies(targets, dependencies) - - def DeepDependencies(self, dependencies=None): - """Returns a list of all of a target's dependencies, recursively.""" - if dependencies == None: - dependencies = [] - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref != None and dependency.ref not in dependencies: - dependencies.append(dependency.ref) - dependency.DeepDependencies(dependencies) - - return dependencies - - def LinkDependencies(self, targets, dependencies=None, initial=True): - """Returns a list of dependency targets that are linked into this target. - - This function has a split personality, depending on the setting of - |initial|. Outside callers should always leave |initial| at its default - setting. - - When adding a target to the list of dependencies, this function will - recurse into itself with |initial| set to False, to collect depenedencies - that are linked into the linkable target for which the list is being built. - """ - if dependencies == None: - dependencies = [] - - # Check for None, corresponding to the root node. - if self.ref == None: - return dependencies - - # It's kind of sucky that |targets| has to be passed into this function, - # but that's presently the easiest way to access the target dicts so that - # this function can find target types. - - if not 'target_name' in targets[self.ref]: - raise Exception("Missing 'target_name' field in target.") - - try: - target_type = targets[self.ref]['type'] - except KeyError, e: - raise Exception("Missing 'type' field in target %s" % - targets[self.ref]['target_name']) - - is_linkable = target_type in linkable_types - - if initial and not is_linkable: - # If this is the first target being examined and it's not linkable, - # return an empty list of link dependencies, because the link - # dependencies are intended to apply to the target itself (initial is - # True) and this target won't be linked. - return dependencies - - # Executables and loadable modules are already fully and finally linked. - # Nothing else can be a link dependency of them, there can only be - # dependencies in the sense that a dependent target might run an - # executable or load the loadable_module. - if not initial and target_type in ('executable', 'loadable_module'): - return dependencies - - # The target is linkable, add it to the list of link dependencies. - if self.ref not in dependencies: - if target_type != 'none': - # Special case: "none" type targets don't produce any linkable products - # and shouldn't be exposed as link dependencies, although dependencies - # of "none" type targets may still be link dependencies. - dependencies.append(self.ref) - if initial or not is_linkable: - # If this is a subsequent target and it's linkable, don't look any - # further for linkable dependencies, as they'll already be linked into - # this target linkable. Always look at dependencies of the initial - # target, and always look at dependencies of non-linkables. - for dependency in self.dependencies: - dependency.LinkDependencies(targets, dependencies, False) - - return dependencies - - -def BuildDependencyList(targets): - # Create a DependencyGraphNode for each target. Put it into a dict for easy - # access. - dependency_nodes = {} - for target, spec in targets.iteritems(): - if not target in dependency_nodes: - dependency_nodes[target] = DependencyGraphNode(target) - - # Set up the dependency links. Targets that have no dependencies are treated - # as dependent on root_node. - root_node = DependencyGraphNode(None) - for target, spec in targets.iteritems(): - target_node = dependency_nodes[target] - target_build_file = gyp.common.BuildFile(target) - if not 'dependencies' in spec or len(spec['dependencies']) == 0: - target_node.dependencies = [root_node] - root_node.dependents.append(target_node) - else: - dependencies = spec['dependencies'] - for index in xrange(0, len(dependencies)): - try: - dependency = dependencies[index] - dependency_node = dependency_nodes[dependency] - target_node.dependencies.append(dependency_node) - dependency_node.dependents.append(target_node) - except KeyError, e: - gyp.common.ExceptionAppend(e, - 'while trying to load target %s' % target) - raise - - flat_list = root_node.FlattenToList() - - # If there's anything left unvisited, there must be a circular dependency - # (cycle). If you need to figure out what's wrong, look for elements of - # targets that are not in flat_list. - if len(flat_list) != len(targets): - raise DependencyGraphNode.CircularException, \ - 'Some targets not reachable, cycle in dependency graph detected' - - return [dependency_nodes, flat_list] - - -def DoDependentSettings(key, flat_list, targets, dependency_nodes): - # key should be one of all_dependent_settings, direct_dependent_settings, - # or link_settings. - - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - - if key == 'all_dependent_settings': - dependencies = dependency_nodes[target].DeepDependencies() - elif key == 'direct_dependent_settings': - dependencies = \ - dependency_nodes[target].DirectAndImportedDependencies(targets) - elif key == 'link_settings': - dependencies = dependency_nodes[target].LinkDependencies(targets) - else: - raise KeyError, "DoDependentSettings doesn't know how to determine " + \ - 'dependencies for ' + key - - for dependency in dependencies: - dependency_dict = targets[dependency] - if not key in dependency_dict: - continue - dependency_build_file = gyp.common.BuildFile(dependency) - MergeDicts(target_dict, dependency_dict[key], - build_file, dependency_build_file) - - -def AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes): - # Recompute target "dependencies" properties. For each static library - # target, remove "dependencies" entries referring to other static libraries, - # unless the dependency has the "hard_dependency" attribute set. For each - # linkable target, add a "dependencies" entry referring to all of the - # target's computed list of link dependencies (including static libraries - # if no such entry is already present. - for target in flat_list: - target_dict = targets[target] - target_type = target_dict['type'] - - if target_type == 'static_library': - if not 'dependencies' in target_dict: - continue - - target_dict['dependencies_original'] = target_dict.get( - 'dependencies', [])[:] - - index = 0 - while index < len(target_dict['dependencies']): - dependency = target_dict['dependencies'][index] - dependency_dict = targets[dependency] - if dependency_dict['type'] == 'static_library' and \ - (not 'hard_dependency' in dependency_dict or \ - not dependency_dict['hard_dependency']): - # A static library should not depend on another static library unless - # the dependency relationship is "hard," which should only be done - # when a dependent relies on some side effect other than just the - # build product, like a rule or action output. Take the dependency - # out of the list, and don't increment index because the next - # dependency to analyze will shift into the index formerly occupied - # by the one being removed. - del target_dict['dependencies'][index] - else: - index = index + 1 - - # If the dependencies list is empty, it's not needed, so unhook it. - if len(target_dict['dependencies']) == 0: - del target_dict['dependencies'] - - elif target_type in linkable_types: - # Get a list of dependency targets that should be linked into this - # target. Add them to the dependencies list if they're not already - # present. - - link_dependencies = dependency_nodes[target].LinkDependencies(targets) - for dependency in link_dependencies: - if dependency == target: - continue - if not 'dependencies' in target_dict: - target_dict['dependencies'] = [] - if not dependency in target_dict['dependencies']: - target_dict['dependencies'].append(dependency) - -# Initialize this here to speed up MakePathRelative. -exception_re = re.compile(r'''["']?[-/$<>]''') - - -def MakePathRelative(to_file, fro_file, item): - # If item is a relative path, it's relative to the build file dict that it's - # coming from. Fix it up to make it relative to the build file dict that - # it's going into. - # Exception: any |item| that begins with these special characters is - # returned without modification. - # / Used when a path is already absolute (shortcut optimization; - # such paths would be returned as absolute anyway) - # $ Used for build environment variables - # - Used for some build environment flags (such as -lapr-1 in a - # "libraries" section) - # < Used for our own variable and command expansions (see ExpandVariables) - # > Used for our own variable and command expansions (see ExpandVariables) - # - # "/' Used when a value is quoted. If these are present, then we - # check the second character instead. - # - if to_file == fro_file or exception_re.match(item): - return item - else: - # TODO(dglazkov) The backslash/forward-slash replacement at the end is a - # temporary measure. This should really be addressed by keeping all paths - # in POSIX until actual project generation. - return os.path.normpath(os.path.join( - gyp.common.RelativePath(os.path.dirname(fro_file), - os.path.dirname(to_file)), - item)).replace('\\', '/') - - -def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True): - prepend_index = 0 - - for item in fro: - singleton = False - if isinstance(item, str) or isinstance(item, int): - # The cheap and easy case. - if is_paths: - to_item = MakePathRelative(to_file, fro_file, item) - else: - to_item = item - - if not isinstance(item, str) or not item.startswith('-'): - # Any string that doesn't begin with a "-" is a singleton - it can - # only appear once in a list, to be enforced by the list merge append - # or prepend. - singleton = True - elif isinstance(item, dict): - # Make a copy of the dictionary, continuing to look for paths to fix. - # The other intelligent aspects of merge processing won't apply because - # item is being merged into an empty dict. - to_item = {} - MergeDicts(to_item, item, to_file, fro_file) - elif isinstance(item, list): - # Recurse, making a copy of the list. If the list contains any - # descendant dicts, path fixing will occur. Note that here, custom - # values for is_paths and append are dropped; those are only to be - # applied to |to| and |fro|, not sublists of |fro|. append shouldn't - # matter anyway because the new |to_item| list is empty. - to_item = [] - MergeLists(to_item, item, to_file, fro_file) - else: - raise TypeError, \ - 'Attempt to merge list item of unsupported type ' + \ - item.__class__.__name__ - - if append: - # If appending a singleton that's already in the list, don't append. - # This ensures that the earliest occurrence of the item will stay put. - if not singleton or not to_item in to: - to.append(to_item) - else: - # If prepending a singleton that's already in the list, remove the - # existing instance and proceed with the prepend. This ensures that the - # item appears at the earliest possible position in the list. - while singleton and to_item in to: - to.remove(to_item) - - # Don't just insert everything at index 0. That would prepend the new - # items to the list in reverse order, which would be an unwelcome - # surprise. - to.insert(prepend_index, to_item) - prepend_index = prepend_index + 1 - - -def MergeDicts(to, fro, to_file, fro_file): - # I wanted to name the parameter "from" but it's a Python keyword... - for k, v in fro.iteritems(): - # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give - # copy semantics. Something else may want to merge from the |fro| dict - # later, and having the same dict ref pointed to twice in the tree isn't - # what anyone wants considering that the dicts may subsequently be - # modified. - if k in to: - bad_merge = False - if isinstance(v, str) or isinstance(v, int): - if not (isinstance(to[k], str) or isinstance(to[k], int)): - bad_merge = True - elif v.__class__ != to[k].__class__: - bad_merge = True - - if bad_merge: - raise TypeError, \ - 'Attempt to merge dict value of type ' + v.__class__.__name__ + \ - ' into incompatible type ' + to[k].__class__.__name__ + \ - ' for key ' + k - if isinstance(v, str) or isinstance(v, int): - # Overwrite the existing value, if any. Cheap and easy. - is_path = IsPathSection(k) - if is_path: - to[k] = MakePathRelative(to_file, fro_file, v) - else: - to[k] = v - elif isinstance(v, dict): - # Recurse, guaranteeing copies will be made of objects that require it. - if not k in to: - to[k] = {} - MergeDicts(to[k], v, to_file, fro_file) - elif isinstance(v, list): - # Lists in dicts can be merged with different policies, depending on - # how the key in the "from" dict (k, the from-key) is written. - # - # If the from-key has ...the to-list will have this action - # this character appended:... applied when receiving the from-list: - # = replace - # + prepend - # ? set, only if to-list does not yet exist - # (none) append - # - # This logic is list-specific, but since it relies on the associated - # dict key, it's checked in this dict-oriented function. - ext = k[-1] - append = True - if ext == '=': - list_base = k[:-1] - lists_incompatible = [list_base, list_base + '?'] - to[list_base] = [] - elif ext == '+': - list_base = k[:-1] - lists_incompatible = [list_base + '=', list_base + '?'] - append = False - elif ext == '?': - list_base = k[:-1] - lists_incompatible = [list_base, list_base + '=', list_base + '+'] - else: - list_base = k - lists_incompatible = [list_base + '=', list_base + '?'] - - # Some combinations of merge policies appearing together are meaningless. - # It's stupid to replace and append simultaneously, for example. Append - # and prepend are the only policies that can coexist. - for list_incompatible in lists_incompatible: - if list_incompatible in fro: - raise KeyError, 'Incompatible list policies ' + k + ' and ' + \ - list_incompatible - - if list_base in to: - if ext == '?': - # If the key ends in "?", the list will only be merged if it doesn't - # already exist. - continue - if not isinstance(to[list_base], list): - # This may not have been checked above if merging in a list with an - # extension character. - raise TypeError, \ - 'Attempt to merge dict value of type ' + v.__class__.__name__ + \ - ' into incompatible type ' + to[list_base].__class__.__name__ + \ - ' for key ' + list_base + '(' + k + ')' - else: - to[list_base] = [] - - # Call MergeLists, which will make copies of objects that require it. - # MergeLists can recurse back into MergeDicts, although this will be - # to make copies of dicts (with paths fixed), there will be no - # subsequent dict "merging" once entering a list because lists are - # always replaced, appended to, or prepended to. - is_paths = IsPathSection(list_base) - MergeLists(to[list_base], v, to_file, fro_file, is_paths, append) - else: - raise TypeError, \ - 'Attempt to merge dict value of unsupported type ' + \ - v.__class__.__name__ + ' for key ' + k - - -def MergeConfigWithInheritance(new_configuration_dict, build_file, - target_dict, configuration, visited): - # Skip if previously visted. - if configuration in visited: - return - - # Look at this configuration. - configuration_dict = target_dict['configurations'][configuration] - - # Merge in parents. - for parent in configuration_dict.get('inherit_from', []): - MergeConfigWithInheritance(new_configuration_dict, build_file, - target_dict, parent, visited + [configuration]) - - # Merge it into the new config. - MergeDicts(new_configuration_dict, configuration_dict, - build_file, build_file) - - # Drop abstract. - if 'abstract' in new_configuration_dict: - del new_configuration_dict['abstract'] - - -def SetUpConfigurations(target, target_dict): - global non_configuration_keys - # key_suffixes is a list of key suffixes that might appear on key names. - # These suffixes are handled in conditional evaluations (for =, +, and ?) - # and rules/exclude processing (for ! and /). Keys with these suffixes - # should be treated the same as keys without. - key_suffixes = ['=', '+', '?', '!', '/'] - - build_file = gyp.common.BuildFile(target) - - # Provide a single configuration by default if none exists. - # TODO(mark): Signal an error if default_configurations exists but - # configurations does not. - if not 'configurations' in target_dict: - target_dict['configurations'] = {'Default': {}} - if not 'default_configuration' in target_dict: - concrete = [i for i in target_dict['configurations'].keys() - if not target_dict['configurations'][i].get('abstract')] - target_dict['default_configuration'] = sorted(concrete)[0] - - for configuration in target_dict['configurations'].keys(): - old_configuration_dict = target_dict['configurations'][configuration] - # Skip abstract configurations (saves work only). - if old_configuration_dict.get('abstract'): - continue - # Configurations inherit (most) settings from the enclosing target scope. - # Get the inheritance relationship right by making a copy of the target - # dict. - new_configuration_dict = copy.deepcopy(target_dict) - - # Take out the bits that don't belong in a "configurations" section. - # Since configuration setup is done before conditional, exclude, and rules - # processing, be careful with handling of the suffix characters used in - # those phases. - delete_keys = [] - for key in new_configuration_dict: - key_ext = key[-1:] - if key_ext in key_suffixes: - key_base = key[:-1] - else: - key_base = key - if key_base in non_configuration_keys: - delete_keys.append(key) - - for key in delete_keys: - del new_configuration_dict[key] - - # Merge in configuration (with all its parents first). - MergeConfigWithInheritance(new_configuration_dict, build_file, - target_dict, configuration, []) - - # Put the new result back into the target dict as a configuration. - target_dict['configurations'][configuration] = new_configuration_dict - - # Now drop all the abstract ones. - for configuration in target_dict['configurations'].keys(): - old_configuration_dict = target_dict['configurations'][configuration] - if old_configuration_dict.get('abstract'): - del target_dict['configurations'][configuration] - - # Now that all of the target's configurations have been built, go through - # the target dict's keys and remove everything that's been moved into a - # "configurations" section. - delete_keys = [] - for key in target_dict: - key_ext = key[-1:] - if key_ext in key_suffixes: - key_base = key[:-1] - else: - key_base = key - if not key_base in non_configuration_keys: - delete_keys.append(key) - for key in delete_keys: - del target_dict[key] - - -def ProcessListFiltersInDict(name, the_dict): - """Process regular expression and exclusion-based filters on lists. - - An exclusion list is in a dict key named with a trailing "!", like - "sources!". Every item in such a list is removed from the associated - main list, which in this example, would be "sources". Removed items are - placed into a "sources_excluded" list in the dict. - - Regular expression (regex) filters are contained in dict keys named with a - trailing "/", such as "sources/" to operate on the "sources" list. Regex - filters in a dict take the form: - 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'] ], - ['include', '_mac\\.cc$'] ], - The first filter says to exclude all files ending in _linux.cc, _mac.cc, and - _win.cc. The second filter then includes all files ending in _mac.cc that - are now or were once in the "sources" list. Items matching an "exclude" - filter are subject to the same processing as would occur if they were listed - by name in an exclusion list (ending in "!"). Items matching an "include" - filter are brought back into the main list if previously excluded by an - exclusion list or exclusion regex filter. Subsequent matching "exclude" - patterns can still cause items to be excluded after matching an "include". - """ - - # Look through the dictionary for any lists whose keys end in "!" or "/". - # These are lists that will be treated as exclude lists and regular - # expression-based exclude/include lists. Collect the lists that are - # needed first, looking for the lists that they operate on, and assemble - # then into |lists|. This is done in a separate loop up front, because - # the _included and _excluded keys need to be added to the_dict, and that - # can't be done while iterating through it. - - lists = [] - del_lists = [] - for key, value in the_dict.iteritems(): - operation = key[-1] - if operation != '!' and operation != '/': - continue - - if not isinstance(value, list): - raise ValueError, name + ' key ' + key + ' must be list, not ' + \ - value.__class__.__name__ - - list_key = key[:-1] - if list_key not in the_dict: - # This happens when there's a list like "sources!" but no corresponding - # "sources" list. Since there's nothing for it to operate on, queue up - # the "sources!" list for deletion now. - del_lists.append(key) - continue - - if not isinstance(the_dict[list_key], list): - raise ValueError, name + ' key ' + list_key + \ - ' must be list, not ' + \ - value.__class__.__name__ + ' when applying ' + \ - {'!': 'exclusion', '/': 'regex'}[operation] - - if not list_key in lists: - lists.append(list_key) - - # Delete the lists that are known to be unneeded at this point. - for del_list in del_lists: - del the_dict[del_list] - - for list_key in lists: - the_list = the_dict[list_key] - - # Initialize the list_actions list, which is parallel to the_list. Each - # item in list_actions identifies whether the corresponding item in - # the_list should be excluded, unconditionally preserved (included), or - # whether no exclusion or inclusion has been applied. Items for which - # no exclusion or inclusion has been applied (yet) have value -1, items - # excluded have value 0, and items included have value 1. Includes and - # excludes override previous actions. All items in list_actions are - # initialized to -1 because no excludes or includes have been processed - # yet. - list_actions = list((-1,) * len(the_list)) - - exclude_key = list_key + '!' - if exclude_key in the_dict: - for exclude_item in the_dict[exclude_key]: - for index in xrange(0, len(the_list)): - if exclude_item == the_list[index]: - # This item matches the exclude_item, so set its action to 0 - # (exclude). - list_actions[index] = 0 - - # The "whatever!" list is no longer needed, dump it. - del the_dict[exclude_key] - - regex_key = list_key + '/' - if regex_key in the_dict: - for regex_item in the_dict[regex_key]: - [action, pattern] = regex_item - pattern_re = re.compile(pattern) - - for index in xrange(0, len(the_list)): - list_item = the_list[index] - if pattern_re.search(list_item): - # Regular expression match. - - if action == 'exclude': - # This item matches an exclude regex, so set its value to 0 - # (exclude). - list_actions[index] = 0 - elif action == 'include': - # This item matches an include regex, so set its value to 1 - # (include). - list_actions[index] = 1 - else: - # This is an action that doesn't make any sense. - raise ValueError, 'Unrecognized action ' + action + ' in ' + \ - name + ' key ' + key - - # The "whatever/" list is no longer needed, dump it. - del the_dict[regex_key] - - # Add excluded items to the excluded list. - # - # Note that exclude_key ("sources!") is different from excluded_key - # ("sources_excluded"). The exclude_key list is input and it was already - # processed and deleted; the excluded_key list is output and it's about - # to be created. - excluded_key = list_key + '_excluded' - if excluded_key in the_dict: - raise KeyError, \ - name + ' key ' + excluded_key + ' must not be present prior ' + \ - ' to applying exclusion/regex filters for ' + list_key - - excluded_list = [] - - # Go backwards through the list_actions list so that as items are deleted, - # the indices of items that haven't been seen yet don't shift. That means - # that things need to be prepended to excluded_list to maintain them in the - # same order that they existed in the_list. - for index in xrange(len(list_actions) - 1, -1, -1): - if list_actions[index] == 0: - # Dump anything with action 0 (exclude). Keep anything with action 1 - # (include) or -1 (no include or exclude seen for the item). - excluded_list.insert(0, the_list[index]) - del the_list[index] - - # If anything was excluded, put the excluded list into the_dict at - # excluded_key. - if len(excluded_list) > 0: - the_dict[excluded_key] = excluded_list - - # Now recurse into subdicts and lists that may contain dicts. - for key, value in the_dict.iteritems(): - if isinstance(value, dict): - ProcessListFiltersInDict(key, value) - elif isinstance(value, list): - ProcessListFiltersInList(key, value) - - -def ProcessListFiltersInList(name, the_list): - for item in the_list: - if isinstance(item, dict): - ProcessListFiltersInDict(name, item) - elif isinstance(item, list): - ProcessListFiltersInList(name, item) - - -def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules): - """Ensures that the rules sections in target_dict are valid and consistent, - and determines which sources they apply to. - - Arguments: - target: string, name of target. - target_dict: dict, target spec containing "rules" and "sources" lists. - extra_sources_for_rules: a list of keys to scan for rule matches in - addition to 'sources'. - """ - - # Dicts to map between values found in rules' 'rule_name' and 'extension' - # keys and the rule dicts themselves. - rule_names = {} - rule_extensions = {} - - rules = target_dict.get('rules', []) - for rule in rules: - # Make sure that there's no conflict among rule names and extensions. - rule_name = rule['rule_name'] - if rule_name in rule_names: - raise KeyError, 'rule %s exists in duplicate, target %s' % \ - (rule_name, target) - rule_names[rule_name] = rule - - rule_extension = rule['extension'] - if rule_extension in rule_extensions: - raise KeyError, ('extension %s associated with multiple rules, ' + - 'target %s rules %s and %s') % \ - (rule_extension, target, - rule_extensions[rule_extension]['rule_name'], - rule_name) - rule_extensions[rule_extension] = rule - - # Make sure rule_sources isn't already there. It's going to be - # created below if needed. - if 'rule_sources' in rule: - raise KeyError, \ - 'rule_sources must not exist in input, target %s rule %s' % \ - (target, rule_name) - extension = rule['extension'] - - rule_sources = [] - source_keys = ['sources'] - source_keys.extend(extra_sources_for_rules) - for source_key in source_keys: - for source in target_dict.get(source_key, []): - (source_root, source_extension) = os.path.splitext(source) - if source_extension.startswith('.'): - source_extension = source_extension[1:] - if source_extension == extension: - rule_sources.append(source) - - if len(rule_sources) > 0: - rule['rule_sources'] = rule_sources - - -def ValidateActionsInTarget(target, target_dict, build_file): - '''Validates the inputs to the actions in a target.''' - target_name = target_dict.get('target_name') - actions = target_dict.get('actions', []) - for action in actions: - action_name = action.get('action_name') - if not action_name: - raise Exception("Anonymous action in target %s. " - "An action must have an 'action_name' field." % - target_name) - inputs = action.get('inputs', []) - - -def ValidateRunAsInTarget(target, target_dict, build_file): - target_name = target_dict.get('target_name') - run_as = target_dict.get('run_as') - if not run_as: - return - if not isinstance(run_as, dict): - raise Exception("The 'run_as' in target %s from file %s should be a " - "dictionary." % - (target_name, build_file)) - action = run_as.get('action') - if not action: - raise Exception("The 'run_as' in target %s from file %s must have an " - "'action' section." % - (target_name, build_file)) - if not isinstance(action, list): - raise Exception("The 'action' for 'run_as' in target %s from file %s " - "must be a list." % - (target_name, build_file)) - working_directory = run_as.get('working_directory') - if working_directory and not isinstance(working_directory, str): - raise Exception("The 'working_directory' for 'run_as' in target %s " - "in file %s should be a string." % - (target_name, build_file)) - environment = run_as.get('environment') - if environment and not isinstance(environment, dict): - raise Exception("The 'environment' for 'run_as' in target %s " - "in file %s should be a dictionary." % - (target_name, build_file)) - - -def TurnIntIntoStrInDict(the_dict): - """Given dict the_dict, recursively converts all integers into strings. - """ - # Use items instead of iteritems because there's no need to try to look at - # reinserted keys and their associated values. - for k, v in the_dict.items(): - if isinstance(v, int): - v = str(v) - the_dict[k] = v - elif isinstance(v, dict): - TurnIntIntoStrInDict(v) - elif isinstance(v, list): - TurnIntIntoStrInList(v) - - if isinstance(k, int): - the_dict[str(k)] = v - del the_dict[k] - - -def TurnIntIntoStrInList(the_list): - """Given list the_list, recursively converts all integers into strings. - """ - for index in xrange(0, len(the_list)): - item = the_list[index] - if isinstance(item, int): - the_list[index] = str(item) - elif isinstance(item, dict): - TurnIntIntoStrInDict(item) - elif isinstance(item, list): - TurnIntIntoStrInList(item) - - -def Load(build_files, variables, includes, depth, generator_input_info, check): - # Set up path_sections and non_configuration_keys with the default data plus - # the generator-specifc data. - global path_sections - path_sections = base_path_sections[:] - path_sections.extend(generator_input_info['path_sections']) - - global non_configuration_keys - non_configuration_keys = base_non_configuration_keys[:] - non_configuration_keys.extend(generator_input_info['non_configuration_keys']) - - # TODO(mark) handle variants if the generator doesn't want them directly. - generator_handles_variants = \ - generator_input_info['generator_handles_variants'] - - global absolute_build_file_paths - absolute_build_file_paths = \ - generator_input_info['generator_wants_absolute_build_file_paths'] - - global multiple_toolsets - multiple_toolsets = generator_input_info[ - 'generator_supports_multiple_toolsets'] - - # A generator can have other lists (in addition to sources) be processed - # for rules. - extra_sources_for_rules = generator_input_info['extra_sources_for_rules'] - - # Load build files. This loads every target-containing build file into - # the |data| dictionary such that the keys to |data| are build file names, - # and the values are the entire build file contents after "early" or "pre" - # processing has been done and includes have been resolved. - # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as - # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps - # track of the keys corresponding to "target" files. - data = {'target_build_files': set()} - aux_data = {} - for build_file in build_files: - # Normalize paths everywhere. This is important because paths will be - # used as keys to the data dict and for references between input files. - build_file = os.path.normpath(build_file) - try: - LoadTargetBuildFile(build_file, data, aux_data, variables, includes, - depth, check) - except Exception, e: - gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file) - raise - - # Build a dict to access each target's subdict by qualified name. - targets = BuildTargetsDict(data) - - # Fully qualify all dependency links. - QualifyDependencies(targets) - - # Expand dependencies specified as build_file:*. - ExpandWildcardDependencies(targets, data) - - [dependency_nodes, flat_list] = BuildDependencyList(targets) - - # Handle dependent settings of various types. - for settings_type in ['all_dependent_settings', - 'direct_dependent_settings', - 'link_settings']: - DoDependentSettings(settings_type, flat_list, targets, dependency_nodes) - - # Take out the dependent settings now that they've been published to all - # of the targets that require them. - for target in flat_list: - if settings_type in targets[target]: - del targets[target][settings_type] - - # Make sure static libraries don't declare dependencies on other static - # libraries, but that linkables depend on all unlinked static libraries - # that they need so that their link steps will be correct. - AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes) - - # Apply "post"/"late"/"target" variable expansions and condition evaluations. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ProcessVariablesAndConditionsInDict(target_dict, True, variables, - build_file) - - # Move everything that can go into a "configurations" section into one. - for target in flat_list: - target_dict = targets[target] - SetUpConfigurations(target, target_dict) - - # Apply exclude (!) and regex (/) list filters. - for target in flat_list: - target_dict = targets[target] - ProcessListFiltersInDict(target, target_dict) - - # Make sure that the rules make sense, and build up rule_sources lists as - # needed. Not all generators will need to use the rule_sources lists, but - # some may, and it seems best to build the list in a common spot. - # Also validate actions and run_as elements in targets. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ValidateRulesInTarget(target, target_dict, extra_sources_for_rules) - ValidateRunAsInTarget(target, target_dict, build_file) - ValidateActionsInTarget(target, target_dict, build_file) - - # Generators might not expect ints. Turn them into strs. - TurnIntIntoStrInDict(data) - - # TODO(mark): Return |data| for now because the generator needs a list of - # build files that came in. In the future, maybe it should just accept - # a list, and not the whole data dict. - return [flat_list, targets, data] diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/xcodeproj_file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/xcodeproj_file.py deleted file mode 100644 index 7e10525c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/pylib/gyp/xcodeproj_file.py +++ /dev/null @@ -1,2690 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Xcode project file generator. - -This module is both an Xcode project file generator and a documentation of the -Xcode project file format. Knowledge of the project file format was gained -based on extensive experience with Xcode, and by making changes to projects in -Xcode.app and observing the resultant changes in the associated project files. - -XCODE PROJECT FILES - -The generator targets the file format as written by Xcode 3.1 (specifically, -3.1.2), but past experience has taught that the format has not changed -significantly in the past several years, and future versions of Xcode are able -to read older project files. - -Xcode project files are "bundled": the project "file" from an end-user's -perspective is actually a directory with an ".xcodeproj" extension. The -project file from this module's perspective is actually a file inside this -directory, always named "project.pbxproj". This file contains a complete -description of the project and is all that is needed to use the xcodeproj. -Other files contained in the xcodeproj directory are simply used to store -per-user settings, such as the state of various UI elements in the Xcode -application. - -The project.pbxproj file is a property list, stored in a format almost -identical to the NeXTstep property list format. The file is able to carry -Unicode data, and is encoded in UTF-8. The root element in the property list -is a dictionary that contains several properties of minimal interest, and two -properties of immense interest. The most important property is a dictionary -named "objects". The entire structure of the project is represented by the -children of this property. The objects dictionary is keyed by unique 96-bit -values represented by 24 uppercase hexadecimal characters. Each value in the -objects dictionary is itself a dictionary, describing an individual object. - -Each object in the dictionary is a member of a class, which is identified by -the "isa" property of each object. A variety of classes are represented in a -project file. Objects can refer to other objects by ID, using the 24-character -hexadecimal object key. A project's objects form a tree, with a root object -of class PBXProject at the root. As an example, the PBXProject object serves -as parent to an XCConfigurationList object defining the build configurations -used in the project, a PBXGroup object serving as a container for all files -referenced in the project, and a list of target objects, each of which defines -a target in the project. There are several different types of target object, -such as PBXNativeTarget and PBXAggregateTarget. In this module, this -relationship is expressed by having each target type derive from an abstract -base named XCTarget. - -The project.pbxproj file's root dictionary also contains a property, sibling to -the "objects" dictionary, named "rootObject". The value of rootObject is a -24-character object key referring to the root PBXProject object in the -objects dictionary. - -In Xcode, every file used as input to a target or produced as a final product -of a target must appear somewhere in the hierarchy rooted at the PBXGroup -object referenced by the PBXProject's mainGroup property. A PBXGroup is -generally represented as a folder in the Xcode application. PBXGroups can -contain other PBXGroups as well as PBXFileReferences, which are pointers to -actual files. - -Each XCTarget contains a list of build phases, represented in this module by -the abstract base XCBuildPhase. Examples of concrete XCBuildPhase derivations -are PBXSourcesBuildPhase and PBXFrameworksBuildPhase, which correspond to the -"Compile Sources" and "Link Binary With Libraries" phases displayed in the -Xcode application. Files used as input to these phases (for example, source -files in the former case and libraries and frameworks in the latter) are -represented by PBXBuildFile objects, referenced by elements of "files" lists -in XCTarget objects. Each PBXBuildFile object refers to a PBXBuildFile -object as a "weak" reference: it does not "own" the PBXBuildFile, which is -owned by the root object's mainGroup or a descendant group. In most cases, the -layer of indirection between an XCBuildPhase and a PBXFileReference via a -PBXBuildFile appears extraneous, but there's actually one reason for this: -file-specific compiler flags are added to the PBXBuildFile object so as to -allow a single file to be a member of multiple targets while having distinct -compiler flags for each. These flags can be modified in the Xcode applciation -in the "Build" tab of a File Info window. - -When a project is open in the Xcode application, Xcode will rewrite it. As -such, this module is careful to adhere to the formatting used by Xcode, to -avoid insignificant changes appearing in the file when it is used in the -Xcode application. This will keep version control repositories happy, and -makes it possible to compare a project file used in Xcode to one generated by -this module to determine if any significant changes were made in the -application. - -Xcode has its own way of assigning 24-character identifiers to each object, -which is not duplicated here. Because the identifier only is only generated -once, when an object is created, and is then left unchanged, there is no need -to attempt to duplicate Xcode's behavior in this area. The generator is free -to select any identifier, even at random, to refer to the objects it creates, -and Xcode will retain those identifiers and use them when subsequently -rewriting the project file. However, the generator would choose new random -identifiers each time the project files are generated, leading to difficulties -comparing "used" project files to "pristine" ones produced by this module, -and causing the appearance of changes as every object identifier is changed -when updated projects are checked in to a version control repository. To -mitigate this problem, this module chooses identifiers in a more deterministic -way, by hashing a description of each object as well as its parent and ancestor -objects. This strategy should result in minimal "shift" in IDs as successive -generations of project files are produced. - -THIS MODULE - -This module introduces several classes, all derived from the XCObject class. -Nearly all of the "brains" are built into the XCObject class, which understands -how to create and modify objects, maintain the proper tree structure, compute -identifiers, and print objects. For the most part, classes derived from -XCObject need only provide a _schema class object, a dictionary that -expresses what properties objects of the class may contain. - -Given this structure, it's possible to build a minimal project file by creating -objects of the appropriate types and making the proper connections: - - config_list = XCConfigurationList() - group = PBXGroup() - project = PBXProject({'buildConfigurationList': config_list, - 'mainGroup': group}) - -With the project object set up, it can be added to an XCProjectFile object. -XCProjectFile is a pseudo-class in the sense that it is a concrete XCObject -subclass that does not actually correspond to a class type found in a project -file. Rather, it is used to represent the project file's root dictionary. -Printing an XCProjectFile will print the entire project file, including the -full "objects" dictionary. - - project_file = XCProjectFile({'rootObject': project}) - project_file.ComputeIDs() - project_file.Print() - -Xcode project files are always encoded in UTF-8. This module will accept -strings of either the str class or the unicode class. Strings of class str -are assumed to already be encoded in UTF-8. Obviously, if you're just using -ASCII, you won't encounter difficulties because ASCII is a UTF-8 subset. -Strings of class unicode are handled properly and encoded in UTF-8 when -a project file is output. -""" - -import gyp.common -import posixpath -import re -import struct -import sys - -# hashlib is supplied as of Python 2.5 as the replacement interface for sha -# and other secure hashes. In 2.6, sha is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import sha otherwise, -# preserving 2.4 compatibility. -try: - import hashlib - _new_sha1 = hashlib.sha1 -except ImportError: - import sha - _new_sha1 = sha.new - - -# See XCObject._EncodeString. This pattern is used to determine when a string -# can be printed unquoted. Strings that match this pattern may be printed -# unquoted. Strings that do not match must be quoted and may be further -# transformed to be properly encoded. Note that this expression matches the -# characters listed with "+", for 1 or more occurrences: if a string is empty, -# it must not match this pattern, because it needs to be encoded as "". -_unquoted = re.compile('^[A-Za-z0-9$./_]+$') - -# Strings that match this pattern are quoted regardless of what _unquoted says. -# Oddly, Xcode will quote any string with a run of three or more underscores. -_quoted = re.compile('___') - -# This pattern should match any character that needs to be escaped by -# XCObject._EncodeString. See that function. -_escaped = re.compile('[\\\\"]|[^ -~]') - - -# Used by SourceTreeAndPathFromPath -_path_leading_variable = re.compile('^\$\((.*?)\)(/(.*))?$') - -def SourceTreeAndPathFromPath(input_path): - """Given input_path, returns a tuple with sourceTree and path values. - - Examples: - input_path (source_tree, output_path) - '$(VAR)/path' ('VAR', 'path') - '$(VAR)' ('VAR', None) - 'path' (None, 'path') - """ - - source_group_match = _path_leading_variable.match(input_path) - if source_group_match: - source_tree = source_group_match.group(1) - output_path = source_group_match.group(3) # This may be None. - else: - source_tree = None - output_path = input_path - - return (source_tree, output_path) - -def ConvertVariablesToShellSyntax(input_string): - return re.sub('\$\((.*?)\)', '${\\1}', input_string) - -class XCObject(object): - """The abstract base of all class types used in Xcode project files. - - Class variables: - _schema: A dictionary defining the properties of this class. The keys to - _schema are string property keys as used in project files. Values - are a list of four or five elements: - [ is_list, property_type, is_strong, is_required, default ] - is_list: True if the property described is a list, as opposed - to a single element. - property_type: The type to use as the value of the property, - or if is_list is True, the type to use for each - element of the value's list. property_type must - be an XCObject subclass, or one of the built-in - types str, int, or dict. - is_strong: If property_type is an XCObject subclass, is_strong - is True to assert that this class "owns," or serves - as parent, to the property value (or, if is_list is - True, values). is_strong must be False if - property_type is not an XCObject subclass. - is_required: True if the property is required for the class. - Note that is_required being True does not preclude - an empty string ("", in the case of property_type - str) or list ([], in the case of is_list True) from - being set for the property. - default: Optional. If is_requried is True, default may be set - to provide a default value for objects that do not supply - their own value. If is_required is True and default - is not provided, users of the class must supply their own - value for the property. - Note that although the values of the array are expressed in - boolean terms, subclasses provide values as integers to conserve - horizontal space. - _should_print_single_line: False in XCObject. Subclasses whose objects - should be written to the project file in the - alternate single-line format, such as - PBXFileReference and PBXBuildFile, should - set this to True. - _encode_transforms: Used by _EncodeString to encode unprintable characters. - The index into this list is the ordinal of the - character to transform; each value is a string - used to represent the character in the output. XCObject - provides an _encode_transforms list suitable for most - XCObject subclasses. - _alternate_encode_transforms: Provided for subclasses that wish to use - the alternate encoding rules. Xcode seems - to use these rules when printing objects in - single-line format. Subclasses that desire - this behavior should set _encode_transforms - to _alternate_encode_transforms. - _hashables: A list of XCObject subclasses that can be hashed by ComputeIDs - to construct this object's ID. Most classes that need custom - hashing behavior should do it by overriding Hashables, - but in some cases an object's parent may wish to push a - hashable value into its child, and it can do so by appending - to _hashables. - Attribues: - id: The object's identifier, a 24-character uppercase hexadecimal string. - Usually, objects being created should not set id until the entire - project file structure is built. At that point, UpdateIDs() should - be called on the root object to assign deterministic values for id to - each object in the tree. - parent: The object's parent. This is set by a parent XCObject when a child - object is added to it. - _properties: The object's property dictionary. An object's properties are - described by its class' _schema variable. - """ - - _schema = {} - _should_print_single_line = False - - # See _EncodeString. - _encode_transforms = [] - i = 0 - while i < ord(' '): - _encode_transforms.append('\\U%04x' % i) - i = i + 1 - _encode_transforms[7] = '\\a' - _encode_transforms[8] = '\\b' - _encode_transforms[9] = '\\t' - _encode_transforms[10] = '\\n' - _encode_transforms[11] = '\\v' - _encode_transforms[12] = '\\f' - _encode_transforms[13] = '\\n' - - _alternate_encode_transforms = list(_encode_transforms) - _alternate_encode_transforms[9] = chr(9) - _alternate_encode_transforms[10] = chr(10) - _alternate_encode_transforms[11] = chr(11) - - def __init__(self, properties=None, id=None, parent=None): - self.id = id - self.parent = parent - self._properties = {} - self._hashables = [] - self._SetDefaultsFromSchema() - self.UpdateProperties(properties) - - def __repr__(self): - try: - name = self.Name() - except NotImplementedError: - return '<%s at 0x%x>' % (self.__class__.__name__, id(self)) - return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self)) - - def Copy(self): - """Make a copy of this object. - - The new object will have its own copy of lists and dicts. Any XCObject - objects owned by this object (marked "strong") will be copied in the - new object, even those found in lists. If this object has any weak - references to other XCObjects, the same references are added to the new - object without making a copy. - """ - - that = self.__class__(id=self.id, parent=self.parent) - for key, value in self._properties.iteritems(): - is_strong = self._schema[key][2] - - if isinstance(value, XCObject): - if is_strong: - new_value = value.Copy() - new_value.parent = that - that._properties[key] = new_value - else: - that._properties[key] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): - that._properties[key] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, so it's safe to - # call Copy. - that._properties[key] = [] - for item in value: - new_item = item.Copy() - new_item.parent = that - that._properties[key].append(new_item) - else: - that._properties[key] = value[:] - elif isinstance(value, dict): - # dicts are never strong. - if is_strong: - raise TypeError, 'Strong dict for key ' + key + ' in ' + \ - self.__class__.__name__ - else: - that._properties[key] = value.copy() - else: - raise TypeError, 'Unexpected type ' + value.__class__.__name__ + \ - ' for key ' + key + ' in ' + self.__class__.__name__ - - return that - - def Name(self): - """Return the name corresponding to an object. - - Not all objects necessarily need to be nameable, and not all that do have - a "name" property. Override as needed. - """ - - # If the schema indicates that "name" is required, try to access the - # property even if it doesn't exist. This will result in a KeyError - # being raised for the property that should be present, which seems more - # appropriate than NotImplementedError in this case. - if 'name' in self._properties or \ - ('name' in self._schema and self._schema['name'][3]): - return self._properties['name'] - - raise NotImplementedError, \ - self.__class__.__name__ + ' must implement Name' - - def Comment(self): - """Return a comment string for the object. - - Most objects just use their name as the comment, but PBXProject uses - different values. - - The returned comment is not escaped and does not have any comment marker - strings applied to it. - """ - - return self.Name() - - def Hashables(self): - hashables = [self.__class__.__name__] - - name = self.Name() - if name != None: - hashables.append(name) - - hashables.extend(self._hashables) - - return hashables - - def ComputeIDs(self, recursive=True, overwrite=True, hash=None): - """Set "id" properties deterministically. - - An object's "id" property is set based on a hash of its class type and - name, as well as the class type and name of all ancestor objects. As - such, it is only advisable to call ComputeIDs once an entire project file - tree is built. - - If recursive is True, recurse into all descendant objects and update their - hashes. - - If overwrite is True, any existing value set in the "id" property will be - replaced. - """ - - def _HashUpdate(hash, data): - """Update hash with data's length and contents. - - If the hash were updated only with the value of data, it would be - possible for clowns to induce collisions by manipulating the names of - their objects. By adding the length, it's exceedingly less likely that - ID collisions will be encountered, intentionally or not. - """ - - hash.update(struct.pack('>i', len(data))) - hash.update(data) - - if hash == None: - hash = _new_sha1() - - hashables = self.Hashables() - assert len(hashables) > 0 - for hashable in hashables: - _HashUpdate(hash, hashable) - - if recursive: - for child in self.Children(): - child.ComputeIDs(recursive, overwrite, hash.copy()) - - if overwrite or self.id == None: - # Xcode IDs are only 96 bits (24 hex characters), but a SHA-1 digest is - # is 160 bits. Instead of throwing out 64 bits of the digest, xor them - # into the portion that gets used. - assert hash.digest_size % 4 == 0 - digest_int_count = hash.digest_size / 4 - digest_ints = struct.unpack('>' + 'I' * digest_int_count, hash.digest()) - id_ints = [0, 0, 0] - for index in xrange(0, digest_int_count): - id_ints[index % 3] ^= digest_ints[index] - self.id = '%08X%08X%08X' % tuple(id_ints) - - def EnsureNoIDCollisions(self): - """Verifies that no two objects have the same ID. Checks all descendants. - """ - - ids = {} - descendants = self.Descendants() - for descendant in descendants: - if descendant.id in ids: - other = ids[descendant.id] - raise KeyError, \ - 'Duplicate ID %s, objects "%s" and "%s" in "%s"' % \ - (descendant.id, str(descendant._properties), - str(other._properties), self._properties['rootObject'].Name()) - ids[descendant.id] = descendant - - def Children(self): - """Returns a list of all of this object's owned (strong) children.""" - - children = [] - for property, attributes in self._schema.iteritems(): - (is_list, property_type, is_strong) = attributes[0:3] - if is_strong and property in self._properties: - if not is_list: - children.append(self._properties[property]) - else: - children.extend(self._properties[property]) - return children - - def Descendants(self): - """Returns a list of all of this object's descendants, including this - object. - """ - - children = self.Children() - descendants = [self] - for child in children: - descendants.extend(child.Descendants()) - return descendants - - def PBXProjectAncestor(self): - # The base case for recursion is defined at PBXProject.PBXProjectAncestor. - if self.parent: - return self.parent.PBXProjectAncestor() - return None - - def _EncodeComment(self, comment): - """Encodes a comment to be placed in the project file output, mimicing - Xcode behavior. - """ - - # This mimics Xcode behavior by wrapping the comment in "/*" and "*/". If - # the string already contains a "*/", it is turned into "(*)/". This keeps - # the file writer from outputting something that would be treated as the - # end of a comment in the middle of something intended to be entirely a - # comment. - - return '/* ' + comment.replace('*/', '(*)/') + ' */' - - def _EncodeTransform(self, match): - # This function works closely with _EncodeString. It will only be called - # by re.sub with match.group(0) containing a character matched by the - # the _escaped expression. - char = match.group(0) - - # Backslashes (\) and quotation marks (") are always replaced with a - # backslash-escaped version of the same. Everything else gets its - # replacement from the class' _encode_transforms array. - if char == '\\': - return '\\\\' - if char == '"': - return '\\"' - return self._encode_transforms[ord(char)] - - def _EncodeString(self, value): - """Encodes a string to be placed in the project file output, mimicing - Xcode behavior. - """ - - # Use quotation marks when any character outside of the range A-Z, a-z, 0-9, - # $ (dollar sign), . (period), and _ (underscore) is present. Also use - # quotation marks to represent empty strings. - # - # Escape " (double-quote) and \ (backslash) by preceding them with a - # backslash. - # - # Some characters below the printable ASCII range are encoded specially: - # 7 ^G BEL is encoded as "\a" - # 8 ^H BS is encoded as "\b" - # 11 ^K VT is encoded as "\v" - # 12 ^L NP is encoded as "\f" - # 127 ^? DEL is passed through as-is without escaping - # - In PBXFileReference and PBXBuildFile objects: - # 9 ^I HT is passed through as-is without escaping - # 10 ^J NL is passed through as-is without escaping - # 13 ^M CR is passed through as-is without escaping - # - In other objects: - # 9 ^I HT is encoded as "\t" - # 10 ^J NL is encoded as "\n" - # 13 ^M CR is encoded as "\n" rendering it indistinguishable from - # 10 ^J NL - # All other nonprintable characters within the ASCII range (0 through 127 - # inclusive) are encoded as "\U001f" referring to the Unicode code point in - # hexadecimal. For example, character 14 (^N SO) is encoded as "\U000e". - # Characters above the ASCII range are passed through to the output encoded - # as UTF-8 without any escaping. These mappings are contained in the - # class' _encode_transforms list. - - if _unquoted.search(value) and not _quoted.search(value): - return value - - return '"' + _escaped.sub(self._EncodeTransform, value) + '"' - - def _XCPrint(self, file, tabs, line): - file.write('\t' * tabs + line) - - def _XCPrintableValue(self, tabs, value, flatten_list=False): - """Returns a representation of value that may be printed in a project file, - mimicing Xcode's behavior. - - _XCPrintableValue can handle str and int values, XCObjects (which are - made printable by returning their id property), and list and dict objects - composed of any of the above types. When printing a list or dict, and - _should_print_single_line is False, the tabs parameter is used to determine - how much to indent the lines corresponding to the items in the list or - dict. - - If flatten_list is True, single-element lists will be transformed into - strings. - """ - - printable = '' - comment = None - - if self._should_print_single_line: - sep = ' ' - element_tabs = '' - end_tabs = '' - else: - sep = '\n' - element_tabs = '\t' * (tabs + 1) - end_tabs = '\t' * tabs - - if isinstance(value, XCObject): - printable += value.id - comment = value.Comment() - elif isinstance(value, str): - printable += self._EncodeString(value) - elif isinstance(value, unicode): - printable += self._EncodeString(value.encode('utf-8')) - elif isinstance(value, int): - printable += str(value) - elif isinstance(value, list): - if flatten_list and len(value) <= 1: - if len(value) == 0: - printable += self._EncodeString('') - else: - printable += self._EncodeString(value[0]) - else: - printable = '(' + sep - for item in value: - printable += element_tabs + \ - self._XCPrintableValue(tabs + 1, item, flatten_list) + \ - ',' + sep - printable += end_tabs + ')' - elif isinstance(value, dict): - printable = '{' + sep - for item_key, item_value in sorted(value.iteritems()): - printable += element_tabs + \ - self._XCPrintableValue(tabs + 1, item_key, flatten_list) + ' = ' + \ - self._XCPrintableValue(tabs + 1, item_value, flatten_list) + ';' + \ - sep - printable += end_tabs + '}' - else: - raise TypeError, "Can't make " + value.__class__.__name__ + ' printable' - - if comment != None: - printable += ' ' + self._EncodeComment(comment) - - return printable - - def _XCKVPrint(self, file, tabs, key, value): - """Prints a key and value, members of an XCObject's _properties dictionary, - to file. - - tabs is an int identifying the indentation level. If the class' - _should_print_single_line variable is True, tabs is ignored and the - key-value pair will be followed by a space insead of a newline. - """ - - if self._should_print_single_line: - printable = '' - after_kv = ' ' - else: - printable = '\t' * tabs - after_kv = '\n' - - # Xcode usually prints remoteGlobalIDString values in PBXContainerItemProxy - # objects without comments. Sometimes it prints them with comments, but - # the majority of the time, it doesn't. To avoid unnecessary changes to - # the project file after Xcode opens it, don't write comments for - # remoteGlobalIDString. This is a sucky hack and it would certainly be - # cleaner to extend the schema to indicate whether or not a comment should - # be printed, but since this is the only case where the problem occurs and - # Xcode itself can't seem to make up its mind, the hack will suffice. - # - # Also see PBXContainerItemProxy._schema['remoteGlobalIDString']. - if key == 'remoteGlobalIDString' and isinstance(self, - PBXContainerItemProxy): - value_to_print = value.id - else: - value_to_print = value - - # In another one-off, let's set flatten_list on buildSettings properties - # of XCBuildConfiguration objects, because that's how Xcode treats them. - if key == 'buildSettings' and isinstance(self, XCBuildConfiguration): - flatten_list = True - else: - flatten_list = False - - try: - printable += self._XCPrintableValue(tabs, key, flatten_list) + ' = ' + \ - self._XCPrintableValue(tabs, value_to_print, flatten_list) + \ - ';' + after_kv - except TypeError, e: - gyp.common.ExceptionAppend(e, - 'while printing key "%s"' % key) - raise - - self._XCPrint(file, 0, printable) - - def Print(self, file=sys.stdout): - """Prints a reprentation of this object to file, adhering to Xcode output - formatting. - """ - - self.VerifyHasRequiredProperties() - - if self._should_print_single_line: - # When printing an object in a single line, Xcode doesn't put any space - # between the beginning of a dictionary (or presumably a list) and the - # first contained item, so you wind up with snippets like - # ...CDEF = {isa = PBXFileReference; fileRef = 0123... - # If it were me, I would have put a space in there after the opening - # curly, but I guess this is just another one of those inconsistencies - # between how Xcode prints PBXFileReference and PBXBuildFile objects as - # compared to other objects. Mimic Xcode's behavior here by using an - # empty string for sep. - sep = '' - end_tabs = 0 - else: - sep = '\n' - end_tabs = 2 - - # Start the object. For example, '\t\tPBXProject = {\n'. - self._XCPrint(file, 2, self._XCPrintableValue(2, self) + ' = {' + sep) - - # "isa" isn't in the _properties dictionary, it's an intrinsic property - # of the class which the object belongs to. Xcode always outputs "isa" - # as the first element of an object dictionary. - self._XCKVPrint(file, 3, 'isa', self.__class__.__name__) - - # The remaining elements of an object dictionary are sorted alphabetically. - for property, value in sorted(self._properties.iteritems()): - self._XCKVPrint(file, 3, property, value) - - # End the object. - self._XCPrint(file, end_tabs, '};\n') - - def UpdateProperties(self, properties, do_copy=False): - """Merge the supplied properties into the _properties dictionary. - - The input properties must adhere to the class schema or a KeyError or - TypeError exception will be raised. If adding an object of an XCObject - subclass and the schema indicates a strong relationship, the object's - parent will be set to this object. - - If do_copy is True, then lists, dicts, strong-owned XCObjects, and - strong-owned XCObjects in lists will be copied instead of having their - references added. - """ - - if properties == None: - return - - for property, value in properties.iteritems(): - # Make sure the property is in the schema. - if not property in self._schema: - raise KeyError, property + ' not in ' + self.__class__.__name__ - - # Make sure the property conforms to the schema. - (is_list, property_type, is_strong) = self._schema[property][0:3] - if is_list: - if value.__class__ != list: - raise TypeError, \ - property + ' of ' + self.__class__.__name__ + \ - ' must be list, not ' + value.__class__.__name__ - for item in value: - if not isinstance(item, property_type) and \ - not (item.__class__ == unicode and property_type == str): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError, \ - 'item of ' + property + ' of ' + self.__class__.__name__ + \ - ' must be ' + property_type.__name__ + ', not ' + \ - item.__class__.__name__ - elif not isinstance(value, property_type) and \ - not (value.__class__ == unicode and property_type == str): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError, \ - property + ' of ' + self.__class__.__name__ + ' must be ' + \ - property_type.__name__ + ', not ' + value.__class__.__name__ - - # Checks passed, perform the assignment. - if do_copy: - if isinstance(value, XCObject): - if is_strong: - self._properties[property] = value.Copy() - else: - self._properties[property] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): - self._properties[property] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, so it's safe - # to call Copy. - self._properties[property] = [] - for item in value: - self._properties[property].append(item.Copy()) - else: - self._properties[property] = value[:] - elif isinstance(value, dict): - self._properties[property] = value.copy() - else: - raise TypeError, "Don't know how to copy a " + \ - value.__class__.__name__ + ' object for ' + \ - property + ' in ' + self.__class__.__name__ - else: - self._properties[property] = value - - # Set up the child's back-reference to this object. Don't use |value| - # any more because it may not be right if do_copy is true. - if is_strong: - if not is_list: - self._properties[property].parent = self - else: - for item in self._properties[property]: - item.parent = self - - def HasProperty(self, key): - return key in self._properties - - def GetProperty(self, key): - return self._properties[key] - - def SetProperty(self, key, value): - self.UpdateProperties({key: value}) - - def DelProperty(self, key): - if key in self._properties: - del self._properties[key] - - def AppendProperty(self, key, value): - # TODO(mark): Support ExtendProperty too (and make this call that)? - - # Schema validation. - if not key in self._schema: - raise KeyError, key + ' not in ' + self.__class__.__name__ - - (is_list, property_type, is_strong) = self._schema[key][0:3] - if not is_list: - raise TypeError, key + ' of ' + self.__class__.__name__ + ' must be list' - if not isinstance(value, property_type): - raise TypeError, 'item of ' + key + ' of ' + self.__class__.__name__ + \ - ' must be ' + property_type.__name__ + ', not ' + \ - value.__class__.__name__ - - # If the property doesn't exist yet, create a new empty list to receive the - # item. - if not key in self._properties: - self._properties[key] = [] - - # Set up the ownership link. - if is_strong: - value.parent = self - - # Store the item. - self._properties[key].append(value) - - def VerifyHasRequiredProperties(self): - """Ensure that all properties identified as required by the schema are - set. - """ - - # TODO(mark): A stronger verification mechanism is needed. Some - # subclasses need to perform validation beyond what the schema can enforce. - for property, attributes in self._schema.iteritems(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if is_required and not property in self._properties: - raise KeyError, self.__class__.__name__ + ' requires ' + property - - def _SetDefaultsFromSchema(self): - """Assign object default values according to the schema. This will not - overwrite properties that have already been set.""" - - defaults = {} - for property, attributes in self._schema.iteritems(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if is_required and len(attributes) >= 5 and \ - not property in self._properties: - default = attributes[4] - - defaults[property] = default - - if len(defaults) > 0: - # Use do_copy=True so that each new object gets its own copy of strong - # objects, lists, and dicts. - self.UpdateProperties(defaults, do_copy=True) - - -class XCHierarchicalElement(XCObject): - """Abstract base for PBXGroup and PBXFileReference. Not represented in a - project file.""" - - # TODO(mark): Do name and path belong here? Probably so. - # If path is set and name is not, name may have a default value. Name will - # be set to the basename of path, if the basename of path is different from - # the full value of path. If path is already just a leaf name, name will - # not be set. - _schema = XCObject._schema.copy() - _schema.update({ - 'comments': [0, str, 0, 0], - 'fileEncoding': [0, str, 0, 0], - 'includeInIndex': [0, int, 0, 0], - 'indentWidth': [0, int, 0, 0], - 'lineEnding': [0, int, 0, 0], - 'sourceTree': [0, str, 0, 1, ''], - 'tabWidth': [0, int, 0, 0], - 'usesTabs': [0, int, 0, 0], - 'wrapsLines': [0, int, 0, 0], - }) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - if 'path' in self._properties and not 'name' in self._properties: - path = self._properties['path'] - name = posixpath.basename(path) - if name != '' and path != name: - self.SetProperty('name', name) - - if 'path' in self._properties and \ - (not 'sourceTree' in self._properties or \ - self._properties['sourceTree'] == ''): - # If the pathname begins with an Xcode variable like "$(SDKROOT)/", take - # the variable out and make the path be relative to that variable by - # assigning the variable name as the sourceTree. - (source_tree, path) = SourceTreeAndPathFromPath(self._properties['path']) - if source_tree != None: - self._properties['sourceTree'] = source_tree - if path != None: - self._properties['path'] = path - if source_tree != None and path == None and \ - not 'name' in self._properties: - # The path was of the form "$(SDKROOT)" with no path following it. - # This object is now relative to that variable, so it has no path - # attribute of its own. It does, however, keep a name. - del self._properties['path'] - self._properties['name'] = source_tree - - def Name(self): - if 'name' in self._properties: - return self._properties['name'] - elif 'path' in self._properties: - return self._properties['path'] - else: - # This happens in the case of the root PBXGroup. - return None - - def Hashables(self): - """Custom hashables for XCHierarchicalElements. - - XCHierarchicalElements are special. Generally, their hashes shouldn't - change if the paths don't change. The normal XCObject implementation of - Hashables adds a hashable for each object, which means that if - the hierarchical structure changes (possibly due to changes caused when - TakeOverOnlyChild runs and encounters slight changes in the hierarchy), - the hashes will change. For example, if a project file initially contains - a/b/f1 and a/b becomes collapsed into a/b, f1 will have a single parent - a/b. If someone later adds a/f2 to the project file, a/b can no longer be - collapsed, and f1 winds up with parent b and grandparent a. That would - be sufficient to change f1's hash. - - To counteract this problem, hashables for all XCHierarchicalElements except - for the main group (which has neither a name nor a path) are taken to be - just the set of path components. Because hashables are inherited from - parents, this provides assurance that a/b/f1 has the same set of hashables - whether its parent is b or a/b. - - The main group is a special case. As it is permitted to have no name or - path, it is permitted to use the standard XCObject hash mechanism. This - is not considered a problem because there can be only one main group. - """ - - if self == self.PBXProjectAncestor()._properties['mainGroup']: - # super - return XCObject.Hashables(self) - - hashables = [] - - # Put the name in first, ensuring that if TakeOverOnlyChild collapses - # children into a top-level group like "Source", the name always goes - # into the list of hashables without interfering with path components. - if 'name' in self._properties: - # Make it less likely for people to manipulate hashes by following the - # pattern of always pushing an object type value onto the list first. - hashables.append(self.__class__.__name__ + '.name') - hashables.append(self._properties['name']) - - # NOTE: This still has the problem that if an absolute path is encountered, - # including paths with a sourceTree, they'll still inherit their parents' - # hashables, even though the paths aren't relative to their parents. This - # is not expected to be much of a problem in practice. - path = self.PathFromSourceTreeAndPath() - if path != None: - components = path.split(posixpath.sep) - for component in components: - hashables.append(self.__class__.__name__ + '.path') - hashables.append(component) - - hashables.extend(self._hashables) - - return hashables - - def Compare(self, other): - # Allow comparison of these types. PBXGroup has the highest sort rank; - # PBXVariantGroup is treated as equal to PBXFileReference. - valid_class_types = { - PBXFileReference: 'file', - PBXGroup: 'group', - PBXVariantGroup: 'file', - } - self_type = valid_class_types[self.__class__] - other_type = valid_class_types[other.__class__] - - if self_type == other_type: - # If the two objects are of the same sort rank, compare their names. - return cmp(self.Name(), other.Name()) - - # Otherwise, sort groups before everything else. - if self_type == 'group': - return -1 - return 1 - - def CompareRootGroup(self, other): - # This function should be used only to compare direct children of the - # containing PBXProject's mainGroup. These groups should appear in the - # listed order. - # TODO(mark): "Build" is used by gyp.generator.xcode, perhaps the - # generator should have a way of influencing this list rather than having - # to hardcode for the generator here. - order = ['Source', 'Intermediates', 'Projects', 'Frameworks', 'Products', - 'Build'] - - # If the groups aren't in the listed order, do a name comparison. - # Otherwise, groups in the listed order should come before those that - # aren't. - self_name = self.Name() - other_name = other.Name() - self_in = isinstance(self, PBXGroup) and self_name in order - other_in = isinstance(self, PBXGroup) and other_name in order - if not self_in and not other_in: - return self.Compare(other) - if self_name in order and not other_name in order: - return -1 - if other_name in order and not self_name in order: - return 1 - - # If both groups are in the listed order, go by the defined order. - self_index = order.index(self_name) - other_index = order.index(other_name) - if self_index < other_index: - return -1 - if self_index > other_index: - return 1 - return 0 - - def PathFromSourceTreeAndPath(self): - # Turn the object's sourceTree and path properties into a single flat - # string of a form comparable to the path parameter. If there's a - # sourceTree property other than "", wrap it in $(...) for the - # comparison. - components = [] - if self._properties['sourceTree'] != '': - components.append('$(' + self._properties['sourceTree'] + ')') - if 'path' in self._properties: - components.append(self._properties['path']) - - if len(components) > 0: - return posixpath.join(*components) - - return None - - def FullPath(self): - # Returns a full path to self relative to the project file, or relative - # to some other source tree. Start with self, and walk up the chain of - # parents prepending their paths, if any, until no more parents are - # available (project-relative path) or until a path relative to some - # source tree is found. - xche = self - path = None - while isinstance(xche, XCHierarchicalElement) and \ - (path == None or \ - (not path.startswith('/') and not path.startswith('$'))): - this_path = xche.PathFromSourceTreeAndPath() - if this_path != None and path != None: - path = posixpath.join(this_path, path) - elif this_path != None: - path = this_path - xche = xche.parent - - return path - - -class PBXGroup(XCHierarchicalElement): - """ - Attributes: - _children_by_path: Maps pathnames of children of this PBXGroup to the - actual child XCHierarchicalElement objects. - _variant_children_by_name_and_path: Maps (name, path) tuples of - PBXVariantGroup children to the actual child PBXVariantGroup objects. - """ - - _schema = XCHierarchicalElement._schema.copy() - _schema.update({ - 'children': [1, XCHierarchicalElement, 1, 1, []], - 'name': [0, str, 0, 0], - 'path': [0, str, 0, 0], - }) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCHierarchicalElement.__init__(self, properties, id, parent) - self._children_by_path = {} - self._variant_children_by_name_and_path = {} - for child in self._properties.get('children', []): - self._AddChildToDicts(child) - - def _AddChildToDicts(self, child): - # Sets up this PBXGroup object's dicts to reference the child properly. - child_path = child.PathFromSourceTreeAndPath() - if child_path: - if child_path in self._children_by_path: - raise ValueError, 'Found multiple children with path ' + child_path - self._children_by_path[child_path] = child - - if isinstance(child, PBXVariantGroup): - child_name = child._properties.get('name', None) - key = (child_name, child_path) - if key in self._variant_children_by_name_and_path: - raise ValueError, 'Found multiple PBXVariantGroup children with ' + \ - 'name ' + str(child_name) + ' and path ' + \ - str(child_path) - self._variant_children_by_name_and_path[key] = child - - def AppendChild(self, child): - # Callers should use this instead of calling - # AppendProperty('children', child) directly because this function - # maintains the group's dicts. - self.AppendProperty('children', child) - self._AddChildToDicts(child) - - def GetChildByName(self, name): - # This is not currently optimized with a dict as GetChildByPath is because - # it has few callers. Most callers probably want GetChildByPath. This - # function is only useful to get children that have names but no paths, - # which is rare. The children of the main group ("Source", "Products", - # etc.) is pretty much the only case where this likely to come up. - # - # TODO(mark): Maybe this should raise an error if more than one child is - # present with the same name. - if not 'children' in self._properties: - return None - - for child in self._properties['children']: - if child.Name() == name: - return child - - return None - - def GetChildByPath(self, path): - if not path: - return None - - if path in self._children_by_path: - return self._children_by_path[path] - - return None - - def GetChildByRemoteObject(self, remote_object): - # This method is a little bit esoteric. Given a remote_object, which - # should be a PBXFileReference in another project file, this method will - # return this group's PBXReferenceProxy object serving as a local proxy - # for the remote PBXFileReference. - # - # This function might benefit from a dict optimization as GetChildByPath - # for some workloads, but profiling shows that it's not currently a - # problem. - if not 'children' in self._properties: - return None - - for child in self._properties['children']: - if not isinstance(child, PBXReferenceProxy): - continue - - container_proxy = child._properties['remoteRef'] - if container_proxy._properties['remoteGlobalIDString'] == remote_object: - return child - - return None - - def AddOrGetFileByPath(self, path, hierarchical): - """Returns an existing or new file reference corresponding to path. - - If hierarchical is True, this method will create or use the necessary - hierarchical group structure corresponding to path. Otherwise, it will - look in and create an item in the current group only. - - If an existing matching reference is found, it is returned, otherwise, a - new one will be created, added to the correct group, and returned. - - If path identifies a directory by virtue of carrying a trailing slash, - this method returns a PBXFileReference of "folder" type. If path - identifies a variant, by virtue of it identifying a file inside a directory - with an ".lproj" extension, this method returns a PBXVariantGroup - containing the variant named by path, and possibly other variants. For - all other paths, a "normal" PBXFileReference will be returned. - """ - - # Adding or getting a directory? Directories end with a trailing slash. - is_dir = False - if path.endswith('/'): - is_dir = True - normpath = posixpath.normpath(path) - if is_dir: - normpath = path + '/' - else: - normpath = path - - # Adding or getting a variant? Variants are files inside directories - # with an ".lproj" extension. Xcode uses variants for localization. For - # a variant path/to/Language.lproj/MainMenu.nib, put a variant group named - # MainMenu.nib inside path/to, and give it a variant named Language. In - # this example, grandparent would be set to path/to and parent_root would - # be set to Language. - variant_name = None - parent = posixpath.dirname(path) - grandparent = posixpath.dirname(parent) - parent_basename = posixpath.basename(parent) - (parent_root, parent_ext) = posixpath.splitext(parent_basename) - if parent_ext == '.lproj': - variant_name = parent_root - if grandparent == '': - grandparent = None - - # Putting a directory inside a variant group is not currently supported. - assert not is_dir or variant_name == None - - path_split = path.split(posixpath.sep) - if len(path_split) == 1 or \ - ((is_dir or variant_name != None) and len(path_split) == 2) or \ - not hierarchical: - # The PBXFileReference or PBXVariantGroup will be added to or gotten from - # this PBXGroup, no recursion necessary. - if variant_name == None: - # Add or get a PBXFileReference. - file_ref = self.GetChildByPath(normpath) - if file_ref != None: - assert file_ref.__class__ == PBXFileReference - else: - file_ref = PBXFileReference({'path': path}) - self.AppendChild(file_ref) - else: - # Add or get a PBXVariantGroup. The variant group name is the same - # as the basename (MainMenu.nib in the example above). grandparent - # specifies the path to the variant group itself, and path_split[-2:] - # is the path of the specific variant relative to its group. - variant_group_name = posixpath.basename(path) - variant_group_ref = self.AddOrGetVariantGroupByNameAndPath( - variant_group_name, grandparent) - variant_path = posixpath.sep.join(path_split[-2:]) - variant_ref = variant_group_ref.GetChildByPath(variant_path) - if variant_ref != None: - assert variant_ref.__class__ == PBXFileReference - else: - variant_ref = PBXFileReference({'name': variant_name, - 'path': variant_path}) - variant_group_ref.AppendChild(variant_ref) - # The caller is interested in the variant group, not the specific - # variant file. - file_ref = variant_group_ref - return file_ref - else: - # Hierarchical recursion. Add or get a PBXGroup corresponding to the - # outermost path component, and then recurse into it, chopping off that - # path component. - next_dir = path_split[0] - group_ref = self.GetChildByPath(next_dir) - if group_ref != None: - assert group_ref.__class__ == PBXGroup - else: - group_ref = PBXGroup({'path': next_dir}) - self.AppendChild(group_ref) - return group_ref.AddOrGetFileByPath(posixpath.sep.join(path_split[1:]), - hierarchical) - - def AddOrGetVariantGroupByNameAndPath(self, name, path): - """Returns an existing or new PBXVariantGroup for name and path. - - If a PBXVariantGroup identified by the name and path arguments is already - present as a child of this object, it is returned. Otherwise, a new - PBXVariantGroup with the correct properties is created, added as a child, - and returned. - - This method will generally be called by AddOrGetFileByPath, which knows - when to create a variant group based on the structure of the pathnames - passed to it. - """ - - key = (name, path) - if key in self._variant_children_by_name_and_path: - variant_group_ref = self._variant_children_by_name_and_path[key] - assert variant_group_ref.__class__ == PBXVariantGroup - return variant_group_ref - - variant_group_properties = {'name': name} - if path != None: - variant_group_properties['path'] = path - variant_group_ref = PBXVariantGroup(variant_group_properties) - self.AppendChild(variant_group_ref) - - return variant_group_ref - - def TakeOverOnlyChild(self, recurse=False): - """If this PBXGroup has only one child and it's also a PBXGroup, take - it over by making all of its children this object's children. - - This function will continue to take over only children when those children - are groups. If there are three PBXGroups representing a, b, and c, with - c inside b and b inside a, and a and b have no other children, this will - result in a taking over both b and c, forming a PBXGroup for a/b/c. - - If recurse is True, this function will recurse into children and ask them - to collapse themselves by taking over only children as well. Assuming - an example hierarchy with files at a/b/c/d1, a/b/c/d2, and a/b/c/d3/e/f - (d1, d2, and f are files, the rest are groups), recursion will result in - a group for a/b/c containing a group for d3/e. - """ - - # At this stage, check that child class types are PBXGroup exactly, - # instead of using isinstance. The only subclass of PBXGroup, - # PBXVariantGroup, should not participate in reparenting in the same way: - # reparenting by merging different object types would be wrong. - while len(self._properties['children']) == 1 and \ - self._properties['children'][0].__class__ == PBXGroup: - # Loop to take over the innermost only-child group possible. - - child = self._properties['children'][0] - - # Assume the child's properties, including its children. Save a copy - # of this object's old properties, because they'll still be needed. - # This object retains its existing id and parent attributes. - old_properties = self._properties - self._properties = child._properties - self._children_by_path = child._children_by_path - - if not 'sourceTree' in self._properties or \ - self._properties['sourceTree'] == '': - # The child was relative to its parent. Fix up the path. Note that - # children with a sourceTree other than "" are not relative to - # their parents, so no path fix-up is needed in that case. - if 'path' in old_properties: - if 'path' in self._properties: - # Both the original parent and child have paths set. - self._properties['path'] = posixpath.join(old_properties['path'], - self._properties['path']) - else: - # Only the original parent has a path, use it. - self._properties['path'] = old_properties['path'] - if 'sourceTree' in old_properties: - # The original parent had a sourceTree set, use it. - self._properties['sourceTree'] = old_properties['sourceTree'] - - # If the original parent had a name set, keep using it. If the original - # parent didn't have a name but the child did, let the child's name - # live on. If the name attribute seems unnecessary now, get rid of it. - if 'name' in old_properties and old_properties['name'] != None and \ - old_properties['name'] != self.Name(): - self._properties['name'] = old_properties['name'] - if 'name' in self._properties and 'path' in self._properties and \ - self._properties['name'] == self._properties['path']: - del self._properties['name'] - - # Notify all children of their new parent. - for child in self._properties['children']: - child.parent = self - - # If asked to recurse, recurse. - if recurse: - for child in self._properties['children']: - if child.__class__ == PBXGroup: - child.TakeOverOnlyChild(recurse) - - def SortGroup(self): - self._properties['children'] = \ - sorted(self._properties['children'], cmp=lambda x,y: x.Compare(y)) - - # Recurse. - for child in self._properties['children']: - if isinstance(child, PBXGroup): - child.SortGroup() - - -class XCFileLikeElement(XCHierarchicalElement): - # Abstract base for objects that can be used as the fileRef property of - # PBXBuildFile. - - def PathHashables(self): - # A PBXBuildFile that refers to this object will call this method to - # obtain additional hashables specific to this XCFileLikeElement. Don't - # just use this object's hashables, they're not specific and unique enough - # on their own (without access to the parent hashables.) Instead, provide - # hashables that identify this object by path by getting its hashables as - # well as the hashables of ancestor XCHierarchicalElement objects. - - hashables = [] - xche = self - while xche != None and isinstance(xche, XCHierarchicalElement): - xche_hashables = xche.Hashables() - for index in xrange(0, len(xche_hashables)): - hashables.insert(index, xche_hashables[index]) - xche = xche.parent - return hashables - - -class XCContainerPortal(XCObject): - # Abstract base for objects that can be used as the containerPortal property - # of PBXContainerItemProxy. - pass - - -class XCRemoteObject(XCObject): - # Abstract base for objects that can be used as the remoteGlobalIDString - # property of PBXContainerItemProxy. - pass - - -class PBXFileReference(XCFileLikeElement, XCContainerPortal, XCRemoteObject): - _schema = XCFileLikeElement._schema.copy() - _schema.update({ - 'explicitFileType': [0, str, 0, 0], - 'lastKnownFileType': [0, str, 0, 0], - 'name': [0, str, 0, 0], - 'path': [0, str, 0, 1], - }) - - # Weird output rules for PBXFileReference. - _should_print_single_line = True - # super - _encode_transforms = XCFileLikeElement._alternate_encode_transforms - - def __init__(self, properties=None, id=None, parent=None): - # super - XCFileLikeElement.__init__(self, properties, id, parent) - if 'path' in self._properties and self._properties['path'].endswith('/'): - self._properties['path'] = self._properties['path'][:-1] - is_dir = True - else: - is_dir = False - - if 'path' in self._properties and \ - not 'lastKnownFileType' in self._properties and \ - not 'explicitFileType' in self._properties: - # TODO(mark): This is the replacement for a replacement for a quick hack. - # It is no longer incredibly sucky, but this list needs to be extended. - extension_map = { - 'a': 'archive.ar', - 'app': 'wrapper.application', - 'bdic': 'file', - 'bundle': 'wrapper.cfbundle', - 'c': 'sourcecode.c.c', - 'cc': 'sourcecode.cpp.cpp', - 'cpp': 'sourcecode.cpp.cpp', - 'css': 'text.css', - 'cxx': 'sourcecode.cpp.cpp', - 'dylib': 'compiled.mach-o.dylib', - 'framework': 'wrapper.framework', - 'h': 'sourcecode.c.h', - 'hxx': 'sourcecode.cpp.h', - 'icns': 'image.icns', - 'js': 'sourcecode.javascript', - 'm': 'sourcecode.c.objc', - 'mm': 'sourcecode.cpp.objcpp', - 'nib': 'wrapper.nib', - 'pdf': 'image.pdf', - 'pl': 'text.script.perl', - 'plist': 'text.plist.xml', - 'pm': 'text.script.perl', - 'png': 'image.png', - 'py': 'text.script.python', - 'r': 'sourcecode.rez', - 'rez': 'sourcecode.rez', - 's': 'sourcecode.asm', - 'strings': 'text.plist.strings', - 'ttf': 'file', - 'xcconfig': 'text.xcconfig', - 'xib': 'file.xib', - 'y': 'sourcecode.yacc', - } - - if is_dir: - file_type = 'folder' - else: - basename = posixpath.basename(self._properties['path']) - (root, ext) = posixpath.splitext(basename) - # Check the map using a lowercase extension. - # TODO(mark): Maybe it should try with the original case first and fall - # back to lowercase, in case there are any instances where case - # matters. There currently aren't. - if ext != '': - ext = ext[1:].lower() - - # TODO(mark): "text" is the default value, but "file" is appropriate - # for unrecognized files not containing text. Xcode seems to choose - # based on content. - file_type = extension_map.get(ext, 'text') - - self._properties['lastKnownFileType'] = file_type - - -class PBXVariantGroup(PBXGroup, XCFileLikeElement): - """PBXVariantGroup is used by Xcode to represent localizations.""" - # No additions to the schema relative to PBXGroup. - pass - - -# PBXReferenceProxy is also an XCFileLikeElement subclass. It is defined below -# because it uses PBXContainerItemProxy, defined below. - - -class XCBuildConfiguration(XCObject): - _schema = XCObject._schema.copy() - _schema.update({ - 'baseConfigurationReference': [0, PBXFileReference, 0, 0], - 'buildSettings': [0, dict, 0, 1, {}], - 'name': [0, str, 0, 1], - }) - - def HasBuildSetting(self, key): - return key in self._properties['buildSettings'] - - def GetBuildSetting(self, key): - return self._properties['buildSettings'][key] - - def SetBuildSetting(self, key, value): - # TODO(mark): If a list, copy? - self._properties['buildSettings'][key] = value - - def AppendBuildSetting(self, key, value): - if not key in self._properties['buildSettings']: - self._properties['buildSettings'][key] = [] - self._properties['buildSettings'][key].append(value) - - def DelBuildSetting(self, key): - if key in self._properties['buildSettings']: - del self._properties['buildSettings'][key] - - -class XCConfigurationList(XCObject): - # _configs is the default list of configurations. - _configs = [ XCBuildConfiguration({'name': 'Debug'}), - XCBuildConfiguration({'name': 'Release'}) ] - - _schema = XCObject._schema.copy() - _schema.update({ - 'buildConfigurations': [1, XCBuildConfiguration, 1, 1, _configs], - 'defaultConfigurationIsVisible': [0, int, 0, 1, 1], - 'defaultConfigurationName': [0, str, 0, 1, 'Release'], - }) - - def Name(self): - return 'Build configuration list for ' + \ - self.parent.__class__.__name__ + ' "' + self.parent.Name() + '"' - - def ConfigurationNamed(self, name): - """Convenience accessor to obtain an XCBuildConfiguration by name.""" - for configuration in self._properties['buildConfigurations']: - if configuration._properties['name'] == name: - return configuration - - raise KeyError, name - - def DefaultConfiguration(self): - """Convenience accessor to obtain the default XCBuildConfiguration.""" - return self.ConfigurationNamed(self._properties['defaultConfigurationName']) - - def HasBuildSetting(self, key): - """Determines the state of a build setting in all XCBuildConfiguration - child objects. - - If all child objects have key in their build settings, and the value is the - same in all child objects, returns 1. - - If no child objects have the key in their build settings, returns 0. - - If some, but not all, child objects have the key in their build settings, - or if any children have different values for the key, returns -1. - """ - - has = None - value = None - for configuration in self._properties['buildConfigurations']: - configuration_has = configuration.HasBuildSetting(key) - if has == None: - has = configuration_has - elif has != configuration_has: - return -1 - - if configuration_has: - configuration_value = configuration.GetBuildSetting(key) - if value == None: - value = configuration_value - elif value != configuration_value: - return -1 - - if not has: - return 0 - - return 1 - - def GetBuildSetting(self, key): - """Gets the build setting for key. - - All child XCConfiguration objects must have the same value set for the - setting, or a ValueError will be raised. - """ - - # TODO(mark): This is wrong for build settings that are lists. The list - # contents should be compared (and a list copy returned?) - - value = None - for configuration in self._properties['buildConfigurations']: - configuration_value = configuration.GetBuildSetting(key) - if value == None: - value = configuration_value - else: - if value != configuration_value: - raise ValueError, 'Variant values for ' + key - - return value - - def SetBuildSetting(self, key, value): - """Sets the build setting for key to value in all child - XCBuildConfiguration objects. - """ - - for configuration in self._properties['buildConfigurations']: - configuration.SetBuildSetting(key, value) - - def AppendBuildSetting(self, key, value): - """Appends value to the build setting for key, which is treated as a list, - in all child XCBuildConfiguration objects. - """ - - for configuration in self._properties['buildConfigurations']: - configuration.AppendBuildSetting(key, value) - - def DelBuildSetting(self, key): - """Deletes the build setting key from all child XCBuildConfiguration - objects. - """ - - for configuration in self._properties['buildConfigurations']: - configuration.DelBuildSetting(key) - - -class PBXBuildFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update({ - 'fileRef': [0, XCFileLikeElement, 0, 1], - }) - - # Weird output rules for PBXBuildFile. - _should_print_single_line = True - _encode_transforms = XCObject._alternate_encode_transforms - - def Name(self): - # Example: "main.cc in Sources" - return self._properties['fileRef'].Name() + ' in ' + self.parent.Name() - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # It is not sufficient to just rely on Name() to get the - # XCFileLikeElement's name, because that is not a complete pathname. - # PathHashables returns hashables unique enough that no two - # PBXBuildFiles should wind up with the same set of hashables, unless - # someone adds the same file multiple times to the same target. That - # would be considered invalid anyway. - hashables.extend(self._properties['fileRef'].PathHashables()) - - return hashables - - -class XCBuildPhase(XCObject): - """Abstract base for build phase classes. Not represented in a project - file. - - Attributes: - _files_by_path: A dict mapping each path of a child in the files list by - path (keys) to the corresponding PBXBuildFile children (values). - _files_by_xcfilelikeelement: A dict mapping each XCFileLikeElement (keys) - to the corresponding PBXBuildFile children (values). - """ - - # TODO(mark): Some build phase types, like PBXShellScriptBuildPhase, don't - # actually have a "files" list. XCBuildPhase should not have "files" but - # another abstract subclass of it should provide this, and concrete build - # phase types that do have "files" lists should be derived from that new - # abstract subclass. XCBuildPhase should only provide buildActionMask and - # runOnlyForDeploymentPostprocessing, and not files or the various - # file-related methods and attributes. - - _schema = XCObject._schema.copy() - _schema.update({ - 'buildActionMask': [0, int, 0, 1, 0x7fffffff], - 'files': [1, PBXBuildFile, 1, 1, []], - 'runOnlyForDeploymentPostprocessing': [0, int, 0, 1, 0], - }) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - - self._files_by_path = {} - self._files_by_xcfilelikeelement = {} - for pbxbuildfile in self._properties.get('files', []): - self._AddBuildFileToDicts(pbxbuildfile) - - def FileGroup(self, path): - # Subclasses must override this by returning a two-element tuple. The - # first item in the tuple should be the PBXGroup to which "path" should be - # added, either as a child or deeper descendant. The second item should - # be a boolean indicating whether files should be added into hierarchical - # groups or one single flat group. - raise NotImplementedError, \ - self.__class__.__name__ + ' must implement FileGroup' - - def _AddPathToDict(self, pbxbuildfile, path): - """Adds path to the dict tracking paths belonging to this build phase. - - If the path is already a member of this build phase, raises an exception. - """ - - if path in self._files_by_path: - raise ValueError, 'Found multiple build files with path ' + path - self._files_by_path[path] = pbxbuildfile - - def _AddBuildFileToDicts(self, pbxbuildfile, path=None): - """Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. - - If path is specified, then it is the path that is being added to the - phase, and pbxbuildfile must contain either a PBXFileReference directly - referencing that path, or it must contain a PBXVariantGroup that itself - contains a PBXFileReference referencing the path. - - If path is not specified, either the PBXFileReference's path or the paths - of all children of the PBXVariantGroup are taken as being added to the - phase. - - If the path is already present in the phase, raises an exception. - - If the PBXFileReference or PBXVariantGroup referenced by pbxbuildfile - are already present in the phase, referenced by a different PBXBuildFile - object, raises an exception. This does not raise an exception when - a PBXFileReference or PBXVariantGroup reappear and are referenced by the - same PBXBuildFile that has already introduced them, because in the case - of PBXVariantGroup objects, they may correspond to multiple paths that are - not all added simultaneously. When this situation occurs, the path needs - to be added to _files_by_path, but nothing needs to change in - _files_by_xcfilelikeelement, and the caller should have avoided adding - the PBXBuildFile if it is already present in the list of children. - """ - - xcfilelikeelement = pbxbuildfile._properties['fileRef'] - - paths = [] - if path != None: - # It's best when the caller provides the path. - if isinstance(xcfilelikeelement, PBXVariantGroup): - paths.append(path) - else: - # If the caller didn't provide a path, there can be either multiple - # paths (PBXVariantGroup) or one. - if isinstance(xcfilelikeelement, PBXVariantGroup): - for variant in xcfilelikeelement._properties['children']: - paths.append(variant.FullPath()) - else: - paths.append(xcfilelikeelement.FullPath()) - - # Add the paths first, because if something's going to raise, the - # messages provided by _AddPathToDict are more useful owing to its - # having access to a real pathname and not just an object's Name(). - for a_path in paths: - self._AddPathToDict(pbxbuildfile, a_path) - - # If another PBXBuildFile references this XCFileLikeElement, there's a - # problem. - if xcfilelikeelement in self._files_by_xcfilelikeelement and \ - self._files_by_xcfilelikeelement[xcfilelikeelement] != pbxbuildfile: - raise ValueError, 'Found multiple build files for ' + \ - xcfilelikeelement.Name() - self._files_by_xcfilelikeelement[xcfilelikeelement] = pbxbuildfile - - def AppendBuildFile(self, pbxbuildfile, path=None): - # Callers should use this instead of calling - # AppendProperty('files', pbxbuildfile) directly because this function - # maintains the object's dicts. Better yet, callers can just call AddFile - # with a pathname and not worry about building their own PBXBuildFile - # objects. - self.AppendProperty('files', pbxbuildfile) - self._AddBuildFileToDicts(pbxbuildfile, path) - - def AddFile(self, path): - (file_group, hierarchical) = self.FileGroup(path) - file_ref = file_group.AddOrGetFileByPath(path, hierarchical) - - if file_ref in self._files_by_xcfilelikeelement and \ - isinstance(file_ref, PBXVariantGroup): - # There's already a PBXBuildFile in this phase corresponding to the - # PBXVariantGroup. path just provides a new variant that belongs to - # the group. Add the path to the dict. - pbxbuildfile = self._files_by_xcfilelikeelement[file_ref] - self._AddBuildFileToDicts(pbxbuildfile, path) - else: - # Add a new PBXBuildFile to get file_ref into the phase. - pbxbuildfile = PBXBuildFile({'fileRef': file_ref}) - self.AppendBuildFile(pbxbuildfile, path) - - -class PBXHeadersBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return 'Headers' - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXResourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return 'Resources' - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXSourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return 'Sources' - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXFrameworksBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return 'Frameworks' - - def FileGroup(self, path): - return (self.PBXProjectAncestor().FrameworksGroup(), False) - - -class PBXShellScriptBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update({ - 'inputPaths': [1, str, 0, 1, []], - 'name': [0, str, 0, 0], - 'outputPaths': [1, str, 0, 1, []], - 'shellPath': [0, str, 0, 1, '/bin/sh'], - 'shellScript': [0, str, 0, 1], - 'showEnvVarsInLog': [0, int, 0, 0], - }) - - def Name(self): - if 'name' in self._properties: - return self._properties['name'] - - return 'ShellScript' - - -class PBXCopyFilesBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update({ - 'dstPath': [0, str, 0, 1], - 'dstSubfolderSpec': [0, int, 0, 1], - 'name': [0, str, 0, 0], - }) - - # path_tree_re matches "$(DIR)/path" or just "$(DIR)". Match group 1 is - # "DIR", match group 3 is "path" or None. - path_tree_re = re.compile('^\\$\\((.*)\\)(/(.*)|)$') - - # path_tree_to_subfolder maps names of Xcode variables to the associated - # dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase object. - path_tree_to_subfolder = { - 'BUILT_PRODUCTS_DIR': 16, # Products Directory - # Other types that can be chosen via the Xcode UI. - # TODO(mark): Map Xcode variable names to these. - # : 1, # Wrapper - # : 6, # Executables: 6 - # : 7, # Resources - # : 15, # Java Resources - # : 10, # Frameworks - # : 11, # Shared Frameworks - # : 12, # Shared Support - # : 13, # PlugIns - } - - def Name(self): - if 'name' in self._properties: - return self._properties['name'] - - return 'CopyFiles' - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - def SetDestination(self, path): - """Set the dstSubfolderSpec and dstPath properties from path. - - path may be specified in the same notation used for XCHierarchicalElements, - specifically, "$(DIR)/path". - """ - - path_tree_match = self.path_tree_re.search(path) - if path_tree_match: - # Everything else needs to be relative to an Xcode variable. - path_tree = path_tree_match.group(1) - relative_path = path_tree_match.group(3) - - if path_tree in self.path_tree_to_subfolder: - subfolder = self.path_tree_to_subfolder[path_tree] - if relative_path == None: - relative_path = '' - else: - # The path starts with an unrecognized Xcode variable - # name like $(SRCROOT). Xcode will still handle this - # as an "absolute path" that starts with the variable. - subfolder = 0 - relative_path = path - elif path.startswith('/'): - # Special case. Absolute paths are in dstSubfolderSpec 0. - subfolder = 0 - relative_path = path[1:] - else: - raise ValueError, 'Can\'t use path %s in a %s' % \ - (path, self.__class__.__name__) - - self._properties['dstPath'] = relative_path - self._properties['dstSubfolderSpec'] = subfolder - - -class PBXBuildRule(XCObject): - _schema = XCObject._schema.copy() - _schema.update({ - 'compilerSpec': [0, str, 0, 1], - 'filePatterns': [0, str, 0, 0], - 'fileType': [0, str, 0, 1], - 'isEditable': [0, int, 0, 1, 1], - 'outputFiles': [1, str, 0, 1, []], - 'script': [0, str, 0, 0], - }) - - def Name(self): - # Not very inspired, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.append(self._properties['fileType']) - if 'filePatterns' in self._properties: - hashables.append(self._properties['filePatterns']) - return hashables - - -class PBXContainerItemProxy(XCObject): - # When referencing an item in this project file, containerPortal is the - # PBXProject root object of this project file. When referencing an item in - # another project file, containerPortal is a PBXFileReference identifying - # the other project file. - # - # When serving as a proxy to an XCTarget (in this project file or another), - # proxyType is 1. When serving as a proxy to a PBXFileReference (in another - # project file), proxyType is 2. Type 2 is used for references to the - # producs of the other project file's targets. - # - # Xcode is weird about remoteGlobalIDString. Usually, it's printed without - # a comment, indicating that it's tracked internally simply as a string, but - # sometimes it's printed with a comment (usually when the object is initially - # created), indicating that it's tracked as a project file object at least - # sometimes. This module always tracks it as an object, but contains a hack - # to prevent it from printing the comment in the project file output. See - # _XCKVPrint. - _schema = XCObject._schema.copy() - _schema.update({ - 'containerPortal': [0, XCContainerPortal, 0, 1], - 'proxyType': [0, int, 0, 1], - 'remoteGlobalIDString': [0, XCRemoteObject, 0, 1], - 'remoteInfo': [0, str, 0, 1], - }) - - def __repr__(self): - props = self._properties - name = '%s.gyp:%s' % (props['containerPortal'].Name(), props['remoteInfo']) - return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self)) - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties['containerPortal'].Hashables()) - hashables.extend(self._properties['remoteGlobalIDString'].Hashables()) - return hashables - - -class PBXTargetDependency(XCObject): - # The "target" property accepts an XCTarget object, and obviously not - # NoneType. But XCTarget is defined below, so it can't be put into the - # schema yet. The definition of PBXTargetDependency can't be moved below - # XCTarget because XCTarget's own schema references PBXTargetDependency. - # Python doesn't deal well with this circular relationship, and doesn't have - # a real way to do forward declarations. To work around, the type of - # the "target" property is reset below, after XCTarget is defined. - # - # At least one of "name" and "target" is required. - _schema = XCObject._schema.copy() - _schema.update({ - 'name': [0, str, 0, 0], - 'target': [0, None.__class__, 0, 0], - 'targetProxy': [0, PBXContainerItemProxy, 1, 1], - }) - - def __repr__(self): - name = self._properties.get('name') or self._properties['target'].Name() - return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self)) - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties['targetProxy'].Hashables()) - return hashables - - -class PBXReferenceProxy(XCFileLikeElement): - _schema = XCFileLikeElement._schema.copy() - _schema.update({ - 'fileType': [0, str, 0, 1], - 'path': [0, str, 0, 1], - 'remoteRef': [0, PBXContainerItemProxy, 1, 1], - }) - - -class XCTarget(XCRemoteObject): - # An XCTarget is really just an XCObject, the XCRemoteObject thing is just - # to allow PBXProject to be used in the remoteGlobalIDString property of - # PBXContainerItemProxy. - # - # Setting a "name" property at instantiation may also affect "productName", - # which may in turn affect the "PRODUCT_NAME" build setting in children of - # "buildConfigurationList". See __init__ below. - _schema = XCRemoteObject._schema.copy() - _schema.update({ - 'buildConfigurationList': [0, XCConfigurationList, 1, 1, - XCConfigurationList()], - 'buildPhases': [1, XCBuildPhase, 1, 1, []], - 'dependencies': [1, PBXTargetDependency, 1, 1, []], - 'name': [0, str, 0, 1], - 'productName': [0, str, 0, 1], - }) - - def __init__(self, properties=None, id=None, parent=None, - force_extension=None): - # super - XCRemoteObject.__init__(self, properties, id, parent) - - # Set up additional defaults not expressed in the schema. If a "name" - # property was supplied, set "productName" if it is not present. Also set - # the "PRODUCT_NAME" build setting in each configuration, but only if - # the setting is not present in any build configuration. - if 'name' in self._properties: - if not 'productName' in self._properties: - self.SetProperty('productName', self._properties['name']) - - if 'productName' in self._properties: - if 'buildConfigurationList' in self._properties: - configs = self._properties['buildConfigurationList'] - if configs.HasBuildSetting('PRODUCT_NAME') == 0: - configs.SetBuildSetting('PRODUCT_NAME', - self._properties['productName']) - - def AddDependency(self, other): - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject == other_pbxproject: - # The easy case. Add a dependency to another target in the same - # project file. - container = PBXContainerItemProxy({'containerPortal': pbxproject, - 'proxyType': 1, - 'remoteGlobalIDString': other, - 'remoteInfo': other.Name()}) - dependency = PBXTargetDependency({'target': other, - 'targetProxy': container}) - self.AppendProperty('dependencies', dependency) - else: - # The hard case. Add a dependency to a target in a different project - # file. Actually, this case isn't really so hard. - other_project_ref = \ - pbxproject.AddOrGetProjectReference(other_pbxproject)[1] - container = PBXContainerItemProxy({ - 'containerPortal': other_project_ref, - 'proxyType': 1, - 'remoteGlobalIDString': other, - 'remoteInfo': other.Name(), - }) - dependency = PBXTargetDependency({'name': other.Name(), - 'targetProxy': container}) - self.AppendProperty('dependencies', dependency) - - # Proxy all of these through to the build configuration list. - - def ConfigurationNamed(self, name): - return self._properties['buildConfigurationList'].ConfigurationNamed(name) - - def DefaultConfiguration(self): - return self._properties['buildConfigurationList'].DefaultConfiguration() - - def HasBuildSetting(self, key): - return self._properties['buildConfigurationList'].HasBuildSetting(key) - - def GetBuildSetting(self, key): - return self._properties['buildConfigurationList'].GetBuildSetting(key) - - def SetBuildSetting(self, key, value): - return self._properties['buildConfigurationList'].SetBuildSetting(key, \ - value) - - def AppendBuildSetting(self, key, value): - return self._properties['buildConfigurationList'].AppendBuildSetting(key, \ - value) - - def DelBuildSetting(self, key): - return self._properties['buildConfigurationList'].DelBuildSetting(key) - - -# Redefine the type of the "target" property. See PBXTargetDependency._schema -# above. -PBXTargetDependency._schema['target'][1] = XCTarget - - -class PBXNativeTarget(XCTarget): - # buildPhases is overridden in the schema to be able to set defaults. - # - # NOTE: Contrary to most objects, it is advisable to set parent when - # constructing PBXNativeTarget. A parent of an XCTarget must be a PBXProject - # object. A parent reference is required for a PBXNativeTarget during - # construction to be able to set up the target defaults for productReference, - # because a PBXBuildFile object must be created for the target and it must - # be added to the PBXProject's mainGroup hierarchy. - _schema = XCTarget._schema.copy() - _schema.update({ - 'buildPhases': [1, XCBuildPhase, 1, 1, - [PBXSourcesBuildPhase(), PBXFrameworksBuildPhase()]], - 'buildRules': [1, PBXBuildRule, 1, 1, []], - 'productReference': [0, PBXFileReference, 0, 1], - 'productType': [0, str, 0, 1], - }) - - _product_filetypes = { - 'com.apple.product-type.application': ['wrapper.application', - '', '.app'], - 'com.apple.product-type.bundle': ['wrapper.cfbundle', - '', '.bundle'], - 'com.apple.product-type.framework': ['wrapper.framework', - '', '.framework'], - 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', - 'lib', '.dylib'], - 'com.apple.product-type.library.static': ['archive.ar', 'lib', '.a'], - 'com.apple.product-type.tool': ['compiled.mach-o.executable', - '', ''], - } - - def __init__(self, properties=None, id=None, parent=None, - force_extension=None): - # super - XCTarget.__init__(self, properties, id, parent) - - if 'productName' in self._properties and \ - 'productType' in self._properties and \ - not 'productReference' in self._properties and \ - self._properties['productType'] in self._product_filetypes: - products_group = None - pbxproject = self.PBXProjectAncestor() - if pbxproject != None: - products_group = pbxproject.ProductsGroup() - - if products_group != None: - (filetype, prefix, suffix) = \ - self._product_filetypes[self._properties['productType']] - - if force_extension is not None: - # Extension override. - suffix = '.' + force_extension - - # If it's a wrapper (bundle), set WRAPPER_EXTENSION. - if filetype.startswith('wrapper.'): - self.SetBuildSetting('WRAPPER_EXTENSION', force_extension) - - ref_props = { - 'explicitFileType': filetype, - 'includeInIndex': 0, - 'path': prefix + self._properties['productName'] + suffix, - 'sourceTree': 'BUILT_PRODUCTS_DIR', - } - file_ref = PBXFileReference(ref_props) - products_group.AppendChild(file_ref) - self.SetProperty('productReference', file_ref) - - def GetBuildPhaseByType(self, type): - if not 'buildPhases' in self._properties: - return None - - the_phase = None - for phase in self._properties['buildPhases']: - if isinstance(phase, type): - # Some phases may be present in multiples in a well-formed project file, - # but phases like PBXSourcesBuildPhase may only be present singly, and - # this function is intended as an aid to GetBuildPhaseByType. Loop - # over the entire list of phases and assert if more than one of the - # desired type is found. - assert the_phase == None - the_phase = phase - - return the_phase - - def ResourcesPhase(self): - resources_phase = self.GetBuildPhaseByType(PBXResourcesBuildPhase) - if resources_phase == None: - resources_phase = PBXResourcesBuildPhase() - - # The resources phase should come before the sources and frameworks - # phases, if any. - insert_at = len(self._properties['buildPhases']) - for index in xrange(0, len(self._properties['buildPhases'])): - phase = self._properties['buildPhases'][index] - if isinstance(phase, PBXSourcesBuildPhase) or \ - isinstance(phase, PBXFrameworksBuildPhase): - insert_at = index - break - - self._properties['buildPhases'].insert(insert_at, resources_phase) - resources_phase.parent = self - - return resources_phase - - def SourcesPhase(self): - sources_phase = self.GetBuildPhaseByType(PBXSourcesBuildPhase) - if sources_phase == None: - sources_phase = PBXSourcesBuildPhase() - self.AppendProperty('buildPhases', sources_phase) - - return sources_phase - - def FrameworksPhase(self): - frameworks_phase = self.GetBuildPhaseByType(PBXFrameworksBuildPhase) - if frameworks_phase == None: - frameworks_phase = PBXFrameworksBuildPhase() - self.AppendProperty('buildPhases', frameworks_phase) - - return frameworks_phase - - def AddDependency(self, other): - # super - XCTarget.AddDependency(self, other) - - static_library_type = 'com.apple.product-type.library.static' - shared_library_type = 'com.apple.product-type.library.dynamic' - framework_type = 'com.apple.product-type.framework' - if isinstance(other, PBXNativeTarget) and \ - 'productType' in self._properties and \ - self._properties['productType'] != static_library_type and \ - 'productType' in other._properties and \ - (other._properties['productType'] == static_library_type or \ - ((other._properties['productType'] == shared_library_type or \ - other._properties['productType'] == framework_type) and \ - ((not other.HasBuildSetting('MACH_O_TYPE')) or - other.GetBuildSetting('MACH_O_TYPE') != 'mh_bundle'))): - - file_ref = other.GetProperty('productReference') - - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject != other_pbxproject: - other_project_product_group = \ - pbxproject.AddOrGetProjectReference(other_pbxproject)[0] - file_ref = other_project_product_group.GetChildByRemoteObject(file_ref) - - self.FrameworksPhase().AppendProperty('files', - PBXBuildFile({'fileRef': file_ref})) - - -class PBXAggregateTarget(XCTarget): - pass - - -class PBXProject(XCContainerPortal): - # A PBXProject is really just an XCObject, the XCContainerPortal thing is - # just to allow PBXProject to be used in the containerPortal property of - # PBXContainerItemProxy. - """ - - Attributes: - path: "sample.xcodeproj". TODO(mark) Document me! - _other_pbxprojects: A dictionary, keyed by other PBXProject objects. Each - value is a reference to the dict in the - projectReferences list associated with the keyed - PBXProject. - """ - - _schema = XCContainerPortal._schema.copy() - _schema.update({ - 'attributes': [0, dict, 0, 0], - 'buildConfigurationList': [0, XCConfigurationList, 1, 1, - XCConfigurationList()], - 'compatibilityVersion': [0, str, 0, 1, 'Xcode 3.1'], - 'hasScannedForEncodings': [0, int, 0, 1, 1], - 'mainGroup': [0, PBXGroup, 1, 1, PBXGroup()], - 'projectDirPath': [0, str, 0, 1, ''], - 'projectReferences': [1, dict, 0, 0], - 'projectRoot': [0, str, 0, 1, ''], - 'targets': [1, XCTarget, 1, 1, []], - }) - - def __init__(self, properties=None, id=None, parent=None, path=None): - self.path = path - self._other_pbxprojects = {} - # super - return XCContainerPortal.__init__(self, properties, id, parent) - - def Name(self): - name = self.path - if name[-10:] == '.xcodeproj': - name = name[:-10] - return posixpath.basename(name) - - def Path(self): - return self.path - - def Comment(self): - return 'Project object' - - def Children(self): - # super - children = XCContainerPortal.Children(self) - - # Add children that the schema doesn't know about. Maybe there's a more - # elegant way around this, but this is the only case where we need to own - # objects in a dictionary (that is itself in a list), and three lines for - # a one-off isn't that big a deal. - if 'projectReferences' in self._properties: - for reference in self._properties['projectReferences']: - children.append(reference['ProductGroup']) - - return children - - def PBXProjectAncestor(self): - return self - - def _GroupByName(self, name): - if not 'mainGroup' in self._properties: - self.SetProperty('mainGroup', PBXGroup()) - - main_group = self._properties['mainGroup'] - group = main_group.GetChildByName(name) - if group == None: - group = PBXGroup({'name': name}) - main_group.AppendChild(group) - - return group - - # SourceGroup and ProductsGroup are created by default in Xcode's own - # templates. - def SourceGroup(self): - return self._GroupByName('Source') - - def ProductsGroup(self): - return self._GroupByName('Products') - - # IntermediatesGroup is used to collect source-like files that are generated - # by rules or script phases and are placed in intermediate directories such - # as DerivedSources. - def IntermediatesGroup(self): - return self._GroupByName('Intermediates') - - # FrameworksGroup and ProjectsGroup are top-level groups used to collect - # frameworks and projects. - def FrameworksGroup(self): - return self._GroupByName('Frameworks') - - def ProjectsGroup(self): - return self._GroupByName('Projects') - - def RootGroupForPath(self, path): - """Returns a PBXGroup child of this object to which path should be added. - - This method is intended to choose between SourceGroup and - IntermediatesGroup on the basis of whether path is present in a source - directory or an intermediates directory. For the purposes of this - determination, any path located within a derived file directory such as - PROJECT_DERIVED_FILE_DIR is treated as being in an intermediates - directory. - - The returned value is a two-element tuple. The first element is the - PBXGroup, and the second element specifies whether that group should be - organized hierarchically (True) or as a single flat list (False). - """ - - # TODO(mark): make this a class variable and bind to self on call? - # Also, this list is nowhere near exhaustive. - # INTERMEDIATE_DIR and SHARED_INTERMEDIATE_DIR are used by - # gyp.generator.xcode. There should probably be some way for that module - # to push the names in, rather than having to hard-code them here. - source_tree_groups = { - 'DERIVED_FILE_DIR': (self.IntermediatesGroup, True), - 'INTERMEDIATE_DIR': (self.IntermediatesGroup, True), - 'PROJECT_DERIVED_FILE_DIR': (self.IntermediatesGroup, True), - 'SHARED_INTERMEDIATE_DIR': (self.IntermediatesGroup, True), - } - - (source_tree, path) = SourceTreeAndPathFromPath(path) - if source_tree != None and source_tree in source_tree_groups: - (group_func, hierarchical) = source_tree_groups[source_tree] - group = group_func() - return (group, hierarchical) - - # TODO(mark): make additional choices based on file extension. - - return (self.SourceGroup(), True) - - def AddOrGetFileInRootGroup(self, path): - """Returns a PBXFileReference corresponding to path in the correct group - according to RootGroupForPath's heuristics. - - If an existing PBXFileReference for path exists, it will be returned. - Otherwise, one will be created and returned. - """ - - (group, hierarchical) = self.RootGroupForPath(path) - return group.AddOrGetFileByPath(path, hierarchical) - - def RootGroupsTakeOverOnlyChildren(self, recurse=False): - """Calls TakeOverOnlyChild for all groups in the main group.""" - - for group in self._properties['mainGroup']._properties['children']: - if isinstance(group, PBXGroup): - group.TakeOverOnlyChild(recurse) - - def SortGroups(self): - # Sort the children of the mainGroup (like "Source" and "Products") - # according to their defined order. - self._properties['mainGroup']._properties['children'] = \ - sorted(self._properties['mainGroup']._properties['children'], - cmp=lambda x,y: x.CompareRootGroup(y)) - - # Sort everything else by putting group before files, and going - # alphabetically by name within sections of groups and files. SortGroup - # is recursive. - for group in self._properties['mainGroup']._properties['children']: - if not isinstance(group, PBXGroup): - continue - - if group.Name() == 'Products': - # The Products group is a special case. Instead of sorting - # alphabetically, sort things in the order of the targets that - # produce the products. To do this, just build up a new list of - # products based on the targets. - products = [] - for target in self._properties['targets']: - if not isinstance(target, PBXNativeTarget): - continue - product = target._properties['productReference'] - # Make sure that the product is already in the products group. - assert product in group._properties['children'] - products.append(product) - - # Make sure that this process doesn't miss anything that was already - # in the products group. - assert len(products) == len(group._properties['children']) - group._properties['children'] = products - else: - group.SortGroup() - - def AddOrGetProjectReference(self, other_pbxproject): - """Add a reference to another project file (via PBXProject object) to this - one. - - Returns [ProductGroup, ProjectRef]. ProductGroup is a PBXGroup object in - this project file that contains a PBXReferenceProxy object for each - product of each PBXNativeTarget in the other project file. ProjectRef is - a PBXFileReference to the other project file. - - If this project file already references the other project file, the - existing ProductGroup and ProjectRef are returned. The ProductGroup will - still be updated if necessary. - """ - - if not 'projectReferences' in self._properties: - self._properties['projectReferences'] = [] - - product_group = None - project_ref = None - - if not other_pbxproject in self._other_pbxprojects: - # This project file isn't yet linked to the other one. Establish the - # link. - product_group = PBXGroup({'name': 'Products'}) - - # ProductGroup is strong. - product_group.parent = self - - # There's nothing unique about this PBXGroup, and if left alone, it will - # wind up with the same set of hashables as all other PBXGroup objects - # owned by the projectReferences list. Add the hashables of the - # remote PBXProject that it's related to. - product_group._hashables.extend(other_pbxproject.Hashables()) - - # The other project reports its path as relative to the same directory - # that this project's path is relative to. The other project's path - # is not necessarily already relative to this project. Figure out the - # pathname that this project needs to use to refer to the other one. - this_path = posixpath.dirname(self.Path()) - projectDirPath = self.GetProperty('projectDirPath') - if projectDirPath: - if posixpath.isabs(projectDirPath[0]): - this_path = projectDirPath - else: - this_path = posixpath.join(this_path, projectDirPath) - other_path = gyp.common.RelativePath(other_pbxproject.Path(), this_path) - - # ProjectRef is weak (it's owned by the mainGroup hierarchy). - project_ref = PBXFileReference({ - 'lastKnownFileType': 'wrapper.pb-project', - 'path': other_path, - 'sourceTree': 'SOURCE_ROOT', - }) - self.ProjectsGroup().AppendChild(project_ref) - - ref_dict = {'ProductGroup': product_group, 'ProjectRef': project_ref} - self._other_pbxprojects[other_pbxproject] = ref_dict - self.AppendProperty('projectReferences', ref_dict) - - # Xcode seems to sort this list by the name of the linked project. - self._properties['projectReferences'] = \ - sorted(self._properties['projectReferences'], cmp=lambda x,y: - cmp(x['ProjectRef'].Name(), y['ProjectRef'].Name())) - else: - # The link already exists. Pull out the relevnt data. - project_ref_dict = self._other_pbxprojects[other_pbxproject] - product_group = project_ref_dict['ProductGroup'] - project_ref = project_ref_dict['ProjectRef'] - - self._SetUpProductReferences(other_pbxproject, product_group, project_ref) - - return [product_group, project_ref] - - def _SetUpProductReferences(self, other_pbxproject, product_group, - project_ref): - # TODO(mark): This only adds references to products in other_pbxproject - # when they don't exist in this pbxproject. Perhaps it should also - # remove references from this pbxproject that are no longer present in - # other_pbxproject. Perhaps it should update various properties if they - # change. - for target in other_pbxproject._properties['targets']: - if not isinstance(target, PBXNativeTarget): - continue - - other_fileref = target._properties['productReference'] - if product_group.GetChildByRemoteObject(other_fileref) == None: - # Xcode sets remoteInfo to the name of the target and not the name - # of its product, despite this proxy being a reference to the product. - container_item = PBXContainerItemProxy({ - 'containerPortal': project_ref, - 'proxyType': 2, - 'remoteGlobalIDString': other_fileref, - 'remoteInfo': target.Name() - }) - # TODO(mark): Does sourceTree get copied straight over from the other - # project? Can the other project ever have lastKnownFileType here - # instead of explicitFileType? (Use it if so?) Can path ever be - # unset? (I don't think so.) Can other_fileref have name set, and - # does it impact the PBXReferenceProxy if so? These are the questions - # that perhaps will be answered one day. - reference_proxy = PBXReferenceProxy({ - 'fileType': other_fileref._properties['explicitFileType'], - 'path': other_fileref._properties['path'], - 'sourceTree': other_fileref._properties['sourceTree'], - 'remoteRef': container_item, - }) - - product_group.AppendChild(reference_proxy) - - def SortRemoteProductReferences(self): - # For each remote project file, sort the associated ProductGroup in the - # same order that the targets are sorted in the remote project file. This - # is the sort order used by Xcode. - - def CompareProducts(x, y, remote_products): - # x and y are PBXReferenceProxy objects. Go through their associated - # PBXContainerItem to get the remote PBXFileReference, which will be - # present in the remote_products list. - x_remote = x._properties['remoteRef']._properties['remoteGlobalIDString'] - y_remote = y._properties['remoteRef']._properties['remoteGlobalIDString'] - x_index = remote_products.index(x_remote) - y_index = remote_products.index(y_remote) - - # Use the order of each remote PBXFileReference in remote_products to - # determine the sort order. - return cmp(x_index, y_index) - - for other_pbxproject, ref_dict in self._other_pbxprojects.iteritems(): - # Build up a list of products in the remote project file, ordered the - # same as the targets that produce them. - remote_products = [] - for target in other_pbxproject._properties['targets']: - if not isinstance(target, PBXNativeTarget): - continue - remote_products.append(target._properties['productReference']) - - # Sort the PBXReferenceProxy children according to the list of remote - # products. - product_group = ref_dict['ProductGroup'] - product_group._properties['children'] = sorted( - product_group._properties['children'], - cmp=lambda x, y: CompareProducts(x, y, remote_products)) - - -class XCProjectFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update({ - 'archiveVersion': [0, int, 0, 1, 1], - 'classes': [0, dict, 0, 1, {}], - 'objectVersion': [0, int, 0, 1, 45], - 'rootObject': [0, PBXProject, 1, 1], - }) - - def ComputeIDs(self, recursive=True, overwrite=True, hash=None): - # Although XCProjectFile is implemented here as an XCObject, it's not a - # proper object in the Xcode sense, and it certainly doesn't have its own - # ID. Pass through an attempt to update IDs to the real root object. - if recursive: - self._properties['rootObject'].ComputeIDs(recursive, overwrite, hash) - - def Print(self, file=sys.stdout): - self.VerifyHasRequiredProperties() - - # Add the special "objects" property, which will be caught and handled - # separately during printing. This structure allows a fairly standard - # loop do the normal printing. - self._properties['objects'] = {} - self._XCPrint(file, 0, '// !$*UTF8*$!\n') - if self._should_print_single_line: - self._XCPrint(file, 0, '{ ') - else: - self._XCPrint(file, 0, '{\n') - for property, value in sorted(self._properties.iteritems(), - cmp=lambda x, y: cmp(x, y)): - if property == 'objects': - self._PrintObjects(file) - else: - self._XCKVPrint(file, 1, property, value) - self._XCPrint(file, 0, '}\n') - del self._properties['objects'] - - def _PrintObjects(self, file): - if self._should_print_single_line: - self._XCPrint(file, 0, 'objects = {') - else: - self._XCPrint(file, 1, 'objects = {\n') - - objects_by_class = {} - for object in self.Descendants(): - if object == self: - continue - class_name = object.__class__.__name__ - if not class_name in objects_by_class: - objects_by_class[class_name] = [] - objects_by_class[class_name].append(object) - - for class_name in sorted(objects_by_class): - self._XCPrint(file, 0, '\n') - self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') - for object in sorted(objects_by_class[class_name], - cmp=lambda x, y: cmp(x.id, y.id)): - object.Print(file) - self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') - - if self._should_print_single_line: - self._XCPrint(file, 0, '}; ') - else: - self._XCPrint(file, 1, '};\n') diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples deleted file mode 100755 index 804b6189..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os.path -import shutil -import sys - - -gyps = [ - 'app/app.gyp', - 'base/base.gyp', - 'build/temp_gyp/googleurl.gyp', - 'build/all.gyp', - 'build/common.gypi', - 'build/external_code.gypi', - 'chrome/test/security_tests/security_tests.gyp', - 'chrome/third_party/hunspell/hunspell.gyp', - 'chrome/chrome.gyp', - 'media/media.gyp', - 'net/net.gyp', - 'printing/printing.gyp', - 'sdch/sdch.gyp', - 'skia/skia.gyp', - 'testing/gmock.gyp', - 'testing/gtest.gyp', - 'third_party/bzip2/bzip2.gyp', - 'third_party/icu38/icu38.gyp', - 'third_party/libevent/libevent.gyp', - 'third_party/libjpeg/libjpeg.gyp', - 'third_party/libpng/libpng.gyp', - 'third_party/libxml/libxml.gyp', - 'third_party/libxslt/libxslt.gyp', - 'third_party/lzma_sdk/lzma_sdk.gyp', - 'third_party/modp_b64/modp_b64.gyp', - 'third_party/npapi/npapi.gyp', - 'third_party/sqlite/sqlite.gyp', - 'third_party/zlib/zlib.gyp', - 'v8/tools/gyp/v8.gyp', - 'webkit/activex_shim/activex_shim.gyp', - 'webkit/activex_shim_dll/activex_shim_dll.gyp', - 'webkit/build/action_csspropertynames.py', - 'webkit/build/action_cssvaluekeywords.py', - 'webkit/build/action_jsconfig.py', - 'webkit/build/action_makenames.py', - 'webkit/build/action_maketokenizer.py', - 'webkit/build/action_useragentstylesheets.py', - 'webkit/build/rule_binding.py', - 'webkit/build/rule_bison.py', - 'webkit/build/rule_gperf.py', - 'webkit/tools/test_shell/test_shell.gyp', - 'webkit/webkit.gyp', -] - - -def Main(argv): - if len(argv) != 3 or argv[1] not in ['push', 'pull']: - print 'Usage: %s push/pull PATH_TO_CHROME' % argv[0] - return 1 - - path_to_chrome = argv[2] - - for g in gyps: - chrome_file = os.path.join(path_to_chrome, g) - local_file = os.path.join(os.path.dirname(argv[0]), os.path.split(g)[1]) - if argv[1] == 'push': - print 'Copying %s to %s' % (local_file, chrome_file) - shutil.copyfile(local_file, chrome_file) - elif argv[1] == 'pull': - print 'Copying %s to %s' % (chrome_file, local_file) - shutil.copyfile(chrome_file, local_file) - else: - assert False - - return 0 - - -if __name__ == '__main__': - sys.exit(Main(sys.argv)) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples.bat b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples.bat deleted file mode 100644 index 778d9c90..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/samples/samples.bat +++ /dev/null @@ -1,5 +0,0 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python %~dp0/samples %* diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/gyptest-bare.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/gyptest-bare.py deleted file mode 100644 index b0c10938..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/gyptest-bare.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies actions which are not depended on by other targets get executed. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('bare.gyp', chdir='src') -test.relocate('src', 'relocate/src') -test.build('bare.gyp', chdir='relocate/src') - -file_content = 'Hello from bare.py\n' - -test.built_file_must_match('out.txt', file_content, chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.gyp deleted file mode 100644 index 3d28f099..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.gyp +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'bare', - 'type': 'none', - 'actions': [ - { - 'action_name': 'action1', - 'inputs': [ - 'bare.py', - ], - 'outputs': [ - '<(PRODUCT_DIR)/out.txt', - ], - 'action': ['python', 'bare.py', '<(PRODUCT_DIR)/out.txt'], - 'msvs_cygwin_shell': 0, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.py deleted file mode 100644 index 970450ea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-bare/src/bare.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -f = open(sys.argv[1], 'wb') -f.write('Hello from bare.py\n') -f.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/gyptest-action.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/gyptest-action.py deleted file mode 100644 index 09cfef18..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/gyptest-action.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Test actions that output to PRODUCT_DIR. -""" - -import TestGyp - -# TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=88 -test = TestGyp.TestGyp(formats=['!xcode']) - -test.run_gyp('none.gyp', chdir='src') - -test.build('none.gyp', test.ALL, chdir='src') - -file_content = 'Hello from make-file.py\n' -subdir_file_content = 'Hello from make-subdir-file.py\n' - -test.built_file_must_match('file.out', file_content, chdir='src') -test.built_file_must_match('subdir_file.out', subdir_file_content, chdir='src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/make-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/make-file.py deleted file mode 100644 index 74e55811..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/make-file.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = 'Hello from make-file.py\n' - -open(sys.argv[1], 'wb').write(contents) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/none.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/none.gyp deleted file mode 100644 index 23f8d25a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/none.gyp +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'file', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'actions': [ - { - 'action_name': 'make-file', - 'inputs': [ - 'make-file.py', - ], - 'outputs': [ - '<(PRODUCT_DIR)/file.out', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - } - ], - 'dependencies': [ - 'subdir/subdir.gyp:subdir_file', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/make-subdir-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/make-subdir-file.py deleted file mode 100644 index 80ce19ae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/make-subdir-file.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = 'Hello from make-subdir-file.py\n' - -open(sys.argv[1], 'wb').write(contents) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/subdir.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/subdir.gyp deleted file mode 100644 index 0315d4eb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions-subdir/src/subdir/subdir.gyp +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'subdir_file', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'actions': [ - { - 'action_name': 'make-subdir-file', - 'inputs': [ - 'make-subdir-file.py', - ], - 'outputs': [ - '<(PRODUCT_DIR)/subdir_file.out', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - } - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-all.py deleted file mode 100644 index da0f68ae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-all.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple actions when using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('actions.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('actions.gyp', test.ALL, chdir='relocate/src') - - -expect = """\ -Hello from program.c -Hello from make-prog1.py -Hello from make-prog2.py -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir1' -else: - chdir = 'relocate/src' -test.run_built_executable('program', chdir=chdir, stdout=expect) - - -test.must_match('relocate/src/subdir2/file.out', "Hello from make-file.py\n") - - -expect = "Hello from generate_main.py\n" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir3' -else: - chdir = 'relocate/src' -test.run_built_executable('null_input', chdir=chdir, stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-default.py deleted file mode 100644 index 8842ab49..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-default.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple actions when using the default build target. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('actions.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('actions.gyp', chdir='relocate/src') - - -expect = """\ -Hello from program.c -Hello from make-prog1.py -Hello from make-prog2.py -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir1' -else: - chdir = 'relocate/src' -test.run_built_executable('program', chdir=chdir, stdout=expect) - - -test.must_match('relocate/src/subdir2/file.out', "Hello from make-file.py\n") - - -expect = "Hello from generate_main.py\n" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir3' -else: - chdir = 'relocate/src' -test.run_built_executable('null_input', chdir=chdir, stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-errors.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-errors.py deleted file mode 100644 index ca41487b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/gyptest-errors.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies behavior for different action configuration errors: -exit status of 1, and the expected error message must be in stderr. -""" - -import TestGyp - -test = TestGyp.TestGyp() - - -test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None) -expect = [ - "Anonymous action in target broken_actions2. An action must have an 'action_name' field.", -] -test.must_contain_all_lines(test.stderr(), expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/action_missing_name.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/action_missing_name.gyp deleted file mode 100644 index 00424c35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/action_missing_name.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'broken_actions2', - 'type': 'none', - 'actions': [ - { - 'inputs': [ - 'no_name.input', - ], - 'action': [ - 'python', - '-c', - 'print \'missing name\'', - ], - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/actions.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/actions.gyp deleted file mode 100644 index 9e3fd141..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/actions.gyp +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'pull_in_all_actions', - 'type': 'none', - 'dependencies': [ - 'subdir1/executable.gyp:*', - 'subdir2/none.gyp:*', - 'subdir3/null_input.gyp:*', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/executable.gyp deleted file mode 100644 index 6bdd60a1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/executable.gyp +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'program.c', - ], - 'actions': [ - { - 'action_name': 'make-prog1', - 'inputs': [ - 'make-prog1.py', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/prog1.c', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - { - 'action_name': 'make-prog2', - 'inputs': [ - 'make-prog2.py', - ], - 'outputs': [ - 'actions-out/prog2.c', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog1.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog1.py deleted file mode 100644 index 7ea1d8a2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog1.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = r""" -#include - -void prog1(void) -{ - printf("Hello from make-prog1.py\n"); -} -""" - -open(sys.argv[1], 'w').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog2.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog2.py deleted file mode 100644 index 0bfe4973..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/make-prog2.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = r""" -#include - -void prog2(void) -{ - printf("Hello from make-prog2.py\n"); -} -""" - -open(sys.argv[1], 'w').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/program.c deleted file mode 100644 index d5f661d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir1/program.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern void prog1(void); -extern void prog2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - prog1(); - prog2(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/make-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/make-file.py deleted file mode 100644 index fff06531..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/make-file.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = "Hello from make-file.py\n" - -open(sys.argv[1], 'wb').write(contents) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/none.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/none.gyp deleted file mode 100644 index fbf8ff47..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir2/none.gyp +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'file', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'actions': [ - { - 'action_name': 'make-file', - 'inputs': [ - 'make-file.py', - ], - 'outputs': [ - 'file.out', - # TODO: enhance testing infrastructure to test this - # without having to hard-code the intermediate dir paths. - #'<(INTERMEDIATE_DIR)/file.out', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - } - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/generate_main.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/generate_main.py deleted file mode 100644 index b90b3aa6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/generate_main.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = """ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from generate_main.py\\n"); - return 0; -} -""" - -open(sys.argv[1], 'w').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/null_input.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/null_input.gyp deleted file mode 100644 index bae2c845..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/actions/src/subdir3/null_input.gyp +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'null_input', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'actions': [ - { - 'action_name': 'generate_main', - 'process_outputs_as_sources': 1, - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/main.c', - ], - 'action': [ - # TODO: we can't just use <(_outputs) here?! - 'python', 'generate_main.py', '<(INTERMEDIATE_DIR)/main.c', - ], - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/gyptest-additional.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/gyptest-additional.py deleted file mode 100644 index f1e22684..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/gyptest-additional.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple actions when using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('all.gyp', chdir='src') -test.relocate('src', 'relocate/src') - -# Build all. -test.build('all.gyp', chdir='relocate/src') - -if test.format=='xcode': - chdir = 'relocate/src/dir1' -else: - chdir = 'relocate/src' - -# Output is as expected. -file_content = 'Hello from emit.py\n' -test.built_file_must_match('out2.txt', file_content, chdir=chdir) - -test.built_file_must_not_exist('out.txt', chdir='relocate/src') -test.built_file_must_not_exist('lib1.dll', chdir='relocate/src') - -# TODO(mmoss) Make consistent with scons, with 'dir1' before 'out/Default'? -if test.format == 'make': - chdir='relocate/src' -else: - chdir='relocate/src/dir1' - -# Build the action explicitly. -test.build('actions.gyp', 'action1_target', chdir=chdir) - -# Check that things got run. -file_content = 'Hello from emit.py\n' -test.built_file_must_exist('out.txt', chdir=chdir) - -# Build the shared library explicitly. -test.build('actions.gyp', 'foolib1', chdir=chdir) - -if test.format == 'make': - # TODO(mmoss) Make consistent with scons, with 'dir1' before 'out/Default'? - test.must_exist('relocate/src/out/Default/lib.target/dir1/' - + test.dll_ + 'foolib1' + test._dll) -else: - test.built_file_must_exist('foolib1', - type=test.SHARED_LIB, - chdir=chdir) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/all.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/all.gyp deleted file mode 100644 index 21c83080..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/all.gyp +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'all_targets', - 'type': 'none', - 'dependencies': ['dir1/actions.gyp:*'], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/actions.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/actions.gyp deleted file mode 100644 index 5089c809..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/actions.gyp +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'action1_target', - 'type': 'none', - 'suppress_wildcard': 1, - 'actions': [ - { - 'action_name': 'action1', - 'inputs': [ - 'emit.py', - ], - 'outputs': [ - '<(PRODUCT_DIR)/out.txt', - ], - 'action': ['python', 'emit.py', '<(PRODUCT_DIR)/out.txt'], - 'msvs_cygwin_shell': 0, - }, - ], - }, - { - 'target_name': 'action2_target', - 'type': 'none', - 'actions': [ - { - 'action_name': 'action2', - 'inputs': [ - 'emit.py', - ], - 'outputs': [ - '<(PRODUCT_DIR)/out2.txt', - ], - 'action': ['python', 'emit.py', '<(PRODUCT_DIR)/out2.txt'], - 'msvs_cygwin_shell': 0, - }, - ], - }, - { - 'target_name': 'foolib1', - 'type': 'shared_library', - 'suppress_wildcard': 1, - 'sources': ['lib1.c'], - }, - ], - 'conditions': [ - ['OS=="linux"', { - 'target_defaults': { - 'cflags': ['-fPIC'], - }, - }], - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/emit.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/emit.py deleted file mode 100644 index 5638c43b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/emit.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -f = open(sys.argv[1], 'wb') -f.write('Hello from emit.py\n') -f.close() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/lib1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/lib1.c deleted file mode 100644 index df4cb10f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/additional-targets/src/dir1/lib1.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef _WIN32 -__declspec(dllexport) -#endif -int func1(void) { - return 42; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/gyptest-assembly.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/gyptest-assembly.py deleted file mode 100644 index 40d0a062..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/gyptest-assembly.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that .hpp files are ignored when included in the source list on all -platforms. -""" - -import sys -import TestGyp - -# TODO(bradnelson): get this working for windows. -test = TestGyp.TestGyp(formats=['make', 'scons', 'xcode']) - -test.run_gyp('assembly.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('assembly.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from program.c -Got 42. -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/as.bat b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/as.bat deleted file mode 100644 index 0a47382c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/as.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -:: Mock windows assembler. -cl /c %1 /Fo"%2" - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/assembly.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/assembly.gyp deleted file mode 100644 index 872dd5ec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/assembly.gyp +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'conditions': [ - ['OS=="win"', { - 'defines': ['PLATFORM_WIN'], - }], - ['OS=="mac"', { - 'defines': ['PLATFORM_MAC'], - }], - ['OS=="linux"', { - 'defines': ['PLATFORM_LINUX'], - }], - ], - }, - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'dependencies': ['lib1'], - 'sources': [ - 'program.c', - ], - }, - { - 'target_name': 'lib1', - 'type': 'static_library', - 'sources': [ - 'lib1.S', - ], - }, - ], - 'conditions': [ - ['OS=="win"', { - 'target_defaults': { - 'rules': [ - { - 'rule_name': 'assembler', - 'msvs_cygwin_shell': 0, - 'extension': 'S', - 'inputs': [ - 'as.bat', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': - ['as.bat', 'lib1.c', '<(_outputs)'], - 'message': 'Building assembly file <(RULE_INPUT_PATH)', - 'process_outputs_as_sources': 1, - }, - ], - }, - },], - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.S b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.S deleted file mode 100644 index e7102bf2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.S +++ /dev/null @@ -1,10 +0,0 @@ -#if PLATFORM_WINDOWS || PLATFORM_MAC -# define IDENTIFIER(n) _##n -#else /* Linux */ -# define IDENTIFIER(n) n -#endif - -.globl IDENTIFIER(lib1_function) -IDENTIFIER(lib1_function): - movl $42, %eax - ret diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.c deleted file mode 100644 index be21ecd5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/lib1.c +++ /dev/null @@ -1,3 +0,0 @@ -int lib1_function(void) { - return 42; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/program.c deleted file mode 100644 index ecce3b0b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/assembly/src/program.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern int lib1_function(void); - -int main(int argc, char *argv[]) -{ - fprintf(stdout, "Hello from program.c\n"); - fflush(stdout); - fprintf(stdout, "Got %d.\n", lib1_function()); - fflush(stdout); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-all.py deleted file mode 100644 index 324d7fc7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-all.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verify the settings that cause a set of programs to be created in -a specific build directory, and that no intermediate built files -get created outside of that build directory hierarchy even when -referred to with deeply-nested ../../.. paths. -""" - -import TestGyp - -# TODO(mmoss): Make only supports (theoretically) a single, global build -# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than -# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other -# generators support, so this doesn't work yet for make. -# TODO(mmoss) Make also has the issue that the top-level Makefile is written to -# the "--depth" location, which is one level above 'src', but then this test -# moves 'src' somewhere else, leaving the Makefile behind, so make can't find -# its sources. I'm not sure if make is wrong for writing outside the current -# directory, or if the test is wrong for assuming everything generated is under -# the current directory. -test = TestGyp.TestGyp(formats=['!make']) - -test.run_gyp('prog1.gyp', '--depth=..', chdir='src') - -test.relocate('src', 'relocate/src') - -test.subdir('relocate/builddir') - -# Make sure that all the built ../../etc. files only get put under builddir, -# by making all of relocate read-only and then making only builddir writable. -test.writable('relocate', False) -test.writable('relocate/builddir', True) - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', test.ALL, SYMROOT=None, chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello from func1.c -""" - -expect2 = """\ -Hello from subdir2/prog2.c -Hello from func2.c -""" - -expect3 = """\ -Hello from subdir2/subdir3/prog3.c -Hello from func3.c -""" - -expect4 = """\ -Hello from subdir2/subdir3/subdir4/prog4.c -Hello from func4.c -""" - -expect5 = """\ -Hello from subdir2/subdir3/subdir4/subdir5/prog5.c -Hello from func5.c -""" - -def run_builddir(prog, expect): - dir = 'relocate/builddir/Default/' - test.run(program=test.workpath(dir + prog), stdout=expect) - -run_builddir('prog1', expect1) -run_builddir('prog2', expect2) -run_builddir('prog3', expect3) -run_builddir('prog4', expect4) -run_builddir('prog5', expect5) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-default.py deleted file mode 100644 index 6171d159..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/gyptest-default.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verify the settings that cause a set of programs to be created in -a specific build directory, and that no intermediate built files -get created outside of that build directory hierarchy even when -referred to with deeply-nested ../../.. paths. -""" - -import TestGyp - -# TODO(mmoss): Make only supports (theoretically) a single, global build -# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than -# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other -# generators support, so this doesn't work yet for make. -# TODO(mmoss) Make also has the issue that the top-level Makefile is written to -# the "--depth" location, which is one level above 'src', but then this test -# moves 'src' somewhere else, leaving the Makefile behind, so make can't find -# its sources. I'm not sure if make is wrong for writing outside the current -# directory, or if the test is wrong for assuming everything generated is under -# the current directory. -test = TestGyp.TestGyp(formats=['!make']) - -test.run_gyp('prog1.gyp', '--depth=..', chdir='src') - -test.relocate('src', 'relocate/src') - -test.subdir('relocate/builddir') - -# Make sure that all the built ../../etc. files only get put under builddir, -# by making all of relocate read-only and then making only builddir writable. -test.writable('relocate', False) -test.writable('relocate/builddir', True) - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello from func1.c -""" - -expect2 = """\ -Hello from subdir2/prog2.c -Hello from func2.c -""" - -expect3 = """\ -Hello from subdir2/subdir3/prog3.c -Hello from func3.c -""" - -expect4 = """\ -Hello from subdir2/subdir3/subdir4/prog4.c -Hello from func4.c -""" - -expect5 = """\ -Hello from subdir2/subdir3/subdir4/subdir5/prog5.c -Hello from func5.c -""" - -def run_builddir(prog, expect): - dir = 'relocate/builddir/Default/' - test.run(program=test.workpath(dir + prog), stdout=expect) - -run_builddir('prog1', expect1) -run_builddir('prog2', expect2) -run_builddir('prog3', expect3) -run_builddir('prog4', expect4) -run_builddir('prog5', expect5) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/builddir.gypi b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/builddir.gypi deleted file mode 100644 index e3c61475..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/builddir.gypi +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'configurations': { - 'Default': { - 'msvs_configuration_attributes': { - 'OutputDirectory': '<(DEPTH)\\builddir\Default', - }, - }, - }, - }, - 'scons_settings': { - 'sconsbuild_dir': '<(DEPTH)/builddir', - }, - 'xcode_settings': { - 'SYMROOT': '<(DEPTH)/builddir', - }, -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func1.c deleted file mode 100644 index b8e6a069..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func1.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func1(void) -{ - printf("Hello from func1.c\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func2.c deleted file mode 100644 index 14aabac4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func2.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func2(void) -{ - printf("Hello from func2.c\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func3.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func3.c deleted file mode 100644 index 3b4edeae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func3.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func3(void) -{ - printf("Hello from func3.c\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func4.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func4.c deleted file mode 100644 index 732891b7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func4.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func4(void) -{ - printf("Hello from func4.c\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func5.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func5.c deleted file mode 100644 index 18fdfabb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/func5.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func5(void) -{ - printf("Hello from func5.c\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.c deleted file mode 100644 index 674ca747..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void func1(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from prog1.c\n"); - func1(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.gyp deleted file mode 100644 index 5b96f035..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/prog1.gyp +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - 'builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'pull_in_all', - 'type': 'none', - 'dependencies': [ - 'prog1', - 'subdir2/prog2.gyp:prog2', - 'subdir2/subdir3/prog3.gyp:prog3', - 'subdir2/subdir3/subdir4/prog4.gyp:prog4', - 'subdir2/subdir3/subdir4/subdir5/prog5.gyp:prog5', - ], - }, - { - 'target_name': 'prog1', - 'type': 'executable', - 'sources': [ - 'prog1.c', - 'func1.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.c deleted file mode 100644 index bbdf4f06..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void func2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from subdir2/prog2.c\n"); - func2(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.gyp deleted file mode 100644 index 96299b64..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/prog2.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog2', - 'type': 'executable', - 'sources': [ - 'prog2.c', - '../func2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.c deleted file mode 100644 index 10c530b2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void func3(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from subdir2/subdir3/prog3.c\n"); - func3(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp deleted file mode 100644 index d7df43c7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/prog3.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog3', - 'type': 'executable', - 'sources': [ - 'prog3.c', - '../../func3.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c deleted file mode 100644 index dcba9a9d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void func4(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from subdir2/subdir3/subdir4/prog4.c\n"); - func4(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp deleted file mode 100644 index 862a8a18..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/prog4.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog4', - 'type': 'executable', - 'sources': [ - 'prog4.c', - '../../../func4.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c deleted file mode 100644 index 69132e57..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void func5(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n"); - func5(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp deleted file mode 100644 index fe1c9cbf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../../../../builddir.gypi', - ], - 'targets': [ - { - 'target_name': 'prog5', - 'type': 'executable', - 'sources': [ - 'prog5.c', - '../../../../func5.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/gyptest-headers.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/gyptest-headers.py deleted file mode 100644 index 91760216..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/gyptest-headers.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that .hpp files are ignored when included in the source list on all -platforms. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('headers.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('headers.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from program.c -Hello from lib1.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/headers.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/headers.gyp deleted file mode 100644 index b6c2a885..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/headers.gyp +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'dependencies': [ - 'lib1' - ], - 'sources': [ - 'program.cpp', - ], - }, - { - 'target_name': 'lib1', - 'type': 'static_library', - 'sources': [ - 'lib1.hpp', - 'lib1.cpp', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.cpp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.cpp deleted file mode 100644 index 51bc31a4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "lib1.hpp" - -void lib1_function(void) { - fprintf(stdout, "Hello from lib1.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.hpp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.hpp deleted file mode 100644 index 72e63e8a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/lib1.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _lib1_hpp -#define _lib1_hpp - -extern void lib1_function(void); - -#endif diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/program.cpp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/program.cpp deleted file mode 100644 index 81420bad..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/compilable/src/program.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "lib1.hpp" - -int main(int argc, char *argv[]) { - fprintf(stdout, "Hello from program.c\n"); - fflush(stdout); - lib1_function(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.c deleted file mode 100644 index 6c1f9001..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ -#ifdef FOO - printf("Foo configuration\n"); -#endif -#ifdef DEBUG - printf("Debug configuration\n"); -#endif -#ifdef RELEASE - printf("Release configuration\n"); -#endif - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.gyp deleted file mode 100644 index 93f1d8d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/configurations.gyp +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - 'configurations': { - 'Debug': { - 'defines': [ - 'DEBUG', - ], - }, - 'Release': { - 'defines': [ - 'RELEASE', - ], - }, - 'Foo': { - 'defines': [ - 'FOO', - ], - }, - } - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/gyptest-configurations.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/gyptest-configurations.py deleted file mode 100644 index 27cd2e87..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/basics/gyptest-configurations.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('configurations.gyp') - -test.set_configuration('Release') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Release configuration\n") - -test.set_configuration('Debug') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Debug configuration\n") - -test.set_configuration('Foo') -test.build('configurations.gyp') -test.run_built_executable('configurations', stdout="Foo configuration\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.c deleted file mode 100644 index 2d5565ee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ -#ifdef BASE - printf("Base configuration\n"); -#endif -#ifdef COMMON - printf("Common configuration\n"); -#endif -#ifdef COMMON2 - printf("Common2 configuration\n"); -#endif -#ifdef DEBUG - printf("Debug configuration\n"); -#endif -#ifdef RELEASE - printf("Release configuration\n"); -#endif - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.gyp deleted file mode 100644 index 9441376b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/configurations.gyp +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'configurations': { - 'Base': { - 'abstract': 1, - 'defines': ['BASE'], - }, - 'Common': { - 'abstract': 1, - 'inherit_from': ['Base'], - 'defines': ['COMMON'], - }, - 'Common2': { - 'abstract': 1, - 'defines': ['COMMON2'], - }, - 'Debug': { - 'inherit_from': ['Common', 'Common2'], - 'defines': ['DEBUG'], - }, - 'Release': { - 'inherit_from': ['Common', 'Common2'], - 'defines': ['RELEASE'], - }, - }, - }, - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py deleted file mode 100644 index 22c73a37..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('configurations.gyp') - -test.set_configuration('Release') -test.build('configurations.gyp') -test.run_built_executable('configurations', - stdout=('Base configuration\n' - 'Common configuration\n' - 'Common2 configuration\n' - 'Release configuration\n')) - -test.set_configuration('Debug') -test.build('configurations.gyp') -test.run_built_executable('configurations', - stdout=('Base configuration\n' - 'Common configuration\n' - 'Common2 configuration\n' - 'Debug configuration\n')) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/configurations.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/configurations.gyp deleted file mode 100644 index d15429f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/configurations.gyp +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'configurations': { - 'Debug_Win32': { - 'msvs_configuration_platform': 'Win32', - }, - 'Debug_x64': { - 'msvs_configuration_platform': 'x64', - }, - }, - }, - 'targets': [ - { - 'target_name': 'left', - 'type': 'static_library', - 'sources': [ - 'left.c', - ], - 'configurations': { - 'Debug_Win32': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - 'target_name': 'right', - 'type': 'static_library', - 'sources': [ - 'right.c', - ], - }, - { - 'target_name': 'front_left', - 'type': 'executable', - 'dependencies': ['left'], - 'sources': [ - 'front.c', - ], - 'configurations': { - 'Debug_Win32': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - 'target_name': 'front_right', - 'type': 'executable', - 'dependencies': ['right'], - 'sources': [ - 'front.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/front.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/front.c deleted file mode 100644 index 12b1d0aa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/front.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -const char *message(void); - -int main(int argc, char *argv[]) { - printf("%s\n", message()); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/gyptest-target_platform.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/gyptest-target_platform.py deleted file mode 100644 index 8da5e9f2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/gyptest-target_platform.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Tests the msvs specific msvs_target_platform option. -""" - -import TestGyp -import TestCommon - - -def RunX64(exe, stdout): - try: - test.run_built_executable(exe, stdout=stdout) - except WindowsError, e: - # Assume the exe is 64-bit if it can't load on 32-bit systems. - if e.errno != 193: - raise - - -test = TestGyp.TestGyp(formats=['msvs']) - -test.run_gyp('configurations.gyp') - -test.set_configuration('Debug|x64') -test.build('configurations.gyp', rebuild=True) -RunX64('front_left', stdout=('left\n')) -RunX64('front_right', stdout=('right\n')) - -test.set_configuration('Debug|Win32') -test.build('configurations.gyp', rebuild=True) -RunX64('front_left', stdout=('left\n')) -test.run_built_executable('front_right', stdout=('right\n')) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/left.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/left.c deleted file mode 100644 index 1ce2ea12..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/left.c +++ /dev/null @@ -1,3 +0,0 @@ -const char *message(void) { - return "left"; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/right.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/right.c deleted file mode 100644 index b1578492..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/target_platform/right.c +++ /dev/null @@ -1,3 +0,0 @@ -const char *message(void) { - return "right"; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.c deleted file mode 100644 index 72c97e31..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int main(int argc, char *argv[]) { - if (sizeof(void*) == 4) { - printf("Running Win32\n"); - } else if (sizeof(void*) == 8) { - printf("Running x64\n"); - } else { - printf("Unexpected platform\n"); - } - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.gyp deleted file mode 100644 index 06ffa375..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/configurations.gyp +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'configurations': { - 'Debug': { - 'msvs_configuration_platform': 'Win32', - }, - 'Debug_x64': { - 'inherit_from': ['Debug'], - 'msvs_configuration_platform': 'x64', - }, - }, - }, - 'targets': [ - { - 'target_name': 'configurations', - 'type': 'executable', - 'sources': [ - 'configurations.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/gyptest-x86.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/gyptest-x86.py deleted file mode 100644 index f0225e9d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/configurations/x64/gyptest-x86.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable in three different configurations. -""" - -import TestGyp - -test = TestGyp.TestGyp(formats=['msvs']) - -test.run_gyp('configurations.gyp') - -for platform in ['Win32', 'x64']: - test.set_configuration('Debug|%s' % platform) - test.build('configurations.gyp', rebuild=True) - try: - test.run_built_executable('configurations', - stdout=('Running %s\n' % platform)) - except WindowsError, e: - # Assume the exe is 64-bit if it can't load on 32-bit systems. - if platform == 'x64' and e.errno == 193: - continue - raise - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/gyptest-copies-link.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/gyptest-copies-link.py deleted file mode 100644 index fe7b6025..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/gyptest-copies-link.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies file copies using the build tool default. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('copies-link.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('copies-link.gyp', chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copies-link.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copies-link.gyp deleted file mode 100644 index 9d2530a6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copies-link.gyp +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'func1', - 'type': 'static_library', - 'sources': ['func1.c'], - }, - { - 'target_name': 'clone_func1', - 'type': 'none', - 'dependencies': ['func1'], - 'actions': [ - { - 'action_name': 'cloning library', - 'inputs': [ - '<(LIB_DIR)/<(STATIC_LIB_PREFIX)func1<(STATIC_LIB_SUFFIX)' - ], - 'outputs': ['<(PRODUCT_DIR)/alternate/' - '<(STATIC_LIB_PREFIX)cloned<(STATIC_LIB_SUFFIX)'], - 'destination': '<(PRODUCT_DIR)', - 'action': ['python', 'copy.py', '<@(_inputs)', '<@(_outputs)'], - 'msvs_cygwin_shell': 0, - }, - ], - }, - { - 'target_name': 'copy_cloned', - 'type': 'none', - 'dependencies': ['clone_func1'], - 'copies': [ - { - 'destination': '<(LIB_DIR)', - 'files': [ - '<(PRODUCT_DIR)/alternate/' - '<(STATIC_LIB_PREFIX)cloned<(STATIC_LIB_SUFFIX)', - ], - }, - ], - }, - { - 'target_name': 'use_cloned', - 'type': 'executable', - 'sources': ['main.c'], - 'dependencies': ['copy_cloned'], - 'link_settings': { - 'conditions': [ - ['OS=="win"', { - 'libraries': ['-l"<(LIB_DIR)/cloned.lib"'], - }, { - 'libraries': ['-lcloned'], - 'ldflags': ['-L <(LIB_DIR)'], - }], - ], - }, - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copy.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copy.py deleted file mode 100644 index a1dd8718..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/copy.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import shutil -import sys - - -def main(argv): - if len(argv) != 3: - print 'USAGE: copy.py ' - return 1 - - shutil.copy(argv[1], argv[2]) - return 0 - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/func1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/func1.c deleted file mode 100644 index 56fd2f04..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/func1.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -extern void func1(void); - -int main(int argc, char *argv[]) { - printf("hello from link1\n"); - func1(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/main.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/main.c deleted file mode 100644 index cceccdd6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies-link/src/main.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void func1(void) { - printf("hello from func1\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-all.py deleted file mode 100644 index 842ae504..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-all.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies file copies using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('copies.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('copies.gyp', test.ALL, chdir='relocate/src') - -test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n') - -test.built_file_must_match('copies-out/file2', - 'file2 contents\n', - chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-default.py deleted file mode 100644 index 3b904358..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/gyptest-default.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies file copies using the build tool default. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('copies.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('copies.gyp', chdir='relocate/src') - -test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n') - -test.built_file_must_match('copies-out/file2', - 'file2 contents\n', - chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/copies.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/copies.gyp deleted file mode 100644 index b66d3b45..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/copies.gyp +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'copies1', - 'type': 'none', - 'copies': [ - { - 'destination': 'copies-out', - 'files': [ - 'file1', - ], - }, - ], - }, - { - 'target_name': 'copies2', - 'type': 'none', - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/copies-out', - 'files': [ - 'file2', - ], - }, - ], - }, - # Verify that a null 'files' list doesn't gag the generators. - { - 'target_name': 'copies_null', - 'type': 'none', - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/copies-null', - 'files': [], - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file1 deleted file mode 100644 index 84d55c57..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file1 +++ /dev/null @@ -1 +0,0 @@ -file1 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file2 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file2 deleted file mode 100644 index af1b8ae3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/copies/src/file2 +++ /dev/null @@ -1 +0,0 @@ -file2 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines-env.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines-env.gyp deleted file mode 100644 index 1781546a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines-env.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'value%': '5', - }, - 'targets': [ - { - 'target_name': 'defines', - 'type': 'executable', - 'sources': [ - 'defines.c', - ], - 'defines': [ - 'VALUE=<(value)', - ], - }, - ], -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.c deleted file mode 100644 index 01b53d5d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ -#ifdef FOO - printf("FOO is defined\n"); -#endif - printf("VALUE is %d\n", VALUE); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.gyp deleted file mode 100644 index b88f4fa7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/defines.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'defines', - 'type': 'executable', - 'sources': [ - 'defines.c', - ], - 'defines': [ - 'FOO', - 'VALUE=1', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env-regyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env-regyp.py deleted file mode 100644 index 70c9ba78..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env-regyp.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable with C++ define specified by a gyp define, and -the use of the environment during regeneration when the gyp file changes. -""" - -import os -import TestGyp - -# Regenerating build files when a gyp file changes is currently only supported -# by the make generator. -test = TestGyp.TestGyp(formats=['make']) - -try: - os.environ['GYP_DEFINES'] = 'value=50' - test.run_gyp('defines.gyp') -finally: - # We clear the environ after calling gyp. When the auto-regeneration happens, - # the same define should be reused anyway. Reset to empty string first in - # case the platform doesn't support unsetenv. - os.environ['GYP_DEFINES'] = '' - del os.environ['GYP_DEFINES'] - -test.build('defines.gyp') - -expect = """\ -FOO is defined -VALUE is 1 -""" -test.run_built_executable('defines', stdout=expect) - -# Sleep so that the changed gyp file will have a newer timestamp than the -# previously generated build files. -test.sleep() -test.write('defines.gyp', test.read('defines-env.gyp')) - -test.build('defines.gyp', test.ALL) - -expect = """\ -VALUE is 50 -""" -test.run_built_executable('defines', stdout=expect) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env.py deleted file mode 100644 index 6b4e7175..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines-env.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable with C++ define specified by a gyp define. -""" - -import os -import TestGyp - -test = TestGyp.TestGyp() - -# With the value only given in environment, it should be used. -try: - os.environ['GYP_DEFINES'] = 'value=10' - test.run_gyp('defines-env.gyp') -finally: - del os.environ['GYP_DEFINES'] - -test.build('defines-env.gyp') - -expect = """\ -VALUE is 10 -""" -test.run_built_executable('defines', stdout=expect) - - -# With the value given in both command line and environment, -# command line should take precedence. -try: - os.environ['GYP_DEFINES'] = 'value=20' - test.run_gyp('defines-env.gyp', '-Dvalue=25') -finally: - del os.environ['GYP_DEFINES'] - -test.sleep() -test.touch('defines.c') -test.build('defines-env.gyp') - -expect = """\ -VALUE is 25 -""" -test.run_built_executable('defines', stdout=expect) - - -# With the value only given in environment, it should be ignored if -# --ignore-environment is specified. -try: - os.environ['GYP_DEFINES'] = 'value=30' - test.run_gyp('defines-env.gyp', '--ignore-environment') -finally: - del os.environ['GYP_DEFINES'] - -test.sleep() -test.touch('defines.c') -test.build('defines-env.gyp') - -expect = """\ -VALUE is 5 -""" -test.run_built_executable('defines', stdout=expect) - - -# With the value given in both command line and environment, and -# --ignore-environment also specified, command line should still be used. -try: - os.environ['GYP_DEFINES'] = 'value=40' - test.run_gyp('defines-env.gyp', '--ignore-environment', '-Dvalue=45') -finally: - del os.environ['GYP_DEFINES'] - -test.sleep() -test.touch('defines.c') -test.build('defines-env.gyp') - -expect = """\ -VALUE is 45 -""" -test.run_built_executable('defines', stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines.py deleted file mode 100644 index a21a6176..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/defines/gyptest-defines.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies build of an executable with C++ defines. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('defines.gyp') - -test.build('defines.gyp') - -expect = """\ -FOO is defined -VALUE is 1 -""" -test.run_built_executable('defines', stdout=expect) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/a.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/a.c deleted file mode 100755 index 4bc228e4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/a.c +++ /dev/null @@ -1,5 +0,0 @@ -extern int funcB(); - -int funcA() { - return funcB(); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.c deleted file mode 100755 index b5e771bc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.c +++ /dev/null @@ -1,3 +0,0 @@ -int funcB() { - return 2; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.gyp deleted file mode 100755 index f09e1ff1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/b/b.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'b', - 'type': 'static_library', - 'sources': [ - 'b.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.c deleted file mode 100644 index 4949daf3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.c +++ /dev/null @@ -1,4 +0,0 @@ -int funcC() { - return 3 - // Intentional syntax error. This file should never be compiled, so this - // shouldn't be a problem. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.gyp deleted file mode 100644 index eabebea9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/c.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'c_unused', - 'type': 'static_library', - 'sources': [ - 'c.c', - ], - }, - { - 'target_name': 'd', - 'type': 'static_library', - 'sources': [ - 'd.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/d.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/d.c deleted file mode 100644 index 05465fc1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/c/d.c +++ /dev/null @@ -1,3 +0,0 @@ -int funcD() { - return 4; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/extra_targets.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/extra_targets.gyp deleted file mode 100644 index c1a26de4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/extra_targets.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'a', - 'type': 'static_library', - 'sources': [ - 'a.c', - ], - # This only depends on the "d" target; other targets in c.gyp - # should not become part of the build (unlike with 'c/c.gyp:*'). - 'dependencies': ['c/c.gyp:d'], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-extra-targets.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-extra-targets.py deleted file mode 100644 index 3752f744..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-extra-targets.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verify that dependencies don't pull unused targets into the build. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('extra_targets.gyp') - -# This should fail if it tries to build 'c_unused' since 'c/c.c' has a syntax -# error and won't compile. -test.build('extra_targets.gyp', test.ALL) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-lib-only.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-lib-only.py deleted file mode 100755 index d90d88fe..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/gyptest-lib-only.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verify that a link time only dependency will get pulled into the set of built -targets, even if no executable uses it. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('lib_only.gyp') - -test.build('lib_only.gyp', test.ALL) - -# Make doesn't put static libs in a common 'lib' directory, like it does with -# shared libs, so check in the obj path corresponding to the source path. -test.built_file_must_exist('a', type=test.STATIC_LIB, libdir='obj.target') - -# TODO(bradnelson/mark): -# On linux and windows a library target will at least pull its link dependencies -# into the generated sln/_main.scons, since not doing so confuses users. -# This is not currently implemented on mac, which has the opposite behavior. -if test.format == 'xcode': - test.built_file_must_not_exist('b', type=test.STATIC_LIB) -else: - test.built_file_must_exist('b', type=test.STATIC_LIB, libdir='obj.target/b') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/lib_only.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/lib_only.gyp deleted file mode 100755 index f6c84dea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependencies/lib_only.gyp +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'a', - 'type': 'static_library', - 'sources': [ - 'a.c', - ], - 'dependencies': ['b/b.gyp:b'], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/gyptest-copy.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/gyptest-copy.py deleted file mode 100644 index 5ba7c73d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/gyptest-copy.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies dependencies do the copy step. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('copies.gyp', chdir='src') - -test.build('copies.gyp', 'proj2', chdir='src') - -test.run_built_executable('proj1', - chdir='src', - stdout="Hello from file1.c\n") -test.run_built_executable('proj2', - chdir='src', - stdout="Hello from file2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/copies.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/copies.gyp deleted file mode 100644 index 4176b187..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/copies.gyp +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'proj1', - 'type': 'executable', - 'sources': [ - 'file1.c', - ], - }, - { - 'target_name': 'proj2', - 'type': 'executable', - 'sources': [ - 'file2.c', - ], - 'dependencies': [ - 'proj1', - ] - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file1.c deleted file mode 100644 index 3caf5d63..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file1.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from file1.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file2.c deleted file mode 100644 index ed45cc01..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/dependency-copy/src/file2.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from file2.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/actions.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/actions.gyp deleted file mode 100644 index dded59af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/actions.gyp +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'pull_in_all_actions', - 'type': 'none', - 'dependencies': [ - 'subdir1/executable.gyp:*', - 'subdir2/none.gyp:*', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/actions-out/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/actions-out/README.txt deleted file mode 100644 index 1b052c9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/executable.gyp deleted file mode 100644 index 6bdd60a1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/executable.gyp +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'program.c', - ], - 'actions': [ - { - 'action_name': 'make-prog1', - 'inputs': [ - 'make-prog1.py', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/prog1.c', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - { - 'action_name': 'make-prog2', - 'inputs': [ - 'make-prog2.py', - ], - 'outputs': [ - 'actions-out/prog2.c', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog1.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog1.py deleted file mode 100644 index 7ea1d8a2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog1.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = r""" -#include - -void prog1(void) -{ - printf("Hello from make-prog1.py\n"); -} -""" - -open(sys.argv[1], 'w').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog2.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog2.py deleted file mode 100644 index 0bfe4973..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/make-prog2.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = r""" -#include - -void prog2(void) -{ - printf("Hello from make-prog2.py\n"); -} -""" - -open(sys.argv[1], 'w').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/program.c deleted file mode 100644 index d5f661d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir1/program.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern void prog1(void); -extern void prog2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - prog1(); - prog2(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/actions-out/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/actions-out/README.txt deleted file mode 100644 index 1b052c9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/make-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/make-file.py deleted file mode 100644 index fff06531..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/make-file.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = "Hello from make-file.py\n" - -open(sys.argv[1], 'wb').write(contents) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/none.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/none.gyp deleted file mode 100644 index f98f5275..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/actions/subdir2/none.gyp +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'file', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'actions': [ - { - 'action_name': 'make-file', - 'inputs': [ - 'make-file.py', - ], - 'outputs': [ - 'actions-out/file.out', - # TODO: enhance testing infrastructure to test this - # without having to hard-code the intermediate dir paths. - #'<(INTERMEDIATE_DIR)/file.out', - ], - 'action': [ - 'python', '<(_inputs)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - } - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies-out/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies-out/README.txt deleted file mode 100644 index 90ef8861..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies-out/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies.gyp deleted file mode 100644 index 479a3d9b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/copies.gyp +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'pull_in_subdir', - 'type': 'none', - 'dependencies': [ - 'subdir/subdir.gyp:*', - ], - }, - { - 'target_name': 'copies1', - 'type': 'none', - 'copies': [ - { - 'destination': 'copies-out', - 'files': [ - 'file1', - ], - }, - ], - }, - { - 'target_name': 'copies2', - 'type': 'none', - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/copies-out', - 'files': [ - 'file2', - ], - }, - ], - }, - # Verify that a null 'files' list doesn't gag the generators. - { - 'target_name': 'copies_null', - 'type': 'none', - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/copies-null', - 'files': [], - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file1 deleted file mode 100644 index 84d55c57..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file1 +++ /dev/null @@ -1 +0,0 @@ -file1 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file2 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file2 deleted file mode 100644 index af1b8ae3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/file2 +++ /dev/null @@ -1 +0,0 @@ -file2 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/copies-out/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/copies-out/README.txt deleted file mode 100644 index 90ef8861..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/copies-out/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file3 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file3 deleted file mode 100644 index 43f16f35..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file3 +++ /dev/null @@ -1 +0,0 @@ -file3 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file4 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file4 deleted file mode 100644 index 5f7270a0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/file4 +++ /dev/null @@ -1 +0,0 @@ -file4 contents diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/subdir.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/subdir.gyp deleted file mode 100644 index af031d28..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/copies/subdir/subdir.gyp +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'copies3', - 'type': 'none', - 'copies': [ - { - 'destination': 'copies-out', - 'files': [ - 'file3', - ], - }, - ], - }, - { - 'target_name': 'copies4', - 'type': 'none', - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/copies-out', - 'files': [ - 'file4', - ], - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-actions.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-actions.py deleted file mode 100644 index 73ac5ae9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-actions.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies --generator-output= behavior when using actions. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -# All the generated files should go under 'gypfiles'. The source directory -# ('actions') should be untouched. -test.writable(test.workpath('actions'), False) -test.run_gyp('actions.gyp', - '--generator-output=' + test.workpath('gypfiles'), - chdir='actions') - -test.writable(test.workpath('actions'), True) - -test.relocate('actions', 'relocate/actions') -test.relocate('gypfiles', 'relocate/gypfiles') - -test.writable(test.workpath('relocate/actions'), False) - -# Some of the action outputs use "pure" relative paths (i.e. without prefixes -# like <(INTERMEDIATE_DIR) or <(PROGRAM_DIR)). Even though we are building under -# 'gypfiles', such outputs will still be created relative to the original .gyp -# sources. Projects probably wouldn't normally do this, since it kind of defeats -# the purpose of '--generator-output', but it is supported behaviour. -test.writable(test.workpath('relocate/actions/build'), True) -test.writable(test.workpath('relocate/actions/subdir1/build'), True) -test.writable(test.workpath('relocate/actions/subdir1/actions-out'), True) -test.writable(test.workpath('relocate/actions/subdir2/build'), True) -test.writable(test.workpath('relocate/actions/subdir2/actions-out'), True) - -test.build('actions.gyp', test.ALL, chdir='relocate/gypfiles') - -expect = """\ -Hello from program.c -Hello from make-prog1.py -Hello from make-prog2.py -""" - -if test.format == 'xcode': - chdir = 'relocate/actions/subdir1' -else: - chdir = 'relocate/gypfiles' -test.run_built_executable('program', chdir=chdir, stdout=expect) - -test.must_match('relocate/actions/subdir2/actions-out/file.out', - "Hello from make-file.py\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-copies.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-copies.py deleted file mode 100644 index 414b7c37..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-copies.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies file copies using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.writable(test.workpath('copies'), False) - -test.run_gyp('copies.gyp', - '--generator-output=' + test.workpath('gypfiles'), - chdir='copies') - -test.writable(test.workpath('copies'), True) - -test.relocate('copies', 'relocate/copies') -test.relocate('gypfiles', 'relocate/gypfiles') - -test.writable(test.workpath('relocate/copies'), False) - -test.writable(test.workpath('relocate/copies/build'), True) -test.writable(test.workpath('relocate/copies/copies-out'), True) -test.writable(test.workpath('relocate/copies/subdir/build'), True) -test.writable(test.workpath('relocate/copies/subdir/copies-out'), True) - -test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles') - -test.must_match(['relocate', 'copies', 'copies-out', 'file1'], - "file1 contents\n") - -if test.format == 'xcode': - chdir = 'relocate/copies/build' -elif test.format == 'make': - chdir = 'relocate/gypfiles/out' -else: - chdir = 'relocate/gypfiles' -test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n") - -test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'], - "file3 contents\n") - -if test.format == 'xcode': - chdir = 'relocate/copies/subdir/build' -elif test.format == 'make': - chdir = 'relocate/gypfiles/out' -else: - chdir = 'relocate/gypfiles' -test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-relocate.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-relocate.py deleted file mode 100644 index dd1c2bd6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-relocate.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that a project hierarchy created with the --generator-output= -option can be built even when it's relocated to a different path. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.writable(test.workpath('src'), False) - -test.run_gyp('prog1.gyp', - '-Dset_symroot=1', - '--generator-output=' + test.workpath('gypfiles'), - chdir='src') - -test.writable(test.workpath('src'), True) - -test.relocate('src', 'relocate/src') -test.relocate('gypfiles', 'relocate/gypfiles') - -test.writable(test.workpath('relocate/src'), False) - -test.writable(test.workpath('relocate/src/build'), True) -test.writable(test.workpath('relocate/src/subdir2/build'), True) -test.writable(test.workpath('relocate/src/subdir3/build'), True) - -test.build('prog1.gyp', test.ALL, chdir='relocate/gypfiles') - -chdir = 'relocate/gypfiles' - -expect = """\ -Hello from %s -Hello from inc.h -Hello from inc1/include1.h -Hello from inc2/include2.h -Hello from inc3/include3.h -Hello from subdir2/deeper/deeper.h -""" - -if test.format == 'xcode': - chdir = 'relocate/src' -test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c') - -if test.format == 'xcode': - chdir = 'relocate/src/subdir2' -test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') - -if test.format == 'xcode': - chdir = 'relocate/src/subdir3' -test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-rules.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-rules.py deleted file mode 100644 index 05b674ff..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-rules.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies --generator-output= behavior when using rules. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.writable(test.workpath('rules'), False) - -test.run_gyp('rules.gyp', - '--generator-output=' + test.workpath('gypfiles'), - chdir='rules') - -test.writable(test.workpath('rules'), True) - -test.relocate('rules', 'relocate/rules') -test.relocate('gypfiles', 'relocate/gypfiles') - -test.writable(test.workpath('relocate/rules'), False) - -test.writable(test.workpath('relocate/rules/build'), True) -test.writable(test.workpath('relocate/rules/subdir1/build'), True) -test.writable(test.workpath('relocate/rules/subdir2/build'), True) -test.writable(test.workpath('relocate/rules/subdir2/rules-out'), True) - -test.build('rules.gyp', test.ALL, chdir='relocate/gypfiles') - -expect = """\ -Hello from program.c -Hello from function1.in1 -Hello from function2.in1 -Hello from define3.in0 -Hello from define4.in0 -""" - -if test.format == 'xcode': - chdir = 'relocate/rules/subdir1' -else: - chdir = 'relocate/gypfiles' -test.run_built_executable('program', chdir=chdir, stdout=expect) - -test.must_match('relocate/rules/subdir2/rules-out/file1.out', - "Hello from file1.in0\n") -test.must_match('relocate/rules/subdir2/rules-out/file2.out', - "Hello from file2.in0\n") -test.must_match('relocate/rules/subdir2/rules-out/file3.out', - "Hello from file3.in1\n") -test.must_match('relocate/rules/subdir2/rules-out/file4.out', - "Hello from file4.in1\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-subdir2-deep.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-subdir2-deep.py deleted file mode 100644 index ea1b472e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-subdir2-deep.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a target from a .gyp file a few subdirectories -deep when the --generator-output= option is used to put the build -configuration files in a separate directory tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.writable(test.workpath('src'), False) - -test.writable(test.workpath('src/subdir2/deeper/build'), True) - -test.run_gyp('deeper.gyp', - '-Dset_symroot=1', - '--generator-output=' + test.workpath('gypfiles'), - chdir='src/subdir2/deeper') - -test.build('deeper.gyp', test.ALL, chdir='gypfiles') - -chdir = 'gypfiles' - -if test.format == 'xcode': - chdir = 'src/subdir2/deeper' -test.run_built_executable('deeper', - chdir=chdir, - stdout="Hello from deeper.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-top-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-top-all.py deleted file mode 100644 index 902ceb27..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/gyptest-top-all.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a project hierarchy created when the --generator-output= -option is used to put the build configuration files in a separate -directory tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.writable(test.workpath('src'), False) - -test.run_gyp('prog1.gyp', - '-Dset_symroot=1', - '--generator-output=' + test.workpath('gypfiles'), - chdir='src') - -test.writable(test.workpath('src/build'), True) -test.writable(test.workpath('src/subdir2/build'), True) -test.writable(test.workpath('src/subdir3/build'), True) - -test.build('prog1.gyp', test.ALL, chdir='gypfiles') - -chdir = 'gypfiles' - -expect = """\ -Hello from %s -Hello from inc.h -Hello from inc1/include1.h -Hello from inc2/include2.h -Hello from inc3/include3.h -Hello from subdir2/deeper/deeper.h -""" - -if test.format == 'xcode': - chdir = 'src' -test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c') - -if test.format == 'xcode': - chdir = 'src/subdir2' -test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') - -if test.format == 'xcode': - chdir = 'src/subdir3' -test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/copy-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/copy-file.py deleted file mode 100644 index 938c336a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/copy-file.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -contents = open(sys.argv[1], 'r').read() -open(sys.argv[2], 'wb').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/rules.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/rules.gyp deleted file mode 100644 index dded59af..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/rules.gyp +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'pull_in_all_actions', - 'type': 'none', - 'dependencies': [ - 'subdir1/executable.gyp:*', - 'subdir2/none.gyp:*', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define3.in0 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define3.in0 deleted file mode 100644 index cc29c643..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define3.in0 +++ /dev/null @@ -1 +0,0 @@ -#define STRING3 "Hello from define3.in0\n" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define4.in0 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define4.in0 deleted file mode 100644 index c9b0467b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/define4.in0 +++ /dev/null @@ -1 +0,0 @@ -#define STRING4 "Hello from define4.in0\n" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/executable.gyp deleted file mode 100644 index 2fd89a0d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/executable.gyp +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'program.c', - 'function1.in1', - 'function2.in1', - 'define3.in0', - 'define4.in0', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - ], - 'rules': [ - { - 'rule_name': 'copy_file_0', - 'extension': 'in0', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - # TODO: fix SCons and Make to support generated files not - # in a variable-named path like <(INTERMEDIATE_DIR) - #'<(RULE_INPUT_ROOT).c', - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 0, - }, - { - 'rule_name': 'copy_file_1', - 'extension': 'in1', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - # TODO: fix SCons and Make to support generated files not - # in a variable-named path like <(INTERMEDIATE_DIR) - #'<(RULE_INPUT_ROOT).c', - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function1.in1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function1.in1 deleted file mode 100644 index 545e7ca1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function1.in1 +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void function1(void) -{ - printf("Hello from function1.in1\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function2.in1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function2.in1 deleted file mode 100644 index 6bad43f9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/function2.in1 +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void function2(void) -{ - printf("Hello from function2.in1\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/program.c deleted file mode 100644 index 27fd31ed..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir1/program.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include "define3.h" -#include "define4.h" - -extern void function1(void); -extern void function2(void); -extern void function3(void); -extern void function4(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - function1(); - function2(); - printf("%s", STRING3); - printf("%s", STRING4); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file1.in0 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file1.in0 deleted file mode 100644 index 7aca64f4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file1.in0 +++ /dev/null @@ -1 +0,0 @@ -Hello from file1.in0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file2.in0 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file2.in0 deleted file mode 100644 index 80a281a2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file2.in0 +++ /dev/null @@ -1 +0,0 @@ -Hello from file2.in0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file3.in1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file3.in1 deleted file mode 100644 index 60ae2e79..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file3.in1 +++ /dev/null @@ -1 +0,0 @@ -Hello from file3.in1 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file4.in1 b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file4.in1 deleted file mode 100644 index 5a3c3072..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/file4.in1 +++ /dev/null @@ -1 +0,0 @@ -Hello from file4.in1 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/none.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/none.gyp deleted file mode 100644 index 664cbd9c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/none.gyp +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'files', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'file1.in0', - 'file2.in0', - 'file3.in1', - 'file4.in1', - ], - 'rules': [ - { - 'rule_name': 'copy_file_0', - 'extension': 'in0', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - 'rules-out/<(RULE_INPUT_ROOT).out', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 0, - }, - { - 'rule_name': 'copy_file_1', - 'extension': 'in1', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - 'rules-out/<(RULE_INPUT_ROOT).out', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/rules-out/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/rules-out/README.txt deleted file mode 100644 index 1b052c9a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc.h deleted file mode 100644 index 57aa1a5a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc.h +++ /dev/null @@ -1 +0,0 @@ -#define INC_STRING "inc.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc1/include1.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc1/include1.h deleted file mode 100644 index 1d59065f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/inc1/include1.h +++ /dev/null @@ -1 +0,0 @@ -#define INCLUDE1_STRING "inc1/include1.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.c deleted file mode 100644 index 656f81d5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#include "inc.h" -#include "include1.h" -#include "include2.h" -#include "include3.h" -#include "deeper.h" - -int main(int argc, char *argv[]) -{ - printf("Hello from prog1.c\n"); - printf("Hello from %s\n", INC_STRING); - printf("Hello from %s\n", INCLUDE1_STRING); - printf("Hello from %s\n", INCLUDE2_STRING); - printf("Hello from %s\n", INCLUDE3_STRING); - printf("Hello from %s\n", DEEPER_STRING); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.gyp deleted file mode 100644 index d50e6fb0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/prog1.gyp +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - 'symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog1', - 'type': 'executable', - 'dependencies': [ - 'subdir2/prog2.gyp:prog2', - ], - 'include_dirs': [ - '.', - 'inc1', - 'subdir2/inc2', - 'subdir3/inc3', - 'subdir2/deeper', - ], - 'sources': [ - 'prog1.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.c deleted file mode 100644 index 56c49d1f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from deeper.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp deleted file mode 100644 index 86487708..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../../symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'deeper', - 'type': 'executable', - 'sources': [ - 'deeper.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.h deleted file mode 100644 index f6484a0f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/deeper/deeper.h +++ /dev/null @@ -1 +0,0 @@ -#define DEEPER_STRING "subdir2/deeper/deeper.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/inc2/include2.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/inc2/include2.h deleted file mode 100644 index 1ccfa5de..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/inc2/include2.h +++ /dev/null @@ -1 +0,0 @@ -#define INCLUDE2_STRING "inc2/include2.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.c deleted file mode 100644 index 38d6c84d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#include "inc.h" -#include "include1.h" -#include "include2.h" -#include "include3.h" -#include "deeper.h" - -int main(int argc, char *argv[]) -{ - printf("Hello from prog2.c\n"); - printf("Hello from %s\n", INC_STRING); - printf("Hello from %s\n", INCLUDE1_STRING); - printf("Hello from %s\n", INCLUDE2_STRING); - printf("Hello from %s\n", INCLUDE3_STRING); - printf("Hello from %s\n", DEEPER_STRING); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.gyp deleted file mode 100644 index 7176ed8b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir2/prog2.gyp +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog2', - 'type': 'executable', - 'include_dirs': [ - '..', - '../inc1', - 'inc2', - '../subdir3/inc3', - 'deeper', - ], - 'dependencies': [ - '../subdir3/prog3.gyp:prog3', - ], - 'sources': [ - 'prog2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/inc3/include3.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/inc3/include3.h deleted file mode 100644 index bf53bf1f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/inc3/include3.h +++ /dev/null @@ -1 +0,0 @@ -#define INCLUDE3_STRING "inc3/include3.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.c deleted file mode 100644 index 7848b45a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#include "inc.h" -#include "include1.h" -#include "include2.h" -#include "include3.h" -#include "deeper.h" - -int main(int argc, char *argv[]) -{ - printf("Hello from prog3.c\n"); - printf("Hello from %s\n", INC_STRING); - printf("Hello from %s\n", INCLUDE1_STRING); - printf("Hello from %s\n", INCLUDE2_STRING); - printf("Hello from %s\n", INCLUDE3_STRING); - printf("Hello from %s\n", DEEPER_STRING); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.gyp deleted file mode 100644 index 46c5e000..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/subdir3/prog3.gyp +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog3', - 'type': 'executable', - 'include_dirs': [ - '..', - '../inc1', - '../subdir2/inc2', - 'inc3', - '../subdir2/deeper', - ], - 'sources': [ - 'prog3.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/symroot.gypi b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/symroot.gypi deleted file mode 100644 index 51991642..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/generator-output/src/symroot.gypi +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'set_symroot%': 0, - }, - 'conditions': [ - ['set_symroot == 1', { - 'xcode_settings': { - 'SYMROOT': '<(DEPTH)/build', - }, - }], - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-all.py deleted file mode 100644 index 9ecff556..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-all.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simplest-possible build of a "Hello, world!" program -using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('hello.gyp') - -test.build('hello.gyp', test.ALL) - -test.run_built_executable('hello', stdout="Hello, world!\n") - -test.up_to_date('hello.gyp', test.ALL) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-default.py deleted file mode 100644 index 76fffb3e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-default.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simplest-possible build of a "Hello, world!" program -using the default build target. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('hello.gyp') - -test.build('hello.gyp') - -test.run_built_executable('hello', stdout="Hello, world!\n") - -test.up_to_date('hello.gyp', test.DEFAULT) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-disable-regyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-disable-regyp.py deleted file mode 100644 index 1e4b3066..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-disable-regyp.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that Makefiles don't get rebuilt when a source gyp file changes and -the disable_regeneration generator flag is set. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('hello.gyp', '-Gauto_regeneration=0') - -test.build('hello.gyp', test.ALL) - -test.run_built_executable('hello', stdout="Hello, world!\n") - -# Sleep so that the changed gyp file will have a newer timestamp than the -# previously generated build files. -test.sleep() -test.write('hello.gyp', test.read('hello2.gyp')) - -test.build('hello.gyp', test.ALL) - -# Should still be the old executable, as regeneration was disabled. -test.run_built_executable('hello', stdout="Hello, world!\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-regyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-regyp.py deleted file mode 100644 index 827c7235..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-regyp.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that Makefiles get rebuilt when a source gyp file changes. -""" - -import TestGyp - -# Regenerating build files when a gyp file changes is currently only supported -# by the make generator. -test = TestGyp.TestGyp(formats=['make']) - -test.run_gyp('hello.gyp') - -test.build('hello.gyp', test.ALL) - -test.run_built_executable('hello', stdout="Hello, world!\n") - -# Sleep so that the changed gyp file will have a newer timestamp than the -# previously generated build files. -test.sleep() -test.write('hello.gyp', test.read('hello2.gyp')) - -test.build('hello.gyp', test.ALL) - -test.run_built_executable('hello', stdout="Hello, two!\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-target.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-target.py deleted file mode 100755 index 2f0a2a33..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/gyptest-target.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simplest-possible build of a "Hello, world!" program -using an explicit build target of 'hello'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('hello.gyp') - -test.build('hello.gyp', 'hello') - -test.run_built_executable('hello', stdout="Hello, world!\n") - -test.up_to_date('hello.gyp', 'hello') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.c deleted file mode 100644 index 0e228b8c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello, world!\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.gyp deleted file mode 100644 index 1974d51c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'hello', - 'type': 'executable', - 'sources': [ - 'hello.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.c deleted file mode 100644 index 3ce994c6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello, two!\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.gyp deleted file mode 100644 index 25b08caf..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/hello/hello2.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'hello', - 'type': 'executable', - 'sources': [ - 'hello2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py deleted file mode 100644 index a2b9f301..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies inclusion of $HOME/.gyp/includes.gypi works properly with relocation -and with regeneration. -""" - -import os -import TestGyp - -# Regenerating build files when a gyp file changes is currently only supported -# by the make generator. -test = TestGyp.TestGyp(formats=['make']) - -os.environ['HOME'] = os.path.abspath('home') - -test.run_gyp('all.gyp', chdir='src') - -# After relocating, we should still be able to build (build file shouldn't -# contain relative reference to ~/.gyp/includes.gypi) -test.relocate('src', 'relocate/src') - -test.build('all.gyp', test.ALL, chdir='relocate/src') - -test.run_built_executable('printfoo', - chdir='relocate/src', - stdout="FOO is fromhome\n"); - -# Building should notice any changes to ~/.gyp/includes.gypi and regyp. -test.sleep() - -test.write('home/.gyp/include.gypi', test.read('home2/.gyp/include.gypi')) - -test.build('all.gyp', test.ALL, chdir='relocate/src') - -test.run_built_executable('printfoo', - chdir='relocate/src', - stdout="FOO is fromhome2\n"); - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes.py deleted file mode 100644 index 6a0e9651..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies inclusion of $HOME/.gyp/includes.gypi works. -""" - -import os -import TestGyp - -test = TestGyp.TestGyp() - -os.environ['HOME'] = os.path.abspath('home') - -test.run_gyp('all.gyp', chdir='src') - -# After relocating, we should still be able to build (build file shouldn't -# contain relative reference to ~/.gyp/includes.gypi) -test.relocate('src', 'relocate/src') - -test.build('all.gyp', test.ALL, chdir='relocate/src') - -test.run_built_executable('printfoo', - chdir='relocate/src', - stdout="FOO is fromhome\n"); - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home/.gyp/include.gypi b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home/.gyp/include.gypi deleted file mode 100644 index fcfb39be..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home/.gyp/include.gypi +++ /dev/null @@ -1,5 +0,0 @@ -{ - 'variables': { - 'foo': '"fromhome"', - }, -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home2/.gyp/include.gypi b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home2/.gyp/include.gypi deleted file mode 100644 index f0d84b31..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/home2/.gyp/include.gypi +++ /dev/null @@ -1,5 +0,0 @@ -{ - 'variables': { - 'foo': '"fromhome2"', - }, -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/all.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/all.gyp deleted file mode 100644 index 14b6aea2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/all.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'foo%': '"fromdefault"', - }, - 'targets': [ - { - 'target_name': 'printfoo', - 'type': 'executable', - 'sources': [ - 'printfoo.c', - ], - 'defines': [ - 'FOO=<(foo)', - ], - }, - ], -} - diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/printfoo.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/printfoo.c deleted file mode 100644 index 92d2cbac..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/home_dot_gyp/src/printfoo.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("FOO is %s\n", FOO); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-all.py deleted file mode 100644 index 74966008..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-all.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies use of include_dirs when using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('includes.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('includes.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from includes.c -Hello from inc.h -Hello from include1.h -Hello from subdir/inc2/include2.h -""" -test.run_built_executable('includes', stdout=expect, chdir='relocate/src') - -if test.format == 'xcode': - chdir='relocate/src/subdir' -else: - chdir='relocate/src' - -expect = """\ -Hello from subdir/subdir_includes.c -Hello from subdir/inc.h -Hello from include1.h -Hello from subdir/inc2/include2.h -""" -test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-default.py deleted file mode 100644 index 467f58d7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/gyptest-default.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies use of include_dirs when using the default build target. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('includes.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('includes.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from includes.c -Hello from inc.h -Hello from include1.h -Hello from subdir/inc2/include2.h -""" -test.run_built_executable('includes', stdout=expect, chdir='relocate/src') - -if test.format == 'xcode': - chdir='relocate/src/subdir' -else: - chdir='relocate/src' - -expect = """\ -Hello from subdir/subdir_includes.c -Hello from subdir/inc.h -Hello from include1.h -Hello from subdir/inc2/include2.h -""" -test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc.h deleted file mode 100644 index 0398d691..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc.h +++ /dev/null @@ -1 +0,0 @@ -#define INC_STRING "inc.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc1/include1.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc1/include1.h deleted file mode 100644 index 43356b5f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/inc1/include1.h +++ /dev/null @@ -1 +0,0 @@ -#define INCLUDE1_STRING "include1.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.c deleted file mode 100644 index 756c4271..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -#include "inc.h" -#include "include1.h" -#include "include2.h" - -int main(int argc, char *argv[]) -{ - printf("Hello from includes.c\n"); - printf("Hello from %s\n", INC_STRING); - printf("Hello from %s\n", INCLUDE1_STRING); - printf("Hello from %s\n", INCLUDE2_STRING); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.gyp deleted file mode 100644 index a2a55cc0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/includes.gyp +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'includes', - 'type': 'executable', - 'dependencies': [ - 'subdir/subdir_includes.gyp:subdir_includes', - ], - 'include_dirs': [ - '.', - 'inc1', - 'subdir/inc2', - ], - 'sources': [ - 'includes.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc.h deleted file mode 100644 index 0a68d7b3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc.h +++ /dev/null @@ -1 +0,0 @@ -#define INC_STRING "subdir/inc.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc2/include2.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc2/include2.h deleted file mode 100644 index 721577ef..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/inc2/include2.h +++ /dev/null @@ -1 +0,0 @@ -#define INCLUDE2_STRING "subdir/inc2/include2.h" diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.c deleted file mode 100644 index 727f6822..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -#include "inc.h" -#include "include1.h" -#include "include2.h" - -int main(int argc, char *argv[]) -{ - printf("Hello from subdir/subdir_includes.c\n"); - printf("Hello from %s\n", INC_STRING); - printf("Hello from %s\n", INCLUDE1_STRING); - printf("Hello from %s\n", INCLUDE2_STRING); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.gyp deleted file mode 100644 index 257d052c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/include_dirs/src/subdir/subdir_includes.gyp +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'subdir_includes', - 'type': 'executable', - 'include_dirs': [ - '.', - '../inc1', - 'inc2', - ], - 'sources': [ - 'subdir_includes.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/README.txt b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/README.txt deleted file mode 100644 index b3d72457..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -Supporting modules for GYP testing. - - TestCmd.py - TestCommon.py - - Modules for generic testing of command-line utilities, - specifically including the ability to copy a test configuration - to temporary directories (with default cleanup on exit) as part - of running test scripts that invoke commands, compare actual - against expected output, etc. - - Our copies of these come from the SCons project, - http://www.scons.org/. - - TestGyp.py - - Modules for GYP-specific tests, of course. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCmd.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCmd.py deleted file mode 100644 index 32c3ccc9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCmd.py +++ /dev/null @@ -1,1571 +0,0 @@ -""" -TestCmd.py: a testing framework for commands and scripts. - -The TestCmd module provides a framework for portable automated testing -of executable commands and scripts (in any language, not just Python), -especially commands and scripts that require file system interaction. - -In addition to running tests and evaluating conditions, the TestCmd -module manages and cleans up one or more temporary workspace -directories, and provides methods for creating files and directories in -those workspace directories from in-line data, here-documents), allowing -tests to be completely self-contained. - -A TestCmd environment object is created via the usual invocation: - - import TestCmd - test = TestCmd.TestCmd() - -There are a bunch of keyword arguments available at instantiation: - - test = TestCmd.TestCmd(description = 'string', - program = 'program_or_script_to_test', - interpreter = 'script_interpreter', - workdir = 'prefix', - subdir = 'subdir', - verbose = Boolean, - match = default_match_function, - diff = default_diff_function, - combine = Boolean) - -There are a bunch of methods that let you do different things: - - test.verbose_set(1) - - test.description_set('string') - - test.program_set('program_or_script_to_test') - - test.interpreter_set('script_interpreter') - test.interpreter_set(['script_interpreter', 'arg']) - - test.workdir_set('prefix') - test.workdir_set('') - - test.workpath('file') - test.workpath('subdir', 'file') - - test.subdir('subdir', ...) - - test.rmdir('subdir', ...) - - test.write('file', "contents\n") - test.write(['subdir', 'file'], "contents\n") - - test.read('file') - test.read(['subdir', 'file']) - test.read('file', mode) - test.read(['subdir', 'file'], mode) - - test.writable('dir', 1) - test.writable('dir', None) - - test.preserve(condition, ...) - - test.cleanup(condition) - - test.command_args(program = 'program_or_script_to_run', - interpreter = 'script_interpreter', - arguments = 'arguments to pass to program') - - test.run(program = 'program_or_script_to_run', - interpreter = 'script_interpreter', - arguments = 'arguments to pass to program', - chdir = 'directory_to_chdir_to', - stdin = 'input to feed to the program\n') - universal_newlines = True) - - p = test.start(program = 'program_or_script_to_run', - interpreter = 'script_interpreter', - arguments = 'arguments to pass to program', - universal_newlines = None) - - test.finish(self, p) - - test.pass_test() - test.pass_test(condition) - test.pass_test(condition, function) - - test.fail_test() - test.fail_test(condition) - test.fail_test(condition, function) - test.fail_test(condition, function, skip) - - test.no_result() - test.no_result(condition) - test.no_result(condition, function) - test.no_result(condition, function, skip) - - test.stdout() - test.stdout(run) - - test.stderr() - test.stderr(run) - - test.symlink(target, link) - - test.banner(string) - test.banner(string, width) - - test.diff(actual, expected) - - test.match(actual, expected) - - test.match_exact("actual 1\nactual 2\n", "expected 1\nexpected 2\n") - test.match_exact(["actual 1\n", "actual 2\n"], - ["expected 1\n", "expected 2\n"]) - - test.match_re("actual 1\nactual 2\n", regex_string) - test.match_re(["actual 1\n", "actual 2\n"], list_of_regexes) - - test.match_re_dotall("actual 1\nactual 2\n", regex_string) - test.match_re_dotall(["actual 1\n", "actual 2\n"], list_of_regexes) - - test.tempdir() - test.tempdir('temporary-directory') - - test.sleep() - test.sleep(seconds) - - test.where_is('foo') - test.where_is('foo', 'PATH1:PATH2') - test.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4') - - test.unlink('file') - test.unlink('subdir', 'file') - -The TestCmd module provides pass_test(), fail_test(), and no_result() -unbound functions that report test results for use with the Aegis change -management system. These methods terminate the test immediately, -reporting PASSED, FAILED, or NO RESULT respectively, and exiting with -status 0 (success), 1 or 2 respectively. This allows for a distinction -between an actual failed test and a test that could not be properly -evaluated because of an external condition (such as a full file system -or incorrect permissions). - - import TestCmd - - TestCmd.pass_test() - TestCmd.pass_test(condition) - TestCmd.pass_test(condition, function) - - TestCmd.fail_test() - TestCmd.fail_test(condition) - TestCmd.fail_test(condition, function) - TestCmd.fail_test(condition, function, skip) - - TestCmd.no_result() - TestCmd.no_result(condition) - TestCmd.no_result(condition, function) - TestCmd.no_result(condition, function, skip) - -The TestCmd module also provides unbound functions that handle matching -in the same way as the match_*() methods described above. - - import TestCmd - - test = TestCmd.TestCmd(match = TestCmd.match_exact) - - test = TestCmd.TestCmd(match = TestCmd.match_re) - - test = TestCmd.TestCmd(match = TestCmd.match_re_dotall) - -The TestCmd module provides unbound functions that can be used for the -"diff" argument to TestCmd.TestCmd instantiation: - - import TestCmd - - test = TestCmd.TestCmd(match = TestCmd.match_re, - diff = TestCmd.diff_re) - - test = TestCmd.TestCmd(diff = TestCmd.simple_diff) - -The "diff" argument can also be used with standard difflib functions: - - import difflib - - test = TestCmd.TestCmd(diff = difflib.context_diff) - - test = TestCmd.TestCmd(diff = difflib.unified_diff) - -Lastly, the where_is() method also exists in an unbound function -version. - - import TestCmd - - TestCmd.where_is('foo') - TestCmd.where_is('foo', 'PATH1:PATH2') - TestCmd.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4') -""" - -# Copyright 2000, 2001, 2002, 2003, 2004 Steven Knight -# This module is free software, and you may redistribute it and/or modify -# it under the same terms as Python itself, so long as this copyright message -# and disclaimer are retained in their original form. -# -# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, -# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF -# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, -# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, -# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - -__author__ = "Steven Knight " -__revision__ = "TestCmd.py 0.36.D001 2009/07/24 08:45:26 knight" -__version__ = "0.36" - -import errno -import os -import os.path -import re -import shutil -import stat -import string -import sys -import tempfile -import time -import traceback -import types -import UserList - -__all__ = [ - 'diff_re', - 'fail_test', - 'no_result', - 'pass_test', - 'match_exact', - 'match_re', - 'match_re_dotall', - 'python_executable', - 'TestCmd' -] - -try: - import difflib -except ImportError: - __all__.append('simple_diff') - -def is_List(e): - return type(e) is types.ListType \ - or isinstance(e, UserList.UserList) - -try: - from UserString import UserString -except ImportError: - class UserString: - pass - -if hasattr(types, 'UnicodeType'): - def is_String(e): - return type(e) is types.StringType \ - or type(e) is types.UnicodeType \ - or isinstance(e, UserString) -else: - def is_String(e): - return type(e) is types.StringType or isinstance(e, UserString) - -tempfile.template = 'testcmd.' -if os.name in ('posix', 'nt'): - tempfile.template = 'testcmd.' + str(os.getpid()) + '.' -else: - tempfile.template = 'testcmd.' - -re_space = re.compile('\s') - -_Cleanup = [] - -_chain_to_exitfunc = None - -def _clean(): - global _Cleanup - cleanlist = filter(None, _Cleanup) - del _Cleanup[:] - cleanlist.reverse() - for test in cleanlist: - test.cleanup() - if _chain_to_exitfunc: - _chain_to_exitfunc() - -try: - import atexit -except ImportError: - # TODO(1.5): atexit requires python 2.0, so chain sys.exitfunc - try: - _chain_to_exitfunc = sys.exitfunc - except AttributeError: - pass - sys.exitfunc = _clean -else: - atexit.register(_clean) - -try: - zip -except NameError: - def zip(*lists): - result = [] - for i in xrange(min(map(len, lists))): - result.append(tuple(map(lambda l, i=i: l[i], lists))) - return result - -class Collector: - def __init__(self, top): - self.entries = [top] - def __call__(self, arg, dirname, names): - pathjoin = lambda n, d=dirname: os.path.join(d, n) - self.entries.extend(map(pathjoin, names)) - -def _caller(tblist, skip): - string = "" - arr = [] - for file, line, name, text in tblist: - if file[-10:] == "TestCmd.py": - break - arr = [(file, line, name, text)] + arr - atfrom = "at" - for file, line, name, text in arr[skip:]: - if name in ("?", ""): - name = "" - else: - name = " (" + name + ")" - string = string + ("%s line %d of %s%s\n" % (atfrom, line, file, name)) - atfrom = "\tfrom" - return string - -def fail_test(self = None, condition = 1, function = None, skip = 0): - """Cause the test to fail. - - By default, the fail_test() method reports that the test FAILED - and exits with a status of 1. If a condition argument is supplied, - the test fails only if the condition is true. - """ - if not condition: - return - if not function is None: - function() - of = "" - desc = "" - sep = " " - if not self is None: - if self.program: - of = " of " + self.program - sep = "\n\t" - if self.description: - desc = " [" + self.description + "]" - sep = "\n\t" - - at = _caller(traceback.extract_stack(), skip) - sys.stderr.write("FAILED test" + of + desc + sep + at) - - sys.exit(1) - -def no_result(self = None, condition = 1, function = None, skip = 0): - """Causes a test to exit with no valid result. - - By default, the no_result() method reports NO RESULT for the test - and exits with a status of 2. If a condition argument is supplied, - the test fails only if the condition is true. - """ - if not condition: - return - if not function is None: - function() - of = "" - desc = "" - sep = " " - if not self is None: - if self.program: - of = " of " + self.program - sep = "\n\t" - if self.description: - desc = " [" + self.description + "]" - sep = "\n\t" - - at = _caller(traceback.extract_stack(), skip) - sys.stderr.write("NO RESULT for test" + of + desc + sep + at) - - sys.exit(2) - -def pass_test(self = None, condition = 1, function = None): - """Causes a test to pass. - - By default, the pass_test() method reports PASSED for the test - and exits with a status of 0. If a condition argument is supplied, - the test passes only if the condition is true. - """ - if not condition: - return - if not function is None: - function() - sys.stderr.write("PASSED\n") - sys.exit(0) - -def match_exact(lines = None, matches = None): - """ - """ - if not is_List(lines): - lines = string.split(lines, "\n") - if not is_List(matches): - matches = string.split(matches, "\n") - if len(lines) != len(matches): - return - for i in range(len(lines)): - if lines[i] != matches[i]: - return - return 1 - -def match_re(lines = None, res = None): - """ - """ - if not is_List(lines): - lines = string.split(lines, "\n") - if not is_List(res): - res = string.split(res, "\n") - if len(lines) != len(res): - return - for i in range(len(lines)): - s = "^" + res[i] + "$" - try: - expr = re.compile(s) - except re.error, e: - msg = "Regular expression error in %s: %s" - raise re.error, msg % (repr(s), e[0]) - if not expr.search(lines[i]): - return - return 1 - -def match_re_dotall(lines = None, res = None): - """ - """ - if not type(lines) is type(""): - lines = string.join(lines, "\n") - if not type(res) is type(""): - res = string.join(res, "\n") - s = "^" + res + "$" - try: - expr = re.compile(s, re.DOTALL) - except re.error, e: - msg = "Regular expression error in %s: %s" - raise re.error, msg % (repr(s), e[0]) - if expr.match(lines): - return 1 - -try: - import difflib -except ImportError: - pass -else: - def simple_diff(a, b, fromfile='', tofile='', - fromfiledate='', tofiledate='', n=3, lineterm='\n'): - """ - A function with the same calling signature as difflib.context_diff - (diff -c) and difflib.unified_diff (diff -u) but which prints - output like the simple, unadorned 'diff" command. - """ - sm = difflib.SequenceMatcher(None, a, b) - def comma(x1, x2): - return x1+1 == x2 and str(x2) or '%s,%s' % (x1+1, x2) - result = [] - for op, a1, a2, b1, b2 in sm.get_opcodes(): - if op == 'delete': - result.append("%sd%d" % (comma(a1, a2), b1)) - result.extend(map(lambda l: '< ' + l, a[a1:a2])) - elif op == 'insert': - result.append("%da%s" % (a1, comma(b1, b2))) - result.extend(map(lambda l: '> ' + l, b[b1:b2])) - elif op == 'replace': - result.append("%sc%s" % (comma(a1, a2), comma(b1, b2))) - result.extend(map(lambda l: '< ' + l, a[a1:a2])) - result.append('---') - result.extend(map(lambda l: '> ' + l, b[b1:b2])) - return result - -def diff_re(a, b, fromfile='', tofile='', - fromfiledate='', tofiledate='', n=3, lineterm='\n'): - """ - A simple "diff" of two sets of lines when the expected lines - are regular expressions. This is a really dumb thing that - just compares each line in turn, so it doesn't look for - chunks of matching lines and the like--but at least it lets - you know exactly which line first didn't compare correctl... - """ - result = [] - diff = len(a) - len(b) - if diff < 0: - a = a + ['']*(-diff) - elif diff > 0: - b = b + ['']*diff - i = 0 - for aline, bline in zip(a, b): - s = "^" + aline + "$" - try: - expr = re.compile(s) - except re.error, e: - msg = "Regular expression error in %s: %s" - raise re.error, msg % (repr(s), e[0]) - if not expr.search(bline): - result.append("%sc%s" % (i+1, i+1)) - result.append('< ' + repr(a[i])) - result.append('---') - result.append('> ' + repr(b[i])) - i = i+1 - return result - -if os.name == 'java': - - python_executable = os.path.join(sys.prefix, 'jython') - -else: - - python_executable = sys.executable - -if sys.platform == 'win32': - - default_sleep_seconds = 2 - - def where_is(file, path=None, pathext=None): - if path is None: - path = os.environ['PATH'] - if is_String(path): - path = string.split(path, os.pathsep) - if pathext is None: - pathext = os.environ['PATHEXT'] - if is_String(pathext): - pathext = string.split(pathext, os.pathsep) - for ext in pathext: - if string.lower(ext) == string.lower(file[-len(ext):]): - pathext = [''] - break - for dir in path: - f = os.path.join(dir, file) - for ext in pathext: - fext = f + ext - if os.path.isfile(fext): - return fext - return None - -else: - - def where_is(file, path=None, pathext=None): - if path is None: - path = os.environ['PATH'] - if is_String(path): - path = string.split(path, os.pathsep) - for dir in path: - f = os.path.join(dir, file) - if os.path.isfile(f): - try: - st = os.stat(f) - except OSError: - continue - if stat.S_IMODE(st[stat.ST_MODE]) & 0111: - return f - return None - - default_sleep_seconds = 1 - - - -try: - import subprocess -except ImportError: - # The subprocess module doesn't exist in this version of Python, - # so we're going to cobble up something that looks just enough - # like its API for our purposes below. - import new - - subprocess = new.module('subprocess') - - subprocess.PIPE = 'PIPE' - subprocess.STDOUT = 'STDOUT' - subprocess.mswindows = (sys.platform == 'win32') - - try: - import popen2 - popen2.Popen3 - except AttributeError: - class Popen3: - universal_newlines = 1 - def __init__(self, command, **kw): - if sys.platform == 'win32' and command[0] == '"': - command = '"' + command + '"' - (stdin, stdout, stderr) = os.popen3(' ' + command) - self.stdin = stdin - self.stdout = stdout - self.stderr = stderr - def close_output(self): - self.stdout.close() - self.resultcode = self.stderr.close() - def wait(self): - resultcode = self.resultcode - if os.WIFEXITED(resultcode): - return os.WEXITSTATUS(resultcode) - elif os.WIFSIGNALED(resultcode): - return os.WTERMSIG(resultcode) - else: - return None - - else: - try: - popen2.Popen4 - except AttributeError: - # A cribbed Popen4 class, with some retrofitted code from - # the Python 1.5 Popen3 class methods to do certain things - # by hand. - class Popen4(popen2.Popen3): - childerr = None - - def __init__(self, cmd, bufsize=-1): - p2cread, p2cwrite = os.pipe() - c2pread, c2pwrite = os.pipe() - self.pid = os.fork() - if self.pid == 0: - # Child - os.dup2(p2cread, 0) - os.dup2(c2pwrite, 1) - os.dup2(c2pwrite, 2) - for i in range(3, popen2.MAXFD): - try: - os.close(i) - except: pass - try: - os.execvp(cmd[0], cmd) - finally: - os._exit(1) - # Shouldn't come here, I guess - os._exit(1) - os.close(p2cread) - self.tochild = os.fdopen(p2cwrite, 'w', bufsize) - os.close(c2pwrite) - self.fromchild = os.fdopen(c2pread, 'r', bufsize) - popen2._active.append(self) - - popen2.Popen4 = Popen4 - - class Popen3(popen2.Popen3, popen2.Popen4): - universal_newlines = 1 - def __init__(self, command, **kw): - if kw.get('stderr') == 'STDOUT': - apply(popen2.Popen4.__init__, (self, command, 1)) - else: - apply(popen2.Popen3.__init__, (self, command, 1)) - self.stdin = self.tochild - self.stdout = self.fromchild - self.stderr = self.childerr - def wait(self, *args, **kw): - resultcode = apply(popen2.Popen3.wait, (self,)+args, kw) - if os.WIFEXITED(resultcode): - return os.WEXITSTATUS(resultcode) - elif os.WIFSIGNALED(resultcode): - return os.WTERMSIG(resultcode) - else: - return None - - subprocess.Popen = Popen3 - - - -# From Josiah Carlson, -# ASPN : Python Cookbook : Module to allow Asynchronous subprocess use on Windows and Posix platforms -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 - -PIPE = subprocess.PIPE - -if subprocess.mswindows: - from win32file import ReadFile, WriteFile - from win32pipe import PeekNamedPipe - import msvcrt -else: - import select - import fcntl - - try: fcntl.F_GETFL - except AttributeError: fcntl.F_GETFL = 3 - - try: fcntl.F_SETFL - except AttributeError: fcntl.F_SETFL = 4 - -class Popen(subprocess.Popen): - def recv(self, maxsize=None): - return self._recv('stdout', maxsize) - - def recv_err(self, maxsize=None): - return self._recv('stderr', maxsize) - - def send_recv(self, input='', maxsize=None): - return self.send(input), self.recv(maxsize), self.recv_err(maxsize) - - def get_conn_maxsize(self, which, maxsize): - if maxsize is None: - maxsize = 1024 - elif maxsize < 1: - maxsize = 1 - return getattr(self, which), maxsize - - def _close(self, which): - getattr(self, which).close() - setattr(self, which, None) - - if subprocess.mswindows: - def send(self, input): - if not self.stdin: - return None - - try: - x = msvcrt.get_osfhandle(self.stdin.fileno()) - (errCode, written) = WriteFile(x, input) - except ValueError: - return self._close('stdin') - except (subprocess.pywintypes.error, Exception), why: - if why[0] in (109, errno.ESHUTDOWN): - return self._close('stdin') - raise - - return written - - def _recv(self, which, maxsize): - conn, maxsize = self.get_conn_maxsize(which, maxsize) - if conn is None: - return None - - try: - x = msvcrt.get_osfhandle(conn.fileno()) - (read, nAvail, nMessage) = PeekNamedPipe(x, 0) - if maxsize < nAvail: - nAvail = maxsize - if nAvail > 0: - (errCode, read) = ReadFile(x, nAvail, None) - except ValueError: - return self._close(which) - except (subprocess.pywintypes.error, Exception), why: - if why[0] in (109, errno.ESHUTDOWN): - return self._close(which) - raise - - #if self.universal_newlines: - # read = self._translate_newlines(read) - return read - - else: - def send(self, input): - if not self.stdin: - return None - - if not select.select([], [self.stdin], [], 0)[1]: - return 0 - - try: - written = os.write(self.stdin.fileno(), input) - except OSError, why: - if why[0] == errno.EPIPE: #broken pipe - return self._close('stdin') - raise - - return written - - def _recv(self, which, maxsize): - conn, maxsize = self.get_conn_maxsize(which, maxsize) - if conn is None: - return None - - try: - flags = fcntl.fcntl(conn, fcntl.F_GETFL) - except TypeError: - flags = None - else: - if not conn.closed: - fcntl.fcntl(conn, fcntl.F_SETFL, flags| os.O_NONBLOCK) - - try: - if not select.select([conn], [], [], 0)[0]: - return '' - - r = conn.read(maxsize) - if not r: - return self._close(which) - - #if self.universal_newlines: - # r = self._translate_newlines(r) - return r - finally: - if not conn.closed and not flags is None: - fcntl.fcntl(conn, fcntl.F_SETFL, flags) - -disconnect_message = "Other end disconnected!" - -def recv_some(p, t=.1, e=1, tr=5, stderr=0): - if tr < 1: - tr = 1 - x = time.time()+t - y = [] - r = '' - pr = p.recv - if stderr: - pr = p.recv_err - while time.time() < x or r: - r = pr() - if r is None: - if e: - raise Exception(disconnect_message) - else: - break - elif r: - y.append(r) - else: - time.sleep(max((x-time.time())/tr, 0)) - return ''.join(y) - -# TODO(3.0: rewrite to use memoryview() -def send_all(p, data): - while len(data): - sent = p.send(data) - if sent is None: - raise Exception(disconnect_message) - data = buffer(data, sent) - - - -class TestCmd(object): - """Class TestCmd - """ - - def __init__(self, description = None, - program = None, - interpreter = None, - workdir = None, - subdir = None, - verbose = None, - match = None, - diff = None, - combine = 0, - universal_newlines = 1): - self._cwd = os.getcwd() - self.description_set(description) - self.program_set(program) - self.interpreter_set(interpreter) - if verbose is None: - try: - verbose = max( 0, int(os.environ.get('TESTCMD_VERBOSE', 0)) ) - except ValueError: - verbose = 0 - self.verbose_set(verbose) - self.combine = combine - self.universal_newlines = universal_newlines - if not match is None: - self.match_function = match - else: - self.match_function = match_re - if not diff is None: - self.diff_function = diff - else: - try: - difflib - except NameError: - pass - else: - self.diff_function = simple_diff - #self.diff_function = difflib.context_diff - #self.diff_function = difflib.unified_diff - self._dirlist = [] - self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0} - if os.environ.has_key('PRESERVE') and not os.environ['PRESERVE'] is '': - self._preserve['pass_test'] = os.environ['PRESERVE'] - self._preserve['fail_test'] = os.environ['PRESERVE'] - self._preserve['no_result'] = os.environ['PRESERVE'] - else: - try: - self._preserve['pass_test'] = os.environ['PRESERVE_PASS'] - except KeyError: - pass - try: - self._preserve['fail_test'] = os.environ['PRESERVE_FAIL'] - except KeyError: - pass - try: - self._preserve['no_result'] = os.environ['PRESERVE_NO_RESULT'] - except KeyError: - pass - self._stdout = [] - self._stderr = [] - self.status = None - self.condition = 'no_result' - self.workdir_set(workdir) - self.subdir(subdir) - - def __del__(self): - self.cleanup() - - def __repr__(self): - return "%x" % id(self) - - banner_char = '=' - banner_width = 80 - - def banner(self, s, width=None): - if width is None: - width = self.banner_width - return s + self.banner_char * (width - len(s)) - - if os.name == 'posix': - - def escape(self, arg): - "escape shell special characters" - slash = '\\' - special = '"$' - - arg = string.replace(arg, slash, slash+slash) - for c in special: - arg = string.replace(arg, c, slash+c) - - if re_space.search(arg): - arg = '"' + arg + '"' - return arg - - else: - - # Windows does not allow special characters in file names - # anyway, so no need for an escape function, we will just quote - # the arg. - def escape(self, arg): - if re_space.search(arg): - arg = '"' + arg + '"' - return arg - - def canonicalize(self, path): - if is_List(path): - path = apply(os.path.join, tuple(path)) - if not os.path.isabs(path): - path = os.path.join(self.workdir, path) - return path - - def chmod(self, path, mode): - """Changes permissions on the specified file or directory - path name.""" - path = self.canonicalize(path) - os.chmod(path, mode) - - def cleanup(self, condition = None): - """Removes any temporary working directories for the specified - TestCmd environment. If the environment variable PRESERVE was - set when the TestCmd environment was created, temporary working - directories are not removed. If any of the environment variables - PRESERVE_PASS, PRESERVE_FAIL, or PRESERVE_NO_RESULT were set - when the TestCmd environment was created, then temporary working - directories are not removed if the test passed, failed, or had - no result, respectively. Temporary working directories are also - preserved for conditions specified via the preserve method. - - Typically, this method is not called directly, but is used when - the script exits to clean up temporary working directories as - appropriate for the exit status. - """ - if not self._dirlist: - return - os.chdir(self._cwd) - self.workdir = None - if condition is None: - condition = self.condition - if self._preserve[condition]: - for dir in self._dirlist: - print "Preserved directory", dir - else: - list = self._dirlist[:] - list.reverse() - for dir in list: - self.writable(dir, 1) - shutil.rmtree(dir, ignore_errors = 1) - self._dirlist = [] - - try: - global _Cleanup - _Cleanup.remove(self) - except (AttributeError, ValueError): - pass - - def command_args(self, program = None, - interpreter = None, - arguments = None): - if program: - if type(program) == type('') and not os.path.isabs(program): - program = os.path.join(self._cwd, program) - else: - program = self.program - if not interpreter: - interpreter = self.interpreter - if not type(program) in [type([]), type(())]: - program = [program] - cmd = list(program) - if interpreter: - if not type(interpreter) in [type([]), type(())]: - interpreter = [interpreter] - cmd = list(interpreter) + cmd - if arguments: - if type(arguments) == type(''): - arguments = string.split(arguments) - cmd.extend(arguments) - return cmd - - def description_set(self, description): - """Set the description of the functionality being tested. - """ - self.description = description - - try: - difflib - except NameError: - def diff(self, a, b, name, *args, **kw): - print self.banner('Expected %s' % name) - print a - print self.banner('Actual %s' % name) - print b - else: - def diff(self, a, b, name, *args, **kw): - print self.banner(name) - args = (a.splitlines(), b.splitlines()) + args - lines = apply(self.diff_function, args, kw) - for l in lines: - print l - - def fail_test(self, condition = 1, function = None, skip = 0): - """Cause the test to fail. - """ - if not condition: - return - self.condition = 'fail_test' - fail_test(self = self, - condition = condition, - function = function, - skip = skip) - - def interpreter_set(self, interpreter): - """Set the program to be used to interpret the program - under test as a script. - """ - self.interpreter = interpreter - - def match(self, lines, matches): - """Compare actual and expected file contents. - """ - return self.match_function(lines, matches) - - def match_exact(self, lines, matches): - """Compare actual and expected file contents. - """ - return match_exact(lines, matches) - - def match_re(self, lines, res): - """Compare actual and expected file contents. - """ - return match_re(lines, res) - - def match_re_dotall(self, lines, res): - """Compare actual and expected file contents. - """ - return match_re_dotall(lines, res) - - def no_result(self, condition = 1, function = None, skip = 0): - """Report that the test could not be run. - """ - if not condition: - return - self.condition = 'no_result' - no_result(self = self, - condition = condition, - function = function, - skip = skip) - - def pass_test(self, condition = 1, function = None): - """Cause the test to pass. - """ - if not condition: - return - self.condition = 'pass_test' - pass_test(self = self, condition = condition, function = function) - - def preserve(self, *conditions): - """Arrange for the temporary working directories for the - specified TestCmd environment to be preserved for one or more - conditions. If no conditions are specified, arranges for - the temporary working directories to be preserved for all - conditions. - """ - if conditions is (): - conditions = ('pass_test', 'fail_test', 'no_result') - for cond in conditions: - self._preserve[cond] = 1 - - def program_set(self, program): - """Set the executable program or script to be tested. - """ - if program and not os.path.isabs(program): - program = os.path.join(self._cwd, program) - self.program = program - - def read(self, file, mode = 'rb'): - """Reads and returns the contents of the specified file name. - The file name may be a list, in which case the elements are - concatenated with the os.path.join() method. The file is - assumed to be under the temporary working directory unless it - is an absolute path name. The I/O mode for the file may - be specified; it must begin with an 'r'. The default is - 'rb' (binary read). - """ - file = self.canonicalize(file) - if mode[0] != 'r': - raise ValueError, "mode must begin with 'r'" - return open(file, mode).read() - - def rmdir(self, dir): - """Removes the specified dir name. - The dir name may be a list, in which case the elements are - concatenated with the os.path.join() method. The dir is - assumed to be under the temporary working directory unless it - is an absolute path name. - The dir must be empty. - """ - dir = self.canonicalize(dir) - os.rmdir(dir) - - def start(self, program = None, - interpreter = None, - arguments = None, - universal_newlines = None, - **kw): - """ - Starts a program or script for the test environment. - - The specified program will have the original directory - prepended unless it is enclosed in a [list]. - """ - cmd = self.command_args(program, interpreter, arguments) - cmd_string = string.join(map(self.escape, cmd), ' ') - if self.verbose: - sys.stderr.write(cmd_string + "\n") - if universal_newlines is None: - universal_newlines = self.universal_newlines - - combine = kw.get('combine', self.combine) - if combine: - stderr_value = subprocess.STDOUT - else: - stderr_value = subprocess.PIPE - - return Popen(cmd, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=stderr_value, - universal_newlines=universal_newlines) - - def finish(self, popen, **kw): - """ - Finishes and waits for the process being run under control of - the specified popen argument, recording the exit status, - standard output and error output. - """ - popen.stdin.close() - self.status = popen.wait() - if not self.status: - self.status = 0 - self._stdout.append(popen.stdout.read()) - if popen.stderr: - stderr = popen.stderr.read() - else: - stderr = '' - self._stderr.append(stderr) - - def run(self, program = None, - interpreter = None, - arguments = None, - chdir = None, - stdin = None, - universal_newlines = None): - """Runs a test of the program or script for the test - environment. Standard output and error output are saved for - future retrieval via the stdout() and stderr() methods. - - The specified program will have the original directory - prepended unless it is enclosed in a [list]. - """ - if chdir: - oldcwd = os.getcwd() - if not os.path.isabs(chdir): - chdir = os.path.join(self.workpath(chdir)) - if self.verbose: - sys.stderr.write("chdir(" + chdir + ")\n") - os.chdir(chdir) - p = self.start(program, interpreter, arguments, universal_newlines) - if stdin: - if is_List(stdin): - for line in stdin: - p.stdin.write(line) - else: - p.stdin.write(stdin) - p.stdin.close() - - out = p.stdout.read() - if p.stderr is None: - err = '' - else: - err = p.stderr.read() - try: - close_output = p.close_output - except AttributeError: - p.stdout.close() - if not p.stderr is None: - p.stderr.close() - else: - close_output() - - self._stdout.append(out) - self._stderr.append(err) - - self.status = p.wait() - if not self.status: - self.status = 0 - - if chdir: - os.chdir(oldcwd) - if self.verbose >= 2: - write = sys.stdout.write - write('============ STATUS: %d\n' % self.status) - out = self.stdout() - if out or self.verbose >= 3: - write('============ BEGIN STDOUT (len=%d):\n' % len(out)) - write(out) - write('============ END STDOUT\n') - err = self.stderr() - if err or self.verbose >= 3: - write('============ BEGIN STDERR (len=%d)\n' % len(err)) - write(err) - write('============ END STDERR\n') - - def sleep(self, seconds = default_sleep_seconds): - """Sleeps at least the specified number of seconds. If no - number is specified, sleeps at least the minimum number of - seconds necessary to advance file time stamps on the current - system. Sleeping more seconds is all right. - """ - time.sleep(seconds) - - def stderr(self, run = None): - """Returns the error output from the specified run number. - If there is no specified run number, then returns the error - output of the last run. If the run number is less than zero, - then returns the error output from that many runs back from the - current run. - """ - if not run: - run = len(self._stderr) - elif run < 0: - run = len(self._stderr) + run - run = run - 1 - return self._stderr[run] - - def stdout(self, run = None): - """Returns the standard output from the specified run number. - If there is no specified run number, then returns the standard - output of the last run. If the run number is less than zero, - then returns the standard output from that many runs back from - the current run. - """ - if not run: - run = len(self._stdout) - elif run < 0: - run = len(self._stdout) + run - run = run - 1 - return self._stdout[run] - - def subdir(self, *subdirs): - """Create new subdirectories under the temporary working - directory, one for each argument. An argument may be a list, - in which case the list elements are concatenated using the - os.path.join() method. Subdirectories multiple levels deep - must be created using a separate argument for each level: - - test.subdir('sub', ['sub', 'dir'], ['sub', 'dir', 'ectory']) - - Returns the number of subdirectories actually created. - """ - count = 0 - for sub in subdirs: - if sub is None: - continue - if is_List(sub): - sub = apply(os.path.join, tuple(sub)) - new = os.path.join(self.workdir, sub) - try: - os.mkdir(new) - except OSError: - pass - else: - count = count + 1 - return count - - def symlink(self, target, link): - """Creates a symlink to the specified target. - The link name may be a list, in which case the elements are - concatenated with the os.path.join() method. The link is - assumed to be under the temporary working directory unless it - is an absolute path name. The target is *not* assumed to be - under the temporary working directory. - """ - link = self.canonicalize(link) - os.symlink(target, link) - - def tempdir(self, path=None): - """Creates a temporary directory. - A unique directory name is generated if no path name is specified. - The directory is created, and will be removed when the TestCmd - object is destroyed. - """ - if path is None: - try: - path = tempfile.mktemp(prefix=tempfile.template) - except TypeError: - path = tempfile.mktemp() - os.mkdir(path) - - # Symlinks in the path will report things - # differently from os.getcwd(), so chdir there - # and back to fetch the canonical path. - cwd = os.getcwd() - try: - os.chdir(path) - path = os.getcwd() - finally: - os.chdir(cwd) - - # Uppercase the drive letter since the case of drive - # letters is pretty much random on win32: - drive,rest = os.path.splitdrive(path) - if drive: - path = string.upper(drive) + rest - - # - self._dirlist.append(path) - global _Cleanup - try: - _Cleanup.index(self) - except ValueError: - _Cleanup.append(self) - - return path - - def touch(self, path, mtime=None): - """Updates the modification time on the specified file or - directory path name. The default is to update to the - current time if no explicit modification time is specified. - """ - path = self.canonicalize(path) - atime = os.path.getatime(path) - if mtime is None: - mtime = time.time() - os.utime(path, (atime, mtime)) - - def unlink(self, file): - """Unlinks the specified file name. - The file name may be a list, in which case the elements are - concatenated with the os.path.join() method. The file is - assumed to be under the temporary working directory unless it - is an absolute path name. - """ - file = self.canonicalize(file) - os.unlink(file) - - def verbose_set(self, verbose): - """Set the verbose level. - """ - self.verbose = verbose - - def where_is(self, file, path=None, pathext=None): - """Find an executable file. - """ - if is_List(file): - file = apply(os.path.join, tuple(file)) - if not os.path.isabs(file): - file = where_is(file, path, pathext) - return file - - def workdir_set(self, path): - """Creates a temporary working directory with the specified - path name. If the path is a null string (''), a unique - directory name is created. - """ - if (path != None): - if path == '': - path = None - path = self.tempdir(path) - self.workdir = path - - def workpath(self, *args): - """Returns the absolute path name to a subdirectory or file - within the current temporary working directory. Concatenates - the temporary working directory name with the specified - arguments using the os.path.join() method. - """ - return apply(os.path.join, (self.workdir,) + tuple(args)) - - def readable(self, top, read=1): - """Make the specified directory tree readable (read == 1) - or not (read == None). - - This method has no effect on Windows systems, which use a - completely different mechanism to control file readability. - """ - - if sys.platform == 'win32': - return - - if read: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IREAD)) - else: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IREAD)) - - if os.path.isfile(top): - # If it's a file, that's easy, just chmod it. - do_chmod(top) - elif read: - # It's a directory and we're trying to turn on read - # permission, so it's also pretty easy, just chmod the - # directory and then chmod every entry on our walk down the - # tree. Because os.path.walk() is top-down, we'll enable - # read permission on any directories that have it disabled - # before os.path.walk() tries to list their contents. - do_chmod(top) - - def chmod_entries(arg, dirname, names, do_chmod=do_chmod): - for n in names: - do_chmod(os.path.join(dirname, n)) - - os.path.walk(top, chmod_entries, None) - else: - # It's a directory and we're trying to turn off read - # permission, which means we have to chmod the directoreis - # in the tree bottom-up, lest disabling read permission from - # the top down get in the way of being able to get at lower - # parts of the tree. But os.path.walk() visits things top - # down, so we just use an object to collect a list of all - # of the entries in the tree, reverse the list, and then - # chmod the reversed (bottom-up) list. - col = Collector(top) - os.path.walk(top, col, None) - col.entries.reverse() - for d in col.entries: do_chmod(d) - - def writable(self, top, write=1): - """Make the specified directory tree writable (write == 1) - or not (write == None). - """ - - if sys.platform == 'win32': - - if write: - def do_chmod(fname): - try: os.chmod(fname, stat.S_IWRITE) - except OSError: pass - else: - def do_chmod(fname): - try: os.chmod(fname, stat.S_IREAD) - except OSError: pass - - else: - - if write: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|0200)) - else: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~0200)) - - if os.path.isfile(top): - do_chmod(top) - else: - col = Collector(top) - os.path.walk(top, col, None) - for d in col.entries: do_chmod(d) - - def executable(self, top, execute=1): - """Make the specified directory tree executable (execute == 1) - or not (execute == None). - - This method has no effect on Windows systems, which use a - completely different mechanism to control file executability. - """ - - if sys.platform == 'win32': - return - - if execute: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IEXEC)) - else: - def do_chmod(fname): - try: st = os.stat(fname) - except OSError: pass - else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IEXEC)) - - if os.path.isfile(top): - # If it's a file, that's easy, just chmod it. - do_chmod(top) - elif execute: - # It's a directory and we're trying to turn on execute - # permission, so it's also pretty easy, just chmod the - # directory and then chmod every entry on our walk down the - # tree. Because os.path.walk() is top-down, we'll enable - # execute permission on any directories that have it disabled - # before os.path.walk() tries to list their contents. - do_chmod(top) - - def chmod_entries(arg, dirname, names, do_chmod=do_chmod): - for n in names: - do_chmod(os.path.join(dirname, n)) - - os.path.walk(top, chmod_entries, None) - else: - # It's a directory and we're trying to turn off execute - # permission, which means we have to chmod the directories - # in the tree bottom-up, lest disabling execute permission from - # the top down get in the way of being able to get at lower - # parts of the tree. But os.path.walk() visits things top - # down, so we just use an object to collect a list of all - # of the entries in the tree, reverse the list, and then - # chmod the reversed (bottom-up) list. - col = Collector(top) - os.path.walk(top, col, None) - col.entries.reverse() - for d in col.entries: do_chmod(d) - - def write(self, file, content, mode = 'wb'): - """Writes the specified content text (second argument) to the - specified file name (first argument). The file name may be - a list, in which case the elements are concatenated with the - os.path.join() method. The file is created under the temporary - working directory. Any subdirectories in the path must already - exist. The I/O mode for the file may be specified; it must - begin with a 'w'. The default is 'wb' (binary write). - """ - file = self.canonicalize(file) - if mode[0] != 'w': - raise ValueError, "mode must begin with 'w'" - open(file, mode).write(content) - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCommon.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCommon.py deleted file mode 100644 index e5aa4646..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestCommon.py +++ /dev/null @@ -1,581 +0,0 @@ -""" -TestCommon.py: a testing framework for commands and scripts - with commonly useful error handling - -The TestCommon module provides a simple, high-level interface for writing -tests of executable commands and scripts, especially commands and scripts -that interact with the file system. All methods throw exceptions and -exit on failure, with useful error messages. This makes a number of -explicit checks unnecessary, making the test scripts themselves simpler -to write and easier to read. - -The TestCommon class is a subclass of the TestCmd class. In essence, -TestCommon is a wrapper that handles common TestCmd error conditions in -useful ways. You can use TestCommon directly, or subclass it for your -program and add additional (or override) methods to tailor it to your -program's specific needs. Alternatively, the TestCommon class serves -as a useful example of how to define your own TestCmd subclass. - -As a subclass of TestCmd, TestCommon provides access to all of the -variables and methods from the TestCmd module. Consequently, you can -use any variable or method documented in the TestCmd module without -having to explicitly import TestCmd. - -A TestCommon environment object is created via the usual invocation: - - import TestCommon - test = TestCommon.TestCommon() - -You can use all of the TestCmd keyword arguments when instantiating a -TestCommon object; see the TestCmd documentation for details. - -Here is an overview of the methods and keyword arguments that are -provided by the TestCommon class: - - test.must_be_writable('file1', ['file2', ...]) - - test.must_contain('file', 'required text\n') - - test.must_contain_all_lines(output, lines, ['title', find]) - - test.must_contain_any_line(output, lines, ['title', find]) - - test.must_exist('file1', ['file2', ...]) - - test.must_match('file', "expected contents\n") - - test.must_not_contain('file', 'required text\n') - - test.must_not_be_writable('file1', ['file2', ...]) - - test.must_not_contain_any_line(output, lines, ['title', find]) - - test.must_not_exist('file1', ['file2', ...]) - - test.run(options = "options to be prepended to arguments", - stdout = "expected standard output from the program", - stderr = "expected error output from the program", - status = expected_status, - match = match_function) - -The TestCommon module also provides the following variables - - TestCommon.python_executable - TestCommon.exe_suffix - TestCommon.obj_suffix - TestCommon.shobj_prefix - TestCommon.shobj_suffix - TestCommon.lib_prefix - TestCommon.lib_suffix - TestCommon.dll_prefix - TestCommon.dll_suffix - -""" - -# Copyright 2000, 2001, 2002, 2003, 2004 Steven Knight -# This module is free software, and you may redistribute it and/or modify -# it under the same terms as Python itself, so long as this copyright message -# and disclaimer are retained in their original form. -# -# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, -# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF -# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, -# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, -# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - -__author__ = "Steven Knight " -__revision__ = "TestCommon.py 0.36.D001 2009/07/24 08:45:26 knight" -__version__ = "0.36" - -import copy -import os -import os.path -import stat -import string -import sys -import types -import UserList - -from TestCmd import * -from TestCmd import __all__ - -__all__.extend([ 'TestCommon', - 'exe_suffix', - 'obj_suffix', - 'shobj_prefix', - 'shobj_suffix', - 'lib_prefix', - 'lib_suffix', - 'dll_prefix', - 'dll_suffix', - ]) - -# Variables that describe the prefixes and suffixes on this system. -if sys.platform == 'win32': - exe_suffix = '.exe' - obj_suffix = '.obj' - shobj_suffix = '.obj' - shobj_prefix = '' - lib_prefix = '' - lib_suffix = '.lib' - dll_prefix = '' - dll_suffix = '.dll' -elif sys.platform == 'cygwin': - exe_suffix = '.exe' - obj_suffix = '.o' - shobj_suffix = '.os' - shobj_prefix = '' - lib_prefix = 'lib' - lib_suffix = '.a' - dll_prefix = '' - dll_suffix = '.dll' -elif string.find(sys.platform, 'irix') != -1: - exe_suffix = '' - obj_suffix = '.o' - shobj_suffix = '.o' - shobj_prefix = '' - lib_prefix = 'lib' - lib_suffix = '.a' - dll_prefix = 'lib' - dll_suffix = '.so' -elif string.find(sys.platform, 'darwin') != -1: - exe_suffix = '' - obj_suffix = '.o' - shobj_suffix = '.os' - shobj_prefix = '' - lib_prefix = 'lib' - lib_suffix = '.a' - dll_prefix = 'lib' - dll_suffix = '.dylib' -elif string.find(sys.platform, 'sunos') != -1: - exe_suffix = '' - obj_suffix = '.o' - shobj_suffix = '.os' - shobj_prefix = 'so_' - lib_prefix = 'lib' - lib_suffix = '.a' - dll_prefix = 'lib' - dll_suffix = '.dylib' -else: - exe_suffix = '' - obj_suffix = '.o' - shobj_suffix = '.os' - shobj_prefix = '' - lib_prefix = 'lib' - lib_suffix = '.a' - dll_prefix = 'lib' - dll_suffix = '.so' - -def is_List(e): - return type(e) is types.ListType \ - or isinstance(e, UserList.UserList) - -def is_writable(f): - mode = os.stat(f)[stat.ST_MODE] - return mode & stat.S_IWUSR - -def separate_files(flist): - existing = [] - missing = [] - for f in flist: - if os.path.exists(f): - existing.append(f) - else: - missing.append(f) - return existing, missing - -if os.name == 'posix': - def _failed(self, status = 0): - if self.status is None or status is None: - return None - return _status(self) != status - def _status(self): - return self.status -elif os.name == 'nt': - def _failed(self, status = 0): - return not (self.status is None or status is None) and \ - self.status != status - def _status(self): - return self.status - -class TestCommon(TestCmd): - - # Additional methods from the Perl Test::Cmd::Common module - # that we may wish to add in the future: - # - # $test->subdir('subdir', ...); - # - # $test->copy('src_file', 'dst_file'); - - def __init__(self, **kw): - """Initialize a new TestCommon instance. This involves just - calling the base class initialization, and then changing directory - to the workdir. - """ - apply(TestCmd.__init__, [self], kw) - os.chdir(self.workdir) - - def must_be_writable(self, *files): - """Ensures that the specified file(s) exist and are writable. - An individual file can be specified as a list of directory names, - in which case the pathname will be constructed by concatenating - them. Exits FAILED if any of the files does not exist or is - not writable. - """ - files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files) - existing, missing = separate_files(files) - unwritable = filter(lambda x, iw=is_writable: not iw(x), existing) - if missing: - print "Missing files: `%s'" % string.join(missing, "', `") - if unwritable: - print "Unwritable files: `%s'" % string.join(unwritable, "', `") - self.fail_test(missing + unwritable) - - def must_contain(self, file, required, mode = 'rb'): - """Ensures that the specified file contains the required text. - """ - file_contents = self.read(file, mode) - contains = (string.find(file_contents, required) != -1) - if not contains: - print "File `%s' does not contain required string." % file - print self.banner('Required string ') - print required - print self.banner('%s contents ' % file) - print file_contents - self.fail_test(not contains) - - def must_contain_all_lines(self, output, lines, title=None, find=None): - """Ensures that the specified output string (first argument) - contains all of the specified lines (second argument). - - An optional third argument can be used to describe the type - of output being searched, and only shows up in failure output. - - An optional fourth argument can be used to supply a different - function, of the form "find(line, output), to use when searching - for lines in the output. - """ - if find is None: - find = lambda o, l: string.find(o, l) != -1 - missing = [] - for line in lines: - if not find(output, line): - missing.append(line) - - if missing: - if title is None: - title = 'output' - sys.stdout.write("Missing expected lines from %s:\n" % title) - for line in missing: - sys.stdout.write(' ' + repr(line) + '\n') - sys.stdout.write(self.banner(title + ' ')) - sys.stdout.write(output) - self.fail_test() - - def must_contain_any_line(self, output, lines, title=None, find=None): - """Ensures that the specified output string (first argument) - contains at least one of the specified lines (second argument). - - An optional third argument can be used to describe the type - of output being searched, and only shows up in failure output. - - An optional fourth argument can be used to supply a different - function, of the form "find(line, output), to use when searching - for lines in the output. - """ - if find is None: - find = lambda o, l: string.find(o, l) != -1 - for line in lines: - if find(output, line): - return - - if title is None: - title = 'output' - sys.stdout.write("Missing any expected line from %s:\n" % title) - for line in lines: - sys.stdout.write(' ' + repr(line) + '\n') - sys.stdout.write(self.banner(title + ' ')) - sys.stdout.write(output) - self.fail_test() - - def must_contain_lines(self, lines, output, title=None): - # Deprecated; retain for backwards compatibility. - return self.must_contain_all_lines(output, lines, title) - - def must_exist(self, *files): - """Ensures that the specified file(s) must exist. An individual - file be specified as a list of directory names, in which case the - pathname will be constructed by concatenating them. Exits FAILED - if any of the files does not exist. - """ - files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files) - missing = filter(lambda x: not os.path.exists(x), files) - if missing: - print "Missing files: `%s'" % string.join(missing, "', `") - self.fail_test(missing) - - def must_match(self, file, expect, mode = 'rb'): - """Matches the contents of the specified file (first argument) - against the expected contents (second argument). The expected - contents are a list of lines or a string which will be split - on newlines. - """ - file_contents = self.read(file, mode) - try: - self.fail_test(not self.match(file_contents, expect)) - except KeyboardInterrupt: - raise - except: - print "Unexpected contents of `%s'" % file - self.diff(expect, file_contents, 'contents ') - raise - - def must_not_contain(self, file, banned, mode = 'rb'): - """Ensures that the specified file doesn't contain the banned text. - """ - file_contents = self.read(file, mode) - contains = (string.find(file_contents, banned) != -1) - if contains: - print "File `%s' contains banned string." % file - print self.banner('Banned string ') - print banned - print self.banner('%s contents ' % file) - print file_contents - self.fail_test(not contains) - - def must_not_contain_any_line(self, output, lines, title=None, find=None): - """Ensures that the specified output string (first argument) - does not contain any of the specified lines (second argument). - - An optional third argument can be used to describe the type - of output being searched, and only shows up in failure output. - - An optional fourth argument can be used to supply a different - function, of the form "find(line, output), to use when searching - for lines in the output. - """ - if find is None: - find = lambda o, l: string.find(o, l) != -1 - unexpected = [] - for line in lines: - if find(output, line): - unexpected.append(line) - - if unexpected: - if title is None: - title = 'output' - sys.stdout.write("Unexpected lines in %s:\n" % title) - for line in unexpected: - sys.stdout.write(' ' + repr(line) + '\n') - sys.stdout.write(self.banner(title + ' ')) - sys.stdout.write(output) - self.fail_test() - - def must_not_contain_lines(self, lines, output, title=None): - return self.must_not_contain_any_line(output, lines, title) - - def must_not_exist(self, *files): - """Ensures that the specified file(s) must not exist. - An individual file be specified as a list of directory names, in - which case the pathname will be constructed by concatenating them. - Exits FAILED if any of the files exists. - """ - files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files) - existing = filter(os.path.exists, files) - if existing: - print "Unexpected files exist: `%s'" % string.join(existing, "', `") - self.fail_test(existing) - - - def must_not_be_writable(self, *files): - """Ensures that the specified file(s) exist and are not writable. - An individual file can be specified as a list of directory names, - in which case the pathname will be constructed by concatenating - them. Exits FAILED if any of the files does not exist or is - writable. - """ - files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files) - existing, missing = separate_files(files) - writable = filter(is_writable, existing) - if missing: - print "Missing files: `%s'" % string.join(missing, "', `") - if writable: - print "Writable files: `%s'" % string.join(writable, "', `") - self.fail_test(missing + writable) - - def _complete(self, actual_stdout, expected_stdout, - actual_stderr, expected_stderr, status, match): - """ - Post-processes running a subcommand, checking for failure - status and displaying output appropriately. - """ - if _failed(self, status): - expect = '' - if status != 0: - expect = " (expected %s)" % str(status) - print "%s returned %s%s" % (self.program, str(_status(self)), expect) - print self.banner('STDOUT ') - print actual_stdout - print self.banner('STDERR ') - print actual_stderr - self.fail_test() - if not expected_stdout is None and not match(actual_stdout, expected_stdout): - self.diff(expected_stdout, actual_stdout, 'STDOUT ') - if actual_stderr: - print self.banner('STDERR ') - print actual_stderr - self.fail_test() - if not expected_stderr is None and not match(actual_stderr, expected_stderr): - print self.banner('STDOUT ') - print actual_stdout - self.diff(expected_stderr, actual_stderr, 'STDERR ') - self.fail_test() - - def start(self, program = None, - interpreter = None, - arguments = None, - universal_newlines = None, - **kw): - """ - Starts a program or script for the test environment. - - This handles the "options" keyword argument and exceptions. - """ - try: - options = kw['options'] - del kw['options'] - except KeyError: - pass - else: - if options: - if arguments is None: - arguments = options - else: - arguments = options + " " + arguments - try: - return apply(TestCmd.start, - (self, program, interpreter, arguments, universal_newlines), - kw) - except KeyboardInterrupt: - raise - except Exception, e: - print self.banner('STDOUT ') - try: - print self.stdout() - except IndexError: - pass - print self.banner('STDERR ') - try: - print self.stderr() - except IndexError: - pass - cmd_args = self.command_args(program, interpreter, arguments) - sys.stderr.write('Exception trying to execute: %s\n' % cmd_args) - raise e - - def finish(self, popen, stdout = None, stderr = '', status = 0, **kw): - """ - Finishes and waits for the process being run under control of - the specified popen argument. Additional arguments are similar - to those of the run() method: - - stdout The expected standard output from - the command. A value of None means - don't test standard output. - - stderr The expected error output from - the command. A value of None means - don't test error output. - - status The expected exit status from the - command. A value of None means don't - test exit status. - """ - apply(TestCmd.finish, (self, popen,), kw) - match = kw.get('match', self.match) - self._complete(self.stdout(), stdout, - self.stderr(), stderr, status, match) - - def run(self, options = None, arguments = None, - stdout = None, stderr = '', status = 0, **kw): - """Runs the program under test, checking that the test succeeded. - - The arguments are the same as the base TestCmd.run() method, - with the addition of: - - options Extra options that get appended to the beginning - of the arguments. - - stdout The expected standard output from - the command. A value of None means - don't test standard output. - - stderr The expected error output from - the command. A value of None means - don't test error output. - - status The expected exit status from the - command. A value of None means don't - test exit status. - - By default, this expects a successful exit (status = 0), does - not test standard output (stdout = None), and expects that error - output is empty (stderr = ""). - """ - if options: - if arguments is None: - arguments = options - else: - arguments = options + " " + arguments - kw['arguments'] = arguments - try: - match = kw['match'] - del kw['match'] - except KeyError: - match = self.match - apply(TestCmd.run, [self], kw) - self._complete(self.stdout(), stdout, - self.stderr(), stderr, status, match) - - def skip_test(self, message="Skipping test.\n"): - """Skips a test. - - Proper test-skipping behavior is dependent on the external - TESTCOMMON_PASS_SKIPS environment variable. If set, we treat - the skip as a PASS (exit 0), and otherwise treat it as NO RESULT. - In either case, we print the specified message as an indication - that the substance of the test was skipped. - - (This was originally added to support development under Aegis. - Technically, skipping a test is a NO RESULT, but Aegis would - treat that as a test failure and prevent the change from going to - the next step. Since we ddn't want to force anyone using Aegis - to have to install absolutely every tool used by the tests, we - would actually report to Aegis that a skipped test has PASSED - so that the workflow isn't held up.) - """ - if message: - sys.stdout.write(message) - sys.stdout.flush() - pass_skips = os.environ.get('TESTCOMMON_PASS_SKIPS') - if pass_skips in [None, 0, '0']: - # skip=1 means skip this function when showing where this - # result came from. They only care about the line where the - # script called test.skip_test(), not the line number where - # we call test.no_result(). - self.no_result(skip=1) - else: - # We're under the development directory for this change, - # so this is an Aegis invocation; pass the test (exit 0). - self.pass_test() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestGyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestGyp.py deleted file mode 100644 index 5f2f8a94..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/lib/TestGyp.py +++ /dev/null @@ -1,688 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -TestGyp.py: a testing framework for GYP integration tests. -""" - -import os -import re -import shutil -import stat -import sys - -import TestCommon -from TestCommon import __all__ - -__all__.extend([ - 'TestGyp', -]) - - -class TestGypBase(TestCommon.TestCommon): - """ - Class for controlling end-to-end tests of gyp generators. - - Instantiating this class will create a temporary directory and - arrange for its destruction (via the TestCmd superclass) and - copy all of the non-gyptest files in the directory hierarchy of the - executing script. - - The default behavior is to test the 'gyp' or 'gyp.bat' file in the - current directory. An alternative may be specified explicitly on - instantiation, or by setting the TESTGYP_GYP environment variable. - - This class should be subclassed for each supported gyp generator - (format). Various abstract methods below define calling signatures - used by the test scripts to invoke builds on the generated build - configuration and to run executables generated by those builds. - """ - - build_tool = None - build_tool_list = [] - - _exe = TestCommon.exe_suffix - _obj = TestCommon.obj_suffix - shobj_ = TestCommon.shobj_prefix - _shobj = TestCommon.shobj_suffix - lib_ = TestCommon.lib_prefix - _lib = TestCommon.lib_suffix - dll_ = TestCommon.dll_prefix - _dll = TestCommon.dll_suffix - - # Constants to represent different targets. - ALL = '__all__' - DEFAULT = '__default__' - - # Constants for different target types. - EXECUTABLE = '__executable__' - STATIC_LIB = '__static_lib__' - SHARED_LIB = '__shared_lib__' - - def __init__(self, gyp=None, *args, **kw): - self.origin_cwd = os.path.abspath(os.path.dirname(sys.argv[0])) - - if not gyp: - gyp = os.environ.get('TESTGYP_GYP') - if not gyp: - if sys.platform == 'win32': - gyp = 'gyp.bat' - else: - gyp = 'gyp' - self.gyp = os.path.abspath(gyp) - - self.initialize_build_tool() - - if not kw.has_key('match'): - kw['match'] = TestCommon.match_exact - - if not kw.has_key('workdir'): - # Default behavior: the null string causes TestCmd to create - # a temporary directory for us. - kw['workdir'] = '' - - formats = kw.get('formats', []) - if kw.has_key('formats'): - del kw['formats'] - - super(TestGypBase, self).__init__(*args, **kw) - - excluded_formats = set([f for f in formats if f[0] == '!']) - included_formats = set(formats) - excluded_formats - if ('!'+self.format in excluded_formats or - included_formats and self.format not in included_formats): - msg = 'Invalid test for %r format; skipping test.\n' - self.skip_test(msg % self.format) - - self.copy_test_configuration(self.origin_cwd, self.workdir) - self.set_configuration(None) - - def built_file_must_exist(self, name, type=None, **kw): - """ - Fails the test if the specified built file name does not exist. - """ - return self.must_exist(self.built_file_path(name, type, **kw)) - - def built_file_must_not_exist(self, name, type=None, **kw): - """ - Fails the test if the specified built file name exists. - """ - return self.must_not_exist(self.built_file_path(name, type, **kw)) - - def built_file_must_match(self, name, contents, **kw): - """ - Fails the test if the contents of the specified built file name - do not match the specified contents. - """ - return self.must_match(self.built_file_path(name, **kw), contents) - - def built_file_must_not_match(self, name, contents, **kw): - """ - Fails the test if the contents of the specified built file name - match the specified contents. - """ - return self.must_not_match(self.built_file_path(name, **kw), contents) - - def copy_test_configuration(self, source_dir, dest_dir): - """ - Copies the test configuration from the specified source_dir - (the directory in which the test script lives) to the - specified dest_dir (a temporary working directory). - - This ignores all files and directories that begin with - the string 'gyptest', and all '.svn' subdirectories. - """ - for root, dirs, files in os.walk(source_dir): - if '.svn' in dirs: - dirs.remove('.svn') - dirs = [ d for d in dirs if not d.startswith('gyptest') ] - files = [ f for f in files if not f.startswith('gyptest') ] - for dirname in dirs: - source = os.path.join(root, dirname) - destination = source.replace(source_dir, dest_dir) - os.mkdir(destination) - if sys.platform != 'win32': - shutil.copystat(source, destination) - for filename in files: - source = os.path.join(root, filename) - destination = source.replace(source_dir, dest_dir) - shutil.copy2(source, destination) - - def initialize_build_tool(self): - """ - Initializes the .build_tool attribute. - - Searches the .build_tool_list for an executable name on the user's - $PATH. The first tool on the list is used as-is if nothing is found - on the current $PATH. - """ - for build_tool in self.build_tool_list: - if not build_tool: - continue - if os.path.isabs(build_tool): - self.build_tool = build_tool - return - build_tool = self.where_is(build_tool) - if build_tool: - self.build_tool = build_tool - return - - if self.build_tool_list: - self.build_tool = self.build_tool_list[0] - - def relocate(self, source, destination): - """ - Renames (relocates) the specified source (usually a directory) - to the specified destination, creating the destination directory - first if necessary. - - Note: Don't use this as a generic "rename" operation. In the - future, "relocating" parts of a GYP tree may affect the state of - the test to modify the behavior of later method calls. - """ - destination_dir = os.path.dirname(destination) - if not os.path.exists(destination_dir): - self.subdir(destination_dir) - os.rename(source, destination) - - def report_not_up_to_date(self): - """ - Reports that a build is not up-to-date. - - This provides common reporting for formats that have complicated - conditions for checking whether a build is up-to-date. Formats - that expect exact output from the command (make, scons) can - just set stdout= when they call the run_build() method. - """ - print "Build is not up-to-date:" - print self.banner('STDOUT ') - print self.stdout() - stderr = self.stderr() - if stderr: - print self.banner('STDERR ') - print stderr - - def run_gyp(self, gyp_file, *args, **kw): - """ - Runs gyp against the specified gyp_file with the specified args. - """ - # TODO: --depth=. works around Chromium-specific tree climbing. - args = ('--depth=.', '--format='+self.format, gyp_file) + args - return self.run(program=self.gyp, arguments=args, **kw) - - def run(self, *args, **kw): - """ - Executes a program by calling the superclass .run() method. - - This exists to provide a common place to filter out keyword - arguments implemented in this layer, without having to update - the tool-specific subclasses or clutter the tests themselves - with platform-specific code. - """ - if kw.has_key('SYMROOT'): - del kw['SYMROOT'] - super(TestGypBase, self).run(*args, **kw) - - def set_configuration(self, configuration): - """ - Sets the configuration, to be used for invoking the build - tool and testing potential built output. - """ - self.configuration = configuration - - def configuration_dirname(self): - if self.configuration: - return self.configuration.split('|')[0] - else: - return 'Default' - - def configuration_buildname(self): - if self.configuration: - return self.configuration - else: - return 'Default' - - # - # Abstract methods to be defined by format-specific subclasses. - # - - def build(self, gyp_file, target=None, **kw): - """ - Runs a build of the specified target against the configuration - generated from the specified gyp_file. - - A 'target' argument of None or the special value TestGyp.DEFAULT - specifies the default argument for the underlying build tool. - A 'target' argument of TestGyp.ALL specifies the 'all' target - (if any) of the underlying build tool. - """ - raise NotImplementedError - - def built_file_path(self, name, type=None, **kw): - """ - Returns a path to the specified file name, of the specified type. - """ - raise NotImplementedError - - def run_built_executable(self, name, *args, **kw): - """ - Runs an executable program built from a gyp-generated configuration. - - The specified name should be independent of any particular generator. - Subclasses should find the output executable in the appropriate - output build directory, tack on any necessary executable suffix, etc. - """ - raise NotImplementedError - - def up_to_date(self, gyp_file, target=None, **kw): - """ - Verifies that a build of the specified target is up to date. - - The subclass should implement this by calling build() - (or a reasonable equivalent), checking whatever conditions - will tell it the build was an "up to date" null build, and - failing if it isn't. - """ - raise NotImplementedError - - -class TestGypGypd(TestGypBase): - """ - Subclass for testing the GYP 'gypd' generator (spit out the - internal data structure as pretty-printed Python). - """ - format = 'gypd' - - -class TestGypMake(TestGypBase): - """ - Subclass for testing the GYP Make generator. - """ - format = 'make' - build_tool_list = ['make'] - ALL = 'all' - def build(self, gyp_file, target=None, **kw): - """ - Runs a Make build using the Makefiles generated from the specified - gyp_file. - """ - arguments = kw.get('arguments', []) - if self.configuration: - arguments.append('BUILDTYPE=' + self.configuration) - if target not in (None, self.DEFAULT): - arguments.append(target) - kw['arguments'] = arguments - return self.run(program=self.build_tool, **kw) - def up_to_date(self, gyp_file, target=None, **kw): - """ - Verifies that a build of the specified Make target is up to date. - """ - if target in (None, self.DEFAULT): - message_target = 'all' - else: - message_target = target - kw['stdout'] = "make: Nothing to be done for `%s'.\n" % message_target - return self.build(gyp_file, target, **kw) - def run_built_executable(self, name, *args, **kw): - """ - Runs an executable built by Make. - """ - configuration = self.configuration_dirname() - libdir = os.path.join('out', configuration, 'lib') - # TODO(piman): when everything is cross-compile safe, remove lib.target - os.environ['LD_LIBRARY_PATH'] = libdir + '.host:' + libdir + '.target' - # Enclosing the name in a list avoids prepending the original dir. - program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)] - return self.run(program=program, *args, **kw) - def built_file_path(self, name, type=None, **kw): - """ - Returns a path to the specified file name, of the specified type, - as built by Make. - - Built files are in the subdirectory 'out/{configuration}'. - The default is 'out/Default'. - - A chdir= keyword argument specifies the source directory - relative to which the output subdirectory can be found. - - "type" values of STATIC_LIB or SHARED_LIB append the necessary - prefixes and suffixes to a platform-independent library base name. - - A libdir= keyword argument specifies a library subdirectory other - than the default 'obj.target'. - """ - result = [] - chdir = kw.get('chdir') - if chdir: - result.append(chdir) - configuration = self.configuration_dirname() - result.extend(['out', configuration]) - if type == self.EXECUTABLE: - result.append(name + self._exe) - elif type == self.STATIC_LIB: - name = self.lib_ + name + self._lib - libdir = kw.get('libdir', 'lib') - result.extend([libdir, name]) - elif type == self.SHARED_LIB: - name = self.dll_ + name + self._dll - libdir = kw.get('libdir', 'lib.target') - result.extend([libdir, name]) - else: - result.append(name) - return self.workpath(*result) - - -class TestGypMSVS(TestGypBase): - """ - Subclass for testing the GYP Visual Studio generator. - """ - format = 'msvs' - - u = r'=== Build: 0 succeeded, 0 failed, (\d+) up-to-date, 0 skipped ===' - up_to_date_re = re.compile(u, re.M) - - # Initial None element will indicate to our .initialize_build_tool() - # method below that 'devenv' was not found on %PATH%. - # - # Note: we must use devenv.com to be able to capture build output. - # Directly executing devenv.exe only sends output to BuildLog.htm. - build_tool_list = [None, 'devenv.com'] - - def initialize_build_tool(self): - """ - Initializes the Visual Studio .build_tool parameter, searching %PATH% - and %PATHEXT% for a devenv.{exe,bat,...} executable, and falling - back to a hard-coded default (on the current drive) if necessary. - """ - super(TestGypMSVS, self).initialize_build_tool() - if not self.build_tool: - # We didn't find 'devenv' on the path. Just hard-code a default, - # and revisit this if it becomes important. - possible = [ - ('C:\\Program Files', - 'Microsoft Visual Studio 8', 'Common7', 'IDE', 'devenv.com'), - - # Note: if you're using this, set GYP_MSVS_VERSION=2008 - # to get the tests to pass. - ('C:\\Program Files (x86)', - 'Microsoft Visual Studio 9.0', 'Common7', 'IDE', 'devenv.com'), - ] - for build_tool in possible: - bt = os.path.join(*build_tool) - if os.path.exists(bt): - self.build_tool = bt - break - def build(self, gyp_file, target=None, rebuild=False, **kw): - """ - Runs a Visual Studio build using the configuration generated - from the specified gyp_file. - """ - configuration = self.configuration_buildname() - if rebuild: - build = '/Rebuild' - else: - build = '/Build' - arguments = kw.get('arguments', []) - arguments.extend([gyp_file.replace('.gyp', '.sln'), - build, configuration]) - # Note: the Visual Studio generator doesn't add an explicit 'all' - # target, so we just treat it the same as the default. - if target not in (None, self.ALL, self.DEFAULT): - arguments.extend(['/Project', target]) - if self.configuration: - arguments.extend(['/ProjectConfig', self.configuration]) - kw['arguments'] = arguments - return self.run(program=self.build_tool, **kw) - def up_to_date(self, gyp_file, target=None, **kw): - """ - Verifies that a build of the specified Visual Studio target is up to date. - """ - result = self.build(gyp_file, target, **kw) - if not result: - stdout = self.stdout() - m = self.up_to_date_re.search(stdout) - if not m or m.group(1) == '0': - self.report_not_up_to_date() - self.fail_test() - return result - def run_built_executable(self, name, *args, **kw): - """ - Runs an executable built by Visual Studio. - """ - configuration = self.configuration_dirname() - # Enclosing the name in a list avoids prepending the original dir. - program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)] - return self.run(program=program, *args, **kw) - def built_file_path(self, name, type=None, **kw): - """ - Returns a path to the specified file name, of the specified type, - as built by Visual Studio. - - Built files are in a subdirectory that matches the configuration - name. The default is 'Default'. - - A chdir= keyword argument specifies the source directory - relative to which the output subdirectory can be found. - - "type" values of STATIC_LIB or SHARED_LIB append the necessary - prefixes and suffixes to a platform-independent library base name. - """ - result = [] - chdir = kw.get('chdir') - if chdir: - result.append(chdir) - result.append(self.configuration_dirname()) - if type == self.EXECUTABLE: - result.append(name + self._exe) - elif type == self.STATIC_LIB: - name = self.lib_ + name + self._lib - result.extend(['lib', name]) - elif type == self.SHARED_LIB: - name = self.dll_ + name + self._dll - result.append(name) - else: - result.append(name) - return self.workpath(*result) - - -class TestGypSCons(TestGypBase): - """ - Subclass for testing the GYP SCons generator. - """ - format = 'scons' - build_tool_list = ['scons', 'scons.py'] - ALL = 'all' - def build(self, gyp_file, target=None, **kw): - """ - Runs a scons build using the SCons configuration generated from the - specified gyp_file. - """ - arguments = kw.get('arguments', []) - dirname = os.path.dirname(gyp_file) - if dirname: - arguments.extend(['-C', dirname]) - if self.configuration: - arguments.append('--mode=' + self.configuration) - if target not in (None, self.DEFAULT): - arguments.append(target) - kw['arguments'] = arguments - return self.run(program=self.build_tool, **kw) - def up_to_date(self, gyp_file, target=None, **kw): - """ - Verifies that a build of the specified SCons target is up to date. - """ - if target in (None, self.DEFAULT): - up_to_date_targets = 'all' - else: - up_to_date_targets = target - up_to_date_lines = [] - for arg in up_to_date_targets.split(): - up_to_date_lines.append("scons: `%s' is up to date.\n" % arg) - kw['stdout'] = ''.join(up_to_date_lines) - arguments = kw.get('arguments', []) - arguments.append('-Q') - kw['arguments'] = arguments - return self.build(gyp_file, target, **kw) - def run_built_executable(self, name, *args, **kw): - """ - Runs an executable built by scons. - """ - configuration = self.configuration_dirname() - os.environ['LD_LIBRARY_PATH'] = os.path.join(configuration, 'lib') - # Enclosing the name in a list avoids prepending the original dir. - program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)] - return self.run(program=program, *args, **kw) - def built_file_path(self, name, type=None, **kw): - """ - Returns a path to the specified file name, of the specified type, - as built by Scons. - - Built files are in a subdirectory that matches the configuration - name. The default is 'Default'. - - A chdir= keyword argument specifies the source directory - relative to which the output subdirectory can be found. - - "type" values of STATIC_LIB or SHARED_LIB append the necessary - prefixes and suffixes to a platform-independent library base name. - """ - result = [] - chdir = kw.get('chdir') - if chdir: - result.append(chdir) - result.append(self.configuration_dirname()) - if type == self.EXECUTABLE: - result.append(name + self._exe) - elif type == self.STATIC_LIB: - name = self.lib_ + name + self._lib - result.extend(['lib', name]) - elif type == self.SHARED_LIB: - name = self.dll_ + name + self._dll - result.extend(['lib', name]) - else: - result.append(name) - return self.workpath(*result) - - -class TestGypXcode(TestGypBase): - """ - Subclass for testing the GYP Xcode generator. - """ - format = 'xcode' - build_tool_list = ['xcodebuild'] - - phase_script_execution = ("\n" - "PhaseScriptExecution /\\S+/Script-[0-9A-F]+\\.sh\n" - " cd /\\S+\n" - " /bin/sh -c /\\S+/Script-[0-9A-F]+\\.sh\n" - "(make: Nothing to be done for `all'\\.\n)?") - - strip_up_to_date_expressions = [ - # Various actions or rules can run even when the overall build target - # is up to date. Strip those phases' GYP-generated output. - re.compile(phase_script_execution, re.S), - - # The message from distcc_pump can trail the "BUILD SUCCEEDED" - # message, so strip that, too. - re.compile('__________Shutting down distcc-pump include server\n', re.S), - ] - - up_to_date_ending = 'Checking Dependencies...\n** BUILD SUCCEEDED **\n' - - def build(self, gyp_file, target=None, **kw): - """ - Runs an xcodebuild using the .xcodeproj generated from the specified - gyp_file. - """ - arguments = kw.get('arguments', []) - arguments.extend(['-project', gyp_file.replace('.gyp', '.xcodeproj')]) - if target == self.ALL: - arguments.append('-alltargets',) - elif target not in (None, self.DEFAULT): - arguments.extend(['-target', target]) - if self.configuration: - arguments.extend(['-configuration', self.configuration]) - symroot = kw.get('SYMROOT', '$SRCROOT/build') - if symroot: - arguments.append('SYMROOT='+symroot) - kw['arguments'] = arguments - return self.run(program=self.build_tool, **kw) - def up_to_date(self, gyp_file, target=None, **kw): - """ - Verifies that a build of the specified Xcode target is up to date. - """ - result = self.build(gyp_file, target, **kw) - if not result: - output = self.stdout() - for expression in self.strip_up_to_date_expressions: - output = expression.sub('', output) - if not output.endswith(self.up_to_date_ending): - self.report_not_up_to_date() - self.fail_test() - return result - def run_built_executable(self, name, *args, **kw): - """ - Runs an executable built by xcodebuild. - """ - configuration = self.configuration_dirname() - os.environ['DYLD_LIBRARY_PATH'] = os.path.join('build', configuration) - # Enclosing the name in a list avoids prepending the original dir. - program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)] - return self.run(program=program, *args, **kw) - def built_file_path(self, name, type=None, **kw): - """ - Returns a path to the specified file name, of the specified type, - as built by Xcode. - - Built files are in the subdirectory 'build/{configuration}'. - The default is 'build/Default'. - - A chdir= keyword argument specifies the source directory - relative to which the output subdirectory can be found. - - "type" values of STATIC_LIB or SHARED_LIB append the necessary - prefixes and suffixes to a platform-independent library base name. - """ - result = [] - chdir = kw.get('chdir') - if chdir: - result.append(chdir) - configuration = self.configuration_dirname() - result.extend(['build', configuration]) - if type == self.EXECUTABLE: - result.append(name + self._exe) - elif type == self.STATIC_LIB: - name = self.lib_ + name + self._lib - result.append(name) - elif type == self.SHARED_LIB: - name = name + self._dll - result.append(name) - else: - result.append(name) - return self.workpath(*result) - - -format_class_list = [ - TestGypGypd, - TestGypMake, - TestGypMSVS, - TestGypSCons, - TestGypXcode, -] - -def TestGyp(*args, **kw): - """ - Returns an appropriate TestGyp* instance for a specified GYP format. - """ - format = kw.get('format') - if format: - del kw['format'] - else: - format = os.environ.get('TESTGYP_FORMAT') - for format_class in format_class_list: - if format == format_class.format: - return format_class(*args, **kw) - raise Exception, "unknown format %r" % format diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-shared.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-shared.py deleted file mode 100644 index a1d2985d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-shared.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple build of a "Hello, world!" program with shared libraries, -including verifying that libraries are rebuilt correctly when functions -move between libraries. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('library.gyp', - '-Dlibrary=shared_library', - '-Dmoveable_function=lib1', - chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib1_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.run_gyp('library.gyp', - '-Dlibrary=shared_library', - '-Dmoveable_function=lib2', - chdir='relocate/src') - -# Update program.c to force a rebuild. -test.sleep() -contents = test.read('relocate/src/program.c') -contents = contents.replace('Hello', 'Hello again') -test.write('relocate/src/program.c', contents) - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello again from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib2_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.run_gyp('library.gyp', - '-Dlibrary=shared_library', - '-Dmoveable_function=lib1', - chdir='relocate/src') - -# Update program.c to force a rebuild. -test.sleep() -contents = test.read('relocate/src/program.c') -contents = contents.replace('again', 'again again') -test.write('relocate/src/program.c', contents) - -# TODO(sgk): we have to force a rebuild of lib2 so that it weeds out -# the "moved" module. This should be done in gyp by adding a dependency -# on the generated .vcproj file itself. -test.touch('relocate/src/lib2.c') - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello again again from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib1_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-static.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-static.py deleted file mode 100644 index 4bc71c49..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/gyptest-static.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple build of a "Hello, world!" program with static libraries, -including verifying that libraries are rebuilt correctly when functions -move between libraries. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('library.gyp', - '-Dlibrary=static_library', - '-Dmoveable_function=lib1', - chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib1_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.run_gyp('library.gyp', - '-Dlibrary=static_library', - '-Dmoveable_function=lib2', - chdir='relocate/src') - -# Update program.c to force a rebuild. -test.sleep() -contents = test.read('relocate/src/program.c') -contents = contents.replace('Hello', 'Hello again') -test.write('relocate/src/program.c', contents) - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello again from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib2_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.run_gyp('library.gyp', - '-Dlibrary=static_library', - '-Dmoveable_function=lib1', - chdir='relocate/src') - -# Update program.c and lib2.c to force a rebuild. -test.sleep() -contents = test.read('relocate/src/program.c') -contents = contents.replace('again', 'again again') -test.write('relocate/src/program.c', contents) - -# TODO(sgk): we have to force a rebuild of lib2 so that it weeds out -# the "moved" module. This should be done in gyp by adding a dependency -# on the generated .vcproj file itself. -test.touch('relocate/src/lib2.c') - -test.build('library.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello again again from program.c -Hello from lib1.c -Hello from lib2.c -Hello from lib1_moveable.c -""" -test.run_built_executable('program', chdir='relocate/src', stdout=expect) - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1.c deleted file mode 100644 index 3866b1b8..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void lib1_function(void) -{ - fprintf(stdout, "Hello from lib1.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1_moveable.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1_moveable.c deleted file mode 100644 index 5d3cc1d9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib1_moveable.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void moveable_function(void) -{ - fprintf(stdout, "Hello from lib1_moveable.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2.c deleted file mode 100644 index 21dda726..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void lib2_function(void) -{ - fprintf(stdout, "Hello from lib2.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2_moveable.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2_moveable.c deleted file mode 100644 index f645071d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/lib2_moveable.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void moveable_function(void) -{ - fprintf(stdout, "Hello from lib2_moveable.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/library.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/library.gyp deleted file mode 100644 index bc355164..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/library.gyp +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'moveable_function%': 0, - }, - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'dependencies': [ - 'lib1', - 'lib2', - ], - 'sources': [ - 'program.c', - ], - }, - { - 'target_name': 'lib1', - 'type': '<(library)', - 'sources': [ - 'lib1.c', - ], - 'conditions': [ - ['moveable_function=="lib1"', { - 'sources': [ - 'lib1_moveable.c', - ], - }], - ], - }, - { - 'target_name': 'lib2', - 'type': '<(library)', - 'sources': [ - 'lib2.c', - ], - 'conditions': [ - ['moveable_function=="lib2"', { - 'sources': [ - 'lib2_moveable.c', - ], - }], - ], - }, - ], - 'conditions': [ - ['OS=="linux"', { - 'target_defaults': { - # Support 64-bit shared libs (also works fine for 32-bit). - 'cflags': ['-fPIC'], - }, - }], - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/program.c deleted file mode 100644 index d7712cce..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/library/src/program.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -extern void lib1_function(void); -extern void lib2_function(void); -extern void moveable_function(void); - -int main(int argc, char *argv[]) -{ - fprintf(stdout, "Hello from program.c\n"); - fflush(stdout); - lib1_function(); - lib2_function(); - moveable_function(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/gyptest-default.py deleted file mode 100644 index 6b1c9b6a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/gyptest-default.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple build of a "Hello, world!" program with loadable modules. The -default for all platforms should be to output the loadable modules to the same -path as the executable. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('module.gyp', chdir='src') - -test.build('module.gyp', test.ALL, chdir='src') - -expect = """\ -Hello from program.c -Hello from lib1.c -Hello from lib2.c -""" -test.run_built_executable('program', chdir='src', stdout=expect) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib1.c deleted file mode 100644 index 8de0e94b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void module_main(void) -{ - fprintf(stdout, "Hello from lib1.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib2.c deleted file mode 100644 index 266396dc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/lib2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#ifdef _WIN32 -__declspec(dllexport) -#endif -void module_main(void) -{ - fprintf(stdout, "Hello from lib2.c\n"); - fflush(stdout); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/module.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/module.gyp deleted file mode 100644 index 39a63d64..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/module.gyp +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'conditions': [ - ['OS=="win"', { - 'defines': ['PLATFORM_WIN'], - }], - ['OS=="mac"', { - 'defines': ['PLATFORM_MAC'], - }], - ['OS=="linux"', { - 'defines': ['PLATFORM_LINUX'], - # Support 64-bit shared libs (also works fine for 32-bit). - 'cflags': ['-fPIC'], - 'ldflags': ['-ldl'], - }], - ], - }, - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'dependencies': [ - 'lib1', - 'lib2', - ], - 'sources': [ - 'program.c', - ], - }, - { - 'target_name': 'lib1', - 'type': 'loadable_module', - 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''}, - 'sources': [ - 'lib1.c', - ], - }, - { - 'target_name': 'lib2', - 'type': 'loadable_module', - 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''}, - 'sources': [ - 'lib2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/program.c deleted file mode 100644 index a48f940d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/module/src/program.c +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include - -#if defined(PLATFORM_WIN) -#include -#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX) -#include -#include -#include -#include -#define MAX_PATH PATH_MAX -#endif - -#if defined(PLATFORM_WIN) -#define MODULE_SUFFIX ".dll" -#elif defined(PLATFORM_MAC) -#define MODULE_SUFFIX ".dylib" -#elif defined(PLATFORM_LINUX) -#define MODULE_SUFFIX ".so" -#endif - -typedef void (*module_symbol)(void); -char bin_path[MAX_PATH + 1]; - - -void CallModule(const char* module) { - char module_path[MAX_PATH + 1]; - const char* module_function = "module_main"; - module_symbol funcptr; -#if defined(PLATFORM_WIN) - HMODULE dl; - char drive[_MAX_DRIVE]; - char dir[_MAX_DIR]; - - if (_splitpath_s(bin_path, drive, _MAX_DRIVE, dir, _MAX_DIR, - NULL, 0, NULL, 0)) { - fprintf(stderr, "Failed to split executable path.\n"); - return; - } - if (_makepath_s(module_path, MAX_PATH, drive, dir, module, MODULE_SUFFIX)) { - fprintf(stderr, "Failed to calculate module path.\n"); - return; - } - - dl = LoadLibrary(module_path); - if (!dl) { - fprintf(stderr, "Failed to open module: %s\n", module_path); - return; - } - - funcptr = (module_symbol) GetProcAddress(dl, module_function); - if (!funcptr) { - fprintf(stderr, "Failed to find symbol: %s\n", module_function); - return; - } - funcptr(); - - FreeLibrary(dl); -#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX) - void* dl; - char* path_copy = strdup(bin_path); - char* bin_dir = dirname(path_copy); - int path_size = snprintf(module_path, MAX_PATH, "%s/%s%s", bin_dir, module, - MODULE_SUFFIX); - free(path_copy); - if (path_size < 0 || path_size > MAX_PATH) { - fprintf(stderr, "Failed to calculate module path.\n"); - return; - } - module_path[path_size] = 0; - - dl = dlopen(module_path, RTLD_LAZY); - if (!dl) { - fprintf(stderr, "Failed to open module: %s\n", module_path); - return; - } - - funcptr = dlsym(dl, module_function); - if (!funcptr) { - fprintf(stderr, "Failed to find symbol: %s\n", module_function); - return; - } - funcptr(); - - dlclose(dl); -#endif -} - -int main(int argc, char *argv[]) -{ - fprintf(stdout, "Hello from program.c\n"); - fflush(stdout); - -#if defined(PLATFORM_WIN) - if (!GetModuleFileName(NULL, bin_path, MAX_PATH)) { - fprintf(stderr, "Failed to determine executable path.\n"); - return; - } -#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX) - // Using argv[0] should be OK here since we control how the tests run, and - // can avoid exec and such issues that make it unreliable. - if (!realpath(argv[0], bin_path)) { - fprintf(stderr, "Failed to determine executable path (%s).\n", argv[0]); - return; - } -#endif - - CallModule("lib1"); - CallModule("lib2"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/base/base.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/base/base.gyp deleted file mode 100644 index b7c9fc6d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/base/base.gyp +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'a', - 'type': 'static_library', - 'sources': [ - 'a.c', - ], - }, - { - 'target_name': 'b', - 'type': 'static_library', - 'sources': [ - 'b.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/express.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/express.gyp deleted file mode 100644 index 917abe2c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/express.gyp +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'express', - 'type': 'executable', - 'dependencies': [ - 'base/base.gyp:a', - 'base/base.gyp:b', - ], - 'sources': [ - 'main.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/gyptest-express.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/gyptest-express.py deleted file mode 100644 index 8d72570e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/msvs/express/gyptest-express.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that flat solutions get generated for Express versions of -Visual Studio. -""" - -import TestGyp - -test = TestGyp.TestGyp(formats=['msvs']) - -test.run_gyp('express.gyp', '-G msvs_version=2005') -test.must_contain('express.sln', '(base)') - -test.run_gyp('express.gyp', '-G msvs_version=2008') -test.must_contain('express.sln', '(base)') - -test.run_gyp('express.gyp', '-G msvs_version=2005e') -test.must_not_contain('express.sln', '(base)') - -test.run_gyp('express.gyp', '-G msvs_version=2008e') -test.must_not_contain('express.sln', '(base)') - - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-all.py deleted file mode 100644 index 9f157c4f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-all.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('multiple.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -# TODO(sgk): remove stderr=None when the --generator-output= support -# gets rid of the scons warning -test.build('multiple.gyp', test.ALL, chdir='relocate/src', stderr=None) - -expect1 = """\ -hello from prog1.c -hello from common.c -""" - -expect2 = """\ -hello from prog2.c -hello from common.c -""" - -test.run_built_executable('prog1', stdout=expect1, chdir='relocate/src') -test.run_built_executable('prog2', stdout=expect2, chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-default.py deleted file mode 100644 index 8d5072d2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/gyptest-default.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('multiple.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -# TODO(sgk): remove stderr=None when the --generator-output= support -# gets rid of the scons warning -test.build('multiple.gyp', chdir='relocate/src', stderr=None) - -expect1 = """\ -hello from prog1.c -hello from common.c -""" - -expect2 = """\ -hello from prog2.c -hello from common.c -""" - -test.run_built_executable('prog1', stdout=expect1, chdir='relocate/src') -test.run_built_executable('prog2', stdout=expect2, chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/common.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/common.c deleted file mode 100644 index f1df7c14..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/common.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -void common(void) -{ - printf("hello from common.c\n"); - return; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/multiple.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/multiple.gyp deleted file mode 100644 index 3db4ea30..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/multiple.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'prog1', - 'type': 'executable', - 'sources': [ - 'prog1.c', - 'common.c', - ], - }, - { - 'target_name': 'prog2', - 'type': 'executable', - 'sources': [ - 'prog2.c', - 'common.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog1.c deleted file mode 100644 index d55f8af1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog1.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void common(void); - -int main(int argc, char *argv[]) -{ - printf("hello from prog1.c\n"); - common(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog2.c deleted file mode 100644 index 760590eb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/multiple-targets/src/prog2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void common(void); - -int main(int argc, char *argv[]) -{ - printf("hello from prog2.c\n"); - common(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/gyptest-no-output.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/gyptest-no-output.py deleted file mode 100644 index 8431241c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/gyptest-no-output.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verified things don't explode when there are targets without outputs. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('nooutput.gyp', chdir='src') -test.relocate('src', 'relocate/src') -test.build('nooutput.gyp', chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/src/nooutput.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/src/nooutput.gyp deleted file mode 100644 index c40124ef..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/no-output/src/nooutput.gyp +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'no_output', - 'type': 'none', - 'direct_dependent_settings': { - 'defines': [ - 'NADA', - ], - }, - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-all.py deleted file mode 100644 index 46cfeefe..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-all.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple rules when using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('actions.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('actions.gyp', test.ALL, chdir='relocate/src') - -expect = """\ -Hello from program.c -Hello from function1.in -Hello from function2.in -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir1' -else: - chdir = 'relocate/src' -test.run_built_executable('program', chdir=chdir, stdout=expect) - -expect = """\ -Hello from program.c -Hello from function3.in -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir3' -else: - chdir = 'relocate/src' -test.run_built_executable('program2', chdir=chdir, stdout=expect) - -test.must_match('relocate/src/subdir2/file1.out', "Hello from file1.in\n") -test.must_match('relocate/src/subdir2/file2.out', "Hello from file2.in\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-default.py deleted file mode 100644 index f9c79067..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/gyptest-default.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies simple rules when using an explicit build target of 'all'. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('actions.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('actions.gyp', chdir='relocate/src') - -expect = """\ -Hello from program.c -Hello from function1.in -Hello from function2.in -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir1' -else: - chdir = 'relocate/src' -test.run_built_executable('program', chdir=chdir, stdout=expect) - -expect = """\ -Hello from program.c -Hello from function3.in -""" - -if test.format == 'xcode': - chdir = 'relocate/src/subdir3' -else: - chdir = 'relocate/src' -test.run_built_executable('program2', chdir=chdir, stdout=expect) - -test.must_match('relocate/src/subdir2/file1.out', "Hello from file1.in\n") -test.must_match('relocate/src/subdir2/file2.out', "Hello from file2.in\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/actions.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/actions.gyp deleted file mode 100644 index 3e9f8b58..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/actions.gyp +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'pull_in_all_actions', - 'type': 'none', - 'dependencies': [ - 'subdir1/executable.gyp:*', - 'subdir2/none.gyp:*', - 'subdir3/executable2.gyp:*', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/copy-file.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/copy-file.py deleted file mode 100644 index 5a5feae1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/copy-file.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -import sys - -contents = open(sys.argv[1], 'r').read() -open(sys.argv[2], 'wb').write(contents) - -sys.exit(0) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/executable.gyp deleted file mode 100644 index 30285778..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/executable.gyp +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'program.c', - 'function1.in', - 'function2.in', - ], - 'rules': [ - { - 'rule_name': 'copy_file', - 'extension': 'in', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - # TODO: fix SCons and Make to support generated files not - # in a variable-named path like <(INTERMEDIATE_DIR) - #'<(RULE_INPUT_ROOT).c', - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function1.in b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function1.in deleted file mode 100644 index 60ff2894..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function1.in +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void function1(void) -{ - printf("Hello from function1.in\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function2.in b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function2.in deleted file mode 100644 index 0fcfc03f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/function2.in +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void function2(void) -{ - printf("Hello from function2.in\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/program.c deleted file mode 100644 index 258d7f99..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir1/program.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern void function1(void); -extern void function2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - function1(); - function2(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file1.in b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file1.in deleted file mode 100644 index 86ac3ad3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file1.in +++ /dev/null @@ -1 +0,0 @@ -Hello from file1.in diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file2.in b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file2.in deleted file mode 100644 index bf83d8ec..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/file2.in +++ /dev/null @@ -1 +0,0 @@ -Hello from file2.in diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/none.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/none.gyp deleted file mode 100644 index 38bcdabd..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir2/none.gyp +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'files', - 'type': 'none', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'file1.in', - 'file2.in', - ], - 'rules': [ - { - 'rule_name': 'copy_file', - 'extension': 'in', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - '<(RULE_INPUT_ROOT).out', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/executable2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/executable2.gyp deleted file mode 100644 index a2a528fc..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/executable2.gyp +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This one tests that rules are properly written if extensions are different -# between the target's sources (program.c) and the generated files -# (function3.cc) - -{ - 'targets': [ - { - 'target_name': 'program2', - 'type': 'executable', - 'msvs_cygwin_shell': 0, - 'sources': [ - 'program.c', - 'function3.in', - ], - 'rules': [ - { - 'rule_name': 'copy_file', - 'extension': 'in', - 'inputs': [ - '../copy-file.py', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).cc', - ], - 'action': [ - 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/function3.in b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/function3.in deleted file mode 100644 index 99f46ab0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/function3.in +++ /dev/null @@ -1,6 +0,0 @@ -#include - -extern "C" void function3(void) -{ - printf("Hello from function3.in\n"); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/program.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/program.c deleted file mode 100644 index 94f6c509..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/rules/src/subdir3/program.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern void function3(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - function3(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-all.py deleted file mode 100644 index 76456885..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-all.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Build a .gyp that depends on 2 gyp files with the same name. -""" - -import TestGyp - -# This causes a problem on XCode (duplicate ID). -# See http://code.google.com/p/gyp/issues/detail?id=114 -test = TestGyp.TestGyp(formats=['msvs', 'scons', 'make']) - -test.run_gyp('all.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('all.gyp', test.ALL, chdir='relocate/src') - -expect1 = """\ -Hello from main1.cc -""" - -expect2 = """\ -Hello from main2.cc -""" - -test.run_built_executable('program1', chdir='relocate/src', stdout=expect1) -test.run_built_executable('program2', chdir='relocate/src', stdout=expect2) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-default.py deleted file mode 100644 index c1031f86..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/gyptest-default.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Build a .gyp that depends on 2 gyp files with the same name. -""" - -import TestGyp - -# This causes a problem on XCode (duplicate ID). -# See http://code.google.com/p/gyp/issues/detail?id=114 -test = TestGyp.TestGyp(formats=['msvs', 'scons', 'make']) - -test.run_gyp('all.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('all.gyp', chdir='relocate/src') - -expect1 = """\ -Hello from main1.cc -""" - -expect2 = """\ -Hello from main2.cc -""" - -test.run_built_executable('program1', chdir='relocate/src', stdout=expect1) -test.run_built_executable('program2', chdir='relocate/src', stdout=expect2) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/all.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/all.gyp deleted file mode 100644 index 229f02ea..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/all.gyp +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'all_exes', - 'type': 'none', - 'dependencies': [ - 'subdir1/executable.gyp:*', - 'subdir2/executable.gyp:*', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/executable.gyp deleted file mode 100644 index 82483b4c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/executable.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program1', - 'type': 'executable', - 'sources': [ - 'main1.cc', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/main1.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/main1.cc deleted file mode 100644 index 36455583..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir1/main1.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello from main1.cc\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/executable.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/executable.gyp deleted file mode 100644 index e3537013..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/executable.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'program2', - 'type': 'executable', - 'sources': [ - 'main2.cc', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/main2.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/main2.cc deleted file mode 100644 index 0c724dee..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-gyp-name/src/subdir2/main2.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - printf("Hello from main2.cc\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-all.py deleted file mode 100644 index 4c215027..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-all.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Build a .gyp with two targets that share a common .c source file. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('all.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('all.gyp', test.ALL, chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello prog1 from func.c -""" - -expect2 = """\ -Hello from prog2.c -Hello prog2 from func.c -""" - -test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1) -test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-default.py deleted file mode 100644 index 98757c26..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/gyptest-default.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Build a .gyp with two targets that share a common .c source file. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('all.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('all.gyp', chdir='relocate/src') - -expect1 = """\ -Hello from prog1.c -Hello prog1 from func.c -""" - -expect2 = """\ -Hello from prog2.c -Hello prog2 from func.c -""" - -test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1) -test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/all.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/all.gyp deleted file mode 100644 index 44e10498..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/all.gyp +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'prog1', - 'type': 'executable', - 'defines': [ - 'PROG="prog1"', - ], - 'sources': [ - 'prog1.c', - 'func.c', - # Uncomment to test same-named files in different directories, - # which Visual Studio doesn't support. - #'subdir1/func.c', - #'subdir2/func.c', - ], - }, - { - 'target_name': 'prog2', - 'type': 'executable', - 'defines': [ - 'PROG="prog2"', - ], - 'sources': [ - 'prog2.c', - 'func.c', - # Uncomment to test same-named files in different directories, - # which Visual Studio doesn't support. - #'subdir1/func.c', - #'subdir2/func.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/func.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/func.c deleted file mode 100644 index e069c692..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/func.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void func(void) -{ - printf("Hello %s from func.c\n", PROG); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog1.c deleted file mode 100644 index c8940fed..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog1.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -extern void func(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from prog1.c\n"); - func(); - /* - * Uncomment to test same-named files in different directories, - * which Visual Studio doesn't support. - subdir1_func(); - subdir2_func(); - */ - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog2.c deleted file mode 100644 index e6605c2b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/prog2.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -extern void func(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from prog2.c\n"); - func(); - /* - * Uncomment to test same-named files in different directories, - * which Visual Studio doesn't support. - subdir1_func(); - subdir2_func(); - */ - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir1/func.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir1/func.c deleted file mode 100644 index b73450d1..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir1/func.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void subdir1_func(void) -{ - printf("Hello %s from subdir1/func.c\n", PROG); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir2/func.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir2/func.c deleted file mode 100644 index 0248b572..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/same-name/src/subdir2/func.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void subdir2_func(void) -{ - printf("Hello %s from subdir2/func.c\n", PROG); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/gyptest-tools.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/gyptest-tools.py deleted file mode 100755 index e97f5e63..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/gyptest-tools.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that a scons build picks up tools modules specified -via 'scons_tools' in the 'scons_settings' dictionary. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('tools.gyp') - -test.build('tools.gyp', test.ALL) - -if test.format == 'scons': - expect = "Hello, world!\n" -else: - expect = "" -test.run_built_executable('tools', stdout=expect) - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/site_scons/site_tools/this_tool.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/site_scons/site_tools/this_tool.py deleted file mode 100644 index 10c89476..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/site_scons/site_tools/this_tool.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# SCons "tool" module that simply sets a -D value. -def generate(env): - env['CPPDEFINES'] = ['THIS_TOOL'] - -def exists(env): - pass diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.c deleted file mode 100644 index 1844d366..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ -#ifdef THIS_TOOL - printf("Hello, world!\n"); -#endif - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.gyp deleted file mode 100644 index 736ba3f2..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/scons_tools/tools.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'tools', - 'type': 'executable', - 'sources': [ - 'tools.c', - ], - }, - ], - 'scons_settings': { - 'tools': ['default', 'this_tool'], - }, -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-all.py deleted file mode 100644 index c04c2d48..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-all.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('build/all.gyp', chdir='src') - -test.build('build/all.gyp', test.ALL, chdir='src') - -chdir = 'src/build' - -# The top-level Makefile is in the directory where gyp was run. -# TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp -# file? What about when passing in multiple .gyp files? Would sub-project -# Makefiles (see http://codereview.chromium.org/340008 comments) solve this? -if test.format == 'make': - chdir = 'src' - -if test.format == 'xcode': - chdir = 'src/prog1' -test.run_built_executable('prog1', - chdir=chdir, - stdout="Hello from prog1.c\n") - -if test.format == 'xcode': - chdir = 'src/prog2' -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-relocate.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-relocate.py deleted file mode 100644 index 176545fa..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/gyptest-relocate.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('build/all.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('build/all.gyp', test.ALL, chdir='relocate/src') - -chdir = 'relocate/src/build' - -# The top-level Makefile is in the directory where gyp was run. -# TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp -# file? What about when passing in multiple .gyp files? Would sub-project -# Makefiles (see http://codereview.chromium.org/340008 comments) solve this? -if test.format == 'make': - chdir = 'relocate/src' - -if test.format == 'xcode': - chdir = 'relocate/src/prog1' -test.run_built_executable('prog1', - chdir=chdir, - stdout="Hello from prog1.c\n") - -if test.format == 'xcode': - chdir = 'relocate/src/prog2' -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.c deleted file mode 100644 index 161ae8a3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from prog1.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.gyp deleted file mode 100644 index fbe38b97..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog1/prog1.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'prog1', - 'type': 'executable', - 'sources': [ - 'prog1.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.c deleted file mode 100644 index 7635ae8c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from prog2.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.gyp deleted file mode 100644 index 59345483..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/sibling/src/prog2/prog2.gyp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'prog2', - 'type': 'executable', - 'sources': [ - 'prog2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-all.py deleted file mode 100644 index b7509041..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-all.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a target and a subsidiary dependent target from a -.gyp file in a subdirectory, without specifying an explicit output build -directory, and using the generated solution or project file at the top -of the tree as the entry point. - -The configuration sets the Xcode SYMROOT variable and uses --depth= -to make Xcode behave like the other build tools--that is, put all -built targets in a single output build directory at the top of the tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', '-Dset_symroot=1', '--depth=.', chdir='src') - -test.relocate('src', 'relocate/src') - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', test.ALL, SYMROOT=None, chdir='relocate/src') - -test.run_built_executable('prog1', - stdout="Hello from prog1.c\n", - chdir='relocate/src') -test.run_built_executable('prog2', - stdout="Hello from prog2.c\n", - chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-default.py deleted file mode 100644 index c64ae7da..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-SYMROOT-default.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a target and a subsidiary dependent target from a -.gyp file in a subdirectory, without specifying an explicit output build -directory, and using the generated solution or project file at the top -of the tree as the entry point. - -The configuration sets the Xcode SYMROOT variable and uses --depth= -to make Xcode behave like the other build tools--that is, put all -built targets in a single output build directory at the top of the tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', '-Dset_symroot=1', '--depth=.', chdir='src') - -test.relocate('src', 'relocate/src') - -# Suppress the test infrastructure's setting SYMROOT on the command line. -test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src') - -test.run_built_executable('prog1', - stdout="Hello from prog1.c\n", - chdir='relocate/src') - -test.run_built_executable('prog2', - stdout="Hello from prog2.c\n", - chdir='relocate/src') - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-all.py deleted file mode 100644 index 509f0f0f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-all.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a subsidiary dependent target from a .gyp file in a -subdirectory, without specifying an explicit output build directory, -and using the subdirectory's solution or project file as the entry point. -""" - -import TestGyp -import errno - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -chdir = 'relocate/src/subdir' -target = test.ALL - -# Make can build sub-projects, but it's still through the top-level Makefile, -# and there is no 'default' or 'all' sub-project, so the target must be -# explicit. -# TODO(mmoss) Should make create self-contained, sub-project Makefiles, -# equilvalent to the sub-project .sln/SConstruct/etc. files of other generators? -if test.format == 'make': - chdir = 'relocate/src' - target = 'prog2' - -test.build('prog2.gyp', target, chdir=chdir) - -test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir) - -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-default.py deleted file mode 100644 index b3d4cf99..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir-default.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a subsidiary dependent target from a .gyp file in a -subdirectory, without specifying an explicit output build directory, -and using the subdirectory's solution or project file as the entry point. -""" - -import TestGyp -import errno - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -chdir = 'relocate/src/subdir' - -# Make can build sub-projects, but it's still through the top-level Makefile, -# and there is no 'default' or 'all' sub-project, so the target must be -# explicit. -# TODO(mmoss) Should make create self-contained, sub-project Makefiles, -# equilvalent to the sub-project .sln/SConstruct/etc. files of other generators? -if test.format == 'make': - chdir = 'relocate/src' - test.build('prog2.gyp', 'prog2', chdir=chdir) -else: - test.build('prog2.gyp', chdir=chdir) - -test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir) - -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir2-deep.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir2-deep.py deleted file mode 100644 index 48548982..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-subdir2-deep.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a project rooted several layers under src_dir works. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('prog3.gyp', chdir='src/subdir/subdir2') - -test.relocate('src', 'relocate/src') - -test.build('prog3.gyp', test.ALL, chdir='relocate/src/subdir/subdir2') - -test.run_built_executable('prog3', - chdir='relocate/src/subdir/subdir2', - stdout="Hello from prog3.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-all.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-all.py deleted file mode 100644 index a29a41b4..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-all.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a target and a subsidiary dependent target from a -.gyp file in a subdirectory, without specifying an explicit output build -directory, and using the generated solution or project file at the top -of the tree as the entry point. - -There is a difference here in the default behavior of the underlying -build tools. Specifically, when building the entire "solution", Xcode -puts the output of each project relative to the .xcodeproj directory, -while Visual Studio (and our implementations of SCons and Make) put it -in a build directory relative to the "solution"--that is, the entry-point -from which you built the entire tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('prog1.gyp', test.ALL, chdir='relocate/src') - -test.run_built_executable('prog1', - stdout="Hello from prog1.c\n", - chdir='relocate/src') - -if test.format == 'xcode': - chdir = 'relocate/src/subdir' -else: - chdir = 'relocate/src' -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-default.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-default.py deleted file mode 100644 index ac5f60db..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/gyptest-top-default.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies building a target and a subsidiary dependent target from a -.gyp file in a subdirectory, without specifying an explicit output build -directory, and using the generated solution or project file at the top -of the tree as the entry point. - -There is a difference here in the default behavior of the underlying -build tools. Specifically, when building the entire "solution", Xcode -puts the output of each project relative to the .xcodeproj directory, -while Visual Studio (and our implementations of SCons and Make) put it -in a build directory relative to the "solution"--that is, the entry-point -from which you built the entire tree. -""" - -import TestGyp - -test = TestGyp.TestGyp() - -test.run_gyp('prog1.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('prog1.gyp', chdir='relocate/src') - -test.run_built_executable('prog1', - stdout="Hello from prog1.c\n", - chdir='relocate/src') - -if test.format == 'xcode': - chdir = 'relocate/src/subdir' -else: - chdir = 'relocate/src' -test.run_built_executable('prog2', - chdir=chdir, - stdout="Hello from prog2.c\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.c deleted file mode 100644 index 161ae8a3..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from prog1.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.gyp deleted file mode 100644 index 2aa66ce7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/prog1.gyp +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - 'symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog1', - 'type': 'executable', - 'dependencies': [ - 'subdir/prog2.gyp:prog2', - ], - 'sources': [ - 'prog1.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.c deleted file mode 100644 index 7635ae8c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from prog2.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.gyp deleted file mode 100644 index c6cd35f7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/prog2.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog2', - 'type': 'executable', - 'sources': [ - 'prog2.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.c deleted file mode 100644 index 7cfb0fa9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ - printf("Hello from prog3.c\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp deleted file mode 100644 index b49fb591..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/subdir/subdir2/prog3.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - '../../symroot.gypi', - ], - 'targets': [ - { - 'target_name': 'prog3', - 'type': 'executable', - 'sources': [ - 'prog3.c', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/symroot.gypi b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/symroot.gypi deleted file mode 100644 index 51991642..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/subdirectory/src/symroot.gypi +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'set_symroot%': 0, - }, - 'conditions': [ - ['set_symroot == 1', { - 'xcode_settings': { - 'SYMROOT': '<(DEPTH)/build', - }, - }], - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/gyptest-toolsets.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/gyptest-toolsets.py deleted file mode 100644 index 19737f83..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/gyptest-toolsets.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verifies that toolsets are correctly applied -""" - -import TestGyp - -# Multiple toolsets are currently only supported by the make generator. -test = TestGyp.TestGyp(formats=['make']) - -test.run_gyp('toolsets.gyp') - -test.build('toolsets.gyp', test.ALL) - -test.run_built_executable('host-main', stdout="Host\n") -test.run_built_executable('target-main', stdout="Target\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/main.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/main.cc deleted file mode 100644 index 25a53f2d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/main.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include - -const char *GetToolset(); - -int main(int argc, char *argv[]) { - printf("%s\n", GetToolset()); -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.cc deleted file mode 100644 index 0a21e99f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.cc +++ /dev/null @@ -1,7 +0,0 @@ -const char *GetToolset() { -#ifdef TARGET - return "Target"; -#else - return "Host"; -#endif -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.gyp deleted file mode 100644 index e41b928d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/toolsets/toolsets.gyp +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'target_conditions': [ - ['_toolset=="target"', {'defines': ['TARGET']}] - ] - }, - 'targets': [ - { - 'target_name': 'toolsets', - 'type': 'static_library', - 'toolsets': ['target', 'host'], - 'sources': [ - 'toolsets.cc', - ], - }, - { - 'target_name': 'host-main', - 'type': 'executable', - 'toolsets': ['host'], - 'dependencies': ['toolsets'], - 'sources': [ - 'main.cc', - ], - }, - { - 'target_name': 'target-main', - 'type': 'executable', - 'dependencies': ['toolsets'], - 'sources': [ - 'main.cc', - ], - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variables/commands-repeated.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variables/commands-repeated.gyp deleted file mode 100644 index 822ae4f0..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variables/commands-repeated.gyp +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This is a simple test file to make sure that variable substitution -# happens correctly. Run "run_tests.py" using python to generate the -# output from this gyp file. - -{ - 'variables': { - 'pi': 'import math; print math.pi', - 'third_letters': "<(other_letters)HIJK", - 'letters_list': 'ABCD', - 'other_letters': '<(letters_list)EFG', - 'check_included': '<(included_variable)', - 'check_lists': [ - '<(included_variable)', - '<(third_letters)', - ], - 'check_int': 5, - 'check_str_int': '6', - 'check_list_int': [ - 7, - '8', - 9, - ], - 'not_int_1': ' 10', - 'not_int_2': '11 ', - 'not_int_3': '012', - 'not_int_4': '13.0', - 'not_int_5': '+14', - 'negative_int': '-15', - 'zero_int': '0', - }, - 'includes': [ - 'commands.gypi', - ], - 'targets': [ - { - 'target_name': 'foo', - 'type': 'none', - 'variables': { - 'var1': ' commands.gyp.stdout -python ../../gyp --ignore-environment --debug variables --debug general --format gypd --depth . commands.gyp > commands.gyp.ignore-env.stdout -cp -f commands.gypd commands.gypd.golden -python ../../gyp --debug variables --debug general --format gypd --depth . commands-repeated.gyp > commands-repeated.gyp.stdout -cp -f commands-repeated.gypd commands-repeated.gypd.golden diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/gyptest-variants.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/gyptest-variants.py deleted file mode 100644 index ce2455f6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/gyptest-variants.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Verify handling of build variants. - -TODO: Right now, only the SCons generator supports this, so the -test case is SCons-specific. In particular, it relise on SCons' -ability to rebuild in response to changes on the command line. It -may be simpler to just drop this feature if the other generators -can't be made to behave the same way. -""" - -import TestGyp - -test = TestGyp.TestGyp(formats=['scons']) - -test.run_gyp('variants.gyp', chdir='src') - -test.relocate('src', 'relocate/src') - -test.build('variants.gyp', chdir='relocate/src') - -test.run_built_executable('variants', - chdir='relocate/src', - stdout="Hello, world!\n") - -test.sleep() -test.build('variants.gyp', 'VARIANT1=1', chdir='relocate/src') - -test.run_built_executable('variants', - chdir='relocate/src', - stdout="Hello from VARIANT1\n") - -test.sleep() -test.build('variants.gyp', 'VARIANT2=1', chdir='relocate/src') - -test.run_built_executable('variants', - chdir='relocate/src', - stdout="Hello from VARIANT2\n") - -test.pass_test() diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.c b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.c deleted file mode 100644 index 3018e40d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -int main(int argc, char *argv[]) -{ -#if defined(VARIANT1) - printf("Hello from VARIANT1\n"); -#elif defined(VARIANT2) - printf("Hello from VARIANT2\n"); -#else - printf("Hello, world!\n"); -#endif - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.gyp b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.gyp deleted file mode 100644 index 0305ca74..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/test/variants/src/variants.gyp +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'variants', - 'type': 'executable', - 'sources': [ - 'variants.c', - ], - 'variants': { - 'variant1' : { - 'defines': [ - 'VARIANT1', - ], - }, - 'variant2' : { - 'defines': [ - 'VARIANT2', - ], - }, - }, - }, - ], -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/README b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/README deleted file mode 100644 index 712e4efb..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/README +++ /dev/null @@ -1,15 +0,0 @@ -pretty_vcproj: - Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2] - - They key/value pair are used to resolve vsprops name. - - For example, if I want to diff the base.vcproj project: - - pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > orignal.txt - pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt - - And you can use your favorite diff tool to see the changes. - - Note: In the case of base.vcproj, the original vcproj is one level up the generated one. - I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt - before you perform the diff. \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_gyp.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_gyp.py deleted file mode 100644 index 04c79012..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_gyp.py +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This file pretty-prints the contents of a GYP file. - -import sys -import re - -input = [] -if len(sys.argv) > 1: - input_file = open(sys.argv[1]) - input = input_file.read().splitlines() - input_file.close() -else: - input = sys.stdin.read().splitlines() - -# This is used to remove comments when we're counting braces. -comment_re = re.compile(r'\s*#.*') - -# This is used to remove quoted strings when we're counting braces. -# It takes into account quoted quotes, and makes sure that the quotes -# match. -# NOTE: It does not handle quotes that span more than one line, or -# cases where an escaped quote is preceeded by an escaped backslash. -quote_re_str = r'(?P[\'"])(.*?)(? 0: - after = True - - # This catches the special case of a closing brace having something - # other than just whitespace ahead of it -- we don't want to - # unindent that until after this line is printed so it stays with - # the previous indentation level. - if cnt < 0 and closing_prefix_re.match(stripline): - after = True - return (cnt, after) - -# This does the main work of indenting the input based on the brace counts. -def prettyprint_input(lines): - indent = 0 - basic_offset = 2 - last_line = "" - for line in lines: - if comment_re.match(line): - print line - else: - line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. - if len(line) > 0: - (brace_diff, after) = count_braces(line) - if brace_diff != 0: - if after: - print " " * (basic_offset * indent) + line - indent += brace_diff - else: - indent += brace_diff - print " " * (basic_offset * indent) + line - else: - print " " * (basic_offset * indent) + line - else: - print "" - last_line = line - -# Split up the double braces. -lines = split_double_braces(input) - -# Indent and print the output. -prettyprint_input(lines) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_sln.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_sln.py deleted file mode 100755 index 4865c43e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_sln.py +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/python2.5 -# Copyright 2009 Google Inc. -# All Rights Reserved. - -"""Prints the information in a sln file in a diffable way. - - It first outputs each projects in alphabetical order with their - dependencies. - - Then it outputs a possible build order. -""" - -__author__ = 'nsylvain (Nicolas Sylvain)' - -import os -import re -import sys -import pretty_vcproj - -def BuildProject(project, built, projects, deps): - # if all dependencies are done, we can build it, otherwise we try to build the - # dependency. - # This is not infinite-recursion proof. - for dep in deps[project]: - if dep not in built: - BuildProject(dep, built, projects, deps) - print project - built.append(project) - -def ParseSolution(solution_file): - # All projects, their clsid and paths. - projects = dict() - - # A list of dependencies associated with a project. - dependencies = dict() - - # Regular expressions that matches the SLN format. - # The first line of a project definition. - begin_project = re.compile(('^Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942' - '}"\) = "(.*)", "(.*)", "(.*)"$')) - # The last line of a project definition. - end_project = re.compile('^EndProject$') - # The first line of a dependency list. - begin_dep = re.compile('ProjectSection\(ProjectDependencies\) = postProject$') - # The last line of a dependency list. - end_dep = re.compile('EndProjectSection$') - # A line describing a dependency. - dep_line = re.compile(' *({.*}) = ({.*})$') - - in_deps = False - solution = open(solution_file) - for line in solution: - results = begin_project.search(line) - if results: - # Hack to remove icu because the diff is too different. - if results.group(1).find('icu') != -1: - continue - # We remove "_gyp" from the names because it helps to diff them. - current_project = results.group(1).replace('_gyp', '') - projects[current_project] = [results.group(2).replace('_gyp', ''), - results.group(3), - results.group(2)] - dependencies[current_project] = [] - continue - - results = end_project.search(line) - if results: - current_project = None - continue - - results = begin_dep.search(line) - if results: - in_deps = True - continue - - results = end_dep.search(line) - if results: - in_deps = False - continue - - results = dep_line.search(line) - if results and in_deps and current_project: - dependencies[current_project].append(results.group(1)) - continue - - # Change all dependencies clsid to name instead. - for project in dependencies: - # For each dependencies in this project - new_dep_array = [] - for dep in dependencies[project]: - # Look for the project name matching this cldis - for project_info in projects: - if projects[project_info][1] == dep: - new_dep_array.append(project_info) - dependencies[project] = sorted(new_dep_array) - - return (projects, dependencies) - -def PrintDependencies(projects, deps): - print "---------------------------------------" - print "Dependencies for all projects" - print "---------------------------------------" - print "-- --" - - for (project, dep_list) in sorted(deps.items()): - print "Project : %s" % project - print "Path : %s" % projects[project][0] - if dep_list: - for dep in dep_list: - print " - %s" % dep - print "" - - print "-- --" - -def PrintBuildOrder(projects, deps): - print "---------------------------------------" - print "Build order " - print "---------------------------------------" - print "-- --" - - built = [] - for (project, dep_list) in sorted(deps.items()): - if project not in built: - BuildProject(project, built, projects, deps) - - print "-- --" - -def PrintVCProj(projects): - - for project in projects: - print "-------------------------------------" - print "-------------------------------------" - print project - print project - print project - print "-------------------------------------" - print "-------------------------------------" - - project_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]), - projects[project][2])) - - pretty = pretty_vcproj - argv = [ '', - project_path, - '$(SolutionDir)=%s\\' % os.path.dirname(sys.argv[1]), - ] - argv.extend(sys.argv[3:]) - pretty.main(argv) - -def main(): - # check if we have exactly 1 parameter. - if len(sys.argv) < 2: - print 'Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0] - return - - (projects, deps) = ParseSolution(sys.argv[1]) - PrintDependencies(projects, deps) - PrintBuildOrder(projects, deps) - - if '--recursive' in sys.argv: - PrintVCProj(projects) - -if __name__ == '__main__': - main() - \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_vcproj.py b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_vcproj.py deleted file mode 100755 index 90e3be62..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/gyp/tools/pretty_vcproj.py +++ /dev/null @@ -1,314 +0,0 @@ -#!/usr/bin/python2.5 -# Copyright 2009 Google Inc. -# All Rights Reserved. - -"""Make the format of a vcproj really pretty. - - This script normalize and sort an xml. It also fetches all the properties - inside linked vsprops and include them explicitly in the vcproj. - - It outputs the resulting xml to stdout. -""" - -__author__ = 'nsylvain (Nicolas Sylvain)' - -import os -import sys - -from xml.dom.minidom import parse -from xml.dom.minidom import Node - -REPLACEMENTS = dict() -ARGUMENTS = None - -class CmpTuple: - """Compare function between 2 tuple.""" - def __call__(self, x, y): - (key1, value1) = x - (key2, value2) = y - return cmp(key1, key2) - -class CmpNode: - """Compare function between 2 xml nodes.""" - - def get_string(self, node): - node_string = "node" - node_string += node.nodeName - if node.nodeValue: - node_string += node.nodeValue - - if node.attributes: - # We first sort by name, if present. - node_string += node.getAttribute("Name") - - all_nodes = [] - for (name, value) in node.attributes.items(): - all_nodes.append((name, value)) - - all_nodes.sort(CmpTuple()) - for (name, value) in all_nodes: - node_string += name - node_string += value - - return node_string - - def __call__(self, x, y): - return cmp(self.get_string(x), self.get_string(y)) - -def PrettyPrintNode(node, indent=0): - if node.nodeType == Node.TEXT_NODE: - if node.data.strip(): - print '%s%s' % (' '*indent, node.data.strip()) - return - - if node.childNodes: - node.normalize() - # Get the number of attributes - attr_count = 0 - if node.attributes: - attr_count = node.attributes.length - - # Print the main tag - if attr_count == 0: - print '%s<%s>' % (' '*indent, node.nodeName) - else: - print '%s<%s' % (' '*indent, node.nodeName) - - all_attributes = [] - for (name, value) in node.attributes.items(): - all_attributes.append((name, value)) - all_attributes.sort(CmpTuple()) - for (name, value) in all_attributes: - print '%s %s="%s"' % (' '*indent, name, value) - print '%s>' % (' '*indent) - if node.nodeValue: - print '%s %s' % (' '*indent, node.nodeValue) - - for sub_node in node.childNodes: - PrettyPrintNode(sub_node, indent=indent+2) - print '%s' % (' '*indent, node.nodeName) - -def FlattenFilter(node): - """Returns a list of all the node and sub nodes.""" - node_list = [] - - if (node.attributes and - node.getAttribute('Name') == '_excluded_files'): - # We don't add the "_excluded_files" filter. - return [] - - for current in node.childNodes: - if current.nodeName == 'Filter': - node_list.extend(FlattenFilter(current)) - else: - node_list.append(current) - - return node_list - -def FixFilenames(filenames, current_directory): - new_list = [] - for filename in filenames: - if filename: - for key in REPLACEMENTS: - filename = filename.replace(key, REPLACEMENTS[key]) - os.chdir(current_directory) - filename = filename.strip('"\' ') - if filename.startswith('$'): - new_list.append(filename) - else: - new_list.append(os.path.abspath(filename)) - return new_list - -def AbsoluteNode(node): - # Make all the properties we know about in this node absolute. - if node.attributes: - for (name, value) in node.attributes.items(): - if name in ['InheritedPropertySheets', 'RelativePath', - 'AdditionalIncludeDirectories', - 'IntermediateDirectory', 'OutputDirectory', - 'AdditionalLibraryDirectories']: - # We want to fix up these paths - path_list = value.split(';') - new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1])) - node.setAttribute(name, ';'.join(new_list)) - if not value: - node.removeAttribute(name) - -def CleanupVcproj(node): - # For each sub node, we call recursively this function. - for sub_node in node.childNodes: - AbsoluteNode(sub_node) - CleanupVcproj(sub_node) - - # Normalize the node, and remove all extranous whitespaces. - for sub_node in node.childNodes: - if sub_node.nodeType == Node.TEXT_NODE: - sub_node.data = sub_node.data.replace("\r", "") - sub_node.data = sub_node.data.replace("\n", "") - sub_node.data = sub_node.data.rstrip() - - # Fix all the semicolon separated attributes to be sorted, and we also - # remove the dups. - if node.attributes: - for (name, value) in node.attributes.items(): - sorted_list = sorted(value.split(';')) - unique_list = [] - [unique_list.append(i) for i in sorted_list if not unique_list.count(i)] - node.setAttribute(name, ';'.join(unique_list)) - if not value: - node.removeAttribute(name) - - if node.childNodes: - node.normalize() - - # For each node, take a copy, and remove it from the list. - node_array = [] - while node.childNodes and node.childNodes[0]: - # Take a copy of the node and remove it from the list. - current = node.childNodes[0] - node.removeChild(current) - - # If the child is a filter, we want to append all its children - # to this same list. - if current.nodeName == 'Filter': - node_array.extend(FlattenFilter(current)) - else: - node_array.append(current) - - - # Sort the list. - node_array.sort(CmpNode()) - - # Insert the nodes in the correct order. - for new_node in node_array: - # But don't append empty tool node. - if new_node.nodeName == 'Tool': - if new_node.attributes and new_node.attributes.length == 1: - # This one was empty. - continue - if new_node.nodeName == 'UserMacro': - continue - node.appendChild(new_node) - -def GetConfiguationNodes(vcproj): - #TODO(nsylvain): Find a better way to navigate the xml. - nodes = [] - for node in vcproj.childNodes: - if node.nodeName == "Configurations": - for sub_node in node.childNodes: - if sub_node.nodeName == "Configuration": - nodes.append(sub_node) - - return nodes - -def GetChildrenVsprops(filename): - dom = parse(filename) - if dom.documentElement.attributes: - vsprops = dom.documentElement.getAttribute('InheritedPropertySheets') - return FixFilenames(vsprops.split(';'), os.path.dirname(filename)) - return [] - -def SeekToNode(node1, child2): - # A text node does not have properties. - if child2.nodeType == Node.TEXT_NODE: - return None - - # Get the name of the current node. - current_name = child2.getAttribute("Name") - if not current_name: - # There is no name. We don't know how to merge. - return None - - # Look through all the nodes to find a match. - for sub_node in node1.childNodes: - if sub_node.nodeName == child2.nodeName: - name = sub_node.getAttribute("Name") - if name == current_name: - return sub_node - - # No match. We give up. - return None - -def MergeAttributes(node1, node2): - # No attributes to merge? - if not node2.attributes: - return - - for (name, value2) in node2.attributes.items(): - # Don't merge the 'Name' attribute. - if name == 'Name': - continue - value1 = node1.getAttribute(name) - if value1: - # The attribute exist in the main node. If it's equal, we leave it - # untouched, otherwise we concatenate it. - if value1 != value2: - node1.setAttribute(name, ';'.join([value1, value2])) - else: - # The attribute does nto exist in the main node. We append this one. - node1.setAttribute(name, value2) - - # If the attribute was a property sheet attributes, we remove it, since - # they are useless. - if name == 'InheritedPropertySheets': - node1.removeAttribute(name) - -def MergeProperties(node1, node2): - MergeAttributes(node1, node2) - for child2 in node2.childNodes: - child1 = SeekToNode(node1, child2) - if child1: - MergeProperties(child1, child2) - else: - node1.appendChild(child2.cloneNode(True)) - -def main(argv): - global REPLACEMENTS - global ARGUMENTS - ARGUMENTS = argv - """Main function of this vcproj prettifier.""" - - # check if we have exactly 1 parameter. - if len(argv) < 2: - print ('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' - '[key2=value2]' % argv[0]) - return - - # Parse the keys - for i in range(2, len(argv)): - (key, value) = argv[i].split('=') - REPLACEMENTS[key] = value - - # Open the vcproj and parse the xml. - dom = parse(argv[1]) - - # First thing we need to do is find the Configuration Node and merge them - # with the vsprops they include. - for configuration_node in GetConfiguationNodes(dom.documentElement): - # Get the property sheets associated with this configuration. - vsprops = configuration_node.getAttribute('InheritedPropertySheets') - - # Fix the filenames to be absolute. - vsprops_list = FixFilenames(vsprops.strip().split(';'), - os.path.dirname(argv[1])) - - # Extend the list of vsprops with all vsprops contained in the current - # vsprops. - for current_vsprops in vsprops_list: - vsprops_list.extend(GetChildrenVsprops(current_vsprops)) - - # Now that we have all the vsprops, we need to merge them. - for current_vsprops in vsprops_list: - MergeProperties(configuration_node, - parse(current_vsprops).documentElement) - - # Now that everything is merged, we need to cleanup the xml. - CleanupVcproj(dom.documentElement) - - # Finally, we use the prett xml function to print the vcproj back to the - # user. - #print dom.toprettyxml(newl="\n") - PrettyPrintNode(dom.documentElement) - -if __name__ == '__main__': - main(sys.argv) \ No newline at end of file diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/dump_syms/dump_syms.cc deleted file mode 100644 index 7d721a8c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/dump_syms/dump_syms.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "common/linux/dump_symbols.h" - -using google_breakpad::WriteSymbolFile; - -int main(int argc, char **argv) { - if (argc < 2 || argc > 3) { - fprintf(stderr, "Usage: %s " - "[directory-for-debug-file]\n", argv[0]); - return 1; - } - - const char *binary = argv[1]; - std::string debug_dir; - if (argc == 3) - debug_dir = argv[2]; - - if (!WriteSymbolFile(binary, debug_dir, stdout)) { - fprintf(stderr, "Failed to write symbol file.\n"); - return 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/md2core/minidump-2-core.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/md2core/minidump-2-core.cc deleted file mode 100644 index f08da768..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/md2core/minidump-2-core.cc +++ /dev/null @@ -1,1193 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Converts a minidump file to a core file which gdb can read. -// Large parts lifted from the userspace core dumper: -// http://code.google.com/p/google-coredumper/ -// -// Usage: minidump-2-core [-v] 1234.dmp > core - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "client/linux/minidump_writer/minidump_extension_linux.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/common/minidump_cpu_x86.h" -#include "third_party/lss/linux_syscall_support.h" - - -#if __WORDSIZE == 64 - #define ELF_CLASS ELFCLASS64 -#else - #define ELF_CLASS ELFCLASS32 -#endif -#define Ehdr ElfW(Ehdr) -#define Phdr ElfW(Phdr) -#define Shdr ElfW(Shdr) -#define Nhdr ElfW(Nhdr) -#define auxv_t ElfW(auxv_t) - - -#if defined(__x86_64__) - #define ELF_ARCH EM_X86_64 -#elif defined(__i386__) - #define ELF_ARCH EM_386 -#elif defined(__ARM_ARCH_3__) - #define ELF_ARCH EM_ARM -#elif defined(__mips__) - #define ELF_ARCH EM_MIPS -#endif - -static const MDRVA kInvalidMDRVA = static_cast(-1); -static bool verbose; - -static int usage(const char* argv0) { - fprintf(stderr, "Usage: %s [-v] \n", argv0); - return 1; -} - -// Write all of the given buffer, handling short writes and EINTR. Return true -// iff successful. -static bool -writea(int fd, const void* idata, size_t length) { - const uint8_t* data = (const uint8_t*) idata; - - size_t done = 0; - while (done < length) { - ssize_t r; - do { - r = write(fd, data + done, length - done); - } while (r == -1 && errno == EINTR); - - if (r < 1) - return false; - done += r; - } - - return true; -} - -// A range of a mmaped file. -class MMappedRange { - public: - MMappedRange(const void* data, size_t length) - : data_(reinterpret_cast(data)), - length_(length) { - } - - // Get an object of |length| bytes at |offset| and return a pointer to it - // unless it's out of bounds. - const void* GetObject(size_t offset, size_t length) const { - if (offset + length < offset) - return NULL; - if (offset + length > length_) - return NULL; - return data_ + offset; - } - - // Get element |index| of an array of objects of length |length| starting at - // |offset| bytes. Return NULL if out of bounds. - const void* GetArrayElement(size_t offset, size_t length, - unsigned index) const { - const size_t element_offset = offset + index * length; - return GetObject(element_offset, length); - } - - // Get a zero-terminated string. This method only works correctly for ASCII - // characters and does not convert between UTF-16 and UTF-8. - const std::string GetString(size_t offset) const { - const MDString* s = (const MDString*) GetObject(offset, sizeof(MDString)); - const u_int16_t* buf = &s->buffer[0]; - std::string str; - for (unsigned i = 0; i < s->length && buf[i]; ++i) { - str.push_back(buf[i]); - } - return str; - } - - // Return a new range which is a subset of this range. - MMappedRange Subrange(const MDLocationDescriptor& location) const { - if (location.rva > length_ || - location.rva + location.data_size < location.rva || - location.rva + location.data_size > length_) { - return MMappedRange(NULL, 0); - } - - return MMappedRange(data_ + location.rva, location.data_size); - } - - const uint8_t* data() const { return data_; } - size_t length() const { return length_; } - - private: - const uint8_t* const data_; - const size_t length_; -}; - -/* Dynamically determines the byte sex of the system. Returns non-zero - * for big-endian machines. - */ -static inline int sex() { - int probe = 1; - return !*(char *)&probe; -} - -typedef struct elf_timeval { /* Time value with microsecond resolution */ - long tv_sec; /* Seconds */ - long tv_usec; /* Microseconds */ -} elf_timeval; - -typedef struct elf_siginfo { /* Information about signal (unused) */ - int32_t si_signo; /* Signal number */ - int32_t si_code; /* Extra code */ - int32_t si_errno; /* Errno */ -} elf_siginfo; - -typedef struct prstatus { /* Information about thread; includes CPU reg*/ - elf_siginfo pr_info; /* Info associated with signal */ - uint16_t pr_cursig; /* Current signal */ - unsigned long pr_sigpend; /* Set of pending signals */ - unsigned long pr_sighold; /* Set of held signals */ - pid_t pr_pid; /* Process ID */ - pid_t pr_ppid; /* Parent's process ID */ - pid_t pr_pgrp; /* Group ID */ - pid_t pr_sid; /* Session ID */ - elf_timeval pr_utime; /* User time */ - elf_timeval pr_stime; /* System time */ - elf_timeval pr_cutime; /* Cumulative user time */ - elf_timeval pr_cstime; /* Cumulative system time */ - user_regs_struct pr_reg; /* CPU registers */ - uint32_t pr_fpvalid; /* True if math co-processor being used */ -} prstatus; - -typedef struct prpsinfo { /* Information about process */ - unsigned char pr_state; /* Numeric process state */ - char pr_sname; /* Char for pr_state */ - unsigned char pr_zomb; /* Zombie */ - signed char pr_nice; /* Nice val */ - unsigned long pr_flag; /* Flags */ -#if defined(__x86_64__) || defined(__mips__) - uint32_t pr_uid; /* User ID */ - uint32_t pr_gid; /* Group ID */ -#else - uint16_t pr_uid; /* User ID */ - uint16_t pr_gid; /* Group ID */ -#endif - pid_t pr_pid; /* Process ID */ - pid_t pr_ppid; /* Parent's process ID */ - pid_t pr_pgrp; /* Group ID */ - pid_t pr_sid; /* Session ID */ - char pr_fname[16]; /* Filename of executable */ - char pr_psargs[80]; /* Initial part of arg list */ -} prpsinfo; - -// We parse the minidump file and keep the parsed information in this structure -struct CrashedProcess { - CrashedProcess() - : crashing_tid(-1), - auxv(NULL), - auxv_length(0) { - memset(&prps, 0, sizeof(prps)); - prps.pr_sname = 'R'; - memset(&debug, 0, sizeof(debug)); - } - - struct Mapping { - Mapping() - : permissions(0xFFFFFFFF), - start_address(0), - end_address(0), - offset(0) { - } - - uint32_t permissions; - uint64_t start_address, end_address, offset; - std::string filename; - std::string data; - }; - std::map mappings; - - pid_t crashing_tid; - int fatal_signal; - - struct Thread { - pid_t tid; - user_regs_struct regs; - user_fpregs_struct fpregs; -#if defined(__i386__) - user_fpxregs_struct fpxregs; -#endif - uintptr_t stack_addr; - const uint8_t* stack; - size_t stack_length; - }; - std::vector threads; - - const uint8_t* auxv; - size_t auxv_length; - - prpsinfo prps; - - std::map signatures; - - std::string dynamic_data; - MDRawDebug debug; - std::vector link_map; -}; - -#if defined(__i386__) -static uint32_t -U32(const uint8_t* data) { - uint32_t v; - memcpy(&v, data, sizeof(v)); - return v; -} - -static uint16_t -U16(const uint8_t* data) { - uint16_t v; - memcpy(&v, data, sizeof(v)); - return v; -} - -static void -ParseThreadRegisters(CrashedProcess::Thread* thread, MMappedRange range) { - const MDRawContextX86* rawregs = - (const MDRawContextX86*) range.GetObject(0, sizeof(MDRawContextX86)); - - thread->regs.ebx = rawregs->ebx; - thread->regs.ecx = rawregs->ecx; - thread->regs.edx = rawregs->edx; - thread->regs.esi = rawregs->esi; - thread->regs.edi = rawregs->edi; - thread->regs.ebp = rawregs->ebp; - thread->regs.eax = rawregs->eax; - thread->regs.xds = rawregs->ds; - thread->regs.xes = rawregs->es; - thread->regs.xfs = rawregs->fs; - thread->regs.xgs = rawregs->gs; - thread->regs.orig_eax = rawregs->eax; - thread->regs.eip = rawregs->eip; - thread->regs.xcs = rawregs->cs; - thread->regs.eflags = rawregs->eflags; - thread->regs.esp = rawregs->esp; - thread->regs.xss = rawregs->ss; - - thread->fpregs.cwd = rawregs->float_save.control_word; - thread->fpregs.swd = rawregs->float_save.status_word; - thread->fpregs.twd = rawregs->float_save.tag_word; - thread->fpregs.fip = rawregs->float_save.error_offset; - thread->fpregs.fcs = rawregs->float_save.error_selector; - thread->fpregs.foo = rawregs->float_save.data_offset; - thread->fpregs.fos = rawregs->float_save.data_selector; - memcpy(thread->fpregs.st_space, rawregs->float_save.register_area, - 10 * 8); - - thread->fpxregs.cwd = rawregs->float_save.control_word; - thread->fpxregs.swd = rawregs->float_save.status_word; - thread->fpxregs.twd = rawregs->float_save.tag_word; - thread->fpxregs.fop = U16(rawregs->extended_registers + 6); - thread->fpxregs.fip = U16(rawregs->extended_registers + 8); - thread->fpxregs.fcs = U16(rawregs->extended_registers + 12); - thread->fpxregs.foo = U16(rawregs->extended_registers + 16); - thread->fpxregs.fos = U16(rawregs->extended_registers + 20); - thread->fpxregs.mxcsr = U32(rawregs->extended_registers + 24); - memcpy(thread->fpxregs.st_space, rawregs->extended_registers + 32, 128); - memcpy(thread->fpxregs.xmm_space, rawregs->extended_registers + 160, 128); -} -#elif defined(__x86_64__) -static void -ParseThreadRegisters(CrashedProcess::Thread* thread, MMappedRange range) { - const MDRawContextAMD64* rawregs = - (const MDRawContextAMD64*) range.GetObject(0, sizeof(MDRawContextAMD64)); - - thread->regs.r15 = rawregs->r15; - thread->regs.r14 = rawregs->r14; - thread->regs.r13 = rawregs->r13; - thread->regs.r12 = rawregs->r12; - thread->regs.rbp = rawregs->rbp; - thread->regs.rbx = rawregs->rbx; - thread->regs.r11 = rawregs->r11; - thread->regs.r10 = rawregs->r10; - thread->regs.r9 = rawregs->r9; - thread->regs.r8 = rawregs->r8; - thread->regs.rax = rawregs->rax; - thread->regs.rcx = rawregs->rcx; - thread->regs.rdx = rawregs->rdx; - thread->regs.rsi = rawregs->rsi; - thread->regs.rdi = rawregs->rdi; - thread->regs.orig_rax = rawregs->rax; - thread->regs.rip = rawregs->rip; - thread->regs.cs = rawregs->cs; - thread->regs.eflags = rawregs->eflags; - thread->regs.rsp = rawregs->rsp; - thread->regs.ss = rawregs->ss; - thread->regs.fs_base = 0; - thread->regs.gs_base = 0; - thread->regs.ds = rawregs->ds; - thread->regs.es = rawregs->es; - thread->regs.fs = rawregs->fs; - thread->regs.gs = rawregs->gs; - - thread->fpregs.cwd = rawregs->flt_save.control_word; - thread->fpregs.swd = rawregs->flt_save.status_word; - thread->fpregs.ftw = rawregs->flt_save.tag_word; - thread->fpregs.fop = rawregs->flt_save.error_opcode; - thread->fpregs.rip = rawregs->flt_save.error_offset; - thread->fpregs.rdp = rawregs->flt_save.data_offset; - thread->fpregs.mxcsr = rawregs->flt_save.mx_csr; - thread->fpregs.mxcr_mask = rawregs->flt_save.mx_csr_mask; - memcpy(thread->fpregs.st_space, rawregs->flt_save.float_registers, 8 * 16); - memcpy(thread->fpregs.xmm_space, rawregs->flt_save.xmm_registers, 16 * 16); -} -#else -#error "This code has not been ported to your platform yet" -#endif - -static void -ParseThreadList(CrashedProcess* crashinfo, MMappedRange range, - const MMappedRange& full_file) { - const uint32_t num_threads = - *(const uint32_t*) range.GetObject(0, sizeof(uint32_t)); - if (verbose) { - fprintf(stderr, - "MD_THREAD_LIST_STREAM:\n" - "Found %d threads\n" - "\n\n", - num_threads); - } - for (unsigned i = 0; i < num_threads; ++i) { - CrashedProcess::Thread thread; - memset(&thread, 0, sizeof(thread)); - const MDRawThread* rawthread = - (MDRawThread*) range.GetArrayElement(sizeof(uint32_t), - sizeof(MDRawThread), i); - thread.tid = rawthread->thread_id; - thread.stack_addr = rawthread->stack.start_of_memory_range; - MMappedRange stack_range = full_file.Subrange(rawthread->stack.memory); - thread.stack = stack_range.data(); - thread.stack_length = rawthread->stack.memory.data_size; - - ParseThreadRegisters(&thread, - full_file.Subrange(rawthread->thread_context)); - - crashinfo->threads.push_back(thread); - } -} - -static void -ParseSystemInfo(CrashedProcess* crashinfo, MMappedRange range, - const MMappedRange &full_file) { - const MDRawSystemInfo* sysinfo = - (MDRawSystemInfo*) range.GetObject(0, sizeof(MDRawSystemInfo)); - if (!sysinfo) { - fprintf(stderr, "Failed to access MD_SYSTEM_INFO_STREAM\n"); - _exit(1); - } -#if defined(__i386__) - if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_X86) { - fprintf(stderr, - "This version of minidump-2-core only supports x86 (32bit)%s.\n", - sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64 ? - ",\nbut the minidump file is from a 64bit machine" : ""); - _exit(1); - } -#elif defined(__x86_64__) - if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_AMD64) { - fprintf(stderr, - "This version of minidump-2-core only supports x86 (64bit)%s.\n", - sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 ? - ",\nbut the minidump file is from a 32bit machine" : ""); - _exit(1); - } -#else -#error "This code has not been ported to your platform yet" -#endif - if (!strstr(full_file.GetString(sysinfo->csd_version_rva).c_str(), "Linux")){ - fprintf(stderr, "This minidump was not generated by Linux.\n"); - _exit(1); - } - - if (verbose) { - fprintf(stderr, - "MD_SYSTEM_INFO_STREAM:\n" - "Architecture: %s\n" - "Number of processors: %d\n" - "Processor level: %d\n" - "Processor model: %d\n" - "Processor stepping: %d\n", - sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 - ? "i386" - : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64 - ? "x86-64" - : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_ARM - ? "ARM" - : "???", - sysinfo->number_of_processors, - sysinfo->processor_level, - sysinfo->processor_revision >> 8, - sysinfo->processor_revision & 0xFF); - if (sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 || - sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64) { - fputs("Vendor id: ", stderr); - const char *nul = - (const char *)memchr(sysinfo->cpu.x86_cpu_info.vendor_id, 0, - sizeof(sysinfo->cpu.x86_cpu_info.vendor_id)); - fwrite(sysinfo->cpu.x86_cpu_info.vendor_id, - nul ? nul - (const char *)&sysinfo->cpu.x86_cpu_info.vendor_id[0] - : sizeof(sysinfo->cpu.x86_cpu_info.vendor_id), 1, stderr); - fputs("\n", stderr); - } - fprintf(stderr, "OS: %s\n", - full_file.GetString(sysinfo->csd_version_rva).c_str()); - fputs("\n\n", stderr); - } -} - -static void -ParseCPUInfo(CrashedProcess* crashinfo, MMappedRange range) { - if (verbose) { - fputs("MD_LINUX_CPU_INFO:\n", stderr); - fwrite(range.data(), range.length(), 1, stderr); - fputs("\n\n\n", stderr); - } -} - -static void -ParseProcessStatus(CrashedProcess* crashinfo, MMappedRange range) { - if (verbose) { - fputs("MD_LINUX_PROC_STATUS:\n", stderr); - fwrite(range.data(), range.length(), 1, stderr); - fputs("\n\n", stderr); - } -} - -static void -ParseLSBRelease(CrashedProcess* crashinfo, MMappedRange range) { - if (verbose) { - fputs("MD_LINUX_LSB_RELEASE:\n", stderr); - fwrite(range.data(), range.length(), 1, stderr); - fputs("\n\n", stderr); - } -} - -static void -ParseMaps(CrashedProcess* crashinfo, MMappedRange range) { - if (verbose) { - fputs("MD_LINUX_MAPS:\n", stderr); - fwrite(range.data(), range.length(), 1, stderr); - } - for (const u_int8_t* ptr = range.data(); - ptr < range.data() + range.length();) { - const u_int8_t* eol = (u_int8_t*)memchr(ptr, '\n', - range.data() + range.length() - ptr); - std::string line((const char*)ptr, - eol ? eol - ptr : range.data() + range.length() - ptr); - ptr = eol ? eol + 1 : range.data() + range.length(); - unsigned long long start, stop, offset; - char* permissions = NULL; - char* filename = NULL; - sscanf(line.c_str(), "%llx-%llx %m[-rwxp] %llx %*[:0-9a-f] %*d %ms", - &start, &stop, &permissions, &offset, &filename); - if (filename && *filename == '/') { - CrashedProcess::Mapping mapping; - mapping.permissions = 0; - if (strchr(permissions, 'r')) { - mapping.permissions |= PF_R; - } - if (strchr(permissions, 'w')) { - mapping.permissions |= PF_W; - } - if (strchr(permissions, 'x')) { - mapping.permissions |= PF_X; - } - mapping.start_address = start; - mapping.end_address = stop; - mapping.offset = offset; - if (filename) { - mapping.filename = filename; - } - crashinfo->mappings[mapping.start_address] = mapping; - } - free(permissions); - free(filename); - } - if (verbose) { - fputs("\n\n\n", stderr); - } -} - -static void -ParseEnvironment(CrashedProcess* crashinfo, MMappedRange range) { - if (verbose) { - fputs("MD_LINUX_ENVIRON:\n", stderr); - char *env = new char[range.length()]; - memcpy(env, range.data(), range.length()); - int nul_count = 0; - for (char *ptr = env;;) { - ptr = (char *)memchr(ptr, '\000', range.length() - (ptr - env)); - if (!ptr) { - break; - } - if (ptr > env && ptr[-1] == '\n') { - if (++nul_count > 5) { - // Some versions of Chrome try to rewrite the process' command line - // in a way that causes the environment to be corrupted. Afterwards, - // part of the environment will contain the trailing bit of the - // command line. The rest of the environment will be filled with - // NUL bytes. - // We detect this corruption by counting the number of consecutive - // NUL bytes. Normally, we would not expect any consecutive NUL - // bytes. But we are conservative and only suppress printing of - // the environment if we see at least five consecutive NULs. - fputs("Environment has been corrupted; no data available", stderr); - goto env_corrupted; - } - } else { - nul_count = 0; - } - *ptr = '\n'; - } - fwrite(env, range.length(), 1, stderr); - env_corrupted: - delete[] env; - fputs("\n\n\n", stderr); - } -} - -static void -ParseAuxVector(CrashedProcess* crashinfo, MMappedRange range) { - // Some versions of Chrome erroneously used the MD_LINUX_AUXV stream value - // when dumping /proc/$x/maps - if (range.length() > 17) { - // The AUXV vector contains binary data, whereas the maps always begin - // with an 8+ digit hex address followed by a hyphen and another 8+ digit - // address. - char addresses[18]; - memcpy(addresses, range.data(), 17); - addresses[17] = '\000'; - if (strspn(addresses, "0123456789abcdef-") == 17) { - ParseMaps(crashinfo, range); - return; - } - } - - crashinfo->auxv = range.data(); - crashinfo->auxv_length = range.length(); -} - -static void -ParseCmdLine(CrashedProcess* crashinfo, MMappedRange range) { - // The command line is supposed to use NUL bytes to separate arguments. - // As Chrome rewrites its own command line and (incorrectly) substitutes - // spaces, this is often not the case in our minidump files. - const char* cmdline = (const char*) range.data(); - if (verbose) { - fputs("MD_LINUX_CMD_LINE:\n", stderr); - unsigned i = 0; - for (; i < range.length() && cmdline[i] && cmdline[i] != ' '; ++i) { } - fputs("argv[0] = \"", stderr); - fwrite(cmdline, i, 1, stderr); - fputs("\"\n", stderr); - for (unsigned j = ++i, argc = 1; j < range.length(); ++j) { - if (!cmdline[j] || cmdline[j] == ' ') { - fprintf(stderr, "argv[%d] = \"", argc++); - fwrite(cmdline + i, j - i, 1, stderr); - fputs("\"\n", stderr); - i = j + 1; - } - } - fputs("\n\n", stderr); - } - - const char *binary_name = cmdline; - for (size_t i = 0; i < range.length(); ++i) { - if (cmdline[i] == '/') { - binary_name = cmdline + i + 1; - } else if (cmdline[i] == 0 || cmdline[i] == ' ') { - static const size_t fname_len = sizeof(crashinfo->prps.pr_fname) - 1; - static const size_t args_len = sizeof(crashinfo->prps.pr_psargs) - 1; - memset(crashinfo->prps.pr_fname, 0, fname_len + 1); - memset(crashinfo->prps.pr_psargs, 0, args_len + 1); - unsigned len = cmdline + i - binary_name; - memcpy(crashinfo->prps.pr_fname, binary_name, - len > fname_len ? fname_len : len); - - len = range.length() > args_len ? args_len : range.length(); - memcpy(crashinfo->prps.pr_psargs, cmdline, len); - for (unsigned i = 0; i < len; ++i) { - if (crashinfo->prps.pr_psargs[i] == 0) - crashinfo->prps.pr_psargs[i] = ' '; - } - break; - } - } -} - -static void -ParseDSODebugInfo(CrashedProcess* crashinfo, MMappedRange range, - const MMappedRange &full_file) { - const MDRawDebug* debug = - (MDRawDebug*) range.GetObject(0, sizeof(MDRawDebug)); - if (!debug) { - return; - } - if (verbose) { - fprintf(stderr, - "MD_LINUX_DSO_DEBUG:\n" - "Version: %d\n" - "Number of DSOs: %d\n" - "Brk handler: %p\n" - "Dynamic loader at: %p\n" - "_DYNAMIC: %p\n", - debug->version, - debug->dso_count, - debug->brk, - debug->ldbase, - debug->dynamic); - } - crashinfo->debug = *debug; - if (range.length() > sizeof(MDRawDebug)) { - char* dynamic_data = (char*)range.data() + sizeof(MDRawDebug); - crashinfo->dynamic_data.assign(dynamic_data, - range.length() - sizeof(MDRawDebug)); - } - if (debug->map != kInvalidMDRVA) { - for (int i = 0; i < debug->dso_count; ++i) { - const MDRawLinkMap* link_map = - (MDRawLinkMap*) full_file.GetArrayElement(debug->map, - sizeof(MDRawLinkMap), i); - if (link_map) { - if (verbose) { - fprintf(stderr, - "#%03d: %p, %p, \"%s\"\n", - i, link_map->addr, link_map->ld, - full_file.GetString(link_map->name).c_str()); - } - crashinfo->link_map.push_back(*link_map); - } - } - } - if (verbose) { - fputs("\n\n", stderr); - } -} - -static void -ParseExceptionStream(CrashedProcess* crashinfo, MMappedRange range) { - const MDRawExceptionStream* exp = - (MDRawExceptionStream*) range.GetObject(0, sizeof(MDRawExceptionStream)); - crashinfo->crashing_tid = exp->thread_id; - crashinfo->fatal_signal = (int) exp->exception_record.exception_code; -} - -static bool -WriteThread(const CrashedProcess::Thread& thread, int fatal_signal) { - struct prstatus pr; - memset(&pr, 0, sizeof(pr)); - - pr.pr_info.si_signo = fatal_signal; - pr.pr_cursig = fatal_signal; - pr.pr_pid = thread.tid; - memcpy(&pr.pr_reg, &thread.regs, sizeof(user_regs_struct)); - - Nhdr nhdr; - memset(&nhdr, 0, sizeof(nhdr)); - nhdr.n_namesz = 5; - nhdr.n_descsz = sizeof(struct prstatus); - nhdr.n_type = NT_PRSTATUS; - if (!writea(1, &nhdr, sizeof(nhdr)) || - !writea(1, "CORE\0\0\0\0", 8) || - !writea(1, &pr, sizeof(struct prstatus))) { - return false; - } - - nhdr.n_descsz = sizeof(user_fpregs_struct); - nhdr.n_type = NT_FPREGSET; - if (!writea(1, &nhdr, sizeof(nhdr)) || - !writea(1, "CORE\0\0\0\0", 8) || - !writea(1, &thread.fpregs, sizeof(user_fpregs_struct))) { - return false; - } - -#if defined(__i386__) - nhdr.n_descsz = sizeof(user_fpxregs_struct); - nhdr.n_type = NT_PRXFPREG; - if (!writea(1, &nhdr, sizeof(nhdr)) || - !writea(1, "LINUX\0\0\0", 8) || - !writea(1, &thread.fpxregs, sizeof(user_fpxregs_struct))) { - return false; - } -#endif - - return true; -} - -static void -ParseModuleStream(CrashedProcess* crashinfo, MMappedRange range, - const MMappedRange &full_file) { - if (verbose) { - fputs("MD_MODULE_LIST_STREAM:\n", stderr); - } - const uint32_t num_mappings = - *(const uint32_t*) range.GetObject(0, sizeof(uint32_t)); - for (unsigned i = 0; i < num_mappings; ++i) { - CrashedProcess::Mapping mapping; - const MDRawModule* rawmodule = - (MDRawModule*) range.GetArrayElement(sizeof(uint32_t), - MD_MODULE_SIZE, i); - mapping.start_address = rawmodule->base_of_image; - mapping.end_address = rawmodule->size_of_image + rawmodule->base_of_image; - - if (crashinfo->mappings.find(mapping.start_address) == - crashinfo->mappings.end()) { - // We prefer data from MD_LINUX_MAPS over MD_MODULE_LIST_STREAM, as - // the former is a strict superset of the latter. - crashinfo->mappings[mapping.start_address] = mapping; - } - - const MDCVInfoPDB70* record = - (const MDCVInfoPDB70*)full_file.GetObject(rawmodule->cv_record.rva, - MDCVInfoPDB70_minsize); - char guid[40]; - sprintf(guid, "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", - record->signature.data1, record->signature.data2, - record->signature.data3, - record->signature.data4[0], record->signature.data4[1], - record->signature.data4[2], record->signature.data4[3], - record->signature.data4[4], record->signature.data4[5], - record->signature.data4[6], record->signature.data4[7]); - std::string filename = full_file.GetString(rawmodule->module_name_rva); - size_t slash = filename.find_last_of('/'); - std::string basename = slash == std::string::npos ? - filename : filename.substr(slash + 1); - if (strcmp(guid, "00000000-0000-0000-0000-000000000000")) { - crashinfo->signatures[rawmodule->base_of_image] = - std::string("/var/lib/breakpad/") + guid + "-" + basename; - } - - if (verbose) { - fprintf(stderr, "0x%08llX-0x%08llX, ChkSum: 0x%08X, GUID: %s, \"%s\"\n", - (unsigned long long)rawmodule->base_of_image, - (unsigned long long)rawmodule->base_of_image + - rawmodule->size_of_image, - rawmodule->checksum, guid, filename.c_str()); - } - } - if (verbose) { - fputs("\n\n", stderr); - } -} - -static void -AddDataToMapping(CrashedProcess* crashinfo, const std::string& data, - uintptr_t addr) { - for (std::map::iterator - iter = crashinfo->mappings.begin(); - iter != crashinfo->mappings.end(); - ++iter) { - if (addr >= iter->second.start_address && - addr < iter->second.end_address) { - CrashedProcess::Mapping mapping = iter->second; - if ((addr & ~4095) != iter->second.start_address) { - // If there are memory pages in the mapping prior to where the - // data starts, truncate the existing mapping so that it ends with - // the page immediately preceding the data region. - iter->second.end_address = addr & ~4095; - if (!mapping.filename.empty()) { - // "mapping" is a copy of "iter->second". We are splitting the - // existing mapping into two separate ones when we write the data - // to the core file. The first one does not have any associated - // data in the core file, the second one is backed by data that is - // included with the core file. - // If this mapping wasn't supposed to be anonymous, then we also - // have to update the file offset upon splitting the mapping. - mapping.offset += iter->second.end_address - - iter->second.start_address; - } - } - // Create a new mapping that contains the data contents. We often - // limit the amount of data that is actually written to the core - // file. But it is OK if the mapping itself extends past the end of - // the data. - mapping.start_address = addr & ~4095; - mapping.data.assign(addr & 4095, 0).append(data); - mapping.data.append(-mapping.data.size() & 4095, 0); - crashinfo->mappings[mapping.start_address] = mapping; - return; - } - } - // Didn't find a suitable existing mapping for the data. Create a new one. - CrashedProcess::Mapping mapping; - mapping.permissions = PF_R | PF_W; - mapping.start_address = addr & ~4095; - mapping.end_address = - (addr + data.size() + 4095) & ~4095; - mapping.data.assign(addr & 4095, 0).append(data); - mapping.data.append(-mapping.data.size() & 4095, 0); - crashinfo->mappings[mapping.start_address] = mapping; -} - -static void -AugmentMappings(CrashedProcess* crashinfo, - const MMappedRange &full_file) { - // For each thread, find the memory mapping that matches the thread's stack. - // Then adjust the mapping to include the stack dump. - for (unsigned i = 0; i < crashinfo->threads.size(); ++i) { - const CrashedProcess::Thread& thread = crashinfo->threads[i]; - AddDataToMapping(crashinfo, - std::string((char *)thread.stack, thread.stack_length), - thread.stack_addr); - } - - // Create a new link map with information about DSOs. We move this map to - // the beginning of the address space, as this area should always be - // available. - static const uintptr_t start_addr = 4096; - std::string data; - struct r_debug debug = { 0 }; - debug.r_version = crashinfo->debug.version; - debug.r_brk = (ElfW(Addr))crashinfo->debug.brk; - debug.r_state = r_debug::RT_CONSISTENT; - debug.r_ldbase = (ElfW(Addr))crashinfo->debug.ldbase; - debug.r_map = crashinfo->debug.dso_count > 0 ? - (struct link_map*)(start_addr + sizeof(debug)) : 0; - data.append((char*)&debug, sizeof(debug)); - - struct link_map* prev = 0; - for (std::vector::iterator iter = crashinfo->link_map.begin(); - iter != crashinfo->link_map.end(); - ++iter) { - struct link_map link_map = { 0 }; - link_map.l_addr = (ElfW(Addr))iter->addr; - link_map.l_name = (char*)(start_addr + data.size() + sizeof(link_map)); - link_map.l_ld = (ElfW(Dyn)*)iter->ld; - link_map.l_prev = prev; - prev = (struct link_map*)(start_addr + data.size()); - std::string filename = full_file.GetString(iter->name); - - // Look up signature for this filename. If available, change filename - // to point to GUID, instead. - std::map::const_iterator guid = - crashinfo->signatures.find((uintptr_t)iter->addr); - if (guid != crashinfo->signatures.end()) { - filename = guid->second; - } - - if (std::distance(iter, crashinfo->link_map.end()) == 1) { - link_map.l_next = 0; - } else { - link_map.l_next = (struct link_map*)(start_addr + data.size() + - sizeof(link_map) + - ((filename.size() + 8) & ~7)); - } - data.append((char*)&link_map, sizeof(link_map)); - data.append(filename); - data.append(8 - (filename.size() & 7), 0); - } - AddDataToMapping(crashinfo, data, start_addr); - - // Map the page containing the _DYNAMIC array - if (!crashinfo->dynamic_data.empty()) { - // Make _DYNAMIC DT_DEBUG entry point to our link map - for (int i = 0;; ++i) { - ElfW(Dyn) dyn; - if ((i+1)*sizeof(dyn) > crashinfo->dynamic_data.length()) { - no_dt_debug: - if (verbose) { - fprintf(stderr, "No DT_DEBUG entry found\n"); - } - return; - } - memcpy(&dyn, crashinfo->dynamic_data.c_str() + i*sizeof(dyn), - sizeof(dyn)); - if (dyn.d_tag == DT_DEBUG) { - crashinfo->dynamic_data.replace(i*sizeof(dyn) + - offsetof(ElfW(Dyn), d_un.d_ptr), - sizeof(start_addr), - (char*)&start_addr, sizeof(start_addr)); - break; - } else if (dyn.d_tag == DT_NULL) { - goto no_dt_debug; - } - } - AddDataToMapping(crashinfo, crashinfo->dynamic_data, - (uintptr_t)crashinfo->debug.dynamic); - } -} - -int -main(int argc, char** argv) { - int argi = 1; - while (argi < argc && argv[argi][0] == '-') { - if (!strcmp(argv[argi], "-v")) { - verbose = true; - } else { - return usage(argv[0]); - } - argi++; - } - - if (argc != argi + 1) - return usage(argv[0]); - - const int fd = open(argv[argi], O_RDONLY); - if (fd < 0) - return usage(argv[0]); - - struct stat st; - fstat(fd, &st); - - const void* bytes = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); - close(fd); - if (bytes == MAP_FAILED) { - perror("Failed to mmap dump file"); - return 1; - } - - MMappedRange dump(bytes, st.st_size); - - const MDRawHeader* header = - (const MDRawHeader*) dump.GetObject(0, sizeof(MDRawHeader)); - - CrashedProcess crashinfo; - - // Always check the system info first, as that allows us to tell whether - // this is a minidump file that is compatible with our converter. - bool ok = false; - for (unsigned i = 0; i < header->stream_count; ++i) { - const MDRawDirectory* dirent = - (const MDRawDirectory*) dump.GetArrayElement( - header->stream_directory_rva, sizeof(MDRawDirectory), i); - switch (dirent->stream_type) { - case MD_SYSTEM_INFO_STREAM: - ParseSystemInfo(&crashinfo, dump.Subrange(dirent->location), dump); - ok = true; - break; - default: - break; - } - } - if (!ok) { - fprintf(stderr, "Cannot determine input file format.\n"); - _exit(1); - } - - for (unsigned i = 0; i < header->stream_count; ++i) { - const MDRawDirectory* dirent = - (const MDRawDirectory*) dump.GetArrayElement( - header->stream_directory_rva, sizeof(MDRawDirectory), i); - switch (dirent->stream_type) { - case MD_THREAD_LIST_STREAM: - ParseThreadList(&crashinfo, dump.Subrange(dirent->location), dump); - break; - case MD_LINUX_CPU_INFO: - ParseCPUInfo(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_PROC_STATUS: - ParseProcessStatus(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_LSB_RELEASE: - ParseLSBRelease(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_ENVIRON: - ParseEnvironment(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_MAPS: - ParseMaps(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_AUXV: - ParseAuxVector(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_CMD_LINE: - ParseCmdLine(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_LINUX_DSO_DEBUG: - ParseDSODebugInfo(&crashinfo, dump.Subrange(dirent->location), dump); - break; - case MD_EXCEPTION_STREAM: - ParseExceptionStream(&crashinfo, dump.Subrange(dirent->location)); - break; - case MD_MODULE_LIST_STREAM: - ParseModuleStream(&crashinfo, dump.Subrange(dirent->location), dump); - break; - default: - if (verbose) - fprintf(stderr, "Skipping %x\n", dirent->stream_type); - } - } - - AugmentMappings(&crashinfo, dump); - - // Write the ELF header. The file will look like: - // ELF header - // Phdr for the PT_NOTE - // Phdr for each of the thread stacks - // PT_NOTE - // each of the thread stacks - Ehdr ehdr; - memset(&ehdr, 0, sizeof(Ehdr)); - ehdr.e_ident[0] = ELFMAG0; - ehdr.e_ident[1] = ELFMAG1; - ehdr.e_ident[2] = ELFMAG2; - ehdr.e_ident[3] = ELFMAG3; - ehdr.e_ident[4] = ELF_CLASS; - ehdr.e_ident[5] = sex() ? ELFDATA2MSB : ELFDATA2LSB; - ehdr.e_ident[6] = EV_CURRENT; - ehdr.e_type = ET_CORE; - ehdr.e_machine = ELF_ARCH; - ehdr.e_version = EV_CURRENT; - ehdr.e_phoff = sizeof(Ehdr); - ehdr.e_ehsize = sizeof(Ehdr); - ehdr.e_phentsize= sizeof(Phdr); - ehdr.e_phnum = 1 + // PT_NOTE - crashinfo.mappings.size(); // memory mappings - ehdr.e_shentsize= sizeof(Shdr); - if (!writea(1, &ehdr, sizeof(Ehdr))) - return 1; - - size_t offset = sizeof(Ehdr) + ehdr.e_phnum * sizeof(Phdr); - size_t filesz = sizeof(Nhdr) + 8 + sizeof(prpsinfo) + - // sizeof(Nhdr) + 8 + sizeof(user) + - sizeof(Nhdr) + 8 + crashinfo.auxv_length + - crashinfo.threads.size() * ( - (sizeof(Nhdr) + 8 + sizeof(prstatus)) + - sizeof(Nhdr) + 8 + sizeof(user_fpregs_struct) -#if defined(__i386__) - + sizeof(Nhdr) + 8 + sizeof(user_fpxregs_struct) -#endif - ); - - Phdr phdr; - memset(&phdr, 0, sizeof(Phdr)); - phdr.p_type = PT_NOTE; - phdr.p_offset = offset; - phdr.p_filesz = filesz; - if (!writea(1, &phdr, sizeof(phdr))) - return 1; - - phdr.p_type = PT_LOAD; - phdr.p_align = 4096; - size_t note_align = phdr.p_align - ((offset+filesz) % phdr.p_align); - if (note_align == phdr.p_align) - note_align = 0; - offset += note_align; - - for (std::map::const_iterator iter = - crashinfo.mappings.begin(); - iter != crashinfo.mappings.end(); ++iter) { - const CrashedProcess::Mapping& mapping = iter->second; - if (mapping.permissions == 0xFFFFFFFF) { - // This is a map that we found in MD_MODULE_LIST_STREAM (as opposed to - // MD_LINUX_MAPS). It lacks some of the information that we would like - // to include. - phdr.p_flags = PF_R; - } else { - phdr.p_flags = mapping.permissions; - } - phdr.p_vaddr = mapping.start_address; - phdr.p_memsz = mapping.end_address - mapping.start_address; - if (mapping.data.size()) { - offset += filesz; - filesz = mapping.data.size(); - phdr.p_filesz = mapping.data.size(); - phdr.p_offset = offset; - } else { - phdr.p_filesz = 0; - phdr.p_offset = 0; - } - if (!writea(1, &phdr, sizeof(phdr))) - return 1; - } - - Nhdr nhdr; - memset(&nhdr, 0, sizeof(nhdr)); - nhdr.n_namesz = 5; - nhdr.n_descsz = sizeof(prpsinfo); - nhdr.n_type = NT_PRPSINFO; - if (!writea(1, &nhdr, sizeof(nhdr)) || - !writea(1, "CORE\0\0\0\0", 8) || - !writea(1, &crashinfo.prps, sizeof(prpsinfo))) { - return 1; - } - - nhdr.n_descsz = crashinfo.auxv_length; - nhdr.n_type = NT_AUXV; - if (!writea(1, &nhdr, sizeof(nhdr)) || - !writea(1, "CORE\0\0\0\0", 8) || - !writea(1, &crashinfo.auxv, crashinfo.auxv_length)) { - return 1; - } - - for (unsigned i = 0; i < crashinfo.threads.size(); ++i) { - if (crashinfo.threads[i].tid == crashinfo.crashing_tid) { - WriteThread(crashinfo.threads[i], crashinfo.fatal_signal); - break; - } - } - - for (unsigned i = 0; i < crashinfo.threads.size(); ++i) { - if (crashinfo.threads[i].tid != crashinfo.crashing_tid) - WriteThread(crashinfo.threads[i], 0); - } - - if (note_align) { - char scratch[note_align]; - memset(scratch, 0, sizeof(scratch)); - if (!writea(1, scratch, sizeof(scratch))) - return 1; - } - - for (std::map::const_iterator iter = - crashinfo.mappings.begin(); - iter != crashinfo.mappings.end(); ++iter) { - const CrashedProcess::Mapping& mapping = iter->second; - if (mapping.data.size()) { - if (!writea(1, mapping.data.c_str(), mapping.data.size())) - return 1; - } - } - - munmap(const_cast(bytes), st.st_size); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/minidump_upload.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/minidump_upload.cc deleted file mode 100644 index 6f1748ad..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/minidump_upload.cc +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_upload.cc: Upload a minidump to a HTTP server. -// The upload is sent as a multipart/form-data POST request with -// the following parameters: -// prod: the product name -// ver: the product version -// symbol_file: the breakpad format symbol file - -#include -#include -#include - -#include - -#include "common/linux/http_upload.h" - -using google_breakpad::HTTPUpload; - -struct Options { - std::string minidumpPath; - std::string uploadURLStr; - std::string product; - std::string version; - std::string proxy; - std::string proxy_user_pwd; - bool success; -}; - -//============================================================================= -static void Start(Options *options) { - std::map parameters; - // Add parameters - parameters["prod"] = options->product; - parameters["ver"] = options->version; - - // Send it - std::string response, error; - bool success = HTTPUpload::SendRequest(options->uploadURLStr, - parameters, - options->minidumpPath, - "upload_file_minidump", - options->proxy, - options->proxy_user_pwd, - "", - &response, - &error); - - if (success) { - printf("Successfully sent the minidump file.\n"); - } else { - printf("Failed to send minidump: %s\n", error.c_str()); - printf("Response:\n"); - printf("%s\n", response.c_str()); - } - options->success = success; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit minidump information.\n"); - fprintf(stderr, "Usage: %s [options...] -p -v " - "\n", argv[0]); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " should be a minidump.\n"); - fprintf(stderr, " is the destination for the upload\n"); - - fprintf(stderr, "-p:\t Product name\n"); - fprintf(stderr, "-v:\t Product version\n"); - fprintf(stderr, "-x:\t Use HTTP proxy on given port\n"); - fprintf(stderr, "-u:\t Set proxy user and password\n"); - fprintf(stderr, "-h:\t Usage\n"); - fprintf(stderr, "-?:\t Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "p:u:v:x:h?")) != -1) { - switch (ch) { - case 'p': - options->product = optarg; - break; - case 'u': - options->proxy_user_pwd = optarg; - break; - case 'v': - options->version = optarg; - break; - case 'x': - options->proxy = optarg; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = argv[optind]; - options->uploadURLStr = argv[optind + 1]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - Options options; - SetupOptions(argc, argv, &options); - Start(&options); - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/sym_upload.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/sym_upload.cc deleted file mode 100644 index a4d5be79..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/linux/symupload/sym_upload.cc +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// symupload.cc: Upload a symbol file to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// code_file: the basename of the module, e.g. "app" -// debug_file: the basename of the debugging file, e.g. "app" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// version: the file version of the module, e.g. "1.2.3.4" -// os: the operating system that the module was built for -// cpu: the CPU that the module was built for -// symbol_file: the contents of the breakpad-format symbol file - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "common/linux/http_upload.h" - -using google_breakpad::HTTPUpload; - -typedef struct { - std::string symbolsPath; - std::string uploadURLStr; - std::string proxy; - std::string proxy_user_pwd; - std::string version; - bool success; -} Options; - -static void TokenizeByChar(const std::string &source_string, - int c, std::vector *results) { - assert(results); - std::string::size_type cur_pos = 0, next_pos = 0; - while ((next_pos = source_string.find(c, cur_pos)) != std::string::npos) { - if (next_pos != cur_pos) - results->push_back(source_string.substr(cur_pos, next_pos - cur_pos)); - cur_pos = next_pos + 1; - } - if (cur_pos < source_string.size() && next_pos != cur_pos) - results->push_back(source_string.substr(cur_pos)); -} - -//============================================================================= -// Parse out the module line which have 5 parts. -// MODULE -static bool ModuleDataForSymbolFile(const std::string &file, - std::vector *module_parts) { - assert(module_parts); - const size_t kModulePartNumber = 5; - FILE *fp = fopen(file.c_str(), "r"); - if (fp) { - char buffer[1024]; - if (fgets(buffer, sizeof(buffer), fp)) { - std::string line(buffer); - std::string::size_type line_break_pos = line.find_first_of('\n'); - if (line_break_pos == std::string::npos) { - assert(!"The file is invalid!"); - fclose(fp); - return false; - } - line.resize(line_break_pos); - const char kDelimiter = ' '; - TokenizeByChar(line, kDelimiter, module_parts); - if (module_parts->size() != kModulePartNumber) - module_parts->clear(); - } - fclose(fp); - } - - return module_parts->size() == kModulePartNumber; -} - -//============================================================================= -static std::string CompactIdentifier(const std::string &uuid) { - std::vector components; - TokenizeByChar(uuid, '-', &components); - std::string result; - for (size_t i = 0; i < components.size(); ++i) - result += components[i]; - return result; -} - -//============================================================================= -static void Start(Options *options) { - std::map parameters; - options->success = false; - std::vector module_parts; - if (!ModuleDataForSymbolFile(options->symbolsPath, &module_parts)) { - fprintf(stderr, "Failed to parse symbol file!\n"); - return; - } - - std::string compacted_id = CompactIdentifier(module_parts[3]); - - // Add parameters - if (!options->version.empty()) - parameters["version"] = options->version; - - // MODULE - // 0 1 2 3 4 - parameters["os"] = module_parts[1]; - parameters["cpu"] = module_parts[2]; - parameters["debug_file"] = module_parts[4]; - parameters["code_file"] = module_parts[4]; - parameters["debug_identifier"] = compacted_id; - std::string response, error; - bool success = HTTPUpload::SendRequest(options->uploadURLStr, - parameters, - options->symbolsPath, - "symbol_file", - options->proxy, - options->proxy_user_pwd, - "", - &response, - &error); - - if (success) { - printf("Successfully sent the symbol file.\n"); - } else { - printf("Failed to send symbol file: %s\n", error.c_str()); - printf("Response:\n"); - printf("%s\n", response.c_str()); - } - options->success = success; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit symbol information.\n"); - fprintf(stderr, "Usage: %s [options...] \n", argv[0]); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " should be created by using the dump_syms tool.\n"); - fprintf(stderr, " is the destination for the upload\n"); - fprintf(stderr, "-v:\t Version information (e.g., 1.2.3.4)\n"); - fprintf(stderr, "-x:\t Use HTTP proxy on given port\n"); - fprintf(stderr, "-u:\t Set proxy user and password\n"); - fprintf(stderr, "-h:\t Usage\n"); - fprintf(stderr, "-?:\t Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "u:v:x:h?")) != -1) { - switch (ch) { - case 'u': - options->proxy_user_pwd = optarg; - break; - case 'v': - options->version = optarg; - break; - case 'x': - options->proxy = optarg; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->symbolsPath = argv[optind]; - options->uploadURLStr = argv[optind + 1]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - Options options; - SetupOptions(argc, argv, &options); - Start(&options); - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/crash_report.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/crash_report.mm deleted file mode 100644 index 78eb6f27..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/crash_report.mm +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// crash_report.mm: Convert the contents of a minidump into a format that -// looks more like Apple's CrashReporter format - -#include - -#include -#include - -#include - -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/pathname_stripper.h" -#include "processor/scoped_ptr.h" -#include "processor/simple_symbol_supplier.h" - -#include "on_demand_symbol_supplier.h" - -using std::string; - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::CodeModules; -using google_breakpad::Minidump; -using google_breakpad::MinidumpProcessor; -using google_breakpad::OnDemandSymbolSupplier; -using google_breakpad::PathnameStripper; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameX86; -using google_breakpad::SystemInfo; - -typedef struct { - NSString *minidumpPath; - NSString *searchDir; - NSString *symbolSearchDir; - BOOL printThreadMemory; -} Options; - -//============================================================================= -static int PrintRegister(const char *name, u_int32_t value, int sequence) { - if (sequence % 4 == 0) { - printf("\n"); - } - printf("%6s = 0x%08x ", name, value); - return ++sequence; -} - -//============================================================================= -static void PrintStack(const CallStack *stack, const string &cpu) { - size_t frame_count = stack->frames()->size(); - char buffer[1024]; - for (size_t frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - const CodeModule *module = frame->module; - printf("%2zu ", frame_index); - - if (module) { - // Module name (20 chars max) - strcpy(buffer, PathnameStripper::File(module->code_file()).c_str()); - int maxStr = 20; - buffer[maxStr] = 0; - printf("%-*s", maxStr, buffer); - - strcpy(buffer, module->version().c_str()); - buffer[maxStr] = 0; - - printf("%-*s",maxStr, buffer); - - u_int64_t instruction = frame->instruction; - - // PPC only: Adjust the instruction to match that of Crash reporter. The - // instruction listed is actually the return address. See the detailed - // comments in stackwalker_ppc.cc for more information. - if (cpu == "ppc" && frame_index) - instruction += 4; - - printf(" 0x%08llx ", instruction); - - // Function name - if (!frame->function_name.empty()) { - printf("%s", frame->function_name.c_str()); - if (!frame->source_file_name.empty()) { - string source_file = PathnameStripper::File(frame->source_file_name); - printf(" + 0x%llx (%s:%d)", - instruction - frame->source_line_base, - source_file.c_str(), frame->source_line); - } else { - printf(" + 0x%llx", instruction - frame->function_base); - } - } - } - printf("\n"); - } -} - -//============================================================================= -static void PrintRegisters(const CallStack *stack, const string &cpu) { - int sequence = 0; - const StackFrame *frame = stack->frames()->at(0); - if (cpu == "x86") { - const StackFrameX86 *frame_x86 = - reinterpret_cast(frame); - - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EIP) - sequence = PrintRegister("eip", frame_x86->context.eip, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESP) - sequence = PrintRegister("esp", frame_x86->context.esp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBP) - sequence = PrintRegister("ebp", frame_x86->context.ebp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBX) - sequence = PrintRegister("ebx", frame_x86->context.ebx, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESI) - sequence = PrintRegister("esi", frame_x86->context.esi, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EDI) - sequence = PrintRegister("edi", frame_x86->context.edi, sequence); - if (frame_x86->context_validity == StackFrameX86::CONTEXT_VALID_ALL) { - sequence = PrintRegister("eax", frame_x86->context.eax, sequence); - sequence = PrintRegister("ecx", frame_x86->context.ecx, sequence); - sequence = PrintRegister("edx", frame_x86->context.edx, sequence); - sequence = PrintRegister("efl", frame_x86->context.eflags, sequence); - } - } else if (cpu == "ppc") { - const StackFramePPC *frame_ppc = - reinterpret_cast(frame); - - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_ALL == - StackFramePPC::CONTEXT_VALID_ALL) { - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - sequence = PrintRegister("srr1", frame_ppc->context.srr1, sequence); - sequence = PrintRegister("cr", frame_ppc->context.cr, sequence); - sequence = PrintRegister("xer", frame_ppc->context.xer, sequence); - sequence = PrintRegister("lr", frame_ppc->context.lr, sequence); - sequence = PrintRegister("ctr", frame_ppc->context.ctr, sequence); - sequence = PrintRegister("mq", frame_ppc->context.mq, sequence); - sequence = PrintRegister("vrsave", frame_ppc->context.vrsave, sequence); - - sequence = 0; - char buffer[5]; - for (int i = 0; i < MD_CONTEXT_PPC_GPR_COUNT; ++i) { - sprintf(buffer, "r%d", i); - sequence = PrintRegister(buffer, frame_ppc->context.gpr[i], sequence); - } - } else { - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_SRR0) - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_GPR1) - sequence = PrintRegister("r1", frame_ppc->context.gpr[1], sequence); - } - } - - printf("\n"); -} - -static void PrintModules(const CodeModules *modules) { - if (!modules) - return; - - printf("\n"); - printf("Loaded modules:\n"); - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - assert(module); - u_int64_t base_address = module->base_address(); - printf("0x%08llx - 0x%08llx %s %s%s %s\n", - base_address, base_address + module->size() - 1, - PathnameStripper::File(module->code_file()).c_str(), - module->version().empty() ? "???" : module->version().c_str(), - main_module != NULL && base_address == main_address ? - " (main)" : "", - module->code_file().c_str()); - } -} - -static void ProcessSingleReport(Options *options, NSString *file_path) { - string minidump_file([file_path fileSystemRepresentation]); - BasicSourceLineResolver resolver; - string search_dir = options->searchDir ? - [options->searchDir fileSystemRepresentation] : ""; - string symbol_search_dir = options->symbolSearchDir ? - [options->symbolSearchDir fileSystemRepresentation] : ""; - scoped_ptr symbol_supplier( - new OnDemandSymbolSupplier(search_dir, symbol_search_dir)); - scoped_ptr - minidump_processor(new MinidumpProcessor(symbol_supplier.get(), &resolver)); - ProcessState process_state; - scoped_ptr dump(new google_breakpad::Minidump(minidump_file)); - - if (!dump->Read()) { - fprintf(stderr, "Minidump %s could not be read\n", dump->path().c_str()); - return; - } - if (minidump_processor->Process(dump.get(), &process_state) != - google_breakpad::PROCESS_OK) { - fprintf(stderr, "MinidumpProcessor::Process failed\n"); - return; - } - - const SystemInfo *system_info = process_state.system_info(); - string cpu = system_info->cpu; - - // Convert the time to a string - u_int32_t time_date_stamp = process_state.time_date_stamp(); - struct tm timestruct; - gmtime_r(reinterpret_cast(&time_date_stamp), ×truct); - char timestr[20]; - strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", ×truct); - printf("Date: %s GMT\n", timestr); - - printf("Operating system: %s (%s)\n", system_info->os.c_str(), - system_info->os_version.c_str()); - printf("Architecture: %s\n", cpu.c_str()); - - if (process_state.crashed()) { - printf("Crash reason: %s\n", process_state.crash_reason().c_str()); - printf("Crash address: 0x%llx\n", process_state.crash_address()); - } else { - printf("No crash\n"); - } - - int requesting_thread = process_state.requesting_thread(); - if (requesting_thread != -1) { - printf("\n"); - printf("Thread %d (%s)\n", - requesting_thread, - process_state.crashed() ? "crashed" : - "requested dump, did not crash"); - PrintStack(process_state.threads()->at(requesting_thread), cpu); - } - - // Print all of the threads in the dump. - int thread_count = static_cast(process_state.threads()->size()); - const std::vector - *thread_memory_regions = process_state.thread_memory_regions(); - - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - printf("\n"); - printf("Thread %d\n", thread_index); - PrintStack(process_state.threads()->at(thread_index), cpu); - google_breakpad::MinidumpMemoryRegion *thread_stack_bytes = - thread_memory_regions->at(thread_index); - if (options->printThreadMemory) { - thread_stack_bytes->Print(); - } - } - } - - // Print the crashed registers - if (requesting_thread != -1) { - printf("\nThread %d:", requesting_thread); - PrintRegisters(process_state.threads()->at(requesting_thread), cpu); - } - - // Print information about modules - PrintModules(process_state.modules()); -} - -//============================================================================= -static void Start(Options *options) { - NSFileManager *manager = [NSFileManager defaultManager]; - NSString *minidump_path = options->minidumpPath; - BOOL is_dir = NO; - BOOL file_exists = [manager fileExistsAtPath:minidump_path - isDirectory:&is_dir]; - if (file_exists && is_dir) { - NSDirectoryEnumerator *enumerator = - [manager enumeratorAtPath:minidump_path]; - NSString *current_file = nil; - while ((current_file = [enumerator nextObject])) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - if ([[current_file pathExtension] isEqualTo:@"dmp"]) { - printf("Attempting to process report: %s\n", - [current_file cStringUsingEncoding:NSASCIIStringEncoding]); - NSString *full_path = - [minidump_path stringByAppendingPathComponent:current_file]; - ProcessSingleReport(options, full_path); - } - [pool release]; - } - } else if (file_exists) { - ProcessSingleReport(options, minidump_path); - } -} - -//============================================================================= -static void Usage(int argc, const char *argv[]) { - fprintf(stderr, "Convert a minidump to a crash report. Breakpad symbol " - "files will be used (or created if missing) in /tmp.\n" - "If a symbol-file-search-dir is specified, any symbol " - "files in it will be used instead of being loaded from " - "modules on disk.\n" - "If modules cannot be found at the paths stored in the " - "minidump file, they will be searched for at " - "/.\n"); - fprintf(stderr, "Usage: %s [-s module-search-dir] [-S symbol-file-search-dir] " - "minidump-file\n", argv[0]); - fprintf(stderr, "\t-s: Specify a search directory to use for missing modules\n" - "\t-S: Specify a search directory to use for symbol files\n" - "\t-t: Print thread stack memory in hex\n" - "\t-h: Usage\n" - "\t-?: Usage\n"); -} - -//============================================================================= -static void SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "S:s:ht?")) != -1) { - switch (ch) { - case 's': - options->searchDir = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg - length:strlen(optarg)]; - break; - - case 'S': - options->symbolSearchDir = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg - length:strlen(optarg)]; - break; - - case 't': - options->printThreadMemory = YES; - break; - case 'h': - case '?': - Usage(argc, argv); - exit(1); - break; - } - } - - if ((argc - optind) != 1) { - fprintf(stderr, "%s: Missing minidump file\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - [pool release]; - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.h deleted file mode 100644 index 28002c6b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.h +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// on_demand_symbol_supplier.h: Provides a Symbol Supplier that will create -// a breakpad symbol file on demand. - -#ifndef TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ -#define TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ - -#include -#include -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { - -using std::map; -using std::string; -class MinidumpModule; - -class OnDemandSymbolSupplier : public SymbolSupplier { - public: - // |search_dir| is the directory to search for alternative symbols with - // the same name as the module in the minidump - OnDemandSymbolSupplier(const string &search_dir, - const string &symbol_search_dir); - virtual ~OnDemandSymbolSupplier() {} - - // Returns the path to the symbol file for the given module. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - // Returns the path to the symbol file for the given module. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - // Allocates data buffer on heap, and takes the ownership of - // the data buffer. - virtual SymbolResult GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data); - - // Delete the data buffer allocated for module in GetCStringSymbolData(). - virtual void FreeSymbolData(const CodeModule *module); - - protected: - // Search directory - string search_dir_; - string symbol_search_dir_; - - // When we create a symbol file for a module, save the name of the module - // and the path to that module's symbol file. - map module_file_map_; - - // Map of allocated data buffers, keyed by module->code_file(). - map memory_buffers_; - - // Return the name for |module| This will be the value used as the key - // to the |module_file_map_|. - string GetNameForModule(const CodeModule *module); - - // Find the module on local system. If the module resides in a different - // location than the full path in the minidump, this will be the location - // used. - string GetLocalModulePath(const CodeModule *module); - - // Return the full path for |module|. - string GetModulePath(const CodeModule *module); - - // Return the path to the symbol file for |module|. If an empty string is - // returned, then |module| doesn't have a symbol file. - string GetModuleSymbolFile(const CodeModule *module); - - // Generate the breakpad symbol file for |module|. Return true if successful. - // File is generated in /tmp. - bool GenerateSymbolFile(const CodeModule *module, - const SystemInfo *system_info); -}; - -} // namespace google_breakpad - -#endif // TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.mm deleted file mode 100644 index 00360f67..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/crash_report/on_demand_symbol_supplier.mm +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/pathname_stripper.h" - -#include "on_demand_symbol_supplier.h" -#include "dump_syms.h" - -using std::map; -using std::string; - -using google_breakpad::OnDemandSymbolSupplier; -using google_breakpad::PathnameStripper; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; - -OnDemandSymbolSupplier::OnDemandSymbolSupplier(const string &search_dir, - const string &symbol_search_dir) - : search_dir_(search_dir) { - NSFileManager *mgr = [NSFileManager defaultManager]; - size_t length = symbol_search_dir.length(); - if (length) { - // Load all sym files in symbol_search_dir into our module_file_map - // A symbol file always starts with a line like this: - // MODULE mac x86 BBF0A8F9BEADDD2048E6464001CA193F0 GoogleDesktopDaemon - // or - // MODULE mac ppc BBF0A8F9BEADDD2048E6464001CA193F0 GoogleDesktopDaemon - const char *symbolSearchStr = symbol_search_dir.c_str(); - NSString *symbolSearchPath = - [mgr stringWithFileSystemRepresentation:symbolSearchStr - length:strlen(symbolSearchStr)]; - NSDirectoryEnumerator *dirEnum = [mgr enumeratorAtPath:symbolSearchPath]; - NSString *fileName; - NSCharacterSet *hexSet = - [NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"]; - NSCharacterSet *newlineSet = - [NSCharacterSet characterSetWithCharactersInString:@"\r\n"]; - while ((fileName = [dirEnum nextObject])) { - // Check to see what type of file we have - NSDictionary *attrib = [dirEnum fileAttributes]; - NSString *fileType = [attrib objectForKey:NSFileType]; - if ([fileType isEqualToString:NSFileTypeDirectory]) { - // Skip subdirectories - [dirEnum skipDescendents]; - } else { - NSString *filePath = [symbolSearchPath stringByAppendingPathComponent:fileName]; - NSString *dataStr = [[[NSString alloc] initWithContentsOfFile:filePath] autorelease]; - if (dataStr) { - // Check file to see if it is of appropriate type, and grab module - // name. - NSScanner *scanner = [NSScanner scannerWithString:dataStr]; - BOOL goodScan = [scanner scanString:@"MODULE mac " intoString:nil]; - if (goodScan) { - goodScan = ([scanner scanString:@"x86 " intoString:nil] || - [scanner scanString:@"x86_64 " intoString:nil] || - [scanner scanString:@"ppc " intoString:nil]); - if (goodScan) { - NSString *moduleID; - goodScan = [scanner scanCharactersFromSet:hexSet - intoString:&moduleID]; - if (goodScan) { - // Module IDs are always 33 chars long - goodScan = [moduleID length] == 33; - if (goodScan) { - NSString *moduleName; - goodScan = [scanner scanUpToCharactersFromSet:newlineSet - intoString:&moduleName]; - if (goodScan) { - goodScan = [moduleName length] > 0; - if (goodScan) { - const char *moduleNameStr = [moduleName UTF8String]; - const char *filePathStr = [filePath fileSystemRepresentation]; - // Map our file - module_file_map_[moduleNameStr] = filePathStr; - } - } - } - } - } - } - } - } - } - } -} - -SymbolSupplier::SymbolResult -OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - string path(GetModuleSymbolFile(module)); - - if (path.empty()) { - if (!GenerateSymbolFile(module, system_info)) - return NOT_FOUND; - - path = GetModuleSymbolFile(module); - } - - if (path.empty()) - return NOT_FOUND; - - *symbol_file = path; - return FOUND; -} - -SymbolSupplier::SymbolResult -OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - SymbolSupplier::SymbolResult s = GetSymbolFile(module, - system_info, - symbol_file); - - - if (s == FOUND) { - std::ifstream in(symbol_file->c_str()); - getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - - return s; -} - -SymbolSupplier::SymbolResult -OnDemandSymbolSupplier::GetCStringSymbolData(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - char **symbol_data) { - std::string symbol_data_string; - SymbolSupplier::SymbolResult result = GetSymbolFile(module, - system_info, - symbol_file, - &symbol_data_string); - if (result == FOUND) { - *symbol_data = new char[symbol_data_string.size() + 1]; - if (*symbol_data == NULL) { - // Should return INTERRUPT on memory allocation failure. - return INTERRUPT; - } - strcpy(*symbol_data, symbol_data_string.c_str()); - memory_buffers_.insert(make_pair(module->code_file(), *symbol_data)); - } - return result; -} - -void OnDemandSymbolSupplier::FreeSymbolData(const CodeModule *module) { - map::iterator it = memory_buffers_.find(module->code_file()); - if (it != memory_buffers_.end()) { - delete [] it->second; - memory_buffers_.erase(it); - } -} - -string OnDemandSymbolSupplier::GetLocalModulePath(const CodeModule *module) { - NSFileManager *mgr = [NSFileManager defaultManager]; - const char *moduleStr = module->code_file().c_str(); - NSString *modulePath = - [mgr stringWithFileSystemRepresentation:moduleStr length:strlen(moduleStr)]; - const char *searchStr = search_dir_.c_str(); - NSString *searchDir = - [mgr stringWithFileSystemRepresentation:searchStr length:strlen(searchStr)]; - - if ([mgr fileExistsAtPath:modulePath]) - return module->code_file(); - - // If the module is not found, try to start appending the components to the - // search string and stop if a file (not dir) is found or all components - // have been appended - NSArray *pathComponents = [modulePath componentsSeparatedByString:@"/"]; - size_t count = [pathComponents count]; - NSMutableString *path = [NSMutableString string]; - - for (size_t i = 0; i < count; ++i) { - [path setString:searchDir]; - - for (size_t j = 0; j < i + 1; ++j) { - size_t idx = count - 1 - i + j; - [path appendFormat:@"/%@", [pathComponents objectAtIndex:idx]]; - } - - BOOL isDir; - if ([mgr fileExistsAtPath:path isDirectory:&isDir] && (!isDir)) { - return [path fileSystemRepresentation]; - } - } - - return ""; -} - -string OnDemandSymbolSupplier::GetModulePath(const CodeModule *module) { - return module->code_file(); -} - -string OnDemandSymbolSupplier::GetNameForModule(const CodeModule *module) { - return PathnameStripper::File(module->code_file()); -} - -string OnDemandSymbolSupplier::GetModuleSymbolFile(const CodeModule *module) { - string name(GetNameForModule(module)); - map::iterator result = module_file_map_.find(name); - - return (result == module_file_map_.end()) ? "" : (*result).second; -} - -static float GetFileModificationTime(const char *path) { - float result = 0; - struct stat file_stat; - if (stat(path, &file_stat) == 0) - result = (float)file_stat.st_mtimespec.tv_sec + - (float)file_stat.st_mtimespec.tv_nsec / 1.0e9f; - - return result; -} - -bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module, - const SystemInfo *system_info) { - bool result = true; - string name = GetNameForModule(module); - string module_path = GetLocalModulePath(module); - NSString *symbol_path = [NSString stringWithFormat:@"/tmp/%s.%s.sym", - name.c_str(), system_info->cpu.c_str()]; - - if (module_path.empty()) - return false; - - // Check if there's already a symbol file cached. Ensure that the file is - // newer than the module. Otherwise, generate a new one. - BOOL generate_file = YES; - if ([[NSFileManager defaultManager] fileExistsAtPath:symbol_path]) { - // Check if the module file is newer than the saved symbols - float cache_time = - GetFileModificationTime([symbol_path fileSystemRepresentation]); - float module_time = - GetFileModificationTime(module_path.c_str()); - - if (cache_time > module_time) - generate_file = NO; - } - - if (generate_file) { - NSString *module_str = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:module_path.c_str() - length:module_path.length()]; - DumpSymbols dump; - if (dump.Read(module_str)) { - // What Breakpad calls "x86" should be given to the system as "i386". - std::string architecture; - if (system_info->cpu.compare("x86") == 0) { - architecture = "i386"; - } else { - architecture = system_info->cpu; - } - - if (dump.SetArchitecture(architecture)) { - FILE *file = fopen([symbol_path fileSystemRepresentation],"w"); - if (file) { - dump.WriteSymbolFile(file); - fclose(file); - } else { - printf("Unable to open %s (%d)\n", name.c_str(), errno); - result = false; - } - } else { - printf("Architecture %s not available for %s\n", - system_info->cpu.c_str(), name.c_str()); - result = false; - } - } else { - printf("Unable to open %s\n", [module_str UTF8String]); - result = false; - } - } - - // Add the mapping - if (result) - module_file_map_[name] = [symbol_path fileSystemRepresentation]; - - return result; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/dump_syms_tool.mm b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/dump_syms_tool.mm deleted file mode 100644 index 0b8c11b9..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/dump_syms_tool.mm +++ /dev/null @@ -1,147 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_syms_tool.mm: Command line tool that uses the DumpSymbols class. -// TODO(waylonis): accept stdin - -#include -#include - -#include - -#include "common/mac/dump_syms.h" -#include "common/mac/macho_utilities.h" - -using google_breakpad::DumpSymbols; -using std::vector; - -struct Options { - Options() : srcPath(), arch() { } - NSString *srcPath; - const NXArchInfo *arch; -}; - -//============================================================================= -static bool Start(const Options &options) { - DumpSymbols dump_symbols; - - if (!dump_symbols.Read(options.srcPath)) - return false; - - if (options.arch) { - if (!dump_symbols.SetArchitecture(options.arch->cputype, - options.arch->cpusubtype)) { - fprintf(stderr, "%s: no architecture '%s' is present in file.\n", - [options.srcPath fileSystemRepresentation], options.arch->name); - size_t available_size; - const struct fat_arch *available = - dump_symbols.AvailableArchitectures(&available_size); - if (available_size == 1) - fprintf(stderr, "the file's architecture is: "); - else - fprintf(stderr, "architectures present in the file are:\n"); - for (size_t i = 0; i < available_size; i++) { - const struct fat_arch *arch = &available[i]; - const NXArchInfo *arch_info = - NXGetArchInfoFromCpuType(arch->cputype, arch->cpusubtype); - if (arch_info) - fprintf(stderr, "%s (%s)\n", arch_info->name, arch_info->description); - else - fprintf(stderr, "unrecognized cpu type 0x%x, subtype 0x%x\n", - arch->cputype, arch->cpusubtype); - } - return false; - } - } - - return dump_symbols.WriteSymbolFile(stdout); -} - -//============================================================================= -static void Usage(int argc, const char *argv[]) { - fprintf(stderr, "Output a Breakpad symbol file from a Mach-o file.\n"); - fprintf(stderr, "Usage: %s [-a ARCHITECTURE] \n", - argv[0]); - fprintf(stderr, "\t-a: Architecture type [default: native, or whatever is\n"); - fprintf(stderr, "\t in the file, if it contains only one architecture]\n"); - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - signed char ch; - - while ((ch = getopt(argc, (char * const *)argv, "a:h?")) != -1) { - switch (ch) { - case 'a': { - const NXArchInfo *arch_info = NXGetArchInfoFromName(optarg); - if (!arch_info) { - fprintf(stderr, "%s: Invalid architecture: %s\n", argv[0], optarg); - Usage(argc, argv); - exit(1); - } - options->arch = arch_info; - break; - } - case '?': - case 'h': - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 1) { - fprintf(stderr, "Must specify Mach-o file\n"); - Usage(argc, argv); - exit(1); - } - - options->srcPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - bool result; - - SetupOptions(argc, argv, &options); - result = Start(options); - - [pool release]; - - return !result; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/macho_dump.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/macho_dump.cc deleted file mode 100644 index 940df25b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/dump_syms/macho_dump.cc +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// macho_dump.cc: Dump the contents of a Mach-O file. This is mostly -// a test program for the Mach_O::FatReader and Mach_O::Reader classes. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "common/byte_cursor.h" -#include "common/mac/macho_reader.h" - -using google_breakpad::ByteBuffer; -using std::ostringstream; -using std::string; -using std::vector; - -namespace { -namespace mach_o = google_breakpad::mach_o; - -string program_name; - -int check_syscall(int result, const char *operation, const char *filename) { - if (result < 0) { - fprintf(stderr, "%s: %s '%s': %s\n", - program_name.c_str(), operation, - filename, strerror(errno)); - exit(1); - } - return result; -} - -class DumpSection: public mach_o::Reader::SectionHandler { - public: - DumpSection() : index_(0) { } - bool HandleSection(const mach_o::Section §ion) { - printf(" section %d '%s' in segment '%s'\n" - " address: 0x%llx\n" - " alignment: 1 << %d B\n" - " flags: %d\n" - " size: %ld\n", - index_++, section.section_name.c_str(), section.segment_name.c_str(), - section.address, section.align, - mach_o::SectionFlags(section.flags), - section.contents.Size()); - return true; - } - - private: - int index_; -}; - -class DumpCommand: public mach_o::Reader::LoadCommandHandler { - public: - DumpCommand(mach_o::Reader *reader) : reader_(reader), index_(0) { } - bool UnknownCommand(mach_o::LoadCommandType type, - const ByteBuffer &contents) { - printf(" load command %d: %d", index_++, type); - return true; - } - bool SegmentCommand(const mach_o::Segment &segment) { - printf(" load command %d: %s-bit segment '%s'\n" - " address: 0x%llx\n" - " memory size: 0x%llx\n" - " maximum protection: 0x%x\n" - " initial protection: 0x%x\n" - " flags: %d\n" - " section_list size: %ld B\n", - index_++, (segment.bits_64 ? "64" : "32"), segment.name.c_str(), - segment.vmaddr, segment.vmsize, segment.maxprot, - segment.initprot, mach_o::SegmentFlags(segment.flags), - segment.section_list.Size()); - - DumpSection dump_section; - return reader_->WalkSegmentSections(segment, &dump_section); - } - private: - mach_o::Reader *reader_; - int index_; -}; - -void DumpFile(const char *filename) { - int fd = check_syscall(open(filename, O_RDONLY), "opening", filename); - struct stat attributes; - check_syscall(fstat(fd, &attributes), - "getting file attributes for", filename); - void *mapping = mmap(NULL, attributes.st_size, PROT_READ, - MAP_PRIVATE, fd, 0); - close(fd); - check_syscall(mapping == (void *)-1 ? -1 : 0, - "mapping contents of", filename); - - mach_o::FatReader::Reporter fat_reporter(filename); - mach_o::FatReader fat_reader(&fat_reporter); - if (!fat_reader.Read(reinterpret_cast(mapping), - attributes.st_size)) { - exit(1); - } - printf("filename: %s\n", filename); - size_t object_files_size; - const struct fat_arch *object_files - = fat_reader.object_files(&object_files_size); - printf(" object file count: %ld\n", object_files_size); - for (size_t i = 0; i < object_files_size; i++) { - const struct fat_arch &file = object_files[i]; - const NXArchInfo *fat_arch_info - = NXGetArchInfoFromCpuType(file.cputype, file.cpusubtype); - printf("\n object file %ld:\n" - " fat header:\n:" - " CPU type: %s (%s)\n" - " size: %d B\n" - " alignment: 1<<%d B\n", - i, fat_arch_info->name, fat_arch_info->description, - file.size, file.align); - - ostringstream name; - name << filename; - if (object_files_size > 1) - name << ", object file #" << i; - ByteBuffer file_contents(reinterpret_cast(mapping) - + file.offset, file.size); - mach_o::Reader::Reporter reporter(name.str()); - mach_o::Reader reader(&reporter); - if (!reader.Read(file_contents, file.cputype, file.cpusubtype)) { - exit(1); - } - - const NXArchInfo *macho_arch_info = - NXGetArchInfoFromCpuType(reader.cpu_type(), - reader.cpu_subtype()); - printf(" Mach-O header:\n" - " word size: %s\n" - " CPU type: %s (%s)\n" - " File type: %d\n" - " flags: %x\n", - (reader.bits_64() ? "64 bits" : "32 bits"), - macho_arch_info->name, macho_arch_info->description, - reader.file_type(), reader.flags()); - - DumpCommand dump_command(&reader); - reader.WalkLoadCommands(&dump_command); - } - munmap(mapping, attributes.st_size); -} - -} // namespace - -int main(int argc, char **argv) { - program_name = basename(argv[0]); - if (argc == 1) { - fprintf(stderr, "Usage: %s FILE ...\n" - "Dump the contents of the Mach-O or fat binary files " - "'FILE ...'.\n", program_name.c_str()); - } - for (int i = 1; i < argc; i++) { - DumpFile(argv[i]); - } -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/minidump_upload.m b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/minidump_upload.m deleted file mode 100644 index 991a5de5..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/minidump_upload.m +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_upload.m: Upload a minidump to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// prod: the product name -// ver: the product version -// symbol_file: the breakpad format symbol file - -#import - -#import - -#import "common/mac/HTTPMultipartUpload.h" - -typedef struct { - NSString *minidumpPath; - NSString *uploadURLStr; - NSString *product; - NSString *version; - BOOL success; -} Options; - -//============================================================================= -static void Start(Options *options) { - NSURL *url = [NSURL URLWithString:options->uploadURLStr]; - HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - - // Add parameters - [parameters setObject:options->product forKey:@"prod"]; - [parameters setObject:options->version forKey:@"ver"]; - [ul setParameters:parameters]; - - // Add file - [ul addFileAtPath:options->minidumpPath name:@"upload_file_minidump"]; - - // Send it - NSError *error = nil; - NSData *data = [ul send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - - NSLog(@"Send: %@", error ? [error description] : @"No Error"); - NSLog(@"Response: %d", [[ul response] statusCode]); - NSLog(@"Result: %d bytes\n%@", [data length], result); - - [result release]; - [ul release]; - options->success = !error; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit minidump information.\n"); - fprintf(stderr, "Usage: %s -p -v " - "\n", argv[0]); - fprintf(stderr, " should be a minidump.\n"); - fprintf(stderr, " is the destination for the upload\n"); - - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "p:v:h?")) != -1) { - switch (ch) { - case 'p': - options->product = [NSString stringWithUTF8String:optarg]; - break; - case 'v': - options->version = [NSString stringWithUTF8String:optarg]; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = [NSString stringWithUTF8String:argv[optind]]; - options->uploadURLStr = [NSString stringWithUTF8String:argv[optind + 1]]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/symupload.m b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/symupload.m deleted file mode 100644 index fe0cb67c..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/mac/symupload/symupload.m +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// symupload.m: Upload a symbol file to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// code_file: the basename of the module, e.g. "app" -// debug_file: the basename of the debugging file, e.g. "app" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// os: the operating system that the module was built for -// cpu: the CPU that the module was built for (x86 or ppc) -// symbol_file: the contents of the breakpad-format symbol file - -#include - -#include -#include "HTTPMultipartUpload.h" - -typedef struct { - NSString *symbolsPath; - NSString *uploadURLStr; - BOOL success; -} Options; - -//============================================================================= -static NSArray *ModuleDataForSymbolFile(NSString *file) { - NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:file]; - NSData *data = [fh readDataOfLength:1024]; - NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - NSScanner *scanner = [NSScanner scannerWithString:str]; - NSString *line; - NSMutableArray *parts = nil; - const int MODULE_ID_INDEX = 3; - - if ([scanner scanUpToString:@"\n" intoString:&line]) { - parts = [[NSMutableArray alloc] init]; - NSScanner *moduleInfoScanner = [NSScanner scannerWithString:line]; - NSString *moduleInfo; - // Get everything BEFORE the module name. None of these properties - // can have spaces. - for (int i = 0; i <= MODULE_ID_INDEX; i++) { - [moduleInfoScanner scanUpToString:@" " intoString:&moduleInfo]; - [parts addObject:moduleInfo]; - } - - // Now get the module name. This can have a space so we scan to - // the end of the line. - [moduleInfoScanner scanUpToString:@"\n" intoString:&moduleInfo]; - [parts addObject:moduleInfo]; - } - - [str release]; - - return parts; -} - -//============================================================================= -static NSString *CompactIdentifier(NSString *uuid) { - NSMutableString *str = [NSMutableString stringWithString:uuid]; - [str replaceOccurrencesOfString:@"-" withString:@"" options:0 - range:NSMakeRange(0, [str length])]; - - return str; -} - -//============================================================================= -static void Start(Options *options) { - NSURL *url = [NSURL URLWithString:options->uploadURLStr]; - HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - NSArray *moduleParts = ModuleDataForSymbolFile(options->symbolsPath); - NSMutableString *compactedID = - [NSMutableString stringWithString:[moduleParts objectAtIndex:3]]; - [compactedID replaceOccurrencesOfString:@"-" withString:@"" options:0 - range:NSMakeRange(0, [compactedID length])]; - - // Add parameters - [parameters setObject:compactedID forKey:@"debug_identifier"]; - - // MODULE - // 0 1 2 3 4 - [parameters setObject:[moduleParts objectAtIndex:1] forKey:@"os"]; - [parameters setObject:[moduleParts objectAtIndex:2] forKey:@"cpu"]; - [parameters setObject:[moduleParts objectAtIndex:4] forKey:@"debug_file"]; - [parameters setObject:[moduleParts objectAtIndex:4] forKey:@"code_file"]; - [ul setParameters:parameters]; - - NSArray *keys = [parameters allKeys]; - int count = [keys count]; - for (int i = 0; i < count; ++i) { - NSString *key = [keys objectAtIndex:i]; - NSString *value = [parameters objectForKey:key]; - fprintf(stdout, "'%s' = '%s'\n", [key UTF8String], - [value UTF8String]); - } - - // Add file - [ul addFileAtPath:options->symbolsPath name:@"symbol_file"]; - - // Send it - NSError *error = nil; - NSData *data = [ul send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - int status = [[ul response] statusCode]; - - fprintf(stdout, "Send: %s\n", error ? [[error description] UTF8String] : - "No Error"); - fprintf(stdout, "Response: %d\n", status); - fprintf(stdout, "Result: %lu bytes\n%s\n", [data length], [result UTF8String]); - - [result release]; - [ul release]; - options->success = !error && status==200; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit symbol information.\n"); - fprintf(stderr, "Usage: %s \n", argv[0]); - fprintf(stderr, " should be created by using the dump_syms tool.\n"); - fprintf(stderr, " is the destination for the upload\n"); - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "h?")) != -1) { - switch (ch) { - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->symbolsPath = [NSString stringWithUTF8String:argv[optind]]; - options->uploadURLStr = [NSString stringWithUTF8String:argv[optind + 1]]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/Makefile b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/Makefile deleted file mode 100644 index f0a4c11a..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Author: Alfred Peng - -CXX=CC -CC=cc - -CXXFLAGS=-g -xs -xdebugformat=stabs -I../../.. -I../../../common/solaris -lelf -ldemangle -D_REENTRANT - -.PHONY:all clean - -BIN=dump_syms - -all:$(BIN) - -DUMP_OBJ=dump_symbols.o guid_creator.o dump_syms.o file_id.o md5.o - -dump_syms:$(DUMP_OBJ) - $(CXX) $(CXXFLAGS) -o $@ $^ - -dump_symbols.o:../../../common/solaris/dump_symbols.cc - $(CXX) $(CXXFLAGS) -c $^ - -guid_creator.o:../../../common/solaris/guid_creator.cc - $(CXX) $(CXXFLAGS) -c $^ - -file_id.o:../../../common/solaris/file_id.cc - $(CXX) $(CXXFLAGS) -c $^ - -md5.o:../../../common/md5.c - $(CC) $(CXXFLAGS) -c $^ - -test:all - ./run_regtest.sh - -clean: - rm -f $(BIN) $(DUMP_OBJ) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/dump_syms.cc deleted file mode 100644 index 54cea57e..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/dump_syms.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include "common/solaris/dump_symbols.h" - -using namespace google_breakpad; - -int main(int argc, char **argv) { - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - return 1; - } - - const char *binary = argv[1]; - - DumpSymbols dumper; - if (!dumper.WriteSymbolFile(binary, fileno(stdout))) { - fprintf(stderr, "Failed to write symbol file.\n"); - return 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/run_regtest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/run_regtest.sh deleted file mode 100644 index ffb34330..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/run_regtest.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -./dump_syms testdata/dump_syms_regtest.o > testdata/dump_syms_regtest.new -status=$? - -if [ $status -ne 0 ] ; then - echo "FAIL, dump_syms failed" - exit $status -fi - -diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \ - testdata/dump_syms_regtest.diff -status=$? - -if [ $status -eq 0 ] ; then - rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new - echo "PASS" -else - echo "FAIL, see testdata/dump_syms_regtest.[new|diff]" -fi - -exit $status diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc deleted file mode 100644 index e617a23b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ./dump_syms dump_syms_regtest.pdb > dump_syms_regtest.sym - -namespace google_breakpad { - -class C { - public: - C() : member_(1) {} - virtual ~C() {} - - void set_member(int value) { member_ = value; } - int member() const { return member_; } - - void f() { member_ = g(); } - virtual int g() { return 2; } - static char* h(const C &that) { return 0; } - - private: - int member_; -}; - -static int i() { - return 3; -} - -} // namespace google_breakpad - -int main(int argc, char **argv) { - google_breakpad::C object; - object.set_member(google_breakpad::i()); - object.f(); - int value = object.g(); - char *nothing = object.h(object); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o deleted file mode 100644 index a1c61b2d..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs deleted file mode 100644 index c5f93ef7..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs +++ /dev/null @@ -1,129 +0,0 @@ - - -Debugging Stab table -- 104 entries - - 0: .stabs "dump_syms_regtest.cc",N_UNDF,0x0,0x67,0x71c - 1: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/",N_SO,0x0,0x0,0x0 - 2: .stabs "dump_syms_regtest.cc",N_SO,0x0,0x4,0x0 - 3: .stabs "",N_OBJ,0x0,0x0,0x0 - 4: .stabs "",N_OBJ,0x0,0x0,0x0 - 5: .stabs "V=9.0;DBG_GEN=5.0.8;dm;cd;backend;ptf;ptx;ptk;s;g;R=5.8<>;G=.XAB6Z2hOiL$Gl1b.;A=2",N_OPT,0x0,0x0,0x46fcb88e - 6: .stabs "dump_syms_regtest.cc",N_SOL,0x0,0x0,0x0 - 7: .stabs "char:t(0,1)=bsc1;0;8",N_ISYM,0x0,0x0,0x0 - 8: .stabs "short:t(0,2)=bs2;0;16",N_ISYM,0x0,0x0,0x0 - 9: .stabs "int:t(0,3)=bs4;0;32",N_ISYM,0x0,0x0,0x0 - 10: .stabs "long:t(0,4)=bs4;0;32",N_ISYM,0x0,0x0,0x0 - 11: .stabs "long long:t(0,5)=bs8;0;64",N_ISYM,0x0,0x0,0x0 - 12: .stabs "unsigned char:t(0,6)=buc1;0;8",N_ISYM,0x0,0x0,0x0 - 13: .stabs "unsigned short:t(0,7)=bu2;0;16",N_ISYM,0x0,0x0,0x0 - 14: .stabs "unsigned:t(0,8)=bu4;0;32",N_ISYM,0x0,0x0,0x0 - 15: .stabs "unsigned long:t(0,9)=bu4;0;32",N_ISYM,0x0,0x0,0x0 - 16: .stabs "unsigned long long:t(0,10)=bu8;0;64",N_ISYM,0x0,0x0,0x0 - 17: .stabs "signed char:t(0,11)=bsc1;0;8",N_ISYM,0x0,0x0,0x0 - 18: .stabs "wchar_t:t(0,12)=buc4;0;32",N_ISYM,0x0,0x0,0x0 - 19: .stabs "void:t(0,13)=bs0;0;0",N_ISYM,0x0,0x0,0x0 - 20: .stabs "float:t(0,14)=R1;4",N_ISYM,0x0,0x0,0x0 - 21: .stabs "double:t(0,15)=R2;8",N_ISYM,0x0,0x0,0x0 - 22: .stabs "long double:t(0,16)=R6;12",N_ISYM,0x0,0x0,0x0 - 23: .stabs "...:t(0,17)=buv4;0;32",N_ISYM,0x0,0x0,0x0 - 24: .stabs "bool:t(0,18)=bub1;0;8",N_ISYM,0x0,0x0,0x0 - 25: .stabs "__1nPgoogle_breakpad_:T(0,19)=Yn0google_breakpad;",N_ISYM,0x0,0x0,0x0 - 26: .stabs "nBC(0,19):U(0,20)",N_ESYM,0x0,0x0,0x0 - 27: .stabs "nBC(0,19):T(0,20)=Yc8C;;AcHmember_:(0,3),32,32;;Cc2t6M_v K2c2T6M_v CcKset_member6Mi_v CcGmember6kM_i CcBf6M_v K3cBg6M_i GcBh6Frk1_pc;;;2 0;;;;110;",N_ESYM,0x0,0x8,0x0 - 28: .stabs "main:F(0,3);(0,3);(0,21)=*(0,22)=*(0,1)",N_FUN,0x0,0x38,0x0 - 29: .stabs "main",N_MAIN,0x0,0x0,0x0 - 30: .stabs "argc:p(0,3)",N_PSYM,0x0,0x4,0x8 - 31: .stabs "argv:p(0,21)",N_PSYM,0x0,0x4,0xc - 32: .stabn N_LBRAC,0x0,0x1,0x12 - 33: .stabs "object:(0,20)",N_LSYM,0x0,0x8,0xfffffff4 - 34: .stabs "value:(0,3)",N_LSYM,0x0,0x4,0xfffffff0 - 35: .stabs "nothing:(0,22)",N_LSYM,0x0,0x4,0xffffffec - 36: .stabn N_SLINE,0x0,0x39,0x12 - 37: .stabs "object:2",N_CONSTRUCT,0x0,0xc,0x12 - 38: .stabn N_SLINE,0x2,0x3a,0x1e - 39: .stabn N_SLINE,0x0,0x3b,0x36 - 40: .stabn N_SLINE,0x0,0x3c,0x42 - 41: .stabn N_SLINE,0x0,0x3d,0x57 - 42: .stabn N_SLINE,0x0,0x3f,0x6c - 43: .stabs "2:0",N_DESTRUCT,0x0,0xc,0x73 - 44: .stabn N_SLINE,0xfffffffe,0x40,0x9c - 45: .stabn N_RBRAC,0x0,0x1,0x9c - 46: .stabs "__1cPgoogle_breakpadBi6F_i_:f(0,3)",N_FUN,0x0,0x32,0x0 - 47: .stabn N_LBRAC,0x0,0x1,0x6 - 48: .stabn N_SLINE,0x0,0x33,0x6 - 49: .stabn N_SLINE,0x0,0x34,0x10 - 50: .stabn N_RBRAC,0x0,0x1,0x10 - 51: .stabs "__1cPgoogle_breakpadBC2t6M_v_:F(0,13);(0,23)=*(0,20)",N_FUN,0x0,0x24,0x0 - 52: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 53: .stabn N_LBRAC,0x0,0x1,0x3 - 54: .stabn N_SLINE,0x0,0x24,0x25 - 55: .stabn N_RBRAC,0x0,0x1,0x25 - 56: .stabs "__1cPgoogle_breakpadBC2T6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x25,0x0 - 57: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 58: .stabn N_LBRAC,0x0,0x1,0x3 - 59: .stabn N_SLINE,0x0,0x25,0x3 - 60: .stabn N_RBRAC,0x0,0x1,0x3 - 61: .stabs "__1cPgoogle_breakpadBCKset_member6Mi_v_:F(0,13);(0,23);(0,3)",N_FUN,0x0,0x27,0x0 - 62: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 63: .stabs "value:p(0,3)",N_PSYM,0x0,0x4,0xc - 64: .stabn N_LBRAC,0x0,0x1,0x3 - 65: .stabn N_SLINE,0x0,0x27,0x3 - 66: .stabn N_SLINE,0x0,0x27,0xc - 67: .stabn N_RBRAC,0x0,0x1,0xc - 68: .stabs "__1cPgoogle_breakpadBCBf6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x2a,0x0 - 69: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 70: .stabn N_LBRAC,0x0,0x1,0x3 - 71: .stabn N_SLINE,0x0,0x2a,0x3 - 72: .stabn N_SLINE,0x0,0x2a,0x1d - 73: .stabn N_RBRAC,0x0,0x1,0x1d - 74: .stabs "__1cPgoogle_breakpadBCBg6M_i_:F(0,3);(0,23)",N_FUN,0x0,0x2b,0x0 - 75: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 76: .stabn N_LBRAC,0x0,0x1,0x6 - 77: .stabn N_SLINE,0x0,0x2b,0x6 - 78: .stabn N_SLINE,0x0,0x2b,0x10 - 79: .stabn N_RBRAC,0x0,0x1,0x10 - 80: .stabs "__1cPgoogle_breakpadBCBh6Frk1_pc_:F(0,22);(0,24)=&(0,25)=k(0,20)",N_FUN,0x0,0x2c,0x0 - 81: .stabs "that:p(0,24)",N_PSYM,0x0,0x4,0x8 - 82: .stabn N_LBRAC,0x0,0x1,0x6 - 83: .stabn N_SLINE,0x0,0x2c,0x6 - 84: .stabn N_SLINE,0x0,0x2c,0x10 - 85: .stabn N_RBRAC,0x0,0x1,0x10 - 86: .stabs "__1cPgoogle_breakpadBC2T5B6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x25,0x0 - 87: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 88: .stabn N_LBRAC,0x0,0x1,0x3 - 89: .stabn N_SLINE,0x0,0x25,0xf - 90: .stabn N_RBRAC,0x0,0x1,0xf - 91: .stabs "__SLIP.DELETER__A:f(0,13);(0,23);(0,3)",N_FUN,0x0,0x25,0x0 - 92: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 93: .stabs "delete:p(0,3)",N_PSYM,0x0,0x4,0xc - 94: .stabn N_LBRAC,0x0,0x1,0x3 - 95: .stabn N_LBRAC,0x0,0x2,0x3 - 96: .stabn N_RBRAC,0x0,0x2,0x28 - 97: .stabn N_RBRAC,0x0,0x1,0x28 - 98: .stabs "true:l(0,18);1",N_LSYM,0x0,0x4,0x0 - 99: .stabs "false:l(0,18);0",N_LSYM,0x0,0x4,0x0 - 100: .stabs "__1c2k6Fpv_v_:P(0,13);(0,26)=*(0,13)",N_FUN,0x0,0x0,0x0 - 101: .stabs "__1cPgoogle_breakpadBC2t5B6M_v_:F__1cPgoogle_breakpadBC2t6M_v_",N_ALIAS,0x0,0x0,0x0 - 102: .stabs "cbD__RTTI__1nPgoogle_breakpadBC_(0,19):YR(0,20)",N_LSYM,0x0,0x0,0x0 - 103: .stabn N_ENDM,0x0,0x0,0x0 - - -Index Stab table -- 17 entries - - 0: .stabs "dump_syms_regtest.cc",N_UNDF,0x0,0x10,0x3b1 - 1: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/",N_SO,0x0,0x0,0x0 - 2: .stabs "dump_syms_regtest.cc",N_SO,0x0,0x4,0x0 - 3: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata",N_OBJ,0x0,0x0,0x0 - 4: .stabs "dump_syms_regtest.o",N_OBJ,0x0,0x0,0x0 - 5: .stabs "V=9.0;DBG_GEN=5.0.8;dm;cd;backend;ptf;ptx;ptk;s;g;R=5.8<>;G=.XAB6Z2hOiL$Gl1b.;A=2",N_OPT,0x0,0x0,0x46fcb88e - 6: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/; /ws/on10-tools-prc/SUNWspro/SS11/prod/bin/CC -g -xs -xdebugformat=stabs -I../../.. -I../../../common/solaris -D_REENTRANT -xs dump_syms_regtest.cc -Qoption ccfe -prefix -Qoption ccfe .XAB6Z2hOiL\$Gl1b.",N_CMDLINE,0x0,0x0,0x0 - 7: .stabs "__1nPgoogle_breakpadBC_:U",N_ESYM,0x0,0x0,0x0 - 8: .stabs "main",N_MAIN,0x0,0x0,0x0 - 9: .stabs "main",N_FUN,0x0,0x0,0x0 - 10: .stabs "__1cPgoogle_breakpadBC2t6M_v_",N_FUN,0x0,0x0,0x0 - 11: .stabs "__1cPgoogle_breakpadBC2T6M_v_",N_FUN,0x0,0x0,0x0 - 12: .stabs "__1cPgoogle_breakpadBCKset_member6Mi_v_",N_FUN,0x0,0x0,0x0 - 13: .stabs "__1cPgoogle_breakpadBCBf6M_v_",N_FUN,0x0,0x0,0x0 - 14: .stabs "__1cPgoogle_breakpadBCBg6M_i_",N_FUN,0x0,0x0,0x0 - 15: .stabs "__1cPgoogle_breakpadBCBh6Frk1_pc_",N_FUN,0x0,0x0,0x0 - 16: .stabs "__1cPgoogle_breakpadBC2T5B6M_v_",N_FUN,0x0,0x0,0x0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym deleted file mode 100644 index 44d3c539..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym +++ /dev/null @@ -1,33 +0,0 @@ -MODULE solaris x86 3DC8191474338D8587339B5FB3E2C62A0 dump_syms_regtest.o -FILE 0 dump_syms_regtest.cc -FUNC 0 156 0 main -12 18 57 0 -1e 12 58 0 -36 24 59 0 -42 12 60 0 -57 21 61 0 -6c 21 63 0 -9c 48 64 0 -FUNC 0 16 0 int google_breakpad::i() -6 6 51 0 -10 10 52 0 -FUNC 0 37 0 google_breakpad::C::C() -25 37 36 0 -FUNC 0 3 0 google_breakpad::C::~C() -3 3 37 0 -FUNC 0 12 0 void google_breakpad::C::set_member(int) -3 3 39 0 -c 9 39 0 -FUNC 0 29 0 void google_breakpad::C::f() -3 3 42 0 -1d 26 42 0 -FUNC 0 16 0 int google_breakpad::C::g() -6 6 43 0 -10 10 43 0 -FUNC 0 16 0 char*google_breakpad::C::h(const google_breakpad::C&) -6 6 44 0 -10 10 44 0 -FUNC 0 15 0 google_breakpad::C::~C #Nvariant 1() -f 15 37 0 -FUNC 0 0 0 __SLIP.DELETER__A -FUNC 0 0 0 void operator delete(void*) diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/dump_syms.exe b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/dump_syms.exe deleted file mode 100644 index 7b836a1d..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/dump_syms.exe and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/symupload.exe b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/symupload.exe deleted file mode 100644 index c78299ef..00000000 Binary files a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/binaries/symupload.exe and /dev/null differ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.cc deleted file mode 100644 index 2b6278ba..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.cc +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ms_symbol_server_converter.cc: Obtain symbol files from a Microsoft -// symbol server, and convert them to Breakpad's dumped format. -// -// See ms_symbol_server_converter.h for documentation. -// -// Author: Mark Mentovai - -#include -#include - -#include -#include - -#include "tools/windows/converter/ms_symbol_server_converter.h" -#include "common/windows/pdb_source_line_writer.h" -#include "common/windows/string_utils-inl.h" - -// SYMOPT_NO_PROMPTS is not defined in earlier platform SDKs. Define it -// in that case, in the event that this code is used with a newer version -// of DbgHelp at runtime that recognizes the option. The presence of this -// bit in the symbol options should not harm earlier versions of DbgHelp. -#ifndef SYMOPT_NO_PROMPTS -#define SYMOPT_NO_PROMPTS 0x00080000 -#endif // SYMOPT_NO_PROMPTS - -namespace google_breakpad { - -// Use sscanf_s if it is available, to quench the warning about scanf being -// deprecated. Use scanf where sscanf_is not available. Note that the -// parameters passed to sscanf and sscanf_s are only compatible as long as -// fields of type c, C, s, S, and [ are not used. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define SSCANF sscanf_s -#else // _MSC_VER >= 1400 -#define SSCANF sscanf -#endif // _MSC_VER >= 1400 - -bool GUIDOrSignatureIdentifier::InitializeFromString( - const string &identifier) { - type_ = TYPE_NONE; - - size_t length = identifier.length(); - - if (length > 32 && length <= 40) { - // GUID - if (SSCANF(identifier.c_str(), - "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%X", - &guid_.Data1, &guid_.Data2, &guid_.Data3, - &guid_.Data4[0], &guid_.Data4[1], - &guid_.Data4[2], &guid_.Data4[3], - &guid_.Data4[4], &guid_.Data4[5], - &guid_.Data4[6], &guid_.Data4[7], - &age_) != 12) { - return false; - } - - type_ = TYPE_GUID; - } else if (length > 8 && length <= 15) { - // Signature - if (SSCANF(identifier.c_str(), "%08X%x", &signature_, &age_) != 2) { - return false; - } - - type_ = TYPE_SIGNATURE; - } else { - return false; - } - - return true; -} - -#undef SSCANF - -MSSymbolServerConverter::MSSymbolServerConverter( - const string &local_cache, const vector &symbol_servers) - : symbol_path_(), - fail_dns_(false), - fail_timeout_(false), - fail_not_found_(false) { - // Setting local_cache can be done without verifying that it exists because - // SymSrv will create it if it is missing - any creation failures will occur - // at that time, so there's nothing to check here, making it safe to - // assign this in the constructor. - - assert(symbol_servers.size() > 0); - - // These are characters that are interpreted as having special meanings in - // symbol_path_. - const char *kInvalidCharacters = "*;"; - assert(local_cache.find_first_of(kInvalidCharacters) == string::npos); - - for (vector::const_iterator symbol_server = symbol_servers.begin(); - symbol_server != symbol_servers.end(); - ++symbol_server) { - // The symbol path format is explained by - // http://msdn.microsoft.com/library/en-us/debug/base/using_symsrv.asp . - // "srv*" is the same as "symsrv*symsrv.dll*", which means that - // symsrv.dll is to be responsible for locating symbols. symsrv.dll - // interprets the rest of the string as a series of symbol stores separated - // by '*'. "srv*local_cache*symbol_server" means to check local_cache - // first for the symbol file, and if it is not found there, to check - // symbol_server. Symbol files found on the symbol server will be placed - // in the local cache, decompressed. - // - // Multiple specifications in this format may be presented, separated by - // semicolons. - - assert((*symbol_server).find_first_of(kInvalidCharacters) == string::npos); - symbol_path_ += "srv*" + local_cache + "*" + *symbol_server + ";"; - } - - // Strip the trailing semicolon. - symbol_path_.erase(symbol_path_.length() - 1); -} - -// A stack-based class that manages SymInitialize and SymCleanup calls. -class AutoSymSrv { - public: - AutoSymSrv() : initialized_(false) {} - - ~AutoSymSrv() { - if (!Cleanup()) { - // Print the error message here, because destructors have no return - // value. - fprintf(stderr, "~AutoSymSrv: SymCleanup: error %d\n", GetLastError()); - } - } - - bool Initialize(HANDLE process, char *path, bool invade_process) { - process_ = process; - initialized_ = SymInitialize(process, path, invade_process) == TRUE; - return initialized_; - } - - bool Cleanup() { - if (initialized_) { - if (SymCleanup(process_)) { - initialized_ = false; - return true; - } - return false; - } - - return true; - } - - private: - HANDLE process_; - bool initialized_; -}; - -// A stack-based class that "owns" a pathname and deletes it when destroyed, -// unless told not to by having its Release() method called. Early deletions -// are supported by calling Delete(). -class AutoDeleter { - public: - AutoDeleter(const string &path) : path_(path) {} - - ~AutoDeleter() { - int error; - if ((error = Delete()) != 0) { - // Print the error message here, because destructors have no return - // value. - fprintf(stderr, "~AutoDeleter: Delete: error %d for %s\n", - error, path_.c_str()); - } - } - - int Delete() { - if (path_.empty()) - return 0; - - int error = remove(path_.c_str()); - Release(); - return error; - } - - void Release() { - path_.clear(); - } - - private: - string path_; -}; - -MSSymbolServerConverter::LocateResult -MSSymbolServerConverter::LocateSymbolFile(const MissingSymbolInfo &missing, - string *symbol_file) { - assert(symbol_file); - symbol_file->clear(); - - GUIDOrSignatureIdentifier identifier; - if (!identifier.InitializeFromString(missing.debug_identifier)) { - fprintf(stderr, - "LocateSymbolFile: Unparseable debug_identifier for %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - HANDLE process = GetCurrentProcess(); // CloseHandle is not needed. - AutoSymSrv symsrv; - if (!symsrv.Initialize(process, - const_cast(symbol_path_.c_str()), - false)) { - fprintf(stderr, "LocateSymbolFile: SymInitialize: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - if (!SymRegisterCallback64(process, SymCallback, - reinterpret_cast(this))) { - fprintf(stderr, - "LocateSymbolFile: SymRegisterCallback64: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - // SYMOPT_DEBUG arranges for SymCallback to be called with additional - // debugging information. This is used to determine the nature of failures. - DWORD options = SymGetOptions() | SYMOPT_DEBUG | SYMOPT_NO_PROMPTS | - SYMOPT_FAIL_CRITICAL_ERRORS | SYMOPT_SECURE; - SymSetOptions(options); - - // SymCallback will set these as needed inisde the SymFindFileInPath call. - fail_dns_ = false; - fail_timeout_ = false; - fail_not_found_ = false; - - // Do the lookup. - char path[MAX_PATH]; - if (!SymFindFileInPath( - process, NULL, - const_cast(missing.debug_file.c_str()), - const_cast(identifier.guid_or_signature_pointer()), - identifier.age(), 0, - identifier.type() == GUIDOrSignatureIdentifier::TYPE_GUID ? - SSRVOPT_GUIDPTR : SSRVOPT_DWORDPTR, - path, SymFindFileInPathCallback, this)) { - DWORD error = GetLastError(); - if (error == ERROR_FILE_NOT_FOUND) { - // This can be returned for a number of reasons. Use the crumbs - // collected by SymCallback to determine which one is relevant. - - // These errors are possibly transient. - if (fail_dns_ || fail_timeout_) { - return LOCATE_RETRY; - } - - // This is an authoritiative file-not-found message. - if (fail_not_found_) { - fprintf(stderr, - "LocateSymbolFile: SymFindFileInPath: LOCATE_NOT_FOUND error " - "for %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_NOT_FOUND; - } - - // If the error is FILE_NOT_FOUND but none of the known error - // conditions are matched, fall through to LOCATE_FAILURE. - } - - fprintf(stderr, - "LocateSymbolFile: SymFindFileInPath: error %d for %s %s %s\n", - error, - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - // The AutoDeleter ensures that the file is only kept when returning - // LOCATE_SUCCESS. - AutoDeleter deleter(path); - - // Do the cleanup here even though it will happen when symsrv goes out of - // scope, to allow it to influence the return value. - if (!symsrv.Cleanup()) { - fprintf(stderr, "LocateSymbolFile: SymCleanup: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - deleter.Release(); - - *symbol_file = path; - return LOCATE_SUCCESS; -} - -// static -BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process, - ULONG action, - ULONG64 data, - ULONG64 context) { - MSSymbolServerConverter *self = - reinterpret_cast(context); - - switch (action) { - case CBA_EVENT: { - IMAGEHLP_CBA_EVENT *cba_event = - reinterpret_cast(data); - - // Put the string into a string object to be able to use string::find - // for substring matching. This is important because the not-found - // message does not use the entire string but is appended to the URL - // that SymSrv attempted to retrieve. - string desc(cba_event->desc); - - // desc_action maps strings (in desc) to boolean pointers that are to - // be set to true if the string matches. - struct desc_action { - const char *desc; // The substring to match. - bool *action; // On match, this pointer will be set to true. - }; - - static const desc_action desc_actions[] = { - // When a DNS error occurs, it could be indiciative of network - // problems. - { "SYMSRV: The server name or address could not be resolved\n", - &self->fail_dns_ }, - - // This message is produced if no connection is opened. - { "SYMSRV: A connection with the server could not be established\n", - &self->fail_timeout_ }, - - // This message is produced if a connection is established but the - // server fails to respond to the HTTP request. - { "SYMSRV: The operation timed out\n", - &self->fail_timeout_ }, - - // This message is produced when the requested file is not found, - // even if one or more of the above messages are also produced. - // It's trapped to distinguish between not-found and unknown-failure - // conditions. Note that this message will not be produced if a - // connection is established and the server begins to respond to the - // HTTP request but does not finish transmitting the file. - { " not found\n", - &self->fail_not_found_ } - }; - - for (int desc_action_index = 0; - desc_action_index < sizeof(desc_actions) / sizeof(desc_action); - ++desc_action_index) { - if (desc.find(desc_actions[desc_action_index].desc) != string::npos) { - *(desc_actions[desc_action_index].action) = true; - break; - } - } - - break; - } - } - - // This function is a mere fly on the wall. Treat everything as unhandled. - return FALSE; -} - -// static -BOOL CALLBACK MSSymbolServerConverter::SymFindFileInPathCallback( - char *filename, void *context) { - // FALSE ends the search, indicating that the located symbol file is - // satisfactory. - return FALSE; -} - -MSSymbolServerConverter::LocateResult -MSSymbolServerConverter::LocateAndConvertSymbolFile( - const MissingSymbolInfo &missing, - bool keep_symbol_file, - string *converted_symbol_file, - string *symbol_file) { - assert(converted_symbol_file); - converted_symbol_file->clear(); - if (symbol_file) { - symbol_file->clear(); - } - - string pdb_file; - LocateResult result = LocateSymbolFile(missing, &pdb_file); - if (result != LOCATE_SUCCESS) { - return result; - } - - if (symbol_file && keep_symbol_file) { - *symbol_file = pdb_file; - } - - // Conversion may fail because the file is corrupt. If a broken file is - // kept in the local cache, LocateSymbolFile will not hit the network again - // to attempt to locate it. To guard against problems like this, the - // symbol file in the local cache will be removed if conversion fails. - AutoDeleter pdb_deleter(pdb_file); - - // Be sure that it's a .pdb file, since we'll be replacing .pdb with .sym - // for the converted file's name. - string pdb_extension = pdb_file.substr(pdb_file.length() - 4); - // strcasecmp is called _stricmp here. - if (_stricmp(pdb_extension.c_str(), ".pdb") != 0) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "LocateSymbolFile: no .pdb extension for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - // PDBSourceLineWriter wants the filename as a wstring, so convert it. - wstring pdb_file_w; - if (!WindowsStringUtils::safe_mbstowcs(pdb_file, &pdb_file_w)) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "WindowsStringUtils::safe_mbstowcs failed for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - PDBSourceLineWriter writer; - if (!writer.Open(pdb_file_w, PDBSourceLineWriter::PDB_FILE)) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "PDBSourceLineWriter::Open failed for %s %s %s %ws\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file_w.c_str()); - return LOCATE_FAILURE; - } - - *converted_symbol_file = pdb_file.substr(0, pdb_file.length() - 4) + ".sym"; - - FILE *converted_output = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - errno_t err; - if ((err = fopen_s(&converted_output, converted_symbol_file->c_str(), "w")) - != 0) { -#else // _MSC_VER >= 1400 - // fopen_s and errno_t were introduced in MSVC8. Use fopen for earlier - // environments. Don't use fopen with MSVC8 and later, because it's - // deprecated. fopen does not provide reliable error codes, so just use - // -1 in the event of a failure. - int err; - if (!(converted_output = fopen(converted_symbol_file->c_str(), "w"))) { - err = -1; -#endif // _MSC_VER >= 1400 - fprintf(stderr, "LocateAndConvertSymbolFile: " - "fopen_s: error %d for %s %s %s %s\n", - err, - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - converted_symbol_file->c_str()); - return LOCATE_FAILURE; - } - - AutoDeleter sym_deleter(*converted_symbol_file); - - bool success = writer.WriteMap(converted_output); - fclose(converted_output); - - if (!success) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "PDBSourceLineWriter::WriteMap failed for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - if (keep_symbol_file) { - pdb_deleter.Release(); - } - - sym_deleter.Release(); - - return LOCATE_SUCCESS; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.h b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.h deleted file mode 100644 index fffb7b8b..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/converter/ms_symbol_server_converter.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ms_symbol_server_converter.h: Obtain symbol files from a Microsoft -// symbol server, and convert them to Breakpad's dumped format. -// -// At runtime, MSSymbolServerConverter and code that it calls depend on being -// able to locate suitable versions of dbghelp.dll and symsrv.dll. For best -// results, place these files in the same directory as the executable. -// dbghelp.dll and symsrv.dll as supplied with Debugging Tools for Windows are -// both redistributable, as indicated by the package's redist.txt file. -// -// When connecting to Microsoft's symbol server at -// http://msdl.microsoft.com/download/symbols/, which provides access to -// symbols for the operating system itself, symsrv.dll requires agreement to -// Microsoft's "Terms of Use for Microsoft Symbols and Binaries." Because this -// library places the symbol engine into a promptless mode, the dialog with the -// terms will not appear, and use of Microsoft's symbol server will not be -// possible. To indicate agreement to the terms, create a file called -// symsrv.yes in the same directory as symsrv.dll. (Note that symsrv.dll will -// also recognize a symsrv.no file as indicating that you do not accept the -// terms; the .yes file takes priority over the .no file.) The terms of use -// are contained within symsrv.dll; they were formerly available online at -// http://www.microsoft.com/whdc/devtools/debugging/symsrvTOU2.mspx , but -// do not appear to be available online any longer as of January, 2007. It is -// possible to view the terms from within WinDbg (Debugging Tools for Windows) -// by removing any symsrv.yes and symsrv.no files from WinDbg's directory, -// setting the symbol path to include Microsoft's symbol server (.sympath), and -// attempting to load symbols from their server (.reload). -// -// This code has been tested with dbghelp.dll 6.5.3.7 and symsrv.dll 6.5.3.8, -// included with Microsoft Visual Studio 8 in Common7/IDE. This has also -// been tested with dbghelp.dll and symsrv.dll 6.6.7.5, included with that -// version of Debugging Tools for Windows, available at -// http://www.microsoft.com/whdc/devtools/debugging/ . -// -// Author: Mark Mentovai - - -#ifndef MS_SYMBOL_SERVER_CONVERTER_H__ -#define MS_SYMBOL_SERVER_CONVERTER_H__ - -#include - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -// MissingSymbolInfo contains the subset of the information in the processor's -// CodeModule structure relevant to obtaining a missing symbol file. Only -// debug_file and debug_identifier are relevant in actually obtaining the -// missing file; the other fields are for convenience. -struct MissingSymbolInfo { - string code_file; - string code_identifier; - string debug_file; - string debug_identifier; - string version; -}; - -class GUIDOrSignatureIdentifier { - public: - enum GUIDOrSignatureType { - TYPE_NONE = 0, - TYPE_GUID, - TYPE_SIGNATURE - }; - - GUIDOrSignatureIdentifier() : type_(TYPE_NONE) {} - - // Converts |identifier|, a debug_identifier-formatted string, into its - // component fields: either a GUID and age, or signature and age. If - // successful, sets the relevant fields in the object, including the type - // field, and returns true. On error, returns false. - bool InitializeFromString(const string &identifier); - - GUIDOrSignatureType type() const { return type_; } - GUID guid() const { return guid_; } - DWORD signature() const { return signature_; } - int age() const { return age_; } - const void *guid_or_signature_pointer() const { return &guid_; } - - private: - GUIDOrSignatureType type_; - - // An identifier contains either a 128-bit uuid or a 32-bit signature. - union { - GUID guid_; - DWORD signature_; - }; - - // All identifiers used here have age fields, which indicate a specific - // revision given a uuid or signature. - int age_; -}; - -class MSSymbolServerConverter { - public: - enum LocateResult { - LOCATE_FAILURE = 0, - LOCATE_NOT_FOUND, // Authoritative: the file is not present. - LOCATE_RETRY, // Transient (network?) error, try again later. - LOCATE_SUCCESS - }; - - // Create a new object. local_cache is the location (pathname) of a local - // symbol store used to hold downloaded and converted symbol files. This - // directory will be created by LocateSymbolFile when it successfully - // retrieves a symbol file. symbol_servers contains a list of locations (URLs - // or pathnames) of the upstream symbol server stores, given in order of - // preference, with the first string in the vector identifying the first - // store to try. The vector must contain at least one string. None of the - // strings passed to this constructor may contain asterisk ('*') or semicolon - // (';') characters, as the symbol engine uses these characters as separators. - MSSymbolServerConverter(const string &local_cache, - const vector &symbol_servers); - - // Locates the symbol file specified by the identifying information in - // |missing|, by checking the symbol stores identified when the object - // was created. When returning LOCATE_SUCCESS, symbol_file is set to - // the pathname of the decompressed symbol file as it is stored in the - // local cache. - LocateResult LocateSymbolFile(const MissingSymbolInfo &missing, - string *symbol_file); - - // Calls LocateSymbolFile and converts the returned symbol file to the - // dumped-symbol format, storing it adjacent to the symbol file. The - // only conversion supported is from pdb files. Returns the return - // value of LocateSymbolFile, or if LocateSymbolFile succeeds but - // conversion fails, returns LOCATE_FAILURE. The pathname to the - // pdb file and to the converted symbol file are returned in - // converted_symbol_file and symbol_file. symbol_file is optional and - // may be NULL. If only the converted symbol file is desired, set - // keep_symbol_file to false to indicate that the original symbol file - // (pdb) should be deleted after conversion. - LocateResult LocateAndConvertSymbolFile(const MissingSymbolInfo &missing, - bool keep_symbol_file, - string *converted_symbol_file, - string *symbol_file); - - private: - // Called by various SymSrv functions to report status as progress is made - // and to allow the callback to influence processing. Messages sent to this - // callback can be used to distinguish between the various failure modes - // that SymFindFileInPath might encounter. - static BOOL CALLBACK SymCallback(HANDLE process, ULONG action, ULONG64 data, - ULONG64 context); - - // Called by SymFindFileInPath (in LocateSymbolFile) after a candidate - // symbol file is located, when it's present in the local cache. - // SymFindFileInPath actually seems to accept NULL for a callback function - // and behave properly for our needs in that case, but the documentation - // doesn't mention it, so this little callback is provided. - static BOOL CALLBACK SymFindFileInPathCallback(char *filename, - void *context); - - // The search path used by SymSrv, built based on the arguments to the - // constructor. - string symbol_path_; - - // SymCallback will set at least one of these failure variables if - // SymFindFileInPath fails for an expected reason. - bool fail_dns_; // DNS failures (fail_not_found_ will also be set). - bool fail_timeout_; // Timeouts (fail_not_found_ will also be set). - bool fail_not_found_; // The file could not be found. If this is the only - // fail_* member set, then it is authoritative. -}; - -} // namespace google_breakpad - -#endif // MS_SYMBOL_SERVER_CONVERTER_H__ diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/dump_syms.cc deleted file mode 100644 index 3e8827b6..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/dump_syms.cc +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Windows utility to dump the line number data from a pdb file to -// a text-based format that we can use from the minidump processor. - -#include - -#include - -#include "common/windows/pdb_source_line_writer.h" - -using std::wstring; -using google_breakpad::PDBSourceLineWriter; - -int wmain(int argc, wchar_t **argv) { - if (argc < 2) { - fprintf(stderr, "Usage: %ws \n", argv[0]); - return 1; - } - - PDBSourceLineWriter writer; - if (!writer.Open(wstring(argv[1]), PDBSourceLineWriter::ANY_FILE)) { - fprintf(stderr, "Open failed\n"); - return 1; - } - - if (!writer.WriteMap(stdout)) { - fprintf(stderr, "WriteMap failed\n"); - return 1; - } - - writer.Close(); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/run_regtest.sh b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/run_regtest.sh deleted file mode 100755 index 1f20f64f..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/run_regtest.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Release/dump_syms.exe testdata/dump_syms_regtest.pdb | \ - tr -d '\015' > \ - testdata/dump_syms_regtest.new -status=$? - -if [ $status -ne 0 ] ; then - echo "FAIL, dump_syms.exe failed" - exit $status -fi - -diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \ - testdata/dump_syms_regtest.diff -status=$? - -if [ $status -eq 0 ] ; then - rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new - echo "PASS" -else - echo "FAIL, see testdata/dump_syms_regtest.[new|diff]" -fi - -exit $status diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc deleted file mode 100644 index ce53f582..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// cl /Zi dump_syms_regtest.cc -// dump_syms dump_syms_regtest.pdb | tr -d '\015' > dump_syms_regtest.sym - -namespace google_breakpad { - -class C { - public: - C() : member_(1) {} - virtual ~C() {} - - void set_member(int value) { member_ = value; } - int member() const { return member_; } - - void f() { member_ = g(); } - virtual int g() { return 2; } - static char* h(const C &that) { return 0; } - - private: - int member_; -}; - -static int i() { - return 3; -} - -} // namespace google_breakpad - -int main(int argc, char **argv) { - google_breakpad::C object; - object.set_member(google_breakpad::i()); - object.f(); - int value = object.g(); - char *nothing = object.h(object); - - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym deleted file mode 100644 index 8e5ce026..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym +++ /dev/null @@ -1,14097 +0,0 @@ -MODULE windows x86 3EB931A9CE0242ABB14FFDF4ECAA97FC1 dump_syms_regtest.pdb -FILE 1 c:\breakpad\trunk\src\tools\windows\dump_syms\testdata\dump_syms_regtest.cc -FILE 2 f:\sp\public\sdk\inc\reason.h -FILE 3 f:\sp\public\sdk\inc\wincon.h -FILE 4 f:\sp\public\sdk\inc\pshpack2.h -FILE 5 f:\sp\public\sdk\inc\mcx.h -FILE 6 f:\sp\public\sdk\inc\winuser.h -FILE 7 f:\sp\public\sdk\inc\winnls.h -FILE 8 f:\sp\public\sdk\inc\guiddef.h -FILE 9 f:\sp\public\sdk\inc\specstrings.h -FILE 10 f:\sp\public\sdk\inc\basetsd.h -FILE 11 f:\sp\public\sdk\inc\stralign.h -FILE 12 f:\sp\public\sdk\inc\tvout.h -FILE 13 f:\sp\public\sdk\inc\winsvc.h -FILE 14 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 15 f:\sp\public\sdk\inc\wingdi.h -FILE 16 f:\sp\public\sdk\inc\pshpack4.h -FILE 17 f:\sp\public\sdk\inc\poppack.h -FILE 18 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 19 f:\sp\public\sdk\inc\winnetwk.h -FILE 20 f:\sp\public\sdk\inc\imm.h -FILE 21 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 22 f:\sp\public\sdk\inc\windef.h -FILE 23 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 24 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\cpu_disp.c -FILE 25 f:\sp\public\sdk\inc\pshpack1.h -FILE 26 f:\sp\public\sdk\inc\winver.h -FILE 27 f:\sp\public\sdk\inc\windows.h -FILE 28 f:\sp\public\sdk\inc\winnt.h -FILE 29 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 30 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 31 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 32 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 33 f:\sp\public\sdk\inc\ddbanned.h -FILE 34 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 35 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 36 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 37 f:\sp\public\sdk\inc\winreg.h -FILE 38 f:\sp\public\sdk\inc\winbase.h -FILE 39 f:\sp\public\sdk\inc\winerror.h -FILE 40 f:\sp\public\sdk\inc\pshpack8.h -FILE 41 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 42 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 43 f:\sp\public\sdk\inc\reason.h -FILE 44 f:\sp\public\sdk\inc\wincon.h -FILE 45 f:\sp\public\sdk\inc\pshpack2.h -FILE 46 f:\sp\public\sdk\inc\mcx.h -FILE 47 f:\sp\public\sdk\inc\winuser.h -FILE 48 f:\sp\public\sdk\inc\winnls.h -FILE 49 f:\sp\public\sdk\inc\guiddef.h -FILE 50 f:\sp\public\sdk\inc\specstrings.h -FILE 51 f:\sp\public\sdk\inc\basetsd.h -FILE 52 f:\sp\public\sdk\inc\stralign.h -FILE 53 f:\sp\public\sdk\inc\tvout.h -FILE 54 f:\sp\public\sdk\inc\winsvc.h -FILE 55 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 56 f:\sp\public\sdk\inc\wingdi.h -FILE 57 f:\sp\public\sdk\inc\pshpack4.h -FILE 58 f:\sp\public\sdk\inc\poppack.h -FILE 59 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 60 f:\sp\public\sdk\inc\winnetwk.h -FILE 61 f:\sp\public\sdk\inc\imm.h -FILE 62 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 63 f:\sp\public\sdk\inc\windef.h -FILE 64 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 65 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\mathfcns.c -FILE 66 f:\sp\public\sdk\inc\pshpack1.h -FILE 67 f:\sp\public\sdk\inc\winver.h -FILE 68 f:\sp\public\sdk\inc\windows.h -FILE 69 f:\sp\public\sdk\inc\winnt.h -FILE 70 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 71 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 72 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 73 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 74 f:\sp\public\sdk\inc\ddbanned.h -FILE 75 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 76 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 77 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 78 f:\sp\public\sdk\inc\winreg.h -FILE 79 f:\sp\public\sdk\inc\winbase.h -FILE 80 f:\sp\public\sdk\inc\winerror.h -FILE 81 f:\sp\public\sdk\inc\pshpack8.h -FILE 82 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 83 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 84 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 85 f:\sp\public\sdk\inc\winreg.h -FILE 86 f:\sp\public\sdk\inc\winbase.h -FILE 87 f:\sp\public\sdk\inc\winerror.h -FILE 88 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 89 f:\sp\public\sdk\inc\windef.h -FILE 90 f:\sp\vctools\crt_bld\self_x86\crt\src\ctime.h -FILE 91 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 92 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 93 f:\sp\public\sdk\inc\pshpack8.h -FILE 94 f:\sp\public\sdk\inc\reason.h -FILE 95 f:\sp\public\sdk\inc\wincon.h -FILE 96 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 97 f:\sp\public\sdk\inc\pshpack2.h -FILE 98 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 99 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 100 f:\sp\public\sdk\inc\mcx.h -FILE 101 f:\sp\public\sdk\inc\winuser.h -FILE 102 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 103 f:\sp\public\sdk\inc\winnls.h -FILE 104 f:\sp\public\sdk\inc\guiddef.h -FILE 105 f:\sp\public\sdk\inc\stralign.h -FILE 106 f:\sp\public\sdk\inc\winnt.h -FILE 107 f:\sp\public\sdk\inc\specstrings.h -FILE 108 f:\sp\public\sdk\inc\basetsd.h -FILE 109 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 110 f:\sp\public\sdk\inc\tvout.h -FILE 111 f:\sp\public\sdk\inc\winsvc.h -FILE 112 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 113 f:\sp\public\sdk\inc\wingdi.h -FILE 114 f:\sp\vctools\crt_bld\self_x86\crt\src\tzset.c -FILE 115 f:\sp\public\sdk\inc\pshpack4.h -FILE 116 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 117 f:\sp\public\sdk\inc\poppack.h -FILE 118 f:\sp\public\sdk\inc\winnetwk.h -FILE 119 f:\sp\public\sdk\inc\imm.h -FILE 120 f:\sp\public\sdk\inc\ddbanned.h -FILE 121 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 122 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 123 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 124 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 125 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 126 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 127 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 128 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 129 f:\sp\public\sdk\inc\windows.h -FILE 130 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 131 f:\sp\public\sdk\inc\pshpack1.h -FILE 132 f:\sp\public\sdk\inc\winver.h -FILE 133 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 134 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 135 f:\sp\public\sdk\inc\winnt.h -FILE 136 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 137 f:\sp\public\sdk\inc\winreg.h -FILE 138 f:\sp\public\sdk\inc\winbase.h -FILE 139 f:\sp\public\sdk\inc\winerror.h -FILE 140 f:\sp\public\sdk\inc\pshpack8.h -FILE 141 f:\sp\public\sdk\inc\reason.h -FILE 142 f:\sp\public\sdk\inc\wincon.h -FILE 143 f:\sp\public\sdk\inc\pshpack2.h -FILE 144 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 145 f:\sp\public\sdk\inc\mcx.h -FILE 146 f:\sp\public\sdk\inc\winuser.h -FILE 147 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 148 f:\sp\public\sdk\inc\winnls.h -FILE 149 f:\sp\public\sdk\inc\guiddef.h -FILE 150 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 151 f:\sp\public\sdk\inc\stralign.h -FILE 152 f:\sp\public\sdk\inc\specstrings.h -FILE 153 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 154 f:\sp\public\sdk\inc\basetsd.h -FILE 155 f:\sp\public\sdk\inc\windows.h -FILE 156 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 157 f:\sp\public\sdk\inc\tvout.h -FILE 158 f:\sp\public\sdk\inc\winsvc.h -FILE 159 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 160 f:\sp\public\sdk\inc\wingdi.h -FILE 161 f:\sp\vctools\crt_bld\self_x86\crt\src\timeset.c -FILE 162 f:\sp\public\sdk\inc\pshpack4.h -FILE 163 f:\sp\public\sdk\inc\poppack.h -FILE 164 f:\sp\public\sdk\inc\winnetwk.h -FILE 165 f:\sp\public\sdk\inc\imm.h -FILE 166 f:\sp\public\sdk\inc\ddbanned.h -FILE 167 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 168 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 169 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 170 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 171 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 172 f:\sp\public\sdk\inc\windef.h -FILE 173 f:\sp\public\sdk\inc\pshpack1.h -FILE 174 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 175 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 176 f:\sp\public\sdk\inc\winver.h -FILE 177 f:\sp\public\sdk\inc\wincon.h -FILE 178 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 179 f:\sp\public\sdk\inc\imm.h -FILE 180 f:\sp\public\sdk\inc\winbase.h -FILE 181 f:\sp\public\sdk\inc\wingdi.h -FILE 182 f:\sp\public\sdk\inc\winver.h -FILE 183 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 184 f:\sp\public\sdk\inc\windows.h -FILE 185 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 186 f:\sp\public\sdk\inc\pshpack2.h -FILE 187 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 188 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 189 f:\sp\public\sdk\inc\reason.h -FILE 190 f:\sp\vctools\crt_bld\self_x86\crt\src\strftime.c -FILE 191 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 192 f:\sp\public\sdk\inc\specstrings.h -FILE 193 f:\sp\public\sdk\inc\basetsd.h -FILE 194 f:\sp\public\sdk\inc\pshpack4.h -FILE 195 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 196 f:\sp\public\sdk\inc\winnetwk.h -FILE 197 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 198 f:\sp\public\sdk\inc\stralign.h -FILE 199 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 200 f:\sp\public\sdk\inc\poppack.h -FILE 201 f:\sp\public\sdk\inc\winsvc.h -FILE 202 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 203 f:\sp\public\sdk\inc\windef.h -FILE 204 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 205 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 206 f:\sp\public\sdk\inc\winuser.h -FILE 207 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 208 f:\sp\public\sdk\inc\mcx.h -FILE 209 f:\sp\public\sdk\inc\pshpack8.h -FILE 210 f:\sp\public\sdk\inc\guiddef.h -FILE 211 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 212 f:\sp\public\sdk\inc\winnt.h -FILE 213 f:\sp\public\sdk\inc\winnls.h -FILE 214 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 215 f:\sp\public\sdk\inc\pshpack1.h -FILE 216 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 217 f:\sp\public\sdk\inc\winerror.h -FILE 218 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 219 f:\sp\public\sdk\inc\winreg.h -FILE 220 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 221 f:\sp\public\sdk\inc\ddbanned.h -FILE 222 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 223 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 224 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 225 f:\sp\public\sdk\inc\tvout.h -FILE 226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 227 f:\sp\public\sdk\inc\poppack.h -FILE 228 f:\sp\public\sdk\inc\winnetwk.h -FILE 229 f:\sp\public\sdk\inc\imm.h -FILE 230 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 231 f:\sp\public\sdk\inc\windef.h -FILE 232 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 233 f:\sp\public\sdk\inc\pshpack1.h -FILE 234 f:\sp\public\sdk\inc\winver.h -FILE 235 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 236 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 237 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 238 f:\sp\public\sdk\inc\winnt.h -FILE 239 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 240 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 241 f:\sp\public\sdk\inc\winreg.h -FILE 242 f:\sp\vctools\crt_bld\self_x86\crt\src\days.c -FILE 243 f:\sp\public\sdk\inc\winbase.h -FILE 244 f:\sp\public\sdk\inc\winerror.h -FILE 245 f:\sp\public\sdk\inc\pshpack8.h -FILE 246 f:\sp\public\sdk\inc\reason.h -FILE 247 f:\sp\public\sdk\inc\wincon.h -FILE 248 f:\sp\public\sdk\inc\ddbanned.h -FILE 249 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 250 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 251 f:\sp\public\sdk\inc\pshpack2.h -FILE 252 f:\sp\public\sdk\inc\mcx.h -FILE 253 f:\sp\public\sdk\inc\winuser.h -FILE 254 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 255 f:\sp\public\sdk\inc\winnls.h -FILE 256 f:\sp\public\sdk\inc\guiddef.h -FILE 257 f:\sp\public\sdk\inc\windows.h -FILE 258 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 259 f:\sp\public\sdk\inc\specstrings.h -FILE 260 f:\sp\public\sdk\inc\basetsd.h -FILE 261 f:\sp\public\sdk\inc\stralign.h -FILE 262 f:\sp\public\sdk\inc\tvout.h -FILE 263 f:\sp\public\sdk\inc\winsvc.h -FILE 264 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 265 f:\sp\public\sdk\inc\wingdi.h -FILE 266 f:\sp\public\sdk\inc\pshpack4.h -FILE 267 f:\sp\public\sdk\inc\wincon.h -FILE 268 f:\sp\public\sdk\inc\imm.h -FILE 269 f:\sp\public\sdk\inc\winbase.h -FILE 270 f:\sp\public\sdk\inc\wingdi.h -FILE 271 f:\sp\public\sdk\inc\winver.h -FILE 272 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 273 f:\sp\public\sdk\inc\windows.h -FILE 274 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 275 f:\sp\public\sdk\inc\pshpack2.h -FILE 276 f:\sp\public\sdk\inc\reason.h -FILE 277 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicol.c -FILE 278 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 279 f:\sp\public\sdk\inc\specstrings.h -FILE 280 f:\sp\public\sdk\inc\basetsd.h -FILE 281 f:\sp\public\sdk\inc\pshpack4.h -FILE 282 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 283 f:\sp\public\sdk\inc\winnetwk.h -FILE 284 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 285 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 286 f:\sp\public\sdk\inc\stralign.h -FILE 287 f:\sp\public\sdk\inc\poppack.h -FILE 288 f:\sp\public\sdk\inc\winsvc.h -FILE 289 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 290 f:\sp\public\sdk\inc\windef.h -FILE 291 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 292 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 293 f:\sp\public\sdk\inc\winuser.h -FILE 294 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 295 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 296 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 297 f:\sp\public\sdk\inc\mcx.h -FILE 298 f:\sp\public\sdk\inc\pshpack8.h -FILE 299 f:\sp\public\sdk\inc\guiddef.h -FILE 300 f:\sp\public\sdk\inc\winnt.h -FILE 301 f:\sp\public\sdk\inc\winnls.h -FILE 302 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 303 f:\sp\public\sdk\inc\pshpack1.h -FILE 304 f:\sp\public\sdk\inc\winerror.h -FILE 305 f:\sp\public\sdk\inc\winreg.h -FILE 306 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 307 f:\sp\public\sdk\inc\ddbanned.h -FILE 308 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 309 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 310 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 311 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 312 f:\sp\public\sdk\inc\tvout.h -FILE 313 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 314 f:\sp\public\sdk\inc\mcx.h -FILE 315 f:\sp\public\sdk\inc\pshpack8.h -FILE 316 f:\sp\public\sdk\inc\winnt.h -FILE 317 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 318 f:\sp\public\sdk\inc\specstrings.h -FILE 319 f:\sp\public\sdk\inc\basetsd.h -FILE 320 f:\sp\public\sdk\inc\winnls.h -FILE 321 f:\sp\public\sdk\inc\pshpack1.h -FILE 322 f:\sp\public\sdk\inc\winerror.h -FILE 323 f:\sp\public\sdk\inc\winreg.h -FILE 324 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicmp.c -FILE 325 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 326 f:\sp\public\sdk\inc\tvout.h -FILE 327 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 328 f:\sp\public\sdk\inc\wincon.h -FILE 329 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 330 f:\sp\public\sdk\inc\imm.h -FILE 331 f:\sp\public\sdk\inc\guiddef.h -FILE 332 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 333 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 334 f:\sp\public\sdk\inc\winbase.h -FILE 335 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 336 f:\sp\public\sdk\inc\wingdi.h -FILE 337 f:\sp\public\sdk\inc\windows.h -FILE 338 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 339 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 340 f:\sp\public\sdk\inc\winver.h -FILE 341 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 342 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 343 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 344 f:\sp\public\sdk\inc\pshpack2.h -FILE 345 f:\sp\public\sdk\inc\reason.h -FILE 346 f:\sp\public\sdk\inc\pshpack4.h -FILE 347 f:\sp\public\sdk\inc\winnetwk.h -FILE 348 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 349 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 350 f:\sp\public\sdk\inc\stralign.h -FILE 351 f:\sp\public\sdk\inc\windef.h -FILE 352 f:\sp\public\sdk\inc\poppack.h -FILE 353 f:\sp\public\sdk\inc\winsvc.h -FILE 354 f:\sp\public\sdk\inc\ddbanned.h -FILE 355 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 356 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 357 f:\sp\public\sdk\inc\winuser.h -FILE 358 f:\sp\public\sdk\inc\mcx.h -FILE 359 f:\sp\public\sdk\inc\pshpack8.h -FILE 360 f:\sp\public\sdk\inc\winnt.h -FILE 361 f:\sp\public\sdk\inc\specstrings.h -FILE 362 f:\sp\public\sdk\inc\basetsd.h -FILE 363 f:\sp\public\sdk\inc\winnls.h -FILE 364 f:\sp\public\sdk\inc\pshpack1.h -FILE 365 f:\sp\public\sdk\inc\winerror.h -FILE 366 f:\sp\public\sdk\inc\winreg.h -FILE 367 f:\sp\vctools\crt_bld\self_x86\crt\src\stricmp.c -FILE 368 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 369 f:\sp\public\sdk\inc\tvout.h -FILE 370 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 371 f:\sp\public\sdk\inc\wincon.h -FILE 372 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 373 f:\sp\public\sdk\inc\imm.h -FILE 374 f:\sp\public\sdk\inc\guiddef.h -FILE 375 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 376 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 377 f:\sp\public\sdk\inc\winbase.h -FILE 378 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 379 f:\sp\public\sdk\inc\wingdi.h -FILE 380 f:\sp\public\sdk\inc\windows.h -FILE 381 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 382 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 383 f:\sp\public\sdk\inc\winver.h -FILE 384 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 385 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 386 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 387 f:\sp\public\sdk\inc\pshpack2.h -FILE 388 f:\sp\public\sdk\inc\reason.h -FILE 389 f:\sp\public\sdk\inc\pshpack4.h -FILE 390 f:\sp\public\sdk\inc\winnetwk.h -FILE 391 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 392 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 393 f:\sp\public\sdk\inc\stralign.h -FILE 394 f:\sp\public\sdk\inc\windef.h -FILE 395 f:\sp\public\sdk\inc\poppack.h -FILE 396 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 397 f:\sp\public\sdk\inc\winsvc.h -FILE 398 f:\sp\public\sdk\inc\ddbanned.h -FILE 399 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 400 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 401 f:\sp\public\sdk\inc\winuser.h -FILE 402 f:\sp\public\sdk\inc\winnt.h -FILE 403 f:\sp\public\sdk\inc\pshpack4.h -FILE 404 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 405 f:\sp\public\sdk\inc\poppack.h -FILE 406 f:\sp\vctools\crt_bld\self_x86\crt\src\tcsncpy_s.inl -FILE 407 f:\sp\public\sdk\inc\winnetwk.h -FILE 408 f:\sp\public\sdk\inc\imm.h -FILE 409 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 410 f:\sp\public\sdk\inc\pshpack1.h -FILE 411 f:\sp\public\sdk\inc\winver.h -FILE 412 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 413 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 414 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 415 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 416 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 417 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 418 f:\sp\public\sdk\inc\guiddef.h -FILE 419 f:\sp\public\sdk\inc\windows.h -FILE 420 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 421 f:\sp\public\sdk\inc\specstrings.h -FILE 422 f:\sp\public\sdk\inc\basetsd.h -FILE 423 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 424 f:\sp\public\sdk\inc\winreg.h -FILE 425 f:\sp\vctools\crt_bld\self_x86\crt\src\strncpy_s.c -FILE 426 f:\sp\public\sdk\inc\winbase.h -FILE 427 f:\sp\public\sdk\inc\winerror.h -FILE 428 f:\sp\public\sdk\inc\pshpack8.h -FILE 429 f:\sp\public\sdk\inc\reason.h -FILE 430 f:\sp\public\sdk\inc\wincon.h -FILE 431 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 432 f:\sp\public\sdk\inc\ddbanned.h -FILE 433 f:\sp\public\sdk\inc\windef.h -FILE 434 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 435 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 436 f:\sp\public\sdk\inc\pshpack2.h -FILE 437 f:\sp\public\sdk\inc\mcx.h -FILE 438 f:\sp\public\sdk\inc\winuser.h -FILE 439 f:\sp\public\sdk\inc\winnls.h -FILE 440 f:\sp\public\sdk\inc\stralign.h -FILE 441 f:\sp\public\sdk\inc\tvout.h -FILE 442 f:\sp\public\sdk\inc\winsvc.h -FILE 443 f:\sp\public\sdk\inc\wingdi.h -FILE 444 f:\sp\public\sdk\inc\winnt.h -FILE 445 f:\sp\public\sdk\inc\pshpack4.h -FILE 446 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 447 f:\sp\public\sdk\inc\poppack.h -FILE 448 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscpy_s.inl -FILE 449 f:\sp\public\sdk\inc\winnetwk.h -FILE 450 f:\sp\public\sdk\inc\imm.h -FILE 451 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 452 f:\sp\public\sdk\inc\pshpack1.h -FILE 453 f:\sp\public\sdk\inc\winver.h -FILE 454 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 455 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 456 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 457 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 458 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 459 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 460 f:\sp\public\sdk\inc\guiddef.h -FILE 461 f:\sp\public\sdk\inc\windows.h -FILE 462 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 463 f:\sp\public\sdk\inc\specstrings.h -FILE 464 f:\sp\public\sdk\inc\basetsd.h -FILE 465 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 466 f:\sp\public\sdk\inc\winreg.h -FILE 467 f:\sp\vctools\crt_bld\self_x86\crt\src\strcpy_s.c -FILE 468 f:\sp\public\sdk\inc\winbase.h -FILE 469 f:\sp\public\sdk\inc\winerror.h -FILE 470 f:\sp\public\sdk\inc\pshpack8.h -FILE 471 f:\sp\public\sdk\inc\reason.h -FILE 472 f:\sp\public\sdk\inc\wincon.h -FILE 473 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 474 f:\sp\public\sdk\inc\ddbanned.h -FILE 475 f:\sp\public\sdk\inc\windef.h -FILE 476 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 477 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 478 f:\sp\public\sdk\inc\pshpack2.h -FILE 479 f:\sp\public\sdk\inc\mcx.h -FILE 480 f:\sp\public\sdk\inc\winuser.h -FILE 481 f:\sp\public\sdk\inc\winnls.h -FILE 482 f:\sp\public\sdk\inc\stralign.h -FILE 483 f:\sp\public\sdk\inc\tvout.h -FILE 484 f:\sp\public\sdk\inc\winsvc.h -FILE 485 f:\sp\public\sdk\inc\wingdi.h -FILE 486 f:\sp\public\sdk\inc\winnt.h -FILE 487 f:\sp\public\sdk\inc\pshpack4.h -FILE 488 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 489 f:\sp\public\sdk\inc\poppack.h -FILE 490 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscat_s.inl -FILE 491 f:\sp\public\sdk\inc\winnetwk.h -FILE 492 f:\sp\public\sdk\inc\imm.h -FILE 493 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 494 f:\sp\public\sdk\inc\pshpack1.h -FILE 495 f:\sp\public\sdk\inc\winver.h -FILE 496 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 497 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 498 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 499 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 500 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 501 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 502 f:\sp\public\sdk\inc\guiddef.h -FILE 503 f:\sp\public\sdk\inc\windows.h -FILE 504 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 505 f:\sp\public\sdk\inc\specstrings.h -FILE 506 f:\sp\public\sdk\inc\basetsd.h -FILE 507 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 508 f:\sp\public\sdk\inc\winreg.h -FILE 509 f:\sp\vctools\crt_bld\self_x86\crt\src\strcat_s.c -FILE 510 f:\sp\public\sdk\inc\winbase.h -FILE 511 f:\sp\public\sdk\inc\winerror.h -FILE 512 f:\sp\public\sdk\inc\pshpack8.h -FILE 513 f:\sp\public\sdk\inc\reason.h -FILE 514 f:\sp\public\sdk\inc\wincon.h -FILE 515 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 516 f:\sp\public\sdk\inc\ddbanned.h -FILE 517 f:\sp\public\sdk\inc\windef.h -FILE 518 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 519 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 520 f:\sp\public\sdk\inc\pshpack2.h -FILE 521 f:\sp\public\sdk\inc\mcx.h -FILE 522 f:\sp\public\sdk\inc\winuser.h -FILE 523 f:\sp\public\sdk\inc\winnls.h -FILE 524 f:\sp\public\sdk\inc\stralign.h -FILE 525 f:\sp\public\sdk\inc\tvout.h -FILE 526 f:\sp\public\sdk\inc\winsvc.h -FILE 527 f:\sp\public\sdk\inc\wingdi.h -FILE 528 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 529 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 530 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 531 f:\sp\vctools\crt_bld\self_x86\crt\src\strlen_s.c -FILE 532 f:\sp\public\sdk\inc\ddbanned.h -FILE 533 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 534 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 535 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strpbrk.asm -FILE 536 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 537 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 538 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\_strnicm.asm -FILE 539 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 540 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 541 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 542 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 543 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\strncmp.c -FILE 544 f:\sp\public\sdk\inc\ddbanned.h -FILE 545 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 546 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 547 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strlen.asm -FILE 548 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 549 f:\sp\public\sdk\inc\pshpack2.h -FILE 550 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 551 f:\sp\public\sdk\inc\mcx.h -FILE 552 f:\sp\public\sdk\inc\winuser.h -FILE 553 f:\sp\public\sdk\inc\winnls.h -FILE 554 f:\sp\public\sdk\inc\stralign.h -FILE 555 f:\sp\public\sdk\inc\tvout.h -FILE 556 f:\sp\public\sdk\inc\winsvc.h -FILE 557 f:\sp\public\sdk\inc\wingdi.h -FILE 558 f:\sp\public\sdk\inc\winnt.h -FILE 559 f:\sp\public\sdk\inc\pshpack4.h -FILE 560 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 561 f:\sp\public\sdk\inc\poppack.h -FILE 562 f:\sp\public\sdk\inc\winnetwk.h -FILE 563 f:\sp\public\sdk\inc\imm.h -FILE 564 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 565 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 566 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 567 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 568 f:\sp\vctools\crt_bld\self_x86\crt\src\strdup.c -FILE 569 f:\sp\public\sdk\inc\pshpack1.h -FILE 570 f:\sp\public\sdk\inc\winver.h -FILE 571 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 572 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 573 f:\sp\public\sdk\inc\guiddef.h -FILE 574 f:\sp\public\sdk\inc\windows.h -FILE 575 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 576 f:\sp\public\sdk\inc\specstrings.h -FILE 577 f:\sp\public\sdk\inc\basetsd.h -FILE 578 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 579 f:\sp\public\sdk\inc\winreg.h -FILE 580 f:\sp\public\sdk\inc\ddbanned.h -FILE 581 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 582 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 583 f:\sp\public\sdk\inc\winbase.h -FILE 584 f:\sp\public\sdk\inc\winerror.h -FILE 585 f:\sp\public\sdk\inc\pshpack8.h -FILE 586 f:\sp\public\sdk\inc\reason.h -FILE 587 f:\sp\public\sdk\inc\wincon.h -FILE 588 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 589 f:\sp\public\sdk\inc\windef.h -FILE 590 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcspn.asm -FILE 591 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 592 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 593 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcmp.asm -FILE 594 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 595 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strchr.asm -FILE 596 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 597 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memset.c -FILE 598 f:\sp\public\sdk\inc\ddbanned.h -FILE 599 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 600 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 601 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memset.asm -FILE 602 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 603 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memmove.asm -FILE 604 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\MEMCPY.ASM -FILE 605 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 606 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\memcmp.c -FILE 607 f:\sp\public\sdk\inc\ddbanned.h -FILE 608 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 609 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 610 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memcpy.c -FILE 611 f:\sp\public\sdk\inc\ddbanned.h -FILE 612 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 613 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 614 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memcpy.asm -FILE 615 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 616 f:\sp\public\sdk\inc\pshpack2.h -FILE 617 f:\sp\public\sdk\inc\winreg.h -FILE 618 f:\sp\public\sdk\inc\guiddef.h -FILE 619 f:\sp\public\sdk\inc\windows.h -FILE 620 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 621 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 622 f:\sp\public\sdk\inc\specstrings.h -FILE 623 f:\sp\public\sdk\inc\basetsd.h -FILE 624 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 625 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 626 f:\sp\public\sdk\inc\pshpack4.h -FILE 627 f:\sp\public\sdk\inc\reason.h -FILE 628 f:\sp\public\sdk\inc\wincon.h -FILE 629 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 630 f:\sp\public\sdk\inc\poppack.h -FILE 631 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 632 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 633 f:\sp\public\sdk\inc\mcx.h -FILE 634 f:\sp\public\sdk\inc\winuser.h -FILE 635 f:\sp\public\sdk\inc\winnls.h -FILE 636 f:\sp\public\sdk\inc\stralign.h -FILE 637 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 638 f:\sp\public\sdk\inc\windef.h -FILE 639 f:\sp\public\sdk\inc\tvout.h -FILE 640 f:\sp\public\sdk\inc\winsvc.h -FILE 641 f:\sp\vctools\crt_bld\self_x86\crt\src\tidtable.c -FILE 642 f:\sp\public\sdk\inc\wingdi.h -FILE 643 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 644 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 645 f:\sp\public\sdk\inc\winnt.h -FILE 646 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 647 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 648 f:\sp\public\sdk\inc\winnetwk.h -FILE 649 f:\sp\public\sdk\inc\imm.h -FILE 650 f:\sp\public\sdk\inc\ddbanned.h -FILE 651 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 652 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 653 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 654 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 655 f:\sp\public\sdk\inc\winbase.h -FILE 656 f:\sp\public\sdk\inc\winerror.h -FILE 657 f:\sp\public\sdk\inc\pshpack1.h -FILE 658 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 659 f:\sp\vctools\crt_bld\self_x86\crt\src\memory.h -FILE 660 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 661 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 662 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 663 f:\sp\public\sdk\inc\pshpack8.h -FILE 664 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 665 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 666 f:\sp\public\sdk\inc\winver.h -FILE 667 f:\sp\public\sdk\inc\pshpack4.h -FILE 668 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 669 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 670 f:\sp\public\sdk\inc\poppack.h -FILE 671 f:\sp\public\sdk\inc\winnt.h -FILE 672 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 673 f:\sp\public\sdk\inc\winnetwk.h -FILE 674 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 675 f:\sp\public\sdk\inc\imm.h -FILE 676 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 677 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 678 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 679 f:\sp\public\sdk\inc\pshpack1.h -FILE 680 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 681 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 682 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 683 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 684 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 685 f:\sp\public\sdk\inc\winver.h -FILE 686 f:\sp\public\sdk\inc\guiddef.h -FILE 687 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 688 f:\sp\public\sdk\inc\specstrings.h -FILE 689 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 690 f:\sp\public\sdk\inc\basetsd.h -FILE 691 f:\sp\public\sdk\inc\windows.h -FILE 692 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 693 f:\sp\public\sdk\inc\winreg.h -FILE 694 f:\sp\vctools\crt_bld\self_x86\crt\src\stdenvp.c -FILE 695 f:\sp\public\sdk\inc\winbase.h -FILE 696 f:\sp\public\sdk\inc\winerror.h -FILE 697 f:\sp\public\sdk\inc\pshpack8.h -FILE 698 f:\sp\public\sdk\inc\reason.h -FILE 699 f:\sp\public\sdk\inc\ddbanned.h -FILE 700 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 701 f:\sp\public\sdk\inc\wincon.h -FILE 702 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 703 f:\sp\public\sdk\inc\pshpack2.h -FILE 704 f:\sp\public\sdk\inc\mcx.h -FILE 705 f:\sp\public\sdk\inc\winuser.h -FILE 706 f:\sp\public\sdk\inc\winnls.h -FILE 707 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 708 f:\sp\public\sdk\inc\windef.h -FILE 709 f:\sp\public\sdk\inc\stralign.h -FILE 710 f:\sp\public\sdk\inc\tvout.h -FILE 711 f:\sp\public\sdk\inc\winsvc.h -FILE 712 f:\sp\public\sdk\inc\wingdi.h -FILE 713 f:\sp\public\sdk\inc\poppack.h -FILE 714 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 715 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 716 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 717 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 718 f:\sp\public\sdk\inc\winnetwk.h -FILE 719 f:\sp\public\sdk\inc\imm.h -FILE 720 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 721 f:\sp\public\sdk\inc\windef.h -FILE 722 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 723 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 724 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 725 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 726 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 727 f:\sp\public\sdk\inc\pshpack1.h -FILE 728 f:\sp\public\sdk\inc\winver.h -FILE 729 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 730 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 731 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 732 f:\sp\public\sdk\inc\winnt.h -FILE 733 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 734 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 735 f:\sp\public\sdk\inc\winreg.h -FILE 736 f:\sp\vctools\crt_bld\self_x86\crt\src\stdargv.c -FILE 737 f:\sp\public\sdk\inc\winbase.h -FILE 738 f:\sp\public\sdk\inc\winerror.h -FILE 739 f:\sp\public\sdk\inc\pshpack8.h -FILE 740 f:\sp\public\sdk\inc\reason.h -FILE 741 f:\sp\public\sdk\inc\wincon.h -FILE 742 f:\sp\public\sdk\inc\ddbanned.h -FILE 743 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 744 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 745 f:\sp\public\sdk\inc\pshpack2.h -FILE 746 f:\sp\public\sdk\inc\mcx.h -FILE 747 f:\sp\public\sdk\inc\winuser.h -FILE 748 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 749 f:\sp\public\sdk\inc\winnls.h -FILE 750 f:\sp\public\sdk\inc\guiddef.h -FILE 751 f:\sp\public\sdk\inc\windows.h -FILE 752 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 753 f:\sp\public\sdk\inc\specstrings.h -FILE 754 f:\sp\public\sdk\inc\basetsd.h -FILE 755 f:\sp\public\sdk\inc\stralign.h -FILE 756 f:\sp\public\sdk\inc\tvout.h -FILE 757 f:\sp\public\sdk\inc\winsvc.h -FILE 758 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 759 f:\sp\public\sdk\inc\wingdi.h -FILE 760 f:\sp\public\sdk\inc\pshpack4.h -FILE 761 f:\sp\public\sdk\inc\reason.h -FILE 762 f:\sp\public\sdk\inc\wincon.h -FILE 763 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 764 f:\sp\public\sdk\inc\poppack.h -FILE 765 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 766 f:\sp\public\sdk\inc\mcx.h -FILE 767 f:\sp\public\sdk\inc\winuser.h -FILE 768 f:\sp\public\sdk\inc\winnls.h -FILE 769 f:\sp\public\sdk\inc\stralign.h -FILE 770 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 771 f:\sp\public\sdk\inc\windef.h -FILE 772 f:\sp\public\sdk\inc\tvout.h -FILE 773 f:\sp\public\sdk\inc\winsvc.h -FILE 774 f:\sp\public\sdk\inc\wingdi.h -FILE 775 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 776 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 777 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 778 f:\sp\public\sdk\inc\winnt.h -FILE 779 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 780 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 781 f:\sp\public\sdk\inc\winnetwk.h -FILE 782 f:\sp\public\sdk\inc\imm.h -FILE 783 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 784 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 785 f:\sp\vctools\crt_bld\self_x86\crt\src\mlock.c -FILE 786 f:\sp\public\sdk\inc\winbase.h -FILE 787 f:\sp\public\sdk\inc\winerror.h -FILE 788 f:\sp\public\sdk\inc\pshpack1.h -FILE 789 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 790 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 791 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 792 f:\sp\public\sdk\inc\pshpack8.h -FILE 793 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 794 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 795 f:\sp\public\sdk\inc\winver.h -FILE 796 f:\sp\public\sdk\inc\ddbanned.h -FILE 797 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 798 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 799 f:\sp\public\sdk\inc\pshpack2.h -FILE 800 f:\sp\public\sdk\inc\winreg.h -FILE 801 f:\sp\public\sdk\inc\guiddef.h -FILE 802 f:\sp\public\sdk\inc\windows.h -FILE 803 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 804 f:\sp\public\sdk\inc\specstrings.h -FILE 805 f:\sp\public\sdk\inc\basetsd.h -FILE 806 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 807 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 808 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 809 f:\sp\public\sdk\inc\pshpack4.h -FILE 810 f:\sp\public\sdk\inc\poppack.h -FILE 811 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 812 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 813 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 814 f:\sp\public\sdk\inc\winnetwk.h -FILE 815 f:\sp\public\sdk\inc\imm.h -FILE 816 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 817 f:\sp\public\sdk\inc\windef.h -FILE 818 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 819 f:\sp\public\sdk\inc\pshpack1.h -FILE 820 f:\sp\public\sdk\inc\winver.h -FILE 821 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 822 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 823 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 824 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 825 f:\sp\public\sdk\inc\winnt.h -FILE 826 f:\sp\vctools\crt_bld\self_x86\crt\src\cmsgs.h -FILE 827 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 828 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 829 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 830 f:\sp\public\sdk\inc\winreg.h -FILE 831 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 832 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0msg.c -FILE 833 f:\sp\public\sdk\inc\winbase.h -FILE 834 f:\sp\public\sdk\inc\winerror.h -FILE 835 f:\sp\public\sdk\inc\pshpack8.h -FILE 836 f:\sp\public\sdk\inc\reason.h -FILE 837 f:\sp\public\sdk\inc\wincon.h -FILE 838 f:\sp\public\sdk\inc\ddbanned.h -FILE 839 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 840 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 841 f:\sp\public\sdk\inc\pshpack2.h -FILE 842 f:\sp\public\sdk\inc\mcx.h -FILE 843 f:\sp\public\sdk\inc\winuser.h -FILE 844 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 845 f:\sp\public\sdk\inc\winnls.h -FILE 846 f:\sp\public\sdk\inc\guiddef.h -FILE 847 f:\sp\public\sdk\inc\windows.h -FILE 848 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 849 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 850 f:\sp\public\sdk\inc\specstrings.h -FILE 851 f:\sp\public\sdk\inc\basetsd.h -FILE 852 f:\sp\public\sdk\inc\stralign.h -FILE 853 f:\sp\public\sdk\inc\tvout.h -FILE 854 f:\sp\public\sdk\inc\winsvc.h -FILE 855 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 856 f:\sp\public\sdk\inc\wingdi.h -FILE 857 f:\sp\public\sdk\inc\pshpack4.h -FILE 858 f:\sp\public\sdk\inc\pshpack1.h -FILE 859 f:\sp\public\sdk\inc\winver.h -FILE 860 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 861 f:\sp\public\sdk\inc\winnt.h -FILE 862 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 863 f:\sp\public\sdk\inc\winreg.h -FILE 864 f:\sp\public\sdk\inc\winbase.h -FILE 865 f:\sp\public\sdk\inc\winerror.h -FILE 866 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 867 f:\sp\public\sdk\inc\pshpack8.h -FILE 868 f:\sp\public\sdk\inc\reason.h -FILE 869 f:\sp\public\sdk\inc\wincon.h -FILE 870 f:\sp\public\sdk\inc\pshpack2.h -FILE 871 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0init.c -FILE 872 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 873 f:\sp\public\sdk\inc\mcx.h -FILE 874 f:\sp\public\sdk\inc\winuser.h -FILE 875 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 876 f:\sp\public\sdk\inc\winnls.h -FILE 877 f:\sp\public\sdk\inc\guiddef.h -FILE 878 f:\sp\public\sdk\inc\windows.h -FILE 879 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 880 f:\sp\public\sdk\inc\specstrings.h -FILE 881 f:\sp\public\sdk\inc\basetsd.h -FILE 882 f:\sp\public\sdk\inc\stralign.h -FILE 883 f:\sp\public\sdk\inc\tvout.h -FILE 884 f:\sp\public\sdk\inc\winsvc.h -FILE 885 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 886 f:\sp\public\sdk\inc\wingdi.h -FILE 887 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 888 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 889 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 890 f:\sp\public\sdk\inc\pshpack4.h -FILE 891 f:\sp\public\sdk\inc\ddbanned.h -FILE 892 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 893 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 894 f:\sp\public\sdk\inc\poppack.h -FILE 895 f:\sp\public\sdk\inc\winnetwk.h -FILE 896 f:\sp\public\sdk\inc\imm.h -FILE 897 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 898 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 899 f:\sp\public\sdk\inc\windef.h -FILE 900 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 901 f:\sp\public\sdk\inc\poppack.h -FILE 902 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 903 f:\sp\public\sdk\inc\winnetwk.h -FILE 904 f:\sp\public\sdk\inc\imm.h -FILE 905 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 906 f:\sp\public\sdk\inc\windef.h -FILE 907 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 908 f:\sp\public\sdk\inc\pshpack1.h -FILE 909 f:\sp\public\sdk\inc\winver.h -FILE 910 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 911 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 912 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 913 f:\sp\public\sdk\inc\winnt.h -FILE 914 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 915 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 916 f:\sp\public\sdk\inc\winreg.h -FILE 917 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0fp.c -FILE 918 f:\sp\public\sdk\inc\winbase.h -FILE 919 f:\sp\public\sdk\inc\winerror.h -FILE 920 f:\sp\public\sdk\inc\pshpack8.h -FILE 921 f:\sp\public\sdk\inc\reason.h -FILE 922 f:\sp\public\sdk\inc\wincon.h -FILE 923 f:\sp\public\sdk\inc\ddbanned.h -FILE 924 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 925 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 926 f:\sp\public\sdk\inc\pshpack2.h -FILE 927 f:\sp\public\sdk\inc\mcx.h -FILE 928 f:\sp\public\sdk\inc\winuser.h -FILE 929 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 930 f:\sp\public\sdk\inc\winnls.h -FILE 931 f:\sp\public\sdk\inc\guiddef.h -FILE 932 f:\sp\public\sdk\inc\windows.h -FILE 933 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 934 f:\sp\public\sdk\inc\specstrings.h -FILE 935 f:\sp\public\sdk\inc\basetsd.h -FILE 936 f:\sp\public\sdk\inc\stralign.h -FILE 937 f:\sp\public\sdk\inc\tvout.h -FILE 938 f:\sp\public\sdk\inc\winsvc.h -FILE 939 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 940 f:\sp\public\sdk\inc\wingdi.h -FILE 941 f:\sp\public\sdk\inc\pshpack4.h -FILE 942 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 943 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 944 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 945 f:\sp\public\sdk\inc\pshpack4.h -FILE 946 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 947 f:\sp\public\sdk\inc\reason.h -FILE 948 f:\sp\public\sdk\inc\wincon.h -FILE 949 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 950 f:\sp\public\sdk\inc\poppack.h -FILE 951 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 952 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 953 f:\sp\public\sdk\inc\mcx.h -FILE 954 f:\sp\public\sdk\inc\winuser.h -FILE 955 f:\sp\public\sdk\inc\winnls.h -FILE 956 f:\sp\public\sdk\inc\stralign.h -FILE 957 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 958 f:\sp\public\sdk\inc\windef.h -FILE 959 f:\sp\public\sdk\inc\tvout.h -FILE 960 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 961 f:\sp\public\sdk\inc\winsvc.h -FILE 962 f:\sp\public\sdk\inc\wingdi.h -FILE 963 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 964 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 965 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 966 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 967 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 968 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 969 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 970 f:\sp\public\sdk\inc\winnt.h -FILE 971 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 972 f:\sp\public\sdk\inc\winnetwk.h -FILE 973 f:\sp\public\sdk\inc\imm.h -FILE 974 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c -FILE 975 f:\sp\public\sdk\inc\winbase.h -FILE 976 f:\sp\public\sdk\inc\winerror.h -FILE 977 f:\sp\public\sdk\inc\pshpack1.h -FILE 978 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 979 f:\sp\public\sdk\inc\pshpack8.h -FILE 980 f:\sp\public\sdk\inc\winver.h -FILE 981 f:\sp\public\sdk\inc\ddbanned.h -FILE 982 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 983 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 984 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 985 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 986 f:\sp\public\sdk\inc\pshpack2.h -FILE 987 f:\sp\public\sdk\inc\winreg.h -FILE 988 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 989 f:\sp\public\sdk\inc\guiddef.h -FILE 990 f:\sp\public\sdk\inc\windows.h -FILE 991 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 992 f:\sp\public\sdk\inc\specstrings.h -FILE 993 f:\sp\public\sdk\inc\basetsd.h -FILE 994 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 995 f:\sp\public\sdk\inc\tvout.h -FILE 996 f:\sp\public\sdk\inc\winsvc.h -FILE 997 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 998 f:\sp\public\sdk\inc\wingdi.h -FILE 999 f:\sp\public\sdk\inc\pshpack4.h -FILE 1000 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1001 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1002 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 1003 f:\sp\public\sdk\inc\poppack.h -FILE 1004 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 1005 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1006 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 1007 f:\sp\public\sdk\inc\winnetwk.h -FILE 1008 f:\sp\public\sdk\inc\imm.h -FILE 1009 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1010 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1011 f:\sp\public\sdk\inc\windef.h -FILE 1012 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1013 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1014 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 1015 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1016 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1017 f:\sp\public\sdk\inc\pshpack1.h -FILE 1018 f:\sp\public\sdk\inc\winver.h -FILE 1019 f:\sp\public\sdk\inc\winnt.h -FILE 1020 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1021 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1022 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c -FILE 1023 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1024 f:\sp\public\sdk\inc\winreg.h -FILE 1025 f:\sp\public\sdk\inc\winbase.h -FILE 1026 f:\sp\public\sdk\inc\winerror.h -FILE 1027 f:\sp\public\sdk\inc\ddbanned.h -FILE 1028 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1029 f:\sp\public\sdk\inc\pshpack8.h -FILE 1030 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1031 f:\sp\public\sdk\inc\reason.h -FILE 1032 f:\sp\public\sdk\inc\wincon.h -FILE 1033 f:\sp\public\sdk\inc\pshpack2.h -FILE 1034 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1035 f:\sp\public\sdk\inc\mcx.h -FILE 1036 f:\sp\public\sdk\inc\winuser.h -FILE 1037 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1038 f:\sp\public\sdk\inc\winnls.h -FILE 1039 f:\sp\public\sdk\inc\guiddef.h -FILE 1040 f:\sp\public\sdk\inc\windows.h -FILE 1041 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1042 f:\sp\public\sdk\inc\specstrings.h -FILE 1043 f:\sp\public\sdk\inc\basetsd.h -FILE 1044 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1045 f:\sp\public\sdk\inc\stralign.h -FILE 1046 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\alloca16.asm -FILE 1047 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 1048 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\chkstk.asm -FILE 1049 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 1050 f:\sp\public\sdk\inc\wincon.h -FILE 1051 f:\sp\public\sdk\inc\imm.h -FILE 1052 f:\sp\public\sdk\inc\winbase.h -FILE 1053 f:\sp\public\sdk\inc\wingdi.h -FILE 1054 f:\sp\public\sdk\inc\winver.h -FILE 1055 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 1056 f:\sp\public\sdk\inc\windows.h -FILE 1057 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 1058 f:\sp\public\sdk\inc\pshpack2.h -FILE 1059 f:\sp\public\sdk\inc\reason.h -FILE 1060 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\rtc\initsect.cpp -FILE 1061 f:\sp\public\sdk\inc\specstrings.h -FILE 1062 f:\sp\public\sdk\inc\basetsd.h -FILE 1063 f:\sp\public\sdk\inc\pshpack4.h -FILE 1064 f:\sp\public\sdk\inc\winnetwk.h -FILE 1065 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 1066 f:\sp\public\sdk\inc\stralign.h -FILE 1067 f:\sp\public\sdk\inc\poppack.h -FILE 1068 f:\sp\public\sdk\inc\winsvc.h -FILE 1069 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 1070 f:\sp\public\sdk\inc\windef.h -FILE 1071 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 1072 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 1073 f:\sp\public\sdk\inc\winuser.h -FILE 1074 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 1075 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 1076 f:\sp\public\sdk\inc\mcx.h -FILE 1077 f:\sp\public\sdk\inc\pshpack8.h -FILE 1078 f:\sp\public\sdk\inc\guiddef.h -FILE 1079 f:\sp\public\sdk\inc\winnt.h -FILE 1080 f:\sp\public\sdk\inc\winnls.h -FILE 1081 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 1082 f:\sp\public\sdk\inc\pshpack1.h -FILE 1083 f:\sp\public\sdk\inc\winerror.h -FILE 1084 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcapi.h -FILE 1085 f:\sp\public\sdk\inc\winreg.h -FILE 1086 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 1087 f:\sp\public\sdk\inc\ddbanned.h -FILE 1088 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 1089 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 1090 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcpriv.h -FILE 1091 f:\sp\public\sdk\inc\tvout.h -FILE 1092 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 1093 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 1094 f:\sp\public\sdk\inc\poppack.h -FILE 1095 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1096 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1097 f:\sp\public\sdk\inc\winnetwk.h -FILE 1098 f:\sp\public\sdk\inc\imm.h -FILE 1099 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1100 f:\sp\public\sdk\inc\windef.h -FILE 1101 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1102 f:\sp\public\sdk\inc\pshpack1.h -FILE 1103 f:\sp\public\sdk\inc\winver.h -FILE 1104 f:\sp\public\sdk\inc\windows.h -FILE 1105 f:\sp\public\sdk\inc\winnt.h -FILE 1106 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1107 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1108 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1109 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1110 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1111 f:\sp\public\sdk\inc\winreg.h -FILE 1112 f:\sp\public\sdk\inc\winbase.h -FILE 1113 f:\sp\vctools\crt_bld\self_x86\crt\src\wtombenv.c -FILE 1114 f:\sp\public\sdk\inc\winerror.h -FILE 1115 f:\sp\public\sdk\inc\pshpack8.h -FILE 1116 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1117 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1118 f:\sp\public\sdk\inc\reason.h -FILE 1119 f:\sp\public\sdk\inc\wincon.h -FILE 1120 f:\sp\public\sdk\inc\ddbanned.h -FILE 1121 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1122 f:\sp\public\sdk\inc\pshpack2.h -FILE 1123 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1124 f:\sp\public\sdk\inc\mcx.h -FILE 1125 f:\sp\public\sdk\inc\winuser.h -FILE 1126 f:\sp\public\sdk\inc\winnls.h -FILE 1127 f:\sp\public\sdk\inc\guiddef.h -FILE 1128 f:\sp\public\sdk\inc\specstrings.h -FILE 1129 f:\sp\public\sdk\inc\basetsd.h -FILE 1130 f:\sp\public\sdk\inc\stralign.h -FILE 1131 f:\sp\public\sdk\inc\tvout.h -FILE 1132 f:\sp\public\sdk\inc\winsvc.h -FILE 1133 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1134 f:\sp\public\sdk\inc\wingdi.h -FILE 1135 f:\sp\public\sdk\inc\pshpack4.h -FILE 1136 f:\sp\public\sdk\inc\winnt.h -FILE 1137 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1138 f:\sp\public\sdk\inc\winreg.h -FILE 1139 f:\sp\public\sdk\inc\winbase.h -FILE 1140 f:\sp\public\sdk\inc\winerror.h -FILE 1141 f:\sp\public\sdk\inc\pshpack8.h -FILE 1142 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1143 f:\sp\public\sdk\inc\reason.h -FILE 1144 f:\sp\public\sdk\inc\wincon.h -FILE 1145 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 1146 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1147 f:\sp\public\sdk\inc\pshpack2.h -FILE 1148 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1149 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1150 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1151 f:\sp\public\sdk\inc\mcx.h -FILE 1152 f:\sp\public\sdk\inc\winuser.h -FILE 1153 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1154 f:\sp\public\sdk\inc\winnls.h -FILE 1155 f:\sp\public\sdk\inc\guiddef.h -FILE 1156 f:\sp\public\sdk\inc\windows.h -FILE 1157 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1158 f:\sp\public\sdk\inc\specstrings.h -FILE 1159 f:\sp\public\sdk\inc\basetsd.h -FILE 1160 f:\sp\public\sdk\inc\stralign.h -FILE 1161 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1162 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 1163 f:\sp\public\sdk\inc\tvout.h -FILE 1164 f:\sp\public\sdk\inc\winsvc.h -FILE 1165 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1166 f:\sp\vctools\crt_bld\self_x86\crt\src\winxfltr.c -FILE 1167 f:\sp\public\sdk\inc\wingdi.h -FILE 1168 f:\sp\public\sdk\inc\pshpack4.h -FILE 1169 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1170 f:\sp\public\sdk\inc\poppack.h -FILE 1171 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1172 f:\sp\public\sdk\inc\winnetwk.h -FILE 1173 f:\sp\public\sdk\inc\imm.h -FILE 1174 f:\sp\public\sdk\inc\ddbanned.h -FILE 1175 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1176 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1177 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1178 f:\sp\public\sdk\inc\windef.h -FILE 1179 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 1180 f:\sp\public\sdk\inc\pshpack1.h -FILE 1181 f:\sp\public\sdk\inc\winver.h -FILE 1182 f:\sp\public\sdk\inc\winnetwk.h -FILE 1183 f:\sp\public\sdk\inc\imm.h -FILE 1184 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1185 f:\sp\public\sdk\inc\windef.h -FILE 1186 f:\sp\public\sdk\inc\pshpack1.h -FILE 1187 f:\sp\public\sdk\inc\winver.h -FILE 1188 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1189 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1190 f:\sp\public\sdk\inc\winnt.h -FILE 1191 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1192 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1193 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1194 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1195 f:\sp\public\sdk\inc\winreg.h -FILE 1196 f:\sp\public\sdk\inc\winbase.h -FILE 1197 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1198 f:\sp\public\sdk\inc\winerror.h -FILE 1199 f:\sp\vctools\crt_bld\self_x86\crt\src\winsig.c -FILE 1200 f:\sp\public\sdk\inc\pshpack8.h -FILE 1201 f:\sp\public\sdk\inc\reason.h -FILE 1202 f:\sp\public\sdk\inc\wincon.h -FILE 1203 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1204 f:\sp\public\sdk\inc\pshpack2.h -FILE 1205 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1206 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1207 f:\sp\public\sdk\inc\mcx.h -FILE 1208 f:\sp\public\sdk\inc\winuser.h -FILE 1209 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1210 f:\sp\public\sdk\inc\winnls.h -FILE 1211 f:\sp\public\sdk\inc\guiddef.h -FILE 1212 f:\sp\public\sdk\inc\windows.h -FILE 1213 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1214 f:\sp\public\sdk\inc\specstrings.h -FILE 1215 f:\sp\public\sdk\inc\ddbanned.h -FILE 1216 f:\sp\public\sdk\inc\basetsd.h -FILE 1217 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1218 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1219 f:\sp\public\sdk\inc\stralign.h -FILE 1220 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 1221 f:\sp\public\sdk\inc\tvout.h -FILE 1222 f:\sp\public\sdk\inc\winsvc.h -FILE 1223 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1224 f:\sp\public\sdk\inc\wingdi.h -FILE 1225 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 1226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 1227 f:\sp\public\sdk\inc\pshpack4.h -FILE 1228 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1229 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1230 f:\sp\public\sdk\inc\poppack.h -FILE 1231 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1232 f:\sp\public\sdk\inc\wincon.h -FILE 1233 f:\sp\public\sdk\inc\imm.h -FILE 1234 f:\sp\public\sdk\inc\winbase.h -FILE 1235 f:\sp\public\sdk\inc\wingdi.h -FILE 1236 f:\sp\public\sdk\inc\winver.h -FILE 1237 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1238 f:\sp\public\sdk\inc\windows.h -FILE 1239 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1240 f:\sp\public\sdk\inc\pshpack2.h -FILE 1241 f:\sp\public\sdk\inc\reason.h -FILE 1242 f:\sp\vctools\crt_bld\self_x86\crt\src\w_str.c -FILE 1243 f:\sp\public\sdk\inc\specstrings.h -FILE 1244 f:\sp\public\sdk\inc\basetsd.h -FILE 1245 f:\sp\public\sdk\inc\pshpack4.h -FILE 1246 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1247 f:\sp\public\sdk\inc\winnetwk.h -FILE 1248 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1249 f:\sp\public\sdk\inc\stralign.h -FILE 1250 f:\sp\public\sdk\inc\poppack.h -FILE 1251 f:\sp\public\sdk\inc\winsvc.h -FILE 1252 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1253 f:\sp\public\sdk\inc\windef.h -FILE 1254 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1255 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1256 f:\sp\public\sdk\inc\winuser.h -FILE 1257 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1258 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1259 f:\sp\public\sdk\inc\mcx.h -FILE 1260 f:\sp\public\sdk\inc\pshpack8.h -FILE 1261 f:\sp\public\sdk\inc\guiddef.h -FILE 1262 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1263 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1264 f:\sp\public\sdk\inc\winnt.h -FILE 1265 f:\sp\public\sdk\inc\winnls.h -FILE 1266 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1267 f:\sp\public\sdk\inc\pshpack1.h -FILE 1268 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1269 f:\sp\public\sdk\inc\winerror.h -FILE 1270 f:\sp\public\sdk\inc\winreg.h -FILE 1271 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1272 f:\sp\public\sdk\inc\ddbanned.h -FILE 1273 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1274 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1275 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1276 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1277 f:\sp\public\sdk\inc\tvout.h -FILE 1278 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1279 f:\sp\public\sdk\inc\wincon.h -FILE 1280 f:\sp\public\sdk\inc\imm.h -FILE 1281 f:\sp\public\sdk\inc\winbase.h -FILE 1282 f:\sp\public\sdk\inc\wingdi.h -FILE 1283 f:\sp\public\sdk\inc\winver.h -FILE 1284 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1285 f:\sp\public\sdk\inc\windows.h -FILE 1286 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1287 f:\sp\public\sdk\inc\pshpack2.h -FILE 1288 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1289 f:\sp\public\sdk\inc\reason.h -FILE 1290 f:\sp\vctools\crt_bld\self_x86\crt\src\w_loc.c -FILE 1291 f:\sp\public\sdk\inc\specstrings.h -FILE 1292 f:\sp\public\sdk\inc\basetsd.h -FILE 1293 f:\sp\public\sdk\inc\pshpack4.h -FILE 1294 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1295 f:\sp\public\sdk\inc\winnetwk.h -FILE 1296 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1297 f:\sp\public\sdk\inc\stralign.h -FILE 1298 f:\sp\public\sdk\inc\poppack.h -FILE 1299 f:\sp\public\sdk\inc\winsvc.h -FILE 1300 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1301 f:\sp\public\sdk\inc\windef.h -FILE 1302 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1303 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1304 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1305 f:\sp\public\sdk\inc\winuser.h -FILE 1306 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1307 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1308 f:\sp\public\sdk\inc\mcx.h -FILE 1309 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1310 f:\sp\public\sdk\inc\pshpack8.h -FILE 1311 f:\sp\public\sdk\inc\guiddef.h -FILE 1312 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1313 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1314 f:\sp\public\sdk\inc\winnt.h -FILE 1315 f:\sp\public\sdk\inc\winnls.h -FILE 1316 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1317 f:\sp\public\sdk\inc\pshpack1.h -FILE 1318 f:\sp\public\sdk\inc\winerror.h -FILE 1319 f:\sp\public\sdk\inc\winreg.h -FILE 1320 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1321 f:\sp\public\sdk\inc\ddbanned.h -FILE 1322 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1323 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1324 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1325 f:\sp\public\sdk\inc\tvout.h -FILE 1326 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1327 f:\sp\public\sdk\inc\poppack.h -FILE 1328 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1329 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1330 f:\sp\public\sdk\inc\winnetwk.h -FILE 1331 f:\sp\public\sdk\inc\imm.h -FILE 1332 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1333 f:\sp\public\sdk\inc\windef.h -FILE 1334 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1335 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1336 f:\sp\public\sdk\inc\pshpack1.h -FILE 1337 f:\sp\public\sdk\inc\winver.h -FILE 1338 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1339 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1340 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1341 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1342 f:\sp\public\sdk\inc\winnt.h -FILE 1343 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1344 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1345 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1346 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1347 f:\sp\public\sdk\inc\winreg.h -FILE 1348 f:\sp\vctools\crt_bld\self_x86\crt\src\convrtcp.c -FILE 1349 f:\sp\public\sdk\inc\winbase.h -FILE 1350 f:\sp\public\sdk\inc\winerror.h -FILE 1351 f:\sp\public\sdk\inc\pshpack8.h -FILE 1352 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1353 f:\sp\public\sdk\inc\reason.h -FILE 1354 f:\sp\public\sdk\inc\wincon.h -FILE 1355 f:\sp\public\sdk\inc\ddbanned.h -FILE 1356 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1357 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1358 f:\sp\public\sdk\inc\pshpack2.h -FILE 1359 f:\sp\public\sdk\inc\mcx.h -FILE 1360 f:\sp\public\sdk\inc\winuser.h -FILE 1361 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1362 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1363 f:\sp\public\sdk\inc\winnls.h -FILE 1364 f:\sp\public\sdk\inc\guiddef.h -FILE 1365 f:\sp\public\sdk\inc\windows.h -FILE 1366 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1367 f:\sp\public\sdk\inc\specstrings.h -FILE 1368 f:\sp\public\sdk\inc\basetsd.h -FILE 1369 f:\sp\public\sdk\inc\stralign.h -FILE 1370 f:\sp\public\sdk\inc\tvout.h -FILE 1371 f:\sp\public\sdk\inc\winsvc.h -FILE 1372 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1373 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1374 f:\sp\public\sdk\inc\wingdi.h -FILE 1375 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1376 f:\sp\public\sdk\inc\pshpack4.h -FILE 1377 f:\sp\public\sdk\inc\winerror.h -FILE 1378 f:\sp\public\sdk\inc\pshpack8.h -FILE 1379 f:\sp\public\sdk\inc\reason.h -FILE 1380 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1381 f:\sp\public\sdk\inc\wincon.h -FILE 1382 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1383 f:\sp\public\sdk\inc\pshpack2.h -FILE 1384 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1385 f:\sp\public\sdk\inc\mcx.h -FILE 1386 f:\sp\public\sdk\inc\winuser.h -FILE 1387 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1388 f:\sp\public\sdk\inc\winnls.h -FILE 1389 f:\sp\public\sdk\inc\guiddef.h -FILE 1390 f:\sp\public\sdk\inc\windows.h -FILE 1391 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 1392 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1393 f:\sp\public\sdk\inc\specstrings.h -FILE 1394 f:\sp\public\sdk\inc\basetsd.h -FILE 1395 f:\sp\public\sdk\inc\stralign.h -FILE 1396 f:\sp\public\sdk\inc\tvout.h -FILE 1397 f:\sp\public\sdk\inc\winsvc.h -FILE 1398 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1399 f:\sp\public\sdk\inc\wingdi.h -FILE 1400 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1401 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1402 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1403 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1404 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1405 f:\sp\public\sdk\inc\pshpack4.h -FILE 1406 f:\sp\public\sdk\inc\poppack.h -FILE 1407 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1408 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1409 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.c -FILE 1410 f:\sp\public\sdk\inc\winnetwk.h -FILE 1411 f:\sp\public\sdk\inc\imm.h -FILE 1412 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1413 f:\sp\public\sdk\inc\windef.h -FILE 1414 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1415 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1416 f:\sp\public\sdk\inc\pshpack1.h -FILE 1417 f:\sp\public\sdk\inc\ddbanned.h -FILE 1418 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1419 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1420 f:\sp\public\sdk\inc\winver.h -FILE 1421 f:\sp\public\sdk\inc\winnt.h -FILE 1422 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1423 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1424 f:\sp\public\sdk\inc\winreg.h -FILE 1425 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1426 f:\sp\public\sdk\inc\winbase.h -FILE 1427 f:\sp\public\sdk\inc\poppack.h -FILE 1428 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1429 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 1430 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1431 f:\sp\public\sdk\inc\winnetwk.h -FILE 1432 f:\sp\public\sdk\inc\imm.h -FILE 1433 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1434 f:\sp\public\sdk\inc\windef.h -FILE 1435 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1436 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1437 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1438 f:\sp\public\sdk\inc\pshpack1.h -FILE 1439 f:\sp\public\sdk\inc\winver.h -FILE 1440 f:\sp\public\sdk\inc\windows.h -FILE 1441 f:\sp\public\sdk\inc\winnt.h -FILE 1442 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1443 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1444 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1445 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1446 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1447 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1448 f:\sp\public\sdk\inc\winreg.h -FILE 1449 f:\sp\public\sdk\inc\winbase.h -FILE 1450 f:\sp\vctools\crt_bld\self_x86\crt\src\setenv.c -FILE 1451 f:\sp\public\sdk\inc\winerror.h -FILE 1452 f:\sp\public\sdk\inc\pshpack8.h -FILE 1453 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1454 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1455 f:\sp\public\sdk\inc\reason.h -FILE 1456 f:\sp\public\sdk\inc\wincon.h -FILE 1457 f:\sp\public\sdk\inc\ddbanned.h -FILE 1458 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1459 f:\sp\public\sdk\inc\pshpack2.h -FILE 1460 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1461 f:\sp\public\sdk\inc\mcx.h -FILE 1462 f:\sp\public\sdk\inc\winuser.h -FILE 1463 f:\sp\public\sdk\inc\winnls.h -FILE 1464 f:\sp\public\sdk\inc\guiddef.h -FILE 1465 f:\sp\public\sdk\inc\specstrings.h -FILE 1466 f:\sp\public\sdk\inc\basetsd.h -FILE 1467 f:\sp\public\sdk\inc\stralign.h -FILE 1468 f:\sp\public\sdk\inc\tvout.h -FILE 1469 f:\sp\public\sdk\inc\winsvc.h -FILE 1470 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1471 f:\sp\public\sdk\inc\wingdi.h -FILE 1472 f:\sp\public\sdk\inc\pshpack4.h -FILE 1473 f:\sp\public\sdk\inc\poppack.h -FILE 1474 f:\sp\public\sdk\inc\winnetwk.h -FILE 1475 f:\sp\public\sdk\inc\imm.h -FILE 1476 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1477 f:\sp\public\sdk\inc\windef.h -FILE 1478 f:\sp\public\sdk\inc\pshpack1.h -FILE 1479 f:\sp\public\sdk\inc\winver.h -FILE 1480 f:\sp\public\sdk\inc\windows.h -FILE 1481 f:\sp\public\sdk\inc\winnt.h -FILE 1482 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1483 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1484 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1485 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1486 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1487 f:\sp\public\sdk\inc\winreg.h -FILE 1488 f:\sp\public\sdk\inc\winbase.h -FILE 1489 f:\sp\vctools\crt_bld\self_x86\crt\src\rand_s.c -FILE 1490 f:\sp\public\sdk\inc\winerror.h -FILE 1491 f:\sp\public\sdk\inc\pshpack8.h -FILE 1492 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1493 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1494 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1495 f:\sp\public\sdk\inc\reason.h -FILE 1496 f:\sp\public\sdk\inc\wincon.h -FILE 1497 f:\sp\public\sdk\inc\ddbanned.h -FILE 1498 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1499 f:\sp\public\sdk\inc\pshpack2.h -FILE 1500 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1501 f:\sp\public\sdk\inc\mcx.h -FILE 1502 f:\sp\public\sdk\inc\winuser.h -FILE 1503 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1504 f:\sp\public\sdk\inc\winnls.h -FILE 1505 f:\sp\public\sdk\inc\guiddef.h -FILE 1506 f:\sp\public\sdk\inc\specstrings.h -FILE 1507 f:\sp\public\sdk\inc\basetsd.h -FILE 1508 f:\sp\public\sdk\inc\stralign.h -FILE 1509 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1510 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1511 f:\sp\public\sdk\inc\tvout.h -FILE 1512 f:\sp\public\sdk\inc\winsvc.h -FILE 1513 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1514 f:\sp\public\sdk\inc\wingdi.h -FILE 1515 f:\sp\public\sdk\inc\pshpack4.h -FILE 1516 f:\sp\public\sdk\inc\poppack.h -FILE 1517 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1518 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1519 f:\sp\public\sdk\inc\winnetwk.h -FILE 1520 f:\sp\public\sdk\inc\imm.h -FILE 1521 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1522 f:\sp\public\sdk\inc\windef.h -FILE 1523 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1524 f:\sp\public\sdk\inc\pshpack1.h -FILE 1525 f:\sp\public\sdk\inc\winver.h -FILE 1526 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1527 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1528 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1529 f:\sp\public\sdk\inc\winnt.h -FILE 1530 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1531 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1532 f:\sp\public\sdk\inc\winreg.h -FILE 1533 f:\sp\vctools\crt_bld\self_x86\crt\src\purevirt.c -FILE 1534 f:\sp\public\sdk\inc\winbase.h -FILE 1535 f:\sp\public\sdk\inc\winerror.h -FILE 1536 f:\sp\public\sdk\inc\pshpack8.h -FILE 1537 f:\sp\public\sdk\inc\reason.h -FILE 1538 f:\sp\public\sdk\inc\wincon.h -FILE 1539 f:\sp\public\sdk\inc\ddbanned.h -FILE 1540 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1541 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1542 f:\sp\public\sdk\inc\pshpack2.h -FILE 1543 f:\sp\public\sdk\inc\mcx.h -FILE 1544 f:\sp\public\sdk\inc\winuser.h -FILE 1545 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1546 f:\sp\public\sdk\inc\winnls.h -FILE 1547 f:\sp\public\sdk\inc\guiddef.h -FILE 1548 f:\sp\public\sdk\inc\windows.h -FILE 1549 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1550 f:\sp\public\sdk\inc\specstrings.h -FILE 1551 f:\sp\public\sdk\inc\basetsd.h -FILE 1552 f:\sp\public\sdk\inc\stralign.h -FILE 1553 f:\sp\public\sdk\inc\tvout.h -FILE 1554 f:\sp\public\sdk\inc\winsvc.h -FILE 1555 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1556 f:\sp\public\sdk\inc\wingdi.h -FILE 1557 f:\sp\public\sdk\inc\pshpack4.h -FILE 1558 f:\sp\public\sdk\inc\poppack.h -FILE 1559 f:\sp\public\sdk\inc\winnetwk.h -FILE 1560 f:\sp\public\sdk\inc\imm.h -FILE 1561 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1562 f:\sp\public\sdk\inc\windef.h -FILE 1563 f:\sp\public\sdk\inc\pshpack1.h -FILE 1564 f:\sp\public\sdk\inc\winver.h -FILE 1565 f:\sp\public\sdk\inc\windows.h -FILE 1566 f:\sp\public\sdk\inc\winnt.h -FILE 1567 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1568 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1569 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1570 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1571 f:\sp\public\sdk\inc\winreg.h -FILE 1572 f:\sp\public\sdk\inc\winbase.h -FILE 1573 f:\sp\vctools\crt_bld\self_x86\crt\src\pesect.c -FILE 1574 f:\sp\public\sdk\inc\winerror.h -FILE 1575 f:\sp\public\sdk\inc\pshpack8.h -FILE 1576 f:\sp\public\sdk\inc\reason.h -FILE 1577 f:\sp\public\sdk\inc\wincon.h -FILE 1578 f:\sp\public\sdk\inc\ddbanned.h -FILE 1579 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1580 f:\sp\public\sdk\inc\pshpack2.h -FILE 1581 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1582 f:\sp\public\sdk\inc\mcx.h -FILE 1583 f:\sp\public\sdk\inc\winuser.h -FILE 1584 f:\sp\public\sdk\inc\winnls.h -FILE 1585 f:\sp\public\sdk\inc\guiddef.h -FILE 1586 f:\sp\public\sdk\inc\specstrings.h -FILE 1587 f:\sp\public\sdk\inc\basetsd.h -FILE 1588 f:\sp\public\sdk\inc\stralign.h -FILE 1589 f:\sp\public\sdk\inc\tvout.h -FILE 1590 f:\sp\public\sdk\inc\winsvc.h -FILE 1591 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1592 f:\sp\public\sdk\inc\wingdi.h -FILE 1593 f:\sp\public\sdk\inc\pshpack4.h -FILE 1594 f:\sp\public\sdk\inc\winerror.h -FILE 1595 f:\sp\public\sdk\inc\pshpack1.h -FILE 1596 f:\sp\public\sdk\inc\pshpack8.h -FILE 1597 f:\sp\public\sdk\inc\winver.h -FILE 1598 f:\sp\public\sdk\inc\pshpack2.h -FILE 1599 f:\sp\public\sdk\inc\winreg.h -FILE 1600 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1601 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1602 f:\sp\public\sdk\inc\guiddef.h -FILE 1603 f:\sp\public\sdk\inc\windows.h -FILE 1604 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1605 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 1606 f:\sp\public\sdk\inc\specstrings.h -FILE 1607 f:\sp\public\sdk\inc\basetsd.h -FILE 1608 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1609 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1610 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1611 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1612 f:\sp\public\sdk\inc\pshpack4.h -FILE 1613 f:\sp\public\sdk\inc\reason.h -FILE 1614 f:\sp\public\sdk\inc\wincon.h -FILE 1615 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1616 f:\sp\public\sdk\inc\poppack.h -FILE 1617 f:\sp\public\sdk\inc\mcx.h -FILE 1618 f:\sp\public\sdk\inc\winuser.h -FILE 1619 f:\sp\public\sdk\inc\winnls.h -FILE 1620 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata2.c -FILE 1621 f:\sp\public\sdk\inc\stralign.h -FILE 1622 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1623 f:\sp\public\sdk\inc\windef.h -FILE 1624 f:\sp\public\sdk\inc\tvout.h -FILE 1625 f:\sp\public\sdk\inc\winsvc.h -FILE 1626 f:\sp\public\sdk\inc\wingdi.h -FILE 1627 f:\sp\public\sdk\inc\ddbanned.h -FILE 1628 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1629 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1630 f:\sp\public\sdk\inc\winnt.h -FILE 1631 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1632 f:\sp\public\sdk\inc\winnetwk.h -FILE 1633 f:\sp\public\sdk\inc\imm.h -FILE 1634 f:\sp\public\sdk\inc\winbase.h -FILE 1635 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1636 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1637 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1638 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata1.c -FILE 1639 f:\sp\public\sdk\inc\ddbanned.h -FILE 1640 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1641 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1642 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1643 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 1644 f:\sp\public\sdk\inc\reason.h -FILE 1645 f:\sp\public\sdk\inc\wincon.h -FILE 1646 f:\sp\public\sdk\inc\pshpack2.h -FILE 1647 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1648 f:\sp\public\sdk\inc\mcx.h -FILE 1649 f:\sp\public\sdk\inc\winuser.h -FILE 1650 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1651 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1652 f:\sp\public\sdk\inc\winnls.h -FILE 1653 f:\sp\public\sdk\inc\guiddef.h -FILE 1654 f:\sp\public\sdk\inc\windows.h -FILE 1655 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1656 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1657 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1658 f:\sp\public\sdk\inc\specstrings.h -FILE 1659 f:\sp\public\sdk\inc\basetsd.h -FILE 1660 f:\sp\public\sdk\inc\stralign.h -FILE 1661 f:\sp\public\sdk\inc\tvout.h -FILE 1662 f:\sp\public\sdk\inc\winsvc.h -FILE 1663 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1664 f:\sp\public\sdk\inc\wingdi.h -FILE 1665 f:\sp\public\sdk\inc\pshpack4.h -FILE 1666 f:\sp\public\sdk\inc\poppack.h -FILE 1667 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1668 f:\sp\public\sdk\inc\winnetwk.h -FILE 1669 f:\sp\public\sdk\inc\imm.h -FILE 1670 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1671 f:\sp\public\sdk\inc\windef.h -FILE 1672 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1673 f:\sp\vctools\crt_bld\self_x86\crt\src\onexit.c -FILE 1674 f:\sp\public\sdk\inc\pshpack1.h -FILE 1675 f:\sp\public\sdk\inc\winver.h -FILE 1676 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1677 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1678 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1679 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1680 f:\sp\public\sdk\inc\winnt.h -FILE 1681 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1682 f:\sp\public\sdk\inc\ddbanned.h -FILE 1683 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1684 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1685 f:\sp\public\sdk\inc\winreg.h -FILE 1686 f:\sp\public\sdk\inc\winbase.h -FILE 1687 f:\sp\public\sdk\inc\winerror.h -FILE 1688 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1689 f:\sp\public\sdk\inc\pshpack8.h -FILE 1690 f:\sp\public\sdk\inc\winbase.h -FILE 1691 f:\sp\public\sdk\inc\winerror.h -FILE 1692 f:\sp\public\sdk\inc\pshpack1.h -FILE 1693 f:\sp\public\sdk\inc\pshpack8.h -FILE 1694 f:\sp\public\sdk\inc\winver.h -FILE 1695 f:\sp\public\sdk\inc\pshpack2.h -FILE 1696 f:\sp\public\sdk\inc\winreg.h -FILE 1697 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1698 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1699 f:\sp\public\sdk\inc\guiddef.h -FILE 1700 f:\sp\public\sdk\inc\windows.h -FILE 1701 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1702 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1703 f:\sp\public\sdk\inc\specstrings.h -FILE 1704 f:\sp\public\sdk\inc\basetsd.h -FILE 1705 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1706 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1707 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1708 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1709 f:\sp\public\sdk\inc\pshpack4.h -FILE 1710 f:\sp\public\sdk\inc\reason.h -FILE 1711 f:\sp\public\sdk\inc\wincon.h -FILE 1712 f:\sp\public\sdk\inc\poppack.h -FILE 1713 f:\sp\public\sdk\inc\mcx.h -FILE 1714 f:\sp\public\sdk\inc\winuser.h -FILE 1715 f:\sp\public\sdk\inc\winnls.h -FILE 1716 f:\sp\vctools\crt_bld\self_x86\crt\src\lconv.c -FILE 1717 f:\sp\public\sdk\inc\stralign.h -FILE 1718 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1719 f:\sp\public\sdk\inc\windef.h -FILE 1720 f:\sp\public\sdk\inc\tvout.h -FILE 1721 f:\sp\public\sdk\inc\winsvc.h -FILE 1722 f:\sp\public\sdk\inc\wingdi.h -FILE 1723 f:\sp\public\sdk\inc\ddbanned.h -FILE 1724 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1725 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1726 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1727 f:\sp\public\sdk\inc\winnt.h -FILE 1728 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1729 f:\sp\public\sdk\inc\winnetwk.h -FILE 1730 f:\sp\public\sdk\inc\imm.h -FILE 1731 f:\sp\public\sdk\inc\guiddef.h -FILE 1732 f:\sp\public\sdk\inc\winnt.h -FILE 1733 f:\sp\public\sdk\inc\winnls.h -FILE 1734 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1735 f:\sp\public\sdk\inc\pshpack1.h -FILE 1736 f:\sp\public\sdk\inc\winerror.h -FILE 1737 f:\sp\public\sdk\inc\winreg.h -FILE 1738 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1739 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1740 f:\sp\public\sdk\inc\tvout.h -FILE 1741 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1742 f:\sp\vctools\crt_bld\self_x86\crt\src\invarg.c -FILE 1743 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1744 f:\sp\public\sdk\inc\wincon.h -FILE 1745 f:\sp\public\sdk\inc\imm.h -FILE 1746 f:\sp\public\sdk\inc\winbase.h -FILE 1747 f:\sp\public\sdk\inc\wingdi.h -FILE 1748 f:\sp\public\sdk\inc\winver.h -FILE 1749 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1750 f:\sp\public\sdk\inc\windows.h -FILE 1751 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1752 f:\sp\public\sdk\inc\pshpack2.h -FILE 1753 f:\sp\public\sdk\inc\reason.h -FILE 1754 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1755 f:\sp\public\sdk\inc\specstrings.h -FILE 1756 f:\sp\public\sdk\inc\basetsd.h -FILE 1757 f:\sp\public\sdk\inc\pshpack4.h -FILE 1758 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1759 f:\sp\public\sdk\inc\winnetwk.h -FILE 1760 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1761 f:\sp\public\sdk\inc\stralign.h -FILE 1762 f:\sp\public\sdk\inc\poppack.h -FILE 1763 f:\sp\public\sdk\inc\winsvc.h -FILE 1764 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1765 f:\sp\public\sdk\inc\windef.h -FILE 1766 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1767 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1768 f:\sp\public\sdk\inc\winuser.h -FILE 1769 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1770 f:\sp\public\sdk\inc\ddbanned.h -FILE 1771 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1772 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1773 f:\sp\public\sdk\inc\mcx.h -FILE 1774 f:\sp\public\sdk\inc\pshpack8.h -FILE 1775 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1776 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1777 f:\sp\public\sdk\inc\pshpack4.h -FILE 1778 f:\sp\public\sdk\inc\poppack.h -FILE 1779 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1780 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1781 f:\sp\public\sdk\inc\winnetwk.h -FILE 1782 f:\sp\public\sdk\inc\imm.h -FILE 1783 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1784 f:\sp\public\sdk\inc\windef.h -FILE 1785 f:\sp\public\sdk\inc\pshpack1.h -FILE 1786 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1787 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1788 f:\sp\public\sdk\inc\winver.h -FILE 1789 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1790 f:\sp\public\sdk\inc\winnt.h -FILE 1791 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1792 f:\sp\public\sdk\inc\winreg.h -FILE 1793 f:\sp\vctools\crt_bld\self_x86\crt\src\inittime.c -FILE 1794 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1795 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1796 f:\sp\public\sdk\inc\winbase.h -FILE 1797 f:\sp\public\sdk\inc\winerror.h -FILE 1798 f:\sp\public\sdk\inc\pshpack8.h -FILE 1799 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1800 f:\sp\public\sdk\inc\reason.h -FILE 1801 f:\sp\public\sdk\inc\ddbanned.h -FILE 1802 f:\sp\public\sdk\inc\wincon.h -FILE 1803 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1804 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1805 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1806 f:\sp\public\sdk\inc\pshpack2.h -FILE 1807 f:\sp\public\sdk\inc\mcx.h -FILE 1808 f:\sp\public\sdk\inc\winuser.h -FILE 1809 f:\sp\public\sdk\inc\winnls.h -FILE 1810 f:\sp\public\sdk\inc\guiddef.h -FILE 1811 f:\sp\public\sdk\inc\stralign.h -FILE 1812 f:\sp\public\sdk\inc\specstrings.h -FILE 1813 f:\sp\public\sdk\inc\basetsd.h -FILE 1814 f:\sp\public\sdk\inc\windows.h -FILE 1815 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1816 f:\sp\public\sdk\inc\tvout.h -FILE 1817 f:\sp\public\sdk\inc\winsvc.h -FILE 1818 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1819 f:\sp\public\sdk\inc\wingdi.h -FILE 1820 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1821 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1822 f:\sp\public\sdk\inc\pshpack4.h -FILE 1823 f:\sp\public\sdk\inc\poppack.h -FILE 1824 f:\sp\public\sdk\inc\winnt.h -FILE 1825 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1826 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1827 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1828 f:\sp\public\sdk\inc\winnetwk.h -FILE 1829 f:\sp\public\sdk\inc\imm.h -FILE 1830 f:\sp\public\sdk\inc\pshpack1.h -FILE 1831 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1832 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1833 f:\sp\public\sdk\inc\winver.h -FILE 1834 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1835 f:\sp\public\sdk\inc\guiddef.h -FILE 1836 f:\sp\public\sdk\inc\specstrings.h -FILE 1837 f:\sp\public\sdk\inc\basetsd.h -FILE 1838 f:\sp\public\sdk\inc\windows.h -FILE 1839 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1840 f:\sp\public\sdk\inc\winreg.h -FILE 1841 f:\sp\vctools\crt_bld\self_x86\crt\src\initnum.c -FILE 1842 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 1843 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1844 f:\sp\public\sdk\inc\winbase.h -FILE 1845 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1846 f:\sp\public\sdk\inc\winerror.h -FILE 1847 f:\sp\public\sdk\inc\pshpack8.h -FILE 1848 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1849 f:\sp\public\sdk\inc\reason.h -FILE 1850 f:\sp\public\sdk\inc\ddbanned.h -FILE 1851 f:\sp\public\sdk\inc\wincon.h -FILE 1852 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1853 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1854 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1855 f:\sp\public\sdk\inc\pshpack2.h -FILE 1856 f:\sp\public\sdk\inc\mcx.h -FILE 1857 f:\sp\public\sdk\inc\winuser.h -FILE 1858 f:\sp\public\sdk\inc\winnls.h -FILE 1859 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1860 f:\sp\public\sdk\inc\windef.h -FILE 1861 f:\sp\public\sdk\inc\stralign.h -FILE 1862 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1863 f:\sp\public\sdk\inc\tvout.h -FILE 1864 f:\sp\public\sdk\inc\winsvc.h -FILE 1865 f:\sp\public\sdk\inc\wingdi.h -FILE 1866 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1867 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1868 f:\sp\public\sdk\inc\pshpack4.h -FILE 1869 f:\sp\public\sdk\inc\poppack.h -FILE 1870 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1871 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1872 f:\sp\public\sdk\inc\winnetwk.h -FILE 1873 f:\sp\public\sdk\inc\imm.h -FILE 1874 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1875 f:\sp\public\sdk\inc\windef.h -FILE 1876 f:\sp\public\sdk\inc\pshpack1.h -FILE 1877 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1878 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1879 f:\sp\public\sdk\inc\winver.h -FILE 1880 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1881 f:\sp\public\sdk\inc\winnt.h -FILE 1882 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1883 f:\sp\public\sdk\inc\winreg.h -FILE 1884 f:\sp\vctools\crt_bld\self_x86\crt\src\initmon.c -FILE 1885 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1886 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1887 f:\sp\public\sdk\inc\winbase.h -FILE 1888 f:\sp\public\sdk\inc\winerror.h -FILE 1889 f:\sp\public\sdk\inc\pshpack8.h -FILE 1890 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1891 f:\sp\public\sdk\inc\reason.h -FILE 1892 f:\sp\public\sdk\inc\ddbanned.h -FILE 1893 f:\sp\public\sdk\inc\wincon.h -FILE 1894 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1895 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1896 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1897 f:\sp\public\sdk\inc\pshpack2.h -FILE 1898 f:\sp\public\sdk\inc\mcx.h -FILE 1899 f:\sp\public\sdk\inc\winuser.h -FILE 1900 f:\sp\public\sdk\inc\winnls.h -FILE 1901 f:\sp\public\sdk\inc\guiddef.h -FILE 1902 f:\sp\public\sdk\inc\stralign.h -FILE 1903 f:\sp\public\sdk\inc\specstrings.h -FILE 1904 f:\sp\public\sdk\inc\basetsd.h -FILE 1905 f:\sp\public\sdk\inc\windows.h -FILE 1906 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1907 f:\sp\public\sdk\inc\tvout.h -FILE 1908 f:\sp\public\sdk\inc\winsvc.h -FILE 1909 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1910 f:\sp\public\sdk\inc\wingdi.h -FILE 1911 f:\sp\public\sdk\inc\winbase.h -FILE 1912 f:\sp\public\sdk\inc\winerror.h -FILE 1913 f:\sp\public\sdk\inc\pshpack1.h -FILE 1914 f:\sp\public\sdk\inc\pshpack8.h -FILE 1915 f:\sp\public\sdk\inc\winver.h -FILE 1916 f:\sp\public\sdk\inc\pshpack2.h -FILE 1917 f:\sp\public\sdk\inc\winreg.h -FILE 1918 f:\sp\public\sdk\inc\guiddef.h -FILE 1919 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1920 f:\sp\public\sdk\inc\specstrings.h -FILE 1921 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1922 f:\sp\public\sdk\inc\basetsd.h -FILE 1923 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1924 f:\sp\public\sdk\inc\windows.h -FILE 1925 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1926 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1927 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1928 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1929 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1930 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1931 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1932 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1933 f:\sp\public\sdk\inc\pshpack4.h -FILE 1934 f:\sp\public\sdk\inc\reason.h -FILE 1935 f:\sp\public\sdk\inc\wincon.h -FILE 1936 f:\sp\public\sdk\inc\poppack.h -FILE 1937 f:\sp\vctools\crt_bld\self_x86\crt\src\inithelp.c -FILE 1938 f:\sp\public\sdk\inc\mcx.h -FILE 1939 f:\sp\public\sdk\inc\winuser.h -FILE 1940 f:\sp\public\sdk\inc\winnls.h -FILE 1941 f:\sp\public\sdk\inc\stralign.h -FILE 1942 f:\sp\public\sdk\inc\tvout.h -FILE 1943 f:\sp\public\sdk\inc\winsvc.h -FILE 1944 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1945 f:\sp\public\sdk\inc\wingdi.h -FILE 1946 f:\sp\public\sdk\inc\windef.h -FILE 1947 f:\sp\public\sdk\inc\ddbanned.h -FILE 1948 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1949 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1950 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1951 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1952 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1953 f:\sp\public\sdk\inc\winnetwk.h -FILE 1954 f:\sp\public\sdk\inc\imm.h -FILE 1955 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1956 f:\sp\public\sdk\inc\winnt.h -FILE 1957 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1958 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1959 f:\sp\public\sdk\inc\pshpack4.h -FILE 1960 f:\sp\public\sdk\inc\poppack.h -FILE 1961 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1962 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1963 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1964 f:\sp\public\sdk\inc\winnetwk.h -FILE 1965 f:\sp\public\sdk\inc\imm.h -FILE 1966 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1967 f:\sp\public\sdk\inc\windef.h -FILE 1968 f:\sp\public\sdk\inc\pshpack1.h -FILE 1969 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1970 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1971 f:\sp\public\sdk\inc\winver.h -FILE 1972 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1973 f:\sp\public\sdk\inc\winnt.h -FILE 1974 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1975 f:\sp\public\sdk\inc\winreg.h -FILE 1976 f:\sp\vctools\crt_bld\self_x86\crt\src\initctyp.c -FILE 1977 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1978 f:\sp\public\sdk\inc\winbase.h -FILE 1979 f:\sp\public\sdk\inc\winerror.h -FILE 1980 f:\sp\public\sdk\inc\pshpack8.h -FILE 1981 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1982 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1983 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1984 f:\sp\public\sdk\inc\reason.h -FILE 1985 f:\sp\public\sdk\inc\ddbanned.h -FILE 1986 f:\sp\public\sdk\inc\wincon.h -FILE 1987 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1988 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1989 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1990 f:\sp\public\sdk\inc\pshpack2.h -FILE 1991 f:\sp\public\sdk\inc\mcx.h -FILE 1992 f:\sp\public\sdk\inc\winuser.h -FILE 1993 f:\sp\public\sdk\inc\winnls.h -FILE 1994 f:\sp\public\sdk\inc\guiddef.h -FILE 1995 f:\sp\public\sdk\inc\stralign.h -FILE 1996 f:\sp\public\sdk\inc\specstrings.h -FILE 1997 f:\sp\public\sdk\inc\basetsd.h -FILE 1998 f:\sp\public\sdk\inc\windows.h -FILE 1999 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2000 f:\sp\public\sdk\inc\tvout.h -FILE 2001 f:\sp\public\sdk\inc\winsvc.h -FILE 2002 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2003 f:\sp\public\sdk\inc\wingdi.h -FILE 2004 f:\sp\public\sdk\inc\poppack.h -FILE 2005 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2006 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2007 f:\sp\public\sdk\inc\winnetwk.h -FILE 2008 f:\sp\public\sdk\inc\imm.h -FILE 2009 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2010 f:\sp\public\sdk\inc\windef.h -FILE 2011 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2012 f:\sp\public\sdk\inc\pshpack1.h -FILE 2013 f:\sp\public\sdk\inc\winver.h -FILE 2014 f:\sp\public\sdk\inc\windows.h -FILE 2015 f:\sp\public\sdk\inc\winnt.h -FILE 2016 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2017 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2018 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2019 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2020 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2021 f:\sp\public\sdk\inc\winreg.h -FILE 2022 f:\sp\public\sdk\inc\winbase.h -FILE 2023 f:\sp\vctools\crt_bld\self_x86\crt\src\initcrit.c -FILE 2024 f:\sp\public\sdk\inc\winerror.h -FILE 2025 f:\sp\public\sdk\inc\pshpack8.h -FILE 2026 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2027 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2028 f:\sp\public\sdk\inc\reason.h -FILE 2029 f:\sp\public\sdk\inc\wincon.h -FILE 2030 f:\sp\public\sdk\inc\ddbanned.h -FILE 2031 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2032 f:\sp\public\sdk\inc\pshpack2.h -FILE 2033 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2034 f:\sp\public\sdk\inc\mcx.h -FILE 2035 f:\sp\public\sdk\inc\winuser.h -FILE 2036 f:\sp\public\sdk\inc\winnls.h -FILE 2037 f:\sp\public\sdk\inc\guiddef.h -FILE 2038 f:\sp\public\sdk\inc\specstrings.h -FILE 2039 f:\sp\public\sdk\inc\basetsd.h -FILE 2040 f:\sp\public\sdk\inc\stralign.h -FILE 2041 f:\sp\public\sdk\inc\tvout.h -FILE 2042 f:\sp\public\sdk\inc\winsvc.h -FILE 2043 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2044 f:\sp\public\sdk\inc\wingdi.h -FILE 2045 f:\sp\public\sdk\inc\pshpack4.h -FILE 2046 f:\sp\public\sdk\inc\poppack.h -FILE 2047 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2048 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2049 f:\sp\public\sdk\inc\winnetwk.h -FILE 2050 f:\sp\public\sdk\inc\imm.h -FILE 2051 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2052 f:\sp\public\sdk\inc\windef.h -FILE 2053 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2054 f:\sp\public\sdk\inc\pshpack1.h -FILE 2055 f:\sp\public\sdk\inc\winver.h -FILE 2056 f:\sp\public\sdk\inc\windows.h -FILE 2057 f:\sp\public\sdk\inc\winnt.h -FILE 2058 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2059 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2060 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2061 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2062 f:\sp\public\sdk\inc\winreg.h -FILE 2063 f:\sp\public\sdk\inc\winbase.h -FILE 2064 f:\sp\vctools\crt_bld\self_x86\crt\src\initcoll.c -FILE 2065 f:\sp\public\sdk\inc\winerror.h -FILE 2066 f:\sp\public\sdk\inc\pshpack8.h -FILE 2067 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2068 f:\sp\public\sdk\inc\reason.h -FILE 2069 f:\sp\public\sdk\inc\wincon.h -FILE 2070 f:\sp\public\sdk\inc\ddbanned.h -FILE 2071 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2072 f:\sp\public\sdk\inc\pshpack2.h -FILE 2073 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2074 f:\sp\public\sdk\inc\mcx.h -FILE 2075 f:\sp\public\sdk\inc\winuser.h -FILE 2076 f:\sp\public\sdk\inc\winnls.h -FILE 2077 f:\sp\public\sdk\inc\guiddef.h -FILE 2078 f:\sp\public\sdk\inc\specstrings.h -FILE 2079 f:\sp\public\sdk\inc\basetsd.h -FILE 2080 f:\sp\public\sdk\inc\stralign.h -FILE 2081 f:\sp\public\sdk\inc\tvout.h -FILE 2082 f:\sp\public\sdk\inc\winsvc.h -FILE 2083 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2084 f:\sp\public\sdk\inc\wingdi.h -FILE 2085 f:\sp\public\sdk\inc\pshpack4.h -FILE 2086 f:\sp\public\sdk\inc\poppack.h -FILE 2087 f:\sp\public\sdk\inc\winnetwk.h -FILE 2088 f:\sp\public\sdk\inc\imm.h -FILE 2089 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2090 f:\sp\public\sdk\inc\windef.h -FILE 2091 f:\binaries.x86ret\vcboot\inc\mm3dnow.h -FILE 2092 f:\sp\public\sdk\inc\pshpack1.h -FILE 2093 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2094 f:\sp\public\sdk\inc\winver.h -FILE 2095 f:\sp\public\sdk\inc\windows.h -FILE 2096 f:\sp\public\sdk\inc\winnt.h -FILE 2097 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2098 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2099 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2100 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2101 f:\sp\public\sdk\inc\winreg.h -FILE 2102 f:\sp\public\sdk\inc\winbase.h -FILE 2103 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_support.c -FILE 2104 f:\sp\public\sdk\inc\winerror.h -FILE 2105 f:\sp\public\sdk\inc\pshpack8.h -FILE 2106 f:\sp\vctools\crt_bld\self_x86\crt\src\intrin.h -FILE 2107 f:\sp\vctools\crt_bld\self_x86\crt\src\setjmp.h -FILE 2108 f:\sp\public\sdk\inc\reason.h -FILE 2109 f:\sp\public\sdk\inc\wincon.h -FILE 2110 f:\sp\public\sdk\inc\ddbanned.h -FILE 2111 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2112 f:\sp\public\sdk\inc\pshpack2.h -FILE 2113 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2114 f:\sp\public\sdk\inc\mcx.h -FILE 2115 f:\sp\public\sdk\inc\winuser.h -FILE 2116 f:\sp\public\sdk\inc\winnls.h -FILE 2117 f:\sp\public\sdk\inc\guiddef.h -FILE 2118 f:\sp\public\sdk\inc\specstrings.h -FILE 2119 f:\sp\public\sdk\inc\basetsd.h -FILE 2120 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2121 f:\sp\public\sdk\inc\stralign.h -FILE 2122 f:\sp\public\sdk\inc\tvout.h -FILE 2123 f:\sp\public\sdk\inc\winsvc.h -FILE 2124 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2125 f:\sp\public\sdk\inc\wingdi.h -FILE 2126 f:\binaries.x86ret\vcboot\inc\emmintrin.h -FILE 2127 f:\binaries.x86ret\vcboot\inc\xmmintrin.h -FILE 2128 f:\binaries.x86ret\vcboot\inc\mmintrin.h -FILE 2129 f:\sp\public\sdk\inc\pshpack4.h -FILE 2130 f:\sp\public\sdk\inc\poppack.h -FILE 2131 f:\sp\public\sdk\inc\winnetwk.h -FILE 2132 f:\sp\public\sdk\inc\imm.h -FILE 2133 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2134 f:\sp\public\sdk\inc\windef.h -FILE 2135 f:\sp\public\sdk\inc\pshpack1.h -FILE 2136 f:\sp\public\sdk\inc\winver.h -FILE 2137 f:\sp\public\sdk\inc\windows.h -FILE 2138 f:\sp\public\sdk\inc\winnt.h -FILE 2139 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2140 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2141 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2142 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2143 f:\sp\public\sdk\inc\winreg.h -FILE 2144 f:\sp\public\sdk\inc\winbase.h -FILE 2145 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_report.c -FILE 2146 f:\sp\public\sdk\inc\winerror.h -FILE 2147 f:\sp\public\sdk\inc\pshpack8.h -FILE 2148 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2149 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2150 f:\sp\public\sdk\inc\reason.h -FILE 2151 f:\sp\public\sdk\inc\wincon.h -FILE 2152 f:\sp\public\sdk\inc\ddbanned.h -FILE 2153 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2154 f:\sp\public\sdk\inc\pshpack2.h -FILE 2155 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2156 f:\sp\public\sdk\inc\mcx.h -FILE 2157 f:\sp\public\sdk\inc\winuser.h -FILE 2158 f:\sp\public\sdk\inc\winnls.h -FILE 2159 f:\sp\public\sdk\inc\guiddef.h -FILE 2160 f:\sp\public\sdk\inc\specstrings.h -FILE 2161 f:\sp\public\sdk\inc\basetsd.h -FILE 2162 f:\sp\public\sdk\inc\stralign.h -FILE 2163 f:\sp\public\sdk\inc\tvout.h -FILE 2164 f:\sp\public\sdk\inc\winsvc.h -FILE 2165 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2166 f:\sp\public\sdk\inc\wingdi.h -FILE 2167 f:\sp\public\sdk\inc\pshpack4.h -FILE 2168 f:\sp\public\sdk\inc\poppack.h -FILE 2169 f:\sp\public\sdk\inc\winnetwk.h -FILE 2170 f:\sp\public\sdk\inc\imm.h -FILE 2171 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2172 f:\sp\public\sdk\inc\windef.h -FILE 2173 f:\sp\public\sdk\inc\pshpack1.h -FILE 2174 f:\sp\public\sdk\inc\winver.h -FILE 2175 f:\sp\public\sdk\inc\windows.h -FILE 2176 f:\sp\public\sdk\inc\winnt.h -FILE 2177 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2178 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2179 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2180 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2181 f:\sp\public\sdk\inc\winreg.h -FILE 2182 f:\sp\public\sdk\inc\winbase.h -FILE 2183 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_cookie.c -FILE 2184 f:\sp\public\sdk\inc\winerror.h -FILE 2185 f:\sp\public\sdk\inc\pshpack8.h -FILE 2186 f:\sp\public\sdk\inc\reason.h -FILE 2187 f:\sp\public\sdk\inc\wincon.h -FILE 2188 f:\sp\public\sdk\inc\ddbanned.h -FILE 2189 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2190 f:\sp\public\sdk\inc\pshpack2.h -FILE 2191 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2192 f:\sp\public\sdk\inc\mcx.h -FILE 2193 f:\sp\public\sdk\inc\winuser.h -FILE 2194 f:\sp\public\sdk\inc\winnls.h -FILE 2195 f:\sp\public\sdk\inc\guiddef.h -FILE 2196 f:\sp\public\sdk\inc\specstrings.h -FILE 2197 f:\sp\public\sdk\inc\basetsd.h -FILE 2198 f:\sp\public\sdk\inc\stralign.h -FILE 2199 f:\sp\public\sdk\inc\tvout.h -FILE 2200 f:\sp\public\sdk\inc\winsvc.h -FILE 2201 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2202 f:\sp\public\sdk\inc\wingdi.h -FILE 2203 f:\sp\public\sdk\inc\pshpack4.h -FILE 2204 f:\sp\public\sdk\inc\winerror.h -FILE 2205 f:\sp\public\sdk\inc\pshpack1.h -FILE 2206 f:\sp\public\sdk\inc\pshpack8.h -FILE 2207 f:\sp\public\sdk\inc\winver.h -FILE 2208 f:\sp\public\sdk\inc\pshpack2.h -FILE 2209 f:\sp\public\sdk\inc\winreg.h -FILE 2210 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2211 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2212 f:\sp\public\sdk\inc\guiddef.h -FILE 2213 f:\sp\public\sdk\inc\windows.h -FILE 2214 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2215 f:\sp\public\sdk\inc\specstrings.h -FILE 2216 f:\sp\public\sdk\inc\basetsd.h -FILE 2217 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2218 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2219 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2220 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2221 f:\sp\public\sdk\inc\pshpack4.h -FILE 2222 f:\sp\public\sdk\inc\reason.h -FILE 2223 f:\sp\public\sdk\inc\wincon.h -FILE 2224 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2225 f:\sp\public\sdk\inc\poppack.h -FILE 2226 f:\sp\public\sdk\inc\mcx.h -FILE 2227 f:\sp\public\sdk\inc\winuser.h -FILE 2228 f:\sp\public\sdk\inc\winnls.h -FILE 2229 f:\sp\vctools\crt_bld\self_x86\crt\src\glstatus.c -FILE 2230 f:\sp\public\sdk\inc\stralign.h -FILE 2231 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2232 f:\sp\public\sdk\inc\windef.h -FILE 2233 f:\sp\public\sdk\inc\tvout.h -FILE 2234 f:\sp\public\sdk\inc\winsvc.h -FILE 2235 f:\sp\public\sdk\inc\wingdi.h -FILE 2236 f:\sp\public\sdk\inc\ddbanned.h -FILE 2237 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2238 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2239 f:\sp\public\sdk\inc\winnt.h -FILE 2240 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2241 f:\sp\public\sdk\inc\winnetwk.h -FILE 2242 f:\sp\public\sdk\inc\imm.h -FILE 2243 f:\sp\public\sdk\inc\winbase.h -FILE 2244 f:\sp\public\sdk\inc\pshpack4.h -FILE 2245 f:\sp\public\sdk\inc\poppack.h -FILE 2246 f:\sp\public\sdk\inc\winnt.h -FILE 2247 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2248 f:\sp\public\sdk\inc\winnetwk.h -FILE 2249 f:\sp\public\sdk\inc\imm.h -FILE 2250 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2251 f:\sp\public\sdk\inc\pshpack1.h -FILE 2252 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2253 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2254 f:\sp\public\sdk\inc\winver.h -FILE 2255 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2256 f:\sp\public\sdk\inc\guiddef.h -FILE 2257 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2258 f:\sp\public\sdk\inc\specstrings.h -FILE 2259 f:\sp\public\sdk\inc\basetsd.h -FILE 2260 f:\sp\public\sdk\inc\windows.h -FILE 2261 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2262 f:\sp\public\sdk\inc\winreg.h -FILE 2263 f:\sp\vctools\crt_bld\self_x86\crt\src\getqloc.c -FILE 2264 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2265 f:\sp\public\sdk\inc\winbase.h -FILE 2266 f:\sp\public\sdk\inc\winerror.h -FILE 2267 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2268 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2269 f:\sp\public\sdk\inc\pshpack8.h -FILE 2270 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2271 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2272 f:\sp\public\sdk\inc\reason.h -FILE 2273 f:\sp\public\sdk\inc\ddbanned.h -FILE 2274 f:\sp\public\sdk\inc\wincon.h -FILE 2275 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2276 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2277 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2278 f:\sp\public\sdk\inc\pshpack2.h -FILE 2279 f:\sp\public\sdk\inc\mcx.h -FILE 2280 f:\sp\public\sdk\inc\winuser.h -FILE 2281 f:\sp\public\sdk\inc\winnls.h -FILE 2282 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2283 f:\sp\public\sdk\inc\windef.h -FILE 2284 f:\sp\public\sdk\inc\stralign.h -FILE 2285 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2286 f:\sp\public\sdk\inc\tvout.h -FILE 2287 f:\sp\public\sdk\inc\winsvc.h -FILE 2288 f:\sp\public\sdk\inc\wingdi.h -FILE 2289 f:\sp\public\sdk\inc\reason.h -FILE 2290 f:\sp\public\sdk\inc\wincon.h -FILE 2291 f:\sp\public\sdk\inc\pshpack2.h -FILE 2292 f:\sp\public\sdk\inc\mcx.h -FILE 2293 f:\sp\public\sdk\inc\winuser.h -FILE 2294 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2295 f:\sp\public\sdk\inc\winnls.h -FILE 2296 f:\sp\public\sdk\inc\guiddef.h -FILE 2297 f:\sp\public\sdk\inc\windows.h -FILE 2298 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2299 f:\sp\public\sdk\inc\specstrings.h -FILE 2300 f:\sp\public\sdk\inc\basetsd.h -FILE 2301 f:\sp\public\sdk\inc\stralign.h -FILE 2302 f:\sp\public\sdk\inc\tvout.h -FILE 2303 f:\sp\public\sdk\inc\winsvc.h -FILE 2304 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2305 f:\sp\public\sdk\inc\wingdi.h -FILE 2306 f:\sp\public\sdk\inc\pshpack4.h -FILE 2307 f:\sp\public\sdk\inc\poppack.h -FILE 2308 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2309 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2310 f:\sp\public\sdk\inc\winnetwk.h -FILE 2311 f:\sp\public\sdk\inc\imm.h -FILE 2312 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2313 f:\sp\public\sdk\inc\windef.h -FILE 2314 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2315 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2316 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2317 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2318 f:\sp\vctools\crt_bld\self_x86\crt\src\getenv.c -FILE 2319 f:\sp\public\sdk\inc\pshpack1.h -FILE 2320 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2321 f:\sp\public\sdk\inc\winver.h -FILE 2322 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2323 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2324 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2325 f:\sp\public\sdk\inc\winnt.h -FILE 2326 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2327 f:\sp\public\sdk\inc\ddbanned.h -FILE 2328 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2329 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2330 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2331 f:\sp\public\sdk\inc\winreg.h -FILE 2332 f:\sp\public\sdk\inc\winbase.h -FILE 2333 f:\sp\public\sdk\inc\winerror.h -FILE 2334 f:\sp\public\sdk\inc\pshpack8.h -FILE 2335 f:\sp\public\sdk\inc\poppack.h -FILE 2336 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2337 f:\sp\public\sdk\inc\winnetwk.h -FILE 2338 f:\sp\public\sdk\inc\imm.h -FILE 2339 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2340 f:\sp\public\sdk\inc\windef.h -FILE 2341 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2342 f:\sp\public\sdk\inc\pshpack1.h -FILE 2343 f:\sp\public\sdk\inc\winver.h -FILE 2344 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2345 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2346 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2347 f:\sp\public\sdk\inc\winnt.h -FILE 2348 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2349 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2350 f:\sp\public\sdk\inc\winreg.h -FILE 2351 f:\sp\vctools\crt_bld\self_x86\crt\src\errmode.c -FILE 2352 f:\sp\public\sdk\inc\winbase.h -FILE 2353 f:\sp\public\sdk\inc\winerror.h -FILE 2354 f:\sp\public\sdk\inc\pshpack8.h -FILE 2355 f:\sp\public\sdk\inc\reason.h -FILE 2356 f:\sp\public\sdk\inc\wincon.h -FILE 2357 f:\sp\public\sdk\inc\ddbanned.h -FILE 2358 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2359 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2360 f:\sp\public\sdk\inc\pshpack2.h -FILE 2361 f:\sp\public\sdk\inc\mcx.h -FILE 2362 f:\sp\public\sdk\inc\winuser.h -FILE 2363 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2364 f:\sp\public\sdk\inc\winnls.h -FILE 2365 f:\sp\public\sdk\inc\guiddef.h -FILE 2366 f:\sp\public\sdk\inc\windows.h -FILE 2367 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2368 f:\sp\public\sdk\inc\specstrings.h -FILE 2369 f:\sp\public\sdk\inc\basetsd.h -FILE 2370 f:\sp\public\sdk\inc\stralign.h -FILE 2371 f:\sp\public\sdk\inc\tvout.h -FILE 2372 f:\sp\public\sdk\inc\winsvc.h -FILE 2373 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2374 f:\sp\public\sdk\inc\wingdi.h -FILE 2375 f:\sp\public\sdk\inc\pshpack4.h -FILE 2376 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2377 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2378 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2379 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2380 f:\sp\vctools\crt_bld\self_x86\crt\src\dbghook.c -FILE 2381 f:\sp\public\sdk\inc\ddbanned.h -FILE 2382 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2383 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2384 f:\sp\public\sdk\inc\poppack.h -FILE 2385 f:\sp\public\sdk\inc\winnetwk.h -FILE 2386 f:\sp\public\sdk\inc\imm.h -FILE 2387 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2388 f:\sp\public\sdk\inc\windef.h -FILE 2389 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2390 f:\sp\public\sdk\inc\pshpack1.h -FILE 2391 f:\sp\public\sdk\inc\winver.h -FILE 2392 f:\sp\public\sdk\inc\windows.h -FILE 2393 f:\sp\public\sdk\inc\winnt.h -FILE 2394 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2395 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2396 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2397 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2398 f:\sp\public\sdk\inc\winreg.h -FILE 2399 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2400 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.c -FILE 2401 f:\sp\public\sdk\inc\winbase.h -FILE 2402 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 2403 f:\sp\public\sdk\inc\winerror.h -FILE 2404 f:\sp\public\sdk\inc\pshpack8.h -FILE 2405 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2406 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2407 f:\sp\public\sdk\inc\reason.h -FILE 2408 f:\sp\public\sdk\inc\wincon.h -FILE 2409 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2410 f:\sp\public\sdk\inc\ddbanned.h -FILE 2411 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2412 f:\sp\public\sdk\inc\pshpack2.h -FILE 2413 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2414 f:\sp\public\sdk\inc\mcx.h -FILE 2415 f:\sp\public\sdk\inc\winuser.h -FILE 2416 f:\sp\public\sdk\inc\winnls.h -FILE 2417 f:\sp\public\sdk\inc\guiddef.h -FILE 2418 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2419 f:\sp\public\sdk\inc\specstrings.h -FILE 2420 f:\sp\public\sdk\inc\basetsd.h -FILE 2421 f:\sp\public\sdk\inc\stralign.h -FILE 2422 f:\sp\public\sdk\inc\tvout.h -FILE 2423 f:\sp\public\sdk\inc\winsvc.h -FILE 2424 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2425 f:\sp\public\sdk\inc\wingdi.h -FILE 2426 f:\sp\public\sdk\inc\pshpack4.h -FILE 2427 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2428 f:\sp\public\sdk\inc\mcx.h -FILE 2429 f:\sp\public\sdk\inc\winuser.h -FILE 2430 f:\sp\public\sdk\inc\winnls.h -FILE 2431 f:\sp\public\sdk\inc\stralign.h -FILE 2432 f:\sp\public\sdk\inc\tvout.h -FILE 2433 f:\sp\public\sdk\inc\winsvc.h -FILE 2434 f:\sp\public\sdk\inc\wingdi.h -FILE 2435 f:\sp\public\sdk\inc\pshpack4.h -FILE 2436 f:\sp\public\sdk\inc\winnt.h -FILE 2437 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2438 f:\sp\public\sdk\inc\poppack.h -FILE 2439 f:\sp\public\sdk\inc\winnetwk.h -FILE 2440 f:\sp\public\sdk\inc\imm.h -FILE 2441 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2442 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2443 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2444 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2445 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2446 f:\sp\public\sdk\inc\pshpack1.h -FILE 2447 f:\sp\vctools\crt_bld\self_x86\crt\src\crtmbox.c -FILE 2448 f:\sp\public\sdk\inc\winver.h -FILE 2449 f:\sp\public\sdk\inc\guiddef.h -FILE 2450 f:\sp\public\sdk\inc\windows.h -FILE 2451 f:\sp\public\sdk\inc\specstrings.h -FILE 2452 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2453 f:\sp\public\sdk\inc\basetsd.h -FILE 2454 f:\sp\public\sdk\inc\winreg.h -FILE 2455 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2456 f:\sp\public\sdk\inc\winbase.h -FILE 2457 f:\sp\public\sdk\inc\ddbanned.h -FILE 2458 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2459 f:\sp\public\sdk\inc\winerror.h -FILE 2460 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2461 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2462 f:\sp\public\sdk\inc\pshpack8.h -FILE 2463 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2464 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2465 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2466 f:\sp\public\sdk\inc\reason.h -FILE 2467 f:\sp\public\sdk\inc\wincon.h -FILE 2468 f:\sp\public\sdk\inc\pshpack2.h -FILE 2469 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2470 f:\sp\public\sdk\inc\windef.h -FILE 2471 f:\sp\public\sdk\inc\poppack.h -FILE 2472 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 2473 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2474 f:\sp\public\sdk\inc\winnetwk.h -FILE 2475 f:\sp\public\sdk\inc\imm.h -FILE 2476 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2477 f:\sp\public\sdk\inc\windef.h -FILE 2478 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2479 f:\sp\public\sdk\inc\pshpack1.h -FILE 2480 f:\sp\public\sdk\inc\winver.h -FILE 2481 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2482 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2483 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2484 f:\sp\public\sdk\inc\winnt.h -FILE 2485 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2486 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2487 f:\sp\public\sdk\inc\winreg.h -FILE 2488 f:\sp\vctools\crt_bld\self_x86\crt\src\cmiscdat.c -FILE 2489 f:\sp\public\sdk\inc\winbase.h -FILE 2490 f:\sp\public\sdk\inc\winerror.h -FILE 2491 f:\sp\public\sdk\inc\pshpack8.h -FILE 2492 f:\sp\public\sdk\inc\reason.h -FILE 2493 f:\sp\public\sdk\inc\wincon.h -FILE 2494 f:\sp\public\sdk\inc\ddbanned.h -FILE 2495 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2496 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2497 f:\sp\public\sdk\inc\pshpack2.h -FILE 2498 f:\sp\public\sdk\inc\mcx.h -FILE 2499 f:\sp\public\sdk\inc\winuser.h -FILE 2500 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2501 f:\sp\public\sdk\inc\winnls.h -FILE 2502 f:\sp\public\sdk\inc\guiddef.h -FILE 2503 f:\sp\public\sdk\inc\windows.h -FILE 2504 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2505 f:\sp\public\sdk\inc\specstrings.h -FILE 2506 f:\sp\public\sdk\inc\basetsd.h -FILE 2507 f:\sp\public\sdk\inc\stralign.h -FILE 2508 f:\sp\public\sdk\inc\tvout.h -FILE 2509 f:\sp\public\sdk\inc\winsvc.h -FILE 2510 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2511 f:\sp\public\sdk\inc\wingdi.h -FILE 2512 f:\sp\public\sdk\inc\pshpack4.h -FILE 2513 f:\sp\public\sdk\inc\pshpack4.h -FILE 2514 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2515 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 2516 f:\sp\public\sdk\inc\poppack.h -FILE 2517 f:\sp\public\sdk\inc\winnetwk.h -FILE 2518 f:\sp\public\sdk\inc\imm.h -FILE 2519 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2520 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2521 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2522 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2523 f:\sp\public\sdk\inc\windef.h -FILE 2524 f:\sp\public\sdk\inc\pshpack1.h -FILE 2525 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2526 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2527 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2528 f:\sp\public\sdk\inc\winver.h -FILE 2529 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2530 f:\sp\public\sdk\inc\winnt.h -FILE 2531 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2532 f:\sp\public\sdk\inc\winreg.h -FILE 2533 f:\sp\vctools\crt_bld\self_x86\crt\src\abort.c -FILE 2534 f:\sp\public\sdk\inc\winbase.h -FILE 2535 f:\sp\public\sdk\inc\winerror.h -FILE 2536 f:\sp\public\sdk\inc\pshpack8.h -FILE 2537 f:\sp\public\sdk\inc\reason.h -FILE 2538 f:\sp\public\sdk\inc\ddbanned.h -FILE 2539 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2540 f:\sp\public\sdk\inc\wincon.h -FILE 2541 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2542 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2543 f:\sp\public\sdk\inc\pshpack2.h -FILE 2544 f:\sp\public\sdk\inc\mcx.h -FILE 2545 f:\sp\public\sdk\inc\winuser.h -FILE 2546 f:\sp\public\sdk\inc\winnls.h -FILE 2547 f:\sp\public\sdk\inc\guiddef.h -FILE 2548 f:\sp\public\sdk\inc\stralign.h -FILE 2549 f:\sp\public\sdk\inc\specstrings.h -FILE 2550 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2551 f:\sp\public\sdk\inc\basetsd.h -FILE 2552 f:\sp\public\sdk\inc\windows.h -FILE 2553 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2554 f:\sp\public\sdk\inc\tvout.h -FILE 2555 f:\sp\public\sdk\inc\winsvc.h -FILE 2556 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2557 f:\sp\public\sdk\inc\wingdi.h -FILE 2558 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2559 f:\sp\public\sdk\inc\wincon.h -FILE 2560 f:\sp\public\sdk\inc\imm.h -FILE 2561 f:\sp\public\sdk\inc\winbase.h -FILE 2562 f:\sp\public\sdk\inc\wingdi.h -FILE 2563 f:\sp\public\sdk\inc\winver.h -FILE 2564 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2565 f:\sp\public\sdk\inc\windows.h -FILE 2566 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2567 f:\sp\public\sdk\inc\pshpack2.h -FILE 2568 f:\sp\public\sdk\inc\reason.h -FILE 2569 f:\sp\vctools\crt_bld\self_x86\crt\src\a_str.c -FILE 2570 f:\sp\public\sdk\inc\specstrings.h -FILE 2571 f:\sp\public\sdk\inc\basetsd.h -FILE 2572 f:\sp\public\sdk\inc\pshpack4.h -FILE 2573 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2574 f:\sp\public\sdk\inc\winnetwk.h -FILE 2575 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2576 f:\sp\public\sdk\inc\stralign.h -FILE 2577 f:\sp\public\sdk\inc\poppack.h -FILE 2578 f:\sp\public\sdk\inc\winsvc.h -FILE 2579 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2580 f:\sp\public\sdk\inc\windef.h -FILE 2581 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2582 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2583 f:\sp\public\sdk\inc\winuser.h -FILE 2584 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2585 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2586 f:\sp\public\sdk\inc\mcx.h -FILE 2587 f:\sp\public\sdk\inc\pshpack8.h -FILE 2588 f:\sp\public\sdk\inc\guiddef.h -FILE 2589 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2590 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2591 f:\sp\public\sdk\inc\winnt.h -FILE 2592 f:\sp\public\sdk\inc\winnls.h -FILE 2593 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2594 f:\sp\public\sdk\inc\pshpack1.h -FILE 2595 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2596 f:\sp\public\sdk\inc\winerror.h -FILE 2597 f:\sp\public\sdk\inc\winreg.h -FILE 2598 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2599 f:\sp\public\sdk\inc\ddbanned.h -FILE 2600 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2601 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2602 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2603 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2604 f:\sp\public\sdk\inc\tvout.h -FILE 2605 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2606 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2607 f:\sp\public\sdk\inc\wincon.h -FILE 2608 f:\sp\public\sdk\inc\imm.h -FILE 2609 f:\sp\public\sdk\inc\winbase.h -FILE 2610 f:\sp\public\sdk\inc\wingdi.h -FILE 2611 f:\sp\public\sdk\inc\winver.h -FILE 2612 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2613 f:\sp\public\sdk\inc\windows.h -FILE 2614 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2615 f:\sp\public\sdk\inc\pshpack2.h -FILE 2616 f:\sp\public\sdk\inc\reason.h -FILE 2617 f:\sp\vctools\crt_bld\self_x86\crt\src\a_map.c -FILE 2618 f:\sp\public\sdk\inc\specstrings.h -FILE 2619 f:\sp\public\sdk\inc\basetsd.h -FILE 2620 f:\sp\public\sdk\inc\pshpack4.h -FILE 2621 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2622 f:\sp\public\sdk\inc\winnetwk.h -FILE 2623 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2624 f:\sp\public\sdk\inc\stralign.h -FILE 2625 f:\sp\public\sdk\inc\poppack.h -FILE 2626 f:\sp\public\sdk\inc\winsvc.h -FILE 2627 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2628 f:\sp\public\sdk\inc\windef.h -FILE 2629 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2630 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2631 f:\sp\public\sdk\inc\winuser.h -FILE 2632 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2633 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2634 f:\sp\public\sdk\inc\mcx.h -FILE 2635 f:\sp\public\sdk\inc\pshpack8.h -FILE 2636 f:\sp\public\sdk\inc\guiddef.h -FILE 2637 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2638 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2639 f:\sp\public\sdk\inc\winnt.h -FILE 2640 f:\sp\public\sdk\inc\winnls.h -FILE 2641 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2642 f:\sp\public\sdk\inc\pshpack1.h -FILE 2643 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2644 f:\sp\public\sdk\inc\winerror.h -FILE 2645 f:\sp\public\sdk\inc\winreg.h -FILE 2646 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2647 f:\sp\public\sdk\inc\ddbanned.h -FILE 2648 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2649 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2650 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2651 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2652 f:\sp\public\sdk\inc\tvout.h -FILE 2653 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2654 f:\sp\public\sdk\inc\wincon.h -FILE 2655 f:\sp\public\sdk\inc\imm.h -FILE 2656 f:\sp\public\sdk\inc\winbase.h -FILE 2657 f:\sp\public\sdk\inc\wingdi.h -FILE 2658 f:\sp\public\sdk\inc\winver.h -FILE 2659 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2660 f:\sp\public\sdk\inc\windows.h -FILE 2661 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2662 f:\sp\public\sdk\inc\pshpack2.h -FILE 2663 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2664 f:\sp\public\sdk\inc\reason.h -FILE 2665 f:\sp\vctools\crt_bld\self_x86\crt\src\a_loc.c -FILE 2666 f:\sp\public\sdk\inc\specstrings.h -FILE 2667 f:\sp\public\sdk\inc\basetsd.h -FILE 2668 f:\sp\public\sdk\inc\pshpack4.h -FILE 2669 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2670 f:\sp\public\sdk\inc\winnetwk.h -FILE 2671 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2672 f:\sp\public\sdk\inc\stralign.h -FILE 2673 f:\sp\public\sdk\inc\poppack.h -FILE 2674 f:\sp\public\sdk\inc\winsvc.h -FILE 2675 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2676 f:\sp\public\sdk\inc\windef.h -FILE 2677 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2678 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2679 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2680 f:\sp\public\sdk\inc\winuser.h -FILE 2681 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2682 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2683 f:\sp\public\sdk\inc\mcx.h -FILE 2684 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2685 f:\sp\public\sdk\inc\pshpack8.h -FILE 2686 f:\sp\public\sdk\inc\guiddef.h -FILE 2687 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2688 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2689 f:\sp\public\sdk\inc\winnt.h -FILE 2690 f:\sp\public\sdk\inc\winnls.h -FILE 2691 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2692 f:\sp\public\sdk\inc\pshpack1.h -FILE 2693 f:\sp\public\sdk\inc\winerror.h -FILE 2694 f:\sp\public\sdk\inc\winreg.h -FILE 2695 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2696 f:\sp\public\sdk\inc\ddbanned.h -FILE 2697 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2698 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2699 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2700 f:\sp\public\sdk\inc\tvout.h -FILE 2701 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2702 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2703 f:\sp\public\sdk\inc\poppack.h -FILE 2704 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2705 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2706 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2707 f:\sp\public\sdk\inc\winnetwk.h -FILE 2708 f:\sp\public\sdk\inc\imm.h -FILE 2709 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2710 f:\sp\public\sdk\inc\windef.h -FILE 2711 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2712 f:\sp\public\sdk\inc\pshpack1.h -FILE 2713 f:\sp\public\sdk\inc\winver.h -FILE 2714 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2715 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2716 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2717 f:\sp\public\sdk\inc\winnt.h -FILE 2718 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2719 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2720 f:\sp\public\sdk\inc\winreg.h -FILE 2721 f:\sp\vctools\crt_bld\self_x86\crt\src\a_env.c -FILE 2722 f:\sp\public\sdk\inc\winbase.h -FILE 2723 f:\sp\public\sdk\inc\winerror.h -FILE 2724 f:\sp\public\sdk\inc\pshpack8.h -FILE 2725 f:\sp\public\sdk\inc\reason.h -FILE 2726 f:\sp\public\sdk\inc\wincon.h -FILE 2727 f:\sp\public\sdk\inc\ddbanned.h -FILE 2728 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2729 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2730 f:\sp\public\sdk\inc\pshpack2.h -FILE 2731 f:\sp\public\sdk\inc\mcx.h -FILE 2732 f:\sp\public\sdk\inc\winuser.h -FILE 2733 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2734 f:\sp\public\sdk\inc\winnls.h -FILE 2735 f:\sp\public\sdk\inc\guiddef.h -FILE 2736 f:\sp\public\sdk\inc\windows.h -FILE 2737 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2738 f:\sp\public\sdk\inc\specstrings.h -FILE 2739 f:\sp\public\sdk\inc\basetsd.h -FILE 2740 f:\sp\public\sdk\inc\stralign.h -FILE 2741 f:\sp\public\sdk\inc\tvout.h -FILE 2742 f:\sp\public\sdk\inc\winsvc.h -FILE 2743 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2744 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2745 f:\sp\public\sdk\inc\wingdi.h -FILE 2746 f:\sp\public\sdk\inc\pshpack4.h -FILE 2747 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2748 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2749 f:\sp\public\sdk\inc\wincon.h -FILE 2750 f:\sp\public\sdk\inc\imm.h -FILE 2751 f:\sp\public\sdk\inc\winbase.h -FILE 2752 f:\sp\public\sdk\inc\wingdi.h -FILE 2753 f:\sp\public\sdk\inc\winver.h -FILE 2754 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2755 f:\sp\public\sdk\inc\windows.h -FILE 2756 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2757 f:\sp\public\sdk\inc\pshpack2.h -FILE 2758 f:\sp\public\sdk\inc\reason.h -FILE 2759 f:\sp\vctools\crt_bld\self_x86\crt\src\a_cmp.c -FILE 2760 f:\sp\public\sdk\inc\specstrings.h -FILE 2761 f:\sp\public\sdk\inc\basetsd.h -FILE 2762 f:\sp\public\sdk\inc\pshpack4.h -FILE 2763 f:\sp\public\sdk\inc\winnetwk.h -FILE 2764 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2765 f:\sp\public\sdk\inc\stralign.h -FILE 2766 f:\sp\public\sdk\inc\poppack.h -FILE 2767 f:\sp\public\sdk\inc\winsvc.h -FILE 2768 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2769 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2770 f:\sp\public\sdk\inc\windef.h -FILE 2771 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2772 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2773 f:\sp\public\sdk\inc\winuser.h -FILE 2774 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2775 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2776 f:\sp\public\sdk\inc\mcx.h -FILE 2777 f:\sp\public\sdk\inc\pshpack8.h -FILE 2778 f:\sp\public\sdk\inc\guiddef.h -FILE 2779 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2780 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2781 f:\sp\public\sdk\inc\winnt.h -FILE 2782 f:\sp\public\sdk\inc\winnls.h -FILE 2783 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2784 f:\sp\public\sdk\inc\pshpack1.h -FILE 2785 f:\sp\public\sdk\inc\winerror.h -FILE 2786 f:\sp\public\sdk\inc\winreg.h -FILE 2787 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2788 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2789 f:\sp\public\sdk\inc\ddbanned.h -FILE 2790 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2791 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2792 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2793 f:\sp\public\sdk\inc\tvout.h -FILE 2794 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2795 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\sehprolg4.asm -FILE 2796 f:\sp\public\sdk\inc\poppack.h -FILE 2797 f:\sp\public\sdk\inc\winnetwk.h -FILE 2798 f:\sp\public\sdk\inc\imm.h -FILE 2799 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2800 f:\sp\public\sdk\inc\windef.h -FILE 2801 f:\sp\public\sdk\inc\pshpack1.h -FILE 2802 f:\sp\public\sdk\inc\winver.h -FILE 2803 f:\sp\public\sdk\inc\windows.h -FILE 2804 f:\sp\public\sdk\inc\winnt.h -FILE 2805 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2806 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2807 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2808 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2809 f:\sp\public\sdk\inc\winreg.h -FILE 2810 f:\sp\public\sdk\inc\winbase.h -FILE 2811 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\secchk.c -FILE 2812 f:\sp\public\sdk\inc\winerror.h -FILE 2813 f:\sp\public\sdk\inc\pshpack8.h -FILE 2814 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 2815 f:\sp\public\sdk\inc\reason.h -FILE 2816 f:\sp\public\sdk\inc\wincon.h -FILE 2817 f:\sp\public\sdk\inc\ddbanned.h -FILE 2818 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2819 f:\sp\public\sdk\inc\pshpack2.h -FILE 2820 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2821 f:\sp\public\sdk\inc\mcx.h -FILE 2822 f:\sp\public\sdk\inc\winuser.h -FILE 2823 f:\sp\public\sdk\inc\winnls.h -FILE 2824 f:\sp\public\sdk\inc\guiddef.h -FILE 2825 f:\sp\public\sdk\inc\specstrings.h -FILE 2826 f:\sp\public\sdk\inc\basetsd.h -FILE 2827 f:\sp\public\sdk\inc\stralign.h -FILE 2828 f:\sp\public\sdk\inc\tvout.h -FILE 2829 f:\sp\public\sdk\inc\winsvc.h -FILE 2830 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2831 f:\sp\public\sdk\inc\wingdi.h -FILE 2832 f:\sp\public\sdk\inc\pshpack4.h -FILE 2833 f:\sp\public\sdk\inc\poppack.h -FILE 2834 f:\sp\public\sdk\inc\winnetwk.h -FILE 2835 f:\sp\public\sdk\inc\imm.h -FILE 2836 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2837 f:\sp\public\sdk\inc\windef.h -FILE 2838 f:\sp\public\sdk\inc\pshpack1.h -FILE 2839 f:\sp\public\sdk\inc\winver.h -FILE 2840 f:\sp\public\sdk\inc\windows.h -FILE 2841 f:\sp\public\sdk\inc\winnt.h -FILE 2842 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2843 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2844 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2845 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2846 f:\sp\public\sdk\inc\winreg.h -FILE 2847 f:\sp\public\sdk\inc\winbase.h -FILE 2848 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\loadcfg.c -FILE 2849 f:\sp\public\sdk\inc\winerror.h -FILE 2850 f:\sp\public\sdk\inc\pshpack8.h -FILE 2851 f:\sp\public\sdk\inc\reason.h -FILE 2852 f:\sp\public\sdk\inc\wincon.h -FILE 2853 f:\sp\public\sdk\inc\ddbanned.h -FILE 2854 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2855 f:\sp\public\sdk\inc\pshpack2.h -FILE 2856 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2857 f:\sp\public\sdk\inc\mcx.h -FILE 2858 f:\sp\public\sdk\inc\winuser.h -FILE 2859 f:\sp\public\sdk\inc\winnls.h -FILE 2860 f:\sp\public\sdk\inc\guiddef.h -FILE 2861 f:\sp\public\sdk\inc\specstrings.h -FILE 2862 f:\sp\public\sdk\inc\basetsd.h -FILE 2863 f:\sp\public\sdk\inc\stralign.h -FILE 2864 f:\sp\public\sdk\inc\tvout.h -FILE 2865 f:\sp\public\sdk\inc\winsvc.h -FILE 2866 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2867 f:\sp\public\sdk\inc\wingdi.h -FILE 2868 f:\sp\public\sdk\inc\pshpack4.h -FILE 2869 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup4.asm -FILE 2870 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 2871 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup.asm -FILE 2872 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\pversion.inc -FILE 2873 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\cmacros.inc -FILE 2874 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 2875 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\nlgsupp.asm -FILE 2876 f:\sp\public\sdk\inc\ntldr.h -FILE 2877 f:\sp\public\sdk\inc\ntpoapi.h -FILE 2878 f:\sp\public\sdk\inc\ntexapi.h -FILE 2879 f:\sp\public\sdk\inc\pshpack1.h -FILE 2880 f:\sp\public\sdk\inc\pshpack8.h -FILE 2881 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 2882 f:\sp\public\sdk\inc\ntdef.h -FILE 2883 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 2884 f:\sp\public\sdk\inc\mce.h -FILE 2885 f:\sp\public\sdk\inc\poppack.h -FILE 2886 f:\sp\public\sdk\inc\ntimage.h -FILE 2887 f:\sp\public\sdk\inc\pshpack2.h -FILE 2888 f:\sp\public\sdk\inc\ntpsapi.h -FILE 2889 f:\sp\public\sdk\inc\nti386.h -FILE 2890 f:\sp\public\sdk\inc\nt.h -FILE 2891 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 2892 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 2893 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 2894 f:\sp\public\sdk\inc\specstrings.h -FILE 2895 f:\sp\public\sdk\inc\basetsd.h -FILE 2896 f:\sp\public\sdk\inc\ntxcapi.h -FILE 2897 f:\sp\public\sdk\inc\guiddef.h -FILE 2898 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\misc\i386\chandler4.c -FILE 2899 f:\sp\public\sdk\inc\ntstatus.h -FILE 2900 f:\sp\public\sdk\inc\ntkeapi.h -FILE 2901 f:\sp\public\sdk\inc\ntconfig.h -FILE 2902 f:\sp\public\sdk\inc\ntregapi.h -FILE 2903 f:\sp\public\sdk\inc\ntmmapi.h -FILE 2904 f:\sp\public\sdk\inc\ntobapi.h -FILE 2905 f:\sp\public\sdk\inc\nxi386.h -FILE 2906 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\process.h -FILE 2907 f:\sp\public\sdk\inc\ntioapi.h -FILE 2908 f:\sp\public\sdk\inc\devioctl.h -FILE 2909 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 2910 f:\sp\public\sdk\inc\ntseapi.h -FILE 2911 f:\sp\public\sdk\inc\ddbanned.h -FILE 2912 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 2913 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 2914 f:\sp\public\sdk\inc\ntnls.h -FILE 2915 f:\sp\public\sdk\inc\ntelfapi.h -FILE 2916 f:\sp\public\sdk\inc\pshpack4.h -FILE 2917 f:\sp\public\sdk\inc\ntiolog.h -FILE 2918 f:\sp\public\sdk\inc\ntlpcapi.h -FILE 2919 f:\sp\public\sdk\inc\ntpnpapi.h -FILE 2920 f:\sp\public\sdk\inc\cfg.h -FILE 2921 f:\sp\public\sdk\inc\pebteb.h -FILE 2922 f:\sp\public\sdk\inc\wincon.h -FILE 2923 f:\sp\public\sdk\inc\imm.h -FILE 2924 f:\sp\public\sdk\inc\winbase.h -FILE 2925 f:\sp\public\sdk\inc\wingdi.h -FILE 2926 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2927 f:\sp\public\sdk\inc\winver.h -FILE 2928 f:\sp\public\sdk\inc\pshpack2.h -FILE 2929 f:\sp\public\sdk\inc\reason.h -FILE 2930 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 2931 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2932 f:\sp\vctools\crt_bld\self_x86\crt\src\mbsnbico.c -FILE 2933 f:\sp\public\sdk\inc\specstrings.h -FILE 2934 f:\sp\public\sdk\inc\basetsd.h -FILE 2935 f:\sp\public\sdk\inc\pshpack4.h -FILE 2936 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2937 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2938 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2939 f:\sp\public\sdk\inc\winnetwk.h -FILE 2940 f:\sp\public\sdk\inc\stralign.h -FILE 2941 f:\sp\public\sdk\inc\poppack.h -FILE 2942 f:\sp\public\sdk\inc\winsvc.h -FILE 2943 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2944 f:\sp\public\sdk\inc\windef.h -FILE 2945 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2946 f:\sp\public\sdk\inc\winuser.h -FILE 2947 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2948 f:\sp\public\sdk\inc\windows.h -FILE 2949 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2950 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2951 f:\sp\public\sdk\inc\mcx.h -FILE 2952 f:\sp\public\sdk\inc\pshpack8.h -FILE 2953 f:\sp\public\sdk\inc\guiddef.h -FILE 2954 f:\sp\public\sdk\inc\winnt.h -FILE 2955 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2956 f:\sp\public\sdk\inc\winnls.h -FILE 2957 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2958 f:\sp\public\sdk\inc\pshpack1.h -FILE 2959 f:\sp\public\sdk\inc\winerror.h -FILE 2960 f:\sp\public\sdk\inc\winreg.h -FILE 2961 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2962 f:\sp\public\sdk\inc\ddbanned.h -FILE 2963 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2964 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2965 f:\sp\public\sdk\inc\tvout.h -FILE 2966 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2967 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2968 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2969 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2970 f:\sp\public\sdk\inc\wincon.h -FILE 2971 f:\sp\public\sdk\inc\imm.h -FILE 2972 f:\sp\public\sdk\inc\winbase.h -FILE 2973 f:\sp\public\sdk\inc\wingdi.h -FILE 2974 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2975 f:\sp\public\sdk\inc\winver.h -FILE 2976 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2977 f:\sp\public\sdk\inc\windows.h -FILE 2978 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2979 f:\sp\public\sdk\inc\pshpack2.h -FILE 2980 f:\sp\public\sdk\inc\reason.h -FILE 2981 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2982 f:\sp\vctools\crt_bld\self_x86\crt\src\mbschr.c -FILE 2983 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2984 f:\sp\public\sdk\inc\specstrings.h -FILE 2985 f:\sp\public\sdk\inc\basetsd.h -FILE 2986 f:\sp\public\sdk\inc\pshpack4.h -FILE 2987 f:\sp\public\sdk\inc\winnetwk.h -FILE 2988 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2989 f:\sp\public\sdk\inc\stralign.h -FILE 2990 f:\sp\public\sdk\inc\poppack.h -FILE 2991 f:\sp\public\sdk\inc\winsvc.h -FILE 2992 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2993 f:\sp\public\sdk\inc\windef.h -FILE 2994 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2995 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2996 f:\sp\public\sdk\inc\winuser.h -FILE 2997 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2998 f:\sp\public\sdk\inc\mcx.h -FILE 2999 f:\sp\public\sdk\inc\pshpack8.h -FILE 3000 f:\sp\public\sdk\inc\guiddef.h -FILE 3001 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3002 f:\sp\public\sdk\inc\winnt.h -FILE 3003 f:\sp\public\sdk\inc\winnls.h -FILE 3004 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3005 f:\sp\public\sdk\inc\pshpack1.h -FILE 3006 f:\sp\public\sdk\inc\winerror.h -FILE 3007 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3008 f:\sp\public\sdk\inc\winreg.h -FILE 3009 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3010 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3011 f:\sp\public\sdk\inc\ddbanned.h -FILE 3012 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3013 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3014 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3015 f:\sp\public\sdk\inc\tvout.h -FILE 3016 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3017 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3018 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 3019 f:\sp\public\sdk\inc\wincon.h -FILE 3020 f:\sp\public\sdk\inc\imm.h -FILE 3021 f:\sp\public\sdk\inc\winbase.h -FILE 3022 f:\sp\public\sdk\inc\wingdi.h -FILE 3023 f:\sp\public\sdk\inc\winver.h -FILE 3024 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3025 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3026 f:\sp\public\sdk\inc\pshpack2.h -FILE 3027 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 3028 f:\sp\public\sdk\inc\reason.h -FILE 3029 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c -FILE 3030 f:\sp\public\sdk\inc\specstrings.h -FILE 3031 f:\sp\public\sdk\inc\basetsd.h -FILE 3032 f:\sp\public\sdk\inc\pshpack4.h -FILE 3033 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3034 f:\sp\public\sdk\inc\winnetwk.h -FILE 3035 f:\sp\public\sdk\inc\stralign.h -FILE 3036 f:\sp\public\sdk\inc\poppack.h -FILE 3037 f:\sp\public\sdk\inc\winsvc.h -FILE 3038 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3039 f:\sp\public\sdk\inc\windef.h -FILE 3040 f:\sp\public\sdk\inc\winuser.h -FILE 3041 f:\sp\public\sdk\inc\windows.h -FILE 3042 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3043 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3044 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3045 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3046 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3047 f:\sp\public\sdk\inc\mcx.h -FILE 3048 f:\sp\public\sdk\inc\pshpack8.h -FILE 3049 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3050 f:\sp\public\sdk\inc\guiddef.h -FILE 3051 f:\sp\public\sdk\inc\winnt.h -FILE 3052 f:\sp\public\sdk\inc\winnls.h -FILE 3053 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3054 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3055 f:\sp\public\sdk\inc\pshpack1.h -FILE 3056 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3057 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3058 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3059 f:\sp\public\sdk\inc\winerror.h -FILE 3060 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 3061 f:\sp\public\sdk\inc\winreg.h -FILE 3062 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3063 f:\sp\public\sdk\inc\ddbanned.h -FILE 3064 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3065 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3066 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 3067 f:\sp\public\sdk\inc\tvout.h -FILE 3068 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3069 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3070 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3071 f:\sp\public\sdk\inc\wincon.h -FILE 3072 f:\sp\public\sdk\inc\imm.h -FILE 3073 f:\sp\public\sdk\inc\winbase.h -FILE 3074 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3075 f:\sp\public\sdk\inc\wingdi.h -FILE 3076 f:\sp\public\sdk\inc\windef.h -FILE 3077 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 3078 f:\sp\public\sdk\inc\winver.h -FILE 3079 f:\sp\public\sdk\inc\pshpack2.h -FILE 3080 f:\sp\public\sdk\inc\reason.h -FILE 3081 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3082 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3083 f:\sp\vctools\crt_bld\self_x86\crt\src\ismbbyte.c -FILE 3084 f:\sp\public\sdk\inc\winnt.h -FILE 3085 f:\sp\public\sdk\inc\specstrings.h -FILE 3086 f:\sp\public\sdk\inc\basetsd.h -FILE 3087 f:\sp\public\sdk\inc\pshpack4.h -FILE 3088 f:\sp\public\sdk\inc\winnetwk.h -FILE 3089 f:\sp\public\sdk\inc\stralign.h -FILE 3090 f:\sp\public\sdk\inc\poppack.h -FILE 3091 f:\sp\public\sdk\inc\winsvc.h -FILE 3092 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3093 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3094 f:\sp\public\sdk\inc\winuser.h -FILE 3095 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3096 f:\sp\public\sdk\inc\mcx.h -FILE 3097 f:\sp\public\sdk\inc\pshpack8.h -FILE 3098 f:\sp\public\sdk\inc\guiddef.h -FILE 3099 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3100 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3101 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3102 f:\sp\public\sdk\inc\windows.h -FILE 3103 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3104 f:\sp\public\sdk\inc\winnls.h -FILE 3105 f:\sp\public\sdk\inc\pshpack1.h -FILE 3106 f:\sp\public\sdk\inc\winerror.h -FILE 3107 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3108 f:\sp\public\sdk\inc\winreg.h -FILE 3109 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3110 f:\sp\public\sdk\inc\ddbanned.h -FILE 3111 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3112 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3113 f:\sp\public\sdk\inc\tvout.h -FILE 3114 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3115 f:\sp\public\sdk\inc\poppack.h -FILE 3116 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3117 f:\sp\public\sdk\inc\winnetwk.h -FILE 3118 f:\sp\public\sdk\inc\imm.h -FILE 3119 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3120 f:\sp\public\sdk\inc\windef.h -FILE 3121 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3122 f:\sp\public\sdk\inc\pshpack1.h -FILE 3123 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 3124 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3125 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3126 f:\sp\public\sdk\inc\winver.h -FILE 3127 f:\sp\public\sdk\inc\windows.h -FILE 3128 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3129 f:\sp\public\sdk\inc\winnt.h -FILE 3130 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3131 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3132 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3133 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3134 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3135 f:\sp\public\sdk\inc\winreg.h -FILE 3136 f:\sp\public\sdk\inc\winbase.h -FILE 3137 f:\sp\vctools\crt_bld\self_x86\crt\src\ioinit.c -FILE 3138 f:\sp\public\sdk\inc\winerror.h -FILE 3139 f:\sp\public\sdk\inc\pshpack8.h -FILE 3140 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3141 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3142 f:\sp\public\sdk\inc\reason.h -FILE 3143 f:\sp\public\sdk\inc\wincon.h -FILE 3144 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3145 f:\sp\public\sdk\inc\ddbanned.h -FILE 3146 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3147 f:\sp\public\sdk\inc\pshpack2.h -FILE 3148 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3149 f:\sp\public\sdk\inc\mcx.h -FILE 3150 f:\sp\public\sdk\inc\winuser.h -FILE 3151 f:\sp\public\sdk\inc\winnls.h -FILE 3152 f:\sp\public\sdk\inc\guiddef.h -FILE 3153 f:\sp\public\sdk\inc\specstrings.h -FILE 3154 f:\sp\public\sdk\inc\basetsd.h -FILE 3155 f:\sp\public\sdk\inc\stralign.h -FILE 3156 f:\sp\public\sdk\inc\tvout.h -FILE 3157 f:\sp\public\sdk\inc\winsvc.h -FILE 3158 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3159 f:\sp\public\sdk\inc\wingdi.h -FILE 3160 f:\sp\public\sdk\inc\pshpack4.h -FILE 3161 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\ulldvrm.asm -FILE 3162 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 3163 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 3164 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\llmul.asm -FILE 3165 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 3166 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 3167 f:\sp\public\sdk\inc\poppack.h -FILE 3168 f:\sp\public\sdk\inc\winnetwk.h -FILE 3169 f:\sp\public\sdk\inc\imm.h -FILE 3170 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3171 f:\sp\public\sdk\inc\windef.h -FILE 3172 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3173 f:\sp\public\sdk\inc\pshpack1.h -FILE 3174 f:\sp\public\sdk\inc\winver.h -FILE 3175 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3176 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3177 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3178 f:\sp\public\sdk\inc\winnt.h -FILE 3179 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3180 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3181 f:\sp\public\sdk\inc\winreg.h -FILE 3182 f:\sp\vctools\crt_bld\self_x86\crt\src\_newmode.c -FILE 3183 f:\sp\public\sdk\inc\winbase.h -FILE 3184 f:\sp\public\sdk\inc\winerror.h -FILE 3185 f:\sp\public\sdk\inc\pshpack8.h -FILE 3186 f:\sp\public\sdk\inc\reason.h -FILE 3187 f:\sp\public\sdk\inc\wincon.h -FILE 3188 f:\sp\public\sdk\inc\ddbanned.h -FILE 3189 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3190 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3191 f:\sp\public\sdk\inc\pshpack2.h -FILE 3192 f:\sp\public\sdk\inc\mcx.h -FILE 3193 f:\sp\public\sdk\inc\winuser.h -FILE 3194 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3195 f:\sp\public\sdk\inc\winnls.h -FILE 3196 f:\sp\public\sdk\inc\guiddef.h -FILE 3197 f:\sp\public\sdk\inc\windows.h -FILE 3198 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3199 f:\sp\public\sdk\inc\specstrings.h -FILE 3200 f:\sp\public\sdk\inc\basetsd.h -FILE 3201 f:\sp\public\sdk\inc\stralign.h -FILE 3202 f:\sp\public\sdk\inc\tvout.h -FILE 3203 f:\sp\public\sdk\inc\winsvc.h -FILE 3204 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3205 f:\sp\public\sdk\inc\wingdi.h -FILE 3206 f:\sp\public\sdk\inc\pshpack4.h -FILE 3207 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 3208 f:\sp\public\sdk\inc\winerror.h -FILE 3209 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3210 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3211 f:\sp\public\sdk\inc\winreg.h -FILE 3212 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3213 f:\sp\public\sdk\inc\tvout.h -FILE 3214 f:\sp\vctools\crt_bld\self_x86\crt\src\delete.cpp -FILE 3215 f:\sp\public\sdk\inc\wincon.h -FILE 3216 f:\sp\public\sdk\inc\imm.h -FILE 3217 f:\sp\public\sdk\inc\winbase.h -FILE 3218 f:\sp\public\sdk\inc\wingdi.h -FILE 3219 f:\sp\public\sdk\inc\winver.h -FILE 3220 f:\sp\public\sdk\inc\windows.h -FILE 3221 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3222 f:\sp\public\sdk\inc\pshpack2.h -FILE 3223 f:\sp\public\sdk\inc\reason.h -FILE 3224 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3225 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3226 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3227 f:\sp\public\sdk\inc\specstrings.h -FILE 3228 f:\sp\public\sdk\inc\basetsd.h -FILE 3229 f:\sp\public\sdk\inc\pshpack4.h -FILE 3230 f:\sp\public\sdk\inc\winnetwk.h -FILE 3231 f:\sp\public\sdk\inc\stralign.h -FILE 3232 f:\sp\public\sdk\inc\poppack.h -FILE 3233 f:\sp\public\sdk\inc\winsvc.h -FILE 3234 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3235 f:\sp\public\sdk\inc\windef.h -FILE 3236 f:\sp\public\sdk\inc\winuser.h -FILE 3237 f:\sp\public\sdk\inc\mcx.h -FILE 3238 f:\sp\public\sdk\inc\pshpack8.h -FILE 3239 f:\sp\public\sdk\inc\ddbanned.h -FILE 3240 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3241 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3242 f:\sp\public\sdk\inc\guiddef.h -FILE 3243 f:\sp\public\sdk\inc\winnt.h -FILE 3244 f:\sp\public\sdk\inc\winnls.h -FILE 3245 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3246 f:\sp\public\sdk\inc\pshpack1.h -FILE 3247 f:\sp\public\sdk\inc\tvout.h -FILE 3248 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3249 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 3250 f:\sp\public\sdk\inc\wincon.h -FILE 3251 f:\sp\public\sdk\inc\imm.h -FILE 3252 f:\sp\public\sdk\inc\winbase.h -FILE 3253 f:\sp\public\sdk\inc\wingdi.h -FILE 3254 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3255 f:\sp\public\sdk\inc\winver.h -FILE 3256 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3257 f:\sp\public\sdk\inc\windows.h -FILE 3258 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3259 f:\sp\public\sdk\inc\pshpack2.h -FILE 3260 f:\sp\vctools\crt_bld\self_x86\crt\src\handler.cpp -FILE 3261 f:\sp\public\sdk\inc\reason.h -FILE 3262 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3263 f:\sp\public\sdk\inc\specstrings.h -FILE 3264 f:\sp\public\sdk\inc\basetsd.h -FILE 3265 f:\sp\public\sdk\inc\pshpack4.h -FILE 3266 f:\sp\public\sdk\inc\winnetwk.h -FILE 3267 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3268 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3269 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3270 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3271 f:\sp\public\sdk\inc\stralign.h -FILE 3272 f:\sp\public\sdk\inc\poppack.h -FILE 3273 f:\sp\public\sdk\inc\winsvc.h -FILE 3274 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3275 f:\sp\public\sdk\inc\windef.h -FILE 3276 f:\sp\public\sdk\inc\winuser.h -FILE 3277 f:\sp\public\sdk\inc\mcx.h -FILE 3278 f:\sp\public\sdk\inc\pshpack8.h -FILE 3279 f:\sp\public\sdk\inc\guiddef.h -FILE 3280 f:\sp\public\sdk\inc\winnt.h -FILE 3281 f:\sp\public\sdk\inc\winnls.h -FILE 3282 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3283 f:\sp\public\sdk\inc\pshpack1.h -FILE 3284 f:\sp\public\sdk\inc\winerror.h -FILE 3285 f:\sp\public\sdk\inc\ddbanned.h -FILE 3286 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3287 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3288 f:\sp\public\sdk\inc\winreg.h -FILE 3289 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3290 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3291 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 3292 f:\sp\public\sdk\inc\winsvc.h -FILE 3293 f:\sp\public\sdk\inc\wingdi.h -FILE 3294 f:\sp\public\sdk\inc\pshpack4.h -FILE 3295 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3296 f:\sp\public\sdk\inc\poppack.h -FILE 3297 f:\sp\public\sdk\inc\winnt.h -FILE 3298 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3299 f:\sp\public\sdk\inc\winnetwk.h -FILE 3300 f:\sp\public\sdk\inc\imm.h -FILE 3301 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3302 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3303 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3304 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3305 f:\sp\public\sdk\inc\pshpack1.h -FILE 3306 f:\sp\public\sdk\inc\winver.h -FILE 3307 f:\sp\public\sdk\inc\guiddef.h -FILE 3308 f:\sp\public\sdk\inc\specstrings.h -FILE 3309 f:\sp\public\sdk\inc\basetsd.h -FILE 3310 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3311 f:\sp\vctools\crt_bld\self_x86\crt\src\sbheap.c -FILE 3312 f:\sp\public\sdk\inc\windows.h -FILE 3313 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3314 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3315 f:\sp\public\sdk\inc\winreg.h -FILE 3316 f:\sp\public\sdk\inc\winbase.h -FILE 3317 f:\sp\public\sdk\inc\winerror.h -FILE 3318 f:\sp\public\sdk\inc\pshpack8.h -FILE 3319 f:\sp\public\sdk\inc\ddbanned.h -FILE 3320 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3321 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3322 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3323 f:\sp\public\sdk\inc\reason.h -FILE 3324 f:\sp\public\sdk\inc\wincon.h -FILE 3325 f:\sp\public\sdk\inc\pshpack2.h -FILE 3326 f:\sp\public\sdk\inc\mcx.h -FILE 3327 f:\sp\public\sdk\inc\winuser.h -FILE 3328 f:\sp\public\sdk\inc\winnls.h -FILE 3329 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3330 f:\sp\public\sdk\inc\windef.h -FILE 3331 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3332 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3333 f:\sp\public\sdk\inc\stralign.h -FILE 3334 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3335 f:\sp\public\sdk\inc\tvout.h -FILE 3336 f:\sp\public\sdk\inc\winver.h -FILE 3337 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3338 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3339 f:\sp\public\sdk\inc\guiddef.h -FILE 3340 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3341 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3342 f:\sp\public\sdk\inc\specstrings.h -FILE 3343 f:\sp\public\sdk\inc\basetsd.h -FILE 3344 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3345 f:\sp\public\sdk\inc\windows.h -FILE 3346 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3347 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3348 f:\sp\public\sdk\inc\winreg.h -FILE 3349 f:\sp\public\sdk\inc\winbase.h -FILE 3350 f:\sp\public\sdk\inc\winerror.h -FILE 3351 f:\sp\public\sdk\inc\pshpack8.h -FILE 3352 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3353 f:\sp\public\sdk\inc\reason.h -FILE 3354 f:\sp\public\sdk\inc\wincon.h -FILE 3355 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3356 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3357 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3358 f:\sp\public\sdk\inc\pshpack2.h -FILE 3359 f:\sp\public\sdk\inc\mcx.h -FILE 3360 f:\sp\public\sdk\inc\winuser.h -FILE 3361 f:\sp\public\sdk\inc\winnls.h -FILE 3362 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3363 f:\sp\public\sdk\inc\windef.h -FILE 3364 f:\sp\public\sdk\inc\stralign.h -FILE 3365 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3366 f:\sp\public\sdk\inc\tvout.h -FILE 3367 f:\sp\public\sdk\inc\winsvc.h -FILE 3368 f:\sp\vctools\crt_bld\self_x86\crt\src\realloc.c -FILE 3369 f:\sp\public\sdk\inc\wingdi.h -FILE 3370 f:\sp\public\sdk\inc\pshpack4.h -FILE 3371 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3372 f:\sp\public\sdk\inc\poppack.h -FILE 3373 f:\sp\public\sdk\inc\winnt.h -FILE 3374 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3375 f:\sp\public\sdk\inc\winnetwk.h -FILE 3376 f:\sp\public\sdk\inc\ddbanned.h -FILE 3377 f:\sp\public\sdk\inc\imm.h -FILE 3378 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3379 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3380 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3381 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3382 f:\sp\public\sdk\inc\pshpack1.h -FILE 3383 f:\sp\public\sdk\inc\pshpack2.h -FILE 3384 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3385 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3386 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3387 f:\sp\public\sdk\inc\mcx.h -FILE 3388 f:\sp\public\sdk\inc\winuser.h -FILE 3389 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3390 f:\sp\public\sdk\inc\winnls.h -FILE 3391 f:\sp\public\sdk\inc\guiddef.h -FILE 3392 f:\sp\public\sdk\inc\windows.h -FILE 3393 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3394 f:\sp\public\sdk\inc\specstrings.h -FILE 3395 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3396 f:\sp\public\sdk\inc\basetsd.h -FILE 3397 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3398 f:\sp\public\sdk\inc\stralign.h -FILE 3399 f:\sp\public\sdk\inc\tvout.h -FILE 3400 f:\sp\public\sdk\inc\winsvc.h -FILE 3401 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3402 f:\sp\public\sdk\inc\wingdi.h -FILE 3403 f:\sp\public\sdk\inc\pshpack4.h -FILE 3404 f:\sp\public\sdk\inc\poppack.h -FILE 3405 f:\sp\public\sdk\inc\winnetwk.h -FILE 3406 f:\sp\public\sdk\inc\imm.h -FILE 3407 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3408 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3409 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3410 f:\sp\public\sdk\inc\windef.h -FILE 3411 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3412 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3413 f:\sp\vctools\crt_bld\self_x86\crt\src\msize.c -FILE 3414 f:\sp\public\sdk\inc\pshpack1.h -FILE 3415 f:\sp\public\sdk\inc\winver.h -FILE 3416 f:\sp\public\sdk\inc\winnt.h -FILE 3417 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3418 f:\sp\public\sdk\inc\winreg.h -FILE 3419 f:\sp\public\sdk\inc\ddbanned.h -FILE 3420 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3421 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3422 f:\sp\public\sdk\inc\winbase.h -FILE 3423 f:\sp\public\sdk\inc\winerror.h -FILE 3424 f:\sp\public\sdk\inc\pshpack8.h -FILE 3425 f:\sp\public\sdk\inc\reason.h -FILE 3426 f:\sp\public\sdk\inc\wincon.h -FILE 3427 f:\sp\public\sdk\inc\pshpack2.h -FILE 3428 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3429 f:\sp\public\sdk\inc\mcx.h -FILE 3430 f:\sp\public\sdk\inc\winuser.h -FILE 3431 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3432 f:\sp\public\sdk\inc\winnls.h -FILE 3433 f:\sp\public\sdk\inc\guiddef.h -FILE 3434 f:\sp\public\sdk\inc\windows.h -FILE 3435 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3436 f:\sp\public\sdk\inc\specstrings.h -FILE 3437 f:\sp\public\sdk\inc\basetsd.h -FILE 3438 f:\sp\public\sdk\inc\stralign.h -FILE 3439 f:\sp\public\sdk\inc\tvout.h -FILE 3440 f:\sp\public\sdk\inc\winsvc.h -FILE 3441 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3442 f:\sp\public\sdk\inc\wingdi.h -FILE 3443 f:\sp\public\sdk\inc\pshpack4.h -FILE 3444 f:\sp\public\sdk\inc\poppack.h -FILE 3445 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3446 f:\sp\public\sdk\inc\winnetwk.h -FILE 3447 f:\sp\public\sdk\inc\imm.h -FILE 3448 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3449 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3450 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3451 f:\sp\public\sdk\inc\windef.h -FILE 3452 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3453 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3454 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3455 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.c -FILE 3456 f:\sp\public\sdk\inc\pshpack1.h -FILE 3457 f:\sp\public\sdk\inc\winver.h -FILE 3458 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3459 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3460 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3461 f:\sp\public\sdk\inc\winnt.h -FILE 3462 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3463 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3464 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3465 f:\sp\public\sdk\inc\winreg.h -FILE 3466 f:\sp\public\sdk\inc\ddbanned.h -FILE 3467 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3468 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3469 f:\sp\public\sdk\inc\winbase.h -FILE 3470 f:\sp\public\sdk\inc\winerror.h -FILE 3471 f:\sp\public\sdk\inc\pshpack8.h -FILE 3472 f:\sp\public\sdk\inc\reason.h -FILE 3473 f:\sp\public\sdk\inc\wincon.h -FILE 3474 f:\sp\public\sdk\inc\winver.h -FILE 3475 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3476 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3477 f:\sp\public\sdk\inc\winnt.h -FILE 3478 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3479 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3480 f:\sp\public\sdk\inc\winreg.h -FILE 3481 f:\sp\public\sdk\inc\winbase.h -FILE 3482 f:\sp\public\sdk\inc\winerror.h -FILE 3483 f:\sp\public\sdk\inc\pshpack8.h -FILE 3484 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3485 f:\sp\public\sdk\inc\reason.h -FILE 3486 f:\sp\public\sdk\inc\wincon.h -FILE 3487 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3488 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3489 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3490 f:\sp\public\sdk\inc\pshpack2.h -FILE 3491 f:\sp\public\sdk\inc\mcx.h -FILE 3492 f:\sp\public\sdk\inc\winuser.h -FILE 3493 f:\sp\public\sdk\inc\winnls.h -FILE 3494 f:\sp\public\sdk\inc\guiddef.h -FILE 3495 f:\sp\public\sdk\inc\stralign.h -FILE 3496 f:\sp\public\sdk\inc\specstrings.h -FILE 3497 f:\sp\public\sdk\inc\basetsd.h -FILE 3498 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3499 f:\sp\public\sdk\inc\windows.h -FILE 3500 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3501 f:\sp\public\sdk\inc\tvout.h -FILE 3502 f:\sp\public\sdk\inc\winsvc.h -FILE 3503 f:\sp\vctools\crt_bld\self_x86\crt\src\heapinit.c -FILE 3504 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3505 f:\sp\public\sdk\inc\wingdi.h -FILE 3506 f:\sp\public\sdk\inc\pshpack4.h -FILE 3507 f:\sp\public\sdk\inc\poppack.h -FILE 3508 f:\sp\public\sdk\inc\winnetwk.h -FILE 3509 f:\sp\public\sdk\inc\ddbanned.h -FILE 3510 f:\sp\public\sdk\inc\imm.h -FILE 3511 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3512 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3513 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3514 f:\sp\public\sdk\inc\windef.h -FILE 3515 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3516 f:\sp\public\sdk\inc\pshpack1.h -FILE 3517 f:\sp\public\sdk\inc\pshpack2.h -FILE 3518 f:\sp\public\sdk\inc\mcx.h -FILE 3519 f:\sp\public\sdk\inc\winuser.h -FILE 3520 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3521 f:\sp\public\sdk\inc\winnls.h -FILE 3522 f:\sp\public\sdk\inc\guiddef.h -FILE 3523 f:\sp\public\sdk\inc\windows.h -FILE 3524 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3525 f:\sp\public\sdk\inc\specstrings.h -FILE 3526 f:\sp\public\sdk\inc\basetsd.h -FILE 3527 f:\sp\public\sdk\inc\stralign.h -FILE 3528 f:\sp\public\sdk\inc\tvout.h -FILE 3529 f:\sp\public\sdk\inc\winsvc.h -FILE 3530 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3531 f:\sp\public\sdk\inc\wingdi.h -FILE 3532 f:\sp\public\sdk\inc\pshpack4.h -FILE 3533 f:\sp\public\sdk\inc\poppack.h -FILE 3534 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3535 f:\sp\public\sdk\inc\winnetwk.h -FILE 3536 f:\sp\public\sdk\inc\imm.h -FILE 3537 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3538 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3539 f:\sp\public\sdk\inc\windef.h -FILE 3540 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3541 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3542 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3543 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3544 f:\sp\public\sdk\inc\pshpack1.h -FILE 3545 f:\sp\vctools\crt_bld\self_x86\crt\src\free.c -FILE 3546 f:\sp\public\sdk\inc\winver.h -FILE 3547 f:\sp\public\sdk\inc\winnt.h -FILE 3548 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3549 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3550 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3551 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3552 f:\sp\public\sdk\inc\winreg.h -FILE 3553 f:\sp\public\sdk\inc\ddbanned.h -FILE 3554 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3555 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3556 f:\sp\public\sdk\inc\winbase.h -FILE 3557 f:\sp\public\sdk\inc\winerror.h -FILE 3558 f:\sp\public\sdk\inc\pshpack8.h -FILE 3559 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3560 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3561 f:\sp\public\sdk\inc\reason.h -FILE 3562 f:\sp\public\sdk\inc\wincon.h -FILE 3563 f:\sp\public\sdk\inc\pshpack2.h -FILE 3564 f:\sp\public\sdk\inc\mcx.h -FILE 3565 f:\sp\public\sdk\inc\winuser.h -FILE 3566 f:\sp\public\sdk\inc\winnls.h -FILE 3567 f:\sp\public\sdk\inc\guiddef.h -FILE 3568 f:\sp\public\sdk\inc\windows.h -FILE 3569 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3570 f:\sp\public\sdk\inc\specstrings.h -FILE 3571 f:\sp\public\sdk\inc\basetsd.h -FILE 3572 f:\sp\public\sdk\inc\stralign.h -FILE 3573 f:\sp\public\sdk\inc\tvout.h -FILE 3574 f:\sp\public\sdk\inc\winsvc.h -FILE 3575 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3576 f:\sp\public\sdk\inc\wingdi.h -FILE 3577 f:\sp\public\sdk\inc\pshpack4.h -FILE 3578 f:\sp\public\sdk\inc\poppack.h -FILE 3579 f:\sp\public\sdk\inc\winnetwk.h -FILE 3580 f:\sp\public\sdk\inc\imm.h -FILE 3581 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3582 f:\sp\public\sdk\inc\windef.h -FILE 3583 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3584 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3585 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3586 f:\sp\public\sdk\inc\pshpack1.h -FILE 3587 f:\sp\vctools\crt_bld\self_x86\crt\src\crtheap.c -FILE 3588 f:\sp\public\sdk\inc\winver.h -FILE 3589 f:\sp\public\sdk\inc\winnt.h -FILE 3590 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3591 f:\sp\public\sdk\inc\winreg.h -FILE 3592 f:\sp\public\sdk\inc\ddbanned.h -FILE 3593 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3594 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3595 f:\sp\public\sdk\inc\winbase.h -FILE 3596 f:\sp\public\sdk\inc\winerror.h -FILE 3597 f:\sp\public\sdk\inc\pshpack8.h -FILE 3598 f:\sp\public\sdk\inc\reason.h -FILE 3599 f:\sp\public\sdk\inc\wincon.h -FILE 3600 f:\sp\public\sdk\inc\pshpack2.h -FILE 3601 f:\sp\public\sdk\inc\mcx.h -FILE 3602 f:\sp\public\sdk\inc\winuser.h -FILE 3603 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3604 f:\sp\public\sdk\inc\winnls.h -FILE 3605 f:\sp\public\sdk\inc\stralign.h -FILE 3606 f:\sp\public\sdk\inc\tvout.h -FILE 3607 f:\sp\public\sdk\inc\winsvc.h -FILE 3608 f:\sp\public\sdk\inc\wingdi.h -FILE 3609 f:\sp\public\sdk\inc\winnt.h -FILE 3610 f:\sp\public\sdk\inc\pshpack4.h -FILE 3611 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3612 f:\sp\public\sdk\inc\poppack.h -FILE 3613 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3614 f:\sp\public\sdk\inc\winnetwk.h -FILE 3615 f:\sp\public\sdk\inc\imm.h -FILE 3616 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3617 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3618 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3619 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3620 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3621 f:\sp\public\sdk\inc\pshpack1.h -FILE 3622 f:\sp\vctools\crt_bld\self_x86\crt\src\calloc.c -FILE 3623 f:\sp\public\sdk\inc\winver.h -FILE 3624 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3625 f:\sp\public\sdk\inc\guiddef.h -FILE 3626 f:\sp\public\sdk\inc\windows.h -FILE 3627 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3628 f:\sp\public\sdk\inc\specstrings.h -FILE 3629 f:\sp\public\sdk\inc\basetsd.h -FILE 3630 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3631 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3632 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3633 f:\sp\public\sdk\inc\winreg.h -FILE 3634 f:\sp\public\sdk\inc\ddbanned.h -FILE 3635 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3636 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3637 f:\sp\public\sdk\inc\winbase.h -FILE 3638 f:\sp\public\sdk\inc\winerror.h -FILE 3639 f:\sp\public\sdk\inc\pshpack8.h -FILE 3640 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3641 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3642 f:\sp\public\sdk\inc\reason.h -FILE 3643 f:\sp\public\sdk\inc\wincon.h -FILE 3644 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3645 f:\sp\public\sdk\inc\windef.h -FILE 3646 f:\sp\public\sdk\inc\wincon.h -FILE 3647 f:\sp\public\sdk\inc\imm.h -FILE 3648 f:\sp\public\sdk\inc\winbase.h -FILE 3649 f:\sp\public\sdk\inc\wingdi.h -FILE 3650 f:\sp\public\sdk\inc\winver.h -FILE 3651 f:\sp\public\sdk\inc\pshpack2.h -FILE 3652 f:\sp\public\sdk\inc\reason.h -FILE 3653 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 3654 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\unhandld.cpp -FILE 3655 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3656 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3657 f:\sp\public\sdk\inc\specstrings.h -FILE 3658 f:\sp\public\sdk\inc\basetsd.h -FILE 3659 f:\sp\public\sdk\inc\pshpack4.h -FILE 3660 f:\sp\public\sdk\inc\winnetwk.h -FILE 3661 f:\sp\public\sdk\inc\stralign.h -FILE 3662 f:\sp\public\sdk\inc\poppack.h -FILE 3663 f:\sp\public\sdk\inc\winsvc.h -FILE 3664 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3665 f:\sp\public\sdk\inc\windef.h -FILE 3666 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 3667 f:\sp\public\sdk\inc\winuser.h -FILE 3668 f:\sp\public\sdk\inc\windows.h -FILE 3669 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3670 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3671 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3672 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 3673 f:\sp\public\sdk\inc\mcx.h -FILE 3674 f:\sp\public\sdk\inc\pshpack8.h -FILE 3675 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3676 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3677 f:\sp\public\sdk\inc\guiddef.h -FILE 3678 f:\sp\public\sdk\inc\winnt.h -FILE 3679 f:\sp\public\sdk\inc\winnls.h -FILE 3680 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3681 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3682 f:\sp\public\sdk\inc\pshpack1.h -FILE 3683 f:\sp\public\sdk\inc\winerror.h -FILE 3684 f:\sp\vctools\langapi\include\ehdata.h -FILE 3685 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3686 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3687 f:\sp\public\sdk\inc\winreg.h -FILE 3688 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3689 f:\sp\public\sdk\inc\ddbanned.h -FILE 3690 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3691 f:\sp\public\sdk\inc\tvout.h -FILE 3692 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3693 f:\sp\public\sdk\inc\specstrings.h -FILE 3694 f:\sp\public\sdk\inc\basetsd.h -FILE 3695 f:\sp\public\sdk\inc\pshpack4.h -FILE 3696 f:\sp\public\sdk\inc\winnetwk.h -FILE 3697 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3698 f:\sp\public\sdk\inc\stralign.h -FILE 3699 f:\sp\public\sdk\inc\poppack.h -FILE 3700 f:\sp\public\sdk\inc\winsvc.h -FILE 3701 f:\sp\public\sdk\inc\winuser.h -FILE 3702 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3703 f:\sp\public\sdk\inc\windef.h -FILE 3704 f:\sp\vctools\langapi\undname\undname.cxx -FILE 3705 f:\sp\public\sdk\inc\mcx.h -FILE 3706 f:\sp\public\sdk\inc\pshpack8.h -FILE 3707 f:\sp\public\sdk\inc\guiddef.h -FILE 3708 f:\sp\vctools\langapi\undname\utf8.h -FILE 3709 f:\sp\public\sdk\inc\winnls.h -FILE 3710 f:\sp\public\sdk\inc\pshpack1.h -FILE 3711 f:\sp\public\sdk\inc\winnt.h -FILE 3712 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3713 f:\sp\public\sdk\inc\winerror.h -FILE 3714 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\swprintf.inl -FILE 3715 f:\sp\vctools\langapi\undname\undname.hxx -FILE 3716 f:\sp\vctools\langapi\undname\undname.h -FILE 3717 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3718 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3719 f:\sp\public\sdk\inc\winreg.h -FILE 3720 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3721 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3722 f:\sp\public\sdk\inc\tvout.h -FILE 3723 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdio.h -FILE 3724 f:\sp\public\sdk\inc\wincon.h -FILE 3725 f:\sp\public\sdk\inc\imm.h -FILE 3726 f:\sp\public\sdk\inc\winbase.h -FILE 3727 f:\sp\public\sdk\inc\wingdi.h -FILE 3728 f:\sp\public\sdk\inc\winver.h -FILE 3729 f:\sp\public\sdk\inc\pshpack2.h -FILE 3730 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3731 f:\sp\public\sdk\inc\windows.h -FILE 3732 f:\sp\public\sdk\inc\reason.h -FILE 3733 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3734 f:\sp\public\sdk\inc\ddbanned.h -FILE 3735 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3736 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3737 f:\sp\vctools\langapi\undname\undname.inl -FILE 3738 f:\sp\public\sdk\inc\guiddef.h -FILE 3739 f:\sp\public\sdk\inc\winnt.h -FILE 3740 f:\sp\public\sdk\inc\winnls.h -FILE 3741 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3742 f:\sp\public\sdk\inc\pshpack1.h -FILE 3743 f:\sp\public\sdk\inc\winerror.h -FILE 3744 f:\sp\public\sdk\inc\winreg.h -FILE 3745 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3746 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3747 f:\sp\public\sdk\inc\tvout.h -FILE 3748 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp -FILE 3749 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3750 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 3751 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3752 f:\sp\public\sdk\inc\wincon.h -FILE 3753 f:\sp\public\sdk\inc\imm.h -FILE 3754 f:\sp\public\sdk\inc\winbase.h -FILE 3755 f:\sp\public\sdk\inc\wingdi.h -FILE 3756 f:\sp\public\sdk\inc\winver.h -FILE 3757 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3758 f:\sp\public\sdk\inc\windows.h -FILE 3759 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3760 f:\sp\public\sdk\inc\pshpack2.h -FILE 3761 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3762 f:\sp\public\sdk\inc\reason.h -FILE 3763 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 3764 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 3765 f:\sp\public\sdk\inc\specstrings.h -FILE 3766 f:\sp\public\sdk\inc\basetsd.h -FILE 3767 f:\sp\public\sdk\inc\pshpack4.h -FILE 3768 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\typeinfo.h -FILE 3769 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 3770 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 3771 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 3772 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3773 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 3774 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 3775 f:\sp\public\sdk\inc\winnetwk.h -FILE 3776 f:\sp\vctools\langapi\undname\undname.h -FILE 3777 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3778 f:\sp\public\sdk\inc\stralign.h -FILE 3779 f:\sp\public\sdk\inc\poppack.h -FILE 3780 f:\sp\public\sdk\inc\winsvc.h -FILE 3781 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3782 f:\sp\public\sdk\inc\windef.h -FILE 3783 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3784 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3785 f:\sp\public\sdk\inc\winuser.h -FILE 3786 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3787 f:\sp\public\sdk\inc\ddbanned.h -FILE 3788 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3789 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3790 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 3791 f:\sp\public\sdk\inc\mcx.h -FILE 3792 f:\sp\public\sdk\inc\pshpack8.h -FILE 3793 f:\sp\public\sdk\inc\winnls.h -FILE 3794 f:\sp\public\sdk\inc\pshpack1.h -FILE 3795 f:\sp\public\sdk\inc\winnt.h -FILE 3796 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3797 f:\sp\public\sdk\inc\winerror.h -FILE 3798 f:\sp\public\sdk\inc\winreg.h -FILE 3799 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3800 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3801 f:\sp\public\sdk\inc\tvout.h -FILE 3802 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 3803 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3804 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 3805 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3806 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp -FILE 3807 f:\sp\public\sdk\inc\wincon.h -FILE 3808 f:\sp\public\sdk\inc\imm.h -FILE 3809 f:\sp\public\sdk\inc\winbase.h -FILE 3810 f:\sp\public\sdk\inc\wingdi.h -FILE 3811 f:\sp\public\sdk\inc\winver.h -FILE 3812 f:\sp\public\sdk\inc\pshpack2.h -FILE 3813 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3814 f:\sp\public\sdk\inc\reason.h -FILE 3815 f:\sp\public\sdk\inc\windows.h -FILE 3816 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3817 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3818 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3819 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3820 f:\sp\public\sdk\inc\specstrings.h -FILE 3821 f:\sp\public\sdk\inc\basetsd.h -FILE 3822 f:\sp\public\sdk\inc\pshpack4.h -FILE 3823 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 3824 f:\sp\public\sdk\inc\winnetwk.h -FILE 3825 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 3826 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 3827 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3828 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 3829 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 3830 f:\sp\public\sdk\inc\stralign.h -FILE 3831 f:\sp\public\sdk\inc\poppack.h -FILE 3832 f:\sp\public\sdk\inc\winsvc.h -FILE 3833 f:\sp\public\sdk\inc\winuser.h -FILE 3834 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3835 f:\sp\public\sdk\inc\windef.h -FILE 3836 f:\sp\vctools\langapi\undname\undname.h -FILE 3837 f:\sp\public\sdk\inc\ddbanned.h -FILE 3838 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 3839 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3840 f:\sp\public\sdk\inc\mcx.h -FILE 3841 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3842 f:\sp\public\sdk\inc\pshpack8.h -FILE 3843 f:\sp\public\sdk\inc\guiddef.h -FILE 3844 f:\sp\public\sdk\inc\poppack.h -FILE 3845 f:\sp\public\sdk\inc\winsvc.h -FILE 3846 f:\sp\public\sdk\inc\windows.h -FILE 3847 f:\sp\public\sdk\inc\winuser.h -FILE 3848 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3849 f:\sp\public\sdk\inc\windef.h -FILE 3850 f:\sp\public\sdk\inc\mcx.h -FILE 3851 f:\sp\public\sdk\inc\pshpack8.h -FILE 3852 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3853 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3854 f:\sp\public\sdk\inc\guiddef.h -FILE 3855 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\hooks.cpp -FILE 3856 f:\sp\public\sdk\inc\winnls.h -FILE 3857 f:\sp\public\sdk\inc\pshpack1.h -FILE 3858 f:\sp\public\sdk\inc\winnt.h -FILE 3859 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3860 f:\sp\public\sdk\inc\winerror.h -FILE 3861 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3862 f:\sp\public\sdk\inc\winreg.h -FILE 3863 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3864 f:\sp\public\sdk\inc\tvout.h -FILE 3865 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3866 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3867 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3868 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3869 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3870 f:\sp\public\sdk\inc\wincon.h -FILE 3871 f:\sp\public\sdk\inc\imm.h -FILE 3872 f:\sp\public\sdk\inc\winbase.h -FILE 3873 f:\sp\public\sdk\inc\wingdi.h -FILE 3874 f:\sp\public\sdk\inc\winver.h -FILE 3875 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 3876 f:\sp\public\sdk\inc\pshpack2.h -FILE 3877 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3878 f:\sp\public\sdk\inc\reason.h -FILE 3879 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 3880 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3881 f:\sp\public\sdk\inc\specstrings.h -FILE 3882 f:\sp\public\sdk\inc\basetsd.h -FILE 3883 f:\sp\public\sdk\inc\pshpack4.h -FILE 3884 f:\sp\public\sdk\inc\ddbanned.h -FILE 3885 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3886 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3887 f:\sp\public\sdk\inc\winnetwk.h -FILE 3888 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3889 f:\sp\public\sdk\inc\stralign.h -FILE 3890 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3891 f:\sp\public\sdk\inc\pshpack4.h -FILE 3892 f:\sp\public\sdk\inc\reason.h -FILE 3893 f:\sp\public\sdk\inc\wincon.h -FILE 3894 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3895 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3896 f:\sp\public\sdk\inc\poppack.h -FILE 3897 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3898 f:\sp\public\sdk\inc\mcx.h -FILE 3899 f:\sp\public\sdk\inc\winuser.h -FILE 3900 f:\sp\public\sdk\inc\winnls.h -FILE 3901 f:\sp\public\sdk\inc\stralign.h -FILE 3902 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3903 f:\sp\public\sdk\inc\windef.h -FILE 3904 f:\sp\public\sdk\inc\tvout.h -FILE 3905 f:\sp\public\sdk\inc\winsvc.h -FILE 3906 f:\sp\public\sdk\inc\wingdi.h -FILE 3907 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3908 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3909 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3910 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3911 f:\sp\public\sdk\inc\winnt.h -FILE 3912 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3913 f:\sp\public\sdk\inc\winnetwk.h -FILE 3914 f:\sp\public\sdk\inc\imm.h -FILE 3915 f:\sp\vctools\crt_bld\self_x86\crt\src\dosmap.c -FILE 3916 f:\sp\public\sdk\inc\winbase.h -FILE 3917 f:\sp\public\sdk\inc\winerror.h -FILE 3918 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3919 f:\sp\public\sdk\inc\pshpack1.h -FILE 3920 f:\sp\public\sdk\inc\pshpack8.h -FILE 3921 f:\sp\public\sdk\inc\winver.h -FILE 3922 f:\sp\public\sdk\inc\ddbanned.h -FILE 3923 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3924 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3925 f:\sp\public\sdk\inc\pshpack2.h -FILE 3926 f:\sp\public\sdk\inc\winreg.h -FILE 3927 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3928 f:\sp\public\sdk\inc\guiddef.h -FILE 3929 f:\sp\public\sdk\inc\windows.h -FILE 3930 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3931 f:\sp\public\sdk\inc\specstrings.h -FILE 3932 f:\sp\public\sdk\inc\basetsd.h -FILE 3933 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3934 f:\sp\public\sdk\inc\mcx.h -FILE 3935 f:\sp\public\sdk\inc\pshpack8.h -FILE 3936 f:\sp\public\sdk\inc\guiddef.h -FILE 3937 f:\sp\public\sdk\inc\winnt.h -FILE 3938 f:\sp\public\sdk\inc\winnls.h -FILE 3939 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3940 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3941 f:\sp\public\sdk\inc\pshpack1.h -FILE 3942 f:\sp\public\sdk\inc\winerror.h -FILE 3943 f:\sp\vctools\crt_bld\self_x86\crt\src\tolower.c -FILE 3944 f:\sp\public\sdk\inc\winreg.h -FILE 3945 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3946 f:\sp\public\sdk\inc\tvout.h -FILE 3947 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3948 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3949 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3950 f:\sp\public\sdk\inc\wincon.h -FILE 3951 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3952 f:\sp\public\sdk\inc\imm.h -FILE 3953 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3954 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3955 f:\sp\public\sdk\inc\winbase.h -FILE 3956 f:\sp\public\sdk\inc\wingdi.h -FILE 3957 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3958 f:\sp\public\sdk\inc\winver.h -FILE 3959 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3960 f:\sp\public\sdk\inc\windows.h -FILE 3961 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3962 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3963 f:\sp\public\sdk\inc\pshpack2.h -FILE 3964 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3965 f:\sp\public\sdk\inc\reason.h -FILE 3966 f:\sp\public\sdk\inc\specstrings.h -FILE 3967 f:\sp\public\sdk\inc\basetsd.h -FILE 3968 f:\sp\public\sdk\inc\pshpack4.h -FILE 3969 f:\sp\public\sdk\inc\winnetwk.h -FILE 3970 f:\sp\public\sdk\inc\ddbanned.h -FILE 3971 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3972 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3973 f:\sp\public\sdk\inc\stralign.h -FILE 3974 f:\sp\public\sdk\inc\poppack.h -FILE 3975 f:\sp\public\sdk\inc\winsvc.h -FILE 3976 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3977 f:\sp\public\sdk\inc\windef.h -FILE 3978 f:\sp\public\sdk\inc\winuser.h -FILE 3979 f:\sp\public\sdk\inc\winsvc.h -FILE 3980 f:\sp\public\sdk\inc\winuser.h -FILE 3981 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3982 f:\sp\public\sdk\inc\mcx.h -FILE 3983 f:\sp\public\sdk\inc\pshpack8.h -FILE 3984 f:\sp\public\sdk\inc\guiddef.h -FILE 3985 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3986 f:\sp\public\sdk\inc\windows.h -FILE 3987 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3988 f:\sp\public\sdk\inc\winnls.h -FILE 3989 f:\sp\vctools\crt_bld\self_x86\crt\src\strtoq.c -FILE 3990 f:\sp\public\sdk\inc\pshpack1.h -FILE 3991 f:\sp\public\sdk\inc\winerror.h -FILE 3992 f:\sp\public\sdk\inc\winreg.h -FILE 3993 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3994 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3995 f:\sp\public\sdk\inc\tvout.h -FILE 3996 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3997 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3998 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3999 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4000 f:\sp\public\sdk\inc\wincon.h -FILE 4001 f:\sp\public\sdk\inc\imm.h -FILE 4002 f:\sp\public\sdk\inc\winbase.h -FILE 4003 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4004 f:\sp\public\sdk\inc\wingdi.h -FILE 4005 f:\sp\public\sdk\inc\windef.h -FILE 4006 f:\sp\public\sdk\inc\winver.h -FILE 4007 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4008 f:\sp\public\sdk\inc\pshpack2.h -FILE 4009 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4010 f:\sp\public\sdk\inc\reason.h -FILE 4011 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4012 f:\sp\public\sdk\inc\winnt.h -FILE 4013 f:\sp\public\sdk\inc\specstrings.h -FILE 4014 f:\sp\public\sdk\inc\basetsd.h -FILE 4015 f:\sp\public\sdk\inc\pshpack4.h -FILE 4016 f:\sp\public\sdk\inc\ddbanned.h -FILE 4017 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4018 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4019 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4020 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4021 f:\sp\public\sdk\inc\winnetwk.h -FILE 4022 f:\sp\public\sdk\inc\stralign.h -FILE 4023 f:\sp\public\sdk\inc\poppack.h -FILE 4024 f:\sp\public\sdk\inc\winsvc.h -FILE 4025 f:\sp\public\sdk\inc\winuser.h -FILE 4026 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4027 f:\sp\public\sdk\inc\mcx.h -FILE 4028 f:\sp\public\sdk\inc\pshpack8.h -FILE 4029 f:\sp\public\sdk\inc\guiddef.h -FILE 4030 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4031 f:\sp\public\sdk\inc\windows.h -FILE 4032 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4033 f:\sp\public\sdk\inc\winnls.h -FILE 4034 f:\sp\vctools\crt_bld\self_x86\crt\src\strtol.c -FILE 4035 f:\sp\public\sdk\inc\pshpack1.h -FILE 4036 f:\sp\public\sdk\inc\winerror.h -FILE 4037 f:\sp\public\sdk\inc\winreg.h -FILE 4038 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4039 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4040 f:\sp\public\sdk\inc\tvout.h -FILE 4041 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4042 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4043 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4044 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4045 f:\sp\public\sdk\inc\wincon.h -FILE 4046 f:\sp\public\sdk\inc\imm.h -FILE 4047 f:\sp\public\sdk\inc\winbase.h -FILE 4048 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4049 f:\sp\public\sdk\inc\wingdi.h -FILE 4050 f:\sp\public\sdk\inc\windef.h -FILE 4051 f:\sp\public\sdk\inc\winver.h -FILE 4052 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4053 f:\sp\public\sdk\inc\pshpack2.h -FILE 4054 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4055 f:\sp\public\sdk\inc\reason.h -FILE 4056 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4057 f:\sp\public\sdk\inc\winnt.h -FILE 4058 f:\sp\public\sdk\inc\specstrings.h -FILE 4059 f:\sp\public\sdk\inc\basetsd.h -FILE 4060 f:\sp\public\sdk\inc\pshpack4.h -FILE 4061 f:\sp\public\sdk\inc\ddbanned.h -FILE 4062 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4063 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4064 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4065 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4066 f:\sp\public\sdk\inc\winnetwk.h -FILE 4067 f:\sp\public\sdk\inc\stralign.h -FILE 4068 f:\sp\public\sdk\inc\poppack.h -FILE 4069 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4070 f:\sp\public\sdk\inc\winreg.h -FILE 4071 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4072 f:\sp\public\sdk\inc\tvout.h -FILE 4073 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4074 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4075 f:\sp\public\sdk\inc\wincon.h -FILE 4076 f:\sp\public\sdk\inc\imm.h -FILE 4077 f:\sp\public\sdk\inc\winbase.h -FILE 4078 f:\sp\vctools\crt_bld\self_x86\crt\src\isctype.c -FILE 4079 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4080 f:\sp\public\sdk\inc\wingdi.h -FILE 4081 f:\sp\public\sdk\inc\windef.h -FILE 4082 f:\sp\public\sdk\inc\winver.h -FILE 4083 f:\sp\public\sdk\inc\pshpack2.h -FILE 4084 f:\sp\public\sdk\inc\reason.h -FILE 4085 f:\sp\public\sdk\inc\winnt.h -FILE 4086 f:\sp\public\sdk\inc\specstrings.h -FILE 4087 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4088 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4089 f:\sp\public\sdk\inc\basetsd.h -FILE 4090 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4091 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4092 f:\sp\public\sdk\inc\pshpack4.h -FILE 4093 f:\sp\public\sdk\inc\winnetwk.h -FILE 4094 f:\sp\public\sdk\inc\stralign.h -FILE 4095 f:\sp\public\sdk\inc\poppack.h -FILE 4096 f:\sp\public\sdk\inc\winsvc.h -FILE 4097 f:\sp\public\sdk\inc\winuser.h -FILE 4098 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4099 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4100 f:\sp\public\sdk\inc\mcx.h -FILE 4101 f:\sp\public\sdk\inc\pshpack8.h -FILE 4102 f:\sp\public\sdk\inc\guiddef.h -FILE 4103 f:\sp\public\sdk\inc\ddbanned.h -FILE 4104 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4105 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4106 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4107 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4108 f:\sp\public\sdk\inc\windows.h -FILE 4109 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4110 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4111 f:\sp\public\sdk\inc\winnls.h -FILE 4112 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4113 f:\sp\public\sdk\inc\pshpack1.h -FILE 4114 f:\sp\public\sdk\inc\winerror.h -FILE 4115 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4116 f:\sp\public\sdk\inc\winreg.h -FILE 4117 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4118 f:\sp\public\sdk\inc\tvout.h -FILE 4119 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4120 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4121 f:\sp\public\sdk\inc\wincon.h -FILE 4122 f:\sp\public\sdk\inc\imm.h -FILE 4123 f:\sp\public\sdk\inc\winbase.h -FILE 4124 f:\sp\vctools\crt_bld\self_x86\crt\src\iswctype.c -FILE 4125 f:\sp\public\sdk\inc\wingdi.h -FILE 4126 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4127 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4128 f:\sp\public\sdk\inc\winver.h -FILE 4129 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4130 f:\sp\public\sdk\inc\windows.h -FILE 4131 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4132 f:\sp\public\sdk\inc\pshpack2.h -FILE 4133 f:\sp\public\sdk\inc\reason.h -FILE 4134 f:\sp\public\sdk\inc\specstrings.h -FILE 4135 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4136 f:\sp\public\sdk\inc\basetsd.h -FILE 4137 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4138 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4139 f:\sp\public\sdk\inc\pshpack4.h -FILE 4140 f:\sp\public\sdk\inc\winnetwk.h -FILE 4141 f:\sp\public\sdk\inc\stralign.h -FILE 4142 f:\sp\public\sdk\inc\poppack.h -FILE 4143 f:\sp\public\sdk\inc\winsvc.h -FILE 4144 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4145 f:\sp\public\sdk\inc\windef.h -FILE 4146 f:\sp\public\sdk\inc\winuser.h -FILE 4147 f:\sp\public\sdk\inc\mcx.h -FILE 4148 f:\sp\public\sdk\inc\pshpack8.h -FILE 4149 f:\sp\public\sdk\inc\guiddef.h -FILE 4150 f:\sp\public\sdk\inc\ddbanned.h -FILE 4151 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4152 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4153 f:\sp\public\sdk\inc\winnt.h -FILE 4154 f:\sp\public\sdk\inc\winnls.h -FILE 4155 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4156 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4157 f:\sp\public\sdk\inc\pshpack1.h -FILE 4158 f:\sp\public\sdk\inc\winerror.h -FILE 4159 f:\sp\public\sdk\inc\winsvc.h -FILE 4160 f:\sp\public\sdk\inc\winuser.h -FILE 4161 f:\sp\public\sdk\inc\mcx.h -FILE 4162 f:\sp\public\sdk\inc\pshpack8.h -FILE 4163 f:\sp\public\sdk\inc\guiddef.h -FILE 4164 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4165 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4166 f:\sp\public\sdk\inc\windows.h -FILE 4167 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4168 f:\sp\public\sdk\inc\winnls.h -FILE 4169 f:\sp\vctools\crt_bld\self_x86\crt\src\_wctype.c -FILE 4170 f:\sp\public\sdk\inc\pshpack1.h -FILE 4171 f:\sp\public\sdk\inc\winerror.h -FILE 4172 f:\sp\public\sdk\inc\winreg.h -FILE 4173 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4174 f:\sp\public\sdk\inc\tvout.h -FILE 4175 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4176 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4177 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4178 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4179 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4180 f:\sp\public\sdk\inc\wincon.h -FILE 4181 f:\sp\public\sdk\inc\imm.h -FILE 4182 f:\sp\public\sdk\inc\winbase.h -FILE 4183 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4184 f:\sp\public\sdk\inc\wingdi.h -FILE 4185 f:\sp\public\sdk\inc\windef.h -FILE 4186 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4187 f:\sp\public\sdk\inc\winver.h -FILE 4188 f:\sp\public\sdk\inc\pshpack2.h -FILE 4189 f:\sp\public\sdk\inc\reason.h -FILE 4190 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4191 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4192 f:\sp\public\sdk\inc\winnt.h -FILE 4193 f:\sp\public\sdk\inc\specstrings.h -FILE 4194 f:\sp\public\sdk\inc\basetsd.h -FILE 4195 f:\sp\public\sdk\inc\pshpack4.h -FILE 4196 f:\sp\public\sdk\inc\ddbanned.h -FILE 4197 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4198 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4199 f:\sp\public\sdk\inc\winnetwk.h -FILE 4200 f:\sp\public\sdk\inc\stralign.h -FILE 4201 f:\sp\public\sdk\inc\poppack.h -FILE 4202 f:\sp\public\sdk\inc\mcx.h -FILE 4203 f:\sp\public\sdk\inc\pshpack8.h -FILE 4204 f:\sp\public\sdk\inc\guiddef.h -FILE 4205 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4206 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4207 f:\sp\public\sdk\inc\windows.h -FILE 4208 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4209 f:\sp\public\sdk\inc\winnls.h -FILE 4210 f:\sp\public\sdk\inc\pshpack1.h -FILE 4211 f:\sp\public\sdk\inc\winerror.h -FILE 4212 f:\sp\public\sdk\inc\winreg.h -FILE 4213 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4214 f:\sp\vctools\crt_bld\self_x86\crt\src\_ctype.c -FILE 4215 f:\sp\public\sdk\inc\tvout.h -FILE 4216 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4217 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4218 f:\sp\public\sdk\inc\wincon.h -FILE 4219 f:\sp\public\sdk\inc\imm.h -FILE 4220 f:\sp\public\sdk\inc\winbase.h -FILE 4221 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4222 f:\sp\public\sdk\inc\wingdi.h -FILE 4223 f:\sp\public\sdk\inc\windef.h -FILE 4224 f:\sp\public\sdk\inc\winver.h -FILE 4225 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4227 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4228 f:\sp\public\sdk\inc\pshpack2.h -FILE 4229 f:\sp\public\sdk\inc\reason.h -FILE 4230 f:\sp\public\sdk\inc\winnt.h -FILE 4231 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4232 f:\sp\public\sdk\inc\specstrings.h -FILE 4233 f:\sp\public\sdk\inc\basetsd.h -FILE 4234 f:\sp\public\sdk\inc\pshpack4.h -FILE 4235 f:\sp\public\sdk\inc\winnetwk.h -FILE 4236 f:\sp\public\sdk\inc\stralign.h -FILE 4237 f:\sp\public\sdk\inc\poppack.h -FILE 4238 f:\sp\public\sdk\inc\winsvc.h -FILE 4239 f:\sp\public\sdk\inc\ddbanned.h -FILE 4240 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4241 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4242 f:\sp\public\sdk\inc\winuser.h -FILE 4243 f:\sp\public\sdk\inc\pshpack2.h -FILE 4244 f:\sp\public\sdk\inc\mcx.h -FILE 4245 f:\sp\public\sdk\inc\winuser.h -FILE 4246 f:\sp\public\sdk\inc\winnls.h -FILE 4247 f:\sp\public\sdk\inc\stralign.h -FILE 4248 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4249 f:\sp\public\sdk\inc\windef.h -FILE 4250 f:\sp\public\sdk\inc\tvout.h -FILE 4251 f:\sp\public\sdk\inc\winsvc.h -FILE 4252 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 4253 f:\sp\public\sdk\inc\wingdi.h -FILE 4254 f:\sp\public\sdk\inc\pshpack4.h -FILE 4255 f:\sp\public\sdk\inc\poppack.h -FILE 4256 f:\sp\public\sdk\inc\winnt.h -FILE 4257 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4258 f:\sp\public\sdk\inc\winnetwk.h -FILE 4259 f:\sp\public\sdk\inc\imm.h -FILE 4260 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoa.c -FILE 4261 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4262 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4263 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4264 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4265 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4266 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoas.c -FILE 4267 f:\sp\public\sdk\inc\pshpack1.h -FILE 4268 f:\sp\public\sdk\inc\winver.h -FILE 4269 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4270 f:\sp\public\sdk\inc\guiddef.h -FILE 4271 f:\sp\public\sdk\inc\specstrings.h -FILE 4272 f:\sp\public\sdk\inc\basetsd.h -FILE 4273 f:\sp\public\sdk\inc\winreg.h -FILE 4274 f:\sp\public\sdk\inc\ddbanned.h -FILE 4275 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4276 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4277 f:\sp\public\sdk\inc\windows.h -FILE 4278 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4279 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4280 f:\sp\public\sdk\inc\winbase.h -FILE 4281 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4282 f:\sp\public\sdk\inc\winerror.h -FILE 4283 f:\sp\public\sdk\inc\pshpack8.h -FILE 4284 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 4285 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4286 f:\sp\public\sdk\inc\reason.h -FILE 4287 f:\sp\public\sdk\inc\wincon.h -FILE 4288 f:\sp\public\sdk\inc\poppack.h -FILE 4289 f:\sp\public\sdk\inc\winnetwk.h -FILE 4290 f:\sp\public\sdk\inc\imm.h -FILE 4291 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4292 f:\sp\public\sdk\inc\windef.h -FILE 4293 f:\sp\public\sdk\inc\pshpack1.h -FILE 4294 f:\sp\public\sdk\inc\winver.h -FILE 4295 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4296 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4297 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4298 f:\sp\public\sdk\inc\winnt.h -FILE 4299 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4300 f:\sp\public\sdk\inc\winreg.h -FILE 4301 f:\sp\vctools\crt_bld\self_x86\crt\src\atox.c -FILE 4302 f:\sp\public\sdk\inc\winbase.h -FILE 4303 f:\sp\public\sdk\inc\winerror.h -FILE 4304 f:\sp\public\sdk\inc\pshpack8.h -FILE 4305 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4306 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4307 f:\sp\public\sdk\inc\reason.h -FILE 4308 f:\sp\public\sdk\inc\wincon.h -FILE 4309 f:\sp\public\sdk\inc\ddbanned.h -FILE 4310 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4311 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4312 f:\sp\public\sdk\inc\pshpack2.h -FILE 4313 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 4314 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4315 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4316 f:\sp\public\sdk\inc\mcx.h -FILE 4317 f:\sp\public\sdk\inc\winuser.h -FILE 4318 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4319 f:\sp\public\sdk\inc\winnls.h -FILE 4320 f:\sp\public\sdk\inc\guiddef.h -FILE 4321 f:\sp\public\sdk\inc\windows.h -FILE 4322 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4323 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4324 f:\sp\public\sdk\inc\specstrings.h -FILE 4325 f:\sp\public\sdk\inc\basetsd.h -FILE 4326 f:\sp\public\sdk\inc\stralign.h -FILE 4327 f:\sp\public\sdk\inc\tvout.h -FILE 4328 f:\sp\public\sdk\inc\winsvc.h -FILE 4329 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4330 f:\sp\public\sdk\inc\wingdi.h -FILE 4331 f:\sp\public\sdk\inc\pshpack4.h -PUBLIC 1005 0 @ILT+0(?h@C@google_breakpad@@SAPADABV12@@Z) -PUBLIC 100a 0 @ILT+5(?set_member@C@google_breakpad@@QAEXH@Z) -PUBLIC 100f 0 @ILT+10(??_EC@google_breakpad@@UAEPAXI@Z) -PUBLIC 1014 0 @ILT+15(??_EC@google_breakpad@@UAEPAXI@Z) -PUBLIC 1019 0 @ILT+20(?f@C@google_breakpad@@QAEXXZ) -PUBLIC 101e 0 @ILT+25(_main) -PUBLIC 1023 0 @ILT+30(??0C@google_breakpad@@QAE@XZ) -PUBLIC 1028 0 @ILT+35(??1C@google_breakpad@@UAE@XZ) -PUBLIC 102d 0 @ILT+40(?g@C@google_breakpad@@UAEHXZ) -FUNC 1060 54 8 main -1060 6 57 1 -1066 8 58 1 -106e e 59 1 -107c 8 60 1 -1084 b 61 1 -108f f 62 1 -109e 12 64 1 -10b0 4 65 1 -FUNC 10c0 a 0 google_breakpad::i -10c0 3 51 1 -10c3 5 52 1 -10c8 2 53 1 -FUNC 10f0 21 0 google_breakpad::C::C() -10f0 21 37 1 -FUNC 1120 14 0 google_breakpad::C::~C() -1120 14 38 1 -FUNC 1140 16 8 google_breakpad::C::set_member(int) -1140 16 40 1 -FUNC 1160 1e 0 google_breakpad::C::f() -1160 1e 43 1 -FUNC 1190 10 0 google_breakpad::C::g() -1190 10 44 1 -FUNC 11b0 7 4 google_breakpad::C::h(google_breakpad::C const &) -11b0 7 45 1 -FUNC 11c0 2c 0 google_breakpad::C::`vector deleting destructor'(unsigned int) -FUNC 11f7 f 4 type_info::name(__type_info_node *) -11f7 0 44 3806 -11f7 c 45 3806 -1203 3 46 3806 -FUNC 1206 e 0 type_info::~type_info() -1206 0 49 3806 -1206 d 50 3806 -1213 1 51 3806 -FUNC 1214 1c 0 type_info::`vector deleting destructor'(unsigned int) -FUNC 1230 f 4 type_info::_name_internal_method(__type_info_node *) -1230 0 54 3806 -1230 c 55 3806 -123c 3 56 3806 -FUNC 123f 8 0 type_info::_type_info_dtor_internal_method() -123f 0 59 3806 -123f 7 60 3806 -1246 1 61 3806 -FUNC 1247 1b 4 type_info::operator==(type_info const &) -1247 0 89 3806 -1247 18 90 3806 -125f 3 91 3806 -FUNC 1262 1c 4 type_info::operator!=(type_info const &) -1262 0 98 3806 -1262 19 99 3806 -127b 3 100 3806 -FUNC 127e 1f 4 type_info::before(type_info const &) -127e 0 103 3806 -127e 1c 104 3806 -129a 3 105 3806 -FUNC 129d 4 0 type_info::raw_name() -129d 0 108 3806 -129d 3 109 3806 -12a0 1 110 3806 -FUNC 12a1 b 4 type_info::type_info(type_info const &) -12a1 8 113 3806 -12a9 3 123 3806 -FUNC 12ac 5 4 type_info::operator=(type_info const &) -12ac 2 127 3806 -12ae 3 135 3806 -FUNC 12b1 5 4 operator delete(void *) -12b1 0 20 3214 -12b1 5 23 3214 -FUNC 12b6 a 4 _set_osplatform -12b6 a 385 1009 -FUNC 12c0 a 4 _set_osver -12c0 a 386 1009 -FUNC 12ca a 4 _set_winver -12ca a 387 1009 -FUNC 12d4 a 4 _set_winmajor -12d4 a 388 1009 -FUNC 12de a 4 _set_winminor -12de a 389 1009 -FUNC 12e8 24 4 fast_error_exit -12e8 0 375 1022 -12e8 9 384 1022 -12f1 5 386 1022 -12f6 9 388 1022 -12ff c 389 1022 -130b 1 390 1022 -FUNC 130c 41 0 check_managed_app -130c 0 413 1022 -130c b 418 1022 -1317 5 422 1022 -131c a 424 1022 -1326 2 425 1022 -1328 9 427 1022 -1331 2 428 1022 -1333 7 433 1022 -133a 2 434 1022 -133c d 437 1022 -1349 1 438 1022 -134a 2 419 1022 -134c 1 438 1022 -FUNC 134d 1b6 0 __tmainCRTStartup -134d c 203 1022 -1359 19 233 1022 -1372 4 234 1022 -1376 8 235 1022 -137e a 236 1022 -1388 2 242 1022 -138a 7 243 1022 -1391 3 244 1022 -1394 4 243 1022 -1398 9 244 1022 -13a1 2 245 1022 -13a3 6 248 1022 -13a9 6 249 1022 -13af 6 250 1022 -13b5 9 256 1022 -13be 9 257 1022 -13c7 8 258 1022 -13cf 6 259 1022 -13d5 d 260 1022 -13e2 6 262 1022 -13e8 5 263 1022 -13ed 6 264 1022 -13f3 6 265 1022 -13f9 6 266 1022 -13ff 8 271 1022 -1407 c 273 1022 -1413 8 274 1022 -141b 9 276 1022 -1424 8 277 1022 -142c 5 286 1022 -1431 4 294 1022 -1435 9 296 1022 -143e 8 297 1022 -1446 b 300 1022 -1451 a 303 1022 -145b 9 305 1022 -1464 8 306 1022 -146c 9 307 1022 -1475 8 308 1022 -147d 8 310 1022 -1485 4 311 1022 -1489 7 312 1022 -1490 a 326 1022 -149a 18 327 1022 -14b2 6 330 1022 -14b8 6 331 1022 -14be 5 333 1022 -14c3 2 335 1022 -14c5 17 336 1022 -14dc 6 342 1022 -14e2 6 344 1022 -14e8 6 345 1022 -14ee 5 347 1022 -14f3 7 349 1022 -14fa 3 351 1022 -14fd 6 352 1022 -FUNC 1503 a 0 mainCRTStartup -1503 0 186 1022 -1503 5 193 1022 -1508 5 195 1022 -FUNC 150d 22 18 _invoke_watson_if_error -150d 3 754 3783 -1510 6 755 3783 -1516 17 759 3783 -152d 2 760 3783 -FUNC 152f 70 4 type_info::_Type_info_dtor(type_info *) -152f c 62 3748 -153b 8 63 3748 -1543 4 64 3748 -1547 a 65 3748 -1551 d 70 3748 -155e 4 72 3748 -1562 4 74 3748 -1566 6 79 3748 -156c 7 80 3748 -1573 9 94 3748 -157c 4 101 3748 -1580 c 103 3748 -158c 6 107 3748 -1592 2 83 3748 -1594 2 72 3748 -1596 9 104 3748 -FUNC 159f f5 8 type_info::_Name_base(type_info const *,__type_info_node *) -159f c 109 3748 -15ab e 113 3748 -15b9 24 124 3748 -15dd 7 125 3748 -15e4 16 132 3748 -15fa 2 133 3748 -15fc 5 132 3748 -1601 b 136 3748 -160c 5 142 3748 -1611 a 149 3748 -161b 4 150 3748 -161f 11 157 3748 -1630 20 158 3748 -1650 5 159 3748 -1655 9 165 3748 -165e 3 166 3748 -1661 2 167 3748 -1663 7 173 3748 -166a 9 180 3748 -1673 c 181 3748 -167f 3 188 3748 -1682 6 189 3748 -1688 3 181 3748 -168b 9 182 3748 -FUNC 1694 70 4 type_info::_Type_info_dtor_internal(type_info *) -1694 c 197 3748 -16a0 8 198 3748 -16a8 4 199 3748 -16ac a 200 3748 -16b6 d 205 3748 -16c3 4 207 3748 -16c7 4 209 3748 -16cb 6 214 3748 -16d1 7 215 3748 -16d8 9 229 3748 -16e1 4 236 3748 -16e5 c 238 3748 -16f1 6 242 3748 -16f7 2 218 3748 -16f9 2 207 3748 -16fb 9 239 3748 -FUNC 1704 31 10 __unDNameHelper -1704 3 249 3748 -1707 7 250 3748 -170e 7 252 3748 -1715 1e 260 3748 -1733 2 261 3748 -FUNC 1735 eb 8 type_info::_Name_base_internal(type_info const *,__type_info_node *) -1735 c 265 3748 -1741 e 269 3748 -174f 1a 273 3748 -1769 7 274 3748 -1770 16 281 3748 -1786 2 282 3748 -1788 5 281 3748 -178d b 285 3748 -1798 5 291 3748 -179d a 298 3748 -17a7 4 299 3748 -17ab 11 306 3748 -17bc 20 307 3748 -17dc 5 308 3748 -17e1 9 314 3748 -17ea 3 315 3748 -17ed 2 316 3748 -17ef 7 322 3748 -17f6 9 329 3748 -17ff c 330 3748 -180b 3 337 3748 -180e 6 338 3748 -1814 3 330 3748 -1817 9 331 3748 -FUNC 1820 53 4 __clean_type_info_names_internal -1820 c 346 3748 -182c 8 347 3748 -1834 4 348 3748 -1838 6 352 3748 -183e 4 354 3748 -1842 3 356 3748 -1845 7 357 3748 -184c 8 358 3748 -1854 4 354 3748 -1858 c 359 3748 -1864 6 363 3748 -186a 9 361 3748 -FUNC 1880 88 8 strcmp -1880 0 65 593 -1880 4 73 593 -1884 4 74 593 -1888 6 76 593 -188e 2 77 593 -1890 2 81 593 -1892 2 83 593 -1894 2 84 593 -1896 2 85 593 -1898 2 86 593 -189a 3 87 593 -189d 2 88 593 -189f 2 89 593 -18a1 2 90 593 -18a3 3 92 593 -18a6 3 94 593 -18a9 2 95 593 -18ab 2 96 593 -18ad 2 97 593 -18af 3 98 593 -18b2 2 99 593 -18b4 3 100 593 -18b7 3 101 593 -18ba 2 102 593 -18bc 4 103 593 -18c0 2 107 593 -18c2 2 108 593 -18c4 2 115 593 -18c6 2 116 593 -18c8 3 117 593 -18cb 1 118 593 -18cc 6 122 593 -18d2 2 123 593 -18d4 2 125 593 -18d6 3 126 593 -18d9 2 127 593 -18db 2 128 593 -18dd 3 129 593 -18e0 2 130 593 -18e2 2 131 593 -18e4 6 133 593 -18ea 2 134 593 -18ec 3 139 593 -18ef 3 140 593 -18f2 2 141 593 -18f4 2 142 593 -18f6 2 143 593 -18f8 2 144 593 -18fa 3 145 593 -18fd 2 146 593 -18ff 2 147 593 -1901 2 148 593 -1903 3 149 593 -1906 2 150 593 -FUNC 1908 8e 4 free -1908 c 42 3545 -1914 7 47 3545 -191b 9 53 3545 -1924 8 57 3545 -192c 4 58 3545 -1930 e 60 3545 -193e 9 61 3545 -1947 c 64 3545 -1953 6 68 3545 -1959 3 70 3545 -195c 2 106 3545 -195e 9 65 3545 -1967 f 109 3545 -1976 4 110 3545 -197a 16 112 3545 -1990 6 115 3545 -FUNC 1996 3d 4 __CxxUnhandledExceptionFilter(_EXCEPTION_POINTERS *) -1996 0 67 3654 -1996 33 68 3654 -19c9 5 69 3654 -19ce 2 72 3654 -19d0 3 73 3654 -FUNC 19d3 e 0 __CxxSetUnhandledExceptionFilter -19d3 0 86 3654 -19d3 b 89 3654 -19de 2 90 3654 -19e0 1 91 3654 -FUNC 19e1 24 4 _amsg_exit -19e1 0 446 974 -19e1 5 449 974 -19e6 9 450 974 -19ef b 451 974 -19fa a 452 974 -1a04 1 453 974 -FUNC 1a05 26 4 __crtCorExitProcess -1a05 0 650 974 -1a05 b 654 974 -1a10 4 655 974 -1a14 c 656 974 -1a20 4 657 974 -1a24 6 658 974 -1a2a 1 668 974 -FUNC 1a2b 15 4 __crtExitProcess -1a2b 0 673 974 -1a2b a 674 974 -1a35 b 683 974 -FUNC 1a40 9 0 _lockexit -1a40 0 733 974 -1a40 8 734 974 -1a48 1 735 974 -FUNC 1a49 9 0 _unlockexit -1a49 0 759 974 -1a49 8 760 974 -1a51 1 761 974 -FUNC 1a52 18 4 _initterm -1a52 3 841 974 -1a55 2 855 974 -1a57 6 853 974 -1a5d 2 854 974 -1a5f 3 855 974 -1a62 7 848 974 -1a69 1 857 974 -FUNC 1a6a 20 8 _initterm_e -1a6a 1 890 974 -1a6b c 899 974 -1a77 6 904 974 -1a7d 2 905 974 -1a7f 3 906 974 -1a82 7 899 974 -1a89 1 910 974 -FUNC 1a8a 37 4 _get_osplatform -1a8a 0 929 974 -1a8a 27 931 974 -1ab1 1 939 974 -1ab2 9 934 974 -1abb 2 936 974 -1abd 3 938 974 -1ac0 1 939 974 -FUNC 1ac1 3c 4 _get_osver -1ac1 0 958 974 -1ac1 27 960 974 -1ae8 1 968 974 -1ae9 8 963 974 -1af1 8 965 974 -1af9 3 967 974 -1afc 1 968 974 -FUNC 1afd 3c 4 _get_winver -1afd 0 987 974 -1afd 27 989 974 -1b24 1 997 974 -1b25 8 992 974 -1b2d 8 994 974 -1b35 3 996 974 -1b38 1 997 974 -FUNC 1b39 3c 4 _get_winmajor -1b39 0 1016 974 -1b39 27 1018 974 -1b60 1 1026 974 -1b61 8 1021 974 -1b69 8 1023 974 -1b71 3 1025 974 -1b74 1 1026 974 -FUNC 1b75 3c 4 _get_winminor -1b75 0 1045 974 -1b75 27 1047 974 -1b9c 1 1055 974 -1b9d 8 1050 974 -1ba5 8 1052 974 -1bad 3 1054 974 -1bb0 1 1055 974 -FUNC 1bb1 37 4 _get_wpgmptr -1bb1 0 1074 974 -1bb1 27 1076 974 -1bd8 1 1085 974 -1bd9 9 1080 974 -1be2 2 1082 974 -1be4 3 1084 974 -1be7 1 1085 974 -FUNC 1be8 37 4 _get_pgmptr -1be8 0 1104 974 -1be8 27 1106 974 -1c0f 1 1115 974 -1c10 9 1110 974 -1c19 2 1112 974 -1c1b 3 1114 974 -1c1e 1 1115 974 -FUNC 1c1f 92 4 _cinit -1c1f 0 263 974 -1c1f 18 273 974 -1c37 b 275 974 -1c42 5 277 974 -1c47 f 283 974 -1c56 4 284 974 -1c5a 4 285 974 -1c5e a 288 974 -1c68 20 293 974 -1c88 1a 306 974 -1ca2 c 308 974 -1cae 2 312 974 -1cb0 1 313 974 -FUNC 1cb1 e2 c doexit -1cb1 c 499 974 -1cbd 8 517 974 -1cc5 5 518 974 -1cca b 520 974 -1cd5 6 521 974 -1cdb 8 524 974 -1ce3 5 526 974 -1ce8 e 542 974 -1cf6 12 543 974 -1d08 5 545 974 -1d0d b 546 974 -1d18 10 551 974 -1d28 9 552 974 -1d31 2 553 974 -1d33 10 558 974 -1d43 10 566 974 -1d53 c 584 974 -1d5f 6 588 974 -1d65 6 592 974 -1d6b 8 594 974 -1d73 8 596 974 -1d7b 3 584 974 -1d7e 6 585 974 -1d84 9 586 974 -1d8d 6 597 974 -FUNC 1d93 11 4 exit -1d93 0 397 974 -1d93 10 398 974 -1da3 1 399 974 -FUNC 1da4 11 4 _exit -1da4 0 405 974 -1da4 10 406 974 -1db4 1 407 974 -FUNC 1db5 f 0 _cexit -1db5 0 412 974 -1db5 e 413 974 -1dc3 1 414 974 -FUNC 1dc4 f 0 _c_exit -1dc4 0 419 974 -1dc4 e 420 974 -1dd2 1 421 974 -FUNC 1dd3 4c 0 _init_pointers -1dd3 1 786 974 -1dd4 7 787 974 -1ddb 6 789 974 -1de1 6 790 974 -1de7 6 791 974 -1ded 6 792 974 -1df3 6 793 974 -1df9 6 794 974 -1dff 6 795 974 -1e05 6 796 974 -1e0b 13 799 974 -1e1e 1 800 974 -FUNC 1e1f 1a0 4 _NMSG_WRITE -1e1f 2 174 832 -1e21 a 178 832 -1e2b f 179 832 -1e3a a 182 832 -1e44 2a 203 832 -1e6e c 215 832 -1e7a 2a 224 832 -1ea4 1e 227 832 -1ec2 26 228 832 -1ee8 d 231 832 -1ef5 b 233 832 -1f00 2f 234 832 -1f2f 20 237 832 -1f4f 22 238 832 -1f71 15 242 832 -1f86 a 205 832 -1f90 9 206 832 -1f99 24 212 832 -1fbd 2 245 832 -FUNC 1fbf 20 4 _GET_RTERRMSG -1fbf 0 268 832 -1fbf 2 271 832 -1fc1 13 272 832 -1fd4 2 275 832 -1fd6 1 276 832 -1fd7 7 273 832 -1fde 1 276 832 -FUNC 1fdf 39 0 _FF_MSGBANNER -1fdf 0 141 832 -1fdf 22 145 832 -2001 a 147 832 -200b c 148 832 -2017 1 150 832 -FUNC 2018 1 4 _initp_misc_winxfltr -2018 0 105 1166 -2018 1 106 1166 -FUNC 2019 32 4 xcptlookup -2019 0 410 1166 -2019 b 411 1166 -2024 14 418 1166 -2038 e 425 1166 -2046 2 428 1166 -2048 2 426 1166 -204a 1 429 1166 -FUNC 204b 15e 8 _XcptFilter -204b 6 206 1166 -2051 7 213 1166 -2058 8 214 1166 -2060 34 219 1166 -2094 2 221 1166 -2096 2 225 1166 -2098 3 227 1166 -209b 7 234 1166 -20a2 7 235 1166 -20a9 5 243 1166 -20ae 4 248 1166 -20b2 8 249 1166 -20ba 3 255 1166 -20bd 6 259 1166 -20c3 6 273 1166 -20c9 6 274 1166 -20cf c 283 1166 -20db 17 291 1166 -20f2 1e 294 1166 -2110 3 291 1166 -2113 c 321 1166 -211f 9 323 1166 -2128 7 325 1166 -212f 9 327 1166 -2138 7 329 1166 -213f 9 331 1166 -2148 7 333 1166 -214f 9 335 1166 -2158 7 337 1166 -215f 9 339 1166 -2168 7 341 1166 -216f 9 343 1166 -2178 7 345 1166 -217f 7 347 1166 -2186 8 356 1166 -218e 3 361 1166 -2191 2 363 1166 -2193 4 368 1166 -2197 3 369 1166 -219a 7 375 1166 -21a1 6 377 1166 -21a7 2 379 1166 -FUNC 21a9 1b 8 __CppXcptFilter -21a9 0 145 1166 -21a9 b 146 1166 -21b4 c 147 1166 -21c0 1 151 1166 -21c1 2 149 1166 -21c3 1 151 1166 -FUNC 21c4 db 0 _setenvp -21c4 1 77 694 -21c5 c 85 694 -21d1 5 86 694 -21d6 8 91 694 -21de 4 98 694 -21e2 8 99 694 -21ea 4 110 694 -21ee 1 111 694 -21ef 11 112 694 -2200 15 117 694 -2215 2 118 694 -2217 9 121 694 -2220 9 123 694 -2229 6 125 694 -222f 10 127 694 -223f 1c 133 694 -225b 3 134 694 -225e 6 121 694 -2264 b 138 694 -226f 6 139 694 -2275 2 142 694 -2277 a 149 694 -2281 7 152 694 -2288 17 153 694 -FUNC 229f a 4 _set_pgmptr -229f a 334 717 -FUNC 22a9 198 c parse_cmdline -22a9 4 218 736 -22ad 6 226 736 -22b3 8 230 736 -22bb 14 231 736 -22cf 3 250 736 -22d2 5 252 736 -22d7 5 254 736 -22dc 9 255 736 -22e5 2 256 736 -22e7 2 258 736 -22e9 4 259 736 -22ed 8 260 736 -22f5 2 262 736 -22f7 f 264 736 -2306 2 265 736 -2308 6 266 736 -230e a 267 736 -2318 1 268 736 -2319 1a 272 736 -2333 4 277 736 -2337 4 278 736 -233b 4 281 736 -233f 9 286 736 -2348 a 287 736 -2352 3 288 736 -2355 1 275 736 -2356 2 276 736 -2358 9 291 736 -2361 6 295 736 -2367 9 296 736 -2370 2 297 736 -2372 3 311 736 -2375 4 315 736 -2379 1 318 736 -237a 1 319 736 -237b 5 316 736 -2380 5 321 736 -2385 5 324 736 -238a e 325 736 -2398 2 326 736 -239a 2 327 736 -239c d 329 736 -23a9 2 332 736 -23ab 5 336 736 -23b0 4 337 736 -23b4 4 338 736 -23b8 6 339 736 -23be 3 338 736 -23c1 14 343 736 -23d5 4 348 736 -23d9 2 349 736 -23db 10 350 736 -23eb b 351 736 -23f6 2 352 736 -23f8 a 354 736 -2402 2 355 736 -2404 a 356 736 -240e 1 357 736 -240f 2 358 736 -2411 5 361 736 -2416 1 363 736 -2417 5 372 736 -241c 4 376 736 -2420 7 377 736 -2427 2 378 736 -2429 8 379 736 -2431 9 382 736 -243a 3 383 736 -243d 2 384 736 -243f 2 385 736 -FUNC 2441 b9 0 _setargv -2441 7 88 736 -2448 c 97 736 -2454 5 98 736 -2459 18 104 736 -2471 19 120 736 -248a 11 127 736 -249b 15 132 736 -24b0 a 136 736 -24ba 2 138 736 -24bc 8 140 736 -24c4 3 141 736 -24c7 2 142 736 -24c9 13 149 736 -24dc c 153 736 -24e8 6 157 736 -24ee 4 172 736 -24f2 6 134 736 -24f8 2 173 736 -FUNC 24fa 135 0 __crtGetEnvironmentStringsA -24fa 2 43 2721 -24fc 1a 57 2721 -2516 8 59 2721 -251e c 60 2721 -252a b 62 2721 -2535 e 63 2721 -2543 9 68 2721 -254c 4 71 2721 -2550 8 72 2721 -2558 7 73 2721 -255f 7 77 2721 -2566 7 78 2721 -256d 7 79 2721 -2574 1b 93 2721 -258f 13 97 2721 -25a2 11 111 2721 -25b3 a 113 2721 -25bd 8 114 2721 -25c5 7 99 2721 -25cc 4 100 2721 -25d0 6 123 2721 -25d6 2 152 2721 -25d8 a 126 2721 -25e2 6 127 2721 -25e8 4 133 2721 -25ec 5 134 2721 -25f1 5 135 2721 -25f6 5 138 2721 -25fb d 140 2721 -2608 7 141 2721 -260f 5 142 2721 -2614 b 145 2721 -261f 7 147 2721 -2626 6 149 2721 -262c 3 153 2721 -FUNC 262f 240 0 _ioinit -262f c 111 3137 -263b 5 122 3137 -2640 a 127 3137 -264a 7 128 3137 -2651 f 137 3137 -2660 6 139 3137 -2666 5 142 3137 -266b 6 143 3137 -2671 8 145 3137 -2679 4 146 3137 -267d 3 147 3137 -2680 4 148 3137 -2684 3 149 3137 -2687 4 151 3137 -268b 4 152 3137 -268f 4 153 3137 -2693 13 145 3137 -26a6 15 161 3137 -26bb 2 166 3137 -26bd 3 172 3137 -26c0 6 173 3137 -26c6 b 179 3137 -26d1 5 185 3137 -26d6 f 191 3137 -26e5 9 204 3137 -26ee 7 205 3137 -26f5 8 207 3137 -26fd 4 208 3137 -2701 3 209 3137 -2704 4 210 3137 -2708 4 211 3137 -270c 4 212 3137 -2710 4 213 3137 -2714 4 214 3137 -2718 f 207 3137 -2727 9 185 3137 -2730 2 284 3137 -2732 6 197 3137 -2738 8 221 3137 -2740 24 234 3137 -2764 15 236 3137 -2779 7 237 3137 -2780 5 238 3137 -2785 18 241 3137 -279d 3 243 3137 -27a0 d 221 3137 -27ad 2 253 3137 -27af b 255 3137 -27ba c 258 3137 -27c6 6 306 3137 -27cc 4 262 3137 -27d0 30 266 3137 -2800 2 271 3137 -2802 a 277 3137 -280c 6 278 3137 -2812 5 279 3137 -2817 4 280 3137 -281b 14 284 3137 -282f 3 286 3137 -2832 2 288 3137 -2834 4 297 3137 -2838 6 298 3137 -283e a 253 3137 -2848 c 313 3137 -2854 4 315 3137 -2858 7 128 3137 -285f a 129 3137 -2869 6 316 3137 -FUNC 286f 4c 0 _ioterm -286f 2 341 3137 -2871 5 345 3137 -2876 6 347 3137 -287c 8 353 3137 -2884 9 355 3137 -288d 11 356 3137 -289e 4 353 3137 -28a2 7 361 3137 -28a9 11 362 3137 -28ba 1 365 3137 -FUNC 28bb 24 0 _RTC_Initialize -FUNC 28df 24 0 _RTC_Terminate -FUNC 2903 6c 0 _use_encode_pointer -2903 7 66 641 -290a 2 72 641 -290c 12 75 641 -291e 7 76 641 -2925 5 78 641 -292a 7 82 641 -2931 5 85 641 -2936 e 91 641 -2944 1f 93 641 -2963 4 95 641 -2967 6 100 641 -296d 2 101 641 -FUNC 296f 6e 4 _encode_pointer -296f 1 120 641 -2970 2b 129 641 -299b 8 145 641 -29a3 d 133 641 -29b0 d 135 641 -29bd c 138 641 -29c9 4 148 641 -29cd a 150 641 -29d7 5 153 641 -29dc 1 154 641 -FUNC 29dd 9 0 _encoded_null -29dd 0 173 641 -29dd 8 174 641 -29e5 1 175 641 -FUNC 29e6 6e 4 _decode_pointer -29e6 1 194 641 -29e7 2b 203 641 -2a12 8 219 641 -2a1a d 207 641 -2a27 d 209 641 -2a34 c 212 641 -2a40 4 222 641 -2a44 a 224 641 -2a4e 5 227 641 -2a53 1 228 641 -FUNC 2a54 9 4 __crtTlsAlloc -2a54 0 240 641 -2a54 6 241 641 -2a5a 3 242 641 -FUNC 2a5d 15 4 __fls_getvalue -2a5d 0 258 641 -2a5d 12 259 641 -2a6f 3 260 641 -FUNC 2a72 6 0 __get_flsindex -2a72 0 272 641 -2a72 5 273 641 -2a77 1 274 641 -FUNC 2a78 32 0 __set_flsgetvalue -2a78 1 286 641 -2a79 e 288 641 -2a87 4 289 641 -2a8b e 291 641 -2a99 d 292 641 -2aa6 3 294 641 -2aa9 1 298 641 -FUNC 2aaa 19 8 __fls_setvalue -2aaa 0 315 641 -2aaa 16 316 641 -2ac0 3 317 641 -FUNC 2ac3 3d 0 _mtterm -2ac3 0 473 641 -2ac3 a 480 641 -2acd f 481 641 -2adc 7 482 641 -2ae3 a 485 641 -2aed 7 486 641 -2af4 7 487 641 -2afb 5 494 641 -FUNC 2b00 bf 8 _initptd -2b00 c 521 641 -2b0c e 522 641 -2b1a a 524 641 -2b24 6 525 641 -2b2a 4 527 641 -2b2e 9 529 641 -2b37 16 532 641 -2b4d 10 533 641 -2b5d 3 540 641 -2b60 7 544 641 -2b67 7 545 641 -2b6e 8 546 641 -2b76 7 547 641 -2b7d 8 551 641 -2b85 4 552 641 -2b89 6 553 641 -2b8f 4 561 641 -2b93 8 562 641 -2b9b 9 563 641 -2ba4 c 565 641 -2bb0 6 568 641 -2bb6 9 566 641 -FUNC 2bbf 77 0 _getptd_noexit -2bbf 2 588 641 -2bc1 6 592 641 -2bc7 15 600 641 -2bdc 14 608 641 -2bf0 19 610 641 -2c09 a 616 641 -2c13 6 618 641 -2c19 6 619 641 -2c1f 2 621 641 -2c21 7 627 641 -2c28 2 628 641 -2c2a 8 633 641 -2c32 3 635 641 -2c35 1 636 641 -FUNC 2c36 18 0 _getptd -2c36 1 657 641 -2c37 7 658 641 -2c3e 4 659 641 -2c42 8 660 641 -2c4a 3 662 641 -2c4d 1 663 641 -FUNC 2c4e 121 4 _freefls -2c4e c 691 641 -2c5a b 702 641 -2c65 7 703 641 -2c6c 7 704 641 -2c73 7 706 641 -2c7a 7 707 641 -2c81 7 709 641 -2c88 7 710 641 -2c8f 7 712 641 -2c96 7 713 641 -2c9d 7 715 641 -2ca4 7 716 641 -2cab 7 718 641 -2cb2 7 719 641 -2cb9 a 721 641 -2cc3 7 722 641 -2cca 8 724 641 -2cd2 4 725 641 -2cd6 1a 728 641 -2cf0 7 729 641 -2cf7 c 731 641 -2d03 8 735 641 -2d0b 7 737 641 -2d12 7 738 641 -2d19 7 740 641 -2d20 15 743 641 -2d35 7 744 641 -2d3c c 747 641 -2d48 7 751 641 -2d4f 8 754 641 -2d57 3 731 641 -2d5a 9 732 641 -2d63 3 747 641 -2d66 9 748 641 -FUNC 2d6f 69 4 _freeptd -2d6f 0 778 641 -2d6f a 783 641 -2d79 1b 795 641 -2d94 13 796 641 -2da7 16 802 641 -2dbd 7 804 641 -2dc4 a 807 641 -2dce 9 811 641 -2dd7 1 813 641 -FUNC 2dd8 6 0 __threadid -2dd8 0 837 641 -2dd8 6 838 641 -FUNC 2dde 6 0 __threadhandle -2dde 0 844 641 -2dde 6 845 641 -FUNC 2de4 184 0 _mtinit -2de4 1 346 641 -2de5 d 355 641 -2df2 4 356 641 -2df6 5 357 641 -2dfb 3 358 641 -2dfe 2 444 641 -2e00 e 362 641 -2e0e d 365 641 -2e1b d 368 641 -2e28 d 371 641 -2e35 2a 372 641 -2e5f a 375 641 -2e69 1a 379 641 -2e83 25 388 641 -2ea8 5 393 641 -2ead b 400 641 -2eb8 10 401 641 -2ec8 10 402 641 -2ed8 18 403 641 -2ef0 7 410 641 -2ef7 2 412 641 -2ef9 1b 418 641 -2f14 2 420 641 -2f16 2d 428 641 -2f43 a 438 641 -2f4d 6 440 641 -2f53 6 441 641 -2f59 5 443 641 -2f5e 5 430 641 -2f63 4 389 641 -2f67 1 444 641 -FUNC 2f68 5b 0 __heap_select -2f68 6 70 3503 -2f6e 23 143 3503 -2f91 1b 144 3503 -2fac d 145 3503 -2fb9 3 146 3503 -2fbc 2 164 3503 -2fbe 3 161 3503 -2fc1 2 164 3503 -FUNC 2fc3 5a 4 _heap_init -2fc3 0 192 3503 -2fc3 20 199 3503 -2fe3 2 200 3503 -2fe5 1 240 3503 -2fe6 5 204 3503 -2feb a 206 3503 -2ff5 f 209 3503 -3004 c 211 3503 -3010 7 212 3503 -3017 2 213 3503 -3019 3 239 3503 -301c 1 240 3503 -FUNC 301d 74 0 _heap_term -301d 1 261 3503 -301e c 264 3503 -302a 1b 270 3503 -3045 f 273 3503 -3054 b 276 3503 -305f d 278 3503 -306c 11 281 3503 -307d c 300 3503 -3089 7 301 3503 -3090 1 302 3503 -FUNC 3091 6 0 _get_heap_handle -3091 0 320 3503 -3091 5 322 3503 -3096 1 323 3503 -FUNC 3098 45 0 _SEH_prolog4 -FUNC 30dd 14 0 _SEH_epilog4 -FUNC 3100 24 0 ValidateLocalCookies -FUNC 3130 196 10 _except_handler4 -FUNC 32c6 94 0 __security_init_cookie -32c6 6 97 2103 -32cc 21 114 2103 -32ed 7 116 2103 -32f4 3 117 2103 -32f7 a 127 2103 -3301 6 132 2103 -3307 8 135 2103 -330f 8 136 2103 -3317 8 137 2103 -331f 10 139 2103 -332f 2 144 2103 -3331 4 161 2103 -3335 7 163 2103 -333c 4 166 2103 -3340 7 168 2103 -3347 6 172 2103 -334d b 173 2103 -3358 2 175 2103 -FUNC 335a a 4 _initp_misc_invarg -335a 0 38 1742 -335a 9 39 1742 -3363 1 40 1742 -FUNC 3364 fc 14 _invoke_watson -3364 1c 111 1742 -3380 6 128 1742 -3386 6 129 1742 -338c 6 130 1742 -3392 3 131 1742 -3395 3 132 1742 -3398 3 133 1742 -339b 7 134 1742 -33a2 7 135 1742 -33a9 4 136 1742 -33ad 4 137 1742 -33b1 4 138 1742 -33b5 4 139 1742 -33b9 1 140 1742 -33ba 6 141 1742 -33c0 6 147 1742 -33c6 19 148 1742 -33df 3 150 1742 -33e2 13 163 1742 -33f5 6 168 1742 -33fb 13 169 1742 -340e 6 171 1742 -3414 a 174 1742 -341e a 176 1742 -3428 8 180 1742 -3430 8 181 1742 -3438 12 184 1742 -344a 16 185 1742 -FUNC 3460 22 4 _set_invalid_parameter_handler -3460 1 207 1742 -3461 b 211 1742 -346c d 212 1742 -3479 5 214 1742 -347e 3 216 1742 -3481 1 217 1742 -FUNC 3482 d 0 _get_invalid_parameter_handler -3482 0 221 1742 -3482 c 225 1742 -348e 1 228 1742 -FUNC 348f 9 14 _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -348f 3 266 1742 -3492 1 274 1742 -3493 5 273 1742 -FUNC 3498 24 14 _invalid_parameter -3498 3 70 1742 -349b b 77 1742 -34a6 5 78 1742 -34ab 1 89 1742 -34ac 2 80 1742 -34ae 8 86 1742 -34b6 1 89 1742 -34b7 5 88 1742 -FUNC 34bc 10 0 _invalid_parameter_noinfo -34bc 0 98 1742 -34bc f 99 1742 -34cb 1 100 1742 -FUNC 34cc 9 14 _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -34cc 3 249 1742 -34cf 1 257 1742 -34d0 5 256 1742 -FUNC 34d5 49 0 _mtinitlocks -34d5 2 137 785 -34d7 7 144 785 -34de 11 145 785 -34ef 2 146 785 -34f1 15 148 785 -3506 6 144 785 -350c 5 157 785 -3511 d 158 785 -FUNC 351e 55 0 _mtdeletelocks -351e 1 188 785 -351f d 194 785 -352c c 196 785 -3538 3 200 785 -353b 6 206 785 -3541 f 207 785 -3550 6 215 785 -3556 c 217 785 -3562 10 221 785 -3572 1 224 785 -FUNC 3573 15 4 _unlock -3573 3 371 785 -3576 10 375 785 -3586 2 376 785 -FUNC 3588 18 4 _lockerr_exit -3588 0 403 785 -3588 c 404 785 -3594 b 405 785 -359f 1 406 785 -FUNC 35a0 c3 4 _mtinitlocknum -35a0 c 259 785 -35ac 6 261 785 -35b2 a 269 785 -35bc 5 270 785 -35c1 7 271 785 -35c8 c 272 785 -35d4 e 276 785 -35e2 4 277 785 -35e6 e 279 785 -35f4 b 280 785 -35ff 4 281 785 -3603 8 284 785 -360b 3 285 785 -360e 4 287 785 -3612 11 288 785 -3623 7 289 785 -362a b 290 785 -3635 3 291 785 -3638 2 292 785 -363a 2 293 785 -363c 2 296 785 -363e 7 297 785 -3645 c 300 785 -3651 3 304 785 -3654 6 305 785 -365a 9 301 785 -FUNC 3663 31 4 _lock -3663 3 333 785 -3666 10 338 785 -3676 b 340 785 -3681 8 341 785 -3689 9 348 785 -3692 2 349 785 -FUNC 3694 65 c strcpy_s -3694 0 13 448 -3694 30 18 448 -36c4 c 19 448 -36d0 2 21 448 -36d2 d 23 448 -36df 4 27 448 -36e3 2 29 448 -36e5 e 30 448 -36f3 5 33 448 -36f8 1 34 448 -FUNC 3700 8b 4 strlen -3700 0 54 547 -3700 4 63 547 -3704 6 64 547 -370a 2 65 547 -370c 2 69 547 -370e 3 70 547 -3711 2 71 547 -3713 2 72 547 -3715 6 73 547 -371b 2 74 547 -371d 13 76 547 -3730 2 81 547 -3732 5 82 547 -3737 2 83 547 -3739 3 84 547 -373c 2 85 547 -373e 3 86 547 -3741 5 87 547 -3746 2 88 547 -3748 3 90 547 -374b 2 91 547 -374d 2 92 547 -374f 2 93 547 -3751 2 94 547 -3753 5 95 547 -3758 2 96 547 -375a 5 97 547 -375f 2 98 547 -3761 2 99 547 -3763 3 103 547 -3766 4 104 547 -376a 2 105 547 -376c 1 106 547 -376d 3 108 547 -3770 4 109 547 -3774 2 110 547 -3776 1 111 547 -3777 3 113 547 -377a 4 114 547 -377e 2 115 547 -3780 1 116 547 -3781 3 118 547 -3784 4 119 547 -3788 2 120 547 -378a 1 121 547 -FUNC 378b 6 0 HeapManager::Block::Block() -378b 6 90 3704 -FUNC 3791 1b 8 HeapManager::Constructor(void * (*)(unsigned int),void (*)(void *)) -3791 6 100 3704 -3797 7 101 3704 -379e 5 102 3704 -37a3 3 103 3704 -37a6 3 104 3704 -37a9 3 105 3704 -FUNC 37ac 26 0 HeapManager::Destructor() -37ac 9 110 3704 -37b5 2 111 3704 -37b7 5 113 3704 -37bc 15 115 3704 -37d1 1 118 3704 -FUNC 37d2 63 0 UnDecorator::getNumberOfDimensions() -37d2 0 1663 3704 -37d2 c 1664 3704 -37de 2 1665 3704 -37e0 1 1696 3704 -37e1 a 1666 3704 -37eb d 1667 3704 -37f8 1 1696 3704 -37f9 4 1670 3704 -37fd 4 1677 3704 -3801 a 1679 3704 -380b 6 1680 3704 -3811 d 1684 3704 -381e 5 1675 3704 -3823 e 1690 3704 -3831 3 1691 3704 -3834 1 1696 3704 -FUNC 3835 474 0 UnDecorator::getTypeEncoding() -3835 f 2335 3704 -3844 2 2336 3704 -3846 5 2341 3704 -384b 9 2345 3704 -3854 c 2351 3704 -3860 9 2423 3704 -3869 2 2426 3704 -386b 2a 2427 3704 -3895 8 2450 3704 -389d 2 2451 3704 -389f 24 2454 3704 -38c3 7 2462 3704 -38ca 5 2463 3704 -38cf 6 2353 3704 -38d5 8 2358 3704 -38dd b 2362 3704 -38e8 5 2363 3704 -38ed 2 2364 3704 -38ef 5 2365 3704 -38f4 9 2369 3704 -38fd 1b 2373 3704 -3918 11 2377 3704 -3929 a 2393 3704 -3933 10 2388 3704 -3943 2 2389 3704 -3945 18 2384 3704 -395d 2 2385 3704 -395f 12 2380 3704 -3971 16 2399 3704 -3987 11 2418 3704 -3998 a 2406 3704 -39a2 5 2407 3704 -39a7 15 2410 3704 -39bc 5 2422 3704 -39c1 1b 2427 3704 -39dc a 2430 3704 -39e6 5 2431 3704 -39eb 7 2472 3704 -39f2 a 2478 3704 -39fc c 2483 3704 -3a08 5 2485 3704 -3a0d 5 2486 3704 -3a12 5 2487 3704 -3a17 5 2490 3704 -3a1c 5 2505 3704 -3a21 5 2508 3704 -3a26 5 2509 3704 -3a2b 5 2434 3704 -3a30 5 2435 3704 -3a35 1a 2427 3704 -3a4f 30 2568 3704 -3a7f 5 2529 3704 -3a84 4 2530 3704 -3a88 a 2531 3704 -3a92 2 2532 3704 -3a94 a 2533 3704 -3a9e 5 2537 3704 -3aa3 5 2538 3704 -3aa8 2 2539 3704 -3aaa 5 2540 3704 -3aaf e 2544 3704 -3abd 6 2560 3704 -3ac3 10 2555 3704 -3ad3 2 2556 3704 -3ad5 18 2551 3704 -3aed 2 2552 3704 -3aef 12 2547 3704 -3b01 2 2564 3704 -3b03 a 2442 3704 -3b0d 2 2443 3704 -3b0f a 2438 3704 -3b19 2 2439 3704 -3b1b 5 2445 3704 -3b20 c 2574 3704 -3b2c 14 2577 3704 -3b40 a 2579 3704 -3b4a 18 2586 3704 -3b62 1a 2589 3704 -3b7c 1b 2590 3704 -3b97 5 2591 3704 -3b9c 1a 2594 3704 -3bb6 1b 2595 3704 -3bd1 5 2596 3704 -3bd6 1a 2599 3704 -3bf0 10 2600 3704 -3c00 2 2601 3704 -3c02 7 2604 3704 -3c09 2 2605 3704 -3c0b a 2608 3704 -3c15 2 2609 3704 -3c17 a 2612 3704 -3c21 2 2613 3704 -3c23 a 2616 3704 -3c2d 2 2617 3704 -3c2f a 2620 3704 -3c39 2 2621 3704 -3c3b a 2624 3704 -3c45 7 2634 3704 -3c4c 7 2635 3704 -3c53 7 2637 3704 -3c5a 10 2639 3704 -3c6a 3f 2648 3704 -FUNC 3ca9 b 0 UnDecorator::doUnderScore() -3ca9 b 4259 3704 -FUNC 3cb4 d 0 UnDecorator::doMSKeywords() -3cb4 d 4260 3704 -FUNC 3cc1 e 0 UnDecorator::doPtr64() -3cc1 e 4261 3704 -FUNC 3ccf e 0 UnDecorator::doFunctionReturns() -3ccf e 4262 3704 -FUNC 3cdd e 0 UnDecorator::doAllocationModel() -3cdd e 4263 3704 -FUNC 3ceb e 0 UnDecorator::doAllocationLanguage() -3ceb e 4264 3704 -FUNC 3cf9 12 0 UnDecorator::doThisTypes() -3cf9 12 4271 3704 -FUNC 3d0b e 0 UnDecorator::doAccessSpecifiers() -3d0b e 4272 3704 -FUNC 3d19 e 0 UnDecorator::doThrowTypes() -3d19 e 4273 3704 -FUNC 3d27 e 0 UnDecorator::doMemberTypes() -3d27 e 4274 3704 -FUNC 3d35 b 0 UnDecorator::doNameOnly() -3d35 b 4279 3704 -FUNC 3d40 b 0 UnDecorator::doTypeOnly() -3d40 b 4280 3704 -FUNC 3d4b b 0 UnDecorator::haveTemplateParameters() -3d4b b 4281 3704 -FUNC 3d56 e 0 UnDecorator::doEcsu() -3d56 e 4282 3704 -FUNC 3d64 b 0 UnDecorator::doNoIdentCharCheck() -3d64 b 4283 3704 -FUNC 3d6f e 0 UnDecorator::doEllipsis() -3d6f e 4284 3704 -FUNC 3d7d 19 4 UnDecorator::UScore(Tokens) -3d7d 0 4288 3704 -3d7d 9 4293 3704 -3d86 d 4294 3704 -3d93 2 4296 3704 -3d95 1 4298 3704 -FUNC 3d96 84 8 HeapManager::getMemory(unsigned int,int) -3d96 2 134 3737 -3d98 a 137 3737 -3da2 9 139 3737 -3dab 6 140 3737 -3db1 4 146 3737 -3db5 3 147 3737 -3db8 8 149 3737 -3dc0 7 153 3737 -3dc7 2 154 3737 -3dc9 1c 159 3737 -3de5 4 164 3737 -3de9 7 168 3737 -3df0 2 169 3737 -3df2 2 170 3737 -3df4 3 171 3737 -3df7 8 175 3737 -3dff 2 182 3737 -3e01 4 179 3737 -3e05 5 183 3737 -3e0a d 187 3737 -3e17 3 190 3737 -FUNC 3e1a d 0 DName::DName() -3e1a 2 210 3737 -3e1c 3 211 3737 -3e1f 7 220 3737 -3e26 1 221 3737 -FUNC 3e27 12 4 DName::DName(DNameNode *) -3e27 2 224 3737 -3e29 4 225 3737 -3e2d 9 234 3737 -3e36 3 235 3737 -FUNC 3e39 9c 4 DName::DName(DName const &) -3e39 2 259 3737 -3e3b 17 260 3737 -3e52 10 261 3737 -3e62 d 262 3737 -3e6f d 263 3737 -3e7c 10 264 3737 -3e8c 4 265 3737 -3e90 e 266 3737 -3e9e 13 267 3737 -3eb1 10 268 3737 -3ec1 11 269 3737 -3ed2 3 270 3737 -FUNC 3ed5 a 0 DName::status() -3ed5 a 481 3737 -FUNC 3edf 5 0 DName::clearStatus() -3edf 5 482 3737 -FUNC 3ee4 7 0 DName::setPtrRef() -3ee4 7 484 3737 -FUNC 3eeb a 0 DName::isPtrRef() -3eeb a 485 3737 -FUNC 3ef5 8 0 DName::setIsArray() -3ef5 8 490 3737 -FUNC 3efd a 0 DName::isArray() -3efd a 491 3737 -FUNC 3f07 a 0 DName::isNoTE() -3f07 a 492 3737 -FUNC 3f11 8 0 DName::setIsNoTE() -3f11 8 493 3737 -FUNC 3f19 a 0 DName::isPinPtr() -3f19 a 494 3737 -FUNC 3f23 8 0 DName::setIsPinPtr() -3f23 8 495 3737 -FUNC 3f2b a 0 DName::isComArray() -3f2b a 496 3737 -FUNC 3f35 8 0 DName::setIsComArray() -3f35 8 497 3737 -FUNC 3f3d a 0 DName::isVCallThunk() -3f3d a 498 3737 -FUNC 3f47 8 0 DName::setIsVCallThunk() -3f47 8 499 3737 -FUNC 3f4f 7b 4 DName::operator=(DName const &) -3f4f 3 879 3737 -3f52 12 880 3737 -3f64 17 882 3737 -3f7b d 883 3737 -3f88 d 884 3737 -3f95 d 885 3737 -3fa2 10 886 3737 -3fb2 10 887 3737 -3fc2 5 889 3737 -3fc7 3 897 3737 -FUNC 3fca 9 0 Replicator::isFull() -3fca 9 1001 3737 -FUNC 3fd3 25 4 Replicator::operator[](int) -3fd3 0 1028 3737 -3fd3 9 1029 3737 -3fdc b 1031 3737 -3fe7 6 1034 3737 -3fed 5 1032 3737 -3ff2 3 1030 3737 -3ff5 3 1036 3737 -FUNC 3ff8 d 0 DNameNode::DNameNode() -3ff8 d 1048 3737 -FUNC 4005 4 0 DNameNode::nextNode() -4005 4 1052 3737 -FUNC 4009 29 4 DNameNode::operator+=(DNameNode *) -4009 2 1131 3737 -400b 8 1132 3737 -4013 8 1134 3737 -401b b 1139 3737 -4026 4 1144 3737 -402a 2 1147 3737 -402c 3 1148 3737 -402f 3 1156 3737 -FUNC 4032 16 4 charNode::charNode(char) -4032 16 1166 3737 -FUNC 4048 4 0 charNode::length() -4048 4 1168 3737 -FUNC 404c 4 0 charNode::getLastChar() -404c 4 1170 3737 -FUNC 4050 1b 8 charNode::getString(char *,int) -4050 0 1173 3737 -4050 f 1174 3737 -405f 5 1175 3737 -4064 2 1176 3737 -4066 2 1177 3737 -4068 3 1183 3737 -FUNC 406b 4 0 pcharNode::length() -406b 4 1189 3737 -FUNC 406f 2f 4 pDNameNode::pDNameNode(DName *) -406f 2f 1244 3737 -FUNC 409e 25 4 DNameStatusNode::DNameStatusNode(DNameStatus) -409e 25 1261 3737 -FUNC 40c3 4 0 DNameStatusNode::length() -40c3 4 1263 3737 -FUNC 40c7 d 0 DNameStatusNode::getLastChar() -40c7 d 1266 3737 -FUNC 40d4 e 0 und_strlen -40d4 0 1283 3737 -40d4 6 1286 3737 -40da 7 1287 3737 -40e1 1 1291 3737 -FUNC 40e2 20 8 und_strncpy -40e2 0 1295 3737 -40e2 1b 1296 3737 -40fd 4 1299 3737 -4101 1 1301 3737 -FUNC 4102 25 4 und_strncmp -4102 0 1304 3737 -4102 7 1305 3737 -4109 2 1306 3737 -410b 1 1315 3737 -410c a 1308 3737 -4116 1 1310 3737 -4117 1 1311 3737 -4118 6 1308 3737 -411e 8 1314 3737 -4126 1 1315 3737 -FUNC 4127 33 0 UnDecorator::getDataIndirectType() -4127 33 4033 3704 -FUNC 415a 34 0 UnDecorator::getThisType() -415a 34 4034 3704 -FUNC 418e 13 c operator new(unsigned int,HeapManager &,int) -418e 13 131 3737 -FUNC 41a1 56 4 DName::DName(DName *) -41a1 0 274 3737 -41a1 a 275 3737 -41ab 23 277 3737 -41ce 13 278 3737 -41e1 2 281 3737 -41e3 4 283 3737 -41e7 3 284 3737 -41ea 7 295 3737 -41f1 6 296 3737 -FUNC 41f7 61 4 DName::DName(DNameStatus) -41f7 2 457 3737 -41f9 21 458 3737 -421a 1e 459 3737 -4238 7 467 3737 -423f 9 469 3737 -4248 a 470 3737 -4252 6 472 3737 -FUNC 4258 17 0 DName::isValid() -4258 17 478 3737 -FUNC 426f 15 0 DName::isEmpty() -426f 15 479 3737 -FUNC 4284 14 0 DName::isUDC() -4284 14 486 3737 -FUNC 4298 e 0 DName::setIsUDC() -4298 e 487 3737 -FUNC 42a6 14 0 DName::isUDTThunk() -42a6 14 488 3737 -FUNC 42ba 25 0 DName::length() -42ba 1 502 3737 -42bb 2 503 3737 -42bd a 506 3737 -42c7 4 507 3737 -42cb b 508 3737 -42d6 5 507 3737 -42db 3 510 3737 -42de 1 512 3737 -FUNC 42df 38 0 DName::getLastChar() -42df 2 516 3737 -42e1 2 517 3737 -42e3 9 519 3737 -42ec 6 520 3737 -42f2 a 521 3737 -42fc 2 522 3737 -42fe 7 520 3737 -4305 11 524 3737 -4316 1 526 3737 -FUNC 4317 91 8 DName::getString(char *,int) -4317 7 530 3737 -431e 9 531 3737 -4327 5 535 3737 -432c 7 537 3737 -4333 e 538 3737 -4341 c 544 3737 -434d d 550 3737 -435a 4 553 3737 -435e 8 555 3737 -4366 4 561 3737 -436a 6 565 3737 -4370 2 566 3737 -4372 b 570 3737 -437d 4 574 3737 -4381 2 578 3737 -4383 3 579 3737 -4386 3 586 3737 -4389 4 553 3737 -438d 4 590 3737 -4391 2 593 3737 -4393 6 594 3737 -4399 6 595 3737 -439f 5 599 3737 -43a4 4 601 3737 -FUNC 43a8 35 4 DName::operator|=(DName const &) -43a8 3 832 3737 -43ab 19 835 3737 -43c4 13 836 3737 -43d7 3 840 3737 -43da 3 842 3737 -FUNC 43dd 81 4 DName::operator=(DNameStatus) -43dd 2 928 3737 -43df 10 929 3737 -43ef 12 937 3737 -4401 26 945 3737 -4427 6 947 3737 -442d e 948 3737 -443b 10 933 3737 -444b d 934 3737 -4458 3 954 3737 -445b 3 956 3737 -FUNC 445e 1e 0 Replicator::Replicator() -445e 1e 1004 3737 -FUNC 447c 47 4 Replicator::operator+=(DName const &) -447c 3 1009 3737 -447f 12 1010 3737 -4491 20 1012 3737 -44b1 4 1017 3737 -44b5 8 1018 3737 -44bd 3 1022 3737 -44c0 3 1024 3737 -FUNC 44c3 47 0 DNameNode::clone() -44c3 3 1055 3737 -44c6 43 1056 3737 -4509 1 1057 3737 -FUNC 450a 65 8 pcharNode::pcharNode(char const *,int) -450a 1 1197 3737 -450b 1f 1200 3737 -452a c 1201 3737 -4536 8 1205 3737 -453e c 1207 3737 -454a a 1210 3737 -4554 b 1211 3737 -455f 2 1214 3737 -4561 3 1216 3737 -4564 4 1217 3737 -4568 7 1220 3737 -FUNC 456f 12 0 pcharNode::getLastChar() -456f 12 1191 3737 -FUNC 4581 31 8 pcharNode::getString(char *,int) -4581 0 1224 3737 -4581 b 1227 3737 -458c 2 1228 3737 -458e 21 1232 3737 -45af 3 1234 3737 -FUNC 45b2 f 0 pDNameNode::length() -45b2 f 1246 3737 -FUNC 45c1 f 0 pDNameNode::getLastChar() -45c1 f 1248 3737 -FUNC 45d0 1d 8 pDNameNode::getString(char *,int) -45d0 1d 1251 3737 -FUNC 45ed 33 8 DNameStatusNode::getString(char *,int) -45ed 0 1269 3737 -45ed b 1272 3737 -45f8 2 1273 3737 -45fa 23 1277 3737 -461d 3 1279 3737 -FUNC 4620 73 14 UnDecorator::UnDecorator(char *,char const *,int,char * (*)(long),unsigned long) -4620 16 736 3704 -4636 8 737 3704 -463e 5 738 3704 -4643 9 740 3704 -464c a 741 3704 -4656 5 745 3704 -465b 2 747 3704 -465d 6 748 3704 -4663 6 749 3704 -4669 8 754 3704 -4671 15 755 3704 -4686 d 758 3704 -FUNC 4693 2f 4 UnDecorator::getReturnType(DName *) -4693 3 2906 3704 -4696 8 2907 3704 -469e 15 2911 3704 -46b3 d 2915 3704 -46c0 2 2917 3704 -FUNC 46c2 f 0 UnDecorator::getStorageConvention() -46c2 f 4032 3704 -FUNC 46d1 79 4 DName::operator+=(DNameStatus) -46d1 4 799 3737 -46d5 17 800 3737 -46ec 20 804 3737 -470c 4 807 3737 -4710 7 809 3737 -4717 6 811 3737 -471d 8 812 3737 -4725 2 815 3737 -4727 3 816 3737 -472a 5 818 3737 -472f e 819 3737 -473d 7 801 3737 -4744 3 825 3737 -4747 3 827 3737 -FUNC 474a 68 4 DName::operator=(DName *) -474a 3 901 3737 -474d 12 902 3737 -475f 7 903 3737 -4766 29 911 3737 -478f 6 913 3737 -4795 c 914 3737 -47a1 2 917 3737 -47a3 9 918 3737 -47ac 3 922 3737 -47af 3 924 3737 -FUNC 47b2 a6 8 DName::doPchar(char const *,int) -47b2 3 962 3737 -47b5 1e 963 3737 -47d3 6 964 3737 -47d9 c 965 3737 -47e5 10 966 3737 -47f5 5 970 3737 -47fa 23 984 3737 -481d 6 986 3737 -4823 9 987 3737 -482c 2 988 3737 -482e 1b 977 3737 -4849 c 993 3737 -4855 3 995 3737 -FUNC 4858 26 4 DName::DName(char) -4858 3 238 3737 -485b 3 244 3737 -485e 7 248 3737 -4865 7 252 3737 -486c c 253 3737 -4878 6 255 3737 -FUNC 487e 31 4 DName::DName(char const *) -487e 0 300 3737 -487e 16 312 3737 -4894 15 313 3737 -48a9 6 315 3737 -FUNC 48af d0 8 DName::DName(char const * &,char) -48af 7 319 3737 -48b6 d 329 3737 -48c3 f 333 3737 -48d2 8 334 3737 -48da 9 342 3737 -48e3 40 343 3737 -4923 b 344 3737 -492e 9 355 3737 -4937 8 359 3737 -493f 8 361 3737 -4947 9 363 3737 -4950 3 364 3737 -4953 2 367 3737 -4955 3 347 3737 -4958 a 378 3737 -4962 8 380 3737 -496a 6 368 3737 -4970 7 371 3737 -4977 6 372 3737 -497d 2 375 3737 -FUNC 497f 69 8 DName::DName(unsigned __int64) -497f 15 384 3737 -4994 3 390 3737 -4997 a 398 3737 -49a1 4 402 3737 -49a5 13 406 3737 -49b8 3 407 3737 -49bb c 409 3737 -49c7 e 411 3737 -49d5 13 413 3737 -FUNC 49e8 96 8 DName::DName(__int64) -49e8 10 416 3737 -49f8 26 436 3737 -4a1e 15 438 3737 -4a33 10 443 3737 -4a43 5 444 3737 -4a48 c 446 3737 -4a54 6 448 3737 -4a5a 4 449 3737 -4a5e e 452 3737 -4a6c 12 453 3737 -FUNC 4a7e 2e 4 DName::operator+(DNameStatus) -4a7e 1 675 3737 -4a7f c 676 3737 -4a8b 9 679 3737 -4a94 b 680 3737 -4a9f 2 681 3737 -4aa1 5 682 3737 -4aa6 3 686 3737 -4aa9 3 688 3737 -FUNC 4aac 62 4 DName::operator+=(DName const &) -4aac 2 739 3737 -4aae f 740 3737 -4abd 13 741 3737 -4ad0 2 742 3737 -4ad2 9 743 3737 -4adb 6 744 3737 -4ae1 2 745 3737 -4ae3 7 747 3737 -4aea 6 749 3737 -4af0 9 750 3737 -4af9 2 751 3737 -4afb d 752 3737 -4b08 3 758 3737 -4b0b 3 760 3737 -FUNC 4b0e 8b 4 DName::operator+=(DName *) -4b0e 2 764 3737 -4b10 a 765 3737 -4b1a 9 766 3737 -4b23 8 767 3737 -4b2b 10 768 3737 -4b3b 8 789 3737 -4b43 20 770 3737 -4b63 4 773 3737 -4b67 7 775 3737 -4b6e 6 777 3737 -4b74 8 778 3737 -4b7c 2 781 3737 -4b7e 3 782 3737 -4b81 5 784 3737 -4b86 d 785 3737 -4b93 3 793 3737 -4b96 3 795 3737 -FUNC 4b99 1c 4 DName::operator=(char) -4b99 1 847 3737 -4b9a 15 854 3737 -4baf 3 856 3737 -4bb2 3 858 3737 -FUNC 4bb5 2a 4 DName::operator=(char const *) -4bb5 0 862 3737 -4bb5 24 869 3737 -4bd9 3 873 3737 -4bdc 3 875 3737 -FUNC 4bdf a6 0 UnDecorator::getCallingConvention() -4bdf 5 2825 3704 -4be4 f 2826 3704 -4bf3 c 2828 3704 -4bff 5 2835 3704 -4c04 1a 2845 3704 -4c1e 20 2852 3704 -4c3e 2 2875 3704 -4c40 2 2876 3704 -4c42 2 2871 3704 -4c44 2 2872 3704 -4c46 2 2867 3704 -4c48 2 2868 3704 -4c4a 2 2863 3704 -4c4c 2 2864 3704 -4c4e 1 2859 3704 -4c4f 2 2860 3704 -4c51 13 2855 3704 -4c64 e 2891 3704 -4c72 4 2895 3704 -4c76 d 2899 3704 -4c83 2 2901 3704 -FUNC 4c85 37 0 UnDecorator::getVCallThunkType() -4c85 3 4057 3704 -4c88 9 4059 3704 -4c91 5 4066 3704 -4c96 4 4059 3704 -4c9a 4 4066 3704 -4c9e 6 4061 3704 -4ca4 c 4062 3704 -4cb0 a 4064 3704 -4cba 2 4170 3704 -FUNC 4cbc 51 4 DName::operator+(DName const &) -4cbc 1 639 3737 -4cbd c 640 3737 -4cc9 b 643 3737 -4cd4 b 644 3737 -4cdf d 645 3737 -4cec 11 646 3737 -4cfd 2 647 3737 -4cff 8 648 3737 -4d07 3 652 3737 -4d0a 3 654 3737 -FUNC 4d0d 2e 4 DName::operator+(DName *) -4d0d 1 658 3737 -4d0e c 659 3737 -4d1a 9 662 3737 -4d23 b 663 3737 -4d2e 2 664 3737 -4d30 5 665 3737 -4d35 3 669 3737 -4d38 3 671 3737 -FUNC 4d3b 6a 4 DName::operator+=(char) -4d3b 1 693 3737 -4d3c b 694 3737 -4d47 9 695 3737 -4d50 6 696 3737 -4d56 2 697 3737 -4d58 7 699 3737 -4d5f 6 701 3737 -4d65 2b 702 3737 -4d90 2 703 3737 -4d92 c 704 3737 -4d9e 4 710 3737 -4da2 3 712 3737 -FUNC 4da5 6c 4 DName::operator+=(char const *) -4da5 2 716 3737 -4da7 f 717 3737 -4db6 9 718 3737 -4dbf 6 719 3737 -4dc5 2 720 3737 -4dc7 7 722 3737 -4dce 6 724 3737 -4dd4 28 725 3737 -4dfc 2 726 3737 -4dfe d 727 3737 -4e0b 3 733 3737 -4e0e 3 735 3737 -FUNC 4e11 e0 0 UnDecorator::getArgumentList() -4e11 7 3076 3704 -4e18 12 3078 3704 -4e2a 29 3081 3704 -4e53 6 3085 3704 -4e59 4 3086 3704 -4e5d 2 3087 3704 -4e5f e 3088 3704 -4e6d 6 3093 3704 -4e73 6 3095 3704 -4e79 5 3100 3704 -4e7e 1 3102 3704 -4e7f 11 3106 3704 -4e90 2 3109 3704 -4e92 16 3116 3704 -4ea8 19 3121 3704 -4ec1 9 3122 3704 -4eca 17 3126 3704 -4ee1 b 3132 3704 -4eec 3 3141 3704 -4eef 2 3143 3704 -FUNC 4ef1 4f 4 UnDecorator::getVdispMapType(DName const &) -4ef1 6 4230 3704 -4ef7 d 4231 3704 -4f04 c 4232 3704 -4f10 12 4233 3704 -4f22 9 4234 3704 -4f2b a 4236 3704 -4f35 6 4237 3704 -4f3b 3 4238 3704 -4f3e 2 4239 3704 -FUNC 4f40 22 8 operator+(char,DName const &) -4f40 22 198 3737 -FUNC 4f62 22 8 operator+(DNameStatus,DName const &) -4f62 22 201 3737 -FUNC 4f84 22 8 operator+(char const *,DName const &) -4f84 22 204 3737 -FUNC 4fa6 2e 4 DName::operator+(char) -4fa6 1 605 3737 -4fa7 c 606 3737 -4fb3 9 609 3737 -4fbc b 610 3737 -4fc7 2 611 3737 -4fc9 5 612 3737 -4fce 3 616 3737 -4fd1 3 618 3737 -FUNC 4fd4 2e 4 DName::operator+(char const *) -4fd4 1 622 3737 -4fd5 c 623 3737 -4fe1 9 626 3737 -4fea b 627 3737 -4ff5 2 628 3737 -4ff7 5 629 3737 -4ffc 3 633 3737 -4fff 3 635 3737 -FUNC 5002 141 4 UnDecorator::getDimension(bool) -5002 7 1616 3704 -5009 10 1618 3704 -5019 e 1620 3704 -5027 6 1623 3704 -502d f 1624 3704 -503c 8 1625 3704 -5044 47 1626 3704 -508b 4 1629 3704 -508f 4 1636 3704 -5093 8 1638 3704 -509b 20 1639 3704 -50bb d 1643 3704 -50c8 4 1634 3704 -50cc b 1649 3704 -50d7 2 1650 3704 -50d9 5 1652 3704 -50de 13 1653 3704 -50f1 c 1637 3704 -50fd 4 1641 3704 -5101 a 1653 3704 -510b 36 1655 3704 -5141 2 1659 3704 -FUNC 5143 d4 0 UnDecorator::getEnumType() -5143 6 2762 3704 -5149 1a 2766 3704 -5163 12 2770 3704 -5175 5 2774 3704 -517a 2 2775 3704 -517c 5 2779 3704 -5181 2 2780 3704 -5183 5 2786 3704 -5188 2 2787 3704 -518a d 2791 3704 -5197 1f 2801 3704 -51b6 1e 2807 3704 -51d4 e 2814 3704 -51e2 4 2795 3704 -51e6 d 2818 3704 -51f3 24 2820 3704 -FUNC 5217 c4 0 UnDecorator::getArgumentTypes() -5217 3 3035 3704 -521a 18 3036 3704 -5232 9 3046 3704 -523b 7 3051 3704 -5242 13 3052 3704 -5255 c 3064 3704 -5261 36 3058 3704 -5297 b 3061 3704 -52a2 21 3039 3704 -52c3 16 3042 3704 -52d9 2 3072 3704 -FUNC 52db 7e 0 UnDecorator::getThrowTypes() -52db 3 3148 3704 -52de e 3149 3704 -52ec 2 3150 3704 -52ee 21 3151 3704 -530f 1f 3153 3704 -532e 29 3155 3704 -5357 2 3157 3704 -FUNC 5359 125 c UnDecorator::getExtendedDataIndirectType(char &,bool &,int) -5359 6 3636 3704 -535f 1a 3641 3704 -5379 1c 3643 3704 -5395 a 3669 3704 -539f 6 3670 3704 -53a5 b 3672 3704 -53b0 a 3674 3704 -53ba 21 3675 3704 -53db 17 3678 3704 -53f2 a 3680 3704 -53fc 6 3689 3704 -5402 2 3691 3704 -5404 17 3693 3704 -541b 1e 3700 3704 -5439 6 3663 3704 -543f 2 3665 3704 -5441 3 3656 3704 -5444 d 3657 3704 -5451 2 3659 3704 -5453 6 3647 3704 -5459 13 3649 3704 -546c 10 3703 3704 -547c 2 3704 3704 -FUNC 547e 15f 4 UnDecorator::getArrayType(DName const &) -547e 3 3986 3704 -5481 12 3987 3704 -5493 7 3989 3704 -549a 4 3991 3704 -549e 2 3992 3704 -54a0 4 3994 3704 -54a4 9 3995 3704 -54ad 2a 4026 3704 -54d7 2 4028 3704 -54d9 c 3998 3704 -54e5 9 4000 3704 -54ee d 4001 3704 -54fb 35 4005 3704 -5530 b 4009 3704 -553b 4 4010 3704 -553f 8 4011 3704 -5547 2 4012 3704 -5549 2c 4013 3704 -5575 d 4017 3704 -5582 9 4018 3704 -558b 12 4019 3704 -559d a 4023 3704 -55a7 36 4024 3704 -FUNC 55dd 31 0 UnDecorator::getLexicalFrame() -55dd 31 4031 3704 -FUNC 560e 12 0 UnDecorator::getDisplacement() -560e 12 4048 3704 -FUNC 5620 12 0 UnDecorator::getCallIndex() -5620 12 4049 3704 -FUNC 5632 12 0 UnDecorator::getGuardNumber() -5632 12 4050 3704 -FUNC 5644 150 4 UnDecorator::getVfTableType(DName const &) -5644 7 4174 3704 -564b d 4175 3704 -5658 1d 4178 3704 -5675 2c 4180 3704 -56a1 f 4182 3704 -56b0 e 4184 3704 -56be 5 4186 3704 -56c3 11 4188 3704 -56d4 2d 4190 3704 -5701 b 4194 3704 -570c 7 4195 3704 -5713 10 4199 3704 -5723 a 4200 3704 -572d b 4188 3704 -5738 b 4204 3704 -5743 a 4206 3704 -574d 7 4207 3704 -5754 9 4209 3704 -575d a 4216 3704 -5767 6 4217 3704 -576d 2 4220 3704 -576f 9 4221 3704 -5778 17 4222 3704 -578f 3 4224 3704 -5792 2 4226 3704 -FUNC 5794 a0 8 UnDecorator::getStringEncoding(char *,int) -5794 6 1447 3704 -579a b 1448 3704 -57a5 22 1451 3704 -57c7 6 1456 3704 -57cd b 1459 3704 -57d8 b 1462 3704 -57e3 13 1464 3704 -57f6 c 1466 3704 -5802 5 1469 3704 -5807 6 1470 3704 -580d 4 1471 3704 -5811 14 1477 3704 -5825 d 1452 3704 -5832 2 1478 3704 -FUNC 5834 50 0 UnDecorator::getSignedDimension() -5834 5 1603 3704 -5839 b 1604 3704 -5844 c 1605 3704 -5850 2 1606 3704 -5852 23 1608 3704 -5875 d 1611 3704 -5882 2 1612 3704 -FUNC 5884 2bb 0 UnDecorator::getTemplateConstant() -5884 15 1877 3704 -5899 f 1884 3704 -58a8 32 1885 3704 -58da 9 1921 3704 -58e3 b 1922 3704 -58ee 20 1924 3704 -590e 12 1931 3704 -5920 e 1932 3704 -592e 3 1937 3704 -5931 7 1939 3704 -5938 6 1941 3704 -593e 4 1942 3704 -5942 2 1944 3704 -5944 4 1945 3704 -5948 2a 1950 3704 -5972 a 1900 3704 -597c 6 1902 3704 -5982 11 1903 3704 -5993 1b 1906 3704 -59ae b 1892 3704 -59b9 6 2034 3704 -59bf 7 1954 3704 -59c6 26 1885 3704 -59ec b 1990 3704 -59f7 c 1991 3704 -5a03 10 1992 3704 -5a13 9 1966 3704 -5a1c c 1968 3704 -5a28 e 1971 3704 -5a36 10 1973 3704 -5a46 6 1975 3704 -5a4c 6 1976 3704 -5a52 3 1980 3704 -5a55 29 1981 3704 -5a7e a 1983 3704 -5a88 a 2001 3704 -5a92 a 2003 3704 -5a9c 13 2007 3704 -5aaf a 2008 3704 -5ab9 11 2012 3704 -5aca 13 2015 3704 -5add a 2016 3704 -5ae7 13 2021 3704 -5afa a 2022 3704 -5b04 13 2026 3704 -5b17 d 2029 3704 -5b24 7 1913 3704 -5b2b 14 2041 3704 -FUNC 5b3f d9 8 UnDecorator::getPtrRefDataType(DName const &,int) -5b3f 3 3937 3704 -5b42 11 3940 3704 -5b53 b 3944 3704 -5b5e 12 3948 3704 -5b70 12 3949 3704 -5b82 10 3951 3704 -5b92 5 3957 3704 -5b97 16 3961 3704 -5bad d 3967 3704 -5bba c 3968 3704 -5bc6 b 3970 3704 -5bd1 6 3972 3704 -5bd7 1e 3974 3704 -5bf5 e 3976 3704 -5c03 13 3980 3704 -5c16 2 3982 3704 -FUNC 5c18 14 4 UnDecorator::getVbTableType(DName const &) -5c18 14 4053 3704 -FUNC 5c2c 1b8 0 UnDecorator::getTemplateArgumentList() -5c2c 14 1775 3704 -5c40 c 1777 3704 -5c4c 7 1778 3704 -5c53 2a 1781 3704 -5c7d 6 1785 3704 -5c83 4 1786 3704 -5c87 2 1787 3704 -5c89 e 1788 3704 -5c97 8 1793 3704 -5c9f 5 1798 3704 -5ca4 1 1800 3704 -5ca5 11 1804 3704 -5cb6 5 1807 3704 -5cbb 7 1810 3704 -5cc2 7 1816 3704 -5cc9 6 1817 3704 -5ccf 12 1818 3704 -5ce1 a 1820 3704 -5ceb 5 1821 3704 -5cf0 e 1822 3704 -5cfe 5 1824 3704 -5d03 9 1830 3704 -5d0c c 1832 3704 -5d18 e 1835 3704 -5d26 10 1837 3704 -5d36 6 1839 3704 -5d3c 1 1840 3704 -5d3d 2 1842 3704 -5d3f 25 1843 3704 -5d64 2 1846 3704 -5d66 10 1847 3704 -5d76 2 1850 3704 -5d78 1f 1851 3704 -5d97 17 1857 3704 -5dae 9 1858 3704 -5db7 16 1862 3704 -5dcd 17 1873 3704 -FUNC 5de4 56f 8 UnDecorator::getOperatorName(bool,bool *) -5de4 b 1095 3704 -5def 53 1103 3704 -5e42 13 1183 3704 -5e55 c 1439 3704 -5e61 1d 1440 3704 -5e7e 11 1442 3704 -5e8f 5 1444 3704 -5e94 3 1124 3704 -5e97 8 1126 3704 -5e9f 21 1127 3704 -5ec0 c 1129 3704 -5ecc a 1130 3704 -5ed6 a 1133 3704 -5ee0 7 1135 3704 -5ee7 3 1136 3704 -5eea 9 1144 3704 -5ef3 5 1145 3704 -5ef8 6 1148 3704 -5efe 2 1154 3704 -5f00 15 1156 3704 -5f15 18 1160 3704 -5f2d 1a 1161 3704 -5f47 10 1166 3704 -5f57 b 1167 3704 -5f62 5 1170 3704 -5f67 6 1106 3704 -5f6d f 1108 3704 -5f7c 21 1103 3704 -5f9d 3d 1220 3704 -5fda 18 1240 3704 -5ff2 b 1234 3704 -5ffd 5 1235 3704 -6002 13 1245 3704 -6015 7 1247 3704 -601c 8 1249 3704 -6024 18 1220 3704 -603c 13 1255 3704 -604f 7 1256 3704 -6056 2 1257 3704 -6058 16 1335 3704 -606e 7 1356 3704 -6075 6 1350 3704 -607b 2 1352 3704 -607d 25 1220 3704 -60a2 13 1290 3704 -60b5 17 1291 3704 -60cc 24 1292 3704 -60f0 14 1313 3704 -6104 6 1316 3704 -610a 5 1317 3704 -610f 10 1302 3704 -611f 20 1303 3704 -613f 20 1304 3704 -615f 20 1305 3704 -617f 22 1306 3704 -61a1 12 1307 3704 -61b3 c 1296 3704 -61bf 2b 1297 3704 -61ea 13 1281 3704 -61fd 17 1282 3704 -6214 1a 1283 3704 -622e 5 1284 3704 -6233 2d 1220 3704 -6260 25 1364 3704 -6285 10 1373 3704 -6295 13 1378 3704 -62a8 a 1397 3704 -62b2 13 1399 3704 -62c5 a 1403 3704 -62cf 6 1405 3704 -62d5 2 1408 3704 -62d7 13 1410 3704 -62ea d 1413 3704 -62f7 5 1415 3704 -62fc 10 1278 3704 -630c b 1330 3704 -6317 5 1428 3704 -631c 3 1187 3704 -631f 13 1216 3704 -6332 8 1437 3704 -633a 19 1438 3704 -FUNC 6353 153 4 UnDecorator::getTemplateName(bool) -6353 5 1700 3704 -6358 1f 1704 3704 -6377 16 1714 3704 -638d 1d 1716 3704 -63aa 23 1725 3704 -63cd e 1729 3704 -63db 6 1730 3704 -63e1 12 1732 3704 -63f3 2 1734 3704 -63f5 16 1735 3704 -640b c 1738 3704 -6417 7 1739 3704 -641e 6 1746 3704 -6424 21 1747 3704 -6445 c 1749 3704 -6451 a 1750 3704 -645b a 1753 3704 -6465 6 1755 3704 -646b 6 1756 3704 -6471 23 1769 3704 -6494 d 1705 3704 -64a1 5 1771 3704 -FUNC 64a6 1ea 4 UnDecorator::getZName(bool) -64a6 10 1007 3704 -64b6 11 1008 3704 -64c7 3 1013 3704 -64ca 26 1043 3704 -64f0 b 1024 3704 -64fb 5 1026 3704 -6500 16 1028 3704 -6516 16 1030 3704 -652c 17 1031 3704 -6543 7 1033 3704 -654a 25 1040 3704 -656f 5 1042 3704 -6574 29 1043 3704 -659d 8 1045 3704 -65a5 b 1051 3704 -65b0 c 1053 3704 -65bc e 1056 3704 -65ca 10 1058 3704 -65da 4 1060 3704 -65de b 1061 3704 -65e9 2 1063 3704 -65eb a 1064 3704 -65f5 10 1065 3704 -6605 2 1068 3704 -6607 d 1069 3704 -6614 2a 1070 3704 -663e 2 1073 3704 -6640 1a 1076 3704 -665a 11 1083 3704 -666b 9 1084 3704 -6674 f 1087 3704 -6683 d 1090 3704 -FUNC 6690 e4 0 UnDecorator::getScopedName() -6690 7 2727 3704 -6697 e 2728 3704 -66a5 15 2733 3704 -66ba 1a 2737 3704 -66d4 2a 2738 3704 -66fe b 2742 3704 -6709 8 2743 3704 -6711 4 2744 3704 -6715 1b 2745 3704 -6730 b 2746 3704 -673b 7 2747 3704 -6742 2 2748 3704 -6744 2b 2749 3704 -676f 3 2753 3704 -6772 2 2755 3704 -FUNC 6774 f 0 UnDecorator::getECSUName() -6774 f 2758 3704 -FUNC 6783 100 0 UnDecorator::getECSUDataType() -6783 3 3392 3704 -6786 20 3395 3704 -67a6 37 3399 3704 -67dd 5 3424 3704 -67e2 2 3425 3704 -67e4 5 3420 3704 -67e9 2 3421 3704 -67eb 26 3431 3704 -6811 2 3432 3704 -6813 5 3415 3704 -6818 2 3416 3704 -681a 5 3411 3704 -681f 2 3412 3704 -6821 d 3407 3704 -682e 7 3439 3704 -6835 4 3441 3704 -6839 c 3442 3704 -6845 16 3446 3704 -685b e 3450 3704 -6869 18 3404 3704 -6881 2 3452 3704 -FUNC 6883 46 0 UnDecorator::getSymbolName() -6883 3 989 3704 -6886 a 990 3704 -6890 6 991 3704 -6896 c 992 3704 -68a2 16 997 3704 -68b8 f 1001 3704 -68c7 2 1003 3704 -FUNC 68c9 92 0 UnDecorator::getBasedType() -68c9 6 2653 3704 -68cf 13 2654 3704 -68e2 a 2659 3704 -68ec 17 2661 3704 -6903 c 2707 3704 -690f 13 2699 3704 -6922 2 2700 3704 -6924 d 2674 3704 -6931 2 2711 3704 -6933 a 2712 3704 -693d d 2716 3704 -694a f 2720 3704 -6959 2 2722 3704 -FUNC 695b b42 4 UnDecorator::composeDeclaration(DName const &) -695b 6 2045 3704 -6961 e 2046 3704 -696f 5 2047 3704 -6974 a 2048 3704 -697e b 2053 3704 -6989 f 2054 3704 -6998 8 2055 3704 -69a0 15 2056 3704 -69b5 8 2057 3704 -69bd 10 2058 3704 -69cd 83 2075 3704 -6a50 7 2081 3704 -6a57 19 2082 3704 -6a70 21 2083 3704 -6a91 2 2084 3704 -6a93 15 2085 3704 -6aa8 27 2090 3704 -6acf 33 2092 3704 -6b02 9 2094 3704 -6b0b 9 2096 3704 -6b14 2b 2098 3704 -6b3f d 2101 3704 -6b4c 9 2103 3704 -6b55 2d 2105 3704 -6b82 2e 2107 3704 -6bb0 5 2111 3704 -6bb5 3 2114 3704 -6bb8 3 2115 3704 -6bbb 3 2116 3704 -6bbe 3 2117 3704 -6bc1 3 2118 3704 -6bc4 26 2121 3704 -6bea 12 2123 3704 -6bfc 19 2125 3704 -6c15 19 2126 3704 -6c2e 2 2127 3704 -6c30 12 2129 3704 -6c42 19 2131 3704 -6c5b 1b 2134 3704 -6c76 13 2141 3704 -6c89 a 2142 3704 -6c93 15 2143 3704 -6ca8 2 2144 3704 -6caa f 2145 3704 -6cb9 10 2147 3704 -6cc9 9 2151 3704 -6cd2 22 2152 3704 -6cf4 2 2153 3704 -6cf6 13 2168 3704 -6d09 c 2172 3704 -6d15 14 2173 3704 -6d29 1a 2174 3704 -6d43 2 2175 3704 -6d45 b 2176 3704 -6d50 5 2182 3704 -6d55 6 2185 3704 -6d5b 27 2187 3704 -6d82 b 2189 3704 -6d8d 5 2190 3704 -6d92 1b 2194 3704 -6dad 15 2195 3704 -6dc2 1d 2202 3704 -6ddf 16 2204 3704 -6df5 55 2205 3704 -6e4a 12 2206 3704 -6e5c 2b 2207 3704 -6e87 2 2208 3704 -6e89 d 2209 3704 -6e96 1a 2211 3704 -6eb0 2e 2218 3704 -6ede 12 2222 3704 -6ef0 c 2223 3704 -6efc c 2227 3704 -6f08 15 2228 3704 -6f1d 2 2229 3704 -6f1f f 2230 3704 -6f2e 1a 2235 3704 -6f48 b 2237 3704 -6f53 3 2238 3704 -6f56 5 2243 3704 -6f5b b 2245 3704 -6f66 1c 2250 3704 -6f82 13 2251 3704 -6f95 e 2252 3704 -6fa3 2 2253 3704 -6fa5 10 2254 3704 -6fb5 3d 2255 3704 -6ff2 c 2256 3704 -6ffe e 2257 3704 -700c 4c 2258 3704 -7058 a 2259 3704 -7062 4b 2260 3704 -70ad 7 2261 3704 -70b4 4b 2262 3704 -70ff f 2263 3704 -710e f 2264 3704 -711d 6 2268 3704 -7123 61 2277 3704 -7184 15 2281 3704 -7199 2 2283 3704 -719b 18 2285 3704 -71b3 2d 2292 3704 -71e0 12 2294 3704 -71f2 37 2296 3704 -7229 23 2297 3704 -724c b7 2299 3704 -7303 23 2300 3704 -7326 12 2306 3704 -7338 37 2307 3704 -736f b 2308 3704 -737a 37 2309 3704 -73b1 b 2310 3704 -73bc 30 2311 3704 -73ec 23 2312 3704 -740f 36 2319 3704 -7445 1e 2320 3704 -7463 8 2325 3704 -746b 1e 2326 3704 -7489 12 2329 3704 -749b 2 2331 3704 -FUNC 749d 211 0 UnDecorator::getDecoratedName() -749d 7 861 3704 -74a4 e 864 3704 -74b2 a 868 3704 -74bc b 873 3704 -74c7 8 874 3704 -74cf 11 876 3704 -74e0 10 878 3704 -74f0 6 882 3704 -74f6 9 903 3704 -74ff 9 906 3704 -7508 8 910 3704 -7510 6 912 3704 -7516 5 910 3704 -751b 2 915 3704 -751d a 918 3704 -7527 19 919 3704 -7540 6 920 3704 -7546 f 924 3704 -7555 8 925 3704 -755d 17 929 3704 -7574 a 930 3704 -757e c 932 3704 -758a 8 933 3704 -7592 5 934 3704 -7597 18 935 3704 -75af a 936 3704 -75b9 13 937 3704 -75cc b 938 3704 -75d7 2 940 3704 -75d9 29 941 3704 -7602 4 945 3704 -7606 10 946 3704 -7616 9 948 3704 -761f 3 950 3704 -7622 1c 955 3704 -763e f 959 3704 -764d 4 976 3704 -7651 6 962 3704 -7657 14 964 3704 -766b 19 967 3704 -7684 5 968 3704 -7689 10 971 3704 -7699 2 979 3704 -769b 2 980 3704 -769d f 982 3704 -76ac 2 984 3704 -FUNC 76ae 28b 0 UnDecorator::getScope() -76ae d 1482 3704 -76bb f 1483 3704 -76ca 2a 1489 3704 -76f4 14 1492 3704 -7708 b 1495 3704 -7713 16 1496 3704 -7729 5 1498 3704 -772e 17 1499 3704 -7745 3 1500 3704 -7748 f 1506 3704 -7757 2a 1507 3704 -7781 10 1566 3704 -7791 5 1567 3704 -7796 34 1561 3704 -77ca 4 1562 3704 -77ce 5 1563 3704 -77d3 e 1510 3704 -77e1 5 1514 3704 -77e6 22 1515 3704 -7808 e 1518 3704 -7816 6 1519 3704 -781c 5 1522 3704 -7821 2a 1523 3704 -784b 2 1524 3704 -784d f 1546 3704 -785c 1a 1548 3704 -7876 b 1550 3704 -7881 9 1551 3704 -788a 2 1554 3704 -788c f 1530 3704 -789b 2 1570 3704 -789d 21 1571 3704 -78be a 1489 3704 -78c8 f 1577 3704 -78d7 18 1590 3704 -78ef 2 1591 3704 -78f1 b 1580 3704 -78fc 7 1581 3704 -7903 2 1582 3704 -7905 2b 1583 3704 -7930 4 1597 3704 -7934 5 1599 3704 -FUNC 7939 341 4 UnDecorator::getFunctionIndirectType(DName const &) -7939 3 3461 3704 -793c e 3462 3704 -794a 15 3463 3704 -795f f 3465 3704 -796e 10 3466 3704 -797e 7 3469 3704 -7985 a 3471 3704 -798f 6 3473 3704 -7995 7 3475 3704 -799c d 3477 3704 -79a9 17 3482 3704 -79c0 9 3485 3704 -79c9 3 3486 3704 -79cc 5 3490 3704 -79d1 f 3491 3704 -79e0 6 3496 3704 -79e6 13 3497 3704 -79f9 b 3501 3704 -7a04 1e 3503 3704 -7a22 8 3505 3704 -7a2a 29 3506 3704 -7a53 2 3507 3704 -7a55 17 3508 3704 -7a6c f 3510 3704 -7a7b 4 3511 3704 -7a7f 10 3518 3704 -7a8f 15 3519 3704 -7aa4 9 3527 3704 -7aad d 3528 3704 -7aba 30 3529 3704 -7aea 2 3530 3704 -7aec 11 3521 3704 -7afd 7 3514 3704 -7b04 16 3516 3704 -7b1a 13 3531 3704 -7b2d d 3535 3704 -7b3a 22 3537 3704 -7b5c 2 3546 3704 -7b5e 13 3547 3704 -7b71 c 3551 3704 -7b7d 28 3552 3704 -7ba5 1e 3557 3704 -7bc3 c 3558 3704 -7bcf 2e 3561 3704 -7bfd 10 3563 3704 -7c0d c 3564 3704 -7c19 c 3566 3704 -7c25 15 3567 3704 -7c3a 2 3568 3704 -7c3c f 3569 3704 -7c4b 4 3573 3704 -7c4f b 3574 3704 -7c5a e 3580 3704 -7c68 10 3576 3704 -7c78 2 3581 3704 -FUNC 7c7a 4e4 10 UnDecorator::getDataIndirectType(DName const &,char,DName const &,int) -7c7a 6 3707 3704 -7c80 23 3711 3704 -7ca3 4 3713 3704 -7ca7 17 3715 3704 -7cbe c 3717 3704 -7cca 10 3719 3704 -7cda e 3723 3704 -7ce8 6 3725 3704 -7cee 15 3726 3704 -7d03 17 3732 3704 -7d1a 11 3751 3704 -7d2b a 3752 3704 -7d35 32 3753 3704 -7d67 5 3754 3704 -7d6c 11 3743 3704 -7d7d a 3744 3704 -7d87 25 3745 3704 -7dac 2 3746 3704 -7dae 8 3747 3704 -7db6 2 3749 3704 -7db8 19 3735 3704 -7dd1 a 3736 3704 -7ddb 14 3737 3704 -7def 5 3738 3704 -7df4 11 3739 3704 -7e05 6 3766 3704 -7e0b a 3768 3704 -7e15 17 3770 3704 -7e2c 10 3772 3704 -7e3c 1a 3778 3704 -7e56 5 3780 3704 -7e5b 6 3782 3704 -7e61 9 3787 3704 -7e6a b 3789 3704 -7e75 19 3791 3704 -7e8e c 3793 3704 -7e9a 24 3794 3704 -7ebe c 3796 3704 -7eca 22 3797 3704 -7eec 9 3801 3704 -7ef5 5 3805 3704 -7efa 7 3806 3704 -7f01 6 3810 3704 -7f07 1e 3812 3704 -7f25 8 3814 3704 -7f2d 1b 3815 3704 -7f48 2 3816 3704 -7f4a 16 3817 3704 -7f60 a 3819 3704 -7f6a 13 3828 3704 -7f7d b 3833 3704 -7f88 c 3834 3704 -7f94 8 3835 3704 -7f9c 6 3836 3704 -7fa2 b 3842 3704 -7fad b 3843 3704 -7fb8 3 3863 3704 -7fbb 6 3864 3704 -7fc1 22 3866 3704 -7fe3 9 3871 3704 -7fec 13 3872 3704 -7fff 5 3876 3704 -8004 1e 3877 3704 -8022 5 3879 3704 -8027 1e 3880 3704 -8045 5 3884 3704 -804a e 3885 3704 -8058 14 3889 3704 -806c 28 3895 3704 -8094 2 3890 3704 -8096 b 3891 3704 -80a1 2 3892 3704 -80a3 c 3898 3704 -80af 17 3899 3704 -80c6 4 3902 3704 -80ca 6 3904 3704 -80d0 7 3906 3704 -80d7 8 3774 3704 -80df 13 3918 3704 -80f2 12 3922 3704 -8104 29 3925 3704 -812d 10 3923 3704 -813d c 3928 3704 -8149 3 3929 3704 -814c 10 3931 3704 -815c 2 3933 3704 -FUNC 815e 14c 0 UnDecorator::operator char *() -815e 6 762 3704 -8164 4 763 3704 -8168 f 764 3704 -8177 9 770 3704 -8180 c 772 3704 -818c 7 775 3704 -8193 1d 776 3704 -81b0 4 782 3704 -81b4 16 783 3704 -81ca 9 785 3704 -81d3 5 794 3704 -81d8 9 795 3704 -81e1 13 799 3704 -81f4 e 808 3704 -8202 2 809 3704 -8204 2 848 3704 -8206 1a 810 3704 -8220 e 813 3704 -822e e 811 3704 -823c 9 817 3704 -8245 e 819 3704 -8253 d 820 3704 -8260 a 824 3704 -826a f 825 3704 -8279 5 828 3704 -827e 2 829 3704 -8280 2 830 3704 -8282 5 831 3704 -8287 1 832 3704 -8288 5 833 3704 -828d 1 835 3704 -828e 5 834 3704 -8293 2 838 3704 -8295 a 839 3704 -829f 9 841 3704 -82a8 2 848 3704 -FUNC 82aa 116 c UnDecorator::getPtrRefType(DName const &,DName const &,char) -82aa 5 3585 3704 -82af f 3588 3704 -82be d 3589 3704 -82cb b 3591 3704 -82d6 20 3594 3704 -82f6 b 3595 3704 -8301 b 3597 3704 -830c 9 3598 3704 -8315 14 3600 3704 -8329 14 3606 3704 -833d 1b 3608 3704 -8358 a 3612 3704 -8362 b 3615 3704 -836d c 3617 3704 -8379 9 3618 3704 -8382 c 3620 3704 -838e c 3622 3704 -839a a 3623 3704 -83a4 b 3625 3704 -83af f 3629 3704 -83be 2 3632 3704 -FUNC 83c0 1b 8 UnDecorator::getPointerType(DName const &,DName const &) -83c0 1b 4037 3704 -FUNC 83db 1b 8 UnDecorator::getPointerTypeArray(DName const &,DName const &) -83db 1b 4040 3704 -FUNC 83f6 1b 8 UnDecorator::getReferenceType(DName const &,DName const &) -83f6 1b 4043 3704 -FUNC 8411 a3 18 __unDName -8411 f 604 3704 -8420 9 606 3704 -8429 4 607 3704 -842d a 612 3704 -8437 2 613 3704 -8439 8 614 3704 -8441 3 615 3704 -8444 20 618 3704 -8464 1a 627 3704 -847e e 628 3704 -848c a 633 3704 -8496 c 636 3704 -84a2 3 643 3704 -84a5 6 645 3704 -84ab 9 637 3704 -FUNC 84b4 a3 1c __unDNameEx -84b4 f 684 3704 -84c3 9 687 3704 -84cc 4 688 3704 -84d0 a 693 3704 -84da 2 694 3704 -84dc 8 695 3704 -84e4 3 696 3704 -84e7 20 699 3704 -8507 1a 708 3704 -8521 e 709 3704 -852f a 714 3704 -8539 c 717 3704 -8545 3 724 3704 -8548 6 726 3704 -854e 9 718 3704 -FUNC 8557 387 4 UnDecorator::getBasicDataType(DName const &) -8557 3 3162 3704 -855a 15 3163 3704 -856f 6 3165 3704 -8575 4 3168 3704 -8579 35 3173 3704 -85ae 5 3178 3704 -85b3 5 3179 3704 -85b8 5 3183 3704 -85bd 5 3184 3704 -85c2 5 3188 3704 -85c7 5 3189 3704 -85cc 5 3193 3704 -85d1 5 3194 3704 -85d6 5 3203 3704 -85db 5 3204 3704 -85e0 2a 3173 3704 -860a 3c 3222 3704 -8646 5 3231 3704 -864b 5 3232 3704 -8650 22 3273 3704 -8672 5 3235 3704 -8677 5 3236 3704 -867c f 3222 3704 -868b 5 3243 3704 -8690 5 3244 3704 -8695 5 3239 3704 -869a 5 3240 3704 -869f 5 3247 3704 -86a4 5 3248 3704 -86a9 1b 3222 3704 -86c4 3 3264 3704 -86c7 6 3262 3704 -86cd 10 3264 3704 -86dd 10 3266 3704 -86ed 11 3267 3704 -86fe 5 3275 3704 -8703 2 3276 3704 -8705 5 3255 3704 -870a 2 3257 3704 -870c 3 3224 3704 -870f 12 3343 3704 -8721 9 3345 3704 -872a 7 3347 3704 -8731 16 3348 3704 -8747 6 3352 3704 -874d d 3353 3704 -875a 5 3355 3704 -875f 5 3227 3704 -8764 2 3278 3704 -8766 d 3281 3704 -8773 2 3282 3704 -8775 5 3219 3704 -877a 2 3220 3704 -877c 3 3287 3704 -877f 5 3290 3704 -8784 d 3207 3704 -8791 d 3212 3704 -879e 9 3297 3704 -87a7 1f 3301 3704 -87c6 19 3314 3704 -87df c 3322 3704 -87eb 2 3326 3704 -87ed c 3307 3704 -87f9 2 3308 3704 -87fb 1e 3311 3704 -8819 10 3332 3704 -8829 18 3333 3704 -8841 5 3337 3704 -8846 c 3360 3704 -8852 5 3367 3704 -8857 d 3369 3704 -8864 5 3371 3704 -8869 d 3372 3704 -8876 2 3373 3704 -8878 5 3374 3704 -887d d 3375 3704 -888a 17 3380 3704 -88a1 16 3385 3704 -88b7 27 3387 3704 -FUNC 88de 13e 4 UnDecorator::getPrimaryDataType(DName const &) -88de 7 2962 3704 -88e5 2b 2966 3704 -8910 12 3027 3704 -8922 d 2972 3704 -892f c 2974 3704 -893b a 2975 3704 -8945 b 2981 3704 -8950 6 2984 3704 -8956 1e 2986 3704 -8974 7 2996 3704 -897b 2 2997 3704 -897d 6 2998 3704 -8983 f 3000 3704 -8992 8 3002 3704 -899a 10 3004 3704 -89aa 2f 3022 3704 -89d9 16 3012 3704 -89ef 17 3008 3704 -8a06 14 2969 3704 -8a1a 2 3030 3704 -FUNC 8a1c b1 4 UnDecorator::getDataType(DName *) -8a1c 6 2922 3704 -8a22 b 2923 3704 -8a2d 15 2928 3704 -8a42 10 2954 3704 -8a52 6 2934 3704 -8a58 c 2936 3704 -8a64 f 2937 3704 -8a73 13 2939 3704 -8a86 6 2944 3704 -8a8c 29 2946 3704 -8ab5 2 2947 3704 -8ab7 14 2931 3704 -8acb 2 2957 3704 -FUNC 8acd 64 4 UnDecorator::getExternalDataType(DName const &) -8acd 7 4244 3704 -8ad4 1e 4247 3704 -8af2 9 4248 3704 -8afb 30 4253 3704 -8b2b 4 4255 3704 -8b2f 2 4257 3704 -FUNC 8b31 4f 4 V6_HeapAlloc -8b31 c 27 3455 -8b3d 4 28 3455 -8b41 b 29 3455 -8b4c 8 31 3455 -8b54 4 32 3455 -8b58 a 33 3455 -8b62 c 35 3455 -8b6e 3 39 3455 -8b71 6 40 3455 -8b77 9 36 3455 -FUNC 8b80 75 4 _heap_alloc -8b80 0 90 3455 -8b80 9 95 3455 -8b89 5 96 3455 -8b8e 7 97 3455 -8b95 c 98 3455 -8ba1 a 104 3455 -8bab 18 105 3455 -8bc3 1 129 3455 -8bc4 a 107 3455 -8bce 9 108 3455 -8bd7 2 109 3455 -8bd9 4 121 3455 -8bdd 1 122 3455 -8bde 6 124 3455 -8be4 10 126 3455 -8bf4 1 129 3455 -FUNC 8bf5 c3 4 malloc -8bf5 1 155 3455 -8bf6 16 159 3455 -8c0c 65 163 3455 -8c71 4 168 3455 -8c75 b 172 3455 -8c80 b 179 3455 -8c8b 2 183 3455 -8c8d 7 174 3455 -8c94 8 193 3455 -8c9c 5 195 3455 -8ca1 1 196 3455 -8ca2 7 185 3455 -8ca9 b 186 3455 -8cb4 3 187 3455 -8cb7 1 196 3455 -FUNC 8cb8 3b 4 _get_errno_from_oserr -8cb8 0 119 3915 -8cb8 6 123 3915 -8cbe f 124 3915 -8ccd 8 133 3915 -8cd5 3 134 3915 -8cd8 1 139 3915 -8cd9 7 125 3915 -8ce0 1 139 3915 -8ce1 11 135 3915 -8cf2 1 139 3915 -FUNC 8cf3 13 0 _errno -8cf3 0 280 3915 -8cf3 5 281 3915 -8cf8 4 282 3915 -8cfc 5 283 3915 -8d01 1 288 3915 -8d02 3 285 3915 -8d05 1 288 3915 -FUNC 8d06 13 0 __doserrno -8d06 0 293 3915 -8d06 5 294 3915 -8d0b 4 295 3915 -8d0f 5 296 3915 -8d14 1 300 3915 -8d15 3 298 3915 -8d18 1 300 3915 -FUNC 8d19 1e 4 _dosmaperr -8d19 1 110 3915 -8d1a 9 111 3915 -8d23 13 113 3915 -8d36 1 114 3915 -FUNC 8d37 1b 4 _set_errno -8d37 0 157 3915 -8d37 5 158 3915 -8d3c 4 159 3915 -8d40 3 161 3915 -8d43 1 168 3915 -8d44 b 165 3915 -8d4f 2 166 3915 -8d51 1 168 3915 -FUNC 8d52 2a 4 _get_errno -8d52 1 187 3915 -8d53 1b 189 3915 -8d6e 1 195 3915 -8d6f 9 193 3915 -8d78 3 194 3915 -8d7b 1 195 3915 -FUNC 8d7c 1b 4 _set_doserrno -8d7c 0 213 3915 -8d7c 5 214 3915 -8d81 4 215 3915 -8d85 3 217 3915 -8d88 1 224 3915 -8d89 b 221 3915 -8d94 2 222 3915 -8d96 1 224 3915 -FUNC 8d97 2a 4 _get_doserrno -8d97 1 243 3915 -8d98 1b 245 3915 -8db3 1 251 3915 -8db4 9 249 3915 -8dbd 3 250 3915 -8dc0 1 251 3915 -FUNC 8dc1 21 0 _get_sbh_threshold -8dc1 0 61 3311 -8dc1 9 64 3311 -8dca 2 66 3311 -8dcc 1 81 3311 -8dcd 14 69 3311 -8de1 1 81 3311 -FUNC 8de2 46 4 _set_amblksiz -8de2 0 214 3311 -8de2 2b 216 3311 -8e0d 1 224 3311 -8e0e 11 217 3311 -8e1f 5 220 3311 -8e24 3 223 3311 -8e27 1 224 3311 -FUNC 8e28 3c 4 _get_amblksiz -8e28 0 243 3311 -8e28 27 245 3311 -8e4f 1 253 3311 -8e50 8 246 3311 -8e58 8 249 3311 -8e60 3 252 3311 -8e63 1 253 3311 -FUNC 8e64 48 4 __sbh_heap_init -8e64 0 274 3311 -8e64 1c 275 3311 -8e80 1 285 3311 -8e81 4 278 3311 -8e85 7 280 3311 -8e8c c 281 3311 -8e98 13 284 3311 -8eab 1 285 3311 -FUNC 8eac 2b 4 __sbh_find_block -8eac 0 306 3311 -8eac 12 307 3311 -8ebe 7 316 3311 -8ec5 8 317 3311 -8ecd 3 319 3311 -8ed0 4 314 3311 -8ed4 2 321 3311 -8ed6 1 322 3311 -FUNC 8ed7 314 8 __sbh_free_block -8ed7 6 381 3311 -8edd 7 399 3311 -8ee4 9 402 3311 -8eed 18 407 3311 -8f05 3 408 3311 -8f08 d 412 3311 -8f15 3 416 3311 -8f18 5 417 3311 -8f1d 6 420 3311 -8f23 b 424 3311 -8f2e 4 429 3311 -8f32 5 430 3311 -8f37 3 431 3311 -8f3a 8 434 3311 -8f42 3 439 3311 -8f45 b 441 3311 -8f50 e 442 3311 -8f5e 5 443 3311 -8f63 2 445 3311 -8f65 5 448 3311 -8f6a 11 449 3311 -8f7b 9 450 3311 -8f84 9 455 3311 -8f8d 15 459 3311 -8fa2 6 463 3311 -8fa8 5 464 3311 -8fad 3 465 3311 -8fb0 f 468 3311 -8fbf 3 474 3311 -8fc2 6 477 3311 -8fc8 b 478 3311 -8fd3 2 479 3311 -8fd5 3 483 3311 -8fd8 6 484 3311 -8fde 7 485 3311 -8fe5 2 486 3311 -8fe7 4 489 3311 -8feb b 493 3311 -8ff6 3 498 3311 -8ff9 11 501 3311 -900a 6 502 3311 -9010 5 503 3311 -9015 2 505 3311 -9017 e 508 3311 -9025 6 509 3311 -902b 6 511 3311 -9031 c 516 3311 -903d c 517 3311 -9049 8 520 3311 -9051 e 524 3311 -905f 6 528 3311 -9065 3 529 3311 -9068 6 530 3311 -906e 3 531 3311 -9071 6 532 3311 -9077 8 535 3311 -907f 18 541 3311 -9097 e 542 3311 -90a5 f 543 3311 -90b4 2 545 3311 -90b6 6 547 3311 -90bc 10 548 3311 -90cc 13 550 3311 -90df 5 556 3311 -90e4 4 558 3311 -90e8 b 561 3311 -90f3 d 564 3311 -9100 6 568 3311 -9106 1a 569 3311 -9120 15 573 3311 -9135 16 577 3311 -914b 19 578 3311 -9164 9 579 3311 -916d 6 583 3311 -9173 8 586 3311 -917b 16 589 3311 -9191 25 595 3311 -91b6 14 599 3311 -91ca 4 600 3311 -91ce a 603 3311 -91d8 8 608 3311 -91e0 9 609 3311 -91e9 2 611 3311 -FUNC 91eb b0 0 __sbh_alloc_new_region -91eb 0 891 3311 -91eb 13 897 3311 -91fe 1e 900 3311 -921c 4 901 3311 -9220 12 905 3311 -9232 9 909 3311 -923b 18 913 3311 -9253 2 914 3311 -9255 1a 918 3311 -926f 10 920 3311 -927f 2 921 3311 -9281 9 927 3311 -928a 6 930 3311 -9290 6 933 3311 -9296 4 935 3311 -929a 1 936 3311 -FUNC 929b 106 4 __sbh_alloc_new_group -929b 5 958 3311 -92a0 3 959 3311 -92a3 9 972 3311 -92ac 4 973 3311 -92b0 2 976 3311 -92b2 1 977 3311 -92b3 4 974 3311 -92b7 15 981 3311 -92cc c 986 3311 -92d8 1f 993 3311 -92f7 8 994 3311 -92ff 6 998 3311 -9305 12 1001 3311 -9317 4 1004 3311 -931b 7 1005 3311 -9322 8 1011 3311 -932a 10 1013 3311 -933a 12 1016 3311 -934c 3 1001 3311 -934f 8 1021 3311 -9357 6 1023 3311 -935d 3 1024 3311 -9360 6 1027 3311 -9366 3 1028 3311 -9369 5 1030 3311 -936e a 1031 3311 -9378 9 1032 3311 -9381 b 1033 3311 -938c e 1036 3311 -939a 5 1038 3311 -939f 2 1039 3311 -FUNC 93a1 2df c __sbh_resize_block -93a1 6 1061 3311 -93a7 c 1080 3311 -93b3 b 1083 3311 -93be 3 1084 3311 -93c1 12 1085 3311 -93d3 7 1089 3311 -93da 14 1096 3311 -93ee 13 1099 3311 -9401 7 1105 3311 -9408 8 1106 3311 -9410 6 1107 3311 -9416 8 1110 3311 -941e 3 1115 3311 -9421 9 1117 3311 -942a 11 1118 3311 -943b 5 1119 3311 -9440 2 1121 3311 -9442 5 1124 3311 -9447 14 1125 3311 -945b 6 1126 3311 -9461 9 1131 3311 -946a 9 1132 3311 -9473 12 1135 3311 -9485 a 1141 3311 -948f 9 1142 3311 -9498 3 1143 3311 -949b 9 1147 3311 -94a4 6 1148 3311 -94aa 6 1149 3311 -94b0 3 1150 3311 -94b3 6 1151 3311 -94b9 8 1154 3311 -94c1 18 1160 3311 -94d9 e 1161 3311 -94e7 6 1162 3311 -94ed 2 1164 3311 -94ef 6 1166 3311 -94f5 10 1167 3311 -9505 13 1169 3311 -9518 c 1174 3311 -9524 9 1176 3311 -952d 6 1180 3311 -9533 9 1182 3311 -953c 7 1100 3311 -9543 6 1186 3311 -9549 3 1189 3311 -954c d 1195 3311 -9559 7 1198 3311 -9560 b 1199 3311 -956b 3 1200 3311 -956e a 1203 3311 -9578 7 1208 3311 -957f 5 1209 3311 -9584 3 1210 3311 -9587 8 1213 3311 -958f 3 1218 3311 -9592 b 1221 3311 -959d e 1222 3311 -95ab 5 1223 3311 -95b0 2 1225 3311 -95b2 5 1228 3311 -95b7 11 1229 3311 -95c8 9 1231 3311 -95d1 9 1236 3311 -95da 9 1237 3311 -95e3 9 1240 3311 -95ec 4 1241 3311 -95f0 5 1242 3311 -95f5 3 1243 3311 -95f8 6 1249 3311 -95fe 3 1250 3311 -9601 6 1251 3311 -9607 3 1252 3311 -960a 6 1253 3311 -9610 8 1256 3311 -9618 18 1262 3311 -9630 e 1263 3311 -963e 6 1264 3311 -9644 2 1266 3311 -9646 6 1268 3311 -964c 10 1269 3311 -965c 13 1271 3311 -966f 5 1276 3311 -9674 4 1278 3311 -9678 6 1281 3311 -967e 2 1282 3311 -FUNC 9680 cd 0 __sbh_heapmin -9680 0 1302 3311 -9680 d 1306 3311 -968d 6 1310 3311 -9693 17 1311 3311 -96aa 15 1314 3311 -96bf 16 1318 3311 -96d5 19 1319 3311 -96ee 9 1320 3311 -96f7 f 1325 3311 -9706 11 1328 3311 -9717 28 1333 3311 -973f 6 1334 3311 -9745 7 1338 3311 -974c 1 1340 3311 -FUNC 974d 2e2 0 __sbh_heap_check -974d 3 1361 3311 -9750 12 1391 3311 -9762 8 1393 3311 -976a 16 1398 3311 -9780 3 1401 3311 -9783 8 1402 3311 -978b 6 1406 3311 -9791 9 1407 3311 -979a c 1408 3311 -97a6 3 1409 3311 -97a9 3 1410 3311 -97ac 6 1411 3311 -97b2 4 1418 3311 -97b6 1b 1421 3311 -97d1 9 1424 3311 -97da 9 1428 3311 -97e3 1c 1438 3311 -97ff 2 1445 3311 -9801 7 1446 3311 -9808 1 1449 3311 -9809 c 1452 3311 -9815 3 1456 3311 -9818 2 1458 3311 -981a 6 1462 3311 -9820 5 1463 3311 -9825 3 1464 3311 -9828 9 1465 3311 -9831 1e 1470 3311 -984f c 1475 3311 -985b 2 1479 3311 -985d 4 1481 3311 -9861 6 1484 3311 -9867 10 1488 3311 -9877 e 1492 3311 -9885 2 1498 3311 -9887 4 1502 3311 -988b 20 1505 3311 -98ab 19 1509 3311 -98c4 8 1514 3311 -98cc 3 1518 3311 -98cf 6 1520 3311 -98d5 8 1524 3311 -98dd 4 1527 3311 -98e1 e 1532 3311 -98ef 8 1536 3311 -98f7 6 1541 3311 -98fd 5 1542 3311 -9902 3 1543 3311 -9905 8 1544 3311 -990d c 1549 3311 -9919 11 1554 3311 -992a 6 1559 3311 -9930 3 1561 3311 -9933 e 1563 3311 -9941 3 1564 3311 -9944 2 1566 3311 -9946 8 1568 3311 -994e 3 1569 3311 -9951 1c 1575 3311 -996d c 1580 3311 -9979 10 1585 3311 -9989 17 1591 3311 -99a0 7 1595 3311 -99a7 7 1596 3311 -99ae 16 1597 3311 -99c4 f 1602 3311 -99d3 18 1606 3311 -99eb 5 1608 3311 -99f0 2 1609 3311 -99f2 4 1403 3311 -99f6 4 1425 3311 -99fa 4 1453 3311 -99fe 4 1485 3311 -9a02 4 1471 3311 -9a06 4 1439 3311 -9a0a 4 1493 3311 -9a0e 4 1537 3311 -9a12 4 1545 3311 -9a16 4 1550 3311 -9a1a 4 1510 3311 -9a1e 4 1581 3311 -9a22 4 1576 3311 -9a26 4 1592 3311 -9a2a 5 1603 3311 -FUNC 9a2f a8 4 _set_sbh_threshold -9a2f 1 102 3311 -9a30 a 104 3311 -9a3a 3 106 3311 -9a3d 1 195 3311 -9a3e a 109 3311 -9a48 25 112 3311 -9a6d 5 113 3311 -9a72 4 114 3311 -9a76 2 195 3311 -9a78 6 173 3311 -9a7e 2 175 3311 -9a80 5 179 3311 -9a85 2d 185 3311 -9ab2 6 186 3311 -9ab8 a 187 3311 -9ac2 5 188 3311 -9ac7 b 193 3311 -9ad2 4 194 3311 -9ad6 1 195 3311 -FUNC 9ad7 2e3 4 __sbh_alloc_block -9ad7 6 632 3311 -9add 5 633 3311 -9ae2 15 650 3311 -9af7 5 668 3311 -9afc 7 669 3311 -9b03 5 671 3311 -9b08 4 672 3311 -9b0c 2 674 3311 -9b0e d 677 3311 -9b1b a 682 3311 -9b25 e 686 3311 -9b33 3 688 3311 -9b36 2 683 3311 -9b38 5 688 3311 -9b3d 4 692 3311 -9b41 8 694 3311 -9b49 e 698 3311 -9b57 3 700 3311 -9b5a 2 695 3311 -9b5c 5 700 3311 -9b61 6 705 3311 -9b67 6 709 3311 -9b6d 6 711 3311 -9b73 4 707 3311 -9b77 4 715 3311 -9b7b 8 717 3311 -9b83 6 720 3311 -9b89 3 722 3311 -9b8c 2 718 3311 -9b8e 5 722 3311 -9b93 4 726 3311 -9b97 e 727 3311 -9ba5 7 728 3311 -9bac 12 733 3311 -9bbe 2 734 3311 -9bc0 6 737 3311 -9bc6 3 739 3311 -9bc9 2 740 3311 -9bcb 1c 745 3311 -9be7 4 749 3311 -9beb 14 751 3311 -9bff e 752 3311 -9c0d 3 751 3311 -9c10 12 754 3311 -9c22 a 760 3311 -9c2c d 763 3311 -9c39 2 768 3311 -9c3b 2 767 3311 -9c3d 1 768 3311 -9c3e 4 765 3311 -9c42 7 770 3311 -9c49 5 775 3311 -9c4e 6 776 3311 -9c54 8 777 3311 -9c5c 3 778 3311 -9c5f 8 781 3311 -9c67 8 784 3311 -9c6f 3 788 3311 -9c72 e 791 3311 -9c80 15 792 3311 -9c95 8 793 3311 -9c9d 2 795 3311 -9c9f f 798 3311 -9cae f 799 3311 -9cbd e 800 3311 -9ccb 1c 809 3311 -9ce7 6 813 3311 -9ced 3 814 3311 -9cf0 6 815 3311 -9cf6 3 816 3311 -9cf9 6 817 3311 -9cff 8 820 3311 -9d07 18 826 3311 -9d1f b 827 3311 -9d2a 10 829 3311 -9d3a 2 831 3311 -9d3c 6 833 3311 -9d42 d 835 3311 -9d4f 16 837 3311 -9d65 3 831 3311 -9d68 4 844 3311 -9d6c 2 846 3311 -9d6e 9 848 3311 -9d77 a 853 3311 -9d81 4 855 3311 -9d85 e 858 3311 -9d93 13 862 3311 -9da6 7 863 3311 -9dad 5 866 3311 -9db2 6 868 3311 -9db8 2 869 3311 -FUNC 9dba 39 0 terminate() -9dba c 94 3855 -9dc6 8 107 3855 -9dce 4 111 3855 -9dd2 4 116 3855 -9dd6 2 120 3855 -9dd8 2 121 3855 -9dda 7 122 3855 -9de1 7 127 3855 -9de8 5 135 3855 -9ded 6 136 3855 -FUNC 9df3 13 0 unexpected() -9df3 0 149 3855 -9df3 8 159 3855 -9dfb 4 163 3855 -9dff 2 167 3855 -9e01 5 173 3855 -FUNC 9e06 37 0 _inconsistency() -9e06 c 187 3855 -9e12 c 196 3855 -9e1e 4 197 3855 -9e22 4 202 3855 -9e26 2 203 3855 -9e28 2 204 3855 -9e2a 7 205 3855 -9e31 7 211 3855 -9e38 5 217 3855 -FUNC 9e3d 11 4 _initp_eh_hooks -9e3d 0 74 3855 -9e3d 10 80 3855 -9e4d 1 81 3855 -FUNC 9e4e b9 4 _onexit_nolock -9e4e 5 104 1673 -9e53 b 107 1673 -9e5e 13 108 1673 -9e71 16 112 1673 -9e87 d 122 1673 -9e94 d 127 1673 -9ea1 14 129 1673 -9eb5 3 134 1673 -9eb8 14 136 1673 -9ecc 3 147 1673 -9ecf f 149 1673 -9ede e 156 1673 -9eec c 157 1673 -9ef8 7 159 1673 -9eff 6 114 1673 -9f05 2 160 1673 -FUNC 9f07 2f 0 __onexitinit -9f07 1 205 1673 -9f08 b 208 1673 -9f13 9 209 1673 -9f1c e 211 1673 -9f2a 4 216 1673 -9f2e 1 221 1673 -9f2f 3 218 1673 -9f32 3 220 1673 -9f35 1 221 1673 -FUNC 9f36 3c 4 _onexit -9f36 c 85 1673 -9f42 5 88 1673 -9f47 4 90 1673 -9f4b c 91 1673 -9f57 c 93 1673 -9f63 3 97 1673 -9f66 6 98 1673 -9f6c 6 94 1673 -FUNC 9f72 12 4 atexit -9f72 0 165 1673 -9f72 11 166 1673 -9f83 1 167 1673 -FUNC 9f84 1f 0 _initp_misc_cfltcvt_tab -9f84 2 54 2488 -9f86 8 56 2488 -9f8e 14 58 2488 -9fa2 1 60 2488 -FUNC 9fb0 29 4 _ValidateImageBase -9fb0 0 44 1573 -9fb0 b 50 1573 -9fbb 2 52 1573 -9fbd 1 68 1573 -9fbe 5 55 1573 -9fc3 6 56 1573 -9fc9 2 58 1573 -9fcb d 62 1573 -9fd8 1 68 1573 -FUNC 9fe0 42 8 _FindPESection -9fe0 0 92 1573 -9fe0 9 99 1573 -9fe9 19 108 1573 -a002 10 111 1573 -a012 a 108 1573 -a01c 5 123 1573 -a021 1 124 1573 -FUNC a030 bb 4 _IsNonwritableInCurrentImage -a030 33 149 1573 -a063 7 156 1573 -a06a f 164 1573 -a079 2 166 1573 -a07b 8 174 1573 -a083 e 175 1573 -a091 2 176 1573 -a093 2 178 1573 -a095 12 185 1573 -a0a7 12 195 1573 -a0b9 17 187 1573 -a0d0 9 193 1573 -a0d9 12 195 1573 -FUNC a0eb 19 4 _initp_misc_winsig -a0eb 0 57 1199 -a0eb 9 58 1199 -a0f4 5 59 1199 -a0f9 5 60 1199 -a0fe 5 61 1199 -a103 1 62 1199 -FUNC a104 9b 4 ctrlevent_capture -a104 c 89 1199 -a110 9 94 1199 -a119 3 95 1199 -a11c 5 102 1199 -a121 5 103 1199 -a126 e 104 1199 -a134 7 105 1199 -a13b 2 107 1199 -a13d 5 108 1199 -a142 e 109 1199 -a150 7 110 1199 -a157 1 109 1199 -a158 9 113 1199 -a161 7 117 1199 -a168 c 120 1199 -a174 5 124 1199 -a179 4 128 1199 -a17d 2 120 1199 -a17f 8 121 1199 -a187 6 130 1199 -a18d 7 131 1199 -a194 3 138 1199 -a197 8 139 1199 -FUNC a19f 34 4 siglookup -a19f 0 634 1199 -a19f b 635 1199 -a1aa 15 645 1199 -a1bf f 649 1199 -a1ce 2 653 1199 -a1d0 2 658 1199 -a1d2 1 659 1199 -FUNC a1d3 d 0 __get_sigabrt -a1d3 0 676 1199 -a1d3 c 677 1199 -a1df 1 678 1199 -FUNC a1e0 9 0 __fpecode -a1e0 0 699 1199 -a1e0 8 700 1199 -a1e8 1 701 1199 -FUNC a1e9 9 0 __pxcptinfoptrs -a1e9 0 721 1199 -a1e9 8 722 1199 -a1f1 1 723 1199 -FUNC a1f2 23d 8 signal -a1f2 c 219 1199 -a1fe 4 224 1199 -a202 3 230 1199 -a205 3 244 1199 -a208 12 230 1199 -a21a 2f 244 1199 -a249 13 327 1199 -a25c 7 334 1199 -a263 8 335 1199 -a26b a 342 1199 -a275 17 346 1199 -a28c 10 352 1199 -a29c 13 367 1199 -a2af 3 380 1199 -a2b2 e 382 1199 -a2c0 3 395 1199 -a2c3 17 401 1199 -a2da 5 390 1199 -a2df 5 401 1199 -a2e4 8 246 1199 -a2ec 4 247 1199 -a2f0 12 254 1199 -a302 14 257 1199 -a316 6 259 1199 -a31c 2 261 1199 -a31e f 263 1199 -a32d a 264 1199 -a337 18 268 1199 -a34f f 288 1199 -a35e 4 289 1199 -a362 b 291 1199 -a36d 2 293 1199 -a36f f 279 1199 -a37e 4 280 1199 -a382 b 282 1199 -a38d 2 284 1199 -a38f f 296 1199 -a39e 4 297 1199 -a3a2 b 299 1199 -a3ad 2 301 1199 -a3af f 271 1199 -a3be 4 272 1199 -a3c2 c 274 1199 -a3ce c 305 1199 -a3da 9 309 1199 -a3e3 4 407 1199 -a3e7 3 305 1199 -a3ea 9 306 1199 -a3f3 19 410 1199 -a40c 1a 419 1199 -a426 3 417 1199 -a429 6 423 1199 -FUNC a42f 1b0 4 raise -a42f c 452 1199 -a43b 5 459 1199 -a440 3 460 1199 -a443 1f 462 1199 -a462 a 488 1199 -a46c 4 489 1199 -a470 8 490 1199 -a478 a 465 1199 -a482 2 467 1199 -a484 11 492 1199 -a495 2 493 1199 -a497 f 462 1199 -a4a6 1c 500 1199 -a4c2 a 476 1199 -a4cc 2 478 1199 -a4ce a 470 1199 -a4d8 2 472 1199 -a4da a 481 1199 -a4e4 7 482 1199 -a4eb a 502 1199 -a4f5 2 510 1199 -a4f7 4 509 1199 -a4fb 6 510 1199 -a501 5 515 1199 -a506 7 520 1199 -a50d 5 527 1199 -a512 7 528 1199 -a519 5 530 1199 -a51e f 543 1199 -a52d 6 544 1199 -a533 3 545 1199 -a536 5 551 1199 -a53b 6 552 1199 -a541 7 553 1199 -a548 5 561 1199 -a54d 1c 568 1199 -a569 d 571 1199 -a576 5 568 1199 -a57b 7 574 1199 -a582 c 577 1199 -a58e 5 582 1199 -a593 8 588 1199 -a59b 2 589 1199 -a59d 6 577 1199 -a5a3 6 578 1199 -a5a9 9 579 1199 -a5b2 5 590 1199 -a5b7 f 597 1199 -a5c6 6 598 1199 -a5cc 5 603 1199 -a5d1 6 604 1199 -a5d7 2 607 1199 -a5d9 6 608 1199 -FUNC a5df a 4 _initp_misc_rand_s -a5df 0 58 1489 -a5df 9 59 1489 -a5e8 1 60 1489 -FUNC a5e9 104 4 rand_s -a5e9 3 66 1489 -a5ec b 67 1489 -a5f7 2b 68 1489 -a622 c 71 1489 -a62e d 77 1489 -a63b 4 78 1489 -a63f 1e 80 1489 -a65d e 83 1489 -a66b 4 84 1489 -a66f 2f 86 1489 -a69e 9 88 1489 -a6a7 5 89 1489 -a6ac 16 94 1489 -a6c2 7 103 1489 -a6c9 9 107 1489 -a6d2 b 109 1489 -a6dd 9 110 1489 -a6e6 6 112 1489 -a6ec 1 113 1489 -FUNC a6ed 15a 14 __getlocaleinfo -a6ed 1d 70 1937 -a70a 7 76 1937 -a711 87 109 1937 -a798 13 103 1937 -a7ab 5 114 1937 -a7b0 7 115 1937 -a7b7 3 141 1937 -a7ba 12 142 1937 -a7cc 20 106 1937 -a7ec 5 108 1937 -a7f1 7 109 1937 -a7f8 4 111 1937 -a7fc 5 118 1937 -a801 1a 126 1937 -a81b 2 127 1937 -a81d 2 129 1937 -a81f 10 134 1937 -a82f 16 135 1937 -a845 2 139 1937 -FUNC a847 a 4 _initp_misc_purevirt -a847 0 166 1937 -a847 9 167 1937 -a850 1 168 1937 -FUNC a851 a 4 _initp_misc_initcrit -a851 0 47 2023 -a851 9 48 2023 -a85a 1 49 2023 -FUNC a85b 10 8 __crtInitCritSecNoSpinCount -a85b 0 76 2023 -a85b a 77 2023 -a865 3 78 2023 -a868 3 79 2023 -FUNC a86b c5 8 __crtInitCritSecAndSpinCount -a86b c 109 2023 -a877 5 111 2023 -a87c e 112 2023 -a88a 4 114 2023 -a88e 1b 120 2023 -a8a9 4 121 2023 -a8ad 2 129 2023 -a8af b 130 2023 -a8ba 4 131 2023 -a8be e 134 2023 -a8cc 4 136 2023 -a8d0 5 149 2023 -a8d5 c 152 2023 -a8e1 3 155 2023 -a8e4 b 161 2023 -a8ef 2 162 2023 -a8f1 1a 163 2023 -a90b 9 170 2023 -a914 8 171 2023 -a91c 4 173 2023 -a920 7 174 2023 -a927 3 176 2023 -a92a 6 177 2023 -FUNC a930 a 4 _initp_heap_handler -a930 0 31 3260 -a930 9 32 3260 -a939 1 33 3260 -FUNC a93a 31 4 _set_new_handler(int (*)(unsigned int)) -a93a 1 53 3260 -a93b 7 57 3260 -a942 b 59 3260 -a94d b 60 3260 -a958 f 63 3260 -a967 3 65 3260 -a96a 1 66 3260 -FUNC a96b 9 4 _set_new_handler(int) -a96b 0 86 3260 -a96b 8 89 3260 -a973 1 90 3260 -FUNC a974 d 0 _query_new_handler() -a974 0 110 3260 -a974 c 111 3260 -a980 1 112 3260 -FUNC a981 22 4 _callnewh -a981 0 131 3260 -a981 b 133 3260 -a98c 10 135 3260 -a99c 3 138 3260 -a99f 1 139 3260 -a9a0 2 136 3260 -a9a2 1 139 3260 -FUNC a9a3 1bd c __crtMessageBoxA -a9a3 9 41 2447 -a9ac 5 49 2447 -a9b1 2 56 2447 -a9b3 18 64 2447 -a9cb d 66 2447 -a9d8 2 67 2447 -a9da 6 69 2447 -a9e0 10 76 2447 -a9f0 6 78 2447 -a9f6 6 80 2447 -a9fc 15 83 2447 -aa11 1a 86 2447 -aa2b 1c 88 2447 -aa47 6 89 2447 -aa4d 8 95 2447 -aa55 6 98 2447 -aa5b a 100 2447 -aa65 14 102 2447 -aa79 14 116 2447 -aa8d 6 119 2447 -aa93 d 120 2447 -aaa0 c 122 2447 -aaac 1f 127 2447 -aacb 1b 136 2447 -aae6 6 137 2447 -aaec 7 138 2447 -aaf3 2 139 2447 -aaf5 7 140 2447 -aafc 2 142 2447 -aafe a 144 2447 -ab08 6 146 2447 -ab0e 5 147 2447 -ab13 2 149 2447 -ab15 11 153 2447 -ab26 6 155 2447 -ab2c 5 156 2447 -ab31 8 158 2447 -ab39 b 165 2447 -ab44 5 166 2447 -ab49 10 168 2447 -ab59 5 173 2447 -ab5e 2 176 2447 -FUNC ab60 71 c strcat_s -ab60 0 13 490 -ab60 30 18 490 -ab90 c 19 490 -ab9c 2 21 490 -ab9e 4 23 490 -aba2 1 25 490 -aba3 3 26 490 -aba6 2 29 490 -aba8 2 32 490 -abaa d 35 490 -abb7 4 39 490 -abbb 2 41 490 -abbd e 42 490 -abcb 5 45 490 -abd0 1 46 490 -FUNC abd1 b3 10 strncpy_s -abd1 5 13 406 -abd6 14 17 406 -abea 5 65 406 -abef 2 66 406 -abf1 26 24 406 -ac17 5 25 406 -ac1c 2 28 406 -ac1e 2 29 406 -ac20 b 31 406 -ac2b 8 35 406 -ac33 d 37 406 -ac40 2 41 406 -ac42 12 45 406 -ac54 5 48 406 -ac59 2 50 406 -ac5b 4 54 406 -ac5f 6 56 406 -ac65 3 58 406 -ac68 c 59 406 -ac74 2 61 406 -ac76 e 62 406 -FUNC ac84 46 4 _set_error_mode -ac84 0 43 2351 -ac84 15 50 2351 -ac99 6 58 2351 -ac9f 1 65 2351 -aca0 5 54 2351 -aca5 7 55 2351 -acac 1 65 2351 -acad 1c 61 2351 -acc9 1 65 2351 -FUNC acca a 4 __set_app_type -acca 0 91 2351 -acca 9 96 2351 -acd3 1 97 2351 -FUNC acd4 6 0 __get_app_type -acd4 0 120 2351 -acd4 5 125 2351 -acd9 1 126 2351 -FUNC acda 21 4 wait_a_bit -acda 1 18 3587 -acdb b 19 3587 -ace6 6 20 3587 -acec 8 21 3587 -acf4 3 22 3587 -acf7 3 23 3587 -acfa 1 24 3587 -FUNC acfb 10 4 _set_malloc_crt_max_wait -acfb 0 32 3587 -acfb f 34 3587 -ad0a 1 36 3587 -FUNC ad0b 40 4 _malloc_crt -ad0b 2 39 3587 -ad0d 2 40 3587 -ad0f b 44 3587 -ad1a d 45 3587 -ad27 18 46 3587 -ad3f 7 47 3587 -ad46 4 50 3587 -ad4a 1 51 3587 -FUNC ad4b 48 8 _calloc_crt -ad4b 2 54 3587 -ad4d 2 55 3587 -ad4f 14 61 3587 -ad63 c 62 3587 -ad6f 18 63 3587 -ad87 7 64 3587 -ad8e 4 67 3587 -ad92 1 68 3587 -FUNC ad93 4b 8 _realloc_crt -ad93 2 71 3587 -ad95 2 72 3587 -ad97 f 76 3587 -ada6 14 77 3587 -adba 18 78 3587 -add2 7 79 3587 -add9 4 82 3587 -addd 1 83 3587 -FUNC adde 50 c _recalloc_crt -adde 2 86 3587 -ade0 2 87 3587 -ade2 16 91 3587 -adf8 12 92 3587 -ae0a 18 94 3587 -ae22 7 95 3587 -ae29 4 100 3587 -ae2d 1 101 3587 -FUNC ae2e 8 0 _malloc_crt_fastcall -ae2e 0 105 3587 -ae2e 7 106 3587 -ae35 1 107 3587 -FUNC ae36 a 0 _calloc_crt_fastcall -ae36 0 110 3587 -ae36 9 111 3587 -ae3f 1 112 3587 -FUNC ae40 a 0 _realloc_crt_fastcall -ae40 0 115 3587 -ae40 9 116 3587 -ae49 1 117 3587 -FUNC ae4a e 0 _LocaleUpdate::~_LocaleUpdate() -ae4a 0 282 3057 -ae4a 6 283 3057 -ae50 7 284 3057 -ae57 1 285 3057 -FUNC ae58 3 0 _LocaleUpdate::GetLocaleT() -ae58 2 287 3057 -ae5a 1 289 3057 -FUNC ae5b 2f 0 CPtoLCID -ae5b 0 329 3029 -ae5b 14 330 3029 -ae6f 2 345 3029 -ae71 1 346 3029 -ae72 5 342 3029 -ae77 1 346 3029 -ae78 5 339 3029 -ae7d 1 346 3029 -ae7e 5 336 3029 -ae83 1 346 3029 -ae84 5 333 3029 -ae89 1 346 3029 -FUNC ae8a 55 0 setSBCS -ae8a 4 363 3029 -ae8e 14 368 3029 -aea2 3 371 3029 -aea5 3 374 3029 -aea8 3 376 3029 -aeab 8 379 3029 -aeb3 a 381 3029 -aebd 9 382 3029 -aec6 b 384 3029 -aed1 d 385 3029 -aede 1 386 3029 -FUNC aedf 18a 0 setSBUpLow -aedf 1d 402 3029 -aefc f 412 3029 -af0b d 415 3029 -af18 c 416 3029 -af24 e 420 3029 -af32 3 419 3029 -af35 28 421 3029 -af5d 1d 427 3029 -af7a 23 432 3029 -af9d 25 437 3029 -afc2 2 442 3029 -afc4 a 443 3029 -afce 5 445 3029 -afd3 9 446 3029 -afdc 5 448 3029 -afe1 5 450 3029 -afe6 e 451 3029 -aff4 2 453 3029 -aff6 8 454 3029 -affe 5 442 3029 -b003 8 456 3029 -b00b 2c 472 3029 -b037 5 466 3029 -b03c 5 468 3029 -b041 7 469 3029 -b048 2 471 3029 -b04a 3 472 3029 -b04d 5 460 3029 -b052 17 474 3029 -FUNC b069 a4 0 __updatetmbcinfo -b069 c 496 3029 -b075 7 499 3029 -b07c 10 500 3029 -b08c 3 533 3029 -b08f 4 536 3029 -b093 8 538 3029 -b09b 2 541 3029 -b09d 6 542 3029 -b0a3 8 501 3029 -b0ab 4 503 3029 -b0af e 506 3029 -b0bd 17 512 3029 -b0d4 7 517 3029 -b0db 11 524 3029 -b0ec 7 525 3029 -b0f3 11 528 3029 -b104 9 530 3029 -FUNC b10d 82 4 _LocaleUpdate::_LocaleUpdate(localeinfo_struct *) -b10d 0 261 3057 -b10d f 262 3057 -b11c 8 264 3057 -b124 5 265 3057 -b129 6 266 3057 -b12f 1c 268 3057 -b14b 21 269 3057 -b16c 9 270 3057 -b175 4 272 3057 -b179 4 273 3057 -b17d 2 276 3057 -b17f a 278 3057 -b189 6 280 3057 -FUNC b18f 7a 0 getSystemCP -b18f 7 282 3029 -b196 b 284 3029 -b1a1 b 289 3029 -b1ac a 291 3029 -b1b6 14 292 3029 -b1ca 5 295 3029 -b1cf a 297 3029 -b1d9 8 298 3029 -b1e1 5 302 3029 -b1e6 12 305 3029 -b1f8 f 308 3029 -b207 2 309 3029 -FUNC b209 1d9 8 _setmbcp_nolock -b209 15 686 3029 -b21e b 693 3029 -b229 9 696 3029 -b232 7 698 3029 -b239 7 699 3029 -b240 3 703 3029 -b243 2 705 3029 -b245 19 708 3029 -b25e 2a 743 3029 -b288 13 751 3029 -b29b f 756 3029 -b2aa 15 761 3029 -b2bf 17 764 3029 -b2d6 c 766 3029 -b2e2 f 712 3029 -b2f1 15 715 3029 -b306 9 720 3029 -b30f 8 723 3029 -b317 12 724 3029 -b329 9 723 3029 -b332 5 720 3029 -b337 12 715 3029 -b349 20 731 3029 -b369 d 733 3029 -b376 7 736 3029 -b37d 5 737 3029 -b382 6 767 3029 -b388 10 766 3029 -b398 8 771 3029 -b3a0 7 772 3029 -b3a7 b 775 3029 -b3b2 3 778 3029 -b3b5 2 780 3029 -b3b7 3 782 3029 -b3ba 8 785 3029 -b3c2 2 789 3029 -b3c4 6 794 3029 -b3ca 6 797 3029 -b3d0 3 746 3029 -b3d3 f 802 3029 -FUNC b3e2 3c 0 _getmbcp -b3e2 6 819 3029 -b3e8 a 821 3029 -b3f2 9 822 3029 -b3fb 10 823 3029 -b40b 2 826 3029 -b40d f 825 3029 -b41c 2 826 3029 -FUNC b41e 19a 4 _setmbcp -b41e c 574 3029 -b42a 4 575 3029 -b42e a 579 3029 -b438 5 581 3029 -b43d 3 582 3029 -b440 b 585 3029 -b44b 9 587 3029 -b454 d 593 3029 -b461 8 595 3029 -b469 c 597 3029 -b475 3 607 3029 -b478 16 612 3029 -b48e 1a 614 3029 -b4a8 7 615 3029 -b4af 3 619 3029 -b4b2 9 620 3029 -b4bb 17 622 3029 -b4d2 8 624 3029 -b4da 4 625 3029 -b4de 8 630 3029 -b4e6 8 631 3029 -b4ee 8 632 3029 -b4f6 a 633 3029 -b500 d 634 3029 -b50d 3 633 3029 -b510 c 635 3029 -b51c a 636 3029 -b526 3 635 3029 -b529 c 637 3029 -b535 d 638 3029 -b542 3 637 3029 -b545 1c 640 3029 -b561 7 641 3029 -b568 6 645 3029 -b56e 3 646 3029 -b571 e 648 3029 -b57f 9 650 3029 -b588 2 653 3029 -b58a 5 654 3029 -b58f 8 660 3029 -b597 7 661 3029 -b59e b 662 3029 -b5a9 2 668 3029 -b5ab 4 673 3029 -b5af 3 682 3029 -b5b2 6 683 3029 -FUNC b5b8 1e 0 __initmbctable -b5b8 0 843 3029 -b5b8 9 853 3029 -b5c1 8 854 3029 -b5c9 a 855 3029 -b5d3 2 860 3029 -b5d5 1 861 3029 -FUNC b5d6 51 10 x_ismbbtype_l -b5d6 6 213 3083 -b5dc b 214 3083 -b5e7 4 219 3083 -b5eb 3a 222 3083 -b625 2 223 3083 -FUNC b627 15 8 _ismbbkalnum_l -b627 0 80 3083 -b627 14 81 3083 -b63b 1 82 3083 -FUNC b63c 13 4 _ismbbkalnum -b63c 0 85 3083 -b63c 12 86 3083 -b64e 1 87 3083 -FUNC b64f 15 8 _ismbbkprint_l -b64f 0 90 3083 -b64f 14 91 3083 -b663 1 92 3083 -FUNC b664 13 4 _ismbbkprint -b664 0 95 3083 -b664 12 96 3083 -b676 1 97 3083 -FUNC b677 15 8 _ismbbkpunct_l -b677 0 100 3083 -b677 14 101 3083 -b68b 1 102 3083 -FUNC b68c 13 4 _ismbbkpunct -b68c 0 105 3083 -b68c 12 106 3083 -b69e 1 107 3083 -FUNC b69f 18 8 _ismbbalnum_l -b69f 0 113 3083 -b69f 17 114 3083 -b6b6 1 115 3083 -FUNC b6b7 16 4 _ismbbalnum -b6b7 0 118 3083 -b6b7 15 119 3083 -b6cc 1 120 3083 -FUNC b6cd 18 8 _ismbbalpha_l -b6cd 0 123 3083 -b6cd 17 124 3083 -b6e4 1 125 3083 -FUNC b6e5 16 4 _ismbbalpha -b6e5 0 128 3083 -b6e5 15 129 3083 -b6fa 1 130 3083 -FUNC b6fb 18 8 _ismbbgraph_l -b6fb 0 133 3083 -b6fb 17 134 3083 -b712 1 135 3083 -FUNC b713 16 4 _ismbbgraph -b713 0 138 3083 -b713 15 139 3083 -b728 1 140 3083 -FUNC b729 18 8 _ismbbprint_l -b729 0 143 3083 -b729 17 144 3083 -b740 1 145 3083 -FUNC b741 16 4 _ismbbprint -b741 0 148 3083 -b741 15 149 3083 -b756 1 150 3083 -FUNC b757 15 8 _ismbbpunct_l -b757 0 153 3083 -b757 14 154 3083 -b76b 1 155 3083 -FUNC b76c 13 4 _ismbbpunct -b76c 0 158 3083 -b76c 12 159 3083 -b77e 1 160 3083 -FUNC b77f 15 8 _ismbblead_l -b77f 0 166 3083 -b77f 14 167 3083 -b793 1 168 3083 -FUNC b794 13 4 _ismbblead -b794 0 171 3083 -b794 12 172 3083 -b7a6 1 173 3083 -FUNC b7a7 15 8 _ismbbtrail_l -b7a7 0 176 3083 -b7a7 14 177 3083 -b7bb 1 178 3083 -FUNC b7bc 13 4 _ismbbtrail -b7bc 0 181 3083 -b7bc 12 182 3083 -b7ce 1 183 3083 -FUNC b7cf 53 8 _ismbbkana_l -b7cf 6 189 3083 -b7d5 b 190 3083 -b7e0 10 192 3083 -b7f0 1f 194 3083 -b80f 2 197 3083 -b811 f 196 3083 -b820 2 197 3083 -FUNC b822 e 4 _ismbbkana -b822 0 200 3083 -b822 d 201 3083 -b82f 1 202 3083 -FUNC b830 365 c memcpy -b830 3 101 614 -b833 1 113 614 -b834 1 114 614 -b835 3 116 614 -b838 3 117 614 -b83b 3 119 614 -b83e 2 129 614 -b840 2 131 614 -b842 2 132 614 -b844 2 134 614 -b846 2 135 614 -b848 2 137 614 -b84a 6 138 614 -b850 6 147 614 -b856 2 148 614 -b858 7 150 614 -b85f 2 151 614 -b861 1 153 614 -b862 1 154 614 -b863 3 155 614 -b866 3 156 614 -b869 2 157 614 -b86b 1 158 614 -b86c 1 159 614 -b86d 2 160 614 -b86f 1 163 614 -b870 1 164 614 -b871 1 165 614 -b872 5 166 614 -b877 6 179 614 -b87d 2 180 614 -b87f 3 182 614 -b882 3 183 614 -b885 3 185 614 -b888 2 186 614 -b88a 2 188 614 -b88c 8 190 614 -b894 2 208 614 -b896 5 209 614 -b89b 3 211 614 -b89e 2 212 614 -b8a0 3 214 614 -b8a3 2 215 614 -b8a5 7 217 614 -b8ac 8 221 614 -b8b4 14 225 614 -b8c8 2 232 614 -b8ca 2 233 614 -b8cc 2 235 614 -b8ce 3 236 614 -b8d1 3 238 614 -b8d4 3 239 614 -b8d7 3 241 614 -b8da 3 242 614 -b8dd 3 244 614 -b8e0 3 245 614 -b8e3 3 247 614 -b8e6 2 248 614 -b8e8 2 250 614 -b8ea a 252 614 -b8f4 2 256 614 -b8f6 2 257 614 -b8f8 2 259 614 -b8fa 3 260 614 -b8fd 3 262 614 -b900 3 263 614 -b903 3 265 614 -b906 3 266 614 -b909 3 268 614 -b90c 2 269 614 -b90e 2 271 614 -b910 8 273 614 -b918 2 277 614 -b91a 2 278 614 -b91c 2 280 614 -b91e 3 281 614 -b921 3 283 614 -b924 3 284 614 -b927 3 286 614 -b92a 2 287 614 -b92c 2 289 614 -b92e 2a 291 614 -b958 4 298 614 -b95c 4 300 614 -b960 4 302 614 -b964 4 304 614 -b968 4 306 614 -b96c 4 308 614 -b970 4 310 614 -b974 4 312 614 -b978 4 314 614 -b97c 4 316 614 -b980 4 318 614 -b984 4 320 614 -b988 4 322 614 -b98c 4 324 614 -b990 7 326 614 -b997 2 328 614 -b999 2 329 614 -b99b 19 331 614 -b9b4 3 340 614 -b9b7 1 341 614 -b9b8 1 342 614 -b9b9 3 344 614 -b9bc 2 348 614 -b9be 2 350 614 -b9c0 3 351 614 -b9c3 1 352 614 -b9c4 1 353 614 -b9c5 3 354 614 -b9c8 2 358 614 -b9ca 2 360 614 -b9cc 3 361 614 -b9cf 3 362 614 -b9d2 3 363 614 -b9d5 1 364 614 -b9d6 1 365 614 -b9d7 5 366 614 -b9dc 2 370 614 -b9de 2 372 614 -b9e0 3 373 614 -b9e3 3 374 614 -b9e6 3 375 614 -b9e9 3 376 614 -b9ec 3 377 614 -b9ef 1 378 614 -b9f0 1 379 614 -b9f1 3 380 614 -b9f4 4 391 614 -b9f8 4 392 614 -b9fc 6 397 614 -ba02 2 398 614 -ba04 3 400 614 -ba07 3 401 614 -ba0a 3 403 614 -ba0d 2 404 614 -ba0f 1 406 614 -ba10 2 407 614 -ba12 1 408 614 -ba13 9 410 614 -ba1c 2 414 614 -ba1e a 417 614 -ba28 2 422 614 -ba2a 5 423 614 -ba2f 3 425 614 -ba32 2 426 614 -ba34 3 428 614 -ba37 2 429 614 -ba39 7 431 614 -ba40 14 435 614 -ba54 3 442 614 -ba57 2 443 614 -ba59 3 445 614 -ba5c 3 446 614 -ba5f 3 448 614 -ba62 3 449 614 -ba65 3 451 614 -ba68 2 452 614 -ba6a 1 454 614 -ba6b 2 455 614 -ba6d 1 456 614 -ba6e a 458 614 -ba78 3 462 614 -ba7b 2 463 614 -ba7d 3 465 614 -ba80 3 466 614 -ba83 3 468 614 -ba86 3 469 614 -ba89 3 471 614 -ba8c 3 472 614 -ba8f 3 474 614 -ba92 2 475 614 -ba94 1 477 614 -ba95 2 478 614 -ba97 1 479 614 -ba98 8 481 614 -baa0 3 485 614 -baa3 2 486 614 -baa5 3 488 614 -baa8 3 489 614 -baab 3 491 614 -baae 3 492 614 -bab1 3 494 614 -bab4 3 495 614 -bab7 3 497 614 -baba 3 498 614 -babd 3 500 614 -bac0 6 501 614 -bac6 1 503 614 -bac7 2 504 614 -bac9 1 505 614 -baca 2a 507 614 -baf4 4 516 614 -baf8 4 518 614 -bafc 4 520 614 -bb00 4 522 614 -bb04 4 524 614 -bb08 4 526 614 -bb0c 4 528 614 -bb10 4 530 614 -bb14 4 532 614 -bb18 4 534 614 -bb1c 4 536 614 -bb20 4 538 614 -bb24 4 540 614 -bb28 4 542 614 -bb2c 7 544 614 -bb33 2 546 614 -bb35 2 547 614 -bb37 19 549 614 -bb50 3 558 614 -bb53 1 560 614 -bb54 1 561 614 -bb55 3 562 614 -bb58 3 566 614 -bb5b 3 568 614 -bb5e 3 569 614 -bb61 1 570 614 -bb62 1 571 614 -bb63 5 572 614 -bb68 3 576 614 -bb6b 3 578 614 -bb6e 3 579 614 -bb71 3 580 614 -bb74 3 581 614 -bb77 1 582 614 -bb78 1 583 614 -bb79 3 584 614 -bb7c 3 588 614 -bb7f 3 590 614 -bb82 3 591 614 -bb85 3 592 614 -bb88 3 593 614 -bb8b 3 594 614 -bb8e 3 595 614 -bb91 1 596 614 -bb92 1 597 614 -bb93 2 598 614 -FUNC bb95 6 0 ___setlc_active_func -bb95 0 90 1409 -bb95 5 91 1409 -bb9a 1 92 1409 -FUNC bb9b 6 0 ___unguarded_readlc_active_add_func -bb9b 0 104 1409 -bb9b 5 105 1409 -bba0 1 106 1409 -FUNC bba1 140 4 __freetlocinfo -bba1 3 144 1409 -bba4 26 152 1409 -bbca e 155 1409 -bbd8 6 157 1409 -bbde d 158 1409 -bbeb e 162 1409 -bbf9 6 164 1409 -bbff d 165 1409 -bc0c b 168 1409 -bc17 d 169 1409 -bc24 e 176 1409 -bc32 11 178 1409 -bc43 13 179 1409 -bc56 e 180 1409 -bc64 e 181 1409 -bc72 17 188 1409 -bc89 6 190 1409 -bc8f 9 191 1409 -bc98 6 194 1409 -bc9e 13 197 1409 -bcb1 7 199 1409 -bcb8 10 205 1409 -bcc8 d 207 1409 -bcd5 b 214 1409 -bce0 1 215 1409 -FUNC bce1 86 4 __addlocaleref -bce1 3 225 1409 -bce4 e 227 1409 -bcf2 a 228 1409 -bcfc 3 229 1409 -bcff a 231 1409 -bd09 3 232 1409 -bd0c a 234 1409 -bd16 3 235 1409 -bd19 a 237 1409 -bd23 3 238 1409 -bd26 6 240 1409 -bd2c f 242 1409 -bd3b 3 243 1409 -bd3e d 245 1409 -bd4b 9 246 1409 -bd54 12 248 1409 -bd66 1 249 1409 -FUNC bd67 8c 4 __removelocaleref -bd67 1 259 1409 -bd68 b 261 1409 -bd73 9 263 1409 -bd7c a 265 1409 -bd86 3 266 1409 -bd89 a 268 1409 -bd93 3 269 1409 -bd96 a 271 1409 -bda0 3 272 1409 -bda3 a 274 1409 -bdad 3 275 1409 -bdb0 6 277 1409 -bdb6 f 279 1409 -bdc5 3 280 1409 -bdc8 d 282 1409 -bdd5 9 283 1409 -bdde 11 285 1409 -bdef 3 287 1409 -bdf2 1 288 1409 -FUNC bdf3 24 0 _copytlocinfo_nolock -bdf3 3 302 1409 -bdf6 d 303 1409 -be03 7 304 1409 -be0a 3 305 1409 -be0d 9 306 1409 -be16 1 308 1409 -FUNC be17 3e 0 _updatetlocinfoEx_nolock -be17 0 321 1409 -be17 9 324 1409 -be20 2 326 1409 -be22 4 327 1409 -be26 8 334 1409 -be2e 5 339 1409 -be33 6 341 1409 -be39 e 350 1409 -be47 7 351 1409 -be4e 3 355 1409 -be51 1 356 1409 -be52 2 325 1409 -be54 1 356 1409 -FUNC be55 76 0 __updatetlocinfo -be55 c 382 1409 -be61 7 384 1409 -be68 10 386 1409 -be78 8 397 1409 -be80 4 399 1409 -be84 8 401 1409 -be8c 2 404 1409 -be8e 6 405 1409 -be94 8 387 1409 -be9c 4 388 1409 -bea0 11 390 1409 -beb1 e 392 1409 -bebf 8 394 1409 -bec7 4 395 1409 -FUNC becb 66 4 _configthreadlocale -becb 2 420 1409 -becd 5 434 1409 -bed2 10 435 1409 -bee2 19 437 1409 -befb 1d 456 1409 -bf18 3 444 1409 -bf1b 2 445 1409 -bf1d 6 440 1409 -bf23 2 441 1409 -bf25 7 452 1409 -bf2c 4 460 1409 -bf30 1 462 1409 -FUNC bf31 53 0 sync_legacy_variables_lk -bf31 0 489 1409 -bf31 e 490 1409 -bf3f 9 491 1409 -bf48 c 492 1409 -bf54 c 493 1409 -bf60 c 494 1409 -bf6c c 495 1409 -bf78 b 496 1409 -bf83 1 497 1409 -FUNC bf84 96 4 _free_locale -bf84 c 517 1409 -bf90 9 518 1409 -bf99 1c 522 1409 -bfb5 7 524 1409 -bfbc 4 526 1409 -bfc0 8 534 1409 -bfc8 3 535 1409 -bfcb 8 537 1409 -bfd3 11 540 1409 -bfe4 7 541 1409 -bfeb c 543 1409 -bff7 7 552 1409 -bffe 3 553 1409 -c001 7 554 1409 -c008 6 556 1409 -c00e 3 543 1409 -c011 9 545 1409 -FUNC c01a 5 4 __free_locale -c01a 0 562 1409 -c01a 5 563 1409 -FUNC c01f 88 0 _get_current_locale -c01f c 687 1409 -c02b 7 689 1409 -c032 14 691 1409 -c046 b 693 1409 -c051 4 694 1409 -c055 5 697 1409 -c05a 5 698 1409 -c05f 5 706 1409 -c064 6 707 1409 -c06a 8 708 1409 -c072 4 709 1409 -c076 8 710 1409 -c07e c 712 1409 -c08a 9 715 1409 -c093 2 717 1409 -c095 6 718 1409 -c09b 3 712 1409 -c09e 9 713 1409 -FUNC c0a7 5 0 __get_current_locale -c0a7 0 722 1409 -c0a7 5 723 1409 -FUNC c0ac 3 4 __init_dummy -c0ac 0 1283 1409 -c0ac 2 1284 1409 -c0ae 1 1285 1409 -FUNC c0af 3e c _strcats -c0af 2 1288 1409 -c0b1 f 1294 1409 -c0c0 26 1296 1409 -c0e6 6 1294 1409 -c0ec 1 1299 1409 -FUNC c0ed 129 8 __lc_strtolc -c0ed 6 1302 1409 -c0f3 11 1307 1409 -c104 c 1309 1409 -c110 7 1310 1409 -c117 b 1313 1409 -c122 25 1315 1409 -c147 6 1317 1409 -c14d 2 1318 1409 -c14f 15 1323 1409 -c164 1d 1328 1409 -c181 9 1329 1409 -c18a 10 1331 1409 -c19a c 1332 1409 -c1a6 14 1334 1409 -c1ba 28 1335 1409 -c1e2 9 1340 1409 -c1eb b 1348 1409 -c1f6 18 1350 1409 -c20e 6 1338 1409 -c214 2 1353 1409 -FUNC c216 6b c __lc_lctostr -c216 5 1356 1409 -c21b 25 1357 1409 -c240 7 1358 1409 -c247 16 1359 1409 -c25d c 1360 1409 -c269 16 1361 1409 -c27f 2 1362 1409 -FUNC c281 171 0 _setlocale_get_all -c281 4 1124 1409 -c285 3 1126 1409 -c288 1d 1134 1409 -c2a5 3 1137 1409 -c2a8 3 1139 1409 -c2ab 2 1140 1409 -c2ad 2f 1143 1409 -c2dc 26 1146 1409 -c302 10 1147 1409 -c312 5 1148 1409 -c317 4 1141 1409 -c31b 2f 1143 1409 -c34a a 1144 1409 -c354 8 1152 1409 -c35c 14 1154 1409 -c370 9 1156 1409 -c379 e 1159 1409 -c387 9 1161 1409 -c390 7 1165 1409 -c397 7 1166 1409 -c39e 9 1168 1409 -c3a7 15 1170 1409 -c3bc 9 1172 1409 -c3c5 e 1175 1409 -c3d3 9 1177 1409 -c3dc 12 1183 1409 -c3ee 4 1187 1409 -FUNC c3f2 1d4 18 _expandlocale -c3f2 15 1198 1409 -c407 41 1230 1409 -c448 14 1211 1409 -c45c b 1216 1409 -c467 26 1219 1409 -c48d 4 1220 1409 -c491 3 1222 1409 -c494 4 1223 1409 -c498 4 1224 1409 -c49c 7 1226 1409 -c4a3 2 1228 1409 -c4a5 8 1230 1409 -c4ad 6 1234 1409 -c4b3 2f 1236 1409 -c4e2 4 1241 1409 -c4e6 e 1243 1409 -c4f4 6 1244 1409 -c4fa 10 1246 1409 -c50a 6 1247 1409 -c510 9 1251 1409 -c519 10 1253 1409 -c529 a 1255 1409 -c533 2 1260 1409 -c535 8 1263 1409 -c53d 26 1267 1409 -c563 5 1271 1409 -c568 e 1272 1409 -c576 5 1273 1409 -c57b 10 1274 1409 -c58b 22 1276 1409 -c5ad 5 1277 1409 -c5b2 2 1212 1409 -c5b4 12 1278 1409 -FUNC c5c6 2f6 4 _setlocale_set_cat -c5c6 19 980 1409 -c5df 5 993 1409 -c5e4 2f 998 1409 -c613 7 1000 1409 -c61a 19 1002 1409 -c633 6 1004 1409 -c639 c 1007 1409 -c645 16 1008 1409 -c65b 2 1010 1409 -c65d 3 1013 1409 -c660 d 1014 1409 -c66d 2c 1015 1409 -c699 3 1016 1409 -c69c 39 1019 1409 -c6d5 6 1020 1409 -c6db 15 1021 1409 -c6f0 17 1022 1409 -c707 a 1029 1409 -c711 6 1031 1409 -c717 18 1037 1409 -c72f 7 1039 1409 -c736 8 1053 1409 -c73e 14 1054 1409 -c752 18 1055 1409 -c76a 2 1039 1409 -c76c a 1044 1409 -c776 d 1046 1409 -c783 b 1047 1409 -c78e 9 1058 1409 -c797 26 1066 1409 -c7bd 2 1069 1409 -c7bf 10 1071 1409 -c7cf 22 1072 1409 -c7f1 2 1081 1409 -c7f3 4 1082 1409 -c7f7 5 1083 1409 -c7fc 9 1085 1409 -c805 6 1088 1409 -c80b 9 1089 1409 -c814 12 1091 1409 -c826 6 1094 1409 -c82c e 1095 1409 -c83a f 1096 1409 -c849 9 1097 1409 -c852 5 1099 1409 -c857 24 1106 1409 -c87b 7 1109 1409 -c882 8 1110 1409 -c88a 6 1111 1409 -c890 18 1116 1409 -c8a8 3 1118 1409 -c8ab 11 1119 1409 -FUNC c8bc 1ce 4 _setlocale_nolock -c8bc 1a 873 1409 -c8d6 7 877 1409 -c8dd 5 904 1409 -c8e2 17 880 1409 -c8f9 5 882 1409 -c8fe 12 888 1409 -c910 1d 890 1409 -c92d 2 894 1409 -c92f d 898 1409 -c93c 1e 900 1409 -c95a 11 904 1409 -c96b 1d 907 1409 -c988 e 904 1409 -c996 1b 913 1409 -c9b1 6 916 1409 -c9b7 24 918 1409 -c9db 18 922 1409 -c9f3 3 923 1409 -c9f6 7 925 1409 -c9fd 1 926 1409 -c9fe 9 928 1409 -ca07 c 930 1409 -ca13 4 901 1409 -ca17 19 935 1409 -ca30 3 937 1409 -ca33 4 939 1409 -ca37 11 941 1409 -ca48 c 943 1409 -ca54 2 947 1409 -ca56 3 949 1409 -ca59 2 952 1409 -ca5b 3 953 1409 -ca5e 9 937 1409 -ca67 5 956 1409 -ca6c 2 961 1409 -ca6e 3 962 1409 -ca71 2 965 1409 -ca73 5 966 1409 -ca78 12 972 1409 -FUNC ca8a f3 8 _create_locale -ca8a 0 605 1409 -ca8a 10 609 1409 -ca9a 13 612 1409 -caad b 614 1409 -cab8 4 610 1409 -cabc c 658 1409 -cac8 8 617 1409 -cad0 7 619 1409 -cad7 2 621 1409 -cad9 14 623 1409 -caed 7 625 1409 -caf4 7 626 1409 -cafb 2 628 1409 -cafd c 630 1409 -cb09 14 632 1409 -cb1d 7 634 1409 -cb24 7 635 1409 -cb2b 9 637 1409 -cb34 2 640 1409 -cb36 13 642 1409 -cb49 8 644 1409 -cb51 7 645 1409 -cb58 7 646 1409 -cb5f 9 647 1409 -cb68 2 648 1409 -cb6a 2 650 1409 -cb6c 5 652 1409 -cb71 5 653 1409 -cb76 7 657 1409 -FUNC cb7d 5 8 __create_locale -cb7d 0 665 1409 -cb7d 5 666 1409 -FUNC cb82 170 8 setlocale -cb82 c 791 1409 -cb8e 5 792 1409 -cb93 25 797 1409 -cbb8 a 799 1409 -cbc2 5 801 1409 -cbc7 4 806 1409 -cbcb 3 807 1409 -cbce 1b 808 1409 -cbe9 8 818 1409 -cbf1 7 819 1409 -cbf8 a 820 1409 -cc02 8 822 1409 -cc0a 19 826 1409 -cc23 18 834 1409 -cc3b a 836 1409 -cc45 8 839 1409 -cc4d 7 840 1409 -cc54 a 841 1409 -cc5e 7 842 1409 -cc65 f 846 1409 -cc74 c 847 1409 -cc80 18 849 1409 -cc98 5 850 1409 -cc9d b 852 1409 -cca8 8 822 1409 -ccb0 9 823 1409 -ccb9 3 852 1409 -ccbc 9 853 1409 -ccc5 2 855 1409 -ccc7 6 856 1409 -cccd 8 857 1409 -ccd5 c 860 1409 -cce1 3 865 1409 -cce4 6 866 1409 -ccea 3 860 1409 -cced 5 862 1409 -FUNC ccf2 f 0 __security_check_cookie -ccf2 0 52 2811 -ccf2 6 55 2811 -ccf8 2 56 2811 -ccfa 2 57 2811 -ccfc 5 59 2811 -FUNC cd04 90 0 _local_unwind4 -FUNC cd94 46 0 _unwind_handler4 -FUNC cdda 1c 4 _seh_longjmp_unwind4 -FUNC cdf6 17 0 _EH4_CallFilterFunc -FUNC ce0d 19 0 _EH4_TransferToHandler -FUNC ce26 1a 0 _EH4_GlobalUnwind -FUNC ce40 17 8 _EH4_LocalUnwind -FUNC ce57 8 4 _crt_debugger_hook -ce57 0 62 2380 -ce57 7 65 2380 -ce5e 1 66 2380 -FUNC ce60 7a c memset -ce60 0 59 601 -ce60 4 68 601 -ce64 4 69 601 -ce68 2 71 601 -ce6a 2 72 601 -ce6c 2 74 601 -ce6e 4 75 601 -ce72 2 78 601 -ce74 2 79 601 -ce76 6 80 601 -ce7c 2 81 601 -ce7e 7 82 601 -ce85 2 83 601 -ce87 5 85 601 -ce8c 1 91 601 -ce8d 2 92 601 -ce8f 3 94 601 -ce92 2 95 601 -ce94 2 97 601 -ce96 3 98 601 -ce99 2 99 601 -ce9b 2 101 601 -ce9d 2 103 601 -ce9f 3 104 601 -cea2 3 105 601 -cea5 2 106 601 -cea7 2 110 601 -cea9 3 111 601 -ceac 2 113 601 -ceae 2 115 601 -ceb0 3 117 601 -ceb3 2 119 601 -ceb5 2 122 601 -ceb7 3 123 601 -ceba 3 124 601 -cebd 2 125 601 -cebf 2 127 601 -cec1 2 129 601 -cec3 2 130 601 -cec5 2 134 601 -cec7 3 135 601 -ceca 3 137 601 -cecd 2 138 601 -cecf 4 142 601 -ced3 1 143 601 -ced4 1 145 601 -ced5 4 148 601 -ced9 1 150 601 -FUNC ceda 2a 0 _purecall -ceda 0 43 1533 -ceda b 44 1533 -cee5 5 45 1533 -ceea 2 47 1533 -ceec 7 54 1533 -cef3 c 56 1533 -ceff 5 57 1533 -FUNC cf04 22 4 _set_purecall_handler -cf04 1 82 1533 -cf05 b 85 1533 -cf10 12 86 1533 -cf22 3 88 1533 -cf25 1 89 1533 -FUNC cf26 d 0 _get_purecall_handler -cf26 0 92 1533 -cf26 c 93 1533 -cf32 1 94 1533 -FUNC cf40 95 0 _aulldvrm -cf40 0 45 3161 -cf40 1 47 3161 -cf41 4 79 3161 -cf45 2 80 3161 -cf47 2 81 3161 -cf49 4 82 3161 -cf4d 4 83 3161 -cf51 2 84 3161 -cf53 2 85 3161 -cf55 2 86 3161 -cf57 4 87 3161 -cf5b 2 88 3161 -cf5d 2 89 3161 -cf5f 2 94 3161 -cf61 4 95 3161 -cf65 2 96 3161 -cf67 2 97 3161 -cf69 4 98 3161 -cf6d 2 99 3161 -cf6f 2 100 3161 -cf71 2 107 3161 -cf73 4 108 3161 -cf77 4 109 3161 -cf7b 4 110 3161 -cf7f 2 112 3161 -cf81 2 113 3161 -cf83 2 114 3161 -cf85 2 115 3161 -cf87 2 116 3161 -cf89 2 117 3161 -cf8b 2 118 3161 -cf8d 2 119 3161 -cf8f 4 128 3161 -cf93 2 129 3161 -cf95 4 130 3161 -cf99 2 131 3161 -cf9b 2 132 3161 -cf9d 2 133 3161 -cf9f 4 141 3161 -cfa3 2 142 3161 -cfa5 2 143 3161 -cfa7 4 144 3161 -cfab 2 145 3161 -cfad 1 147 3161 -cfae 4 148 3161 -cfb2 4 149 3161 -cfb6 2 151 3161 -cfb8 4 160 3161 -cfbc 4 161 3161 -cfc0 2 162 3161 -cfc2 2 163 3161 -cfc4 3 164 3161 -cfc7 2 169 3161 -cfc9 2 170 3161 -cfcb 2 171 3161 -cfcd 2 172 3161 -cfcf 2 173 3161 -cfd1 1 179 3161 -cfd2 3 181 3161 -FUNC cfe0 34 0 _allmul -cfe0 0 47 3164 -cfe0 4 62 3164 -cfe4 4 63 3164 -cfe8 2 64 3164 -cfea 4 65 3164 -cfee 2 66 3164 -cff0 4 68 3164 -cff4 2 69 3164 -cff6 3 71 3164 -cff9 1 74 3164 -cffa 2 81 3164 -cffc 2 82 3164 -cffe 4 84 3164 -d002 4 85 3164 -d006 2 86 3164 -d008 4 88 3164 -d00c 2 89 3164 -d00e 2 90 3164 -d010 1 92 3164 -d011 3 94 3164 -FUNC d014 11 4 atol -d014 0 55 4301 -d014 10 56 4301 -d024 1 57 4301 -FUNC d025 15 8 _atol_l -d025 0 64 4301 -d025 14 65 4301 -d039 1 66 4301 -FUNC d03a 5 4 atoi -d03a 0 99 4301 -d03a 5 100 4301 -FUNC d03f 5 8 _atoi_l -d03f 0 107 4301 -d03f 5 108 4301 -FUNC d044 11 4 _atoi64 -d044 0 143 4301 -d044 10 144 4301 -d054 1 145 4301 -FUNC d055 15 8 _atoi64_l -d055 0 151 4301 -d055 14 152 4301 -d069 1 153 4301 -FUNC d070 365 c memmove -d070 3 101 604 -d073 1 113 604 -d074 1 114 604 -d075 3 116 604 -d078 3 117 604 -d07b 3 119 604 -d07e 2 129 604 -d080 2 131 604 -d082 2 132 604 -d084 2 134 604 -d086 2 135 604 -d088 2 137 604 -d08a 6 138 604 -d090 6 147 604 -d096 2 148 604 -d098 7 150 604 -d09f 2 151 604 -d0a1 1 153 604 -d0a2 1 154 604 -d0a3 3 155 604 -d0a6 3 156 604 -d0a9 2 157 604 -d0ab 1 158 604 -d0ac 1 159 604 -d0ad 2 160 604 -d0af 1 163 604 -d0b0 1 164 604 -d0b1 1 165 604 -d0b2 5 166 604 -d0b7 6 179 604 -d0bd 2 180 604 -d0bf 3 182 604 -d0c2 3 183 604 -d0c5 3 185 604 -d0c8 2 186 604 -d0ca 2 188 604 -d0cc 8 190 604 -d0d4 2 208 604 -d0d6 5 209 604 -d0db 3 211 604 -d0de 2 212 604 -d0e0 3 214 604 -d0e3 2 215 604 -d0e5 7 217 604 -d0ec 8 221 604 -d0f4 14 225 604 -d108 2 232 604 -d10a 2 233 604 -d10c 2 235 604 -d10e 3 236 604 -d111 3 238 604 -d114 3 239 604 -d117 3 241 604 -d11a 3 242 604 -d11d 3 244 604 -d120 3 245 604 -d123 3 247 604 -d126 2 248 604 -d128 2 250 604 -d12a a 252 604 -d134 2 256 604 -d136 2 257 604 -d138 2 259 604 -d13a 3 260 604 -d13d 3 262 604 -d140 3 263 604 -d143 3 265 604 -d146 3 266 604 -d149 3 268 604 -d14c 2 269 604 -d14e 2 271 604 -d150 8 273 604 -d158 2 277 604 -d15a 2 278 604 -d15c 2 280 604 -d15e 3 281 604 -d161 3 283 604 -d164 3 284 604 -d167 3 286 604 -d16a 2 287 604 -d16c 2 289 604 -d16e 2a 291 604 -d198 4 298 604 -d19c 4 300 604 -d1a0 4 302 604 -d1a4 4 304 604 -d1a8 4 306 604 -d1ac 4 308 604 -d1b0 4 310 604 -d1b4 4 312 604 -d1b8 4 314 604 -d1bc 4 316 604 -d1c0 4 318 604 -d1c4 4 320 604 -d1c8 4 322 604 -d1cc 4 324 604 -d1d0 7 326 604 -d1d7 2 328 604 -d1d9 2 329 604 -d1db 19 331 604 -d1f4 3 340 604 -d1f7 1 341 604 -d1f8 1 342 604 -d1f9 3 344 604 -d1fc 2 348 604 -d1fe 2 350 604 -d200 3 351 604 -d203 1 352 604 -d204 1 353 604 -d205 3 354 604 -d208 2 358 604 -d20a 2 360 604 -d20c 3 361 604 -d20f 3 362 604 -d212 3 363 604 -d215 1 364 604 -d216 1 365 604 -d217 5 366 604 -d21c 2 370 604 -d21e 2 372 604 -d220 3 373 604 -d223 3 374 604 -d226 3 375 604 -d229 3 376 604 -d22c 3 377 604 -d22f 1 378 604 -d230 1 379 604 -d231 3 380 604 -d234 4 391 604 -d238 4 392 604 -d23c 6 397 604 -d242 2 398 604 -d244 3 400 604 -d247 3 401 604 -d24a 3 403 604 -d24d 2 404 604 -d24f 1 406 604 -d250 2 407 604 -d252 1 408 604 -d253 9 410 604 -d25c 2 414 604 -d25e a 417 604 -d268 2 422 604 -d26a 5 423 604 -d26f 3 425 604 -d272 2 426 604 -d274 3 428 604 -d277 2 429 604 -d279 7 431 604 -d280 14 435 604 -d294 3 442 604 -d297 2 443 604 -d299 3 445 604 -d29c 3 446 604 -d29f 3 448 604 -d2a2 3 449 604 -d2a5 3 451 604 -d2a8 2 452 604 -d2aa 1 454 604 -d2ab 2 455 604 -d2ad 1 456 604 -d2ae a 458 604 -d2b8 3 462 604 -d2bb 2 463 604 -d2bd 3 465 604 -d2c0 3 466 604 -d2c3 3 468 604 -d2c6 3 469 604 -d2c9 3 471 604 -d2cc 3 472 604 -d2cf 3 474 604 -d2d2 2 475 604 -d2d4 1 477 604 -d2d5 2 478 604 -d2d7 1 479 604 -d2d8 8 481 604 -d2e0 3 485 604 -d2e3 2 486 604 -d2e5 3 488 604 -d2e8 3 489 604 -d2eb 3 491 604 -d2ee 3 492 604 -d2f1 3 494 604 -d2f4 3 495 604 -d2f7 3 497 604 -d2fa 3 498 604 -d2fd 3 500 604 -d300 6 501 604 -d306 1 503 604 -d307 2 504 604 -d309 1 505 604 -d30a 2a 507 604 -d334 4 516 604 -d338 4 518 604 -d33c 4 520 604 -d340 4 522 604 -d344 4 524 604 -d348 4 526 604 -d34c 4 528 604 -d350 4 530 604 -d354 4 532 604 -d358 4 534 604 -d35c 4 536 604 -d360 4 538 604 -d364 4 540 604 -d368 4 542 604 -d36c 7 544 604 -d373 2 546 604 -d375 2 547 604 -d377 19 549 604 -d390 3 558 604 -d393 1 560 604 -d394 1 561 604 -d395 3 562 604 -d398 3 566 604 -d39b 3 568 604 -d39e 3 569 604 -d3a1 1 570 604 -d3a2 1 571 604 -d3a3 5 572 604 -d3a8 3 576 604 -d3ab 3 578 604 -d3ae 3 579 604 -d3b1 3 580 604 -d3b4 3 581 604 -d3b7 1 582 604 -d3b8 1 583 604 -d3b9 3 584 604 -d3bc 3 588 604 -d3bf 3 590 604 -d3c2 3 591 604 -d3c5 3 592 604 -d3c8 3 593 604 -d3cb 3 594 604 -d3ce 3 595 604 -d3d1 1 596 604 -d3d2 1 597 604 -d3d3 2 598 604 -FUNC d3d5 f3 0 abort -d3d5 1b 53 2533 -d3f0 a 56 2533 -d3fa 8 59 2533 -d402 5 68 2533 -d407 4 69 2533 -d40b 8 71 2533 -d413 d 78 2533 -d420 6 87 2533 -d426 6 88 2533 -d42c 6 89 2533 -d432 3 90 2533 -d435 3 91 2533 -d438 3 92 2533 -d43b 7 93 2533 -d442 7 94 2533 -d449 4 95 2533 -d44d 4 96 2533 -d451 4 97 2533 -d455 4 98 2533 -d459 1 99 2533 -d45a 6 100 2533 -d460 6 106 2533 -d466 19 107 2533 -d47f 3 109 2533 -d482 13 117 2533 -d495 9 122 2533 -d49e 3 123 2533 -d4a1 15 126 2533 -d4b6 a 128 2533 -d4c0 8 137 2533 -FUNC d4c8 1e 8 _set_abort_behavior -d4c8 0 158 2533 -d4c8 1d 160 2533 -d4e5 1 162 2533 -FUNC d4e6 a3 4 _msize -d4e6 c 43 3413 -d4f2 2d 47 3413 -d51f 9 51 3413 -d528 8 55 3413 -d530 3 56 3413 -d533 e 57 3413 -d541 e 59 3413 -d54f c 61 3413 -d55b 5 64 3413 -d560 10 88 3413 -d570 2 91 3413 -d572 6 93 3413 -d578 8 61 3413 -d580 9 62 3413 -FUNC d589 9 0 _fptrap -d589 0 46 917 -d589 8 47 917 -d591 1 48 917 -FUNC d592 54 8 _isalpha_l -d592 6 57 4214 -d598 b 58 4214 -d5a3 41 60 4214 -d5e4 2 61 4214 -FUNC d5e6 2b 4 isalpha -d5e6 0 66 4214 -d5e6 9 67 4214 -d5ef 13 69 4214 -d602 1 75 4214 -d603 d 73 4214 -d610 1 75 4214 -FUNC d611 4f 8 _isupper_l -d611 6 81 4214 -d617 b 82 4214 -d622 3c 84 4214 -d65e 2 85 4214 -FUNC d660 29 4 isupper -d660 0 90 4214 -d660 9 91 4214 -d669 11 93 4214 -d67a 1 99 4214 -d67b d 97 4214 -d688 1 99 4214 -FUNC d689 4f 8 _islower_l -d689 6 105 4214 -d68f b 106 4214 -d69a 3c 108 4214 -d6d6 2 109 4214 -FUNC d6d8 29 4 islower -d6d8 0 114 4214 -d6d8 9 115 4214 -d6e1 11 117 4214 -d6f2 1 123 4214 -d6f3 d 121 4214 -d700 1 123 4214 -FUNC d701 4f 8 _isdigit_l -d701 6 129 4214 -d707 b 130 4214 -d712 3c 132 4214 -d74e 2 133 4214 -FUNC d750 29 4 isdigit -d750 0 138 4214 -d750 9 139 4214 -d759 11 141 4214 -d76a 1 147 4214 -d76b d 145 4214 -d778 1 147 4214 -FUNC d779 54 8 _isxdigit_l -d779 6 153 4214 -d77f b 154 4214 -d78a 41 156 4214 -d7cb 2 157 4214 -FUNC d7cd 2b 4 isxdigit -d7cd 0 162 4214 -d7cd 9 163 4214 -d7d6 13 165 4214 -d7e9 1 171 4214 -d7ea d 169 4214 -d7f7 1 171 4214 -FUNC d7f8 4f 8 _isspace_l -d7f8 6 177 4214 -d7fe b 178 4214 -d809 3c 180 4214 -d845 2 181 4214 -FUNC d847 29 4 isspace -d847 0 186 4214 -d847 9 187 4214 -d850 11 189 4214 -d861 1 195 4214 -d862 d 193 4214 -d86f 1 195 4214 -FUNC d870 4f 8 _ispunct_l -d870 6 201 4214 -d876 b 202 4214 -d881 3c 204 4214 -d8bd 2 205 4214 -FUNC d8bf 29 4 ispunct -d8bf 0 210 4214 -d8bf 9 211 4214 -d8c8 11 213 4214 -d8d9 1 219 4214 -d8da d 217 4214 -d8e7 1 219 4214 -FUNC d8e8 54 8 _isalnum_l -d8e8 6 225 4214 -d8ee b 226 4214 -d8f9 41 228 4214 -d93a 2 229 4214 -FUNC d93c 2b 4 isalnum -d93c 0 234 4214 -d93c 9 235 4214 -d945 13 237 4214 -d958 1 243 4214 -d959 d 241 4214 -d966 1 243 4214 -FUNC d967 54 8 _isprint_l -d967 6 249 4214 -d96d b 250 4214 -d978 41 252 4214 -d9b9 2 253 4214 -FUNC d9bb 2b 4 isprint -d9bb 0 258 4214 -d9bb 9 259 4214 -d9c4 13 261 4214 -d9d7 1 267 4214 -d9d8 d 265 4214 -d9e5 1 267 4214 -FUNC d9e6 54 8 _isgraph_l -d9e6 6 273 4214 -d9ec b 274 4214 -d9f7 41 276 4214 -da38 2 277 4214 -FUNC da3a 2b 4 isgraph -da3a 0 282 4214 -da3a 9 283 4214 -da43 13 285 4214 -da56 1 291 4214 -da57 d 289 4214 -da64 1 291 4214 -FUNC da65 4f 8 _iscntrl_l -da65 6 297 4214 -da6b b 298 4214 -da76 3c 300 4214 -dab2 2 301 4214 -FUNC dab4 29 4 iscntrl -dab4 0 306 4214 -dab4 9 307 4214 -dabd 11 309 4214 -dace 1 315 4214 -dacf d 313 4214 -dadc 1 315 4214 -FUNC dadd d 4 __isascii -dadd 0 320 4214 -dadd c 321 4214 -dae9 1 322 4214 -FUNC daea 8 4 __toascii -daea 0 327 4214 -daea 7 328 4214 -daf1 1 329 4214 -FUNC daf2 1f 8 _iscsymf_l -daf2 0 335 4214 -daf2 1a 336 4214 -db0c 1 337 4214 -db0d 3 336 4214 -db10 1 337 4214 -FUNC db11 1a 4 __iscsymf -db11 0 341 4214 -db11 15 342 4214 -db26 1 343 4214 -db27 3 342 4214 -db2a 1 343 4214 -FUNC db2b 1f 8 _iscsym_l -db2b 0 349 4214 -db2b 1a 350 4214 -db45 1 351 4214 -db46 3 350 4214 -db49 1 351 4214 -FUNC db4a 1c 4 __iscsym -db4a 0 356 4214 -db4a 17 357 4214 -db61 1 358 4214 -db62 3 357 4214 -db65 1 358 4214 -FUNC db66 12 8 _MarkAllocaS -db66 0 207 1309 -db66 8 208 1309 -db6e 6 210 1309 -db74 3 211 1309 -db77 1 214 1309 -FUNC db78 1b 4 _freea -db78 0 249 1309 -db78 8 251 1309 -db80 3 253 1309 -db83 8 255 1309 -db8b 7 257 1309 -db92 1 266 1309 -FUNC db93 13b 18 __crtGetLocaleInfoW_stat -db93 f 60 1290 -dba2 14 68 1290 -dbb6 d 70 1290 -dbc3 8 71 1290 -dbcb b 73 1290 -dbd6 f 74 1290 -dbe5 5 79 1290 -dbea 13 81 1290 -dbfd 7 86 1290 -dc04 2 140 1290 -dc06 8 96 1290 -dc0e b 97 1290 -dc19 16 100 1290 -dc2f 7 101 1290 -dc36 48 104 1290 -dc7e 2 105 1290 -dc80 2 106 1290 -dc82 e 110 1290 -dc90 7 113 1290 -dc97 2 121 1290 -dc99 2 123 1290 -dc9b 17 130 1290 -dcb2 6 134 1290 -dcb8 4 136 1290 -dcbc 12 141 1290 -FUNC dcce 3b 18 __crtGetLocaleInfoW -dcce 6 151 1290 -dcd4 b 152 1290 -dcdf 28 161 1290 -dd07 2 162 1290 -FUNC dd09 13d 18 __crtGetLocaleInfoA_stat -dd09 f 60 2665 -dd18 17 68 2665 -dd2f a 70 2665 -dd39 8 71 2665 -dd41 b 73 2665 -dd4c f 74 2665 -dd5b 11 79 2665 -dd6c 4 86 2665 -dd70 5 96 2665 -dd75 b 97 2665 -dd80 13 100 2665 -dd93 7 101 2665 -dd9a 49 104 2665 -dde3 2 105 2665 -dde5 2 106 2665 -dde7 10 110 2665 -ddf7 3 114 2665 -ddfa 6 124 2665 -de00 2 126 2665 -de02 15 135 2665 -de17 7 139 2665 -de1e 4 141 2665 -de22 12 81 2665 -de34 12 145 2665 -FUNC de46 3b 18 __crtGetLocaleInfoA -de46 6 155 2665 -de4c b 156 2665 -de57 28 165 2665 -de7f 2 166 2665 -FUNC de81 11e c _calloc_impl -de81 c 23 3622 -de8d 9 28 3622 -de96 2e 30 3622 -dec4 9 32 3622 -decd 4 36 3622 -ded1 3 37 3622 -ded4 5 41 3622 -ded9 5 43 3622 -dede 9 46 3622 -dee7 9 50 3622 -def0 b 52 3622 -defb 8 56 3622 -df03 3 57 3622 -df06 c 58 3622 -df12 c 60 3622 -df1e 7 64 3622 -df25 d 65 3622 -df32 4 93 3622 -df36 11 94 3622 -df47 c 97 3622 -df53 f 109 3622 -df62 b 111 3622 -df6d 6 112 3622 -df73 5 113 3622 -df78 5 60 3622 -df7d 9 61 3622 -df86 4 100 3622 -df8a 7 102 3622 -df91 6 103 3622 -df97 2 105 3622 -df99 6 119 3622 -FUNC df9f 3f 8 calloc -df9f 4 145 3622 -dfa3 5 146 3622 -dfa8 14 147 3622 -dfbc 15 149 3622 -dfd1 8 151 3622 -dfd9 3 153 3622 -dfdc 2 154 3622 -FUNC dfde 21b 8 realloc -dfde c 64 3368 -dfea 7 69 3368 -dff1 e 70 3368 -dfff 7 73 3368 -e006 7 75 3368 -e00d 5 76 3368 -e012 d 81 3368 -e01f 5 88 3368 -e024 9 89 3368 -e02d 8 91 3368 -e035 3 92 3368 -e038 12 96 3368 -e04a 8 100 3368 -e052 f 102 3368 -e061 5 103 3368 -e066 e 104 3368 -e074 4 107 3368 -e078 10 108 3368 -e088 9 110 3368 -e091 a 111 3368 -e09b 5 118 3368 -e0a0 4 120 3368 -e0a4 6 121 3368 -e0aa 9 123 3368 -e0b3 15 124 3368 -e0c8 4 127 3368 -e0cc 10 128 3368 -e0dc c 129 3368 -e0e8 c 135 3368 -e0f4 6 142 3368 -e0fa 4 144 3368 -e0fe 1 145 3368 -e0ff 9 147 3368 -e108 14 148 3368 -e11c 6 135 3368 -e122 9 137 3368 -e12b 3 148 3368 -e12e 10 158 3368 -e13e f 181 3368 -e14d 5 186 3368 -e152 5 183 3368 -e157 11 186 3368 -e168 2 188 3368 -e16a 8 160 3368 -e172 5 170 3368 -e177 3 167 3368 -e17a 2 172 3368 -e17c 6 174 3368 -e182 2 155 3368 -e184 4 321 3368 -e188 1 322 3368 -e189 12 323 3368 -e19b c 332 3368 -e1a7 b 347 3368 -e1b2 5 319 3368 -e1b7 7 327 3368 -e1be b 328 3368 -e1c9 2 329 3368 -e1cb 6 356 3368 -e1d1 5 349 3368 -e1d6 5 350 3368 -e1db 4 334 3368 -e1df 16 341 3368 -e1f5 4 343 3368 -FUNC e1f9 79 c _recalloc -e1f9 3 744 3368 -e1fc a 749 3368 -e206 28 751 3368 -e22e 4 753 3368 -e232 9 754 3368 -e23b b 755 3368 -e246 b 756 3368 -e251 a 757 3368 -e25b 10 759 3368 -e26b 5 761 3368 -e270 2 762 3368 -FUNC e272 1a 4 strncnt -e272 0 48 2617 -e272 6 49 2617 -e278 6 52 2617 -e27e 1 53 2617 -e27f 5 52 2617 -e284 7 55 2617 -e28b 1 56 2617 -FUNC e28c 3a2 20 __crtLCMapStringA_stat -e28c 12 99 2617 -e29e d 108 2617 -e2ab 1b 109 2617 -e2c6 8 110 2617 -e2ce b 111 2617 -e2d9 a 112 2617 -e2e3 5 119 2617 -e2e8 19 120 2617 -e301 5 124 2617 -e306 1 125 2617 -e307 3 127 2617 -e30a 16 133 2617 -e320 9 213 2617 -e329 8 235 2617 -e331 8 236 2617 -e339 27 247 2617 -e360 6 248 2617 -e366 48 251 2617 -e3ae 3 252 2617 -e3b1 6 253 2617 -e3b7 19 262 2617 -e3d0 21 271 2617 -e3f1 8 274 2617 -e3f9 9 277 2617 -e402 9 279 2617 -e40b 12 288 2617 -e41d 5 292 2617 -e422 4b 298 2617 -e46d 4 299 2617 -e471 18 309 2617 -e489 3 312 2617 -e48c 6 322 2617 -e492 2 325 2617 -e494 17 335 2617 -e4ab 7 342 2617 -e4b2 8 344 2617 -e4ba 9 346 2617 -e4c3 b 141 2617 -e4ce 8 142 2617 -e4d6 5 143 2617 -e4db 8 144 2617 -e4e3 11 146 2617 -e4f4 7 147 2617 -e4fb 9 153 2617 -e504 15 155 2617 -e519 5 156 2617 -e51e 2 157 2617 -e520 1b 164 2617 -e53b 7 166 2617 -e542 41 169 2617 -e583 2 170 2617 -e585 28 196 2617 -e5ad 2 183 2617 -e5af 2 184 2617 -e5b1 25 190 2617 -e5d6 7 198 2617 -e5dd 2 199 2617 -e5df 1a 202 2617 -e5f9 5 204 2617 -e5fe 9 205 2617 -e607 c 206 2617 -e613 7 207 2617 -e61a 2 208 2617 -e61c 12 350 2617 -FUNC e62e 43 24 __crtLCMapStringA -e62e 6 363 2617 -e634 b 364 2617 -e63f 30 376 2617 -e66f 2 377 2617 -FUNC e671 1b8 1c __crtGetStringTypeA_stat -e671 f 66 2569 -e680 10 75 2569 -e690 18 79 2569 -e6a8 8 80 2569 -e6b0 b 82 2569 -e6bb f 83 2569 -e6ca 11 88 2569 -e6db 9 120 2569 -e6e4 8 141 2569 -e6ec 8 142 2569 -e6f4 27 153 2569 -e71b 6 154 2569 -e721 3e 157 2569 -e75f 2 158 2569 -e761 2 159 2569 -e763 f 161 2569 -e772 13 169 2569 -e785 11 174 2569 -e796 6 176 2569 -e79c 6 178 2569 -e7a2 2 90 2569 -e7a4 5 94 2569 -e7a9 8 95 2569 -e7b1 5 96 2569 -e7b6 8 97 2569 -e7be e 99 2569 -e7cc 4 100 2569 -e7d0 5 104 2569 -e7d5 17 106 2569 -e7ec 2 107 2569 -e7ee 2 108 2569 -e7f0 3 109 2569 -e7f3 15 112 2569 -e808 6 113 2569 -e80e 7 114 2569 -e815 2 115 2569 -e817 12 182 2569 -FUNC e829 40 20 __crtGetStringTypeA -e829 6 194 2569 -e82f b 195 2569 -e83a 2d 206 2569 -e867 2 207 2569 -FUNC e869 87 c fastcopy_I -FUNC e8f0 e3 c _VEC_memcpy -FUNC e9d3 14 0 _sse2_mathfcns_init -FUNC e9e7 14 4 _set_SSE2_enable -FUNC e9fb 6 0 __pwctype_func -e9fb 0 24 2400 -e9fb 5 25 2400 -ea00 1 26 2400 -FUNC ea01 29 0 __pctype_func -ea01 0 29 2400 -ea01 7 35 2400 -ea08 3 36 2400 -ea0b 18 38 2400 -ea23 6 39 2400 -ea29 1 40 2400 -FUNC ea2a 419 0 _get_lc_time -ea2a 6 94 1793 -ea30 12 104 1793 -ea42 3 105 1793 -ea45 2 170 1793 -ea47 9 108 1793 -ea50 16 112 1793 -ea66 15 113 1793 -ea7b 15 114 1793 -ea90 18 115 1793 -eaa8 15 116 1793 -eabd 13 117 1793 -ead0 14 118 1793 -eae4 18 120 1793 -eafc 15 121 1793 -eb11 15 122 1793 -eb26 15 123 1793 -eb3b 18 124 1793 -eb53 15 125 1793 -eb68 15 126 1793 -eb7d 15 128 1793 -eb92 18 129 1793 -ebaa 15 130 1793 -ebbf 15 131 1793 -ebd4 15 132 1793 -ebe9 18 133 1793 -ec01 15 134 1793 -ec16 15 135 1793 -ec2b 15 136 1793 -ec40 18 137 1793 -ec58 15 138 1793 -ec6d 15 139 1793 -ec82 15 141 1793 -ec97 18 142 1793 -ecaf 15 143 1793 -ecc4 15 144 1793 -ecd9 15 145 1793 -ecee 18 146 1793 -ed06 18 147 1793 -ed1e 18 148 1793 -ed36 18 149 1793 -ed4e 1b 150 1793 -ed69 18 151 1793 -ed81 18 152 1793 -ed99 18 154 1793 -edb1 1b 155 1793 -edcc 18 160 1793 -ede4 18 161 1793 -edfc 1b 163 1793 -ee17 20 165 1793 -ee37 a 169 1793 -ee41 2 170 1793 -FUNC ee43 190 4 __free_lc_time -ee43 1 179 1793 -ee44 c 180 1793 -ee50 8 183 1793 -ee58 8 184 1793 -ee60 8 185 1793 -ee68 8 186 1793 -ee70 8 187 1793 -ee78 8 188 1793 -ee80 7 189 1793 -ee87 8 191 1793 -ee8f 8 192 1793 -ee97 8 193 1793 -ee9f 8 194 1793 -eea7 8 195 1793 -eeaf 8 196 1793 -eeb7 8 197 1793 -eebf 8 199 1793 -eec7 b 200 1793 -eed2 8 201 1793 -eeda 8 202 1793 -eee2 8 203 1793 -eeea 8 204 1793 -eef2 8 205 1793 -eefa 8 206 1793 -ef02 8 207 1793 -ef0a 8 208 1793 -ef12 8 209 1793 -ef1a 8 210 1793 -ef22 8 212 1793 -ef2a 8 213 1793 -ef32 8 214 1793 -ef3a 8 215 1793 -ef42 8 216 1793 -ef4a b 217 1793 -ef55 b 218 1793 -ef60 b 219 1793 -ef6b b 220 1793 -ef76 b 221 1793 -ef81 b 222 1793 -ef8c b 223 1793 -ef97 b 225 1793 -efa2 b 226 1793 -efad b 228 1793 -efb8 b 229 1793 -efc3 f 230 1793 -efd2 1 232 1793 -FUNC efd3 73 4 __init_time -efd3 4 56 1793 -efd7 f 60 1793 -efe6 16 64 1793 -effc 4 65 1793 -f000 b 67 1793 -f00b 6 69 1793 -f011 8 70 1793 -f019 2 71 1793 -f01b 6 73 1793 -f021 2 74 1793 -f023 2 75 1793 -f025 18 78 1793 -f03d 2 82 1793 -f03f 6 83 1793 -f045 1 84 1793 -FUNC f046 33 0 fix_grouping -f046 0 32 1841 -f046 8 40 1841 -f04e a 43 1841 -f058 4 45 1841 -f05c 1 61 1841 -f05d 6 40 1841 -f063 1 63 1841 -f064 4 50 1841 -f068 2 52 1841 -f06a 7 55 1841 -f071 6 56 1841 -f077 2 60 1841 -FUNC f079 40 4 __free_lconv_num -f079 1 211 1841 -f07a 8 212 1841 -f082 a 215 1841 -f08c 7 216 1841 -f093 b 218 1841 -f09e 7 219 1841 -f0a5 b 221 1841 -f0b0 8 222 1841 -f0b8 1 223 1841 -FUNC f0b9 1c8 4 __init_numeric -f0b9 7 84 1841 -f0c0 4 92 1841 -f0c4 2 93 1841 -f0c6 11 96 1841 -f0d7 3 177 1841 -f0da 3 178 1841 -f0dd c 179 1841 -f0e9 14 102 1841 -f0fd 8 103 1841 -f105 9 108 1841 -f10e 13 113 1841 -f121 9 115 1841 -f12a 2 116 1841 -f12c 2 118 1841 -f12e 9 120 1841 -f137 12 125 1841 -f149 8 127 1841 -f151 a 128 1841 -f15b 7 129 1841 -f162 2 131 1841 -f164 19 140 1841 -f17d 15 142 1841 -f192 1b 144 1841 -f1ad 2 146 1841 -f1af c 148 1841 -f1bb 1e 154 1841 -f1d9 2 156 1841 -f1db 17 154 1841 -f1f2 b 164 1841 -f1fd 9 165 1841 -f206 c 166 1841 -f212 8 168 1841 -f21a 7 169 1841 -f221 2 170 1841 -f223 13 186 1841 -f236 11 191 1841 -f247 b 193 1841 -f252 d 194 1841 -f25f 9 197 1841 -f268 9 198 1841 -f271 9 200 1841 -f27a 5 201 1841 -f27f 2 202 1841 -FUNC f281 33 0 fix_grouping -f281 0 214 1884 -f281 8 222 1884 -f289 a 225 1884 -f293 4 227 1884 -f297 1 243 1884 -f298 6 222 1884 -f29e 1 245 1884 -f29f 4 232 1884 -f2a3 2 234 1884 -f2a5 7 237 1884 -f2ac 6 238 1884 -f2b2 2 242 1884 -FUNC f2b4 89 4 __free_lconv_mon -f2b4 1 255 1884 -f2b5 8 256 1884 -f2bd b 259 1884 -f2c8 7 260 1884 -f2cf b 262 1884 -f2da 7 263 1884 -f2e1 b 265 1884 -f2ec 7 266 1884 -f2f3 b 268 1884 -f2fe 7 269 1884 -f305 b 271 1884 -f310 7 272 1884 -f317 b 274 1884 -f322 7 275 1884 -f329 b 277 1884 -f334 8 278 1884 -f33c 1 279 1884 -FUNC f33d 2c4 4 __init_monetary -f33d 8 65 1884 -f345 6 73 1884 -f34b 13 77 1884 -f35e 3 187 1884 -f361 3 188 1884 -f364 a 189 1884 -f36e 11 83 1884 -f37f 8 84 1884 -f387 f 89 1884 -f396 7 91 1884 -f39d 2 92 1884 -f39f 2 94 1884 -f3a1 9 96 1884 -f3aa f 101 1884 -f3b9 6 103 1884 -f3bf 9 104 1884 -f3c8 2 105 1884 -f3ca 2 107 1884 -f3cc 4 112 1884 -f3d0 14 117 1884 -f3e4 14 119 1884 -f3f8 14 121 1884 -f40c 17 123 1884 -f423 14 125 1884 -f437 14 128 1884 -f44b 14 130 1884 -f45f 17 133 1884 -f476 14 135 1884 -f48a 14 137 1884 -f49e 14 139 1884 -f4b2 17 141 1884 -f4c9 14 143 1884 -f4dd 14 145 1884 -f4f1 17 147 1884 -f508 2 149 1884 -f50a 6 150 1884 -f510 6 151 1884 -f516 8 152 1884 -f51e b 153 1884 -f529 5 154 1884 -f52e 1c 157 1884 -f54a 2 159 1884 -f54c 17 157 1884 -f563 c 169 1884 -f56f 3 175 1884 -f572 32 181 1884 -f5a4 11 194 1884 -f5b5 15 199 1884 -f5ca b 201 1884 -f5d5 d 202 1884 -f5e2 9 204 1884 -f5eb 9 205 1884 -f5f4 6 206 1884 -f5fa 5 208 1884 -f5ff 2 209 1884 -FUNC f601 395 4 __init_ctype -f601 11 59 1976 -f612 6 60 1976 -f618 1f 82 1976 -f637 7 84 1976 -f63e 20 89 1976 -f65e 7 94 1976 -f665 10 98 1976 -f675 b 100 1976 -f680 b 102 1976 -f68b 12 104 1976 -f69d 2f 106 1976 -f6cc 5 109 1976 -f6d1 2 112 1976 -f6d3 e 113 1976 -f6e1 15 115 1976 -f6f6 a 118 1976 -f700 4 121 1976 -f704 8 124 1976 -f70c e 126 1976 -f71a 9 128 1976 -f723 b 129 1976 -f72e b 128 1976 -f739 2c 140 1976 -f765 33 155 1976 -f798 2d 166 1976 -f7c5 37 178 1976 -f7fc 11 180 1976 -f80d 17 182 1976 -f824 15 183 1976 -f839 d 180 1976 -f846 12 189 1976 -f858 f 190 1976 -f867 12 191 1976 -f879 18 195 1976 -f891 11 198 1976 -f8a2 13 199 1976 -f8b5 e 200 1976 -f8c3 e 201 1976 -f8d1 9 203 1976 -f8da 6 204 1976 -f8e0 9 206 1976 -f8e9 9 207 1976 -f8f2 9 208 1976 -f8fb 9 209 1976 -f904 9 210 1976 -f90d 9 213 1976 -f916 4 214 1976 -f91a 8 217 1976 -f922 8 218 1976 -f92a 8 219 1976 -f932 10 220 1976 -f942 13 227 1976 -f955 2 231 1976 -f957 6 232 1976 -f95d a 233 1976 -f967 a 234 1976 -f971 a 235 1976 -f97b a 236 1976 -f985 2 238 1976 -f987 f 240 1976 -FUNC f996 29 0 ___mb_cur_max_func -f996 0 248 1976 -f996 7 254 1976 -f99d 3 255 1976 -f9a0 18 257 1976 -f9b8 6 259 1976 -f9be 1 260 1976 -FUNC f9bf 16 4 ___mb_cur_max_l_func -f9bf 0 263 1976 -f9bf 15 264 1976 -f9d4 1 265 1976 -FUNC f9d5 26 0 ___lc_codepage_func -f9d5 0 268 1976 -f9d5 7 274 1976 -f9dc 3 275 1976 -f9df 18 277 1976 -f9f7 3 279 1976 -f9fa 1 280 1976 -FUNC f9fb 26 0 ___lc_collate_cp_func -f9fb 0 284 1976 -f9fb 7 290 1976 -fa02 3 291 1976 -fa05 18 293 1976 -fa1d 3 295 1976 -fa20 1 296 1976 -FUNC fa21 26 0 ___lc_handle_func -fa21 0 300 1976 -fa21 7 306 1976 -fa28 3 307 1976 -fa2b 18 309 1976 -fa43 3 311 1976 -fa46 1 312 1976 -FUNC fa47 3 4 __init_collate -fa47 0 41 2064 -fa47 2 42 2064 -fa49 1 43 2064 -FUNC fa4a fe 4 _Getdays_l -fa4a 9 111 190 -fa53 d 115 190 -fa60 9 117 190 -fa69 9 119 190 -fa72 28 120 190 -fa9a b 121 190 -faa5 c 123 190 -fab1 4 126 190 -fab5 30 128 190 -fae5 8 129 190 -faed 31 131 190 -fb1e 12 132 190 -fb30 3 134 190 -fb33 13 137 190 -fb46 2 138 190 -FUNC fb48 9 0 _Getdays -fb48 0 142 190 -fb48 8 143 190 -fb50 1 144 190 -FUNC fb51 fe 4 _Getmonths_l -fb51 9 150 190 -fb5a d 154 190 -fb67 16 156 190 -fb7d 2b 159 190 -fba8 b 160 190 -fbb3 8 162 190 -fbbb a 163 190 -fbc5 2d 167 190 -fbf2 8 168 190 -fbfa 2c 170 190 -fc26 11 171 190 -fc37 3 173 190 -fc3a 13 176 190 -fc4d 2 177 190 -FUNC fc4f 9 0 _Getmonths -fc4f 0 181 190 -fc4f 8 182 190 -fc57 1 183 190 -FUNC fc58 355 4 _Gettnames_l -fc58 9 189 190 -fc61 d 193 190 -fc6e 9 195 190 -fc77 9 197 190 -fc80 28 198 190 -fca8 d 199 190 -fcb5 29 200 190 -fcde 18 201 190 -fcf6 11 202 190 -fd07 f 203 190 -fd16 f 204 190 -fd25 7 205 190 -fd2c e 206 190 -fd3a 8 208 190 -fd42 12 212 190 -fd54 13 213 190 -fd67 6 214 190 -fd6d 2a 215 190 -fd97 6 216 190 -fd9d d 217 190 -fdaa 26 218 190 -fdd0 1c 219 190 -fdec 18 221 190 -fe04 6 222 190 -fe0a 26 223 190 -fe30 a 224 190 -fe3a 5 225 190 -fe3f 2a 226 190 -fe69 18 227 190 -fe81 30 230 190 -feb1 a 231 190 -febb 30 233 190 -feeb a 234 190 -fef5 30 236 190 -ff25 a 237 190 -ff2f 30 239 190 -ff5f a 240 190 -ff69 30 242 190 -ff99 12 245 190 -ffab 2 246 190 -FUNC ffad 9 0 _Gettnames -ffad 0 250 190 -ffad 8 251 190 -ffb5 1 252 190 -FUNC ffb6 20 0 _store_str -ffb6 0 869 190 -ffb6 f 871 190 -ffc5 7 872 190 -ffcc 9 873 190 -ffd5 1 875 190 -FUNC ffd6 36 0 _store_number -ffd6 0 965 190 -ffd6 8 973 190 -ffde c 976 190 -ffea 2 977 190 -ffec b 978 190 -fff7 2 981 190 -fff9 2 982 190 -fffb 1 983 190 -fffc 7 988 190 -10003 3 989 190 -10006 5 990 190 -1000b 1 991 190 -FUNC 1000c 79 4 _store_num -1000c 8 909 190 -10014 2 910 190 -10016 8 912 190 -1001e 33 913 190 -10051 2 914 190 -10053 4 917 190 -10057 8 918 190 -1005f b 919 190 -1006a c 921 190 -10076 5 923 190 -1007b 2 924 190 -1007d 2 926 190 -1007f 4 927 190 -10083 2 928 190 -FUNC 10085 3e6 10 _expandtime -10085 5 548 190 -1008a 4f 558 190 -100d9 16 659 190 -100ef 5 662 190 -100f4 16 587 190 -1010a 7 589 190 -10111 5 590 190 -10116 16 571 190 -1012c 7 573 190 -10133 5 574 190 -10138 5 822 190 -1013d 7 823 190 -10144 5 824 190 -10149 16 667 190 -1015f 10 668 190 -1016f 2 669 190 -10171 5 672 190 -10176 23 558 190 -10199 6 787 190 -1019f 5 789 190 -101a4 15 736 190 -101b9 2 737 190 -101bb 2 739 190 -101bd 5 740 190 -101c2 15 722 190 -101d7 2 723 190 -101d9 16 742 190 -101ef 4 743 190 -101f3 2 744 190 -101f5 5 745 190 -101fa 6 746 190 -10200 8 747 190 -10208 1 748 190 -10209 5 752 190 -1020e f 715 190 -1021d 5 718 190 -10222 3 696 190 -10225 2 699 190 -10227 1d 804 190 -10244 6 806 190 -1024a d 808 190 -10257 2 809 190 -10259 37 558 190 -10290 19 678 190 -102a9 8 680 190 -102b1 2 681 190 -102b3 15 650 190 -102c8 13 652 190 -102db 5 653 190 -102e0 1e 601 190 -102fe 2 603 190 -10300 5 606 190 -10305 2 607 190 -10307 2 608 190 -10309 25 615 190 -1032e 2 617 190 -10330 1 627 190 -10331 2 642 190 -10333 e 579 190 -10341 7 581 190 -10348 5 582 190 -1034d 2d 562 190 -1037a 6 564 190 -10380 5 565 190 -10385 e 687 190 -10393 3 689 190 -10396 5 690 190 -1039b 15 558 190 -103b0 2 834 190 -103b2 5 814 190 -103b7 19 817 190 -103d0 5 819 190 -103d5 d 795 190 -103e2 b 798 190 -103ed 5 799 190 -103f2 11 762 190 -10403 5 764 190 -10408 1 774 190 -10409 5 776 190 -1040e 16 729 190 -10424 6 731 190 -1042a 5 732 190 -1042f 16 704 190 -10445 3 705 190 -10448 b 706 190 -10453 2 707 190 -10455 e 708 190 -10463 6 839 190 -10469 2 840 190 -FUNC 1046b 45d 18 _store_winword -1046b 10 1035 190 -1047b 5 1043 190 -10480 a 1053 190 -1048a 3 1043 190 -1048d 6 1053 190 -10493 2 1054 190 -10495 6 1049 190 -1049b 2 1050 190 -1049d 6 1046 190 -104a3 10 1057 190 -104b3 4 1066 190 -104b7 8 1067 190 -104bf 6 1069 190 -104c5 d 1075 190 -104d2 a 1076 190 -104dc 8 1077 190 -104e4 4 1078 190 -104e8 2a 1085 190 -10512 b 1087 190 -1051d 31 1092 190 -1054e 7 1093 190 -10555 3 1097 190 -10558 13 1100 190 -1056b 10 1101 190 -1057b b 1102 190 -10586 b 1103 190 -10591 9 1106 190 -1059a 3 1291 190 -1059d 12 1292 190 -105af 11 1114 190 -105c0 5 1117 190 -105c5 b 1120 190 -105d0 37 1125 190 -10607 14 1274 190 -1061b c 1277 190 -10627 8 1283 190 -1062f 4 1284 190 -10633 9 1286 190 -1063c c 1287 190 -10648 5 1277 190 -1064d e 1128 190 -1065b 7 1133 190 -10662 7 1132 190 -10669 7 1130 190 -10670 2 1131 190 -10672 5 1134 190 -10677 a 1156 190 -10681 7 1158 190 -10688 2 1159 190 -1068a 5 1160 190 -1068f 11 1175 190 -106a0 5 1176 190 -106a5 11 1177 190 -106b6 6 1178 190 -106bc 2 1179 190 -106be 5 1180 190 -106c3 b 1225 190 -106ce 13 1226 190 -106e1 4 1228 190 -106e5 1a 1233 190 -106ff 9 1236 190 -10708 8 1242 190 -10710 4 1243 190 -10714 9 1246 190 -1071d 8 1247 190 -10725 5 1277 190 -1072a 1 1230 190 -1072b 5 1250 190 -10730 12 1136 190 -10742 7 1141 190 -10749 7 1140 190 -10750 7 1138 190 -10757 2 1139 190 -10759 5 1142 190 -1075e 29 1125 190 -10787 e 1144 190 -10795 7 1147 190 -1079c 2 1146 190 -1079e 5 1148 190 -107a3 7 1182 190 -107aa b 1183 190 -107b5 2 1184 190 -107b7 6 1185 190 -107bd 12 1187 190 -107cf 17 1188 190 -107e6 c 1191 190 -107f2 8 1197 190 -107fa 4 1198 190 -107fe 8 1201 190 -10806 2 1202 190 -10808 5 1203 190 -1080d 9 1204 190 -10816 1a 1205 190 -10830 9 1207 190 -10839 8 1212 190 -10841 4 1213 190 -10845 9 1215 190 -1084e 8 1216 190 -10856 2 1220 190 -10858 d 1168 190 -10865 7 1170 190 -1086c 2 1171 190 -1086e 2 1172 190 -10870 d 1162 190 -1087d 7 1164 190 -10884 2 1165 190 -10886 2 1166 190 -10888 d 1150 190 -10895 7 1152 190 -1089c 2 1153 190 -1089e 1b 1268 190 -108b9 3 1272 190 -108bc 5 1273 190 -108c1 7 1194 190 -FUNC 108c8 1af 18 _Strftime_l -108c8 6 356 190 -108ce 4 361 190 -108d2 13 362 190 -108e5 33 364 190 -10918 33 365 190 -1094b d 368 190 -10958 10 375 190 -10968 e 385 190 -10976 a 387 190 -10980 1e 435 190 -1099e 4 438 190 -109a2 a 446 190 -109ac 5 447 190 -109b1 b 452 190 -109bc 3 453 190 -109bf 2 454 190 -109c1 7 400 190 -109c8 1 405 190 -109c9 2 408 190 -109cb 5 409 190 -109d0 1 411 190 -109d1 1 412 190 -109d2 1d 415 190 -109ef 1 428 190 -109f0 5 385 190 -109f5 5 464 190 -109fa 5 469 190 -109ff 13 470 190 -10a12 3 441 190 -10a15 f 478 190 -10a24 b 481 190 -10a2f 2 483 190 -10a31 b 402 190 -10a3c 2 403 190 -10a3e 5 421 190 -10a43 7 423 190 -10a4a 2 464 190 -10a4c 18 485 190 -10a64 11 488 190 -10a75 2 490 190 -FUNC 10a77 1e 14 _strftime_l -10a77 3 291 190 -10a7a 19 292 190 -10a93 2 293 190 -FUNC 10a95 1d 10 strftime -10a95 0 300 190 -10a95 1c 301 190 -10ab1 1 302 190 -FUNC 10ab2 1e 14 _Strftime -10ab2 3 343 190 -10ab5 19 345 190 -10ace 2 346 190 -FUNC 10ad0 26 0 localeconv -10ad0 0 69 1716 -10ad0 5 75 1716 -10ad5 1b 78 1716 -10af0 5 79 1716 -10af5 1 80 1716 -FUNC 10b00 46 8 strcspn -10b00 4 191 591 -10b04 2 198 591 -10b06 1 199 591 -10b07 1 200 591 -10b08 1 201 591 -10b09 1 202 591 -10b0a 1 203 591 -10b0b 1 204 591 -10b0c 1 205 591 -10b0d 1 206 591 -10b0e 6 212 591 -10b14 2 216 591 -10b16 2 217 591 -10b18 2 218 591 -10b1a 3 219 591 -10b1d 4 220 591 -10b21 2 221 591 -10b23 3 227 591 -10b26 6 229 591 -10b2c 3 234 591 -10b2f 2 236 591 -10b31 2 237 591 -10b33 2 238 591 -10b35 3 239 591 -10b38 4 240 591 -10b3c 2 245 591 -10b3e 2 255 591 -10b40 3 257 591 -10b43 3 259 591 -FUNC 10b46 60 c TranslateName -10b46 3 340 2263 -10b49 3 342 2263 -10b4c 3 343 2263 -10b4f b 346 2263 -10b5a a 348 2263 -10b64 14 349 2263 -10b78 6 351 2263 -10b7e a 352 2263 -10b88 2 353 2263 -10b8a 4 354 2263 -10b8e 2 355 2263 -10b90 3 356 2263 -10b93 7 346 2263 -10b9a a 359 2263 -10ba4 2 360 2263 -FUNC 10ba6 14 0 GetLcidFromDefault -10ba6 0 761 2263 -10ba6 7 762 2263 -10bad c 763 2263 -10bb9 1 764 2263 -FUNC 10bba 77 0 ProcessCodePage -10bba 13 784 2263 -10bcd 1a 787 2263 -10be7 11 795 2263 -10bf8 8 799 2263 -10c00 2 801 2263 -10c02 18 791 2263 -10c1a 3 793 2263 -10c1d 7 805 2263 -10c24 d 806 2263 -FUNC 10c31 1e 4 TestDefaultCountry -10c31 0 826 2263 -10c31 2 830 2263 -10c33 15 832 2263 -10c48 3 835 2263 -10c4b 1 836 2263 -10c4c 2 833 2263 -10c4e 1 836 2263 -FUNC 10c4f 32 0 LcidFromHexString -10c4f 1 893 2263 -10c50 2 895 2263 -10c52 2 897 2263 -10c54 9 899 2263 -10c5d 5 900 2263 -10c62 8 901 2263 -10c6a 3 902 2263 -10c6d 10 903 2263 -10c7d 3 906 2263 -10c80 1 907 2263 -FUNC 10c81 1b 0 GetPrimaryLen -10c81 0 926 2263 -10c81 2 927 2263 -10c83 3 930 2263 -10c86 12 931 2263 -10c98 1 933 2263 -10c99 2 935 2263 -10c9b 1 938 2263 -FUNC 10c9c 96 4 CountryEnumProc -10c9c 15 717 2263 -10cb1 7 718 2263 -10cb8 f 719 2263 -10cc7 23 725 2263 -10cea 3 728 2263 -10ced 3 729 2263 -10cf0 12 731 2263 -10d02 b 734 2263 -10d0d a 738 2263 -10d17 b 741 2263 -10d22 10 742 2263 -FUNC 10d32 72 8 TestDefaultLanguage -10d32 11 858 2263 -10d43 22 864 2263 -10d65 4 865 2263 -10d69 d 867 2263 -10d76 1c 871 2263 -10d92 2 872 2263 -10d94 3 874 2263 -10d97 d 875 2263 -FUNC 10da4 1d0 4 LangCountryEnumProc -10da4 16 435 2263 -10dba 7 436 2263 -10dc1 d 437 2263 -10dce 27 444 2263 -10df5 4 447 2263 -10df9 8 448 2263 -10e01 16 450 2263 -10e17 1d 456 2263 -10e34 2 460 2263 -10e36 11 462 2263 -10e47 7 467 2263 -10e4e 5 468 2263 -10e53 6 472 2263 -10e59 1a 475 2263 -10e73 14 482 2263 -10e87 3 483 2263 -10e8a a 487 2263 -10e94 b 490 2263 -10e9f 6 493 2263 -10ea5 3 494 2263 -10ea8 12 501 2263 -10eba 1d 506 2263 -10ed7 6 510 2263 -10edd c 513 2263 -10ee9 16 518 2263 -10eff 8 522 2263 -10f07 14 528 2263 -10f1b 2 531 2263 -10f1d 2 540 2263 -10f1f 1b 550 2263 -10f3a f 553 2263 -10f49 7 557 2263 -10f50 5 558 2263 -10f55 3 559 2263 -10f58 b 566 2263 -10f63 11 567 2263 -FUNC 10f74 bf 4 LanguageEnumProc -10f74 15 624 2263 -10f89 7 625 2263 -10f90 f 626 2263 -10f9f 23 632 2263 -10fc2 3 635 2263 -10fc5 3 636 2263 -10fc8 11 639 2263 -10fd9 7 643 2263 -10fe0 2 650 2263 -10fe2 1d 651 2263 -10fff f 654 2263 -1100e a 658 2263 -11018 b 662 2263 -11023 10 663 2263 -FUNC 11033 2c 0 GetLcidFromCountry -11033 0 686 2263 -11033 10 687 2263 -11043 11 689 2263 -11054 6 693 2263 -1105a 4 694 2263 -1105e 1 695 2263 -FUNC 1105f 65 0 GetLcidFromLangCountry -1105f 0 386 2263 -1105f 7 388 2263 -11066 1a 389 2263 -11080 5 390 2263 -11085 17 392 2263 -1109c 10 394 2263 -110ac 13 402 2263 -110bf 4 403 2263 -110c3 1 404 2263 -FUNC 110c4 3c 0 GetLcidFromLanguage -110c4 0 591 2263 -110c4 13 593 2263 -110d7 e 594 2263 -110e5 10 596 2263 -110f5 6 600 2263 -110fb 4 601 2263 -110ff 1 602 2263 -FUNC 11100 1e3 c __get_qualified_locale -11100 4 205 2263 -11104 5 208 2263 -11109 12 212 2263 -1111b 7 215 2263 -11122 5 217 2263 -11127 3 222 2263 -1112a f 223 2263 -11139 10 226 2263 -11149 d 230 2263 -11156 a 232 2263 -11160 5 235 2263 -11165 2 237 2263 -11167 5 240 2263 -1116c 5 243 2263 -11171 14 248 2263 -11185 a 250 2263 -1118f 5 252 2263 -11194 2 254 2263 -11196 5 256 2263 -1119b 2 261 2263 -1119d a 263 2263 -111a7 28 266 2263 -111cf 2 268 2263 -111d1 13 271 2263 -111e4 3 277 2263 -111e7 6 278 2263 -111ed 17 281 2263 -11204 32 285 2263 -11236 d 289 2263 -11243 6 290 2263 -11249 8 293 2263 -11251 7 295 2263 -11258 8 296 2263 -11260 4 297 2263 -11264 8 301 2263 -1126c d 305 2263 -11279 23 306 2263 -1129c 2 307 2263 -1129e f 308 2263 -112ad 2 309 2263 -112af 12 311 2263 -112c1 2 312 2263 -112c3 14 313 2263 -112d7 5 315 2263 -112dc 6 286 2263 -112e2 1 316 2263 -FUNC 112e3 12 0 cmpResult -FUNC 112f5 18 0 cmpBYTE -FUNC 1130d 40 0 cmpWORD -FUNC 1134d 78 0 cmpDWORD -FUNC 113c5 1490 0 unaligned_memcmp -FUNC 12855 1680 c memcmp -FUNC 13ed5 be c strncmp -13ed5 4 42 543 -13ed9 5 43 543 -13ede 7 45 543 -13ee5 7 46 543 -13eec 6 48 543 -13ef2 d 51 543 -13eff 11 56 543 -13f10 c 61 543 -13f1c c 66 543 -13f28 15 71 543 -13f3d 2 81 543 -13f3f a 73 543 -13f49 a 68 543 -13f53 a 63 543 -13f5d 10 58 543 -13f6d 2 79 543 -13f6f a 81 543 -13f79 1 85 543 -13f7a 4 86 543 -13f7e 5 79 543 -13f83 4 89 543 -13f87 2 90 543 -13f89 a 83 543 -FUNC 13fa0 40 8 strpbrk -13fa0 4 191 536 -13fa4 2 198 536 -13fa6 1 199 536 -13fa7 1 200 536 -13fa8 1 201 536 -13fa9 1 202 536 -13faa 1 203 536 -13fab 1 204 536 -13fac 1 205 536 -13fad 1 206 536 -13fae 6 212 536 -13fb4 2 216 536 -13fb6 2 217 536 -13fb8 2 218 536 -13fba 3 219 536 -13fbd 4 220 536 -13fc1 2 221 536 -13fc3 5 227 536 -13fc8 2 236 536 -13fca 2 237 536 -13fcc 2 238 536 -13fce 3 239 536 -13fd1 4 240 536 -13fd5 2 247 536 -13fd7 3 248 536 -13fda 3 257 536 -13fdd 3 259 536 -FUNC 13fe0 104 0 __report_gsfailure -13fe0 9 140 2145 -13fe9 5 170 2145 -13fee 6 171 2145 -13ff4 6 172 2145 -13ffa 6 173 2145 -14000 6 174 2145 -14006 6 175 2145 -1400c 7 176 2145 -14013 7 177 2145 -1401a 7 178 2145 -14021 7 179 2145 -14028 7 180 2145 -1402f 7 181 2145 -14036 1 182 2145 -14037 6 183 2145 -1403d 3 190 2145 -14040 5 191 2145 -14045 3 192 2145 -14048 5 193 2145 -1404d 3 194 2145 -14050 5 195 2145 -14055 6 201 2145 -1405b a 204 2145 -14065 a 206 2145 -1406f a 285 2145 -14079 a 286 2145 -14083 b 293 2145 -1408e b 294 2145 -14099 b 297 2145 -140a4 8 298 2145 -140ac 8 302 2145 -140b4 b 304 2145 -140bf 9 313 2145 -140c8 8 315 2145 -140d0 12 319 2145 -140e2 2 320 2145 -FUNC 140e4 20 0 _global_unwind2 -FUNC 14104 45 0 __unwind_handler -FUNC 14149 84 0 _local_unwind2 -FUNC 141cd 23 0 _abnormal_termination -FUNC 141f0 9 0 _NLG_Notify1 -FUNC 141f9 1f 0 _NLG_Notify -PUBLIC 14210 0 _NLG_Dispatch -FUNC 14218 3 0 _NLG_Call -PUBLIC 1421a 0 _NLG_Return2 -FUNC 1421b 57 8 fastzero_I -FUNC 14272 8f c _VEC_memzero -FUNC 14301 22b 14 strtoxl -14301 8 80 4034 -14309 b 86 4034 -14314 3 89 4034 -14317 b 92 4034 -14322 30 94 4034 -14352 11 95 4034 -14363 c 100 4034 -1436f 34 101 4034 -143a3 5 102 4034 -143a8 5 104 4034 -143ad 4 105 4034 -143b1 2 106 4034 -143b3 5 108 4034 -143b8 3 109 4034 -143bb 1d 111 4034 -143d8 4 118 4034 -143dc 5 121 4034 -143e1 9 122 4034 -143ea a 123 4034 -143f4 9 126 4034 -143fd 7 124 4034 -14404 2 129 4034 -14406 5 140 4034 -1440b f 142 4034 -1441a 1 143 4034 -1441b 9 144 4034 -14424 8 149 4034 -1442c c 154 4034 -14438 8 155 4034 -14440 7 156 4034 -14447 13 157 4034 -1445a 5 160 4034 -1445f 4 164 4034 -14463 b 171 4034 -1446e 4 177 4034 -14472 6 178 4034 -14478 8 190 4034 -14480 6 193 4034 -14486 3 195 4034 -14489 4 196 4034 -1448d 2 198 4034 -1448f c 173 4034 -1449b 3 185 4034 -1449e 2 186 4034 -144a0 24 201 4034 -144c4 5 204 4034 -144c9 c 205 4034 -144d5 6 206 4034 -144db 10 207 4034 -144eb 7 213 4034 -144f2 2 215 4034 -144f4 6 217 4034 -144fa 3 219 4034 -144fd 12 221 4034 -1450f 7 113 4034 -14516 2 115 4034 -14518 12 116 4034 -1452a 2 222 4034 -FUNC 1452c 29 c strtol -1452c 3 229 4034 -1452f 8 230 4034 -14537 13 232 4034 -1454a 9 236 4034 -14553 2 238 4034 -FUNC 14555 1b 10 _strtol_l -14555 0 246 4034 -14555 1a 247 4034 -1456f 1 248 4034 -FUNC 14570 2a c strtoul -14570 3 255 4034 -14573 7 256 4034 -1457a 14 258 4034 -1458e a 262 4034 -14598 2 264 4034 -FUNC 1459a 1b 10 _strtoul_l -1459a 0 272 4034 -1459a 1a 273 4034 -145b4 1 274 4034 -FUNC 145b5 294 14 strtoxq -145b5 8 80 3989 -145bd b 86 3989 -145c8 3 89 3989 -145cb b 92 3989 -145d6 31 94 3989 -14607 12 95 3989 -14619 c 100 3989 -14625 37 102 3989 -1465c 2 103 3989 -1465e 9 105 3989 -14667 4 106 3989 -1466b 2 107 3989 -1466d 6 109 3989 -14673 9 110 3989 -1467c 8 112 3989 -14684 6 115 3989 -1468a 9 116 3989 -14693 a 117 3989 -1469d 9 120 3989 -146a6 3 118 3989 -146a9 5 123 3989 -146ae 10 125 3989 -146be 1 126 3989 -146bf 9 127 3989 -146c8 26 132 3989 -146ee e 137 3989 -146fc 8 138 3989 -14704 6 139 3989 -1470a 11 140 3989 -1471b 5 143 3989 -14720 31 154 3989 -14751 4 160 3989 -14755 6 161 3989 -1475b a 173 3989 -14765 7 176 3989 -1476c 6 178 3989 -14772 6 179 3989 -14778 5 181 3989 -1477d 19 156 3989 -14796 b 168 3989 -147a1 5 169 3989 -147a6 35 184 3989 -147db 5 187 3989 -147e0 c 188 3989 -147ec a 189 3989 -147f6 6 190 3989 -147fc 7 191 3989 -14803 2 192 3989 -14805 7 193 3989 -1480c 8 195 3989 -14814 5 197 3989 -14819 6 199 3989 -1481f 13 201 3989 -14832 15 203 3989 -14847 2 204 3989 -FUNC 14849 29 c _strtoi64 -14849 3 211 3989 -1484c 8 212 3989 -14854 13 214 3989 -14867 9 218 3989 -14870 2 220 3989 -FUNC 14872 1b 10 _strtoi64_l -14872 0 227 3989 -14872 1a 228 3989 -1488c 1 229 3989 -FUNC 1488d 2a c _strtoui64 -1488d 3 236 3989 -14890 7 237 3989 -14897 14 239 3989 -148ab a 243 3989 -148b5 2 245 3989 -FUNC 148b7 1b 10 _strtoui64_l -148b7 0 253 3989 -148b7 1a 254 3989 -148d1 1 255 3989 -FUNC 148d2 b6 c _isctype_l -148d2 7 114 4078 -148d9 b 118 4078 -148e4 d 121 4078 -148f1 f 122 4078 -14900 1f 124 4078 -1491f 3 126 4078 -14922 d 129 4078 -1492f 2 130 4078 -14931 a 133 4078 -1493b 26 144 4078 -14961 10 146 4078 -14971 15 149 4078 -14986 2 150 4078 -FUNC 14988 2f 8 _isctype -14988 0 156 4078 -14988 9 157 4078 -14991 12 159 4078 -149a3 1 165 4078 -149a4 12 163 4078 -149b6 1 165 4078 -FUNC 149c0 2c 0 _alloca_probe_16 -149c0 0 44 1046 -149c0 1 46 1046 -149c1 4 47 1046 -149c5 2 48 1046 -149c7 3 49 1046 -149ca 2 50 1046 -149cc 2 51 1046 -149ce 2 52 1046 -149d0 1 53 1046 -149d1 5 54 1046 -149d6 1 59 1046 -149d7 4 60 1046 -149db 2 61 1046 -149dd 3 62 1046 -149e0 2 63 1046 -149e2 2 64 1046 -149e4 2 65 1046 -149e6 1 66 1046 -149e7 5 67 1046 -PUBLIC 149d6 0 _alloca_probe_8 -FUNC 149ec 47 4 __ansicp -149ec 10 39 1348 -149fc 1c 44 1348 -14a18 3 45 1348 -14a1b 2 46 1348 -14a1d a 47 1348 -14a27 c 49 1348 -FUNC 14a33 1b2 18 __convertcp -14a33 16 79 1348 -14a49 10 83 1348 -14a59 18 85 1348 -14a71 17 90 1348 -14a88 13 92 1348 -14a9b 6 93 1348 -14aa1 d 99 1348 -14aae 2 101 1348 -14ab0 c 103 1348 -14abc 2a 115 1348 -14ae6 15 111 1348 -14afb 7 112 1348 -14b02 1c 115 1348 -14b1e 3 116 1348 -14b21 2 117 1348 -14b23 10 119 1348 -14b33 15 127 1348 -14b48 7 129 1348 -14b4f 18 138 1348 -14b67 3 139 1348 -14b6a 2 140 1348 -14b6c 1f 149 1348 -14b8b 11 151 1348 -14b9c 12 160 1348 -14bae 9 162 1348 -14bb7 3 163 1348 -14bba 2 164 1348 -14bbc 6 165 1348 -14bc2 5 166 1348 -14bc7 9 174 1348 -14bd0 3 177 1348 -14bd3 12 178 1348 -FUNC 14be5 50 0 has_osfxsr_set -FUNC 14c35 60 0 _get_sse2_info -FUNC 14c95 d 0 __sse2_available_init -FUNC 14ca2 34 4 _get_daylight -14ca2 0 35 161 -14ca2 27 36 161 -14cc9 1 41 161 -14cca 8 39 161 -14cd2 3 40 161 -14cd5 1 41 161 -FUNC 14cd6 34 4 _get_dstbias -14cd6 0 44 161 -14cd6 27 45 161 -14cfd 1 50 161 -14cfe 8 48 161 -14d06 3 49 161 -14d09 1 50 161 -FUNC 14d0a 34 4 _get_timezone -14d0a 0 53 161 -14d0a 27 54 161 -14d31 1 59 161 -14d32 8 57 161 -14d3a 3 58 161 -14d3d 1 59 161 -FUNC 14d3e a2 10 _get_tzname -14d3e 3 62 161 -14d41 10 63 161 -14d51 4 64 161 -14d55 3 66 161 -14d58 7 68 161 -14d5f 27 69 161 -14d86 20 63 161 -14da6 f 72 161 -14db5 8 73 161 -14dbd 4 76 161 -14dc1 5 78 161 -14dc6 5 80 161 -14dcb 13 82 161 -14dde 2 83 161 -FUNC 14de0 6 0 __daylight -14de0 0 118 161 -14de0 5 119 161 -14de5 1 120 161 -FUNC 14de6 6 0 __dstbias -14de6 0 123 161 -14de6 5 124 161 -14deb 1 125 161 -FUNC 14dec 6 0 __timezone -14dec 0 128 161 -14dec 5 129 161 -14df1 1 130 161 -FUNC 14df2 6 0 __tzname -14df2 0 133 161 -14df2 5 134 161 -14df7 1 135 161 -FUNC 14df8 c 4 _set_daylight -14df8 c 189 92 -FUNC 14e04 c 4 _set_dstbias -14e04 c 190 92 -FUNC 14e10 c 4 _set_timezone -14e10 c 191 92 -FUNC 14e1c 349 0 _tzset_nolock -14e1c c 124 114 -14e28 5 127 114 -14e2d 3 129 114 -14e30 3 130 114 -14e33 3 131 114 -14e36 3 132 114 -14e39 3 133 114 -14e3c 8 135 114 -14e44 3 136 114 -14e47 8 139 114 -14e4f 1b 142 114 -14e6a 1b 143 114 -14e85 1b 144 114 -14ea0 8 149 114 -14ea8 6 154 114 -14eae f 160 114 -14ebd 18 165 114 -14ed5 14 260 114 -14ee9 b 268 114 -14ef4 4 274 114 -14ef8 7 275 114 -14eff 16 277 114 -14f15 6 281 114 -14f1b 32 283 114 -14f4d 9 174 114 -14f56 7 175 114 -14f5d 6 176 114 -14f63 13 179 114 -14f76 9 183 114 -14f7f b 188 114 -14f8a 9 190 114 -14f93 e 191 114 -14fa1 12 199 114 -14fb3 3 201 114 -14fb6 c 203 114 -14fc2 2 205 114 -14fc4 3 206 114 -14fc7 3 214 114 -14fca 27 234 114 -14ff1 8 235 114 -14ff9 2 236 114 -14ffb 7 237 114 -15002 23 247 114 -15025 9 248 114 -1502e 2 249 114 -15030 8 250 114 -15038 7 256 114 -1503f a 288 114 -15049 a 289 114 -15053 a 290 114 -1505d c 292 114 -15069 9 296 114 -15072 23 301 114 -15095 8 310 114 -1509d 7 311 114 -150a4 1 312 114 -150a5 10 318 114 -150b5 11 320 114 -150c6 5 292 114 -150cb 9 293 114 -150d4 5 325 114 -150d9 e 329 114 -150e7 d 330 114 -150f4 5 335 114 -150f9 b 339 114 -15104 d 340 114 -15111 5 344 114 -15116 3 345 114 -15119 6 350 114 -1511f 4 351 114 -15123 21 352 114 -15144 2 354 114 -15146 5 355 114 -1514b a 357 114 -15155 a 358 114 -1515f 6 360 114 -FUNC 15165 1f5 24 cvtdate -15165 6 409 114 -1516b 4 412 114 -1516f c 414 114 -1517b 52 424 114 -151cd 4c 430 114 -15219 14 436 114 -1522d 2 437 114 -1522f 2 438 114 -15231 46 447 114 -15277 3 449 114 -1527a 2 452 114 -1527c 3c 457 114 -152b8 3 459 114 -152bb 27 467 114 -152e2 6 472 114 -152e8 2 474 114 -152ea 29 485 114 -15313 11 486 114 -15324 a 487 114 -1532e 8 488 114 -15336 d 490 114 -15343 6 491 114 -15349 6 492 114 -1534f 9 499 114 -15358 2 503 114 -FUNC 1535a 1ae 0 _isindst_nolock -1535a 5 554 114 -1535f 20 558 114 -1537f 5 560 114 -15384 7 561 114 -1538b 1b 568 114 -153a6 c 569 114 -153b2 7 573 114 -153b9 34 584 114 -153ed 2 585 114 -153ef 19 596 114 -15408 40 611 114 -15448 2 612 114 -1544a 1e 623 114 -15468 2 626 114 -1546a 14 641 114 -1547e 1a 653 114 -15498 d 660 114 -154a5 d 664 114 -154b2 8 666 114 -154ba 4 674 114 -154be 2 697 114 -154c0 8 673 114 -154c8 8 675 114 -154d0 4 676 114 -154d4 14 679 114 -154e8 4 681 114 -154ec b 682 114 -154f7 2 685 114 -154f9 d 691 114 -15506 2 694 114 -FUNC 15508 4f 0 __tzset -15508 c 85 114 -15514 a 88 114 -1551e 8 90 114 -15526 3 91 114 -15529 8 93 114 -15531 5 94 114 -15536 6 95 114 -1553c c 98 114 -15548 6 103 114 -1554e 9 99 114 -FUNC 15557 38 0 _tzset -15557 c 109 114 -15563 8 110 114 -1556b 4 111 114 -1556f 5 113 114 -15574 c 115 114 -15580 6 118 114 -15586 9 116 114 -FUNC 1558f 41 4 _isindst -1558f c 538 114 -1559b 8 541 114 -155a3 4 542 114 -155a7 b 543 114 -155b2 c 544 114 -155be 3 548 114 -155c1 6 549 114 -155c7 9 545 114 -FUNC 155d0 35 8 __ascii_stricmp -155d0 a 75 367 -155da c 80 367 -155e6 3 81 367 -155e9 c 82 367 -155f5 3 83 367 -155f8 9 85 367 -15601 3 87 367 -15604 1 88 367 -FUNC 15605 d3 c _stricmp_l -15605 7 47 367 -1560c b 49 367 -15617 36 52 367 -1564d 32 53 367 -1567f 8 55 367 -15687 e 57 367 -15695 15 63 367 -156aa 11 64 367 -156bb 8 65 367 -156c3 13 68 367 -156d6 2 69 367 -FUNC 156d8 50 8 _stricmp -156d8 4 94 367 -156dc a 95 367 -156e6 24 98 367 -1570a 6 99 367 -15710 1 107 367 -15711 5 101 367 -15716 10 105 367 -15726 2 107 367 -FUNC 15728 36 8 _isleadbyte_l -15728 6 55 4169 -1572e b 56 4169 -15739 23 57 4169 -1575c 2 58 4169 -FUNC 1575e e 4 isleadbyte -1575e 0 63 4169 -1575e d 64 4169 -1576b 1 65 4169 -FUNC 1576c 16 8 _iswalpha_l -1576c 0 71 4169 -1576c 15 72 4169 -15781 1 73 4169 -FUNC 15782 11 4 iswalpha -15782 0 78 4169 -15782 10 79 4169 -15792 1 80 4169 -FUNC 15793 13 8 _iswupper_l -15793 0 86 4169 -15793 12 87 4169 -157a5 1 88 4169 -FUNC 157a6 e 4 iswupper -157a6 0 93 4169 -157a6 d 94 4169 -157b3 1 95 4169 -FUNC 157b4 13 8 _iswlower_l -157b4 0 101 4169 -157b4 12 102 4169 -157c6 1 103 4169 -FUNC 157c7 e 4 iswlower -157c7 0 108 4169 -157c7 d 109 4169 -157d4 1 110 4169 -FUNC 157d5 13 8 _iswdigit_l -157d5 0 116 4169 -157d5 12 117 4169 -157e7 1 118 4169 -FUNC 157e8 e 4 iswdigit -157e8 0 123 4169 -157e8 d 124 4169 -157f5 1 125 4169 -FUNC 157f6 16 8 _iswxdigit_l -157f6 0 131 4169 -157f6 15 132 4169 -1580b 1 133 4169 -FUNC 1580c 11 4 iswxdigit -1580c 0 138 4169 -1580c 10 139 4169 -1581c 1 140 4169 -FUNC 1581d 13 8 _iswspace_l -1581d 0 146 4169 -1581d 12 147 4169 -1582f 1 148 4169 -FUNC 15830 e 4 iswspace -15830 0 153 4169 -15830 d 154 4169 -1583d 1 155 4169 -FUNC 1583e 13 8 _iswpunct_l -1583e 0 161 4169 -1583e 12 162 4169 -15850 1 163 4169 -FUNC 15851 e 4 iswpunct -15851 0 168 4169 -15851 d 169 4169 -1585e 1 170 4169 -FUNC 1585f 16 8 _iswalnum_l -1585f 0 176 4169 -1585f 15 177 4169 -15874 1 178 4169 -FUNC 15875 11 4 iswalnum -15875 0 183 4169 -15875 10 184 4169 -15885 1 185 4169 -FUNC 15886 16 8 _iswprint_l -15886 0 191 4169 -15886 15 192 4169 -1589b 1 193 4169 -FUNC 1589c 11 4 iswprint -1589c 0 198 4169 -1589c 10 199 4169 -158ac 1 200 4169 -FUNC 158ad 16 8 _iswgraph_l -158ad 0 206 4169 -158ad 15 207 4169 -158c2 1 208 4169 -FUNC 158c3 11 4 iswgraph -158c3 0 213 4169 -158c3 10 214 4169 -158d3 1 215 4169 -FUNC 158d4 13 8 _iswcntrl_l -158d4 0 221 4169 -158d4 12 222 4169 -158e6 1 223 4169 -FUNC 158e7 e 4 iswcntrl -158e7 0 228 4169 -158e7 d 229 4169 -158f4 1 230 4169 -FUNC 158f5 c 4 iswascii -158f5 0 235 4169 -158f5 b 236 4169 -15900 1 237 4169 -FUNC 15901 26 8 _iswcsym_l -15901 0 243 4169 -15901 21 244 4169 -15922 1 245 4169 -15923 3 244 4169 -15926 1 245 4169 -FUNC 15927 21 4 __iswcsym -15927 0 250 4169 -15927 1c 251 4169 -15943 1 252 4169 -15944 3 251 4169 -15947 1 252 4169 -FUNC 15948 26 8 _iswcsymf_l -15948 0 258 4169 -15948 21 259 4169 -15969 1 260 4169 -1596a 3 259 4169 -1596d 1 260 4169 -FUNC 1596e 21 4 __iswcsymf -1596e 0 265 4169 -1596e 1c 266 4169 -1598a 1 267 4169 -1598b 3 266 4169 -1598e 1 267 4169 -FUNC 1598f f0 10 _strnicmp_l -1598f 7 51 324 -15996 d 54 324 -159a3 b 56 324 -159ae 33 59 324 -159e1 7 60 324 -159e8 32 61 324 -15a1a 8 63 324 -15a22 1d 65 324 -15a3f 15 71 324 -15a54 11 72 324 -15a65 d 74 324 -15a72 6 76 324 -15a78 5 79 324 -15a7d 2 80 324 -FUNC 15a7f 5c c _strnicmp -15a7f 4 125 324 -15a83 a 127 324 -15a8d 24 130 324 -15ab1 5 131 324 -15ab6 a 132 324 -15ac0 1 141 324 -15ac1 5 134 324 -15ac6 13 138 324 -15ad9 2 141 324 -FUNC 15adb db c xtoa_s -15adb 8 93 4260 -15ae3 24 102 4260 -15b07 24 103 4260 -15b2b 19 105 4260 -15b44 b 106 4260 -15b4f a 112 4260 -15b59 6 114 4260 -15b5f 7 116 4260 -15b66 2 118 4260 -15b68 2 121 4260 -15b6a 5 124 4260 -15b6f 5 128 4260 -15b74 3 129 4260 -15b77 2 130 4260 -15b79 6 131 4260 -15b7f 3 135 4260 -15b82 e 136 4260 -15b90 8 139 4260 -15b98 2 141 4260 -15b9a 2 142 4260 -15b9c 3 148 4260 -15b9f 6 152 4260 -15ba5 3 154 4260 -15ba8 1 155 4260 -15ba9 4 156 4260 -15bad 5 158 4260 -15bb2 4 160 4260 -FUNC 15bb6 28 10 _itoa_s -15bb6 3 172 4260 -15bb9 d 175 4260 -15bc6 4 176 4260 -15bca 2 177 4260 -15bcc 10 178 4260 -15bdc 2 181 4260 -FUNC 15bde 25 10 _ltoa_s -15bde 3 189 4260 -15be1 20 190 4260 -15c01 2 191 4260 -FUNC 15c03 18 10 _ultoa_s -15c03 0 199 4260 -15c03 17 200 4260 -15c1a 1 201 4260 -FUNC 15c1b f6 14 x64toa_s -15c1b 7 309 4260 -15c22 25 318 4260 -15c47 5 319 4260 -15c4c 19 321 4260 -15c65 b 322 4260 -15c70 3 327 4260 -15c73 20 333 4260 -15c93 3 336 4260 -15c96 1e 352 4260 -15cb4 3 344 4260 -15cb7 2 345 4260 -15cb9 5 346 4260 -15cbe 5 351 4260 -15cc3 13 352 4260 -15cd6 5 355 4260 -15cdb 3 357 4260 -15cde 13 358 4260 -15cf1 4 364 4260 -15cf5 9 368 4260 -15cfe 3 370 4260 -15d01 1 371 4260 -15d02 7 372 4260 -15d09 4 375 4260 -15d0d 4 377 4260 -FUNC 15d11 33 14 _i64toa_s -15d11 3 390 4260 -15d14 2e 391 4260 -15d42 2 392 4260 -FUNC 15d44 1d 14 _ui64toa_s -15d44 4 400 4260 -15d48 17 401 4260 -15d5f 2 402 4260 -FUNC 15d70 2b 0 _chkstk -15d70 0 65 1048 -15d70 1 69 1048 -15d71 4 73 1048 -15d75 2 74 1048 -15d77 2 79 1048 -15d79 2 80 1048 -15d7b 2 81 1048 -15d7d 2 83 1048 -15d7f 5 84 1048 -15d84 2 87 1048 -15d86 2 88 1048 -15d88 2 89 1048 -15d8a 1 90 1048 -15d8b 1 91 1048 -15d8c 2 92 1048 -15d8e 3 93 1048 -15d91 1 94 1048 -15d92 5 98 1048 -15d97 2 99 1048 -15d99 2 100 1048 -FUNC 15d9b 81 4 _getenv_helper_nolock -15d9b 0 95 2318 -15d9b 10 103 2318 -15dab 3 104 2318 -15dae 1 169 2318 -15daf e 128 2318 -15dbd 7 131 2318 -15dc4 2 132 2318 -15dc6 6 135 2318 -15dcc c 140 2318 -15dd8 9 142 2318 -15de1 2 150 2318 -15de3 22 154 2318 -15e05 3 164 2318 -15e08 6 150 2318 -15e0e 5 168 2318 -15e13 9 169 2318 -FUNC 15e1c 93 c _getenv_s_helper -15e1c 7 220 2318 -15e23 21 224 2318 -15e44 15 226 2318 -15e59 4 227 2318 -15e5d 3 229 2318 -15e60 a 233 2318 -15e6a 3 234 2318 -15e6d 2 236 2318 -15e6f 7 239 2318 -15e76 6 240 2318 -15e7c 2 243 2318 -15e7e 5 246 2318 -15e83 5 251 2318 -15e88 20 254 2318 -15ea8 5 256 2318 -15ead 2 257 2318 -FUNC 15eaf a2 8 _dupenv_s_helper -15eaf 6 339 2318 -15eb5 21 344 2318 -15ed6 9 346 2318 -15edf 2 348 2318 -15ee1 5 350 2318 -15ee6 8 352 2318 -15eee 6 353 2318 -15ef4 2 355 2318 -15ef6 9 358 2318 -15eff b 362 2318 -15f0a 6 364 2318 -15f10 b 366 2318 -15f1b 9 367 2318 -15f24 1e 370 2318 -15f42 7 371 2318 -15f49 2 373 2318 -15f4b 4 375 2318 -15f4f 2 376 2318 -FUNC 15f51 83 4 getenv -15f51 c 75 2318 -15f5d 2a 78 2318 -15f87 18 79 2318 -15f9f 8 81 2318 -15fa7 3 82 2318 -15faa c 83 2318 -15fb6 c 85 2318 -15fc2 3 89 2318 -15fc5 6 90 2318 -15fcb 9 86 2318 -FUNC 15fd4 d8 10 getenv_s -15fd4 c 198 2318 -15fe0 8 201 2318 -15fe8 5 202 2318 -15fed a1 203 2318 -1608e c 205 2318 -1609a 3 209 2318 -1609d 6 210 2318 -160a3 9 206 2318 -FUNC 160ac e6 c _dupenv_s -160ac c 303 2318 -160b8 8 306 2318 -160c0 5 307 2318 -160c5 af 311 2318 -16174 c 314 2318 -16180 3 318 2318 -16183 6 319 2318 -16189 9 315 2318 -FUNC 16192 8 4 _tolower -16192 0 48 3943 -16192 7 49 3943 -16199 1 50 3943 -FUNC 1619a 117 8 _tolower_l -1619a 8 70 3943 -161a2 b 74 3943 -161ad c 77 3943 -161b9 31 79 3943 -161ea f 80 3943 -161f9 14 82 3943 -1620d 2b 86 3943 -16238 3 88 3943 -1623b d 91 3943 -16248 2 92 3943 -1624a b 94 3943 -16255 a 97 3943 -1625f 25 110 3943 -16284 6 112 3943 -1628a 5 116 3943 -1628f 6 117 3943 -16295 1a 119 3943 -162af 2 120 3943 -FUNC 162b1 27 4 tolower -162b1 0 143 3943 -162b1 9 145 3943 -162ba f 147 3943 -162c9 1 153 3943 -162ca d 151 3943 -162d7 1 153 3943 -FUNC 162d8 82 c _iswctype_l -162d8 6 66 4124 -162de 8 69 4124 -162e6 6 70 4124 -162ec 8 71 4124 -162f4 18 72 4124 -1630c 2 73 4124 -1630e b 75 4124 -16319 25 85 4124 -1633e 3 86 4124 -16341 d 87 4124 -1634e a 89 4124 -16358 2 90 4124 -FUNC 1635a 6e 8 iswctype -1635a 4 96 4124 -1635e 8 97 4124 -16366 2 99 4124 -16368 2 122 4124 -1636a 8 101 4124 -16372 14 103 4124 -16386 2 122 4124 -16388 9 106 4124 -16391 25 117 4124 -163b6 10 121 4124 -163c6 2 122 4124 -FUNC 163c8 5 8 is_wctype -163c8 0 148 4124 -163c8 5 149 4124 -FUNC 163d0 61 c __ascii_strnicmp -163d0 6 69 538 -163d6 3 75 538 -163d9 2 76 538 -163db 2 77 538 -163dd 3 79 538 -163e0 3 80 538 -163e3 2 82 538 -163e5 2 83 538 -163e7 5 84 538 -163ec 2 89 538 -163ee 2 91 538 -163f0 2 93 538 -163f2 2 95 538 -163f4 2 97 538 -163f6 2 98 538 -163f8 3 100 538 -163fb 3 101 538 -163fe 2 103 538 -16400 2 104 538 -16402 2 106 538 -16404 2 107 538 -16406 2 109 538 -16408 2 112 538 -1640a 2 113 538 -1640c 2 115 538 -1640e 2 116 538 -16410 2 118 538 -16412 2 121 538 -16414 2 122 538 -16416 3 124 538 -16419 2 125 538 -1641b 2 128 538 -1641d 2 129 538 -1641f 2 130 538 -16421 5 133 538 -16426 2 134 538 -16428 2 135 538 -1642a 2 138 538 -1642c 5 140 538 -FUNC 16431 ec 10 _mbsnbicoll_l -16431 7 53 2932 -16438 b 55 2932 -16443 9 57 2932 -1644c 13 58 2932 -1645f 33 61 2932 -16492 6 62 2932 -16498 23 63 2932 -164bb 8 65 2932 -164c3 14 66 2932 -164d7 23 74 2932 -164fa 10 75 2932 -1650a 11 77 2932 -1651b 2 79 2932 -FUNC 1651d 17 c _mbsnbicoll -1651d 0 85 2932 -1651d 16 86 2932 -16533 1 87 2932 -FUNC 16534 95 0 __wtomb_environ -16534 7 43 1113 -1653b 3 44 1113 -1653e 9 45 1113 -16547 c 52 1113 -16553 12 57 1113 -16565 11 61 1113 -16576 12 65 1113 -16588 10 72 1113 -16598 5 74 1113 -1659d 9 76 1113 -165a6 3 77 1113 -165a9 9 81 1113 -165b2 5 84 1113 -165b7 2 85 1113 -165b9 5 58 1113 -165be 9 67 1113 -165c7 2 68 1113 -FUNC 165c9 1a 8 strnlen -165c9 0 38 531 -165c9 19 45 531 -165e2 1 49 531 -FUNC 165e3 224 1c __crtGetStringTypeW_stat -165e3 10 64 1242 -165f3 9 72 1242 -165fc 7 73 1242 -16603 14 75 1242 -16617 11 79 1242 -16628 8 80 1242 -16630 b 82 1242 -1663b f 83 1242 -1664a 4 88 1242 -1664e 13 90 1242 -16661 7 95 1242 -16668 2 199 1242 -1666a 8 119 1242 -16672 b 120 1242 -1667d 5 121 1242 -16682 b 122 1242 -1668d e 128 1242 -1669b 5 130 1242 -166a0 3 131 1242 -166a3 1d 142 1242 -166c0 6 143 1242 -166c6 40 146 1242 -16706 3 147 1242 -16709 6 148 1242 -1670f d 150 1242 -1671c 1a 160 1242 -16736 4d 164 1242 -16783 4 165 1242 -16787 5 170 1242 -1678c b 171 1242 -16797 3 174 1242 -1679a 23 178 1242 -167bd 12 186 1242 -167cf f 189 1242 -167de 4 187 1242 -167e2 7 191 1242 -167e9 8 194 1242 -167f1 4 196 1242 -167f5 12 200 1242 -FUNC 16807 3e 1c __crtGetStringTypeW -16807 6 211 1242 -1680d b 212 1242 -16818 2b 222 1242 -16843 2 223 1242 -FUNC 16845 1a 4 strncnt -16845 0 50 2759 -16845 6 51 2759 -1684b 6 54 2759 -16851 1 55 2759 -16852 5 54 2759 -16857 7 57 2759 -1685e 1 58 2759 -FUNC 1685f 389 18 __crtCompareStringA_stat -1685f 10 96 2759 -1686f 31 280 2759 -168a0 c 107 2759 -168ac b 109 2759 -168b7 a 110 2759 -168c1 5 118 2759 -168c6 1b 119 2759 -168e1 7 122 2759 -168e8 1f 123 2759 -16907 6 120 2759 -1690d 7 121 2759 -16914 3 124 2759 -16917 2 125 2759 -16919 17 130 2759 -16930 7 189 2759 -16937 8 201 2759 -1693f 8 202 2759 -16947 d 208 2759 -16954 5 214 2759 -16959 8 215 2759 -16961 2 218 2759 -16963 6 219 2759 -16969 5 222 2759 -1696e 4 223 2759 -16972 f 231 2759 -16981 2 232 2759 -16983 5 237 2759 -16988 4 239 2759 -1698c 2 240 2759 -1698e 10 244 2759 -1699e a 246 2759 -169a8 7 244 2759 -169af 2 262 2759 -169b1 5 253 2759 -169b6 6 255 2759 -169bc 8 256 2759 -169c4 10 260 2759 -169d4 11 262 2759 -169e5 7 260 2759 -169ec 2 262 2759 -169ee 1a 280 2759 -16a08 6 281 2759 -16a0e 4d 284 2759 -16a5b 4 285 2759 -16a5f 6 286 2759 -16a65 19 295 2759 -16a7e 17 305 2759 -16a95 46 309 2759 -16adb 4 310 2759 -16adf 13 320 2759 -16af2 17 326 2759 -16b09 7 328 2759 -16b10 8 331 2759 -16b18 9 333 2759 -16b21 4 132 2759 -16b25 5 137 2759 -16b2a 8 138 2759 -16b32 5 139 2759 -16b37 8 140 2759 -16b3f e 142 2759 -16b4d 6 143 2759 -16b53 5 148 2759 -16b58 19 155 2759 -16b71 2 156 2759 -16b73 6 157 2759 -16b79 19 163 2759 -16b92 4 164 2759 -16b96 7 166 2759 -16b9d 5 167 2759 -16ba2 3 169 2759 -16ba5 3 170 2759 -16ba8 18 178 2759 -16bc0 6 179 2759 -16bc6 6 181 2759 -16bcc 8 182 2759 -16bd4 2 184 2759 -16bd6 12 337 2759 -FUNC 16be8 40 20 __crtCompareStringA -16be8 6 349 2759 -16bee b 350 2759 -16bf9 2d 361 2759 -16c26 2 362 2759 -FUNC 16c28 f8 10 _strnicoll_l -16c28 7 55 277 -16c2f b 57 277 -16c3a 9 59 277 -16c43 13 60 277 -16c56 33 63 277 -16c89 6 64 277 -16c8f 23 65 277 -16cb2 a 67 277 -16cbc 15 68 277 -16cd1 21 78 277 -16cf2 b 80 277 -16cfd 10 81 277 -16d0d 11 84 277 -16d1e 2 85 277 -FUNC 16d20 27 c _strnicoll -16d20 3 92 277 -16d23 9 93 277 -16d2c 1 101 277 -16d2d 5 95 277 -16d32 13 99 277 -16d45 2 101 277 -FUNC 16d47 4d 4 findenv -16d47 1 387 1450 -16d48 8 390 1450 -16d50 12 394 1450 -16d62 d 399 1450 -16d6f 9 390 1450 -16d78 e 407 1450 -16d86 1 408 1450 -16d87 c 400 1450 -16d93 1 408 1450 -FUNC 16d94 5d 0 copy_environ -16d94 4 428 1450 -16d98 2 429 1450 -16d9a 6 434 1450 -16da0 2 464 1450 -16da2 7 438 1450 -16da9 8 439 1450 -16db1 14 443 1450 -16dc5 8 444 1450 -16dcd 6 448 1450 -16dd3 11 458 1450 -16de4 4 448 1450 -16de8 2 461 1450 -16dea 5 463 1450 -16def 2 464 1450 -FUNC 16df1 24c 8 __crtsetenv -16df1 6 76 1450 -16df7 2c 89 1450 -16e23 2 91 1450 -16e25 1c 98 1450 -16e41 5 114 1450 -16e46 13 125 1450 -16e59 c 126 1450 -16e65 4 130 1450 -16e69 d 153 1450 -16e76 9 155 1450 -16e7f b 100 1450 -16e8a 6 101 1450 -16e90 2 356 1450 -16e92 3 164 1450 -16e95 6 165 1450 -16e9b f 171 1450 -16eaa 2 172 1450 -16eac 2 173 1450 -16eae 8 176 1450 -16eb6 f 178 1450 -16ec5 2 179 1450 -16ec7 2 180 1450 -16ec9 6 196 1450 -16ecf 5 197 1450 -16ed4 2 200 1450 -16ed6 10 207 1450 -16ee6 9 210 1450 -16eef a 216 1450 -16ef9 6 218 1450 -16eff 5 235 1450 -16f04 5 238 1450 -16f09 5 241 1450 -16f0e c 222 1450 -16f1a 4 221 1450 -16f1e 1d 230 1450 -16f3b 2 233 1450 -16f3d 9 245 1450 -16f46 4 250 1450 -16f4a 2 251 1450 -16f4c 2f 255 1450 -16f7b 8 258 1450 -16f83 3 259 1450 -16f86 5 262 1450 -16f8b 5 264 1450 -16f90 21 287 1450 -16fb1 25 289 1450 -16fd6 21 338 1450 -16ff7 4 339 1450 -16ffb b 343 1450 -17006 7 346 1450 -1700d 5 349 1450 -17012 8 351 1450 -1701a 6 352 1450 -17020 8 355 1450 -17028 8 271 1450 -17030 6 274 1450 -17036 7 276 1450 -FUNC 1703d 50 4 _strdup -1703d 1 66 568 -1703e b 70 568 -17049 6 71 568 -1704f 9 73 568 -17058 e 77 568 -17066 1c 80 568 -17082 4 81 568 -17086 6 84 568 -1708c 1 85 568 -FUNC 1708d ba c _mbschr_l -1708d 7 53 2982 -17094 b 55 2982 -1709f 32 58 2982 -170d1 8 60 2982 -170d9 d 61 2982 -170e6 a 65 2982 -170f0 7 67 2982 -170f7 10 69 2982 -17107 3 70 2982 -1710a 8 72 2982 -17112 d 63 2982 -1711f 8 76 2982 -17127 e 77 2982 -17135 10 79 2982 -17145 2 80 2982 -FUNC 17147 13 8 _mbschr -17147 0 86 2982 -17147 12 87 2982 -17159 1 88 2982 -FUNC 17170 be 8 strchr -17170 0 60 595 -17170 2 68 595 -17172 4 69 595 -17176 1 73 595 -17177 2 74 595 -17179 3 75 595 -1717c 4 76 595 -17180 6 77 595 -17186 2 78 595 -17188 2 81 595 -1718a 3 82 595 -1718d 2 83 595 -1718f 2 84 595 -17191 2 85 595 -17193 2 86 595 -17195 6 87 595 -1719b 2 88 595 -1719d 2 91 595 -1719f 1 92 595 -171a0 2 93 595 -171a2 3 94 595 -171a5 1 95 595 -171a6 2 96 595 -171a8 2 101 595 -171aa 5 102 595 -171af 2 104 595 -171b1 2 105 595 -171b3 2 107 595 -171b5 2 108 595 -171b7 2 110 595 -171b9 3 111 595 -171bc 3 113 595 -171bf 2 114 595 -171c1 2 116 595 -171c3 3 117 595 -171c6 6 119 595 -171cc 2 120 595 -171ce 5 124 595 -171d3 2 125 595 -171d5 5 127 595 -171da 2 128 595 -171dc 6 130 595 -171e2 2 131 595 -171e4 1 134 595 -171e5 1 135 595 -171e6 1 137 595 -171e7 2 138 595 -171e9 1 139 595 -171ea 3 142 595 -171ed 2 143 595 -171ef 2 144 595 -171f1 2 145 595 -171f3 2 146 595 -171f5 2 147 595 -171f7 2 148 595 -171f9 2 149 595 -171fb 2 150 595 -171fd 3 151 595 -17200 2 152 595 -17202 2 153 595 -17204 2 154 595 -17206 2 155 595 -17208 2 156 595 -1720a 2 157 595 -1720c 2 158 595 -1720e 2 159 595 -17210 2 160 595 -17212 1 163 595 -17213 1 164 595 -17214 3 165 595 -17217 1 166 595 -17218 1 167 595 -17219 3 170 595 -1721c 1 171 595 -1721d 1 172 595 -1721e 1 173 595 -1721f 1 174 595 -17220 3 177 595 -17223 1 178 595 -17224 1 179 595 -17225 1 180 595 -17226 1 181 595 -17227 3 184 595 -1722a 1 185 595 -1722b 1 186 595 -1722c 1 187 595 -1722d 1 188 595 -PUBLIC 17176 0 __from_strstr_to_strchr -STACK WIN 4 1060 54 6 0 8 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10c0 a 3 0 0 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f0 21 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1120 14 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1140 16 7 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1160 1e 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1190 10 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11b0 7 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11c0 2c 7 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11f7 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1206 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1214 1c 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1215 18 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1230 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 123f 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1247 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1262 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 127e 1f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 129d 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12a1 b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12ac 5 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12b1 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12b6 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12c0 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12ca a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12d4 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12de a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12e8 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 130c 41 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 134d 1b6 c 0 0 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c5 14 0 0 0 c 2c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1503 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 150d 22 3 0 18 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 152f 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1596 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 159f f5 c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1688 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1694 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16fb 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1704 31 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1735 eb c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1814 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1820 53 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 186a 8 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1908 8e c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 195e 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1996 3d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d3 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e1 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a05 26 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a2b 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a40 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a49 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a52 18 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a53 16 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a6a 20 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a6b 1e 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a8a 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a8f 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ac1 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ac6 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1afd 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b02 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b39 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b3e 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b75 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b7a 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bb1 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bb6 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1be8 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bed 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c1f 92 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c5d 34 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c5e 32 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1cb1 e2 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d7b 11 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1d93 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1da4 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1db5 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dc4 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd3 4c 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd4 4a 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1e1f 1a0 8 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1e21 19c 6 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e26 196 1 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e27 194 0 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e44 176 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 20 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 1fbf 20 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1fdf 39 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2018 1 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2019 32 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2024 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 204b 15e 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2051 156 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2069 13d 0 0 8 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 206f 136 0 0 8 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 21a9 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21c4 db b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21c5 c3 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 21ce b9 1 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 21cf b7 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 221e 67 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 229f a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a9 198 e 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22b1 187 6 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 22b7 180 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 2441 b9 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2448 b0 a 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 2451 a6 1 0 0 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 2452 a4 0 0 0 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 24fa 135 b 0 0 0 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2502 12a 3 0 0 4 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 2503 128 2 0 0 8 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 2504 126 1 0 0 c 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 2505 124 0 0 0 10 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 262f 240 c 0 0 c 64 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2858 4 0 0 0 c 64 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 286f 4c 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2870 4a 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2871 48 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bb 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bc 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bd 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28df 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28e0 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28e1 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2903 6c 7 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2909 64 1 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 290a 62 0 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 292a 41 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 296f 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2970 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29dd 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29e6 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29e7 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a54 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a5d 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a72 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a78 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a79 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2aaa 19 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2ac3 3d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2b00 bf c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2bb6 8 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2bbf 77 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2bc0 75 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2bc1 71 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c36 18 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c37 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c4e 121 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2d57 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2d63 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2d6f 69 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2d79 4b 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2d82 25 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2dd8 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2dde 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2de4 184 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2de5 182 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2e00 166 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2f68 5b 6 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2f6e 43 0 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2fc3 5a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 301d 74 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 301e 72 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 302a 53 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 3031 4b 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 303c 30 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 3091 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3100 24 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3130 196 14 0 10 0 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3134 d3 10 0 10 4 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 24 - ^ = -STACK WIN 4 3139 cd b 0 10 8 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 313a cb a 0 10 c 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 3144 c0 0 0 10 10 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 32c6 94 15 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 32da 7e 1 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 32db 7c 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 32f7 5f 0 0 0 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 335a a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3364 fc 1c 0 14 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3460 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3461 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3482 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 348f 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3498 24 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 34bc 10 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34cc 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 34d5 49 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34d6 3b 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34d7 39 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 351e 55 8 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 351f 53 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 3526 4b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 352c 2a 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 3573 15 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3588 18 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 35a0 c3 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 365a 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 3663 31 7 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 366a 28 0 0 4 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3694 65 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3699 5f 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 369e 59 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 369f 57 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 378b 6 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3791 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37ac 26 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37ad 24 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37d2 63 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3835 474 a 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 383c 42e 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 383d 42c 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 383e 42a 1 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 383f 428 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 3ca9 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cb4 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cc1 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ccf e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cdd e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ceb e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cf9 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d0b e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d19 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d27 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d35 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d40 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d4b b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d56 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d64 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d6f e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d7d 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d96 84 13 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d97 80 12 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d98 7e 11 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3dbe 57 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 3e1a d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e27 12 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e39 9c 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e4c 86 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ed5 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3edf 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ee4 7 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3eeb a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ef5 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3efd a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f07 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f11 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f19 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f23 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f2b a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f35 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f3d a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f47 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f4f 7b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f52 75 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3fca 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3fd3 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ff8 d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4005 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4009 29 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 401b f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4032 16 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4048 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 404c 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4050 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 406b 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 406f 2f 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 409e 25 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40c3 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40c7 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40d4 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40e2 20 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4102 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4127 33 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 415a 34 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 418e 13 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41a1 56 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41a7 4d 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f7 61 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f8 5d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f9 59 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4258 17 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 426f 15 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4284 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4298 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42a6 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42ba 25 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42bb 23 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42c7 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42df 38 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42e0 36 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42e1 32 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4317 91 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 431b 89 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 431c 87 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4351 40 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 43a8 35 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43ab 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43dd 81 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43de 7d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43df 79 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 445e 1e 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 445f 1c 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 447c 47 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 447d 43 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44c3 47 7 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44c4 45 6 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 44c5 43 5 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 44c6 41 4 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 450a 65 11 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 450b 61 10 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4510 5b b 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4511 57 a 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 456f 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4581 31 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45b2 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45c1 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45d0 1d 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45ed 33 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4620 73 7 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4624 6b 3 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4625 5b 2 0 14 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4693 2f 3 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 46c2 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d1 79 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d2 75 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d3 71 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 474a 68 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 474b 64 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47b2 a6 3 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47b3 a2 2 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47d3 81 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 47e5 6e 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 4858 26 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4859 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 487e 31 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4883 29 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48af d0 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 48b3 b3 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 48b4 b1 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 48c3 9f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 497f 69 13 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4990 4f 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 4991 4b 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 4992 49 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 49e8 96 22 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 49fc 79 e 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4a0a 66 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4a2f 29 0 0 8 c 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 4a7e 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4a7f 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aac 62 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aad 5e 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aae 5a 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b0e 8b a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b0f 87 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b10 83 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b99 1c 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b9a 18 8 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bb5 2a 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bba 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bdf a6 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4c85 37 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4cbc 51 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4cbd 4d 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d0d 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d0e 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d3b 6a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d3c 66 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4d43 5e 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4da5 6c a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4da6 68 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4da7 64 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e11 e0 e 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e18 d7 7 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e1f cd 0 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e3a b1 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 4ef1 4f 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4ef7 47 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f40 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f62 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f84 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4fa6 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fa7 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fd4 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fd5 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5002 141 7 0 8 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5009 138 0 0 8 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 508a b3 0 0 8 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 508b b1 0 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 5143 d4 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5217 c4 e 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 52db 7e d 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5359 125 11 0 10 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 536a 112 0 0 10 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 547e 15f f 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 548d 4a 0 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 54e5 b3 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 55dd 31 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 560e 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5620 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5632 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5644 150 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 564b 147 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5794 a0 6 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5834 50 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5884 2bb 2b 0 4 0 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 589f 296 10 0 4 4 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 58a8 28a 7 0 4 8 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 58af 282 0 0 4 c d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 5b3f d9 b 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5bad 17 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c18 14 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5c2c 1b8 18 0 4 0 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c3d 1a0 7 0 4 4 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c44 18d 0 0 4 8 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c65 168 0 0 4 c 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 108 - ^ = -STACK WIN 4 5de4 56f 22 0 c 0 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5df8 97 e 0 c 4 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 5e06 88 0 0 c 8 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 6353 153 10 0 8 0 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6377 11b 0 0 8 4 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 637e 113 0 0 8 8 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 6387 109 0 0 8 c d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 64a6 1ea 1b 0 8 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 64c1 1c8 0 0 8 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6549 111 0 0 8 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 654a 10f 0 0 8 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 6690 e4 15 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6697 db e 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 66a5 ca 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6774 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6783 100 19 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 678f f2 d 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 679c e4 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 6883 46 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 68c9 92 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 695b b42 14 0 8 0 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6966 b35 9 0 8 4 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 696f b2b 0 0 8 8 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 69d8 abe 0 0 8 c 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 120 - ^ = -STACK WIN 4 749d 211 13 0 4 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 74a4 208 c 0 4 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 74b0 1fb 0 0 4 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 76ae 28b 1f 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 76ba 27a 13 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 76bb 278 12 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 76cd 263 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 7939 341 d 0 8 0 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 797e 2f7 0 0 8 4 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 79e5 28f 0 0 8 8 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 79e6 28d 0 0 8 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 7c7a 4e4 18 0 14 0 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7c88 4d4 a 0 14 4 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 7c89 4d2 9 0 14 8 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 7c92 4c8 0 0 14 c 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 815e 14c 6 0 0 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 82aa 116 5 0 10 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 82cb 59 0 0 10 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 83c0 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 83db 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 83f6 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8411 a3 f 0 18 c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 84ab 8 0 0 18 c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 84b4 a3 f 0 1c c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 854e 8 0 0 1c c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8557 387 12 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8567 350 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 8568 34e 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 8569 34c 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 88de 13e 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 88e5 135 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8a1c b1 6 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8acd 64 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ad4 5b 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8b31 4f c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8b77 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8b80 75 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bc8 2c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bf5 c3 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bf6 c1 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 8c04 9c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8c0b 94 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8c0c 90 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8cb8 3b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8cf3 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d06 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d19 1e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d1a 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d37 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d52 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d53 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d7c 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d97 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d98 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8dc1 21 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8de2 46 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8ded 3a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e28 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e2d 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e64 48 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8eac 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8ed7 314 11 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ee4 305 4 0 8 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ee8 300 0 0 8 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8f15 2d2 0 0 8 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 91eb b0 d 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 91f1 a9 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 91f8 a1 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 929b 106 11 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 92a7 f8 5 0 4 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 92a8 f6 4 0 4 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 92ac f1 0 0 4 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 93a1 2df 12 0 c 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 93ae 2d0 5 0 c 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 93af 2ce 4 0 c 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 93b3 2c9 0 0 c c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 9680 cd 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 974d 2e2 f 0 0 0 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 975c 294 0 0 0 4 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9771 27e 0 0 0 8 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9774 27a 0 0 0 c 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9a2f a8 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a30 a6 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a78 5d 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9ad7 2e3 2a 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9afb 2bd 6 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9b00 2b7 1 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9b01 2b5 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9dba 39 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9dda 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9df3 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e06 37 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9e2a 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9e3d 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e4e b9 5 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e50 b5 3 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 9e51 b3 2 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9e52 b1 1 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9e53 af 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9f07 2f 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f08 2d 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f36 3c c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9f6c 5 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9f72 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f84 1f 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f85 1d 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f86 1b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fb0 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fe0 42 18 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fee 33 a 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 9fef 31 9 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 9ff8 27 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 a030 bb 33 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a04a a1 19 0 4 10 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 a0b9 14 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 a0eb 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a104 9b c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a17d 9 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a19f 34 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1aa 1d 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1d3 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1e0 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1e9 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1f2 23d c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a3e7 b 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a42f 1b0 c 0 4 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a59d 14 0 0 4 c 30 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a5df a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a5e9 104 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a5ea 102 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a5eb 100 1 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a5ec fe 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a625 c4 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 16 - ^ = -STACK WIN 4 a6ed 15a 24 0 14 0 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a706 bc b 0 14 4 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a707 b8 a 0 14 8 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a711 ad 0 0 14 c 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a847 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a851 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a85b 10 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a86b c5 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a8f1 17 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a930 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a93a 31 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a93b 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a96b 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a974 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a981 22 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a9a3 1bd 9 0 c 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a9aa 1b4 2 0 c 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 a9ab 1b2 1 0 c 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 a9ac 1b0 0 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 ab60 71 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ab65 6b 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ab6a 65 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ab6b 63 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 abd1 b3 e 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 abd5 1a a 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 abd6 2e 9 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 abdf e 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 ac84 46 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac89 40 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acca a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acd4 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acda 21 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acdb 1f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acfb 10 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0b 40 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0c 3e 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0d 3c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4b 48 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4c 46 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4d 44 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad93 4b 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad94 49 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad95 47 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 adde 50 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 addf 4e 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ade0 4c 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae2e 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae36 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae40 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae4a e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae58 3 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae5b 2f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae8a 55 b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae8b 53 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ae8c 51 9 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ae8d 4f 8 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ae8e 4d 7 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 aedf 18a 1d 0 0 0 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 aefb 161 1 0 0 4 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 aefc 15d 0 0 0 8 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 b069 a4 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b101 b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 b10d 82 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b114 78 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b18f 7a 7 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b196 71 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 b209 1d9 19 0 8 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b21a 1c1 8 0 8 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b21e 1ba 4 0 8 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b222 1b5 0 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b3e2 3c 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b41e 19a c 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b57f 8 0 0 4 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 b5b8 1e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b5d6 51 6 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b627 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b63c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b64f 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b664 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b677 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b68c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b69f 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6b7 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6cd 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6e5 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6fb 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b713 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b729 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b741 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b757 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b76c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b77f 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b794 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7a7 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7bc 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7cf 53 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b822 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bb95 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bb9b 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bba1 140 12 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bba2 13e 11 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 bba3 13c 10 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bba4 13a f 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bbb3 12a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce1 86 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bce2 84 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 bce3 82 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce4 80 5 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce9 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bd67 8c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bd68 8a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bd71 7e 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 bd72 7c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 bd73 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 bdf3 24 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bdf4 22 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be03 12 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be17 3e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be20 31 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be55 76 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 bebf 8 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 becb 66 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 becc 64 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 becd 62 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bf31 53 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bf84 96 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c00e b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 c01a 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c01f 88 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c09b b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 c0a7 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0ac 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0af 3e 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0b0 3c 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0b1 3a 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0bc 2e 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0ed 129 6 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c0f1 123 2 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c0f2 121 1 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c0f3 11f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c216 6b 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c21a 4d 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c21b 4b 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c281 171 4 0 0 0 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c285 169 0 0 0 4 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 20 - ^ = -STACK WIN 4 c2a4 149 0 0 0 8 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 c2a5 141 0 0 0 c 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 c3f2 1d4 1e 0 18 0 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c40b 1b1 5 0 18 4 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c40c 1ad 4 0 18 8 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c410 1a8 0 0 18 c b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c5c6 2f6 17 0 4 0 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c5dc 2d6 1 0 4 4 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 c5dd 2d2 0 0 4 8 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 c8bc 1ce 18 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c8d5 1ab 0 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 c8d6 1a7 0 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 c8dd 19f 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 ca8a f3 7 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ca90 2c 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ca91 2a 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cb7d 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cb82 170 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 cca8 10 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccb9 b 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccea 7 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccf2 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ce57 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ceda 2a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf04 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf05 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf26 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d014 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d025 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d03a 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d03f 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d044 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d055 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d3d5 f3 23 0 0 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d4c8 1e 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d4e6 a3 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d578 10 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 d589 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d592 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d5e6 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d611 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d660 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d689 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d6d8 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d701 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d750 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d779 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d7cd 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d7f8 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d847 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d870 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d8bf 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d8e8 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d93c 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d967 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d9bb 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d9e6 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 da3a 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 da65 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dab4 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 dadd d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 daea 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 daf2 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db11 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db2b 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db4a 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db66 12 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db78 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db93 13b 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dba8 126 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 dcce 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dd09 13d 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dd1e 128 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 de46 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 de81 11e c 0 c c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 df78 d 0 0 c c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 df9f 3f 9 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfa8 34 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfc1 18 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfde 21b c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e11c e 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e1f9 79 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e200 70 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e236 39 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e237 37 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e272 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e28c 3a2 1d 0 20 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e29d 391 c 0 20 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 e62e 43 6 0 24 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e671 1b8 1d 0 1c 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e686 1a3 8 0 1c c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 e829 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e869 87 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e8f0 e3 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9d3 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9e7 14 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9fb 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ea01 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ea2a 419 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ea4c 3f5 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 ea4d 3ed 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 ee43 190 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ee44 18e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 efd3 73 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 efd4 71 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 efd5 6f 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 efd6 6d 1 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 efd7 6b 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f046 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f04d 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f04e 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f079 40 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f07a 3e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f0b9 1c8 11 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f0c0 1bf a 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f0c4 1ba 6 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f0ca 1b3 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f281 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f288 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f289 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f2b4 89 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f2b5 87 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f33d 2c4 c 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f344 2bb 5 0 4 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f345 2b9 4 0 4 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f349 2b4 0 0 4 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f601 395 1b 0 4 0 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f612 37d a 0 4 4 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f615 377 7 0 4 8 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f61c 36f 0 0 4 c 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f996 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9bf 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9d5 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9fb 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa21 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa47 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa4a fe 9 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fa51 e9 2 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fa52 e7 1 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fa53 e5 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fb48 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fb51 fe 9 0 4 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fb58 e9 2 0 4 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fb59 e7 1 0 4 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fb5a e5 0 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fc4f 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fc58 355 9 0 4 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fc5f 34c 2 0 4 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 fc60 348 1 0 4 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 fc61 346 0 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 ffad 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffb6 20 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffba 1b 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffbf 15 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffd6 36 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffdc 2f 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1000c 79 8 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10011 72 3 0 4 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10012 70 2 0 4 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10085 3e6 11 0 10 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1008a 3df c 0 10 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10091 3d7 5 0 10 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10092 3d5 4 0 10 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1046b 45d 1d 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1047f 449 9 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 108c8 1af a 0 18 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 108d2 1a3 0 0 18 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 10918 15c 0 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1094b 128 0 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 10a77 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10a95 1d 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10ab2 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10ad0 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10b46 60 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10b4c 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10b55 45 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10b56 43 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10ba6 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10bba 77 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10bcb 5f 0 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10c31 1e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c4f 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c50 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c81 1b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c9c 96 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10cad 7c 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10cae 78 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d32 72 11 0 8 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d43 5a 0 0 8 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d7f 13 0 0 8 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10da4 1d0 13 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10db5 1b6 2 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10db6 1b2 1 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10db7 1b0 0 0 4 c 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10f74 bf 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f85 a5 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f86 a1 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11033 2c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1105f 65 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 110c4 3c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11100 1e3 4 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11101 1e1 3 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 11102 1df 2 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 11103 1dd 1 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 11104 1db 0 0 c 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 112e3 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 112f5 18 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1130d 40 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1134d 78 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c5 1490 4 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c6 83f 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c7 83d 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12855 1680 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12859 15f8 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1285a 15f6 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1288b 86c 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 13ed5 be 9 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 13ede a9 0 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 13ef0 96 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 13fe0 104 9 0 0 0 328 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1421b 57 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14272 8f 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14301 22b 8 0 14 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14308 222 1 0 14 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14309 220 0 0 14 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14367 1c1 0 0 14 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 1452c 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14555 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14570 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1459a 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 145b5 294 8 0 14 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 145bc 28b 1 0 14 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 145bd 289 0 0 14 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 14619 1f9 0 0 14 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 14849 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14872 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1488d 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 148b7 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148d2 b6 7 0 c 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 148d9 ad 0 0 c 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 14988 2f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149ec 47 10 0 4 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14a33 1b2 2a 0 18 8 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14a50 195 d 0 18 c 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 56 - ^ = -STACK WIN 4 14be5 50 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c02 1c 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 14c35 60 9 0 0 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c3e 57 0 0 0 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 14c95 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ca2 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ca7 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cd6 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cdb 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d0a 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d0f 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d3e a2 c 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14d45 99 5 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14d4a 93 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14d58 84 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14de0 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14de6 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14dec 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14df2 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14df8 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e04 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e10 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e1c 349 c 0 0 c 3c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 150c6 d 0 0 0 c 3c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15165 1f5 14 0 24 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15174 1e4 5 0 24 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15175 1e2 4 0 24 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15176 1e0 3 0 24 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 1535a 1ae 5 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1535f 15f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1538f 12e 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 15508 4f c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1554e 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15557 38 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15586 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1558f 41 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 155c7 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 155d0 35 a 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 155d5 2f 5 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 155da 27 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15605 d3 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1560c ca 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1564d 88 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 15695 33 0 0 c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 156d8 50 4 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 156dc 4a 0 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15728 36 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1575e e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1576c 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15782 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15793 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157a6 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157b4 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157c7 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157d5 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157e8 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157f6 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1580c 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1581d 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15830 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1583e 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15851 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1585f 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15875 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15886 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1589c 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158ad 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158c3 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158d4 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158e7 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158f5 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15901 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15927 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15948 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1596e 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1598f f0 e 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15996 e7 7 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1599c e0 1 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1599d de 0 0 10 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 15a7f 5c 4 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15a83 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15adb db 8 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15ae0 d2 3 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15ae1 d0 2 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15b0b a5 0 0 c c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15bb6 28 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15bde 25 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c03 18 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15c1b f6 c 0 14 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c22 eb 5 0 14 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15c27 e5 0 0 14 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15d11 33 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d2c 16 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d44 1d 4 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d48 17 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d9b 81 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15da3 70 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15db2 60 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 15db3 5e 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 15e1c 93 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15e20 8d 3 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15e21 8b 2 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15e60 4b 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15eaf a2 6 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15eb4 9b 1 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15eb5 99 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15f51 83 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15fcb 8 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15fd4 d8 c 0 10 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 160a3 8 0 0 10 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 160ac e6 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16189 8 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 16192 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1619a 117 8 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 161a1 10e 1 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 161a2 10c 0 0 8 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 162b1 27 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 162d8 82 6 0 c 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1635a 6e 4 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 163c8 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16431 ec 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16438 e3 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16498 82 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1651d 17 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16534 95 a 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1653a 7d 4 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1653b 7b 3 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1653e 77 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 165c9 1a 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 165e3 224 17 0 1c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 165f8 20f 2 0 1c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16807 3e 6 0 1c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16845 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1685f 389 16 0 18 8 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16873 375 2 0 18 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 16be8 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16c28 f8 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16c2f ef 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16c8f 8e 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16d20 27 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16d47 4d 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16d48 48 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16d94 5d 4 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16db0 3f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 16db1 3d 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 16df1 24c f 0 8 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16dfb 95 5 0 8 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 16e00 8f 0 0 8 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 16e23 6b 0 0 8 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 1703d 50 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1703e 4e 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 17043 48 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1704e 3c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1704f 3a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1708d ba 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 17094 b1 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 170d1 73 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 17147 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 0 14c5 14 0 0 0 0 0 0 0 0 -STACK WIN 0 1596 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1688 c 0 0 0 0 0 0 0 0 -STACK WIN 0 16fb 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1814 c 0 0 0 0 0 0 0 0 -STACK WIN 0 186a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1880 88 0 0 8 0 0 0 0 0 -STACK WIN 0 195e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1d7b 12 0 0 0 0 0 0 0 0 -STACK WIN 0 2858 4 0 0 0 0 0 0 0 0 -STACK WIN 0 2bb6 9 0 0 0 0 0 0 0 0 -STACK WIN 0 2d57 c 0 0 0 0 0 0 0 0 -STACK WIN 0 2d63 c 0 0 0 0 0 0 0 0 -STACK WIN 0 365a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 3700 8b 0 0 4 0 0 0 0 0 -STACK WIN 0 84ab 9 0 0 0 0 0 0 0 0 -STACK WIN 0 854e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 8b77 9 0 0 0 0 0 0 0 0 -STACK WIN 0 9dda 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9e2a 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9f6c 6 0 0 0 0 0 0 0 0 -STACK WIN 0 a0b9 14 0 0 0 0 0 0 0 0 -STACK WIN 0 a17d a 0 0 0 0 0 0 0 0 -STACK WIN 0 a3e7 c 0 0 0 0 0 0 0 0 -STACK WIN 0 a59d 15 0 0 0 0 0 0 0 0 -STACK WIN 0 a8f1 17 0 0 0 0 0 0 0 0 -STACK WIN 0 b101 c 0 0 0 0 0 0 0 0 -STACK WIN 0 b57f 9 0 0 0 0 0 0 0 0 -STACK WIN 0 bebf 9 0 0 0 0 0 0 0 0 -STACK WIN 0 c00e c 0 0 0 0 0 0 0 0 -STACK WIN 0 c09b c 0 0 0 0 0 0 0 0 -STACK WIN 0 cca8 11 0 0 0 0 0 0 0 0 -STACK WIN 0 ccb9 c 0 0 0 0 0 0 0 0 -STACK WIN 0 ccea 8 0 0 0 0 0 0 0 0 -STACK WIN 0 cd04 90 3 0 c c 0 0 0 0 -STACK WIN 0 cd94 46 0 0 10 4 0 0 0 1 -STACK WIN 0 cdf6 17 4 0 0 10 0 0 0 1 -STACK WIN 0 ce0d 19 0 0 0 0 0 0 0 0 -STACK WIN 0 ce40 17 1 0 8 4 0 0 0 1 -STACK WIN 0 ce60 7a 0 0 c 0 0 0 0 0 -STACK WIN 0 d578 11 0 0 0 0 0 0 0 0 -STACK WIN 0 df78 e 0 0 0 0 0 0 0 0 -STACK WIN 0 e11c f 0 0 0 0 0 0 0 0 -STACK WIN 0 14149 84 3 0 8 c 0 0 0 0 -STACK WIN 0 141cd 23 0 0 0 0 0 0 0 0 -STACK WIN 0 14218 3 0 0 0 0 0 0 0 0 -STACK WIN 0 14c02 1c 0 0 0 0 0 0 0 0 -STACK WIN 0 150c6 e 0 0 0 0 0 0 0 0 -STACK WIN 0 1554e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 15586 9 0 0 0 0 0 0 0 0 -STACK WIN 0 155c7 9 0 0 0 0 0 0 0 0 -STACK WIN 0 15fcb 9 0 0 0 0 0 0 0 0 -STACK WIN 0 160a3 9 0 0 0 0 0 0 0 0 -STACK WIN 0 16189 9 0 0 0 0 0 0 0 0 -STACK WIN 0 17170 be 0 0 8 0 0 0 0 0 diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/refresh_binaries.bat b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/refresh_binaries.bat deleted file mode 100644 index f10ccbae..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/refresh_binaries.bat +++ /dev/null @@ -1,26 +0,0 @@ -REM This batch file is meant to facilitate regenerating prebuilt binaries for -REM the Windows tools. -REM You MUST run it from a Visual Studio xxxx Command Prompt. To do this, -REM navigate to: -REM -REM Start->Programs->Microsoft Visual Studio XXXX->Tools-> -REM Visual Studio Command Prompt -REM -REM Then run this batch file. It performs an SVN update, edits the -REM README.binaries file to contain -REM the revision number, and builds the tools. You must run 'svn commit' to -REM commit the pending edits to the repository. - -cd ..\..\ -call svn update --accept postpone -cd tools\windows -devenv symupload\symupload.vcproj /rebuild Release -copy symupload\Release\symupload.exe binaries\ -REM switch back to top level so that 'svn info' displays useful information. -cd ..\..\ -echo This checkin of the binaries was created by refresh_binaries.bat. > %TEMP%\checkin.txt -echo Date: %DATE% %TIME% >> %TEMP%\checkin.txt -echo Repository information (output of 'svn info') follows: >> %TEMP%\checkin.txt -call svn info >> %TEMP%\checkin.txt -echo Done! -echo type 'svn commit -F %%TEMP%%\checkin.txt' to commit. diff --git a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/symupload/symupload.cc b/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/symupload/symupload.cc deleted file mode 100644 index b858a63d..00000000 --- a/thirdparty/google-breakpad/google-breakpad-r786/src/tools/windows/symupload/symupload.cc +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Tool to upload an exe/dll and its associated symbols to an HTTP server. -// The PDB file is located automatically, using the path embedded in the -// executable. The upload is sent as a multipart/form-data POST request, -// with the following parameters: -// code_file: the basename of the module, e.g. "app.exe" -// debug_file: the basename of the debugging file, e.g. "app.pdb" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// version: the file version of the module, e.g. "1.2.3.4" -// os: the operating system that the module was built for, always -// "windows" in this implementation. -// cpu: the CPU that the module was built for, typically "x86". -// symbol_file: the contents of the breakpad-format symbol file - -#include -#include -#include - -#include -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/http_upload.h" -#include "common/windows/pdb_source_line_writer.h" - -using std::string; -using std::wstring; -using std::vector; -using std::map; -using google_breakpad::HTTPUpload; -using google_breakpad::PDBModuleInfo; -using google_breakpad::PDBSourceLineWriter; -using google_breakpad::WindowsStringUtils; - -// Extracts the file version information for the given filename, -// as a string, for example, "1.2.3.4". Returns true on success. -static bool GetFileVersionString(const wchar_t *filename, wstring *version) { - DWORD handle; - DWORD version_size = GetFileVersionInfoSize(filename, &handle); - if (version_size < sizeof(VS_FIXEDFILEINFO)) { - return false; - } - - vector version_info(version_size); - if (!GetFileVersionInfo(filename, handle, version_size, &version_info[0])) { - return false; - } - - void *file_info_buffer = NULL; - unsigned int file_info_length; - if (!VerQueryValue(&version_info[0], L"\\", - &file_info_buffer, &file_info_length)) { - return false; - } - - // The maximum value of each version component is 65535 (0xffff), - // so the max length is 24, including the terminating null. - wchar_t ver_string[24]; - VS_FIXEDFILEINFO *file_info = - reinterpret_cast(file_info_buffer); - swprintf(ver_string, sizeof(ver_string) / sizeof(ver_string[0]), - L"%d.%d.%d.%d", - file_info->dwFileVersionMS >> 16, - file_info->dwFileVersionMS & 0xffff, - file_info->dwFileVersionLS >> 16, - file_info->dwFileVersionLS & 0xffff); - - // remove when VC++7.1 is no longer supported - ver_string[sizeof(ver_string) / sizeof(ver_string[0]) - 1] = L'\0'; - - *version = ver_string; - return true; -} - -// Creates a new temporary file and writes the symbol data from the given -// exe/dll file to it. Returns the path to the temp file in temp_file_path -// and information about the pdb in pdb_info. -static bool DumpSymbolsToTempFile(const wchar_t *file, - wstring *temp_file_path, - PDBModuleInfo *pdb_info) { - google_breakpad::PDBSourceLineWriter writer; - // Use EXE_FILE to get information out of the exe/dll in addition to the - // pdb. The name and version number of the exe/dll are of value, and - // there's no way to locate an exe/dll given a pdb. - if (!writer.Open(file, PDBSourceLineWriter::EXE_FILE)) { - return false; - } - - wchar_t temp_path[_MAX_PATH]; - if (GetTempPath(_MAX_PATH, temp_path) == 0) { - return false; - } - - wchar_t temp_filename[_MAX_PATH]; - if (GetTempFileName(temp_path, L"sym", 0, temp_filename) == 0) { - return false; - } - - FILE *temp_file = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (_wfopen_s(&temp_file, temp_filename, L"w") != 0) -#else // _MSC_VER >= 1400 - // _wfopen_s was introduced in MSVC8. Use _wfopen for earlier environments. - // Don't use it with MSVC8 and later, because it's deprecated. - if (!(temp_file = _wfopen(temp_filename, L"w"))) -#endif // _MSC_VER >= 1400 - { - return false; - } - - bool success = writer.WriteMap(temp_file); - fclose(temp_file); - if (!success) { - _wunlink(temp_filename); - return false; - } - - *temp_file_path = temp_filename; - - return writer.GetModuleInfo(pdb_info); -} - -void printUsageAndExit() { - wprintf(L"Usage: symupload [--timeout NN] \n\n"); - wprintf(L"Timeout is in milliseconds, or can be 0 to be unlimited\n\n"); - wprintf(L"Example:\n\n\tsymupload.exe --timeout 0 chrome.dll http://no.free.symbol.server.for.you\n"); - exit(0); -} -int wmain(int argc, wchar_t *argv[]) { - if ((argc != 3) && - (argc != 5)) { - printUsageAndExit(); - } - - const wchar_t *module, *url; - int timeout = -1; - if (argc == 3) { - module = argv[1]; - url = argv[2]; - } else { - // check for timeout flag - if (!wcscmp(L"--timeout", argv[1])) { - timeout = _wtoi(argv[2]); - module = argv[3]; - url = argv[4]; - } else { - printUsageAndExit(); - } - } - - wstring symbol_file; - PDBModuleInfo pdb_info; - if (!DumpSymbolsToTempFile(module, &symbol_file, &pdb_info)) { - fwprintf(stderr, L"Could not get symbol data from %s\n", module); - return 1; - } - - wstring code_file = WindowsStringUtils::GetBaseName(wstring(module)); - - map parameters; - parameters[L"code_file"] = code_file; - parameters[L"debug_file"] = pdb_info.debug_file; - parameters[L"debug_identifier"] = pdb_info.debug_identifier; - parameters[L"os"] = L"windows"; // This version of symupload is Windows-only - parameters[L"cpu"] = pdb_info.cpu; - - // Don't make a missing version a hard error. Issue a warning, and let the - // server decide whether to reject files without versions. - wstring file_version; - if (GetFileVersionString(module, &file_version)) { - parameters[L"version"] = file_version; - } else { - fwprintf(stderr, L"Warning: Could not get file version for %s\n", module); - } - - bool success = HTTPUpload::SendRequest(url, parameters, - symbol_file, L"symbol_file", - timeout == -1 ? NULL : &timeout, - NULL, NULL); - _wunlink(symbol_file.c_str()); - - if (!success) { - fwprintf(stderr, L"Symbol file upload failed\n"); - return 1; - } - - wprintf(L"Uploaded symbols for windows-%s/%s/%s (%s %s)\n", - pdb_info.cpu.c_str(), pdb_info.debug_file.c_str(), - pdb_info.debug_identifier.c_str(), code_file.c_str(), - file_version.c_str()); - return 0; -} diff --git a/thirdparty/google-breakpad/google-breakpad.pro b/thirdparty/google-breakpad/google-breakpad.pro deleted file mode 100644 index d0c6ffb3..00000000 --- a/thirdparty/google-breakpad/google-breakpad.pro +++ /dev/null @@ -1,317 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Fri Mar 13 16:41:05 2009 -###################################################################### - -TEMPLATE = lib -CONFIG += staticlib debug_and_release - -BUILD_DIR = build -CONFIG(debug, debug|release) { - BUILD_DIR = $$BUILD_DIR/debug - mac: TARGET = $$join(TARGET,,,_debug) - win32: TARGET = $$join(TARGET,,d) -} -CONFIG(release, debug|release) { - BUILD_DIR = $$BUILD_DIR/release - CONFIG += warn_off -} - -BREAKPAD_DIR = "$$[UNIBOARD_DIR]/thirdparty/google-breakpad/google-breakpad-r786" -headersHandlerMac.path = "$$BREAKPAD_DIR/include/google_breakpad/client/mac/handler" -headersHandlerMac.files = "src/client/mac/handler/*.h" - -headersHandlerWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/handler" -headersHandlerWin.files = "src/client/windows/handler/*.h" - -headersClient.path = "$$BREAKPAD_DIR/include/google_breakpad/client" -headersClient.files = "src/client/*.h" - -headersClientCommonWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/common" -headersClientCommonWin.files = "src/client/windows/common/*.h" - -headersClientCrashGenerationWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/crash_generation" -headersClientCrashGenerationWin.files = "src/client/windows/crash_generation/*.h" - -headersClientSenderWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/sender" -headersClientSenderWin.files = "src/client/windows/sender/*.h" - -headersCommon.path = "$$BREAKPAD_DIR/include/google_breakpad/common" -headersCommon.files = "src/common/*.h" - -headersCommonWin.path = "$$BREAKPAD_DIR/include/google_breakpad/common/windows" -headersCommonWin.files = "src/common/windows/*.h" - -headersGbCommon.path = "$$BREAKPAD_DIR/include/google_breakpad/google_breakpad/common" -headersGbCommon.files = "src/google_breakpad/common/*.h" - -headersGbProcessor.path = "$$BREAKPAD_DIR/include/google_breakpad/google_breakpad/processor" -headersGbProcessor.files = "src/google_breakpad/processor/*.h" - -headersProcessor.path = "$$BREAKPAD_DIR/include/google_breakpad/processor" -headersProcessor.files = "src/processor/*.h" - -INSTALLS += "headersHandlerMac" "headersHandlerWin" "headersClient" "headersClientCommonWin" "headersCommonWin"\ -"headersClientCrashGenerationWin" "headersClientSenderWin" "headersCommon" "headersGbCommon" "headersGbProcessor" "headersProcessor" - -GOOGLE_BREAKPAD_PATH=google-breakpad-r786 - - -INCLUDEPATH += $$GOOGLE_BREAKPAD_PATH/src \ - $$GOOGLE_BREAKPAD_PATH/src/client \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common \ - $$GOOGLE_BREAKPAD_PATH/src/common \ - $$GOOGLE_BREAKPAD_PATH/src/processor \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor - -# Input -HEADERS += $$GOOGLE_BREAKPAD_PATH/src/client/minidump_file_writer-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/minidump_file_writer.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/convert_UTF.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/md5.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/string_conversion.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/address_map-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/address_map.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/basic_code_module.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/basic_code_modules.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/contained_range_map-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/contained_range_map.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/linked_ptr.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/logging.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/pathname_stripper.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/postfix_evaluator-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/postfix_evaluator.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/range_map-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/range_map.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/scoped_ptr.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/simple_symbol_supplier.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_amd64.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_ppc.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_sparc.h \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_x86.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/breakpad_types.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_cpu_amd64.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_cpu_ppc.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_cpu_ppc64.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_cpu_sparc.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_cpu_x86.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_exception_linux.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_exception_mac.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_exception_solaris.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_exception_win32.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_format.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/common/minidump_size.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/basic_source_line_resolver.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/call_stack.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/code_module.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/code_modules.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/memory_region.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/minidump.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/minidump_processor.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/process_state.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/source_line_resolver_interface.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/stack_frame.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/stack_frame_cpu.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/stackwalker.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/symbol_supplier.h \ - $$GOOGLE_BREAKPAD_PATH/src/google_breakpad/processor/system_info.h - - -win32 { - - DESTDIR = "lib/win32" - OBJECTS_DIR = $$BUILD_DIR/objects - MOC_DIR = $$BUILD_DIR/moc - RCC_DIR = $$BUILD_DIR/rcc - UI_DIR = $$BUILD_DIR/ui - - INCLUDEPATH += "C:\Program Files\Microsoft Visual Studio 9.0\DIA SDK\include" - - HEADERS += $$GOOGLE_BREAKPAD_PATH/src/common/windows/guid_string.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/http_upload.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/pdb_source_line_writer.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/string_utils-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/common/auto_critical_section.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/common/ipc_protocol.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/client_info.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/crash_generation_client.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/crash_generation_server.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/minidump_generator.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/handler/exception_handler.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/sender/crash_report_sender.h \ - $$GOOGLE_BREAKPAD_PATH/src/tools/windows/converter/ms_symbol_server_converter.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/tests/crash_generation_app/abstract_class.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/tests/crash_generation_app/crash_generation_app.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/tests/crash_generation_app/precompile.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/tests/crash_generation_app/resource.h - - SOURCES += $$GOOGLE_BREAKPAD_PATH/src/common/windows/guid_string.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/http_upload.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/pdb_source_line_writer.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/windows/string_utils.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/client_info.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/crash_generation_client.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/crash_generation_server.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/crash_generation/minidump_generator.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/handler/exception_handler.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/windows/sender/crash_report_sender.cc \ - $$GOOGLE_BREAKPAD_PATH/src/tools/windows/dump_syms/dump_syms.cc \ - $$GOOGLE_BREAKPAD_PATH/src/tools/windows/symupload/symupload.cc -} - -macx { - - DESTDIR = "lib/macx" - OBJECTS_DIR = $$BUILD_DIR - - CONFIG += x86 ppc - QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.4" - - INCLUDEPATH += $$GOOGLE_BREAKPAD_PATH/src/common/mac \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf - - HEADERS += $$GOOGLE_BREAKPAD_PATH/src/common/mac/dump_syms.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/file_id.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/HTTPMultipartUpload.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_id.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_utilities.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_walker.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/string_utilities.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/breakpad_exc_server.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/breakpad_nlist_64.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/dynamic_images.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/exception_handler.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/minidump_generator.h \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/protected_memory_allocator.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/bytereader-inl.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/bytereader.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/dwarf2enums.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/dwarf2reader.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/functioninfo.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/line_state_machine.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/types.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/GTMDefines.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMShading.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugSelectorValidation.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGarbageCollection.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPFetcher.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjectSingleton.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMProgressMonitorInputStream.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimer.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/PluginID.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/PluginID.h \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/PluginID.h - - SOURCES += $$GOOGLE_BREAKPAD_PATH/src/common/convert_UTF.c \ - $$GOOGLE_BREAKPAD_PATH/src/common/md5.c \ - $$GOOGLE_BREAKPAD_PATH/src/common/string_conversion.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/minidump_file_writer.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/minidump_file_writer_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/address_map_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/basic_code_modules.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/basic_source_line_resolver.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/basic_source_line_resolver_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/call_stack.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/contained_range_map_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/logging.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/minidump.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/minidump_dump.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/minidump_processor.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/minidump_processor_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/minidump_stackwalk.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/pathname_stripper.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/pathname_stripper_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/postfix_evaluator_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/process_state.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/range_map_unittest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/simple_symbol_supplier.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_amd64.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_ppc.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_selftest.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_sparc.cc \ - $$GOOGLE_BREAKPAD_PATH/src/processor/stackwalker_x86.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/file_id.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_id.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_utilities.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/macho_walker.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/string_utilities.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/breakpad_exc_server.c \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/breakpad_nlist_64.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/dynamic_images.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/exception_handler.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/exception_handler_test.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/minidump_generator.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/minidump_generator_test.cc \ - $$GOOGLE_BREAKPAD_PATH/src/client/mac/handler/protected_memory_allocator.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/bytereader.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/dwarf2reader.cc \ - $$GOOGLE_BREAKPAD_PATH/src/common/mac/dwarf/functioninfo.cc -} - diff --git a/thirdparty/google-breakpad/r318/bin/macx/dump_syms b/thirdparty/google-breakpad/r318/bin/macx/dump_syms deleted file mode 100755 index bc667697..00000000 Binary files a/thirdparty/google-breakpad/r318/bin/macx/dump_syms and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/bin/win32/dump_syms.exe b/thirdparty/google-breakpad/r318/bin/win32/dump_syms.exe deleted file mode 100644 index 79e1b7f7..00000000 Binary files a/thirdparty/google-breakpad/r318/bin/win32/dump_syms.exe and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/breakpad.pro b/thirdparty/google-breakpad/r318/breakpad.pro deleted file mode 100644 index 8e1810a6..00000000 --- a/thirdparty/google-breakpad/r318/breakpad.pro +++ /dev/null @@ -1,315 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Fri Mar 13 16:41:05 2009 -###################################################################### - -TEMPLATE = lib -CONFIG += staticlib debug_and_release - -BUILD_DIR = build -CONFIG(debug, debug|release) { - BUILD_DIR = $$BUILD_DIR/debug - mac: TARGET = $$join(TARGET,,,_debug) - win32: TARGET = $$join(TARGET,,d) -} -CONFIG(release, debug|release) { - BUILD_DIR = $$BUILD_DIR/release - CONFIG += warn_off -} - -BREAKPAD_DIR = "$$[UNIBOARD_DIR]/thirdparty/google-breakpad/r318" -headersHandlerMac.path = "$$BREAKPAD_DIR/include/google_breakpad/client/mac/handler" -headersHandlerMac.files = "src/client/mac/handler/*.h" - -headersHandlerWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/handler" -headersHandlerWin.files = "src/client/windows/handler/*.h" - -headersClient.path = "$$BREAKPAD_DIR/include/google_breakpad/client" -headersClient.files = "src/client/*.h" - -headersClientCommonWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/common" -headersClientCommonWin.files = "src/client/windows/common/*.h" - -headersClientCrashGenerationWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/crash_generation" -headersClientCrashGenerationWin.files = "src/client/windows/crash_generation/*.h" - -headersClientSenderWin.path = "$$BREAKPAD_DIR/include/google_breakpad/client/windows/sender" -headersClientSenderWin.files = "src/client/windows/sender/*.h" - -headersCommon.path = "$$BREAKPAD_DIR/include/google_breakpad/common" -headersCommon.files = "src/common/*.h" - -headersCommonWin.path = "$$BREAKPAD_DIR/include/google_breakpad/common/windows" -headersCommonWin.files = "src/common/windows/*.h" - -headersGbCommon.path = "$$BREAKPAD_DIR/include/google_breakpad/google_breakpad/common" -headersGbCommon.files = "src/google_breakpad/common/*.h" - -headersGbProcessor.path = "$$BREAKPAD_DIR/include/google_breakpad/google_breakpad/processor" -headersGbProcessor.files = "src/google_breakpad/processor/*.h" - -headersProcessor.path = "$$BREAKPAD_DIR/include/google_breakpad/processor" -headersProcessor.files = "src/processor/*.h" - -INSTALLS += "headersHandlerMac" "headersHandlerWin" "headersClient" "headersClientCommonWin" "headersCommonWin"\ - "headersClientCrashGenerationWin" "headersClientSenderWin" "headersCommon" "headersGbCommon" "headersGbProcessor" "headersProcessor" - -INCLUDEPATH += src \ - src/client \ - src/google_breakpad/common \ - src/common \ - src/processor \ - src/google_breakpad/processor - -# Input -HEADERS += src/client/minidump_file_writer-inl.h \ - src/client/minidump_file_writer.h \ - src/common/convert_UTF.h \ - src/common/md5.h \ - src/common/string_conversion.h \ - src/processor/address_map-inl.h \ - src/processor/address_map.h \ - src/processor/basic_code_module.h \ - src/processor/basic_code_modules.h \ - src/processor/contained_range_map-inl.h \ - src/processor/contained_range_map.h \ - src/processor/linked_ptr.h \ - src/processor/logging.h \ - src/processor/pathname_stripper.h \ - src/processor/postfix_evaluator-inl.h \ - src/processor/postfix_evaluator.h \ - src/processor/range_map-inl.h \ - src/processor/range_map.h \ - src/processor/scoped_ptr.h \ - src/processor/simple_symbol_supplier.h \ - src/processor/stack_frame_info.h \ - src/processor/stackwalker_amd64.h \ - src/processor/stackwalker_ppc.h \ - src/processor/stackwalker_sparc.h \ - src/processor/stackwalker_x86.h \ - src/google_breakpad/common/breakpad_types.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_size.h \ - src/google_breakpad/processor/basic_source_line_resolver.h \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/minidump.h \ - src/google_breakpad/processor/minidump_processor.h \ - src/google_breakpad/processor/process_state.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/processor/stack_frame.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stackwalker.h \ - src/google_breakpad/processor/symbol_supplier.h \ - src/google_breakpad/processor/system_info.h - - -win32 { - - DESTDIR = "lib/win32" - OBJECTS_DIR = $$BUILD_DIR/objects - MOC_DIR = $$BUILD_DIR/moc - RCC_DIR = $$BUILD_DIR/rcc - UI_DIR = $$BUILD_DIR/ui - - INCLUDEPATH += "C:\Program Files\Microsoft Visual Studio 9.0\DIA SDK\include" - - HEADERS += src/common/windows/guid_string.h \ - src/common/windows/http_upload.h \ - src/common/windows/pdb_source_line_writer.h \ - src/common/windows/string_utils-inl.h \ - src/client/windows/common/auto_critical_section.h \ - src/client/windows/common/ipc_protocol.h \ - src/client/windows/crash_generation/client_info.h \ - src/client/windows/crash_generation/crash_generation_client.h \ - src/client/windows/crash_generation/crash_generation_server.h \ - src/client/windows/crash_generation/minidump_generator.h \ - src/client/windows/handler/exception_handler.h \ - src/client/windows/sender/crash_report_sender.h \ - src/tools/windows/converter/ms_symbol_server_converter.h \ - src/client/windows/tests/crash_generation_app/abstract_class.h \ - src/client/windows/tests/crash_generation_app/crash_generation_app.h \ - src/client/windows/tests/crash_generation_app/precompile.h \ - src/client/windows/tests/crash_generation_app/resource.h - - SOURCES += src/common/windows/guid_string.cc \ - src/common/windows/http_upload.cc \ - src/common/windows/pdb_source_line_writer.cc \ - src/common/windows/string_utils.cc \ - src/client/windows/crash_generation/client_info.cc \ - src/client/windows/crash_generation/crash_generation_client.cc \ - src/client/windows/crash_generation/crash_generation_server.cc \ - src/client/windows/crash_generation/minidump_generator.cc \ - src/client/windows/handler/exception_handler.cc \ - src/client/windows/sender/crash_report_sender.cc \ - src/tools/windows/dump_syms/dump_syms.cc \ - src/tools/windows/symupload/symupload.cc -} - -macx { - - DESTDIR = "lib/macx" - OBJECTS_DIR = $$BUILD_DIR - - CONFIG += x86 ppc - QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.4" - - INCLUDEPATH += src/common/mac \ - src/client/mac/handler \ - src/common/mac/dwarf - - HEADERS += src/common/mac/dump_syms.h \ - src/common/mac/file_id.h \ - src/common/mac/HTTPMultipartUpload.h \ - src/common/mac/macho_id.h \ - src/common/mac/macho_utilities.h \ - src/common/mac/macho_walker.h \ - src/common/mac/string_utilities.h \ - src/client/mac/handler/breakpad_exc_server.h \ - src/client/mac/handler/breakpad_nlist_64.h \ - src/client/mac/handler/dynamic_images.h \ - src/client/mac/handler/exception_handler.h \ - src/client/mac/handler/minidump_generator.h \ - src/client/mac/handler/protected_memory_allocator.h \ - src/common/mac/dwarf/bytereader-inl.h \ - src/common/mac/dwarf/bytereader.h \ - src/common/mac/dwarf/dwarf2enums.h \ - src/common/mac/dwarf/dwarf2reader.h \ - src/common/mac/dwarf/functioninfo.h \ - src/common/mac/dwarf/line_state_machine.h \ - src/common/mac/dwarf/types.h \ - src/common/mac/externals/google-toolbox-for-mac/GTMDefines.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMShading.h \ - src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.h \ - src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugSelectorValidation.h \ - src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.h \ - src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGarbageCollection.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPFetcher.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjectSingleton.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMProgressMonitorInputStream.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.h \ - src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.h \ - src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.h \ - src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimer.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.h \ - src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.h \ - src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/PluginID.h \ - src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/PluginID.h \ - src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/PluginID.h - - SOURCES += src/common/convert_UTF.c \ - src/common/md5.c \ - src/common/string_conversion.cc \ - src/client/minidump_file_writer.cc \ - src/client/minidump_file_writer_unittest.cc \ - src/processor/address_map_unittest.cc \ - src/processor/basic_code_modules.cc \ - src/processor/basic_source_line_resolver.cc \ - src/processor/basic_source_line_resolver_unittest.cc \ - src/processor/call_stack.cc \ - src/processor/contained_range_map_unittest.cc \ - src/processor/logging.cc \ - src/processor/minidump.cc \ - src/processor/minidump_dump.cc \ - src/processor/minidump_processor.cc \ - src/processor/minidump_processor_unittest.cc \ - src/processor/minidump_stackwalk.cc \ - src/processor/pathname_stripper.cc \ - src/processor/pathname_stripper_unittest.cc \ - src/processor/postfix_evaluator_unittest.cc \ - src/processor/process_state.cc \ - src/processor/range_map_unittest.cc \ - src/processor/simple_symbol_supplier.cc \ - src/processor/stackwalker.cc \ - src/processor/stackwalker_amd64.cc \ - src/processor/stackwalker_ppc.cc \ - src/processor/stackwalker_selftest.cc \ - src/processor/stackwalker_sparc.cc \ - src/processor/stackwalker_x86.cc \ - src/common/mac/file_id.cc \ - src/common/mac/macho_id.cc \ - src/common/mac/macho_utilities.cc \ - src/common/mac/macho_walker.cc \ - src/common/mac/string_utilities.cc \ - src/client/mac/handler/breakpad_exc_server.c \ - src/client/mac/handler/breakpad_nlist_64.cc \ - src/client/mac/handler/dynamic_images.cc \ - src/client/mac/handler/exception_handler.cc \ - src/client/mac/handler/exception_handler_test.cc \ - src/client/mac/handler/minidump_generator.cc \ - src/client/mac/handler/minidump_generator_test.cc \ - src/client/mac/handler/protected_memory_allocator.cc \ - src/common/mac/dwarf/bytereader.cc \ - src/common/mac/dwarf/dwarf2reader.cc \ - src/common/mac/dwarf/functioninfo.cc -} - diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_exc_server.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_exc_server.h deleted file mode 100644 index c05f25a8..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_exc_server.h +++ /dev/null @@ -1,258 +0,0 @@ -#ifndef _exc_user_ -#define _exc_user_ - -/* Module exc */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef exc_MSG_COUNT -#define exc_MSG_COUNT 3 -#endif /* exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include -__BEGIN_DECLS - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__exc_subsystem__defined -#define __RequestUnion__exc_subsystem__defined -union __RequestUnion__exc_subsystem { - __Request__exception_raise_t Request_exception_raise; - __Request__exception_raise_state_t Request_exception_raise_state; - __Request__exception_raise_state_identity_t Request_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__exc_subsystem__defined -#define __ReplyUnion__exc_subsystem__defined -union __ReplyUnion__exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_exc -#define subsystem_to_name_map_exc \ - { "exception_raise", 2401 },\ - { "exception_raise_state", 2402 },\ - { "exception_raise_state_identity", 2403 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _exc_user_ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_nlist_64.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_nlist_64.h deleted file mode 100644 index ee10afb9..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/breakpad_nlist_64.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// breakpad_nlist.h -// -// This file is meant to provide a header for clients of the modified -// nlist function implemented to work on 64-bit. - -#ifndef CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ - -typedef struct nlist_64 breakpad_nlist; - -int -breakpad_nlist_64(const char *name, - breakpad_nlist *list, - const char **symbolNames); - -#endif /* CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/dynamic_images.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/dynamic_images.h deleted file mode 100644 index 85ba8cf9..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/dynamic_images.h +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dynamic_images.h -// -// Implements most of the function of the dyld API, but allowing an -// arbitrary task to be introspected, unlike the dyld API which -// only allows operation on the current task. The current implementation -// is limited to use by 32-bit tasks. - -#ifndef CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ -#define CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ - -#include -#include -#include -#include -#include - -namespace google_breakpad { - -using std::vector; - -//============================================================================== -// The memory layout of this struct matches the dyld_image_info struct -// defined in "dyld_gdb.h" in the darwin source. -typedef struct dyld_image_info { - struct mach_header *load_address_; - char *file_path_; - uintptr_t file_mod_date_; -} dyld_image_info; - -//============================================================================== -// This is as defined in "dyld_gdb.h" in the darwin source. -// _dyld_all_image_infos (in dyld) is a structure of this type -// which will be used to determine which dynamic code has been loaded. -typedef struct dyld_all_image_infos { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - const struct dyld_image_info *infoArray; - void* notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos; - -// some typedefs to isolate 64/32 bit differences -#ifdef __LP64__ -typedef mach_header_64 breakpad_mach_header; -typedef segment_command_64 breakpad_mach_segment_command; -#else -typedef mach_header breakpad_mach_header; -typedef segment_command breakpad_mach_segment_command; -#endif - -//============================================================================== -// A simple wrapper for a mach_header -// -// This could be fleshed out with some more interesting methods. -class MachHeader { - public: - explicit MachHeader(const breakpad_mach_header &header) : header_(header) {} - - void Print() { - printf("magic\t\t: %4x\n", header_.magic); - printf("cputype\t\t: %d\n", header_.cputype); - printf("cpusubtype\t: %d\n", header_.cpusubtype); - printf("filetype\t: %d\n", header_.filetype); - printf("ncmds\t\t: %d\n", header_.ncmds); - printf("sizeofcmds\t: %d\n", header_.sizeofcmds); - printf("flags\t\t: %d\n", header_.flags); - } - - breakpad_mach_header header_; -}; - -//============================================================================== -// Represents a single dynamically loaded mach-o image -class DynamicImage { - public: - DynamicImage(breakpad_mach_header *header, // we take ownership - int header_size, // includes load commands - breakpad_mach_header *load_address, - char *inFilePath, - uintptr_t image_mod_date, - mach_port_t task) - : header_(header), - header_size_(header_size), - load_address_(load_address), - file_mod_date_(image_mod_date), - task_(task) { - InitializeFilePath(inFilePath); - CalculateMemoryAndVersionInfo(); - } - - ~DynamicImage() { - if (file_path_) { - free(file_path_); - } - free(header_); - } - - // Returns pointer to a local copy of the mach_header plus load commands - breakpad_mach_header *GetMachHeader() {return header_;} - - // Size of mach_header plus load commands - int GetHeaderSize() const {return header_size_;} - - // Full path to mach-o binary - char *GetFilePath() {return file_path_;} - - uintptr_t GetModDate() const {return file_mod_date_;} - - // Actual address where the image was loaded - breakpad_mach_header *GetLoadAddress() const {return load_address_;} - - // Address where the image should be loaded - mach_vm_address_t GetVMAddr() const {return vmaddr_;} - - // Difference between GetLoadAddress() and GetVMAddr() - ptrdiff_t GetVMAddrSlide() const {return slide_;} - - // Size of the image - mach_vm_size_t GetVMSize() const {return vmsize_;} - - // Task owning this loaded image - mach_port_t GetTask() {return task_;} - - uint32_t GetVersion() {return version_;} - // For sorting - bool operator<(const DynamicImage &inInfo) { - return GetLoadAddress() < inInfo.GetLoadAddress(); - } - - // Debugging - void Print(); - - private: - friend class DynamicImages; - - // Sanity checking - bool IsValid() {return GetVMSize() != 0;} - - // Makes local copy of file path to mach-o binary - void InitializeFilePath(char *inFilePath) { - if (inFilePath) { - size_t path_size = 1 + strlen(inFilePath); - file_path_ = reinterpret_cast(malloc(path_size)); - strlcpy(file_path_, inFilePath, path_size); - } else { - file_path_ = NULL; - } - } - - // Initializes vmaddr_, vmsize_, and slide_ - void CalculateMemoryAndVersionInfo(); - - breakpad_mach_header *header_; // our local copy of the header - int header_size_; // mach_header plus load commands - breakpad_mach_header *load_address_; // base address image is mapped into - mach_vm_address_t vmaddr_; - mach_vm_size_t vmsize_; - ptrdiff_t slide_; - uint32_t version_; // Dylib version - char *file_path_; // path dyld used to load the image - uintptr_t file_mod_date_; // time_t of image file - - mach_port_t task_; -}; - -//============================================================================== -// DynamicImageRef is just a simple wrapper for a pointer to -// DynamicImage. The reason we use it instead of a simple typedef is so -// that we can use stl::sort() on a vector of DynamicImageRefs -// and simple class pointers can't implement operator<(). -// -class DynamicImageRef { - public: - explicit DynamicImageRef(DynamicImage *inP) : p(inP) {} - // The copy constructor is required by STL - DynamicImageRef(const DynamicImageRef &inRef) : p(inRef.p) {} - - bool operator<(const DynamicImageRef &inRef) const { - return (*const_cast(this)->p) - < (*const_cast(inRef).p); - } - - bool operator==(const DynamicImageRef &inInfo) const { - return (*const_cast(this)->p).GetLoadAddress() == - (*const_cast(inInfo)).GetLoadAddress(); - } - - // Be just like DynamicImage* - DynamicImage *operator->() {return p;} - operator DynamicImage*() {return p;} - - private: - DynamicImage *p; -}; - -//============================================================================== -// An object of type DynamicImages may be created to allow introspection of -// an arbitrary task's dynamically loaded mach-o binaries. This makes the -// assumption that the current task has send rights to the target task. -class DynamicImages { - public: - explicit DynamicImages(mach_port_t task); - - ~DynamicImages() { - for (int i = 0; i < (int)image_list_.size(); ++i) { - delete image_list_[i]; - } - } - - // Returns the number of dynamically loaded mach-o images. - int GetImageCount() const {return image_list_.size();} - - // Returns an individual image. - DynamicImage *GetImage(int i) { - if (i < (int)image_list_.size()) { - return image_list_[i]; - } - return NULL; - } - - // Returns the image corresponding to the main executable. - DynamicImage *GetExecutableImage(); - int GetExecutableImageIndex(); - - // Returns the task which we're looking at. - mach_port_t GetTask() const {return task_;} - - // Debugging - void Print() { - for (int i = 0; i < (int)image_list_.size(); ++i) { - image_list_[i]->Print(); - } - } - - void TestPrint() { - const breakpad_mach_header *header; - for (int i = 0; i < (int)image_list_.size(); ++i) { - printf("dyld: %p: name = %s\n", _dyld_get_image_header(i), - _dyld_get_image_name(i) ); - - const void *imageHeader = _dyld_get_image_header(i); - header = reinterpret_cast(imageHeader); - - MachHeader(*header).Print(); - } - } - - private: - bool IsOurTask() {return task_ == mach_task_self();} - - // Initialization - void ReadImageInfoForTask(); - void* GetDyldAllImageInfosPointer(); - - mach_port_t task_; - vector image_list_; -}; - -// Returns a malloced block containing the contents of memory at a particular -// location in another task. -void* ReadTaskMemory(task_port_t target_task, - const void* address, - size_t len, - kern_return_t *kr); - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/exception_handler.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/exception_handler.h deleted file mode 100644 index 2a8ee1e4..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/exception_handler.h +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exception_handler.h: MacOS exception handler -// This class can install a Mach exception port handler to trap most common -// programming errors. If an exception occurs, a minidump file will be -// generated which contains detailed information about the process and the -// exception. - -#ifndef CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ - -#include - -#include - -namespace google_breakpad { - -using std::string; - -struct ExceptionParameters; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // |minidump_id| is a unique id for the dump, so the minidump - // file is /.dmp. - // |context| is the value passed into the constructor. - // |succeeded| indicates whether a minidump file was successfully written. - // Return true if the exception was fully handled and breakpad should exit. - // Return false to allow any other exception handlers to process the - // exception. - typedef bool (*MinidumpCallback)(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded); - - // A callback function which will be called directly if an exception occurs. - // This bypasses the minidump file writing and simply gives the client - // the exception information. - typedef bool (*DirectCallback)( void *context, - int exception_type, - int exception_code, - mach_port_t thread_name); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Minidump files will be written to dump_path, and the optional callback - // is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, bool install_handler); - - // A special constructor if we want to bypass minidump writing and - // simply get a callback with the exception information. - ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler); - - ~ExceptionHandler(); - - // Get and set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, MinidumpCallback callback, - void *callback_context); - - private: - // Install the mach exception handler - bool InstallHandler(); - - // Uninstall the mach exception handler (if any) - bool UninstallHandler(bool in_exception); - - // Setup the handler thread, and if |install_handler| is true, install the - // mach exception port handler - bool Setup(bool install_handler); - - // Uninstall the mach exception handler (if any) and terminate the helper - // thread - bool Teardown(); - - // Send an "empty" mach message to the exception handler. Return true on - // success, false otherwise - bool SendEmptyMachMessage(); - - // All minidump writing goes through this one routine - bool WriteMinidumpWithException(int exception_type, int exception_code, - mach_port_t thread_name); - - // When installed, this static function will be call from a newly created - // pthread with |this| as the argument - static void *WaitForMessage(void *exception_handler_class); - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - // These functions will suspend/resume all threads except for the - // reporting thread - bool SuspendThreads(); - bool ResumeThreads(); - - // The destination directory for the minidump - string dump_path_; - - // The basename of the next minidump w/o extension - string next_minidump_id_; - - // The full path to the next minidump to be written, including extension - string next_minidump_path_; - - // Pointers to the UTF-8 versions of above - const char *dump_path_c_; - const char *next_minidump_id_c_; - const char *next_minidump_path_c_; - - // The callback function and pointer to be passed back after the minidump - // has been written - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The callback function to be passed back when we don't want a minidump - // file to be written - DirectCallback directCallback_; - - // The thread that is created for the handler - pthread_t handler_thread_; - - // The port that is waiting on an exception message to be sent, if the - // handler is installed - mach_port_t handler_port_; - - // These variables save the previous exception handler's data so that it - // can be re-installed when this handler is uninstalled - ExceptionParameters *previous_; - - // True, if we've installed the exception handler - bool installed_exception_handler_; - - // True, if we're in the process of uninstalling the exception handler and - // the thread. - bool is_in_teardown_; - - // Save the last result of the last minidump - bool last_minidump_write_result_; - - // A mutex for use when writing out a minidump that was requested on a - // thread other than the exception handler. - pthread_mutex_t minidump_write_mutex_; - - // True, if we're using the mutext to indicate when mindump writing occurs - bool use_minidump_write_mutex_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/minidump_generator.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/minidump_generator.h deleted file mode 100644 index 0d3424c3..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/minidump_generator.h +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator.h: Create a minidump of the current MacOS process. - -#ifndef CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ -#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ - -#include - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_format.h" -#include "common/mac/macho_utilities.h" - -#include "dynamic_images.h" - -namespace google_breakpad { - -using std::string; - -#if TARGET_CPU_X86_64 || TARGET_CPU_PPC64 -#define TOP_OF_THREAD0_STACK 0x00007fff5fbff000 -#else -#define TOP_OF_THREAD0_STACK 0xbffff000 -#endif - -#if TARGET_CPU_X86_64 -typedef x86_thread_state64_t breakpad_thread_state_t; -typedef MDRawContextAMD64 MinidumpContext; -#elif TARGET_CPU_X86 -typedef i386_thread_state_t breakpad_thread_state_t; -typedef MDRawContextX86 MinidumpContext; -#elif TARGET_CPU_PPC64 -typedef ppc_thread_state64_t breakpad_thread_state_t; -typedef MDRawContextPPC64 MinidumpContext; -#elif TARGET_CPU_PPC -typedef ppc_thread_state_t breakpad_thread_state_t; -typedef MDRawContextPPC MinidumpContext; -#endif - -// Creates a minidump file of the current process. If there is exception data, -// use SetExceptionInformation() to add this to the minidump. The minidump -// file is generated by the Write() function. -// Usage: -// MinidumpGenerator minidump(); -// minidump.Write("/tmp/minidump"); -// -class MinidumpGenerator { - public: - MinidumpGenerator(); - MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread); - - ~MinidumpGenerator(); - - // Return

/.dmp - // Sets |unique_name| (if requested) to the unique name for the minidump - static string UniqueNameInDirectory(const string &dir, string *unique_name); - - // Write out the minidump into |path| - // All of the components of |path| must exist and be writable - // Return true if successful, false otherwise - bool Write(const char *path); - - // Specify some exception information, if applicable - void SetExceptionInformation(int type, int code, mach_port_t thread_name) { - exception_type_ = type; - exception_code_ = code; - exception_thread_ = thread_name; - } - - // Gather system information. This should be call at least once before using - // the MinidumpGenerator class. - static void GatherSystemInformation(); - - private: - typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *); - - // Stream writers - bool WriteThreadListStream(MDRawDirectory *thread_list_stream); - bool WriteExceptionStream(MDRawDirectory *exception_stream); - bool WriteSystemInfoStream(MDRawDirectory *system_info_stream); - bool WriteModuleListStream(MDRawDirectory *module_list_stream); - bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream); - bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); - - // Helpers - u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state); - bool WriteStackFromStartAddress(mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location); - bool WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread); - bool WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path); - bool WriteModuleStream(unsigned int index, MDRawModule *module); - - size_t CalculateStackSize(mach_vm_address_t start_addr); - - int FindExecutableModule(); - - // disallow copy ctor and operator= - explicit MinidumpGenerator(const MinidumpGenerator &); - void operator=(const MinidumpGenerator &); - - // Use this writer to put the data to disk - MinidumpFileWriter writer_; - - // Exception information - int exception_type_; - int exception_code_; - mach_port_t exception_thread_; - mach_port_t crashing_task_; - mach_port_t handler_thread_; - - // System information - static char build_string_[16]; - static int os_major_version_; - static int os_minor_version_; - static int os_build_number_; - - // Information about dynamically loaded code - DynamicImages *dynamic_images_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/protected_memory_allocator.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/protected_memory_allocator.h deleted file mode 100644 index ed4f51d5..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/mac/handler/protected_memory_allocator.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// ProtectedMemoryAllocator -// -// A very simple allocator class which allows allocation, but not deallocation. -// The allocations can be made read-only with the Protect() method. -// This class is NOT useful as a general-purpose memory allocation system, -// since it does not allow deallocation. It is useful to use for a group -// of allocations which are created in the same time-frame and destroyed -// in the same time-frame. It is useful for making allocations of memory -// which will not need to change often once initialized. This memory can then -// be protected from memory smashers by calling the Protect() method. - -#ifndef PROTECTED_MEMORY_ALLOCATOR_H__ -#define PROTECTED_MEMORY_ALLOCATOR_H__ - -#include - -// -class ProtectedMemoryAllocator { - public: - ProtectedMemoryAllocator(vm_size_t pool_size); - ~ProtectedMemoryAllocator(); - - // Returns a pointer to an allocation of size n within the pool. - // Fails by returning NULL is no more space is available. - // Please note that the pointers returned from this method should not - // be freed in any way (for example by calling free() on them ). - char * Allocate(size_t n); - - // Returns the base address of the allocation pool. - char * GetBaseAddress() { return (char*)base_address_; } - - // Returns the size of the allocation pool, including allocated - // plus free space. - vm_size_t GetTotalSize() { return pool_size_; } - - // Returns the number of bytes already allocated in the pool. - vm_size_t GetAllocatedSize() { return next_alloc_offset_; } - - // Returns the number of bytes available for allocation. - vm_size_t GetFreeSize() { return pool_size_ - next_alloc_offset_; } - - // Makes the entire allocation pool read-only including, of course, - // all allocations made from the pool. - kern_return_t Protect(); - - // Makes the entire allocation pool read/write. - kern_return_t Unprotect(); - - private: - vm_size_t pool_size_; - vm_address_t base_address_; - int next_alloc_offset_; - bool valid_; -}; - -#endif // PROTECTED_MEMORY_ALLOCATOR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer-inl.h deleted file mode 100644 index 7c556a27..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer-inl.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer-inl.h: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_size.h" - -namespace google_breakpad { - -template -inline bool TypedMDRVA::Allocate() { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size()); -} - -template -inline bool TypedMDRVA::Allocate(size_t additional) { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size() + additional); -} - -template -inline bool TypedMDRVA::AllocateArray(size_t count) { - assert(count); - allocation_state_ = ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() * count); -} - -template -inline bool TypedMDRVA::AllocateObjectAndArray(unsigned int count, - size_t size) { - assert(count && size); - allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() + count * size); -} - -template -inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { - assert(allocation_state_ == ARRAY); - return writer_->Copy(position_ + index * minidump_size::size(), item, - minidump_size::size()); -} - -template -inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, - const void *src, - size_t size) { - assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); - return writer_->Copy(position_ + minidump_size::size() + index * size, - src, size); -} - -template -inline bool TypedMDRVA::Flush() { - return writer_->Copy(position_, &data_, minidump_size::size()); -} - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer.h deleted file mode 100644 index f569a553..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/minidump_file_writer.h +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.h: Implements file-based minidump generation. It's -// intended to be used with the Google Breakpad open source crash handling -// project. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class UntypedMDRVA; -template class TypedMDRVA; - -// The user of this class can Open() a file and add minidump streams, data, and -// strings using the definitions in minidump_format.h. Since this class is -// expected to be used in a situation where the current process may be -// damaged, it will not allocate heap memory. -// Sample usage: -// MinidumpFileWriter writer; -// writer.Open("/tmp/minidump.dmp"); -// TypedMDRVA header(&writer_); -// header.Allocate(); -// header->get()->signature = MD_HEADER_SIGNATURE; -// : -// writer.Close(); -class MinidumpFileWriter { -public: - // Invalid MDRVA (Minidump Relative Virtual Address) - // returned on failed allocation - static const MDRVA kInvalidMDRVA; - - MinidumpFileWriter(); - ~MinidumpFileWriter(); - - // Open |path| as the destination of the minidump data. Any existing file - // will be overwritten. - // Return true on success, or false on failure - bool Open(const char *path); - - // Close the current file - // Return true on success, or false on failure - bool Close(); - - // Copy the contents of |str| to a MDString and write it to the file. - // |str| is expected to be either UTF-16 or UTF-32 depending on the size - // of wchar_t. - // Maximum |length| of characters to copy from |str|, or specify 0 to use the - // entire NULL terminated string. Copying will stop at the first NULL. - // |location| the allocated location - // Return true on success, or false on failure - bool WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location); - - // Same as above, except with |str| as a UTF-8 string - bool WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location); - - // Write |size| bytes starting at |src| into the current position. - // Return true on success and set |output| to position, or false on failure - bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output); - - // Copies |size| bytes from |src| to |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, ssize_t size); - - // Return the current position for writing to the minidump - inline MDRVA position() const { return position_; } - - private: - friend class UntypedMDRVA; - - // Allocates an area of |size| bytes. - // Returns the position of the allocation, or kInvalidMDRVA if it was - // unable to allocate the bytes. - MDRVA Allocate(size_t size); - - // The file descriptor for the output file - int file_; - - // Current position in buffer - MDRVA position_; - - // Current allocated size - size_t size_; - - // Copy |length| characters from |str| to |mdstring|. These are distinct - // because the underlying MDString is a UTF-16 based string. The wchar_t - // variant may need to create a MDString that has more characters than the - // source |str|, whereas the UTF-8 variant may coalesce characters to form - // a single UTF-16 character. - bool CopyStringToMDString(const wchar_t *str, unsigned int length, - TypedMDRVA *mdstring); - bool CopyStringToMDString(const char *str, unsigned int length, - TypedMDRVA *mdstring); - - // The common templated code for writing a string - template - bool WriteStringCore(const CharType *str, unsigned int length, - MDLocationDescriptor *location); -}; - -// Represents an untyped allocated chunk -class UntypedMDRVA { - public: - explicit UntypedMDRVA(MinidumpFileWriter *writer) - : writer_(writer), - position_(writer->position()), - size_(0) {} - - // Allocates |size| bytes. Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t size); - - // Returns the current position or kInvalidMDRVA if allocation failed - inline MDRVA position() const { return position_; } - - // Number of bytes allocated - inline size_t size() const { return size_; } - - // Return size and position - inline MDLocationDescriptor location() const { - MDLocationDescriptor location = { size_, position_ }; - return location; - } - - // Copy |size| bytes starting at |src| into the minidump at |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, size_t size); - - // Copy |size| bytes from |src| to the current position - inline bool Copy(const void *src, size_t size) { - return Copy(position_, src, size); - } - - protected: - // Writer we associate with - MinidumpFileWriter *writer_; - - // Position of the start of the data - MDRVA position_; - - // Allocated size - size_t size_; -}; - -// Represents a Minidump object chunk. Additional memory can be allocated at -// the end of the object as a: -// - single allocation -// - Array of MDType objects -// - A MDType object followed by an array -template -class TypedMDRVA : public UntypedMDRVA { - public: - // Constructs an unallocated MDRVA - explicit TypedMDRVA(MinidumpFileWriter *writer) - : UntypedMDRVA(writer), - data_(), - allocation_state_(UNALLOCATED) {} - - inline ~TypedMDRVA() { - // Ensure that the data_ object is written out - if (allocation_state_ != ARRAY) - Flush(); - } - - // Address of object data_ of MDType. This is not declared const as the - // typical usage will be to access the underlying |data_| object as to - // alter its contents. - MDType *get() { return &data_; } - - // Allocates minidump_size::size() bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(); - - // Allocates minidump_size::size() + |additional| bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t additional); - - // Allocate an array of |count| elements of MDType. - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateArray(size_t count); - - // Allocate an array of |count| elements of |size| after object of MDType - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateObjectAndArray(unsigned int count, size_t size); - - // Copy |item| to |index| - // Must have been allocated using AllocateArray(). - // Return true on success, or false on failure - bool CopyIndex(unsigned int index, MDType *item); - - // Copy |size| bytes starting at |str| to |index| - // Must have been allocated using AllocateObjectAndArray(). - // Return true on success, or false on failure - bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); - - // Write data_ - bool Flush(); - - private: - enum AllocationState { - UNALLOCATED = 0, - SINGLE_OBJECT, - ARRAY, - SINGLE_OBJECT_WITH_ARRAY - }; - - MDType data_; - AllocationState allocation_state_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/auto_critical_section.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/auto_critical_section.h deleted file mode 100644 index 82c7b7f1..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/auto_critical_section.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ -#define CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ - -#include - -namespace google_breakpad { - -// Automatically enters the critical section in the constructor and leaves -// the critical section in the destructor. -class AutoCriticalSection { - public: - // Creates a new instance with the given critical section object - // and enters the critical section immediately. - explicit AutoCriticalSection(CRITICAL_SECTION* cs) : cs_(cs) { - assert(cs_); - EnterCriticalSection(cs_); - } - - // Destructor: leaves the critical section. - ~AutoCriticalSection() { - LeaveCriticalSection(cs_); - } - - private: - // Disable copy ctor and operator=. - AutoCriticalSection(const AutoCriticalSection&); - AutoCriticalSection& operator=(const AutoCriticalSection&); - - CRITICAL_SECTION* cs_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/ipc_protocol.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/ipc_protocol.h deleted file mode 100644 index cba8699c..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/common/ipc_protocol.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ -#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ - -#include -#include -#include -#include -#include "common/windows/string_utils-inl.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Name/value pair for custom client information. -struct CustomInfoEntry { - // Maximum length for name and value for client custom info. - static const int kNameMaxLength = 64; - static const int kValueMaxLength = 64; - - CustomInfoEntry() { - // Putting name and value in initializer list makes VC++ show warning 4351. - set_name(NULL); - set_value(NULL); - } - - CustomInfoEntry(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - void set_name(const wchar_t* name_arg) { - if (!name_arg) { - name[0] = L'\0'; - return; - } - WindowsStringUtils::safe_wcscpy(name, kNameMaxLength, name_arg); - } - - void set_value(const wchar_t* value_arg) { - if (!value_arg) { - value[0] = L'\0'; - return; - } - - WindowsStringUtils::safe_wcscpy(value, kValueMaxLength, value_arg); - } - - void set(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - wchar_t name[kNameMaxLength]; - wchar_t value[kValueMaxLength]; -}; - -// Constants for the protocol between client and the server. - -// Tags sent with each message indicating the purpose of -// the message. -enum MessageTag { - MESSAGE_TAG_NONE = 0, - MESSAGE_TAG_REGISTRATION_REQUEST = 1, - MESSAGE_TAG_REGISTRATION_RESPONSE = 2, - MESSAGE_TAG_REGISTRATION_ACK = 3 -}; - -struct CustomClientInfo { - const CustomInfoEntry* entries; - int count; -}; - -// Message structure for IPC between crash client and crash server. -struct ProtocolMessage { - ProtocolMessage() - : tag(MESSAGE_TAG_NONE), - pid(0), - dump_type(MiniDumpNormal), - thread_id(0), - exception_pointers(NULL), - assert_info(NULL), - custom_client_info(), - dump_request_handle(NULL), - dump_generated_handle(NULL), - server_alive_handle(NULL) { - } - - // Creates an instance with the given parameters. - ProtocolMessage(MessageTag arg_tag, - DWORD arg_pid, - MINIDUMP_TYPE arg_dump_type, - DWORD* arg_thread_id, - EXCEPTION_POINTERS** arg_exception_pointers, - MDRawAssertionInfo* arg_assert_info, - const CustomClientInfo& custom_info, - HANDLE arg_dump_request_handle, - HANDLE arg_dump_generated_handle, - HANDLE arg_server_alive) - : tag(arg_tag), - pid(arg_pid), - dump_type(arg_dump_type), - thread_id(arg_thread_id), - exception_pointers(arg_exception_pointers), - assert_info(arg_assert_info), - custom_client_info(custom_info), - dump_request_handle(arg_dump_request_handle), - dump_generated_handle(arg_dump_generated_handle), - server_alive_handle(arg_server_alive) { - } - - // Tag in the message. - MessageTag tag; - - // Process id. - DWORD pid; - - // Dump type requested. - MINIDUMP_TYPE dump_type; - - // Client thread id pointer. - DWORD* thread_id; - - // Exception information. - EXCEPTION_POINTERS** exception_pointers; - - // Assert information in case of an invalid parameter or - // pure call failure. - MDRawAssertionInfo* assert_info; - - // Custom client information. - CustomClientInfo custom_client_info; - - // Handle to signal the crash event. - HANDLE dump_request_handle; - - // Handle to check if server is done generating crash. - HANDLE dump_generated_handle; - - // Handle to a mutex that becomes signaled (WAIT_ABANDONED) - // if server process goes down. - HANDLE server_alive_handle; - - private: - // Disable copy ctor and operator=. - ProtocolMessage(const ProtocolMessage& msg); - ProtocolMessage& operator=(const ProtocolMessage& msg); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/client_info.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/client_info.h deleted file mode 100644 index 774816fb..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/client_info.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -class CrashGenerationServer; - -// Abstraction for a crash client process. -class ClientInfo { - public: - // Creates an instance with the given values. Gets the process - // handle for the given process id and creates necessary event - // objects. - ClientInfo(CrashGenerationServer* crash_server, - DWORD pid, - MINIDUMP_TYPE dump_type, - DWORD* thread_id, - EXCEPTION_POINTERS** ex_info, - MDRawAssertionInfo* assert_info, - const CustomClientInfo& custom_client_info); - - ~ClientInfo(); - - CrashGenerationServer* crash_server() const { return crash_server_; } - DWORD pid() const { return pid_; } - MINIDUMP_TYPE dump_type() const { return dump_type_; } - EXCEPTION_POINTERS** ex_info() const { return ex_info_; } - MDRawAssertionInfo* assert_info() const { return assert_info_; } - DWORD* thread_id() const { return thread_id_; } - HANDLE process_handle() const { return process_handle_; } - HANDLE dump_requested_handle() const { return dump_requested_handle_; } - HANDLE dump_generated_handle() const { return dump_generated_handle_; } - - HANDLE dump_request_wait_handle() const { - return dump_request_wait_handle_; - } - - void set_dump_request_wait_handle(HANDLE value) { - dump_request_wait_handle_ = value; - } - - HANDLE process_exit_wait_handle() const { - return process_exit_wait_handle_; - } - - void set_process_exit_wait_handle(HANDLE value) { - process_exit_wait_handle_ = value; - } - - // Unregister all waits for the client. - bool UnregisterWaits(); - - bool Initialize(); - bool GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const; - bool GetClientThreadId(DWORD* thread_id) const; - - // Reads the custom information from the client process address space. - bool PopulateCustomInfo(); - - // Returns the client custom information. - CustomClientInfo GetCustomInfo() const; - - private: - // Calcualtes the uptime for the client process, converts it to a string and - // stores it in the last entry of client custom info. - void SetProcessUptime(); - - // Crash generation server. - CrashGenerationServer* crash_server_; - - // Client process ID. - DWORD pid_; - - // Dump type requested by the client. - MINIDUMP_TYPE dump_type_; - - // Address of an EXCEPTION_POINTERS* variable in the client - // process address space that will point to an instance of - // EXCEPTION_POINTERS containing information about crash. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - EXCEPTION_POINTERS** ex_info_; - - // Address of an instance of MDRawAssertionInfo in the client - // process address space that will contain information about - // non-exception related crashes like invalid parameter assertion - // failures and pure calls. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - MDRawAssertionInfo* assert_info_; - - // Custom information about the client. - CustomClientInfo custom_client_info_; - - // Contains the custom client info entries read from the client process - // memory. This will be populated only if the method GetClientCustomInfo - // is called. - scoped_array custom_info_entries_; - - // Address of a variable in the client process address space that - // will contain the thread id of the crashing client thread. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - DWORD* thread_id_; - - // Client process handle. - HANDLE process_handle_; - - // Dump request event handle. - HANDLE dump_requested_handle_; - - // Dump generated event handle. - HANDLE dump_generated_handle_; - - // Wait handle for dump request event. - HANDLE dump_request_wait_handle_; - - // Wait handle for process exit event. - HANDLE process_exit_wait_handle_; - - // Time when the client process started. It is used to determine the uptime - // for the client process when it signals a crash. - FILETIME start_time_; - - // Disallow copy ctor and operator=. - ClientInfo(const ClientInfo& client_info); - ClientInfo& operator=(const ClientInfo& client_info); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_client.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_client.h deleted file mode 100644 index 81b0e6ca..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ - -#include -#include -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -struct CustomClientInfo; - -// Abstraction of client-side implementation of out of process -// crash generation. -// -// The process that desires to have out-of-process crash dump -// generation service can use this class in the following way: -// -// * Create an instance. -// * Call Register method so that the client tries to register -// with the server process and check the return value. If -// registration is not successful, out-of-process crash dump -// generation will not be available -// * Request dump generation by calling either of the two -// overloaded RequestDump methods - one in case of exceptions -// and the other in case of assertion failures -// -// Note that it is the responsibility of the client code of -// this class to set the unhandled exception filter with the -// system by calling the SetUnhandledExceptionFilter function -// and the client code should explicitly request dump generation. -class CrashGenerationClient { - public: - CrashGenerationClient(const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info); - - ~CrashGenerationClient(); - - // Registers the client process with the crash server. - // - // Returns true if the registration is successful; false otherwise. - bool Register(); - - // Requests the crash server to generate a dump with the given - // exception information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(EXCEPTION_POINTERS* ex_info); - - // Requests the crash server to generate a dump with the given - // assertion information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(MDRawAssertionInfo* assert_info); - - private: - // Connects to the appropriate pipe and sets the pipe handle state. - // - // Returns the pipe handle if everything goes well; otherwise Returns NULL. - HANDLE ConnectToServer(); - - // Performs a handshake with the server over the given pipe which should be - // already connected to the server. - // - // Returns true if handshake with the server was successful; false otherwise. - bool RegisterClient(HANDLE pipe); - - // Validates the given server response. - bool ValidateResponse(const ProtocolMessage& msg) const; - - // Returns true if the registration step succeeded; false otherwise. - bool IsRegistered() const; - - // Connects to the given named pipe with given parameters. - // - // Returns true if the connection is successful; false otherwise. - HANDLE ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs); - - // Signals the crash event and wait for the server to generate crash. - bool SignalCrashEventAndWait(); - - // Pipe name to use to talk to server. - std::wstring pipe_name_; - - // Custom client information - CustomClientInfo custom_info_; - - // Type of dump to generate. - MINIDUMP_TYPE dump_type_; - - // Event to signal in case of a crash. - HANDLE crash_event_; - - // Handle to wait on after signaling a crash for the server - // to finish generating crash dump. - HANDLE crash_generated_; - - // Handle to a mutex that will become signaled with WAIT_ABANDONED - // if the server process goes down. - HANDLE server_alive_; - - // Server process id. - DWORD server_process_id_; - - // Id of the thread that caused the crash. - DWORD thread_id_; - - // Exception pointers for an exception crash. - EXCEPTION_POINTERS* exception_pointers_; - - // Assertion info for an invalid parameter or pure call crash. - MDRawAssertionInfo assert_info_; - - // Disable copy ctor and operator=. - CrashGenerationClient(const CrashGenerationClient& crash_client); - CrashGenerationClient& operator=(const CrashGenerationClient& crash_client); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_server.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_server.h deleted file mode 100644 index cacb639a..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/crash_generation/minidump_generator.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -// Abstraction for server side implementation of out-of-process crash -// generation protocol for Windows platform only. It generates Windows -// minidump files for client processes that request dump generation. When -// the server is requested to start listening for clients (by calling the -// Start method), it creates a named pipe and waits for the clients to -// register. In response, it hands them event handles that the client can -// signal to request dump generation. When the clients request dump -// generation in this way, the server generates Windows minidump files. -class CrashGenerationServer { - public: - typedef void (*OnClientConnectedCallback)(void* context, - const ClientInfo* client_info); - - typedef void (*OnClientDumpRequestCallback)(void* context, - const ClientInfo* client_info, - const std::wstring* file_path); - - typedef void (*OnClientExitedCallback)(void* context, - const ClientInfo* client_info); - - // Creates an instance with the given parameters. - // - // Parameter pipe_name: Name of the Windows named pipe - // Parameter pipe_sec_attrs Security attributes to set on the pipe. Pass - // NULL to use default security on the pipe. By default, the pipe created - // allows Local System, Administrators and the Creator full control and - // the Everyone group read access on the pipe. - // Parameter connect_callback: Callback for a new client connection. - // Parameter connect_context: Context for client connection callback. - // Parameter crash_callback: Callback for a client crash dump request. - // Parameter crash_context: Context for client crash dump request callback. - // Parameter exit_callback: Callback for client process exit. - // Parameter exit_context: Context for client exit callback. - // Parameter generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly in the - // crash dump request callback. In that case, false can be passed for this - // parameter. - // Parameter dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const std::wstring& pipe_name, - SECURITY_ATTRIBUTES* pipe_sec_attrs, - OnClientConnectedCallback connect_callback, - void* connect_context, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitedCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::wstring* dump_path); - - ~CrashGenerationServer(); - - // Performs initialization steps needed to start listening to clients. - // - // Returns true if initialization is successful; false otherwise. - bool Start(); - - private: - // Various states the client can be in during the handshake with - // the server. - enum IPCServerState { - // Server is in error state and it cannot serve any clients. - IPC_SERVER_STATE_ERROR, - - // Server starts in this state. - IPC_SERVER_STATE_INITIAL, - - // Server has issued an async connect to the pipe and it is waiting - // for the connection to be established. - IPC_SERVER_STATE_CONNECTING, - - // Server is connected successfully. - IPC_SERVER_STATE_CONNECTED, - - // Server has issued an async read from the pipe and it is waiting for - // the read to finish. - IPC_SERVER_STATE_READING, - - // Server is done reading from the pipe. - IPC_SERVER_STATE_READ_DONE, - - // Server has issued an async write to the pipe and it is waiting for - // the write to finish. - IPC_SERVER_STATE_WRITING, - - // Server is done writing to the pipe. - IPC_SERVER_STATE_WRITE_DONE, - - // Server has issued an async read from the pipe for an ack and it - // is waiting for the read to finish. - IPC_SERVER_STATE_READING_ACK, - - // Server is done writing to the pipe and it is now ready to disconnect - // and reconnect. - IPC_SERVER_STATE_DISCONNECTING - }; - - // - // Helper methods to handle various server IPC states. - // - void HandleErrorState(); - void HandleInitialState(); - void HandleConnectingState(); - void HandleConnectedState(); - void HandleReadingState(); - void HandleReadDoneState(); - void HandleWritingState(); - void HandleWriteDoneState(); - void HandleReadingAckState(); - void HandleDisconnectingState(); - - // Prepares reply for a client from the given parameters. - bool PrepareReply(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Duplicates various handles in the ClientInfo object for the client - // process and stores them in the given ProtocolMessage instance. If - // creating any handle fails, ProtocolMessage will contain the handles - // already created successfully, which should be closed by the caller. - bool CreateClientHandles(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Response to the given client. Return true if all steps of - // responding to the client succeed, false otherwise. - bool RespondToClient(ClientInfo* client_info); - - // Handles a connection request from the client. - void HandleConnectionRequest(); - - // Handles a dump request from the client. - void HandleDumpRequest(const ClientInfo& client_info); - - // Callback for pipe connected event. - static void CALLBACK OnPipeConnected(void* context, BOOLEAN timer_or_wait); - - // Callback for a dump request. - static void CALLBACK OnDumpRequest(void* context, BOOLEAN timer_or_wait); - - // Callback for client process exit event. - static void CALLBACK OnClientEnd(void* context, BOOLEAN timer_or_wait); - - // Releases resources for a client. - static DWORD WINAPI CleanupClient(void* context); - - // Cleans up for the given client. - void DoCleanup(ClientInfo* client_info); - - // Adds the given client to the list of registered clients. - bool AddClient(ClientInfo* client_info); - - // Generates dump for the given client. - bool GenerateDump(const ClientInfo& client, std::wstring* dump_path); - - // Sync object for thread-safe access to the shared list of clients. - CRITICAL_SECTION clients_sync_; - - // List of clients. - std::list clients_; - - // Pipe name. - std::wstring pipe_name_; - - // Pipe security attributes - SECURITY_ATTRIBUTES* pipe_sec_attrs_; - - // Handle to the pipe used for handshake with clients. - HANDLE pipe_; - - // Pipe wait handle. - HANDLE pipe_wait_handle_; - - // Handle to server-alive mutex. - HANDLE server_alive_handle_; - - // Callback for a successful client connection. - OnClientConnectedCallback connect_callback_; - - // Context for client connected callback. - void* connect_context_; - - // Callback for a client dump request. - OnClientDumpRequestCallback dump_callback_; - - // Context for client dump request callback. - void* dump_context_; - - // Callback for client process exit. - OnClientExitedCallback exit_callback_; - - // Context for client process exit callback. - void* exit_context_; - - // Whether to generate dumps. - bool generate_dumps_; - - // Instance of a mini dump generator. - scoped_ptr dump_generator_; - - // State of the server in performing the IPC with the client. - // Note that since we restrict the pipe to one instance, we - // only need to keep one state of the server. Otherwise, server - // would have one state per client it is talking to. - volatile IPCServerState server_state_; - - // Whether the server is shutting down. - volatile bool shutting_down_; - - // Overlapped instance for async I/O on the pipe. - OVERLAPPED overlapped_; - - // Message object used in IPC with the client. - ProtocolMessage msg_; - - // Client Info for the client that's connecting to the server. - ClientInfo* client_info_; - - // Count of clean-up work items that are currently running or are - // already queued to run. - volatile LONG cleanup_item_count_; - - // Disable copy ctor and operator=. - CrashGenerationServer(const CrashGenerationServer& crash_server); - CrashGenerationServer& operator=(const CrashGenerationServer& crash_server); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/minidump_generator.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/minidump_generator.h deleted file mode 100644 index 8ab6a8f6..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/crash_generation/minidump_generator.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ - -#include -#include -#include -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Abstraction for various objects and operations needed to generate -// minidump on Windows. This abstraction is useful to hide all the gory -// details for minidump generation and provide a clean interface to -// the clients to generate minidumps. -class MinidumpGenerator { - public: - // Creates an instance with the given dump path. - explicit MinidumpGenerator(const std::wstring& dump_path); - - ~MinidumpGenerator(); - - // Writes the minidump with the given parameters. Stores the - // dump file path in the dump_path parameter if dump generation - // succeeds. - bool WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - std::wstring* dump_path); - - private: - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI* MiniDumpWriteDumpType)( - HANDLE hProcess, - DWORD ProcessId, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY* UuidCreateType)(UUID* Uuid); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetDbghelpModule(); - - // Loads the appropriate DLL and gets a pointer to the MiniDumpWriteDump - // function lazily and in a thread-safe manner. - MiniDumpWriteDumpType GetWriteDump(); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetRpcrt4Module(); - - // Loads the appropriate DLL and gets a pointer to the UuidCreate - // function lazily and in a thread-safe manner. - UuidCreateType GetCreateUuid(); - - // Returns the path for the file to write dump to. - bool GenerateDumpFilePath(std::wstring* file_path); - - // Handle to dynamically loaded DbgHelp.dll. - HMODULE dbghelp_module_; - - // Pointer to the MiniDumpWriteDump function. - MiniDumpWriteDumpType write_dump_; - - // Handle to dynamically loaded rpcrt4.dll. - HMODULE rpcrt4_module_; - - // Pointer to the UuidCreate function. - UuidCreateType create_uuid_; - - // Folder path to store dump files. - std::wstring dump_path_; - - // Critical section to sychronize action of loading modules dynamically. - CRITICAL_SECTION module_load_sync_; - - // Critical section to synchronize action of dynamically getting function - // addresses from modules. - CRITICAL_SECTION get_proc_address_sync_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/handler/exception_handler.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/handler/exception_handler.h deleted file mode 100644 index 2cacdc38..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/handler/exception_handler.h +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// It is important that creation and destruction of ExceptionHandler objects -// be nested cleanly, when using install_handler = true. -// Avoid the following pattern: -// ExceptionHandler *e = new ExceptionHandler(...); -// ExceptionHandler *f = new ExceptionHandler(...); -// delete e; -// This will put the exception filter stack into an inconsistent state. - -#ifndef CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include -#include - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/crash_generation_client.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -using std::vector; -using std::wstring; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. exinfo points to the - // exception record, if any; assertion points to assertion information, - // if any. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void* context, EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. exinfo - // points to the exception record, or NULL if no exception occurred. - // succeeded indicates whether a minidump file was successfully written. - // assertion points to information about an assertion if the handler was - // invoked by an assertion. - // - // If an exception occurred and the callback returns true, Breakpad will treat - // the exception as fully-handled, suppressing any other handlers from being - // notified of the exception. If the callback returns false, Breakpad will - // treat the exception as unhandled, and allow another handler to handle it. - // If there are no other handlers, Breakpad will report the exception to the - // system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - // - // For out-of-process dump generation, dump path and minidump ID will always - // be NULL. In case of out-of-process dump generation, the dump path and - // minidump id are controlled by the server process and are not communicated - // back to the crashing process. - typedef bool (*MinidumpCallback)(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded); - - // HandlerType specifies which types of handlers should be installed, if - // any. Use HANDLER_NONE for an ExceptionHandler that remains idle, - // without catching any failures on its own. This type of handler may - // still be triggered by calling WriteMinidump. Otherwise, use a - // combination of the other HANDLER_ values, or HANDLER_ALL to install - // all handlers. - enum HandlerType { - HANDLER_NONE = 0, - HANDLER_EXCEPTION = 1 << 0, // SetUnhandledExceptionFilter - HANDLER_INVALID_PARAMETER = 1 << 1, // _set_invalid_parameter_handler - HANDLER_PURECALL = 1 << 2, // _set_purecall_handler - HANDLER_ALL = HANDLER_EXCEPTION | - HANDLER_INVALID_PARAMETER | - HANDLER_PURECALL - }; - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // handler_types specifies the types of handlers that should be installed. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types); - - // Creates a new ExcetpionHandler instance that can attempt to perform - // out-of-process dump generation if pipe_name is not NULL. If pipe_name is - // NULL, or if out-of-process dump generation registration step fails, - // in-process dump generation will be used. This also allows specifying - // the dump type to generate. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - ~ExceptionHandler(); - - // Get and set the minidump path. - wstring dump_path() const { return dump_path_; } - void set_dump_path(const wstring &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Writes a minidump immediately, with the user-supplied exception - // information. - bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, void* callback_context); - - // Get the thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). This - // may be useful if you want to include additional thread state in your - // dumps. - DWORD get_requesting_thread_id() const { return requesting_thread_id_; } - - // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. - bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } - void set_handle_debug_exceptions(bool handle_debug_exceptions) { - handle_debug_exceptions_ = handle_debug_exceptions; - } - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { return crash_generation_client_.get() != NULL; } - - private: - friend class AutoExceptionHandler; - - // Initializes the instance with given values. - void Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI *MiniDumpWriteDump_type)( - HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY *UuidCreate_type)(UUID* Uuid); - - // Runs the main loop for the exception handler thread. - static DWORD WINAPI ExceptionHandlerThreadMain(void* lpParameter); - - // Called on the exception thread when an unhandled exception occurs. - // Signals the exception handler thread to handle the exception. - static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // This function will be called by some CRT functions when they detect - // that they were passed an invalid parameter. Note that in _DEBUG builds, - // the CRT may display an assertion dialog before calling this function, - // and the function will not be called unless the assertion dialog is - // dismissed by clicking "Ignore." - static void HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved); -#endif // _MSC_VER >= 1400 - - // This function will be called by the CRT when a pure virtual - // function is called. - static void HandlePureVirtualCall(); - - // This is called on the exception thread or on another thread that - // the user wishes to produce a dump from. It calls - // WriteMinidumpWithException on the handler thread, avoiding stack - // overflows and inconsistent dumps due to writing the dump from - // the exception thread. If the dump is requested as a result of an - // exception, exinfo contains exception information, otherwise, it - // is NULL. If the dump is requested as a result of an assertion - // (such as an invalid parameter being passed to a CRT function), - // assertion contains data about the assertion, otherwise, it is NULL. - bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function does the actual writing of a minidump. It is called - // on the handler thread. requesting_thread_id is the ID of the thread - // that requested the dump. If the dump is requested as a result of - // an exception, exinfo contains exception information, otherwise, - // it is NULL. - bool WriteMinidumpWithException(DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - FilterCallback filter_; - MinidumpCallback callback_; - void* callback_context_; - - scoped_ptr crash_generation_client_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - wstring dump_path_; - - // The basename of the next minidump to be written, without the extension. - wstring next_minidump_id_; - - // The full pathname of the next minidump to be written, including the file - // extension. - wstring next_minidump_path_; - - // Pointers to C-string representations of the above. These are set when - // the above wstring versions are set in order to avoid calling c_str during - // an exception, as c_str may attempt to allocate heap memory. These - // pointers are not owned by the ExceptionHandler object, but their lifetimes - // should be equivalent to the lifetimes of the associated wstring, provided - // that the wstrings are not altered. - const wchar_t* dump_path_c_; - const wchar_t* next_minidump_id_c_; - const wchar_t* next_minidump_path_c_; - - HMODULE dbghelp_module_; - MiniDumpWriteDump_type minidump_write_dump_; - MINIDUMP_TYPE dump_type_; - - HMODULE rpcrt4_module_; - UuidCreate_type uuid_create_; - - // Tracks the handler types that were installed according to the - // handler_types constructor argument. - int handler_types_; - - // When installed_handler_ is true, previous_filter_ is the unhandled - // exception filter that was set prior to installing ExceptionHandler as - // the unhandled exception filter and pointing it to |this|. NULL indicates - // that there is no previous unhandled exception filter. - LPTOP_LEVEL_EXCEPTION_FILTER previous_filter_; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // Beginning in VC 8, the CRT provides an invalid parameter handler that will - // be called when some CRT functions are passed invalid parameters. In - // earlier CRTs, the same conditions would cause unexpected behavior or - // crashes. - _invalid_parameter_handler previous_iph_; -#endif // _MSC_VER >= 1400 - - // The CRT allows you to override the default handler for pure - // virtual function calls. - _purecall_handler previous_pch_; - - // The exception handler thread. - HANDLE handler_thread_; - - // True if the exception handler is being destroyed. - // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars. - // It has release semantics on write and acquire semantics on reads. - // See the msdn documentation. - volatile bool is_shutdown_; - - // The critical section enforcing the requirement that only one exception be - // handled by a handler at a time. - CRITICAL_SECTION handler_critical_section_; - - // Semaphores used to move exception handling between the exception thread - // and the handler thread. handler_start_semaphore_ is signalled by the - // exception thread to wake up the handler thread when an exception occurs. - // handler_finish_semaphore_ is signalled by the handler thread to wake up - // the exception thread when handling is complete. - HANDLE handler_start_semaphore_; - HANDLE handler_finish_semaphore_; - - // The next 2 fields contain data passed from the requesting thread to - // the handler thread. - - // The thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). - DWORD requesting_thread_id_; - - // The exception info passed to the exception handler on the exception - // thread, if an exception occurred. NULL for user-requested dumps. - EXCEPTION_POINTERS* exception_info_; - - // If the handler is invoked due to an assertion, this will contain a - // pointer to the assertion information. It is NULL at other times. - MDRawAssertionInfo* assertion_; - - // The return value of the handler, passed from the handler thread back to - // the requesting thread. - bool handler_return_value_; - - // If true, the handler will intercept EXCEPTION_BREAKPOINT and - // EXCEPTION_SINGLE_STEP exceptions. Leave this false (the default) - // to not interfere with debuggers. - bool handle_debug_exceptions_; - - // A stack of ExceptionHandler objects that have installed unhandled - // exception filters. This vector is used by HandleException to determine - // which ExceptionHandler object to route an exception to. When an - // ExceptionHandler is created with install_handler true, it will append - // itself to this list. - static vector* handler_stack_; - - // The index of the ExceptionHandler in handler_stack_ that will handle the - // next exception. Note that 0 means the last entry in handler_stack_, 1 - // means the next-to-last entry, and so on. This is used by HandleException - // to support multiple stacked Breakpad handlers. - static LONG handler_stack_index_; - - // handler_stack_critical_section_ guards operations on handler_stack_ and - // handler_stack_index_. The critical section is initialized by the - // first instance of the class and destroyed by the last instance of it. - static CRITICAL_SECTION handler_stack_critical_section_; - - // The number of instances of this class. - volatile static LONG instance_count_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/sender/crash_report_sender.h b/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/sender/crash_report_sender.h deleted file mode 100644 index da1ed0af..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/client/windows/sender/crash_report_sender.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ -#define CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ - -// CrashReportSender is a "static" class which provides an API to upload -// crash reports via HTTP(S). A crash report is formatted as a multipart POST -// request, which contains a set of caller-supplied string key/value pairs, -// and a minidump file to upload. -// -// To use this library in your project, you will need to link against -// wininet.lib. - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -namespace google_breakpad { - -using std::wstring; -using std::map; - -typedef enum { - RESULT_FAILED = 0, // Failed to communicate with the server; try later. - RESULT_REJECTED, // Successfully sent the crash report, but the - // server rejected it; don't resend this report. - RESULT_SUCCEEDED, // The server accepted the crash report. - RESULT_THROTTLED // No attempt was made to send the crash report, because - // we exceeded the maximum reports per day. -} ReportResult; - -class CrashReportSender { - public: - // Initializes a CrashReportSender instance. - // If checkpoint_file is non-empty, breakpad will persist crash report - // state to this file. A checkpoint file is required for - // set_max_reports_per_day() to function properly. - explicit CrashReportSender(const wstring &checkpoint_file); - ~CrashReportSender() {} - - // Sets the maximum number of crash reports that will be sent in a 24-hour - // period. This uses the state persisted to the checkpoint file. - // The default value of -1 means that there is no limit on reports sent. - void set_max_reports_per_day(int reports) { - max_reports_per_day_ = reports; - } - - int max_reports_per_day() const { return max_reports_per_day_; } - - // Sends the specified minidump file, along with the map of - // name value pairs, as a multipart POST request to the given URL. - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. The return value indicates - // the result of the operation (see above for possible results). - // If report_code is non-NULL and the report is sent successfully (that is, - // the return value is RESULT_SUCCEEDED), a code uniquely identifying the - // report will be returned in report_code. - // (Otherwise, report_code will be unchanged.) - ReportResult SendCrashReport(const wstring &url, - const map ¶meters, - const wstring &dump_file_name, - wstring *report_code); - - private: - // Reads persistent state from a checkpoint file. - void ReadCheckpoint(FILE *fd); - - // Called when a new report has been sent, to update the checkpoint state. - void ReportSent(int today); - - // Returns today's date (UTC) formatted as YYYYMMDD. - int GetCurrentDate() const; - - // Opens the checkpoint file with the specified mode. - // Returns zero on success, or an error code on failure. - int OpenCheckpointFile(const wchar_t *mode, FILE **fd); - - wstring checkpoint_file_; - int max_reports_per_day_; - // The last date on which we sent a report, expressed as YYYYMMDD. - int last_sent_date_; - // Number of reports sent on last_sent_date_ - int reports_sent_; - - // Disallow copy constructor and operator= - explicit CrashReportSender(const CrashReportSender &); - void operator=(const CrashReportSender &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/convert_UTF.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/convert_UTF.h deleted file mode 100644 index b1556de8..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/convert_UTF.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2001-2004 Unicode, Inc. - * - * Disclaimer - * - * This source code is provided as is by Unicode, Inc. No claims are - * made as to fitness for any particular purpose. No warranties of any - * kind are expressed or implied. The recipient agrees to determine - * applicability of information provided. If this file has been - * purchased on magnetic or optical media from Unicode, Inc., the - * sole remedy for any claim will be exchange of defective media - * within 90 days of receipt. - * - * Limitations on Rights to Redistribute This Code - * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form - * for internal or external distribution as long as this notice - * remains attached. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Header file. - -Several funtions are included here, forming a complete set of -conversions between the three formats. UTF-7 is not included -here, but is handled in a separate source file. - -Each of these routines takes pointers to input buffers and output -buffers. The input buffers are const. - -Each routine converts the text between *sourceStart and sourceEnd, -putting the result into the buffer between *targetStart and -targetEnd. Note: the end pointers are *after* the last item: e.g. -*(sourceEnd - 1) is the last item. - -The return result indicates whether the conversion was successful, -and if not, whether the problem was in the source or target buffers. -(Only the first encountered problem is indicated.) - -After the conversion, *sourceStart and *targetStart are both -updated to point to the end of last text successfully converted in -the respective buffers. - -Input parameters: -sourceStart - pointer to a pointer to the source buffer. -The contents of this are modified on return so that -it points at the next thing to be converted. -targetStart - similarly, pointer to pointer to the target buffer. -sourceEnd, targetEnd - respectively pointers to the ends of the -two buffers, for overflow checking only. - -These conversion functions take a ConversionFlags argument. When this -flag is set to strict, both irregular sequences and isolated surrogates -will cause an error. When the flag is set to lenient, both irregular -sequences and isolated surrogates are converted. - -Whether the flag is strict or lenient, all illegal sequences will cause -an error return. This includes sequences such as: , , -or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code -must check for illegal sequences. - -When the flag is set to lenient, characters over 0x10FFFF are converted -to the replacement character; otherwise (when the flag is set to strict) -they constitute an error. - -Output parameters: -The value "sourceIllegal" is returned from some routines if the input -sequence is malformed. When "sourceIllegal" is returned, the source -value will point to the illegal value that caused the problem. E.g., -in UTF-8 when a sequence is malformed, it points to the start of the -malformed sequence. - -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Fixes & updates, Sept 2001. - ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------- -The following 4 definitions are compiler-specific. -The C standard does not guarantee that wchar_t has at least -16 bits, so wchar_t is no less portable than unsigned short! -All should be unsigned values to avoid sign extension during -bit mask & shift operations. ------------------------------------------------------------------------- */ - -typedef unsigned long UTF32; /* at least 32 bits */ -typedef unsigned short UTF16; /* at least 16 bits */ -typedef unsigned char UTF8; /* typically 8 bits */ -typedef unsigned char Boolean; /* 0 or 1 */ - -/* Some fundamental constants */ -#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD -#define UNI_MAX_BMP (UTF32)0x0000FFFF -#define UNI_MAX_UTF16 (UTF32)0x0010FFFF -#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF -#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF - -typedef enum { - conversionOK, /* conversion successful */ - sourceExhausted, /* partial character in source, but hit end */ - targetExhausted, /* insuff. room in target for conversion */ - sourceIllegal /* source sequence is illegal/malformed */ -} ConversionResult; - -typedef enum { - strictConversion = 0, - lenientConversion -} ConversionFlags; - -/* This is for C++ and does no harm in C */ -#ifdef __cplusplus -extern "C" { -#endif - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); - -#ifdef __cplusplus -} -#endif - -/* --------------------------------------------------------------------- */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/md5.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/md5.h deleted file mode 100644 index dbf4893c..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/md5.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2007 Google Inc. All Rights Reserved. -// Author: liuli@google.com (Liu Li) -#ifndef COMMON_MD5_H__ -#define COMMON_MD5_H__ - -#include - -typedef uint32_t u32; -typedef uint8_t u8; - -struct MD5Context { - u32 buf[4]; - u32 bits[2]; - u8 in[64]; -}; - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -void MD5Init(struct MD5Context *ctx); - -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len); - -void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - -#ifdef __cplusplus -} -#endif - -#endif // COMMON_MD5_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/string_conversion.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/string_conversion.h deleted file mode 100644 index d51f46bb..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/string_conversion.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_conversion.h: Conversion between different UTF-8/16/32 encodings. - -#ifndef COMMON_STRING_CONVERSION_H__ -#define COMMON_STRING_CONVERSION_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::vector; - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF8ToUTF16(const char *in, vector *out); - -// Convert at least one character (up to a maximum of |in_length|) from |in| -// to UTF-16 into |out|. Return the number of characters consumed from |in|. -// Any unused characters in |out| will be initialized to 0. No memory will -// be allocated by this routine. -int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]); - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF32ToUTF16(const wchar_t *in, vector *out); - -// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be -// initialized to 0. No memory will be allocated by this routine. -void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]); - -// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. -std::string UTF16ToUTF8(const vector &in, bool swap); - -} // namespace google_breakpad - -#endif // COMMON_STRING_CONVERSION_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/guid_string.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/guid_string.h deleted file mode 100644 index f8aa8a23..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/guid_string.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. - -#ifndef COMMON_WINDOWS_GUID_STRING_H__ -#define COMMON_WINDOWS_GUID_STRING_H__ - -#include - -#include - -namespace google_breakpad { - -using std::wstring; - -class GUIDString { - public: - // Converts guid to a string in the format recommended by RFC 4122 and - // returns the string. - static wstring GUIDToWString(GUID *guid); - - // Converts guid to a string formatted as uppercase hexadecimal, with - // no separators, and returns the string. This is the format used for - // symbol server identifiers, although identifiers have an age tacked - // on to the string. - static wstring GUIDToSymbolServerWString(GUID *guid); -}; - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_GUID_STRING_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/http_upload.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/http_upload.h deleted file mode 100644 index a1ba7ae1..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/http_upload.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPUpload provides a "nice" API to send a multipart HTTP(S) POST -// request using wininet. It currently supports requests that contain -// a set of string parameters (key/value pairs), and a file to upload. - -#ifndef COMMON_WINDOWS_HTTP_UPLOAD_H__ -#define COMMON_WINDOWS_HTTP_UPLOAD_H__ - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include -#include -#include - -namespace google_breakpad { - -using std::string; -using std::wstring; -using std::map; -using std::vector; - -class HTTPUpload { - public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request - // (i.e. it corresponds to the name= attribute on an . - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. Returns true on success. - // If the request is successful and response_body is non-NULL, - // the response body will be returned in response_body. - // If response_code is non-NULL, it will be set to the HTTP response code - // received (or 0 if the request failed before getting an HTTP response). - static bool SendRequest(const wstring &url, - const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - wstring *response_body, - int *response_code); - - private: - class AutoInternetHandle; - - // Retrieves the HTTP response. If NULL is passed in for response, - // this merely checks (via the return value) that we were successfully - // able to retrieve exactly as many bytes of content in the response as - // were specified in the Content-Length header. - static bool HTTPUpload::ReadResponse(HINTERNET request, wstring* response); - - // Generates a new multipart boundary for a POST request - static wstring GenerateMultipartBoundary(); - - // Generates a HTTP request header for a multipart form submit. - static wstring GenerateRequestHeader(const wstring &boundary); - - // Given a set of parameters, an upload filename, and a file part name, - // generates a multipart request body string with these parameters - // and minidump contents. Returns true on success. - static bool GenerateRequestBody(const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - const wstring &boundary, - string *request_body); - - // Fills the supplied vector with the contents of filename. - static void GetFileContents(const wstring &filename, vector *contents); - - // Converts a UTF8 string to UTF16. - static wstring UTF8ToWide(const string &utf8); - - // Converts a UTF16 string to UTF8. - static string WideToUTF8(const wstring &wide); - - // Checks that the given list of parameters has only printable - // ASCII characters in the parameter name, and does not contain - // any quote (") characters. Returns true if so. - static bool CheckParameters(const map ¶meters); - - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - HTTPUpload(); - explicit HTTPUpload(const HTTPUpload &); - void operator=(const HTTPUpload &); - ~HTTPUpload(); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // COMMON_WINDOWS_HTTP_UPLOAD_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/pdb_source_line_writer.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/pdb_source_line_writer.h deleted file mode 100644 index e91d0737..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/pdb_source_line_writer.h +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PDBSourceLineWriter uses a pdb file produced by Visual C++ to output -// a line/address map for use with BasicSourceLineResolver. - -#ifndef _PDB_SOURCE_LINE_WRITER_H__ -#define _PDB_SOURCE_LINE_WRITER_H__ - -#include - -#include - -struct IDiaEnumLineNumbers; -struct IDiaSession; -struct IDiaSymbol; - -namespace google_breakpad { - -using std::wstring; - -// A structure that carries information that identifies a pdb file. -struct PDBModuleInfo { - public: - // The basename of the pdb file from which information was loaded. - wstring debug_file; - - // The pdb's identifier. For recent pdb files, the identifier consists - // of the pdb's guid, in uppercase hexadecimal form without any dashes - // or separators, followed immediately by the pdb's age, also in - // uppercase hexadecimal form. For older pdb files which have no guid, - // the identifier is the pdb's 32-bit signature value, in zero-padded - // hexadecimal form, followed immediately by the pdb's age, in lowercase - // hexadecimal form. - wstring debug_identifier; - - // A string identifying the cpu that the pdb is associated with. - // Currently, this may be "x86" or "unknown". - wstring cpu; -}; - -class PDBSourceLineWriter { - public: - enum FileFormat { - PDB_FILE, // a .pdb file containing debug symbols - EXE_FILE, // a .exe or .dll file - ANY_FILE // try PDB_FILE and then EXE_FILE - }; - - explicit PDBSourceLineWriter(); - ~PDBSourceLineWriter(); - - // Opens the given file. For executable files, the corresponding pdb - // file must be available; Open will be if it is not. - // If there is already a pdb file open, it is automatically closed. - // Returns true on success. - bool Open(const wstring &file, FileFormat format); - - // Locates the pdb file for the given executable (exe or dll) file, - // and opens it. If there is already a pdb file open, it is automatically - // closed. Returns true on success. - bool OpenExecutable(const wstring &exe_file); - - // Writes a map file from the current pdb file to the given file stream. - // Returns true on success. - bool WriteMap(FILE *map_file); - - // Closes the current pdb file and its associated resources. - void Close(); - - // Retrieves information about the module's debugging file. Returns - // true on success and false on failure. - bool GetModuleInfo(PDBModuleInfo *info); - - // Sets uses_guid to true if the opened file uses a new-style CodeView - // record with a 128-bit GUID, or false if the opened file uses an old-style - // CodeView record. When no GUID is available, a 32-bit signature should be - // used to identify the module instead. If the information cannot be - // determined, this method returns false. - bool UsesGUID(bool *uses_guid); - - private: - // Outputs the line/address pairs for each line in the enumerator. - // Returns true on success. - bool PrintLines(IDiaEnumLineNumbers *lines); - - // Outputs a function address and name, followed by its source line list. - // Returns true on success. - bool PrintFunction(IDiaSymbol *function); - - // Outputs all functions as described above. Returns true on success. - bool PrintFunctions(); - - // Outputs all of the source files in the session's pdb file. - // Returns true on success. - bool PrintSourceFiles(); - - // Outputs all of the frame information necessary to construct stack - // backtraces in the absence of frame pointers. Returns true on success. - bool PrintFrameData(); - - // Outputs a single public symbol address and name, if the symbol corresponds - // to a code address. Returns true on success. If symbol is does not - // correspond to code, returns true without outputting anything. - bool PrintCodePublicSymbol(IDiaSymbol *symbol); - - // Outputs a line identifying the PDB file that is being dumped, along with - // its uuid and age. - bool PrintPDBInfo(); - - // Returns the function name for a symbol. If possible, the name is - // undecorated. If the symbol's decorated form indicates the size of - // parameters on the stack, this information is returned in stack_param_size. - // Returns true on success. If the symbol doesn't encode parameter size - // information, stack_param_size is set to -1. - static bool GetSymbolFunctionName(IDiaSymbol *function, BSTR *name, - int *stack_param_size); - - // Returns the number of bytes of stack space used for a function's - // parameters. function must have the tag SymTagFunction. In the event of - // a failure, returns 0, which is also a valid number of bytes. - static int GetFunctionStackParamSize(IDiaSymbol *function); - - // The session for the currently-open pdb file. - CComPtr session_; - - // The current output file for this WriteMap invocation. - FILE *output_; - - // Disallow copy ctor and operator= - PDBSourceLineWriter(const PDBSourceLineWriter&); - void operator=(const PDBSourceLineWriter&); -}; - -} // namespace google_breakpad - -#endif // _PDB_SOURCE_LINE_WRITER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/string_utils-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/string_utils-inl.h deleted file mode 100644 index 6f650812..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/common/windows/string_utils-inl.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utils-inl.h: Safer string manipulation on Windows, supporting -// pre-MSVC8 environments. - -#ifndef COMMON_WINDOWS_STRING_UTILS_INL_H__ -#define COMMON_WINDOWS_STRING_UTILS_INL_H__ - -#include -#include - -#include - -// The "ll" printf format size specifier corresponding to |long long| was -// intrudced in MSVC8. Earlier versions did not provide this size specifier, -// but "I64" can be used to print 64-bit types. Don't use "I64" where "ll" -// is available, in the event of oddball systems where |long long| is not -// 64 bits wide. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define WIN_STRING_FORMAT_LL "ll" -#else // MSC_VER >= 1400 -#define WIN_STRING_FORMAT_LL "I64" -#endif // MSC_VER >= 1400 - -// A nonconforming version of swprintf, without the length argument, was -// included with the CRT prior to MSVC8. Although a conforming version was -// also available via an overload, it is not reliably chosen. _snwprintf -// behaves as a standards-confirming swprintf should, so force the use of -// _snwprintf when using older CRTs. -#if _MSC_VER < 1400 // MSVC 2005/8 -#define swprintf _snwprintf -#else -// For MSVC8 and newer, swprintf_s is the recommended method. Conveniently, -// it takes the same argument list as swprintf. -#define swprintf swprintf_s -#endif // MSC_VER < 1400 - -namespace google_breakpad { - -using std::string; -using std::wstring; - -class WindowsStringUtils { - public: - // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does - // not fail if source is longer than destination_size. The destination - // buffer is always 0-terminated. - static void safe_wcscpy(wchar_t *destination, size_t destination_size, - const wchar_t *source); - - // Roughly equivalent to MSVC8's wcsncpy_s, except that _TRUNCATE cannot - // be passed directly, and pre-MSVC8, this will not fail if source or count - // are longer than destination_size. The destination buffer is always - // 0-terminated. - static void safe_wcsncpy(wchar_t *destination, size_t destination_size, - const wchar_t *source, size_t count); - - // Performs multi-byte to wide character conversion on C++ strings, using - // mbstowcs_s (MSVC8) or mbstowcs (pre-MSVC8). Returns false on failure, - // without setting wcs. - static bool safe_mbstowcs(const string &mbs, wstring *wcs); - - // Returns the base name of a file, e.g. strips off the path. - static wstring GetBaseName(const wstring &filename); - - private: - // Disallow instantiation and other object-based operations. - WindowsStringUtils(); - WindowsStringUtils(const WindowsStringUtils&); - ~WindowsStringUtils(); - void operator=(const WindowsStringUtils&); -}; - -// static -inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcscpy_s(destination, destination_size, source); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcscpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - wcsncpy(destination, source, destination_size); - if (destination && destination_size) - destination[destination_size - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -// static -inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source, - size_t count) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcsncpy_s(destination, destination_size, source, count); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcsncpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - if (destination_size < count) - count = destination_size; - - wcsncpy(destination, source, count); - if (destination && count) - destination[count - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_STRING_UTILS_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/breakpad_types.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/breakpad_types.h deleted file mode 100644 index 926b47f2..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/breakpad_types.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* breakpad_types.h: Precise-width types - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file ensures that types u_intN_t are defined for N = 8, 16, 32, and - * 64. Types of precise widths are crucial to the task of writing data - * structures on one platform and reading them on another. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ -#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ - -#ifndef _WIN32 - -#include -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif /* __STDC_FORMAT_MACROS */ -#include - -#if defined(__SUNPRO_CC) || (defined(__GNUC__) && defined(__sun__)) -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; -#endif - -#else /* !_WIN32 */ - -#include - -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; -typedef unsigned __int64 u_int64_t; - -#endif /* !_WIN32 */ - -typedef struct { - u_int64_t high; - u_int64_t low; -} u_int128_t; - -typedef u_int64_t breakpad_time_t; - -/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to - * llx, which is the format string for "long long" - this is a 64-bit - * integral type on many systems. */ -#ifndef PRIx64 -#define PRIx64 "llx" -#endif /* !PRIx64 */ - -#endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_amd64.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_amd64.h deleted file mode 100644 index 75dae7dd..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_amd64.h +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on amd64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ - - -/* - * AMD64 support, see WINNT.H - */ - -typedef struct { - u_int16_t control_word; - u_int16_t status_word; - u_int8_t tag_word; - u_int8_t reserved1; - u_int16_t error_opcode; - u_int32_t error_offset; - u_int16_t error_selector; - u_int16_t reserved2; - u_int32_t data_offset; - u_int16_t data_selector; - u_int16_t reserved3; - u_int32_t mx_csr; - u_int32_t mx_csr_mask; - u_int128_t float_registers[8]; - u_int128_t xmm_registers[16]; - u_int8_t reserved4[96]; -} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */ - -#define MD_CONTEXT_AMD64_VR_COUNT 26 - -typedef struct { - /* - * Register parameter home addresses. - */ - u_int64_t p1_home; - u_int64_t p2_home; - u_int64_t p3_home; - u_int64_t p4_home; - u_int64_t p5_home; - u_int64_t p6_home; - - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - u_int32_t mx_csr; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t cs; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */ - u_int16_t ds; - u_int16_t es; - u_int16_t fs; - u_int16_t gs; - - /* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t ss; - u_int32_t eflags; - - /* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t dr0; - u_int64_t dr1; - u_int64_t dr2; - u_int64_t dr3; - u_int64_t dr6; - u_int64_t dr7; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rax; - u_int64_t rcx; - u_int64_t rdx; - u_int64_t rbx; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rsp; - - /* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rbp; - u_int64_t rsi; - u_int64_t rdi; - u_int64_t r8; - u_int64_t r9; - u_int64_t r10; - u_int64_t r11; - u_int64_t r12; - u_int64_t r13; - u_int64_t r14; - u_int64_t r15; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rip; - - /* The next set of registers are included with - * MD_CONTEXT_AMD64_FLOATING_POINT - */ - union { - MDXmmSaveArea32AMD64 flt_save; - struct { - u_int128_t header[2]; - u_int128_t legacy[8]; - u_int128_t xmm0; - u_int128_t xmm1; - u_int128_t xmm2; - u_int128_t xmm3; - u_int128_t xmm4; - u_int128_t xmm5; - u_int128_t xmm6; - u_int128_t xmm7; - u_int128_t xmm8; - u_int128_t xmm9; - u_int128_t xmm10; - u_int128_t xmm11; - u_int128_t xmm12; - u_int128_t xmm13; - u_int128_t xmm14; - u_int128_t xmm15; - } sse_registers; - }; - - u_int128_t vector_register[MD_CONTEXT_AMD64_VR_COUNT]; - u_int64_t vector_control; - - /* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t debug_control; - u_int64_t last_branch_to_rip; - u_int64_t last_branch_from_rip; - u_int64_t last_exception_to_rip; - u_int64_t last_exception_from_rip; - -} MDRawContextAMD64; /* CONTEXT */ - -/* For (MDRawContextAMD64).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_AMD64_CONTROL (MD_CONTEXT_AMD64 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_AMD64_INTEGER (MD_CONTEXT_AMD64 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_AMD64_SEGMENTS (MD_CONTEXT_AMD64 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_AMD64_FLOATING_POINT (MD_CONTEXT_AMD64 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_AMD64_DEBUG_REGISTERS (MD_CONTEXT_AMD64 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -/* WinNT.h refers to CONTEXT_MMX_REGISTERS but doesn't appear to define it - * I think it really means CONTEXT_FLOATING_POINT. - */ - -#define MD_CONTEXT_AMD64_FULL (MD_CONTEXT_AMD64_CONTROL | \ - MD_CONTEXT_AMD64_INTEGER | \ - MD_CONTEXT_AMD64_FLOATING_POINT) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_AMD64_ALL (MD_CONTEXT_AMD64_FULL | \ - MD_CONTEXT_AMD64_SEGMENTS | \ - MD_CONTEXT_X86_DEBUG_REGISTERS) - /* CONTEXT_ALL */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc.h deleted file mode 100644 index 038e921a..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * Breakpad minidump extension for PowerPC support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ - -#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32 - -typedef struct { - /* fpregs is a double[32] in mach/ppc/_types.h, but a u_int64_t is used - * here for precise sizing. */ - u_int64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT]; - u_int32_t fpscr_pad; - u_int32_t fpscr; /* Status/control */ -} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */ - - -#define MD_VECTORSAVEAREA_PPC_VR_COUNT 32 - -typedef struct { - /* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h - * exposes them as four 32-bit quantities. */ - u_int128_t save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT]; - u_int128_t save_vscr; /* Status/control */ - u_int32_t save_pad5[4]; - u_int32_t save_vrvalid; /* Identifies which vector registers are saved */ - u_int32_t save_pad6[7]; -} MDVectorSaveAreaPPC; /* ppc_vector_state */ - - -#define MD_CONTEXT_PPC_GPR_COUNT 32 - -/* Use the same 32-bit alignment when accessing this structure from 64-bit code - * as is used natively in 32-bit code. #pragma pack is a MSVC extension - * supported by gcc. */ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(4) -#else -#pragma pack(push, 4) -#endif - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int32_t context_flags; - - u_int32_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int32_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int32_t gpr[MD_CONTEXT_PPC_GPR_COUNT]; - u_int32_t cr; /* Condition */ - u_int32_t xer; /* Integer (fiXed-point) exception */ - u_int32_t lr; /* Link */ - u_int32_t ctr; /* Count */ - u_int32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */ - u_int32_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC; /* Based on ppc_thread_state */ - -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(0) -#else -#pragma pack(pop) -#endif - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc64.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc64.h deleted file mode 100644 index a788e5d1..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_ppc64.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Neal Sidhwaney */ - - -/* - * Breakpad minidump extension for PPC64 support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ - -#include "minidump_cpu_ppc.h" - -// these types are the same in ppc64 & ppc -typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; -typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; - -#define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int64_t context_flags; - - u_int64_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int64_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; - u_int64_t cr; /* Condition */ - u_int64_t xer; /* Integer (fiXed-point) exception */ - u_int64_t lr; /* Link */ - u_int64_t ctr; /* Count */ - u_int64_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC64; /* Based on ppc_thread_state */ - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_sparc.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_sparc.h deleted file mode 100644 index ee95b64e..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_sparc.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on sparc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * SPARC support, see (solaris)sys/procfs_isa.h also - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ - -#define MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT 32 - -typedef struct { - - /* FPU floating point regs */ - u_int64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT]; - - u_int64_t filler; - u_int64_t fsr; /* FPU status register */ -} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */ - -#define MD_CONTEXT_SPARC_GPR_COUNT 32 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - u_int32_t context_flags; - u_int32_t flag_pad; - /* - * General register access (SPARC). - * Don't confuse definitions here with definitions in . - * Registers are 32 bits for ILP32, 64 bits for LP64. - * SPARC V7/V8 is for 32bit, SPARC V9 is for 64bit - */ - - /* 32 Integer working registers */ - - /* g_r[0-7] global registers(g0-g7) - * g_r[8-15] out registers(o0-o7) - * g_r[16-23] local registers(l0-l7) - * g_r[24-31] in registers(i0-i7) - */ - u_int64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT]; - - /* several control registers */ - - /* Processor State register(PSR) for SPARC V7/V8 - * Condition Code register (CCR) for SPARC V9 - */ - u_int64_t ccr; - - u_int64_t pc; /* Program Counter register (PC) */ - u_int64_t npc; /* Next Program Counter register (nPC) */ - u_int64_t y; /* Y register (Y) */ - - /* Address Space Identifier register (ASI) for SPARC V9 - * WIM for SPARC V7/V8 - */ - u_int64_t asi; - - /* Floating-Point Registers State register (FPRS) for SPARC V9 - * TBR for for SPARC V7/V8 - */ - u_int64_t fprs; - - /* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */ - MDFloatingSaveAreaSPARC float_save; - -} MDRawContextSPARC; /* CONTEXT_SPARC */ - -/* For (MDRawContextSPARC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_SPARC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_SPARC 0x10000000 -#define MD_CONTEXT_SPARC_CONTROL (MD_CONTEXT_SPARC | 0x00000001) -#define MD_CONTEXT_SPARC_INTEGER (MD_CONTEXT_SPARC | 0x00000002) -#define MD_CONTEXT_SAPARC_FLOATING_POINT (MD_CONTEXT_SPARC | 0x00000004) -#define MD_CONTEXT_SAPARC_EXTRA (MD_CONTEXT_SPARC | 0x00000008) - -#define MD_CONTEXT_SPARC_FULL (MD_CONTEXT_SPARC_CONTROL | \ - MD_CONTEXT_SPARC_INTEGER) - -#define MD_CONTEXT_SPARC_ALL (MD_CONTEXT_SPARC_FULL | \ - MD_CONTEXT_SAPARC_FLOATING_POINT | \ - MD_CONTEXT_SAPARC_EXTRA) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_x86.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_x86.h deleted file mode 100644 index 4dbc0e9a..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_cpu_x86.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on x86. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ - -#define MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE 80 - /* SIZE_OF_80387_REGISTERS */ - -typedef struct { - u_int32_t control_word; - u_int32_t status_word; - u_int32_t tag_word; - u_int32_t error_offset; - u_int32_t error_selector; - u_int32_t data_offset; - u_int32_t data_selector; - - /* register_area contains eight 80-bit (x87 "long double") quantities for - * floating-point registers %st0 (%mm0) through %st7 (%mm7). */ - u_int8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE]; - u_int32_t cr0_npx_state; -} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */ - - -#define MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE 512 - /* MAXIMUM_SUPPORTED_EXTENSION */ - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - - /* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */ - u_int32_t dr0; - u_int32_t dr1; - u_int32_t dr2; - u_int32_t dr3; - u_int32_t dr6; - u_int32_t dr7; - - /* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */ - MDFloatingSaveAreaX86 float_save; - - /* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */ - u_int32_t gs; - u_int32_t fs; - u_int32_t es; - u_int32_t ds; - /* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */ - u_int32_t edi; - u_int32_t esi; - u_int32_t ebx; - u_int32_t edx; - u_int32_t ecx; - u_int32_t eax; - - /* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */ - u_int32_t ebp; - u_int32_t eip; - u_int32_t cs; /* WinNT.h says "must be sanitized" */ - u_int32_t eflags; /* WinNT.h says "must be sanitized" */ - u_int32_t esp; - u_int32_t ss; - - /* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS. - * It contains vector (MMX/SSE) registers. It it laid out in the - * format used by the fxsave and fsrstor instructions, so it includes - * a copy of the x87 floating-point registers as well. See FXSAVE in - * "Intel Architecture Software Developer's Manual, Volume 2." */ - u_int8_t extended_registers[ - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE]; -} MDRawContextX86; /* CONTEXT */ - -/* For (MDRawContextX86).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_X86 0x00010000 - /* CONTEXT_i386, CONTEXT_i486: identifies CPU */ -#define MD_CONTEXT_X86_CONTROL (MD_CONTEXT_X86 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_X86_INTEGER (MD_CONTEXT_X86 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_X86_SEGMENTS (MD_CONTEXT_X86 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_X86_FLOATING_POINT (MD_CONTEXT_X86 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_X86_DEBUG_REGISTERS (MD_CONTEXT_X86 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -#define MD_CONTEXT_X86_EXTENDED_REGISTERS (MD_CONTEXT_X86 | 0x00000020) - /* CONTEXT_EXTENDED_REGISTERS */ - -#define MD_CONTEXT_X86_FULL (MD_CONTEXT_X86_CONTROL | \ - MD_CONTEXT_X86_INTEGER | \ - MD_CONTEXT_X86_SEGMENTS) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_X86_ALL (MD_CONTEXT_X86_FULL | \ - MD_CONTEXT_X86_FLOATING_POINT | \ - MD_CONTEXT_X86_DEBUG_REGISTERS | \ - MD_CONTEXT_X86_EXTENDED_REGISTERS) - /* CONTEXT_ALL */ - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_linux.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_linux.h deleted file mode 100644 index d52c7519..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_linux.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_linux.h: A definition of exception codes for - * Linux - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from bits/signum.h. - */ -typedef enum { - MD_EXCEPTION_CODE_LIN_SIGHUP = 1, /* Hangup (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGINT = 2, /* Interrupt (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGQUIT = 3, /* Quit (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGILL = 4, /* Illegal instruction (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGTRAP = 5, /* Trace trap (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGABRT = 6, /* Abort (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGBUS = 7, /* BUS error (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGFPE = 8, /* Floating-point exception (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGKILL = 9, /* Kill, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGUSR1 = 10, /* User-defined signal 1 (POSIX). */ - MD_EXCEPTION_CODE_LIN_SIGSEGV = 11, /* Segmentation violation (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGUSR2 = 12, /* User-defined signal 2 (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGPIPE = 13, /* Broken pipe (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGALRM = 14, /* Alarm clock (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTERM = 15, /* Termination (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGSTKFLT = 16, /* Stack faultd */ - MD_EXCEPTION_CODE_LIN_SIGCHLD = 17, /* Child status has changed (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGCONT = 18, /* Continue (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGSTOP = 19, /* Stop, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTSTP = 20, /* Keyboard stop (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTIN = 21, /* Background read from tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTOU = 22, /* Background write to tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGURG = 23, - /* Urgent condition on socket (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXCPU = 24, /* CPU limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXFSZ = 25, - /* File size limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGVTALRM = 26, /* Virtual alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPROF = 27, /* Profiling alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGWINCH = 28, /* Window size change (4.3 BSD, Sun) */ - MD_EXCEPTION_CODE_LIN_SIGIO = 29, /* I/O now possible (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPWR = 30, /* Power failure restart (System V) */ - MD_EXCEPTION_CODE_LIN_SIGSYS = 31 /* Bad system call */ -} MDExceptionCodeLinux; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_mac.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_mac.h deleted file mode 100644 index 5fba44ca..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_mac.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_mac.h: A definition of exception codes for Mac - * OS X - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/exception_types.h. This is - * what Mac OS X calls an "exception", not a "code". */ -typedef enum { - /* Exception code. The high 16 bits of exception_code contains one of - * these values. */ - MD_EXCEPTION_MAC_BAD_ACCESS = 1, /* code can be a kern_return_t */ - /* EXC_BAD_ACCESS */ - MD_EXCEPTION_MAC_BAD_INSTRUCTION = 2, /* code is CPU-specific */ - /* EXC_BAD_INSTRUCTION */ - MD_EXCEPTION_MAC_ARITHMETIC = 3, /* code is CPU-specific */ - /* EXC_ARITHMETIC */ - MD_EXCEPTION_MAC_EMULATION = 4, /* code is CPU-specific */ - /* EXC_EMULATION */ - MD_EXCEPTION_MAC_SOFTWARE = 5, - /* EXC_SOFTWARE */ - MD_EXCEPTION_MAC_BREAKPOINT = 6, /* code is CPU-specific */ - /* EXC_BREAKPOINT */ - MD_EXCEPTION_MAC_SYSCALL = 7, - /* EXC_SYSCALL */ - MD_EXCEPTION_MAC_MACH_SYSCALL = 8, - /* EXC_MACH_SYSCALL */ - MD_EXCEPTION_MAC_RPC_ALERT = 9 - /* EXC_RPC_ALERT */ -} MDExceptionMac; - -/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/ppc/exception.h and - * mach/i386/exception.h. This is what Mac OS X calls a "code". */ -typedef enum { - /* With MD_EXCEPTION_BAD_ACCESS. These are relevant kern_return_t values - * from mach/kern_return.h. */ - MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS = 1, - /* KERN_INVALID_ADDRESS */ - MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE = 2, - /* KERN_PROTECTION_FAILURE */ - MD_EXCEPTION_CODE_MAC_NO_ACCESS = 8, - /* KERN_NO_ACCESS */ - MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE = 9, - /* KERN_MEMORY_FAILURE */ - MD_EXCEPTION_CODE_MAC_MEMORY_ERROR = 10, - /* KERN_MEMORY_ERROR */ - - /* With MD_EXCEPTION_SOFTWARE */ - MD_EXCEPTION_CODE_MAC_BAD_SYSCALL = 0x00010000, /* Mach SIGSYS */ - MD_EXCEPTION_CODE_MAC_BAD_PIPE = 0x00010001, /* Mach SIGPIPE */ - MD_EXCEPTION_CODE_MAC_ABORT = 0x00010002, /* Mach SIGABRT */ - - /* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101, - /* EXC_PPC_VM_PROT_READ */ - MD_EXCEPTION_CODE_MAC_PPC_BADSPACE = 0x0102, - /* EXC_PPC_BADSPACE */ - MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED = 0x0103, - /* EXC_PPC_UNALIGNED */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL = 1, - /* EXC_PPC_INVALID_SYSCALL */ - MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION = 2, - /* EXC_PPC_UNIPL_INST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION = 3, - /* EXC_PPC_PRIVINST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER = 4, - /* EXC_PPC_PRIVREG */ - MD_EXCEPTION_CODE_MAC_PPC_TRACE = 5, - /* EXC_PPC_TRACE */ - MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR = 6, - /* EXC_PPC_PERFMON */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW = 1, - /* EXC_PPC_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE = 2, - /* EXC_PPC_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT = 3, - /* EXC_FLT_INEXACT */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE = 4, - /* EXC_PPC_FLT_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW = 5, - /* EXC_PPC_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW = 6, - /* EXC_PPC_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER = 7, - /* EXC_PPC_FLT_NOT_A_NUMBER */ - - /* With MD_EXCEPTION_MAC_EMULATION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION = 8, - /* EXC_PPC_NOEMULATION */ - MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST = 9, - /* EXC_PPC_ALTIVECASSIST */ - - /* With MD_EXCEPTION_MAC_SOFTWARE on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_TRAP = 0x00000001, /* EXC_PPC_TRAP */ - MD_EXCEPTION_CODE_MAC_PPC_MIGRATE = 0x00010100, /* EXC_PPC_MIGRATE */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT = 1, /* EXC_PPC_BREAKPOINT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86, see also x86 interrupt - * values below. */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION = 1, /* EXC_I386_INVOP */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on x86 */ - MD_EXCEPTION_CODE_MAC_X86_DIV = 1, /* EXC_I386_DIV */ - MD_EXCEPTION_CODE_MAC_X86_INTO = 2, /* EXC_I386_INTO */ - MD_EXCEPTION_CODE_MAC_X86_NOEXT = 3, /* EXC_I386_NOEXT */ - MD_EXCEPTION_CODE_MAC_X86_EXTOVR = 4, /* EXC_I386_EXTOVR */ - MD_EXCEPTION_CODE_MAC_X86_EXTERR = 5, /* EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_EMERR = 6, /* EXC_I386_EMERR */ - MD_EXCEPTION_CODE_MAC_X86_BOUND = 7, /* EXC_I386_BOUND */ - MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR = 8, /* EXC_I386_SSEEXTERR */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on x86 */ - MD_EXCEPTION_CODE_MAC_X86_SGL = 1, /* EXC_I386_SGL */ - MD_EXCEPTION_CODE_MAC_X86_BPT = 2, /* EXC_I386_BPT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86. These are the raw - * x86 interrupt codes. Most of these are mapped to other Mach - * exceptions and codes, are handled, or should not occur in user space. - * A few of these will do occur with MD_EXCEPTION_MAC_BAD_INSTRUCTION. */ - /* EXC_I386_DIVERR = 0: mapped to EXC_ARITHMETIC/EXC_I386_DIV */ - /* EXC_I386_SGLSTP = 1: mapped to EXC_BREAKPOINT/EXC_I386_SGL */ - /* EXC_I386_NMIFLT = 2: should not occur in user space */ - /* EXC_I386_BPTFLT = 3: mapped to EXC_BREAKPOINT/EXC_I386_BPT */ - /* EXC_I386_INTOFLT = 4: mapped to EXC_ARITHMETIC/EXC_I386_INTO */ - /* EXC_I386_BOUNDFLT = 5: mapped to EXC_ARITHMETIC/EXC_I386_BOUND */ - /* EXC_I386_INVOPFLT = 6: mapped to EXC_BAD_INSTRUCTION/EXC_I386_INVOP */ - /* EXC_I386_NOEXTFLT = 7: should be handled by the kernel */ - /* EXC_I386_DBLFLT = 8: should be handled (if possible) by the kernel */ - /* EXC_I386_EXTOVRFLT = 9: mapped to EXC_BAD_ACCESS/(PROT_READ|PROT_EXEC) */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT = 10, - /* EXC_INVTSSFLT */ - MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT = 11, - /* EXC_SEGNPFLT */ - MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT = 12, - /* EXC_STKFLT */ - MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT = 13, - /* EXC_GPFLT */ - /* EXC_I386_PGFLT = 14: should not occur in user space */ - /* EXC_I386_EXTERRFLT = 16: mapped to EXC_ARITHMETIC/EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT = 17 - /* EXC_ALIGNFLT (for vector operations) */ - /* EXC_I386_ENOEXTFLT = 32: should be handled by the kernel */ - /* EXC_I386_ENDPERR = 33: should not occur */ -} MDExceptionCodeMac; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_OSX_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_solaris.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_solaris.h deleted file mode 100644 index d48632ac..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_solaris.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_solaris.h: A definition of exception codes for - * Solaris - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. These values come from sys/iso/signal_iso.h - */ -typedef enum { - MD_EXCEPTION_CODE_SOL_SIGHUP = 1, /* Hangup */ - MD_EXCEPTION_CODE_SOL_SIGINT = 2, /* interrupt (rubout) */ - MD_EXCEPTION_CODE_SOL_SIGQUIT = 3, /* quit (ASCII FS) */ - MD_EXCEPTION_CODE_SOL_SIGILL = 4, /* illegal instruction (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGTRAP = 5, /* trace trap (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGIOT = 6, /* IOT instruction */ - MD_EXCEPTION_CODE_SOL_SIGABRT = 6, /* used by abort, replace SIGIOT in the future */ - MD_EXCEPTION_CODE_SOL_SIGEMT = 7, /* EMT instruction */ - MD_EXCEPTION_CODE_SOL_SIGFPE = 8, /* floating point exception */ - MD_EXCEPTION_CODE_SOL_SIGKILL = 9, /* kill (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGBUS = 10, /* bus error */ - MD_EXCEPTION_CODE_SOL_SIGSEGV = 11, /* segmentation violation */ - MD_EXCEPTION_CODE_SOL_SIGSYS = 12, /* bad argument to system call */ - MD_EXCEPTION_CODE_SOL_SIGPIPE = 13, /* write on a pipe with no one to read it */ - MD_EXCEPTION_CODE_SOL_SIGALRM = 14, /* alarm clock */ - MD_EXCEPTION_CODE_SOL_SIGTERM = 15, /* software termination signal from kill */ - MD_EXCEPTION_CODE_SOL_SIGUSR1 = 16, /* user defined signal 1 */ - MD_EXCEPTION_CODE_SOL_SIGUSR2 = 17, /* user defined signal 2 */ - MD_EXCEPTION_CODE_SOL_SIGCLD = 18, /* child status change */ - MD_EXCEPTION_CODE_SOL_SIGCHLD = 18, /* child status change alias (POSIX) */ - MD_EXCEPTION_CODE_SOL_SIGPWR = 19, /* power-fail restart */ - MD_EXCEPTION_CODE_SOL_SIGWINCH = 20, /* window size change */ - MD_EXCEPTION_CODE_SOL_SIGURG = 21, /* urgent socket condition */ - MD_EXCEPTION_CODE_SOL_SIGPOLL = 22, /* pollable event occured */ - MD_EXCEPTION_CODE_SOL_SIGIO = 22, /* socket I/O possible (SIGPOLL alias) */ - MD_EXCEPTION_CODE_SOL_SIGSTOP = 23, /* stop (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGTSTP = 24, /* user stop requested from tty */ - MD_EXCEPTION_CODE_SOL_SIGCONT = 25, /* stopped process has been continued */ - MD_EXCEPTION_CODE_SOL_SIGTTIN = 26, /* background tty read attempted */ - MD_EXCEPTION_CODE_SOL_SIGTTOU = 27, /* background tty write attempted */ - MD_EXCEPTION_CODE_SOL_SIGVTALRM = 28, /* virtual timer expired */ - MD_EXCEPTION_CODE_SOL_SIGPROF = 29, /* profiling timer expired */ - MD_EXCEPTION_CODE_SOL_SIGXCPU = 30, /* exceeded cpu limit */ - MD_EXCEPTION_CODE_SOL_SIGXFSZ = 31, /* exceeded file size limit */ - MD_EXCEPTION_CODE_SOL_SIGWAITING = 32, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGLWP = 33, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGFREEZE = 34, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGTHAW = 35, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGCANCEL = 36, /* reserved signal for thread cancellation */ - MD_EXCEPTION_CODE_SOL_SIGLOST = 37, /* resource lost (eg, record-lock lost) */ - MD_EXCEPTION_CODE_SOL_SIGXRES = 38, /* resource control exceeded */ - MD_EXCEPTION_CODE_SOL_SIGJVM1 = 39, /* reserved signal for Java Virtual Machine */ - MD_EXCEPTION_CODE_SOL_SIGJVM2 = 40 /* reserved signal for Java Virtual Machine */ -} MDExceptionCodeSolaris; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_win32.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_win32.h deleted file mode 100644 index 7fd4bc4f..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_exception_win32.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_win32.h: Definitions of exception codes for - * Win32 platform - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from WinBase.h - * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h, - * they are STATUS_ in WinNT.h). */ -typedef enum { - MD_EXCEPTION_CODE_WIN_CONTROL_C = 0x40010005, - /* DBG_CONTROL_C */ - MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION = 0x80000001, - /* EXCEPTION_GUARD_PAGE */ - MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT = 0x80000002, - /* EXCEPTION_DATATYPE_MISALIGNMENT */ - MD_EXCEPTION_CODE_WIN_BREAKPOINT = 0x80000003, - /* EXCEPTION_BREAKPOINT */ - MD_EXCEPTION_CODE_WIN_SINGLE_STEP = 0x80000004, - /* EXCEPTION_SINGLE_STEP */ - MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION = 0xc0000005, - /* EXCEPTION_ACCESS_VIOLATION */ - MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR = 0xc0000006, - /* EXCEPTION_IN_PAGE_ERROR */ - MD_EXCEPTION_CODE_WIN_INVALID_HANDLE = 0xc0000008, - /* EXCEPTION_INVALID_HANDLE */ - MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION = 0xc000001d, - /* EXCEPTION_ILLEGAL_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025, - /* EXCEPTION_NONCONTINUABLE_EXCEPTION */ - MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION = 0xc0000026, - /* EXCEPTION_INVALID_DISPOSITION */ - MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED = 0xc000008c, - /* EXCEPTION_BOUNDS_EXCEEDED */ - MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND = 0xc000008d, - /* EXCEPTION_FLT_DENORMAL_OPERAND */ - MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO = 0xc000008e, - /* EXCEPTION_FLT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT = 0xc000008f, - /* EXCEPTION_FLT_INEXACT_RESULT */ - MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION = 0xc0000090, - /* EXCEPTION_FLT_INVALID_OPERATION */ - MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW = 0xc0000091, - /* EXCEPTION_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK = 0xc0000092, - /* EXCEPTION_FLT_STACK_CHECK */ - MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW = 0xc0000093, - /* EXCEPTION_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO = 0xc0000094, - /* EXCEPTION_INT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW = 0xc0000095, - /* EXCEPTION_INT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION = 0xc0000096, - /* EXCEPTION_PRIV_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW = 0xc00000fd, - /* EXCEPTION_STACK_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194 - /* EXCEPTION_POSSIBLE_DEADLOCK */ -} MDExceptionCodeWin; - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_format.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_format.h deleted file mode 100644 index 4d9e767f..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_format.h +++ /dev/null @@ -1,721 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -#if defined(_MSC_VER) -/* Disable "zero-sized array in struct/union" warnings when compiling in - * MSVC. DbgHelp.h does this too. */ -#pragma warning(push) -#pragma warning(disable:4200) -#endif /* _MSC_VER */ - - -/* - * guiddef.h - */ - -typedef struct { - u_int32_t data1; - u_int16_t data2; - u_int16_t data3; - u_int8_t data4[8]; -} MDGUID; /* GUID */ - - -/* - * WinNT.h - */ - -/* Non-x86 CPU identifiers found in the high 26 bits of - * (MDRawContext*).context_flags. These aren't used by Breakpad, but are - * defined here for reference, to avoid assigning values that conflict - * (although some values already conflict). */ -#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */ -#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */ -/* Additional values from winnt.h in the Windows CE 5.0 SDK: */ -#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */ -#define MD_CONTEXT_ARM 0x00000040 /* CONTEXT_ARM (0x40 bit set in SHx?) */ -#define MD_CONTEXT_MIPS 0x00010000 /* CONTEXT_R4000 (same value as x86?) */ -#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */ - -#define MD_CONTEXT_CPU_MASK 0xffffffc0 - - -/* This is a base type for MDRawContextX86 and MDRawContextPPC. This - * structure should never be allocated directly. The actual structure type - * can be determined by examining the context_flags field. */ -typedef struct { - u_int32_t context_flags; -} MDRawContextBase; - -#include "minidump_cpu_sparc.h" -#include "minidump_cpu_x86.h" -#include "minidump_cpu_ppc.h" -#include "minidump_cpu_ppc64.h" -#include "minidump_cpu_amd64.h" - - -/* - * WinVer.h - */ - - -typedef struct { - u_int32_t signature; - u_int32_t struct_version; - u_int32_t file_version_hi; - u_int32_t file_version_lo; - u_int32_t product_version_hi; - u_int32_t product_version_lo; - u_int32_t file_flags_mask; /* Identifies valid bits in fileFlags */ - u_int32_t file_flags; - u_int32_t file_os; - u_int32_t file_type; - u_int32_t file_subtype; - u_int32_t file_date_hi; - u_int32_t file_date_lo; -} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */ - -/* For (MDVSFixedFileInfo).signature */ -#define MD_VSFIXEDFILEINFO_SIGNATURE 0xfeef04bd - /* VS_FFI_SIGNATURE */ - -/* For (MDVSFixedFileInfo).version */ -#define MD_VSFIXEDFILEINFO_VERSION 0x00010000 - /* VS_FFI_STRUCVERSION */ - -/* For (MDVSFixedFileInfo).file_flags_mask and - * (MDVSFixedFileInfo).file_flags */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG 0x00000001 - /* VS_FF_DEBUG */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRERELEASE 0x00000002 - /* VS_FF_PRERELEASE */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PATCHED 0x00000004 - /* VS_FF_PATCHED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRIVATEBUILD 0x00000008 - /* VS_FF_PRIVATEBUILD */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_INFOINFERRED 0x00000010 - /* VS_FF_INFOINFERRED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_SPECIALBUILD 0x00000020 - /* VS_FF_SPECIALBUILD */ - -/* For (MDVSFixedFileInfo).file_os: high 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS_UNKNOWN 0 /* VOS_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_OS_DOS (1 << 16) /* VOS_DOS */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS216 (2 << 16) /* VOS_OS216 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS232 (3 << 16) /* VOS_OS232 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_NT (4 << 16) /* VOS_NT */ -#define MD_VSFIXEDFILEINFO_FILE_OS_WINCE (5 << 16) /* VOS_WINCE */ -/* Low 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS__BASE 0 /* VOS__BASE */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS16 1 /* VOS__WINDOWS16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM16 2 /* VOS__PM16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM32 3 /* VOS__PM32 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32 4 /* VOS__WINDOWS32 */ - -/* For (MDVSFixedFileInfo).file_type */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_UNKNOWN 0 /* VFT_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_APP 1 /* VFT_APP */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DLL 2 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DRV 3 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_FONT 4 /* VFT_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_VXD 5 /* VFT_VXD */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_STATIC_LIB 7 /* VFT_STATIC_LIB */ - -/* For (MDVSFixedFileInfo).file_subtype */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN 0 - /* VFT2_UNKNOWN */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_DRV */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_PRINTER 1 - /* VFT2_DRV_PRINTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_KEYBOARD 2 - /* VFT2_DRV_KEYBOARD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_LANGUAGE 3 - /* VFT2_DRV_LANGUAGE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_DISPLAY 4 - /* VFT2_DRV_DISPLAY */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_MOUSE 5 - /* VFT2_DRV_MOUSE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_NETWORK 6 - /* VFT2_DRV_NETWORK */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SYSTEM 7 - /* VFT2_DRV_SYSTEM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INSTALLABLE 8 - /* VFT2_DRV_INSTALLABLE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SOUND 9 - /* VFT2_DRV_SOUND */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_COMM 10 - /* VFT2_DRV_COMM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INPUTMETHOD 11 - /* VFT2_DRV_INPUTMETHOD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_VERSIONED_PRINTER 12 - /* VFT2_DRV_VERSIONED_PRINTER */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_RASTER 1 - /* VFT2_FONT_RASTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_VECTOR 2 - /* VFT2_FONT_VECTOR */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_TRUETYPE 3 - /* VFT2_FONT_TRUETYPE */ - - -/* - * DbgHelp.h - */ - - -/* An MDRVA is an offset into the minidump file. The beginning of the - * MDRawHeader is at offset 0. */ -typedef u_int32_t MDRVA; /* RVA */ - -typedef struct { - u_int32_t data_size; - MDRVA rva; -} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */ - - -typedef struct { - /* The base address of the memory range on the host that produced the - * minidump. */ - u_int64_t start_of_memory_range; - - MDLocationDescriptor memory; -} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */ - - -typedef struct { - u_int32_t signature; - u_int32_t version; - u_int32_t stream_count; - MDRVA stream_directory_rva; /* A |stream_count|-sized array of - * MDRawDirectory structures. */ - u_int32_t checksum; /* Can be 0. In fact, that's all that's - * been found in minidump files. */ - u_int32_t time_date_stamp; /* time_t */ - u_int64_t flags; -} MDRawHeader; /* MINIDUMP_HEADER */ - -/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the - * low 16 bits of (MDRawHeader).version are MD_HEADER_VERSION. Per the - * documentation, the high 16 bits are implementation-specific. */ -#define MD_HEADER_SIGNATURE 0x504d444d /* 'PMDM' */ - /* MINIDUMP_SIGNATURE */ -#define MD_HEADER_VERSION 0x0000a793 /* 42899 */ - /* MINIDUMP_VERSION */ - -/* For (MDRawHeader).flags: */ -typedef enum { - /* MD_NORMAL is the standard type of minidump. It includes full - * streams for the thread list, module list, exception, system info, - * and miscellaneous info. A memory list stream is also present, - * pointing to the same stack memory contained in the thread list, - * as well as a 256-byte region around the instruction address that - * was executing when the exception occurred. Stack memory is from - * 4 bytes below a thread's stack pointer up to the top of the - * memory region encompassing the stack. */ - MD_NORMAL = 0x00000000, - MD_WITH_DATA_SEGS = 0x00000001, - MD_WITH_FULL_MEMORY = 0x00000002, - MD_WITH_HANDLE_DATA = 0x00000004, - MD_FILTER_MEMORY = 0x00000008, - MD_SCAN_MEMORY = 0x00000010, - MD_WITH_UNLOADED_MODULES = 0x00000020, - MD_WITH_INDIRECTLY_REFERENCED_MEMORY = 0x00000040, - MD_FILTER_MODULE_PATHS = 0x00000080, - MD_WITH_PROCESS_THREAD_DATA = 0x00000100, - MD_WITH_PRIVATE_READ_WRITE_MEMORY = 0x00000200, - MD_WITHOUT_OPTIONAL_DATA = 0x00000400, - MD_WITH_FULL_MEMORY_INFO = 0x00000800, - MD_WITH_THREAD_INFO = 0x00001000, - MD_WITH_CODE_SEGS = 0x00002000 -} MDType; /* MINIDUMP_TYPE */ - - -typedef struct { - u_int32_t stream_type; - MDLocationDescriptor location; -} MDRawDirectory; /* MINIDUMP_DIRECTORY */ - -/* For (MDRawDirectory).stream_type */ -typedef enum { - MD_UNUSED_STREAM = 0, - MD_RESERVED_STREAM_0 = 1, - MD_RESERVED_STREAM_1 = 2, - MD_THREAD_LIST_STREAM = 3, /* MDRawThreadList */ - MD_MODULE_LIST_STREAM = 4, /* MDRawModuleList */ - MD_MEMORY_LIST_STREAM = 5, /* MDRawMemoryList */ - MD_EXCEPTION_STREAM = 6, /* MDRawExceptionStream */ - MD_SYSTEM_INFO_STREAM = 7, /* MDRawSystemInfo */ - MD_THREAD_EX_LIST_STREAM = 8, - MD_MEMORY_64_LIST_STREAM = 9, - MD_COMMENT_STREAM_A = 10, - MD_COMMENT_STREAM_W = 11, - MD_HANDLE_DATA_STREAM = 12, - MD_FUNCTION_TABLE_STREAM = 13, - MD_UNLOADED_MODULE_LIST_STREAM = 14, - MD_MISC_INFO_STREAM = 15, /* MDRawMiscInfo */ - MD_LAST_RESERVED_STREAM = 0x0000ffff, - - /* Breakpad extension types. 0x4767 = "Gg" */ - MD_BREAKPAD_INFO_STREAM = 0x47670001, /* MDRawBreakpadInfo */ - MD_ASSERTION_INFO_STREAM = 0x47670002 /* MDRawAssertionInfo */ -} MDStreamType; /* MINIDUMP_STREAM_TYPE */ - - -typedef struct { - u_int32_t length; /* Length of buffer in bytes (not characters), - * excluding 0-terminator */ - u_int16_t buffer[1]; /* UTF-16-encoded, 0-terminated */ -} MDString; /* MINIDUMP_STRING */ - -static const size_t MDString_minsize = offsetof(MDString, buffer[0]); - - -typedef struct { - u_int32_t thread_id; - u_int32_t suspend_count; - u_int32_t priority_class; - u_int32_t priority; - u_int64_t teb; /* Thread environment block */ - MDMemoryDescriptor stack; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawThread; /* MINIDUMP_THREAD */ - - -typedef struct { - u_int32_t number_of_threads; - MDRawThread threads[1]; -} MDRawThreadList; /* MINIDUMP_THREAD_LIST */ - -static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList, - threads[0]); - - -typedef struct { - u_int64_t base_of_image; - u_int32_t size_of_image; - u_int32_t checksum; /* 0 if unknown */ - u_int32_t time_date_stamp; /* time_t */ - MDRVA module_name_rva; /* MDString, pathname or filename */ - MDVSFixedFileInfo version_info; - - /* The next field stores a CodeView record and is populated when a module's - * debug information resides in a PDB file. It identifies the PDB file. */ - MDLocationDescriptor cv_record; - - /* The next field is populated when a module's debug information resides - * in a DBG file. It identifies the DBG file. This field is effectively - * obsolete with modules built by recent toolchains. */ - MDLocationDescriptor misc_record; - - /* Alignment problem: reserved0 and reserved1 are defined by the platform - * SDK as 64-bit quantities. However, that results in a structure whose - * alignment is unpredictable on different CPUs and ABIs. If the ABI - * specifies full alignment of 64-bit quantities in structures (as ppc - * does), there will be padding between miscRecord and reserved0. If - * 64-bit quantities can be aligned on 32-bit boundaries (as on x86), - * this padding will not exist. (Note that the structure up to this point - * contains 1 64-bit member followed by 21 32-bit members.) - * As a workaround, reserved0 and reserved1 are instead defined here as - * four 32-bit quantities. This should be harmless, as there are - * currently no known uses for these fields. */ - u_int32_t reserved0[2]; - u_int32_t reserved1[2]; -} MDRawModule; /* MINIDUMP_MODULE */ - -/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to - * be tail-padded out to a multiple of 64 bits under some ABIs (such as PPC). - * This doesn't occur on systems that don't tail-pad in this manner. Define - * this macro to be the usable size of the MDRawModule struct, and use it in - * place of sizeof(MDRawModule). */ -#define MD_MODULE_SIZE 108 - - -/* (MDRawModule).cv_record can reference MDCVInfoPDB20 or MDCVInfoPDB70. - * Ref.: http://www.debuginfo.com/articles/debuginfomatch.html - * MDCVInfoPDB70 is the expected structure type with recent toolchains. */ - -typedef struct { - u_int32_t signature; - u_int32_t offset; /* Offset to debug data (expect 0 in minidump) */ -} MDCVHeader; - -typedef struct { - MDCVHeader cv_header; - u_int32_t signature; /* time_t debug information created */ - u_int32_t age; /* revision of PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file */ -} MDCVInfoPDB20; - -static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20, - pdb_file_name[0]); - -#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */ - -typedef struct { - u_int32_t cv_signature; - MDGUID signature; /* GUID, identifies PDB file */ - u_int32_t age; /* Identifies incremental changes to PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file, - * 0-terminated 8-bit character data (UTF-8?) */ -} MDCVInfoPDB70; - -static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70, - pdb_file_name[0]); - -#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */ - -typedef struct { - u_int32_t data1[2]; - u_int32_t data2; - u_int32_t data3; - u_int32_t data4; - u_int32_t data5[3]; - u_int8_t extra[2]; -} MDCVInfoELF; - -/* In addition to the two CodeView record formats above, used for linking - * to external pdb files, it is possible for debugging data to be carried - * directly in the CodeView record itself. These signature values will - * be found in the first 4 bytes of the CodeView record. Additional values - * not commonly experienced in the wild are given by "Microsoft Symbol and - * Type Information", http://www.x86.org/ftp/manuals/tools/sym.pdf, section - * 7.2. An in-depth description of the CodeView 4.1 format is given by - * "Undocumented Windows 2000 Secrets", Windows 2000 Debugging Support/ - * Microsoft Symbol File Internals/CodeView Subsections, - * http://www.rawol.com/features/undocumented/sbs-w2k-1-windows-2000-debugging-support.pdf - */ -#define MD_CVINFOCV41_SIGNATURE 0x3930424e /* '90BN', CodeView 4.10. */ -#define MD_CVINFOCV50_SIGNATURE 0x3131424e /* '11BN', CodeView 5.0, - * MS C7-format (/Z7). */ - -#define MD_CVINFOUNKNOWN_SIGNATURE 0xffffffff /* An unlikely value. */ - -/* (MDRawModule).miscRecord can reference MDImageDebugMisc. The Windows - * structure is actually defined in WinNT.h. This structure is effectively - * obsolete with modules built by recent toolchains. */ - -typedef struct { - u_int32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because - * this debug record type is mostly obsolete. */ - u_int32_t length; /* Length of entire MDImageDebugMisc structure */ - u_int8_t unicode; /* True if data is multibyte */ - u_int8_t reserved[3]; - u_int8_t data[1]; -} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */ - -static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc, - data[0]); - - -typedef struct { - u_int32_t number_of_modules; - MDRawModule modules[1]; -} MDRawModuleList; /* MINIDUMP_MODULE_LIST */ - -static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList, - modules[0]); - - -typedef struct { - u_int32_t number_of_memory_ranges; - MDMemoryDescriptor memory_ranges[1]; -} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */ - -static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList, - memory_ranges[0]); - - -#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15 - -typedef struct { - u_int32_t exception_code; /* Windows: MDExceptionCodeWin, - * Mac OS X: MDExceptionMac, - * Linux: MDExceptionCodeLinux. */ - u_int32_t exception_flags; /* Windows: 1 if noncontinuable, - Mac OS X: MDExceptionCodeMac. */ - u_int64_t exception_record; /* Address (in the minidump-producing host's - * memory) of another MDException, for - * nested exceptions. */ - u_int64_t exception_address; /* The address that caused the exception. - * Mac OS X: exception subcode (which is - * typically the address). */ - u_int32_t number_parameters; /* Number of valid elements in - * exception_information. */ - u_int32_t __align; - u_int64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS]; -} MDException; /* MINIDUMP_EXCEPTION */ - -#include "minidump_exception_win32.h" -#include "minidump_exception_mac.h" -#include "minidump_exception_linux.h" -#include "minidump_exception_solaris.h" - -typedef struct { - u_int32_t thread_id; /* Thread in which the exception - * occurred. Corresponds to - * (MDRawThread).thread_id. */ - u_int32_t __align; - MDException exception_record; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */ - - -typedef union { - struct { - u_int32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ - u_int32_t version_information; /* cpuid 1: eax */ - u_int32_t feature_information; /* cpuid 1: edx */ - u_int32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ - } x86_cpu_info; - struct { - u_int64_t processor_features[2]; - } other_cpu_info; -} MDCPUInformation; /* CPU_INFORMATION */ - - -typedef struct { - /* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO - * structure as returned by GetSystemInfo */ - u_int16_t processor_architecture; - u_int16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */ - u_int16_t processor_revision; /* x86: 0xMMSS, where MM=model, - * SS=stepping */ - - u_int8_t number_of_processors; - u_int8_t product_type; /* Windows: VER_NT_* from WinNT.h */ - - /* The next 5 fields are from the OSVERSIONINFO structure as returned - * by GetVersionEx */ - u_int32_t major_version; - u_int32_t minor_version; - u_int32_t build_number; - u_int32_t platform_id; - MDRVA csd_version_rva; /* MDString further identifying the - * host OS. - * Windows: name of the installed OS - * service pack. - * Mac OS X: the Apple OS build number - * (sw_vers -buildVersion). - * Linux: uname -srvmo */ - - u_int16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */ - u_int16_t reserved2; - - MDCPUInformation cpu; -} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */ - -/* For (MDRawSystemInfo).processor_architecture: */ -typedef enum { - MD_CPU_ARCHITECTURE_X86 = 0, /* PROCESSOR_ARCHITECTURE_INTEL */ - MD_CPU_ARCHITECTURE_MIPS = 1, /* PROCESSOR_ARCHITECTURE_MIPS */ - MD_CPU_ARCHITECTURE_ALPHA = 2, /* PROCESSOR_ARCHITECTURE_ALPHA */ - MD_CPU_ARCHITECTURE_PPC = 3, /* PROCESSOR_ARCHITECTURE_PPC */ - MD_CPU_ARCHITECTURE_SHX = 4, /* PROCESSOR_ARCHITECTURE_SHX - * (Super-H) */ - MD_CPU_ARCHITECTURE_ARM = 5, /* PROCESSOR_ARCHITECTURE_ARM */ - MD_CPU_ARCHITECTURE_IA64 = 6, /* PROCESSOR_ARCHITECTURE_IA64 */ - MD_CPU_ARCHITECTURE_ALPHA64 = 7, /* PROCESSOR_ARCHITECTURE_ALPHA64 */ - MD_CPU_ARCHITECTURE_MSIL = 8, /* PROCESSOR_ARCHITECTURE_MSIL - * (Microsoft Intermediate Language) */ - MD_CPU_ARCHITECTURE_AMD64 = 9, /* PROCESSOR_ARCHITECTURE_AMD64 */ - MD_CPU_ARCHITECTURE_X86_WIN64 = 10, - /* PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 (WoW64) */ - MD_CPU_ARCHITECTURE_SPARC = 0x8001, /* Breakpad-defined value for SPARC */ - MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ -} MDCPUArchitecture; - -/* For (MDRawSystemInfo).platform_id: */ -typedef enum { - MD_OS_WIN32S = 0, /* VER_PLATFORM_WIN32s (Windows 3.1) */ - MD_OS_WIN32_WINDOWS = 1, /* VER_PLATFORM_WIN32_WINDOWS (Windows 95-98-Me) */ - MD_OS_WIN32_NT = 2, /* VER_PLATFORM_WIN32_NT (Windows NT, 2000+) */ - MD_OS_WIN32_CE = 3, /* VER_PLATFORM_WIN32_CE, VER_PLATFORM_WIN32_HH - * (Windows CE, Windows Mobile, "Handheld") */ - - /* The following values are Breakpad-defined. */ - MD_OS_UNIX = 0x8000, /* Generic Unix-ish */ - MD_OS_MAC_OS_X = 0x8101, /* Mac OS X/Darwin */ - MD_OS_LINUX = 0x8201, /* Linux */ - MD_OS_SOLARIS = 0x8202 /* Solaris */ -} MDOSPlatform; - - -typedef struct { - u_int32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ - u_int32_t flags1; - - /* The next field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_ID. */ - u_int32_t process_id; - - /* The next 3 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_TIMES. */ - u_int32_t process_create_time; /* time_t process started */ - u_int32_t process_user_time; /* seconds of user CPU time */ - u_int32_t process_kernel_time; /* seconds of kernel CPU time */ - - /* The following fields are not present in MINIDUMP_MISC_INFO but are - * in MINIDUMP_MISC_INFO_2. When this struct is populated, these values - * may not be set. Use flags1 or sizeOfInfo to determine whether these - * values are present. These are only valid when flags1 contains - * MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */ - u_int32_t processor_max_mhz; - u_int32_t processor_current_mhz; - u_int32_t processor_mhz_limit; - u_int32_t processor_max_idle_state; - u_int32_t processor_current_idle_state; -} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO2 */ - -#define MD_MISCINFO_SIZE 24 -#define MD_MISCINFO2_SIZE 44 - -/* For (MDRawMiscInfo).flags1. These values indicate which fields in the - * MDRawMiscInfoStructure are valid. */ -typedef enum { - MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, - /* MINIDUMP_MISC1_PROCESS_ID */ - MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, - /* MINIDUMP_MISC1_PROCESS_TIMES */ - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004 - /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ -} MDMiscInfoFlags1; - - -/* - * Breakpad extension types - */ - - -typedef struct { - /* validity is a bitmask with values from MDBreakpadInfoValidity, indicating - * which of the other fields in the structure are valid. */ - u_int32_t validity; - - /* Thread ID of the handler thread. dump_thread_id should correspond to - * the thread_id of an MDRawThread in the minidump's MDRawThreadList if - * a dedicated thread in that list was used to produce the minidump. If - * the MDRawThreadList does not contain a dedicated thread used to produce - * the minidump, this field should be set to 0 and the validity field - * must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */ - u_int32_t dump_thread_id; - - /* Thread ID of the thread that requested the minidump be produced. As - * with dump_thread_id, requesting_thread_id should correspond to the - * thread_id of an MDRawThread in the minidump's MDRawThreadList. For - * minidumps produced as a result of an exception, requesting_thread_id - * will be the same as the MDRawExceptionStream's thread_id field. For - * minidumps produced "manually" at the program's request, - * requesting_thread_id will indicate which thread caused the dump to be - * written. If the minidump was produced at the request of something - * other than a thread in the MDRawThreadList, this field should be set - * to 0 and the validity field must not contain - * MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */ - u_int32_t requesting_thread_id; -} MDRawBreakpadInfo; - -/* For (MDRawBreakpadInfo).validity: */ -typedef enum { - /* When set, the dump_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID = 1 << 0, - - /* When set, the requesting_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID = 1 << 1 -} MDBreakpadInfoValidity; - -typedef struct { - /* expression, function, and file are 0-terminated UTF-16 strings. They - * may be truncated if necessary, but should always be 0-terminated when - * written to a file. - * Fixed-length strings are used because MiniDumpWriteDump doesn't offer - * a way for user streams to point to arbitrary RVAs for strings. */ - u_int16_t expression[128]; /* Assertion that failed... */ - u_int16_t function[128]; /* ...within this function... */ - u_int16_t file[128]; /* ...in this file... */ - u_int32_t line; /* ...at this line. */ - u_int32_t type; -} MDRawAssertionInfo; - -/* For (MDRawAssertionInfo).type: */ -typedef enum { - MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to an invalid parameter handler instead. */ - MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to a pure virtual call handler instead. */ - MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL -} MDAssertionInfoData; - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_size.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_size.h deleted file mode 100644 index 918544b6..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/common/minidump_size.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// minidump_size.h: Provides a C++ template for programmatic access to -// the sizes of various types defined in minidump_format.h. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -template -class minidump_size { - public: - static size_t size() { return sizeof(T); } -}; - -// Explicit specializations for variable-length types. The size returned -// for these should be the size for an object without its variable-length -// section. - -template<> -class minidump_size { - public: - static size_t size() { return MDString_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawThreadList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB20_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB70_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDImageDebugMisc_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawModuleList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawMemoryList_minsize; } -}; - -// Explicit specialization for MDRawModule, for which sizeof may include -// tail-padding on some architectures but not others. - -template<> -class minidump_size { - public: - static size_t size() { return MD_MODULE_SIZE; } -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/basic_source_line_resolver.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/basic_source_line_resolver.h deleted file mode 100644 index 38759579..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/basic_source_line_resolver.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// BasicSourceLineResolver implements SourceLineResolverInterface, using -// address map files produced by a compatible writer, e.g. PDBSourceLineWriter. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ - -// TODO: Platforms that have no hash_map can use map, at the likely cost of -// performance. -#ifdef __SUNPRO_CC -#define BSLR_NO_HASH_MAP -#endif // __SUNPRO_CC - -#ifdef BSLR_NO_HASH_MAP -#include -#else // BSLR_NO_HASH_MAP -#include -#endif // BSLR_NO_HASH_MAP - -#include "google_breakpad/processor/source_line_resolver_interface.h" - -namespace google_breakpad { - -using std::string; -#ifdef BSLR_NO_HASH_MAP -using std::map; -#else // BSLR_NO_HASH_MAP -using __gnu_cxx::hash_map; -#endif // BSLR_NO_HASH_MAP - -class BasicSourceLineResolver : public SourceLineResolverInterface { - public: - BasicSourceLineResolver(); - virtual ~BasicSourceLineResolver(); - - // SourceLineResolverInterface methods, see source_line_resolver_interface.h - // for more details. - - // Adds a module to this resolver, returning true on success. - // The given map_file is read into memory, and its symbols will be - // retained until the BasicSourceLineResolver is destroyed. - virtual bool LoadModule(const string &module_name, const string &map_file); - - // Exactly the same as above, except the given map_buffer is used - // for symbols. - virtual bool LoadModuleUsingMapBuffer(const string &module_name, - const string &map_buffer); - - - virtual bool HasModule(const string &module_name) const; - - virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const; - - private: - template class MemAddrMap; - struct Line; - struct Function; - struct PublicSymbol; - struct File; -#ifdef BSLR_NO_HASH_MAP - struct CompareString { - bool operator()(const string &s1, const string &s2) const; - }; -#else // BSLR_NO_HASH_MAP - struct HashString { - size_t operator()(const string &s) const; - }; -#endif // BSLR_NO_HASH_MAP - class Module; - - // All of the modules we've loaded -#ifdef BSLR_NO_HASH_MAP - typedef map ModuleMap; -#else // BSLR_NO_HASH_MAP - typedef hash_map ModuleMap; -#endif // BSLR_NO_HASH_MAP - ModuleMap *modules_; - - // Disallow unwanted copy ctor and assignment operator - BasicSourceLineResolver(const BasicSourceLineResolver&); - void operator=(const BasicSourceLineResolver&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/call_stack.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/call_stack.h deleted file mode 100644 index 21f595e7..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/call_stack.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// call_stack.h: A call stack comprised of stack frames. -// -// This class manages a vector of stack frames. It is used instead of -// exposing the vector directly to allow the CallStack to own StackFrame -// pointers without having to publicly export the linked_ptr class. A -// CallStack must be composed of pointers instead of objects to allow for -// CPU-specific StackFrame subclasses. -// -// By convention, the stack frame at index 0 is the innermost callee frame, -// and the frame at the highest index in a call stack is the outermost -// caller. CallStack only allows stacks to be built by pushing frames, -// beginning with the innermost callee frame. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ - -#include - -namespace google_breakpad { - -using std::vector; - -struct StackFrame; -template class linked_ptr; - -class CallStack { - public: - CallStack() { Clear(); } - ~CallStack(); - - // Resets the CallStack to its initial empty state - void Clear(); - - const vector* frames() const { return &frames_; } - - private: - // Stackwalker is responsible for building the frames_ vector. - friend class Stackwalker; - - // Storage for pushed frames. - vector frames_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCSSOR_CALL_STACK_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_module.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_module.h deleted file mode 100644 index 38ee956e..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_module.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_module.h: Carries information about code modules that are loaded -// into a process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class CodeModule { - public: - virtual ~CodeModule() {} - - // The base address of this code module as it was loaded by the process. - // (u_int64_t)-1 on error. - virtual u_int64_t base_address() const = 0; - - // The size of the code module. 0 on error. - virtual u_int64_t size() const = 0; - - // The path or file name that the code module was loaded from. Empty on - // error. - virtual string code_file() const = 0; - - // An identifying string used to discriminate between multiple versions and - // builds of the same code module. This may contain a uuid, timestamp, - // version number, or any combination of this or other information, in an - // implementation-defined format. Empty on error. - virtual string code_identifier() const = 0; - - // The filename containing debugging information associated with the code - // module. If debugging information is stored in a file separate from the - // code module itself (as is the case when .pdb or .dSYM files are used), - // this will be different from code_file. If debugging information is - // stored in the code module itself (possibly prior to stripping), this - // will be the same as code_file. Empty on error. - virtual string debug_file() const = 0; - - // An identifying string similar to code_identifier, but identifies a - // specific version and build of the associated debug file. This may be - // the same as code_identifier when the debug_file and code_file are - // identical or when the same identifier is used to identify distinct - // debug and code files. - virtual string debug_identifier() const = 0; - - // A human-readable representation of the code module's version. Empty on - // error. - virtual string version() const = 0; - - // Creates a new copy of this CodeModule object, which the caller takes - // ownership of. The new CodeModule may be of a different concrete class - // than the CodeModule being copied, but will behave identically to the - // copied CodeModule as far as the CodeModule interface is concerned. - virtual const CodeModule* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_modules.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_modules.h deleted file mode 100644 index 29c55d4e..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/code_modules.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_modules.h: Contains all of the CodeModule objects that were loaded -// into a single process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -class CodeModules { - public: - virtual ~CodeModules() {} - - // The number of contained CodeModule objects. - virtual unsigned int module_count() const = 0; - - // Random access to modules. Returns the module whose code is present - // at the address indicated by |address|. If no module is present at this - // address, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const = 0; - - // Returns the module corresponding to the main executable. If there is - // no main executable, returns NULL. Ownership of the returned CodeModule - // is retained by the CodeModules object; pointers returned by this method - // are valid for comparison with pointers returned by the other Get - // methods. - virtual const CodeModule* GetMainModule() const = 0; - - // Sequential access to modules. A sequence number of 0 corresponds to the - // module residing lowest in memory. If the sequence number is out of - // range, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtSequence( - unsigned int sequence) const = 0; - - // Sequential access to modules. This is similar to GetModuleAtSequence, - // except no ordering requirement is enforced. A CodeModules implementation - // may return CodeModule objects from GetModuleAtIndex in any order it - // wishes, provided that the order remain the same throughout the life of - // the CodeModules object. Typically, GetModuleAtIndex would be used by - // a caller to enumerate all CodeModule objects quickly when the enumeration - // does not require any ordering. If the index argument is out of range, - // returns NULL. Ownership of the returned CodeModule is retained by - // the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const = 0; - - // Creates a new copy of this CodeModules object, which the caller takes - // ownership of. The new object will also contain copies of the existing - // object's child CodeModule objects. The new CodeModules object may be of - // a different concrete class than the object being copied, but will behave - // identically to the copied object as far as the CodeModules and CodeModule - // interfaces are concerned, except that the order that GetModuleAtIndex - // returns objects in may differ between a copy and the original CodeModules - // object. - virtual const CodeModules* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/memory_region.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/memory_region.h deleted file mode 100644 index 1ac3fe8d..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/memory_region.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// memory_region.h: Access to memory regions. -// -// A MemoryRegion provides virtual access to a range of memory. It is an -// abstraction allowing the actual source of memory to be independent of -// methods which need to access a virtual memory space. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ - - -#include "google_breakpad/common/breakpad_types.h" - - -namespace google_breakpad { - - -class MemoryRegion { - public: - virtual ~MemoryRegion() {} - - // The base address of this memory region. - virtual u_int64_t GetBase() = 0; - - // The size of this memory region. - virtual u_int32_t GetSize() = 0; - - // Access to data of various sizes within the memory region. address - // is a pointer to read, and it must lie within the memory region as - // defined by its base address and size. The location pointed to by - // value is set to the value at address. Byte-swapping is performed - // if necessary so that the value is appropriate for the running - // program. Returns true on success. Fails and returns false if address - // is out of the region's bounds (after considering the width of value), - // or for other types of errors. - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) = 0; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump.h deleted file mode 100644 index 5c5dccc9..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump.h +++ /dev/null @@ -1,904 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump.h: A minidump reader. -// -// The basic structure of this module tracks the structure of the minidump -// file itself. At the top level, a minidump file is represented by a -// Minidump object. Like most other classes in this module, Minidump -// provides a Read method that initializes the object with information from -// the file. Most of the classes in this file are wrappers around the -// "raw" structures found in the minidump file itself, and defined in -// minidump_format.h. For example, each thread is represented by a -// MinidumpThread object, whose parameters are specified in an MDRawThread -// structure. A properly byte-swapped MDRawThread can be obtained from a -// MinidumpThread easily by calling its thread() method. -// -// Most of the module lazily reads only the portion of the minidump file -// necessary to fulfill the user's request. Calling Minidump::Read -// only reads the minidump's directory. The thread list is not read until -// it is needed, and even once it's read, the memory regions for each -// thread's stack aren't read until they're needed. This strategy avoids -// unnecessary file input, and allocating memory for data in which the user -// has no interest. Note that although memory allocations for a typical -// minidump file are not particularly large, it is possible for legitimate -// minidumps to be sizable. A full-memory minidump, for example, contains -// a snapshot of the entire mapped memory space. Even a normal minidump, -// with stack memory only, can be large if, for example, the dump was -// generated in response to a crash that occurred due to an infinite- -// recursion bug that caused the stack's limits to be exceeded. Finally, -// some users of this library will unfortunately find themselves in the -// position of having to process potentially-hostile minidumps that might -// attempt to cause problems by forcing the minidump processor to over- -// allocate memory. -// -// Memory management in this module is based on a strict -// you-don't-own-anything policy. The only object owned by the user is -// the top-level Minidump object, the creation and destruction of which -// must be the user's own responsibility. All other objects obtained -// through interaction with this module are ultimately owned by the -// Minidump object, and will be freed upon the Minidump object's destruction. -// Because memory regions can potentially involve large allocations, a -// FreeMemory method is provided by MinidumpMemoryRegion, allowing the user -// to release data when it is no longer needed. Use of this method is -// optional but recommended. If freed data is later required, it will -// be read back in from the minidump file again. -// -// There is one exception to this memory management policy: -// Minidump::ReadString will return a string object to the user, and the user -// is responsible for its deletion. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ - -#include - -#include -#include -#include - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" - - -namespace google_breakpad { - - -using std::map; -using std::string; -using std::vector; - - -class Minidump; -template class RangeMap; - - -// MinidumpObject is the base of all Minidump* objects except for Minidump -// itself. -class MinidumpObject { - public: - virtual ~MinidumpObject() {} - - bool valid() const { return valid_; } - - protected: - explicit MinidumpObject(Minidump* minidump); - - // Refers to the Minidump object that is the ultimate parent of this - // Some MinidumpObjects are owned by other MinidumpObjects, but at the - // root of the ownership tree is always a Minidump. The Minidump object - // is kept here for access to its seeking and reading facilities, and - // for access to data about the minidump file itself, such as whether - // it should be byte-swapped. - Minidump* minidump_; - - // MinidumpObjects are not valid when created. When a subclass populates - // its own fields, it can set valid_ to true. Accessors and mutators may - // wish to consider or alter the valid_ state as they interact with - // objects. - bool valid_; -}; - - -// This class exists primarily to provide a virtual destructor in a base -// class common to all objects that might be stored in -// Minidump::mStreamObjects. Some object types (MinidumpContext) will -// never be stored in Minidump::mStreamObjects, but are represented as -// streams and adhere to the same interface, and may be derived from -// this class. -class MinidumpStream : public MinidumpObject { - public: - virtual ~MinidumpStream() {} - - protected: - explicit MinidumpStream(Minidump* minidump); - - private: - // Populate (and validate) the MinidumpStream. minidump_ is expected - // to be positioned at the beginning of the stream, so that the next - // read from the minidump will be at the beginning of the stream. - // expected_size should be set to the stream's length as contained in - // the MDRawDirectory record or other identifying record. A class - // that implements MinidumpStream can compare expected_size to a - // known size as an integrity check. - virtual bool Read(u_int32_t expected_size) = 0; -}; - - -// MinidumpContext carries a CPU-specific MDRawContext structure, which -// contains CPU context such as register states. Each thread has its -// own context, and the exception record, if present, also has its own -// context. Note that if the exception record is present, the context it -// refers to is probably what the user wants to use for the exception -// thread, instead of that thread's own context. The exception thread's -// context (as opposed to the exception record's context) will contain -// context for the exception handler (which performs minidump generation), -// and not the context that caused the exception (which is probably what the -// user wants). -class MinidumpContext : public MinidumpStream { - public: - virtual ~MinidumpContext(); - - // Returns an MD_CONTEXT_* value such as MD_CONTEXT_X86 or MD_CONTEXT_PPC - // identifying the CPU type that the context was collected from. The - // returned value will identify the CPU only, and will have any other - // MD_CONTEXT_* bits masked out. Returns 0 on failure. - u_int32_t GetContextCPU() const; - - // Returns raw CPU-specific context data for the named CPU type. If the - // context data does not match the CPU type or does not exist, returns - // NULL. - const MDRawContextX86* GetContextX86() const; - const MDRawContextPPC* GetContextPPC() const; - const MDRawContextAMD64* GetContextAMD64() const; - const MDRawContextSPARC* GetContextSPARC() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpException; - - explicit MinidumpContext(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // Free the CPU-specific context structure. - void FreeContext(); - - // If the minidump contains a SYSTEM_INFO_STREAM, makes sure that the - // system info stream gives an appropriate CPU type matching the context - // CPU type in context_cpu_type. Returns false if the CPU type does not - // match. Returns true if the CPU type matches or if the minidump does - // not contain a system info stream. - bool CheckAgainstSystemInfo(u_int32_t context_cpu_type); - - // Store this separately because of the weirdo AMD64 context - u_int32_t context_flags_; - - // The CPU-specific context structure. - union { - MDRawContextBase* base; - MDRawContextX86* x86; - MDRawContextPPC* ppc; - MDRawContextAMD64* amd64; - // on Solaris SPARC, sparc is defined as a numeric constant, - // so variables can NOT be named as sparc - MDRawContextSPARC* ctx_sparc; - } context_; -}; - - -// MinidumpMemoryRegion does not wrap any MDRaw structure, and only contains -// a reference to an MDMemoryDescriptor. This object is intended to wrap -// portions of a minidump file that contain memory dumps. In normal -// minidumps, each MinidumpThread owns a MinidumpMemoryRegion corresponding -// to the thread's stack memory. MinidumpMemoryList also gives access to -// memory regions in its list as MinidumpMemoryRegions. This class -// adheres to MemoryRegion so that it may be used as a data provider to -// the Stackwalker family of classes. -class MinidumpMemoryRegion : public MinidumpObject, - public MemoryRegion { - public: - virtual ~MinidumpMemoryRegion(); - - static void set_max_bytes(u_int32_t max_bytes) { max_bytes_ = max_bytes; } - static u_int32_t max_bytes() { return max_bytes_; } - - // Returns a pointer to the base of the memory region. Returns the - // cached value if available, otherwise, reads the minidump file and - // caches the memory region. - const u_int8_t* GetMemory(); - - // The address of the base of the memory region. - u_int64_t GetBase(); - - // The size, in bytes, of the memory region. - u_int32_t GetSize(); - - // Frees the cached memory region, if cached. - void FreeMemory(); - - // Obtains the value of memory at the pointer specified by address. - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpMemoryList; - - explicit MinidumpMemoryRegion(Minidump* minidump); - - // Identify the base address and size of the memory region, and the - // location it may be found in the minidump file. - void SetDescriptor(MDMemoryDescriptor* descriptor); - - // Implementation for GetMemoryAtAddress - template bool GetMemoryAtAddressInternal(u_int64_t address, - T* value); - - // The largest memory region that will be read from a minidump. The - // default is 1MB. - static u_int32_t max_bytes_; - - // Base address and size of the memory region, and its position in the - // minidump file. - MDMemoryDescriptor* descriptor_; - - // Cached memory. - vector* memory_; -}; - - -// MinidumpThread contains information about a thread of execution, -// including a snapshot of the thread's stack and CPU context. For -// the thread that caused an exception, the context carried by -// MinidumpException is probably desired instead of the CPU context -// provided here. -class MinidumpThread : public MinidumpObject { - public: - virtual ~MinidumpThread(); - - const MDRawThread* thread() const { return valid_ ? &thread_ : NULL; } - MinidumpMemoryRegion* GetMemory(); - MinidumpContext* GetContext(); - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawThread structure. Returns false if the thread ID cannot be - // determined. - bool GetThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpThreadList. - friend class MinidumpThreadList; - - explicit MinidumpThread(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpThreadList. No size checking is done, because - // MinidumpThreadList handles that directly. - bool Read(); - - MDRawThread thread_; - MinidumpMemoryRegion* memory_; - MinidumpContext* context_; -}; - - -// MinidumpThreadList contains all of the threads (as MinidumpThreads) in -// a process. -class MinidumpThreadList : public MinidumpStream { - public: - virtual ~MinidumpThreadList(); - - static void set_max_threads(u_int32_t max_threads) { - max_threads_ = max_threads; - } - static u_int32_t max_threads() { return max_threads_; } - - unsigned int thread_count() const { return valid_ ? thread_count_ : 0; } - - // Sequential access to threads. - MinidumpThread* GetThreadAtIndex(unsigned int index) const; - - // Random access to threads. - MinidumpThread* GetThreadByID(u_int32_t thread_id); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef map IDToThreadMap; - typedef vector MinidumpThreads; - - static const u_int32_t kStreamType = MD_THREAD_LIST_STREAM; - - explicit MinidumpThreadList(Minidump* aMinidump); - - bool Read(u_int32_t aExpectedSize); - - // The largest number of threads that will be read from a minidump. The - // default is 256. - static u_int32_t max_threads_; - - // Access to threads using the thread ID as the key. - IDToThreadMap id_to_thread_map_; - - // The list of threads. - MinidumpThreads* threads_; - u_int32_t thread_count_; -}; - - -// MinidumpModule wraps MDRawModule, which contains information about loaded -// code modules. Access is provided to various data referenced indirectly -// by MDRawModule, such as the module's name and a specification for where -// to locate debugging information for the module. -class MinidumpModule : public MinidumpObject, - public CodeModule { - public: - virtual ~MinidumpModule(); - - static void set_max_cv_bytes(u_int32_t max_cv_bytes) { - max_cv_bytes_ = max_cv_bytes; - } - static u_int32_t max_cv_bytes() { return max_cv_bytes_; } - - static void set_max_misc_bytes(u_int32_t max_misc_bytes) { - max_misc_bytes_ = max_misc_bytes; - } - static u_int32_t max_misc_bytes() { return max_misc_bytes_; } - - const MDRawModule* module() const { return valid_ ? &module_ : NULL; } - - // CodeModule implementation - virtual u_int64_t base_address() const { - return valid_ ? module_.base_of_image : static_cast(-1); - } - virtual u_int64_t size() const { return valid_ ? module_.size_of_image : 0; } - virtual string code_file() const; - virtual string code_identifier() const; - virtual string debug_file() const; - virtual string debug_identifier() const; - virtual string version() const; - virtual const CodeModule* Copy() const; - - // The CodeView record, which contains information to locate the module's - // debugging information (pdb). This is returned as u_int8_t* because - // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be - // of a type unknown to Breakpad, in which case the raw data will still be - // returned but no byte-swapping will have been performed. Check the - // record's signature in the first four bytes to differentiate between - // the various types. Current toolchains generate modules which carry - // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on - // success, and NULL on failure. On success, the optional |size| argument - // is set to the size of the CodeView record. - const u_int8_t* GetCVRecord(u_int32_t* size); - - // The miscellaneous debug record, which is obsolete. Current toolchains - // do not generate this type of debugging information (dbg), and this - // field is not expected to be present. Returns a pointer to the debugging - // record on success, and NULL on failure. On success, the optional |size| - // argument is set to the size of the debugging record. - const MDImageDebugMisc* GetMiscRecord(u_int32_t* size); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpModuleList. - friend class MinidumpModuleList; - - explicit MinidumpModule(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpModuleList. No size checking is done, because - // MinidumpModuleList handles that directly. - bool Read(); - - // Reads indirectly-referenced data, including the module name, CodeView - // record, and miscellaneous debugging record. This is necessary to allow - // MinidumpModuleList to fully construct MinidumpModule objects without - // requiring seeks to read a contiguous set of MinidumpModule objects. - // All auxiliary data should be available when Read is called, in order to - // allow the CodeModule getters to be const methods. - bool ReadAuxiliaryData(); - - // The largest number of bytes that will be read from a minidump for a - // CodeView record or miscellaneous debugging record, respectively. The - // default for each is 1024. - static u_int32_t max_cv_bytes_; - static u_int32_t max_misc_bytes_; - - // True after a successful Read. This is different from valid_, which is - // not set true until ReadAuxiliaryData also completes successfully. - // module_valid_ is only used by ReadAuxiliaryData and the functions it - // calls to determine whether the object is ready for auxiliary data to - // be read. - bool module_valid_; - - // True if debug info was read from the module. Certain modules - // may contain debug records in formats we don't support, - // so we can just set this to false to ignore them. - bool has_debug_info_; - - MDRawModule module_; - - // Cached module name. - const string* name_; - - // Cached CodeView record - this is MDCVInfoPDB20 or (likely) - // MDCVInfoPDB70, or possibly something else entirely. Stored as a u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* cv_record_; - - // If cv_record_ is present, cv_record_signature_ contains a copy of the - // CodeView record's first four bytes, for ease of determinining the - // type of structure that cv_record_ contains. - u_int32_t cv_record_signature_; - - // Cached MDImageDebugMisc (usually not present), stored as u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* misc_record_; -}; - - -// MinidumpModuleList contains all of the loaded code modules for a process -// in the form of MinidumpModules. It maintains a map of these modules -// so that it may easily provide a code module corresponding to a specific -// address. -class MinidumpModuleList : public MinidumpStream, - public CodeModules { - public: - virtual ~MinidumpModuleList(); - - static void set_max_modules(u_int32_t max_modules) { - max_modules_ = max_modules; - } - static u_int32_t max_modules() { return max_modules_; } - - // CodeModules implementation. - virtual unsigned int module_count() const { - return valid_ ? module_count_ : 0; - } - virtual const MinidumpModule* GetModuleForAddress(u_int64_t address) const; - virtual const MinidumpModule* GetMainModule() const; - virtual const MinidumpModule* GetModuleAtSequence( - unsigned int sequence) const; - virtual const MinidumpModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MinidumpModules; - - static const u_int32_t kStreamType = MD_MODULE_LIST_STREAM; - - explicit MinidumpModuleList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of modules that will be read from a minidump. The - // default is 1024. - static u_int32_t max_modules_; - - // Access to modules using addresses as the key. - RangeMap *range_map_; - - MinidumpModules *modules_; - u_int32_t module_count_; -}; - - -// MinidumpMemoryList corresponds to a minidump's MEMORY_LIST_STREAM stream, -// which references the snapshots of all of the memory regions contained -// within the minidump. For a normal minidump, this includes stack memory -// (also referenced by each MinidumpThread, in fact, the MDMemoryDescriptors -// here and in MDRawThread both point to exactly the same data in a -// minidump file, conserving space), as well as a 256-byte snapshot of memory -// surrounding the instruction pointer in the case of an exception. Other -// types of minidumps may contain significantly more memory regions. Full- -// memory minidumps contain all of a process' mapped memory. -class MinidumpMemoryList : public MinidumpStream { - public: - virtual ~MinidumpMemoryList(); - - static void set_max_regions(u_int32_t max_regions) { - max_regions_ = max_regions; - } - static u_int32_t max_regions() { return max_regions_; } - - unsigned int region_count() const { return valid_ ? region_count_ : 0; } - - // Sequential access to memory regions. - MinidumpMemoryRegion* GetMemoryRegionAtIndex(unsigned int index); - - // Random access to memory regions. Returns the region encompassing - // the address identified by address. - MinidumpMemoryRegion* GetMemoryRegionForAddress(u_int64_t address); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MemoryDescriptors; - typedef vector MemoryRegions; - - static const u_int32_t kStreamType = MD_MEMORY_LIST_STREAM; - - explicit MinidumpMemoryList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of memory regions that will be read from a minidump. - // The default is 256. - static u_int32_t max_regions_; - - // Access to memory regions using addresses as the key. - RangeMap *range_map_; - - // The list of descriptors. This is maintained separately from the list - // of regions, because MemoryRegion doesn't own its MemoryDescriptor, it - // maintains a pointer to it. descriptors_ provides the storage for this - // purpose. - MemoryDescriptors *descriptors_; - - // The list of regions. - MemoryRegions *regions_; - u_int32_t region_count_; -}; - - -// MinidumpException wraps MDRawExceptionStream, which contains information -// about the exception that caused the minidump to be generated, if the -// minidump was generated in an exception handler called as a result of -// an exception. It also provides access to a MinidumpContext object, -// which contains the CPU context for the exception thread at the time -// the exception occurred. -class MinidumpException : public MinidumpStream { - public: - virtual ~MinidumpException(); - - const MDRawExceptionStream* exception() const { - return valid_ ? &exception_ : NULL; - } - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawExceptionStream structure. Returns false if the thread ID cannot - // be determined. - bool GetThreadID(u_int32_t *thread_id) const; - - MinidumpContext* GetContext(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_EXCEPTION_STREAM; - - explicit MinidumpException(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawExceptionStream exception_; - MinidumpContext* context_; -}; - - -// MinidumpSystemInfo wraps MDRawSystemInfo and provides information about -// the system on which the minidump was generated. See also MinidumpMiscInfo. -class MinidumpSystemInfo : public MinidumpStream { - public: - virtual ~MinidumpSystemInfo(); - - const MDRawSystemInfo* system_info() const { - return valid_ ? &system_info_ : NULL; - } - - // GetOS and GetCPU return textual representations of the operating system - // and CPU that produced the minidump. Unlike most other Minidump* methods, - // they return string objects, not weak pointers. Defined values for - // GetOS() are "mac", "windows", and "linux". Defined values for GetCPU - // are "x86" and "ppc". These methods return an empty string when their - // values are unknown. - string GetOS(); - string GetCPU(); - - // I don't know what CSD stands for, but this field is documented as - // returning a textual representation of the OS service pack. On other - // platforms, this provides additional information about an OS version - // level beyond major.minor.micro. Returns NULL if unknown. - const string* GetCSDVersion(); - - // If a CPU vendor string can be determined, returns a pointer to it, - // otherwise, returns NULL. CPU vendor strings can be determined from - // x86 CPUs with CPUID 0. - const string* GetCPUVendor(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_SYSTEM_INFO_STREAM; - - explicit MinidumpSystemInfo(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawSystemInfo system_info_; - - // Textual representation of the OS service pack, for minidumps produced - // by MiniDumpWriteDump on Windows. - const string* csd_version_; - - // A string identifying the CPU vendor, if known. - const string* cpu_vendor_; -}; - - -// MinidumpMiscInfo wraps MDRawMiscInfo and provides information about -// the process that generated the minidump, and optionally additional system -// information. See also MinidumpSystemInfo. -class MinidumpMiscInfo : public MinidumpStream { - public: - const MDRawMiscInfo* misc_info() const { - return valid_ ? &misc_info_ : NULL; - } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_MISC_INFO_STREAM; - - explicit MinidumpMiscInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawMiscInfo misc_info_; -}; - - -// MinidumpBreakpadInfo wraps MDRawBreakpadInfo, which is an optional stream in -// a minidump that provides additional information about the process state -// at the time the minidump was generated. -class MinidumpBreakpadInfo : public MinidumpStream { - public: - const MDRawBreakpadInfo* breakpad_info() const { - return valid_ ? &breakpad_info_ : NULL; - } - - // These thread IDs are used to determine if threads deserve special - // treatment, so special getters are provided to retrieve this data from - // the MDRawBreakpadInfo structure. The getters return false if the thread - // IDs cannot be determined. - bool GetDumpThreadID(u_int32_t *thread_id) const; - bool GetRequestingThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_BREAKPAD_INFO_STREAM; - - explicit MinidumpBreakpadInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawBreakpadInfo breakpad_info_; -}; - - -// Minidump is the user's interface to a minidump file. It wraps MDRawHeader -// and provides access to the minidump's top-level stream directory. -class Minidump { - public: - // path is the pathname of a file containing the minidump. - explicit Minidump(const string& path); - - ~Minidump(); - - static void set_max_streams(u_int32_t max_streams) { - max_streams_ = max_streams; - } - static u_int32_t max_streams() { return max_streams_; } - - static void set_max_string_length(u_int32_t max_string_length) { - max_string_length_ = max_string_length; - } - static u_int32_t max_string_length() { return max_string_length_; } - - const MDRawHeader* header() const { return valid_ ? &header_ : NULL; } - - // Reads the minidump file's header and top-level stream directory. - // The minidump is expected to be positioned at the beginning of the - // header. Read() sets up the stream list and map, and validates the - // Minidump object. - bool Read(); - - // The next set of methods are stubs that call GetStream. They exist to - // force code generation of the templatized API within the module, and - // to avoid exposing an ugly API (GetStream needs to accept a garbage - // parameter). - MinidumpThreadList* GetThreadList(); - MinidumpModuleList* GetModuleList(); - MinidumpMemoryList* GetMemoryList(); - MinidumpException* GetException(); - MinidumpSystemInfo* GetSystemInfo(); - MinidumpMiscInfo* GetMiscInfo(); - MinidumpBreakpadInfo* GetBreakpadInfo(); - - // The next set of methods are provided for users who wish to access - // data in minidump files directly, while leveraging the rest of - // this class and related classes to handle the basic minidump - // structure and known stream types. - - unsigned int GetDirectoryEntryCount() const { - return valid_ ? header_.stream_count : 0; - } - const MDRawDirectory* GetDirectoryEntryAtIndex(unsigned int index) const; - - // The next 2 methods are lower-level I/O routines. They use fd_. - - // Reads count bytes from the minidump at the current position into - // the storage area pointed to by bytes. bytes must be of sufficient - // size. After the read, the file position is advanced by count. - bool ReadBytes(void* bytes, size_t count); - - // Sets the position of the minidump file to offset. - bool SeekSet(off_t offset); - - // Returns the current position of the minidump file. - off_t Tell() { return valid_ ? lseek(fd_, 0, SEEK_CUR) : (off_t)-1; } - - // The next 2 methods are medium-level I/O routines. - - // ReadString returns a string which is owned by the caller! offset - // specifies the offset that a length-encoded string is stored at in the - // minidump file. - string* ReadString(off_t offset); - - // SeekToStreamType positions the file at the beginning of a stream - // identified by stream_type, and informs the caller of the stream's - // length by setting *stream_length. Because stream_map maps each stream - // type to only one stream in the file, this might mislead the user into - // thinking that the stream that this seeks to is the only stream with - // type stream_type. That can't happen for streams that these classes - // deal with directly, because they're only supposed to be present in the - // file singly, and that's verified when stream_map_ is built. Users who - // are looking for other stream types should be aware of this - // possibility, and consider using GetDirectoryEntryAtIndex (possibly - // with GetDirectoryEntryCount) if expecting multiple streams of the same - // type in a single minidump file. - bool SeekToStreamType(u_int32_t stream_type, u_int32_t* stream_length); - - bool swap() const { return valid_ ? swap_ : false; } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // MinidumpStreamInfo is used in the MinidumpStreamMap. It lets - // the Minidump object locate interesting streams quickly, and - // provides a convenient place to stash MinidumpStream objects. - struct MinidumpStreamInfo { - MinidumpStreamInfo() : stream_index(0), stream(NULL) {} - ~MinidumpStreamInfo() { delete stream; } - - // Index into the MinidumpDirectoryEntries vector - unsigned int stream_index; - - // Pointer to the stream if cached, or NULL if not yet populated - MinidumpStream* stream; - }; - - typedef vector MinidumpDirectoryEntries; - typedef map MinidumpStreamMap; - - template T* GetStream(T** stream); - - // Opens the minidump file, or if already open, seeks to the beginning. - bool Open(); - - // The largest number of top-level streams that will be read from a minidump. - // Note that streams are only read (and only consume memory) as needed, - // when directed by the caller. The default is 128. - static u_int32_t max_streams_; - - // The maximum length of a UTF-16 string that will be read from a minidump - // in 16-bit words. The default is 1024. UTF-16 strings are converted - // to UTF-8 when stored in memory, and each UTF-16 word will be represented - // by as many as 3 bytes in UTF-8. - static unsigned int max_string_length_; - - MDRawHeader header_; - - // The list of streams. - MinidumpDirectoryEntries* directory_; - - // Access to streams using the stream type as the key. - MinidumpStreamMap* stream_map_; - - // The pathname of the minidump file to process, set in the constructor. - const string path_; - - // The file descriptor for all file I/O. Used by ReadBytes and SeekSet. - // Set based on the |path_| member by Open, which is called by Read. - int fd_; - - // swap_ is true if the minidump file should be byte-swapped. If the - // minidump was produced by a CPU that is other-endian than the CPU - // processing the minidump, this will be true. If the two CPUs are - // same-endian, this will be false. - bool swap_; - - // Validity of the Minidump structure, false immediately after - // construction or after a failed Read(); true following a successful - // Read(). - bool valid_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump_processor.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump_processor.h deleted file mode 100644 index 73447f97..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/minidump_processor.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class Minidump; -class ProcessState; -class SourceLineResolverInterface; -class SymbolSupplier; -class SystemInfo; - -class MinidumpProcessor { - public: - // Return type for Process() - enum ProcessResult { - PROCESS_OK, // the minidump was processed successfully - PROCESS_ERROR, // there was an error processing the minidump - PROCESS_INTERRUPTED // processing was interrupted by the SymbolSupplier - }; - - // Initializes this MinidumpProcessor. supplier should be an - // implementation of the SymbolSupplier abstract base class. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - ~MinidumpProcessor(); - - // Processes the minidump file and fills process_state with the result. - ProcessResult Process(const string &minidump_file, - ProcessState *process_state); - - // Populates the cpu_* fields of the |info| parameter with textual - // representations of the CPU type that the minidump in |dump| was - // produced on. Returns false if this information is not available in - // the minidump. - static bool GetCPUInfo(Minidump *dump, SystemInfo *info); - - // Populates the os_* fields of the |info| parameter with textual - // representations of the operating system that the minidump in |dump| - // was produced on. Returns false if this information is not available in - // the minidump. - static bool GetOSInfo(Minidump *dump, SystemInfo *info); - - // Returns a textual representation of the reason that a crash occurred, - // if the minidump in dump was produced as a result of a crash. Returns - // an empty string if this information cannot be determined. If address - // is non-NULL, it will be set to contain the address that caused the - // exception, if this information is available. This will be a code - // address when the crash was caused by problems such as illegal - // instructions or divisions by zero, or a data address when the crash - // was caused by a memory access violation. - static string GetCrashReason(Minidump *dump, u_int64_t *address); - - private: - SymbolSupplier *supplier_; - SourceLineResolverInterface *resolver_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/process_state.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/process_state.h deleted file mode 100644 index afbbb193..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/process_state.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state.h: A snapshot of a process, in a fully-digested state. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ - -#include -#include -#include "google_breakpad/processor/system_info.h" -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -class CallStack; -class CodeModules; - -class ProcessState { - public: - ProcessState() : modules_(NULL) { Clear(); } - ~ProcessState(); - - // Resets the ProcessState to its default values - void Clear(); - - // Accessors. See the data declarations below. - u_int32_t time_date_stamp() const { return time_date_stamp_; } - bool crashed() const { return crashed_; } - string crash_reason() const { return crash_reason_; } - u_int64_t crash_address() const { return crash_address_; } - int requesting_thread() const { return requesting_thread_; } - const vector* threads() const { return &threads_; } - const SystemInfo* system_info() const { return &system_info_; } - const CodeModules* modules() const { return modules_; } - - private: - // MinidumpProcessor is responsible for building ProcessState objects. - friend class MinidumpProcessor; - - // The time-date stamp of the minidump (time_t format) - u_int32_t time_date_stamp_; - - // True if the process crashed, false if the dump was produced outside - // of an exception handler. - bool crashed_; - - // If the process crashed, the type of crash. OS- and possibly CPU- - // specific. For example, "EXCEPTION_ACCESS_VIOLATION" (Windows), - // "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" - // (other Unix). - string crash_reason_; - - // If the process crashed, and if crash_reason implicates memory, - // the memory address that caused the crash. For data access errors, - // this will be the data address that caused the fault. For code errors, - // this will be the address of the instruction that caused the fault. - u_int64_t crash_address_; - - // The index of the thread that requested a dump be written in the - // threads vector. If a dump was produced as a result of a crash, this - // will point to the thread that crashed. If the dump was produced as - // by user code without crashing, and the dump contains extended Breakpad - // information, this will point to the thread that requested the dump. - // If the dump was not produced as a result of an exception and no - // extended Breakpad information is present, this field will be set to -1, - // indicating that the dump thread is not available. - int requesting_thread_; - - // Stacks for each thread (except possibly the exception handler - // thread) at the time of the crash. - vector threads_; - - // OS and CPU information. - SystemInfo system_info_; - - // The modules that were loaded into the process represented by the - // ProcessState. - const CodeModules *modules_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/source_line_resolver_interface.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/source_line_resolver_interface.h deleted file mode 100644 index 93ef85d2..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/source_line_resolver_interface.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Abstract interface to return function/file/line info for a memory address. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -struct StackFrame; -struct StackFrameInfo; - -class SourceLineResolverInterface { - public: - typedef u_int64_t MemAddr; - - virtual ~SourceLineResolverInterface() {} - - // Adds a module to this resolver, returning true on success. - // - // module_name may be an arbitrary string. Typically, it will be the - // filename of the module, optionally with version identifiers. - // - // map_file should contain line/address mappings for this module. - virtual bool LoadModule(const string &module_name, - const string &map_file) = 0; - // Same as above, but takes the contents of a pre-read map buffer - virtual bool LoadModuleUsingMapBuffer(const string &module_name, - const string &map_buffer) = 0; - - // Returns true if a module with the given name has been loaded. - virtual bool HasModule(const string &module_name) const = 0; - - // Fills in the function_base, function_name, source_file_name, - // and source_line fields of the StackFrame. The instruction and - // module_name fields must already be filled in. Additional debugging - // information, if available, is returned. If the information is not - // available, returns NULL. A NULL return value does not indicate an - // error. The caller takes ownership of any returned StackFrameInfo - // object. - virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const = 0; - - protected: - // SourceLineResolverInterface cannot be instantiated except by subclasses - SourceLineResolverInterface() {} -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame.h deleted file mode 100644 index b330f8ae..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -using std::string; - -struct StackFrame { - StackFrame() - : instruction(), - module(NULL), - function_name(), - function_base(), - source_file_name(), - source_line(), - source_line_base() {} - virtual ~StackFrame() {} - - // The program counter location as an absolute virtual address. For the - // innermost called frame in a stack, this will be an exact program counter - // or instruction pointer value. For all other frames, this will be within - // the instruction that caused execution to branch to a called function, - // but may not necessarily point to the exact beginning of that instruction. - u_int64_t instruction; - - // The module in which the instruction resides. - const CodeModule *module; - - // The function name, may be omitted if debug symbols are not available. - string function_name; - - // The start address of the function, may be omitted if debug symbols - // are not available. - u_int64_t function_base; - - // The source file name, may be omitted if debug symbols are not available. - string source_file_name; - - // The (1-based) source line number, may be omitted if debug symbols are - // not available. - int source_line; - - // The start address of the source line, may be omitted if debug symbols - // are not available. - u_int64_t source_line_base; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame_cpu.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame_cpu.h deleted file mode 100644 index 70823b9c..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stack_frame_cpu.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stack_frame_cpu.h: CPU-specific StackFrame extensions. -// -// These types extend the StackFrame structure to carry CPU-specific register -// state. They are defined in this header instead of stack_frame.h to -// avoid the need to include minidump_format.h when only the generic -// StackFrame type is needed. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stack_frame.h" - -namespace google_breakpad { - -struct StackFrameX86 : public StackFrame { - // ContextValidity has one entry for each relevant hardware pointer register - // (%eip and %esp) and one entry for each nonvolatile (callee-save) register. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_EIP = 1 << 0, - CONTEXT_VALID_ESP = 1 << 1, - CONTEXT_VALID_EBP = 1 << 2, - CONTEXT_VALID_EBX = 1 << 3, - CONTEXT_VALID_ESI = 1 << 4, - CONTEXT_VALID_EDI = 1 << 5, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameX86() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextX86 context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFramePPC : public StackFrame { - // ContextValidity should eventually contain entries for the validity of - // other nonvolatile (callee-save) registers as in - // StackFrameX86::ContextValidity, but the ppc stackwalker doesn't currently - // locate registers other than the ones listed here. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_SRR0 = 1 << 0, - CONTEXT_VALID_GPR1 = 1 << 1, - CONTEXT_VALID_ALL = -1 - }; - - StackFramePPC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextPPC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameAMD64 : public StackFrame { - // ContextValidity has one entry for each relevant hardware pointer register - // (%rip and %rsp) and one entry for each nonvolatile (callee-save) register. - //FIXME: validate this list - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_RIP = 1 << 0, - CONTEXT_VALID_RSP = 1 << 1, - CONTEXT_VALID_RBP = 1 << 2, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextAMD64 context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameSPARC : public StackFrame { - // to be confirmed - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_PC = 1 << 0, - CONTEXT_VALID_SP = 1 << 1, - CONTEXT_VALID_FP = 1 << 2, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameSPARC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextSPARC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stackwalker.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stackwalker.h deleted file mode 100644 index c463fd80..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/stackwalker.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker.h: Generic stackwalker. -// -// The Stackwalker class is an abstract base class providing common generic -// methods that apply to stacks from all systems. Specific implementations -// will extend this class by providing GetContextFrame and GetCallerFrame -// methods to fill in system-specific data in a StackFrame structure. -// Stackwalker assembles these StackFrame strucutres into a CallStack. -// -// Author: Mark Mentovai - - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ - -#include - -namespace google_breakpad { - -class CallStack; -class CodeModules; -template class linked_ptr; -class MemoryRegion; -class MinidumpContext; -class SourceLineResolverInterface; -struct StackFrame; -struct StackFrameInfo; -class SymbolSupplier; -class SystemInfo; - -using std::vector; - - -class Stackwalker { - public: - virtual ~Stackwalker() {} - - // Populates the given CallStack by calling GetContextFrame and - // GetCallerFrame. The frames are further processed to fill all available - // data. Returns true if the stackwalk completed, or false if it was - // interrupted by SymbolSupplier::GetSymbolFile(). - bool Walk(CallStack *stack); - - // Returns a new concrete subclass suitable for the CPU that a stack was - // generated on, according to the CPU type indicated by the context - // argument. If no suitable concrete subclass exists, returns NULL. - static Stackwalker* StackwalkerForCPU(const SystemInfo *system_info, - MinidumpContext *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - protected: - // system_info identifies the operating system, NULL or empty if unknown. - // memory identifies a MemoryRegion that provides the stack memory - // for the stack to walk. modules, if non-NULL, is a CodeModules - // object that is used to look up which code module each stack frame is - // associated with. supplier is an optional caller-supplied SymbolSupplier - // implementation. If supplier is NULL, source line info will not be - // resolved. resolver is an instance of SourceLineResolverInterface - // (see source_line_resolver_interface.h and basic_source_line_resolver.h). - // If resolver is NULL, source line info will not be resolved. - Stackwalker(const SystemInfo *system_info, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - // Information about the system that produced the minidump. Subclasses - // and the SymbolSupplier may find this information useful. - const SystemInfo *system_info_; - - // The stack memory to walk. Subclasses will require this region to - // get information from the stack. - MemoryRegion *memory_; - - // A list of modules, for populating each StackFrame's module information. - // This field is optional and may be NULL. - const CodeModules *modules_; - - private: - // Obtains the context frame, the innermost called procedure in a stack - // trace. Returns NULL on failure. GetContextFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetContextFrame() = 0; - - // Obtains a caller frame. Each call to GetCallerFrame should return the - // frame that called the last frame returned by GetContextFrame or - // GetCallerFrame. To aid this purpose, stack contains the CallStack - // made of frames that have already been walked. GetCallerFrame should - // return NULL on failure or when there are no more caller frames (when - // the end of the stack has been reached). GetCallerFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) = 0; - - // The optional SymbolSupplier for resolving source line info. - SymbolSupplier *supplier_; - - // The SourceLineResolver implementation - SourceLineResolverInterface *resolver_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/symbol_supplier.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/symbol_supplier.h deleted file mode 100644 index 7b9d00e4..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/symbol_supplier.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The caller may implement the SymbolSupplier abstract base class -// to provide symbols for a given module. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ - -#include - -namespace google_breakpad { - -using std::string; -class CodeModule; -class SystemInfo; - -class SymbolSupplier { - public: - // Result type for GetSymbolFile - enum SymbolResult { - // no symbols were found, but continue processing - NOT_FOUND, - - // symbols were found, and the path has been placed in symbol_file - FOUND, - - // stops processing the minidump immediately - INTERRUPT - }; - - virtual ~SymbolSupplier() {} - - // Retrieves the symbol file for the given CodeModule, placing the - // path in symbol_file if successful. system_info contains strings - // identifying the operating system and CPU; SymbolSupplier may use - // to help locate the symbol file. system_info may be NULL or its - // fields may be empty if these values are unknown. symbol_file - // must be a pointer to a valid string - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) = 0; - // Same as above, except also places symbol data into symbol_data. - // If symbol_data is NULL, the data is not returned. - // TODO(nealsid) Once we have symbol data caching behavior implemented - // investigate making all symbol suppliers implement all methods, - // and make this pure virtual - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/system_info.h b/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/system_info.h deleted file mode 100644 index fdbdbfd6..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/google_breakpad/processor/system_info.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// system_info.h: Information about the system that was running a program -// when a crash report was produced. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ - -#include - -namespace google_breakpad { - -using std::string; - -struct SystemInfo { - public: - SystemInfo() : os(), os_short(), os_version(), cpu(), cpu_info(), - cpu_count(0) {} - - // Resets the SystemInfo object to its default values. - void Clear() { - os.clear(); - os_short.clear(); - os_version.clear(); - cpu.clear(); - cpu_info.clear(); - cpu_count = 0; - } - - // A string identifying the operating system, such as "Windows NT", - // "Mac OS X", or "Linux". If the information is present in the dump but - // its value is unknown, this field will contain a numeric value. If - // the information is not present in the dump, this field will be empty. - string os; - - // A short form of the os string, using lowercase letters and no spaces, - // suitable for use in a filesystem. Possible values are "windows", - // "mac", and "linux". Empty if the information is not present in the dump - // or if the OS given by the dump is unknown. The values stored in this - // field should match those used by MinidumpSystemInfo::GetOS. - string os_short; - - // A string identifying the version of the operating system, such as - // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not - // contain this information, this field will be empty. - string os_version; - - // A string identifying the basic CPU family, such as "x86" or "ppc". - // If this information is present in the dump but its value is unknown, - // this field will contain a numeric value. If the information is not - // present in the dump, this field will be empty. The values stored in - // this field should match those used by MinidumpSystemInfo::GetCPU. - string cpu; - - // A string further identifying the specific CPU, such as - // "GenuineIntel level 6 model 13 stepping 8". If the information is not - // present in the dump, or additional identifying information is not - // defined for the CPU family, this field will be empty. - string cpu_info; - - // The number of processors in the system. Will be greater than one for - // multi-core systems. - int cpu_count; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map-inl.h deleted file mode 100644 index d88b4fcc..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map-inl.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map-inl.h: Address map implementation. -// -// See address_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_INL_H__ -#define PROCESSOR_ADDRESS_MAP_INL_H__ - -#include - -#include "processor/address_map.h" -#include "processor/logging.h" - -namespace google_breakpad { - -template -bool AddressMap::Store(const AddressType &address, - const EntryType &entry) { - // Ensure that the specified address doesn't conflict with something already - // in the map. - if (map_.find(address) != map_.end()) { - BPLOG(INFO) << "Store failed, address " << HexString(address) << - " is already present"; - return false; - } - - map_.insert(MapValue(address, entry)); - return true; -} - -template -bool AddressMap::Retrieve( - const AddressType &address, - EntryType *entry, AddressType *entry_address) const { - BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|"; - assert(entry); - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second; - if (entry_address) - *entry_address = iterator->first; - - return true; -} - -template -void AddressMap::Clear() { - map_.clear(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map.h deleted file mode 100644 index 14139e7a..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/address_map.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map.h: Address maps. -// -// An address map contains a set of objects keyed by address. Objects are -// retrieved from the map by returning the object with the highest key less -// than or equal to the lookup key. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_H__ -#define PROCESSOR_ADDRESS_MAP_H__ - -#include - -namespace google_breakpad { - -template -class AddressMap { - public: - AddressMap() : map_() {} - - // Inserts an entry into the map. Returns false without storing the entry - // if an entry is already stored in the map at the same address as specified - // by the address argument. - bool Store(const AddressType &address, const EntryType &entry); - - // Locates the entry stored at the highest address less than or equal to - // the address argument. If there is no such range, returns false. The - // entry is returned in entry, which is a required argument. If - // entry_address is not NULL, it will be set to the address that the entry - // was stored at. - bool Retrieve(const AddressType &address, - EntryType *entry, AddressType *entry_address) const; - - // Empties the address map, restoring it to the same state as when it was - // initially created. - void Clear(); - - private: - // Convenience types. - typedef std::map AddressToEntryMap; - typedef typename AddressToEntryMap::const_iterator MapConstIterator; - typedef typename AddressToEntryMap::value_type MapValue; - - // Maps the address of each entry to an EntryType. - AddressToEntryMap map_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_H__ - diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_module.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_module.h deleted file mode 100644 index 5c9f75f1..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_module.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_module.h: Carries information about code modules that are loaded -// into a process. -// -// This is a basic concrete implementation of CodeModule. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModule interface. It exists to provide a CodeModule implementation -// a place to store information when the life of the original object (such as -// a MinidumpModule) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULE_H__ -#define PROCESSOR_BASIC_CODE_MODULE_H__ - -#include - -#include "google_breakpad/processor/code_module.h" - -namespace google_breakpad { - -using std::string; - -class BasicCodeModule : public CodeModule { - public: - // Creates a new BasicCodeModule given any existing CodeModule - // implementation. This is useful to make a copy of the data relevant to - // the CodeModule interface without requiring all of the resources that - // other CodeModule implementations may require. - explicit BasicCodeModule(const CodeModule *that) - : base_address_(that->base_address()), - size_(that->size()), - code_file_(that->code_file()), - code_identifier_(that->code_identifier()), - debug_file_(that->debug_file()), - debug_identifier_(that->debug_identifier()), - version_(that->version()) {} - virtual ~BasicCodeModule() {} - - // See code_module.h for descriptions of these methods and the associated - // members. - virtual u_int64_t base_address() const { return base_address_; } - virtual u_int64_t size() const { return size_; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return code_identifier_; } - virtual string debug_file() const { return debug_file_; } - virtual string debug_identifier() const { return debug_identifier_; } - virtual string version() const { return version_; } - virtual const CodeModule* Copy() const { return new BasicCodeModule(this); } - - private: - u_int64_t base_address_; - u_int64_t size_; - string code_file_; - string code_identifier_; - string debug_file_; - string debug_identifier_; - string version_; - - // Disallow copy constructor and assignment operator. - BasicCodeModule(const BasicCodeModule &that); - void operator=(const BasicCodeModule &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_modules.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_modules.h deleted file mode 100644 index df87fc49..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/basic_code_modules.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_modules.h: Contains all of the CodeModule objects that -// were loaded into a single process. -// -// This is a basic concrete implementation of CodeModules. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModules interface. It exists to provide a CodeModules -// implementation a place to store information when the life of the original -// object (such as a MinidumpModuleList) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULES_H__ -#define PROCESSOR_BASIC_CODE_MODULES_H__ - -#include "google_breakpad/processor/code_modules.h" - -namespace google_breakpad { - -template class linked_ptr; -template class RangeMap; - -class BasicCodeModules : public CodeModules { - public: - // Creates a new BasicCodeModules object given any existing CodeModules - // implementation. This is useful to make a copy of the data relevant to - // the CodeModules and CodeModule interfaces without requiring all of the - // resources that other implementations may require. A copy will be - // made of each contained CodeModule using CodeModule::Copy. - explicit BasicCodeModules(const CodeModules *that); - - virtual ~BasicCodeModules(); - - // See code_modules.h for descriptions of these methods. - virtual unsigned int module_count() const; - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const; - virtual const CodeModule* GetMainModule() const; - virtual const CodeModule* GetModuleAtSequence(unsigned int sequence) const; - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - private: - // The base address of the main module. - u_int64_t main_address_; - - // The map used to contain each CodeModule, keyed by each CodeModule's - // address range. - RangeMap > *map_; - - // Disallow copy constructor and assignment operator. - BasicCodeModules(const BasicCodeModules &that); - void operator=(const BasicCodeModules &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map-inl.h deleted file mode 100644 index 5cc498df..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map-inl.h +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map-inl.h: Hierarchically-organized range map implementation. -// -// See contained_range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ - - -#include - -#include "processor/contained_range_map.h" -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -ContainedRangeMap::~ContainedRangeMap() { - // Clear frees the children pointed to by the map, and frees the map itself. - Clear(); -} - - -template -bool ContainedRangeMap::StoreRange( - const AddressType &base, const AddressType &size, const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - //TODO(nealsid) We are commenting this out in order to prevent - // excessive logging. We plan to move to better logging as this - // failure happens quite often and is expected(see comment in - // basic_source_line_resolver.cc:671). - // BPLOG(INFO) << "StoreRange failed, " << HexString(base) << "+" - // << HexString(size) << ", " << HexString(high); - return false; - } - - if (!map_) - map_ = new AddressToRangeMap(); - - MapIterator iterator_base = map_->lower_bound(base); - MapIterator iterator_high = map_->lower_bound(high); - MapIterator iterator_end = map_->end(); - - if (iterator_base == iterator_high && iterator_base != iterator_end && - base >= iterator_base->second->base_) { - // The new range is entirely within an existing child range. - - // If the new range's geometry is exactly equal to an existing child - // range's, it violates the containment rules, and an attempt to store - // it must fail. iterator_base->first contains the key, which was the - // containing child's high address. - if (iterator_base->second->base_ == base && iterator_base->first == high) { - // TODO(nealsid): See the TODO above on why this is commented out. -// BPLOG(INFO) << "StoreRange failed, identical range is already " -// "present: " << HexString(base) << "+" << HexString(size); - return false; - } - - // Pass the new range on to the child to attempt to store. - return iterator_base->second->StoreRange(base, size, entry); - } - - // iterator_high might refer to an irrelevant range: one whose base address - // is higher than the new range's high address. Set contains_high to true - // only if iterator_high refers to a range that is at least partially - // within the new range. - bool contains_high = iterator_high != iterator_end && - high >= iterator_high->second->base_; - - // If the new range encompasses any existing child ranges, it must do so - // fully. Partial containment isn't allowed. - if ((iterator_base != iterator_end && base > iterator_base->second->base_) || - (contains_high && high < iterator_high->first)) { - // TODO(mmentovai): Some symbol files will trip this check frequently - // on STACK lines. Too many messages will be produced. These are more - // suitable for a DEBUG channel than an INFO channel. - // BPLOG(INFO) << "StoreRange failed, new range partially contains " - // "existing range: " << HexString(base) << "+" << - // HexString(size); - return false; - } - - // When copying and erasing contained ranges, the "end" iterator needs to - // point one past the last item of the range to copy. If contains_high is - // false, the iterator's already in the right place; the increment is safe - // because contains_high can't be true if iterator_high == iterator_end. - if (contains_high) - ++iterator_high; - - // Optimization: if the iterators are equal, no child ranges would be - // moved. Create the new child range with a NULL map to conserve space - // in leaf nodes, of which there will be many. - AddressToRangeMap *child_map = NULL; - - if (iterator_base != iterator_high) { - // The children of this range that are contained by the new range must - // be transferred over to the new range. Create the new child range map - // and copy the pointers to range maps it should contain into it. - child_map = new AddressToRangeMap(iterator_base, iterator_high); - - // Remove the copied child pointers from this range's map of children. - map_->erase(iterator_base, iterator_high); - } - - // Store the new range in the map by its high address. Any children that - // the new child range contains were formerly children of this range but - // are now this range's grandchildren. Ownership of these is transferred - // to the new child range. - map_->insert(MapValue(high, - new ContainedRangeMap(base, entry, child_map))); - return true; -} - - -template -bool ContainedRangeMap::RetrieveRange( - const AddressType &address, EntryType *entry) const { - BPLOG_IF(ERROR, !entry) << "ContainedRangeMap::RetrieveRange requires " - "|entry|"; - assert(entry); - - // If nothing was ever stored, then there's nothing to retrieve. - if (!map_) - return false; - - // Get an iterator to the child range whose high address is equal to or - // greater than the supplied address. If the supplied address is higher - // than all of the high addresses in the range, then this range does not - // contain a child at address, so return false. If the supplied address - // is lower than the base address of the child range, then it is not within - // the child range, so return false. - MapConstIterator iterator = map_->lower_bound(address); - if (iterator == map_->end() || address < iterator->second->base_) - return false; - - // The child in iterator->second contains the specified address. Find out - // if it has a more-specific descendant that also contains it. If it does, - // it will set |entry| appropriately. If not, set |entry| to the child. - if (!iterator->second->RetrieveRange(address, entry)) - *entry = iterator->second->entry_; - - return true; -} - - -template -void ContainedRangeMap::Clear() { - if (map_) { - MapConstIterator end = map_->end(); - for (MapConstIterator child = map_->begin(); child != end; ++child) - delete child->second; - - delete map_; - map_ = NULL; - } -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map.h deleted file mode 100644 index f30016f3..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/contained_range_map.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map.h: Hierarchically-organized range maps. -// -// A contained range map is similar to a standard range map, except it allows -// objects to be organized hierarchically. A contained range map allows -// objects to contain other objects. It is not sensitive to the order that -// objects are added to the map: larger, more general, containing objects -// may be added either before or after smaller, more specific, contained -// ones. -// -// Contained range maps guarantee that each object may only contain smaller -// objects than itself, and that a parent object may only contain child -// objects located entirely within the parent's address space. Attempts -// to introduce objects (via StoreRange) that violate these rules will fail. -// Retrieval (via RetrieveRange) always returns the most specific (smallest) -// object that contains the address being queried. Note that while it is -// not possible to insert two objects into a map that have exactly the same -// geometry (base address and size), it is possible to completely mask a -// larger object by inserting smaller objects that entirely fill the larger -// object's address space. -// -// Internally, contained range maps are implemented as a tree. Each tree -// node except for the root node describes an object in the map. Each node -// maintains its list of children in a map similar to a standard range map, -// keyed by the highest address that each child occupies. Each node's -// children occupy address ranges entirely within the node. The root node -// is the only node directly accessible to the user, and represents the -// entire address space. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - - -template -class ContainedRangeMap { - public: - // The default constructor creates a ContainedRangeMap with no geometry - // and no entry, and as such is only suitable for the root node of a - // ContainedRangeMap tree. - ContainedRangeMap() : base_(), entry_(), map_(NULL) {} - - ~ContainedRangeMap(); - - // Inserts a range into the map. If the new range is encompassed by - // an existing child range, the new range is passed into the child range's - // StoreRange method. If the new range encompasses any existing child - // ranges, those child ranges are moved to the new range, becoming - // grandchildren of this ContainedRangeMap. Returns false for a - // parameter error, or if the ContainedRangeMap hierarchy guarantees - // would be violated. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Retrieves the most specific (smallest) descendant range encompassing - // the specified address. This method will only return entries held by - // child ranges, and not the entry contained by |this|. This is necessary - // to support a sparsely-populated root range. If no descendant range - // encompasses the address, returns false. - bool RetrieveRange(const AddressType &address, EntryType *entry) const; - - // Removes all children. Note that Clear only removes descendants, - // leaving the node on which it is called intact. Because the only - // meaningful things contained by a root node are descendants, this - // is sufficient to restore an entire ContainedRangeMap to its initial - // empty state when called on the root node. - void Clear(); - - private: - // AddressToRangeMap stores pointers. This makes reparenting simpler in - // StoreRange, because it doesn't need to copy entire objects. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::iterator MapIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Creates a new ContainedRangeMap with the specified base address, entry, - // and initial child map, which may be NULL. This is only used internally - // by ContainedRangeMap when it creates a new child. - ContainedRangeMap(const AddressType &base, const EntryType &entry, - AddressToRangeMap *map) - : base_(base), entry_(entry), map_(map) {} - - // The base address of this range. The high address does not need to - // be stored, because it is used as the key to an object in its parent's - // map, and all ContainedRangeMaps except for the root range are contained - // within maps. The root range does not actually contain an entry, so its - // base_ field is meaningless, and the fact that it has no parent and thus - // no key is unimportant. For this reason, the base_ field should only be - // is accessed on child ContainedRangeMap objects, and never on |this|. - const AddressType base_; - - // The entry corresponding to this range. The root range does not - // actually contain an entry, so its entry_ field is meaningless. For - // this reason, the entry_ field should only be accessed on child - // ContainedRangeMap objects, and never on |this|. - const EntryType entry_; - - // The map containing child ranges, keyed by each child range's high - // address. This is a pointer to avoid allocating map structures for - // leaf nodes, where they are not needed. - AddressToRangeMap *map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/linked_ptr.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/linked_ptr.h deleted file mode 100644 index 1a4ef7d4..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/linked_ptr.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). - -#ifndef PROCESSOR_LINKED_PTR_H__ -#define PROCESSOR_LINKED_PTR_H__ - -namespace google_breakpad { - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Join an existing circle. - void join(linked_ptr_internal const* ptr) { - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true iff we were the - // last member of the circle. Once this is done, you can join() another. - bool depart() { - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { depart(); capture(ptr); } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - // Release ownership of the pointed object and returns it. - // Sole ownership by this linked_ptr object is required. - T* release() { - bool last = link_.depart(); - T* v = value_; - value_ = NULL; - return v; - } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_LINKED_PTR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/logging.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/logging.h deleted file mode 100644 index b638ff58..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/logging.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// logging.h: Breakpad logging -// -// Breakpad itself uses Breakpad logging with statements of the form: -// BPLOG(severity) << "message"; -// severity may be INFO, ERROR, or other values defined in this file. -// -// BPLOG is an overridable macro so that users can customize Breakpad's -// logging. Left at the default, logging messages are sent to stderr along -// with a timestamp and the source code location that produced a message. -// The streams may be changed by redefining BPLOG_*_STREAM, the logging -// behavior may be changed by redefining BPLOG_*, and the entire logging -// system may be overridden by redefining BPLOG(severity). These -// redefinitions may be passed to the preprocessor as a command-line flag -// (-D). -// -// If an additional header is required to override Breakpad logging, it can -// be specified by the BP_LOGGING_INCLUDE macro. If defined, this header -// will #include the header specified by that macro. -// -// If any initialization is needed before logging, it can be performed by -// a function called through the BPLOG_INIT macro. Each main function of -// an executable program in the Breakpad processor library calls -// BPLOG_INIT(&argc, &argv); before any logging can be performed; define -// BPLOG_INIT appropriately if initialization is required. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_LOGGING_H__ -#define PROCESSOR_LOGGING_H__ - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -#ifdef BP_LOGGING_INCLUDE -#include BP_LOGGING_INCLUDE -#endif // BP_LOGGING_INCLUDE - -namespace google_breakpad { - -class LogStream { - public: - enum Severity { - SEVERITY_INFO, - SEVERITY_ERROR - }; - - // Begin logging a message to the stream identified by |stream|, at the - // indicated severity. The file and line parameters should be set so as to - // identify the line of source code that is producing a message. - LogStream(std::ostream &stream, Severity severity, - const char *file, int line); - - // Finish logging by printing a newline and flushing the output stream. - ~LogStream(); - - template std::ostream& operator<<(const T &t) { - return stream_ << t; - } - - private: - std::ostream &stream_; - - // Disallow copy constructor and assignment operator - explicit LogStream(const LogStream &that); - void operator=(const LogStream &that); -}; - -// This class is used to explicitly ignore values in the conditional logging -// macros. This avoids compiler warnings like "value computed is not used" -// and "statement has no effect". -class LogMessageVoidify { - public: - LogMessageVoidify() {} - - // This has to be an operator with a precedence lower than << but higher - // than ?: - void operator&(std::ostream &) {} -}; - -// Returns number formatted as a hexadecimal string, such as "0x7b". -std::string HexString(u_int32_t number); -std::string HexString(u_int64_t number); -std::string HexString(int number); - -// Returns the error code as set in the global errno variable, and sets -// error_string, a required argument, to a string describing that error -// code. -int ErrnoString(std::string *error_string); - -} // namespace google_breakpad - -#ifndef BPLOG_INIT -#define BPLOG_INIT(pargc, pargv) -#endif // BPLOG_INIT - -#ifndef BPLOG -#define BPLOG(severity) BPLOG_ ## severity -#endif // BPLOG - -#ifndef BPLOG_INFO -#ifndef BPLOG_INFO_STREAM -#define BPLOG_INFO_STREAM std::clog -#endif // BPLOG_INFO_STREAM -#define BPLOG_INFO google_breakpad::LogStream(BPLOG_INFO_STREAM, \ - google_breakpad::LogStream::SEVERITY_INFO, \ - __FILE__, __LINE__) -#endif // BPLOG_INFO - -#ifndef BPLOG_ERROR -#ifndef BPLOG_ERROR_STREAM -#define BPLOG_ERROR_STREAM std::cerr -#endif // BPLOG_ERROR_STREAM -#define BPLOG_ERROR google_breakpad::LogStream(BPLOG_ERROR_STREAM, \ - google_breakpad::LogStream::SEVERITY_ERROR, \ - __FILE__, __LINE__) -#endif // BPLOG_ERROR - -#define BPLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : \ - google_breakpad::LogMessageVoidify() & BPLOG(severity) - -#endif // PROCESSOR_LOGGING_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/pathname_stripper.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/pathname_stripper.h deleted file mode 100644 index 17db75d6..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/pathname_stripper.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// pathname_stripper.h: Manipulates pathnames into their component parts. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_PATHNAME_STRIPPER_H__ -#define PROCESSOR_PATHNAME_STRIPPER_H__ - -#include - -namespace google_breakpad { - -using std::string; - -class PathnameStripper { - public: - // Given path, a pathname with components separated by slashes (/) or - // backslashes (\), returns the trailing component, without any separator. - // If path ends in a separator character, returns an empty string. - static string File(const string &path); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_PATHNAME_STRIPPER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator-inl.h deleted file mode 100644 index aa0851d9..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator-inl.h +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator-inl.h: Postfix (reverse Polish) notation expression -// evaluator. -// -// Documentation in postfix_evaluator.h. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_INL_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_INL_H__ - - -#include - -#include "processor/postfix_evaluator.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" - -namespace google_breakpad { - -using std::istringstream; -using std::ostringstream; - - -// A small class used in Evaluate to make sure to clean up the stack -// before returning failure. -class AutoStackClearer { - public: - explicit AutoStackClearer(vector *stack) : stack_(stack) {} - ~AutoStackClearer() { stack_->clear(); } - - private: - vector *stack_; -}; - - -template -bool PostfixEvaluator::Evaluate(const string &expression, - DictionaryValidityType *assigned) { - // Ensure that the stack is cleared before returning. - AutoStackClearer clearer(&stack_); - - // Tokenize, splitting on whitespace. - istringstream stream(expression); - string token; - while (stream >> token) { - // There are enough binary operations that do exactly the same thing - // (other than the specific operation, of course) that it makes sense - // to share as much code as possible. - enum BinaryOperation { - BINARY_OP_NONE = 0, - BINARY_OP_ADD, - BINARY_OP_SUBTRACT, - BINARY_OP_MULTIPLY, - BINARY_OP_DIVIDE_QUOTIENT, - BINARY_OP_DIVIDE_MODULUS - }; - - BinaryOperation operation = BINARY_OP_NONE; - if (token == "+") - operation = BINARY_OP_ADD; - else if (token == "-") - operation = BINARY_OP_SUBTRACT; - else if (token == "*") - operation = BINARY_OP_MULTIPLY; - else if (token == "/") - operation = BINARY_OP_DIVIDE_QUOTIENT; - else if (token == "%") - operation = BINARY_OP_DIVIDE_MODULUS; - - if (operation != BINARY_OP_NONE) { - // Get the operands. - ValueType operand1, operand2; - if (!PopValues(&operand1, &operand2)) { - BPLOG(ERROR) << "Could not PopValues to get two values for binary " - "operation " << token << ": " << expression; - return false; - } - - // Perform the operation. - ValueType result; - switch (operation) { - case BINARY_OP_ADD: - result = operand1 + operand2; - break; - case BINARY_OP_SUBTRACT: - result = operand1 - operand2; - break; - case BINARY_OP_MULTIPLY: - result = operand1 * operand2; - break; - case BINARY_OP_DIVIDE_QUOTIENT: - result = operand1 / operand2; - break; - case BINARY_OP_DIVIDE_MODULUS: - result = operand1 % operand2; - break; - case BINARY_OP_NONE: - // This will not happen, but compilers will want a default or - // BINARY_OP_NONE case. - BPLOG(ERROR) << "Not reached!"; - return false; - break; - } - - // Save the result. - PushValue(result); - } else if (token == "^") { - // ^ for unary dereference. Can't dereference without memory. - if (!memory_) { - BPLOG(ERROR) << "Attempt to dereference without memory: " << - expression; - return false; - } - - ValueType address; - if (!PopValue(&address)) { - BPLOG(ERROR) << "Could not PopValue to get value to derefence: " << - expression; - return false; - } - - ValueType value; - if (!memory_->GetMemoryAtAddress(address, &value)) { - BPLOG(ERROR) << "Could not dereference memory at address " << - HexString(address) << ": " << expression; - return false; - } - - PushValue(value); - } else if (token == "=") { - // = for assignment. - ValueType value; - if (!PopValue(&value)) { - BPLOG(ERROR) << "Could not PopValue to get value to assign: " << - expression; - return false; - } - - // Assignment is only meaningful when assigning into an identifier. - // The identifier must name a variable, not a constant. Variables - // begin with '$'. - string identifier; - if (PopValueOrIdentifier(NULL, &identifier) != POP_RESULT_IDENTIFIER) { - BPLOG(ERROR) << "PopValueOrIdentifier returned a value, but an " - "identifier is needed to assign " << - HexString(value) << ": " << expression; - return false; - } - if (identifier.empty() || identifier[0] != '$') { - BPLOG(ERROR) << "Can't assign " << HexString(value) << " to " << - identifier << ": " << expression; - return false; - } - - (*dictionary_)[identifier] = value; - if (assigned) - (*assigned)[identifier] = true; - } else { - // The token is not an operator, it's a literal value or an identifier. - // Push it onto the stack as-is. Use push_back instead of PushValue - // because PushValue pushes ValueType as a string, but token is already - // a string. - stack_.push_back(token); - } - } - - // If there's anything left on the stack, it indicates incomplete execution. - // This is a failure case. If the stack is empty, evalution was complete - // and successful. - BPLOG_IF(ERROR, !stack_.empty()) << "Incomplete execution: " << expression; - return stack_.empty(); -} - - -template -typename PostfixEvaluator::PopResult -PostfixEvaluator::PopValueOrIdentifier( - ValueType *value, string *identifier) { - // There needs to be at least one element on the stack to pop. - if (!stack_.size()) - return POP_RESULT_FAIL; - - string token = stack_.back(); - stack_.pop_back(); - - // First, try to treat the value as a literal. In order for this to - // succed, the entire string must be parseable as ValueType. If this - // isn't possible, it can't be a literal, so treat it as an identifier - // instead. - istringstream token_stream(token); - ValueType literal; - if (token_stream >> literal && token_stream.peek() == EOF) { - if (value) { - *value = literal; - } - return POP_RESULT_VALUE; - } else { - if (identifier) { - *identifier = token; - } - return POP_RESULT_IDENTIFIER; - } -} - - -template -bool PostfixEvaluator::PopValue(ValueType *value) { - ValueType literal; - string token; - PopResult result; - if ((result = PopValueOrIdentifier(&literal, &token)) == POP_RESULT_FAIL) { - return false; - } else if (result == POP_RESULT_VALUE) { - // This is the easy case. - *value = literal; - } else { // result == POP_RESULT_IDENTIFIER - // There was an identifier at the top of the stack. Resolve it to a - // value by looking it up in the dictionary. - typename DictionaryType::const_iterator iterator = - dictionary_->find(token); - if (iterator == dictionary_->end()) { - // The identifier wasn't found in the dictionary. Don't imply any - // default value, just fail. - BPLOG(ERROR) << "Identifier " << token << " not in dictionary"; - return false; - } - - *value = iterator->second; - } - - return true; -} - - -template -bool PostfixEvaluator::PopValues(ValueType *value1, - ValueType *value2) { - return PopValue(value2) && PopValue(value1); -} - - -template -void PostfixEvaluator::PushValue(const ValueType &value) { - ostringstream token_stream; - token_stream << value; - stack_.push_back(token_stream.str()); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator.h deleted file mode 100644 index 552ed159..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/postfix_evaluator.h +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator.h: Postfix (reverse Polish) notation expression evaluator. -// -// PostfixEvaluator evaluates an expression, using the expression itself -// in postfix (reverse Polish) notation and a dictionary mapping constants -// and variables to their values. The evaluator supports standard -// arithmetic operations, assignment into variables, and when an optional -// MemoryRange is provided, dereferencing. (Any unary key-to-value operation -// may be used with a MemoryRange implementation that returns the appropriate -// values, but PostfixEvaluator was written with dereferencing in mind.) -// -// The expression language is simple. Expressions are supplied as strings, -// with operands and operators delimited by whitespace. Operands may be -// either literal values suitable for ValueType, or constants or variables, -// which reference the dictionary. The supported binary operators are + -// (addition), - (subtraction), * (multiplication), / (quotient of division), -// and % (modulus of division). The unary ^ (dereference) operator is also -// provided. These operators allow any operand to be either a literal -// value, constant, or variable. Assignment (=) of any type of operand into -// a variable is also supported. -// -// The dictionary is provided as a map with string keys. Keys beginning -// with the '$' character are treated as variables. All other keys are -// treated as constants. Any results must be assigned into variables in the -// dictionary. These variables do not need to exist prior to calling -// Evaluate, unless used in an expression prior to being assigned to. The -// internal stack state is not made available after evaluation, and any -// values remaining on the stack are treated as evidence of incomplete -// execution and cause the evaluator to indicate failure. -// -// PostfixEvaluator is intended to support evaluation of "program strings" -// obtained from MSVC frame data debugging information in pdb files as -// returned by the DIA APIs. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_H__ - - -#include -#include -#include - -namespace google_breakpad { - -using std::map; -using std::string; -using std::vector; - -class MemoryRegion; - -template -class PostfixEvaluator { - public: - typedef map DictionaryType; - typedef map DictionaryValidityType; - - // Create a PostfixEvaluator object that may be used (with Evaluate) on - // one or more expressions. PostfixEvaluator does not take ownership of - // either argument. |memory| may be NULL, in which case dereferencing - // (^) will not be supported. |dictionary| may be NULL, but evaluation - // will fail in that case unless set_dictionary is used before calling - // Evaluate. - PostfixEvaluator(DictionaryType *dictionary, MemoryRegion *memory) - : dictionary_(dictionary), memory_(memory), stack_() {} - - // Evaluate the expression. The results of execution will be stored - // in one (or more) variables in the dictionary. Returns false if any - // failures occure during execution, leaving variables in the dictionary - // in an indeterminate state. If assigned is non-NULL, any keys set in - // the dictionary as a result of evaluation will also be set to true in - // assigned, providing a way to determine if an expression modifies any - // of its input variables. - bool Evaluate(const string &expression, DictionaryValidityType *assigned); - - DictionaryType* dictionary() const { return dictionary_; } - - // Reset the dictionary. PostfixEvaluator does not take ownership. - void set_dictionary(DictionaryType *dictionary) {dictionary_ = dictionary; } - - private: - // Return values for PopValueOrIdentifier - enum PopResult { - POP_RESULT_FAIL = 0, - POP_RESULT_VALUE, - POP_RESULT_IDENTIFIER - }; - - // Retrieves the topmost literal value, constant, or variable from the - // stack. Returns POP_RESULT_VALUE if the topmost entry is a literal - // value, and sets |value| accordingly. Returns POP_RESULT_IDENTIFIER - // if the topmost entry is a constant or variable identifier, and sets - // |identifier| accordingly. Returns POP_RESULT_FAIL on failure, such - // as when the stack is empty. - PopResult PopValueOrIdentifier(ValueType *value, string *identifier); - - // Retrieves the topmost value on the stack. If the topmost entry is - // an identifier, the dictionary is queried for the identifier's value. - // Returns false on failure, such as when the stack is empty or when - // a nonexistent identifier is named. - bool PopValue(ValueType *value); - - // Retrieves the top two values on the stack, in the style of PopValue. - // value2 is popped before value1, so that value1 corresponds to the - // entry that was pushed prior to value2. Returns false on failure. - bool PopValues(ValueType *value1, ValueType *value2); - - // Pushes a new value onto the stack. - void PushValue(const ValueType &value); - - // The dictionary mapping constant and variable identifiers (strings) to - // values. Keys beginning with '$' are treated as variable names, and - // PostfixEvaluator is free to create and modify these keys. Weak pointer. - DictionaryType *dictionary_; - - // If non-NULL, the MemoryRegion used for dereference (^) operations. - // If NULL, dereferencing is unsupported and will fail. Weak pointer. - MemoryRegion *memory_; - - // The stack contains state information as execution progresses. Values - // are pushed on to it as the expression string is read and as operations - // yield values; values are popped when used as operands to operators. - vector stack_; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map-inl.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map-inl.h deleted file mode 100644 index 77bf7d20..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map-inl.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map-inl.h: Range map implementation. -// -// See range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_INL_H__ -#define PROCESSOR_RANGE_MAP_INL_H__ - - -#include - -#include "processor/range_map.h" -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -bool RangeMap::StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - // The processor will hit this case too frequently with common symbol - // files in the size == 0 case, which is more suited to a DEBUG channel. - // Filter those out since there's no DEBUG channel at the moment. - BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) << - "+" << HexString(size) << ", " << - HexString(high); - return false; - } - - // Ensure that this range does not overlap with another one already in the - // map. - MapConstIterator iterator_base = map_.lower_bound(base); - MapConstIterator iterator_high = map_.lower_bound(high); - - if (iterator_base != iterator_high) { - // Some other range begins in the space used by this range. It may be - // contained within the space used by this range, or it may extend lower. - // Regardless, it is an error. - AddressType other_base = iterator_base->second.base(); - AddressType other_size = iterator_base->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range is contained by or " - "extends lower than the new range: new " << - HexString(base) << "+" << HexString(size) << ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - - if (iterator_high != map_.end()) { - if (iterator_high->second.base() <= high) { - // The range above this one overlaps with this one. It may fully - // contain this range, or it may begin within this range and extend - // higher. Regardless, it's an error. - AddressType other_base = iterator_high->second.base(); - AddressType other_size = iterator_high->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range contains or " - "extends higher than the new range: new " << - HexString(base) << "+" << HexString(size) << - ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - } - - // Store the range in the map by its high address, so that lower_bound can - // be used to quickly locate a range by address. - map_.insert(MapValue(high, Range(base, entry))); - return true; -} - - -template -bool RangeMap::RetrieveRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRange requires |entry|"; - assert(entry); - - MapConstIterator iterator = map_.lower_bound(address); - if (iterator == map_.end()) - return false; - - // The map is keyed by the high address of each range, so |address| is - // guaranteed to be lower than the range's high address. If |range| is - // not directly preceded by another range, it's possible for address to - // be below the range's low address, though. When that happens, address - // references something not within any range, so return false. - if (address < iterator->second.base()) - return false; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->second.base(); - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveNearestRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveNearestRange requires |entry|"; - assert(entry); - - // If address is within a range, RetrieveRange can handle it. - if (RetrieveRange(address, entry, entry_base, entry_size)) - return true; - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->first; - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveRangeAtIndex( - int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRangeAtIndex requires |entry|"; - assert(entry); - - if (index >= GetCount()) { - BPLOG(ERROR) << "Index out of range: " << index << "/" << GetCount(); - return false; - } - - // Walk through the map. Although it's ordered, it's not a vector, so it - // can't be addressed directly by index. - MapConstIterator iterator = map_.begin(); - for (int this_index = 0; this_index < index; ++this_index) - ++iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->first; - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -int RangeMap::GetCount() const { - return map_.size(); -} - - -template -void RangeMap::Clear() { - map_.clear(); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map.h deleted file mode 100644 index a7b67412..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/range_map.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map.h: Range maps. -// -// A range map associates a range of addresses with a specific object. This -// is useful when certain objects of variable size are located within an -// address space. The range map makes it simple to determine which object is -// associated with a specific address, which may be any address within the -// range associated with an object. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_H__ -#define PROCESSOR_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - - -template -class RangeMap { - public: - RangeMap() : map_() {} - - // Inserts a range into the map. Returns false for a parameter error, - // or if the location of the range would conflict with a range already - // stored in the map. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Locates the range encompassing the supplied address. If there is - // no such range, returns false. entry_base and entry_size, if non-NULL, - // are set to the base and size of the entry's range. - bool RetrieveRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const; - - // Locates the range encompassing the supplied address, if one exists. - // If no range encompasses the supplied address, locates the nearest range - // to the supplied address that is lower than the address. Returns false - // if no range meets these criteria. entry_base and entry_size, if - // non-NULL, are set to the base and size of the entry's range. - bool RetrieveNearestRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Treating all ranges as a list ordered by the address spaces that they - // occupy, locates the range at the index specified by index. Returns - // false if index is larger than the number of ranges stored. entry_base - // and entry_size, if non-NULL, are set to the base and size of the entry's - // range. - // - // RetrieveRangeAtIndex is not optimized for speedy operation. - bool RetrieveRangeAtIndex(int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Returns the number of ranges stored in the RangeMap. - int GetCount() const; - - // Empties the range map, restoring it to the state it was when it was - // initially created. - void Clear(); - - private: - class Range { - public: - Range(const AddressType &base, const EntryType &entry) - : base_(base), entry_(entry) {} - - AddressType base() const { return base_; } - EntryType entry() const { return entry_; } - - private: - // The base address of the range. The high address does not need to - // be stored, because RangeMap uses it as the key to the map. - const AddressType base_; - - // The entry corresponding to a range. - const EntryType entry_; - }; - - // Convenience types. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Maps the high address of each range to a EntryType. - AddressToRangeMap map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/scoped_ptr.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/scoped_ptr.h deleted file mode 100644 index 0d4f7fd3..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/scoped_ptr.h +++ /dev/null @@ -1,335 +0,0 @@ -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 Peter Dimov -// -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. -// This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. -// -// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation. -// - -// scoped_ptr mimics a built-in pointer except that it guarantees deletion -// of the object pointed to, either on destruction of the scoped_ptr or via -// an explicit reset(). scoped_ptr is a simple solution for simple needs; -// use shared_ptr or std::auto_ptr if your needs are more complex. - -// *** NOTE *** -// If your scoped_ptr is a class member of class FOO pointing to a -// forward declared type BAR (as shown below), then you MUST use a non-inlined -// version of the destructor. The destructor of a scoped_ptr (called from -// FOO's destructor) must have a complete definition of BAR in order to -// destroy it. Example: -// -// -- foo.h -- -// class BAR; -// -// class FOO { -// public: -// FOO(); -// ~FOO(); // Required for sources that instantiate class FOO to compile! -// -// private: -// scoped_ptr bar_; -// }; -// -// -- foo.cc -- -// #include "foo.h" -// FOO::~FOO() {} // Empty, but must be non-inlined to FOO's class definition. - -// scoped_ptr_malloc added by Google -// When one of these goes out of scope, instead of doing a delete or -// delete[], it calls free(). scoped_ptr_malloc is likely to see -// much more use than any other specializations. - -// release() added by Google -// Use this to conditionally transfer ownership of a heap-allocated object -// to the caller, usually on method success. - -#ifndef PROCESSOR_SCOPED_PTR_H__ -#define PROCESSOR_SCOPED_PTR_H__ - -#include // for std::ptrdiff_t -#include // for assert -#include // for free() decl - -namespace google_breakpad { - -template -class scoped_ptr { - private: - - T* ptr; - - scoped_ptr(scoped_ptr const &); - scoped_ptr & operator=(scoped_ptr const &); - - public: - - typedef T element_type; - - explicit scoped_ptr(T* p = 0): ptr(p) {} - - ~scoped_ptr() { - typedef char type_must_be_complete[sizeof(T)]; - delete ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete ptr; - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr should have its own object - template bool operator==(scoped_ptr const& p) const; - template bool operator!=(scoped_ptr const& p) const; -}; - -template inline -void swap(scoped_ptr& a, scoped_ptr& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr& b) { - return p != b.get(); -} - -// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to -// is guaranteed, either on destruction of the scoped_array or via an explicit -// reset(). Use shared_array or std::vector if your needs are more complex. - -template -class scoped_array { - private: - - T* ptr; - - scoped_array(scoped_array const &); - scoped_array & operator=(scoped_array const &); - - public: - - typedef T element_type; - - explicit scoped_array(T* p = 0) : ptr(p) {} - - ~scoped_array() { - typedef char type_must_be_complete[sizeof(T)]; - delete[] ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete [] ptr; - ptr = p; - } - } - - T& operator[](std::ptrdiff_t i) const { - assert(ptr != 0); - assert(i >= 0); - return ptr[i]; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_array & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_array should have its own object - template bool operator==(scoped_array const& p) const; - template bool operator!=(scoped_array const& p) const; -}; - -template inline -void swap(scoped_array& a, scoped_array& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_array& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_array& b) { - return p != b.get(); -} - - -// This class wraps the c library function free() in a class that can be -// passed as a template argument to scoped_ptr_malloc below. -class ScopedPtrMallocFree { - public: - inline void operator()(void* x) const { - free(x); - } -}; - -// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a -// second template argument, the functor used to free the object. - -template -class scoped_ptr_malloc { - private: - - T* ptr; - - scoped_ptr_malloc(scoped_ptr_malloc const &); - scoped_ptr_malloc & operator=(scoped_ptr_malloc const &); - - public: - - typedef T element_type; - - explicit scoped_ptr_malloc(T* p = 0): ptr(p) {} - - ~scoped_ptr_malloc() { - typedef char type_must_be_complete[sizeof(T)]; - free_((void*) ptr); - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - free_((void*) ptr); - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr_malloc & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr_malloc should have its own object - template - bool operator==(scoped_ptr_malloc const& p) const; - template - bool operator!=(scoped_ptr_malloc const& p) const; - - static FreeProc const free_; -}; - -template -FP const scoped_ptr_malloc::free_ = FP(); - -template inline -void swap(scoped_ptr_malloc& a, scoped_ptr_malloc& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr_malloc& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr_malloc& b) { - return p != b.get(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_SCOPED_PTR_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/simple_symbol_supplier.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/simple_symbol_supplier.h deleted file mode 100644 index dff6a512..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/simple_symbol_supplier.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// simple_symbol_supplier.h: A simple SymbolSupplier implementation -// -// SimpleSymbolSupplier is a straightforward implementation of SymbolSupplier -// that stores symbol files in a filesystem tree. A SimpleSymbolSupplier is -// created with one or more base directories, which are the root paths for all -// symbol files. Each symbol file contained therein has a directory entry in -// the base directory with a name identical to the corresponding debugging -// file (pdb). Within each of these directories, there are subdirectories -// named for the debugging file's identifier. For recent pdb files, this is -// a concatenation of the pdb's uuid and age, presented in hexadecimal form, -// without any dashes or separators. The uuid is in uppercase hexadecimal -// and the age is in lowercase hexadecimal. Within that subdirectory, -// SimpleSymbolSupplier expects to find the symbol file, which is named -// identically to the debug file, but with a .sym extension. If the original -// debug file had a name ending in .pdb, the .pdb extension will be replaced -// with .sym. This sample hierarchy is rooted at the "symbols" base -// directory: -// -// symbols -// symbols/test_app.pdb -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1 -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym -// symbols/kernel32.pdb -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542 -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym -// -// In this case, the uuid of test_app.pdb is -// 63fe4780-728d-4937-9b9d-7bb6460cb42a and its age is 1. -// -// This scheme was chosen to be roughly analogous to the way that -// symbol files may be accessed from Microsoft Symbol Server. A hierarchy -// used for Microsoft Symbol Server storage is usable as a hierarchy for -// SimpleSymbolServer, provided that the pdb files are transformed to dumped -// format using a tool such as dump_syms, and given a .sym extension. -// -// SimpleSymbolSupplier will iterate over all root paths searching for -// a symbol file existing in that path. -// -// SimpleSymbolSupplier supports any debugging file which can be identified -// by a CodeModule object's debug_file and debug_identifier accessors. The -// expected ultimate source of these CodeModule objects are MinidumpModule -// objects; it is this class that is responsible for assigning appropriate -// values for debug_file and debug_identifier. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ -#define PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ - -#include -#include - -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -class CodeModule; - -class SimpleSymbolSupplier : public SymbolSupplier { - public: - // Creates a new SimpleSymbolSupplier, using path as the root path where - // symbols are stored. - explicit SimpleSymbolSupplier(const string &path) : paths_(1, path) {} - - // Creates a new SimpleSymbolSupplier, using paths as a list of root - // paths where symbols may be stored. - explicit SimpleSymbolSupplier(const vector &paths) : paths_(paths) {} - - virtual ~SimpleSymbolSupplier() {} - - // Returns the path to the symbol file for the given module. See the - // description above. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - protected: - SymbolResult GetSymbolFileAtPathFromRoot(const CodeModule *module, - const SystemInfo *system_info, - const string &root_path, - string *symbol_file); - - private: - vector paths_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stack_frame_info.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stack_frame_info.h deleted file mode 100644 index 052a9338..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stack_frame_info.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stack_frame_info.h: Holds debugging information about a stack frame. -// -// This structure is specific to Windows debugging information obtained -// from pdb files using the DIA API. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACK_FRAME_INFO_H__ -#define PROCESSOR_STACK_FRAME_INFO_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -struct StackFrameInfo { - public: - enum Validity { - VALID_NONE = 0, - VALID_PARAMETER_SIZE = 1, - VALID_ALL = -1 - }; - - StackFrameInfo() : valid(VALID_NONE), - prolog_size(0), - epilog_size(0), - parameter_size(0), - saved_register_size(0), - local_size(0), - max_stack_size(0), - allocates_base_pointer(0), - program_string() {} - - StackFrameInfo(u_int32_t set_prolog_size, - u_int32_t set_epilog_size, - u_int32_t set_parameter_size, - u_int32_t set_saved_register_size, - u_int32_t set_local_size, - u_int32_t set_max_stack_size, - int set_allocates_base_pointer, - const std::string set_program_string) - : valid(VALID_ALL), - prolog_size(set_prolog_size), - epilog_size(set_epilog_size), - parameter_size(set_parameter_size), - saved_register_size(set_saved_register_size), - local_size(set_local_size), - max_stack_size(set_max_stack_size), - allocates_base_pointer(set_allocates_base_pointer), - program_string(set_program_string) {} - - // CopyFrom makes "this" StackFrameInfo object identical to "that". - void CopyFrom(const StackFrameInfo &that) { - valid = that.valid; - prolog_size = that.prolog_size; - epilog_size = that.epilog_size; - parameter_size = that.parameter_size; - saved_register_size = that.saved_register_size; - local_size = that.local_size; - max_stack_size = that.max_stack_size; - allocates_base_pointer = that.allocates_base_pointer; - program_string = that.program_string; - } - - // Clears the StackFrameInfo object so that users will see it as though - // it contains no information. - void Clear() { - valid = VALID_NONE; - program_string.erase(); - } - - // Identifies which fields in the structure are valid. This is of - // type Validity, but it is defined as an int because it's not - // possible to OR values into an enumerated type. Users must check - // this field before using any other. - int valid; - - // These values come from IDiaFrameData. - u_int32_t prolog_size; - u_int32_t epilog_size; - u_int32_t parameter_size; - u_int32_t saved_register_size; - u_int32_t local_size; - u_int32_t max_stack_size; - - // Only one of allocates_base_pointer or program_string will be valid. - // If program_string is empty, use allocates_base_pointer. - bool allocates_base_pointer; - std::string program_string; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACK_FRAME_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_amd64.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_amd64.h deleted file mode 100644 index a3e11358..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_amd64.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_amd64.h: amd64-specific stackwalker. -// -// Provides stack frames given amd64 register context and a memory region -// corresponding to a amd64 stack. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#ifndef PROCESSOR_STACKWALKER_AMD64_H__ -#define PROCESSOR_STACKWALKER_AMD64_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerAMD64 : public Stackwalker { - public: - // context is a amd64 context object that gives access to amd64-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerAMD64(const SystemInfo *system_info, - const MDRawContextAMD64 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using amd64 context (stack pointer in %rsp, - // stack base in %rbp) and stack conventions (saved stack pointer at 0(%rbp)) - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextAMD64 *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_AMD64_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_ppc.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_ppc.h deleted file mode 100644 index 3d312419..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_ppc.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_ppc.h: ppc-specific stackwalker. -// -// Provides stack frames given ppc register context and a memory region -// corresponding to a ppc stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_PPC_H__ -#define PROCESSOR_STACKWALKER_PPC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerPPC : public Stackwalker { - public: - // context is a ppc context object that gives access to ppc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerPPC(const SystemInfo *system_info, - const MDRawContextPPC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using ppc context (stack pointer in %r1, - // saved program counter in %srr0) and stack conventions (saved stack - // pointer at 0(%r1), return address at 8(0(%r1)). - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextPPC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_PPC_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_sparc.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_sparc.h deleted file mode 100644 index f051e5bb..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_sparc.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_sparc.h: sparc-specific stackwalker. -// -// Provides stack frames given sparc register context and a memory region -// corresponding to an sparc stack. -// -// Author: Michael Shang - - -#ifndef PROCESSOR_STACKWALKER_SPARC_H__ -#define PROCESSOR_STACKWALKER_SPARC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerSPARC : public Stackwalker { - public: - // context is a sparc context object that gives access to sparc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerSPARC(const SystemInfo *system_info, - const MDRawContextSPARC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and - // stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or - // alternate conventions as guided by stack_frame_info_). - // Implementation of Stackwalker, using ppc context (stack pointer in %r1, - // saved program counter in %srr0) and stack conventions (saved stack - // pointer at 0(%r1), return address at 8(0(%r1)). - // Implementation of Stackwalker, using sparc context (%fp, %sp, %pc) and - // stack conventions (saved %sp at) - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextSPARC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_SPARC_H__ diff --git a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_x86.h b/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_x86.h deleted file mode 100644 index 14b9e8b9..00000000 --- a/thirdparty/google-breakpad/r318/include/google_breakpad/processor/stackwalker_x86.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_x86.h: x86-specific stackwalker. -// -// Provides stack frames given x86 register context and a memory region -// corresponding to an x86 stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_X86_H__ -#define PROCESSOR_STACKWALKER_X86_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - - -class StackwalkerX86 : public Stackwalker { - public: - // context is an x86 context object that gives access to x86-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerX86(const SystemInfo *system_info, - const MDRawContextX86 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and - // stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or - // alternate conventions as guided by stack_frame_info_). - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextX86 *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_X86_H__ diff --git a/thirdparty/google-breakpad/r318/lib/macx/libbreakpad.a b/thirdparty/google-breakpad/r318/lib/macx/libbreakpad.a deleted file mode 100644 index b8f80b2f..00000000 Binary files a/thirdparty/google-breakpad/r318/lib/macx/libbreakpad.a and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/lib/win32/breakpad.lib b/thirdparty/google-breakpad/r318/lib/win32/breakpad.lib deleted file mode 100644 index 6e6e82b3..00000000 Binary files a/thirdparty/google-breakpad/r318/lib/win32/breakpad.lib and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/lib/win32/dbreakpad.lib b/thirdparty/google-breakpad/r318/lib/win32/dbreakpad.lib deleted file mode 100644 index f09e1b9c..00000000 Binary files a/thirdparty/google-breakpad/r318/lib/win32/dbreakpad.lib and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/readme.txt b/thirdparty/google-breakpad/r318/readme.txt deleted file mode 100644 index 22e21517..00000000 --- a/thirdparty/google-breakpad/r318/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -To create the lib on Mac OS X: - -- qmake from r318 folder -- make install - -To create the lib on Windows: - -release.vc9.bat - diff --git a/thirdparty/google-breakpad/r318/release.vc9.bat b/thirdparty/google-breakpad/r318/release.vc9.bat deleted file mode 100644 index f1d35f59..00000000 --- a/thirdparty/google-breakpad/r318/release.vc9.bat +++ /dev/null @@ -1,17 +0,0 @@ -set QT_BIN=C:\Qt\4.5.0\bin - -set VS_BIN="C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -set INNO_EXE="C:\Program Files\Inno Setup 5\iscc.exe " -set BUILD_DIR=".\build\win32\release" - -set PATH=%QT_BIN%;%PATH%; - -call %VS_BIN%\vcvars32.bat - -nmake clean - -rmdir /S /Q %BUILD_DIR% - -qmake - -nmake all diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/Makefile b/thirdparty/google-breakpad/r318/src/client/linux/handler/Makefile deleted file mode 100644 index 73be56d8..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -CXX=g++ -CC=gcc - -CXXFLAGS=-gstabs+ -I../../.. -Wall -D_REENTRANT -LDFLAGS=-lpthread - -OBJ_DIR=. -BIN_DIR=. - -THREAD_SRC=linux_thread.cc -SHARE_SRC=../../minidump_file_writer.cc\ - ../../../common/string_conversion.cc\ - ../../../common/linux/file_id.cc\ - minidump_generator.cc -HANDLER_SRC=exception_handler.cc\ - ../../../common/linux/guid_creator.cc -SHARE_C_SRC=../../../common/convert_UTF.c - -THREAD_TEST_SRC=linux_thread_test.cc -MINIDUMP_TEST_SRC=minidump_test.cc -EXCEPTION_TEST_SRC=exception_handler_test.cc - -THREAD_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(THREAD_SRC)) -SHARE_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(SHARE_SRC)) -HANDLER_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(HANDLER_SRC)) -SHARE_C_OBJ=$(patsubst %.c,$(OBJ_DIR)/%.o,$(SHARE_C_SRC)) md5.o -THREAD_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(THREAD_TEST_SRC))\ - $(THREAD_OBJ) -MINIDUMP_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(MINIDUMP_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) -EXCEPTION_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(EXCEPTION_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_OBJ) - -BIN=$(BIN_DIR)/minidump_test\ - $(BIN_DIR)/linux_thread_test\ - $(BIN_DIR)/exception_handler_test - -.PHONY:all clean - -all:$(BIN) - -$(BIN_DIR)/linux_thread_test:$(THREAD_TEST_OBJ) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ - -$(BIN_DIR)/minidump_test:$(MINIDUMP_TEST_OBJ) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ - -$(BIN_DIR)/exception_handler_test:$(EXCEPTION_TEST_OBJ) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ - -md5.o:../../../common/md5.c - $(CC) $(CXXFLAGS) -c $^ - -clean: - rm -f $(BIN) *.o *.dmp diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.cc deleted file mode 100644 index 26e09b7d..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.cc +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "client/linux/handler/exception_handler.h" -#include "common/linux/guid_creator.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Signals that we are interested. -int SigTable[] = { -#if defined(SIGSEGV) - SIGSEGV, -#endif -#ifdef SIGABRT - SIGABRT, -#endif -#ifdef SIGFPE - SIGFPE, -#endif -#ifdef SIGILL - SIGILL, -#endif -#ifdef SIGBUS - SIGBUS, -#endif -}; - -std::vector *ExceptionHandler::handler_stack_ = NULL; -int ExceptionHandler::handler_stack_index_ = 0; -pthread_mutex_t ExceptionHandler::handler_stack_mutex_ = -PTHREAD_MUTEX_INITIALIZER; - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - dump_path_(), - installed_handler_(install_handler) { - set_dump_path(dump_path); - - act_.sa_handler = HandleException; - act_.sa_flags = SA_ONSTACK; - sigemptyset(&act_.sa_mask); - // now, make sure we're blocking all the signals we are handling - // when we're handling any of them - for ( size_t i = 0; i < sizeof(SigTable) / sizeof(SigTable[0]); ++i) { - sigaddset(&act_.sa_mask, SigTable[i]); - } - - if (install_handler) { - SetupHandler(); - pthread_mutex_lock(&handler_stack_mutex_); - if (handler_stack_ == NULL) - handler_stack_ = new std::vector; - handler_stack_->push_back(this); - pthread_mutex_unlock(&handler_stack_mutex_); - } -} - -ExceptionHandler::~ExceptionHandler() { - TeardownAllHandler(); - pthread_mutex_lock(&handler_stack_mutex_); - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - fprintf(stderr, "warning: removing Breakpad handler out of order\n"); - for (std::vector::iterator iterator = - handler_stack_->begin(); - iterator != handler_stack_->end(); - ++iterator) { - if (*iterator == this) { - handler_stack_->erase(iterator); - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::WriteMinidump() { - bool success = InternalWriteMinidump(0, 0, NULL); - UpdateNextID(); - return success; -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, - callback_context, false); - return handler.InternalWriteMinidump(0, 0, NULL); -} - -void ExceptionHandler::SetupHandler() { - // Signal on a different stack to avoid using the stack - // of the crashing thread. - struct sigaltstack sig_stack; - sig_stack.ss_sp = malloc(MINSIGSTKSZ); - if (sig_stack.ss_sp == NULL) - return; - sig_stack.ss_size = MINSIGSTKSZ; - sig_stack.ss_flags = 0; - - if (sigaltstack(&sig_stack, NULL) < 0) - return; - for (size_t i = 0; i < sizeof(SigTable) / sizeof(SigTable[0]); ++i) - SetupHandler(SigTable[i]); -} - -void ExceptionHandler::SetupHandler(int signo) { - - // We're storing pointers to the old signal action - // structure, rather than copying the structure - // because we can't count on the sa_mask field to - // be scalar. - struct sigaction *old_act = &old_actions_[signo]; - - if (sigaction(signo, &act_, old_act) < 0) - return; -} - -void ExceptionHandler::TeardownHandler(int signo) { - TeardownHandler(signo, NULL); -} - -void ExceptionHandler::TeardownHandler(int signo, struct sigaction *final_handler) { - if (old_actions_[signo].sa_handler) { - struct sigaction *act = &old_actions_[signo]; - sigaction(signo, act, final_handler); - memset(&old_actions_[signo], 0x0, sizeof(struct sigaction)); - } -} - -void ExceptionHandler::TeardownAllHandler() { - for (size_t i = 0; i < sizeof(SigTable) / sizeof(SigTable[0]); ++i) { - TeardownHandler(SigTable[i]); - } -} - -// static -void ExceptionHandler::HandleException(int signo) { - // In Linux, the context information about the signal is put on the stack of - // the signal handler frame as value parameter. For some reasons, the - // prototype of the handler doesn't declare this information as parameter, we - // will do it by hand. It is the second parameter above the signal number. - // However, if we are being called by another signal handler passing the - // signal up the chain, then we may not have this random extra parameter, - // so we may have to walk the stack to find it. We do the actual work - // on another thread, where it's a little safer, but we want the ebp - // from this frame to find it. - uintptr_t current_ebp = 0; - asm volatile ("movl %%ebp, %0" - :"=m"(current_ebp)); - - pthread_mutex_lock(&handler_stack_mutex_); - ExceptionHandler *current_handler = - handler_stack_->at(handler_stack_->size() - ++handler_stack_index_); - pthread_mutex_unlock(&handler_stack_mutex_); - - // Restore original handler. - struct sigaction old_action; - current_handler->TeardownHandler(signo, &old_action); - - struct sigcontext *sig_ctx = NULL; - if (current_handler->InternalWriteMinidump(signo, current_ebp, &sig_ctx)) { - // Fully handled this exception, safe to exit. - exit(EXIT_FAILURE); - } else { - // Exception not fully handled, will call the next handler in stack to - // process it. - if (old_action.sa_handler != NULL && sig_ctx != NULL) { - - // Have our own typedef, because of the comment above w.r.t signal - // context on the stack - typedef void (*SignalHandler)(int signo, struct sigcontext); - - SignalHandler old_handler = - reinterpret_cast(old_action.sa_handler); - - sigset_t old_set; - // Use SIG_BLOCK here because we don't want to unblock a signal - // that the signal handler we're currently in needs to block - sigprocmask(SIG_BLOCK, &old_action.sa_mask, &old_set); - old_handler(signo, *sig_ctx); - sigprocmask(SIG_SETMASK, &old_set, NULL); - } - - } - - pthread_mutex_lock(&handler_stack_mutex_); - current_handler->SetupHandler(signo); - --handler_stack_index_; - // All the handlers in stack have been invoked to handle the exception, - // normally the process should be terminated and should not reach here. - // In case we got here, ask the OS to handle it to avoid endless loop, - // normally the OS will generate a core and termiate the process. This - // may be desired to debug the program. - if (handler_stack_index_ == 0) - signal(signo, SIG_DFL); - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::InternalWriteMinidump(int signo, - uintptr_t sighandler_ebp, - struct sigcontext **sig_ctx) { - if (filter_ && !filter_(callback_context_)) - return false; - - bool success = false; - // Block all the signals we want to process when writting minidump. - // We don't want it to be interrupted. - sigset_t sig_blocked, sig_old; - bool blocked = true; - sigfillset(&sig_blocked); - for (size_t i = 0; i < sizeof(SigTable) / sizeof(SigTable[0]); ++i) - sigdelset(&sig_blocked, SigTable[i]); - if (sigprocmask(SIG_BLOCK, &sig_blocked, &sig_old) != 0) { - blocked = false; - fprintf(stderr, "google_breakpad::ExceptionHandler::HandleException: " - "failed to block signals.\n"); - } - - success = minidump_generator_.WriteMinidumpToFile( - next_minidump_path_c_, signo, sighandler_ebp, sig_ctx); - - // Unblock the signals. - if (blocked) { - sigprocmask(SIG_SETMASK, &sig_old, NULL); - } - - if (callback_) - success = callback_(dump_path_c_, next_minidump_id_c_, - callback_context_, success); - return success; -} - -void ExceptionHandler::UpdateNextID() { - GUID guid; - char guid_str[kGUIDStringLength + 1]; - if (CreateGUID(&guid) && GUIDToString(&guid, guid_str, sizeof(guid_str))) { - next_minidump_id_ = guid_str; - next_minidump_id_c_ = next_minidump_id_.c_str(); - - char minidump_path[PATH_MAX]; - snprintf(minidump_path, sizeof(minidump_path), "%s/%s.dmp", - dump_path_c_, - guid_str); - - next_minidump_path_ = minidump_path; - next_minidump_path_c_ = next_minidump_path_.c_str(); - } -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.h b/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.h deleted file mode 100644 index 6ea09a11..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler.h +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H__ - -#include - -#include -#include -#include -#include - -#include "client/linux/handler/minidump_generator.h" - -// Context information when exception occured. -struct sigcontex; - -namespace google_breakpad { - -using std::string; - -// -// ExceptionHandler -// -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// (NOTE): There should be only be one this kind of exception handler -// object per process. -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// Caller should try to make the callbacks as crash-friendly as possible, -// it should avoid use heap memory allocation as much as possible. -// -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. succeeded - // indicates whether a minidump file was successfully written. - // - // If an exception occurred and the callback returns true, Breakpad will - // treat the exception as fully-handled, suppressing any other handlers from - // being notified of the exception. If the callback returns false, Breakpad - // will treat the exception as unhandled, and allow another handler to handle - // it. If there are no other handlers, Breakpad will report the exception to - // the system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - typedef bool (*MinidumpCallback)(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, - bool install_handler); - ~ExceptionHandler(); - - // Get and set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context); - - private: - // Setup crash handler. - void SetupHandler(); - // Setup signal handler for a signal. - void SetupHandler(int signo); - // Teardown the handler for a signal. - void TeardownHandler(int signo); - // Teardown the handler for a signal. - void TeardownHandler(int signo, struct sigaction *old); - // Teardown all handlers. - void TeardownAllHandler(); - - // Signal handler. - static void HandleException(int signo); - - // If called from a signal handler, sighandler_ebp is the ebp of - // that signal handler's frame, and sig_ctx is an out parameter - // that will be set to point at the sigcontext that was placed - // on the stack by the kernel. You can pass zero and NULL - // for the second and third parameters if you are not calling - // this from a signal handler. - bool InternalWriteMinidump(int signo, uintptr_t sighandler_ebp, - struct sigcontext **sig_ctx); - - // Generates a new ID and stores it in next_minidump_id, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - private: - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - string dump_path_; - - // The basename of the next minidump to be written, without the extension - string next_minidump_id_; - - // The full pathname of the next minidump to be written, including the file - // extension - string next_minidump_path_; - - // Pointers to C-string representations of the above. These are set - // when the above are set so we can avoid calling c_str during - // an exception. - const char *dump_path_c_; - const char *next_minidump_id_c_; - const char *next_minidump_path_c_; - - // True if the ExceptionHandler installed an unhandled exception filter - // when created (with an install_handler parameter set to true). - bool installed_handler_; - - // The global exception handler stack. This is need becuase there may exist - // multiple ExceptionHandler instances in a process. Each will have itself - // registered in this stack. - static std::vector *handler_stack_; - // The index of the handler that should handle the next exception. - static int handler_stack_index_; - static pthread_mutex_t handler_stack_mutex_; - - // The minidump generator. - MinidumpGenerator minidump_generator_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); - - // The sigactions structure we use for each signal - struct sigaction act_; - - - // Keep the previous handlers for the signal. - // We're wasting a bit of memory here since we only change - // the handler for some signals but i want to avoid allocating - // memory in the signal handler - struct sigaction old_actions_[NSIG]; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler_test.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler_test.cc deleted file mode 100644 index 2d94553d..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/exception_handler_test.cc +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include -#include -#include -#include - -#include "client/linux/handler/exception_handler.h" -#include "client/linux/handler/linux_thread.h" - -using namespace google_breakpad; - -// Thread use this to see if it should stop working. -static bool should_exit = false; - -static int foo2(int arg) { - // Stack variable, used for debugging stack dumps. - /*DDDebug*/printf("%s:%d\n", __FUNCTION__, __LINE__); - int c = 0xcccccccc; - fprintf(stderr, "Thread trying to crash: %x\n", getpid()); - c = *reinterpret_cast(0x5); - return c; -} - -static int foo(int arg) { - // Stack variable, used for debugging stack dumps. - int b = 0xbbbbbbbb; - b = foo2(b); - return b; -} - -static void *thread_crash(void *) { - // Stack variable, used for debugging stack dumps. - int a = 0xaaaaaaaa; - sleep(1); - a = foo(a); - printf("%x\n", a); - return NULL; -} - -static void *thread_main(void *) { - while (!should_exit) - sleep(1); - return NULL; -} - -static void CreateCrashThread() { - pthread_t h; - pthread_create(&h, NULL, thread_crash, NULL); - pthread_detach(h); -} - -// Create working threads. -static void CreateThread(int num) { - pthread_t h; - for (int i = 0; i < num; ++i) { - pthread_create(&h, NULL, thread_main, NULL); - pthread_detach(h); - } -} - -// Callback when minidump written. -static bool MinidumpCallback(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded) { - int index = reinterpret_cast(context); - printf("%d %s: %s is dumped\n", index, __FUNCTION__, minidump_id); - if (index == 0) { - should_exit = true; - return true; - } - // Don't process it. - return false; -} - -int main(int argc, char *argv[]) { - int handler_index = 0; - ExceptionHandler handler_ignore(".", NULL, MinidumpCallback, - (void*)handler_index, true); - ++handler_index; - ExceptionHandler handler_process(".", NULL, MinidumpCallback, - (void*)handler_index, true); - CreateCrashThread(); - CreateThread(10); - - while (true) - sleep(1); - should_exit = true; - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.cc deleted file mode 100644 index c8ac4926..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.cc +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "client/linux/handler/linux_thread.h" - -using namespace google_breakpad; - -// This unamed namespace contains helper function. -namespace { - -// Context information for the callbacks when validating address by listing -// modules. -struct AddressValidatingContext { - uintptr_t address; - bool is_mapped; - - AddressValidatingContext() : address(0UL), is_mapped(false) { - } -}; - -// Convert from string to int. -bool LocalAtoi(char *s, int *r) { - assert(s != NULL); - assert(r != NULL); - char *endptr = NULL; - int ret = strtol(s, &endptr, 10); - if (endptr == s) - return false; - *r = ret; - return true; -} - -// Fill the proc path of a thread given its id. -void FillProcPath(int pid, char *path, int path_size) { - char pid_str[32]; - snprintf(pid_str, sizeof(pid_str), "%d", pid); - snprintf(path, path_size, "/proc/%s/", pid_str); -} - -// Read thread info from /proc/$pid/status. -bool ReadThreadInfo(int pid, ThreadInfo *info) { - assert(info != NULL); - char status_path[80]; - // Max size we want to read from status file. - static const int kStatusMaxSize = 1024; - char status_content[kStatusMaxSize]; - - FillProcPath(pid, status_path, sizeof(status_path)); - strcat(status_path, "status"); - int fd = open(status_path, O_RDONLY, 0); - if (fd < 0) - return false; - - int num_read = read(fd, status_content, kStatusMaxSize - 1); - if (num_read < 0) { - close(fd); - return false; - } - close(fd); - status_content[num_read] = '\0'; - - char *tgid_start = strstr(status_content, "Tgid:"); - if (tgid_start) - sscanf(tgid_start, "Tgid:\t%d\n", &(info->tgid)); - else - // tgid not supported by kernel?? - info->tgid = 0; - - tgid_start = strstr(status_content, "Pid:"); - if (tgid_start) { - sscanf(tgid_start, "Pid:\t%d\n" "PPid:\t%d\n", &(info->pid), - &(info->ppid)); - return true; - } - return false; -} - -// Callback invoked for each mapped module. -// It use the module's adderss range to validate the address. -bool IsAddressInModuleCallback(const ModuleInfo &module_info, - void *context) { - AddressValidatingContext *addr = - reinterpret_cast(context); - addr->is_mapped = ((addr->address >= module_info.start_addr) && - (addr->address <= module_info.start_addr + - module_info.size)); - return !addr->is_mapped; -} - -#if defined(__i386__) && !defined(NO_FRAME_POINTER) -void *GetNextFrame(void **last_ebp) { - void *sp = *last_ebp; - if ((unsigned long)sp == (unsigned long)last_ebp) - return NULL; - if ((unsigned long)sp & (sizeof(void *) - 1)) - return NULL; - if ((unsigned long)sp - (unsigned long)last_ebp > 100000) - return NULL; - return sp; -} -#else -void *GetNextFrame(void **last_ebp) { - return reinterpret_cast(last_ebp); -} -#endif - -// Suspend a thread by attaching to it. -bool SuspendThread(int pid, void *context) { - // This may fail if the thread has just died or debugged. - errno = 0; - if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) != 0 && - errno != 0) { - return false; - } - while (waitpid(pid, NULL, __WALL) < 0) { - if (errno != EINTR) { - ptrace(PTRACE_DETACH, pid, NULL, NULL); - return false; - } - } - return true; -} - -// Resume a thread by detaching from it. -bool ResumeThread(int pid, void *context) { - return ptrace(PTRACE_DETACH, pid, NULL, NULL) >= 0; -} - -// Callback to get the thread information. -// Will be called for each thread found. -bool ThreadInfoCallback(int pid, void *context) { - CallbackParam *thread_callback = - reinterpret_cast *>(context); - ThreadInfo thread_info; - if (ReadThreadInfo(pid, &thread_info) && thread_callback) { - // Invoke callback from caller. - return (thread_callback->call_back)(thread_info, thread_callback->context); - } - return false; -} - -} // namespace - -namespace google_breakpad { - -LinuxThread::LinuxThread(int pid) : pid_(pid) , threads_suspened_(false) { -} - -LinuxThread::~LinuxThread() { - if (threads_suspened_) - ResumeAllThreads(); -} - -int LinuxThread::SuspendAllThreads() { - CallbackParam callback_param(SuspendThread, NULL); - int thread_count = 0; - if ((thread_count = IterateProcSelfTask(pid_, &callback_param)) > 0) - threads_suspened_ = true; - return thread_count; -} - -void LinuxThread::ResumeAllThreads() const { - CallbackParam callback_param(ResumeThread, NULL); - IterateProcSelfTask(pid_, &callback_param); -} - -int LinuxThread::GetThreadCount() const { - return IterateProcSelfTask(pid_, NULL); -} - -int LinuxThread::ListThreads( - CallbackParam *thread_callback_param) const { - CallbackParam callback_param(ThreadInfoCallback, - thread_callback_param); - return IterateProcSelfTask(pid_, &callback_param); -} - -bool LinuxThread::GetRegisters(int pid, user_regs_struct *regs) const { - assert(regs); - return (regs != NULL && - (ptrace(PTRACE_GETREGS, pid, NULL, regs) == 0) && - errno == 0); -} - -// Get the floating-point registers of a thread. -// The caller must get the thread pid by ListThreads. -bool LinuxThread::GetFPRegisters(int pid, user_fpregs_struct *regs) const { - assert(regs); - return (regs != NULL && - (ptrace(PTRACE_GETREGS, pid, NULL, regs) ==0) && - errno == 0); -} - -bool LinuxThread::GetFPXRegisters(int pid, user_fpxregs_struct *regs) const { - assert(regs); - return (regs != NULL && - (ptrace(PTRACE_GETFPREGS, pid, NULL, regs) != 0) && - errno == 0); -} - -bool LinuxThread::GetDebugRegisters(int pid, DebugRegs *regs) const { - assert(regs); - -#define GET_DR(name, num)\ - name->dr##num = ptrace(PTRACE_PEEKUSER, pid,\ - offsetof(struct user, u_debugreg[num]), NULL) - GET_DR(regs, 0); - GET_DR(regs, 1); - GET_DR(regs, 2); - GET_DR(regs, 3); - GET_DR(regs, 4); - GET_DR(regs, 5); - GET_DR(regs, 6); - GET_DR(regs, 7); - return true; -} - -int LinuxThread::GetThreadStackDump(uintptr_t current_ebp, - uintptr_t current_esp, - void *buf, - int buf_size) const { - assert(buf); - assert(buf_size > 0); - - uintptr_t stack_bottom = GetThreadStackBottom(current_ebp); - int size = stack_bottom - current_esp; - size = buf_size > size ? size : buf_size; - if (size > 0) - memcpy(buf, reinterpret_cast(current_esp), size); - return size; -} - -// Get the stack bottom of a thread by stack walking. It works -// unless the stack has been corrupted or the frame pointer has been omited. -// This is just a temporary solution before we get better ideas about how -// this can be done. -// -// We will check each frame address by checking into module maps. -// TODO(liuli): Improve it. -uintptr_t LinuxThread::GetThreadStackBottom(uintptr_t current_ebp) const { - void **sp = reinterpret_cast(current_ebp); - void **previous_sp = sp; - while (sp && IsAddressMapped((uintptr_t)sp)) { - previous_sp = sp; - sp = reinterpret_cast(GetNextFrame(sp)); - } - return (uintptr_t)previous_sp; -} - -int LinuxThread::GetModuleCount() const { - return ListModules(NULL); -} - -int LinuxThread::ListModules( - CallbackParam *callback_param) const { - char line[512]; - const char *maps_path = "/proc/self/maps"; - - int module_count = 0; - FILE *fp = fopen(maps_path, "r"); - if (fp == NULL) - return -1; - - uintptr_t start_addr; - uintptr_t end_addr; - while (fgets(line, sizeof(line), fp) != NULL) { - if (sscanf(line, "%x-%x", &start_addr, &end_addr) == 2) { - ModuleInfo module; - memset(&module, 0, sizeof(module)); - module.start_addr = start_addr; - module.size = end_addr - start_addr; - char *name = NULL; - assert(module.size > 0); - // Only copy name if the name is a valid path name. - if ((name = strchr(line, '/')) != NULL) { - // Get rid of the last '\n' in line - char *last_return = strchr(line, '\n'); - if (last_return != NULL) - *last_return = '\0'; - // Keep a space for the ending 0. - strncpy(module.name, name, sizeof(module.name) - 1); - ++module_count; - } - if (callback_param && - !(callback_param->call_back(module, callback_param->context))) - break; - } - } - fclose(fp); - return module_count; -} - -// Parse /proc/$pid/tasks to list all the threads of the process identified by -// pid. -int LinuxThread::IterateProcSelfTask(int pid, - CallbackParam *callback_param) const { - char task_path[80]; - FillProcPath(pid, task_path, sizeof(task_path)); - strcat(task_path, "task"); - - DIR *dir = opendir(task_path); - if (dir == NULL) - return -1; - - int pid_number = 0; - // Record the last pid we've found. This is used for duplicated thread - // removal. Duplicated thread information can be found in /proc/$pid/tasks. - int last_pid = -1; - struct dirent *entry = NULL; - while ((entry = readdir(dir)) != NULL) { - if (strcmp(entry->d_name, ".") && - strcmp(entry->d_name, "..")) { - int tpid = 0; - if (LocalAtoi(entry->d_name, &tpid) && - last_pid != tpid) { - last_pid = tpid; - ++pid_number; - // Invoke the callback. - if (callback_param && - !(callback_param->call_back)(tpid, callback_param->context)) - break; - } - } - } - closedir(dir); - return pid_number; -} - -// Check if the address is a valid virtual address. -// If the address is in any of the mapped modules, we take it as valid. -// Otherwise it is invalid. -bool LinuxThread::IsAddressMapped(uintptr_t address) const { - AddressValidatingContext addr; - addr.address = address; - CallbackParam callback_param(IsAddressInModuleCallback, - &addr); - ListModules(&callback_param); - return addr.is_mapped; -} - -bool LinuxThread::FindSigContext(uintptr_t sighandler_ebp, - struct sigcontext **sig_ctx) { - uintptr_t previous_ebp; - const int MAX_STACK_DEPTH = 10; - int depth_counter = 0; - - do { - // We're looking for a |struct sigcontext| as the second parameter - // to a signal handler function call. Luckily, the sigcontext - // has an ebp member which should match the ebp pointed to - // by the ebp of the signal handler frame. - previous_ebp = reinterpret_cast(GetNextFrame( - reinterpret_cast(sighandler_ebp))); - // The stack looks like this: - // | previous ebp | previous eip | first param | second param |, - // so we need to offset by 3 to get to the second parameter. - *sig_ctx = reinterpret_cast(sighandler_ebp + - 3 * sizeof(uintptr_t)); - sighandler_ebp = previous_ebp; - depth_counter++; - } while(previous_ebp != (*sig_ctx)->ebp && sighandler_ebp != 0 && - IsAddressMapped(sighandler_ebp) && depth_counter < MAX_STACK_DEPTH); - - return previous_ebp == (*sig_ctx)->ebp && previous_ebp != 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.h b/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.h deleted file mode 100644 index f738c2e0..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread.h +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#ifndef CLIENT_LINUX_HANDLER_LINUX_THREAD_H__ -#define CLIENT_LINUX_HANDLER_LINUX_THREAD_H__ - -#include -#include - -namespace google_breakpad { - -// Max module path name length. -#define kMaxModuleNameLength 256 - -// Holding information about a thread in the process. -struct ThreadInfo { - // Id of the thread group. - int tgid; - // Id of the thread. - int pid; - // Id of the parent process. - int ppid; -}; - -// Holding infomaton about a module in the process. -struct ModuleInfo { - char name[kMaxModuleNameLength]; - uintptr_t start_addr; - int size; -}; - -// Holding debug registers. -struct DebugRegs { - int dr0; - int dr1; - int dr2; - int dr3; - int dr4; - int dr5; - int dr6; - int dr7; -}; - -// A callback to run when got a thread in the process. -// Return true will go on to the next thread while return false will stop the -// iteration. -typedef bool (*ThreadCallback)(const ThreadInfo &thread_info, void *context); - -// A callback to run when a new module is found in the process. -// Return true will go on to the next module while return false will stop the -// iteration. -typedef bool (*ModuleCallback)(const ModuleInfo &module_info, void *context); - -// Holding the callback information. -template -struct CallbackParam { - // Callback function address. - CallbackFunc call_back; - // Callback context; - void *context; - - CallbackParam() : call_back(NULL), context(NULL) { - } - - CallbackParam(CallbackFunc func, void *func_context) : - call_back(func), context(func_context) { - } -}; - -/////////////////////////////////////////////////////////////////////////////// - -// -// LinuxThread -// -// Provides handy support for operation on linux threads. -// It uses ptrace to get thread registers. Since ptrace only works in a -// different process other than the one being ptraced, user of this class -// should create another process before using the class. -// -// The process should be created in the following way: -// int cloned_pid = clone(ProcessEntryFunction, stack_address, -// CLONE_VM | CLONE_FILES | CLONE_FS | CLONE_UNTRACED, -// (void*)&arguments); -// waitpid(cloned_pid, NULL, __WALL); -// -// If CLONE_VM is not used, GetThreadStackBottom, GetThreadStackDump -// will not work since it just use memcpy to get the stack dump. -// -class LinuxThread { - public: - // Create a LinuxThread instance to list all the threads in a process. - explicit LinuxThread(int pid); - ~LinuxThread(); - - // Stop all the threads in the process. - // Return the number of stopped threads in the process. - // Return -1 means failed to stop threads. - int SuspendAllThreads(); - - // Resume all the suspended threads. - void ResumeAllThreads() const; - - // Get the count of threads in the process. - // Return -1 means error. - int GetThreadCount() const; - - // List the threads of process. - // Whenever there is a thread found, the callback will be invoked to process - // the information. - // Return number of threads listed. - int ListThreads(CallbackParam *thread_callback_param) const; - - // Get the general purpose registers of a thread. - // The caller must get the thread pid by ListThreads. - bool GetRegisters(int pid, user_regs_struct *regs) const; - - // Get the floating-point registers of a thread. - // The caller must get the thread pid by ListThreads. - bool GetFPRegisters(int pid, user_fpregs_struct *regs) const; - - // Get all the extended floating-point registers. May not work on all - // machines. - // The caller must get the thread pid by ListThreads. - bool GetFPXRegisters(int pid, user_fpxregs_struct *regs) const; - - // Get the debug registers. - // The caller must get the thread pid by ListThreads. - bool GetDebugRegisters(int pid, DebugRegs *regs) const; - - // Get the stack memory dump. - int GetThreadStackDump(uintptr_t current_ebp, - uintptr_t current_esp, - void *buf, - int buf_size) const; - - // Get the module count of the current process. - int GetModuleCount() const; - - // Get the mapped modules in the address space. - // Whenever a module is found, the callback will be invoked to process the - // information. - // Return how may modules are found. - int ListModules(CallbackParam *callback_param) const; - - // Get the bottom of the stack from ebp. - uintptr_t GetThreadStackBottom(uintptr_t current_ebp) const; - - // Finds a sigcontext on the stack given the ebp of our signal handler. - bool FindSigContext(uintptr_t sighandler_ebp, struct sigcontext **sig_ctx); - - private: - // This callback will run when a new thread has been found. - typedef bool (*PidCallback)(int pid, void *context); - - // Read thread information from /proc/$pid/task. - // Whenever a thread has been found, and callback will be invoked with - // the pid of the thread. - // Return number of threads found. - // Return -1 means the directory doesn't exist. - int IterateProcSelfTask(int pid, - CallbackParam *callback_param) const; - - // Check if the address is a valid virtual address. - bool IsAddressMapped(uintptr_t address) const; - - private: - // The pid of the process we are listing threads. - int pid_; - - // Mark if we have suspended the threads. - bool threads_suspened_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_LINUX_THREAD_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread_test.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread_test.cc deleted file mode 100644 index aeb5e64c..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/linux_thread_test.cc +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include - -#include -#include -#include - -#include "client/linux/handler/linux_thread.h" - -using namespace google_breakpad; - -// Thread use this to see if it should stop working. -static bool should_exit = false; - -static void foo2(int *a) { - // Stack variable, used for debugging stack dumps. - int c = 0xcccccccc; - c = c; - while (!should_exit) - sleep(1); -} - -static void foo() { - // Stack variable, used for debugging stack dumps. - int a = 0xaaaaaaaa; - foo2(&a); -} - -static void *thread_main(void *) { - // Stack variable, used for debugging stack dumps. - int b = 0xbbbbbbbb; - b = b; - while (!should_exit) { - foo(); - } - return NULL; -} - -static void CreateThreads(int num) { - pthread_t handle; - for (int i = 0; i < num; i++) { - if (0 != pthread_create(&handle, NULL, thread_main, NULL)) - fprintf(stderr, "Failed to create thread.\n"); - else - pthread_detach(handle); - } -} - -static bool ProcessOneModule(const struct ModuleInfo &module_info, - void *context) { - printf("0x%x[%8d] %s\n", module_info.start_addr, module_info.size, - module_info.name); - return true; -} - -static bool ProcessOneThread(const struct ThreadInfo &thread_info, - void *context) { - printf("\n\nPID: %d, TGID: %d, PPID: %d\n", - thread_info.pid, - thread_info.tgid, - thread_info.ppid); - - struct user_regs_struct regs; - struct user_fpregs_struct fp_regs; - struct user_fpxregs_struct fpx_regs; - struct DebugRegs dbg_regs; - - LinuxThread *threads = reinterpret_cast(context); - memset(®s, 0, sizeof(regs)); - if (threads->GetRegisters(thread_info.pid, ®s)) { - printf(" gs = 0x%lx\n", regs.xgs); - printf(" fs = 0x%lx\n", regs.xfs); - printf(" es = 0x%lx\n", regs.xes); - printf(" ds = 0x%lx\n", regs.xds); - printf(" edi = 0x%lx\n", regs.edi); - printf(" esi = 0x%lx\n", regs.esi); - printf(" ebx = 0x%lx\n", regs.ebx); - printf(" edx = 0x%lx\n", regs.edx); - printf(" ecx = 0x%lx\n", regs.ecx); - printf(" eax = 0x%lx\n", regs.eax); - printf(" ebp = 0x%lx\n", regs.ebp); - printf(" eip = 0x%lx\n", regs.eip); - printf(" cs = 0x%lx\n", regs.xcs); - printf(" eflags = 0x%lx\n", regs.eflags); - printf(" esp = 0x%lx\n", regs.esp); - printf(" ss = 0x%lx\n", regs.xss); - } else { - fprintf(stderr, "ERROR: Failed to get general purpose registers\n"); - } - memset(&fp_regs, 0, sizeof(fp_regs)); - if (threads->GetFPRegisters(thread_info.pid, &fp_regs)) { - printf("\n Floating point registers:\n"); - printf(" fctl = 0x%lx\n", fp_regs.cwd); - printf(" fstat = 0x%lx\n", fp_regs.swd); - printf(" ftag = 0x%lx\n", fp_regs.twd); - printf(" fioff = 0x%lx\n", fp_regs.fip); - printf(" fiseg = 0x%lx\n", fp_regs.fcs); - printf(" fooff = 0x%lx\n", fp_regs.foo); - printf(" foseg = 0x%lx\n", fp_regs.fos); - int st_space_size = sizeof(fp_regs.st_space) / sizeof(fp_regs.st_space[0]); - printf(" st_space[%2d] = 0x", st_space_size); - for (int i = 0; i < st_space_size; ++i) - printf("%02lx", fp_regs.st_space[i]); - printf("\n"); - } else { - fprintf(stderr, "ERROR: Failed to get floating-point registers\n"); - } - memset(&fpx_regs, 0, sizeof(fpx_regs)); - if (threads->GetFPXRegisters(thread_info.pid, &fpx_regs)) { - printf("\n Extended floating point registers:\n"); - printf(" fctl = 0x%x\n", fpx_regs.cwd); - printf(" fstat = 0x%x\n", fpx_regs.swd); - printf(" ftag = 0x%x\n", fpx_regs.twd); - printf(" fioff = 0x%lx\n", fpx_regs.fip); - printf(" fiseg = 0x%lx\n", fpx_regs.fcs); - printf(" fooff = 0x%lx\n", fpx_regs.foo); - printf(" foseg = 0x%lx\n", fpx_regs.fos); - printf(" fop = 0x%x\n", fpx_regs.fop); - printf(" mxcsr = 0x%lx\n", fpx_regs.mxcsr); - int space_size = sizeof(fpx_regs.st_space) / sizeof(fpx_regs.st_space[0]); - printf(" st_space[%2d] = 0x", space_size); - for (int i = 0; i < space_size; ++i) - printf("%02lx", fpx_regs.st_space[i]); - printf("\n"); - space_size = sizeof(fpx_regs.xmm_space) / sizeof(fpx_regs.xmm_space[0]); - printf(" xmm_space[%2d] = 0x", space_size); - for (int i = 0; i < space_size; ++i) - printf("%02lx", fpx_regs.xmm_space[i]); - printf("\n"); - } - if (threads->GetDebugRegisters(thread_info.pid, &dbg_regs)) { - printf("\n Debug registers:\n"); - printf(" dr0 = 0x%x\n", dbg_regs.dr0); - printf(" dr1 = 0x%x\n", dbg_regs.dr1); - printf(" dr2 = 0x%x\n", dbg_regs.dr2); - printf(" dr3 = 0x%x\n", dbg_regs.dr3); - printf(" dr4 = 0x%x\n", dbg_regs.dr4); - printf(" dr5 = 0x%x\n", dbg_regs.dr5); - printf(" dr6 = 0x%x\n", dbg_regs.dr6); - printf(" dr7 = 0x%x\n", dbg_regs.dr7); - printf("\n"); - } - if (regs.esp != 0) { - // Print the stack content. - int size = 1024 * 2; - char *buf = new char[size]; - size = threads->GetThreadStackDump(regs.ebp, - regs.esp, - (void*)buf, size); - printf(" Stack content: = 0x"); - size /= sizeof(unsigned long); - unsigned long *p_buf = (unsigned long *)(buf); - for (int i = 0; i < size; i += 1) - printf("%.8lx ", p_buf[i]); - delete []buf; - printf("\n"); - } - return true; -} - -static int PrintAllThreads(void *argument) { - int pid = (int)argument; - - LinuxThread threads(pid); - int total_thread = threads.SuspendAllThreads(); - printf("There are %d threads in the process: %d\n", total_thread, pid); - int total_module = threads.GetModuleCount(); - printf("There are %d modules in the process: %d\n", total_module, pid); - CallbackParam module_callback(ProcessOneModule, &threads); - threads.ListModules(&module_callback); - CallbackParam thread_callback(ProcessOneThread, &threads); - threads.ListThreads(&thread_callback); - return 0; -} - -int main(int argc, char **argv) { - int pid = getpid(); - printf("Main thread is %d\n", pid); - CreateThreads(1); - // Create stack for the process. - char *stack = new char[1024 * 100]; - int cloned_pid = clone(PrintAllThreads, stack + 1024 * 100, - CLONE_VM | CLONE_FILES | CLONE_FS | CLONE_UNTRACED, - (void*)getpid()); - waitpid(cloned_pid, NULL, __WALL); - should_exit = true; - printf("Test finished.\n"); - - delete []stack; - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.cc deleted file mode 100644 index bc4d213a..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.cc +++ /dev/null @@ -1,815 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "common/linux/file_id.h" -#include "client/linux/handler/linux_thread.h" -#include "client/minidump_file_writer.h" -#include "client/minidump_file_writer-inl.h" -#include "google_breakpad/common/minidump_format.h" -#include "client/linux/handler/minidump_generator.h" - -#ifndef CLONE_UNTRACED -#define CLONE_UNTRACED 0x00800000 -#endif - -// This unnamed namespace contains helper functions. -namespace { - -using namespace google_breakpad; - -// Argument for the writer function. -struct WriterArgument { - MinidumpFileWriter *minidump_writer; - - // Context for the callback. - void *version_context; - - // Pid of the thread who called WriteMinidumpToFile - int requester_pid; - - // The stack bottom of the thread which caused the dump. - // Mainly used to find the thread id of the crashed thread since signal - // handler may not be called in the thread who caused it. - uintptr_t crashed_stack_bottom; - - // Pid of the crashing thread. - int crashed_pid; - - // Signal number when crash happed. Can be 0 if this is a requested dump. - int signo; - - // The ebp of the signal handler frame. Can be zero if this - // is a requested dump. - uintptr_t sighandler_ebp; - - // Signal context when crash happed. Can be NULL if this is a requested dump. - // This is actually an out parameter, but it will be filled in at the start - // of the writer thread. - struct sigcontext *sig_ctx; - - // Used to get information about the threads. - LinuxThread *thread_lister; -}; - -// Holding context information for the callback of finding the crashing thread. -struct FindCrashThreadContext { - const LinuxThread *thread_lister; - uintptr_t crashing_stack_bottom; - int crashing_thread_pid; - - FindCrashThreadContext() : - thread_lister(NULL), - crashing_stack_bottom(0UL), - crashing_thread_pid(-1) { - } -}; - -// Callback for list threads. -// It will compare the stack bottom of the provided thread with the stack -// bottom of the crashed thread, it they are eqaul, this is thread is the one -// who crashed. -bool IsThreadCrashedCallback(const ThreadInfo &thread_info, void *context) { - FindCrashThreadContext *crashing_context = - static_cast(context); - const LinuxThread *thread_lister = crashing_context->thread_lister; - struct user_regs_struct regs; - if (thread_lister->GetRegisters(thread_info.pid, ®s)) { - uintptr_t last_ebp = regs.ebp; - uintptr_t stack_bottom = thread_lister->GetThreadStackBottom(last_ebp); - if (stack_bottom > last_ebp && - stack_bottom == crashing_context->crashing_stack_bottom) { - // Got it. Stop iteration. - crashing_context->crashing_thread_pid = thread_info.pid; - return false; - } - } - return true; -} - -// Find the crashing thread id. -// This is done based on stack bottom comparing. -int FindCrashingThread(uintptr_t crashing_stack_bottom, - int requester_pid, - const LinuxThread *thread_lister) { - FindCrashThreadContext context; - context.thread_lister = thread_lister; - context.crashing_stack_bottom = crashing_stack_bottom; - CallbackParam callback_param(IsThreadCrashedCallback, - &context); - thread_lister->ListThreads(&callback_param); - return context.crashing_thread_pid; -} - -// Write the thread stack info minidump. -bool WriteThreadStack(uintptr_t last_ebp, - uintptr_t last_esp, - const LinuxThread *thread_lister, - UntypedMDRVA *memory, - MDMemoryDescriptor *loc) { - // Maximum stack size for a thread. - uintptr_t stack_bottom = thread_lister->GetThreadStackBottom(last_ebp); - if (stack_bottom > last_esp) { - int size = stack_bottom - last_esp; - if (size > 0) { - if (!memory->Allocate(size)) - return false; - memory->Copy(reinterpret_cast(last_esp), size); - loc->start_of_memory_range = 0 | last_esp; - loc->memory = memory->location(); - } - return true; - } - return false; -} - -// Write CPU context based on signal context. -bool WriteContext(MDRawContextX86 *context, const struct sigcontext *sig_ctx, - const DebugRegs *debug_regs) { - assert(sig_ctx != NULL); - context->context_flags = MD_CONTEXT_X86_FULL; - context->gs = sig_ctx->gs; - context->fs = sig_ctx->fs; - context->es = sig_ctx->es; - context->ds = sig_ctx->ds; - context->cs = sig_ctx->cs; - context->ss = sig_ctx->ss; - context->edi = sig_ctx->edi; - context->esi = sig_ctx->esi; - context->ebp = sig_ctx->ebp; - context->esp = sig_ctx->esp; - context->ebx = sig_ctx->ebx; - context->edx = sig_ctx->edx; - context->ecx = sig_ctx->ecx; - context->eax = sig_ctx->eax; - context->eip = sig_ctx->eip; - context->eflags = sig_ctx->eflags; - if (sig_ctx->fpstate != NULL) { - context->context_flags = MD_CONTEXT_X86_FULL | - MD_CONTEXT_X86_FLOATING_POINT; - context->float_save.control_word = sig_ctx->fpstate->cw; - context->float_save.status_word = sig_ctx->fpstate->sw; - context->float_save.tag_word = sig_ctx->fpstate->tag; - context->float_save.error_offset = sig_ctx->fpstate->ipoff; - context->float_save.error_selector = sig_ctx->fpstate->cssel; - context->float_save.data_offset = sig_ctx->fpstate->dataoff; - context->float_save.data_selector = sig_ctx->fpstate->datasel; - memcpy(context->float_save.register_area, sig_ctx->fpstate->_st, - sizeof(context->float_save.register_area)); - } - - if (debug_regs != NULL) { - context->context_flags |= MD_CONTEXT_X86_DEBUG_REGISTERS; - context->dr0 = debug_regs->dr0; - context->dr1 = debug_regs->dr1; - context->dr2 = debug_regs->dr2; - context->dr3 = debug_regs->dr3; - context->dr6 = debug_regs->dr6; - context->dr7 = debug_regs->dr7; - } - return true; -} - -// Write CPU context based on provided registers. -bool WriteContext(MDRawContextX86 *context, - const struct user_regs_struct *regs, - const struct user_fpregs_struct *fp_regs, - const DebugRegs *dbg_regs) { - if (!context || !regs) - return false; - - context->context_flags = MD_CONTEXT_X86_FULL; - - context->cs = regs->xcs; - context->ds = regs->xds; - context->es = regs->xes; - context->fs = regs->xfs; - context->gs = regs->xgs; - context->ss = regs->xss; - context->edi = regs->edi; - context->esi = regs->esi; - context->ebx = regs->ebx; - context->edx = regs->edx; - context->ecx = regs->ecx; - context->eax = regs->eax; - context->ebp = regs->ebp; - context->eip = regs->eip; - context->esp = regs->esp; - context->eflags = regs->eflags; - - if (dbg_regs != NULL) { - context->context_flags |= MD_CONTEXT_X86_DEBUG_REGISTERS; - context->dr0 = dbg_regs->dr0; - context->dr1 = dbg_regs->dr1; - context->dr2 = dbg_regs->dr2; - context->dr3 = dbg_regs->dr3; - context->dr6 = dbg_regs->dr6; - context->dr7 = dbg_regs->dr7; - } - - if (fp_regs != NULL) { - context->context_flags |= MD_CONTEXT_X86_FLOATING_POINT; - context->float_save.control_word = fp_regs->cwd; - context->float_save.status_word = fp_regs->swd; - context->float_save.tag_word = fp_regs->twd; - context->float_save.error_offset = fp_regs->fip; - context->float_save.error_selector = fp_regs->fcs; - context->float_save.data_offset = fp_regs->foo; - context->float_save.data_selector = fp_regs->fos; - context->float_save.data_selector = fp_regs->fos; - - memcpy(context->float_save.register_area, fp_regs->st_space, - sizeof(context->float_save.register_area)); - } - return true; -} - -// Write information about a crashed thread. -// When a thread crash, kernel will write something on the stack for processing -// signal. This makes the current stack not reliable, and our stack walker -// won't figure out the whole call stack for this. So we write the stack at the -// time of the crash into the minidump file, not the current stack. -bool WriteCrashedThreadStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - const ThreadInfo &thread_info, - MDRawThread *thread) { - assert(writer_args->sig_ctx != NULL); - - thread->thread_id = thread_info.pid; - - UntypedMDRVA memory(minidump_writer); - if (!WriteThreadStack(writer_args->sig_ctx->ebp, - writer_args->sig_ctx->esp, - writer_args->thread_lister, - &memory, - &thread->stack)) - return false; - - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - thread->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), writer_args->sig_ctx, NULL); -} - -// Write information about a thread. -// This function only processes thread running normally at the crash. -bool WriteThreadStream(MinidumpFileWriter *minidump_writer, - const LinuxThread *thread_lister, - const ThreadInfo &thread_info, - MDRawThread *thread) { - thread->thread_id = thread_info.pid; - - struct user_regs_struct regs; - memset(®s, 0, sizeof(regs)); - if (!thread_lister->GetRegisters(thread_info.pid, ®s)) { - perror(NULL); - return false; - } - - UntypedMDRVA memory(minidump_writer); - if (!WriteThreadStack(regs.ebp, - regs.esp, - thread_lister, - &memory, - &thread->stack)) - return false; - - struct user_fpregs_struct fp_regs; - DebugRegs dbg_regs; - memset(&fp_regs, 0, sizeof(fp_regs)); - // Get all the registers. - thread_lister->GetFPRegisters(thread_info.pid, &fp_regs); - thread_lister->GetDebugRegisters(thread_info.pid, &dbg_regs); - - // Write context - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - thread->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), ®s, &fp_regs, &dbg_regs); -} - -bool WriteCPUInformation(MDRawSystemInfo *sys_info) { - const char *proc_cpu_path = "/proc/cpuinfo"; - char line[128]; - char vendor_id[13]; - const char vendor_id_name[] = "vendor_id"; - const size_t vendor_id_name_length = sizeof(vendor_id_name) - 1; - - struct CpuInfoEntry { - const char *info_name; - int value; - } cpu_info_table[] = { - { "processor", -1 }, - { "model", 0 }, - { "stepping", 0 }, - { "cpuid level", 0 }, - { NULL, -1 }, - }; - - memset(vendor_id, 0, sizeof(vendor_id)); - - FILE *fp = fopen(proc_cpu_path, "r"); - if (fp != NULL) { - while (fgets(line, sizeof(line), fp)) { - CpuInfoEntry *entry = &cpu_info_table[0]; - while (entry->info_name != NULL) { - if (!strncmp(line, entry->info_name, strlen(entry->info_name))) { - char *value = strchr(line, ':'); - value++; - if (value != NULL) - sscanf(value, " %d", &(entry->value)); - } - entry++; - } - - // special case for vendor_id - if (!strncmp(line, vendor_id_name, vendor_id_name_length)) { - char *value = strchr(line, ':'); - if (value == NULL) - continue; - - value++; - while (*value && isspace(*value)) - value++; - if (*value) { - size_t length = strlen(value); - // we don't want the trailing newline - if (value[length - 1] == '\n') - length--; - // ensure we have space for the value - if (length < sizeof(vendor_id)) - strncpy(vendor_id, value, length); - } - } - } - fclose(fp); - } - - // /proc/cpuinfo contains cpu id, change it into number by adding one. - cpu_info_table[0].value++; - - sys_info->number_of_processors = cpu_info_table[0].value; - sys_info->processor_level = cpu_info_table[3].value; - sys_info->processor_revision = cpu_info_table[1].value << 8 | - cpu_info_table[2].value; - - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - struct utsname uts; - if (uname(&uts) == 0) { - // Match i*86 and x86* as X86 architecture. - if ((strstr(uts.machine, "x86") == uts.machine) || - (strlen(uts.machine) == 4 && - uts.machine[0] == 'i' && - uts.machine[2] == '8' && - uts.machine[3] == '6')) { - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_X86; - if (vendor_id[0] != '\0') - memcpy(sys_info->cpu.x86_cpu_info.vendor_id, vendor_id, - sizeof(sys_info->cpu.x86_cpu_info.vendor_id)); - } - } - return true; -} - -bool WriteOSInformation(MinidumpFileWriter *minidump_writer, - MDRawSystemInfo *sys_info) { - sys_info->platform_id = MD_OS_LINUX; - - struct utsname uts; - if (uname(&uts) == 0) { - char os_version[512]; - size_t space_left = sizeof(os_version); - memset(os_version, 0, space_left); - const char *os_info_table[] = { - uts.sysname, - uts.release, - uts.version, - uts.machine, - "GNU/Linux", - NULL - }; - for (const char **cur_os_info = os_info_table; - *cur_os_info != NULL; - cur_os_info++) { - if (cur_os_info != os_info_table && space_left > 1) { - strcat(os_version, " "); - space_left--; - } - if (space_left > strlen(*cur_os_info)) { - strcat(os_version, *cur_os_info); - space_left -= strlen(*cur_os_info); - } else { - break; - } - } - - MDLocationDescriptor location; - if (!minidump_writer->WriteString(os_version, 0, &location)) - return false; - sys_info->csd_version_rva = location.rva; - } - return true; -} - -// Callback context for get writting thread information. -struct ThreadInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int thread_index; -}; - -// Callback run for writing threads information in the process. -bool ThreadInfomationCallback(const ThreadInfo &thread_info, - void *context) { - ThreadInfoCallbackCtx *callback_context = - static_cast(context); - bool success = true; - MDRawThread thread; - memset(&thread, 0, sizeof(MDRawThread)); - if (thread_info.pid != callback_context->writer_args->crashed_pid || - callback_context->writer_args->sig_ctx == NULL) { - success = WriteThreadStream(callback_context->minidump_writer, - callback_context->writer_args->thread_lister, - thread_info, &thread); - } else { - success = WriteCrashedThreadStream(callback_context->minidump_writer, - callback_context->writer_args, - thread_info, &thread); - } - if (success) { - callback_context->list->CopyIndexAfterObject( - callback_context->thread_index++, - &thread, sizeof(MDRawThread)); - } - return success; -} - -// Stream writers -bool WriteThreadListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // Get the thread information. - const LinuxThread *thread_lister = writer_args->thread_lister; - int thread_count = thread_lister->GetThreadCount(); - if (thread_count < 0) - return false; - TypedMDRVA list(minidump_writer); - if (!list.AllocateObjectAndArray(thread_count, sizeof(MDRawThread))) - return false; - dir->stream_type = MD_THREAD_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_threads = thread_count; - - ThreadInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.thread_index = 0; - CallbackParam callback_param(ThreadInfomationCallback, - &context); - int written = thread_lister->ListThreads(&callback_param); - return written == thread_count; -} - -bool WriteCVRecord(MinidumpFileWriter *minidump_writer, - MDRawModule *module, - const char *module_path) { - TypedMDRVA cv(minidump_writer); - - // Only return the last path component of the full module path - const char *module_name = strrchr(module_path, '/'); - // Increment past the slash - if (module_name) - ++module_name; - else - module_name = ""; - - size_t module_name_length = strlen(module_name); - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) - return false; - if (!cv.CopyIndexAfterObject(0, const_cast(module_name), - module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - memset(cv_ptr, 0, sizeof(MDCVInfoPDB70)); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - FileID file_id(module_path); - unsigned char identifier[16]; - - if (file_id.ElfFileIdentifier(identifier)) { - cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | - (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | - (uint32_t)identifier[3]; - cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; - cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - return true; -} - -struct ModuleInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int module_index; -}; - -bool ModuleInfoCallback(const ModuleInfo &module_info, - void *context) { - ModuleInfoCallbackCtx *callback_context = - static_cast(context); - // Skip those modules without name, or those that are not modules. - if (strlen(module_info.name) == 0 || - !strchr(module_info.name, '/')) - return true; - - MDRawModule module; - memset(&module, 0, sizeof(module)); - MDLocationDescriptor loc; - if (!callback_context->minidump_writer->WriteString(module_info.name, 0, - &loc)) - return false; - module.base_of_image = (u_int64_t)module_info.start_addr; - module.size_of_image = module_info.size; - module.module_name_rva = loc.rva; - - if (!WriteCVRecord(callback_context->minidump_writer, &module, - module_info.name)) - return false; - callback_context->list->CopyIndexAfterObject( - callback_context->module_index++, &module, MD_MODULE_SIZE); - return true; -} - -bool WriteModuleListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA list(minidump_writer); - int module_count = writer_args->thread_lister->GetModuleCount(); - if (module_count <= 0 || - !list.AllocateObjectAndArray(module_count, MD_MODULE_SIZE)) - return false; - dir->stream_type = MD_MODULE_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_modules = module_count; - ModuleInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.module_index = 0; - CallbackParam callback(ModuleInfoCallback, &context); - return writer_args->thread_lister->ListModules(&callback) == module_count; -} - -bool WriteSystemInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA sys_info(minidump_writer); - if (!sys_info.Allocate()) - return false; - dir->stream_type = MD_SYSTEM_INFO_STREAM; - dir->location = sys_info.location(); - - return WriteCPUInformation(sys_info.get()) && - WriteOSInformation(minidump_writer, sys_info.get()); -} - -bool WriteExceptionStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // This happenes when this is not a crash, but a requested dump. - if (writer_args->sig_ctx == NULL) - return false; - - TypedMDRVA exception(minidump_writer); - if (!exception.Allocate()) - return false; - - dir->stream_type = MD_EXCEPTION_STREAM; - dir->location = exception.location(); - exception.get()->thread_id = writer_args->crashed_pid; - exception.get()->exception_record.exception_code = writer_args->signo; - exception.get()->exception_record.exception_flags = 0; - if (writer_args->sig_ctx != NULL) { - exception.get()->exception_record.exception_address = - writer_args->sig_ctx->eip; - } else { - return true; - } - - // Write context of the exception. - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - exception.get()->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), writer_args->sig_ctx, NULL); -} - -bool WriteMiscInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - if (!info.Allocate()) - return false; - - dir->stream_type = MD_MISC_INFO_STREAM; - dir->location = info.location(); - info.get()->size_of_info = sizeof(MDRawMiscInfo); - info.get()->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID; - info.get()->process_id = writer_args->requester_pid; - - return true; -} - -bool WriteBreakpadInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - if (!info.Allocate()) - return false; - - dir->stream_type = MD_BREAKPAD_INFO_STREAM; - dir->location = info.location(); - - info.get()->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info.get()->dump_thread_id = getpid(); - info.get()->requesting_thread_id = writer_args->requester_pid; - return true; -} - -// Prototype of writer functions. -typedef bool (*WriteStringFN)(MinidumpFileWriter *, - const WriterArgument *, - MDRawDirectory *); - -// Function table to writer a full minidump. -WriteStringFN writers[] = { - WriteThreadListStream, - WriteModuleListStream, - WriteSystemInfoStream, - WriteExceptionStream, - WriteMiscInfoStream, - WriteBreakpadInfoStream, -}; - -// Will call each writer function in the writers table. -// It runs in a different process from the crashing process, but sharing -// the same address space. This enables it to use ptrace functions. -int Write(void *argument) { - WriterArgument *writer_args = - static_cast(argument); - - if (!writer_args->thread_lister->SuspendAllThreads()) - return -1; - - if (writer_args->sighandler_ebp != 0 && - writer_args->thread_lister->FindSigContext(writer_args->sighandler_ebp, - &writer_args->sig_ctx)) { - writer_args->crashed_stack_bottom = - writer_args->thread_lister->GetThreadStackBottom( - writer_args->sig_ctx->ebp); - int crashed_pid = FindCrashingThread(writer_args->crashed_stack_bottom, - writer_args->requester_pid, - writer_args->thread_lister); - if (crashed_pid > 0) - writer_args->crashed_pid = crashed_pid; - } - - - MinidumpFileWriter *minidump_writer = writer_args->minidump_writer; - TypedMDRVA header(minidump_writer); - TypedMDRVA dir(minidump_writer); - if (!header.Allocate()) - return 0; - - int writer_count = sizeof(writers) / sizeof(writers[0]); - // Need directory space for all writers. - if (!dir.AllocateArray(writer_count)) - return 0; - header.get()->signature = MD_HEADER_SIGNATURE; - header.get()->version = MD_HEADER_VERSION; - header.get()->time_date_stamp = time(NULL); - header.get()->stream_count = writer_count; - header.get()->stream_directory_rva = dir.position(); - - int dir_index = 0; - MDRawDirectory local_dir; - for (int i = 0; i < writer_count; ++i) { - if (writers[i](minidump_writer, writer_args, &local_dir)) - dir.CopyIndex(dir_index++, &local_dir); - } - - writer_args->thread_lister->ResumeAllThreads(); - return 0; -} - -} // namespace - -namespace google_breakpad { - -MinidumpGenerator::MinidumpGenerator() { - AllocateStack(); -} - -MinidumpGenerator::~MinidumpGenerator() { -} - -void MinidumpGenerator::AllocateStack() { - stack_.reset(new char[kStackSize]); -} - -bool MinidumpGenerator::WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - struct sigcontext **sig_ctx) const { - assert(file_pathname != NULL); - assert(stack_ != NULL); - - if (stack_ == NULL || file_pathname == NULL) - return false; - - MinidumpFileWriter minidump_writer; - if (minidump_writer.Open(file_pathname)) { - WriterArgument argument; - memset(&argument, 0, sizeof(argument)); - LinuxThread thread_lister(getpid()); - argument.thread_lister = &thread_lister; - argument.minidump_writer = &minidump_writer; - argument.requester_pid = getpid(); - argument.crashed_pid = getpid(); - argument.signo = signo; - argument.sighandler_ebp = sighandler_ebp; - argument.sig_ctx = NULL; - - int cloned_pid = clone(Write, stack_.get() + kStackSize, - CLONE_VM | CLONE_FILES | CLONE_FS | CLONE_UNTRACED, - (void*)&argument); - waitpid(cloned_pid, NULL, __WALL); - if (sig_ctx != NULL) - *sig_ctx = argument.sig_ctx; - return true; - } - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.h b/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.h deleted file mode 100644 index 7c0511f5..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_generator.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_HANDLER_MINIDUMP_GENERATOR_H__ -#define CLIENT_LINUX_HANDLER_MINIDUMP_GENERATOR_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "processor/scoped_ptr.h" - -struct sigcontext; - -namespace google_breakpad { - -// -// MinidumpGenerator -// -// Write a minidump to file based on the signo and sig_ctx. -// A minidump generator should be created before any exception happen. -// -class MinidumpGenerator { - public: - MinidumpGenerator(); - - ~MinidumpGenerator(); - - // Write minidump. - bool WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - struct sigcontext **sig_ctx) const; - private: - // Allocate memory for stack. - void AllocateStack(); - - private: - // Stack size of the writer thread. - static const int kStackSize = 1024 * 1024; - scoped_array stack_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_MINIDUMP_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_test.cc b/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_test.cc deleted file mode 100644 index f8c4e784..00000000 --- a/thirdparty/google-breakpad/r318/src/client/linux/handler/minidump_test.cc +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Author: Li Liu -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include -#include -#include -#include - -#include "client/linux/handler/minidump_generator.h" - -using namespace google_breakpad; - -// Thread use this to see if it should stop working. -static bool should_exit = false; - -static void foo2(int arg) { - // Stack variable, used for debugging stack dumps. - int c = arg; - c = 0xcccccccc; - while (!should_exit) - sleep(1); -} - -static void foo(int arg) { - // Stack variable, used for debugging stack dumps. - int b = arg; - b = 0xbbbbbbbb; - foo2(b); -} - -static void *thread_main(void *) { - // Stack variable, used for debugging stack dumps. - int a = 0xaaaaaaaa; - foo(a); - return NULL; -} - -static void CreateThread(int num) { - pthread_t h; - for (int i = 0; i < num; ++i) { - pthread_create(&h, NULL, thread_main, NULL); - pthread_detach(h); - } -} - -int main(int argc, char *argv[]) { - CreateThread(10); - google_breakpad::MinidumpGenerator mg; - if (mg.WriteMinidumpToFile("minidump_test.out", -1, 0, NULL)) - printf("Succeeded written minidump\n"); - else - printf("Failed to write minidump\n"); - should_exit = true; - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.c b/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.c deleted file mode 100644 index 19f36b19..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.c +++ /dev/null @@ -1,1750 +0,0 @@ -/* - * IDENTIFICATION: - * stub generated Mon Jun 16 18:08:10 2008 - * with a MiG generated Tue Feb 19 02:01:43 PST 2008 by root@b75.local - * OPTIONS: - */ - -/* Module exc */ - -#define __MIG_check__Request__exc_subsystem__ 1 -#define __NDR_convert__Request__exc_subsystem__ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifndef mig_internal -#define mig_internal static __inline__ -#endif /* mig_internal */ - -#ifndef mig_external -#define mig_external -#endif /* mig_external */ - -#if !defined(__MigTypeCheck) && defined(TypeCheck) -#define __MigTypeCheck TypeCheck /* Legacy setting */ -#endif /* !defined(__MigTypeCheck) */ - -#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) -#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ -#endif /* !defined(__MigKernelSpecificCode) */ - -#ifndef LimitCheck -#define LimitCheck 0 -#endif /* LimitCheck */ - -#ifndef min -#define min(a,b) ( ((a) < (b))? (a): (b) ) -#endif /* min */ - -#if !defined(_WALIGN_) -#define _WALIGN_(x) (((x) + 3) & ~3) -#endif /* !defined(_WALIGN_) */ - -#if !defined(_WALIGNSZ_) -#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) -#endif /* !defined(_WALIGNSZ_) */ - -#ifndef UseStaticTemplates -#define UseStaticTemplates 0 -#endif /* UseStaticTemplates */ - -#ifndef __DeclareRcvRpc -#define __DeclareRcvRpc(_NUM_, _NAME_) -#endif /* __DeclareRcvRpc */ - -#ifndef __BeforeRcvRpc -#define __BeforeRcvRpc(_NUM_, _NAME_) -#endif /* __BeforeRcvRpc */ - -#ifndef __AfterRcvRpc -#define __AfterRcvRpc(_NUM_, _NAME_) -#endif /* __AfterRcvRpc */ - -#ifndef __DeclareRcvSimple -#define __DeclareRcvSimple(_NUM_, _NAME_) -#endif /* __DeclareRcvSimple */ - -#ifndef __BeforeRcvSimple -#define __BeforeRcvSimple(_NUM_, _NAME_) -#endif /* __BeforeRcvSimple */ - -#ifndef __AfterRcvSimple -#define __AfterRcvSimple(_NUM_, _NAME_) -#endif /* __AfterRcvSimple */ - -#define novalue void - -#define msgh_request_port msgh_local_port -#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) -#define msgh_reply_port msgh_remote_port -#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) - -#define MIG_RETURN_ERROR(X, code) {\ - ((mig_reply_error_t *)X)->RetCode = code;\ - ((mig_reply_error_t *)X)->NDR = NDR_record;\ - return;\ - } - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - - -/* union of all replies */ - -#ifndef __ReplyUnion__breakpad_exc_subsystem__defined -#define __ReplyUnion__breakpad_exc_subsystem__defined -union __ReplyUnion__breakpad_exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* __RequestUnion__breakpad_exc_subsystem__defined */ -/* Forward Declarations */ - - -mig_internal novalue _Xexception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xexception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xexception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_t__defined) -#define __MIG_check__Request__exception_raise_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__code__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_t(__attribute__((__unused__)) __Request__exception_raise_t *In0P) -{ - - typedef __Request__exception_raise_t __Request; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 8)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)) -) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 8) + ((4 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_t__code__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_t__code__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_t__code__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise */ -mig_internal novalue _Xexception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_t __Request; - typedef __Reply__exception_raise_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_t__defined */ - - __DeclareRcvRpc(2401, "exception_raise") - __BeforeRcvRpc(2401, "exception_raise") - -#if defined(__MIG_check__Request__exception_raise_t__defined) - check_result = __MIG_check__Request__exception_raise_t((__Request *)In0P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_t__defined) */ - - OutP->RetCode = breakpad_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); - - OutP->NDR = NDR_record; - - - __AfterRcvRpc(2401, "exception_raise") -} - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_state_t__defined) -#define __MIG_check__Request__exception_raise_state_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t) -#elif defined(__NDR_convert__int_rep__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t) -#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t) -#elif defined(__NDR_convert__int_rep__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t) -#elif defined(__NDR_convert__char_rep__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t) -#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t) -#elif defined(__NDR_convert__char_rep__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#if defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t) -#elif defined(__NDR_convert__float_rep__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t) -#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t) -#elif defined(__NDR_convert__float_rep__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_state_t(__attribute__((__unused__)) __Request__exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__exception_raise_state_t **In1PP) -{ - - typedef __Request__exception_raise_state_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined */ - msgh_size_delta = (4 * In0P->codeCnt); -#if __MigTypeCheck - if (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584) + msgh_size_delta) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 8); - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 584) + ((4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__codeCnt__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__int_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.int_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__char_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.char_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__code__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__flavor(&In1P->flavor, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__flavor__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined) - __NDR_convert__float_rep__Request__exception_raise_state_t__old_state(&In1P->old_state, In0P->NDR.float_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_state_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state */ -mig_internal novalue _Xexception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_state_t __Request; - typedef __Reply__exception_raise_state_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_state_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_state_t__defined */ - - __DeclareRcvRpc(2402, "exception_raise_state") - __BeforeRcvRpc(2402, "exception_raise_state") - -#if defined(__MIG_check__Request__exception_raise_state_t__defined) - check_result = __MIG_check__Request__exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_state_t__defined) */ - - OutP->new_stateCnt = 144; - - OutP->RetCode = breakpad_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 576) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2402, "exception_raise_state") -} - -#if ( __MigTypeCheck || __NDR_convert__ ) -#if __MIG_check__Request__exc_subsystem__ -#if !defined(__MIG_check__Request__exception_raise_state_identity_t__defined) -#define __MIG_check__Request__exception_raise_state_identity_t__defined -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__int_rep__exc__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exception_type_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__int_rep__exc__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__int_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exception_data_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__int_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__exc__integer_t) -#elif defined(__NDR_convert__int_rep__integer_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__int_rep__integer_t) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__exc__int32_t) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__int_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__int_rep__exc__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__int__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__int((int *)(a), f) -#elif defined(__NDR_convert__int_rep__exc__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__int_rep__int32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__int_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__thread_state_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__int_rep__exc__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t) -#elif defined(__NDR_convert__int_rep__natural_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t) -#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t) -#elif defined(__NDR_convert__int_rep__uint32_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined */ - -#ifndef __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined) -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined -#define __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(a, f) \ - __NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__char_rep__exc__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exception_type_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__char_rep__exc__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__char_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exception_data_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__char_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__exc__integer_t) -#elif defined(__NDR_convert__char_rep__integer_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__char_rep__integer_t) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__exc__int32_t) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__char_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__char_rep__exc__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__int__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__int((int *)(a), f) -#elif defined(__NDR_convert__char_rep__exc__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__char_rep__int32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__char_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__thread_state_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__char_rep__exc__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t) -#elif defined(__NDR_convert__char_rep__natural_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t) -#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t) -#elif defined(__NDR_convert__char_rep__uint32_t__defined) -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#if defined(__NDR_convert__float_rep__exc__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exception_type_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exception_type_t((exception_type_t *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#if defined(__NDR_convert__float_rep__exc__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__float_rep__exc__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exception_data_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__float_rep__exception_data_t((exception_data_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__exc__integer_t) -#elif defined(__NDR_convert__float_rep__integer_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((integer_t *)(a), f, c, __NDR_convert__float_rep__integer_t) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__exc__int32_t) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(a, f, c) \ - __NDR_convert__ARRAY((int32_t *)(a), f, c, __NDR_convert__float_rep__int32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#if defined(__NDR_convert__float_rep__exc__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__int__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__int((int *)(a), f) -#elif defined(__NDR_convert__float_rep__exc__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f) -#elif defined(__NDR_convert__float_rep__int32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(a, f) \ - __NDR_convert__float_rep__int32_t((int32_t *)(a), f) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined */ - -#ifndef __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__thread_state_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c) -#elif defined(__NDR_convert__float_rep__exc__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t) -#elif defined(__NDR_convert__float_rep__natural_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t) -#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t) -#elif defined(__NDR_convert__float_rep__uint32_t__defined) -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined -#define __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(a, f, c) \ - __NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t) -#endif /* defined(__NDR_convert__*__defined) */ -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined */ - - -mig_internal kern_return_t __MIG_check__Request__exception_raise_state_identity_t(__attribute__((__unused__)) __Request__exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__exception_raise_state_identity_t **In1PP) -{ - - typedef __Request__exception_raise_state_identity_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)) -) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined */ - msgh_size_delta = (4 * In0P->codeCnt); -#if __MigTypeCheck - if (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 584) + msgh_size_delta) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 8); - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined */ -#if __MigTypeCheck - if (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 584) + ((4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__codeCnt__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) { -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.int_rep, In0P->codeCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.int_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__int_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__int_rep...) */ - -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - 0 - if (In0P->NDR.char_rep != NDR_record.char_rep) { -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.char_rep, In0P->codeCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.char_rep); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.char_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__char_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__char_rep...) */ - -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined) || \ - 0 || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined) || \ - defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined) || \ - 0 - if (In0P->NDR.float_rep != NDR_record.float_rep) { -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception(&In0P->exception, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__exception__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code(&In0P->code, In0P->NDR.float_rep, In0P->codeCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__code__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor(&In1P->flavor, In0P->NDR.float_rep); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__flavor__defined */ -#if defined(__NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined) - __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state(&In1P->old_state, In0P->NDR.float_rep, In1P->old_stateCnt); -#endif /* __NDR_convert__float_rep__Request__exception_raise_state_identity_t__old_state__defined */ - } -#endif /* defined(__NDR_convert__float_rep...) */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__exception_raise_state_identity_t__defined) */ -#endif /* __MIG_check__Request__exc_subsystem__ */ -#endif /* ( __MigTypeCheck || __NDR_convert__ ) */ - - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t breakpad_exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -mig_internal novalue _Xexception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - mach_msg_trailer_t trailer; - } Request; -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__exception_raise_state_identity_t __Request; - typedef __Reply__exception_raise_state_identity_t Reply; - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__exception_raise_state_identity_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__exception_raise_state_identity_t__defined */ - - __DeclareRcvRpc(2403, "exception_raise_state_identity") - __BeforeRcvRpc(2403, "exception_raise_state_identity") - -#if defined(__MIG_check__Request__exception_raise_state_identity_t__defined) - check_result = __MIG_check__Request__exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__exception_raise_state_identity_t__defined) */ - - OutP->new_stateCnt = 144; - - OutP->RetCode = breakpad_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 576) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2403, "exception_raise_state_identity") -} - - -extern boolean_t exc_server( - mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -extern mig_routine_t exc_server_routine( - mach_msg_header_t *InHeadP); - - -/* Description of this subsystem, for use in direct RPC */ -const struct breakpad_exc_subsystem { - mig_server_routine_t server; /* Server routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max msg size */ - vm_address_t reserved; /* Reserved */ - struct routine_descriptor /*Array of routine descriptors */ - routine[3]; -} breakpad_exc_subsystem = { - exc_server_routine, - 2401, - 2404, - (mach_msg_size_t)sizeof(union __ReplyUnion__breakpad_exc_subsystem), - (vm_address_t)0, - { - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_state_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xexception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__exception_raise_state_identity_t)}, - } -}; - -mig_external boolean_t exc_server - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - register mig_routine_t routine; - - OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - - if ((InHeadP->msgh_id > 2403) || (InHeadP->msgh_id < 2401) || - ((routine = breakpad_exc_subsystem.routine[InHeadP->msgh_id - 2401].stub_routine) == 0)) { - ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - (*routine) (InHeadP, OutHeadP); - return TRUE; -} - -mig_external mig_routine_t exc_server_routine - (mach_msg_header_t *InHeadP) -{ - register int msgh_id; - - msgh_id = InHeadP->msgh_id - 2401; - - if ((msgh_id > 2) || (msgh_id < 0)) - return 0; - - return breakpad_exc_subsystem.routine[msgh_id].stub_routine; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.h deleted file mode 100644 index c05f25a8..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_exc_server.h +++ /dev/null @@ -1,258 +0,0 @@ -#ifndef _exc_user_ -#define _exc_user_ - -/* Module exc */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef exc_MSG_COUNT -#define exc_MSG_COUNT 3 -#endif /* exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigUserHeader -__BeforeMigUserHeader -#endif /* __BeforeMigUserHeader */ - -#include -__BEGIN_DECLS - - -/* Routine exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -__END_DECLS - -/********************** Caution **************************/ -/* The following data types should be used to calculate */ -/* maximum message sizes only. The actual message may be */ -/* smaller, and the position of the arguments within the */ -/* message layout may vary from what is presented here. */ -/* For example, if any of the arguments are variable- */ -/* sized, and less than the maximum is sent, the data */ -/* will be packed tight in the actual message to reduce */ -/* the presence of holes. */ -/********************** Caution **************************/ - -/* typedefs for all requests */ - -#ifndef __Request__exc_subsystem__defined -#define __Request__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - } __Request__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[144]; - } __Request__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__exc_subsystem__defined */ - -/* union of all requests */ - -#ifndef __RequestUnion__exc_subsystem__defined -#define __RequestUnion__exc_subsystem__defined -union __RequestUnion__exc_subsystem { - __Request__exception_raise_t Request_exception_raise; - __Request__exception_raise_state_t Request_exception_raise_state; - __Request__exception_raise_state_identity_t Request_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__exc_subsystem__defined -#define __Reply__exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__exception_raise_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_t; -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[144]; - } __Reply__exception_raise_state_identity_t; -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__exc_subsystem__defined */ - -/* union of all replies */ - -#ifndef __ReplyUnion__exc_subsystem__defined -#define __ReplyUnion__exc_subsystem__defined -union __ReplyUnion__exc_subsystem { - __Reply__exception_raise_t Reply_exception_raise; - __Reply__exception_raise_state_t Reply_exception_raise_state; - __Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity; -}; -#endif /* !__RequestUnion__exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_exc -#define subsystem_to_name_map_exc \ - { "exception_raise", 2401 },\ - { "exception_raise_state", 2402 },\ - { "exception_raise_state_identity", 2403 } -#endif - -#ifdef __AfterMigUserHeader -__AfterMigUserHeader -#endif /* __AfterMigUserHeader */ - -#endif /* _exc_user_ */ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.cc deleted file mode 100644 index c220d88d..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.cc +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -/* nealsid: - * This file was copied from libc/gen/nlist.c from Darwin's source code - * The version of nlist used as a base is from 10.5.2, libc-498 - * http://www.opensource.apple.com/darwinsource/10.5.2/Libc-498/gen/nlist.c - * - * The full tarball is at: - * http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libc-498.tar.gz - * - * I've modified it to be compatible with 64-bit images. However, - * 32-bit compatibility has not been retained. -*/ - -#ifdef __LP64__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "breakpad_nlist_64.h" -#include -#include -#include - -/* Stuff lifted from and since they are gone */ -/* - * Header prepended to each a.out file. - */ -struct exec { - unsigned short a_machtype; /* machine type */ - unsigned short a_magic; /* magic number */ - unsigned long a_text; /* size of text segment */ - unsigned long a_data; /* size of initialized data */ - unsigned long a_bss; /* size of uninitialized data */ - unsigned long a_syms; /* size of symbol table */ - unsigned long a_entry; /* entry point */ - unsigned long a_trsize; /* size of text relocation */ - unsigned long a_drsize; /* size of data relocation */ -}; - -#define OMAGIC 0407 /* old impure format */ -#define NMAGIC 0410 /* read-only text */ -#define ZMAGIC 0413 /* demand load format */ - -#define N_BADMAG(x) \ - (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) -#define N_TXTOFF(x) \ - ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec)) -#define N_SYMOFF(x) \ - (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize) - -int -__breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames); - -/* - * nlist - retreive attributes from name list (string table version) - */ - -int -breakpad_nlist_64(const char *name, - breakpad_nlist *list, - const char **symbolNames) { - int fd, n; - - fd = open(name, O_RDONLY, 0); - if (fd < 0) - return (-1); - n = __breakpad_fdnlist_64(fd, list, symbolNames); - (void)close(fd); - return (n); -} - -/* Note: __fdnlist() is called from kvm_nlist in libkvm's kvm.c */ - -int -__breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { - register breakpad_nlist *p, *q; - breakpad_nlist space[BUFSIZ/sizeof (breakpad_nlist)]; - - const register char *s1, *s2; - register int n, m; - int maxlen, nreq; - off_t sa; /* symbol address */ - off_t ss; /* start of strings */ - struct exec buf; - unsigned arch_offset = 0; - - maxlen = 500; - for (q = list, nreq = 0; - symbolNames[q-list] && symbolNames[q-list][0]; - q++, nreq++) { - - q->n_type = 0; - q->n_value = 0; - q->n_desc = 0; - q->n_sect = 0; - q->n_un.n_strx = 0; - } - - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) || - (N_BADMAG(buf) && *((long *)&buf) != MH_MAGIC && - NXSwapBigLongToHost(*((long *)&buf)) != FAT_MAGIC) && - /* nealsid: The following is the big-endian ppc64 check */ - (*((uint32_t*)&buf)) != FAT_MAGIC) { - return (-1); - } - - /* Deal with fat file if necessary */ - if (NXSwapBigLongToHost(*((long *)&buf)) == FAT_MAGIC || - /* nealsid: The following is the big-endian ppc64 check */ - *((int*)&buf) == FAT_MAGIC) { - struct host_basic_info hbi; - struct fat_header fh; - struct fat_arch *fat_archs, *fap; - unsigned i; - host_t host; - - /* Get our host info */ - host = mach_host_self(); - i = HOST_BASIC_INFO_COUNT; - kern_return_t kr; - if ((kr=host_info(host, HOST_BASIC_INFO, - (host_info_t)(&hbi), &i)) != KERN_SUCCESS) { - return (-1); - } - mach_port_deallocate(mach_task_self(), host); - - /* Read in the fat header */ - lseek(fd, 0, SEEK_SET); - if (read(fd, (char *)&fh, sizeof(fh)) != sizeof(fh)) { - return (-1); - } - - /* Convert fat_narchs to host byte order */ - fh.nfat_arch = NXSwapBigLongToHost(fh.nfat_arch); - - /* Read in the fat archs */ - fat_archs = (struct fat_arch *)malloc(fh.nfat_arch * - sizeof(struct fat_arch)); - if (fat_archs == NULL) { - return (-1); - } - if (read(fd, (char *)fat_archs, - sizeof(struct fat_arch) * fh.nfat_arch) != - sizeof(struct fat_arch) * fh.nfat_arch) { - free(fat_archs); - return (-1); - } - - /* - * Convert archs to host byte ordering (a constraint of - * cpusubtype_getbestarch() - */ - for (i = 0; i < fh.nfat_arch; i++) { - fat_archs[i].cputype = - NXSwapBigLongToHost(fat_archs[i].cputype); - fat_archs[i].cpusubtype = - NXSwapBigLongToHost(fat_archs[i].cpusubtype); - fat_archs[i].offset = - NXSwapBigLongToHost(fat_archs[i].offset); - fat_archs[i].size = - NXSwapBigLongToHost(fat_archs[i].size); - fat_archs[i].align = - NXSwapBigLongToHost(fat_archs[i].align); - } - - fap = NULL; - for (i = 0; i < fh.nfat_arch; i++) { - /* nealsid: Although the original Apple code uses host_info */ - /* to retrieve the CPU type, the host_info will still return */ - /* CPU_TYPE_X86 even if running as an x86_64 binary. Given that */ - /* this code isn't necessary on i386, I've decided to hardcode */ - /* looking for a 64-bit binary */ -#if TARGET_CPU_X86_64 - if (fat_archs[i].cputype == CPU_TYPE_X86_64) { -#elif TARGET_CPU_PPC64 - if (fat_archs[i].cputype == CPU_TYPE_POWERPC64) { -#else -#error undefined cpu! - { -#endif - fap = &fat_archs[i]; - break; - } - } - - if (!fap) { - free(fat_archs); - return (-1); - } - arch_offset = fap->offset; - free(fat_archs); - - /* Read in the beginning of the architecture-specific file */ - lseek(fd, arch_offset, SEEK_SET); - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf)) { - return (-1); - } - } - - if (*((int *)&buf) == MH_MAGIC_64) { - struct mach_header_64 mh; - struct load_command *load_commands, *lcp; - struct symtab_command *stp; - long i; - - lseek(fd, arch_offset, SEEK_SET); - if (read(fd, (char *)&mh, sizeof(mh)) != sizeof(mh)) { - return (-1); - } - load_commands = (struct load_command *)malloc(mh.sizeofcmds); - if (load_commands == NULL) { - return (-1); - } - if (read(fd, (char *)load_commands, mh.sizeofcmds) != - mh.sizeofcmds) { - free(load_commands); - return (-1); - } - stp = NULL; - lcp = load_commands; - // nealsid:iterate through all load commands, looking for - // LC_SYMTAB load command - for (i = 0; i < mh.ncmds; i++) { - if (lcp->cmdsize % sizeof(long) != 0 || - lcp->cmdsize <= 0 || - (char *)lcp + lcp->cmdsize > - (char *)load_commands + mh.sizeofcmds) { - free(load_commands); - return (-1); - } - if (lcp->cmd == LC_SYMTAB) { - if (lcp->cmdsize != - sizeof(struct symtab_command)) { - free(load_commands); - return (-1); - } - stp = (struct symtab_command *)lcp; - break; - } - lcp = (struct load_command *) - ((char *)lcp + lcp->cmdsize); - } - if (stp == NULL) { - free(load_commands); - return (-1); - } - // sa points to the beginning of the symbol table - sa = stp->symoff + arch_offset; - // ss points to the beginning of the string table - ss = stp->stroff + arch_offset; - // n is the number of bytes in the symbol table - // each symbol table entry is an nlist structure - n = stp->nsyms * sizeof(breakpad_nlist); - free(load_commands); - } - else { - sa = N_SYMOFF(buf) + arch_offset; - ss = sa + buf.a_syms + arch_offset; - n = buf.a_syms; - } - - lseek(fd, sa, SEEK_SET); - - // the algorithm here is to read the nlist entries in m-sized - // chunks into q. q is then iterated over. for each entry in q, - // use the string table index(q->n_un.n_strx) to read the symbol - // name, then scan the nlist entries passed in by the user(via p), - // and look for a match - while (n) { - long savpos; - - m = sizeof (space); - if (n < m) - m = n; - if (read(fd, (char *)space, m) != m) - break; - n -= m; - savpos = lseek(fd, 0, SEEK_CUR); - for (q = space; (m -= sizeof(breakpad_nlist)) >= 0; q++) { - char nambuf[BUFSIZ]; - - if (q->n_un.n_strx == 0 || q->n_type & N_STAB) - continue; - - // seek to the location in the binary where the symbol - // name is stored & read it into memory - lseek(fd, ss+q->n_un.n_strx, SEEK_SET); - read(fd, nambuf, maxlen+1); - s2 = nambuf; - for (p = list; - symbolNames[p-list] && - symbolNames[p-list][0]; - p++) { - // get the symbol name the user has passed in that - // corresponds to the nlist entry that we're looking at - s1 = symbolNames[p - list]; - while (*s1) { - if (*s1++ != *s2++) - goto cont; - } - if (*s2) - goto cont; - - p->n_value = q->n_value; - p->n_type = q->n_type; - p->n_desc = q->n_desc; - p->n_sect = q->n_sect; - p->n_un.n_strx = q->n_un.n_strx; - if (--nreq == 0) - return (nreq); - - break; - cont: ; - } - } - lseek(fd, savpos, SEEK_SET); - } - return (nreq); - } - -#endif /* __LP64__ */ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.h deleted file mode 100644 index ee10afb9..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/breakpad_nlist_64.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// breakpad_nlist.h -// -// This file is meant to provide a header for clients of the modified -// nlist function implemented to work on 64-bit. - -#ifndef CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ - -typedef struct nlist_64 breakpad_nlist; - -int -breakpad_nlist_64(const char *name, - breakpad_nlist *list, - const char **symbolNames); - -#endif /* CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.cc deleted file mode 100644 index a2d62700..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.cc +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -extern "C" { // needed to compile on Leopard - #include - #include - #include - #include -} - -#include "breakpad_nlist_64.h" -#include -#include -#include -#include "client/mac/handler/dynamic_images.h" - -namespace google_breakpad { - -//============================================================================== -// Returns the size of the memory region containing |address| and the -// number of bytes from |address| to the end of the region. -// We potentially, will extend the size of the original -// region by the size of the following region if it's contiguous with the -// first in order to handle cases when we're reading strings and they -// straddle two vm regions. -// -static mach_vm_size_t GetMemoryRegionSize(task_port_t target_task, - const void* address, - mach_vm_size_t *size_to_end) { - mach_vm_address_t region_base = (mach_vm_address_t)address; - mach_vm_size_t region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - // Get information about the vm region containing |address| - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - kern_return_t result = - mach_vm_region_recurse(target_task, - ®ion_base, - ®ion_size, - &nesting_level, - region_info, - &info_count); - - if (result == KERN_SUCCESS) { - // Get distance from |address| to the end of this region - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - - // If we want to handle strings as long as 4096 characters we may need - // to check if there's a vm region immediately following the first one. - // If so, we need to extend |*size_to_end| to go all the way to the end - // of the second region. - if (*size_to_end < 4096) { - // Second region starts where the first one ends - mach_vm_address_t region_base2 = - (mach_vm_address_t)(region_base + region_size); - mach_vm_size_t region_size2; - - // Get information about the following vm region - result = - mach_vm_region_recurse(target_task, - ®ion_base2, - ®ion_size2, - &nesting_level, - region_info, - &info_count); - - // Extend region_size to go all the way to the end of the 2nd region - if (result == KERN_SUCCESS - && region_base2 == region_base + region_size) { - region_size += region_size2; - } - } - - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - } else { - region_size = 0; - *size_to_end = 0; - } - - return region_size; -} - -#define kMaxStringLength 8192 -//============================================================================== -// Reads a NULL-terminated string from another task. -// -// Warning! This will not read any strings longer than kMaxStringLength-1 -// -static void* ReadTaskString(task_port_t target_task, - const void* address) { - // The problem is we don't know how much to read until we know how long - // the string is. And we don't know how long the string is, until we've read - // the memory! So, we'll try to read kMaxStringLength bytes - // (or as many bytes as we can until we reach the end of the vm region). - mach_vm_size_t size_to_end; - GetMemoryRegionSize(target_task, address, &size_to_end); - - if (size_to_end > 0) { - mach_vm_size_t size_to_read = - size_to_end > kMaxStringLength ? kMaxStringLength : size_to_end; - - kern_return_t kr; - return ReadTaskMemory(target_task, address, size_to_read, &kr); - } - - return NULL; -} - -//============================================================================== -// Reads an address range from another task. A block of memory is malloced -// and should be freed by the caller. -void* ReadTaskMemory(task_port_t target_task, - const void* address, - size_t length, - kern_return_t *kr) { - void* result = NULL; - int systemPageSize = getpagesize(); - - // use the negative of the page size for the mask to find the page address - mach_vm_address_t page_address = - reinterpret_cast(address) & (-systemPageSize); - - mach_vm_address_t last_page_address = - (reinterpret_cast(address) + length + - (systemPageSize - 1)) & (-systemPageSize); - - mach_vm_size_t page_size = last_page_address - page_address; - uint8_t* local_start; - uint32_t local_length; - - kern_return_t r; - - r = mach_vm_read(target_task, - page_address, - page_size, - reinterpret_cast(&local_start), - &local_length); - - - if (kr != NULL) { - *kr = r; - } - - if (r == KERN_SUCCESS) { - result = malloc(length); - if (result != NULL) { - memcpy(result, - &local_start[(mach_vm_address_t)address - page_address], - length); - } - mach_vm_deallocate(mach_task_self(), (uintptr_t)local_start, local_length); - } - - return result; -} - -#pragma mark - - -//============================================================================== -// Initializes vmaddr_, vmsize_, and slide_ -void DynamicImage::CalculateMemoryAndVersionInfo() { - breakpad_mach_header *header = GetMachHeader(); - - // unless we can process the header, ensure that calls to - // IsValid() will return false - vmaddr_ = 0; - vmsize_ = 0; - slide_ = 0; - version_ = 0; - - bool foundTextSection = false; - bool foundDylibIDCommand = false; - -#if __LP64__ - if(header->magic != MH_MAGIC_64) { - return; - } -#else - if(header->magic != MH_MAGIC) { - return; - } -#endif - - uint32_t versionSize = 0; -#ifdef __LP64__ - const uint32_t segmentLoadCommand = LC_SEGMENT_64; - char* sectVersion = getsectdatafromheader_64(header, SEG_DATA, "__version", &versionSize); -#else - const uint32_t segmentLoadCommand = LC_SEGMENT; - char* sectVersion = getsectdatafromheader(header, SEG_DATA, "__version", &versionSize); -#endif - - if (versionSize == 4) { - version_ = NXSwapHostLongToBig(*(unsigned long*)sectVersion); - } - - const struct load_command *cmd = - reinterpret_cast(header + 1); - - for (unsigned int i = 0; cmd && (i < header->ncmds); ++i) { - if (!foundTextSection) { - if (cmd->cmd == segmentLoadCommand) { - const breakpad_mach_segment_command *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - vmaddr_ = seg->vmaddr; - vmsize_ = seg->vmsize; - slide_ = 0; - - if (seg->fileoff == 0 && seg->filesize != 0) { - slide_ = (uintptr_t)GetLoadAddress() - (uintptr_t)seg->vmaddr; - } - foundTextSection = true; - } - } - } - - if (!foundDylibIDCommand) { - if (cmd->cmd == LC_ID_DYLIB) { - const struct dylib_command *dc = - reinterpret_cast(cmd); - - version_ = dc->dylib.current_version; - foundDylibIDCommand = true; - } - } - - if (foundDylibIDCommand && foundTextSection) { - return; - } - - cmd = reinterpret_cast - (reinterpret_cast(cmd) + cmd->cmdsize); - } - -} - -void DynamicImage::Print() { - const char *path = GetFilePath(); - if (!path) { - path = "(unknown)"; - } - printf("%p: %s\n", GetLoadAddress(), path); - breakpad_mach_header *header = GetMachHeader(); - MachHeader(*header).Print(); - printf("vmaddr\t\t: %p\n", reinterpret_cast(GetVMAddr())); - printf("vmsize\t\t: %llu\n", GetVMSize()); - printf("slide\t\t: %td\n", GetVMAddrSlide()); -} - -#pragma mark - - -//============================================================================== -// Loads information about dynamically loaded code in the given task. -DynamicImages::DynamicImages(mach_port_t task) - : task_(task) { - ReadImageInfoForTask(); -} - -void* DynamicImages::GetDyldAllImageInfosPointer() -{ - - const char *imageSymbolName = "_dyld_all_image_infos"; - const char *dyldPath = "/usr/lib/dyld"; -#ifndef __LP64__ - struct nlist l[8]; - memset(l, 0, sizeof(l) ); - - // First we lookup the address of the "_dyld_all_image_infos" struct - // which lives in "dyld". This structure contains information about all - // of the loaded dynamic images. - struct nlist &list = l[0]; - list.n_un.n_name = const_cast(imageSymbolName); - nlist(dyldPath,&list); - if(list.n_value) { - return reinterpret_cast(list.n_value); - } - - return NULL; -#else - struct nlist_64 l[8]; - struct nlist_64 &list = l[0]; - - memset(l, 0, sizeof(l) ); - - const char *symbolNames[2] = { imageSymbolName, "\0" }; - - int invalidEntriesCount = breakpad_nlist_64(dyldPath,&list,symbolNames); - - if(invalidEntriesCount != 0) { - return NULL; - } - assert(list.n_value); - return reinterpret_cast(list.n_value); -#endif - -} -//============================================================================== -// This code was written using dyld_debug.c (from Darwin) as a guide. -void DynamicImages::ReadImageInfoForTask() { - void *imageList = GetDyldAllImageInfosPointer(); - - if (imageList) { - kern_return_t kr; - // Read the structure inside of dyld that contains information about - // loaded images. We're reading from the desired task's address space. - - // Here we make the assumption that dyld loaded at the same address in - // the crashed process vs. this one. This is an assumption made in - // "dyld_debug.c" and is said to be nearly always valid. - dyld_all_image_infos *dyldInfo = reinterpret_cast - (ReadTaskMemory(task_, - reinterpret_cast(imageList), - sizeof(dyld_all_image_infos), &kr)); - - if (dyldInfo) { - // number of loaded images - int count = dyldInfo->infoArrayCount; - - // Read an array of dyld_image_info structures each containing - // information about a loaded image. - dyld_image_info *infoArray = reinterpret_cast - (ReadTaskMemory(task_, - dyldInfo->infoArray, - count*sizeof(dyld_image_info), &kr)); - - image_list_.reserve(count); - - for (int i = 0; i < count; ++i) { - dyld_image_info &info = infoArray[i]; - - // First read just the mach_header from the image in the task. - breakpad_mach_header *header = reinterpret_cast - (ReadTaskMemory(task_, - info.load_address_, - sizeof(breakpad_mach_header), &kr)); - - if (!header) - break; // bail on this dynamic image - - // Now determine the total amount we really want to read based on the - // size of the load commands. We need the header plus all of the - // load commands. - unsigned int header_size = - sizeof(breakpad_mach_header) + header->sizeofcmds; - - free(header); - - header = reinterpret_cast - (ReadTaskMemory(task_, info.load_address_, header_size, &kr)); - - // Read the file name from the task's memory space. - char *file_path = NULL; - if (info.file_path_) { - // Although we're reading kMaxStringLength bytes, it's copied in the - // the DynamicImage constructor below with the correct string length, - // so it's not really wasting memory. - file_path = reinterpret_cast - (ReadTaskString(task_, info.file_path_)); - } - - // Create an object representing this image and add it to our list. - DynamicImage *new_image; - new_image = new DynamicImage(header, - header_size, - (breakpad_mach_header*)info.load_address_, - file_path, - info.file_mod_date_, - task_); - - if (new_image->IsValid()) { - image_list_.push_back(DynamicImageRef(new_image)); - } else { - delete new_image; - } - - if (file_path) { - free(file_path); - } - } - - free(dyldInfo); - free(infoArray); - - // sorts based on loading address - sort(image_list_.begin(), image_list_.end() ); - // remove duplicates - this happens in certain strange cases - // You can see it in DashboardClient when Google Gadgets plugin - // is installed. Apple's crash reporter log and gdb "info shared" - // both show the same library multiple times at the same address - - vector::iterator it = unique(image_list_.begin(), - image_list_.end() ); - image_list_.erase(it, image_list_.end()); - } - } -} - -//============================================================================== -DynamicImage *DynamicImages::GetExecutableImage() { - int executable_index = GetExecutableImageIndex(); - - if (executable_index >= 0) { - return GetImage(executable_index); - } - - return NULL; -} - -//============================================================================== -// returns -1 if failure to find executable -int DynamicImages::GetExecutableImageIndex() { - int image_count = GetImageCount(); - - for (int i = 0; i < image_count; ++i) { - DynamicImage *image = GetImage(i); - if (image->GetMachHeader()->filetype == MH_EXECUTE) { - return i; - } - } - - return -1; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.h deleted file mode 100644 index 85ba8cf9..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/dynamic_images.h +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dynamic_images.h -// -// Implements most of the function of the dyld API, but allowing an -// arbitrary task to be introspected, unlike the dyld API which -// only allows operation on the current task. The current implementation -// is limited to use by 32-bit tasks. - -#ifndef CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ -#define CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ - -#include -#include -#include -#include -#include - -namespace google_breakpad { - -using std::vector; - -//============================================================================== -// The memory layout of this struct matches the dyld_image_info struct -// defined in "dyld_gdb.h" in the darwin source. -typedef struct dyld_image_info { - struct mach_header *load_address_; - char *file_path_; - uintptr_t file_mod_date_; -} dyld_image_info; - -//============================================================================== -// This is as defined in "dyld_gdb.h" in the darwin source. -// _dyld_all_image_infos (in dyld) is a structure of this type -// which will be used to determine which dynamic code has been loaded. -typedef struct dyld_all_image_infos { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - const struct dyld_image_info *infoArray; - void* notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos; - -// some typedefs to isolate 64/32 bit differences -#ifdef __LP64__ -typedef mach_header_64 breakpad_mach_header; -typedef segment_command_64 breakpad_mach_segment_command; -#else -typedef mach_header breakpad_mach_header; -typedef segment_command breakpad_mach_segment_command; -#endif - -//============================================================================== -// A simple wrapper for a mach_header -// -// This could be fleshed out with some more interesting methods. -class MachHeader { - public: - explicit MachHeader(const breakpad_mach_header &header) : header_(header) {} - - void Print() { - printf("magic\t\t: %4x\n", header_.magic); - printf("cputype\t\t: %d\n", header_.cputype); - printf("cpusubtype\t: %d\n", header_.cpusubtype); - printf("filetype\t: %d\n", header_.filetype); - printf("ncmds\t\t: %d\n", header_.ncmds); - printf("sizeofcmds\t: %d\n", header_.sizeofcmds); - printf("flags\t\t: %d\n", header_.flags); - } - - breakpad_mach_header header_; -}; - -//============================================================================== -// Represents a single dynamically loaded mach-o image -class DynamicImage { - public: - DynamicImage(breakpad_mach_header *header, // we take ownership - int header_size, // includes load commands - breakpad_mach_header *load_address, - char *inFilePath, - uintptr_t image_mod_date, - mach_port_t task) - : header_(header), - header_size_(header_size), - load_address_(load_address), - file_mod_date_(image_mod_date), - task_(task) { - InitializeFilePath(inFilePath); - CalculateMemoryAndVersionInfo(); - } - - ~DynamicImage() { - if (file_path_) { - free(file_path_); - } - free(header_); - } - - // Returns pointer to a local copy of the mach_header plus load commands - breakpad_mach_header *GetMachHeader() {return header_;} - - // Size of mach_header plus load commands - int GetHeaderSize() const {return header_size_;} - - // Full path to mach-o binary - char *GetFilePath() {return file_path_;} - - uintptr_t GetModDate() const {return file_mod_date_;} - - // Actual address where the image was loaded - breakpad_mach_header *GetLoadAddress() const {return load_address_;} - - // Address where the image should be loaded - mach_vm_address_t GetVMAddr() const {return vmaddr_;} - - // Difference between GetLoadAddress() and GetVMAddr() - ptrdiff_t GetVMAddrSlide() const {return slide_;} - - // Size of the image - mach_vm_size_t GetVMSize() const {return vmsize_;} - - // Task owning this loaded image - mach_port_t GetTask() {return task_;} - - uint32_t GetVersion() {return version_;} - // For sorting - bool operator<(const DynamicImage &inInfo) { - return GetLoadAddress() < inInfo.GetLoadAddress(); - } - - // Debugging - void Print(); - - private: - friend class DynamicImages; - - // Sanity checking - bool IsValid() {return GetVMSize() != 0;} - - // Makes local copy of file path to mach-o binary - void InitializeFilePath(char *inFilePath) { - if (inFilePath) { - size_t path_size = 1 + strlen(inFilePath); - file_path_ = reinterpret_cast(malloc(path_size)); - strlcpy(file_path_, inFilePath, path_size); - } else { - file_path_ = NULL; - } - } - - // Initializes vmaddr_, vmsize_, and slide_ - void CalculateMemoryAndVersionInfo(); - - breakpad_mach_header *header_; // our local copy of the header - int header_size_; // mach_header plus load commands - breakpad_mach_header *load_address_; // base address image is mapped into - mach_vm_address_t vmaddr_; - mach_vm_size_t vmsize_; - ptrdiff_t slide_; - uint32_t version_; // Dylib version - char *file_path_; // path dyld used to load the image - uintptr_t file_mod_date_; // time_t of image file - - mach_port_t task_; -}; - -//============================================================================== -// DynamicImageRef is just a simple wrapper for a pointer to -// DynamicImage. The reason we use it instead of a simple typedef is so -// that we can use stl::sort() on a vector of DynamicImageRefs -// and simple class pointers can't implement operator<(). -// -class DynamicImageRef { - public: - explicit DynamicImageRef(DynamicImage *inP) : p(inP) {} - // The copy constructor is required by STL - DynamicImageRef(const DynamicImageRef &inRef) : p(inRef.p) {} - - bool operator<(const DynamicImageRef &inRef) const { - return (*const_cast(this)->p) - < (*const_cast(inRef).p); - } - - bool operator==(const DynamicImageRef &inInfo) const { - return (*const_cast(this)->p).GetLoadAddress() == - (*const_cast(inInfo)).GetLoadAddress(); - } - - // Be just like DynamicImage* - DynamicImage *operator->() {return p;} - operator DynamicImage*() {return p;} - - private: - DynamicImage *p; -}; - -//============================================================================== -// An object of type DynamicImages may be created to allow introspection of -// an arbitrary task's dynamically loaded mach-o binaries. This makes the -// assumption that the current task has send rights to the target task. -class DynamicImages { - public: - explicit DynamicImages(mach_port_t task); - - ~DynamicImages() { - for (int i = 0; i < (int)image_list_.size(); ++i) { - delete image_list_[i]; - } - } - - // Returns the number of dynamically loaded mach-o images. - int GetImageCount() const {return image_list_.size();} - - // Returns an individual image. - DynamicImage *GetImage(int i) { - if (i < (int)image_list_.size()) { - return image_list_[i]; - } - return NULL; - } - - // Returns the image corresponding to the main executable. - DynamicImage *GetExecutableImage(); - int GetExecutableImageIndex(); - - // Returns the task which we're looking at. - mach_port_t GetTask() const {return task_;} - - // Debugging - void Print() { - for (int i = 0; i < (int)image_list_.size(); ++i) { - image_list_[i]->Print(); - } - } - - void TestPrint() { - const breakpad_mach_header *header; - for (int i = 0; i < (int)image_list_.size(); ++i) { - printf("dyld: %p: name = %s\n", _dyld_get_image_header(i), - _dyld_get_image_name(i) ); - - const void *imageHeader = _dyld_get_image_header(i); - header = reinterpret_cast(imageHeader); - - MachHeader(*header).Print(); - } - } - - private: - bool IsOurTask() {return task_ == mach_task_self();} - - // Initialization - void ReadImageInfoForTask(); - void* GetDyldAllImageInfosPointer(); - - mach_port_t task_; - vector image_list_; -}; - -// Returns a malloced block containing the contents of memory at a particular -// location in another task. -void* ReadTaskMemory(task_port_t target_task, - const void* address, - size_t len, - kern_return_t *kr); - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.cc deleted file mode 100644 index 60fde473..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.cc +++ /dev/null @@ -1,722 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "client/mac/handler/exception_handler.h" -#include "client/mac/handler/minidump_generator.h" -#include "common/mac/macho_utilities.h" - -#ifndef USE_PROTECTED_ALLOCATIONS -#define USE_PROTECTED_ALLOCATIONS 0 -#endif - -// If USE_PROTECTED_ALLOCATIONS is activated then the -// gBreakpadAllocator needs to be setup in other code -// ahead of time. Please see ProtectedMemoryAllocator.h -// for more details. -#if USE_PROTECTED_ALLOCATIONS - #include "protected_memory_allocator.h" - extern ProtectedMemoryAllocator *gBreakpadAllocator; -#endif - - -namespace google_breakpad { - -using std::map; - -// These structures and techniques are illustrated in -// Mac OS X Internals, Amit Singh, ch 9.7 -struct ExceptionMessage { - mach_msg_header_t header; - mach_msg_body_t body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - NDR_record_t ndr; - exception_type_t exception; - mach_msg_type_number_t code_count; - integer_t code[EXCEPTION_CODE_MAX]; - char padding[512]; -}; - -struct ExceptionParameters { - ExceptionParameters() : count(0) {} - mach_msg_type_number_t count; - exception_mask_t masks[EXC_TYPES_COUNT]; - mach_port_t ports[EXC_TYPES_COUNT]; - exception_behavior_t behaviors[EXC_TYPES_COUNT]; - thread_state_flavor_t flavors[EXC_TYPES_COUNT]; -}; - -struct ExceptionReplyMessage { - mach_msg_header_t header; - NDR_record_t ndr; - kern_return_t return_code; -}; - -// Only catch these three exceptions. The other ones are nebulously defined -// and may result in treating a non-fatal exception as fatal. -exception_mask_t s_exception_mask = EXC_MASK_BAD_ACCESS | -EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | EXC_MASK_BREAKPOINT; - -extern "C" -{ - // Forward declarations for functions that need "C" style compilation - boolean_t exc_server(mach_msg_header_t *request, - mach_msg_header_t *reply); - - kern_return_t catch_exception_raise(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); - - kern_return_t ForwardException(mach_port_t task, - mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); - - kern_return_t exception_raise(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t exception_code_count); - - kern_return_t - exception_raise_state(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t code_count, - thread_state_flavor_t *target_flavor, - thread_state_t thread_state, - mach_msg_type_number_t thread_state_count, - thread_state_t thread_state, - mach_msg_type_number_t *thread_state_count); - - kern_return_t - exception_raise_state_identity(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t exception_code, - mach_msg_type_number_t exception_code_count, - thread_state_flavor_t *target_flavor, - thread_state_t thread_state, - mach_msg_type_number_t thread_state_count, - thread_state_t thread_state, - mach_msg_type_number_t *thread_state_count); - - kern_return_t breakpad_exception_raise_state(mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ); - - kern_return_t breakpad_exception_raise_state_identity(mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ); - - kern_return_t breakpad_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); -} - - - -kern_return_t breakpad_exception_raise_state(mach_port_t exception_port, - exception_type_t exception, - const exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ) -{ - return KERN_SUCCESS; -} - -kern_return_t breakpad_exception_raise_state_identity(mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt - ) -{ - return KERN_SUCCESS; -} - -kern_return_t breakpad_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - - if (task != mach_task_self()) { - return KERN_FAILURE; - } - return ForwardException(task, failed_thread, exception, code, code_count); -} - - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler) - : dump_path_(), - filter_(filter), - callback_(callback), - callback_context_(callback_context), - directCallback_(NULL), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - // This will update to the ID and C-string pointers - set_dump_path(dump_path); - MinidumpGenerator::GatherSystemInformation(); - Setup(install_handler); -} - -// special constructor if we want to bypass minidump writing and -// simply get a callback with the exception information -ExceptionHandler::ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler) - : dump_path_(), - filter_(NULL), - callback_(NULL), - callback_context_(callback_context), - directCallback_(callback), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - MinidumpGenerator::GatherSystemInformation(); - Setup(install_handler); -} - -ExceptionHandler::~ExceptionHandler() { - Teardown(); -} - -bool ExceptionHandler::WriteMinidump() { - // If we're currently writing, just return - if (use_minidump_write_mutex_) - return false; - - use_minidump_write_mutex_ = true; - last_minidump_write_result_ = false; - - // Lock the mutex. Since we just created it, this will return immediately. - if (pthread_mutex_lock(&minidump_write_mutex_) == 0) { - // Send an empty message to the handle port so that a minidump will - // be written - SendEmptyMachMessage(); - - // Wait for the minidump writer to complete its writing. It will unlock - // the mutex when completed - pthread_mutex_lock(&minidump_write_mutex_); - } - - use_minidump_write_mutex_ = false; - UpdateNextID(); - return last_minidump_write_result_; -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, false); - return handler.WriteMinidump(); -} - -bool ExceptionHandler::WriteMinidumpWithException(int exception_type, - int exception_code, - mach_port_t thread_name) { - bool result = false; - - if (directCallback_) { - if (directCallback_(callback_context_, - exception_type, - exception_code, - thread_name) ) { - if (exception_type && exception_code) - _exit(exception_type); - } - } else { - string minidump_id; - - // Putting the MinidumpGenerator in its own context will ensure that the - // destructor is executed, closing the newly created minidump file. - if (!dump_path_.empty()) { - MinidumpGenerator md; - if (exception_type && exception_code) { - // If this is a real exception, give the filter (if any) a chance to - // decided if this should be sent - if (filter_ && !filter_(callback_context_)) - return false; - - md.SetExceptionInformation(exception_type, exception_code, thread_name); - } - - result = md.Write(next_minidump_path_c_); - } - - // Call user specified callback (if any) - if (callback_) { - // If the user callback returned true and we're handling an exception - // (rather than just writing out the file), then we should exit without - // forwarding the exception to the next handler. - if (callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - result)) { - if (exception_type && exception_code) - _exit(exception_type); - } - } - } - - return result; -} - -kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - // At this time, we should have called Uninstall() on the exception handler - // so that the current exception ports are the ones that we should be - // forwarding to. - ExceptionParameters current; - - current.count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - kern_return_t result = task_get_exception_ports(current_task, - s_exception_mask, - current.masks, - ¤t.count, - current.ports, - current.behaviors, - current.flavors); - - // Find the first exception handler that matches the exception - unsigned int found; - for (found = 0; found < current.count; ++found) { - if (current.masks[found] & (1 << exception)) { - break; - } - } - - // Nothing to forward - if (found == current.count) { - fprintf(stderr, "** No previous ports for forwarding!! \n"); - exit(KERN_FAILURE); - } - - mach_port_t target_port = current.ports[found]; - exception_behavior_t target_behavior = current.behaviors[found]; - thread_state_flavor_t target_flavor = current.flavors[found]; - - mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX; - breakpad_thread_state_data_t thread_state; - switch (target_behavior) { - case EXCEPTION_DEFAULT: - result = exception_raise(target_port, failed_thread, task, exception, - code, code_count); - break; - - case EXCEPTION_STATE: - result = thread_get_state(failed_thread, target_flavor, thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = exception_raise_state(target_port, failed_thread, task, - exception, code, - code_count, &target_flavor, - thread_state, thread_state_count, - thread_state, &thread_state_count); - if (result == KERN_SUCCESS) - result = thread_set_state(failed_thread, target_flavor, thread_state, - thread_state_count); - break; - - case EXCEPTION_STATE_IDENTITY: - result = thread_get_state(failed_thread, target_flavor, thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = exception_raise_state_identity(target_port, failed_thread, - task, exception, code, - code_count, &target_flavor, - thread_state, - thread_state_count, - thread_state, - &thread_state_count); - if (result == KERN_SUCCESS) - result = thread_set_state(failed_thread, target_flavor, thread_state, - thread_state_count); - break; - - default: - fprintf(stderr, "** Unknown exception behavior\n"); - result = KERN_FAILURE; - break; - } - - return result; -} - -// Callback from exc_server() -kern_return_t catch_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - return ForwardException(task, failed_thread, exception, code, code_count); -} - -// static -void *ExceptionHandler::WaitForMessage(void *exception_handler_class) { - ExceptionHandler *self = - reinterpret_cast(exception_handler_class); - ExceptionMessage receive; - - // Wait for the exception info - while (1) { - receive.header.msgh_local_port = self->handler_port_; - receive.header.msgh_size = sizeof(receive); - kern_return_t result = mach_msg(&(receive.header), - MACH_RCV_MSG | MACH_RCV_LARGE, 0, - sizeof(receive), self->handler_port_, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - - if (result == KERN_SUCCESS) { - // Uninstall our handler so that we don't get in a loop if the process of - // writing out a minidump causes an exception. However, if the exception - // was caused by a fork'd process, don't uninstall things - - // If the actual exception code is zero, then we're calling this handler - // in a way that indicates that we want to either exit this thread or - // generate a minidump - // - // While reporting, all threads (except this one) must be suspended - // to avoid misleading stacks. If appropriate they will be resumed - // afterwards. - if (!receive.exception) { - if (self->is_in_teardown_) - return NULL; - - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - // Write out the dump and save the result for later retrieval - self->last_minidump_write_result_ = - self->WriteMinidumpWithException(0, 0, 0); - - self->UninstallHandler(false); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - - self->ResumeThreads(); - - if (self->use_minidump_write_mutex_) - pthread_mutex_unlock(&self->minidump_write_mutex_); - } else { - - // When forking a child process with the exception handler installed, - // if the child crashes, it will send the exception back to the parent - // process. The check for task == self_task() ensures that only - // exceptions that occur in the parent process are caught and - // processed. If the exception was not caused by this task, we - // still need to call into the exception server and have it return - // KERN_FAILURE (see breakpad_exception_raise) in order for the kernel - // to move onto the host exception handler for the child task - if (receive.task.name == mach_task_self()) { - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - // Generate the minidump with the exception data. - self->WriteMinidumpWithException(receive.exception, receive.code[0], - receive.thread.name); - - self->UninstallHandler(true); - -#if USE_PROTECTED_ALLOCATIONS - if(gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - } - // Pass along the exception to the server, which will setup the - // message and call breakpad_exception_raise() and put the return - // code into the reply. - ExceptionReplyMessage reply; - if (!exc_server(&receive.header, &reply.header)) - exit(1); - - // Send a reply and exit - result = mach_msg(&(reply.header), MACH_SEND_MSG, - reply.header.msgh_size, 0, MACH_PORT_NULL, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - } - } - } - - return NULL; -} - -bool ExceptionHandler::InstallHandler() { - try { -#if USE_PROTECTED_ALLOCATIONS - previous_ = new (gBreakpadAllocator->Allocate(sizeof(ExceptionParameters)) ) - ExceptionParameters(); -#else - previous_ = new ExceptionParameters(); -#endif - - } - catch (std::bad_alloc) { - return false; - } - - // Save the current exception ports so that we can forward to them - previous_->count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - kern_return_t result = task_get_exception_ports(current_task, - s_exception_mask, - previous_->masks, - &previous_->count, - previous_->ports, - previous_->behaviors, - previous_->flavors); - - // Setup the exception ports on this task - if (result == KERN_SUCCESS) - result = task_set_exception_ports(current_task, s_exception_mask, - handler_port_, EXCEPTION_DEFAULT, - THREAD_STATE_NONE); - - installed_exception_handler_ = (result == KERN_SUCCESS); - - return installed_exception_handler_; -} - -bool ExceptionHandler::UninstallHandler(bool in_exception) { - kern_return_t result = KERN_SUCCESS; - - if (installed_exception_handler_) { - mach_port_t current_task = mach_task_self(); - - // Restore the previous ports - for (unsigned int i = 0; i < previous_->count; ++i) { - result = task_set_exception_ports(current_task, previous_->masks[i], - previous_->ports[i], - previous_->behaviors[i], - previous_->flavors[i]); - if (result != KERN_SUCCESS) - return false; - } - - // this delete should NOT happen if an exception just occurred! - if (!in_exception) { -#if USE_PROTECTED_ALLOCATIONS - previous_->~ExceptionParameters(); -#else - delete previous_; -#endif - } - - previous_ = NULL; - installed_exception_handler_ = false; - } - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::Setup(bool install_handler) { - if (pthread_mutex_init(&minidump_write_mutex_, NULL)) - return false; - - // Create a receive right - mach_port_t current_task = mach_task_self(); - kern_return_t result = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &handler_port_); - // Add send right - if (result == KERN_SUCCESS) - result = mach_port_insert_right(current_task, handler_port_, handler_port_, - MACH_MSG_TYPE_MAKE_SEND); - - if (install_handler && result == KERN_SUCCESS) - if (!InstallHandler()) - return false; - - if (result == KERN_SUCCESS) { - // Install the handler in its own thread, detached as we won't be joining. - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - int thread_create_result = pthread_create(&handler_thread_, &attr, - &WaitForMessage, this); - pthread_attr_destroy(&attr); - result = thread_create_result ? KERN_FAILURE : KERN_SUCCESS; - } - - return result == KERN_SUCCESS ? true : false; -} - -bool ExceptionHandler::Teardown() { - kern_return_t result = KERN_SUCCESS; - is_in_teardown_ = true; - - if (!UninstallHandler(false)) - return false; - - // Send an empty message so that the handler_thread exits - if (SendEmptyMachMessage()) { - mach_port_t current_task = mach_task_self(); - result = mach_port_deallocate(current_task, handler_port_); - if (result != KERN_SUCCESS) - return false; - } else { - return false; - } - - handler_thread_ = NULL; - handler_port_ = NULL; - pthread_mutex_destroy(&minidump_write_mutex_); - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::SendEmptyMachMessage() { - ExceptionMessage empty; - memset(&empty, 0, sizeof(empty)); - empty.header.msgh_size = sizeof(empty) - sizeof(empty.padding); - empty.header.msgh_remote_port = handler_port_; - empty.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, - MACH_MSG_TYPE_MAKE_SEND_ONCE); - kern_return_t result = mach_msg(&(empty.header), - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - empty.header.msgh_size, 0, 0, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - return result == KERN_SUCCESS; -} - -void ExceptionHandler::UpdateNextID() { - next_minidump_path_ = - (MinidumpGenerator::UniqueNameInDirectory(dump_path_, &next_minidump_id_)); - - next_minidump_path_c_ = next_minidump_path_.c_str(); - next_minidump_id_c_ = next_minidump_id_.c_str(); -} - -bool ExceptionHandler::SuspendThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // suspend all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_suspend(threads_for_task[i])) - return false; - } - } - - return true; -} - -bool ExceptionHandler::ResumeThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // resume all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_resume(threads_for_task[i])) - return false; - } - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.h deleted file mode 100644 index 2a8ee1e4..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler.h +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exception_handler.h: MacOS exception handler -// This class can install a Mach exception port handler to trap most common -// programming errors. If an exception occurs, a minidump file will be -// generated which contains detailed information about the process and the -// exception. - -#ifndef CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ - -#include - -#include - -namespace google_breakpad { - -using std::string; - -struct ExceptionParameters; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // |minidump_id| is a unique id for the dump, so the minidump - // file is /.dmp. - // |context| is the value passed into the constructor. - // |succeeded| indicates whether a minidump file was successfully written. - // Return true if the exception was fully handled and breakpad should exit. - // Return false to allow any other exception handlers to process the - // exception. - typedef bool (*MinidumpCallback)(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded); - - // A callback function which will be called directly if an exception occurs. - // This bypasses the minidump file writing and simply gives the client - // the exception information. - typedef bool (*DirectCallback)( void *context, - int exception_type, - int exception_code, - mach_port_t thread_name); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Minidump files will be written to dump_path, and the optional callback - // is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, bool install_handler); - - // A special constructor if we want to bypass minidump writing and - // simply get a callback with the exception information. - ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler); - - ~ExceptionHandler(); - - // Get and set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, MinidumpCallback callback, - void *callback_context); - - private: - // Install the mach exception handler - bool InstallHandler(); - - // Uninstall the mach exception handler (if any) - bool UninstallHandler(bool in_exception); - - // Setup the handler thread, and if |install_handler| is true, install the - // mach exception port handler - bool Setup(bool install_handler); - - // Uninstall the mach exception handler (if any) and terminate the helper - // thread - bool Teardown(); - - // Send an "empty" mach message to the exception handler. Return true on - // success, false otherwise - bool SendEmptyMachMessage(); - - // All minidump writing goes through this one routine - bool WriteMinidumpWithException(int exception_type, int exception_code, - mach_port_t thread_name); - - // When installed, this static function will be call from a newly created - // pthread with |this| as the argument - static void *WaitForMessage(void *exception_handler_class); - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - // These functions will suspend/resume all threads except for the - // reporting thread - bool SuspendThreads(); - bool ResumeThreads(); - - // The destination directory for the minidump - string dump_path_; - - // The basename of the next minidump w/o extension - string next_minidump_id_; - - // The full path to the next minidump to be written, including extension - string next_minidump_path_; - - // Pointers to the UTF-8 versions of above - const char *dump_path_c_; - const char *next_minidump_id_c_; - const char *next_minidump_path_c_; - - // The callback function and pointer to be passed back after the minidump - // has been written - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The callback function to be passed back when we don't want a minidump - // file to be written - DirectCallback directCallback_; - - // The thread that is created for the handler - pthread_t handler_thread_; - - // The port that is waiting on an exception message to be sent, if the - // handler is installed - mach_port_t handler_port_; - - // These variables save the previous exception handler's data so that it - // can be re-installed when this handler is uninstalled - ExceptionParameters *previous_; - - // True, if we've installed the exception handler - bool installed_exception_handler_; - - // True, if we're in the process of uninstalling the exception handler and - // the thread. - bool is_in_teardown_; - - // Save the last result of the last minidump - bool last_minidump_write_result_; - - // A mutex for use when writing out a minidump that was requested on a - // thread other than the exception handler. - pthread_mutex_t minidump_write_mutex_; - - // True, if we're using the mutext to indicate when mindump writing occurs - bool use_minidump_write_mutex_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler_test.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler_test.cc deleted file mode 100644 index 59944377..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/exception_handler_test.cc +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -g++ -framework CoreFoundation -I../../.. \ - ../../minidump_file_writer.cc \ - ../../../common/convert_UTF.c \ - ../../../common/string_conversion.cc \ - ../../../common/mac/string_utilities.cc \ - exception_handler.cc \ - minidump_generator.cc \ - exception_handler_test.cc \ - -o exception_handler_test -*/ - -#include -#include -#include - -#include - -#include "exception_handler.h" -#include "minidump_generator.h" - -using std::string; -using google_breakpad::ExceptionHandler; - -static void *SleepyFunction(void *) { - while (1) { - sleep(10000); - } -} - -static void Crasher() { - int *a = NULL; - - fprintf(stdout, "Going to crash...\n"); - fprintf(stdout, "A = %d", *a); -} - -static void SoonToCrash() { - Crasher(); -} - -bool MDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { - string path(dump_dir); - string dest(dump_dir); - path.append(file_name); - path.append(".dmp"); - - fprintf(stdout, "Minidump: %s\n", path.c_str()); - // Indicate that we've handled the callback - return true; -} - -int main(int argc, char * const argv[]) { - char buffer[PATH_MAX]; - struct passwd *user = getpwuid(getuid()); - - // Home dir - snprintf(buffer, sizeof(buffer), "/Users/%s/Desktop/", user->pw_name); - - string path(buffer); - ExceptionHandler eh(path, NULL, MDCallback, NULL, true); - pthread_t t; - - if (pthread_create(&t, NULL, SleepyFunction, NULL) == 0) { - pthread_detach(t); - } else { - perror("pthread_create"); - } - - // Dump a test - eh.WriteMinidump(); - - // Test the handler - SoonToCrash(); - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.cc deleted file mode 100644 index e6ebce4f..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.cc +++ /dev/null @@ -1,989 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "client/mac/handler/minidump_generator.h" -#include "client/minidump_file_writer-inl.h" -#include "common/mac/file_id.h" -#include "common/mac/string_utilities.h" - -using MacStringUtils::ConvertToString; -using MacStringUtils::IntegerValueAtIndex; - -namespace google_breakpad { - -// constructor when generating from within the crashed process -MinidumpGenerator::MinidumpGenerator() - : exception_type_(0), - exception_code_(0), - exception_thread_(0), - crashing_task_(mach_task_self()), - handler_thread_(mach_thread_self()), - dynamic_images_(NULL) { - GatherSystemInformation(); -} - -// constructor when generating from a different process than the -// crashed process -MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, - mach_port_t handler_thread) - : exception_type_(0), - exception_code_(0), - exception_thread_(0), - crashing_task_(crashing_task), - handler_thread_(handler_thread) { - if (crashing_task != mach_task_self()) { - dynamic_images_ = new DynamicImages(crashing_task_); - } else { - dynamic_images_ = NULL; - } - - GatherSystemInformation(); -} - -MinidumpGenerator::~MinidumpGenerator() { - delete dynamic_images_; -} - -char MinidumpGenerator::build_string_[16]; -int MinidumpGenerator::os_major_version_ = 0; -int MinidumpGenerator::os_minor_version_ = 0; -int MinidumpGenerator::os_build_number_ = 0; - -// static -void MinidumpGenerator::GatherSystemInformation() { - // If this is non-zero, then we've already gathered the information - if (os_major_version_) - return; - - // This code extracts the version and build information from the OS - CFStringRef vers_path = - CFSTR("/System/Library/CoreServices/SystemVersion.plist"); - CFURLRef sys_vers = - CFURLCreateWithFileSystemPath(NULL, - vers_path, - kCFURLPOSIXPathStyle, - false); - CFDataRef data; - SInt32 error; - CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL, - &error); - - if (!data) - return; - - CFDictionaryRef list = static_cast - (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, - NULL)); - if (!list) - return; - - CFStringRef build_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); - CFStringRef product_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); - string build_str = ConvertToString(build_version); - string product_str = ConvertToString(product_version); - - CFRelease(list); - CFRelease(sys_vers); - CFRelease(data); - - strlcpy(build_string_, build_str.c_str(), sizeof(build_string_)); - - // Parse the string that looks like "10.4.8" - os_major_version_ = IntegerValueAtIndex(product_str, 0); - os_minor_version_ = IntegerValueAtIndex(product_str, 1); - os_build_number_ = IntegerValueAtIndex(product_str, 2); -} - -string MinidumpGenerator::UniqueNameInDirectory(const string &dir, - string *unique_name) { - CFUUIDRef uuid = CFUUIDCreate(NULL); - CFStringRef uuid_cfstr = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - string file_name(ConvertToString(uuid_cfstr)); - CFRelease(uuid_cfstr); - string path(dir); - - // Ensure that the directory (if non-empty) has a trailing slash so that - // we can append the file name and have a valid pathname. - if (!dir.empty()) { - if (dir.at(dir.size() - 1) != '/') - path.append(1, '/'); - } - - path.append(file_name); - path.append(".dmp"); - - if (unique_name) - *unique_name = file_name; - - return path; -} - -bool MinidumpGenerator::Write(const char *path) { - WriteStreamFN writers[] = { - &MinidumpGenerator::WriteThreadListStream, - &MinidumpGenerator::WriteSystemInfoStream, - &MinidumpGenerator::WriteModuleListStream, - &MinidumpGenerator::WriteMiscInfoStream, - &MinidumpGenerator::WriteBreakpadInfoStream, - // Exception stream needs to be the last entry in this array as it may - // be omitted in the case where the minidump is written without an - // exception. - &MinidumpGenerator::WriteExceptionStream, - }; - bool result = true; - - // If opening was successful, create the header, directory, and call each - // writer. The destructor for the TypedMDRVAs will cause the data to be - // flushed. The destructor for the MinidumpFileWriter will close the file. - if (writer_.Open(path)) { - TypedMDRVA header(&writer_); - TypedMDRVA dir(&writer_); - - if (!header.Allocate()) - return false; - - int writer_count = sizeof(writers) / sizeof(writers[0]); - - // If we don't have exception information, don't write out the - // exception stream - if (!exception_thread_ && !exception_type_) - --writer_count; - - // Add space for all writers - if (!dir.AllocateArray(writer_count)) - return false; - - MDRawHeader *header_ptr = header.get(); - header_ptr->signature = MD_HEADER_SIGNATURE; - header_ptr->version = MD_HEADER_VERSION; - time(reinterpret_cast(&(header_ptr->time_date_stamp))); - header_ptr->stream_count = writer_count; - header_ptr->stream_directory_rva = dir.position(); - - MDRawDirectory local_dir; - for (int i = 0; (result) && (i < writer_count); ++i) { - result = (this->*writers[i])(&local_dir); - - if (result) - dir.CopyIndex(i, &local_dir); - } - } - return result; -} - -size_t MinidumpGenerator::CalculateStackSize(mach_vm_address_t start_addr) { - mach_vm_address_t stack_region_base = start_addr; - mach_vm_size_t stack_region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - if (start_addr == 0) { - return 0; - } - - kern_return_t result = - mach_vm_region_recurse(crashing_task_, &stack_region_base, - &stack_region_size, &nesting_level, - region_info, - &info_count); - - if (start_addr < stack_region_base) { - // probably stack corruption, since mach_vm_region had to go - // higher in the process address space to find a valid region. - return 0; - } - - - if ((stack_region_base + stack_region_size) == TOP_OF_THREAD0_STACK) { - // The stack for thread 0 needs to extend all the way to - // 0xc0000000 on 32 bit and 00007fff5fc00000 on 64bit. HOWEVER, - // for many processes, the stack is first created in one page - // below this, and is then later extended to a much larger size by - // creating a new VM region immediately below the initial page. - - // You can see this for yourself by running vmmap on a "hello, - // world" program - - // Because of the above, we'll add 4k to include the original - // stack frame page. - // This method of finding the stack region needs to be done in - // a better way; the breakpad issue 247 is tracking this. - stack_region_size += 0x1000; - } - - return result == KERN_SUCCESS ? - stack_region_base + stack_region_size - start_addr : 0; -} - -bool MinidumpGenerator::WriteStackFromStartAddress( - mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location) { - UntypedMDRVA memory(&writer_); - - bool result = false; - size_t size = CalculateStackSize(start_addr); - - if (size == 0) { - // In some situations the stack address for the thread can come back 0. - // In these cases we skip over the threads in question and stuff the - // stack with a clearly borked value. - start_addr = 0xDEADBEEF; - size = 16; - if (!memory.Allocate(size)) - return false; - - unsigned long long dummy_stack[2]; // Fill dummy stack with 16 bytes of - // junk. - dummy_stack[0] = 0xDEADBEEF; - dummy_stack[1] = 0xDEADBEEF; - - result = memory.Copy(dummy_stack, size); - } else { - - if (!memory.Allocate(size)) - return false; - - if (dynamic_images_) { - - kern_return_t kr; - - void *stack_memory = ReadTaskMemory(crashing_task_, - (void*)start_addr, - size, - &kr); - - if (stack_memory == NULL) { - return false; - } - - result = memory.Copy(stack_memory, size); - free(stack_memory); - } else { - result = memory.Copy(reinterpret_cast(start_addr), size); - } - } - - stack_location->start_of_memory_range = start_addr; - stack_location->memory = memory.location(); - - return result; -} - -#if TARGET_CPU_PPC || TARGET_CPU_PPC64 -bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); -#if TARGET_CPU_PPC - mach_vm_address_t start_addr = machine_state->r1; -#else - mach_vm_address_t start_addr = machine_state->__r1; -#endif - return WriteStackFromStartAddress(start_addr, stack_location); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) { - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); - -#if TARGET_CPU_PPC - return machine_state->srr0; -#else - return machine_state->__srr0; -#endif -} - -bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MinidumpContext *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_PPC_BASE; - -#if TARGET_CPU_PPC64 -#define AddReg(a) context_ptr->a = machine_state->__ ## a -#define AddGPR(a) context_ptr->gpr[a] = machine_state->__r ## a -#else -#define AddReg(a) context_ptr->a = machine_state->a -#define AddGPR(a) context_ptr->gpr[a] = machine_state->r ## a -#endif - - AddReg(srr0); - AddReg(cr); - AddReg(xer); - AddReg(ctr); - AddReg(lr); - AddReg(vrsave); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); - AddGPR(29); - AddGPR(30); - AddGPR(31); - -#if TARGET_CPU_PPC - /* The mq register is only for PPC */ - AddReg(mq); -#endif - - - return true; -} - -#elif TARGET_CPU_X86 || TARGET_CPU_X86_64 - -bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); - -#if TARGET_CPU_X86_64 - mach_vm_address_t start_addr = machine_state->__rsp; -#else - mach_vm_address_t start_addr = machine_state->esp; -#endif - return WriteStackFromStartAddress(start_addr, stack_location); -} - -u_int64_t -MinidumpGenerator::CurrentPCForStack(breakpad_thread_state_data_t state) { - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); - -#if TARGET_CPU_X86_64 - return machine_state->__rip; -#else - return machine_state->eip; -#endif -} - -bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - breakpad_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MinidumpContext *context_ptr = context.get(); - -#if TARGET_CPU_X86 - context_ptr->context_flags = MD_CONTEXT_X86; - -#define AddReg(a) context_ptr->a = machine_state->a - AddReg(eax); - AddReg(ebx); - AddReg(ecx); - AddReg(edx); - AddReg(esi); - AddReg(edi); - AddReg(ebp); - AddReg(esp); - - AddReg(cs); - AddReg(ds); - AddReg(ss); - AddReg(es); - AddReg(fs); - AddReg(gs); - AddReg(eflags); - - AddReg(eip); -#else - -#define AddReg(a) context_ptr->a = machine_state->__ ## a - context_ptr->context_flags = MD_CONTEXT_AMD64; - AddReg(rax); - AddReg(rbx); - AddReg(rcx); - AddReg(rdx); - AddReg(rdi); - AddReg(rsi); - AddReg(rbp); - AddReg(rsp); - AddReg(r8); - AddReg(r9); - AddReg(r10); - AddReg(r11); - AddReg(r12); - AddReg(r13); - AddReg(r14); - AddReg(r15); - AddReg(rip); - // according to AMD's software developer guide, bits above 18 are - // not used in the flags register. Since the minidump format - // specifies 32 bits for the flags register, we can truncate safely - // with no loss. - context_ptr->eflags = machine_state->__rflags; - AddReg(cs); - AddReg(fs); - AddReg(gs); -#endif - - return true; -} -#endif - -bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id, - MDRawThread *thread) { - breakpad_thread_state_data_t state; - mach_msg_type_number_t state_count = sizeof(state); - - if (thread_get_state(thread_id, BREAKPAD_MACHINE_THREAD_STATE, - state, &state_count) == - KERN_SUCCESS) { - if (!WriteStack(state, &thread->stack)) - return false; - - if (!WriteContext(state, &thread->thread_context)) - return false; - - thread->thread_id = thread_id; - } else { - return false; - } - - return true; -} - -bool MinidumpGenerator::WriteThreadListStream( - MDRawDirectory *thread_list_stream) { - TypedMDRVA list(&writer_); - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - int non_generator_thread_count; - - if (task_threads(crashing_task_, &threads_for_task, &thread_count)) - return false; - - // Don't include the generator thread - non_generator_thread_count = thread_count - 1; - if (!list.AllocateObjectAndArray(non_generator_thread_count, - sizeof(MDRawThread))) - return false; - - thread_list_stream->stream_type = MD_THREAD_LIST_STREAM; - thread_list_stream->location = list.location(); - - list.get()->number_of_threads = non_generator_thread_count; - - MDRawThread thread; - int thread_idx = 0; - - for (unsigned int i = 0; i < thread_count; ++i) { - memset(&thread, 0, sizeof(MDRawThread)); - - if (threads_for_task[i] != handler_thread_) { - if (!WriteThreadStream(threads_for_task[i], &thread)) - return false; - - list.CopyIndexAfterObject(thread_idx++, &thread, sizeof(MDRawThread)); - } - } - - return true; -} - -bool -MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) { - TypedMDRVA exception(&writer_); - - if (!exception.Allocate()) - return false; - - exception_stream->stream_type = MD_EXCEPTION_STREAM; - exception_stream->location = exception.location(); - MDRawExceptionStream *exception_ptr = exception.get(); - exception_ptr->thread_id = exception_thread_; - - // This naming is confusing, but it is the proper translation from - // mach naming to minidump naming. - exception_ptr->exception_record.exception_code = exception_type_; - exception_ptr->exception_record.exception_flags = exception_code_; - - breakpad_thread_state_data_t state; - mach_msg_type_number_t stateCount = sizeof(state); - - if (thread_get_state(exception_thread_, - BREAKPAD_MACHINE_THREAD_STATE, - state, - &stateCount) != KERN_SUCCESS) - return false; - - if (!WriteContext(state, &exception_ptr->thread_context)) - return false; - - exception_ptr->exception_record.exception_address = CurrentPCForStack(state); - - return true; -} - -bool MinidumpGenerator::WriteSystemInfoStream( - MDRawDirectory *system_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - system_info_stream->stream_type = MD_SYSTEM_INFO_STREAM; - system_info_stream->location = info.location(); - - // CPU Information - uint32_t cpu_type; - size_t len = sizeof(cpu_type); - sysctlbyname("hw.cputype", &cpu_type, &len, NULL, 0); - uint32_t number_of_processors; - len = sizeof(number_of_processors); - sysctlbyname("hw.ncpu", &number_of_processors, &len, NULL, 0); - MDRawSystemInfo *info_ptr = info.get(); - - switch (cpu_type) { - case CPU_TYPE_POWERPC: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_PPC; - break; - case CPU_TYPE_I386: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; -#ifdef __i386__ - // ebx is used for PIC code, so we need - // to preserve it. -#define cpuid(op,eax,ebx,ecx,edx) \ - asm ("pushl %%ebx \n\t" \ - "cpuid \n\t" \ - "movl %%ebx,%1 \n\t" \ - "popl %%ebx" \ - : "=a" (eax), \ - "=g" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "0" (op)) - int unused, unused2; - // get vendor id - cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], - info_ptr->cpu.x86_cpu_info.vendor_id[2], - info_ptr->cpu.x86_cpu_info.vendor_id[1]); - // get version and feature info - cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, - info_ptr->cpu.x86_cpu_info.feature_information); - // family - info_ptr->processor_level = - (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; - // 0xMMSS (Model, Stepping) - info_ptr->processor_revision = - (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | - ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4); -#endif // __i386__ - break; - default: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - break; - } - - info_ptr->number_of_processors = number_of_processors; - info_ptr->platform_id = MD_OS_MAC_OS_X; - - MDLocationDescriptor build_string_loc; - - if (!writer_.WriteString(build_string_, 0, - &build_string_loc)) - return false; - - info_ptr->csd_version_rva = build_string_loc.rva; - info_ptr->major_version = os_major_version_; - info_ptr->minor_version = os_minor_version_; - info_ptr->build_number = os_build_number_; - - return true; -} - -void setVersion(MDRawModule *module, uint32_t version, bool isMainExecutable) -{ - module->version_info.signature = MD_VSFIXEDFILEINFO_SIGNATURE; - module->version_info.struct_version |= MD_VSFIXEDFILEINFO_VERSION; - if (!isMainExecutable) { - // Convert MAC dylib version format, which is a 32 bit number, to the - // format used by minidump. The mac format is <16 bits>.<8 bits>.<8 bits> - // so it fits nicely into the windows version with some massaging - // The mapping is: - // 1) upper 16 bits of MAC version go to lower 16 bits of product HI - // 2) Next most significant 8 bits go to upper 16 bits of product LO - // 3) Least significant 8 bits go to lower 16 bits of product LO - module->version_info.file_version_hi = 0; - module->version_info.file_version_hi = version >> 16; - module->version_info.file_version_lo = (version & 0xff00) << 8; - module->version_info.file_version_lo |= (version & 0xff); - } else { - // Convert the __TEXT __version section of the main executable - module->version_info.file_version_hi = (version & 0xff000000) >> 8; - module->version_info.file_version_hi |= (version & 0x00ff0000) >> 16; - module->version_info.file_version_lo = (version & 0x0000ff00) << 8; - module->version_info.file_version_lo |= (version & 0x000000ff); - } -} - -bool MinidumpGenerator::WriteModuleStream(unsigned int index, - MDRawModule *module) { - if (dynamic_images_) { - // we're in a different process than the crashed process - DynamicImage *image = dynamic_images_->GetImage(index); - - if (!image) - return false; - - const breakpad_mach_header *header = image->GetMachHeader(); - - if (!header) - return false; - - int cpu_type = header->cputype; - - memset(module, 0, sizeof(MDRawModule)); - - MDLocationDescriptor string_location; - - const char* name = image->GetFilePath(); - if (!writer_.WriteString(name, 0, &string_location)) - return false; - - module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); - module->size_of_image = image->GetVMSize(); - module->module_name_rva = string_location.rva; - - setVersion(module, image->GetVersion(), index == (uint32_t)FindExecutableModule()); - - if (!WriteCVRecord(module, cpu_type, name)) { - return false; - } - } else { - // we're getting module info in the crashed process - - const breakpad_mach_header *header; - header = (breakpad_mach_header*)_dyld_get_image_header(index); - if (!header) - return false; - -#ifdef __LP64__ - assert(header->magic == MH_MAGIC_64); - - if(header->magic != MH_MAGIC_64) - return false; -#else - assert(header->magic == MH_MAGIC); - - if(header->magic != MH_MAGIC) - return false; -#endif - - int cpu_type = header->cputype; - unsigned long slide = _dyld_get_image_vmaddr_slide(index); - const char* name = _dyld_get_image_name(index); - const struct load_command *cmd = - reinterpret_cast(header + 1); - - memset(module, 0, sizeof(MDRawModule)); - - for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { - if (cmd->cmd == LC_SEGMENT) { - - const breakpad_mach_segment_command *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - MDLocationDescriptor string_location; - - if (!writer_.WriteString(name, 0, &string_location)) - return false; - - module->base_of_image = seg->vmaddr + slide; - module->size_of_image = seg->vmsize; - module->module_name_rva = string_location.rva; - - // The header MUST NOT be copied, but as it is free'd by the DynamicImage destructor, we have to leak the DynamicImage - // The other option is to rewrite the content of DynamicImage::CalculateMemoryAndVersionInfo() to get the version - DynamicImage *image = new DynamicImage((breakpad_mach_header*)header, 0, NULL, (char*)name, 0, MACH_PORT_NULL); - setVersion(module, image->GetVersion(), index == (uint32_t)FindExecutableModule()); - - if (!WriteCVRecord(module, cpu_type, name)) - return false; - - return true; - } - } - - cmd = reinterpret_cast((char *)cmd + cmd->cmdsize); - } - } - - return true; -} - -int MinidumpGenerator::FindExecutableModule() { - if (dynamic_images_) { - int index = dynamic_images_->GetExecutableImageIndex(); - - if (index >= 0) { - return index; - } - } else { - int image_count = _dyld_image_count(); - const struct mach_header *header; - - for (int index = 0; index < image_count; ++index) { - header = _dyld_get_image_header(index); - - if (header->filetype == MH_EXECUTE) - return index; - } - } - - // failed - just use the first image - return 0; -} - -bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path) { - TypedMDRVA cv(&writer_); - - // Only return the last path component of the full module path - const char *module_name = strrchr(module_path, '/'); - - // Increment past the slash - if (module_name) - ++module_name; - else - module_name = ""; - - size_t module_name_length = strlen(module_name); - - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) - return false; - - if (!cv.CopyIndexAfterObject(0, module_name, module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - FileID file_id(module_path); - unsigned char identifier[16]; - - if (file_id.MachoIdentifier(cpu_type, identifier)) { - cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | - (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | - (uint32_t)identifier[3]; - cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; - cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - - return true; -} - -bool MinidumpGenerator::WriteModuleListStream( - MDRawDirectory *module_list_stream) { - TypedMDRVA list(&writer_); - - int image_count = dynamic_images_ ? - dynamic_images_->GetImageCount() : _dyld_image_count(); - - if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) - return false; - - module_list_stream->stream_type = MD_MODULE_LIST_STREAM; - module_list_stream->location = list.location(); - list.get()->number_of_modules = image_count; - - // Write out the executable module as the first one - MDRawModule module; - int executableIndex = FindExecutableModule(); - - if (!WriteModuleStream(executableIndex, &module)) { - return false; - } - - list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); - int destinationIndex = 1; // Write all other modules after this one - - for (int i = 0; i < image_count; ++i) { - if (i != executableIndex) { - if (!WriteModuleStream(i, &module)) { - return false; - } - - list.CopyIndexAfterObject(destinationIndex++, &module, MD_MODULE_SIZE); - } - } - - return true; -} - -bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - misc_info_stream->stream_type = MD_MISC_INFO_STREAM; - misc_info_stream->location = info.location(); - - MDRawMiscInfo *info_ptr = info.get(); - info_ptr->size_of_info = sizeof(MDRawMiscInfo); - info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID | - MD_MISCINFO_FLAGS1_PROCESS_TIMES | - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO; - - // Process ID - info_ptr->process_id = getpid(); - - // Times - struct rusage usage; - if (getrusage(RUSAGE_SELF, &usage) != -1) { - // Omit the fractional time since the MDRawMiscInfo only wants seconds - info_ptr->process_user_time = usage.ru_utime.tv_sec; - info_ptr->process_kernel_time = usage.ru_stime.tv_sec; - } - int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, info_ptr->process_id }; - size_t size; - if (!sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &size, NULL, 0)) { - mach_vm_address_t addr; - if (mach_vm_allocate(mach_task_self(), - &addr, - size, - true) == KERN_SUCCESS) { - struct kinfo_proc *proc = (struct kinfo_proc *)addr; - if (!sysctl(mib, sizeof(mib) / sizeof(mib[0]), proc, &size, NULL, 0)) - info_ptr->process_create_time = proc->kp_proc.p_starttime.tv_sec; - mach_vm_deallocate(mach_task_self(), addr, size); - } - } - - // Speed - uint64_t speed; - size = sizeof(speed); - sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); - info_ptr->processor_max_mhz = speed / (1000 * 1000); - info_ptr->processor_mhz_limit = speed / (1000 * 1000); - size = sizeof(speed); - sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); - info_ptr->processor_current_mhz = speed / (1000 * 1000); - - return true; -} - -bool MinidumpGenerator::WriteBreakpadInfoStream( - MDRawDirectory *breakpad_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM; - breakpad_info_stream->location = info.location(); - MDRawBreakpadInfo *info_ptr = info.get(); - - if (exception_thread_ && exception_type_) { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = exception_thread_; - } else { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = 0; - } - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.h deleted file mode 100644 index 0d3424c3..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator.h +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator.h: Create a minidump of the current MacOS process. - -#ifndef CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ -#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ - -#include - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_format.h" -#include "common/mac/macho_utilities.h" - -#include "dynamic_images.h" - -namespace google_breakpad { - -using std::string; - -#if TARGET_CPU_X86_64 || TARGET_CPU_PPC64 -#define TOP_OF_THREAD0_STACK 0x00007fff5fbff000 -#else -#define TOP_OF_THREAD0_STACK 0xbffff000 -#endif - -#if TARGET_CPU_X86_64 -typedef x86_thread_state64_t breakpad_thread_state_t; -typedef MDRawContextAMD64 MinidumpContext; -#elif TARGET_CPU_X86 -typedef i386_thread_state_t breakpad_thread_state_t; -typedef MDRawContextX86 MinidumpContext; -#elif TARGET_CPU_PPC64 -typedef ppc_thread_state64_t breakpad_thread_state_t; -typedef MDRawContextPPC64 MinidumpContext; -#elif TARGET_CPU_PPC -typedef ppc_thread_state_t breakpad_thread_state_t; -typedef MDRawContextPPC MinidumpContext; -#endif - -// Creates a minidump file of the current process. If there is exception data, -// use SetExceptionInformation() to add this to the minidump. The minidump -// file is generated by the Write() function. -// Usage: -// MinidumpGenerator minidump(); -// minidump.Write("/tmp/minidump"); -// -class MinidumpGenerator { - public: - MinidumpGenerator(); - MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread); - - ~MinidumpGenerator(); - - // Return /.dmp - // Sets |unique_name| (if requested) to the unique name for the minidump - static string UniqueNameInDirectory(const string &dir, string *unique_name); - - // Write out the minidump into |path| - // All of the components of |path| must exist and be writable - // Return true if successful, false otherwise - bool Write(const char *path); - - // Specify some exception information, if applicable - void SetExceptionInformation(int type, int code, mach_port_t thread_name) { - exception_type_ = type; - exception_code_ = code; - exception_thread_ = thread_name; - } - - // Gather system information. This should be call at least once before using - // the MinidumpGenerator class. - static void GatherSystemInformation(); - - private: - typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *); - - // Stream writers - bool WriteThreadListStream(MDRawDirectory *thread_list_stream); - bool WriteExceptionStream(MDRawDirectory *exception_stream); - bool WriteSystemInfoStream(MDRawDirectory *system_info_stream); - bool WriteModuleListStream(MDRawDirectory *module_list_stream); - bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream); - bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); - - // Helpers - u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state); - bool WriteStackFromStartAddress(mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location); - bool WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread); - bool WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path); - bool WriteModuleStream(unsigned int index, MDRawModule *module); - - size_t CalculateStackSize(mach_vm_address_t start_addr); - - int FindExecutableModule(); - - // disallow copy ctor and operator= - explicit MinidumpGenerator(const MinidumpGenerator &); - void operator=(const MinidumpGenerator &); - - // Use this writer to put the data to disk - MinidumpFileWriter writer_; - - // Exception information - int exception_type_; - int exception_code_; - mach_port_t exception_thread_; - mach_port_t crashing_task_; - mach_port_t handler_thread_; - - // System information - static char build_string_[16]; - static int os_major_version_; - static int os_minor_version_; - static int os_build_number_; - - // Information about dynamically loaded code - DynamicImages *dynamic_images_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator_test.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator_test.cc deleted file mode 100644 index 62530832..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_generator_test.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include - -#include - -#include "minidump_generator.h" -#include "minidump_file_writer.h" - -using std::string; -using google_breakpad::MinidumpGenerator; - -static bool doneWritingReport = false; - -static void *Reporter(void *) { - char buffer[PATH_MAX]; - MinidumpGenerator md; - struct passwd *user = getpwuid(getuid()); - - // Write it to the desktop - snprintf(buffer, - sizeof(buffer), - "/Users/%s/Desktop/test.dmp", - user->pw_name); - - fprintf(stdout, "Writing %s\n", buffer); - unlink(buffer); - md.Write(buffer); - doneWritingReport = true; - - return NULL; -} - -static void SleepyFunction() { - while (!doneWritingReport) { - usleep(100); - } -} - -int main(int argc, char * const argv[]) { - pthread_t reporter_thread; - - if (pthread_create(&reporter_thread, NULL, Reporter, NULL) == 0) { - pthread_detach(reporter_thread); - } else { - perror("pthread_create"); - } - - SleepyFunction(); - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests32-Info.plist b/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests32-Info.plist deleted file mode 100644 index 921ebf35..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests32-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.breakpad.minidump_tests32 - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests64-Info.plist b/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests64-Info.plist deleted file mode 100644 index acfbd309..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/minidump_tests64-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.breakpad.minidump_tests64 - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - CSResourcesFileMapped - yes - - diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/obj-cTestCases-Info.plist b/thirdparty/google-breakpad/r318/src/client/mac/handler/obj-cTestCases-Info.plist deleted file mode 100644 index 65013556..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/obj-cTestCases-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.cc deleted file mode 100644 index 10768541..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// ProtectedMemoryAllocator -// -// See the header file for documentation - -#include "protected_memory_allocator.h" -#include - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ProtectedMemoryAllocator::ProtectedMemoryAllocator(vm_size_t pool_size) - : pool_size_(pool_size), - next_alloc_offset_(0), - valid_(false) { - - kern_return_t result = vm_allocate(mach_task_self(), - &base_address_, - pool_size, - TRUE - ); - - valid_ = (result == KERN_SUCCESS); - assert(valid_); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ProtectedMemoryAllocator::~ProtectedMemoryAllocator() { - vm_deallocate(mach_task_self(), - base_address_, - pool_size_ - ); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -char *ProtectedMemoryAllocator::Allocate(size_t bytes) { - if (valid_ && next_alloc_offset_ + bytes <= pool_size_) { - char *p = (char*)base_address_ + next_alloc_offset_; - next_alloc_offset_ += bytes; - return p; - } - - return NULL; // ran out of memory in our allocation block -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -kern_return_t ProtectedMemoryAllocator::Protect() { - kern_return_t result = vm_protect(mach_task_self(), - base_address_, - pool_size_, - FALSE, - VM_PROT_READ); - - return result; -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -kern_return_t ProtectedMemoryAllocator::Unprotect() { - kern_return_t result = vm_protect(mach_task_self(), - base_address_, - pool_size_, - FALSE, - VM_PROT_READ | VM_PROT_WRITE); - - return result; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.h deleted file mode 100644 index ed4f51d5..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/protected_memory_allocator.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// ProtectedMemoryAllocator -// -// A very simple allocator class which allows allocation, but not deallocation. -// The allocations can be made read-only with the Protect() method. -// This class is NOT useful as a general-purpose memory allocation system, -// since it does not allow deallocation. It is useful to use for a group -// of allocations which are created in the same time-frame and destroyed -// in the same time-frame. It is useful for making allocations of memory -// which will not need to change often once initialized. This memory can then -// be protected from memory smashers by calling the Protect() method. - -#ifndef PROTECTED_MEMORY_ALLOCATOR_H__ -#define PROTECTED_MEMORY_ALLOCATOR_H__ - -#include - -// -class ProtectedMemoryAllocator { - public: - ProtectedMemoryAllocator(vm_size_t pool_size); - ~ProtectedMemoryAllocator(); - - // Returns a pointer to an allocation of size n within the pool. - // Fails by returning NULL is no more space is available. - // Please note that the pointers returned from this method should not - // be freed in any way (for example by calling free() on them ). - char * Allocate(size_t n); - - // Returns the base address of the allocation pool. - char * GetBaseAddress() { return (char*)base_address_; } - - // Returns the size of the allocation pool, including allocated - // plus free space. - vm_size_t GetTotalSize() { return pool_size_; } - - // Returns the number of bytes already allocated in the pool. - vm_size_t GetAllocatedSize() { return next_alloc_offset_; } - - // Returns the number of bytes available for allocation. - vm_size_t GetFreeSize() { return pool_size_ - next_alloc_offset_; } - - // Makes the entire allocation pool read-only including, of course, - // all allocations made from the pool. - kern_return_t Protect(); - - // Makes the entire allocation pool read/write. - kern_return_t Unprotect(); - - private: - vm_size_t pool_size_; - vm_address_t base_address_; - int next_alloc_offset_; - bool valid_; -}; - -#endif // PROTECTED_MEMORY_ALLOCATOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.cc deleted file mode 100644 index cb76eb10..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// DynamicImagesTests.cpp -// minidump_test -// -// Created by Neal Sidhwaney on 4/17/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#include "client/mac/handler/testcases/DynamicImagesTests.h" -#include "client/mac/handler/dynamic_images.h" - -DynamicImagesTests test2(TEST_INVOCATION(DynamicImagesTests, - ReadTaskMemoryTest)); -DynamicImagesTests test3(TEST_INVOCATION(DynamicImagesTests, - ReadLibrariesFromLocalTaskTest)); - -DynamicImagesTests::DynamicImagesTests(TestInvocation *invocation) - : TestCase(invocation) { -} - -DynamicImagesTests::~DynamicImagesTests() { -} - -void DynamicImagesTests::ReadTaskMemoryTest() { - kern_return_t kr; - - // pick test2 as a symbol we know to be valid to read - // anything will work, really - void *addr = reinterpret_cast(&test2); - void *buf; - - fprintf(stderr, "reading 0x%p\n", addr); - buf = google_breakpad::ReadTaskMemory(mach_task_self(), - addr, - getpagesize(), - &kr); - - CPTAssert(kr == KERN_SUCCESS); - - CPTAssert(buf != NULL); - - CPTAssert(0 == memcmp(buf, (const void*)addr, getpagesize())); - - free(buf); -} - -void DynamicImagesTests::ReadLibrariesFromLocalTaskTest() { - - mach_port_t me = mach_task_self(); - google_breakpad::DynamicImages *d = new google_breakpad::DynamicImages(me); - - fprintf(stderr,"Local task image count: %d\n", d->GetImageCount()); - - d->TestPrint(); - - CPTAssert(d->GetImageCount() > 0); -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.h deleted file mode 100644 index e1e79993..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/DynamicImagesTests.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// DynamicImagesTests.h -// minidump_test -// -// Created by Neal Sidhwaney on 4/17/08. -// Copyright 2008 Google Inc. All rights reserved. -// -// - -#ifndef _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ -#define _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ - -#include - -class DynamicImagesTests : public TestCase { - public: - explicit DynamicImagesTests(TestInvocation* invocation); - virtual ~DynamicImagesTests(); - - void ReadTaskMemoryTest(); - void ReadLibrariesFromLocalTaskTest(); -}; - -#endif /* _CLIENT_MAC_HANDLER_TESTCASES_DYNAMICIMAGESTESTS_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.cc b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.cc deleted file mode 100644 index e7332bfb..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.cc +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// breakpad_nlist_test.cc -// minidump_test -// -// Created by Neal Sidhwaney on 4/13/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#include "client/mac/handler/testcases/breakpad_nlist_test.h" -#include -#include "client/mac/handler/breakpad_nlist_64.h" - -BreakpadNlistTest test1(TEST_INVOCATION(BreakpadNlistTest, CompareToNM)); - -BreakpadNlistTest::BreakpadNlistTest(TestInvocation *invocation) - : TestCase(invocation) { -} - - -BreakpadNlistTest::~BreakpadNlistTest() { -} - -void BreakpadNlistTest::CompareToNM() { -#if TARGET_CPU_X86_64 - system("/usr/bin/nm -arch x86_64 /usr/lib/dyld > /tmp/dyld-namelist.txt"); -#elif TARGET_CPU_PPC64 - system("/usr/bin/nm -arch ppc64 /usr/lib/dyld > /tmp/dyld-namelist.txt"); -#endif - - FILE *fd = fopen("/tmp/dyld-namelist.txt", "rt"); - - char oneNMAddr[30]; - char symbolType; - char symbolName[500]; - while (!feof(fd)) { - fscanf(fd, "%s %c %s", oneNMAddr, &symbolType, symbolName); - breakpad_nlist symbolList[2]; - breakpad_nlist &list = symbolList[0]; - - memset(symbolList, 0, sizeof(breakpad_nlist)*2); - const char *symbolNames[2]; - symbolNames[0] = (const char*)symbolName; - symbolNames[1] = "\0"; - breakpad_nlist_64("/usr/lib/dyld", &list, symbolNames); - uint64_t nmAddr = strtol(oneNMAddr, NULL, 16); - if (!IsSymbolMoreThanOnceInDyld(symbolName)) { - CPTAssert(nmAddr == symbolList[0].n_value); - } - } - - fclose(fd); -} - -bool BreakpadNlistTest::IsSymbolMoreThanOnceInDyld(const char *symbolName) { - // These are the symbols that occur more than once when nm dumps - // the symbol table of /usr/lib/dyld. Our nlist program returns - // the first address because it's doing a search so we need to exclude - // these from causing the test to fail - const char *multipleSymbols[] = { - "__Z41__static_initialization_and_destruction_0ii", - "___tcf_0", - "___tcf_1", - "_read_encoded_value_with_base", - "_read_sleb128", - "_read_uleb128", - "\0"}; - - bool found = false; - - for (int i = 0; multipleSymbols[i][0]; i++) { - if (!strcmp(multipleSymbols[i], symbolName)) { - found = true; - break; - } - } - - return found; -} diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.h deleted file mode 100644 index e93657cc..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/breakpad_nlist_test.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// breakpad_nlist_test.h -// minidump_test -// -// Created by Neal Sidhwaney on 4/13/08. -// Copyright 2008 Google Inc. All rights reserved. -// -// - -#ifndef CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__ -#define CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__ - -#include - -class BreakpadNlistTest : public TestCase { - private: - - // nm dumps multiple addresses for the same symbol in - // /usr/lib/dyld. So we track those so we don't report failures - // in mismatches between what our nlist returns and what nm has - // for the duplicate symbols. - bool IsSymbolMoreThanOnceInDyld(const char *symbolName); - - public: - explicit BreakpadNlistTest(TestInvocation* invocation); - virtual ~BreakpadNlistTest(); - - - /* This test case runs nm on /usr/lib/dyld and then compares the - output of every symbol to what our nlist implementation returns */ - void CompareToNM(); -}; - -#endif /* CLIENT_MAC_HANDLER_TESTCASES_BREAKPAD_NLIST_TEST_H__*/ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.h b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.h deleted file mode 100644 index 21ff7a44..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// dwarftests.h -// minidump_test -// -// Created by Neal Sidhwaney on 9/24/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#import - - -@interface dwarftests : SenTestCase { - -} - -- (void) testDWARFSymbolFileGeneration; - -@end diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.mm b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.mm deleted file mode 100644 index 40c69aff..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/dwarftests.mm +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// -// dwarftests.m -// minidump_test -// -// Created by Neal Sidhwaney on 9/24/08. -// Copyright 2008 Google Inc. All rights reserved. -// - -#import "dwarftests.h" -#import "dump_syms.h" - -@implementation dwarftests -- (void) testDWARFSymbolFileGeneration { - NSString *inputBreakpadSymbolFile = @"testcases/testdata/dump_syms_i386_breakpad.sym"; - NSString *outputBreakpadSymbolFile = @"/tmp/dump_syms_i386.breakpad"; - - DumpSymbols *dump = [[DumpSymbols alloc] initWithContentsOfFile:@"testcases/testdata/dump_syms_dwarf_data"]; - - STAssertNotNil(dump, @"DumpSymbols is nil"); - [dump setArchitecture:@"i386"]; - [dump writeSymbolFile:outputBreakpadSymbolFile]; - - NSData *d = [[NSData alloc] initWithContentsOfFile:inputBreakpadSymbolFile]; - STAssertNotNil(d, @"Input breakpad symbol file not found"); - - NSData *d1 = [[NSData alloc] initWithContentsOfFile:outputBreakpadSymbolFile]; - STAssertNotNil(d1, @"Output breakpad symbol file not found"); - - STAssertTrue([d isEqualToData:d1], - @"Symbol files were not equal!",nil); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data deleted file mode 100644 index 5be17aee..00000000 Binary files a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_dwarf_data and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym b/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym deleted file mode 100644 index bca43c10..00000000 --- a/thirdparty/google-breakpad/r318/src/client/mac/handler/testcases/testdata/dump_syms_i386_breakpad.sym +++ /dev/null @@ -1,5300 +0,0 @@ -MODULE mac x86 94BF873C47A73BC07125291390B4C5F10 dump_syms_dwarf_data -FILE 1 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 2 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 3 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dump_syms.mm -FILE 4 /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSRange.h -FILE 5 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/new -FILE 6 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_fun.h -FILE 7 ../../../common/mac/dwarf/dwarf2reader.h -FILE 8 ../../../common/mac/file_id.h -FILE 9 ../../../common/mac/dwarf/functioninfo.h -FILE 10 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_tree.h -FILE 11 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 12 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hashtable.h -FILE 13 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 14 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 15 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/allocator.h -FILE 16 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 17 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h -FILE 18 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h -FILE 19 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algo.h -FILE 20 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_map.h -FILE 21 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 22 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_function.h -FILE 23 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_map -FILE 24 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/basic_string.h -FILE 25 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 26 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_list.h -FILE 27 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/list.tcc -FILE 28 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 29 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 30 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/functioninfo.cc -FILE 31 ../../../common/mac/dwarf/dwarf2reader.h -FILE 32 ../../../common/mac/dwarf/functioninfo.h -FILE 33 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 34 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hashtable.h -FILE 35 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/memory -FILE 36 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 37 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/basic_string.h -FILE 38 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 39 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 40 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_tree.h -FILE 41 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_function.h -FILE 42 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/hash_map -FILE 43 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 44 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 45 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_map.h -FILE 46 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 47 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 48 /g/code/breakpad-staging/src/tools/mac/dump_syms/dump_syms_tool.mm -FILE 49 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/file_id.cc -FILE 50 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 51 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_id.cc -FILE 52 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 53 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 54 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_walker.cc -FILE 55 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/libkern/i386/OSByteOrder.h -FILE 56 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/architecture/byte_order.h -FILE 57 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/macho_utilities.cc -FILE 58 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/bytereader.cc -FILE 59 ../../../common/mac/dwarf/bytereader-inl.h -FILE 60 /g/code/breakpad-staging/src/tools/mac/dump_syms/../../../common/mac/dwarf/dwarf2reader.cc -FILE 61 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h -FILE 62 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_deque.h -FILE 63 ../../../common/mac/dwarf/bytereader.h -FILE 64 ../../../common/mac/dwarf/bytereader-inl.h -FILE 65 ../../../common/mac/dwarf/line_state_machine.h -FILE 66 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_list.h -FILE 67 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/memory -FILE 68 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/ext/new_allocator.h -FILE 69 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/allocator.h -FILE 70 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_pair.h -FILE 71 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_vector.h -FILE 72 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_iterator.h -FILE 73 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_construct.h -FILE 74 ../../../common/mac/dwarf/dwarf2reader.h -FILE 75 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_stack.h -FILE 76 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/deque.tcc -FILE 77 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/list.tcc -FILE 78 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/vector.tcc -FILE 79 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_uninitialized.h -FILE 80 /var/tmp/gcc/gcc-5484~1/src/gcc/libgcc2.c -FUNC 162a 28 0 _OSSwapInt16 -162a 10 44 55 -163a 16 46 55 -1650 2 47 55 -FUNC 1652 1c 0 _OSSwapInt32 -1652 f 53 55 -1661 8 55 55 -1669 3 56 55 -166c 2 57 55 -FUNC 166e 2b 0 _OSSwapInt64 -166e 12 64 55 -1680 11 69 55 -1691 6 70 55 -1697 2 71 55 -1699 1 71 55 -FUNC 169a 1e 0 NXSwapShort -169a 10 43 56 -16aa c 45 56 -16b6 2 46 56 -FUNC 16b8 19 0 NXSwapInt -16b8 f 52 56 -16c7 8 54 56 -16cf 2 55 56 -16d1 1 55 56 -FUNC 16d2 19 0 NXSwapLong -16d2 f 61 56 -16e1 8 63 56 -16e9 2 64 56 -16eb 1 64 56 -FUNC 16ec 1f 0 NXSwapLongLong -16ec 12 70 56 -16fe b 72 56 -1709 2 73 56 -170b 1 73 56 -FUNC 170c 181 0 -[DumpSymbols convertCPlusPlusSymbols:] -170c 14 128 3 -1720 54 130 3 -1774 f 132 3 -1783 7 133 3 -178a 1a 136 3 -17a4 5 138 3 -17a9 1a 139 3 -17c3 23 140 3 -17e6 7 141 3 -17ed 44 142 3 -1831 1e 145 3 -184f 29 138 3 -1878 b 148 3 -1883 3 150 3 -1886 7 151 3 -188d 1 151 3 -FUNC 188e 323 0 -[DumpSymbols convertSymbols] -188e 14 154 3 -18a2 1f 155 3 -18c1 3e 156 3 -18ff 2b 160 3 -192a c 162 3 -1936 43 164 3 -1979 2a 165 3 -19a3 20 168 3 -19c3 d 169 3 -19d0 1e 171 3 -19ee 11 162 3 -19ff 7 181 3 -1a06 6 182 3 -1a0c 5 184 3 -1a11 15 185 3 -1a26 6 18 4 -1a2c 6 19 4 -1a32 6 20 4 -1a38 6 185 3 -1a3e 28 186 3 -1a66 21 187 3 -1a87 1a 188 3 -1aa1 a 190 3 -1aab c 194 3 -1ab7 43 198 3 -1afa 21 199 3 -1b1b 20 202 3 -1b3b 2e 203 3 -1b69 1e 194 3 -1b87 c 184 3 -1b93 17 207 3 -1baa 7 208 3 -1bb1 1 208 3 -FUNC 1bb2 4a2 0 -[DumpSymbols addFunction:line:address:section:] -1bb2 21 211 3 -1bd3 2f 212 3 -1c02 e 214 3 -1c10 4 219 3 -1c14 2a 221 3 -1c3e 22 223 3 -1c60 6 224 3 -1c66 2a 225 3 -1c90 4 226 3 -1c94 2e 230 3 -1cc2 2e 233 3 -1cf0 2e 236 3 -1d1e a 239 3 -1d28 2b 253 3 -1d53 e 254 3 -1d61 3c 255 3 -1d9d 22 32 4 -1dbf 3 256 3 -1dc2 6 259 3 -1dc8 a 260 3 -1dd2 3c 261 3 -1e0e 25 262 3 -1e33 2a 263 3 -1e5d 22 265 3 -1e7f 26 270 3 -1ea5 6 272 3 -1eab 37 273 3 -1ee2 2a 274 3 -1f0c 17 275 3 -1f23 43 278 3 -1f66 2e 279 3 -1f94 23 282 3 -1fb7 43 285 3 -1ffa 52 287 3 -204c 8 289 3 -FUNC 2054 5a4 0 -[DumpSymbols processSymbolItem:stringTable:] -2054 18 292 3 -206c 8 293 3 -2074 4 294 3 -2078 16 297 3 -208e c 298 3 -209a f 300 3 -20a9 b 301 3 -20b4 16 303 3 -20ca 4d 309 3 -2117 38 311 3 -214f 30 315 3 -217f 60 317 3 -21df d 322 3 -21ec 2b 325 3 -2217 3a 327 3 -2251 f 332 3 -2260 2d 333 3 -228d 1a 334 3 -22a7 32 335 3 -22d9 20 342 3 -22f9 c 343 3 -2305 24 348 3 -2329 a 349 3 -2333 3c 350 3 -236f 2a 352 3 -2399 1c 353 3 -23b5 9 354 3 -23be f 356 3 -23cd 2d 357 3 -23fa 2f 358 3 -2429 20 360 3 -2449 c 361 3 -2455 7 363 3 -245c 21 365 3 -247d 4a 368 3 -24c7 9 370 3 -24d0 1a 371 3 -24ea 4b 372 3 -2535 4 373 3 -2539 5 371 3 -253e 29 374 3 -2567 2d 376 3 -2594 4b 378 3 -25df 4 379 3 -25e3 a 382 3 -25ed b 383 3 -FUNC 25f8 c9 0 -[DumpSymbols loadSymbolInfo:offset:] -25f8 13 391 3 -260b 2b 392 3 -2636 2a 393 3 -2660 2d 395 3 -268d 2e 398 3 -26bb 6 399 3 -26c1 1 399 3 -FUNC 26c2 2be 0 -[DumpSymbols loadSTABSSymbolInfo:offset:] -26c2 16 537 3 -26d8 9 538 3 -26e1 10 539 3 -26f1 2e 540 3 -271f 9 542 3 -2728 22 543 3 -274a 4 544 3 -274e a 546 3 -2758 3c 547 3 -2794 c 549 3 -27a0 e 550 3 -27ae 6 551 3 -27b4 25 552 3 -27d9 25 553 3 -27fe 25 554 3 -2823 c 555 3 -282f c 556 3 -283b c 559 3 -2847 23 562 3 -286a a 563 3 -2874 a 564 3 -287e 2e 565 3 -28ac 39 566 3 -28e5 2e 570 3 -2913 4 571 3 -2917 17 559 3 -292e 25 575 3 -2953 9 576 3 -295c 17 549 3 -2973 4 579 3 -2977 9 580 3 -FUNC 2980 28a 0 -[DumpSymbols loadSymbolInfo64:offset:] -2980 16 583 3 -2996 9 585 3 -299f 10 586 3 -29af 2e 587 3 -29dd 9 589 3 -29e6 22 590 3 -2a08 4 591 3 -2a0c c 593 3 -2a18 e 594 3 -2a26 6 595 3 -2a2c 25 596 3 -2a51 25 597 3 -2a76 25 598 3 -2a9b 9 599 3 -2aa4 c 600 3 -2ab0 c 603 3 -2abc 17 604 3 -2ad3 23 609 3 -2af6 a 610 3 -2b00 a 611 3 -2b0a 2e 612 3 -2b38 37 613 3 -2b6f 2e 615 3 -2b9d 4 616 3 -2ba1 17 603 3 -2bb8 25 620 3 -2bdd 9 621 3 -2be6 17 593 3 -2bfd 4 624 3 -2c01 9 625 3 -FUNC 2c0a 199 0 -[DumpSymbols loadSymbolInfoForArchitecture] -2c0a 13 628 3 -2c1d 41 630 3 -2c5e 2b 631 3 -2c89 1a 632 3 -2ca3 40 634 3 -2ce3 40 635 3 -2d23 5f 637 3 -2d82 17 639 3 -2d99 4 640 3 -2d9d 6 641 3 -2da3 1 641 3 -FUNC 2da4 3e5 0 -[DumpSymbols loadHeader:offset:] -2da4 18 728 3 -2dbc 9 729 3 -2dc5 10 730 3 -2dd5 2e 731 3 -2e03 9 733 3 -2e0c 2b 734 3 -2e37 1e 736 3 -2e55 c 738 3 -2e61 e 739 3 -2e6f 6 740 3 -2e75 50 742 3 -2ec5 2e 743 3 -2ef3 2e 744 3 -2f21 2e 745 3 -2f4f 20 746 3 -2f6f 1b7 755 3 -3126 9 757 3 -312f 25 761 3 -3154 9 762 3 -315d 17 738 3 -3174 a 765 3 -317e b 766 3 -3189 1 766 3 -FUNC 318a 41d 0 -[DumpSymbols loadHeader64:offset:] -318a 18 769 3 -31a2 9 771 3 -31ab 10 772 3 -31bb 2e 773 3 -31e9 9 775 3 -31f2 c 777 3 -31fe 2b 778 3 -3229 e 779 3 -3237 6 780 3 -323d 50 781 3 -328d 49 782 3 -32d6 49 783 3 -331f 2e 784 3 -334d 9 785 3 -3356 29 786 3 -337f 1c5 794 3 -3544 9 795 3 -354d 25 799 3 -3572 9 800 3 -357b 17 777 3 -3592 a 803 3 -359c b 804 3 -35a7 1 804 3 -FUNC 35a8 52a 0 -[DumpSymbols loadModuleInfo] -35a8 14 807 3 -35bc e 808 3 -35ca 41 810 3 -360b 1a 811 3 -3625 6 812 3 -362b 6 814 3 -3631 17 815 3 -3648 c 816 3 -3654 29 820 3 -367d 29 821 3 -36a6 29 822 3 -36cf 35 824 3 -3704 12 826 3 -3716 17 827 3 -372d c 828 3 -3739 3c 832 3 -3775 a 834 3 -377f 9 836 3 -3788 25 837 3 -37ad c 839 3 -37b9 54 840 3 -380d 57 841 3 -3864 57 842 3 -38bb 57 843 3 -3912 57 844 3 -3969 1c 846 3 -3985 4b 847 3 -39d0 49 849 3 -3a19 13 839 3 -3a2c 6 851 3 -3a32 3c 852 3 -3a6e 3a 854 3 -3aa8 17 857 3 -3abf c 858 3 -3acb 7 859 3 -FUNC 3ad2 b6 0 WriteFormat -3ad2 10 862 3 -3ae2 6 867 3 -3ae8 24 868 3 -3b0c 27 869 3 -3b33 40 870 3 -3b73 c 873 3 -3b7f 9 874 3 -FUNC 3b88 35 0 -[DumpSymbols availableArchitectures] -3b88 13 1140 3 -3b9b 1c 1141 3 -3bb7 6 1142 3 -3bbd 1 1142 3 -FUNC 3bbe 1b4 0 -[DumpSymbols setArchitecture:] -3bbe 13 1158 3 -3bd1 1a 1159 3 -3beb 4 1160 3 -3bef 2a 1162 3 -3c19 9 1163 3 -3c22 2a 1165 3 -3c4c 9 1166 3 -3c55 9 1167 3 -3c5e 2a 1169 3 -3c88 6 1170 3 -3c8e 2a 1172 3 -3cb8 6 1173 3 -3cbe 2a 1175 3 -3ce8 4 1176 3 -3cec 6 1179 3 -3cf2 2c 1180 3 -3d1e 9 1181 3 -3d27 1c 1183 3 -3d43 1f 1184 3 -3d62 a 1187 3 -3d6c 6 1188 3 -FUNC 3d72 14 0 -[DumpSymbols architecture] -3d72 c 1191 3 -3d7e 6 1192 3 -3d84 2 1193 3 -FUNC 3d86 e7 0 -[DumpSymbols writeSymbolFile:] -3d86 13 1196 3 -3d99 1a 1197 3 -3db3 48 1200 3 -3dfb 9 1201 3 -3e04 1e 1203 3 -3e22 6 1205 3 -3e28 9 1206 3 -3e31 21 1208 3 -3e52 b 1210 3 -3e5d a 1212 3 -3e67 6 1213 3 -3e6d 1 1213 3 -FUNC 3e6e 65 0 -[MachSection initWithMachSection:andNumber:] -3e6e 13 1219 3 -3e81 37 1220 3 -3eb8 9 1221 3 -3ec1 9 1222 3 -3eca 3 1225 3 -3ecd 6 1226 3 -3ed3 1 1226 3 -FUNC 3ed4 14 0 -[MachSection sectionPointer] -3ed4 c 1228 3 -3ee0 6 1229 3 -3ee6 2 1230 3 -FUNC 3ee8 14 0 -[MachSection sectionNumber] -3ee8 c 1232 3 -3ef4 6 1233 3 -3efa 2 1234 3 -FUNC 3efc 17c 0 -[DumpSymbols processDWARFSourceFileInfo:] -3efc 14 459 3 -3f10 a 460 3 -3f1a 3c 461 3 -3f56 20 463 3 -3f76 5 464 3 -3f7b 3a 465 3 -3fb5 1d 466 3 -3fd2 3a 467 3 -400c 2a 468 3 -4036 3b 464 3 -4071 7 471 3 -FUNC 4078 1d7 0 DumpFunctionMap(std::map, std::allocator > >) -4078 15 82 3 -408d 13 83 3 -40a0 1e 85 3 -40be 42 89 3 -4100 20 90 3 -4120 2b 91 3 -414b 1a 92 3 -4165 23 93 3 -4188 46 96 3 -41ce 46 99 3 -4214 33 83 3 -4247 8 102 3 -424f 1 102 3 -FUNC 4250 3ef 0 -[DumpSymbols processDWARFFunctionInfo:] -4250 15 473 3 -4265 25 474 3 -428a 1e 476 3 -42a8 a 480 3 -42b2 3c 481 3 -42ee 3d 483 3 -432b 23 485 3 -434e 26 487 3 -4374 6 489 3 -437a 37 490 3 -43b1 2a 491 3 -43db 17 492 3 -43f2 30 496 3 -4422 3d 497 3 -445f 2e 498 3 -448d 30 502 3 -44bd 64 504 3 -4521 34 507 3 -4555 9d 509 3 -45f2 45 474 3 -4637 8 513 3 -463f 1 513 3 -FUNC 4640 1f5 0 -[DumpSymbols processDWARFLineNumberInfo:] -4640 15 515 3 -4655 25 516 3 -467a 39 520 3 -46b3 26 521 3 -46d9 6 523 3 -46df 37 524 3 -4716 2a 525 3 -4740 17 526 3 -4757 30 529 3 -4787 61 531 3 -47e8 45 516 3 -482d 8 534 3 -4835 1 534 3 -FUNC 4836 10f 0 -[DumpSymbols dealloc] -4836 13 1145 3 -4849 1c 1146 3 -4865 1c 1147 3 -4881 1c 1148 3 -489d 1c 1149 3 -48b9 1c 1150 3 -48d5 1c 1151 3 -48f1 25 1152 3 -4916 29 1154 3 -493f 6 1155 3 -4945 1 1155 3 -FUNC 4946 512 0 -[DumpSymbols loadDWARFSymbolInfo:offset:] -4946 17 402 3 -495d 9 405 3 -4966 10 406 3 -4976 2b 408 3 -49a1 38 409 3 -49d9 3a 410 3 -4a13 2e 411 3 -4a41 31 416 3 -4a72 e 418 3 -4a80 24 420 3 -4aa4 5 422 3 -4aa9 b 424 3 -4ab4 b 425 3 -4abf e 426 3 -4acd 2b 427 3 -4af8 2b 428 3 -4b23 2c 431 3 -4b4f 52 439 3 -4ba1 34 444 3 -4bd5 1a 446 3 -4bef 21 451 3 -4c10 1e 452 3 -4c2e 21 453 3 -4c4f 40 422 3 -4c8f 6 453 3 -4c95 170 422 3 -4e05 43 456 3 -4e48 10 457 3 -FUNC 4e58 4fd 0 -[DumpSymbols generateSectionDictionary:] -4e58 18 663 3 -4e70 10 665 3 -4e80 2e 666 3 -4eae 9 668 3 -4eb7 2b 669 3 -4ee2 7 670 3 -4ee9 2e 672 3 -4f17 d 676 3 -4f24 32 678 3 -4f56 29 680 3 -4f7f a 684 3 -4f89 3c 685 3 -4fc5 31 688 3 -4ff6 5d 689 3 -5053 26 692 3 -5079 21 694 3 -509a c 698 3 -50a6 e 699 3 -50b4 6 700 3 -50ba 9 701 3 -50c3 2e 702 3 -50f1 c 704 3 -50fd 3c 706 3 -5139 66 709 3 -519f 1c 712 3 -51bb fb 714 3 -52b6 6 717 3 -52bc 5 718 3 -52c1 19 704 3 -52da 25 714 3 -52ff 2e 722 3 -532d 9 723 3 -5336 17 698 3 -534d 8 725 3 -5355 1 725 3 -FUNC 5356 24a 0 -[DumpSymbols getSectionMapForArchitecture:] -5356 14 643 3 -536a 43 645 3 -53ad 1a 648 3 -53c7 1c 645 3 -53e3 18 648 3 -53fb 40 650 3 -543b 20 651 3 -545b 17 652 3 -5472 16 651 3 -5488 cb 652 3 -5553 11 654 3 -5564 32 657 3 -5596 a 658 3 -FUNC 55a0 3fe 0 -[DumpSymbols initWithContentsOfFile:] -55a0 14 1056 3 -55b4 3b 1057 3 -55ef 44 1059 3 -5633 17 1060 3 -564a c 1061 3 -5656 1f 1064 3 -5675 2b 1067 3 -56a0 a 1069 3 -56aa 35 1083 3 -56df 2 1087 3 -56e1 1a 1088 3 -56fb 3d 1087 3 -5738 33 1092 3 -576b 6 1094 3 -5771 e 1095 3 -577f 17 1096 3 -5796 c 1097 3 -57a2 1c 1101 3 -57be 1f 1103 3 -57dd 18 1104 3 -57f5 23 1107 3 -5818 25 1109 3 -583d 1c 1107 3 -5859 17 1110 3 -5870 c 1111 3 -587c 2a 1115 3 -58a6 8 1116 3 -58ae a 1118 3 -58b8 9 1119 3 -58c1 d 1122 3 -58ce 29 1124 3 -58f7 20 1126 3 -5917 20 1128 3 -5937 57 1132 3 -598e 9 1136 3 -5997 7 1137 3 -FUNC 599e d74 0 -[DumpSymbols outputSymbolFile:] -599e 18 877 3 -59b6 2e 879 3 -59e4 30 880 3 -5a14 5d 882 3 -5a71 30 883 3 -5aa1 5d 885 3 -5afe 2e 888 3 -5b2c 38 891 3 -5b64 46 892 3 -5baa 26 893 3 -5bd0 20 895 3 -5bf0 20 904 3 -5c10 30 898 3 -5c40 f 899 3 -5c4f 1e 904 3 -5c6d 17 907 3 -5c84 17 908 3 -5c9b 44 911 3 -5cdf 44 914 3 -5d23 a 917 3 -5d2d 36 921 3 -5d63 30 923 3 -5d93 9 18 4 -5d9c 9 19 4 -5da5 c 20 4 -5db1 56 923 3 -5e07 74 925 3 -5e7b f 927 3 -5e8a 44 932 3 -5ece 20 933 3 -5eee c 934 3 -5efa 4e 935 3 -5f48 41 936 3 -5f89 f 937 3 -5f98 14 934 3 -5fac 7 941 3 -5fb3 14 942 3 -5fc7 14 943 3 -5fdb 1d 946 3 -5ff8 c 948 3 -6004 24 949 3 -6028 29 950 3 -6051 9 953 3 -605a 28 954 3 -6082 2e 955 3 -60b0 1e 957 3 -60ce 7 959 3 -60d5 26 962 3 -60fb 2a 963 3 -6125 2a 964 3 -614f 6 966 3 -6155 2a 967 3 -617f e 971 3 -618d 43 972 3 -61d0 4c 974 3 -621c 8 975 3 -6224 2e 979 3 -6252 2e 982 3 -6280 2e 985 3 -62ae 2e 988 3 -62dc 2e 991 3 -630a 2e 994 3 -6338 2e 997 3 -6366 2e 1000 3 -6394 54 1004 3 -63e8 c 1005 3 -63f4 e 1007 3 -6402 27 1008 3 -6429 8 1009 3 -6431 34 1010 3 -6465 24 1012 3 -6489 2 1013 3 -648b 2a 1017 3 -64b5 a 1019 3 -64bf 14 1020 3 -64d3 1d 1021 3 -64f0 a 1025 3 -64fa 32 1026 3 -652c 33 1028 3 -655f c 1029 3 -656b 55 1034 3 -65c0 f 1036 3 -65cf 16 1040 3 -65e5 61 1041 3 -6646 f 1043 3 -6655 47 1046 3 -669c c 1048 3 -66a8 11 948 3 -66b9 4e 1052 3 -6707 b 1053 3 -FUNC 6712 11 0 operator new(unsigned long, void*) -6712 c 94 5 -671e 5 94 5 -6723 1 94 5 -FUNC 6724 e 0 operator delete(void*, void*) -6724 c 98 5 -6730 2 98 5 -673e 7 76 6 -6745 2 77 6 -6747 1a 78 6 -6761 d 77 6 -676e 3 79 6 -6771 2 80 6 -6773 1 80 6 -6780 d 95 6 -678d 1 95 6 -678e 13 127 74 -67a1 2a 127 74 -67cb 1 127 74 -67cc 13 127 74 -67df 2a 127 74 -6809 1 127 74 -680a 13 127 74 -681d 2a 127 74 -6847 1 127 74 -FUNC 6848 e 0 dwarf2reader::LineInfoHandler::DefineDir(std::string const&, unsigned int) -6848 c 131 7 -6854 2 131 74 -FUNC 6856 26 0 dwarf2reader::LineInfoHandler::DefineFile(std::string const&, int, unsigned int, unsigned long long, unsigned long long) -6856 24 142 7 -687a 2 142 74 -FUNC 687c 1a 0 dwarf2reader::LineInfoHandler::AddLine(unsigned long long, unsigned int, unsigned int, unsigned int) -687c 18 150 7 -6894 2 150 74 -6896 12 299 74 -68a8 12 299 74 -68ba 13 301 74 -68cd 2a 301 74 -68f7 1 301 74 -68f8 13 301 74 -690b 2a 301 74 -6935 1 301 74 -6936 13 301 74 -6949 2a 301 74 -6973 1 301 74 -FUNC 6974 44 0 dwarf2reader::Dwarf2Handler::StartCompilationUnit(unsigned long long, unsigned char, unsigned char, unsigned long long, unsigned char) -6974 39 308 7 -69ad b 308 74 -FUNC 69b8 1f 0 dwarf2reader::Dwarf2Handler::StartDIE(unsigned long long, dwarf2reader::DwarfTag, std::list, std::allocator > > const&) -69b8 18 314 7 -69d0 7 314 74 -69d7 1 314 74 -FUNC 69d8 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeUnsigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, unsigned long long) -69d8 24 323 7 -69fc 2 323 74 -FUNC 69fe 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeSigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, long long) -69fe 24 332 7 -6a22 2 332 74 -FUNC 6a24 26 0 dwarf2reader::Dwarf2Handler::ProcessAttributeBuffer(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, char const*, unsigned long long) -6a24 24 345 7 -6a48 2 345 74 -FUNC 6a4a 1a 0 dwarf2reader::Dwarf2Handler::ProcessAttributeString(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, std::string const&) -6a4a 18 354 7 -6a62 2 354 74 -FUNC 6a64 1a 0 dwarf2reader::Dwarf2Handler::EndDIE(unsigned long long) -6a64 18 360 7 -6a7c 2 360 74 -6a7e c 44 8 -6a8a 2 44 8 -6a8c 13 55 32 -6a9f 35 55 32 -6ad4 13 91 32 -6ae7 73 96 32 -6b5a 13 98 32 -6b6d 35 98 32 -6bae 1a 75 3 -6bc8 2 76 3 -FUNC 6bca 20 0 std::_Rb_tree_const_iterator >::operator!=(std::_Rb_tree_const_iterator > const&) const -6bca c 287 10 -6bd6 14 288 40 -FUNC 6bea 16 0 std::_Rb_tree_const_iterator >::operator->() const -6bea c 249 10 -6bf6 a 250 40 -6c0c 7 614 72 -6c13 1 614 72 -6c14 c 241 40 -6c20 c 242 40 -FUNC 6c2c 16 0 std::_Rb_tree_const_iterator >::operator*() const -6c2c c 245 11 -6c38 a 246 40 -6c42 c 241 40 -6c4e c 242 40 -FUNC 6c5a 20 0 std::_Rb_tree_const_iterator > >::operator!=(std::_Rb_tree_const_iterator > > const&) const -6c5a c 287 11 -6c66 14 288 40 -FUNC 6c7a 16 0 std::_Rb_tree_const_iterator > >::operator->() const -6c7a c 249 11 -6c86 a 250 40 -6c90 c 185 34 -6c9c 18 186 34 -6cc0 14 204 34 -6cd4 c 69 70 -6ce0 d 69 70 -6ced 1 69 70 -6cee c 89 70 -6cfa 20 90 70 -6d1a c 69 70 -6d26 d 69 70 -6d33 1 69 70 -6d34 c 69 70 -6d40 d 69 70 -6d4d 1 69 70 -FUNC 6d4e 25 0 std::_Rb_tree_const_iterator >::operator++() -6d4e c 253 13 -6d5a 14 255 40 -6d6e 5 256 40 -6d73 1 256 40 -FUNC 6d74 25 0 std::_Rb_tree_const_iterator > >::operator++() -6d74 c 253 13 -6d80 14 255 40 -6d94 5 256 40 -6d99 1 256 40 -FUNC 6d9a 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_begin() -6d9a c 461 13 -6da6 8 462 40 -FUNC 6dae 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_begin() -6dae c 461 13 -6dba 8 462 40 -6dc2 c 65 68 -6dce 2 65 68 -6dd0 c 72 68 -6ddc 2 72 68 -6dde c 97 69 -6dea d 97 69 -6df7 1 97 69 -6df8 c 105 69 -6e04 d 105 69 -6e11 1 105 69 -6e12 c 105 69 -6e1e d 105 69 -6e2b 1 105 69 -6e2c c 67 68 -6e38 2 67 68 -6e3a c 99 69 -6e46 14 100 69 -6e5a c 99 69 -6e66 14 100 69 -FUNC 6e7a 2b 0 std::_Vector_base >::get_allocator() const -6e7a 10 93 16 -6e8a 1b 94 71 -6ea5 1 94 71 -6ea6 c 65 68 -6eb2 2 65 68 -6eb4 c 72 68 -6ec0 2 72 68 -6ec2 c 97 69 -6ece d 97 69 -6edb 1 97 69 -6edc c 105 69 -6ee8 d 105 69 -6ef5 1 105 69 -6ef6 c 105 69 -6f02 d 105 69 -6f0f 1 105 69 -6f10 c 67 68 -6f1c 2 67 68 -6f1e c 99 69 -6f2a 14 100 69 -6f3e c 99 69 -6f4a 14 100 69 -FUNC 6f5e 2b 0 std::_Vector_base >::get_allocator() const -6f5e 10 93 16 -6f6e 1b 94 71 -6f89 1 94 71 -6f8a c 603 72 -6f96 c 603 72 -FUNC 6fa2 23 0 std::vector >::begin() -6fa2 c 333 16 -6fae 17 334 71 -6fc5 1 334 71 -FUNC 6fc6 26 0 std::vector >::end() -6fc6 c 351 16 -6fd2 1a 352 71 -6ff8 5 666 72 -6ffd 1 666 72 -6ffe c 608 72 -700a 14 609 72 -702a 5 666 72 -702f 1 666 72 -FUNC 7030 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -7030 d 693 16 -703d 28 694 72 -7065 1 694 72 -7066 c 603 72 -7072 c 603 72 -708a 27 629 72 -70b1 1 629 72 -70b2 c 84 70 -70be 1f 85 70 -70dd 1 85 70 -FUNC 70de 32 0 std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*> std::make_pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*>(std::string, __gnu_cxx::hash_map, __gnu_cxx::hash, std::equal_to, std::allocator > >*) -70de 10 144 16 -70ee 22 145 70 -711c a 190 34 -7132 d 194 34 -713f 1 194 34 -7140 c 84 70 -714c 17 85 70 -7163 1 85 70 -FUNC 7164 2d 0 std::pair std::make_pair(char const*, unsigned long) -7164 c 144 16 -7170 21 145 70 -7191 1 145 70 -7192 c 84 70 -719e 1d 85 70 -71bb 1 85 70 -FUNC 71bc 30 0 std::pair > std::make_pair >(char*, std::pair) -71bc 10 144 16 -71cc 20 145 70 -71ec c 89 70 -71f8 20 90 70 -7218 d 89 70 -7225 70 90 70 -7295 1 90 70 -FUNC 7296 12 0 std::iterator_traits::iterator_category std::__iterator_category(unsigned long const* const&) -7296 c 164 17 -72a2 6 165 17 -FUNC 72a8 1d 0 std::iterator_traits::difference_type std::__distance(unsigned long const*, unsigned long const*, std::random_access_iterator_tag) -72a8 c 92 18 -72b4 11 97 18 -72c5 1 97 18 -FUNC 72c6 33 0 std::iterator_traits::difference_type std::distance(unsigned long const*, unsigned long const*) -72c6 c 114 18 -72d2 27 118 18 -72f9 1 118 18 -FUNC 72fa 20 0 void std::__advance(unsigned long const*&, int, std::random_access_iterator_tag) -72fa c 150 18 -7306 14 155 18 -FUNC 731a 33 0 void std::advance(unsigned long const*&, int) -731a c 172 18 -7326 27 175 18 -734d 1 175 18 -FUNC 734e 7a 0 unsigned long const* std::lower_bound(unsigned long const*, unsigned long const*, unsigned long const&) -734e c 2625 19 -735a 15 2642 19 -736f 2 2646 19 -7371 8 2648 19 -7379 6 2649 19 -737f 12 2650 19 -7391 e 2651 19 -739f 6 2653 19 -73a5 4 2654 19 -73a9 e 2655 19 -73b7 6 2658 19 -73bd 6 2646 19 -73c3 5 2660 19 -73db b 227 34 -73e6 e 228 34 -73f4 1c 229 34 -7410 20 230 34 -7430 6 231 34 -7436 c 72 68 -7442 2 72 68 -7444 c 105 69 -7450 d 105 69 -745d 1 105 69 -745e c 105 69 -746a d 105 69 -7477 1 105 69 -7478 c 80 71 -7484 d 80 71 -7491 1 80 71 -7492 c 67 68 -749e 2 67 68 -74a0 c 99 69 -74ac 14 100 69 -FUNC 74c0 2b 0 std::_Vector_base >::get_allocator() const -74c0 10 93 19 -74d0 1b 94 71 -74eb 1 94 71 -74ec c 238 40 -74f8 a 239 40 -FUNC 7502 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin() const -7502 c 585 19 -750e 1a 588 40 -FUNC 7528 19 0 std::map, std::allocator > >::begin() const -7528 c 243 20 -7534 d 244 45 -7541 1 244 45 -FUNC 7542 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::end() const -7542 c 596 20 -754e 1a 597 40 -FUNC 7568 19 0 std::map, std::allocator > >::end() const -7568 c 260 20 -7574 d 261 45 -7581 1 261 45 -7582 c 65 68 -758e 2 65 68 -7590 c 72 68 -759c 2 72 68 -759e c 97 69 -75aa d 97 69 -75b7 1 97 69 -75b8 c 105 69 -75c4 d 105 69 -75d1 1 105 69 -75d2 c 72 68 -75de 2 72 68 -75e0 c 105 69 -75ec d 105 69 -75f9 1 105 69 -75fa c 397 40 -7606 d 397 40 -7613 1 397 40 -7614 c 105 69 -7620 d 105 69 -762d 1 105 69 -FUNC 762e 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_right(std::_Rb_tree_node_base*) -762e c 496 20 -763a 8 497 40 -FUNC 7642 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_left(std::_Rb_tree_node_base*) -7642 c 488 20 -764e 8 489 40 -7656 c 65 68 -7662 2 65 68 -7664 c 72 68 -7670 2 72 68 -7672 c 97 69 -767e d 97 69 -768b 1 97 69 -768c c 105 69 -7698 d 105 69 -76a5 1 105 69 -76a6 c 72 68 -76b2 2 72 68 -76b4 c 105 69 -76c0 d 105 69 -76cd 1 105 69 -76ce c 397 40 -76da d 397 40 -76e7 1 397 40 -76e8 c 105 69 -76f4 d 105 69 -7701 1 105 69 -FUNC 7702 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_right(std::_Rb_tree_node_base*) -7702 c 496 20 -770e 8 497 40 -FUNC 7716 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_left(std::_Rb_tree_node_base*) -7716 c 488 20 -7722 8 489 40 -772a c 84 71 -7736 2f 85 71 -7765 2 86 71 -7767 1 86 71 -7768 c 80 71 -7774 d 80 71 -7781 1 80 71 -7782 c 96 71 -778e 12 97 71 -77a0 2 98 71 -77a2 c 84 71 -77ae 2f 85 71 -77dd 2 86 71 -77df 1 86 71 -77e0 c 80 71 -77ec d 80 71 -77f9 1 80 71 -77fa c 96 71 -7806 12 97 71 -7818 2 98 71 -7826 d 107 68 -7833 1 107 68 -FUNC 7834 2e 0 void std::_Destroy >(std::string*, std::string*, std::allocator) -7834 c 171 21 -7840 2 173 73 -7842 12 174 73 -7854 c 173 73 -7860 2 174 73 -7862 c 167 40 -786e a 168 40 -FUNC 7878 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::begin() -7878 c 581 21 -7884 1a 582 40 -FUNC 789e 19 0 std::map, std::allocator > >::begin() -789e c 234 21 -78aa d 235 45 -78b7 1 235 45 -FUNC 78b8 26 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::end() -78b8 c 592 21 -78c4 1a 593 40 -FUNC 78de 19 0 std::map, std::allocator > >::end() -78de c 251 21 -78ea d 252 45 -78f7 1 252 45 -78f8 c 167 40 -7904 a 168 40 -FUNC 790e 26 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::begin() -790e c 581 21 -791a 1a 582 40 -FUNC 7934 19 0 std::map, std::less, std::allocator > > >::begin() -7934 c 234 21 -7940 d 235 45 -794d 1 235 45 -FUNC 794e 26 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::end() -794e c 592 21 -795a 1a 593 40 -FUNC 7974 19 0 std::map, std::less, std::allocator > > >::end() -7974 c 251 21 -7980 d 252 45 -798d 1 252 45 -FUNC 798e 11 0 std::_Select1st, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >::operator()(std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*>&) const -798e c 546 22 -799a 5 547 41 -799f 1 547 41 -79a0 c 128 34 -79ac 13 129 34 -79bf 1 129 34 -79cc 22 396 34 -79fa d 199 42 -7a07 1 199 42 -7a08 c 65 68 -7a14 2 65 68 -7a16 c 72 68 -7a22 2 72 68 -7a24 c 97 69 -7a30 d 97 69 -7a3d 1 97 69 -7a3e c 105 69 -7a4a d 105 69 -7a57 1 105 69 -7a58 c 65 68 -7a64 2 65 68 -7a66 c 72 68 -7a72 2 72 68 -7a74 c 105 69 -7a80 d 105 69 -7a8d 1 105 69 -7a8e c 97 69 -7a9a d 97 69 -7aa7 1 97 69 -7aa8 c 72 68 -7ab4 2 72 68 -7ab6 c 105 69 -7ac2 d 105 69 -7acf 1 105 69 -7adc d 94 68 -7ae9 1 94 68 -FUNC 7aea 2f 0 std::_Vector_base >::_M_deallocate(dwarf2reader::CompilationUnit::Abbrev*, unsigned long) -7aea c 120 23 -7af6 6 122 71 -7afc 1d 123 71 -7b19 1 123 71 -7b1a c 108 71 -7b26 43 109 71 -7b69 1 109 71 -7b6a c 65 68 -7b76 2 65 68 -7b78 c 103 69 -7b84 d 103 69 -7b91 1 103 69 -7b92 c 65 68 -7b9e 2 65 68 -7ba0 c 103 69 -7bac d 103 69 -7bb9 1 103 69 -7bc6 d 94 68 -7bd3 1 94 68 -FUNC 7bd4 2f 0 std::_Vector_base >::_M_deallocate(dwarf2reader::SourceFileInfo*, unsigned long) -7bd4 c 120 23 -7be0 6 122 71 -7be6 1d 123 71 -7c03 1 123 71 -7c04 c 108 71 -7c10 43 109 71 -7c53 1 109 71 -7c54 c 188 71 -7c60 12 189 71 -7c72 2 190 71 -7c74 c 35 32 -7c80 d 35 32 -7c8d 1 35 32 -7c9a d 107 68 -7ca7 1 107 68 -FUNC 7ca8 2e 0 void std::_Destroy >(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, std::allocator) -7ca8 c 171 23 -7cb4 2 173 73 -7cb6 12 174 73 -7cc8 c 173 73 -7cd4 2 174 73 -7cd6 d 272 71 -7ce3 8c 273 71 -7d6f 1 273 71 -7d7c d 94 68 -7d89 1 94 68 -FUNC 7d8a 2f 0 std::_Vector_base >::_M_deallocate(std::string*, unsigned long) -7d8a c 120 23 -7d96 6 122 71 -7d9c 1d 123 71 -7db9 1 123 71 -7dba c 108 71 -7dc6 3d 109 71 -7e03 1 109 71 -7e04 c 188 71 -7e10 12 189 71 -7e22 2 190 71 -7e24 d 272 71 -7e31 8c 273 71 -7ebd 1 273 71 -7eca 2b 596 34 -7ef5 1 596 34 -7f02 7 614 72 -7f09 1 614 72 -7f0a c 65 68 -7f16 2 65 68 -7f18 c 72 68 -7f24 2 72 68 -7f26 c 103 69 -7f32 d 103 69 -7f3f 1 103 69 -7f40 c 105 69 -7f4c d 105 69 -7f59 1 105 69 -7f5a c 65 68 -7f66 2 65 68 -7f68 c 72 68 -7f74 2 72 68 -7f76 c 103 69 -7f82 d 103 69 -7f8f 1 103 69 -7f90 c 105 69 -7f9c d 105 69 -7fa9 1 105 69 -7faa c 105 69 -7fb6 d 105 69 -7fc3 1 105 69 -7fd0 d 575 34 -7fdd 1 575 34 -7fea d 575 34 -7ff7 1 575 34 -FUNC 7ff8 11 0 std::_Select1st, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >::operator()(std::pair, __gnu_cxx::hash, std::equal_to, std::allocator > >*> const&) const -7ff8 c 550 23 -8004 5 551 41 -8009 1 551 41 -8016 2f 600 34 -8045 1 600 34 -8046 c 84 70 -8052 1e 85 70 -FUNC 8070 11 0 std::_Select1st > >::operator()(std::pair >&) const -8070 c 546 23 -807c 5 547 41 -8081 1 547 41 -FUNC 8082 11 0 std::_Select1st > >::operator()(std::pair > const&) const -8082 c 550 23 -808e 5 551 41 -8093 1 551 41 -8094 c 128 34 -80a0 13 129 34 -80b3 1 129 34 -80b4 c 84 70 -80c0 1e 85 70 -80de c 65 68 -80ea 2 65 68 -80ec c 103 69 -80f8 d 103 69 -8105 1 103 69 -8106 c 65 68 -8112 2 65 68 -8114 c 72 68 -8120 2 72 68 -8122 c 105 69 -812e d 105 69 -813b 1 105 69 -813c c 103 69 -8148 d 103 69 -8155 1 103 69 -8156 c 105 69 -8162 d 105 69 -816f 1 105 69 -8170 c 80 71 -817c d 80 71 -8189 1 80 71 -818a c 67 68 -8196 2 67 68 -8198 c 99 69 -81a4 14 100 69 -FUNC 81b8 2b 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::get_allocator() const -81b8 10 93 23 -81c8 1b 94 71 -81e3 1 94 71 -81e4 c 99 69 -81f0 14 100 69 -8210 2 107 68 -FUNC 8212 2e 0 void std::_Destroy<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -8212 c 171 23 -821e 2 173 73 -8220 12 174 73 -8232 c 173 73 -823e 2 174 73 -824c d 107 68 -8259 1 107 68 -825a c 67 68 -8266 2 67 68 -8268 c 99 69 -8274 14 100 69 -8288 c 403 40 -8294 1c 404 40 -82b0 a 406 40 -82ba a 407 40 -82c4 c 408 40 -82d0 e 409 40 -82de c 553 40 -82ea 36 554 40 -8320 2 555 40 -8322 c 103 69 -832e d 103 69 -833b 1 103 69 -FUNC 833c 2b 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::get_allocator() const -833c 10 350 23 -834c 1b 351 40 -8367 1 351 40 -8368 c 69 70 -8374 2 69 70 -8382 d 107 68 -838f 1 107 68 -839c d 94 68 -83a9 1 94 68 -FUNC 83aa 2a 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_put_node(std::_Rb_tree_node >*) -83aa c 359 23 -83b6 1e 360 40 -FUNC 83d4 59 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::destroy_node(std::_Rb_tree_node >*) -83d4 d 387 23 -83e1 35 389 40 -8416 17 390 40 -842d 1 390 40 -FUNC 842e 56 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) -842e c 1051 23 -843a 2 1054 40 -843c 1a 1056 40 -8456 e 1057 40 -8464 12 1058 40 -8476 6 1059 40 -847c 6 1054 40 -8482 2 1059 40 -8484 d 569 40 -8491 58 570 40 -84e9 1 570 40 -84ea c 147 45 -84f6 31 148 45 -8527 1 148 45 -8528 c 92 45 -8534 d 92 45 -8541 1 92 45 -8542 c 67 68 -854e 2 67 68 -8550 c 99 69 -855c 14 100 69 -8570 c 403 40 -857c 1c 404 40 -8598 a 406 40 -85a2 a 407 40 -85ac c 408 40 -85b8 e 409 40 -85c6 c 553 40 -85d2 36 554 40 -8608 2 555 40 -860a c 103 69 -8616 d 103 69 -8623 1 103 69 -FUNC 8624 2b 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::get_allocator() const -8624 10 350 23 -8634 1b 351 40 -864f 1 351 40 -8650 c 69 70 -865c d 69 70 -8669 1 69 70 -866a c 69 70 -8676 30 69 70 -86b2 d 107 68 -86bf 1 107 68 -86cc d 94 68 -86d9 1 94 68 -FUNC 86da 2a 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_put_node(std::_Rb_tree_node > >*) -86da c 359 23 -86e6 1e 360 40 -FUNC 8704 59 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::destroy_node(std::_Rb_tree_node > >*) -8704 d 387 23 -8711 35 389 40 -8746 17 390 40 -875d 1 390 40 -FUNC 875e 56 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_erase(std::_Rb_tree_node > >*) -875e c 1051 23 -876a 2 1054 40 -876c 1a 1056 40 -8786 e 1057 40 -8794 12 1058 40 -87a6 6 1059 40 -87ac 6 1054 40 -87b2 2 1059 40 -87b4 d 569 40 -87c1 58 570 40 -8819 1 570 40 -881a c 147 45 -8826 31 148 45 -8857 1 148 45 -8858 c 92 45 -8864 d 92 45 -8871 1 92 45 -8872 c 603 72 -887e c 603 72 -FUNC 888a 23 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::begin() -888a c 333 23 -8896 17 334 71 -88ad 1 334 71 -88ba 2a 654 72 -FUNC 88e4 42 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::operator[](unsigned long) -88e4 c 494 23 -88f0 36 495 71 -FUNC 8926 26 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::end() -8926 c 351 23 -8932 1a 352 71 -FUNC 894c 28 0 bool std::operator==, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&) -894c c 2115 24 -8958 1c 2116 37 -FUNC 8974 23 0 std::equal_to::operator()(std::string const&, std::string const&) const -8974 c 199 24 -8980 17 200 41 -8997 1 200 41 -8998 c 80 71 -89a4 d 80 71 -89b1 1 80 71 -89b2 c 67 68 -89be 2 67 68 -89c0 c 99 69 -89cc 14 100 69 -FUNC 89e0 2b 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::get_allocator() const -89e0 10 93 24 -89f0 1b 94 71 -8a0b 1 94 71 -8a0c c 99 69 -8a18 14 100 69 -8a2c c 84 71 -8a38 2f 85 71 -8a67 2 86 71 -8a69 1 86 71 -8a6a c 96 71 -8a76 12 97 71 -8a88 2 98 71 -8a96 2 107 68 -FUNC 8a98 2e 0 void std::_Destroy<__gnu_cxx::_Hashtable_node > >**, std::allocator<__gnu_cxx::_Hashtable_node > >*> >(__gnu_cxx::_Hashtable_node > >**, __gnu_cxx::_Hashtable_node > >**, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -8a98 c 171 24 -8aa4 2 173 73 -8aa6 12 174 73 -8ab8 c 173 73 -8ac4 2 174 73 -FUNC 8ac6 13 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::max_size() const -8ac6 c 407 24 -8ad2 7 408 71 -8ad9 1 408 71 -8ada c 603 72 -8ae6 c 603 72 -FUNC 8af2 26 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::end() -8af2 c 351 24 -8afe 1a 352 71 -FUNC 8b18 23 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::begin() -8b18 c 333 24 -8b24 17 334 71 -8b3b 1 334 71 -8b48 2a 654 72 -8b7e 7 614 72 -8b85 1 614 72 -FUNC 8b86 42 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::operator[](unsigned long) -8b86 c 494 24 -8b92 36 495 71 -8bd4 d 107 68 -8be1 1 107 68 -FUNC 8be2 28 0 void std::swap<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**&, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**&) -8be2 c 92 25 -8bee 8 97 61 -8bf6 a 98 61 -8c00 a 99 61 -FUNC 8c0a 50 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::swap(std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >&) -8c0a c 733 25 -8c16 12 735 71 -8c28 18 736 71 -8c40 1a 737 71 -8c66 2b 596 34 -8c91 1 596 34 -8c9e 2f 600 34 -8ccd 1 600 34 -FUNC 8cce 28 0 void std::swap<__gnu_cxx::_Hashtable_node > >**>(__gnu_cxx::_Hashtable_node > >**&, __gnu_cxx::_Hashtable_node > >**&) -8cce c 92 25 -8cda 8 97 61 -8ce2 a 98 61 -8cec a 99 61 -FUNC 8cf6 50 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::swap(std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >&) -8cf6 c 733 25 -8d02 12 735 71 -8d14 18 736 71 -8d2c 1a 737 71 -8d46 c 84 71 -8d52 2f 85 71 -8d81 2 86 71 -8d83 1 86 71 -8d84 c 96 71 -8d90 12 97 71 -8da2 2 98 71 -FUNC 8da4 13 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::max_size() const -8da4 c 407 25 -8db0 7 408 71 -8db7 1 408 71 -8dc4 d 94 68 -8dd1 1 94 68 -FUNC 8dd2 2f 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_deallocate(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long) -8dd2 c 120 25 -8dde 6 122 71 -8de4 1d 123 71 -8e01 1 123 71 -8e02 c 108 71 -8e0e 3d 109 71 -8e4b 1 109 71 -8e4c c 272 71 -8e58 4b 273 71 -8ea3 1 273 71 -8ea4 c 188 71 -8eb0 12 189 71 -8ec2 2 190 71 -8ec4 c 603 72 -8ed0 c 603 72 -FUNC 8edc 2b 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::begin() const -8edc c 342 25 -8ee8 1f 343 71 -8f07 1 343 71 -FUNC 8f08 2c 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::end() const -8f08 c 360 25 -8f14 20 361 71 -8f40 5 666 72 -8f45 1 666 72 -8f53 2b 759 72 -FUNC 8f7e 3c 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::size() const -8f7e c 402 25 -8f8a 30 403 71 -8fc6 26 588 34 -8ff8 15 511 34 -900d 79 513 34 -9086 21 517 34 -90a7 1 517 34 -90b4 14 225 42 -90d4 26 592 34 -FUNC 90fa 49 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::capacity() const -90fa c 449 25 -9106 3d 451 71 -9143 1 451 71 -9144 c 103 69 -9150 d 103 69 -915d 1 103 69 -916e 1b 286 34 -9189 1 286 34 -9196 d 94 68 -91a3 1 94 68 -91b0 1e 301 34 -91db 56 622 34 -9231 17 623 34 -9254 9 1080 34 -925d 1a 1082 34 -9277 2 1083 34 -9279 8 1085 34 -9281 12 1086 34 -9293 6 1087 34 -9299 6 1083 34 -929f 1b 1089 34 -92ba 1d 1080 34 -92d7 c 1091 34 -92e3 1 1091 34 -92e4 d 360 34 -92f1 77 361 34 -9368 c 93 42 -9374 d 93 42 -9381 1 93 42 -9382 c 72 68 -938e 2 72 68 -9390 c 105 69 -939c d 105 69 -93a9 1 105 69 -93aa c 301 66 -93b6 d 301 66 -93c3 1 301 66 -93d0 d 94 68 -93dd 1 94 68 -FUNC 93de 2f 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_deallocate(__gnu_cxx::_Hashtable_node > >**, unsigned long) -93de c 120 26 -93ea 6 122 71 -93f0 1d 123 71 -940d 1 123 71 -940e c 108 71 -941a 3d 109 71 -9457 1 109 71 -9458 c 188 71 -9464 12 189 71 -9476 2 190 71 -9478 c 272 71 -9484 4b 273 71 -94cf 1 273 71 -94d0 c 603 72 -94dc c 603 72 -FUNC 94e8 2b 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::begin() const -94e8 c 342 26 -94f4 1f 343 71 -9513 1 343 71 -FUNC 9514 2c 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::end() const -9514 c 360 26 -9520 20 361 71 -954c 2d 662 72 -9579 1 662 72 -FUNC 957a 2d 0 unsigned long const& std::max(unsigned long const&, unsigned long const&) -957a c 206 26 -9586 e 211 61 -9594 8 212 61 -959c b 213 61 -95a7 1 213 61 -95b4 19 650 72 -95cd 1 650 72 -95da 5 666 72 -95df 1 666 72 -95ed 2b 759 72 -9624 5 666 72 -9629 1 666 72 -9637 2b 759 72 -FUNC 9662 49 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::capacity() const -9662 c 449 26 -966e 3d 451 71 -96ab 1 451 71 -FUNC 96ac 3c 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::size() const -96ac c 402 26 -96b8 30 403 71 -96f4 26 588 34 -9726 26 592 34 -974c c 103 69 -9758 d 103 69 -9765 1 103 69 -9776 1b 286 34 -9791 1 286 34 -979e d 94 68 -97ab 1 94 68 -97b8 1e 301 34 -97e3 56 622 34 -9839 17 623 34 -985c 9 1080 34 -9865 1a 1082 34 -987f 2 1083 34 -9881 8 1085 34 -9889 12 1086 34 -989b 6 1087 34 -98a1 6 1083 34 -98a7 1b 1089 34 -98c2 1d 1080 34 -98df c 1091 34 -98eb 1 1091 34 -98ec d 360 34 -98f9 77 361 34 -9970 c 69 70 -997c 20 69 70 -99a9 5c 104 68 -9a05 1 104 68 -9a06 c 69 70 -9a12 2c 69 70 -9a4b 5c 104 68 -9aa7 1 104 68 -9ab4 2d 662 72 -9ae1 1 662 72 -9aee 19 650 72 -9b07 1 650 72 -9b14 5 666 72 -9b19 1 666 72 -9b27 2b 759 72 -9b52 c 72 68 -9b5e 2 72 68 -9b60 c 105 69 -9b6c d 105 69 -9b79 1 105 69 -9b7a c 69 70 -9b86 2 69 70 -9b94 d 107 68 -9ba1 1 107 68 -9bae d 94 68 -9bbb 1 94 68 -FUNC 9bbc 2a 0 std::_List_base, std::allocator > >::_M_put_node(std::_List_node >*) -9bbc c 315 26 -9bc8 1e 316 66 -FUNC 9be6 35 0 bool __gnu_cxx::operator!=<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > > const&, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > > const&) -9be6 d 699 26 -9bf3 28 700 72 -9c1b 1 700 72 -9c28 d 623 72 -9c35 5 624 72 -FUNC 9c3a 4b 0 void std::__fill::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >* const&) -9c3a c 539 61 -9c46 8 541 61 -9c4e 2 542 61 -9c50 12 543 61 -9c62 21 542 61 -9c83 2 543 61 -9c85 1 543 61 -FUNC 9c86 2b 0 void std::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::_Hashtable_node > >* const&) -9c86 c 560 26 -9c92 4 567 61 -9c96 1b 568 61 -9cb1 1 568 61 -FUNC 9cb2 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, std::allocator<__gnu_cxx::_Hashtable_node > >*> >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -9cb2 c 171 26 -9cbe 2 173 73 -9cc0 1a 174 73 -9cda 21 173 73 -9cfb 2 174 73 -9cfd 1 174 73 -9d0a 7 98 68 -9d11 1 98 68 -9d1e 1d 85 68 -9d3b 5 86 68 -9d40 16 88 68 -9d62 1d 297 34 -9d7f 1 297 34 -9d8d e 605 34 -9d9b 9 606 34 -9da4 3c 609 34 -9de0 b 610 34 -9deb 11 609 34 -9dfc b 612 34 -9e07 12 614 34 -9e19 b 615 34 -9e24 13 612 34 -9e37 8 615 34 -9e3f 1 615 34 -9e4d 15 751 34 -9e62 1a 752 34 -9e7c b 754 34 -9e87 49 755 34 -9ed0 3b 756 34 -9f0b 12 754 34 -9f1d 15 758 34 -9f32 8 759 34 -9f3a 1c 760 34 -9f56 f 761 34 -9f65 41 762 34 -9fb2 7 98 68 -9fb9 1 98 68 -9fc6 1d 85 68 -9fe3 5 86 68 -9fe8 17 88 68 -9fff 1 88 68 -a00c 1d 297 34 -a029 1 297 34 -a037 e 605 34 -a045 9 606 34 -a04e 3c 609 34 -a08a b 610 34 -a095 11 609 34 -a0a6 b 612 34 -a0b1 12 614 34 -a0c3 b 615 34 -a0ce 13 612 34 -a0e1 8 615 34 -a0e9 1 615 34 -a0f7 15 751 34 -a10c 1a 752 34 -a126 b 754 34 -a131 49 755 34 -a17a 3b 756 34 -a1b5 12 754 34 -a1c7 15 758 34 -a1dc 8 759 34 -a1e4 1c 760 34 -a200 f 761 34 -a20f 41 762 34 -FUNC a250 35 0 bool __gnu_cxx::operator!=<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > > const&, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > > const&) -a250 d 699 26 -a25d 28 700 72 -a285 1 700 72 -a292 d 623 72 -a29f 5 624 72 -FUNC a2a4 4b 0 void std::__fill::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a2a4 c 539 61 -a2b0 8 541 61 -a2b8 2 542 61 -a2ba 12 543 61 -a2cc 21 542 61 -a2ed 2 543 61 -a2ef 1 543 61 -FUNC a2f0 2b 0 void std::fill<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a2f0 c 560 26 -a2fc 4 567 61 -a300 1b 568 61 -a31b 1 568 61 -FUNC a31c 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, __gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -a31c c 171 26 -a328 2 173 73 -a32a 1a 174 73 -a344 21 173 73 -a365 2 174 73 -a367 1 174 73 -a368 c 65 68 -a374 2 65 68 -a376 c 103 69 -a382 d 103 69 -a38f 1 103 69 -FUNC a390 2b 0 std::_List_base, std::allocator > >::get_allocator() const -a390 10 322 26 -a3a0 1b 324 66 -a3bb 1 324 66 -FUNC a3bc 7b 0 std::_List_base, std::allocator > >::_M_clear() -a3bc d 69 27 -a3c9 8 72 77 -a3d1 2 73 77 -a3d3 6 75 77 -a3d9 8 76 77 -a3e1 35 77 77 -a416 12 78 77 -a428 a 73 77 -a432 5 78 77 -a437 1 78 77 -a438 c 331 66 -a444 18 332 66 -a45c c 392 66 -a468 d 392 66 -a475 1 392 66 -a476 c 211 74 -a482 10 211 74 -a49e d 107 68 -a4ab 1 107 68 -FUNC a4ac 2e 0 void std::_Destroy >(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -a4ac c 171 27 -a4b8 2 173 73 -a4ba 12 174 73 -a4cc c 173 73 -a4d8 2 174 73 -a4da c 272 71 -a4e6 4b 273 71 -a531 1 273 71 -a532 13 196 74 -a545 10 196 74 -a555 2f 197 74 -a584 1a 198 74 -a59e 13 196 74 -a5b1 10 196 74 -a5c1 2f 197 74 -a5f0 1a 198 74 -a616 7 98 68 -a61d 1 98 68 -a62a 1d 85 68 -a647 5 86 68 -a64c 10 88 68 -FUNC a65c 2a 0 std::_Vector_base<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_allocate(unsigned long) -a65c c 116 27 -a668 1e 117 71 -a686 d 100 71 -a693 12 101 71 -a6a5 19 103 71 -a6be b 104 71 -a6c9 3a 105 71 -a703 1 105 71 -a710 7 98 68 -a717 1 98 68 -a724 1d 85 68 -a741 5 86 68 -a746 10 88 68 -FUNC a756 2a 0 std::_Vector_base<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_allocate(unsigned long) -a756 c 116 27 -a762 1e 117 71 -a780 d 100 71 -a78d 12 101 71 -a79f 19 103 71 -a7b8 b 104 71 -a7c3 3a 105 71 -a7fd 1 105 71 -a80b 12 424 61 -a81d 2e 425 61 -a84b 13 426 61 -a86a 4 440 61 -a86e 1b 443 61 -a889 1 443 61 -a898 56 482 61 -a8fa 4 514 61 -a8fe 4 515 61 -a902 1b 517 61 -a91d 1 517 61 -a92a 8 616 61 -a932 2 617 61 -a934 8 618 61 -a93c f 617 61 -a94b 5 619 61 -a95c 4 641 61 -a960 1b 642 61 -a97b 1 642 61 -FUNC a97c 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, __true_type) -a97c c 182 28 -a988 1b 183 79 -a9a3 1 183 79 -FUNC a9a4 2f 0 void std::uninitialized_fill_n<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -a9a4 c 214 28 -a9b0 23 218 79 -a9d3 1 218 79 -FUNC a9d4 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -a9d4 c 308 28 -a9e0 1b 310 79 -a9fb 1 310 79 -a9fc c 200 71 -aa08 19 201 71 -aa21 42 203 71 -aa63 15 205 71 -aa85 11 992 34 -aa96 c 993 34 -aaa2 15 995 34 -aab7 c 996 34 -aac3 4a 998 34 -ab0d f 1001 34 -ab1c 1c 998 34 -ab38 1a 1003 34 -ab52 5 1004 34 -ab57 1f 1007 34 -ab76 1c 1008 34 -ab92 19 1009 34 -abab 19 1010 34 -abc4 1a 1011 34 -abde a 1004 34 -abe8 11 1001 34 -abf9 15 1014 34 -ac0e 13 1028 34 -ac21 b 1016 34 -ac2c 9 1018 34 -ac35 19 1023 34 -ac4e 23 1024 34 -ac71 19 1025 34 -ac8a 1d 1021 34 -aca7 1a 1018 34 -acc1 b 1028 34 -accc b 1016 34 -acd7 1e 1028 34 -acf5 1 1028 34 -ad06 16 438 34 -ad1c 37 439 34 -ad53 1 439 34 -ad64 37 212 42 -ad9b 1 212 42 -ada8 8 616 61 -adb0 2 617 61 -adb2 8 618 61 -adba f 617 61 -adc9 5 619 61 -adda 4 641 61 -adde 1b 642 61 -adf9 1 642 61 -FUNC adfa 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, __true_type) -adfa c 182 28 -ae06 1b 183 79 -ae21 1 183 79 -FUNC ae22 2f 0 void std::uninitialized_fill_n<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -ae22 c 214 28 -ae2e 23 218 79 -ae51 1 218 79 -FUNC ae52 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >*, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::_Hashtable_node > >**, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -ae52 c 308 28 -ae5e 1b 310 79 -ae79 1 310 79 -ae7a c 200 71 -ae86 19 201 71 -ae9f 42 203 71 -aee1 15 205 71 -af03 11 992 34 -af14 c 993 34 -af20 15 995 34 -af35 c 996 34 -af41 4a 998 34 -af8b f 1001 34 -af9a 1c 998 34 -afb6 1a 1003 34 -afd0 5 1004 34 -afd5 1f 1007 34 -aff4 1c 1008 34 -b010 19 1009 34 -b029 19 1010 34 -b042 1a 1011 34 -b05c a 1004 34 -b066 11 1001 34 -b077 15 1014 34 -b08c 13 1028 34 -b09f b 1016 34 -b0aa 9 1018 34 -b0b3 19 1023 34 -b0cc 23 1024 34 -b0ef 19 1025 34 -b108 1d 1021 34 -b125 1a 1018 34 -b13f b 1028 34 -b14a b 1016 34 -b155 1e 1028 34 -b173 1 1028 34 -b184 16 438 34 -b19a 37 439 34 -b1d1 1 439 34 -b1e2 37 212 42 -b219 1 212 42 -b227 12 424 61 -b239 2e 425 61 -b267 13 426 61 -b286 4 440 61 -b28a 1b 443 61 -b2a5 1 443 61 -b2b4 56 482 61 -b316 4 514 61 -b31a 4 515 61 -b31e 1b 517 61 -b339 1 517 61 -b346 8 616 61 -b34e 2 617 61 -b350 12 618 61 -b362 16 617 61 -b378 5 619 61 -b37d 1 619 61 -b38a 4 641 61 -b38e 1b 642 61 -b3a9 1 642 61 -FUNC b3aa 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, __true_type) -b3aa c 182 28 -b3b6 1b 183 79 -b3d1 1 183 79 -FUNC b3d2 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -b3d2 c 214 28 -b3de 23 218 79 -b401 1 218 79 -FUNC b402 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >*, __gnu_cxx::_Hashtable_node > >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&, std::allocator<__gnu_cxx::_Hashtable_node > >*>) -b402 c 308 28 -b40e 1b 310 79 -b429 1 310 79 -b436 8 616 61 -b43e 2 617 61 -b440 12 618 61 -b452 16 617 61 -b468 5 619 61 -b46d 1 619 61 -b47a 4 641 61 -b47e 1b 642 61 -b499 1 642 61 -FUNC b49a 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, __true_type) -b49a c 182 28 -b4a6 1b 183 79 -b4c1 1 183 79 -FUNC b4c2 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -b4c2 c 214 28 -b4ce 23 218 79 -b4f1 1 218 79 -FUNC b4f2 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*>) -b4f2 c 308 28 -b4fe 1b 310 79 -b519 1 310 79 -b526 22 300 61 -b548 11 301 61 -b559 1 301 61 -b566 4 315 61 -b56a 1b 317 61 -b585 1 317 61 -b592 1b 326 61 -b5ad 1 326 61 -b5ba 4 384 61 -b5be 4 385 61 -b5c2 1b 387 61 -b5dd 1 387 61 -b5ea 1b 74 79 -b605 1 74 79 -b612 23 113 79 -b635 1 113 79 -b642 1b 254 79 -b65d 1 254 79 -b66a 15 763 71 -b67f 40 766 71 -b6bf 3 768 71 -b6c2 2 773 71 -FUNC b6c4 124 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::reserve(unsigned long) -b6c4 13 69 29 -b6d7 15 71 78 -b6ec e 72 78 -b6fa 19 73 78 -b713 e 75 78 -b721 28 78 78 -b749 3e 79 78 -b787 30 81 78 -b7b7 8 84 78 -b7bf 11 85 78 -b7d0 18 86 78 -b7f5 33 335 61 -b834 4 384 61 -b838 4 385 61 -b83c 1b 387 61 -b857 1 387 61 -b864 1b 74 79 -b87f 1 74 79 -b88c 23 113 79 -b8af 1 113 79 -b8bc 1b 254 79 -b8d7 1 254 79 -b8e6 56 354 61 -b948 4 384 61 -b94c 4 385 61 -b950 1b 387 61 -b96b 1 387 61 -b978 1b 74 79 -b993 1 74 79 -b9a0 23 113 79 -b9c3 1 113 79 -b9d0 1b 254 79 -b9eb 1 254 79 -FUNC b9ec 46e 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -b9ec 14 311 29 -ba00 b 313 78 -ba0b 24 315 78 -ba2f 8 318 78 -ba37 23 319 78 -ba5a 15 320 78 -ba6f c 321 78 -ba7b 51 323 78 -bacc 14 327 78 -bae0 30 328 78 -bb10 35 330 78 -bb45 48 334 78 -bb8d 17 338 78 -bba4 43 339 78 -bbe7 14 342 78 -bbfb 1e 343 78 -bc19 e 348 78 -bc27 1e 349 78 -bc45 e 350 78 -bc53 1d 353 78 -bc70 8 354 78 -bc78 e 355 78 -bc86 27 357 78 -bcad 6 358 78 -bcb3 4d 361 78 -bd00 40 365 78 -bd40 18 367 78 -bd58 4d 368 78 -bda5 3e 379 78 -bde3 30 381 78 -be13 12 384 78 -be25 13 385 78 -be38 22 386 78 -FUNC be5a 2e 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node > >**, std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> > >, unsigned long, __gnu_cxx::_Hashtable_node > >* const&) -be5a c 657 29 -be66 22 658 71 -be94 15 580 34 -bea9 15 581 34 -bebe 37 582 34 -bef5 c 583 34 -bf01 1 583 34 -bf02 d 335 34 -bf0f 4e 337 34 -bf5d 4d 338 34 -bfaa d 134 42 -bfb7 65 135 42 -c028 22 300 61 -c04a 11 301 61 -c05b 1 301 61 -c068 4 315 61 -c06c 1b 317 61 -c087 1 317 61 -c094 1b 326 61 -c0af 1 326 61 -c0bc 4 384 61 -c0c0 4 385 61 -c0c4 1b 387 61 -c0df 1 387 61 -c0ec 1b 74 79 -c107 1 74 79 -c114 23 113 79 -c137 1 113 79 -c144 1b 254 79 -c15f 1 254 79 -c16c 15 763 71 -c181 40 766 71 -c1c1 3 768 71 -c1c4 2 773 71 -FUNC c1c6 124 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::reserve(unsigned long) -c1c6 13 69 29 -c1d9 15 71 78 -c1ee e 72 78 -c1fc 19 73 78 -c215 e 75 78 -c223 28 78 78 -c24b 3e 79 78 -c289 30 81 78 -c2b9 8 84 78 -c2c1 11 85 78 -c2d2 18 86 78 -c2f7 33 335 61 -c336 4 384 61 -c33a 4 385 61 -c33e 1b 387 61 -c359 1 387 61 -c366 1b 74 79 -c381 1 74 79 -c38e 23 113 79 -c3b1 1 113 79 -c3be 1b 254 79 -c3d9 1 254 79 -c3e8 56 354 61 -c44a 4 384 61 -c44e 4 385 61 -c452 1b 387 61 -c46d 1 387 61 -c47a 1b 74 79 -c495 1 74 79 -c4a2 23 113 79 -c4c5 1 113 79 -c4d2 1b 254 79 -c4ed 1 254 79 -FUNC c4ee 46e 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -c4ee 14 311 29 -c502 b 313 78 -c50d 24 315 78 -c531 8 318 78 -c539 23 319 78 -c55c 15 320 78 -c571 c 321 78 -c57d 51 323 78 -c5ce 14 327 78 -c5e2 30 328 78 -c612 35 330 78 -c647 48 334 78 -c68f 17 338 78 -c6a6 43 339 78 -c6e9 14 342 78 -c6fd 1e 343 78 -c71b e 348 78 -c729 1e 349 78 -c747 e 350 78 -c755 1d 353 78 -c772 8 354 78 -c77a e 355 78 -c788 27 357 78 -c7af 6 358 78 -c7b5 4d 361 78 -c802 40 365 78 -c842 18 367 78 -c85a 4d 368 78 -c8a7 3e 379 78 -c8e5 30 381 78 -c915 12 384 78 -c927 13 385 78 -c93a 22 386 78 -FUNC c95c 2e 0 std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> >::insert(__gnu_cxx::__normal_iterator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >**, std::vector<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*, std::allocator<__gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >*> > >, unsigned long, __gnu_cxx::_Hashtable_node, __gnu_cxx::hash, std::equal_to, std::allocator > >*> >* const&) -c95c c 657 29 -c968 22 658 71 -c996 15 580 34 -c9ab 15 581 34 -c9c0 37 582 34 -c9f7 c 583 34 -ca03 1 583 34 -ca04 d 335 34 -ca11 4e 337 34 -ca5f 4d 338 34 -caac d 134 42 -cab9 65 135 42 -FUNC cb1e 44 0 dwarf2reader::CUFunctionInfoHandler::StartCompilationUnit(unsigned long long, unsigned char, unsigned char, unsigned long long, unsigned char) -cb1e 39 135 42 -cb57 5 102 30 -cb5c 6 103 30 -FUNC cb62 41 0 dwarf2reader::CUFunctionInfoHandler::ProcessAttributeString(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, std::string const&) -cb62 18 136 30 -cb7a 10 137 30 -cb8a 17 138 30 -cba1 2 139 30 -cba3 1 139 30 -FUNC cba4 2a5 0 dwarf2reader::CUFunctionInfoHandler::ProcessAttributeUnsigned(unsigned long long, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm, unsigned long long) -cba4 2d 144 30 -cbd1 a 145 30 -cbdb 58 146 30 -cc33 35 147 30 -cc68 32 146 30 -cc9a 2a 147 30 -ccc4 82 152 30 -cd46 18 153 30 -cd5e 1c 152 30 -cd7a 2f 153 30 -cda9 e 154 30 -cdb7 28 155 30 -cddf 12 157 30 -cdf1 2 158 30 -cdf3 12 160 30 -ce05 2 161 30 -ce07 c 163 30 -ce13 2 164 30 -ce15 2c 166 30 -ce41 8 172 30 -ce49 1 172 30 -FUNC ce4a 19c 0 dwarf2reader::CULineInfoHandler::AddLine(unsigned long long, unsigned int, unsigned int, unsigned int) -ce4a 20 84 30 -ce6a 1c 85 30 -ce86 9c 87 30 -cf22 4f 89 30 -cf71 19 87 30 -cf8a 25 90 30 -cfaf 30 93 30 -cfdf 7 95 30 -FUNC cfe6 9f 0 dwarf2reader::CUFunctionInfoHandler::EndDIE(unsigned long long) -cfe6 19 174 30 -cfff 1c 175 30 -d01b 65 177 30 -d080 5 178 30 -d085 1 178 30 -FUNC d086 164 0 dwarf2reader::CUFunctionInfoHandler::StartDIE(unsigned long long, dwarf2reader::DwarfTag, std::list, std::allocator > > const&) -d086 20 111 30 -d0a6 1c 112 30 -d0c2 c 126 30 -d0ce 23 115 30 -d0f1 26 116 30 -d117 1a 117 30 -d131 d 118 30 -d13e 1b 119 30 -d159 5f 120 30 -d1b8 c 124 30 -d1c4 1c 115 30 -d1e0 3 126 30 -d1e3 7 129 30 -FUNC d1ea 73 0 dwarf2reader::CULineInfoHandler::DefineDir(std::string const&, unsigned int) -d1ea 13 52 30 -d1fd 45 54 30 -d242 15 55 30 -d257 6 56 30 -d25d 1 56 30 -FUNC d25e 23b 0 dwarf2reader::CULineInfoHandler::DefineFile(std::string const&, int, unsigned int, unsigned long long, unsigned long long) -d25e 2c 60 30 -d28a 45 62 30 -d2cf 2f 65 30 -d2fe 24 66 30 -d322 b 68 30 -d32d e 69 30 -d33b 19 71 30 -d354 17 72 30 -d36b 93 74 30 -d3fe 64 77 30 -d462 30 79 30 -d492 7 81 30 -d499 1 81 30 -d49a 14 38 30 -d4ae 36 40 30 -d4e4 41 43 30 -d525 41 44 30 -d566 67 45 30 -d5cd 10 46 30 -d5dd 13 45 30 -d5f0 15 47 30 -d605 e 48 30 -d613 3d 49 30 -d650 20 50 30 -d670 14 38 30 -d684 36 40 30 -d6ba 41 43 30 -d6fb 41 44 30 -d73c 67 45 30 -d7a3 10 46 30 -d7b3 13 45 30 -d7c6 15 47 30 -d7db e 48 30 -d7e9 3d 49 30 -d826 20 50 30 -d846 12 125 74 -d858 12 125 74 -d86a 13 55 32 -d87d 35 55 32 -d8b2 13 98 32 -d8c5 35 98 32 -d8fa c 35 32 -d906 d 35 32 -d913 1 35 32 -d914 d 22 32 -d921 40 22 32 -d961 1 22 32 -d962 c 89 70 -d96e 1e 90 70 -d998 14 208 34 -d9ac c 190 67 -d9b8 a 190 67 -d9c2 c 259 67 -d9ce 21 259 67 -d9ef 1 259 67 -FUNC d9f0 13 0 std::auto_ptr::operator->() const -d9f0 c 283 35 -d9fc 7 286 67 -da03 1 286 67 -da11 5c 104 68 -da6d 1 104 68 -FUNC da6e 28 0 bool std::operator==, std::allocator >(std::basic_string, std::allocator > const&, char const*) -da6e c 2139 37 -da7a 1c 2140 37 -FUNC da96 5d 0 std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, char const*) -da96 d 2081 37 -daa3 12 2083 37 -dab5 1a 2084 37 -dacf 24 2085 37 -daf3 1 2085 37 -FUNC daf4 5d 0 std::basic_string, std::allocator > std::operator+, std::allocator >(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&) -daf4 d 2044 37 -db01 12 2046 37 -db13 1a 2047 37 -db2d 24 2048 37 -db51 1 2048 37 -db52 c 84 70 -db5e 17 85 70 -db75 1 85 70 -FUNC db76 2d 0 std::pair std::make_pair(char const*, unsigned int) -db76 c 144 37 -db82 21 145 70 -dba3 1 145 70 -dba4 c 84 70 -dbb0 23 85 70 -dbd3 1 85 70 -FUNC dbd4 3c 0 std::pair > std::make_pair >(unsigned long long, std::pair) -dbd4 1c 144 37 -dbf0 20 145 70 -dc10 d 89 70 -dc1d 64 90 70 -dc81 1 90 70 -dc82 c 89 70 -dc8e 2a 90 70 -dcb8 c 84 70 -dcc4 1d 85 70 -dce1 1 85 70 -FUNC dce2 3c 0 std::pair std::make_pair(unsigned long long, dwarf2reader::FunctionInfo*) -dce2 1c 144 37 -dcfe 20 145 70 -dd2a a 190 34 -dd40 d 194 34 -dd4d 1 194 34 -dd4e c 603 72 -dd5a c 603 72 -FUNC dd66 2b 0 std::vector >::begin() const -dd66 c 342 39 -dd72 1f 343 71 -dd91 1 343 71 -FUNC dd92 2c 0 std::vector >::end() const -dd92 c 360 39 -dd9e 20 361 71 -ddca 5 666 72 -ddcf 1 666 72 -dddd 2b 759 72 -FUNC de08 3c 0 std::vector >::size() const -de08 c 402 39 -de14 30 403 71 -FUNC de44 2b 0 std::vector >::begin() const -de44 c 342 39 -de50 1f 343 71 -de6f 1 343 71 -FUNC de70 2c 0 std::vector >::end() const -de70 c 360 39 -de7c 20 361 71 -dea9 31 759 72 -FUNC deda 3c 0 std::vector >::size() const -deda c 402 39 -dee6 30 403 71 -df16 c 603 72 -df22 c 603 72 -FUNC df2e 26 0 std::vector >::end() -df2e c 351 39 -df3a 1a 352 71 -df60 7 614 72 -df67 1 614 72 -FUNC df68 13 0 std::vector >::max_size() const -df68 c 407 39 -df74 7 408 71 -df7b 1 408 71 -df88 5 666 72 -df8d 1 666 72 -df9a d 623 72 -dfa7 5 624 72 -FUNC dfac 23 0 std::vector >::begin() -dfac c 333 39 -dfb8 17 334 71 -dfcf 1 334 71 -dfd0 c 35 32 -dfdc 26 35 32 -e00f 5c 104 68 -e06b 1 104 68 -e078 7 614 72 -e07f 1 614 72 -FUNC e080 35 0 dwarf2reader::SourceFileInfo::operator=(dwarf2reader::SourceFileInfo const&) -e080 c 35 39 -e08c 29 35 32 -e0b5 1 35 32 -FUNC e0b6 13 0 std::vector >::max_size() const -e0b6 c 407 39 -e0c2 7 408 71 -e0c9 1 408 71 -e0d6 d 623 72 -e0e3 5 624 72 -FUNC e0e8 3c 0 std::vector >::_M_range_check(unsigned long) const -e0e8 13 515 39 -e0fb 15 517 71 -e110 14 518 71 -FUNC e124 3c 0 std::vector >::_M_range_check(unsigned long) const -e124 13 515 39 -e137 15 517 71 -e14c 14 518 71 -e16c 2a 654 72 -FUNC e196 42 0 std::vector >::operator[](unsigned long) -e196 c 494 39 -e1a2 36 495 71 -FUNC e1d8 32 0 std::vector >::at(unsigned long) -e1d8 c 534 39 -e1e4 12 536 71 -e1f6 14 537 71 -e216 32 654 72 -FUNC e248 42 0 std::vector >::operator[](unsigned long) -e248 c 494 39 -e254 36 495 71 -FUNC e28a 32 0 std::vector >::at(unsigned long) -e28a c 534 39 -e296 12 536 71 -e2a8 14 537 71 -FUNC e2bc 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_end() -e2bc c 472 40 -e2c8 8 473 40 -FUNC e2d0 11 0 std::_Select1st > >::operator()(std::pair > const&) const -e2d0 c 550 41 -e2dc 5 551 41 -e2e1 1 551 41 -FUNC e2e2 53 0 std::less::operator()(unsigned long long const&, unsigned long long const&) const -e2e2 c 226 41 -e2ee 47 227 41 -e335 1 227 41 -FUNC e336 20 0 std::_Rb_tree_iterator > >::operator==(std::_Rb_tree_iterator > > const&) const -e336 c 209 41 -e342 14 210 40 -e356 c 84 70 -e362 18 85 70 -FUNC e37a 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_end() -e37a c 472 41 -e386 8 473 40 -FUNC e38e 11 0 std::_Select1st >::operator()(std::pair const&) const -e38e c 550 41 -e39a 5 551 41 -e39f 1 551 41 -FUNC e3a0 20 0 std::_Rb_tree_iterator >::operator==(std::_Rb_tree_iterator > const&) const -e3a0 c 209 41 -e3ac 14 210 40 -e3c0 c 84 70 -e3cc 18 85 70 -e3e4 c 180 34 -e3f0 13 181 34 -e403 1 181 34 -e410 22 409 34 -e43e d 207 42 -e44b 1 207 42 -FUNC e44c 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -e44c d 699 42 -e459 28 700 72 -e481 1 700 72 -FUNC e482 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -e482 c 171 43 -e48e 2 173 73 -e490 1a 174 73 -e4aa 21 173 73 -e4cb 2 174 73 -e4cd 1 174 73 -FUNC e4ce 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -e4ce d 699 43 -e4db 28 700 72 -e503 1 700 72 -FUNC e504 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -e504 c 171 43 -e510 2 173 73 -e512 1a 174 73 -e52c 21 173 73 -e54d 2 174 73 -e54f 1 174 73 -FUNC e550 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_value(std::_Rb_tree_node > > const*) -e550 c 480 43 -e55c 8 481 40 -FUNC e564 28 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_key(std::_Rb_tree_node > > const*) -e564 c 484 43 -e570 1c 485 40 -FUNC e58c 25 0 std::_Rb_tree_iterator >::operator--() -e58c c 194 43 -e598 14 196 40 -e5ac 5 197 40 -e5b1 1 197 40 -FUNC e5b2 25 0 std::_Rb_tree_iterator > >::operator--() -e5b2 c 194 43 -e5be 14 196 40 -e5d2 5 197 40 -e5d7 1 197 40 -FUNC e5d8 14 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_value(std::_Rb_tree_node_base const*) -e5d8 c 504 43 -e5e4 8 505 40 -FUNC e5ec 28 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_S_key(std::_Rb_tree_node_base const*) -e5ec c 508 43 -e5f8 1c 509 40 -FUNC e614 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value(std::_Rb_tree_node > const*) -e614 c 480 43 -e620 8 481 40 -FUNC e628 28 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_key(std::_Rb_tree_node > const*) -e628 c 484 43 -e634 1c 485 40 -FUNC e650 14 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_value(std::_Rb_tree_node_base const*) -e650 c 504 43 -e65c 8 505 40 -FUNC e664 28 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_S_key(std::_Rb_tree_node_base const*) -e664 c 508 43 -e670 1c 509 40 -e698 7 614 72 -e69f 1 614 72 -e6ac 7 98 68 -e6b3 1 98 68 -e6c0 1d 85 68 -e6dd 5 86 68 -e6e2 10 88 68 -FUNC e6f2 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -e6f2 c 116 43 -e6fe 1e 117 71 -e728 7 98 68 -e72f 1 98 68 -e73c 1d 85 68 -e759 5 86 68 -e75e 16 88 68 -FUNC e774 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -e774 c 116 43 -e780 1e 117 71 -e7aa 3a 104 68 -e7f0 2a 654 72 -FUNC e81a 42 0 std::vector<__gnu_cxx::_Hashtable_node > >*, std::allocator<__gnu_cxx::_Hashtable_node > >*> >::operator[](unsigned long) const -e81a c 509 43 -e826 36 510 71 -FUNC e85c 4e 0 std::string* std::__copy_backward::copy_b(std::string*, std::string*, std::string*) -e85c c 408 61 -e868 14 411 61 -e87c 1e 412 61 -e89a b 411 61 -e8a5 5 413 61 -FUNC e8aa 2b 0 std::string* std::__copy_backward_aux(std::string*, std::string*, std::string*) -e8aa c 432 44 -e8b6 4 440 61 -e8ba 1b 443 61 -e8d5 1 443 61 -e8e4 56 482 61 -e946 4 514 61 -e94a 4 515 61 -e94e 1b 517 61 -e969 1 517 61 -FUNC e96a 69 0 void std::_Construct(std::string*, std::string const&) -e96a d 77 44 -e977 5c 81 73 -e9d3 1 81 73 -FUNC e9d4 54 0 dwarf2reader::SourceFileInfo* std::__copy_backward::copy_b(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*) -e9d4 c 408 61 -e9e0 1a 411 61 -e9fa 1e 412 61 -ea18 b 411 61 -ea23 5 413 61 -FUNC ea28 2b 0 dwarf2reader::SourceFileInfo* std::__copy_backward_aux(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo*) -ea28 c 432 44 -ea34 4 440 61 -ea38 1b 443 61 -ea53 1 443 61 -ea62 56 482 61 -eac4 4 514 61 -eac8 4 515 61 -eacc 1b 517 61 -eae7 1 517 61 -FUNC eae8 69 0 void std::_Construct(dwarf2reader::SourceFileInfo*, dwarf2reader::SourceFileInfo const&) -eae8 d 77 44 -eaf5 5c 81 73 -eb51 1 81 73 -eb52 c 69 70 -eb5e 20 69 70 -eb7e c 69 70 -eb8a 2a 69 70 -ebc1 5c 104 68 -ec1d 1 104 68 -ec2a 15 523 34 -ec3f 79 525 34 -ecb8 21 529 34 -ecd9 1 529 34 -ece6 14 229 42 -ed06 7 98 68 -ed0d 1 98 68 -ed1a 1d 85 68 -ed37 5 86 68 -ed3c 10 88 68 -FUNC ed4c 29 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_get_node() -ed4c c 355 44 -ed58 1d 356 40 -ed75 1 356 40 -FUNC ed76 b6 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_create_node(std::pair > const&) -ed76 d 363 44 -ed83 e 365 40 -ed91 3c 367 40 -edcd b 373 40 -edd8 11 367 40 -ede9 b 368 40 -edf4 12 370 40 -ee06 b 371 40 -ee11 13 368 40 -ee24 8 373 40 -FUNC ee2c cd 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair > const&) -ee2c d 787 44 -ee39 15 789 40 -ee4e 5d 792 40 -eeab 24 796 40 -eecf f 798 40 -eede 1b 799 40 -eef9 1 799 40 -FUNC eefa 1ef 0 std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::insert_unique(std::pair > const&) -eefa d 869 44 -ef07 e 871 40 -ef15 e 872 40 -ef23 4 873 40 -ef27 2 874 40 -ef29 6 876 40 -ef2f 35 877 40 -ef64 2a 878 40 -ef8e 6 874 40 -ef94 12 880 40 -efa6 a 881 40 -efb0 24 882 40 -efd4 51 883 40 -f025 b 885 40 -f030 36 886 40 -f066 4e 887 40 -f0b4 35 888 40 -f0e9 1 888 40 -FUNC f0ea 20 0 std::map, std::less, std::allocator > > >::insert(std::pair > const&) -f0ea c 359 45 -f0f6 14 360 45 -f116 7 98 68 -f11d 1 98 68 -f12a 1d 85 68 -f147 5 86 68 -f14c 1d 88 68 -f169 1 88 68 -FUNC f16a 29 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_get_node() -f16a c 355 45 -f176 1d 356 40 -f193 1 356 40 -FUNC f194 5f 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) -f194 d 363 45 -f1a1 e 365 40 -f1af 3c 367 40 -f1eb 8 373 40 -f1f3 1 373 40 -FUNC f1f4 cd 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair const&) -f1f4 d 787 45 -f201 15 789 40 -f216 5d 792 40 -f273 24 796 40 -f297 f 798 40 -f2a6 1b 799 40 -f2c1 1 799 40 -FUNC f2c2 1ef 0 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::insert_unique(std::pair const&) -f2c2 d 869 45 -f2cf e 871 40 -f2dd e 872 40 -f2eb 4 873 40 -f2ef 2 874 40 -f2f1 6 876 40 -f2f7 35 877 40 -f32c 2a 878 40 -f356 6 874 40 -f35c 12 880 40 -f36e a 881 40 -f378 24 882 40 -f39c 51 883 40 -f3ed b 885 40 -f3f8 36 886 40 -f42e 4e 887 40 -f47c 35 888 40 -f4b1 1 888 40 -FUNC f4b2 20 0 std::map, std::allocator > >::insert(std::pair const&) -f4b2 c 359 45 -f4be 14 360 45 -FUNC f4d2 19 0 void std::_Destroy(std::string*) -f4d2 c 106 45 -f4de d 107 73 -f4eb 1 107 73 -FUNC f4ec 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -f4ec c 119 45 -f4f8 2 121 73 -f4fa 13 122 73 -f50d 21 121 73 -f52e 2 122 73 -FUNC f530 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -f530 c 148 45 -f53c 1c 155 73 -f565 6 82 79 -f56b 2 85 79 -f56d 24 86 79 -f591 2c 85 79 -f5bd b 87 79 -f5c8 b 89 79 -f5d3 12 91 79 -f5e5 b 92 79 -f5f0 13 89 79 -f603 9 92 79 -f618 23 113 79 -f63b 1 113 79 -f648 1b 254 79 -f663 1 254 79 -FUNC f664 430 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, std::string const&) -f664 14 249 47 -f678 14 251 78 -f68c 22 253 78 -f6ae f 255 78 -f6bd 12 256 78 -f6cf 55 257 78 -f724 4b 260 78 -f76f e 264 78 -f77d 15 265 78 -f792 e 266 78 -f7a0 1d 271 78 -f7bd 8 272 78 -f7c5 e 273 78 -f7d3 27 275 78 -f7fa 6 276 78 -f800 55 279 78 -f855 25 284 78 -f87a b 285 78 -f885 4f 286 78 -f8d4 3 284 78 -f8d7 13 279 78 -f8ea e 286 78 -f8f8 4d 298 78 -f945 30 299 78 -f975 12 302 78 -f987 13 303 78 -f99a 23 304 78 -f9bd 3 298 78 -f9c0 13 286 78 -f9d3 b 292 78 -f9de 39 294 78 -fa17 23 295 78 -fa3a 8 296 78 -fa42 16 294 78 -fa58 3 296 78 -fa5b 19 292 78 -fa74 19 298 78 -fa8d 7 304 78 -FUNC fa94 70 0 std::vector >::push_back(std::string const&) -fa94 c 602 47 -faa0 10 604 71 -fab0 1e 606 71 -face 11 607 71 -fadf 25 610 71 -FUNC fb04 19 0 void std::_Destroy(dwarf2reader::SourceFileInfo*) -fb04 c 106 47 -fb10 d 107 73 -fb1d 1 107 73 -FUNC fb1e 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -fb1e c 119 47 -fb2a 2 121 73 -fb2c 13 122 73 -fb3f 21 121 73 -fb60 2 122 73 -FUNC fb62 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -fb62 c 148 47 -fb6e 1c 155 73 -fb97 6 82 79 -fb9d 2 85 79 -fb9f 24 86 79 -fbc3 2c 85 79 -fbef b 87 79 -fbfa b 89 79 -fc05 12 91 79 -fc17 b 92 79 -fc22 13 89 79 -fc35 9 92 79 -fc4a 23 113 79 -fc6d 1 113 79 -fc7a 1b 254 79 -fc95 1 254 79 -FUNC fc96 43d 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, dwarf2reader::SourceFileInfo const&) -fc96 14 249 47 -fcaa 14 251 78 -fcbe 22 253 78 -fce0 f 255 78 -fcef 12 256 78 -fd01 55 257 78 -fd56 4b 260 78 -fda1 e 264 78 -fdaf 15 265 78 -fdc4 e 266 78 -fdd2 1d 271 78 -fdef 8 272 78 -fdf7 e 273 78 -fe05 27 275 78 -fe2c 6 276 78 -fe32 55 279 78 -fe87 25 284 78 -feac b 285 78 -feb7 4f 286 78 -ff06 3 284 78 -ff09 13 279 78 -ff1c e 286 78 -ff2a 4d 298 78 -ff77 36 299 78 -ffad 12 302 78 -ffbf 13 303 78 -ffd2 2a 304 78 -fffc 3 298 78 -ffff 13 286 78 -10012 b 292 78 -1001d 39 294 78 -10056 23 295 78 -10079 8 296 78 -10081 16 294 78 -10097 3 296 78 -1009a 19 292 78 -100b3 19 298 78 -100cc 7 304 78 -100d3 1 304 78 -FUNC 100d4 70 0 std::vector >::push_back(dwarf2reader::SourceFileInfo const&) -100d4 c 602 47 -100e0 10 604 71 -100f0 1e 606 71 -1010e 11 607 71 -1011f 25 610 71 -FUNC 10144 16c 0 Start -10144 17 610 71 -1015b 40 49 48 -1019b 6 51 48 -101a1 3f 53 48 -101e0 7 54 48 -101e7 5 55 48 -101ec 2a 58 48 -10216 61 61 48 -10277 7 62 48 -1027e 2 63 48 -10280 29 66 48 -102a9 7 67 48 -FUNC 102b0 108 0 Usage -102b0 19 70 48 -102c9 30 71 48 -102f9 29 73 48 -10322 30 74 48 -10352 30 75 48 -10382 30 76 48 -103b2 6 77 48 -FUNC 103b8 3af 0 SetupOptions -103b8 21 80 48 -103d9 8 82 48 -103e1 6 85 48 -103e7 10 86 48 -103f7 2e 88 48 -10425 2f 94 48 -10454 2a 91 48 -1047e 23 95 48 -104a1 3e 97 48 -104df 11 98 48 -104f0 7c 99 48 -1056c c 100 48 -10578 5 99 48 -1057d 3e 101 48 -105bb 11 102 48 -105cc 3e 103 48 -1060a 11 104 48 -1061b 37 106 48 -10652 b 107 48 -1065d c 108 48 -10669 b 113 48 -10674 c 114 48 -10680 14 119 48 -10694 30 120 48 -106c4 b 121 48 -106cf c 122 48 -106db 81 127 48 -1075c b 128 48 -10767 1 128 48 -FUNC 10768 a7 0 main -10768 13 131 48 -1077b 37 132 48 -107b2 1e 135 48 -107d0 e 136 48 -107de 8 137 48 -107e6 17 139 48 -107fd c 141 48 -10809 6 142 48 -1080f 1 142 48 -10810 c 47 49 -1081c 1a 48 49 -10836 2 49 49 -10838 c 47 49 -10844 1a 48 49 -1085e 2 49 49 -FUNC 10860 cb 0 google_breakpad::FileID::FileIdentifier(unsigned char*) -10860 f 51 49 -1086f 16 52 49 -10885 6 53 49 -1088b f 54 49 -1089a b 57 49 -108a5 7 62 49 -108ac 2 63 49 -108ae 1c 64 49 -108ca 32 63 49 -108fc b 67 49 -10907 12 68 49 -10919 10 70 49 -10929 2 71 49 -1092b 1 71 49 -FUNC 1092c f2 0 google_breakpad::FileID::MachoIdentifier(int, unsigned char*) -1092c 10 73 49 -1093c 15 74 49 -10951 20 76 49 -10971 f 77 49 -10980 20 79 49 -109a0 c 80 49 -109ac 69 82 49 -10a15 9 83 49 -FUNC 10a1e fb 0 google_breakpad::FileID::ConvertIdentifierToString(unsigned char const*, char*, int) -10a1e c 87 49 -10a2a 7 88 49 -10a31 c 89 49 -10a3d 15 90 49 -10a52 12 91 49 -10a64 18 93 49 -10a7c e 94 49 -10a8a 2b 96 49 -10ab5 2b 97 49 -10ae0 17 89 49 -10af7 20 101 49 -10b17 2 102 49 -10b19 1 102 49 -FUNC 10b1a 13 0 NXHostByteOrder -10b1a c 144 56 -10b26 5 147 56 -10b2b 2 153 56 -10b2d 1 153 56 -10b2e c 56 51 -10b3a 1a 57 51 -10b54 1e 58 51 -10b72 2 59 51 -10b74 c 56 51 -10b80 1a 57 51 -10b9a 1e 58 51 -10bb8 2 59 51 -10bba c 61 51 -10bc6 e 62 51 -10bd4 11 63 51 -10be5 2 64 51 -10be7 1 64 51 -10be8 c 61 51 -10bf4 e 62 51 -10c02 11 63 51 -10c13 2 64 51 -10c15 1 64 51 -FUNC 10c16 477 0 MacFileUtilities::MachoID::UpdateCRC(unsigned char*, unsigned long) -10c16 c 74 51 -10c22 11 82 51 -10c33 14 83 51 -10c47 5 86 51 -10c4c 9 87 51 -10c55 7 88 51 -10c5c 18b 90 51 -10de7 6 91 51 -10ded 14 89 51 -10e01 23 93 51 -10e24 23 94 51 -10e47 d 86 51 -10e54 f 98 51 -10e63 6 100 51 -10e69 18b 101 51 -10ff4 6 102 51 -10ffa c 99 51 -11006 13 105 51 -11019 8 106 51 -11021 10 104 51 -11031 23 108 51 -11054 23 109 51 -11077 14 110 51 -1108b 2 112 51 -1108d 1 112 51 -FUNC 1108e 2c 0 MacFileUtilities::MachoID::UpdateMD5(unsigned char*, unsigned long) -1108e c 114 51 -1109a 1e 115 51 -110b8 2 116 51 -FUNC 110ba 2c 0 MacFileUtilities::MachoID::UpdateSHA1(unsigned char*, unsigned long) -110ba c 118 51 -110c6 1e 119 51 -110e4 2 120 51 -FUNC 110e6 121 0 MacFileUtilities::MachoID::Update(MacFileUtilities::MachoWalker*, unsigned long, unsigned long) -110e6 f 122 51 -110f5 1b 123 51 -11110 e 129 51 -1111e 5 130 51 -11123 9 131 51 -1112c 7 132 51 -11133 a 133 51 -1113d 6 135 51 -11143 7 136 51 -1114a 35 139 51 -1117f 6c 142 51 -111eb 10 143 51 -111fb a 130 51 -11205 2 145 51 -11207 1 145 51 -FUNC 11208 cf 0 MacFileUtilities::MachoID::UUIDCommand(int, unsigned char*) -11208 14 147 51 -1121c 25 149 51 -11241 7 151 51 -11248 19 152 51 -11261 9 153 51 -1126a 8 157 51 -11272 1f 158 51 -11291 9 159 51 -1129a 36 162 51 -112d0 7 163 51 -112d7 1 163 51 -FUNC 112d8 224 0 MacFileUtilities::MachoID::IDCommand(int, unsigned char*) -112d8 15 165 51 -112ed 25 167 51 -11312 7 169 51 -11319 19 170 51 -11332 c 171 51 -1133e c 175 51 -1134a 6 180 51 -11350 7 181 51 -11357 9 182 51 -11360 9 183 51 -11369 28 185 51 -11391 33 186 51 -113c4 1e 185 51 -113e2 10 189 51 -113f2 10 190 51 -11402 10 191 51 -11412 d 192 51 -1141f 10 193 51 -1142f 10 194 51 -1143f 10 195 51 -1144f d 196 51 -1145c 17 197 51 -11473 17 198 51 -1148a 17 199 51 -114a1 14 200 51 -114b5 9 202 51 -114be 36 205 51 -114f4 8 206 51 -FUNC 114fc d1 0 MacFileUtilities::MachoID::Adler32(int) -114fc 14 208 51 -11510 25 209 51 -11535 27 210 51 -1155c d 211 51 -11569 19 213 51 -11582 9 214 51 -1158b 3b 216 51 -115c6 7 217 51 -115cd 1 217 51 -FUNC 115ce f8 0 MacFileUtilities::MachoID::MD5(int, unsigned char*) -115ce 14 219 51 -115e2 25 220 51 -11607 27 221 51 -1162e 19 223 51 -11647 19 224 51 -11660 9 225 51 -11669 17 227 51 -11680 9 228 51 -11689 36 231 51 -116bf 7 232 51 -FUNC 116c6 f8 0 MacFileUtilities::MachoID::SHA1(int, unsigned char*) -116c6 14 234 51 -116da 25 235 51 -116ff 27 236 51 -11726 19 238 51 -1173f 19 239 51 -11758 9 240 51 -11761 17 242 51 -11778 9 243 51 -11781 36 246 51 -117b7 7 247 51 -FUNC 117be 378 0 MacFileUtilities::MachoID::WalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -117be 2b 251 51 -117e9 6 252 51 -117ef e 254 51 -117fd 38 257 51 -11835 f 258 51 -11844 9 260 51 -1184d 17 261 51 -11864 20 266 51 -11884 f 267 51 -11893 d 271 51 -118a0 c 273 51 -118ac 38 274 51 -118e4 f 275 51 -118f3 9 277 51 -118fc 1f 278 51 -1191b 14 282 51 -1192f 2b 283 51 -1195a d 285 51 -11967 19 273 51 -11980 e 287 51 -1198e 38 290 51 -119c6 f 291 51 -119d5 9 293 51 -119de 17 294 51 -119f5 20 299 51 -11a15 f 300 51 -11a24 d 304 51 -11a31 c 306 51 -11a3d 38 307 51 -11a75 f 308 51 -11a84 9 310 51 -11a8d 1f 311 51 -11aac 1a 315 51 -11ac6 39 316 51 -11aff d 318 51 -11b0c 11 306 51 -11b1d 10 323 51 -11b2d 9 324 51 -FUNC 11b36 95 0 MacFileUtilities::MachoID::UUIDWalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -11b36 1e 328 51 -11b54 a 329 51 -11b5e 6 331 51 -11b64 2f 333 51 -11b93 9 335 51 -11b9c 6 337 51 -11ba2 14 338 51 -11bb6 9 340 51 -11bbf a 344 51 -11bc9 2 345 51 -11bcb 1 345 51 -FUNC 11bcc 95 0 MacFileUtilities::MachoID::IDWalkerCB(MacFileUtilities::MachoWalker*, load_command*, long long, bool, void*) -11bcc 1e 349 51 -11bea a 350 51 -11bf4 6 351 51 -11bfa 2f 353 51 -11c29 9 354 51 -11c32 6 356 51 -11c38 14 357 51 -11c4c 9 359 51 -11c55 a 363 51 -11c5f 2 364 51 -11c61 1 364 51 -FUNC 11c62 1c 0 _OSSwapInt32 -11c62 f 53 55 -11c71 8 55 55 -11c79 3 56 55 -11c7c 2 57 55 -FUNC 11c7e 19 0 NXSwapInt -11c7e f 52 56 -11c8d 8 54 56 -11c95 2 55 56 -11c97 1 55 56 -FUNC 11c98 13 0 NXHostByteOrder -11c98 c 144 56 -11ca4 5 147 56 -11ca9 2 153 56 -11cab 1 153 56 -11cac c 52 54 -11cb8 12 54 54 -11cca 1a 55 54 -11ce4 2 56 54 -11ce6 c 52 54 -11cf2 12 54 54 -11d04 1a 55 54 -11d1e 2 56 54 -11d20 c 58 54 -11d2c a 59 54 -11d36 d 60 54 -11d43 2 61 54 -11d45 1 61 54 -11d46 c 58 54 -11d52 a 59 54 -11d5c d 60 54 -11d69 2 61 54 -11d6b 1 61 54 -FUNC 11d6c 37 0 MacFileUtilities::MachoWalker::ValidateCPUType(int) -11d6c c 63 54 -11d78 6 66 54 -11d7e 8 67 54 -11d86 6 68 54 -11d8c b 69 54 -11d97 7 74 54 -11d9e 3 80 54 -11da1 2 81 54 -11da3 1 81 54 -FUNC 11da4 50 0 MacFileUtilities::MachoWalker::ReadBytes(void*, unsigned long, long long) -11da4 18 96 54 -11dbc 36 97 54 -11df2 2 98 54 -FUNC 11df4 73 0 MacFileUtilities::MachoWalker::CurrentHeader(mach_header_64*, long long*) -11df4 c 100 54 -11e00 a 101 54 -11e0a 37 102 54 -11e41 11 103 54 -11e52 9 104 54 -11e5b a 107 54 -11e65 2 108 54 -11e67 1 108 54 -FUNC 11e68 2a6 0 MacFileUtilities::MachoWalker::FindHeader(int, long long&) -11e68 c 110 54 -11e74 15 111 54 -11e89 31 114 54 -11eba c 115 54 -11ec6 10 117 54 -11ed6 4 120 54 -11eda 14 121 54 -11eee 4 122 54 -11ef2 11 129 54 -11f03 28 124 54 -11f2b c 126 54 -11f37 31 133 54 -11f68 c 134 54 -11f74 14 136 54 -11f88 b 137 54 -11f93 8 139 54 -11f9b c 140 54 -11fa7 10 142 54 -11fb7 c 143 54 -11fc3 10 146 54 -11fd3 31 148 54 -12004 c 149 54 -12010 f 151 54 -1201f 14 152 54 -12033 16 154 54 -12049 c 158 54 -12055 31 159 54 -12086 9 160 54 -1208f f 162 54 -1209e 1c 163 54 -120ba 8 165 54 -120c2 10 166 54 -120d2 9 167 54 -120db 16 170 54 -120f1 11 158 54 -12102 a 174 54 -1210c 2 175 54 -FUNC 1210e 109 0 MacFileUtilities::MachoWalker::WalkHeaderCore(long long, unsigned int, bool) -1210e 1e 224 54 -1212c c 225 54 -12138 2f 227 54 -12167 c 228 54 -12173 6 230 54 -12179 14 231 54 -1218d 5b 234 54 -121e8 12 237 54 -121fa 11 225 54 -1220b a 240 54 -12215 2 241 54 -12217 1 241 54 -FUNC 12218 10e 0 MacFileUtilities::MachoWalker::WalkHeader64AtOffset(long long) -12218 18 203 54 -12230 2f 205 54 -1225f c 206 54 -1226b e 208 54 -12279 6 209 54 -1227f 14 210 54 -12293 9 212 54 -1229c a 213 54 -122a6 f 214 54 -122b5 15 215 54 -122ca 2b 216 54 -122f5 a 217 54 -122ff a 218 54 -12309 11 219 54 -1231a a 220 54 -12324 2 221 54 -FUNC 12326 143 0 MacFileUtilities::MachoWalker::WalkHeaderAtOffset(long long) -12326 18 177 54 -1233e 2f 179 54 -1236d c 180 54 -12379 e 182 54 -12387 6 183 54 -1238d 14 184 54 -123a1 2e 189 54 -123cf 7 190 54 -123d6 9 192 54 -123df a 193 54 -123e9 f 194 54 -123f8 15 195 54 -1240d 2b 196 54 -12438 a 197 54 -12442 a 198 54 -1244c 11 199 54 -1245d a 200 54 -12467 2 201 54 -12469 1 201 54 -FUNC 1246a 99 0 MacFileUtilities::MachoWalker::WalkHeader(int) -1246a c 83 54 -12476 15 84 54 -1248b 1d 86 54 -124a8 d 87 54 -124b5 21 88 54 -124d6 21 90 54 -124f7 a 93 54 -12501 2 94 54 -12503 1 94 54 -FUNC 12504 1c 0 _OSSwapInt32 -12504 f 53 55 -12513 8 55 55 -1251b 3 56 55 -1251e 2 57 55 -FUNC 12520 2b 0 _OSSwapInt64 -12520 12 64 55 -12532 11 69 55 -12543 6 70 55 -12549 2 71 55 -1254b 1 71 55 -FUNC 1254c 19 0 NXSwapLong -1254c f 61 56 -1255b 8 63 56 -12563 2 64 56 -12565 1 64 56 -FUNC 12566 1f 0 NXSwapLongLong -12566 12 70 56 -12578 b 72 56 -12583 2 73 56 -12585 1 73 56 -FUNC 12586 32 0 breakpad_swap_uuid_command(breakpad_uuid_command*, NXByteOrder) -12586 c 37 57 -12592 11 39 57 -125a3 13 40 57 -125b6 2 41 57 -FUNC 125b8 da 0 breakpad_swap_segment_command_64(segment_command_64*, NXByteOrder) -125b8 c 44 57 -125c4 11 46 57 -125d5 13 47 57 -125e8 17 49 57 -125ff 17 50 57 -12616 17 51 57 -1262d 17 52 57 -12644 13 54 57 -12657 13 55 57 -1266a 13 56 57 -1267d 13 57 57 -12690 2 58 57 -FUNC 12692 a4 0 breakpad_swap_mach_header_64(mach_header_64*, NXByteOrder) -12692 c 61 57 -1269e 11 63 57 -126af 13 64 57 -126c2 13 65 57 -126d5 13 66 57 -126e8 13 67 57 -126fb 13 68 57 -1270e 13 69 57 -12721 13 70 57 -12734 2 71 57 -FUNC 12736 1d1 0 breakpad_swap_section_64(section_64*, unsigned int, NXByteOrder) -12736 d 75 57 -12743 c 77 57 -1274f 33 78 57 -12782 33 79 57 -127b5 2d 81 57 -127e2 2d 82 57 -1280f 2d 83 57 -1283c 2d 84 57 -12869 2d 85 57 -12896 2d 86 57 -128c3 2d 87 57 -128f0 11 77 57 -12901 6 89 57 -12907 1 89 57 -12908 12 9 58 -1291a 4f 11 58 -12969 2 12 58 -1296b 1 12 58 -1296c 12 9 58 -1297e 4f 11 58 -129cd 2 12 58 -129cf 1 12 58 -129d0 13 14 58 -129e3 2a 14 58 -12a0d 1 14 58 -12a0e 13 14 58 -12a21 2a 14 58 -12a4b 1 14 58 -12a4c 13 14 58 -12a5f 2a 14 58 -12a89 1 14 58 -FUNC 12a8a bb 0 dwarf2reader::ByteReader::SetOffsetSize(unsigned char) -12a8a 19 16 58 -12aa3 a 17 58 -12aad 48 18 58 -12af5 6 19 58 -12afb 23 20 58 -12b1e 21 22 58 -12b3f 6 24 58 -12b45 1 24 58 -FUNC 12b46 bb 0 dwarf2reader::ByteReader::SetAddressSize(unsigned char) -12b46 19 26 58 -12b5f a 27 58 -12b69 48 28 58 -12bb1 6 29 58 -12bb7 23 30 58 -12bda 21 32 58 -12bfb 6 34 58 -12c01 1 34 58 -FUNC 12c02 a2 0 dwarf2reader::ByteReader::ReadFourBytes(char const*) const -12c02 c 24 59 -12c0e c 25 64 -12c1a d 26 64 -12c27 f 27 64 -12c36 f 28 64 -12c45 b 29 64 -12c50 27 30 64 -12c77 2b 32 64 -12ca2 2 34 64 -FUNC 12ca4 40e 0 dwarf2reader::ByteReader::ReadEightBytes(char const*) const -12ca4 11 36 59 -12cb5 1a 37 64 -12ccf 1b 38 64 -12cea 1d 39 64 -12d07 1d 40 64 -12d24 1d 41 64 -12d41 1d 42 64 -12d5e 1d 43 64 -12d7b 1d 44 64 -12d98 f 45 64 -12da7 18f 47 64 -12f36 172 50 64 -130a8 a 52 64 -130b2 2 52 64 -FUNC 130b4 a6 0 ReadInitialLength -130b4 15 29 60 -130c9 18 30 60 -130e1 6 31 60 -130e7 d 35 60 -130f4 13 36 60 -13107 9 37 60 -13110 1a 38 60 -1312a 13 40 60 -1313d 9 41 60 -13146 12 43 60 -13158 2 44 60 -1315a 1f 47 60 -13179 65 50 60 -131de 1f 47 60 -131fd 65 50 60 -FUNC 13262 393 0 dwarf2reader::CompilationUnit::SkipAttribute(char const*, dwarf2reader::DwarfForm) -13262 14 133 60 -13276 82 136 60 -132f8 1f 139 60 -13317 a 140 60 -13321 21 141 60 -13342 c 147 60 -1334e e 151 60 -1335c e 155 60 -1336a e 159 60 -13378 27 162 60 -1339f 1c 166 60 -133bb 10 167 60 -133cb 1c 171 60 -133e7 10 172 60 -133f7 1e 175 60 -13415 56 180 60 -1346b d 181 60 -13478 1e 182 60 -13496 11 183 60 -134a7 1e 184 60 -134c5 24 189 60 -134e9 26 192 60 -1350f 23 195 60 -13532 22 198 60 -13554 15 199 60 -13569 1b 203 60 -13584 30 206 60 -135b4 30 208 60 -135e4 a 209 60 -135ee 7 210 60 -135f5 1 210 60 -FUNC 135f6 29b 0 dwarf2reader::CompilationUnit::ReadHeader() -135f6 14 217 60 -1360a 9 218 60 -13613 4e 221 60 -13661 17 223 60 -13678 a 224 60 -13682 f 225 60 -13691 4e 227 60 -136df 1e 228 60 -136fd 6 229 60 -13703 5e 231 60 -13761 1e 232 60 -1377f 18 233 60 -13797 4c 235 60 -137e3 1d 236 60 -13800 1c 237 60 -1381c 5 238 60 -13821 9 240 60 -1382a 60 245 60 -1388a 7 247 60 -13891 1 247 60 -FUNC 13892 a57 0 dwarf2reader::CompilationUnit::ProcessAttribute(unsigned long long, char const*, dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm) -13892 24 299 60 -138b6 8a 302 60 -13940 1f 307 60 -1395f a 308 60 -13969 36 309 60 -1399f 5b 316 60 -139fa c 317 60 -13a06 5b 322 60 -13a61 e 323 60 -13a6f 55 328 60 -13ac4 e 329 60 -13ad2 55 334 60 -13b27 e 335 60 -13b35 6 338 60 -13b3b 9a 340 60 -13bd5 33 341 60 -13c08 25 340 60 -13c2d 5c 348 60 -13c89 10 349 60 -13c99 5c 354 60 -13cf5 10 355 60 -13d05 55 359 60 -13d5a 1e 360 60 -13d78 56 365 60 -13dce d 366 60 -13ddb 55 368 60 -13e30 1e 369 60 -13e4e 11 370 60 -13e5f 55 372 60 -13eb4 1e 373 60 -13ed2 29 378 60 -13efb 4a 380 60 -13f45 f 381 60 -13f54 29 385 60 -13f7d 4c 387 60 -13fc9 11 388 60 -13fda 1b 392 60 -13ff5 4c 394 60 -14041 11 395 60 -14052 22 399 60 -14074 4e 401 60 -140c2 15 402 60 -140d7 3c 406 60 -14113 1b 408 60 -1412e 54 409 60 -14182 f 411 60 -14191 9a 413 60 -1422b 24 414 60 -1424f 25 413 60 -14274 30 418 60 -142a4 30 420 60 -142d4 a 421 60 -142de b 422 60 -142e9 1 422 60 -142ea 1f 489 60 -14309 3a 491 60 -14343 a 492 60 -1434d 6 493 60 -14353 1 493 60 -14354 1f 489 60 -14373 3a 491 60 -143ad a 492 60 -143b7 6 493 60 -143bd 1 493 60 -FUNC 143be b5 0 dwarf2reader::CompilationUnit::ProcessDIE(unsigned long long, char const*, dwarf2reader::CompilationUnit::Abbrev const&) -143be 19 426 60 -143d7 13 427 60 -143ea 46 430 60 -14430 3a 427 60 -1446a 3 432 60 -1446d 6 433 60 -14473 1 433 60 -FUNC 14474 85 0 dwarf2reader::CompilationUnit::SkipDIE(char const*, dwarf2reader::CompilationUnit::Abbrev const&) -14474 c 122 60 -14480 13 123 60 -14493 27 126 60 -144ba 3a 123 60 -144f4 3 128 60 -144f7 2 129 60 -144f9 1 129 60 -FUNC 144fa be4 0 dwarf2reader::LineInfo::ProcessOneOpcode(dwarf2reader::ByteReader*, dwarf2reader::LineInfoHandler*, dwarf2reader::LineInfoHeader const&, char const*, dwarf2reader::LineStateMachine*, unsigned long*, unsigned long, bool*) -144fa 18 593 60 -14512 a 594 60 -1451c 18 596 60 -14534 8 597 60 -1453c 5 598 60 -14541 19 602 60 -1455a f 603 60 -14569 50 605 60 -145b9 46 607 60 -145ff e0 610 60 -146df 6 612 60 -146e5 22 615 60 -14707 22 616 60 -14729 7 617 60 -14730 b 618 60 -1473b f 619 60 -1474a 5a 623 60 -147a4 7 625 60 -147ab b 626 60 -147b6 f 627 60 -147c5 28 631 60 -147ed e 632 60 -147fb 144 635 60 -1493f 6 637 60 -14945 9e 640 60 -149e3 5 642 60 -149e8 22 644 60 -14a0a e 645 60 -14a18 1c 646 60 -14a34 2b 652 60 -14a5f b 653 60 -14a6a 22 658 60 -14a8c e 659 60 -14a9a 8 660 60 -14aa2 5 662 60 -14aa7 22 664 60 -14ac9 e 665 60 -14ad7 9 666 60 -14ae0 5 668 60 -14ae5 12 670 60 -14af7 5 672 60 -14afc 7 674 60 -14b03 5 676 60 -14b08 16 678 60 -14b1e 9 679 60 -14b27 d9 682 60 -14c00 6 684 60 -14c06 1f 687 60 -14c25 5 689 60 -14c2a 40 693 60 -14c6a d6 696 60 -14d40 6 698 60 -14d46 1c 701 60 -14d62 5 703 60 -14d67 1f 706 60 -14d86 d 707 60 -14d93 13 708 60 -14da6 26 710 60 -14dcc 5 711 60 -14dd1 50 713 60 -14e21 7 715 60 -14e28 b 716 60 -14e33 f 717 60 -14e42 18 725 60 -14e5a f 726 60 -14e69 5 728 60 -14e6e 6 730 60 -14e74 28 732 60 -14e9c d 733 60 -14ea9 22 735 60 -14ecb e 736 60 -14ed9 22 739 60 -14efb e 740 60 -14f09 22 743 60 -14f2b e 744 60 -14f39 a 746 60 -14f43 fd 748 60 -15040 a 758 60 -1504a 9 759 60 -15053 1c 761 60 -1506f d 762 60 -1507c e 763 60 -1508a 2e 759 60 -150b8 b 769 60 -150c3 10 770 60 -150d3 b 771 60 -FUNC 150de 14b 0 dwarf2reader::LineInfo::ReadLines() -150de e 773 60 -150ec 9 778 60 -150f5 17 782 60 -1510c 8 783 60 -15114 6 785 60 -1511a 9 787 60 -15123 5 788 60 -15128 19 789 60 -15141 5 790 60 -15146 4a 793 60 -15190 6 794 60 -15196 4a 796 60 -151e0 a 797 60 -151ea f 790 60 -151f9 15 788 60 -1520e 14 801 60 -15222 7 802 60 -15229 1 802 60 -FUNC 1522a 4fd 0 dwarf2reader::CompilationUnit::ReadAbbrevs() -1522a 18 60 60 -15242 e 61 60 -15250 58 65 60 -152a8 38 66 60 -152e0 44 65 60 -15324 2a 66 60 -1534e 45 68 60 -15393 16 69 60 -153a9 1d 75 60 -153c6 6 76 60 -153cc 40 77 60 -1540c b 80 60 -15417 1f 82 60 -15436 e 84 60 -15444 6 77 60 -1544a 1f 68 60 -15469 a 84 60 -15473 1d 79 60 -15490 6 86 60 -15496 a 87 60 -154a0 3d 89 60 -154dd 1f 90 60 -154fc a 91 60 -15506 6 92 60 -1550c 3d 94 60 -15549 1d 95 60 -15566 5 96 60 -1556b 3d 98 60 -155a8 1f 101 60 -155c7 a 102 60 -155d1 3d 104 60 -1560e 1f 105 60 -1562d a 106 60 -15637 c 107 60 -15643 6 111 60 -15649 6 112 60 -1564f 32 113 60 -15681 47 115 60 -156c8 30 116 60 -156f8 24 79 60 -1571c b 118 60 -15727 1 118 60 -FUNC 15728 5dc 0 dwarf2reader::LineInfo::ReadHeader() -15728 18 503 60 -15740 9 504 60 -15749 17 508 60 -15760 a 510 60 -1576a f 511 60 -15779 60 512 60 -157d9 44 516 60 -1581d 1e 518 60 -1583b 6 519 60 -15841 1e 521 60 -1585f 18 522 60 -15877 1d 524 60 -15894 5 525 60 -15899 20 527 60 -158b9 5 528 60 -158be c 530 60 -158ca 5 531 60 -158cf 1d 533 60 -158ec 5 534 60 -158f1 1d 536 60 -1590e 5 537 60 -15913 45 539 60 -15958 1f 540 60 -15977 19 541 60 -15990 15 542 60 -159a5 1f 539 60 -159c4 30 543 60 -159f4 5 544 60 -159f9 14 542 60 -15a0d e 548 60 -15a1b 7 549 60 -15a22 5 550 60 -15a27 6 551 60 -15a2d 8b 552 60 -15ab8 28 553 60 -15ae0 5 554 60 -15ae5 16 550 60 -15afb 25 552 60 -15b20 5 557 60 -15b25 e 560 60 -15b33 7 561 60 -15b3a 5 563 60 -15b3f 6 564 60 -15b45 28 565 60 -15b6d 22 567 60 -15b8f a 568 60 -15b99 22 570 60 -15bbb a 571 60 -15bc5 22 573 60 -15be7 a 574 60 -15bf1 ba 576 60 -15cab 5 577 60 -15cb0 16 563 60 -15cc6 25 576 60 -15ceb 5 580 60 -15cf0 9 582 60 -15cf9 b 583 60 -FUNC 15d04 3d 0 dwarf2reader::LineInfo::Start() -15d04 c 495 60 -15d10 b 496 60 -15d1b b 497 60 -15d26 19 498 60 -15d3f 2 499 60 -15d41 1 499 60 -FUNC 15d42 304 0 dwarf2reader::CompilationUnit::ProcessDIEs() -15d42 11 435 60 -15d53 9 436 60 -15d5c 9 441 60 -15d65 17 445 60 -15d7c 8 446 60 -15d84 6 448 60 -15d8a 6c 453 60 -15df6 8 455 60 -15dfe 16 453 60 -15e14 3 455 60 -15e17 2f 453 60 -15e46 29 458 60 -15e6f 22 460 60 -15e91 a 462 60 -15e9b a 465 60 -15ea5 1e 466 60 -15ec3 13 467 60 -15ed6 2b 468 60 -15f01 18 472 60 -15f19 9 473 60 -15f22 42 474 60 -15f64 1e 475 60 -15f82 2a 477 60 -15fac b 480 60 -15fb7 1e 481 60 -15fd5 26 483 60 -15ffb 1d 455 60 -16018 24 485 60 -1603c a 486 60 -FUNC 16046 35f 0 dwarf2reader::CompilationUnit::Start() -16046 18 249 60 -1605e 58 251 60 -160b6 35 252 60 -160eb 32 251 60 -1611d 2a 252 60 -16147 20 255 60 -16167 37 256 60 -1619e b 259 60 -161a9 f 264 60 -161b8 17 265 60 -161cf c 266 60 -161db a 268 60 -161e5 95 271 60 -1627a 11 276 60 -1628b b 279 60 -16296 58 282 60 -162ee 2f 283 60 -1631d 32 282 60 -1634f 14 284 60 -16363 1a 285 60 -1637d b 289 60 -16388 12 291 60 -1639a b 292 60 -163a5 1 292 60 -FUNC 163a6 3a 0 std::fill(unsigned char*, unsigned char*, unsigned char const&) -163a6 c 573 61 -163b2 9 576 61 -163bb 23 577 61 -163de 2 578 61 -FUNC 163e0 33 0 std::__deque_buf_size(unsigned long) -163e0 c 83 62 -163ec 27 84 62 -16413 1 84 62 -FUNC 16414 18 0 dwarf2reader::ByteReader::OffsetSize() const -16414 c 38 63 -16420 c 38 63 -FUNC 1642c 18 0 dwarf2reader::ByteReader::AddressSize() const -1642c c 41 63 -16438 c 41 63 -FUNC 16444 17 0 dwarf2reader::ByteReader::ReadOneByte(char const*) const -16444 c 10 64 -16450 9 11 64 -16459 2 12 64 -1645b 1 12 64 -FUNC 1645c 63 0 dwarf2reader::ByteReader::ReadTwoBytes(char const*) const -1645c c 14 64 -16468 d 15 64 -16475 e 16 64 -16483 b 17 64 -1648e 17 18 64 -164a5 18 20 64 -164bd 2 22 64 -164bf 1 22 64 -FUNC 164c0 98 0 dwarf2reader::ByteReader::ReadUnsignedLEB128(char const*, unsigned long*) const -164c0 e 59 64 -164ce e 60 64 -164dc 7 61 64 -164e3 7 62 64 -164ea e 66 64 -164f8 5 67 64 -164fd 38 69 64 -16535 6 71 64 -1653b 8 65 64 -16543 8 75 64 -1654b 6 77 64 -16551 7 78 64 -FUNC 16558 ee 0 dwarf2reader::ByteReader::ReadSignedLEB128(char const*, unsigned long*) const -16558 e 84 64 -16566 e 85 64 -16574 7 86 64 -1657b 7 87 64 -16582 e 91 64 -16590 5 92 64 -16595 44 93 64 -165d9 6 94 64 -165df 8 90 64 -165e7 14 97 64 -165fb 36 98 64 -16631 8 99 64 -16639 6 100 64 -1663f 7 101 64 -FUNC 16646 a2 0 dwarf2reader::ByteReader::ReadOffset(char const*) const -16646 13 103 64 -16659 3f 104 64 -16698 4a 105 64 -166e2 6 106 64 -FUNC 166e8 a2 0 dwarf2reader::ByteReader::ReadAddress(char const*) const -166e8 13 108 64 -166fb 3f 109 64 -1673a 4a 110 64 -16784 6 111 64 -FUNC 1678a 61 0 dwarf2reader::LineStateMachine::Reset(bool) -1678a 12 12 65 -1679c 9 13 65 -167a5 11 14 65 -167b6 11 15 65 -167c7 a 16 65 -167d1 a 17 65 -167db 7 18 65 -167e2 7 19 65 -167e9 2 20 65 -167eb 1 20 65 -FUNC 167ec 20 0 std::_List_const_iterator >::operator!=(std::_List_const_iterator > const&) const -167ec c 253 66 -167f8 14 254 66 -FUNC 1680c 25 0 std::_List_const_iterator >::operator++(int) -1680c c 226 66 -16818 8 228 66 -16820 c 229 66 -1682c 5 230 66 -16831 1 230 66 -FUNC 16832 16 0 std::_List_const_iterator >::operator->() const -16832 c 215 66 -1683e a 216 66 -16848 c 190 67 -16854 a 190 67 -FUNC 1685e 13 0 std::auto_ptr > > >::operator->() const -1685e c 283 67 -1686a 7 286 67 -16871 1 286 67 -16872 c 65 68 -1687e 2 65 68 -16880 c 97 69 -1688c d 97 69 -16899 1 97 69 -1689a c 99 69 -168a6 14 100 69 -168ba c 97 69 -168c6 d 97 69 -168d3 1 97 69 -168d4 c 84 70 -168e0 17 85 70 -168f7 1 85 70 -FUNC 168f8 2d 0 std::pair std::make_pair(dwarf2reader::DwarfAttribute, dwarf2reader::DwarfForm) -168f8 c 144 70 -16904 21 145 70 -16925 1 145 70 -16926 c 202 66 -16932 a 203 66 -FUNC 1693c 25 0 std::list, std::allocator > >::begin() const -1693c c 588 70 -16948 19 589 66 -16961 1 589 66 -FUNC 16962 23 0 std::list, std::allocator > >::end() const -16962 c 605 70 -1696e 17 606 66 -16985 1 606 66 -16986 c 65 68 -16992 2 65 68 -16994 c 72 68 -169a0 2 72 68 -169a2 c 97 69 -169ae d 97 69 -169bb 1 97 69 -169bc c 105 69 -169c8 d 105 69 -169d5 1 105 69 -169d6 c 105 69 -169e2 d 105 69 -169ef 1 105 69 -169f0 c 67 68 -169fc 2 67 68 -169fe c 99 69 -16a0a 14 100 69 -16a1e c 99 69 -16a2a 14 100 69 -16a3e c 129 62 -16a4a 30 131 62 -16a7a c 65 68 -16a86 2 65 68 -16a88 c 72 68 -16a94 2 72 68 -16a96 c 97 69 -16aa2 d 97 69 -16aaf 1 97 69 -16ab0 c 105 69 -16abc d 105 69 -16ac9 1 105 69 -16aca c 105 69 -16ad6 d 105 69 -16ae3 1 105 69 -16ae4 c 67 68 -16af0 2 67 68 -16af2 c 99 69 -16afe 14 100 69 -16b12 c 99 69 -16b1e 14 100 69 -FUNC 16b32 2b 0 std::_Vector_base >::get_allocator() const -16b32 10 93 71 -16b42 1b 94 71 -16b5d 1 94 71 -16b6a 7 614 72 -16b71 1 614 72 -16b72 c 80 71 -16b7e d 80 71 -16b8b 1 80 71 -16b98 2 107 68 -FUNC 16b9a 2d 0 void std::_Destroy >(unsigned char*, unsigned char*, std::allocator) -16b9a c 171 73 -16ba6 2 173 73 -16ba8 12 174 73 -16bba b 173 73 -16bc5 2 174 73 -16bc7 1 174 73 -16bc8 c 84 71 -16bd4 2f 85 71 -16c03 2 86 71 -16c05 1 86 71 -16c06 c 96 71 -16c12 12 97 71 -16c24 2 98 71 -FUNC 16c26 1f 0 std::_List_base, std::allocator > >::_M_init() -16c26 c 338 73 -16c32 8 340 66 -16c3a b 341 66 -16c45 1 341 66 -16c46 c 105 69 -16c52 d 105 69 -16c5f 1 105 69 -16c60 c 125 66 -16c6c a 126 66 -FUNC 16c76 25 0 std::list, std::allocator > >::begin() -16c76 c 579 73 -16c82 19 580 66 -16c9b 1 580 66 -FUNC 16c9c 23 0 std::list, std::allocator > >::end() -16c9c c 597 73 -16ca8 17 597 66 -16cbf 1 597 66 -16cc0 c 603 72 -16ccc c 603 72 -FUNC 16cd8 2b 0 std::vector >::begin() const -16cd8 c 342 73 -16ce4 1f 343 71 -16d03 1 343 71 -FUNC 16d04 2c 0 std::vector >::end() const -16d04 c 360 73 -16d10 20 361 71 -16d3c 5 666 72 -16d41 1 666 72 -16d4f 31 759 72 -FUNC 16d80 3c 0 std::vector >::size() const -16d80 c 402 73 -16d8c 30 403 71 -16dbc c 603 72 -16dc8 c 603 72 -FUNC 16dd4 23 0 std::vector >::begin() -16dd4 c 333 73 -16de0 17 334 71 -16df7 1 334 71 -16e04 33 654 72 -16e37 1 654 72 -FUNC 16e38 26 0 std::vector >::end() -16e38 c 351 73 -16e44 1a 352 71 -16e6a 7 614 72 -16e71 1 614 72 -FUNC 16e72 42 0 std::vector >::operator[](unsigned long) -16e72 c 494 73 -16e7e 36 495 71 -FUNC 16eb4 13 0 std::vector >::max_size() const -16eb4 c 407 73 -16ec0 7 408 71 -16ec7 1 408 71 -16ed4 5 666 72 -16ed9 1 666 72 -16ee6 d 623 72 -16ef3 5 624 72 -16ef8 c 382 62 -16f04 d 382 62 -16f11 1 382 62 -FUNC 16f12 2b 0 std::_Deque_base >::get_allocator() const -16f12 10 360 73 -16f22 1b 361 62 -16f3d 1 361 62 -FUNC 16f3e 2d 0 std::deque >::get_allocator() const -16f3e 10 764 73 -16f4e 1d 765 62 -16f6b 1 765 62 -FUNC 16f6c 13 0 std::_Deque_iterator::operator*() const -16f6c c 134 73 -16f78 7 135 62 -16f7f 1 135 62 -16f8c 2 107 68 -16f8e c 129 62 -16f9a 30 131 62 -FUNC 16fca 2c 0 std::deque >::end() const -16fca 10 799 73 -16fda 1c 800 62 -FUNC 16ff6 2c 0 std::deque >::begin() const -16ff6 10 781 73 -17006 1c 782 62 -FUNC 17022 2e 0 std::deque >::end() -17022 10 790 73 -17032 1e 791 62 -FUNC 17050 3c 0 std::vector >::_M_range_check(unsigned long) const -17050 13 515 73 -17063 15 517 71 -17078 14 518 71 -FUNC 1708c 32 0 std::vector >::at(unsigned long) -1708c c 534 73 -17098 12 536 71 -170aa 14 537 71 -170ca 2e 104 68 -170f8 c 84 71 -17104 2f 85 71 -17133 2 86 71 -17135 1 86 71 -17136 c 96 71 -17142 12 97 71 -17154 2 98 71 -17156 c 603 72 -17162 c 603 72 -FUNC 1716e 23 0 std::vector >::begin() -1716e c 333 73 -1717a 17 334 71 -17191 1 334 71 -1719e 27 654 72 -171c5 1 654 72 -FUNC 171c6 42 0 std::vector >::operator[](unsigned long) -171c6 c 494 73 -171d2 36 495 71 -FUNC 17208 26 0 std::vector >::end() -17208 c 351 73 -17214 1a 352 71 -1723a d 94 68 -17247 1 94 68 -FUNC 17248 2f 0 std::_Vector_base >::_M_deallocate(unsigned char*, unsigned long) -17248 c 120 73 -17254 6 122 71 -1725a 1d 123 71 -17277 1 123 71 -17278 c 108 71 -17284 3a 109 71 -172be c 188 71 -172ca 12 189 71 -172dc 2 190 71 -172de c 272 71 -172ea 4b 273 71 -17335 1 273 71 -17336 13 62 74 -17349 10 62 74 -17359 a 63 74 -17363 25 64 74 -17388 1a 66 74 -173a2 13 62 74 -173b5 10 62 74 -173c5 a 63 74 -173cf 25 64 74 -173f4 1a 66 74 -1740e c 188 71 -1741a 12 189 71 -1742c 2 190 71 -1743b 31 759 72 -1746c c 65 68 -17478 2 65 68 -1747a c 103 69 -17486 d 103 69 -17493 1 103 69 -FUNC 17494 2d 0 std::list, std::allocator > >::get_allocator() const -17494 10 570 74 -174a4 1d 571 66 -174c1 1 571 66 -174ce 2e 104 68 -FUNC 174fc 20 0 std::_List_iterator >::operator!=(std::_List_iterator > const&) const -174fc c 172 74 -17508 14 173 66 -FUNC 1751c 1d 0 std::_List_const_iterator >::operator++() -1751c c 219 74 -17528 c 221 66 -17534 5 222 66 -17539 1 222 66 -FUNC 1753a 1d 0 std::_List_iterator >::operator++() -1753a c 138 74 -17546 c 140 66 -17552 5 141 66 -17557 1 141 66 -FUNC 17558 16 0 std::_List_const_iterator >::operator*() const -17558 c 211 74 -17564 a 212 66 -FUNC 1756e 16 0 std::_List_iterator >::operator*() const -1756e c 130 74 -1757a a 131 66 -FUNC 17584 20 0 std::_List_const_iterator >::operator==(std::_List_const_iterator > const&) const -17584 c 249 74 -17590 14 250 66 -FUNC 175a4 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -175a4 d 699 74 -175b1 28 700 72 -175d9 1 700 72 -FUNC 175da 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -175da c 171 74 -175e6 2 173 73 -175e8 1a 174 73 -17602 21 173 73 -17623 2 174 73 -17625 1 174 73 -17626 c 127 62 -17632 29 127 62 -1765b 1 127 62 -1765c c 388 62 -17668 41 389 62 -176a9 2 390 62 -176ab 1 390 62 -176b8 d 94 68 -176c5 1 94 68 -FUNC 176c6 20 0 bool std::operator==(std::_Deque_iterator const&, std::_Deque_iterator const&) -176c6 c 243 74 -176d2 14 244 62 -FUNC 176e6 26 0 bool std::operator!=(std::_Deque_iterator const&, std::_Deque_iterator const&) -176e6 c 256 74 -176f2 1a 257 62 -FUNC 1770c 1a 0 std::_Deque_iterator::_S_buffer_size() -1770c c 106 74 -17718 e 107 62 -FUNC 17726 3e 0 std::_Deque_iterator::_M_set_node(unsigned long long**) -17726 d 229 74 -17733 9 231 62 -1773c b 232 62 -17747 1d 233 62 -FUNC 17764 50 0 std::_Deque_iterator::operator++() -17764 c 142 74 -17770 d 144 62 -1777d f 145 62 -1778c 18 147 62 -177a4 b 148 62 -177af 5 150 62 -FUNC 177b4 4b 0 void std::_Destroy, std::allocator >(std::_Deque_iterator, std::_Deque_iterator, std::allocator) -177b4 c 171 74 -177c0 2 173 73 -177c2 1a 174 73 -177dc 21 173 73 -177fd 2 174 73 -177ff 1 174 73 -FUNC 17800 50 0 std::_Deque_iterator::operator--() -17800 c 162 74 -1780c f 164 62 -1781b 18 166 62 -17833 b 167 62 -1783e d 169 62 -1784b 5 170 62 -FUNC 17850 39 0 std::deque >::back() -17850 c 988 74 -1785c 15 990 62 -17871 b 991 62 -1787c d 992 62 -17889 1 992 62 -FUNC 1788a 19 0 std::stack > >::top() -1788a c 163 75 -17896 d 166 75 -178a3 1 166 75 -FUNC 178a4 66 0 std::_Deque_iterator::difference_type std::operator-(std::_Deque_iterator const&, std::_Deque_iterator const&) -178a4 d 328 75 -178b1 59 333 62 -FUNC 1790a 26 0 std::deque >::size() const -1790a c 840 75 -17916 1a 841 62 -1793c 36 662 72 -1797e 23 650 72 -179a1 1 650 72 -179a2 c 67 68 -179ae 2 67 68 -179b0 c 99 69 -179bc 14 100 69 -179d0 c 303 66 -179dc 12 304 66 -179ee 2 305 66 -179f0 c 326 66 -179fc 2f 327 66 -17a2b d 328 66 -17a38 c 457 66 -17a44 14 458 66 -17a58 c 211 74 -17a64 2d 211 74 -17a91 1 211 74 -17a9e 7 98 68 -17aa5 1 98 68 -17ab2 1d 85 68 -17acf 5 86 68 -17ad4 17 88 68 -17aeb 1 88 68 -FUNC 17aec 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -17aec c 116 75 -17af8 1e 117 71 -17b22 d 94 68 -17b2f 1 94 68 -FUNC 17b30 34 0 std::_Deque_base >::_M_deallocate_node(unsigned long long*) -17b30 c 402 75 -17b3c 28 403 62 -FUNC 17b64 38 0 std::_Deque_base >::_M_destroy_nodes(unsigned long long**, unsigned long long**) -17b64 c 504 75 -17b70 8 506 62 -17b78 14 507 62 -17b8c e 506 62 -17b9a 2 507 62 -FUNC 17b9c 62 0 std::deque >::_M_pop_back_aux() -17b9c c 391 76 -17ba8 15 393 76 -17bbd 1b 394 76 -17bd8 f 395 76 -17be7 17 396 76 -FUNC 17bfe 4f 0 std::deque >::pop_back() -17bfe c 1081 76 -17c0a 10 1083 62 -17c1a f 1086 62 -17c29 17 1087 62 -17c40 d 1090 62 -17c4d 1 1090 62 -FUNC 17c4e 19 0 std::stack > >::pop() -17c4e c 205 76 -17c5a d 208 75 -17c67 1 208 75 -17c68 c 72 68 -17c74 2 72 68 -17c76 c 105 69 -17c82 d 105 69 -17c8f 1 105 69 -17c90 c 603 72 -17c9c c 603 72 -FUNC 17ca8 2b 0 std::vector >::begin() const -17ca8 c 342 76 -17cb4 1f 343 71 -17cd3 1 343 71 -FUNC 17cd4 2c 0 std::vector >::end() const -17cd4 c 360 76 -17ce0 20 361 71 -17d0c 5 666 72 -17d11 1 666 72 -17d1f 28 759 72 -17d47 1 759 72 -FUNC 17d48 3c 0 std::vector >::size() const -17d48 c 402 76 -17d54 30 403 71 -17d90 d 623 72 -17d9d 5 624 72 -17dae 5 666 72 -17db3 1 666 72 -FUNC 17db4 35 0 bool __gnu_cxx::operator!= > >(__gnu_cxx::__normal_iterator > > const&, __gnu_cxx::__normal_iterator > > const&) -17db4 d 699 76 -17dc1 28 700 72 -17de9 1 700 72 -FUNC 17dea 4b 0 void std::_Destroy<__gnu_cxx::__normal_iterator > >, std::allocator >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, std::allocator) -17dea c 171 76 -17df6 2 173 73 -17df8 1a 174 73 -17e12 21 173 73 -17e33 2 174 73 -17e35 1 174 73 -17e43 28 759 72 -17e6b 1 759 72 -17e78 2a 662 72 -FUNC 17ea2 13 0 std::vector >::max_size() const -17ea2 c 407 76 -17eae 7 408 71 -17eb5 1 408 71 -17ec2 16 650 72 -17ee4 7 98 68 -17eeb 1 98 68 -17ef8 1d 85 68 -17f15 5 86 68 -17f1a 10 88 68 -FUNC 17f2a 29 0 std::_List_base, std::allocator > >::_M_get_node() -17f2a c 311 76 -17f36 1d 312 66 -17f53 1 312 66 -FUNC 17f54 5f 0 std::list, std::allocator > >::_M_create_node(std::pair const&) -17f54 d 435 76 -17f61 e 437 66 -17f6f 3c 440 66 -17fab 8 447 66 -17fb3 1 447 66 -FUNC 17fb4 35 0 std::list, std::allocator > >::_M_insert(std::_List_iterator >, std::pair const&) -17fb4 c 1149 76 -17fc0 15 1151 66 -17fd5 14 1152 66 -17fe9 1 1152 66 -FUNC 17fea 52 0 void std::list, std::allocator > >::_M_insert_dispatch > >(std::_List_iterator >, std::_List_const_iterator >, std::_List_const_iterator >, __false_type) -17fea c 1126 66 -17ff6 2 1128 66 -17ff8 21 1129 66 -18019 21 1128 66 -1803a 2 1129 66 -FUNC 1803c 36 0 void std::list, std::allocator > >::insert > >(std::_List_iterator >, std::_List_const_iterator >, std::_List_const_iterator >) -1803c c 838 66 -18048 2a 842 66 -18072 e 491 66 -18080 32 492 66 -180b2 64 493 66 -18116 c 211 74 -18122 3d 211 74 -1815f 1 211 74 -1816d 5c 104 68 -181c9 1 104 68 -FUNC 181ca 31 0 std::list, std::allocator > >::push_back(std::pair const&) -181ca c 772 76 -181d6 25 773 66 -181fb 1 773 66 -FUNC 181fc 69 0 void std::_Construct(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev const&) -181fc d 77 76 -18209 5c 81 73 -18265 1 81 73 -18272 7 98 68 -18279 1 98 68 -18286 1d 85 68 -182a3 5 86 68 -182a8 10 88 68 -182b8 c 65 68 -182c4 2 65 68 -182c6 c 103 69 -182d2 d 103 69 -182df 1 103 69 -FUNC 182e0 4d 0 std::_Deque_base >::_M_get_map_allocator() const -182e0 11 394 76 -182f1 3c 395 62 -1832d 1 395 62 -FUNC 1832e 75 0 std::_Deque_base >::_M_allocate_map(unsigned long) -1832e d 406 76 -1833b 68 407 62 -183a3 1 407 62 -FUNC 183a4 47 0 std::_Deque_base >::_M_deallocate_map(unsigned long long**, unsigned long) -183a4 c 410 76 -183b0 3b 411 62 -183eb 1 411 62 -183ec c 424 62 -183f8 9 426 62 -18401 22 428 62 -18423 2b 430 62 -1844e c 714 62 -1845a 70 715 62 -184ca c 111 75 -184d6 d 111 75 -184e3 1 111 75 -184e4 c 259 67 -184f0 26 259 67 -18522 7 98 68 -18529 1 98 68 -18536 1d 85 68 -18553 5 86 68 -18558 10 88 68 -FUNC 18568 33 0 std::_Deque_base >::_M_allocate_node() -18568 c 398 76 -18574 27 399 62 -1859b 1 399 62 -FUNC 1859c 82 0 std::_Deque_base >::_M_create_nodes(unsigned long long**, unsigned long long**) -1859c d 486 76 -185a9 8 491 62 -185b1 12 492 62 -185c3 13 491 62 -185d6 b 494 62 -185e1 19 496 62 -185fa b 497 62 -18605 13 494 62 -18618 6 497 62 -FUNC 1861e 17b 0 std::_Deque_base >::_M_initialize_map(unsigned long) -1861e d 447 76 -1862b 1e 450 62 -18649 2a 452 62 -18673 1c 454 62 -1868f 19 462 62 -186a8 c 463 62 -186b4 1e 466 62 -186d2 b 467 62 -186dd 1e 469 62 -186fb 9 470 62 -18704 a 471 62 -1870e b 472 62 -18719 13 467 62 -1872c 15 475 62 -18741 18 476 62 -18759 c 477 62 -18765 34 478 62 -18799 1 478 62 -1879a d 366 62 -187a7 12 367 62 -187b9 39 368 62 -187f2 c 645 62 -187fe 1c 646 62 -FUNC 1881a 4d 0 void std::__fill::fill<__gnu_cxx::__normal_iterator > >, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char const&) -1881a c 539 61 -18826 9 541 61 -1882f 2 542 61 -18831 13 543 61 -18844 21 542 61 -18865 2 543 61 -18867 1 543 61 -FUNC 18868 2b 0 void std::fill<__gnu_cxx::__normal_iterator > >, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char const&) -18868 c 560 76 -18874 4 567 61 -18878 1b 568 61 -18893 1 568 61 -FUNC 18894 6a 0 std::list, std::allocator > >::_M_erase(std::_List_iterator >) -18894 d 1157 76 -188a1 b 1159 66 -188ac 6 1160 66 -188b2 35 1161 66 -188e7 17 1162 66 -FUNC 188fe 37 0 std::list, std::allocator > >::erase(std::_List_iterator >) -188fe c 95 77 -1890a 14 97 77 -1891e 12 98 77 -18930 5 99 77 -18935 1 99 77 -FUNC 18936 3e 0 std::list, std::allocator > >::erase(std::_List_iterator >, std::_List_iterator >) -18936 c 883 77 -18942 2 885 66 -18944 15 886 66 -18959 16 885 66 -1896f 5 887 66 -FUNC 18974 129 0 std::list, std::allocator > >::operator=(std::list, std::allocator > > const&) -18974 e 120 77 -18982 c 122 77 -1898e e 124 77 -1899c e 125 77 -189aa e 126 77 -189b8 e 127 77 -189c6 2 128 77 -189c8 20 130 77 -189e8 5a 128 77 -18a42 16 131 77 -18a58 1b 132 77 -18a73 20 134 77 -18a93 a 136 77 -18a9d 1 136 77 -FUNC 18a9e 4c 0 dwarf2reader::CompilationUnit::Abbrev::operator=(dwarf2reader::CompilationUnit::Abbrev const&) -18a9e c 211 77 -18aaa 40 211 74 -FUNC 18aea 52 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy::copy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18aea c 280 61 -18af6 1a 283 61 -18b10 12 285 61 -18b22 4 286 61 -18b26 6 287 61 -18b2c b 283 61 -18b37 5 289 61 -FUNC 18b3c 2b 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18b3c c 307 77 -18b48 4 315 61 -18b4c 1b 317 61 -18b67 1 317 61 -18b76 56 354 61 -18bd8 4 384 61 -18bdc 4 385 61 -18be0 1b 387 61 -18bfb 1 387 61 -FUNC 18bfc ac 0 std::vector >::erase(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -18bfc d 122 78 -18c09 26 124 78 -18c2f 43 125 78 -18c72 2e 126 78 -18ca0 8 127 78 -FUNC 18ca8 54 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_backward::copy_b(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18ca8 c 408 61 -18cb4 1a 411 61 -18cce 1e 412 61 -18cec b 411 61 -18cf7 5 413 61 -FUNC 18cfc 2b 0 dwarf2reader::CompilationUnit::Abbrev* std::__copy_backward_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -18cfc c 432 78 -18d08 4 440 61 -18d0c 1b 443 61 -18d27 1 443 61 -18d36 56 482 61 -18d98 4 514 61 -18d9c 4 515 61 -18da0 1b 517 61 -18dbb 1 517 61 -FUNC 18dbc 4d 0 void std::__fill::fill<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -18dbc c 526 61 -18dc8 2 528 61 -18dca 1c 529 61 -18de6 21 528 61 -18e07 2 529 61 -18e09 1 529 61 -FUNC 18e0a 2b 0 void std::fill<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -18e0a c 560 78 -18e16 4 567 61 -18e1a 1b 568 61 -18e35 1 568 61 -FUNC 18e36 3f 0 unsigned char* std::__copy::copy(unsigned char const*, unsigned char const*, unsigned char*) -18e36 c 298 61 -18e42 22 300 61 -18e64 11 301 61 -18e75 1 301 61 -FUNC 18e76 2b 0 unsigned char* std::__copy_aux(unsigned char*, unsigned char*, unsigned char*) -18e76 c 307 78 -18e82 4 315 61 -18e86 1b 317 61 -18ea1 1 317 61 -18eb0 56 354 61 -18f12 4 384 61 -18f16 4 385 61 -18f1a 1b 387 61 -18f35 1 387 61 -FUNC 18f36 a0 0 std::vector >::erase(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -18f36 d 122 78 -18f43 26 124 78 -18f69 43 125 78 -18fac 22 126 78 -18fce 8 127 78 -18fe2 7 98 68 -18fe9 1 98 68 -18ff6 1d 85 68 -19013 5 86 68 -19018 d 88 68 -19025 1 88 68 -FUNC 19026 2a 0 std::_Vector_base >::_M_allocate(unsigned long) -19026 c 116 78 -19032 1e 117 71 -1905c 1b 74 79 -19077 1 74 79 -19084 23 113 79 -190a7 1 113 79 -190b4 1b 254 79 -190cf 1 254 79 -FUNC 190d0 19 0 void std::_Destroy(dwarf2reader::CompilationUnit::Abbrev*) -190d0 c 106 79 -190dc d 107 73 -190e9 1 107 73 -FUNC 190ea 44 0 void std::__destroy_aux<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, __false_type) -190ea c 119 79 -190f6 2 121 73 -190f8 13 122 73 -1910b 21 121 73 -1912c 2 122 73 -FUNC 1912e 28 0 void std::_Destroy<__gnu_cxx::__normal_iterator > > >(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) -1912e c 148 79 -1913a 1c 155 73 -FUNC 19156 8d 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, __false_type) -19156 d 188 79 -19163 6 190 79 -19169 2 193 79 -1916b 1c 194 79 -19187 1b 193 79 -191a2 b 196 79 -191ad 12 198 79 -191bf b 199 79 -191ca 13 196 79 -191dd 6 199 79 -191e3 1 199 79 -FUNC 191e4 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -191e4 c 214 79 -191f0 23 218 79 -19213 1 218 79 -FUNC 19214 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, std::allocator) -19214 c 308 79 -19220 1b 310 79 -1923b 1 310 79 -19249 6 82 79 -1924f 2 85 79 -19251 24 86 79 -19275 2c 85 79 -192a1 b 87 79 -192ac b 89 79 -192b7 12 91 79 -192c9 b 92 79 -192d4 13 89 79 -192e7 9 92 79 -192fc 23 113 79 -1931f 1 113 79 -1932c 1b 254 79 -19347 1 254 79 -FUNC 19348 409 0 std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev const&) -19348 14 249 79 -1935c 14 251 78 -19370 22 253 78 -19392 f 255 78 -193a1 12 256 78 -193b3 55 257 78 -19408 4b 260 78 -19453 e 264 78 -19461 15 265 78 -19476 e 266 78 -19484 1d 271 78 -194a1 8 272 78 -194a9 e 273 78 -194b7 27 275 78 -194de 6 276 78 -194e4 55 279 78 -19539 25 284 78 -1955e b 285 78 -19569 4f 286 78 -195b8 3 284 78 -195bb 13 279 78 -195ce e 286 78 -195dc 4d 298 78 -19629 36 299 78 -1965f 12 302 78 -19671 13 303 78 -19684 2e 304 78 -196b2 13 286 78 -196c5 b 292 78 -196d0 39 294 78 -19709 23 295 78 -1972c b 296 78 -19737 13 292 78 -1974a 7 304 78 -19751 1 304 78 -FUNC 19752 70 0 std::vector >::push_back(dwarf2reader::CompilationUnit::Abbrev const&) -19752 c 602 79 -1975e 10 604 71 -1976e 1e 606 71 -1978c 11 607 71 -1979d 25 610 71 -FUNC 197c2 50 0 unsigned char* std::__copy_backward::copy_b(unsigned char const*, unsigned char const*, unsigned char*) -197c2 d 422 61 -197cf f 424 61 -197de 24 425 61 -19802 10 426 61 -FUNC 19812 2b 0 unsigned char* std::__copy_backward_aux(unsigned char*, unsigned char*, unsigned char*) -19812 c 432 79 -1981e 4 440 61 -19822 1b 443 61 -1983d 1 443 61 -1984c 56 482 61 -198ae 4 514 61 -198b2 4 515 61 -198b6 1b 517 61 -198d1 1 517 61 -FUNC 198d2 32 0 unsigned char* std::fill_n(unsigned char*, unsigned long, unsigned char const&) -198d2 c 647 79 -198de 1e 649 61 -198fc 8 650 61 -FUNC 19904 27 0 void std::__uninitialized_fill_n_aux(unsigned char*, unsigned long, unsigned char const&, __true_type) -19904 c 182 79 -19910 1b 183 79 -1992b 1 183 79 -FUNC 1992c 2f 0 void std::uninitialized_fill_n(unsigned char*, unsigned long, unsigned char const&) -1992c c 214 79 -19938 23 218 79 -1995b 1 218 79 -FUNC 1995c 27 0 void std::__uninitialized_fill_n_a(unsigned char*, unsigned long, unsigned char const&, std::allocator) -1995c c 308 79 -19968 1b 310 79 -19983 1 310 79 -FUNC 19984 27 0 void std::__destroy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -19984 c 119 79 -19990 2 121 73 -19992 b 122 73 -1999d c 121 73 -199a9 2 122 73 -199ab 1 122 73 -FUNC 199ac 28 0 void std::_Destroy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -199ac c 148 79 -199b8 1c 155 73 -FUNC 199d4 88 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_aux(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -199d4 d 80 79 -199e1 6 82 79 -199e7 2 85 79 -199e9 12 86 79 -199fb 12 85 79 -19a0d b 87 79 -19a18 b 89 79 -19a23 12 91 79 -19a35 b 92 79 -19a40 13 89 79 -19a53 9 92 79 -FUNC 19a5c 2f 0 dwarf2reader::CompilationUnit::Abbrev* std::uninitialized_copy(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*) -19a5c c 108 79 -19a68 23 113 79 -19a8b 1 113 79 -FUNC 19a8c 27 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_a(dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -19a8c c 252 79 -19a98 1b 254 79 -19ab3 1 254 79 -FUNC 19ab4 7e 0 void std::__uninitialized_fill_n_aux(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, __false_type) -19ab4 d 188 79 -19ac1 6 190 79 -19ac7 2 193 79 -19ac9 12 194 79 -19adb 16 193 79 -19af1 b 196 79 -19afc 12 198 79 -19b0e b 199 79 -19b19 13 196 79 -19b2c 6 199 79 -FUNC 19b32 2f 0 void std::uninitialized_fill_n(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -19b32 c 214 79 -19b3e 23 218 79 -19b61 1 218 79 -FUNC 19b62 27 0 void std::__uninitialized_fill_n_a(dwarf2reader::CompilationUnit::Abbrev*, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&, std::allocator) -19b62 c 308 79 -19b6e 1b 310 79 -19b89 1 310 79 -FUNC 19b8a a5 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_aux<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, __false_type) -19b8a d 80 79 -19b97 6 82 79 -19b9d 2 85 79 -19b9f 1a 86 79 -19bb9 27 85 79 -19be0 b 87 79 -19beb b 89 79 -19bf6 12 91 79 -19c08 b 92 79 -19c13 13 89 79 -19c26 9 92 79 -19c2f 1 92 79 -FUNC 19c30 2f 0 dwarf2reader::CompilationUnit::Abbrev* std::uninitialized_copy<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*) -19c30 c 108 79 -19c3c 23 113 79 -19c5f 1 113 79 -FUNC 19c60 27 0 dwarf2reader::CompilationUnit::Abbrev* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, dwarf2reader::CompilationUnit::Abbrev>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, dwarf2reader::CompilationUnit::Abbrev*, std::allocator) -19c60 c 252 79 -19c6c 1b 254 79 -19c87 1 254 79 -FUNC 19c88 5f8 0 std::vector >::_M_fill_insert(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -19c88 15 311 79 -19c9d b 313 78 -19ca8 2a 315 78 -19cd2 12 318 78 -19ce4 23 319 78 -19d07 15 320 78 -19d1c c 321 78 -19d28 5a 323 78 -19d82 1c 327 78 -19d9e 35 328 78 -19dd3 16 323 78 -19de9 30 330 78 -19e19 10 343 78 -19e29 48 334 78 -19e71 21 338 78 -19e92 3d 339 78 -19ecf 13 334 78 -19ee2 b 339 78 -19eed 1c 342 78 -19f09 1e 343 78 -19f27 13 339 78 -19f3a 24 343 78 -19f5e e 348 78 -19f6c 1e 349 78 -19f8a e 350 78 -19f98 1d 353 78 -19fb5 8 354 78 -19fbd e 355 78 -19fcb 27 357 78 -19ff2 6 358 78 -19ff8 4d 361 78 -1a045 40 365 78 -1a085 18 367 78 -1a09d 44 368 78 -1a0e1 3 365 78 -1a0e4 19 361 78 -1a0fd 13 365 78 -1a110 e 368 78 -1a11e 3e 379 78 -1a15c 36 381 78 -1a192 12 384 78 -1a1a4 13 385 78 -1a1b7 2e 386 78 -1a1e5 e 368 78 -1a1f3 b 372 78 -1a1fe 39 374 78 -1a237 23 376 78 -1a25a b 377 78 -1a265 13 372 78 -1a278 8 386 78 -FUNC 1a280 2e 0 std::vector >::insert(__gnu_cxx::__normal_iterator > >, unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -1a280 c 657 79 -1a28c 22 658 71 -FUNC 1a2ae ab 0 std::vector >::resize(unsigned long, dwarf2reader::CompilationUnit::Abbrev const&) -1a2ae d 422 79 -1a2bb 15 424 71 -1a2d0 48 425 71 -1a318 41 427 71 -1a359 1 427 71 -FUNC 1a35a 63 0 std::vector >::resize(unsigned long) -1a35a d 441 79 -1a367 56 442 71 -1a3bd 1 442 71 -FUNC 1a3be 13 0 std::_Deque_iterator::operator*() const -1a3be c 134 79 -1a3ca 7 135 62 -1a3d1 1 135 62 -FUNC 1a3d2 3f 0 unsigned long long** std::__copy::copy(unsigned long long* const*, unsigned long long* const*, unsigned long long**) -1a3d2 c 298 61 -1a3de 22 300 61 -1a400 11 301 61 -1a411 1 301 61 -FUNC 1a412 2b 0 unsigned long long** std::__copy_aux(unsigned long long**, unsigned long long**, unsigned long long**) -1a412 c 307 79 -1a41e 4 315 61 -1a422 1b 317 61 -1a43d 1 317 61 -FUNC 1a43e 27 0 unsigned long long** std::__copy_normal::copy_n(unsigned long long**, unsigned long long**, unsigned long long**) -1a43e c 325 61 -1a44a 1b 326 61 -1a465 1 326 61 -FUNC 1a466 2f 0 unsigned long long** std::copy(unsigned long long**, unsigned long long**, unsigned long long**) -1a466 c 376 79 -1a472 4 384 61 -1a476 4 385 61 -1a47a 1b 387 61 -1a495 1 387 61 -FUNC 1a496 60 0 unsigned long long** std::__copy_backward::copy_b(unsigned long long* const*, unsigned long long* const*, unsigned long long**) -1a496 d 422 61 -1a4a3 12 424 61 -1a4b5 2e 425 61 -1a4e3 13 426 61 -FUNC 1a4f6 2b 0 unsigned long long** std::__copy_backward_aux(unsigned long long**, unsigned long long**, unsigned long long**) -1a4f6 c 432 79 -1a502 4 440 61 -1a506 1b 443 61 -1a521 1 443 61 -FUNC 1a522 27 0 unsigned long long** std::__copy_backward_normal::copy_b_n(unsigned long long**, unsigned long long**, unsigned long long**) -1a522 c 451 61 -1a52e 1b 452 61 -1a549 1 452 61 -FUNC 1a54a 2f 0 unsigned long long** std::copy_backward(unsigned long long**, unsigned long long**, unsigned long long**) -1a54a c 504 79 -1a556 4 514 61 -1a55a 4 515 61 -1a55e 1b 517 61 -1a579 1 517 61 -FUNC 1a57a 1df 0 std::deque >::_M_reallocate_map(unsigned long, bool) -1a57a 13 723 79 -1a58d 1b 726 76 -1a5a8 9 727 76 -1a5b1 13 730 76 -1a5c4 39 732 76 -1a5fd b 735 76 -1a608 27 736 76 -1a62f 2f 740 76 -1a65e 26 748 76 -1a684 15 750 76 -1a699 36 751 76 -1a6cf 22 753 76 -1a6f1 1e 756 76 -1a70f 8 758 76 -1a717 9 759 76 -1a720 15 762 76 -1a735 24 763 76 -1a759 1 763 76 -FUNC 1a75a 59 0 std::deque >::_M_reserve_map_at_back(unsigned long) -1a75a e 1443 79 -1a768 2a 1445 62 -1a792 21 1447 62 -1a7b3 1 1447 62 -FUNC 1a7b4 8c 0 std::deque >::_M_push_back_aux(unsigned long long const&) -1a7b4 c 345 79 -1a7c0 e 347 76 -1a7ce 13 348 76 -1a7e1 18 349 76 -1a7f9 1e 352 76 -1a817 1b 353 76 -1a832 c 355 76 -1a83e 2 360 76 -FUNC 1a840 62 0 std::deque >::push_back(unsigned long long const&) -1a840 c 1039 79 -1a84c 13 1041 62 -1a85f 1e 1044 62 -1a87d 11 1045 62 -1a88e 14 1048 62 -FUNC 1a8a2 20 0 std::stack > >::push(unsigned long long const&) -1a8a2 c 190 79 -1a8ae 14 191 75 -FUNC 1a8c2 27 0 unsigned char* std::__copy_normal::copy_n(unsigned char*, unsigned char*, unsigned char*) -1a8c2 c 325 61 -1a8ce 1b 326 61 -1a8e9 1 326 61 -FUNC 1a8ea 2f 0 unsigned char* std::copy(unsigned char*, unsigned char*, unsigned char*) -1a8ea c 376 79 -1a8f6 4 384 61 -1a8fa 4 385 61 -1a8fe 1b 387 61 -1a919 1 387 61 -FUNC 1a91a 27 0 unsigned char* std::__uninitialized_copy_aux(unsigned char*, unsigned char*, unsigned char*, __true_type) -1a91a c 73 79 -1a926 1b 74 79 -1a941 1 74 79 -FUNC 1a942 2f 0 unsigned char* std::uninitialized_copy(unsigned char*, unsigned char*, unsigned char*) -1a942 c 108 79 -1a94e 23 113 79 -1a971 1 113 79 -FUNC 1a972 27 0 unsigned char* std::__uninitialized_copy_a(unsigned char*, unsigned char*, unsigned char*, std::allocator) -1a972 c 252 79 -1a97e 1b 254 79 -1a999 1 254 79 -FUNC 1a99a 40 0 unsigned char* std::__copy_normal::copy_n<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1a99a d 334 61 -1a9a7 33 335 61 -FUNC 1a9da 2f 0 unsigned char* std::copy<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1a9da c 376 79 -1a9e6 4 384 61 -1a9ea 4 385 61 -1a9ee 1b 387 61 -1aa09 1 387 61 -FUNC 1aa0a 27 0 unsigned char* std::__uninitialized_copy_aux<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*, __true_type) -1aa0a c 73 79 -1aa16 1b 74 79 -1aa31 1 74 79 -FUNC 1aa32 2f 0 unsigned char* std::uninitialized_copy<__gnu_cxx::__normal_iterator > >, unsigned char*>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*) -1aa32 c 108 79 -1aa3e 23 113 79 -1aa61 1 113 79 -FUNC 1aa62 27 0 unsigned char* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator > >, unsigned char*, unsigned char>(__gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >, unsigned char*, std::allocator) -1aa62 c 252 79 -1aa6e 1b 254 79 -1aa89 1 254 79 -1aa96 9 616 61 -1aa9f 2 617 61 -1aaa1 13 618 61 -1aab4 16 617 61 -1aaca 5 619 61 -1aacf 1 619 61 -1aadc 4 641 61 -1aae0 1b 642 61 -1aafb 1 642 61 -FUNC 1aafc 27 0 void std::__uninitialized_fill_n_aux<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&, __true_type) -1aafc c 182 79 -1ab08 1b 183 79 -1ab23 1 183 79 -FUNC 1ab24 2f 0 void std::uninitialized_fill_n<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1ab24 c 214 79 -1ab30 23 218 79 -1ab53 1 218 79 -FUNC 1ab54 27 0 void std::__uninitialized_fill_n_a<__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char, unsigned char>(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&, std::allocator) -1ab54 c 308 79 -1ab60 1b 310 79 -1ab7b 1 310 79 -FUNC 1ab7c 45a 0 std::vector >::_M_fill_insert(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1ab7c 14 311 79 -1ab90 b 313 78 -1ab9b 21 315 78 -1abbc 9 318 78 -1abc5 23 319 78 -1abe8 15 320 78 -1abfd c 321 78 -1ac09 4e 323 78 -1ac57 11 327 78 -1ac68 30 328 78 -1ac98 35 330 78 -1accd 48 334 78 -1ad15 14 338 78 -1ad29 43 339 78 -1ad6c 11 342 78 -1ad7d 1e 343 78 -1ad9b e 348 78 -1ada9 1e 349 78 -1adc7 e 350 78 -1add5 1d 353 78 -1adf2 8 354 78 -1adfa e 355 78 -1ae08 27 357 78 -1ae2f 6 358 78 -1ae35 4d 361 78 -1ae82 40 365 78 -1aec2 18 367 78 -1aeda 4d 368 78 -1af27 3e 379 78 -1af65 2d 381 78 -1af92 12 384 78 -1afa4 13 385 78 -1afb7 1f 386 78 -FUNC 1afd6 2e 0 std::vector >::insert(__gnu_cxx::__normal_iterator > >, unsigned long, unsigned char const&) -1afd6 c 657 79 -1afe2 22 658 71 -FUNC 1b004 ab 0 std::vector >::resize(unsigned long, unsigned char const&) -1b004 d 422 79 -1b011 15 424 71 -1b026 48 425 71 -1b06e 41 427 71 -1b0af 1 427 71 -FUNC 1b0b0 2b 0 std::vector >::resize(unsigned long) -1b0b0 c 441 79 -1b0bc 1f 442 71 -1b0db 1 442 71 -FUNC 1b0dc 1a 0 std::_Deque_iterator::_S_buffer_size() -1b0dc c 106 79 -1b0e8 e 107 62 -FUNC 1b0f6 66 0 std::_Deque_iterator::difference_type std::operator-(std::_Deque_iterator const&, std::_Deque_iterator const&) -1b0f6 d 328 79 -1b103 59 333 62 -FUNC 1b15c 3e 0 std::_Deque_iterator::_M_set_node(unsigned long long**) -1b15c d 229 79 -1b169 9 231 62 -1b172 b 232 62 -1b17d 1d 233 62 -FUNC 1b19a 50 0 std::_Deque_iterator::operator++() -1b19a c 142 79 -1b1a6 d 144 62 -1b1b3 f 145 62 -1b1c2 18 147 62 -1b1da b 148 62 -1b1e5 5 150 62 -FUNC 1b1ea 84 0 std::_Deque_iterator std::__copy::copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b1ea e 280 61 -1b1f8 17 283 61 -1b20f 20 285 61 -1b22f b 286 61 -1b23a b 287 61 -1b245 b 283 61 -1b250 1e 289 61 -FUNC 1b26e 7e 0 std::_Deque_iterator std::__copy_aux, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b26e 11 307 79 -1b27f 4 315 61 -1b283 69 317 61 -FUNC 1b2ec 7a 0 std::_Deque_iterator std::__copy_normal::copy_n, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b2ec 11 325 61 -1b2fd 69 326 61 -FUNC 1b366 82 0 std::_Deque_iterator std::copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b366 11 376 79 -1b377 4 384 61 -1b37b 4 385 61 -1b37f 69 387 61 -FUNC 1b3e8 7a 0 std::_Deque_iterator std::__uninitialized_copy_aux, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator, __true_type) -1b3e8 11 73 79 -1b3f9 69 74 79 -FUNC 1b462 82 0 std::_Deque_iterator std::uninitialized_copy, std::_Deque_iterator >(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator) -1b462 11 108 79 -1b473 71 113 79 -FUNC 1b4e4 7a 0 std::_Deque_iterator std::__uninitialized_copy_a, std::_Deque_iterator, unsigned long long>(std::_Deque_iterator, std::_Deque_iterator, std::_Deque_iterator, std::allocator) -1b4e4 11 252 79 -1b4f5 69 254 79 -1b55e 10 679 62 -1b56e 64 680 62 -1b5d2 e8 681 62 -1b6ba c 143 75 -1b6c6 14 144 75 -1b6da 6 144 75 -FUNC 1b6e0 4d 0 __eprintf -1b6e0 6 1826 80 -1b6e6 3 1832 80 -1b6e9 c 1826 80 -1b6f5 29 1832 80 -1b71e a 1837 80 -1b728 5 1838 80 -1b72d e8d3 1838 80 diff --git a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer-inl.h b/thirdparty/google-breakpad/r318/src/client/minidump_file_writer-inl.h deleted file mode 100644 index 7c556a27..00000000 --- a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer-inl.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer-inl.h: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_size.h" - -namespace google_breakpad { - -template -inline bool TypedMDRVA::Allocate() { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size()); -} - -template -inline bool TypedMDRVA::Allocate(size_t additional) { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size() + additional); -} - -template -inline bool TypedMDRVA::AllocateArray(size_t count) { - assert(count); - allocation_state_ = ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() * count); -} - -template -inline bool TypedMDRVA::AllocateObjectAndArray(unsigned int count, - size_t size) { - assert(count && size); - allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() + count * size); -} - -template -inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { - assert(allocation_state_ == ARRAY); - return writer_->Copy(position_ + index * minidump_size::size(), item, - minidump_size::size()); -} - -template -inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, - const void *src, - size_t size) { - assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); - return writer_->Copy(position_ + minidump_size::size() + index * size, - src, size); -} - -template -inline bool TypedMDRVA::Flush() { - return writer_->Copy(position_, &data_, minidump_size::size()); -} - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.cc b/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.cc deleted file mode 100644 index fdd59198..00000000 --- a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.cc +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.cc: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#include -#include -#include -#include -#include - -#include "client/minidump_file_writer-inl.h" -#include "common/string_conversion.h" - -namespace google_breakpad { - -const MDRVA MinidumpFileWriter::kInvalidMDRVA = static_cast(-1); - -MinidumpFileWriter::MinidumpFileWriter() : file_(-1), position_(0), size_(0) { -} - -MinidumpFileWriter::~MinidumpFileWriter() { - Close(); -} - -bool MinidumpFileWriter::Open(const char *path) { - assert(file_ == -1); - file_ = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); - - return file_ != -1; -} - -bool MinidumpFileWriter::Close() { - bool result = true; - - if (file_ != -1) { - ftruncate(file_, position_); - result = (close(file_) == 0); - file_ = -1; - } - - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - if (sizeof(wchar_t) == sizeof(u_int16_t)) { - // Shortcut if wchar_t is the same size as MDString's buffer - result = mdstring->Copy(str, mdstring->get()->length); - } else { - u_int16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - UTF32ToUTF16Char(*str, out); - if (!out[0]) - return false; - - // Process one character at a time - --length; - ++str; - - // Append the one or two UTF-16 characters. The first one will be non- - // zero, but the second one may be zero, depending on the conversion from - // UTF-32. - int out_count = out[1] ? 2 : 1; - int out_size = sizeof(u_int16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - } - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const char *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - u_int16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - int conversion_count = UTF8ToUTF16Char(str, length, out); - if (!conversion_count) - return false; - - // Move the pointer along based on the nubmer of converted characters - length -= conversion_count; - str += conversion_count; - - // Append the one or two UTF-16 characters - int out_count = out[1] ? 2 : 1; - int out_size = sizeof(u_int16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - return result; -} - -template -bool MinidumpFileWriter::WriteStringCore(const CharType *str, - unsigned int length, - MDLocationDescriptor *location) { - assert(str); - assert(location); - // Calculate the mdstring length by either limiting to |length| as passed in - // or by finding the location of the NULL character. - unsigned int mdstring_length = 0; - if (!length) - length = INT_MAX; - for (; mdstring_length < length && str[mdstring_length]; ++mdstring_length) - ; - - // Allocate the string buffer - TypedMDRVA mdstring(this); - if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(u_int16_t))) - return false; - - // Set length excluding the NULL and copy the string - mdstring.get()->length = mdstring_length * sizeof(u_int16_t); - bool result = CopyStringToMDString(str, mdstring_length, &mdstring); - - // NULL terminate - if (result) { - u_int16_t ch = 0; - result = mdstring.CopyIndexAfterObject(mdstring_length, &ch, sizeof(ch)); - - if (result) - *location = mdstring.location(); - } - - return result; -} - -bool MinidumpFileWriter::WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteMemory(const void *src, size_t size, - MDMemoryDescriptor *output) { - assert(src); - assert(output); - UntypedMDRVA mem(this); - - if (!mem.Allocate(size)) - return false; - if (!mem.Copy(src, mem.size())) - return false; - - output->start_of_memory_range = reinterpret_cast(src); - output->memory = mem.location(); - - return true; -} - -MDRVA MinidumpFileWriter::Allocate(size_t size) { - assert(size); - assert(file_ != -1); - size_t aligned_size = (size + 7) & ~7; // 64-bit alignment - - if (position_ + aligned_size > size_) { - size_t growth = aligned_size; - size_t minimal_growth = getpagesize(); - - // Ensure that the file grows by at least the size of a memory page - if (growth < minimal_growth) - growth = minimal_growth; - - size_t new_size = size_ + growth; - if (ftruncate(file_, new_size) != 0) - return kInvalidMDRVA; - - size_ = new_size; - } - - MDRVA current_position = position_; - position_ += static_cast(aligned_size); - - return current_position; -} - -bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { - assert(src); - assert(size); - assert(file_ != -1); - - // Ensure that the data will fit in the allocated space - if (size + position > size_) - return false; - - // Seek and write the data - if (lseek(file_, position, SEEK_SET) == static_cast(position)) - if (write(file_, src, size) == size) - return true; - - return false; -} - -bool UntypedMDRVA::Allocate(size_t size) { - assert(size_ == 0); - size_ = size; - position_ = writer_->Allocate(size_); - return position_ != MinidumpFileWriter::kInvalidMDRVA; -} - -bool UntypedMDRVA::Copy(MDRVA position, const void *src, size_t size) { - assert(src); - assert(size); - assert(position + size <= position_ + size_); - return writer_->Copy(position, src, size); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.h b/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.h deleted file mode 100644 index f569a553..00000000 --- a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer.h +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.h: Implements file-based minidump generation. It's -// intended to be used with the Google Breakpad open source crash handling -// project. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class UntypedMDRVA; -template class TypedMDRVA; - -// The user of this class can Open() a file and add minidump streams, data, and -// strings using the definitions in minidump_format.h. Since this class is -// expected to be used in a situation where the current process may be -// damaged, it will not allocate heap memory. -// Sample usage: -// MinidumpFileWriter writer; -// writer.Open("/tmp/minidump.dmp"); -// TypedMDRVA header(&writer_); -// header.Allocate(); -// header->get()->signature = MD_HEADER_SIGNATURE; -// : -// writer.Close(); -class MinidumpFileWriter { -public: - // Invalid MDRVA (Minidump Relative Virtual Address) - // returned on failed allocation - static const MDRVA kInvalidMDRVA; - - MinidumpFileWriter(); - ~MinidumpFileWriter(); - - // Open |path| as the destination of the minidump data. Any existing file - // will be overwritten. - // Return true on success, or false on failure - bool Open(const char *path); - - // Close the current file - // Return true on success, or false on failure - bool Close(); - - // Copy the contents of |str| to a MDString and write it to the file. - // |str| is expected to be either UTF-16 or UTF-32 depending on the size - // of wchar_t. - // Maximum |length| of characters to copy from |str|, or specify 0 to use the - // entire NULL terminated string. Copying will stop at the first NULL. - // |location| the allocated location - // Return true on success, or false on failure - bool WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location); - - // Same as above, except with |str| as a UTF-8 string - bool WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location); - - // Write |size| bytes starting at |src| into the current position. - // Return true on success and set |output| to position, or false on failure - bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output); - - // Copies |size| bytes from |src| to |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, ssize_t size); - - // Return the current position for writing to the minidump - inline MDRVA position() const { return position_; } - - private: - friend class UntypedMDRVA; - - // Allocates an area of |size| bytes. - // Returns the position of the allocation, or kInvalidMDRVA if it was - // unable to allocate the bytes. - MDRVA Allocate(size_t size); - - // The file descriptor for the output file - int file_; - - // Current position in buffer - MDRVA position_; - - // Current allocated size - size_t size_; - - // Copy |length| characters from |str| to |mdstring|. These are distinct - // because the underlying MDString is a UTF-16 based string. The wchar_t - // variant may need to create a MDString that has more characters than the - // source |str|, whereas the UTF-8 variant may coalesce characters to form - // a single UTF-16 character. - bool CopyStringToMDString(const wchar_t *str, unsigned int length, - TypedMDRVA *mdstring); - bool CopyStringToMDString(const char *str, unsigned int length, - TypedMDRVA *mdstring); - - // The common templated code for writing a string - template - bool WriteStringCore(const CharType *str, unsigned int length, - MDLocationDescriptor *location); -}; - -// Represents an untyped allocated chunk -class UntypedMDRVA { - public: - explicit UntypedMDRVA(MinidumpFileWriter *writer) - : writer_(writer), - position_(writer->position()), - size_(0) {} - - // Allocates |size| bytes. Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t size); - - // Returns the current position or kInvalidMDRVA if allocation failed - inline MDRVA position() const { return position_; } - - // Number of bytes allocated - inline size_t size() const { return size_; } - - // Return size and position - inline MDLocationDescriptor location() const { - MDLocationDescriptor location = { size_, position_ }; - return location; - } - - // Copy |size| bytes starting at |src| into the minidump at |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, size_t size); - - // Copy |size| bytes from |src| to the current position - inline bool Copy(const void *src, size_t size) { - return Copy(position_, src, size); - } - - protected: - // Writer we associate with - MinidumpFileWriter *writer_; - - // Position of the start of the data - MDRVA position_; - - // Allocated size - size_t size_; -}; - -// Represents a Minidump object chunk. Additional memory can be allocated at -// the end of the object as a: -// - single allocation -// - Array of MDType objects -// - A MDType object followed by an array -template -class TypedMDRVA : public UntypedMDRVA { - public: - // Constructs an unallocated MDRVA - explicit TypedMDRVA(MinidumpFileWriter *writer) - : UntypedMDRVA(writer), - data_(), - allocation_state_(UNALLOCATED) {} - - inline ~TypedMDRVA() { - // Ensure that the data_ object is written out - if (allocation_state_ != ARRAY) - Flush(); - } - - // Address of object data_ of MDType. This is not declared const as the - // typical usage will be to access the underlying |data_| object as to - // alter its contents. - MDType *get() { return &data_; } - - // Allocates minidump_size::size() bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(); - - // Allocates minidump_size::size() + |additional| bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t additional); - - // Allocate an array of |count| elements of MDType. - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateArray(size_t count); - - // Allocate an array of |count| elements of |size| after object of MDType - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateObjectAndArray(unsigned int count, size_t size); - - // Copy |item| to |index| - // Must have been allocated using AllocateArray(). - // Return true on success, or false on failure - bool CopyIndex(unsigned int index, MDType *item); - - // Copy |size| bytes starting at |str| to |index| - // Must have been allocated using AllocateObjectAndArray(). - // Return true on success, or false on failure - bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); - - // Write data_ - bool Flush(); - - private: - enum AllocationState { - UNALLOCATED = 0, - SINGLE_OBJECT, - ARRAY, - SINGLE_OBJECT_WITH_ARRAY - }; - - MDType data_; - AllocationState allocation_state_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer_unittest.cc b/thirdparty/google-breakpad/r318/src/client/minidump_file_writer_unittest.cc deleted file mode 100644 index 8eadff46..00000000 --- a/thirdparty/google-breakpad/r318/src/client/minidump_file_writer_unittest.cc +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: waylonis@google.com (Dan Waylonis) - -/* - g++ -I../ ../common/convert_UTF.c \ - ../common/string_conversion.cc \ - minidump_file_writer.cc \ - minidump_file_writer_unittest.cc \ - -o minidump_file_writer_unittest - */ - -#include -#include - -#include "minidump_file_writer-inl.h" - -using google_breakpad::MinidumpFileWriter; - -#define ASSERT_TRUE(cond) \ -if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - return false; \ -} - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) -#define ASSERT_NE(e1, e2) ASSERT_TRUE((e1) != (e2)) - -struct StringStructure { - unsigned long integer_value; - MDLocationDescriptor first_string; - MDLocationDescriptor second_string; -}; - -struct ArrayStructure { - unsigned char char_value; - unsigned short short_value; - unsigned long long_value; -}; - -typedef struct { - unsigned long count; - ArrayStructure array[0]; -} ObjectAndArrayStructure; - -static bool WriteFile(const char *path) { - MinidumpFileWriter writer; - if (writer.Open(path)) { - // Test a single structure - google_breakpad::TypedMDRVA strings(&writer); - ASSERT_TRUE(strings.Allocate()); - strings.get()->integer_value = 0xBEEF; - const char *first = "First String"; - ASSERT_TRUE(writer.WriteString(first, 0, &strings.get()->first_string)); - const wchar_t *second = L"Second String"; - ASSERT_TRUE(writer.WriteString(second, 0, &strings.get()->second_string)); - - // Test an array structure - google_breakpad::TypedMDRVA array(&writer); - unsigned int count = 10; - ASSERT_TRUE(array.AllocateArray(count)); - for (unsigned int i = 0; i < count; ++i) { - ArrayStructure local; - local.char_value = i; - local.short_value = i + 1; - local.long_value = i + 2; - ASSERT_TRUE(array.CopyIndex(i, &local)); - } - - // Test an object followed by an array - google_breakpad::TypedMDRVA obj_array(&writer); - ASSERT_TRUE(obj_array.AllocateObjectAndArray(count, - sizeof(ArrayStructure))); - obj_array.get()->count = count; - for (unsigned int i = 0; i < count; ++i) { - ArrayStructure local; - local.char_value = i; - local.short_value = i + 1; - local.long_value = i + 2; - ASSERT_TRUE(obj_array.CopyIndexAfterObject(i, &local, sizeof(local))); - } - } - - return writer.Close(); -} - -static bool CompareFile(const char *path) { - unsigned long expected[] = { -#if defined(__BIG_ENDIAN__) - 0x0000beef, 0x0000001e, 0x00000018, 0x00000020, 0x00000038, 0x00000000, - 0x00000018, 0x00460069, 0x00720073, 0x00740020, 0x00530074, 0x00720069, - 0x006e0067, 0x00000000, 0x0000001a, 0x00530065, 0x0063006f, 0x006e0064, - 0x00200053, 0x00740072, 0x0069006e, 0x00670000, 0x00000001, 0x00000002, - 0x01000002, 0x00000003, 0x02000003, 0x00000004, 0x03000004, 0x00000005, - 0x04000005, 0x00000006, 0x05000006, 0x00000007, 0x06000007, 0x00000008, - 0x07000008, 0x00000009, 0x08000009, 0x0000000a, 0x0900000a, 0x0000000b, - 0x0000000a, 0x00000001, 0x00000002, 0x01000002, 0x00000003, 0x02000003, - 0x00000004, 0x03000004, 0x00000005, 0x04000005, 0x00000006, 0x05000006, - 0x00000007, 0x06000007, 0x00000008, 0x07000008, 0x00000009, 0x08000009, - 0x0000000a, 0x0900000a, 0x0000000b, 0x00000000 -#else - 0x0000beef, 0x0000001e, 0x00000018, 0x00000020, 0x00000038, 0x00000000, - 0x00000018, 0x00690046, 0x00730072, 0x00200074, 0x00740053, 0x00690072, - 0x0067006e, 0x00000000, 0x0000001a, 0x00650053, 0x006f0063, 0x0064006e, - 0x00530020, 0x00720074, 0x006e0069, 0x00000067, 0x0001da00, 0x00000002, - 0x0002da01, 0x00000003, 0x0003da02, 0x00000004, 0x0004da03, 0x00000005, - 0x0005da04, 0x00000006, 0x0006da05, 0x00000007, 0x0007da06, 0x00000008, - 0x0008da07, 0x00000009, 0x0009da08, 0x0000000a, 0x000ada09, 0x0000000b, - 0x0000000a, 0x00018700, 0x00000002, 0x00028701, 0x00000003, 0x00038702, - 0x00000004, 0x00048703, 0x00000005, 0x00058704, 0x00000006, 0x00068705, - 0x00000007, 0x00078706, 0x00000008, 0x00088707, 0x00000009, 0x00098708, - 0x0000000a, 0x000a8709, 0x0000000b, 0x00000000, -#endif - }; - unsigned int expected_byte_count = sizeof(expected); - int fd = open(path, O_RDONLY, 0600); - void *buffer = malloc(expected_byte_count); - ASSERT_NE(fd, -1); - ASSERT_TRUE(buffer); - ASSERT_EQ(read(fd, buffer, expected_byte_count), expected_byte_count); - - char *b1, *b2; - b1 = (char*)buffer; - b2 = (char*)expected; - while (*b1 == *b2) { - b1++; - b2++; - } - - printf("%d\n",b1 - (char*)buffer); - - - ASSERT_EQ(memcmp(buffer, expected, expected_byte_count), 0); - return true; -} - -static bool RunTests() { - const char *path = "/tmp/minidump_file_writer_unittest.dmp"; - ASSERT_TRUE(WriteFile(path)); - ASSERT_TRUE(CompareFile(path)); - unlink(path); - return true; -} - -extern "C" int main(int argc, const char *argv[]) { - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/Makefile b/thirdparty/google-breakpad/r318/src/client/solaris/handler/Makefile deleted file mode 100644 index 9b642865..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Author: Alfred Peng - -CC=cc -CXX=CC - -CPPFLAGS=-g -I../../.. -DNDEBUG -features=extensions -D_REENTRANT -LDFLAGS=-lpthread -lssl -lgnutls-openssl -lelf - -OBJ_DIR=. -BIN_DIR=. - -THREAD_SRC=solaris_lwp.cc -SHARE_SRC=../../minidump_file_writer.cc\ - ../../../common/md5.c\ - ../../../common/string_conversion.cc\ - ../../../common/solaris/file_id.cc\ - minidump_generator.cc -HANDLER_SRC=exception_handler.cc\ - ../../../common/solaris/guid_creator.cc -SHARE_C_SRC=../../../common/convert_UTF.c - -MINIDUMP_TEST_SRC=minidump_test.cc -EXCEPTION_TEST_SRC=exception_handler_test.cc - -THREAD_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(THREAD_SRC)) -SHARE_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(SHARE_SRC)) -HANDLER_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(HANDLER_SRC)) -SHARE_C_OBJ=$(patsubst %.c,$(OBJ_DIR)/%.o,$(SHARE_C_SRC)) -MINIDUMP_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(MINIDUMP_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_OBJ) -EXCEPTION_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(EXCEPTION_TEST_SRC))\ - $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_OBJ) - -BIN=$(BIN_DIR)/minidump_test\ - $(BIN_DIR)/exception_handler_test - -.PHONY:all clean - -all:$(BIN) - -$(BIN_DIR)/minidump_test:$(MINIDUMP_TEST_OBJ) - $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ - -$(BIN_DIR)/exception_handler_test:$(EXCEPTION_TEST_OBJ) - $(CXX) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ - -clean: - rm -f $(BIN) *.o *.out *.dmp core ../../minidump_file_writer.o\ - ../../../common/*.o ../../../common/solaris/*.o diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.cc b/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.cc deleted file mode 100644 index 7fc8d255..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.cc +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include - -#include -#include -#include - -#include "client/solaris/handler/exception_handler.h" -#include "common/solaris/guid_creator.h" -#include "common/solaris/message_output.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Signals that we are interested. -static const int kSigTable[] = { - SIGSEGV, - SIGABRT, - SIGFPE, - SIGILL, - SIGBUS -}; - -std::vector *ExceptionHandler::handler_stack_ = NULL; -int ExceptionHandler::handler_stack_index_ = 0; -pthread_mutex_t ExceptionHandler::handler_stack_mutex_ = - PTHREAD_MUTEX_INITIALIZER; - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void *callback_context, - bool install_handler) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - dump_path_(), - installed_handler_(install_handler) { - set_dump_path(dump_path); - - if (install_handler) { - SetupHandler(); - } - - if (install_handler) { - pthread_mutex_lock(&handler_stack_mutex_); - - if (handler_stack_ == NULL) - handler_stack_ = new std::vector; - handler_stack_->push_back(this); - pthread_mutex_unlock(&handler_stack_mutex_); - } -} - -ExceptionHandler::~ExceptionHandler() { - TeardownAllHandlers(); - pthread_mutex_lock(&handler_stack_mutex_); - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - print_message1(2, "warning: removing Breakpad handler out of order\n"); - for (std::vector::iterator iterator = - handler_stack_->begin(); - iterator != handler_stack_->end(); - ++iterator) { - if (*iterator == this) { - handler_stack_->erase(iterator); - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::WriteMinidump() { - return InternalWriteMinidump(0, 0, NULL); -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, - callback_context, false); - return handler.InternalWriteMinidump(0, 0, NULL); -} - -void ExceptionHandler::SetupHandler() { - // Signal on a different stack to avoid using the stack - // of the crashing lwp. - struct sigaltstack sig_stack; - sig_stack.ss_sp = malloc(MINSIGSTKSZ); - if (sig_stack.ss_sp == NULL) - return; - sig_stack.ss_size = MINSIGSTKSZ; - sig_stack.ss_flags = 0; - - if (sigaltstack(&sig_stack, NULL) < 0) - return; - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) - SetupHandler(kSigTable[i]); -} - -void ExceptionHandler::SetupHandler(int signo) { - struct sigaction act, old_act; - act.sa_handler = HandleException; - act.sa_flags = SA_ONSTACK; - if (sigaction(signo, &act, &old_act) < 0) - return; - old_handlers_[signo] = old_act.sa_handler; -} - -void ExceptionHandler::TeardownHandler(int signo) { - if (old_handlers_.find(signo) != old_handlers_.end()) { - struct sigaction act; - act.sa_handler = old_handlers_[signo]; - act.sa_flags = 0; - sigaction(signo, &act, 0); - } -} - -void ExceptionHandler::TeardownAllHandlers() { - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) { - TeardownHandler(kSigTable[i]); - } -} - -// static -void ExceptionHandler::HandleException(int signo) { -//void ExceptionHandler::HandleException(int signo, siginfo_t *sip, ucontext_t *sig_ctx) { - // The context information about the signal is put on the stack of - // the signal handler frame as value parameter. For some reasons, the - // prototype of the handler doesn't declare this information as parameter, we - // will do it by hand. The stack layout for a signal handler frame is here: - // http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libproc/common/Pstack.c#81 - // - // However, if we are being called by another signal handler passing the - // signal up the chain, then we may not have this random extra parameter, - // so we may have to walk the stack to find it. We do the actual work - // on another thread, where it's a little safer, but we want the ebp - // from this frame to find it. - uintptr_t current_ebp = (uintptr_t)_getfp(); - - pthread_mutex_lock(&handler_stack_mutex_); - ExceptionHandler *current_handler = - handler_stack_->at(handler_stack_->size() - ++handler_stack_index_); - pthread_mutex_unlock(&handler_stack_mutex_); - - // Restore original handler. - current_handler->TeardownHandler(signo); - - ucontext_t *sig_ctx = NULL; - if (current_handler->InternalWriteMinidump(signo, current_ebp, &sig_ctx)) { -// if (current_handler->InternalWriteMinidump(signo, &sig_ctx)) { - // Fully handled this exception, safe to exit. - exit(EXIT_FAILURE); - } else { - // Exception not fully handled, will call the next handler in stack to - // process it. - typedef void (*SignalHandler)(int signo); - SignalHandler old_handler = - reinterpret_cast(current_handler->old_handlers_[signo]); - if (old_handler != NULL) - old_handler(signo); - } - - pthread_mutex_lock(&handler_stack_mutex_); - current_handler->SetupHandler(signo); - --handler_stack_index_; - // All the handlers in stack have been invoked to handle the exception, - // normally the process should be terminated and should not reach here. - // In case we got here, ask the OS to handle it to avoid endless loop, - // normally the OS will generate a core and termiate the process. This - // may be desired to debug the program. - if (handler_stack_index_ == 0) - signal(signo, SIG_DFL); - pthread_mutex_unlock(&handler_stack_mutex_); -} - -bool ExceptionHandler::InternalWriteMinidump(int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) { - if (filter_ && !filter_(callback_context_)) - return false; - - bool success = false; - GUID guid; - char guid_str[kGUIDStringLength + 1]; - if (CreateGUID(&guid) && GUIDToString(&guid, guid_str, sizeof(guid_str))) { - char minidump_path[PATH_MAX]; - snprintf(minidump_path, sizeof(minidump_path), "%s/%s.dmp", - dump_path_c_, guid_str); - - // Block all the signals we want to process when writing minidump. - // We don't want it to be interrupted. - sigset_t sig_blocked, sig_old; - bool blocked = true; - sigfillset(&sig_blocked); - for (size_t i = 0; i < sizeof(kSigTable) / sizeof(kSigTable[0]); ++i) - sigdelset(&sig_blocked, kSigTable[i]); - if (sigprocmask(SIG_BLOCK, &sig_blocked, &sig_old) != 0) { - blocked = false; - print_message1(2, "HandleException: failed to block signals.\n"); - } - - success = minidump_generator_.WriteMinidumpToFile( - minidump_path, signo, sighandler_ebp, sig_ctx); - - // Unblock the signals. - if (blocked) - sigprocmask(SIG_SETMASK, &sig_old, &sig_old); - - if (callback_) - success = callback_(dump_path_c_, guid_str, callback_context_, success); - } - return success; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.h b/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.h deleted file mode 100644 index 4d72485f..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include - -#include "client/solaris/handler/minidump_generator.h" - -namespace google_breakpad { - -using std::string; - -// -// ExceptionHandler -// -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// (NOTE): There should be only one this kind of exception handler -// object per process. -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// Caller should try to make the callbacks as crash-friendly as possible, -// it should avoid use heap memory allocation as much as possible. -// -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is /.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. succeeded - // indicates whether a minidump file was successfully written. - // - // If an exception occurred and the callback returns true, Breakpad will - // treat the exception as fully-handled, suppressing any other handlers from - // being notified of the exception. If the callback returns false, Breakpad - // will treat the exception as unhandled, and allow another handler to handle - // it. If there are no other handlers, Breakpad will report the exception to - // the system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - typedef bool (*MinidumpCallback)(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, - bool install_handler); - ~ExceptionHandler(); - - // Get and Set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, - MinidumpCallback callback, - void *callback_context); - - private: - // Setup crash handler. - void SetupHandler(); - // Setup signal handler for a signal. - void SetupHandler(int signo); - // Teardown the handler for a signal. - void TeardownHandler(int signo); - // Teardown all handlers. - void TeardownAllHandlers(); - - // Runs the main loop for the exception handler thread. - static void* ExceptionHandlerThreadMain(void *lpParameter); - - // Signal handler. - static void HandleException(int signo); - - // Write all the information to the dump file. - // If called from a signal handler, sighandler_ebp is the ebp of - // that signal handler's frame, and sig_ctx is an out parameter - // that will be set to point at the ucontext_t that was placed - // on the stack by the kernel. You can pass zero and NULL - // for the second and third parameters if you are not calling - // this from a signal handler. - bool InternalWriteMinidump(int signo, uintptr_t sighandler_ebp, - ucontext_t **sig_ctx); - - private: - // The callbacks before and after writing the dump file. - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - string dump_path_; - // C style dump path. Keep this when setting dump path, since calling - // c_str() of std::string when crashing may not be safe. - const char *dump_path_c_; - - // True if the ExceptionHandler installed an unhandled exception filter - // when created (with an install_handler parameter set to true). - bool installed_handler_; - - // Keep the previous handlers for the signal. - typedef void (*sighandler_t)(int); - std::map old_handlers_; - - // The global exception handler stack. This is need becuase there may exist - // multiple ExceptionHandler instances in a process. Each will have itself - // registered in this stack. - static std::vector *handler_stack_; - // The index of the handler that should handle the next exception. - static int handler_stack_index_; - static pthread_mutex_t handler_stack_mutex_; - - // The minidump generator. - MinidumpGenerator minidump_generator_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler_test.cc b/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler_test.cc deleted file mode 100644 index 6bb8e18d..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/exception_handler_test.cc +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include -#include -#include -#include - -#include "client/solaris/handler/exception_handler.h" -#include "client/solaris/handler/solaris_lwp.h" - -using namespace google_breakpad; - -// Thread use this to see if it should stop working. -static bool should_exit = false; - -static int foo2(int arg) { - // Stack variable, used for debugging stack dumps. - int c = 0xcccccccc; - fprintf(stderr, "Thread trying to crash: %x\n", getpid()); - c = *reinterpret_cast(0x5); - return c; -} - -static int foo(int arg) { - // Stack variable, used for debugging stack dumps. - int b = 0xbbbbbbbb; - b = foo2(b); - return b; -} - -static void *thread_crash(void *) { - // Stack variable, used for debugging stack dumps. - int a = 0xaaaaaaaa; - sleep(3); - a = foo(a); - printf("%x\n", a); - return NULL; -} - -static void *thread_main(void *) { - while (!should_exit) - sleep(1); - return NULL; -} - -static void CreateCrashThread() { - pthread_t h; - pthread_create(&h, NULL, thread_crash, NULL); - pthread_detach(h); -} - -// Create working threads. -static void CreateThread(int num) { - pthread_t h; - for (int i = 0; i < num; ++i) { - pthread_create(&h, NULL, thread_main, NULL); - pthread_detach(h); - } -} - -// Callback when minidump written. -static bool MinidumpCallback(const char *dump_path, - const char *minidump_id, - void *context, - bool succeeded) { - int index = reinterpret_cast(context); - if (index == 0) { - should_exit = true; - return true; - } - // Don't process it. - return false; -} - -int main(int argc, char *argv[]) { - int handler_index = 1; - ExceptionHandler handler_ignore(".", NULL, MinidumpCallback, - (void*)handler_index, true); - CreateCrashThread(); - CreateThread(10); - - while (true) - sleep(20); - should_exit = true; - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.cc b/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.cc deleted file mode 100644 index ea046cff..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.cc +++ /dev/null @@ -1,786 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "client/solaris/handler/minidump_generator.h" -#include "client/minidump_file_writer-inl.h" -#include "common/solaris/file_id.h" - -namespace { - -using namespace google_breakpad; - -// Argument for the writer function. -struct WriterArgument { - MinidumpFileWriter *minidump_writer; - - // Pid of the lwp who called WriteMinidumpToFile - int requester_pid; - - // The stack bottom of the lwp which caused the dump. - // Mainly used to find the lwp id of the crashed lwp since signal - // handler may not be called in the lwp who caused it. - uintptr_t crashed_stack_bottom; - - // Id of the crashing lwp. - int crashed_lwpid; - - // Signal number when crash happened. Can be 0 if this is a requested dump. - int signo; - - // The ebp of the signal handler frame on x86. Can be 0 if this is a - // requested dump. - uintptr_t sighandler_ebp; - - // User context when crash happens. Can be NULL if this is a requested dump. - // This is actually an out parameter, but it will be filled in at the start - // of the writer LWP. - ucontext_t *sig_ctx; - - // Used to get information about the lwps. - SolarisLwp *lwp_lister; -}; - -// Holding context information for the callback of finding the crashing lwp. -struct FindCrashLwpContext { - const SolarisLwp *lwp_lister; - uintptr_t crashing_stack_bottom; - int crashing_lwpid; - - FindCrashLwpContext() : - lwp_lister(NULL), - crashing_stack_bottom(0UL), - crashing_lwpid(-1) { - } -}; - -// Callback for list lwps. -// It will compare the stack bottom of the provided lwp with the stack -// bottom of the crashed lwp, it they are eqaul, this lwp is the one -// who crashed. -bool IsLwpCrashedCallback(lwpstatus_t *lsp, void *context) { - FindCrashLwpContext *crashing_context = - static_cast(context); - const SolarisLwp *lwp_lister = crashing_context->lwp_lister; - const prgregset_t *gregs = &(lsp->pr_reg); -#if TARGET_CPU_SPARC - uintptr_t last_ebp = (*gregs)[R_FP]; -#elif TARGET_CPU_X86 - uintptr_t last_ebp = (*gregs)[EBP]; -#endif - uintptr_t stack_bottom = lwp_lister->GetLwpStackBottom(last_ebp); - if (stack_bottom > last_ebp && - stack_bottom == crashing_context->crashing_stack_bottom) { - // Got it. Stop iteration. - crashing_context->crashing_lwpid = lsp->pr_lwpid; - return false; - } - - return true; -} - -// Find the crashing lwpid. -// This is done based on stack bottom comparing. -int FindCrashingLwp(uintptr_t crashing_stack_bottom, - int requester_pid, - const SolarisLwp *lwp_lister) { - FindCrashLwpContext context; - context.lwp_lister = lwp_lister; - context.crashing_stack_bottom = crashing_stack_bottom; - CallbackParam callback_param(IsLwpCrashedCallback, - &context); - lwp_lister->Lwp_iter_all(lwp_lister->getpid(), &callback_param); - return context.crashing_lwpid; -} - -bool WriteLwpStack(const SolarisLwp *lwp_lister, - uintptr_t last_esp, - UntypedMDRVA *memory, - MDMemoryDescriptor *loc) { - uintptr_t stack_bottom = lwp_lister->GetLwpStackBottom(last_esp); - if (stack_bottom >= last_esp) { - int size = stack_bottom - last_esp; - if (size > 0) { - if (!memory->Allocate(size)) - return false; - memory->Copy(reinterpret_cast(last_esp), size); - loc->start_of_memory_range = last_esp; - loc->memory = memory->location(); - } - return true; - } - return false; -} - -#if TARGET_CPU_SPARC -bool WriteContext(MDRawContextSPARC *context, ucontext_t *sig_ctx) { - assert(sig_ctx != NULL); - int* regs = sig_ctx->uc_mcontext.gregs; - context->context_flags = MD_CONTEXT_SPARC_FULL; - - context->ccr = (unsigned int)(regs[0]); - context->pc = (unsigned int)(regs[REG_PC]); - context->npc = (unsigned int)(regs[REG_nPC]); - context->y = (unsigned int)(regs[REG_Y]); - context->asi = (unsigned int)(regs[19]); - context->fprs = (unsigned int)(regs[20]); - - for ( int i = 0 ; i < 32; ++i ) { - context->g_r[i] = 0; - } - - for ( int i = 1 ; i < 16; ++i ) { - context->g_r[i] = (uintptr_t)(sig_ctx->uc_mcontext.gregs[i + 3]); - } - context->g_r[30] = (uintptr_t)(((struct frame *)context->g_r[14])->fr_savfp); - - return true; -} - -bool WriteContext(MDRawContextSPARC *context, prgregset_t regs, - prfpregset_t *fp_regs) { - if (!context || !regs) - return false; - - context->context_flags = MD_CONTEXT_SPARC_FULL; - - context->ccr = (uintptr_t)(regs[32]); - context->pc = (uintptr_t)(regs[R_PC]); - context->npc = (uintptr_t)(regs[R_nPC]); - context->y = (uintptr_t)(regs[R_Y]); - context->asi = (uintptr_t)(regs[36]); - context->fprs = (uintptr_t)(regs[37]); - for ( int i = 0 ; i < 32 ; ++i ){ - context->g_r[i] = (uintptr_t)(regs[i]); - } - - return true; -} -#elif TARGET_CPU_X86 -bool WriteContext(MDRawContextX86 *context, prgregset_t regs, - prfpregset_t *fp_regs) { - if (!context || !regs) - return false; - - context->context_flags = MD_CONTEXT_X86_FULL; - - context->cs = regs[CS]; - context->ds = regs[DS]; - context->es = regs[ES]; - context->fs = regs[FS]; - context->gs = regs[GS]; - context->ss = regs[SS]; - context->edi = regs[EDI]; - context->esi = regs[ESI]; - context->ebx = regs[EBX]; - context->edx = regs[EDX]; - context->ecx = regs[ECX]; - context->eax = regs[EAX]; - context->ebp = regs[EBP]; - context->eip = regs[EIP]; - context->esp = regs[UESP]; - context->eflags = regs[EFL]; - - return true; -} -#endif /* TARGET_CPU_XXX */ - -// Write information about a crashed Lwp. -// When a lwp crash, kernel will write something on the stack for processing -// signal. This makes the current stack not reliable, and our stack walker -// won't figure out the whole call stack for this. So we write the stack at the -// time of the crash into the minidump file, not the current stack. -bool WriteCrashedLwpStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - const lwpstatus_t *lsp, - MDRawThread *lwp) { - assert(writer_args->sig_ctx != NULL); - - lwp->thread_id = lsp->pr_lwpid; - -#if TARGET_CPU_SPARC - UntypedMDRVA memory(minidump_writer); - if (!WriteLwpStack(writer_args->lwp_lister, - writer_args->sig_ctx->uc_mcontext.gregs[REG_O6], - &memory, - &lwp->stack)) - return false; - - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); - return WriteContext(context.get(), writer_args->sig_ctx); -#elif TARGET_CPU_X86 - UntypedMDRVA memory(minidump_writer); - if (!WriteLwpStack(writer_args->lwp_lister, - writer_args->sig_ctx->uc_mcontext.gregs[UESP], - &memory, - &lwp->stack)) - return false; - - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), - (int *)&writer_args->sig_ctx->uc_mcontext.gregs, - &writer_args->sig_ctx->uc_mcontext.fpregs); -#endif -} - -bool WriteLwpStream(MinidumpFileWriter *minidump_writer, - const SolarisLwp *lwp_lister, - const lwpstatus_t *lsp, MDRawThread *lwp) { - prfpregset_t fp_regs = lsp->pr_fpreg; - const prgregset_t *gregs = &(lsp->pr_reg); - UntypedMDRVA memory(minidump_writer); -#if TARGET_CPU_SPARC - if (!WriteLwpStack(lwp_lister, - (*gregs)[R_SP], - &memory, - &lwp->stack)) - return false; - - // Write context - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - // should be the thread_id - lwp->thread_id = lsp->pr_lwpid; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); -#elif TARGET_CPU_X86 - if (!WriteLwpStack(lwp_lister, - (*gregs)[UESP], - &memory, - &lwp->stack)) - return false; - - // Write context - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - // should be the thread_id - lwp->thread_id = lsp->pr_lwpid; - lwp->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); -#endif /* TARGET_CPU_XXX */ - return WriteContext(context.get(), (int *)gregs, &fp_regs); -} - -bool WriteCPUInformation(MDRawSystemInfo *sys_info) { - struct utsname uts; - char *major, *minor, *build; - - sys_info->number_of_processors = sysconf(_SC_NPROCESSORS_CONF); - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - if (uname(&uts) != -1) { - // Match "i86pc" as X86 architecture. - if (strcmp(uts.machine, "i86pc") == 0) - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_X86; - else if (strcmp(uts.machine, "sun4u") == 0) - sys_info->processor_architecture = MD_CPU_ARCHITECTURE_SPARC; - } - - major = uts.release; - minor = strchr(major, '.'); - *minor = '\0'; - ++minor; - sys_info->major_version = atoi(major); - sys_info->minor_version = atoi(minor); - - build = strchr(uts.version, '_'); - ++build; - sys_info->build_number = atoi(build); - - return true; -} - -bool WriteOSInformation(MinidumpFileWriter *minidump_writer, - MDRawSystemInfo *sys_info) { - sys_info->platform_id = MD_OS_SOLARIS; - - struct utsname uts; - if (uname(&uts) != -1) { - char os_version[512]; - size_t space_left = sizeof(os_version); - memset(os_version, 0, space_left); - const char *os_info_table[] = { - uts.sysname, - uts.release, - uts.version, - uts.machine, - "OpenSolaris", - NULL - }; - for (const char **cur_os_info = os_info_table; - *cur_os_info != NULL; - ++cur_os_info) { - if (cur_os_info != os_info_table && space_left > 1) { - strcat(os_version, " "); - --space_left; - } - if (space_left > strlen(*cur_os_info)) { - strcat(os_version, *cur_os_info); - space_left -= strlen(*cur_os_info); - } else { - break; - } - } - - MDLocationDescriptor location; - if (!minidump_writer->WriteString(os_version, 0, &location)) - return false; - sys_info->csd_version_rva = location.rva; - } - return true; -} - -// Callback context for get writting lwp information. -struct LwpInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int lwp_index; -}; - -bool LwpInformationCallback(lwpstatus_t *lsp, void *context) { - bool success = true; - LwpInfoCallbackCtx *callback_context = - static_cast(context); - - // The current lwp is the one to handle the crash. Ignore it. - if (lsp->pr_lwpid != pthread_self()) { - LwpInfoCallbackCtx *callback_context = - static_cast(context); - MDRawThread lwp; - memset(&lwp, 0, sizeof(MDRawThread)); - - if (lsp->pr_lwpid != callback_context->writer_args->crashed_lwpid || - callback_context->writer_args->sig_ctx == NULL) { - success = WriteLwpStream(callback_context->minidump_writer, - callback_context->writer_args->lwp_lister, - lsp, &lwp); - } else { - success = WriteCrashedLwpStream(callback_context->minidump_writer, - callback_context->writer_args, - lsp, &lwp); - } - if (success) { - callback_context->list->CopyIndexAfterObject( - callback_context->lwp_index++, - &lwp, sizeof(MDRawThread)); - } - } - - return success; -} - -bool WriteLwpListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // Get the lwp information. - const SolarisLwp *lwp_lister = writer_args->lwp_lister; - int lwp_count = lwp_lister->GetLwpCount(); - if (lwp_count < 0) - return false; - TypedMDRVA list(minidump_writer); - if (!list.AllocateObjectAndArray(lwp_count - 1, sizeof(MDRawThread))) - return false; - dir->stream_type = MD_THREAD_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_threads = lwp_count - 1; - - LwpInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.lwp_index = 0; - CallbackParam callback_param(LwpInformationCallback, - &context); - int written = - lwp_lister->Lwp_iter_all(lwp_lister->getpid(), &callback_param); - return written == lwp_count; -} - -bool WriteCVRecord(MinidumpFileWriter *minidump_writer, - MDRawModule *module, - const char *module_path, - char *realname) { - TypedMDRVA cv(minidump_writer); - - char path[PATH_MAX]; - const char *module_name = module_path ? module_path : ""; - snprintf(path, sizeof(path), "/proc/self/object/%s", module_name); - - size_t module_name_length = strlen(realname); - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t))) - return false; - if (!cv.CopyIndexAfterObject(0, realname, module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - memset(cv_ptr, 0, sizeof(MDCVInfoPDB70)); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - FileID file_id(path); - unsigned char identifier[16]; - - if (file_id.ElfFileIdentifier(identifier)) { - cv_ptr->signature.data1 = (uint32_t)identifier[0] << 24 | - (uint32_t)identifier[1] << 16 | (uint32_t)identifier[2] << 8 | - (uint32_t)identifier[3]; - cv_ptr->signature.data2 = (uint32_t)identifier[4] << 8 | identifier[5]; - cv_ptr->signature.data3 = (uint32_t)identifier[6] << 8 | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - return true; -} - -struct ModuleInfoCallbackCtx { - MinidumpFileWriter *minidump_writer; - const WriterArgument *writer_args; - TypedMDRVA *list; - int module_index; -}; - -bool ModuleInfoCallback(const ModuleInfo &module_info, void *context) { - ModuleInfoCallbackCtx *callback_context = - static_cast(context); - // Skip those modules without name, or those that are not modules. - if (strlen(module_info.name) == 0) - return true; - - MDRawModule module; - memset(&module, 0, sizeof(module)); - MDLocationDescriptor loc; - char path[PATH_MAX]; - char buf[PATH_MAX]; - char *realname; - int count; - - snprintf(path, sizeof (path), "/proc/self/path/%s", module_info.name); - if ((count = readlink(path, buf, PATH_MAX)) < 0) - return false; - buf[count] = '\0'; - - if ((realname = strrchr(buf, '/')) == NULL) - return false; - realname++; - - if (!callback_context->minidump_writer->WriteString(realname, 0, &loc)) - return false; - - module.base_of_image = (u_int64_t)module_info.start_addr; - module.size_of_image = module_info.size; - module.module_name_rva = loc.rva; - - if (!WriteCVRecord(callback_context->minidump_writer, &module, - module_info.name, realname)) - return false; - - callback_context->list->CopyIndexAfterObject( - callback_context->module_index++, &module, MD_MODULE_SIZE); - return true; -} - -bool WriteModuleListStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA list(minidump_writer); - int module_count = writer_args->lwp_lister->GetModuleCount(); - - if (module_count <= 0 || - !list.AllocateObjectAndArray(module_count, MD_MODULE_SIZE)) { - return false; - } - - dir->stream_type = MD_MODULE_LIST_STREAM; - dir->location = list.location(); - list.get()->number_of_modules = module_count; - ModuleInfoCallbackCtx context; - context.minidump_writer = minidump_writer; - context.writer_args = writer_args; - context.list = &list; - context.module_index = 0; - CallbackParam callback(ModuleInfoCallback, &context); - return writer_args->lwp_lister->ListModules(&callback) == module_count; -} - -bool WriteSystemInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA sys_info(minidump_writer); - - if (!sys_info.Allocate()) - return false; - - dir->stream_type = MD_SYSTEM_INFO_STREAM; - dir->location = sys_info.location(); - - return WriteCPUInformation(sys_info.get()) && - WriteOSInformation(minidump_writer, sys_info.get()); -} - -bool WriteExceptionStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - // This happenes when this is not a crash, but a requested dump. - if (writer_args->sig_ctx == NULL) - return false; - - TypedMDRVA exception(minidump_writer); - if (!exception.Allocate()) - return false; - - dir->stream_type = MD_EXCEPTION_STREAM; - dir->location = exception.location(); - exception.get()->thread_id = writer_args->crashed_lwpid; - exception.get()->exception_record.exception_code = writer_args->signo; - exception.get()->exception_record.exception_flags = 0; - -#if TARGET_CPU_SPARC - if (writer_args->sig_ctx != NULL) { - exception.get()->exception_record.exception_address = - writer_args->sig_ctx->uc_mcontext.gregs[REG_PC]; - } else { - return true; - } - - // Write context of the exception. - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - exception.get()->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextSPARC)); - return WriteContext(context.get(), writer_args->sig_ctx); -#elif TARGET_CPU_X86 - if (writer_args->sig_ctx != NULL) { - exception.get()->exception_record.exception_address = - writer_args->sig_ctx->uc_mcontext.gregs[EIP]; - } else { - return true; - } - - // Write context of the exception. - TypedMDRVA context(minidump_writer); - if (!context.Allocate()) - return false; - exception.get()->thread_context = context.location(); - memset(context.get(), 0, sizeof(MDRawContextX86)); - return WriteContext(context.get(), - (int *)&writer_args->sig_ctx->uc_mcontext.gregs, - NULL); -#endif -} - -bool WriteMiscInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - - if (!info.Allocate()) - return false; - - dir->stream_type = MD_MISC_INFO_STREAM; - dir->location = info.location(); - info.get()->size_of_info = sizeof(MDRawMiscInfo); - info.get()->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID; - info.get()->process_id = writer_args->requester_pid; - - return true; -} - -bool WriteBreakpadInfoStream(MinidumpFileWriter *minidump_writer, - const WriterArgument *writer_args, - MDRawDirectory *dir) { - TypedMDRVA info(minidump_writer); - - if (!info.Allocate()) - return false; - - dir->stream_type = MD_BREAKPAD_INFO_STREAM; - dir->location = info.location(); - - info.get()->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info.get()->dump_thread_id = getpid(); - info.get()->requesting_thread_id = writer_args->requester_pid; - return true; -} - -class AutoLwpResumer { - public: - AutoLwpResumer(SolarisLwp *lwp) : lwp_(lwp) {} - ~AutoLwpResumer() { lwp_->ControlAllLwps(false); } - private: - SolarisLwp *lwp_; -}; - -// Prototype of writer functions. -typedef bool (*WriteStreamFN)(MinidumpFileWriter *, - const WriterArgument *, - MDRawDirectory *); - -// Function table to writer a full minidump. -const WriteStreamFN writers[] = { - WriteLwpListStream, - WriteModuleListStream, - WriteSystemInfoStream, - WriteExceptionStream, - WriteMiscInfoStream, - WriteBreakpadInfoStream, -}; - -// Will call each writer function in the writers table. -//void* MinidumpGenerator::Write(void *argument) { -void* Write(void *argument) { - WriterArgument *writer_args = static_cast(argument); - - if (!writer_args->lwp_lister->ControlAllLwps(true)) - return NULL; - - AutoLwpResumer lwpResumer(writer_args->lwp_lister); - - if (writer_args->sighandler_ebp != 0 && - writer_args->lwp_lister->FindSigContext(writer_args->sighandler_ebp, - &writer_args->sig_ctx)) { - writer_args->crashed_stack_bottom = - writer_args->lwp_lister->GetLwpStackBottom( -#if TARGET_CPU_SPARC - writer_args->sig_ctx->uc_mcontext.gregs[REG_O6] -#elif TARGET_CPU_X86 - writer_args->sig_ctx->uc_mcontext.gregs[UESP] -#endif - ); - - int crashed_lwpid = FindCrashingLwp(writer_args->crashed_stack_bottom, - writer_args->requester_pid, - writer_args->lwp_lister); - if (crashed_lwpid > 0) - writer_args->crashed_lwpid = crashed_lwpid; - } - - MinidumpFileWriter *minidump_writer = writer_args->minidump_writer; - TypedMDRVA header(minidump_writer); - TypedMDRVA dir(minidump_writer); - if (!header.Allocate()) - return 0; - - int writer_count = sizeof(writers) / sizeof(writers[0]); - // Need directory space for all writers. - if (!dir.AllocateArray(writer_count)) - return 0; - header.get()->signature = MD_HEADER_SIGNATURE; - header.get()->version = MD_HEADER_VERSION; - header.get()->time_date_stamp = time(NULL); - header.get()->stream_count = writer_count; - header.get()->stream_directory_rva = dir.position(); - - int dir_index = 0; - MDRawDirectory local_dir; - for (int i = 0; i < writer_count; ++i) { - if ((*writers[i])(minidump_writer, writer_args, &local_dir)) - dir.CopyIndex(dir_index++, &local_dir); - } - - return 0; -} - -} // namespace - -namespace google_breakpad { - -MinidumpGenerator::MinidumpGenerator() { -} - -MinidumpGenerator::~MinidumpGenerator() { -} - -// Write minidump into file. -// It runs in a different thread from the crashing thread. -bool MinidumpGenerator::WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) const { - // The exception handler thread. - pthread_t handler_thread; - - assert(file_pathname != NULL); - - if (file_pathname == NULL) - return false; - - MinidumpFileWriter minidump_writer; - if (minidump_writer.Open(file_pathname)) { - WriterArgument argument; - memset(&argument, 0, sizeof(argument)); - SolarisLwp lwp_lister(getpid()); - argument.lwp_lister = &lwp_lister; - argument.minidump_writer = &minidump_writer; - argument.requester_pid = getpid(); - argument.crashed_lwpid = pthread_self(); - argument.signo = signo; - argument.sighandler_ebp = sighandler_ebp; - argument.sig_ctx = NULL; - - pthread_create(&handler_thread, NULL, Write, (void *)&argument); - pthread_join(handler_thread, NULL); - return true; - } - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.h b/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.h deleted file mode 100644 index 882f9e1d..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_generator.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H__ -#define CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "client/solaris/handler/solaris_lwp.h" -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// -// MinidumpGenerator -// -// A minidump generator should be created before any exception happen. -// -class MinidumpGenerator { - // Callback run for writing lwp information in the process. - friend bool LwpInformationCallback(lwpstatus_t *lsp, void *context); - - // Callback run for writing module information in the process. - friend bool ModuleInfoCallback(const ModuleInfo &module_info, void *context); - - public: - MinidumpGenerator(); - - ~MinidumpGenerator(); - - // Write minidump. - bool WriteMinidumpToFile(const char *file_pathname, - int signo, - uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) const; -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_MINIDUMP_GENERATOR_H_ diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_test.cc b/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_test.cc deleted file mode 100644 index 33302d86..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/minidump_test.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include "client/minidump_file_writer.h" -#include "client/solaris/handler/minidump_generator.h" - -using std::string; -using google_breakpad::MinidumpGenerator; - -static bool doneWritingReport = false; - -static void *Reporter(void *) { - char buffer[PATH_MAX]; - MinidumpGenerator md; - - // Write it to the desktop - snprintf(buffer, sizeof(buffer), "./minidump_test.out"); - fprintf(stdout, "Writing %s\n", buffer); - - md.WriteMinidumpToFile(buffer, 0, 0, NULL); - doneWritingReport = true; - - return NULL; -} - -static void SleepyFunction() { - while (!doneWritingReport) { - usleep(100); - } -} - -int main(int argc, char * const argv[]) { - pthread_t reporter_thread; - - if (pthread_create(&reporter_thread, NULL, Reporter, NULL) == 0) { - pthread_detach(reporter_thread); - } else { - perror("pthread_create"); - } - - SleepyFunction(); - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.cc b/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.cc deleted file mode 100644 index 0148997a..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.cc +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "client/solaris/handler/solaris_lwp.h" -#include "common/solaris/message_output.h" - -using namespace google_breakpad; - -// This unamed namespace contains helper function. -namespace { - -uintptr_t stack_base_address = 0; -static const int HEADER_MAX = 2000; -static const int MAP_MAX = 1000; - -// Context information for the callbacks when validating address by listing -// modules. -struct AddressValidatingContext { - uintptr_t address; - bool is_mapped; - - AddressValidatingContext() : address(0UL), is_mapped(false) { - } -}; - -// Convert from string to int. -static bool LocalAtoi(char *s, int *r) { - assert(s != NULL); - assert(r != NULL); - char *endptr = NULL; - int ret = strtol(s, &endptr, 10); - if (endptr == s) - return false; - *r = ret; - return true; -} - -// Callback invoked for each mapped module. -// It uses the module's adderss range to validate the address. -static bool AddressNotInModuleCallback(const ModuleInfo &module_info, - void *context) { - AddressValidatingContext *addr = - reinterpret_cast(context); - if (addr->is_mapped = ((module_info.start_addr > 0) && - (addr->address >= module_info.start_addr) && - (addr->address <= module_info.start_addr + - module_info.size))) { - stack_base_address = module_info.start_addr + module_info.size; - } - - return !addr->is_mapped; -} - -static int IterateLwpAll(int pid, - CallbackParam *callback_param) { - char lwp_path[40]; - DIR *dir; - int count = 0; - - snprintf(lwp_path, sizeof (lwp_path), "/proc/%d/lwp", (int)pid); - if ((dir = opendir(lwp_path)) == NULL) - return -1; - - struct dirent *entry = NULL; - while ((entry = readdir(dir)) != NULL) { - if ((strcmp(entry->d_name, ".") != 0) && - (strcmp(entry->d_name, "..") != 0)) { - int lwpid = 0; - int last_pid = 0; - if (LocalAtoi(entry->d_name, &lwpid) && last_pid != lwpid) { - last_pid = lwpid; - ++count; - if (callback_param && - !(callback_param->call_back)(lwpid, callback_param->context)) { - break; - } - } - } - } - - closedir(dir); - return count; -} - -#if defined(__i386) && !defined(NO_FRAME_POINTER) -void *GetNextFrame(void **last_ebp) { - void *sp = *last_ebp; - if ((unsigned long)sp == (unsigned long)last_ebp) - return NULL; - if ((unsigned long)sp & (sizeof(void *) - 1)) - return NULL; - if ((unsigned long)sp - (unsigned long)last_ebp > 100000) - return NULL; - return sp; -} -#elif defined(__sparc) -void *GetNextFrame(void *last_ebp) { - return reinterpret_cast(last_ebp)->fr_savfp; -} -#else -void *GetNextFrame(void **last_ebp) { - return reinterpret_cast(last_ebp); -} -#endif - - -class AutoCloser { - public: - AutoCloser(int fd) : fd_(fd) {} - ~AutoCloser() { if (fd_) close(fd_); } - private: - int fd_; -}; - -// Control the execution of the lwp. -// Suspend/Resume lwp based on the value of context. -static bool ControlLwp(int lwpid, void *context) { - // The current thread is the one to handle the crash. Ignore it. - if (lwpid != pthread_self()) { - int ctlfd; - char procname[PATH_MAX]; - bool suspend = *(bool *)context; - - // Open the /proc/$pid/lwp/$lwpid/lwpctl files - snprintf(procname, sizeof (procname), "/proc/self/lwp/%d/lwpctl", lwpid); - - if ((ctlfd = open(procname, O_WRONLY|O_EXCL)) < 0) { - print_message2(2, "failed to open %s in ControlLwp\n", procname); - return false; - } - - AutoCloser autocloser(ctlfd); - - long ctl[2]; - ctl[0] = suspend ? PCSTOP : PCRUN; - ctl[1] = 0; - if (write(ctlfd, ctl, sizeof (ctl)) != sizeof (ctl)) { - print_message2(2, "failed in lwp %d\n", lwpid); - return false; - } - } - - return true; -} - -/* - * Utility function to read the contents of a file that contains a - * prheader_t at the start (/proc/$pid/lstatus or /proc/$pid/lpsinfo). - * Return true on success. - */ -static bool read_lfile(int pid, const char *lname, prheader_t *lhp) { - char lpath[PATH_MAX]; - struct stat statb; - int fd; - size_t size; - - snprintf(lpath, sizeof (lpath), "/proc/%d/%s", pid, lname); - if ((fd = open(lpath, O_RDONLY)) < 0) { - print_message2(2, "failed to open %s in read_lfile\n", lpath); - return false; - } - - AutoCloser autocloser(fd); - - if (fstat(fd, &statb) != 0) - return false; - - size = statb.st_size; - if ((size / sizeof (prheader_t)) + 32 > HEADER_MAX) { - print_message1(2, "map size overflow\n"); - return false; - } - - if (pread(fd, lhp, size, 0) <= sizeof (prheader_t)) - return false; - - return true; -} - -} // namespace - -namespace google_breakpad { - -SolarisLwp::SolarisLwp(int pid) : pid_(pid) { -} - -SolarisLwp::~SolarisLwp() { -} - -int SolarisLwp::ControlAllLwps(bool suspend) { - CallbackParam callback_param(ControlLwp, &suspend); - return IterateLwpAll(pid_, &callback_param); -} - -int SolarisLwp::GetLwpCount() const { - return IterateLwpAll(pid_, NULL); -} - -int SolarisLwp::Lwp_iter_all(int pid, - CallbackParam *callback_param) const { - lwpstatus_t *Lsp; - lwpstatus_t *sp; - prheader_t lphp[HEADER_MAX]; - prheader_t lhp[HEADER_MAX]; - prheader_t *Lphp = lphp; - prheader_t *Lhp = lhp; - lwpsinfo_t *Lpsp; - long nstat; - long ninfo; - int rv = 0; - - /* - * The /proc/pid/lstatus file has the array of lwpstatus_t's and the - * /proc/pid/lpsinfo file has the array of lwpsinfo_t's. - */ - if (read_lfile(pid, "lstatus", Lhp) == NULL) - return -1; - if (read_lfile(pid, "lpsinfo", Lphp) == NULL) { - return -1; - } - - Lsp = (lwpstatus_t *)(uintptr_t)(Lhp + 1); - Lpsp = (lwpsinfo_t *)(uintptr_t)(Lphp + 1); - - for (ninfo = Lphp->pr_nent; ninfo != 0; --ninfo) { - if (Lpsp->pr_sname != 'Z') { - sp = Lsp; - Lsp = (lwpstatus_t *)((uintptr_t)Lsp + Lhp->pr_entsize); - } else { - sp = NULL; - } - if (callback_param && - !(callback_param->call_back)(sp, callback_param->context)) - break; - ++rv; - Lpsp = (lwpsinfo_t *)((uintptr_t)Lpsp + Lphp->pr_entsize); - } - - return rv; -} - -uintptr_t SolarisLwp::GetLwpStackBottom(uintptr_t current_esp) const { - AddressValidatingContext addr; - addr.address = current_esp; - CallbackParam callback_param(AddressNotInModuleCallback, - &addr); - ListModules(&callback_param); - return stack_base_address; -} - -int SolarisLwp::GetModuleCount() const { - return ListModules(NULL); -} - -int SolarisLwp::ListModules( - CallbackParam *callback_param) const { - const char *maps_path = "/proc/self/map"; - struct stat status; - int fd = 0, num; - prmap_t map_array[MAP_MAX]; - prmap_t *maps = map_array; - size_t size; - - if ((fd = open(maps_path, O_RDONLY)) == -1) { - print_message2(2, "failed to open %s in ListModules\n", maps_path); - return -1; - } - - AutoCloser autocloser(fd); - - if (fstat(fd, &status)) - return -1; - - /* - * Determine number of mappings, this value must be - * larger than the actual module count - */ - size = status.st_size; - if ((num = (int)(size / sizeof (prmap_t))) > MAP_MAX) { - print_message1(2, "map size overflow\n"); - return -1; - } - - if (read(fd, (void *)maps, size) < 0) { - print_message2(2, "failed to read %d\n", fd); - return -1; - } - - prmap_t *_maps; - int _num; - int module_count = 0; - - /* - * Scan each mapping - note it is assummed that the mappings are - * presented in order. We fill holes between mappings. On intel - * the last mapping is usually the data segment of ld.so.1, after - * this comes a red zone into which non-fixed mapping won't get - * place. Thus we can simply bail from the loop after seeing the - * last mapping. - */ - for (_num = 0, _maps = maps; _num < num; ++_num, ++_maps) { - ModuleInfo module; - char *name = _maps->pr_mapname; - - memset(&module, 0, sizeof (module)); - module.start_addr = _maps->pr_vaddr; - module.size = _maps->pr_size; - if (strlen(name) > 0) { - int objectfd = 0; - char path[PATH_MAX]; - char buf[SELFMAG]; - - snprintf(path, sizeof (path), "/proc/self/object/%s", name); - if ((objectfd = open(path, O_RDONLY)) < 0) { - print_message1(2, "can't open module file\n"); - continue; - } - - AutoCloser autocloser(objectfd); - - if (read(objectfd, buf, SELFMAG) != SELFMAG) { - print_message1(2, "can't read module file\n"); - continue; - } - if (buf[0] != ELFMAG0 || buf[1] != ELFMAG1 || - buf[2] != ELFMAG2 || buf[3] != ELFMAG3) { - continue; - } - - strncpy(module.name, name, sizeof (module.name) - 1); - ++module_count; - } - if (callback_param && - (!callback_param->call_back(module, callback_param->context))) { - break; - } - } - - return module_count; -} - -// Check if the address is a valid virtual address. -// If the address is in any of the mapped modules, we take it as valid. -// Otherwise it is invalid. -bool SolarisLwp::IsAddressMapped(uintptr_t address) const { - AddressValidatingContext addr; - addr.address = address; - CallbackParam callback_param(AddressNotInModuleCallback, - &addr); - ListModules(&callback_param); - return addr.is_mapped; -} - -// We're looking for a ucontext_t as the second parameter -// to a signal handler function call. Luckily, the ucontext_t -// has an ebp(fp on SPARC) member which should match the ebp(fp) -// pointed to by the ebp(fp) of the signal handler frame. -// The Solaris stack looks like this: -// http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libproc/common/Pstack.c#81 -bool SolarisLwp::FindSigContext(uintptr_t sighandler_ebp, - ucontext_t **sig_ctx) { - uintptr_t previous_ebp; - uintptr_t sig_ebp; - const int MAX_STACK_DEPTH = 50; - int depth_counter = 0; - - do { -#if TARGET_CPU_SPARC - previous_ebp = reinterpret_cast(GetNextFrame( - reinterpret_cast(sighandler_ebp))); - *sig_ctx = reinterpret_cast(sighandler_ebp + sizeof (struct frame)); - uintptr_t sig_esp = (*sig_ctx)->uc_mcontext.gregs[REG_O6]; - if (sig_esp < previous_ebp && sig_esp > sighandler_ebp) - sig_ebp = (uintptr_t)(((struct frame *)sig_esp)->fr_savfp); - -#elif TARGET_CPU_X86 - previous_ebp = reinterpret_cast(GetNextFrame( - reinterpret_cast(sighandler_ebp))); - *sig_ctx = reinterpret_cast(sighandler_ebp + sizeof (struct frame) + - 3 * sizeof(uintptr_t)); - sig_ebp = (*sig_ctx)->uc_mcontext.gregs[EBP]; -#endif - sighandler_ebp = previous_ebp; - depth_counter++; - } while(previous_ebp != sig_ebp && sighandler_ebp != 0 && - IsAddressMapped(sighandler_ebp) && depth_counter < MAX_STACK_DEPTH); - - return previous_ebp == sig_ebp && previous_ebp != 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.h b/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.h deleted file mode 100644 index 0914cfcd..00000000 --- a/thirdparty/google-breakpad/r318/src/client/solaris/handler/solaris_lwp.h +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ -#define CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ - -#if defined(sparc) || defined(__sparc) -#define TARGET_CPU_SPARC 1 -#elif defined(i386) || defined(__i386) -#define TARGET_CPU_X86 1 -#else -#error "cannot determine cpu type" -#endif - -#include -#include -#include -#include - -#ifndef _KERNEL -#define _KERNEL -#define MUST_UNDEF_KERNEL -#endif // _KERNEL -#include -#ifdef MUST_UNDEF_KERNEL -#undef _KERNEL -#undef MUST_UNDEF_KERNEL -#endif // MUST_UNDEF_KERNEL - -namespace google_breakpad { - -// Max module path name length. -static const int kMaxModuleNameLength = 256; - -// Holding infomaton about a module in the process. -struct ModuleInfo { - char name[kMaxModuleNameLength]; - uintptr_t start_addr; - int size; -}; - -// A callback to run when getting a lwp in the process. -// Return true will go on to the next lwp while return false will stop the -// iteration. -typedef bool (*LwpCallback)(lwpstatus_t* lsp, void *context); - -// A callback to run when a new module is found in the process. -// Return true will go on to the next module while return false will stop the -// iteration. -typedef bool (*ModuleCallback)(const ModuleInfo &module_info, void *context); - -// A callback to run when getting a lwpid in the process. -// Return true will go on to the next lwp while return false will stop the -// iteration. -typedef bool (*LwpidCallback)(int lwpid, void *context); - -// Holding the callback information. -template -struct CallbackParam { - // Callback function address. - CallbackFunc call_back; - // Callback context; - void *context; - - CallbackParam() : call_back(NULL), context(NULL) { - } - - CallbackParam(CallbackFunc func, void *func_context) : - call_back(func), context(func_context) { - } -}; - -/////////////////////////////////////////////////////////////////////////////// - -// -// SolarisLwp -// -// Provides handy support for operation on Solaris lwps. -// It uses proc file system to get lwp information. -// -// TODO(Alfred): Currently it only supports x86. Add SPARC support. -// -class SolarisLwp { - public: - // Create a SolarisLwp instance to list all the lwps in a process. - explicit SolarisLwp(int pid); - ~SolarisLwp(); - - int getpid() const { return this->pid_; } - - // Control all the lwps in the process. - // Return the number of suspended/resumed lwps in the process. - // Return -1 means failed to control lwps. - int ControlAllLwps(bool suspend); - - // Get the count of lwps in the process. - // Return -1 means error. - int GetLwpCount() const; - - // Iterate the lwps of process. - // Whenever there is a lwp found, the callback will be invoked to process - // the information. - // Return the callback return value or -1 on error. - int Lwp_iter_all(int pid, CallbackParam *callback_param) const; - - // Get the module count of the current process. - int GetModuleCount() const; - - // Get the mapped modules in the address space. - // Whenever a module is found, the callback will be invoked to process the - // information. - // Return how may modules are found. - int ListModules(CallbackParam *callback_param) const; - - // Get the bottom of the stack from esp. - uintptr_t GetLwpStackBottom(uintptr_t current_esp) const; - - // Finds a signal context on the stack given the ebp of our signal handler. - bool FindSigContext(uintptr_t sighandler_ebp, ucontext_t **sig_ctx); - - private: - // Check if the address is a valid virtual address. - bool IsAddressMapped(uintptr_t address) const; - - private: - // The pid of the process we are listing lwps. - int pid_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_SOLARIS_HANDLER_SOLARIS_LWP_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/common/auto_critical_section.h b/thirdparty/google-breakpad/r318/src/client/windows/common/auto_critical_section.h deleted file mode 100644 index 82c7b7f1..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/common/auto_critical_section.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ -#define CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ - -#include - -namespace google_breakpad { - -// Automatically enters the critical section in the constructor and leaves -// the critical section in the destructor. -class AutoCriticalSection { - public: - // Creates a new instance with the given critical section object - // and enters the critical section immediately. - explicit AutoCriticalSection(CRITICAL_SECTION* cs) : cs_(cs) { - assert(cs_); - EnterCriticalSection(cs_); - } - - // Destructor: leaves the critical section. - ~AutoCriticalSection() { - LeaveCriticalSection(cs_); - } - - private: - // Disable copy ctor and operator=. - AutoCriticalSection(const AutoCriticalSection&); - AutoCriticalSection& operator=(const AutoCriticalSection&); - - CRITICAL_SECTION* cs_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_AUTO_CRITICAL_SECTION_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/common/ipc_protocol.h b/thirdparty/google-breakpad/r318/src/client/windows/common/ipc_protocol.h deleted file mode 100644 index cba8699c..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/common/ipc_protocol.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ -#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ - -#include -#include -#include -#include -#include "common/windows/string_utils-inl.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Name/value pair for custom client information. -struct CustomInfoEntry { - // Maximum length for name and value for client custom info. - static const int kNameMaxLength = 64; - static const int kValueMaxLength = 64; - - CustomInfoEntry() { - // Putting name and value in initializer list makes VC++ show warning 4351. - set_name(NULL); - set_value(NULL); - } - - CustomInfoEntry(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - void set_name(const wchar_t* name_arg) { - if (!name_arg) { - name[0] = L'\0'; - return; - } - WindowsStringUtils::safe_wcscpy(name, kNameMaxLength, name_arg); - } - - void set_value(const wchar_t* value_arg) { - if (!value_arg) { - value[0] = L'\0'; - return; - } - - WindowsStringUtils::safe_wcscpy(value, kValueMaxLength, value_arg); - } - - void set(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - wchar_t name[kNameMaxLength]; - wchar_t value[kValueMaxLength]; -}; - -// Constants for the protocol between client and the server. - -// Tags sent with each message indicating the purpose of -// the message. -enum MessageTag { - MESSAGE_TAG_NONE = 0, - MESSAGE_TAG_REGISTRATION_REQUEST = 1, - MESSAGE_TAG_REGISTRATION_RESPONSE = 2, - MESSAGE_TAG_REGISTRATION_ACK = 3 -}; - -struct CustomClientInfo { - const CustomInfoEntry* entries; - int count; -}; - -// Message structure for IPC between crash client and crash server. -struct ProtocolMessage { - ProtocolMessage() - : tag(MESSAGE_TAG_NONE), - pid(0), - dump_type(MiniDumpNormal), - thread_id(0), - exception_pointers(NULL), - assert_info(NULL), - custom_client_info(), - dump_request_handle(NULL), - dump_generated_handle(NULL), - server_alive_handle(NULL) { - } - - // Creates an instance with the given parameters. - ProtocolMessage(MessageTag arg_tag, - DWORD arg_pid, - MINIDUMP_TYPE arg_dump_type, - DWORD* arg_thread_id, - EXCEPTION_POINTERS** arg_exception_pointers, - MDRawAssertionInfo* arg_assert_info, - const CustomClientInfo& custom_info, - HANDLE arg_dump_request_handle, - HANDLE arg_dump_generated_handle, - HANDLE arg_server_alive) - : tag(arg_tag), - pid(arg_pid), - dump_type(arg_dump_type), - thread_id(arg_thread_id), - exception_pointers(arg_exception_pointers), - assert_info(arg_assert_info), - custom_client_info(custom_info), - dump_request_handle(arg_dump_request_handle), - dump_generated_handle(arg_dump_generated_handle), - server_alive_handle(arg_server_alive) { - } - - // Tag in the message. - MessageTag tag; - - // Process id. - DWORD pid; - - // Dump type requested. - MINIDUMP_TYPE dump_type; - - // Client thread id pointer. - DWORD* thread_id; - - // Exception information. - EXCEPTION_POINTERS** exception_pointers; - - // Assert information in case of an invalid parameter or - // pure call failure. - MDRawAssertionInfo* assert_info; - - // Custom client information. - CustomClientInfo custom_client_info; - - // Handle to signal the crash event. - HANDLE dump_request_handle; - - // Handle to check if server is done generating crash. - HANDLE dump_generated_handle; - - // Handle to a mutex that becomes signaled (WAIT_ABANDONED) - // if server process goes down. - HANDLE server_alive_handle; - - private: - // Disable copy ctor and operator=. - ProtocolMessage(const ProtocolMessage& msg); - ProtocolMessage& operator=(const ProtocolMessage& msg); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/ReadMe.txt b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/ReadMe.txt deleted file mode 100644 index b54d0e11..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/ReadMe.txt +++ /dev/null @@ -1,58 +0,0 @@ -========================================================================= - State machine transitions for the Crash Generation Server -========================================================================= - -========================================================================= - | - STATE | ACTIONS - | -========================================================================= - ERROR | Clean up resources used to serve clients. - | Always remain in ERROR state. -------------------------------------------------------------------------- - INITIAL | Connect to the pipe asynchronously. - | If connection is successfully queued up asynchronously, - | go into CONNECTING state. - | If connection is done synchronously, go into CONNECTED - | state. - | For any unexpected problems, go into ERROR state. -------------------------------------------------------------------------- - CONNECTING | Get the result of async connection request. - | If I/O is still incomplete, remain in the CONNECTING - | state. - | If connection is complete, go into CONNECTED state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - CONNECTED | Read from the pipe asynchronously. - | If read request is successfully queued up asynchronously, - | go into READING state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READING | Get the result of async read request. - | If read is done, go into READ_DONE state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READ_DONE | Register the client, prepare the reply and write the - | reply to the pipe asynchronously. - | If write request is successfully queued up asynchronously, - | go into WRITING state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - WRITING | Get the result of the async write request. - | If write is done, go into WRITE_DONE state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - WRITE_DONE | Read from the pipe asynchronously (for an ACK). - | If read request is successfully queued up asynchonously, - | go into READING_ACK state. - | For any unexpected problems, go into DISCONNECTING state. -------------------------------------------------------------------------- - READING_ACK | Get the result of the async read request. - | If read is done, perform action for successful client - | connection. - | Go into DISCONNECTING state. -------------------------------------------------------------------------- - DISCONNECTING | Disconnect from the pipe, reset the event and go into - | INITIAL state and signal the event again. If anything - | fails, go into ERROR state. -========================================================================= diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.cc b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.cc deleted file mode 100644 index 4752c4ae..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.cc +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/common/ipc_protocol.h" - -static const wchar_t kCustomInfoProcessUptimeName[] = L"ptime"; - -namespace google_breakpad { - -ClientInfo::ClientInfo(CrashGenerationServer* crash_server, - DWORD pid, - MINIDUMP_TYPE dump_type, - DWORD* thread_id, - EXCEPTION_POINTERS** ex_info, - MDRawAssertionInfo* assert_info, - const CustomClientInfo& custom_client_info) - : crash_server_(crash_server), - pid_(pid), - dump_type_(dump_type), - ex_info_(ex_info), - assert_info_(assert_info), - custom_client_info_(custom_client_info), - thread_id_(thread_id), - process_handle_(NULL), - dump_requested_handle_(NULL), - dump_generated_handle_(NULL), - dump_request_wait_handle_(NULL), - process_exit_wait_handle_(NULL) { - GetSystemTimeAsFileTime(&start_time_); -} - -bool ClientInfo::Initialize() { - process_handle_ = OpenProcess(GENERIC_ALL, FALSE, pid_); - if (!process_handle_) { - return false; - } - - dump_requested_handle_ = CreateEvent(NULL, // Security attributes. - TRUE, // Manual reset. - FALSE, // Initial state. - NULL); // Name. - if (!dump_requested_handle_) { - return false; - } - - dump_generated_handle_ = CreateEvent(NULL, // Security attributes. - TRUE, // Manual reset. - FALSE, // Initial state. - NULL); // Name. - return dump_generated_handle_ != NULL; -} - -ClientInfo::~ClientInfo() { - if (dump_request_wait_handle_) { - // Wait for callbacks that might already be running to finish. - UnregisterWaitEx(dump_request_wait_handle_, INVALID_HANDLE_VALUE); - } - - if (process_exit_wait_handle_) { - // Wait for the callback that might already be running to finish. - UnregisterWaitEx(process_exit_wait_handle_, INVALID_HANDLE_VALUE); - } - - if (process_handle_) { - CloseHandle(process_handle_); - } - - if (dump_requested_handle_) { - CloseHandle(dump_requested_handle_); - } - - if (dump_generated_handle_) { - CloseHandle(dump_generated_handle_); - } -} - -bool ClientInfo::UnregisterWaits() { - bool success = true; - - if (dump_request_wait_handle_) { - if (!UnregisterWait(dump_request_wait_handle_)) { - success = false; - } else { - dump_request_wait_handle_ = NULL; - } - } - - if (process_exit_wait_handle_) { - if (!UnregisterWait(process_exit_wait_handle_)) { - success = false; - } else { - process_exit_wait_handle_ = NULL; - } - } - - return success; -} - -bool ClientInfo::GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const { - SIZE_T bytes_count = 0; - if (!ReadProcessMemory(process_handle_, - ex_info_, - ex_info, - sizeof(*ex_info), - &bytes_count)) { - return false; - } - - return bytes_count == sizeof(*ex_info); -} - -bool ClientInfo::GetClientThreadId(DWORD* thread_id) const { - SIZE_T bytes_count = 0; - if (!ReadProcessMemory(process_handle_, - thread_id_, - thread_id, - sizeof(*thread_id), - &bytes_count)) { - return false; - } - - return bytes_count == sizeof(*thread_id); -} - -void ClientInfo::SetProcessUptime() { - FILETIME now = {0}; - GetSystemTimeAsFileTime(&now); - - ULARGE_INTEGER time_start; - time_start.HighPart = start_time_.dwHighDateTime; - time_start.LowPart = start_time_.dwLowDateTime; - - ULARGE_INTEGER time_now; - time_now.HighPart = now.dwHighDateTime; - time_now.LowPart = now.dwLowDateTime; - - // Calculate the delay and convert it from 100-nanoseconds to milliseconds. - __int64 delay = (time_now.QuadPart - time_start.QuadPart) / 10 / 1000; - - // Convert it to a string. - wchar_t* value = custom_info_entries_.get()[custom_client_info_.count].value; - _i64tow_s(delay, value, CustomInfoEntry::kValueMaxLength, 10); -} - -bool ClientInfo::PopulateCustomInfo() { - SIZE_T bytes_count = 0; - SIZE_T read_count = sizeof(CustomInfoEntry) * custom_client_info_.count; - - // If the scoped array for custom info already has an array, it will be - // the same size as what we need. This is because the number of custom info - // entries is always the same. So allocate memory only if scoped array has - // a NULL pointer. - if (!custom_info_entries_.get()) { - // Allocate an extra entry for reporting uptime for the client process. - custom_info_entries_.reset( - new CustomInfoEntry[custom_client_info_.count + 1]); - // Use the last element in the array for uptime. - custom_info_entries_.get()[custom_client_info_.count].set_name( - kCustomInfoProcessUptimeName); - } - - if (!ReadProcessMemory(process_handle_, - custom_client_info_.entries, - custom_info_entries_.get(), - read_count, - &bytes_count)) { - return false; - } - - SetProcessUptime(); - return (bytes_count != read_count); -} - -CustomClientInfo ClientInfo::GetCustomInfo() const { - CustomClientInfo custom_info; - custom_info.entries = custom_info_entries_.get(); - // Add 1 to the count from the client process to account for extra entry for - // process uptime. - custom_info.count = custom_client_info_.count + 1; - return custom_info; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.h b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.h deleted file mode 100644 index 774816fb..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/client_info.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -class CrashGenerationServer; - -// Abstraction for a crash client process. -class ClientInfo { - public: - // Creates an instance with the given values. Gets the process - // handle for the given process id and creates necessary event - // objects. - ClientInfo(CrashGenerationServer* crash_server, - DWORD pid, - MINIDUMP_TYPE dump_type, - DWORD* thread_id, - EXCEPTION_POINTERS** ex_info, - MDRawAssertionInfo* assert_info, - const CustomClientInfo& custom_client_info); - - ~ClientInfo(); - - CrashGenerationServer* crash_server() const { return crash_server_; } - DWORD pid() const { return pid_; } - MINIDUMP_TYPE dump_type() const { return dump_type_; } - EXCEPTION_POINTERS** ex_info() const { return ex_info_; } - MDRawAssertionInfo* assert_info() const { return assert_info_; } - DWORD* thread_id() const { return thread_id_; } - HANDLE process_handle() const { return process_handle_; } - HANDLE dump_requested_handle() const { return dump_requested_handle_; } - HANDLE dump_generated_handle() const { return dump_generated_handle_; } - - HANDLE dump_request_wait_handle() const { - return dump_request_wait_handle_; - } - - void set_dump_request_wait_handle(HANDLE value) { - dump_request_wait_handle_ = value; - } - - HANDLE process_exit_wait_handle() const { - return process_exit_wait_handle_; - } - - void set_process_exit_wait_handle(HANDLE value) { - process_exit_wait_handle_ = value; - } - - // Unregister all waits for the client. - bool UnregisterWaits(); - - bool Initialize(); - bool GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const; - bool GetClientThreadId(DWORD* thread_id) const; - - // Reads the custom information from the client process address space. - bool PopulateCustomInfo(); - - // Returns the client custom information. - CustomClientInfo GetCustomInfo() const; - - private: - // Calcualtes the uptime for the client process, converts it to a string and - // stores it in the last entry of client custom info. - void SetProcessUptime(); - - // Crash generation server. - CrashGenerationServer* crash_server_; - - // Client process ID. - DWORD pid_; - - // Dump type requested by the client. - MINIDUMP_TYPE dump_type_; - - // Address of an EXCEPTION_POINTERS* variable in the client - // process address space that will point to an instance of - // EXCEPTION_POINTERS containing information about crash. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - EXCEPTION_POINTERS** ex_info_; - - // Address of an instance of MDRawAssertionInfo in the client - // process address space that will contain information about - // non-exception related crashes like invalid parameter assertion - // failures and pure calls. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - MDRawAssertionInfo* assert_info_; - - // Custom information about the client. - CustomClientInfo custom_client_info_; - - // Contains the custom client info entries read from the client process - // memory. This will be populated only if the method GetClientCustomInfo - // is called. - scoped_array custom_info_entries_; - - // Address of a variable in the client process address space that - // will contain the thread id of the crashing client thread. - // - // WARNING: Do not dereference these pointers as they are pointers - // in the address space of another process. - DWORD* thread_id_; - - // Client process handle. - HANDLE process_handle_; - - // Dump request event handle. - HANDLE dump_requested_handle_; - - // Dump generated event handle. - HANDLE dump_generated_handle_; - - // Wait handle for dump request event. - HANDLE dump_request_wait_handle_; - - // Wait handle for process exit event. - HANDLE process_exit_wait_handle_; - - // Time when the client process started. It is used to determine the uptime - // for the client process when it signals a crash. - FILETIME start_time_; - - // Disallow copy ctor and operator=. - ClientInfo(const ClientInfo& client_info); - ClientInfo& operator=(const ClientInfo& client_info); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CLIENT_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.cc b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.cc deleted file mode 100644 index 197807ab..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/crash_generation_client.h" -#include -#include -#include "client/windows/common/ipc_protocol.h" - -namespace google_breakpad { - -const int kPipeBusyWaitTimeoutMs = 2000; - -#ifdef _DEBUG -const DWORD kWaitForServerTimeoutMs = INFINITE; -#else -const DWORD kWaitForServerTimeoutMs = 15000; -#endif - -const int kPipeConnectMaxAttempts = 2; - -const DWORD kPipeDesiredAccess = FILE_READ_DATA | - FILE_WRITE_DATA | - FILE_WRITE_ATTRIBUTES; - -const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION | - SECURITY_SQOS_PRESENT; - -const DWORD kPipeMode = PIPE_READMODE_MESSAGE; - -const size_t kWaitEventCount = 2; - -// This function is orphan for production code. It can be used -// for debugging to help repro some scenarios like the client -// is slow in writing to the pipe after connecting, the client -// is slow in reading from the pipe after writing, etc. The parameter -// overlapped below is not used and it is present to match the signature -// of this function to TransactNamedPipe Win32 API. Uncomment if needed -// for debugging. -/** -static bool TransactNamedPipeDebugHelper(HANDLE pipe, - const void* in_buffer, - DWORD in_size, - void* out_buffer, - DWORD out_size, - DWORD* bytes_count, - LPOVERLAPPED) { - // Uncomment the next sleep to create a gap before writing - // to pipe. - // Sleep(5000); - - if (!WriteFile(pipe, - in_buffer, - in_size, - bytes_count, - NULL)) { - return false; - } - - // Uncomment the next sleep to create a gap between write - // and read. - // Sleep(5000); - - return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; -} -**/ - -CrashGenerationClient::CrashGenerationClient( - const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info) - : pipe_name_(pipe_name), - dump_type_(dump_type), - thread_id_(0), - server_process_id_(0), - crash_event_(NULL), - crash_generated_(NULL), - server_alive_(NULL), - exception_pointers_(NULL), - custom_info_() { - memset(&assert_info_, 0, sizeof(assert_info_)); - if (custom_info) { - custom_info_ = *custom_info; - } -} - -CrashGenerationClient::~CrashGenerationClient() { - if (crash_event_) { - CloseHandle(crash_event_); - } - - if (crash_generated_) { - CloseHandle(crash_generated_); - } - - if (server_alive_) { - CloseHandle(server_alive_); - } -} - -// Performs the registration step with the server process. -// The registration step involves communicating with the server -// via a named pipe. The client sends the following pieces of -// data to the server: -// -// * Message tag indicating the client is requesting registration. -// * Process id of the client process. -// * Address of a DWORD variable in the client address space -// that will contain the thread id of the client thread that -// caused the crash. -// * Address of a EXCEPTION_POINTERS* variable in the client -// address space that will point to an instance of EXCEPTION_POINTERS -// when the crash happens. -// * Address of an instance of MDRawAssertionInfo that will contain -// relevant information in case of non-exception crashes like assertion -// failures and pure calls. -// -// In return the client expects the following information from the server: -// -// * Message tag indicating successful registration. -// * Server process id. -// * Handle to an object that client can signal to request dump -// generation from the server. -// * Handle to an object that client can wait on after requesting -// dump generation for the server to finish dump generation. -// * Handle to a mutex object that client can wait on to make sure -// server is still alive. -// -// If any step of the expected behavior mentioned above fails, the -// registration step is not considered successful and hence out-of-process -// dump generation service is not available. -// -// Returns true if the registration is successful; false otherwise. -bool CrashGenerationClient::Register() { - HANDLE pipe = ConnectToServer(); - if (!pipe) { - return false; - } - - bool success = RegisterClient(pipe); - CloseHandle(pipe); - return success; -} - -HANDLE CrashGenerationClient::ConnectToServer() { - HANDLE pipe = ConnectToPipe(pipe_name_.c_str(), - kPipeDesiredAccess, - kPipeFlagsAndAttributes); - if (!pipe) { - return NULL; - } - - DWORD mode = kPipeMode; - if (!SetNamedPipeHandleState(pipe, &mode, NULL, NULL)) { - CloseHandle(pipe); - pipe = NULL; - } - - return pipe; -} - -bool CrashGenerationClient::RegisterClient(HANDLE pipe) { - ProtocolMessage msg(MESSAGE_TAG_REGISTRATION_REQUEST, - GetCurrentProcessId(), - dump_type_, - &thread_id_, - &exception_pointers_, - &assert_info_, - custom_info_, - NULL, - NULL, - NULL); - ProtocolMessage reply; - DWORD bytes_count = 0; - // The call to TransactNamedPipe below can be changed to a call - // to TransactNamedPipeDebugHelper to help repro some scenarios. - // For details see comments for TransactNamedPipeDebugHelper. - if (!TransactNamedPipe(pipe, - &msg, - sizeof(msg), - &reply, - sizeof(ProtocolMessage), - &bytes_count, - NULL)) { - return false; - } - - if (!ValidateResponse(reply)) { - return false; - } - - ProtocolMessage ack_msg; - ack_msg.tag = MESSAGE_TAG_REGISTRATION_ACK; - - if (!WriteFile(pipe, &ack_msg, sizeof(ack_msg), &bytes_count, NULL)) { - return false; - } - crash_event_ = reply.dump_request_handle; - crash_generated_ = reply.dump_generated_handle; - server_alive_ = reply.server_alive_handle; - server_process_id_ = reply.pid; - - return true; -} - -HANDLE CrashGenerationClient::ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs) { - for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { - HANDLE pipe = CreateFile(pipe_name, - pipe_access, - 0, - NULL, - OPEN_EXISTING, - flags_attrs, - NULL); - if (pipe != INVALID_HANDLE_VALUE) { - return pipe; - } - - // Cannot continue retrying if error is something other than - // ERROR_PIPE_BUSY. - if (GetLastError() != ERROR_PIPE_BUSY) { - break; - } - - // Cannot continue retrying if wait on pipe fails. - if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { - break; - } - } - - return NULL; -} - -bool CrashGenerationClient::ValidateResponse( - const ProtocolMessage& msg) const { - return (msg.tag == MESSAGE_TAG_REGISTRATION_RESPONSE) && - (msg.pid != 0) && - (msg.dump_request_handle != NULL) && - (msg.dump_generated_handle != NULL) && - (msg.server_alive_handle != NULL); -} - -bool CrashGenerationClient::IsRegistered() const { - return crash_event_ != NULL; -} - -bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info) { - if (!IsRegistered()) { - return false; - } - - exception_pointers_ = ex_info; - thread_id_ = GetCurrentThreadId(); - - assert_info_.line = 0; - assert_info_.type = 0; - assert_info_.expression[0] = 0; - assert_info_.file[0] = 0; - assert_info_.function[0] = 0; - - return SignalCrashEventAndWait(); -} - -bool CrashGenerationClient::RequestDump(MDRawAssertionInfo* assert_info) { - if (!IsRegistered()) { - return false; - } - - exception_pointers_ = NULL; - - if (assert_info) { - memcpy(&assert_info_, assert_info, sizeof(assert_info_)); - } else { - memset(&assert_info_, 0, sizeof(assert_info_)); - } - - thread_id_ = GetCurrentThreadId(); - - return SignalCrashEventAndWait(); -} - -bool CrashGenerationClient::SignalCrashEventAndWait() { - assert(crash_event_); - assert(crash_generated_); - assert(server_alive_); - - // Reset the dump generated event before signaling the crash - // event so that the server can set the dump generated event - // once it is done generating the event. - if (!ResetEvent(crash_generated_)) { - return false; - } - - if (!SetEvent(crash_event_)) { - return false; - } - - HANDLE wait_handles[kWaitEventCount] = {crash_generated_, server_alive_}; - - DWORD result = WaitForMultipleObjects(kWaitEventCount, - wait_handles, - FALSE, - kWaitForServerTimeoutMs); - - // Crash dump was successfully generated only if the server - // signaled the crash generated event. - return result == WAIT_OBJECT_0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.h b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.h deleted file mode 100644 index 81b0e6ca..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ - -#include -#include -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -struct CustomClientInfo; - -// Abstraction of client-side implementation of out of process -// crash generation. -// -// The process that desires to have out-of-process crash dump -// generation service can use this class in the following way: -// -// * Create an instance. -// * Call Register method so that the client tries to register -// with the server process and check the return value. If -// registration is not successful, out-of-process crash dump -// generation will not be available -// * Request dump generation by calling either of the two -// overloaded RequestDump methods - one in case of exceptions -// and the other in case of assertion failures -// -// Note that it is the responsibility of the client code of -// this class to set the unhandled exception filter with the -// system by calling the SetUnhandledExceptionFilter function -// and the client code should explicitly request dump generation. -class CrashGenerationClient { - public: - CrashGenerationClient(const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info); - - ~CrashGenerationClient(); - - // Registers the client process with the crash server. - // - // Returns true if the registration is successful; false otherwise. - bool Register(); - - // Requests the crash server to generate a dump with the given - // exception information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(EXCEPTION_POINTERS* ex_info); - - // Requests the crash server to generate a dump with the given - // assertion information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(MDRawAssertionInfo* assert_info); - - private: - // Connects to the appropriate pipe and sets the pipe handle state. - // - // Returns the pipe handle if everything goes well; otherwise Returns NULL. - HANDLE ConnectToServer(); - - // Performs a handshake with the server over the given pipe which should be - // already connected to the server. - // - // Returns true if handshake with the server was successful; false otherwise. - bool RegisterClient(HANDLE pipe); - - // Validates the given server response. - bool ValidateResponse(const ProtocolMessage& msg) const; - - // Returns true if the registration step succeeded; false otherwise. - bool IsRegistered() const; - - // Connects to the given named pipe with given parameters. - // - // Returns true if the connection is successful; false otherwise. - HANDLE ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs); - - // Signals the crash event and wait for the server to generate crash. - bool SignalCrashEventAndWait(); - - // Pipe name to use to talk to server. - std::wstring pipe_name_; - - // Custom client information - CustomClientInfo custom_info_; - - // Type of dump to generate. - MINIDUMP_TYPE dump_type_; - - // Event to signal in case of a crash. - HANDLE crash_event_; - - // Handle to wait on after signaling a crash for the server - // to finish generating crash dump. - HANDLE crash_generated_; - - // Handle to a mutex that will become signaled with WAIT_ABANDONED - // if the server process goes down. - HANDLE server_alive_; - - // Server process id. - DWORD server_process_id_; - - // Id of the thread that caused the crash. - DWORD thread_id_; - - // Exception pointers for an exception crash. - EXCEPTION_POINTERS* exception_pointers_; - - // Assertion info for an invalid parameter or pure call crash. - MDRawAssertionInfo assert_info_; - - // Disable copy ctor and operator=. - CrashGenerationClient(const CrashGenerationClient& crash_client); - CrashGenerationClient& operator=(const CrashGenerationClient& crash_client); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.cc b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.cc deleted file mode 100644 index ac76e590..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.cc +++ /dev/null @@ -1,852 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/crash_generation_server.h" -#include -#include -#include -#include "client/windows/common/auto_critical_section.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -// Output buffer size. -static const size_t kOutBufferSize = 64; - -// Input buffer size. -static const size_t kInBufferSize = 64; - -// Access flags for the client on the dump request event. -static const DWORD kDumpRequestEventAccess = EVENT_MODIFY_STATE; - -// Access flags for the client on the dump generated event. -static const DWORD kDumpGeneratedEventAccess = EVENT_MODIFY_STATE | - SYNCHRONIZE; - -// Access flags for the client on the mutex. -static const DWORD kMutexAccess = SYNCHRONIZE; - -// Attribute flags for the pipe. -static const DWORD kPipeAttr = FILE_FLAG_FIRST_PIPE_INSTANCE | - PIPE_ACCESS_DUPLEX | - FILE_FLAG_OVERLAPPED; - -// Mode for the pipe. -static const DWORD kPipeMode = PIPE_TYPE_MESSAGE | - PIPE_READMODE_MESSAGE | - PIPE_WAIT; - -// For pipe I/O, execute the callback in the wait thread itself, -// since the callback does very little work. The callback executes -// the code for one of the states of the server state machine and -// the code for all of the states perform async I/O and hence -// finish very quickly. -static const ULONG kPipeIOThreadFlags = WT_EXECUTEINWAITTHREAD; - -// Dump request threads will, most likely, generate dumps. That may -// take some time to finish, so specify WT_EXECUTELONGFUNCTION flag. -static const ULONG kDumpRequestThreadFlags = WT_EXECUTEINWAITTHREAD | - WT_EXECUTELONGFUNCTION; - -// Maximum delay during server shutdown if some work items -// are still executing. -static const int kShutdownDelayMs = 10000; - -// Interval for each sleep during server shutdown. -static const int kShutdownSleepIntervalMs = 5; - -static bool IsClientRequestValid(const ProtocolMessage& msg) { - return msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST && - msg.pid != 0 && - msg.thread_id != NULL && - msg.exception_pointers != NULL && - msg.assert_info != NULL; -} - -CrashGenerationServer::CrashGenerationServer( - const std::wstring& pipe_name, - SECURITY_ATTRIBUTES* pipe_sec_attrs, - OnClientConnectedCallback connect_callback, - void* connect_context, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitedCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::wstring* dump_path) - : pipe_name_(pipe_name), - pipe_sec_attrs_(pipe_sec_attrs), - pipe_(NULL), - pipe_wait_handle_(NULL), - server_alive_handle_(NULL), - connect_callback_(connect_callback), - connect_context_(connect_context), - dump_callback_(dump_callback), - dump_context_(dump_context), - exit_callback_(exit_callback), - exit_context_(exit_context), - generate_dumps_(generate_dumps), - dump_generator_(NULL), - server_state_(IPC_SERVER_STATE_INITIAL), - shutting_down_(false), - overlapped_(), - client_info_(NULL), - cleanup_item_count_(0) { - InitializeCriticalSection(&clients_sync_); - - if (dump_path) { - dump_generator_.reset(new MinidumpGenerator(*dump_path)); - } -} - -CrashGenerationServer::~CrashGenerationServer() { - // Indicate to existing threads that server is shutting down. - shutting_down_ = true; - - // Even if there are no current worker threads running, it is possible that - // an I/O request is pending on the pipe right now but not yet done. In fact, - // it's very likely this is the case unless we are in an ERROR state. If we - // don't wait for the pending I/O to be done, then when the I/O completes, - // it may write to invalid memory. AppVerifier will flag this problem too. - // So we disconnect from the pipe and then wait for the server to get into - // error state so that the pending I/O will fail and get cleared. - DisconnectNamedPipe(pipe_); - int num_tries = 100; - while (num_tries-- && server_state_ != IPC_SERVER_STATE_ERROR) { - Sleep(10); - } - - // Unregister wait on the pipe. - if (pipe_wait_handle_) { - // Wait for already executing callbacks to finish. - UnregisterWaitEx(pipe_wait_handle_, INVALID_HANDLE_VALUE); - } - - // Close the pipe to avoid further client connections. - if (pipe_) { - CloseHandle(pipe_); - } - - // Request all ClientInfo objects to unregister all waits. - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - - std::list::iterator iter; - for (iter = clients_.begin(); iter != clients_.end(); ++iter) { - ClientInfo* client_info = *iter; - client_info->UnregisterWaits(); - } - } - - // Now that all waits have been unregistered, wait for some time - // for all pending work items to finish. - int total_wait = 0; - while (cleanup_item_count_ > 0) { - Sleep(kShutdownSleepIntervalMs); - - total_wait += kShutdownSleepIntervalMs; - - if (total_wait >= kShutdownDelayMs) { - break; - } - } - - // Clean up all the ClientInfo objects. - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - - std::list::iterator iter; - for (iter = clients_.begin(); iter != clients_.end(); ++iter) { - ClientInfo* client_info = *iter; - delete client_info; - } - } - - if (server_alive_handle_) { - // Release the mutex before closing the handle so that clients requesting - // dumps wait for a long time for the server to generate a dump. - ReleaseMutex(server_alive_handle_); - CloseHandle(server_alive_handle_); - } - - DeleteCriticalSection(&clients_sync_); -} - -bool CrashGenerationServer::Start() { - server_state_ = IPC_SERVER_STATE_INITIAL; - - server_alive_handle_ = CreateMutex(NULL, TRUE, NULL); - if (!server_alive_handle_) { - return false; - } - - // Event to signal the client connection and pipe reads and writes. - overlapped_.hEvent = CreateEvent(NULL, // Security descriptor. - TRUE, // Manual reset. - FALSE, // Initially signaled. - NULL); // Name. - if (!overlapped_.hEvent) { - return false; - } - - // Register a callback with the thread pool for the client connection. - RegisterWaitForSingleObject(&pipe_wait_handle_, - overlapped_.hEvent, - OnPipeConnected, - this, - INFINITE, - kPipeIOThreadFlags); - - pipe_ = CreateNamedPipe(pipe_name_.c_str(), - kPipeAttr, - kPipeMode, - 1, - kOutBufferSize, - kInBufferSize, - 0, - pipe_sec_attrs_); - if (pipe_ == INVALID_HANDLE_VALUE) { - return false; - } - - // Signal the event to start a separate thread to handle - // client connections. - return SetEvent(overlapped_.hEvent) != FALSE; -} - -// If the server thread serving clients ever gets into the -// ERROR state, reset the event, close the pipe and remain -// in the error state forever. Error state means something -// that we didn't account for has happened, and it's dangerous -// to do anything unknowingly. -void CrashGenerationServer::HandleErrorState() { - assert(server_state_ == IPC_SERVER_STATE_ERROR); - - // If the server is shutting down anyway, don't clean up - // here since shut down process will clean up. - if (shutting_down_) { - return; - } - - if (pipe_wait_handle_) { - UnregisterWait(pipe_wait_handle_); - pipe_wait_handle_ = NULL; - } - - if (pipe_) { - CloseHandle(pipe_); - pipe_ = NULL; - } - - if (overlapped_.hEvent) { - CloseHandle(overlapped_.hEvent); - overlapped_.hEvent = NULL; - } -} - -// When the server thread serving clients is in the INITIAL state, -// try to connect to the pipe asynchronously. If the connection -// finishes synchronously, directly go into the CONNECTED state; -// otherwise go into the CONNECTING state. For any problems, go -// into the ERROR state. -void CrashGenerationServer::HandleInitialState() { - assert(server_state_ == IPC_SERVER_STATE_INITIAL); - - if (!ResetEvent(overlapped_.hEvent)) { - server_state_ = IPC_SERVER_STATE_ERROR; - return; - } - - bool success = ConnectNamedPipe(pipe_, &overlapped_) != FALSE; - - // From MSDN, it is not clear that when ConnectNamedPipe is used - // in an overlapped mode, will it ever return non-zero value, and - // if so, in what cases. - assert(!success); - - DWORD error_code = GetLastError(); - switch (error_code) { - case ERROR_IO_PENDING: - server_state_ = IPC_SERVER_STATE_CONNECTING; - break; - - case ERROR_PIPE_CONNECTED: - if (SetEvent(overlapped_.hEvent)) { - server_state_ = IPC_SERVER_STATE_CONNECTED; - } else { - server_state_ = IPC_SERVER_STATE_ERROR; - } - break; - - default: - server_state_ = IPC_SERVER_STATE_ERROR; - break; - } -} - -// When the server thread serving the clients is in the CONNECTING state, -// try to get the result of the asynchronous connection request using -// the OVERLAPPED object. If the result indicates the connection is done, -// go into the CONNECTED state. If the result indicates I/O is still -// INCOMPLETE, remain in the CONNECTING state. For any problems, -// go into the DISCONNECTING state. -void CrashGenerationServer::HandleConnectingState() { - assert(server_state_ == IPC_SERVER_STATE_CONNECTING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - - if (success) { - server_state_ = IPC_SERVER_STATE_CONNECTED; - return; - } - - if (GetLastError() != ERROR_IO_INCOMPLETE) { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - } -} - -// When the server thread serving the clients is in the CONNECTED state, -// try to issue an asynchronous read from the pipe. If read completes -// synchronously or if I/O is pending then go into the READING state. -// For any problems, go into the DISCONNECTING state. -void CrashGenerationServer::HandleConnectedState() { - assert(server_state_ == IPC_SERVER_STATE_CONNECTED); - - DWORD bytes_count = 0; - memset(&msg_, 0, sizeof(msg_)); - bool success = ReadFile(pipe_, - &msg_, - sizeof(msg_), - &bytes_count, - &overlapped_) != FALSE; - - // Note that the asynchronous read issued above can finish before the - // code below executes. But, it is okay to change state after issuing - // the asynchronous read. This is because even if the asynchronous read - // is done, the callback for it would not be executed until the current - // thread finishes its execution. - if (success || GetLastError() == ERROR_IO_PENDING) { - server_state_ = IPC_SERVER_STATE_READING; - } else { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - } -} - -// When the server thread serving the clients is in the READING state, -// try to get the result of the async read. If async read is done, -// go into the READ_DONE state. For any problems, go into the -// DISCONNECTING state. -void CrashGenerationServer::HandleReadingState() { - assert(server_state_ == IPC_SERVER_STATE_READING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - - if (success && bytes_count == sizeof(ProtocolMessage)) { - server_state_ = IPC_SERVER_STATE_READ_DONE; - return; - } - - DWORD error_code; - error_code = GetLastError(); - - // We should never get an I/O incomplete since we should not execute this - // unless the Read has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - - server_state_ = IPC_SERVER_STATE_DISCONNECTING; -} - -// When the server thread serving the client is in the READ_DONE state, -// validate the client's request message, register the client by -// creating appropriate objects and prepare the response. Then try to -// write the response to the pipe asynchronously. If that succeeds, -// go into the WRITING state. For any problems, go into the DISCONNECTING -// state. -void CrashGenerationServer::HandleReadDoneState() { - assert(server_state_ == IPC_SERVER_STATE_READ_DONE); - - if (!IsClientRequestValid(msg_)) { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - return; - } - - scoped_ptr client_info( - new ClientInfo(this, - msg_.pid, - msg_.dump_type, - msg_.thread_id, - msg_.exception_pointers, - msg_.assert_info, - msg_.custom_client_info)); - - if (!client_info->Initialize()) { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - return; - } - - if (!RespondToClient(client_info.get())) { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - return; - } - - // Note that the asynchronous write issued by RespondToClient function - // can finish before the code below executes. But it is okay to change - // state after issuing the asynchronous write. This is because even if - // the asynchronous write is done, the callback for it would not be - // executed until the current thread finishes its execution. - server_state_ = IPC_SERVER_STATE_WRITING; - client_info_ = client_info.release(); -} - -// When the server thread serving the clients is in the WRITING state, -// try to get the result of the async write. If the async write is done, -// go into the WRITE_DONE state. For any problems, go into the -// DISONNECTING state. -void CrashGenerationServer::HandleWritingState() { - assert(server_state_ == IPC_SERVER_STATE_WRITING); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - - if (success) { - server_state_ = IPC_SERVER_STATE_WRITE_DONE; - return; - } - - DWORD error_code; - error_code = GetLastError(); - - // We should never get an I/O incomplete since we should not execute this - // unless the Write has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - - server_state_ = IPC_SERVER_STATE_DISCONNECTING; -} - -// When the server thread serving the clients is in the WRITE_DONE state, -// try to issue an async read on the pipe. If the read completes synchronously -// or if I/O is still pending then go into the READING_ACK state. For any -// issues, go into the DISCONNECTING state. -void CrashGenerationServer::HandleWriteDoneState() { - assert(server_state_ == IPC_SERVER_STATE_WRITE_DONE); - - server_state_ = IPC_SERVER_STATE_READING_ACK; - - DWORD bytes_count = 0; - bool success = ReadFile(pipe_, - &msg_, - sizeof(msg_), - &bytes_count, - &overlapped_) != FALSE; - - if (success) { - return; - } - - DWORD error_code = GetLastError(); - - if (error_code != ERROR_IO_PENDING) { - server_state_ = IPC_SERVER_STATE_DISCONNECTING; - } -} - -// When the server thread serving the clients is in the READING_ACK state, -// try to get result of async read. Go into the DISCONNECTING state. -void CrashGenerationServer::HandleReadingAckState() { - assert(server_state_ == IPC_SERVER_STATE_READING_ACK); - - DWORD bytes_count = 0; - bool success = GetOverlappedResult(pipe_, - &overlapped_, - &bytes_count, - FALSE) != FALSE; - - if (success) { - // The connection handshake with the client is now complete; perform - // the callback. - if (connect_callback_) { - connect_callback_(connect_context_, client_info_); - } - } else { - DWORD error_code = GetLastError(); - - // We should never get an I/O incomplete since we should not execute this - // unless the Read has finished and the overlapped event is signaled. If - // we do get INCOMPLETE, we have a bug in our code. - assert(error_code != ERROR_IO_INCOMPLETE); - } - - server_state_ = IPC_SERVER_STATE_DISCONNECTING; -} - -// When the server thread serving the client is in the DISCONNECTING state, -// disconnect from the pipe and reset the event. If anything fails, go into -// the ERROR state. If it goes well, go into the INITIAL state and set the -// event to start all over again. -void CrashGenerationServer::HandleDisconnectingState() { - assert(server_state_ == IPC_SERVER_STATE_DISCONNECTING); - - // Done serving the client. - client_info_ = NULL; - - overlapped_.Internal = NULL; - overlapped_.InternalHigh = NULL; - overlapped_.Offset = 0; - overlapped_.OffsetHigh = 0; - overlapped_.Pointer = NULL; - - if (!ResetEvent(overlapped_.hEvent)) { - server_state_ = IPC_SERVER_STATE_ERROR; - return; - } - - if (!DisconnectNamedPipe(pipe_)) { - server_state_ = IPC_SERVER_STATE_ERROR; - return; - } - - // If the server is shutting down do not connect to the - // next client. - if (shutting_down_) { - return; - } - - server_state_ = IPC_SERVER_STATE_INITIAL; - if (!SetEvent(overlapped_.hEvent)) { - server_state_ = IPC_SERVER_STATE_ERROR; - } -} - -bool CrashGenerationServer::PrepareReply(const ClientInfo& client_info, - ProtocolMessage* reply) const { - reply->tag = MESSAGE_TAG_REGISTRATION_RESPONSE; - reply->pid = GetCurrentProcessId(); - - if (CreateClientHandles(client_info, reply)) { - return true; - } - - if (reply->dump_request_handle) { - CloseHandle(reply->dump_request_handle); - } - - if (reply->dump_generated_handle) { - CloseHandle(reply->dump_generated_handle); - } - - if (reply->server_alive_handle) { - CloseHandle(reply->server_alive_handle); - } - - return false; -} - -bool CrashGenerationServer::CreateClientHandles(const ClientInfo& client_info, - ProtocolMessage* reply) const { - HANDLE current_process = GetCurrentProcess(); - if (!DuplicateHandle(current_process, - client_info.dump_requested_handle(), - client_info.process_handle(), - &reply->dump_request_handle, - kDumpRequestEventAccess, - FALSE, - 0)) { - return false; - } - - if (!DuplicateHandle(current_process, - client_info.dump_generated_handle(), - client_info.process_handle(), - &reply->dump_generated_handle, - kDumpGeneratedEventAccess, - FALSE, - 0)) { - return false; - } - - if (!DuplicateHandle(current_process, - server_alive_handle_, - client_info.process_handle(), - &reply->server_alive_handle, - kMutexAccess, - FALSE, - 0)) { - return false; - } - - return true; -} - -bool CrashGenerationServer::RespondToClient(ClientInfo* client_info) { - ProtocolMessage reply; - if (!PrepareReply(*client_info, &reply)) { - return false; - } - - if (!AddClient(client_info)) { - return false; - } - - DWORD bytes_count = 0; - bool success = WriteFile(pipe_, - &reply, - sizeof(reply), - &bytes_count, - &overlapped_) != FALSE; - - return success || GetLastError() == ERROR_IO_PENDING; -} - -// The server thread servicing the clients runs this method. The method -// implements the state machine described in ReadMe.txt along with the -// helper methods HandleXXXState. -void CrashGenerationServer::HandleConnectionRequest() { - // If we are shutting doen then get into ERROR state, reset the event so more - // workers don't run and return immediately. - if (shutting_down_) { - server_state_ = IPC_SERVER_STATE_ERROR; - ResetEvent(overlapped_.hEvent); - return; - } - - switch (server_state_) { - case IPC_SERVER_STATE_ERROR: - HandleErrorState(); - break; - - case IPC_SERVER_STATE_INITIAL: - HandleInitialState(); - break; - - case IPC_SERVER_STATE_CONNECTING: - HandleConnectingState(); - break; - - case IPC_SERVER_STATE_CONNECTED: - HandleConnectedState(); - break; - - case IPC_SERVER_STATE_READING: - HandleReadingState(); - break; - - case IPC_SERVER_STATE_READ_DONE: - HandleReadDoneState(); - break; - - case IPC_SERVER_STATE_WRITING: - HandleWritingState(); - break; - - case IPC_SERVER_STATE_WRITE_DONE: - HandleWriteDoneState(); - break; - - case IPC_SERVER_STATE_READING_ACK: - HandleReadingAckState(); - break; - - case IPC_SERVER_STATE_DISCONNECTING: - HandleDisconnectingState(); - break; - - default: - assert(false); - // This indicates that we added one more state without - // adding handling code. - server_state_ = IPC_SERVER_STATE_ERROR; - break; - } -} - -bool CrashGenerationServer::AddClient(ClientInfo* client_info) { - HANDLE request_wait_handle = NULL; - if (!RegisterWaitForSingleObject(&request_wait_handle, - client_info->dump_requested_handle(), - OnDumpRequest, - client_info, - INFINITE, - kDumpRequestThreadFlags)) { - return false; - } - - client_info->set_dump_request_wait_handle(request_wait_handle); - - // OnClientEnd will be called when the client process terminates. - HANDLE process_wait_handle = NULL; - if (!RegisterWaitForSingleObject(&process_wait_handle, - client_info->process_handle(), - OnClientEnd, - client_info, - INFINITE, - WT_EXECUTEONLYONCE)) { - return false; - } - - client_info->set_process_exit_wait_handle(process_wait_handle); - - // New scope to hold the lock for the shortest time. - { - AutoCriticalSection lock(&clients_sync_); - clients_.push_back(client_info); - } - - return true; -} - -// static -void CALLBACK CrashGenerationServer::OnPipeConnected(void* context, BOOLEAN) { - assert (context); - - CrashGenerationServer* obj = - reinterpret_cast(context); - obj->HandleConnectionRequest(); -} - -// static -void CALLBACK CrashGenerationServer::OnDumpRequest(void* context, BOOLEAN) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - client_info->PopulateCustomInfo(); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - crash_server->HandleDumpRequest(*client_info); - - ResetEvent(client_info->dump_requested_handle()); -} - -// static -void CALLBACK CrashGenerationServer::OnClientEnd(void* context, BOOLEAN) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - - InterlockedIncrement(&crash_server->cleanup_item_count_); - - if (!QueueUserWorkItem(CleanupClient, context, WT_EXECUTEDEFAULT)) { - InterlockedDecrement(&crash_server->cleanup_item_count_); - } -} - -// static -DWORD WINAPI CrashGenerationServer::CleanupClient(void* context) { - assert(context); - ClientInfo* client_info = reinterpret_cast(context); - - CrashGenerationServer* crash_server = client_info->crash_server(); - assert(crash_server); - - if (crash_server->exit_callback_) { - crash_server->exit_callback_(crash_server->exit_context_, client_info); - } - - crash_server->DoCleanup(client_info); - - InterlockedDecrement(&crash_server->cleanup_item_count_); - return 0; -} - -void CrashGenerationServer::DoCleanup(ClientInfo* client_info) { - assert(client_info); - - // Start a new scope to release lock automatically. - { - AutoCriticalSection lock(&clients_sync_); - clients_.remove(client_info); - } - - delete client_info; -} - -void CrashGenerationServer::HandleDumpRequest(const ClientInfo& client_info) { - // Generate the dump only if it's explicitly requested by the - // server application; otherwise the server might want to generate - // dump in the callback. - std::wstring dump_path; - if (generate_dumps_) { - if (!GenerateDump(client_info, &dump_path)) { - return; - } - } - - if (dump_callback_) { - std::wstring* ptr_dump_path = (dump_path == L"") ? NULL : &dump_path; - dump_callback_(dump_context_, &client_info, ptr_dump_path); - } - - SetEvent(client_info.dump_generated_handle()); -} - -bool CrashGenerationServer::GenerateDump(const ClientInfo& client, - std::wstring* dump_path) { - assert(client.pid() != 0); - assert(client.process_handle()); - - // We have to get the address of EXCEPTION_INFORMATION from - // the client process address space. - EXCEPTION_POINTERS* client_ex_info = NULL; - if (!client.GetClientExceptionInfo(&client_ex_info)) { - return false; - } - - DWORD client_thread_id = 0; - if (!client.GetClientThreadId(&client_thread_id)) { - return false; - } - - return dump_generator_->WriteMinidump(client.process_handle(), - client.pid(), - client_thread_id, - GetCurrentThreadId(), - client_ex_info, - client.assert_info(), - client.dump_type(), - true, - dump_path); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.h b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.h deleted file mode 100644 index cacb639a..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ - -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/crash_generation/minidump_generator.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -// Abstraction for server side implementation of out-of-process crash -// generation protocol for Windows platform only. It generates Windows -// minidump files for client processes that request dump generation. When -// the server is requested to start listening for clients (by calling the -// Start method), it creates a named pipe and waits for the clients to -// register. In response, it hands them event handles that the client can -// signal to request dump generation. When the clients request dump -// generation in this way, the server generates Windows minidump files. -class CrashGenerationServer { - public: - typedef void (*OnClientConnectedCallback)(void* context, - const ClientInfo* client_info); - - typedef void (*OnClientDumpRequestCallback)(void* context, - const ClientInfo* client_info, - const std::wstring* file_path); - - typedef void (*OnClientExitedCallback)(void* context, - const ClientInfo* client_info); - - // Creates an instance with the given parameters. - // - // Parameter pipe_name: Name of the Windows named pipe - // Parameter pipe_sec_attrs Security attributes to set on the pipe. Pass - // NULL to use default security on the pipe. By default, the pipe created - // allows Local System, Administrators and the Creator full control and - // the Everyone group read access on the pipe. - // Parameter connect_callback: Callback for a new client connection. - // Parameter connect_context: Context for client connection callback. - // Parameter crash_callback: Callback for a client crash dump request. - // Parameter crash_context: Context for client crash dump request callback. - // Parameter exit_callback: Callback for client process exit. - // Parameter exit_context: Context for client exit callback. - // Parameter generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly in the - // crash dump request callback. In that case, false can be passed for this - // parameter. - // Parameter dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const std::wstring& pipe_name, - SECURITY_ATTRIBUTES* pipe_sec_attrs, - OnClientConnectedCallback connect_callback, - void* connect_context, - OnClientDumpRequestCallback dump_callback, - void* dump_context, - OnClientExitedCallback exit_callback, - void* exit_context, - bool generate_dumps, - const std::wstring* dump_path); - - ~CrashGenerationServer(); - - // Performs initialization steps needed to start listening to clients. - // - // Returns true if initialization is successful; false otherwise. - bool Start(); - - private: - // Various states the client can be in during the handshake with - // the server. - enum IPCServerState { - // Server is in error state and it cannot serve any clients. - IPC_SERVER_STATE_ERROR, - - // Server starts in this state. - IPC_SERVER_STATE_INITIAL, - - // Server has issued an async connect to the pipe and it is waiting - // for the connection to be established. - IPC_SERVER_STATE_CONNECTING, - - // Server is connected successfully. - IPC_SERVER_STATE_CONNECTED, - - // Server has issued an async read from the pipe and it is waiting for - // the read to finish. - IPC_SERVER_STATE_READING, - - // Server is done reading from the pipe. - IPC_SERVER_STATE_READ_DONE, - - // Server has issued an async write to the pipe and it is waiting for - // the write to finish. - IPC_SERVER_STATE_WRITING, - - // Server is done writing to the pipe. - IPC_SERVER_STATE_WRITE_DONE, - - // Server has issued an async read from the pipe for an ack and it - // is waiting for the read to finish. - IPC_SERVER_STATE_READING_ACK, - - // Server is done writing to the pipe and it is now ready to disconnect - // and reconnect. - IPC_SERVER_STATE_DISCONNECTING - }; - - // - // Helper methods to handle various server IPC states. - // - void HandleErrorState(); - void HandleInitialState(); - void HandleConnectingState(); - void HandleConnectedState(); - void HandleReadingState(); - void HandleReadDoneState(); - void HandleWritingState(); - void HandleWriteDoneState(); - void HandleReadingAckState(); - void HandleDisconnectingState(); - - // Prepares reply for a client from the given parameters. - bool PrepareReply(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Duplicates various handles in the ClientInfo object for the client - // process and stores them in the given ProtocolMessage instance. If - // creating any handle fails, ProtocolMessage will contain the handles - // already created successfully, which should be closed by the caller. - bool CreateClientHandles(const ClientInfo& client_info, - ProtocolMessage* reply) const; - - // Response to the given client. Return true if all steps of - // responding to the client succeed, false otherwise. - bool RespondToClient(ClientInfo* client_info); - - // Handles a connection request from the client. - void HandleConnectionRequest(); - - // Handles a dump request from the client. - void HandleDumpRequest(const ClientInfo& client_info); - - // Callback for pipe connected event. - static void CALLBACK OnPipeConnected(void* context, BOOLEAN timer_or_wait); - - // Callback for a dump request. - static void CALLBACK OnDumpRequest(void* context, BOOLEAN timer_or_wait); - - // Callback for client process exit event. - static void CALLBACK OnClientEnd(void* context, BOOLEAN timer_or_wait); - - // Releases resources for a client. - static DWORD WINAPI CleanupClient(void* context); - - // Cleans up for the given client. - void DoCleanup(ClientInfo* client_info); - - // Adds the given client to the list of registered clients. - bool AddClient(ClientInfo* client_info); - - // Generates dump for the given client. - bool GenerateDump(const ClientInfo& client, std::wstring* dump_path); - - // Sync object for thread-safe access to the shared list of clients. - CRITICAL_SECTION clients_sync_; - - // List of clients. - std::list clients_; - - // Pipe name. - std::wstring pipe_name_; - - // Pipe security attributes - SECURITY_ATTRIBUTES* pipe_sec_attrs_; - - // Handle to the pipe used for handshake with clients. - HANDLE pipe_; - - // Pipe wait handle. - HANDLE pipe_wait_handle_; - - // Handle to server-alive mutex. - HANDLE server_alive_handle_; - - // Callback for a successful client connection. - OnClientConnectedCallback connect_callback_; - - // Context for client connected callback. - void* connect_context_; - - // Callback for a client dump request. - OnClientDumpRequestCallback dump_callback_; - - // Context for client dump request callback. - void* dump_context_; - - // Callback for client process exit. - OnClientExitedCallback exit_callback_; - - // Context for client process exit callback. - void* exit_context_; - - // Whether to generate dumps. - bool generate_dumps_; - - // Instance of a mini dump generator. - scoped_ptr dump_generator_; - - // State of the server in performing the IPC with the client. - // Note that since we restrict the pipe to one instance, we - // only need to keep one state of the server. Otherwise, server - // would have one state per client it is talking to. - volatile IPCServerState server_state_; - - // Whether the server is shutting down. - volatile bool shutting_down_; - - // Overlapped instance for async I/O on the pipe. - OVERLAPPED overlapped_; - - // Message object used in IPC with the client. - ProtocolMessage msg_; - - // Client Info for the client that's connecting to the server. - ClientInfo* client_info_; - - // Count of clean-up work items that are currently running or are - // already queued to run. - volatile LONG cleanup_item_count_; - - // Disable copy ctor and operator=. - CrashGenerationServer(const CrashGenerationServer& crash_server); - CrashGenerationServer& operator=(const CrashGenerationServer& crash_server); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_SERVER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.cc b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.cc deleted file mode 100644 index c03b191a..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.cc +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/minidump_generator.h" -#include -#include "client/windows/common/auto_critical_section.h" -#include "common/windows/guid_string.h" - -using std::wstring; - -namespace google_breakpad { - -MinidumpGenerator::MinidumpGenerator(const wstring& dump_path) - : dbghelp_module_(NULL), - rpcrt4_module_(NULL), - dump_path_(dump_path), - write_dump_(NULL), - create_uuid_(NULL) { - InitializeCriticalSection(&module_load_sync_); - InitializeCriticalSection(&get_proc_address_sync_); -} - -MinidumpGenerator::~MinidumpGenerator() { - if (dbghelp_module_) { - FreeLibrary(dbghelp_module_); - } - - if (rpcrt4_module_) { - FreeLibrary(rpcrt4_module_); - } - - DeleteCriticalSection(&get_proc_address_sync_); - DeleteCriticalSection(&module_load_sync_); -} - -bool MinidumpGenerator::WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - wstring* dump_path) { - MiniDumpWriteDumpType write_dump = GetWriteDump(); - if (!write_dump) { - return false; - } - - wstring dump_file_path; - if (!GenerateDumpFilePath(&dump_file_path)) { - return false; - } - - // If the client requests a full memory dump, we will write a normal mini - // dump and a full memory dump. Both dump files use the same uuid as file - // name prefix. - bool full_memory_dump = (dump_type & MiniDumpWithFullMemory) != 0; - wstring full_dump_file_path; - if (full_memory_dump) { - full_dump_file_path.assign(dump_file_path); - full_dump_file_path.resize(full_dump_file_path.size() - 4); // strip .dmp - full_dump_file_path.append(TEXT("-full.dmp")); - } - - HANDLE dump_file = CreateFile(dump_file_path.c_str(), - GENERIC_WRITE, - 0, - NULL, - CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (dump_file == INVALID_HANDLE_VALUE) { - return false; - } - - HANDLE full_dump_file = INVALID_HANDLE_VALUE; - if (full_memory_dump) { - full_dump_file = CreateFile(full_dump_file_path.c_str(), - GENERIC_WRITE, - 0, - NULL, - CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (full_dump_file == INVALID_HANDLE_VALUE) { - CloseHandle(dump_file); - return false; - } - } - - MINIDUMP_EXCEPTION_INFORMATION* dump_exception_pointers = NULL; - MINIDUMP_EXCEPTION_INFORMATION dump_exception_info; - - // Setup the exception information object only if it's a dump - // due to an exception. - if (exception_pointers) { - dump_exception_pointers = &dump_exception_info; - dump_exception_info.ThreadId = thread_id; - dump_exception_info.ExceptionPointers = exception_pointers; - dump_exception_info.ClientPointers = is_client_pointers; - } - - // Add an MDRawBreakpadInfo stream to the minidump, to provide additional - // information about the exception handler to the Breakpad processor. - // The information will help the processor determine which threads are - // relevant. The Breakpad processor does not require this information but - // can function better with Breakpad-generated dumps when it is present. - // The native debugger is not harmed by the presence of this information. - MDRawBreakpadInfo breakpad_info = {0}; - if (!is_client_pointers) { - // Set the dump thread id and requesting thread id only in case of - // in-process dump generation. - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = thread_id; - breakpad_info.requesting_thread_id = requesting_thread_id; - } - - // Leave room in user_stream_array for a possible assertion info stream. - MINIDUMP_USER_STREAM user_stream_array[2]; - user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM; - user_stream_array[0].BufferSize = sizeof(breakpad_info); - user_stream_array[0].Buffer = &breakpad_info; - - MINIDUMP_USER_STREAM_INFORMATION user_streams; - user_streams.UserStreamCount = 1; - user_streams.UserStreamArray = user_stream_array; - - MDRawAssertionInfo* actual_assert_info = assert_info; - MDRawAssertionInfo client_assert_info = {0}; - - if (assert_info) { - // If the assertion info object lives in the client process, - // read the memory of the client process. - if (is_client_pointers) { - SIZE_T bytes_read = 0; - if (!ReadProcessMemory(process_handle, - assert_info, - &client_assert_info, - sizeof(client_assert_info), - &bytes_read)) { - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - return false; - } - - if (bytes_read != sizeof(client_assert_info)) { - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - return false; - } - - actual_assert_info = &client_assert_info; - } - - user_stream_array[1].Type = MD_ASSERTION_INFO_STREAM; - user_stream_array[1].BufferSize = sizeof(MDRawAssertionInfo); - user_stream_array[1].Buffer = actual_assert_info; - ++user_streams.UserStreamCount; - } - - bool result_minidump = write_dump( - process_handle, - process_id, - dump_file, - static_cast((dump_type & (~MiniDumpWithFullMemory)) - | MiniDumpNormal), - exception_pointers ? &dump_exception_info : NULL, - &user_streams, - NULL) != FALSE; - - bool result_full_memory = true; - if (full_memory_dump) { - result_full_memory = write_dump( - process_handle, - process_id, - full_dump_file, - static_cast(dump_type & (~MiniDumpNormal)), - exception_pointers ? &dump_exception_info : NULL, - &user_streams, - NULL) != FALSE; - } - - bool result = result_minidump && result_full_memory; - - CloseHandle(dump_file); - if (full_dump_file != INVALID_HANDLE_VALUE) - CloseHandle(full_dump_file); - - // Store the path of the dump file in the out parameter if dump generation - // succeeded. - if (result && dump_path) { - *dump_path = dump_file_path; - } - - return result; -} - -HMODULE MinidumpGenerator::GetDbghelpModule() { - AutoCriticalSection lock(&module_load_sync_); - if (!dbghelp_module_) { - dbghelp_module_ = LoadLibrary(TEXT("dbghelp.dll")); - } - - return dbghelp_module_; -} - -MinidumpGenerator::MiniDumpWriteDumpType MinidumpGenerator::GetWriteDump() { - AutoCriticalSection lock(&get_proc_address_sync_); - if (!write_dump_) { - HMODULE module = GetDbghelpModule(); - if (module) { - FARPROC proc = GetProcAddress(module, "MiniDumpWriteDump"); - write_dump_ = reinterpret_cast(proc); - } - } - - return write_dump_; -} - -HMODULE MinidumpGenerator::GetRpcrt4Module() { - AutoCriticalSection lock(&module_load_sync_); - if (!rpcrt4_module_) { - rpcrt4_module_ = LoadLibrary(TEXT("rpcrt4.dll")); - } - - return rpcrt4_module_; -} - -MinidumpGenerator::UuidCreateType MinidumpGenerator::GetCreateUuid() { - AutoCriticalSection lock(&module_load_sync_); - if (!create_uuid_) { - HMODULE module = GetRpcrt4Module(); - if (module) { - FARPROC proc = GetProcAddress(module, "UuidCreate"); - create_uuid_ = reinterpret_cast(proc); - } - } - - return create_uuid_; -} - -bool MinidumpGenerator::GenerateDumpFilePath(wstring* file_path) { - UUID id = {0}; - - UuidCreateType create_uuid = GetCreateUuid(); - if(!create_uuid) { - return false; - } - - create_uuid(&id); - wstring id_str = GUIDString::GUIDToWString(&id); - - *file_path = dump_path_ + TEXT("\\") + id_str + TEXT(".dmp"); - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.h b/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.h deleted file mode 100644 index 8ab6a8f6..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/crash_generation/minidump_generator.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ -#define CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ - -#include -#include -#include -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Abstraction for various objects and operations needed to generate -// minidump on Windows. This abstraction is useful to hide all the gory -// details for minidump generation and provide a clean interface to -// the clients to generate minidumps. -class MinidumpGenerator { - public: - // Creates an instance with the given dump path. - explicit MinidumpGenerator(const std::wstring& dump_path); - - ~MinidumpGenerator(); - - // Writes the minidump with the given parameters. Stores the - // dump file path in the dump_path parameter if dump generation - // succeeds. - bool WriteMinidump(HANDLE process_handle, - DWORD process_id, - DWORD thread_id, - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exception_pointers, - MDRawAssertionInfo* assert_info, - MINIDUMP_TYPE dump_type, - bool is_client_pointers, - std::wstring* dump_path); - - private: - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI* MiniDumpWriteDumpType)( - HANDLE hProcess, - DWORD ProcessId, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY* UuidCreateType)(UUID* Uuid); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetDbghelpModule(); - - // Loads the appropriate DLL and gets a pointer to the MiniDumpWriteDump - // function lazily and in a thread-safe manner. - MiniDumpWriteDumpType GetWriteDump(); - - // Loads the appropriate DLL lazily in a thread safe way. - HMODULE GetRpcrt4Module(); - - // Loads the appropriate DLL and gets a pointer to the UuidCreate - // function lazily and in a thread-safe manner. - UuidCreateType GetCreateUuid(); - - // Returns the path for the file to write dump to. - bool GenerateDumpFilePath(std::wstring* file_path); - - // Handle to dynamically loaded DbgHelp.dll. - HMODULE dbghelp_module_; - - // Pointer to the MiniDumpWriteDump function. - MiniDumpWriteDumpType write_dump_; - - // Handle to dynamically loaded rpcrt4.dll. - HMODULE rpcrt4_module_; - - // Pointer to the UuidCreate function. - UuidCreateType create_uuid_; - - // Folder path to store dump files. - std::wstring dump_path_; - - // Critical section to sychronize action of loading modules dynamically. - CRITICAL_SECTION module_load_sync_; - - // Critical section to synchronize action of dynamically getting function - // addresses from modules. - CRITICAL_SECTION get_proc_address_sync_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.cc b/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.cc deleted file mode 100644 index f3bb5a61..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.cc +++ /dev/null @@ -1,746 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/handler/exception_handler.h" -#include "common/windows/guid_string.h" - -namespace google_breakpad { - -static const int kWaitForHandlerThreadMs = 60000; -static const int kExceptionHandlerThreadInitialStackSize = 64 * 1024; - -vector* ExceptionHandler::handler_stack_ = NULL; -LONG ExceptionHandler::handler_stack_index_ = 0; -CRITICAL_SECTION ExceptionHandler::handler_stack_critical_section_; -volatile LONG ExceptionHandler::instance_count_ = 0; - -ExceptionHandler::ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - dump_type, - pipe_name, - custom_info); -} - -ExceptionHandler::ExceptionHandler(const wstring &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - MiniDumpNormal, - NULL, - NULL); -} - -void ExceptionHandler::Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info) { - LONG instance_count = InterlockedIncrement(&instance_count_); - filter_ = filter; - callback_ = callback; - callback_context_ = callback_context; - dump_path_c_ = NULL; - next_minidump_id_c_ = NULL; - next_minidump_path_c_ = NULL; - dbghelp_module_ = NULL; - minidump_write_dump_ = NULL; - dump_type_ = dump_type; - rpcrt4_module_ = NULL; - uuid_create_ = NULL; - handler_types_ = handler_types; - previous_filter_ = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - previous_iph_ = NULL; -#endif // _MSC_VER >= 1400 - previous_pch_ = NULL; - handler_thread_ = NULL; - is_shutdown_ = false; - handler_start_semaphore_ = NULL; - handler_finish_semaphore_ = NULL; - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - handler_return_value_ = false; - handle_debug_exceptions_ = false; - - // Attempt to use out-of-process if user has specified pipe name. - if (pipe_name != NULL) { - scoped_ptr client( - new CrashGenerationClient(pipe_name, - dump_type_, - custom_info)); - - // If successful in registering with the monitoring process, - // there is no need to setup in-process crash generation. - if (client->Register()) { - crash_generation_client_.reset(client.release()); - } - } - - if (!IsOutOfProcess()) { - // Either client did not ask for out-of-process crash generation - // or registration with the server process failed. In either case, - // setup to do in-process crash generation. - - // Set synchronization primitives and the handler thread. Each - // ExceptionHandler object gets its own handler thread because that's the - // only way to reliably guarantee sufficient stack space in an exception, - // and it allows an easy way to get a snapshot of the requesting thread's - // context outside of an exception. - InitializeCriticalSection(&handler_critical_section_); - handler_start_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_start_semaphore_ != NULL); - - handler_finish_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_finish_semaphore_ != NULL); - - // Don't attempt to create the thread if we could not create the semaphores. - if (handler_finish_semaphore_ != NULL && handler_start_semaphore_ != NULL) { - DWORD thread_id; - handler_thread_ = CreateThread(NULL, // lpThreadAttributes - kExceptionHandlerThreadInitialStackSize, - ExceptionHandlerThreadMain, - this, // lpParameter - 0, // dwCreationFlags - &thread_id); - assert(handler_thread_ != NULL); - } - - dbghelp_module_ = LoadLibrary(L"dbghelp.dll"); - if (dbghelp_module_) { - minidump_write_dump_ = reinterpret_cast( - GetProcAddress(dbghelp_module_, "MiniDumpWriteDump")); - } - - // Load this library dynamically to not affect existing projects. Most - // projects don't link against this directly, it's usually dynamically - // loaded by dependent code. - rpcrt4_module_ = LoadLibrary(L"rpcrt4.dll"); - if (rpcrt4_module_) { - uuid_create_ = reinterpret_cast( - GetProcAddress(rpcrt4_module_, "UuidCreate")); - } - - // set_dump_path calls UpdateNextID. This sets up all of the path and id - // strings, and their equivalent c_str pointers. - set_dump_path(dump_path); - } - - // There is a race condition here. If the first instance has not yet - // initialized the critical section, the second (and later) instances may - // try to use uninitialized critical section object. The feature of multiple - // instances in one module is not used much, so leave it as is for now. - // One way to solve this in the current design (that is, keeping the static - // handler stack) is to use spin locks with volatile bools to synchronize - // the handler stack. This works only if the compiler guarantees to generate - // cache coherent code for volatile. - // TODO(munjal): Fix this in a better way by changing the design if possible. - - // Lazy initialization of the handler_stack_critical_section_ - if (instance_count == 1) { - InitializeCriticalSection(&handler_stack_critical_section_); - } - - if (handler_types != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - // The first time an ExceptionHandler that installs a handler is - // created, set up the handler stack. - if (!handler_stack_) { - handler_stack_ = new vector(); - } - handler_stack_->push_back(this); - - if (handler_types & HANDLER_EXCEPTION) - previous_filter_ = SetUnhandledExceptionFilter(HandleException); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types & HANDLER_INVALID_PARAMETER) - previous_iph_ = _set_invalid_parameter_handler(HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - - if (handler_types & HANDLER_PURECALL) - previous_pch_ = _set_purecall_handler(HandlePureVirtualCall); - - LeaveCriticalSection(&handler_stack_critical_section_); - } -} - -ExceptionHandler::~ExceptionHandler() { - if (dbghelp_module_) { - FreeLibrary(dbghelp_module_); - } - - if (rpcrt4_module_) { - FreeLibrary(rpcrt4_module_); - } - - if (handler_types_ != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - if (handler_types_ & HANDLER_EXCEPTION) - SetUnhandledExceptionFilter(previous_filter_); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types_ & HANDLER_INVALID_PARAMETER) - _set_invalid_parameter_handler(previous_iph_); -#endif // _MSC_VER >= 1400 - - if (handler_types_ & HANDLER_PURECALL) - _set_purecall_handler(previous_pch_); - - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - // TODO(mmentovai): use advapi32!ReportEvent to log the warning to the - // system's application event log. - fprintf(stderr, "warning: removing Breakpad handler out of order\n"); - for (vector::iterator iterator = - handler_stack_->begin(); - iterator != handler_stack_->end(); - ++iterator) { - if (*iterator == this) { - handler_stack_->erase(iterator); - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - - LeaveCriticalSection(&handler_stack_critical_section_); - } - - // Some of the objects were only initialized if out of process - // registration was not done. - if (!IsOutOfProcess()) { -#ifdef BREAKPAD_NO_TERMINATE_THREAD - // Clean up the handler thread and synchronization primitives. The handler - // thread is either waiting on the semaphore to handle a crash or it is - // handling a crash. Coming out of the wait is fast but wait more in the - // eventuality a crash is handled. This compilation option results in a - // deadlock if the exception handler is destroyed while executing code - // inside DllMain. - is_shutdown_ = true; - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - WaitForSingleObject(handler_thread_, kWaitForHandlerThreadMs); -#else - TerminateThread(handler_thread_, 1); -#endif // BREAKPAD_NO_TERMINATE_THREAD - - DeleteCriticalSection(&handler_critical_section_); - CloseHandle(handler_start_semaphore_); - CloseHandle(handler_finish_semaphore_); - } - - // There is a race condition in the code below: if this instance is - // deleting the static critical section and a new instance of the class - // is created, then there is a possibility that the critical section be - // initialized while the same critical section is being deleted. Given the - // usage pattern for the code, this race condition is unlikely to hit, but it - // is a race condition nonetheless. - if (InterlockedDecrement(&instance_count_) == 0) { - DeleteCriticalSection(&handler_stack_critical_section_); - } -} - -// static -DWORD ExceptionHandler::ExceptionHandlerThreadMain(void* lpParameter) { - ExceptionHandler* self = reinterpret_cast(lpParameter); - assert(self); - assert(self->handler_start_semaphore_ != NULL); - assert(self->handler_finish_semaphore_ != NULL); - - while (true) { - if (WaitForSingleObject(self->handler_start_semaphore_, INFINITE) == - WAIT_OBJECT_0) { - // Perform the requested action. - if (self->is_shutdown_) { - // The instance of the exception handler is being destroyed. - break; - } else { - self->handler_return_value_ = - self->WriteMinidumpWithException(self->requesting_thread_id_, - self->exception_info_, - self->assertion_); - } - - // Allow the requesting thread to proceed. - ReleaseSemaphore(self->handler_finish_semaphore_, 1, NULL); - } - } - - // This statement is not reached when the thread is unconditionally - // terminated by the ExceptionHandler destructor. - return 0; -} - -// HandleException and HandleInvalidParameter must create an -// AutoExceptionHandler object to maintain static state and to determine which -// ExceptionHandler instance to use. The constructor locates the correct -// instance, and makes it available through get_handler(). The destructor -// restores the state in effect prior to allocating the AutoExceptionHandler. -class AutoExceptionHandler { - public: - AutoExceptionHandler() { - // Increment handler_stack_index_ so that if another Breakpad handler is - // registered using this same HandleException function, and it needs to be - // called while this handler is running (either becaause this handler - // declines to handle the exception, or an exception occurs during - // handling), HandleException will find the appropriate ExceptionHandler - // object in handler_stack_ to deliver the exception to. - // - // Because handler_stack_ is addressed in reverse (as |size - index|), - // preincrementing handler_stack_index_ avoids needing to subtract 1 from - // the argument to |at|. - // - // The index is maintained instead of popping elements off of the handler - // stack and pushing them at the end of this method. This avoids ruining - // the order of elements in the stack in the event that some other thread - // decides to manipulate the handler stack (such as creating a new - // ExceptionHandler object) while an exception is being handled. - EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - handler_ = ExceptionHandler::handler_stack_->at( - ExceptionHandler::handler_stack_->size() - - ++ExceptionHandler::handler_stack_index_); - LeaveCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - - // In case another exception occurs while this handler is doing its thing, - // it should be delivered to the previous filter. - SetUnhandledExceptionFilter(handler_->previous_filter_); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(handler_->previous_iph_); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(handler_->previous_pch_); - } - - ~AutoExceptionHandler() { - // Put things back the way they were before entering this handler. - SetUnhandledExceptionFilter(ExceptionHandler::HandleException); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(ExceptionHandler::HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(ExceptionHandler::HandlePureVirtualCall); - - EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - --ExceptionHandler::handler_stack_index_; - LeaveCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - } - - ExceptionHandler* get_handler() const { return handler_; } - - private: - ExceptionHandler* handler_; -}; - -// static -LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) { - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions. This - // logic will short-circuit before calling WriteMinidumpOnHandlerThread, - // allowing something else to handle the breakpoint without incurring the - // overhead transitioning to and from the handler thread. This behavior - // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions. - DWORD code = exinfo->ExceptionRecord->ExceptionCode; - LONG action; - bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || - (code == EXCEPTION_SINGLE_STEP); - - bool success = false; - - if (!is_debug_exception || - current_handler->get_handle_debug_exceptions()) { - // If out-of-proc crash handler client is available, we have to use that - // to generate dump and we cannot fall back on in-proc dump generation - // because we never prepared for an in-proc dump generation - - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - exinfo, - NULL); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL); - } - } - - // The handler fully handled the exception. Returning - // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually - // results in the application being terminated. - // - // Note: If the application was launched from within the Cygwin - // environment, returning EXCEPTION_EXECUTE_HANDLER seems to cause the - // application to be restarted. - if (success) { - action = EXCEPTION_EXECUTE_HANDLER; - } else { - // There was an exception, it was a breakpoint or something else ignored - // above, or it was passed to the handler, which decided not to handle it. - // This could be because the filter callback didn't want it, because - // minidump writing failed for some reason, or because the post-minidump - // callback function indicated failure. Give the previous handler a - // chance to do something with the exception. If there is no previous - // handler, return EXCEPTION_CONTINUE_SEARCH, which will allow a debugger - // or native "crashed" dialog to handle the exception. - if (current_handler->previous_filter_) { - action = current_handler->previous_filter_(exinfo); - } else { - action = EXCEPTION_CONTINUE_SEARCH; - } - } - - return action; -} - -#if _MSC_VER >= 1400 // MSVC 2005/8 -// static -void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved) { - // This is an invalid parameter, not an exception. It's safe to play with - // sprintf here. - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - _snwprintf_s(reinterpret_cast(assertion.expression), - sizeof(assertion.expression) / sizeof(assertion.expression[0]), - _TRUNCATE, L"%s", expression); - _snwprintf_s(reinterpret_cast(assertion.function), - sizeof(assertion.function) / sizeof(assertion.function[0]), - _TRUNCATE, L"%s", function); - _snwprintf_s(reinterpret_cast(assertion.file), - sizeof(assertion.file) / sizeof(assertion.file[0]), - _TRUNCATE, L"%s", file); - assertion.line = line; - assertion.type = MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER; - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - NULL, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(NULL, &assertion); - } - - if (!success) { - if (current_handler->previous_iph_) { - // The handler didn't fully handle the exception. Give it to the - // previous invalid parameter handler. - current_handler->previous_iph_(expression, - function, - file, - line, - reserved); - } else { - // If there's no previous handler, pass the exception back in to the - // invalid parameter handler's core. That's the routine that called this - // function, but now, since this function is no longer registered (and in - // fact, no function at all is registered), this will result in the - // default code path being taken: _CRT_DEBUGGER_HOOK and _invoke_watson. - // Use _invalid_parameter where it exists (in _DEBUG builds) as it passes - // more information through. In non-debug builds, it is not available, - // so fall back to using _invalid_parameter_noinfo. See invarg.c in the - // CRT source. -#ifdef _DEBUG - _invalid_parameter(expression, function, file, line, reserved); -#else // _DEBUG - _invalid_parameter_noinfo(); -#endif // _DEBUG - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} -#endif // _MSC_VER >= 1400 - -// static -void ExceptionHandler::HandlePureVirtualCall() { - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - assertion.type = MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL; - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - NULL, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(NULL, &assertion); - } - - if (!success) { - if (current_handler->previous_pch_) { - // The handler didn't fully handle the exception. Give it to the - // previous purecall handler. - current_handler->previous_pch_(); - } else { - // If there's no previous handler, return and let _purecall handle it. - // This will just put up an assertion dialog. - return; - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} - -bool ExceptionHandler::WriteMinidumpOnHandlerThread( - EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion) { - EnterCriticalSection(&handler_critical_section_); - - // There isn't much we can do if the handler thread - // was not successfully created. - if (handler_thread_ == NULL) { - LeaveCriticalSection(&handler_critical_section_); - return false; - } - - // The handler thread should only be created when the semaphores are valid. - assert(handler_start_semaphore_ != NULL); - assert(handler_finish_semaphore_ != NULL); - - // Set up data to be passed in to the handler thread. - requesting_thread_id_ = GetCurrentThreadId(); - exception_info_ = exinfo; - assertion_ = assertion; - - // This causes the handler thread to call WriteMinidumpWithException. - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - - // Wait until WriteMinidumpWithException is done and collect its return value. - WaitForSingleObject(handler_finish_semaphore_, INFINITE); - bool status = handler_return_value_; - - // Clean up. - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - - LeaveCriticalSection(&handler_critical_section_); - - return status; -} - -bool ExceptionHandler::WriteMinidump() { - return WriteMinidumpForException(NULL); -} - -bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) { - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (IsOutOfProcess()) { - return WriteMinidumpWithException(GetCurrentThreadId(), - exinfo, - NULL); - } - - bool success = WriteMinidumpOnHandlerThread(exinfo, NULL); - UpdateNextID(); - return success; -} - -// static -bool ExceptionHandler::WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, - void* callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); - return handler.WriteMinidump(); -} - -bool ExceptionHandler::WriteMinidumpWithException( - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion) { - // Give user code a chance to approve or prevent writing a minidump. If the - // filter returns false, don't handle the exception at all. If this method - // was called as a result of an exception, returning false will cause - // HandleException to call any previous handler or return - // EXCEPTION_CONTINUE_SEARCH on the exception thread, allowing it to appear - // as though this handler were not present at all. - if (filter_ && !filter_(callback_context_, exinfo, assertion)) { - return false; - } - - bool success = false; - if (IsOutOfProcess()) { - // Use the EXCEPTION_POINTERS overload for RequestDump if - // both exinfo and assertion are NULL. - if (!assertion) { - success = crash_generation_client_->RequestDump(exinfo); - } else { - success = crash_generation_client_->RequestDump(assertion); - } - } else { - if (minidump_write_dump_) { - HANDLE dump_file = CreateFile(next_minidump_path_c_, - GENERIC_WRITE, - 0, // no sharing - NULL, - CREATE_NEW, // fail if exists - FILE_ATTRIBUTE_NORMAL, - NULL); - if (dump_file != INVALID_HANDLE_VALUE) { - MINIDUMP_EXCEPTION_INFORMATION except_info; - except_info.ThreadId = requesting_thread_id; - except_info.ExceptionPointers = exinfo; - except_info.ClientPointers = FALSE; - - // Add an MDRawBreakpadInfo stream to the minidump, to provide additional - // information about the exception handler to the Breakpad processor. The - // information will help the processor determine which threads are - // relevant. The Breakpad processor does not require this information but - // can function better with Breakpad-generated dumps when it is present. - // The native debugger is not harmed by the presence of this information. - MDRawBreakpadInfo breakpad_info; - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = GetCurrentThreadId(); - breakpad_info.requesting_thread_id = requesting_thread_id; - - // Leave room in user_stream_array for a possible assertion info stream. - MINIDUMP_USER_STREAM user_stream_array[2]; - user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM; - user_stream_array[0].BufferSize = sizeof(breakpad_info); - user_stream_array[0].Buffer = &breakpad_info; - - MINIDUMP_USER_STREAM_INFORMATION user_streams; - user_streams.UserStreamCount = 1; - user_streams.UserStreamArray = user_stream_array; - - if (assertion) { - user_stream_array[1].Type = MD_ASSERTION_INFO_STREAM; - user_stream_array[1].BufferSize = sizeof(MDRawAssertionInfo); - user_stream_array[1].Buffer = assertion; - ++user_streams.UserStreamCount; - } - - // The explicit comparison to TRUE avoids a warning (C4800). - success = (minidump_write_dump_(GetCurrentProcess(), - GetCurrentProcessId(), - dump_file, - dump_type_, - exinfo ? &except_info : NULL, - &user_streams, - NULL) == TRUE); - - CloseHandle(dump_file); - } - } - } - - if (callback_) { - // TODO(munjal): In case of out-of-process dump generation, both - // dump_path_c_ and next_minidump_id_ will be NULL. For out-of-process - // scenario, the server process ends up creating the dump path and dump - // id so they are not known to the client. - success = callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - exinfo, assertion, success); - } - - return success; -} - -void ExceptionHandler::UpdateNextID() { - assert(uuid_create_); - UUID id = {0}; - if (uuid_create_) { - uuid_create_(&id); - } - next_minidump_id_ = GUIDString::GUIDToWString(&id); - next_minidump_id_c_ = next_minidump_id_.c_str(); - - wchar_t minidump_path[MAX_PATH]; - swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp", - dump_path_c_, next_minidump_id_c_); - - // remove when VC++7.1 is no longer supported - minidump_path[MAX_PATH - 1] = L'\0'; - - next_minidump_path_ = minidump_path; - next_minidump_path_c_ = next_minidump_path_.c_str(); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.h b/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.h deleted file mode 100644 index 2cacdc38..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/handler/exception_handler.h +++ /dev/null @@ -1,415 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// It is important that creation and destruction of ExceptionHandler objects -// be nested cleanly, when using install_handler = true. -// Avoid the following pattern: -// ExceptionHandler *e = new ExceptionHandler(...); -// ExceptionHandler *f = new ExceptionHandler(...); -// delete e; -// This will put the exception filter stack into an inconsistent state. - -#ifndef CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include -#include - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/crash_generation_client.h" -#include "google_breakpad/common/minidump_format.h" -#include "processor/scoped_ptr.h" - -namespace google_breakpad { - -using std::vector; -using std::wstring; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. exinfo points to the - // exception record, if any; assertion points to assertion information, - // if any. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void* context, EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. exinfo - // points to the exception record, or NULL if no exception occurred. - // succeeded indicates whether a minidump file was successfully written. - // assertion points to information about an assertion if the handler was - // invoked by an assertion. - // - // If an exception occurred and the callback returns true, Breakpad will treat - // the exception as fully-handled, suppressing any other handlers from being - // notified of the exception. If the callback returns false, Breakpad will - // treat the exception as unhandled, and allow another handler to handle it. - // If there are no other handlers, Breakpad will report the exception to the - // system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - // - // For out-of-process dump generation, dump path and minidump ID will always - // be NULL. In case of out-of-process dump generation, the dump path and - // minidump id are controlled by the server process and are not communicated - // back to the crashing process. - typedef bool (*MinidumpCallback)(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded); - - // HandlerType specifies which types of handlers should be installed, if - // any. Use HANDLER_NONE for an ExceptionHandler that remains idle, - // without catching any failures on its own. This type of handler may - // still be triggered by calling WriteMinidump. Otherwise, use a - // combination of the other HANDLER_ values, or HANDLER_ALL to install - // all handlers. - enum HandlerType { - HANDLER_NONE = 0, - HANDLER_EXCEPTION = 1 << 0, // SetUnhandledExceptionFilter - HANDLER_INVALID_PARAMETER = 1 << 1, // _set_invalid_parameter_handler - HANDLER_PURECALL = 1 << 2, // _set_purecall_handler - HANDLER_ALL = HANDLER_EXCEPTION | - HANDLER_INVALID_PARAMETER | - HANDLER_PURECALL - }; - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // handler_types specifies the types of handlers that should be installed. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types); - - // Creates a new ExcetpionHandler instance that can attempt to perform - // out-of-process dump generation if pipe_name is not NULL. If pipe_name is - // NULL, or if out-of-process dump generation registration step fails, - // in-process dump generation will be used. This also allows specifying - // the dump type to generate. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - ~ExceptionHandler(); - - // Get and set the minidump path. - wstring dump_path() const { return dump_path_; } - void set_dump_path(const wstring &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Writes a minidump immediately, with the user-supplied exception - // information. - bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, void* callback_context); - - // Get the thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). This - // may be useful if you want to include additional thread state in your - // dumps. - DWORD get_requesting_thread_id() const { return requesting_thread_id_; } - - // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. - bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } - void set_handle_debug_exceptions(bool handle_debug_exceptions) { - handle_debug_exceptions_ = handle_debug_exceptions; - } - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { return crash_generation_client_.get() != NULL; } - - private: - friend class AutoExceptionHandler; - - // Initializes the instance with given values. - void Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI *MiniDumpWriteDump_type)( - HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY *UuidCreate_type)(UUID* Uuid); - - // Runs the main loop for the exception handler thread. - static DWORD WINAPI ExceptionHandlerThreadMain(void* lpParameter); - - // Called on the exception thread when an unhandled exception occurs. - // Signals the exception handler thread to handle the exception. - static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // This function will be called by some CRT functions when they detect - // that they were passed an invalid parameter. Note that in _DEBUG builds, - // the CRT may display an assertion dialog before calling this function, - // and the function will not be called unless the assertion dialog is - // dismissed by clicking "Ignore." - static void HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved); -#endif // _MSC_VER >= 1400 - - // This function will be called by the CRT when a pure virtual - // function is called. - static void HandlePureVirtualCall(); - - // This is called on the exception thread or on another thread that - // the user wishes to produce a dump from. It calls - // WriteMinidumpWithException on the handler thread, avoiding stack - // overflows and inconsistent dumps due to writing the dump from - // the exception thread. If the dump is requested as a result of an - // exception, exinfo contains exception information, otherwise, it - // is NULL. If the dump is requested as a result of an assertion - // (such as an invalid parameter being passed to a CRT function), - // assertion contains data about the assertion, otherwise, it is NULL. - bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function does the actual writing of a minidump. It is called - // on the handler thread. requesting_thread_id is the ID of the thread - // that requested the dump. If the dump is requested as a result of - // an exception, exinfo contains exception information, otherwise, - // it is NULL. - bool WriteMinidumpWithException(DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - FilterCallback filter_; - MinidumpCallback callback_; - void* callback_context_; - - scoped_ptr crash_generation_client_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - wstring dump_path_; - - // The basename of the next minidump to be written, without the extension. - wstring next_minidump_id_; - - // The full pathname of the next minidump to be written, including the file - // extension. - wstring next_minidump_path_; - - // Pointers to C-string representations of the above. These are set when - // the above wstring versions are set in order to avoid calling c_str during - // an exception, as c_str may attempt to allocate heap memory. These - // pointers are not owned by the ExceptionHandler object, but their lifetimes - // should be equivalent to the lifetimes of the associated wstring, provided - // that the wstrings are not altered. - const wchar_t* dump_path_c_; - const wchar_t* next_minidump_id_c_; - const wchar_t* next_minidump_path_c_; - - HMODULE dbghelp_module_; - MiniDumpWriteDump_type minidump_write_dump_; - MINIDUMP_TYPE dump_type_; - - HMODULE rpcrt4_module_; - UuidCreate_type uuid_create_; - - // Tracks the handler types that were installed according to the - // handler_types constructor argument. - int handler_types_; - - // When installed_handler_ is true, previous_filter_ is the unhandled - // exception filter that was set prior to installing ExceptionHandler as - // the unhandled exception filter and pointing it to |this|. NULL indicates - // that there is no previous unhandled exception filter. - LPTOP_LEVEL_EXCEPTION_FILTER previous_filter_; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // Beginning in VC 8, the CRT provides an invalid parameter handler that will - // be called when some CRT functions are passed invalid parameters. In - // earlier CRTs, the same conditions would cause unexpected behavior or - // crashes. - _invalid_parameter_handler previous_iph_; -#endif // _MSC_VER >= 1400 - - // The CRT allows you to override the default handler for pure - // virtual function calls. - _purecall_handler previous_pch_; - - // The exception handler thread. - HANDLE handler_thread_; - - // True if the exception handler is being destroyed. - // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars. - // It has release semantics on write and acquire semantics on reads. - // See the msdn documentation. - volatile bool is_shutdown_; - - // The critical section enforcing the requirement that only one exception be - // handled by a handler at a time. - CRITICAL_SECTION handler_critical_section_; - - // Semaphores used to move exception handling between the exception thread - // and the handler thread. handler_start_semaphore_ is signalled by the - // exception thread to wake up the handler thread when an exception occurs. - // handler_finish_semaphore_ is signalled by the handler thread to wake up - // the exception thread when handling is complete. - HANDLE handler_start_semaphore_; - HANDLE handler_finish_semaphore_; - - // The next 2 fields contain data passed from the requesting thread to - // the handler thread. - - // The thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). - DWORD requesting_thread_id_; - - // The exception info passed to the exception handler on the exception - // thread, if an exception occurred. NULL for user-requested dumps. - EXCEPTION_POINTERS* exception_info_; - - // If the handler is invoked due to an assertion, this will contain a - // pointer to the assertion information. It is NULL at other times. - MDRawAssertionInfo* assertion_; - - // The return value of the handler, passed from the handler thread back to - // the requesting thread. - bool handler_return_value_; - - // If true, the handler will intercept EXCEPTION_BREAKPOINT and - // EXCEPTION_SINGLE_STEP exceptions. Leave this false (the default) - // to not interfere with debuggers. - bool handle_debug_exceptions_; - - // A stack of ExceptionHandler objects that have installed unhandled - // exception filters. This vector is used by HandleException to determine - // which ExceptionHandler object to route an exception to. When an - // ExceptionHandler is created with install_handler true, it will append - // itself to this list. - static vector* handler_stack_; - - // The index of the ExceptionHandler in handler_stack_ that will handle the - // next exception. Note that 0 means the last entry in handler_stack_, 1 - // means the next-to-last entry, and so on. This is used by HandleException - // to support multiple stacked Breakpad handlers. - static LONG handler_stack_index_; - - // handler_stack_critical_section_ guards operations on handler_stack_ and - // handler_stack_index_. The critical section is initialized by the - // first instance of the class and destroyed by the last instance of it. - static CRITICAL_SECTION handler_stack_critical_section_; - - // The number of instances of this class. - volatile static LONG instance_count_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.cc b/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.cc deleted file mode 100644 index 7672acfd..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.cc +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include - -#include "client/windows/sender/crash_report_sender.h" -#include "common/windows/http_upload.h" - -#if _MSC_VER < 1400 // MSVC 2005/8 -// Older MSVC doesn't have fscanf_s, but they are compatible as long as -// we don't use the string conversions (%s/%c/%S/%C). -#define fscanf_s fscanf -#endif - -namespace google_breakpad { - -static const char kCheckpointSignature[] = "GBP1\n"; - -CrashReportSender::CrashReportSender(const wstring &checkpoint_file) - : checkpoint_file_(checkpoint_file), - max_reports_per_day_(-1), - last_sent_date_(-1), - reports_sent_(0) { - FILE *fd; - if (OpenCheckpointFile(L"r", &fd) == 0) { - ReadCheckpoint(fd); - fclose(fd); - } -} - -ReportResult CrashReportSender::SendCrashReport( - const wstring &url, const map ¶meters, - const wstring &dump_file_name, wstring *report_code) { - int today = GetCurrentDate(); - if (today == last_sent_date_ && - max_reports_per_day_ != -1 && - reports_sent_ >= max_reports_per_day_) { - return RESULT_THROTTLED; - } - - int http_response = 0; - bool result = HTTPUpload::SendRequest( - url, parameters, dump_file_name, L"upload_file_minidump", report_code, - &http_response); - - if (result) { - ReportSent(today); - return RESULT_SUCCEEDED; - } else if (http_response == 400) { // TODO: update if/when the server - // switches to a different code - return RESULT_REJECTED; - } else { - return RESULT_FAILED; - } -} - -void CrashReportSender::ReadCheckpoint(FILE *fd) { - char buf[128]; - if (!fgets(buf, sizeof(buf), fd) || - strcmp(buf, kCheckpointSignature) != 0) { - return; - } - - if (fscanf_s(fd, "%d\n", &last_sent_date_) != 1) { - last_sent_date_ = -1; - return; - } - if (fscanf_s(fd, "%d\n", &reports_sent_) != 1) { - reports_sent_ = 0; - return; - } -} - -void CrashReportSender::ReportSent(int today) { - // Update the report stats - if (today != last_sent_date_) { - last_sent_date_ = today; - reports_sent_ = 0; - } - ++reports_sent_; - - // Update the checkpoint file - FILE *fd; - if (OpenCheckpointFile(L"w", &fd) == 0) { - fputs(kCheckpointSignature, fd); - fprintf(fd, "%d\n", last_sent_date_); - fprintf(fd, "%d\n", reports_sent_); - fclose(fd); - } -} - -int CrashReportSender::GetCurrentDate() const { - SYSTEMTIME system_time; - GetSystemTime(&system_time); - return (system_time.wYear * 10000) + (system_time.wMonth * 100) + - system_time.wDay; -} - -int CrashReportSender::OpenCheckpointFile(const wchar_t *mode, FILE **fd) { - if (checkpoint_file_.empty()) { - return ENOENT; - } -#if _MSC_VER >= 1400 // MSVC 2005/8 - return _wfopen_s(fd, checkpoint_file_.c_str(), mode); -#else - *fd = _wfopen(checkpoint_file_.c_str(), mode); - if (*fd == NULL) { - return errno; - } - return 0; -#endif -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.h b/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.h deleted file mode 100644 index da1ed0af..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/sender/crash_report_sender.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ -#define CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ - -// CrashReportSender is a "static" class which provides an API to upload -// crash reports via HTTP(S). A crash report is formatted as a multipart POST -// request, which contains a set of caller-supplied string key/value pairs, -// and a minidump file to upload. -// -// To use this library in your project, you will need to link against -// wininet.lib. - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -namespace google_breakpad { - -using std::wstring; -using std::map; - -typedef enum { - RESULT_FAILED = 0, // Failed to communicate with the server; try later. - RESULT_REJECTED, // Successfully sent the crash report, but the - // server rejected it; don't resend this report. - RESULT_SUCCEEDED, // The server accepted the crash report. - RESULT_THROTTLED // No attempt was made to send the crash report, because - // we exceeded the maximum reports per day. -} ReportResult; - -class CrashReportSender { - public: - // Initializes a CrashReportSender instance. - // If checkpoint_file is non-empty, breakpad will persist crash report - // state to this file. A checkpoint file is required for - // set_max_reports_per_day() to function properly. - explicit CrashReportSender(const wstring &checkpoint_file); - ~CrashReportSender() {} - - // Sets the maximum number of crash reports that will be sent in a 24-hour - // period. This uses the state persisted to the checkpoint file. - // The default value of -1 means that there is no limit on reports sent. - void set_max_reports_per_day(int reports) { - max_reports_per_day_ = reports; - } - - int max_reports_per_day() const { return max_reports_per_day_; } - - // Sends the specified minidump file, along with the map of - // name value pairs, as a multipart POST request to the given URL. - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. The return value indicates - // the result of the operation (see above for possible results). - // If report_code is non-NULL and the report is sent successfully (that is, - // the return value is RESULT_SUCCEEDED), a code uniquely identifying the - // report will be returned in report_code. - // (Otherwise, report_code will be unchanged.) - ReportResult SendCrashReport(const wstring &url, - const map ¶meters, - const wstring &dump_file_name, - wstring *report_code); - - private: - // Reads persistent state from a checkpoint file. - void ReadCheckpoint(FILE *fd); - - // Called when a new report has been sent, to update the checkpoint state. - void ReportSent(int today); - - // Returns today's date (UTC) formatted as YYYYMMDD. - int GetCurrentDate() const; - - // Opens the checkpoint file with the specified mode. - // Returns zero on success, or an error code on failure. - int OpenCheckpointFile(const wchar_t *mode, FILE **fd); - - wstring checkpoint_file_; - int max_reports_per_day_; - // The last date on which we sent a report, expressed as YYYYMMDD. - int last_sent_date_; - // Number of reports sent on last_sent_date_ - int reports_sent_; - - // Disallow copy constructor and operator= - explicit CrashReportSender(const CrashReportSender &); - void operator=(const CrashReportSender &); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // CLIENT_WINDOWS_SENDER_CRASH_REPORT_SENDER_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.cc b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.cc deleted file mode 100644 index f71addfb..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "precompile.h" - -namespace google_breakpad { - -Base::Base(Derived* derived) - : derived_(derived) { -} - -Base::~Base() { - derived_->DoSomething(); -} - -#pragma warning(push) -#pragma warning(disable:4355) -// Disable warning C4355: 'this' : used in base member initializer list. -Derived::Derived() - : Base(this) { // C4355 -} -#pragma warning(pop) - -void Derived::DoSomething() { -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.h b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.h deleted file mode 100644 index e3f2a4f3..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/abstract_class.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_ABSTRACT_CLASS_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_ABSTRACT_CLASS_H__ - -namespace google_breakpad { - -// Dummy classes to help generate a pure call violation. - -class Derived; - -class Base { - public: - Base(Derived* derived); - virtual ~Base(); - virtual void DoSomething() = 0; - - private: - Derived* derived_; -}; - -class Derived : public Base { - public: - Derived(); - virtual void DoSomething(); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.cc b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.cc deleted file mode 100644 index a3c560bd..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.cc +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// crash_generation_app.cpp : Defines the entry point for the application. -// - -#include "precompile.h" - -namespace google_breakpad { - -const int kMaxLoadString = 100; -const wchar_t kPipeName[] = L"\\\\.\\pipe\\BreakpadCrashServices\\TestServer"; - -const DWORD kEditBoxStyles = WS_CHILD | - WS_VISIBLE | - WS_VSCROLL | - ES_LEFT | - ES_MULTILINE | - ES_AUTOVSCROLL | - ES_READONLY; - -// Maximum length of a line in the edit box. -const size_t kMaximumLineLength = 256; - -// CS to access edit control in a thread safe way. -static CRITICAL_SECTION* cs_edit = NULL; - -// Edit control. -static HWND client_status_edit_box; - -HINSTANCE current_instance; // Current instance. -TCHAR title[kMaxLoadString]; // Title bar text. -TCHAR window_class[kMaxLoadString]; // Main window class name. - -ATOM MyRegisterClass(HINSTANCE instance); -BOOL InitInstance(HINSTANCE, int); -LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); -INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); - -static int kCustomInfoCount = 2; -static CustomInfoEntry kCustomInfoEntries[] = { - CustomInfoEntry(L"prod", L"CrashTestApp"), - CustomInfoEntry(L"ver", L"1.0"), -}; - -static ExceptionHandler* handler = NULL; -static CrashGenerationServer* crash_server = NULL; - -// Registers the window class. -// -// This function and its usage are only necessary if you want this code -// to be compatible with Win32 systems prior to the 'RegisterClassEx' -// function that was added to Windows 95. It is important to call this -// function so that the application will get 'well formed' small icons -// associated with it. -ATOM MyRegisterClass(HINSTANCE instance) { - WNDCLASSEX wcex; - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = instance; - wcex.hIcon = LoadIcon(instance, - MAKEINTRESOURCE(IDI_CRASHGENERATIONAPP)); - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = MAKEINTRESOURCE(IDC_CRASHGENERATIONAPP); - wcex.lpszClassName = window_class; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - return RegisterClassEx(&wcex); -} - -// Saves instance handle and creates main window -// -// In this function, we save the instance handle in a global variable and -// create and display the main program window. -BOOL InitInstance(HINSTANCE instance, int command_show) { - current_instance = instance; - HWND wnd = CreateWindow(window_class, - title, - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - 0, - CW_USEDEFAULT, - 0, - NULL, - NULL, - instance, - NULL); - - if (!wnd) { - return FALSE; - } - - ShowWindow(wnd, command_show); - UpdateWindow(wnd); - - return TRUE; -} - -static void AppendTextToEditBox(TCHAR* text) { - EnterCriticalSection(cs_edit); - SYSTEMTIME current_time; - GetLocalTime(¤t_time); - TCHAR line[kMaximumLineLength]; - int result = swprintf_s(line, - kMaximumLineLength, - L"[%.2d-%.2d-%.4d %.2d:%.2d:%.2d] %s", - current_time.wMonth, - current_time.wDay, - current_time.wYear, - current_time.wHour, - current_time.wMinute, - current_time.wSecond, - text); - - if (result == -1) { - return; - } - - int length = GetWindowTextLength(client_status_edit_box); - SendMessage(client_status_edit_box, - EM_SETSEL, - (WPARAM)length, - (LPARAM)length); - SendMessage(client_status_edit_box, - EM_REPLACESEL, - (WPARAM)FALSE, - (LPARAM)line); - LeaveCriticalSection(cs_edit); -} - -static DWORD WINAPI AppendTextWorker(void* context) { - TCHAR* text = reinterpret_cast(context); - - AppendTextToEditBox(text); - delete[] text; - - return 0; -} - -bool ShowDumpResults(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) { - TCHAR* text = new TCHAR[kMaximumLineLength]; - text[0] = _T('\0'); - int result = swprintf_s(text, - kMaximumLineLength, - TEXT("Dump generation request %s\r\n"), - succeeded ? TEXT("succeeded") : TEXT("failed")); - if (result == -1) { - delete [] text; - } - - AppendTextWorker(text); - return succeeded; -} - -static void _cdecl ShowClientConnected(void* context, - const ClientInfo* client_info) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - L"Client connected:\t\t%d\r\n", - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -static void _cdecl ShowClientCrashed(void* context, - const ClientInfo* client_info, - const wstring* dump_path) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - TEXT("Client requested dump:\t%d\r\n"), - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); - - CustomClientInfo custom_info = client_info->GetCustomInfo(); - if (custom_info.count <= 0) { - return; - } - - wstring str_line; - for (int i = 0; i < custom_info.count; ++i) { - if (i > 0) { - str_line += L", "; - } - str_line += custom_info.entries[i].name; - str_line += L": "; - str_line += custom_info.entries[i].value; - } - - line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - result = swprintf_s(line, - kMaximumLineLength, - L"%s\n", - str_line.c_str()); - if (result == -1) { - delete[] line; - return; - } - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -static void _cdecl ShowClientExited(void* context, - const ClientInfo* client_info) { - TCHAR* line = new TCHAR[kMaximumLineLength]; - line[0] = _T('\0'); - int result = swprintf_s(line, - kMaximumLineLength, - TEXT("Client exited:\t\t%d\r\n"), - client_info->pid()); - - if (result == -1) { - delete[] line; - return; - } - - QueueUserWorkItem(AppendTextWorker, line, WT_EXECUTEDEFAULT); -} - -void CrashServerStart() { - // Do not create another instance of the server. - if (crash_server) { - return; - } - - std::wstring dump_path = L"C:\\Dumps\\"; - crash_server = new CrashGenerationServer(kPipeName, - NULL, - ShowClientConnected, - NULL, - ShowClientCrashed, - NULL, - ShowClientExited, - NULL, - true, - &dump_path); - - if (!crash_server->Start()) { - MessageBoxW(NULL, L"Unable to start server", L"Dumper", MB_OK); - delete crash_server; - crash_server = NULL; - } -} - -void CrashServerStop() { - delete crash_server; - crash_server = NULL; -} - -void DerefZeroCrash() { - int* x = 0; - *x = 1; -} - -void InvalidParamCrash() { - printf(NULL); -} - -void PureCallCrash() { - Derived derived; -} - -void RequestDump() { - if (!handler->WriteMinidump()) { - MessageBoxW(NULL, L"Dump request failed", L"Dumper", MB_OK); - } - kCustomInfoEntries[1].set_value(L"1.1"); -} - -void CleanUp() { - if (cs_edit) { - DeleteCriticalSection(cs_edit); - delete cs_edit; - } - - if (handler) { - delete handler; - } - - if (crash_server) { - delete crash_server; - } -} - -// Processes messages for the main window. -// -// WM_COMMAND - process the application menu. -// WM_PAINT - Paint the main window. -// WM_DESTROY - post a quit message and return. -LRESULT CALLBACK WndProc(HWND wnd, - UINT message, - WPARAM w_param, - LPARAM l_param) { - int message_id; - int message_event; - PAINTSTRUCT ps; - HDC hdc; - -#pragma warning(push) -#pragma warning(disable:4312) - // Disable warning C4312: 'type cast' : conversion from 'LONG' to - // 'HINSTANCE' of greater size. - // The value returned by GetwindowLong in the case below returns unsigned. - HINSTANCE instance = (HINSTANCE)GetWindowLong(wnd, GWL_HINSTANCE); -#pragma warning(pop) - - switch (message) { - case WM_COMMAND: - // Parse the menu selections. - message_id = LOWORD(w_param); - message_event = HIWORD(w_param); - switch (message_id) { - case IDM_ABOUT: - DialogBox(current_instance, - MAKEINTRESOURCE(IDD_ABOUTBOX), - wnd, - About); - break; - case IDM_EXIT: - DestroyWindow(wnd); - break; - case ID_SERVER_START: - CrashServerStart(); - break; - case ID_SERVER_STOP: - CrashServerStop(); - break; - case ID_CLIENT_DEREFZERO: - DerefZeroCrash(); - break; - case ID_CLIENT_INVALIDPARAM: - InvalidParamCrash(); - break; - case ID_CLIENT_PURECALL: - PureCallCrash(); - break; - case ID_CLIENT_REQUESTEXPLICITDUMP: - RequestDump(); - break; - default: - return DefWindowProc(wnd, message, w_param, l_param); - } - break; - case WM_CREATE: - client_status_edit_box = CreateWindow(TEXT("EDIT"), - NULL, - kEditBoxStyles, - 0, - 0, - 0, - 0, - wnd, - NULL, - instance, - NULL); - break; - case WM_SIZE: - // Make the edit control the size of the window's client area. - MoveWindow(client_status_edit_box, - 0, - 0, - LOWORD(l_param), // width of client area. - HIWORD(l_param), // height of client area. - TRUE); // repaint window. - break; - case WM_SETFOCUS: - SetFocus(client_status_edit_box); - break; - case WM_PAINT: - hdc = BeginPaint(wnd, &ps); - EndPaint(wnd, &ps); - break; - case WM_DESTROY: - CleanUp(); - PostQuitMessage(0); - break; - default: - return DefWindowProc(wnd, message, w_param, l_param); - } - - return 0; -} - -// Message handler for about box. -INT_PTR CALLBACK About(HWND dlg, - UINT message, - WPARAM w_param, - LPARAM l_param) { - UNREFERENCED_PARAMETER(l_param); - switch (message) { - case WM_INITDIALOG: - return (INT_PTR)TRUE; - - case WM_COMMAND: - if (LOWORD(w_param) == IDOK || LOWORD(w_param) == IDCANCEL) { - EndDialog(dlg, LOWORD(w_param)); - return (INT_PTR)TRUE; - } - break; - } - - return (INT_PTR)FALSE; -} - -} // namespace google_breakpad - -int APIENTRY _tWinMain(HINSTANCE instance, - HINSTANCE previous_instance, - LPTSTR command_line, - int command_show) { - using namespace google_breakpad; - - UNREFERENCED_PARAMETER(previous_instance); - UNREFERENCED_PARAMETER(command_line); - - cs_edit = new CRITICAL_SECTION(); - InitializeCriticalSection(cs_edit); - - CustomClientInfo custom_info = {kCustomInfoEntries, kCustomInfoCount}; - - // This is needed for CRT to not show dialog for invalid param - // failures and instead let the code handle it. - _CrtSetReportMode(_CRT_ASSERT, 0); - handler = new ExceptionHandler(L"C:\\dumps\\", - NULL, - google_breakpad::ShowDumpResults, - NULL, - ExceptionHandler::HANDLER_ALL, - MiniDumpNormal, - kPipeName, - &custom_info); - - // Initialize global strings. - LoadString(instance, IDS_APP_TITLE, title, kMaxLoadString); - LoadString(instance, - IDC_CRASHGENERATIONAPP, - window_class, - kMaxLoadString); - MyRegisterClass(instance); - - // Perform application initialization. - if (!InitInstance (instance, command_show)) { - return FALSE; - } - - HACCEL accel_table = LoadAccelerators( - instance, - MAKEINTRESOURCE(IDC_CRASHGENERATIONAPP)); - - // Main message loop. - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) { - if (!TranslateAccelerator(msg.hwnd, accel_table, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - return (int)msg.wParam; -} - diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.h b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.h deleted file mode 100644 index 4d3bb6eb..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ - -#include "resource.h" - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_CRASH_GENERATION_APP_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.ico b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.ico deleted file mode 100644 index d551aa3a..00000000 Binary files a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.ico and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.rc b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.rc deleted file mode 100644 index a362562b..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/crash_generation_app.rc +++ /dev/null @@ -1,144 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_CRASHGENERATIONAPP ICON "crash_generation_app.ico" -IDI_SMALL ICON "small.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDC_CRASHGENERATIONAPP MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "E&xit", IDM_EXIT - END - POPUP "&Server" - BEGIN - MENUITEM "&Start", ID_SERVER_START - MENUITEM "S&top", ID_SERVER_STOP - END - POPUP "&Client" - BEGIN - MENUITEM "&Deref Zero", ID_CLIENT_DEREFZERO - MENUITEM "&Invalid Param", ID_CLIENT_INVALIDPARAM - MENUITEM "&Pure Call", ID_CLIENT_PURECALL - MENUITEM "&Request Dump", ID_CLIENT_REQUESTEXPLICITDUMP - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDC_CRASHGENERATIONAPP ACCELERATORS -BEGIN - "?", IDM_ABOUT, ASCII, ALT - "/", IDM_ABOUT, ASCII, ALT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG 22, 17, 230, 75 -STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "About" -FONT 8, "System" -BEGIN - ICON IDI_CRASHGENERATIONAPP,IDC_MYICON,14,9,16,16 - LTEXT "CrashGenerationApp Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX - LTEXT "Copyright (C) 2008",IDC_STATIC,49,20,119,8 - DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_APP_TITLE "CrashGenerationApp" - IDC_CRASHGENERATIONAPP "CRASHGENERATIONAPP" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.cc b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.cc deleted file mode 100644 index 9d2173cc..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.cc +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// precompile.cpp : source file that includes just the standard includes -// CrashGenerationApp.pch will be the pre-compiled header -// precompile.obj will contain the pre-compiled type information - -#include "precompile.h" - -// Reference any additional headers you need in PRECOMPILE.H -// and not in this file. diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.h b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.h deleted file mode 100644 index 1ade4451..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/precompile.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PreCompile.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_PRECOMPILE_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_PRECOMPILE_H__ - -// Modify the following defines if you have to target a platform prior to -// the ones specified below. Refer to MSDN for the latest info on -// corresponding values for different platforms. - -// Allow use of features specific to Windows XP or later. -#ifndef WINVER -// Change this to the appropriate value to target other versions of Windows. -#define WINVER 0x0501 -#endif - -// Allow use of features specific to Windows XP or later. -#ifndef _WIN32_WINNT -// Change this to the appropriate value to target other versions of Windows. -#define _WIN32_WINNT 0x0501 -#endif - -// Allow use of features specific to Windows 98 or later. -#ifndef _WIN32_WINDOWS -// Change this to the appropriate value to target Windows Me or later. -#define _WIN32_WINDOWS 0x0410 -#endif - -// Allow use of features specific to IE 6.0 or later. -#ifndef _WIN32_IE -// Change this to the appropriate value to target other versions of IE. -#define _WIN32_IE 0x0600 -#endif - -// Exclude rarely-used stuff from Windows headers -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/client_info.h" -#include "client/windows/crash_generation/crash_generation_client.h" -#include "client/windows/crash_generation/crash_generation_server.h" -#include "client/windows/crash_generation/minidump_generator.h" -#include "client/windows/handler/exception_handler.h" -#include "client/windows/tests/crash_generation_app/abstract_class.h" -#include "client/windows/tests/crash_generation_app/crash_generation_app.h" -#include "google_breakpad/common/minidump_format.h" - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_PRECOMPILE_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/resource.h b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/resource.h deleted file mode 100644 index 8c7f6570..00000000 --- a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/resource.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PreCompile.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#ifndef CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ -#define CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ - -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by crash_generation_app.rc -// -#define IDC_MYICON 2 -#define IDD_CRASHGENERATIONAPP_DIALOG 102 -#define IDS_APP_TITLE 103 -#define IDD_ABOUTBOX 103 -#define IDM_ABOUT 104 -#define IDM_EXIT 105 -#define IDI_CRASHGENERATIONAPP 107 -#define IDI_SMALL 108 -#define IDC_CRASHGENERATIONAPP 109 -#define IDR_MAINFRAME 128 -#define ID_SERVER_START 32771 -#define ID_SERVER_STOP 32772 -#define ID_CLIENT_INVALIDPARAM 32773 -#define ID_CLIENT_ASSERTFAILURE 32774 -#define ID_CLIENT_DEREFZERO 32775 -#define ID_CLIENT_PURECALL 32777 -#define ID_CLIENT_REQUESTEXPLICITDUMP 32778 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 129 -#define _APS_NEXT_COMMAND_VALUE 32780 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 110 -#endif -#endif - -#endif // CLIENT_WINDOWS_TESTS_CRASH_GENERATION_APP_RESOURCE_H__ diff --git a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/small.ico b/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/small.ico deleted file mode 100644 index d551aa3a..00000000 Binary files a/thirdparty/google-breakpad/r318/src/client/windows/tests/crash_generation_app/small.ico and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/convert_UTF.c b/thirdparty/google-breakpad/r318/src/common/convert_UTF.c deleted file mode 100644 index 80178d35..00000000 --- a/thirdparty/google-breakpad/r318/src/common/convert_UTF.c +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Copyright 2001-2004 Unicode, Inc. - * - * Disclaimer - * - * This source code is provided as is by Unicode, Inc. No claims are - * made as to fitness for any particular purpose. No warranties of any - * kind are expressed or implied. The recipient agrees to determine - * applicability of information provided. If this file has been - * purchased on magnetic or optical media from Unicode, Inc., the - * sole remedy for any claim will be exchange of defective media - * within 90 days of receipt. - * - * Limitations on Rights to Redistribute This Code - * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form - * for internal or external distribution as long as this notice - * remains attached. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Source code file. -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Sept 2001: fixed const & error conditions per -mods suggested by S. Parent & A. Lillich. -June 2002: Tim Dodd added detection and handling of incomplete -source sequences, enhanced error detection, added casts -to eliminate compiler warnings. -July 2003: slight mods to back out aggressive FFFE detection. -Jan 2004: updated switches in from-UTF8 conversions. -Oct 2004: updated to use UNI_MAX_LEGAL_UTF32 in UTF-32 conversions. - -See the header file "ConvertUTF.h" for complete documentation. - ------------------------------------------------------------------------- */ - - -#include "convert_UTF.h" -#ifdef CVTUTF_DEBUG -#include -#endif - -static const int halfShift = 10; /* used for shifting by 10 bits */ - -static const UTF32 halfBase = 0x0010000UL; -static const UTF32 halfMask = 0x3FFUL; - -#define UNI_SUR_HIGH_START (UTF32)0xD800 -#define UNI_SUR_HIGH_END (UTF32)0xDBFF -#define UNI_SUR_LOW_START (UTF32)0xDC00 -#define UNI_SUR_LOW_END (UTF32)0xDFFF -#define false 0 -#define true 1 - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - if (target >= targetEnd) { - result = targetExhausted; break; - } - ch = *source++; - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32; 0xffff or 0xfffe are both reserved values */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_LEGAL_UTF32) { - if (flags == strictConversion) { - result = sourceIllegal; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - --source; /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF32* target = *targetStart; - UTF32 ch, ch2; - while (source < sourceEnd) { - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - if (target >= targetEnd) { - source = oldSource; /* Back up source pointer! */ - result = targetExhausted; break; - } - *target++ = ch; - } - *sourceStart = source; - *targetStart = target; -#ifdef CVTUTF_DEBUG - if (result == sourceIllegal) { - fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2); - fflush(stderr); - } -#endif - return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Index into the table below with the first byte of a UTF-8 sequence to - * get the number of trailing bytes that are supposed to follow it. - * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is - * left as-is for anyone who may want to do such conversion, which was - * allowed in earlier algorithms. - */ -static const char trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -/* - * Magic values subtracted from a buffer value during UTF8 conversion. - * This table contains as many values as there might be trailing bytes - * in a UTF-8 sequence. - */ -static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, - 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; - -/* - * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed - * into the first byte, depending on how many bytes follow. There are - * as many entries in this table as there are UTF-8 sequence types. - * (I.e., one byte sequence, two byte... etc.). Remember that sequencs - * for *legal* UTF-8 will be 4 or fewer bytes total. - */ -static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - -/* --------------------------------------------------------------------- */ - -/* The interface converts a whole buffer to avoid function-call overhead. -* Constants have been gathered. Loops & conditionals have been removed as -* much as possible for efficiency, in favor of drop-through switches. -* (See "Note A" at the bottom of the file for equivalent code.) -* If your compiler supports it, the "isLegalUTF8" call can be turned -* into an inline function. -*/ - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - UTF32 ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* Figure out how many bytes the result will require */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - } - - target += bytesToWrite; - if (target > targetEnd) { - source = oldSource; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Utility routine to tell whether a sequence of bytes is legal UTF-8. - * This must be called with the length pre-determined by the first byte. - * If not calling this from ConvertUTF8to*, then the length can be set by: - * length = trailingBytesForUTF8[*source]+1; - * and the sequence is illegal right away if there aren't that many bytes - * available. - * If presented with a length > 4, this returns false. The Unicode - * definition of UTF-8 goes up to 4-byte sequences. - */ - -static Boolean isLegalUTF8(const UTF8 *source, int length) { - UTF8 a; - const UTF8 *srcptr = source+length; - switch (length) { - default: return false; - /* Everything else falls through when "true"... */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 2: if ((a = (*--srcptr)) > 0xBF) return false; - - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return false; break; - case 0xED: if (a > 0x9F) return false; break; - case 0xF0: if (a < 0x90) return false; break; - case 0xF4: if (a > 0x8F) return false; break; - default: if (a < 0x80) return false; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return false; - } - if (*source > 0xF4) return false; - return true; -} - -/* --------------------------------------------------------------------- */ - -/* - * Exported function to return whether a UTF-8 sequence is legal or not. - * This is not used here; it's just exported. - */ -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { - int length = trailingBytesForUTF8[*source]+1; - if (source+length > sourceEnd) { - return false; - } - return isLegalUTF8(source, length); -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_UTF16) { - if (flags == strictConversion) { - result = sourceIllegal; - source -= (extraBytesToRead+1); /* return to the start */ - break; /* Bail out; shouldn't continue */ - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - ch = *source++; - if (flags == strictConversion ) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* - * Figure out how many bytes the result will require. Turn any - * illegally large UTF32 things (> Plane 17) into replacement chars. - */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - result = sourceIllegal; - } - - target += bytesToWrite; - if (target > targetEnd) { - --source; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF32* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; - case 4: ch += *source++; ch <<= 6; - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up the source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_LEGAL_UTF32) { - /* - * UTF-16 surrogate values are illegal in UTF-32, and anything - * over Plane 17 (> 0x10FFFF) is illegal. - */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = ch; - } - } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */ - result = sourceIllegal; - *target++ = UNI_REPLACEMENT_CHAR; - } - } - *sourceStart = source; - *targetStart = target; - return result; -} - -/* --------------------------------------------------------------------- - -Note A. -The fall-through switches in UTF-8 reading code save a -temp variable, some decrements & conditionals. The switches -are equivalent to the following loop: -{ - int tmpBytesToRead = extraBytesToRead+1; - do { - ch += *source++; - --tmpBytesToRead; - if (tmpBytesToRead) ch <<= 6; - } while (tmpBytesToRead > 0); -} -In UTF-8 writing code, the switches on "bytesToWrite" are -similarly unrolled loops. - ---------------------------------------------------------------------- */ diff --git a/thirdparty/google-breakpad/r318/src/common/convert_UTF.h b/thirdparty/google-breakpad/r318/src/common/convert_UTF.h deleted file mode 100644 index b1556de8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/convert_UTF.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2001-2004 Unicode, Inc. - * - * Disclaimer - * - * This source code is provided as is by Unicode, Inc. No claims are - * made as to fitness for any particular purpose. No warranties of any - * kind are expressed or implied. The recipient agrees to determine - * applicability of information provided. If this file has been - * purchased on magnetic or optical media from Unicode, Inc., the - * sole remedy for any claim will be exchange of defective media - * within 90 days of receipt. - * - * Limitations on Rights to Redistribute This Code - * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form - * for internal or external distribution as long as this notice - * remains attached. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Header file. - -Several funtions are included here, forming a complete set of -conversions between the three formats. UTF-7 is not included -here, but is handled in a separate source file. - -Each of these routines takes pointers to input buffers and output -buffers. The input buffers are const. - -Each routine converts the text between *sourceStart and sourceEnd, -putting the result into the buffer between *targetStart and -targetEnd. Note: the end pointers are *after* the last item: e.g. -*(sourceEnd - 1) is the last item. - -The return result indicates whether the conversion was successful, -and if not, whether the problem was in the source or target buffers. -(Only the first encountered problem is indicated.) - -After the conversion, *sourceStart and *targetStart are both -updated to point to the end of last text successfully converted in -the respective buffers. - -Input parameters: -sourceStart - pointer to a pointer to the source buffer. -The contents of this are modified on return so that -it points at the next thing to be converted. -targetStart - similarly, pointer to pointer to the target buffer. -sourceEnd, targetEnd - respectively pointers to the ends of the -two buffers, for overflow checking only. - -These conversion functions take a ConversionFlags argument. When this -flag is set to strict, both irregular sequences and isolated surrogates -will cause an error. When the flag is set to lenient, both irregular -sequences and isolated surrogates are converted. - -Whether the flag is strict or lenient, all illegal sequences will cause -an error return. This includes sequences such as: , , -or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code -must check for illegal sequences. - -When the flag is set to lenient, characters over 0x10FFFF are converted -to the replacement character; otherwise (when the flag is set to strict) -they constitute an error. - -Output parameters: -The value "sourceIllegal" is returned from some routines if the input -sequence is malformed. When "sourceIllegal" is returned, the source -value will point to the illegal value that caused the problem. E.g., -in UTF-8 when a sequence is malformed, it points to the start of the -malformed sequence. - -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Fixes & updates, Sept 2001. - ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------- -The following 4 definitions are compiler-specific. -The C standard does not guarantee that wchar_t has at least -16 bits, so wchar_t is no less portable than unsigned short! -All should be unsigned values to avoid sign extension during -bit mask & shift operations. ------------------------------------------------------------------------- */ - -typedef unsigned long UTF32; /* at least 32 bits */ -typedef unsigned short UTF16; /* at least 16 bits */ -typedef unsigned char UTF8; /* typically 8 bits */ -typedef unsigned char Boolean; /* 0 or 1 */ - -/* Some fundamental constants */ -#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD -#define UNI_MAX_BMP (UTF32)0x0000FFFF -#define UNI_MAX_UTF16 (UTF32)0x0010FFFF -#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF -#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF - -typedef enum { - conversionOK, /* conversion successful */ - sourceExhausted, /* partial character in source, but hit end */ - targetExhausted, /* insuff. room in target for conversion */ - sourceIllegal /* source sequence is illegal/malformed */ -} ConversionResult; - -typedef enum { - strictConversion = 0, - lenientConversion -} ConversionFlags; - -/* This is for C++ and does no harm in C */ -#ifdef __cplusplus -extern "C" { -#endif - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); - -#ifdef __cplusplus -} -#endif - -/* --------------------------------------------------------------------- */ diff --git a/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.cc b/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.cc deleted file mode 100644 index aff0d792..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.cc +++ /dev/null @@ -1,781 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "common/linux/dump_symbols.h" -#include "common/linux/file_id.h" -#include "common/linux/guid_creator.h" -#include "processor/scoped_ptr.h" - -// This namespace contains helper functions. -namespace { - -// Infomation of a line. -struct LineInfo { - // The index into string table for the name of the source file which - // this line belongs to. - // Load from stab symbol. - uint32_t source_name_index; - // Offset from start of the function. - // Load from stab symbol. - ElfW(Off) rva_to_func; - // Offset from base of the loading binary. - ElfW(Off) rva_to_base; - // Size of the line. - // It is the difference of the starting address of the line and starting - // address of the next N_SLINE, N_FUN or N_SO. - uint32_t size; - // Line number. - uint32_t line_num; - // Id of the source file for this line. - int source_id; -}; - -typedef std::list LineInfoList; - -// Information of a function. -struct FuncInfo { - // Name of the function. - const char *name; - // Offset from the base of the loading address. - ElfW(Off) rva_to_base; - // Virtual address of the function. - // Load from stab symbol. - ElfW(Addr) addr; - // Size of the function. - // It is the difference of the starting address of the function and starting - // address of the next N_FUN or N_SO. - uint32_t size; - // Total size of stack parameters. - uint32_t stack_param_size; - // Is there any lines included from other files? - bool has_sol; - // Line information array. - LineInfoList line_info; -}; - -typedef std::list FuncInfoList; - -// Information of a source file. -struct SourceFileInfo { - // Name string index into the string table. - uint32_t name_index; - // Name of the source file. - const char *name; - // Starting address of the source file. - ElfW(Addr) addr; - // Id of the source file. - int source_id; - // Functions information. - FuncInfoList func_info; -}; - -typedef std::list SourceFileInfoList; - -// Information of a symbol table. -// This is the root of all types of symbol. -struct SymbolInfo { - SourceFileInfoList source_file_info; - - // The next source id for newly found source file. - int next_source_id; -}; - -// Stab section name. -static const char *kStabName = ".stab"; - -// Demangle using abi call. -// Older GCC may not support it. -static std::string Demangle(const char *mangled) { - int status = 0; - char *demangled = abi::__cxa_demangle(mangled, NULL, NULL, &status); - if (status == 0 && demangled != NULL) { - std::string str(demangled); - free(demangled); - return str; - } - return std::string(mangled); -} - -// Fix offset into virtual address by adding the mapped base into offsets. -// Make life easier when want to find something by offset. -static void FixAddress(void *obj_base) { - ElfW(Word) base = reinterpret_cast(obj_base); - ElfW(Ehdr) *elf_header = static_cast(obj_base); - elf_header->e_phoff += base; - elf_header->e_shoff += base; - ElfW(Shdr) *sections = reinterpret_cast(elf_header->e_shoff); - for (int i = 0; i < elf_header->e_shnum; ++i) - sections[i].sh_offset += base; -} - -// Find the prefered loading address of the binary. -static ElfW(Addr) GetLoadingAddress(const ElfW(Phdr) *program_headers, - int nheader) { - for (int i = 0; i < nheader; ++i) { - const ElfW(Phdr) &header = program_headers[i]; - // For executable, it is the PT_LOAD segment with offset to zero. - if (header.p_type == PT_LOAD && - header.p_offset == 0) - return header.p_vaddr; - } - // For other types of ELF, return 0. - return 0; -} - -static bool WriteFormat(int fd, const char *fmt, ...) { - va_list list; - char buffer[4096]; - ssize_t expected, written; - va_start(list, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, list); - expected = strlen(buffer); - written = write(fd, buffer, strlen(buffer)); - va_end(list); - return expected == written; -} - -static bool IsValidElf(const ElfW(Ehdr) *elf_header) { - return memcmp(elf_header, ELFMAG, SELFMAG) == 0; -} - -static const ElfW(Shdr) *FindSectionByName(const char *name, - const ElfW(Shdr) *sections, - const ElfW(Shdr) *strtab, - int nsection) { - assert(name != NULL); - assert(sections != NULL); - assert(nsection > 0); - - int name_len = strlen(name); - if (name_len == 0) - return NULL; - - for (int i = 0; i < nsection; ++i) { - const char *section_name = - (char*)(strtab->sh_offset + sections[i].sh_name); - if (!strncmp(name, section_name, name_len)) - return sections + i; - } - return NULL; -} - -// TODO(liuli): Computer the stack parameter size. -// Expect parameter variables are immediately following the N_FUN symbol. -// Will need to parse the type information to get a correct size. -static int LoadStackParamSize(struct nlist *list, - struct nlist *list_end, - struct FuncInfo *func_info) { - struct nlist *cur_list = list; - assert(cur_list->n_type == N_FUN); - ++cur_list; - int step = 1; - while (cur_list < list_end && cur_list->n_type == N_PSYM) { - ++cur_list; - ++step; - } - func_info->stack_param_size = 0; - return step; -} - -static int LoadLineInfo(struct nlist *list, - struct nlist *list_end, - const struct SourceFileInfo &source_file_info, - struct FuncInfo *func_info) { - struct nlist *cur_list = list; - func_info->has_sol = false; - // Records which source file the following lines belongs. Default - // to the file we are handling. This helps us handling inlined source. - // When encountering N_SOL, we will change this to the source file - // specified by N_SOL. - int current_source_name_index = source_file_info.name_index; - do { - // Skip non line information. - while (cur_list < list_end && cur_list->n_type != N_SLINE) { - // Only exit when got another function, or source file. - if (cur_list->n_type == N_FUN || cur_list->n_type == N_SO) - return cur_list - list; - // N_SOL means source lines following it will be from - // another source file. - if (cur_list->n_type == N_SOL) { - func_info->has_sol = true; - - if (cur_list->n_un.n_strx > 0 && - cur_list->n_un.n_strx != current_source_name_index) { - // The following lines will be from this source file. - current_source_name_index = cur_list->n_un.n_strx; - } - } - ++cur_list; - } - struct LineInfo line; - while (cur_list < list_end && cur_list->n_type == N_SLINE) { - line.source_name_index = current_source_name_index; - line.rva_to_func = cur_list->n_value; - // n_desc is a signed short - line.line_num = (unsigned short)cur_list->n_desc; - // Don't set it here. - // Will be processed in later pass. - line.source_id = -1; - func_info->line_info.push_back(line); - ++cur_list; - } - } while (list < list_end); - - return cur_list - list; -} - -static int LoadFuncSymbols(struct nlist *list, - struct nlist *list_end, - const ElfW(Shdr) *stabstr_section, - struct SourceFileInfo *source_file_info) { - struct nlist *cur_list = list; - assert(cur_list->n_type == N_SO); - ++cur_list; - source_file_info->func_info.clear(); - while (cur_list < list_end) { - // Go until the function symbol. - while (cur_list < list_end && cur_list->n_type != N_FUN) { - if (cur_list->n_type == N_SO) { - return cur_list - list; - } - ++cur_list; - continue; - } - if (cur_list->n_type == N_FUN) { - struct FuncInfo func_info; - func_info.name = - reinterpret_cast(cur_list->n_un.n_strx + - stabstr_section->sh_offset); - func_info.addr = cur_list->n_value; - func_info.rva_to_base = 0; - func_info.size = 0; - func_info.stack_param_size = 0; - func_info.has_sol = 0; - - // Stack parameter size. - cur_list += LoadStackParamSize(cur_list, list_end, &func_info); - // Line info. - cur_list += LoadLineInfo(cur_list, - list_end, - *source_file_info, - &func_info); - - // Functions in this module should have address bigger than the module - // startring address. - // There maybe a lot of duplicated entry for a function in the symbol, - // only one of them can met this. - if (func_info.addr >= source_file_info->addr) { - source_file_info->func_info.push_back(func_info); - } - } - } - return cur_list - list; -} - -// Comapre the address. -// The argument should have a memeber named "addr" -template -static bool CompareAddress(T1 *a, T2 *b) { - return a->addr < b->addr; -} - -// Sort the array into increasing ordered array based on the virtual address. -// Return vector of pointers to the elements in the incoming array. So caller -// should make sure the returned vector lives longer than the incoming vector. -template -static std::vector SortByAddress( - Container *container) { - typedef typename Container::iterator It; - typedef typename Container::value_type T; - std::vector sorted_array_ptr; - sorted_array_ptr.reserve(container->size()); - for (It it = container->begin(); it != container->end(); it++) - sorted_array_ptr.push_back(&(*it)); - std::sort(sorted_array_ptr.begin(), - sorted_array_ptr.end(), - std::ptr_fun(CompareAddress)); - - return sorted_array_ptr; -} - -// Find the address of the next function or source file symbol in the symbol -// table. The address should be bigger than the current function's address. -static ElfW(Addr) NextAddress( - std::vector *sorted_functions, - std::vector *sorted_files, - const struct FuncInfo &func_info) { - std::vector::iterator next_func_iter = - std::find_if(sorted_functions->begin(), - sorted_functions->end(), - std::bind1st( - std::ptr_fun( - CompareAddress - ), - &func_info) - ); - if (next_func_iter != sorted_functions->end()) - return (*next_func_iter)->addr; - - std::vector::iterator next_file_iter = - std::find_if(sorted_files->begin(), - sorted_files->end(), - std::bind1st( - std::ptr_fun( - CompareAddress - ), - &func_info) - ); - if (next_file_iter != sorted_files->end()) { - return (*next_file_iter)->addr; - } - return 0; -} - -static int FindFileByNameIdx(uint32_t name_index, - SourceFileInfoList &files) { - for (SourceFileInfoList::iterator it = files.begin(); - it != files.end(); it++) { - if (it->name_index == name_index) - return it->source_id; - } - - return -1; -} - -// Add included file information. -// Also fix the source id for the line info. -static void AddIncludedFiles(struct SymbolInfo *symbols, - const ElfW(Shdr) *stabstr_section) { - for (SourceFileInfoList::iterator source_file_it = - symbols->source_file_info.begin(); - source_file_it != symbols->source_file_info.end(); - ++source_file_it) { - struct SourceFileInfo &source_file = *source_file_it; - - for (FuncInfoList::iterator func_info_it = source_file.func_info.begin(); - func_info_it != source_file.func_info.end(); - ++func_info_it) { - struct FuncInfo &func_info = *func_info_it; - - for (LineInfoList::iterator line_info_it = func_info.line_info.begin(); - line_info_it != func_info.line_info.end(); ++line_info_it) { - struct LineInfo &line_info = *line_info_it; - - assert(line_info.source_name_index > 0); - assert(source_file.name_index > 0); - - // Check if the line belongs to the source file by comparing the - // name index into string table. - if (line_info.source_name_index != source_file.name_index) { - // This line is not from the current source file, check if this - // source file has been added before. - int found_source_id = FindFileByNameIdx(line_info.source_name_index, - symbols->source_file_info); - if (found_source_id < 0) { - // Got a new included file. - // Those included files don't have address or line information. - SourceFileInfo new_file; - new_file.name_index = line_info.source_name_index; - new_file.name = reinterpret_cast(new_file.name_index + - stabstr_section->sh_offset); - new_file.addr = 0; - new_file.source_id = symbols->next_source_id++; - line_info.source_id = new_file.source_id; - symbols->source_file_info.push_back(new_file); - } else { - // The file has been added. - line_info.source_id = found_source_id; - } - } else { - // The line belongs to the file. - line_info.source_id = source_file.source_id; - } - } // for each line. - } // for each function. - } // for each source file. - -} - -// Compute size and rva information based on symbols loaded from stab section. -static bool ComputeSizeAndRVA(ElfW(Addr) loading_addr, - struct SymbolInfo *symbols) { - std::vector sorted_files = - SortByAddress(&(symbols->source_file_info)); - for (size_t i = 0; i < sorted_files.size(); ++i) { - struct SourceFileInfo &source_file = *sorted_files[i]; - std::vector sorted_functions = - SortByAddress(&(source_file.func_info)); - for (size_t j = 0; j < sorted_functions.size(); ++j) { - struct FuncInfo &func_info = *sorted_functions[j]; - assert(func_info.addr >= loading_addr); - func_info.rva_to_base = func_info.addr - loading_addr; - func_info.size = 0; - ElfW(Addr) next_addr = NextAddress(&sorted_functions, - &sorted_files, - func_info); - // I've noticed functions with an address bigger than any other functions - // and source files modules, this is probably the last function in the - // module, due to limitions of Linux stab symbol, it is impossible to get - // the exact size of this kind of function, thus we give it a default - // very big value. This should be safe since this is the last function. - // But it is a ugly hack..... - // The following code can reproduce the case: - // template - // void Foo(T value) { - // } - // - // int main(void) { - // Foo(10); - // Foo(std::string("hello")); - // return 0; - // } - // TODO(liuli): Find a better solution. - static const int kDefaultSize = 0x10000000; - static int no_next_addr_count = 0; - if (next_addr != 0) { - func_info.size = next_addr - func_info.addr; - } else { - if (no_next_addr_count > 1) { - fprintf(stderr, "Got more than one funtion without the \ - following symbol. Igore this function.\n"); - fprintf(stderr, "The dumped symbol may not correct.\n"); - assert(!"This should not happen!\n"); - func_info.size = 0; - continue; - } - - no_next_addr_count++; - func_info.size = kDefaultSize; - } - // Compute line size. - for (LineInfoList::iterator line_info_it = func_info.line_info.begin(); - line_info_it != func_info.line_info.end(); line_info_it++) { - struct LineInfo &line_info = *line_info_it; - LineInfoList::iterator next_line_info_it = line_info_it; - next_line_info_it++; - line_info.size = 0; - if (next_line_info_it != func_info.line_info.end()) { - line_info.size = - next_line_info_it->rva_to_func - line_info.rva_to_func; - } else { - // The last line in the function. - // If we can find a function or source file symbol immediately - // following the line, we can get the size of the line by computing - // the difference of the next address to the starting address of this - // line. - // Otherwise, we need to set a default big enough value. This occurs - // mostly because the this function is the last one in the module. - if (next_addr != 0) { - ElfW(Off) next_addr_offset = next_addr - func_info.addr; - line_info.size = next_addr_offset - line_info.rva_to_func; - } else { - line_info.size = kDefaultSize; - } - } - line_info.rva_to_base = line_info.rva_to_func + func_info.rva_to_base; - } // for each line. - } // for each function. - } // for each source file. - return true; -} - -static bool LoadSymbols(const ElfW(Shdr) *stab_section, - const ElfW(Shdr) *stabstr_section, - ElfW(Addr) loading_addr, - struct SymbolInfo *symbols) { - if (stab_section == NULL || stabstr_section == NULL) - return false; - - struct nlist *lists = - reinterpret_cast(stab_section->sh_offset); - int nstab = stab_section->sh_size / sizeof(struct nlist); - // First pass, load all symbols from the object file. - for (int i = 0; i < nstab; ) { - int step = 1; - struct nlist *cur_list = lists + i; - if (cur_list->n_type == N_SO) { - // FUNC
- struct SourceFileInfo source_file_info; - source_file_info.name_index = cur_list->n_un.n_strx; - source_file_info.name = reinterpret_cast(cur_list->n_un.n_strx + - stabstr_section->sh_offset); - source_file_info.addr = cur_list->n_value; - if (strchr(source_file_info.name, '.')) - source_file_info.source_id = symbols->next_source_id++; - else - source_file_info.source_id = -1; - step = LoadFuncSymbols(cur_list, lists + nstab, - stabstr_section, &source_file_info); - symbols->source_file_info.push_back(source_file_info); - } - i += step; - } - - // Second pass, compute the size of functions and lines. - if (ComputeSizeAndRVA(loading_addr, symbols)) { - // Third pass, check for included source code, especially for header files. - // Until now, we only have compiling unit information, but they can - // have code from include files, add them here. - AddIncludedFiles(symbols, stabstr_section); - return true; - } - return false; -} - -static bool LoadSymbols(ElfW(Ehdr) *elf_header, struct SymbolInfo *symbols) { - // Translate all offsets in section headers into address. - FixAddress(elf_header); - ElfW(Addr) loading_addr = GetLoadingAddress( - reinterpret_cast(elf_header->e_phoff), - elf_header->e_phnum); - - const ElfW(Shdr) *sections = - reinterpret_cast(elf_header->e_shoff); - const ElfW(Shdr) *strtab = sections + elf_header->e_shstrndx; - const ElfW(Shdr) *stab_section = - FindSectionByName(kStabName, sections, strtab, elf_header->e_shnum); - if (stab_section == NULL) { - fprintf(stderr, "Stab section not found.\n"); - return false; - } - const ElfW(Shdr) *stabstr_section = stab_section->sh_link + sections; - - // Load symbols. - return LoadSymbols(stab_section, stabstr_section, loading_addr, symbols); -} - -static bool WriteModuleInfo(int fd, - ElfW(Half) arch, - const std::string &obj_file) { - const char *arch_name = NULL; - if (arch == EM_386) - arch_name = "x86"; - else if (arch == EM_X86_64) - arch_name = "x86_64"; - else - return false; - - unsigned char identifier[16]; - google_breakpad::FileID file_id(obj_file.c_str()); - if (file_id.ElfFileIdentifier(identifier)) { - char identifier_str[40]; - file_id.ConvertIdentifierToString(identifier, - identifier_str, sizeof(identifier_str)); - char id_no_dash[40]; - int id_no_dash_len = 0; - memset(id_no_dash, 0, sizeof(id_no_dash)); - for (int i = 0; identifier_str[i] != '\0'; ++i) - if (identifier_str[i] != '-') - id_no_dash[id_no_dash_len++] = identifier_str[i]; - // Add an extra "0" by the end. - id_no_dash[id_no_dash_len++] = '0'; - std::string filename = obj_file; - size_t slash_pos = obj_file.find_last_of("/"); - if (slash_pos != std::string::npos) - filename = obj_file.substr(slash_pos + 1); - return WriteFormat(fd, "MODULE Linux %s %s %s\n", arch_name, - id_no_dash, filename.c_str()); - } - return false; -} - -static bool WriteSourceFileInfo(int fd, const struct SymbolInfo &symbols) { - for (SourceFileInfoList::const_iterator it = - symbols.source_file_info.begin(); - it != symbols.source_file_info.end(); it++) { - if (it->source_id != -1) { - const char *name = it->name; - if (!WriteFormat(fd, "FILE %d %s\n", it->source_id, name)) - return false; - } - } - return true; -} - -static bool WriteOneFunction(int fd, - const struct FuncInfo &func_info){ - // Discard the ending part of the name. - std::string func_name(func_info.name); - std::string::size_type last_colon = func_name.find_last_of(':'); - if (last_colon != std::string::npos) - func_name = func_name.substr(0, last_colon); - func_name = Demangle(func_name.c_str()); - - if (func_info.size <= 0) - return true; - - if (WriteFormat(fd, "FUNC %lx %lx %d %s\n", - func_info.rva_to_base, - func_info.size, - func_info.stack_param_size, - func_name.c_str())) { - for (LineInfoList::const_iterator it = func_info.line_info.begin(); - it != func_info.line_info.end(); it++) { - const struct LineInfo &line_info = *it; - if (!WriteFormat(fd, "%lx %lx %d %d\n", - line_info.rva_to_base, - line_info.size, - line_info.line_num, - line_info.source_id)) - return false; - } - return true; - } - return false; -} - -static bool WriteFunctionInfo(int fd, const struct SymbolInfo &symbols) { - for (SourceFileInfoList::const_iterator it = - symbols.source_file_info.begin(); - it != symbols.source_file_info.end(); it++) { - const struct SourceFileInfo &file_info = *it; - for (FuncInfoList::const_iterator fiIt = file_info.func_info.begin(); - fiIt != file_info.func_info.end(); fiIt++) { - const struct FuncInfo &func_info = *fiIt; - if (!WriteOneFunction(fd, func_info)) - return false; - } - } - return true; -} - -static bool DumpStabSymbols(int fd, const struct SymbolInfo &symbols) { - return WriteSourceFileInfo(fd, symbols) && - WriteFunctionInfo(fd, symbols); -} - -// -// FDWrapper -// -// Wrapper class to make sure opened file is closed. -// -class FDWrapper { - public: - explicit FDWrapper(int fd) : - fd_(fd) { - } - ~FDWrapper() { - if (fd_ != -1) - close(fd_); - } - int get() { - return fd_; - } - int release() { - int fd = fd_; - fd_ = -1; - return fd; - } - private: - int fd_; -}; - -// -// MmapWrapper -// -// Wrapper class to make sure mapped regions are unmapped. -// -class MmapWrapper { - public: - MmapWrapper(void *mapped_address, size_t mapped_size) : - base_(mapped_address), size_(mapped_size) { - } - ~MmapWrapper() { - if (base_ != NULL) { - assert(size_ > 0); - munmap(base_, size_); - } - } - void release() { - base_ = NULL; - size_ = 0; - } - - private: - void *base_; - size_t size_; -}; - -} // namespace - -namespace google_breakpad { - -bool DumpSymbols::WriteSymbolFile(const std::string &obj_file, - int sym_fd) { - int obj_fd = open(obj_file.c_str(), O_RDONLY); - if (obj_fd < 0) - return false; - FDWrapper obj_fd_wrapper(obj_fd); - struct stat st; - if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) - return false; - void *obj_base = mmap(NULL, st.st_size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, obj_fd, 0); - if (obj_base == MAP_FAILED) - return false; - MmapWrapper map_wrapper(obj_base, st.st_size); - ElfW(Ehdr) *elf_header = reinterpret_cast(obj_base); - if (!IsValidElf(elf_header)) - return false; - struct SymbolInfo symbols; - symbols.next_source_id = 0; - - if (!LoadSymbols(elf_header, &symbols)) - return false; - // Write to symbol file. - if (WriteModuleInfo(sym_fd, elf_header->e_machine, obj_file) && - DumpStabSymbols(sym_fd, symbols)) - return true; - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.h b/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.h deleted file mode 100644 index 64f4c9e6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/dump_symbols.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// dump_symbols.cc: Implements a linux stab debugging format dumper. -// - -#ifndef COMMON_LINUX_DUMP_SYMBOLS_H__ -#define COMMON_LINUX_DUMP_SYMBOLS_H__ - -#include - -namespace google_breakpad { - -class DumpSymbols { - public: - bool WriteSymbolFile(const std::string &obj_file, - int sym_fd); -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_DUMP_SYMBOLS_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/linux/file_id.cc b/thirdparty/google-breakpad/r318/src/common/linux/file_id.cc deleted file mode 100644 index 1adf2a13..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/file_id.cc +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/linux/file_id.h" -#include "common/md5.h" - -namespace google_breakpad { - -static bool FindElfTextSection(const void *elf_mapped_base, - const void **text_start, - int *text_size) { - assert(elf_mapped_base); - assert(text_start); - assert(text_size); - - const unsigned char *elf_base = - static_cast(elf_mapped_base); - const ElfW(Ehdr) *elf_header = - reinterpret_cast(elf_base); - if (memcmp(elf_header, ELFMAG, SELFMAG) != 0) - return false; - *text_start = NULL; - *text_size = 0; - const ElfW(Shdr) *sections = - reinterpret_cast(elf_base + elf_header->e_shoff); - const char *text_section_name = ".text"; - int name_len = strlen(text_section_name); - const ElfW(Shdr) *string_section = sections + elf_header->e_shstrndx; - const ElfW(Shdr) *text_section = NULL; - for (int i = 0; i < elf_header->e_shnum; ++i) { - if (sections[i].sh_type == SHT_PROGBITS) { - const char *section_name = (char*)(elf_base + - string_section->sh_offset + - sections[i].sh_name); - if (!strncmp(section_name, text_section_name, name_len)) { - text_section = §ions[i]; - break; - } - } - } - if (text_section != NULL && text_section->sh_size > 0) { - int text_section_size = text_section->sh_size; - *text_start = elf_base + text_section->sh_offset; - *text_size = text_section_size; - } - return true; -} - -FileID::FileID(const char *path) { - strncpy(path_, path, sizeof(path_)); -} - -bool FileID::ElfFileIdentifier(unsigned char identifier[16]) { - int fd = open(path_, O_RDONLY); - if (fd < 0) - return false; - struct stat st; - if (fstat(fd, &st) != 0 && st.st_size <= 0) { - close(fd); - return false; - } - void *base = mmap(NULL, st.st_size, - PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); - if (base == MAP_FAILED) { - close(fd); - return false; - } - bool success = false; - const void *text_section = NULL; - int text_size = 0; - if (FindElfTextSection(base, &text_section, &text_size) && (text_size > 0)) { - struct MD5Context md5; - MD5Init(&md5); - MD5Update(&md5, - static_cast(text_section), - text_size); - MD5Final(identifier, &md5); - success = true; - } - - close(fd); - munmap(base, st.st_size); - return success; -} - -// static -void FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - int buffer_idx = 0; - for (int idx = 0; (buffer_idx < buffer_length) && (idx < 16); ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - if (idx == 4 || idx == 6 || idx == 8 || idx == 10) - buffer[buffer_idx++] = '-'; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // NULL terminate - buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/linux/file_id.h b/thirdparty/google-breakpad/r318/src/common/linux/file_id.h deleted file mode 100644 index 5e1cd6e1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/file_id.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// file_id.h: Return a unique identifier for a file -// - -#ifndef COMMON_LINUX_FILE_ID_H__ -#define COMMON_LINUX_FILE_ID_H__ - -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the elf file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool ElfFileIdentifier(unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). - // The |buffer| should be at least 37 bytes long to receive all of the data - // and termination. Shorter buffers will contain truncated data. - static void ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_FILE_ID_H__ - diff --git a/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.cc b/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.cc deleted file mode 100644 index d133c6b0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include "common/linux/guid_creator.h" - -// -// GUIDGenerator -// -// This class is used to generate random GUID. -// Currently use random number to generate a GUID since Linux has -// no native GUID generator. This should be OK since we don't expect -// crash to happen very offen. -// -class GUIDGenerator { - public: - GUIDGenerator() { - srandom(time(NULL)); - } - - bool CreateGUID(GUID *guid) const { - guid->data1 = random(); - guid->data2 = (u_int16_t)(random()); - guid->data3 = (u_int16_t)(random()); - *reinterpret_cast(&guid->data4[0]) = random(); - *reinterpret_cast(&guid->data4[4]) = random(); - return true; - } -}; - -// Guid generator. -const GUIDGenerator kGuidGenerator; - -bool CreateGUID(GUID *guid) { - return kGuidGenerator.CreateGUID(guid); -} - -// Parse guid to string. -bool GUIDToString(const GUID *guid, char *buf, int buf_len) { - // Should allow more space the the max length of GUID. - assert(buf_len > kGUIDStringLength); - int num = snprintf(buf, buf_len, kGUIDFormatString, - guid->data1, guid->data2, guid->data3, - *reinterpret_cast(&(guid->data4[0])), - *reinterpret_cast(&(guid->data4[4]))); - if (num != kGUIDStringLength) - return false; - - buf[num] = '\0'; - return true; -} diff --git a/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.h b/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.h deleted file mode 100644 index c86d856c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/guid_creator.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_LINUX_GUID_CREATOR_H__ -#define COMMON_LINUX_GUID_CREATOR_H__ - -#include "google_breakpad/common/minidump_format.h" - -typedef MDGUID GUID; - -// Format string for parsing GUID. -#define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" -// Length of GUID string. Don't count the ending '\0'. -#define kGUIDStringLength 36 - -// Create a guid. -bool CreateGUID(GUID *guid); - -// Get the string from guid. -bool GUIDToString(const GUID *guid, char *buf, int buf_len); - -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/linux/http_upload.cc b/thirdparty/google-breakpad/r318/src/common/linux/http_upload.cc deleted file mode 100644 index 8748d117..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/http_upload.cc +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include "common/linux/http_upload.h" - -namespace { - -// Callback to get the response data from server. -static size_t WriteCallback(void *ptr, size_t size, - size_t nmemb, void *userp) { - if (!userp) - return 0; - - std::string *response = reinterpret_cast(userp); - size_t real_size = size * nmemb; - response->append(reinterpret_cast(ptr), real_size); - return real_size; -} - -} // namespace - -namespace google_breakpad { - -static const char kUserAgent[] = "Breakpad/1.0 (Linux)"; - -// static -bool HTTPUpload::SendRequest(const string &url, - const map ¶meters, - const string &upload_file, - const string &file_part_name, - const string &proxy, - const string &proxy_user_pwd, - string *response_body, - string *error_description) { - if (!CheckParameters(parameters)) - return false; - - void *curl_lib = dlopen("libcurl.so", RTLD_NOW); - if (!curl_lib) { - curl_lib = dlopen("libcurl.so.4", RTLD_NOW); - } - if (!curl_lib) { - curl_lib = dlopen("libcurl.so.3", RTLD_NOW); - } - if (!curl_lib) { - return false; - } - - CURL* (*curl_easy_init)(void); - *(void**) (&curl_easy_init) = dlsym(curl_lib, "curl_easy_init"); - CURL *curl = (*curl_easy_init)(); - if (error_description != NULL) - *error_description = "No Error"; - - if (!curl) { - dlclose(curl_lib); - return false; - } - - CURLcode err_code = CURLE_OK; - CURLcode (*curl_easy_setopt)(CURL *, CURLoption, ...); - *(void**) (&curl_easy_setopt) = dlsym(curl_lib, "curl_easy_setopt"); - (*curl_easy_setopt)(curl, CURLOPT_URL, url.c_str()); - (*curl_easy_setopt)(curl, CURLOPT_USERAGENT, kUserAgent); - // Set proxy information if necessary. - if (!proxy.empty()) - (*curl_easy_setopt)(curl, CURLOPT_PROXY, proxy.c_str()); - if (!proxy_user_pwd.empty()) - (*curl_easy_setopt)(curl, CURLOPT_PROXYUSERPWD, proxy_user_pwd.c_str()); - - struct curl_httppost *formpost = NULL; - struct curl_httppost *lastptr = NULL; - // Add form data. - CURLFORMcode (*curl_formadd)(struct curl_httppost **, struct curl_httppost **, ...); - *(void**) (&curl_formadd) = dlsym(curl_lib, "curl_formadd"); - map::const_iterator iter = parameters.begin(); - for (; iter != parameters.end(); ++iter) - (*curl_formadd)(&formpost, &lastptr, - CURLFORM_COPYNAME, iter->first.c_str(), - CURLFORM_COPYCONTENTS, iter->second.c_str(), - CURLFORM_END); - - // Add form file. - (*curl_formadd)(&formpost, &lastptr, - CURLFORM_COPYNAME, file_part_name.c_str(), - CURLFORM_FILE, upload_file.c_str(), - CURLFORM_END); - - (*curl_easy_setopt)(curl, CURLOPT_HTTPPOST, formpost); - - // Disable 100-continue header. - struct curl_slist *headerlist = NULL; - char buf[] = "Expect:"; - struct curl_slist* (*curl_slist_append)(struct curl_slist *, const char *); - *(void**) (&curl_slist_append) = dlsym(curl_lib, "curl_slist_append"); - headerlist = (*curl_slist_append)(headerlist, buf); - (*curl_easy_setopt)(curl, CURLOPT_HTTPHEADER, headerlist); - - if (response_body != NULL) { - (*curl_easy_setopt)(curl, CURLOPT_WRITEFUNCTION, WriteCallback); - (*curl_easy_setopt)(curl, CURLOPT_WRITEDATA, - reinterpret_cast(response_body)); - } - - CURLcode (*curl_easy_perform)(CURL *); - *(void**) (&curl_easy_perform) = dlsym(curl_lib, "curl_easy_perform"); - err_code = (*curl_easy_perform)(curl); - const char* (*curl_easy_strerror)(CURLcode); - *(void**) (&curl_easy_strerror) = dlsym(curl_lib, "curl_easy_strerror"); -#ifndef NDEBUG - if (err_code != CURLE_OK) - fprintf(stderr, "Failed to send http request to %s, error: %s\n", - url.c_str(), - (*curl_easy_strerror)(err_code)); -#endif - if (error_description != NULL) - *error_description = (*curl_easy_strerror)(err_code); - - void (*curl_easy_cleanup)(CURL *); - *(void**) (&curl_easy_cleanup) = dlsym(curl_lib, "curl_easy_cleanup"); - (*curl_easy_cleanup)(curl); - if (formpost != NULL) { - void (*curl_formfree)(struct curl_httppost *); - *(void**) (&curl_formfree) = dlsym(curl_lib, "curl_formfree"); - (*curl_formfree)(formpost); - } - if (headerlist != NULL) { - void (*curl_slist_free_all)(struct curl_slist *); - *(void**) (&curl_slist_free_all) = dlsym(curl_lib, "curl_slist_free_all"); - (*curl_slist_free_all)(headerlist); - } - dlclose(curl_lib); - return err_code == CURLE_OK; -} - -// static -bool HTTPUpload::CheckParameters(const map ¶meters) { - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - const string &str = pos->first; - if (str.size() == 0) - return false; // disallow empty parameter names - for (unsigned int i = 0; i < str.size(); ++i) { - int c = str[i]; - if (c < 32 || c == '"' || c > 127) { - return false; - } - } - } - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/linux/http_upload.h b/thirdparty/google-breakpad/r318/src/common/linux/http_upload.h deleted file mode 100644 index fa6ad12c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/linux/http_upload.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPUpload provides a "nice" API to send a multipart HTTP(S) POST -// request using libcurl. It currently supports requests that contain -// a set of string parameters (key/value pairs), and a file to upload. - -#ifndef COMMON_LINUX_HTTP_UPLOAD_H__ -#define COMMON_LINUX_HTTP_UPLOAD_H__ - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::map; - -class HTTPUpload { - public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request - // (i.e. it corresponds to the name= attribute on an . - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. Returns true on success. - // If the request is successful and response_body is non-NULL, - // the response body will be returned in response_body. - // If the send fails, a description of the error will be - // returned in error_description. - static bool SendRequest(const string &url, - const map ¶meters, - const string &upload_file, - const string &file_part_name, - const string &proxy, - const string &proxy_user_pwd, - string *response_body, - string *error_description); - - private: - // Checks that the given list of parameters has only printable - // ASCII characters in the parameter name, and does not contain - // any quote (") characters. Returns true if so. - static bool CheckParameters(const map ¶meters); - - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - HTTPUpload(); - explicit HTTPUpload(const HTTPUpload &); - void operator=(const HTTPUpload &); - ~HTTPUpload(); -}; - -} // namespace google_breakpad - -#endif // COMMON_LINUX_HTTP_UPLOAD_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.h b/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.h deleted file mode 100644 index 95f259b9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPMultipartUpload: A multipart/form-data HTTP uploader. -// Each parameter pair is sent as a boundary -// Each file is sent with a name field in addition to the filename and data -// The data will be sent synchronously. - -#import - -@interface HTTPMultipartUpload : NSObject { - @protected - NSURL *url_; // The destination URL (STRONG) - NSDictionary *parameters_; // The key/value pairs for sending data (STRONG) - NSMutableDictionary *files_; // Dictionary of name/file-path (STRONG) - NSString *boundary_; // The boundary string (STRONG) - NSHTTPURLResponse *response_; // The response from the send (STRONG) -} - -- (id)initWithURL:(NSURL *)url; - -- (NSURL *)URL; - -- (void)setParameters:(NSDictionary *)parameters; -- (NSDictionary *)parameters; - -- (void)addFileAtPath:(NSString *)path name:(NSString *)name; -- (void)addFileContents:(NSData *)data name:(NSString *)name; -- (NSDictionary *)files; - -// Set the data and return the response -- (NSData *)send:(NSError **)error; -- (NSHTTPURLResponse *)response; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.m b/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.m deleted file mode 100644 index dd3612d8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/HTTPMultipartUpload.m +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "HTTPMultipartUpload.h" - -@interface HTTPMultipartUpload(PrivateMethods) -- (NSString *)multipartBoundary; -- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value; -- (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name; -- (NSData *)formDataForFile:(NSString *)file name:(NSString *)name; -@end - -@implementation HTTPMultipartUpload -//============================================================================= -#pragma mark - -#pragma mark || Private || -//============================================================================= -- (NSString *)multipartBoundary { - // The boundary has 27 '-' characters followed by 16 hex digits - return [NSString stringWithFormat:@"---------------------------%08X%08X", - rand(), rand()]; -} - -//============================================================================= -- (NSData *)formDataForKey:(NSString *)key value:(NSString *)value { - NSString *escaped = - [key stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - NSString *fmt = - @"--%@\r\nContent-Disposition: form-data; name=\"%@\"\r\n\r\n%@\r\n"; - NSString *form = [NSString stringWithFormat:fmt, boundary_, escaped, value]; - - return [form dataUsingEncoding:NSUTF8StringEncoding]; -} - -//============================================================================= -- (NSData *)formDataForFileContents:(NSData *)contents name:(NSString *)name { - NSMutableData *data = [NSMutableData data]; - NSString *escaped = - [name stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - NSString *fmt = @"--%@\r\nContent-Disposition: form-data; name=\"%@\"; " - "filename=\"minidump.dmp\"\r\nContent-Type: application/octet-stream\r\n\r\n"; - NSString *pre = [NSString stringWithFormat:fmt, boundary_, escaped]; - NSString *post = [NSString stringWithFormat:@"\r\n--%@--\r\n", boundary_]; - - [data appendData:[pre dataUsingEncoding:NSUTF8StringEncoding]]; - [data appendData:contents]; - [data appendData:[post dataUsingEncoding:NSUTF8StringEncoding]]; - - return data; -} - -//============================================================================= -- (NSData *)formDataForFile:(NSString *)file name:(NSString *)name { - NSData *contents = [NSData dataWithContentsOfFile:file]; - - return [self formDataForFileContents:contents name:name]; -} - -//============================================================================= -#pragma mark - -#pragma mark || Public || -//============================================================================= -- (id)initWithURL:(NSURL *)url { - if ((self = [super init])) { - url_ = [url copy]; - boundary_ = [[self multipartBoundary] retain]; - files_ = [[NSMutableDictionary alloc] init]; - } - - return self; -} - -//============================================================================= -- (void)dealloc { - [url_ release]; - [parameters_ release]; - [files_ release]; - [boundary_ release]; - [response_ release]; - - [super dealloc]; -} - -//============================================================================= -- (NSURL *)URL { - return url_; -} - -//============================================================================= -- (void)setParameters:(NSDictionary *)parameters { - if (parameters != parameters_) { - [parameters_ release]; - parameters_ = [parameters copy]; - } -} - -//============================================================================= -- (NSDictionary *)parameters { - return parameters_; -} - -//============================================================================= -- (void)addFileAtPath:(NSString *)path name:(NSString *)name { - [files_ setObject:path forKey:name]; -} - -//============================================================================= -- (void)addFileContents:(NSData *)data name:(NSString *)name { - [files_ setObject:data forKey:name]; -} - -//============================================================================= -- (NSDictionary *)files { - return files_; -} - -//============================================================================= -- (NSData *)send:(NSError **)error { - NSMutableURLRequest *req = - [[NSMutableURLRequest alloc] - initWithURL:url_ cachePolicy:NSURLRequestUseProtocolCachePolicy - timeoutInterval:10.0 ]; - - NSMutableData *postBody = [NSMutableData data]; - int i, count; - - [req setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", - boundary_] forHTTPHeaderField:@"Content-type"]; - - // Add any parameters to the message - NSArray *parameterKeys = [parameters_ allKeys]; - NSString *key; - - count = [parameterKeys count]; - for (i = 0; i < count; ++i) { - key = [parameterKeys objectAtIndex:i]; - [postBody appendData:[self formDataForKey:key - value:[parameters_ objectForKey:key]]]; - } - - // Add any files to the message - NSArray *fileNames = [files_ allKeys]; - count = [fileNames count]; - for (i = 0; i < count; ++i) { - NSString *name = [fileNames objectAtIndex:i]; - id fileOrData = [files_ objectForKey:name]; - NSData *fileData; - - // The object can be either the path to a file (NSString) or the contents - // of the file (NSData). - if ([fileOrData isKindOfClass:[NSData class]]) - fileData = [self formDataForFileContents:fileOrData name:name]; - else - fileData = [self formDataForFile:fileOrData name:name]; - - [postBody appendData:fileData]; - } - - [req setHTTPBody:postBody]; - [req setHTTPMethod:@"POST"]; - - [response_ release]; - response_ = nil; - - NSData *data = [NSURLConnection sendSynchronousRequest:req - returningResponse:&response_ - error:error]; - - [response_ retain]; - - return data; -} - -//============================================================================= -- (NSHTTPURLResponse *)response { - return response_; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.h b/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.h deleted file mode 100644 index 12d8f7d6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_syms.h: Interface for DumpSymbols. This class will take a mach-o file -// and extract the symbol information and write it to a file using the -// breakpad symbol file format. - -#import -#include -#include "common/mac/dwarf/dwarf2reader.h" - -// This will map from an architecture string to a SectionMap, which -// will contain the offsets for all the sections in the dictionary -typedef hash_map ArchSectionMap; - -@interface DumpSymbols : NSObject { - @protected - NSString *sourcePath_; // Source of symbols (STRONG) - NSString *architecture_; // Architecture to extract (STRONG) - NSMutableDictionary *addresses_; // Addresses and symbols (STRONG) - NSMutableSet *functionAddresses_; // Function addresses (STRONG) - NSMutableDictionary *sources_; // Address and Source file paths (STRONG) - NSMutableDictionary *headers_; // Mach-o header information (STRONG) - NSMutableDictionary *sectionData_; // Keyed by seg/sect name (STRONG) - uint32_t lastStartAddress_; - ArchSectionMap *sectionsForArch_; -} - -- (id)initWithContentsOfFile:(NSString *)machoFile; - -- (NSArray *)availableArchitectures; - -// One of ppc, x86, i386, ppc64, x86_64 -// If the architecture is not available, it will return NO -// If not set, the native architecture will be used -- (BOOL)setArchitecture:(NSString *)architecture; -- (NSString *)architecture; - -// Write the symbols to |symbolFilePath|. Return YES if successful. -- (BOOL)writeSymbolFile:(NSString *)symbolFilePath; - -@end - -@interface MachSection : NSObject { - @protected - struct section *sect_; - uint32_t sectionNumber_; -} -- (id)initWithMachSection:(struct section *)sect andNumber:(uint32_t)sectionNumber; -- (struct section*)sectionPointer; -- (uint32_t)sectionNumber; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.mm b/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.mm deleted file mode 100644 index 88f1f4f1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dump_syms.mm +++ /dev/null @@ -1,1224 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_syms.mm: Create a symbol file for use with minidumps - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#import - -#import "dump_syms.h" -#import "common/mac/file_id.h" -#import "common/mac/macho_utilities.h" -#import "common/mac/dwarf/dwarf2reader.h" -#import "common/mac/dwarf/functioninfo.h" -#import "common/mac/dwarf/bytereader.h" - -using google_breakpad::FileID; - -static NSString *kAddressSymbolKey = @"symbol"; -static NSString *kAddressConvertedSymbolKey = @"converted_symbol"; -static NSString *kAddressSourceLineKey = @"line"; -static NSString *kFunctionSizeKey = @"size"; -static NSString *kFunctionFileKey = @"source_file"; -static NSString *kHeaderBaseAddressKey = @"baseAddr"; -static NSString *kHeaderSizeKey = @"size"; -static NSString *kHeaderOffsetKey = @"offset"; // Offset to the header -static NSString *kHeaderIs64BitKey = @"is64"; -static NSString *kHeaderCPUTypeKey = @"cpuType"; - -// The section for __TEXT, __text seems to be always 1. This is useful -// for pruning out extraneous non-function symbols. -static const int kTextSection = 1; - -namespace __gnu_cxx { -template<> - struct hash { - size_t operator()(const std::string& k) const { - return hash< const char* >()( k.c_str() ); - } -}; -} - -// Dump FunctionMap to stdout. Print address, function name, file -// name, line number, lowpc, and highpc if available. -void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) { - for (dwarf2reader::FunctionMap::const_iterator iter = function_map.begin(); - iter != function_map.end(); ++iter) { - if (iter->second->name.empty()) { - continue; - } - printf("%08llx: %s", iter->first, - iter->second->name.data()); - if (!iter->second->file.empty()) { - printf(" - %s", iter->second->file.data()); - if (iter->second->line != 0) { - printf(":%u", iter->second->line); - } - } - if (iter->second->lowpc != 0 && iter->second->highpc != 0) { - printf(" (%08llx - %08llx)\n", - iter->second->lowpc, - iter->second->highpc); - } - } -} - - -@interface DumpSymbols(PrivateMethods) -- (NSString *)convertCPlusPlusSymbol:(NSString *)symbol; -- (void)addFunction:(NSString *)name line:(int)line address:(uint64_t)address section:(int)section; -- (BOOL)processSymbolItem:(struct nlist_64 *)list stringTable:(char *)table; -- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset; -- (BOOL)loadSymbolInfo64:(void *)base offset:(uint32_t)offset; -- (BOOL)loadSymbolInfoForArchitecture; -- (BOOL)loadDWARFSymbolInfo:(void *)base offset:(uint32_t)offset; -- (BOOL)loadSTABSSymbolInfo:(void *)base offset:(uint32_t)offset; -- (void)generateSectionDictionary:(struct mach_header*)header; -- (BOOL)loadHeader:(void *)base offset:(uint32_t)offset; -- (BOOL)loadHeader64:(void *)base offset:(uint32_t)offset; -- (BOOL)loadModuleInfo; -- (void)processDWARFLineNumberInfo:(dwarf2reader::LineMap*)line_map; -- (void)processDWARFFunctionInfo:(dwarf2reader::FunctionMap*)address_to_funcinfo; -- (void)processDWARFSourceFileInfo:(vector*) files; -- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset; -- (dwarf2reader::SectionMap*)getSectionMapForArchitecture:(NSString*)architecture; -@end - -@implementation DumpSymbols -//============================================================================= -- (NSString *)convertCPlusPlusSymbol:(NSString *)symbol { - // __cxa_demangle will realloc this if needed - char *buffer = (char *)malloc(1024); - size_t buffer_size = 1024; - int result; - - const char *sym = [symbol UTF8String]; - NSString *demangled = nil; - buffer = abi::__cxa_demangle(sym, buffer, &buffer_size, &result); - if (result == 0) { - demangled = [NSString stringWithUTF8String:buffer]; - } - free(buffer); - return demangled; -} - -//============================================================================= -- (void)addFunction:(NSString *)name line:(int)line address:(uint64_t)address section:(int)section { - NSNumber *addressNum = [NSNumber numberWithUnsignedLongLong:address]; - - if (!address) - return; - - // If the function starts with "_Z" or "__Z" then demangle it. - BOOL isCPP = NO; - - if ([name hasPrefix:@"__Z"]) { - // Remove the leading underscore - name = [name substringFromIndex:1]; - isCPP = YES; - } else if ([name hasPrefix:@"_Z"]) { - isCPP = YES; - } - - // Filter out non-functions - if ([name hasSuffix:@".eh"]) - return; - - if ([name hasSuffix:@"__func__"]) - return; - - if ([name hasSuffix:@"GCC_except_table"]) - return; - - if (isCPP) { - // OBJCPP_MANGLING_HACK - // There are cases where ObjC++ mangles up an ObjC name using quasi-C++ - // mangling: - // @implementation Foozles + (void)barzles { - // static int Baz = 0; - // } @end - // gives you _ZZ18+[Foozles barzles]E3Baz - // c++filt won't parse this properly, and will crash in certain cases. - // Logged as radar: - // 5129938: c++filt does not deal with ObjC++ symbols - // If 5129938 ever gets fixed, we can remove this, but for now this prevents - // c++filt from attempting to demangle names it doesn't know how to handle. - // This is with c++filt 2.16 - NSCharacterSet *objcppCharSet = [NSCharacterSet characterSetWithCharactersInString:@"-+[]: "]; - NSRange emptyRange = { NSNotFound, 0 }; - NSRange objcppRange = [name rangeOfCharacterFromSet:objcppCharSet]; - isCPP = NSEqualRanges(objcppRange, emptyRange); - } else if ([name characterAtIndex:0] == '_') { - // Remove the leading underscore - name = [name substringFromIndex:1]; - } - - // If there's already an entry for this address, check and see if we can add - // either the symbol, or a missing line # - NSMutableDictionary *dict = [addresses_ objectForKey:addressNum]; - - if (!dict) { - dict = [[NSMutableDictionary alloc] init]; - [addresses_ setObject:dict forKey:addressNum]; - [dict release]; - } - - if (name && ![dict objectForKey:kAddressSymbolKey]) { - [dict setObject:name forKey:kAddressSymbolKey]; - - // only functions, not line number addresses - [functionAddresses_ addObject:addressNum]; - } - - if (isCPP) { - // try demangling - NSString *demangled = [self convertCPlusPlusSymbol:name]; - if (demangled != nil) - [dict setObject:demangled forKey:kAddressConvertedSymbolKey]; - } - - if (line && ![dict objectForKey:kAddressSourceLineKey]) - [dict setObject:[NSNumber numberWithUnsignedInt:line] - forKey:kAddressSourceLineKey]; - -} - -//============================================================================= -- (BOOL)processSymbolItem:(struct nlist_64 *)list stringTable:(char *)table { - uint32_t n_strx = list->n_un.n_strx; - BOOL result = NO; - - // We don't care about non-section specific information except function length - if (list->n_sect == 0 && list->n_type != N_FUN ) - return NO; - - if (list->n_type == N_FUN) { - if (list->n_sect != 0) { - // we get the function address from the first N_FUN - lastStartAddress_ = list->n_value; - } - else { - // an N_FUN from section 0 may follow the initial N_FUN - // giving us function length information - NSMutableDictionary *dict = [addresses_ objectForKey: - [NSNumber numberWithUnsignedLong:lastStartAddress_]]; - - assert(dict); - - // only set the function size the first time - // (sometimes multiple section 0 N_FUN entries appear!) - if (![dict objectForKey:kFunctionSizeKey]) { - [dict setObject:[NSNumber numberWithUnsignedLongLong:list->n_value] - forKey:kFunctionSizeKey]; - } - } - } - - int line = list->n_desc; - - // __TEXT __text section - NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_]; - - uint32_t mainSection = [[archSections objectForKey:@"__TEXT__text" ] sectionNumber]; - - // Extract debugging information: - // Doc: http://developer.apple.com/documentation/DeveloperTools/gdb/stabs/stabs_toc.html - // Header: /usr/include/mach-o/stab.h: - if (list->n_type == N_SO) { - NSString *src = [NSString stringWithUTF8String:&table[n_strx]]; - NSString *ext = [src pathExtension]; - NSNumber *address = [NSNumber numberWithUnsignedLongLong:list->n_value]; - - // Leopard puts .c files with no code as an offset of 0, but a - // crash can't happen here and it throws off our code that matches - // symbols to line numbers so we ignore them.. - // Return YES because this isn't an error, just something we don't - // care to handle. - if ([address unsignedLongValue] == 0) { - return YES; - } - // TODO(waylonis):Ensure that we get the full path for the source file - // from the first N_SO record - // If there is an extension, we'll consider it source code - if ([ext length]) { - if (!sources_) - sources_ = [[NSMutableDictionary alloc] init]; - // Save the source associated with an address - [sources_ setObject:src forKey:address]; - result = YES; - } - } else if (list->n_type == N_FUN) { - NSString *fn = [NSString stringWithUTF8String:&table[n_strx]]; - NSRange range = [fn rangeOfString:@":" options:NSBackwardsSearch]; - - if (![fn length]) - return NO; - - if (range.length > 0) { - // The function has a ":" followed by some stuff, so strip it off - fn = [fn substringToIndex:range.location]; - } - - [self addFunction:fn line:line address:list->n_value section:list->n_sect ]; - - result = YES; - } else if (list->n_type == N_SLINE && list->n_sect == mainSection) { - [self addFunction:nil line:line address:list->n_value section:list->n_sect ]; - result = YES; - } else if (((list->n_type & N_TYPE) == N_SECT) && !(list->n_type & N_STAB)) { - // Regular symbols or ones that are external - NSString *fn = [NSString stringWithUTF8String:&table[n_strx]]; - - [self addFunction:fn line:0 address:list->n_value section:list->n_sect ]; - result = YES; - } - - return result; -} - -#define SwapLongLongIfNeeded(a) (swap ? NXSwapLongLong(a) : (a)) -#define SwapLongIfNeeded(a) (swap ? NXSwapLong(a) : (a)) -#define SwapIntIfNeeded(a) (swap ? NXSwapInt(a) : (a)) -#define SwapShortIfNeeded(a) (swap ? NXSwapShort(a) : (a)) - -//============================================================================= -- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset { - NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_]; - if ([archSections objectForKey:@"__DWARF__debug_info"]) { - // Treat this this as debug information - return [self loadDWARFSymbolInfo:base offset:offset]; - } - - return [self loadSTABSSymbolInfo:base offset:offset]; -} - -//============================================================================= -- (BOOL)loadDWARFSymbolInfo:(void *)base offset:(uint32_t)offset { - - struct mach_header *header = (struct mach_header *) - ((uint32_t)base + offset); - BOOL swap = (header->magic == MH_CIGAM); - - NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_]; - assert (archSections != nil); - section *dbgInfoSection = [[archSections objectForKey:@"__DWARF__debug_info"] sectionPointer]; - uint32_t debugInfoSize = SwapLongIfNeeded(dbgInfoSection->size); - - // i think this will break if run on a big-endian machine - dwarf2reader::ByteReader byte_reader(swap ? - dwarf2reader::ENDIANNESS_BIG : - dwarf2reader::ENDIANNESS_LITTLE); - - uint64_t dbgOffset = 0; - - dwarf2reader::SectionMap* oneArchitectureSectionMap = [self getSectionMapForArchitecture:architecture_]; - - while (dbgOffset < debugInfoSize) { - // Prepare necessary objects. - dwarf2reader::FunctionMap off_to_funcinfo; - dwarf2reader::FunctionMap address_to_funcinfo; - dwarf2reader::LineMap line_map; - vector files; - vector dirs; - - dwarf2reader::CULineInfoHandler line_info_handler(&files, &dirs, - &line_map); - - dwarf2reader::CUFunctionInfoHandler function_info_handler(&files, &dirs, - &line_map, - &off_to_funcinfo, - &address_to_funcinfo, - &line_info_handler, - *oneArchitectureSectionMap, - &byte_reader); - - dwarf2reader::CompilationUnit compilation_unit(*oneArchitectureSectionMap, - dbgOffset, - &byte_reader, - &function_info_handler); - - dbgOffset += compilation_unit.Start(); - - // The next 3 functions take the info that the dwarf reader - // gives and massages them into the data structures that - // dump_syms uses - [self processDWARFSourceFileInfo:&files]; - [self processDWARFFunctionInfo:&address_to_funcinfo]; - [self processDWARFLineNumberInfo:&line_map]; - } - - return YES; -} - -- (void)processDWARFSourceFileInfo:(vector*) files { - if (!sources_) - sources_ = [[NSMutableDictionary alloc] init]; - // Save the source associated with an address - vector::const_iterator iter = files->begin(); - for (; iter != files->end(); iter++) { - NSString *sourceFile = [NSString stringWithUTF8String:(*iter).name.c_str()]; - if ((*iter).lowpc != ULLONG_MAX) { - NSNumber *address = [NSNumber numberWithUnsignedLongLong:(*iter).lowpc]; - if ([address unsignedLongLongValue] == 0) { - continue; - } - [sources_ setObject:sourceFile forKey:address]; - } - } -} - -- (void)processDWARFFunctionInfo:(dwarf2reader::FunctionMap*)address_to_funcinfo { - for (dwarf2reader::FunctionMap::const_iterator iter = address_to_funcinfo->begin(); - iter != address_to_funcinfo->end(); ++iter) { - if (iter->second->name.empty()) { - continue; - } - - if (!addresses_) - addresses_ = [[NSMutableDictionary alloc] init]; - - NSNumber *addressNum = [NSNumber numberWithUnsignedLongLong:(*iter).second->lowpc]; - - [functionAddresses_ addObject:addressNum]; - - NSMutableDictionary *dict = [addresses_ objectForKey:addressNum]; - - if (!dict) { - dict = [[NSMutableDictionary alloc] init]; - [addresses_ setObject:dict forKey:addressNum]; - [dict release]; - } - - // set name of function if it isn't already set - if (![dict objectForKey:kAddressSymbolKey]) { - NSString *symbolName = [NSString stringWithUTF8String:iter->second->name.c_str()]; - [dict setObject:symbolName forKey:kAddressSymbolKey]; - } - - // try demangling function name if we have a mangled name - if (![dict objectForKey:kAddressConvertedSymbolKey] && - !iter->second->mangled_name.empty()) { - NSString *mangled = [NSString stringWithUTF8String:iter->second->mangled_name.c_str()]; - NSString *demangled = [self convertCPlusPlusSymbol:mangled]; - if (demangled != nil) - [dict setObject:demangled forKey:kAddressConvertedSymbolKey]; - } - - // set line number for beginning of function - if (iter->second->line && ![dict objectForKey:kAddressSourceLineKey]) - [dict setObject:[NSNumber numberWithUnsignedInt:iter->second->line] - forKey:kAddressSourceLineKey]; - - // set function size by subtracting low PC from high PC - if (![dict objectForKey:kFunctionSizeKey]) { - [dict setObject:[NSNumber numberWithUnsignedLongLong:iter->second->highpc - iter->second->lowpc] - forKey:kFunctionSizeKey]; - } - - // Set the file that the function is in - if (![dict objectForKey:kFunctionFileKey]) { - [dict setObject:[NSString stringWithUTF8String:iter->second->file.c_str()] - forKey:kFunctionFileKey]; - } - } -} - -- (void)processDWARFLineNumberInfo:(dwarf2reader::LineMap*)line_map { - for (dwarf2reader::LineMap::const_iterator iter = line_map->begin(); - iter != line_map->end(); - ++iter) { - - NSNumber *addressNum = [NSNumber numberWithUnsignedLongLong:iter->first]; - NSMutableDictionary *dict = [addresses_ objectForKey:addressNum]; - - if (!dict) { - dict = [[NSMutableDictionary alloc] init]; - [addresses_ setObject:dict forKey:addressNum]; - [dict release]; - } - - if (iter->second.second && ![dict objectForKey:kAddressSourceLineKey]) { - [dict setObject:[NSNumber numberWithUnsignedInt:iter->second.second] - forKey:kAddressSourceLineKey]; - } - - // Set the file that the function's address is in - if (![dict objectForKey:kFunctionFileKey]) { - [dict setObject:[NSString stringWithUTF8String:iter->second.first.c_str()] - forKey:kFunctionFileKey]; - } - } -} - -//============================================================================= -- (BOOL)loadSTABSSymbolInfo:(void *)base offset:(uint32_t)offset { - struct mach_header *header = (struct mach_header *)((uint32_t)base + offset); - BOOL swap = (header->magic == MH_CIGAM); - uint32_t count = SwapLongIfNeeded(header->ncmds); - struct load_command *cmd = - (struct load_command *)((uint32_t)header + sizeof(struct mach_header)); - uint32_t symbolTableCommand = SwapLongIfNeeded(LC_SYMTAB); - BOOL result = NO; - - if (!addresses_) - addresses_ = [[NSMutableDictionary alloc] init]; - - for (uint32_t i = 0; cmd && (i < count); ++i) { - if (cmd->cmd == symbolTableCommand) { - struct symtab_command *symtab = (struct symtab_command *)cmd; - uint32_t ncmds = SwapLongIfNeeded(symtab->nsyms); - uint32_t symoff = SwapLongIfNeeded(symtab->symoff); - uint32_t stroff = SwapLongIfNeeded(symtab->stroff); - struct nlist *list = (struct nlist *)((uint32_t)base + symoff + offset); - char *strtab = ((char *)header + stroff); - - // Process each command, looking for debugging stuff - for (uint32_t j = 0; j < ncmds; ++j, ++list) { - // Fill in an nlist_64 structure and process with that - struct nlist_64 nlist64; - nlist64.n_un.n_strx = SwapLongIfNeeded(list->n_un.n_strx); - nlist64.n_type = list->n_type; - nlist64.n_sect = list->n_sect; - nlist64.n_desc = SwapShortIfNeeded(list->n_desc); - nlist64.n_value = (uint64_t)SwapLongIfNeeded(list->n_value); - - // TODO(nealsid): is this broken? we get NO if one symbol fails - // but then we lose that information if another suceeeds - if ([self processSymbolItem:&nlist64 stringTable:strtab]) - result = YES; - } - } - - uint32_t cmdSize = SwapLongIfNeeded(cmd->cmdsize); - cmd = (struct load_command *)((uint32_t)cmd + cmdSize); - } - - return result; -} - -//============================================================================= -- (BOOL)loadSymbolInfo64:(void *)base offset:(uint32_t)offset { - struct mach_header_64 *header = (struct mach_header_64 *) - ((uint32_t)base + offset); - BOOL swap = (header->magic == MH_CIGAM_64); - uint32_t count = SwapLongIfNeeded(header->ncmds); - struct load_command *cmd = - (struct load_command *)((uint32_t)header + sizeof(struct mach_header)); - uint32_t symbolTableCommand = SwapLongIfNeeded(LC_SYMTAB); - BOOL result = NO; - - for (uint32_t i = 0; cmd && (i < count); i++) { - if (cmd->cmd == symbolTableCommand) { - struct symtab_command *symtab = (struct symtab_command *)cmd; - uint32_t ncmds = SwapLongIfNeeded(symtab->nsyms); - uint32_t symoff = SwapLongIfNeeded(symtab->symoff); - uint32_t stroff = SwapLongIfNeeded(symtab->stroff); - struct nlist_64 *list = (struct nlist_64 *)((uint32_t)base + symoff); - char *strtab = ((char *)header + stroff); - - // Process each command, looking for debugging stuff - for (uint32_t j = 0; j < ncmds; ++j, ++list) { - if (!(list->n_type & (N_STAB | N_TYPE))) - continue; - - // Fill in an nlist_64 structure and process with that - struct nlist_64 nlist64; - nlist64.n_un.n_strx = SwapLongIfNeeded(list->n_un.n_strx); - nlist64.n_type = list->n_type; - nlist64.n_sect = list->n_sect; - nlist64.n_desc = SwapShortIfNeeded(list->n_desc); - nlist64.n_value = SwapLongLongIfNeeded(list->n_value); - - if ([self processSymbolItem:&nlist64 stringTable:strtab]) - result = YES; - } - } - - uint32_t cmdSize = SwapLongIfNeeded(cmd->cmdsize); - cmd = (struct load_command *)((uint32_t)cmd + cmdSize); - } - - return result; -} - -//============================================================================= -- (BOOL)loadSymbolInfoForArchitecture { - NSMutableData *data = [[NSMutableData alloc] - initWithContentsOfMappedFile:sourcePath_]; - - NSDictionary *headerInfo = [headers_ objectForKey:architecture_]; - void *base = [data mutableBytes]; - uint32_t offset = - [[headerInfo objectForKey:kHeaderOffsetKey] unsignedLongValue]; - BOOL is64 = [[headerInfo objectForKey:kHeaderIs64BitKey] boolValue]; - BOOL result = is64 ? [self loadSymbolInfo64:base offset:offset] : - [self loadSymbolInfo:base offset:offset]; - - [data release]; - return result; -} - -- (dwarf2reader::SectionMap*)getSectionMapForArchitecture:(NSString*)architecture { - - string currentArch([architecture UTF8String]); - dwarf2reader::SectionMap *oneArchitectureSectionMap; - - ArchSectionMap::const_iterator iter = sectionsForArch_->find(currentArch); - - if (iter == sectionsForArch_->end()) { - oneArchitectureSectionMap = new dwarf2reader::SectionMap(); - sectionsForArch_->insert(make_pair(currentArch, oneArchitectureSectionMap)); - } else { - oneArchitectureSectionMap = iter->second; - } - - return oneArchitectureSectionMap; -} - -//============================================================================= -// build a dictionary of section numbers keyed off a string -// which is the concatenation of the segment name and the section name -- (void)generateSectionDictionary:(struct mach_header*)header { - - BOOL swap = (header->magic == MH_CIGAM); - uint32_t count = SwapLongIfNeeded(header->ncmds); - struct load_command *cmd = - (struct load_command *)((uint32_t)header + sizeof(struct mach_header)); - uint32_t segmentCommand = SwapLongIfNeeded(LC_SEGMENT); - uint32_t sectionNumber = 1; // section numbers are counted from 1 - - cpu_type_t cpu = SwapIntIfNeeded(header->cputype); - - NSString *arch; - - if (cpu & CPU_ARCH_ABI64) - arch = ((cpu & ~CPU_ARCH_ABI64) == CPU_TYPE_X86) ? - @"x86_64" : @"ppc64"; - else - arch = (cpu == CPU_TYPE_X86) ? @"x86" : @"ppc"; - - NSMutableDictionary *archSections; - - if (!sectionData_) { - sectionData_ = [[NSMutableDictionary alloc] init]; - } - - if (![sectionData_ objectForKey:architecture_]) { - [sectionData_ setObject:[[NSMutableDictionary alloc] init] forKey:arch]; - } - - archSections = [sectionData_ objectForKey:arch]; - - dwarf2reader::SectionMap* oneArchitectureSectionMap = [self getSectionMapForArchitecture:arch]; - - // loop through every segment command, then through every section - // contained inside each of them - for (uint32_t i = 0; cmd && (i < count); ++i) { - if (cmd->cmd == segmentCommand) { - struct segment_command *seg = (struct segment_command *)cmd; - section *sect = (section *)((uint32_t)cmd + sizeof(segment_command)); - uint32_t nsects = SwapLongIfNeeded(seg->nsects); - - for (uint32_t j = 0; j < nsects; ++j) { - NSString *segSectName = [NSString stringWithFormat:@"%s%s", - seg->segname, sect->sectname]; - - [archSections setObject:[[MachSection alloc] initWithMachSection:sect andNumber:sectionNumber] - forKey:segSectName]; - - // filter out sections with size 0, offset 0 - if (sect->offset != 0 && sect->size != 0) { - // fill sectionmap for dwarf reader - oneArchitectureSectionMap->insert(make_pair(sect->sectname,make_pair(((const char*)header) + SwapLongIfNeeded(sect->offset), (size_t)SwapLongIfNeeded(sect->size)))); - } - - ++sect; - ++sectionNumber; - } - } - - uint32_t cmdSize = SwapLongIfNeeded(cmd->cmdsize); - cmd = (struct load_command *)((uint32_t)cmd + cmdSize); - } -} - -//============================================================================= -- (BOOL)loadHeader:(void *)base offset:(uint32_t)offset { - struct mach_header *header = (struct mach_header *)((uint32_t)base + offset); - BOOL swap = (header->magic == MH_CIGAM); - uint32_t count = SwapLongIfNeeded(header->ncmds); - struct load_command *cmd = - (struct load_command *)((uint32_t)header + sizeof(struct mach_header)); - uint32_t segmentCommand = SwapLongIfNeeded(LC_SEGMENT); - - [self generateSectionDictionary:header]; - - for (uint32_t i = 0; cmd && (i < count); ++i) { - if (cmd->cmd == segmentCommand) { - struct segment_command *seg = (struct segment_command *)cmd; - - if (!strcmp(seg->segname, "__TEXT")) { - uint32_t addr = SwapLongIfNeeded(seg->vmaddr); - uint32_t size = SwapLongIfNeeded(seg->vmsize); - cpu_type_t cpu = SwapIntIfNeeded(header->cputype); - NSString *cpuStr = (cpu == CPU_TYPE_I386) ? @"x86" : @"ppc"; - - [headers_ setObject:[NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedLongLong:(uint64_t)addr], - kHeaderBaseAddressKey, - [NSNumber numberWithUnsignedLongLong:(uint64_t)size], kHeaderSizeKey, - [NSNumber numberWithUnsignedLong:offset], kHeaderOffsetKey, - [NSNumber numberWithBool:NO], kHeaderIs64BitKey, - [NSNumber numberWithUnsignedLong:cpu], kHeaderCPUTypeKey, - nil] forKey:cpuStr]; - - return YES; - } - } - - uint32_t cmdSize = SwapLongIfNeeded(cmd->cmdsize); - cmd = (struct load_command *)((uint32_t)cmd + cmdSize); - } - - return NO; -} - -//============================================================================= -- (BOOL)loadHeader64:(void *)base offset:(uint32_t)offset { - struct mach_header_64 *header = - (struct mach_header_64 *)((uint32_t)base + offset); - BOOL swap = (header->magic == MH_CIGAM_64); - uint32_t count = SwapLongIfNeeded(header->ncmds); - struct load_command *cmd = - (struct load_command *)((uint32_t)header + sizeof(struct mach_header_64)); - - for (uint32_t i = 0; cmd && (i < count); ++i) { - uint32_t segmentCommand = SwapLongIfNeeded(LC_SEGMENT_64); - if (cmd->cmd == segmentCommand) { - struct segment_command_64 *seg = (struct segment_command_64 *)cmd; - if (!strcmp(seg->segname, "__TEXT")) { - uint64_t addr = SwapLongLongIfNeeded(seg->vmaddr); - uint64_t size = SwapLongLongIfNeeded(seg->vmsize); - cpu_type_t cpu = SwapIntIfNeeded(header->cputype); - cpu &= (~CPU_ARCH_ABI64); - NSString *cpuStr = (cpu == CPU_TYPE_I386) ? @"x86_64" : @"ppc64"; - - [headers_ setObject:[NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedLongLong:addr], kHeaderBaseAddressKey, - [NSNumber numberWithUnsignedLongLong:size], kHeaderSizeKey, - [NSNumber numberWithUnsignedLong:offset], kHeaderOffsetKey, - [NSNumber numberWithBool:YES], kHeaderIs64BitKey, - [NSNumber numberWithUnsignedLong:cpu], kHeaderCPUTypeKey, - nil] forKey:cpuStr]; - return YES; - } - } - - uint32_t cmdSize = SwapLongIfNeeded(cmd->cmdsize); - cmd = (struct load_command *)((uint32_t)cmd + cmdSize); - } - - return NO; -} - -//============================================================================= -- (BOOL)loadModuleInfo { - uint64_t result = 0; - NSMutableData *data = [[NSMutableData alloc] - initWithContentsOfMappedFile:sourcePath_]; - void *bytes = [data mutableBytes]; - struct fat_header *fat = (struct fat_header *)bytes; - - if (!fat) { - [data release]; - return 0; - } - - // Gather some information based on the header - BOOL isFat = fat->magic == FAT_MAGIC || fat->magic == FAT_CIGAM; - BOOL is64 = fat->magic == MH_MAGIC_64 || fat->magic == MH_CIGAM_64; - BOOL is32 = fat->magic == MH_MAGIC || fat->magic == MH_CIGAM; - BOOL swap = fat->magic == FAT_CIGAM || fat->magic == MH_CIGAM_64 || - fat->magic == MH_CIGAM; - - if (!is64 && !is32 && !isFat) { - [data release]; - return 0; - } - - // Load any available architectures and save the information - headers_ = [[NSMutableDictionary alloc] init]; - - if (isFat) { - struct fat_arch *archs = - (struct fat_arch *)((uint32_t)fat + sizeof(struct fat_header)); - uint32_t count = SwapLongIfNeeded(fat->nfat_arch); - - for (uint32_t i = 0; i < count; ++i) { - archs[i].cputype = SwapIntIfNeeded(archs[i].cputype); - archs[i].cpusubtype = SwapIntIfNeeded(archs[i].cpusubtype); - archs[i].offset = SwapLongIfNeeded(archs[i].offset); - archs[i].size = SwapLongIfNeeded(archs[i].size); - archs[i].align = SwapLongIfNeeded(archs[i].align); - - if (archs[i].cputype & CPU_ARCH_ABI64) - result = [self loadHeader64:bytes offset:archs[i].offset]; - else - result = [self loadHeader:bytes offset:archs[i].offset]; - } - } else if (is32) { - result = [self loadHeader:bytes offset:0]; - } else { - result = [self loadHeader64:bytes offset:0]; - } - - [data release]; - return result; -} - -//============================================================================= -static BOOL WriteFormat(int fd, const char *fmt, ...) { - va_list list; - char buffer[4096]; - ssize_t expected, written; - - va_start(list, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, list); - expected = strlen(buffer); - written = write(fd, buffer, strlen(buffer)); - va_end(list); - - return expected == written; -} - -//============================================================================= -- (BOOL)outputSymbolFile:(int)fd { - // Get the baseAddress for this architecture - NSDictionary *archDict = [headers_ objectForKey:architecture_]; - NSNumber *baseAddressNum = [archDict objectForKey:kHeaderBaseAddressKey]; - uint64_t baseAddress = - baseAddressNum ? [baseAddressNum unsignedLongLongValue] : 0; - NSNumber *moduleSizeNum = [archDict objectForKey:kHeaderSizeKey]; - uint64_t moduleSize = - moduleSizeNum ? [moduleSizeNum unsignedLongLongValue] : 0; - - // UUID - FileID file_id([sourcePath_ fileSystemRepresentation]); - unsigned char identifier[16]; - char identifierStr[40]; - const char *moduleName = [[sourcePath_ lastPathComponent] UTF8String]; - int cpu_type = [[archDict objectForKey:kHeaderCPUTypeKey] unsignedLongValue]; - if (file_id.MachoIdentifier(cpu_type, identifier)) { - FileID::ConvertIdentifierToString(identifier, identifierStr, - sizeof(identifierStr)); - } - else { - fprintf(stderr, "Unable to calculate UUID of mach-o binary!\n"); - return NO; - } - - // keep track exclusively of function addresses - // for sanity checking function lengths - functionAddresses_ = [[NSMutableSet alloc] init]; - - // Gather the information - [self loadSymbolInfoForArchitecture]; - - NSArray *sortedAddresses = [[addresses_ allKeys] - sortedArrayUsingSelector:@selector(compare:)]; - - NSArray *sortedFunctionAddresses = [[functionAddresses_ allObjects] - sortedArrayUsingSelector:@selector(compare:)]; - - // position ourselves at the 2nd function - unsigned int funcIndex = 1; - - // Remove the dashes from the string - NSMutableString *compactedStr = - [NSMutableString stringWithCString:identifierStr encoding:NSASCIIStringEncoding]; - [compactedStr replaceOccurrencesOfString:@"-" withString:@"" options:0 - range:NSMakeRange(0, [compactedStr length])]; - - if (!WriteFormat(fd, "MODULE mac %s %s0 %s\n", [architecture_ UTF8String], - [compactedStr UTF8String], moduleName)) { - return NO; - } - - // Sources ordered by address - NSArray *sources = [[sources_ allKeys] - sortedArrayUsingSelector:@selector(compare:)]; - NSMutableDictionary *fileNameToFileIndex = [[NSMutableDictionary alloc] init]; - unsigned int sourceCount = [sources count]; - for (unsigned int i = 0; i < sourceCount; ++i) { - NSString *file = [sources_ objectForKey:[sources objectAtIndex:i]]; - if (!WriteFormat(fd, "FILE %d %s\n", i + 1, [file UTF8String])) - return NO; - - [fileNameToFileIndex setObject:[NSNumber numberWithUnsignedInt:i+1] - forKey:file]; - } - - // Symbols - char terminatingChar = '\n'; - uint32_t fileIdx = 0, nextFileIdx = 0; - uint64_t nextSourceFileAddress = 0; - NSNumber *nextAddress; - uint64_t nextAddressVal; - unsigned int addressCount = [sortedAddresses count]; - - bool insideFunction = false; - - for (unsigned int i = 0; i < addressCount; ++i) { - NSNumber *address = [sortedAddresses objectAtIndex:i]; - // skip sources that have a starting address of 0 - if ([address unsignedLongValue] == 0) { - continue; - } - - uint64_t addressVal = [address unsignedLongLongValue] - baseAddress; - - // Get the next address to calculate the length - if (i + 1 < addressCount) { - nextAddress = [sortedAddresses objectAtIndex:i + 1]; - nextAddressVal = [nextAddress unsignedLongLongValue] - baseAddress; - } else { - nextAddressVal = baseAddress + moduleSize; - // The symbol reader doesn't want a trailing newline - terminatingChar = '\0'; - } - - NSDictionary *dict = [addresses_ objectForKey:address]; - NSNumber *line = [dict objectForKey:kAddressSourceLineKey]; - NSString *symbol = [dict objectForKey:kAddressConvertedSymbolKey]; - - if (!symbol) - symbol = [dict objectForKey:kAddressSymbolKey]; - - // sanity check the function length by making sure it doesn't - // run beyond the next function entry - uint64_t nextFunctionAddress = 0; - if (symbol && funcIndex < [sortedFunctionAddresses count]) { - nextFunctionAddress = [[sortedFunctionAddresses objectAtIndex:funcIndex] - unsignedLongLongValue] - baseAddress; - ++funcIndex; - } - - // Skip some symbols - if ([symbol hasPrefix:@"vtable for"]) - continue; - - if ([symbol hasPrefix:@"__static_initialization_and_destruction_0"]) - continue; - - if ([symbol hasPrefix:@"_GLOBAL__I_"]) - continue; - - if ([symbol hasPrefix:@"__func__."]) - continue; - - if ([symbol hasPrefix:@"__gnu"]) - continue; - - if ([symbol hasPrefix:@"typeinfo "]) - continue; - - if ([symbol hasPrefix:@"EH_frame"]) - continue; - - if ([symbol hasPrefix:@"GCC_except_table"]) - continue; - - if ([symbol hasPrefix:@"__tcf"]) - continue; - - if ([symbol hasPrefix:@"non-virtual thunk"]) - continue; - - // Find the source file (if any) that contains this address - while (sourceCount && (addressVal >= nextSourceFileAddress)) { - fileIdx = nextFileIdx; - - if (nextFileIdx < sourceCount) { - NSNumber *addr = [sources objectAtIndex:nextFileIdx]; - ++nextFileIdx; - nextSourceFileAddress = [addr unsignedLongLongValue] - baseAddress; - } else { - nextSourceFileAddress = baseAddress + moduleSize; - break; - } - } - - NSNumber *functionLength = [dict objectForKey:kFunctionSizeKey]; - - if (line) { - if (symbol && functionLength) { - - uint64_t functionLengthVal = [functionLength unsignedLongLongValue]; - - insideFunction = true; - // sanity check to make sure the length we were told does not exceed - // the space between this function and the next - if (nextFunctionAddress != 0) { - uint64_t functionLengthVal2 = nextFunctionAddress - addressVal; - - if(functionLengthVal > functionLengthVal2 ) { - functionLengthVal = functionLengthVal2; - } - } - - // Function - if (!WriteFormat(fd, "FUNC %llx %llx 0 %s\n", addressVal, - functionLengthVal, [symbol UTF8String])) - return NO; - } - - // Throw out line number information that doesn't correspond to - // any function - if (insideFunction) { - // Source line - uint64_t length = nextAddressVal - addressVal; - - // if fileNameToFileIndex/dict has an entry for the - // file/kFunctionFileKey, we're processing DWARF and have stored - // files for each program counter. If there is no entry, we're - // processing STABS and can use the old method of mapping - // addresses to files(which was basically iterating over a set - // of addresses until we reached one that was greater than the - // high PC of the current file, then moving on to the next file) - NSNumber *fileIndex = [fileNameToFileIndex objectForKey:[dict objectForKey:kFunctionFileKey]]; - if (!WriteFormat(fd, "%llx %llx %d %d\n", addressVal, length, - [line unsignedIntValue], fileIndex ? [fileIndex unsignedIntValue] : fileIdx)) - return NO; - } - } else { - // PUBLIC
- if (!WriteFormat(fd, "PUBLIC %llx 0 %s\n", addressVal, - [symbol UTF8String])) - return NO; - insideFunction = false; - } - } - - return YES; -} - -//============================================================================= -- (id)initWithContentsOfFile:(NSString *)path { - if ((self = [super init])) { - - if (![[NSFileManager defaultManager] fileExistsAtPath:path]) { - [self autorelease]; - return nil; - } - - sourcePath_ = [path copy]; - - // Test for .DSYM bundle - NSBundle *dsymBundle = [NSBundle bundleWithPath:sourcePath_]; - - if (dsymBundle) { - - // we need to take the DSYM bundle path and remove it's - // extension to get the name of the file inside the resources - // directory of the bundle that actually has the DWARF - // information - // But, Xcode supports something called "Wrapper extension"(see - // build settings), which would make the bundle name - // /tmp/foo/test.kext.dSYM, but the dwarf binary name would - // still be "test". so, now we loop through until deleting the - // extension doesn't change the string - - // e.g. suppose sourcepath_ is /tmp/foo/test.dSYM - - NSString *dwarfBinName = [sourcePath_ lastPathComponent]; - NSString *dwarfBinPath; - - // We use a do/while loop so we can handle files without an extension - do { - dwarfBinName = [dwarfBinName stringByDeletingPathExtension]; - // now, dwarfBinName is "test" - dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"]; - if (dwarfBinPath != nil) - break; - } while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]); - - if (dwarfBinPath == nil) { - NSLog(@"The bundle passed on the command line does not appear to be a DWARF dSYM bundle"); - [self autorelease]; - return nil; - } - - // otherwise we're good to go - [sourcePath_ release]; - - sourcePath_ = [dwarfBinPath copy]; - NSLog(@"Loading DWARF dSYM file from %@", sourcePath_); - } - - sectionsForArch_ = new ArchSectionMap(); - - if (![self loadModuleInfo]) { - [self autorelease]; - return nil; - } - - // If there's more than one, use the native one - if ([headers_ count] > 1) { - const NXArchInfo *localArchInfo = NXGetLocalArchInfo(); - - if (localArchInfo) { - cpu_type_t cpu = localArchInfo->cputype; - NSString *arch; - - if (cpu & CPU_ARCH_ABI64) - arch = ((cpu & ~CPU_ARCH_ABI64) == CPU_TYPE_X86) ? - @"x86_64" : @"ppc64"; - else - arch = (cpu == CPU_TYPE_X86) ? @"x86" : @"ppc"; - - [self setArchitecture:arch]; - } - } else { - // Specify the default architecture - [self setArchitecture:[[headers_ allKeys] objectAtIndex:0]]; - } - } - - return self; -} - -//============================================================================= -- (NSArray *)availableArchitectures { - return [headers_ allKeys]; -} - -//============================================================================= -- (void)dealloc { - [sourcePath_ release]; - [architecture_ release]; - [addresses_ release]; - [functionAddresses_ release]; - [sources_ release]; - [headers_ release]; - delete sectionsForArch_; - - [super dealloc]; -} - -//============================================================================= -- (BOOL)setArchitecture:(NSString *)architecture { - NSString *normalized = [architecture lowercaseString]; - BOOL isValid = NO; - - if ([normalized isEqualToString:@"ppc"]) { - isValid = YES; - } - else if ([normalized isEqualToString:@"i386"]) { - normalized = @"x86"; - isValid = YES; - } - else if ([normalized isEqualToString:@"x86"]) { - isValid = YES; - } - else if ([normalized isEqualToString:@"ppc64"]) { - isValid = YES; - } - else if ([normalized isEqualToString:@"x86_64"]) { - isValid = YES; - } - - if (isValid) { - if (![headers_ objectForKey:normalized]) - return NO; - - [architecture_ autorelease]; - architecture_ = [normalized copy]; - } - - return isValid; -} - -//============================================================================= -- (NSString *)architecture { - return architecture_; -} - -//============================================================================= -- (BOOL)writeSymbolFile:(NSString *)destinationPath { - const char *dest = [destinationPath fileSystemRepresentation]; - int fd; - - if ([[destinationPath substringToIndex:1] isEqualToString:@"-"]) - fd = STDOUT_FILENO; - else - fd = open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0666); - - if (fd == -1) - return NO; - - BOOL result = [self outputSymbolFile:fd]; - - close(fd); - - return result; -} - -@end - -@implementation MachSection - -- (id)initWithMachSection:(section *)sect andNumber:(uint32_t)sectionNumber { - if ((self = [super init])) { - sect_ = sect; - sectionNumber_ = sectionNumber; - } - - return self; -} - -- (section*)sectionPointer { - return sect_; -} - -- (uint32_t)sectionNumber { - return sectionNumber_; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader-inl.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader-inl.h deleted file mode 100644 index 7ccd0fe6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader-inl.h +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef UTIL_DEBUGINFO_BYTEREADER_INL_H__ -#define UTIL_DEBUGINFO_BYTEREADER_INL_H__ - -#include "common/mac/dwarf/bytereader.h" - -namespace dwarf2reader { - -inline uint8 ByteReader::ReadOneByte(const char* buffer) const { - return buffer[0]; -} - -inline uint16 ByteReader::ReadTwoBytes(const char* buffer) const { - const uint16 buffer0 = static_cast(buffer[0]); - const uint16 buffer1 = static_cast(buffer[1]); - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8; - } else { - return buffer1 | buffer0 << 8; - } -} - -inline uint64 ByteReader::ReadFourBytes(const char* buffer) const { - const uint32 buffer0 = static_cast(buffer[0]); - const uint32 buffer1 = static_cast(buffer[1]); - const uint32 buffer2 = static_cast(buffer[2]); - const uint32 buffer3 = static_cast(buffer[3]); - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8 | buffer2 << 16 | buffer3 << 24; - } else { - return buffer3 | buffer2 << 8 | buffer1 << 16 | buffer0 << 24; - } -} - -inline uint64 ByteReader::ReadEightBytes(const char* buffer) const { - const uint64 buffer0 = static_cast(buffer[0]); - const uint64 buffer1 = static_cast(buffer[1]); - const uint64 buffer2 = static_cast(buffer[2]); - const uint64 buffer3 = static_cast(buffer[3]); - const uint64 buffer4 = static_cast(buffer[4]); - const uint64 buffer5 = static_cast(buffer[5]); - const uint64 buffer6 = static_cast(buffer[6]); - const uint64 buffer7 = static_cast(buffer[7]); - if (endian_ == ENDIANNESS_LITTLE) { - return buffer0 | buffer1 << 8 | buffer2 << 16 | buffer3 << 24 | - buffer4 << 32 | buffer5 << 40 | buffer6 << 48 | buffer7 << 56; - } else { - return buffer7 | buffer6 << 8 | buffer5 << 16 | buffer4 << 24 | - buffer3 << 32 | buffer2 << 40 | buffer1 << 48 | buffer0 << 56; - } -} - -// Read an unsigned LEB128 number. Each byte contains 7 bits of -// information, plus one bit saying whether the number continues or -// not. - -inline uint64 ByteReader::ReadUnsignedLEB128(const char* buffer, - size_t* len) const { - uint64 result = 0; - size_t num_read = 0; - unsigned int shift = 0; - unsigned char byte; - - do { - byte = *buffer++; - num_read++; - - result |= (static_cast(byte & 0x7f)) << shift; - - shift += 7; - - } while (byte & 0x80); - - *len = num_read; - - return result; -} - -// Read a signed LEB128 number. These are like regular LEB128 -// numbers, except the last byte may have a sign bit set. - -inline int64 ByteReader::ReadSignedLEB128(const char* buffer, - size_t* len) const { - int64 result = 0; - unsigned int shift = 0; - size_t num_read = 0; - unsigned char byte; - - do { - byte = *buffer++; - num_read++; - result |= (static_cast(byte & 0x7f) << shift); - shift += 7; - } while (byte & 0x80); - - if ((shift < 8 * sizeof (result)) && (byte & 0x40)) - result |= -((static_cast(1)) << shift); - *len = num_read; - return result; -} - -inline uint64 ByteReader::ReadOffset(const char* buffer) const { - assert(this->offset_reader_); - return (this->*offset_reader_)(buffer); -} - -inline uint64 ByteReader::ReadAddress(const char* buffer) const { - assert(this->address_reader_); - return (this->*address_reader_)(buffer); -} - -} // namespace dwarf2reader - -#endif // UTIL_DEBUGINFO_BYTEREADER_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.cc b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.cc deleted file mode 100644 index 823cf2b6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.cc +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/mac/dwarf/bytereader-inl.h" - -#include "common/mac/dwarf/bytereader.h" - -namespace dwarf2reader { - -ByteReader::ByteReader(enum Endianness endian) - :offset_reader_(NULL), address_reader_(NULL), endian_(endian), - address_size_(0), offset_size_(0) -{ } - -ByteReader::~ByteReader() { } - -void ByteReader::SetOffsetSize(uint8 size) { - offset_size_ = size; - assert(size == 4 || size == 8); - if (size == 4) { - this->offset_reader_ = &ByteReader::ReadFourBytes; - } else { - this->offset_reader_ = &ByteReader::ReadEightBytes; - } -} - -void ByteReader::SetAddressSize(uint8 size) { - address_size_ = size; - assert(size == 4 || size == 8); - if (size == 4) { - this->address_reader_ = &ByteReader::ReadFourBytes; - } else { - this->address_reader_ = &ByteReader::ReadEightBytes; - } -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.h deleted file mode 100644 index 299dd9ac..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/bytereader.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_MAC_DWARF_BYTEREADER_H__ -#define COMMON_MAC_DWARF_BYTEREADER_H__ - -#include -#include "common/mac/dwarf/types.h" - -namespace dwarf2reader { - -// We can't use the obvious name of LITTLE_ENDIAN and BIG_ENDIAN -// because it conflicts with a macro -enum Endianness { - ENDIANNESS_BIG, - ENDIANNESS_LITTLE -}; - -// Class that knows how to read both big endian and little endian -// numbers, for use in DWARF2/3 reader. -// Takes an endianness argument. -// To read addresses and offsets, SetAddressSize and SetOffsetSize -// must be called first. -class ByteReader { - public: - explicit ByteReader(enum Endianness endian); - virtual ~ByteReader(); - - // Set the address size to SIZE, which sets up the ReadAddress member - // so that it works. - void SetAddressSize(uint8 size); - - // Set the offset size to SIZE, which sets up the ReadOffset member - // so that it works. - void SetOffsetSize(uint8 size); - - // Return the current offset size - uint8 OffsetSize() const { return offset_size_; } - - // Return the current address size - uint8 AddressSize() const { return address_size_; } - - // Read a single byte from BUFFER and return it as an unsigned 8 bit - // number. - uint8 ReadOneByte(const char* buffer) const; - - // Read two bytes from BUFFER and return it as an unsigned 16 bit - // number. - uint16 ReadTwoBytes(const char* buffer) const; - - // Read four bytes from BUFFER and return it as an unsigned 32 bit - // number. This function returns a uint64 so that it is compatible - // with ReadAddress and ReadOffset. The number it returns will - // never be outside the range of an unsigned 32 bit integer. - uint64 ReadFourBytes(const char* buffer) const; - - // Read eight bytes from BUFFER and return it as an unsigned 64 bit - // number - uint64 ReadEightBytes(const char* buffer) const; - - // Read an unsigned LEB128 (Little Endian Base 128) number from - // BUFFER and return it as an unsigned 64 bit integer. LEN is set - // to the length read. Everybody seems to reinvent LEB128 as a - // variable size integer encoding, DWARF has had it for a long time. - uint64 ReadUnsignedLEB128(const char* buffer, size_t* len) const; - - // Read a signed LEB128 number from BUFFER and return it as an - // signed 64 bit integer. LEN is set to the length read. - int64 ReadSignedLEB128(const char* buffer, size_t* len) const; - - // Read an offset from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 define offsets as either 4 or 8 bytes, - // generally depending on the amount of DWARF2/3 info present. - uint64 ReadOffset(const char* buffer) const; - - // Read an address from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 allow addresses to be any size from 0-255 - // bytes currently. Internally we support 4 and 8 byte addresses, - // and will CHECK on anything else. - uint64 ReadAddress(const char* buffer) const; - - private: - - // Function pointer type for our address and offset readers. - typedef uint64 (ByteReader::*AddressReader)(const char*) const; - - // Read an offset from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 define offsets as either 4 or 8 bytes, - // generally depending on the amount of DWARF2/3 info present. - // This function pointer gets set by SetOffsetSize. - AddressReader offset_reader_; - - // Read an address from BUFFER and return it as an unsigned 64 bit - // integer. DWARF2/3 allow addresses to be any size from 0-255 - // bytes currently. Internally we support 4 and 8 byte addresses, - // and will CHECK on anything else. - // This function pointer gets set by SetAddressSize. - AddressReader address_reader_; - - Endianness endian_; - uint8 address_size_; - uint8 offset_size_; -}; - -} // namespace dwarf2reader - -#endif // COMMON_MAC_DWARF_BYTEREADER_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2enums.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2enums.h deleted file mode 100644 index c52e2b47..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2enums.h +++ /dev/null @@ -1,490 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_MAC_DWARF_DWARF2ENUMS_H__ -#define COMMON_MAC_DWARF_DWARF2ENUMS_H__ - -namespace dwarf2reader { - -// These enums do not follow the google3 style only because they are -// known universally (specs, other implementations) by the names in -// exactly this capitalization. -// Tag names and codes. -enum DwarfTag { - DW_TAG_padding = 0x00, - DW_TAG_array_type = 0x01, - DW_TAG_class_type = 0x02, - DW_TAG_entry_point = 0x03, - DW_TAG_enumeration_type = 0x04, - DW_TAG_formal_parameter = 0x05, - DW_TAG_imported_declaration = 0x08, - DW_TAG_label = 0x0a, - DW_TAG_lexical_block = 0x0b, - DW_TAG_member = 0x0d, - DW_TAG_pointer_type = 0x0f, - DW_TAG_reference_type = 0x10, - DW_TAG_compile_unit = 0x11, - DW_TAG_string_type = 0x12, - DW_TAG_structure_type = 0x13, - DW_TAG_subroutine_type = 0x15, - DW_TAG_typedef = 0x16, - DW_TAG_union_type = 0x17, - DW_TAG_unspecified_parameters = 0x18, - DW_TAG_variant = 0x19, - DW_TAG_common_block = 0x1a, - DW_TAG_common_inclusion = 0x1b, - DW_TAG_inheritance = 0x1c, - DW_TAG_inlined_subroutine = 0x1d, - DW_TAG_module = 0x1e, - DW_TAG_ptr_to_member_type = 0x1f, - DW_TAG_set_type = 0x20, - DW_TAG_subrange_type = 0x21, - DW_TAG_with_stmt = 0x22, - DW_TAG_access_declaration = 0x23, - DW_TAG_base_type = 0x24, - DW_TAG_catch_block = 0x25, - DW_TAG_const_type = 0x26, - DW_TAG_constant = 0x27, - DW_TAG_enumerator = 0x28, - DW_TAG_file_type = 0x29, - DW_TAG_friend = 0x2a, - DW_TAG_namelist = 0x2b, - DW_TAG_namelist_item = 0x2c, - DW_TAG_packed_type = 0x2d, - DW_TAG_subprogram = 0x2e, - DW_TAG_template_type_param = 0x2f, - DW_TAG_template_value_param = 0x30, - DW_TAG_thrown_type = 0x31, - DW_TAG_try_block = 0x32, - DW_TAG_variant_part = 0x33, - DW_TAG_variable = 0x34, - DW_TAG_volatile_type = 0x35, - // DWARF 3. - DW_TAG_dwarf_procedure = 0x36, - DW_TAG_restrict_type = 0x37, - DW_TAG_interface_type = 0x38, - DW_TAG_namespace = 0x39, - DW_TAG_imported_module = 0x3a, - DW_TAG_unspecified_type = 0x3b, - DW_TAG_partial_unit = 0x3c, - DW_TAG_imported_unit = 0x3d, - // SGI/MIPS Extensions. - DW_TAG_MIPS_loop = 0x4081, - // HP extensions. See: - // ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz - DW_TAG_HP_array_descriptor = 0x4090, - // GNU extensions. - DW_TAG_format_label = 0x4101, // For FORTRAN 77 and Fortran 90. - DW_TAG_function_template = 0x4102, // For C++. - DW_TAG_class_template = 0x4103, // For C++. - DW_TAG_GNU_BINCL = 0x4104, - DW_TAG_GNU_EINCL = 0x4105, - // Extensions for UPC. See: http://upc.gwu.edu/~upc. - DW_TAG_upc_shared_type = 0x8765, - DW_TAG_upc_strict_type = 0x8766, - DW_TAG_upc_relaxed_type = 0x8767, - // PGI (STMicroelectronics) extensions. No documentation available. - DW_TAG_PGI_kanji_type = 0xA000, - DW_TAG_PGI_interface_block = 0xA020 -}; - - -enum DwarfHasChild { - DW_children_no = 0, - DW_children_yes = 1 -}; - -// Form names and codes. -enum DwarfForm { - DW_FORM_addr = 0x01, - DW_FORM_block2 = 0x03, - DW_FORM_block4 = 0x04, - DW_FORM_data2 = 0x05, - DW_FORM_data4 = 0x06, - DW_FORM_data8 = 0x07, - DW_FORM_string = 0x08, - DW_FORM_block = 0x09, - DW_FORM_block1 = 0x0a, - DW_FORM_data1 = 0x0b, - DW_FORM_flag = 0x0c, - DW_FORM_sdata = 0x0d, - DW_FORM_strp = 0x0e, - DW_FORM_udata = 0x0f, - DW_FORM_ref_addr = 0x10, - DW_FORM_ref1 = 0x11, - DW_FORM_ref2 = 0x12, - DW_FORM_ref4 = 0x13, - DW_FORM_ref8 = 0x14, - DW_FORM_ref_udata = 0x15, - DW_FORM_indirect = 0x16 -}; - -// Attribute names and codes -enum DwarfAttribute { - DW_AT_sibling = 0x01, - DW_AT_location = 0x02, - DW_AT_name = 0x03, - DW_AT_ordering = 0x09, - DW_AT_subscr_data = 0x0a, - DW_AT_byte_size = 0x0b, - DW_AT_bit_offset = 0x0c, - DW_AT_bit_size = 0x0d, - DW_AT_element_list = 0x0f, - DW_AT_stmt_list = 0x10, - DW_AT_low_pc = 0x11, - DW_AT_high_pc = 0x12, - DW_AT_language = 0x13, - DW_AT_member = 0x14, - DW_AT_discr = 0x15, - DW_AT_discr_value = 0x16, - DW_AT_visibility = 0x17, - DW_AT_import = 0x18, - DW_AT_string_length = 0x19, - DW_AT_common_reference = 0x1a, - DW_AT_comp_dir = 0x1b, - DW_AT_const_value = 0x1c, - DW_AT_containing_type = 0x1d, - DW_AT_default_value = 0x1e, - DW_AT_inline = 0x20, - DW_AT_is_optional = 0x21, - DW_AT_lower_bound = 0x22, - DW_AT_producer = 0x25, - DW_AT_prototyped = 0x27, - DW_AT_return_addr = 0x2a, - DW_AT_start_scope = 0x2c, - DW_AT_stride_size = 0x2e, - DW_AT_upper_bound = 0x2f, - DW_AT_abstract_origin = 0x31, - DW_AT_accessibility = 0x32, - DW_AT_address_class = 0x33, - DW_AT_artificial = 0x34, - DW_AT_base_types = 0x35, - DW_AT_calling_convention = 0x36, - DW_AT_count = 0x37, - DW_AT_data_member_location = 0x38, - DW_AT_decl_column = 0x39, - DW_AT_decl_file = 0x3a, - DW_AT_decl_line = 0x3b, - DW_AT_declaration = 0x3c, - DW_AT_discr_list = 0x3d, - DW_AT_encoding = 0x3e, - DW_AT_external = 0x3f, - DW_AT_frame_base = 0x40, - DW_AT_friend = 0x41, - DW_AT_identifier_case = 0x42, - DW_AT_macro_info = 0x43, - DW_AT_namelist_items = 0x44, - DW_AT_priority = 0x45, - DW_AT_segment = 0x46, - DW_AT_specification = 0x47, - DW_AT_static_link = 0x48, - DW_AT_type = 0x49, - DW_AT_use_location = 0x4a, - DW_AT_variable_parameter = 0x4b, - DW_AT_virtuality = 0x4c, - DW_AT_vtable_elem_location = 0x4d, - // DWARF 3 values. - DW_AT_allocated = 0x4e, - DW_AT_associated = 0x4f, - DW_AT_data_location = 0x50, - DW_AT_stride = 0x51, - DW_AT_entry_pc = 0x52, - DW_AT_use_UTF8 = 0x53, - DW_AT_extension = 0x54, - DW_AT_ranges = 0x55, - DW_AT_trampoline = 0x56, - DW_AT_call_column = 0x57, - DW_AT_call_file = 0x58, - DW_AT_call_line = 0x59, - // SGI/MIPS extensions. - DW_AT_MIPS_fde = 0x2001, - DW_AT_MIPS_loop_begin = 0x2002, - DW_AT_MIPS_tail_loop_begin = 0x2003, - DW_AT_MIPS_epilog_begin = 0x2004, - DW_AT_MIPS_loop_unroll_factor = 0x2005, - DW_AT_MIPS_software_pipeline_depth = 0x2006, - DW_AT_MIPS_linkage_name = 0x2007, - DW_AT_MIPS_stride = 0x2008, - DW_AT_MIPS_abstract_name = 0x2009, - DW_AT_MIPS_clone_origin = 0x200a, - DW_AT_MIPS_has_inlines = 0x200b, - // HP extensions. - DW_AT_HP_block_index = 0x2000, - DW_AT_HP_unmodifiable = 0x2001, // Same as DW_AT_MIPS_fde. - DW_AT_HP_actuals_stmt_list = 0x2010, - DW_AT_HP_proc_per_section = 0x2011, - DW_AT_HP_raw_data_ptr = 0x2012, - DW_AT_HP_pass_by_reference = 0x2013, - DW_AT_HP_opt_level = 0x2014, - DW_AT_HP_prof_version_id = 0x2015, - DW_AT_HP_opt_flags = 0x2016, - DW_AT_HP_cold_region_low_pc = 0x2017, - DW_AT_HP_cold_region_high_pc = 0x2018, - DW_AT_HP_all_variables_modifiable = 0x2019, - DW_AT_HP_linkage_name = 0x201a, - DW_AT_HP_prof_flags = 0x201b, // In comp unit of procs_info for -g. - // GNU extensions. - DW_AT_sf_names = 0x2101, - DW_AT_src_info = 0x2102, - DW_AT_mac_info = 0x2103, - DW_AT_src_coords = 0x2104, - DW_AT_body_begin = 0x2105, - DW_AT_body_end = 0x2106, - DW_AT_GNU_vector = 0x2107, - // VMS extensions. - DW_AT_VMS_rtnbeg_pd_address = 0x2201, - // UPC extension. - DW_AT_upc_threads_scaled = 0x3210, - // PGI (STMicroelectronics) extensions. - DW_AT_PGI_lbase = 0x3a00, - DW_AT_PGI_soffset = 0x3a01, - DW_AT_PGI_lstride = 0x3a02 -}; - - -// Line number opcodes. -enum DwarfLineNumberOps { - DW_LNS_extended_op = 0, - DW_LNS_copy = 1, - DW_LNS_advance_pc = 2, - DW_LNS_advance_line = 3, - DW_LNS_set_file = 4, - DW_LNS_set_column = 5, - DW_LNS_negate_stmt = 6, - DW_LNS_set_basic_block = 7, - DW_LNS_const_add_pc = 8, - DW_LNS_fixed_advance_pc = 9, - // DWARF 3. - DW_LNS_set_prologue_end = 10, - DW_LNS_set_epilogue_begin = 11, - DW_LNS_set_isa = 12 -}; - -// Line number extended opcodes. -enum DwarfLineNumberExtendedOps { - DW_LNE_end_sequence = 1, - DW_LNE_set_address = 2, - DW_LNE_define_file = 3, - // HP extensions. - DW_LNE_HP_negate_is_UV_update = 0x11, - DW_LNE_HP_push_context = 0x12, - DW_LNE_HP_pop_context = 0x13, - DW_LNE_HP_set_file_line_column = 0x14, - DW_LNE_HP_set_routine_name = 0x15, - DW_LNE_HP_set_sequence = 0x16, - DW_LNE_HP_negate_post_semantics = 0x17, - DW_LNE_HP_negate_function_exit = 0x18, - DW_LNE_HP_negate_front_end_logical = 0x19, - DW_LNE_HP_define_proc = 0x20 -}; - -// Type encoding names and codes -enum DwarfEncoding { - DW_ATE_address =0x1, - DW_ATE_boolean =0x2, - DW_ATE_complex_float =0x3, - DW_ATE_float =0x4, - DW_ATE_signed =0x5, - DW_ATE_signed_char =0x6, - DW_ATE_unsigned =0x7, - DW_ATE_unsigned_char =0x8, - // DWARF3/DWARF3f - DW_ATE_imaginary_float =0x9, - DW_ATE_packed_decimal =0xa, - DW_ATE_numeric_string =0xb, - DW_ATE_edited =0xc, - DW_ATE_signed_fixed =0xd, - DW_ATE_unsigned_fixed =0xe, - DW_ATE_decimal_float =0xf, - DW_ATE_lo_user =0x80, - DW_ATE_hi_user =0xff -}; - -// Location virtual machine opcodes -enum DwarfOpcode { - DW_OP_addr =0x03, - DW_OP_deref =0x06, - DW_OP_const1u =0x08, - DW_OP_const1s =0x09, - DW_OP_const2u =0x0a, - DW_OP_const2s =0x0b, - DW_OP_const4u =0x0c, - DW_OP_const4s =0x0d, - DW_OP_const8u =0x0e, - DW_OP_const8s =0x0f, - DW_OP_constu =0x10, - DW_OP_consts =0x11, - DW_OP_dup =0x12, - DW_OP_drop =0x13, - DW_OP_over =0x14, - DW_OP_pick =0x15, - DW_OP_swap =0x16, - DW_OP_rot =0x17, - DW_OP_xderef =0x18, - DW_OP_abs =0x19, - DW_OP_and =0x1a, - DW_OP_div =0x1b, - DW_OP_minus =0x1c, - DW_OP_mod =0x1d, - DW_OP_mul =0x1e, - DW_OP_neg =0x1f, - DW_OP_not =0x20, - DW_OP_or =0x21, - DW_OP_plus =0x22, - DW_OP_plus_uconst =0x23, - DW_OP_shl =0x24, - DW_OP_shr =0x25, - DW_OP_shra =0x26, - DW_OP_xor =0x27, - DW_OP_bra =0x28, - DW_OP_eq =0x29, - DW_OP_ge =0x2a, - DW_OP_gt =0x2b, - DW_OP_le =0x2c, - DW_OP_lt =0x2d, - DW_OP_ne =0x2e, - DW_OP_skip =0x2f, - DW_OP_lit0 =0x30, - DW_OP_lit1 =0x31, - DW_OP_lit2 =0x32, - DW_OP_lit3 =0x33, - DW_OP_lit4 =0x34, - DW_OP_lit5 =0x35, - DW_OP_lit6 =0x36, - DW_OP_lit7 =0x37, - DW_OP_lit8 =0x38, - DW_OP_lit9 =0x39, - DW_OP_lit10 =0x3a, - DW_OP_lit11 =0x3b, - DW_OP_lit12 =0x3c, - DW_OP_lit13 =0x3d, - DW_OP_lit14 =0x3e, - DW_OP_lit15 =0x3f, - DW_OP_lit16 =0x40, - DW_OP_lit17 =0x41, - DW_OP_lit18 =0x42, - DW_OP_lit19 =0x43, - DW_OP_lit20 =0x44, - DW_OP_lit21 =0x45, - DW_OP_lit22 =0x46, - DW_OP_lit23 =0x47, - DW_OP_lit24 =0x48, - DW_OP_lit25 =0x49, - DW_OP_lit26 =0x4a, - DW_OP_lit27 =0x4b, - DW_OP_lit28 =0x4c, - DW_OP_lit29 =0x4d, - DW_OP_lit30 =0x4e, - DW_OP_lit31 =0x4f, - DW_OP_reg0 =0x50, - DW_OP_reg1 =0x51, - DW_OP_reg2 =0x52, - DW_OP_reg3 =0x53, - DW_OP_reg4 =0x54, - DW_OP_reg5 =0x55, - DW_OP_reg6 =0x56, - DW_OP_reg7 =0x57, - DW_OP_reg8 =0x58, - DW_OP_reg9 =0x59, - DW_OP_reg10 =0x5a, - DW_OP_reg11 =0x5b, - DW_OP_reg12 =0x5c, - DW_OP_reg13 =0x5d, - DW_OP_reg14 =0x5e, - DW_OP_reg15 =0x5f, - DW_OP_reg16 =0x60, - DW_OP_reg17 =0x61, - DW_OP_reg18 =0x62, - DW_OP_reg19 =0x63, - DW_OP_reg20 =0x64, - DW_OP_reg21 =0x65, - DW_OP_reg22 =0x66, - DW_OP_reg23 =0x67, - DW_OP_reg24 =0x68, - DW_OP_reg25 =0x69, - DW_OP_reg26 =0x6a, - DW_OP_reg27 =0x6b, - DW_OP_reg28 =0x6c, - DW_OP_reg29 =0x6d, - DW_OP_reg30 =0x6e, - DW_OP_reg31 =0x6f, - DW_OP_breg0 =0x70, - DW_OP_breg1 =0x71, - DW_OP_breg2 =0x72, - DW_OP_breg3 =0x73, - DW_OP_breg4 =0x74, - DW_OP_breg5 =0x75, - DW_OP_breg6 =0x76, - DW_OP_breg7 =0x77, - DW_OP_breg8 =0x78, - DW_OP_breg9 =0x79, - DW_OP_breg10 =0x7a, - DW_OP_breg11 =0x7b, - DW_OP_breg12 =0x7c, - DW_OP_breg13 =0x7d, - DW_OP_breg14 =0x7e, - DW_OP_breg15 =0x7f, - DW_OP_breg16 =0x80, - DW_OP_breg17 =0x81, - DW_OP_breg18 =0x82, - DW_OP_breg19 =0x83, - DW_OP_breg20 =0x84, - DW_OP_breg21 =0x85, - DW_OP_breg22 =0x86, - DW_OP_breg23 =0x87, - DW_OP_breg24 =0x88, - DW_OP_breg25 =0x89, - DW_OP_breg26 =0x8a, - DW_OP_breg27 =0x8b, - DW_OP_breg28 =0x8c, - DW_OP_breg29 =0x8d, - DW_OP_breg30 =0x8e, - DW_OP_breg31 =0x8f, - DW_OP_regX =0x90, - DW_OP_fbreg =0x91, - DW_OP_bregX =0x92, - DW_OP_piece =0x93, - DW_OP_deref_size =0x94, - DW_OP_xderef_size =0x95, - DW_OP_nop =0x96, - // DWARF3/DWARF3f - DW_OP_push_object_address =0x97, - DW_OP_call2 =0x98, - DW_OP_call4 =0x99, - DW_OP_call_ref =0x9a, - DW_OP_form_tls_address =0x9b, - DW_OP_call_frame_cfa =0x9c, - DW_OP_bit_piece =0x9d, - DW_OP_lo_user =0xe0, - DW_OP_hi_user =0xff, - // GNU extensions - DW_OP_GNU_push_tls_address =0xe0 -}; - -} // namespace dwarf2reader -#endif // COMMON_MAC_DWARF_DWARF2ENUMS_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.cc b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.cc deleted file mode 100644 index 6e7a2f1d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.cc +++ /dev/null @@ -1,830 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include - -#include "common/mac/dwarf/bytereader-inl.h" -#include "common/mac/dwarf/dwarf2reader.h" -#include "common/mac/dwarf/bytereader.h" -#include "common/mac/dwarf/line_state_machine.h" - -namespace __gnu_cxx -{ - template<> struct hash< std::string > - { - size_t operator()( const std::string& x ) const - { - return hash< const char* >()( x.c_str() ); - } - }; -} - -namespace dwarf2reader { - -// Read a DWARF2/3 initial length field from START, using READER, and -// report the length in LEN. Return the actual initial length. - -static uint64 ReadInitialLength(const char* start, - ByteReader* reader, size_t* len) { - const uint64 initial_length = reader->ReadFourBytes(start); - start += 4; - - // In DWARF2/3, if the initial length is all 1 bits, then the offset - // size is 8 and we need to read the next 8 bytes for the real length. - if (initial_length == 0xffffffff) { - reader->SetOffsetSize(8); - *len = 12; - return reader->ReadOffset(start); - } else { - reader->SetOffsetSize(4); - *len = 4; - } - return initial_length; -} - -CompilationUnit::CompilationUnit(const SectionMap& sections, uint64 offset, - ByteReader* reader, Dwarf2Handler* handler) - : offset_from_section_start_(offset), reader_(reader), - sections_(sections), handler_(handler), abbrevs_(NULL), - string_buffer_(NULL), string_buffer_length_(0) {} - -// Read a DWARF2/3 abbreviation section. -// Each abbrev consists of a abbreviation number, a tag, a byte -// specifying whether the tag has children, and a list of -// attribute/form pairs. -// The list of forms is terminated by a 0 for the attribute, and a -// zero for the form. The entire abbreviation section is terminated -// by a zero for the code. - -void CompilationUnit::ReadAbbrevs() { - if (abbrevs_) - return; - - // First get the debug_abbrev section - SectionMap::const_iterator iter = sections_.find("__debug_abbrev"); - assert(iter != sections_.end()); - - abbrevs_ = new vector; - abbrevs_->resize(1); - - // The only way to check whether we are reading over the end of the - // buffer would be to first compute the size of the leb128 data by - // reading it, then go back and read it again. - const char* abbrev_start = iter->second.first + - header_.abbrev_offset; - const char* abbrevptr = abbrev_start; - const uint64 abbrev_length = iter->second.second - header_.abbrev_offset; - - while (1) { - CompilationUnit::Abbrev abbrev; - size_t len; - const uint32 number = reader_->ReadUnsignedLEB128(abbrevptr, &len); - - if (number == 0) - break; - abbrev.number = number; - abbrevptr += len; - - assert(abbrevptr < abbrev_start + abbrev_length); - const uint32 tag = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - abbrev.tag = static_cast(tag); - - assert(abbrevptr < abbrev_start + abbrev_length); - abbrev.has_children = reader_->ReadOneByte(abbrevptr); - abbrevptr += 1; - - assert(abbrevptr < abbrev_start + abbrev_length); - - while (1) { - const uint32 nametemp = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - - assert(abbrevptr < abbrev_start + abbrev_length); - const uint32 formtemp = reader_->ReadUnsignedLEB128(abbrevptr, &len); - abbrevptr += len; - if (nametemp == 0 && formtemp == 0) - break; - - const enum DwarfAttribute name = - static_cast(nametemp); - const enum DwarfForm form = static_cast(formtemp); - abbrev.attributes.push_back(make_pair(name, form)); - } - assert(abbrev.number == abbrevs_->size()); - abbrevs_->push_back(abbrev); - } -} - -// Skips a single DIE's attributes. -const char* CompilationUnit::SkipDIE(const char* start, - const Abbrev& abbrev) { - for (AttributeList::const_iterator i = abbrev.attributes.begin(); - i != abbrev.attributes.end(); - i++) { - start = SkipAttribute(start, i->second); - } - return start; -} - -// Skips a single attribute form's data. -const char* CompilationUnit::SkipAttribute(const char* start, - enum DwarfForm form) { - size_t len; - - switch (form) { - case DW_FORM_indirect: - form = static_cast(reader_->ReadUnsignedLEB128(start, - &len)); - start += len; - return SkipAttribute(start, form); - break; - - case DW_FORM_data1: - case DW_FORM_flag: - case DW_FORM_ref1: - return start + 1; - break; - case DW_FORM_ref2: - case DW_FORM_data2: - return start + 2; - break; - case DW_FORM_ref4: - case DW_FORM_data4: - return start + 4; - break; - case DW_FORM_ref8: - case DW_FORM_data8: - return start + 8; - break; - case DW_FORM_string: - return start + strlen(start) + 1; - break; - case DW_FORM_udata: - case DW_FORM_ref_udata: - reader_->ReadUnsignedLEB128(start, &len); - return start + len; - break; - - case DW_FORM_sdata: - reader_->ReadSignedLEB128(start, &len); - return start + len; - break; - case DW_FORM_addr: - return start + reader_->AddressSize(); - break; - case DW_FORM_ref_addr: - // DWARF2 and 3 differ on whether ref_addr is address size or - // offset size. - assert(header_.version == 2 || header_.version == 3); - if (header_.version == 2) { - return start + reader_->AddressSize(); - } else if (header_.version == 3) { - return start + reader_->OffsetSize(); - } - break; - - case DW_FORM_block1: - return start + 1 + reader_->ReadOneByte(start); - break; - case DW_FORM_block2: - return start + 2 + reader_->ReadTwoBytes(start); - break; - case DW_FORM_block4: - return start + 4 + reader_->ReadFourBytes(start); - break; - case DW_FORM_block: { - uint64 size = reader_->ReadUnsignedLEB128(start, &len); - return start + size + len; - } - break; - case DW_FORM_strp: - return start + reader_->OffsetSize(); - break; - default: - fprintf(stderr,"Unhandled form type"); - } - fprintf(stderr,"Unhandled form type"); - return NULL; -} - -// Read a DWARF2/3 header. -// The header is variable length in DWARF3 (and DWARF2 as extended by -// most compilers), and consists of an length field, a version number, -// the offset in the .debug_abbrev section for our abbrevs, and an -// address size. -void CompilationUnit::ReadHeader() { - const char* headerptr = buffer_; - size_t initial_length_size; - - assert(headerptr + 4 < buffer_ + buffer_length_); - const uint64 initial_length = ReadInitialLength(headerptr, reader_, - &initial_length_size); - headerptr += initial_length_size; - header_.length = initial_length; - - assert(headerptr + 2 < buffer_ + buffer_length_); - header_.version = reader_->ReadTwoBytes(headerptr); - headerptr += 2; - - assert(headerptr + reader_->OffsetSize() < buffer_ + buffer_length_); - header_.abbrev_offset = reader_->ReadOffset(headerptr); - headerptr += reader_->OffsetSize(); - - assert(headerptr + 1 < buffer_ + buffer_length_); - header_.address_size = reader_->ReadOneByte(headerptr); - reader_->SetAddressSize(header_.address_size); - headerptr += 1; - - after_header_ = headerptr; - - // This check ensures that we don't have to do checking during the - // reading of DIEs. header_.length does not include the size of the - // initial length. - assert(buffer_ + initial_length_size + header_.length <= - buffer_ + buffer_length_); -} - -uint64 CompilationUnit::Start() { - // First get the debug_info section - SectionMap::const_iterator iter = sections_.find("__debug_info"); - assert(iter != sections_.end()); - - // Set up our buffer - buffer_ = iter->second.first + offset_from_section_start_; - buffer_length_ = iter->second.second - offset_from_section_start_; - - // Read the header - ReadHeader(); - - // Figure out the real length from the end of the initial length to - // the end of the compilation unit, since that is the value we - // return. - uint64 ourlength = header_.length; - if (reader_->OffsetSize() == 8) - ourlength += 12; - else - ourlength += 4; - - // See if the user wants this compilation unit, and if not, just return. - if (!handler_->StartCompilationUnit(offset_from_section_start_, - reader_->AddressSize(), - reader_->OffsetSize(), - header_.length, - header_.version)) - return ourlength; - - // Otherwise, continue by reading our abbreviation entries. - ReadAbbrevs(); - - // Set the string section if we have one. - iter = sections_.find("__debug_str"); - if (iter != sections_.end()) { - string_buffer_ = iter->second.first; - string_buffer_length_ = iter->second.second; - } - - // Now that we have our abbreviations, start processing DIE's. - ProcessDIEs(); - - return ourlength; -} - -// If one really wanted, you could merge SkipAttribute and -// ProcessAttribute -// This is all boring data manipulation and calling of the handler. -const char* CompilationUnit::ProcessAttribute( - uint64 dieoffset, const char* start, enum DwarfAttribute attr, - enum DwarfForm form) { - size_t len; - - switch (form) { - // DW_FORM_indirect is never used because it is such a space - // waster. - case DW_FORM_indirect: - form = static_cast(reader_->ReadUnsignedLEB128(start, - &len)); - start += len; - return ProcessAttribute(dieoffset, start, attr, form); - break; - - case DW_FORM_data1: - case DW_FORM_flag: - case DW_FORM_ref1: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadOneByte(start)); - return start + 1; - break; - case DW_FORM_ref2: - case DW_FORM_data2: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadTwoBytes(start)); - return start + 2; - break; - case DW_FORM_ref4: - case DW_FORM_data4: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadFourBytes(start)); - return start + 4; - break; - case DW_FORM_ref8: - case DW_FORM_data8: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadEightBytes(start)); - return start + 8; - break; - case DW_FORM_string: { - const char* str = start; - handler_->ProcessAttributeString(dieoffset, attr, form, - str); - return start + strlen(str) + 1; - } - break; - case DW_FORM_udata: - case DW_FORM_ref_udata: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadUnsignedLEB128(start, - &len)); - return start + len; - break; - - case DW_FORM_sdata: - handler_->ProcessAttributeSigned(dieoffset, attr, form, - reader_->ReadSignedLEB128(start, &len)); - return start + len; - break; - case DW_FORM_addr: - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadAddress(start)); - return start + reader_->AddressSize(); - break; - case DW_FORM_ref_addr: - // DWARF2 and 3 differ on whether ref_addr is address size or - // offset size. - assert(header_.version == 2 || header_.version == 3); - if (header_.version == 2) { - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadAddress(start)); - return start + reader_->AddressSize(); - } else if (header_.version == 3) { - handler_->ProcessAttributeUnsigned(dieoffset, attr, form, - reader_->ReadOffset(start)); - return start + reader_->OffsetSize(); - } - break; - - case DW_FORM_block1: { - uint64 datalen = reader_->ReadOneByte(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 1, - datalen); - return start + 1 + datalen; - } - break; - case DW_FORM_block2: { - uint64 datalen = reader_->ReadTwoBytes(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 2, - datalen); - return start + 2 + datalen; - } - break; - case DW_FORM_block4: { - uint64 datalen = reader_->ReadFourBytes(start); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + 4, - datalen); - return start + 4 + datalen; - } - break; - case DW_FORM_block: { - uint64 datalen = reader_->ReadUnsignedLEB128(start, &len); - handler_->ProcessAttributeBuffer(dieoffset, attr, form, start + len, - datalen); - return start + datalen + len; - } - break; - case DW_FORM_strp: { - assert(string_buffer_ != NULL); - - const uint64 offset = reader_->ReadOffset(start); - assert(string_buffer_ + offset < string_buffer_ + string_buffer_length_); - - const char* str = string_buffer_ + offset; - handler_->ProcessAttributeString(dieoffset, attr, form, - str); - return start + reader_->OffsetSize(); - } - break; - default: - fprintf(stderr, "Unhandled form type"); - } - fprintf(stderr, "Unhandled form type"); - return NULL; -} - -const char* CompilationUnit::ProcessDIE(uint64 dieoffset, - const char* start, - const Abbrev& abbrev) { - for (AttributeList::const_iterator i = abbrev.attributes.begin(); - i != abbrev.attributes.end(); - i++) { - start = ProcessAttribute(dieoffset, start, i->first, i->second); - } - return start; -} - -void CompilationUnit::ProcessDIEs() { - const char* dieptr = after_header_; - size_t len; - - // lengthstart is the place the length field is based on. - // It is the point in the header after the initial length field - const char* lengthstart = buffer_; - - // In 64 bit dwarf, the initial length is 12 bytes, because of the - // 0xffffffff at the start. - if (reader_->OffsetSize() == 8) - lengthstart += 12; - else - lengthstart += 4; - - // we need semantics of boost scoped_ptr here - no intention of trasnferring - // ownership of the stack. use const, but then we limit ourselves to not - // ever being able to call .reset() on the smart pointer. - auto_ptr > const die_stack(new stack); - - while (dieptr < (lengthstart + header_.length)) { - // We give the user the absolute offset from the beginning of - // debug_info, since they need it to deal with ref_addr forms. - uint64 absolute_offset = (dieptr - buffer_) + offset_from_section_start_; - - uint64 abbrev_num = reader_->ReadUnsignedLEB128(dieptr, &len); - - dieptr += len; - - // Abbrev == 0 represents the end of a list of children. - if (abbrev_num == 0) { - const uint64 offset = die_stack->top(); - die_stack->pop(); - handler_->EndDIE(offset); - continue; - } - - const Abbrev& abbrev = abbrevs_->at(abbrev_num); - const enum DwarfTag tag = abbrev.tag; - if (!handler_->StartDIE(absolute_offset, tag, abbrev.attributes)) { - dieptr = SkipDIE(dieptr, abbrev); - } else { - dieptr = ProcessDIE(absolute_offset, dieptr, abbrev); - } - - if (abbrev.has_children) { - die_stack->push(absolute_offset); - } else { - handler_->EndDIE(absolute_offset); - } - } -} - -LineInfo::LineInfo(const char* buffer, uint64 buffer_length, - ByteReader* reader, LineInfoHandler* handler): - handler_(handler), reader_(reader), buffer_(buffer), - buffer_length_(buffer_length) { - header_.std_opcode_lengths = NULL; -} - -uint64 LineInfo::Start() { - ReadHeader(); - ReadLines(); - return after_header_ - buffer_; -} - -// The header for a debug_line section is mildly complicated, because -// the line info is very tightly encoded. -void LineInfo::ReadHeader() { - const char* lineptr = buffer_; - size_t initial_length_size; - - const uint64 initial_length = ReadInitialLength(lineptr, reader_, - &initial_length_size); - - lineptr += initial_length_size; - header_.total_length = initial_length; - assert(buffer_ + initial_length_size + header_.total_length <= - buffer_ + buffer_length_); - - // Address size *must* be set by CU ahead of time. - assert(reader_->AddressSize() != 0); - - header_.version = reader_->ReadTwoBytes(lineptr); - lineptr += 2; - - header_.prologue_length = reader_->ReadOffset(lineptr); - lineptr += reader_->OffsetSize(); - - header_.min_insn_length = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.default_is_stmt = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.line_base = *reinterpret_cast(lineptr); - lineptr += 1; - - header_.line_range = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.opcode_base = reader_->ReadOneByte(lineptr); - lineptr += 1; - - header_.std_opcode_lengths = new vector; - header_.std_opcode_lengths->resize(header_.opcode_base + 1); - (*header_.std_opcode_lengths)[0] = 0; - for (int i = 1; i < header_.opcode_base; i++) { - (*header_.std_opcode_lengths)[i] = reader_->ReadOneByte(lineptr); - lineptr += 1; - } - - // It is legal for the directory entry table to be empty. - if (*lineptr) { - uint32 dirindex = 1; - while (*lineptr) { - const char* dirname = lineptr; - handler_->DefineDir(dirname, dirindex); - lineptr += strlen(dirname) + 1; - dirindex++; - } - } - lineptr++; - - // It is also legal for the file entry table to be empty. - if (*lineptr) { - uint32 fileindex = 1; - size_t len; - while (*lineptr) { - const char* filename = lineptr; - lineptr += strlen(filename) + 1; - - uint64 dirindex = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - - uint64 mod_time = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - - uint64 filelength = reader_->ReadUnsignedLEB128(lineptr, &len); - lineptr += len; - handler_->DefineFile(filename, fileindex, dirindex, mod_time, - filelength); - fileindex++; - } - } - lineptr++; - - after_header_ = lineptr; -} - -/* static */ -bool LineInfo::ProcessOneOpcode(ByteReader* reader, - LineInfoHandler* handler, - const struct LineInfoHeader &header, - const char* start, - struct LineStateMachine* lsm, - size_t* len, - uintptr_t pc, - bool *lsm_passes_pc) { - size_t oplen = 0; - size_t templen; - uint8 opcode = reader->ReadOneByte(start); - oplen++; - start++; - - // If the opcode is great than the opcode_base, it is a special - // opcode. Most line programs consist mainly of special opcodes. - if (opcode >= header.opcode_base) { - opcode -= header.opcode_base; - const int64 advance_address = (opcode / header.line_range) - * header.min_insn_length; - const int64 advance_line = (opcode % header.line_range) - + header.line_base; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - lsm->line_num += advance_line; - lsm->basic_block = true; - *len = oplen; - return true; - } - - // Otherwise, we have the regular opcodes - switch (opcode) { - case DW_LNS_copy: { - lsm->basic_block = false; - *len = oplen; - return true; - } - - case DW_LNS_advance_pc: { - uint64 advance_address = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && lsm->address <= pc && - pc < lsm->address + header.min_insn_length * advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += header.min_insn_length * advance_address; - } - break; - case DW_LNS_advance_line: { - const int64 advance_line = reader->ReadSignedLEB128(start, &templen); - oplen += templen; - lsm->line_num += advance_line; - - // With gcc 4.2.1, we can get the line_no here for the first time - // since DW_LNS_advance_line is called after DW_LNE_set_address is - // called. So we check if the lsm passes "pc" here, not in - // DW_LNE_set_address. - if (lsm_passes_pc && lsm->address == pc) { - *lsm_passes_pc = true; - } - } - break; - case DW_LNS_set_file: { - const uint64 fileno = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - lsm->file_num = fileno; - } - break; - case DW_LNS_set_column: { - const uint64 colno = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - lsm->column_num = colno; - } - break; - case DW_LNS_negate_stmt: { - lsm->is_stmt = !lsm->is_stmt; - } - break; - case DW_LNS_set_basic_block: { - lsm->basic_block = true; - } - break; - case DW_LNS_fixed_advance_pc: { - const uint16 advance_address = reader->ReadTwoBytes(start); - oplen += 2; - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - } - break; - case DW_LNS_const_add_pc: { - const int64 advance_address = header.min_insn_length - * ((255 - header.opcode_base) - / header.line_range); - - // Check if the lsm passes "pc". If so, mark it as passed. - if (lsm_passes_pc && - lsm->address <= pc && pc < lsm->address + advance_address) { - *lsm_passes_pc = true; - } - - lsm->address += advance_address; - } - break; - case DW_LNS_extended_op: { - const size_t extended_op_len = reader->ReadUnsignedLEB128(start, - &templen); - start += templen; - oplen += templen + extended_op_len; - - const uint64 extended_op = reader->ReadOneByte(start); - start++; - - switch (extended_op) { - case DW_LNE_end_sequence: { - lsm->end_sequence = true; - *len = oplen; - return true; - } - break; - case DW_LNE_set_address: { - // With gcc 4.2.1, we cannot tell the line_no here since - // DW_LNE_set_address is called before DW_LNS_advance_line is - // called. So we do not check if the lsm passes "pc" here. See - // also the comment in DW_LNS_advance_line. - uint64 address = reader->ReadAddress(start); - lsm->address = address; - } - break; - case DW_LNE_define_file: { - const char* filename = start; - - templen = strlen(filename) + 1; - start += templen; - - uint64 dirindex = reader->ReadUnsignedLEB128(start, &templen); - oplen += templen; - - const uint64 mod_time = reader->ReadUnsignedLEB128(start, - &templen); - oplen += templen; - - const uint64 filelength = reader->ReadUnsignedLEB128(start, - &templen); - oplen += templen; - - if (handler) { - handler->DefineFile(filename, -1, dirindex, mod_time, - filelength); - } - } - break; - } - } - break; - - default: { - // Ignore unknown opcode silently - if (header.std_opcode_lengths) { - for (int i = 0; i < (*header.std_opcode_lengths)[opcode]; i++) { - size_t templen; - reader->ReadUnsignedLEB128(start, &templen); - start += templen; - oplen += templen; - } - } - } - break; - } - *len = oplen; - return false; -} - -void LineInfo::ReadLines() { - struct LineStateMachine lsm; - - // lengthstart is the place the length field is based on. - // It is the point in the header after the initial length field - const char* lengthstart = buffer_; - - // In 64 bit dwarf, the initial length is 12 bytes, because of the - // 0xffffffff at the start. - if (reader_->OffsetSize() == 8) - lengthstart += 12; - else - lengthstart += 4; - - const char* lineptr = after_header_; - while (lineptr < lengthstart + header_.total_length) { - lsm.Reset(header_.default_is_stmt); - while (!lsm.end_sequence) { - size_t oplength; - bool add_line = ProcessOneOpcode(reader_, handler_, header_, - lineptr, &lsm, &oplength, (uintptr_t)-1, NULL); - if (add_line) - handler_->AddLine(lsm.address, lsm.file_num, lsm.line_num, - lsm.column_num); - lineptr += oplength; - } - } - - after_header_ = lengthstart + header_.total_length; -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.h deleted file mode 100644 index f27cdac7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/dwarf2reader.h +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file contains definitions related to the DWARF2/3 reader and -// it's handler interfaces. -// The DWARF2/3 specification can be found at -// http://dwarf.freestandards.org and should be considered required -// reading if you wish to modify the implementation. -// Only a cursory attempt is made to explain terminology that is -// used here, as it is much better explained in the standard documents -#ifndef COMMON_MAC_DWARF_DWARF2READER_H__ -#define COMMON_MAC_DWARF_DWARF2READER_H__ - -#include -#include -#include -#include -#include - -#include "common/mac/dwarf/dwarf2enums.h" -#include "common/mac/dwarf/types.h" - -using namespace std; -using namespace __gnu_cxx; - -namespace dwarf2reader { -struct LineStateMachine; -class ByteReader; -class Dwarf2Handler; -class LineInfoHandler; - -// This maps from a string naming a section to a pair containing a -// the data for the section, and the size of the section. -typedef hash_map > SectionMap; -typedef list > AttributeList; -typedef AttributeList::iterator AttributeIterator; -typedef AttributeList::const_iterator ConstAttributeIterator; - -struct LineInfoHeader { - uint64 total_length; - uint16 version; - uint64 prologue_length; - uint8 min_insn_length; // insn stands for instructin - bool default_is_stmt; // stmt stands for statement - int8 line_base; - uint8 line_range; - uint8 opcode_base; - // Use a pointer so that signalsafe_addr2line is able to use this structure - // without heap allocation problem. - vector *std_opcode_lengths; -}; - -class LineInfo { - public: - - // Initializes a .debug_line reader. Buffer and buffer length point - // to the beginning and length of the line information to read. - // Reader is a ByteReader class that has the endianness set - // properly. - LineInfo(const char* buffer_, uint64 buffer_length, - ByteReader* reader, LineInfoHandler* handler); - - virtual ~LineInfo() { - if (header_.std_opcode_lengths) { - delete header_.std_opcode_lengths; - } - } - - // Start processing line info, and calling callbacks in the handler. - // Consumes the line number information for a single compilation unit. - // Returns the number of bytes processed. - uint64 Start(); - - // Process a single line info opcode at START using the state - // machine at LSM. Return true if we should define a line using the - // current state of the line state machine. Place the length of the - // opcode in LEN. - // If LSM_PASSES_PC is non-NULL, this function also checks if the lsm - // passes the address of PC. In other words, LSM_PASSES_PC will be - // set to true, if the following condition is met. - // - // lsm's old address < PC <= lsm's new address - static bool ProcessOneOpcode(ByteReader* reader, - LineInfoHandler* handler, - const struct LineInfoHeader &header, - const char* start, - struct LineStateMachine* lsm, - size_t* len, - uintptr_t pc, - bool *lsm_passes_pc); - - private: - // Reads the DWARF2/3 header for this line info. - void ReadHeader(); - - // Reads the DWARF2/3 line information - void ReadLines(); - - // The associated handler to call processing functions in - LineInfoHandler* handler_; - - // The associated ByteReader that handles endianness issues for us - ByteReader* reader_; - - // A DWARF2/3 line info header. This is not the same size as - // in the actual file, as the one in the file may have a 32 bit or - // 64 bit lengths - - struct LineInfoHeader header_; - - // buffer is the buffer for our line info, starting at exactly where - // the line info to read is. after_header is the place right after - // the end of the line information header. - const char* buffer_; - uint64 buffer_length_; - const char* after_header_; -}; - -// This class is the main interface between the line info reader and -// the client. The virtual functions inside this get called for -// interesting events that happen during line info reading. The -// default implementation does nothing - -class LineInfoHandler { - public: - LineInfoHandler() { } - - virtual ~LineInfoHandler() { } - - // Called when we define a directory. NAME is the directory name, - // DIR_NUM is the directory number - virtual void DefineDir(const string& name, uint32 dir_num) { } - - // Called when we define a filename. NAME is the filename, FILE_NUM - // is the file number which is -1 if the file index is the next - // index after the last numbered index (this happens when files are - // dynamically defined by the line program), DIR_NUM is the - // directory index for the directory name of this file, MOD_TIME is - // the modification time of the file, and LENGTH is the length of - // the file - virtual void DefineFile(const string& name, int32 file_num, - uint32 dir_num, uint64 mod_time, - uint64 length) { } - - // Called when the line info reader has a new line, address pair - // ready for us. ADDRESS is the address of the code, FILE_NUM is - // the file number containing the code, LINE_NUM is the line number in - // that file for the code, and COLUMN_NUM is the column number the code - // starts at, if we know it (0 otherwise). - virtual void AddLine(uint64 address, uint32 file_num, uint32 line_num, - uint32 column_num) { } -}; - -// The base of DWARF2/3 debug info is a DIE (Debugging Information -// Entry. -// DWARF groups DIE's into a tree and calls the root of this tree a -// "compilation unit". Most of the time, their is one compilation -// unit in the .debug_info section for each file that had debug info -// generated. -// Each DIE consists of - -// 1. a tag specifying a thing that is being described (ie -// DW_TAG_subprogram for functions, DW_TAG_variable for variables, etc -// 2. attributes (such as DW_AT_location for location in memory, -// DW_AT_name for name), and data for each attribute. -// 3. A flag saying whether the DIE has children or not - -// In order to gain some amount of compression, the format of -// each DIE (tag name, attributes and data forms for the attributes) -// are stored in a separate table called the "abbreviation table". -// This is done because a large number of DIEs have the exact same tag -// and list of attributes, but different data for those attributes. -// As a result, the .debug_info section is just a stream of data, and -// requires reading of the .debug_abbrev section to say what the data -// means. - -// As a warning to the user, it should be noted that the reason for -// using absolute offsets from the beginning of .debug_info is that -// DWARF2/3 support referencing DIE's from other DIE's by their offset -// from either the current compilation unit start, *or* the beginning -// of the .debug_info section. This means it is possible to reference -// a DIE in one compilation unit from a DIE in another compilation -// unit. This style of reference is usually used to eliminate -// duplicated information that occurs across compilation -// units, such as base types, etc. GCC 3.4+ support this with -// -feliminate-dwarf2-dups. Other toolchains will sometimes do -// duplicate elimination in the linker. - -class CompilationUnit { - public: - - // Initialize a compilation unit. This requires a map of sections, - // the offset of this compilation unit in the debug_info section, a - // ByteReader, and a Dwarf2Handler class to call callbacks in. - CompilationUnit(const SectionMap& sections, uint64 offset, - ByteReader* reader, Dwarf2Handler* handler); - virtual ~CompilationUnit() { - if (abbrevs_) delete abbrevs_; - } - - // Begin reading a Dwarf2 compilation unit, and calling the - // callbacks in the Dwarf2Handler - // Return the offset of the end of the compilation unit - the passed - // in offset. - uint64 Start(); - - private: - - // This struct represents a single DWARF2/3 abbreviation - // The abbreviation tells how to read a DWARF2/3 DIE, and consist of a - // tag and a list of attributes, as well as the data form of each attribute. - struct Abbrev { - uint32 number; - enum DwarfTag tag; - bool has_children; - AttributeList attributes; - }; - - // A DWARF2/3 compilation unit header. This is not the same size as - // in the actual file, as the one in the file may have a 32 bit or - // 64 bit length. - struct CompilationUnitHeader { - uint64 length; - uint16 version; - uint64 abbrev_offset; - uint8 address_size; - } header_; - - // Reads the DWARF2/3 header for this compilation unit. - void ReadHeader(); - - // Reads the DWARF2/3 abbreviations for this compilation unit - void ReadAbbrevs(); - - // Processes a single DIE for this compilation unit and return a new - // pointer just past the end of it - const char* ProcessDIE(uint64 dieoffset, - const char* start, - const Abbrev& abbrev); - - // Processes a single attribute and return a new pointer just past the - // end of it - const char* ProcessAttribute(uint64 dieoffset, - const char* start, - enum DwarfAttribute attr, - enum DwarfForm form); - - // Processes all DIEs for this compilation unit - void ProcessDIEs(); - - // Skips the die with attributes specified in ABBREV starting at - // START, and return the new place to position the stream to. - const char* SkipDIE(const char* start, - const Abbrev& abbrev); - - // Skips the attribute starting at START, with FORM, and return the - // new place to position the stream to. - const char* SkipAttribute(const char* start, - enum DwarfForm form); - - // Offset from section start is the offset of this compilation unit - // from the beginning of the .debug_info section. - uint64 offset_from_section_start_; - - // buffer is the buffer for our CU, starting at .debug_info + offset - // passed in from constructor. - // after_header points to right after the compilation unit header. - const char* buffer_; - uint64 buffer_length_; - const char* after_header_; - - // The associated ByteReader that handles endianness issues for us - ByteReader* reader_; - - // The map of sections in our file to buffers containing their data - const SectionMap& sections_; - - // The associated handler to call processing functions in - Dwarf2Handler* handler_; - - // Set of DWARF2/3 abbreviations for this compilation unit. Indexed - // by abbreviation number, which means that abbrevs_[0] is not - // valid. - vector* abbrevs_; - - // String section buffer and length, if we have a string section. - // This is here to avoid doing a section lookup for strings in - // ProcessAttribute, which is in the hot path for DWARF2 reading. - const char* string_buffer_; - uint64 string_buffer_length_; -}; - -// This class is the main interface between the reader and the -// client. The virtual functions inside this get called for -// interesting events that happen during DWARF2 reading. -// The default implementation skips everything. - -class Dwarf2Handler { - public: - Dwarf2Handler() { } - - virtual ~Dwarf2Handler() { } - - // Start to process a compilation unit at OFFSET from the beginning of the - // debug_info section. Return false if you would like - // to skip this compilation unit. - virtual bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version) { return false; } - - // Start to process a DIE at OFFSET from the beginning of the - // debug_info section. Return false if you would like to skip this - // DIE. - virtual bool StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { return false; } - - // Called when we have an attribute with unsigned data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { } - - // Called when we have an attribute with signed data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeSigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - int64 data) { } - - // Called when we have an attribute with a buffer of data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA, and the - // length of the buffer is LENGTH. The buffer is owned by the - // caller, not the callee, and may not persist for very long. If - // you want the data to be available later, it needs to be copied. - virtual void ProcessAttributeBuffer(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const char* data, - uint64 len) { } - - // Called when we have an attribute with string data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string& data) { } - - // Called when finished processing the DIE at OFFSET. - // Because DWARF2/3 specifies a tree of DIEs, you may get starts - // before ends of the previous DIE, as we process children before - // ending the parent. - virtual void EndDIE(uint64 offset) { } - -}; - - -} // namespace dwarf2reader - -#endif // UTIL_DEBUGINFO_DWARF2READER_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.cc b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.cc deleted file mode 100644 index b6d3f0fe..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.cc +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This is a client for the dwarf2reader to extract function and line -// information from the debug info. - -#include -#include -#include - - -#include "common/mac/dwarf/functioninfo.h" - -#include "common/mac/dwarf/bytereader.h" - - -namespace __gnu_cxx -{ - template<> - struct hash - { - size_t operator()(const std::string& k) const; - }; -} - - -namespace dwarf2reader { - -// Given an offset value, its form, and the base offset of the -// compilation unit containing this value, return an absolute offset -// within the .debug_info section. -uint64 GetAbsoluteOffset(uint64 offset, - enum DwarfForm form, - uint64 compilation_unit_base) { - switch (form) { - case DW_FORM_ref1: - case DW_FORM_ref2: - case DW_FORM_ref4: - case DW_FORM_ref8: - case DW_FORM_ref_udata: - return offset + compilation_unit_base; - case DW_FORM_ref_addr: - default: - return offset; - } -} - -CULineInfoHandler::CULineInfoHandler(vector* files, - vector* dirs, - LineMap* linemap):linemap_(linemap), - files_(files), - dirs_(dirs) { - // The dirs and files are 1 indexed, so just make sure we put - // nothing in the 0 vector. - assert(dirs->size() == 0); - assert(files->size() == 0); - dirs->push_back(""); - SourceFileInfo s; - s.name = ""; - s.lowpc = ULLONG_MAX; - files->push_back(s); -} - -void CULineInfoHandler::DefineDir(const string& name, uint32 dir_num) { - // These should never come out of order, actually - assert(dir_num == dirs_->size()); - dirs_->push_back(name); -} - -void CULineInfoHandler::DefineFile(const string& name, - int32 file_num, uint32 dir_num, - uint64 mod_time, uint64 length) { - assert(dir_num >= 0); - assert(dir_num < dirs_->size()); - - // These should never come out of order, actually. - if (file_num == (int32)files_->size() || file_num == -1) { - string dir = dirs_->at(dir_num); - - SourceFileInfo s; - s.lowpc = ULLONG_MAX; - - if (dir == "") { - s.name = name; - } else { - s.name = dir + "/" + name; - } - - files_->push_back(s); - } else { - fprintf(stderr, "error in DefineFile"); - } -} - -void CULineInfoHandler::AddLine(uint64 address, uint32 file_num, - uint32 line_num, uint32 column_num) { - if (file_num < files_->size()) { - linemap_->insert(make_pair(address, make_pair(files_->at(file_num).name.c_str(), - line_num))); - - if(address < files_->at(file_num).lowpc) { - files_->at(file_num).lowpc = address; - } - } else { - fprintf(stderr,"error in AddLine"); - } -} - -bool CUFunctionInfoHandler::StartCompilationUnit(uint64 offset, - uint8 address_size, - uint8 offset_size, - uint64 cu_length, - uint8 dwarf_version) { - current_compilation_unit_offset_ = offset; - return true; -} - - -// For function info, we only care about subprograms and inlined -// subroutines. For line info, the DW_AT_stmt_list lives in the -// compile unit tag. - -bool CUFunctionInfoHandler::StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs) { - switch (tag) { - case DW_TAG_subprogram: - case DW_TAG_inlined_subroutine: { - current_function_info_ = new FunctionInfo; - current_function_info_->lowpc = current_function_info_->highpc = 0; - current_function_info_->name = ""; - current_function_info_->line = 0; - current_function_info_->file = ""; - offset_to_funcinfo_->insert(make_pair(offset, current_function_info_)); - }; - // FALLTHROUGH - case DW_TAG_compile_unit: - return true; - default: - return false; - } - return false; -} - -// Only care about the name attribute for functions - -void CUFunctionInfoHandler::ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string &data) { - if (current_function_info_) { - if (attr == DW_AT_name) - current_function_info_->name = data; - else if(attr == DW_AT_MIPS_linkage_name) - current_function_info_->mangled_name = data; - } -} - -void CUFunctionInfoHandler::ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data) { - if (attr == DW_AT_stmt_list) { - SectionMap::const_iterator iter = sections_.find("__debug_line"); - assert(iter != sections_.end()); - - // this should be a scoped_ptr but we dont' use boost :-( - auto_ptr lireader(new LineInfo(iter->second.first + data, - iter->second.second - data, - reader_, linehandler_)); - lireader->Start(); - } else if (current_function_info_) { - switch (attr) { - case DW_AT_low_pc: - current_function_info_->lowpc = data; - break; - case DW_AT_high_pc: - current_function_info_->highpc = data; - break; - case DW_AT_decl_line: - current_function_info_->line = data; - break; - case DW_AT_decl_file: - current_function_info_->file = files_->at(data).name; - break; - case DW_AT_specification: { - // Some functions have a "specification" attribute - // which means they were defined elsewhere. The name - // attribute is not repeated, and must be taken from - // the specification DIE. Here we'll assume that - // any DIE referenced in this manner will already have - // been seen, but that's not really required by the spec. - uint64 abs_offset = GetAbsoluteOffset(data, form, current_compilation_unit_offset_); - FunctionMap::iterator iter = offset_to_funcinfo_->find(abs_offset); - if (iter != offset_to_funcinfo_->end()) { - current_function_info_->name = iter->second->name; - current_function_info_->mangled_name = iter->second->mangled_name; - } else { - // If you hit this, this code probably needs to be rewritten. - fprintf(stderr, "Error: DW_AT_specification was seen before the referenced DIE! (Looking for DIE at offset %08llx, in DIE at offset %08llx)\n", abs_offset, offset); - } - break; - } - default: - break; - } - } -} - -void CUFunctionInfoHandler::EndDIE(uint64 offset) { - if (current_function_info_ && current_function_info_->lowpc) - address_to_funcinfo_->insert(make_pair(current_function_info_->lowpc, - current_function_info_)); -} - -} // namespace dwarf2reader diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.h deleted file mode 100644 index 130f182e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/functioninfo.h +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2006 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// This file contains the definitions for a DWARF2/3 information -// collector that uses the DWARF2/3 reader interface to build a mapping -// of addresses to files, lines, and functions. - -#ifndef COMMON_MAC_DWARF_FUNCTIONINFO_H__ -#define COMMON_MAC_DWARF_FUNCTIONINFO_H__ - -#include -#include -#include -#include - -#include "common/mac/dwarf/dwarf2reader.h" - - -namespace dwarf2reader { - -struct FunctionInfo { - // Name of the function - string name; - // Mangled name of the function - string mangled_name; - // File containing this function - string file; - // Line number for start of function. - uint32 line; - // Beginning address for this function - uint64 lowpc; - // End address for this function. - uint64 highpc; -}; - -struct SourceFileInfo { - // Name of the source file name - string name; - // Low address of source file name - uint64 lowpc; -}; - -typedef map FunctionMap; -typedef map > LineMap; - -// This class is a basic line info handler that fills in the dirs, -// file, and linemap passed into it with the data produced from the -// LineInfoHandler. -class CULineInfoHandler: public LineInfoHandler { - public: - - // - CULineInfoHandler(vector* files, - vector* dirs, - LineMap* linemap); - virtual ~CULineInfoHandler() { } - - // Called when we define a directory. We just place NAME into dirs_ - // at position DIR_NUM. - virtual void DefineDir(const string& name, uint32 dir_num); - - // Called when we define a filename. We just place - // concat(dirs_[DIR_NUM], NAME) into files_ at position FILE_NUM. - virtual void DefineFile(const string& name, int32 file_num, - uint32 dir_num, uint64 mod_time, uint64 length); - - - // Called when the line info reader has a new line, address pair - // ready for us. ADDRESS is the address of the code, FILE_NUM is - // the file number containing the code, LINE_NUM is the line number - // in that file for the code, and COLUMN_NUM is the column number - // the code starts at, if we know it (0 otherwise). - virtual void AddLine(uint64 address, uint32 file_num, uint32 line_num, - uint32 column_num); - - - private: - LineMap* linemap_; - vector* files_; - vector* dirs_; -}; - -class CUFunctionInfoHandler: public Dwarf2Handler { - public: - CUFunctionInfoHandler(vector* files, - vector* dirs, - LineMap* linemap, - FunctionMap* offset_to_funcinfo, - FunctionMap* address_to_funcinfo, - CULineInfoHandler* linehandler, - const SectionMap& sections, - ByteReader* reader) - : files_(files), dirs_(dirs), linemap_(linemap), - offset_to_funcinfo_(offset_to_funcinfo), - address_to_funcinfo_(address_to_funcinfo), - linehandler_(linehandler), sections_(sections), - reader_(reader), current_function_info_(NULL) { } - - virtual ~CUFunctionInfoHandler() { } - - // Start to process a compilation unit at OFFSET from the beginning of the - // debug_info section. We want to see all compilation units, so we - // always return true. - - virtual bool StartCompilationUnit(uint64 offset, uint8 address_size, - uint8 offset_size, uint64 cu_length, - uint8 dwarf_version); - - // Start to process a DIE at OFFSET from the beginning of the - // debug_info section. We only care about function related DIE's. - virtual bool StartDIE(uint64 offset, enum DwarfTag tag, - const AttributeList& attrs); - - // Called when we have an attribute with unsigned data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeUnsigned(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - uint64 data); - - // Called when we have an attribute with string data to give to - // our handler. The attribute is for the DIE at OFFSET from the - // beginning of compilation unit, has a name of ATTR, a form of - // FORM, and the actual data of the attribute is in DATA. - virtual void ProcessAttributeString(uint64 offset, - enum DwarfAttribute attr, - enum DwarfForm form, - const string& data); - - // Called when finished processing the DIE at OFFSET. - // Because DWARF2/3 specifies a tree of DIEs, you may get starts - // before ends of the previous DIE, as we process children before - // ending the parent. - virtual void EndDIE(uint64 offset); - - private: - vector* files_; - vector* dirs_; - LineMap* linemap_; - FunctionMap* offset_to_funcinfo_; - FunctionMap* address_to_funcinfo_; - CULineInfoHandler* linehandler_; - const SectionMap& sections_; - ByteReader* reader_; - FunctionInfo* current_function_info_; - uint64 current_compilation_unit_offset_; -}; - -} // namespace dwarf2reader -#endif // COMMON_MAC_DWARF_FUNCTIONINFO_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/line_state_machine.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/line_state_machine.h deleted file mode 100644 index 4ba98f74..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/line_state_machine.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2008 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -#ifndef COMMON_MAC_DWARF_LINE_STATE_MACHINE_H__ -#define COMMON_MAC_DWARF_LINE_STATE_MACHINE_H__ - -namespace dwarf2reader { - -// This is the format of a DWARF2/3 line state machine that we process -// opcodes using. There is no need for anything outside the lineinfo -// processor to know how this works. -struct LineStateMachine { - void Reset(bool default_is_stmt) { - file_num = 1; - address = 0; - line_num = 1; - column_num = 0; - is_stmt = default_is_stmt; - basic_block = false; - end_sequence = false; - } - - uint32 file_num; - uint64 address; - uint64 line_num; - uint32 column_num; - bool is_stmt; // stmt means statement. - bool basic_block; - bool end_sequence; -}; - -} // namespace dwarf2reader - - -#endif // COMMON_MAC_DWARF_LINE_STATE_MACHINE_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/types.h b/thirdparty/google-breakpad/r318/src/common/mac/dwarf/types.h deleted file mode 100644 index 76541597..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/dwarf/types.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2008 Google, Inc. All Rights reserved -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// This file contains some typedefs for basic types - - -#ifndef _COMMON_MAC_DWARF_TYPES_H__ -#define _COMMON_MAC_DWARF_TYPES_H__ - -typedef signed char int8; -typedef short int16; -typedef int int32; -typedef long long int64; - -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef unsigned long long uint64; - -#endif // _COMMON_MAC_DWARF_TYPES_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.h deleted file mode 100644 index 83482e92..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.h +++ /dev/null @@ -1,380 +0,0 @@ -// -// GTMCarbonEvent.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import - -#import "GTMDefines.h" - -@class GTMCarbonEventHandler; - -// Objective C wrapper for a Carbon Event -@interface GTMCarbonEvent : NSObject { - @private - EventRef event_; //Event we are wrapping. STRONG -} - - -// Create an event of class |inClass| and kind |inKind| -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)eventWithClass:(UInt32)inClass kind:(UInt32)kind; - -// Create an event based on |event|. Retains |event|. -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)eventWithEvent:(EventRef)event; - -// Create an event based on the event currently being handled. -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)currentEvent; - -// Create an event of class |inClass| and kind |inKind| -// -// Returns: -// GTMCarbonEvent -// -- (id)initWithClass:(UInt32)inClass kind:(UInt32)kind; - -// Create an event based on |event|. Retains |event|. -// -// Returns: -// GTMCarbonEvent -// -- (id)initWithEvent:(EventRef)event; - -// Get the event's class. -// -// Returns: -// event class -// -- (UInt32)eventClass; - -// Get the event's kind. -// -// Returns: -// event kind -// -- (UInt32)eventKind; - -// Set the event's time. -// -// Arguments: -// time - the time you want associated with the event -// -- (void)setTime:(EventTime)eventTime; - -// Get the event's time. -// -// Returns: -// the time associated with the event -// -- (EventTime)time; - -// Get the event's eventref for passing to other carbon functions. -// -// Returns: -// the event ref associated with the event -// -- (EventRef)event; - -// Sets (or adds) a parameter to an event. Try not to use this function -// directly. Look at the PARAM_TEMPLATE_DECL/DEFN macros below. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// size - the size of the data that |data| points to. -// data - pointer to the data you want to set the parameter to. -// -- (void)setParameterNamed:(EventParamName)name - type:(EventParamType)type - size:(ByteCount)size - data:(const void *)data; - - -// Gets a parameter from an event. Try not to use this function -// directly. Look at the PARAM_TEMPLATE_DECL/DEFN macros below. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// size - the size of the data that |data| points to. -// data - pointer to the buffer that you want to fill with your data. -// -// Returns: -// YES is parameter is retrieved successfully. NO if parameter doesn't exist. -// -- (BOOL)getParameterNamed:(EventParamName)name - type:(EventParamType)type - size:(ByteCount)size - data:(void *)data; - -// Gets a the size of a parameter from an event. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// -// Returns: -// The size of the buffer required to hold the parameter. 0 if parameter -// doesn't exist. -// -- (ByteCount)sizeOfParameterNamed:(EventParamName)name - type:(EventParamType)type; - -// Sends event to an event target with options -// -// Arguments: -// target - target to send event to. -// options - options to send event. See SendEventToEventTargetWithOptions -// for details. -// -// Returns: -// OSStatus value. -// -- (OSStatus)sendToTarget:(GTMCarbonEventHandler *)target - options:(OptionBits)options; - -// Post event to an event queue. -// -// Arguments: -// queue - queue to post it to. -// priority - priority to post it with -// -// Returns: -// OSStatus value. -// -- (OSStatus)postToQueue:(EventQueueRef)queue priority:(EventPriority)priority; - -// Post event to current queue with standard priority. -// -- (void)postToCurrentQueue; - -// Post event to main queue with standard priority. -// -- (void)postToMainQueue; - -@end - -// Macros for defining simple set/get parameter methods for GTMCarbonEvent. See -// the category GTMCarbonEvent (GTMCarbonEventGettersAndSetters) for an example -// of their use. GTM_PARAM_TEMPLATE_DECL2/DEFN2 is for the case where the -// parameter name is different than the parameter type (rare, but it does -// occur...e.g. for a Rect, the name is typeQDRectangle, and the type is Rect, -// so it would be GTM_PARAM_TEMPLATE_DECL2(QDRectangle, Rect) ). In most cases -// you will just use GTM_PARAM_TEMPLATE_DECL/DEFN. -#define GTM_PARAM_TEMPLATE_DECL2(paramName, paramType) \ -- (void)set##paramName##ParameterNamed:(EventParamName)name data:(paramType *)data; \ -- (BOOL)get##paramName##ParameterNamed:(EventParamName)name data:(paramType *)data; - -#define GTM_PARAM_TEMPLATE_DEFN2(paramName, paramType) \ -- (void)set##paramName##ParameterNamed:(EventParamName)name data:(paramType *)data { \ -[self setParameterNamed:name type:type##paramName size:sizeof(paramType) data:data]; \ -} \ -- (BOOL)get##paramName##ParameterNamed:(EventParamName)name data:(paramType *)data { \ -return [self getParameterNamed:name type:type##paramName size:sizeof(paramType) data:data]; \ -} - -#define GTM_PARAM_TEMPLATE_DECL(paramType) GTM_PARAM_TEMPLATE_DECL2(paramType, paramType) -#define GTM_PARAM_TEMPLATE_DEFN(paramType) GTM_PARAM_TEMPLATE_DEFN2(paramType, paramType) - - -// Category defining some basic types that we want to be able to easily set and -// get from GTMCarbonEvents -@interface GTMCarbonEvent (GTMCarbonEventGettersAndSetters) -GTM_PARAM_TEMPLATE_DECL(UInt32) -GTM_PARAM_TEMPLATE_DECL(EventHotKeyID) -@end - -// Utility function for converting between modifier types -// Arguments: -// inCocoaModifiers - keyboard modifiers in carbon form -// (NSCommandKeyMask etc) -// Returns: -// Carbon modifiers equivalent to |inCocoaModifiers| (cmdKey etc) -GTM_EXTERN UInt32 GTMCocoaToCarbonKeyModifiers(NSUInteger inCocoaModifiers); - -// Utility function for converting between modifier types -// Arguments: -// inCarbonModifiers - keyboard modifiers in carbon form (cmdKey etc) -// Returns: -// cocoa modifiers equivalent to |inCocoaModifiers| (NSCommandKeyMask etc) -GTM_EXTERN NSUInteger GTMCarbonToCocoaKeyModifiers(UInt32 inCarbonModifiers); - -// An "abstract" superclass for objects that handle events such as -// menus, HIObjects, etc. -// -// Subclasses are expected to override the eventTarget and -// handleEvent:handler: methods to customize them. -@interface GTMCarbonEventHandler : NSObject { - @private - // handler we are wrapping - // lazily created in the eventHandler method - EventHandlerRef eventHandler_; - __weak id delegate_; // Our delegate - // Does our delegate respond to the gtm_eventHandler:receivedEvent:handler: - // selector? Cached for performance reasons. - BOOL delegateRespondsToHandleEvent_; -} - -// Registers the event handler to listen for |events|. -// -// Arguments: -// events - an array of EventTypeSpec. The events to register for. -// count - the number of EventTypeSpecs in events. -// -- (void)registerForEvents:(const EventTypeSpec *)events count:(size_t)count; - -// Causes the event handler to stop listening for |events|. -// -// Arguments: -// events - an array of EventTypeSpec. The events to register for. -// count - the number of EventTypeSpecs in events. -// -- (void)unregisterForEvents:(const EventTypeSpec *)events count:(size_t)count; - -// To be overridden by subclasses to respond to events. -// -// All subclasses should call [super handleEvent:handler:] if they -// don't handle the event themselves. -// -// Arguments: -// event - the event to be handled -// handler - the call ref in case you want to call CallNextEventHandler -// in your method -// Returns: -// OSStatus - usually either noErr or eventNotHandledErr -// -- (OSStatus)handleEvent:(GTMCarbonEvent *)event - handler:(EventHandlerCallRef)handler; - -// To be overridden by subclasses to return the event target for the class. -// GTMCarbonEventHandler's implementation returns NULL. -// -// Returns: -// The event target ref. -// -- (EventTargetRef)eventTarget; - -// Gets the underlying EventHandlerRef for that this class wraps. -// -// Returns: -// The EventHandlerRef this class wraps. -// -- (EventHandlerRef)eventHandler; - -// Gets the delegate for the handler -// -// Returns: -// the delegate -- (id)delegate; - -// Sets the delegate for the handler -// -// Arguments: -// delegate - the delegate to set to -- (void)setDelegate:(id)delegate; - -@end - -// Category for methods that a delegate of GTMCarbonEventHandlerDelegate may -// want to implement. -@interface NSObject (GTMCarbonEventHandlerDelegate) - -// If a delegate implements this method it gets called before every event -// that the handler gets sent. If it returns anything but eventNotHandledErr, -// the handlers handlerEvent:handler: method will not be called, and -// the return value returned by the delegate will be returned back to the -// carbon event dispatch system. This allows you to override any method -// that a handler may implement. -// -// Arguments: -// delegate - the delegate to set to -// -- (OSStatus)gtm_eventHandler:(GTMCarbonEventHandler *)sender - receivedEvent:(GTMCarbonEvent *)event - handler:(EventHandlerCallRef)handler; - -@end - -// A general OSType for use when setting properties on GTMCarbonEvent objects. -// This is the "signature" as part of commandIDs, controlsIDs, and properties. -// 'GooG' -GTM_EXTERN const OSType kGTMCarbonFrameworkSignature; - -// An event handler class representing the event monitor event handler -// -// there is only one of these per application. This way you can put -// event handlers directly on the dispatcher if necessary. -@interface GTMCarbonEventMonitorHandler : GTMCarbonEventHandler -// Accessor to get the GTMCarbonEventMonitorHandler singleton. -// -// Returns: -// pointer to the GTMCarbonEventMonitorHandler singleton. -+ (GTMCarbonEventMonitorHandler *)sharedEventMonitorHandler; -@end - -// An event handler class representing the toolbox dispatcher event handler -// -// there is only one of these per application. This way you can put -// event handlers directly on the dispatcher if necessary. -@interface GTMCarbonEventDispatcherHandler : GTMCarbonEventHandler { - @private - NSMutableDictionary *hotkeys_; // Collection of registered hotkeys -} - -// Accessor to get the GTMCarbonEventDispatcherHandler singleton. -// -// Returns: -// pointer to the GTMCarbonEventDispatcherHandler singleton. -+ (GTMCarbonEventDispatcherHandler *)sharedEventDispatcherHandler; - -// Registers a hotkey. When the hotkey is executed by the user, target will be -// called with selector. -// Arguments: -// keyCode - the virtual keycode of the hotkey -// cocoaModifiers - the modifiers that need to be used with |keyCode|. NB -// that these are cocoa modifiers, so NSCommandKeyMask etc. -// target - instance that will get |action| called when the hotkey fires -// action - the method to call on |target| when the hotkey fires -// onPress - is YES, the hotkey fires on the keydown (usual) otherwise -// it fires on the key up. -// Returns: -// a EventHotKeyRef that you can use with other Carbon functions, or for -// unregistering the hotkey. Note that all hotkeys are unregistered -// automatically when an app quits. Will be NULL on failure. -- (EventHotKeyRef)registerHotKey:(NSUInteger)keyCode - modifiers:(NSUInteger)cocoaModifiers - target:(id)target - action:(SEL)action - whenPressed:(BOOL)onPress; - -// Unregisters a hotkey previously registered with registerHotKey. -// Arguments: -// keyRef - the EventHotKeyRef to unregister -- (void)unregisterHotKey:(EventHotKeyRef)keyRef; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.m deleted file mode 100644 index 16c46c83..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEvent.m +++ /dev/null @@ -1,710 +0,0 @@ -// -// GTMCarbonEvent.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMCarbonEvent.h" -#import "GTMObjectSingleton.h" -#import "GTMDebugSelectorValidation.h" - -// Wrapper for all the info we need about a hotkey that we can store in a -// Foundation storage class. We expecct selector to have this signature: -// - (void)hitHotKey:sender; -@interface GTMCarbonHotKey : NSObject { - @private - EventHotKeyID id_; // EventHotKeyID for this hotkey. - id target_; // Object we are going to call when the hotkey is hit - SEL selector_; // Selector we are going to call on target_ - BOOL onKeyDown_; // Do we do it on key down or on key up? -} - -// Create a HotKey record -// Arguments: -// keyID - id of the hotkey -// target - object we are going to call when the hotkey is hit -// action - selector we are going to call on target -// whenPressed - do we do it on key down or key up? -// Returns: -// a hotkey record, or nil on failure -- (id)initWithHotKey:(EventHotKeyID)keyID - target:(id)target - action:(SEL)selector - whenPressed:(BOOL)onKeyDown; - -// Does this record match key |keyID| -// Arguments: -// keyID - the id to match against -// Returns: -// Yes if we match this key id -- (BOOL)matchesHotKeyID:(EventHotKeyID)keyID; - -// Make target perform selector -// Returns: -// Yes if handled -- (BOOL)sendAction:(id)sender; - -// Do we do it on key down or key up? -// Returns: -// Yes if on keydown -- (BOOL)onKeyDown; - -@end - -@implementation GTMCarbonEvent - -// Create an event of class |inClass| and kind |inKind| -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)eventWithClass:(UInt32)inClass kind:(UInt32)kind { - return [[[[self class] alloc] initWithClass:inClass kind:kind] autorelease]; -} - - -// Create an event based on |event|. Retains |event|. -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)eventWithEvent:(EventRef)event { - return [[[[self class] alloc] initWithEvent:event] autorelease]; -} - - -// Create an event based on the event currently being handled. -// -// Returns: -// Autoreleased GTMCarbonEvent -// -+ (id)currentEvent { - return [[self class] eventWithEvent:GetCurrentEvent()]; -} - - -// Create an event of class |inClass| and kind |inKind| -// -// Returns: -// GTMCarbonEvent -// -- (id)initWithClass:(UInt32)inClass kind:(UInt32)kind { - if ((self = [super init])) { - verify_noerr(CreateEvent(kCFAllocatorDefault, inClass, kind, - 0, kEventAttributeNone, &event_)); - } - return self; -} - - -// Create an event based on |event|. Retains |event|. -// -// Returns: -// GTMCarbonEvent -// -- (id)initWithEvent:(EventRef)event { - if ((self = [super init])) { - if (event) { - event_ = RetainEvent(event); - } - } - return self; -} - - -// This does a proper event copy, but ignores the |zone|. No way to do a copy -// of an event into a specific zone. -// -// Arguments: -// zone - the zone to copy to -// Returns: -// the copied event. nil on failure -- (id)copyWithZone:(NSZone *)zone { - GTMCarbonEvent *carbonEvent = nil; - EventRef newEvent = CopyEvent([self event]); - if (newEvent) { - carbonEvent = [[[self class] allocWithZone:zone] initWithEvent:newEvent]; - ReleaseEvent(newEvent); - } - return carbonEvent; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - if (event_) { - ReleaseEvent(event_); - event_ = NULL; - } - [super finalize]; -} -#endif - -// releases our retained event -// -- (void)dealloc { - if (event_) { - ReleaseEvent(event_); - event_ = NULL; - } - [super dealloc]; -} - -// description utliity for debugging -// -- (NSString *)description { - char cls[5]; - UInt32 kind; - - // Need everything bigendian if we are printing out the class as a "string" - *((UInt32 *)cls) = CFSwapInt32HostToBig([self eventClass]); - kind = [self eventKind]; - cls[4] = 0; - return [NSString stringWithFormat:@"GTMCarbonEvent '%s' %d", cls, kind]; -} - - -// Get the event's class. -// -// Returns: -// event class -// -- (UInt32)eventClass { - return GetEventClass(event_); -} - - -// Get the event's kind. -// -// Returns: -// event kind -// -- (UInt32)eventKind { - return GetEventKind(event_); -} - - -// Set the event's time. -// -// Arguments: -// time - the time you want associated with the event -// -- (void)setTime:(EventTime)eventTime { - verify_noerr(SetEventTime(event_, eventTime)); -} - - -// Get the event's time. -// -// Returns: -// the time associated with the event -// -- (EventTime)time { - return GetEventTime(event_); -} - - -// Get the event's eventref for passing to other carbon functions. -// -// Returns: -// the event ref associated with the event -// -- (EventRef)event { - return event_; -} - - -// Sends event to an event target with options -// -// Arguments: -// target - target to send event to. -// options - options to send event. See SendEventToEventTargetWithOptions -// for details. -// -// Returns: -// OSStatus value. -// -- (OSStatus)sendToTarget:(GTMCarbonEventHandler *)target - options:(OptionBits)options { - return SendEventToEventTargetWithOptions(event_, - [target eventTarget], options); -} - -// Post event to an event queue. -// -// Arguments: -// queue - queue to post it to. -// priority - priority to post it with -// -// Returns: -// OSStatus value. -// -- (OSStatus)postToQueue:(EventQueueRef)queue priority:(EventPriority)priority { - return PostEventToQueue(queue, event_, priority); -} - - -// Post event to current queue with standard priority. -// -- (void)postToCurrentQueue { - verify_noerr([self postToQueue:GetCurrentEventQueue() - priority:kEventPriorityStandard]); -} - - -// Post event to main queue with standard priority. -// -- (void)postToMainQueue { - verify_noerr([self postToQueue:GetMainEventQueue() - priority:kEventPriorityStandard]); -} - - -// Sets (or adds) a parameter to an event. Try not to use this function -// directly. Look at the PARAM_TEMPLATE_DECL/DEFN macros below. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// size - the size of the data that |data| points to. -// data - pointer to the data you want to set the parameter to. -// -- (void)setParameterNamed:(EventParamName)name - type:(EventParamType)type - size:(ByteCount)size - data:(const void *)data { - verify_noerr(SetEventParameter(event_, name, type, size, data)); -} - - -// Gets a parameter from an event. Try not to use this function -// directly. Look at the PARAM_TEMPLATE_DECL/DEFN macros below. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// size - the size of the data that |data| points to. -// data - pointer to the buffer that you want to fill with your data. -// -// Returns: -// YES is parameter is retrieved successfully. NO if parameter doesn't exist. -// -- (BOOL)getParameterNamed:(EventParamName)name - type:(EventParamType)type - size:(ByteCount)size - data:(void *)data { - OSStatus status = GetEventParameter(event_, name, type, - NULL, size, NULL, data); - return status == noErr; -} - - -// Gets a the size of a parameter from an event. -// -// Arguments: -// name - the parameter name. -// type - the parameter type. -// -// Returns: -// The size of the buffer required to hold the parameter. 0 if parameter -// doesn't exist. -// -- (ByteCount)sizeOfParameterNamed:(EventParamName)name - type:(EventParamType)type { - ByteCount size = 0; - verify_noerr(GetEventParameter(event_, name, type, NULL, 0, &size, NULL)); - return size; -} - -@end - -@implementation GTMCarbonEvent (GTMCarbonEventGettersAndSetters) -GTM_PARAM_TEMPLATE_DEFN(UInt32) -GTM_PARAM_TEMPLATE_DEFN(EventHotKeyID) -@end - -UInt32 GTMCocoaToCarbonKeyModifiers(NSUInteger inCocoaModifiers) { - UInt32 carbModifiers = 0; - if (inCocoaModifiers & NSAlphaShiftKeyMask) carbModifiers |= alphaLock; - if (inCocoaModifiers & NSShiftKeyMask) carbModifiers |= shiftKey; - if (inCocoaModifiers & NSControlKeyMask) carbModifiers |= controlKey; - if (inCocoaModifiers & NSAlternateKeyMask) carbModifiers |= optionKey; - if (inCocoaModifiers & NSCommandKeyMask) carbModifiers |= cmdKey; - return carbModifiers; -} - -NSUInteger GTMCarbonToCocoaKeyModifiers(UInt32 inCarbonModifiers) { - NSUInteger nsModifiers = 0; - if (inCarbonModifiers & alphaLock) nsModifiers |= NSAlphaShiftKeyMask; - if (inCarbonModifiers & shiftKey) nsModifiers |= NSShiftKeyMask; - if (inCarbonModifiers & controlKey) nsModifiers |= NSControlKeyMask; - if (inCarbonModifiers & optionKey) nsModifiers |= NSAlternateKeyMask; - if (inCarbonModifiers & cmdKey) nsModifiers |= NSCommandKeyMask; - return nsModifiers; -} - -const OSType kGTMCarbonFrameworkSignature = 'GTM '; - -@implementation GTMCarbonEventHandler - -// Does our delegate respond to eventHandler:receivedEvent:handler: -// -// Returns: -// YES if delegate responds to eventHandler:receivedEvent:handler: -- (BOOL) delegateRespondsToHandleEvent { - return delegateRespondsToHandleEvent_; -} - -// Registers the event handler to listen for |events|. -// -// Arguments: -// events - an array of EventTypeSpec. The events to register for. -// count - the number of EventTypeSpecs in events. -// -- (void)registerForEvents:(const EventTypeSpec *)events count:(size_t)count { - verify_noerr(AddEventTypesToHandler([self eventHandler], count, events)); -} - -// Causes the event handler to stop listening for |events|. -// -// Arguments: -// events - an array of EventTypeSpec. The events to register for. -// count - the number of EventTypeSpecs in events. -// -- (void)unregisterForEvents:(const EventTypeSpec *)events count:(size_t)count { - verify_noerr(RemoveEventTypesFromHandler([self eventHandler], count, events)); -} - -// To be overridden by subclasses to respond to events. All subclasses should -// call [super handleEvent:handler:] if they don't handle the event themselves. -// -// Arguments: -// event - the event to be handled -// handler - the call ref in case you want to call CallNextEventHandler -// in your method -// Returns: -// OSStatus - usually either noErr or eventNotHandledErr -// -- (OSStatus)handleEvent:(GTMCarbonEvent *)event - handler:(EventHandlerCallRef)handler { - OSStatus status = eventNotHandledErr; - require(event, CantUseParams); - require(handler, CantUseParams); - require([event event], CantUseParams); - status = CallNextEventHandler(handler, [event event]); -CantUseParams: - return status; -} - -// To be overridden by subclasses to return the event target for the class. -// GTMCarbonEventHandler's implementation returns NULL. -// -// Returns: -// The event target ref. -// -- (EventTargetRef)eventTarget { - // Defaults implementation needs to be overridden - return NULL; -} - -// C callback for our registered EventHandlerUPP. -// -// Arguments: -// inHandler - handler given to us from Carbon Event system -// inEvent - the event we are handling -// inUserData - refcon that we gave to the carbon event system. Is a -// GTMCarbonEventHandler in disguise. -// Returns: -// status of event handler -// -static OSStatus EventHandler(EventHandlerCallRef inHandler, - EventRef inEvent, - void *inUserData) { - GTMCarbonEvent *event = [GTMCarbonEvent eventWithEvent:inEvent]; - GTMCarbonEventHandler *handler= (GTMCarbonEventHandler *)inUserData; - check([handler isKindOfClass:[GTMCarbonEventHandler class]]); - - // First check to see if our delegate cares about this event. If the delegate - // handles it (i.e responds to it and does not return eventNotHandledErr) we - // do not pass it on to default handling. - OSStatus status = eventNotHandledErr; - if ([handler delegateRespondsToHandleEvent]) { - status = [[handler delegate] gtm_eventHandler:handler - receivedEvent:event - handler:inHandler]; - } - if (status == eventNotHandledErr) { - status = [handler handleEvent:event handler:inHandler]; - } - return status; -} - -// Gets the underlying EventHandlerRef for that this class wraps. -// -// Returns: -// The EventHandlerRef this class wraps. -// -- (EventHandlerRef)eventHandler { - if (!eventHandler_) { - static EventHandlerUPP sHandlerProc = NULL; - if ( sHandlerProc == NULL ) { - sHandlerProc = NewEventHandlerUPP(EventHandler); - } - verify_noerr(InstallEventHandler([self eventTarget], - sHandlerProc, 0, - NULL, self, &eventHandler_)); - } - return eventHandler_; -} - -// Gets the delegate for the handler -// -// Returns: -// the delegate -- (id)delegate { - return delegate_; -} - -// Sets the delegate for the handler and caches whether it responds to -// the eventHandler:receivedEvent:handler: selector for performance purposes. -// -// Arguments: -// delegate - the delegate for the handler -- (void)setDelegate:(id)delegate { - delegate_ = delegate; - SEL selector = @selector(gtm_eventHandler:receivedEvent:handler:); - delegateRespondsToHandleEvent_ = [delegate respondsToSelector:selector]; -} - -@end - -@implementation GTMCarbonEventMonitorHandler - -GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventMonitorHandler, - sharedEventMonitorHandler); - -- (EventTargetRef)eventTarget { - return GetEventMonitorTarget(); -} - -@end - -@implementation GTMCarbonEventDispatcherHandler - -GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventDispatcherHandler, - sharedEventDispatcherHandler); - -// Register for the events we handle, and set up the dictionaries we need -// to keep track of the hotkeys and commands that we handle. -// Returns: -// GTMCarbonApplication or nil on failure -- (id)init { - if ((self = [super init])) { - static EventTypeSpec events[] = { - { kEventClassKeyboard, kEventHotKeyPressed }, - { kEventClassKeyboard, kEventHotKeyReleased }, - }; - [self registerForEvents:events count:GetEventTypeCount(events)]; - hotkeys_ = [[NSMutableDictionary alloc] initWithCapacity:0]; - } - return self; -} - -// COV_NF_START -// Singleton, we never get released. Just here for completeness. -- (void)dealloc { - [hotkeys_ release]; - [super dealloc]; -} -// COV_NF_END - -- (EventTargetRef)eventTarget { - return GetEventDispatcherTarget(); -} - -// Registers a hotkey. When the hotkey is executed by the user, target will be -// called with selector. -// Arguments: -// keyCode - the virtual keycode of the hotkey -// cocoaModifiers - the modifiers that need to be used with |keyCode|. NB -// that these are cocoa modifiers, so NSCommandKeyMask etc. -// target - instance that will get |action| called when the hotkey fires -// action - the method to call on |target| when the hotkey fires -// onKeyDown - is YES, the hotkey fires on the keydown (usual) otherwise -// it fires on the key up. -// Returns: -// a EventHotKeyRef that you can use with other Carbon functions, or for -// unregistering the hotkey. Note that all hotkeys are unregistered -// automatically when an app quits. Will be NULL on failure. -- (EventHotKeyRef)registerHotKey:(NSUInteger)keyCode - modifiers:(NSUInteger)cocoaModifiers - target:(id)target - action:(SEL)selector - whenPressed:(BOOL)onKeyDown { - static UInt32 sCurrentID = 0; - - EventHotKeyRef theRef = NULL; - EventHotKeyID keyID; - keyID.signature = kGTMCarbonFrameworkSignature; - keyID.id = ++sCurrentID; - GTMCarbonHotKey *newKey = [[[GTMCarbonHotKey alloc] initWithHotKey:keyID - target:target - action:selector - whenPressed:onKeyDown] - autorelease]; - require(newKey, CantCreateKey); - require_noerr(RegisterEventHotKey((UInt32)keyCode, - GTMCocoaToCarbonKeyModifiers(cocoaModifiers), - keyID, - [self eventTarget], - 0, - &theRef), CantRegisterHotkey); - - - [hotkeys_ setObject:newKey forKey:[NSValue valueWithPointer:theRef]]; -CantCreateKey: -CantRegisterHotkey: - return theRef; -} - -// Unregisters a hotkey previously registered with registerHotKey. -// Arguments: -// keyRef - the EventHotKeyRef to unregister -- (void)unregisterHotKey:(EventHotKeyRef)keyRef { - NSValue *key = [NSValue valueWithPointer:keyRef]; - check([hotkeys_ objectForKey:key] != nil); - [hotkeys_ removeObjectForKey:key]; - verify_noerr(UnregisterEventHotKey(keyRef)); -} - -// A hotkey has been hit. See if it is one of ours, and if so fire it. -// Arguments: -// event - the hotkey even that was received -// Returns: -// Yes if handled. -- (BOOL)handleHotKeyEvent:(GTMCarbonEvent *)event { - EventHotKeyID keyID; - BOOL handled = [event getEventHotKeyIDParameterNamed:kEventParamDirectObject - data:&keyID]; - if (handled) { - GTMCarbonHotKey *hotkey; - GTM_FOREACH_OBJECT(hotkey, [hotkeys_ allValues]) { - if ([hotkey matchesHotKeyID:keyID]) { - EventKind kind = [event eventKind]; - BOOL onKeyDown = [hotkey onKeyDown]; - if ((kind == kEventHotKeyPressed && onKeyDown) || - (kind == kEventHotKeyReleased && !onKeyDown)) { - handled = [hotkey sendAction:self]; - } - break; - } - } - } - return handled; -} - -// Currently we handle hotkey and command events here. If we get one of them -// we dispatch them off to the handlers above. Otherwise we just call up to -// super. -// Arguments: -// event - the event to check -// handler - the handler call ref -// Returns: -// OSStatus -- (OSStatus)handleEvent:(GTMCarbonEvent *)event - handler:(EventHandlerCallRef)handler { - OSStatus theStatus = eventNotHandledErr; - if ([event eventClass] == kEventClassKeyboard) { - EventKind kind = [event eventKind]; - if (kind == kEventHotKeyPressed || kind == kEventHotKeyReleased) { - theStatus = [self handleHotKeyEvent:event] ? noErr : eventNotHandledErr; - } - } - // We didn't handle it, maybe somebody upstairs will. - if (theStatus == eventNotHandledErr) { - theStatus = [super handleEvent:event handler:handler]; - } - return theStatus; -} - -@end - -@implementation GTMCarbonHotKey - -// Init a HotKey record. In debug version make sure that the selector we are -// passed matches what we expect. ( -// Arguments: -// keyID - id of the hotkey -// target - object we are going to call when the hotkey is hit -// action - selector we are going to call on target -// whenPressed - do we do it on key down or key up? -// Returns: -// a hotkey record, or nil on failure -- (id)initWithHotKey:(EventHotKeyID)keyID - target:(id)target - action:(SEL)selector - whenPressed:(BOOL)onKeyDown { - if ((self = [super init])) { - if(!target || !selector) { - [self release]; - return nil; - } - id_ = keyID; - target_ = [target retain]; - selector_ = selector; - onKeyDown_ = onKeyDown; - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(target, - selector, - @encode(void), - @encode(id), - NULL); - } - return self; -} - -- (void)dealloc { - [target_ release]; - [super dealloc]; -} - -// Does this record match key |keyID| -// Arguments: -// keyID - the id to match against -// Returns: -// Yes if we match this key id -- (BOOL)matchesHotKeyID:(EventHotKeyID)keyID { - return (id_.signature == keyID.signature) && (id_.id == keyID.id); -} - -- (BOOL)sendAction:(id)sender { - BOOL handled = NO; - @try { - [target_ performSelector:selector_ withObject:sender]; - handled = YES; - } - @catch (NSException * e) { - handled = NO; - _GTMDevLog(@"Exception fired in hotkey: %@ (%@)", [e name], [e reason]); - } // COV_NF_LINE - return handled; -} - -- (BOOL)onKeyDown { - return onKeyDown_; -} - -@end - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEventTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEventTest.m deleted file mode 100644 index f7b4d54f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMCarbonEventTest.m +++ /dev/null @@ -1,367 +0,0 @@ -// -// GTMCarbonEventTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMCarbonEvent.h" -#import "GTMUnitTestingUtilities.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMCarbonEventTest : GTMTestCase { - @private - GTMCarbonEvent *event_; -} -@end - -@interface GTMCarbonEventHandlerTest : GTMTestCase { - @private - GTMCarbonEventHandler *handler_; -} -@end - -@interface GTMCarbonEventMonitorHandlerTest : GTMTestCase -@end - -@interface GTMCarbonEventDispatcherHandlerTest : GTMTestCase { - @private - BOOL hotKeyHit_; -} -@end - -static const UInt32 kTestClass = 'foo '; -static const UInt32 kTestKind = 'bar '; -static const UInt32 kTestParameterName = 'baz '; -static const UInt32 kTestBadParameterName = 'bom '; -static const UInt32 kTestParameterValue = 'bam '; - -@implementation GTMCarbonEventTest -- (void)setUp { - event_ = [[GTMCarbonEvent eventWithClass:kTestClass kind:kTestKind] retain]; -} - -- (void)tearDown { - [event_ release]; -} - -- (void)testCopy { - GTMCarbonEvent *event2 = [[event_ copy] autorelease]; - STAssertNotNil(event2, nil); -} - -- (void)testEventWithClassAndKind { - STAssertEquals([event_ eventClass], kTestClass, nil); - STAssertEquals([event_ eventKind], kTestKind, nil); -} - -- (void)testEventWithEvent { - GTMCarbonEvent *event2 = [GTMCarbonEvent eventWithEvent:[event_ event]]; - STAssertEquals([event2 event], [event_ event], nil); -} - -- (void)testCurrentEvent { - EventRef eventRef = GetCurrentEvent(); - GTMCarbonEvent *event = [GTMCarbonEvent currentEvent]; - STAssertEquals([event event], eventRef, nil); -} - -- (void)testEventClass { - [self testEventWithClassAndKind]; -} - -- (void)testEventKind { - [self testEventWithClassAndKind]; -} - -- (void)testSetTime { - EventTime eventTime = [event_ time]; - STAssertNotEquals(eventTime, kEventDurationNoWait, nil); - STAssertNotEquals(eventTime, kEventDurationForever, nil); - [event_ setTime:kEventDurationForever]; - EventTime testTime = [event_ time]; - STAssertEquals(testTime, kEventDurationForever, nil); - [event_ setTime:eventTime]; - STAssertEquals([event_ time], eventTime, nil); -} - -- (void)testTime { - [self testSetTime]; -} - -- (void)testEvent { - [self testEventWithEvent]; -} - -- (void)testSetParameterNamed { - UInt32 theData = kTestParameterValue; - [event_ setUInt32ParameterNamed:kTestParameterName data:&theData]; - theData = 0; - STAssertEquals([event_ sizeOfParameterNamed:kTestParameterName - type:typeUInt32], - sizeof(UInt32), nil); - STAssertTrue([event_ getUInt32ParameterNamed:kTestParameterName - data:&theData], nil); - STAssertEquals(theData, kTestParameterValue, nil); -} - -- (void)testGetParameterNamed { - [self testSetParameterNamed]; - UInt32 theData = kTestParameterValue; - STAssertFalse([event_ getUInt32ParameterNamed:kTestBadParameterName - data:&theData], nil); - STAssertFalse([event_ getUInt32ParameterNamed:kTestBadParameterName - data:NULL], nil); - -} - -- (void)testSizeOfParameterNamed { - [self testSetParameterNamed]; -} - -- (void)testHasParameterNamed { - [self testSetParameterNamed]; -} - -- (OSStatus)gtm_eventHandler:(GTMCarbonEventHandler *)sender - receivedEvent:(GTMCarbonEvent *)event - handler:(EventHandlerCallRef)handler { - OSStatus status = eventNotHandledErr; - if ([event eventClass] == kTestClass && [event eventKind] == kTestKind) { - status = noErr; - } - return status; -} - -- (void)testSendToTarget { - EventTypeSpec types = { kTestClass, kTestKind }; - GTMCarbonEventDispatcherHandler *handler - = [[GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler] - autorelease]; - [handler registerForEvents:&types count:1]; - OSStatus status = [event_ sendToTarget:handler options:0]; - STAssertErr(status, eventNotHandledErr, @"status: %ld", status); - [handler setDelegate:self]; - status = [event_ sendToTarget:handler options:0]; - STAssertNoErr(status, @"status: %ld", status); - [handler unregisterForEvents:&types count:1]; -} - -- (void)testPostToQueue { - EventQueueRef eventQueue = GetMainEventQueue(); - [event_ postToMainQueue]; - OSStatus status = [event_ postToQueue:eventQueue - priority:kEventPriorityStandard]; - STAssertErr(status, eventAlreadyPostedErr, @"status: %ld", status); - EventTypeSpec types = { kTestClass, kTestKind }; - status = FlushEventsMatchingListFromQueue(eventQueue, 1, &types); - STAssertNoErr(status, @"status: %ld", status); - - eventQueue = GetCurrentEventQueue(); - [event_ postToCurrentQueue]; - status = [event_ postToQueue:eventQueue priority:kEventPriorityStandard]; - STAssertErr(status, eventAlreadyPostedErr, @"status: %ld", status); - status = FlushEventsMatchingListFromQueue(eventQueue, 1, &types); - STAssertNoErr(status, @"status: %ld", status); -} - -- (void)testPostToMainQueue { - [self testPostToQueue]; -} - -- (void)testPostToCurrentQueue { - STAssertEquals(GetCurrentEventQueue(), GetMainEventQueue(), nil); - [self testPostToMainQueue]; -} - -- (void)testDescription { - NSString *descString - = [NSString stringWithFormat:@"GTMCarbonEvent 'foo ' %d", kTestKind]; - STAssertEqualObjects([event_ description], descString, nil); -} -@end - -@implementation GTMCarbonEventHandlerTest - -- (void)setUp { - handler_ = [[GTMCarbonEventHandler alloc] init]; -} - -- (void)tearDown { - [handler_ release]; -} - -- (void)testEventTarget { - STAssertNULL([handler_ eventTarget], nil); -} - -- (void)testEventHandler { - [GTMUnitTestDevLogDebug expectPattern: - @"DebugAssert: GoogleToolboxForMac: event CantUseParams .*"]; - STAssertErr([handler_ handleEvent:nil handler:nil], eventNotHandledErr, nil); -} - -- (void)testDelegate { - [handler_ setDelegate:self]; - STAssertEqualObjects([handler_ delegate], self, nil); - [handler_ setDelegate:nil]; - STAssertNil([handler_ delegate], nil); -} - - -- (void)testSetDelegate { - [self testDelegate]; -} - -@end - -@implementation GTMCarbonEventMonitorHandlerTest - -- (void)testEventHandler { - GTMCarbonEventMonitorHandler *monitor - = [GTMCarbonEventMonitorHandler sharedEventMonitorHandler]; - STAssertEquals([monitor eventTarget], GetEventMonitorTarget(), nil); -} - -@end - -@implementation GTMCarbonEventDispatcherHandlerTest - -- (void)testEventHandler { - GTMCarbonEventDispatcherHandler *dispatcher - = [GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler]; - STAssertEquals([dispatcher eventTarget], GetEventDispatcherTarget(), nil); -} - -- (void)hitHotKey:(id)sender { - hotKeyHit_ = YES; - [NSApp stop:self]; -} - -- (void)hitExceptionalHotKey:(id)sender { - [NSException raise:@"foo" format:@"bar"]; -} - -- (void)testRegisterHotKeyModifiersTargetActionWhenPressed { - - // This test can't be run if the screen saver is active because the security - // agent blocks us from sending events via remote operations - if (![GTMUnitTestingUtilities isScreenSaverActive]) { - GTMCarbonEventDispatcherHandler *dispatcher - = [GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler]; - STAssertNotNil(dispatcher, @"Unable to acquire singleton"); - UInt32 keyMods = (NSShiftKeyMask | NSControlKeyMask - | NSAlternateKeyMask | NSCommandKeyMask); - EventHotKeyRef hotKey; - [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: GoogleToolboxForMac: " - @"newKey CantCreateKey .*"]; - STAssertNULL([dispatcher registerHotKey:0x5 - modifiers:keyMods - target:nil - action:nil - whenPressed:YES], - @"Shouldn't have created hotkey"); -#if DEBUG - // This tests debug selector validation, so we only can do it in debug. - [GTMUnitTestDevLogDebug expectPattern:@"RecordedNSAssert in " - @"GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments - " - @"\"GTMCarbonEventDispatcherHandlerTest\" selector \"badSelector:\" is " - @"unimplemented or misnamed \\(.*/GTMDebugSelectorValidation.h:[0-9]*\\)"]; - STAssertThrowsSpecificNamed([dispatcher registerHotKey:0x5 - modifiers:keyMods - target:self - action:@selector(badSelector:) - whenPressed:YES], - NSException, NSInternalInconsistencyException, - @"Shouldn't have created hotkey"); -#endif - hotKey = [dispatcher registerHotKey:0x5 - modifiers:keyMods - target:self - action:@selector(hitHotKey:) - whenPressed:YES]; - STAssertNotNULL(hotKey, @"Unable to create hotkey"); - - hotKeyHit_ = NO; - - // Post the hotkey combo to the event queue. If everything is working - // correctly hitHotKey: should get called, and hotKeyHit_ will be set for - // us. We run the event loop for a set amount of time waiting for this to - // happen. - [GTMUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; - NSDate* future = [NSDate dateWithTimeIntervalSinceNow:1.0f]; - [GTMUnitTestingUtilities runUntilDate:future]; - STAssertTrue(hotKeyHit_, @"Hot key never got fired."); - [dispatcher unregisterHotKey:hotKey]; - } -} - -- (void)testRegisterHotKeyModifiersTargetActionWhenPressedException { - - // This test can't be run if the screen saver is active because the security - // agent blocks us from sending events via remote operations - if (![GTMUnitTestingUtilities isScreenSaverActive]) { - GTMCarbonEventDispatcherHandler *dispatcher - = [GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler]; - STAssertNotNil(dispatcher, @"Unable to acquire singleton"); - UInt32 keyMods = (NSShiftKeyMask | NSControlKeyMask - | NSAlternateKeyMask | NSCommandKeyMask); - EventHotKeyRef hotKey = [dispatcher registerHotKey:0x5 - modifiers:keyMods - target:self - action:@selector(hitExceptionalHotKey:) - whenPressed:YES]; - STAssertTrue(hotKey != nil, @"Unable to create hotkey"); - - // Post the hotkey combo to the event queue. If everything is working correctly - // hitHotKey: should get called, and hotKeyHit_ will be set for us. - // We run the event loop for a set amount of time waiting for this to happen. - [GTMUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; - NSDate* future = [NSDate dateWithTimeIntervalSinceNow:1.0f]; - [GTMUnitTestDevLog expectString:@"Exception fired in hotkey: foo (bar)"]; - [GTMUnitTestingUtilities runUntilDate:future]; - [dispatcher unregisterHotKey:hotKey]; - } -} - -- (void)testKeyModifiers { - struct { - NSUInteger cocoaKey_; - UInt32 carbonKey_; - } keyMap[] = { - { NSAlphaShiftKeyMask, alphaLock}, - { NSShiftKeyMask, shiftKey}, - { NSControlKeyMask, controlKey}, - { NSAlternateKeyMask, optionKey}, - { NSCommandKeyMask, cmdKey}, - }; - size_t combos = pow(2, sizeof(keyMap) / sizeof(keyMap[0])); - for (size_t i = 0; i < combos; i++) { - NSUInteger cocoaMods = 0; - UInt32 carbonMods = 0; - for (size_t j = 0; j < 32 && j < sizeof(keyMap) / sizeof(keyMap[0]); j++) { - if (i & 1 << j) { - cocoaMods |= keyMap[j].cocoaKey_; - carbonMods |= keyMap[j].carbonKey_; - } - } - STAssertEquals(GTMCocoaToCarbonKeyModifiers(cocoaMods), carbonMods, nil); - STAssertEquals(GTMCarbonToCocoaKeyModifiers(carbonMods), cocoaMods, nil); - } -} - - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.h deleted file mode 100644 index 63abf203..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// GTMDelegatingTableColumn.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// NOTE: If you're using the 10.5 SDK, just use the new delegate method: -// tableView:dataCellForTableColumn:row: - -@interface GTMDelegatingTableColumn : NSTableColumn -// no instance state or new method, it will just invoke the tableview's delegate -// w/ the method below. -@end - -// the method delegated to -@interface NSObject (GTMDelegatingTableColumnDelegate) -- (id)gtm_tableView:(NSTableView *)tableView - dataCellForTableColumn:(NSTableColumn *)tableColumn - row:(NSInteger)row; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.m deleted file mode 100644 index 0bd23714..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMDelegatingTableColumn.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// GTMDelegatingTableColumn.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDelegatingTableColumn.h" - -@implementation GTMDelegatingTableColumn -- (id)dataCellForRow:(NSInteger)row { - id dataCell = nil; - id delegate = [[self tableView] delegate]; - BOOL sendSuper = YES; - if (delegate) { - if ([delegate respondsToSelector:@selector(gtm_tableView:dataCellForTableColumn:row:)]) { - - dataCell = [delegate gtm_tableView:[self tableView] - dataCellForTableColumn:self - row:row]; - sendSuper = NO; - } else { - _GTMDevLog(@"tableView delegate didn't implement gtm_tableView:dataCellForTableColumn:row:"); - } - } - if (sendSuper) { - dataCell = [super dataCellForRow:row]; - } - return dataCell; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandler.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandler.m deleted file mode 100644 index dcac2922..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandler.m +++ /dev/null @@ -1,310 +0,0 @@ -// -// GTMGetURLHandler.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Add this class to your app to have get URL handled almost automatically for -// you. For each entry in your CFBundleURLTypes dictionaries, add a new -// key/object pair of GTMBundleURLClass/the name of the class you want -// to have handle the scheme(s). -// Then have that class respond to the class method: -// + (BOOL)gtm_openURL:(NSURL*)url -// and voila, it will just work. -// Note that in Debug mode we will do extensive testing to make sure that this -// is all hooked up correctly, and will spew out to the console if we -// find anything amiss. -// -// Example plist entry -// ... -// -// CFBundleURLTypes -// -// -// CFBundleURLName -// Google Suggestion URL -// GTMBundleURLClass -// GoogleSuggestURLHandler -// CFBundleURLSchemes -// -// googlesuggest -// googlesuggestextreme -// -// -// -// -// -// Example implementation -// @interface GoogleSuggestURLHandler -// @end -// @implementation GoogleSuggestURLHandler -// + (BOOL)gtm_openURL:(NSURL*)url { -// NSLog(@"%@", url); -// } -// @end - -#import -#import "GTMGarbageCollection.h" -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMMethodCheck.h" - -static NSString *const kGTMBundleURLClassKey = @"GTMBundleURLClass"; -// A variety of constants Apple really should have defined somewhere to -// allow the compiler to find your typos. -static NSString *const kGTMCFBundleURLSchemesKey = @"CFBundleURLSchemes"; -static NSString *const kGTMCFBundleURLNameKey = @"CFBundleURLName"; -static NSString *const kGTMCFBundleTypeRoleKey = @"CFBundleTypeRole"; -static NSString *const kGTMCFBundleURLTypesKey = @"CFBundleURLTypes"; -static NSString *const kGTMCFBundleViewerRole = @"Viewer"; -static NSString *const kGTMCFBundleEditorRole = @"Editor"; - -// Set this macro elsewhere is you want to force the -// bundle checks on/off. They are nice for debugging -// problems, but shouldn't be required in a release version -// unless you are paranoid about your users messing with your -// Info.plist -#ifndef GTM_CHECK_BUNDLE_URL_CLASSES -#define GTM_CHECK_BUNDLE_URL_CLASSES DEBUG -#endif // GTM_CHECK_BUNDLE_URL_CLASSES - -@protocol GTMGetURLHandlerProtocol -+ (BOOL)gtm_openURL:(NSURL*)url; -@end - -@interface GTMGetURLHandler : NSObject { - NSArray *urlTypes_; -} -- (id)initWithTypes:(NSArray*)urlTypes; -- (void)getUrl:(NSAppleEventDescriptor *)event -withReplyEvent:(NSAppleEventDescriptor *)replyEvent; -- (void)addError:(OSStatus)error - withDescription:(NSString*)string - toDescriptor:(NSAppleEventDescriptor *)desc; -+ (id)handlerForBundle:(NSBundle *)bundle; -+ (void)getUrl:(NSAppleEventDescriptor *)event -withReplyEvent:(NSAppleEventDescriptor *)replyEvent; -@end - -@implementation GTMGetURLHandler -GTM_METHOD_CHECK(NSNumber, gtm_appleEventDescriptor); -GTM_METHOD_CHECK(NSString, gtm_appleEventDescriptor); - -+ (void)load { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSAppleEventManager *man = [NSAppleEventManager sharedAppleEventManager]; - [man setEventHandler:self - andSelector:@selector(getUrl:withReplyEvent:) - forEventClass:kInternetEventClass - andEventID:kAEGetURL]; - [pool release]; -} - -+ (void)getUrl:(NSAppleEventDescriptor *)event -withReplyEvent:(NSAppleEventDescriptor *)replyEvent { - static GTMGetURLHandler *sHandler = nil; - if (!sHandler) { - NSBundle *bundle = [NSBundle mainBundle]; - sHandler = [GTMGetURLHandler handlerForBundle:bundle]; - if (sHandler) { - [sHandler retain]; - GTMNSMakeUncollectable(sHandler); - } - } - [sHandler getUrl:event withReplyEvent:replyEvent]; -} - -+ (id)handlerForBundle:(NSBundle *)bundle { - GTMGetURLHandler *handler = nil; - NSArray *urlTypes - = [bundle objectForInfoDictionaryKey:kGTMCFBundleURLTypesKey]; - if (urlTypes) { - handler = [[[GTMGetURLHandler alloc] initWithTypes:urlTypes] autorelease]; - } else { - // COV_NF_START - // Hard to test it if we don't have it. - _GTMDevLog(@"If you don't have CFBundleURLTypes in your plist, you may want" - @" to remove GTMGetURLHandler.m from your project"); - // COV_NF_END - } - return handler; -} - -- (id)initWithTypes:(NSArray*)urlTypes { - if ((self = [super init])) { - urlTypes_ = [urlTypes retain]; -#if GTM_CHECK_BUNDLE_URL_CLASSES - // Some debug handling to check to make sure we can handle the - // classes properly. We check here instead of at init in case some of the - // handlers are being handled by plugins or other imported code that are - // loaded after we have been initialized. - NSDictionary *urlType; - GTM_FOREACH_OBJECT(urlType, urlTypes_) { - NSString *className = [urlType objectForKey:kGTMBundleURLClassKey]; - if ([className length]) { - Class cls = NSClassFromString(className); - if (cls) { - if (![cls respondsToSelector:@selector(gtm_openURL:)]) { - _GTMDevLog(@"Class %@ for URL handler %@ " - @"(URL schemes: %@) doesn't respond to openURL:", - className, - [urlType objectForKey:kGTMCFBundleURLNameKey], - [urlType objectForKey:kGTMCFBundleURLSchemesKey]); - } - } else { - _GTMDevLog(@"Unable to get class %@ for URL handler %@ " - @"(URL schemes: %@)", - className, - [urlType objectForKey:kGTMCFBundleURLNameKey], - [urlType objectForKey:kGTMCFBundleURLSchemesKey]); - } - } else { - NSString *role = [urlType objectForKey:kGTMCFBundleTypeRoleKey]; - if ([role caseInsensitiveCompare:kGTMCFBundleViewerRole] == NSOrderedSame || - [role caseInsensitiveCompare:kGTMCFBundleEditorRole] == NSOrderedSame) { - _GTMDevLog(@"Missing %@ for URL handler %@ " - @"(URL schemes: %@)", - kGTMBundleURLClassKey, - [urlType objectForKey:kGTMCFBundleURLNameKey], - [urlType objectForKey:kGTMCFBundleURLSchemesKey]); - } - } - } -#endif // GTM_CHECK_BUNDLE_URL_CLASSES - } - return self; -} - -// COV_NF_START -// Singleton is never dealloc'd -- (void)dealloc { - [urlTypes_ release]; - [super dealloc]; -} -// COV_NF_END - - -- (NSURL*)extractURLFromEvent:(NSAppleEventDescriptor*)event - withReplyEvent:(NSAppleEventDescriptor *)replyEvent { - NSAppleEventDescriptor *desc - = [event paramDescriptorForKeyword:keyDirectObject]; - NSString *urlstring = [desc stringValue]; - NSURL *url = [NSURL URLWithString:urlstring]; - if (!url) { - // COV_NF_START - // Can't convince the OS to give me a bad URL - [self addError:errAECoercionFail - withDescription:@"Unable to extract url from key direct object." - toDescriptor:replyEvent]; - // COV_NF_END - } - return url; -} - -- (Class)getClassForScheme:(NSString *)scheme - withReplyEvent:(NSAppleEventDescriptor*)replyEvent { - NSDictionary *urlType; - Class cls = nil; - NSString *typeScheme = nil; - GTM_FOREACH_OBJECT(urlType, urlTypes_) { - NSArray *schemes = [urlType objectForKey:kGTMCFBundleURLSchemesKey]; - NSString *aScheme; - GTM_FOREACH_OBJECT(aScheme, schemes) { - if ([aScheme caseInsensitiveCompare:scheme] == NSOrderedSame) { - typeScheme = aScheme; - break; - } - } - if (typeScheme) { - break; - } - } - if (typeScheme) { - NSString *class = [urlType objectForKey:kGTMBundleURLClassKey]; - if (class) { - cls = NSClassFromString(class); - } - if (!cls) { - NSString *errorString - = [NSString stringWithFormat:@"Unable to instantiate class for " - @"%@:%@ for scheme:%@.", - kGTMBundleURLClassKey, class, typeScheme]; - [self addError:errAECorruptData - withDescription:errorString - toDescriptor:replyEvent]; - } else { - if (![cls respondsToSelector:@selector(gtm_openURL:)]) { - NSString *errorString - = [NSString stringWithFormat:@"Class %@:%@ for scheme:%@ does not" - @"respond to gtm_openURL:", - kGTMBundleURLClassKey, class, typeScheme]; - [self addError:errAECorruptData - withDescription:errorString - toDescriptor:replyEvent]; - cls = Nil; - } - } - } else { - // COV_NF_START - // Don't know how to force an URL that we don't respond to upon ourselves. - NSString *errorString - = [NSString stringWithFormat:@"Unable to find handler for scheme %@.", - scheme]; - [self addError:errAECorruptData - withDescription:errorString - toDescriptor:replyEvent]; - // COV_NF_END - - } - return cls; -} - -- (void)getUrl:(NSAppleEventDescriptor *)event -withReplyEvent:(NSAppleEventDescriptor *)replyEvent { - NSURL *url = [self extractURLFromEvent:event withReplyEvent:replyEvent]; - if (!url) { - return; - } - NSString *scheme = [url scheme]; - Class cls = [self getClassForScheme:scheme withReplyEvent:replyEvent]; - if (!cls) { - return; - } - BOOL wasGood = [cls gtm_openURL:url]; - if (!wasGood) { - NSString *errorString - = [NSString stringWithFormat:@"[%@ gtm_openURL:] failed to handle %@", - NSStringFromClass(cls), url]; - [self addError:errAEEventNotHandled - withDescription:errorString - toDescriptor:replyEvent]; - } -} - -- (void)addError:(OSStatus)error - withDescription:(NSString*)string - toDescriptor:(NSAppleEventDescriptor *)desc { - NSAppleEventDescriptor *errorDesc = nil; - if (error != noErr) { - NSNumber *errNum = [NSNumber numberWithLong:error]; - errorDesc = [errNum gtm_appleEventDescriptor]; - [desc setParamDescriptor:errorDesc forKeyword:keyErrorNumber]; - } - if (string) { - errorDesc = [string gtm_appleEventDescriptor]; - [desc setParamDescriptor:errorDesc forKeyword:keyErrorString]; - } -} -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandlerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandlerTest.m deleted file mode 100644 index ba0be7d6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMGetURLHandlerTest.m +++ /dev/null @@ -1,84 +0,0 @@ -// GTMGetURLHandlerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMUnitTestingUtilities.h" -#import "GTMUnitTestDevLog.h" - -static BOOL sURLHandlerWasHit; - -@interface GTMGetURLHandlerBadClassWarning : NSObject -@end - -@implementation GTMGetURLHandlerBadClassWarning : NSObject -@end - -@interface GTMGetURLHandlerTest : GTMTestCase -@end - -@implementation GTMGetURLHandlerTest -- (BOOL)openURLString:(NSString *)url { - ProcessSerialNumber psn = { 0, kCurrentProcess }; - NSAppleEventDescriptor *currentProcess - = [NSAppleEventDescriptor descriptorWithDescriptorType:typeProcessSerialNumber - bytes:&psn - length:sizeof(ProcessSerialNumber)]; - NSAppleEventDescriptor *event - = [NSAppleEventDescriptor appleEventWithEventClass:kInternetEventClass - eventID:kAEGetURL - targetDescriptor:currentProcess - returnID:kAutoGenerateReturnID - transactionID:kAnyTransactionID]; - NSAppleEventDescriptor *keyDesc - = [NSAppleEventDescriptor descriptorWithString:url]; - [event setParamDescriptor:keyDesc forKeyword:keyDirectObject]; - OSStatus err = AESendMessage([event aeDesc], NULL, kAEWaitReply, 60); - return err == noErr ? YES : NO; -} - -+ (BOOL)gtm_openURL:(NSURL*)url { - sURLHandlerWasHit = !sURLHandlerWasHit; - return sURLHandlerWasHit; -} - -- (void)testURLCall { - sURLHandlerWasHit = NO; - - [GTMUnitTestDevLogDebug expectPattern:@"Class GTMGetURLHandlerBadClassWarning " - @"for URL handler GTMGetURLHandlerBadClassURL .*"]; - [GTMUnitTestDevLogDebug expectPattern:@"Unable to get class " - @"GTMGetURLHandlerMissingClassWarning for URL handler " - @"GTMGetURLHandlerMissingClassURL .*"]; - [GTMUnitTestDevLogDebug expectPattern:@"Missing GTMBundleURLClass for URL handler " - @"GTMGetURLHandlerMissingHandlerURL .*"]; - STAssertTrue([self openURLString:@"gtmgeturlhandlertest://test.foo"], nil); - STAssertTrue(sURLHandlerWasHit, @"URL handler not called"); - - STAssertTrue([self openURLString:@"gtmgeturlhandlertest://test.foo"], nil); - STAssertFalse(sURLHandlerWasHit, @"URL handler not called 2"); - - // test the two URL schemes with bad entries - STAssertTrue([self openURLString:@"gtmgeturlhandlerbadclasstest://test.foo"], - nil); - - STAssertTrue([self openURLString:@"gtmgeturlhandlermissingclasstest://test.foo"], - nil); - - STAssertTrue([self openURLString:@"gtmgeturlhandlermissinghandlerurl://test.foo"], - nil); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.h deleted file mode 100644 index 4177f496..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// GTMHotKeyTextField.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Text field for capturing hot key entry. This is intended to be similar to the -// Apple key editor in their Keyboard pref pane. - -// NOTE: There are strings that need to be localized to use this field. See the -// code in stringForKeycode the the keys. The keys are all the English versions -// so you'll get reasonable things if you don't have a strings file. - -#import -#import "GTMDefines.h" - -// Dictionary key for hot key configuration information modifier flags. -// NSNumber of a unsigned int. Modifier flags are stored using Cocoa constants -// (same as NSEvent) you will need to translate them to Carbon modifier flags -// for use with RegisterEventHotKey() -#define kGTMHotKeyModifierFlagsKey @"Modifiers" - -// Dictionary key for hot key configuration of virtual key code. NSNumber of -// unsigned int. For double-modifier hotkeys (see below) this value is ignored. -#define kGTMHotKeyKeyCodeKey @"KeyCode" - -// Dictionary key for hot key configuration of double-modifier tap. NSNumber -// BOOL value. Double-tap modifier keys cannot be used with -// RegisterEventHotKey(), you must implement your own Carbon event handler. -#define kGTMHotKeyDoubledModifierKey @"DoubleModifier" - -// Custom text field class used for hot key entry. In order to use this class -// you will need to configure your window's delegate, to return the related -// field editor. -// -// Sample window delegate method: -// -// -(id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject { -// -// if ([anObject isKindOfClass:[GTMHotKeyTextField class]]) { -// return [GTMHotKeyFieldEditor sharedHotKeyFieldEditor]; -// } else { -// return nil; // Window will use the AppKit shared editor -// } -// -// } -// -// -// Other notes: -// - Though you are free to implement control:textShouldEndEditing: in your -// delegate its return is always ignored. The field always accepts only -// one hotkey keystroke before editing ends. -// - The "value" binding of this control is to the dictionary describing the -// hotkey. At this time binding options are not supported. -// - The field does not attempt to consume all hotkeys. Hotkeys which are -// already bound in Apple prefs or other applications will have their -// normal effect. -// - -@interface GTMHotKeyTextField : NSTextField { - @private - NSDictionary *hotKeyDict_; - // Bindings - NSObject *boundObject_; - NSString *boundKeyPath_; -} - -// Set/Get the hot key dictionary for the field. See above for key names. -- (void)setHotKeyValue:(NSDictionary *)hotKey; -- (NSDictionary *)hotKeyValue; - -// Convert Cocoa modifier flags (-[NSEvent modifierFlags]) into a string for -// display. Modifiers are represented in the string in the same order they would -// appear in the Menu Manager. -// -// Args: -// flags: -[NSEvent modifierFlags] -// -// Returns: -// Autoreleased NSString -// -+ (NSString *)stringForModifierFlags:(unsigned int)flags; - -// Convert a keycode into a string that would result from typing the keycode in -// the current keyboard layout. This may be one or more characters. -// -// Args: -// keycode: Virtual keycode such as one obtained from NSEvent -// useGlyph: In many cases the glyphs are confusing, and a string is clearer. -// However, if you want to display in a menu item, use must -// have a glyph. Set useGlyph to FALSE to get localized strings -// which are better for UI display in places other than menus. -// bundle: Localization bundle to use for localizable key names -// -// Returns: -// Autoreleased NSString -// -+ (NSString *)stringForKeycode:(UInt16)keycode - useGlyph:(BOOL)useGlyph - resourceBundle:(NSBundle *)bundle; - -@end - -// Custom field editor for use with hotkey entry fields (GTMHotKeyTextField). -// See the GTMHotKeyTextField for instructions on using from the window -// delegate. -@interface GTMHotKeyFieldEditor : NSTextView { - @private - NSDictionary *hotKeyDict_; // strong -} - -// Get the shared field editor for all hot key fields -+ (GTMHotKeyFieldEditor *)sharedHotKeyFieldEditor; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.m deleted file mode 100644 index 65737434..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextField.m +++ /dev/null @@ -1,1024 +0,0 @@ -// GTMHotKeyTextField.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMHotKeyTextField.h" - -#import -#import "GTMSystemVersion.h" -#import "GTMObjectSingleton.h" -#import "GTMNSObject+KeyValueObserving.h" - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -typedef struct __TISInputSource* TISInputSourceRef; -static TISInputSourceRef(*GTM_TISCopyCurrentKeyboardLayoutInputSource)(void) = NULL; -static void * (*GTM_TISGetInputSourceProperty)(TISInputSourceRef inputSource, - CFStringRef propertyKey) = NULL; -static CFStringRef kGTM_TISPropertyUnicodeKeyLayoutData = NULL; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - - -@interface GTMHotKeyTextField (PrivateMethods) -- (void)setupBinding:(id)bound withPath:(NSString *)path; -- (void)updateDisplayedPrettyString; -+ (BOOL)isValidHotKey:(NSDictionary *)hotKey; -+ (NSString *)displayStringForHotKey:(NSDictionary *)hotKey; -@end - -@interface GTMHotKeyFieldEditor (PrivateMethods) -- (NSDictionary *)hotKeyDictionary; -- (void)setHotKeyDictionary:(NSDictionary *)hotKey; -- (BOOL)shouldBypassEvent:(NSEvent *)theEvent; -- (void)processEventToHotKeyAndString:(NSEvent *)theEvent; -- (void)windowResigned:(NSNotification *)notification; -- (NSDictionary *)hotKeyDictionaryForEvent:(NSEvent *)event; -@end - -@implementation GTMHotKeyTextField - -#if GTM_SUPPORT_GC -- (void)finalize { - if (boundObject_ && boundKeyPath_) { - [boundObject_ gtm_removeObserver:self - forKeyPath:boundKeyPath_ - selector:@selector(hotKeyValueChanged:)]; - } - [super finalize]; -} -#endif - -- (void)dealloc { - - if (boundObject_ && boundKeyPath_) { - [boundObject_ gtm_removeObserver:self - forKeyPath:boundKeyPath_ - selector:@selector(hotKeyValueChanged:)]; - } - [boundObject_ release]; - [boundKeyPath_ release]; - [hotKeyDict_ release]; - [super dealloc]; - -} - -#pragma mark Bindings - - -- (void)bind:(NSString *)binding toObject:(id)observableController - withKeyPath:(NSString *)keyPath - options:(NSDictionary *)options { - - if ([binding isEqualToString:NSValueBinding]) { - // Update to our new binding - [self setupBinding:observableController withPath:keyPath]; - // TODO: Should deal with the bind options - } - [super bind:binding - toObject:observableController - withKeyPath:keyPath - options:options]; - -} - -- (void)unbind:(NSString *)binding { - - // Clean up value on unbind - if ([binding isEqualToString:NSValueBinding]) { - if (boundObject_ && boundKeyPath_) { - [boundObject_ gtm_removeObserver:self - forKeyPath:boundKeyPath_ - selector:@selector(hotKeyValueChanged:)]; - } - [boundObject_ release]; - boundObject_ = nil; - [boundKeyPath_ release]; - boundKeyPath_ = nil; - } - [super unbind:binding]; - -} - -- (void)hotKeyValueChanged:(GTMKeyValueChangeNotification *)note { - NSDictionary *change = [note change]; - // Our binding has changed, update - id changedValue = [change objectForKey:NSKeyValueChangeNewKey]; - // NSUserDefaultsController does not appear to pass on the new object and, - // perhaps other controllers may not, so if we get a nil or NSNull back - // here let's directly retrieve the hotKeyDict_ from the object. - if (!changedValue || changedValue == [NSNull null]) { - id object = [note object]; - NSString *keyPath = [note keyPath]; - changedValue = [object valueForKeyPath:keyPath]; - } - [hotKeyDict_ autorelease]; - hotKeyDict_ = [changedValue copy]; - [self updateDisplayedPrettyString]; -} - - -// Private convenience method for attaching to a new binding -- (void)setupBinding:(id)bound withPath:(NSString *)path { - - // Release previous - if (boundObject_ && boundKeyPath_) { - [boundObject_ gtm_removeObserver:self - forKeyPath:boundKeyPath_ - selector:@selector(hotKeyValueChanged:)]; - } - [boundObject_ release]; - [boundKeyPath_ release]; - // Set new - boundObject_ = [bound retain]; - boundKeyPath_ = [path copy]; - // Make ourself an observer - [boundObject_ gtm_addObserver:self - forKeyPath:boundKeyPath_ - selector:@selector(hotKeyValueChanged:) - userInfo:nil - options:NSKeyValueObservingOptionNew]; - // Pull in any current value - [hotKeyDict_ autorelease]; - hotKeyDict_ = [[boundObject_ valueForKeyPath:boundKeyPath_] copy]; - // Update the display string - [self updateDisplayedPrettyString]; - -} - -#pragma mark Defeating NSControl - -- (double)doubleValue { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return 0.0; - -} - -- (void)setDoubleValue:(double)value { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -- (float)floatValue { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return 0.0f; - -} - -- (void)setFloatValue:(float)value { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -- (int)intValue { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return 0; - -} - -- (void)setIntValue:(int)value { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -- (NSInteger)integerValue { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return 0; - -} - -- (void)setIntegerValue:(NSInteger)value { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -- (id)objectValue { - - return [self hotKeyValue]; - -} - -- (void)setObjectValue:(id)object { - - [self setHotKeyValue:object]; - -} - -- (NSString *)stringValue { - - return [[self class] displayStringForHotKey:hotKeyDict_]; - -} - -- (void)setStringValue:(NSString *)string { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings."); - return; - -} - -- (NSAttributedString *)attributedStringValue { - - NSString *prettyString = [self stringValue]; - if (!prettyString) return nil; - return [[[NSAttributedString alloc] initWithString:prettyString] autorelease]; - -} - -- (void)setAttributedStringValue:(NSAttributedString *)string { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings."); - return; - -} - -- (void)takeDoubleValueFrom:(id)sender { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -- (void)takeFloatValueFrom:(id)sender { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -- (void)takeIntValueFrom:(id)sender { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't take numbers."); - return; - -} - -- (void)takeObjectValueFrom:(id)sender { - - // Defeating NSControl - _GTMDevAssert(NO, - @"Hot key fields want dictionaries via bindings, not from controls."); - return; - -} - -- (void)takeStringValueFrom:(id)sender { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields want dictionaries, not strings."); - return; - -} - -- (id)formatter { - - return nil; - -} - -- (void)setFormatter:(NSFormatter *)newFormatter { - - // Defeating NSControl - _GTMDevAssert(NO, @"Hot key fields don't accept formatters."); - return; - -} - -#pragma mark Hot Key Support - -+ (BOOL)isValidHotKey:(NSDictionary *)hotKeyDict { - if (!hotKeyDict || - ![hotKeyDict isKindOfClass:[NSDictionary class]] || - ![hotKeyDict objectForKey:kGTMHotKeyModifierFlagsKey] || - ![hotKeyDict objectForKey:kGTMHotKeyKeyCodeKey] || - ![hotKeyDict objectForKey:kGTMHotKeyDoubledModifierKey]) { - return NO; - } - return YES; -} - -- (void)setHotKeyValue:(NSDictionary *)hotKey { - - // Sanity only if set, nil is OK - if (hotKey && ![[self class] isValidHotKey:hotKey]) { - return; - } - - // If we are bound we want to round trip through that interface - if (boundObject_ && boundKeyPath_) { - // If the change is accepted this will call us back as an observer - [boundObject_ setValue:hotKey forKeyPath:boundKeyPath_]; - return; - } - - // Otherwise we directly update ourself - [hotKeyDict_ autorelease]; - hotKeyDict_ = [hotKey copy]; - [self updateDisplayedPrettyString]; - -} - -- (NSDictionary *)hotKeyValue { - - return hotKeyDict_; - -} - -// Private method to update the displayed text of the field with the -// user-readable representation. -- (void)updateDisplayedPrettyString { - - // Basic validation - if (![[self class] isValidHotKey:hotKeyDict_]) { - [super setStringValue:@""]; - return; - } - - // Pretty string - NSString *prettyString = [[self class] displayStringForHotKey:hotKeyDict_]; - if (!prettyString) { - prettyString = @""; - } - [super setStringValue:prettyString]; - -} - -+ (NSString *)displayStringForHotKey:(NSDictionary *)hotKeyDict { - - if (!hotKeyDict) return nil; - - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - - // Modifiers - unsigned int flags - = [[hotKeyDict objectForKey:kGTMHotKeyModifierFlagsKey] unsignedIntValue]; - NSString *mods = [GTMHotKeyTextField stringForModifierFlags:flags]; - if (!mods || ![mods length]) return nil; - // Handle double modifier case - if ([[hotKeyDict objectForKey:kGTMHotKeyDoubledModifierKey] boolValue]) { - return [NSString stringWithFormat:@"%@ + %@", mods, mods]; - } - // Keycode - unsigned int keycode - = [[hotKeyDict objectForKey:kGTMHotKeyKeyCodeKey] unsignedIntValue]; - NSString *keystroke = [GTMHotKeyTextField stringForKeycode:keycode - useGlyph:NO - resourceBundle:bundle]; - if (!keystroke || ![keystroke length]) return nil; - return [NSString stringWithFormat:@"%@%@", mods, keystroke]; - -} - - -#pragma mark Field Editor Callbacks - -- (BOOL)textShouldBeginEditing:(GTMHotKeyFieldEditor *)fieldEditor { - - // Sanity - if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) { - _GTMDevLog(@"Field editor not appropriate for field, check window delegate"); - return NO; - } - - // We don't call super from here, because we are defeating default behavior - // as a result we have to call the delegate ourself. - id myDelegate = [self delegate]; - SEL selector = @selector(control:textShouldBeginEditing:); - if ([myDelegate respondsToSelector:selector]) { - if (![myDelegate control:self textShouldBeginEditing:fieldEditor]) return NO; - } - - // Update the field editor internal hotkey representation - [fieldEditor setHotKeyDictionary:hotKeyDict_]; // OK if its nil - return YES; - -} - -- (void)textDidChange:(NSNotification *)notification { - - // Sanity - GTMHotKeyFieldEditor *fieldEditor = [notification object]; - if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) { - _GTMDevLog(@"Field editor not appropriate for field, check window delegate"); - return; - } - - // When the field changes we want to read in the current hotkey value so - // bindings can validate - [self setHotKeyValue:[fieldEditor hotKeyDictionary]]; - - // Let super handle the notifications - [super textDidChange:notification]; - -} - -- (BOOL)textShouldEndEditing:(GTMHotKeyFieldEditor *)fieldEditor { - - // Sanity - if (![fieldEditor isKindOfClass:[GTMHotKeyFieldEditor class]]) { - _GTMDevLog(@"Field editor not appropriate for field, check window delegate"); - return NO; - } - - // Again we are defeating default behavior so we have to do delegate handling - // ourself. In this case our goal is simply to prevent the superclass from - // doing its own KVO, but we can also skip [[self cell] isEntryAcceptable:]. - // We'll also ignore the delegate control:textShouldEndEditing:. The field - // editor is done whether they like it or not. - id myDelegate = [self delegate]; - SEL selector = @selector(control:textShouldEndEditing:); - if ([myDelegate respondsToSelector:selector]) { - [myDelegate control:self textShouldEndEditing:fieldEditor]; - } - - // The end is always allowed, so set new value - [self setHotKeyValue:[fieldEditor hotKeyDictionary]]; - - return YES; - -} - -#pragma mark Class methods building strings for use w/in the UI. - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -+ (void)initialize { - if (!GTM_TISCopyCurrentKeyboardLayoutInputSource - && [GTMSystemVersion isLeopardOrGreater]) { - CFBundleRef hiToolbox - = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.HIToolbox")); - if (hiToolbox) { - kGTM_TISPropertyUnicodeKeyLayoutData - = *(CFStringRef*)CFBundleGetDataPointerForName(hiToolbox, - CFSTR("kTISPropertyUnicodeKeyLayoutData")); - GTM_TISCopyCurrentKeyboardLayoutInputSource - = CFBundleGetFunctionPointerForName(hiToolbox, - CFSTR("TISCopyCurrentKeyboardLayoutInputSource")); - GTM_TISGetInputSourceProperty - = CFBundleGetFunctionPointerForName(hiToolbox, - CFSTR("TISGetInputSourceProperty")); - } - } -} -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -#pragma mark Useful String Class Methods - -// These are not in a category on NSString because this class could be used -// within multiple preference panes at the same time. If we put it in a category -// it would require setting up some magic so that the categories didn't conflict -// between the multiple pref panes. By putting it in the class, you can just -// #define the class name to something else, and then you won't have any -// conflicts. - -+ (NSString *)stringForModifierFlags:(unsigned int)flags { - - UniChar modChars[4]; // We only look for 4 flags - unsigned int charCount = 0; - // These are in the same order as the menu manager shows them - if (flags & NSControlKeyMask) modChars[charCount++] = kControlUnicode; - if (flags & NSAlternateKeyMask) modChars[charCount++] = kOptionUnicode; - if (flags & NSShiftKeyMask) modChars[charCount++] = kShiftUnicode; - if (flags & NSCommandKeyMask) modChars[charCount++] = kCommandUnicode; - if (charCount == 0) return nil; - return [NSString stringWithCharacters:modChars length:charCount]; - -} - -+ (NSString *)stringForKeycode:(UInt16)keycode - useGlyph:(BOOL)useGlyph - resourceBundle:(NSBundle *)bundle { - - // Some keys never move in any layout (to the best of our knowledge at least) - // so we can hard map them. - UniChar key = 0; - NSString *localizedKey = nil; - - switch (keycode) { - - // Of the hard mapped keys some can be represented with pretty and obvioous - // Unicode or simple strings without localization. - - // Arrow keys - case 123: key = NSLeftArrowFunctionKey; break; - case 124: key = NSRightArrowFunctionKey; break; - case 125: key = NSDownArrowFunctionKey; break; - case 126: key = NSUpArrowFunctionKey; break; - case 122: key = NSF1FunctionKey; break; - case 120: key = NSF2FunctionKey; break; - case 99: key = NSF3FunctionKey; break; - case 118: key = NSF4FunctionKey; break; - case 96: key = NSF5FunctionKey; break; - case 97: key = NSF6FunctionKey; break; - case 98: key = NSF7FunctionKey; break; - case 100: key = NSF8FunctionKey; break; - case 101: key = NSF9FunctionKey; break; - case 109: key = NSF10FunctionKey; break; - case 103: key = NSF11FunctionKey; break; - case 111: key = NSF12FunctionKey; break; - case 105: key = NSF13FunctionKey; break; - case 107: key = NSF14FunctionKey; break; - case 113: key = NSF15FunctionKey; break; - case 106: key = NSF16FunctionKey; break; - // Forward delete is a terrible name so we'll use the glyph Apple puts on - // their current keyboards - case 117: key = 0x2326; break; - - // Now we have keys that can be hard coded but don't have good glyph - // representations. Sure, the Apple menu manager has glyphs for them, but - // an informal poll of Google developers shows no one really knows what - // they mean, so its probably a good idea to use strings. Unfortunately - // this also means localization (*sigh*). We'll use the real English - // strings here as keys so that even if localization is missed we'll do OK - // in output. - - // Whitespace - case 36: key = '\r'; localizedKey = @"Return"; break; - case 76: key = 0x3; localizedKey = @"Enter"; break; - case 48: key = 0x9; localizedKey = @"Tab"; break; - case 49: key = 0xA0; localizedKey = @"Space"; break; - // Control keys - case 51: key = 0x8; localizedKey = @"Delete"; break; - case 71: key = NSClearDisplayFunctionKey; localizedKey = @"Clear"; break; - case 53: key = 0x1B; localizedKey = @"Esc"; break; - case 115: key = NSHomeFunctionKey; localizedKey = @"Home"; break; - case 116: key = NSPageUpFunctionKey; localizedKey = @"Page Up"; break; - case 119: key = NSEndFunctionKey; localizedKey = @"End"; break; - case 121: key = NSPageDownFunctionKey; localizedKey = @"Page Down"; break; - case 114: key = NSHelpFunctionKey; localizedKey = @"Help"; break; - // Keypad keys - // There is no good way we could find to glyph these. We tried a variety - // of Unicode glyphs, and the menu manager wouldn't take them. We tried - // subscript numbers, circled numbers and superscript numbers with no - // luck. It may be a bit confusing to the user, but we're happy to hear - // any suggestions. - case 65: key = '.'; localizedKey = @"Keypad ."; break; - case 67: key = '*'; localizedKey = @"Keypad *"; break; - case 69: key = '+'; localizedKey = @"Keypad +"; break; - case 75: key = '/'; localizedKey = @"Keypad /"; break; - case 78: key = '-'; localizedKey = @"Keypad -"; break; - case 81: key = '='; localizedKey = @"Keypad ="; break; - case 82: key = '0'; localizedKey = @"Keypad 0"; break; - case 83: key = '1'; localizedKey = @"Keypad 1"; break; - case 84: key = '2'; localizedKey = @"Keypad 2"; break; - case 85: key = '3'; localizedKey = @"Keypad 3"; break; - case 86: key = '4'; localizedKey = @"Keypad 4"; break; - case 87: key = '5'; localizedKey = @"Keypad 5"; break; - case 88: key = '6'; localizedKey = @"Keypad 6"; break; - case 89: key = '7'; localizedKey = @"Keypad 7"; break; - case 91: key = '8'; localizedKey = @"Keypad 8"; break; - case 92: key = '9'; localizedKey = @"Keypad 9"; break; - - } - - // If they asked for strings, and we have one return it. Otherwise, return - // any key we've picked. - if (!useGlyph && localizedKey) { - return NSLocalizedStringFromTableInBundle(localizedKey, @"KeyCode", - bundle, @""); - } else if (key != 0) { - return [NSString stringWithFormat:@"%C", key]; - } - - // Everything else should be printable so look it up in the current keyboard - UCKeyboardLayout *uchrData = NULL; - - OSStatus err = noErr; -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - // layout - KeyboardLayoutRef currentLayout = NULL; - // Get the layout kind - SInt32 currentLayoutKind = -1; - if ([GTMSystemVersion isLeopardOrGreater] - && kGTM_TISPropertyUnicodeKeyLayoutData - && GTM_TISGetInputSourceProperty - && GTM_TISCopyCurrentKeyboardLayoutInputSource) { - // On Leopard we use the new improved TIS interfaces which work for input - // sources as well as keyboard layouts. - TISInputSourceRef inputSource - = GTM_TISCopyCurrentKeyboardLayoutInputSource(); - if (inputSource) { - CFDataRef uchrDataRef - = GTM_TISGetInputSourceProperty(inputSource, - kGTM_TISPropertyUnicodeKeyLayoutData); - if(uchrDataRef) { - uchrData = (UCKeyboardLayout*)CFDataGetBytePtr(uchrDataRef); - } - CFRelease(inputSource); - } - } else { - // Tiger we use keyboard layouts as it's the best we can officially do. - err = KLGetCurrentKeyboardLayout(¤tLayout); - if (err != noErr) { // COV_NF_START - _GTMDevLog(@"failed to fetch the keyboard layout, err=%d", err); - return nil; - } // COV_NF_END - - err = KLGetKeyboardLayoutProperty(currentLayout, - kKLKind, - (const void **)¤tLayoutKind); - if (err != noErr) { // COV_NF_START - _GTMDevLog(@"failed to fetch the keyboard layout kind property, err=%d", - err); - return nil; - } // COV_NF_END - - if (currentLayoutKind != kKLKCHRKind) { - err = KLGetKeyboardLayoutProperty(currentLayout, - kKLuchrData, - (const void **)&uchrData); - if (err != noErr) { // COV_NF_START - _GTMDevLog(@"failed to fetch the keyboard layout uchar data, err=%d", - err); - return nil; - } // COV_NF_END - } - } -#else - TISInputSourceRef inputSource = TISCopyCurrentKeyboardLayoutInputSource(); - if (inputSource) { - CFDataRef uchrDataRef - = TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData); - if(uchrDataRef) { - uchrData = (UCKeyboardLayout*)CFDataGetBytePtr(uchrDataRef); - } - CFRelease(inputSource); - } -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - - NSString *keystrokeString = nil; - if (uchrData) { - // uchr layout data is available, this is our preference - UniCharCount uchrCharLength = 0; - UniChar uchrChars[256] = { 0 }; - UInt32 uchrDeadKeyState = 0; - err = UCKeyTranslate(uchrData, - keycode, - kUCKeyActionDisplay, - 0, // No modifiers - LMGetKbdType(), - kUCKeyTranslateNoDeadKeysMask, - &uchrDeadKeyState, - sizeof(uchrChars) / sizeof(UniChar), - &uchrCharLength, - uchrChars); - if (err != noErr) { - // COV_NF_START - _GTMDevLog(@"failed to translate the keycode, err=%d", err); - return nil; - // COV_NF_END - } - if (uchrCharLength < 1) return nil; - keystrokeString = [NSString stringWithCharacters:uchrChars - length:uchrCharLength]; - } -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - else if (currentLayoutKind == kKLKCHRKind) { - // Only KCHR layout data is available, go old school - void *KCHRData = NULL; - err = KLGetKeyboardLayoutProperty(currentLayout, kKLKCHRData, - (const void **)&KCHRData); - if (err != noErr) { // COV_NF_START - _GTMDevLog(@"failed to fetch the keyboard layout uchar data, err=%d", - err); - return nil; - } // COV_NF_END - // Turn into character code - UInt32 keyTranslateState = 0; - UInt32 twoKCHRChars = KeyTranslate(KCHRData, keycode, &keyTranslateState); - if (!twoKCHRChars) return nil; - // Unpack the fields - char firstChar = (char)((twoKCHRChars & 0x00FF0000) >> 16); - char secondChar = (char)(twoKCHRChars & 0x000000FF); - // May have one or two characters - if (firstChar && secondChar) { - NSString *str1 - = [[[NSString alloc] initWithBytes:&firstChar - length:1 - encoding:NSMacOSRomanStringEncoding] autorelease]; - NSString *str2 - = [[[NSString alloc] initWithBytes:&secondChar - length:1 - encoding:NSMacOSRomanStringEncoding] autorelease]; - keystrokeString = [NSString stringWithFormat:@"%@%@", - [str1 uppercaseString], - [str2 uppercaseString]]; - } else { - keystrokeString = [[[NSString alloc] initWithBytes:&secondChar - length:1 - encoding:NSMacOSRomanStringEncoding] autorelease]; - [keystrokeString uppercaseString]; - } - } -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - - // Sanity we got a stroke - if (!keystrokeString || ![keystrokeString length]) return nil; - - // Sanity check the keystroke string for unprintable characters - NSMutableCharacterSet *validChars = - [[[NSMutableCharacterSet alloc] init] autorelease]; - - [validChars formUnionWithCharacterSet:[NSCharacterSet alphanumericCharacterSet]]; - [validChars formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]]; - [validChars formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]]; - for (unsigned int i = 0; i < [keystrokeString length]; i++) { - if (![validChars characterIsMember:[keystrokeString characterAtIndex:i]]) { - return nil; - } - } - - if (!useGlyph) { - // menus want glyphs in the original lowercase forms, so we only upper this - // if we aren't using it as a glyph. - keystrokeString = [keystrokeString uppercaseString]; - } - - return keystrokeString; - -} - -@end - -@implementation GTMHotKeyFieldEditor - -GTMOBJECT_SINGLETON_BOILERPLATE(GTMHotKeyFieldEditor, sharedHotKeyFieldEditor) - -- (id)init { - - self = [super init]; - if (!self) return nil; - [self setFieldEditor:YES]; // We are a field editor - - return self; - -} - -- (void)dealloc { - - [hotKeyDict_ release]; - [super dealloc]; - -} - -- (NSArray *)acceptableDragTypes { - - // Don't take drags - return [NSArray array]; - -} - -- (NSArray *)readablePasteboardTypes { - - // No pasting - return [NSArray array]; - -} - -- (NSArray *)writablePasteboardTypes { - - // No copying - return [NSArray array]; - -} - -- (BOOL)becomeFirstResponder { - - // We need to lose focus any time the window is not key - NSNotificationCenter *dc = [NSNotificationCenter defaultCenter]; - [dc addObserver:self - selector:@selector(windowResigned:) - name:NSWindowDidResignKeyNotification - object:[self window]]; - return [super becomeFirstResponder]; - -} - -- (BOOL)resignFirstResponder { - - // No longer interested in window resign - [[NSNotificationCenter defaultCenter] removeObserver:self]; - return [super resignFirstResponder]; - -} - -// Private method we use to get out of global hotkey capture when the window -// is no longer front -- (void)windowResigned:(NSNotification *)notification { - - // Lose our focus - [[self window] makeFirstResponder:[self window]]; - -} - -- (BOOL)shouldDrawInsertionPoint { - - // Show an insertion point, because we'll kill our own focus after - // each entry - return YES; - -} - -- (NSRange)selectionRangeForProposedRange:(NSRange)proposedSelRange - granularity:(NSSelectionGranularity)granularity { - - // Always select everything - return NSMakeRange(0, [[self textStorage] length]); - -} - -- (void)keyDown:(NSEvent *)theEvent { - - if ([self shouldBypassEvent:theEvent]) { - [super keyDown:theEvent]; - } else { - // Try to eat the event - [self processEventToHotKeyAndString:theEvent]; - } - -} - -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent { - - if ([self shouldBypassEvent:theEvent]) { - return [super performKeyEquivalent:theEvent]; - } else { - // We always eat these key strokes while we have focus - [self processEventToHotKeyAndString:theEvent]; - return YES; - } - -} - -// Private do method that tell us to ignore certain events -- (BOOL)shouldBypassEvent:(NSEvent *)theEvent { - - UInt16 keyCode = [theEvent keyCode]; - NSUInteger modifierFlags - = [theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask; - - // Ignore all events containing tabs. They have special meaning to fields - // and some (Cmd Tab variants) are always consumed by the Dock, so users - // just shouldn't be able to use them. - if (keyCode == 48) { // Tab - // Just to be extra clear if the user is trying to use Dock hotkeys beep - // at them - if ((modifierFlags == NSCommandKeyMask) || - (modifierFlags == (NSCommandKeyMask | NSShiftKeyMask))) { - NSBeep(); - } - return YES; - } - - // Don't eat Cmd-Q. Users could have it as a hotkey, but its more likely - // they're trying to quit - if ((keyCode == 12) && (modifierFlags == NSCommandKeyMask)) { - return YES; - } - // Same for Cmd-W, user is probably trying to close the window - if ((keyCode == 13) && (modifierFlags == NSCommandKeyMask)) { - return YES; - } - - return NO; - -} - -// Private method that turns events into strings and dictionaries for our -// hotkey plumbing. -- (void)processEventToHotKeyAndString:(NSEvent *)theEvent { - - // Construct a dictionary of the event as a hotkey pref - NSDictionary *newHotKey = [self hotKeyDictionaryForEvent:theEvent]; - if (!newHotKey) { - NSBeep(); - return; // No action, but don't give up focus - } - NSString *prettyString = [GTMHotKeyTextField displayStringForHotKey:newHotKey]; - if (!prettyString) { - NSBeep(); - return; - } - - // Replacement range - NSRange replaceRange = NSMakeRange(0, [[self textStorage] length]); - - // Ask for permission to replace - if (![self shouldChangeTextInRange:replaceRange - replacementString:prettyString]) { - // If replacement was disallowed, change nothing, including hotKeyDict_ - NSBeep(); - return; - } - - // Replacement was allowed, update - [hotKeyDict_ autorelease]; - hotKeyDict_ = [newHotKey retain]; - - // Set string on self, allowing super to handle attribute copying - [self setString:prettyString]; - - // Finish the change - [self didChangeText]; - - // Force editing to end. This sends focus off into space slightly, but - // its better than constantly capturing user events. This is exactly - // like the Apple editor in their Keyboard pref pane. - [[[self delegate] cell] endEditing:self]; - -} - -- (NSDictionary *)hotKeyDictionary { - - return hotKeyDict_; - -} - -- (void)setHotKeyDictionary:(NSDictionary *)hotKey { - - [hotKeyDict_ autorelease]; - hotKeyDict_ = [hotKey copy]; - // Update content - NSString *prettyString = nil; - if (hotKeyDict_) { - prettyString = [GTMHotKeyTextField displayStringForHotKey:hotKey]; - } - if (!prettyString) { - prettyString = @""; - } - [self setString:prettyString]; - -} - -- (NSDictionary *)hotKeyDictionaryForEvent:(NSEvent *)event{ - - if (!event) return nil; - - // Check event - NSUInteger flags = [event modifierFlags]; - UInt16 keycode = [event keyCode]; - // If the event has no modifiers do nothing - NSUInteger allModifiers = (NSCommandKeyMask | NSAlternateKeyMask | - NSControlKeyMask | NSShiftKeyMask); - if (!(flags & allModifiers)) return nil; - // If the event has high bits in keycode do nothing - if (keycode & 0xFF00) return nil; - - // Clean the flags to only contain things we care about - UInt32 cleanFlags = 0; - if (flags & NSCommandKeyMask) cleanFlags |= NSCommandKeyMask; - if (flags & NSAlternateKeyMask) cleanFlags |= NSAlternateKeyMask; - if (flags & NSControlKeyMask) cleanFlags |= NSControlKeyMask; - if (flags & NSShiftKeyMask) cleanFlags |= NSShiftKeyMask; - - return [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:keycode], - kGTMHotKeyKeyCodeKey, - [NSNumber numberWithUnsignedInt:cleanFlags], - kGTMHotKeyModifierFlagsKey, - nil]; - -} -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextFieldTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextFieldTest.m deleted file mode 100644 index ee1bfc2b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMHotKeyTextFieldTest.m +++ /dev/null @@ -1,204 +0,0 @@ -// GTMHotKeyTextFieldTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMHotKeyTextField.h" - -#import "GTMSenTestCase.h" - -@interface GTMHotKeyTextField (PrivateMethods) -// Private methods which we want to access to test -+ (BOOL)isValidHotKey:(NSDictionary *)hotKey; -+ (NSString *)displayStringForHotKey:(NSDictionary *)hotKey; -@end - -@interface GTMHotKeyTextFieldTest : GTMTestCase -@end - -@implementation GTMHotKeyTextFieldTest - -- (void)testStringForModifierFlags { - - // Make sure only the flags we expect generate things in their strings - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSAlphaShiftKeyMask] length], - (NSUInteger)0, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSShiftKeyMask] length], - (NSUInteger)1, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSControlKeyMask] length], - (NSUInteger)1, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSAlternateKeyMask] length], - (NSUInteger)1, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSCommandKeyMask] length], - (NSUInteger)1, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSNumericPadKeyMask] length], - (NSUInteger)0, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSHelpKeyMask] length], - (NSUInteger)0, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:NSFunctionKeyMask] length], - (NSUInteger)0, nil); - - // And some quick checks combining flags to make sure the string gets longer - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:(NSShiftKeyMask | - NSAlternateKeyMask)] length], - (NSUInteger)2, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:(NSShiftKeyMask | - NSAlternateKeyMask | - NSCommandKeyMask)] length], - (NSUInteger)3, nil); - STAssertEquals([[GTMHotKeyTextField stringForModifierFlags:(NSShiftKeyMask | - NSAlternateKeyMask | - NSCommandKeyMask | - NSControlKeyMask)] length], - (NSUInteger)4, nil); - -} - -- (void)testStringForKeycode_useGlyph_resourceBundle { - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - STAssertNotNil(bundle, @"failed to get our bundle?"); - NSString *str; - - // We need a better test, but for now, we'll just loop through things we know - // we handle. - - // TODO: we need to force the pre leopard code path during tests. - - UInt16 testData[] = { - 123, 124, 125, 126, 122, 120, 99, 118, 96, 97, 98, 100, 101, 109, 103, 111, - 105, 107, 113, 106, 117, 36, 76, 48, 49, 51, 71, 53, 115, 116, 119, 121, - 114, 65, 67, 69, 75, 78, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, - }; - for (int useGlyph = 0 ; useGlyph < 2 ; ++useGlyph) { - for (size_t i = 0; i < (sizeof(testData) / sizeof(UInt16)); ++i) { - UInt16 keycode = testData[i]; - - str = [GTMHotKeyTextField stringForKeycode:keycode - useGlyph:useGlyph - resourceBundle:bundle]; - STAssertNotNil(str, - @"failed to get a string for keycode %u (useGlyph:%@)", - keycode, (useGlyph ? @"YES" : @"NO")); - STAssertGreaterThan([str length], (NSUInteger)0, - @"got an empty string for keycode %u (useGlyph:%@)", - keycode, (useGlyph ? @"YES" : @"NO")); - } - } -} - -- (void)testGTMHotKeyPrettyString { - NSDictionary *hkDict; - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertNotNil([GTMHotKeyTextField displayStringForHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertNotNil([GTMHotKeyTextField displayStringForHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertNotNil([GTMHotKeyTextField displayStringForHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertNil([GTMHotKeyTextField displayStringForHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionary]; - STAssertNotNil(hkDict, nil); - STAssertNil([GTMHotKeyTextField displayStringForHotKey:hkDict], nil); - - STAssertNil([GTMHotKeyTextField displayStringForHotKey:nil], nil); - -} - -- (void)testGTMHotKeyDictionaryAppearsValid { - NSDictionary *hkDict; - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertTrue([GTMHotKeyTextField isValidHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:NSCommandKeyMask], - kGTMHotKeyModifierFlagsKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:NO], - kGTMHotKeyDoubledModifierKey, - [NSNumber numberWithUnsignedInt:114], - kGTMHotKeyKeyCodeKey, - nil]; - STAssertNotNil(hkDict, nil); - STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil); - - hkDict = [NSDictionary dictionary]; - STAssertNotNil(hkDict, nil); - STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil); - - STAssertFalse([GTMHotKeyTextField isValidHotKey:nil], nil); - - // Make sure it doesn't choke w/ an object of the wrong time (since the dicts - // have to be saved/reloaded. - hkDict = (id)[NSString string]; - STAssertNotNil(hkDict, nil); - STAssertFalse([GTMHotKeyTextField isValidHotKey:hkDict], nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.h deleted file mode 100644 index 0a7759f5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// GTMLargeTypeWindow.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// GTMLargeTypeWindow displays a block of text in a large panel window much -// like Address Book displays phone numbers. It will also display an image -// so you can pop up "alerts" similar to the way BBEdit does when you attempt -// to do a find and find nothing. It will fade in and out appropriately when -// ordered forward or backward. -// A typical fire-and-forget type usage would be: -// GTMLargeTypeWindow *window -// = [[[GTMLargeTypeWindow alloc] initWithString:@"Foo"] autorelease]; -// [window makeKeyAndOrderFront:nil]; - -// NB This class appears to have a problem with GC on 10.5.6 and below. -// Radar 6137322 CIFilter crashing when run with GC enabled -// This appears to be an Apple bug with GC. -// We do a copy animation that causes things to crash, but only with GC -// on. Currently I have left this enabled in GTMLargeTypeWindow pending -// info from Apple on the bug. It's hard to reproduce, and only appears -// at this time on our test machines. -// Dual-Core Intel Xeon with ATI Radeon X1300 - -// Amount of time to fade the window in or out -const NSTimeInterval kGTMLargeTypeWindowFadeTime; - -@interface GTMLargeTypeWindow : NSPanel -// Creates a display window with |string| displayed. -// Formats |string| as best as possible to fill the screen. -- (id)initWithString:(NSString *)string; -// Creates a display window with |attrString| displayed. -// Expects you to format it as you want it to appear. -- (id)initWithAttributedString:(NSAttributedString *)attrString; -// Creates a display window with |image| displayed. -// Make sure you set the image size to what you want -- (id)initWithImage:(NSImage*)image; -// Creates a display window with |view| displayed. -- (id)initWithContentView:(NSView *)view; - -// Copy the text out of the window if appropriate. This is normally called -// as part of the responder chain so that the user can copy the displayed text -// using cmd-c. -- (void)copy:(id)sender; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.m deleted file mode 100644 index 97847aaa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindow.m +++ /dev/null @@ -1,366 +0,0 @@ -// -// GTMLargeTypeWindow.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import "GTMLargeTypeWindow.h" -#import "GTMGeometryUtils.h" -#import "GTMNSBezierPath+RoundRect.h" -#import "GTMMethodCheck.h" - -// Amount of time to fade the window in or out -const NSTimeInterval kGTMLargeTypeWindowFadeTime = 0.333; - -// How far to inset the text from the edge of the window -static const CGFloat kEdgeInset = 16.0; - -// Give us an alpha value for our backing window -static const CGFloat kTwoThirdsAlpha = 0.66; - -@interface GTMLargeTypeCopyAnimation : NSAnimation -@end - -@interface GTMLargeTypeBackgroundView : NSView { - CIFilter *transition_; - GTMLargeTypeCopyAnimation *animation_; -} -- (void)animateCopy; -@end - -@interface GTMLargeTypeWindow (GTMLargeTypeWindowPrivate) -+ (CGFloat)displayWidth; -- (void)animateWithEffect:(NSString*)effect; -@end - -@implementation GTMLargeTypeWindow - -- (id)initWithString:(NSString *)string { - if ([string length] == 0) { - _GTMDevLog(@"GTMLargeTypeWindow got an empty string"); - [self release]; - return nil; - } - CGFloat displayWidth = [[self class] displayWidth]; - NSMutableAttributedString *attrString - = [[[NSMutableAttributedString alloc] initWithString:string] autorelease]; - - NSRange fullRange = NSMakeRange(0, [string length]); - [attrString addAttribute:NSForegroundColorAttributeName - value:[NSColor whiteColor] - range:fullRange]; - - NSMutableParagraphStyle *style - = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; - [style setAlignment:NSCenterTextAlignment]; - [attrString addAttribute:NSParagraphStyleAttributeName - value:style - range:fullRange]; - - NSShadow *textShadow = [[[NSShadow alloc] init] autorelease]; - [textShadow setShadowOffset:NSMakeSize( 5, -5 )]; - [textShadow setShadowBlurRadius:10]; - [textShadow setShadowColor:[NSColor colorWithCalibratedWhite:0 - alpha:kTwoThirdsAlpha]]; - [attrString addAttribute:NSShadowAttributeName - value:textShadow - range:fullRange]; - - // Try and find a size that fits without iterating too many times. - // We start going 50 pixels at a time, then 10, then 1 - int size = -26; // start at 24 (-26 + 50) - int offsets[] = { 50, 10, 1 }; - NSSize bigSize = NSMakeSize(MAXFLOAT, MAXFLOAT); - NSStringDrawingOptions options = (NSStringDrawingUsesDeviceMetrics | - NSStringDrawingOneShot); - for (size_t i = 0; i < sizeof(offsets) / sizeof(int); ++i) { - for(size = size + offsets[i]; size >= 24 && size < 300; size += offsets[i]) { - NSFont *font = [NSFont boldSystemFontOfSize:size] ; - [attrString addAttribute:NSFontAttributeName - value:font - range:fullRange]; - NSRect textSize = [attrString boundingRectWithSize:bigSize - options:options]; - NSSize maxAdvanceSize = [font maximumAdvancement]; - if (textSize.size.width + maxAdvanceSize.width > displayWidth) { - size = size - offsets[i]; - break; - } - } - } - - // Bounds check our values - if (size > 300) { - size = 300; - } else if (size < 24) { - size = 24; - } - [attrString addAttribute:NSFontAttributeName - value:[NSFont boldSystemFontOfSize:size] - range:fullRange]; - return [self initWithAttributedString:attrString]; -} - -- (id)initWithAttributedString:(NSAttributedString *)attrString { - if ([attrString length] == 0) { - _GTMDevLog(@"GTMLargeTypeWindow got an empty string"); - [self release]; - return nil; - } - CGFloat displayWidth =[[self class] displayWidth]; - NSRect frame = NSMakeRect(0, 0, displayWidth, 0); - NSTextView *textView = [[[NSTextView alloc] initWithFrame:frame] autorelease]; - [textView setEditable:NO]; - [textView setSelectable:NO]; - [textView setDrawsBackground:NO]; - [[textView textStorage] setAttributedString:attrString]; - [textView sizeToFit]; - - return [self initWithContentView:textView]; -} - -- (id)initWithImage:(NSImage*)image { - if (!image) { - _GTMDevLog(@"GTMLargeTypeWindow got an empty image"); - [self release]; - return nil; - } - NSRect rect = GTMNSRectOfSize([image size]); - NSImageView *imageView - = [[[NSImageView alloc] initWithFrame:rect] autorelease]; - [imageView setImage:image]; - return [self initWithContentView:imageView]; -} - -- (id)initWithContentView:(NSView *)view { - NSRect bounds = NSZeroRect; - if (view) { - bounds = [view bounds]; - } - if (!view || bounds.size.height <= 0 || bounds.size.width <= 0) { - _GTMDevLog(@"GTMLargeTypeWindow got an empty view"); - [self release]; - return nil; - } - NSRect screenRect = [[NSScreen mainScreen] frame]; - NSRect windowRect = GTMNSAlignRectangles([view frame], - screenRect, - GTMRectAlignCenter); - windowRect = NSInsetRect(windowRect, -kEdgeInset, -kEdgeInset); - windowRect = NSIntegralRect(windowRect); - NSUInteger mask = NSBorderlessWindowMask | NSNonactivatingPanelMask; - self = [super initWithContentRect:windowRect - styleMask:mask - backing:NSBackingStoreBuffered - defer:NO]; - if (self) { - [self setFrame:GTMNSAlignRectangles(windowRect, - screenRect, - GTMRectAlignCenter) - display:YES]; - [self setBackgroundColor:[NSColor clearColor]]; - [self setOpaque:NO]; - [self setLevel:NSFloatingWindowLevel]; - [self setHidesOnDeactivate:NO]; - - GTMLargeTypeBackgroundView *content - = [[[GTMLargeTypeBackgroundView alloc] initWithFrame:NSZeroRect] - autorelease]; - [self setHasShadow:YES]; - [self setContentView:content]; - [self setAlphaValue:0]; - [self setIgnoresMouseEvents:YES]; - [view setFrame:GTMNSAlignRectangles([view frame], - [content frame], - GTMRectAlignCenter)]; - [content addSubview:view]; - [self setInitialFirstResponder:view]; - } - return self; -} - -- (void)copy:(id)sender { - id firstResponder = [self initialFirstResponder]; - if ([firstResponder respondsToSelector:@selector(textStorage)]) { - NSPasteboard *pb = [NSPasteboard generalPasteboard]; - [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; - [pb setString:[[firstResponder textStorage] string] - forType:NSStringPboardType]; - } - - // Give the user some feedback that a copy has occurred - [(GTMLargeTypeBackgroundView*)[self contentView] animateCopy]; -} - -- (BOOL)canBecomeKeyWindow { - return YES; -} - -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent { - NSString *chars = [theEvent charactersIgnoringModifiers]; - NSUInteger flags = ([theEvent modifierFlags] & - NSDeviceIndependentModifierFlagsMask); - BOOL isValid = (flags == NSCommandKeyMask) && [chars isEqualToString:@"c"]; - if (isValid) { - [self copy:self]; - } - return isValid; -} - -- (void)keyDown:(NSEvent *)theEvent { - [self close]; -} - -- (void)resignKeyWindow { - [super resignKeyWindow]; - if([self isVisible]) { - [self close]; - } -} - -- (void)makeKeyAndOrderFront:(id)sender { - [super makeKeyAndOrderFront:sender]; - [self animateWithEffect:NSViewAnimationFadeInEffect]; -} - -- (void)orderFront:(id)sender { - [super orderFront:sender]; - [self animateWithEffect:NSViewAnimationFadeInEffect]; -} - -- (void)orderOut:(id)sender { - [self animateWithEffect:NSViewAnimationFadeOutEffect]; - [super orderOut:sender]; -} - -+ (CGFloat)displayWidth { - NSRect screenRect = [[NSScreen mainScreen] frame]; - // This is just a rough calculation to make us fill a good proportion - // of the main screen. - return NSWidth( screenRect ) * 11.0 / 12.0 - 2.0 * kEdgeInset; -} - -- (void)animateWithEffect:(NSString*)effect { - NSDictionary *fadeIn = [NSDictionary dictionaryWithObjectsAndKeys: - self, NSViewAnimationTargetKey, - effect, NSViewAnimationEffectKey, - nil]; - NSArray *animation = [NSArray arrayWithObject:fadeIn]; - NSViewAnimation *viewAnim - = [[[NSViewAnimation alloc] initWithViewAnimations:animation] autorelease]; - [viewAnim setDuration:kGTMLargeTypeWindowFadeTime]; - [viewAnim setAnimationBlockingMode:NSAnimationBlocking]; - [viewAnim startAnimation]; -} -@end - -@implementation GTMLargeTypeBackgroundView -GTM_METHOD_CHECK(NSBezierPath, gtm_appendBezierPathWithRoundRect:cornerRadius:); - -- (void)dealloc { - // If we get released while animating, we'd better clean up. - [animation_ stopAnimation]; - [animation_ release]; - [transition_ release]; - [super dealloc]; -} - -- (BOOL)isOpaque { - return NO; -} - -- (void)drawRect:(NSRect)rect { - rect = [self bounds]; - NSBezierPath *roundRect = [NSBezierPath bezierPath]; - CGFloat minRadius = MIN(NSWidth(rect), NSHeight(rect)) * 0.5f; - - [roundRect gtm_appendBezierPathWithRoundRect:rect - cornerRadius:MIN(minRadius, 32)]; - [roundRect addClip]; - if (transition_) { - NSNumber *val = [NSNumber numberWithFloat:[animation_ currentValue]]; - [transition_ setValue:val forKey:@"inputTime"]; - CIImage *outputCIImage = [transition_ valueForKey:@"outputImage"]; - [outputCIImage drawInRect:rect - fromRect:rect - operation:NSCompositeSourceOver - fraction:1.0]; - } else { - [[NSColor colorWithDeviceWhite:0 alpha:kTwoThirdsAlpha] set]; - - NSRectFill(rect); - } -} - -- (void)animateCopy { - // This does a photocopy swipe to show folks that their copy has succceeded - // Store off a copy of our background - NSRect bounds = [self bounds]; - NSBitmapImageRep *rep = [self bitmapImageRepForCachingDisplayInRect:bounds]; - NSGraphicsContext *context = [NSGraphicsContext graphicsContextWithBitmapImageRep:rep]; - [NSGraphicsContext saveGraphicsState]; - [NSGraphicsContext setCurrentContext:context]; - [self drawRect:bounds]; - [NSGraphicsContext restoreGraphicsState]; - CIVector *extent = [CIVector vectorWithX:bounds.origin.x - Y:bounds.origin.y - Z:bounds.size.width - W:bounds.size.height]; - CIFilter *transition = [CIFilter filterWithName:@"CICopyMachineTransition"]; - [transition setDefaults]; - [transition setValue:extent - forKey:@"inputExtent"]; - CIImage *image = [[CIImage alloc] initWithBitmapImageRep:rep]; - - [transition setValue:image forKey:@"inputImage"]; - [transition setValue:image forKey:@"inputTargetImage"]; - [transition setValue:[NSNumber numberWithInt:0] - forKey:@"inputTime"]; - [transition valueForKey:@"outputImage"]; - [image release]; - transition_ = [transition retain]; - animation_ = [[GTMLargeTypeCopyAnimation alloc] initWithDuration:0.5 - animationCurve:NSAnimationLinear]; - [animation_ setFrameRate:0.0f]; - [animation_ setDelegate:self]; - [animation_ setAnimationBlockingMode:NSAnimationBlocking]; - [animation_ startAnimation]; -} - -- (void)animationDidEnd:(NSAnimation*)animation { - [animation_ release]; - animation_ = nil; - [transition_ release]; - transition_ = nil; - [self display]; -} - -- (float)animation:(NSAnimation*)animation - valueForProgress:(NSAnimationProgress)progress { - // This gives us half the copy animation, so we don't swing back - // Don't want too much gratuitous effect - // 0.6 is required by experimentation. 0.5 doesn't do it - return progress * 0.6f; -} -@end - -@implementation GTMLargeTypeCopyAnimation -- (void)setCurrentProgress:(NSAnimationProgress)progress { - [super setCurrentProgress:progress]; - [[self delegate] display]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindowTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindowTest.m deleted file mode 100644 index 65ea1013..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLargeTypeWindowTest.m +++ /dev/null @@ -1,198 +0,0 @@ -// -// GTMLargeTypeWindowTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMLargeTypeWindow.h" -#import "GTMNSObject+UnitTesting.h" -#import "GTMUnitTestDevLog.h" -#import "GTMGarbageCollection.h" -#import "GTMSystemVersion.h" - -NSString *const kLongTextBlock = - @"`Twas brillig, and the slithy toves " - "Did gyre and gimble in the wabe: " - "all mimsy were the borogoves, " - "and the mome raths outgrabe. " - "Beware the Jabberwock, my son! " - "The jaws that bite, the claws that catch! " - "Beware the Jubjub bird, and shun " - "the frumious Bandersnatch! " - "He took his vorpal sword in hand: " - "long time the manxome foe he sought -- " - "so rested he by the Tumtum tree, " - "and stood awhile in thought. " - "And, as in uffish thought he stood, " - "the Jabberwock, with eyes of flame, " - "came whiffling through the tulgey wood, " - "and burbled as it came! " - "One, two! One, two! And through and through " - "the vorpal blade went snicker-snack! " - "He left it dead, and with its head " - "he went galumphing back. " - "And, has thou slain the Jabberwock? " - "Come to my arms, my beamish boy! " - "O frabjous day! Callooh! Callay! " - "He chortled in his joy."; - -NSString *const kMediumTextBlock = @"For the Snark was a Boojum, you see."; - -NSString *const kShortTextBlock = @"Short"; - -@interface GTMLargeTypeWindowTest : GTMTestCase -@end - -@implementation GTMLargeTypeWindowTest -- (BOOL)shouldDoAnimateCopy { - // NOTE: Animated copy tests are disabled when GC is on. - // See the comment/warning in the GTMLargeTypeWindow.h for more details, - // but we disable them to avoid the tests failing (crashing) when it's Apple's - // bug. Please bump the system check as appropriate when new systems are - // tested. Currently broken on 10.5.6 and below. - // Radar 6137322 CIFilter crashing when run with GC enabled - SInt32 major, minor, bugfix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugfix]; - if (!(GTMIsGarbageCollectionEnabled() - && major <= 10 && minor <= 5 && bugfix <= 6)) { - return YES; - } else { - NSLog(@"--- animated copy not run because of GC incompatibilites ---"); - return NO; - } -} - -- (void)testLargeTypeWindowIllegalInits { - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty string"]; - GTMLargeTypeWindow *window = [[[GTMLargeTypeWindow alloc] - initWithString:@""] autorelease]; - STAssertNil(window, nil); - - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty string"]; - window = [[[GTMLargeTypeWindow alloc] initWithString:nil] autorelease]; - STAssertNil(window, nil); - - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty string"]; - NSAttributedString *attrString = [[[NSAttributedString alloc] - initWithString:@""] autorelease]; - window = [[[GTMLargeTypeWindow alloc] - initWithAttributedString:attrString] autorelease]; - STAssertNil(window, nil); - - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty string"]; - window = [[[GTMLargeTypeWindow alloc] - initWithAttributedString:nil] autorelease]; - STAssertNil(window, nil); - - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty view"]; - window = [[[GTMLargeTypeWindow alloc] initWithContentView:nil] autorelease]; - STAssertNil(window, nil); - - [GTMUnitTestDevLog expectString:@"GTMLargeTypeWindow got an empty image"]; - window = [[[GTMLargeTypeWindow alloc] initWithImage:nil] autorelease]; - STAssertNil(window, nil); -} - -- (void)testLargeTypeWindowMediumText { - GTMLargeTypeWindow *window = [[[GTMLargeTypeWindow alloc] - initWithString:kMediumTextBlock] autorelease]; - STAssertNotNil(window, nil); - STAssertTrue([window canBecomeKeyWindow], nil); - [window makeKeyAndOrderFront:nil]; - NSDate *endDate - = [NSDate dateWithTimeIntervalSinceNow:kGTMLargeTypeWindowFadeTime]; - [[NSRunLoop currentRunLoop] runUntilDate:endDate]; - GTMAssertObjectStateEqualToStateNamed(window, - @"GTMLargeTypeWindowMediumTextTest", - nil); - if ([self shouldDoAnimateCopy]) { - [window copy:nil]; - NSPasteboard *pb = [NSPasteboard generalPasteboard]; - NSString *pbString = [pb stringForType:NSStringPboardType]; - STAssertEqualObjects(pbString, kMediumTextBlock, nil); - } - [window keyDown:nil]; -} - -- (void)testLargeTypeWindowShortText { - GTMLargeTypeWindow *window = [[[GTMLargeTypeWindow alloc] - initWithString:kShortTextBlock] autorelease]; - STAssertNotNil(window, nil); - STAssertTrue([window canBecomeKeyWindow], nil); - [window makeKeyAndOrderFront:nil]; - NSDate *endDate - = [NSDate dateWithTimeIntervalSinceNow:kGTMLargeTypeWindowFadeTime]; - [[NSRunLoop currentRunLoop] runUntilDate:endDate]; - GTMAssertObjectStateEqualToStateNamed(window, - @"GTMLargeTypeWindowShortTextTest", - nil); - if ([self shouldDoAnimateCopy]) { - [window copy:nil]; - NSPasteboard *pb = [NSPasteboard generalPasteboard]; - NSString *pbString = [pb stringForType:NSStringPboardType]; - STAssertEqualObjects(pbString, kShortTextBlock, nil); - } - [window resignKeyWindow]; -} - -- (void)testLargeTypeWindowLongText { - GTMLargeTypeWindow *window = [[[GTMLargeTypeWindow alloc] - initWithString:kLongTextBlock] autorelease]; - STAssertNotNil(window, nil); - [window orderFront:nil]; - NSDate *endDate - = [NSDate dateWithTimeIntervalSinceNow:kGTMLargeTypeWindowFadeTime]; - [[NSRunLoop currentRunLoop] runUntilDate:endDate]; - // Can't do state for long text as it will wrap differently on different - // sized screens. - GTMAssertObjectStateEqualToStateNamed(window, - @"GTMLargeTypeWindowLongTextTest", - nil); - if ([self shouldDoAnimateCopy]) { - [window copy:nil]; - NSPasteboard *pb = [NSPasteboard generalPasteboard]; - NSString *pbString = [pb stringForType:NSStringPboardType]; - STAssertEqualObjects(pbString, kLongTextBlock, nil); - } - [window keyDown:nil]; -} - -- (void)testLargeTypeWindowImageText { - NSImage *image = [NSApp applicationIconImage]; - GTMLargeTypeWindow *window = [[[GTMLargeTypeWindow alloc] - initWithImage:image] autorelease]; - STAssertNotNil(window, nil); - [window makeKeyAndOrderFront:nil]; - NSDate *endDate - = [NSDate dateWithTimeIntervalSinceNow:kGTMLargeTypeWindowFadeTime]; - [[NSRunLoop currentRunLoop] runUntilDate:endDate]; - GTMAssertObjectStateEqualToStateNamed(window, - @"GTMLargeTypeWindowImageTest", - nil); - NSString *testString = @"TestString"; - NSPasteboard *pb = [NSPasteboard generalPasteboard]; - [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; - [pb setString:testString forType:NSStringPboardType]; - if ([self shouldDoAnimateCopy]) { - [window copy:nil]; - // Pasteboard should not change for an image - NSString *pbString = [pb stringForType:NSStringPboardType]; - STAssertEqualObjects(pbString, testString, nil); - } - [window resignKeyWindow]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.h deleted file mode 100644 index d85a4eb9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.h +++ /dev/null @@ -1,76 +0,0 @@ -// -// GTMLinearRGBShading.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMShading.h" -#import "GTMCalculatedRange.h" - -/// A shading that does returns smooth linear values for RGB. -// -/// Thus if you create a shading from 0.0->red to 1.0->blue you will get -/// \verbatim -/// - 0.5->purple -/// - 0.75->eggplant -/// - 0.25->magenta -/// \endverbatim - -@interface GTMLinearRGBShading : GTMCalculatedRange { -@private - CGFunctionRef function_; // function used to calculated shading (STRONG) - CGColorSpaceRef colorSpace_; // colorspace used for shading (STRONG) - BOOL isCalibrated_; // are we using calibrated or device RGB. - CGFloat colorValue_[4]; // the RGBA color values -} - -/// Generate a shading with color |begin| at position 0.0 and color |end| at 1.0. -// -// Args: -// begin: color at beginning of range -// end: color at end of range -// colorSpaceName: name of colorspace to draw into must be either -// NSCalibratedRGBColorSpace or NSDeviceRGBColorSpace -// -// Returns: -// a GTMLinearRGBShading -+ (id)shadingFromColor:(NSColor *)begin toColor:(NSColor *)end - fromSpaceNamed:(NSString*)colorSpaceName; - -/// Generate a shading with a collection of colors at various positions. -// -// Args: -// colors: a C style array containg the colors we are adding -// colorSpaceName: name of colorspace to draw into must be either -// NSCalibratedRGBColorSpace or NSDeviceRGBColorSpace -// positions: a C style array containg the positions we want to -// add the colors at -// numberOfColors: how many colors/positions we are adding -// -// Returns: -// a GTMLinearRGBShading -+ (id)shadingWithColors:(NSColor **)colors - fromSpaceNamed:(NSString*)colorSpaceName - atPositions:(CGFloat *)positions - count:(NSUInteger)numberOfColors; - -/// Designated initializer -// Args: -// colorSpaceName - name of the colorspace to use must be either -// NSCalibratedRGBColorSpace or NSDeviceRGBColorSpace -- (id)initWithColorSpaceName:(NSString*)colorSpaceName; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.m deleted file mode 100644 index 9434186c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShading.m +++ /dev/null @@ -1,204 +0,0 @@ -// -// GTMLinearRGBShading.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLinearRGBShading.h" -#import "GTMDefines.h" - -// Carbon callback function required for CoreGraphics -static void cShadeFunction(void *info, const CGFloat *inPos, CGFloat *outVals); - -@implementation GTMLinearRGBShading -+ (id)shadingFromColor:(NSColor *)begin toColor:(NSColor *)end - fromSpaceNamed:(NSString*)colorSpaceName { - NSColor *theColors[] = { begin, end }; - CGFloat thePositions[] = { 0.0, 1.0 }; - return [[self class] shadingWithColors:theColors - fromSpaceNamed:colorSpaceName - atPositions:thePositions - count:(sizeof(thePositions)/sizeof(CGFloat))]; -} - -+ (id)shadingWithColors:(NSColor **)colors fromSpaceNamed:(NSString*)colorSpaceName - atPositions:(CGFloat *)positions count:(NSUInteger)count { - - GTMLinearRGBShading *theShading = [[[[self class] alloc] initWithColorSpaceName:colorSpaceName] autorelease]; - for (NSUInteger i = 0; i < count; ++i) { - [theShading insertStop:colors[i] atPosition:positions[i]]; - } - return theShading; -} - -- (id)initWithColorSpaceName:(NSString*)colorSpaceName { - if ((self = [super init])) { - if ([colorSpaceName isEqualToString:NSDeviceRGBColorSpace]) { - isCalibrated_ = NO; - } else if ([colorSpaceName isEqualToString:NSCalibratedRGBColorSpace]) { - isCalibrated_ = YES; - } - else { - [self release]; - self = nil; - } - } - return self; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - if (nil != function_) { - CGFunctionRelease(function_); - } - if (nil != colorSpace_) { - CGColorSpaceRelease(colorSpace_); - } - [super finalize]; -} -#endif - -- (void)dealloc { - if (nil != function_) { - CGFunctionRelease(function_); - } - if (nil != colorSpace_) { - CGColorSpaceRelease(colorSpace_); - } - [super dealloc]; -} - - -- (void)insertStop:(id)item atPosition:(CGFloat)position { - NSString *colorSpaceName = isCalibrated_ ? NSCalibratedRGBColorSpace : NSDeviceRGBColorSpace; - NSColor *tempColor = [item colorUsingColorSpaceName: colorSpaceName]; - if (nil != tempColor) { - [super insertStop:tempColor atPosition:position]; - } -} - -// Calculate a linear value based on our stops -- (id)valueAtPosition:(CGFloat)position { - NSUInteger positionIndex = 0; - NSUInteger colorCount = [self stopCount]; - CGFloat stop1Position = 0.0; - NSColor *stop1Color = [self stopAtIndex:positionIndex position:&stop1Position]; - positionIndex += 1; - CGFloat stop2Position = 0.0; - NSColor *stop2Color = nil; - if (colorCount > 1) { - stop2Color = [self stopAtIndex:positionIndex position:&stop2Position]; - positionIndex += 1; - } else { - // if we only have one value, that's what we return - stop2Position = stop1Position; - stop2Color = stop1Color; - } - - while (positionIndex < colorCount && stop2Position < position) { - stop1Color = stop2Color; - stop1Position = stop2Position; - stop2Color = [self stopAtIndex:positionIndex position:&stop2Position]; - positionIndex += 1; - } - - if (position <= stop1Position) { - // if we are less than our lowest position, return our first color - [stop1Color getRed:&colorValue_[0] green:&colorValue_[1] - blue:&colorValue_[2] alpha:&colorValue_[3]]; - } else if (position >= stop2Position) { - // likewise if we are greater than our highest position, return the last color - [stop2Color getRed:&colorValue_[0] green:&colorValue_[1] - blue:&colorValue_[2] alpha:&colorValue_[3]]; - } else { - // otherwise interpolate between the two - position = (position - stop1Position) / (stop2Position - stop1Position); - CGFloat red1, red2, green1, green2, blue1, blue2, alpha1, alpha2; - [stop1Color getRed:&red1 green:&green1 blue:&blue1 alpha:&alpha1]; - [stop2Color getRed:&red2 green:&green2 blue:&blue2 alpha:&alpha2]; - - colorValue_[0] = (red2 - red1) * position + red1; - colorValue_[1] = (green2 - green1) * position + green1; - colorValue_[2] = (blue2 - blue1) * position + blue1; - colorValue_[3] = (alpha2 - alpha1) * position + alpha1; - } - - // Yes, I am casting a CGFloat[] to an id to pass it by the compiler. This - // significantly improves performance though as I avoid creating an NSColor - // for every scanline which later has to be cleaned up in an autorelease pool - // somewhere. Causes guardmalloc to run significantly faster. - return (id)colorValue_; -} - -// -// switch from C to obj-C. The callback to a shader is a c function -// but we want to call our objective c object to do all the -// calculations for us. We have passed our function our -// GTMLinearRGBShading as an obj-c object in the |info| so -// we just turn around and ask it to calculate our value based -// on |inPos| and then stick the results back in |outVals| -// -// Args: -// info: is the GTMLinearRGBShading as an -// obj-C object. -// inPos: the position to calculate values for. This is a pointer to -// a single float value -// outVals: where we store our return values. Since we are calculating -// an RGBA color, this is a pointer to an array of four float values -// ranging from 0.0 to 1.0 -// -// -static void cShadeFunction(void *info, const CGFloat *inPos, CGFloat *outVals) { - id object = (id)info; - CGFloat *colorValue = (CGFloat*)[object valueAtPosition:*inPos]; - outVals[0] = colorValue[0]; - outVals[1] = colorValue[1]; - outVals[2] = colorValue[2]; - outVals[3] = colorValue[3]; -} - -- (CGFunctionRef) shadeFunction { - // lazily create the function as necessary - if (nil == function_) { - // We have to go to carbon here, and create the CGFunction. Note that this - // diposed if necessary in the dealloc call. - const CGFunctionCallbacks shadeFunctionCallbacks = { 0, &cShadeFunction, NULL }; - - // TODO: this code assumes that we have a range from 0.0 to 1.0 - // which may not be true according to the stops that the user has given us. - // In general you have stops at 0.0 and 1.0, so this will do for right now - // but may be an issue in the future. - const CGFloat inRange[2] = { 0.0, 1.0 }; - const CGFloat outRange[8] = { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 }; - function_ = CGFunctionCreate(self, - sizeof(inRange) / (sizeof(CGFloat) * 2), inRange, - sizeof(outRange) / (sizeof(CGFloat) * 2), outRange, - &shadeFunctionCallbacks); - } - return function_; -} - -- (CGColorSpaceRef)colorSpace { - // lazily create the colorspace as necessary - if (nil == colorSpace_) { - if (isCalibrated_) { - colorSpace_ = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - } else { - colorSpace_ = CGColorSpaceCreateDeviceRGB(); - } - } - return colorSpace_; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShadingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShadingTest.m deleted file mode 100644 index 38802e60..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLinearRGBShadingTest.m +++ /dev/null @@ -1,132 +0,0 @@ -// -// GTMLinearRGBShadingTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMSenTestCase.h" -#import "GTMLinearRGBShading.h" - -@interface GTMLinearRGBShadingTest : GTMTestCase -@end - -@implementation GTMLinearRGBShadingTest -- (void)testShadingFrom { - // Create a shading from red to blue, and check if 50% is purple - NSColor *red = [NSColor redColor]; - NSColor *blue = [NSColor blueColor]; - NSColor *purple = [NSColor purpleColor]; - GTMLinearRGBShading *theShading = - [GTMLinearRGBShading shadingFromColor:red - toColor:blue - fromSpaceNamed:NSCalibratedRGBColorSpace]; - STAssertNotNil(theShading,nil); - STAssertEquals([theShading stopCount], (NSUInteger)2, nil); - CGFloat *theColor = (CGFloat*)[theShading valueAtPosition: 0.5]; - STAssertEqualsWithAccuracy(theColor[0], [purple redComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[1], [purple greenComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[2], [purple blueComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[3], [purple alphaComponent], 0.001, nil); -} - -- (void)testShadingWith { - // Create a shading with kColorCount colors and make sure all the values are there. - enum { kColorCount = 100 }; - NSColor *theColors[kColorCount]; - CGFloat thePositions[kColorCount]; - const CGFloat kColorIncrement = 1.0 / kColorCount; - for (NSUInteger i = 0; i < kColorCount; i++) { - CGFloat newValue = kColorIncrement * i; - thePositions[i] = newValue; - theColors[i] = [NSColor colorWithCalibratedRed:newValue - green:newValue - blue:newValue - alpha:newValue]; - } - GTMLinearRGBShading *theShading = - [GTMLinearRGBShading shadingWithColors:theColors - fromSpaceNamed:NSCalibratedRGBColorSpace - atPositions:thePositions - count:kColorCount]; - for (NSUInteger i = 0; i < kColorCount; i++) { - CGFloat newValue = kColorIncrement * i; - CGFloat *theColor = (CGFloat*)[theShading valueAtPosition:newValue]; - STAssertEqualsWithAccuracy(theColor[0], newValue, 0.001, nil); - STAssertEqualsWithAccuracy(theColor[1], newValue, 0.001, nil); - STAssertEqualsWithAccuracy(theColor[2], newValue, 0.001, nil); - STAssertEqualsWithAccuracy(theColor[3], newValue, 0.001, nil); - } - // Create a shading with 1 color to test that special handling - NSColor *purple = [NSColor purpleColor]; - NSColor *singleColor[1] = { purple }; - CGFloat singlePosition[1] = { 0.5 }; - theShading = - [GTMLinearRGBShading shadingWithColors:singleColor - fromSpaceNamed:NSCalibratedRGBColorSpace - atPositions:singlePosition - count:1]; - // test over a range to make sure we always get the same color - for (NSUInteger i = 0; i < kColorCount; i++) { - CGFloat newValue = kColorIncrement * i; - CGFloat *theColor = (CGFloat*)[theShading valueAtPosition:newValue]; - STAssertEqualsWithAccuracy(theColor[0], [purple redComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[1], [purple greenComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[2], [purple blueComponent], 0.001, nil); - STAssertEqualsWithAccuracy(theColor[3], [purple alphaComponent], 0.001, nil); - } -} - -- (void)testShadeFunction { - GTMLinearRGBShading *theShading = - [GTMLinearRGBShading shadingWithColors:nil - fromSpaceNamed:NSCalibratedRGBColorSpace - atPositions:nil - count:0]; - CGFunctionRef theFunction = [theShading shadeFunction]; - STAssertNotNULL(theFunction, nil); - STAssertEquals(CFGetTypeID(theFunction), CGFunctionGetTypeID(), nil); -} - -- (void)testColorSpace { - // Calibrated RGB - GTMLinearRGBShading *theShading = - [GTMLinearRGBShading shadingWithColors:nil - fromSpaceNamed:NSCalibratedRGBColorSpace - atPositions:nil - count:0]; - CGColorSpaceRef theColorSpace = [theShading colorSpace]; - STAssertNotNULL(theColorSpace, nil); - STAssertEquals(CFGetTypeID(theColorSpace), CGColorSpaceGetTypeID(), nil); - - // Device RGB - theShading = - [GTMLinearRGBShading shadingWithColors:nil - fromSpaceNamed:NSDeviceRGBColorSpace - atPositions:nil - count:0]; - theColorSpace = [theShading colorSpace]; - STAssertNotNULL(theColorSpace, nil); - STAssertEquals(CFGetTypeID(theColorSpace), CGColorSpaceGetTypeID(), nil); - - // Device CMYK (not supported) - theShading = - [GTMLinearRGBShading shadingWithColors:nil - fromSpaceNamed:NSDeviceCMYKColorSpace - atPositions:nil - count:0]; - STAssertNULL(theShading, nil); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.h deleted file mode 100644 index b4375b4c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// GTMLoginItems.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -/// Login items key constants, used as keys in |+loginItems| -// -// Item name -GTM_EXTERN NSString * const kGTMLoginItemsNameKey; -// Item path -GTM_EXTERN NSString * const kGTMLoginItemsPathKey; -// Hidden (NSNumber bool) -GTM_EXTERN NSString * const kGTMLoginItemsHiddenKey; - -/// GTMLoginItems -// -/// A helper class to manipulate the user's Login Items. -@interface GTMLoginItems : NSObject - -/// Obtain a complete list of all login items. -// -// Returns: -// Autoreleased array of dictionaries keyed with kGTMLoginItemsPathKey, etc. -// -+ (NSArray *)loginItems:(NSError **)errorInfo; - -/// Check if the given path is in the current user's Login Items -// -// Args: -// path: path to the application -// -// Returns: -// YES if the path is in the Login Items -// -+ (BOOL)pathInLoginItems:(NSString *)path; - -/// Check if the given name is in the current user's Login Items -// -// Args: -// name: name to the application -// -// Returns: -// YES if the name is in the Login Items -// -+ (BOOL)itemWithNameInLoginItems:(NSString *)name; - -/// Add the given path to the current user's Login Items. Does nothing if the -/// path is already there. -// -// Args: -// path: path to add -// hide: Set to YES to have the item launch hidden -// -+ (void)addPathToLoginItems:(NSString *)path hide:(BOOL)hide; - -/// Remove the given path from the current user's Login Items. Does nothing if -/// the path is not there. -// -// Args: -// path: the path to remove -// -+ (void)removePathFromLoginItems:(NSString *)path; - -/// Remove the given item name from the current user's Login Items. Does nothing -/// if no item with that name is present. -// -// Args: -// name: name of the item to remove -// -+ (void)removeItemWithNameFromLoginItems:(NSString *)name; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.m deleted file mode 100644 index f124ef50..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItems.m +++ /dev/null @@ -1,193 +0,0 @@ -// -// GTMLoginItems.m -// Based on AELoginItems from DTS. -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLoginItems.h" -#import "GTMDefines.h" - -#include - -// Exposed constants -NSString * const kGTMLoginItemsNameKey = @"Name"; -NSString * const kGTMLoginItemsPathKey = @"Path"; -NSString * const kGTMLoginItemsHiddenKey = @"Hide"; - -@interface GTMLoginItems (PrivateMethods) -+ (NSInteger)indexOfLoginItemWithValue:(id)value - forKey:(NSString *)key - loginItems:(NSArray *)items; -+ (BOOL)compileAndRunScript:(NSString *)script - withError:(NSError **)errorInfo; -@end - -@implementation GTMLoginItems (PrivateMethods) - -+ (NSInteger)indexOfLoginItemWithValue:(id)value - forKey:(NSString *)key - loginItems:(NSArray *)items { - if (!value || !key || !items) return NSNotFound; - NSDictionary *item = nil; - NSInteger found = -1; - GTM_FOREACH_OBJECT(item, items) { - ++found; - id itemValue = [item objectForKey:key]; - if (itemValue && [itemValue isEqual:value]) { - return found; - } - } - return NSNotFound; -} - -+ (BOOL)compileAndRunScript:(NSString *)script - withError:(NSError **)errorInfo { - if ([script length] == 0) { - // COV_NF_START - no real way to test this - if (errorInfo) - *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-90 userInfo:nil]; - return NO; - // COV_NF_END - } - NSAppleScript *query = [[[NSAppleScript alloc] initWithSource:script] autorelease]; - NSDictionary *errDict = nil; - if ( ![query compileAndReturnError:&errDict]) { - // COV_NF_START - no real way to test this - if (errorInfo) - *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-91 userInfo:errDict]; - return NO; - // COV_NF_END - } - NSAppleEventDescriptor *scriptResult = [query executeAndReturnError:&errDict]; - if (!scriptResult) { - // COV_NF_START - no real way to test this - if (errorInfo) - *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-92 userInfo:errDict]; - return NO; - // COV_NF_END - } - // we don't process the result - return YES; -} - -@end - -@implementation GTMLoginItems - -+ (NSArray*)loginItems:(NSError **)errorInfo { - NSDictionary *errDict = nil; - // get the script compiled and saved off - static NSAppleScript *query = nil; - if (!query) { - NSString *querySource = @"tell application \"System Events\" to get properties of login items"; - query = [[NSAppleScript alloc] initWithSource:querySource]; - if ( ![query compileAndReturnError:&errDict]) { - // COV_NF_START - no real way to test this - if (errorInfo) - *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-1 userInfo:errDict]; - [query release]; - query = nil; - return nil; - // COV_NF_END - } - } - // run the script - NSAppleEventDescriptor *scriptResult = [query executeAndReturnError:&errDict]; - if (!scriptResult) { - // COV_NF_START - no real way to test this - if (errorInfo) - *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-2 userInfo:errDict]; - return nil; - // COV_NF_END - } - // build our results - NSMutableArray *result = [NSMutableArray array]; - NSInteger count = [scriptResult numberOfItems]; - for (NSInteger i = 0; i < count; ++i) { - NSAppleEventDescriptor *aeItem = [scriptResult descriptorAtIndex:i+1]; - NSAppleEventDescriptor *hidn = [aeItem descriptorForKeyword:kAEHidden]; - NSAppleEventDescriptor *nam = [aeItem descriptorForKeyword:pName]; - NSAppleEventDescriptor *ppth = [aeItem descriptorForKeyword:'ppth']; - NSMutableDictionary *item = [NSMutableDictionary dictionary]; - if (hidn && [hidn booleanValue]) { - [item setObject:[NSNumber numberWithBool:YES] forKey:kGTMLoginItemsHiddenKey]; - } - if (nam) { - NSString *name = [nam stringValue]; - if (name) { - [item setObject:name forKey:kGTMLoginItemsNameKey]; - } - } - if (ppth) { - NSString *path = [ppth stringValue]; - if (path) { - [item setObject:path forKey:kGTMLoginItemsPathKey]; - } - } - [result addObject:item]; - } - - return result; -} - -+ (BOOL)pathInLoginItems:(NSString *)path { - NSArray *loginItems = [self loginItems:nil]; - NSInteger itemIndex = [self indexOfLoginItemWithValue:path - forKey:kGTMLoginItemsPathKey - loginItems:loginItems]; - return (itemIndex != NSNotFound) ? YES : NO; -} - -+ (BOOL)itemWithNameInLoginItems:(NSString *)name { - NSArray *loginItems = [self loginItems:nil]; - NSInteger itemIndex = [self indexOfLoginItemWithValue:name - forKey:kGTMLoginItemsNameKey - loginItems:loginItems]; - return (itemIndex != NSNotFound) ? YES : NO; -} - -+ (void)addPathToLoginItems:(NSString*)path hide:(BOOL)hide { - if (!path) return; - // make sure it isn't already there - if ([self pathInLoginItems:path]) return; - // now append it - NSString *scriptSource = - [NSString stringWithFormat: - @"tell application \"System Events\" to make new login item with properties { path:\"%s\", hidden:%s } at end", - [path UTF8String], - (hide ? "yes" : "no")]; - [self compileAndRunScript:scriptSource withError:nil]; -} - -+ (void)removePathFromLoginItems:(NSString*)path { - if ([path length] == 0) return; - NSString *scriptSource = - [NSString stringWithFormat: - @"tell application \"System Events\" to delete (login items whose path is \"%s\")", - [path UTF8String]]; - [self compileAndRunScript:scriptSource withError:nil]; -} - -+ (void)removeItemWithNameFromLoginItems:(NSString *)name { - if ([name length] == 0) return; - NSString *scriptSource = - [NSString stringWithFormat: - @"tell application \"System Events\" to delete (login items whose name is \"%s\")", - [name UTF8String]]; - [self compileAndRunScript:scriptSource withError:nil]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItemsTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItemsTest.m deleted file mode 100644 index 50b74820..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMLoginItemsTest.m +++ /dev/null @@ -1,137 +0,0 @@ -// -// GTMLoginItemsTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMSenTestCase.h" -#import "GTMLoginItems.h" - - // we don't really run this test because if someone had it in some automated - // tests, then if something did fail, it could leave things in the login items - // on the computer which could be a nasty surprise. -#define MODIFICATION_TESTS_ENABLED 0 - - -@interface GTMLoginItemsTest : GTMTestCase -@end - -static BOOL ItemsListHasPath(NSArray *items, NSString *path) { - NSDictionary *item = nil; - GTM_FOREACH_OBJECT(item, items) { - NSString *itemPath = [item objectForKey:kGTMLoginItemsPathKey]; - if (itemPath && [itemPath isEqual:path]) { - return YES; - } - } - return NO; -} - -@implementation GTMLoginItemsTest - -- (void)testNoModification { - - NSError *error = nil; - NSString *bogusAppPath = @"/Applications/AppThatDoesNotExist.app"; - NSString *bogusAppName = @"AppThatDoesNotExist"; - - // fetch the starting values - NSArray *initialItems = [GTMLoginItems loginItems:&error]; - STAssertNotNil(initialItems, @"shouldn't be nil (%@)", error); - STAssertFalse(ItemsListHasPath(initialItems, bogusAppPath), - @"bogusApp shouldn't be in list to start for test (%@)", initialItems); - - // check by path - STAssertFalse([GTMLoginItems pathInLoginItems:bogusAppPath], nil); - - // check by name - STAssertFalse([GTMLoginItems itemWithNameInLoginItems:bogusAppName], nil); - - // remove it by path - [GTMLoginItems removePathFromLoginItems:bogusAppPath]; - NSArray *curItems = [GTMLoginItems loginItems:nil]; - STAssertEqualObjects(initialItems, curItems, nil); - - // remove it by name - [GTMLoginItems removeItemWithNameFromLoginItems:bogusAppName]; - curItems = [GTMLoginItems loginItems:nil]; - STAssertEqualObjects(initialItems, curItems, nil); - -} - -- (void)testModification { - -#if MODIFICATION_TESTS_ENABLED - - NSError *error = nil; - NSString *textEditPath = @"/Applications/TextEdit.app"; - NSString *textEditName = @"TextEdit"; - - // fetch the starting values - NSArray *initialItems = [GTMLoginItems loginItems:&error]; - STAssertNotNil(initialItems, @"shouldn't be nil (%@)", error); - STAssertFalse(ItemsListHasPath(initialItems, textEditPath), - @"textedit shouldn't be in list to start for test (%@)", initialItems); - - // add textedit - [GTMLoginItems addPathToLoginItems:textEditPath hide:NO]; - NSArray *curItems = [GTMLoginItems loginItems:nil]; - STAssertNotEqualObjects(initialItems, curItems, nil); - - // check by path - STAssertTrue([GTMLoginItems pathInLoginItems:textEditPath], nil); - - // check by name - STAssertTrue([GTMLoginItems itemWithNameInLoginItems:textEditName], nil); - - // remove it by path - [GTMLoginItems removePathFromLoginItems:textEditPath]; - curItems = [GTMLoginItems loginItems:nil]; - STAssertEqualObjects(initialItems, curItems, nil); - - // check by path - STAssertFalse([GTMLoginItems pathInLoginItems:textEditPath], nil); - - // check by name - STAssertFalse([GTMLoginItems itemWithNameInLoginItems:textEditName], nil); - - // add textedit - [GTMLoginItems addPathToLoginItems:textEditPath hide:NO]; - curItems = [GTMLoginItems loginItems:nil]; - STAssertNotEqualObjects(initialItems, curItems, nil); - - // check by path - STAssertTrue([GTMLoginItems pathInLoginItems:textEditPath], nil); - - // check by name - STAssertTrue([GTMLoginItems itemWithNameInLoginItems:textEditName], nil); - - // remove it by name - [GTMLoginItems removeItemWithNameFromLoginItems:textEditName]; - curItems = [GTMLoginItems loginItems:nil]; - STAssertEqualObjects(initialItems, curItems, nil); - - // check by path - STAssertFalse([GTMLoginItems pathInLoginItems:textEditPath], nil); - - // check by name - STAssertFalse([GTMLoginItems itemWithNameInLoginItems:textEditName], nil); - -#endif // MODIFICATION_TESTS_ENABLED - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.h deleted file mode 100644 index a1b022ed..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// GTMNSBezierPath+CGPath.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Category for extracting a CGPathRef from a NSBezierPath -@interface NSBezierPath (GTMBezierPathCGPathAdditions) - -/// Extract a CGPathRef from a NSBezierPath. -// -// Args: -// -// Returns: -// Converted autoreleased CGPathRef. -// nil if failure. -- (CGPathRef)gtm_CGPath; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.m deleted file mode 100644 index 3624d9eb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPath.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// GTMNSBezierPath+CGPath.m -// -// Category for extracting a CGPathRef from a NSBezierPath -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -#import "GTMNSBezierPath+CGPath.h" -#import "GTMDefines.h" -#import "GTMGarbageCollection.h" - -@implementation NSBezierPath (GTMBezierPathCGPathAdditions) - -// Extract a CGPathRef from a NSBezierPath. -// -// Args: -// -// Returns: -// Converted CGPathRef. -// nil if failure. -- (CGPathRef)gtm_CGPath { - CGMutablePathRef thePath = CGPathCreateMutable(); - if (!thePath) return nil; - - NSInteger elementCount = [self elementCount]; - - // The maximum number of points is 3 for a NSCurveToBezierPathElement. - // (controlPoint1, controlPoint2, and endPoint) - NSPoint controlPoints[3]; - - for (NSInteger i = 0; i < elementCount; i++) { - switch ([self elementAtIndex:i associatedPoints:controlPoints]) { - case NSMoveToBezierPathElement: - CGPathMoveToPoint(thePath, &CGAffineTransformIdentity, - controlPoints[0].x, controlPoints[0].y); - break; - case NSLineToBezierPathElement: - CGPathAddLineToPoint(thePath, &CGAffineTransformIdentity, - controlPoints[0].x, controlPoints[0].y); - break; - case NSCurveToBezierPathElement: - CGPathAddCurveToPoint(thePath, &CGAffineTransformIdentity, - controlPoints[0].x, controlPoints[0].y, - controlPoints[1].x, controlPoints[1].y, - controlPoints[2].x, controlPoints[2].y); - break; - case NSClosePathBezierPathElement: - CGPathCloseSubpath(thePath); - break; - default: // COV_NF_START - _GTMDevLog(@"Unknown element at [NSBezierPath (GTMBezierPathCGPathAdditions) cgPath]"); - break; // COV_NF_END - }; - } - return (CGPathRef)GTMCFAutorelease(thePath); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPathTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPathTest.m deleted file mode 100644 index 3c99a19c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+CGPathTest.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// GTMNSBezierPath+CGPathTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import -#import "GTMNSBezierPath+CGPath.h" -#import "GTMAppKit+UnitTesting.h" -#import "GTMSenTestCase.h" - -@interface GTMNSBezierPath_CGPathTest : GTMTestCase -@end - -@implementation GTMNSBezierPath_CGPathTest - -- (void)testCGPath { - GTMAssertDrawingEqualToImageNamed(self, - NSMakeSize(100, 100), - @"GTMNSBezierPath+CGPathTest", - nil, nil); -} - - -// Draws all of our tests so that we can compare this to our stored image file. -- (void)gtm_unitTestViewDrawRect:(NSRect)rect contextInfo:(void*)contextInfo{ - NSBezierPath *thePath = [NSBezierPath bezierPath]; - NSPoint theStart = NSMakePoint(20.0, 20.0); - - // Test moveto/lineto - [thePath moveToPoint: theStart]; - for (NSUInteger i = 0; i < 10; ++i) { - NSPoint theNewPoint = NSMakePoint(i * 5, i * 10); - [thePath lineToPoint: theNewPoint]; - theNewPoint = NSMakePoint(i * 2, i * 6); - [thePath moveToPoint: theNewPoint]; - } - - // Test moveto/curveto - for (NSUInteger i = 0; i < 10; ++i) { - NSPoint startPoint = NSMakePoint(5.0, 50.0); - NSPoint endPoint = NSMakePoint(55.0, 50.0); - NSPoint controlPoint1 = NSMakePoint(17.5, 50.0 + 5.0 * i); - NSPoint controlPoint2 = NSMakePoint(42.5, 50.0 - 5.0 * i); - [thePath moveToPoint:startPoint]; - [thePath curveToPoint:endPoint controlPoint1:controlPoint1 controlPoint2:controlPoint2]; - } - // test close - [thePath closePath]; - - CGPathRef cgPath = [thePath gtm_CGPath]; - STAssertNotNULL(cgPath, @"Nil CGPath"); - - CGContextRef cgContext = [[NSGraphicsContext currentContext] graphicsPort]; - STAssertNotNULL(cgContext, @"Nil cgContext"); - - CGContextAddPath(cgContext, cgPath); - CGContextStrokePath(cgContext); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.h deleted file mode 100644 index b0b48de5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// GTMNSBezierPath+RoundRect.h -// -// Category for adding utility functions for creating -// round rectangles. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -/// Category for adding utility functions for creating round rectangles. -@interface NSBezierPath (GMBezierPathRoundRectAdditions) - -/// Inscribe a round rectangle inside of rectangle |rect| with a corner radius of |radius| -// -// Args: -// rect: outer rectangle to inscribe into -// radius: radius of the corners. |radius| is clamped internally -// to be no larger than the smaller of half |rect|'s width or height -// -// Returns: -// Auto released NSBezierPath -+ (NSBezierPath *)gtm_bezierPathWithRoundRect:(NSRect)rect - cornerRadius:(CGFloat)radius; - -/// Adds a path which is a round rectangle inscribed inside of rectangle |rect| with a corner radius of |radius| -// -// Args: -// rect: outer rectangle to inscribe into -// radius: radius of the corners. |radius| is clamped internally -// to be no larger than the smaller of half |rect|'s width or height -- (void)gtm_appendBezierPathWithRoundRect:(NSRect)rect - cornerRadius:(CGFloat)radius; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.m deleted file mode 100644 index d4e5050d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRect.m +++ /dev/null @@ -1,68 +0,0 @@ -// -// GTMNSBezierPath+RoundRect.h -// -// Category for adding utility functions for creating -// round rectangles. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSBezierPath+RoundRect.h" - -@implementation NSBezierPath (GTMBezierPathRoundRectAdditions) - - -+ (NSBezierPath *)gtm_bezierPathWithRoundRect:(NSRect)rect - cornerRadius:(CGFloat)radius { - NSBezierPath *bezier = [NSBezierPath bezierPath]; - [bezier gtm_appendBezierPathWithRoundRect:rect cornerRadius:radius]; - return bezier; -} - - -- (void)gtm_appendBezierPathWithRoundRect:(NSRect)rect - cornerRadius:(CGFloat)radius { - if (!NSIsEmptyRect(rect)) { - if (radius > 0.0) { - // Clamp radius to be no larger than half the rect's width or height. - radius = MIN(radius, 0.5 * MIN(rect.size.width, rect.size.height)); - - NSPoint topLeft = NSMakePoint(NSMinX(rect), NSMaxY(rect)); - NSPoint topRight = NSMakePoint(NSMaxX(rect), NSMaxY(rect)); - NSPoint bottomRight = NSMakePoint(NSMaxX(rect), NSMinY(rect)); - - [self moveToPoint:NSMakePoint(NSMidX(rect), NSMaxY(rect))]; - [self appendBezierPathWithArcFromPoint:topLeft - toPoint:rect.origin - radius:radius]; - [self appendBezierPathWithArcFromPoint:rect.origin - toPoint:bottomRight - radius:radius]; - [self appendBezierPathWithArcFromPoint:bottomRight - toPoint:topRight - radius:radius]; - [self appendBezierPathWithArcFromPoint:topRight - toPoint:topLeft - radius:radius]; - [self closePath]; - } else { - // When radius <= 0.0, use plain rectangle. - [self appendBezierPathWithRect:rect]; - } - } -} - - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRectTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRectTest.m deleted file mode 100644 index 5bdf3a38..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+RoundRectTest.m +++ /dev/null @@ -1,102 +0,0 @@ -// -// GTMNSBezierPath+RoundRectTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import -#import "GTMNSBezierPath+RoundRect.h" -#import "GTMAppKit+UnitTesting.h" - -@interface GTMNSBezierPath_RoundRectTest : GTMTestCase -@end - -@implementation GTMNSBezierPath_RoundRectTest - -- (void)testRoundRects { - GTMAssertDrawingEqualToImageNamed(self, NSMakeSize(490, 430), - @"GTMNSBezierPath+RoundRectTest", nil, nil); -} - -// Draws all of our tests so that we can compare this to our stored TIFF file. -- (void)gtm_unitTestViewDrawRect:(NSRect)rect contextInfo:(void*)contextInfo{ - NSRect theRects[] = { - NSMakeRect(0.0, 10.0, 0.0, 0.0), //Empty Rect test - NSMakeRect(50.0, 10.0, 30.0, 30.0), //Square Test - NSMakeRect(100.0, 10.0, 1.0, 2.0), //Small Test - NSMakeRect(120.0, 10.0, 15.0, 20.0), //Medium Test - NSMakeRect(140.0, 10.0, 150.0, 30.0), //Large Test - NSMakeRect(300.0, 10.0, 150.0, 30.0) //Large Test 2 (for different radius) - }; - const NSUInteger theRectCount = sizeof(theRects) / sizeof(NSRect); - - // Line Width Tests - CGFloat theLineWidths[] = { 0.5, 50.0, 2.0 }; - const NSUInteger theLineWidthCount = sizeof(theLineWidths) / sizeof(CGFloat); - NSUInteger i,j; - - for (i = 0; i < theLineWidthCount; ++i) { - for (j = 0; j < theRectCount; ++j) { - CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 20.0 : 0.0 ); - NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:cornerRadius]; - [roundRect setLineWidth: theLineWidths[i]]; - [roundRect stroke]; - CGFloat newWidth = 35.0; - if (i < theLineWidthCount - 1) { - newWidth += theLineWidths[i + 1] + theLineWidths[i]; - } - theRects[j].origin.y += newWidth; - } - } - - // Fill test - NSColor *theColors[] = { - [NSColor colorWithCalibratedRed:1.0 green:0.0 blue:0.0 alpha:1.0], - [NSColor colorWithCalibratedRed:0.2 green:0.4 blue:0.6 alpha:0.4] - }; - const NSUInteger theColorCount = sizeof(theColors)/sizeof(NSColor); - - for (i = 0; i < theColorCount; ++i) { - for (j = 0; j < theRectCount; ++j) { - CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 10.0 : 0.0 ); - NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:cornerRadius]; - [theColors[i] setFill]; - [roundRect fill]; - theRects[j].origin.y += 35.0; - } - } - - // Flatness test - CGFloat theFlatness[] = {0.0, 0.1, 1.0, 10.0}; - const NSUInteger theFlatnessCount = sizeof(theFlatness)/sizeof(CGFloat); - - for (i = 0; i < theFlatnessCount; i++) { - for (j = 0; j < theRectCount; ++j) { - CGFloat cornerRadius = ( (j < (theRectCount - 1)) ? 6.0 : 0.0 ); - NSBezierPath *roundRect = [NSBezierPath gtm_bezierPathWithRoundRect:theRects[j] - cornerRadius:cornerRadius]; - [roundRect setFlatness:theFlatness[i]]; - [roundRect stroke]; - theRects[j].origin.y += 35.0; - } - } -} - - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.h deleted file mode 100644 index 5d687282..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.h +++ /dev/null @@ -1,121 +0,0 @@ -// -// GTMNSBezierPath+Shading.h -// -// Category for radial and axial stroke and fill functions for NSBezierPaths -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -@protocol GTMShading; - -// -/// Category for radial and axial stroke and fill functions for NSBezierPaths -// -@interface NSBezierPath (GTMBezierPathShadingAdditions) - -/// Stroke the path axially with a color blend defined by |shading|. -// -/// The fill will extend from |fromPoint| to |toPoint| and will extend -/// indefinitely perpendicular to the axis of the line defined by the -/// two points. You can extend beyond the |fromPoint|/|toPoint by setting -/// |extendingStart|/|extendingEnd| respectively. -// -// Args: -// fromPoint: point to start the shading at -// toPoint: point to end the shading at -// extendingStart: should we extend the shading before |fromPoint| using -// the first color in our shading? -// extendingEnd: should we extend the shading after |toPoint| using the -// last color in our shading? -// shading: the shading to use to take our colors from. -// -- (void)gtm_strokeAxiallyFrom:(NSPoint)fromPoint to:(NSPoint)toPoint - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading; - -/// Stroke the path radially with a color blend defined by |shading|. -// -/// The fill will extend from the circle with center |fromPoint| -/// and radius |fromRadius| to the circle with center |toPoint| -/// with radius |toRadius|. -/// You can extend beyond the |fromPoint|/|toPoint| by setting -/// |extendingStart|/|extendingEnd| respectively. -// -// Args: -// fromPoint: center of the circle to start the shading at -// fromRadius: radius of the circle to start the shading at -// toPoint: center of the circle to to end the shading at -// toRadius: raidus of the circle to end the shading at -// extendingStart: should we extend the shading before |fromPoint| using -// the first color in our shading? -// extendingEnd: should we extend the shading after |toPoint| using the -// last color in our shading? -// shading: the shading to use to take our colors from. -// -- (void)gtm_strokeRadiallyFrom:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading; - -/// Fill the path radially with a color blend defined by |shading|. -// -/// The fill will extend from the circle with center |fromPoint| -/// and radius |fromRadius| to the circle with center |toPoint| -/// with radius |toRadius|. -/// You can extend beyond the |fromPoint|/|toPoint by setting -/// |extendingStart|/|extendingEnd| respectively. -// -// Args: -// fromPoint: center of the circle to start the shading at -// fromRadius: radius of the circle to start the shading at -// toPoint: center of the circle to to end the shading at -// toRadius: radius of the circle to end the shading at -// extendingStart: should we extend the shading before |fromPoint| using -// the first color in our shading? -// extendingEnd: should we extend the shading after |toPoint| using the -// last color in our shading? -// shading: the shading to use to take our colors from. -// -- (void)gtm_fillAxiallyFrom:(NSPoint)fromPoint to:(NSPoint)toPoint - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading; - -/// Fill the path radially with a color blend defined by |shading|. -// -/// The fill will extend from the circle with center |fromPoint| -/// and radius |fromRadius| to the circle with center |toPoint| -/// with radius |toRadius|. -/// You can extend beyond the |fromPoint|/|toPoint by setting -/// |extendingStart|/|extendingEnd| respectively. -// -// Args: -// fromPoint: center of the circle to start the shading at -// fromRadius: radius of the circle to start the shading at -// toPoint: center of the circle to to end the shading at -// toRadius: radius of the circle to end the shading at -// extendingStart: should we extend the shading before |fromPoint| using -// the first color in our shading? -// extendingEnd: should we extend the shading after |toPoint| using the -// last color in our shading? -// shading: the shading to use to take our colors from. -// -- (void)gtm_fillRadiallyFrom:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.m deleted file mode 100644 index d4c1ddd3..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+Shading.m +++ /dev/null @@ -1,216 +0,0 @@ -// -// GTMNSBezierPath+Shading.m -// -// Category for radial and axial stroke and fill functions for NSBezierPaths -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSBezierPath+Shading.h" -#import "GTMNSBezierPath+CGPath.h" -#import "GTMShading.h" -#import "GTMGeometryUtils.h" -#import "GTMMethodCheck.h" - -@interface NSBezierPath (GTMBezierPathShadingAdditionsPrivate) -// Fills a CGPathRef either axially or radially with the given shading. -// -// Args: -// path: path to fill -// axially: if YES fill axially, otherwise fill radially -// asStroke: if YES, clip to the stroke of the path, otherwise -// clip to the fill -// from: where to shade from -// fromRadius: in a radial fill, the radius of the from circle -// to: where to shade to -// toRadius: in a radial fill, the radius of the to circle -// extendingStart: if true, extend the fill with the first color of the shade -// beyond |from| away from |to| -// extendingEnd: if true, extend the fill with the last color of the shade -// beyond |to| away from |from| -// shading: the shading to use for the fill -// -- (void)gtm_fillCGPath:(CGPathRef)path - axially:(BOOL)axially - asStroke:(BOOL)asStroke - from:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading; - -// Returns the point which is the projection of a line from point |pointA| -// to |pointB| by length -// -// Args: -// pointA: first point -// pointB: second point -// length: distance to project beyond |pointB| which is in line with -// |pointA| and |pointB| -// -// Returns: -// the projected point -- (NSPoint)gtm_projectLineFrom:(NSPoint)pointA - to:(NSPoint)pointB - by:(CGFloat)length; -@end - - -@implementation NSBezierPath (GTMBezierPathAdditionsPrivate) - -- (void)gtm_fillCGPath:(CGPathRef)path - axially:(BOOL)axially asStroke:(BOOL)asStroke - from:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading { - CGFunctionRef shadingFunction = [shading shadeFunction]; - if (nil != shadingFunction) { - CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; - if (nil != currentContext) { - CGContextSaveGState(currentContext); - CGFloat lineWidth = [self lineWidth]; - CGContextSetLineWidth(currentContext, lineWidth); - if (asStroke) { - // if we are using the stroke, we offset the from and to points - // by half the stroke width away from the center of the stroke. - // Otherwise we tend to end up with fills that only cover half of the - // because users set the start and end points based on the center - // of the stroke. - CGFloat halfWidth = lineWidth * 0.5; - fromPoint = [self gtm_projectLineFrom:toPoint to:fromPoint by:halfWidth]; - toPoint = [self gtm_projectLineFrom:fromPoint to:toPoint by:-halfWidth]; - } - CGColorSpaceRef colorspace = [shading colorSpace]; - if (nil != colorspace) { - CGPoint toCGPoint = GTMNSPointToCGPoint(toPoint); - CGPoint fromCGPoint = GTMNSPointToCGPoint(fromPoint); - CGShadingRef myCGShading; - if(axially) { - myCGShading = CGShadingCreateAxial(colorspace, fromCGPoint, - toCGPoint, shadingFunction, - extendingStart == YES, - extendingEnd == YES); - } - else { - myCGShading = CGShadingCreateRadial(colorspace, fromCGPoint, fromRadius, - toCGPoint, toRadius, shadingFunction, - extendingStart == YES, - extendingEnd == YES); - } - - if (nil != myCGShading) { - CGContextAddPath(currentContext,path); - if(asStroke) { - CGContextReplacePathWithStrokedPath(currentContext); - } - CGContextClip(currentContext); - CGContextDrawShading(currentContext, myCGShading); - CGShadingRelease(myCGShading); - } - } - CGContextRestoreGState(currentContext); - } - } -} - - -- (NSPoint)gtm_projectLineFrom:(NSPoint)pointA - to:(NSPoint)pointB - by:(CGFloat)length { - NSPoint newPoint = pointB; - CGFloat x = (pointB.x - pointA.x); - CGFloat y = (pointB.y - pointA.y); - if (fpclassify(x) == FP_ZERO) { - newPoint.y += length; - } else if (fpclassify(y) == FP_ZERO) { - newPoint.x += length; - } else { -#if CGFLOAT_IS_DOUBLE - CGFloat angle = atan(y / x); - newPoint.x += sin(angle) * length; - newPoint.y += cos(angle) * length; -#else - CGFloat angle = atanf(y / x); - newPoint.x += sinf(angle) * length; - newPoint.y += cosf(angle) * length; -#endif - } - return newPoint; -} - -@end - - -@implementation NSBezierPath (GTMBezierPathShadingAdditions) -GTM_METHOD_CHECK(NSBezierPath, gtm_CGPath); - -- (void)gtm_strokeAxiallyFrom:(NSPoint)fromPoint to:(NSPoint)toPoint - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading { - CGPathRef thePath = [self gtm_CGPath]; - if (nil != thePath) { - [self gtm_fillCGPath:thePath axially:YES asStroke:YES - from:fromPoint fromRadius:(CGFloat)0.0 - to:toPoint toRadius:(CGFloat)0.0 - extendingStart:extendingStart extendingEnd:extendingEnd - shading:shading]; - } -} - - -- (void)gtm_strokeRadiallyFrom:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading { - CGPathRef thePath = [self gtm_CGPath]; - if (nil != thePath) { - [self gtm_fillCGPath:thePath axially:NO asStroke:YES - from:fromPoint fromRadius:fromRadius - to:toPoint toRadius:toRadius - extendingStart:extendingStart extendingEnd:extendingEnd - shading:shading]; - } -} - - -- (void)gtm_fillAxiallyFrom:(NSPoint)fromPoint to:(NSPoint)toPoint - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading { - CGPathRef thePath = [self gtm_CGPath]; - if (nil != thePath) { - [self gtm_fillCGPath:thePath axially:YES asStroke:NO - from:fromPoint fromRadius:(CGFloat)0.0 - to:toPoint toRadius:(CGFloat)0.0 - extendingStart:extendingStart extendingEnd:extendingEnd - shading:shading]; - } -} - - -- (void)gtm_fillRadiallyFrom:(NSPoint)fromPoint fromRadius:(CGFloat)fromRadius - to:(NSPoint)toPoint toRadius:(CGFloat)toRadius - extendingStart:(BOOL)extendingStart extendingEnd:(BOOL)extendingEnd - shading:(id)shading { - CGPathRef thePath = [self gtm_CGPath]; - if (nil != thePath) { - [self gtm_fillCGPath:thePath axially:NO asStroke:NO - from:fromPoint fromRadius:fromRadius - to:toPoint toRadius:toRadius - extendingStart:extendingStart extendingEnd:extendingEnd - shading:shading]; - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+ShadingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+ShadingTest.m deleted file mode 100644 index a9dfbefa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSBezierPath+ShadingTest.m +++ /dev/null @@ -1,177 +0,0 @@ -// -// GTMNSBezierPath+ShadingTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import - -#import "GTMLinearRGBShading.h" -#import "GTMAppKit+UnitTesting.h" -#import "GTMNSBezierPath+Shading.h" - -@interface GTMNSBezierPath_ShadingTest : GTMTestCase -@end - -@implementation GTMNSBezierPath_ShadingTest - -- (void)testShadings { - GTMAssertDrawingEqualToImageNamed(self, - NSMakeSize(310, 410), - @"GTMNSBezierPath+ShadingTest", nil, nil); -} - -- (void)gtm_unitTestViewDrawRect:(NSRect)rect contextInfo:(void*)contextInfo { - - NSColor *theColorArray[] = { [NSColor blueColor], - [NSColor redColor], [NSColor yellowColor], - [NSColor blueColor], [NSColor greenColor], - [NSColor redColor] }; - CGFloat theFloatArray[] = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 }; - - GTMLinearRGBShading *shading = - [GTMLinearRGBShading shadingWithColors:theColorArray - fromSpaceNamed:NSCalibratedRGBColorSpace - atPositions:theFloatArray - count:sizeof(theFloatArray)/sizeof(CGFloat)]; - NSBezierPath *shadedPath; - - // axial stroke rect - diagonal fill - NSRect axialStrokeRect = NSMakeRect(10.0f, 10.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialStrokeRect]; - [shadedPath setLineWidth: 10.0f]; - NSPoint startPoint = NSMakePoint(axialStrokeRect.origin.x + 20.0f, - axialStrokeRect.origin.y + 20.0f); - NSPoint endPoint = NSMakePoint(axialStrokeRect.origin.x + axialStrokeRect.size.width - 20.0f, - axialStrokeRect.origin.y + axialStrokeRect.size.height - 20.0f); - [shadedPath gtm_strokeAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // axial stroke rect - v line fill - axialStrokeRect = NSMakeRect(110.0f, 10.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialStrokeRect]; - [shadedPath setLineWidth: 10.0f]; - startPoint = NSMakePoint(axialStrokeRect.origin.x + axialStrokeRect.size.width / 2.0f, - axialStrokeRect.origin.y + 20.0f); - endPoint = NSMakePoint(axialStrokeRect.origin.x + axialStrokeRect.size.width / 2.0f, - axialStrokeRect.origin.y + axialStrokeRect.size.height - 20.0f); - [shadedPath gtm_strokeAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // axial stroke rect - h line fill - axialStrokeRect = NSMakeRect(210.0f, 10.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialStrokeRect]; - [shadedPath setLineWidth: 10.0f]; - startPoint = NSMakePoint(axialStrokeRect.origin.x + 20.0f, - axialStrokeRect.origin.y + axialStrokeRect.size.height / 2.0f); - endPoint = NSMakePoint(axialStrokeRect.origin.x + axialStrokeRect.size.width - 20.0f, - axialStrokeRect.origin.y + axialStrokeRect.size.height / 2.0f); - [shadedPath gtm_strokeAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // axial fill rect - diagonal fill - NSRect axialFillRect = NSMakeRect(10.0f, 110.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialFillRect]; - startPoint = NSMakePoint(axialFillRect.origin.x + 20.0f, - axialFillRect.origin.y + 20.0f); - endPoint = NSMakePoint(axialFillRect.origin.x + axialFillRect.size.width - 20.0f, - axialFillRect.origin.y + axialFillRect.size.height - 20.0f); - [shadedPath gtm_fillAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // axial fill rect - v line fill - axialFillRect = NSMakeRect(110.0f, 110.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialFillRect]; - startPoint = NSMakePoint(axialFillRect.origin.x + axialFillRect.size.width / 2.0f, - axialFillRect.origin.y + 20.0f); - endPoint = NSMakePoint(axialFillRect.origin.x + axialFillRect.size.width / 2.0f, - axialFillRect.origin.y + axialFillRect.size.height - 20.0f); - [shadedPath gtm_fillAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // axial fill rect - h line fill - axialFillRect = NSMakeRect(210.0f, 110.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:axialFillRect]; - startPoint = NSMakePoint(axialFillRect.origin.x + 20.0f, - axialFillRect.origin.y + axialFillRect.size.height / 2.0f); - endPoint = NSMakePoint(axialFillRect.origin.x + axialFillRect.size.width - 20.0f, - axialFillRect.origin.y + axialFillRect.size.height / 2.0f); - [shadedPath gtm_fillAxiallyFrom:startPoint to:endPoint extendingStart:YES extendingEnd:YES shading:shading]; - - // radial stroke rect - diagonal fill - NSRect radialStrokeRect = NSMakeRect(10.0f, 210.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialStrokeRect]; - startPoint = NSMakePoint(radialStrokeRect.origin.x + 20.0f, - radialStrokeRect.origin.y + 20.0f); - endPoint = NSMakePoint(radialStrokeRect.origin.x + radialStrokeRect.size.width - 20.0f, - radialStrokeRect.origin.y + radialStrokeRect.size.height - 20.0f); - [shadedPath gtm_strokeRadiallyFrom:startPoint fromRadius:60.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; - - // radial stroke rect - v line fill - radialStrokeRect = NSMakeRect(110.0f, 210.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialStrokeRect]; - startPoint = NSMakePoint(radialStrokeRect.origin.x + radialStrokeRect.size.width / 2.0f, - radialStrokeRect.origin.y + 20.0f); - endPoint = NSMakePoint(radialStrokeRect.origin.x + radialStrokeRect.size.width / 2.0f, - radialStrokeRect.origin.y + radialStrokeRect.size.height - 20.0f); - [shadedPath gtm_strokeRadiallyFrom:startPoint fromRadius:60.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; - - // radial stroke rect - h line fill - radialStrokeRect = NSMakeRect(210.0f, 210.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialStrokeRect]; - startPoint = NSMakePoint(radialStrokeRect.origin.x + 20.0f, - radialStrokeRect.origin.y + radialStrokeRect.size.height / 2.0f); - endPoint = NSMakePoint(radialStrokeRect.origin.x + radialStrokeRect.size.width - 20.0f, - radialStrokeRect.origin.y + radialStrokeRect.size.height / 2.0f); - [shadedPath gtm_strokeRadiallyFrom:startPoint fromRadius:60.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; - - // radial fill rect - diagonal fill - NSRect radialFillRect = NSMakeRect(10.0f, 310.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialFillRect]; - startPoint = NSMakePoint(radialFillRect.origin.x + 20.0f, - radialFillRect.origin.y + 20.0f); - endPoint = NSMakePoint(radialFillRect.origin.x + radialFillRect.size.width - 20.0f, - radialFillRect.origin.y + radialFillRect.size.height - 20.0f); - [shadedPath gtm_fillRadiallyFrom:startPoint fromRadius:10.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; - - // radial fill rect - v line fill - radialFillRect = NSMakeRect(110.0f, 310.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialFillRect]; - startPoint = NSMakePoint(radialFillRect.origin.x + radialFillRect.size.width / 2.0f, - radialFillRect.origin.y + 20.0f); - endPoint = NSMakePoint(radialFillRect.origin.x + radialFillRect.size.width / 2.0f, - radialFillRect.origin.y + radialFillRect.size.height - 20.0f); - [shadedPath gtm_fillRadiallyFrom:startPoint fromRadius:10.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; - - // radial fill rect - h line fill - radialFillRect = NSMakeRect(210.0f, 310.0f, 90.0f, 90.0f); - shadedPath = [NSBezierPath bezierPathWithRect:radialFillRect]; - startPoint = NSMakePoint(radialFillRect.origin.x + 20.0f, - radialFillRect.origin.y + radialFillRect.size.height / 2.0f); - endPoint = NSMakePoint(radialFillRect.origin.x + radialFillRect.size.width - 20.0f, - radialFillRect.origin.y + radialFillRect.size.height / 2.0f); - [shadedPath gtm_fillRadiallyFrom:startPoint fromRadius:10.0f - to:endPoint toRadius:20.0f - extendingStart:YES extendingEnd:YES shading:shading]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.h deleted file mode 100644 index c1501cdc..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.h +++ /dev/null @@ -1,65 +0,0 @@ -// -// GTMNSColor+Luminance.h -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -enum { - GTMColorationBaseHighlight, - GTMColorationBaseMidtone, - GTMColorationBaseShadow, - GTMColorationBasePenumbra, - GTMColorationLightHighlight, - GTMColorationLightMidtone, - GTMColorationLightShadow, - GTMColorationLightPenumbra, - GTMColorationDarkHighlight, - GTMColorationDarkMidtone, - GTMColorationDarkShadow, - GTMColorationDarkPenumbra -}; -typedef NSUInteger GTMColorationUse; - -@interface NSColorSpace (GTMNSColorSpaceLuminanceHelpers) -+ (NSColorSpace *)gtm_labColorSpace; -@end - -@interface NSColor (GTMLuminanceAdditions) -- (CGFloat)gtm_luminance; - -// Create a color modified by lightening or darkening it (-1.0 to 1.0) -- (NSColor *)gtm_colorByAdjustingLuminance:(CGFloat)luminance; - -// Create a color modified by lightening or darkening it (-1.0 to 1.0) -- (NSColor *)gtm_colorByAdjustingLuminance:(CGFloat)luminance - saturation:(CGFloat)saturation; - -// Returns a color adjusted for a specific usage -- (NSColor *)gtm_colorAdjustedFor:(GTMColorationUse)use; -- (NSColor *)gtm_colorAdjustedFor:(GTMColorationUse)use faded:(BOOL)fade; - -// Returns whether the color is in the dark half of the spectrum -- (BOOL)gtm_isDarkColor; - -// Returns a color that is legible on this color. (Nothing to do with textColor) -- (NSColor *)gtm_legibleTextColor; -@end - -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.m deleted file mode 100644 index 5b10dbe6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+Luminance.m +++ /dev/null @@ -1,153 +0,0 @@ -// -// GTMNSColor+Luminance.m -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -#import "GTMNSColor+Luminance.h" - -static const CGFloat kGTMLuminanceDarkCutoff = 0.6; - -@implementation NSColorSpace (GTMNSColorSpaceLuminanceHelpers) - -// TODO(alcor): we may want to keep one of these around for performance reasons -+ (NSColorSpace *)gtm_labColorSpace { - // Observer= 2°, Illuminant= D65 - // TODO(alcor): these should come from ColorSync - CGFloat whitePoint[3] = {0.95047, 1.0, 1.08883}; - CGFloat blackPoint[3] = {0, 0, 0}; - CGFloat range[4] = {-127, 127, -127, 127}; - CGColorSpaceRef cs = CGColorSpaceCreateLab(whitePoint, blackPoint, range); - NSColorSpace *space = nil; - if (cs) { - space = [[[NSColorSpace alloc] initWithCGColorSpace:cs] autorelease]; - CGColorSpaceRelease(cs); - } - return space; -} -@end - -@implementation NSColor (GTMLuminance) - -- (NSColor *)labColor { - return [self colorUsingColorSpace:[NSColorSpace gtm_labColorSpace]]; -} - -- (CGFloat)gtm_luminance { - CGFloat lab[4]; - lab[0] = 0.0; - [[self labColor] getComponents:lab]; - return lab[0] / 100.0; -} - -- (NSColor *)gtm_colorByAdjustingLuminance:(CGFloat)luminance - saturation:(CGFloat)saturation { - CGFloat lab[4]; - [[self labColor] getComponents:lab]; - lab[0] *= 1.0 + luminance; - // If luminance is greater than 100, we desaturate it so that we don't get - // wild colors coming out of the forumula - if (lab[0] > 100) { - CGFloat clipping = lab[0] - 100; - CGFloat desaturation = (50.0 - clipping) / 50.0; - saturation = MIN(saturation, desaturation); - } - lab[1] *= saturation; - lab[2] *= saturation; - return [NSColor colorWithColorSpace:[NSColorSpace gtm_labColorSpace] - components:lab - count:sizeof(lab) / sizeof(lab[0])]; -} - -- (NSColor *)gtm_colorByAdjustingLuminance:(CGFloat)luminance { - return [self gtm_colorByAdjustingLuminance:luminance saturation:1.0]; -} - -// TODO(alcor): these constants are largely made up, come up with a consistent -// set of values or at least guidelines -- (NSColor *)gtm_colorAdjustedFor:(GTMColorationUse)use { - NSColor *color = nil; - switch (use) { - case GTMColorationBaseHighlight: - color = [self gtm_colorByAdjustingLuminance:0.15]; - break; - case GTMColorationBaseMidtone: - color = self; - break; - case GTMColorationBaseShadow: - color = [self gtm_colorByAdjustingLuminance:-0.15]; - break; - case GTMColorationBasePenumbra: - color = [self gtm_colorByAdjustingLuminance:-0.10]; - break; - case GTMColorationLightHighlight: - color = [self gtm_colorByAdjustingLuminance:0.25]; - color = [color blendedColorWithFraction:0.9 ofColor:[NSColor whiteColor]]; - break; - case GTMColorationLightMidtone: - color = [self blendedColorWithFraction:0.8 ofColor:[NSColor whiteColor]]; - break; - case GTMColorationLightShadow: - color = [self blendedColorWithFraction:0.7 ofColor:[NSColor whiteColor]]; - color = [color gtm_colorByAdjustingLuminance:-0.02]; - break; - case GTMColorationLightPenumbra: - color = [self blendedColorWithFraction:0.8 ofColor:[NSColor whiteColor]]; - color = [color gtm_colorByAdjustingLuminance:-0.01]; - break; - case GTMColorationDarkHighlight: - color = [self gtm_colorByAdjustingLuminance:-0.20]; - break; - case GTMColorationDarkMidtone: - color = [self gtm_colorByAdjustingLuminance:-0.25]; - break; - case GTMColorationDarkShadow: - color = [self gtm_colorByAdjustingLuminance:-0.30 saturation:1.4]; - break; - case GTMColorationDarkPenumbra: - color = [self gtm_colorByAdjustingLuminance:-0.25]; - break; - default: - _GTMDevLog(@"Invalid Coloration Use %d", use); - color = self; - break; - } - return color; -} -const CGFloat kDefaultFade = 0.3; - -- (NSColor *)gtm_colorAdjustedFor:(GTMColorationUse)use faded:(BOOL)fade { - NSColor *color = [self gtm_colorAdjustedFor:use]; - if (fade) { - CGFloat luminance = [color gtm_luminance]; - color = [color gtm_colorByAdjustingLuminance: - kDefaultFade * (1.0 - luminance) - saturation:kDefaultFade]; - } - return color; -} - -- (BOOL)gtm_isDarkColor { - return [self gtm_luminance] < kGTMLuminanceDarkCutoff; -} - -- (NSColor *)gtm_legibleTextColor { - return [self gtm_isDarkColor] ? [NSColor whiteColor] : [NSColor blackColor]; -} - -@end -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+LuminanceTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+LuminanceTest.m deleted file mode 100644 index 82eb0145..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSColor+LuminanceTest.m +++ /dev/null @@ -1,72 +0,0 @@ -// -// GTMNSColor+LuminanceTest.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -#import "GTMSenTestCase.h" -#import "GTMNSColor+Luminance.h" - -@interface GTMNSColor_LuminanceTest : GTMTestCase -@end - -@implementation GTMNSColor_LuminanceTest - -- (void)testLuminance { - NSColor *midtone = [NSColor blueColor]; - NSColor *darker = [midtone gtm_colorAdjustedFor:GTMColorationBaseShadow]; - NSColor *lighter = [midtone gtm_colorAdjustedFor:GTMColorationBaseHighlight]; - NSColor *lightest = [midtone gtm_colorAdjustedFor:GTMColorationLightHighlight]; - NSColor *darkest = [midtone gtm_colorAdjustedFor:GTMColorationDarkShadow]; - - // The relationships of the other values are not set, so we don't test them yet - STAssertGreaterThanOrEqual([lightest gtm_luminance], - [lighter gtm_luminance], nil); - STAssertGreaterThanOrEqual([lighter gtm_luminance], - [midtone gtm_luminance], nil); - STAssertGreaterThanOrEqual([midtone gtm_luminance], - [darker gtm_luminance], nil); - STAssertGreaterThanOrEqual([darker gtm_luminance], - [darkest gtm_luminance], nil); - STAssertGreaterThanOrEqual([[NSColor whiteColor] gtm_luminance], - (CGFloat)0.95, nil); - STAssertGreaterThanOrEqual([[NSColor yellowColor] gtm_luminance], - (CGFloat)0.90, nil); - STAssertEqualsWithAccuracy([[NSColor blueColor] gtm_luminance], - (CGFloat)0.35, 0.10, nil); - STAssertEqualsWithAccuracy([[NSColor redColor] gtm_luminance], - (CGFloat)0.50, 0.10, nil); - STAssertLessThanOrEqual([[NSColor blackColor] gtm_luminance], - (CGFloat)0.30, nil); - STAssertTrue([[NSColor blackColor] gtm_isDarkColor], nil); - STAssertTrue([[NSColor blueColor] gtm_isDarkColor], nil); - STAssertTrue([[NSColor redColor] gtm_isDarkColor], nil); - STAssertTrue(![[NSColor whiteColor] gtm_isDarkColor], nil); - STAssertTrue(![[NSColor yellowColor] gtm_isDarkColor], nil); - STAssertGreaterThanOrEqual([[[NSColor blackColor] gtm_legibleTextColor] - gtm_luminance], - [[NSColor grayColor] gtm_luminance], nil); - STAssertLessThanOrEqual([[[NSColor whiteColor] gtm_legibleTextColor] - gtm_luminance], - [[NSColor grayColor] gtm_luminance], nil); -} - -@end - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.h deleted file mode 100644 index 7d485771..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// GTMNSImage+Scaling.h -// -// Scales NSImages to a variety of sizes for drawing -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#import -#import "GTMDefines.h" - -@interface NSImage (GTMNSImageScaling) - -// Return an existing representation of a size -- (NSImageRep *)gtm_representationOfSize:(NSSize)size; - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 -// Return the exact or next largest representation for a size -// If you are on SnowLeopard use -// -[NSImage bestRepresentationForRect:context:hints:] -- (NSImageRep *)gtm_bestRepresentationForSize:(NSSize)size; -#endif - -// Create a new represetation for a given size -- (BOOL)gtm_createRepresentationOfSize:(NSSize)size; - -// Create 32 and 16px reps -- (BOOL)gtm_createIconRepresentations; - -// Remove reps larger than a given size and create a new rep if needed -- (void)gtm_shrinkToSize:(NSSize)size; - -// Remove reps larger than a given size -- (void)gtm_removeRepresentationsLargerThanSize:(NSSize)size; - -// Return a dup shrunk to a given size -- (NSImage *)gtm_duplicateOfSize:(NSSize)size; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.m deleted file mode 100644 index 8283b298..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+Scaling.m +++ /dev/null @@ -1,183 +0,0 @@ -// -// GTMNSImage+Scaling.m -// -// Scales NSImages to a variety of sizes for drawing -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSImage+Scaling.h" -#import "GTMGeometryUtils.h" - -@implementation NSImage (GTMNSImageScaling) - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 -// If you are on SnowLeopard use -// -[NSImage bestRepresentationForRect:context:hints:] -- (NSImageRep *)gtm_bestRepresentationForSize:(NSSize)size { - NSImageRep *bestRep = [self gtm_representationOfSize:size]; - if (bestRep) { - return bestRep; - } - NSArray *reps = [self representations]; - - CGFloat repDistance = CGFLOAT_MAX; - - NSImageRep *thisRep; - GTM_FOREACH_OBJECT(thisRep, reps) { - CGFloat thisDistance; - thisDistance = MIN(size.width - [thisRep size].width, - size.height - [thisRep size].height); - - if (repDistance < 0 && thisDistance > 0) continue; - if (ABS(thisDistance) < ABS(repDistance) - || (thisDistance < 0 && repDistance > 0)) { - repDistance = thisDistance; - bestRep = thisRep; - } - } - - if (!bestRep) { - bestRep = [self bestRepresentationForDevice:nil]; - } - - return bestRep; -} -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 - -- (NSImageRep *)gtm_representationOfSize:(NSSize)size { - NSArray *reps = [self representations]; - - NSImageRep *thisRep; - GTM_FOREACH_OBJECT(thisRep, reps) { - if (NSEqualSizes([thisRep size], size)) { - return thisRep; - } - } - return nil; -} - -- (BOOL)gtm_createIconRepresentations { - [self setFlipped:NO]; - [self gtm_createRepresentationOfSize:NSMakeSize(16, 16)]; - [self gtm_createRepresentationOfSize:NSMakeSize(32, 32)]; - [self setScalesWhenResized:NO]; - return YES; -} - -- (BOOL)gtm_createRepresentationOfSize:(NSSize)size { - if ([self gtm_representationOfSize:size]) { - return NO; - } - - NSBitmapImageRep *bestRep; -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 - bestRep = (NSBitmapImageRep *)[self gtm_bestRepresentationForSize:size]; -#else - bestRep - = (NSBitmapImageRep *)[self bestRepresentationForRect:GTMNSRectOfSize(size) - context:nil - hints:nil]; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 - - NSRect drawRect = GTMNSScaleRectToRect(GTMNSRectOfSize([bestRep size]), - GTMNSRectOfSize(size), - GTMScaleProportionally, - GTMRectAlignCenter); - - if ([bestRep respondsToSelector:@selector(CGImage)]) { - CGImageRef imageRef = (CGImageRef)[bestRep performSelector:@selector(CGImage)]; - - CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB(); - if (!cspace) return NO; - - CGContextRef smallContext = - CGBitmapContextCreate(NULL, - size.width, - size.height, - 8, // bits per component - size.width * 4, // bytes per pixel - cspace, - kCGBitmapByteOrder32Host - | kCGImageAlphaPremultipliedLast); - CFRelease(cspace); - - if (!smallContext) return NO; - - - CGContextDrawImage(smallContext, GTMNSRectToCGRect(drawRect), imageRef); - - CGImageRef smallImage = CGBitmapContextCreateImage(smallContext); - - if (smallImage) { - NSBitmapImageRep *cgRep = - [[[NSBitmapImageRep alloc] initWithCGImage:smallImage] autorelease]; - [self addRepresentation:cgRep]; - CGImageRelease(smallImage); - } else { - CGContextRelease(smallContext); - return NO; - } - CGContextRelease(smallContext); - return YES; - } else { - // This functionality is here to allow it to work under Tiger - // It can probably only be called safely from the main thread - NSImage* scaledImage = [[NSImage alloc] initWithSize:size]; - [scaledImage lockFocus]; - NSGraphicsContext *graphicsContext = [NSGraphicsContext currentContext]; - [graphicsContext setImageInterpolation:NSImageInterpolationHigh]; - [graphicsContext setShouldAntialias:YES]; - [bestRep drawInRect:drawRect]; - NSBitmapImageRep* iconRep = - [[[NSBitmapImageRep alloc] initWithFocusedViewRect: - NSMakeRect(0, 0, size.width, size.height)] autorelease]; - [scaledImage unlockFocus]; - [scaledImage release]; - [self addRepresentation:iconRep]; - return YES; - } - return NO; -} - -- (void)gtm_removeRepresentationsLargerThanSize:(NSSize)size { - NSMutableArray *repsToRemove = [NSMutableArray array]; - NSImageRep *thisRep; - // Remove them in a second loop so we don't change things will doing the - // initial loop. - GTM_FOREACH_OBJECT(thisRep, [self representations]) { - if ([thisRep size].width > size.width - && [thisRep size].height > size.height) { - [repsToRemove addObject:thisRep]; - } - } - GTM_FOREACH_OBJECT(thisRep, repsToRemove) { - [self removeRepresentation:thisRep]; - } -} - -- (NSImage *)gtm_duplicateOfSize:(NSSize)size { - NSImage *duplicate = [[self copy] autorelease]; - [duplicate gtm_shrinkToSize:size]; - [duplicate setFlipped:NO]; - return duplicate; -} - -- (void)gtm_shrinkToSize:(NSSize)size { - [self gtm_createRepresentationOfSize:size]; - [self setSize:size]; - [self gtm_removeRepresentationsLargerThanSize:size]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+ScalingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+ScalingTest.m deleted file mode 100644 index 5679b7c2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSImage+ScalingTest.m +++ /dev/null @@ -1,64 +0,0 @@ -// -// GTMNSImage+ScalingTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import "GTMSenTestCase.h" - -#import "GTMNSImage+Scaling.h" -#import "GTMGeometryUtils.h" - -@interface GTMNSImage_ScalingTest : GTMTestCase -@end - -@implementation GTMNSImage_ScalingTest - -- (void)testScaling { - NSImage *testImage = [NSImage imageNamed:@"NSApplicationIcon"]; - - NSImageRep *rep = nil; - NSRect bestRepRect = NSMakeRect(0, 0, 99, 99); - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - rep = [testImage bestRepresentationForRect:bestRepRect - context:nil - hints:nil]; -#else - rep = [testImage gtm_bestRepresentationForSize:bestRepRect.size]; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - - STAssertTrue(NSEqualSizes([rep size], NSMakeSize(128, 128)), nil); - - [testImage gtm_createIconRepresentations]; - STAssertNotNil([testImage gtm_representationOfSize:NSMakeSize(16, 16)], nil); - STAssertNotNil([testImage gtm_representationOfSize:NSMakeSize(32, 32)], nil); - - NSImage *duplicate = [testImage gtm_duplicateOfSize: NSMakeSize(48, 48)]; - bestRepRect = NSMakeRect(0, 0, 50, 50); -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - rep = [duplicate bestRepresentationForRect:bestRepRect - context:nil - hints:nil]; -#else - rep = [duplicate gtm_bestRepresentationForSize:bestRepRect.size]; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 - STAssertTrue(NSEqualSizes([rep size], NSMakeSize(48, 48)), nil); - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.h deleted file mode 100644 index 483833fa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// GTMNSWorkspace+Running.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// Process Dictionary keys -// -// NOTE: According to ProcessInformationCopyDictionary, the following may not be -// in the dictionary depending on the type of process: -// kGTMWorkspaceRunningParentPSN, kGTMWorkspaceRunningFileType, -// kGTMWorkspaceRunningFileCreator, kGTMWorkspaceRunningPID, -// kGTMWorkspaceRunningBundlePath, kGTMWorkspaceRunningBundleIdentifier, -// kGTMWorkspaceRunningBundleName, kGTMWorkspaceRunningBundleExecutable, -// And experience says the follow might also not be there: -// kGTMWorkspaceRunningIsHidden - -// Make sure to use numberToProcessSerialNumber: on the return values -// of these keys to get valid PSNs on both Leopard and Tiger. -// Numeric types come back as a NSNumber. -GTM_EXTERN NSString *const kGTMWorkspaceRunningPSN; // long long -GTM_EXTERN NSString *const kGTMWorkspaceRunningParentPSN; // long long - -GTM_EXTERN NSString *const kGTMWorkspaceRunningFlavor; // SInt32 -GTM_EXTERN NSString *const kGTMWorkspaceRunningAttributes; // SInt32 -GTM_EXTERN NSString *const kGTMWorkspaceRunningFileType; // NSString -GTM_EXTERN NSString *const kGTMWorkspaceRunningFileCreator; // NSString -GTM_EXTERN NSString *const kGTMWorkspaceRunningPID; // long -GTM_EXTERN NSString *const kGTMWorkspaceRunningLSBackgroundOnly; // bool -GTM_EXTERN NSString *const kGTMWorkspaceRunningLSUIElement; // bool -GTM_EXTERN NSString *const kGTMWorkspaceRunningIsHidden; // bool -GTM_EXTERN NSString *const kGTMWorkspaceRunningCheckedIn; // bool -GTM_EXTERN NSString *const kGTMWorkspaceRunningLSUIPresentationMode; // Short -GTM_EXTERN NSString *const kGTMWorkspaceRunningBundlePath; // NSString -GTM_EXTERN NSString *const kGTMWorkspaceRunningBundleVersion; // NSString -// The docs for ProcessInformationCopyDictionary say we should use the constants -// instead of the raw string values, so map our values to those keys. -#define kGTMWorkspaceRunningBundleIdentifier (NSString*)kCFBundleIdentifierKey // NSString -#define kGTMWorkspaceRunningBundleName (NSString*)kCFBundleNameKey // NSString -#define kGTMWorkspaceRunningBundleExecutable (NSString*)kCFBundleExecutableKey // NSString - -// A category for getting information about other running processes -@interface NSWorkspace (GTMWorkspaceRunningAdditions) - -// Returns a YES/NO if a process w/ the given identifier is running -- (BOOL)gtm_isAppWithIdentifierRunning:(NSString *)identifier; - -// Returns a dictionary with info for our process. -//See Process Dictionary Keys above for values -- (NSDictionary *)gtm_processInfoDictionary; - -// Returns a dictionary with info for the active process. -// See Process Dictionary Keys above for values -- (NSDictionary *)gtm_processInfoDictionaryForActiveApp; - -// Returns a dictionary with info for the process. -//See Process Dictionary Keys above for values -- (NSDictionary *)gtm_processInfoDictionaryForPID:(pid_t)pid; - -// Returns a dictionary with info for the process. -// See Process Dictionary Keys above for values -- (NSDictionary *)gtm_processInfoDictionaryForPSN:(const ProcessSerialNumberPtr)psn; - -// Returns true if we were launched as a login item. -- (BOOL)gtm_wasLaunchedAsLoginItem; - -// Returns true if we were launched by a given bundleid -- (BOOL)gtm_wasLaunchedByProcess:(NSString*)bundleid; - -// Returns true if the PSN was found for the running app with bundleID -- (BOOL)gtm_processSerialNumber:(ProcessSerialNumber*)outPSN - withBundleID:(NSString*)bundleID; - -// Converts PSNs stored in NSNumbers to real PSNs -- (ProcessSerialNumber)gtm_numberToProcessSerialNumber:(NSNumber*)number; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.m deleted file mode 100644 index 973ad22b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+Running.m +++ /dev/null @@ -1,173 +0,0 @@ -// -// GTMNSWorkspace+Running.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSWorkspace+Running.h" -#import -#import -#import "GTMGarbageCollection.h" -#import "GTMSystemVersion.h" - -NSString *const kGTMWorkspaceRunningPSN = @"PSN"; -NSString *const kGTMWorkspaceRunningFlavor = @"Flavor"; -NSString *const kGTMWorkspaceRunningAttributes = @"Attributes"; -NSString *const kGTMWorkspaceRunningParentPSN = @"ParentPSN"; -NSString *const kGTMWorkspaceRunningFileType = @"FileType"; -NSString *const kGTMWorkspaceRunningFileCreator = @"FileCreator"; -NSString *const kGTMWorkspaceRunningPID = @"pid"; -NSString *const kGTMWorkspaceRunningLSBackgroundOnly = @"LSBackgroundOnly"; -NSString *const kGTMWorkspaceRunningLSUIElement = @"LSUIElement"; -NSString *const kGTMWorkspaceRunningIsHidden = @"IsHiddenAttr"; -NSString *const kGTMWorkspaceRunningCheckedIn = @"IsCheckedInAttr"; -NSString *const kGTMWorkspaceRunningLSUIPresentationMode - = @"LSUIPresentationMode"; -NSString *const kGTMWorkspaceRunningBundlePath = @"BundlePath"; -NSString *const kGTMWorkspaceRunningBundleVersion = @"CFBundleVersion"; - -@implementation NSWorkspace (GTMWorkspaceRunningAdditions) - -/// Returns a YES/NO if a process w/ the given identifier is running -- (BOOL)gtm_isAppWithIdentifierRunning:(NSString *)identifier { - if ([identifier length] == 0) return NO; - NSArray *launchedApps = [self launchedApplications]; - NSArray *buildIDs - = [launchedApps valueForKey:@"NSApplicationBundleIdentifier"]; - return [buildIDs containsObject:identifier]; -} - -- (NSDictionary *)gtm_processInfoDictionaryForPID:(pid_t)pid { - NSDictionary *dict = nil; - ProcessSerialNumber psn; - if (GetProcessForPID(pid, &psn) == noErr) { - dict = [self gtm_processInfoDictionaryForPSN:&psn]; - } - return dict; -} - -- (NSDictionary *)gtm_processInfoDictionaryForPSN:(ProcessSerialNumberPtr)psn { - NSDictionary *dict = nil; - if (psn) { - CFDictionaryRef cfDict - = ProcessInformationCopyDictionary(psn, - kProcessDictionaryIncludeAllInformationMask); - dict = GTMCFAutorelease(cfDict); - } - return dict; -} - -- (NSDictionary *)gtm_processInfoDictionary { - NSDictionary *dict = nil; - ProcessSerialNumber selfNumber; - if (MacGetCurrentProcess(&selfNumber) == noErr) { - dict = [self gtm_processInfoDictionaryForPSN:&selfNumber]; - } - return dict; -} - -- (NSDictionary *)gtm_processInfoDictionaryForActiveApp { - NSDictionary *processDict = nil; - ProcessSerialNumber psn; - OSStatus status = GetFrontProcess(&psn); - if (status == noErr) { - processDict = [self gtm_processInfoDictionaryForPSN:&psn]; - } - return processDict; -} - -- (BOOL)gtm_wasLaunchedAsLoginItem { - // If the launching process was 'loginwindow', we were launched as a login - // item - return [self gtm_wasLaunchedByProcess:@"com.apple.loginwindow"]; -} - -- (BOOL)gtm_wasLaunchedByProcess:(NSString*)bundleid { - BOOL wasLaunchedByProcess = NO; - NSDictionary *processInfo = [self gtm_processInfoDictionary]; - if (processInfo) { - NSNumber *processNumber - = [processInfo objectForKey:kGTMWorkspaceRunningParentPSN]; - ProcessSerialNumber parentPSN - = [self gtm_numberToProcessSerialNumber:processNumber]; - NSDictionary *parentProcessInfo - = [self gtm_processInfoDictionaryForPSN:&parentPSN]; - NSString *parentBundle - = [parentProcessInfo objectForKey:kGTMWorkspaceRunningBundleIdentifier]; - wasLaunchedByProcess - = [parentBundle isEqualToString:bundleid]; - } - return wasLaunchedByProcess; -} - -- (BOOL)gtm_processSerialNumber:(ProcessSerialNumber*)outPSN - withBundleID:(NSString*)bundleID { - if (!outPSN || [bundleID length] == 0) { - return NO; - } - - NSArray *apps = [self launchedApplications]; - - NSEnumerator *enumerator = [apps objectEnumerator]; - NSDictionary *dict; - - while ((dict = [enumerator nextObject])) { - NSString *nextID = [dict objectForKey:@"NSApplicationBundleIdentifier"]; - - if ([nextID isEqualToString:bundleID]) { - NSNumber *psn - = [dict objectForKey:@"NSApplicationProcessSerialNumberLow"]; - outPSN->lowLongOfPSN = [psn unsignedIntValue]; - - psn = [dict objectForKey:@"NSApplicationProcessSerialNumberHigh"]; - outPSN->highLongOfPSN = [psn unsignedIntValue]; - - return YES; - } - } - - return NO; -} - -- (ProcessSerialNumber)gtm_numberToProcessSerialNumber:(NSNumber*)number { - // There is a bug in Tiger where they were packing ProcessSerialNumbers - // incorrectly into the longlong that they stored in the dictionary. - // This fixes it. - ProcessSerialNumber outPSN = { kNoProcess, kNoProcess}; - if (number) { - long long temp = [number longLongValue]; - UInt32 hi = (UInt32)((temp >> 32) & 0x00000000FFFFFFFFLL); - UInt32 lo = (UInt32)((temp >> 0) & 0x00000000FFFFFFFFLL); -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - outPSN.highLongOfPSN = hi; - outPSN.lowLongOfPSN = lo; -#else // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - if ([GTMSystemVersion isLeopardOrGreater]) { - outPSN.highLongOfPSN = hi; - outPSN.lowLongOfPSN = lo; - } else { -#if TARGET_RT_BIG_ENDIAN - outPSN.highLongOfPSN = hi; - outPSN.lowLongOfPSN = lo; -#else - outPSN.highLongOfPSN = lo; - outPSN.lowLongOfPSN = hi; -#endif // TARGET_RT_BIG_ENDIAN - } -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - } - return outPSN; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+RunningTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+RunningTest.m deleted file mode 100644 index 4c9af6c5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMNSWorkspace+RunningTest.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// GTMNSWorkspace+RunningTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSWorkspace+Running.h" -#import - -@interface GTMNSWorkspace_RunningTest : GTMTestCase -@end - -@implementation GTMNSWorkspace_RunningTest - -- (void)testBasics { - NSWorkspace *ws = [NSWorkspace sharedWorkspace]; - STAssertTrue([ws gtm_isAppWithIdentifierRunning:@"com.apple.finder"], nil); - STAssertFalse([ws gtm_isAppWithIdentifierRunning:@"com.google.nothing"], nil); - - NSDictionary *processInfo = [ws gtm_processInfoDictionary]; - STAssertNotNil(processInfo, nil); - - BOOL wasLaunchedAsLoginItem = [ws gtm_wasLaunchedAsLoginItem]; - STAssertFalse(wasLaunchedAsLoginItem, nil); - - pid_t pid = getpid(); - NSDictionary *processInfo2 = [ws gtm_processInfoDictionaryForPID:pid]; - STAssertNotNil(processInfo2, nil); - STAssertEqualObjects(processInfo, processInfo2, nil); - - ProcessSerialNumber num = { 0, 0 }; - BOOL gotPSN = [ws gtm_processSerialNumber:&num - withBundleID:@"com.apple.finder"]; - STAssertTrue(gotPSN, nil); - STAssertGreaterThan(num.highLongOfPSN + num.lowLongOfPSN, (UInt32)0, nil); - gotPSN = [ws gtm_processSerialNumber:&num - withBundleID:@"bad.bundle.id"]; - STAssertFalse(gotPSN, nil); - - gotPSN = [ws gtm_processSerialNumber:NULL - withBundleID:nil]; - STAssertFalse(gotPSN, nil); - - processInfo = [ws gtm_processInfoDictionaryForActiveApp]; - STAssertNotNil(processInfo, nil); - - // Only check the keys that have to be there - NSString *const keys[] = { - kGTMWorkspaceRunningPSN, - kGTMWorkspaceRunningFlavor, kGTMWorkspaceRunningAttributes, - kGTMWorkspaceRunningLSBackgroundOnly, - kGTMWorkspaceRunningLSUIElement, - kGTMWorkspaceRunningCheckedIn, - kGTMWorkspaceRunningBundleVersion, - kGTMWorkspaceRunningLSUIPresentationMode, - - }; - for (size_t i = 0; i < sizeof(keys) / sizeof(NSString *); ++i) { - NSString *const key = keys[i]; - STAssertNotNil([processInfo objectForKey:key], - @"Couldn't get %@ from %@", key, processInfo); - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMShading.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMShading.h deleted file mode 100644 index 27e163ea..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMShading.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// GTMShading.h -// -// A protocol for an object that can be used as a shader. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -/// \cond Protocols - -@protocol GTMShading -// Returns the shadefunction for using in a shader. -// This shadefunction shoud never be released. It is owned by the implementor -// of the GTMShading protocol. -// -// Returns: -// a shading function. -- (CGFunctionRef)shadeFunction; - -// Returns the colorSpace for using in a shader. -// This colorSpace shoud never be released. It is owned by the implementor -// of the GTMShading protocol. -// -// Returns: -// a color space. -- (CGColorSpaceRef)colorSpace; -@end - -/// \endcond diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.h deleted file mode 100644 index 5f4700e3..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// GTMTheme.h -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -// Sent whenever the theme changes. Object => GTMTheme that changed -GTM_EXTERN NSString *kGTMThemeDidChangeNotification; - -enum { - GTMThemeStyleTabBarSelected, - GTMThemeStyleTabBarDeselected, - GTMThemeStyleWindow, - GTMThemeStyleToolBar, - GTMThemeStyleToolBarButton, - GTMThemeStyleToolBarButtonPressed, - GTMThemeStyleBookmarksBar, -}; -typedef NSUInteger GTMThemeStyle; - -// GTMTheme provides a range of values for procedural drawing of UI elements -// based on interpolation of a single background color - -@interface GTMTheme : NSObject { - @private - NSColor *backgroundColor_; // bound to user defaults - NSImage *backgroundImage_; // bound to user defaults - NSMutableDictionary *values_; // cached values -} - -// Access the global theme. By default this is bound to user defaults -+ (GTMTheme *)defaultTheme; -+ (void)setDefaultTheme:(GTMTheme *)theme; - -// returns base theme color -- (NSColor *)backgroundColor; - -// base background color -- (NSImage *)backgroundImage; - -// NSColor (or pattern color) for the background of the window -- (NSColor *)windowBackgroundColor:(BOOL)active; - -// NSGradient for specific usage, active indicates whether the window is key -- (NSGradient *)gradientForStyle:(GTMThemeStyle)style active:(BOOL)active; - -// Outline color for stroke, active indicates whether the window is key -- (NSColor *)strokeColorForStyle:(GTMThemeStyle)style active:(BOOL)active; - -// Indicates whether luminance is dark or light -- (BOOL)styleIsDark:(GTMThemeStyle)style active:(BOOL)active; - -// Background style for this style and state -- (NSBackgroundStyle)interiorBackgroundStyleForStyle:(GTMThemeStyle)style - active:(BOOL)active; - -// NSColor version of the gradient (for window backgrounds, etc) -- (NSColor *)patternColorForStyle:(GTMThemeStyle)style active:(BOOL)active; -@end - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.m deleted file mode 100644 index aa7c9be0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMTheme.m +++ /dev/null @@ -1,390 +0,0 @@ -// -// GTMTheme.m -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -#import "GTMTheme.h" -#import "GTMNSColor+Luminance.h" - -static GTMTheme *gGTMDefaultTheme = nil; -NSString *kGTMThemeDidChangeNotification = @"kGTMThemeDidChangeNotification"; - -@interface GTMTheme () -- (void)bindToUserDefaults; -- (void)sendChangeNotification; -@end - -@implementation GTMTheme - -+ (void)setDefaultTheme:(GTMTheme *)theme { - if (gGTMDefaultTheme != theme) { - [gGTMDefaultTheme release]; - gGTMDefaultTheme = [theme retain]; - [gGTMDefaultTheme sendChangeNotification]; - } -} - -+ (GTMTheme *)defaultTheme { - @synchronized (self) { - if (!gGTMDefaultTheme) { - gGTMDefaultTheme = [[self alloc] init]; - [gGTMDefaultTheme bindToUserDefaults]; - } - } - return gGTMDefaultTheme; -} - -- (void)bindToUserDefaults { - NSUserDefaultsController * controller - = [NSUserDefaultsController sharedUserDefaultsController]; - [self bind:@"backgroundColor" - toObject:controller - withKeyPath:@"values.GTMThemeBackgroundColor" - options:[NSDictionary dictionaryWithObjectsAndKeys: - NSUnarchiveFromDataTransformerName, - NSValueTransformerNameBindingOption, - nil]]; - - [self bind:@"backgroundImage" - toObject:controller - withKeyPath:@"values.GTMThemeBackgroundImageData" - options:[NSDictionary dictionaryWithObjectsAndKeys: - NSUnarchiveFromDataTransformerName, - NSValueTransformerNameBindingOption, - nil]]; -} - -- (id)init { - self = [super init]; - if (self != nil) { - values_ = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (void)finalize { - [self unbind:@"backgroundColor"]; - [self unbind:@"backgroundImage"]; - [super finalize]; -} - -- (void)dealloc { - [self unbind:@"backgroundColor"]; - [self unbind:@"backgroundImage"]; - [values_ release]; - [super dealloc]; -} - -- (void)sendChangeNotification { - [[NSNotificationCenter defaultCenter] - postNotificationName:kGTMThemeDidChangeNotification - object:self]; -} - -- (id)keyForSelector:(SEL)selector - style:(GTMThemeStyle)style - active:(BOOL)active { - return [NSString stringWithFormat:@"%p.%d.%d", selector, style, active]; -} - -- (id)valueForSelector:(SEL)selector - style:(GTMThemeStyle)style - active:(BOOL)active { - id value = [values_ objectForKey: - [self keyForSelector:selector style:style active:active]]; - return value; -} - -- (void)cacheValue:(id)value - forSelector:(SEL)selector - style:(GTMThemeStyle)style - active:(BOOL)active { - id key = [self keyForSelector:selector style:style active:active]; - if (key && value) [values_ setObject:value forKey:key]; -} - -- (void)setBackgroundColor:(NSColor *)value { - if (backgroundColor_ != value) { - [backgroundColor_ release]; - backgroundColor_ = [value retain]; - [values_ removeAllObjects]; - [self sendChangeNotification]; - } -} -- (NSColor *)backgroundColor { - // For nil, we return a color that works with a normal textured window - if (!backgroundColor_) - return [NSColor colorWithCalibratedWhite:0.75 alpha:1.0]; - return backgroundColor_; -} - -- (void)setBackgroundImage:(NSImage *)value { - if (backgroundImage_ != value) { - [backgroundImage_ release]; - backgroundImage_ = [value retain]; - [self sendChangeNotification]; - } -} - -- (NSColor *)windowBackgroundColor:(BOOL)active { - NSColor *color = nil; - if (backgroundImage_) { - // TODO(alcor): dim images when disabled - color = [NSColor colorWithPatternImage:backgroundImage_]; - } else if (backgroundColor_) { - color = [self patternColorForStyle:GTMThemeStyleWindow active:active]; - } - return color; -} - -- (NSImage *)backgroundImage { - return backgroundImage_; -} - -- (NSBackgroundStyle)interiorBackgroundStyleForStyle:(GTMThemeStyle)style - active:(BOOL)active { - id value = [self valueForSelector:_cmd style:style active:active]; - if (value) return [value intValue]; - - NSGradient *gradient = [self gradientForStyle:style active:active]; - NSColor *color = [gradient interpolatedColorAtLocation:0.5]; - BOOL dark = [color gtm_isDarkColor]; - value = [NSNumber numberWithInt: dark ? NSBackgroundStyleLowered - : NSBackgroundStyleRaised]; - [self cacheValue:value forSelector:_cmd style:style active:active]; - return [value intValue]; -} - -- (BOOL)styleIsDark:(GTMThemeStyle)style active:(BOOL)active { - id value = [self valueForSelector:_cmd style:style active:active]; - if (value) return [value boolValue]; - - if (style == GTMThemeStyleToolBarButtonPressed) { - value = [NSNumber numberWithBool:YES]; - } else { - value = [NSNumber numberWithBool:[[self backgroundColor] gtm_isDarkColor]]; - } - [self cacheValue:value forSelector:_cmd style:style active:active]; - return [value boolValue]; -} - -- (NSColor *)patternColorForStyle:(GTMThemeStyle)style active:(BOOL)active { - NSColor *color = [self valueForSelector:_cmd style:style active:active]; - if (color) return color; - - NSGradient *gradient = [self gradientForStyle:style active:active]; - if (gradient) { - // create a gradient image for the background - CGRect r = CGRectZero; - // TODO(alcor): figure out a better way to get an image that is the right - // size - r.size = CGSizeMake(4, 36); - size_t bytesPerRow = 4 * r.size.width; - - CGColorSpaceRef space = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - CGContextRef context = CGBitmapContextCreate(NULL, - r.size.width, - r.size.height, - 8, - bytesPerRow, - space, - kCGImageAlphaPremultipliedFirst); - CGColorSpaceRelease(space); - NSGraphicsContext *nsContext - = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:YES]; - [NSGraphicsContext saveGraphicsState]; - [NSGraphicsContext setCurrentContext:nsContext]; - [gradient drawInRect:NSMakeRect(0, 0, r.size.width, r.size.height) - angle:270]; - [NSGraphicsContext restoreGraphicsState]; - - CGImageRef cgImage = CGBitmapContextCreateImage(context); - CGContextRelease(context); - NSBitmapImageRep *rep = nil; - if (cgImage) { - rep = [[[NSBitmapImageRep alloc] initWithCGImage:cgImage] - autorelease]; - CGImageRelease(cgImage); - } - - NSImage *image = [[[NSImage alloc] initWithSize:NSSizeFromCGSize(r.size)] - autorelease]; - [image addRepresentation:rep]; - - color = [NSColor colorWithPatternImage:image]; - } - [self cacheValue:color forSelector:_cmd style:style active:active]; - return color; -} - -- (NSGradient *)gradientForStyle:(GTMThemeStyle)style active:(BOOL)active { - NSGradient *gradient = [self valueForSelector:_cmd style:style active:active]; - if (gradient) return gradient; - - BOOL useDarkColors = backgroundImage_ != nil || style == GTMThemeStyleWindow; - - NSUInteger uses[4]; - if (useDarkColors) { - uses[0] = GTMColorationBaseHighlight; - uses[1] = GTMColorationBaseMidtone; - uses[2] = GTMColorationBaseShadow; - uses[3] = GTMColorationBasePenumbra; - } else { - uses[0] = GTMColorationLightHighlight; - uses[1] = GTMColorationLightMidtone; - uses[2] = GTMColorationLightShadow; - uses[3] = GTMColorationLightPenumbra; - } - NSColor *backgroundColor = [self backgroundColor]; - switch (style) { - case GTMThemeStyleTabBarDeselected: { - NSColor *startColor = [[backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active] - colorWithAlphaComponent:0.667]; - NSColor *endColor = [[backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active] - colorWithAlphaComponent:0.667]; - - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - break; - } - case GTMThemeStyleTabBarSelected: { - NSColor *startColor = [backgroundColor gtm_colorAdjustedFor:uses[0] - faded:!active]; - NSColor *endColor = [backgroundColor gtm_colorAdjustedFor:uses[1] - faded:!active]; - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - break; - } - case GTMThemeStyleWindow: { - CGFloat luminance = [backgroundColor gtm_luminance]; - - // Adjust luminance so it never hits black - if (luminance < 0.5) { - CGFloat adjustment = (0.5 - luminance) / 1.5; - backgroundColor - = [backgroundColor gtm_colorByAdjustingLuminance:adjustment]; - } - NSColor *startColor = [backgroundColor gtm_colorAdjustedFor:uses[1] - faded:!active]; - NSColor *endColor = [backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active]; - - - if (!active) { - startColor = [startColor gtm_colorByAdjustingLuminance:0.1 - saturation:0.5]; - endColor = [endColor gtm_colorByAdjustingLuminance:0.1 - saturation:0.5]; - - } - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - break; - } - case GTMThemeStyleToolBar: { - NSColor *startColor = [backgroundColor gtm_colorAdjustedFor:uses[1] - faded:!active]; - NSColor *endColor = [backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active]; - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - break; - } - case GTMThemeStyleToolBarButton: { - NSColor *startColor = [backgroundColor gtm_colorAdjustedFor:uses[0] - faded:!active]; - NSColor *midColor = [backgroundColor gtm_colorAdjustedFor:uses[1] - faded:!active]; - NSColor *endColor = [backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active]; - NSColor *glowColor = [backgroundColor gtm_colorAdjustedFor:uses[3] - faded:!active]; - - gradient = [[[NSGradient alloc] initWithColorsAndLocations: - startColor, 0.0, - midColor, 0.5, - endColor, 0.9, - glowColor, 1.0, - nil] autorelease]; - break; - } - case GTMThemeStyleToolBarButtonPressed: { - NSColor *startColor = [backgroundColor - gtm_colorAdjustedFor:GTMColorationBaseShadow - faded:!active]; - NSColor *endColor = [backgroundColor - gtm_colorAdjustedFor:GTMColorationBaseMidtone - faded:!active]; - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - break; - } - case GTMThemeStyleBookmarksBar: { - NSColor *startColor = [backgroundColor gtm_colorAdjustedFor:uses[2] - faded:!active]; - NSColor *endColor = [backgroundColor gtm_colorAdjustedFor:uses[3] - faded:!active]; - - gradient = [[[NSGradient alloc] initWithStartingColor:startColor - endingColor:endColor] - autorelease]; - - break; - } - default: - _GTMDevLog(@"Unexpected style: %d", style); - break; - } - - [self cacheValue:gradient forSelector:_cmd style:style active:active]; - return gradient; -} - -- (NSColor *)strokeColorForStyle:(GTMThemeStyle)style active:(BOOL)active { - NSColor *color = [self valueForSelector:_cmd style:style active:active]; - if (color) return color; - NSColor *backgroundColor = [self backgroundColor]; - switch (style) { - case GTMThemeStyleToolBarButton: - color = [[backgroundColor gtm_colorAdjustedFor:GTMColorationDarkShadow - faded:!active] - colorWithAlphaComponent:0.3]; - break; - case GTMThemeStyleToolBar: - case GTMThemeStyleBookmarksBar: - default: - color = [[self backgroundColor] gtm_colorAdjustedFor:GTMColorationBaseShadow - faded:!active]; - break; - } - - [self cacheValue:color forSelector:_cmd style:style active:active]; - return color; -} - -@end - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMThemeTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMThemeTest.m deleted file mode 100644 index 3e37c1fe..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/AppKit/GTMThemeTest.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// GTMThemeTest.m -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -#import "GTMSenTestCase.h" -#import "GTMTheme.h" - -@interface GTMThemeTest : GTMTestCase -@end - -@implementation GTMThemeTest - -- (void)testTheming { - GTMTheme *theme = [GTMTheme defaultTheme]; - - // When there are no values, use window default colors - STAssertEqualObjects([theme backgroundColor], - [NSColor colorWithCalibratedWhite:0.75 alpha:1.0], nil); - STAssertNil([theme windowBackgroundColor:YES], nil); - STAssertNil([theme backgroundImage], nil); - - NSColor *color = [NSColor redColor]; - NSData *colorData = [NSArchiver archivedDataWithRootObject:color]; - [[NSUserDefaults standardUserDefaults] setObject:colorData - forKey:@"GTMThemeBackgroundColor"]; - - STAssertNotNil([theme windowBackgroundColor:YES], nil); - STAssertNotNil([theme patternColorForStyle:GTMThemeStyleToolBar - active:YES], nil); - STAssertNotNil([theme strokeColorForStyle:GTMThemeStyleToolBar - active:YES], nil); - STAssertNotNil([theme gradientForStyle:GTMThemeStyleToolBar - active:YES], nil); - - STAssertEqualObjects([theme backgroundColor], - color, nil); - - // TODO(alcor): add more of these cases once the constants are more concrete - STAssertEquals([theme interiorBackgroundStyleForStyle:GTMThemeStyleToolBar - active:YES], - (NSBackgroundStyle)NSBackgroundStyleRaised, nil); - - [[NSUserDefaults standardUserDefaults] removeObjectForKey: - @"GTMThemeBackgroundColor"]; -} - -@end - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildScripts/BuildAllSDKs.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildScripts/BuildAllSDKs.sh deleted file mode 100644 index 32a867d4..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildScripts/BuildAllSDKs.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh -# BuildAllSDKs.sh -# -# This script builds the Tiger, Leopard, SnowLeopard and iPhone versions of the -# requested target in the current basic config (debug, release, debug-gcov). -# -# Copyright 2006-2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. - -GTM_PROJECT_TARGET="$1" -GTMIPHONE_PROJECT_TARGET="$2" -STARTING_TARGET="${TARGET_NAME}" -SCRIPT_APP="${TMPDIR}DoBuild.app" - -REQUESTED_BUILD_STYLE=$(echo "${BUILD_STYLE}" | sed -E "s/(.*OrLater-)?(.*)/\2/") -# See if we were told to clean instead of build. -PROJECT_ACTION="build" -if [ "${ACTION}" == "clean" ]; then - PROJECT_ACTION="clean" -fi - -# get available SDKs and PLATFORMS -AVAILABLE_MACOS_SDKS=`eval ls ${DEVELOPER_SDK_DIR}` -AVAILABLE_PLATFORMS=`eval ls ${DEVELOPER_DIR}/Platforms` - -# build up our GTMiPhone parts -GTMIPHONE_OPEN_EXTRAS="" -GTMIPHONE_BUILD_EXTRAS="" -if [ "${GTMIPHONE_PROJECT_TARGET}" != "" ]; then - GTMIPHONE_OPEN_EXTRAS=" - if \"${AVAILABLE_PLATFORMS}\" contains \"iPhoneSimulator.platform\" then - -- make sure both project files are open - open posix file \"${SRCROOT}/GTM.xcodeproj\" - open posix file \"${SRCROOT}/GTMiPhone.xcodeproj\" - end if" - GTMIPHONE_BUILD_EXTRAS=" - if \"${AVAILABLE_PLATFORMS}\" contains \"iPhoneSimulator.platform\" then - with timeout of 9999 seconds - tell project \"GTMiPhone\" - -- do the GTMiPhone build - ${PROJECT_ACTION} using build configuration \"${REQUESTED_BUILD_STYLE}\" - set active target to target \"${STARTING_TARGET}\" - end tell - end timeout - end if" -fi - -# build up our GTM AppleScript -OUR_BUILD_SCRIPT="on run - tell application \"Xcode\" - activate - ${GTMIPHONE_OPEN_EXTRAS} - if \"${AVAILABLE_PLATFORMS}\" contains \"MacOSX.platform\" then - tell project \"GTM\" - -- wait for build to finish - set x to 0 - repeat while currently building - delay 0.5 - set x to x + 1 - if x > 6 then - display alert \"GTM is still building, can't start.\" - return - end if - end repeat - -- do the GTM builds - with timeout of 9999 seconds - if \"{$AVAILABLE_MACOS_SDKS}\" contains \"MacOSX10.4u.sdk\" then - set active target to target \"${GTM_PROJECT_TARGET}\" - set buildResult to ${PROJECT_ACTION} using build configuration \"TigerOrLater-${REQUESTED_BUILD_STYLE}\" - set active target to target \"${STARTING_TARGET}\" - if buildResult is not equal to \"Build succeeded\" then - return - end if - end if - if \"{$AVAILABLE_MACOS_SDKS}\" contains \"MacOSX10.5.sdk\" then - set active target to target \"${GTM_PROJECT_TARGET}\" - set buildResult to ${PROJECT_ACTION} using build configuration \"LeopardOrLater-${REQUESTED_BUILD_STYLE}\" - set active target to target \"${STARTING_TARGET}\" - if buildResult is not equal to \"Build succeeded\" then - return - end if - end if - if \"{$AVAILABLE_MACOS_SDKS}\" contains \"MacOSX10.6.sdk\" then - set active target to target \"${GTM_PROJECT_TARGET}\" - set buildResult to ${PROJECT_ACTION} using build configuration \"SnowLeopardOrLater-${REQUESTED_BUILD_STYLE}\" - set active target to target \"${STARTING_TARGET}\" - if buildResult is not equal to \"Build succeeded\" then - return - end if - end if - end timeout - end tell - end if - ${GTMIPHONE_BUILD_EXTRAS} - end tell -end run" - -# Xcode won't actually let us spawn this and run it w/ osascript because it -# watches and waits for everything we have spawned to exit before the build is -# considered done, so instead we compile this to a script app, and then use -# open to invoke it, there by escaping our little sandbox. -# xcode defeats this: ( echo "${OUR_BUILD_SCRIPT}" | osascript - & ) -rm -rf "${SCRIPT_APP}" -echo "${OUR_BUILD_SCRIPT}" | osacompile -o "${SCRIPT_APP}" -x -open "${SCRIPT_APP}" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildingAndUsing.txt b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildingAndUsing.txt deleted file mode 100644 index 67bbd797..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/BuildingAndUsing.txt +++ /dev/null @@ -1,18 +0,0 @@ -The GTM project provides a Framework target and Unit Testing targets. - -Unit Testing Targets - - -These targets are there to make sure all of GTM is working, and reflect the -hierarchy of the source tree. - -Building the "All UnitTests" target will build all of the unittests for the -current configuration included in the GTM package. We require that "All -UnitTests" builds cleanly before we will accept any code submissions. - -Framework Target - - -These targets are there to make it easy for anyone to quickly add GTM sources -to their own project to start using it or playing around with it. However, -the intent is for a developer to manually add the sources to their project in -the end to reduce the total size of their product (since they only have to -include the parts of GTM they need). diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/COPYING b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/COPYING deleted file mode 100644 index a95e82aa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2007 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugSelectorValidation.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugSelectorValidation.h deleted file mode 100644 index 19d8b8eb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugSelectorValidation.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// GTMDebugSelectorValidation.h -// -// This file should only be included within an implimation file. In any -// function that takes an object and selector to invoke, you should call: -// -// GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, @encode(arg1type), ..., NULL) -// or -// GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, @encode(returnType), @encode(arg1type), ..., NULL) -// -// This will then validate that the selector is defined and using the right -// type(s), this can help catch errors much earlier then waiting for the -// selector to actually fire (and in the case of error selectors, might never -// really be tested until in the field). -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#if DEBUG - -#import -#import "GTMDefines.h" - -static void GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(id obj, SEL sel, const char *retType, ...) { - - // verify that the object's selector is implemented with the proper - // number and type of arguments - va_list argList; - va_start(argList, retType); - - if (obj && sel) { - // check that the selector is implemented - _GTMDevAssert([obj respondsToSelector:sel], - @"\"%@\" selector \"%@\" is unimplemented or misnamed", - NSStringFromClass([obj class]), - NSStringFromSelector(sel)); - - const char *expectedArgType; - NSUInteger argCount = 2; // skip self and _cmd - NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; - - // check that each expected argument is present and of the correct type - while ((expectedArgType = va_arg(argList, const char*)) != 0) { - - if ([sig numberOfArguments] > argCount) { - const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; - - _GTMDevAssert(0 == strncmp(foundArgType, expectedArgType, strlen(expectedArgType)), - @"\"%@\" selector \"%@\" argument %d should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (argCount - 2), - expectedArgType); - } - argCount++; - } - - // check that the proper number of arguments are present in the selector - _GTMDevAssert(argCount == [sig numberOfArguments], - @"\"%@\" selector \"%@\" should have %d arguments", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (argCount - 2)); - - // if asked, validate the return type - if (retType && (strcmp("gtm_skip_return_test", retType) != 0)) { - const char *foundRetType = [sig methodReturnType]; - _GTMDevAssert(0 == strncmp(foundRetType, retType, strlen(retType)), - @"\"%@\" selector \"%@\" return type should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - retType); - } - } - - va_end(argList); -} - -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) \ - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments((obj), (sel), "gtm_skip_return_test", __VA_ARGS__) - -#else // DEBUG - -// make it go away if not debug -#define GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, retType, ...) do { } while (0) -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) do { } while (0) - -#endif // DEBUG diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.h deleted file mode 100644 index 0636159c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// GTMDebugThreadValidation.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#if DEBUG -#import "GTMDefines.h" -#import - -// GTMAssertRunningOnMainThread will allow you to verify that you are -// currently running on the main thread. This can be useful for checking -// under DEBUG to make sure that code that requires being run on the main thread -// is doing so. Use the GTMAssertRunningOnMainThread macro, don't use -// the _GTMAssertRunningOnMainThread or _GTMIsRunningOnMainThread -// helper functions. - -// On Leopard and above we can just use NSThread functionality. -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -BOOL _GTMIsRunningOnMainThread(void); -#else // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -#import -GTM_INLINE BOOL _GTMIsRunningOnMainThread(void) { - return [NSThread isMainThread]; -} -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -GTM_INLINE void _GTMAssertRunningOnMainThread(const char *func, - const char *file, - int lineNum) { - _GTMDevAssert(_GTMIsRunningOnMainThread(), - @"%s not being run on main thread (%s - %d)", - func, file, lineNum); -} - -#define GTMAssertRunningOnMainThread() \ - (_GTMAssertRunningOnMainThread(__func__, __FILE__, __LINE__)) - -#else // DEBUG - -#define GTMAssertRunningOnMainThread() do { } while (0) - -#endif // DEBUG diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.m deleted file mode 100644 index 5889cd88..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidation.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// GTMDebugThreadValidation.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#if DEBUG && MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -#import "GTMDebugThreadValidation.h" - -static NSThread *gGTMMainThread = nil; - -static __attribute__((constructor)) void _GTMInitThread(void) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - gGTMMainThread = [NSThread currentThread]; - [gGTMMainThread retain]; - [pool release]; -} - - -BOOL _GTMIsRunningOnMainThread(void) { - return [[NSThread currentThread] isEqual:gGTMMainThread]; -} - -#endif // DEBUG && MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidationTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidationTest.m deleted file mode 100644 index 66bd51b7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMDebugThreadValidationTest.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// GTMDebugThreadValidationTest.m -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMDebugThreadValidation.h" - -// GTMDebugThreadValidation only happens on debug builds -#if DEBUG - -@interface GTMDebugThreadValidationTest : GTMTestCase -@end - -// A cheap flag for knowing when our thread has run - -static volatile BOOL gGTMDebugThreadValidationTestDone = NO; - -// This is an assertion handler that just records that an assertion has fired. -@interface GTMDebugThreadValidationCheckAssertionHandler : NSAssertionHandler { - @private - BOOL handledAssertion_; -} -- (void)handleFailureInMethod:(SEL)selector - object:(id)object - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format,...; - -- (void)handleFailureInFunction:(NSString *)functionName - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format,...; -- (BOOL)didHandleAssertion; -@end - -@implementation GTMDebugThreadValidationTest -- (void)testOnMainThread { - STAssertNoThrow(GTMAssertRunningOnMainThread(), nil); -} - -- (void)threadFunc:(NSMutableString *)result { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - // We'll insert our own assertion handler that will get called on the assert - // so that we don't have to worry about the log, and exception being thrown. - GTMDebugThreadValidationCheckAssertionHandler *handler = - [[[GTMDebugThreadValidationCheckAssertionHandler alloc] init] autorelease]; - NSMutableDictionary *threadDictionary - = [[NSThread currentThread] threadDictionary]; - [threadDictionary setObject:handler forKey:@"NSAssertionHandler"]; - GTMAssertRunningOnMainThread(); - if ([handler didHandleAssertion]) { - [result setString:@"ASSERTED"]; - } - [threadDictionary removeObjectForKey:@"NSAssertionHandler"]; - gGTMDebugThreadValidationTestDone = YES; - [pool release]; -} - -- (void)testOnOtherThread { - NSMutableString *result = [NSMutableString string]; - gGTMDebugThreadValidationTestDone = NO; - [NSThread detachNewThreadSelector:@selector(threadFunc:) - toTarget:self - withObject:result]; - NSRunLoop *loop = [NSRunLoop currentRunLoop]; - - while (!gGTMDebugThreadValidationTestDone) { - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:0.01]; - [loop runUntilDate:date]; - } - STAssertEqualStrings(result, @"ASSERTED", @"GTMAssertRunningOnMainThread did " - @"not assert while running on another thread"); -} -@end - -@implementation GTMDebugThreadValidationCheckAssertionHandler - -- (void)handleFailureInMethod:(SEL)selector - object:(id)object - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format,... { - handledAssertion_ = YES; -} - -- (void)handleFailureInFunction:(NSString *)functionName - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format,... { - handledAssertion_ = YES; -} - -- (BOOL)didHandleAssertion { - return handledAssertion_; -} -@end -#endif // DEBUG diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.h deleted file mode 100644 index 7b0919b0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// GTMMethodCheck.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import - -/// A macro for enforcing debug time checks to make sure all required methods are linked in -// -// When using categories, it can be very easy to forget to include the -// implementation of a category. -// Let's say you had a class foo that depended on method bar of class baz, and -// method bar was implemented as a member of a category. -// You could add the following code: -// @implementation foo -// GTM_METHOD_CHECK(baz, bar) -// @end -// and the code would check to make sure baz was implemented just before main -// was called. This works for both dynamic libraries, and executables. -// -// Classes (or one of their superclasses) being checked must conform to the -// NSObject protocol. We will check this, and spit out a warning if a class does -// not conform to NSObject. -// -// This is not compiled into release builds. - -#ifdef DEBUG - -#ifdef __cplusplus -extern "C" { -#endif - -// If you get an error for GTMMethodCheckMethodChecker not being defined, -// you need to link in GTMMethodCheck.m. We keep it hidden so that we can have -// it living in several separate images without conflict. -// Functions with the ((constructor)) attribute are called after all +loads -// have been called. See "Initializing Objective-C Classes" in -// http://developer.apple.com/documentation/DeveloperTools/Conceptual/DynamicLibraries/Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-DontLinkElementID_20 - -__attribute__ ((constructor, visibility("hidden"))) void GTMMethodCheckMethodChecker(void); - -#ifdef __cplusplus -}; -#endif - -// This is the "magic". -// A) we need a multi layer define here so that the stupid preprocessor -// expands __LINE__ out the way we want it. We need LINE so that each of -// out GTM_METHOD_CHECKs generates a unique class method for the class. -#define GTM_METHOD_CHECK(class, method) GTM_METHOD_CHECK_INNER(class, method, __LINE__) -#define GTM_METHOD_CHECK_INNER(class, method, line) GTM_METHOD_CHECK_INNER_INNER(class, method, line) - -// B) Create up a class method called xxGMethodCheckMethod+class+line that the -// GTMMethodCheckMethodChecker function can look for and call. We -// look for GTMMethodCheckMethodChecker to enforce linkage of -// GTMMethodCheck.m. -#define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \ -+ (void)xxGTMMethodCheckMethod ## class ## line { \ - void (*addr)() = GTMMethodCheckMethodChecker; \ - if (addr && ![class instancesRespondToSelector:@selector(method)] \ - && ![class respondsToSelector:@selector(method)]) { \ - fprintf(stderr, "%s:%d: error: We need method '%s' to be linked in for class '%s'\n", \ - __FILE__, line, #method, #class); \ - exit(EX_SOFTWARE); \ - } \ -} - -#else // !DEBUG - -// Do nothing in release. -#define GTM_METHOD_CHECK(class, method) - -#endif // DEBUG diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.m deleted file mode 100644 index 2f88dc36..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheck.m +++ /dev/null @@ -1,163 +0,0 @@ -// -// GTMMethodCheck.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Don't want any of this in release builds -#ifdef DEBUG -#import "GTMDefines.h" -#import "GTMMethodCheck.h" -#import "GTMObjC2Runtime.h" -#import - -// Checks to see if the cls passed in (or one of it's superclasses) conforms -// to NSObject protocol. Inheriting from NSObject is the easiest way to do this -// but not all classes (i.e. NSProxy) inherit from NSObject. Also, some classes -// inherit from Object instead of NSObject which is fine, and we'll count as -// conforming to NSObject for our needs. -static BOOL ConformsToNSObjectProtocol(Class cls) { - // If we get nil, obviously doesn't conform. - if (!cls) return NO; - const char *className = class_getName(cls); - if (!className) return NO; - - // We're going to assume that all Apple classes will work - // (and aren't being checked) - // Note to apple: why doesn't obj-c have real namespaces instead of two - // letter hacks? If you name your own classes starting with NS this won't - // work for you. - // Some classes (like _NSZombie) start with _NS. - // On Leopard we have to look for CFObject as well. - // On iPhone we check Object as well - if ((strncmp(className, "NS", 2) == 0) - || (strncmp(className, "_NS", 3) == 0) - || (strcmp(className, "CFObject") == 0) -#if GTM_IPHONE_SDK - || (strcmp(className, "Object") == 0) -#endif - ) { - return YES; - } - -// iPhone SDK does not define the |Object| class, so we instead test for the -// |NSObject| class. -#if GTM_IPHONE_SDK - // Iterate through all the protocols |cls| supports looking for NSObject. - if (cls == [NSObject class] - || class_conformsToProtocol(cls, @protocol(NSObject))) { - return YES; - } -#else - // Iterate through all the protocols |cls| supports looking for NSObject. - if (cls == [Object class] - || class_conformsToProtocol(cls, @protocol(NSObject))) { - return YES; - } -#endif - - // Recursively check the superclasses. - return ConformsToNSObjectProtocol(class_getSuperclass(cls)); -} - -void GTMMethodCheckMethodChecker(void) { - // Run through all the classes looking for class methods that are - // prefixed with xxGMMethodCheckMethod. If it finds one, it calls it. - // See GTMMethodCheck.h to see what it does. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int numClasses = 0; - int newNumClasses = objc_getClassList(NULL, 0); - int i; - Class *classes = NULL; - while (numClasses < newNumClasses) { - numClasses = newNumClasses; - classes = realloc(classes, sizeof(Class) * numClasses); - _GTMDevAssert(classes, @"Unable to allocate memory for classes"); - newNumClasses = objc_getClassList(classes, numClasses); - } - for (i = 0; i < numClasses && classes; ++i) { - Class cls = classes[i]; - - // Since we are directly calling objc_msgSend, we need to conform to - // @protocol(NSObject), or else we will tumble into a _objc_msgForward - // recursive loop when we try and call a function by name. - if (!ConformsToNSObjectProtocol(cls)) { - // COV_NF_START - _GTMDevLog(@"GTMMethodCheckMethodChecker: Class %s does not conform to " - "@protocol(NSObject), so won't be checked", - class_getName(cls)); - continue; - // COV_NF_END - } - // Since we are looking for a class method (+xxGMMethodCheckMethod...) - // we need to query the isa pointer to see what methods it support, but - // send the method (if it's supported) to the class itself. - unsigned int count; - Class metaClass = objc_getMetaClass(class_getName(cls)); - Method *methods = class_copyMethodList(metaClass, &count); - unsigned int j; - for (j = 0; j < count; ++j) { - SEL selector = method_getName(methods[j]); - const char *name = sel_getName(selector); - if (strstr(name, "xxGTMMethodCheckMethod") == name) { - // Check to make sure that the method we are checking comes - // from the same image that we are in. Since GTMMethodCheckMethodChecker - // is not exported, we should always find the copy in our local - // image. We compare the address of it's image with the address of - // the image which implements the method we want to check. If - // they match we continue. This does two things: - // a) minimizes the amount of calls we make to the xxxGTMMethodCheck - // methods. They should only be called once. - // b) prevents initializers for various classes being called too early - Dl_info methodCheckerInfo; - if (!dladdr(GTMMethodCheckMethodChecker, - &methodCheckerInfo)) { - // COV_NF_START - // Don't know how to force this case in a unittest. - // Certainly hope we never see it. - _GTMDevLog(@"GTMMethodCheckMethodChecker: Unable to get dladdr info " - "for GTMMethodCheckMethodChecker while introspecting +[%@ %@]]", - class_getName(cls), name); - continue; - // COV_NF_END - } - Dl_info methodInfo; - if (!dladdr(method_getImplementation(methods[j]), - &methodInfo)) { - // COV_NF_START - // Don't know how to force this case in a unittest - // Certainly hope we never see it. - _GTMDevLog(@"GTMMethodCheckMethodChecker: Unable to get dladdr info " - "for %@ while introspecting +[%@ %@]]", name, - class_getName(cls), name); - continue; - // COV_NF_END - } - if (methodCheckerInfo.dli_fbase == methodInfo.dli_fbase) { - objc_msgSend(cls, selector); - } - } - } - if (methods) { - free(methods); - } - } - if (classes) { - free(classes); - } - [pool release]; -} - -#endif // DEBUG diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheckTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheckTest.m deleted file mode 100644 index 974dfafd..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/DebugUtils/GTMMethodCheckTest.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// GTMMethodCheckTest.m -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMMethodCheck.h" - -static BOOL gTestCheckVar = NO; - -@interface GTMMethodCheckTest : GTMTestCase -+ (void)GTMMethodCheckTestClassMethod; -@end - -@implementation GTMMethodCheckTest -GTM_METHOD_CHECK(GTMMethodCheckTest, GTMMethodCheckTestMethod); -GTM_METHOD_CHECK(GTMMethodCheckTest, GTMMethodCheckTestClassMethod); - -- (void)GTMMethodCheckTestMethod { -} - -+ (void)GTMMethodCheckTestClassMethod { -} - -+ (void)xxGTMMethodCheckMethodTestCheck { - // This gets called because of its special name by GMMethodCheck - // Look at the Macros in GMMethodCheck.h for details. - gTestCheckVar = YES; -} - -- (void)testGTMMethodCheck { -#ifdef DEBUG - // GTMMethodCheck only runs in debug - STAssertTrue(gTestCheckVar, @"Should be true"); -#endif - - // Next two calls just verify our code coverage - [self GTMMethodCheckTestMethod]; - [[self class] GTMMethodCheckTestClassMethod]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.h deleted file mode 100644 index e8657279..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.h +++ /dev/null @@ -1,222 +0,0 @@ -// -// GTMAbstractDOListener.h -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -@class GTMReceivePortDelegate; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -// Abstract base class for DO "listeners". -// A class that needs to vend itself over DO should subclass this abstract -// class. This class takes care of certain things like creating a new thread -// to handle requests, setting request/reply timeouts, and ensuring the vended -// object only gets requests that comply with the specified protocol. -// -// Subclassers will want to use the -// GTM_ABSTRACTDOLISTENER_SUBCLASS_THREADMAIN_IMPL macro for easier debugging -// of stack traces. Please read it's description below. -// -@interface GTMAbstractDOListener : NSObject { - @protected - NSString *registeredName_; - __weak Protocol *protocol_; - NSConnection *connection_; - BOOL isRunningInNewThread_; - BOOL shouldShutdown_; - NSTimeInterval requestTimeout_; - NSTimeInterval replyTimeout_; - NSPort *port_; - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - GTMReceivePortDelegate *receivePortDelegate_; // Strong (only used on Tiger) -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -} - -// Returns a set of all live instances of GTMAbstractDOListener subclasses. -// If no listeners have been created, this will return an empty array--not nil. -// -// TODO: Remove this method -// -+ (NSArray *)allListeners; - -// Initializer. This actually calls -// initWithRegisteredName:protocol:port with [NSMachPort port] as the port. -// -// Args: -// name - the name that the object will register under -// proto - the protocol that this object (self) should conform to -// -- (id)initWithRegisteredName:(NSString *)name protocol:(Protocol *)proto; - -// The designated initializer. -// -// Args: -// name - the name used to register the port. While not necessarily required -// for an NSSocketPort this class still requires it. -// proto - the protocol that this object (self) should conform to -// port - the port to be used when creating the NSConnection. If a NSMachPort -// is being used then initWithRegisteredName:protocol is recommended. -// Otherwise the port must be allocted by the caller. -// -- (id)initWithRegisteredName:(NSString *)name - protocol:(Protocol *)proto - port:(NSPort *)port; - -// Returns the name that this server will register with the -// mach port name sever. This is the name of the port that this class -// will "listen" on when -runInNewThread is called. -// -// Returns: -// The registered name as a string -// -- (NSString *)registeredName; - -// Sets the registered name to use when listening over DO. This only makes -// sense to be called before -runInNewThread has been called, because -// -runInNewThread will listen on this "registered name", so setting it -// afterwards would do nothing. -// -// Args: -// name - the name to register under. May not be nil. -// -- (void)setRegisteredName:(NSString *)name; - -// Get/set the request timeout interval. If set to a value less than 0, -// the default DO connection timeout will be used (maximum possible value). -// -- (NSTimeInterval)requestTimeout; -- (void)setRequestTimeout:(NSTimeInterval)timeout; - -// Get/set the reply timeout interval. If set to a value less than 0, -// the default DO connection timeout will be used (maximum possible value). -// -- (NSTimeInterval)replyTimeout; -- (void)setReplyTimeout:(NSTimeInterval)timeout; - -// Returns the listeners associated NSConnection. May be nil if no connection -// has been setup yet. -// -- (NSConnection *)connection; - -// Starts the DO system listening using the current thread and current runloop. -// It only makes sense to call this method -OR- -runInNewThread, but not both. -// Returns YES if it was able to startup the DO listener, NO otherwise. -// -- (BOOL)runInCurrentThread; - -// Starts the DO system listening, and creates a new thread to handle the DO -// connections. It only makes sense to call this method -OR- -// -runInCurrentThread, but not both. -// if |errObject| is non nil, it will be used along with |selector| and -// |argument| to signal that the startup of the listener in the new thread -// failed. The actual selector will be invoked back on the main thread so -// it does not have to be thread safe. -// The most basic way to call this method is as follows: -// [listener runInNewThreadWithErrorTarget:nil -// selector:NULL -// withObjectArgument:nil]; -// -// Note: Using the example above you will not know if the listener failed to -// startup due to some error. -// -- (void)runInNewThreadWithErrorTarget:(id)errObject - selector:(SEL)selector - withObjectArgument:(id)argument; - -// Shuts down the connection. If it was running in a new thread, that thread -// should exit (within about 10 seconds). This call does not block. -// -// NOTE: This method is called in -dealloc, so if -runInNewThread had previously -// been called, -dealloc will return *before* the thread actually exits. This -// can be a problem as "self" may be gone before the thread exits. This is a -// bug and needs to be fixed. Currently, to be safe, only call -shutdown if -// -runInCurrentThread had previously been called. -// -- (void)shutdown; - -@end - - -// Methods that subclasses may implement to vary the behavior of this abstract -// class. -// -@interface GTMAbstractDOListener (GTMAbstractDOListenerSubclassMethods) - -// Called by the -runIn* methods. In the case where a new thread is being used, -// this method is called on the new thread. The default implementation of this -// method just returns YES, but subclasses can override it to do subclass -// specific initialization. If this method returns NO, the -runIn* method that -// called it will fail with an error. -// -// Returns: -// YES if the -runIn* method should continue successfully, NO if the it should -// fail. -// -- (BOOL)doRunInitialization; - -// Called as the "main" for the thread spun off by GTMAbstractDOListener. -// Not really for use by subclassers, except to use the -// GTMABSTRACTDOLISTENER_SUBCLASS_THREADMAIN_IMPL macro defined below. -// -// This method runs forever in a new thread. This method actually starts the -// DO connection listening. -// -- (void)threadMain:(NSInvocation *)failureCallback; - -@end - -// GTMAbstractDOListeners used to be hard to debug because crashes in their -// stacks looked like this: -// -// #0 0x90009cd7 in mach_msg_trap () -// #1 0x90009c38 in mach_msg () -// #2 0x9082d2b3 in CFRunLoopRunSpecific () -// #3 0x9082cace in CFRunLoopRunInMode () -// #4 0x9282ad3a in -[NSRunLoop runMode:beforeDate:] () -// #5 0x928788e4 in -[NSRunLoop runUntilDate:] () -// #6 0x00052696 in -[GTMAbstractDOListener(GTMAbstractDOListenerSubclassMethods) threadMain:] ... -// #7 0x927f52e0 in forkThreadForFunction () -// #8 0x90024227 in _pthread_body () -// -// and there was no good way to figure out what thread had the problem because -// they all originated from -// -[GTMAbstractDOListener(GTMAbstractDOListenerSubclassMethods) threadMain:] -// -// If you add GTMABSTRACTDOLISTENER_SUBCLASS_THREADMAIN_IMPL to the impl of your -// subclass you will get a stack that looks like this: -// #0 0x90009cd7 in mach_msg_trap () -// #1 0x90009c38 in mach_msg () -// #2 0x9082d2b3 in CFRunLoopRunSpecific () -// #3 0x9082cace in CFRunLoopRunInMode () -// #4 0x9282ad3a in -[NSRunLoop runMode:beforeDate:] () -// #5 0x928788e4 in -[NSRunLoop runUntilDate:] () -// #6 0x00052696 in -[GTMAbstractDOListener(GTMAbstractDOListenerSubclassMethods) threadMain:] ... -// #7 0x0004b35c in -[GDStatsListener threadMain:] -// #8 0x927f52e0 in forkThreadForFunction () #9 0x90024227 in _pthread_body () -// -// so we can see that this was the GDStatsListener thread that failed. -// It will look something like this -// @implemetation MySubclassOfGTMAbstractDOListenerSubclassMethods -// GTM_ABSTRACTDOLISTENER_SUBCLASS_THREADMAIN_IMPL -// .... -// @end - -#define GTM_ABSTRACTDOLISTENER_SUBCLASS_THREADMAIN_IMPL \ - - (void)threadMain:(NSInvocation *)failureCallback { \ - [super threadMain:failureCallback]; \ - } diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.m deleted file mode 100644 index 772960bb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListener.m +++ /dev/null @@ -1,438 +0,0 @@ -// -// GTMAbstractDOListener.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMAbstractDOListener.h" -#import "GTMSystemVersion.h" -#import - -// Hack workaround suggested by DTS for the DO deadlock bug. Basically, this -// class intercepts the delegate role for DO's receive port (which is an -// NSMachPort). When -handlePortMessage: is called, it verifies that the send -// and receive ports are not nil, then forwards the message on to the original -// delegate. If the ports are nil, then the resulting NSConnection would -// eventually cause us to deadlock. In this case, it simply ignores the -// message. This is only need on Tiger. -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -@interface GTMReceivePortDelegate : NSObject { - __weak id delegate_; -} -- (id)initWithDelegate:(id)delegate; -- (void)handlePortMessage:(NSPortMessage *)message; -@end -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -@interface GTMAbstractDOListener (PrivateMethods) -- (BOOL)startListening; -- (void)stopListening; - -// Returns a description of the port based on the type of port. -- (NSString *)portDescription; - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -// Uses the GTMReceivePortDelegate hack (see comments above) if we're on Tiger. -- (void)hackaroundTigerDOWedgeBug:(NSConnection *)conn; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -@end - -// Static global set that holds a pointer to all instances of -// GTMAbstractDOListener subclasses. -// -static NSMutableSet *gAllListeners = nil; - -@implementation GTMAbstractDOListener - -+ (void)initialize { - if (self == [GTMAbstractDOListener class]) { - // We create the set using CFSetCreateMutable because we don't - // want to retain things in this set. If we retained things in the - // set we would never be able to dealloc ourselves because we - // add "self" to this set in it's init routine would cause an - // extra retain to be added to it. - gAllListeners = (NSMutableSet*)CFSetCreateMutable(NULL, 0, NULL); - } -} - -+ (NSArray *)allListeners { - // We return an NSArray instead of an NSSet here because NSArrays look nicer - // when displayed as %@ - NSArray *allListeners = nil; - - @synchronized (gAllListeners) { - allListeners = [gAllListeners allObjects]; - } - return allListeners; -} - -- (id)init { - return [self initWithRegisteredName:nil protocol:NULL]; -} - -- (id)initWithRegisteredName:(NSString *)name protocol:(Protocol *)proto { - return [self initWithRegisteredName:name - protocol:proto - port:[NSMachPort port]]; -} - -- (id)initWithRegisteredName:(NSString *)name - protocol:(Protocol *)proto - port:(NSPort *)port { - self = [super init]; - if (!self) { - return nil; - } - - if ((!proto) || (!port) || (!name)) { - if (!proto) { - _GTMDevLog(@"Failed to create a listener, a protocol must be specified"); - } - - if (!port) { - _GTMDevLog(@"Failed to create a listener, a port must be specified"); - } - - if (!name) { - _GTMDevLog(@"Failed to create a listener, a name must be specified"); - } - - [self release]; - return nil; - } - - registeredName_ = [name copy]; - protocol_ = proto; // Can't retain protocols - port_ = [port retain]; - - requestTimeout_ = -1; - replyTimeout_ = -1; - - _GTMDevAssert(gAllListeners, @"gAllListeners is not nil"); - @synchronized (gAllListeners) { - [gAllListeners addObject:self]; - } - - return self; -} - -- (void)dealloc { - _GTMDevAssert(gAllListeners, @"gAllListeners is not nil"); - @synchronized (gAllListeners) { - [gAllListeners removeObject:self]; - } - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [receivePortDelegate_ release]; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - - [self shutdown]; - [port_ release]; - [registeredName_ release]; - [super dealloc]; -} - - -#pragma mark Getters and Setters - -- (NSString *)registeredName { - return registeredName_; -} - -- (void)setRegisteredName:(NSString *)name { - if (!name) { - return; - } - [registeredName_ autorelease]; - registeredName_ = [name copy]; -} - -- (NSTimeInterval)requestTimeout { - return requestTimeout_; -} - -- (void)setRequestTimeout:(NSTimeInterval)timeout { - requestTimeout_ = timeout; -} - -- (NSTimeInterval)replyTimeout { - return replyTimeout_; -} - -- (void)setReplyTimeout:(NSTimeInterval)timeout { - replyTimeout_ = timeout; -} - -- (NSConnection *)connection { - return connection_; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@<%p> { name=\"%@\", %@ }", - [self class], self, registeredName_, [self portDescription]]; -} - -#pragma mark "Run" methods - -- (BOOL)runInCurrentThread { - return [self startListening]; -} - -- (void)runInNewThreadWithErrorTarget:(id)errObject - selector:(SEL)selector - withObjectArgument:(id)argument { - NSInvocation *invocation = nil; - - _GTMDevAssert(((errObject != nil && selector != NULL) || - (!errObject && !selector)), @"errObject and selector must " - @"both be nil or not nil"); - - // create an invocation we can use if things fail - if (errObject) { - NSMethodSignature *signature = - [errObject methodSignatureForSelector:selector]; - invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:selector]; - [invocation setTarget:errObject]; - - // If the selector they passed in takes an arg (i.e., it has at least one - // colon in the selector name), then set the first user-specified arg to be - // the |argument| they specified. The first two args are self and _cmd. - if ([signature numberOfArguments] > 2) { - [invocation setArgument:&argument atIndex:2]; - } - - [invocation retainArguments]; - } - - shouldShutdown_ = NO; - [NSThread detachNewThreadSelector:@selector(threadMain:) - toTarget:self - withObject:invocation]; -} - -- (void)shutdown { - // If we're not running in a new thread (then we're running in the "current" - // thread), tear down the NSConnection here. If we are running in a new - // thread we just set the shouldShutdown_ flag, and the thread will teardown - // the NSConnection itself. - if (!isRunningInNewThread_) { - [self stopListening]; - } else { - shouldShutdown_ = YES; - } -} - -@end - -@implementation GTMAbstractDOListener (PrivateMethods) - -- (BOOL)startListening { - BOOL result = NO; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - connection_ = [[NSConnection alloc] initWithReceivePort:port_ sendPort:nil]; - - NSProtocolChecker *checker = - [NSProtocolChecker protocolCheckerWithTarget:self - protocol:protocol_]; - - if (requestTimeout_ >= 0) { - [connection_ setRequestTimeout:requestTimeout_]; - } - - if (replyTimeout_ >= 0) { - [connection_ setReplyTimeout:replyTimeout_]; - } - - // Set the connection's root object to be the protocol checker so that only - // methods listed in the protocol_ are available via DO. - [connection_ setRootObject:checker]; - - // Allow subclasses to be the connection delegate - [connection_ setDelegate:self]; - - // Because of radar 5493309 we need to do this. [NSConnection registeredName:] - // returns NO when the connection is created using an NSSocketPort under - // Leopard. - // - // The recommendation from Apple was to use the command: - // [NSConnection registerName:withNameServer:]. - NSPortNameServer *server; - if ([port_ isKindOfClass:[NSSocketPort class]]) { - server = [NSSocketPortNameServer sharedInstance]; - } else { - server = [NSPortNameServer systemDefaultPortNameServer]; - } - - BOOL registered = [connection_ registerName:registeredName_ - withNameServer:server]; - - if (registeredName_ && registered) { -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - [self hackaroundTigerDOWedgeBug:connection_]; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - - result = YES; - - _GTMDevLog(@"listening on %@ with name '%@'", [self portDescription], - registeredName_); - } else { - _GTMDevLog(@"failed to register %@ with %@", connection_, registeredName_); - } - - // we're good, so call the overrideable initializer - if (result) { - // Call the virtual "runIn*" initializer - result = [self doRunInitialization]; - } - - [pool drain]; - - return result; -} - -- (void)stopListening { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [connection_ invalidate]; - [connection_ release]; - connection_ = nil; - [pool drain]; -} - -- (NSString *)portDescription { - NSString *portDescription; - if ([port_ isKindOfClass:[NSMachPort class]]) { - portDescription = [NSString stringWithFormat:@"mach_port=%#x", - [(NSMachPort *)port_ machPort]]; - } else { - portDescription = [NSString stringWithFormat:@"port=%@", - [port_ description]]; - } - return portDescription; -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -- (void)hackaroundTigerDOWedgeBug:(NSConnection *)conn { - if ([GTMSystemVersion isTiger]) { - NSPort *receivePort = [conn receivePort]; - if ([receivePort isKindOfClass:[NSMachPort class]]) { - id portDelegate = [receivePort delegate]; - receivePortDelegate_ = - [[GTMReceivePortDelegate alloc] initWithDelegate:portDelegate]; - [receivePort setDelegate:receivePortDelegate_]; - } - } -} -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -@end - -@implementation GTMAbstractDOListener (GTMAbstractDOListenerSubclassMethods) - -- (BOOL)doRunInitialization { - return YES; -} - -// -// -threadMain: -// - -// -- (void)threadMain:(NSInvocation *)failureCallback { - isRunningInNewThread_ = YES; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // register - if ([self startListening]) { - // spin - for (;;) { // Run forever - - // check if we were asked to shutdown - if (shouldShutdown_) { - break; - } - - NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; - // Wrap our runloop in case we get an exception from DO - @try { - NSDate *waitDate = [NSDate dateWithTimeIntervalSinceNow:10]; - [[NSRunLoop currentRunLoop] runUntilDate:waitDate]; - } @catch (id e) { - _GTMDevLog(@"Listener '%@' caught exception: %@", registeredName_, e); - } - [localPool drain]; - } - } else { - // failed, if we had something to invoke, call it on the main thread - if (failureCallback) { - [failureCallback performSelectorOnMainThread:@selector(invoke) - withObject:nil - waitUntilDone:NO]; - } - } - - [self stopListening]; - [pool drain]; - - isRunningInNewThread_ = NO; -} - -@end - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -@implementation GTMReceivePortDelegate - -- (id)initWithDelegate:(id)delegate { - if ((self = [super init])) { - delegate_ = delegate; // delegates aren't retained - } - return self; -} - -- (void)handlePortMessage:(NSPortMessage *)message { - NSPort *receivePort = [message receivePort]; - NSPort *sendPort = [message sendPort]; - - // If we don't have a sensible send or receive port, just act like - // the message never arrived. Otherwise, hand it off to the original - // delegate (which is the NSMachPort itself). - if (receivePort == nil || sendPort == nil || [receivePort isEqual:sendPort]) { - _GTMDevLog(@"Dropping port message destined for itself to avoid DO wedge."); - } else { - // Uncomment for super-duper verbose DO message forward logging - // _GTMDevLog(@"--> Forwarding message %@ to delegate %@", - // message, delegate_); - [delegate_ handlePortMessage:message]; - } - - // If processing the message caused us to drop no longer being the delegate, - // set us back. Due to interactions between NSConnection and NSMachPort, - // it's possible for the NSMachPort's delegate to get set back to its - // original value. If that happens, we set it back to the value we want. - if ([delegate_ delegate] != self) { - if ([delegate_ delegate] == delegate_) { - _GTMDevLog(@"Restoring DO delegate to %@", self); - [delegate_ setDelegate:self]; - } else { - _GTMDevLog(@"GMReceivePortDelegate replaced with %@", - [delegate_ delegate]); - } - } -} -@end -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListenerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListenerTest.m deleted file mode 100644 index 6076724a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMAbstractDOListenerTest.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// GTMAbstractDOListenerTest.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMAbstractDOListener.h" - -// Needed for GTMIsGarbageCollectionEnabled -#import "GTMGarbageCollection.h" - -@interface GTMAbstractDOListenerTest : GTMTestCase -@end - -// TODO: we need to add more tests for this class. Examples: send messages and -// send messages that are in the protocol. - -@implementation GTMAbstractDOListenerTest - -- (void)testAbstractDOListenerRelease { - NSUInteger listenerCount = [[GTMAbstractDOListener allListeners] count]; - GTMAbstractDOListener *listener = - [[GTMAbstractDOListener alloc] initWithRegisteredName:@"FOO" - protocol:@protocol(NSObject) - port:[NSPort port]]; - STAssertNotNil(listener, nil); - - // We throw an autorelease pool here because allStores does a couple of - // autoreleased retains on us which would screws up our retain count - // numbers. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - STAssertEquals([[GTMAbstractDOListener allListeners] count], - listenerCount + 1, nil); - [pool drain]; - - if (!GTMIsGarbageCollectionEnabled()) { - // Not much point with GC on. - STAssertEquals([listener retainCount], (NSUInteger)1, nil); - } - - [listener release]; - if (!GTMIsGarbageCollectionEnabled()) { - STAssertEquals([[GTMAbstractDOListener allListeners] count], listenerCount, - nil); - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.h deleted file mode 100644 index 169b1c3c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.h +++ /dev/null @@ -1,183 +0,0 @@ -// -// GTMBase64.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// GTMBase64 -// -/// Helper for handling Base64 and WebSafeBase64 encodings -// -/// The webSafe methods use different character set and also the results aren't -/// always padded to a multiple of 4 characters. This is done so the resulting -/// data can be used in urls and url query arguments without needing any -/// encoding. You must use the webSafe* methods together, the data does not -/// interop with the RFC methods. -// -@interface GTMBase64 : NSObject - -// -// Standard Base64 (RFC) handling -// - -// encodeData: -// -/// Base64 encodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)encodeData:(NSData *)data; - -// decodeData: -// -/// Base64 decodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)decodeData:(NSData *)data; - -// encodeBytes:length: -// -/// Base64 encodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length; - -// decodeBytes:length: -// -/// Base64 decodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length; - -// stringByEncodingData: -// -/// Base64 encodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByEncodingData:(NSData *)data; - -// stringByEncodingBytes:length: -// -/// Base64 encodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length; - -// decodeString: -// -/// Base64 decodes contents of the NSString. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)decodeString:(NSString *)string; - -// -// Modified Base64 encoding so the results can go onto urls. -// -// The changes are in the characters generated and also allows the result to -// not be padded to a multiple of 4. -// Must use the matching call to encode/decode, won't interop with the -// RFC versions. -// - -// webSafeEncodeData:padded: -// -/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeEncodeData:(NSData *)data - padded:(BOOL)padded; - -// webSafeDecodeData: -// -/// WebSafe Base64 decodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)webSafeDecodeData:(NSData *)data; - -// webSafeEncodeBytes:length:padded: -// -/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeEncodeBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded; - -// webSafeDecodeBytes:length: -// -/// WebSafe Base64 decodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length; - -// stringByWebSafeEncodingData:padded: -// -/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByWebSafeEncodingData:(NSData *)data - padded:(BOOL)padded; - -// stringByWebSafeEncodingBytes:length:padded: -// -/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded; - -// webSafeDecodeString: -// -/// WebSafe Base64 decodes contents of the NSString. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)webSafeDecodeString:(NSString *)string; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.m deleted file mode 100644 index 9f9ffbfc..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64.m +++ /dev/null @@ -1,694 +0,0 @@ -// -// GTMBase64.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMBase64.h" -#import "GTMDefines.h" - -static const char *kBase64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char *kWebSafeBase64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; -static const char kBase64PaddingChar = '='; -static const char kBase64InvalidChar = 99; - -static const char kBase64DecodeChars[] = { - // This array was generated by the following code: - // #include - // #include - // #include - // main() - // { - // static const char Base64[] = - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // char *pos; - // int idx, i, j; - // printf(" "); - // for (i = 0; i < 255; i += 8) { - // for (j = i; j < i + 8; j++) { - // pos = strchr(Base64, j); - // if ((pos == NULL) || (j == 0)) - // idx = 99; - // else - // idx = pos - Base64; - // if (idx == 99) - // printf(" %2d, ", idx); - // else - // printf(" %2d/*%c*/,", idx, j); - // } - // printf("\n "); - // } - // } - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 62/*+*/, 99, 99, 99, 63/*/ */, - 52/*0*/, 53/*1*/, 54/*2*/, 55/*3*/, 56/*4*/, 57/*5*/, 58/*6*/, 59/*7*/, - 60/*8*/, 61/*9*/, 99, 99, 99, 99, 99, 99, - 99, 0/*A*/, 1/*B*/, 2/*C*/, 3/*D*/, 4/*E*/, 5/*F*/, 6/*G*/, - 7/*H*/, 8/*I*/, 9/*J*/, 10/*K*/, 11/*L*/, 12/*M*/, 13/*N*/, 14/*O*/, - 15/*P*/, 16/*Q*/, 17/*R*/, 18/*S*/, 19/*T*/, 20/*U*/, 21/*V*/, 22/*W*/, - 23/*X*/, 24/*Y*/, 25/*Z*/, 99, 99, 99, 99, 99, - 99, 26/*a*/, 27/*b*/, 28/*c*/, 29/*d*/, 30/*e*/, 31/*f*/, 32/*g*/, - 33/*h*/, 34/*i*/, 35/*j*/, 36/*k*/, 37/*l*/, 38/*m*/, 39/*n*/, 40/*o*/, - 41/*p*/, 42/*q*/, 43/*r*/, 44/*s*/, 45/*t*/, 46/*u*/, 47/*v*/, 48/*w*/, - 49/*x*/, 50/*y*/, 51/*z*/, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - -static const char kWebSafeBase64DecodeChars[] = { - // This array was generated by the following code: - // #include - // #include - // #include - // main() - // { - // static const char Base64[] = - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - // char *pos; - // int idx, i, j; - // printf(" "); - // for (i = 0; i < 255; i += 8) { - // for (j = i; j < i + 8; j++) { - // pos = strchr(Base64, j); - // if ((pos == NULL) || (j == 0)) - // idx = 99; - // else - // idx = pos - Base64; - // if (idx == 99) - // printf(" %2d, ", idx); - // else - // printf(" %2d/*%c*/,", idx, j); - // } - // printf("\n "); - // } - // } - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 62/*-*/, 99, 99, - 52/*0*/, 53/*1*/, 54/*2*/, 55/*3*/, 56/*4*/, 57/*5*/, 58/*6*/, 59/*7*/, - 60/*8*/, 61/*9*/, 99, 99, 99, 99, 99, 99, - 99, 0/*A*/, 1/*B*/, 2/*C*/, 3/*D*/, 4/*E*/, 5/*F*/, 6/*G*/, - 7/*H*/, 8/*I*/, 9/*J*/, 10/*K*/, 11/*L*/, 12/*M*/, 13/*N*/, 14/*O*/, - 15/*P*/, 16/*Q*/, 17/*R*/, 18/*S*/, 19/*T*/, 20/*U*/, 21/*V*/, 22/*W*/, - 23/*X*/, 24/*Y*/, 25/*Z*/, 99, 99, 99, 99, 63/*_*/, - 99, 26/*a*/, 27/*b*/, 28/*c*/, 29/*d*/, 30/*e*/, 31/*f*/, 32/*g*/, - 33/*h*/, 34/*i*/, 35/*j*/, 36/*k*/, 37/*l*/, 38/*m*/, 39/*n*/, 40/*o*/, - 41/*p*/, 42/*q*/, 43/*r*/, 44/*s*/, 45/*t*/, 46/*u*/, 47/*v*/, 48/*w*/, - 49/*x*/, 50/*y*/, 51/*z*/, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - - -// Tests a character to see if it's a whitespace character. -// -// Returns: -// YES if the character is a whitespace character. -// NO if the character is not a whitespace character. -// -GTM_INLINE BOOL IsSpace(unsigned char c) { - // we use our own mapping here because we don't want anything w/ locale - // support. - static BOOL kSpaces[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // 0-9 - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 10-19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20-29 - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, // 30-39 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40-49 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 50-59 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60-69 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 70-79 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80-89 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90-99 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 100-109 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 110-119 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 120-129 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 130-139 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 140-149 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 150-159 - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160-169 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170-179 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 180-189 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 190-199 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 200-209 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 210-219 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 220-229 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 230-239 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 240-249 - 0, 0, 0, 0, 0, 1, // 250-255 - }; - return kSpaces[c]; -} - -// Calculate how long the data will be once it's base64 encoded. -// -// Returns: -// The guessed encoded length for a source length -// -GTM_INLINE NSUInteger CalcEncodedLength(NSUInteger srcLen, BOOL padded) { - NSUInteger intermediate_result = 8 * srcLen + 5; - NSUInteger len = intermediate_result / 6; - if (padded) { - len = ((len + 3) / 4) * 4; - } - return len; -} - -// Tries to calculate how long the data will be once it's base64 decoded. -// Unlike the above, this is always an upperbound, since the source data -// could have spaces and might end with the padding characters on them. -// -// Returns: -// The guessed decoded length for a source length -// -GTM_INLINE NSUInteger GuessDecodedLength(NSUInteger srcLen) { - return (srcLen + 3) / 4 * 3; -} - - -@interface GTMBase64 (PrivateMethods) - -+(NSData *)baseEncode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - padded:(BOOL)padded; - -+(NSData *)baseDecode:(const void *)bytes - length:(NSUInteger)length - charset:(const char*)charset - requirePadding:(BOOL)requirePadding; - -+(NSUInteger)baseEncode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - padded:(BOOL)padded; - -+(NSUInteger)baseDecode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - requirePadding:(BOOL)requirePadding; - -@end - - -@implementation GTMBase64 - -// -// Standard Base64 (RFC) handling -// - -+(NSData *)encodeData:(NSData *)data { - return [self baseEncode:[data bytes] - length:[data length] - charset:kBase64EncodeChars - padded:YES]; -} - -+(NSData *)decodeData:(NSData *)data { - return [self baseDecode:[data bytes] - length:[data length] - charset:kBase64DecodeChars - requirePadding:YES]; -} - -+(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseEncode:bytes - length:length - charset:kBase64EncodeChars - padded:YES]; -} - -+(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseDecode:bytes - length:length - charset:kBase64DecodeChars - requirePadding:YES]; -} - -+(NSString *)stringByEncodingData:(NSData *)data { - NSString *result = nil; - NSData *converted = [self baseEncode:[data bytes] - length:[data length] - charset:kBase64EncodeChars - padded:YES]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length { - NSString *result = nil; - NSData *converted = [self baseEncode:bytes - length:length - charset:kBase64EncodeChars - padded:YES]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSData *)decodeString:(NSString *)string { - NSData *result = nil; - NSData *data = [string dataUsingEncoding:NSASCIIStringEncoding]; - if (data) { - result = [self baseDecode:[data bytes] - length:[data length] - charset:kBase64DecodeChars - requirePadding:YES]; - } - return result; -} - -// -// Modified Base64 encoding so the results can go onto urls. -// -// The changes are in the characters generated and also the result isn't -// padded to a multiple of 4. -// Must use the matching call to encode/decode, won't interop with the -// RFC versions. -// - -+(NSData *)webSafeEncodeData:(NSData *)data - padded:(BOOL)padded { - return [self baseEncode:[data bytes] - length:[data length] - charset:kWebSafeBase64EncodeChars - padded:padded]; -} - -+(NSData *)webSafeDecodeData:(NSData *)data { - return [self baseDecode:[data bytes] - length:[data length] - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; -} - -+(NSData *)webSafeEncodeBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded { - return [self baseEncode:bytes - length:length - charset:kWebSafeBase64EncodeChars - padded:padded]; -} - -+(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseDecode:bytes - length:length - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; -} - -+(NSString *)stringByWebSafeEncodingData:(NSData *)data - padded:(BOOL)padded { - NSString *result = nil; - NSData *converted = [self baseEncode:[data bytes] - length:[data length] - charset:kWebSafeBase64EncodeChars - padded:padded]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded { - NSString *result = nil; - NSData *converted = [self baseEncode:bytes - length:length - charset:kWebSafeBase64EncodeChars - padded:padded]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSData *)webSafeDecodeString:(NSString *)string { - NSData *result = nil; - NSData *data = [string dataUsingEncoding:NSASCIIStringEncoding]; - if (data) { - result = [self baseDecode:[data bytes] - length:[data length] - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; - } - return result; -} - -@end - -@implementation GTMBase64 (PrivateMethods) - -// -// baseEncode:length:charset:padded: -// -// Does the common lifting of creating the dest NSData. it creates & sizes the -// data for the results. |charset| is the characters to use for the encoding -// of the data. |padding| controls if the encoded data should be padded to a -// multiple of 4. -// -// Returns: -// an autorelease NSData with the encoded data, nil if any error. -// -+(NSData *)baseEncode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - padded:(BOOL)padded { - // how big could it be? - NSUInteger maxLength = CalcEncodedLength(length, padded); - // make space - NSMutableData *result = [NSMutableData data]; - [result setLength:maxLength]; - // do it - NSUInteger finalLength = [self baseEncode:bytes - srcLen:length - destBytes:[result mutableBytes] - destLen:[result length] - charset:charset - padded:padded]; - if (finalLength) { - _GTMDevAssert(finalLength == maxLength, @"how did we calc the length wrong?"); - } else { - // shouldn't happen, this means we ran out of space - result = nil; - } - return result; -} - -// -// baseDecode:length:charset:requirePadding: -// -// Does the common lifting of creating the dest NSData. it creates & sizes the -// data for the results. |charset| is the characters to use for the decoding -// of the data. -// -// Returns: -// an autorelease NSData with the decoded data, nil if any error. -// -// -+(NSData *)baseDecode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - requirePadding:(BOOL)requirePadding { - // could try to calculate what it will end up as - NSUInteger maxLength = GuessDecodedLength(length); - // make space - NSMutableData *result = [NSMutableData data]; - [result setLength:maxLength]; - // do it - NSUInteger finalLength = [self baseDecode:bytes - srcLen:length - destBytes:[result mutableBytes] - destLen:[result length] - charset:charset - requirePadding:requirePadding]; - if (finalLength) { - if (finalLength != maxLength) { - // resize down to how big it was - [result setLength:finalLength]; - } - } else { - // either an error in the args, or we ran out of space - result = nil; - } - return result; -} - -// -// baseEncode:srcLen:destBytes:destLen:charset:padded: -// -// Encodes the buffer into the larger. returns the length of the encoded -// data, or zero for an error. -// |charset| is the characters to use for the encoding -// |padded| tells if the result should be padded to a multiple of 4. -// -// Returns: -// the length of the encoded data. zero if any error. -// -+(NSUInteger)baseEncode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - padded:(BOOL)padded { - if (!srcLen || !destLen || !srcBytes || !destBytes) { - return 0; - } - - char *curDest = destBytes; - const unsigned char *curSrc = (const unsigned char *)(srcBytes); - - // Three bytes of data encodes to four characters of cyphertext. - // So we can pump through three-byte chunks atomically. - while (srcLen > 2) { - // space? - _GTMDevAssert(destLen >= 4, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[((curSrc[0] & 0x03) << 4) + (curSrc[1] >> 4)]; - curDest[2] = charset[((curSrc[1] & 0x0f) << 2) + (curSrc[2] >> 6)]; - curDest[3] = charset[curSrc[2] & 0x3f]; - - curDest += 4; - curSrc += 3; - srcLen -= 3; - destLen -= 4; - } - - // now deal with the tail (<=2 bytes) - switch (srcLen) { - case 0: - // Nothing left; nothing more to do. - break; - case 1: - // One byte left: this encodes to two characters, and (optionally) - // two pad characters to round out the four-character cypherblock. - _GTMDevAssert(destLen >= 2, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[(curSrc[0] & 0x03) << 4]; - curDest += 2; - destLen -= 2; - if (padded) { - _GTMDevAssert(destLen >= 2, @"our calc for encoded length was wrong"); - curDest[0] = kBase64PaddingChar; - curDest[1] = kBase64PaddingChar; - curDest += 2; - } - break; - case 2: - // Two bytes left: this encodes to three characters, and (optionally) - // one pad character to round out the four-character cypherblock. - _GTMDevAssert(destLen >= 3, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[((curSrc[0] & 0x03) << 4) + (curSrc[1] >> 4)]; - curDest[2] = charset[(curSrc[1] & 0x0f) << 2]; - curDest += 3; - destLen -= 3; - if (padded) { - _GTMDevAssert(destLen >= 1, @"our calc for encoded length was wrong"); - curDest[0] = kBase64PaddingChar; - curDest += 1; - } - break; - } - // return the length - return (curDest - destBytes); -} - -// -// baseDecode:srcLen:destBytes:destLen:charset:requirePadding: -// -// Decodes the buffer into the larger. returns the length of the decoded -// data, or zero for an error. -// |charset| is the character decoding buffer to use -// -// Returns: -// the length of the encoded data. zero if any error. -// -+(NSUInteger)baseDecode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - requirePadding:(BOOL)requirePadding { - if (!srcLen || !destLen || !srcBytes || !destBytes) { - return 0; - } - - int decode; - NSUInteger destIndex = 0; - int state = 0; - char ch = 0; - while (srcLen-- && (ch = *srcBytes++) != 0) { - if (IsSpace(ch)) // Skip whitespace - continue; - - if (ch == kBase64PaddingChar) - break; - - decode = charset[(unsigned int)ch]; - if (decode == kBase64InvalidChar) - return 0; - - // Four cyphertext characters decode to three bytes. - // Therefore we can be in one of four states. - switch (state) { - case 0: - // We're at the beginning of a four-character cyphertext block. - // This sets the high six bits of the first byte of the - // plaintext block. - _GTMDevAssert(destIndex < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] = decode << 2; - state = 1; - break; - case 1: - // We're one character into a four-character cyphertext block. - // This sets the low two bits of the first plaintext byte, - // and the high four bits of the second plaintext byte. - _GTMDevAssert((destIndex+1) < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode >> 4; - destBytes[destIndex+1] = (decode & 0x0f) << 4; - destIndex++; - state = 2; - break; - case 2: - // We're two characters into a four-character cyphertext block. - // This sets the low four bits of the second plaintext - // byte, and the high two bits of the third plaintext byte. - // However, if this is the end of data, and those two - // bits are zero, it could be that those two bits are - // leftovers from the encoding of data that had a length - // of two mod three. - _GTMDevAssert((destIndex+1) < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode >> 2; - destBytes[destIndex+1] = (decode & 0x03) << 6; - destIndex++; - state = 3; - break; - case 3: - // We're at the last character of a four-character cyphertext block. - // This sets the low six bits of the third plaintext byte. - _GTMDevAssert(destIndex < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode; - destIndex++; - state = 0; - break; - } - } - - // We are done decoding Base-64 chars. Let's see if we ended - // on a byte boundary, and/or with erroneous trailing characters. - if (ch == kBase64PaddingChar) { // We got a pad char - if ((state == 0) || (state == 1)) { - return 0; // Invalid '=' in first or second position - } - if (srcLen == 0) { - if (state == 2) { // We run out of input but we still need another '=' - return 0; - } - // Otherwise, we are in state 3 and only need this '=' - } else { - if (state == 2) { // need another '=' - while ((ch = *srcBytes++) && (srcLen-- > 0)) { - if (!IsSpace(ch)) - break; - } - if (ch != kBase64PaddingChar) { - return 0; - } - } - // state = 1 or 2, check if all remain padding is space - while ((ch = *srcBytes++) && (srcLen-- > 0)) { - if (!IsSpace(ch)) { - return 0; - } - } - } - } else { - // We ended by seeing the end of the string. - - if (requirePadding) { - // If we require padding, then anything but state 0 is an error. - if (state != 0) { - return 0; - } - } else { - // Make sure we have no partial bytes lying around. Note that we do not - // require trailing '=', so states 2 and 3 are okay too. - if (state == 1) { - return 0; - } - } - } - - // If then next piece of output was valid and got written to it means we got a - // very carefully crafted input that appeared valid but contains some trailing - // bits past the real length, so just toss the thing. - if ((destIndex < destLen) && - (destBytes[destIndex] != 0)) { - return 0; - } - - return destIndex; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64Test.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64Test.m deleted file mode 100644 index 084ea1e0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMBase64Test.m +++ /dev/null @@ -1,437 +0,0 @@ -// -// GTMBase64Test.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMBase64.h" -#include // for randiom/srandomdev - -static void FillWithRandom(char *data, NSUInteger len) { - char *max = data + len; - for ( ; data < max ; ++data) { - *data = random() & 0xFF; - } -} - -static BOOL NoEqualChar(NSData *data) { - const char *scan = [data bytes]; - const char *max = scan + [data length]; - for ( ; scan < max ; ++scan) { - if (*scan == '=') { - return NO; - } - } - return YES; -} - -@interface GTMBase64Test : GTMTestCase -@end - -@implementation GTMBase64Test - -- (void)setUp { - // seed random from /dev/random - srandomdev(); -} - -- (void)testBase64 { - // generate a range of sizes w/ random content - for (int x = 1 ; x < 1024 ; ++x) { - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:x]; - FillWithRandom([data mutableBytes], [data length]); - - // w/ *Bytes apis - NSData *encoded = [GTMBase64 encodeBytes:[data bytes] length:[data length]]; - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - NSData *dataPrime = [GTMBase64 decodeBytes:[encoded bytes] - length:[encoded length]]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Bytes apis"); - - // w/ *Data apis - encoded = [GTMBase64 encodeData:data]; - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - dataPrime = [GTMBase64 decodeData:encoded]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Data apis"); - - // Bytes to String and back - NSString *encodedString = [GTMBase64 stringByEncodingBytes:[data bytes] - length:[data length]]; - STAssertEquals(([encodedString length] % 4), (NSUInteger)0, - @"encoded size for Bytes to Strings should be a multiple of 4"); - dataPrime = [GTMBase64 decodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Bytes to Strings"); - - // Data to String and back - encodedString = [GTMBase64 stringByEncodingData:data]; - STAssertEquals(([encodedString length] % 4), (NSUInteger)0, - @"encoded size for Data to Strings should be a multiple of 4"); - dataPrime = [GTMBase64 decodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Bytes to Strings"); - } - - { - // now test all byte values - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:256]; - unsigned char *scan = (unsigned char*)[data mutableBytes]; - for (int x = 0 ; x <= 255 ; ++x) { - *scan++ = x; - } - - // w/ *Bytes apis - NSData *encoded = [GTMBase64 encodeBytes:[data bytes] length:[data length]]; - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - NSData *dataPrime = [GTMBase64 decodeBytes:[encoded bytes] - length:[encoded length]]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Bytes apis"); - - // w/ *Data apis - encoded = [GTMBase64 encodeData:data]; - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - dataPrime = [GTMBase64 decodeData:encoded]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Data apis"); - - // Bytes to String and back - NSString *encodedString = [GTMBase64 stringByEncodingBytes:[data bytes] - length:[data length]]; - STAssertEquals(([encodedString length] % 4), (NSUInteger)0, - @"encoded size for Bytes to Strings should be a multiple of 4"); - dataPrime = [GTMBase64 decodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Bytes to Strings"); - - // Data to String and back - encodedString = [GTMBase64 stringByEncodingData:data]; - STAssertEquals(([encodedString length] % 4), (NSUInteger)0, - @"encoded size for Data to Strings should be a multiple of 4"); - dataPrime = [GTMBase64 decodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Data to Strings"); - } - - { - // test w/ a mix of spacing characters - - // generate some data, encode it, and add spaces - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:253]; // should get some padding chars on the end - FillWithRandom([data mutableBytes], [data length]); - - NSString *encodedString = [GTMBase64 stringByEncodingData:data]; - NSMutableString *encodedAndSpaced = - [[encodedString mutableCopy] autorelease]; - - NSString *spaces[] = { @"\t", @"\n", @"\r", @" " }; - const NSUInteger numSpaces = sizeof(spaces) / sizeof(NSString*); - for (int x = 0 ; x < 512 ; ++x) { - NSUInteger offset = random() % ([encodedAndSpaced length] + 1); - [encodedAndSpaced insertString:spaces[random() % numSpaces] - atIndex:offset]; - } - - // we'll need it as data for apis - NSData *encodedAsData = - [encodedAndSpaced dataUsingEncoding:NSASCIIStringEncoding]; - STAssertNotNil(encodedAsData, @"failed to extract from string"); - STAssertEquals([encodedAsData length], [encodedAndSpaced length], - @"lengths for encoded string and data didn't match?"); - - // all the decode modes - NSData *dataPrime = [GTMBase64 decodeData:encodedAsData]; - STAssertEqualObjects(data, dataPrime, - @"failed Data decode w/ spaces"); - dataPrime = [GTMBase64 decodeBytes:[encodedAsData bytes] - length:[encodedAsData length]]; - STAssertEqualObjects(data, dataPrime, - @"failed Bytes decode w/ spaces"); - dataPrime = [GTMBase64 decodeString:encodedAndSpaced]; - STAssertEqualObjects(data, dataPrime, - @"failed String decode w/ spaces"); - } -} - -- (void)testWebSafeBase64 { - // loop to test w/ and w/o padding - for (int paddedLoop = 0; paddedLoop < 2 ; ++paddedLoop) { - BOOL padded = (paddedLoop == 1); - - // generate a range of sizes w/ random content - for (int x = 1 ; x < 1024 ; ++x) { - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:x]; - FillWithRandom([data mutableBytes], [data length]); - - // w/ *Bytes apis - NSData *encoded = [GTMBase64 webSafeEncodeBytes:[data bytes] - length:[data length] - padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via *Bytes apis had a base64 padding char"); - } - NSData *dataPrime = [GTMBase64 webSafeDecodeBytes:[encoded bytes] - length:[encoded length]]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Bytes apis"); - - // w/ *Data apis - encoded = [GTMBase64 webSafeEncodeData:data padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via *Data apis had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeData:encoded]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Data apis"); - - // Bytes to String and back - NSString *encodedString = - [GTMBase64 stringByWebSafeEncodingBytes:[data bytes] - length:[data length] - padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via Bytes to Strings had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Bytes to Strings"); - - // Data to String and back - encodedString = - [GTMBase64 stringByWebSafeEncodingData:data padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via Data to Strings had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Data to Strings"); - } - - { - // now test all byte values - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:256]; - unsigned char *scan = (unsigned char*)[data mutableBytes]; - for (int x = 0 ; x <= 255 ; ++x) { - *scan++ = x; - } - - // w/ *Bytes apis - NSData *encoded = - [GTMBase64 webSafeEncodeBytes:[data bytes] - length:[data length] - padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via *Bytes apis had a base64 padding char"); - } - NSData *dataPrime = [GTMBase64 webSafeDecodeBytes:[encoded bytes] - length:[encoded length]]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Bytes apis"); - - // w/ *Data apis - encoded = [GTMBase64 webSafeEncodeData:data padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via *Data apis had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeData:encoded]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Data apis"); - - // Bytes to String and back - NSString *encodedString = - [GTMBase64 stringByWebSafeEncodingBytes:[data bytes] - length:[data length] - padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Bytes apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via Bytes to Strings had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Bytes to Strings"); - - // Data to String and back - encodedString = - [GTMBase64 stringByWebSafeEncodingData:data padded:padded]; - if (padded) { - STAssertEquals(([encoded length] % 4), (NSUInteger)0, - @"encoded size via *Data apis should be a multiple of 4"); - } else { - STAssertTrue(NoEqualChar(encoded), - @"encoded via Data to Strings had a base64 padding char"); - } - dataPrime = [GTMBase64 webSafeDecodeString:encodedString]; - STAssertEqualObjects(data, dataPrime, - @"failed to round trip for Data to Strings"); - } - - { - // test w/ a mix of spacing characters - - // generate some data, encode it, and add spaces - NSMutableData *data = [NSMutableData data]; - STAssertNotNil(data, @"failed to alloc data block"); - - [data setLength:253]; // should get some padding chars on the end - FillWithRandom([data mutableBytes], [data length]); - - NSString *encodedString = [GTMBase64 stringByWebSafeEncodingData:data - padded:padded]; - NSMutableString *encodedAndSpaced = - [[encodedString mutableCopy] autorelease]; - - NSString *spaces[] = { @"\t", @"\n", @"\r", @" " }; - const NSUInteger numSpaces = sizeof(spaces) / sizeof(NSString*); - for (int x = 0 ; x < 512 ; ++x) { - NSUInteger offset = random() % ([encodedAndSpaced length] + 1); - [encodedAndSpaced insertString:spaces[random() % numSpaces] - atIndex:offset]; - } - - // we'll need it as data for apis - NSData *encodedAsData = - [encodedAndSpaced dataUsingEncoding:NSASCIIStringEncoding]; - STAssertNotNil(encodedAsData, @"failed to extract from string"); - STAssertEquals([encodedAsData length], [encodedAndSpaced length], - @"lengths for encoded string and data didn't match?"); - - // all the decode modes - NSData *dataPrime = [GTMBase64 webSafeDecodeData:encodedAsData]; - STAssertEqualObjects(data, dataPrime, - @"failed Data decode w/ spaces"); - dataPrime = [GTMBase64 webSafeDecodeBytes:[encodedAsData bytes] - length:[encodedAsData length]]; - STAssertEqualObjects(data, dataPrime, - @"failed Bytes decode w/ spaces"); - dataPrime = [GTMBase64 webSafeDecodeString:encodedAndSpaced]; - STAssertEqualObjects(data, dataPrime, - @"failed String decode w/ spaces"); - } - } // paddedLoop -} - -- (void)testErrors { - const int something = 0; - NSString *nonAscString = [NSString stringWithUTF8String:"This test ©™®๒०á Ù§"]; - - STAssertNil([GTMBase64 encodeData:nil], @"it worked?"); - STAssertNil([GTMBase64 decodeData:nil], @"it worked?"); - STAssertNil([GTMBase64 encodeBytes:NULL length:10], @"it worked?"); - STAssertNil([GTMBase64 encodeBytes:&something length:0], @"it worked?"); - STAssertNil([GTMBase64 decodeBytes:NULL length:10], @"it worked?"); - STAssertNil([GTMBase64 decodeBytes:&something length:0], @"it worked?"); - STAssertNil([GTMBase64 stringByEncodingData:nil], @"it worked?"); - STAssertNil([GTMBase64 stringByEncodingBytes:NULL length:10], @"it worked?"); - STAssertNil([GTMBase64 stringByEncodingBytes:&something length:0], @"it worked?"); - STAssertNil([GTMBase64 decodeString:nil], @"it worked?"); - // test some pads at the end that aren't right - STAssertNil([GTMBase64 decodeString:@"=="], @"it worked?"); // just pads - STAssertNil([GTMBase64 decodeString:@"vw="], @"it worked?"); // missing pad (in state 2) - STAssertNil([GTMBase64 decodeString:@"vw"], @"it worked?"); // missing pad (in state 2) - STAssertNil([GTMBase64 decodeString:@"NNw"], @"it worked?"); // missing pad (in state 3) - STAssertNil([GTMBase64 decodeString:@"vw=v"], @"it worked?"); // missing pad, has something else - STAssertNil([GTMBase64 decodeString:@"v="], @"it worked?"); // missing a needed char, has pad instead - STAssertNil([GTMBase64 decodeString:@"v"], @"it worked?"); // missing a needed char - STAssertNil([GTMBase64 decodeString:@"vw== vw"], @"it worked?"); - STAssertNil([GTMBase64 decodeString:nonAscString], @"it worked?"); - STAssertNil([GTMBase64 decodeString:@"@@@not valid###"], @"it worked?"); - // carefully crafted bad input to make sure we don't overwalk - STAssertNil([GTMBase64 decodeString:@"WD=="], @"it worked?"); - - STAssertNil([GTMBase64 webSafeEncodeData:nil padded:YES], @"it worked?"); - STAssertNil([GTMBase64 webSafeDecodeData:nil], @"it worked?"); - STAssertNil([GTMBase64 webSafeEncodeBytes:NULL length:10 padded:YES], - @"it worked?"); - STAssertNil([GTMBase64 webSafeEncodeBytes:&something length:0 padded:YES], - @"it worked?"); - STAssertNil([GTMBase64 webSafeDecodeBytes:NULL length:10], @"it worked?"); - STAssertNil([GTMBase64 webSafeDecodeBytes:&something length:0], @"it worked?"); - STAssertNil([GTMBase64 stringByWebSafeEncodingData:nil padded:YES], - @"it worked?"); - STAssertNil([GTMBase64 stringByWebSafeEncodingBytes:NULL - length:10 - padded:YES], - @"it worked?"); - STAssertNil([GTMBase64 stringByWebSafeEncodingBytes:&something - length:0 - padded:YES], - @"it worked?"); - STAssertNil([GTMBase64 webSafeDecodeString:nil], @"it worked?"); - // test some pads at the end that aren't right - STAssertNil([GTMBase64 webSafeDecodeString:@"=="], @"it worked?"); // just pad chars - STAssertNil([GTMBase64 webSafeDecodeString:@"aw="], @"it worked?"); // missing pad - STAssertNil([GTMBase64 webSafeDecodeString:@"aw=a"], @"it worked?"); // missing pad, has something else - STAssertNil([GTMBase64 webSafeDecodeString:@"a"], @"it worked?"); // missing a needed char - STAssertNil([GTMBase64 webSafeDecodeString:@"a="], @"it worked?"); // missing a needed char, has pad instead - STAssertNil([GTMBase64 webSafeDecodeString:@"aw== a"], @"it worked?"); // missing pad - STAssertNil([GTMBase64 webSafeDecodeString:nonAscString], @"it worked?"); - STAssertNil([GTMBase64 webSafeDecodeString:@"@@@not valid###"], @"it worked?"); - // carefully crafted bad input to make sure we don't overwalk - STAssertNil([GTMBase64 webSafeDecodeString:@"WD=="], @"it worked?"); - - // make sure our local helper is working right - STAssertFalse(NoEqualChar([NSData dataWithBytes:"aa=zz" length:5]), @""); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.h deleted file mode 100644 index 5710da61..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.h +++ /dev/null @@ -1,102 +0,0 @@ -// -// GTMCalculatedRange.h -// -// This is a collection that allows you to calculate a value based on -// defined stops in a range. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -/// Allows you to calculate a value based on defined stops in a range. -// -/// For example if you have a range from 0.0 to 1.0 where the stop -/// located at 0.0 is red and the stop located at 1.0 is blue, -/// the value based on the position 0.5 would come out as purple assuming -/// that the valueAtPosition function calculates a purely linear mapping between -/// the stops at 0.0 and 1.0. Stops have indices and are sorted from lowest to -/// highest. The example above would have 2 stops. Stop 0 would be red and stop -/// 1 would be blue. -/// -/// Subclasses of GTMCalculatedRange are expected to override the valueAtPosition: -/// method to return a value based on the position passed in, and the stops -/// that are currently set in the range. Stops do not necessarily have to -/// be the same type as the values that are calculated, but normally they are. -@interface GTMCalculatedRange : NSObject { - NSMutableArray *storage_; -} - -// Adds a stop to the range at |position|. If there is already a stop -// at position |position| it is replaced. -// -// Args: -// item: the object to place at |position|. -// position: the position in the range to put |item|. -// -- (void)insertStop:(id)item atPosition:(CGFloat)position; - -// Removes a stop from the range at |position|. -// -// Args: -// position: the position in the range to remove |item|. -// -// Returns: -// YES if there is a stop at |position| that has been removed -// NO if there is not a stop at the |position| -- (BOOL)removeStopAtPosition:(CGFloat)position; - -// Removes stop |index| from the range. Stops are ordered -// based on position where index of x < index of y if position -// of x < position of y. -// -// Args: -// item: the object to place at |position|. -// position: the position in the range to put |item|. -// -- (void)removeStopAtIndex:(NSUInteger)index; - -// Returns the number of stops in the range. -// -// Returns: -// number of stops -- (NSUInteger)stopCount; - -// Returns the value at position |position|. -// This function should be overridden by subclasses to calculate a -// value for any given range. -// The default implementation returns a value if there happens to be -// a stop for the given position. Otherwise it returns nil. -// -// Args: -// position: the position to calculate a value for. -// -// Returns: -// value for position -- (id)valueAtPosition:(CGFloat)position; - -// Returns the |index|'th stop and position in the set. -// Throws an exception if out of range. -// -// Args: -// index: the index of the stop -// outPosition: a pointer to a value to be filled in with a position. -// this can be NULL, in which case no position is returned. -// -// Returns: -// the stop at the index. -- (id)stopAtIndex:(NSUInteger)index position:(CGFloat*)outPosition; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.m deleted file mode 100644 index 5ab491d8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRange.m +++ /dev/null @@ -1,148 +0,0 @@ -// -// GTMCalculatedRange.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMCalculatedRange.h" - -// Our internal storage type. It keeps track of an item and it's -// position. -@interface GTMCalculatedRangeStopPrivate : NSObject { - id item_; // the item (STRONG) - CGFloat position_; // -} -+ (id)stopWithObject:(id)item position:(CGFloat)inPosition; -- (id)initWithObject:(id)item position:(CGFloat)inPosition; -- (id)item; -- (CGFloat)position; -@end - -GTM_INLINE BOOL FPEqual(CGFloat a, CGFloat b) { - return (fpclassify(a - b) == FP_ZERO); -} - -@implementation GTMCalculatedRangeStopPrivate -+ (id)stopWithObject:(id)item position:(CGFloat)inPosition { - return [[[[self class] alloc] initWithObject:item position:inPosition] autorelease]; -} - -- (id)initWithObject:(id)item position:(CGFloat)inPosition { - self = [super init]; - if (self != nil) { - item_ = [item retain]; - position_ = inPosition; - } - return self; -} - -- (void)dealloc { - [item_ release]; - [super dealloc]; -} - -- (id)item { - return item_; -} - -- (CGFloat)position { - return position_; -} - -- (NSString *)description { - return [NSString stringWithFormat: @"%f %@", position_, item_]; -} -@end - -@implementation GTMCalculatedRange -- (id)init { - self = [super init]; - if (self != nil) { - storage_ = [[NSMutableArray arrayWithCapacity:0] retain]; - } - return self; -} -- (void)dealloc { - [storage_ release]; - [super dealloc]; -} - -- (void)insertStop:(id)item atPosition:(CGFloat)position { - NSUInteger positionIndex = 0; - GTMCalculatedRangeStopPrivate *theStop; - GTM_FOREACH_OBJECT(theStop, storage_) { - if ([theStop position] < position) { - positionIndex += 1; - } - else if (FPEqual([theStop position], position)) { - // remove and stop the enum since we just modified the object - [storage_ removeObjectAtIndex:positionIndex]; - break; - } - } - [storage_ insertObject:[GTMCalculatedRangeStopPrivate stopWithObject:item position:position] - atIndex:positionIndex]; -} - -- (BOOL)removeStopAtPosition:(CGFloat)position { - NSUInteger positionIndex = 0; - BOOL foundStop = NO; - GTMCalculatedRangeStopPrivate *theStop; - GTM_FOREACH_OBJECT(theStop, storage_) { - if (FPEqual([theStop position], position)) { - break; - } else { - positionIndex += 1; - } - } - if (nil != theStop) { - [self removeStopAtIndex:positionIndex]; - foundStop = YES; - } - return foundStop; -} - -- (void)removeStopAtIndex:(NSUInteger)positionIndex { - [storage_ removeObjectAtIndex:positionIndex]; -} - -- (NSUInteger)stopCount { - return [storage_ count]; -} - -- (id)stopAtIndex:(NSUInteger)positionIndex position:(CGFloat*)outPosition { - GTMCalculatedRangeStopPrivate *theStop = [storage_ objectAtIndex:positionIndex]; - if (nil != outPosition) { - *outPosition = [theStop position]; - } - return [theStop item]; -} - -- (id)valueAtPosition:(CGFloat)position { - id theValue = nil; - GTMCalculatedRangeStopPrivate *theStop; - GTM_FOREACH_OBJECT(theStop, storage_) { - if (FPEqual([theStop position], position)) { - theValue = [theStop item]; - break; - } - } - return theValue; -} - -- (NSString *)description { - return [storage_ description]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRangeTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRangeTest.m deleted file mode 100644 index 1790072a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMCalculatedRangeTest.m +++ /dev/null @@ -1,101 +0,0 @@ -// -// GTMCalculatedRangeTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMCalculatedRange.h" -#import "GTMSenTestCase.h" - -@interface GTMCalculatedRangeTest : GTMTestCase { - GTMCalculatedRange *range_; -} -@end - -@implementation GTMCalculatedRangeTest -NSString *kStrings[] = { @"Fee", @"Fi", @"Fo", @"Fum" }; -const NSUInteger kStringCount = sizeof(kStrings) / sizeof(NSString*); -const CGFloat kOddPosition = 0.14159265f; -const CGFloat kExistingPosition = 0.5f; -const NSUInteger kExisitingIndex = 2; - -- (void)setUp { - range_ = [[GTMCalculatedRange alloc] init]; - for(NSUInteger i = kStringCount; i > 0; --i) { - [range_ insertStop:kStrings[kStringCount - i] atPosition: 1.0f / i]; - } -} - -- (void)tearDown { - [range_ release]; -} - -- (void)testInsertStop { - // new position - NSString *theString = @"I smell the blood of an Englishman!"; - [range_ insertStop:theString atPosition:kOddPosition]; - STAssertEquals([range_ stopCount], kStringCount + 1, @"Stop count was bad"); - NSString *getString = [range_ valueAtPosition:kOddPosition]; - STAssertNotNil(getString, @"String was bad"); - STAssertEquals(theString, getString, @"Stops weren't equal"); - // existing position - NSString *theStringTake2 = @"I smell the blood of an Englishman! Take 2"; - [range_ insertStop:theStringTake2 atPosition:kOddPosition]; - STAssertEquals([range_ stopCount], kStringCount + 1, @"Stop count was bad"); - getString = [range_ valueAtPosition:kOddPosition]; - STAssertNotNil(getString, @"String was bad"); - STAssertEquals(theStringTake2, getString, @"Stops weren't equal"); - STAssertNotEquals(theString, getString, @"Should be the new value"); - STAssertNotEqualObjects(theString, getString, @"Should be the new value"); -} - -- (void)testRemoveStopAtPosition { - STAssertFalse([range_ removeStopAtPosition: kOddPosition], @"Was able to remove non-existant stop"); - STAssertTrue([range_ removeStopAtPosition: kExistingPosition], @"Was unable to remove good stop"); - STAssertEquals([range_ stopCount], kStringCount - 1, @"Removing stop should adjust stop count"); -} - -- (void)testRemoveStopAtIndex { - STAssertThrows([range_ removeStopAtIndex: kStringCount], @"Was able to remove non-existant stop"); - STAssertNoThrow([range_ removeStopAtIndex: kStringCount - 1], @"Was unable to remove good stop"); - STAssertEquals([range_ stopCount], kStringCount - 1, @"Removing stop should adjust stop count"); -} - -- (void)testStopCount { - STAssertEquals([range_ stopCount], kStringCount, @"Bad stop count"); -} - -- (void)testValueAtPosition { - STAssertEqualObjects([range_ valueAtPosition: kExistingPosition], kStrings[kExisitingIndex], nil); - STAssertNotEqualObjects([range_ valueAtPosition: kExistingPosition], kStrings[kStringCount - 1], nil); - STAssertNil([range_ valueAtPosition: kOddPosition], nil); -} - -- (void)testStopAtIndex { - CGFloat thePosition; - - STAssertEqualObjects([range_ stopAtIndex:kStringCount - 1 position:nil], kStrings[kStringCount - 1], nil); - STAssertEqualObjects([range_ stopAtIndex:kExisitingIndex position:&thePosition], kStrings[kExisitingIndex], nil); - STAssertEquals(thePosition, kExistingPosition, nil); - STAssertNotEqualObjects([range_ stopAtIndex:kStringCount - 1 position:nil], kStrings[2], nil); - STAssertThrows([range_ stopAtIndex:kStringCount position:nil], nil); -} - -- (void)testDescription { - // we expect a description of atleast a few chars - STAssertGreaterThan([[range_ description] length], (NSUInteger)10, nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.h deleted file mode 100644 index ce30db99..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// GTMExceptionalInlines.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// This file exists because when you have full warnings on you can run into -// troubles with functions that Apple has inlined that have structures or -// local variables defined in them. -// You only see this warning if you have -Wuninitialized turned on, -// and you will only see them in release mode. -Wno-unitialized turns them -// off, but you also lose all the good warnings that come with -Wuninitialized. -// If you have the inline versions of any of the functions below in a -// @syncronized, or @try block, you will get -// warning: variable 'r' might be clobbered by 'longjmp' or 'vfork' -// By moving this local vars "out of line" you fix the problem. -// These functions do nothing more than act as "out of line" calls to the -// functions they are masking to avoid the warning. -// If you run into others, feel free to add them. - -// Please only use these to avoid the warning above. Use the Apple defined -// functions where possible. - -FOUNDATION_EXPORT NSRange GTMNSMakeRange(NSUInteger loc, NSUInteger len); -FOUNDATION_EXPORT CFRange GTMCFRangeMake(NSUInteger loc, NSUInteger len); - -FOUNDATION_EXPORT CGPoint GTMCGPointMake(CGFloat x, CGFloat y); -FOUNDATION_EXPORT CGSize GTMCGSizeMake(CGFloat width, CGFloat height); -FOUNDATION_EXPORT CGRect GTMCGRectMake(CGFloat x, CGFloat y, - CGFloat width, CGFloat height); - -#if !GTM_IPHONE_SDK -// iPhone does not have NSTypes defined, only CGTypes. So no NSRect, NSPoint etc. -FOUNDATION_EXPORT NSPoint GTMNSMakePoint(CGFloat x, CGFloat y); -FOUNDATION_EXPORT NSSize GTMNSMakeSize(CGFloat w, CGFloat h); -FOUNDATION_EXPORT NSRect GTMNSMakeRect(CGFloat x, CGFloat y, - CGFloat w, CGFloat h); -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.m deleted file mode 100644 index d803ea9d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// GTMExceptionalInlines.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMExceptionalInlines.h" - -NSRange GTMNSMakeRange(NSUInteger loc, NSUInteger len) { - return NSMakeRange(loc, len); -} - -CFRange GTMCFRangeMake(NSUInteger loc, NSUInteger len) { - return CFRangeMake(loc, len); -} - -CGPoint GTMCGPointMake(CGFloat x, CGFloat y) { - return CGPointMake(x, y); -} - -CGSize GTMCGSizeMake(CGFloat width, CGFloat height) { - return CGSizeMake(width, height); -} - -CGRect GTMCGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) { - return CGRectMake(x, y, width, height); -} - -#if !GTM_IPHONE_SDK -// iPhone does not have NSTypes defined, only CGTypes. So no NSRect, NSPoint etc. - -NSPoint GTMNSMakePoint(CGFloat x, CGFloat y) { - return NSMakePoint(x, y); -} - -NSSize GTMNSMakeSize(CGFloat w, CGFloat h) { - return NSMakeSize(w, h); -} - -NSRect GTMNSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h) { - return NSMakeRect(x, y, w, h); -} - -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlinesTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlinesTest.m deleted file mode 100644 index 61422362..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlinesTest.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// GTMExceptionalInlinesTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMExceptionalInlines.h" - -@interface GTMExceptionalInlinesTest : GTMTestCase -@end - -@implementation GTMExceptionalInlinesTest -- (void)testExceptionalInlines { - // Numbers chosen basically at random. - NSUInteger loc = 5; - NSUInteger len = 10; - CGFloat x = 22.5; - CGFloat y = 40.2; - CGFloat h = 21.6; - CGFloat w = 54.2; - - NSRange range1 = GTMNSMakeRange(loc, len); - NSRange range2 = NSMakeRange(loc, len); - STAssertTrue(NSEqualRanges(range1, range2), nil); - - CFRange cfrange1 = GTMCFRangeMake(loc, len); - CFRange cfrange2 = CFRangeMake(loc, len); - STAssertEquals(cfrange1.length, cfrange2.length, nil); - STAssertEquals(cfrange1.location, cfrange2.location, nil); - - - CGPoint cgpoint1 = GTMCGPointMake(x, y); - CGPoint cgpoint2 = CGPointMake(x, y); - STAssertTrue(CGPointEqualToPoint(cgpoint1, cgpoint2), nil); - - CGSize cgsize1 = GTMCGSizeMake(x, y); - CGSize cgsize2 = CGSizeMake(x, y); - STAssertTrue(CGSizeEqualToSize(cgsize1, cgsize2), nil); - - CGRect cgrect1 = GTMCGRectMake(x, y, w, h); - CGRect cgrect2 = CGRectMake(x, y, w, h); - STAssertTrue(CGRectEqualToRect(cgrect1, cgrect2), nil); - -#if !GTM_IPHONE_SDK - NSPoint point1 = GTMNSMakePoint(x, y); - NSPoint point2 = NSMakePoint(x, y); - STAssertTrue(NSEqualPoints(point1, point2), nil); - - NSSize size1 = GTMNSMakeSize(w, h); - NSSize size2 = NSMakeSize(w, h); - STAssertTrue(NSEqualSizes(size1, size2), nil); - - NSRect rect1 = GTMNSMakeRect(x, y, w, h); - NSRect rect2 = NSMakeRect(x, y, w, h); - STAssertTrue(NSEqualRects(rect1, rect2), nil); -#endif -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.h deleted file mode 100644 index a81d433e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// GTMFileSystemKQueue.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import // for kqueue() and kevent and the NOTE_* constants - -// Event constants -enum { - kGTMFileSystemKQueueDeleteEvent = NOTE_DELETE, - kGTMFileSystemKQueueWriteEvent = NOTE_WRITE, - kGTMFileSystemKQueueExtendEvent = NOTE_EXTEND, - kGTMFileSystemKQueueAttributeChangeEvent = NOTE_ATTRIB, - kGTMFileSystemKQueueLinkChangeEvent = NOTE_LINK, - kGTMFileSystemKQueueRenameEvent = NOTE_RENAME, - kGTMFileSystemKQueueRevokeEvent = NOTE_REVOKE, - kGTMFileSystemKQueueAllEvents = NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | - NOTE_ATTRIB | NOTE_LINK | NOTE_RENAME | - NOTE_REVOKE, -}; -typedef unsigned int GTMFileSystemKQueueEvents; - -// GTMFileSystemKQueue. -// -// This is a very simple, easy-to-use class for registering handlers that get -// called when a events happen to a given file system path. -// -// The default runloop for the first path kqueued is used for notification -// delivery, so keep that in mind when you're using this class. This class -// explicitly does not handle arbitrary runloops and threading. -// -@interface GTMFileSystemKQueue : NSObject { - @private - NSString *path_; - int fd_; - GTMFileSystemKQueueEvents events_; - BOOL acrossReplace_; - __weak id target_; - SEL action_; -} - -// |path| is the full path to monitor. |events| is a combination of events -// listed above that you want notification of. |acrossReplace| will cause this -// object to reattach when a the file is deleted & recreated or moved out of the -// way and a new one put in place. |selector| should be of the signature: -// - (void)fileSystemKQueue:(GTMFileSystemKQueue *)fskq -// events:(GTMFileSystemKQueueEvents)events; -// where the events can be one or more of the events listed above ORed together. -// -// NOTE: |acrossReplace| is not fool proof. If the file is renamed/deleted, -// then the object will make one attempt at the time it gets the rename/delete -// to reopen the file. If the new file has not been created, no more action is -// taken. To handle the file coming into existance later, you need to monitor -// the directory in some other way. -- (id)initWithPath:(NSString *)path - forEvents:(GTMFileSystemKQueueEvents)events - acrossReplace:(BOOL)acrossReplace - target:(id)target - action:(SEL)action; - -- (NSString *)path; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.m deleted file mode 100644 index ad516f70..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.m +++ /dev/null @@ -1,259 +0,0 @@ -// -// GTMFileSystemKQueue.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMFileSystemKQueue.h" -#import -#import "GTMDefines.h" -#import "GTMDebugSelectorValidation.h" - - -// File descriptor for the kqueue that will hold all of our file system events. -static int gFileSystemKQueueFileDescriptor = 0; - -// A wrapper around the kqueue file descriptor so we can put it into a -// runloop. -static CFSocketRef gRunLoopSocket = NULL; - - -@interface GTMFileSystemKQueue (PrivateMethods) -- (void)notify:(GTMFileSystemKQueueEvents)eventFFlags; -- (void)addFileDescriptorMonitor:(int)fd; -- (int)registerWithKQueue; -- (void)unregisterWithKQueue; -@end - - -@implementation GTMFileSystemKQueue - --(id)init { - // Folks shouldn't call init directly, so they get what they deserve. - _GTMDevLog(@"Don't call init, use " - @"initWithPath:forEvents:acrossReplace:target:action:"); - return [self initWithPath:nil forEvents:0 acrossReplace:NO - target:nil action:nil]; -} - - -- (id)initWithPath:(NSString *)path - forEvents:(GTMFileSystemKQueueEvents)events - acrossReplace:(BOOL)acrossReplace - target:(id)target - action:(SEL)action { - - if ((self = [super init])) { - - fd_ = -1; - path_ = [path copy]; - events_ = events; - acrossReplace_ = acrossReplace; - - target_ = target; // Don't retain since target will most likely retain us. - action_ = action; - if ([path_ length] == 0 || !events_ || !target_ || !action_) { - [self release]; - return nil; - } - - // Make sure it imples what we expect - GTMAssertSelectorNilOrImplementedWithArguments(target_, - action_, - @encode(GTMFileSystemKQueue*), - @encode(GTMFileSystemKQueueEvents), - NULL); - - fd_ = [self registerWithKQueue]; - if (fd_ < 0) { - [self release]; - return nil; - } - } - return self; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - [self unregisterWithKQueue]; - - [super finalize]; -} -#endif - -- (void)dealloc { - [self unregisterWithKQueue]; - [path_ release]; - - [super dealloc]; -} - -- (NSString *)path { - return path_; -} - -// Cribbed from Advanced Mac OS X Programming. -static void SocketCallBack(CFSocketRef socketref, CFSocketCallBackType type, - CFDataRef address, const void *data, void *info) { - // We're using CFRunLoop calls here. Even when used on the main thread, they - // don't trigger the draining of the main application's autorelease pool that - // NSRunLoop provides. If we're used in a UI-less app, this means that - // autoreleased objects would never go away, so we provide our own pool here. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - struct kevent event; - - if (kevent(gFileSystemKQueueFileDescriptor, NULL, 0, &event, 1, NULL) == -1) { - _GTMDevLog(@"could not pick up kqueue event. Errno %d", errno); // COV_NF_LINE - } else { - GTMFileSystemKQueue *fskq = (GTMFileSystemKQueue *)event.udata; - [fskq notify:event.fflags]; - } - - [pool drain]; -} - -// Cribbed from Advanced Mac OS X Programming -- (void)addFileDescriptorMonitor:(int)fd { - _GTMDevAssert(gRunLoopSocket == NULL, @"socket should be NULL at this point"); - - CFSocketContext context = { 0, NULL, NULL, NULL, NULL }; - gRunLoopSocket = CFSocketCreateWithNative(kCFAllocatorDefault, - fd, - kCFSocketReadCallBack, - SocketCallBack, - &context); - if (gRunLoopSocket == NULL) { - _GTMDevLog(@"could not CFSocketCreateWithNative"); // COV_NF_LINE - goto bailout; // COV_NF_LINE - } - - CFRunLoopSourceRef rls; - rls = CFSocketCreateRunLoopSource(NULL, gRunLoopSocket, 0); - if (rls == NULL) { - _GTMDevLog(@"could not create a run loop source"); // COV_NF_LINE - goto bailout; // COV_NF_LINE - } - - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, - kCFRunLoopDefaultMode); - CFRelease(rls); - - bailout: - return; - -} - -// Returns the FD we got in registering -- (int)registerWithKQueue { - - // Make sure we have our kqueue. - if (gFileSystemKQueueFileDescriptor == 0) { - gFileSystemKQueueFileDescriptor = kqueue(); - - if (gFileSystemKQueueFileDescriptor == -1) { - // COV_NF_START - _GTMDevLog(@"could not make filesystem kqueue. Errno %d", errno); - return -1; - // COV_NF_END - } - - // Add the kqueue file descriptor to the runloop. - [self addFileDescriptorMonitor:gFileSystemKQueueFileDescriptor]; - } - - int newFD = open([path_ fileSystemRepresentation], O_EVTONLY, 0); - if (newFD >= 0) { - - // Add a new event for the file. - struct kevent filter; - EV_SET(&filter, newFD, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, - events_, 0, self); - - const struct timespec noWait = { 0, 0 }; - if (kevent(gFileSystemKQueueFileDescriptor, &filter, 1, NULL, 0, &noWait) == -1) { - // COV_NF_START - _GTMDevLog(@"could not add event for path %@. Errno %d", path_, errno); - close(newFD); - newFD = -1; - // COV_NF_END - } - } - - return newFD; -} - -- (void)unregisterWithKQueue { - // Short-circuit cases where we didn't actually register a kqueue event. - if (fd_ < 0) return; - - struct kevent filter; - EV_SET(&filter, fd_, EVFILT_VNODE, EV_DELETE, 0, 0, self); - - const struct timespec noWait = { 0, 0 }; - if (kevent(gFileSystemKQueueFileDescriptor, &filter, 1, NULL, 0, &noWait) != 0) { - _GTMDevLog(@"could not remove event for path %@. Errno %d", path_, errno); // COV_NF_LINE - } - - // Now close the file down - close(fd_); - fd_ = -1; -} - - -- (void)notify:(GTMFileSystemKQueueEvents)eventFFlags { - - // Some notifications get a little bit of overhead first - - if (eventFFlags & NOTE_REVOKE) { - // COV_NF_START - no good way to do this in a unittest - // Assume revoke means unmount and give up - [self unregisterWithKQueue]; - // COV_NF_END - } - - if (eventFFlags & NOTE_DELETE) { - [self unregisterWithKQueue]; - if (acrossReplace_) { - fd_ = [self registerWithKQueue]; - } - } - - if (eventFFlags & NOTE_RENAME) { - // If we're doing it across replace, we move to the new fd for the new file - // that might have come onto the path. if we aren't doing accross replace, - // nothing to do, just stay on the file. - if (acrossReplace_) { - int newFD = [self registerWithKQueue]; - if (newFD >= 0) { - [self unregisterWithKQueue]; - fd_ = newFD; - } - } - } - - // Now, fire the selector - NSMethodSignature *methodSig = [target_ methodSignatureForSelector:action_]; - _GTMDevAssert(methodSig != nil, @"failed to get the signature?"); - NSInvocation *invocation - = [NSInvocation invocationWithMethodSignature:methodSig]; - [invocation setTarget:target_]; - [invocation setSelector:action_]; - [invocation setArgument:self atIndex:2]; - [invocation setArgument:&eventFFlags atIndex:3]; - [invocation invoke]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueueTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueueTest.m deleted file mode 100644 index c2ded100..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFileSystemKQueueTest.m +++ /dev/null @@ -1,394 +0,0 @@ -// -// GTMFileSystemKQueueTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMFileSystemKQueue.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMFileSystemKQueueTest : GTMTestCase { - @private - NSString *testPath_; - NSString *testPath2_; -} -@end - - -// Helper class to serve as callback target of the kqueue test -@interface GTMFSKQTestHelper : NSObject { - @private - int writes_, renames_, deletes_; -} -@end - -@implementation GTMFSKQTestHelper - -- (void)callbackForQueue:(GTMFileSystemKQueue *)queue - events:(GTMFileSystemKQueueEvents)event { - if (event & kGTMFileSystemKQueueWriteEvent) { - ++writes_; - } - if (event & kGTMFileSystemKQueueDeleteEvent) { - ++deletes_; - } - if (event & kGTMFileSystemKQueueRenameEvent) { - ++renames_; - } -} -- (int)totals { - return writes_ + renames_ + deletes_; -} -- (int)writes { - return writes_; -} -- (int)renames { - return renames_; -} -- (int)deletes { - return deletes_; -} -@end - - -@implementation GTMFileSystemKQueueTest - -- (void)setUp { - NSString *temp = NSTemporaryDirectory(); - testPath_ - = [[temp stringByAppendingPathComponent: - @"GTMFileSystemKQueueTest.testfile"] retain]; - testPath2_ = [[testPath_ stringByAppendingPathExtension:@"2"] retain]; - - // make sure the files aren't in the way of the test - NSFileManager *fm = [NSFileManager defaultManager]; - [fm removeFileAtPath:testPath_ handler:nil]; - [fm removeFileAtPath:testPath2_ handler:nil]; -} - -- (void)tearDown { - // make sure we clean up the files from a failed test - NSFileManager *fm = [NSFileManager defaultManager]; - [fm removeFileAtPath:testPath_ handler:nil]; - [fm removeFileAtPath:testPath2_ handler:nil]; - - [testPath_ release]; - testPath_ = nil; - [testPath2_ release]; - testPath2_ = nil; -} - -- (void)testInit { - GTMFileSystemKQueue *testKQ; - GTMFSKQTestHelper *helper = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper, nil); - - // init should fail - [GTMUnitTestDevLog expectString:@"Don't call init, use " - @"initWithPath:forEvents:acrossReplace:target:action:"]; - testKQ = [[[GTMFileSystemKQueue alloc] init] autorelease]; - STAssertNil(testKQ, nil); - - // no path - testKQ - = [[[GTMFileSystemKQueue alloc] initWithPath:nil - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)] autorelease]; - STAssertNil(testKQ, nil); - - // not events - testKQ - = [[[GTMFileSystemKQueue alloc] initWithPath:@"/var/log/system.log" - forEvents:0 - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)] autorelease]; - STAssertNil(testKQ, nil); - - // no target - testKQ - = [[[GTMFileSystemKQueue alloc] initWithPath:@"/var/log/system.log" - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:nil - action:@selector(callbackForQueue:events:)] autorelease]; - STAssertNil(testKQ, nil); - - // no handler - testKQ - = [[[GTMFileSystemKQueue alloc] initWithPath:@"/var/log/system.log" - forEvents:0 - acrossReplace:YES - target:helper - action:nil] autorelease]; - STAssertNil(testKQ, nil); - - - // path that doesn't exist - testKQ - = [[[GTMFileSystemKQueue alloc] initWithPath:@"/path/that/does/not/exist" - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)] autorelease]; - STAssertNil(testKQ, nil); -} - -- (void)spinForEvents:(GTMFSKQTestHelper *)helper { - // Spin the runloop for a second so that the helper callbacks fire - unsigned int attempts = 0; - int initialTotals = [helper totals]; - while (([helper totals] == initialTotals) && (attempts < 10)) { // Try for up to 2s - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.2]]; - attempts++; - } -} - -- (void)testWriteAndDelete { - - NSFileManager *fm = [NSFileManager defaultManager]; - GTMFSKQTestHelper *helper = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper, nil); - - STAssertTrue([fm createFileAtPath:testPath_ contents:nil attributes:nil], nil); - NSFileHandle *testFH = [NSFileHandle fileHandleForWritingAtPath:testPath_]; - STAssertNotNil(testFH, nil); - - // Start monitoring the file - GTMFileSystemKQueue *testKQ - = [[GTMFileSystemKQueue alloc] initWithPath:testPath_ - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)]; - STAssertNotNil(testKQ, nil); - STAssertEqualObjects([testKQ path], testPath_, nil); - - // Write to the file - [testFH writeData:[@"doh!" dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 1, nil); - - // Close and delete - [testFH closeFile]; - STAssertTrue([fm removeFileAtPath:testPath_ handler:nil], nil); - - [self spinForEvents:helper]; - STAssertEquals([helper totals], 2, nil); - - // Clean up the kqueue - [testKQ release]; - testKQ = nil; - - STAssertEquals([helper writes], 1, nil); - STAssertEquals([helper deletes], 1, nil); - STAssertEquals([helper renames], 0, nil); -} - -- (void)testWriteAndDeleteAndWrite { - - // One will pass YES to |acrossReplace|, the other will pass NO. - - NSFileManager *fm = [NSFileManager defaultManager]; - GTMFSKQTestHelper *helper = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper, nil); - GTMFSKQTestHelper *helper2 = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper, nil); - - // Create a temp file path - STAssertTrue([fm createFileAtPath:testPath_ contents:nil attributes:nil], nil); - NSFileHandle *testFH = [NSFileHandle fileHandleForWritingAtPath:testPath_]; - STAssertNotNil(testFH, nil); - - // Start monitoring the file - GTMFileSystemKQueue *testKQ - = [[GTMFileSystemKQueue alloc] initWithPath:testPath_ - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)]; - STAssertNotNil(testKQ, nil); - STAssertEqualObjects([testKQ path], testPath_, nil); - GTMFileSystemKQueue *testKQ2 - = [[GTMFileSystemKQueue alloc] initWithPath:testPath_ - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:NO - target:helper2 - action:@selector(callbackForQueue:events:)]; - STAssertNotNil(testKQ2, nil); - STAssertEqualObjects([testKQ2 path], testPath_, nil); - - // Write to the file - [testFH writeData:[@"doh!" dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 1, nil); - STAssertEquals([helper2 totals], 1, nil); - - // Close and delete - [testFH closeFile]; - STAssertTrue([fm removeFileAtPath:testPath_ handler:nil], nil); - - // Recreate - STAssertTrue([fm createFileAtPath:testPath_ contents:nil attributes:nil], nil); - testFH = [NSFileHandle fileHandleForWritingAtPath:testPath_]; - STAssertNotNil(testFH, nil); - [testFH writeData:[@"ha!" dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 2, nil); - STAssertEquals([helper2 totals], 2, nil); - - // Write to it again - [testFH writeData:[@"continued..." dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 3, nil); - STAssertEquals([helper2 totals], 2, nil); - - // Close and delete - [testFH closeFile]; - STAssertTrue([fm removeFileAtPath:testPath_ handler:nil], nil); - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 4, nil); - STAssertEquals([helper2 totals], 2, nil); - - // Clean up the kqueue - [testKQ release]; - testKQ = nil; - [testKQ2 release]; - testKQ2 = nil; - - STAssertEquals([helper writes], 2, nil); - STAssertEquals([helper deletes], 2, nil); - STAssertEquals([helper renames], 0, nil); - STAssertEquals([helper2 writes], 1, nil); - STAssertEquals([helper2 deletes], 1, nil); - STAssertEquals([helper2 renames], 0, nil); -} - -- (void)testWriteAndRenameAndWrite { - - // One will pass YES to |acrossReplace|, the other will pass NO. - - NSFileManager *fm = [NSFileManager defaultManager]; - GTMFSKQTestHelper *helper = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper, nil); - GTMFSKQTestHelper *helper2 = [[[GTMFSKQTestHelper alloc] init] autorelease]; - STAssertNotNil(helper2, nil); - - // Create a temp file path - STAssertTrue([fm createFileAtPath:testPath_ contents:nil attributes:nil], nil); - NSFileHandle *testFH = [NSFileHandle fileHandleForWritingAtPath:testPath_]; - STAssertNotNil(testFH, nil); - - // Start monitoring the file - GTMFileSystemKQueue *testKQ - = [[GTMFileSystemKQueue alloc] initWithPath:testPath_ - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:YES - target:helper - action:@selector(callbackForQueue:events:)]; - STAssertNotNil(testKQ, nil); - STAssertEqualObjects([testKQ path], testPath_, nil); - GTMFileSystemKQueue *testKQ2 - = [[GTMFileSystemKQueue alloc] initWithPath:testPath_ - forEvents:kGTMFileSystemKQueueAllEvents - acrossReplace:NO - target:helper2 - action:@selector(callbackForQueue:events:)]; - STAssertNotNil(testKQ2, nil); - STAssertEqualObjects([testKQ2 path], testPath_, nil); - - // Write to the file - [testFH writeData:[@"doh!" dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 1, nil); - STAssertEquals([helper2 totals], 1, nil); - - // Move it and create the file again - STAssertTrue([fm movePath:testPath_ toPath:testPath2_ handler:nil], nil); - STAssertTrue([fm createFileAtPath:testPath_ contents:nil attributes:nil], nil); - NSFileHandle *testFHPrime - = [NSFileHandle fileHandleForWritingAtPath:testPath_]; - STAssertNotNil(testFHPrime, nil); - [testFHPrime writeData:[@"eh?" dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 2, nil); - STAssertEquals([helper2 totals], 2, nil); - - // Write to the new file - [testFHPrime writeData:[@"continue..." dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 3, nil); - STAssertEquals([helper2 totals], 2, nil); - - // Write to the old file - [testFH writeData:[@"continue old..." dataUsingEncoding:NSUnicodeStringEncoding]]; - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 3, nil); - STAssertEquals([helper2 totals], 3, nil); - - // and now close old - [testFH closeFile]; - STAssertTrue([fm removeFileAtPath:testPath2_ handler:nil], nil); - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 3, nil); - STAssertEquals([helper2 totals], 4, nil); - - // and now close new - [testFHPrime closeFile]; - STAssertTrue([fm removeFileAtPath:testPath_ handler:nil], nil); - - // Spin the runloop for a second so that the helper callbacks fire - [self spinForEvents:helper]; - STAssertEquals([helper totals], 4, nil); - STAssertEquals([helper2 totals], 4, nil); - - // Clean up the kqueue - [testKQ release]; - testKQ = nil; - [testKQ2 release]; - testKQ2 = nil; - - STAssertEquals([helper writes], 2, nil); - STAssertEquals([helper deletes], 1, nil); - STAssertEquals([helper renames], 1, nil); - STAssertEquals([helper2 writes], 2, nil); - STAssertEquals([helper2 deletes], 1, nil); - STAssertEquals([helper2 renames], 1, nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.h deleted file mode 100644 index 90853b54..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// GTMFourCharCode -// Wrapper for FourCharCodes -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// FourCharCodes are OSTypes, ResTypes etc. This class wraps them if -// you need to store them in dictionaries etc. -@interface GTMFourCharCode : NSObject { - FourCharCode code_; -} - -// returns a string for a FourCharCode -+ (id)stringWithFourCharCode:(FourCharCode)code; - -// String must be 4 chars or less, or you will get nil back. -+ (id)fourCharCodeWithString:(NSString*)string; -+ (id)fourCharCodeWithFourCharCode:(FourCharCode)code; - -// String must be 4 chars or less, or you will get nil back. -- (id)initWithString:(NSString*)string; - -// Designated Initializer -- (id)initWithFourCharCode:(FourCharCode)code; - -// Returns 'APPL' for "APPL" -- (FourCharCode)fourCharCode; - -// For FourCharCode of 'APPL' returns "APPL". For 1 returns "\0\0\0\1" -- (NSString*)stringValue; - -// For FourCharCode of "APPL" returns an NSNumber with 1095782476 (0x4150504C). -// For 1 returns 1. -- (NSNumber*)numberValue; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.m deleted file mode 100644 index f5a08bff..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCode.m +++ /dev/null @@ -1,98 +0,0 @@ -// -// GTMFourCharCode.m -// Wrapper for FourCharCodes -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import "GTMFourCharCode.h" -#import "GTMGarbageCollection.h" -#import - -@implementation GTMFourCharCode - -+ (id)stringWithFourCharCode:(FourCharCode)code { - return GTMCFAutorelease(UTCreateStringForOSType(code)); -} - -+ (id)fourCharCodeWithString:(NSString*)string { - return [[[self alloc] initWithString:string] autorelease]; -} - -+ (id)fourCharCodeWithFourCharCode:(FourCharCode)code { - return [[[self alloc] initWithFourCharCode:code] autorelease]; -} - -- (id)initWithString:(NSString*)string { - NSUInteger length = [string length]; - if (length == 0 || length > 4) { - [self release]; - return nil; - } else { - return [self initWithFourCharCode:UTGetOSTypeFromString((CFStringRef)string)]; - } -} - -- (id)initWithFourCharCode:(FourCharCode)code { - if ((self = [super init])) { - code_ = code; - } - return self; -} - -- (id)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super init])) { - code_ = [aDecoder decodeInt32ForKey:@"FourCharCode"]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeInt32:code_ forKey:@"FourCharCode"]; -} - -- (id)copyWithZone:(NSZone *)zone { - return [[[self class] alloc] initWithFourCharCode:code_]; -} - -- (BOOL)isEqual:(id)object { - return [object isKindOfClass:[self class]] && [object fourCharCode] == code_; -} - -- (NSUInteger)hash { - return (NSUInteger)code_; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ - %@ (0x%X)", - [self class], - [self stringValue], - code_]; -} - -- (FourCharCode)fourCharCode { - return code_; -} - -- (NSString*)stringValue { - return GTMCFAutorelease(UTCreateStringForOSType(code_)); -} - -- (NSNumber*)numberValue { - return [NSNumber numberWithUnsignedInt:code_]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCodeTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCodeTest.m deleted file mode 100644 index f91b8f2b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMFourCharCodeTest.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// GTMFourCharCodeTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMFourCharCode.h" - -@interface GTMFourCharCodeTest : GTMTestCase -@end - -@implementation GTMFourCharCodeTest - -const FourCharCode kGTMHighMacOSRomanCode = 0xA5A8A9AA; // '•®©™' - -- (void)testFourCharCode { - GTMFourCharCode *fcc = [GTMFourCharCode fourCharCodeWithString:@"APPL"]; - STAssertNotNil(fcc, nil); - STAssertEqualObjects([fcc stringValue], @"APPL", nil); - STAssertEqualObjects([fcc numberValue], [NSNumber numberWithUnsignedInt:'APPL'], nil); - STAssertEquals([fcc fourCharCode], (FourCharCode)'APPL', nil); - - STAssertEqualObjects([fcc description], @"GTMFourCharCode - APPL (0x4150504C)", nil); - STAssertEquals([fcc hash], (NSUInteger)'APPL', nil); - - GTMFourCharCode *fcc2 = [GTMFourCharCode fourCharCodeWithFourCharCode:kGTMHighMacOSRomanCode]; - STAssertNotNil(fcc2, nil); - STAssertEqualObjects([fcc2 stringValue], @"•®©™", nil); - STAssertEqualObjects([fcc2 numberValue], [NSNumber numberWithUnsignedInt:kGTMHighMacOSRomanCode], nil); - STAssertEquals([fcc2 fourCharCode], (FourCharCode)kGTMHighMacOSRomanCode, nil); - - STAssertNotEqualObjects(fcc, fcc2, nil); - - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:fcc]; - STAssertNotNil(data, nil); - fcc2 = (GTMFourCharCode*)[NSKeyedUnarchiver unarchiveObjectWithData:data]; - STAssertNotNil(fcc2, nil); - STAssertEqualObjects(fcc, fcc2, nil); - - fcc = [[[GTMFourCharCode alloc] initWithFourCharCode:'\?\?\?\?'] autorelease]; - STAssertNotNil(fcc, nil); - STAssertEqualObjects([fcc stringValue], @"????", nil); - STAssertEqualObjects([fcc numberValue], [NSNumber numberWithUnsignedInt:'\?\?\?\?'], nil); - STAssertEquals([fcc fourCharCode], (FourCharCode)'\?\?\?\?', nil); - - fcc = [[[GTMFourCharCode alloc] initWithString:@"????"] autorelease]; - STAssertNotNil(fcc, nil); - STAssertEqualObjects([fcc stringValue], @"????", nil); - STAssertEqualObjects([fcc numberValue], [NSNumber numberWithUnsignedInt:'\?\?\?\?'], nil); - STAssertEquals([fcc fourCharCode], (FourCharCode)'\?\?\?\?', nil); - - fcc = [GTMFourCharCode fourCharCodeWithFourCharCode:1]; - STAssertNotNil(fcc, nil); - STAssertEqualObjects([fcc stringValue], @"\0\0\0\1", nil); - STAssertEqualObjects([fcc numberValue], [NSNumber numberWithUnsignedInt:1], nil); - STAssertEquals([fcc fourCharCode], (FourCharCode)1, nil); - - - fcc = [GTMFourCharCode fourCharCodeWithString:@"BADDSTRING"]; - STAssertNil(fcc, nil); -} - -- (void)testStringWithCode { - STAssertEqualObjects([GTMFourCharCode stringWithFourCharCode:'APPL'], @"APPL", nil); - STAssertEqualObjects([GTMFourCharCode stringWithFourCharCode:1], @"\0\0\0\1", nil); - STAssertEqualObjects([GTMFourCharCode stringWithFourCharCode:kGTMHighMacOSRomanCode], @"•®©™", nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGarbageCollection.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGarbageCollection.h deleted file mode 100644 index 93d4efab..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGarbageCollection.h +++ /dev/null @@ -1,72 +0,0 @@ -// -// GTMGarbageCollection.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -#import "GTMDefines.h" - -// This allows us to easily move our code from GC to non GC. -// They are no-ops unless we are require Leopard or above. -// See -// http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/index.html -// and -// http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html#//apple_ref/doc/uid/TP40006687-SW1 -// for details. - -#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) && !GTM_IPHONE_SDK -// General use would be to call this through GTMCFAutorelease -// but there may be a reason the you want to make something collectable -// but not autoreleased, especially in pure GC code where you don't -// want to bother with the nop autorelease. Done as a define instead of an -// inline so that tools like Clang's scan-build don't report code as leaking. -#define GTMNSMakeCollectable(cf) ((id)NSMakeCollectable(cf)) - -// GTMNSMakeUncollectable is for global maps, etc. that we don't -// want released ever. You should still retain these in non-gc code. -GTM_INLINE void GTMNSMakeUncollectable(id object) { - [[NSGarbageCollector defaultCollector] disableCollectorForPointer:object]; -} - -// Hopefully no code really needs this, but GTMIsGarbageCollectionEnabled is -// a common way to check at runtime if GC is on. -// There are some places where GC doesn't work w/ things w/in Apple's -// frameworks, so this is here so GTM unittests and detect it, and not run -// individual tests to work around bugs in Apple's frameworks. -GTM_INLINE BOOL GTMIsGarbageCollectionEnabled(void) { - return ([NSGarbageCollector defaultCollector] != nil); -} - -#else - -#define GTMNSMakeCollectable(cf) ((id)(cf)) - -GTM_INLINE void GTMNSMakeUncollectable(id object) { -} - -GTM_INLINE BOOL GTMIsGarbageCollectionEnabled(void) { - return NO; -} - -#endif - -// GTMCFAutorelease makes a CF object collectable in GC mode, or adds it -// to the autorelease pool in non-GC mode. Either way it is taken care -// of. Done as a define instead of an inline so that tools like Clang's -// scan-build don't report code as leaking. -#define GTMCFAutorelease(cf) ([GTMNSMakeCollectable(cf) autorelease]) - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.h deleted file mode 100644 index c3d6b1af..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.h +++ /dev/null @@ -1,452 +0,0 @@ -// -// GTMGeometryUtils.h -// -// Utilities for geometrical utilities such as conversions -// between different types. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -enum { - GTMScaleProportionally = 0, // Fit proportionally - GTMScaleToFit, // Forced fit (distort if necessary) - GTMScaleNone, // Don't scale (clip) - GTMScaleToFillProportionally = 101 // Scale proportionally to fill area -}; -typedef NSUInteger GTMScaling; - -enum { - GTMRectAlignCenter = 0, - GTMRectAlignTop, - GTMRectAlignTopLeft, - GTMRectAlignTopRight, - GTMRectAlignLeft, - GTMRectAlignBottom, - GTMRectAlignBottomLeft, - GTMRectAlignBottomRight, - GTMRectAlignRight -}; -typedef NSUInteger GTMRectAlignment; - -#pragma mark - -#pragma mark CG - Point On Rect -/// Return middle of min X side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of min X side of rect -GTM_INLINE CGPoint GTMCGMidMinX(CGRect rect) { - return CGPointMake(CGRectGetMinX(rect), CGRectGetMidY(rect)); -} - -/// Return middle of max X side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of max X side of rect -GTM_INLINE CGPoint GTMCGMidMaxX(CGRect rect) { - return CGPointMake(CGRectGetMaxX(rect), CGRectGetMidY(rect)); -} - -/// Return middle of max Y side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of max Y side of rect -GTM_INLINE CGPoint GTMCGMidMaxY(CGRect rect) { - return CGPointMake(CGRectGetMidX(rect), CGRectGetMaxY(rect)); -} - -/// Return middle of min Y side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of min Y side of rect -GTM_INLINE CGPoint GTMCGMidMinY(CGRect rect) { - return CGPointMake(CGRectGetMidX(rect), CGRectGetMinY(rect)); -} - -/// Return center of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the center of rect -GTM_INLINE CGPoint GTMCGCenter(CGRect rect) { - return CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); -} - -#pragma mark - -#pragma mark CG - Rect-Size Conversion - -/// Return size of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// size of rectangle -GTM_INLINE CGSize GTMCGRectSize(CGRect rect) { - return CGSizeMake(CGRectGetWidth(rect), CGRectGetHeight(rect)); -} - -/// Return rectangle of size -// -// Args: -// size - size -// -// Returns: -// rectangle of size (origin 0,0) -GTM_INLINE CGRect GTMCGRectOfSize(CGSize size) { - return CGRectMake(0.0f, 0.0f, size.width, size.height); -} - -#pragma mark - -#pragma mark CG - Rect Scaling and Alignment - -/// Scales an CGRect -// -// Args: -// inRect: Rect to scale -// xScale: fraction to scale (1.0 is 100%) -// yScale: fraction to scale (1.0 is 100%) -// -// Returns: -// Converted Rect -GTM_INLINE CGRect GTMCGRectScale(CGRect inRect, CGFloat xScale, CGFloat yScale) { - return CGRectMake(inRect.origin.x, inRect.origin.y, - inRect.size.width * xScale, inRect.size.height * yScale); -} - - -/// Align rectangles -// -// Args: -// alignee - rect to be aligned -// aligner - rect to be aligned from -// alignment - way to align the rectangles -CGRect GTMCGAlignRectangles(CGRect alignee, CGRect aligner, - GTMRectAlignment alignment); -/// Scale rectangle -// -// Args: -// scalee - rect to be scaled -// size - size to scale to -// scaling - way to scale the rectangle -CGRect GTMCGScaleRectangleToSize(CGRect scalee, CGSize size, - GTMScaling scaling); - -#pragma mark - -#pragma mark CG - Miscellaneous - -/// Calculate the distance between two points. -// -// Args: -// pt1 first point -// pt2 second point -// -// Returns: -// Distance -GTM_INLINE CGFloat GTMCGDistanceBetweenPoints(CGPoint pt1, CGPoint pt2) { - CGFloat dX = pt1.x - pt2.x; - CGFloat dY = pt1.y - pt2.y; -#if CGFLOAT_IS_DOUBLE - return sqrt(dX * dX + dY * dY); -#else - return sqrtf(dX * dX + dY * dY); -#endif -} - -#if !GTM_IPHONE_SDK -// iPhone does not have NSTypes defined, only CGTypes. So no NSRect, NSPoint etc. - -#pragma mark - -// All of the conversion routines below are basically copied from the -// NSGeometry header in the 10.5 sdk. - -#pragma mark NS <-> CG Point Conversion - -/// Quickly convert from a CGPoint to a NSPoint. -// -/// CGPoints are relative to 0,0 in lower left; -/// NSPoints are relative to 0,0 in lower left -// -// Args: -// inPoint: CGPoint to convert -// -// Returns: -// Converted NSPoint -GTM_INLINE NSPoint GTMCGPointToNSPoint(CGPoint inPoint) { - _GTMCompileAssert(sizeof(NSPoint) == sizeof(CGPoint), NSPoint_and_CGPoint_must_be_the_same_size); - union convertUnion {NSPoint ns; CGPoint cg;}; - return ((union convertUnion *)&inPoint)->ns; -} - -/// Quickly convert from a NSPoint to a CGPoint. -// -/// CGPoints are relative to 0,0 in lower left; -/// NSPoints are relative to 0,0 in lower left -// -// Args: -// inPoint: NSPoint to convert -// -// Returns: -// Converted CGPoint -GTM_INLINE CGPoint GTMNSPointToCGPoint(NSPoint inPoint) { - _GTMCompileAssert(sizeof(NSPoint) == sizeof(CGPoint), NSPoint_and_CGPoint_must_be_the_same_size); - union convertUnion {NSPoint ns; CGPoint cg;}; - return ((union convertUnion *)&inPoint)->cg; -} - -#pragma mark - -#pragma mark NS <-> CG Rect Conversion - -/// Convert from a CGRect to a NSRect. -// -/// NSRect are relative to 0,0 in lower left; -/// CGRect are relative to 0,0 in lower left -// -// Args: -// inRect: CGRect to convert -// -// Returns: -// Converted NSRect -GTM_INLINE NSRect GTMCGRectToNSRect(CGRect inRect) { - _GTMCompileAssert(sizeof(NSRect) == sizeof(CGRect), NSRect_and_CGRect_must_be_the_same_size); - union convertUnion {NSRect ns; CGRect cg;}; - return ((union convertUnion *)&inRect)->ns; -} - -/// Convert from a NSRect to a CGRect. -// -/// NSRect are relative to 0,0 in lower left; -/// CGRect are relative to 0,0 in lower left -// -// Args: -// inRect: NSRect to convert -// -// Returns: -// Converted CGRect -GTM_INLINE CGRect GTMNSRectToCGRect(NSRect inRect) { - _GTMCompileAssert(sizeof(NSRect) == sizeof(CGRect), NSRect_and_CGRect_must_be_the_same_size); - union convertUnion {NSRect ns; CGRect cg;}; - return ((union convertUnion *)&inRect)->cg; -} - - -#pragma mark - -#pragma mark NS <-> CG Size Conversion - -/// Convert from a CGSize to an NSSize. -// -// Args: -// inSize: CGSize to convert -// -// Returns: -// Converted NSSize -GTM_INLINE NSSize GTMCGSizeToNSSize(CGSize inSize) { - _GTMCompileAssert(sizeof(NSSize) == sizeof(CGSize), NSSize_and_CGSize_must_be_the_same_size); - union convertUnion {NSSize ns; CGSize cg;}; - return ((union convertUnion *)&inSize)->ns; -} - -/// Convert from a NSSize to a CGSize. -// -// Args: -// inSize: NSSize to convert -// -// Returns: -// Converted CGSize -GTM_INLINE CGSize GTMNSSizeToCGSize(NSSize inSize) { - _GTMCompileAssert(sizeof(NSSize) == sizeof(CGSize), NSSize_and_CGSize_must_be_the_same_size); - union convertUnion {NSSize ns; CGSize cg;}; - return ((union convertUnion *)&inSize)->cg; -} - -#pragma mark - -#pragma mark NS - Point On Rect - -/// Return middle of min X side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of min X side of rect -GTM_INLINE NSPoint GTMNSMidMinX(NSRect rect) { - return NSMakePoint(NSMinX(rect), NSMidY(rect)); -} - -/// Return middle of max X side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of max X side of rect -GTM_INLINE NSPoint GTMNSMidMaxX(NSRect rect) { - return NSMakePoint(NSMaxX(rect), NSMidY(rect)); -} - -/// Return middle of max Y side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of max Y side of rect -GTM_INLINE NSPoint GTMNSMidMaxY(NSRect rect) { - return NSMakePoint(NSMidX(rect), NSMaxY(rect)); -} - -/// Return middle of min Y side of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the middle of min Y side of rect -GTM_INLINE NSPoint GTMNSMidMinY(NSRect rect) { - return NSMakePoint(NSMidX(rect), NSMinY(rect)); -} - -/// Return center of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// point located in the center of rect -GTM_INLINE NSPoint GTMNSCenter(NSRect rect) { - return NSMakePoint(NSMidX(rect), NSMidY(rect)); -} - -#pragma mark - -#pragma mark NS - Rect-Size Conversion - -/// Return size of rectangle -// -// Args: -// rect - rectangle -// -// Returns: -// size of rectangle -GTM_INLINE NSSize GTMNSRectSize(NSRect rect) { - return NSMakeSize(NSWidth(rect), NSHeight(rect)); -} - -/// Return rectangle of size -// -// Args: -// size - size -// -// Returns: -// rectangle of size (origin 0,0) -GTM_INLINE NSRect GTMNSRectOfSize(NSSize size) { - return NSMakeRect(0.0f, 0.0f, size.width, size.height); -} - -#pragma mark - -#pragma mark NS - Rect Scaling and Alignment - -/// Scales an NSRect -// -// Args: -// inRect: Rect to scale -// xScale: fraction to scale (1.0 is 100%) -// yScale: fraction to scale (1.0 is 100%) -// -// Returns: -// Converted Rect -GTM_INLINE NSRect GTMNSRectScale(NSRect inRect, CGFloat xScale, CGFloat yScale) { - return NSMakeRect(inRect.origin.x, inRect.origin.y, - inRect.size.width * xScale, inRect.size.height * yScale); -} - -/// Align rectangles -// -// Args: -// alignee - rect to be aligned -// aligner - rect to be aligned from -GTM_INLINE NSRect GTMNSAlignRectangles(NSRect alignee, NSRect aligner, - GTMRectAlignment alignment) { - return GTMCGRectToNSRect(GTMCGAlignRectangles(GTMNSRectToCGRect(alignee), - GTMNSRectToCGRect(aligner), - alignment)); -} - -/// Align a rectangle to another -// -// Args: -// scalee - rect to be scaled -// scaler - rect to scale to -// scaling - way to scale the rectangle -// alignment - way to align the scaled rectangle -GTM_INLINE NSRect GTMNSScaleRectToRect(NSRect scalee, - NSRect scaler, - GTMScaling scaling, - GTMRectAlignment alignment) { - - return GTMCGRectToNSRect( - GTMCGAlignRectangles( - GTMCGScaleRectangleToSize(GTMNSRectToCGRect(scalee), - GTMNSSizeToCGSize(scaler.size), - scaling), - GTMNSRectToCGRect(scaler), - alignment)); -} - -/// Scale rectangle -// -// Args: -// scalee - rect to be scaled -// size - size to scale to -// scaling - way to scale the rectangle -GTM_INLINE NSRect GTMNSScaleRectangleToSize(NSRect scalee, NSSize size, - GTMScaling scaling) { - return GTMCGRectToNSRect(GTMCGScaleRectangleToSize(GTMNSRectToCGRect(scalee), - GTMNSSizeToCGSize(size), - scaling)); -} - -#pragma mark - -#pragma mark NS - Miscellaneous - -/// Calculate the distance between two points. -// -// Args: -// pt1 first point -// pt2 second point -// -// Returns: -// Distance -GTM_INLINE CGFloat GTMNSDistanceBetweenPoints(NSPoint pt1, NSPoint pt2) { - return GTMCGDistanceBetweenPoints(GTMNSPointToCGPoint(pt1), - GTMNSPointToCGPoint(pt2)); -} - -#endif // !GTM_IPHONE_SDK diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.m deleted file mode 100644 index 07de80c3..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtils.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// GTMGeometryUtils.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMGeometryUtils.h" - -/// Align rectangles -// -// Args: -// alignee - rect to be aligned -// aligner - rect to be aligned to -// alignment - alignment to be applied to alignee based on aligner - -CGRect GTMCGAlignRectangles(CGRect alignee, CGRect aligner, GTMRectAlignment alignment) { - switch (alignment) { - case GTMRectAlignTop: - alignee.origin.x = aligner.origin.x + (CGRectGetWidth(aligner) * .5f - CGRectGetWidth(alignee) * .5f); - alignee.origin.y = aligner.origin.y + CGRectGetHeight(aligner) - CGRectGetHeight(alignee); - break; - - case GTMRectAlignTopLeft: - alignee.origin.x = aligner.origin.x; - alignee.origin.y = aligner.origin.y + CGRectGetHeight(aligner) - CGRectGetHeight(alignee); - break; - - case GTMRectAlignTopRight: - alignee.origin.x = aligner.origin.x + CGRectGetWidth(aligner) - CGRectGetWidth(alignee); - alignee.origin.y = aligner.origin.y + CGRectGetHeight(aligner) - CGRectGetHeight(alignee); - break; - - case GTMRectAlignLeft: - alignee.origin.x = aligner.origin.x; - alignee.origin.y = aligner.origin.y + (CGRectGetHeight(aligner) * .5f - CGRectGetHeight(alignee) * .5f); - break; - - case GTMRectAlignBottomLeft: - alignee.origin.x = aligner.origin.x; - alignee.origin.y = aligner.origin.y; - break; - - case GTMRectAlignBottom: - alignee.origin.x = aligner.origin.x + (CGRectGetWidth(aligner) * .5f - CGRectGetWidth(alignee) * .5f); - alignee.origin.y = aligner.origin.y; - break; - - case GTMRectAlignBottomRight: - alignee.origin.x = aligner.origin.x + CGRectGetWidth(aligner) - CGRectGetWidth(alignee); - alignee.origin.y = aligner.origin.y; - break; - - case GTMRectAlignRight: - alignee.origin.x = aligner.origin.x + CGRectGetWidth(aligner) - CGRectGetWidth(alignee); - alignee.origin.y = aligner.origin.y + (CGRectGetHeight(aligner) * .5f - CGRectGetHeight(alignee) * .5f); - break; - - default: - case GTMRectAlignCenter: - alignee.origin.x = aligner.origin.x + (CGRectGetWidth(aligner) * .5f - CGRectGetWidth(alignee) * .5f); - alignee.origin.y = aligner.origin.y + (CGRectGetHeight(aligner) * .5f - CGRectGetHeight(alignee) * .5f); - break; - } - return alignee; -} - -CGRect GTMCGScaleRectangleToSize(CGRect scalee, CGSize size, GTMScaling scaling) { - switch (scaling) { - - case GTMScaleToFillProportionally: - case GTMScaleProportionally: { - CGFloat height = CGRectGetHeight(scalee); - CGFloat width = CGRectGetWidth(scalee); - if (isnormal(height) && isnormal(width) && - (height > size.height || width > size.width)) { - CGFloat horiz = size.width / width; - CGFloat vert = size.height / height; - BOOL expand = (scaling == GTMScaleToFillProportionally); - // We use the smaller scale unless expand is true. In that case, larger. - CGFloat newScale = ((horiz < vert) ^ expand) ? horiz : vert; - scalee = GTMCGRectScale(scalee, newScale, newScale); - } - break; - } - - case GTMScaleToFit: - scalee.size = size; - break; - - case GTMScaleNone: - default: - // Do nothing - break; - } - return scalee; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtilsTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtilsTest.m deleted file mode 100644 index 38b86fbd..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMGeometryUtilsTest.m +++ /dev/null @@ -1,331 +0,0 @@ -// -// GTMGeometryUtilsTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMGeometryUtils.h" - -@interface GTMGeometryUtilsTest : GTMTestCase -@end - -@implementation GTMGeometryUtilsTest - -#if !GTM_IPHONE_SDK -- (void)testGTMCGPointToNSPoint { - CGPoint cgPoint = CGPointMake(15.1,6.2); - NSPoint nsPoint = GTMCGPointToNSPoint(cgPoint); - STAssertTrue(CGPointEqualToPoint(*(CGPoint*)&nsPoint, cgPoint), nil); -} - -- (void)testGTMNSPointToCGPoint { - NSPoint nsPoint = NSMakePoint(10.2,1.5); - CGPoint cgPoint = GTMNSPointToCGPoint(nsPoint); - STAssertTrue(CGPointEqualToPoint(cgPoint, *(CGPoint*)&nsPoint), nil); -} - -- (void)testGTMCGRectToNSRect { - CGRect cgRect = CGRectMake(1.5,2.4,10.6,11.7); - NSRect nsRect = GTMCGRectToNSRect(cgRect); - STAssertTrue(CGRectEqualToRect(cgRect, *(CGRect*)&nsRect), nil); -} - -- (void)testGTMNSRectToCGRect { - NSRect nsRect = NSMakeRect(4.6,3.2,22.1,45.0); - CGRect cgRect = GTMNSRectToCGRect(nsRect); - STAssertTrue(CGRectEqualToRect(cgRect, *(CGRect*)&nsRect), nil); -} - -- (void)testGTMCGSizeToNSSize { - CGSize cgSize = {5,6}; - NSSize nsSize = GTMCGSizeToNSSize(cgSize); - STAssertTrue(CGSizeEqualToSize(cgSize, *(CGSize*)&nsSize), nil); -} - -- (void)testGTMNSSizeToCGSize { - NSSize nsSize = {22,15}; - CGSize cgSize = GTMNSSizeToCGSize(nsSize); - STAssertTrue(CGSizeEqualToSize(cgSize, *(CGSize*)&nsSize), nil); -} - -- (void)testGTMNSPointsOnRect { - NSRect rect = NSMakeRect(0, 0, 2, 2); - - NSPoint point = GTMNSMidMinX(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)0.0, (CGFloat)0.01, nil); - - point = GTMNSMidMaxX(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)2.0, (CGFloat)0.01, nil); - - point = GTMNSMidMaxY(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)2.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); - - point = GTMNSMidMinY(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)0.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); - - point = GTMNSCenter(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); -} - -- (void)testGTMNSRectSize { - NSSize nsSize = GTMNSRectSize(NSMakeRect(1, 1, 10, 5)); - STAssertEqualsWithAccuracy(nsSize.width, (CGFloat)10.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(nsSize.height, (CGFloat)5.0, (CGFloat)0.01, nil); -} - -- (void)testGTMNSRectOfSize { - NSRect outRect = GTMNSRectOfSize(NSMakeSize(10, 5)); - NSRect expectedRect = NSMakeRect(0, 0, 10, 5); - STAssertEquals(outRect, expectedRect, nil); -} - -- (void)testGTMNSAlignRectangles { - typedef struct { - NSPoint expectedOrigin; - GTMRectAlignment alignment; - } TestData; - - TestData data[] = { - { {1,2}, GTMRectAlignTop }, - { {0,2}, GTMRectAlignTopLeft }, - { {2,2}, GTMRectAlignTopRight }, - { {0,1}, GTMRectAlignLeft }, - { {1,0}, GTMRectAlignBottom }, - { {0,0}, GTMRectAlignBottomLeft }, - { {2,0}, GTMRectAlignBottomRight }, - { {2,1}, GTMRectAlignRight }, - { {1,1}, GTMRectAlignCenter }, - }; - - NSRect rect1 = NSMakeRect(0, 0, 4, 4); - NSRect rect2 = NSMakeRect(0, 0, 2, 2); - - NSRect expectedRect; - expectedRect.size = NSMakeSize(2, 2); - - for (size_t i = 0; i < sizeof(data) / sizeof(TestData); i++) { - expectedRect.origin = data[i].expectedOrigin; - NSRect outRect = GTMNSAlignRectangles(rect2, rect1, data[i].alignment); - STAssertEquals(outRect, expectedRect, nil); - } -} - -- (void)testGTMNSScaleRectangleToSize { - NSRect rect = NSMakeRect(0.0f, 0.0f, 10.0f, 10.0f); - typedef struct { - NSSize size_; - NSSize newSize_; - } Test; - Test tests[] = { - { { 5.0, 10.0 }, { 5.0, 5.0 } }, - { { 10.0, 5.0 }, { 5.0, 5.0 } }, - { { 10.0, 10.0 }, { 10.0, 10.0 } }, - { { 11.0, 11.0, }, { 10.0, 10.0 } }, - { { 5.0, 2.0 }, { 2.0, 2.0 } }, - { { 2.0, 5.0 }, { 2.0, 2.0 } }, - { { 2.0, 2.0 }, { 2.0, 2.0 } }, - { { 0.0, 10.0 }, { 0.0, 0.0 } } - }; - - for (size_t i = 0; i < sizeof(tests) / sizeof(Test); ++i) { - NSRect result = GTMNSScaleRectangleToSize(rect, tests[i].size_, - GTMScaleProportionally); - STAssertEquals(result, GTMNSRectOfSize(tests[i].newSize_), @"failed on test %zd", i); - } - - NSRect result = GTMNSScaleRectangleToSize(NSZeroRect, tests[0].size_, - GTMScaleProportionally); - STAssertEquals(result, NSZeroRect, nil); - - result = GTMNSScaleRectangleToSize(rect, tests[0].size_, - GTMScaleToFit); - STAssertEquals(result, GTMNSRectOfSize(tests[0].size_), nil); - - result = GTMNSScaleRectangleToSize(rect, tests[0].size_, - GTMScaleNone); - STAssertEquals(result, rect, nil); -} - - -- (void)testGTMNSScaleRectToRect { - typedef struct { - NSRect expectedRect; - GTMScaling scaling; - GTMRectAlignment alignment; - } TestData; - - NSRect rect1 = NSMakeRect(0, 0, 4, 4); - NSRect rect2 = NSMakeRect(0, 0, 2, 1); - - TestData data[] = { - { NSMakeRect(2, 3, 2, 1), GTMScaleToFillProportionally, GTMRectAlignTopRight }, - { NSMakeRect(0, 0, 4, 4), GTMScaleToFit, GTMRectAlignCenter }, - { NSMakeRect(1, 1.5, 2, 1), GTMScaleNone, GTMRectAlignCenter }, - { NSMakeRect(1, 0, 2, 1), GTMScaleProportionally, GTMRectAlignBottom }, - }; - - for (size_t i = 0; i < sizeof(data) / sizeof(TestData); i++) { - NSRect outRect = GTMNSScaleRectToRect(rect2, rect1, data[i].scaling, data[i].alignment); - STAssertEquals(outRect, data[i].expectedRect, nil); - } -} - - -- (void)testGTMNSDistanceBetweenPoints { - NSPoint pt1 = NSMakePoint(0, 0); - NSPoint pt2 = NSMakePoint(3, 4); - STAssertEquals(GTMNSDistanceBetweenPoints(pt1, pt2), (CGFloat)5.0, nil); - STAssertEquals(GTMNSDistanceBetweenPoints(pt2, pt1), (CGFloat)5.0, nil); - pt1 = NSMakePoint(1, 1); - pt2 = NSMakePoint(1, 1); - STAssertEquals(GTMNSDistanceBetweenPoints(pt1, pt2), (CGFloat)0.0, nil); -} - -- (void)testGTMNSRectScaling { - NSRect rect = NSMakeRect(1.0f, 2.0f, 5.0f, 10.0f); - NSRect rect2 = NSMakeRect((CGFloat)1.0, (CGFloat)2.0, (CGFloat)1.0, (CGFloat)12.0); - STAssertEquals(GTMNSRectScale(rect, (CGFloat)0.2, (CGFloat)1.2), - rect2, nil); -} - -#endif // !GTM_IPHONE_SDK - -- (void)testGTMCGDistanceBetweenPoints { - CGPoint pt1 = CGPointMake(0, 0); - CGPoint pt2 = CGPointMake(3, 4); - STAssertEquals(GTMCGDistanceBetweenPoints(pt1, pt2), (CGFloat)5.0, nil); - STAssertEquals(GTMCGDistanceBetweenPoints(pt2, pt1), (CGFloat)5.0, nil); - pt1 = CGPointMake(1, 1); - pt2 = CGPointMake(1, 1); - STAssertEquals(GTMCGDistanceBetweenPoints(pt1, pt2), (CGFloat)0.0, nil); -} - -- (void)testGTMCGAlignRectangles { - typedef struct { - CGPoint expectedOrigin; - GTMRectAlignment alignment; - } TestData; - - TestData data[] = { - { {1,2}, GTMRectAlignTop }, - { {0,2}, GTMRectAlignTopLeft }, - { {2,2}, GTMRectAlignTopRight }, - { {0,1}, GTMRectAlignLeft }, - { {1,0}, GTMRectAlignBottom }, - { {0,0}, GTMRectAlignBottomLeft }, - { {2,0}, GTMRectAlignBottomRight }, - { {2,1}, GTMRectAlignRight }, - { {1,1}, GTMRectAlignCenter }, - }; - - CGRect rect1 = CGRectMake(0, 0, 4, 4); - CGRect rect2 = CGRectMake(0, 0, 2, 2); - - CGRect expectedRect; - expectedRect.size = CGSizeMake(2, 2); - - for (size_t i = 0; i < sizeof(data) / sizeof(TestData); i++) { - expectedRect.origin = data[i].expectedOrigin; - CGRect outRect = GTMCGAlignRectangles(rect2, rect1, data[i].alignment); - STAssertEquals(outRect, expectedRect, nil); - } -} - -- (void)testGTMCGPointsOnRect { - CGRect rect = CGRectMake(0, 0, 2, 2); - - CGPoint point = GTMCGMidMinX(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)0.0, (CGFloat)0.01, nil); - - point = GTMCGMidMaxX(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)2.0, (CGFloat)0.01, nil); - - point = GTMCGMidMaxY(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)2.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); - - point = GTMCGMidMinY(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)0.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); - - point = GTMCGCenter(rect); - STAssertEqualsWithAccuracy(point.y, (CGFloat)1.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(point.x, (CGFloat)1.0, (CGFloat)0.01, nil); -} - -- (void)testGTMCGRectSize { - CGSize cgSize = GTMCGRectSize(CGRectMake(1, 1, 10, 5)); - STAssertEqualsWithAccuracy(cgSize.width, (CGFloat)10.0, (CGFloat)0.01, nil); - STAssertEqualsWithAccuracy(cgSize.height, (CGFloat)5.0, (CGFloat)0.01, nil); -} - -- (void)testGTMCGRectOfSize { - CGRect outRect = GTMCGRectOfSize(CGSizeMake(10, 5)); - CGRect expectedRect = CGRectMake(0, 0, 10, 5); - STAssertEquals(outRect, expectedRect, nil); -} - -- (void)testGTMCGRectScaling { - CGRect rect = CGRectMake(1.0f, 2.0f, 5.0f, 10.0f); - CGRect rect2 = CGRectMake((CGFloat)1.0, (CGFloat)2.0, (CGFloat)1.0, (CGFloat)12.0); - STAssertEquals(GTMCGRectScale(rect, (CGFloat)0.2, (CGFloat)1.2), - rect2, nil); -} - -- (void)testGTMCGScaleRectangleToSize { - CGRect rect = CGRectMake(0.0f, 0.0f, 10.0f, 10.0f); - typedef struct { - CGSize size_; - CGSize newSize_; - } Test; - Test tests[] = { - { { 5.0, 10.0 }, { 5.0, 5.0 } }, - { { 10.0, 5.0 }, { 5.0, 5.0 } }, - { { 10.0, 10.0 }, { 10.0, 10.0 } }, - { { 11.0, 11.0, }, { 10.0, 10.0 } }, - { { 5.0, 2.0 }, { 2.0, 2.0 } }, - { { 2.0, 5.0 }, { 2.0, 2.0 } }, - { { 2.0, 2.0 }, { 2.0, 2.0 } }, - { { 0.0, 10.0 }, { 0.0, 0.0 } } - }; - - for (size_t i = 0; i < sizeof(tests) / sizeof(Test); ++i) { - CGRect result = GTMCGScaleRectangleToSize(rect, tests[i].size_, - GTMScaleProportionally); - STAssertEquals(result, GTMCGRectOfSize(tests[i].newSize_), @"failed on test %zd", i); - } - - CGRect result = GTMCGScaleRectangleToSize(CGRectZero, tests[0].size_, - GTMScaleProportionally); - STAssertEquals(result, CGRectZero, nil); - - result = GTMCGScaleRectangleToSize(rect, tests[0].size_, - GTMScaleToFit); - STAssertEquals(result, GTMCGRectOfSize(tests[0].size_), nil); - - result = GTMCGScaleRectangleToSize(rect, tests[0].size_, - GTMScaleNone); - STAssertEquals(result, rect, nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPFetcher.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPFetcher.h deleted file mode 100644 index 7377d1c3..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPFetcher.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GTMHTTPFetcher.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// This class is no more. If you want something like it's functionality, look -// at using the version in the Objective-C GData Client -// (http://code.google.com/p/gdata-objectivec-client/). It provides the same -// functionality and will continue to be maintained. diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.h deleted file mode 100644 index 0caa1492..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.h +++ /dev/null @@ -1,137 +0,0 @@ -// -// GTMHTTPServer.h -// -// This is a *very* *simple* webserver that can be built into something, it is -// not meant to stand up a site, it sends all requests to its delegate for -// processing on the main thread. It does not support pipelining, etc. It's -// great for places where you need a simple webserver to unittest some code -// that hits a server. -// -// NOTE: there are several TODOs left in here as markers for things that could -// be done if one wanted to add more to this class. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -// Based a little on HTTPServer, part of the CocoaHTTPServer sample code -// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html -// - -#import -#import "GTMDefines.h" - -#if GTM_IPHONE_SDK -#import -#endif // GTM_IPHONE_SDK - -// Global contants needed for errors from start - -#undef _EXTERN -#undef _INITIALIZE_AS -#ifdef GTMHTTPSERVER_DEFINE_GLOBALS -#define _EXTERN -#define _INITIALIZE_AS(x) =x -#else -#define _EXTERN GTM_EXTERN -#define _INITIALIZE_AS(x) -#endif - -_EXTERN NSString* kGTMHTTPServerErrorDomain _INITIALIZE_AS(@"com.google.mactoolbox.HTTPServerDomain"); -enum { - kGTMHTTPServerSocketCreateFailedError = -100, - kGTMHTTPServerBindFailedError = -101, - kGTMHTTPServerListenFailedError = -102, - kGTMHTTPServerHandleCreateFailedError = -103, -}; - -@class GTMHTTPRequestMessage, GTMHTTPResponseMessage; - -// ---------------------------------------------------------------------------- - -// See comment at top of file for the intened use of this class. -@interface GTMHTTPServer : NSObject { - @private - __weak id delegate_; - uint16_t port_; - BOOL localhostOnly_; - NSFileHandle *listenHandle_; - NSMutableArray *connections_; -} - -// The delegate must support the httpServer:handleRequest: method in -// NSObject(GTMHTTPServerDeletateMethods) below. -- (id)initWithDelegate:(id)delegate; - -- (id)delegate; - -// Passing port zero will let one get assigned. -- (uint16_t)port; -- (void)setPort:(uint16_t)port; - -// Receive connections on the localHost loopback address only or on all -// interfaces for this machine. The default is to only listen on localhost. -- (BOOL)localhostOnly; -- (void)setLocalhostOnly:(BOOL)yesno; - -// Start/Stop the web server. If there is an error starting up the server, |NO| -// is returned, and the specific startup failure can be returned in |error| (see -// above for the error domain and error codes). If the server is started, |YES| -// is returned and the server's delegate is called for any requests that come -// in. -- (BOOL)start:(NSError **)error; -- (void)stop; - -// returns the number of requests currently active in the server (i.e.-being -// read in, sent replies). -- (NSUInteger)activeRequestCount; - -@end - -@interface NSObject (GTMHTTPServerDeletateMethods) -- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server - handleRequest:(GTMHTTPRequestMessage *)request; -@end - -// ---------------------------------------------------------------------------- - -// Encapsulates an http request, one of these is sent to the server's delegate -// for each request. -@interface GTMHTTPRequestMessage : NSObject { - @private - CFHTTPMessageRef message_; -} -- (NSString *)version; -- (NSURL *)URL; -- (NSString *)method; -- (NSData *)body; -- (NSDictionary *)allHeaderFieldValues; -@end - -// ---------------------------------------------------------------------------- - -// Encapsulates an http response, the server's delegate should return one for -// each request received. -@interface GTMHTTPResponseMessage : NSObject { - @private - CFHTTPMessageRef message_; -} -+ (id)responseWithHTMLString:(NSString *)htmlString; -+ (id)responseWithBody:(NSData *)body - contentType:(NSString *)contentType - statusCode:(int)statusCode; -+ (id)emptyResponseWithCode:(int)statusCode; -// TODO: class method for redirections? -// TODO: add helper for expire/no-cache -- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.m deleted file mode 100644 index 4a7a859c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServer.m +++ /dev/null @@ -1,595 +0,0 @@ -// -// GTMHTTPServer.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -// Based a little on HTTPServer, part of the CocoaHTTPServer sample code -// http://developer.apple.com/samplecode/CocoaHTTPServer/index.html -// - -#import -#import -#import - -#define GTMHTTPSERVER_DEFINE_GLOBALS -#import "GTMHTTPServer.h" -#import "GTMDebugSelectorValidation.h" -#import "GTMGarbageCollection.h" -#import "GTMDefines.h" - -@interface GTMHTTPServer (PrivateMethods) -- (void)acceptedConnectionNotification:(NSNotification *)notification; -- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle; -- (void)dataAvailableNotification:(NSNotification *)notification; -- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle; -- (void)closeConnection:(NSMutableDictionary *)connDict; -- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict; -- (void)sentResponse:(NSMutableDictionary *)connDict; -@end - -// keys for our connection dictionaries -static NSString *kFileHandle = @"FileHandle"; -static NSString *kRequest = @"Request"; -static NSString *kResponse = @"Response"; - -@interface GTMHTTPRequestMessage (PrivateHelpers) -- (BOOL)isHeaderComplete; -- (BOOL)appendData:(NSData *)data; -- (NSString *)headerFieldValueForKey:(NSString *)key; -- (UInt32)contentLength; -- (void)setBody:(NSData *)body; -@end - -@interface GTMHTTPResponseMessage (PrivateMethods) -- (id)initWithBody:(NSData *)body - contentType:(NSString *)contentType - statusCode:(int)statusCode; -- (NSData*)serializedData; -@end - -@implementation GTMHTTPServer - -- (id)init { - return [self initWithDelegate:nil]; -} - -- (id)initWithDelegate:(id)delegate { - self = [super init]; - if (self) { - if (!delegate) { - _GTMDevLog(@"missing delegate"); - [self release]; - return nil; - } - delegate_ = delegate; - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(delegate_, - @selector(httpServer:handleRequest:), - // return type - @encode(GTMHTTPResponseMessage *), - // args - @encode(GTMHTTPServer *), - @encode(GTMHTTPRequestMessage *), - NULL); - localhostOnly_ = YES; - connections_ = [[NSMutableArray alloc] init]; - } - return self; -} - -- (void)dealloc { - [self stop]; - [connections_ release]; - [super dealloc]; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - [self stop]; - [super finalize]; -} -#endif - -- (id)delegate { - return delegate_; -} - -- (uint16_t)port { - return port_; -} - -- (void)setPort:(uint16_t)port { - port_ = port; -} - -- (BOOL)localhostOnly { - return localhostOnly_; -} - -- (void)setLocalhostOnly:(BOOL)yesno { - localhostOnly_ = yesno; -} - -- (BOOL)start:(NSError **)error { - _GTMDevAssert(listenHandle_ == nil, - @"start called when we already have a listenHandle_"); - - if (error) *error = NULL; - - NSInteger startFailureCode = 0; - int fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd <= 0) { - // COV_NF_START - we'd need to use up *all* sockets to test this? - startFailureCode = kGTMHTTPServerSocketCreateFailedError; - goto startFailed; - // COV_NF_END - } - - // enable address reuse quicker after we are done w/ our socket - int yes = 1; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (void *)&yes, (socklen_t)sizeof(yes)) != 0) { - _GTMDevLog(@"failed to mark the socket as reusable"); // COV_NF_LINE - } - - // bind - struct sockaddr_in addr; - bzero(&addr, sizeof(addr)); - addr.sin_len = sizeof(addr); - addr.sin_family = AF_INET; - addr.sin_port = htons(port_); - if (localhostOnly_) { - addr.sin_addr.s_addr = htonl(0x7F000001); - } else { - // COV_NF_START - testing this could cause a leopard firewall prompt during tests. - addr.sin_addr.s_addr = htonl(INADDR_ANY); - // COV_NF_END - } - if (bind(fd, (struct sockaddr*)(&addr), (socklen_t)sizeof(addr)) != 0) { - startFailureCode = kGTMHTTPServerBindFailedError; - goto startFailed; - } - - // collect the port back out - if (port_ == 0) { - socklen_t len = (socklen_t)sizeof(addr); - if (getsockname(fd, (struct sockaddr*)(&addr), &len) == 0) { - port_ = ntohs(addr.sin_port); - } - } - - // tell it to listen for connections - if (listen(fd, 5) != 0) { - // COV_NF_START - startFailureCode = kGTMHTTPServerListenFailedError; - goto startFailed; - // COV_NF_END - } - - // now use a filehandle to accept connections - listenHandle_ = - [[NSFileHandle alloc] initWithFileDescriptor:fd closeOnDealloc:YES]; - if (listenHandle_ == nil) { - // COV_NF_START - we'd need to run out of memory to test this? - startFailureCode = kGTMHTTPServerHandleCreateFailedError; - goto startFailed; - // COV_NF_END - } - - // setup notifications for connects - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(acceptedConnectionNotification:) - name:NSFileHandleConnectionAcceptedNotification - object:listenHandle_]; - [listenHandle_ acceptConnectionInBackgroundAndNotify]; - - // TODO: maybe hit the delegate incase it wants to register w/ NSNetService, - // or just know we're up and running? - - return YES; - -startFailed: - if (error) { - *error = [[[NSError alloc] initWithDomain:kGTMHTTPServerErrorDomain - code:startFailureCode - userInfo:nil] autorelease]; - } - if (fd > 0) { - close(fd); - } - return NO; -} - -- (void)stop { - if (listenHandle_) { - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center removeObserver:self - name:NSFileHandleConnectionAcceptedNotification - object:listenHandle_]; - [listenHandle_ release]; - listenHandle_ = nil; - // TODO: maybe hit the delegate in case it wants to unregister w/ - // NSNetService, or just know we've stopped running? - } - [connections_ removeAllObjects]; -} - -- (NSUInteger)activeRequestCount { - return [connections_ count]; -} - -- (NSString *)description { - NSString *result = - [NSString stringWithFormat:@"%@<%p>{ port=%d localHostOnly=%@ status=%@ }", - [self class], self, port_, (localhostOnly_ ? @"YES" : @"NO"), - (listenHandle_ != nil ? @"Started" : @"Stopped") ]; - return result; -} - - -@end - -@implementation GTMHTTPServer (PrivateMethods) - -- (void)acceptedConnectionNotification:(NSNotification *)notification { - NSDictionary *userInfo = [notification userInfo]; - NSFileHandle *newConnection = - [userInfo objectForKey:NSFileHandleNotificationFileHandleItem]; - _GTMDevAssert(newConnection != nil, - @"failed to get the connection in the notification: %@", - notification); - - // make sure we accept more... - [listenHandle_ acceptConnectionInBackgroundAndNotify]; - - // TODO: could let the delegate look at the address, before we start working - // on it. - - NSMutableDictionary *connDict = - [self connectionWithFileHandle:newConnection]; - [connections_ addObject:connDict]; -} - -- (NSMutableDictionary *)connectionWithFileHandle:(NSFileHandle *)fileHandle { - NSMutableDictionary *result = [NSMutableDictionary dictionary]; - - [result setObject:fileHandle forKey:kFileHandle]; - - GTMHTTPRequestMessage *request = - [[[GTMHTTPRequestMessage alloc] init] autorelease]; - [result setObject:request forKey:kRequest]; - - // setup for data notifications - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(dataAvailableNotification:) - name:NSFileHandleReadCompletionNotification - object:fileHandle]; - [fileHandle readInBackgroundAndNotify]; - - return result; -} - -- (void)dataAvailableNotification:(NSNotification *)notification { - NSFileHandle *connectionHandle = [notification object]; - NSMutableDictionary *connDict = [self lookupConnection:connectionHandle]; - if (connDict == nil) return; // we are no longer tracking this one - - NSDictionary *userInfo = [notification userInfo]; - NSData *readData = [userInfo objectForKey:NSFileHandleNotificationDataItem]; - if ([readData length] == 0) { - // remote side closed - [self closeConnection:connDict]; - return; - } - - // Like Apple's sample, we just keep adding data until we get a full header - // and any referenced body. - - GTMHTTPRequestMessage *request = [connDict objectForKey:kRequest]; - [request appendData:readData]; - - // Is the header complete yet? - if (![request isHeaderComplete]) { - // more data... - [connectionHandle readInBackgroundAndNotify]; - return; - } - - // Do we have all the body? - UInt32 contentLength = [request contentLength]; - NSData *body = [request body]; - NSUInteger bodyLength = [body length]; - if (contentLength > bodyLength) { - // need more data... - [connectionHandle readInBackgroundAndNotify]; - return; - } - - if (contentLength < bodyLength) { - // We got extra (probably someone trying to pipeline on us), trim - // and let the extra data go... - NSData *newBody = [NSData dataWithBytes:[body bytes] - length:contentLength]; - [request setBody:newBody]; - _GTMDevLog(@"Got %lu extra bytes on http request, ignoring them", - (unsigned long)(bodyLength - contentLength)); - } - - GTMHTTPResponseMessage *response = nil; - @try { - // Off to the delegate - response = [delegate_ httpServer:self handleRequest:request]; - } @catch (NSException *e) { - _GTMDevLog(@"Exception trying to handle http request: %@", e); - } // COV_NF_LINE - radar 5851992 only reachable w/ an uncaught exception which isn't testable - - if (!response) { - [self closeConnection:connDict]; - return; - } - - // We don't support connection reuse, so we add (force) the header to close - // every connection. - [response setValue:@"close" forHeaderField:@"Connection"]; - - // spawn thread to send reply (since we do a blocking send) - [connDict setObject:response forKey:kResponse]; - [NSThread detachNewThreadSelector:@selector(sendResponseOnNewThread:) - toTarget:self - withObject:connDict]; -} - -- (NSMutableDictionary *)lookupConnection:(NSFileHandle *)fileHandle { - NSMutableDictionary *result = nil; - NSUInteger max = [connections_ count]; - for (NSUInteger x = 0; x < max; ++x) { - NSMutableDictionary *connDict = [connections_ objectAtIndex:x]; - if (fileHandle == [connDict objectForKey:kFileHandle]) { - result = connDict; - break; - } - } - return result; -} - -- (void)closeConnection:(NSMutableDictionary *)connDict { - // remove the notification - NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center removeObserver:self - name:NSFileHandleReadCompletionNotification - object:connectionHandle]; - // in a non GC world, we're fine just letting the connect get closed when - // the object is release when it comes out of connections_, but in a GC world - // it won't get cleaned up - [connectionHandle closeFile]; - - // remove it from the list - [connections_ removeObject:connDict]; -} - -- (void)sendResponseOnNewThread:(NSMutableDictionary *)connDict { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - @try { - GTMHTTPResponseMessage *response = [connDict objectForKey:kResponse]; - NSFileHandle *connectionHandle = [connDict objectForKey:kFileHandle]; - NSData *serialized = [response serializedData]; - [connectionHandle writeData:serialized]; - } @catch (NSException *e) { // COV_NF_START - causing an exception here is to hard in a test - // TODO: let the delegate know about the exception (but do it on the main - // thread) - _GTMDevLog(@"exception while sending reply: %@", e); - } // COV_NF_END - - // back to the main thread to close things down - [self performSelectorOnMainThread:@selector(sentResponse:) - withObject:connDict - waitUntilDone:NO]; - - [pool release]; -} - -- (void)sentResponse:(NSMutableDictionary *)connDict { - // make sure we're still tracking this connection (in case server was stopped) - NSFileHandle *connection = [connDict objectForKey:kFileHandle]; - NSMutableDictionary *connDict2 = [self lookupConnection:connection]; - if (connDict != connDict2) return; - - // TODO: message the delegate that it was sent - - // close it down - [self closeConnection:connDict]; -} - -@end - -#pragma mark - - -@implementation GTMHTTPRequestMessage - -- (id)init { - self = [super init]; - if (self) { - message_ = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, YES); - } - return self; -} - -- (void)dealloc { - if (message_) { - CFRelease(message_); - } - [super dealloc]; -} - -- (NSString *)version { - return GTMCFAutorelease(CFHTTPMessageCopyVersion(message_)); -} - -- (NSURL *)URL { - return GTMCFAutorelease(CFHTTPMessageCopyRequestURL(message_)); -} - -- (NSString *)method { - return GTMCFAutorelease(CFHTTPMessageCopyRequestMethod(message_)); -} - -- (NSData *)body { - return GTMCFAutorelease(CFHTTPMessageCopyBody(message_)); -} - -- (NSDictionary *)allHeaderFieldValues { - return GTMCFAutorelease(CFHTTPMessageCopyAllHeaderFields(message_)); -} - -- (NSString *)description { - CFStringRef desc = CFCopyDescription(message_); - NSString *result = - [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; - CFRelease(desc); - return result; -} - -@end - -@implementation GTMHTTPRequestMessage (PrivateHelpers) - -- (BOOL)isHeaderComplete { - return CFHTTPMessageIsHeaderComplete(message_) ? YES : NO; -} - -- (BOOL)appendData:(NSData *)data { - return CFHTTPMessageAppendBytes(message_, - [data bytes], [data length]) ? YES : NO; -} - -- (NSString *)headerFieldValueForKey:(NSString *)key { - CFStringRef value = NULL; - if (key) { - value = CFHTTPMessageCopyHeaderFieldValue(message_, (CFStringRef)key); - } - return GTMCFAutorelease(value); -} - -- (UInt32)contentLength { - return [[self headerFieldValueForKey:@"Content-Length"] intValue]; -} - -- (void)setBody:(NSData *)body { - if (!body) { - body = [NSData data]; // COV_NF_LINE - can only happen in we fail to make the new data object - } - CFHTTPMessageSetBody(message_, (CFDataRef)body); -} - -@end - -#pragma mark - - -@implementation GTMHTTPResponseMessage - -- (id)init { - return [self initWithBody:nil contentType:nil statusCode:0]; -} - -- (void)dealloc { - if (message_) { - CFRelease(message_); - } - [super dealloc]; -} - -+ (id)responseWithHTMLString:(NSString *)htmlString { - return [self responseWithBody:[htmlString dataUsingEncoding:NSUTF8StringEncoding] - contentType:@"text/html; charset=UTF-8" - statusCode:200]; -} - -+ (id)responseWithBody:(NSData *)body - contentType:(NSString *)contentType - statusCode:(int)statusCode { - return [[[[self class] alloc] initWithBody:body - contentType:contentType - statusCode:statusCode] autorelease]; -} - -+ (id)emptyResponseWithCode:(int)statusCode { - return [[[[self class] alloc] initWithBody:nil - contentType:nil - statusCode:statusCode] autorelease]; -} - -- (void)setValue:(NSString*)value forHeaderField:(NSString*)headerField { - if ([headerField length] == 0) return; - if (value == nil) { - value = @""; - } - CFHTTPMessageSetHeaderFieldValue(message_, - (CFStringRef)headerField, (CFStringRef)value); -} - -- (NSString *)description { - CFStringRef desc = CFCopyDescription(message_); - NSString *result = - [NSString stringWithFormat:@"%@<%p>{ message=%@ }", [self class], self, desc]; - CFRelease(desc); - return result; -} - -@end - -@implementation GTMHTTPResponseMessage (PrivateMethods) - -- (id)initWithBody:(NSData *)body - contentType:(NSString *)contentType - statusCode:(int)statusCode { - self = [super init]; - if (self) { - if ((statusCode < 100) || (statusCode > 599)) { - [self release]; - return nil; - } - message_ = CFHTTPMessageCreateResponse(kCFAllocatorDefault, - statusCode, NULL, - kCFHTTPVersion1_0); - if (!message_) { - // COV_NF_START - [self release]; - return nil; - // COV_NF_END - } - NSUInteger bodyLength = 0; - if (body) { - bodyLength = [body length]; - CFHTTPMessageSetBody(message_, (CFDataRef)body); - } - if ([contentType length] == 0) { - contentType = @"text/html"; - } - NSString *bodyLenStr = - [NSString stringWithFormat:@"%lu", (unsigned long)bodyLength]; - [self setValue:bodyLenStr forHeaderField:@"Content-Length"]; - [self setValue:contentType forHeaderField:@"Content-Type"]; - } - return self; -} - -- (NSData *)serializedData { - return GTMCFAutorelease(CFHTTPMessageCopySerializedMessage(message_)); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServerTest.m deleted file mode 100644 index fd962afc..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMHTTPServerTest.m +++ /dev/null @@ -1,574 +0,0 @@ -// -// GTMHTTPServerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import -#import "GTMSenTestCase.h" -#import "GTMUnitTestDevLog.h" -#import "GTMHTTPServer.h" -#import "GTMRegex.h" - -@interface GTMHTTPServerTest : GTMTestCase { - NSData *fetchedData_; -} -@end - -@interface GTMHTTPServerTest (PrivateMethods) -- (NSData *)fetchFromPort:(unsigned short)port - payload:(NSString *)payload - chunkSize:(NSUInteger)chunkSize; -- (NSFileHandle *)fileHandleSendingToPort:(unsigned short)port - payload:(NSString *)payload - chunkSize:(NSUInteger)chunkSize; -- (void)readFinished:(NSNotification *)notification; -@end - -// helper class -@interface TestServerDelegate : NSObject { - NSMutableArray *requests_; - NSMutableArray *responses_; -} -+ (id)testServerDelegate; -- (NSUInteger)requestCount; -- (GTMHTTPRequestMessage *)popRequest; -- (void)pushResponse:(GTMHTTPResponseMessage *)message; -@end - -// helper that throws while handling its request -@interface TestThrowingServerDelegate : TestServerDelegate -- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server - handleRequest:(GTMHTTPRequestMessage *)request; -@end - -// The timings used for waiting for replies -const NSTimeInterval kGiveUpInterval = 5.0; -const NSTimeInterval kRunLoopInterval = 0.01; - -// the size we break writes up into to test the reading code and how long to -// wait between writes. -const NSUInteger kSendChunkSize = 12; -const NSTimeInterval kSendChunkInterval = 0.05; - -// ---------------------------------------------------------------------------- - -@implementation GTMHTTPServerTest - -- (void)testInit { - // bad delegates - [GTMUnitTestDevLog expectString:@"missing delegate"]; - STAssertNil([[GTMHTTPServer alloc] init], nil); - [GTMUnitTestDevLog expectString:@"missing delegate"]; - STAssertNil([[GTMHTTPServer alloc] initWithDelegate:nil], nil); - - TestServerDelegate *delegate = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate, nil); - GTMHTTPServer *server = - [[[GTMHTTPServer alloc] initWithDelegate:delegate] autorelease]; - STAssertNotNil(server, nil); - - // some attributes - - STAssertTrue([server delegate] == delegate, nil); - - [server setLocalhostOnly:NO]; - STAssertFalse([server localhostOnly], nil); - [server setLocalhostOnly:YES]; - STAssertTrue([server localhostOnly], nil); - - STAssertEquals([server port], (uint16_t)0, nil); - [server setPort:8080]; - STAssertEquals([server port], (uint16_t)8080, nil); - [server setPort:80]; - STAssertEquals([server port], (uint16_t)80, nil); - - // description (atleast 10 chars) - STAssertGreaterThan([[server description] length], (NSUInteger)10, nil); -} - -- (void)testStartStop { - TestServerDelegate *delegate1 = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate1, nil); - GTMHTTPServer *server1 = - [[[GTMHTTPServer alloc] initWithDelegate:delegate1] autorelease]; - STAssertNotNil(server1, nil); - NSError *error = nil; - STAssertTrue([server1 start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - STAssertGreaterThanOrEqual([server1 port], (uint16_t)1024, - @"how'd we get a reserved port?"); - - TestServerDelegate *delegate2 = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate2, nil); - GTMHTTPServer *server2 = - [[[GTMHTTPServer alloc] initWithDelegate:delegate2] autorelease]; - STAssertNotNil(server2, nil); - - // try the reserved port - [server2 setPort:666]; - error = nil; - STAssertFalse([server2 start:&error], nil); - STAssertNotNil(error, nil); - STAssertEqualObjects([error domain], kGTMHTTPServerErrorDomain, nil); - STAssertEquals([error code], (NSInteger)kGTMHTTPServerBindFailedError, - @"port should have been reserved"); - - // try the same port - [server2 setPort:[server1 port]]; - error = nil; - STAssertFalse([server2 start:&error], nil); - STAssertNotNil(error, nil); - STAssertEqualObjects([error domain], kGTMHTTPServerErrorDomain, nil); - STAssertEquals([error code], (NSInteger)kGTMHTTPServerBindFailedError, - @"port should have been in use"); - - // try a random port again so we really start (prove two can run at once) - [server2 setPort:0]; - error = nil; - STAssertTrue([server2 start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - - // shut them down - [server1 stop]; - [server2 stop]; -} - -- (void)testRequests { - TestServerDelegate *delegate = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate, nil); - GTMHTTPServer *server = - [[[GTMHTTPServer alloc] initWithDelegate:delegate] autorelease]; - STAssertNotNil(server, nil); - NSError *error = nil; - STAssertTrue([server start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - - // a request to test all the fields of a request object - - NSString *payload = - @"PUT /some/server/path HTTP/1.0\r\n" - @"Content-Length: 16\r\n" - @"Custom-Header: Custom_Value\r\n" - @"\r\n" - @"this is the body"; - NSData *reply = - [self fetchFromPort:[server port] payload:payload chunkSize:kSendChunkSize]; - STAssertNotNil(reply, nil); - - GTMHTTPRequestMessage *request = [delegate popRequest]; - STAssertEqualObjects([request version], @"HTTP/1.0", nil); - STAssertEqualObjects([[request URL] absoluteString], @"/some/server/path", nil); - STAssertEqualObjects([request method], @"PUT", nil); - STAssertEqualObjects([request body], - [@"this is the body" dataUsingEncoding:NSUTF8StringEncoding], - nil); - NSDictionary *allHeaders = [request allHeaderFieldValues]; - STAssertNotNil(allHeaders, nil); - STAssertEquals([allHeaders count], (NSUInteger)2, nil); - STAssertEqualObjects([allHeaders objectForKey:@"Content-Length"], - @"16", nil); - STAssertEqualObjects([allHeaders objectForKey:@"Custom-Header"], - @"Custom_Value", nil); - STAssertGreaterThan([[request description] length], (NSUInteger)10, nil); - - // test different request types (in simple form) - - typedef struct { - NSString *method; - NSString *url; - } TestData; - - TestData data[] = { - { @"GET", @"/foo/bar" }, - { @"HEAD", @"/foo/baz" }, - { @"POST", @"/foo" }, - { @"PUT", @"/foo/spam" }, - { @"DELETE", @"/fooby/doo" }, - { @"TRACE", @"/something.html" }, - { @"CONNECT", @"/spam" }, - { @"OPTIONS", @"/wee/doggies" }, - }; - - for (size_t i = 0; i < sizeof(data) / sizeof(TestData); i++) { - payload = [NSString stringWithFormat:@"%@ %@ HTTP/1.0\r\n\r\n", - data[i].method, data[i].url]; - STAssertNotNil(payload, nil); - reply = [self fetchFromPort:[server port] - payload:payload - chunkSize:kSendChunkSize]; - STAssertNotNil(reply, // just want a reply in this test - @"failed of method %@", data[i].method); - request = [delegate popRequest]; - STAssertEqualObjects([[request URL] absoluteString], data[i].url, - @"urls didn't match for index %d", i); - STAssertEqualObjects([request method], data[i].method, - @"methods didn't match for index %d", i); - } - - [server stop]; -} - -- (void)testResponses { - - // some quick init tests for invalid things - STAssertNil([[GTMHTTPResponseMessage alloc] init], nil); - STAssertNil([GTMHTTPResponseMessage responseWithBody:nil - contentType:nil - statusCode:99], - nil); - STAssertNil([GTMHTTPResponseMessage responseWithBody:nil - contentType:nil - statusCode:602], - nil); - - TestServerDelegate *delegate = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate, nil); - GTMHTTPServer *server = - [[[GTMHTTPServer alloc] initWithDelegate:delegate] autorelease]; - STAssertNotNil(server, nil); - NSError *error = nil; - STAssertTrue([server start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - - // test the html helper - - GTMHTTPResponseMessage *expectedResponse = - [GTMHTTPResponseMessage responseWithHTMLString:@"Success!"]; - STAssertNotNil(expectedResponse, nil); - STAssertGreaterThan([[expectedResponse description] length], - (NSUInteger)0, nil); - [delegate pushResponse:expectedResponse]; - NSData *responseData = [self fetchFromPort:[server port] - payload:@"GET /foo HTTP/1.0\r\n\r\n" - chunkSize:kSendChunkSize]; - STAssertNotNil(responseData, nil); - NSString *responseString = - [[[NSString alloc] initWithData:responseData - encoding:NSUTF8StringEncoding] autorelease]; - STAssertNotNil(responseString, nil); - STAssertTrue([responseString hasPrefix:@"HTTP/1.0 200 OK"], nil); - STAssertTrue([responseString hasSuffix:@"Success!"], @"should end w/ our data"); - STAssertNotEquals([responseString rangeOfString:@"Content-Length: 8"].location, - (NSUInteger)NSNotFound, nil); - STAssertNotEquals([responseString rangeOfString:@"Content-Type: text/html; charset=UTF-8"].location, - (NSUInteger)NSNotFound, nil); - - // test the plain code response - - expectedResponse = [GTMHTTPResponseMessage emptyResponseWithCode:299]; - STAssertNotNil(expectedResponse, nil); - STAssertGreaterThan([[expectedResponse description] length], - (NSUInteger)0, nil); - [delegate pushResponse:expectedResponse]; - responseData = [self fetchFromPort:[server port] - payload:@"GET /foo HTTP/1.0\r\n\r\n" - chunkSize:kSendChunkSize]; - STAssertNotNil(responseData, nil); - responseString = - [[[NSString alloc] initWithData:responseData - encoding:NSUTF8StringEncoding] autorelease]; - STAssertNotNil(responseString, nil); - STAssertTrue([responseString hasPrefix:@"HTTP/1.0 299 "], nil); - STAssertNotEquals([responseString rangeOfString:@"Content-Length: 0"].location, - (NSUInteger)NSNotFound, nil); - STAssertNotEquals([responseString rangeOfString:@"Content-Type: text/html"].location, - (NSUInteger)NSNotFound, nil); - - // test the general api w/ extra header add - - expectedResponse = - [GTMHTTPResponseMessage responseWithBody:[@"FOO" dataUsingEncoding:NSUTF8StringEncoding] - contentType:@"some/type" - statusCode:298]; - STAssertNotNil(expectedResponse, nil); - STAssertGreaterThan([[expectedResponse description] length], - (NSUInteger)0, nil); - [expectedResponse setValue:@"Custom_Value" - forHeaderField:@"Custom-Header"]; - [expectedResponse setValue:nil - forHeaderField:@"Custom-Header2"]; - [delegate pushResponse:expectedResponse]; - responseData = [self fetchFromPort:[server port] - payload:@"GET /foo HTTP/1.0\r\n\r\n" - chunkSize:kSendChunkSize]; - STAssertNotNil(responseData, nil); - responseString = - [[[NSString alloc] initWithData:responseData - encoding:NSUTF8StringEncoding] autorelease]; - STAssertNotNil(responseString, nil); - STAssertTrue([responseString hasPrefix:@"HTTP/1.0 298"], nil); - STAssertTrue([responseString hasSuffix:@"FOO"], @"should end w/ our data"); - STAssertNotEquals([responseString rangeOfString:@"Content-Length: 3"].location, - (NSUInteger)NSNotFound, nil); - STAssertNotEquals([responseString rangeOfString:@"Content-Type: some/type"].location, - (NSUInteger)NSNotFound, nil); - STAssertNotEquals([responseString rangeOfString:@"Custom-Header: Custom_Value"].location, - (NSUInteger)NSNotFound, nil); - STAssertNotEquals([responseString rangeOfString:@"Custom-Header2: "].location, - (NSUInteger)NSNotFound, nil); - - [server stop]; -} - -- (void)testRequstEdgeCases { - // test all the odd things about requests - - TestServerDelegate *delegate = [TestServerDelegate testServerDelegate]; - STAssertNotNil(delegate, nil); - GTMHTTPServer *server = - [[[GTMHTTPServer alloc] initWithDelegate:delegate] autorelease]; - STAssertNotNil(server, nil); - NSError *error = nil; - STAssertTrue([server start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - - // extra data (ie-pipelining) - - NSString *payload = - @"GET /some/server/path HTTP/1.0\r\n" - @"\r\n" - @"GET /some/server/path/too HTTP/1.0\r\n" - @"\r\n"; - // don't chunk this, we want to make sure both requests get to our server - [GTMUnitTestDevLog expectString:@"Got 38 extra bytes on http request, " - "ignoring them"]; - NSData *reply = - [self fetchFromPort:[server port] payload:payload chunkSize:0]; - STAssertNotNil(reply, nil); - STAssertEquals([delegate requestCount], (NSUInteger)1, nil); - - // close w/o full request - { - // local pool so we can force our handle to close - NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; - NSFileHandle *handle = - [self fileHandleSendingToPort:[server port] - payload:@"GET /some/server/path HTTP/" - chunkSize:kSendChunkSize]; - STAssertNotNil(handle, nil); - // spin the run loop so reads the start of the request - NSDate* loopIntervalDate = - [NSDate dateWithTimeIntervalSinceNow:kRunLoopInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:loopIntervalDate]; - // make sure we see the request at this point - STAssertEquals([server activeRequestCount], (NSUInteger)1, - @"should have started the request by now"); - // force the connection closed and drop the pool to get all the cleanup to - // happen. - [handle closeFile]; - [localPool drain]; - // spin the run loop so it should see the close - loopIntervalDate = [NSDate dateWithTimeIntervalSinceNow:kRunLoopInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:loopIntervalDate]; - // make sure we didn't get a request (1 is from test before) and make sure - // we don't have some in flight. - STAssertEquals([delegate requestCount], (NSUInteger)1, - @"shouldn't have gotten another request"); - STAssertEquals([server activeRequestCount], (NSUInteger)0, - @"should have cleaned up the pending connection"); - } - -} - -- (void)testExceptionDuringRequest { - - TestServerDelegate *delegate = [TestThrowingServerDelegate testServerDelegate]; - STAssertNotNil(delegate, nil); - GTMHTTPServer *server = - [[[GTMHTTPServer alloc] initWithDelegate:delegate] autorelease]; - STAssertNotNil(server, nil); - NSError *error = nil; - STAssertTrue([server start:&error], @"failed to start (error=%@)", error); - STAssertNil(error, @"error: %@", error); - [GTMUnitTestDevLog expectString:@"Exception trying to handle http request: " - "To test our handling"]; - NSData *responseData = [self fetchFromPort:[server port] - payload:@"GET /foo HTTP/1.0\r\n\r\n" - chunkSize:kSendChunkSize]; - STAssertNotNil(responseData, nil); - STAssertEquals([responseData length], (NSUInteger)0, nil); - STAssertEquals([delegate requestCount], (NSUInteger)1, nil); - STAssertEquals([server activeRequestCount], (NSUInteger)0, nil); -} - -@end - -// ---------------------------------------------------------------------------- - -@implementation GTMHTTPServerTest (PrivateMethods) - -- (NSData *)fetchFromPort:(unsigned short)port - payload:(NSString *)payload - chunkSize:(NSUInteger)chunkSize { - fetchedData_ = nil; - - NSFileHandle *handle = [self fileHandleSendingToPort:port - payload:payload - chunkSize:chunkSize]; - - NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(readFinished:) - name:NSFileHandleReadToEndOfFileCompletionNotification - object:handle]; - [handle readToEndOfFileInBackgroundAndNotify]; - - // wait for our reply - NSDate* giveUpDate = [NSDate dateWithTimeIntervalSinceNow:kGiveUpInterval]; - while (!fetchedData_ && [giveUpDate timeIntervalSinceNow] > 0) { - NSDate* loopIntervalDate = - [NSDate dateWithTimeIntervalSinceNow:kRunLoopInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:loopIntervalDate]; - } - - [center removeObserver:self - name:NSFileHandleReadToEndOfFileCompletionNotification - object:handle]; - - NSData *result = [fetchedData_ autorelease]; - fetchedData_ = nil; - return result; -} - -- (NSFileHandle *)fileHandleSendingToPort:(unsigned short)port - payload:(NSString *)payload - chunkSize:(NSUInteger)chunkSize { - int fd = socket(AF_INET, SOCK_STREAM, 0); - STAssertGreaterThan(fd, 0, @"failed to create socket"); - - struct sockaddr_in addr; - bzero(&addr, sizeof(addr)); - addr.sin_len = sizeof(addr); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = htonl(0x7F000001); - int connectResult = - connect(fd, (struct sockaddr*)(&addr), (socklen_t)sizeof(addr)); - STAssertEquals(connectResult, 0, nil); - - NSFileHandle *handle = - [[[NSFileHandle alloc] initWithFileDescriptor:fd - closeOnDealloc:YES] autorelease]; - STAssertNotNil(handle, nil); - - NSData *payloadData = [payload dataUsingEncoding:NSUTF8StringEncoding]; - - // we can send in one block or in chunked mode - if (chunkSize > 0) { - // we don't write the data in one large block, instead of write it out - // in bits to help test the data collection code. - NSUInteger length = [payloadData length]; - for (NSUInteger x = 0 ; x < length ; x += chunkSize) { - NSUInteger dataChunkSize = length - x; - if (dataChunkSize > chunkSize) { - dataChunkSize = chunkSize; - } - NSData *dataChunk - = [payloadData subdataWithRange:NSMakeRange(x, dataChunkSize)]; - [handle writeData:dataChunk]; - // delay after all but the last chunk to give it time to be read. - if ((x + chunkSize) < length) { - NSDate* loopIntervalDate = - [NSDate dateWithTimeIntervalSinceNow:kSendChunkInterval]; - [[NSRunLoop currentRunLoop] runUntilDate:loopIntervalDate]; - } - } - } else { - [handle writeData:payloadData]; - } - - return handle; -} - -- (void)readFinished:(NSNotification *)notification { - NSDictionary *userInfo = [notification userInfo]; - fetchedData_ = - [[userInfo objectForKey:NSFileHandleNotificationDataItem] retain]; -} - -@end - -// ---------------------------------------------------------------------------- - -@implementation TestServerDelegate - -- (id)init { - self = [super init]; - if (self) { - requests_ = [[NSMutableArray alloc] init]; - responses_ = [[NSMutableArray alloc] init]; - } - return self; -} - -- (void)dealloc { - [requests_ release]; - [responses_ release]; - [super dealloc]; -} - -+ (id)testServerDelegate { - return [[[[self class] alloc] init] autorelease]; -} - -- (NSUInteger)requestCount { - return [requests_ count]; -} - -- (GTMHTTPRequestMessage *)popRequest { - GTMHTTPRequestMessage *result = [[[requests_ lastObject] retain] autorelease]; - [requests_ removeLastObject]; - return result; -} - -- (void)pushResponse:(GTMHTTPResponseMessage *)message { - [responses_ addObject:message]; -} - -- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server - handleRequest:(GTMHTTPRequestMessage *)request { - [requests_ addObject:request]; - - GTMHTTPResponseMessage *result = nil; - if ([responses_ count] > 0) { - result = [[[responses_ lastObject] retain] autorelease]; - [responses_ removeLastObject]; - } else { - result = [GTMHTTPResponseMessage responseWithHTMLString:@"success"]; - } - return result; -} - -@end - -// ---------------------------------------------------------------------------- - -@implementation TestThrowingServerDelegate - -- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server - handleRequest:(GTMHTTPRequestMessage *)request { - // let the base do its normal work for counts, etc. - [super httpServer:server handleRequest:request]; - NSException *exception = - [NSException exceptionWithName:@"InternalTestingException" - reason:@"To test our handling" - userInfo:nil]; - @throw exception; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h deleted file mode 100644 index 2e2a7487..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// GTMLightweightProxy.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// -// GTMLightweightProxy -// -// An object which does nothing but stand in for another object and forward -// messages (other than basic NSObject messages) to it, suitable for breaking -// retain cycles. It does *not* retain the represented object, so the -// represented object must be set to nil when that object is deallocated. -// -// Messages sent to a GTMLightweightProxy with no represented object set will -// be silently discarded. -// -@interface GTMLightweightProxy : NSProxy { - @private - __weak id representedObject_; -} - -// Initializes the object to represent |object|. -- (id)initWithRepresentedObject:(id)object; - -// Gets the object that the proxy represents. -- (id)representedObject; - -// Changes the proxy to represent |object| -- (void)setRepresentedObject:(id)object; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.m deleted file mode 100644 index c00e44bd..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxy.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// GTMLightweightProxy.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLightweightProxy.h" -#import "GTMDefines.h" - -@implementation GTMLightweightProxy - -- (id)initWithRepresentedObject:(id)object { - // it's weak, we don't retain - representedObject_ = object; - return self; -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -#if GTM_SUPPORT_GC -// -[NSProxy finalize] is only in 10.5 or later -- (void)finalize { - representedObject_ = nil; - [super finalize]; -} -#endif -#endif - -- (void)dealloc { - // it's weak, we don't release - representedObject_ = nil; - [super dealloc]; -} - -- (id)representedObject { - // Use a local variable to avoid a bogus compiler warning. - id repObject = nil; - @synchronized(self) { - // Even though we don't retain this object, we hang it on the lifetime - // of the calling threads pool so it's lifetime is safe for at least that - // long. - repObject = [representedObject_ retain]; - } - return [repObject autorelease]; -} - -- (void)setRepresentedObject:(id)object { - @synchronized(self) { - representedObject_ = object; - } -} - -// Passes any unhandled method to the represented object if it responds to that -// method. -- (void)forwardInvocation:(NSInvocation*)invocation { - id target = [self representedObject]; - // Silently discard all messages when there's no represented object - if (!target) - return; - - SEL aSelector = [invocation selector]; - if ([target respondsToSelector:aSelector]) - [invocation invokeWithTarget:target]; -} - -// Gets the represented object's method signature for |selector|; necessary for -// forwardInvocation. -- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { - id target = [self representedObject]; - if (target) { - return [target methodSignatureForSelector:selector]; - } else { - // Apple's underlying forwarding code crashes if we return nil here. - // Since we are not going to use the invocation being constructed - // if there's no representedObject, a random valid NSMethodSignature is fine. - return [NSObject methodSignatureForSelector:@selector(alloc)]; - } -} - -// Prevents exceptions from unknown selectors if there is no represented -// object, and makes the exception come from the right place if there is one. -- (void)doesNotRecognizeSelector:(SEL)selector { - id target = [self representedObject]; - if (target) - [target doesNotRecognizeSelector:selector]; -} - -// Checks the represented object's selectors to allow clients of the proxy to -// do respondsToSelector: tests. -- (BOOL)respondsToSelector:(SEL)selector { - if ([super respondsToSelector:selector] || - selector == @selector(initWithRepresentedObject:) || - selector == @selector(representedObject) || - selector == @selector(setRepresentedObject:)) - { - return YES; - } - - id target = [self representedObject]; - return target && [target respondsToSelector:selector]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxyTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxyTest.m deleted file mode 100644 index e50a9dc2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLightweightProxyTest.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// GTMLightweightProxyTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMLightweightProxy.h" - -@interface GTMLightweightProxyTest : GTMTestCase -- (BOOL)returnYes; -@end - -// Declare a non-existent method that we can call without compiler warnings. -@interface GTMLightweightProxyTest (GTMLightweightProxyTestMadeUpMethodDeclaration) -- (void)someMadeUpMethod; -@end - -@implementation GTMLightweightProxyTest - -- (void)testProxy { - id proxy - = [[[GTMLightweightProxy alloc] initWithRepresentedObject:self] autorelease]; - STAssertEqualObjects(self, [proxy representedObject], - @"Represented object setup failed"); - - // Check that it identifies itself as a proxy. - STAssertTrue([proxy isProxy], @"Should identify as a proxy"); - // Check that it passes class requests on - STAssertTrue([proxy isMemberOfClass:[self class]], - @"Should pass class requests through"); - - // Check that it claims to respond to its selectors. - STAssertTrue([proxy respondsToSelector:@selector(initWithRepresentedObject:)], - @"Claims not to respond to initWithRepresentedObject:"); - STAssertTrue([proxy respondsToSelector:@selector(representedObject)], - @"Claims not to respond to representedObject:"); - STAssertTrue([proxy respondsToSelector:@selector(setRepresentedObject:)], - @"Claims not to respond to setRepresentedObject:"); - // Check that it responds to its represented object's selectors - STAssertTrue([proxy respondsToSelector:@selector(returnYes)], - @"Claims not to respond to returnYes"); - // ... but not to made up selectors. - STAssertThrows([proxy someMadeUpMethod], - @"Calling a bogus method should throw"); - - // Check that callthrough works. - STAssertTrue([proxy returnYes], - @"Calling through to the represented object failed"); - - // Check that nilling out the represented object works. - [proxy setRepresentedObject:nil]; - STAssertTrue([proxy respondsToSelector:@selector(setRepresentedObject:)], - @"Claims not to respond to setRepresentedObject: after nilling" - @" out represented object"); - STAssertFalse([proxy respondsToSelector:@selector(returnYes)], - @"Claims to respond to returnYes after nilling out represented" - @" object"); - // Calling through once the represented object is nil should fail silently - STAssertNoThrow([proxy returnYes], - @"Calling through without a represented object should fail" - @" silently"); - // ... even when they are made up. - STAssertNoThrow([proxy someMadeUpMethod], - @"Calling a bogus method on a nilled proxy should not throw"); -} - -// Simple method to test calling through the proxy. -- (BOOL)returnYes { - return YES; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.h deleted file mode 100644 index 689a0d95..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// GTMLogger+ASL.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import "GTMLogger.h" - - -// GTMLogger (GTMLoggerASLAdditions) -// -// Adds a convenience creation method that allows you to get a standard -// GTMLogger object that is configured to write to ASL (Apple System Log) using -// the GTMLogASLWriter (declared below). -// -@interface GTMLogger (GTMLoggerASLAdditions) - -// Returns a new autoreleased GTMLogger instance that will log to ASL, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLoggerWithASL; - -@end - - -@class GTMLoggerASLClient; - -// GTMLogASLWriter -// -// A GTMLogWriter implementation that will send log messages to ASL (Apple -// System Log facility). To use with GTMLogger simply set the "writer" for a -// GTMLogger to be an instance of this class. The following example sets the -// shared system logger to lot to ASL. -// -// [[GTMLogger sharedLogger] setWriter:[GTMLogASLWriter aslWriter]]; -// GTMLoggerInfo(@"Hi"); // This is sent to ASL -// -// See GTMLogger.h for more details and a higher-level view. -// -@interface GTMLogASLWriter : NSObject { - @private - __weak Class aslClientClass_; -} - -// Returns an autoreleased GTMLogASLWriter instance that uses an instance of -// GTMLoggerASLClient. -+ (id)aslWriter; - -// Designated initializer. Uses instances of the specified |clientClass| to talk -// to the ASL system. This method is typically only useful for testing. Users -// should generally NOT use this method to get an instance. Instead, simply use -// the +aslWriter method to obtain an instance. -- (id)initWithClientClass:(Class)clientClass; - -@end // GTMLogASLWriter - - -// Helper class used by GTMLogASLWriter to create an ASL client and write to the -// ASL log. This class is need to make management/cleanup of the aslclient work -// in a multithreaded environment. You'll need one of these GTMLoggerASLClient -// per thread (this is automatically handled by GTMLogASLWriter). -// -// This class should rarely (if EVER) be used directly. It's designed to be used -// internally by GTMLogASLWriter, and by some unit tests. It should not be -// used externally. -@interface GTMLoggerASLClient : NSObject { - @private - aslclient client_; -} - -// Sends the given string to ASL at the specified ASL log |level|. -- (void)log:(NSString *)msg level:(int)level; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.m deleted file mode 100644 index 90ea7e57..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASL.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// GTMLogger+ASL.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger+ASL.h" -#import "GTMDefines.h" - - -@implementation GTMLogger (GTMLoggerASLAdditions) - -+ (id)standardLoggerWithASL { - id me = [self standardLogger]; - [me setWriter:[[[GTMLogASLWriter alloc] init] autorelease]]; - [me setFormatter:[[[GTMLogBasicFormatter alloc] init] autorelease]]; - return me; -} - -@end - - -@implementation GTMLogASLWriter - -+ (id)aslWriter { - return [[[self alloc] init] autorelease]; -} - -- (id)init { - return [self initWithClientClass:nil]; -} - -- (id)initWithClientClass:(Class)clientClass { - if ((self = [super init])) { - aslClientClass_ = clientClass; - if (aslClientClass_ == nil) { - aslClientClass_ = [GTMLoggerASLClient class]; - } - } - return self; -} - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - static NSString *const kASLClientKey = @"GTMLoggerASLClientKey"; - - // Lookup the ASL client in the thread-local storage dictionary - NSMutableDictionary *tls = [[NSThread currentThread] threadDictionary]; - GTMLoggerASLClient *client = [tls objectForKey:kASLClientKey]; - - // If the ASL client wasn't found (e.g., the first call from this thread), - // then create it and store it in the thread-local storage dictionary - if (client == nil) { - client = [[[aslClientClass_ alloc] init] autorelease]; - [tls setObject:client forKey:kASLClientKey]; - } - - // Map the GTMLoggerLevel level to an ASL level. - int aslLevel = ASL_LEVEL_INFO; - switch (level) { - case kGTMLoggerLevelUnknown: - case kGTMLoggerLevelDebug: - case kGTMLoggerLevelInfo: - aslLevel = ASL_LEVEL_NOTICE; - break; - case kGTMLoggerLevelError: - aslLevel = ASL_LEVEL_ERR; - break; - case kGTMLoggerLevelAssert: - aslLevel = ASL_LEVEL_ALERT; - break; - } - - [client log:msg level:aslLevel]; -} - -@end // GTMLogASLWriter - - -@implementation GTMLoggerASLClient - -- (id)init { - if ((self = [super init])) { - client_ = asl_open(NULL, NULL, 0); - if (client_ == nil) { - // COV_NF_START - no real way to test this - [self release]; - return nil; - // COV_NF_END - } - } - return self; -} - -- (void)dealloc { - if (client_) asl_close(client_); - [super dealloc]; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - if (client_) asl_close(client_); - [super finalize]; -} -#endif - -// We don't test this one line because we don't want to pollute actual system -// logs with test messages. -// COV_NF_START -- (void)log:(NSString *)msg level:(int)level { - asl_log(client_, NULL, level, "%s", [msg UTF8String]); -} -// COV_NF_END - -@end // GTMLoggerASLClient diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASLTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASLTest.m deleted file mode 100644 index cd324843..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger+ASLTest.m +++ /dev/null @@ -1,90 +0,0 @@ -// -// GTMLogger+ASLTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger+ASL.h" -#import "GTMSenTestCase.h" - -@interface DummyASLClient : GTMLoggerASLClient -@end - -static NSMutableArray *gDummyLog; // weak - -@implementation DummyASLClient - -- (void)log:(NSString *)msg level:(int)level { - NSString *line = [msg stringByAppendingFormat:@"@%d", level]; - [gDummyLog addObject:line]; -} - -@end - - -@interface GTMLogger_ASLTest : GTMTestCase -@end - -@implementation GTMLogger_ASLTest - -- (void)testCreation { - GTMLogger *aslLogger = [GTMLogger standardLoggerWithASL]; - STAssertNotNil(aslLogger, nil); - - GTMLogASLWriter *writer = [GTMLogASLWriter aslWriter]; - STAssertNotNil(writer, nil); -} - -- (void)testLogWriter { - gDummyLog = [[[NSMutableArray alloc] init] autorelease]; - GTMLogASLWriter *writer = [[[GTMLogASLWriter alloc] - initWithClientClass:[DummyASLClient class]] - autorelease]; - - - STAssertNotNil(writer, nil); - STAssertTrue([gDummyLog count] == 0, nil); - - // Log some messages - [writer logMessage:@"unknown" level:kGTMLoggerLevelUnknown]; - [writer logMessage:@"debug" level:kGTMLoggerLevelDebug]; - [writer logMessage:@"info" level:kGTMLoggerLevelInfo]; - [writer logMessage:@"error" level:kGTMLoggerLevelError]; - [writer logMessage:@"assert" level:kGTMLoggerLevelAssert]; - - // Inspect the logged message to make sure they were logged correctly. The - // dummy writer will save the messages w/ @level concatenated. The "level" - // will be the ASL level, not the GTMLogger level. GTMLogASLWriter will log - // all - NSArray *expected = [NSArray arrayWithObjects: - @"unknown@5", - @"debug@5", - @"info@5", - @"error@3", - @"assert@1", - nil]; - - STAssertEqualObjects(gDummyLog, expected, nil); - - gDummyLog = nil; -} - -- (void)testASLClient { - GTMLoggerASLClient *client = [[GTMLoggerASLClient alloc] init]; - STAssertNotNil(client, nil); - [client release]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.h deleted file mode 100644 index 1626b1b6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.h +++ /dev/null @@ -1,458 +0,0 @@ -// -// GTMLogger.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Key Abstractions -// ---------------- -// -// This file declares multiple classes and protocols that are used by the -// GTMLogger logging system. The 4 main abstractions used in this file are the -// following: -// -// * logger (GTMLogger) - The main logging class that users interact with. It -// has methods for logging at different levels and uses a log writer, a log -// formatter, and a log filter to get the job done. -// -// * log writer (GTMLogWriter) - Writes a given string to some log file, where -// a "log file" can be a physical file on disk, a POST over HTTP to some URL, -// or even some in-memory structure (e.g., a ring buffer). -// -// * log formatter (GTMLogFormatter) - Given a format string and arguments as -// a va_list, returns a single formatted NSString. A "formatted string" could -// be a string with the date prepended, a string with values in a CSV format, -// or even a string of XML. -// -// * log filter (GTMLogFilter) - Given a formatted log message as an NSString -// and the level at which the message is to be logged, this class will decide -// whether the given message should be logged or not. This is a flexible way -// to filter out messages logged at a certain level, messages that contain -// certain text, or filter nothing out at all. This gives the caller the -// flexibility to dynamically enable debug logging in Release builds. -// -// This file also declares some classes to handle the common log writer, log -// formatter, and log filter cases. Callers can also create their own writers, -// formatters, and filters and they can even build them on top of the ones -// declared here. Keep in mind that your custom writer/formatter/filter may be -// called from multiple threads, so it must be thread-safe. - -#import - -// Predeclaration of used protocols that are declared later in this file. -@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -#define CHECK_FORMAT_NSSTRING(a, b) __attribute__((format(__NSString__, a, b))) -#else -#define CHECK_FORMAT_NSSTRING(a, b) -#endif - -// GTMLogger -// -// GTMLogger is the primary user-facing class for an object-oriented logging -// system. It is built on the concept of log formatters (GTMLogFormatter), log -// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is -// sent to a GTMLogger to log a message, the message is formatted using the log -// formatter, then the log filter is consulted to see if the message should be -// logged, and if so, the message is sent to the log writer to be written out. -// -// GTMLogger is intended to be a flexible and thread-safe logging solution. Its -// flexibility comes from the fact that GTMLogger instances can be customized -// with user defined formatters, filters, and writers. And these writers, -// filters, and formatters can be combined, stacked, and customized in arbitrary -// ways to suit the needs at hand. For example, multiple writers can be used at -// the same time, and a GTMLogger instance can even be used as another -// GTMLogger's writer. This allows for arbitrarily deep logging trees. -// -// A standard GTMLogger uses a writer that sends messages to standard out, a -// formatter that smacks a timestamp and a few other bits of interesting -// information on the message, and a filter that filters out debug messages from -// release builds. Using the standard log settings, a log message will look like -// the following: -// -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= -// -// The output contains the date and time of the log message, the name of the -// process followed by its process ID/thread ID, the log level at which the -// message was logged (in the previous example the level was 1: -// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in -// this case, the log message was @"foo=%@", foo). -// -// Multiple instances of GTMLogger can be created, each configured their own -// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide -// access to a shared (i.e., globally accessible) GTMLogger instance. This makes -// it convenient for all code in a process to use the same GTMLogger instance. -// The shared GTMLogger instance can also be configured in an arbitrary, and -// these configuration changes will affect all code that logs through the shared -// instance. - -// -// Log Levels -// ---------- -// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger -// doesn't take any special action based on the log level; it simply forwards -// this information on to formatters, filters, and writers, each of which may -// optionally take action based on the level. Since log level filtering is -// performed at runtime, log messages are typically not filtered out at compile -// time. The exception to this rule is that calls to the GTMLoggerDebug() macro -// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible -// with behavior that many developers are currently used to. Note that this -// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but -// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. -// -// Standard loggers are created with the GTMLogLevelFilter log filter, which -// filters out certain log messages based on log level, and some other settings. -// -// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on -// GTMLogger itself, there are also C macros that make usage of the shared -// GTMLogger instance very convenient. These macros are: -// -// GTMLoggerDebug(...) -// GTMLoggerInfo(...) -// GTMLoggerError(...) -// -// Again, a notable feature of these macros is that GTMLogDebug() calls *will be -// compiled out of non-DEBUG builds*. -// -// Standard Loggers -// ---------------- -// GTMLogger has the concept of "standard loggers". A standard logger is simply -// a logger that is pre-configured with some standard/common writer, formatter, -// and filter combination. Standard loggers are created using the creation -// methods beginning with "standard". The alternative to a standard logger is a -// regular logger, which will send messages to stdout, with no special -// formatting, and no filtering. -// -// How do I use GTMLogger? -// ---------------------- -// The typical way you will want to use GTMLogger is to simply use the -// GTMLogger*() macros for logging from code. That way we can easily make -// changes to the GTMLogger class and simply update the macros accordingly. Only -// your application startup code (perhaps, somewhere in main()) should use the -// GTMLogger class directly in order to configure the shared logger, which all -// of the code using the macros will be using. Again, this is just the typical -// situation. -// -// To be complete, there are cases where you may want to use GTMLogger directly, -// or even create separate GTMLogger instances for some reason. That's fine, -// too. -// -// Examples -// -------- -// The following show some common GTMLogger use cases. -// -// 1. You want to log something as simply as possible. Also, this call will only -// appear in debug builds. In non-DEBUG builds it will be completely removed. -// -// GTMLoggerDebug(@"foo = %@", foo); -// -// 2. The previous example is similar to the following. The major difference is -// that the previous call (example 1) will be compiled out of Release builds -// but this statement will not be compiled out. -// -// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; -// -// 3. Send all logging output from the shared logger to a file. We do this by -// creating an NSFileHandle for writing associated with a file, and setting -// that file handle as the logger's writer. -// -// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" -// create:YES]; -// [[GTMLogger sharedLogger] setWriter:f]; -// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log -// -// 4. Create a new GTMLogger that will log to a file. This example differs from -// the previous one because here we create a new GTMLogger that is different -// from the shared logger. -// -// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; -// [logger logInfo:@"hi temp log file"]; -// -// 5. Create a logger that writes to stdout and does NOT do any formatting to -// the log message. This might be useful, for example, when writing a help -// screen for a command-line tool to standard output. -// -// GTMLogger *logger = [GTMLogger logger]; -// [logger logInfo:@"%@ version 0.1 usage", progName]; -// -// 6. Send log output to stdout AND to a log file. The trick here is that -// NSArrays function as composite log writers, which means when an array is -// set as the log writer, it forwards all logging messages to all of its -// contained GTMLogWriters. -// -// // Create array of GTMLogWriters -// NSArray *writers = [NSArray arrayWithObjects: -// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], -// [NSFileHandle fileHandleWithStandardOutput], nil]; -// -// GTMLogger *logger = [GTMLogger standardLogger]; -// [logger setWriter:writers]; -// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log -// -// For futher details on log writers, formatters, and filters, see the -// documentation below. -// -// NOTE: GTMLogger is application level logging. By default it does nothing -// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose -// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro -// definitions in its prefix header (see GTMDefines.h for how one would do -// that). -// -@interface GTMLogger : NSObject { - @private - id writer_; - id formatter_; - id filter_; -} - -// -// Accessors for the shared logger instance -// - -// Returns a shared/global standard GTMLogger instance. Callers should typically -// use this method to get a GTMLogger instance, unless they explicitly want -// their own instance to configure for their own needs. This is the only method -// that returns a shared instance; all the rest return new GTMLogger instances. -+ (id)sharedLogger; - -// Sets the shared logger instance to |logger|. Future calls to +sharedLogger -// will return |logger| instead. -+ (void)setSharedLogger:(GTMLogger *)logger; - -// -// Creation methods -// - -// Returns a new autoreleased GTMLogger instance that will log to stdout, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLogger; - -// Same as +standardLogger, but logs to stderr. -+ (id)standardLoggerWithStderr; - -// Returns a new standard GTMLogger instance with a log writer that will -// write to the file at |path|, and will use the GTMLogStandardFormatter and -// GTMLogLevelFilter classes. If |path| does not exist, it will be created. -+ (id)standardLoggerWithPath:(NSString *)path; - -// Returns an autoreleased GTMLogger instance that will use the specified -// |writer|, |formatter|, and |filter|. -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// Returns an autoreleased GTMLogger instance that logs to stdout, with the -// basic formatter, and no filter. The returned logger differs from the logger -// returned by +standardLogger because this one does not do any filtering and -// does not do any special log formatting; this is the difference between a -// "regular" logger and a "standard" logger. -+ (id)logger; - -// Designated initializer. This method returns a GTMLogger initialized with the -// specified |writer|, |formatter|, and |filter|. See the setter methods below -// for what values will be used if nil is passed for a parameter. -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// -// Logging methods -// - -// Logs a message at the debug level (kGTMLoggerLevelDebug). -- (void)logDebug:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the info level (kGTMLoggerLevelInfo). -- (void)logInfo:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the error level (kGTMLoggerLevelError). -- (void)logError:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); -// Logs a message at the assert level (kGTMLoggerLevelAssert). -- (void)logAssert:(NSString *)fmt, ... CHECK_FORMAT_NSSTRING(1, 2); - - -// -// Accessors -// - -// Accessor methods for the log writer. If the log writer is set to nil, -// [NSFileHandle fileHandleWithStandardOutput] is used. -- (id)writer; -- (void)setWriter:(id)writer; - -// Accessor methods for the log formatter. If the log formatter is set to nil, -// GTMLogBasicFormatter is used. This formatter will format log messages in a -// plain printf style. -- (id)formatter; -- (void)setFormatter:(id)formatter; - -// Accessor methods for the log filter. If the log filter is set to nil, -// GTMLogNoFilter is used, which allows all log messages through. -- (id)filter; -- (void)setFilter:(id)filter; - -@end // GTMLogger - - -// Helper functions that are used by the convenience GTMLogger*() macros that -// enable the logging of function names. -@interface GTMLogger (GTMLoggerMacroHelpers) -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... - CHECK_FORMAT_NSSTRING(2, 3); -@end // GTMLoggerMacroHelpers - - -// Convenience macros that log to the shared GTMLogger instance. These macros -// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() -// calls will be compiled out of non-Debug builds. -#define GTMLoggerDebug(...) \ - [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] -#define GTMLoggerInfo(...) \ - [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] -#define GTMLoggerError(...) \ - [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] -#define GTMLoggerAssert(...) \ - [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] - -// If we're not in a debug build, remove the GTMLoggerDebug statements. This -// makes calls to GTMLoggerDebug "compile out" of Release builds -#ifndef DEBUG -#undef GTMLoggerDebug -#define GTMLoggerDebug(...) do {} while(0) -#endif - -// Log levels. -typedef enum { - kGTMLoggerLevelUnknown, - kGTMLoggerLevelDebug, - kGTMLoggerLevelInfo, - kGTMLoggerLevelError, - kGTMLoggerLevelAssert, -} GTMLoggerLevel; - - -// -// Log Writers -// - -// Protocol to be implemented by a GTMLogWriter instance. -@protocol GTMLogWriter -// Writes the given log message to where the log writer is configured to write. -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogWriter - - -// Simple category on NSFileHandle that makes NSFileHandles valid log writers. -// This is convenient because something like, say, +fileHandleWithStandardError -// now becomes a valid log writer. Log messages are written to the file handle -// with a newline appended. -@interface NSFileHandle (GTMFileHandleLogWriter) -// Opens the file at |path| in append mode, and creates the file with |mode| -// if it didn't previously exist. -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; -@end // NSFileHandle - - -// This category makes NSArray a GTMLogWriter that can be composed of other -// GTMLogWriters. This is the classic Composite GoF design pattern. When the -// GTMLogWriter -logMessage:level: message is sent to the array, the array -// forwards the message to all of its elements that implement the GTMLogWriter -// protocol. -// -// This is useful in situations where you would like to send log output to -// multiple log writers at the same time. Simply create an NSArray of the log -// writers you wish to use, then set the array as the "writer" for your -// GTMLogger instance. -@interface NSArray (GTMArrayCompositeLogWriter) -@end // GTMArrayCompositeLogWriter - - -// This category adapts the GTMLogger interface so that it can be used as a log -// writer; it's an "adapter" in the GoF Adapter pattern sense. -// -// This is useful when you want to configure a logger to log to a specific -// writer with a specific formatter and/or filter. But you want to also compose -// that with a different log writer that may have its own formatter and/or -// filter. -@interface GTMLogger (GTMLoggerLogWriter) -@end // GTMLoggerLogWriter - - -// -// Log Formatters -// - -// Protocol to be implemented by a GTMLogFormatter instance. -@protocol GTMLogFormatter -// Returns a formatted string using the format specified in |fmt| and the va -// args specified in |args|. -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level; -@end // GTMLogFormatter - - -// A basic log formatter that formats a string the same way that NSLog (or -// printf) would. It does not do anything fancy, nor does it add any data of its -// own. -@interface GTMLogBasicFormatter : NSObject -@end // GTMLogBasicFormatter - - -// A log formatter that formats the log string like the basic formatter, but -// also prepends a timestamp and some basic process info to the message, as -// shown in the following sample output. -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here -@interface GTMLogStandardFormatter : GTMLogBasicFormatter { - @private - NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS - NSString *pname_; - pid_t pid_; -} -@end // GTMLogStandardFormatter - - -// -// Log Filters -// - -// Protocol to be imlemented by a GTMLogFilter instance. -@protocol GTMLogFilter -// Returns YES if |msg| at |level| should be filtered out; NO otherwise. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogFilter - - -// A log filter that filters messages at the kGTMLoggerLevelDebug level out of -// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered -// out of non-debug builds unless GTMVerboseLogging is set in the environment or -// the processes's defaults. Messages at the kGTMLoggerLevelError level are -// never filtered. -@interface GTMLogLevelFilter : NSObject -@end // GTMLogLevelFilter - - -// A simple log filter that does NOT filter anything out; -// -filterAllowsMessage:level will always return YES. This can be a convenient -// way to enable debug-level logging in release builds (if you so desire). -@interface GTMLogNoFilter : NSObject -@end // GTMLogNoFilter - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.m deleted file mode 100644 index de941d2e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLogger.m +++ /dev/null @@ -1,445 +0,0 @@ -// -// GTMLogger.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger.h" -#import "GTMGarbageCollection.h" -#import -#import -#import -#import - - -// Define a trivial assertion macro to avoid dependencies -#ifdef DEBUG - #define GTMLOGGER_ASSERT(expr) assert(expr) -#else - #define GTMLOGGER_ASSERT(expr) -#endif - - -@interface GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level; - -@end - - -// Reference to the shared GTMLogger instance. This is not a singleton, it's -// just an easy reference to one shared instance. -static GTMLogger *gSharedLogger = nil; - - -@implementation GTMLogger - -// Returns a pointer to the shared logger instance. If none exists, a standard -// logger is created and returned. -+ (id)sharedLogger { - @synchronized(self) { - if (gSharedLogger == nil) { - gSharedLogger = [[self standardLogger] retain]; - } - GTMLOGGER_ASSERT(gSharedLogger != nil); - } - return [[gSharedLogger retain] autorelease]; -} - -+ (void)setSharedLogger:(GTMLogger *)logger { - @synchronized(self) { - [gSharedLogger autorelease]; - gSharedLogger = [logger retain]; - } -} - -+ (id)standardLogger { - id writer = [NSFileHandle fileHandleWithStandardOutput]; - id fr = [[[GTMLogStandardFormatter alloc] init] autorelease]; - id filter = [[[GTMLogLevelFilter alloc] init] autorelease]; - return [self loggerWithWriter:writer formatter:fr filter:filter]; -} - -+ (id)standardLoggerWithStderr { - id me = [self standardLogger]; - [me setWriter:[NSFileHandle fileHandleWithStandardError]]; - return me; -} - -+ (id)standardLoggerWithPath:(NSString *)path { - NSFileHandle *fh = [NSFileHandle fileHandleForLoggingAtPath:path mode:0644]; - if (fh == nil) return nil; - id me = [self standardLogger]; - [me setWriter:fh]; - return me; -} - -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - return [[[self alloc] initWithWriter:writer - formatter:formatter - filter:filter] autorelease]; -} - -+ (id)logger { - return [[[self alloc] init] autorelease]; -} - -- (id)init { - return [self initWithWriter:nil formatter:nil filter:nil]; -} - -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter { - if ((self = [super init])) { - [self setWriter:writer]; - [self setFormatter:formatter]; - [self setFilter:filter]; - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - GTMLOGGER_ASSERT(writer_ != nil); - } - return self; -} - -- (void)dealloc { - GTMLOGGER_ASSERT(writer_ != nil); - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - [writer_ release]; - [formatter_ release]; - [filter_ release]; - [super dealloc]; -} - -- (id)writer { - GTMLOGGER_ASSERT(writer_ != nil); - return [[writer_ retain] autorelease]; -} - -- (void)setWriter:(id)writer { - @synchronized(self) { - [writer_ autorelease]; - if (writer == nil) - writer_ = [[NSFileHandle fileHandleWithStandardOutput] retain]; - else - writer_ = [writer retain]; - } - GTMLOGGER_ASSERT(writer_ != nil); -} - -- (id)formatter { - GTMLOGGER_ASSERT(formatter_ != nil); - return [[formatter_ retain] autorelease]; -} - -- (void)setFormatter:(id)formatter { - @synchronized(self) { - [formatter_ autorelease]; - if (formatter == nil) - formatter_ = [[GTMLogBasicFormatter alloc] init]; - else - formatter_ = [formatter retain]; - } - GTMLOGGER_ASSERT(formatter_ != nil); -} - -- (id)filter { - GTMLOGGER_ASSERT(filter_ != nil); - return [[filter_ retain] autorelease]; -} - -- (void)setFilter:(id)filter { - @synchronized(self) { - [filter_ autorelease]; - if (filter == nil) - filter_ = [[GTMLogNoFilter alloc] init]; - else - filter_ = [filter retain]; - } - GTMLOGGER_ASSERT(filter_ != nil); -} - -- (void)logDebug:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logInfo:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logError:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logAssert:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:NULL format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLogger - - -@implementation GTMLogger (GTMLoggerMacroHelpers) - -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelDebug]; - va_end(args); -} - -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelInfo]; - va_end(args); -} - -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelError]; - va_end(args); -} - -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - [self logInternalFunc:func format:fmt valist:args level:kGTMLoggerLevelAssert]; - va_end(args); -} - -@end // GTMLoggerMacroHelpers - - -@implementation GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - GTMLOGGER_ASSERT(formatter_ != nil); - GTMLOGGER_ASSERT(filter_ != nil); - GTMLOGGER_ASSERT(writer_ != nil); - - NSString *fname = func ? [NSString stringWithUTF8String:func] : nil; - NSString *msg = [formatter_ stringForFunc:fname - withFormat:fmt - valist:args - level:level]; - if (msg && [filter_ filterAllowsMessage:msg level:level]) - [writer_ logMessage:msg level:level]; -} - -@end // PrivateMethods - - -@implementation NSFileHandle (GTMFileHandleLogWriter) - -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode { - int fd = -1; - if (path) { - int flags = O_WRONLY | O_APPEND | O_CREAT; - fd = open([path fileSystemRepresentation], flags, mode); - } - if (fd == -1) return nil; - return [[[self alloc] initWithFileDescriptor:fd - closeOnDealloc:YES] autorelease]; -} - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - NSString *line = [NSString stringWithFormat:@"%@\n", msg]; - [self writeData:[line dataUsingEncoding:NSUTF8StringEncoding]]; - } -} - -@end // GTMFileHandleLogWriter - - -@implementation NSArray (GTMArrayCompositeLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - @synchronized(self) { - id child = nil; - GTM_FOREACH_OBJECT(child, self) { - if ([child conformsToProtocol:@protocol(GTMLogWriter)]) - [child logMessage:msg level:level]; - } - } -} - -@end // GTMArrayCompositeLogWriter - - -@implementation GTMLogger (GTMLoggerLogWriter) - -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - switch (level) { - case kGTMLoggerLevelDebug: - [self logDebug:@"%@", msg]; - break; - case kGTMLoggerLevelInfo: - [self logInfo:@"%@", msg]; - break; - case kGTMLoggerLevelError: - [self logError:@"%@", msg]; - break; - case kGTMLoggerLevelAssert: - [self logAssert:@"%@", msg]; - break; - default: - // Ignore the message. - break; - } -} - -@end // GTMLoggerLogWriter - - -@implementation GTMLogBasicFormatter - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - // Performance note: since we always have to create a new NSString from the - // returned CFStringRef, we may want to do a quick check here to see if |fmt| - // contains a '%', and if not, simply return 'fmt'. - CFStringRef cfmsg = NULL; - cfmsg = CFStringCreateWithFormatAndArguments(kCFAllocatorDefault, - NULL, // format options - (CFStringRef)fmt, - args); - return GTMCFAutorelease(cfmsg); -} - -@end // GTMLogBasicFormatter - - -@implementation GTMLogStandardFormatter - -- (id)init { - if ((self = [super init])) { - dateFormatter_ = [[NSDateFormatter alloc] init]; - [dateFormatter_ setFormatterBehavior:NSDateFormatterBehavior10_4]; - [dateFormatter_ setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; - pname_ = [[[NSProcessInfo processInfo] processName] copy]; - pid_ = [[NSProcessInfo processInfo] processIdentifier]; - } - return self; -} - -- (void)dealloc { - [dateFormatter_ release]; - [pname_ release]; - [super dealloc]; -} - -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - GTMLOGGER_ASSERT(dateFormatter_ != nil); - NSString *tstamp = nil; - @synchronized (dateFormatter_) { - tstamp = [dateFormatter_ stringFromDate:[NSDate date]]; - } - return [NSString stringWithFormat:@"%@ %@[%d/%p] [lvl=%d] %@ %@", - tstamp, pname_, pid_, pthread_self(), - level, (func ? func : @"(no func)"), - [super stringForFunc:func withFormat:fmt valist:args level:level]]; -} - -@end // GTMLogStandardFormatter - - -@implementation GTMLogLevelFilter - -// Check the environment and the user preferences for the GTMVerboseLogging key -// to see if verbose logging has been enabled. The environment variable will -// override the defaults setting, so check the environment first. -// COV_NF_START -static BOOL IsVerboseLoggingEnabled(void) { - static NSString *const kVerboseLoggingKey = @"GTMVerboseLogging"; - static char *env = NULL; - if (env == NULL) - env = getenv([kVerboseLoggingKey UTF8String]); - - if (env && env[0]) { - return (strtol(env, NULL, 10) != 0); - } - - return [[NSUserDefaults standardUserDefaults] boolForKey:kVerboseLoggingKey]; -} -// COV_NF_END - -// In DEBUG builds, log everything. If we're not in a debug build we'll assume -// that we're in a Release build. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { -#if DEBUG - return YES; -#endif - - BOOL allow = YES; - - switch (level) { - case kGTMLoggerLevelDebug: - allow = NO; - break; - case kGTMLoggerLevelInfo: - allow = (IsVerboseLoggingEnabled() == YES); - break; - case kGTMLoggerLevelError: - allow = YES; - break; - case kGTMLoggerLevelAssert: - allow = YES; - break; - default: - allow = YES; - break; - } - - return allow; -} - -@end // GTMLogLevelFilter - - -@implementation GTMLogNoFilter - -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { - return YES; // Allow everything through -} - -@end // GTMLogNoFilter diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.h deleted file mode 100644 index 30e58ffa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// GTMLoggerRingBufferWriter.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger.h" -#import "GTMDefines.h" - -typedef struct GTMRingBufferPair GTMRingBufferPair; - -// GTMLoggerRingBufferWriter is a GTMLogWriter that accumulates logged Info -// and Debug messages (when they're not compiled out in a release build) -// into a ring buffer. If an Error or Assert message is -// logged, all of the previously logged messages (up to the size of the -// buffer) are then logged. At that point the buffer resets itself. -// -// How to use: -// -// * Create a logger writer that you want to use to do the ultimate writing, -// such as to stdErr, or a log file, or an NSArray that aggregates other -// writers. -// id someWriter = ... -// -// * Make a new ring buffer with this writer, along with the buffer's -// capacity (which must be >= 1): -// rbw = -// [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:32 -// writer:someWriter]; -// -// * Set your logger's writer to be the ring buffer writer: -// [[GTMLogger sharedLogger] setWriter:rbw]; -// -// Note that this writer is at the end of the GTMLogger food chain, where the -// default filter removes Info messages in Release mode (Debug messages are -// compiled out). You can pass nil to GTMLogger's -setFilter to have it pass -// along all the messages. -// -@interface GTMLoggerRingBufferWriter : NSObject { - @private - id writer_; - GTMRingBufferPair *buffer_; - NSUInteger capacity_; - NSUInteger nextIndex_; // Index of the next element of |buffer_| to fill. - NSUInteger totalLogged_; // This > 0 and |nextIndex_| == 0 means we've wrapped. -} - -// Returns an autoreleased ring buffer writer. If |writer| is nil, -// then nil is returned. -+ (id)ringBufferWriterWithCapacity:(NSUInteger)capacity - writer:(id)loggerWriter; - -// Designated initializer. If |writer| is nil, then nil is returned. -// If you just use -init, nil will be returned. -- (id)initWithCapacity:(NSUInteger)capacity - writer:(id)loggerWriter; - -// How many messages will be logged before older messages get dropped -// on the floor. -- (NSUInteger)capacity; - -// The log writer that will get the buffered log messages if/when they -// need to be displayed. -- (id)writer; - -// How many log messages are currently in the buffer. -- (NSUInteger)count; - -// How many have been dropped on the floor since creation, or the last -// reset. -- (NSUInteger)droppedLogCount; - -// The total number of messages processed since creation, or the last -// reset. -- (NSUInteger)totalLogged; - -// Purge the contents and reset the counters. -- (void)reset; - -// Print out the contents without resetting anything. -// Contents are automatically printed and reset when an error-level -// message comes through. -- (void)dumpContents; - -@end // GTMLoggerRingBufferWriter diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.m deleted file mode 100644 index 4a8c7c6e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.m +++ /dev/null @@ -1,248 +0,0 @@ -// -// GTMLoggerRingBufferWriter.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLoggerRingBufferWriter.h" - -// Holds a message and a level. -struct GTMRingBufferPair { - // Explicitly using CFStringRef instead of NSString because in a GC world, the - // NSString will be collected because there is no way for the GC to know that - // there is a strong reference to the NSString in this data structure. By - // using a CFStringRef we can CFRetain it, and avoid the problem. - CFStringRef logMessage_; - GTMLoggerLevel level_; -}; - - -// There are two operations that involve iterating over the buffer -// contents and doing Something to them. This is a callback function -// that is called for every pair living in the buffer. -typedef void (GTMRingBufferPairCallback)(GTMLoggerRingBufferWriter *rbw, - GTMRingBufferPair *pair); - - -@interface GTMLoggerRingBufferWriter (PrivateMethods) - -// Add the message and level to the ring buffer. -- (void)addMessage:(NSString *)message level:(GTMLoggerLevel)level; - -// Walk the buffer invoking the callback. -- (void)iterateBufferWithCallback:(GTMRingBufferPairCallback)callback; - -@end // PrivateMethods - - -@implementation GTMLoggerRingBufferWriter - -+ (id)ringBufferWriterWithCapacity:(NSUInteger)capacity - writer:(id)writer { - GTMLoggerRingBufferWriter *rbw = - [[[self alloc] initWithCapacity:capacity - writer:writer] autorelease]; - return rbw; - -} // ringBufferWriterWithCapacity - - -- (id)initWithCapacity:(NSUInteger)capacity - writer:(id)writer { - if ((self = [super init])) { - writer_ = [writer retain]; - capacity_ = capacity; - - buffer_ = (GTMRingBufferPair *)calloc(capacity_, sizeof(GTMRingBufferPair)); - - nextIndex_ = 0; - - if (capacity_ == 0 || !buffer_ || !writer_) { - [self release]; - self = nil; - } - } - return self; - -} // initWithCapacity - - -- (id)init { - return [self initWithCapacity:0 writer:nil]; -} // init - - -- (void)dealloc { - [self reset]; - - [writer_ release]; - if (buffer_) { - free(buffer_); - } - - [super dealloc]; - -} // dealloc - - -- (NSUInteger)capacity { - return capacity_; -} // capacity - - -- (id)writer { - return writer_; -} // writer - - -- (NSUInteger)count { - NSUInteger count = 0; - @synchronized(self) { - if ((nextIndex_ == 0 && totalLogged_ > 0) - || totalLogged_ >= capacity_) { - // We've wrapped around - count = capacity_; - } else { - count = nextIndex_; - } - } - - return count; - -} // count - - -- (NSUInteger)droppedLogCount { - NSUInteger droppedCount = 0; - - @synchronized(self) { - if (capacity_ > totalLogged_) { - droppedCount = 0; - } else { - droppedCount = totalLogged_ - capacity_; - } - } - - return droppedCount; - -} // droppedLogCount - - -- (NSUInteger)totalLogged { - return totalLogged_; -} // totalLogged - - -// Assumes caller will do any necessary synchronization. -// This walks over the buffer, taking into account any wrap-around, -// and calls the callback on each pair. -- (void)iterateBufferWithCallback:(GTMRingBufferPairCallback)callback { - GTMRingBufferPair *scan, *stop; - - // If we've wrapped around, print out the ring buffer from |nextIndex_| - // to the end. - if (totalLogged_ >= capacity_) { - scan = buffer_ + nextIndex_; - stop = buffer_ + capacity_; - while (scan < stop) { - callback(self, scan); - ++scan; - } - } - - // And then print from the beginning to right before |nextIndex_| - scan = buffer_; - stop = buffer_ + nextIndex_; - while (scan < stop) { - callback(self, scan); - ++scan; - } - -} // iterateBufferWithCallback - - -// Used when resetting the buffer. This frees the string and zeros out -// the structure. -static void ResetCallback(GTMLoggerRingBufferWriter *rbw, - GTMRingBufferPair *pair) { - if (pair->logMessage_) { - CFRelease(pair->logMessage_); - } - pair->logMessage_ = nil; - pair->level_ = kGTMLoggerLevelUnknown; -} // ResetCallback - - -// Reset the contents. -- (void)reset { - @synchronized(self) { - [self iterateBufferWithCallback:ResetCallback]; - nextIndex_ = 0; - totalLogged_ = 0; - } - -} // reset - - -// Go ahead and log the stored backlog, writing it through the -// ring buffer's |writer_|. -static void PrintContentsCallback(GTMLoggerRingBufferWriter *rbw, - GTMRingBufferPair *pair) { - [[rbw writer] logMessage:(NSString*)pair->logMessage_ level:pair->level_]; -} // PrintContentsCallback - - -- (void)dumpContents { - @synchronized(self) { - [self iterateBufferWithCallback:PrintContentsCallback]; - } -} // printContents - - -// Assumes caller will do any necessary synchronization. -- (void)addMessage:(NSString *)message level:(GTMLoggerLevel)level { - NSUInteger newIndex = nextIndex_; - nextIndex_ = (nextIndex_ + 1) % capacity_; - - ++totalLogged_; - - // Now store the goodies. - GTMRingBufferPair *pair = buffer_ + newIndex; - if (pair->logMessage_) { - CFRelease(pair->logMessage_); - pair->logMessage_ = nil; - } - if (message) { - pair->logMessage_ = CFStringCreateCopy(kCFAllocatorDefault, (CFStringRef)message); - } - pair->level_ = level; - -} // addMessage - - -// From the GTMLogWriter protocol. -- (void)logMessage:(NSString *)message level:(GTMLoggerLevel)level { - @synchronized(self) { - [self addMessage:(NSString*)message level:level]; - - if (level >= kGTMLoggerLevelError) { - [self dumpContents]; - [self reset]; - } - } - -} // logMessage - -@end // GTMLoggerRingBufferWriter diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriterTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriterTest.m deleted file mode 100644 index 1c5d72b1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriterTest.m +++ /dev/null @@ -1,363 +0,0 @@ -// -// GTMLoggerRingBufferWriterTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMLoggerRingBufferWriter.h" -#import "GTMLogger.h" -#import "GTMUnitTestDevLog.h" - -// -------------------------------------------------- -// CountingWriter keeps a count of the number of times it has been -// told to write something, and also keeps track of what it was -// asked to log. - -@interface CountingWriter : NSObject { - @private - NSMutableArray *loggedContents_; -} - -- (NSUInteger)count; -- (NSArray *)loggedContents; -- (void)reset; - -@end // CountingWriter - -@implementation CountingWriter -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - if (!loggedContents_) { - loggedContents_ = [[NSMutableArray alloc] init]; - } - [loggedContents_ addObject:msg]; -} // logMessage - -- (void)dealloc { - [loggedContents_ release]; - [super dealloc]; -} // dealloc - -- (void)reset { - [loggedContents_ release]; - loggedContents_ = nil; -} // reset - -- (NSUInteger)count { - return [loggedContents_ count]; -} // count - -- (NSArray *)loggedContents { - return loggedContents_; -} // loggedContents - -@end // CountingWriter - - -@interface GTMLoggerRingBufferWriterTest : GTMTestCase { - @private - GTMLogger *logger_; - CountingWriter *countingWriter_; -} -@end // GTMLoggerRingBufferWriterTest - - -// -------------------------------------------------- - -@implementation GTMLoggerRingBufferWriterTest - -// Utilty to compare the set of messages captured by a CountingWriter -// with an array of expected messages. The messages are expected to -// be in the same order in both places. - -- (void)compareWriter:(CountingWriter *)writer - withExpectedLogging:(NSArray *)expected - line:(int)line { - NSArray *loggedContents = [writer loggedContents]; - - STAssertEquals([expected count], [loggedContents count], - @"count mismatch from line %d", line); - - for (unsigned int i = 0; i < [expected count]; i++) { - STAssertEqualObjects([expected objectAtIndex:i], - [loggedContents objectAtIndex:i], - @"logging mistmatch at index %d from line %d", - i, line); - } - -} // compareWithExpectedLogging - - -- (void)setUp { - countingWriter_ = [[CountingWriter alloc] init]; - logger_ = [[GTMLogger alloc] init]; -} // setUp - - -- (void)tearDown { - [countingWriter_ release]; - [logger_ release]; -} // tearDown - - -- (void)testCreation { - - // Make sure initializers work. - GTMLoggerRingBufferWriter *writer = - [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:32 - writer:countingWriter_]; - STAssertEquals([writer capacity], (NSUInteger)32, nil); - STAssertTrue([writer writer] == countingWriter_, nil); - STAssertEquals([writer count], (NSUInteger)0, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([writer totalLogged], (NSUInteger)0, nil); - - // Try with invalid arguments. Should always get nil back. - writer = - [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:0 - writer:countingWriter_]; - STAssertNil(writer, nil); - - writer = [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:32 - writer:nil]; - STAssertNil(writer, nil); - - writer = [[GTMLoggerRingBufferWriter alloc] init]; - STAssertNil(writer, nil); - -} // testCreation - - -- (void)testLogging { - GTMLoggerRingBufferWriter *writer = - [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:4 - writer:countingWriter_]; - [logger_ setWriter:writer]; - - // Shouldn't do anything if there are no contents. - [writer dumpContents]; - STAssertEquals([writer count], (NSUInteger)0, nil); - STAssertEquals([countingWriter_ count], (NSUInteger)0, nil); - - // Log a single item. Make sure the counts are accurate. - [logger_ logDebug:@"oop"]; - STAssertEquals([writer count], (NSUInteger)1, nil); - STAssertEquals([writer totalLogged], (NSUInteger)1, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([countingWriter_ count], (NSUInteger)0, nil); - - // Log a second item. Also make sure counts are accurate. - [logger_ logDebug:@"ack"]; - STAssertEquals([writer count], (NSUInteger)2, nil); - STAssertEquals([writer totalLogged], (NSUInteger)2, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([countingWriter_ count], (NSUInteger)0, nil); - - // Print them, and make sure the countingWriter sees the right stuff. - [writer dumpContents]; - STAssertEquals([countingWriter_ count], (NSUInteger)2, nil); - STAssertEquals([writer count], (NSUInteger)2, nil); // Should not be zeroed. - STAssertEquals([writer totalLogged], (NSUInteger)2, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"oop",@"ack", nil] - line:__LINE__]; - - - // Wipe the slates clean. - [writer reset]; - [countingWriter_ reset]; - STAssertEquals([writer count], (NSUInteger)0, nil); - STAssertEquals([writer totalLogged], (NSUInteger)0, nil); - - // An error log level should print the buffer and empty it. - [logger_ logDebug:@"oop"]; - [logger_ logInfo:@"ack"]; - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([writer totalLogged], (NSUInteger)2, nil); - - [logger_ logError:@"blargh"]; - STAssertEquals([countingWriter_ count], (NSUInteger)3, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"oop", @"ack", - @"blargh", nil] - line:__LINE__]; - - - // An assert log level should do the same. This also fills the - // buffer to its limit without wrapping. - [countingWriter_ reset]; - [logger_ logDebug:@"oop"]; - [logger_ logInfo:@"ack"]; - [logger_ logDebug:@"blargh"]; - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([writer count], (NSUInteger)3, nil); - STAssertEquals([writer totalLogged], (NSUInteger)3, nil); - - [logger_ logAssert:@"ouch"]; - STAssertEquals([countingWriter_ count], (NSUInteger)4, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"oop", @"ack", - @"blargh", @"ouch", nil] - line:__LINE__]; - - - // Try with exactly one wrap around. - [countingWriter_ reset]; - [logger_ logInfo:@"ack"]; - [logger_ logDebug:@"oop"]; - [logger_ logDebug:@"blargh"]; - [logger_ logDebug:@"flong"]; // Fills buffer - STAssertEquals([writer droppedLogCount], (NSUInteger)0, nil); - STAssertEquals([writer count], (NSUInteger)4, nil); - - [logger_ logAssert:@"ouch"]; // should drop "ack" - STAssertEquals([countingWriter_ count], (NSUInteger)4, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"oop", @"blargh", - @"flong", @"ouch", nil] - line:__LINE__]; - - - // Try with more than one wrap around. - [countingWriter_ reset]; - [logger_ logInfo:@"ack"]; - [logger_ logDebug:@"oop"]; - [logger_ logDebug:@"blargh"]; - [logger_ logDebug:@"flong"]; // Fills buffer - [logger_ logDebug:@"bloogie"]; // should drop "ack" - STAssertEquals([writer droppedLogCount], (NSUInteger)1, nil); - STAssertEquals([writer count], (NSUInteger)4, nil); - - [logger_ logAssert:@"ouch"]; // should drop "oop" - STAssertEquals([countingWriter_ count], (NSUInteger)4, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"blargh", - @"flong", @"bloogie", @"ouch", nil] - line:__LINE__]; -} // testBasics - - -- (void)testCornerCases { - // make sure we work with small buffer sizes. - - GTMLoggerRingBufferWriter *writer = - [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:1 - writer:countingWriter_]; - [logger_ setWriter:writer]; - - [logger_ logInfo:@"ack"]; - STAssertEquals([countingWriter_ count], (NSUInteger)0, nil); - STAssertEquals([writer count], (NSUInteger)1, nil); - [writer dumpContents]; - STAssertEquals([countingWriter_ count], (NSUInteger)1, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"ack", nil] - line:__LINE__]; - - [logger_ logDebug:@"oop"]; // should drop "ack" - STAssertEquals([writer count], (NSUInteger)1, nil); - STAssertEquals([writer droppedLogCount], (NSUInteger)1, nil); - - [countingWriter_ reset]; - [logger_ logError:@"snoogy"]; // should drop "oop" - STAssertEquals([countingWriter_ count], (NSUInteger)1, nil); - - [self compareWriter:countingWriter_ - withExpectedLogging:[NSArray arrayWithObjects:@"snoogy", nil] - line:__LINE__]; - -} // testCornerCases - - - -// Run 10 threads, all logging through the same logger. - -static volatile NSUInteger gStoppedThreads = 0; // Total number that have stopped. - -- (void)bangMe:(id)info { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - GTMLogger *logger = (GTMLogger *)info; - - // Log a string. - for (int i = 0; i < 27; i++) { - [logger logDebug:@"oop"]; - } - - // log another string which should push the first string out. - // if we see any "oop"s in the logger output, then we know it got - // confused. - for (int i = 0; i < 15; i++) { - [logger logDebug:@"ack"]; - } - - [pool release]; - @synchronized ([self class]) { - gStoppedThreads++; - } - -} // bangMe - - -- (void)testThreading { - const NSUInteger kThreadCount = 10; - const NSUInteger kCapacity = 10; - - GTMLoggerRingBufferWriter *writer = - [GTMLoggerRingBufferWriter ringBufferWriterWithCapacity:kCapacity - writer:countingWriter_]; - [logger_ setWriter:writer]; - - for (NSUInteger i = 0; i < kThreadCount; i++) { - [NSThread detachNewThreadSelector:@selector(bangMe:) - toTarget:self - withObject:logger_]; - } - - // The threads are running, so wait for them all to finish. - while (1) { - NSDate *quick = [NSDate dateWithTimeIntervalSinceNow:0.2]; - [[NSRunLoop currentRunLoop] runUntilDate:quick]; - @synchronized ([self class]) { - if (gStoppedThreads == kThreadCount) break; - } - } - - // Now make sure we get back what's expected. - STAssertEquals([writer count], kThreadCount, nil); - STAssertEquals([countingWriter_ count], (NSUInteger)0, nil); // Nothing should be logged - STAssertEquals([writer totalLogged], (NSUInteger)420, nil); - - [logger_ logError:@"bork"]; - STAssertEquals([countingWriter_ count], kCapacity, nil); - - NSArray *expected = [NSArray arrayWithObjects: - @"ack", @"ack", @"ack", @"ack", @"ack", - @"ack", @"ack", @"ack", @"ack", @"bork", - nil]; - [self compareWriter:countingWriter_ - withExpectedLogging:expected - line:__LINE__]; - -} // testThreading - -@end // GTMLoggerRingBufferWriterTest diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerTest.m deleted file mode 100644 index 86ced5ef..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMLoggerTest.m +++ /dev/null @@ -1,451 +0,0 @@ -// -// GTMLoggerTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMLogger.h" -#import "GTMRegex.h" -#import "GTMSenTestCase.h" - - -// A test writer that stores log messages in an array for easy retrieval. -@interface ArrayWriter : NSObject { - @private - NSMutableArray *messages_; -} -- (NSArray *)messages; -- (void)clear; -@end -@implementation ArrayWriter -- (id)init { - if ((self = [super init])) { - messages_ = [[NSMutableArray alloc] init]; - } - return self; -} -- (void)dealloc { - [messages_ release]; - [super dealloc]; -} -- (NSArray *)messages { - return messages_; -} -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level { - [messages_ addObject:msg]; -} -- (void)clear { - [messages_ removeAllObjects]; -} -@end // ArrayWriter - - -// A formatter for testing that prepends the word DUMB to log messages, along -// with the log level number. -@interface DumbFormatter : GTMLogBasicFormatter -@end -@implementation DumbFormatter -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level { - return [NSString stringWithFormat:@"DUMB [%d] %@", level, - [super stringForFunc:nil withFormat:fmt valist:args level:level]]; -} -@end // DumbFormatter - - -// A test filter that ignores messages with the string "ignore". -@interface IgnoreFilter : NSObject -@end -@implementation IgnoreFilter -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level { - NSRange range = [msg rangeOfString:@"ignore"]; - return (range.location == NSNotFound); -} -@end // IgnoreFilter - -// -// Begin test harness -// - -@interface GTMLoggerTest : GTMTestCase { - @private - NSString *path_; -} -@end - -@implementation GTMLoggerTest - -- (void)setUp { - path_ = [[NSTemporaryDirectory() stringByAppendingPathComponent: - @"GTMLoggerUnitTest.log"] retain]; - STAssertNotNil(path_, nil); - // Make sure we're cleaned up from the last run -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - [[NSFileManager defaultManager] removeFileAtPath:path_ handler:nil]; -#else - [[NSFileManager defaultManager] removeItemAtPath:path_ error:NULL]; -#endif -} - -- (void)tearDown { - STAssertNotNil(path_, nil); -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - [[NSFileManager defaultManager] removeFileAtPath:path_ handler:nil]; -#else - [[NSFileManager defaultManager] removeItemAtPath:path_ error:NULL]; -#endif - [path_ release]; - path_ = nil; -} - -- (void)testCreation { - GTMLogger *logger1 = nil, *logger2 = nil; - - logger1 = [GTMLogger sharedLogger]; - logger2 = [GTMLogger sharedLogger]; - - STAssertTrue(logger1 == logger2, nil); - - STAssertNotNil([logger1 writer], nil); - STAssertNotNil([logger1 formatter], nil); - STAssertNotNil([logger1 filter], nil); - - // Get a new instance; not the shared instance - logger2 = [GTMLogger standardLogger]; - - STAssertTrue(logger1 != logger2, nil); - STAssertNotNil([logger2 writer], nil); - STAssertNotNil([logger2 formatter], nil); - STAssertNotNil([logger2 filter], nil); - - // Set the new instance to be the shared logger. - [GTMLogger setSharedLogger:logger2]; - STAssertTrue(logger2 == [GTMLogger sharedLogger], nil); - STAssertTrue(logger1 != [GTMLogger sharedLogger], nil); - - // Set the shared logger to nil, which should reset it to a new "standard" - // logger. - [GTMLogger setSharedLogger:nil]; - STAssertNotNil([GTMLogger sharedLogger], nil); - STAssertTrue(logger2 != [GTMLogger sharedLogger], nil); - STAssertTrue(logger1 != [GTMLogger sharedLogger], nil); - - GTMLogger *logger = [GTMLogger logger]; - STAssertNotNil(logger, nil); - - logger = [GTMLogger standardLoggerWithStderr]; - STAssertNotNil(logger, nil); - - logger = [GTMLogger standardLoggerWithPath:path_]; - STAssertNotNil(logger, nil); -} - -- (void)testAccessors { - GTMLogger *logger = [GTMLogger standardLogger]; - STAssertNotNil(logger, nil); - - STAssertNotNil([logger writer], nil); - STAssertNotNil([logger formatter], nil); - STAssertNotNil([logger filter], nil); - - [logger setWriter:nil]; - [logger setFormatter:nil]; - [logger setFilter:nil]; - - // These attributes should NOT be nil. They should be set to their defaults. - STAssertNotNil([logger writer], nil); - STAssertNotNil([logger formatter], nil); - STAssertNotNil([logger filter], nil); -} - -- (void)testLogger { - ArrayWriter *writer = [[[ArrayWriter alloc] init] autorelease]; - IgnoreFilter *filter = [[[IgnoreFilter alloc] init] autorelease]; - - // We actually only need the array writer instance for this unit test to pass, - // but we combine that writer with a stdout writer for two reasons: - // - // 1. To test the NSArray composite writer object - // 2. To make debugging easier by sending output to stdout - // - // We also include in the array an object that is not a GTMLogWriter to make - // sure that we don't crash when presented with an array of non-GTMLogWriters. - NSArray *writers = [NSArray arrayWithObjects:writer, - [NSFileHandle fileHandleWithStandardOutput], - @"blah", nil]; - - GTMLogger *logger = [GTMLogger loggerWithWriter:writers - formatter:nil // basic formatter - filter:filter]; - - STAssertNotNil(logger, nil); - - // Log a few messages to test with - [logger logInfo:@"hi"]; - [logger logDebug:@"foo"]; - [logger logError:@"blah"]; - [logger logAssert:@"baz"]; - - // Makes sure the messages got logged - NSArray *messages = [writer messages]; - STAssertNotNil(messages, nil); - STAssertEquals([messages count], (NSUInteger)4, nil); - STAssertEqualObjects([messages objectAtIndex:0], @"hi", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"foo", nil); - STAssertEqualObjects([messages objectAtIndex:2], @"blah", nil); - STAssertEqualObjects([messages objectAtIndex:3], @"baz", nil); - - // Log a message that should be ignored, and make sure it did NOT get logged - [logger logInfo:@"please ignore this"]; - messages = [writer messages]; - STAssertNotNil(messages, nil); - STAssertEquals([messages count], (NSUInteger)4, nil); - STAssertEqualObjects([messages objectAtIndex:0], @"hi", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"foo", nil); - STAssertEqualObjects([messages objectAtIndex:2], @"blah", nil); - STAssertEqualObjects([messages objectAtIndex:3], @"baz", nil); - - // Change the formatter to our "dumb formatter" - id formatter = [[[DumbFormatter alloc] init] autorelease]; - [logger setFormatter:formatter]; - - [logger logInfo:@"bleh"]; - messages = [writer messages]; - STAssertNotNil(messages, nil); - STAssertEquals([messages count], (NSUInteger)5, nil); // Message count should increase - // The previously logged messages should not change - STAssertEqualObjects([messages objectAtIndex:0], @"hi", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"foo", nil); - STAssertEqualObjects([messages objectAtIndex:2], @"blah", nil); - STAssertEqualObjects([messages objectAtIndex:3], @"baz", nil); - STAssertEqualObjects([messages objectAtIndex:4], @"DUMB [2] bleh", nil); -} - -- (void)testConvenienceMacros { - ArrayWriter *writer = [[[ArrayWriter alloc] init] autorelease]; - NSArray *writers = [NSArray arrayWithObjects:writer, - [NSFileHandle fileHandleWithStandardOutput], nil]; - - [[GTMLogger sharedLogger] setWriter:writers]; - - // Here we log a message using a convenience macro, which should log the - // message along with the name of the function it was called from. Here we - // test to make sure the logged message does indeed contain the name of the - // current function "testConvenienceMacros". - GTMLoggerError(@"test ========================"); - STAssertEquals([[writer messages] count], (NSUInteger)1, nil); - NSRange rangeOfFuncName = - [[[writer messages] objectAtIndex:0] rangeOfString:@"testConvenienceMacros"]; - STAssertTrue(rangeOfFuncName.location != NSNotFound, nil); - [writer clear]; - - [[GTMLogger sharedLogger] setFormatter:nil]; - - GTMLoggerInfo(@"test %d", 1); - GTMLoggerDebug(@"test %d", 2); - GTMLoggerError(@"test %d", 3); - GTMLoggerAssert(@"test %d", 4); - - NSArray *messages = [writer messages]; - STAssertNotNil(messages, nil); - -#ifdef DEBUG - STAssertEquals([messages count], (NSUInteger)4, nil); - STAssertEqualObjects([messages objectAtIndex:0], @"test 1", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"test 2", nil); - STAssertEqualObjects([messages objectAtIndex:2], @"test 3", nil); - STAssertEqualObjects([messages objectAtIndex:3], @"test 4", nil); -#else - // In Release builds, only the Error and Assert messages will be logged - STAssertEquals([messages count], (NSUInteger)2, nil); - STAssertEqualObjects([messages objectAtIndex:0], @"test 3", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"test 4", nil); -#endif - -} - -- (void)testFileHandleWriter { - NSFileHandle *fh = nil; - - fh = [NSFileHandle fileHandleForWritingAtPath:path_]; - STAssertNil(fh, nil); - - fh = [NSFileHandle fileHandleForLoggingAtPath:path_ mode:0644]; - STAssertNotNil(fh, nil); - - [fh logMessage:@"test 0" level:kGTMLoggerLevelUnknown]; - [fh logMessage:@"test 1" level:kGTMLoggerLevelDebug]; - [fh logMessage:@"test 2" level:kGTMLoggerLevelInfo]; - [fh logMessage:@"test 3" level:kGTMLoggerLevelError]; - [fh logMessage:@"test 4" level:kGTMLoggerLevelAssert]; - [fh closeFile]; - - NSString *contents = [NSString stringWithContentsOfFile:path_]; - - STAssertEqualObjects(@"test 0\ntest 1\ntest 2\ntest 3\ntest 4\n", contents, nil); -} - -- (void)testLoggerAdapterWriter { - ArrayWriter *writer = [[[ArrayWriter alloc] init] autorelease]; - STAssertNotNil(writer, nil); - - GTMLogger *sublogger = [GTMLogger loggerWithWriter:writer - formatter:nil - filter:nil]; - STAssertNotNil(sublogger, nil); - - GTMLogger *logger = [GTMLogger loggerWithWriter:sublogger - formatter:nil - filter:nil]; - - STAssertNotNil(logger, nil); - - // Log a few messages to test with - [logger logInfo:@"hi"]; - [logger logDebug:@"foo"]; - [logger logError:@"blah"]; - [logger logAssert:@"assert"]; - - // Makes sure the messages got logged - NSArray *messages = [writer messages]; - STAssertNotNil(messages, nil); - STAssertEquals([messages count], (NSUInteger)4, nil); - STAssertEqualObjects([messages objectAtIndex:0], @"hi", nil); - STAssertEqualObjects([messages objectAtIndex:1], @"foo", nil); - STAssertEqualObjects([messages objectAtIndex:2], @"blah", nil); - STAssertEqualObjects([messages objectAtIndex:3], @"assert", nil); -} - -// Helper method to help testing GTMLogFormatters -- (NSString *)stringFromFormatter:(id)formatter - level:(GTMLoggerLevel)level - format:(NSString *)fmt, ... { - va_list args; - va_start(args, fmt); - NSString *msg = [formatter stringForFunc:nil - withFormat:fmt - valist:args - level:level]; - va_end(args); - return msg; -} - -- (void)testBasicFormatter { - id fmtr = [[[GTMLogBasicFormatter alloc] init] autorelease]; - STAssertNotNil(fmtr, nil); - NSString *msg = nil; - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@"test"]; - STAssertEqualObjects(msg, @"test", nil); - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@"test %d", 1]; - STAssertEqualObjects(msg, @"test 1", nil); - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@"test %@", @"foo"]; - STAssertEqualObjects(msg, @"test foo", nil); - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@""]; - STAssertEqualObjects(msg, @"", nil); - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@" ", 1]; - STAssertEqualObjects(msg, @" ", nil); -} - -- (void)testStandardFormatter { - id fmtr = [[[GTMLogStandardFormatter alloc] init] autorelease]; - STAssertNotNil(fmtr, nil); - - // E.g. 2008-01-04 09:16:26.906 otest[5567/0xa07d0f60] [lvl=1] (no func) test - NSString * kFormatBasePattern = - @"[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3} ((otest)|(GTMiPhoneTest))\\[[0-9]+/0x[0-9a-f]+\\] \\[lvl=[0-3]\\] \\(no func\\) "; - NSString *msg = nil; - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelDebug - format:@"test"]; - STAssertTrue([msg gtm_matchesPattern:[kFormatBasePattern stringByAppendingString:@"test"]], nil); - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelError - format:@"test %d", 1]; - STAssertTrue([msg gtm_matchesPattern:[kFormatBasePattern stringByAppendingString:@"test 1"]], nil); - - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelInfo - format:@"test %@", @"hi"]; - STAssertTrue([msg gtm_matchesPattern:[kFormatBasePattern stringByAppendingString:@"test hi"]], nil); - - - msg = [self stringFromFormatter:fmtr - level:kGTMLoggerLevelUnknown - format:@"test"]; - STAssertTrue([msg gtm_matchesPattern:[kFormatBasePattern stringByAppendingString:@"test"]], nil); -} - -- (void)testNoFilter { - id filter = [[[GTMLogNoFilter alloc] init] autorelease]; - STAssertNotNil(filter, nil); - - STAssertTrue([filter filterAllowsMessage:@"hi" level:kGTMLoggerLevelUnknown], nil); - STAssertTrue([filter filterAllowsMessage:@"hi" level:kGTMLoggerLevelDebug], nil); - STAssertTrue([filter filterAllowsMessage:@"hi" level:kGTMLoggerLevelInfo], nil); - STAssertTrue([filter filterAllowsMessage:@"hi" level:kGTMLoggerLevelError], nil); - STAssertTrue([filter filterAllowsMessage:@"hi" level:kGTMLoggerLevelAssert], nil); - STAssertTrue([filter filterAllowsMessage:@"" level:kGTMLoggerLevelDebug], nil); - STAssertTrue([filter filterAllowsMessage:nil level:kGTMLoggerLevelDebug], nil); -} - -- (void)testFileHandleCreation { - NSFileHandle *fh = nil; - - fh = [NSFileHandle fileHandleForLoggingAtPath:nil mode:0644]; - STAssertNil(fh, nil); - - fh = [NSFileHandle fileHandleForLoggingAtPath:path_ mode:0644]; - STAssertNotNil(fh, nil); - - [fh logMessage:@"test 1" level:kGTMLoggerLevelInfo]; - [fh logMessage:@"test 2" level:kGTMLoggerLevelInfo]; - [fh logMessage:@"test 3" level:kGTMLoggerLevelInfo]; - [fh closeFile]; - - // Re-open file and make sure our log messages get appended - fh = [NSFileHandle fileHandleForLoggingAtPath:path_ mode:0644]; - STAssertNotNil(fh, nil); - - [fh logMessage:@"test 4" level:kGTMLoggerLevelInfo]; - [fh logMessage:@"test 5" level:kGTMLoggerLevelInfo]; - [fh logMessage:@"test 6" level:kGTMLoggerLevelInfo]; - [fh closeFile]; - - NSString *contents = [NSString stringWithContentsOfFile:path_]; - STAssertNotNil(contents, nil); - STAssertEqualObjects(@"test 1\ntest 2\ntest 3\ntest 4\ntest 5\ntest 6\n", contents, nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEvent+HandlerTest.applescript b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEvent+HandlerTest.applescript deleted file mode 100644 index 377d7338..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEvent+HandlerTest.applescript +++ /dev/null @@ -1,60 +0,0 @@ --- --- Copyright 2008 Google Inc. --- --- Licensed under the Apache License, Version 2.0 (the "License"); you may not --- use this file except in compliance with the License. You may obtain a copy --- of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT --- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the --- License for the specific language governing permissions and limitations under --- the License. --- - -script parentTestScript - property parentTestScriptProperty : 6 - on parentTestScriptFunc() - return "parent" - end parentTestScriptFunc -end script - -script testScript - property parent : parentTestScript - property testScriptProperty : 5 - on testScriptFunc() - return "child" - end testScriptFunc - on open foo - end open -end script - -property foo : 1 - -on test() -end test - -on testReturnOne() - return 1 -end testReturnOne - -on testReturnParam(param) - return param -end testReturnParam - -on testAddParams(param1, param2) - return param1 + param2 -end testAddParams - -on testAdd of a onto b given otherValue:d - return a + b + d -end testAdd - -on testGetScript() - return testScript -end testGetScript - -on print -end print diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.h deleted file mode 100644 index fe3e1f02..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// GTMNSAppleEventDescriptor+Foundation.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" -#import "GTMFourCharCode.h" - -// A category for dealing with NSAppleEventDescriptors and NSArrays. -@interface NSAppleEventDescriptor (GTMAppleEventDescriptorArrayAdditions) -// Used to register the types you know how to convert into -// NSAppleEventDescriptors. -// See examples in GTMNSAppleEventDescriptor+Foundation. -// Args: -// selector - selector to call for any of the types in |types| -// -(NSAppleEventDesc *)selector_name; -// types - an std c array of types of length |count| -// count - number of types in |types| -+ (void)gtm_registerSelector:(SEL)selector - forTypes:(DescType*)types - count:(NSUInteger)count; - -// Returns an NSObject for any NSAppleEventDescriptor -// Uses types registerd by registerSelector:forTypes:count: to determine -// what type of object to create. If it doesn't know a type, it attempts -// to return [self stringValue]. -- (id)gtm_objectValue; - -// Return an NSArray for an AEList -// Returns nil on failure. -- (NSArray*)gtm_arrayValue; - -// Return an NSDictionary for an AERecord -// Returns nil on failure. -- (NSDictionary*)gtm_dictionaryValue; - -// Return an NSNull for a desc of typeNull -// Returns nil on failure. -- (NSNull*)gtm_nullValue; - -// Return a NSAppleEventDescriptor for a double value. -+ (NSAppleEventDescriptor*)gtm_descriptorWithDouble:(double)real; - -// Return a NSAppleEventDescriptor for a float value. -+ (NSAppleEventDescriptor*)gtm_descriptorWithFloat:(float)real; - -// Return a NSAppleEventDescriptor for a CGFloat value. -+ (NSAppleEventDescriptor*)gtm_descriptorWithCGFloat:(CGFloat)real; - -// Attempt to extract a double value. Returns NAN on error. -- (double)gtm_doubleValue; - -// Attempt to extract a float value. Returns NAN on error. -- (float)gtm_floatValue; - -// Attempt to extract a CGFloat value. Returns NAN on error. -- (CGFloat)gtm_cgFloatValue; - -// Attempt to extract a NSNumber. Returns nil on error. -- (NSNumber*)gtm_numberValue; - -@end - -@interface NSObject (GTMAppleEventDescriptorObjectAdditions) -// A informal protocol that objects can override to return appleEventDescriptors -// for their type. The default is to return [self description] rolled up -// in an NSAppleEventDescriptor. Built in support for: -// NSArray, NSDictionary, NSNull, NSString, NSNumber and NSProcessInfo -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor; -@end - -@interface NSAppleEventDescriptor (GTMAppleEventDescriptorAdditions) -// Allows you to send events. -// Returns YES if send was successful. -- (BOOL)gtm_sendEventWithMode:(AESendMode)mode - timeOut:(NSTimeInterval)timeout - reply:(NSAppleEventDescriptor**)reply; -@end - -@interface GTMFourCharCode (GTMAppleEventDescriptorObjectAdditions) - -// if you call gtm_appleEventDescriptor on GTMFourCharCode it will be of -// type typeType. If you need something different (like typeProperty) this -// allows you to define the type you want. -- (NSAppleEventDescriptor*)gtm_appleEventDescriptorOfType:(DescType)type; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.m deleted file mode 100644 index b3556074..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Foundation.m +++ /dev/null @@ -1,536 +0,0 @@ -// -// GTMNSAppleEventDescriptor+Foundation.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMDebugSelectorValidation.h" -#import // Needed Solely For keyASUserRecordFields - -// Map of types to selectors. -static NSMutableDictionary *gTypeMap = nil; - -@implementation NSAppleEventDescriptor (GTMAppleEventDescriptorArrayAdditions) - -+ (void)gtm_registerSelector:(SEL)selector - forTypes:(DescType*)types - count:(NSUInteger)count { - if (selector && types && count > 0) { -#if DEBUG - NSAppleEventDescriptor *desc - = [[[NSAppleEventDescriptor alloc] initListDescriptor] autorelease]; - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(desc, - selector, - @encode(id), - NULL); -#endif - @synchronized(self) { - if (!gTypeMap) { - gTypeMap = [[NSMutableDictionary alloc] init]; - } - NSString *selString = NSStringFromSelector(selector); - for (NSUInteger i = 0; i < count; ++i) { - NSNumber *key = [NSNumber numberWithUnsignedInt:types[i]]; - NSString *exists = [gTypeMap objectForKey:key]; - if (exists) { - _GTMDevLog(@"%@ being replaced with %@ exists for type: %@", - exists, selString, key); - } - [gTypeMap setObject:selString forKey:key]; - } - } - } -} - -- (id)gtm_objectValue { - id value = nil; - - // Check our registered types to see if we have anything - if (gTypeMap) { - @synchronized(gTypeMap) { - DescType type = [self descriptorType]; - NSNumber *key = [NSNumber numberWithUnsignedInt:type]; - NSString *selectorString = [gTypeMap objectForKey:key]; - if (selectorString) { - SEL selector = NSSelectorFromString(selectorString); - value = [self performSelector:selector]; - } else { - value = [self stringValue]; - } - } - } - return value; -} - -- (NSArray*)gtm_arrayValue { - NSUInteger count = [self numberOfItems]; - NSAppleEventDescriptor *workingDesc = self; - if (count == 0) { - // Create a list to work with. - workingDesc = [self coerceToDescriptorType:typeAEList]; - count = [workingDesc numberOfItems]; - } - NSMutableArray *items = [NSMutableArray arrayWithCapacity:count]; - for (NSUInteger i = 1; i <= count; ++i) { - NSAppleEventDescriptor *desc = [workingDesc descriptorAtIndex:i]; - id value = [desc gtm_objectValue]; - if (!value) { - _GTMDevLog(@"Unknown type of descriptor %@", [desc description]); - return nil; - } - [items addObject:value]; - } - return items; -} - -- (NSDictionary*)gtm_dictionaryValue { - NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; - NSAppleEventDescriptor *userRecord = [self descriptorForKeyword:keyASUserRecordFields]; - if (userRecord) { - NSArray *userItems = [userRecord gtm_arrayValue]; - NSString *key = nil; - NSString *item; - GTM_FOREACH_OBJECT(item, userItems) { - if (key) { - // Save the pair and reset our state - [dictionary setObject:item forKey:key]; - key = nil; - } else { - // Save it for the next pair - key = item; - } - } - if (key) { - _GTMDevLog(@"Got a key %@ with no value in %@", key, userItems); - return nil; - } - } else { - NSUInteger count = [self numberOfItems]; - for (NSUInteger i = 1; i <= count; ++i) { - AEKeyword key = [self keywordForDescriptorAtIndex:i]; - NSAppleEventDescriptor *desc = [self descriptorForKeyword:key]; - id value = [desc gtm_objectValue]; - if (!value) { - _GTMDevLog(@"Unknown type of descriptor %@", [desc description]); - return nil; - } - [dictionary setObject:value - forKey:[GTMFourCharCode fourCharCodeWithFourCharCode:key]]; - } - } - return dictionary; -} - -- (NSNull*)gtm_nullValue { - return [NSNull null]; -} - -+ (NSAppleEventDescriptor*)gtm_descriptorWithDouble:(double)real { - return [NSAppleEventDescriptor descriptorWithDescriptorType:typeIEEE64BitFloatingPoint - bytes:&real - length:sizeof(real)]; -} - -+ (NSAppleEventDescriptor*)gtm_descriptorWithFloat:(float)real { - return [NSAppleEventDescriptor descriptorWithDescriptorType:typeIEEE32BitFloatingPoint - bytes:&real - length:sizeof(real)]; -} - - -+ (NSAppleEventDescriptor*)gtm_descriptorWithCGFloat:(CGFloat)real { -#if CGFLOAT_IS_DOUBLE - return [self gtm_descriptorWithDouble:real]; -#else - return [self gtm_descriptorWithFloat:real]; -#endif -} - -- (double)gtm_doubleValue { - double value = NAN; - NSNumber *number = [self gtm_numberValue]; - if (number) { - value = [number doubleValue]; - } - return value; -} - -- (float)gtm_floatValue { - float value = NAN; - NSNumber *number = [self gtm_numberValue]; - if (number) { - value = [number floatValue]; - } - return value; -} - -- (CGFloat)gtm_cgFloatValue { -#if CGFLOAT_IS_DOUBLE - return [self gtm_doubleValue]; -#else - return [self gtm_floatValue]; -#endif -} - -- (NSNumber*)gtm_numberValue { - typedef struct { - DescType type; - SEL selector; - } TypeSelectorMap; - TypeSelectorMap typeSelectorMap[] = { - { typeFalse, @selector(numberWithBool:) }, - { typeTrue, @selector(numberWithBool:) }, - { typeBoolean, @selector(numberWithBool:) }, - { typeSInt16, @selector(numberWithShort:) }, - { typeSInt32, @selector(numberWithInt:) }, - { typeUInt32, @selector(numberWithUnsignedInt:) }, - { typeSInt64, @selector(numberWithLongLong:) }, - { typeIEEE32BitFloatingPoint, @selector(numberWithFloat:) }, - { typeIEEE64BitFloatingPoint, @selector(numberWithDouble:) } - }; - DescType type = [self descriptorType]; - SEL selector = nil; - for (size_t i = 0; i < sizeof(typeSelectorMap) / sizeof(TypeSelectorMap); ++i) { - if (type == typeSelectorMap[i].type) { - selector = typeSelectorMap[i].selector; - break; - } - } - NSAppleEventDescriptor *desc = self; - if (!selector) { - // COV_NF_START - Don't know how to force this in a unittest - _GTMDevLog(@"Didn't get a valid selector?"); - desc = [self coerceToDescriptorType:typeIEEE64BitFloatingPoint]; - selector = @selector(numberWithDouble:); - // COV_NF_END - } - NSData *descData = [desc data]; - const void *bytes = [descData bytes]; - if (!bytes) { - // COV_NF_START - Don't know how to force this in a unittest - _GTMDevLog(@"Unable to get bytes from %@", desc); - return nil; - // COV_NF_END - } - Class numberClass = [NSNumber class]; - NSMethodSignature *signature = [numberClass methodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:selector]; - [invocation setArgument:(void*)bytes atIndex:2]; - [invocation setTarget:numberClass]; - [invocation invoke]; - NSNumber *value = nil; - [invocation getReturnValue:&value]; - return value; -} - -- (GTMFourCharCode*)gtm_fourCharCodeValue { - return [GTMFourCharCode fourCharCodeWithFourCharCode:[self typeCodeValue]]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return self; -} - -@end - -@implementation NSObject (GTMAppleEventDescriptorObjectAdditions) -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return [NSAppleEventDescriptor descriptorWithString:[self description]]; -} -@end - -@implementation NSArray (GTMAppleEventDescriptorObjectAdditions) - -+ (void)load { - DescType types[] = { - typeAEList, - }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_arrayValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - NSAppleEventDescriptor *desc = [NSAppleEventDescriptor listDescriptor]; - NSUInteger count = [self count]; - for (NSUInteger i = 1; i <= count; ++i) { - id item = [self objectAtIndex:i-1]; - NSAppleEventDescriptor *itemDesc = [item gtm_appleEventDescriptor]; - if (!itemDesc) { - _GTMDevLog(@"Unable to create Apple Event Descriptor for %@", [self description]); - return nil; - } - [desc insertDescriptor:itemDesc atIndex:i]; - } - return desc; -} -@end - -@implementation NSDictionary (GTMAppleEventDescriptorObjectAdditions) - -+ (void)load { - DescType types[] = { - typeAERecord, - }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_dictionaryValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - Class keyClass = nil; - id key = nil; - GTM_FOREACH_KEY(key, self) { - if (!keyClass) { - if ([key isKindOfClass:[GTMFourCharCode class]]) { - keyClass = [GTMFourCharCode class]; - } else if ([key isKindOfClass:[NSString class]]) { - keyClass = [NSString class]; - } else { - _GTMDevLog(@"Keys must be of type NSString or GTMFourCharCode: %@", key); - return nil; - } - } - if (![key isKindOfClass:keyClass]) { - _GTMDevLog(@"Keys must be homogenous (first key was of type %@) " - "and of type NSString or GTMFourCharCode: %@", keyClass, key); - return nil; - } - } - NSAppleEventDescriptor *desc = [NSAppleEventDescriptor recordDescriptor]; - if ([keyClass isEqual:[NSString class]]) { - NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self count] * 2]; - GTM_FOREACH_KEY(key, self) { - [array addObject:key]; - [array addObject:[self objectForKey:key]]; - } - NSAppleEventDescriptor *userRecord = [array gtm_appleEventDescriptor]; - if (!userRecord) { - return nil; - } - [desc setDescriptor:userRecord forKeyword:keyASUserRecordFields]; - } else { - GTM_FOREACH_KEY(key, self) { - id value = [self objectForKey:key]; - NSAppleEventDescriptor *valDesc = [value gtm_appleEventDescriptor]; - if (!valDesc) { - return nil; - } - [desc setDescriptor:valDesc forKeyword:[key fourCharCode]]; - } - } - return desc; -} - -@end - -@implementation NSNull (GTMAppleEventDescriptorObjectAdditions) -+ (void)load { - DescType types[] = { - typeNull - }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_nullValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return [NSAppleEventDescriptor nullDescriptor]; -} -@end - -@implementation NSString (GTMAppleEventDescriptorObjectAdditions) - -+ (void)load { - DescType types[] = { - typeUTF16ExternalRepresentation, - typeUnicodeText, - typeUTF8Text, - typeCString, - typePString, - typeChar, - typeIntlText }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(stringValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return [NSAppleEventDescriptor descriptorWithString:self]; -} -@end - -@implementation NSNumber (GTMAppleEventDescriptorObjectAdditions) - -+ (void)load { - DescType types[] = { - typeTrue, - typeFalse, - typeBoolean, - typeSInt16, - typeSInt32, - typeUInt32, - typeSInt64, - typeIEEE32BitFloatingPoint, - typeIEEE64BitFloatingPoint }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_numberValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - const char *type = [self objCType]; - if (!type || strlen(type) != 1) return nil; - - DescType desiredType = typeNull; - NSAppleEventDescriptor *desc = nil; - switch (type[0]) { - // COV_NF_START - // I can't seem to convince objcType to return something of this type - case 'B': - desc = [NSAppleEventDescriptor descriptorWithBoolean:[self boolValue]]; - break; - // COV_NF_END - - case 'c': - case 'C': - case 's': - case 'S': - desiredType = typeSInt16; - break; - - case 'i': - case 'l': - desiredType = typeSInt32; - break; - - // COV_NF_START - // I can't seem to convince objcType to return something of this type - case 'I': - case 'L': - desiredType = typeUInt32; - break; - // COV_NF_END - - case 'q': - case 'Q': - desiredType = typeSInt64; - break; - - case 'f': - desiredType = typeIEEE32BitFloatingPoint; - break; - - case 'd': - default: - desiredType = typeIEEE64BitFloatingPoint; - break; - } - - if (!desc) { - desc = [NSAppleEventDescriptor gtm_descriptorWithDouble:[self doubleValue]]; - if (desc && desiredType != typeIEEE64BitFloatingPoint) { - desc = [desc coerceToDescriptorType:desiredType]; - } - } - return desc; -} - -@end - -@implementation NSProcessInfo (GTMAppleEventDescriptorObjectAdditions) - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - ProcessSerialNumber psn = { 0, kCurrentProcess }; - return [NSAppleEventDescriptor descriptorWithDescriptorType:typeProcessSerialNumber - bytes:&psn - length:sizeof(ProcessSerialNumber)]; -} - -@end - -@implementation GTMFourCharCode (GTMAppleEventDescriptorObjectAdditions) - -+ (void)load { - DescType types[] = { - typeType, - typeKeyword, - typeApplSignature, - typeEnumerated, - }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_fourCharCodeValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return [self gtm_appleEventDescriptorOfType:typeType]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptorOfType:(DescType)type { - FourCharCode code = [self fourCharCode]; - return [NSAppleEventDescriptor descriptorWithDescriptorType:type - bytes:&code - length:sizeof(code)]; -} -@end - -@implementation NSAppleEventDescriptor (GTMAppleEventDescriptorAdditions) - -- (BOOL)gtm_sendEventWithMode:(AESendMode)mode - timeOut:(NSTimeInterval)timeout - reply:(NSAppleEventDescriptor**)reply { - BOOL isGood = YES; - AppleEvent replyEvent = { typeNull, NULL }; - OSStatus err = AESendMessage([self aeDesc], &replyEvent, mode, timeout * 60); - NSAppleEventDescriptor *replyDesc - = [[[NSAppleEventDescriptor alloc] initWithAEDescNoCopy:&replyEvent] autorelease]; - if (err) { - isGood = NO; - _GTMDevLog(@"Unable to send message: %@ %d", self, err); - } - if (isGood) { - NSAppleEventDescriptor *errorDesc = [replyDesc descriptorForKeyword:keyErrorNumber]; - if (errorDesc && [errorDesc int32Value]) { - isGood = NO; - } - } - if (reply) { - *reply = replyDesc; - } - return isGood; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m deleted file mode 100644 index f346e992..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+FoundationTest.m +++ /dev/null @@ -1,643 +0,0 @@ -// -// GTMNSAppleEventDescriptor+FoundationTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMFourCharCode.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMNSAppleEventDescriptor_TestObject : NSObject -@end - -@implementation GTMNSAppleEventDescriptor_TestObject - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - return nil; -} - -@end - -@interface GTMNSAppleEventDescriptor_FoundationTest : GTMTestCase { - BOOL gotEvent_; -} -- (void)handleEvent:(NSAppleEventDescriptor*)event - withReply:(NSAppleEventDescriptor*)reply; -- (void)handleEvent:(NSAppleEventDescriptor*)event - withError:(NSAppleEventDescriptor*)reply; - -@end - -@implementation GTMNSAppleEventDescriptor_FoundationTest -- (void)testRegisterSelectorForTypesCount { - // Weird edge casey stuff. - // + (void)registerSelector:(SEL)selector - // forTypes:(DescType*)types count:(int)count - // is tested heavily by the other NSAppleEventDescriptor+foo categories. - DescType type; - [NSAppleEventDescriptor gtm_registerSelector:nil - forTypes:&type count:1]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(initListDescriptor) - forTypes:nil count:1]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(initListDescriptor) - forTypes:&type count:0]; - // Test the duplicate case - [NSAppleEventDescriptor gtm_registerSelector:@selector(initListDescriptor) - forTypes:&type count:1]; - [GTMUnitTestDevLog expectPattern:@"initListDescriptor being replaced with " - "initListDescriptor exists for type: [0-9]+"]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(initListDescriptor) - forTypes:&type count:1]; -} - -- (void)testObjectValue { - // - (void)testObjectValue is tested heavily by the other - // NSAppleEventDescriptor+foo categories. - long data = 1; - // v@#f is just a bogus descriptor type that we don't recognize. - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor descriptorWithDescriptorType:'v@#f' - bytes:&data - length:sizeof(data)]; - id value = [desc gtm_objectValue]; - STAssertNil(value, nil); -} - -- (void)testAppleEventDescriptor { - // - (NSAppleEventDescriptor*)appleEventDescriptor is tested heavily by the - // other NSAppleEventDescriptor+foo categories. - NSAppleEventDescriptor *desc = [self gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - STAssertEquals([desc descriptorType], (DescType)typeUnicodeText, nil); -} - -- (void)testDescriptorWithArrayAndArrayValue { - // Test empty array - NSAppleEventDescriptor *desc = [[NSArray array] gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - STAssertEquals([desc numberOfItems], (NSInteger)0, nil); - - // Complex array - NSArray *array = [NSArray arrayWithObjects: - [NSNumber numberWithInt:4], - @"foo", - [NSNumber numberWithInt:2], - @"bar", - [NSArray arrayWithObjects: - @"bam", - [NSArray arrayWithObject:[NSNumber numberWithFloat:4.2f]], - nil], - nil]; - STAssertNotNil(array, nil); - desc = [array gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - NSArray *array2 = [desc gtm_objectValue]; - STAssertNotNil(array2, nil); - NSArray *array3 = [desc gtm_arrayValue]; - STAssertNotNil(array3, nil); - STAssertTrue([array isEqualToArray:array2], - @"array: %@\narray2: %@\ndesc: %@", - [array description], [array2 description], [desc description]); - STAssertTrue([array2 isEqualToArray:array3], - @"array: %@\narray2: %@\ndesc: %@", - [array description], [array2 description], [desc description]); - - // Test a single object - array = [NSArray arrayWithObject:@"foo"]; - desc = [NSAppleEventDescriptor descriptorWithString:@"foo"]; - STAssertNotNil(desc, nil); - array2 = [desc gtm_arrayValue]; - STAssertTrue([array isEqualToArray:array2], - @"array: %@\narray2: %@\ndesc: %@", - [array description], [array2 description], [desc description]); - - // Something that doesn't know how to register itself. - GTMNSAppleEventDescriptor_TestObject *obj - = [[[GTMNSAppleEventDescriptor_TestObject alloc] init] autorelease]; - [GTMUnitTestDevLog expectPattern:@"Unable to create Apple Event Descriptor for .*"]; - desc = [[NSArray arrayWithObject:obj] gtm_appleEventDescriptor]; - STAssertNil(desc, @"Should be nil"); - - // A list containing something we don't know how to deal with - desc = [NSAppleEventDescriptor listDescriptor]; - NSAppleEventDescriptor *desc2 - = [NSAppleEventDescriptor descriptorWithDescriptorType:'@!@#' - bytes:&desc - length:sizeof(desc)]; - [GTMUnitTestDevLog expectPattern:@"Unknown type of descriptor " - ""]; - [desc insertDescriptor:desc2 atIndex:0]; - array = [desc gtm_objectValue]; - STAssertEquals([array count], (NSUInteger)0, @"Should have 0 items"); -} - -- (void)testDescriptorWithDictionaryAndDictionaryValue { - // Test empty dictionary - NSAppleEventDescriptor *desc - = [[NSDictionary dictionary] gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - STAssertEquals([desc numberOfItems], (NSInteger)0, nil); - - // Complex dictionary - NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: - @"fooobject", - @"fookey", - @"barobject", - @"barkey", - [NSDictionary dictionaryWithObjectsAndKeys: - @"january", - [GTMFourCharCode fourCharCodeWithFourCharCode:cJanuary], - @"february", - [GTMFourCharCode fourCharCodeWithFourCharCode:cFebruary], - nil], - @"dictkey", - nil]; - STAssertNotNil(dictionary, nil); - desc = [dictionary gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - NSDictionary *dictionary2 = [desc gtm_objectValue]; - STAssertNotNil(dictionary2, nil); - NSDictionary *dictionary3 = [desc gtm_dictionaryValue]; - STAssertNotNil(dictionary3, nil); - STAssertEqualObjects(dictionary, dictionary2, - @"desc: %@", [desc description]); - STAssertEqualObjects(dictionary2, dictionary3, - @"desc: %@", [desc description]); - - // Something that doesn't know how to register itself. - GTMNSAppleEventDescriptor_TestObject *obj - = [[[GTMNSAppleEventDescriptor_TestObject alloc] init] autorelease]; - [GTMUnitTestDevLog expectPattern:@"Unable to create Apple Event Descriptor for .*"]; - desc = [[NSDictionary dictionaryWithObject:obj - forKey:@"foo"] gtm_appleEventDescriptor]; - STAssertNil(desc, @"Should be nil"); - - GTMFourCharCode *fcc = [GTMFourCharCode fourCharCodeWithFourCharCode:cJanuary]; - desc = [[NSDictionary dictionaryWithObject:obj - forKey:fcc] gtm_appleEventDescriptor]; - STAssertNil(desc, @"Should be nil"); - - // A list containing something we don't know how to deal with - desc = [NSAppleEventDescriptor recordDescriptor]; - NSAppleEventDescriptor *desc2 - = [NSAppleEventDescriptor descriptorWithDescriptorType:'@!@#' - bytes:&desc - length:sizeof(desc)]; - [desc setDescriptor:desc2 forKeyword:cJanuary]; - [GTMUnitTestDevLog expectPattern:@"Unknown type of descriptor " - ""]; - dictionary = [desc gtm_objectValue]; - STAssertEquals([dictionary count], (NSUInteger)0, @"Should have 0 items"); - - // A bad dictionary - dictionary = [NSDictionary dictionaryWithObjectsAndKeys: - @"foo", - [GTMFourCharCode fourCharCodeWithFourCharCode:'APPL'], - @"bam", - @"bar", - nil]; - STAssertNotNil(dictionary, nil); - // I cannot use expectString here to the exact string because interestingly - // dictionaries in 64 bit enumerate in a different order from dictionaries - // on 32 bit. This is the closest pattern I can match. - [GTMUnitTestDevLog expectPattern:@"Keys must be homogenous .*"]; - desc = [dictionary gtm_appleEventDescriptor]; - STAssertNil(desc, nil); - - // Another bad dictionary - dictionary = [NSDictionary dictionaryWithObjectsAndKeys: - @"foo", - [NSNumber numberWithInt:4], - @"bam", - @"bar", - nil]; - STAssertNotNil(dictionary, nil); - // I cannot use expectString here to the exact string because interestingly - // dictionaries in 64 bit enumerate in a different order from dictionaries - // on 32 bit. This is the closest pattern I can match. - [GTMUnitTestDevLog expectPattern:@"Keys must be .*"]; - desc = [dictionary gtm_appleEventDescriptor]; - STAssertNil(desc, nil); - - // A bad descriptor - desc = [NSAppleEventDescriptor recordDescriptor]; - STAssertNotNil(desc, @""); - NSArray *array = [NSArray arrayWithObjects:@"foo", @"bar", @"bam", nil]; - STAssertNotNil(array, @""); - NSAppleEventDescriptor *userRecord = [array gtm_appleEventDescriptor]; - STAssertNotNil(userRecord, @""); - [desc setDescriptor:userRecord forKeyword:keyASUserRecordFields]; - [GTMUnitTestDevLog expectPattern:@"Got a key bam with no value in \\(.*"]; - dictionary = [desc gtm_objectValue]; - STAssertNil(dictionary, @"Should be nil"); -} - -- (void)testDescriptorWithNull { - // Test Null - NSNull *null = [NSNull null]; - NSAppleEventDescriptor *desc = [null gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - NSNull *null2 = [desc gtm_objectValue]; - STAssertNotNil(null2, nil); - NSNull *null3 = [desc gtm_nullValue]; - STAssertNotNil(null2, nil); - STAssertEqualObjects(null, null2, - @"null: %@\null2: %@\ndesc: %@", - [null description], [null2 description], - [desc description]); - STAssertEqualObjects(null, null3, - @"null: %@\null3: %@\ndesc: %@", - [null description], [null3 description], - [desc description]); -} - -- (void)testDescriptorWithString { - // Test empty String - NSAppleEventDescriptor *desc = [[NSString string] gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - - // Test String - NSString *string = @"Ratatouille!"; - desc = [string gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - NSString *string2 = [desc gtm_objectValue]; - STAssertNotNil(string2, nil); - STAssertEqualObjects(string, string2, - @"string: %@\nstring: %@\ndesc: %@", - [string description], [string2 description], [desc description]); - -} - -- (void)testDescriptorWithNumberAndNumberValue { - // There's really no good way to make this into a loop sadly due - // to me having to pass a pointer of bytes to NSInvocation as an argument. - // I want the compiler to convert my int to the appropriate type. - - NSNumber *original = [NSNumber numberWithBool:YES]; - STAssertNotNil(original, @"Value: YES"); - NSAppleEventDescriptor *desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: YES"); - id returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: YES"); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: YES"); - STAssertEqualObjects(original, returned, @"Value: YES"); - desc = [desc coerceToDescriptorType:typeBoolean]; - NSNumber *number = [desc gtm_numberValue]; - STAssertEqualObjects(number, original, @"Value: YES"); - - original = [NSNumber numberWithBool:NO]; - STAssertNotNil(original, @"Value: NO"); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: NO"); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: NO"); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: NO"); - STAssertEqualObjects(original, returned, @"Value: NO"); - - sranddev(); - double value = rand(); - - original = [NSNumber numberWithChar:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithUnsignedChar:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithShort:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithUnsignedShort:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithInt:(int)value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithUnsignedInt:(unsigned int)value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithLong:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithUnsignedLong:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithLongLong:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithUnsignedLongLong:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - float floatA = rand(); - float floatB = rand(); - value = floatA / floatB; - original = [NSNumber numberWithFloat:(float)value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - double doubleA = rand(); - double doubleB = rand(); - value = doubleA / doubleB; - original = [NSNumber numberWithDouble:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = rand(); - original = [NSNumber numberWithBool:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = NAN; - original = [NSNumber numberWithDouble:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = INFINITY; - original = [NSNumber numberWithDouble:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = -0.0; - original = [NSNumber numberWithDouble:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); - - value = -INFINITY; - original = [NSNumber numberWithDouble:value]; - STAssertNotNil(original, @"Value: %g", value); - desc = [original gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Value: %g", value); - returned = [desc gtm_objectValue]; - STAssertNotNil(returned, @"Value: %g", value); - STAssertTrue([returned isKindOfClass:[NSNumber class]], @"Value: %g", value); - STAssertEqualObjects(original, returned, @"Value: %g", value); -} - -- (void)testDescriptorWithDoubleAndDoubleValue { - sranddev(); - for (int i = 0; i < 1000; ++i) { - double value1 = rand(); - double value2 = rand(); - double value = value1 / value2; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithDouble:value]; - STAssertNotNil(desc, @"Value: %g", value); - double returnedValue = [desc gtm_doubleValue]; - STAssertEquals(value, returnedValue, @"Value: %g", value); - } - - double specialCases[] = { 0.0f, __DBL_MIN__, __DBL_EPSILON__, INFINITY, NAN }; - for (size_t i = 0; i < sizeof(specialCases) / sizeof(double); ++i) { - double value = specialCases[i]; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithDouble:value]; - STAssertNotNil(desc, @"Value: %g", value); - double returnedValue = [desc gtm_doubleValue]; - STAssertEquals(value, returnedValue, @"Value: %g", value); - } -} - -- (void)testDescriptorWithFloatAndFloatValue { - sranddev(); - for (int i = 0; i < 1000; ++i) { - float value1 = rand(); - float value2 = rand(); - float value = value1 / value2; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithFloat:value]; - STAssertNotNil(desc, @"Value: %f", value); - float returnedValue = [desc gtm_floatValue]; - STAssertEquals(value, returnedValue, @"Value: %f", value); - } - - float specialCases[] = { 0.0f, FLT_MIN, FLT_MAX, FLT_EPSILON, INFINITY, NAN }; - for (size_t i = 0; i < sizeof(specialCases) / sizeof(float); ++i) { - float value = specialCases[i]; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithFloat:value]; - STAssertNotNil(desc, @"Value: %f", value); - float returnedValue = [desc gtm_floatValue]; - STAssertEquals(value, returnedValue, @"Value: %f", value); - } -} - -- (void)testDescriptorWithCGFloatAndCGFloatValue { - sranddev(); - for (int i = 0; i < 1000; ++i) { - CGFloat value1 = rand(); - CGFloat value2 = rand(); - CGFloat value = value1 / value2; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithCGFloat:value]; - STAssertNotNil(desc, @"Value: %g", (double)value); - CGFloat returnedValue = [desc gtm_cgFloatValue]; - STAssertEquals(value, returnedValue, @"Value: %g", (double)value); - } - - CGFloat specialCases[] = { 0.0f, CGFLOAT_MIN, CGFLOAT_MAX, NAN }; - for (size_t i = 0; i < sizeof(specialCases) / sizeof(CGFloat); ++i) { - CGFloat value = specialCases[i]; - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithCGFloat:value]; - STAssertNotNil(desc, @"Value: %g", (double)value); - CGFloat returnedValue = [desc gtm_cgFloatValue]; - STAssertEquals(value, returnedValue, @"Value: %g", (double)value); - } -} - -- (void)testDescriptorWithGTMFourCharCode { - GTMFourCharCode *fcc = [GTMFourCharCode fourCharCodeWithFourCharCode:'APPL']; - STAssertNotNil(fcc, nil); - NSAppleEventDescriptor *desc = [fcc gtm_appleEventDescriptor]; - STAssertNotNil(desc, nil); - GTMFourCharCode *fcc2 = [desc gtm_objectValue]; - STAssertNotNil(fcc2, nil); - STAssertEqualObjects(fcc, fcc2, nil); - STAssertEquals([desc descriptorType], (DescType)typeType, nil); - desc = [fcc gtm_appleEventDescriptorOfType:typeKeyword]; - STAssertNotNil(desc, nil); - fcc2 = [desc gtm_objectValue]; - STAssertNotNil(fcc2, nil); - STAssertEqualObjects(fcc, fcc2, nil); - STAssertEquals([desc descriptorType], (DescType)typeKeyword, nil); -} - -- (void)testDescriptorWithDescriptor { - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor descriptorWithString:@"foo"]; - NSAppleEventDescriptor *desc2 = [desc gtm_appleEventDescriptor]; - STAssertEqualObjects(desc, desc2, nil); -} - -- (void)handleEvent:(NSAppleEventDescriptor*)event - withReply:(NSAppleEventDescriptor*)reply { - gotEvent_ = YES; - NSAppleEventDescriptor *answer = [NSAppleEventDescriptor descriptorWithInt32:1]; - [reply setDescriptor:answer forKeyword:keyDirectObject]; -} - -- (void)handleEvent:(NSAppleEventDescriptor*)event - withError:(NSAppleEventDescriptor*)error { - gotEvent_ = YES; - NSAppleEventDescriptor *answer = [NSAppleEventDescriptor descriptorWithInt32:1]; - [error setDescriptor:answer forKeyword:keyErrorNumber]; -} - -- (void)testSend { - const AEEventClass eventClass = 'Fooz'; - const AEEventID eventID = 'Ball'; - NSAppleEventManager *mgr = [NSAppleEventManager sharedAppleEventManager]; - [mgr setEventHandler:self - andSelector:@selector(handleEvent:withReply:) - forEventClass:eventClass - andEventID:'Ball']; - NSAppleEventDescriptor *currentProcess - = [[NSProcessInfo processInfo] gtm_appleEventDescriptor]; - NSAppleEventDescriptor *event - = [NSAppleEventDescriptor appleEventWithEventClass:eventClass - eventID:eventID - targetDescriptor:currentProcess - returnID:kAutoGenerateReturnID - transactionID:kAnyTransactionID]; - gotEvent_ = NO; - NSAppleEventDescriptor *reply; - BOOL goodEvent = [event gtm_sendEventWithMode:kAEWaitReply timeOut:60 reply:&reply]; - [mgr removeEventHandlerForEventClass:eventClass andEventID:eventID]; - STAssertTrue(goodEvent, @"bad event?"); - STAssertTrue(gotEvent_, @"Handler not called"); - NSAppleEventDescriptor *value = [reply descriptorForKeyword:keyDirectObject]; - STAssertEquals([value int32Value], (SInt32)1, @"didn't get reply"); - - - gotEvent_ = NO; - [GTMUnitTestDevLog expectString:@"Unable to send message: " - " -1708"]; - goodEvent = [event gtm_sendEventWithMode:kAEWaitReply timeOut:60 reply:&reply]; - STAssertFalse(goodEvent, @"good event?"); - STAssertFalse(gotEvent_, @"Handler called?"); - - [mgr setEventHandler:self - andSelector:@selector(handleEvent:withError:) - forEventClass:eventClass - andEventID:eventID]; - gotEvent_ = NO; - goodEvent = [event gtm_sendEventWithMode:kAEWaitReply timeOut:60 reply:&reply]; - STAssertFalse(goodEvent, @"good event?"); - STAssertTrue(gotEvent_, @"Handler not called?"); - [mgr removeEventHandlerForEventClass:eventClass andEventID:eventID]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.h deleted file mode 100644 index f2ac8800..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// GTMNSAppleEventDescriptor+Handler.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -@interface NSAppleEventDescriptor (GTMAppleEventDescriptorHandlerAdditions) -+ (id)gtm_descriptorWithPositionalHandler:(NSString*)handler - parametersArray:(NSArray*)params; -+ (id)gtm_descriptorWithPositionalHandler:(NSString*)handler - parametersDescriptor:(NSAppleEventDescriptor*)params; -+ (id)gtm_descriptorWithLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count; - -- (id)gtm_initWithPositionalHandler:(NSString*)handler - parametersArray:(NSArray*)params; -- (id)gtm_initWithPositionalHandler:(NSString*)handler - parametersDescriptor:(NSAppleEventDescriptor*)params; -- (id)gtm_initWithLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.m deleted file mode 100644 index 76b6e858..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+Handler.m +++ /dev/null @@ -1,130 +0,0 @@ -// -// GTMNSAppleEventDescriptor+Handler.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSAppleEventDescriptor+Handler.h" -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMMethodCheck.h" -#import - -@implementation NSAppleEventDescriptor (GTMAppleEventDescriptorHandlerAdditions) -GTM_METHOD_CHECK(NSProcessInfo, gtm_appleEventDescriptor); - -+ (id)gtm_descriptorWithPositionalHandler:(NSString*)handler - parametersArray:(NSArray*)params { - return [[[self alloc] gtm_initWithPositionalHandler:handler - parametersArray:params] autorelease]; -} - -+ (id)gtm_descriptorWithPositionalHandler:(NSString*)handler - parametersDescriptor:(NSAppleEventDescriptor*)params { - return [[[self alloc] gtm_initWithPositionalHandler:handler - parametersDescriptor:params] autorelease]; -} - -+ (id)gtm_descriptorWithLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count { - return [[[self alloc] gtm_initWithLabeledHandler:handler - labels:labels - parameters:params - count:count] autorelease]; -} - -- (id)gtm_initWithPositionalHandler:(NSString*)handler - parametersArray:(NSArray*)params { - return [self gtm_initWithPositionalHandler:handler - parametersDescriptor:[params gtm_appleEventDescriptor]]; -} - -- (id)gtm_initWithPositionalHandler:(NSString*)handler - parametersDescriptor:(NSAppleEventDescriptor*)params { - if ((self = [self initWithEventClass:kASAppleScriptSuite - eventID:kASSubroutineEvent - targetDescriptor:[[NSProcessInfo processInfo] gtm_appleEventDescriptor] - returnID:kAutoGenerateReturnID - transactionID:kAnyTransactionID])) { - // Create an NSAppleEventDescriptor with the method handler. Note that the - // name must be lowercase (even if it is uppercase in AppleScript). - // http://developer.apple.com/qa/qa2001/qa1111.html - // has details. - handler = [handler lowercaseString]; - if (!handler) { - [self release]; - return nil; - } - NSAppleEventDescriptor *handlerDesc - = [NSAppleEventDescriptor descriptorWithString:handler]; - [self setParamDescriptor:handlerDesc forKeyword:keyASSubroutineName]; - if (params) { - [self setParamDescriptor:params forKeyword:keyDirectObject]; - } - } - return self; -} - - -- (id)gtm_initWithLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count { - if ((self = [self initWithEventClass:kASAppleScriptSuite - eventID:kASSubroutineEvent - targetDescriptor:[[NSProcessInfo processInfo] gtm_appleEventDescriptor] - returnID:kAutoGenerateReturnID - transactionID:kAnyTransactionID])) { - if (!handler) { - [self release]; - return nil; - } - // Create an NSAppleEventDescriptor with the method handler. Note that the - // name must be lowercase (even if it is uppercase in AppleScript). - NSAppleEventDescriptor *handlerDesc - = [NSAppleEventDescriptor descriptorWithString:[handler lowercaseString]]; - [self setParamDescriptor:handlerDesc forKeyword:keyASSubroutineName]; - for (NSUInteger i = 0; i < count; i++) { - NSAppleEventDescriptor *paramDesc = [params[i] gtm_appleEventDescriptor]; - if(labels[i] == keyASPrepositionGiven) { - if (![params[i] isKindOfClass:[NSDictionary class]]) { - _GTMDevLog(@"Must pass in dictionary for keyASPrepositionGiven " - "(got %@)", params[i]); - [self release]; - self = nil; - break; - } - NSAppleEventDescriptor *userDesc - = [paramDesc descriptorForKeyword:keyASUserRecordFields]; - if (!userDesc) { - _GTMDevLog(@"Dictionary for keyASPrepositionGiven must be a user " - "record field dictionary (got %@)", params[i]); - [self release]; - self = nil; - break; - } - [self setParamDescriptor:userDesc - forKeyword:keyASUserRecordFields]; - } else { - [self setParamDescriptor:paramDesc - forKeyword:labels[i]]; - } - } - } - return self; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+HandlerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+HandlerTest.m deleted file mode 100644 index a137d8a8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleEventDescriptor+HandlerTest.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// GTNNSAppleEventDescriptor+HandlerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMSenTestCase.h" -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMNSAppleEventDescriptor+Handler.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMNSAppleEventDescriptor_HandlerTest : GTMTestCase -@end - -@implementation GTMNSAppleEventDescriptor_HandlerTest -// Most of this gets tested by the NSAppleScript+Handler tests. -- (void)testPositionalHandlers { - NSAppleEventDescriptor *desc - = [NSAppleEventDescriptor gtm_descriptorWithPositionalHandler:nil - parametersArray:[NSArray array]]; - STAssertNil(desc, @"got a desc?"); - - desc = [NSAppleEventDescriptor gtm_descriptorWithPositionalHandler:@"happy" - parametersDescriptor:nil]; - STAssertNotNil(desc, @"didn't get a desc?"); - - desc = [NSAppleEventDescriptor gtm_descriptorWithLabeledHandler:nil - labels:nil - parameters:nil - count:0]; - STAssertNil(desc, @"got a desc?"); - - AEKeyword keys[] = { keyASPrepositionGiven }; - NSString *string = @"foo"; - [GTMUnitTestDevLog expectString:@"Must pass in dictionary for " - "keyASPrepositionGiven (got foo)"]; - desc = [NSAppleEventDescriptor gtm_descriptorWithLabeledHandler:@"happy" - labels:keys - parameters:&string - count:1]; - STAssertNil(desc, @"got a desc?"); - - NSDictionary *dict = [NSDictionary dictionaryWithObject:@"bart" - forKey:[NSNumber numberWithInt:4]]; - [GTMUnitTestDevLog expectString:@"Keys must be of type NSString or " - "GTMFourCharCode: 4"]; - [GTMUnitTestDevLog expectPattern:@"Dictionary for keyASPrepositionGiven must " - "be a user record field dictionary \\(got .*"]; - desc = [NSAppleEventDescriptor gtm_descriptorWithLabeledHandler:@"happy" - labels:keys - parameters:&dict - count:1]; - STAssertNil(desc, @"got a desc?"); - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.h deleted file mode 100644 index 65f57c56..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.h +++ /dev/null @@ -1,126 +0,0 @@ -// -// GTMNSAppleScript+Handler.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// :::WARNING::: NSAppleScript and Garbage Collect (GC) -// -// As of 10.5.6 (and below) Apple has bugs in NSAppleScript when running with -// GC; ie-things crash that have nothing to do w/ this or your code. See -// http://rails.wincent.com/issues/640 for a good amount of detail about the -// problems and simple cases that show it. - -// A category for calling handlers in NSAppleScript - -enum { - // Data type is OSAID. These will generally be representing - // scripts. - typeGTMOSAID = 'GTMO' -}; - -@interface NSAppleScript(GTMAppleScriptHandlerAdditions) -// Allows us to call a specific handler in an AppleScript. -// parameters are passed in left-right order 0-n. -// -// Args: -// handler - name of the handler to call in the Applescript -// params - the parameters to pass to the handler -// error - in non-nil returns any error that may have occurred. -// -// Returns: -// The result of the handler being called. nil on failure. -- (NSAppleEventDescriptor*)gtm_executePositionalHandler:(NSString*)handler - parameters:(NSArray*)params - error:(NSDictionary**)error; - - -// Allows us to call a specific labeled handler in an AppleScript. -// Parameters for a labeled handler can be in any order, as long as the -// order of the params array corresponds to the order of the labels array -// such that labels are associated with their correct parameter values. -// -// Args: -// handler - name of the handler to call in the Applescript -// labels - the labels to associate with the parameters -// params - the parameters to pass to the handler -// count - number of labels/parameters -// error - in non-nil returns any error that may have occurred. -// -// Returns: -// The result of the handler being called. nil on failure. -- (NSAppleEventDescriptor*)gtm_executeLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count - error:(NSDictionary **)error; - -// Same as executeAppleEvent:error: except that it handles return values of -// script correctly. Return values containing scripts will have the -// typeGTMOSAID. Calling gtm_objectValue on a NSAppleEventDescriptor of -// typeGTMOSAID will resolve correctly to a script value. We don't use -// typeScript because that actually copies the script instead of returning the -// actual value. Therefore if you called executeAppleEvent:error: (instead of -// the GTM version) to execute an event that returns a script, you will -// get a completely new Applescript, instead of the actual script you wanted. If -// you are working with script information, use gtm_executeAppleEvent:error -// instead of executeAppleEvent:error: to avoid the problem. -- (NSAppleEventDescriptor *)gtm_executeAppleEvent:(NSAppleEventDescriptor *)event - error:(NSDictionary **)error; - -// The set of all handlers that are defined in this script and its parents. -// Remember that handlers that are defined in an sdef will have their -// eventclass/eventid as their handler instead of the name seen in the script. -// So: -// on open(a) -// blah -// end open -// won't be "open" it will be "aevtodoc". -- (NSSet*)gtm_handlers; - -// The set of all properties that are defined in this script and its parents. -// Note that properties can be strings or GTMNSFourCharCodes, so expect both -// coming back in the set. -- (NSSet*)gtm_properties; - -// Return a value for a property. Will look up the inheritence tree. -// Property must be an NSString or a GTMFourCharCode. -- (id)gtm_valueForProperty:(id)property; - -// Return a value for a property by type (eg pASParent). Will look up the -// inheritence tree -- (id)gtm_valueForPropertyEnum:(DescType)property; - -// Set a script property value. Returns YES/NO on success/failure. -// Property must be of kind NSString or GTMFourCharCode. -// If addingDefinition is YES, it will add a definition to the script -// if the value doesn't exist in the script or one of it's parents. -- (BOOL)gtm_setValue:(id)value - forProperty:(id)property - addingDefinition:(BOOL)adding; - -// Set a value for a property by type (eg pASParent). See note above -// for gtm_setValue:forProperty. -- (BOOL)gtm_setValue:(id)value - forPropertyEnum:(DescType)property - addingDefinition:(BOOL)adding; - -// Return YES if the script has an open documents (odoc) handler -// Does not require script compilation, so it's a fast check. -- (BOOL)gtm_hasOpenDocumentsHandler; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.m deleted file mode 100644 index 8c236495..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+Handler.m +++ /dev/null @@ -1,518 +0,0 @@ -// -// GTMNSAppleScript+Handler.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMNSAppleScript+Handler.h" -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMNSAppleEventDescriptor+Handler.h" -#import "GTMFourCharCode.h" -#import "GTMMethodCheck.h" -#import "GTMDebugThreadValidation.h" - -// Some private methods that we need to call -@interface NSAppleScript (NSPrivate) -+ (ComponentInstance)_defaultScriptingComponent; -- (OSAID) _compiledScriptID; -- (id)_initWithData:(NSData*)data error:(NSDictionary**)error; -- (id)_initWithScriptIDNoCopy:(OSAID)osaID; -+ (id)_infoForOSAError:(OSAError)error; -@end - -@interface NSMethodSignature (NSPrivate) -+ (id)signatureWithObjCTypes:(const char *)fp8; -@end - -// Our own private interfaces. -@interface NSAppleScript (GTMAppleScriptHandlerAdditionsPrivate) - -// Return an descriptor for a property. Properties are only supposed to be -// of type NSString or GTMFourCharCode. GTMFourCharCode's need special handling -// as they must be turned into NSAppleEventDescriptors of typeProperty. -- (NSAppleEventDescriptor*)gtm_descriptorForPropertyValue:(id)property; - -// Return an NSAppleEventDescriptor for a given property. -// |property| must be kind of class GTMFourCharCode -- (NSAppleEventDescriptor*)gtm_valueDescriptorForProperty:(id)property; - -// Utility routine for extracting multiple values in scripts and their -// parents. -- (NSSet*)gtm_allValuesUsingSelector:(SEL)selector; - -// Utility routine for extracting the handlers for a specific script without -// referring to parent scripts. -- (NSSet*)gtm_scriptHandlers; - -// Utility routine for extracting the properties for a specific script without -// referring to parent scripts. -- (NSSet*)gtm_scriptProperties; - -// Handles creating an NSAppleEventDescriptor from an OSAID -- (NSAppleEventDescriptor*)descForScriptID:(OSAID)scriptID - component:(ComponentInstance)component; - -// Utility methods for converting between real and generic OSAIDs. -- (OSAID)gtm_genericID:(OSAID)osaID forComponent:(ComponentInstance)component; -- (OSAID)gtm_realIDAndComponent:(ComponentInstance*)component; -@end - -@implementation NSAppleScript(GTMAppleScriptHandlerAdditions) -GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_descriptorWithPositionalHandler:parametersArray:); -GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_descriptorWithLabeledHandler:labels:parameters:count:); -GTM_METHOD_CHECK(NSAppleEventDescriptor, gtm_registerSelector:forTypes:count:); - -+ (void)load { - DescType types[] = { - typeScript - }; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_scriptValue) - forTypes:types - count:sizeof(types)/sizeof(DescType)]; - - DescType types2[] = { - 'evnt' // No type code for this one - }; - - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_eventValue) - forTypes:types2 - count:sizeof(types2)/sizeof(DescType)]; - - DescType types3[] = { - typeGTMOSAID - }; - - [NSAppleEventDescriptor gtm_registerSelector:@selector(gtm_osaIDValue) - forTypes:types3 - count:sizeof(types3)/sizeof(DescType)]; - [pool release]; -} - -- (NSAppleEventDescriptor *)gtm_executeAppleEvent:(NSAppleEventDescriptor *)event - error:(NSDictionary **)error { - GTMAssertRunningOnMainThread(); - if (![self isCompiled]) { - if (![self compileAndReturnError:error]) { - return nil; - } - } - NSAppleEventDescriptor *desc = nil; - ComponentInstance component; - OSAID scriptID = [self gtm_realIDAndComponent:&component]; - OSAID valueID; - OSAError err = OSAExecuteEvent(component, [event aeDesc], scriptID, - kOSAModeNull, &valueID); - if (err == noErr) { - // descForScriptID:component: is what sets this apart from the - // standard executeAppelEvent:error: in that it handles - // taking script results and turning them into AEDescs of typeGTMOSAID - // instead of typeScript. - desc = [self descForScriptID:valueID component:component]; - } - if (err && error) { - *error = [NSAppleScript _infoForOSAError:err]; - } - return desc; -} - -- (NSAppleEventDescriptor*)gtm_executePositionalHandler:(NSString*)handler - parameters:(NSArray*)params - error:(NSDictionary**)error { - NSAppleEventDescriptor *event - = [NSAppleEventDescriptor gtm_descriptorWithPositionalHandler:handler - parametersArray:params]; - return [self gtm_executeAppleEvent:event error:error]; -} - -- (NSAppleEventDescriptor*)gtm_executeLabeledHandler:(NSString*)handler - labels:(AEKeyword*)labels - parameters:(id*)params - count:(NSUInteger)count - error:(NSDictionary **)error { - NSAppleEventDescriptor *event - = [NSAppleEventDescriptor gtm_descriptorWithLabeledHandler:handler - labels:labels - parameters:params - count:count]; - return [self gtm_executeAppleEvent:event error:error]; -} - -- (NSSet*)gtm_handlers { - return [self gtm_allValuesUsingSelector:@selector(gtm_scriptHandlers)]; -} - -- (NSSet*)gtm_properties { - return [self gtm_allValuesUsingSelector:@selector(gtm_scriptProperties)]; -} - -// Set a value for a property by type (eg pASTopLevelScript) -- (BOOL)gtm_setValue:(id)value - forPropertyEnum:(DescType)property - addingDefinition:(BOOL)adding { - GTMFourCharCode *fcc - = [GTMFourCharCode fourCharCodeWithFourCharCode:property]; - return [self gtm_setValue:value forProperty:fcc addingDefinition:adding]; -} - -- (BOOL)gtm_setValue:(id)value - forProperty:(id)property - addingDefinition:(BOOL)adding{ - OSAError error = paramErr; - BOOL wasGood = NO; - NSAppleEventDescriptor *propertyName - = [self gtm_descriptorForPropertyValue:property]; - NSAppleEventDescriptor *desc = [value gtm_appleEventDescriptor]; - if (propertyName && desc) { - NSAppleScript *script = self; - OSAID valueID = kOSANullScript; - ComponentInstance component; - OSAID scriptID = [script gtm_realIDAndComponent:&component]; - error = OSACoerceFromDesc(component, - [desc aeDesc], - kOSAModeNull, - &valueID); - if (error == noErr) { - error = OSASetProperty(component, - adding ? kOSAModeNull : kOSAModeDontDefine, - scriptID, - [propertyName aeDesc], - valueID); - if (error == noErr) { - wasGood = YES; - } - } - } - if (!wasGood) { - _GTMDevLog(@"Unable to setValue:%@ forProperty:%@ from %@ (%d)", - value, property, self, error); - } - return wasGood; -} - -- (id)gtm_valueForProperty:(id)property { - return [[self gtm_valueDescriptorForProperty:property] gtm_objectValue]; -} - -- (id)gtm_valueForPropertyEnum:(DescType)property { - GTMFourCharCode *fcc = [GTMFourCharCode fourCharCodeWithFourCharCode:property]; - return [self gtm_valueForProperty:fcc]; -} - -- (NSAppleEventDescriptor*)gtm_appleEventDescriptor { - ComponentInstance component; - OSAID osaID = [self gtm_realIDAndComponent:&component]; - AEDesc result = { typeNull, NULL }; - NSAppleEventDescriptor *desc = nil; - OSAError error = OSACoerceToDesc(component, - osaID, - typeScript, - kOSAModeNull, - &result); - if (error == noErr) { - desc = [[[NSAppleEventDescriptor alloc] initWithAEDescNoCopy:&result] - autorelease]; - } else { - _GTMDevLog(@"Unable to coerce script %d", error); - } - return desc; -} - -- (BOOL)gtm_hasOpenDocumentsHandler { - ComponentInstance component; - OSAID osaID = [self gtm_realIDAndComponent:&component]; - long value = 0; - OSAError error = OSAGetScriptInfo(component, - osaID, - kASHasOpenHandler, - &value); - if (error) { - _GTMDevLog(@"Unable to get script info about open handler %d", error); - value = 0; - } - return value != 0; -} - -- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { - NSMethodSignature *signature = [super methodSignatureForSelector:aSelector]; - if (!signature) { - NSMutableString *types = [NSMutableString stringWithString:@"@@:"]; - NSString *selName = NSStringFromSelector(aSelector); - NSArray *selArray = [selName componentsSeparatedByString:@":"]; - NSUInteger count = [selArray count]; - for (NSUInteger i = 1; i < count; i++) { - [types appendString:@"@"]; - } - signature = [NSMethodSignature signatureWithObjCTypes:[types UTF8String]]; - } - return signature; -} - -- (void)forwardInvocation:(NSInvocation *)invocation { - SEL sel = [invocation selector]; - NSMutableString *handlerName - = [NSMutableString stringWithString:NSStringFromSelector(sel)]; - NSUInteger handlerOrigLength = [handlerName length]; - [handlerName replaceOccurrencesOfString:@":" - withString:@"" - options:0 - range:NSMakeRange(0,handlerOrigLength)]; - NSUInteger argCount = handlerOrigLength - [handlerName length]; - NSMutableArray *args = [NSMutableArray arrayWithCapacity:argCount]; - for (NSUInteger i = 0; i < argCount; ++i) { - id arg; - // +2 to ignore _sel and _cmd - [invocation getArgument:&arg atIndex:i + 2]; - [args addObject:arg]; - } - NSDictionary *error = nil; - NSAppleEventDescriptor *desc = [self gtm_executePositionalHandler:handlerName - parameters:args - error:&error]; - if ([[invocation methodSignature] methodReturnLength] > 0) { - id returnValue = [desc gtm_objectValue]; - [invocation setReturnValue:&returnValue]; - } -} -@end - -@implementation NSAppleScript (GTMAppleScriptHandlerAdditionsPrivate) - -- (NSAppleEventDescriptor*)gtm_descriptorForPropertyValue:(id)property { - NSAppleEventDescriptor *propDesc = nil; - if ([property isKindOfClass:[GTMFourCharCode class]]) { - propDesc = [property gtm_appleEventDescriptorOfType:typeProperty]; - } else if ([property isKindOfClass:[NSString class]]) { - propDesc = [property gtm_appleEventDescriptor]; - } - return propDesc; -} - -- (NSAppleEventDescriptor*)gtm_valueDescriptorForProperty:(id)property { - GTMAssertRunningOnMainThread(); - OSAError error = paramErr; - NSAppleEventDescriptor *desc = nil; - NSAppleEventDescriptor *propertyName - = [self gtm_descriptorForPropertyValue:property]; - if (propertyName) { - ComponentInstance component; - OSAID scriptID = [self gtm_realIDAndComponent:&component]; - OSAID valueID = kOSANullScript; - error = OSAGetProperty(component, - kOSAModeNull, - scriptID, - [propertyName aeDesc], - &valueID); - if (error == noErr) { - desc = [self descForScriptID:valueID component:component]; - } - } - if (error) { - _GTMDevLog(@"Unable to get valueForProperty:%@ from %@ (%d)", - property, self, error); - } - return desc; -} - -- (NSSet*)gtm_allValuesUsingSelector:(SEL)selector { - NSMutableSet *resultSet = [NSMutableSet set]; - NSAppleEventDescriptor *scriptDesc = [self gtm_appleEventDescriptor]; - NSMutableSet *scriptDescsWeveSeen = [NSMutableSet set]; - GTMFourCharCode *fcc = [GTMFourCharCode fourCharCodeWithFourCharCode:pASParent]; - Class appleScriptClass = [NSAppleScript class]; - while (scriptDesc) { - NSAppleScript *script = [scriptDesc gtm_objectValue]; - if ([script isKindOfClass:appleScriptClass]) { - NSData *data = [scriptDesc data]; - if (!data || [scriptDescsWeveSeen containsObject:data]) { - break; - } else { - [scriptDescsWeveSeen addObject:data]; - } - NSSet *newSet = [script performSelector:selector]; - [resultSet unionSet:newSet]; - scriptDesc = [script gtm_valueDescriptorForProperty:fcc]; - } else { - break; - } - } - return resultSet; -} - -- (NSSet*)gtm_scriptHandlers { - GTMAssertRunningOnMainThread(); - AEDescList names = { typeNull, NULL }; - NSArray *array = nil; - ComponentInstance component; - OSAID osaID = [self gtm_realIDAndComponent:&component]; - OSAError error = OSAGetHandlerNames(component, kOSAModeNull, osaID, &names); - if (error == noErr) { - NSAppleEventDescriptor *desc - = [[[NSAppleEventDescriptor alloc] initWithAEDescNoCopy:&names] - autorelease]; - array = [desc gtm_objectValue]; - } - if (error != noErr) { - _GTMDevLog(@"Error getting handlers: %d", error); // COV_NF_LINE - } - return [NSSet setWithArray:array]; -} - -- (NSSet*)gtm_scriptProperties { - GTMAssertRunningOnMainThread(); - AEDescList names = { typeNull, NULL }; - NSArray *array = nil; - ComponentInstance component; - OSAID osaID = [self gtm_realIDAndComponent:&component]; - OSAError error = OSAGetPropertyNames(component, kOSAModeNull, osaID, &names); - if (error == noErr) { - NSAppleEventDescriptor *desc - = [[[NSAppleEventDescriptor alloc] initWithAEDescNoCopy:&names] - autorelease]; - array = [desc gtm_objectValue]; - } - if (error != noErr) { - _GTMDevLog(@"Error getting properties: %d", error); // COV_NF_LINE - } - return [NSSet setWithArray:array]; -} - -- (OSAID)gtm_genericID:(OSAID)osaID forComponent:(ComponentInstance)component { - GTMAssertRunningOnMainThread(); - ComponentInstance genericComponent = [NSAppleScript _defaultScriptingComponent]; - OSAID exactID = osaID; - OSAError error = OSARealToGenericID(genericComponent, &exactID, component); - if (error != noErr) { - _GTMDevLog(@"Unable to get real id script: %@ %d", self, error); // COV_NF_LINE - exactID = kOSANullScript; // COV_NF_LINE - } - return exactID; -} - -- (NSAppleEventDescriptor*)descForScriptID:(OSAID)osaID - component:(ComponentInstance)component { - GTMAssertRunningOnMainThread(); - NSAppleEventDescriptor *desc = nil; - // If we have a script, return a typeGTMOSAID, otherwise convert it to - // it's default AEDesc using OSACoerceToDesc with typeWildCard. - long value = 0; - OSAError err = noErr; - if (osaID == 0) { - desc = [NSAppleEventDescriptor nullDescriptor]; - } else { - err = OSAGetScriptInfo(component, - osaID, - kOSAScriptBestType, - &value); - if (err == noErr) { - if (value == typeScript) { - osaID = [self gtm_genericID:osaID forComponent:component]; - desc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeGTMOSAID - bytes:&osaID - length:sizeof(osaID)]; - } else { - AEDesc aeDesc; - err = OSACoerceToDesc(component, - osaID, - typeWildCard, - kOSAModeNull, - &aeDesc); - if (err == noErr) { - desc = [[[NSAppleEventDescriptor alloc] - initWithAEDescNoCopy:&aeDesc] autorelease]; - } - } - } - } - if (err != noErr) { - _GTMDevLog(@"Unable to create desc for id:%d (%d)", osaID, err); // COV_NF_LINE - } - return desc; -} - -- (OSAID)gtm_realIDAndComponent:(ComponentInstance*)component { - GTMAssertRunningOnMainThread(); - if (![self isCompiled]) { - NSDictionary *error; - if (![self compileAndReturnError:&error]) { - _GTMDevLog(@"Unable to compile script: %@ %@", self, error); - return kOSANullScript; - } - } - OSAID genericID = [self _compiledScriptID]; - ComponentInstance genericComponent = [NSAppleScript _defaultScriptingComponent]; - OSAError error = OSAGenericToRealID(genericComponent, &genericID, component); - if (error != noErr) { - _GTMDevLog(@"Unable to get real id script: %@ %d", self, error); // COV_NF_LINE - genericID = kOSANullScript; // COV_NF_LINE - } - return genericID; -} - -@end - -// Private methods for dealing with Scripts/Events and NSAppleEventDescriptors -@interface NSAppleEventDescriptor (GTMAppleEventDescriptorScriptAdditions) - -// Return an NSAppleScript for a desc of typeScript. This will create a new -// Applescript that is a copy of the script that you want. -// Returns nil on failure. -- (NSAppleScript*)gtm_scriptValue; - -// Return an NSAppleScript for a desc of typeGTMOSAID. This will not copy the -// script, but will create an NSAppleScript wrapping the script represented -// by the OSAID. -// Returns nil on failure. -- (NSAppleScript*)gtm_osaIDValue; - -// Return a NSString with [eventClass][eventID] for typeEvent 'evnt' -- (NSString*)gtm_eventValue; -@end - - -@implementation NSAppleEventDescriptor (GMAppleEventDescriptorScriptAdditions) - -- (NSAppleScript*)gtm_scriptValue { - NSDictionary *error; - NSAppleScript *script = [[[NSAppleScript alloc] _initWithData:[self data] - error:&error] autorelease]; - if (!script) { - _GTMDevLog(@"Unable to create script: %@", error); // COV_NF_LINE - } - return script; -} - -- (NSAppleScript*)gtm_osaIDValue { - _GTMDevAssert([[self data] length] == sizeof(OSAID), nil); - OSAID osaID = *(const OSAID*)[[self data] bytes]; - return [[[NSAppleScript alloc] _initWithScriptIDNoCopy:osaID] autorelease]; -} - -- (NSString*)gtm_eventValue { - struct AEEventRecordStruct { - AEEventClass eventClass; - AEEventID eventID; - }; - NSData *data = [self data]; - const struct AEEventRecordStruct *record - = (const struct AEEventRecordStruct*)[data bytes]; - NSString *eClass = [GTMFourCharCode stringWithFourCharCode:record->eventClass]; - NSString *eID = [GTMFourCharCode stringWithFourCharCode:record->eventID]; - return [eClass stringByAppendingString:eID]; -} -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+HandlerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+HandlerTest.m deleted file mode 100644 index 44d0a0c6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSAppleScript+HandlerTest.m +++ /dev/null @@ -1,506 +0,0 @@ -// -// GTMNSAppleScript+HandlerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import -#import "GTMNSAppleScript+Handler.h" -#import "GTMNSAppleEventDescriptor+Foundation.h" -#import "GTMUnitTestDevLog.h" -#import "GTMGarbageCollection.h" -#import "GTMSystemVersion.h" -#import "GTMFourCharCode.h" - -@interface GTMNSAppleScript_HandlerTest : GTMTestCase { - NSAppleScript *script_; -} -@end - -@implementation GTMNSAppleScript_HandlerTest -- (void)invokeTest { - // NOTE: These tests are disabled in GC is on. See the comment/warning in the - // GTMNSAppleScript+Handler.h for more details, but we disable them to avoid - // the tests failing (crashing) when it's Apple's bug. Please bump the system - // check as appropriate when new systems are tested. Currently broken on - // 10.5.6 and below. Radar 6126682. - SInt32 major, minor, bugfix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugfix]; - if (!(GTMIsGarbageCollectionEnabled() - && major <= 10 && minor <= 5 && bugfix <= 6)) { - [super invokeTest]; - } else { - NSLog(@"--- %@ NOT run because of GC incompatibilites ---", [self name]); - } -} - -- (void)setUp { - NSBundle *bundle - = [NSBundle bundleForClass:[GTMNSAppleScript_HandlerTest class]]; - STAssertNotNil(bundle, nil); - NSString *path = [bundle pathForResource:@"GTMNSAppleEvent+HandlerTest" - ofType:@"scpt" - inDirectory:@"Scripts"]; - STAssertNotNil(path, [bundle description]); - NSDictionary *error = nil; - script_ - = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] - error:&error]; - STAssertNotNil(script_, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); -} - -- (void)tearDown { - [script_ release]; - script_ = nil; -} - -- (void)testExecuteAppleEvent { - NSString *source = @"on test()\nreturn 1\nend test"; - NSAppleScript *script - = [[[NSAppleScript alloc] initWithSource:source] autorelease]; - STAssertNotNil(script, nil); - NSDictionary *error = nil; - NSAppleEventDescriptor *desc = [script gtm_executePositionalHandler:@"test" - parameters:nil - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc gtm_objectValue], [NSNumber numberWithInt:1], nil); - - // bogus script - source = @"adf872345ba asdf asdf gr"; - script = [[[NSAppleScript alloc] initWithSource:source] autorelease]; - STAssertNotNil(script, nil); - desc = [script gtm_executePositionalHandler:@"test" - parameters:nil - error:&error]; - STAssertNil(desc, nil); - STAssertNotNil(error, @"Error should not be nil"); -} - -- (void)testHandlerNoParamsNoReturn { - NSDictionary *error = nil; - NSAppleEventDescriptor *desc = [script_ gtm_executePositionalHandler:@"test" - parameters:nil - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeNull, nil); - desc = [script_ gtm_executePositionalHandler:@"test" - parameters:[NSArray array] - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeNull, nil); - - //Applescript doesn't appear to get upset about extra params - desc = [script_ gtm_executePositionalHandler:@"test" - parameters:[NSArray arrayWithObject:@"foo"] - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeNull, nil); -} - -- (void)testHandlerNoParamsWithReturn { - NSDictionary *error = nil; - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"testReturnOne" - parameters:nil - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)1, nil); - desc = [script_ gtm_executePositionalHandler:@"testReturnOne" - parameters:[NSArray array] - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)1, nil); - - //Applescript doesn't appear to get upset about extra params - desc = [script_ gtm_executePositionalHandler:@"testReturnOne" - parameters:[NSArray arrayWithObject:@"foo"] - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)1, nil); -} - -- (void)testHandlerOneParamWithReturn { - NSDictionary *error = nil; - // Note case change in executeHandler call - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"testreturnParam" - parameters:nil - error:&error]; - STAssertNil(desc, @"Desc should by nil %@", desc); - STAssertNotNil(error, nil); - error = nil; - - desc = [script_ gtm_executePositionalHandler:@"testReturnParam" - parameters:[NSArray array] - error:&error]; - STAssertNil(desc, @"Desc should by nil %@", desc); - STAssertNotNil(error, nil); - error = nil; - - desc = [script_ gtm_executePositionalHandler:@"testReturnParam" - parameters:[NSArray arrayWithObject:@"foo"] - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeUnicodeText, nil); - STAssertEqualObjects([desc gtm_objectValue], @"foo", nil); -} - -- (void)testHandlerTwoParamsWithReturn { - NSDictionary *error = nil; - // Note case change in executeHandler call - // Test case and empty params - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"testADDPArams" - parameters:nil - error:&error]; - STAssertNil(desc, @"Desc should by nil %@", desc); - STAssertNotNil(error, nil); - - // Test empty params - error = nil; - desc = [script_ gtm_executePositionalHandler:@"testAddParams" - parameters:[NSArray array] - error:&error]; - STAssertNil(desc, @"Desc should by nil %@", desc); - STAssertNotNil(error, nil); - - error = nil; - NSArray *args = [NSArray arrayWithObjects: - [NSNumber numberWithInt:1], - [NSNumber numberWithInt:2], - nil]; - desc = [script_ gtm_executePositionalHandler:@"testAddParams" - parameters:args - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)3, nil); - - // Test bad params - error = nil; - args = [NSArray arrayWithObjects: - @"foo", - @"bar", - nil]; - desc = [script_ gtm_executePositionalHandler:@"testAddParams" - parameters:args - error:&error]; - STAssertNil(desc, @"Desc should by nil %@", desc); - STAssertNotNil(error, nil); - - // Test too many params. Currently Applescript allows this so it should pass - error = nil; - args = [NSArray arrayWithObjects: - [NSNumber numberWithInt:1], - [NSNumber numberWithInt:2], - [NSNumber numberWithInt:3], - nil]; - desc = [script_ gtm_executePositionalHandler:@"testAddParams" - parameters:args - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)3, nil);} - -- (void)testLabeledHandler { - NSDictionary *error = nil; - AEKeyword labels[] = { keyDirectObject, - keyASPrepositionOnto, - keyASPrepositionGiven }; - id params[3]; - params[0] = [NSNumber numberWithInt:1]; - params[1] = [NSNumber numberWithInt:3]; - params[2] = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:4] - forKey:@"othervalue"]; - - NSAppleEventDescriptor *desc - = [script_ gtm_executeLabeledHandler:@"testAdd" - labels:labels - parameters:params - count:sizeof(params) / sizeof(id) - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)8, nil); - - // Test too many params. Currently Applescript allows this so it should pass - AEKeyword labels2[] = { keyDirectObject, - keyASPrepositionOnto, - keyASPrepositionBetween, - keyASPrepositionGiven }; - id params2[4]; - params2[0] = [NSNumber numberWithInt:1]; - params2[1] = [NSNumber numberWithInt:3]; - params2[2] = [NSNumber numberWithInt:5]; - params2[3] = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:4] - forKey:@"othervalue"]; - - error = nil; - desc = [script_ gtm_executeLabeledHandler:@"testAdd" - labels:labels2 - parameters:params2 - count:sizeof(params2) / sizeof(id) - error:&error]; - STAssertNotNil(desc, [error description]); - STAssertNil(error, @"Error should be nil. Error = %@", [error description]); - STAssertEquals([desc descriptorType], (DescType)typeSInt32, nil); - STAssertEquals([desc int32Value], (SInt32)8, nil);} - -- (void)testHandlers { - NSSet *handlers = [script_ gtm_handlers]; - NSSet *expected = [NSSet setWithObjects: - @"aevtpdoc", - @"test", - @"testreturnone", - @"testreturnparam", - @"testaddparams", - @"testadd", - @"testgetscript", - nil]; - if ([GTMSystemVersion isBuildEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // Workaround for bug in SnowLeopard - // rdar://66688601 OSAGetHandlersNames returns names in camelcase instead - // of smallcaps. - handlers = [handlers valueForKey:@"lowercaseString"]; - } - STAssertEqualObjects(handlers, expected, @"Unexpected handlers?"); -} - -- (void)testInheritedHandlers { - NSDictionary *error = nil; - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"testGetScript" - parameters:nil - error:&error]; - STAssertNil(error, nil); - STAssertNotNil(desc, nil); - NSAppleScript *script = [desc gtm_objectValue]; - STAssertTrue([script isKindOfClass:[NSAppleScript class]], nil); - error = nil; - desc = [script gtm_executePositionalHandler:@"parentTestScriptFunc" - parameters:nil error:&error]; - STAssertNil(error, nil); - STAssertNotNil(desc, nil); - NSString *value = [desc gtm_objectValue]; - STAssertEqualObjects(value, @"parent", nil); -} - -- (void)testProperties { - NSDictionary *error = nil; - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"testGetScript" - parameters:nil - error:&error]; - STAssertNil(error, nil); - STAssertNotNil(desc, nil); - NSAppleScript *script = [desc gtm_objectValue]; - STAssertTrue([script isKindOfClass:[NSAppleScript class]], nil); - - NSSet *properties = [script gtm_properties]; - NSSet *expected - = [NSSet setWithObjects: - @"testscriptproperty", - @"parenttestscriptproperty", - @"foo", - @"testscript", - @"parenttestscript", - @"asdscriptuniqueidentifier", - [GTMFourCharCode fourCharCodeWithFourCharCode:pVersion], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASPrintDepth], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASTopLevelScript], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASResult], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASMinutes], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASDays], - // No constant for linefeed in the 10.5 sdk - // Radar 6132775 Need a constant for the Applescript Property 'lnfd' - [GTMFourCharCode fourCharCodeWithFourCharCode:'lnfd'], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASPi], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASReturn], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASSpace], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASPrintLength], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASQuote], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASWeeks], - [GTMFourCharCode fourCharCodeWithFourCharCode:pTextItemDelimiters], - // Applescript properties should be pASSeconds, but - // on 10.5.4/10.5.5 it is actually using cSeconds. - // Radar 6132696 Applescript root level property is cSeconds - // instead of pASSeconds - [GTMFourCharCode fourCharCodeWithFourCharCode:cSeconds], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASHours], - [GTMFourCharCode fourCharCodeWithFourCharCode:pASTab], - nil]; - if ([GTMSystemVersion isBuildEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // Workaround for bug in SnowLeopard - // rdar://6289077 OSAGetPropertyNames returns names in camelcase instead - // of lowercase. - properties = [properties valueForKey:@"lowercaseString"]; - } - STAssertEqualObjects(properties, expected, @"Unexpected properties?"); - id value = [script gtm_valueForProperty:@"testScriptProperty"]; - STAssertEqualObjects(value, [NSNumber numberWithInt:5], @"bad property?"); - BOOL goodSet = [script gtm_setValue:@"bar" - forProperty:@"foo" - addingDefinition:NO]; - STAssertTrue(goodSet, @"Couldn't set property"); - - // Test local set - value = [script gtm_valueForProperty:@"foo"]; - STAssertEqualObjects(value, @"bar", @"bad property?"); - - // Test inherited set - value = [script_ gtm_valueForProperty:@"foo"]; - STAssertEqualObjects(value, @"bar", @"bad property?"); - - [GTMUnitTestDevLog expectPattern:@"Unable to setValue:bar forProperty:" - "\\(null\\) from \\(-50\\)"]; - goodSet = [script gtm_setValue:@"bar" - forProperty:nil - addingDefinition:NO]; - STAssertFalse(goodSet, @"Set property?"); - - [GTMUnitTestDevLog expectPattern:@"Unable to setValue:bar forProperty:3" - " from \\(-50\\)"]; - goodSet = [script gtm_setValue:@"bar" - forProperty:[NSNumber numberWithInt:3] - addingDefinition:YES]; - STAssertFalse(goodSet, @"Set property?"); - - - [GTMUnitTestDevLog expectPattern:@"Unable to get valueForProperty:gargle " - "from \\(-1753\\)"]; - value = [script gtm_valueForProperty:@"gargle"]; - STAssertNil(value, @"Property named gargle?"); - - goodSet = [script_ gtm_setValue:@"wow" - forProperty:@"addedProperty" - addingDefinition:YES]; - STAssertTrue(goodSet, @"Unable to addProperty"); - - value = [script gtm_valueForProperty:@"addedProperty"]; - STAssertNotNil(value, nil); - STAssertEqualObjects(value, @"wow", nil); - - // http://www.straightdope.com/classics/a3_341.html - NSNumber *newPI = [NSNumber numberWithInt:3]; - goodSet = [script gtm_setValue:newPI - forPropertyEnum:pASPi - addingDefinition:NO]; - STAssertTrue(goodSet, @"Unable to set property"); - value = [script_ gtm_valueForPropertyEnum:pASPi]; - STAssertNotNil(value, nil); - STAssertEqualObjects(value, newPI, @"bad property"); -} - -- (void)testFailures { - NSDictionary *error = nil; - NSAppleEventDescriptor *desc - = [script_ gtm_executePositionalHandler:@"noSuchTest" - parameters:nil - error:&error]; - STAssertNil(desc, nil); - STAssertNotNil(error, nil); - - // Test with empty handler name - error = nil; - desc = [script_ gtm_executePositionalHandler:@"" - parameters:[NSArray array] - error:&error]; - STAssertNil(desc, nil); - STAssertNotNil(error, nil); - - // Test with nil handler - error = nil; - desc = [script_ gtm_executePositionalHandler:nil - parameters:[NSArray array] - error:&error]; - STAssertNil(desc, nil); - STAssertNotNil(error, nil); - - // Test with nil handler and nil error - desc = [script_ gtm_executePositionalHandler:nil - parameters:nil - error:nil]; - STAssertNil(desc, nil); - - // Test with a bad script - NSAppleScript *script - = [[[NSAppleScript alloc] initWithSource:@"david hasselhoff"] autorelease]; - [GTMUnitTestDevLog expectPattern:@"Unable to compile script: .*"]; - [GTMUnitTestDevLog expectString:@"Unable to coerce script -2147450879"]; - NSSet *handlers = [script gtm_handlers]; - STAssertEquals([handlers count], (NSUInteger)0, @"Should have no handlers"); - [GTMUnitTestDevLog expectPattern:@"Unable to compile script: .*"]; - [GTMUnitTestDevLog expectString:@"Unable to coerce script -2147450879"]; - NSSet *properties = [script gtm_properties]; - STAssertEquals([properties count], - (NSUInteger)0, - @"Should have no properties"); - [GTMUnitTestDevLog expectPattern:@"Unable to compile script: .*"]; - [GTMUnitTestDevLog expectString:@"Unable to get script info about " - @"open handler -2147450879"]; - STAssertFalse([script gtm_hasOpenDocumentsHandler], - @"Has an opendoc handler?"); -} - -- (void)testScriptDescriptors { - NSAppleEventDescriptor *desc = [script_ gtm_appleEventDescriptor]; - STAssertNotNil(desc, @"Couldn't make a script desc"); - NSAppleScript *script = [desc gtm_objectValue]; - STAssertNotNil(script, @"Couldn't get a script back"); - NSSet *handlers = [script gtm_handlers]; - STAssertNotNil(handlers, @"Couldn't get handlers"); -} - -- (void)testOpenHandler { - STAssertFalse([script_ gtm_hasOpenDocumentsHandler], nil); - id script = [script_ gtm_valueForProperty:@"testscript"]; - STAssertNotNil(script, nil); - STAssertTrue([script gtm_hasOpenDocumentsHandler], nil); -} - - -@protocol ScriptInterface -- (id)test; -- (id)testReturnParam:(id)param; -- (id)testAddParams:(id)param1 :(id)param2; -@end - -- (void)testForwarding { - id foo = (id)script_; - [foo test]; - NSNumber *val = [foo testReturnParam:[NSNumber numberWithInt:2]]; - STAssertEquals([val intValue], 2, @"should be 2"); - val = [foo testAddParams:[NSNumber numberWithInt:2] - :[NSNumber numberWithInt:3]]; - STAssertEquals([val intValue], 5, @"should be 5"); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.h deleted file mode 100644 index 8140f804..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// GTMNSArray+Merge.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// Extension to NSArray to allow merging of arrays. -// -@interface NSArray (GTMNSArrayMergingAdditions) - -// Merge our array with |newArray| by sorting each array then merging the -// two arrays. If |merger| is provided then call that method on any old -// items that compare as equal to a new item, passing the new item as -// the only argument. If |merger| is not provided, then insert new items -// in front of matching old items. If neither array has any items then -// nil is returned. -// -// The signature of the |merger| is: -// - (id)merge:(id)newItem; -// -// Returns a new, sorted array. -- (NSArray *)gtm_mergeArray:(NSArray *)newArray - mergeSelector:(SEL)merger; - -// Same as above, only |comparer| is used to sort/compare the objects, just like -// -[NSArray sortedArrayUsingSelector]. If |comparer| is nil, nil is returned. -- (NSArray *)gtm_mergeArray:(NSArray *)newArray - compareSelector:(SEL)comparer - mergeSelector:(SEL)merger; - -@end - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.m deleted file mode 100644 index 5bf07c8f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+Merge.m +++ /dev/null @@ -1,111 +0,0 @@ -// -// GTMNSArray+Merge.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. -// - -#import "GTMNSArray+Merge.h" - -#import "GTMDefines.h" - -#if GTM_IPHONE_SDK -#import -#else // GTM_IPHONE_SDK -#import -#endif // GTM_IPHONE_SDK - -@implementation NSArray (GTMNSArrayMergingAdditions) - -- (NSArray *)gtm_mergeArray:(NSArray *)newArray - mergeSelector:(SEL)merger { - return [self gtm_mergeArray:newArray - compareSelector:@selector(compare:) - mergeSelector:merger]; -} - -- (NSArray *)gtm_mergeArray:(NSArray *)newArray - compareSelector:(SEL)comparer - mergeSelector:(SEL)merger { - // must have a compare selector - if (!comparer) return nil; - - // Sort and merge the contents of |self| with |newArray|. - NSArray *sortedMergedArray = nil; - if ([self count] && [newArray count]) { - NSMutableArray *mergingArray = [NSMutableArray arrayWithArray:self]; - [mergingArray sortUsingSelector:comparer]; - NSArray *sortedNewArray - = [newArray sortedArrayUsingSelector:comparer]; - - NSUInteger oldIndex = 0; - NSUInteger oldCount = [mergingArray count]; - id oldItem = (oldIndex < oldCount) - ? [mergingArray objectAtIndex:0] - : nil; - - id newItem = nil; - GTM_FOREACH_OBJECT(newItem, sortedNewArray) { - BOOL stillLooking = YES; - while (oldIndex < oldCount && stillLooking) { - // We must take care here, since Intel leaves junk in high bytes of - // return register for predicates that return BOOL. - // For details see: - // http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_23.html - // and - // http://www.red-sweater.com/blog/320/abusing-objective-c-with-class#comment-83187 - NSComparisonResult result - = ((NSComparisonResult (*)(id, SEL, id))objc_msgSend)(newItem, comparer, oldItem); - if (result == NSOrderedSame && merger) { - // It's a match! - id repItem = [oldItem performSelector:merger - withObject:newItem]; - [mergingArray replaceObjectAtIndex:oldIndex - withObject:repItem]; - ++oldIndex; - oldItem = (oldIndex < oldCount) - ? [mergingArray objectAtIndex:oldIndex] - : nil; - stillLooking = NO; - } else if (result == NSOrderedAscending - || (result == NSOrderedSame && !merger)) { - // This is either a new item and belongs right here, or it's - // a match to an existing item but we're not merging. - [mergingArray insertObject:newItem - atIndex:oldIndex]; - ++oldIndex; - ++oldCount; - stillLooking = NO; - } else { - ++oldIndex; - oldItem = (oldIndex < oldCount) - ? [mergingArray objectAtIndex:oldIndex] - : nil; - } - } - if (stillLooking) { - // Once we get here, the rest of the new items get appended. - [mergingArray addObject:newItem]; - } - } - sortedMergedArray = mergingArray; - } else if ([self count]) { - sortedMergedArray = [self sortedArrayUsingSelector:comparer]; - } else if ([newArray count]) { - sortedMergedArray = [newArray sortedArrayUsingSelector:comparer]; - } - return sortedMergedArray; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+MergeTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+MergeTest.m deleted file mode 100644 index 0d8eb81f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSArray+MergeTest.m +++ /dev/null @@ -1,219 +0,0 @@ -// -// GTMNSArray+MergeTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSArray+Merge.h" - -@interface GTMNSArray_MergeTest : GTMTestCase -@end - - -@interface NSString (GTMStringMergingTestAdditions) - -- (NSString *)mergeString:(NSString *)stringB; - -@end - - -@implementation GTMNSArray_MergeTest - -- (void)testMergingTwoEmptyArrays { - NSArray *emptyArrayA = [NSArray array]; - NSArray *emptyArrayB = [NSArray array]; - NSArray *mergedArray = [emptyArrayA gtm_mergeArray:emptyArrayB - mergeSelector:nil]; - STAssertNil(mergedArray, - @"merge of two empty arrays with no merger should render nil"); -} - -- (void)testMergingTwoEmptyArraysWithMerger { - NSArray *emptyArrayA = [NSArray array]; - NSArray *emptyArrayB = [NSArray array]; - NSArray *mergedArray - = [emptyArrayA gtm_mergeArray:emptyArrayB - mergeSelector:@selector(mergeString:)]; - STAssertNil(mergedArray, - @"merge of two empty arrays with merger should render nil"); -} - -- (void)testMergingEmptyWithNilArray { - NSArray *emptyArrayA = [NSArray array]; - NSArray *nilArrayB = nil; - NSArray *mergedArray = [emptyArrayA gtm_mergeArray:nilArrayB - mergeSelector:nil]; - STAssertNil(mergedArray, - @"merge of empty with nil array with no merger should render nil"); -} - -- (void)testMergingEmptyWithNilArrayWithMerger { - NSArray *emptyArrayA = [NSArray array]; - NSArray *nilArrayB = nil; - NSArray *mergedArray - = [emptyArrayA gtm_mergeArray:nilArrayB - mergeSelector:@selector(mergeObject:)]; - STAssertNil(mergedArray, - @"merge of empty with nil array with merger should render nil"); -} - -- (void)testMergingTwoOneItemArraysThatDontMatch { - NSArray *arrayA = [NSArray arrayWithObject:@"abc.def"]; - NSArray *arrayB = [NSArray arrayWithObject:@"abc.ghi"]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:nil]; - STAssertNotNil(mergedArray, - @"merge of two non empty arrays with no merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)2, - @"merged array should have two items"); - STAssertEqualObjects([mergedArray objectAtIndex:0], @"abc.def", nil); - STAssertEqualObjects([mergedArray objectAtIndex:1], @"abc.ghi", nil); -} - -- (void)testMergingTwoOneItemArraysThatDontMatchWithMerger { - NSArray *arrayA = [NSArray arrayWithObject:@"abc.def"]; - NSArray *arrayB = [NSArray arrayWithObject:@"abc.ghi"]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:@selector(mergeString:)]; - STAssertNotNil(mergedArray, - @"merge of two non empty arrays with merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)2, - @"merged array should have two items"); - STAssertEqualObjects([mergedArray objectAtIndex:0], @"abc.def", nil); - STAssertEqualObjects([mergedArray objectAtIndex:1], @"abc.ghi", nil); -} - -- (void)testMergingTwoOneItemArraysThatMatch { - NSArray *arrayA = [NSArray arrayWithObject:@"abc.def"]; - NSArray *arrayB = [NSArray arrayWithObject:@"abc.def"]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:nil]; - STAssertNotNil(mergedArray, - @"merge of two matching arrays with no merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)2, - @"merged array with no merger should have two items"); - STAssertEqualObjects([mergedArray objectAtIndex:0], @"abc.def", nil); - STAssertEqualObjects([mergedArray objectAtIndex:1], @"abc.def", nil); -} - -- (void)testMergingTwoOneItemArraysThatMatchWithMerger { - NSArray *arrayA = [NSArray arrayWithObject:@"abc.def"]; - NSArray *arrayB = [NSArray arrayWithObject:@"abc.def"]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:@selector(mergeString:)]; - STAssertNotNil(mergedArray, - @"merge of two matching arrays with merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)1, - @"merged array with merger should have one items"); - STAssertEqualObjects([mergedArray objectAtIndex:0], @"abc.def", nil); -} - -- (void)testMergingMultipleItemArray { - NSArray *arrayA = [NSArray arrayWithObjects: - @"Kansas", - @"Arkansas", - @"Wisconson", - @"South Carolina", - nil]; - NSArray *arrayB = [NSArray arrayWithObjects: - @"South Carolina", - @"Quebec", - @"British Columbia", - @"Arkansas", - @"South Hamptom", - nil]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:nil]; - STAssertNotNil(mergedArray, - @"merge of two non empty arrays with no merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)9, - @"merged array should have 9 items"); -} - -- (void)testMergingMultipleItemArrayWithMerger { - NSArray *arrayA = [NSArray arrayWithObjects: - @"Kansas", - @"Arkansas", - @"Wisconson", - @"South Carolina", - nil]; - NSArray *arrayB = [NSArray arrayWithObjects: - @"South Carolina", - @"Quebec", - @"British Columbia", - @"Arkansas", - @"South Hamptom", - nil]; - NSArray *mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:@selector(mergeString:)]; - STAssertNotNil(mergedArray, - @"merge of two non empty arrays with merger should render " - @"an array"); - STAssertEquals([mergedArray count], (NSUInteger)7, - @"merged array should have 7 items"); -} - -- (void)testMergeWithEmptyArrays { - NSArray *arrayA = [NSArray arrayWithObjects:@"xyz", @"abc", @"mno", nil]; - NSArray *arrayB = [NSArray array]; - NSArray *expected = [NSArray arrayWithObjects:@"abc", @"mno", @"xyz", nil]; - STAssertNotNil(arrayA, nil); - STAssertNotNil(arrayB, nil); - STAssertNotNil(expected, nil); - NSArray *mergedArray; - - // no merger - mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:nil]; - STAssertNotNil(mergedArray, nil); - STAssertEqualObjects(mergedArray, expected, nil); - - // w/ merger - mergedArray = [arrayA gtm_mergeArray:arrayB - mergeSelector:@selector(mergeString:)]; - STAssertNotNil(mergedArray, nil); - STAssertEqualObjects(mergedArray, expected, nil); - - // no merger and array args reversed - mergedArray = [arrayB gtm_mergeArray:arrayA - mergeSelector:nil]; - STAssertNotNil(mergedArray, nil); - STAssertEqualObjects(mergedArray, expected, nil); - - // w/ merger and array args reversed - mergedArray = [arrayB gtm_mergeArray:arrayA - mergeSelector:@selector(mergeString:)]; - STAssertNotNil(mergedArray, nil); - STAssertEqualObjects(mergedArray, expected, nil); - -} - -@end - - -@implementation NSString (GTMStringMergingTestAdditions) - -- (NSString *)mergeString:(NSString *)stringB { - return stringB; -} - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.h deleted file mode 100644 index df31d24c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// GTMNSData+zlib.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -/// Helpers for dealing w/ zlib inflate/deflate calls. -@interface NSData (GTMZLibAdditions) - -/// Return an autoreleased NSData w/ the result of gzipping the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data; - -/// Return an autoreleased NSData w/ the result of gzipping the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level; - -// NOTE: deflate is *NOT* gzip. deflate is a "zlib" stream. pick which one -// you really want to create. (the inflate api will handle either) - -/// Return an autoreleased NSData w/ the result of deflating the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data; - -/// Return an autoreleased NSData w/ the result of deflating the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level; - - -/// Return an autoreleased NSData w/ the result of decompressing the bytes. -// -// The bytes to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length; - -/// Return an autoreleased NSData w/ the result of decompressing the payload of |data|. -// -// The data to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingData:(NSData *)data; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.m deleted file mode 100644 index 8ba1ddca..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlib.m +++ /dev/null @@ -1,267 +0,0 @@ -// -// GTMNSData+zlib.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSData+zlib.h" -#import -#import "GTMDefines.h" - -#define kChunkSize 1024 - -@interface NSData (GTMZlibAdditionsPrivate) -+ (NSData *)gtm_dataByCompressingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - useGzip:(BOOL)useGzip; -@end - -@implementation NSData (GTMZlibAdditionsPrivate) -+ (NSData *)gtm_dataByCompressingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - useGzip:(BOOL)useGzip { - if (!bytes || !length) { - return nil; - } - - // TODO: support 64bit inputs - // avail_in is a uInt, so if length > UINT_MAX we actually need to loop - // feeding the data until we've gotten it all in. not supporting this - // at the moment. - _GTMDevAssert(length <= UINT_MAX, @"Currently don't support >32bit lengths"); - - if (level == Z_DEFAULT_COMPRESSION) { - // the default value is actually outside the range, so we have to let it - // through specifically. - } else if (level < Z_BEST_SPEED) { - level = Z_BEST_SPEED; - } else if (level > Z_BEST_COMPRESSION) { - level = Z_BEST_COMPRESSION; - } - - z_stream strm; - bzero(&strm, sizeof(z_stream)); - - int windowBits = 15; // the default - int memLevel = 8; // the default - if (useGzip) { - windowBits += 16; // enable gzip header instead of zlib header - } - int retCode; - if ((retCode = deflateInit2(&strm, level, Z_DEFLATED, windowBits, - memLevel, Z_DEFAULT_STRATEGY)) != Z_OK) { - // COV_NF_START - no real way to force this in a unittest (we guard all args) - _GTMDevLog(@"Failed to init for deflate w/ level %d, error %d", - level, retCode); - return nil; - // COV_NF_END - } - - // hint the size at 1/4 the input size - NSMutableData *result = [NSMutableData dataWithCapacity:(length/4)]; - unsigned char output[kChunkSize]; - - // setup the input - strm.avail_in = (unsigned int)length; - strm.next_in = (unsigned char*)bytes; - - // loop to collect the data - do { - // update what we're passing in - strm.avail_out = kChunkSize; - strm.next_out = output; - retCode = deflate(&strm, Z_FINISH); - if ((retCode != Z_OK) && (retCode != Z_STREAM_END)) { - // COV_NF_START - no real way to force this in a unittest - // (in inflate, we can feed bogus/truncated data to test, but an error - // here would be some internal issue w/in zlib, and there isn't any real - // way to test it) - _GTMDevLog(@"Error trying to deflate some of the payload, error %d", - retCode); - deflateEnd(&strm); - return nil; - // COV_NF_END - } - // collect what we got - unsigned gotBack = kChunkSize - strm.avail_out; - if (gotBack > 0) { - [result appendBytes:output length:gotBack]; - } - - } while (retCode == Z_OK); - - // if the loop exits, we used all input and the stream ended - _GTMDevAssert(strm.avail_in == 0, - @"thought we finished deflate w/o using all input, %u bytes left", - strm.avail_in); - _GTMDevAssert(retCode == Z_STREAM_END, - @"thought we finished deflate w/o getting a result of stream end, code %d", - retCode); - - // clean up - deflateEnd(&strm); - - return result; -} // gtm_dataByCompressingBytes:length:compressionLevel:useGzip: - - -@end - - -@implementation NSData (GTMZLibAdditions) - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:Z_DEFAULT_COMPRESSION - useGzip:YES]; -} // gtm_dataByGzippingBytes:length: - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:Z_DEFAULT_COMPRESSION - useGzip:YES]; -} // gtm_dataByGzippingData: - -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:level - useGzip:YES]; -} // gtm_dataByGzippingBytes:length:level: - -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:level - useGzip:YES]; -} // gtm_dataByGzippingData:level: - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:Z_DEFAULT_COMPRESSION - useGzip:NO]; -} // gtm_dataByDeflatingBytes:length: - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:Z_DEFAULT_COMPRESSION - useGzip:NO]; -} // gtm_dataByDeflatingData: - -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level { - return [self gtm_dataByCompressingBytes:bytes - length:length - compressionLevel:level - useGzip:NO]; -} // gtm_dataByDeflatingBytes:length:level: - -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level { - return [self gtm_dataByCompressingBytes:[data bytes] - length:[data length] - compressionLevel:level - useGzip:NO]; -} // gtm_dataByDeflatingData:level: - -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length { - if (!bytes || !length) { - return nil; - } - - // TODO: support 64bit inputs - // avail_in is a uInt, so if length > UINT_MAX we actually need to loop - // feeding the data until we've gotten it all in. not supporting this - // at the moment. - _GTMDevAssert(length <= UINT_MAX, @"Currently don't support >32bit lengths"); - - z_stream strm; - bzero(&strm, sizeof(z_stream)); - - // setup the input - strm.avail_in = (unsigned int)length; - strm.next_in = (unsigned char*)bytes; - - int windowBits = 15; // 15 to enable any window size - windowBits += 32; // and +32 to enable zlib or gzip header detection. - int retCode; - if ((retCode = inflateInit2(&strm, windowBits)) != Z_OK) { - // COV_NF_START - no real way to force this in a unittest (we guard all args) - _GTMDevLog(@"Failed to init for inflate, error %d", retCode); - return nil; - // COV_NF_END - } - - // hint the size at 4x the input size - NSMutableData *result = [NSMutableData dataWithCapacity:(length*4)]; - unsigned char output[kChunkSize]; - - // loop to collect the data - do { - // update what we're passing in - strm.avail_out = kChunkSize; - strm.next_out = output; - retCode = inflate(&strm, Z_NO_FLUSH); - if ((retCode != Z_OK) && (retCode != Z_STREAM_END)) { - _GTMDevLog(@"Error trying to inflate some of the payload, error %d", - retCode); - inflateEnd(&strm); - return nil; - } - // collect what we got - unsigned gotBack = kChunkSize - strm.avail_out; - if (gotBack > 0) { - [result appendBytes:output length:gotBack]; - } - - } while (retCode == Z_OK); - - // make sure there wasn't more data tacked onto the end of a valid compressed - // stream. - if (strm.avail_in != 0) { - _GTMDevLog(@"thought we finished inflate w/o using all input, %u bytes left", - strm.avail_in); - result = nil; - } - // the only way out of the loop was by hitting the end of the stream - _GTMDevAssert(retCode == Z_STREAM_END, - @"thought we finished inflate w/o getting a result of stream end, code %d", - retCode); - - // clean up - inflateEnd(&strm); - - return result; -} // gtm_dataByInflatingBytes:length: - -+ (NSData *)gtm_dataByInflatingData:(NSData *)data { - return [self gtm_dataByInflatingBytes:[data bytes] - length:[data length]]; -} // gtm_dataByInflatingData: - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlibTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlibTest.m deleted file mode 100644 index 0d868864..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSData+zlibTest.m +++ /dev/null @@ -1,360 +0,0 @@ -// -// GTMNSData+zlibTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMUnitTestDevLog.h" -#import "GTMNSData+zlib.h" -#import // for randiom/srandomdev -#import - -@interface GTMNSData_zlibTest : GTMTestCase -@end - -// NOTE: we don't need to test the actually compressor/inflation (we're using -// zlib, it works), we just need to test our wrapper. So we can use canned -// data, etc. (and yes, when using random data, things once failed because -// we generated a random block of data that was valid compressed data?!) - -static unsigned char randomDataLarge[] = { - // openssl rand -rand /dev/random 512 | xxd -i - 0xe1, 0xa6, 0xe2, 0xa2, 0x0b, 0xf7, 0x8d, 0x6b, 0x31, 0xfe, 0xaa, 0x64, - 0x50, 0xbe, 0x52, 0x7e, 0x83, 0x74, 0x00, 0x8f, 0x62, 0x96, 0xc7, 0xe9, - 0x20, 0x59, 0x78, 0xc6, 0xea, 0x10, 0xd5, 0xdb, 0x3f, 0x6b, 0x13, 0xd9, - 0x44, 0x18, 0x24, 0x17, 0x63, 0xc8, 0x74, 0xa5, 0x37, 0x6c, 0x9c, 0x00, - 0xe5, 0xcf, 0x0a, 0xdf, 0xb9, 0x66, 0xb1, 0xbd, 0x04, 0x8f, 0x55, 0x9e, - 0xb0, 0x24, 0x4e, 0xf0, 0xc4, 0x69, 0x2c, 0x1f, 0x63, 0x9f, 0x41, 0xa8, - 0x89, 0x9b, 0x98, 0x00, 0xb6, 0x78, 0xf7, 0xe4, 0x4c, 0x72, 0x14, 0x84, - 0xaa, 0x3d, 0xc1, 0x42, 0x9f, 0x12, 0x85, 0xdd, 0x16, 0x8b, 0x8f, 0x67, - 0xe0, 0x26, 0x5b, 0x5e, 0xaa, 0xe7, 0xd3, 0x67, 0xfe, 0x21, 0x77, 0xa6, - 0x52, 0xde, 0x33, 0x8b, 0x96, 0x49, 0x6a, 0xd6, 0x58, 0x58, 0x36, 0x00, - 0x23, 0xd2, 0x45, 0x13, 0x9f, 0xd9, 0xc7, 0x2d, 0x55, 0x12, 0xb4, 0xfe, - 0x53, 0x27, 0x1f, 0x14, 0x71, 0x9b, 0x7e, 0xcc, 0x5e, 0x8c, 0x59, 0xef, - 0x80, 0xac, 0x89, 0xf4, 0x45, 0x8d, 0x98, 0x6d, 0x97, 0xfd, 0x53, 0x5f, - 0x19, 0xd6, 0x11, 0xf7, 0xcb, 0x5d, 0xca, 0xab, 0xe1, 0x01, 0xf1, 0xe9, - 0x1f, 0x1f, 0xf3, 0x53, 0x76, 0xa2, 0x59, 0x8e, 0xb3, 0x91, 0xff, 0xe8, - 0x1b, 0xc0, 0xc0, 0xda, 0xdd, 0x93, 0xb5, 0x9d, 0x62, 0x13, 0xb8, 0x07, - 0xf2, 0xf5, 0xb9, 0x4b, 0xe1, 0x09, 0xed, 0xdb, 0xe6, 0xd9, 0x2d, 0xc4, - 0x0d, 0xb6, 0xbd, 0xfc, 0xdb, 0x5c, 0xcc, 0xf6, 0x53, 0x4e, 0x01, 0xa4, - 0x03, 0x95, 0x4a, 0xa4, 0xaa, 0x4f, 0x45, 0xaf, 0xbf, 0xf1, 0x7e, 0x60, - 0x1d, 0x86, 0x93, 0x65, 0x7b, 0x24, 0x0c, 0x09, 0xe0, 0xd1, 0xd8, 0x60, - 0xd9, 0xd9, 0x55, 0x2a, 0xec, 0xd5, 0xdc, 0xd0, 0xc6, 0x5e, 0x2c, 0x22, - 0xf5, 0x19, 0x0b, 0xc3, 0xa1, 0x38, 0x11, 0x67, 0x6f, 0x6c, 0x0e, 0x34, - 0x44, 0x83, 0xee, 0xd3, 0xf2, 0x4b, 0x7b, 0x03, 0x68, 0xfe, 0xc5, 0x76, - 0xb2, 0x2e, 0x26, 0xeb, 0x1f, 0x66, 0x02, 0xa4, 0xd9, 0xda, 0x28, 0x3a, - 0xc3, 0x94, 0x03, 0xe8, 0x29, 0x7e, 0xfe, 0x3d, 0xc8, 0xc1, 0x0a, 0x74, - 0xc7, 0xaf, 0xa6, 0x84, 0x86, 0x85, 0xc3, 0x8c, 0x00, 0x38, 0xd4, 0xb5, - 0xb2, 0xe0, 0xf0, 0xc4, 0x8d, 0x10, 0x0d, 0xf1, 0xcd, 0x05, 0xdb, 0xd0, - 0xcf, 0x17, 0x4f, 0xa8, 0xe5, 0xf0, 0x53, 0x55, 0x62, 0xc7, 0x55, 0xe5, - 0xbe, 0x18, 0x2f, 0xda, 0x48, 0xf1, 0xaa, 0x85, 0x46, 0x80, 0x15, 0x70, - 0x82, 0xd2, 0xa6, 0xb0, 0x3d, 0x31, 0xb5, 0xcc, 0x23, 0x95, 0x5e, 0x15, - 0x35, 0x32, 0xd0, 0x86, 0xd1, 0x6e, 0x2d, 0xc0, 0xfe, 0x45, 0xae, 0x28, - 0x24, 0xa7, 0x14, 0xf4, 0xe9, 0xb5, 0x6f, 0xac, 0x25, 0xf9, 0x88, 0xf6, - 0x60, 0x5d, 0x6b, 0x5c, 0xf2, 0x38, 0xe8, 0xdc, 0xbd, 0xa6, 0x13, 0xc0, - 0xa4, 0xc8, 0xe9, 0x7a, 0xc6, 0xb6, 0x88, 0x26, 0x98, 0x9f, 0xe3, 0x9a, - 0xd9, 0x5b, 0xd4, 0xd0, 0x02, 0x1f, 0x55, 0x30, 0xbe, 0xde, 0x9c, 0xd1, - 0x53, 0x93, 0x72, 0xe6, 0x19, 0x79, 0xe9, 0xf1, 0x70, 0x78, 0x92, 0x31, - 0xf6, 0x17, 0xc0, 0xdd, 0x99, 0xc8, 0x97, 0x67, 0xdc, 0xf6, 0x67, 0x6b, - 0x9b, 0x1c, 0x90, 0xea, 0x1a, 0x9e, 0x26, 0x68, 0xc2, 0x13, 0x94, 0x3a, - 0x3e, 0x73, 0x61, 0x4e, 0x37, 0xa8, 0xa1, 0xfa, 0xf8, 0x22, 0xdd, 0x20, - 0x40, 0xc6, 0x52, 0x27, 0x47, 0x1a, 0x79, 0xfa, 0x40, 0xa6, 0x62, 0x6b, - 0xe6, 0xc7, 0x67, 0xb7, 0xa8, 0x2d, 0xd1, 0x9f, 0x17, 0xb8, 0x77, 0x5e, - 0x97, 0x1e, 0x92, 0xd7, 0xd2, 0x25, 0x04, 0x92, 0xf9, 0x41, 0x70, 0x93, - 0xe1, 0x13, 0x07, 0x94, 0x8e, 0x0b, 0x82, 0x98 -}; - -static unsigned char randomDataSmall[] = { - // openssl rand -rand /dev/random 24 | xxd -i - 0xd1, 0xec, 0x35, 0xc3, 0xa0, 0x4c, 0x73, 0x37, 0x2f, 0x5a, 0x12, 0x44, - 0xee, 0xe4, 0x22, 0x07, 0x29, 0xa8, 0x4a, 0xde, 0xc8, 0xbb, 0xe7, 0xdb -}; - - -static BOOL HasGzipHeader(NSData *data) { - // very simple check - const unsigned char *bytes = [data bytes]; - return ([data length] > 2) && - ((bytes[0] == 0x1f) && (bytes[1] == 0x8b)); -} - - -@implementation GTMNSData_zlibTest - -- (void)testBoundryValues { - // build some test data - NSData *data = [NSData dataWithBytes:randomDataLarge - length:sizeof(randomDataLarge)]; - STAssertNotNil(data, @"failed to alloc data block"); - - // bogus args to start - STAssertNil([NSData gtm_dataByDeflatingData:nil], nil); - STAssertNil([NSData gtm_dataByDeflatingBytes:nil length:666], nil); - STAssertNil([NSData gtm_dataByDeflatingBytes:[data bytes] length:0], nil); - STAssertNil([NSData gtm_dataByGzippingData:nil], nil); - STAssertNil([NSData gtm_dataByGzippingBytes:nil length:666], nil); - STAssertNil([NSData gtm_dataByGzippingBytes:[data bytes] length:0], nil); - STAssertNil([NSData gtm_dataByInflatingData:nil], nil); - STAssertNil([NSData gtm_dataByInflatingBytes:nil length:666], nil); - STAssertNil([NSData gtm_dataByInflatingBytes:[data bytes] length:0], nil); - - // test deflate w/ compression levels out of range - NSData *deflated = [NSData gtm_dataByDeflatingData:data - compressionLevel:-4]; - STAssertNotNil(deflated, nil); - STAssertFalse(HasGzipHeader(deflated), nil); - NSData *dataPrime = [NSData gtm_dataByInflatingData:deflated]; - STAssertNotNil(dataPrime, nil); - STAssertEqualObjects(data, dataPrime, nil); - deflated = [NSData gtm_dataByDeflatingData:data - compressionLevel:20]; - STAssertNotNil(deflated, nil); - STAssertFalse(HasGzipHeader(deflated), nil); - dataPrime = [NSData gtm_dataByInflatingData:deflated]; - STAssertNotNil(dataPrime, nil); - STAssertEqualObjects(data, dataPrime, nil); - - // test gzip w/ compression levels out of range - NSData *gzipped = [NSData gtm_dataByGzippingData:data - compressionLevel:-4]; - STAssertNotNil(gzipped, nil); - STAssertTrue(HasGzipHeader(gzipped), nil); - dataPrime = [NSData gtm_dataByInflatingData:gzipped]; - STAssertNotNil(dataPrime, nil); - STAssertEqualObjects(data, dataPrime, nil); - gzipped = [NSData gtm_dataByGzippingData:data - compressionLevel:20]; - STAssertNotNil(gzipped, nil); - STAssertTrue(HasGzipHeader(gzipped), nil); - dataPrime = [NSData gtm_dataByInflatingData:gzipped]; - STAssertNotNil(dataPrime, nil); - STAssertEqualObjects(data, dataPrime, nil); - - // test non-compressed data data itself - [GTMUnitTestDevLog expectString:@"Error trying to inflate some of the " - "payload, error -3"]; - STAssertNil([NSData gtm_dataByInflatingData:data], nil); - - // test deflated data runs that end before they are done - [GTMUnitTestDevLog expect:([deflated length] / 11) + 1 - casesOfString:@"Error trying to inflate some of the payload, " - "error -5"]; - for (NSUInteger x = 1 ; x < [deflated length] ; x += 11) { - STAssertNil([NSData gtm_dataByInflatingBytes:[deflated bytes] - length:x], nil); - } - - // test gzipped data runs that end before they are done - [GTMUnitTestDevLog expect:([gzipped length] / 11) + 1 - casesOfString:@"Error trying to inflate some of the payload, " - "error -5"]; - for (NSUInteger x = 1 ; x < [gzipped length] ; x += 11) { - STAssertNil([NSData gtm_dataByInflatingBytes:[gzipped bytes] - length:x], nil); - } - - // test extra data before the deflated/gzipped data (just to make sure we - // don't seek to the "real" data) - NSMutableData *prefixedDeflated = - [NSMutableData dataWithBytes:randomDataSmall length:sizeof(randomDataSmall)]; - STAssertNotNil(prefixedDeflated, @"failed to alloc data block"); - [prefixedDeflated appendData:deflated]; - [GTMUnitTestDevLog expectString:@"Error trying to inflate some of the " - "payload, error -3"]; - STAssertNil([NSData gtm_dataByInflatingData:prefixedDeflated], nil); - [GTMUnitTestDevLog expectString:@"Error trying to inflate some of the " - "payload, error -3"]; - STAssertNil([NSData gtm_dataByInflatingBytes:[prefixedDeflated bytes] - length:[prefixedDeflated length]], - nil); - NSMutableData *prefixedGzipped = - [NSMutableData dataWithBytes:randomDataSmall length:sizeof(randomDataSmall)]; - STAssertNotNil(prefixedDeflated, @"failed to alloc data block"); - [prefixedGzipped appendData:gzipped]; - [GTMUnitTestDevLog expectString:@"Error trying to inflate some of the " - "payload, error -3"]; - STAssertNil([NSData gtm_dataByInflatingData:prefixedGzipped], nil); - [GTMUnitTestDevLog expectString:@"Error trying to inflate some of the " - "payload, error -3"]; - STAssertNil([NSData gtm_dataByInflatingBytes:[prefixedGzipped bytes] - length:[prefixedGzipped length]], - nil); - - // test extra data after the deflated/gzipped data (just to make sure we - // don't ignore some of the data) - NSMutableData *suffixedDeflated = [NSMutableData data]; - STAssertNotNil(suffixedDeflated, @"failed to alloc data block"); - [suffixedDeflated appendData:deflated]; - [suffixedDeflated appendBytes:[data bytes] length:20]; - [GTMUnitTestDevLog expectString:@"thought we finished inflate w/o using " - "all input, 20 bytes left"]; - STAssertNil([NSData gtm_dataByInflatingData:suffixedDeflated], nil); - [GTMUnitTestDevLog expectString:@"thought we finished inflate w/o using " - "all input, 20 bytes left"]; - STAssertNil([NSData gtm_dataByInflatingBytes:[suffixedDeflated bytes] - length:[suffixedDeflated length]], - nil); - NSMutableData *suffixedGZipped = [NSMutableData data]; - STAssertNotNil(suffixedGZipped, @"failed to alloc data block"); - [suffixedGZipped appendData:gzipped]; - [suffixedGZipped appendBytes:[data bytes] length:20]; - [GTMUnitTestDevLog expectString:@"thought we finished inflate w/o using " - "all input, 20 bytes left"]; - STAssertNil([NSData gtm_dataByInflatingData:suffixedGZipped], nil); - [GTMUnitTestDevLog expectString:@"thought we finished inflate w/o using " - "all input, 20 bytes left"]; - STAssertNil([NSData gtm_dataByInflatingBytes:[suffixedGZipped bytes] - length:[suffixedGZipped length]], - nil); -} - -- (void)testInflateDeflate { - NSData *data = [NSData dataWithBytes:randomDataLarge - length:sizeof(randomDataLarge)]; - STAssertNotNil(data, @"failed to alloc data block"); - - // w/ *Bytes apis, default level - NSData *deflated = [NSData gtm_dataByDeflatingBytes:[data bytes] - length:[data length]]; - STAssertNotNil(deflated, @"failed to deflate data block"); - STAssertGreaterThan([deflated length], - (NSUInteger)0, @"failed to deflate data block"); - STAssertFalse(HasGzipHeader(deflated), @"has gzip header on zlib data"); - NSData *dataPrime = [NSData gtm_dataByInflatingBytes:[deflated bytes] - length:[deflated length]]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Bytes apis"); - - // w/ *Data apis, default level - deflated = [NSData gtm_dataByDeflatingData:data]; - STAssertNotNil(deflated, @"failed to deflate data block"); - STAssertGreaterThan([deflated length], - (NSUInteger)0, @"failed to deflate data block"); - STAssertFalse(HasGzipHeader(deflated), @"has gzip header on zlib data"); - dataPrime = [NSData gtm_dataByInflatingData:deflated]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Data apis"); - - // loop over the compression levels - for (int level = 1 ; level < 9 ; ++level) { - // w/ *Bytes apis, using our level - deflated = [NSData gtm_dataByDeflatingBytes:[data bytes] - length:[data length] - compressionLevel:level]; - STAssertNotNil(deflated, @"failed to deflate data block"); - STAssertGreaterThan([deflated length], - (NSUInteger)0, @"failed to deflate data block"); - STAssertFalse(HasGzipHeader(deflated), @"has gzip header on zlib data"); - dataPrime = [NSData gtm_dataByInflatingBytes:[deflated bytes] - length:[deflated length]]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Bytes apis"); - - // w/ *Data apis, using our level - deflated = [NSData gtm_dataByDeflatingData:data compressionLevel:level]; - STAssertNotNil(deflated, @"failed to deflate data block"); - STAssertGreaterThan([deflated length], - (NSUInteger)0, @"failed to deflate data block"); - STAssertFalse(HasGzipHeader(deflated), @"has gzip header on zlib data"); - dataPrime = [NSData gtm_dataByInflatingData:deflated]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Data apis"); - } -} - -- (void)testInflateGzip { - NSData *data = [NSData dataWithBytes:randomDataLarge - length:sizeof(randomDataLarge)]; - STAssertNotNil(data, @"failed to alloc data block"); - - // w/ *Bytes apis, default level - NSData *gzipped = [NSData gtm_dataByGzippingBytes:[data bytes] - length:[data length]]; - STAssertNotNil(gzipped, @"failed to gzip data block"); - STAssertGreaterThan([gzipped length], - (NSUInteger)0, @"failed to gzip data block"); - STAssertTrue(HasGzipHeader(gzipped), - @"doesn't have gzip header on gzipped data"); - NSData *dataPrime = [NSData gtm_dataByInflatingBytes:[gzipped bytes] - length:[gzipped length]]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Bytes apis"); - - // w/ *Data apis, default level - gzipped = [NSData gtm_dataByGzippingData:data]; - STAssertNotNil(gzipped, @"failed to gzip data block"); - STAssertGreaterThan([gzipped length], - (NSUInteger)0, @"failed to gzip data block"); - STAssertTrue(HasGzipHeader(gzipped), - @"doesn't have gzip header on gzipped data"); - dataPrime = [NSData gtm_dataByInflatingData:gzipped]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Data apis"); - - // loop over the compression levels - for (int level = 1 ; level < 9 ; ++level) { - // w/ *Bytes apis, using our level - gzipped = [NSData gtm_dataByGzippingBytes:[data bytes] - length:[data length] - compressionLevel:level]; - STAssertNotNil(gzipped, @"failed to gzip data block"); - STAssertGreaterThan([gzipped length], - (NSUInteger)0, @"failed to gzip data block"); - STAssertTrue(HasGzipHeader(gzipped), - @"doesn't have gzip header on gzipped data"); - dataPrime = [NSData gtm_dataByInflatingBytes:[gzipped bytes] - length:[gzipped length]]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, dataPrime, - @"failed to round trip via *Bytes apis"); - - // w/ *Data apis, using our level - gzipped = [NSData gtm_dataByGzippingData:data compressionLevel:level]; - STAssertNotNil(gzipped, @"failed to gzip data block"); - STAssertGreaterThan([gzipped length], - (NSUInteger)0, @"failed to gzip data block"); - STAssertTrue(HasGzipHeader(gzipped), - @"doesn't have gzip header on gzipped data"); - dataPrime = [NSData gtm_dataByInflatingData:gzipped]; - STAssertNotNil(dataPrime, @"failed to inflate data block"); - STAssertGreaterThan([dataPrime length], - (NSUInteger)0, @"failed to inflate data block"); - STAssertEqualObjects(data, - dataPrime, @"failed to round trip via *Data apis"); - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h deleted file mode 100644 index 4bc896d0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// GTMNSDictionary+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utility for building a URL or POST argument string. -@interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions) - -/// Gets a string representation of the dictionary in the form -/// key1=value1&key2&value2&...&keyN=valueN, suitable for use as either -/// URL arguments (after a '?') or POST body. Keys and values will be escaped -/// automatically, so should be unescaped in the dictionary. -- (NSString *)gtm_httpArgumentsString; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.m deleted file mode 100644 index 89610e48..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// GTMNSDictionary+URLArguments.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSDictionary+URLArguments.h" -#import "GTMNSString+URLArguments.h" -#import "GTMMethodCheck.h" -#import "GTMDefines.h" - -@implementation NSDictionary (GTMNSDictionaryURLArgumentsAdditions) - -GTM_METHOD_CHECK(NSString, gtm_stringByEscapingForURLArgument); - -- (NSString *)gtm_httpArgumentsString { - NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:[self count]]; - NSString* key; - GTM_FOREACH_KEY(key, self) { - [arguments addObject:[NSString stringWithFormat:@"%@=%@", - [key gtm_stringByEscapingForURLArgument], - [[[self objectForKey:key] description] gtm_stringByEscapingForURLArgument]]]; - } - - return [arguments componentsJoinedByString:@"&"]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArgumentsTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArgumentsTest.m deleted file mode 100644 index f01519e4..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArgumentsTest.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// GTMNSDictionary+URLArgumentsTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSDictionary+URLArguments.h" -#import "GTMDefines.h" - -@interface GTMNSDictionary_URLArgumentsTest : GTMTestCase -@end - -@implementation GTMNSDictionary_URLArgumentsTest - -- (void)testArgumentsString { - STAssertEqualObjects([[NSDictionary dictionary] gtm_httpArgumentsString], @"", - @"- empty dictionary should give an empty string"); - STAssertEqualObjects([[NSDictionary dictionaryWithObject:@"123" forKey:@"abc"] gtm_httpArgumentsString], - @"abc=123", - @"- simple one-pair dictionary should work"); - NSDictionary* arguments = [NSDictionary dictionaryWithObjectsAndKeys: - @"1+1!=3 & 2*6/3=4", @"complex", - @"specialkey", @"a+b", - nil]; - NSString* argumentString = [arguments gtm_httpArgumentsString]; - // check for individual pieces since order is not guaranteed - NSString* component1 = @"a%2Bb=specialkey"; - NSString* component2 = @"complex=1%2B1%21%3D3%20%26%202%2A6%2F3%3D4"; - STAssertNotEquals([argumentString rangeOfString:component1].location, (NSUInteger)NSNotFound, - @"- '%@' not found in '%@'", component1, argumentString); - STAssertNotEquals([argumentString rangeOfString:component2].location, (NSUInteger)NSNotFound, - @"- '%@' not found in '%@'", component2, argumentString); - STAssertNotEquals([argumentString rangeOfString:@"&"].location, (NSUInteger)NSNotFound, - @"- special characters should be escaped"); - STAssertNotEquals([argumentString characterAtIndex:0], (unichar)'&', - @"- there should be no & at the beginning of the string"); - STAssertNotEquals([argumentString characterAtIndex:([argumentString length] - 1)], (unichar)'&', - @"- there should be no & at the end of the string"); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.h deleted file mode 100644 index 8e10d937..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// GTMNSEnumerator+Filter.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// A generic category for methods that allow us to filter enumeratable -/// containers, inspired by C++ Standard Library's use of iterators. -/// Like in C++, these assume the underlying container is not modified during -/// the lifetime of the iterator. -/// -@interface NSEnumerator (GTMEnumeratorFilterAdditions) - -/// @argument predicate - the function return BOOL. will be applied to each element -/// @argument argument - optional argument to pass to predicate -/// @returns an enumerator that contains only elements where [element sel:argument] is true -- (NSEnumerator *)gtm_filteredEnumeratorByMakingEachObjectPerformSelector:(SEL)predicate - withObject:(id)argument; - -/// @argument selector - the function return a transformed object. will be applied to each element -/// @argument argument - optional argument to pass to transformer -/// @returns an enumerator that contains the transformed elements -- (NSEnumerator *)gtm_enumeratorByMakingEachObjectPerformSelector:(SEL)selector - withObject:(id)argument; - -/// @argument target - receiver for each method -/// @argument predicate - as in, [target predicate: [self nextObject]], return a BOOL -/// @returns an enumerator that contains only elements where [element sel:argument] is true -- (NSEnumerator *)gtm_filteredEnumeratorByTarget:(id)target - performOnEachSelector:(SEL)predicate; - -/// @argument target - receiver for each method -/// @argument sel - as in, [target selector: [self nextObject]], return a transformed object -/// @returns an enumerator that contains the transformed elements -- (NSEnumerator *)gtm_enumeratorByTarget:(id)target - performOnEachSelector:(SEL)selector; - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.m deleted file mode 100644 index 51d56f8b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+Filter.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// GTMNSEnumerator+Filter.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSEnumerator+Filter.h" -#import "GTMDebugSelectorValidation.h" -#import "GTMDefines.h" -#if GTM_IPHONE_SDK -#import -#import -#else -#import -#endif - -// a private subclass of NSEnumerator that does all the work. -// public interface just returns one of these. -// This top level class contains all the additional boilerplate. Specific -// behavior is in the subclasses. -@interface GTMEnumeratorPrivateBase : NSEnumerator { - @protected - NSEnumerator *base_; // STRONG - SEL operation_; // either a predicate or a transform depending on context. - id other_; // STRONG, may be nil -} -@end - -@interface GTMEnumeratorPrivateBase (SubclassesMustProvide) -- (BOOL)filterObject:(id)obj returning:(id *)resultp; -@end - -@implementation GTMEnumeratorPrivateBase -- (id)initWithBase:(NSEnumerator *)base - sel:(SEL)filter - object:(id)optionalOther { - self = [super init]; - if (self) { - - // someone would have to subclass or directly create an object of this - // class, and this class is private to this impl. - _GTMDevAssert(base, @"can't initWithBase: a nil base enumerator"); - base_ = [base retain]; - operation_ = filter; - other_ = [optionalOther retain]; - } - return self; -} - -// we don't provide an init because this base class is private to this -// impl, and no one would be able to create it (if they do, they get whatever -// they happens...). - -- (void)dealloc { - [base_ release]; - [other_ release]; - [super dealloc]; -} - -- (id)nextObject { - for (id obj = [base_ nextObject]; obj; obj = [base_ nextObject]) { - id result = nil; - if ([self filterObject:obj returning:&result]) { - return result; - } - } - return nil; -} -@end - -// a transformer, for each item in the enumerator, returns a f(item). -@interface GTMEnumeratorTransformer : GTMEnumeratorPrivateBase -@end -@implementation GTMEnumeratorTransformer -- (BOOL)filterObject:(id)obj returning:(id *)resultp { - *resultp = [obj performSelector:operation_ withObject:other_]; - return nil != *resultp; -} -@end - -// a transformer, for each item in the enumerator, returns a f(item). -// a target transformer swaps the target and the argument. -@interface GTMEnumeratorTargetTransformer : GTMEnumeratorPrivateBase -@end -@implementation GTMEnumeratorTargetTransformer -- (BOOL)filterObject:(id)obj returning:(id *)resultp { - *resultp = [other_ performSelector:operation_ withObject:obj]; - return nil != *resultp; -} -@end - -// a filter, for each item in the enumerator, if(f(item)) { returns item. } -@interface GTMEnumeratorFilter : GTMEnumeratorPrivateBase -@end -@implementation GTMEnumeratorFilter -// We must take care here, since Intel leaves junk in high bytes of return register -// for predicates that return BOOL. -// For details see: -// http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_23.html -// and -// http://www.red-sweater.com/blog/320/abusing-objective-c-with-class#comment-83187 -- (BOOL)filterObject:(id)obj returning:(id *)resultp { - *resultp = obj; - return ((BOOL (*)(id, SEL, id))objc_msgSend)(obj, operation_, other_); -} -@end - -// a target filter, for each item in the enumerator, if(f(item)) { returns item. } -// a target transformer swaps the target and the argument. -@interface GTMEnumeratorTargetFilter : GTMEnumeratorPrivateBase -@end -@implementation GTMEnumeratorTargetFilter -// We must take care here, since Intel leaves junk in high bytes of return register -// for predicates that return BOOL. -// For details see: -// http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_23.html -// and -// http://www.red-sweater.com/blog/320/abusing-objective-c-with-class#comment-83187 -- (BOOL)filterObject:(id)obj returning:(id *)resultp { - *resultp = obj; - return ((BOOL (*)(id, SEL, id))objc_msgSend)(other_, operation_, obj); -} -@end - -@implementation NSEnumerator (GTMEnumeratorFilterAdditions) - -- (NSEnumerator *)gtm_filteredEnumeratorByMakingEachObjectPerformSelector:(SEL)selector - withObject:(id)argument { - return [[[GTMEnumeratorFilter alloc] initWithBase:self - sel:selector - object:argument] autorelease]; -} - -- (NSEnumerator *)gtm_enumeratorByMakingEachObjectPerformSelector:(SEL)selector - withObject:(id)argument { - return [[[GTMEnumeratorTransformer alloc] initWithBase:self - sel:selector - object:argument] autorelease]; -} - - -- (NSEnumerator *)gtm_filteredEnumeratorByTarget:(id)target - performOnEachSelector:(SEL)selector { - // make sure the object impls this selector taking an object as an arg. - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(target, selector, - @encode(BOOL), - @encode(id), - NULL); - return [[[GTMEnumeratorTargetFilter alloc] initWithBase:self - sel:selector - object:target] autorelease]; -} - -- (NSEnumerator *)gtm_enumeratorByTarget:(id)target - performOnEachSelector:(SEL)selector { - // make sure the object impls this selector taking an object as an arg. - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(target, selector, - @encode(id), - @encode(id), - NULL); - return [[[GTMEnumeratorTargetTransformer alloc] initWithBase:self - sel:selector - object:target] autorelease]; -} - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+FilterTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+FilterTest.m deleted file mode 100644 index ef0d9556..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSEnumerator+FilterTest.m +++ /dev/null @@ -1,133 +0,0 @@ -// -// GTMNSEnumerator+FilterTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSEnumerator+Filter.h" - -@interface GTMNSEnumerator_FilterTest : GTMTestCase -@end - -@implementation GTMNSEnumerator_FilterTest - -- (void)testEnumeratorByMakingEachObjectPerformSelector { - // test w/ a set of strings - NSSet *numbers = [NSSet setWithObjects: @"1", @"2", @"3", nil]; - NSEnumerator *e = [[numbers objectEnumerator] - gtm_enumeratorByMakingEachObjectPerformSelector:@selector(stringByAppendingString:) - withObject:@" "]; - NSMutableSet *trailingSpaces = [NSMutableSet set]; - id obj; - while (nil != (obj = [e nextObject])) { - [trailingSpaces addObject:obj]; - } - NSSet *trailingSpacesGood = [NSSet setWithObjects: @"1 ", @"2 ", @"3 ", nil]; - STAssertEqualObjects(trailingSpaces, trailingSpacesGood, @""); - - // test an empty set - NSSet *empty = [NSSet set]; - e = [[empty objectEnumerator] - gtm_enumeratorByMakingEachObjectPerformSelector:@selector(stringByAppendingString:) - withObject:@" "]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); -} - -- (void)testFilteredEnumeratorByMakingEachObjectPerformSelector { - // test with a dict of strings - NSDictionary *testDict = [NSDictionary dictionaryWithObjectsAndKeys: - @"foo", @"1", - @"bar", @"2", - @"foobar", @"3", - nil]; - // test those that have prefixes - NSEnumerator *e = [[testDict objectEnumerator] - gtm_filteredEnumeratorByMakingEachObjectPerformSelector:@selector(hasPrefix:) - withObject:@"foo"]; - // since the dictionary iterates in any order, compare as sets - NSSet *filteredValues = [NSSet setWithArray:[e allObjects]]; - NSSet *expectedValues = [NSSet setWithObjects:@"foo", @"foobar", nil]; - STAssertEqualObjects(filteredValues, expectedValues, @""); - - // test an empty set - NSSet *empty = [NSSet set]; - e = [[empty objectEnumerator] - gtm_filteredEnumeratorByMakingEachObjectPerformSelector:@selector(hasPrefix:) - withObject:@"foo"]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); - - // test an set that will filter out - NSSet *filterAway = [NSSet setWithObjects:@"bar", @"baz", nil]; - e = [[filterAway objectEnumerator] - gtm_filteredEnumeratorByMakingEachObjectPerformSelector:@selector(hasPrefix:) - withObject:@"foo"]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); -} - -- (void)testEnumeratorByTargetPerformOnEachSelector { - // test w/ a set of strings - NSSet *numbers = [NSSet setWithObjects: @"1", @"2", @"3", nil]; - NSString *target = @"foo"; - NSEnumerator *e = [[numbers objectEnumerator] - gtm_enumeratorByTarget:target - performOnEachSelector:@selector(stringByAppendingString:)]; - // since the set iterates in any order, compare as sets - NSSet *collectedValues = [NSSet setWithArray:[e allObjects]]; - NSSet *expectedValues = [NSSet setWithObjects:@"foo1", @"foo2", @"foo3", nil]; - STAssertEqualObjects(collectedValues, expectedValues, @""); - - // test an empty set - NSSet *empty = [NSSet set]; - e = [[empty objectEnumerator] - gtm_enumeratorByTarget:target - performOnEachSelector:@selector(stringByAppendingString:)]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); -} - -- (void)testFilteredEnumeratorByTargetPerformOnEachSelector { - // test w/ a set of strings - NSSet *numbers = [NSSet setWithObjects:@"1", @"2", @"3", @"4", nil]; - NSSet *target = [NSSet setWithObjects:@"2", @"4", @"6", nil]; - NSEnumerator *e = [[numbers objectEnumerator] - gtm_filteredEnumeratorByTarget:target - performOnEachSelector:@selector(containsObject:)]; - // since the set iterates in any order, compare as sets - NSSet *filteredValues = [NSSet setWithArray:[e allObjects]]; - NSSet *expectedValues = [NSSet setWithObjects:@"2", @"4", nil]; - STAssertEqualObjects(filteredValues, expectedValues, @""); - - // test an empty set - NSSet *empty = [NSSet set]; - e = [[empty objectEnumerator] - gtm_filteredEnumeratorByTarget:target - performOnEachSelector:@selector(containsObject:)]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); - - // test an set that will filter out - NSSet *filterAway = [NSSet setWithObjects:@"bar", @"baz", nil]; - e = [[filterAway objectEnumerator] - gtm_filteredEnumeratorByTarget:target - performOnEachSelector:@selector(containsObject:)]; - STAssertNil([e nextObject], - @"shouldn't have gotten anything from first advance of enumerator"); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.h deleted file mode 100644 index 86215eaf..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// GTMNSFileManager+Carbon.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - - -// A few useful methods for dealing with paths and carbon structures -@interface NSFileManager (GTMFileManagerCarbonAdditions) - -// Converts a path to an alias -// Args: -// path - the path to convert -// -// Returns: -// An alias wrapped up in an autoreleased NSData. Nil on failure. -// -- (NSData *)gtm_aliasDataForPath:(NSString *)path; - -// Converts an alias to a path -// Args: -// alias - an alias wrapped up in an NSData -// -// Returns: -// The path. Nil on failure. -// -- (NSString *)gtm_pathFromAliasData:(NSData *)alias; - -// Converts a path to an FSRef * -// Args: -// path - the path to convert -// -// Returns: -// An autoreleased FSRef *. Nil on failure. -// -- (FSRef *)gtm_FSRefForPath:(NSString *)path; - -// Converts an FSRef to a path -// Args: -// fsRef - the FSRef to convert -// -// Returns: -// The path. Nil on failure. -// -- (NSString *)gtm_pathFromFSRef:(FSRef *)fsRef; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.m deleted file mode 100644 index 4f8ba8bd..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Carbon.m +++ /dev/null @@ -1,99 +0,0 @@ -// -// GTMNSFileManager+Carbon.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSFileManager+Carbon.h" -#import -#import -#import "GTMDefines.h" - -@implementation NSFileManager (GTMFileManagerCarbonAdditions) - -- (NSData *)gtm_aliasDataForPath:(NSString *)path { - NSData *data = nil; - FSRef ref; - AliasHandle alias = NULL; - - require_quiet([path length], CantUseParams); - require_noerr(FSPathMakeRef((UInt8 *)[path fileSystemRepresentation], - &ref, NULL), CantMakeRef); - require_noerr(FSNewAlias(NULL, &ref, &alias), CantMakeAlias); - - Size length = GetAliasSize(alias); - data = [NSData dataWithBytes:*alias length:length]; - - DisposeHandle((Handle)alias); - -CantMakeAlias: -CantMakeRef: -CantUseParams: - return data; -} - -- (NSString *)gtm_pathFromAliasData:(NSData *)data { - NSString *path = nil; - require_quiet(data, CantUseParams); - - AliasHandle alias; - const void *bytes = [data bytes]; - NSUInteger length = [data length]; - require_noerr(PtrToHand(bytes, (Handle *)&alias, length), CantMakeHandle); - - FSRef ref; - Boolean wasChanged; - // we don't use a require here because it is quite legitimate for an alias - // resolve to fail. - if (FSResolveAlias(NULL, alias, &ref, &wasChanged) == noErr) { - path = [self gtm_pathFromFSRef:&ref]; - } - DisposeHandle((Handle)alias); -CantMakeHandle: -CantUseParams: - return path; -} - -- (FSRef *)gtm_FSRefForPath:(NSString *)path { - FSRef* fsRef = NULL; - require_quiet([path length], CantUseParams); - NSMutableData *fsRefData = [NSMutableData dataWithLength:sizeof(FSRef)]; - require(fsRefData, CantAllocateFSRef); - fsRef = (FSRef*)[fsRefData mutableBytes]; - Boolean isDir = FALSE; - const UInt8 *filePath = (const UInt8 *)[path fileSystemRepresentation]; - require_noerr_action(FSPathMakeRef(filePath, fsRef, &isDir), - CantMakeRef, fsRef = NULL); -CantMakeRef: -CantAllocateFSRef: -CantUseParams: - return fsRef; -} - -- (NSString *)gtm_pathFromFSRef:(FSRef *)fsRef { - NSString *nsPath = nil; - require_quiet(fsRef, CantUseParams); - - char path[MAXPATHLEN]; - require_noerr(FSRefMakePath(fsRef, (UInt8 *)path, MAXPATHLEN), CantMakePath); - nsPath = [self stringWithFileSystemRepresentation:path length:strlen(path)]; - nsPath = [nsPath stringByStandardizingPath]; - -CantMakePath: -CantUseParams: - return nsPath; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+CarbonTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+CarbonTest.m deleted file mode 100644 index 76692b0e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+CarbonTest.m +++ /dev/null @@ -1,69 +0,0 @@ -// -// GTMNSFileManager+CarbonTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSFileManager+Carbon.h" -#import "GTMUnitTestDevLog.h" -#import - -@interface GTMNSFileManager_CarbonTest : GTMTestCase -@end - -@implementation GTMNSFileManager_CarbonTest - -- (void)testAliasPathFSRefConversion { - NSString *path = NSHomeDirectory(); - STAssertNotNil(path, nil); - NSFileManager *fileManager = [NSFileManager defaultManager]; - FSRef *fsRef = [fileManager gtm_FSRefForPath:path]; - STAssertNotNULL(fsRef, nil); - AliasHandle alias; - STAssertNoErr(FSNewAlias(nil, fsRef, &alias), nil); - STAssertNotNULL(alias, nil); - NSData *aliasData = [NSData dataWithBytes:*alias - length:GetAliasSize(alias)]; - STAssertNotNil(aliasData, nil); - NSString *path2 = [fileManager gtm_pathFromAliasData:aliasData]; - STAssertEqualObjects(path, path2, nil); - NSData *aliasData2 = [fileManager gtm_aliasDataForPath:path2]; - STAssertNotNil(aliasData2, nil); - NSString *path3 = [fileManager gtm_pathFromAliasData:aliasData2]; - STAssertEqualObjects(path2, path3, nil); - NSString *path4 = [fileManager gtm_pathFromFSRef:fsRef]; - STAssertEqualObjects(path, path4, nil); - - // Failure cases - [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: " - @"GoogleToolboxForMac: FSPathMakeRef.*"]; - STAssertNULL([fileManager gtm_FSRefForPath:@"/ptah/taht/dosent/esixt/"], - nil); - - STAssertNULL([fileManager gtm_FSRefForPath:@""], nil); - STAssertNULL([fileManager gtm_FSRefForPath:nil], nil); - STAssertNil([fileManager gtm_pathFromFSRef:nil], nil); - STAssertNil([fileManager gtm_pathFromAliasData:nil], nil); - STAssertNil([fileManager gtm_pathFromAliasData:[NSData data]], nil); - - [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: " - @"GoogleToolboxForMac: FSPathMakeRef.*"]; - STAssertNil([fileManager gtm_aliasDataForPath:@"/ptah/taht/dosent/esixt/"], nil); - STAssertNil([fileManager gtm_aliasDataForPath:@""], nil); - STAssertNil([fileManager gtm_aliasDataForPath:nil], nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.h deleted file mode 100644 index f3772154..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.h +++ /dev/null @@ -1,75 +0,0 @@ -// -// GTMNSFileManager+Path.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - - -/// A few useful methods for dealing with paths. -@interface NSFileManager (GMFileManagerPathAdditions) - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -/// For the Unix-y at heart, this is "mkdir -p". It tries to create -/// the directory specified by |path|, and any intervening directories that -/// are needed. Each directory that is created is created with |attributes| -/// (see other NSFileManager doco for the details on |attributes|). -/// -/// If you are building for 10.5 or later, you should just use the new api: -/// createDirectoryAtPath:withIntermediateDirectories:attributes:error: -/// -/// Also if you need more control over the creation of paths and their -/// attributes, look into using GTMPath. -/// -/// Args: -/// path - the path of the directory to create. -/// attributes - these are defined in the "Constants" section of Apple's -/// NSFileManager doco -/// -/// Returns: -/// YES if |path| exists or was able to be created successfully -/// NO otherwise -/// -- (BOOL)gtm_createFullPathToDirectory:(NSString *)path - attributes:(NSDictionary *)attributes; - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -/// Return an the paths for all resources in |directoryPath| that have the -/// |extension| file extension. -/// -/// Args: -/// extension - the file extension (excluding the leading ".") to match. -/// If nil, all files are matched. -/// directoryPath - the directory to look in. NOTE: Subdirectories are NOT -/// traversed. -/// -/// Returns: -/// An NSArray of absolute file paths that have |extension|. nil is returned -/// if |directoryPath| doesn't exist or can't be opened, and returns an empty -/// array if |directoryPath| is empty. ".", "..", and resource forks are never returned. -/// -- (NSArray *)gtm_filePathsWithExtension:(NSString *)extension - inDirectory:(NSString *)directoryPath; - -/// Same as -filePathsWithExtension:inDirectory: except |extensions| is an -/// NSArray of extensions to match. -/// -- (NSArray *)gtm_filePathsWithExtensions:(NSArray *)extensions - inDirectory:(NSString *)directoryPath; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.m deleted file mode 100644 index 195cd9ee..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.m +++ /dev/null @@ -1,101 +0,0 @@ -// -// GTMNSFileManager+Path.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSFileManager+Path.h" -#import "GTMDefines.h" - -@implementation NSFileManager (GMFileManagerPathAdditions) - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (BOOL)gtm_createFullPathToDirectory:(NSString *)path - attributes:(NSDictionary *)attributes { - if (!path) return NO; - - BOOL isDir; - BOOL exists = [self fileExistsAtPath:path isDirectory:&isDir]; - - // Quick check for the case where we have nothing to do. - if (exists && isDir) - return YES; - - NSString *actualPath = @"/"; - NSString *directory; - - GTM_FOREACH_OBJECT(directory, [path pathComponents]) { - actualPath = [actualPath stringByAppendingPathComponent:directory]; - - if ([self fileExistsAtPath:actualPath isDirectory:&isDir] && isDir) { - continue; - } else if ([self createDirectoryAtPath:actualPath attributes:attributes]) { - continue; - } else { - return NO; - } - } - - return YES; -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (NSArray *)gtm_filePathsWithExtension:(NSString *)extension - inDirectory:(NSString *)directoryPath { - NSArray *extensions = nil; - - // Treat no extension and an empty extension as the user requesting all files - if (extension != nil && ![extension isEqualToString:@""]) - extensions = [NSArray arrayWithObject:extension]; - - return [self gtm_filePathsWithExtensions:extensions - inDirectory:directoryPath]; -} - -- (NSArray *)gtm_filePathsWithExtensions:(NSArray *)extensions - inDirectory:(NSString *)directoryPath { - if (directoryPath == nil) - return nil; - - // |basenames| will contain only the matching file names, not their full paths. - NSArray *basenames = [self directoryContentsAtPath:directoryPath]; - - // Check if dir doesn't exist or couldn't be opened. - if (basenames == nil) - return nil; - - // Check if dir is empty. - if ([basenames count] == 0) - return basenames; - - NSMutableArray *paths = [NSMutableArray arrayWithCapacity:[basenames count]]; - NSString *basename; - - // Convert all the |basenames| to full paths. - GTM_FOREACH_OBJECT(basename, basenames) { - NSString *fullPath = [directoryPath stringByAppendingPathComponent:basename]; - [paths addObject:fullPath]; - } - - // Check if caller wants all files, regardless of extension. - if (extensions == nil || [extensions count] == 0) - return paths; - - return [paths pathsMatchingExtensions:extensions]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m deleted file mode 100644 index db40c68d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m +++ /dev/null @@ -1,249 +0,0 @@ -// -// GTMNSFileManager+PathTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSFileManager+Path.h" - -@interface GTMNSFileManager_PathTest : GTMTestCase { - NSString *baseDir_; -} -@end - -@implementation GTMNSFileManager_PathTest - -- (void)setUp { - // make a directory to scribble in - baseDir_ = - [[NSTemporaryDirectory() - stringByAppendingPathComponent:@"GTMNSFileManager_PathTest"] retain]; - if (baseDir_) { - NSFileManager *fm = [NSFileManager defaultManager]; - if (![fm fileExistsAtPath:baseDir_] && - ![fm createDirectoryAtPath:baseDir_ attributes:nil]) { - // COV_NF_START - // if the dir exists or we failed to create it, drop the baseDir_ - [baseDir_ release]; - baseDir_ = nil; - // COV_NF_END - } - } -} - -- (void)tearDown { - if (baseDir_) { - // clean up our directory - NSFileManager *fm = [NSFileManager defaultManager]; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - NSError *error = nil; - [fm removeItemAtPath:baseDir_ error:&error]; - STAssertNil(error, - @"Unable to delete %@: %@", baseDir_, [error description]); -#else - [fm removeFileAtPath:baseDir_ handler:nil]; -#endif - - [baseDir_ release]; - baseDir_ = nil; - } -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (void)testCreateFullPathToDirectoryAttributes { - STAssertNotNil(baseDir_, @"setUp failed"); - - NSString *testPath = - [baseDir_ stringByAppendingPathComponent:@"/foo/bar/baz"]; - STAssertNotNil(testPath, nil); - NSFileManager *fm = [NSFileManager defaultManager]; - - STAssertFalse([fm fileExistsAtPath:testPath], - @"You must delete '%@' before running this test", testPath); - - STAssertFalse([fm gtm_createFullPathToDirectory:nil attributes:nil], - @"didn't fail on nil input"); - - STAssertTrue([fm gtm_createFullPathToDirectory:testPath attributes:nil], - @"Failed to create nested testPath"); - STAssertTrue([fm gtm_createFullPathToDirectory:testPath attributes:nil], - @"Failed to succeed on second create of testPath"); - - NSString *pathToFail = [@"/etc" stringByAppendingPathComponent:testPath]; - STAssertFalse([fm gtm_createFullPathToDirectory:pathToFail attributes:nil], - @"We were allowed to create a dir in '/etc'?!"); - - STAssertFalse([fm gtm_createFullPathToDirectory:nil attributes:nil], - @"Should have failed when passed (nil)"); -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (void)testfilePathsWithExtensionsInDirectory { - STAssertNotNil(baseDir_, @"setUp failed"); - - NSFileManager *fm = [NSFileManager defaultManager]; - NSString *bogusPath = @"/some/place/that/does/not/exist"; - - // -------------------------------------------------------------------------- - // test fail cases first - - // single - STAssertNil([fm gtm_filePathsWithExtension:nil inDirectory:nil], - @"shouldn't have gotten anything for nil dir"); - STAssertNil([fm gtm_filePathsWithExtension:@"txt" inDirectory:nil], - @"shouldn't have gotten anything for nil dir"); - STAssertNil([fm gtm_filePathsWithExtension:@"txt" inDirectory:bogusPath], - @"shouldn't have gotten anything for a bogus dir"); - // array - STAssertNil([fm gtm_filePathsWithExtensions:nil inDirectory:nil], - @"shouldn't have gotten anything for nil dir"); - STAssertNil([fm gtm_filePathsWithExtensions:[NSArray array] inDirectory:nil], - @"shouldn't have gotten anything for nil dir"); - STAssertNil([fm gtm_filePathsWithExtensions:[NSArray arrayWithObject:@"txt"] - inDirectory:nil], - @"shouldn't have gotten anything for nil dir"); - STAssertNil([fm gtm_filePathsWithExtensions:[NSArray arrayWithObject:@"txt"] - inDirectory:bogusPath], - @"shouldn't have gotten anything for a bogus dir"); - - // -------------------------------------------------------------------------- - // create some test data - - NSString *testDirs[] = { - @"", @"/foo", // mave a subdir to make sure we don't match w/in it - }; - NSString *testFiles[] = { - @"a.txt", @"b.txt", @"c.rtf", @"d.m", - }; - - for (size_t i = 0; i < sizeof(testDirs) / sizeof(NSString*); i++) { - NSString *testDir = nil; - if ([testDirs[i] length]) { - testDir = [baseDir_ stringByAppendingPathComponent:testDirs[i]]; - STAssertTrue([fm createDirectoryAtPath:testDir attributes:nil], nil); - } else { - testDir = baseDir_; - } - for (size_t j = 0; j < sizeof(testFiles) / sizeof(NSString*); j++) { - NSString *testFile = [testDir stringByAppendingPathComponent:testFiles[j]]; - STAssertTrue([@"test" writeToFile:testFile atomically:YES], nil); - } - } - - // build set of the top level items - NSMutableArray *allFiles = [NSMutableArray array]; - for (size_t i = 0; i < sizeof(testDirs) / sizeof(NSString*); i++) { - if ([testDirs[i] length]) { - NSString *testDir = [baseDir_ stringByAppendingPathComponent:testDirs[i]]; - [allFiles addObject:testDir]; - } - } - for (size_t j = 0; j < sizeof(testFiles) / sizeof(NSString*); j++) { - NSString *testFile = [baseDir_ stringByAppendingPathComponent:testFiles[j]]; - [allFiles addObject:testFile]; - } - - NSArray *matches = nil; - NSArray *expectedMatches = nil; - NSArray *extensions = nil; - - // NOTE: we do all compares w/ sets so order doesn't matter - - // -------------------------------------------------------------------------- - // test match all - - // single - matches = [fm gtm_filePathsWithExtension:nil inDirectory:baseDir_]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:allFiles], - @"didn't get all files for nil extension"); - matches = [fm gtm_filePathsWithExtension:@"" inDirectory:baseDir_]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:allFiles], - @"didn't get all files for nil extension"); - // array - matches = [fm gtm_filePathsWithExtensions:nil inDirectory:baseDir_]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:allFiles], - @"didn't get all files for nil extension"); - matches = [fm gtm_filePathsWithExtensions:[NSArray array] - inDirectory:baseDir_]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:allFiles], - @"didn't get all files for nil extension"); - - // -------------------------------------------------------------------------- - // test match something - - // single - extensions = [NSArray arrayWithObject:@"txt"]; - matches = [fm gtm_filePathsWithExtension:@"txt" inDirectory:baseDir_]; - expectedMatches = [allFiles pathsMatchingExtensions:extensions]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:expectedMatches], - @"didn't get expected files"); - // array - matches = [fm gtm_filePathsWithExtensions:extensions inDirectory:baseDir_]; - expectedMatches = [allFiles pathsMatchingExtensions:extensions]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:expectedMatches], - @"didn't get expected files"); - extensions = [NSArray arrayWithObjects:@"txt", @"rtf", @"xyz", nil]; - matches = [fm gtm_filePathsWithExtensions:extensions inDirectory:baseDir_]; - expectedMatches = [allFiles pathsMatchingExtensions:extensions]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:expectedMatches], - @"didn't get expected files"); - - // -------------------------------------------------------------------------- - // test match nothing - - // single - extensions = [NSArray arrayWithObject:@"xyz"]; - matches = [fm gtm_filePathsWithExtension:@"xyz" inDirectory:baseDir_]; - expectedMatches = [allFiles pathsMatchingExtensions:extensions]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:expectedMatches], - @"didn't get expected files"); - // array - matches = [fm gtm_filePathsWithExtensions:extensions inDirectory:baseDir_]; - expectedMatches = [allFiles pathsMatchingExtensions:extensions]; - STAssertEqualObjects([NSSet setWithArray:matches], - [NSSet setWithArray:expectedMatches], - @"didn't get expected files"); - - // -------------------------------------------------------------------------- - // test match an empty dir - - // create the empty dir - NSString *emptyDir = [baseDir_ stringByAppendingPathComponent:@"emptyDir"]; - STAssertTrue([fm createDirectoryAtPath:emptyDir attributes:nil], nil); - - // single - matches = [fm gtm_filePathsWithExtension:@"txt" inDirectory:emptyDir]; - STAssertEqualObjects([NSSet setWithArray:matches], [NSSet set], - @"expected empty dir"); - // array - matches = [fm gtm_filePathsWithExtensions:[NSArray arrayWithObject:@"txt"] - inDirectory:emptyDir]; - STAssertEqualObjects([NSSet setWithArray:matches], [NSSet set], - @"expected empty dir"); - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.h deleted file mode 100644 index de11aeb7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// GTMNSObject+KeyValueObserving.h -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// -// MAKVONotificationCenter.h -// MAKVONotificationCenter -// -// Created by Michael Ash on 10/15/08. -// - -// This code is based on code by Michael Ash. -// Please see his excellent writeup at -// http://www.mikeash.com/?page=pyblog/key-value-observing-done-right.html -// You may also be interested in this writeup: -// http://www.dribin.org/dave/blog/archives/2008/09/24/proper_kvo_usage/ -// and the discussion on cocoa-dev that is linked to at the end of it. - -#import - -// If you read the articles above you will see that doing KVO correctly -// is actually pretty tricky, and that Apple's documentation may not be -// completely clear as to how things should be used. Use the methods below -// to make things a little easier instead of the stock addObserver, -// removeObserver methods. -// Selector should have the following signature: -// - (void)observeNotification:(GTMKeyValueChangeNotification *)notification -@interface NSObject (GTMKeyValueObservingAdditions) - -// Use this instead of [NSObject addObserver:forKeyPath:options:context:] -- (void)gtm_addObserver:(id)observer - forKeyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options; -// Use this instead of [NSObject removeObserver:forKeyPath:] -- (void)gtm_removeObserver:(id)observer - forKeyPath:(NSString *)keyPath - selector:(SEL)selector; -@end - -// This is the class that is sent to your notification selector as an -// argument. -@interface GTMKeyValueChangeNotification : NSObject { - @private - NSString *keyPath_; - id object_; - id userInfo_; - NSDictionary *change_; -} - -- (NSString *)keyPath; -- (id)object; -- (id)userInfo; -- (NSDictionary *)change; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m deleted file mode 100644 index dc6883d5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m +++ /dev/null @@ -1,350 +0,0 @@ -// -// GTMNSObject+KeyValueObserving.h -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// -// MAKVONotificationCenter.m -// MAKVONotificationCenter -// -// Created by Michael Ash on 10/15/08. -// - -// This code is based on code by Michael Ash. -// See comment in header. - -#import "GTMNSObject+KeyValueObserving.h" - -#import -#import "GTMDefines.h" -#import "GTMDebugSelectorValidation.h" -#import "GTMObjC2Runtime.h" - -// A singleton that works as a dispatch center for KVO -// -[NSObject observeValueForKeyPath:ofObject:change:context:] and turns them -// into selector dispatches. It stores a collection of -// GTMKeyValueObservingHelpers, and keys them via the key generated by -// -dictionaryKeyForObserver:ofObject:forKeyPath:selector. -@interface GTMKeyValueObservingCenter : NSObject { -@private - NSMutableDictionary *observerHelpers_; -} - -+ (id)defaultCenter; - -- (void)addObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options; -- (void)removeObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector; -- (id)dictionaryKeyForObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector; -@end - -@interface GTMKeyValueObservingHelper : NSObject { - @private - __weak id observer_; - SEL selector_; - id userInfo_; - id target_; - NSString* keyPath_; -} - -- (id)initWithObserver:(id)observer - object:(id)target - keyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options; -- (void)deregister; - -@end - -@interface GTMKeyValueChangeNotification () -- (id)initWithKeyPath:(NSString *)keyPath ofObject:(id)object - userInfo:(id)userInfo change:(NSDictionary *)change; -@end - -@implementation GTMKeyValueObservingHelper - -// For info how and why we use these statics: -// http://lists.apple.com/archives/cocoa-dev/2006/Jul/msg01038.html -static char GTMKeyValueObservingHelperContextData; -static char* GTMKeyValueObservingHelperContext - = >MKeyValueObservingHelperContextData; - -- (id)initWithObserver:(id)observer - object:(id)target - keyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options { - if((self = [super init])) { - observer_ = observer; - selector_ = selector; - userInfo_ = [userInfo retain]; - - target_ = target; - keyPath_ = [keyPath retain]; - - [target addObserver:self - forKeyPath:keyPath - options:options - context:GTMKeyValueObservingHelperContext]; - } - return self; -} - -- (void)dealloc { - [userInfo_ release]; - [keyPath_ release]; - [super dealloc]; -} - -- (void)observeValueForKeyPath:(NSString *)keyPath - ofObject:(id)object - change:(NSDictionary *)change - context:(void *)context { - if(context == GTMKeyValueObservingHelperContext) { - GTMKeyValueChangeNotification *notification - = [[GTMKeyValueChangeNotification alloc] initWithKeyPath:keyPath - ofObject:object - userInfo:userInfo_ - change:change]; - [observer_ performSelector:selector_ withObject:notification]; - [notification release]; - } else { - // COV_NF_START - // There's no way this should ever be called. - // If it is, the call will go up to NSObject which will assert. - [super observeValueForKeyPath:keyPath - ofObject:object - change:change - context:context]; - // COV_NF_END - } -} - -- (void)deregister { - [target_ removeObserver:self forKeyPath:keyPath_]; -} - -@end - -@implementation GTMKeyValueObservingCenter - -+ (id)defaultCenter { - static GTMKeyValueObservingCenter *center = nil; - if(!center) { - // do a bit of clever atomic setting to make this thread safe - // if two threads try to set simultaneously, one will fail - // and the other will set things up so that the failing thread - // gets the shared center - GTMKeyValueObservingCenter *newCenter = [[self alloc] init]; - if(!objc_atomicCompareAndSwapGlobalBarrier(nil, - newCenter, - (void *)¢er)) { - [newCenter release]; // COV_NF_LINE no guarantee we'll hit this line - } - } - return center; -} - -- (id)init { - if((self = [super init])) { - observerHelpers_ = [[NSMutableDictionary alloc] init]; - } - return self; -} - -// COV_NF_START -// Singletons don't get deallocated -- (void)dealloc { - [observerHelpers_ release]; - [super dealloc]; -} -// COV_NF_END - -- (id)dictionaryKeyForObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector { - NSString *key = [NSString stringWithFormat:@"%p:%p:%@:%p", - observer, target, keyPath, selector]; - return key; -} - -- (void)addObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options { - GTMKeyValueObservingHelper *helper - = [[GTMKeyValueObservingHelper alloc] initWithObserver:observer - object:target - keyPath:keyPath - selector:selector - userInfo:userInfo - options:options]; - id key = [self dictionaryKeyForObserver:observer - ofObject:target - forKeyPath:keyPath - selector:selector]; - @synchronized(self) { -#if DEBUG - GTMKeyValueObservingHelper *oldHelper = [observerHelpers_ objectForKey:key]; - if (oldHelper) { - _GTMDevLog(@"%@ already observing %@ forKeyPath %@", - observer, target, keyPath); - } -#endif // DEBUG - [observerHelpers_ setObject:helper forKey:key]; - } - [helper release]; -} - -- (void)removeObserver:(id)observer - ofObject:(id)target - forKeyPath:(NSString *)keyPath - selector:(SEL)selector { - id key = [self dictionaryKeyForObserver:observer - ofObject:target - forKeyPath:keyPath - selector:selector]; - GTMKeyValueObservingHelper *helper = nil; - @synchronized(self) { - helper = [[observerHelpers_ objectForKey:key] retain]; -#if DEBUG - if (!helper) { - _GTMDevLog(@"%@ was not observing %@ with keypath %@", - observer, target, keyPath); - } -#endif // DEBUG - [observerHelpers_ removeObjectForKey:key]; - } - [helper deregister]; - [helper release]; -} - -@end - -@implementation NSObject (GTMKeyValueObservingAdditions) - -- (void)gtm_addObserver:(id)observer - forKeyPath:(NSString *)keyPath - selector:(SEL)selector - userInfo:(id)userInfo - options:(NSKeyValueObservingOptions)options { - _GTMDevAssert(observer && [keyPath length] && selector, - @"Missing observer, keyPath, or selector"); - GTMKeyValueObservingCenter *center - = [GTMKeyValueObservingCenter defaultCenter]; - GTMAssertSelectorNilOrImplementedWithArguments(observer, - selector, - @encode(GTMKeyValueChangeNotification *), - NULL); - [center addObserver:observer - ofObject:self - forKeyPath:keyPath - selector:selector - userInfo:userInfo - options:options]; -} - -- (void)gtm_removeObserver:(id)observer - forKeyPath:(NSString *)keyPath - selector:(SEL)selector { - _GTMDevAssert(observer && [keyPath length] && selector, - @"Missing observer, keyPath, or selector"); - GTMKeyValueObservingCenter *center - = [GTMKeyValueObservingCenter defaultCenter]; - GTMAssertSelectorNilOrImplementedWithArguments(observer, - selector, - @encode(GTMKeyValueChangeNotification *), - NULL); - [center removeObserver:observer - ofObject:self - forKeyPath:keyPath - selector:selector]; -} - -@end - - -@implementation GTMKeyValueChangeNotification - -- (id)initWithKeyPath:(NSString *)keyPath ofObject:(id)object - userInfo:(id)userInfo change:(NSDictionary *)change { - if ((self = [super init])) { - keyPath_ = [keyPath copy]; - object_ = [object retain]; - userInfo_ = [userInfo retain]; - change_ = [change retain]; - } - return self; -} - -- (void)dealloc { - [keyPath_ release]; - [object_ release]; - [userInfo_ release]; - [change_ release]; - [super dealloc]; -} - -- (id)copyWithZone:(NSZone *)zone { - return [[[self class] allocWithZone:zone] initWithKeyPath:keyPath_ - ofObject:object_ - userInfo:userInfo_ - change:change_]; -} - -- (BOOL)isEqual:(id)object { - return ([keyPath_ isEqualToString:[object keyPath]] - && [object_ isEqual:[object object]] - && [userInfo_ isEqual:[object userInfo]] - && [change_ isEqual:[object change]]); -} - -- (NSUInteger)hash { - return [keyPath_ hash] + [object_ hash] + [userInfo_ hash] + [change_ hash]; -} - -- (NSString *)keyPath { - return keyPath_; -} - -- (id)object { - return object_; -} - -- (id)userInfo { - return userInfo_; -} - -- (NSDictionary *)change { - return change_; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObservingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObservingTest.m deleted file mode 100644 index b97f7ff7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObservingTest.m +++ /dev/null @@ -1,106 +0,0 @@ -// -// GTMNSObject+KeyValueObservingTest.m -// -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// -// Tester.m -// MAKVONotificationCenter -// -// Created by Michael Ash on 10/15/08. -// - -// This code is based on code by Michael Ash. -// See comment in header. - -#import "GTMSenTestCase.h" -#import "GTMNSObject+KeyValueObserving.h" -#import "GTMDefines.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMNSObject_KeyValueObservingTest : GTMTestCase { - int32_t count_; - NSMutableDictionary *dict_; - __weak NSString *expectedValue_; -} -@end - -@implementation GTMNSObject_KeyValueObservingTest -- (void)setUp { - dict_ = [[NSMutableDictionary alloc] initWithObjectsAndKeys: - @"foo", @"key", - nil]; -} - -- (void)tearDown { - [dict_ release]; -} - -- (void)testSingleChange { - [dict_ gtm_addObserver:self - forKeyPath:@"key" - selector:@selector(observeValueChange:) - userInfo:@"userInfo" - options:NSKeyValueObservingOptionNew]; - expectedValue_ = @"bar"; - [dict_ setObject:expectedValue_ forKey:@"key"]; - STAssertEquals(count_, (int32_t)1, nil); - [dict_ gtm_removeObserver:self - forKeyPath:@"key" - selector:@selector(observeValueChange:)]; - [dict_ setObject:@"foo" forKey:@"key"]; - STAssertEquals(count_, (int32_t)1, nil); -} - -- (void)testRemoving { - [GTMUnitTestDevLogDebug expectPattern:@"-\\[GTMNSObject_KeyValueObservingTest" - @" testRemoving\\] was not observing.*"]; - - [dict_ gtm_removeObserver:self - forKeyPath:@"key" - selector:@selector(observeValueChange:)]; -} - -- (void)testAdding { - [dict_ gtm_addObserver:self - forKeyPath:@"key" - selector:@selector(observeValueChange:) - userInfo:@"userInfo" - options:NSKeyValueObservingOptionNew]; - [GTMUnitTestDevLogDebug expectPattern:@"-\\[GTMNSObject_KeyValueObservingTest" - @" testAdding\\] already observing.*"]; - [dict_ gtm_addObserver:self - forKeyPath:@"key" - selector:@selector(observeValueChange:) - userInfo:@"userInfo" - options:NSKeyValueObservingOptionNew]; -} - -- (void)observeValueChange:(GTMKeyValueChangeNotification *)notification { - STAssertEqualObjects([notification userInfo], @"userInfo", nil); - STAssertEqualObjects([notification keyPath], @"key", nil); - STAssertEqualObjects([notification object], dict_, nil); - NSDictionary *change = [notification change]; - NSString *value = [change objectForKey:NSKeyValueChangeNewKey]; - STAssertEqualObjects(value, expectedValue_, nil); - ++count_; - - GTMKeyValueChangeNotification *copy = [[notification copy] autorelease]; - STAssertEqualObjects(notification, copy, nil); - STAssertEquals([notification hash], [copy hash], nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h deleted file mode 100644 index 1b4d362f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// GTMNSString+FindFolder.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -@interface NSString (GTMStringFindFolderAdditions) - -// Create a path to a folder located with FindFolder -// -// Args: -// theFolderType: one of the folder types in Folders.h -// (kPreferencesFolderType, etc) -// theDomain: one of the domains in Folders.h (kLocalDomain, kUserDomain, etc) -// doCreate: create the folder if it does not already exist -// -// Returns: -// full path to folder, or nil if the folder doesn't exist or can't be created -// -+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType - inDomain:(short)theDomain - doCreate:(BOOL)doCreate; - -// Create a path to a folder inside a folder located with FindFolder -// -// Args: -// theFolderType: one of the folder types in Folders.h -// (kPreferencesFolderType, etc) -// subfolderName: name of directory inside the Apple folder to be located or created -// theDomain: one of the domains in Folders.h (kLocalDomain, kUserDomain, etc) -// doCreate: create the folder if it does not already exist -// -// Returns: -// full path to subdirectory, or nil if the folder doesn't exist or can't be created -// -+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType - subfolderName:(NSString *)subfolderName - inDomain:(short)theDomain - doCreate:(BOOL)doCreate; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.m deleted file mode 100644 index 3a44174f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// GTMNSString+FindFolder.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSString+FindFolder.h" -#import "GTMGarbageCollection.h" - -@implementation NSString (GTMStringFindFolderAdditions) - -+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType - inDomain:(short)theDomain - doCreate:(BOOL)doCreate { - - NSString* folderPath = nil; - FSRef folderRef; - - OSErr err = FSFindFolder(theDomain, theFolderType, doCreate, &folderRef); - if (err == noErr) { - - CFURLRef folderURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, - &folderRef); - if (folderURL) { - folderPath = GTMCFAutorelease(CFURLCopyFileSystemPath(folderURL, - kCFURLPOSIXPathStyle)); - CFRelease(folderURL); - } - } - return folderPath; -} - -+ (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType - subfolderName:(NSString *)subfolderName - inDomain:(short)theDomain - doCreate:(BOOL)doCreate { - NSString *resultPath = nil; - NSString *subdirPath = nil; - NSString *parentFolderPath = [self gtm_stringWithPathForFolder:theFolderType - inDomain:theDomain - doCreate:doCreate]; - if (parentFolderPath) { - - // find the path to the subdirectory - subdirPath = [parentFolderPath stringByAppendingPathComponent:subfolderName]; - - NSFileManager* fileMgr = [NSFileManager defaultManager]; - BOOL isDir = NO; - if ([fileMgr fileExistsAtPath:subdirPath isDirectory:&isDir] && isDir) { - // it already exists - resultPath = subdirPath; - } else if (doCreate) { - - // create the subdirectory with the parent folder's attributes - NSDictionary* attrs = [fileMgr fileAttributesAtPath:parentFolderPath - traverseLink:YES]; - if ([fileMgr createDirectoryAtPath:subdirPath - attributes:attrs]) { - resultPath = subdirPath; - } - } - } - return resultPath; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolderTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolderTest.m deleted file mode 100644 index 66fd329e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolderTest.m +++ /dev/null @@ -1,77 +0,0 @@ -// -// GTMNSString+FindFolderTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSString+FindFolder.h" - -@interface GTMNSString_FindFolderTest : GTMTestCase -@end - -@implementation GTMNSString_FindFolderTest - -- (void)testStringWithPathForFolder { - // for gtm_stringWithPathForFolder:inDomain:doCreate: - // the parameters all get passed through to FSFindFolder so there's no point testing - // other combinations; our semantics will match FSFindFolder's - NSString *prefsPath = [NSString gtm_stringWithPathForFolder:kPreferencesFolderType - inDomain:kUserDomain - doCreate:NO]; - NSString *realPrefsPath = [@"~/Library/Preferences" stringByExpandingTildeInPath]; - STAssertEqualObjects(realPrefsPath, prefsPath, @"Found incorrect prefs path"); - - - // test the subfolder method; it should return nil if we pass NO and the - // subfolder doesn't already exist - - NSString *googCacheNoCreatePath = [NSString gtm_stringWithPathForFolder:kCachedDataFolderType - subfolderName:@"GTMUnitTestDuzntExist" - inDomain:kUserDomain - doCreate:NO]; - STAssertNil(googCacheNoCreatePath, @"Should not exist: %@", googCacheNoCreatePath); - - // test creating ~/Library/Cache/GTMUnitTestCreated - - NSString *folderName = @"GTMUnitTestCreated"; - NSString *gtmCachePath = [NSString gtm_stringWithPathForFolder:kCachedDataFolderType - subfolderName:folderName - inDomain:kUserDomain - doCreate:YES]; - NSString *testPath = [NSString gtm_stringWithPathForFolder:kCachedDataFolderType - inDomain:kUserDomain - doCreate:NO]; - NSString *testPathAppended = [testPath stringByAppendingPathComponent:folderName]; - STAssertEqualObjects(gtmCachePath, testPathAppended, @"Unexpected path name"); - - NSFileManager* fileMgr = [NSFileManager defaultManager]; - BOOL isDir = NO; - BOOL pathExists = [fileMgr fileExistsAtPath:gtmCachePath isDirectory:&isDir] && isDir; - STAssertTrue(pathExists, @"Path %@ is not existing like it should", gtmCachePath); - - // test finding it again w/o having to create it - NSString *gtmCachePath2 = [NSString gtm_stringWithPathForFolder:kCachedDataFolderType - subfolderName:folderName - inDomain:kUserDomain - doCreate:NO]; - STAssertEqualObjects(gtmCachePath2, gtmCachePath, nil); - - BOOL didRemove = [fileMgr removeFileAtPath:gtmCachePath - handler:nil]; - STAssertTrue(didRemove, @"Error removing %@", gtmCachePath); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.h deleted file mode 100644 index 1273cc3b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// GTMNSString+HTML.h -// Dealing with NSStrings that contain HTML -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utilities for NSStrings containing HTML -@interface NSString (GTMNSStringHTMLAdditions) - -/// Get a string where internal characters that need escaping for HTML are escaped -// -/// For example, '&' become '&'. This will only cover characters from table -/// A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters -/// which is what you want for a unicode encoded webpage. If you have a ascii -/// or non-encoded webpage, please use stringByEscapingAsciiHTML which will -/// encode all characters. -/// -/// For obvious reasons this call is only safe once. -// -// Returns: -// Autoreleased NSString -// -- (NSString *)gtm_stringByEscapingForHTML; - -/// Get a string where internal characters that need escaping for HTML are escaped -// -/// For example, '&' become '&' -/// All non-mapped characters (unicode that don't have a &keyword; mapping) -/// will be converted to the appropriate &#xxx; value. If your webpage is -/// unicode encoded (UTF16 or UTF8) use stringByEscapingHTML instead as it is -/// faster, and produces less bloated and more readable HTML (as long as you -/// are using a unicode compliant HTML reader). -/// -/// For obvious reasons this call is only safe once. -// -// Returns: -// Autoreleased NSString -// -- (NSString *)gtm_stringByEscapingForAsciiHTML; - -/// Get a string where internal characters that are escaped for HTML are unescaped -// -/// For example, '&' becomes '&' -/// Handles and 2 cases as well -/// -// Returns: -// Autoreleased NSString -// -- (NSString *)gtm_stringByUnescapingFromHTML; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.m deleted file mode 100644 index 6853df07..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTML.m +++ /dev/null @@ -1,522 +0,0 @@ -// -// GTMNSString+HTML.m -// Dealing with NSStrings that contain HTML -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import "GTMNSString+HTML.h" - -typedef struct { - NSString *escapeSequence; - unichar uchar; -} HTMLEscapeMap; - -// Taken from http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters -// Ordered by uchar lowest to highest for bsearching -static HTMLEscapeMap gAsciiHTMLEscapeMap[] = { - // A.2.2. Special characters - { @""", 34 }, - { @"&", 38 }, - { @"'", 39 }, - { @"<", 60 }, - { @">", 62 }, - - // A.2.1. Latin-1 characters - { @" ", 160 }, - { @"¡", 161 }, - { @"¢", 162 }, - { @"£", 163 }, - { @"¤", 164 }, - { @"¥", 165 }, - { @"¦", 166 }, - { @"§", 167 }, - { @"¨", 168 }, - { @"©", 169 }, - { @"ª", 170 }, - { @"«", 171 }, - { @"¬", 172 }, - { @"­", 173 }, - { @"®", 174 }, - { @"¯", 175 }, - { @"°", 176 }, - { @"±", 177 }, - { @"²", 178 }, - { @"³", 179 }, - { @"´", 180 }, - { @"µ", 181 }, - { @"¶", 182 }, - { @"·", 183 }, - { @"¸", 184 }, - { @"¹", 185 }, - { @"º", 186 }, - { @"»", 187 }, - { @"¼", 188 }, - { @"½", 189 }, - { @"¾", 190 }, - { @"¿", 191 }, - { @"À", 192 }, - { @"Á", 193 }, - { @"Â", 194 }, - { @"Ã", 195 }, - { @"Ä", 196 }, - { @"Å", 197 }, - { @"Æ", 198 }, - { @"Ç", 199 }, - { @"È", 200 }, - { @"É", 201 }, - { @"Ê", 202 }, - { @"Ë", 203 }, - { @"Ì", 204 }, - { @"Í", 205 }, - { @"Î", 206 }, - { @"Ï", 207 }, - { @"Ð", 208 }, - { @"Ñ", 209 }, - { @"Ò", 210 }, - { @"Ó", 211 }, - { @"Ô", 212 }, - { @"Õ", 213 }, - { @"Ö", 214 }, - { @"×", 215 }, - { @"Ø", 216 }, - { @"Ù", 217 }, - { @"Ú", 218 }, - { @"Û", 219 }, - { @"Ü", 220 }, - { @"Ý", 221 }, - { @"Þ", 222 }, - { @"ß", 223 }, - { @"à", 224 }, - { @"á", 225 }, - { @"â", 226 }, - { @"ã", 227 }, - { @"ä", 228 }, - { @"å", 229 }, - { @"æ", 230 }, - { @"ç", 231 }, - { @"è", 232 }, - { @"é", 233 }, - { @"ê", 234 }, - { @"ë", 235 }, - { @"ì", 236 }, - { @"í", 237 }, - { @"î", 238 }, - { @"ï", 239 }, - { @"ð", 240 }, - { @"ñ", 241 }, - { @"ò", 242 }, - { @"ó", 243 }, - { @"ô", 244 }, - { @"õ", 245 }, - { @"ö", 246 }, - { @"÷", 247 }, - { @"ø", 248 }, - { @"ù", 249 }, - { @"ú", 250 }, - { @"û", 251 }, - { @"ü", 252 }, - { @"ý", 253 }, - { @"þ", 254 }, - { @"ÿ", 255 }, - - // A.2.2. Special characters cont'd - { @"Œ", 338 }, - { @"œ", 339 }, - { @"Š", 352 }, - { @"š", 353 }, - { @"Ÿ", 376 }, - - // A.2.3. Symbols - { @"ƒ", 402 }, - - // A.2.2. Special characters cont'd - { @"ˆ", 710 }, - { @"˜", 732 }, - - // A.2.3. Symbols cont'd - { @"Α", 913 }, - { @"Β", 914 }, - { @"Γ", 915 }, - { @"Δ", 916 }, - { @"Ε", 917 }, - { @"Ζ", 918 }, - { @"Η", 919 }, - { @"Θ", 920 }, - { @"Ι", 921 }, - { @"Κ", 922 }, - { @"Λ", 923 }, - { @"Μ", 924 }, - { @"Ν", 925 }, - { @"Ξ", 926 }, - { @"Ο", 927 }, - { @"Π", 928 }, - { @"Ρ", 929 }, - { @"Σ", 931 }, - { @"Τ", 932 }, - { @"Υ", 933 }, - { @"Φ", 934 }, - { @"Χ", 935 }, - { @"Ψ", 936 }, - { @"Ω", 937 }, - { @"α", 945 }, - { @"β", 946 }, - { @"γ", 947 }, - { @"δ", 948 }, - { @"ε", 949 }, - { @"ζ", 950 }, - { @"η", 951 }, - { @"θ", 952 }, - { @"ι", 953 }, - { @"κ", 954 }, - { @"λ", 955 }, - { @"μ", 956 }, - { @"ν", 957 }, - { @"ξ", 958 }, - { @"ο", 959 }, - { @"π", 960 }, - { @"ρ", 961 }, - { @"ς", 962 }, - { @"σ", 963 }, - { @"τ", 964 }, - { @"υ", 965 }, - { @"φ", 966 }, - { @"χ", 967 }, - { @"ψ", 968 }, - { @"ω", 969 }, - { @"ϑ", 977 }, - { @"ϒ", 978 }, - { @"ϖ", 982 }, - - // A.2.2. Special characters cont'd - { @" ", 8194 }, - { @" ", 8195 }, - { @" ", 8201 }, - { @"‌", 8204 }, - { @"‍", 8205 }, - { @"‎", 8206 }, - { @"‏", 8207 }, - { @"–", 8211 }, - { @"—", 8212 }, - { @"‘", 8216 }, - { @"’", 8217 }, - { @"‚", 8218 }, - { @"“", 8220 }, - { @"”", 8221 }, - { @"„", 8222 }, - { @"†", 8224 }, - { @"‡", 8225 }, - // A.2.3. Symbols cont'd - { @"•", 8226 }, - { @"…", 8230 }, - - // A.2.2. Special characters cont'd - { @"‰", 8240 }, - - // A.2.3. Symbols cont'd - { @"′", 8242 }, - { @"″", 8243 }, - - // A.2.2. Special characters cont'd - { @"‹", 8249 }, - { @"›", 8250 }, - - // A.2.3. Symbols cont'd - { @"‾", 8254 }, - { @"⁄", 8260 }, - - // A.2.2. Special characters cont'd - { @"€", 8364 }, - - // A.2.3. Symbols cont'd - { @"ℑ", 8465 }, - { @"℘", 8472 }, - { @"ℜ", 8476 }, - { @"™", 8482 }, - { @"ℵ", 8501 }, - { @"←", 8592 }, - { @"↑", 8593 }, - { @"→", 8594 }, - { @"↓", 8595 }, - { @"↔", 8596 }, - { @"↵", 8629 }, - { @"⇐", 8656 }, - { @"⇑", 8657 }, - { @"⇒", 8658 }, - { @"⇓", 8659 }, - { @"⇔", 8660 }, - { @"∀", 8704 }, - { @"∂", 8706 }, - { @"∃", 8707 }, - { @"∅", 8709 }, - { @"∇", 8711 }, - { @"∈", 8712 }, - { @"∉", 8713 }, - { @"∋", 8715 }, - { @"∏", 8719 }, - { @"∑", 8721 }, - { @"−", 8722 }, - { @"∗", 8727 }, - { @"√", 8730 }, - { @"∝", 8733 }, - { @"∞", 8734 }, - { @"∠", 8736 }, - { @"∧", 8743 }, - { @"∨", 8744 }, - { @"∩", 8745 }, - { @"∪", 8746 }, - { @"∫", 8747 }, - { @"∴", 8756 }, - { @"∼", 8764 }, - { @"≅", 8773 }, - { @"≈", 8776 }, - { @"≠", 8800 }, - { @"≡", 8801 }, - { @"≤", 8804 }, - { @"≥", 8805 }, - { @"⊂", 8834 }, - { @"⊃", 8835 }, - { @"⊄", 8836 }, - { @"⊆", 8838 }, - { @"⊇", 8839 }, - { @"⊕", 8853 }, - { @"⊗", 8855 }, - { @"⊥", 8869 }, - { @"⋅", 8901 }, - { @"⌈", 8968 }, - { @"⌉", 8969 }, - { @"⌊", 8970 }, - { @"⌋", 8971 }, - { @"⟨", 9001 }, - { @"⟩", 9002 }, - { @"◊", 9674 }, - { @"♠", 9824 }, - { @"♣", 9827 }, - { @"♥", 9829 }, - { @"♦", 9830 } -}; - -// Taken from http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters -// This is table A.2.2 Special Characters -static HTMLEscapeMap gUnicodeHTMLEscapeMap[] = { - // C0 Controls and Basic Latin - { @""", 34 }, - { @"&", 38 }, - { @"'", 39 }, - { @"<", 60 }, - { @">", 62 }, - - // Latin Extended-A - { @"Œ", 338 }, - { @"œ", 339 }, - { @"Š", 352 }, - { @"š", 353 }, - { @"Ÿ", 376 }, - - // Spacing Modifier Letters - { @"ˆ", 710 }, - { @"˜", 732 }, - - // General Punctuation - { @" ", 8194 }, - { @" ", 8195 }, - { @" ", 8201 }, - { @"‌", 8204 }, - { @"‍", 8205 }, - { @"‎", 8206 }, - { @"‏", 8207 }, - { @"–", 8211 }, - { @"—", 8212 }, - { @"‘", 8216 }, - { @"’", 8217 }, - { @"‚", 8218 }, - { @"“", 8220 }, - { @"”", 8221 }, - { @"„", 8222 }, - { @"†", 8224 }, - { @"‡", 8225 }, - { @"‰", 8240 }, - { @"‹", 8249 }, - { @"›", 8250 }, - { @"€", 8364 }, -}; - - -// Utility function for Bsearching table above -static int EscapeMapCompare(const void *ucharVoid, const void *mapVoid) { - const unichar *uchar = (const unichar*)ucharVoid; - const HTMLEscapeMap *map = (const HTMLEscapeMap*)mapVoid; - int val; - if (*uchar > map->uchar) { - val = 1; - } else if (*uchar < map->uchar) { - val = -1; - } else { - val = 0; - } - return val; -} - -@implementation NSString (GTMNSStringHTMLAdditions) - -- (NSString *)gtm_stringByEscapingHTMLUsingTable:(HTMLEscapeMap*)table - ofSize:(NSUInteger)size - escapingUnicode:(BOOL)escapeUnicode { - NSUInteger length = [self length]; - if (!length) { - return self; - } - - NSMutableString *finalString = [NSMutableString string]; - NSMutableData *data2 = [NSMutableData dataWithCapacity:sizeof(unichar) * length]; - - // this block is common between GTMNSString+HTML and GTMNSString+XML but - // it's so short that it isn't really worth trying to share. - const unichar *buffer = CFStringGetCharactersPtr((CFStringRef)self); - if (!buffer) { - // We want this buffer to be autoreleased. - NSMutableData *data = [NSMutableData dataWithLength:length * sizeof(UniChar)]; - if (!data) { - // COV_NF_START - Memory fail case - _GTMDevLog(@"couldn't alloc buffer"); - return nil; - // COV_NF_END - } - [self getCharacters:[data mutableBytes]]; - buffer = [data bytes]; - } - - if (!buffer || !data2) { - // COV_NF_START - _GTMDevLog(@"Unable to allocate buffer or data2"); - return nil; - // COV_NF_END - } - - unichar *buffer2 = (unichar *)[data2 mutableBytes]; - - NSUInteger buffer2Length = 0; - - for (NSUInteger i = 0; i < length; ++i) { - HTMLEscapeMap *val = bsearch(&buffer[i], table, - size / sizeof(HTMLEscapeMap), - sizeof(HTMLEscapeMap), EscapeMapCompare); - if (val || (escapeUnicode && buffer[i] > 127)) { - if (buffer2Length) { - CFStringAppendCharacters((CFMutableStringRef)finalString, - buffer2, - buffer2Length); - buffer2Length = 0; - } - if (val) { - [finalString appendString:val->escapeSequence]; - } - else { - _GTMDevAssert(escapeUnicode && buffer[i] > 127, @"Illegal Character"); - [finalString appendFormat:@"&#%d;", buffer[i]]; - } - } else { - buffer2[buffer2Length] = buffer[i]; - buffer2Length += 1; - } - } - if (buffer2Length) { - CFStringAppendCharacters((CFMutableStringRef)finalString, - buffer2, - buffer2Length); - } - return finalString; -} - -- (NSString *)gtm_stringByEscapingForHTML { - return [self gtm_stringByEscapingHTMLUsingTable:gUnicodeHTMLEscapeMap - ofSize:sizeof(gUnicodeHTMLEscapeMap) - escapingUnicode:NO]; -} // gtm_stringByEscapingHTML - -- (NSString *)gtm_stringByEscapingForAsciiHTML { - return [self gtm_stringByEscapingHTMLUsingTable:gAsciiHTMLEscapeMap - ofSize:sizeof(gAsciiHTMLEscapeMap) - escapingUnicode:YES]; -} // gtm_stringByEscapingAsciiHTML - -- (NSString *)gtm_stringByUnescapingFromHTML { - NSRange range = NSMakeRange(0, [self length]); - NSRange subrange = [self rangeOfString:@"&" options:NSBackwardsSearch range:range]; - - // if no ampersands, we've got a quick way out - if (subrange.length == 0) return self; - NSMutableString *finalString = [NSMutableString stringWithString:self]; - do { - NSRange semiColonRange = NSMakeRange(subrange.location, NSMaxRange(range) - subrange.location); - semiColonRange = [self rangeOfString:@";" options:0 range:semiColonRange]; - range = NSMakeRange(0, subrange.location); - // if we don't find a semicolon in the range, we don't have a sequence - if (semiColonRange.location == NSNotFound) { - continue; - } - NSRange escapeRange = NSMakeRange(subrange.location, semiColonRange.location - subrange.location + 1); - NSString *escapeString = [self substringWithRange:escapeRange]; - NSUInteger length = [escapeString length]; - // a squence must be longer than 3 (<) and less than 11 (ϑ) - if (length > 3 && length < 11) { - if ([escapeString characterAtIndex:1] == '#') { - unichar char2 = [escapeString characterAtIndex:2]; - if (char2 == 'x' || char2 == 'X') { - // Hex escape squences £ - NSString *hexSequence = [escapeString substringWithRange:NSMakeRange(3, length - 4)]; - NSScanner *scanner = [NSScanner scannerWithString:hexSequence]; - unsigned value; - if ([scanner scanHexInt:&value] && - value < USHRT_MAX && - value > 0 - && [scanner scanLocation] == length - 4) { - unichar uchar = value; - NSString *charString = [NSString stringWithCharacters:&uchar length:1]; - [finalString replaceCharactersInRange:escapeRange withString:charString]; - } - - } else { - // Decimal Sequences { - NSString *numberSequence = [escapeString substringWithRange:NSMakeRange(2, length - 3)]; - NSScanner *scanner = [NSScanner scannerWithString:numberSequence]; - int value; - if ([scanner scanInt:&value] && - value < USHRT_MAX && - value > 0 - && [scanner scanLocation] == length - 3) { - unichar uchar = value; - NSString *charString = [NSString stringWithCharacters:&uchar length:1]; - [finalString replaceCharactersInRange:escapeRange withString:charString]; - } - } - } else { - // "standard" sequences - for (unsigned i = 0; i < sizeof(gAsciiHTMLEscapeMap) / sizeof(HTMLEscapeMap); ++i) { - if ([escapeString isEqualToString:gAsciiHTMLEscapeMap[i].escapeSequence]) { - [finalString replaceCharactersInRange:escapeRange withString:[NSString stringWithCharacters:&gAsciiHTMLEscapeMap[i].uchar length:1]]; - break; - } - } - } - } - } while ((subrange = [self rangeOfString:@"&" options:NSBackwardsSearch range:range]).length != 0); - return finalString; -} // gtm_stringByUnescapingHTML - - - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTMLTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTMLTest.m deleted file mode 100644 index 1c7baf01..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+HTMLTest.m +++ /dev/null @@ -1,242 +0,0 @@ -// -// GTMNSString+HTMLTest.m -// -// Copyright 2005-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSString+HTML.h" - -@interface GTMNSString_HTMLTest : GTMTestCase -@end - -@implementation GTMNSString_HTMLTest - -- (void)testStringByEscapingHTML { - unichar chars[] = - { 34, 38, 39, 60, 62, 338, 339, 352, 353, 376, 710, 732, - 8194, 8195, 8201, 8204, 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, - 8220, 8221, 8222, 8224, 8225, 8240, 8249, 8250, 8364, }; - - NSString *string1 = [NSString stringWithCharacters:chars - length:sizeof(chars) / sizeof(unichar)]; - NSString *string2 = - @""&'<>ŒœŠšŸ" - "ˆ˜   ‌‍‎‏–" - "—‘’‚“”„†‡" - "‰‹›€"; - - STAssertEqualObjects([string1 gtm_stringByEscapingForHTML], - string2, - @"HTML escaping failed"); - - STAssertEqualObjects([@"" gtm_stringByEscapingForHTML], - @"<this & that>", - @"HTML escaping failed"); - NSString *string = [NSString stringWithUTF8String:"パン・&ド・カンパーニュ"]; - NSString *escapeStr = [NSString stringWithUTF8String:"パン・&ド・カンパーニュ"]; - STAssertEqualObjects([string gtm_stringByEscapingForHTML], - escapeStr, - @"HTML escaping failed"); - - string = [NSString stringWithUTF8String:"abcا1ب<تdef&"]; - STAssertEqualObjects([string gtm_stringByEscapingForHTML], - [NSString stringWithUTF8String:"abcا1ب<تdef&"], - @"HTML escaping failed"); - - // test empty string - STAssertEqualObjects([@"" gtm_stringByEscapingForHTML], @"", nil); -} // testStringByEscapingHTML - -- (void)testStringByEscapingAsciiHTML { - unichar chars[] = - { 34, 38, 39, 60, 62, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 338, 339, 352, 353, 376, - 402, 710, 732, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, - 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 945, 946, 947, - 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, - 963, 964, 965, 966, 967, 968, 969, 977, 978, 982, 8194, 8195, 8201, 8204, - 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, - 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8254, 8260, 8364, 8472, 8465, 8476, - 8482, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, 8657, 8658, 8659, 8660, - 8704, 8706, 8707, 8709, 8711, 8712, 8713, 8715, 8719, 8721, 8722, 8727, 8730, - 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, 8756, 8764, 8773, 8776, 8800, - 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, 8853, 8855, 8869, 8901, 8968, - 8969, 8970, 8971, 9001, 9002, 9674, 9824, 9827, 9829, 9830 }; - - NSString *string1 = [NSString stringWithCharacters:chars - length:sizeof(chars) / sizeof(unichar)]; - NSString *string2 = - @""&'<> ¡¢£¤¥" - "¦§¨©ª«¬­®¯°" - "±²³´µ¶·¸¹" - "º»¼½¾¿ÀÁ" - "ÂÃÄÅÆÇÈÉ" - "ÊËÌÍÎÏÐÑÒ" - "ÓÔÕÖ×ØÙÚ" - "ÛÜÝÞßàáâã" - "äåæçèéêëì" - "íîïðñòóôõ" - "ö÷øùúûüýþ" - "ÿŒœŠšŸƒˆ˜" - "ΑΒΓΔΕΖΗΘΙ" - "ΚΛΜΝΞΟΠΡΣΤ" - "ΥΦΧΨΩαβγδ" - "εζηθικλμνξ" - "οπρςστυφχψ" - "ωϑϒϖ   ‌‍" - "‎‏–—‘’‚“”" - "„†‡•…‰′″" - "‹›‾⁄€℘ℑℜ™" - "ℵ←↑→↓↔↵⇐⇑⇒" - "⇓⇔∀∂∃∅∇∈∉∋" - "∏∑−∗√∝∞∠∧∨" - "∩∪∫∴∼≅≈≠≡≤≥" - "⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈" - "⌉⌊⌋⟨⟩◊♠♣♥" - "♦"; - - STAssertEqualObjects([string1 gtm_stringByEscapingForAsciiHTML], - string2, - @"HTML escaping failed"); - - STAssertEqualObjects([@"" gtm_stringByEscapingForAsciiHTML], - @"<this & that>", - @"HTML escaping failed"); - NSString *string = [NSString stringWithUTF8String:"パン・ド・カンパーニュ"]; - STAssertEqualObjects([string gtm_stringByEscapingForAsciiHTML], - @"パン・ド・カ" - "ンパーニュ", - @"HTML escaping failed"); - - // Mix in some right - to left - string = [NSString stringWithUTF8String:"abcا1ب<تdef&"]; - STAssertEqualObjects([string gtm_stringByEscapingForAsciiHTML], - @"abcا1ب<تdef&", - @"HTML escaping failed"); -} // stringByEscapingAsciiHTML - -- (void)testStringByUnescapingHTML { - NSString *string1 = - @""&'<> ¡¢£¤¥" - "¦§¨©ª«¬­®¯°" - "±²³´µ¶·¸¹" - "º»¼½¾¿ÀÁ" - "ÂÃÄÅÆÇÈÉ" - "ÊËÌÍÎÏÐÑÒ" - "ÓÔÕÖ×ØÙÚ" - "ÛÜÝÞßàáâã" - "äåæçèéêëì" - "íîïðñòóôõ" - "ö÷øùúûüýþ" - "ÿŒœŠšŸƒˆ˜" - "ΑΒΓΔΕΖΗΘΙ" - "ΚΛΜΝΞΟΠΡΣΤ" - "ΥΦΧΨΩαβγδ" - "εζηθικλμνξ" - "οπρςστυφχψ" - "ωϑϒϖ   ‌‍" - "‎‏–—‘’‚“”" - "„†‡•…‰′″" - "‹›‾⁄€℘ℑℜ™" - "ℵ←↑→↓↔↵⇐⇑⇒" - "⇓⇔∀∂∃∅∇∈∉∋" - "∏∑−∗√∝∞∠∧∨" - "∩∪∫∴∼≅≈≠≡≤≥" - "⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈" - "⌉⌊⌋⟨⟩◊♠♣♥" - "♦"; - - unichar chars[] = - { 34, 38, 39, 60, 62, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 338, 339, 352, 353, 376, - 402, 710, 732, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, - 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 945, 946, 947, - 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, - 963, 964, 965, 966, 967, 968, 969, 977, 978, 982, 8194, 8195, 8201, 8204, - 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, - 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8254, 8260, 8364, 8472, 8465, 8476, - 8482, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, 8657, 8658, 8659, 8660, - 8704, 8706, 8707, 8709, 8711, 8712, 8713, 8715, 8719, 8721, 8722, 8727, 8730, - 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, 8756, 8764, 8773, 8776, 8800, - 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, 8853, 8855, 8869, 8901, 8968, - 8969, 8970, 8971, 9001, 9002, 9674, 9824, 9827, 9829, 9830 }; - - NSString *string2 = [NSString stringWithCharacters:chars - length:sizeof(chars) / sizeof(unichar)]; - STAssertEqualObjects([string1 gtm_stringByUnescapingFromHTML], - string2, - @"HTML unescaping failed"); - - STAssertEqualObjects([@"ABC" gtm_stringByUnescapingFromHTML], - @"ABC", @"HTML unescaping failed"); - - STAssertEqualObjects([@"" gtm_stringByUnescapingFromHTML], - @"", @"HTML unescaping failed"); - - STAssertEqualObjects([@"A&Bang;C" gtm_stringByUnescapingFromHTML], - @"A&Bang;C", @"HTML unescaping failed"); - - STAssertEqualObjects([@"A&Bang;C" gtm_stringByUnescapingFromHTML], - @"A&Bang;C", @"HTML unescaping failed"); - - STAssertEqualObjects([@"A&Bang;C" gtm_stringByUnescapingFromHTML], - @"A&Bang;C", @"HTML unescaping failed"); - - STAssertEqualObjects([@"AA;" gtm_stringByUnescapingFromHTML], - @"AA;", @"HTML unescaping failed"); - - STAssertEqualObjects([@"&" gtm_stringByUnescapingFromHTML], - @"&", @"HTML unescaping failed"); - - STAssertEqualObjects([@"&;" gtm_stringByUnescapingFromHTML], - @"&;", @"HTML unescaping failed"); - - STAssertEqualObjects([@"&x;" gtm_stringByUnescapingFromHTML], - @"&x;", @"HTML unescaping failed"); - - STAssertEqualObjects([@"&X;" gtm_stringByUnescapingFromHTML], - @"&X;", @"HTML unescaping failed"); - - STAssertEqualObjects([@";" gtm_stringByUnescapingFromHTML], - @";", @"HTML unescaping failed"); - - STAssertEqualObjects([@"<this & that>" gtm_stringByUnescapingFromHTML], - @"", @"HTML unescaping failed"); - - -} // testStringByUnescapingHTML - -- (void)testStringRoundtrippingEscapedHTML { - NSString *string = [NSString stringWithUTF8String:"This test ©™®๒०á Ù§"]; - STAssertEqualObjects(string, - [[string gtm_stringByEscapingForHTML] gtm_stringByUnescapingFromHTML], - @"HTML Roundtripping failed"); - string = [NSString stringWithUTF8String:"This test ©™®๒०á Ù§"]; - STAssertEqualObjects(string, - [[string gtm_stringByEscapingForAsciiHTML] gtm_stringByUnescapingFromHTML], - @"HTML Roundtripping failed"); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.h deleted file mode 100644 index 71a98c5f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GTMNSString+Replace.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Give easy search-n-replace functionality to NSString. -@interface NSString (GTMStringReplaceAdditions) - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -// 10.5 has stringByReplacingOccurrencesOfString:withString:, use that directly. - -/// Returns a new autoreleased string by replacing all occurrences of -// |oldString| with |newString| (case sensitive). If |oldString| is nil or -// @"" nothing is done and |self| is returned. If |newString| is nil, it's -// treated as if |newString| were the empty string, thus effectively -// deleting all occurrences of |oldString| from |self|. -// -// Args: -// target - the NSString to search for -// replacement - the NSString to replace |oldString| with -// -// Returns: -// A new autoreleased NSString -// -- (NSString *)gtm_stringByReplacingString:(NSString *)target - withString:(NSString *)replacement; - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.m deleted file mode 100644 index ddaad5ed..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+Replace.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// GTMNSString+Replace.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSString+Replace.h" - - -@implementation NSString (GTMStringReplaceAdditions) - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -// 10.5 has stringByReplacingOccurrencesOfString:withString:, use that directly. - -- (NSString *)gtm_stringByReplacingString:(NSString *)target - withString:(NSString *)replacement { - // If |target| was nil, then do nothing and return |self| - // - // We do the retain+autorelease dance here because of this use case: - // NSString *s1 = [[NSString alloc] init...]; - // NSString *s2 = [s1 stringByReplacingString:@"foo" withString:@"bar"]; - // [s1 release]; // |s2| still needs to be valid after this line - if (!target) - return [[self retain] autorelease]; - - // If |replacement| is nil we want it to be treated as if @"" was specified - // ... effectively removing |target| from self - if (!replacement) - replacement = @""; - - NSMutableString *result = [[self mutableCopy] autorelease]; - [result replaceOccurrencesOfString:target - withString:replacement - options:0 - range:NSMakeRange(0, [result length])]; - return result; -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+ReplaceTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+ReplaceTest.m deleted file mode 100644 index 4561af66..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+ReplaceTest.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// GTMNSString+ReplaceTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSString+Replace.h" - -@interface GTMNSString_ReplaceTest : GTMTestCase -@end - -@implementation GTMNSString_ReplaceTest - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (void)testStringByReplacingStringWithString { - NSString *testString = @"a bc debc gh"; - NSString *result; - - result = [testString gtm_stringByReplacingString:@"bc" withString:@"BC"]; - STAssertEqualObjects(@"a BC deBC gh", result, - @"'bc' wasn't replaced with 'BC'"); - - result = [testString gtm_stringByReplacingString:@"bc" withString:@""]; - STAssertEqualObjects(@"a de gh", result, @"'bc' wasn't replaced with ''"); - - result = [testString gtm_stringByReplacingString:@"bc" withString:nil]; - STAssertEqualObjects(@"a de gh", result, @"'bc' wasn't replaced with (nil)"); - - result = [testString gtm_stringByReplacingString:@" " withString:@"S"]; - STAssertEqualObjects(@"aSbcSdebcSgh", result, @"' ' wasn't replaced with 'S'"); - - result = [testString gtm_stringByReplacingString:nil withString:@"blah"]; - STAssertEqualObjects(testString, result, @"(nil) wasn't replaced with 'blah'"); - - result = [testString gtm_stringByReplacingString:nil withString:nil]; - STAssertEqualObjects(testString, result, @"(nil) wasn't replaced with (nil)"); - - result = [testString gtm_stringByReplacingString:@"" withString:@"X"]; - STAssertEqualObjects(testString, result, - @"replacing '' with anything should yield the original string"); -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.h deleted file mode 100644 index d4c7e09a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// GTMNSString+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utilities for encoding and decoding URL arguments. -@interface NSString (GTMNSStringURLArgumentsAdditions) - -/// Returns a string that is escaped properly to be a URL argument. -// -/// This differs from stringByAddingPercentEscapesUsingEncoding: in that it -/// will escape all the reserved characters (per RFC 3986 -/// ) which -/// stringByAddingPercentEscapesUsingEncoding would leave. -/// -/// This will also escape '%', so this should not be used on a string that has -/// already been escaped unless double-escaping is the desired result. -- (NSString*)gtm_stringByEscapingForURLArgument; - -/// Returns the unescaped version of a URL argument -// -/// This has the same behavior as stringByReplacingPercentEscapesUsingEncoding:, -/// except that it will also convert '+' to space. -- (NSString*)gtm_stringByUnescapingFromURLArgument; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.m deleted file mode 100644 index 46d2c99e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// GTMNSString+URLArguments.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSString+URLArguments.h" -#import "GTMGarbageCollection.h" - -@implementation NSString (GTMNSStringURLArgumentsAdditions) - -- (NSString*)gtm_stringByEscapingForURLArgument { - // Encode all the reserved characters, per RFC 3986 - // () - CFStringRef escaped = - CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, - (CFStringRef)self, - NULL, - (CFStringRef)@"!*'();:@&=+$,/?%#[]", - kCFStringEncodingUTF8); - return GTMCFAutorelease(escaped); -} - -- (NSString*)gtm_stringByUnescapingFromURLArgument { - NSMutableString *resultString = [NSMutableString stringWithString:self]; - [resultString replaceOccurrencesOfString:@"+" - withString:@" " - options:NSLiteralSearch - range:NSMakeRange(0, [resultString length])]; - return [resultString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArgumentsTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArgumentsTest.m deleted file mode 100644 index 90a5a813..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+URLArgumentsTest.m +++ /dev/null @@ -1,94 +0,0 @@ -// -// GTMNSString+URLArgumentsTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMNSString+URLArguments.h" - -@interface GTMNSString_URLArgumentsTest : GTMTestCase -@end - -@implementation GTMNSString_URLArgumentsTest - - -- (void)testEscaping { - // should be done already by the basic code - STAssertEqualObjects([@"this that" gtm_stringByEscapingForURLArgument], @"this%20that", @"- space should be escaped"); - STAssertEqualObjects([@"this\"that" gtm_stringByEscapingForURLArgument], @"this%22that", @"- double quote should be escaped"); - // make sure our additions are handled - STAssertEqualObjects([@"this!that" gtm_stringByEscapingForURLArgument], @"this%21that", @"- exclamation mark should be escaped"); - STAssertEqualObjects([@"this*that" gtm_stringByEscapingForURLArgument], @"this%2Athat", @"- asterisk should be escaped"); - STAssertEqualObjects([@"this'that" gtm_stringByEscapingForURLArgument], @"this%27that", @"- single quote should be escaped"); - STAssertEqualObjects([@"this(that" gtm_stringByEscapingForURLArgument], @"this%28that", @"- left paren should be escaped"); - STAssertEqualObjects([@"this)that" gtm_stringByEscapingForURLArgument], @"this%29that", @"- right paren should be escaped"); - STAssertEqualObjects([@"this;that" gtm_stringByEscapingForURLArgument], @"this%3Bthat", @"- semi-colon should be escaped"); - STAssertEqualObjects([@"this:that" gtm_stringByEscapingForURLArgument], @"this%3Athat", @"- colon should be escaped"); - STAssertEqualObjects([@"this@that" gtm_stringByEscapingForURLArgument], @"this%40that", @"- at sign should be escaped"); - STAssertEqualObjects([@"this&that" gtm_stringByEscapingForURLArgument], @"this%26that", @"- ampersand should be escaped"); - STAssertEqualObjects([@"this=that" gtm_stringByEscapingForURLArgument], @"this%3Dthat", @"- equals should be escaped"); - STAssertEqualObjects([@"this+that" gtm_stringByEscapingForURLArgument], @"this%2Bthat", @"- plus should be escaped"); - STAssertEqualObjects([@"this$that" gtm_stringByEscapingForURLArgument], @"this%24that", @"- dollar-sign should be escaped"); - STAssertEqualObjects([@"this,that" gtm_stringByEscapingForURLArgument], @"this%2Cthat", @"- comma should be escaped"); - STAssertEqualObjects([@"this/that" gtm_stringByEscapingForURLArgument], @"this%2Fthat", @"- slash should be escaped"); - STAssertEqualObjects([@"this?that" gtm_stringByEscapingForURLArgument], @"this%3Fthat", @"- question mark should be escaped"); - STAssertEqualObjects([@"this%that" gtm_stringByEscapingForURLArgument], @"this%25that", @"- percent should be escaped"); - STAssertEqualObjects([@"this#that" gtm_stringByEscapingForURLArgument], @"this%23that", @"- pound should be escaped"); - STAssertEqualObjects([@"this[that" gtm_stringByEscapingForURLArgument], @"this%5Bthat", @"- left bracket should be escaped"); - STAssertEqualObjects([@"this]that" gtm_stringByEscapingForURLArgument], @"this%5Dthat", @"- right bracket should be escaped"); - // make sure plus and space are handled in the right order - STAssertEqualObjects([@"this that+the other" gtm_stringByEscapingForURLArgument], @"this%20that%2Bthe%20other", @"- pluses and spaces should be different"); - // high char test - NSString *tester = [NSString stringWithUTF8String:"caf\xC3\xA9"]; - STAssertNotNil(tester, @"failed to create from utf8 run"); - STAssertEqualObjects([tester gtm_stringByEscapingForURLArgument], @"caf%C3%A9", @"- high chars should work"); -} - -- (void)testUnescaping { - // should be done already by the basic code - STAssertEqualObjects([@"this%20that" gtm_stringByUnescapingFromURLArgument], @"this that", @"- space should be unescaped"); - STAssertEqualObjects([@"this%22that" gtm_stringByUnescapingFromURLArgument], @"this\"that", @"- double quote should be unescaped"); - // make sure our additions are handled - STAssertEqualObjects([@"this%21that" gtm_stringByUnescapingFromURLArgument], @"this!that", @"- exclamation mark should be unescaped"); - STAssertEqualObjects([@"this%2Athat" gtm_stringByUnescapingFromURLArgument], @"this*that", @"- asterisk should be unescaped"); - STAssertEqualObjects([@"this%27that" gtm_stringByUnescapingFromURLArgument], @"this'that", @"- single quote should be unescaped"); - STAssertEqualObjects([@"this%28that" gtm_stringByUnescapingFromURLArgument], @"this(that", @"- left paren should be unescaped"); - STAssertEqualObjects([@"this%29that" gtm_stringByUnescapingFromURLArgument], @"this)that", @"- right paren should be unescaped"); - STAssertEqualObjects([@"this%3Bthat" gtm_stringByUnescapingFromURLArgument], @"this;that", @"- semi-colon should be unescaped"); - STAssertEqualObjects([@"this%3Athat" gtm_stringByUnescapingFromURLArgument], @"this:that", @"- colon should be unescaped"); - STAssertEqualObjects([@"this%40that" gtm_stringByUnescapingFromURLArgument], @"this@that", @"- at sign should be unescaped"); - STAssertEqualObjects([@"this%26that" gtm_stringByUnescapingFromURLArgument], @"this&that", @"- ampersand should be unescaped"); - STAssertEqualObjects([@"this%3Dthat" gtm_stringByUnescapingFromURLArgument], @"this=that", @"- equals should be unescaped"); - STAssertEqualObjects([@"this%2Bthat" gtm_stringByUnescapingFromURLArgument], @"this+that", @"- plus should be unescaped"); - STAssertEqualObjects([@"this%24that" gtm_stringByUnescapingFromURLArgument], @"this$that", @"- dollar-sign should be unescaped"); - STAssertEqualObjects([@"this%2Cthat" gtm_stringByUnescapingFromURLArgument], @"this,that", @"- comma should be unescaped"); - STAssertEqualObjects([@"this%2Fthat" gtm_stringByUnescapingFromURLArgument], @"this/that", @"- slash should be unescaped"); - STAssertEqualObjects([@"this%3Fthat" gtm_stringByUnescapingFromURLArgument], @"this?that", @"- question mark should be unescaped"); - STAssertEqualObjects([@"this%25that" gtm_stringByUnescapingFromURLArgument], @"this%that", @"- percent should be unescaped"); - STAssertEqualObjects([@"this%23that" gtm_stringByUnescapingFromURLArgument], @"this#that", @"- pound should be unescaped"); - STAssertEqualObjects([@"this%5Bthat" gtm_stringByUnescapingFromURLArgument], @"this[that", @"- left bracket should be unescaped"); - STAssertEqualObjects([@"this%5Dthat" gtm_stringByUnescapingFromURLArgument], @"this]that", @"- right bracket should be unescaped"); - // make sure a plus come back out as a space - STAssertEqualObjects([[NSString stringWithString:@"this+that"] gtm_stringByUnescapingFromURLArgument], @"this that", @"- plus should be unescaped"); - // make sure plus and %2B are handled in the right order - STAssertEqualObjects([@"this+that%2Bthe%20other" gtm_stringByUnescapingFromURLArgument], @"this that+the other", @"- pluses and spaces should be different"); - // high char test - NSString *tester = [NSString stringWithUTF8String:"caf\xC3\xA9"]; - STAssertNotNil(tester, @"failed to create from utf8 run"); - STAssertEqualObjects([[NSString stringWithString:@"caf%C3%A9"] gtm_stringByUnescapingFromURLArgument], tester, @"- high chars should work"); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.h deleted file mode 100644 index 6ef54d71..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// GTMNSString+XML.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Utilities for NSStrings containing XML -@interface NSString (GTMNSStringXMLAdditions) - -/// Get a string where characters that need escaping for XML are escaped and invalid characters removed -// -/// This call escapes '&', '<, '>', '\'', '"' per the xml spec and removes all -/// invalid characters as defined by Section 2.2 of the xml spec. -/// -/// For obvious reasons this call is only safe once. -// -// Returns: -// Autoreleased NSString -// -- (NSString *)gtm_stringBySanitizingAndEscapingForXML; - -/// Get a string where characters that invalid characters per the XML spec have been removed -// -/// This call removes all invalid characters as defined by Section 2.2 of the -/// xml spec. If you are writing XML yourself, you probably was to use the -/// above api (gtm_stringBySanitizingAndEscapingForXML) so any entities also -/// get escaped. -// -// Returns: -// Autoreleased NSString -// -- (NSString *)gtm_stringBySanitizingToXMLSpec; - -// There is no stringByUnescapingFromXML because the XML parser will do this. -// The above api is here just incase you need to create XML yourself. - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.m deleted file mode 100644 index 0e16ddba..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XML.m +++ /dev/null @@ -1,182 +0,0 @@ -// -// GTMNSString+XML.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import "GTMNSString+XML.h" -#import "GTMGarbageCollection.h" - -enum { - kGTMXMLCharModeEncodeQUOT = 0, - kGTMXMLCharModeEncodeAMP = 1, - kGTMXMLCharModeEncodeAPOS = 2, - kGTMXMLCharModeEncodeLT = 3, - kGTMXMLCharModeEncodeGT = 4, - kGTMXMLCharModeValid = 99, - kGTMXMLCharModeInvalid = 100, -}; -typedef NSUInteger GTMXMLCharMode; - -static NSString *gXMLEntityList[] = { - // this must match the above order - @""", - @"&", - @"'", - @"<", - @">", -}; - -GTM_INLINE GTMXMLCharMode XMLModeForUnichar(UniChar c) { - - // Per XML spec Section 2.2 Characters - // ( http://www.w3.org/TR/REC-xml/#charsets ) - // - // Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | - // [#x10000-#x10FFFF] - - if (c <= 0xd7ff) { - if (c >= 0x20) { - switch (c) { - case 34: - return kGTMXMLCharModeEncodeQUOT; - case 38: - return kGTMXMLCharModeEncodeAMP; - case 39: - return kGTMXMLCharModeEncodeAPOS; - case 60: - return kGTMXMLCharModeEncodeLT; - case 62: - return kGTMXMLCharModeEncodeGT; - default: - return kGTMXMLCharModeValid; - } - } else { - if (c == '\n') - return kGTMXMLCharModeValid; - if (c == '\r') - return kGTMXMLCharModeValid; - if (c == '\t') - return kGTMXMLCharModeValid; - return kGTMXMLCharModeInvalid; - } - } - - if (c < 0xE000) - return kGTMXMLCharModeInvalid; - - if (c <= 0xFFFD) - return kGTMXMLCharModeValid; - - // UniChar can't have the following values - // if (c < 0x10000) - // return kGTMXMLCharModeInvalid; - // if (c <= 0x10FFFF) - // return kGTMXMLCharModeValid; - - return kGTMXMLCharModeInvalid; -} // XMLModeForUnichar - - -static NSString *AutoreleasedCloneForXML(NSString *src, BOOL escaping) { - // - // NOTE: - // We don't use CFXMLCreateStringByEscapingEntities because it's busted in - // 10.3 (http://lists.apple.com/archives/Cocoa-dev/2004/Nov/msg00059.html) and - // it doesn't do anything about the chars that are actually invalid per the - // xml spec. - // - - // we can't use the CF call here because it leaves the invalid chars - // in the string. - NSUInteger length = [src length]; - if (!length) { - return src; - } - - NSMutableString *finalString = [NSMutableString string]; - - // this block is common between GTMNSString+HTML and GTMNSString+XML but - // it's so short that it isn't really worth trying to share. - const UniChar *buffer = CFStringGetCharactersPtr((CFStringRef)src); - if (!buffer) { - // We want this buffer to be autoreleased. - NSMutableData *data = [NSMutableData dataWithLength:length * sizeof(UniChar)]; - if (!data) { - // COV_NF_START - Memory fail case - _GTMDevLog(@"couldn't alloc buffer"); - return nil; - // COV_NF_END - } - [src getCharacters:[data mutableBytes]]; - buffer = [data bytes]; - } - - const UniChar *goodRun = buffer; - NSUInteger goodRunLength = 0; - - for (NSUInteger i = 0; i < length; ++i) { - - GTMXMLCharMode cMode = XMLModeForUnichar(buffer[i]); - - // valid chars go as is, and if we aren't doing entities, then - // everything goes as is. - if ((cMode == kGTMXMLCharModeValid) || - (!escaping && (cMode != kGTMXMLCharModeInvalid))) { - // goes as is - goodRunLength += 1; - } else { - // it's something we have to encode or something invalid - - // start by adding what we already collected (if anything) - if (goodRunLength) { - CFStringAppendCharacters((CFMutableStringRef)finalString, - goodRun, - goodRunLength); - goodRunLength = 0; - } - - // if it wasn't invalid, add the encoded version - if (cMode != kGTMXMLCharModeInvalid) { - // add this encoded - [finalString appendString:gXMLEntityList[cMode]]; - } - - // update goodRun to point to the next UniChar - goodRun = buffer + i + 1; - } - } - - // anything left to add? - if (goodRunLength) { - CFStringAppendCharacters((CFMutableStringRef)finalString, - goodRun, - goodRunLength); - } - return finalString; -} // AutoreleasedCloneForXML - -@implementation NSString (GTMNSStringXMLAdditions) - -- (NSString *)gtm_stringBySanitizingAndEscapingForXML { - return AutoreleasedCloneForXML(self, YES); -} // gtm_stringBySanitizingAndEscapingForXML - -- (NSString *)gtm_stringBySanitizingToXMLSpec { - return AutoreleasedCloneForXML(self, NO); -} // gtm_stringBySanitizingToXMLSpec - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XMLTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XMLTest.m deleted file mode 100644 index 4788690f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMNSString+XMLTest.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// GTMNSString+XMLTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#import "GTMSenTestCase.h" -#import "GTMNSString+XML.h" - - -@interface GTMNSString_XMLTest : GTMTestCase -@end - -@implementation GTMNSString_XMLTest - -- (void)testStringBySanitizingAndEscapingForXML { - // test the substitutions cases - UniChar chars[] = { - 'z', 0, 'z', 1, 'z', 4, 'z', 5, 'z', 34, 'z', 38, 'z', 39, 'z', - 60, 'z', 62, 'z', ' ', 'z', 0xd800, 'z', 0xDFFF, 'z', 0xE000, - 'z', 0xFFFE, 'z', 0xFFFF, 'z', '\n', 'z', '\r', 'z', '\t', 'z' }; - - NSString *string1 = [NSString stringWithCharacters:chars - length:sizeof(chars) / sizeof(UniChar)]; - NSString *string2 = - [NSString stringWithFormat:@"zzzzz"z&z'z<z>z zzz%Czzz\nz\rz\tz", - 0xE000]; - - STAssertEqualObjects([string1 gtm_stringBySanitizingAndEscapingForXML], - string2, - @"Sanitize and Escape for XML failed"); - - // force the backing store of the NSString to test extraction paths - char ascBuffer[] = "a\01bcde\nf"; - NSString *ascString = - [[[NSString alloc] initWithBytesNoCopy:ascBuffer - length:sizeof(ascBuffer) / sizeof(char) - encoding:NSASCIIStringEncoding - freeWhenDone:NO] autorelease]; - STAssertEqualObjects([ascString gtm_stringBySanitizingAndEscapingForXML], - @"abcde\nf", - @"Sanitize and Escape for XML from asc buffer failed"); - - // test empty string - STAssertEqualObjects([@"" gtm_stringBySanitizingAndEscapingForXML], @"", nil); -} - -- (void)testStringBySanitizingToXMLSpec { - // test the substitutions cases - UniChar chars[] = { - 'z', 0, 'z', 1, 'z', 4, 'z', 5, 'z', 34, 'z', 38, 'z', 39, 'z', - 60, 'z', 62, 'z', ' ', 'z', 0xd800, 'z', 0xDFFF, 'z', 0xE000, - 'z', 0xFFFE, 'z', 0xFFFF, 'z', '\n', 'z', '\r', 'z', '\t', 'z' }; - - NSString *string1 = [NSString stringWithCharacters:chars - length:sizeof(chars) / sizeof(UniChar)]; - NSString *string2 = - [NSString stringWithFormat:@"zzzzz\"z&z'zz zzz%Czzz\nz\rz\tz", - 0xE000]; - - STAssertEqualObjects([string1 gtm_stringBySanitizingToXMLSpec], - string2, - @"Sanitize for XML failed"); - - // force the backing store of the NSString to test extraction paths - char ascBuffer[] = "a\01bcde\nf"; - NSString *ascString = - [[[NSString alloc] initWithBytesNoCopy:ascBuffer - length:sizeof(ascBuffer) / sizeof(char) - encoding:NSASCIIStringEncoding - freeWhenDone:NO] autorelease]; - STAssertEqualObjects([ascString gtm_stringBySanitizingToXMLSpec], - @"abcde\nf", - @"Sanitize and Escape for XML from asc buffer failed"); - - // test empty string - STAssertEqualObjects([@"" gtm_stringBySanitizingToXMLSpec], @"", nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h deleted file mode 100644 index 2c258419..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h +++ /dev/null @@ -1,106 +0,0 @@ -// -// GTMObjC2Runtime.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// These functions exist for code that we want to compile on both the < 10.5 -// sdks and on the >= 10.5 sdks without warnings. It basically reimplements -// certain parts of the objc2 runtime in terms of the objc1 runtime. It is not -// a complete implementation as I've only implemented the routines I know we -// use. Feel free to add more as necessary. -// These functions are not documented because they conform to the documentation -// for the ObjC2 Runtime. - -#if OBJC_API_VERSION >= 2 // Only have optional and req'd keywords in ObjC2. -#define AT_OPTIONAL @optional -#define AT_REQUIRED @required -#else -#define AT_OPTIONAL -#define AT_REQUIRED -#endif - -// The file objc-runtime.h was moved to runtime.h and in Leopard, objc-runtime.h -// was just a wrapper around runtime.h. For the iPhone SDK, this objc-runtime.h -// is removed in the iPhoneOS2.0 SDK. -// -// The |Object| class was removed in the iPhone2.0 SDK too. -#if GTM_IPHONE_SDK -#import -#else -#import -#import -#endif - -#import - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -#import "objc/Protocol.h" - -OBJC_EXPORT Class object_getClass(id obj); -OBJC_EXPORT const char *class_getName(Class cls); -OBJC_EXPORT BOOL class_conformsToProtocol(Class cls, Protocol *protocol); -OBJC_EXPORT Class class_getSuperclass(Class cls); -OBJC_EXPORT Method *class_copyMethodList(Class cls, unsigned int *outCount); -OBJC_EXPORT SEL method_getName(Method m); -OBJC_EXPORT void method_exchangeImplementations(Method m1, Method m2); -OBJC_EXPORT IMP method_getImplementation(Method method); -OBJC_EXPORT IMP method_setImplementation(Method method, IMP imp); -OBJC_EXPORT struct objc_method_description protocol_getMethodDescription(Protocol *p, - SEL aSel, - BOOL isRequiredMethod, - BOOL isInstanceMethod); - -// If building for 10.4 but using the 10.5 SDK, don't include these. -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 -// atomics -// On Leopard these are GC aware -// Intentionally did not include the non-barrier versions, because I couldn't -// come up with a case personally where you wouldn't want to use the -// barrier versions. -GTM_INLINE bool OSAtomicCompareAndSwapPtrBarrier(void *predicate, - void *replacement, - volatile void *theValue) { -#if defined(__LP64__) && __LP64__ - return OSAtomicCompareAndSwap64Barrier((int64_t)predicate, - (int64_t)replacement, - (int64_t *)theValue); -#else // defined(__LP64__) && __LP64__ - return OSAtomicCompareAndSwap32Barrier((int32_t)predicate, - (int32_t)replacement, - (int32_t *)theValue); -#endif // defined(__LP64__) && __LP64__ -} - -GTM_INLINE BOOL objc_atomicCompareAndSwapGlobalBarrier(id predicate, - id replacement, - volatile id *objectLocation) { - return OSAtomicCompareAndSwapPtrBarrier(predicate, - replacement, - objectLocation); -} -GTM_INLINE BOOL objc_atomicCompareAndSwapInstanceVariableBarrier(id predicate, - id replacement, - volatile id *objectLocation) { - return OSAtomicCompareAndSwapPtrBarrier(predicate, - replacement, - objectLocation); -} -#endif - -#endif // OBJC2_UNAVAILABLE diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.m deleted file mode 100644 index 98356549..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2Runtime.m +++ /dev/null @@ -1,156 +0,0 @@ -// -// GTMObjC2Runtime.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMObjC2Runtime.h" - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -#import -#import - -Class object_getClass(id obj) { - if (!obj) return NULL; - return obj->isa; -} - -const char *class_getName(Class cls) { - if (!cls) return "nil"; - return cls->name; -} - -BOOL class_conformsToProtocol(Class cls, Protocol *protocol) { - // We intentionally don't check cls as it crashes on Leopard so we want - // to crash on Tiger as well. - // I logged - // Radar 5572978 class_conformsToProtocol crashes when arg1 is passed as nil - // because it seems odd that this API won't accept nil for cls considering - // all the other apis will accept nil args. - // If this does get fixed, remember to enable the unit tests. - if (!protocol) return NO; - - struct objc_protocol_list *protos; - for (protos = cls->protocols; protos != NULL; protos = protos->next) { - for (long i = 0; i < protos->count; i++) { - if ([protos->list[i] conformsTo:protocol]) { - return YES; - } - } - } - return NO; -} - -Class class_getSuperclass(Class cls) { - if (!cls) return NULL; - return cls->super_class; -} - -Method *class_copyMethodList(Class cls, unsigned int *outCount) { - if (!cls) return NULL; - - unsigned int count = 0; - void *iterator = NULL; - struct objc_method_list *mlist; - Method *methods = NULL; - if (outCount) *outCount = 0; - - while ( (mlist = class_nextMethodList(cls, &iterator)) ) { - if (mlist->method_count == 0) continue; - methods = (Method *)realloc(methods, - sizeof(Method) * (count + mlist->method_count + 1)); - if (!methods) { - //Memory alloc failed, so what can we do? - return NULL; // COV_NF_LINE - } - for (int i = 0; i < mlist->method_count; i++) { - methods[i + count] = &mlist->method_list[i]; - } - count += mlist->method_count; - } - - // List must be NULL terminated - if (methods) { - methods[count] = NULL; - } - if (outCount) *outCount = count; - return methods; -} - -SEL method_getName(Method method) { - if (!method) return NULL; - return method->method_name; -} - -IMP method_getImplementation(Method method) { - if (!method) return NULL; - return method->method_imp; -} - -IMP method_setImplementation(Method method, IMP imp) { - // We intentionally don't test method for nil. - // Leopard fails here, so should we. - // I logged this as Radar: - // 5572981 method_setImplementation crashes if you pass nil for the - // method arg (arg 1) - // because it seems odd that this API won't accept nil for method considering - // all the other apis will accept nil args. - // If this does get fixed, remember to enable the unit tests. - // This method works differently on SnowLeopard than - // on Leopard. If you pass in a nil for IMP on SnowLeopard - // it doesn't change anything. On Leopard it will. Since - // attempting to change a sel to nil is probably an error - // we follow the SnowLeopard way of doing things. - IMP oldImp = NULL; - if (imp) { - oldImp = method->method_imp; - method->method_imp = imp; - } - return oldImp; -} - -void method_exchangeImplementations(Method m1, Method m2) { - if (m1 == m2) return; - if (!m1 || !m2) return; - IMP imp2 = method_getImplementation(m2); - IMP imp1 = method_setImplementation(m1, imp2); - method_setImplementation(m2, imp1); -} - -struct objc_method_description protocol_getMethodDescription(Protocol *p, - SEL aSel, - BOOL isRequiredMethod, - BOOL isInstanceMethod) { - struct objc_method_description *descPtr = NULL; - // No such thing as required in ObjC1. - if (isInstanceMethod) { - descPtr = [p descriptionForInstanceMethod:aSel]; - } else { - descPtr = [p descriptionForClassMethod:aSel]; - } - - struct objc_method_description desc; - if (descPtr) { - desc = *descPtr; - } else { - bzero(&desc, sizeof(desc)); - } - return desc; -} - - -#endif - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2RuntimeTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2RuntimeTest.m deleted file mode 100644 index 7344a0f8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjC2RuntimeTest.m +++ /dev/null @@ -1,424 +0,0 @@ -// -// GTMObjC2RuntimeTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMObjC2Runtime.h" -#import "GTMSenTestCase.h" -#import "GTMSystemVersion.h" - - - -#import - -@protocol GTMObjC2Runtime_TestProtocol -@end - -@protocol GTMObjC2Runtime_Test2Protocol -AT_OPTIONAL -- (NSString*)optional; -AT_REQUIRED -- (NSString*)required; -AT_OPTIONAL -+ (NSString*)class_optional; -AT_REQUIRED -+ (NSString*)class_required; -@end - -@interface GTMObjC2RuntimeTest : GTMTestCase { - Class cls_; -} -@end - -@interface GTMObjC2Runtime_TestClass : NSObject -- (NSString*)kwyjibo; - -@end - -@interface GTMObjC2Runtime_TestClass (GMObjC2Runtime_TestClassCategory) -- (NSString*)eatMyShorts; -@end - -@implementation GTMObjC2Runtime_TestClass - -+ (NSString*)dontHaveACow { - return @"dontHaveACow"; -} - -- (NSString*)kwyjibo { - return @"kwyjibo"; -} -@end - -@implementation GTMObjC2Runtime_TestClass (GMObjC2Runtime_TestClassCategory) -- (NSString*)eatMyShorts { - return @"eatMyShorts"; -} - -+ (NSString*)brokeHisBrain { - return @"brokeHisBrain"; -} - -@end - -@interface GTMObjC2NotificationWatcher : NSObject -@end - -@implementation GTMObjC2NotificationWatcher -- (id)init { - if ((self = [super init])) { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - // We release ourselves when we are notified. - [self retain]; - [nc addObserver:self - selector:@selector(startedTest:) - name:SenTestSuiteDidStartNotification - object:nil]; - - } - return self; -} - -- (void)startedTest:(NSNotification *)notification { - // Logs if we are testing on Tiger or Leopard runtime. - NSString *testName = [(SenTest*)[[notification object] test] name]; - NSString *className = NSStringFromClass([GTMObjC2RuntimeTest class]); - if ([testName isEqualToString:className]) { - NSString *runtimeString; -#ifndef OBJC2_UNAVAILABLE - runtimeString = @"ObjC1"; -#else - runtimeString = @"ObjC2"; -#endif - NSLog(@"Running GTMObjC2RuntimeTests using %@ runtime.", runtimeString); - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self]; - [self autorelease]; - } -} -@end - -@implementation GTMObjC2RuntimeTest - -+ (void)initialize { - // This allows us to track which runtime we are actually testing. - [[[GTMObjC2NotificationWatcher alloc] init] autorelease]; -} - -- (void)setUp { - cls_ = [[GTMObjC2Runtime_TestClass class] retain]; -} - -- (void)tearDown { - [cls_ release]; -} - -- (void)test_object_getClass { - // Nil Checks - STAssertNil(object_getClass(nil), nil); - - // Standard use check - GTMObjC2Runtime_TestClass *test = [[[cls_ alloc] init] autorelease]; - Class cls = object_getClass(test); - STAssertEqualObjects(cls, cls_, nil); -} - -- (void)test_class_getName { - // Nil Checks - const char *name = class_getName(nil); - STAssertEqualCStrings(name, "nil", nil); - - // Standard use check - STAssertEqualCStrings(class_getName(cls_), "GTMObjC2Runtime_TestClass", nil); -} - -- (void)test_class_conformsToProtocol { - // Nil Checks - STAssertFalse(class_conformsToProtocol(cls_, @protocol(NSObject)), nil); - STAssertFalse(class_conformsToProtocol(cls_, nil), nil); - // The following two tests intentionally commented out as they fail on - // Leopard with a crash, so we fail on Tiger intentionally as well. - // STAssertFalse(class_conformsToProtocol(nil, @protocol(NSObject)), nil); - // STAssertFalse(class_conformsToProtocol(nil, nil), nil); - - // Standard use check - STAssertTrue(class_conformsToProtocol(cls_, - @protocol(GTMObjC2Runtime_TestProtocol)), - nil); -} - -- (void)test_class_getSuperclass { - // Nil Checks - STAssertNil(class_getSuperclass(nil), nil); - - // Standard use check - STAssertEqualObjects(class_getSuperclass(cls_), [NSObject class], nil); -} - -- (void)test_class_copyMethodList { - // Nil Checks - Method *list = class_copyMethodList(nil, nil); - STAssertNULL(list, nil); - - // Standard use check - list = class_copyMethodList(cls_, nil); - STAssertNotNULL(list, nil); - free(list); - unsigned int count = 0; - list = class_copyMethodList(cls_, &count); - STAssertNotNULL(list, nil); - STAssertEquals(count, 2U, nil); - STAssertNULL(list[count], nil); - free(list); - - // Now test meta class - count = 0; - list = class_copyMethodList((Class)objc_getMetaClass(class_getName(cls_)), - &count); - STAssertNotNULL(list, nil); - STAssertEquals(count, 2U, nil); - STAssertNULL(list[count], nil); - free(list); -} - -- (void)test_method_getName { - // Nil Checks - STAssertNULL(method_getName(nil), nil); - - // Standard use check - Method *list = class_copyMethodList(cls_, nil); - STAssertNotNULL(list, nil); - const char* selName1 = sel_getName(method_getName(list[0])); - const char* selName2 = sel_getName(@selector(kwyjibo)); - const char* selName3 = sel_getName(@selector(eatMyShorts)); - BOOL isGood = ((strcmp(selName1, selName2)) == 0 || (strcmp(selName1, selName3) == 0)); - STAssertTrue(isGood, nil); - free(list); -} - -- (void)test_method_exchangeImplementations { - // nil checks - method_exchangeImplementations(nil, nil); - - // Standard use check - GTMObjC2Runtime_TestClass *test = [[GTMObjC2Runtime_TestClass alloc] init]; - STAssertNotNil(test, nil); - - // Get initial values - NSString *val1 = [test kwyjibo]; - STAssertNotNil(val1, nil); - NSString *val2 = [test eatMyShorts]; - STAssertNotNil(val2, nil); - NSString *val3 = [GTMObjC2Runtime_TestClass dontHaveACow]; - STAssertNotNil(val3, nil); - NSString *val4 = [GTMObjC2Runtime_TestClass brokeHisBrain]; - STAssertNotNil(val4, nil); - - // exchange the imps - Method *list = class_copyMethodList(cls_, nil); - STAssertNotNULL(list, nil); - method_exchangeImplementations(list[0], list[1]); - - // test against initial values - NSString *val5 = [test kwyjibo]; - STAssertNotNil(val5, nil); - NSString *val6 = [test eatMyShorts]; - STAssertNotNil(val6, nil); - STAssertEqualStrings(val1, val6, nil); - STAssertEqualStrings(val2, val5, nil); - - // Check that other methods not affected - STAssertEqualStrings([GTMObjC2Runtime_TestClass dontHaveACow], val3, nil); - STAssertEqualStrings([GTMObjC2Runtime_TestClass brokeHisBrain], val4, nil); - - // exchange the imps back - method_exchangeImplementations(list[0], list[1]); - - // and test against initial values again - NSString *val7 = [test kwyjibo]; - STAssertNotNil(val7, nil); - NSString *val8 = [test eatMyShorts]; - STAssertNotNil(val8, nil); - STAssertEqualStrings(val1, val7, nil); - STAssertEqualStrings(val2, val8, nil); - - method_exchangeImplementations(list[0], nil); - method_exchangeImplementations(nil, list[0]); - - val7 = [test kwyjibo]; - STAssertNotNil(val7, nil); - val8 = [test eatMyShorts]; - STAssertNotNil(val8, nil); - STAssertEqualStrings(val1, val7, nil); - STAssertEqualStrings(val2, val8, nil); - - free(list); - [test release]; -} - -- (void)test_method_getImplementation { - // Nil Checks - STAssertNULL(method_getImplementation(nil), nil); - - // Standard use check - Method *list = class_copyMethodList(cls_, nil); - STAssertNotNULL(list, nil); - STAssertNotNULL(method_getImplementation(list[0]), nil); - free(list); -} - -- (void)test_method_setImplementation { - // Standard use check - GTMObjC2Runtime_TestClass *test = [[GTMObjC2Runtime_TestClass alloc] init]; - Method *list = class_copyMethodList(cls_, nil); - - // Get initial value - NSString *str1 = objc_msgSend(test, method_getName(list[0])); - STAssertNotNil(str1, nil); - - // set the imp to something else - IMP oldImp = method_setImplementation(list[0], method_getImplementation(list[1])); - STAssertNotNULL(oldImp, nil); - - // make sure they are different - NSString *str2 = objc_msgSend(test,method_getName(list[0])); - STAssertNotNil(str2, nil); - STAssertNotEqualStrings(str1, str2, nil); - - // reset the imp - IMP newImp = method_setImplementation(list[0], oldImp); - STAssertNotEquals(oldImp, newImp, nil); - - // test nils - // Apparently it was a bug that we could call setImplementation with a nil - // so we now test to make sure that setting to nil works as expected on - // all systems. -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - // Built for less then leopard gives us the behaviors we defined... - // (doesn't take nil) - IMP nullImp = method_setImplementation(list[0], nil); - STAssertNULL(nullImp, nil); - IMP testImp = method_setImplementation(list[0], newImp); - STAssertEquals(testImp, oldImp, nil); -#else - // Built for leopard or later means we get the os runtime behavior... - if ([GTMSystemVersion isLeopard]) { - // (takes nil) - oldImp = method_setImplementation(list[0], nil); - STAssertNotNULL(oldImp, nil); - newImp = method_setImplementation(list[0], oldImp); - STAssertNULL(newImp, nil); - } else { - // (doesn't take nil) - IMP nullImp = method_setImplementation(list[0], nil); - STAssertNULL(nullImp, nil); - IMP testImp = method_setImplementation(list[0], newImp); - STAssertEquals(testImp, oldImp, nil); - } -#endif - - // This case intentionally not tested. Passing nil to method_setImplementation - // on Leopard crashes. It does on Tiger as well. Half works on SnowLeopard. - // We made our Tiger implementation the same as the SnowLeopard - // implementation. - // Logged as radar 5572981. - if (![GTMSystemVersion isLeopard]) { - STAssertNULL(method_setImplementation(nil, nil), nil); - } - if ([GTMSystemVersion isBuildGreaterThan:kGTMSystemBuild10_6_0_WWDC]) { - STAssertNULL(method_setImplementation(nil, newImp), nil); - } - - [test release]; - free(list); -} - -- (void)test_protocol_getMethodDescription { - // Check nil cases - struct objc_method_description desc = protocol_getMethodDescription(nil, nil, - YES, YES); - STAssertNULL(desc.name, nil); - desc = protocol_getMethodDescription(nil, @selector(optional), YES, YES); - STAssertNULL(desc.name, nil); - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - nil, YES, YES); - STAssertNULL(desc.name, nil); - - // Instance Methods - // Check Required case. Only OBJC2 supports required. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(optional), YES, YES); -#if OBJC_API_VERSION >= 2 - STAssertNULL(desc.name, nil); -#else - STAssertNotNULL(desc.name, nil); -#endif - - // Check Required case. Only OBJC2 supports required. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(required), YES, YES); - - STAssertNotNULL(desc.name, nil); - - // Check Optional case. Only OBJC2 supports optional. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(optional), NO, YES); - - STAssertNotNULL(desc.name, nil); - - // Check Optional case. Only OBJC2 supports optional. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(required), NO, YES); -#if OBJC_API_VERSION >= 2 - STAssertNULL(desc.name, nil); -#else - STAssertNotNULL(desc.name, nil); -#endif - - // Class Methods - // Check Required case. Only OBJC2 supports required. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(class_optional), YES, NO); -#if OBJC_API_VERSION >= 2 - STAssertNULL(desc.name, nil); -#else - STAssertNotNULL(desc.name, nil); -#endif - - // Check Required case. Only OBJC2 supports required. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(class_required), YES, NO); - - STAssertNotNULL(desc.name, nil); - - // Check Optional case. Only OBJC2 supports optional. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(class_optional), NO, NO); - - STAssertNotNULL(desc.name, nil); - - // Check Optional case. Only OBJC2 supports optional. - desc = protocol_getMethodDescription(@protocol(GTMObjC2Runtime_Test2Protocol), - @selector(class_required), NO, NO); -#if OBJC_API_VERSION >= 2 - STAssertNULL(desc.name, nil); -#else - STAssertNotNULL(desc.name, nil); -#endif - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjectSingleton.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjectSingleton.h deleted file mode 100644 index 4763b687..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMObjectSingleton.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// GTMObjectSingleton.h -// Macro to implement methods for a singleton -// -// Copyright 2005-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" - -/// This macro implements the various methods needed to make a safe singleton. -// -/// This Singleton pattern was taken from: -/// http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_10.html -/// -/// Sample usage: -/// -/// GTMOBJECT_SINGLETON_BOILERPLATE(SomeUsefulManager, sharedSomeUsefulManager) -/// (with no trailing semicolon) -/// -#define GTMOBJECT_SINGLETON_BOILERPLATE(_object_name_, _shared_obj_name_) \ -static _object_name_ *z##_shared_obj_name_ = nil; \ -+ (_object_name_ *)_shared_obj_name_ { \ - @synchronized(self) { \ - if (z##_shared_obj_name_ == nil) { \ - /* Note that 'self' may not be the same as _object_name_ */ \ - /* first assignment done in allocWithZone but we must reassign in case init fails */ \ - z##_shared_obj_name_ = [[self alloc] init]; \ - _GTMDevAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \ - } \ - } \ - return z##_shared_obj_name_; \ -} \ -+ (id)allocWithZone:(NSZone *)zone { \ - @synchronized(self) { \ - if (z##_shared_obj_name_ == nil) { \ - z##_shared_obj_name_ = [super allocWithZone:zone]; \ - return z##_shared_obj_name_; \ - } \ - } \ - \ - /* We can't return the shared instance, because it's been init'd */ \ - _GTMDevAssert(NO, @"use the singleton API, not alloc+init"); \ - return nil; \ -} \ -- (id)retain { \ - return self; \ -} \ -- (NSUInteger)retainCount { \ - return NSUIntegerMax; \ -} \ -- (void)release { \ -} \ -- (id)autorelease { \ - return self; \ -} \ -- (id)copyWithZone:(NSZone *)zone { \ - return self; \ -} \ - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.h deleted file mode 100644 index 6ac2347d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.h +++ /dev/null @@ -1,132 +0,0 @@ -// -// GTMPath.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - - -// GTMPath -// -// This class represents a single, absolute file system path. The represented -// path must exist at the time of creation. This class also allows you to easily -// create new paths (or full hierarchies) based on existing GTMPath instances. -// -// Given a GTMPath instance, new files and directories can be created inside -// that path providing the instance refers to a directory. It is an error to try -// to create a file/directory from a GTMPath that represents a file (this should -// be common sense: clearly mkdir /etc/passwd/foo won't work). -// -// === Examples === -// -// 1. This sample creates a GTMPath that references /tmp, then gets the -// attributes for that directory. -// -// GTMPath *tmp = [GTMPath pathWithFullPath:@"/tmp"]; -// NSDictionary *attr = [tmp attributes]; -// -// -// 2. This sample creates a new directory inside /tmp named "foo". -// -// GTMPath *tmp = [GTMPath pathWithFullPath:@"/tmp"]; -// GTMPath *foo = [tmp createDirectoryName:@"foo" mode:0755]; -// -// -// 3. This sample creates a GTMPath instance that represents a user's ~/Library -// folder. -// -// GTMPath *library = [GTMPath pathWithFullPath:@"/Users/bob/Library"]; -// ... -// -// -// 4. This sample creates a directory hierarchy, where each level has its own -// mode. Notice that the return value from these -create* methods is the -// GTMPath that was just created. This allows these creation calls to be -// chained together enabling easy creation of directory hierarchies. -// This is one of the big benefits of this class. -// -// GTMPath *tmp = [GTMPath pathWithFullPath:@"/tmp"]; -// GTMPath *baz = [[[tmp createDirectoryName:@"foo" mode:0755] -// createDirectoryName:@"bar" mode:0756] -// createDirectoryName:@"baz" mode:0757]; -// -@interface GTMPath : NSObject { - @private - NSString *fullPath_; -} - -// Returns a GTMPath instance that represents the full path specified by -// |fullPath|. Note that |fullPath| MUST be an absolute path. -+ (id)pathWithFullPath:(NSString *)fullPath; - -// Returns a GTMPath instance that represents the full path specified by -// |fullPath|. Note that |fullPath| MUST be an absolute path. This method is the -// designated initializer. -- (id)initWithFullPath:(NSString *)fullPath; - -// Returns the name of this GTMPath instance. This is not the full path. It is -// just the component name of this GTMPath instance. This is equivalent to -// the Unix basename(3) function. -- (NSString *)name; - -// Returns this path's parent GTMPath. This method will ONLY (and always) return -// nil when |name| is "/". In otherwords, parent will be nil IFF this GTMPath -// instance represents the root path, because "/" doesn't really have a parent. -- (GTMPath *)parent; - -// Returns YES if this GTMPath represents a directory. -- (BOOL)isDirectory; - -// Returns YES if this GTMPath instance represents the root path "/". -- (BOOL)isRoot; - -// Returns the file system attributes of the path represented by this GTMPath -// instance. See -[NSFileManager fileAttributesAtPath:...] for details. -- (NSDictionary *)attributes; - -// Returns a string representation of the absolute path represented by this -// GTMPath instance. -- (NSString *)fullPath; - -@end - - -// Methods for creating files and directories inside a GTMPath instance. These -// methods are only allowed to be called on GTMPath instances that represent -// directories. See the NSFileManager documentation for details about the -// |attributes| parameters. -@interface GTMPath (GTMPathGeneration) - -// Creates a new directory with the specified mode or attributes inside the -// current GTMPath instance. If the creation is successful, a GTMPath for the -// newly created directory is returned. Otherwise, nil is returned. -- (GTMPath *)createDirectoryName:(NSString *)name mode:(mode_t)mode; -- (GTMPath *)createDirectoryName:(NSString *)name - attributes:(NSDictionary *)attributes; - -// Creates a new file with the specified mode or attributes inside the -// current GTMPath instance. If the creation is successful, a GTMPath for the -// newly created file is returned. Otherwise, nil is returned. |data| is the -// data to put in the file when created. -- (GTMPath *)createFileName:(NSString *)name mode:(mode_t)mode; -- (GTMPath *)createFileName:(NSString *)name - attributes:(NSDictionary *)attributes; -- (GTMPath *)createFileName:(NSString *)name - attributes:(NSDictionary *)attributes - data:(NSData *)data; - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.m deleted file mode 100644 index 28ffad07..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPath.m +++ /dev/null @@ -1,156 +0,0 @@ -// -// GTMPath.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMPath.h" - - -@implementation GTMPath - -+ (id)pathWithFullPath:(NSString *)fullPath { - return [[[self alloc] initWithFullPath:fullPath] autorelease]; -} - -- (id)init { - return [self initWithFullPath:nil]; -} - -- (id)initWithFullPath:(NSString *)fullPath { - if ((self = [super init])) { - fullPath_ = [fullPath copy]; - if (![fullPath_ isAbsolutePath] || [self attributes] == nil) { - [self release]; - return nil; - } - } - - return self; -} - -- (void)dealloc { - [fullPath_ release]; - [super dealloc]; -} - -- (NSString *)description { - return [self fullPath]; -} - -- (NSString *)name { - return [fullPath_ lastPathComponent]; -} - -- (GTMPath *)parent { - if ([self isRoot]) return nil; - NSString *parentPath = [fullPath_ stringByDeletingLastPathComponent]; - return [[self class] pathWithFullPath:parentPath]; -} - -- (BOOL)isDirectory { - BOOL isDir = NO; - BOOL exists = [[NSFileManager defaultManager] - fileExistsAtPath:fullPath_ isDirectory:&isDir]; - return exists && isDir; -} - -- (BOOL)isRoot { - return [fullPath_ isEqualToString:@"/"]; -} - -- (NSDictionary *)attributes { - return [[NSFileManager defaultManager] - fileAttributesAtPath:fullPath_ - traverseLink:YES]; -} - -- (NSString *)fullPath { - return [[fullPath_ copy] autorelease]; -} - -@end - - -@implementation GTMPath (GTMPathGeneration) - -- (GTMPath *)createDirectoryName:(NSString *)name mode:(mode_t)mode { - NSDictionary *attributes = - [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:mode] - forKey:NSFilePosixPermissions]; - return [self createDirectoryName:name attributes:attributes]; -} - -- (GTMPath *)createDirectoryName:(NSString *)name - attributes:(NSDictionary *)attributes { - if ([name length] == 0) return nil; - - // We first check to see if the requested directory alread exists by trying - // to create a GTMPath from the desired new path string. Only if the path - // doesn't already exist do we attempt to create it. If the path already - // exists, we will end up returning a GTMPath for the pre-existing path. - NSString *newPath = [fullPath_ stringByAppendingPathComponent:name]; - GTMPath *nascentPath = [GTMPath pathWithFullPath:newPath]; - if (nascentPath != nil && ![nascentPath isDirectory]) { - return nil; // Return nil because the path exists, but it's not a dir - } - - if (nascentPath == nil) { - BOOL created = [[NSFileManager defaultManager] - createDirectoryAtPath:newPath - attributes:attributes]; - nascentPath = created ? [GTMPath pathWithFullPath:newPath] : nil; - } - - return nascentPath; -} - -- (GTMPath *)createFileName:(NSString *)name mode:(mode_t)mode { - NSDictionary *attributes = - [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:mode] - forKey:NSFilePosixPermissions]; - return [self createFileName:name attributes:attributes]; -} - -- (GTMPath *)createFileName:(NSString *)name - attributes:(NSDictionary *)attributes { - return [self createFileName:name attributes:attributes data:[NSData data]]; -} - -- (GTMPath *)createFileName:(NSString *)name - attributes:(NSDictionary *)attributes - data:(NSData *)data { - if ([name length] == 0) return nil; - - // See createDirectoryName:attribute: for some high-level notes about what and - // why this method does what it does. - NSString *newPath = [fullPath_ stringByAppendingPathComponent:name]; - GTMPath *nascentPath = [GTMPath pathWithFullPath:newPath]; - if (nascentPath != nil && [nascentPath isDirectory]) { - return nil; // Return nil because the path exists, but it's a dir - } - - if (nascentPath == nil) { - BOOL created = [[NSFileManager defaultManager] - createFileAtPath:newPath - contents:data - attributes:attributes]; - nascentPath = created ? [GTMPath pathWithFullPath:newPath] : nil; - } - - return nascentPath; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPathTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPathTest.m deleted file mode 100644 index 211206cb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMPathTest.m +++ /dev/null @@ -1,236 +0,0 @@ -// -// GTMPathTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMPath.h" -#import "GTMUnitTestDevLog.h" - - -@interface GTMPathTest : GTMTestCase { - @private - NSString *testDirectory_; -} -@end - -@implementation GTMPathTest - -- (void)setUp { - NSString *tmp = NSTemporaryDirectory(); - STAssertNotNil(tmp, nil); - - testDirectory_ = [[tmp stringByAppendingPathComponent:@"GTMPathTest"] retain]; - STAssertNotNil(testDirectory_, nil); - - BOOL created = [[NSFileManager defaultManager] - createDirectoryAtPath:testDirectory_ - attributes:nil]; - STAssertTrue(created, nil); -} - -- (void)tearDown { - // Make sure it's safe to remove this directory before nuking it. - STAssertNotNil(testDirectory_, nil); - STAssertNotEqualObjects(testDirectory_, @"/", nil); -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - [[NSFileManager defaultManager] removeFileAtPath:testDirectory_ handler:nil]; -#else - [[NSFileManager defaultManager] removeItemAtPath:testDirectory_ error:NULL]; -#endif - [testDirectory_ release]; -} - -- (void)testBasicCreation { - GTMPath *path = nil; - - path = [[[GTMPath alloc] init] autorelease]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"/"]; - STAssertNotNil(path, nil); - STAssertNil([path parent], nil); - STAssertTrue([path isRoot], nil); - STAssertTrue([path isDirectory], nil); - STAssertEqualObjects([path name], @"/", nil); - STAssertEqualObjects([path fullPath], @"/", nil); -} - -- (void)testRecursiveInitialization { - GTMPath *path = nil; - - path = [GTMPath pathWithFullPath:nil]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@""]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"etc"]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"/"]; - STAssertNotNil(path, nil); - STAssertNil([path parent], nil); - STAssertTrue([path isRoot], nil); - STAssertTrue([path isDirectory], nil); - STAssertEqualObjects([path name], @"/", nil); - STAssertEqualObjects([path fullPath], @"/", nil); - - path = [GTMPath pathWithFullPath:@"/etc"]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"etc", nil); - STAssertEqualObjects([path fullPath], @"/etc", nil); - STAssertTrue([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - STAssertNotNil([path parent], nil); - STAssertTrue([[path parent] isRoot], nil); - - path = [GTMPath pathWithFullPath:@"/etc/passwd"]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"passwd", nil); - STAssertEqualObjects([path fullPath], @"/etc/passwd", nil); - STAssertFalse([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - STAssertNotNil([path parent], nil); - STAssertFalse([[path parent] isRoot], nil); - STAssertTrue([[path parent] isDirectory], nil); - STAssertTrue([[[path parent] parent] isRoot], nil); - - STAssertTrue([[path description] length] > 1, nil); -} - -- (void)testCreationWithNonExistentPath { - GTMPath *path = nil; - - path = [GTMPath pathWithFullPath:@" "]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"/abcxyz"]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"/etc/foo"]; - STAssertNil(path, nil); - - path = [GTMPath pathWithFullPath:@"/foo/bar/baz"]; - STAssertNil(path, nil); -} - -- (void)testDirectoryCreation { - GTMPath *tmp = [GTMPath pathWithFullPath:testDirectory_]; - GTMPath *path = nil; - - NSString *fooPath = [[tmp fullPath] stringByAppendingPathComponent:@"foo"]; - path = [GTMPath pathWithFullPath:fooPath]; - STAssertNil(path, nil); - - path = [tmp createDirectoryName:@"foo" mode:0555]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"foo", nil); - // filePosixPermissions has odd return types in different SDKs, so we use - // STAssertTrue to avoid the macros type checks from choking us. - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertTrue([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - - // Trying to create a file where a dir already exists should fail - path = [tmp createFileName:@"foo" mode:0555]; - STAssertNil(path, nil); - - // Calling create again should succeed - path = [tmp createDirectoryName:@"foo" mode:0555]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertTrue([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - - GTMPath *foo = [GTMPath pathWithFullPath:fooPath]; - STAssertNotNil(foo, nil); - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertTrue([path isDirectory], nil); - STAssertFalse([path isRoot], nil); -} - -- (void)testFileCreation { - GTMPath *tmp = [GTMPath pathWithFullPath:testDirectory_]; - GTMPath *path = nil; - - NSString *fooPath = [[tmp fullPath] stringByAppendingPathComponent:@"foo"]; - path = [GTMPath pathWithFullPath:fooPath]; - STAssertNil(path, nil); - - path = [tmp createFileName:@"foo" mode:0555]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertFalse([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - - // Trying to create a dir where a file already exists should fail. - path = [tmp createDirectoryName:@"foo" mode:0555]; - STAssertNil(path, nil); - - // Calling create again should succeed - path = [tmp createFileName:@"foo" mode:0555]; - STAssertNotNil(path, nil); - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertFalse([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - - GTMPath *foo = [GTMPath pathWithFullPath:fooPath]; - STAssertNotNil(foo, nil); - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0555, nil); - STAssertFalse([path isDirectory], nil); - STAssertFalse([path isRoot], nil); - - // Make sure we can't create a file/directory rooted off of |foo|, since it's - // not a directory. - path = [foo createFileName:@"bar" mode:0555]; - STAssertNil(path, nil); - path = [foo createDirectoryName:@"bar" mode:0555]; - STAssertNil(path, nil); -} - -- (void)testHierarchyCreation { - GTMPath *tmp = [GTMPath pathWithFullPath:testDirectory_]; - NSString *fooPath = [[tmp fullPath] stringByAppendingPathComponent:@"foo"]; - GTMPath *path = [GTMPath pathWithFullPath:fooPath]; - STAssertNil(path, nil); - - path = [[[tmp createDirectoryName:@"foo" mode:0755] - createDirectoryName:@"bar" mode:0756] - createDirectoryName:@"baz" mode:0757]; - STAssertNotNil(path, nil); - - // Check "baz" - STAssertEqualObjects([path name], @"baz", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0757, nil); - - // Check "bar" - path = [path parent]; - STAssertEqualObjects([path name], @"bar", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0756, nil); - - // Check "foo" - path = [path parent]; - STAssertEqualObjects([path name], @"foo", nil); - STAssertTrue([[path attributes] filePosixPermissions] == 0755, nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMProgressMonitorInputStream.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMProgressMonitorInputStream.h deleted file mode 100644 index 5f779bc5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMProgressMonitorInputStream.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GTMProgressMonitorInputStream.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// This class is no more. If you want something like it's functionality, look -// at using the version in the Objective-C GData Client -// (http://code.google.com/p/gdata-objectivec-client/). It provides the same -// functionality and will continue to be maintained. diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.h deleted file mode 100644 index 3ef5604c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.h +++ /dev/null @@ -1,379 +0,0 @@ -// -// GTMRegex.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import "GTMDefines.h" - -/// Options for controlling the behavior of the matches -enum { - - kGTMRegexOptionIgnoreCase = 0x01, - // Ignore case in matching, ie: 'a' matches 'a' or 'A' - - kGTMRegexOptionSupressNewlineSupport = 0x02, - // By default (without this option), regular expressions are implicitly - // processed on a line by line basis, where "lines" are delimited by newline - // characters. In this mode '.' (dot) does NOT match newline characters, and - // '^' and '$' match at the beginning and end of the string as well as - // around newline characters. This behavior matches the default behavior for - // regular expressions in other languages including Perl and Python. For - // example, - // foo.*bar - // would match - // fooAAAbar - // but would NOT match - // fooAAA\nbar - // With the kGTMRegexOptionSupressNewlineSupport option, newlines are treated - // just like any other character which means that '.' will match them. In - // this mode, ^ and $ only match the beginning and end of the input string - // and do NOT match around the newline characters. For example, - // foo.*bar - // would match - // fooAAAbar - // and would also match - // fooAAA\nbar - -}; -typedef NSUInteger GTMRegexOptions; - -/// Global contants needed for errors from consuming patterns - -#undef _EXTERN -#undef _INITIALIZE_AS -#ifdef GTMREGEX_DEFINE_GLOBALS -#define _EXTERN -#define _INITIALIZE_AS(x) =x -#else -#define _EXTERN GTM_EXTERN -#define _INITIALIZE_AS(x) -#endif - -_EXTERN NSString* kGTMRegexErrorDomain _INITIALIZE_AS(@"com.google.mactoolbox.RegexDomain"); - -enum { - kGTMRegexPatternParseFailedError = -100 -}; - -// Keys for the userInfo from a kGTMRegexErrorDomain/kGTMRegexPatternParseFailedError error -_EXTERN NSString* kGTMRegexPatternErrorPattern _INITIALIZE_AS(@"pattern"); -_EXTERN NSString* kGTMRegexPatternErrorErrorString _INITIALIZE_AS(@"patternError"); - -/// Class for doing Extended Regex operations w/ libregex (see re_format(7)). -// -// NOTE: the docs for recomp/regexec make *no* claims about i18n. All work -// within this class is done w/ UTF-8 so Unicode should move through it safely, -// however, the character classes described in re_format(7) might not really -// be unicode "savvy", so use them and this class w/ that in mind. -// -// Example usage: -// -// NSArray *inputArrayOfStrings = ... -// NSArray *matches = [NSMutableArray array]; -// -// GTMRegex *regex = [GTMRegex regexWithPattern:@"foo.*bar"]; -// for (NSString *curStr in inputArrayOfStrings) { -// if ([regex matchesString:curStr]) -// [matches addObject:curStr]; -// } -// .... -// -// ------------- -// -// If you need to include something dynamic in a pattern: -// -// NSString *pattern = -// [NSString stringWithFormat:@"^foo:%@bar", -// [GTMRegex escapedPatternForString:inputStr]]; -// GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; -// .... -// -// ------------- -// -// GTMRegex *regex = [GTMRegex regexWithPattern:@"(foo+)(bar)"]; -// NSString *highlighted = -// [regex stringByReplacingMatchesInString:inputString -// withReplacement:@"\\1\\2"]; -// .... -// -@interface GTMRegex : NSObject { - @private - NSString *pattern_; - GTMRegexOptions options_; - regex_t regexData_; -} - -/// Create a new, autoreleased object w/ the given regex pattern with the default options -+ (id)regexWithPattern:(NSString *)pattern; - -/// Create a new, autoreleased object w/ the given regex pattern and specify the matching options -+ (id)regexWithPattern:(NSString *)pattern options:(GTMRegexOptions)options; - -/// Create a new, autoreleased object w/ the given regex pattern, specify the matching options and receive any error consuming the pattern. -+ (id)regexWithPattern:(NSString *)pattern - options:(GTMRegexOptions)options - withError:(NSError **)outErrorOrNULL; - -/// Returns a new, autoreleased copy of |str| w/ any pattern chars in it escaped so they have no meaning when used w/in a pattern. -+ (NSString *)escapedPatternForString:(NSString *)str; - -/// Initialize a new object w/ the given regex pattern with the default options -- (id)initWithPattern:(NSString *)pattern; - -/// Initialize a new object w/ the given regex pattern and specify the matching options -- (id)initWithPattern:(NSString *)pattern options:(GTMRegexOptions)options; - -/// Initialize a new object w/ the given regex pattern, specify the matching options, and receive any error consuming the pattern. -- (id)initWithPattern:(NSString *)pattern - options:(GTMRegexOptions)options - withError:(NSError **)outErrorOrNULL; - -/// Returns the number of sub patterns in the pattern -// -// Sub Patterns are basically the number of parenthesis blocks w/in the pattern. -// ie: The pattern "foo((bar)|(baz))" has 3 sub patterns. -// -- (NSUInteger)subPatternCount; - -/// Returns YES if the whole string |str| matches the pattern. -- (BOOL)matchesString:(NSString *)str; - -/// Returns a new, autoreleased array of string that contain the subpattern matches for the string. -// -// If the whole string does not match the pattern, nil is returned. -// -// The api follows the conventions of most regex engines, and index 0 (zero) is -// the full match, then the subpatterns are index 1, 2, ... going left to right. -// If the pattern has optional subpatterns, then anything that didn't match -// will have NSNull at that index. -// ie: The pattern "(fo(o+))((bar)|(baz))" has five subpatterns, and when -// applied to the string "foooooobaz" you'd get an array of: -// 0: "foooooobaz" -// 1: "foooooo" -// 2: "ooooo" -// 3: "baz" -// 4: NSNull -// 5: "baz" -// -- (NSArray *)subPatternsOfString:(NSString *)str; - -/// Returns the first match for this pattern in |str|. -- (NSString *)firstSubStringMatchedInString:(NSString *)str; - -/// Returns YES if this pattern some substring of |str|. -- (BOOL)matchesSubStringInString:(NSString *)str; - -/// Returns a new, autoreleased enumerator that will walk segments (GTMRegexStringSegment) of |str| based on the pattern. -// -// This will split the string into "segments" using the given pattern. You get -// both the matches and parts that are inbetween matches. ie-the entire string -// will eventually be returned. -// -// See GTMRegexStringSegment for more infomation and examples. -// -- (NSEnumerator *)segmentEnumeratorForString:(NSString *)str; - -/// Returns a new, autoreleased enumerator that will walk only the matching segments (GTMRegexStringSegment) of |str| based on the pattern. -// -// This extracts the "segments" of the string that used the pattern. So it can -// be used to collect all of the matching substrings from within a string. -// -// See GTMRegexStringSegment for more infomation and examples. -// -- (NSEnumerator *)matchSegmentEnumeratorForString:(NSString *)str; - -/// Returns a new, autoreleased string with all matches of the pattern in |str| replaced with |replacementPattern|. -// -// Replacement uses the SED substitution like syntax w/in |replacementPattern| -// to allow the use of matches in the replacment. The replacement pattern can -// make use of any number of match references by using a backslash followed by -// the match subexpression number (ie-"\2", "\0", ...), see subPatternsOfString: -// for details on the subexpression indexing. -// -// REMINDER: you need to double-slash since the slash has meaning to the -// compiler/preprocessor. ie: "\\0" -// -- (NSString *)stringByReplacingMatchesInString:(NSString *)str - withReplacement:(NSString *)replacementPattern; - -@end - -/// Class returned by the nextObject for the enumerators from GTMRegex -// -// The two enumerators on from GTMRegex return objects of this type. This object -// represents a "piece" of the string the enumerator is walking. It's the apis -// on this object allow you to figure out why each segment was returned and to -// act on it. -// -// The easiest way to under stand this how the enumerators and this class works -// is through and examples :: -// Pattern: "foo+" -// String: "fo bar foobar foofooo baz" -// If you walk this w/ -segmentEnumeratorForString you'll get: -// # nextObjects Calls -isMatch -string -// 1 NO "fo bar " -// 2 YES "foo" -// 3 NO "bar " -// 4 YES "foo" -// 5 YES "fooo" -// 6 NO " baz" -// And if you walk this w/ -matchSegmentEnumeratorForString you'll get: -// # nextObjects Calls -isMatch -string -// 1 YES "foo" -// 2 YES "foo" -// 3 YES "fooo" -// (see the comments on subPatternString for how it works) -// -// Example usage: -// -// NSMutableString processedStr = [NSMutableString string]; -// NSEnumerator *enumerator = -// [inputStr segmentEnumeratorForPattern:@"foo+((ba+r)|(ba+z))"]; -// GTMRegexStringSegment *segment = nil; -// while ((segment = [enumerator nextObject]) != nil) { -// if ([segment isMatch]) { -// if ([segment subPatterString:2] != nil) { -// // matched: "(ba+r)" -// [processStr appendFormat:@"%@", [segment string]]; -// } else { -// // matched: "(ba+z)" -// [processStr appendFormat:@"%@", [segment string]]; -// } -// } else { -// [processStr appendString:[segment string]]; -// } -// } -// // proccessedStr now has all the versions of foobar wrapped in bold tags, -// // and all the versons of foobaz in italics tags. -// // ie: " fooobar foobaaz " ==> " fooobar foobaaz " -// -@interface GTMRegexStringSegment : NSObject { - @private - NSData *utf8StrBuf_; - regmatch_t *regMatches_; // STRONG: ie-we call free - NSUInteger numRegMatches_; - BOOL isMatch_; -} - -/// Returns YES if this segment from from a match of the regex, false if it was a segment between matches. -// -// Use -isMatch to see if the segment from from a match of the pattern or if the -// segment is some text between matches. (NOTE: isMatch is always YES for -// matchSegmentEnumeratorForString) -// -- (BOOL)isMatch; - -/// Returns a new, autoreleased string w/ the full text segment from the original string. -- (NSString *)string; - -/// Returns a new, autoreleased string w/ the |index| sub pattern from this segment of the original string. -// -// This api follows the conventions of most regex engines, and index 0 (zero) is -// the full match, then the subpatterns are index 1, 2, ... going left to right. -// If the pattern has optional subpatterns, then anything that didn't match -// will return nil. -// ie: When using the pattern "(fo(o+))((bar)|(baz))" the following indexes -// fetch these values for a segment where -string is @"foooooobaz": -// 0: "foooooobaz" -// 1: "foooooo" -// 2: "ooooo" -// 3: "baz" -// 4: nil -// 5: "baz" -// -- (NSString *)subPatternString:(NSUInteger)index; - -@end - -/// Some helpers to streamline usage of GTMRegex -// -// Example usage: -// -// if ([inputStr matchesPattern:@"foo.*bar"]) { -// // act on match -// .... -// } -// -// ------------- -// -// NSString *subStr = [inputStr firstSubStringMatchedByPattern:@"^foo:.*$"]; -// if (subStr != nil) { -// // act on subStr -// .... -// } -// -// ------------- -// -// NSArray *headingList = -// [inputStr allSubstringsMatchedByPattern:@"^Heading:.*$"]; -// // act on the list of headings -// .... -// -// ------------- -// -// NSString *highlightedString = -// [inputString stringByReplacingMatchesOfPattern:@"(foo+)(bar)" -// withReplacement:@"\\1\\2"]; -// .... -// -@interface NSString (GTMRegexAdditions) - -/// Returns YES if the full string matches regex |pattern| using the default match options -- (BOOL)gtm_matchesPattern:(NSString *)pattern; - -/// Returns a new, autoreleased array of strings that contain the subpattern matches of |pattern| using the default match options -// -// See [GTMRegex subPatternsOfString:] for information about the returned array. -// -- (NSArray *)gtm_subPatternsOfPattern:(NSString *)pattern; - -/// Returns a new, autoreleased string w/ the first substring that matched the regex |pattern| using the default match options -- (NSString *)gtm_firstSubStringMatchedByPattern:(NSString *)pattern; - -/// Returns YES if a substring string matches regex |pattern| using the default match options -- (BOOL)gtm_subStringMatchesPattern:(NSString *)pattern; - -/// Returns a new, autoreleased array of substrings in the string that match the regex |pattern| using the default match options -// -// Note: if the string has no matches, you get an empty array. -- (NSArray *)gtm_allSubstringsMatchedByPattern:(NSString *)pattern; - -/// Returns a new, autoreleased segment enumerator that will break the string using pattern w/ the default match options -// -// The enumerator returns GTMRegexStringSegment options, see that class for more -// details and examples. -// -- (NSEnumerator *)gtm_segmentEnumeratorForPattern:(NSString *)pattern; - -/// Returns a new, autoreleased segment enumerator that will only return matching segments from the string using pattern w/ the default match options -// -// The enumerator returns GTMRegexStringSegment options, see that class for more -// details and examples. -// -- (NSEnumerator *)gtm_matchSegmentEnumeratorForPattern:(NSString *)pattern; - -/// Returns a new, autoreleased string with all matches for pattern |pattern| are replaced w/ |replacementPattern|. Uses the default match options. -// -// |replacemetPattern| has support for using any subExpression that matched, -// see [GTMRegex stringByReplacingMatchesInString:withReplacement:] above -// for details. -// -- (NSString *)gtm_stringByReplacingMatchesOfPattern:(NSString *)pattern - withReplacement:(NSString *)replacementPattern; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.m deleted file mode 100644 index 10272247..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegex.m +++ /dev/null @@ -1,817 +0,0 @@ -// -// GTMRegex.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#define GTMREGEX_DEFINE_GLOBALS 1 -#import "GTMRegex.h" -#import "GTMDefines.h" - -// This is the pattern to use for walking replacement text when doing -// substitutions. -// -// This pattern may look over-escaped, but remember the compiler will consume -// one layer of slashes, and then we have to escape the slashes for them to be -// seen as we want in the pattern. -static NSString *const kReplacementPattern = - @"((^|[^\\\\])(\\\\\\\\)*)(\\\\([0-9]+))"; -#define kReplacementPatternLeadingTextIndex 1 -#define kReplacementPatternSubpatternNumberIndex 5 - -@interface GTMRegex (PrivateMethods) -- (NSString *)errorMessage:(int)errCode; -- (BOOL)runRegexOnUTF8:(const char*)utf8Str - nmatch:(size_t)nmatch - pmatch:(regmatch_t *)pmatch - flags:(int)flags; -@end - -// private enumerator as impl detail -@interface GTMRegexEnumerator : NSEnumerator { - @private - GTMRegex *regex_; - NSData *utf8StrBuf_; - BOOL allSegments_; - BOOL treatStartOfNewSegmentAsBeginningOfString_; - regoff_t curParseIndex_; - __strong regmatch_t *savedRegMatches_; -} -- (id)initWithRegex:(GTMRegex *)regex - processString:(NSString *)str - allSegments:(BOOL)allSegments; -- (void)treatStartOfNewSegmentAsBeginningOfString:(BOOL)yesNo; -@end - -@interface GTMRegexStringSegment (PrivateMethods) -- (id)initWithUTF8StrBuf:(NSData *)utf8StrBuf - regMatches:(regmatch_t *)regMatches - numRegMatches:(NSUInteger)numRegMatches - isMatch:(BOOL)isMatch; -@end - -@implementation GTMRegex - -+ (id)regexWithPattern:(NSString *)pattern { - return [[[self alloc] initWithPattern:pattern] autorelease]; -} - -+ (id)regexWithPattern:(NSString *)pattern options:(GTMRegexOptions)options { - return [[[self alloc] initWithPattern:pattern - options:options] autorelease]; -} - -+ (id)regexWithPattern:(NSString *)pattern - options:(GTMRegexOptions)options - withError:(NSError **)outErrorOrNULL { - return [[[self alloc] initWithPattern:pattern - options:options - withError:outErrorOrNULL] autorelease]; -} - -+ (NSString *)escapedPatternForString:(NSString *)str { - if (str == nil) - return nil; - - // NOTE: this could be done more efficiently by fetching the whole string into - // a unichar buffer and scanning that, along w/ pushing the data over in - // chunks (when possible). - - NSUInteger len = [str length]; - NSMutableString *result = [NSMutableString stringWithCapacity:len]; - - for (NSUInteger x = 0; x < len; ++x) { - unichar ch = [str characterAtIndex:x]; - switch (ch) { - case '^': - case '.': - case '[': - case '$': - case '(': - case ')': - case '|': - case '*': - case '+': - case '?': - case '{': - case '\\': - [result appendFormat:@"\\%C", ch]; - break; - default: - [result appendFormat:@"%C", ch]; - break; - } - } - - return result; -} - -- (id)init { - return [self initWithPattern:nil]; -} - -- (id)initWithPattern:(NSString *)pattern { - return [self initWithPattern:pattern options:0]; -} - -- (id)initWithPattern:(NSString *)pattern options:(GTMRegexOptions)options { - return [self initWithPattern:pattern options:options withError:nil]; -} - -- (id)initWithPattern:(NSString *)pattern - options:(GTMRegexOptions)options - withError:(NSError **)outErrorOrNULL { - - self = [super init]; - if (!self) return nil; - - if (outErrorOrNULL) *outErrorOrNULL = nil; - - if ([pattern length] == 0) { - [self release]; - return nil; - } - - // figure out the flags - options_ = options; - int flags = REG_EXTENDED; - if (options_ & kGTMRegexOptionIgnoreCase) - flags |= REG_ICASE; - if ((options_ & kGTMRegexOptionSupressNewlineSupport) == 0) - flags |= REG_NEWLINE; - - // even if regcomp failes we need a flags that we did call regcomp so we'll - // call regfree (because the structure can get filled in some to allow better - // error info). we use pattern_ as this flag. - pattern_ = [pattern copy]; - if (!pattern_) { - // COV_NF_START - no real way to force this in a unittest - [self release]; - return nil; - // COV_NF_END - } - - // compile it - int compResult = regcomp(®exData_, [pattern_ UTF8String], flags); - if (compResult != 0) { - NSString *errorStr = [self errorMessage:compResult]; - if (outErrorOrNULL) { - // include the pattern and patternError message in the userInfo. - NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys: - pattern_, kGTMRegexPatternErrorPattern, - errorStr, kGTMRegexPatternErrorErrorString, - nil]; - *outErrorOrNULL = [NSError errorWithDomain:kGTMRegexErrorDomain - code:kGTMRegexPatternParseFailedError - userInfo:userInfo]; - } else { - // if caller didn't get us an NSError to fill in, we log the error to help - // debugging. - _GTMDevLog(@"Invalid pattern \"%@\", error: \"%@\"", - pattern_, errorStr); - } - - [self release]; - return nil; - } - - return self; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - // we used pattern_ as our flag that we initialized the regex_t - if (pattern_) { - regfree(®exData_); - [pattern_ release]; - // play it safe and clear it since we use it as a flag for regexData_ - pattern_ = nil; - } - [super finalize]; -} -#endif - -- (void)dealloc { - // we used pattern_ as our flag that we initialized the regex_t - if (pattern_) { - regfree(®exData_); - [pattern_ release]; - // play it safe and clear it since we use it as a flag for regexData_ - pattern_ = nil; - } - [super dealloc]; -} - -- (NSUInteger)subPatternCount { - return regexData_.re_nsub; -} - -- (BOOL)matchesString:(NSString *)str { - regmatch_t regMatch; - if (![self runRegexOnUTF8:[str UTF8String] - nmatch:1 - pmatch:®Match - flags:0]) { - // no match - return NO; - } - - // make sure the match is the full string - return (regMatch.rm_so == 0) && - (regMatch.rm_eo == (regoff_t)[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); -} - -- (NSArray *)subPatternsOfString:(NSString *)str { - NSArray *result = nil; - - NSUInteger count = regexData_.re_nsub + 1; - regmatch_t *regMatches = malloc(sizeof(regmatch_t) * count); - if (!regMatches) - return nil; // COV_NF_LINE - no real way to force this in a unittest - - // wrap it all in a try so we don't leak the malloc - @try { - const char *utf8Str = [str UTF8String]; - if (![self runRegexOnUTF8:utf8Str - nmatch:count - pmatch:regMatches - flags:0]) { - // no match - return nil; - } - - // make sure the match is the full string - if ((regMatches[0].rm_so != 0) || - (regMatches[0].rm_eo != (regoff_t)[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding])) { - // only matched a sub part of the string - return nil; - } - - NSMutableArray *buildResult = [NSMutableArray arrayWithCapacity:count]; - - for (NSUInteger x = 0 ; x < count ; ++x) { - if ((regMatches[x].rm_so == -1) && (regMatches[x].rm_eo == -1)) { - // add NSNull since it wasn't used - [buildResult addObject:[NSNull null]]; - } else { - // fetch the string - const char *base = utf8Str + regMatches[x].rm_so; - regoff_t len = regMatches[x].rm_eo - regMatches[x].rm_so; - NSString *sub = - [[[NSString alloc] initWithBytes:base - length:(NSUInteger)len - encoding:NSUTF8StringEncoding] autorelease]; - [buildResult addObject:sub]; - } - } - - result = buildResult; - } // COV_NF_LINE - radar 5851992 only reachable w/ an uncaught exception which isn't testable - @finally { - free(regMatches); - } - - return result; -} - -- (NSString *)firstSubStringMatchedInString:(NSString *)str { - NSString *result = nil; - - regmatch_t regMatch; - const char *utf8Str = [str UTF8String]; - if ([self runRegexOnUTF8:utf8Str - nmatch:1 - pmatch:®Match - flags:0]) { - // fetch the string - const char *base = utf8Str + regMatch.rm_so; - regoff_t len = regMatch.rm_eo - regMatch.rm_so; - result = - [[[NSString alloc] initWithBytes:base - length:(NSUInteger)len - encoding:NSUTF8StringEncoding] autorelease]; - } - return result; -} - -- (BOOL)matchesSubStringInString:(NSString *)str { - regmatch_t regMatch; - if ([self runRegexOnUTF8:[str UTF8String] - nmatch:1 - pmatch:®Match - flags:0]) { - // don't really care what matched, just report the match - return YES; - } - return NO; -} - -- (NSEnumerator *)segmentEnumeratorForString:(NSString *)str { - return [[[GTMRegexEnumerator alloc] initWithRegex:self - processString:str - allSegments:YES] autorelease]; -} - -- (NSEnumerator *)matchSegmentEnumeratorForString:(NSString *)str { - return [[[GTMRegexEnumerator alloc] initWithRegex:self - processString:str - allSegments:NO] autorelease]; -} - -- (NSString *)stringByReplacingMatchesInString:(NSString *)str - withReplacement:(NSString *)replacementPattern { - if (!str) - return nil; - - // if we have a replacement, we go ahead and crack it now. if the replacement - // is just an empty string (or nil), just use the nil marker. - NSArray *replacements = nil; - if ([replacementPattern length]) { - // don't need newline support, just match the start of the pattern for '^' - GTMRegex *replacementRegex = - [GTMRegex regexWithPattern:kReplacementPattern - options:kGTMRegexOptionSupressNewlineSupport]; -#ifdef DEBUG - if (!replacementRegex) { - _GTMDevLog(@"failed to parse out replacement regex!!!"); // COV_NF_LINE - } -#endif - GTMRegexEnumerator *relacementEnumerator = - [[[GTMRegexEnumerator alloc] initWithRegex:replacementRegex - processString:replacementPattern - allSegments:YES] autorelease]; - // We turn on treatStartOfNewSegmentAsBeginningOfLine for this enumerator. - // As complex as kReplacementPattern is, it can't completely do what we want - // with the normal string walk. The problem is this, backreferences are a - // slash follow by a number ("\0"), but the replacement pattern might - // actually need to use backslashes (they have to be escaped). So if a - // replacement were "\\0", then there is no backreference, instead the - // replacement is a backslash and a zero. Generically this means an even - // number of backslashes are all escapes, and an odd are some number of - // literal backslashes followed by our backreference. Think of it as a "an - // odd number of slashes that comes after a non-backslash character." There - // is no way to rexpress this in re_format(7) extended expressions. Instead - // we look for a non-blackslash or string start followed by an optional even - // number of slashes followed by the backreference; and use the special - // flag; so after each match, we restart claiming it's the start of the - // string. (the problem match w/o this flag is a substition of "\2\1") - [relacementEnumerator treatStartOfNewSegmentAsBeginningOfString:YES]; - // pull them all into an array so we can walk this as many times as needed. - replacements = [relacementEnumerator allObjects]; - if (!replacements) { - // COV_NF_START - no real way to force this in a unittest - _GTMDevLog(@"failed to create the replacements for substitutions"); - return nil; - // COV_NF_END - } - } - - NSMutableString *result = [NSMutableString stringWithCapacity:[str length]]; - - NSEnumerator *enumerator = [self segmentEnumeratorForString:str]; - GTMRegexStringSegment *segment = nil; - while ((segment = [enumerator nextObject]) != nil) { - if (![segment isMatch]) { - // not a match, just move this chunk over - [result appendString:[segment string]]; - } else { - // match... - if (!replacements) { - // no replacements, they want to eat matches, nothing to do - } else { - // spin over the split up replacement - GTMRegexStringSegment *replacementSegment = nil; - GTM_FOREACH_OBJECT(replacementSegment, replacements) { - if (![replacementSegment isMatch]) { - // not a match, raw text to put in - [result appendString:[replacementSegment string]]; - } else { - // match... - - // first goes any leading text - NSString *leading = - [replacementSegment subPatternString:kReplacementPatternLeadingTextIndex]; - if (leading) - [result appendString:leading]; - // then use the subpattern number to find what goes in from the - // original string match. - int subPatternNum = - [[replacementSegment subPatternString:kReplacementPatternSubpatternNumberIndex] intValue]; - NSString *matchSubPatStr = [segment subPatternString:subPatternNum]; - // handle an unused subpattern (ie-nil result) - if (matchSubPatStr) - [result appendString:matchSubPatStr]; - } - } - } - } - } - return result; -} - -- (NSString *)description { - NSMutableString *result = - [NSMutableString stringWithFormat:@"%@<%p> { pattern=\"%@\", rawNumSubPatterns=%zd, options=(", - [self class], self, pattern_, regexData_.re_nsub]; - if (options_) { - if (options_ & kGTMRegexOptionIgnoreCase) - [result appendString:@" IgnoreCase"]; - if ((options_ & kGTMRegexOptionSupressNewlineSupport) == kGTMRegexOptionSupressNewlineSupport) - [result appendString:@" NoNewlineSupport"]; - } else { - [result appendString:@" None(Default)"]; - } - [result appendString:@" ) }"]; - return result; -} - -@end - -@implementation GTMRegex (PrivateMethods) - -- (NSString *)errorMessage:(int)errCode { - NSString *result = @"internal error"; - - // size the buffer we need - size_t len = regerror(errCode, ®exData_, NULL, 0); - char *buffer = (char*)malloc(sizeof(char) * len); - if (buffer) { - // fetch the error - if (len == regerror(errCode, ®exData_, buffer, len)) { - NSString *generatedError = [NSString stringWithUTF8String:buffer]; - if (generatedError) - result = generatedError; - } - free(buffer); - } - return result; -} - -// private helper to run the regex on a block -- (BOOL)runRegexOnUTF8:(const char*)utf8Str - nmatch:(size_t)nmatch - pmatch:(regmatch_t *)pmatch - flags:(int)flags { - if (!utf8Str) - return NO; - - int execResult = regexec(®exData_, utf8Str, nmatch, pmatch, flags); - if (execResult != 0) { -#ifdef DEBUG - if (execResult != REG_NOMATCH) { - // COV_NF_START - no real way to force this in a unittest - NSString *errorStr = [self errorMessage:execResult]; - _GTMDevLog(@"%@: matching string \"%.20s...\", had error: \"%@\"", - self, utf8Str, errorStr); - // COV_NF_END - } -#endif - return NO; - } - return YES; -} - -@end - -@implementation GTMRegexEnumerator - -// we don't block init because the class isn't exported, so no one can -// create one, or if they do, they get whatever happens... - -- (id)initWithRegex:(GTMRegex *)regex - processString:(NSString *)str - allSegments:(BOOL)allSegments { - self = [super init]; - if (!self) return nil; - - // collect args - regex_ = [regex retain]; - utf8StrBuf_ = [[str dataUsingEncoding:NSUTF8StringEncoding] retain]; - allSegments_ = allSegments; - - // arg check - if (!regex_ || !utf8StrBuf_) { - [self release]; - return nil; - } - - // parsing state initialized to zero for us by object creation - - return self; -} - -// Don't need a finalize because savedRegMatches_ is marked __strong -- (void)dealloc { - if (savedRegMatches_) { - free(savedRegMatches_); - savedRegMatches_ = nil; - } - [regex_ release]; - [utf8StrBuf_ release]; - [super dealloc]; -} - -- (void)treatStartOfNewSegmentAsBeginningOfString:(BOOL)yesNo { - // The way regexec works, it assumes the first char it's looking at to the - // start of the string. In normal use, this makes sense; but in this case, - // we're going to walk the entry string splitting it up by our pattern. That - // means for the first call, it is the string start, but for all future calls, - // it is NOT the string start, so we will pass regexec the flag to let it - // know. However, (you knew that was coming), there are some cases where you - // actually want the each pass to be considered as the start of the string - // (usually the cases are where a pattern can't express what's needed w/o - // this). There is no really good way to explain this behavior w/o all this - // text and lot of examples, so for now this is not in the public api, and - // just here. (Hint: see what w/in this file uses this for why we have it) - treatStartOfNewSegmentAsBeginningOfString_ = yesNo; -} - -- (id)nextObject { - - GTMRegexStringSegment *result = nil; - regmatch_t *nextMatches = nil; - BOOL isMatch = NO; - - // we do all this w/in a try, so if something throws, the memory we malloced - // will still get cleaned up - @try { - - // if we have a saved match, use that... - if (savedRegMatches_) { - nextMatches = savedRegMatches_; - savedRegMatches_ = nil; - isMatch = YES; // if we have something saved, it was a pattern match - } - // have we reached the end? - else if (curParseIndex_ >= (regoff_t)[utf8StrBuf_ length]) { - // done, do nothing, we'll return nil - } - // do the search. - else { - - // alloc the match structure (extra space for the zero (full) match) - size_t matchBufSize = ([regex_ subPatternCount] + 1) * sizeof(regmatch_t); - nextMatches = malloc(matchBufSize); - if (!nextMatches) - return nil; // COV_NF_LINE - no real way to force this in a unittest - - // setup our range to work on - nextMatches[0].rm_so = curParseIndex_; - nextMatches[0].rm_eo = [utf8StrBuf_ length]; - - // figure out our flags - int flags = REG_STARTEND; - if ((!treatStartOfNewSegmentAsBeginningOfString_) && - (curParseIndex_ != 0)) { - // see -treatStartOfNewSegmentAsBeginningOfString: for why we have - // this check here. - flags |= REG_NOTBOL; - } - - // call for the match - if ([regex_ runRegexOnUTF8:[utf8StrBuf_ bytes] - nmatch:([regex_ subPatternCount] + 1) - pmatch:nextMatches - flags:flags]) { - // match - - if (allSegments_ && - (nextMatches[0].rm_so != curParseIndex_)) { - // we should return all segments (not just matches), and there was - // something before this match. So safe off this match for later - // and create a range for this. - - savedRegMatches_ = nextMatches; - nextMatches = malloc(matchBufSize); - if (!nextMatches) - return nil; // COV_NF_LINE - no real way to force this in a unittest - - isMatch = NO; - // mark everything but the zero slot w/ not used - for (NSUInteger x = [regex_ subPatternCount]; x > 0; --x) { - nextMatches[x].rm_so = nextMatches[x].rm_eo = -1; - } - nextMatches[0].rm_so = curParseIndex_; - nextMatches[0].rm_eo = savedRegMatches_[0].rm_so; - - // advance our marker - curParseIndex_ = savedRegMatches_[0].rm_eo; - - } else { - // we only return matches or are pointed at a match - - // no real work to do, just fall through to return to return the - // current match. - isMatch = YES; - - // advance our marker - curParseIndex_ = nextMatches[0].rm_eo; - } - - } else { - // no match - - // should we return the last non matching segment? - if (allSegments_) { - isMatch = NO; - // mark everything but the zero slot w/ not used - for (NSUInteger x = [regex_ subPatternCount]; x > 0; --x) { - nextMatches[x].rm_so = nextMatches[x].rm_eo = -1; - } - nextMatches[0].rm_so = curParseIndex_; - nextMatches[0].rm_eo = [utf8StrBuf_ length]; - } else { - // drop match set, we don't want it - free(nextMatches); - nextMatches = nil; - } - - // advance our marker since we're done - curParseIndex_ = [utf8StrBuf_ length]; - - } - } - - // create the segment to return - if (nextMatches) { - result = - [[[GTMRegexStringSegment alloc] initWithUTF8StrBuf:utf8StrBuf_ - regMatches:nextMatches - numRegMatches:[regex_ subPatternCount] - isMatch:isMatch] autorelease]; - nextMatches = nil; - } - } @catch (id e) { // COV_NF_START - no real way to force this in a test - _GTMDevLog(@"Exceptions while trying to advance enumeration (%@)", e); - // if we still have something in our temp, free it - if (nextMatches) - free(nextMatches); - } // COV_NF_END - - return result; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@<%p> { regex=\"%@\", allSegments=%s, string=\"%.20s...\" }", - [self class], self, - regex_, - (allSegments_ ? "YES" : "NO"), - [utf8StrBuf_ bytes]]; -} - -@end - -@implementation GTMRegexStringSegment - -- (id)init { - // make sure init is never called, the class in in the header so someone - // could try to create it by mistake. - // Call super init and release so we don't leak - [[super init] autorelease]; - [self doesNotRecognizeSelector:_cmd]; - return nil; // COV_NF_LINE - return is just here to keep gcc happy -} - -- (void)dealloc { - if (regMatches_) { - free(regMatches_); - regMatches_ = nil; - } - [utf8StrBuf_ release]; - [super dealloc]; -} - -- (BOOL)isMatch { - return isMatch_; -} - -- (NSString *)string { - // fetch match zero - return [self subPatternString:0]; -} - -- (NSString *)subPatternString:(NSUInteger)patternIndex { - if (patternIndex > numRegMatches_) - return nil; - - // pick off when it wasn't found - if ((regMatches_[patternIndex].rm_so == -1) && - (regMatches_[patternIndex].rm_eo == -1)) - return nil; - - // fetch the string - const char *base = (const char*)[utf8StrBuf_ bytes] - + regMatches_[patternIndex].rm_so; - regoff_t len = regMatches_[patternIndex].rm_eo - - regMatches_[patternIndex].rm_so; - return [[[NSString alloc] initWithBytes:base - length:(NSUInteger)len - encoding:NSUTF8StringEncoding] autorelease]; -} - -- (NSString *)description { - NSMutableString *result = - [NSMutableString stringWithFormat:@"%@<%p> { isMatch=\"%s\", subPatterns=(", - [self class], self, (isMatch_ ? "YES" : "NO")]; - for (NSUInteger x = 0; x <= numRegMatches_; ++x) { - NSString *format = @", \"%.*s\""; - if (x == 0) - format = @" \"%.*s\""; - - [result appendFormat:format, - (int)(regMatches_[x].rm_eo - regMatches_[x].rm_so), - (((const char*)[utf8StrBuf_ bytes]) + regMatches_[x].rm_so)]; - } - [result appendString:@" ) }"]; - - return result; -} - -@end - -@implementation GTMRegexStringSegment (PrivateMethods) - -- (id)initWithUTF8StrBuf:(NSData *)utf8StrBuf - regMatches:(regmatch_t *)regMatches - numRegMatches:(NSUInteger)numRegMatches - isMatch:(BOOL)isMatch { - self = [super init]; - if (!self) return nil; - - utf8StrBuf_ = [utf8StrBuf retain]; - regMatches_ = regMatches; - numRegMatches_ = numRegMatches; - isMatch_ = isMatch; - - // check the args - if (!utf8StrBuf_ || !regMatches_) { - // COV_NF_START - // this could only happen something messed w/ our internal state. - [self release]; - return nil; - // COV_NF_END - } - - return self; -} - -@end - -@implementation NSString (GTMRegexAdditions) - -- (BOOL)gtm_matchesPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex matchesString:self]; -} - -- (NSArray *)gtm_subPatternsOfPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex subPatternsOfString:self]; -} - -- (NSString *)gtm_firstSubStringMatchedByPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex firstSubStringMatchedInString:self]; -} - -- (BOOL)gtm_subStringMatchesPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex matchesSubStringInString:self]; -} - -- (NSArray *)gtm_allSubstringsMatchedByPattern:(NSString *)pattern { - NSEnumerator *enumerator = [self gtm_matchSegmentEnumeratorForPattern:pattern]; - NSArray *allSegments = [enumerator allObjects]; - return [allSegments valueForKey:@"string"]; -} - -- (NSEnumerator *)gtm_segmentEnumeratorForPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex segmentEnumeratorForString:self]; -} - -- (NSEnumerator *)gtm_matchSegmentEnumeratorForPattern:(NSString *)pattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex matchSegmentEnumeratorForString:self]; -} - -- (NSString *)gtm_stringByReplacingMatchesOfPattern:(NSString *)pattern - withReplacement:(NSString *)replacementPattern { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - return [regex stringByReplacingMatchesInString:self - withReplacement:replacementPattern]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegexTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegexTest.m deleted file mode 100644 index 6f41d600..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMRegexTest.m +++ /dev/null @@ -1,1245 +0,0 @@ -// -// GTMRegexTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMRegex.h" -#import "GTMUnitTestDevLog.h" - -// -// NOTE: -// -// We don't really test any of the pattern matching since that's testing -// libregex, we just want to test our wrapper. -// - -@interface GTMRegexTest : GTMTestCase -@end - -@interface NSString_GTMRegexAdditions : GTMTestCase -@end - -@implementation GTMRegexTest - -- (void)testEscapedPatternForString { - STAssertEqualStrings([GTMRegex escapedPatternForString:@"abcdefghijklmnopqrstuvwxyz0123456789"], - @"abcdefghijklmnopqrstuvwxyz0123456789", - nil); - STAssertEqualStrings([GTMRegex escapedPatternForString:@"^.[$()|*+?{\\"], - @"\\^\\.\\[\\$\\(\\)\\|\\*\\+\\?\\{\\\\", - nil); - STAssertEqualStrings([GTMRegex escapedPatternForString:@"a^b.c[d$e(f)g|h*i+j?k{l\\m"], - @"a\\^b\\.c\\[d\\$e\\(f\\)g\\|h\\*i\\+j\\?k\\{l\\\\m", - nil); - - STAssertNil([GTMRegex escapedPatternForString:nil], nil); - STAssertEqualStrings([GTMRegex escapedPatternForString:@""], @"", nil); -} - - -- (void)testInit { - - // fail cases - STAssertNil([[[GTMRegex alloc] init] autorelease], nil); - STAssertNil([[[GTMRegex alloc] initWithPattern:nil] autorelease], nil); - STAssertNil([[[GTMRegex alloc] initWithPattern:nil - options:kGTMRegexOptionIgnoreCase] autorelease], nil); - [GTMUnitTestDevLog expectString:@"Invalid pattern \"(.\", error: \"parentheses not balanced\""]; - STAssertNil([[[GTMRegex alloc] initWithPattern:@"(."] autorelease], nil); - [GTMUnitTestDevLog expectString:@"Invalid pattern \"(.\", error: \"parentheses not balanced\""]; - STAssertNil([[[GTMRegex alloc] initWithPattern:@"(." - options:kGTMRegexOptionIgnoreCase] autorelease], nil); - // fail cases w/ error param - NSError *error = nil; - STAssertNil([[[GTMRegex alloc] initWithPattern:nil - options:kGTMRegexOptionIgnoreCase - withError:&error] autorelease], nil); - STAssertNil(error, @"no pattern, shouldn't get error object"); - STAssertNil([[[GTMRegex alloc] initWithPattern:@"(." - options:kGTMRegexOptionIgnoreCase - withError:&error] autorelease], nil); - STAssertNotNil(error, nil); - STAssertEqualObjects([error domain], kGTMRegexErrorDomain, nil); - STAssertEquals([error code], (NSInteger)kGTMRegexPatternParseFailedError, nil); - NSDictionary *userInfo = [error userInfo]; - STAssertNotNil(userInfo, @"failed to get userInfo from error"); - STAssertEqualObjects([userInfo objectForKey:kGTMRegexPatternErrorPattern], @"(.", nil); - STAssertNotNil([userInfo objectForKey:kGTMRegexPatternErrorErrorString], nil); - - // basic pattern w/ options - STAssertNotNil([[[GTMRegex alloc] initWithPattern:@"(.*)"] autorelease], nil); - STAssertNotNil([[[GTMRegex alloc] initWithPattern:@"(.*)" - options:0] autorelease], nil); - STAssertNotNil([[[GTMRegex alloc] initWithPattern:@"(.*)" - options:kGTMRegexOptionIgnoreCase] autorelease], nil); - error = nil; - STAssertNotNil([[[GTMRegex alloc] initWithPattern:@"(.*)" - options:kGTMRegexOptionIgnoreCase - withError:&error] autorelease], nil); - STAssertNil(error, @"shouldn't have been any error"); - - // fail cases (helper) - STAssertNil([GTMRegex regexWithPattern:nil], nil); - STAssertNil([GTMRegex regexWithPattern:nil - options:0], nil); - [GTMUnitTestDevLog expectString:@"Invalid pattern \"(.\", error: \"parentheses not balanced\""]; - STAssertNil([GTMRegex regexWithPattern:@"(."], nil); - [GTMUnitTestDevLog expectString:@"Invalid pattern \"(.\", error: \"parentheses not balanced\""]; - STAssertNil([GTMRegex regexWithPattern:@"(." - options:0], nil); - // fail cases (helper) w/ error param - STAssertNil([GTMRegex regexWithPattern:nil - options:kGTMRegexOptionIgnoreCase - withError:&error], nil); - STAssertNil(error, @"no pattern, shouldn't get error object"); - STAssertNil([GTMRegex regexWithPattern:@"(." - options:kGTMRegexOptionIgnoreCase - withError:&error], nil); - STAssertNotNil(error, nil); - STAssertEqualObjects([error domain], kGTMRegexErrorDomain, nil); - STAssertEquals([error code], (NSInteger)kGTMRegexPatternParseFailedError, nil); - userInfo = [error userInfo]; - STAssertNotNil(userInfo, @"failed to get userInfo from error"); - STAssertEqualObjects([userInfo objectForKey:kGTMRegexPatternErrorPattern], @"(.", nil); - STAssertNotNil([userInfo objectForKey:kGTMRegexPatternErrorErrorString], nil); - - // basic pattern w/ options (helper) - STAssertNotNil([GTMRegex regexWithPattern:@"(.*)"], nil); - STAssertNotNil([GTMRegex regexWithPattern:@"(.*)" - options:0], nil); - STAssertNotNil([GTMRegex regexWithPattern:@"(.*)" - options:kGTMRegexOptionIgnoreCase], nil); - error = nil; - STAssertNotNil([GTMRegex regexWithPattern:@"(.*)" - options:kGTMRegexOptionIgnoreCase - withError:&error], nil); - STAssertNil(error, @"shouldn't have been any error"); - - // not really a test on GTMRegex, but make sure we block attempts to directly - // alloc/init a GTMRegexStringSegment. - STAssertThrowsSpecificNamed([[[GTMRegexStringSegment alloc] init] autorelease], - NSException, NSInvalidArgumentException, - @"shouldn't have been able to alloc/init a GTMRegexStringSegment"); -} - -- (void)testOptions { - - NSString *testString = @"aaa AAA\nbbb BBB\n aaa aAa\n bbb BbB"; - - // default options - GTMRegex *regex = [GTMRegex regexWithPattern:@"a+"]; - STAssertNotNil(regex, nil); - NSEnumerator *enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa" - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " AAA\nbbb BBB\n " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" AAA\nbbb BBB\n ", nil); - // "aaa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" ", nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "A" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"A", nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "\n bbb BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\n bbb BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // kGTMRegexOptionIgnoreCase - regex = [GTMRegex regexWithPattern:@"a+" options:kGTMRegexOptionIgnoreCase]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" ", nil); - // "AAA" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"AAA", nil); - // "\nbbb BBB\n " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\nbbb BBB\n ", nil); - // "aaa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" ", nil); - // "aAa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aAa", nil); - // "\n bbb BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\n bbb BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // defaults w/ '^' - regex = [GTMRegex regexWithPattern:@"^a+"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " AAA\nbbb BBB\n aaa aAa\n bbb BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" AAA\nbbb BBB\n aaa aAa\n bbb BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // defaults w/ '$' - regex = [GTMRegex regexWithPattern:@"B+$"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa AAA\nbbb " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa AAA\nbbb ", nil); - // "BBB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"BBB", nil); - // "\n aaa aAa\n bbb Bb" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\n aaa aAa\n bbb Bb", nil); - // "B" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"B", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // kGTMRegexOptionIgnoreCase w/ '$' - regex = [GTMRegex regexWithPattern:@"B+$" - options:kGTMRegexOptionIgnoreCase]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa AAA\nbbb " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa AAA\nbbb ", nil); - // "BBB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"BBB", nil); - // "\n aaa aAa\n bbb " - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\n aaa aAa\n bbb ", nil); - // "BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test w/ kGTMRegexOptionSupressNewlineSupport and \n in the string - regex = [GTMRegex regexWithPattern:@"a.*b" options:kGTMRegexOptionSupressNewlineSupport]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa AAA\nbbb BBB\n aaa aAa\n bbb Bb" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa AAA\nbbb BBB\n aaa aAa\n bbb Bb", nil); - // "B" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"B", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test w/o kGTMRegexOptionSupressNewlineSupport and \n in the string - // (this is no match since it '.' can't match the '\n') - regex = [GTMRegex regexWithPattern:@"a.*b"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa AAA\nbbb BBB\n aaa aAa\n bbb BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa AAA\nbbb BBB\n aaa aAa\n bbb BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // kGTMRegexOptionSupressNewlineSupport w/ '^' - regex = [GTMRegex regexWithPattern:@"^a+" options:kGTMRegexOptionSupressNewlineSupport]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - // " AAA\nbbb BBB\n aaa aAa\n bbb BbB" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @" AAA\nbbb BBB\n aaa aAa\n bbb BbB", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // kGTMRegexOptionSupressNewlineSupport w/ '$' - regex = [GTMRegex regexWithPattern:@"B+$" options:kGTMRegexOptionSupressNewlineSupport]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:testString]; - STAssertNotNil(enumerator, nil); - // "aaa AAA\nbbb BBB\n aaa aAa\n bbb Bb" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa AAA\nbbb BBB\n aaa aAa\n bbb Bb", nil); - // "B" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"B", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); -} - -- (void)testSubPatternCount { - STAssertEquals((NSUInteger)0, [[GTMRegex regexWithPattern:@".*"] subPatternCount], nil); - STAssertEquals((NSUInteger)1, [[GTMRegex regexWithPattern:@"(.*)"] subPatternCount], nil); - STAssertEquals((NSUInteger)1, [[GTMRegex regexWithPattern:@"[fo]*(.*)[bar]*"] subPatternCount], nil); - STAssertEquals((NSUInteger)3, [[GTMRegex regexWithPattern:@"([fo]*)(.*)([bar]*)"] subPatternCount], nil); - STAssertEquals((NSUInteger)7, [[GTMRegex regexWithPattern:@"(([bar]*)|([fo]*))(.*)(([bar]*)|([fo]*))"] subPatternCount], nil); -} - -- (void)testMatchesString { - // simple pattern - GTMRegex *regex = [GTMRegex regexWithPattern:@"foo.*bar"]; - STAssertNotNil(regex, nil); - STAssertTrue([regex matchesString:@"foobar"], nil); - STAssertTrue([regex matchesString:@"foobydoo spambar"], nil); - STAssertFalse([regex matchesString:@"zzfoobarzz"], nil); - STAssertFalse([regex matchesString:@"zzfoobydoo spambarzz"], nil); - STAssertFalse([regex matchesString:@"abcdef"], nil); - STAssertFalse([regex matchesString:@""], nil); - STAssertFalse([regex matchesString:nil], nil); - // pattern w/ sub patterns - regex = [GTMRegex regexWithPattern:@"(foo)(.*)(bar)"]; - STAssertNotNil(regex, nil); - STAssertTrue([regex matchesString:@"foobar"], nil); - STAssertTrue([regex matchesString:@"foobydoo spambar"], nil); - STAssertFalse([regex matchesString:@"zzfoobarzz"], nil); - STAssertFalse([regex matchesString:@"zzfoobydoo spambarzz"], nil); - STAssertFalse([regex matchesString:@"abcdef"], nil); - STAssertFalse([regex matchesString:@""], nil); - STAssertFalse([regex matchesString:nil], nil); -} - -- (void)testSubPatternsOfString { - GTMRegex *regex = [GTMRegex regexWithPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNotNil(regex, nil); - STAssertEquals((NSUInteger)5, [regex subPatternCount], nil); - NSArray *subPatterns = [regex subPatternsOfString:@"foooooobaz"]; - STAssertNotNil(subPatterns, nil); - STAssertEquals((NSUInteger)6, [subPatterns count], nil); - STAssertEqualStrings(@"foooooobaz", [subPatterns objectAtIndex:0], nil); - STAssertEqualStrings(@"foooooo", [subPatterns objectAtIndex:1], nil); - STAssertEqualStrings(@"ooooo", [subPatterns objectAtIndex:2], nil); - STAssertEqualStrings(@"baz", [subPatterns objectAtIndex:3], nil); - STAssertEqualObjects([NSNull null], [subPatterns objectAtIndex:4], nil); - STAssertEqualStrings(@"baz", [subPatterns objectAtIndex:5], nil); - - // not there - subPatterns = [regex subPatternsOfString:@"aaa"]; - STAssertNil(subPatterns, nil); - - // not extra stuff on either end - subPatterns = [regex subPatternsOfString:@"ZZZfoooooobaz"]; - STAssertNil(subPatterns, nil); - subPatterns = [regex subPatternsOfString:@"foooooobazZZZ"]; - STAssertNil(subPatterns, nil); - subPatterns = [regex subPatternsOfString:@"ZZZfoooooobazZZZ"]; - STAssertNil(subPatterns, nil); -} - -- (void)testFirstSubStringMatchedInString { - // simple pattern - GTMRegex *regex = [GTMRegex regexWithPattern:@"foo.*bar"]; - STAssertNotNil(regex, nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"foobar"], - @"foobar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"foobydoo spambar"], - @"foobydoo spambar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"zzfoobarzz"], - @"foobar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"zzfoobydoo spambarzz"], - @"foobydoo spambar", nil); - STAssertNil([regex firstSubStringMatchedInString:@"abcdef"], nil); - STAssertNil([regex firstSubStringMatchedInString:@""], nil); - // pattern w/ sub patterns - regex = [GTMRegex regexWithPattern:@"(foo)(.*)(bar)"]; - STAssertNotNil(regex, nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"foobar"], - @"foobar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"foobydoo spambar"], - @"foobydoo spambar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"zzfoobarzz"], - @"foobar", nil); - STAssertEqualStrings([regex firstSubStringMatchedInString:@"zzfoobydoo spambarzz"], - @"foobydoo spambar", nil); - STAssertNil([regex firstSubStringMatchedInString:@"abcdef"], nil); - STAssertNil([regex firstSubStringMatchedInString:@""], nil); -} - -- (void)testMatchesSubStringInString { - // simple pattern - GTMRegex *regex = [GTMRegex regexWithPattern:@"foo.*bar"]; - STAssertNotNil(regex, nil); - STAssertTrue([regex matchesSubStringInString:@"foobar"], nil); - STAssertTrue([regex matchesSubStringInString:@"foobydoo spambar"], nil); - STAssertTrue([regex matchesSubStringInString:@"zzfoobarzz"], nil); - STAssertTrue([regex matchesSubStringInString:@"zzfoobydoo spambarzz"], nil); - STAssertFalse([regex matchesSubStringInString:@"abcdef"], nil); - STAssertFalse([regex matchesSubStringInString:@""], nil); - // pattern w/ sub patterns - regex = [GTMRegex regexWithPattern:@"(foo)(.*)(bar)"]; - STAssertNotNil(regex, nil); - STAssertTrue([regex matchesSubStringInString:@"foobar"], nil); - STAssertTrue([regex matchesSubStringInString:@"foobydoo spambar"], nil); - STAssertTrue([regex matchesSubStringInString:@"zzfoobarzz"], nil); - STAssertTrue([regex matchesSubStringInString:@"zzfoobydoo spambarzz"], nil); - STAssertFalse([regex matchesSubStringInString:@"abcdef"], nil); - STAssertFalse([regex matchesSubStringInString:@""], nil); -} - -- (void)testSegmentEnumeratorForString { - GTMRegex *regex = [GTMRegex regexWithPattern:@"foo+ba+r"]; - STAssertNotNil(regex, nil); - - // test odd input - NSEnumerator *enumerator = [regex segmentEnumeratorForString:@""]; - STAssertNotNil(enumerator, nil); - enumerator = [regex segmentEnumeratorForString:nil]; - STAssertNil(enumerator, nil); - - // on w/ the normal tests - enumerator = [regex segmentEnumeratorForString:@"afoobarbfooobaarfoobarzz"]; - STAssertNotNil(enumerator, nil); - // "a" - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "b" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"b", nil); - // "fooobaar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"fooobaar", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "zz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"zz", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test no match - enumerator = [regex segmentEnumeratorForString:@"aaa"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test only match - enumerator = [regex segmentEnumeratorForString:@"foobar"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // now test the saved sub segments - regex = [GTMRegex regexWithPattern:@"(foo)((bar)|(baz))"]; - STAssertNotNil(regex, nil); - STAssertEquals((NSUInteger)4, [regex subPatternCount], nil); - enumerator = [regex segmentEnumeratorForString:@"foobarxxfoobaz"]; - STAssertNotNil(enumerator, nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"bar", nil); - STAssertEqualStrings([seg subPatternString:3], @"bar", nil); - STAssertNil([seg subPatternString:4], nil); // nothing matched "(baz)" - STAssertNil([seg subPatternString:5], nil); - // "xx" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"xx", nil); - STAssertEqualStrings([seg subPatternString:0], @"xx", nil); - STAssertNil([seg subPatternString:1], nil); - // "foobaz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"baz", nil); - STAssertNil([seg subPatternString:3], nil); // (nothing matched "(bar)" - STAssertEqualStrings([seg subPatternString:4], @"baz", nil); - STAssertNil([seg subPatternString:5], nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test all objects - regex = [GTMRegex regexWithPattern:@"foo+ba+r"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:@"afoobarbfooobaarfoobarzz"]; - STAssertNotNil(enumerator, nil); - NSArray *allSegments = [enumerator allObjects]; - STAssertNotNil(allSegments, nil); - STAssertEquals((NSUInteger)6, [allSegments count], nil); - - // test we are getting the flags right for newline - regex = [GTMRegex regexWithPattern:@"^a"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:@"aa\naa"]; - STAssertNotNil(enumerator, nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "a\n" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a\n", nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test we are getting the flags right for newline, part 2 - regex = [GTMRegex regexWithPattern:@"^a*$"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:@"aa\naa\nbb\naa"]; - STAssertNotNil(enumerator, nil); - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // "\n" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\n", nil); - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // "\nbb\n" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"\nbb\n", nil); - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // make sure the enum cleans up if not walked to the end - regex = [GTMRegex regexWithPattern:@"b+"]; - STAssertNotNil(regex, nil); - enumerator = [regex segmentEnumeratorForString:@"aabbcc"]; - STAssertNotNil(enumerator, nil); - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // and done w/o walking the rest -} - -- (void)testMatchSegmentEnumeratorForString { - GTMRegex *regex = [GTMRegex regexWithPattern:@"foo+ba+r"]; - STAssertNotNil(regex, nil); - - // test odd input - NSEnumerator *enumerator = [regex matchSegmentEnumeratorForString:@""]; - STAssertNotNil(enumerator, nil); - enumerator = [regex matchSegmentEnumeratorForString:nil]; - STAssertNil(enumerator, nil); - - // on w/ the normal tests - enumerator = [regex matchSegmentEnumeratorForString:@"afoobarbfooobaarfoobarzz"]; - STAssertNotNil(enumerator, nil); - // "a" - skipped - // "foobar" - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "b" - skipped - // "fooobaar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"fooobaar", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "zz" - skipped - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test no match - enumerator = [regex matchSegmentEnumeratorForString:@"aaa"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); // should have gotten nothing - - // test only match - enumerator = [regex matchSegmentEnumeratorForString:@"foobar"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // now test the saved sub segments - regex = [GTMRegex regexWithPattern:@"(foo)((bar)|(baz))"]; - STAssertNotNil(regex, nil); - STAssertEquals((NSUInteger)4, [regex subPatternCount], nil); - enumerator = [regex matchSegmentEnumeratorForString:@"foobarxxfoobaz"]; - STAssertNotNil(enumerator, nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"bar", nil); - STAssertEqualStrings([seg subPatternString:3], @"bar", nil); - STAssertNil([seg subPatternString:4], nil); // nothing matched "(baz)" - STAssertNil([seg subPatternString:5], nil); - // "xx" - skipped - // "foobaz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"baz", nil); - STAssertNil([seg subPatternString:3], nil); // (nothing matched "(bar)" - STAssertEqualStrings([seg subPatternString:4], @"baz", nil); - STAssertNil([seg subPatternString:5], nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test all objects - regex = [GTMRegex regexWithPattern:@"foo+ba+r"]; - STAssertNotNil(regex, nil); - enumerator = [regex matchSegmentEnumeratorForString:@"afoobarbfooobaarfoobarzz"]; - STAssertNotNil(enumerator, nil); - NSArray *allSegments = [enumerator allObjects]; - STAssertNotNil(allSegments, nil); - STAssertEquals((NSUInteger)3, [allSegments count], nil); - - // test we are getting the flags right for newline - regex = [GTMRegex regexWithPattern:@"^a"]; - STAssertNotNil(regex, nil); - enumerator = [regex matchSegmentEnumeratorForString:@"aa\naa"]; - STAssertNotNil(enumerator, nil); - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "a\n" - skipped - // "a" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "a" - skipped - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test we are getting the flags right for newline, part 2 - regex = [GTMRegex regexWithPattern:@"^a*$"]; - STAssertNotNil(regex, nil); - enumerator = [regex matchSegmentEnumeratorForString:@"aa\naa\nbb\naa"]; - STAssertNotNil(enumerator, nil); - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // "\n" - skipped - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // "\nbb\n" - skipped - // "aa" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aa", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); -} - -- (void)testStringByReplacingMatchesInStringWithReplacement { - GTMRegex *regex = [GTMRegex regexWithPattern:@"(foo)(.*)(bar)"]; - STAssertNotNil(regex, nil); - // the basics - STAssertEqualStrings(@"weeZbarZbydoo spamZfooZdoggies", - [regex stringByReplacingMatchesInString:@"weefoobydoo spambardoggies" - withReplacement:@"Z\\3Z\\2Z\\1Z"], - nil); - // nil/empty replacement - STAssertEqualStrings(@"weedoggies", - [regex stringByReplacingMatchesInString:@"weefoobydoo spambardoggies" - withReplacement:nil], - nil); - STAssertEqualStrings(@"weedoggies", - [regex stringByReplacingMatchesInString:@"weefoobydoo spambardoggies" - withReplacement:@""], - nil); - STAssertEqualStrings(@"", - [regex stringByReplacingMatchesInString:@"" - withReplacement:@"abc"], - nil); - STAssertNil([regex stringByReplacingMatchesInString:nil - withReplacement:@"abc"], - nil); - // use optional and invale subexpression parts to confirm that works - regex = [GTMRegex regexWithPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNotNil(regex, nil); - STAssertEqualStrings(@"aaa baz bar bar foo baz aaa", - [regex stringByReplacingMatchesInString:@"aaa foooooobaz fooobar bar foo baz aaa" - withReplacement:@"\\4\\5"], - nil); - STAssertEqualStrings(@"aaa ZZZ ZZZ bar foo baz aaa", - [regex stringByReplacingMatchesInString:@"aaa foooooobaz fooobar bar foo baz aaa" - withReplacement:@"Z\\10Z\\12Z"], - nil); - // test slashes in replacement that aren't part of the subpattern reference - regex = [GTMRegex regexWithPattern:@"a+"]; - STAssertNotNil(regex, nil); - STAssertEqualStrings(@"z\\\\0 \\\\a \\\\\\\\0z", - [regex stringByReplacingMatchesInString:@"zaz" - withReplacement:@"\\\\0 \\\\\\0 \\\\\\\\0"], - nil); - STAssertEqualStrings(@"z\\\\a \\\\\\\\0 \\\\\\\\az", - [regex stringByReplacingMatchesInString:@"zaz" - withReplacement:@"\\\\\\0 \\\\\\\\0 \\\\\\\\\\0"], - nil); - STAssertEqualStrings(@"z\\\\\\\\0 \\\\\\\\a \\\\\\\\\\\\0z", - [regex stringByReplacingMatchesInString:@"zaz" - withReplacement:@"\\\\\\\\0 \\\\\\\\\\0 \\\\\\\\\\\\0"], - nil); -} - -- (void)testDescriptions { - // default options - GTMRegex *regex = [GTMRegex regexWithPattern:@"a+"]; - STAssertNotNil(regex, nil); - STAssertGreaterThan([[regex description] length], (NSUInteger)10, - @"failed to get a reasonable description for regex"); - // enumerator - NSEnumerator *enumerator = [regex segmentEnumeratorForString:@"aaabbbccc"]; - STAssertNotNil(enumerator, nil); - STAssertGreaterThan([[enumerator description] length], (NSUInteger)10, - @"failed to get a reasonable description for regex enumerator"); - // string segment - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertGreaterThan([[seg description] length], (NSUInteger)10, - @"failed to get a reasonable description for regex string segment"); - // regex w/ other options - regex = [GTMRegex regexWithPattern:@"a+" - options:(kGTMRegexOptionIgnoreCase | kGTMRegexOptionSupressNewlineSupport)]; - STAssertNotNil(regex, nil); - STAssertGreaterThan([[regex description] length], (NSUInteger)10, - @"failed to get a reasonable description for regex w/ options"); -} - -@end - -@implementation NSString_GTMRegexAdditions -// Only partial tests to test that the call get through correctly since the -// above really tests them. - -- (void)testMatchesPattern { - // simple pattern - STAssertTrue([@"foobar" gtm_matchesPattern:@"foo.*bar"], nil); - STAssertTrue([@"foobydoo spambar" gtm_matchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"zzfoobarzz" gtm_matchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"zzfoobydoo spambarzz" gtm_matchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"abcdef" gtm_matchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"" gtm_matchesPattern:@"foo.*bar"], nil); - // pattern w/ sub patterns - STAssertTrue([@"foobar" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertTrue([@"foobydoo spambar" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"zzfoobarzz" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"zzfoobydoo spambarzz" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"abcdef" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"" gtm_matchesPattern:@"(foo)(.*)(bar)"], nil); -} - -- (void)testSubPatternsOfPattern { - NSArray *subPatterns = [@"foooooobaz" gtm_subPatternsOfPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNotNil(subPatterns, nil); - STAssertEquals((NSUInteger)6, [subPatterns count], nil); - STAssertEqualStrings(@"foooooobaz", [subPatterns objectAtIndex:0], nil); - STAssertEqualStrings(@"foooooo", [subPatterns objectAtIndex:1], nil); - STAssertEqualStrings(@"ooooo", [subPatterns objectAtIndex:2], nil); - STAssertEqualStrings(@"baz", [subPatterns objectAtIndex:3], nil); - STAssertEqualObjects([NSNull null], [subPatterns objectAtIndex:4], nil); - STAssertEqualStrings(@"baz", [subPatterns objectAtIndex:5], nil); - - // not there - subPatterns = [@"aaa" gtm_subPatternsOfPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNil(subPatterns, nil); - - // not extra stuff on either end - subPatterns = [@"ZZZfoooooobaz" gtm_subPatternsOfPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNil(subPatterns, nil); - subPatterns = [@"foooooobazZZZ" gtm_subPatternsOfPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNil(subPatterns, nil); - subPatterns = [@"ZZZfoooooobazZZZ" gtm_subPatternsOfPattern:@"(fo(o+))((bar)|(baz))"]; - STAssertNil(subPatterns, nil); -} - -- (void)testFirstSubStringMatchedByPattern { - // simple pattern - STAssertEqualStrings([@"foobar" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], - @"foobar", nil); - STAssertEqualStrings([@"foobydoo spambar" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], - @"foobydoo spambar", nil); - STAssertEqualStrings([@"zzfoobarzz" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], - @"foobar", nil); - STAssertEqualStrings([@"zzfoobydoo spambarzz" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], - @"foobydoo spambar", nil); - STAssertNil([@"abcdef" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], nil); - STAssertNil([@"" gtm_firstSubStringMatchedByPattern:@"foo.*bar"], nil); - // pattern w/ sub patterns - STAssertEqualStrings([@"foobar" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], - @"foobar", nil); - STAssertEqualStrings([@"foobydoo spambar" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], - @"foobydoo spambar", nil); - STAssertEqualStrings([@"zzfoobarzz" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], - @"foobar", nil); - STAssertEqualStrings([@"zzfoobydoo spambarzz" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], - @"foobydoo spambar", nil); - STAssertNil([@"abcdef" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], nil); - STAssertNil([@"" gtm_firstSubStringMatchedByPattern:@"(foo)(.*)(bar)"], nil); -} - -- (void)testSubStringMatchesPattern { - // simple pattern - STAssertTrue([@"foobar" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - STAssertTrue([@"foobydoo spambar" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - STAssertTrue([@"zzfoobarzz" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - STAssertTrue([@"zzfoobydoo spambarzz" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"abcdef" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - STAssertFalse([@"" gtm_subStringMatchesPattern:@"foo.*bar"], nil); - // pattern w/ sub patterns - STAssertTrue([@"foobar" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertTrue([@"foobydoo spambar" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertTrue([@"zzfoobarzz" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertTrue([@"zzfoobydoo spambarzz" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"abcdef" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); - STAssertFalse([@"" gtm_subStringMatchesPattern:@"(foo)(.*)(bar)"], nil); -} - -- (void)testSegmentEnumeratorForPattern { - NSEnumerator *enumerator = - [@"afoobarbfooobaarfoobarzz" gtm_segmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - // "a" - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"a", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "b" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"b", nil); - // "fooobaar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"fooobaar", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "zz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"zz", nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test no match - enumerator = [@"aaa" gtm_segmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"aaa", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test only match - enumerator = [@"foobar" gtm_segmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // now test the saved sub segments - enumerator = - [@"foobarxxfoobaz" gtm_segmentEnumeratorForPattern:@"(foo)((bar)|(baz))"]; - STAssertNotNil(enumerator, nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"bar", nil); - STAssertEqualStrings([seg subPatternString:3], @"bar", nil); - STAssertNil([seg subPatternString:4], nil); // nothing matched "(baz)" - STAssertNil([seg subPatternString:5], nil); - // "xx" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertFalse([seg isMatch], nil); - STAssertEqualStrings([seg string], @"xx", nil); - STAssertEqualStrings([seg subPatternString:0], @"xx", nil); - STAssertNil([seg subPatternString:1], nil); - // "foobaz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"baz", nil); - STAssertNil([seg subPatternString:3], nil); // (nothing matched "(bar)" - STAssertEqualStrings([seg subPatternString:4], @"baz", nil); - STAssertNil([seg subPatternString:5], nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test all objects - enumerator = [@"afoobarbfooobaarfoobarzz" gtm_segmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - NSArray *allSegments = [enumerator allObjects]; - STAssertNotNil(allSegments, nil); - STAssertEquals((NSUInteger)6, [allSegments count], nil); -} - -- (void)testMatchSegmentEnumeratorForPattern { - NSEnumerator *enumerator = - [@"afoobarbfooobaarfoobarzz" gtm_matchSegmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - // "a" - skipped - // "foobar" - GTMRegexStringSegment *seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "b" - skipped - // "fooobaar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"fooobaar", nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - // "zz" - skipped - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test no match - enumerator = [@"aaa" gtm_matchSegmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test only match - enumerator = [@"foobar" gtm_matchSegmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // now test the saved sub segments - enumerator = - [@"foobarxxfoobaz" gtm_matchSegmentEnumeratorForPattern:@"(foo)((bar)|(baz))"]; - STAssertNotNil(enumerator, nil); - // "foobar" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobar", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"bar", nil); - STAssertEqualStrings([seg subPatternString:3], @"bar", nil); - STAssertNil([seg subPatternString:4], nil); // nothing matched "(baz)" - STAssertNil([seg subPatternString:5], nil); - // "xx" - skipped - // "foobaz" - seg = [enumerator nextObject]; - STAssertNotNil(seg, nil); - STAssertTrue([seg isMatch], nil); - STAssertEqualStrings([seg string], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:0], @"foobaz", nil); - STAssertEqualStrings([seg subPatternString:1], @"foo", nil); - STAssertEqualStrings([seg subPatternString:2], @"baz", nil); - STAssertNil([seg subPatternString:3], nil); // (nothing matched "(bar)" - STAssertEqualStrings([seg subPatternString:4], @"baz", nil); - STAssertNil([seg subPatternString:5], nil); - // (end) - seg = [enumerator nextObject]; - STAssertNil(seg, nil); - - // test all objects - enumerator = [@"afoobarbfooobaarfoobarzz" gtm_matchSegmentEnumeratorForPattern:@"foo+ba+r"]; - STAssertNotNil(enumerator, nil); - NSArray *allSegments = [enumerator allObjects]; - STAssertNotNil(allSegments, nil); - STAssertEquals((NSUInteger)3, [allSegments count], nil); -} - -- (void)testAllSubstringsMatchedByPattern { - NSArray *segments = - [@"afoobarbfooobaarfoobarzz" gtm_allSubstringsMatchedByPattern:@"foo+ba+r"]; - STAssertNotNil(segments, nil); - STAssertEquals((NSUInteger)3, [segments count], nil); - STAssertEqualStrings([segments objectAtIndex:0], @"foobar", nil); - STAssertEqualStrings([segments objectAtIndex:1], @"fooobaar", nil); - STAssertEqualStrings([segments objectAtIndex:2], @"foobar", nil); - - // test no match - segments = [@"aaa" gtm_allSubstringsMatchedByPattern:@"foo+ba+r"]; - STAssertNotNil(segments, nil); - STAssertEquals((NSUInteger)0, [segments count], nil); - - // test only match - segments = [@"foobar" gtm_allSubstringsMatchedByPattern:@"foo+ba+r"]; - STAssertNotNil(segments, nil); - STAssertEquals((NSUInteger)1, [segments count], nil); - STAssertEqualStrings([segments objectAtIndex:0], @"foobar", nil); -} - -- (void)testStringByReplacingMatchesOfPatternWithReplacement { - // the basics - STAssertEqualStrings(@"weeZbarZbydoo spamZfooZdoggies", - [@"weefoobydoo spambardoggies" gtm_stringByReplacingMatchesOfPattern:@"(foo)(.*)(bar)" - withReplacement:@"Z\\3Z\\2Z\\1Z"], - nil); - // nil/empty replacement - STAssertEqualStrings(@"weedoggies", - [@"weefoobydoo spambardoggies" gtm_stringByReplacingMatchesOfPattern:@"(foo)(.*)(bar)" - withReplacement:nil], - nil); - STAssertEqualStrings(@"weedoggies", - [@"weefoobydoo spambardoggies" gtm_stringByReplacingMatchesOfPattern:@"(foo)(.*)(bar)" - withReplacement:@""], - nil); - STAssertEqualStrings(@"", - [@"" gtm_stringByReplacingMatchesOfPattern:@"(foo)(.*)(bar)" - withReplacement:@"abc"], - nil); - // use optional and invale subexpression parts to confirm that works - STAssertEqualStrings(@"aaa baz bar bar foo baz aaa", - [@"aaa foooooobaz fooobar bar foo baz aaa" gtm_stringByReplacingMatchesOfPattern:@"(fo(o+))((bar)|(baz))" - withReplacement:@"\\4\\5"], - nil); - STAssertEqualStrings(@"aaa ZZZ ZZZ bar foo baz aaa", - [@"aaa foooooobaz fooobar bar foo baz aaa" gtm_stringByReplacingMatchesOfPattern:@"(fo(o+))((bar)|(baz))" - withReplacement:@"Z\\10Z\\12Z"], - nil); - // test slashes in replacement that aren't part of the subpattern reference - STAssertEqualStrings(@"z\\\\0 \\\\a \\\\\\\\0z", - [@"zaz" gtm_stringByReplacingMatchesOfPattern:@"a+" - withReplacement:@"\\\\0 \\\\\\0 \\\\\\\\0"], - nil); - STAssertEqualStrings(@"z\\\\a \\\\\\\\0 \\\\\\\\az", - [@"zaz" gtm_stringByReplacingMatchesOfPattern:@"a+" - withReplacement:@"\\\\\\0 \\\\\\\\0 \\\\\\\\\\0"], - nil); - STAssertEqualStrings(@"z\\\\\\\\0 \\\\\\\\a \\\\\\\\\\\\0z", - [@"zaz" gtm_stringByReplacingMatchesOfPattern:@"a+" - withReplacement:@"\\\\\\\\0 \\\\\\\\\\0 \\\\\\\\\\\\0"], - nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.h deleted file mode 100644 index 0697d5aa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.h +++ /dev/null @@ -1,713 +0,0 @@ -// -// GTMSQLite.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// -// -// This class is a convenience wrapper for SQLite storage with -// release/retain semantics. In its most basic form, that is all this -// class offers. You have the option of activating "CFAdditions" on -// init which patches or overrides the following SQLite functionality: -// -// - Strings you pass through the API layer will always be converted -// to precomposed UTF-8 with compatibility mapping -// (kCFStringNormalizationFormKC). This is done in an attempt to -// make SQLite correctly handle string equality for composed -// character sequences. This change applies only to -// NSStrings/CFStrings passed through the GTMSQLiteDatabase or -// GTMSQLiteStatement. Direct access to the database using the -// underlying sqlite3_* handles is not affected. -// -// - The SQL UPPER/LOWER functions are replaced with CFString-based -// implementations which (unlike SQLite's native implementation) -// handle case conversion outside the ASCII range. These -// implementations seem to be 20-30% slower than the SQLite -// implementations but may be worth it for accuracy. -// -// - The SQLite "NOCASE" collation is replaced with a CFString-based -// collation that is case insensitive but still uses literal -// comparison (composition-sensitive). -// -// - Additional collation sequences can be created by using these keywords -// separated by underscores. Each option corresponds to a CFStringCompareFlags -// option. -// NOCASE (kCFCompareCaseInsensitive) -// NONLITERAL (kCFCompareNonliteral) -// LOCALIZED (kCFCompareLocalized) -// NUMERIC (kCFCompareNumerically) - -// These additional options are available when linking with the 10.5 SDK: -// NODIACRITIC (kCFCompareDiacriticInsensitive) -// WIDTHINSENSITIVE (kCFCompareWidthInsensitive) -// -// Ordering of the above options can be changed by adding "REVERSE". -// -// Thus, for a case-insensitive, width-insensitive, composition-insensitive -// comparison that ignores diacritical marks and sorts in reverse use: -// -// NOCASE_NONLITERAL_NODIACRITIC_WIDTHINSENSITIVE_REVERSE -// -// - SQL LIKE and GLOB commands are implemented with CFString/CFCharacterSet -// comparisons. As with the other CF additions, this gives us better handling -// of case and composed character sequences. However, whereever reasonable, -// SQLite semantics have been retained. Specific notes: -// -// * LIKE is case insensitive and uses non-literal comparison -// (kCFCompareNonliteral) by default. It is possible to modify this -// behavior using the accessor methods. You must use those methods -// instead of the SQLite "PRAGMA case_sensitive_like" in order for them -// to interact properly with our CFString implementations. -// -// * ESCAPE clauses to LIKE are honored, but the escape character must -// be expressable as a single UniChar (UTF16). The escaped characters in -// LIKE only escape the following UniChar, not a composed character -// sequence. This is not viewed as a limitation since the use of ESCAPE -// is typically only for characters with meaning to SQL LIKE ('%', '_') -// all of which can be expressed as a single UniChar. -// -// * GLOB is by default case sensitive but non-literal. Again, accessor -// methods are available to change this behavior. -// -// * Single character pattern matches ('_' for LIKE, '?' for GLOB) will -// always consume a full composed character sequence. -// -// * As with the standard SQLite implementation, character set comparisons -// are only available for GLOB. -// -// * Character set comparisons are always literal and case sensitive and do -// not take into account composed character sequences. Essentially -// character sets should always be expressed as a set of single UniChars -// or ranges between single UniChars. -// - -// SQLite is preinstalled on 10.4 only. As long as we're using the OS version -// of the library, limit ourself to Tiger+ -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 -#error SQLite support is Tiger or later -#endif - -#import -#import - -/// Wrapper for SQLite with release/retain semantics and CFString convenience features -@interface GTMSQLiteDatabase : NSObject { - @protected - sqlite3 *db_; // strong - NSString *path_; // strong - int timeoutMS_; - BOOL hasCFAdditions_; - CFOptionFlags likeOptions_; - CFOptionFlags globOptions_; - NSMutableArray *userArgDataPool_; // strong -} - -// Get the numeric version number of the SQLite library (compiled in value -// for SQLITE_VERSION_NUMBER). -// -// Returns: -// Integer version number -// -+ (int)sqliteVersionNumber; - -// Get the string version number of the SQLite library. -// -// Returns: -// Autoreleased NSString version string -// -+ (NSString *)sqliteVersionString; - -// Create and open a database instance on a file-based database. -// -// Args: -// path: Path to the database. If it does not exist an empty database -// will be created. -// withCFAdditions: If true, the SQLite database will include CFString -// based string functions and collation sequences. See -// the class header for information on these differences -// and performance impact. -// err: Result code from SQLite. If nil is returned by this function -// check the result code for the error. If NULL no result code is -// reported. -// -- (id)initWithPath:(NSString *)path - withCFAdditions:(BOOL)additions - utf8:(BOOL)useUTF8 - errorCode:(int *)err; - -// Create and open a memory-based database. Memory-based databases -// cannot be shared amongst threads, and each instance is unique. See -// SQLite documentation for details. -// -// For argument details see [... initWithPath:withCFAdditions:errorCode:] -// -- (id)initInMemoryWithCFAdditions:(BOOL)additions - utf8:(BOOL)useUTF8 - errorCode:(int *)err; - -// Get the underlying SQLite database handle. In general you should -// never do this, if you do use this be careful with how you compose -// and decompse strings you pass to the database. -// -// Returns: -// sqlite3 pointer -// -- (sqlite3 *)sqlite3DB; - -// Enable/Disable the database synchronous mode. Disabling -// synchronous mode results in much faster insert throughput at the -// cost of safety. See the SQlite documentation for details. -// -// Args: -// enable: Boolean flag to determine mode. -// -- (void)synchronousMode:(BOOL)enable; - -// Check if this database instance has our CFString functions and collation -// sequences (see top of file for details). -// -// Returns: -// YES if the GTMSQLiteDatabase instance has our CF additions -// -- (BOOL)hasCFAdditions; - -// Set comparison options for the "LIKE" operator for databases with -// our CF addtions active. -// -// Args: -// options: CFStringCompareFlags value. Note that a limited list -// of options are supported. For example one cannot -// use kCFCompareBackwards as an option. -// -- (void)setLikeComparisonOptions:(CFOptionFlags)options; - -// Get current comparison options for the "LIKE" operator in a database -// with our CF additions active. -// -// Returns: -// Current comparison options or zero if CF additions are inactive. -// -- (CFOptionFlags)likeComparisonOptions; - -// Set comparison options for the "GLOB" operator for databases with -// our CF addtions active. -// -// Args: -// options: CFStringCompareFlags value. Note that a limited list -// of options are supported. For example one cannot -// use kCFCompareBackwards as an option. -// -- (void)setGlobComparisonOptions:(CFOptionFlags)options; - -// Get current comparison options for the "GLOB" operator in a database -// with our CF additions active. -// -// Returns: -// Current comparison options or zero if CF additions are inactive. -// -- (CFOptionFlags)globComparisonOptions; - -// Obtain the last error code from the database -// -// Returns: -// SQLite error code, if no error is pending returns SQLITE_OK -// -- (int)lastErrorCode; - -// Obtain an error string for the last error from the database -// -// Returns: -// Autoreleased NSString error message -// -- (NSString *)lastErrorString; - -// Obtain a count of rows added, mmodified or deleted by the most recent -// statement. See sqlite3_changes() for details and limitations. -// -// Returns: -// Row count -// -- (int)lastChangeCount; - -// Obtain a count of rows added, mmodified or deleted since the database -// was opened. See sqlite3_total_changes() for details and limitations. -// -// Returns: -// Row count -// -- (int)totalChangeCount; - -// Obtain the last insert row ID -// -// Returns: -// 64-bit row ID -// -- (unsigned long long)lastInsertRowID; - -// Interrupt any currently running database operations as soon as possible. -// Running operations will receive a SQLITE_INTERRUPT and will need to -// handle it correctly (this is the callers problem to deal with). -// -- (void)interrupt; - -// Set the timeout value in milliseconds. This is a database global affecting -// all running and future statements. -// -// Args: -// timeoutMS: Integer count in ms SQLite will wait for the database to -// unlock before giving up and returning SQLITE_BUSY. A value -// of 0 or less means the database always returns immediately. -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)setBusyTimeoutMS:(int)timeoutMS; - -// Get the current busy timeout in milliseconds. -// -// Returns: -// Current database busy timeout value in ms, 0 or less means no timeout. -// -- (int)busyTimeoutMS; - -// Execute a string containing one or more SQL statements. No returned data -// is available, use GTMSQLiteStatement for that usage. -// -// Args: -// sql: Raw SQL statement to prepare. It is the caller's responsibility -// to properly escape the SQL. -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)executeSQL:(NSString *)sql; - -// Convenience method to start a deferred transaction (most common case). -// -// Returns: -// YES if the transaction started successfully -// -- (BOOL)beginDeferredTransaction; - -// Convenience method to roll back a transaction. -// -// Returns: -// YES if the transaction rolled back successfully -// -- (BOOL)rollback; - -// Convenience method to commit a transaction. -// -// Returns: -// YES if the transaction committed successfully -// -- (BOOL)commit; - -@end - -// Wrapper class for SQLite statements with retain/release semantics. -// Attempts to behave like an NSEnumerator, however you should bind -// your values before beginning enumeration and unlike NSEnumerator, -// a reset is supported. -// -// The GTMSQLiteDatabase class has options to modify some SQL -// functions and force particular string representations. This class -// honors the database preferences for those options. See the -// GTMSQLiteDatabase header for details. - -/// Wrapper class for SQLite statements with retain/release -/// semantics. -@interface GTMSQLiteStatement : NSObject { - -@protected - sqlite3_stmt *statement_; - BOOL hasCFAdditions_; -} - -#pragma mark Creation, Access and Finalization - -// Create an autoreleased prepared statement, see initWithSQL: for arguments. -// -// NOTE: Even though this object is autoreleased you MUST call -// [finalizeStatement] on this when your done. See the init for explanation. -// -// Returns: -// Autoreleased GTMSQLiteStatement -// -+ (id)statementWithSQL:(NSString *)sql - inDatabase:(GTMSQLiteDatabase *)gtmdb - errorCode:(int *)err; - -// Designated initializer, create a prepared statement. Positional and named -// parameters are supported, see the SQLite documentation. -// -// NOTE: Although this object will clean up its statement when deallocated, -// you are REQUIRED to "finalize" the statement when you are -// through with it. Failing to do this will prevent the database from allowing -// new transactions or queries. In other words, leaving an instance on the -// autorelease pool unfinalized may interfere with other database usage if any -// caller sharing the database uses transactions. -// -// Args: -// sql: Raw SQL statement to prepare. It is the caller's responsibility -// to properly escape the SQL and make sure that the SQL contains -// only _one_ statement. Additional statements are silently ignored. -// db: The GTMSQLiteDatabase (not retained) -// err: Result code from SQLite. If nil is returned by this function -// check the result code for the error. If NULL no result code is -// reported. -// -- (id)initWithSQL:(NSString *)sql - inDatabase:(GTMSQLiteDatabase *)gtmdb - errorCode:(int *)err; - -// Get the underlying SQLite statement handle. In general you should never -// do this, if you do use this be careful with how you compose and -// decompse strings you pass to the database. -// -// Returns: -// sqlite3_stmt pointer -// -- (sqlite3_stmt *)sqlite3Statement; - -// Finalize the statement, allowing other transactions to start on the database -// This method MUST be called when you are done with a statement. Failure to -// do so means that the database will not be torn down properly when it's -// retain count drops to 0 or GC collects it. -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)finalizeStatement; - -#pragma mark Parameters and Binding - -// Get the number of parameters that can be bound in the prepared statement. -// -// Returns: -// Integer count of parameters or -1 on error -// -- (int)parameterCount; - -// Get the position of a parameter with a given name. -// -// Args: -// paramName: String name of the parameter, including any leading punctuation -// (see SQLite docs) -// -// Returns: -// 1-based parameter position index or -1 on error -// -- (int)positionOfParameterNamed:(NSString *)paramName; - -// Get the name of a parameter at a particular index. -// -// Args: -// position: Parameter position (1-based index) -// -// Returns: -// Autoreleased string name of the parameter, including any leading -// punctuation (see SQLite docs) or nil on error. -// -- (NSString *)nameOfParameterAtPosition:(int)position; - -// Bind a NULL at a given position -// -// Args: -// position: Parameter position (1-based index) -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindSQLNullAtPosition:(int)position; - -// Bind a blob parameter at a given position index to a raw pointer and -// length. The data will be copied by SQLite -// -// Args: -// position: Parameter position (1-based index) -// bytes: Raw pointer to the data to copy/bind -// length: Number of bytes in the blob -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindBlobAtPosition:(int)position bytes:(void *)bytes length:(int)length; - -// Bind an NSData as a blob at a given position. The data will be copied -// by SQLite. -// -// Args: -// position: Parameter position (1-based index) -// data: NSData to convert to blob -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindBlobAtPosition:(int)position data:(NSData *)data; - -// Bind a double at the given position (for floats convert to double). -// -// Args: -// position: Parameter position (1-based index) -// value: Double to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindDoubleAtPosition:(int)position value:(double)value; - -// Bind an NSNumber as a double value at the given position. -// -// Args: -// position: Parameter position (1-based index) -// number: NSNumber to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindNumberAsDoubleAtPosition:(int)position number:(NSNumber *)number; - -// Bind a 32-bit integer at the given position. -// -// Args: -// position: Parameter position (1-based index) -// value: Integer to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindInt32AtPosition:(int)position value:(int)value; - -// Bind an NSNumber as a 32-bit integer value at the given position. -// -// Args: -// position: Parameter position (1-based index) -// number: NSNumber to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindNumberAsInt32AtPosition:(int)position number:(NSNumber *)number; - -// Bind a 64-bit integer at the given position. -// -// Args: -// position: Parameter position (1-based index) -// value: Int64 value to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindLongLongAtPosition:(int)position value:(long long)value; - -// Bind an NSNumber as a 64-bit integer value at the given position. -// -// Args: -// position: Parameter position (1-based index) -// number: NSNumber to bind -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindNumberAsLongLongAtPosition:(int)position number:(NSNumber *)number; - -// Bind a string at the given position. -// -// Args: -// position: Parameter position (1-based index) -// string: String to bind (string will be converted to UTF8 and copied). -// NOTE: For bindings it is not necessary for you to SQL escape -// your strings. -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)bindStringAtPosition:(int)position string:(NSString *)string; - -#pragma mark Results - -// Get the number of result columns per row this statement will generate. -// -// Returns: -// Column count, 0 if no columns will be returned ("UPDATE.." etc.), -// -1 on error. -// -- (int)resultColumnCount; - -// Get the name of result colument at a given index. -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Autoreleased NSString column name or nil if no column exists at that -// position or error. -// -- (NSString *)resultColumnNameAtPosition:(int)position; - -// Get the number of data values in the current row of this statement. -// Generally this will be the same as resultColumnCount:, except when row -// iteration is done (see SQLite docs for sqlite3_data_count()). -// -// Returns: -// Data count or 0 if no data will be returned, -1 on error. -// -- (int)rowDataCount; - -// Get the SQLite type constant for a column in a row. Note that because -// SQLite does not enforce column type restrictions the type of a particular -// column in a row may not match the declared type of the column. -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// SQLite data type constant (i.e. SQLITE_INTEGER, SQLITE_FLOAT, etc.) or -// -1 on error. -// -- (int)resultColumnTypeAtPosition:(int)position; - -// Get the data for a result row blob column as an NSData -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Autoreleased NSData, nil on error -// -- (NSData *)resultBlobDataAtPosition:(int)position; - -// Get the data for a result row blob column as a double -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Double value -// -- (double)resultDoubleAtPosition:(int)position; - -// Get the data for a result row blob column as an integer -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Integer value -// -- (int)resultInt32AtPosition:(int)position; - -// Get the data for a result row blob column as a long long -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Long long value -// -- (long long)resultLongLongAtPosition:(int)position; - -// Get the data for a result row blob column as an NSNumber -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Autoreleased NSNumber value or nil on error -// -- (NSNumber *)resultNumberAtPosition:(int)position; - -// Get the data for a result row blob column as an NSString -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Autoreleased NSString value or nil on error -// -- (NSString *)resultStringAtPosition:(int)position; - -// Get a Foundation object (NSData, NSNumber, NSString, NSNull) for the column, -// autodetecting the most appropriate representation. -// -// Args: -// position: Column position (0-based index) -// -// Returns: -// Autoreleased Foundation type, nil on error -// -- (id)resultFoundationObjectAtPosition:(int)position; - -// Get an array of Foundation objects for the row in query column order. -// -// Returns: -// Autoreleased array of Foundation types or nil if there is no -// data in the row or error -// -- (NSArray *)resultRowArray; - -// Get a dictionary of Foundation objects for the row keyed by column name. -// -// Returns: -// Autoreleased dictionary of Foundation types or nil if there is no -// data in the row or error. -// -- (NSDictionary *)resultRowDictionary; - -#pragma mark Rows - -// Step the statement forward one row, potentially spinning forever till -// the row can be located (if database is SQLITE_BUSY). -// -// Returns: -// SQLite result code, SQLITE_ROW if a row was found or SQLITE_DONE if -// no further rows match the statement. -// -- (int)stepRow; - -// Step the statement forward one row, waiting at most the currrent database -// busy timeout (see [GTMSQLiteDatabase setBusyTimeoutMS]). -// -// Returns: -// SQLite result code, SQLITE_ROW if a row was found or SQLITE_DONE if -// no further rows match the statement. If SQLITE_BUSY is returned the -// database did not unlock during the timeout. -// -- (int)stepRowWithTimeout; - -// Reset the statement starting again at the first row -// -// Returns: -// SQLite result code, SQLITE_OK on no error -// -- (int)reset; - -// Check if the SQLite parser recognizes the receiver as one or more valid -// SQLite statements. -// -// Returns: -// YES if the string is a complete and valid SQLite statement -// -+ (BOOL)isCompleteStatement:(NSString *)string; - -// Quote and escape the receiver for SQL. -// Example: "This is wild! It's fun!" -// Becomes: "'This is wild! It''s fun!'" -// -// Returns: -// Autoreleased NSString -+ (NSString *)quoteAndEscapeString:(NSString *)string; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.m deleted file mode 100644 index 0225ff54..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLite.m +++ /dev/null @@ -1,2012 +0,0 @@ -// -// GTMSQLite.m -// -// Convenience wrapper for SQLite storage see the header for details. -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#import -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -#import -#endif -#import "GTMSQLite.h" -#import "GTMMethodCheck.h" -#import "GTMDefines.h" -#include -#import "GTMGarbageCollection.h" - -typedef struct { - BOOL upperCase; - int textRep; -} UpperLowerUserArgs; - -typedef struct { - BOOL reverse; - CFOptionFlags compareOptions; - int textRep; -} CollateUserArgs; - -typedef struct { - CFOptionFlags *compareOptionPtr; - int textRep; -} LikeGlobUserArgs; - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -// While we want to be compatible with Tiger, some operations are more -// efficient when implemented with Leopard APIs. We look those up dynamically. -// CFStringCreateWithBytesNoCopy -static const char* const kCFStringCreateWithBytesNoCopySymbolName = - "CFStringCreateWithBytesNoCopy"; - -typedef CFStringRef (*CFStringCreateWithBytesNoCopyPtrType)(CFAllocatorRef, - const UInt8 *, - CFIndex, - CFStringEncoding, - Boolean, - CFAllocatorRef); -static CFStringCreateWithBytesNoCopyPtrType gCFStringCreateWithBytesNoCopySymbol = NULL; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -// Helper inline for SQLite text type to CF endcoding -GTM_INLINE CFStringEncoding SqliteTextEncodingToCFStringEncoding(int enc) { - // Default should never happen, but assume UTF 8 - CFStringEncoding encoding = kCFStringEncodingUTF8; - _GTMDevAssert(enc == SQLITE_UTF16BE || - enc == SQLITE_UTF16LE, - @"Passed in encoding was not a UTF16 encoding"); - switch(enc) { - case SQLITE_UTF16BE: - encoding = kCFStringEncodingUTF16BE; - break; - case SQLITE_UTF16LE: - encoding = kCFStringEncodingUTF16LE; - break; - } - return encoding; -} - -// Helper inline for filtering CFStringCompareFlags -GTM_INLINE CFOptionFlags FilteredStringCompareFlags(CFOptionFlags inOptions) { - CFOptionFlags outOptions = 0; - if (inOptions & kCFCompareCaseInsensitive) { - outOptions |= kCFCompareCaseInsensitive; - } - if (inOptions & kCFCompareNonliteral) outOptions |= kCFCompareNonliteral; - if (inOptions & kCFCompareLocalized) outOptions |= kCFCompareLocalized; - if (inOptions & kCFCompareNumerically) outOptions |= kCFCompareNumerically; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - if (inOptions & kCFCompareDiacriticInsensitive) { - outOptions |= kCFCompareDiacriticInsensitive; - } - if (inOptions & kCFCompareWidthInsensitive) { - outOptions |= kCFCompareWidthInsensitive; - } -#endif - return outOptions; -} - -// Function prototypes for our custom implementations of UPPER/LOWER using -// CFString so that we handle Unicode and localization more cleanly than -// native SQLite. -static void UpperLower8(sqlite3_context *context, - int argc, - sqlite3_value **argv); -static void UpperLower16(sqlite3_context *context, - int argc, - sqlite3_value **argv); - -// Function prototypes for CFString-based collation sequences -static void CollateNeeded(void *userContext, sqlite3 *db, - int textRep, const char *name); -static int Collate8(void *userContext, int length1, const void *str1, - int length2, const void *str2); -static int Collate16(void *userContext, int length1, const void *str1, - int length2, const void *str2); - -// Function prototypes for CFString LIKE and GLOB -static void Like8(sqlite3_context *context, int argc, sqlite3_value **argv); -static void Like16(sqlite3_context *context, int argc, sqlite3_value **argv); -static void Glob8(sqlite3_context *context, int argc, sqlite3_value **argv); -static void Glob16(sqlite3_context *context, int argc, sqlite3_value **argv); - -// The CFLocale of the current user at process start -static CFLocaleRef gCurrentLocale = NULL; - -// Private methods -@interface GTMSQLiteDatabase (PrivateMethods) - -- (int)installCFAdditions; -- (void)collationArgumentRetain:(NSData *)collationArgs; -// Convenience method to clean up resources. Called from both -// dealloc & finalize -// -- (void)cleanupDB; -@end - -@implementation GTMSQLiteDatabase - -+ (void)initialize { - // Need the locale for some CFString enhancements - gCurrentLocale = CFLocaleCopyCurrent(); - -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - // Compiling pre-Leopard try to find some symbols dynamically - gCFStringCreateWithBytesNoCopySymbol = - (CFStringCreateWithBytesNoCopyPtrType)dlsym( - RTLD_DEFAULT, - kCFStringCreateWithBytesNoCopySymbolName); -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -} - -+ (int)sqliteVersionNumber { - return sqlite3_libversion_number(); -} - -+ (NSString *)sqliteVersionString { - return [NSString stringWithUTF8String:sqlite3_libversion()]; -} - -- (id)initWithPath:(NSString *)path - withCFAdditions:(BOOL)additions - utf8:(BOOL)useUTF8 - errorCode:(int *)err { - int rc = SQLITE_INTERNAL; - - if ((self = [super init])) { - path_ = [path copy]; - if (useUTF8) { - rc = sqlite3_open([path_ fileSystemRepresentation], &db_); - } else { - CFStringEncoding cfEncoding; -#if TARGET_RT_BIG_ENDIAN - cfEncoding = kCFStringEncodingUTF16BE; -#else - cfEncoding = kCFStringEncodingUTF16LE; -#endif - NSStringEncoding nsEncoding - = CFStringConvertEncodingToNSStringEncoding(cfEncoding); - NSData *data = [path dataUsingEncoding:nsEncoding]; - // Using -[NSString cStringUsingEncoding] causes sqlite3_open16 - // to fail because it expects 2 null-terminating bytes and - // cStringUsingEncoding only has 1 - NSMutableData *mutable = [NSMutableData dataWithData:data]; - [mutable increaseLengthBy:2]; - rc = sqlite3_open16([mutable bytes], &db_); - } - - if ((rc == SQLITE_OK) && db_) { - if (additions) { - userArgDataPool_ = [[NSMutableArray array] retain]; - if (!userArgDataPool_) { - // Leave *err as internal err - // COV_NF_START - not sure how to fail Cocoa initializers - [self release]; - return nil; - // COV_NF_END - } - rc = [self installCFAdditions]; - } - } - - if (err) *err = rc; - - if (rc != SQLITE_OK) { - // COV_NF_START - [self release]; - self = nil; - // COV_NF_END - } - } - - return self; -} - -- (id)initInMemoryWithCFAdditions:(BOOL)additions - utf8:(BOOL)useUTF8 - errorCode:(int *)err { - return [self initWithPath:@":memory:" - withCFAdditions:additions - utf8:useUTF8 - errorCode:err]; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - [self cleanupDB]; - [super finalize]; -} -#endif - -- (void)dealloc { - [self cleanupDB]; - [super dealloc]; -} - -- (void)cleanupDB { - if (db_) { - int rc = sqlite3_close(db_); - if (rc != SQLITE_OK) { - _GTMDevLog(@"Unable to close \"%@\", error code: %d\r" - @"Did you forget to call -[GTMSQLiteStatement" - @" finalizeStatement] on one of your statements?", - self, rc); - } - } - [path_ release]; - [userArgDataPool_ release]; -} - -// Private method to install our custom CoreFoundation additions to SQLite -// behavior -- (int)installCFAdditions { - int rc = SQLITE_OK; - // Install our custom functions for improved text handling - // UPPER/LOWER - const struct { - const char *sqlName; - UpperLowerUserArgs userArgs; - void *function; - } customUpperLower[] = { - { "upper", { YES, SQLITE_UTF8 }, &UpperLower8 }, - { "upper", { YES, SQLITE_UTF16 }, &UpperLower16 }, - { "upper", { YES, SQLITE_UTF16BE }, &UpperLower16 }, - { "upper", { YES, SQLITE_UTF16LE }, &UpperLower16 }, - { "lower", { NO, SQLITE_UTF8 }, &UpperLower8 }, - { "lower", { NO, SQLITE_UTF16 }, &UpperLower16 }, - { "lower", { NO, SQLITE_UTF16BE }, &UpperLower16 }, - { "lower", { NO, SQLITE_UTF16LE }, &UpperLower16 }, - }; - - for (size_t i = 0; - i < (sizeof(customUpperLower) / sizeof(customUpperLower[0])); - i++) { - rc = sqlite3_create_function(db_, - customUpperLower[i].sqlName, - 1, - customUpperLower[i].userArgs.textRep, - (void *)&customUpperLower[i].userArgs, - customUpperLower[i].function, - NULL, - NULL); - if (rc != SQLITE_OK) - return rc; // COV_NF_LINE because sqlite3_create_function is - // called with input defined at compile-time - } - - // Fixed collation sequences - const struct { - const char *sqlName; - CollateUserArgs userArgs; - void *function; - } customCollationSequence[] = { - { "nocase", { NO, kCFCompareCaseInsensitive, SQLITE_UTF8 }, &Collate8 }, - { "nocase", { NO, kCFCompareCaseInsensitive, SQLITE_UTF16 }, &Collate16 }, - { "nocase", { NO, kCFCompareCaseInsensitive, SQLITE_UTF16BE }, &Collate16 }, - { "nocase", { NO, kCFCompareCaseInsensitive, SQLITE_UTF16LE }, &Collate16 }, - }; - - for (size_t i = 0; - i < (sizeof(customCollationSequence) / sizeof(customCollationSequence[0])); - i++) { - rc = sqlite3_create_collation(db_, - customCollationSequence[i].sqlName, - customCollationSequence[i].userArgs.textRep, - (void *)&customCollationSequence[i].userArgs, - customCollationSequence[i].function); - if (rc != SQLITE_OK) - return rc; // COV_NF_LINE because the input to - // sqlite3_create_collation is set at compile time - } - - // Install handler for dynamic collation sequences - const struct { - const char *sqlName; - int numArgs; - int textRep; - void *function; - } customLike[] = { - { "like", 2, SQLITE_UTF8, &Like8 }, - { "like", 2, SQLITE_UTF16, &Like16 }, - { "like", 2, SQLITE_UTF16BE, &Like16 }, - { "like", 2, SQLITE_UTF16LE, &Like16 }, - { "like", 3, SQLITE_UTF8, &Like8 }, - { "like", 3, SQLITE_UTF16, &Like16 }, - { "like", 3, SQLITE_UTF16BE, &Like16 }, - { "like", 3, SQLITE_UTF16LE, &Like16 }, - }; - - rc = sqlite3_collation_needed(db_, self, &CollateNeeded); - if (rc != SQLITE_OK) - return rc; // COV_NF_LINE because input to - // sqlite3_collation_needed is static - - // Start LIKE as case-insensitive and non-literal - // (sqlite defaults LIKE to case-insensitive) - likeOptions_ = kCFCompareCaseInsensitive | kCFCompareNonliteral; - for (size_t i = 0; i < (sizeof(customLike) / sizeof(customLike[0])); i++) { - // Each implementation gets its own user args - NSMutableData *argsData - = [NSMutableData dataWithLength:sizeof(LikeGlobUserArgs)]; - if (!argsData) return SQLITE_INTERNAL; - [userArgDataPool_ addObject:argsData]; - LikeGlobUserArgs *args = (LikeGlobUserArgs *)[argsData bytes]; - args->compareOptionPtr = &likeOptions_; - args->textRep = customLike[i].textRep; - rc = sqlite3_create_function(db_, - customLike[i].sqlName, - customLike[i].numArgs, - customLike[i].textRep, - args, - customLike[i].function, - NULL, - NULL); - if (rc != SQLITE_OK) - return rc; // COV_NF_LINE because input to - // sqlite3_create_function is static - } - - // Start GLOB just non-literal but case-sensitive (same as SQLite defaults) - const struct { - const char *sqlName; - int textRep; - void *function; - } customGlob[] = { - { "glob", SQLITE_UTF8, &Glob8 }, - { "glob", SQLITE_UTF16, &Glob16 }, - { "glob", SQLITE_UTF16BE, &Glob16 }, - { "glob", SQLITE_UTF16LE, &Glob16 }, - }; - - globOptions_ = kCFCompareNonliteral; - for (size_t i = 0; i < (sizeof(customGlob) / sizeof(customGlob[0])); i++) { - // Each implementation gets its own user args - NSMutableData *argsData - = [NSMutableData dataWithLength:sizeof(LikeGlobUserArgs)]; - if (!argsData) return SQLITE_INTERNAL; - [userArgDataPool_ addObject:argsData]; - LikeGlobUserArgs *args = (LikeGlobUserArgs *)[argsData bytes]; - args->compareOptionPtr = &globOptions_; - args->textRep = customGlob[i].textRep; - rc = sqlite3_create_function(db_, - customGlob[i].sqlName, - 2, - customGlob[i].textRep, - args, - customGlob[i].function, - NULL, - NULL); - if (rc != SQLITE_OK) - return rc; // COV_NF_LINE because input to - // sqlite3_create_function is static - } - - hasCFAdditions_ = YES; - return SQLITE_OK; -} - -// Private method used by collation creation callback -- (void)collationArgumentRetain:(NSData *)collationArgs { - [userArgDataPool_ addObject:collationArgs]; -} - -- (sqlite3 *)sqlite3DB { - return db_; -} - -- (void)synchronousMode:(BOOL)enable { - if (enable) { - [self executeSQL:@"PRAGMA synchronous = NORMAL;"]; - [self executeSQL:@"PRAGMA fullfsync = 1;"]; - } else { - [self executeSQL:@"PRAGMA fullfsync = 0;"]; - [self executeSQL:@"PRAGMA synchronous = OFF;"]; - } -} - -- (BOOL)hasCFAdditions { - return hasCFAdditions_; -} - -- (void)setLikeComparisonOptions:(CFOptionFlags)options { - if (hasCFAdditions_) - likeOptions_ = FilteredStringCompareFlags(options); -} - -- (CFOptionFlags)likeComparisonOptions { - CFOptionFlags flags = 0; - if (hasCFAdditions_) - flags = likeOptions_; - return flags; -} - -- (void)setGlobComparisonOptions:(CFOptionFlags)options { - if (hasCFAdditions_) - globOptions_ = FilteredStringCompareFlags(options); -} - -- (CFOptionFlags)globComparisonOptions { - CFOptionFlags globOptions = 0; - if (hasCFAdditions_) - globOptions = globOptions_; - return globOptions; -} - -- (int)lastErrorCode { - return sqlite3_errcode(db_); -} - -- (NSString *)lastErrorString { - const char *errMsg = sqlite3_errmsg(db_); - if (!errMsg) return nil; - return [NSString stringWithCString:errMsg encoding:NSUTF8StringEncoding]; -} - -- (int)lastChangeCount { - return sqlite3_changes(db_); -} - -- (int)totalChangeCount { - return sqlite3_total_changes(db_); -} - -- (unsigned long long)lastInsertRowID { - return sqlite3_last_insert_rowid(db_); -} - -- (void)interrupt { - sqlite3_interrupt(db_); -} - -- (int)setBusyTimeoutMS:(int)timeoutMS { - int rc = sqlite3_busy_timeout(db_, timeoutMS); - if (rc == SQLITE_OK) { - timeoutMS_ = timeoutMS; - } - return rc; -} - -- (int)busyTimeoutMS { - return timeoutMS_; -} - -- (int)executeSQL:(NSString *)sql { - int rc; - // Sanity - if (!sql) { - rc = SQLITE_MISUSE; // Reasonable return for this case - } else { - if (hasCFAdditions_) { - rc = sqlite3_exec(db_, - [[sql precomposedStringWithCanonicalMapping] - UTF8String], - NULL, NULL, NULL); - } else { - rc = sqlite3_exec(db_, [sql UTF8String], NULL, NULL, NULL); - } - } - return rc; -} - -- (BOOL)beginDeferredTransaction { - int err; - err = [self executeSQL:@"BEGIN DEFERRED TRANSACTION;"]; - return (err == SQLITE_OK) ? YES : NO; -} - -- (BOOL)rollback { - int err = [self executeSQL:@"ROLLBACK TRANSACTION;"]; - return (err == SQLITE_OK) ? YES : NO; -} - -- (BOOL)commit { - int err = [self executeSQL:@"COMMIT TRANSACTION;"]; - return (err == SQLITE_OK) ? YES : NO; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p - %@>", - [self class], self, path_]; -} -@end - - -#pragma mark Upper/Lower - -// Private helper to handle upper/lower conversions for UTF8 -static void UpperLower8(sqlite3_context *context, int argc, sqlite3_value **argv) { - // Args - if ((argc < 1) || (sqlite3_value_type(argv[0]) == SQLITE_NULL)) { - // COV_NF_START - sqlite3_result_error(context, "LOWER/UPPER CF implementation got bad args", - -1); - return; - // COV_NF_END - } - const char *sqlText8 = (void *)sqlite3_value_text(argv[0]); - if (!sqlText8) { - // COV_NF_START - sqlite3_result_error(context, "LOWER/UPPER CF implementation no input UTF8", - -1); - return; - // COV_NF_END - } - - // Get user data - UpperLowerUserArgs *userArgs = sqlite3_user_data(context); - if (!userArgs) { - // COV_NF_START - sqlite3_result_error(context, "LOWER/UPPER CF implementation no user args", - -1); - return; - // COV_NF_END - } - - _GTMDevAssert(userArgs->textRep == SQLITE_UTF8, - @"Received non UTF8 encoding in UpperLower8"); - - // Worker string, must be mutable for case conversion so order our calls - // to only copy once - CFMutableStringRef workerString = - CFStringCreateMutable(kCFAllocatorDefault, 0); - GTMCFAutorelease(workerString); - if (!workerString) { - // COV_NF_START - sqlite3_result_error(context, - "LOWER/UPPER CF implementation failed " \ - "to allocate CFMutableStringRef", -1); - return; - // COV_NF_END - } - CFStringAppendCString(workerString, sqlText8, kCFStringEncodingUTF8); - - // Perform the upper/lower - if (userArgs->upperCase) { - CFStringUppercase(workerString, gCurrentLocale); - } else { - CFStringLowercase(workerString, gCurrentLocale); - } - - // Convert to our canonical composition - CFStringNormalize(workerString, kCFStringNormalizationFormC); - - // Get the bytes we will return, using the more efficient accessor if we can - const char *returnString = CFStringGetCStringPtr(workerString, - kCFStringEncodingUTF8); - if (returnString) { - // COV_NF_START - // Direct buffer, but have SQLite copy it - sqlite3_result_text(context, returnString, -1, SQLITE_TRANSIENT); - // COV_NF_END - } else { - // Need to get a copy - CFIndex workerLength = CFStringGetLength(workerString); - CFIndex bufferSize = - CFStringGetMaximumSizeForEncoding(workerLength, - kCFStringEncodingUTF8); - void *returnBuffer = malloc(bufferSize); - if (!returnBuffer) { - // COV_NF_START - sqlite3_result_error(context, - "LOWER/UPPER failed to allocate return buffer", -1); - return; - // COV_NF_END - } - CFIndex convertedBytes = 0; - CFIndex convertedChars = CFStringGetBytes(workerString, - CFRangeMake(0, workerLength), - kCFStringEncodingUTF8, - 0, - false, - returnBuffer, - bufferSize, - &convertedBytes); - if (convertedChars != workerLength) { - // COV_NF_START - free(returnBuffer); - sqlite3_result_error(context, - "CFStringGetBytes() failed to " \ - "convert all characters", -1); - // COV_NF_END - } else { - // Set the result, letting SQLite take ownership and using free() as - // the destructor - // We cast the 3rd parameter to an int because sqlite3 doesn't appear - // to support 64-bit mode. - sqlite3_result_text(context, returnBuffer, (int)convertedBytes, &free); - } - } -} - -// Private helper to handle upper/lower conversions for UTF16 variants -static void UpperLower16(sqlite3_context *context, - int argc, sqlite3_value **argv) { - // Args - if ((argc < 1) || (sqlite3_value_type(argv[0]) == SQLITE_NULL)) { - // COV_NF_START - sqlite3_result_error(context, "LOWER/UPPER CF implementation got bad args", -1); - return; - // COV_NF_END - } - - // For UTF16 variants we want our working string to be in native-endian - // UTF16. This gives us the fewest number of copies (since SQLite converts - // in-place). There is no advantage to breaking out the string construction - // to use UTF16BE or UTF16LE because all that does is move the conversion - // work into the CFString constructor, so just use simple code. - int sqlText16ByteCount = sqlite3_value_bytes16(argv[0]); - const UniChar *sqlText16 = (void *)sqlite3_value_text16(argv[0]); - if (!sqlText16ByteCount || !sqlText16) { - // COV_NF_START - sqlite3_result_error(context, - "LOWER/UPPER CF implementation no input UTF16", -1); - return; - // COV_NF_END - } - - // Get user data - UpperLowerUserArgs *userArgs = sqlite3_user_data(context); - if (!userArgs) { - // COV_NF_START - sqlite3_result_error(context, "LOWER/UPPER CF implementation no user args", -1); - return; - // COV_NF_END - } - CFStringEncoding encoding = SqliteTextEncodingToCFStringEncoding(userArgs->textRep); - - // Mutable worker for upper/lower - CFMutableStringRef workerString = CFStringCreateMutable(kCFAllocatorDefault, 0); - GTMCFAutorelease(workerString); - if (!workerString) { - // COV_NF_START - sqlite3_result_error(context, - "LOWER/UPPER CF implementation failed " \ - "to allocate CFMutableStringRef", -1); - return; - // COV_NF_END - } - CFStringAppendCharacters(workerString, sqlText16, - sqlText16ByteCount / sizeof(UniChar)); - // Perform the upper/lower - if (userArgs->upperCase) { - CFStringUppercase(workerString, gCurrentLocale); - } else { - CFStringLowercase(workerString, gCurrentLocale); - } - // Convert to our canonical composition - CFStringNormalize(workerString, kCFStringNormalizationFormC); - - // Length after normalization matters - CFIndex workerLength = CFStringGetLength(workerString); - - // If we can give direct byte access use it - const UniChar *returnString = CFStringGetCharactersPtr(workerString); - if (returnString) { - // COV_NF_START details of whether cfstringgetcharactersptr returns - // a buffer or NULL are internal; not something we can depend on. - // When building for Leopard+, CFIndex is a 64-bit type, which is - // why we cast it to an int when we call the sqlite api. - _GTMDevAssert((workerLength * sizeof(UniChar) <= INT_MAX), - @"sqlite methods do not support buffers greater " - @"than 32 bit sizes"); - // Direct access to the internal buffer, hand it to sqlite for copy and - // conversion - sqlite3_result_text16(context, returnString, - (int)(workerLength * sizeof(UniChar)), - SQLITE_TRANSIENT); - // COV_NF_END - } else { - // Need to get a copy since we can't get direct access - CFIndex bufferSize = CFStringGetMaximumSizeForEncoding(workerLength, - encoding); - void *returnBuffer = malloc(bufferSize); - if (!returnBuffer) { - // COV_NF_START - sqlite3_result_error(context, - "LOWER/UPPER CF implementation failed " \ - "to allocate return buffer", -1); - return; - // COV_NF_END - } - CFIndex convertedBytes = 0; - CFIndex convertedChars = CFStringGetBytes(workerString, - CFRangeMake(0, workerLength), - encoding, - 0, - false, - returnBuffer, - bufferSize, - &convertedBytes); - if (convertedChars != workerLength) { - // COV_NF_START - free(returnBuffer); - sqlite3_result_error(context, - "LOWER/UPPER CF implementation CFStringGetBytes() " \ - "failed to convert all characters", -1); - // COV_NF_END - } else { - // When building for Leopard+, CFIndex is a 64-bit type, but - // sqlite3's functions all take ints. Assert the error for dev - // builds and cast down. - _GTMDevAssert((convertedBytes <= INT_MAX), - @"sqlite methods do not support buffers greater " - @"than 32-bit sizes"); - int convertedBytesForSQLite = (int)convertedBytes; - // Set the result, letting SQLite take ownership and using free() as - // the destructor. For output since we're copying out the bytes anyway - // we might as well use the preferred encoding of the original call. - _GTMDevAssert(userArgs->textRep == SQLITE_UTF16BE || - userArgs->textRep == SQLITE_UTF16LE, - @"Received non UTF8 encoding in UpperLower8"); - switch (userArgs->textRep) { - case SQLITE_UTF16BE: - sqlite3_result_text16be(context, returnBuffer, - convertedBytesForSQLite, &free); - break; - case SQLITE_UTF16LE: - sqlite3_result_text16le(context, returnBuffer, - convertedBytesForSQLite, &free); - break; - default: - // COV_NF_START no way to tell sqlite to not use utf8 or utf16? - sqlite3_result_error(context, - "LOWER/UPPER CF implementation " \ - "had unhandled encoding", -1); - // COV_NF_END - } - } - } -} - - -#pragma mark Collations - -static void CollateNeeded(void *userContext, sqlite3 *db, int textRep, - const char *name) { - // Cast - GTMSQLiteDatabase *gtmdb = (GTMSQLiteDatabase *)userContext; - _GTMDevAssert(gtmdb, @"Invalid database parameter from sqlite"); - - // Create space for the collation args - NSMutableData *collationArgsData = - [NSMutableData dataWithLength:sizeof(CollateUserArgs)]; - CollateUserArgs *userArgs = (CollateUserArgs *)[collationArgsData bytes]; - bzero(userArgs, sizeof(CollateUserArgs)); - userArgs->textRep = textRep; - - // Parse the name into the flags we need - NSString *collationName = - [[NSString stringWithUTF8String:name] lowercaseString]; - NSArray *collationComponents = - [collationName componentsSeparatedByString:@"_"]; - NSString *collationFlag = nil; - BOOL atLeastOneValidFlag = NO; - GTM_FOREACH_OBJECT(collationFlag, collationComponents) { - if ([collationFlag isEqualToString:@"reverse"]) { - userArgs->reverse = YES; - atLeastOneValidFlag = YES; - } else if ([collationFlag isEqualToString:@"nocase"]) { - userArgs->compareOptions |= kCFCompareCaseInsensitive; - atLeastOneValidFlag = YES; - } else if ([collationFlag isEqualToString:@"nonliteral"]) { - userArgs->compareOptions |= kCFCompareNonliteral; - atLeastOneValidFlag = YES; - } else if ([collationFlag isEqualToString:@"localized"]) { - userArgs->compareOptions |= kCFCompareLocalized; - atLeastOneValidFlag = YES; - } else if ([collationFlag isEqualToString:@"numeric"]) { - userArgs->compareOptions |= kCFCompareNumerically; - atLeastOneValidFlag = YES; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - } else if ([collationFlag isEqualToString:@"nodiacritic"]) { - userArgs->compareOptions |= kCFCompareDiacriticInsensitive; - atLeastOneValidFlag = YES; - } else if ([collationFlag isEqualToString:@"widthinsensitive"]) { - userArgs->compareOptions |= kCFCompareWidthInsensitive; - atLeastOneValidFlag = YES; -#else - } else if (([collationFlag isEqualToString:@"nodiacritic"]) || - ([collationFlag isEqualToString:@"widthinsensitive"])) { - _GTMDevLog(@"GTMSQLiteDatabase 10.5 collating not " - @"available on 10.4 or earlier"); -#endif - } - } - - // No valid tokens means nothing to do - if (!atLeastOneValidFlag) return; - - int err; - // Add the collation - switch (textRep) { - case SQLITE_UTF8: - err = sqlite3_create_collation([gtmdb sqlite3DB], name, - textRep, userArgs, &Collate8); - if (err != SQLITE_OK) return; - break; - case SQLITE_UTF16: - case SQLITE_UTF16BE: - case SQLITE_UTF16LE: - err = sqlite3_create_collation([gtmdb sqlite3DB], name, - textRep, userArgs, &Collate16); - if (err != SQLITE_OK) return; - break; - default: - return; - } - - // Have the db retain our collate function args - [gtmdb collationArgumentRetain:collationArgsData]; -} - -static int Collate8(void *userContext, int length1, const void *str1, - int length2, const void *str2) { - // User args - CollateUserArgs *userArgs = (CollateUserArgs *)userContext; - _GTMDevAssert(userArgs, @"Invalid user arguments from sqlite"); - - // Sanity and zero-lengths - if (!(str1 && str2) || (!length1 && !length2)) { - return kCFCompareEqualTo; // Best we can do and stable sort - } - if (!length1 && length2) { - if (userArgs->reverse) { - return kCFCompareGreaterThan; - } else { - return kCFCompareLessThan; - } - } else if (length1 && !length2) { - if (userArgs->reverse) { - return kCFCompareLessThan; - } else { - return kCFCompareGreaterThan; - } - } - - // We have UTF8 strings with no terminating null, we want to compare - // with as few copies as possible. Leopard introduced a no-copy string - // creation function, we'll use it when we can but we want to stay compatible - // with Tiger. - CFStringRef string1 = NULL, string2 = NULL; -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - if (gCFStringCreateWithBytesNoCopySymbol) { - string1 = gCFStringCreateWithBytesNoCopySymbol(kCFAllocatorDefault, - str1, - length1, - kCFStringEncodingUTF8, - false, - kCFAllocatorNull); - string2 = gCFStringCreateWithBytesNoCopySymbol(kCFAllocatorDefault, - str2, - length2, - kCFStringEncodingUTF8, - false, - kCFAllocatorNull); - } else { - // Have to use the copy-based variants - string1 = CFStringCreateWithBytes(kCFAllocatorDefault, - str1, - length1, - kCFStringEncodingUTF8, - false); - string2 = CFStringCreateWithBytes(kCFAllocatorDefault, - str2, - length2, - kCFStringEncodingUTF8, - false); - } -#else // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - string1 = CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, - str1, - length1, - kCFStringEncodingUTF8, - false, - kCFAllocatorNull); - string2 = CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, - str2, - length2, - kCFStringEncodingUTF8, - false, - kCFAllocatorNull); -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - GTMCFAutorelease(string1); - GTMCFAutorelease(string2); - // Allocation failures can't really be sanely handled from a collator - int sqliteResult; - if (!(string1 && string2)) { - // COV_NF_START - sqliteResult = (int)kCFCompareEqualTo; - // COV_NF_END - } else { - // Compare - // We have to cast to int because SQLite takes functions that - // return an int, but when compiling for Leopard+, - // CFComparisonResult is a signed long, but on Tiger it's an int - CFComparisonResult result; - result = CFStringCompare(string1, - string2, - userArgs->compareOptions); - sqliteResult = (int)result; - // Reverse - if (userArgs->reverse && sqliteResult) { - sqliteResult = -sqliteResult; - } - - } - return sqliteResult; -} - -static int Collate16(void *userContext, int length1, const void *str1, - int length2, const void *str2) { - // User args - CollateUserArgs *userArgs = (CollateUserArgs *)userContext; - _GTMDevAssert(userArgs, @"Invalid user arguments from sqlite"); - - // Sanity and zero-lengths - if (!(str1 && str2) || (!length1 && !length2)) { - return kCFCompareEqualTo; // Best we can do and stable sort - } - if (!length1 && length2) { - if (userArgs->reverse) { - return kCFCompareGreaterThan; - } else { - return kCFCompareLessThan; - } - } else if (length1 && !length2) { - if (userArgs->reverse) { - return kCFCompareLessThan; - } else { - return kCFCompareGreaterThan; - } - } - - // Target encoding - CFStringEncoding encoding = - SqliteTextEncodingToCFStringEncoding(userArgs->textRep); - - // We have UTF16 strings, we want to compare with as few copies as - // possible. Since endianness matters we want to use no-copy - // variants where possible and copy (and endian convert) only when - // we must. - CFStringRef string1 = NULL, string2 = NULL; - if ((userArgs->textRep == SQLITE_UTF16) || -#if TARGET_RT_BIG_ENDIAN - (userArgs->textRep == SQLITE_UTF16BE) -#else - (userArgs->textRep == SQLITE_UTF16LE) -#endif - ) { - string1 = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - str1, - length1 / sizeof(UniChar), - kCFAllocatorNull); - string2 = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - str2, - length2 / sizeof(UniChar), - kCFAllocatorNull); - } else { - // No point in using the "no copy" version of the call here. If the - // bytes were in the native order we'd be in the other part of this - // conditional, so we know we have to copy the string to endian convert - // it. - string1 = CFStringCreateWithBytes(kCFAllocatorDefault, - str1, - length1, - encoding, - false); - string2 = CFStringCreateWithBytes(kCFAllocatorDefault, - str2, - length2, - encoding, - false); - } - - GTMCFAutorelease(string1); - GTMCFAutorelease(string2); - int sqliteResult; - // Allocation failures can't really be sanely handled from a collator - if (!(string1 && string2)) { - // COV_NF_START - sqliteResult = (int)kCFCompareEqualTo; - // COV_NF_END - } else { - // Compare - // We cast the return value to an int because CFComparisonResult - // is a long in Leopard+ builds. I have no idea why we need - // 64-bits for a 3-value enum, but that's how it is... - CFComparisonResult result; - result = CFStringCompare(string1, - string2, - userArgs->compareOptions); - - sqliteResult = (int)result; - //Reverse - if (userArgs->reverse && sqliteResult) { - sqliteResult = -sqliteResult; - } - } - - return sqliteResult; -} - - -#pragma mark Like/Glob - -// Private helper to handle LIKE and GLOB with different encodings. This -// is essentially a reimplementation of patternCompare() in func.c of the -// SQLite sources. -static void LikeGlobCompare(sqlite3_context *context, - CFStringRef pattern, - CFStringRef targetString, - UniChar matchAll, - UniChar matchOne, - UniChar escape, - BOOL setSupport, - CFOptionFlags compareOptions) { - // Setup for pattern walk - CFIndex patternLength = CFStringGetLength(pattern); - CFStringInlineBuffer patternBuffer; - CFStringInitInlineBuffer(pattern, - &patternBuffer, - CFRangeMake(0, patternLength)); - UniChar patternChar; - CFIndex patternIndex = 0; - CFIndex targetStringLength = CFStringGetLength(targetString); - CFIndex targetStringIndex = 0; - BOOL isAnchored = YES; - - size_t dataSize = patternLength * sizeof(UniChar); - NSMutableData *tempData = [NSMutableData dataWithLength:dataSize]; - // Temp string buffer can be no larger than the whole pattern - UniChar *findBuffer = [tempData mutableBytes]; - if (!findBuffer) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE or GLOB CF implementation failed to " \ - "allocate temporary buffer", -1); - return; - // COV_NF_END - } - - // We'll use a mutable string we can just reset as we wish - CFMutableStringRef findString = - CFStringCreateMutableWithExternalCharactersNoCopy(kCFAllocatorDefault, - NULL, - 0, - 0, - kCFAllocatorNull); - GTMCFAutorelease(findString); - if (!findString) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE or GLOB CF implementation failed to " \ - "allocate temporary CFString", -1); - return; - // COV_NF_END - } - // Walk the pattern - while (patternIndex < patternLength) { - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - // Match all character has no effect other than to unanchor the search - if (patternChar == matchAll) { - isAnchored = NO; - patternIndex++; - continue; - } - // Match one character pushes the string index forward by one composed - // character - if (patternChar == matchOne) { - // If this single char match would walk us off the end of the string - // we're already done, no match - if (targetStringIndex >= targetStringLength) { - sqlite3_result_int(context, 0); - return; - } - // There's still room in the string, so move the string index forward one - // composed character and go back around. - CFRange nextCharRange = - CFStringGetRangeOfComposedCharactersAtIndex(targetString, - targetStringIndex); - targetStringIndex = nextCharRange.location + nextCharRange.length; - patternIndex++; - continue; - } - // Character set matches require the parsing of the character set - if (setSupport && (patternChar == 0x5B)) { // "[" - // A character set must match one character, if there's not at least one - // character left in the string, don't bother - if (targetStringIndex >= targetStringLength) { - sqlite3_result_int(context, 0); - return; - } - // There's at least one character, try to match the remainder of the - // string using a CFCharacterSet - CFMutableCharacterSetRef charSet - = CFCharacterSetCreateMutable(kCFAllocatorDefault); - GTMCFAutorelease(charSet); - if (!charSet) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE or GLOB CF implementation failed to " \ - "allocate temporary CFMutableCharacterSet", -1); - return; - // COV_NF_END - } - - BOOL invert = NO; - // Walk one character forward - patternIndex++; - if (patternIndex >= patternLength) { - // Oops, out of room - sqlite3_result_error(context, - "LIKE or GLOB CF implementation found " \ - "unclosed character set", -1); - return; - } - // First character after pattern open is special-case - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - if (patternChar == 0x5E) { // "^" - invert = YES; - // Bump forward one character, can still be an unescaped "]" after - // negation - patternIndex++; - if (patternIndex >= patternLength) { - // Oops, out of room - sqlite3_result_error(context, - "LIKE or GLOB CF implementation found " \ - "unclosed character set after negation", -1); - return; - } - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - } - // First char in set or first char in negation can be a literal "]" not - // considered a close - if (patternChar == 0x5D) { // "]" - CFCharacterSetAddCharactersInRange(charSet, - CFRangeMake(patternChar, 1)); - patternIndex++; - if (patternIndex >= patternLength) { - // Oops, out of room - sqlite3_result_error(context, - "LIKE or GLOB CF implementation found " \ - "unclosed character set after escaped ]", -1); - return; - } - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - } - while ((patternIndex < patternLength) && - patternChar && - (patternChar != 0x5D)) { // "]" - // Check for possible character range, for this to be true we - // must have a hyphen at the next position and at least 3 - // characters of room (for hyphen, range end, and set - // close). Hyphens at the end without a trailing range are - // treated as literals - if (((patternLength - patternIndex) >= 3) && - // Second char must be "-" - (CFStringGetCharacterFromInlineBuffer(&patternBuffer, - // 0x2D is "-" - patternIndex + 1) == 0x2D) && - // And third char must be anything other than set close in - // case the hyphen is at the end of the set and needs to - // be treated as a literal - (CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex + 2) - != 0x5D)) { // "]" - // Get the range close - UniChar rangeClose = - CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex + 2); - // Add the whole range - int rangeLen = rangeClose - patternChar + 1; - CFCharacterSetAddCharactersInRange(charSet, - CFRangeMake(patternChar, - rangeLen)); - // Move past the end of the range - patternIndex += 3; - } else { - // Single Raw character - CFCharacterSetAddCharactersInRange(charSet, - CFRangeMake(patternChar, 1)); - patternIndex++; - } - // Load next char for loop - if (patternIndex < patternLength) { - patternChar = - CFStringGetCharacterFromInlineBuffer(&patternBuffer, patternIndex); - } else { - patternChar = 0; - } - } - // Check for closure - if (patternChar != 0x5D) { // "]" - sqlite3_result_error(context, - "LIKE or GLOB CF implementation found " \ - "unclosed character set", -1); - return; - } else { - // Increment past the end of the set - patternIndex++; - } - // Invert the set if needed - if (invert) CFCharacterSetInvert(charSet); - // Do the search - CFOptionFlags findOptions = 0; - if (isAnchored) findOptions |= kCFCompareAnchored; - CFRange foundRange; - unsigned long rangeLen = targetStringLength - targetStringIndex; - BOOL found = CFStringFindCharacterFromSet(targetString, - charSet, - CFRangeMake(targetStringIndex, - rangeLen), - findOptions, - &foundRange); - // If no match then the whole pattern fails - if (!found) { - sqlite3_result_int(context, 0); - return; - } - // If we did match then we need to push the string index to the - // character past the end of the match and then go back around - // the loop. - targetStringIndex = foundRange.location + foundRange.length; - // At this point patternIndex is either at the end of the - // string, or at the next special character which will be picked - // up and handled at the top of the loop. We do, however, need - // to reset the anchor status - isAnchored = YES; - // End of character sets, back around - continue; - } - // Otherwise the pattern character is a normal or escaped - // character we should consume and match with normal string - // matching - CFIndex findBufferIndex = 0; - while ((patternIndex < patternLength) && patternChar && - !((patternChar == matchAll) || (patternChar == matchOne) || - (setSupport && (patternChar == 0x5B)))) { // "[" - if (patternChar == escape) { - // No matter what the character follows the escape copy it to the - // buffer - patternIndex++; - if (patternIndex >= patternLength) { - // COV_NF_START - // Oops, escape came at end of pattern, that's an error - sqlite3_result_error(context, - "LIKE or GLOB CF implementation found " \ - "escape character at end of pattern", -1); - return; - // COV_NF_END - } - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - } - // At this point the patternChar is either the escaped character or the - // original normal character - findBuffer[findBufferIndex++] = patternChar; - // Set up for next loop - patternIndex++; - if (patternIndex < patternLength) { - patternChar = CFStringGetCharacterFromInlineBuffer(&patternBuffer, - patternIndex); - } else { - patternChar = 0; - } - } - // On loop exit we have a string ready for comparision, if that - // string is too long then it can't be a match. - if (findBufferIndex > (targetStringLength - targetStringIndex)) { - sqlite3_result_int(context, 0); - return; - } - - // We actually need to do a comparison - CFOptionFlags findOptions = compareOptions; - if (isAnchored) findOptions |= kCFCompareAnchored; - CFStringSetExternalCharactersNoCopy(findString, - findBuffer, - findBufferIndex, - findBufferIndex); - CFRange foundRange; - unsigned long rangeLen = targetStringLength - targetStringIndex; - BOOL found = CFStringFindWithOptions(targetString, - findString, - CFRangeMake(targetStringIndex, - rangeLen), - findOptions, - &foundRange); - // If no match then the whole pattern fails - if (!found) { - sqlite3_result_int(context, 0); - return; - } - // If we did match then we need to push the string index to the - // character past the end of the match and then go back around the - // loop. - targetStringIndex = foundRange.location + foundRange.length; - // At this point patternIndex is either at the end of the string, - // or at the next special character which will be picked up and - // handled at the top of the loop. We do, however, need to reset - // the anchor status - isAnchored = YES; - } - // On loop exit all pattern characters have been considered. If we're still - // alive it means that we've matched the entire pattern, except for trailing - // wildcards, we need to handle that case. - if (isAnchored) { - // If we're still anchored there was no trailing matchAll, in which case - // we have to have run to exactly the end of the string - if (targetStringIndex == targetStringLength) { - sqlite3_result_int(context, 1); - } else { - sqlite3_result_int(context, 0); - } - } else { - // If we're not anchored any remaining characters are OK - sqlite3_result_int(context, 1); - } -} - -static void Like8(sqlite3_context *context, int argc, sqlite3_value **argv) { - // Get our LIKE options - LikeGlobUserArgs *likeArgs = sqlite3_user_data(context); - if (!likeArgs) { - // COV_NF_START - sqlite3_result_error(context, "LIKE CF implementation no user args", -1); - return; - // COV_NF_END - } - - // Read the strings - const char *pattern = (const char *)sqlite3_value_text(argv[0]); - const char *target = (const char *)sqlite3_value_text(argv[1]); - if (!pattern || !target) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation missing pattern or value", -1); - return; - // COV_NF_END - } - CFStringRef patternString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - pattern, - kCFStringEncodingUTF8, - kCFAllocatorNull); - CFStringRef targetString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - target, - kCFStringEncodingUTF8, - kCFAllocatorNull); - GTMCFAutorelease(patternString); - GTMCFAutorelease(targetString); - if (!(patternString && targetString)) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation failed " \ - "to allocate CFStrings", -1); - return; - // COV_NF_END - } - - UniChar escapeChar = 0; - // If there is a third argument it is the escape character - if (argc == 3) { - const char *escape = (const char *)sqlite3_value_text(argv[2]); - if (!escape) { - sqlite3_result_error(context, - "LIKE CF implementation missing " \ - "escape character", -1); - return; - } - CFStringRef escapeString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - escape, - kCFStringEncodingUTF8, - kCFAllocatorNull); - GTMCFAutorelease(escapeString); - if (!escapeString) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation failed to " \ - "allocate CFString for ESCAPE", -1); - return; - // COV_NF_END - } - if (CFStringGetLength(escapeString) != 1) { - sqlite3_result_error(context, - "CF implementation ESCAPE expression " \ - "must be single character", -1); - return; - } - escapeChar = CFStringGetCharacterAtIndex(escapeString, 0); - } - - // Do the compare - LikeGlobCompare(context, - patternString, - targetString, - 0x25, // % - 0x5F, // _ - escapeChar, - NO, // LIKE does not support character sets - *(likeArgs->compareOptionPtr)); -} - -static void Like16(sqlite3_context *context, int argc, sqlite3_value **argv) { - // Get our LIKE options - LikeGlobUserArgs *likeArgs = sqlite3_user_data(context); - if (!likeArgs) { - // COV_NF_START - sql parser chokes if we feed any input - // that could trigger this - sqlite3_result_error(context, "LIKE CF implementation no user args", -1); - return; - // COV_NF_END - } - - // For UTF16 variants we want our working string to be in native-endian - // UTF16. This gives us the fewest number of copies (since SQLite converts - // in-place). There is no advantage to breaking out the string construction - // to use UTF16BE or UTF16LE because all that does is move the conversion - // work into the CFString constructor, so just use simple code. - int patternByteCount = sqlite3_value_bytes16(argv[0]); - const UniChar *patternText = (void *)sqlite3_value_text16(argv[0]); - int targetByteCount = sqlite3_value_bytes16(argv[1]); - const UniChar *targetText = (void *)sqlite3_value_text16(argv[1]); - if (!patternByteCount || !patternText || !targetByteCount || !targetText) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation missing pattern or value", -1); - return; - // COV_NF_END - } - CFStringRef patternString = - CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - patternText, - patternByteCount / sizeof(UniChar), - kCFAllocatorNull); - CFStringRef targetString = - CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - targetText, - targetByteCount / sizeof(UniChar), - kCFAllocatorNull); - GTMCFAutorelease(patternString); - GTMCFAutorelease(targetString); - if (!(patternString && targetString)) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation failed " \ - "to allocate CFStrings", -1); - return; - // COV_NF_END - } - - // If there is a third argument it is the escape character, force a - // UTF8 conversion for simplicity - UniChar escapeChar = 0; - if (argc == 3) { - const char *escape = (const char *)sqlite3_value_text(argv[2]); - if (!escape) { - sqlite3_result_error(context, - "LIKE CF implementation " \ - "missing escape character", -1); - return; - } - CFStringRef escapeString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - escape, - kCFStringEncodingUTF8, - kCFAllocatorNull); - GTMCFAutorelease(escapeString); - if (!escapeString) { - // COV_NF_START - sqlite3_result_error(context, - "LIKE CF implementation failed to " \ - "allocate CFString for ESCAPE", -1); - return; - // COV_NF_END - } - if (CFStringGetLength(escapeString) != 1) { - sqlite3_result_error(context, - "CF implementation ESCAPE expression " \ - "must be single character", -1); - return; - } - escapeChar = CFStringGetCharacterAtIndex(escapeString, 0); - } - - // Do the compare - LikeGlobCompare(context, - patternString, - targetString, - 0x25, // % - 0x5F, // _ - escapeChar, - NO, // LIKE does not support character sets - *(likeArgs->compareOptionPtr)); -} - -static void Glob8(sqlite3_context *context, int argc, sqlite3_value **argv) { - // Get our GLOB options - LikeGlobUserArgs *globArgs = sqlite3_user_data(context); - if (!globArgs) { - // COV_NF_START - sqlite3_result_error(context, "GLOB CF implementation no user args", -1); - return; - // COV_NF_END - } - - // Read the strings - const char *pattern = (const char *)sqlite3_value_text(argv[0]); - const char *target = (const char *)sqlite3_value_text(argv[1]); - if (!pattern || !target) { - // COV_NF_START - sqlite3_result_error(context, - "GLOB CF implementation missing " \ - "pattern or value", -1); - return; - // COV_NF_END - } - CFStringRef patternString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - pattern, - kCFStringEncodingUTF8, - kCFAllocatorNull); - CFStringRef targetString = - CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - target, - kCFStringEncodingUTF8, - kCFAllocatorNull); - GTMCFAutorelease(patternString); - GTMCFAutorelease(targetString); - - if (!(patternString && targetString)) { - // COV_NF_START - sqlite3_result_error(context, - "GLOB CF implementation failed to " \ - "allocate CFStrings", -1); - // COV_NF_END - } else { - // Do the compare - LikeGlobCompare(context, - patternString, - targetString, - 0x2A, // * - 0x3F, // ? - 0, // GLOB does not support escape characters - YES, // GLOB supports character sets - *(globArgs->compareOptionPtr)); - } -} - -static void Glob16(sqlite3_context *context, int argc, sqlite3_value **argv) { - // Get our GLOB options - LikeGlobUserArgs *globArgs = sqlite3_user_data(context); - if (!globArgs) { - // COV_NF_START - sqlite3_result_error(context, "GLOB CF implementation no user args", -1); - return; - // COV_NF_END - } - - // For UTF16 variants we want our working string to be in - // native-endian UTF16. This gives us the fewest number of copies - // (since SQLite converts in-place). There is no advantage to - // breaking out the string construction to use UTF16BE or UTF16LE - // because all that does is move the conversion work into the - // CFString constructor, so just use simple code. - int patternByteCount = sqlite3_value_bytes16(argv[0]); - const UniChar *patternText = (void *)sqlite3_value_text16(argv[0]); - int targetByteCount = sqlite3_value_bytes16(argv[1]); - const UniChar *targetText = (void *)sqlite3_value_text16(argv[1]); - if (!patternByteCount || !patternText || !targetByteCount || !targetText) { - // COV_NF_START - sqlite3_result_error(context, - "GLOB CF implementation missing pattern or value", -1); - return; - // COV_NF_END - } - CFStringRef patternString = - CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - patternText, - patternByteCount / sizeof(UniChar), - kCFAllocatorNull); - CFStringRef targetString = - CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, - targetText, - targetByteCount / sizeof(UniChar), - kCFAllocatorNull); - GTMCFAutorelease(patternString); - GTMCFAutorelease(targetString); - if (!(patternString && targetString)) { - // COV_NF_START - sqlite3_result_error(context, - "GLOB CF implementation failed to "\ - "allocate CFStrings", -1); - // COV_NF_END - } else { - // Do the compare - LikeGlobCompare(context, - patternString, - targetString, - 0x2A, // * - 0x3F, // ? - 0, // GLOB does not support escape characters - YES, // GLOB supports character sets - *(globArgs->compareOptionPtr)); - } -} - -// ----------------------------------------------------------------------------- - -@implementation GTMSQLiteStatement - -#pragma mark Creation, Access and Finalization - -+ (id)statementWithSQL:(NSString *)sql - inDatabase:(GTMSQLiteDatabase *)gtmdb - errorCode:(int *)err { - return [[[GTMSQLiteStatement alloc] initWithSQL:sql - inDatabase:gtmdb - errorCode:err] - autorelease]; -} - -- (id)initWithSQL:(NSString *)sql - inDatabase:(GTMSQLiteDatabase *)gtmdb - errorCode:(int *)err { - int rc; - id obj; - if ((self = [super init])) { - // Sanity - obj = self; - if (sql && gtmdb) { - // Find out if the database is using our CF extensions - hasCFAdditions_ = [gtmdb hasCFAdditions]; - - // Prepare - if (hasCFAdditions_) { - sql = [sql precomposedStringWithCanonicalMapping]; - } - if (sql) { - rc = sqlite3_prepare([gtmdb sqlite3DB], - [sql UTF8String], - -1, - &statement_, - NULL); - if (rc != SQLITE_OK) { - [self release]; - obj = nil; - } - } else { - // COV_NF_START - rc = SQLITE_INTERNAL; - [self release]; - obj = nil; - // COV_NF_END - } - } else { - rc = SQLITE_MISUSE; - [self release]; - obj = nil; - } - } else { - // COV_NF_START - rc = SQLITE_INTERNAL; - obj = nil; - // COV_NF_END - } - if (err) *err = rc; - return obj; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - if (statement_) { - _GTMDevLog(@"-[GTMSQLiteStatement finalizeStatement] must be called when" - @" statement is no longer needed"); - } - [super finalize]; -} -#endif - -- (void)dealloc { - if (statement_) { - _GTMDevLog(@"-[GTMSQLiteStatement finalizeStatement] must be called when" - @" statement is no longer needed"); - } - [super dealloc]; -} - -- (sqlite3_stmt *)sqlite3Statement { - return statement_; -} - -- (int)finalizeStatement { - if (!statement_) return SQLITE_MISUSE; - int rc = sqlite3_finalize(statement_); - statement_ = NULL; - return rc; -} - -#pragma mark Parameters and Binding - -- (int)parameterCount { - if (!statement_) return -1; - return sqlite3_bind_parameter_count(statement_); -} - -- (int)positionOfParameterNamed:(NSString *)paramName { - if (!statement_) return -1; - if (hasCFAdditions_) { - NSString *cleanedString = - [paramName precomposedStringWithCanonicalMapping]; - if (!cleanedString) return -1; - return sqlite3_bind_parameter_index(statement_, [cleanedString UTF8String]); - } else { - return sqlite3_bind_parameter_index(statement_, [paramName UTF8String]); - } -} - -- (NSString *)nameOfParameterAtPosition:(int)position { - if ((position < 1) || !statement_) return nil; - const char *name = sqlite3_bind_parameter_name(statement_, position); - if (!name) return nil; - NSString *nameString = [NSString stringWithUTF8String:name]; - if (hasCFAdditions_) { - return [nameString precomposedStringWithCanonicalMapping]; - } else { - return nameString; - } -} - -- (int)bindSQLNullAtPosition:(int)position { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_bind_null(statement_, position); -} - -- (int)bindBlobAtPosition:(int)position bytes:(void *)bytes length:(int)length { - if (!statement_ || !bytes || !length) return SQLITE_MISUSE; - return sqlite3_bind_blob(statement_, - position, - bytes, - length, - SQLITE_TRANSIENT); -} - -- (int)bindBlobAtPosition:(int)position data:(NSData *)data { - if (!statement_ || !data || !position) return SQLITE_MISUSE; - int blobLength = (int)[data length]; - _GTMDevAssert((blobLength < INT_MAX), - @"sqlite methods do not support data lengths " - @"exceeding 32 bit sizes"); - return [self bindBlobAtPosition:position - bytes:(void *)[data bytes] - length:blobLength]; -} - -- (int)bindDoubleAtPosition:(int)position value:(double)value { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_bind_double(statement_, position, value); -} - -- (int)bindNumberAsDoubleAtPosition:(int)position number:(NSNumber *)number { - if (!number || !statement_) return SQLITE_MISUSE; - return sqlite3_bind_double(statement_, position, [number doubleValue]); -} - -- (int)bindInt32AtPosition:(int)position value:(int)value { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_bind_int(statement_, position, value); -} - -- (int)bindNumberAsInt32AtPosition:(int)position number:(NSNumber *)number { - if (!number || !statement_) return SQLITE_MISUSE; - return sqlite3_bind_int(statement_, position, [number intValue]); -} - -- (int)bindLongLongAtPosition:(int)position value:(long long)value { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_bind_int64(statement_, position, value); -} - -- (int)bindNumberAsLongLongAtPosition:(int)position number:(NSNumber *)number { - if (!number || !statement_) return SQLITE_MISUSE; - return sqlite3_bind_int64(statement_, position, [number longLongValue]); -} - -- (int)bindStringAtPosition:(int)position string:(NSString *)string { - if (!string || !statement_) return SQLITE_MISUSE; - if (hasCFAdditions_) { - string = [string precomposedStringWithCanonicalMapping]; - if (!string) return SQLITE_INTERNAL; - } - return sqlite3_bind_text(statement_, - position, - [string UTF8String], - -1, - SQLITE_TRANSIENT); -} - -#pragma mark Results - -- (int)resultColumnCount { - if (!statement_) return -1; - return sqlite3_column_count(statement_); -} - -- (NSString *)resultColumnNameAtPosition:(int)position { - if (!statement_) return nil; - const char *name = sqlite3_column_name(statement_, position); - if (!name) return nil; - NSString *nameString = [NSString stringWithUTF8String:name]; - if (hasCFAdditions_) { - return [nameString precomposedStringWithCanonicalMapping]; - } else { - return nameString; - } -} - -- (int)rowDataCount { - if (!statement_) return -1; - return sqlite3_data_count(statement_); -} - -- (int)resultColumnTypeAtPosition:(int)position { - if (!statement_) return -1; - return sqlite3_column_type(statement_, position); -} - -- (NSData *)resultBlobDataAtPosition:(int)position { - if (!statement_) return nil; - const void *bytes = sqlite3_column_blob(statement_, position); - int length = sqlite3_column_bytes(statement_, position); - if (!(bytes && length)) return nil; - return [NSData dataWithBytes:bytes length:length]; -} - -- (double)resultDoubleAtPosition:(int)position { - if (!statement_) return 0; - return sqlite3_column_double(statement_, position); -} - -- (int)resultInt32AtPosition:(int)position { - if (!statement_) return 0; - return sqlite3_column_int(statement_, position); -} - -- (long long)resultLongLongAtPosition:(int)position { - if (!statement_) return 0; - return sqlite3_column_int64(statement_, position); -} - -- (NSNumber *)resultNumberAtPosition:(int)position { - if (!statement_) return nil; - int type = [self resultColumnTypeAtPosition:position]; - if (type == SQLITE_FLOAT) { - // Special case for floats - return [NSNumber numberWithDouble:[self resultDoubleAtPosition:position]]; - } else { - // Everything else is cast to int - long long result = [self resultLongLongAtPosition:position]; - return [NSNumber numberWithLongLong:result]; - } -} - -- (NSString *)resultStringAtPosition:(int)position { - if (!statement_) return nil; - const char *text = (const char *)sqlite3_column_text(statement_, position); - if (!text) return nil; - NSString *result = [NSString stringWithUTF8String:text]; - if (hasCFAdditions_) { - return [result precomposedStringWithCanonicalMapping]; - } else { - return result; - } -} - -- (id)resultFoundationObjectAtPosition:(int)position { - if (!statement_) return nil; - int type = [self resultColumnTypeAtPosition:position]; - id result = nil; - switch (type) { - case SQLITE_INTEGER: - case SQLITE_FLOAT: - result = [self resultNumberAtPosition:position]; - break; - case SQLITE_TEXT: - result = [self resultStringAtPosition:position]; - break; - case SQLITE_BLOB: - result = [self resultBlobDataAtPosition:position]; - break; - case SQLITE_NULL: - result = [NSNull null]; - break; - } - return result; -} - -- (NSArray *)resultRowArray { - int count = [self rowDataCount]; - if (count < 1) return nil; - - NSMutableArray *finalArray = [NSMutableArray array]; - for (int i = 0; i < count; i++) { - id coldata = [self resultFoundationObjectAtPosition:i]; - if (!coldata) return nil; // Oops - [finalArray addObject:coldata]; - } - - if (![finalArray count]) return nil; - return finalArray; -} - -- (NSDictionary *)resultRowDictionary { - int count = [self rowDataCount]; - if (count < 1) return nil; - - NSMutableDictionary *finalDict = [NSMutableDictionary dictionary]; - for (int i = 0; i < count; i++) { - id coldata = [self resultFoundationObjectAtPosition:i]; - NSString *colname = [self resultColumnNameAtPosition:i]; - if (!(coldata && colname)) continue; - [finalDict setObject:coldata forKey:colname]; - } - if (![finalDict count]) return nil; - return finalDict; -} - -#pragma mark Rows - -- (int)stepRow { - int rc = SQLITE_BUSY; - while (rc == SQLITE_BUSY) { - rc = [self stepRowWithTimeout]; - } - return rc; -} - -- (int)stepRowWithTimeout { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_step(statement_); -} - -- (int)reset { - if (!statement_) return SQLITE_MISUSE; - return sqlite3_reset(statement_); -} - -+ (BOOL)isCompleteStatement:(NSString *)statement { - BOOL isComplete = NO; - if (statement) { - isComplete = (sqlite3_complete([statement UTF8String]) ? YES : NO); - } - return isComplete; -} - -+ (NSString*)quoteAndEscapeString:(NSString *)string { - char *quoted = sqlite3_mprintf("'%q'", [string UTF8String]); - if (!quoted) return nil; - NSString *quotedString = [NSString stringWithUTF8String:quoted]; - sqlite3_free(quoted); - return quotedString; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLiteTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLiteTest.m deleted file mode 100644 index 5d683c0f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSQLiteTest.m +++ /dev/null @@ -1,1813 +0,0 @@ -// -// GTMSQLiteTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#import "GTMSQLite.h" -#import "GTMSenTestCase.h" -#import "GTMUnitTestDevLog.h" -#import "GTMGarbageCollection.h" - -@interface GTMSQLiteTest : GTMTestCase -@end - -// This variable is used by a custom upper function that we set in a -// SQLite database to indicate that the custom function was -// successfully called. It has to be a global rather than instance -// variable because the custom upper function is not an instance function -static BOOL customUpperFunctionCalled = NO; - -@interface GTMSQLiteStatementTest : GTMTestCase -@end - -// Prototype for LIKE/GLOB test helper -static NSArray* LikeGlobTestHelper(GTMSQLiteDatabase *db, NSString *sql); - -@implementation GTMSQLiteTest - -// Test cases for change counting -- (void)testTransactionAPI { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - err = [db executeSQL:@"CREATE TABLE foo (bar TEXT COLLATE NOCASE_NONLITERAL);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to create table"); - - int changeCount = [db lastChangeCount]; - STAssertEquals(changeCount, 0, - @"Change count was not 0 after creating database/table!"); - - err = [db executeSQL:@"insert into foo (bar) values ('blah!');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - changeCount = [db lastChangeCount]; - STAssertEquals(changeCount, 1, @"Change count was not 1!"); - - // Test last row id! - unsigned long long lastRowId; - lastRowId = [db lastInsertRowID]; - STAssertEquals(lastRowId, (unsigned long long)1L, - @"First row in database was not 1?"); - - // Test setting busy and retrieving it! - int busyTimeout = 10000; - err = [db setBusyTimeoutMS:busyTimeout]; - STAssertEquals(err, SQLITE_OK, @"Error setting busy timeout"); - - int retrievedBusyTimeout; - retrievedBusyTimeout = [db busyTimeoutMS]; - STAssertEquals(retrievedBusyTimeout, busyTimeout, - @"Retrieved busy time out was not equal to what we set it" - @" to!"); - - BOOL xactOpSucceeded; - - xactOpSucceeded = [db beginDeferredTransaction]; - STAssertTrue(xactOpSucceeded, @"beginDeferredTransaction failed!"); - - err = [db executeSQL:@"insert into foo (bar) values ('blah!');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - changeCount = [db lastChangeCount]; - STAssertEquals(changeCount, 1, - @"Change count didn't stay the same" - @"when inserting during transaction"); - - xactOpSucceeded = [db rollback]; - STAssertTrue(xactOpSucceeded, @"could not rollback!"); - - changeCount = [db lastChangeCount]; - STAssertEquals(changeCount, 1, @"Change count isn't 1 after rollback :-("); - - xactOpSucceeded = [db beginDeferredTransaction]; - STAssertTrue(xactOpSucceeded, @"beginDeferredTransaction failed!"); - - for (unsigned int i = 0; i < 100; i++) { - err = [db executeSQL:@"insert into foo (bar) values ('blah!');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - } - - xactOpSucceeded = [db commit]; - STAssertTrue(xactOpSucceeded, @"could not commit!"); - - changeCount = [db totalChangeCount]; - STAssertEquals(changeCount, 102, @"Change count isn't 102 after commit :-("); -} - -- (void)testSQLiteWithoutCFAdditions { - int err; - GTMSQLiteDatabase *dbNoCFAdditions = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:NO - utf8:YES - errorCode:&err] - autorelease]; - - STAssertNotNil(dbNoCFAdditions, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - err = [dbNoCFAdditions executeSQL:nil]; - STAssertEquals(err, SQLITE_MISUSE, @"Nil SQL did not return error"); - - err = [dbNoCFAdditions executeSQL:@"SELECT UPPER('Fred');"]; - STAssertEquals(err, SQLITE_OK, @"Nil SQL did not return error"); -} - -- (void)testSynchronousAPI { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - [db synchronousMode:YES]; - [db synchronousMode:NO]; -} - -- (void)testEmptyStringsCollation { - int err; - GTMSQLiteDatabase *db8 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - STAssertNotNil(db8, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - GTMSQLiteDatabase *db16 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] - autorelease]; - - STAssertNotNil(db16, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - NSArray *databases = [NSArray arrayWithObjects:db8, db16, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - err = [db executeSQL: - @"CREATE TABLE foo (bar TEXT COLLATE NOCASE_NONLITERAL," - @" barrev text collate reverse);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for collation test"); - // Create blank rows to test matching inside collation functions - err = [db executeSQL:@"insert into foo (bar, barrev) values ('','');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - // Insert one row we want to match - err = [db executeSQL: - @"INSERT INTO foo (bar, barrev) VALUES " - @"('teststring','teststring');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - NSString *matchString = @"foobar"; - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE bar == '%@';", matchString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - [statement stepRow]; - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE barrev == '%@' order by barrev;", matchString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - [statement stepRow]; - - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE bar == '';"] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - [statement stepRow]; - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE barrev == '' order by barrev;"] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - [statement stepRow]; - [statement finalizeStatement]; - } -} - -- (void)testUTF16Database { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] - autorelease]; - - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - err = [db executeSQL:@"CREATE TABLE foo (bar TEXT COLLATE NOCASE_NONLITERAL);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to create table for collation test"); - - // Insert one row we want to match - err = [db executeSQL:[NSString stringWithFormat: - @"INSERT INTO foo (bar) VALUES ('%@');", - [NSString stringWithCString:"Frédéric" encoding:NSUTF8StringEncoding]]]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - // Create blank rows to test matching inside collation functions - err = [db executeSQL:@"insert into foo (bar) values ('');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - err = [db executeSQL:@"insert into foo (bar) values ('');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - // Loop over a few things all of which should match - NSArray *testArray = [NSArray arrayWithObjects: - [NSString stringWithCString:"Frédéric" - encoding:NSUTF8StringEncoding], - [NSString stringWithCString:"frédéric" - encoding:NSUTF8StringEncoding], - [NSString stringWithCString:"FRÉDÉRIC" - encoding:NSUTF8StringEncoding], - nil]; - NSString *testString = nil; - GTM_FOREACH_OBJECT(testString, testArray) { - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE bar == '%@';", testString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - int count = 0; - while ([statement stepRow] == SQLITE_ROW) { - count++; - } - STAssertEquals(count, 1, @"Wrong number of collated rows for \"%@\"", - testString); - [statement finalizeStatement]; - } - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:@"select * from foo;" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - - while ([statement stepRow] == SQLITE_ROW) ; - [statement finalizeStatement]; - -} - -- (void)testUpperLower { - - // Test our custom UPPER/LOWER implementation, need a database and statement - // to do it. - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - GTMSQLiteStatement *statement = nil; - - // Test simple ASCII - statement = [GTMSQLiteStatement statementWithSQL:@"SELECT LOWER('Fred');" - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - @"fred", - @"LOWER failed for ASCII string"); - [statement finalizeStatement]; - - statement = [GTMSQLiteStatement statementWithSQL:@"SELECT UPPER('Fred');" - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - @"FRED", - @"UPPER failed for ASCII string"); - - [statement finalizeStatement]; - // Test UTF-8, have to do some dancing to make the compiler take - // UTF8 literals - NSString *utfNormalString = - [NSString stringWithCString:"Frédéric" - encoding:NSUTF8StringEncoding]; - NSString *utfLowerString = - [NSString stringWithCString:"frédéric" - encoding:NSUTF8StringEncoding]; - NSString *utfUpperString = - [NSString stringWithCString:"FRÉDÉRIC" encoding:NSUTF8StringEncoding]; - - statement = - [GTMSQLiteStatement statementWithSQL: - [NSString stringWithFormat:@"SELECT LOWER('%@');", utfNormalString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - utfLowerString, - @"UPPER failed for UTF8 string"); - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL: - [NSString stringWithFormat:@"SELECT UPPER('%@');", utfNormalString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - utfUpperString, - @"UPPER failed for UTF8 string"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"Should be done"); - [statement finalizeStatement]; -} - -- (void)testUpperLower16 { - - // Test our custom UPPER/LOWER implementation, need a database and - // statement to do it. - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] - autorelease]; - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - GTMSQLiteStatement *statement = nil; - - // Test simple ASCII - statement = [GTMSQLiteStatement statementWithSQL:@"SELECT LOWER('Fred');" - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - @"fred", - @"LOWER failed for ASCII string"); - [statement finalizeStatement]; - - statement = [GTMSQLiteStatement statementWithSQL:@"SELECT UPPER('Fred');" - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertEqualObjects([statement resultStringAtPosition:0], - @"FRED", - @"UPPER failed for ASCII string"); - [statement finalizeStatement]; -} - -typedef struct { - BOOL upperCase; - int textRep; -} UpperLowerUserArgs; - -static void TestUpperLower16Impl(sqlite3_context *context, - int argc, sqlite3_value **argv); - -- (void)testUTF16DatabasesAreReallyUTF16 { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] - autorelease]; - - const struct { - const char *sqlName; - UpperLowerUserArgs userArgs; - void *function; - } customUpperLower[] = { - { "upper", { YES, SQLITE_UTF16 }, &TestUpperLower16Impl }, - { "upper", { YES, SQLITE_UTF16BE }, &TestUpperLower16Impl }, - { "upper", { YES, SQLITE_UTF16LE }, &TestUpperLower16Impl } - }; - - - sqlite3 *sqldb = [db sqlite3DB]; - int rc; - for (size_t i = 0; - i < (sizeof(customUpperLower) / sizeof(customUpperLower[0])); - i++) { - rc = sqlite3_create_function(sqldb, - customUpperLower[i].sqlName, - 1, - customUpperLower[i].userArgs.textRep, - (void *)&customUpperLower[i].userArgs, - customUpperLower[i].function, - NULL, - NULL); - STAssertEquals(rc, SQLITE_OK, - @"Failed to register upper function" - @"with SQLite db"); - } - - customUpperFunctionCalled = NO; - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:@"SELECT UPPER('Fred');" - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"Failed to step row"); - STAssertTrue(customUpperFunctionCalled, - @"Custom upper function was not called!"); - [statement finalizeStatement]; -} - -- (void)testLikeComparisonOptions { - int err; - - GTMSQLiteDatabase *db8 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - - GTMSQLiteDatabase *db16 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] autorelease]; - - NSArray *databases = [NSArray arrayWithObjects:db8, db16, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - CFOptionFlags c = 0, oldFlags; - - oldFlags = [db likeComparisonOptions]; - - // We'll do a case sensitivity test by making comparison options - // case insensitive - [db setLikeComparisonOptions:c]; - - STAssertTrue([db likeComparisonOptions] == 0, - @"LIKE Comparison options setter/getter does not work!"); - - NSString *createString = nil; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - createString = @"CREATE TABLE foo (bar NODIACRITIC_WIDTHINSENSITIVE TEXT);"; -#else - createString = @"CREATE TABLE foo (bar TEXT);"; -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - - err = [db executeSQL:createString]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for like comparison options test"); - - err = [db executeSQL:@"insert into foo values('test like test');"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create row for like comparison options test"); - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:@"select * from foo where bar like '%LIKE%'" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"failed to retrieve row!"); - - // Now change it back to case insensitive and rerun the same query - c |= kCFCompareCaseInsensitive; - [db setLikeComparisonOptions:c]; - err = [statement reset]; - STAssertEquals(err, SQLITE_OK, @"failed to reset select statement"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to retrieve row!"); - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - // Now try adding in 10.5 only flags - c |= (kCFCompareDiacriticInsensitive | kCFCompareWidthInsensitive); - [db setLikeComparisonOptions:c]; - // Make a new statement - [statement finalizeStatement]; - statement = - [GTMSQLiteStatement statementWithSQL:@"select * from foo where bar like '%LIKE%'" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"failed to create statement"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to retrieve row!"); -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - - // Now reset comparison options - [db setLikeComparisonOptions:oldFlags]; - - [statement finalizeStatement]; - } -} - -- (void)testGlobComparisonOptions { - int err; - GTMSQLiteDatabase *db = [[[GTMSQLiteDatabase alloc] - initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - - CFOptionFlags c = 0, oldFlags; - - oldFlags = [db globComparisonOptions]; - - [db setGlobComparisonOptions:c]; - - STAssertTrue([db globComparisonOptions] == 0, - @"GLOB Comparison options setter/getter does not work!"); - - err = [db executeSQL:@"CREATE TABLE foo (bar TEXT);"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for glob comparison options test"); - - err = [db executeSQL:@"insert into foo values('test like test');"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create row for glob comparison options test"); - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:@"select * from foo where bar GLOB 'TEST*'" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"failed to retrieve row!"); - - // Now change it back to case insensitive and rerun the same query - c |= kCFCompareCaseInsensitive; - [db setGlobComparisonOptions:c]; - err = [statement reset]; - STAssertEquals(err, SQLITE_OK, @"failed to reset select statement"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to retrieve row!"); - - [statement finalizeStatement]; - - // Now reset comparison options - [db setGlobComparisonOptions:oldFlags]; -} - -- (void)testCFStringReverseCollation { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - - err = [db executeSQL:@"CREATE table foo_reverse (bar TEXT COLLATE REVERSE);"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for reverse collation test"); - - err = [db executeSQL:@"insert into foo_reverse values('a2');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - err = [db executeSQL:@"insert into foo_reverse values('b1');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:@"SELECT bar from foo_reverse order by bar" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row"); - NSString *oneRow = [statement resultStringAtPosition:0]; - - STAssertEqualStrings(oneRow, @"b1", @"b did not come first!"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row!"); - - STAssertEquals(err, [db lastErrorCode], - @"lastErrorCode API did not match what last API returned!"); - // Calling lastErrorCode resets API error, so the next string will not indicate any error - STAssertEqualStrings(@"not an error", [db lastErrorString], - @"lastErrorString API did not match expected string!"); - - oneRow = [statement resultStringAtPosition:0]; - STAssertEqualStrings(oneRow, @"a2", @"a did not come second!"); - - [statement finalizeStatement]; -} - -- (void)testCFStringNumericCollation { - int err; - GTMSQLiteDatabase *db = [[[GTMSQLiteDatabase alloc] - initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - - err = [db executeSQL: - @"CREATE table numeric_test_table " - @"(numeric_sort TEXT COLLATE NUMERIC, lexographic_sort TEXT);"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for numeric collation test"); - - err = [db executeSQL:@"insert into numeric_test_table values('4','17');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - err = [db executeSQL:@"insert into numeric_test_table values('17','4');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:@"SELECT numeric_sort from numeric_test_table order by numeric_sort" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row"); - NSString *oneRow = [statement resultStringAtPosition:0]; - - STAssertEqualStrings(oneRow, @"4", @"4 did not come first!"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row!"); - - oneRow = [statement resultStringAtPosition:0]; - STAssertEqualStrings(oneRow, @"17", @"17 did not come second!"); - - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL: - @"SELECT lexographic_sort from numeric_test_table " - @"order by lexographic_sort" - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"failed to create statement for lexographic sort"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row"); - oneRow = [statement resultStringAtPosition:0]; - - STAssertEqualStrings(oneRow, @"17", @"17 did not come first!"); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, @"failed to advance row!"); - - oneRow = [statement resultStringAtPosition:0]; - STAssertEqualStrings(oneRow, @"4", @"4 did not come second!"); - - [statement finalizeStatement]; -} - -- (void)testCFStringCollation { - - // Test just one case of the collations, they all exercise largely the - // same code - int err; - GTMSQLiteDatabase *db = - [[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err]; - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - err = [db executeSQL: - @"CREATE TABLE foo (bar TEXT COLLATE NOCASE_NONLITERAL_LOCALIZED);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to create table for collation test"); - - // Insert one row we want to match - err = [db executeSQL:[NSString stringWithFormat: - @"INSERT INTO foo (bar) VALUES ('%@');", - [NSString stringWithCString:"Frédéric" encoding:NSUTF8StringEncoding]]]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute SQL"); - - // Loop over a few things all of which should match - NSArray *testArray = [NSArray arrayWithObjects: - [NSString stringWithCString:"Frédéric" - encoding:NSUTF8StringEncoding], - [NSString stringWithCString:"frédéric" - encoding:NSUTF8StringEncoding], - [NSString stringWithCString:"FRÉDÉRIC" - encoding:NSUTF8StringEncoding], - nil]; - - NSString *testString = nil; - GTM_FOREACH_OBJECT(testString, testArray) { - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL:[NSString stringWithFormat: - @"SELECT bar FROM foo WHERE bar == '%@';", testString] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - int count = 0; - while ([statement stepRow] == SQLITE_ROW) { - count++; - } - STAssertEquals(count, 1, @"Wrong number of collated rows for \"%@\"", - testString); - [statement finalizeStatement]; - } - - // Force a release to test the statement cleanup - [db release]; - -} - -- (void)testDiacriticAndWidthInsensitiveCollations { - // Diacritic & width insensitive collations are not supported - // on Tiger, so most of the test is Leopard or later -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - NSString *tableSQL = - @"CREATE TABLE FOOBAR (collated TEXT COLLATE NODIACRITIC_WIDTHINSENSITIVE, " - @" noncollated TEXT);"; - - err = [db executeSQL:tableSQL]; - STAssertEquals(err, SQLITE_OK, @"error creating table"); - - NSString *testStringValue = [NSString stringWithCString:"Frédéric" - encoding:NSUTF8StringEncoding]; - // Insert one row we want to match - err = [db executeSQL:[NSString stringWithFormat: - @"INSERT INTO FOOBAR (collated, noncollated) " - @"VALUES ('%@','%@');", - testStringValue, testStringValue]]; - - GTMSQLiteStatement *statement = - [GTMSQLiteStatement statementWithSQL: - [NSString stringWithFormat:@"SELECT noncollated FROM foobar" - @" WHERE noncollated == 'Frederic';"] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - // Make sure the comparison query didn't return a row because - // we're doing a comparison on the row without the collation - STAssertEquals([statement stepRow], SQLITE_DONE, - @"Comparison with diacritics did not succeed"); - - [statement finalizeStatement]; - - statement = - [GTMSQLiteStatement statementWithSQL: - [NSString stringWithFormat:@"SELECT collated FROM foobar" - @" WHERE collated == 'Frederic';"] - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - STAssertEquals([statement stepRow], SQLITE_ROW, - @"Comparison ignoring diacritics did not succeed"); - [statement finalizeStatement]; -#else - // On Tiger just make sure it causes the dev log. - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] autorelease]; - STAssertNotNil(db, @"Failed to create DB"); - STAssertEquals(err, SQLITE_OK, @"Failed to create DB"); - - NSString *tableSQL = - @"CREATE TABLE FOOBAR (collated TEXT" - @" COLLATE NODIACRITIC_WIDTHINSENSITIVE_NOCASE," - @" noncollated TEXT);"; - - // Expect one log for each unsupported flag - [GTMUnitTestDevLog expect:2 - casesOfString:@"GTMSQLiteDatabase 10.5 collating not available " - @"on 10.4 or earlier"]; - err = [db executeSQL:tableSQL]; - STAssertEquals(err, SQLITE_OK, @"error creating table"); - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -} - -- (void)testCFStringLikeGlob { - - // Test cases drawn from SQLite test case source - int err; - GTMSQLiteDatabase *db8 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - STAssertNotNil(db8, @"Failed to create database"); - STAssertEquals(err, SQLITE_OK, @"Failed to create database"); - - GTMSQLiteDatabase *db16 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:NO - errorCode:&err] - autorelease]; - - STAssertNotNil(db16, @"Failed to create database"); - STAssertEquals(err, SQLITE_OK, @"Failed to create database"); - - NSArray *databases = [NSArray arrayWithObjects:db8, db16, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - err = [db executeSQL:@"CREATE TABLE t1 (x TEXT);"]; - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for LIKE/GLOB test"); - - // Insert data set - err = [db executeSQL:@"INSERT INTO t1 VALUES ('a');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('ab');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('abc');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('abcd');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('acd');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('abd');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('bc');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('bcd');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('xyz');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('ABC');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('CDE');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - err = [db executeSQL:@"INSERT INTO t1 VALUES ('ABC abc xyz');"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - - // Section 1, case tests - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"ABC", @"abc", nil]), - @"Fail on LIKE test 1.1"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'abc' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", nil]), - @"Fail on LIKE test 1.2"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'ABC' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"ABC", @"abc", nil]), - @"Fail on LIKE test 1.3"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"ABC", @"ABC abc xyz", @"abc", @"abcd", nil]), - @"Fail on LIKE test 3.1"); - [db setLikeComparisonOptions:(kCFCompareNonliteral)]; - err = [db executeSQL:@"CREATE INDEX i1 ON t1(x);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.3"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'a_c' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", nil]), - @"Fail on LIKE test 3.5"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'ab%d' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abcd", @"abd", nil]), - @"Fail on LIKE test 3.7"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'a_c%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.9"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE '%bcd' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abcd", @"bcd", nil]), - @"Fail on LIKE test 3.11"); - [db setLikeComparisonOptions:(kCFCompareNonliteral | kCFCompareCaseInsensitive)]; - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"ABC", @"ABC abc xyz", @"abc", @"abcd", nil]), - @"Fail on LIKE test 3.13"); - [db setLikeComparisonOptions:(kCFCompareNonliteral)]; - err = [db executeSQL:@"DROP INDEX i1;"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.15"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'abc*' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.17"); - err = [db executeSQL:@"CREATE INDEX i1 ON t1(x);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'abc*' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.19"); - [db setLikeComparisonOptions:(kCFCompareNonliteral)]; - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'abc*' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 3.21"); - [db setLikeComparisonOptions:(kCFCompareNonliteral | - kCFCompareCaseInsensitive)]; - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'a[bc]d' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abd", @"acd", nil]), - @"Fail on LIKE test 3.23"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a[^xyz]d' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abd", @"acd", nil]), - @"Fail on glob inverted character set test 3.24"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a[^' ORDER BY 1;"), - ([NSArray array]), - @"Fail on glob inverted character set test 3.25"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a['"), - ([NSArray array]), - @"Unclosed glob character set did not return empty result set 3.26"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a[^]'"), - ([NSArray array]), - @"Unclosed glob inverted character set did not return empty " - @"result set 3.27"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a[^]c]d'"), - ([NSArray arrayWithObjects:@"abd", nil]), - @"Glob character set with inverted set not matching ] did not " - @"return right rows 3.28"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x GLOB 'a[bcdefg'"), - ([NSArray array]), - @"Unclosed glob character set did not return empty result set 3.29"); - - // Section 4 - [db setLikeComparisonOptions:(kCFCompareNonliteral)]; - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 4.1"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE +x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 4.2"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE ('ab' || 'c%') ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 4.3"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x LIKE 'a[xyz]\%' ESCAPE ''"), - ([NSArray array]), - @"0-Character escape clause did not return empty set 4.4"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x LIKE " - @"'a[xyz]\%' ESCAPE NULL"), - ([NSArray array]), - @"Null escape did not return empty set 4.5"); - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x from t1 where x LIKE 'a[xyz]\\%' " - @"ESCAPE '\\'"), - ([NSArray array]), - @"Literal percent match using ESCAPE clause did not return empty result " - @"set 4.6"); - - - // Section 5 - [db setLikeComparisonOptions:(kCFCompareNonliteral | kCFCompareCaseInsensitive)]; - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"ABC", @"ABC abc xyz", @"abc", @"abcd", nil]), - @"Fail on LIKE test 5.1"); - - err = [db executeSQL:@"CREATE TABLE t2(x COLLATE NOCASE);"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - - err = [db executeSQL:@"INSERT INTO t2 SELECT * FROM t1;"]; - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - - err = [db executeSQL:@"CREATE INDEX i2 ON t2(x COLLATE NOCASE);"]; - - STAssertEquals(err, SQLITE_OK, @"Failed to execute sql"); - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t2 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"ABC", @"ABC abc xyz", @"abcd", nil]), - @"Fail on LIKE test 5.3"); - - [db setLikeComparisonOptions:(kCFCompareNonliteral)]; - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t2 WHERE x LIKE 'abc%' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 5.5"); - - [db setLikeComparisonOptions:(kCFCompareNonliteral | kCFCompareCaseInsensitive)]; - - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t2 WHERE x GLOB 'abc*' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abc", @"abcd", nil]), - @"Fail on LIKE test 5.5"); - - // Non standard tests not from the SQLite source - STAssertEqualObjects( - LikeGlobTestHelper(db, - @"SELECT x FROM t1 WHERE x GLOB 'a[b-d]d' ORDER BY 1;"), - ([NSArray arrayWithObjects:@"abd", @"acd", nil]), - @"Fail on GLOB with character range"); - } -} - -- (void)testDescription { - int err; - GTMSQLiteDatabase *db8 = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - STAssertNotNil(db8, @"Failed to create database"); - STAssertEquals(err, SQLITE_OK, @"Failed to create database"); - STAssertNotNil([db8 description], nil); -} - -// // From GTMSQLite.m -// CFStringEncoding SqliteTextEncodingToCFStringEncoding(int enc); - -// - (void)testEncodingMappingIsCorrect { -// STAssertTrue(SqliteTextEncodingToCFStringEncoding(SQLITE_UTF8) == -// kCFStringEncodingUTF8, -// @"helper method didn't return right encoding for " -// @"kCFStringEncodingUTF8"); - -// STAssertTrue(SqliteTextEncodingToCFStringEncoding(SQLITE_UTF16BE) -// == kCFStringEncodingUTF16BE, -// @"helper method didn't return right encoding for " -// @"kCFStringEncodingUTF16BE"); - -// STAssertTrue(SqliteTextEncodingToCFStringEncoding(SQLITE_UTF16LE) -// == kCFStringEncodingUTF16LE, -// @"helper method didn't return right encoding for " -// @"kCFStringEncodingUTF16LE"); - -// STAssertTrue(SqliteTextEncodingToCFStringEncoding(9999) -// == kCFStringEncodingUTF8, @"helper method didn't " -// @"return default encoding for invalid input"); -// } - -@end - - -// Helper function for LIKE/GLOB testing -static NSArray* LikeGlobTestHelper(GTMSQLiteDatabase *db, NSString *sql) { - - int err; - NSMutableArray *resultArray = [NSMutableArray array]; - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:sql - inDatabase:db - errorCode:&err]; - if (!statement || err != SQLITE_OK) return nil; - while ([statement stepRow] == SQLITE_ROW) { - id result = [statement resultFoundationObjectAtPosition:0]; - if (result) [resultArray addObject:result]; - } - if (err != SQLITE_DONE && err != SQLITE_OK) resultArray = nil; - [statement finalizeStatement]; - - return resultArray; -} - -// ============================================================================= - -@implementation GTMSQLiteStatementTest - -#pragma mark Parameters/binding tests - -- (void)testInitAPI { - int err; - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:nil - inDatabase:nil - errorCode:&err]; - STAssertNil(statement, @"Create statement succeeded with nil SQL string"); - STAssertEquals(err, SQLITE_MISUSE, @"Err was not SQLITE_MISUSE on nil " - @"SQL string"); - - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - statement = [GTMSQLiteStatement statementWithSQL:@"select * from blah" - inDatabase:db - errorCode:&err]; - - STAssertNil(statement, @"Select statement succeeded with invalid table"); - STAssertNotEquals(err, SQLITE_OK, - @"Err was not SQLITE_MISUSE on invalid table"); - - [statement finalizeStatement]; -} - -- (void)testParameterCountAPI { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - NSString *tableCreateSQL = - @"CREATE TABLE foo (tc TEXT," - @"ic integer," - @"rc real," - @"bc blob);"; - - err = [db executeSQL:tableCreateSQL]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for collation test"); - NSString *insert = - @"insert into foo (tc, ic, rc, bc) values (:tc, :ic, :rc, :bc);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - STAssertEquals([statement parameterCount], 4, - @"Bound parameter count was not 4"); - - [statement sqlite3Statement]; - [statement finalizeStatement]; -} - -- (void)testPositionOfNamedParameterAPI { - int err; - - GTMSQLiteDatabase *dbWithCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - GTMSQLiteDatabase *dbWithoutCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:NO - utf8:YES - errorCode:&err] - autorelease]; - - NSArray *databases = [NSArray arrayWithObjects:dbWithCF, dbWithoutCF, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - NSString *tableCreateSQL = - @"CREATE TABLE foo (tc TEXT," - @"ic integer," - @"rc real," - @"bc blob);"; - err = [db executeSQL:tableCreateSQL]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for collation test"); - NSString *insert = - @"insert into foo (tc, ic, rc, bc) " - @"values (:tc, :ic, :rc, :bc);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create statement"); - - NSArray *parameterNames = [NSArray arrayWithObjects:@":tc", - @":ic", - @":rc", - @":bc", nil]; - - for (unsigned int i = 1; i <= [parameterNames count]; i++) { - NSString *paramName = [parameterNames objectAtIndex:i-1]; - // Cast to signed int to avoid type errors from STAssertEquals - STAssertEquals((int)i, - [statement positionOfParameterNamed:paramName], - @"positionOfParameterNamed API did not return correct " - @"results"); - STAssertEqualStrings(paramName, - [statement nameOfParameterAtPosition:i], - @"nameOfParameterAtPosition API did not return " - @"correct name"); - } - [statement finalizeStatement]; - } -} - -- (void)testBindingBlob { - int err; - const int BLOB_COLUMN = 0; - GTMSQLiteDatabase *dbWithCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - GTMSQLiteDatabase *dbWithoutCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:NO - utf8:YES - errorCode:&err] - autorelease]; - - NSArray *databases = [NSArray arrayWithObjects:dbWithCF, dbWithoutCF, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - // Test strategy is to create a table with 3 columns - // Insert some values, and use the result collection APIs - // to make sure we get the same values back - err = [db executeSQL: - @"CREATE TABLE blobby (bc blob);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for BLOB binding test"); - NSString *insert = @"insert into blobby (bc) values (:bc);"; - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - char bytes[] = "DEADBEEF"; - NSUInteger bytesLen = strlen(bytes); - NSData *originalBytes = [NSData dataWithBytes:bytes length:bytesLen]; - - err = [statement bindBlobAtPosition:1 data:originalBytes]; - - STAssertEquals(err, SQLITE_OK, @"error binding BLOB at position 1"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"failed to insert BLOB for BLOB test"); - - [statement finalizeStatement]; - - NSString *selectSQL = @"select * from blobby;"; - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - STAssertEquals([statement resultColumnCount], 1, - @"result had more columns than the table had?"); - - STAssertEqualStrings([statement resultColumnNameAtPosition:BLOB_COLUMN], - @"bc", - @"column name dictionary was not correct"); - - STAssertEquals([statement rowDataCount], - 1, - @"More than one column returned?"); - - STAssertEquals([statement resultColumnTypeAtPosition:BLOB_COLUMN], - SQLITE_BLOB, - @"Query for column 1 of test table was not BLOB!"); - - NSData *returnedbytes = [statement resultBlobDataAtPosition:BLOB_COLUMN]; - STAssertTrue([originalBytes isEqualToData:returnedbytes], - @"Queried data was not equal :-("); - [statement finalizeStatement]; - } -} - -- (void)testBindingNull { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - err = [db executeSQL: - @"CREATE TABLE foo (tc TEXT);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for NULL binding test"); - NSString *insert = @"insert into foo (tc) values (:tc);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - err = [statement bindSQLNullAtPosition:1]; - - STAssertEquals(err, SQLITE_OK, @"error binding NULL at position 1"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"failed to insert NULL for Null Binding test"); - - [statement finalizeStatement]; - - NSString *selectSQL = @"select 1 from foo where tc is NULL;"; - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - [statement finalizeStatement]; -} - -- (void)testBindingDoubles { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - // Test strategy is to create a table with 2 real columns. - // For the first one, we'll use bindDoubleAtPosition - // For the second one, we'll use bindNumberAsDoubleAtPosition - // Then, for verification, we'll use a query that returns - // all rows where the columns are equal - double testVal = 42.42; - NSNumber *doubleValue = [NSNumber numberWithDouble:testVal]; - - err = [db executeSQL: - @"CREATE TABLE realTable (rc1 REAL, rc2 REAL);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for double binding test"); - NSString *insert = @"insert into realTable (rc1, rc2) values (:rc1, :rc2);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - err = [statement bindDoubleAtPosition:1 value:testVal]; - STAssertEquals(err, SQLITE_OK, @"error binding double at position 1"); - - err = [statement bindNumberAsDoubleAtPosition:2 number:doubleValue]; - STAssertEquals(err, SQLITE_OK, - @"error binding number as double at " - @"position 2"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, - @"failed to insert doubles for double " - @"binding test"); - - [statement finalizeStatement]; - - NSString *selectSQL = @"select rc1, rc2 from realTable where rc1 = rc2;"; - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - double retrievedValue = [statement resultDoubleAtPosition:0]; - STAssertEquals(retrievedValue, testVal, - @"Retrieved double did not equal " - @"original"); - - NSNumber *retrievedNumber = [statement resultNumberAtPosition:1]; - STAssertEqualObjects(retrievedNumber, doubleValue, - @"Retrieved NSNumber object did not equal"); - - [statement finalizeStatement]; -} - -- (void) testResultCollectionAPI { - int err; - GTMSQLiteDatabase *dbWithCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - GTMSQLiteDatabase *dbWithoutCF = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:NO - utf8:YES - errorCode:&err] - autorelease]; - - NSArray *databases = [NSArray arrayWithObjects:dbWithCF, dbWithoutCF, nil]; - GTMSQLiteDatabase *db; - GTM_FOREACH_OBJECT(db, databases) { - // Test strategy is to create a table with 3 columns - // Insert some values, and use the result collection APIs - // to make sure we get the same values back - err = [db executeSQL: - @"CREATE TABLE test (a integer, b text, c blob, d text);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for result collection test"); - - NSString *insert = - @"insert into test (a, b, c, d) " - @"values (42, 'text text', :bc, null);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - - char blobChars[] = "DEADBEEF"; - NSUInteger blobLength = strlen(blobChars); - NSData *blobData = [NSData dataWithBytes:blobChars length:blobLength]; - - err = [statement bindBlobAtPosition:1 data:blobData]; - STAssertEquals(err, SQLITE_OK, @"error binding BLOB at position 1"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, - @"failed to insert doubles for double " - @"binding test"); - - NSString *selectSQL = @"select * from test;"; - - [statement finalizeStatement]; - - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - STAssertNotNil([statement resultRowArray], - @"Failed to retrieve result array"); - STAssertNotNil([statement resultRowDictionary], - @"Failed to retrieve result dictionary"); - [statement finalizeStatement]; - } -} - -- (void) testBindingIntegers { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - // Test strategy is to create a table with 2 real columns. - // For the first one, we'll use bindIntegerAtPosition - // For the second one, we'll use bindNumberAsIntegerAtPosition - // Then, for verification, we'll use a query that returns - // all rows where the columns are equal - int testVal = 42; - NSNumber *intValue = [NSNumber numberWithInt:testVal]; - - err = [db executeSQL: - @"CREATE TABLE integerTable (ic1 integer, ic2 integer);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for integer binding test"); - NSString *insert = - @"insert into integerTable (ic1, ic2) values (:ic1, :ic2);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - err = [statement bindInt32AtPosition:1 value:testVal]; - STAssertEquals(err, SQLITE_OK, @"error binding integer at position 1"); - - err = [statement bindNumberAsInt32AtPosition:2 number:intValue]; - STAssertEquals(err, SQLITE_OK, - @"error binding number as integer at " - @"position 2"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, - @"failed to insert integers for integer " - @"binding test"); - - [statement finalizeStatement]; - - NSString *selectSQL = @"select ic1, ic2 from integerTable where ic1 = ic2;"; - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - int retrievedValue = [statement resultInt32AtPosition:0]; - STAssertEquals(retrievedValue, testVal, - @"Retrieved integer did not equal " - @"original"); - - NSNumber *retrievedNumber = [statement resultNumberAtPosition:1]; - STAssertEqualObjects(retrievedNumber, intValue, - @"Retrieved NSNumber object did not equal"); - - [statement finalizeStatement]; -} - -- (void) testBindingLongLongs { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - // Test strategy is to create a table with 2 long long columns. - // For the first one, we'll use bindLongLongAtPosition - // For the second one, we'll use bindNumberAsLongLongAtPosition - // Then, for verification, we'll use a query that returns - // all rows where the columns are equal - long long testVal = LLONG_MAX; - NSNumber *longlongValue = [NSNumber numberWithLongLong:testVal]; - - err = [db executeSQL: - @"CREATE TABLE longlongTable (llc1 integer, llc2 integer);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for long long binding test"); - NSString *insert = - @"insert into longlongTable (llc1, llc2) " - @"values (:llc1, :llc2);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - err = [statement bindLongLongAtPosition:1 value:testVal]; - STAssertEquals(err, SQLITE_OK, @"error binding long long at position 1"); - - err = [statement bindNumberAsLongLongAtPosition:2 number:longlongValue]; - STAssertEquals(err, SQLITE_OK, - @"error binding number as long long at " - @"position 2"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, - @"failed to insert long longs for long long " - @"binding test"); - - [statement finalizeStatement]; - - NSString *selectSQL = @"select llc1, llc2 from longlongTable where llc1 = llc2;"; - - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - long long retrievedValue = [statement resultLongLongAtPosition:0]; - STAssertEquals(retrievedValue, testVal, - @"Retrieved long long did not equal " - @"original"); - - NSNumber *retrievedNumber = [statement resultNumberAtPosition:1]; - STAssertEqualObjects(retrievedNumber, longlongValue, - @"Retrieved NSNumber object did not equal"); - - [statement finalizeStatement]; -} - -- (void) testBindingString { - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - // Test strategy is to create a table with 1 string column - // Then, for verification, we'll use a query that returns - // all rows where the strings are equal - err = [db executeSQL: - @"CREATE TABLE stringTable (sc1 text);"]; - - STAssertEquals(err, SQLITE_OK, - @"Failed to create table for string binding test"); - - NSString *insert = - @"insert into stringTable (sc1) " - @"values (:sc1);"; - - GTMSQLiteStatement *statement = [GTMSQLiteStatement statementWithSQL:insert - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create insert statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create insert statement"); - - NSString *testVal = @"this is a test string"; - err = [statement bindStringAtPosition:1 string:testVal]; - STAssertEquals(err, SQLITE_OK, @"error binding string at position 1"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, - @"failed to insert string for string binding test"); - - [statement finalizeStatement]; - - NSString *selectSQL = - [NSString stringWithFormat:@"select 1 from stringtable where sc1 = '%@';", - testVal]; - - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - // Check that we got at least one row back - STAssertEquals(err, SQLITE_ROW, @"did not retrieve a row from db :-("); - err = [statement stepRow]; - STAssertEquals(err, SQLITE_DONE, @"retrieved more than 1 row from db :-("); - [statement finalizeStatement]; -} - -- (void)testThatNotFinalizingStatementsThrowsAssertion { - // The run-time check is discouraged, but we're using it because the - // same test binary is used for both GC & Non-GC runs - if (!GTMIsGarbageCollectionEnabled()) { - NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; - - int err; - GTMSQLiteDatabase *db = - [[[GTMSQLiteDatabase alloc] initInMemoryWithCFAdditions:YES - utf8:YES - errorCode:&err] - autorelease]; - - STAssertNotNil(db, @"Failed to create database"); - - NSString *selectSQL = @"select 1"; - GTMSQLiteStatement *statement; - statement = [GTMSQLiteStatement statementWithSQL:selectSQL - inDatabase:db - errorCode:&err]; - - STAssertNotNil(statement, @"Failed to create select statement"); - STAssertEquals(err, SQLITE_OK, @"Failed to create select statement"); - - err = [statement stepRow]; - STAssertEquals(err, SQLITE_ROW, - @"failed to step row for finalize test"); - - NSString *expectedLog = - @"-[GTMSQLiteStatement finalizeStatement] must be called " - @"when statement is no longer needed"; - - [GTMUnitTestDevLog expectString:expectedLog]; - [GTMUnitTestDevLog expectPattern:@"Unable to close .*"]; - [localPool drain]; - } -} - -- (void)testCompleteSQLString { - NSString *str = @"CREATE TABLE longlongTable (llc1 integer, llc2 integer);"; - BOOL isComplete = [GTMSQLiteStatement isCompleteStatement:str]; - STAssertTrue(isComplete, nil); - isComplete = [GTMSQLiteStatement isCompleteStatement:@""]; - STAssertTrue(isComplete, nil); - isComplete = [GTMSQLiteStatement isCompleteStatement:@"CR"]; - STAssertFalse(isComplete, nil); -} - -- (void)testQuotingSQLString { - NSString *str = @"This is wild! It's fun!"; - NSString *str2 = [GTMSQLiteStatement quoteAndEscapeString:str]; - STAssertEqualObjects(str2, @"'This is wild! It''s fun!'", nil); - str2 = [GTMSQLiteStatement quoteAndEscapeString:@""]; - STAssertEqualObjects(str2, @"''", nil); -} - -- (void)testVersion { - STAssertGreaterThan([GTMSQLiteDatabase sqliteVersionNumber], 0, nil); - STAssertNotNil([GTMSQLiteDatabase sqliteVersionString], nil); -} - -@end - -static void TestUpperLower16Impl(sqlite3_context *context, - int argc, sqlite3_value **argv) { - - customUpperFunctionCalled = YES; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.h deleted file mode 100644 index 226d75b2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.h +++ /dev/null @@ -1,134 +0,0 @@ -// -// GTMScriptRunner.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -/// Encapsulates the interaction with an interpreter for running scripts. -// This class manages the interaction with some command-line interpreter (e.g., -// a shell, perl, python) and allows you to run expressions through the -// interpreter, and even full scripts that reside in files on disk. By default, -// the "/bin/sh" interpreter is used, but others may be explicitly specified. -// This can be a convenient way to run quick shell commands from Cocoa, or even -// interact with other shell tools such as "bc", or even "gdb". -// -// It's important to note that by default commands and scripts will have their -// environments erased before execution. You can control the environment they -// get with the -setEnvironment: method. -// -// The best way to show what this class does is to show some examples. -// -// Examples: -// -// GTMScriptRunner *sr = [GTMScriptRunner runner]; -// NSString *output = [sr run:@"ls -l /dev/null"]; -// /* output == "crw-rw-rw- 1 root wheel 3, 2 Mar 22 10:35 /dev/null" */ -// -// GTMScriptRunner *sr = [GTMScriptRunner runner]; -// NSString *output = [sr runScript:@"/path/to/my/script.sh"]; -// /* output == the standard output from the script*/ -// -// GTMScriptRunner *sr = [GTMScriptRunner runnerWithPerl]; -// NSString *output = [sr run:@"print 'A'x4"]; -// /* output == "AAAA" */ -// -// See the unit test file for more examples. -// -@interface GTMScriptRunner : NSObject { - @private - NSString *interpreter_; - NSArray *interpreterArgs_; - NSDictionary *environment_; - BOOL trimsWhitespace_; -} - -// Convenience methods for returning autoreleased GTMScriptRunner instances, that -// are associated with the specified interpreter. The default interpreter -// (returned from +runner is "/bin/sh"). -+ (GTMScriptRunner *)runner; -+ (GTMScriptRunner *)runnerWithBash; -+ (GTMScriptRunner *)runnerWithPerl; -+ (GTMScriptRunner *)runnerWithPython; - -// Returns an autoreleased GTMScriptRunner instance associated with the specified -// interpreter, and the given args. The specified args are the arguments that -// should be applied to the interpreter itself, not scripts run through the -// interpreter. For example, to start an interpreter using "perl -w", you could -// do: -// [GTMScriptRunner runnerWithInterpreter:@"/usr/bin/perl" -// withArgs:[NSArray arrayWithObject:@"-w"]]; -// -+ (GTMScriptRunner *)runnerWithInterpreter:(NSString *)interp; -+ (GTMScriptRunner *)runnerWithInterpreter:(NSString *)interp - withArgs:(NSArray *)args; - -// Returns a GTMScriptRunner associated with |interp| -- (id)initWithInterpreter:(NSString *)interp; - -// Returns a GTMScriptRunner associated with |interp| and |args| applied to the -// specified interpreter. This method is the designated initializer. -- (id)initWithInterpreter:(NSString *)interp withArgs:(NSArray *)args; - -// Runs the specified command string by sending it through the interpreter's -// standard input. The standard output is returned. The standard error is -// discarded. -- (NSString *)run:(NSString *)cmds; -// Same as the previous method, except the standard error is returned in |err| -// if specified. -- (NSString *)run:(NSString *)cmds standardError:(NSString **)err; - -// Runs the file at |path| using the interpreter. -- (NSString *)runScript:(NSString *)path; -// Runs the file at |path|, passing it |args| as arguments. -- (NSString *)runScript:(NSString *)path withArgs:(NSArray *)args; -// Same as above, except the standard error is returned in |err| if specified. -- (NSString *)runScript:(NSString *)path withArgs:(NSArray *)args - standardError:(NSString **)err; - -// Returns the environment dictionary to use for the inferior process that will -// run the interpreter. A return value of nil means that the interpreter's -// environment should be erased. -- (NSDictionary *)environment; - -// Sets the environment dictionary to use for the interpreter process. See -// NSTask's -setEnvironment: documentation for details about the dictionary. -// Basically, it's just a dict of key/value pairs corresponding to environment -// keys and values. Setting a value of nil means that the environment should be -// erased before running the interpreter. -// -// *** The default is nil. *** -// -// By default, all interpreters will run with a clean environment. If you want -// the interpreter process to inherit your current environment you'll need to -// do the following: -// -// GTMScriptRunner *sr = [GTMScriptRunner runner]; -// [sr setEnvironment:[[NSProcessInfo processInfo] environment]]; -// -// SECURITY NOTE: That said, in general you should NOT do this because an -// attacker can modify the environment that would then get sent to your scripts. -// And if your binary is suid, then you ABSOLUTELY should not do this. -// -- (void)setEnvironment:(NSDictionary *)newEnv; - -// Sets (and returns) whether or not whitespace is automatically trimmed from -// the ends of the returned strings. The default is YES, so trailing newlines -// will be removed. -- (BOOL)trimsWhitespace; -- (void)setTrimsWhitespace:(BOOL)trim; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.m deleted file mode 100644 index fce69156..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunner.m +++ /dev/null @@ -1,254 +0,0 @@ -// -// GTMScriptRunner.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMScriptRunner.h" -#import "GTMDefines.h" - -static BOOL LaunchNSTaskCatchingExceptions(NSTask *task); - -@interface GTMScriptRunner (PrivateMethods) -- (NSTask *)interpreterTaskWithAdditionalArgs:(NSArray *)args; -@end - -@implementation GTMScriptRunner - -+ (GTMScriptRunner *)runner { - return [[[self alloc] init] autorelease]; -} - -+ (GTMScriptRunner *)runnerWithBash { - return [self runnerWithInterpreter:@"/bin/bash"]; -} - -+ (GTMScriptRunner *)runnerWithPerl { - return [self runnerWithInterpreter:@"/usr/bin/perl"]; -} - -+ (GTMScriptRunner *)runnerWithPython { - return [self runnerWithInterpreter:@"/usr/bin/python"]; -} - -+ (GTMScriptRunner *)runnerWithInterpreter:(NSString *)interp { - return [self runnerWithInterpreter:interp withArgs:nil]; -} - -+ (GTMScriptRunner *)runnerWithInterpreter:(NSString *)interp withArgs:(NSArray *)args { - return [[[self alloc] initWithInterpreter:interp withArgs:args] autorelease]; -} - -- (id)init { - return [self initWithInterpreter:nil]; -} - -- (id)initWithInterpreter:(NSString *)interp { - return [self initWithInterpreter:interp withArgs:nil]; -} - -- (id)initWithInterpreter:(NSString *)interp withArgs:(NSArray *)args { - if ((self = [super init])) { - trimsWhitespace_ = YES; - interpreter_ = [interp copy]; - interpreterArgs_ = [args retain]; - if (!interpreter_) { - interpreter_ = @"/bin/sh"; - } - } - return self; -} - -- (void)dealloc { - [environment_ release]; - [interpreter_ release]; - [interpreterArgs_ release]; - [super dealloc]; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@<%p>{ interpreter = '%@', args = %@, environment = %@ }", - [self class], self, interpreter_, interpreterArgs_, environment_]; -} - -- (NSString *)run:(NSString *)cmds { - return [self run:cmds standardError:nil]; -} - -- (NSString *)run:(NSString *)cmds standardError:(NSString **)err { - if (!cmds) return nil; - - NSTask *task = [self interpreterTaskWithAdditionalArgs:nil]; - NSFileHandle *toTask = [[task standardInput] fileHandleForWriting]; - NSFileHandle *fromTask = [[task standardOutput] fileHandleForReading]; - - if (!LaunchNSTaskCatchingExceptions(task)) { - return nil; - } - - [toTask writeData:[cmds dataUsingEncoding:NSUTF8StringEncoding]]; - [toTask closeFile]; - - NSData *outData = [fromTask readDataToEndOfFile]; - NSString *output = [[[NSString alloc] initWithData:outData - encoding:NSUTF8StringEncoding] autorelease]; - - // Handle returning standard error if |err| is not nil - if (err) { - NSFileHandle *stderror = [[task standardError] fileHandleForReading]; - NSData *errData = [stderror readDataToEndOfFile]; - *err = [[[NSString alloc] initWithData:errData - encoding:NSUTF8StringEncoding] autorelease]; - if (trimsWhitespace_) { - *err = [*err stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - } - - // let folks test for nil instead of @"" - if ([*err length] < 1) { - *err = nil; - } - } - - [task terminate]; - - if (trimsWhitespace_) { - output = [output stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - } - - // let folks test for nil instead of @"" - if ([output length] < 1) { - output = nil; - } - - return output; -} - -- (NSString *)runScript:(NSString *)path { - return [self runScript:path withArgs:nil]; -} - -- (NSString *)runScript:(NSString *)path withArgs:(NSArray *)args { - return [self runScript:path withArgs:args standardError:nil]; -} - -- (NSString *)runScript:(NSString *)path withArgs:(NSArray *)args standardError:(NSString **)err { - if (!path) return nil; - - NSArray *scriptPlusArgs = [[NSArray arrayWithObject:path] arrayByAddingObjectsFromArray:args]; - NSTask *task = [self interpreterTaskWithAdditionalArgs:scriptPlusArgs]; - NSFileHandle *fromTask = [[task standardOutput] fileHandleForReading]; - - if (!LaunchNSTaskCatchingExceptions(task)) { - return nil; - } - - NSData *outData = [fromTask readDataToEndOfFile]; - NSString *output = [[[NSString alloc] initWithData:outData - encoding:NSUTF8StringEncoding] autorelease]; - - // Handle returning standard error if |err| is not nil - if (err) { - NSFileHandle *stderror = [[task standardError] fileHandleForReading]; - NSData *errData = [stderror readDataToEndOfFile]; - *err = [[[NSString alloc] initWithData:errData - encoding:NSUTF8StringEncoding] autorelease]; - if (trimsWhitespace_) { - *err = [*err stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - } - - // let folks test for nil instead of @"" - if ([*err length] < 1) { - *err = nil; - } - } - - [task terminate]; - - if (trimsWhitespace_) { - output = [output stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - } - - // let folks test for nil instead of @"" - if ([output length] < 1) { - output = nil; - } - - return output; -} - -- (NSDictionary *)environment { - return environment_; -} - -- (void)setEnvironment:(NSDictionary *)newEnv { - [environment_ autorelease]; - environment_ = [newEnv retain]; -} - -- (BOOL)trimsWhitespace { - return trimsWhitespace_; -} - -- (void)setTrimsWhitespace:(BOOL)trim { - trimsWhitespace_ = trim; -} - -@end - - -@implementation GTMScriptRunner (PrivateMethods) - -- (NSTask *)interpreterTaskWithAdditionalArgs:(NSArray *)args { - NSTask *task = [[[NSTask alloc] init] autorelease]; - [task setLaunchPath:interpreter_]; - [task setStandardInput:[NSPipe pipe]]; - [task setStandardOutput:[NSPipe pipe]]; - [task setStandardError:[NSPipe pipe]]; - - // If |environment_| is nil, then use an empty dictionary, otherwise use - // environment_ exactly. - [task setEnvironment:(environment_ - ? environment_ - : [NSDictionary dictionary])]; - - // Build args to interpreter. The format is: - // interp [args-to-interp] [script-name [args-to-script]] - NSArray *allArgs = nil; - if (interpreterArgs_) { - allArgs = interpreterArgs_; - } - if (args) { - allArgs = allArgs ? [allArgs arrayByAddingObjectsFromArray:args] : args; - } - if (allArgs){ - [task setArguments:allArgs]; - } - - return task; -} - -@end - -static BOOL LaunchNSTaskCatchingExceptions(NSTask *task) { - BOOL isOK = YES; - @try { - [task launch]; - } @catch (id ex) { - isOK = NO; - _GTMDevLog(@"Failed to launch interpreter '%@' due to: %@", - [task launchPath], ex); - } - return isOK; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunnerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunnerTest.m deleted file mode 100644 index 3d74b9eb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMScriptRunnerTest.m +++ /dev/null @@ -1,423 +0,0 @@ -// -// GTMScriptRunnerTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import -#import "GTMSenTestCase.h" -#import "GTMScriptRunner.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMScriptRunnerTest : GTMTestCase { - @private - NSString *shScript_; - NSString *perlScript_; - NSString *shOutputScript_; -} -@end - -@interface GTMScriptRunnerTest (PrivateMethods) -- (void)helperTestBourneShellUsingScriptRunner:(GTMScriptRunner *)sr; -@end - -@implementation GTMScriptRunnerTest - -- (void)setUp { - shScript_ = [NSString stringWithFormat:@"/tmp/script_runner_unittest_%d_%d_sh", geteuid(), getpid()]; - [@"#!/bin/sh\n" - @"i=1\n" - @"if [ -n \"$1\" ]; then\n" - @" i=$1\n" - @"fi\n" - @"echo $i\n" - writeToFile:shScript_ atomically:YES encoding:NSUTF8StringEncoding error:nil]; - - perlScript_ = [NSString stringWithFormat:@"/tmp/script_runner_unittest_%d_%d_pl", geteuid(), getpid()]; - [@"#!/usr/bin/perl\n" - @"use strict;\n" - @"my $i = 1;\n" - @"if (defined $ARGV[0]) {\n" - @" $i = $ARGV[0];\n" - @"}\n" - @"print \"$i\n\"\n" - writeToFile:perlScript_ atomically:YES encoding:NSUTF8StringEncoding error:nil]; - - shOutputScript_ = [NSString stringWithFormat:@"/tmp/script_runner_unittest_err_%d_%d_sh", geteuid(), getpid()]; - [@"#!/bin/sh\n" - @"if [ \"err\" = \"$1\" ]; then\n" - @" echo \" on err \" > /dev/stderr\n" - @"else\n" - @" echo \" on out \"\n" - @"fi\n" - writeToFile:shOutputScript_ atomically:YES encoding:NSUTF8StringEncoding error:nil]; -} - -- (void)tearDown { - const char *path = [shScript_ fileSystemRepresentation]; - if (path) { - unlink(path); - } - path = [perlScript_ fileSystemRepresentation]; - if (path) { - unlink(path); - } - path = [shOutputScript_ fileSystemRepresentation]; - if (path) { - unlink(path); - } -} - -- (void)testShCommands { - GTMScriptRunner *sr = [GTMScriptRunner runner]; - [self helperTestBourneShellUsingScriptRunner:sr]; -} - -- (void)testBashCommands { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithBash]; - [self helperTestBourneShellUsingScriptRunner:sr]; -} - -- (void)testZshCommands { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithInterpreter:@"/bin/zsh"]; - [self helperTestBourneShellUsingScriptRunner:sr]; -} - -- (void)testBcCommands { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithInterpreter:@"/usr/bin/bc" - withArgs:[NSArray arrayWithObject:@"-lq"]]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple expression (NOTE that bc requires that commands end with a newline) - output = [sr run:@"1 + 2\n"]; - STAssertEqualObjects(output, @"3", @"output should equal '3'"); - - // Simple expression with variables and multiple statements - output = [sr run:@"i=1; i+2\n"]; - STAssertEqualObjects(output, @"3", @"output should equal '3'"); - - // Simple expression with base conversion - output = [sr run:@"obase=2; 2^5\n"]; - STAssertEqualObjects(output, @"100000", @"output should equal '100000'"); - - // Simple expression with sine and cosine functions - output = [sr run:@"scale=3;s(0)+c(0)\n"]; - STAssertEqualObjects(output, @"1.000", @"output should equal '1.000'"); -} - -- (void)testPerlCommands { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithPerl]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple print - output = [sr run:@"print 'hi'"]; - STAssertEqualObjects(output, @"hi", @"output should equal 'hi'"); - - // Simple print x4 - output = [sr run:@"print 'A'x4"]; - STAssertEqualObjects(output, @"AAAA", @"output should equal 'AAAA'"); - - // Simple perl-y stuff - output = [sr run:@"my $i=0; until ($i++==41){} print $i"]; - STAssertEqualObjects(output, @"42", @"output should equal '42'"); -} - -- (void)testPythonCommands { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithPython]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple print - output = [sr run:@"print 'hi'"]; - STAssertEqualObjects(output, @"hi", @"output should equal 'hi'"); - - // Simple python expression - output = [sr run:@"print '-'.join(['a', 'b', 'c'])"]; - STAssertEqualObjects(output, @"a-b-c", @"output should equal 'a-b-c'"); -} - -- (void)testBashScript { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithBash]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple sh script - output = [sr runScript:shScript_]; - STAssertEqualObjects(output, @"1", @"output should equal '1'"); - - // Simple sh script with 1 command line argument - output = [sr runScript:shScript_ withArgs:[NSArray arrayWithObject:@"2"]]; - STAssertEqualObjects(output, @"2", @"output should equal '2'"); -} - -- (void)testPerlScript { - GTMScriptRunner *sr = [GTMScriptRunner runnerWithPerl]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple Perl script - output = [sr runScript:perlScript_]; - STAssertEqualObjects(output, @"1", @"output should equal '1'"); - - // Simple perl script with 1 command line argument - output = [sr runScript:perlScript_ withArgs:[NSArray arrayWithObject:@"2"]]; - STAssertEqualObjects(output, @"2", @"output should equal '2'"); -} - -- (void)testEnvironment { - GTMScriptRunner *sr = [GTMScriptRunner runner]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - NSString *error = nil; - STAssertNil([sr environment], @"should start w/ empty env"); - - output = [sr run:@"/usr/bin/env | wc -l" standardError:&error]; - int numVars = [output intValue]; - STAssertGreaterThan(numVars, 0, - @"numVars should be positive. StdErr %@", error); - // By default the environment is wiped clean, however shells often add a few - // of their own env vars after things have been wiped. For example, sh will - // add about 3 env vars (PWD, _, and SHLVL). - STAssertLessThan(numVars, 5, @"Our env should be almost empty"); - - NSDictionary *newEnv = [NSDictionary dictionaryWithObject:@"bar" - forKey:@"foo"]; - [sr setEnvironment:newEnv]; - output = [sr run:@"/usr/bin/env | wc -l" standardError:&error]; - STAssertEquals([output intValue], numVars + 1, - @"should have one more env var now. StdErr %@", error); - - [sr setEnvironment:nil]; - output = [sr run:@"/usr/bin/env | wc -l" standardError:&error]; - STAssertEquals([output intValue], numVars, - @"should be back down to %d vars. StdErr:%@", numVars, error); - - NSMutableDictionary *currVars - = [[[[NSProcessInfo processInfo] environment] mutableCopy] autorelease]; - - // When debugging a release build _ was not in the processInfo environment - // causing the assert below to fail. Not sure why, but it appeared - // to be harmless, and easy to account for. - [currVars setObject:@"/usr/bin/env" forKey:@"_"]; - [sr setEnvironment:currVars]; - - output = [sr run:@"/usr/bin/env | /usr/bin/sort" standardError:&error]; - NSArray *lineArray = [output componentsSeparatedByString:@"\n"]; - STAssertEquals([lineArray count], [currVars count], - @"StdErr:%@\nCurrentEnvironment:\n%@\nExpected environment:\n%@", - error, output, currVars); -} - -- (void)testDescription { - // make sure description doesn't choke - GTMScriptRunner *sr = [GTMScriptRunner runner]; - STAssertNotNil(sr, @"Script runner must not be nil"); - STAssertGreaterThan([[sr description] length], (NSUInteger)10, - @"expected a description of at least 10 chars"); -} - -- (void)testRunCommandOutputHandling { - // Test whitespace trimming & stdout vs. stderr w/ run command api - - GTMScriptRunner *sr = [GTMScriptRunner runnerWithBash]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - NSString *err = nil; - - // w/o whitespace trimming - { - [sr setTrimsWhitespace:NO]; - STAssertFalse([sr trimsWhitespace], @"setTrimsWhitespace to NO failed"); - - // test stdout - output = [sr run:@"echo \" on out \"" standardError:&err]; - STAssertEqualObjects(output, @" on out \n", @"failed to get stdout output"); - STAssertNil(err, @"stderr should have been empty"); - - // test stderr - output = [sr run:@"echo \" on err \" > /dev/stderr" standardError:&err]; - STAssertNil(output, @"stdout should have been empty"); - STAssertEqualObjects(err, @" on err \n", nil); - } - - // w/ whitespace trimming - { - [sr setTrimsWhitespace:YES]; - STAssertTrue([sr trimsWhitespace], @"setTrimsWhitespace to YES failed"); - - // test stdout - output = [sr run:@"echo \" on out \"" standardError:&err]; - STAssertEqualObjects(output, @"on out", @"failed to get stdout output"); - STAssertNil(err, @"stderr should have been empty"); - - // test stderr - output = [sr run:@"echo \" on err \" > /dev/stderr" standardError:&err]; - STAssertNil(output, @"stdout should have been empty"); - STAssertEqualObjects(err, @"on err", nil); - } -} - -- (void)testScriptOutputHandling { - // Test whitespace trimming & stdout vs. stderr w/ script api - - GTMScriptRunner *sr = [GTMScriptRunner runner]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - NSString *err = nil; - - // w/o whitespace trimming - { - [sr setTrimsWhitespace:NO]; - STAssertFalse([sr trimsWhitespace], @"setTrimsWhitespace to NO failed"); - - // test stdout - output = [sr runScript:shOutputScript_ - withArgs:[NSArray arrayWithObject:@"out"] - standardError:&err]; - STAssertEqualObjects(output, @" on out \n", nil); - STAssertNil(err, @"stderr should have been empty"); - - // test stderr - output = [sr runScript:shOutputScript_ - withArgs:[NSArray arrayWithObject:@"err"] - standardError:&err]; - STAssertNil(output, @"stdout should have been empty"); - STAssertEqualObjects(err, @" on err \n", nil); - } - - // w/ whitespace trimming - { - [sr setTrimsWhitespace:YES]; - STAssertTrue([sr trimsWhitespace], @"setTrimsWhitespace to YES failed"); - - // test stdout - output = [sr runScript:shOutputScript_ - withArgs:[NSArray arrayWithObject:@"out"] - standardError:&err]; - STAssertEqualObjects(output, @"on out", nil); - STAssertNil(err, @"stderr should have been empty"); - - // test stderr - output = [sr runScript:shOutputScript_ - withArgs:[NSArray arrayWithObject:@"err"] - standardError:&err]; - STAssertNil(output, @"stdout should have been empty"); - STAssertEqualObjects(err, @"on err", nil); - } -} - -- (void)testBadRunCommandInput { - GTMScriptRunner *sr = [GTMScriptRunner runner]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *err = nil; - - STAssertNil([sr run:nil standardError:&err], nil); - STAssertNil(err, nil); -} - -- (void)testBadScriptInput { - GTMScriptRunner *sr = [GTMScriptRunner runner]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *err = nil; - - STAssertNil([sr runScript:nil withArgs:nil standardError:&err], nil); - STAssertNil(err, nil); - STAssertNil([sr runScript:@"/path/that/does/not/exists/foo/bar/baz" - withArgs:nil standardError:&err], nil); - STAssertNotNil(err, - @"should have gotten something about the path not existing"); -} - -- (void)testBadCmdInterpreter { - GTMScriptRunner *sr = - [GTMScriptRunner runnerWithInterpreter:@"/path/that/does/not/exists/interpreter"]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *err = nil; - - STAssertNil([sr run:nil standardError:&err], nil); - STAssertNil(err, nil); - [GTMUnitTestDevLog expectString:@"Failed to launch interpreter " - "'/path/that/does/not/exists/interpreter' due to: launch path not accessible"]; - STAssertNil([sr run:@"ls /" standardError:&err], nil); - STAssertNil(err, nil); -} - -- (void)testBadScriptInterpreter { - GTMScriptRunner *sr = - [GTMScriptRunner runnerWithInterpreter:@"/path/that/does/not/exists/interpreter"]; - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *err = nil; - - [GTMUnitTestDevLog expectString:@"Failed to launch interpreter " - "'/path/that/does/not/exists/interpreter' due to: launch path not accessible"]; - STAssertNil([sr runScript:shScript_ withArgs:nil standardError:&err], nil); - STAssertNil(err, nil); - [GTMUnitTestDevLog expectString:@"Failed to launch interpreter " - "'/path/that/does/not/exists/interpreter' due to: launch path not accessible"]; - STAssertNil([sr runScript:@"/path/that/does/not/exists/foo/bar/baz" - withArgs:nil standardError:&err], nil); - STAssertNil(err, nil); -} - - -@end - -@implementation GTMScriptRunnerTest (PrivateMethods) - -- (void)helperTestBourneShellUsingScriptRunner:(GTMScriptRunner *)sr { - STAssertNotNil(sr, @"Script runner must not be nil"); - NSString *output = nil; - - // Simple command - output = [sr run:@"ls /etc/passwd"]; - STAssertEqualObjects(output, @"/etc/passwd", @"output should equal '/etc/passwd'"); - - // Simple command pipe-line - output = [sr run:@"ls /etc/ | grep passwd | tail -1"]; - STAssertEqualObjects(output, @"passwd", @"output should equal 'passwd'"); - - // Simple pipe-line with quotes and awk variables - output = [sr run:@"ps jaxww | awk '{print $2}' | sort -nr | tail -2 | head -1"]; - STAssertEqualObjects(output, @"1", @"output should equal '1'"); - - // Simple shell loop with variables - output = [sr run:@"i=0; while [ $i -lt 100 ]; do i=$((i+1)); done; echo $i"]; - STAssertEqualObjects(output, @"100", @"output should equal '100'"); - - // Simple command with newlines - output = [sr run:@"i=1\necho $i"]; - STAssertEqualObjects(output, @"1", @"output should equal '1'"); - - // Simple full shell script - output = [sr run:@"#!/bin/sh\ni=1\necho $i\n"]; - STAssertEqualObjects(output, @"1", @"output should equal '1'"); - - NSString *err = nil; - - // Test getting standard error with no stdout - output = [sr run:@"ls /etc/does-not-exist" standardError:&err]; - STAssertNil(output, @"output should be nil due to expected error"); - STAssertEqualObjects(err, @"ls: /etc/does-not-exist: No such file or directory", @""); - - // Test getting standard output along with some standard error - output = [sr run:@"ls /etc/does-not-exist /etc/passwd" standardError:&err]; - STAssertEqualObjects(output, @"/etc/passwd", @""); - STAssertEqualObjects(err, @"ls: /etc/does-not-exist: No such file or directory", @""); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.h deleted file mode 100644 index b1c7c2f1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.h +++ /dev/null @@ -1,73 +0,0 @@ -// -// GTMSignalHandler.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// GTMSignalHandler. -// -// This is a very simple, easy-to-use class for registering handlers that get -// called when a specific signal is delivered. Also handy for ignoring -// inconvenient signals. Ignoring SIGKILL is not support for what should be -// obvious reasons. You can pass nil for target & action to ignore the signal. -// -// Example of how to catch SIGABRT and SIGTERM while ignring SIGWINCH: -// GTMSignalHandler *abrt, *term, *winch; -// abrt = [[GTMSignalHandler alloc] -// initWithSignal:SIGABRT -// target:self -// action:@selector(handleAbort:)]; -// -// term = [[GTMSignalHandler alloc] -// initWithSignal:SIGTERM -// target:self -// action:@selector(handleTerm:)]; -// -// winch = [[GTMSignalHandler alloc] initWithSignal:SIGWINCH -// initWithSignal:SIGWINCH -// target:nil -// action:NULL -// -// -(void)handleTerm:(int)signo { -// .. do stuff .. -// } -// -// Release the handler when you're no longer interested in handling that signal. -// Note that signal(SIG_IGN, signo) is performed on each signal handled by -// objects of this class, and those do not get un-done. -// -// Multiple handlers for the same signal is NOT supported. -// -// kqueue() is used to handle the signals, and the default runloop for the first -// signal handler is used for signal delivery, so keep that in mind when you're -// using this class. This class explicitly does not handle arbitrary runloops -// and threading. -// -@interface GTMSignalHandler : NSObject { - @private - int signo_; - __weak id target_; - SEL action_; -} - -// Returns a retained signal handler object that will invoke |handler| on the -// |target| whenever a signal of number |signo| is delivered to the process. --(id)initWithSignal:(int)signo - target:(id)target - action:(SEL)action; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.m deleted file mode 100644 index b6cfb706..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandler.m +++ /dev/null @@ -1,210 +0,0 @@ -// -// GTMSignalHandler.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSignalHandler.h" -#import "GTMDefines.h" - -#import // for kqueue() and kevent -#import "GTMDebugSelectorValidation.h" - -// Simplifying assumption: No more than one handler for a particular signal is -// alive at a time. When the second signal is registered, kqueue just updates -// the info about the first signal, which makes -dealloc time complicated (what -// happens when handler1(SIGUSR1) is released before handler2(SIGUSR1)?). This -// could be solved by having one kqueue per signal, or keeping a list of -// handlers interested in a particular signal, but not really worth it for apps -// that register the handlers at startup and don't change them. - - -// File descriptor for the kqueue that will hold all of our signal events. -static int gSignalKQueueFileDescriptor = 0; - -// A wrapper around the kqueue file descriptor so we can put it into a -// runloop. -static CFSocketRef gRunLoopSocket = NULL; - - -@interface GTMSignalHandler (PrivateMethods) -- (void)notify; -- (void)addFileDescriptorMonitor:(int)fd; -- (void)registerWithKQueue; -- (void)unregisterWithKQueue; -@end - - -@implementation GTMSignalHandler - --(id)init { - // Folks shouldn't call init directly, so they get what they deserve. - _GTMDevLog(@"Don't call init, use " - @"initWithSignal:target:action:"); - return [self initWithSignal:0 target:nil action:NULL]; -} - -- (id)initWithSignal:(int)signo - target:(id)target - action:(SEL)action { - - if ((self = [super init])) { - - if (signo == 0) { - [self release]; - return nil; - } - - signo_ = signo; - target_ = target; // Don't retain since target will most likely retain us. - action_ = action; - GTMAssertSelectorNilOrImplementedWithArguments(target_, - action_, - @encode(int), - NULL); - - // We're handling this signal via kqueue, so turn off the usual signal - // handling. - signal(signo_, SIG_IGN); - - if (action != NULL) { - [self registerWithKQueue]; - } - } - return self; -} - -#if GTM_SUPPORT_GC -- (void)finalize { - [self unregisterWithKQueue]; - - [super finalize]; - -} -#endif - -- (void)dealloc { - [self unregisterWithKQueue]; - - [super dealloc]; - -} - -// Cribbed from Advanced Mac OS X Programming. -static void SocketCallBack(CFSocketRef socketref, CFSocketCallBackType type, - CFDataRef address, const void *data, void *info) { - // We're using CFRunLoop calls here. Even when used on the main thread, they - // don't trigger the draining of the main application's autorelease pool that - // NSRunLoop provides. If we're used in a UI-less app, this means that - // autoreleased objects would never go away, so we provide our own pool here. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - struct kevent event; - - if (kevent(gSignalKQueueFileDescriptor, NULL, 0, &event, 1, NULL) == -1) { - _GTMDevLog(@"could not pick up kqueue event. Errno %d", errno); // COV_NF_LINE - } else { - GTMSignalHandler *handler = (GTMSignalHandler *)event.udata; - [handler notify]; - } - - [pool drain]; -} - -// Cribbed from Advanced Mac OS X Programming -- (void)addFileDescriptorMonitor:(int)fd { - CFSocketContext context = { 0, NULL, NULL, NULL, NULL }; - - gRunLoopSocket = CFSocketCreateWithNative(kCFAllocatorDefault, - fd, - kCFSocketReadCallBack, - SocketCallBack, - &context); - if (gRunLoopSocket == NULL) { - _GTMDevLog(@"could not CFSocketCreateWithNative"); // COV_NF_LINE - goto bailout; // COV_NF_LINE - } - - CFRunLoopSourceRef rls; - rls = CFSocketCreateRunLoopSource(NULL, gRunLoopSocket, 0); - if (rls == NULL) { - _GTMDevLog(@"could not create a run loop source"); // COV_NF_LINE - goto bailout; // COV_NF_LINE - } - - CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, - kCFRunLoopDefaultMode); - CFRelease(rls); - - bailout: - return; - -} - -- (void)registerWithKQueue { - - // Make sure we have our kqueue. - if (gSignalKQueueFileDescriptor == 0) { - gSignalKQueueFileDescriptor = kqueue(); - - if (gSignalKQueueFileDescriptor == -1) { - _GTMDevLog(@"could not make signal kqueue. Errno %d", errno); // COV_NF_LINE - return; // COV_NF_LINE - } - - // Add the kqueue file descriptor to the runloop. - [self addFileDescriptorMonitor:gSignalKQueueFileDescriptor]; - } - - // Add a new event for the signal. - struct kevent filter; - EV_SET(&filter, signo_, EVFILT_SIGNAL, EV_ADD | EV_ENABLE | EV_CLEAR, - 0, 0, self); - - const struct timespec noWait = { 0, 0 }; - if (kevent(gSignalKQueueFileDescriptor, &filter, 1, NULL, 0, &noWait) != 0) { - _GTMDevLog(@"could not add event for signal %d. Errno %d", signo_, errno); // COV_NF_LINE - } - -} - -- (void)unregisterWithKQueue { - // Short-circuit cases where we didn't actually register a kqueue event. - if (signo_ == 0) return; - if (action_ == nil) return; - - struct kevent filter; - EV_SET(&filter, signo_, EVFILT_SIGNAL, EV_DELETE, 0, 0, self); - - const struct timespec noWait = { 0, 0 }; - if (kevent(gSignalKQueueFileDescriptor, &filter, 1, NULL, 0, &noWait) != 0) { - _GTMDevLog(@"could not remove event for signal %d. Errno %d", signo_, errno); // COV_NF_LINE - } - -} - -- (void)notify { - // Now, fire the selector - NSMethodSignature *methodSig = [target_ methodSignatureForSelector:action_]; - _GTMDevAssert(methodSig != nil, @"failed to get the signature?"); - NSInvocation *invocation - = [NSInvocation invocationWithMethodSignature:methodSig]; - [invocation setTarget:target_]; - [invocation setSelector:action_]; - [invocation setArgument:&signo_ atIndex:2]; - [invocation invoke]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandlerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandlerTest.m deleted file mode 100644 index a0019f3c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSignalHandlerTest.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// GTMSignalHandlerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMSignalHandler.h" -#import "GTMUnitTestDevLog.h" - -@interface GTMSignalHandlerTest : GTMTestCase -@end - -@interface SignalCounter : NSObject { - @public - int signalCount_; - int lastSeenSignal_; -} -- (int)count; -- (int)lastSeen; -- (void)countSignal:(int)signo; -+ (id)signalCounter; -@end // SignalCounter - -@implementation SignalCounter -+ (id)signalCounter { - return [[[[self class] alloc] init] autorelease]; -} -- (int)count { - return signalCount_; -} -- (int)lastSeen { - return lastSeenSignal_; -} -// Count the number of times this signal handler has fired. -- (void)countSignal:(int)signo { - signalCount_++; - lastSeenSignal_ = signo; -} -@end - -@implementation GTMSignalHandlerTest - -// Spin the run loop so that the kqueue event notifications will get delivered. -- (void)giveSomeLove { - NSDate *endTime = [NSDate dateWithTimeIntervalSinceNow:0.5]; - [[NSRunLoop currentRunLoop] runUntilDate:endTime]; -} - -- (void)testNillage { - GTMSignalHandler *handler; - - // Just an init should return nil. - [GTMUnitTestDevLog expectString:@"Don't call init, use " - @"initWithSignal:target:action:"]; - handler = [[[GTMSignalHandler alloc] init] autorelease]; - STAssertNil(handler, nil); - - // Zero signal should return nil as well. - handler = [[[GTMSignalHandler alloc] - initWithSignal:0 - target:self - action:@selector(nomnomnom:)] autorelease]; - STAssertNil(handler, nil); - -} - -- (void)testSingleHandler { - SignalCounter *counter = [SignalCounter signalCounter]; - STAssertNotNil(counter, nil); - - GTMSignalHandler *handler = [[GTMSignalHandler alloc] - initWithSignal:SIGWINCH - target:counter - action:@selector(countSignal:)]; - STAssertNotNil(handler, nil); - raise(SIGWINCH); - [self giveSomeLove]; - - STAssertEquals([counter count], 1, nil); - STAssertEquals([counter lastSeen], SIGWINCH, nil); - - raise(SIGWINCH); - [self giveSomeLove]; - - STAssertEquals([counter count], 2, nil); - STAssertEquals([counter lastSeen], SIGWINCH, nil); - - // create a second one to make sure we're seding data where we want - SignalCounter *counter2 = [SignalCounter signalCounter]; - STAssertNotNil(counter2, nil); - [[[GTMSignalHandler alloc] initWithSignal:SIGUSR1 - target:counter2 - action:@selector(countSignal:)] autorelease]; - - raise(SIGUSR1); - [self giveSomeLove]; - - STAssertEquals([counter count], 2, nil); - STAssertEquals([counter lastSeen], SIGWINCH, nil); - STAssertEquals([counter2 count], 1, nil); - STAssertEquals([counter2 lastSeen], SIGUSR1, nil); - - [handler release]; - - // The signal is still ignored (so we shouldn't die), but the - // the handler method should not get called. - raise(SIGWINCH); - - STAssertEquals([counter count], 2, nil); - STAssertEquals([counter lastSeen], SIGWINCH, nil); - STAssertEquals([counter2 count], 1, nil); - STAssertEquals([counter2 lastSeen], SIGUSR1, nil); - -} - -- (void)testIgnore { - SignalCounter *counter = [SignalCounter signalCounter]; - STAssertNotNil(counter, nil); - - [[[GTMSignalHandler alloc] initWithSignal:SIGUSR1 - target:counter - action:NULL] autorelease]; - - raise(SIGUSR1); - [self giveSomeLove]; - STAssertEquals([counter count], 0, nil); - -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.h deleted file mode 100644 index d8cc6422..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.h +++ /dev/null @@ -1,105 +0,0 @@ -// -// GTMStackTrace.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#include -#import "GTMDefines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct GTMAddressDescriptor { - const void *address; // address - const char *symbol; // nearest symbol to address - const char *class_name; // if it is an obj-c method, the method's class - BOOL is_class_method; // if it is an obj-c method, type of method - const char *filename; // file that the method came from. -}; - -// Returns a string containing a nicely formatted stack trace. -// -// This function gets the stack trace for the current thread. It will -// be from the caller of GTMStackTrace upwards to the top the calling stack. -// Typically this function will be used along with some logging, -// as in the following: -// -// MyAppLogger(@"Should never get here:\n%@", GTMStackTrace()); -// -// Here is a sample stack trace returned from this function: -// -// #0 0x00002d92 D () [/Users/me/./StackLog] -// #1 0x00002e45 C () [/Users/me/./StackLog] -// #2 0x00002e53 B () [/Users/me/./StackLog] -// #3 0x00002e61 A () [/Users/me/./StackLog] -// #4 0x00002e6f main () [/Users/me/./StackLog] -// #5 0x00002692 tart () [/Users/me/./StackLog] -// #6 0x000025b9 tart () [/Users/me/./StackLog] -// - -NSString *GTMStackTrace(void); - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -// Returns a string containing a nicely formatted stack trace from the -// exception. Only available on 10.5 or later, uses -// -[NSException callStackReturnAddresses]. -// -NSString *GTMStackTraceFromException(NSException *e); -#endif - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -// Returns an array of program counters from the current thread's stack. -// *** You should probably use GTMStackTrace() instead of this function *** -// However, if you actually want all the PCs in "void *" form, then this -// funtion is more convenient. This will include PCs of GTMStaceTrace and -// its inner utility functions that you may want to strip out. -// -// You can use +[NSThread callStackReturnAddresses] in 10.5 or later. -// -// Args: -// outPcs - an array of "void *" pointers to the program counters found on the -// current thread's stack. -// count - the number of entries in the outPcs array -// -// Returns: -// The number of program counters actually added to outPcs. -// -NSUInteger GTMGetStackProgramCounters(void *outPcs[], NSUInteger count); -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -// Returns an array of GTMAddressDescriptors from the current thread's stack. -// *** You should probably use GTMStackTrace() instead of this function *** -// However, if you actually want all the PCs with symbols, this is the way -// to get them. There is no memory allocations done, so no clean up is required -// except for the caller to free outDescs if they allocated it themselves. -// This will include PCs of GTMStaceTrace and its inner utility functions that -// you may want to strip out. -// -// Args: -// outDescs - an array of "struct GTMAddressDescriptor" pointers corresponding -// to the program counters found on the current thread's stack. -// count - the number of entries in the outDescs array -// -// Returns: -// The number of program counters actually added to outPcs. -// -NSUInteger GTMGetStackAddressDescriptors(struct GTMAddressDescriptor outDescs[], - NSUInteger count); - -#ifdef __cplusplus -} -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.m deleted file mode 100644 index 05843b50..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTrace.m +++ /dev/null @@ -1,358 +0,0 @@ -// -// GTMStackTrace.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#include -#include -#include -#include "GTMStackTrace.h" -#include "GTMObjC2Runtime.h" - -struct GTMClassDescription { - const char *class_name; - Method *class_methods; - unsigned int class_method_count; - Method *instance_methods; - unsigned int instance_method_count; -}; - -#pragma mark Private utility functions - -static struct GTMClassDescription *GTMClassDescriptions(NSUInteger *total_count) { - int class_count = objc_getClassList(nil, 0); - struct GTMClassDescription *class_descs - = calloc(class_count, sizeof(struct GTMClassDescription)); - if (class_descs) { - Class *classes = calloc(class_count, sizeof(Class)); - if (classes) { - objc_getClassList(classes, class_count); - for (int i = 0; i < class_count; ++i) { - class_descs[i].class_methods - = class_copyMethodList(object_getClass(classes[i]), - &class_descs[i].class_method_count); - class_descs[i].instance_methods - = class_copyMethodList(classes[i], - &class_descs[i].instance_method_count); - class_descs[i].class_name = class_getName(classes[i]); - } - free(classes); - } else { - // COV_NF_START - Don't know how to force this in a unittest - free(class_descs); - class_count = 0; - // COV_NF_END - } - } - if (total_count) { - *total_count = class_count; - } - return class_descs; -} - -static void GTMFreeClassDescriptions(struct GTMClassDescription *class_descs, - NSUInteger count) { - if (!class_descs) return; - for (NSUInteger i = 0; i < count; ++i) { - if (class_descs[i].instance_methods) { - free(class_descs[i].instance_methods); - } - if (class_descs[i].class_methods) { - free(class_descs[i].class_methods); - } - } - free(class_descs); -} - -static NSUInteger GTMGetStackAddressDescriptorsForAddresses(void *pcs[], - struct GTMAddressDescriptor outDescs[], - NSUInteger count) { - if (count < 1 || !pcs || !outDescs) return 0; - - NSUInteger class_desc_count; - - // Get our obj-c class descriptions. This is expensive, so we do it once - // at the top. We go through this because dladdr doesn't work with - // obj methods. - struct GTMClassDescription *class_descs - = GTMClassDescriptions(&class_desc_count); - - // Iterate through the stack. - for (NSUInteger i = 0; i < count; ++i) { - const char *class_name = NULL; - BOOL is_class_method = NO; - size_t smallest_diff = SIZE_MAX; - struct GTMAddressDescriptor *currDesc = &outDescs[i]; - currDesc->address = pcs[i]; - Method best_method = NULL; - // Iterate through all the classes we know of. - for (NSUInteger j = 0; j < class_desc_count; ++j) { - // First check the class methods. - for (NSUInteger k = 0; k < class_descs[j].class_method_count; ++k) { - IMP imp = method_getImplementation(class_descs[j].class_methods[k]); - if (imp <= (IMP)currDesc->address) { - size_t diff = (size_t)currDesc->address - (size_t)imp; - if (diff < smallest_diff) { - best_method = class_descs[j].class_methods[k]; - class_name = class_descs[j].class_name; - is_class_method = YES; - smallest_diff = diff; - } - } - } - // Then check the instance methods. - for (NSUInteger k = 0; k < class_descs[j].instance_method_count; ++k) { - IMP imp = method_getImplementation(class_descs[j].instance_methods[k]); - if (imp <= (IMP)currDesc->address) { - size_t diff = (size_t)currDesc->address - (size_t)imp; - if (diff < smallest_diff) { - best_method = class_descs[j].instance_methods[k]; - class_name = class_descs[j].class_name; - is_class_method = NO; - smallest_diff = diff; - } - } - } - } - - // If we have one, store it off. - if (best_method) { - currDesc->symbol = sel_getName(method_getName(best_method)); - currDesc->is_class_method = is_class_method; - currDesc->class_name = class_name; - } - Dl_info info = { NULL, NULL, NULL, NULL }; - - // Check to see if the one returned by dladdr is better. - dladdr(currDesc->address, &info); - if ((size_t)currDesc->address - (size_t)info.dli_saddr < smallest_diff) { - currDesc->symbol = info.dli_sname; - currDesc->is_class_method = NO; - currDesc->class_name = NULL; - } - currDesc->filename = info.dli_fname; - } - GTMFreeClassDescriptions(class_descs, class_desc_count); - return count; -} - -static NSString *GTMStackTraceFromAddressDescriptors(struct GTMAddressDescriptor descs[], - NSUInteger count) { - NSMutableString *trace = [NSMutableString string]; - - for (NSUInteger i = 0; i < count; i++) { - // Newline between all the lines - if (i) { - [trace appendString:@"\n"]; - } - if (descs[i].class_name) { - [trace appendFormat:@"#%-2u %#08lx %s[%s %s] (%s)", - i, descs[i].address, - (descs[i].is_class_method ? "+" : "-"), - descs[i].class_name, - (descs[i].symbol ? descs[i].symbol : "??"), - (descs[i].filename ? descs[i].filename : "??")]; - } else { - [trace appendFormat:@"#%-2u %#08lx %s() (%s)", - i, descs[i].address, - (descs[i].symbol ? descs[i].symbol : "??"), - (descs[i].filename ? descs[i].filename : "??")]; - } - } - return trace; -} - -#pragma mark Public functions - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 -// Before 10.5, we have to do this ourselves. 10.5 adds -// +[NSThread callStackReturnAddresses]. - -// Structure representing a small portion of a stack, starting from the saved -// frame pointer, and continuing through the saved program counter. -struct GTMStackFrame { - void *saved_fp; -#if defined (__ppc__) || defined(__ppc64__) - void *padding; -#endif - void *saved_pc; -}; - -// __builtin_frame_address(0) is a gcc builtin that returns a pointer to the -// current frame pointer. We then use the frame pointer to walk the stack -// picking off program counters and other saved frame pointers. This works -// great on i386, but PPC requires a little more work because the PC (or link -// register) isn't always stored on the stack. -// -NSUInteger GTMGetStackProgramCounters(void *outPcs[], NSUInteger count) { - if (!outPcs || (count < 1)) return 0; - - struct GTMStackFrame *fp; -#if defined (__ppc__) || defined(__ppc64__) - outPcs[0] = __builtin_return_address(0); - fp = (struct GTMStackFrame *)__builtin_frame_address(1); -#elif defined (__i386__) || defined(__x86_64__) - fp = (struct GTMStackFrame *)__builtin_frame_address(0); -#else -#error architecture not supported -#endif - - NSUInteger level = 0; - while (level < count) { - if (fp == NULL) { - level--; - break; - } - outPcs[level] = fp->saved_pc; - level++; - fp = (struct GTMStackFrame *)fp->saved_fp; - } - - return level; -} -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -NSUInteger GTMGetStackAddressDescriptors(struct GTMAddressDescriptor outDescs[], - NSUInteger count) { - if (count < 1 || !outDescs) return 0; - NSUInteger result = 0; - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - // Before 10.5, we collect the stack ourselves. - - void **pcs = calloc(count, sizeof(void*)); - if (!pcs) return 0; - - NSUInteger newSize = GTMGetStackProgramCounters(pcs, count); - - result = GTMGetStackAddressDescriptorsForAddresses(pcs, outDescs, newSize); - free(pcs); - -#else // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - // Use +[NSThread callStackReturnAddresses] - - NSArray *addresses = [NSThread callStackReturnAddresses]; - NSUInteger addrCount = [addresses count]; - if (addrCount) { - void **pcs = calloc(addrCount, sizeof(void*)); - if (pcs) { - void **pcsScanner = pcs; - for (NSNumber *address in addresses) { - NSUInteger addr = [address unsignedIntegerValue]; - *pcsScanner = (void *)addr; - ++pcsScanner; - } - if (count < addrCount) { - addrCount = count; - } - // Fill in the desc structures - result = GTMGetStackAddressDescriptorsForAddresses(pcs, outDescs, addrCount); - } - if (pcs) free(pcs); - } -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - - return result; -} - -NSString *GTMStackTrace(void) { - // If we don't have enough frames, return an empty string - NSString *result = @""; - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - // Before 10.5, we collect the stack ourselves. - - // The maximum number of stack frames that we will walk. We limit this so - // that super-duper recursive functions (or bugs) don't send us for an - // infinite loop. - struct GTMAddressDescriptor descs[100]; - size_t depth = sizeof(descs) / sizeof(struct GTMAddressDescriptor); - depth = GTMGetStackAddressDescriptors(descs, depth); - - // Start at the second item so that GTMStackTrace and it's utility calls (of - // which there is currently 1) is not included in the output. - const size_t kTracesToStrip = 2; - if (depth > kTracesToStrip) { - result = GTMStackTraceFromAddressDescriptors(&descs[kTracesToStrip], - (depth - kTracesToStrip)); - } -#else // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - // Use +[NSThread callStackReturnAddresses] - - NSArray *addresses = [NSThread callStackReturnAddresses]; - NSUInteger count = [addresses count]; - if (count) { - void **pcs = calloc(count, sizeof(void*)); - struct GTMAddressDescriptor *descs - = calloc(count, sizeof(struct GTMAddressDescriptor)); - if (pcs && descs) { - void **pcsScanner = pcs; - for (NSNumber *address in addresses) { - NSUInteger addr = [address unsignedIntegerValue]; - *pcsScanner = (void *)addr; - ++pcsScanner; - } - // Fill in the desc structures - count = GTMGetStackAddressDescriptorsForAddresses(pcs, descs, count); - // Build the trace - // We skip 1 frame because the +[NSThread callStackReturnAddresses] will - // start w/ this frame. - const size_t kTracesToStrip = 1; - if (count > kTracesToStrip) { - result = GTMStackTraceFromAddressDescriptors(&descs[kTracesToStrip], - (count - kTracesToStrip)); - } - } - if (pcs) free(pcs); - if (descs) free(descs); - } -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - - return result; -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -NSString *GTMStackTraceFromException(NSException *e) { - NSString *trace = @""; - - // collect the addresses - NSArray *addresses = [e callStackReturnAddresses]; - NSUInteger count = [addresses count]; - if (count) { - void **pcs = calloc(count, sizeof(void*)); - struct GTMAddressDescriptor *descs - = calloc(count, sizeof(struct GTMAddressDescriptor)); - if (pcs && descs) { - void **pcsScanner = pcs; - for (NSNumber *address in addresses) { - NSUInteger addr = [address unsignedIntegerValue]; - *pcsScanner = (void *)addr; - ++pcsScanner; - } - // Fill in the desc structures - count = GTMGetStackAddressDescriptorsForAddresses(pcs, descs, count); - // Build the trace - trace = GTMStackTraceFromAddressDescriptors(descs, count); - } - if (pcs) free(pcs); - if (descs) free(descs); - } - - return trace; -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTraceTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTraceTest.m deleted file mode 100644 index 07391220..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMStackTraceTest.m +++ /dev/null @@ -1,163 +0,0 @@ -// -// GTMStackTraceTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMStackTrace.h" -#import "GTMSenTestCase.h" - -@interface GTMStackTraceTest : GTMTestCase -@end - -@implementation GTMStackTraceTest -+ (BOOL)classMethodTest { - NSString *stacktrace = GTMStackTrace(); - NSArray *stacklines = [stacktrace componentsSeparatedByString:@"\n"]; - NSString *firstFrame = [stacklines objectAtIndex:0]; - NSRange range = [firstFrame rangeOfString:@"+"]; - return range.location != NSNotFound; -} - -- (void)testStackTraceBasic { - NSString *stacktrace = GTMStackTrace(); - NSArray *stacklines = [stacktrace componentsSeparatedByString:@"\n"]; - - STAssertGreaterThan([stacklines count], (NSUInteger)3, - @"stack trace must have > 3 lines"); - STAssertLessThan([stacklines count], (NSUInteger)25, - @"stack trace must have < 25 lines"); - - NSString *firstFrame = [stacklines objectAtIndex:0]; - NSRange range = [firstFrame rangeOfString:@"testStackTraceBasic"]; - STAssertNotEquals(range.location, (NSUInteger)NSNotFound, - @"First frame should contain testStackTraceBasic," - " stack trace: %@", stacktrace); - range = [firstFrame rangeOfString:@"#0"]; - STAssertNotEquals(range.location, (NSUInteger)NSNotFound, - @"First frame should contain #0, stack trace: %@", - stacktrace); - - range = [firstFrame rangeOfString:@"-"]; - STAssertNotEquals(range.location, (NSUInteger)NSNotFound, - @"First frame should contain - since it's " - @"an instance method: %@", stacktrace); - STAssertTrue([[self class] classMethodTest], @"First frame should contain" - @"+ since it's a class method"); -} - --(void)testGetStackAddressDescriptors { - struct GTMAddressDescriptor descs[100]; - size_t depth = sizeof(descs) / sizeof(struct GTMAddressDescriptor); - depth = GTMGetStackAddressDescriptors(descs, depth); - // Got atleast 4... - STAssertGreaterThan(depth, (size_t)4, nil); - // All that we got have symbols - for (NSUInteger lp = 0 ; lp < depth ; ++lp) { - STAssertNotNULL(descs[lp].symbol, @"didn't get a symble at depth %lu", lp); - } - - // Do it again, but don't give it enough space (to make sure it handles that) - size_t fullDepth = depth; - STAssertGreaterThan(fullDepth, (size_t)4, nil); - depth -= 2; - depth = GTMGetStackAddressDescriptors(descs, depth); - STAssertLessThan(depth, fullDepth, nil); - // All that we got have symbols - for (NSUInteger lp = 0 ; lp < depth ; ++lp) { - STAssertNotNULL(descs[lp].symbol, @"didn't get a symble at depth %lu", lp); - } - -} - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 - -- (void)helperThatThrows { - [NSException raise:@"TestException" format:@"TestExceptionDescription"]; -} - -- (void)testStackExceptionTrace { - NSException *exception = nil; - @try { - [self helperThatThrows]; - } - @catch (NSException * e) { - exception = e; - } - STAssertNotNil(exception, nil); - NSString *stacktrace = GTMStackTraceFromException(exception); - NSArray *stacklines = [stacktrace componentsSeparatedByString:@"\n"]; - - STAssertGreaterThan([stacklines count], (NSUInteger)4, - @"stack trace must have > 4 lines"); - STAssertLessThan([stacklines count], (NSUInteger)25, - @"stack trace must have < 25 lines"); - STAssertEquals([stacklines count], - [[exception callStackReturnAddresses] count], - @"stack trace should have the same number of lines as the " - @" array of return addresses. stack trace: %@", stacktrace); - - // we can't look for it on a specific frame because NSException doesn't - // really document how deep the stack will be - NSRange range = [stacktrace rangeOfString:@"testStackExceptionTrace"]; - STAssertNotEquals(range.location, (NSUInteger)NSNotFound, - @"Stack trace should contain testStackExceptionTrace," - " stack trace: %@", stacktrace); -} - -#endif - -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -- (void)testProgramCountersBasic { - void *pcs[10]; - NSUInteger depth = 10; - depth = GTMGetStackProgramCounters(pcs, depth); - - STAssertGreaterThan(depth, (NSUInteger)3, @"stack trace must have > 3 lines"); - STAssertLessThanOrEqual(depth, (NSUInteger)10, - @"stack trace must have < 10 lines"); - - // pcs is an array of program counters from the stack. pcs[0] should match - // the call into GTMGetStackProgramCounters, which is tough for us to check. - // However, we can verify that pcs[1] is equal to our current return address - // for our current function. - void *current_pc = __builtin_return_address(0); - STAssertEquals(pcs[1], current_pc, @"pcs[1] should equal the current PC"); -} - -- (void)testProgramCountersMore { - void *pcs0[0]; - NSUInteger depth0 = 0; - depth0 = GTMGetStackProgramCounters(pcs0, depth0); - STAssertEquals(depth0, (NSUInteger)0, @"stack trace must have 0 lines"); - - void *pcs1[1]; - NSUInteger depth1 = 1; - depth1 = GTMGetStackProgramCounters(pcs1, depth1); - STAssertEquals(depth1, (NSUInteger)1, @"stack trace must have 1 lines"); - - void *pcs2[2]; - NSUInteger depth2 = 2; - depth2 = GTMGetStackProgramCounters(pcs2, depth2); - STAssertEquals(depth2, (NSUInteger)2, @"stack trace must have 2 lines"); - void *current_pc = __builtin_return_address(0); - STAssertEquals(pcs2[1], current_pc, @"pcs[1] should equal the current PC"); -} - -#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h deleted file mode 100644 index 07580a77..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.h +++ /dev/null @@ -1,86 +0,0 @@ -// -// GTMSystemVersion.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" - -// A class for getting information about what system we are running on -@interface GTMSystemVersion : NSObject - -// Returns the current system version major.minor.bugFix -+ (void)getMajor:(SInt32*)major minor:(SInt32*)minor bugFix:(SInt32*)bugFix; - -// Returns the build number of the OS. Useful when looking for bug fixes -// in new OSes which all have a set system version. -// eg 10.5.5's build number is 9F33. Easy way to check the build number -// is to choose "About this Mac" from the Apple menu and click on the version -// number. -+ (NSString*)build; - -+ (BOOL)isBuildLessThan:(NSString*)build; -+ (BOOL)isBuildLessThanOrEqualTo:(NSString*)build; -+ (BOOL)isBuildGreaterThan:(NSString*)build; -+ (BOOL)isBuildGreaterThanOrEqualTo:(NSString*)build; -+ (BOOL)isBuildEqualTo:(NSString *)build; - -#if GTM_MACOS_SDK -// Returns YES if running on 10.3, NO otherwise. -+ (BOOL)isPanther; - -// Returns YES if running on 10.4, NO otherwise. -+ (BOOL)isTiger; - -// Returns YES if running on 10.5, NO otherwise. -+ (BOOL)isLeopard; - -// Returns YES if running on 10.6, NO otherwise. -+ (BOOL)isSnowLeopard; - -// Returns a YES/NO if the system is 10.3 or better -+ (BOOL)isPantherOrGreater; - -// Returns a YES/NO if the system is 10.4 or better -+ (BOOL)isTigerOrGreater; - -// Returns a YES/NO if the system is 10.5 or better -+ (BOOL)isLeopardOrGreater; - -// Returns a YES/NO if the system is 10.6 or better -+ (BOOL)isSnowLeopardOrGreater; -#endif // GTM_MACOS_SDK - -// Returns one of the achitecture strings below. Note that this is the -// architecture that we are currently running as, not the hardware architecture. -+ (NSString *)runtimeArchitecture; -@end - -// Architecture Strings -// TODO: Should probably break iPhone up into iPhone_ARM and iPhone_Simulator -// but haven't found a need yet. -GTM_EXTERN NSString *const kGTMArch_iPhone; -GTM_EXTERN NSString *const kGTMArch_ppc; -GTM_EXTERN NSString *const kGTMArch_ppc64; -GTM_EXTERN NSString *const kGTMArch_x86_64; -GTM_EXTERN NSString *const kGTMArch_i386; - -// System Build Number constants -GTM_EXTERN NSString *const kGTMSystemBuild10_5_5; -GTM_EXTERN NSString *const kGTMSystemBuild10_6_0_WWDC; -GTM_EXTERN NSString *const kGTMSystemBuild10_6_0_10A190; - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.m deleted file mode 100644 index eb255a67..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersion.m +++ /dev/null @@ -1,232 +0,0 @@ -// -// GTMSystemVersion.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSystemVersion.h" -#import "GTMGarbageCollection.h" -#if GTM_MACOS_SDK -#import -#endif - -static SInt32 sGTMSystemVersionMajor = 0; -static SInt32 sGTMSystemVersionMinor = 0; -static SInt32 sGTMSystemVersionBugFix = 0; -static NSString *sBuild = nil; - -NSString *const kGTMArch_iPhone = @"iPhone"; -NSString *const kGTMArch_ppc = @"ppc"; -NSString *const kGTMArch_ppc64 = @"ppc64"; -NSString *const kGTMArch_x86_64 = @"x86_64"; -NSString *const kGTMArch_i386 = @"i386"; - -static NSString *const kSystemVersionPlistPath = @"/System/Library/CoreServices/SystemVersion.plist"; - -NSString *const kGTMSystemBuild10_5_5 = @"9F33"; -NSString *const kGTMSystemBuild10_6_0_WWDC = @"10A96"; -NSString *const kGTMSystemBuild10_6_0_10A190 = @"10A190"; - -@implementation GTMSystemVersion -+ (void)initialize { - if (self == [GTMSystemVersion class]) { - // Gestalt is the recommended way of getting the OS version (despite a - // comment to the contrary in the 10.4 headers and docs; see - // ). - // The iPhone doesn't have Gestalt though, so use the plist there. -#if GTM_MACOS_SDK - require_noerr(Gestalt(gestaltSystemVersionMajor, &sGTMSystemVersionMajor), failedGestalt); - require_noerr(Gestalt(gestaltSystemVersionMinor, &sGTMSystemVersionMinor), failedGestalt); - require_noerr(Gestalt(gestaltSystemVersionBugFix, &sGTMSystemVersionBugFix), failedGestalt); - - return; - - failedGestalt: - ; -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3 - // gestaltSystemVersionMajor et al are only on 10.4 and above, so they - // could fail when running on 10.3. - SInt32 binaryCodedDec; - OSStatus err = err = Gestalt(gestaltSystemVersion, &binaryCodedDec); - _GTMDevAssert(!err, @"Unable to get version from Gestalt"); - - // Note that this code will return x.9.9 for any system rev parts that are - // greater than 9 (i.e., 10.10.10 will be 10.9.9). This shouldn't ever be a - // problem as the code above takes care of 10.4+. - SInt32 msb = (binaryCodedDec & 0x0000F000L) >> 12; - msb *= 10; - SInt32 lsb = (binaryCodedDec & 0x00000F00L) >> 8; - sGTMSystemVersionMajor = msb + lsb; - sGTMSystemVersionMinor = (binaryCodedDec & 0x000000F0L) >> 4; - sGTMSystemVersionBugFix = (binaryCodedDec & 0x0000000FL); -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3 - -#else // GTM_MACOS_SDK - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSDictionary *systemVersionPlist - = [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath]; - NSString *version = [systemVersionPlist objectForKey:@"ProductVersion"]; - _GTMDevAssert(version, @"Unable to get version"); - NSArray *versionInfo = [version componentsSeparatedByString:@"."]; - NSUInteger length = [versionInfo count]; - _GTMDevAssert(length > 1 && length < 4, - @"Unparseable version %@", version); - sGTMSystemVersionMajor = [[versionInfo objectAtIndex:0] intValue]; - _GTMDevAssert(sGTMSystemVersionMajor != 0, - @"Unknown version for %@", version); - sGTMSystemVersionMinor = [[versionInfo objectAtIndex:1] intValue]; - if (length == 3) { - sGTMSystemVersionBugFix = [[versionInfo objectAtIndex:2] intValue]; - } - [pool release]; -#endif // GTM_MACOS_SDK - } -} - -+ (void)getMajor:(SInt32*)major minor:(SInt32*)minor bugFix:(SInt32*)bugFix { - if (major) { - *major = sGTMSystemVersionMajor; - } - if (minor) { - *minor = sGTMSystemVersionMinor; - } - if (bugFix) { - *bugFix = sGTMSystemVersionBugFix; - } -} - -+ (NSString*)build { - @synchronized(self) { - // Not cached at initialization time because we don't expect "real" - // software to want this, and it costs a bit to get at startup. - // This will mainly be for unit test cases. - if (!sBuild) { - NSDictionary *systemVersionPlist - = [NSDictionary dictionaryWithContentsOfFile:kSystemVersionPlistPath]; - sBuild = [[systemVersionPlist objectForKey:@"ProductBuildVersion"] retain]; - GTMNSMakeUncollectable(sBuild); - _GTMDevAssert(sBuild, @"Unable to get build version"); - } - } - return sBuild; -} - -+ (BOOL)isBuildLessThan:(NSString*)build { - NSComparisonResult result - = [[self build] compare:build - options:NSNumericSearch | NSCaseInsensitiveSearch]; - return result == NSOrderedAscending; -} - -+ (BOOL)isBuildLessThanOrEqualTo:(NSString*)build { - NSComparisonResult result - = [[self build] compare:build - options:NSNumericSearch | NSCaseInsensitiveSearch]; - return result != NSOrderedDescending; -} - -+ (BOOL)isBuildGreaterThan:(NSString*)build { - NSComparisonResult result - = [[self build] compare:build - options:NSNumericSearch | NSCaseInsensitiveSearch]; - return result == NSOrderedDescending; -} - -+ (BOOL)isBuildGreaterThanOrEqualTo:(NSString*)build { - NSComparisonResult result - = [[self build] compare:build - options:NSNumericSearch | NSCaseInsensitiveSearch]; - return result != NSOrderedAscending; -} - -+ (BOOL)isBuildEqualTo:(NSString *)build { - NSComparisonResult result - = [[self build] compare:build - options:NSNumericSearch | NSCaseInsensitiveSearch]; - return result == NSOrderedSame; -} - -#if GTM_MACOS_SDK -+ (BOOL)isPanther { - return sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor == 3; -} - -+ (BOOL)isTiger { - return sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor == 4; -} - -+ (BOOL)isLeopard { - return sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor == 5; -} - -+ (BOOL)isSnowLeopard { - return sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor == 6; -} - -+ (BOOL)isPantherOrGreater { - return (sGTMSystemVersionMajor > 10) || - (sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor >= 3); -} - -+ (BOOL)isTigerOrGreater { - return (sGTMSystemVersionMajor > 10) || - (sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor >= 4); -} - -+ (BOOL)isLeopardOrGreater { - return (sGTMSystemVersionMajor > 10) || - (sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor >= 5); -} - -+ (BOOL)isSnowLeopardOrGreater { - return (sGTMSystemVersionMajor > 10) || - (sGTMSystemVersionMajor == 10 && sGTMSystemVersionMinor >= 6); -} - -#endif // GTM_MACOS_SDK - -+ (NSString *)runtimeArchitecture { - NSString *architecture = nil; -#if GTM_IPHONE_SDK - architecture = kGTMArch_iPhone; -#else // !GTM_IPHONE_SDK - // In reading arch(3) you'd thing this would work: - // - // const NXArchInfo *localInfo = NXGetLocalArchInfo(); - // _GTMDevAssert(localInfo && localInfo->name, @"Couldn't get NXArchInfo"); - // const NXArchInfo *genericInfo = NXGetArchInfoFromCpuType(localInfo->cputype, 0); - // _GTMDevAssert(genericInfo && genericInfo->name, @"Couldn't get generic NXArchInfo"); - // extensions[0] = [NSString stringWithFormat:@".%s", genericInfo->name]; - // - // but on 64bit it returns the same things as on 32bit, so... -#if __POWERPC__ -#if __LP64__ - architecture = kGTMArch_ppc64; -#else // !__LP64__ - architecture = kGTMArch_ppc; -#endif // __LP64__ -#else // !__POWERPC__ -#if __LP64__ - architecture = kGTMArch_x86_64; -#else // !__LP64__ - architecture = kGTMArch_i386; -#endif // __LP64__ -#endif // !__POWERPC__ - -#endif // GTM_IPHONE_SDK - return architecture; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersionTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersionTest.m deleted file mode 100644 index 24e6aa51..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMSystemVersionTest.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// GTMSystemVersionTest.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMSystemVersion.h" - -@interface GTMSystemVersionTest : GTMTestCase -@end - -@implementation GTMSystemVersionTest -- (void)testBasics { - SInt32 major; - SInt32 minor; - SInt32 bugFix; - - [GTMSystemVersion getMajor:NULL minor:NULL bugFix:NULL]; - [GTMSystemVersion getMajor:&major minor:NULL bugFix:NULL]; - [GTMSystemVersion getMajor:NULL minor:&minor bugFix:NULL]; - [GTMSystemVersion getMajor:NULL minor:NULL bugFix:&bugFix]; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugFix]; -#if GTM_IPHONE_SDK - STAssertTrue(major >= 2 && minor >= 0 && bugFix >= 0, nil); -#else - STAssertTrue(major >= 10 && minor >= 3 && bugFix >= 0, nil); - BOOL isPanther = (major == 10) && (minor == 3); - BOOL isTiger = (major == 10) && (minor == 4); - BOOL isLeopard = (major == 10) && (minor == 5); - BOOL isSnowLeopard = (major == 10) && (minor == 6); - - BOOL isLater = (major > 10) || ((major == 10) && (minor > 6)); - STAssertEquals([GTMSystemVersion isPanther], isPanther, nil); - STAssertEquals([GTMSystemVersion isPantherOrGreater], - (BOOL)(isPanther || isTiger - || isLeopard || isSnowLeopard || isLater), nil); - STAssertEquals([GTMSystemVersion isTiger], isTiger, nil); - STAssertEquals([GTMSystemVersion isTigerOrGreater], - (BOOL)(isTiger || isLeopard || isSnowLeopard || isLater), nil); - STAssertEquals([GTMSystemVersion isLeopard], isLeopard, nil); - STAssertEquals([GTMSystemVersion isLeopardOrGreater], - (BOOL)(isLeopard || isSnowLeopard || isLater), nil); - STAssertEquals([GTMSystemVersion isSnowLeopard], isSnowLeopard, nil); - STAssertEquals([GTMSystemVersion isSnowLeopardOrGreater], - (BOOL)(isSnowLeopard || isLater), nil); -#endif -} - -- (void)testRuntimeArchitecture { - // Not sure how to test this short of recoding it and verifying. - // This at least executes the code for me. - STAssertNotNil([GTMSystemVersion runtimeArchitecture], nil); -} - -- (void)testBuild { - // Not sure how to test this short of coding up a large fragile table. - // This at least executes the code for me. - NSString *systemVersion = [GTMSystemVersion build]; - STAssertNotEquals([systemVersion length], (NSUInteger)0, nil); - - NSString *smallVersion = @"1A00"; - NSString *largeVersion = @"100Z100"; - STAssertTrue([GTMSystemVersion isBuildGreaterThan:smallVersion], nil); - STAssertFalse([GTMSystemVersion isBuildGreaterThan:systemVersion], nil); - STAssertFalse([GTMSystemVersion isBuildGreaterThan:largeVersion], nil); - STAssertTrue([GTMSystemVersion isBuildGreaterThanOrEqualTo:smallVersion], nil); - STAssertTrue([GTMSystemVersion isBuildGreaterThanOrEqualTo:systemVersion], nil); - STAssertFalse([GTMSystemVersion isBuildGreaterThanOrEqualTo:largeVersion], nil); - STAssertFalse([GTMSystemVersion isBuildEqualTo:smallVersion], nil); - STAssertTrue([GTMSystemVersion isBuildEqualTo:systemVersion], nil); - STAssertFalse([GTMSystemVersion isBuildEqualTo:largeVersion], nil); - STAssertFalse([GTMSystemVersion isBuildLessThanOrEqualTo:smallVersion], nil); - STAssertTrue([GTMSystemVersion isBuildLessThanOrEqualTo:systemVersion], nil); - STAssertTrue([GTMSystemVersion isBuildLessThanOrEqualTo:largeVersion], nil); - STAssertFalse([GTMSystemVersion isBuildLessThan:smallVersion], nil); - STAssertFalse([GTMSystemVersion isBuildLessThan:systemVersion], nil); - STAssertTrue([GTMSystemVersion isBuildLessThan:largeVersion], nil); - -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.h deleted file mode 100644 index 5dc0a56e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// GTMTransientRootPortProxy.h -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMTransientRootProxy.h" - -@interface GTMTransientRootPortProxy : GTMTransientRootProxy { - @private - NSPort *receivePort_; - NSPort *sendPort_; -} - -// Returns an autoreleased instance. See below for details on args. -+ (id)rootProxyWithReceivePort:(NSPort *)receivePort - sendPort:(NSPort *)sendPort - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout; - -// This function will return a GTMTransientRootProxy that is using NSPorts -// for the connection. The |receivePort| and |sendPort| conventions -// follow the same conventions as -[NSConnection initWithReceivePort:sendPort:]. -// Note that due to Radar 6676818 "NSConnection leaks when initialized with nil -// sendPort" that you will leak a connection if you pass in "nil" for your -// sendPort if you are using NSPorts (mach or socket) to communicate between -// threads. The leak occurs on 10.5.6, and SL 10A286. This simple answer -// is just to always use two ports to communicate. Check out the test to see -// how we do cross thread communication. -- (id)initWithReceivePort:(NSPort *)receivePort - sendPort:(NSPort *)sendPort - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.m deleted file mode 100644 index ee9093a1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxy.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// GTMTransientRootPortProxy.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMTransientRootPortProxy.h" -#import "GTMObjC2Runtime.h" - -@interface GTMTransientRootPortProxy (ProtectedMethods) -// Returns an NSConnection for NSPorts. This method overrides the one in -// the GTMTransientRootProxy which allows us to create a connection with a -// NSPort. -// -- (NSConnection *)makeConnection; -@end - - -@implementation GTMTransientRootPortProxy - -+ (id)rootProxyWithReceivePort:(NSPort *)receivePort - sendPort:(NSPort *)sendPort - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout { - return [[[self alloc] initWithReceivePort:receivePort - sendPort:sendPort - protocol:protocol - requestTimeout:requestTimeout - replyTimeout:replyTimeout] autorelease]; -} - -- (id)initWithReceivePort:(NSPort *)receivePort - sendPort:(NSPort *)sendPort - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout { - if ((!sendPort && !receivePort) || !protocol) { - [self release]; - return nil; - } - - requestTimeout_ = requestTimeout; - replyTimeout_ = replyTimeout; - - receivePort_ = [receivePort retain]; - sendPort_ = [sendPort retain]; - - protocol_ = protocol; // Protocols can't be retained - return self; -} - -- (void)dealloc { - [receivePort_ release]; - [sendPort_ release]; - [super dealloc]; -} - -@end - -@implementation GTMTransientRootPortProxy (ProtectedMethods) - -- (NSConnection *)makeConnection { - return [NSConnection connectionWithReceivePort:receivePort_ - sendPort:sendPort_]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxyTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxyTest.m deleted file mode 100644 index a85498f8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootPortProxyTest.m +++ /dev/null @@ -1,182 +0,0 @@ -// -// GTMTransientRootPortProxyTest.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMTransientRootPortProxy.h" - -#define kDefaultTimeout 5.0 - -enum { - kGTMTransientThreadConditionStarting = 777, - kGTMTransientThreadConditionStarted, - kGTMTransientThreadConditionQuitting, - kGTMTransientThreadConditionQuitted -}; - -// === Start off declaring some auxillary data structures === - -// The @protocol that we'll use for testing with. -@protocol DOPortTestProtocol -- (oneway void)doOneWayVoid; -- (bycopy NSString *)doReturnStringBycopy; -@end - -// The "server" we'll use to test the DO connection. This server will implement -// our test protocol, and it will run in a separate thread from the main -// unit testing thread, so the DO requests can be serviced. -@interface DOPortTestServer : NSObject { - @private - NSPort *clientSendPort_; - NSPort *clientReceivePort_; -} -- (void)runThread:(NSConditionLock *)lock; -- (NSPort *)clientSendPort; -- (NSPort *)clientReceivePort; -@end - -@implementation DOPortTestServer - -- (void)runThread:(NSConditionLock *)lock { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSDate *future = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - if(![lock lockWhenCondition:kGTMTransientThreadConditionStarting - beforeDate:future]) { - _GTMDevLog(@"Unable to acquire lock in runThread! This is BAD!"); - [pool drain]; - [NSThread exit]; - } - - clientSendPort_ = [NSPort port]; - clientReceivePort_ = [NSPort port]; - - NSConnection *conn - = [[NSConnection alloc] initWithReceivePort:clientSendPort_ - sendPort:clientReceivePort_]; - [conn setRootObject:self]; - [lock unlockWithCondition:kGTMTransientThreadConditionStarted]; - while (![lock tryLockWhenCondition:kGTMTransientThreadConditionQuitting]) { - NSDate *runUntil = [NSDate dateWithTimeIntervalSinceNow:0.1]; - [[NSRunLoop currentRunLoop] runUntilDate:runUntil]; - } - [conn setRootObject:nil]; - [clientSendPort_ invalidate]; - [clientReceivePort_ invalidate]; - [conn release]; - [pool drain]; - [lock unlockWithCondition:kGTMTransientThreadConditionQuitted]; -} - -- (NSPort *)clientSendPort { - return clientSendPort_; -} - -- (NSPort *)clientReceivePort { - return clientReceivePort_; -} - -- (oneway void)doOneWayVoid { - // Do nothing -} -- (bycopy NSString *)doReturnStringBycopy { - return @"TestString"; -} - -@end - -// === Done with auxillary data structures, now for the main test class === - -@interface GTMTransientRootPortProxyTest : GTMTestCase { - DOPortTestServer *server_; - NSConditionLock *syncLock_; -} - -@end - -@implementation GTMTransientRootPortProxyTest - -- (void)testTransientRootPortProxy { - syncLock_ = [[[NSConditionLock alloc] - initWithCondition:kGTMTransientThreadConditionStarting] - autorelease]; - - // Setup our server. - server_ = [[[DOPortTestServer alloc] init] autorelease]; - [NSThread detachNewThreadSelector:@selector(runThread:) - toTarget:server_ - withObject:syncLock_]; - NSDate *future = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - STAssertTrue([syncLock_ lockWhenCondition:kGTMTransientThreadConditionStarted - beforeDate:future], - @"Unable to start thread"); - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionStarted]; - - NSPort *receivePort = [server_ clientReceivePort]; - NSPort *sendPort = [server_ clientSendPort]; - - GTMTransientRootPortProxy *failProxy = - [GTMTransientRootPortProxy rootProxyWithReceivePort:nil - sendPort:nil - protocol:@protocol(DOPortTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertNil(failProxy, @"should have failed w/o a port"); - failProxy = - [GTMTransientRootPortProxy rootProxyWithReceivePort:receivePort - sendPort:sendPort - protocol:nil - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertNil(failProxy, @"should have failed w/o a protocol"); - - GTMTransientRootPortProxy *proxy = - [GTMTransientRootPortProxy rootProxyWithReceivePort:receivePort - sendPort:sendPort - protocol:@protocol(DOPortTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - - STAssertEqualObjects([proxy doReturnStringBycopy], - @"TestString", @"proxy should have returned " - @"'TestString'"); - - // Redo the *exact* same test to make sure we can have multiple instances - // in the same app. - proxy = - [GTMTransientRootPortProxy rootProxyWithReceivePort:receivePort - sendPort:sendPort - protocol:@protocol(DOPortTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - - STAssertEqualObjects([proxy doReturnStringBycopy], - @"TestString", @"proxy should have returned " - @"'TestString'"); - [syncLock_ tryLockWhenCondition:kGTMTransientThreadConditionStarted]; - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionQuitting]; - - // Wait for the server to shutdown so we clean up nicely. - // The max amount of time we will wait until we abort this test. - NSDate *timeout = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - // The server did not shutdown and we want to capture this as an error - STAssertTrue([syncLock_ lockWhenCondition:kGTMTransientThreadConditionQuitted - beforeDate:timeout], - @"The server did not shutdown gracefully before the timeout."); - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionQuitted]; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.h deleted file mode 100644 index b5aa78af..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.h +++ /dev/null @@ -1,113 +0,0 @@ -// -// GTMTransientRootProxy.h -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// Handle (re-)connecting to a transient root proxy object via DO. -// -// This class is designed to handle connecting and reconnecting to a Distributed -// Objects root proxy (NSDistantObject* instance). It is a replacement for using -// the NSDistantObject returned from NSConnection, directly. When the DO -// connection is up, messages sent to this class are forwarded to the real -// object (the NSDistantObject); when the DO connection is down, messages sent -// to this class are silently swallowed. You can use the -isConnected method on -// this class to see if the DO connection is up or down. -// -// This class may be useful when you need a DO connection, but the -// server you're connected to may be going up and down. For example, the -// web browser plugins in Google Desktop may need to connect to the Google -// Desktop local webserver, but we'd want the browser plugins to be able to -// gracefully handle the local Google Desktop webserver starting and stopping. -// -// === Example Usage === -// -// Old code: -// -// NSDistantObject *o = -// [NSConnection rootProxyForConnectionWithRegisteredName:@"server" -// host:nil]; -// [o setProtocolForProxy:@protocol(MyProto)]; -// [o someMethodInMyProto]; -// // ... write a bunch of code to handle error conditions -// -// New code: -// -// GTMTransientRootProxy *o = -// [GTMTransientRootProxy rootProxyWithRegisteredName:@"server" -// host:nil -// protocol:@protocol(MyProto) -// requestTimeout:5.0 -// replyTimeout:5.0]; -// [o someMethodInMyProto]; -// -// The 'Old code' requires you to handle all the error conditions that may -// arise when using DO (such as the server crashing, or network going down), -// handle properly tearing down the broken connection, and trying to reconnect -// when the server finally comes back online. The 'New code' handles all of -// those details for you. -// -// Also, when creating a GMTransientRootProxy object, you must tell it the -// @protocol that will be used for communication - this is not optional. And -// in order to quiet compiler warnings, you'll also want to staticly type -// the pointer with the protocol as well. -// -@interface GTMTransientRootProxy : NSProxy { - @protected - __weak Protocol *protocol_; - NSDistantObject *realProxy_; - - NSString *registeredName_; - NSString *host_; - - NSTimeInterval requestTimeout_; - NSTimeInterval replyTimeout_; -} - -// Returns an autoreleased instance -+ (id)rootProxyWithRegisteredName:(NSString *)name - host:(NSString *)host - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout; - -// This function will return a GTMTransientRootProxy that is using Mach ports -// for the connection. The |name| and |host| arguments will be used to lookup -// the correct information to create the Mach port connection. -// -- (id)initWithRegisteredName:(NSString *)name - host:(NSString *)host - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout; - -// Returns YES if the DO connection is up and working, NO otherwise. -// -- (BOOL)isConnected; - -@end - -// Subclass of GTMTransientRootProxy that catches and ignores ALL exceptions. -// This class overrides GTMTransientRootProxy's -forwardInvocation: -// method, and wraps it in a try/catch block, and ignores all exceptions. -// -@interface GTMRootProxyCatchAll : GTMTransientRootProxy - -// Overridden, and ignores all thrown exceptions. -- (void)forwardInvocation:(NSInvocation *)invocation; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.m deleted file mode 100644 index 04591d38..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxy.m +++ /dev/null @@ -1,229 +0,0 @@ -// -// GTMTransientRootProxy.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMTransientRootProxy.h" -#import "GTMObjC2Runtime.h" - -// Private methods on NSMethodSignature that we need to call. This method has -// been available since 10.0, but Apple didn't add it to the headers until 10.5 -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 -@interface NSMethodSignature (UndeclaredMethods) -+ (NSMethodSignature *)signatureWithObjCTypes:(const char *)types; -@end -#endif // MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - -@interface GTMTransientRootProxy (PrivateMethods) -// Returns an NSConnection for NSMacPorts. This method is broken out to allow -// subclasses to override it to generate different types of NSConnections. -- (NSConnection *)makeConnection; - -// Returns the "real" proxy (stored in the realProxy_ ivar) associated with this -// instance. If realProxy_ is nil, then an attempt is made to make a connection -// to create the realProxy_. -// -- (NSDistantObject *)realProxy; - -// "Releases" the realProxy_ ivar, and removes |self| as an observer from -// the NSNotificationCenter. -// -- (void)releaseRealProxy; -@end - -@implementation GTMTransientRootProxy - -+ (id)rootProxyWithRegisteredName:(NSString *)name - host:(NSString *)host - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout { - return [[[self alloc] initWithRegisteredName:name - host:host - protocol:protocol - requestTimeout:requestTimeout - replyTimeout:replyTimeout] autorelease]; -} - -- (id)initWithRegisteredName:(NSString *)name - host:(NSString *)host - protocol:(Protocol *)protocol - requestTimeout:(NSTimeInterval)requestTimeout - replyTimeout:(NSTimeInterval)replyTimeout { - if (!name || !protocol) { - [self release]; - return nil; - } - - requestTimeout_ = requestTimeout; - replyTimeout_ = replyTimeout; - - registeredName_ = [name copy]; - host_ = [host copy]; - - protocol_ = protocol; // Protocols can't be retained - - return self; -} - -- (id)init { - return [self initWithRegisteredName:nil - host:nil - protocol:nil - requestTimeout:0.0 - replyTimeout:0.0]; -} - -- (void)dealloc { - [self releaseRealProxy]; - [registeredName_ release]; - [host_ release]; - [super dealloc]; -} - -- (BOOL)isConnected { - BOOL result = NO; - @synchronized (self) { - result = [[[self realProxy] connectionForProxy] isValid]; - } - return result; -} - -- (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { - struct objc_method_description mdesc; - mdesc = protocol_getMethodDescription(protocol_, selector, YES, YES); - NSMethodSignature *returnValue = nil; - if (mdesc.types == NULL) { - // COV_NF_START - _GTMDevLog(@"Unable to get the protocol method description. Returning " - @"nil."); - // COV_NF_END - } else { - returnValue = [NSMethodSignature signatureWithObjCTypes:mdesc.types]; - } - return returnValue; -} - -- (void)forwardInvocation:(NSInvocation *)invocation { - @try { - NSDistantObject *target = [self realProxy]; - [invocation invokeWithTarget:target]; - - // We need to catch NSException* here rather than "id" because we need to - // treat |ex| as an NSException when using the -name method. Also, we're - // only looking to catch a few types of exception here, all of which are - // NSException types; the rest we just rethrow. - } @catch (NSException *ex) { - NSString *exName = [ex name]; - // If we catch an exception who's name matches any of the following types, - // it's because the DO connection probably went down. So, we'll just - // release our realProxy_, and attempt to reconnect on the next call. - if ([exName isEqualToString:NSPortTimeoutException] - || [exName isEqualToString:NSInvalidSendPortException] - || [exName isEqualToString:NSInvalidReceivePortException] - || [exName isEqualToString:NSFailedAuthenticationException] - || [exName isEqualToString:NSPortSendException] - || [exName isEqualToString:NSPortReceiveException]) { - [self releaseRealProxy]; // COV_NF_LINE - } else { - // If the exception was any other type (commonly - // NSInvalidArgumentException) then we'll just re-throw it to the caller. - @throw; - } - } // COV_NF_LINE -} - -@end - -@implementation GTMTransientRootProxy (PrivateMethods) - -- (NSConnection *)makeConnection { - return [NSConnection connectionWithRegisteredName:registeredName_ host:host_]; -} - -- (NSDistantObject *)realProxy { - NSDistantObject *returnProxy = nil; - - @synchronized (self) { - // No change so no notification - if (realProxy_) return realProxy_; - - NSConnection *conn = [self makeConnection]; - [conn setRequestTimeout:requestTimeout_]; - [conn setReplyTimeout:replyTimeout_]; - @try { - // Try to get the root proxy for this connection's vended object. - realProxy_ = [conn rootProxy]; - } @catch (id ex) { - // We may fail here if we can't get the root proxy in the amount of time - // specified by the timeout above. This may happen, for example, if the - // server process is stopped (via SIGSTOP). We'll just ignore this, and - // try again at the next message. - [conn invalidate]; - return nil; - } - if (!realProxy_) { - [conn invalidate]; - // Again, no change in connection status - return nil; - } - [realProxy_ retain]; - [realProxy_ setProtocolForProxy:protocol_]; - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self - selector:@selector(connectionDidDie:) - name:NSConnectionDidDieNotification - object:conn]; - // Retain/autorelease so it lives at least the duration of this synchronize - returnProxy = [[realProxy_ retain] autorelease]; - } // @synchronized (self) - - return returnProxy; -} - -- (void)connectionDidDie:(NSNotification *)notification { - [self releaseRealProxy]; -} - -- (void)releaseRealProxy { - BOOL connectionChanged = NO; - @synchronized (self) { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - // Only trigger if we had a proxy before - if (realProxy_) { - connectionChanged = YES; - } - [realProxy_ release]; - realProxy_ = nil; - } -} - -@end - -@implementation GTMRootProxyCatchAll - -- (void)forwardInvocation:(NSInvocation *)invocation { - @try { - [super forwardInvocation:invocation]; - } - @catch (id ex) { - // Log for developers, but basically ignore it. - _GTMDevLog(@"Proxy for invoking %@ has caught and is ignoring exception: %@", - NSStringFromSelector([invocation selector]), ex); - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxyTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxyTest.m deleted file mode 100644 index 70b69a1b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMTransientRootProxyTest.m +++ /dev/null @@ -1,228 +0,0 @@ -// -// GMTransientRootProxyTest.m -// -// Copyright 2006-2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMTransientRootProxy.h" -#import "GTMUnitTestDevLog.h" - -#define kDefaultTimeout 5.0 - -// === Start off declaring some auxillary data structures === -static NSString *const kTestServerName = @"gtm_test_server"; -static NSString *const kGTMTransientRootNameKey = @"GTMTransientRootNameKey"; -static NSString *const kGTMTransientRootLockKey = @"GTMTransientRootLockKey"; - -enum { - kGTMTransientThreadConditionStarting = 777, - kGTMTransientThreadConditionStarted, - kGTMTransientThreadConditionQuitting, - kGTMTransientThreadConditionQuitted -}; - -// The @protocol that we'll use for testing with. -@protocol DOTestProtocol -- (oneway void)doOneWayVoid; -- (bycopy NSString *)doReturnStringBycopy; -- (void)throwException; -@end - -// The "server" we'll use to test the DO connection. This server will implement -// our test protocol, and it will run in a separate thread from the main -// unit testing thread, so the DO requests can be serviced. -@interface DOTestServer : NSObject { -} -- (void)runThread:(NSDictionary *)args; -@end - -@implementation DOTestServer - -- (void)runThread:(NSDictionary *)args { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSConditionLock *lock = [args objectForKey:kGTMTransientRootLockKey]; - NSString *serverName = [args objectForKey:kGTMTransientRootNameKey]; - NSDate *future = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - if(![lock lockWhenCondition:kGTMTransientThreadConditionStarting - beforeDate:future]) { - _GTMDevLog(@"Unable to acquire lock in runThread! This is BAD!"); - [pool drain]; - [NSThread exit]; - } - - NSConnection *conn = [NSConnection defaultConnection]; - [conn setRootObject:self]; - if (![conn registerName:serverName]) { - _GTMDevLog(@"Failed to register DO root object with name '%@'", - serverName); - [pool drain]; - [NSThread exit]; - } - [lock unlockWithCondition:kGTMTransientThreadConditionStarted]; - while (![lock tryLockWhenCondition:kGTMTransientThreadConditionQuitting]) { - NSDate* runUntil = [NSDate dateWithTimeIntervalSinceNow:0.1]; - [[NSRunLoop currentRunLoop] runUntilDate:runUntil]; - } - [conn setRootObject:nil]; - [conn registerName:nil]; - [pool drain]; - [lock unlockWithCondition:kGTMTransientThreadConditionQuitted]; -} - -- (oneway void)doOneWayVoid { - // Do nothing -} -- (bycopy NSString *)doReturnStringBycopy { - return @"TestString"; -} - -- (void)throwException { - [NSException raise:@"testingException" format:@"for the unittest"]; -} - -@end - -// === Done with auxillary data structures, now for the main test class === - -@interface GTMTransientRootProxyTest : GTMTestCase { - @private - DOTestServer *server_; - NSConditionLock *syncLock_; -} -@end - -@implementation GTMTransientRootProxyTest - -- (void)testTransientRootProxy { - // Setup our server and create a unqiue server name every time we run - NSTimeInterval timeStamp = [[NSDate date] timeIntervalSinceReferenceDate]; - NSString *serverName = - [NSString stringWithFormat:@"%@_%f", kTestServerName, timeStamp]; - server_ = [[[DOTestServer alloc] init] autorelease]; - syncLock_ = [[[NSConditionLock alloc] - initWithCondition:kGTMTransientThreadConditionStarting] - autorelease]; - NSDictionary *args = [NSDictionary dictionaryWithObjectsAndKeys: - syncLock_, kGTMTransientRootLockKey, - serverName, kGTMTransientRootNameKey, - nil]; - [NSThread detachNewThreadSelector:@selector(runThread:) - toTarget:server_ - withObject:args]; - NSDate *future = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - STAssertTrue([syncLock_ lockWhenCondition:kGTMTransientThreadConditionStarted - beforeDate:future], - @"Unable to start thread"); - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionStarted]; - - GTMTransientRootProxy *failProxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:nil - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertNil(failProxy, @"should have failed w/o a name"); - failProxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:serverName - host:nil - protocol:nil - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertNil(failProxy, @"should have failed w/o a protocol"); - failProxy = [[[GTMTransientRootProxy alloc] init] autorelease]; - STAssertNil(failProxy, @"should have failed just calling init"); - - GTMTransientRootProxy *proxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:serverName - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - - STAssertEqualObjects([proxy doReturnStringBycopy], @"TestString", - @"proxy should have returned 'TestString'"); - - // Redo the *exact* same test to make sure we can have multiple instances - // in the same app. - proxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:serverName - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertEqualObjects([proxy doReturnStringBycopy], - @"TestString", @"proxy should have returned " - @"'TestString'"); - - // Test the GTMRootProxyCatchAll within this test so we don't have to rebuild - // the server again. - - GTMRootProxyCatchAll *catchProxy = - [GTMRootProxyCatchAll rootProxyWithRegisteredName:serverName - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - - [GTMUnitTestDevLog expectString:@"Proxy for invoking throwException has " - @"caught and is ignoring exception: [NOTE: this exception originated in " - @"the server.]\nfor the unittest"]; - id e = nil; - @try { - // Has the server throw an exception - [catchProxy throwException]; - } @catch (id ex) { - e = ex; - } - STAssertNil(e, @"The GTMRootProxyCatchAll did not catch the exception: %@.", - e); - - proxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:@"FAKE_SERVER" - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:kDefaultTimeout - replyTimeout:kDefaultTimeout]; - STAssertNotNil(proxy, @"proxy shouldn't be nil, even when registered w/ a " - @"fake server"); - STAssertFalse([proxy isConnected], @"the proxy shouldn't be connected due to " - @"the fake server"); - - // Now set up a proxy, and then kill our server. We put a super short time - // out on it, because we are expecting it to fail. - proxy = - [GTMTransientRootProxy rootProxyWithRegisteredName:serverName - host:nil - protocol:@protocol(DOTestProtocol) - requestTimeout:0.01 - replyTimeout:0.01]; - [syncLock_ tryLockWhenCondition:kGTMTransientThreadConditionStarted]; - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionQuitting]; - - // Wait for the server to shutdown so we clean up nicely. - // The max amount of time we will wait until we abort this test. - NSDate *timeout = [NSDate dateWithTimeIntervalSinceNow:kDefaultTimeout]; - // The server did not shutdown and we want to capture this as an error - STAssertTrue([syncLock_ lockWhenCondition:kGTMTransientThreadConditionQuitted - beforeDate:timeout], - @"The server did not shutdown gracefully before the timeout."); - [syncLock_ unlockWithCondition:kGTMTransientThreadConditionQuitted]; - - // This should fail gracefully because the server is dead. - STAssertNil([proxy doReturnStringBycopy], @"proxy should have returned nil"); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.h deleted file mode 100644 index e53b541b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.h +++ /dev/null @@ -1,196 +0,0 @@ -// -// GTMValidatingContainers.h -// -// Mutable containers that do verification of objects being added to them -// at runtime. Support for arrays, dictionaries and sets. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// GTMValidatingContainers are a set of mutable container classes that allow -// you to have a selector on a target that is called to verify that the objects -// being put into the container are valid. This can be controlled at compile -// time so that you don't take the performance hit in a release build using the -// GTM_CONTAINERS_VALIDATE macro. -// We have supplied validators for simple cases such as kindOfClass or -// conformsToProtocol. See GTMKindOfClassValidator et al. for details. -// -// Example of usage: -// id target = [GTMKindOfClassValidator validateAgainstClass:[NSString class]]; -// SEL selector = @selector(validateObject:forContainer:); -// GTMValidatingArray *array = [GTMValidatingArray validatingArrayWithTarget:target -// selector:selector]; -// [array addObject:@"foo"]; // Will be good -// [array addObject:[NSNumber numberWithInt:2]]; // Will fail -// -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -// -// Note that the validating collection types retain their targets. - -#import -#import "GTMDefines.h" - -// By default we only validate containers in debug. If you want to validate -// in release as well, #define GTM_CONTAINERS_VALIDATE in a prefix or build -// settings. -#ifndef GTM_CONTAINERS_VALIDATE -#if DEBUG -#define GTM_CONTAINERS_VALIDATE 1 -#else // DEBUG -#define GTM_CONTAINERS_VALIDATE 0 -#endif // DEBUG -#endif // GTM_CONTAINERS_VALIDATE - -// If GTM_CONTAINERS_VALIDATE is on, and log and assert are both turned off -// (see below), the object that failed validation will just not be added -// to the container. - -// If you don't want log to occur on validation failure define -// GTM_CONTAINERS_VALIDATION_FAILED_LOG to 0 in a prefix or build settings. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_LOG -#define GTM_CONTAINERS_VALIDATION_FAILED_LOG GTM_CONTAINERS_VALIDATE -#endif // GTM_CONTAINERS_VALIDATION_FAILED_LOG - -// If you don't want an assert to occur on validation failure define -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT to 0 in a prefix or build settings. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT -#define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT GTM_CONTAINERS_VALIDATE -#endif // GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - -// Sometimes you get a container back from somebody else and want to validate -// that it contains what you think it contains. _GTMValidateContainer -// allows you to do exactly that. _GTMValidateContainer... give you specialty -// functions for doing common types of validations. These all inline to nothing -// if GTM_CONTAINERS_VALIDATE is not defined. -#if GTM_CONTAINERS_VALIDATE -void _GTMValidateContainer(id container, id target, SEL selector); -void _GTMValidateContainerContainsKindOfClass(id container, Class cls); -void _GTMValidateContainerContainsMemberOfClass(id container, Class cls); -void _GTMValidateContainerConformsToProtocol(id container, Protocol *prot); -void _GTMValidateContainerItemsRespondToSelector(id container, SEL sel); -#else -GTM_INLINE void _GTMValidateContainer(id container, id target, SEL selector) { -} -GTM_INLINE void _GTMValidateContainerContainsKindOfClass(id container, - Class cls) { -} -GTM_INLINE void _GTMValidateContainerContainsMemberOfClass(id container, - Class cls) { -} -GTM_INLINE void _GTMValidateContainerConformsToProtocol(id container, - Protocol *prot) { -} -GTM_INLINE void _GTMValidateContainerItemsRespondToSelector(id container, - SEL sel) { -} -#endif - - -// See comments near top of file for class description. -@interface GTMValidatingArray : NSMutableArray { -#if GTM_CONTAINERS_VALIDATE - NSMutableArray *embeddedContainer_; - id target_; - SEL selector_; -#endif // #if GTM_CONTAINERS_VALIDATE -} -+ (id)validatingArrayWithTarget:(id)target selector:(SEL)sel; -+ (id)validatingArrayWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel; -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -@end - -// See comments near top of file for class description. -@interface GTMValidatingDictionary : NSMutableDictionary { -#if GTM_CONTAINERS_VALIDATE - NSMutableDictionary *embeddedContainer_; - id target_; - SEL selector_; -#endif // #if GTM_CONTAINERS_VALIDATE -} -+ (id)validatingDictionaryWithTarget:(id)target selector:(SEL)sel; -+ (id)validatingDictionaryWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel; -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -@end - -// See comments near top of file for class description. -@interface GTMValidatingSet : NSMutableSet { -#if GTM_CONTAINERS_VALIDATE - NSMutableSet *embeddedContainer_; - id target_; - SEL selector_; -#endif // #if GTM_CONTAINERS_VALIDATE -} -+ (id)validatingSetWithTarget:(id)target selector:(SEL)sel; -+ (id)validatingSetWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel; -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel; -@end - -#pragma mark - -#pragma mark Simple Common Validators -// See comments near top of file for examples of how these are used. -@protocol GTMContainerValidatorProtocol -- (BOOL)validateObject:(id)object forContainer:(id)container; -@end - -// Validates that a given object is a kind of class (instance of class or an -// instance of any class that inherits from that class) -@interface GTMKindOfClassValidator : NSObject { - Class cls_; -} -+ (id)validateAgainstClass:(Class)cls; -- (id)initWithClass:(Class)cls; -@end - -// Validates that a given object is a member of class (exact instance of class) -@interface GTMMemberOfClassValidator : NSObject { - Class cls_; -} -+ (id)validateAgainstClass:(Class)cls; -- (id)initWithClass:(Class)cls; -@end - -// Validates that a given object conforms to a protocol -@interface GTMConformsToProtocolValidator : NSObject { - Protocol* prot_; -} -+ (id)validateAgainstProtocol:(Protocol*)prot; -- (id)initWithProtocol:(Protocol*)prot; -@end - -// Validates that a given object responds to a given selector -@interface GTMRespondsToSelectorValidator : NSObject { - SEL sel_; -} -+ (id)validateAgainstSelector:(SEL)sel; -- (id)initWithSelector:(SEL)sel; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.m deleted file mode 100644 index 3b313564..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainers.m +++ /dev/null @@ -1,490 +0,0 @@ -// -// GTMValidatingContainers.m -// -// Mutable containers that do verification of objects being added to them -// at runtime. Support for arrays, dictionaries and sets. -// -// Documentation on subclassing class clusters (which we are doing) is here: -// http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_9.html#//apple_ref/doc/uid/TP40002974-CH4-DontLinkElementID_105 -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMValidatingContainers.h" - -#if GTM_CONTAINERS_VALIDATE - -#import "GTMDebugSelectorValidation.h" -#if GTM_IPHONE_SDK -#import -#import -#else // GTM_IPHONE_SDK -#import -#endif // GTM_IPHONE_SDK - -GTM_INLINE BOOL VerifyObjectWithTargetAndSelectorForContainer(id anObject, - id target, - SEL selector, - id container) { - // We must take care here, since Intel leaves junk in high bytes of return - // register for predicates that return BOOL. - // For details see: - // http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_23.html - // and - // http://www.red-sweater.com/blog/320/abusing-objective-c-with-class#comment-83187 - BOOL isGood = ((BOOL (*)(id, SEL, id, id))objc_msgSend)(target, selector, - anObject, container); - if (!isGood) { -#if GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - _GTMDevAssert(isGood, @"%@ failed container verification for %@", - anObject, [container description]); -#endif // GTM_CONTAINERS_VALIDATION_FAILED_LOG -#if GTM_CONTAINERS_VALIDATION_FAILED_LOG - _GTMDevLog(@"%@ failed container verification for %@", anObject, - [container description]); -#endif // GTM_CONTAINERS_VALIDATION_FAILED_LOG - } - return isGood; -} - -GTM_INLINE void VerifySelectorOnTarget(SEL sel, id target) { - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(target, - sel, - @encode(BOOL), - @encode(id), - @encode(id), - nil); -} - -void _GTMValidateContainerContainsKindOfClass(id container, Class cls) { - GTMKindOfClassValidator *validator; - validator = [GTMKindOfClassValidator validateAgainstClass:cls]; - _GTMValidateContainer(container, - validator, - @selector(validateObject:forContainer:)); -} - -void _GTMValidateContainerContainsMemberOfClass(id container, Class cls) { - GTMMemberOfClassValidator *validator; - validator = [GTMMemberOfClassValidator validateAgainstClass:cls]; - _GTMValidateContainer(container, - validator, - @selector(validateObject:forContainer:)); -} - -void _GTMValidateContainerConformsToProtocol(id container, Protocol* prot) { - GTMConformsToProtocolValidator *validator; - validator = [GTMConformsToProtocolValidator validateAgainstProtocol:prot]; - _GTMValidateContainer(container, - validator, - @selector(validateObject:forContainer:)); -} - -void _GTMValidateContainerItemsRespondToSelector(id container, SEL sel) { - GTMRespondsToSelectorValidator *validator; - validator = [GTMRespondsToSelectorValidator validateAgainstSelector:sel]; - _GTMValidateContainer(container, - validator, - @selector(validateObject:forContainer:)); -} - -void _GTMValidateContainer(id container, id target, SEL selector) { - if ([container respondsToSelector:@selector(objectEnumerator)]) { - NSEnumerator *enumerator = [container objectEnumerator]; - id val; - while ((val = [enumerator nextObject])) { - VerifyObjectWithTargetAndSelectorForContainer(val, - target, - selector, - container); - } - } else { -#if GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - _GTMDevAssert(0, @"container %@ does not respond to -objectEnumerator", - [container description]); -#endif // GTM_CONTAINERS_VALIDATION_FAILED_LOG -#if GTM_CONTAINERS_VALIDATION_FAILED_LOG - _GTMDevLog(@"container does not respont to -objectEnumerator: %@", - [container description]); -#endif // GTM_CONTAINERS_VALIDATION_FAILED_LOG - } -} -#endif // GTM_CONTAINERS_VALIDATE - -@implementation GTMValidatingArray - -+ (id)validatingArrayWithTarget:(id)target selector:(SEL)sel { - return [self validatingArrayWithCapacity:0 target:target selector:sel]; -} - -+ (id)validatingArrayWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - return [[[[self class] alloc] initValidatingWithCapacity:0 - target:target - selector:sel] autorelease]; -} - -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel { - return [self initValidatingWithCapacity:0 target:target selector:sel]; -} - -#if GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - embeddedContainer_ = [[NSMutableArray alloc] initWithCapacity:capacity]; - target_ = [target retain]; - selector_ = sel; - VerifySelectorOnTarget(selector_, target_); - } - return self; -} - -- (void)dealloc { - [embeddedContainer_ release]; - [target_ release]; - [super dealloc]; -} - -- (NSUInteger)count { - return [embeddedContainer_ count]; -} - -- (id)objectAtIndex:(NSUInteger)idx { - return [embeddedContainer_ objectAtIndex:idx]; -} - -- (void)addObject:(id)anObject { - if (VerifyObjectWithTargetAndSelectorForContainer(anObject, target_, - selector_, self)) { - [embeddedContainer_ addObject:anObject]; - } -} - -- (void)insertObject:(id)anObject atIndex:(NSUInteger)idx { - if (VerifyObjectWithTargetAndSelectorForContainer(anObject, target_, - selector_, self)) { - [embeddedContainer_ insertObject:anObject atIndex:idx]; - } -} - -- (void)removeLastObject { - [embeddedContainer_ removeLastObject]; -} - -- (void)removeObjectAtIndex:(NSUInteger)idx { - [embeddedContainer_ removeObjectAtIndex:idx]; -} - -- (void)replaceObjectAtIndex:(NSUInteger)idx withObject:(id)anObject { - if (VerifyObjectWithTargetAndSelectorForContainer(anObject, target_, - selector_, self)) { - [embeddedContainer_ replaceObjectAtIndex:idx withObject:anObject]; - } -} - -- (NSString*)description { - return [NSString stringWithFormat:@"%@ - %@", - NSStringFromClass([self class]), - [embeddedContainer_ description]]; -} - -#else // GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - [self release]; - } - return [[NSMutableArray alloc] initWithCapacity:capacity]; -} -#endif // GTM_CONTAINERS_VALIDATE -@end - -@implementation GTMValidatingDictionary -+ (id)validatingDictionaryWithTarget:(id)target selector:(SEL)sel { - return [self validatingDictionaryWithCapacity:0 target:target selector:sel]; -} - -+ (id)validatingDictionaryWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - return [[[[self class] alloc] initValidatingWithCapacity:0 - target:target - selector:sel] autorelease]; -} - -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel { - return [self initValidatingWithCapacity:0 target:target selector:sel]; -} - -#if GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - embeddedContainer_ = [[NSMutableDictionary alloc] initWithCapacity:capacity]; - target_ = [target retain]; - selector_ = sel; - VerifySelectorOnTarget(selector_, target_); - } - return self; -} - -- (void)dealloc { - [target_ release]; - [embeddedContainer_ release]; - [super dealloc]; -} - -- (NSUInteger)count { - return [embeddedContainer_ count]; -} - -- (NSEnumerator *)keyEnumerator { - return [embeddedContainer_ keyEnumerator]; -} - -- (id)objectForKey:(id)aKey { - return [embeddedContainer_ objectForKey:aKey]; -} - -- (void)removeObjectForKey:(id)aKey { - [embeddedContainer_ removeObjectForKey:aKey]; -} - -- (void)setObject:(id)anObject forKey:(id)aKey { - if (VerifyObjectWithTargetAndSelectorForContainer(anObject, target_, - selector_, self)) { - [embeddedContainer_ setObject:anObject forKey:aKey]; - } -} - -- (NSString*)description { - return [NSString stringWithFormat:@"%@ - %@", - NSStringFromClass([self class]), - [embeddedContainer_ description]]; -} - -#else // GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - [self release]; - } - return [[NSMutableDictionary alloc] initWithCapacity:capacity]; - -} -#endif // GTM_CONTAINERS_VALIDATE -@end - -@implementation GTMValidatingSet -+ (id)validatingSetWithTarget:(id)target selector:(SEL)sel { - return [self validatingSetWithCapacity:0 target:target selector:sel]; -} - -+ (id)validatingSetWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - return [[[[self class] alloc] initValidatingWithCapacity:0 - target:target - selector:sel] autorelease]; -} -- (id)initValidatingWithTarget:(id)target selector:(SEL)sel { - return [self initValidatingWithCapacity:0 target:target selector:sel]; -} - -#if GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - embeddedContainer_ = [[NSMutableSet alloc] initWithCapacity:capacity]; - target_ = [target retain]; - selector_ = sel; - VerifySelectorOnTarget(selector_, target_); - } - return self; -} - -- (void)dealloc { - [target_ release]; - [embeddedContainer_ release]; - [super dealloc]; -} - -- (NSUInteger)count { - return [embeddedContainer_ count]; -} - -- (id)member:(id)object { - return [embeddedContainer_ member:object]; -} - -- (NSEnumerator *)objectEnumerator { - return [embeddedContainer_ objectEnumerator]; -} - -- (void)addObject:(id)object { - if (object && VerifyObjectWithTargetAndSelectorForContainer(object, - target_, - selector_, - self)) { - [embeddedContainer_ addObject:object]; - } -} - -- (void)removeObject:(id)object { - [embeddedContainer_ removeObject:object]; -} - -- (NSString*)description { - return [NSString stringWithFormat:@"%@ - %@", - NSStringFromClass([self class]), - [embeddedContainer_ description]]; -} - -#else // GTM_CONTAINERS_VALIDATE -- (id)initValidatingWithCapacity:(NSUInteger)capacity - target:(id)target - selector:(SEL)sel { - if ((self = [super init])) { - [self release]; - } - return [[NSMutableSet alloc] initWithCapacity:capacity]; -} -#endif // GTM_CONTAINERS_VALIDATE -@end - -#pragma mark - -#pragma mark Simple Common Validators -@implementation GTMKindOfClassValidator -+ (id)validateAgainstClass:(Class)cls { - return [[[[self class] alloc] initWithClass:cls] autorelease]; -} - -- (id)initWithClass:(Class)cls { -#if GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - if (!cls) { - _GTMDevLog(@"nil class"); - [self release]; - return nil; - } - cls_ = cls; - } - return self; -#else // GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - [self release]; - } - return nil; -#endif // GTM_CONTAINERS_VALIDATE -} - -- (BOOL)validateObject:(id)object forContainer:(id)container { - return [object isKindOfClass:cls_]; -} -@end - -@implementation GTMMemberOfClassValidator -+ (id)validateAgainstClass:(Class)cls { - return [[[[self class] alloc] initWithClass:cls] autorelease]; -} - -- (id)initWithClass:(Class)cls { -#if GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - if (!cls) { - _GTMDevLog(@"nil class"); - [self release]; - return nil; - } - cls_ = cls; - } - return self; -#else // GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - [self release]; - } - return nil; -#endif // GTM_CONTAINERS_VALIDATE -} - -- (BOOL)validateObject:(id)object forContainer:(id)container { - return [object isMemberOfClass:cls_]; -} -@end - -@implementation GTMConformsToProtocolValidator -+ (id)validateAgainstProtocol:(Protocol*)prot { - return [[[[self class] alloc] initWithProtocol:prot] autorelease]; -} - -- (id)initWithProtocol:(Protocol*)prot { -#if GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - if (!prot) { - _GTMDevLog(@"nil protocol"); - [self release]; - return nil; - } - prot_ = prot; - } - return self; -#else // GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - [self release]; - } - return nil; -#endif // GTM_CONTAINERS_VALIDATE -} - -- (BOOL)validateObject:(id)object forContainer:(id)container { - return [object conformsToProtocol:prot_]; -} -@end - -@implementation GTMRespondsToSelectorValidator -+ (id)validateAgainstSelector:(SEL)sel { - return [[[[self class] alloc] initWithSelector:sel] autorelease]; -} - -- (id)initWithSelector:(SEL)sel { -#if GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - if (!sel) { - _GTMDevLog(@"nil selector"); - [self release]; - return nil; - } - sel_ = sel; - } - return self; -#else // GTM_CONTAINERS_VALIDATE - if ((self = [super init])) { - [self release]; - } - return nil; -#endif // GTM_CONTAINERS_VALIDATE -} - -- (BOOL)validateObject:(id)object forContainer:(id)container { - return [object respondsToSelector:sel_]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainersTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainersTest.m deleted file mode 100644 index f9cc3772..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/Foundation/GTMValidatingContainersTest.m +++ /dev/null @@ -1,378 +0,0 @@ -// -// GTMValidatingContainersTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMValidatingContainers.h" -#import "GTMSenTestCase.h" -#import "GTMUnitTestDevLog.h" - -#pragma mark Test Support Declarations -@protocol GTMVCTestProtocol -@end - -@interface GTMVCTestClass : NSObject -+ (id)instance; -@end - -@interface GTMVCTestSubClass : GTMVCTestClass -- (void)foo; -@end - -@interface GTMVCValidatingTests : GTMTestCase { - GTMVCTestClass *testClass_; - GTMVCTestSubClass *testSubClass_; -} -@end - -@interface GTMVCValidatorTests : GTMVCValidatingTests -@end - -@interface GTMVCContainerTests : GTMVCValidatingTests { - GTMConformsToProtocolValidator *validator_; - SEL selector_; -} -@end - -@interface GTMVCArrayTests : GTMVCContainerTests -@end - -@interface GTMVCDictionaryTests : GTMVCContainerTests -@end - -@interface GTMVCSetTests : GTMVCContainerTests -@end - -@interface GTMValidateContainerTests : GTMTestCase -@end - -#pragma mark - -#pragma mark Test Support Definitions - -@implementation GTMVCTestClass -+ (id)instance { - return [[[[self class] alloc] init] autorelease]; -} - -- (NSString*)description { - return NSStringFromClass([self class]); -} -@end - -@implementation GTMVCTestSubClass -- (void)foo { -} -@end - -@implementation GTMVCContainerTests -- (void)setUp { - [super setUp]; - Protocol *prot = @protocol(GTMVCTestProtocol); - validator_ = [[GTMConformsToProtocolValidator alloc] initWithProtocol:prot]; - selector_ = @selector(validateObject:forContainer:); -} - -- (void)tearDown { - [validator_ release]; - [super tearDown]; -} -@end - -@implementation GTMVCValidatingTests - -- (void)setUp { - [super setUp]; - testClass_ = [[GTMVCTestClass alloc] init]; - testSubClass_ = [[GTMVCTestSubClass alloc] init]; -} - -- (void)tearDown { - [testClass_ release]; - [testSubClass_ release]; - [super tearDown]; -} - -@end - -@implementation GTMVCValidatorTests - -- (void)testKindOfClassValidator { -#if GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - [GTMUnitTestDevLog expectString:@"nil class"]; - GTMKindOfClassValidator *validator; - validator = [GTMKindOfClassValidator validateAgainstClass:nil]; - STAssertNil(validator, @"should be nil"); - - Class cls = [GTMVCTestClass class]; - validator = [GTMKindOfClassValidator validateAgainstClass:cls]; - STAssertNotNil(validator, @"should be valid"); - - BOOL isGood = [validator validateObject:testClass_ forContainer:nil]; - STAssertTrue(isGood, @"should be validated"); - - isGood = [validator validateObject:testSubClass_ forContainer:nil]; - STAssertTrue(isGood, @"should be validated"); - - isGood = [validator validateObject:[NSNumber numberWithInt:0] - forContainer:nil]; - STAssertFalse(isGood, @"should fail"); -#else // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - GTMKindOfClassValidator *validator; - validator = [GTMKindOfClassValidator validateAgainstClass:nil]; - STAssertNil(validator, @"should be nil"); - - Class cls = [GTMVCTestClass class]; - validator = [GTMKindOfClassValidator validateAgainstClass:cls]; - STAssertNil(validator, @"should be nil"); -#endif // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT -} - -- (void)testMemberOfClassValidator { -#if GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - [GTMUnitTestDevLog expectString:@"nil class"]; - GTMMemberOfClassValidator *validator; - validator = [GTMMemberOfClassValidator validateAgainstClass:nil]; - STAssertNil(validator, @"should be nil"); - - Class cls = [GTMVCTestClass class]; - validator = [GTMMemberOfClassValidator validateAgainstClass:cls]; - STAssertNotNil(validator, @"should be valid"); - - BOOL isGood = [validator validateObject:testClass_ forContainer:nil]; - STAssertTrue(isGood, @"should be validated"); - - isGood = [validator validateObject:testSubClass_ forContainer:nil]; - STAssertFalse(isGood, @"should fail"); - - isGood = [validator validateObject:nil forContainer:nil]; - STAssertFalse(isGood, @"should fail"); - - isGood = [validator validateObject:[NSNumber numberWithInt:0] - forContainer:nil]; - STAssertFalse(isGood, @"should fail"); -#else // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - GTMMemberOfClassValidator *validator; - validator = [GTMMemberOfClassValidator validateAgainstClass:nil]; - STAssertNil(validator, @"should be nil"); - - Class cls = [GTMVCTestClass class]; - validator = [GTMMemberOfClassValidator validateAgainstClass:cls]; - STAssertNil(validator, @"should be nil"); -#endif // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT -} - -- (void)testConformsToProtocolValidator { -#if GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - [GTMUnitTestDevLog expectString:@"nil protocol"]; - GTMConformsToProtocolValidator *validator; - validator = [GTMConformsToProtocolValidator validateAgainstProtocol:nil]; - STAssertNil(validator, @"should be nil"); - - Protocol *prot = @protocol(GTMVCTestProtocol); - validator = [GTMConformsToProtocolValidator validateAgainstProtocol:prot]; - STAssertNotNil(validator, @"should be valid"); - - BOOL isGood = [validator validateObject:testClass_ forContainer:nil]; - STAssertFalse(isGood, @"should fail"); - - isGood = [validator validateObject:testSubClass_ forContainer:nil]; - STAssertTrue(isGood, @"should succeed"); - - isGood = [validator validateObject:nil forContainer:nil]; - STAssertFalse(isGood, @"should fail"); -#else // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - GTMConformsToProtocolValidator *validator; - validator = [GTMConformsToProtocolValidator validateAgainstProtocol:nil]; - STAssertNil(validator, @"should be nil"); - - Protocol *prot = @protocol(GTMVCTestProtocol); - validator = [GTMConformsToProtocolValidator validateAgainstProtocol:prot]; - STAssertNil(validator, @"should be nil"); -#endif // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT -} - -- (void)testRespondsToSelectorValidator { -#if GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - [GTMUnitTestDevLog expectString:@"nil selector"]; - GTMRespondsToSelectorValidator *validator; - validator = [GTMRespondsToSelectorValidator validateAgainstSelector:nil]; - STAssertNil(validator, @"should be nil"); - - SEL sel = @selector(foo); - validator = [GTMRespondsToSelectorValidator validateAgainstSelector:sel]; - STAssertNotNil(validator, @"should be valid"); - - BOOL isGood = [validator validateObject:testClass_ forContainer:nil]; - STAssertFalse(isGood, @"should fail"); - - isGood = [validator validateObject:testSubClass_ forContainer:nil]; - STAssertTrue(isGood, @"should succeed"); - - isGood = [validator validateObject:nil forContainer:nil]; - STAssertFalse(isGood, @"should fail"); -#else // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - GTMRespondsToSelectorValidator *validator; - validator = [GTMRespondsToSelectorValidator validateAgainstSelector:nil]; - STAssertNil(validator, @"should be nil"); - - SEL sel = @selector(foo); - validator = [GTMRespondsToSelectorValidator validateAgainstSelector:sel]; - STAssertNil(validator, @"should be nil"); -#endif // GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT -} - - -@end - -@implementation GTMVCArrayTests -- (void)testContainer { - GTMValidatingArray *array; - array = [GTMValidatingArray validatingArrayWithTarget:validator_ - selector:selector_]; - STAssertNotNil(array, @"should be valid"); - - array = [[[GTMValidatingArray alloc] initValidatingWithTarget:validator_ - selector:selector_] autorelease]; - STAssertNotNil(array, @"should be valid"); - - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for GTMValidatingArray .*"]; - [array addObject:testSubClass_]; - [array addObject:testClass_]; - STAssertEquals([array objectAtIndex:0], testSubClass_, @""); - - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for GTMValidatingArray .*"]; - [array insertObject:testClass_ atIndex:0]; - [array insertObject:testSubClass_ atIndex:0]; - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for GTMValidatingArray .*"]; - [array replaceObjectAtIndex:0 withObject:testClass_]; - [array replaceObjectAtIndex:0 withObject:testSubClass_]; - [array removeLastObject]; - [array removeObjectAtIndex:0]; - NSUInteger expectedCount = 0U; -#if !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - // If we're not validating, we don't expect any logs - [GTMUnitTestDevLog resetExpectedLogs]; - expectedCount = 2U; -#endif // !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - STAssertEquals([array count], expectedCount, @"should have no objects left"); - -} -@end - -@implementation GTMVCDictionaryTests -- (void)testContainer { - GTMValidatingDictionary *dictionary; - dictionary = [GTMValidatingDictionary validatingDictionaryWithTarget:validator_ - selector:selector_]; - STAssertNotNil(dictionary, @"should be valid"); - - dictionary = [[[GTMValidatingDictionary alloc] initValidatingWithTarget:validator_ - selector:selector_] autorelease]; - STAssertNotNil(dictionary, @"should be valid"); - - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for GTMValidatingDictionary .*"]; - [dictionary setObject:testClass_ forKey:@"Key1"]; - [dictionary setObject:testSubClass_ forKey:@"Key2"]; - STAssertEquals([dictionary objectForKey:@"Key2"], testSubClass_, @""); - STAssertNotNil([dictionary keyEnumerator], @""); - - [dictionary removeObjectForKey:@"Key2"]; - [dictionary removeObjectForKey:@"Key1"]; - STAssertEquals([dictionary count], (NSUInteger)0, @"should have no objects left"); - - // So we get full code coverage - [testSubClass_ foo]; -#if !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - // If we're not validating, we don't expect any logs - [GTMUnitTestDevLog resetExpectedLogs]; -#endif // !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) -} -@end - -@implementation GTMVCSetTests -- (void)testContainer { - GTMValidatingSet *set; - set = [GTMValidatingSet validatingSetWithTarget:validator_ - selector:selector_]; - STAssertNotNil(set, @"should be valid"); - - set = [[[GTMValidatingSet alloc] initValidatingWithTarget:validator_ - selector:selector_] autorelease]; - STAssertNotNil(set, @"should be valid"); - - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for GTMValidatingSet .*"]; - [set addObject:testClass_]; - [set addObject:testSubClass_]; - STAssertEqualObjects([set member:testSubClass_], testSubClass_, @""); - STAssertNotNil([set objectEnumerator], @""); - - [set removeObject:testClass_]; - [set removeObject:testSubClass_]; -#if !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - // If we're not validating, we don't expect any logs - [GTMUnitTestDevLog resetExpectedLogs]; -#endif // !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - STAssertEquals([set count], (NSUInteger)0, @"should have no objects left"); -} -@end - -@implementation GTMValidateContainerTests -- (void)testValidatingContainers { - NSDictionary *homogenousDict = [NSDictionary dictionaryWithObjectsAndKeys: - [GTMVCTestSubClass instance], @"key1", - [GTMVCTestSubClass instance], @"key2", - nil]; - NSDictionary *heterogenousDict = [NSDictionary dictionaryWithObjectsAndKeys: - [GTMVCTestClass instance], @"key1", - [GTMVCTestSubClass instance], @"key2", - nil]; - - // Test bad container - [GTMUnitTestDevLog expectPattern:@"container does not respont to -objectEnumerator: .*"]; - _GTMValidateContainerContainsKindOfClass([NSString string], - [GTMVCTestSubClass class]); - - _GTMValidateContainerContainsKindOfClass(homogenousDict, - [GTMVCTestSubClass class]); - _GTMValidateContainerContainsKindOfClass(heterogenousDict, - [GTMVCTestClass class]); - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for .*"]; - _GTMValidateContainerContainsKindOfClass(heterogenousDict, - [GTMVCTestSubClass class]); - - _GTMValidateContainerContainsMemberOfClass(homogenousDict, - [GTMVCTestSubClass class]); - [GTMUnitTestDevLog expectPattern:@"GTMVCTestSubClass failed container verification for .*"]; - _GTMValidateContainerContainsMemberOfClass(heterogenousDict, - [GTMVCTestClass class]); - - _GTMValidateContainerConformsToProtocol(homogenousDict, - @protocol(GTMVCTestProtocol)); - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for .*"]; - _GTMValidateContainerConformsToProtocol(heterogenousDict, - @protocol(GTMVCTestProtocol)); - - _GTMValidateContainerItemsRespondToSelector(homogenousDict, - @selector(foo)); - [GTMUnitTestDevLog expectPattern:@"GTMVCTestClass failed container verification for .*"]; - _GTMValidateContainerItemsRespondToSelector(heterogenousDict, - @selector(foo)); -#if !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) - // If we're not validating, we don't expect any logs - [GTMUnitTestDevLog resetExpectedLogs]; -#endif // !(GTM_CONTAINERS_VALIDATE && GTM_CONTAINERS_VALIDATION_FAILED_LOG && !GTM_CONTAINERS_VALIDATION_FAILED_ASSERT) -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM-Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM-Info.plist deleted file mode 100644 index 41b915de..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.GTM - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMDefines.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMDefines.h deleted file mode 100644 index b88193cd..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMDefines.h +++ /dev/null @@ -1,241 +0,0 @@ -// -// GTMDefines.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// ============================================================================ - -#include -#include - -// Not all MAC_OS_X_VERSION_10_X macros defined in past SDKs -#ifndef MAC_OS_X_VERSION_10_5 - #define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 - #define MAC_OS_X_VERSION_10_6 1060 -#endif - -// ---------------------------------------------------------------------------- -// CPP symbols that can be overridden in a prefix to control how the toolbox -// is compiled. -// ---------------------------------------------------------------------------- - - -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 -#endif - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) - #if defined (__GNUC__) && (__GNUC__ == 4) - #define GTM_INLINE static __inline__ __attribute__((always_inline)) - #else - #define GTM_INLINE static __inline__ - #endif -#endif - -// Give ourselves a consistent way of doing externs that links up nicely -// when mixing objc and objc++ -#if !defined (GTM_EXTERN) - #if defined __cplusplus - #define GTM_EXTERN extern "C" - #else - #define GTM_EXTERN extern - #endif -#endif - -// Give ourselves a consistent way of exporting things if we have visibility -// set to hidden. -#if !defined (GTM_EXPORT) - #define GTM_EXPORT __attribute__((visibility("default"))) -#endif - -// _GTMDevLog & _GTMDevAssert -// -// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for -// developer level errors. This implementation simply macros to NSLog/NSAssert. -// It is not intended to be a general logging/reporting system. -// -// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert -// for a little more background on the usage of these macros. -// -// _GTMDevLog log some error/problem in debug builds -// _GTMDevAssert assert if conditon isn't met w/in a method/function -// in all builds. -// -// To replace this system, just provide different macro definitions in your -// prefix header. Remember, any implementation you provide *must* be thread -// safe since this could be called by anything in what ever situtation it has -// been placed in. -// - -// We only define the simple macros if nothing else has defined this. -#ifndef _GTMDevLog - -#ifdef DEBUG - #define _GTMDevLog(...) NSLog(__VA_ARGS__) -#else - #define _GTMDevLog(...) do { } while (0) -#endif - -#endif // _GTMDevLog - -// Declared here so that it can easily be used for logging tracking if -// necessary. See GTMUnitTestDevLog.h for details. -@class NSString; -GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...); - -#ifndef _GTMDevAssert -// we directly invoke the NSAssert handler so we can pass on the varargs -// (NSAssert doesn't have a macro we can use that takes varargs) -#if !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) \ - do { \ - if (!(condition)) { \ - [[NSAssertionHandler currentHandler] \ - handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ - file:[NSString stringWithUTF8String:__FILE__] \ - lineNumber:__LINE__ \ - description:__VA_ARGS__]; \ - } \ - } while(0) -#else // !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) do { } while (0) -#endif // !defined(NS_BLOCK_ASSERTIONS) - -#endif // _GTMDevAssert - -// _GTMCompileAssert -// _GTMCompileAssert is an assert that is meant to fire at compile time if you -// want to check things at compile instead of runtime. For example if you -// want to check that a wchar is 4 bytes instead of 2 you would use -// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) -// Note that the second "arg" is not in quotes, and must be a valid processor -// symbol in it's own right (no spaces, punctuation etc). - -// Wrapping this in an #ifndef allows external groups to define their own -// compile time assert scheme. -#ifndef _GTMCompileAssert - // We got this technique from here: - // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html - - #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg - #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) - #define _GTMCompileAssert(test, msg) \ - typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] -#endif // _GTMCompileAssert - -// Macro to allow fast enumeration when building for 10.5 or later, and -// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration -// does keys, so pick the right thing, nothing is done on the FastEnumeration -// side to be sure you're getting what you wanted. -#ifndef GTM_FOREACH_OBJECT - #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5) - #define GTM_FOREACH_OBJECT(element, collection) \ - for (element in collection) - #define GTM_FOREACH_KEY(element, collection) \ - for (element in collection) - #else - #define GTM_FOREACH_OBJECT(element, collection) \ - for (NSEnumerator * _ ## element ## _enum = [collection objectEnumerator]; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #define GTM_FOREACH_KEY(element, collection) \ - for (NSEnumerator * _ ## element ## _enum = [collection keyEnumerator]; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #endif -#endif - -// ============================================================================ - -// ---------------------------------------------------------------------------- -// CPP symbols defined based on the project settings so the GTM code has -// simple things to test against w/o scattering the knowledge of project -// setting through all the code. -// ---------------------------------------------------------------------------- - -// Provide a single constant CPP symbol that all of GTM uses for ifdefing -// iPhone code. -#if TARGET_OS_IPHONE // iPhone SDK - // For iPhone specific stuff - #define GTM_IPHONE_SDK 1 - #if TARGET_IPHONE_SIMULATOR - #define GTM_IPHONE_SIMULATOR 1 - #else - #define GTM_IPHONE_DEVICE 1 - #endif // TARGET_IPHONE_SIMULATOR -#else - // For MacOS specific stuff - #define GTM_MACOS_SDK 1 -#endif - -// Provide a symbol to include/exclude extra code for GC support. (This mainly -// just controls the inclusion of finalize methods). -#ifndef GTM_SUPPORT_GC - #if GTM_IPHONE_SDK - // iPhone never needs GC - #define GTM_SUPPORT_GC 0 - #else - // We can't find a symbol to tell if GC is supported/required, so best we - // do on Mac targets is include it if we're on 10.5 or later. - #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 - #define GTM_SUPPORT_GC 0 - #else - #define GTM_SUPPORT_GC 1 - #endif - #endif -#endif - -// To simplify support for 64bit (and Leopard in general), we provide the type -// defines for non Leopard SDKs -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 - // NSInteger/NSUInteger and Max/Mins - #ifndef NSINTEGER_DEFINED - #if __LP64__ || NS_BUILD_32_LIKE_64 - typedef long NSInteger; - typedef unsigned long NSUInteger; - #else - typedef int NSInteger; - typedef unsigned int NSUInteger; - #endif - #define NSIntegerMax LONG_MAX - #define NSIntegerMin LONG_MIN - #define NSUIntegerMax ULONG_MAX - #define NSINTEGER_DEFINED 1 - #endif // NSINTEGER_DEFINED - // CGFloat - #ifndef CGFLOAT_DEFINED - #if defined(__LP64__) && __LP64__ - // This really is an untested path (64bit on Tiger?) - typedef double CGFloat; - #define CGFLOAT_MIN DBL_MIN - #define CGFLOAT_MAX DBL_MAX - #define CGFLOAT_IS_DOUBLE 1 - #else /* !defined(__LP64__) || !__LP64__ */ - typedef float CGFloat; - #define CGFLOAT_MIN FLT_MIN - #define CGFLOAT_MAX FLT_MAX - #define CGFLOAT_IS_DOUBLE 0 - #endif /* !defined(__LP64__) || !__LP64__ */ - #define CGFLOAT_DEFINED 1 - #endif // CGFLOAT_DEFINED -#endif // MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM_Prefix.pch b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM_Prefix.pch deleted file mode 100644 index a7c0011a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTM_Prefix.pch +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// We don't require a prefix to use any GTM code, so this prefix is just to -// speed up the basic compiles of *all* of the GTM projects/targets. - -// We don't want to drag GTMDefines into the prefix so we make sure each file -// that directly needs it includes it, so we just use the iphone test directly -// instead of our GTM_IPHONE_SDK symbol. -#ifdef __OBJC__ - #include - #if TARGET_OS_IPHONE // iPhone SDK - #import - #import - #else - #import - #endif - // This turns on unit test logging so that we can track unittests if we are - // doing them. See GTMUnitTestDevLog.h for details. - // (_GTMUnitTestDevLog comes from GTMDevLogUnitTestingBridge.m) - #define _GTMDevLog _GTMUnitTestDevLog -#endif - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMiPhone-Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMiPhone-Info.plist deleted file mode 100644 index 68982241..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/GTMiPhone-Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.GTMiPhone - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/ReleaseNotes.txt b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/ReleaseNotes.txt deleted file mode 100644 index 7e76a234..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/ReleaseNotes.txt +++ /dev/null @@ -1,399 +0,0 @@ -Google Toolbox for Mac Release Notes - -Project site: http://code.google.com/p/google-toolbox-for-mac/ -Discussion group: http://groups.google.com/group/google-toolbox-for-mac - - -Release ?.?.? -Changes since 1.5.1 - -- Added GTMNSArray+Merge for merging one array into another with or without - a custom merging function, returning a new array with the merged contents. - -- Added GTMSignalHandler for simple signal handling (via kqueue/runloop). This - has gotten an api tweak, so some code that started using it will need - updating. Initial landing had a bug where it could leak memory due to - how CFRunLoops work, now fixed. - -- Fixed up GTMIPhoneUnitTestDelegate to be pickier about which tests it runs - -- Added GTMNSString+URLArguments to GTMiPhone - -- Added GTMHTTPFetcher and GTMHTTPServer to GTMiPhone - -- Made sure that build would work with iPhone device attached, and that all - tests run directly on the phone. - -- Added GTMValidatingContainers which are a set of mutable container classes - that allow you to have a selector on a target that is called to verify that - the objects being put into the container are valid. This can be controlled - at compile time so that you don't take the performance hit in a release build. - -- Added GTMPath, which represents an existing absolute path on the file system. - It also makes it very easy to contruct new paths in the file system as well - as whole directory hierarchies. - -- Added GTMNSString+Replace for a common replacement need. - -- Added NSString+FindFolder for two commen helpers for building paths to common - locations. - -- Added GTMLargeTypeWindow for doing display windows similar to Address Book - Large Type display for phone numbers. - -- Removed GTMNSWorkspace+ScreenSaver as it has always been a little dodgy due - to it's dependencies on undocumented frameworks, and the ScreenSaver - framework doesn't play nicely in GC mode. - -- Added property methods to GTMHTTPFetcher. These are convenient alternatives - to storing an NSDictionary in the userData. - -- Renamed GTMDevLog.m to GTMDevLogUnitTestingBridge.m and added some more - comments where it comes into play to hopefully make it more clear that it - isn't needed in most cases. - -- Fixed a potential GTMHTTPFetcher crash on failed authentication. - -- Added a obj-c logging package, GTMLogger, for applications that want an - application level logging system. See GTMLogger.h, GTMLogger+ASL.h, and - GTMLoggerRingBufferWriter.h for what the basic system and two optional - additions can do. - -- Added GTMNSMakeUncollectable for forcing objects to survive in a GC world. - -- Added GTMCFAutorelease to make the [GTMNSMakeCollectable(cfFoo) autorelease] - simpler and clearer, it's now just GTMCFAutorelease(cfFoo), and works in - both GC and non-GC world. - -- Added GTMIsGarbageCollectionEnabled to GTMGarbageCollection.h. See the note - there for it's usage. - -- Disabled the unittests for things on top of NSAppleScript in a GC world since - Apple has bugs and it can crash. See the unittest for a note about it. - -- GTMStackTrace now can figure out ObjC symbols. Downside it is now ObjC only. - -- GTMFourCharCode can now be used with NSAppleEventDescriptors easily. - typeType, typeKeyword, typeApplSignature, and typeEnumerated all get - turned into GTMFourCharCodes. - -- Fixed up crash in GTMLoggerRingBufferWriter when used with GC on. - -- Significant updates to GTMNSAppleScript+Handler allowing you to - list all handlers and properties (including inherited) and cleans up - several errors in how scripting was being handled. - -- Added GTMGetURLHandler class that gives you a very easy way of supporting - Get URL events just by adding a key to your plists, and adding a single - method to your class. See GTMGetURLHandler.m for more details. - -- Added XcodeProject, AppleScript, and InterfaceBuilder Spotlight Plugins. - Allows you to index .xcodeproj, .scpt, .scptd, .xib, .nib, and - .aib files. See Readmes beside individual projects in SpotlightPlugins. - -- Added GTMExceptionalInlines for dealing with cases where you get - warning: variable 'r' might be clobbered by 'longjmp' or 'vfork' - when using certain Apple inlined functions in @synchronized/@try blocks. - -- Updated to Xcode 3.1 so the GTM and iPhone project have the same baseline. - The code should work in other version of xcode, but the projects and - xcconfig files now use 3.1 features. - -- Added GTMABAddressBook which is a cocoa wrapper for the 'C' AddressBook - APIs on the iPhone. - -- Added several set environment variable statements to RunIPhoneUnitTest.sh - to encourage bugs to come out of the woodwork. - -- Added GTMTestTimer.h for doing high fidelity timings. - -- Added ability to control using zombies to iPhone unit test script. It can be - controlled by the GTM_DISABLE_ZOMBIES environment variable - -- Added ability to control termination to iPhone unit test script. It can be - controlled by the GTM_DISABLE_TERMINATION environment variable - -- Fixed several leaks found with leak checking enabled. - -- Updated the iPhone xcconfigs to support the different OS versions. - -- GTM_INLINE will make sure a function gets inlined, and provides a consistent - way for all GTM code to do it. - -- Added GTMDebugThreadValidation to allow you to enforce the fact that your - code must run in the main thread in DEBUG builds. - -- Updated some internals of the iPhone unittesting so it doesn't double print - the test descriptions, file names, or lines numbers of a test failure line. - Also includes the test names in the error output. - -- Changed the xcconfigs so that know it's easier to set different settings at - the different levels and not accidentally overwrite settings set at lower - levels in the "settings collapse". Also tightened up warnings significantly. - -- Changed how gtm_unitTestExposedBindingsTestValues works. If you have an - implementation of gtm_unitTestExposedBindingsTestValues in your own code - you will need to update to the new way of calling. See implementations in - GTMNSObject+BindingUnitTesting.m for details. - -- Added support for grabbing the build number for a particular OS in - GTMSystemVersion and easily comparing it to known build numbers, and switched - some types from in GTMSystemVersion from "int" to SInt32 to make 64 bit work - better. - -- Added support for SnowLeopard (10A96). We build cleanly with the 10.6 SDKs and - all radar checks were updated accordingly. Build All script was also updated - to build on SnowLeopard if you have the SDK available. - -- Turned off building ppc64 GTM because the SnowLeopard SDK currently - doesn't have ppc64 support, so SenTestCase isn't defined. This makes it - impossible to build the ppc64 10.5 config on SnowLeopard. We have left the - setting in the xcconfig for those of you who need it, but have disabled - it in the GTM project settings. - -- Turned on stack smashing protection on the debug builds for all Leopard - and above. - -- Added ability to easily do leak checking by defining the GTM_ENABLE_LEAKS - environment variable. It isn't on by default because several of Apple's - frameworks leak. You can work around these false positives by using the - GTM_LEAKS_SYMBOLS_TO_IGNORE environment variable. Also if you turn on leaks - make sure to turn off zombies by defining the GTM_DISABLE_ZOMBIES variable, - otherwise every memory allocation you do will look like a leak. - -- Added has ability to check if a script has an open handler to - GTMNSAppleScript+Handler. - -- GTMStackTrace support for building a trace from the call stack in an - NSException (for 10.5+ and iPhone). - -- GTMStackTrace works on 10.5+ (and iPhone) using NSThread to build the call - stack. - -- GTMLightweightProxy for breaking retain cycles. - -- Added GTM_EXTERN that makes it easier to mix and match objc and objc++ code. - -- Added GTMHotKeysTextField for display and editing of hot key settings. - -- Added GTMCarbonEvent for dealing with Carbon Events and HotKeys in a ObjC - like way. - -- Backported the Atomic Barrier Swap functions for Objective C back to Tiger. - -- Added a variety of new functions to GTMUnitTestingUtilities for checking - if the screensaver is in the way, waiting on user events, and generating - keystrokes. - -- If you are using any Carbon routines that log (DebugStr, AssertMacros.h) and - use GTMUnitTestDevLog, the log routines now go through _GTMDevLog so that - they can be caught in GTMUnitTestDevLog and verified like any _GTMDevLog calls - you may make. For an example of this in action see GTMCarbonEventTest.m. - Since we have turned this on, we have turned off using _debug frameworks - from the RunUnitTests.sh because it was reporting a pile of uninteresting - issues that were interfering with unittests. - -- Added GTMFileSystemKQueue. It provides a simple wrapper for kqueuing - something in the file system and tracking changes to it. Initial landing - had a bug where it could leak memory due to how CFRunLoops work, now fixed. - -- RunIPhoneUnitTest.sh now cleans up the user home directory and creates - a documents directory within it, used when requesting a NSDocumentDirectory. - -- Added GTMNSFileManager+Carbon which contains routines for path <-> Alias - conversion and path <-> FSRef conversion. - -- Added GTM_EXPORT as a standard way of exporting symbols. - -- Added GTMUnitTestDevLogDebug which extends GTMUnitTestDevLog to only look - for the messages in debug builds, to make it easier to validate messages - that are only present in debug builds. - -- Added GTM_SUPPORT_GC for controlling the inclusion of GC related code. - -- If you are using GTMUnitTestDevLog, it also tries to capture logs from - NSAssert. - -- Added GTM_FOREACH_OBJECT/GTM_FOREACH_KEY that uses NSEnumerator and - objectEnumerator/keyEnumerator on 10.4, but on 10.5+/iPhone uses - FastEnumeration. - -- GTMNSWorkspace+Running gives a variety of ways of determining the attributes - of running processes. - -- If the iPhone unittesting support is exiting when done, it now properly sets - the exit code based on test success/failure. - -- Added GTMNSObject+KeyValueObserving to make it easier on folks to do KVO - "correctly". Based on some excellent code by Michael Ash. - http://www.mikeash.com/?page=pyblog/key-value-observing-done-right.html - This has been added for iPhone and OS X. - -- Fixed up GTMSenTestCase on iPhone so that it has a description that matches - that of OCUnit. - -- Added GTMAbstractDOListener, GTMTransientRootProxy, and - GTMTransientRootPortProxy. These classes can be used to simplify the - use of distributed objects. GTMAbstractDOListener can be used to handle - connections from any type of port. GTMTransientRootProxy is designed for - using named connections while GTMTransientRootPortProxy is for connections - with supplied NSPorts. - -- Finally dropped GTMHTTPFetcher and GTMProgressMonitorInputStream, GData - versions now pretty much line up w/ these, so rather then both projects - maintaing them, we've dropped them and point folks at the gdata versions - which can be used independent of the rest of GData. - -- Changed gtm_createCGPath to gtm_cgPath in GTMNSBezier+CGPath. The path - returned is now autoreleased so you don't need to worry about releasing it. - -- Made some changes to the GTMNSObject+UnitTesting APIs. Specifically renamed - gtm_createUnitTestImage to gtm_unitTestImage. The value it returns is now - autoreleased, so no need to release it. Also change - gtm_createUnitTestBitmapOfSize:withData: to a C function. - -- Cleaned up GTM so that it passes the Clang checker without any warnings. - -- Added GTMLuminance for working with colors in HSL space easily. - -- Added GTMTheme for doing product wide theme modifications. - -- The Run*UnitTest.sh script now support an env var to have them delete the - current target/configs *.gcda files to avoid coverage data warning when you - edit source. - - -Release 1.5.1 -Changes since 1.5.0 -16-June-2008 - -- Fixed building tiger gcov w/ a directory path that contains a space. - - -Release 1.5.0 -Changes since 1.0.0 -13-June-2008 - -- Updated the project to Xcode 3. This is the only supported Xcode version - for the project. The code can build against the Tiger or Leopard SDKs, and - developers can pull individual files into a Xcode 2.x project and things - should work just fine. - -- Fixed up the prefix header of the project and prefix handing in the Unittest - Xcode Config. (thanks schafdog) - -- Fixed error in handling default compression for NSData+zlib - -- Changed name on API in NSString+XML and added another api to make this a - litte more clear. (thanks Kent) - -- GTMRegex - - Found and fixed a bug in the enumerators that was causing them to - incorrectly walk a string when using '^' in an expression. - - Added helpers for substring tests and unittests for the new apis. - - Added initializer that takes an outError to allow the collection of any - pattern parsing error message (in case the pattern came from a user and - complete error information is needed to message the user). - -- Added GTMScriptRunner for spawning scripts. - -- Added GTMNSFileManager+Path for two small helpers. - -- Added GTMNSWorkspace+ScreenSaver - -- Added GTMNSString+Data - -- added a common header (GTMDefines) for any common defines so the conditionals - are all in one place - -- Support for things compiling against the iPhone SDK - - Everything in the GTMiPhone project works in the iPhone - - Added iPhone xcconfig files - - Added iPhone unittests (See below) - -- More work on the UI unittests - - support pretty much any part of a UI - - support for CALayers - - full support for the iPhone - - the iPhone uses the same macro set at OCUnit, but has its own runtime - for running tests. - - extended capabilities of UIUnitTesting to be more flexible and give better - error reporting for states. - -- Renamed the actual framework to "GoogleToolboxForMac.framework" (it should - have matched the project on code.google.com from the start) - -- added a Debug-gcov target that will product debug bits w/ code coverage - support to check unittests, etc. - -- GTMDebugSelectorValidation to provide something to include in class impls - to get validation of object/selector pair(s) being implemented so you don't - have to wait for a runtime invocation failures. (especially useful for - things that take a success and failure selector so one doesn't always get - called) - -- added _GTMDevLog (really in GTMDefines) that are a set of macros that can be - used for logging. This allows any project to redefine them to direct logging - into its runtime needs. - -- Moved GTMGeometryUtils into Foundation from AppKit - -- Removed several HI* calls from GTMGeometryUtils as Carbon UI in general is - deprecated. - -- Xcode configs - - changed the layout to make it a little easier to tell how to use them. - - added Leopard or later configs - -- Unittest coverage greatly increased - -- Added RunMacOSUnitTests shell script. We run this script for starting up our - unittests because it turns on a variety of "enhancements" (such as zombies, - scribbling etc) to encourage our unittests to fail for us. - - https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19915 - -- Remove NSColor+Theme and NSWorkspace+Theme as they are no longer needed for - testing things for unittests, instead GTMUnitTestingUtilities.m(Lines 64-79) - force the user settable things to ensure tests are consistent. - -- Added GTMBase64. - -- Added GTMHTTPFetcher and GTMProgressMonitorInputStream. - -- Moved the data files for unittests into subdirectories call TestData to - help make it a little easier to find files w/in the main directories. - -- GTMDelegatingTableColumn get an overhaul to match the 10.5 sdk so it's closer - to a dropin for previous sdks. - -- Added a lot of functionality to NSAppleEventDescriptor and NSAppleScript - allowing you to easily call labeled and positional handlers in an AppleScript, - get/set properties and get NSAppleEventDescriptors for most basic datatypes. - -- Added GTMFourCharCode for wrapping FourCharCodes in an ObjC object. Mainly for - use by the NSAppleEventDescriptor code, and also useful for storing them - in ObjC collection classes. - -- Added GTMStackTrace. - -- Added NSString+URLArguments and NSDictionary+URLArguments - -- Added GTMHTTPServer as a simple server but mainly for use in unittesting. - -- Added _GTMCompileAssert for doing compile time assertions to GTMDefines.h - -- Added GTMUnitTestDevLog and GTMTestCase for logging and tracking logs while - running unittests to verify what is being logged is what you expect. All - unittests should now inherit from GTMTestCase instead of SenTestCase to take - advantage of the new log tracking. See GTMUnitTestDevLog.h for details. - -- Extracted GTMIPhoneUnitTestDelegate from GTMIPhoneUnitTestMain.m to its own - file. Tests can now be run from another application. - - -Release 1.0.0 -14-January-2008 - -- Initial public release. Includes some simple utils, xcode configs, and - some support for doing unit tests of graphical things. diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings deleted file mode 100644 index 41ade49e..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/GetMetadataForFile.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/GetMetadataForFile.m deleted file mode 100644 index d635f405..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/GetMetadataForFile.m +++ /dev/null @@ -1,121 +0,0 @@ -// -// GetMetadataForFile.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import - -static BOOL ImportScriptBundle(NSMutableDictionary *attributes, - NSString *path) { - NSBundle *scriptBundle = [NSBundle bundleWithPath:path]; - NSString *descriptionPath = [scriptBundle pathForResource:@"description" - ofType:@"rtfd"]; - NSAttributedString *attrString = nil; - if (descriptionPath) { - attrString = [[[NSAttributedString alloc] initWithPath:descriptionPath - documentAttributes:NULL] autorelease]; - } - BOOL wasGood = NO; - if (attrString) { - NSString *description = [attrString string]; - [attributes setObject:description forKey:(NSString*)kMDItemDescription]; - wasGood = YES; - } - - NSArray *scripts = [scriptBundle pathsForResourcesOfType:@"scpt" - inDirectory:@"Scripts"]; - NSEnumerator *scriptEnum = [scripts objectEnumerator]; - NSString *scriptPath; - NSMutableArray *scriptSources = [NSMutableArray array]; - while ((scriptPath = [scriptEnum nextObject])) { - NSURL *scriptURL = [NSURL fileURLWithPath:scriptPath]; - NSDictionary *error; - NSAppleScript *script - = [[[NSAppleScript alloc] initWithContentsOfURL:scriptURL - error:&error] - autorelease]; - NSString *scriptSource = [script source]; - if (scriptSource) { - [scriptSources addObject:scriptSource]; - } - } - if ([scriptSources count]) { - NSString *source = [scriptSources componentsJoinedByString:@"\n"]; - [attributes setObject:source forKey:(NSString*)kMDItemTextContent]; - wasGood = YES; - } - return wasGood; -} - -static BOOL ImportScript(NSMutableDictionary *attributes, - NSString *path) { - NSURL *fileURL = [NSURL fileURLWithPath:path]; - FSRef ref; - BOOL wasGood = NO; - if (CFURLGetFSRef((CFURLRef)fileURL, &ref)) { - ResFileRefNum resFile = FSOpenResFile(&ref, fsRdPerm); - if (resFile) { - const ResID kScriptDescriptionResID = 1128; - ResFileRefNum curResFile = CurResFile(); - UseResFile(resFile); - Handle res = Get1Resource('TEXT', kScriptDescriptionResID); - if (res) { - NSString *descString - = [[[NSString alloc]initWithBytes:(char*)(*res) - length:GetHandleSize(res) - encoding:NSMacOSRomanStringEncoding] autorelease]; - ReleaseResource(res); - if (descString) { - [attributes setObject:descString forKey:(NSString*)kMDItemDescription]; - wasGood = YES; - } - } - UseResFile(curResFile); - CloseResFile(resFile); - } - - NSDictionary *error; - NSAppleScript *script = [[[NSAppleScript alloc] initWithContentsOfURL:fileURL - error:&error] - autorelease]; - NSString *scriptSource = [script source]; - if (scriptSource) { - [attributes setObject:scriptSource forKey:(NSString*)kMDItemTextContent]; - wasGood = YES; - } - } - return wasGood; -} - -// Currently grabs the script description and puts it into kMDItemDescription. -// Grabs the script code and puts it into kMDItemTextContent. -Boolean GetMetadataForFile(void* interface, - CFMutableDictionaryRef cfAttributes, - CFStringRef cfContentTypeUTI, - CFStringRef cfPathToFile) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; - NSString *pathToFile = (NSString*)cfPathToFile; - BOOL wasGood = NO; - if (UTTypeConformsTo(cfContentTypeUTI, CFSTR("com.apple.applescript.scriptbundle"))) { - wasGood = ImportScriptBundle(attributes, pathToFile); - } else if (UTTypeConformsTo(cfContentTypeUTI, CFSTR("com.apple.applescript.script"))) { - wasGood = ImportScript(attributes, pathToFile); - } - [pool release]; - return wasGood ? TRUE : FALSE; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/Info.plist deleted file mode 100644 index be3c6225..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/Info.plist +++ /dev/null @@ -1,74 +0,0 @@ - - - - - UTImportedTypeDeclarations - - - UTTypeIdentifier - com.apple.applescript.scriptbundle - UTTypeReferenceURL - http://www.apple.com/applescript/ - UTTypeDescription - Script Bundle - UTTypeConformsTo - - com.apple.package - public.composite-content - public.data - - UTTypeTagSpecification - - public.filename-extension - - scptd - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeRole - MDImporter - LSItemContentTypes - - com.apple.applescript.script - com.apple.applescript.scriptbundle - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.spotlightimporter.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleVersion - 1.0 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - B498BAB3-7887-4E93-862A-19E74809248D0 - MetadataImporterPluginFactory - - CFPlugInTypes - - 8B08C4BF-415B-11D8-B3F9-0003936726FC - - B498BAB3-7887-4E93-862A-19E74809248D0 - - - CFPlugInUnloadFunction - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/PluginID.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/PluginID.h deleted file mode 100644 index 955a476f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/PluginID.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PluginID.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#define PLUGIN_ID "B498BAB3-7887-4E93-862A-19E74809248D0" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/ReadMe.rtf b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/ReadMe.rtf deleted file mode 100644 index ee2fa250..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/ReadMe.rtf +++ /dev/null @@ -1,38 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\vieww10980\viewh11300\viewkind0 -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 AppleScript Spotlight Plugin\ -\ -Copyright 2008 Google Inc.\ -\ -Licensed under the Apache License, Version 2.0 (the "License"); you may not\ -use this file except in compliance with the License. You may obtain a copy\ -of the License at\ -\ -http://www.apache.org/licenses/LICENSE-2.0\ - \ -Unless required by applicable law or agreed to in writing, software\ -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ -License for the specific language governing permissions and limitations under\ -the License.\ -\ ------------------------\ -\ -This is a spotlight importer for AppleScripts.\ -It imports the description and the code of an AppleScript to make them easily searchable.\ -\ -To install the spotlight plugin, please copy it into /Applications/AppleScript/Script Editor/Contents/Library/Spotlight.\ -\ -If you are wondering why we just don't copy this one into /Library/Spotlight or ~/Library/Spotlight it is due to the fact that on 10.5 the UTIs declared by Spotlight importers don't seem to be recognized unless they are in an application's /Library/Spotlight directory. There isn't a UTI for AppleScript bundle files (.scptd) so we declare one in the importer. If the importer isn't located in an application's /Library/Spotlight directory, you won't be able to import .scptd files.\ -\ -Radars logged:\ -6160646 UTIs declared in Spotlight Importers in Library/Spotlight not recognized\ -6160685 Need UTI for AppleScript script bundle\ -6160707 UTCoreTypes.h needs to be updated\ -\ -It is part of the Google Toolbox For Mac project\ -http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/schema.xml b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/schema.xml deleted file mode 100644 index d057fd74..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/AppleScript/schema.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - kMDItemDescription - - - - - - - kMDItemDescription - - - - - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Common/main.c b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Common/main.c deleted file mode 100644 index 16eecacf..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Common/main.c +++ /dev/null @@ -1,204 +0,0 @@ -// -// main.c -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#include -#include -#include -#include "PluginID.h" - -// ----------------------------------------------------------------------------- -// constants -// ----------------------------------------------------------------------------- - - - -// -// Below is the generic glue code for all plug-ins. -// -// You should not have to modify this code aside from changing -// names if you decide to change the names defined in the Info.plist -// - -// ----------------------------------------------------------------------------- -// typedefs -// ----------------------------------------------------------------------------- - -// The import function to be implemented in GetMetadataForFile.c -Boolean GetMetadataForFile(void *thisInterface, - CFMutableDictionaryRef attributes, - CFStringRef contentTypeUTI, - CFStringRef pathToFile); - -// The layout for an instance of MetaDataImporterPlugIn -typedef struct __MetadataImporterPluginType { - MDImporterInterfaceStruct *conduitInterface; - CFUUIDRef factoryID; - UInt32 refCount; -} MetadataImporterPluginType; - -// ----------------------------------------------------------------------------- -// prototypes -// ----------------------------------------------------------------------------- -// Forward declaration for the IUnknown implementation. -// - -MetadataImporterPluginType* AllocMetadataImporterPluginType(CFUUIDRef inFactoryID); -void DeallocMetadataImporterPluginType(MetadataImporterPluginType *instance); -void* MetadataImporterPluginFactory(CFAllocatorRef allocator, CFUUIDRef typeID); -static ULONG MetadataImporterPluginAddRef(void *instance); -static ULONG MetadataImporterPluginRelease(void *instance); -static HRESULT MetadataImporterQueryInterface(void *instance, REFIID iid, LPVOID *ppv); -// ----------------------------------------------------------------------------- -// testInterfaceFtbl definition -// ----------------------------------------------------------------------------- -// The TestInterface function table. -// - -static MDImporterInterfaceStruct testInterfaceFtbl = { - NULL, - MetadataImporterQueryInterface, - MetadataImporterPluginAddRef, - MetadataImporterPluginRelease, - GetMetadataForFile -}; - - -// ----------------------------------------------------------------------------- -// AllocMetadataImporterPluginType -// ----------------------------------------------------------------------------- -// Utility function that allocates a new instance. -// You can do some initial setup for the importer here if you wish -// like allocating globals etc... -// -MetadataImporterPluginType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID) { - MetadataImporterPluginType *theNewInstance - = (MetadataImporterPluginType *)malloc(sizeof(MetadataImporterPluginType)); - memset(theNewInstance, 0, sizeof(MetadataImporterPluginType)); - - // Point to the function table - theNewInstance->conduitInterface = &testInterfaceFtbl; - - // Retain and keep an open instance refcount for each factory. - theNewInstance->factoryID = CFRetain(inFactoryID); - CFPlugInAddInstanceForFactory(inFactoryID); - - // This function returns the IUnknown interface so set the refCount to one. - theNewInstance->refCount = 1; - return theNewInstance; -} - -// ----------------------------------------------------------------------------- -// DeallocXcodeProjectSpotlightPluginMDImporterPluginType -// ----------------------------------------------------------------------------- -// Utility function that deallocates the instance when -// the refCount goes to zero. -// In the current implementation importer interfaces are never deallocated -// but implement this as this might change in the future -// -void DeallocMetadataImporterPluginType(MetadataImporterPluginType *instance) { - CFUUIDRef theFactoryID = instance->factoryID; - free(instance); - if (theFactoryID) { - CFPlugInRemoveInstanceForFactory(theFactoryID); - CFRelease(theFactoryID); - } -} - -// ----------------------------------------------------------------------------- -// MetadataImporterQueryInterface -// ----------------------------------------------------------------------------- -// Implementation of the IUnknown QueryInterface function. -// -HRESULT MetadataImporterQueryInterface(void *instance, REFIID iid, LPVOID *ppv) { - CFUUIDRef interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); - MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); - HRESULT result = E_INVALIDARG; - if (interfaceID) { - if (CFEqual(interfaceID, kMDImporterInterfaceID)) { - // If the Right interface was requested, bump the ref count, - // set the ppv parameter equal to the instance, and - // return good status. - plugin->conduitInterface->AddRef(instance); - *ppv = instance; - result = S_OK; - } else { - if (CFEqual(interfaceID, IUnknownUUID)) { - // If the IUnknown interface was requested, same as above. - plugin->conduitInterface->AddRef(instance); - *ppv = instance; - result = S_OK; - } else { - // Requested interface unknown, bail with error. - *ppv = NULL; - result = E_NOINTERFACE; - } - } - CFRelease(interfaceID); - } - return result; -} - -// ----------------------------------------------------------------------------- -// MetadataImporterPluginAddRef -// ----------------------------------------------------------------------------- -// Implementation of reference counting for this type. Whenever an interface -// is requested, bump the refCount for the instance. NOTE: returning the -// refcount is a convention but is not required so don't rely on it. -// -ULONG MetadataImporterPluginAddRef(void *instance) { - MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); - plugin->refCount += 1; - return plugin->refCount; -} - -// ----------------------------------------------------------------------------- -// SampleCMPluginRelease -// ----------------------------------------------------------------------------- -// When an interface is released, decrement the refCount. -// If the refCount goes to zero, deallocate the instance. -// -ULONG MetadataImporterPluginRelease(void *instance) { - ULONG refCount = 0; - MetadataImporterPluginType *plugin = ((MetadataImporterPluginType*)instance); - plugin->refCount -= 1; - if (plugin->refCount == 0) { - DeallocMetadataImporterPluginType(plugin); - refCount = 0; - } else { - refCount = (plugin)->refCount; - } - return refCount; -} - -// ----------------------------------------------------------------------------- -// XcodeProjectSpotlightPluginMDImporterPluginFactory -// ----------------------------------------------------------------------------- -// Implementation of the factory function for this type. -// -void *MetadataImporterPluginFactory(CFAllocatorRef allocator, CFUUIDRef typeID) { - // If correct type is being requested, allocate an - //instance of TestType and return the IUnknown interface. - MetadataImporterPluginType *result = NULL; - if (CFEqual(typeID, kMDImporterTypeID)){ - CFUUIDRef uuid = CFUUIDCreateFromString(kCFAllocatorDefault, CFSTR(PLUGIN_ID)); - result = AllocMetadataImporterPluginType(uuid); - CFRelease(uuid); - } - // If the requested type is incorrect, return NULL. - return result; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPost.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPost.sh deleted file mode 100644 index f58c5b03..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPost.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# - -su ${USER} -c "/usr/bin/mdimport -r '/Applications/AppleScript/Script Editor.app/Contents/Library/Spotlight/AppleScript.mdimporter'" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPreflight.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPreflight.sh deleted file mode 100644 index 65ff80d7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/ApplescriptInstallerPreflight.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# - -# Set up the spotlight importer directory for Script Editor. - -mkdir -m 775 -p "/Applications/AppleScript/Script Editor.app/Contents/Library/Spotlight" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/InterfaceBuilderInstallerPost.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/InterfaceBuilderInstallerPost.sh deleted file mode 100644 index 2850a6c4..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/InterfaceBuilderInstallerPost.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# - -su ${USER} -c "/usr/bin/mdimport -r '/Library/Spotlight/InterfaceBuilder.mdimporter'" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/License.rtf b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/License.rtf deleted file mode 100644 index 33fbacf0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/License.rtf +++ /dev/null @@ -1,13 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww9000\viewh8400\viewkind0 -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 Copyright 2008 {\field{\*\fldinst{HYPERLINK "http://www.google.com"}}{\fldrslt Google Inc.}}\ -\ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\ -\ -{\field{\*\fldinst{HYPERLINK "http://www.apache.org/licenses/LICENSE-2.0"}}{\fldrslt http://www.apache.org/licenses/LICENSE-2.0}}\ - \ -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.} \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/Welcome.rtf b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/Welcome.rtf deleted file mode 100644 index 74f8854d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/Welcome.rtf +++ /dev/null @@ -1,11 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww9000\viewh8400\viewkind0 -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 Finding source can be difficult. These are importers to help you index your various source files. Included in the package are importers for Xcode projects, AppleScript files, and Interface Builder files.\ -\ -These importers are part of the Google Toolbox For Mac project. Check it out at:\ -\ -{\field{\*\fldinst{HYPERLINK "http://code.google.com/p/google-toolbox-for-mac/"}}{\fldrslt http://code.google.com/p/google-toolbox-for-mac/}}} \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/XcodeProjectInstallerPost.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/XcodeProjectInstallerPost.sh deleted file mode 100644 index db9bfdb2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/Installer/XcodeProjectInstallerPost.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# - -su ${USER} -c "/usr/bin/mdimport -r '/Library/Spotlight/XcodeProject.mdimporter'" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings deleted file mode 100644 index b1508941..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m deleted file mode 100644 index 32c37c59..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/GetMetadataForFile.m +++ /dev/null @@ -1,208 +0,0 @@ -// -// GetMetadataForFile.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMGarbageCollection.h" - -static BOOL AddStringsToTextContent(NSSet *stringSet, - NSMutableDictionary *attributes) { - BOOL wasGood = NO; - if ([stringSet count]) { - NSString *allStrings = [[stringSet allObjects] componentsJoinedByString:@"\n"]; - NSString *oldContent = [attributes objectForKey:(NSString*)kMDItemTextContent]; - if (oldContent) { - allStrings = [NSString stringWithFormat:@"%@\n%@", allStrings, oldContent]; - } - [attributes setObject:allStrings forKey:(NSString*)kMDItemTextContent]; - wasGood = YES; - } - return wasGood; -} - -static BOOL ExtractClasses(NSDictionary *ibToolData, - NSMutableDictionary *attributes) { - NSString *classesKey = @"com.apple.ibtool.document.classes"; - NSDictionary *classes = [ibToolData objectForKey:classesKey]; - NSMutableSet *classSet = [NSMutableSet set]; - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - NSArray *classPrefixesToIgnore - = [ud objectForKey:@"classPrefixesToIgnore"]; - if (!classPrefixesToIgnore) { - classPrefixesToIgnore = [NSArray arrayWithObjects: - @"IB", - @"FirstResponder", - @"NS", - @"Web", - nil]; - [ud setObject:classPrefixesToIgnore forKey:@"classPrefixesToIgnore"]; - [ud synchronize]; - } - NSDictionary *entry; - NSEnumerator *entryEnum = [classes objectEnumerator]; - while ((entry = [entryEnum nextObject])) { - NSString *classStr = [entry objectForKey:@"class"]; - if (classStr) { - NSString *prefix; - NSEnumerator *classPrefixesToIgnoreEnum - = [classPrefixesToIgnore objectEnumerator]; - while (classStr && (prefix = [classPrefixesToIgnoreEnum nextObject])) { - if ([classStr hasPrefix:prefix]) { - classStr = nil; - } - } - if (classStr) { - [classSet addObject:classStr]; - } - } - } - return AddStringsToTextContent(classSet, attributes); -} - -static BOOL ExtractLocalizableStrings(NSDictionary *ibToolData, - NSMutableDictionary *attributes) { - NSString *localStrKey = @"com.apple.ibtool.document.localizable-strings"; - NSDictionary *strings = [ibToolData objectForKey:localStrKey]; - NSMutableSet *stringSet = [NSMutableSet set]; - NSDictionary *entry; - NSEnumerator *entryEnum = [strings objectEnumerator]; - while ((entry = [entryEnum nextObject])) { - NSEnumerator *stringEnum = [entry objectEnumerator]; - NSString *string; - while ((string = [stringEnum nextObject])) { - [stringSet addObject:string]; - } - } - return AddStringsToTextContent(stringSet, attributes); -} - -static BOOL ExtractConnections(NSDictionary *ibToolData, - NSMutableDictionary *attributes) { - NSString *connectionsKey = @"com.apple.ibtool.document.connections"; - NSDictionary *connections = [ibToolData objectForKey:connectionsKey]; - NSMutableSet *connectionsSet = [NSMutableSet set]; - NSDictionary *entry; - NSEnumerator *entryEnum = [connections objectEnumerator]; - while ((entry = [entryEnum nextObject])) { - NSString *typeStr = [entry objectForKey:@"type"]; - NSString *value = nil; - if (typeStr) { - if ([typeStr isEqualToString:@"IBBindingConnection"]) { - value = [entry objectForKey:@"keypath"]; - } else if ([typeStr isEqualToString:@"IBCocoaOutletConnection"] || - [typeStr isEqualToString:@"IBCocoaActionConnection"]) { - value = [entry objectForKey:@"label"]; - } - if (value) { - [connectionsSet addObject:value]; - } - } - } - return AddStringsToTextContent(connectionsSet, attributes); -} - -static NSString *FindIBTool(void) { - NSString *result = nil; - - NSString *possiblePaths[] = { - @"/usr/bin/ibtool", - @"/Developer/usr/bin/ibtool", - }; - - NSFileManager *fm = [NSFileManager defaultManager]; - BOOL isDir; - for (size_t i = 0; i < (sizeof(possiblePaths) / sizeof(NSString*)); ++i) { - if ([fm fileExistsAtPath:possiblePaths[i] isDirectory:&isDir] && - !isDir) { - result = possiblePaths[i]; - break; - } - } - - return result; -} - -static NSData *CommandOutput(NSString *cmd) { - NSMutableData *result = [NSMutableData data]; - - // NOTE: we use popen/pclose in here instead of NSTask because NSTask uses - // a delayed selector to clean up the process it spawns, so since we have - // no runloop it gets ungly trying to clean up the zombie process. - - FILE *fp; - char buffer[2048]; - size_t len; - if((fp = popen([cmd UTF8String], "r"))) { - // spool it all in - while ((len = fread(buffer, 1, sizeof(buffer), fp)) > 0) { - [result appendBytes:buffer length:len]; - } - // make sure we get a clean exit status - if (pclose(fp) != 0) { - result = nil; - } - } - return result; -} - -static BOOL ImportIBFile(NSMutableDictionary *attributes, - NSString *pathToFile) { - BOOL wasGood = NO; - NSString *ibtoolPath = FindIBTool(); - if (ibtoolPath) { - NSString *cmdString - = @"%@ --classes --localizable-strings --connections \"%@\""; - NSString *cmd = [NSString stringWithFormat:cmdString, ibtoolPath, pathToFile]; - NSData *data = CommandOutput(cmd); - if (data) { - NSDictionary *results - = GTMCFAutorelease(CFPropertyListCreateFromXMLData(NULL, - (CFDataRef)data , - kCFPropertyListImmutable, - NULL)); - if (results && [results isKindOfClass:[NSDictionary class]]) { - wasGood = ExtractClasses(results, attributes); - wasGood |= ExtractLocalizableStrings(results, attributes); - wasGood |= ExtractConnections(results, attributes); - } - } - } - - return wasGood; -} - -// Grabs all of the classes, localizable strings, bindings, outlets -// and actions and sticks them into kMDItemTextContent. -Boolean GetMetadataForFile(void* interface, - CFMutableDictionaryRef cfAttributes, - CFStringRef contentTypeUTI, - CFStringRef cfPathToFile) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; - NSString *pathToFile = (NSString*)cfPathToFile; - BOOL wasGood = NO; - if (UTTypeConformsTo(contentTypeUTI, - CFSTR("com.apple.interfacebuilder.document")) - || UTTypeConformsTo(contentTypeUTI, - CFSTR("com.apple.interfacebuilder.document.cocoa")) - || UTTypeConformsTo(contentTypeUTI, - CFSTR("com.apple.interfacebuilder.document.carbon"))) { - wasGood = ImportIBFile(attributes, pathToFile); - } - [pool release]; - return wasGood == NO ? FALSE : TRUE; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/Info.plist deleted file mode 100644 index 8412ec04..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/Info.plist +++ /dev/null @@ -1,51 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeRole - MDImporter - LSItemContentTypes - - com.apple.interfacebuilder.document.cocoa - com.apple.interfacebuilder.document.carbon - com.apple.interfacebuilder.document - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.spotlightimporter.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleVersion - 1.0 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - 556C7CA3-979B-44B2-BF4A-EADD88AFE0D9 - MetadataImporterPluginFactory - - CFPlugInTypes - - 8B08C4BF-415B-11D8-B3F9-0003936726FC - - 556C7CA3-979B-44B2-BF4A-EADD88AFE0D9 - - - CFPlugInUnloadFunction - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/PluginID.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/PluginID.h deleted file mode 100644 index c89c0913..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/PluginID.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PluginID.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#define PLUGIN_ID "556C7CA3-979B-44B2-BF4A-EADD88AFE0D9" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf deleted file mode 100644 index 16cd43d2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/ReadMe.rtf +++ /dev/null @@ -1,34 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 InterfaceBuilder Spotlight Plugin\ -\ -Copyright 2008 Google Inc.\ -\ -Licensed under the Apache License, Version 2.0 (the "License"); you may not\ -use this file except in compliance with the License. You may obtain a copy\ -of the License at\ -\ -http://www.apache.org/licenses/LICENSE-2.0\ - \ -Unless required by applicable law or agreed to in writing, software\ -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ -License for the specific language governing permissions and limitations under\ -the License.\ -\ ------------------------\ -\ -This is a spotlight importer for nibs and xibs.\ -Makes it easy for you to search nibs and xibs for classes they use.\ -Class names, bindings, outlets, actions and localizable strings are added \ -to the text content attribute.\ -\ -To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ -\ -This spotlight plugin requires Xcode 3 or better (specifically ibtool).\ -\ -It is part of the Google Toolbox For Mac project\ -http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib deleted file mode 100644 index aea96ba6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCarbonTest.xib +++ /dev/null @@ -1,3106 +0,0 @@ - - - - 1050 - 9E17 - 672 - 949.33 - 352.00 - - YES - - - - - YES - com.apple.InterfaceBuilder.CarbonPlugin - - - YES - - Menu - - YES - - - TestLocalizedString - - 1048576 - 2147483647 - - NSMenuCheckmark - 1623195648 - - - NSMenuMixedState - 1623195648 - - submenuAction: - - TestLocalizedString - - YES - - - About NewApplication - - 2147483647 - - - About NewApplication - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - UHJlZmVyZW5jZXPigKY - , - 1048576 - 2147483647 - - - UHJlZmVyZW5jZXPigKY - , - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - Services - - - - - - - - - Services - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - Hide NewApplication - h - - - - - - - - - - - - - - - - - - - - - - Hide Others - h - 1572864 - 2147483647 - - - Hide Others - h - - - - - - - - - - - - - - - - - - - - - - Show All - - 1048576 - 2147483647 - - - Show All - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - Quit NewApplication - q - - - - - - - - - - - - - - - - - - - - - - _NSAppleMenu - - TestLocalizedString - - - - - - - - - TestLocalizedString - - - - - - - - - - - - - - - - - - - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - New - n - - - - - - - - - - - - - - - - - - - - - - T3BlbuKApg - o - 1048576 - 2147483647 - - - T3BlbuKApg - o - - - - - - - - - - - - - - - - - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - Clear Menu - - - - - - - - - - - - - - - - - - - - - - Open Recent - - - - - - - - - Open Recent - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Close - w - 1048576 - 2147483647 - - - Close - w - - - - - - - - - - - - - - - - - - - - - - Save - s - 1048576 - 2147483647 - - - Save - s - - - - - - - - - - - - - - - - - - - - - - U2F2ZSBBc+KApg - S - 1179648 - 2147483647 - - - U2F2ZSBBc+KApg - S - - - - - - - - - - - - - - - - - - - - - - Revert to Saved - - 2147483647 - - - Revert to Saved - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - UGFnZSBTZXR1cOKApg - P - 1179648 - 2147483647 - - - UGFnZSBTZXR1cOKApg - P - - - - - - - - - - - - - - - - - - - - - - UHJpbnTigKY - p - 1048576 - 2147483647 - - - UHJpbnTigKY - p - - - - - - - - - - - - - - - - - - - - - File - - - - - - - - - File - - - - - - - - - - - - - - - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - Undo - z - - - - - - - - - - - - - - - - - - - - - - Redo - Z - 1179648 - 2147483647 - - - Redo - Z - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Cut - x - 1048576 - 2147483647 - - - Cut - x - - - - - - - - - - - - - - - - - - - - - - Copy - c - 1048576 - 2147483647 - - - Copy - c - - - - - - - - - - - - - - - - - - - - - - Paste - v - 1048576 - 2147483647 - - - Paste - v - - - - - - - - - - - - - - - - - - - - - - Delete - - 1048576 - 2147483647 - - - Delete - - - - - - - - - - - - - - - - - - - - - - - Select All - a - 1048576 - 2147483647 - - - Select All - a - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - RmluZOKApg - f - 1048576 - 2147483647 - - - 1 - RmluZOKApg - f - - - - - - - - - - - - - - - - - - - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - Find Next - g - - - - - - - - - - - - - - - - - - - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - Find Previous - G - - - - - - - - - - - - - - - - - - - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - Use Selection for Find - e - - - - - - - - - - - - - - - - - - - - - - Jump to Selection - j - 1048576 - 2147483647 - - - Jump to Selection - j - - - - - - - - - - - - - - - - - - - - - Find - - - - - - - - - Find - - - - - - - - - - - - - - - - - - - - - - - Spelling - - 1048576 - 2147483647 - - - submenuAction: - - Spelling - - YES - - - U2hvdyBTcGVsbGluZ+KApg - : - 1048576 - 2147483647 - - - U2hvdyBTcGVsbGluZ+KApg - : - - - - - - - - - - - - - - - - - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - Check Spelling - ; - - - - - - - - - - - - - - - - - - - - - - Check Spelling as You Type - - 1048576 - 2147483647 - - - Check Spelling as You Type - - - - - - - - - - - - - - - - - - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - Check Grammar With Spelling - - - - - - - - - - - - - - - - - - - - - - Spelling - - - - - - - - - Spelling - - - - - - - - - - - - - - - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Smart Copy Paste - - 1048576 - 2147483647 - - - Smart Copy Paste - - - - - - - - - - - - - - - - - - - - - - - Smart Quotes - - 1048576 - 2147483647 - - - Smart Quotes - - - - - - - - - - - - - - - - - - - - - - - Smart Links - - 1048576 - 2147483647 - - - Smart Links - - - - - - - - - - - - - - - - - - - - - - Substitutions - - - - - - - - - Substitutions - - - - - - - - - - - - - - - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - Start Speaking - - - - - - - - - - - - - - - - - - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - Stop Speaking - - - - - - - - - - - - - - - - - - - - - - Speech - - - - - - - - - Speech - - - - - - - - - - - - - - - - - - - - - - Edit - - - - - - - - - Edit - - - - - - - - - - - - - - - - - - - - - - - Format - - 1048576 - 2147483647 - - - submenuAction: - - Format - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - Show Fonts - t - - - - - - - - - - - - - - - - - - - - - - Show Colors - C - 1179648 - 2147483647 - - - Show Colors - C - - - - - - - - - - - - - - - - - - - - - - Format - - - - - - - - - Format - - - - - - - - - - - - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - Show Toolbar - t - - - - - - - - - - - - - - - - - - - - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - 1048576 - 2147483647 - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - - - - - - - - - - - - - - - - - - - - - View - - - - - - - - - View - - - - - - - - - - - - - - - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - Minimize - m - - - - - - - - - - - - - - - - - - - - - - Zoom - - 1048576 - 2147483647 - - - Zoom - - - - - - - - - - - - - - - - - - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - Bring All to Front - - - - - - - - - - - - - - - - - - - - - - - _NSWindowsMenu - - Window - - - - - - - - - Window - - - - - - - - - - - - - - - - - - - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - NewApplication Help - ? - - - - - - - - - - - - - - - - - - - - - - _NSWindowsMenu - - Help - - - - - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - _NSMainMenu - - Menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Window - - - 256 - {480, 360} - - - - - - - - - - - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - YES - - - - - {{300, 300}, {480, 360}} - {{0, 48}, {1920, 1129}} - - - YES - - - - - - YES - - - - YES - - 0 - - YES - - - - - - 316 - - - YES - - - - Window - - - 317 - - - - - 399 - - - YES - - - - - - - - - - MainMenu - - - 400 - - - YES - - - - - - 401 - - - YES - - - - - - 402 - - - YES - - - - - - 403 - - - YES - - - - - - 404 - - - YES - - - - - - 405 - - - YES - - - - - - 406 - - - YES - - - - - - 407 - - - YES - - - - - - - - - - - - - - - - 408 - - - YES - - - - - - 409 - - - - - 410 - - - - - 411 - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - YES - - - - - - 420 - - - - - 421 - - - YES - - - - - - - - - - - - - - - - - - 422 - - - YES - - - - - - 423 - - - YES - - - - - - 424 - - - YES - - - - - - 425 - - - - - 426 - - - - - 427 - - - YES - - - - - - 428 - - - - - 429 - - - - - 430 - - - - - 431 - - - - - 432 - - - - - 433 - - - - - 434 - - - - - 435 - - - YES - - - - - - - - - 436 - - - - - 437 - - - - - 438 - - - - - 439 - - - - - 440 - - - YES - - - - - - - - - - 441 - - - - - 442 - - - - - 443 - - - - - 444 - - - - - 445 - - - - - 446 - - - YES - - - - - - - 447 - - - - - 448 - - - - - 449 - - - YES - - - - - - - - 450 - - - - - 451 - - - - - 452 - - - - - 453 - - - YES - - - - - - - - - 454 - - - - - 455 - - - - - 456 - - - - - 457 - - - - - 458 - - - YES - - - - - - - - - - - - - - - - 459 - - - - - 460 - - - - - 461 - - - - - 462 - - - - - 463 - - - YES - - - - - - 464 - - - - - 465 - - - - - 466 - - - - - 467 - - - - - 468 - - - - - 469 - - - - - 470 - - - - - 471 - - - YES - - - - - - 472 - - - - - 473 - - - YES - - - - - - - 474 - - - - - 475 - - - - - 476 - - - YES - - - - - - - 477 - - - - - 478 - - - - - - - YES - - YES - 316.IBEditorWindowLastContentRect - 316.IBPluginDependency - 316.IBWindowTemplateEditedContentRect - 316.editorWindowContentRectSynchronizationRect - 317.IBPluginDependency - 399.IBEditorWindowLastContentRect - 399.IBPluginDependency - 399.editorWindowContentRectSynchronizationRect - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 407.editorWindowContentRectSynchronizationRect - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 419.editorWindowContentRectSynchronizationRect - 420.IBPluginDependency - 421.IBPluginDependency - 421.editorWindowContentRectSynchronizationRect - 422.IBPluginDependency - 423.IBPluginDependency - 424.IBPluginDependency - 425.IBPluginDependency - 426.IBPluginDependency - 427.IBPluginDependency - 428.IBPluginDependency - 429.IBPluginDependency - 430.IBPluginDependency - 431.IBPluginDependency - 432.IBPluginDependency - 433.IBPluginDependency - 434.IBPluginDependency - 435.IBPluginDependency - 435.editorWindowContentRectSynchronizationRect - 436.IBPluginDependency - 437.IBPluginDependency - 438.IBPluginDependency - 439.IBPluginDependency - 440.IBPluginDependency - 440.editorWindowContentRectSynchronizationRect - 441.IBPluginDependency - 442.IBPluginDependency - 443.IBPluginDependency - 444.IBPluginDependency - 445.IBPluginDependency - 446.IBPluginDependency - 446.editorWindowContentRectSynchronizationRect - 447.IBPluginDependency - 448.IBPluginDependency - 449.IBPluginDependency - 449.editorWindowContentRectSynchronizationRect - 450.IBPluginDependency - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 453.editorWindowContentRectSynchronizationRect - 454.IBPluginDependency - 455.IBPluginDependency - 456.IBPluginDependency - 457.IBPluginDependency - 458.IBEditorWindowLastContentRect - 458.IBPluginDependency - 458.editorWindowContentRectSynchronizationRect - 459.IBPluginDependency - 460.IBPluginDependency - 461.IBPluginDependency - 462.IBPluginDependency - 463.IBPluginDependency - 464.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 467.IBPluginDependency - 468.IBPluginDependency - 469.IBPluginDependency - 470.IBPluginDependency - 470.editorWindowContentRectSynchronizationRect - 471.IBPluginDependency - 471.editorWindowContentRectSynchronizationRect - 472.IBPluginDependency - 473.IBPluginDependency - 473.editorWindowContentRectSynchronizationRect - 474.IBPluginDependency - 475.IBPluginDependency - 476.IBPluginDependency - 476.editorWindowContentRectSynchronizationRect - 477.IBPluginDependency - 478.IBPluginDependency - - - YES - {{247, 233}, {480, 360}} - com.apple.InterfaceBuilder.CarbonPlugin - {{247, 233}, {480, 360}} - {{325, 394}, {480, 360}} - com.apple.InterfaceBuilder.CarbonPlugin - {{21, 803}, {507, 20}} - com.apple.InterfaceBuilder.CarbonPlugin - {{325, 836}, {478, 20}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{159, 779}, {199, 203}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{358, 919}, {146, 23}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{511, 593}, {181, 243}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{692, 573}, {275, 83}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{382, 719}, {241, 103}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{382, 719}, {167, 43}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{382, 719}, {188, 63}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{361, 909}, {197, 73}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{33, 620}, {245, 183}} - com.apple.InterfaceBuilder.CarbonPlugin - {{27, 799}, {245, 183}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{272, 916}, {64, 6}} - com.apple.InterfaceBuilder.CarbonPlugin - {{432, 959}, {216, 23}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{311, 939}, {234, 43}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - {{555, 793}, {176, 43}} - com.apple.InterfaceBuilder.CarbonPlugin - com.apple.InterfaceBuilder.CarbonPlugin - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 478 - - - 0 - - 3 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib deleted file mode 100644 index e2119bc8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/InterfaceBuilder/TestData/XibCocoaTest.xib +++ /dev/null @@ -1,3075 +0,0 @@ - - - - 1050 - 9E17 - 672 - 949.33 - 352.00 - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - NSFontManager - - - AMainMenu - - YES - - - TestLocalizedString - - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - TestLocalizedString - - YES - - - About NewApplication - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - UHJlZmVyZW5jZXPigKY - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Services - - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 2147483647 - - - - - - Hide NewApplication - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Quit NewApplication - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - T3BlbuKApg - o - 1048576 - 2147483647 - - - - - - Open Recent - - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - U2F2ZSBBc+KApg - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - UHJpbnTigKY - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Delete - - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Find - - 2147483647 - - - submenuAction: - - Find - - YES - - - RmluZOKApg - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - U2hvdyBTcGVsbGluZ+KApg - : - 1048576 - 2147483647 - - - - - - Check Spelling - ; - 1048576 - 2147483647 - - - - - - Check Spelling While Typing - - 2147483647 - - - - - - Check Grammar With Spelling - - 2147483647 - - - - - - - - - Substitutions - - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Smart Copy/Paste - - 2147483647 - - - 1 - - - - Smart Quotes - - 2147483647 - - - 2 - - - - Smart Links - - 2147483647 - - - 3 - - - - - - - Speech - - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 2147483647 - - - - - - Stop Speaking - - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Q3VzdG9taXplIFRvb2xiYXLigKY - - 2147483647 - - - - - - - - - Window - - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bring All to Front - - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - NewApplication Help - ? - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - 15 - 2 - {{196, 240}, {480, 270}} - 603979776 - Window - TestCustomClass - - {3.40282e+38, 3.40282e+38} - - - 256 - - YES - - - 268 - {{66, 214}, {96, 32}} - - YES - - 67239424 - 134217728 - Button - - LucidaGrande - 1.300000e+01 - 1044 - - - -2038284033 - 129 - - - 200 - 25 - - - - {480, 270} - - - {{0, 0}, {1920, 1178}} - {3.40282e+38, 3.40282e+38} - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - showHelp: - - - - 360 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 369 - - - - hideOtherApplications: - - - - 370 - - - - unhideAllApplications: - - - - 372 - - - - addFontTrait: - - - - 420 - - - - addFontTrait: - - - - 421 - - - - modifyFont: - - - - 422 - - - - orderFrontFontPanel: - - - - 423 - - - - modifyFont: - - - - 424 - - - - raiseBaseline: - - - - 425 - - - - lowerBaseline: - - - - 426 - - - - copyFont: - - - - 427 - - - - subscript: - - - - 428 - - - - superscript: - - - - 429 - - - - tightenKerning: - - - - 430 - - - - underline: - - - - 431 - - - - orderFrontColorPanel: - - - - 432 - - - - useAllLigatures: - - - - 433 - - - - loosenKerning: - - - - 434 - - - - pasteFont: - - - - 435 - - - - unscript: - - - - 436 - - - - useStandardKerning: - - - - 437 - - - - useStandardLigatures: - - - - 438 - - - - turnOffLigatures: - - - - 439 - - - - turnOffKerning: - - - - 440 - - - - alignLeft: - - - - 441 - - - - alignJustified: - - - - 442 - - - - copyRuler: - - - - 443 - - - - alignCenter: - - - - 444 - - - - toggleRuler: - - - - 445 - - - - alignRight: - - - - 446 - - - - pasteRuler: - - - - 447 - - - - terminate: - - - - 448 - - - - visible: testBinding - - - - - - visible: testBinding - visible - testBinding - 2 - - - 459 - - - - testAction: - - - - 462 - - - - - YES - - 0 - - YES - - - - - - -2 - - - RmlsZSdzIE93bmVyA - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - Main Menu - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 103 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 106 - - - YES - - - - - - 111 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 367 - - - YES - - - - - - 368 - - - YES - - - - - - 373 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 378 - - - YES - - - - - - 379 - - - YES - - - - - - - - - - - - - 380 - - - - - 381 - - - - - 382 - - - - - 383 - - - - - 384 - - - - - 385 - - - - - 386 - - - - - 387 - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 460 - - - YES - - - - - - 461 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBEditorWindowLastContentRect - 106.IBPluginDependency - 106.ImportedFromIB2 - 106.editorWindowContentRectSynchronizationRect - 111.IBPluginDependency - 111.ImportedFromIB2 - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBEditorWindowLastContentRect - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBEditorWindowLastContentRect - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBEditorWindowLastContentRect - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 367.IBEditorWindowLastContentRect - 367.IBPluginDependency - 367.IBWindowTemplateEditedContentRect - 367.NSWindowTemplate.visibleAtLaunch - 367.editorWindowContentRectSynchronizationRect - 368.IBPluginDependency - 375.IBPluginDependency - 376.IBPluginDependency - 377.IBPluginDependency - 378.IBPluginDependency - 379.IBPluginDependency - 380.IBPluginDependency - 381.IBPluginDependency - 382.IBPluginDependency - 383.IBPluginDependency - 384.IBPluginDependency - 385.IBPluginDependency - 386.IBPluginDependency - 387.IBPluginDependency - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 460.IBPluginDependency - 461.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{518, 723}, {216, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{596, 852}, {216, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{617, 609}, {132, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{531, 606}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{530, 483}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{287, 503}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{197, 734}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{530, 483}, {153, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{530, 483}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{447, 673}, {197, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{101, 746}, {507, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{11, 977}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{397, 703}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{530, 483}, {177, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{440, 714}, {177, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{490, 307}, {480, 270}} - com.apple.InterfaceBuilder.CocoaPlugin - {{490, 307}, {480, 270}} - - {{11, 666}, {480, 270}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{113, 563}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{418, 469}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{323, 672}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 462 - - - - YES - - FirstResponder - NSObject - - testAction: - id - - - IBUserSource - - - - - - 0 - - 3 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings deleted file mode 100644 index 7f81cad9..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/GetMetadataForFile.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/GetMetadataForFile.m deleted file mode 100644 index 5bdab363..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/GetMetadataForFile.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// GetMetadataForFile.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -static BOOL ImportProjectFile(NSMutableDictionary *attributes, - NSString *pathToFile) { - pathToFile = [pathToFile stringByAppendingPathComponent:@"project.pbxproj"]; - NSMutableSet *filenames = [[[NSMutableSet alloc] init] autorelease]; - NSMutableSet *comments = [[[NSMutableSet alloc] init] autorelease]; - BOOL wasGood = NO; - NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:pathToFile]; - if (dict) { - NSDictionary *objects = [dict objectForKey:@"objects"]; - if (objects) { - NSEnumerator *objEnumerator = [objects objectEnumerator]; - NSDictionary *object; - while ((object = [objEnumerator nextObject])) { - NSString *isaType = [object objectForKey:@"isa"]; - if ([isaType caseInsensitiveCompare:@"PBXFileReference"] == NSOrderedSame) { - NSString *path = [object objectForKey:@"path"]; - if (path) { - [filenames addObject:[path lastPathComponent]]; - } - } else if ([isaType caseInsensitiveCompare:@"PBXNativeTarget"] == NSOrderedSame) { - NSString *name = [object objectForKey:@"name"]; - if (name) { - [filenames addObject:name]; - } - name = [object objectForKey:@"productName"]; - if (name) { - [filenames addObject:name]; - } - } - NSString *comment = [object objectForKey:@"comments"]; - if (comment) { - [comments addObject:comment]; - } - } - } - } - if ([filenames count]) { - NSString *description = [[filenames allObjects] componentsJoinedByString:@"\n"]; - [attributes setObject:description forKey:(NSString*)kMDItemDescription]; - wasGood = YES; - } - if ([comments count]) { - NSString *comment = [[comments allObjects] componentsJoinedByString:@"\n"]; - [attributes setObject:comment forKey:(NSString*)kMDItemComment]; - wasGood = YES; - } - return wasGood; -} - -// Currently grabs all the filenames, target names, and product names -// and sticks them into kMDItemDescription. -// It also grabs all of the comments and sticks them into kMDItemComment. -Boolean GetMetadataForFile(void* interface, - CFMutableDictionaryRef cfAttributes, - CFStringRef contentTypeUTI, - CFStringRef cfPathToFile) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSMutableDictionary *attributes = (NSMutableDictionary*)cfAttributes; - NSString *pathToFile = (NSString*)cfPathToFile; - BOOL wasGood = NO; - if (UTTypeConformsTo(contentTypeUTI, CFSTR("com.apple.xcode.project"))) { - wasGood = ImportProjectFile(attributes, pathToFile); - } - [pool release]; - return wasGood == NO ? FALSE : TRUE; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/Info.plist deleted file mode 100644 index def1f7f7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeRole - MDImporter - LSItemContentTypes - - com.apple.xcode.project - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.spotlightimporter.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleVersion - 1.0 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - 1CDB2B3C-CD6F-407D-9217-230E6DED8B00 - MetadataImporterPluginFactory - - CFPlugInTypes - - 8B08C4BF-415B-11D8-B3F9-0003936726FC - - 1CDB2B3C-CD6F-407D-9217-230E6DED8B00 - - - CFPlugInUnloadFunction - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/PluginID.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/PluginID.h deleted file mode 100644 index 69c7a279..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/PluginID.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PluginID.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#define PLUGIN_ID "1CDB2B3C-CD6F-407D-9217-230E6DED8B00" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/ReadMe.rtf b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/ReadMe.rtf deleted file mode 100644 index bd2eb697..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/ReadMe.rtf +++ /dev/null @@ -1,31 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural - -\f0\fs24 \cf0 XcodeProject Spotlight Plugin\ -\ -Copyright 2008 Google Inc.\ -\ -Licensed under the Apache License, Version 2.0 (the "License"); you may not\ -use this file except in compliance with the License. You may obtain a copy\ -of the License at\ -\ -http://www.apache.org/licenses/LICENSE-2.0\ - \ -Unless required by applicable law or agreed to in writing, software\ -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\ -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\ -License for the specific language governing permissions and limitations under\ -the License.\ -\ ------------------------\ -\ -This is a spotlight importer for Xcode Projects. \ -Makes it easy for you to search xcode project for specific files they include\ -or text in the project comments.\ -\ -To install the spotlight plugin, please copy it into /Library/Spotlight or ~/Library/Spotlight.\ -\ -It is part of the Google Toolbox For Mac project\ -http://code.google.com/p/google-toolbox-for-mac/} \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/schema.xml b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/schema.xml deleted file mode 100644 index cd3f3f7c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/SpotlightPlugins/XcodeProject/schema.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - kMDItemComment kMDItemDescription - - - - - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/TigerGcov/libgcov_readme.html b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/TigerGcov/libgcov_readme.html deleted file mode 100644 index fc381a70..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/TigerGcov/libgcov_readme.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - libgcov_readme.html - - - - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTest-Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTest-Info.plist deleted file mode 100644 index 71daf7db..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTest-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.${PRODUCT_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.h deleted file mode 100644 index 016da7e6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.h +++ /dev/null @@ -1,144 +0,0 @@ -// -// GTMAppKit+UnitTesting.m -// -// Categories for making unit testing of graphics/UI easier. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMNSObject+UnitTesting.h" - -// Categories for making unit testing of graphics/UI easier. -// Allows you to take a state/images of instances of AppKit classes. -// See GTMNSObject+UnitTesting.h for details. - -@interface NSApplication (GTMUnitTestingAdditions) -@end - -@interface NSWindow (GTMUnitTestingAdditions) -@end - -@interface NSControl (GTMUnitTestingAdditions) -@end - -@interface NSTextField (GTMUnitTestingAdditions) -@end - -@interface NSCell (GTMUnitTestingAdditions) -@end - -@interface NSImage (GTMUnitTestingAdditions) -@end - -@interface NSMenu (GTMUnitTestingAdditions) -@end - -@interface NSMenuItem (GTMUnitTestingAdditions) -@end - -@protocol GTMUnitTestViewDrawer; - -// Fails when the |a1|'s drawing in an area |a2| does not equal the image file named |a3|. -// See the description of the -gtm_pathForImageNamed method -// to understand how |a3| is found and written out. -// See the description of the GTMUnitTestView for a better idea -// how the view works. -// Implemented as a macro to match the rest of the SenTest macros. -// -// Args: -// a1: The object that implements the GTMUnitTestViewDrawer protocol -// that is doing the drawing. -// a2: The size of the drawing -// a3: The name of the image file to check against. -// Do not include the extension -// a4: contextInfo to pass to drawer -// description: A format string as in the printf() function. -// Can be nil or an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -// - -#define GTMAssertDrawingEqualToImageNamed(a1, a2, a3, a4, description, ...) \ - do { \ - id a1Drawer = (a1); \ - NSSize a2Size = (a2); \ - NSString* a3String = (a3); \ - void *a4ContextInfo = (a4); \ - NSRect frame = NSMakeRect(0, 0, a2Size.width, a2Size.height); \ - GTMUnitTestView *view = [[[GTMUnitTestView alloc] initWithFrame:frame drawer:a1Drawer contextInfo:a4ContextInfo] autorelease]; \ - GTMAssertObjectImageEqualToImageNamed(view, a3String, STComposeString(description, ##__VA_ARGS__)); \ - } while(0) - -// Category for making unit testing of graphics/UI easier. - -// Allows you to take a state of a view. Supports both image and state. -// See NSObject+UnitTesting.h for details. -@interface NSView (GTMUnitTestingAdditions) -// Returns whether unitTestEncodeState should recurse into subviews -// -// If you have "Full keyboard access" in the -// Keyboard & Mouse > Keyboard Shortcuts preferences pane set to "Text boxes -// and Lists only" that Apple adds a set of subviews to NSTextFields. So in the -// case of NSTextFields we don't want to recurse into their subviews. There may -// be other cases like this, so instead of specializing unitTestEncodeState: to -// look for NSTextFields, NSTextFields will just not allow us to recurse into -// their subviews. -// -// Returns: -// should unitTestEncodeState pick up subview state. -- (BOOL)gtm_shouldEncodeStateForSubviews; - -@end - -// A view that allows you to delegate out drawing using the formal -// GTMUnitTestViewDelegate protocol -// This is useful when writing up unit tests for visual elements. -// Your test will often end up looking like this: -// - (void)testFoo { -// GTMAssertDrawingEqualToFile(self, NSMakeSize(200, 200), @"Foo", nil, nil); -// } -// and your testSuite will also implement the unitTestViewDrawRect method to do -// it's actual drawing. The above creates a view of size 200x200 that draws -// it's content using |self|'s unitTestViewDrawRect method and compares it to -// the contents of the file Foo.tif to make sure it's valid -@interface GTMUnitTestView : NSView { - @private - id drawer_; // delegate for doing drawing (STRONG) - void* contextInfo_; // info passed in by user for them to use when drawing -} - -// Create a GTMUnitTestView. -// -// Args: -// rect: the area to draw. -// drawer: the object that will do the drawing via the GTMUnitTestViewDrawer -// protocol -// contextInfo: -- (id)initWithFrame:(NSRect)frame drawer:(id)drawer contextInfo:(void*)contextInfo; -@end - -/// \cond Protocols - -// Formal protocol for doing unit testing of views. See description of -// GTMUnitTestView for details. -@protocol GTMUnitTestViewDrawer - -// Draw the view. Equivalent to drawRect on a standard NSView. -// -// Args: -// rect: the area to draw. -- (void)gtm_unitTestViewDrawRect:(NSRect)rect contextInfo:(void*)contextInfo; -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.m deleted file mode 100644 index c35d07d8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMAppKit+UnitTesting.m +++ /dev/null @@ -1,341 +0,0 @@ -// -// GTMAppKit+UnitTesting.m -// -// Categories for making unit testing of graphics/UI easier. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import "GTMAppKit+UnitTesting.h" -#import "GTMGeometryUtils.h" -#import "GTMMethodCheck.h" -#import "GTMGarbageCollection.h" - -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 - #define ENCODE_NSINTEGER(coder, i, key) [(coder) encodeInt:(i) forKey:(key)] -#else - #define ENCODE_NSINTEGER(coder, i, key) [(coder) encodeInteger:(i) forKey:(key)] -#endif - -@implementation NSApplication (GMUnitTestingAdditions) -GTM_METHOD_CHECK(NSObject, gtm_unitTestEncodeState:); - -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - ENCODE_NSINTEGER(inCoder, [[self mainWindow] windowNumber], @"ApplicationMainWindow"); - - // Descend down into the windows allowing them to store their state - NSWindow *window = nil; - int i = 0; - GTM_FOREACH_OBJECT(window, [self windows]) { - if ([window isVisible]) { - // Only record visible windows because invisible windows may be closing on us - // This appears to happen differently in 64 bit vs 32 bit, and items - // in the window may hold an extra retain count for a while until the - // event loop is spun. To avoid all this, we just don't record non - // visible windows. - // See rdar://5851458 for details. - [inCoder encodeObject:window forKey:[NSString stringWithFormat:@"Window %d", i]]; - i = i + 1; - } - } - - // and encode the menu bar - NSMenu *mainMenu = [self mainMenu]; - if (mainMenu) { - [inCoder encodeObject:mainMenu forKey:@"MenuBar"]; - } -} -@end - -@implementation NSWindow (GMUnitTestingAdditions) - -- (CGImageRef)gtm_unitTestImage { - return [[[self contentView] superview] gtm_unitTestImage]; -} - -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeObject:[self title] forKey:@"WindowTitle"]; - [inCoder encodeBool:[self isVisible] forKey:@"WindowIsVisible"]; - // Do not record if window is key, because users running unit tests - // and clicking around to other apps, could change this mid test causing - // issues. - // [inCoder encodeBool:[self isKeyWindow] forKey:@"WindowIsKey"]; - [inCoder encodeBool:[self isMainWindow] forKey:@"WindowIsMain"]; - [inCoder encodeObject:[self contentView] forKey:@"WindowContent"]; -} - -@end - -@implementation NSControl (GTMUnitTestingAdditions) - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeObject:[self class] forKey:@"ControlType"]; - [inCoder encodeObject:[self objectValue] forKey:@"ControlValue"]; - [inCoder encodeObject:[self selectedCell] forKey:@"ControlSelectedCell"]; - ENCODE_NSINTEGER(inCoder, [self tag], @"ControlTag"); - [inCoder encodeBool:[self isEnabled] forKey:@"ControlIsEnabled"]; -} - -@end - -@implementation NSTextField (GTMUnitTestingAdditions) - -- (BOOL)gtm_shouldEncodeStateForSubviews { - return NO; -} - -@end - -@implementation NSCell (GTMUnitTestingAdditions) - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - BOOL isImageCell = NO; - if ([self hasValidObjectValue]) { - id val = [self objectValue]; - [inCoder encodeObject:val forKey:@"CellValue"]; - isImageCell = [val isKindOfClass:[NSImage class]]; - } - if (!isImageCell) { - // Image cells have a title that includes addresses that aren't going - // to be constant, so we don't encode them. All the info we need - // is going to be in the CellValue encoding. - [inCoder encodeObject:[self title] forKey:@"CellTitle"]; - } - ENCODE_NSINTEGER(inCoder, [self state], @"CellState"); - ENCODE_NSINTEGER(inCoder, [self tag], @"CellTag"); -} - -@end - -@implementation NSImage (GTMUnitTestingAdditions) - -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeObject:NSStringFromSize([self size]) forKey:@"ImageSize"]; - [inCoder encodeObject:[self name] forKey:@"ImageName"]; -} - -- (CGImageRef)gtm_unitTestImage { - // Create up a context - NSSize size = [self size]; - NSRect rect = GTMNSRectOfSize(size); - CGSize cgSize = GTMNSSizeToCGSize(size); - CGContextRef contextRef = GTMCreateUnitTestBitmapContextOfSizeWithData(cgSize, - NULL); - NSGraphicsContext *bitmapContext - = [NSGraphicsContext graphicsContextWithGraphicsPort:contextRef flipped:NO]; - _GTMDevAssert(bitmapContext, @"Couldn't create ns bitmap context"); - - [NSGraphicsContext saveGraphicsState]; - [NSGraphicsContext setCurrentContext:bitmapContext]; - [self drawInRect:rect fromRect:rect operation:NSCompositeCopy fraction:1.0]; - - CGImageRef image = CGBitmapContextCreateImage(contextRef); - CFRelease(contextRef); - [NSGraphicsContext restoreGraphicsState]; - return (CGImageRef)GTMCFAutorelease(image); -} - -@end - -@implementation NSMenu (GTMUnitTestingAdditions) - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - // Hack here to work around - // rdar://5881796 Application menu item title wrong when accessed programatically - // which causes us to have different results on x86_64 vs x386. - // Hack is braced intentionally. We don't record the title of the - // "application" menu or it's menu title because they are wrong on 32 bit. - // They appear to work right on 64bit. - { - NSMenu *mainMenu = [NSApp mainMenu]; - NSMenu *appleMenu = [[mainMenu itemAtIndex:0] submenu]; - if (![self isEqual:appleMenu]) { - [inCoder encodeObject:[self title] forKey:@"MenuTitle"]; - } - } - // Descend down into the menuitems allowing them to store their state - NSMenuItem *menuItem = nil; - int i = 0; - GTM_FOREACH_OBJECT(menuItem, [self itemArray]) { - [inCoder encodeObject:menuItem - forKey:[NSString stringWithFormat:@"MenuItem %d", i]]; - ++i; - } -} - -@end - -@implementation NSMenuItem (GTMUnitTestingAdditions) - -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - // Hack here to work around - // rdar://5881796 Application menu item title wrong when accessed programatically - // which causes us to have different results on x86_64 vs x386. - // See comment above. - { - NSMenu *mainMenu = [NSApp mainMenu]; - NSMenuItem *appleMenuItem = [mainMenu itemAtIndex:0]; - if (![self isEqual:appleMenuItem]) { - [inCoder encodeObject:[self title] forKey:@"MenuItemTitle"]; - } - } - [inCoder encodeObject:[self keyEquivalent] forKey:@"MenuItemKeyEquivalent"]; - [inCoder encodeBool:[self isSeparatorItem] forKey:@"MenuItemIsSeparator"]; - ENCODE_NSINTEGER(inCoder, [self state], @"MenuItemState"); - [inCoder encodeBool:[self isEnabled] forKey:@"MenuItemIsEnabled"]; - [inCoder encodeBool:[self isAlternate] forKey:@"MenuItemIsAlternate"]; - [inCoder encodeObject:[self toolTip] forKey:@"MenuItemTooltip"]; - ENCODE_NSINTEGER(inCoder, [self tag], @"MenuItemTag"); - ENCODE_NSINTEGER(inCoder, [self indentationLevel], @"MenuItemIndentationLevel"); - - // Do our submenu if neccessary - if ([self hasSubmenu]) { - [inCoder encodeObject:[self submenu] forKey:@"MenuItemSubmenu"]; - } -} - -@end - -// A view that allows you to delegate out drawing using the formal -// GTMUnitTestViewDelegate protocol above. This is useful when writing up unit -// tests for visual elements. -// Your test will often end up looking like this: -// - (void)testFoo { -// GTMAssertDrawingEqualToFile(self, NSMakeSize(200, 200), @"Foo", nil, nil); -// } -// and your testSuite will also implement the unitTestViewDrawRect method to do -// it's actual drawing. The above creates a view of size 200x200 that draws -// it's content using |self|'s unitTestViewDrawRect method and compares it to -// the contents of the file Foo.tif to make sure it's valid -@implementation GTMUnitTestView - -- (id)initWithFrame:(NSRect)frame - drawer:(id)drawer - contextInfo:(void*)contextInfo { - self = [super initWithFrame:frame]; - if (self != nil) { - drawer_ = [drawer retain]; - contextInfo_ = contextInfo; - } - return self; -} - -- (void)dealloc { - [drawer_ release]; - [super dealloc]; -} - - -- (void)drawRect:(NSRect)rect { - [drawer_ gtm_unitTestViewDrawRect:rect contextInfo:contextInfo_]; -} - - -@end - -@implementation NSView (GTMUnitTestingAdditions) - -// Returns an image containing a representation of the object -// suitable for use in comparing against a master image. -// Does all of it's drawing with smoothfonts and antialiasing off -// to avoid issues with font smoothing settings and antialias differences -// between ppc and x86. -// -// Returns: -// an image of the object -- (CGImageRef)gtm_unitTestImage { - // Create up a context - NSRect bounds = [self bounds]; - CGSize cgSize = GTMNSSizeToCGSize(bounds.size); - CGContextRef contextRef = GTMCreateUnitTestBitmapContextOfSizeWithData(cgSize, - NULL); - NSGraphicsContext *bitmapContext - = [NSGraphicsContext graphicsContextWithGraphicsPort:contextRef flipped:NO]; - _GTMDevAssert(bitmapContext, @"Couldn't create ns bitmap context"); - - // Save our state and turn off font smoothing and antialias. - CGContextSaveGState(contextRef); - CGContextSetShouldSmoothFonts(contextRef, false); - CGContextSetShouldAntialias(contextRef, false); - [self displayRectIgnoringOpacity:bounds inContext:bitmapContext]; - - CGImageRef image = CGBitmapContextCreateImage(contextRef); - CFRelease(contextRef); - return (CGImageRef)GTMCFAutorelease(image); -} - -// Returns whether gtm_unitTestEncodeState should recurse into subviews -// of a particular view. -// If you have "Full keyboard access" in the -// Keyboard & Mouse > Keyboard Shortcuts preferences pane set to "Text boxes -// and Lists only" that Apple adds a set of subviews to NSTextFields. So in the -// case of NSTextFields we don't want to recurse into their subviews. There may -// be other cases like this, so instead of specializing gtm_unitTestEncodeState: to -// look for NSTextFields, NSTextFields will just not allow us to recurse into -// their subviews. -// -// Returns: -// should gtm_unitTestEncodeState pick up subview state. -- (BOOL)gtm_shouldEncodeStateForSubviews { - return YES; -} - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeBool:[self isHidden] forKey:@"ViewIsHidden"]; - if ([self gtm_shouldEncodeStateForSubviews]) { - NSView *subview = nil; - int i = 0; - GTM_FOREACH_OBJECT(subview, [self subviews]) { - [inCoder encodeObject:subview forKey:[NSString stringWithFormat:@"ViewSubView %d", i]]; - i = i + 1; - } - } -} - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h deleted file mode 100644 index b757ba91..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// GTMCALayer+UnitTesting.h -// -// Code for making unit testing of graphics/UI easier. Generally you -// will only want to look at the macros: -// GTMAssertDrawingEqualToFile -// GTMAssertViewRepEqualToFile -// and the protocol GTMUnitTestCALayerDrawer. When using these routines -// make sure you are using device colors and not calibrated/generic colors -// or else your test graphics WILL NOT match across devices/graphics cards. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMNSObject+UnitTesting.h" - -// Category for making unit testing of graphics/UI easier. - -// Allows you to take a state of a view. Supports both image and state. -// See GTMNSObject+UnitTesting.h for details. -@interface CALayer (GTMUnitTestingAdditions) -// Returns whether gtm_unitTestEncodeState should recurse into sublayers -// -// Returns: -// should gtm_unitTestEncodeState pick up sublayer state. -- (BOOL)gtm_shouldEncodeStateForSublayers; -@end - -@interface NSObject (GTMCALayerUnitTestingDelegateMethods) -// Delegate method that allows a delegate for a layer to -// decide whether we should recurse -- (BOOL)gtm_shouldEncodeStateForSublayersOfLayer:(CALayer*)layer; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.m deleted file mode 100644 index 3ffa209e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMCALayer+UnitTesting.m +++ /dev/null @@ -1,90 +0,0 @@ -// -// GTMCALayer+UnitTesting.m -// -// Category for making unit testing of graphics/UI easier. -// Allows you to save a view out to a image file, and compare a view -// with a previously stored representation to make sure it hasn't changed. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMCALayer+UnitTesting.h" -#import "GTMGarbageCollection.h" - -@implementation CALayer (GTMUnitTestingAdditions) - -// Returns an image containing a representation of the object -// suitable for use in comparing against a master image. -// NB this means that all colors should be from "NSDevice" color space -// Does all of it's drawing with smoothfonts and antialiasing off -// to avoid issues with font smoothing settings and antialias differences -// between ppc and x86. -// -// Returns: -// an image of the object -- (CGImageRef)gtm_unitTestImage { - CGRect bounds = [self bounds]; - CGSize size = CGSizeMake(CGRectGetWidth(bounds), CGRectGetHeight(bounds)); - CGContextRef context = GTMCreateUnitTestBitmapContextOfSizeWithData(size, - NULL); - _GTMDevAssert(context, @"Couldn't create context"); - - // iPhone renders are flipped - CGAffineTransform transform = CGAffineTransformMakeTranslation(0, size.height); - transform = CGAffineTransformScale(transform, 1.0, -1.0); - CGContextConcatCTM(context, transform); - - [self renderInContext:context]; - CGImageRef image = CGBitmapContextCreateImage(context); - CFRelease(context); - return (CGImageRef)GTMCFAutorelease(image); -} - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeBool:[self isHidden] forKey:@"LayerIsHidden"]; - [inCoder encodeBool:[self isDoubleSided] forKey:@"LayerIsDoublesided"]; - [inCoder encodeBool:[self isOpaque] forKey:@"LayerIsOpaque"]; - [inCoder encodeFloat:[self opacity] forKey:@"LayerOpacity"]; - // TODO: There is a ton more we can add here. What are we interested in? - if ([self gtm_shouldEncodeStateForSublayers]) { - int i = 0; - for (CALayer *subLayer in [self sublayers]) { - [inCoder encodeObject:subLayer - forKey:[NSString stringWithFormat:@"CALayerSubLayer %d", i]]; - i = i + 1; - } - } -} - -// Returns whether gtm_unitTestEncodeState should recurse into sublayers -// -// Returns: -// should gtm_unitTestEncodeState pick up sublayer state. -- (BOOL)gtm_shouldEncodeStateForSublayers { - BOOL value = YES; - if([self.delegate respondsToSelector:@selector(gtm_shouldEncodeStateForSublayersOfLayer:)]) { - value = [self.delegate gtm_shouldEncodeStateForSublayersOfLayer:self]; - } - return value; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMDevLogUnitTestingBridge.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMDevLogUnitTestingBridge.m deleted file mode 100644 index 3d2b84d0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMDevLogUnitTestingBridge.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// GTMDevLogUnitTestingBridge.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#include "GTMUnitTestDevLog.h" - -// -// NOTE: Odds are this file should not be included in your project. It is -// only needed for some enhanced unit testing. -// -// By adding: -// #define _GTMDevLog _GTMUnitTestDevLog -// to your prefix header (like the GTM Framework does), this function then -// works to forward logging messages to the GTMUnitTestDevLog class to -// allow logging validation during unittest, otherwise the messages go to -// NSLog like normal. -// -// See GTMUnitTestDevLog.h for more information on checking logs in unittests. -// -void _GTMUnitTestDevLog(NSString *format, ...) { - Class devLogClass = NSClassFromString(@"GTMUnitTestDevLog"); - va_list argList; - va_start(argList, format); - if (devLogClass) { - [devLogClass log:format args:argList]; - } else { - NSLogv(format, argList); // COV_NF_LINE the class is in all our unittest setups - } - va_end(argList); -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h deleted file mode 100644 index 4583b5d8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// GTMIPhoneUnitTestDelegate.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// Application delegate that runs all test methods in registered classes -// extending SenTestCase. The application is terminated afterwards. -// You can also run the tests directly from your application by invoking -// runTests and clean up, restore data, etc. before the application -// terminates. -@interface GTMIPhoneUnitTestDelegate : NSObject { - @private - NSUInteger totalFailures_; - NSUInteger totalSuccesses_; -} -// Runs through all the registered classes and runs test methods on any -// that are subclasses of SenTestCase. Prints results and run time to -// the default output. -- (void)runTests; -// Fetch the number of successes or failures from the last runTests. -- (NSUInteger)totalSuccesses; -- (NSUInteger)totalFailures; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.m deleted file mode 100644 index 39de1f56..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.m +++ /dev/null @@ -1,206 +0,0 @@ -// -// GTMIPhoneUnitTestDelegate.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMIPhoneUnitTestDelegate.h" - -#import "GTMDefines.h" -#if !GTM_IPHONE_SDK -#error GTMIPhoneUnitTestDelegate for iPhone only -#endif -#import -#import -#import -#import "GTMSenTestCase.h" - -// Used for sorting methods below -static int MethodSort(const void *a, const void *b) { - const char *nameA = sel_getName(method_getName(*(Method*)a)); - const char *nameB = sel_getName(method_getName(*(Method*)b)); - return strcmp(nameA, nameB); -} - -// Return YES if class is subclass (1 or more generations) of SenTestCase -static BOOL IsTestFixture(Class aClass) { - BOOL iscase = NO; - Class testCaseClass = [SenTestCase class]; - Class superclass; - for (superclass = aClass; - !iscase && superclass; - superclass = class_getSuperclass(superclass)) { - iscase = superclass == testCaseClass ? YES : NO; - } - return iscase; -} - -@implementation GTMIPhoneUnitTestDelegate - -// Run through all the registered classes and run test methods on any -// that are subclasses of SenTestCase. Terminate the application upon -// test completion. -- (void)applicationDidFinishLaunching:(UIApplication *)application { - [self runTests]; - - if (!getenv("GTM_DISABLE_TERMINATION")) { - // To help using xcodebuild, make the exit status 0/1 to signal the tests - // success/failure. - int exitStatus = (([self totalFailures] == 0U) ? 0 : 1); - exit(exitStatus); - } -} - -// Run through all the registered classes and run test methods on any -// that are subclasses of SenTestCase. Print results and run time to -// the default output. -- (void)runTests { - int count = objc_getClassList(NULL, 0); - NSMutableData *classData - = [NSMutableData dataWithLength:sizeof(Class) * count]; - Class *classes = (Class*)[classData mutableBytes]; - _GTMDevAssert(classes, @"Couldn't allocate class list"); - objc_getClassList(classes, count); - totalFailures_ = 0; - totalSuccesses_ = 0; - NSString *suiteName = [[NSBundle mainBundle] bundlePath]; - NSDate *suiteStartDate = [NSDate date]; - NSString *suiteStartString - = [NSString stringWithFormat:@"Test Suite '%@' started at %@\n", - suiteName, suiteStartDate]; - fputs([suiteStartString UTF8String], stderr); - fflush(stderr); - for (int i = 0; i < count; ++i) { - Class currClass = classes[i]; - if (IsTestFixture(currClass)) { - NSDate *fixtureStartDate = [NSDate date]; - NSString *fixtureName = NSStringFromClass(currClass); - NSString *fixtureStartString - = [NSString stringWithFormat:@"Test Suite '%@' started at %@\n", - fixtureName, fixtureStartDate]; - int fixtureSuccesses = 0; - int fixtureFailures = 0; - fputs([fixtureStartString UTF8String], stderr); - fflush(stderr); - id testcase = [[currClass alloc] init]; - _GTMDevAssert(testcase, @"Unable to instantiate Test Suite: '%@'\n", - fixtureName); - unsigned int methodCount; - Method *methods = class_copyMethodList(currClass, &methodCount); - if (!methods) { - // If the class contains no methods, head on to the next class - NSString *output = [NSString stringWithFormat:@"Test Suite '%@' " - @"finished at %@.\nExecuted 0 tests, with 0 " - @"failures (0 unexpected) in 0 (0) seconds\n", - fixtureName, fixtureStartDate]; - - fputs([output UTF8String], stderr); - continue; - } - // This handles disposing of methods for us even if an - // exception should fly. - [NSData dataWithBytesNoCopy:methods - length:sizeof(Method) * methodCount]; - // Sort our methods so they are called in Alphabetical order just - // because we can. - qsort(methods, methodCount, sizeof(Method), MethodSort); - for (size_t j = 0; j < methodCount; ++j) { - Method currMethod = methods[j]; - SEL sel = method_getName(currMethod); - char *returnType = NULL; - const char *name = sel_getName(sel); - // If it starts with test, takes 2 args (target and sel) and returns - // void run it. - if (strstr(name, "test") == name) { - returnType = method_copyReturnType(currMethod); - if (returnType) { - // This handles disposing of returnType for us even if an - // exception should fly. Length +1 for the terminator, not that - // the length really matters here, as we never reference inside - // the data block. - [NSData dataWithBytesNoCopy:returnType - length:strlen(returnType) + 1]; - } - } - if (returnType // True if name starts with "test" - && strcmp(returnType, @encode(void)) == 0 - && method_getNumberOfArguments(currMethod) == 2) { - BOOL failed = NO; - NSDate *caseStartDate = [NSDate date]; - @try { - [testcase performTest:sel]; - } @catch (NSException *exception) { - failed = YES; - } - if (failed) { - fixtureFailures += 1; - } else { - fixtureSuccesses += 1; - } - NSTimeInterval caseEndTime - = [[NSDate date] timeIntervalSinceDate:caseStartDate]; - NSString *caseEndString - = [NSString stringWithFormat:@"Test Case '-[%@ %s]' %@ (%0.3f " - @"seconds).\n", - fixtureName, name, - failed ? @"failed" : @"passed", - caseEndTime]; - fputs([caseEndString UTF8String], stderr); - fflush(stderr); - } - } - [testcase release]; - NSDate *fixtureEndDate = [NSDate date]; - NSTimeInterval fixtureEndTime - = [fixtureEndDate timeIntervalSinceDate:fixtureStartDate]; - NSString *fixtureEndString - = [NSString stringWithFormat:@"Test Suite '%@' finished at %@.\n" - @"Executed %d tests, with %d failures (%d " - @"unexpected) in %0.3f (%0.3f) seconds\n\n", - fixtureName, fixtureEndDate, - fixtureSuccesses + fixtureFailures, - fixtureFailures, fixtureFailures, - fixtureEndTime, fixtureEndTime]; - - fputs([fixtureEndString UTF8String], stderr); - fflush(stderr); - totalSuccesses_ += fixtureSuccesses; - totalFailures_ += fixtureFailures; - } - } - NSDate *suiteEndDate = [NSDate date]; - NSTimeInterval suiteEndTime - = [suiteEndDate timeIntervalSinceDate:suiteStartDate]; - NSString *suiteEndString - = [NSString stringWithFormat:@"Test Suite '%@' finished at %@.\n" - @"Executed %d tests, with %d failures (%d " - @"unexpected) in %0.3f (%0.3f) seconds\n\n", - suiteName, suiteEndDate, - totalSuccesses_ + totalFailures_, - totalFailures_, totalFailures_, - suiteEndTime, suiteEndTime]; - fputs([suiteEndString UTF8String], stderr); - fflush(stderr); -} - -- (NSUInteger)totalSuccesses { - return totalSuccesses_; -} - -- (NSUInteger)totalFailures { - return totalFailures_; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestMain.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestMain.m deleted file mode 100644 index 2a0a70d2..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestMain.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// GTMIPhoneUnitTestMain.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#if !GTM_IPHONE_SDK - #error GTMIPhoneUnitTestMain for iPhone only -#endif -#import - -// Creates an application that runs all tests from classes extending -// SenTestCase, outputs results and test run time, and terminates right -// afterwards. -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"GTMIPhoneUnitTestDelegate"); - [pool release]; - return retVal; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.h deleted file mode 100644 index 55c3dfe9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.h +++ /dev/null @@ -1,120 +0,0 @@ -// -// GTMNSObject+BindingUnitTesting.h -// -// Utilities for doing advanced unittesting with object bindings. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#include - -// Utility functions for GTMTestExposedBindings Macro. Don't use it directly -// but use the macro below instead -BOOL GTMDoExposedBindingsFunctionCorrectly(NSObject *object, - NSArray **errors); - -// Tests the setters and getters for exposed bindings -// For objects that expose bindings, this tests them for you, saving you from -// having to write a whole pile of set/get test code if you add binding support. -// You will need to implement valueClassForBinding: for your bindings, -// and you may possibly want to implement unitTestExposedBindingsToIgnore -// and unitTestExposedBindingsTestValues. See descriptions of those -// methods below for details. -// Implemented as a macro to match the rest of the SenTest macros. -// -// Args: -// a1: The object to be checked. -// description: A format string as in the printf() function. -// Can be nil or an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -// -#define GTMTestExposedBindings(a1, description, ...) \ -do { \ - NSObject *a1Object = (a1); \ - NSArray *errors = nil; \ - BOOL isGood = GTMDoExposedBindingsFunctionCorrectly(a1Object, &errors); \ - if (!isGood) { \ - NSString *failString; \ - GTM_FOREACH_OBJECT(failString, errors) { \ - if (description) { \ - STFail(@"%@: %@", failString, STComposeString(description, ##__VA_ARGS__)); \ - } else { \ - STFail(@"%@", failString); \ - } \ - } \ - } \ -} while(0) - -// Utility class for setting up Binding Tests. Basically a pair of a value to -// set a binding to, followed by the expected return value. -// See description of gtm_unitTestExposedBindingsTestValues: below -// for example of usage. -@interface GTMBindingUnitTestData : NSObject { - @private - id valueToSet_; - id expectedValue_; -} - -+ (id)testWithIdentityValue:(id)value; -+ (id)testWithValue:(id)value expecting:(id)expecting; -- (id)initWithValue:(id)value expecting:(id)expecting; -- (id)valueToSet; -- (id)expectedValue; -@end - -@interface NSObject (GTMBindingUnitTestingAdditions) -// Allows you to ignore certain bindings when running GTMTestExposedBindings -// If you have bindings you want to ignore, add them to the array returned -// by this method. The standard way to implement this would be: -// - (NSMutableArray*)unitTestExposedBindingsToIgnore { -// NSMutableArray *array = [super unitTestExposedBindingsToIgnore]; -// [array addObject:@"bindingToIgnore1"]; -// ... -// return array; -// } -// The NSObject implementation by default will ignore NSFontBoldBinding, -// NSFontFamilyNameBinding, NSFontItalicBinding, NSFontNameBinding and -// NSFontSizeBinding if your exposed bindings contains NSFontBinding because -// the NSFont*Bindings are NOT KVC/KVO compliant. -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore; - -// Allows you to set up test values for your different bindings. -// if you have certain values you want to test against your bindings, add -// them to the array returned by this method. The array is an array of -// GTMBindingUnitTestData. -// The standard way to implement this would be: -// - (NSMutableArray*)gtm_unitTestExposedBindingsTestValues:(NSString*)binding { -// NSMutableArray *dict = [super unitTestExposedBindingsTestValues:binding]; -// if ([binding isEqualToString:@"myBinding"]) { -// MySpecialBindingValueSet *value -// = [[[MySpecialBindingValueSet alloc] init] autorelease]; -// [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; -// ... -// else if ([binding isEqualToString:@"myBinding2"]) { -// ... -// } -// return array; -// } -// The NSObject implementation handles many of the default bindings, and -// gives you a reasonable set of test values to start. -// See the implementation for the current list of bindings, and values that we -// set for those bindings. -- (NSMutableArray*)gtm_unitTestExposedBindingsTestValues:(NSString*)binding; - -// A special version of isEqualTo to test whether two binding values are equal -// by default it calls directly to isEqualTo: but can be overridden for special -// cases (like NSImages) where the standard isEqualTo: isn't sufficient. -- (BOOL)gtm_unitTestIsEqualTo:(id)value; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.m deleted file mode 100644 index d064a479..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+BindingUnitTesting.m +++ /dev/null @@ -1,568 +0,0 @@ -// -// GTMNSObject+BindingUnitTesting.m -// -// An informal protocol for doing advanced binding unittesting with objects. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import "GTMNSObject+BindingUnitTesting.h" -#import "GTMSystemVersion.h" - -BOOL GTMDoExposedBindingsFunctionCorrectly(NSObject *object, - NSArray **errors) { - NSMutableArray *errorArray = [NSMutableArray array]; - if (errors) { - *errors = nil; - } - NSArray *bindings = [object exposedBindings]; - if ([bindings count]) { - NSArray *bindingsToIgnore = [object gtm_unitTestExposedBindingsToIgnore]; - NSString *bindingKey; - GTM_FOREACH_OBJECT(bindingKey, bindings) { - if (![bindingsToIgnore containsObject:bindingKey]) { - Class theClass = [object valueClassForBinding:bindingKey]; - if (!theClass) { - NSString *error - = [NSString stringWithFormat:@"%@ should have valueClassForBinding '%@'", - object, bindingKey]; - [errorArray addObject:error]; - continue; - } - @try { - @try { - [object valueForKey:bindingKey]; - } - @catch (NSException *e) { - _GTMDevLog(@"%@ is not key value coding compliant for key %@", - object, bindingKey); - continue; - } // COV_NF_LINE - compiler bug - NSArray *testValues - = [object gtm_unitTestExposedBindingsTestValues:bindingKey]; - GTMBindingUnitTestData *testData; - GTM_FOREACH_OBJECT(testData, testValues) { - id valueToSet = [testData valueToSet]; - [object setValue:valueToSet forKey:bindingKey]; - id valueReceived = [object valueForKey:bindingKey]; - id desiredValue = [testData expectedValue]; - if (![desiredValue gtm_unitTestIsEqualTo:valueReceived]) { - NSString *error - = [NSString stringWithFormat:@"%@ unequal to expected %@ for binding '%@'", - valueReceived, desiredValue, bindingKey]; - [errorArray addObject:error]; - continue; - } - } - } - @catch(NSException *e) { - NSString *error - = [NSString stringWithFormat:@"%@:%@-> Binding %@", - [e name], [e reason], bindingKey]; - [errorArray addObject:error]; - } // COV_NF_LINE - compiler bug - } - } - } else { - NSString *error = - [NSString stringWithFormat:@"%@ does not have any exposed bindings", - object]; - [errorArray addObject:error]; - } - if (errors) { - *errors = errorArray; - } - return [errorArray count] == 0; -} - -@implementation GTMBindingUnitTestData -+ (id)testWithIdentityValue:(id)value { - return [self testWithValue:value expecting:value]; -} - -+ (id)testWithValue:(id)value expecting:(id)expecting { - return [[[self alloc] initWithValue:value expecting:expecting] autorelease]; -} - -- (id)initWithValue:(id)value expecting:(id)expecting { - if ((self = [super init])) { - valueToSet_ = [value retain]; - expectedValue_ = [expecting retain]; - } - return self; -} - -- (BOOL)isEqual:(id)object { - BOOL isEqual = [object isMemberOfClass:[self class]]; - if (isEqual) { - id objValue = [object valueToSet]; - id objExpect = [object expectedValue]; - isEqual = (((valueToSet_ == objValue) || ([valueToSet_ isEqual:objValue])) - && ((expectedValue_ == objExpect) || ([expectedValue_ isEqual:objExpect]))); - } - return isEqual; -} - -- (NSUInteger)hash { - return [valueToSet_ hash] + [expectedValue_ hash]; -} - -- (void)dealloc { - [valueToSet_ release]; - [expectedValue_ release]; - [super dealloc]; -} - -- (id)valueToSet { - return valueToSet_; -} - -- (id)expectedValue { - return expectedValue_; -} -@end - -@implementation NSObject (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [NSMutableArray arrayWithObject:NSValueBinding]; - if ([[self exposedBindings] containsObject:NSFontBinding]) { - NSString *fontBindings[] = { NSFontBoldBinding, NSFontFamilyNameBinding, - NSFontItalicBinding, NSFontNameBinding, NSFontSizeBinding }; - for (size_t i = 0; i < sizeof(fontBindings) / sizeof(NSString*); ++i) { - [array addObject:fontBindings[i]]; - } - } - return array; -} - -- (NSMutableArray*)gtm_unitTestExposedBindingsTestValues:(NSString*)binding { - - NSMutableArray *array = [NSMutableArray array]; - id value = [self valueForKey:binding]; - - // Always test identity if possible - if (value) { - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } - - // Now some default test values for a variety of bindings to make - // sure that we cover all the bases and save other people writing lots of - // duplicate test code. - - // If anybody can think of more to add, please go nuts. - if ([binding isEqualToString:NSAlignmentBinding]) { - value = [NSNumber numberWithInt:NSLeftTextAlignment]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:NSRightTextAlignment]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:NSCenterTextAlignment]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:NSJustifiedTextAlignment]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:NSNaturalTextAlignment]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - NSNumber *valueToSet = [NSNumber numberWithInt:500]; - [array addObject:[GTMBindingUnitTestData testWithValue:valueToSet - expecting:value]]; - valueToSet = [NSNumber numberWithInt:-1]; - [array addObject:[GTMBindingUnitTestData testWithValue:valueToSet - expecting:value]]; - } else if ([binding isEqualToString:NSAlternateImageBinding] || - [binding isEqualToString:NSImageBinding] || - [binding isEqualToString:NSMixedStateImageBinding] || - [binding isEqualToString:NSOffStateImageBinding] || - [binding isEqualToString:NSOnStateImageBinding]) { - // This handles all image bindings - value = [NSImage imageNamed:@"NSApplicationIcon"]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSAnimateBinding] || - [binding isEqualToString:NSDocumentEditedBinding] || - [binding isEqualToString:NSEditableBinding] || - [binding isEqualToString:NSEnabledBinding] || - [binding isEqualToString:NSHiddenBinding] || - [binding isEqualToString:NSVisibleBinding] || - [binding isEqualToString:NSIsIndeterminateBinding] || - // NSTranparentBinding 10.5 only - [binding isEqualToString:@"transparent"]) { - // This handles all bool value bindings - value = [NSNumber numberWithBool:YES]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithBool:NO]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSAlternateTitleBinding] || - [binding isEqualToString:NSHeaderTitleBinding] || - [binding isEqualToString:NSLabelBinding] || - [binding isEqualToString:NSTitleBinding] || - [binding isEqualToString:NSToolTipBinding]) { - // This handles all string value bindings - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:@"happy"]]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:@""]]; - - // Test some non-ascii roman text - char a_not_alpha[] = { 'A', 0xE2, 0x89, 0xA2, 0xCE, 0x91, '.', 0x00 }; - value = [NSString stringWithUTF8String:a_not_alpha]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some korean - char hangugo[] = { 0xED, 0x95, 0x9C, 0xEA, 0xB5, - 0xAD, 0xEC, 0x96, 0xB4, 0x00 }; - value = [NSString stringWithUTF8String:hangugo]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some japanese - char nihongo[] = { 0xE6, 0x97, 0xA5, 0xE6, 0x9C, - 0xAC, 0xE8, 0xAA, 0x9E, 0x00 }; - value = [NSString stringWithUTF8String:nihongo]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some arabic - char arabic[] = { 0xd9, 0x83, 0xd8, 0xa7, 0xd9, 0x83, 0xd8, 0xa7, 0x00 }; - value = [NSString stringWithUTF8String:arabic]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSRepresentedFilenameBinding]) { - // This handles all path bindings - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:@"/happy"]]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:@"/"]]; - - // Test some non-ascii roman text - char a_not_alpha[] = { '/', 'A', 0xE2, 0x89, 0xA2, 0xCE, 0x91, '.', 0x00 }; - value = [NSString stringWithUTF8String:a_not_alpha]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some korean - char hangugo[] = { '/', 0xED, 0x95, 0x9C, 0xEA, 0xB5, - 0xAD, 0xEC, 0x96, 0xB4, 0x00 }; - value = [NSString stringWithUTF8String:hangugo]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some japanese - char nihongo[] = { '/', 0xE6, 0x97, 0xA5, 0xE6, 0x9C, - 0xAC, 0xE8, 0xAA, 0x9E, 0x00 }; - value = [NSString stringWithUTF8String:nihongo]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - // Test some arabic - char arabic[] = { '/', 0xd9, 0x83, 0xd8, 0xa7, 0xd9, 0x83, 0xd8, 0xa7, 0x00 }; - value = [NSString stringWithUTF8String:arabic]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSMaximumRecentsBinding]) { - value = [NSNumber numberWithInt:0]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:-1]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:INT16_MAX]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithInt:INT16_MIN]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSRowHeightBinding]) { - NSNumber *valueOne = [NSNumber numberWithInt:1]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:valueOne]]; - value = [NSNumber numberWithInt:0]; - id value2 = [NSNumber numberWithInt:INT16_MIN]; - // Row height no longer accepts <= 0 values on SnowLeopard - // which is a good thing. - if ([GTMSystemVersion isSnowLeopardOrGreater]) { - [array addObject:[GTMBindingUnitTestData testWithValue:value - expecting:valueOne]]; - - [array addObject:[GTMBindingUnitTestData testWithValue:value2 - expecting:valueOne]]; - } else { - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value2]]; - } - value = [NSNumber numberWithInt:INT16_MAX]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSMaxValueBinding] || - [binding isEqualToString:NSMaxWidthBinding] || - [binding isEqualToString:NSMinValueBinding] || - [binding isEqualToString:NSMinWidthBinding] || - [binding isEqualToString:NSContentWidthBinding] || - [binding isEqualToString:NSContentHeightBinding] || - [binding isEqualToString:NSWidthBinding] || - [binding isEqualToString:NSAnimationDelayBinding]) { - // NSAnimationDelay is deprecated on SnowLeopard. We continue to test it - // to make sure it doesn't get broken. - - // This handles all float value bindings - value = [NSNumber numberWithFloat:0]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:FLT_MAX]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:-FLT_MAX]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:FLT_MIN]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:-FLT_MIN]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:FLT_EPSILON]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSNumber numberWithFloat:-FLT_EPSILON]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSTextColorBinding]) { - // This handles all color value bindings - value = [NSColor colorWithCalibratedWhite:1.0 alpha:1.0]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSColor colorWithCalibratedWhite:1.0 alpha:0.0]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSColor colorWithCalibratedWhite:1.0 alpha:0.5]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSColor colorWithCalibratedRed:0.5 green:0.5 blue:0.5 alpha:0.5]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSColor colorWithDeviceCyan:0.25 magenta:0.25 yellow:0.25 - black:0.25 alpha:0.25]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSFontBinding]) { - // This handles all font value bindings - value = [NSFont boldSystemFontOfSize:[NSFont systemFontSize]]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSFont toolTipsFontOfSize:[NSFont smallSystemFontSize]]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - value = [NSFont labelFontOfSize:144.0]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSRecentSearchesBinding] || - [binding isEqualToString:NSSortDescriptorsBinding]) { - // This handles all array value bindings - value = [NSArray array]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else if ([binding isEqualToString:NSTargetBinding]) { - value = [NSNull null]; - [array addObject:[GTMBindingUnitTestData testWithIdentityValue:value]]; - } else { - _GTMDevLog(@"Skipped Binding: %@ for %@", binding, self); // COV_NF_LINE - } - return array; -} - -- (BOOL)gtm_unitTestIsEqualTo:(id)value { - return [self isEqualTo:value]; -} - -@end - -#pragma mark - -#pragma mark All the special AppKit Bindings issues below - -@interface NSImage (GTMBindingUnitTestingAdditions) -@end - -@implementation NSImage (GTMBindingUnitTestingAdditions) -- (BOOL)gtm_unitTestIsEqualTo:(id)value { - // NSImage just does pointer equality in the default isEqualTo implementation - // we need something a little more heavy duty that actually compares the - // images internally. - return [[self TIFFRepresentation] isEqualTo:[value TIFFRepresentation]]; -} -@end - -@interface NSScroller (GTMBindingUnitTestingAdditions) -@end - -@implementation NSScroller (GTMBindingUnitTestingAdditions) -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - SInt32 major, minor, bugFix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugFix]; - if (major <= 10 && minor <= 5 && bugFix <= 5) { - // rdar://5849154 - NSScroller exposes binding with no value - // class for NSValueBinding - [array addObject:NSValueBinding]; - } - if ([GTMSystemVersion isBuildLessThanOrEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // Broken on SnowLeopard WWDC and below - // rdar://5849236 - NSScroller exposes binding for NSFontBinding - [array addObject:NSFontBinding]; - } - return array; -} -@end - -@interface NSTextField (GTMBindingUnitTestingAdditions) -@end - -@implementation NSTextField (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - // Not KVC Compliant - for (int i = 0; i < 10; i++) { - [array addObject:[NSString stringWithFormat:@"displayPatternValue%d", i]]; - } - return array; -} - -- (NSMutableArray *)gtm_unitTestExposedBindingsTestValues:(NSString*)binding { - NSMutableArray *array = [super gtm_unitTestExposedBindingsTestValues:binding]; - if ([binding isEqualToString:NSAlignmentBinding]) { - if ([GTMSystemVersion isBuildLessThanOrEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // rdar://5851487 - If NSAlignmentBinding for a NSTextField is set to -1 - // and then got it returns 7 - NSNumber *textAlignment = [NSNumber numberWithInt:NSNaturalTextAlignment]; - GTMBindingUnitTestData *dataToRemove = - [GTMBindingUnitTestData testWithValue:[NSNumber numberWithInt:-1] - expecting:textAlignment]; - [array removeObject:dataToRemove]; - GTMBindingUnitTestData *dataToAdd = - [GTMBindingUnitTestData testWithValue:[NSNumber numberWithInt:-1] - expecting:[NSNumber numberWithInt:7]]; - [array addObject:dataToAdd]; - } - } - return array; -} -@end - -@interface NSSearchField (GTMBindingUnitTestingAdditions) -@end - -@implementation NSSearchField (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - SInt32 major, minor, bugFix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugFix]; - if (major <= 10 && minor <= 5 && bugFix <= 6) { - // rdar://5851491 - Setting NSAlignmentBinding of search field to - // NSCenterTextAlignment broken - // Broken on 10.5.6 and below. - [array addObject:NSAlignmentBinding]; - } - // Not KVC Compliant - [array addObject:NSPredicateBinding]; - return array; -} - -@end - -@interface NSWindow (GTMBindingUnitTestingAdditions) -@end - -@implementation NSWindow (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - // Not KVC Compliant - [array addObject:NSContentWidthBinding]; - [array addObject:NSContentHeightBinding]; - for (int i = 0; i < 10; i++) { - [array addObject:[NSString stringWithFormat:@"displayPatternTitle%d", i]]; - } - return array; -} - -@end - -@interface NSBox (GTMBindingUnitTestingAdditions) -@end - -@implementation NSBox (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - // Not KVC Compliant - for (int i = 0; i < 10; i++) { - [array addObject:[NSString stringWithFormat:@"displayPatternTitle%d", i]]; - } - return array; -} - -@end - -@interface NSTableView (GTMBindingUnitTestingAdditions) -@end - -@implementation NSTableView (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - if ([GTMSystemVersion isBuildLessThanOrEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // rdar://6288332 - NSTableView does not respond to NSFontBinding - // Broken on 10.5, and SnowLeopard WWDC - [array addObject:NSFontBinding]; - } - // Not KVC Compliant - [array addObject:NSContentBinding]; - [array addObject:NSDoubleClickTargetBinding]; - [array addObject:NSDoubleClickArgumentBinding]; - [array addObject:NSSelectionIndexesBinding]; - return array; -} - -@end - -@interface NSTextView (GTMBindingUnitTestingAdditions) -@end - -@implementation NSTextView (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - if ([GTMSystemVersion isBuildLessThanOrEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - //rdar://5849335 - NSTextView only partially KVC compliant for key - // NSAttributedStringBinding - [array addObject:NSAttributedStringBinding]; - } - // Not KVC Compliant - [array addObject:NSDataBinding]; - [array addObject:NSValueURLBinding]; - [array addObject:NSValuePathBinding]; - return array; -} - -@end - -@interface NSTabView (GTMBindingUnitTestingAdditions) -@end - -@implementation NSTabView (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - if ([GTMSystemVersion isBuildLessThanOrEqualTo:kGTMSystemBuild10_6_0_WWDC]) { - // rdar://5849248 - NSTabView exposes binding with no value class - // for NSSelectedIdentifierBinding - [array addObject:NSSelectedIdentifierBinding]; - } - // Not KVC Compliant - [array addObject:NSSelectedIndexBinding]; - [array addObject:NSSelectedLabelBinding]; - return array; -} - -@end - -@interface NSButton (GTMBindingUnitTestingAdditions) -@end - -@implementation NSButton (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - // Not KVC Compliant - [array addObject:NSArgumentBinding]; - return array; -} - -@end - -@interface NSProgressIndicator (GTMBindingUnitTestingAdditions) -@end - -@implementation NSProgressIndicator (GTMBindingUnitTestingAdditions) - -- (NSMutableArray*)gtm_unitTestExposedBindingsToIgnore { - NSMutableArray *array = [super gtm_unitTestExposedBindingsToIgnore]; - // Not KVC Compliant - [array addObject:NSAnimateBinding]; - return array; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.h deleted file mode 100644 index 37eae5bf..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.h +++ /dev/null @@ -1,417 +0,0 @@ -// -// GTMNSObject+UnitTesting.h -// -// Utilities for doing advanced unittesting with objects. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import - -#if GTM_MACOS_SDK -#import -#elif GTM_IPHONE_SDK -#import -#endif - -#import "GTMSenTestCase.h" - -// Utility functions for GTMAssert* Macros. Don't use them directly -// but use the macros below instead -BOOL GTMIsObjectImageEqualToImageNamed(id object, - NSString *filename, - NSString **error); -BOOL GTMIsObjectStateEqualToStateNamed(id object, - NSString *filename, - NSString **error); - -// Fails when image of |a1| does not equal image in image file named |a2| -// -// Generates a failure when the unittest image of |a1| is not equal to the -// image stored in the image file named |a2|, or |a2| does not exist in the -// executable code's bundle. -// If |a2| does not exist in the executable code's bundle, we save a image -// representation of |a1| in the save directory with name |a2|. This can then -// be included in the bundle as the master to test against. -// If |a2| != |a1|, we save a image representation of |a1| in the save -// directory named |a2|_Failed and a file named |a2|_Failed_Diff showing the -// diff in red so that we can see what has changed. -// See pathForImageNamed to see how name is searched for. -// The save directory is specified by +gtm_setUnitTestSaveToDirectory, and is -// the desktop by default. -// Implemented as a macro to match the rest of the SenTest macros. -// -// Args: -// a1: The object to be checked. Must implement the -createUnitTestImage method. -// a2: The name of the image file to check against. -// Do not include the extension -// description: A format string as in the printf() function. -// Can be nil or an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -// -#define GTMAssertObjectImageEqualToImageNamed(a1, a2, description, ...) \ -do { \ - id a1Object = (a1); \ - NSString* a2String = (a2); \ - NSString *failString = nil; \ - BOOL isGood = GTMIsObjectImageEqualToImageNamed(a1Object, a2String, &failString); \ - if (!isGood) { \ - if (description) { \ - STFail(@"%@: %@", failString, STComposeString(description, ##__VA_ARGS__)); \ - } else { \ - STFail(@"%@", failString); \ - } \ - } \ -} while(0) - -// Fails when state of |a1| does not equal state in file |a2| -// -// Generates a failure when the unittest state of |a1| is not equal to the -// state stored in the state file named |a2|, or |a2| does not exist in the -// executable code's bundle. -// If |a2| does not exist in the executable code's bundle, we save a state -// representation of |a1| in the save directiry with name |a2|. This can then -// be included in the bundle as the master to test against. -// If |a2| != |a1|, we save a state representation of |a1| in the save -// directory with name |a2|_Failed so that we can compare the two files to see -// what has changed. -// The save directory is specified by +gtm_setUnitTestSaveToDirectory, and is -// the desktop by default. -// Implemented as a macro to match the rest of the SenTest macros. -// -// Args: -// a1: The object to be checked. Must implement the -createUnitTestImage method. -// a2: The name of the state file to check against. -// Do not include the extension -// description: A format string as in the printf() function. -// Can be nil or an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -// -#define GTMAssertObjectStateEqualToStateNamed(a1, a2, description, ...) \ -do { \ - id a1Object = (a1); \ - NSString* a2String = (a2); \ - NSString *failString = nil; \ - BOOL isGood = GTMIsObjectStateEqualToStateNamed(a1Object, a2String, &failString); \ - if (!isGood) { \ - if (description) { \ - STFail(@"%@: %@", failString, STComposeString(description, ##__VA_ARGS__)); \ - } else { \ - STFail(@"%@", failString); \ - } \ - } \ -} while(0); - -// test both GTMAssertObjectImageEqualToImageNamed and GTMAssertObjectStateEqualToStateNamed -// -// Combines the above two macros into a single ubermacro for comparing -// both state and image. When only the best will do... -#define GTMAssertObjectEqualToStateAndImageNamed(a1, a2, description, ...) \ -do { \ - GTMAssertObjectImageEqualToImageNamed(a1, a2, description, ##__VA_ARGS__); \ - GTMAssertObjectStateEqualToStateNamed(a1, a2, description, ##__VA_ARGS__); \ -} while (0) - -// Create a CGBitmapContextRef appropriate for using in creating a unit test -// image. If data is non-NULL, returns the buffer that the bitmap is -// using for it's underlying storage. You must free this buffer using -// free. If data is NULL, uses it's own internal storage. -// Defined as a C function instead of an obj-c method because you have to -// release the CGContextRef that is returned. -// -// Returns: -// an CGContextRef of the object. Caller must release - -CGContextRef GTMCreateUnitTestBitmapContextOfSizeWithData(CGSize size, - unsigned char **data); - -// GTMUnitTestingImaging protocol is for objects which need to save their -// image for using with the unit testing categories -@protocol GTMUnitTestingImaging -// Create a CGImageRef containing a representation suitable for use in -// comparing against a master image. -// -// Returns: -// an CGImageRef of the object. -- (CGImageRef)gtm_unitTestImage; -@end - -// GTMUnitTestingEncoding protocol is for objects which need to save their -// "state" for using with the unit testing categories -@protocol GTMUnitTestingEncoding -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. Encode data in the coder in the same -// manner that you would encode data in any other Keyed NSCoder subclass. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder; -@end - -// Category for saving and comparing object state and image for unit tests -// -// The GTMUnitTestAdditions category gives object the ability to store their -// state for use in unittesting in two different manners. -// 1) Objects can elect to save their "image" that we can compare at -// runtime to an image file to make sure that the representation hasn't -// changed. All views and Windows can save their image. In the case of Windows, -// they are "bluescreened" so that any transparent areas can be compared between -// machines. -// 2) Objects can elect to save their "state". State is the attributes that we -// want to verify when running unit tests. Applications, Windows, Views, -// Controls and Cells currently return a variety of state information. If you -// want to customize the state information that a particular object returns, you -// can do it via the GTMUnitTestingEncodedObjectNotification. Items that have -// delegates (Applications/Windows) can also have their delegates return state -// information if appropriate via the unitTestEncoderDidEncode:inCoder: delegate -// method. -// To compare state/image in your unit tests, you can use the three macros above -// GTMAssertObjectStateEqualToStateNamed, GTMAssertObjectImageEqualToImageNamed and -// GTMAssertObjectEqualToStateAndImageNamed. -@interface NSObject (GTMUnitTestingAdditions) -// Allows you to control where the unit test utilities save any files -// (image or state) that they create on your behalf. By default they -// will save to the desktop. -+ (void)gtm_setUnitTestSaveToDirectory:(NSString*)path; -+ (NSString *)gtm_getUnitTestSaveToDirectory; - -// Checks to see that system settings are valid for doing an image comparison. -// Most of these are set by our unit test app. See the unit test app main.m -// for details. -// -// Returns: -// YES if we can do image comparisons for this object type. -- (BOOL)gtm_areSystemSettingsValidForDoingImage; - -// Return the type of image to work with. Only valid types on the iPhone -// are kUTTypeJPEG and kUTTypePNG. MacOS supports several more. -- (CFStringRef)gtm_imageUTI; - -// Return the extension to be used for saving unittest images -// -// Returns -// An extension (e.g. "png") -- (NSString*)gtm_imageExtension; - -// Return image data in the format expected for gtm_imageExtension -// So for a "png" extension I would expect "png" data -// -// Returns -// NSData for image -- (NSData*)gtm_imageDataForImage:(CGImageRef)image; - -// Save the unitTestImage to a image file with name -// |name|.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension -// in the save folder (desktop by default) -// -// Args: -// name: The name for the image file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToImageNamed:(NSString*)name; - -// Save unitTestImage of |self| to an image file at path |path|. -// All non-drawn areas will be transparent. -// -// Args: -// name: The name for the image file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToImageAt:(NSString*)path; - -// Compares unitTestImage of |self| to the image located at |path| -// -// Args: -// path: the path to the image file you want to compare against. -// If diff is non-nil, it will contain an auto-released diff of the images. -// -// Returns: -// YES if they are equal, NO is they are not -// If diff is non-nil, it will contain a diff of the images. Must -// be released by caller. -// -- (BOOL)gtm_compareWithImageAt:(NSString*)path diffImage:(CGImageRef*)diff; - -// Find the path for a image by name in your bundle. -// Searches for the following: -// "name.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersionBugfix.arch.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.extension" -// "name.OSVersionMajor.OSVersionMinor.arch.extension" -// "name.arch.OSVersionMajor.extension" -// "name.OSVersionMajor.arch.extension" -// "name.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension" -// "name.OSVersionMajor.OSVersionMinorextension" -// "name.OSVersionMajor.extension" -// "name.extension" -// Do not include the extension on your name. -// -// Args: -// name: The name for the image file you would like to find. -// -// Returns: -// the path if the image exists in your bundle -// or nil if no image to be found -// -- (NSString *)gtm_pathForImageNamed:(NSString*)name; - -// Generates a CGImageRef from the image at |path| -// Args: -// path: The path to the image. -// -// Returns: -// An autoreleased CGImageRef own, or nil if no image at path -- (CGImageRef)gtm_imageWithContentsOfFile:(NSString*)path; - -// Generates a path for a image in the save directory, which is desktop -// by default. -// Path will be: -// SaveDir/|name|.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension -// -// Args: -// name: The name for the image file you would like to generate a path for. -// -// Returns: -// the path -// -- (NSString *)gtm_saveToPathForImageNamed:(NSString*)name; - -// Gives us a representation of unitTestImage of |self|. -// -// Returns: -// a representation if successful -// nil if failed -// -- (NSData *)gtm_imageRepresentation; - -// Return the extension to be used for saving unittest states -// -// Returns -// An extension (e.g. "gtmUTState") -- (NSString*)gtm_stateExtension; - -// Save the encoded unit test state to a state file with name -// |name|.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension -// in the save folder (desktop by default) -// -// Args: -// name: The name for the state file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToStateNamed:(NSString*)name; - -// Save encoded unit test state of |self| to a state file at path |path|. -// -// Args: -// name: The name for the state file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToStateAt:(NSString*)path; - -// Compares encoded unit test state of |self| to the state file located at |path| -// -// Args: -// path: the path to the state file you want to compare against. -// -// Returns: -// YES if they are equal, NO is they are not -// -- (BOOL)gtm_compareWithStateAt:(NSString*)path; - - -// Find the path for a state by name in your bundle. -// Searches for: -// "name.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersionBugfix.arch.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.extension" -// "name.OSVersionMajor.OSVersionMinor.arch.extension" -// "name.arch.OSVersionMajor.extension" -// "name.OSVersionMajor.arch.extension" -// "name.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension" -// "name.OSVersionMajor.OSVersionMinor.extension" -// "name.OSVersionMajor.extension" -// "name.extension" -// Do not include the extension on your name. -// -// Args: -// name: The name for the state file you would like to find. -// -// Returns: -// the path if the state exists in your bundle -// or nil if no state to be found -// -- (NSString *)gtm_pathForStateNamed:(NSString*)name; - -// Generates a path for a state in the save directory, which is desktop -// by default. -// Path will be: -// SaveDir/|name|.arch.OSVersionMajor.OSVersionMinor.OSVersionBugfix.extension -// -// Args: -// name: The name for the state file you would like to generate a path for. -// -// Returns: -// the path -// -- (NSString *)gtm_saveToPathForStateNamed:(NSString*)name; - -// Gives us the encoded unit test state for |self| -// -// Returns: -// the encoded state if successful -// nil if failed -// -- (NSDictionary *)gtm_stateRepresentation; - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. Encode data in the coder in the same -// manner that you would encode data in any other Keyed NSCoder subclass. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder; -@end - -// Informal protocol for delegates that wanst to be able to add state info -// when state info is collected for their "owned" objects -@interface NSObject (GTMUnitTestingEncodingAdditions) -// Delegate function for unit test objects that have delegates. Delegates have -// the option of encoding more data into the coder to store their state for -// unittest usage. -- (void)gtm_unitTestEncoderWillEncode:(id)sender inCoder:(NSCoder*)inCoder; -@end - -// Whenever an object is encoded by the unit test encoder, it send out a -// notification so that objects who want to add data to the encoded objects unit -// test state can do so. The Coder will be in the userInfo dictionary for the -// notification under the GTMUnitTestingEncoderKey key. -GTM_EXTERN NSString *const GTMUnitTestingEncodedObjectNotification; - -// Key for finding the encoder in the userInfo dictionary for -// GTMUnitTestingEncodedObjectNotification notifications. -GTM_EXTERN NSString *const GTMUnitTestingEncoderKey; diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.m deleted file mode 100644 index cc6a7ea4..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMNSObject+UnitTesting.m +++ /dev/null @@ -1,982 +0,0 @@ -// -// GTMNSObject+UnitTesting.m -// -// An informal protocol for doing advanced unittesting with objects. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMNSObject+UnitTesting.h" -#import "GTMSystemVersion.h" -#import "GTMGarbageCollection.h" - -#if GTM_IPHONE_SDK -#import -#else -#import -#endif - -NSString *const GTMUnitTestingEncodedObjectNotification - = @"GTMUnitTestingEncodedObjectNotification"; -NSString *const GTMUnitTestingEncoderKey = @"GTMUnitTestingEncoderKey"; - -#if GTM_IPHONE_SDK -// No UTIs on iPhone. Only two we need. -const CFStringRef kUTTypePNG = CFSTR("public.png"); -const CFStringRef kUTTypeJPEG = CFSTR("public.jpeg"); -#endif - -// This class exists so that we can locate our bundle using [NSBundle -// bundleForClass:]. We don't use [NSBundle mainBundle] because when we are -// being run as a unit test, we aren't the mainBundle -@interface GTMUnitTestingAdditionsBundleFinder : NSObject { - // Nothing here -} -// or here -@end - -@implementation GTMUnitTestingAdditionsBundleFinder -// Nothing here. We're just interested in the name for finding our bundle. -@end - -BOOL GTMIsObjectImageEqualToImageNamed(id object, - NSString* filename, - NSString **error) { - NSString *failString = nil; - if (error) { - *error = nil; - } - BOOL isGood = [object respondsToSelector:@selector(gtm_unitTestImage)]; - if (isGood) { - if ([object gtm_areSystemSettingsValidForDoingImage]) { - NSString *aPath = [object gtm_pathForImageNamed:filename]; - CGImageRef diff = nil; - isGood = aPath != nil; - if (isGood) { - isGood = [object gtm_compareWithImageAt:aPath diffImage:&diff]; - } - if (!isGood) { - if (aPath) { - filename = [filename stringByAppendingString:@"_Failed"]; - } - BOOL aSaved = [object gtm_saveToImageNamed:filename]; - NSString *fileNameWithExtension - = [NSString stringWithFormat:@"%@.%@", - filename, [object gtm_imageExtension]]; - NSString *fullSavePath = [object gtm_saveToPathForImageNamed:filename]; - if (NO == aSaved) { - if (!aPath) { - failString = [NSString stringWithFormat:@"File %@ did not exist in " - @"bundle. Tried to save as %@ and failed.", - fileNameWithExtension, fullSavePath]; - } else { - failString = [NSString stringWithFormat:@"Object image different " - @"than file %@. Tried to save as %@ and failed.", - aPath, fullSavePath]; - } - } else { - if (!aPath) { - failString = [NSString stringWithFormat:@"File %@ did not exist in " - @" bundle. Saved to %@", fileNameWithExtension, - fullSavePath]; - } else { - NSString *diffPath = [filename stringByAppendingString:@"_Diff"]; - diffPath = [object gtm_saveToPathForImageNamed:diffPath]; - NSData *data = nil; - if (diff) { - data = [object gtm_imageDataForImage:diff]; - } - if ([data writeToFile:diffPath atomically:YES]) { - failString = [NSString stringWithFormat:@"Object image different " - @"than file %@. Saved image to %@. " - @"Saved diff to %@", - aPath, fullSavePath, diffPath]; - } else { - failString = [NSString stringWithFormat:@"Object image different " - @"than file %@. Saved image to %@. Unable to save " - @"diff. Most likely the image and diff are " - @"different sizes.", - aPath, fullSavePath]; - } - } - } - } - CGImageRelease(diff); - } else { - failString = @"systemSettings not valid for taking image"; // COV_NF_LINE - } - } else { - failString = @"Object does not conform to GTMUnitTestingImaging protocol"; - } - if (error) { - *error = failString; - } - return isGood; -} - -BOOL GTMIsObjectStateEqualToStateNamed(id object, - NSString* filename, - NSString **error) { - NSString *failString = nil; - if (error) { - *error = nil; - } - BOOL isGood = [object conformsToProtocol:@protocol(GTMUnitTestingEncoding)]; - if (isGood) { - NSString *aPath = [object gtm_pathForStateNamed:filename]; - isGood = aPath != nil; - if (isGood) { - isGood = [object gtm_compareWithStateAt:aPath]; - } - if (!isGood) { - if (aPath) { - filename = [filename stringByAppendingString:@"_Failed"]; - } - BOOL aSaved = [object gtm_saveToStateNamed:filename]; - NSString *fileNameWithExtension = [NSString stringWithFormat:@"%@.%@", - filename, [object gtm_stateExtension]]; - NSString *fullSavePath = [object gtm_saveToPathForStateNamed:filename]; - if (NO == aSaved) { - if (!aPath) { - failString = [NSString stringWithFormat:@"File %@ did not exist in " - @"bundle. Tried to save as %@ and failed.", - fileNameWithExtension, fullSavePath]; - } else { - failString = [NSString stringWithFormat:@"Object state different " - @"than file %@. Tried to save as %@ and failed.", - aPath, fullSavePath]; - } - } else { - if (!aPath) { - failString = [NSString stringWithFormat:@"File %@ did not exist in " - @ "bundle. Saved to %@", fileNameWithExtension, - fullSavePath]; - } else { - failString = [NSString stringWithFormat:@"Object state different " - @"than file %@. Saved to %@", aPath, fullSavePath]; - } - } - } - } else { - failString = @"Object does not conform to GTMUnitTestingEncoding protocol"; - } - if (error) { - *error = failString; - } - return isGood; -} - -CGContextRef GTMCreateUnitTestBitmapContextOfSizeWithData(CGSize size, - unsigned char **data) { - CGContextRef context = NULL; - size_t height = size.height; - size_t width = size.width; - size_t bytesPerRow = width * 4; - size_t bitsPerComponent = 8; - CGColorSpaceRef cs = NULL; -#if GTM_IPHONE_SDK - cs = CGColorSpaceCreateDeviceRGB(); -#else - cs = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); -#endif - _GTMDevAssert(cs, @"Couldn't create colorspace"); - CGBitmapInfo info - = kCGImageAlphaPremultipliedLast | kCGBitmapByteOrderDefault; - if (data) { - *data = (unsigned char*)calloc(bytesPerRow, height); - _GTMDevAssert(*data, @"Couldn't create bitmap"); - } - context = CGBitmapContextCreate(data ? *data : NULL, width, height, - bitsPerComponent, bytesPerRow, cs, info); - _GTMDevAssert(context, @"Couldn't create an context"); - if (!data) { - CGContextClearRect(context, CGRectMake(0, 0, size.width, size.height)); - } - CGContextSetRenderingIntent(context, kCGRenderingIntentRelativeColorimetric); - CGContextSetInterpolationQuality(context, kCGInterpolationNone); - CGContextSetShouldAntialias(context, NO); - CGContextSetAllowsAntialiasing(context, NO); - CGContextSetShouldSmoothFonts(context, NO); - CGColorSpaceRelease(cs); - return context; -} - -@interface NSObject (GTMUnitTestingAdditionsPrivate) -/// Find the path for a file named name.extension in your bundle. -// Searches for the following: -// "name.extension", -// "name.arch.extension", -// "name.arch.OSVersionMajor.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.extension" -// "name.arch.OSVersionMajor.extension" -// "name.OSVersionMajor.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.arch.extension" -// "name.OSVersionMajor.extension" -// "name.OSVersionMajor.OSVersionMinor.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.extension" -// Do not include the ".extension" extension on your name. -// -// Args: -// name: The name for the file you would like to find. -// extension: the extension for the file you would like to find -// -// Returns: -// the path if the file exists in your bundle -// or nil if no file is found -// -- (NSString *)gtm_pathForFileNamed:(NSString*)name - extension:(NSString*)extension; -- (NSString *)gtm_saveToPathForFileNamed:(NSString*)name - extension:(NSString*)extension; -- (CGImageRef)gtm_unitTestImage; -// Returns nil if there is no override -- (NSString *)gtm_getOverrideDefaultUnitTestSaveToDirectory; -@end - -// This is a keyed coder for storing unit test state data. It is used only by -// the GTMUnitTestingAdditions category. Most of the work is done in -// encodeObject:forKey:. -@interface GTMUnitTestingKeyedCoder : NSCoder { - NSMutableDictionary *dictionary_; // storage for data (STRONG) -} - -// get the data stored in coder. -// -// Returns: -// NSDictionary with currently stored data. -- (NSDictionary*)dictionary; -@end - -// Small utility function for checking to see if a is b +/- 1. -GTM_INLINE BOOL almostEqual(unsigned char a, unsigned char b) { - unsigned char diff = a > b ? a - b : b - a; - BOOL notEqual = diff < 2; - return notEqual; -} - -@implementation GTMUnitTestingKeyedCoder - -// Set up storage for coder. Stores type and version. -// Version 1 -// -// Returns: -// self -- (id)init { - self = [super init]; - if (self != nil) { - dictionary_ = [[NSMutableDictionary alloc] initWithCapacity:2]; - [dictionary_ setObject:@"GTMUnitTestingArchive" forKey:@"$GTMArchive"]; - - // Version number can be changed here. - [dictionary_ setObject:[NSNumber numberWithInt:1] forKey:@"$GTMVersion"]; - } - return self; -} - -// Standard dealloc -- (void)dealloc { - [dictionary_ release]; - [super dealloc]; -} - -// Utility function for checking for a key value. We don't want duplicate keys -// in any of our dictionaries as we may be writing over data stored by previous -// objects. -// -// Arguments: -// key - key to check for in dictionary -- (void)checkForKey:(NSString*)key { - _GTMDevAssert(![dictionary_ objectForKey:key], - @"Key already exists for %@", key); -} - -// Key routine for the encoder. We store objects in our dictionary based on -// their key. As we encode objects we send out notifications to let other -// classes doing tests add their specific data to the base types. If we can't -// encode the object (it doesn't support gtm_unitTestEncodeState) and we don't -// get any info back from the notifier, we attempt to store it's description. -// -// Arguments: -// objv - object to be encoded -// key - key to encode it with -// -- (void)encodeObject:(id)objv forKey:(NSString *)key { - // Sanity checks - if (!objv) return; - [self checkForKey:key]; - - // Set up a new dictionary for the current object - NSMutableDictionary *curDictionary = dictionary_; - dictionary_ = [[NSMutableDictionary alloc] initWithCapacity:0]; - - // If objv responds to gtm_unitTestEncodeState get it to record - // its data. - if ([objv respondsToSelector:@selector(gtm_unitTestEncodeState:)]) { - [objv gtm_unitTestEncodeState:self]; - } - - // We then send out a notification to let other folks - // add data for this object - NSDictionary *notificationDict - = [NSDictionary dictionaryWithObject:self forKey:GTMUnitTestingEncoderKey]; - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc postNotificationName:GTMUnitTestingEncodedObjectNotification - object:objv - userInfo:notificationDict]; - - // If we got anything from the object, or from the notification, store it in - // our dictionary. Otherwise store the description. - if ([dictionary_ count] > 0) { - [curDictionary setObject:dictionary_ forKey:key]; - } else { - NSString *description = [objv description]; - // If description has a pointer value in it, we don't want to store it - // as the pointer value can change from run to run - if (description && [description rangeOfString:@"0x"].length == 0) { - [curDictionary setObject:description forKey:key]; - } else { - _GTMDevAssert(NO, @"Unable to encode forKey: %@", key); // COV_NF_LINE - } - } - [dictionary_ release]; - dictionary_ = curDictionary; -} - -// Basic encoding methods for POD types. -// -// Arguments: -// *v - value to encode -// key - key to encode it in - -- (void)encodeBool:(BOOL)boolv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithBool:boolv] forKey:key]; -} - -- (void)encodeInt:(int)intv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithInt:intv] forKey:key]; -} - -- (void)encodeInt32:(int32_t)intv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithLong:intv] forKey:key]; -} - -- (void)encodeInt64:(int64_t)intv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithLongLong:intv] forKey:key]; -} - -- (void)encodeFloat:(float)realv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithFloat:realv] forKey:key]; -} - -- (void)encodeDouble:(double)realv forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSNumber numberWithDouble:realv] forKey:key]; -} - -- (void)encodeBytes:(const uint8_t *)bytesp - length:(unsigned)lenv - forKey:(NSString *)key { - [self checkForKey:key]; - [dictionary_ setObject:[NSData dataWithBytes:bytesp - length:lenv] - forKey:key]; -} - -// Get our storage back as an NSDictionary -// -// Returns: -// NSDictionary containing our encoded info --(NSDictionary*)dictionary { - return [[dictionary_ retain] autorelease]; -} - -@end - -static NSString *gGTMUnitTestSaveToDirectory = nil; - -@implementation NSObject (GTMUnitTestingAdditions) - -+ (void)gtm_setUnitTestSaveToDirectory:(NSString*)path { - @synchronized([self class]) { - [gGTMUnitTestSaveToDirectory autorelease]; - gGTMUnitTestSaveToDirectory = [path copy]; - } -} - -+ (NSString *)gtm_getUnitTestSaveToDirectory { - NSString *result = nil; - @synchronized([self class]) { - if (!gGTMUnitTestSaveToDirectory) { -#if GTM_IPHONE_SDK - // Developer build, use their home directory Desktop. - gGTMUnitTestSaveToDirectory - = [[[[[NSHomeDirectory() stringByDeletingLastPathComponent] - stringByDeletingLastPathComponent] - stringByDeletingLastPathComponent] - stringByDeletingLastPathComponent] - stringByAppendingPathComponent:@"Desktop"]; -#else - NSArray *desktopDirs - = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, - NSUserDomainMask, - YES); - gGTMUnitTestSaveToDirectory = [desktopDirs objectAtIndex:0]; -#endif - // Did we get overridden? - NSString *override = [self gtm_getOverrideDefaultUnitTestSaveToDirectory]; - if (override) { - gGTMUnitTestSaveToDirectory = override; - } - [gGTMUnitTestSaveToDirectory retain]; - } - result = gGTMUnitTestSaveToDirectory; - } - - return result; -} - -// Return nil if there is no override -- (NSString *)gtm_getOverrideDefaultUnitTestSaveToDirectory { - NSString *result = nil; - - // If we have an environment variable that ends in "BUILD_NUMBER" odds are - // we're on an automated build system, so use the build products dir as an - // override instead of writing on the desktop. - NSDictionary *env = [[NSProcessInfo processInfo] environment]; - NSString *key; - GTM_FOREACH_KEY(key, env) { - if ([key hasSuffix:@"BUILD_NUMBER"]) { - break; - } - } - if (key) { - result = [env objectForKey:@"BUILT_PRODUCTS_DIR"]; - } - - if (result && [result length] == 0) { - result = nil; - } - return result; -} - -/// Find the path for a file named name.extension in your bundle. -// Searches for the following: -// "name.extension", -// "name.arch.extension", -// "name.arch.OSVersionMajor.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.extension" -// "name.arch.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.extension" -// "name.arch.OSVersionMajor.extension" -// "name.OSVersionMajor.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.arch.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.arch.extension" -// "name.OSVersionMajor.extension" -// "name.OSVersionMajor.OSVersionMinor.extension" -// "name.OSVersionMajor.OSVersionMinor.OSVersion.bugfix.extension" -// Do not include the ".extension" extension on your name. -// -// Args: -// name: The name for the file you would like to find. -// extension: the extension for the file you would like to find -// -// Returns: -// the path if the file exists in your bundle -// or nil if no file is found -// -- (NSString *)gtm_pathForFileNamed:(NSString*)name - extension:(NSString*)extension { - NSString *thePath = nil; - Class bundleClass = [GTMUnitTestingAdditionsBundleFinder class]; - NSBundle *myBundle = [NSBundle bundleForClass:bundleClass]; - _GTMDevAssert(myBundle, - @"Couldn't find bundle for class: %@ searching for file:%@.%@", - NSStringFromClass(bundleClass), name, extension); - // System Version - SInt32 major, minor, bugFix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugFix]; - NSString *systemVersions[4]; - systemVersions[0] = [NSString stringWithFormat:@".%d.%d.%d", - major, minor, bugFix]; - systemVersions[1] = [NSString stringWithFormat:@".%d.%d", major, minor]; - systemVersions[2] = [NSString stringWithFormat:@".%d", major]; - systemVersions[3] = @""; - NSString *extensions[2]; - extensions[0] - = [NSString stringWithFormat:@".%@", - [GTMSystemVersion runtimeArchitecture]]; - extensions[1] = @""; - - size_t i, j; - // Note that we are searching for the most exact match first. - for (i = 0; - !thePath && i < sizeof(extensions) / sizeof(*extensions); - ++i) { - for (j = 0; - !thePath && j < sizeof(systemVersions) / sizeof(*systemVersions); - j++) { - NSString *fullName = [NSString stringWithFormat:@"%@%@%@", - name, extensions[i], systemVersions[j]]; - thePath = [myBundle pathForResource:fullName ofType:extension]; - if (thePath) break; - fullName = [NSString stringWithFormat:@"%@%@%@", - name, systemVersions[j], extensions[i]]; - thePath = [myBundle pathForResource:fullName ofType:extension]; - } - } - - return thePath; -} - -- (NSString *)gtm_saveToPathForFileNamed:(NSString*)name - extension:(NSString*)extension { - NSString *systemArchitecture = [GTMSystemVersion runtimeArchitecture]; - - SInt32 major, minor, bugFix; - [GTMSystemVersion getMajor:&major minor:&minor bugFix:&bugFix]; - - NSString *fullName = [NSString stringWithFormat:@"%@.%@.%d.%d.%d", - name, systemArchitecture, major, minor, bugFix]; - - NSString *basePath = [[self class] gtm_getUnitTestSaveToDirectory]; - return [[basePath stringByAppendingPathComponent:fullName] - stringByAppendingPathExtension:extension]; -} - -#pragma mark UnitTestImage - -// Checks to see that system settings are valid for doing an image comparison. -// To be overridden by subclasses. -// Returns: -// YES if we can do image comparisons for this object type. -- (BOOL)gtm_areSystemSettingsValidForDoingImage { - return YES; -} - -- (CFStringRef)gtm_imageUTI { -#if GTM_IPHONE_SDK - return kUTTypePNG; -#else - // Currently can't use PNG on Leopard. (10.5.2) - // Radar:5844618 PNG importer/exporter in ImageIO is lossy - return kUTTypeTIFF; -#endif -} - -// Return the extension to be used for saving unittest images -// -// Returns -// An extension (e.g. "png") -- (NSString*)gtm_imageExtension { - CFStringRef uti = [self gtm_imageUTI]; -#if GTM_IPHONE_SDK - if (CFEqual(uti, kUTTypePNG)) { - return @"png"; - } else if (CFEqual(uti, kUTTypeJPEG)) { - return @"jpg"; - } else { - _GTMDevAssert(NO, @"Illegal UTI for iPhone"); - } - return nil; -#else - CFStringRef extension - = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension); - _GTMDevAssert(extension, @"No extension for uti: %@", uti); - - return GTMCFAutorelease(extension); -#endif -} - -// Return image data in the format expected for gtm_imageExtension -// So for a "png" extension I would expect "png" data -// -// Returns -// NSData for image -- (NSData*)gtm_imageDataForImage:(CGImageRef)image { - NSData *data = nil; -#if GTM_IPHONE_SDK - // iPhone support - UIImage *uiImage = [UIImage imageWithCGImage:image]; - CFStringRef uti = [self gtm_imageUTI]; - if (CFEqual(uti, kUTTypePNG)) { - data = UIImagePNGRepresentation(uiImage); - } else if (CFEqual(uti, kUTTypeJPEG)) { - data = UIImageJPEGRepresentation(uiImage, 1.0f); - } else { - _GTMDevAssert(NO, @"Illegal UTI for iPhone"); - } -#else - data = [NSMutableData data]; - CGImageDestinationRef dest - = CGImageDestinationCreateWithData((CFMutableDataRef)data, - [self gtm_imageUTI], - 1, - NULL); - // LZW Compression for TIFF - NSDictionary *tiffDict - = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:NSTIFFCompressionLZW], - (const NSString*)kCGImagePropertyTIFFCompression, - nil]; - NSDictionary *destProps - = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithFloat:1.0f], - (const NSString*)kCGImageDestinationLossyCompressionQuality, - tiffDict, - (const NSString*)kCGImagePropertyTIFFDictionary, - nil]; - CGImageDestinationAddImage(dest, image, (CFDictionaryRef)destProps); - CGImageDestinationFinalize(dest); - CFRelease(dest); -#endif - return data; - -} - -// Save the unitTestImage to an image file with name |name| at -// ~/Desktop/|name|.extension. -// -// Note: When running under Pulse automation output is redirected to the -// Pulse base directory. -// -// Args: -// name: The name for the image file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToImageNamed:(NSString*)name { - NSString *newPath = [self gtm_saveToPathForImageNamed:name]; - return [self gtm_saveToImageAt:newPath]; -} - -// Save unitTestImage of |self| to an image file at path |path|. -// -// Args: -// name: The name for the image file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToImageAt:(NSString*)path { - if (!path) return NO; - NSData *data = [self gtm_imageRepresentation]; - return [data writeToFile:path atomically:YES]; -} - -// Generates a CGImageRef from the image at |path| -// Args: -// path: The path to the image. -// -// Returns: -// A CGImageRef that you own, or nil if no image at path -- (CGImageRef)gtm_imageWithContentsOfFile:(NSString*)path { - CGImageRef imageRef = nil; -#if GTM_IPHONE_SDK - UIImage *image = [UIImage imageWithContentsOfFile:path]; - if (image) { - imageRef = CGImageRetain(image.CGImage); - } -#else - CFURLRef url = CFURLCreateWithFileSystemPath(NULL, (CFStringRef)path, - kCFURLPOSIXPathStyle, NO); - if (url) { - CGImageSourceRef imageSource = CGImageSourceCreateWithURL(url, NULL); - CFRelease(url); - if (imageSource) { - imageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL); - CFRelease(imageSource); - } - } -#endif - return (CGImageRef)GTMCFAutorelease(imageRef); -} - -/// Compares unitTestImage of |self| to the image located at |path| -// -// Args: -// path: the path to the image file you want to compare against. -// If diff is non-nil, it will contain an auto-released diff of the images. -// -// Returns: -// YES if they are equal, NO is they are not -// If diff is non-nil, it will contain an auto-released diff of the images. -// -- (BOOL)gtm_compareWithImageAt:(NSString*)path diffImage:(CGImageRef*)diff { - BOOL answer = NO; - if (diff) { - *diff = nil; - } - CGImageRef fileRep = [self gtm_imageWithContentsOfFile:path]; - _GTMDevAssert(fileRep, @"Unable to create imagerep from %@", path); - - CGImageRef imageRep = [self gtm_unitTestImage]; - _GTMDevAssert(imageRep, @"Unable to create imagerep for %@", self); - - size_t fileHeight = CGImageGetHeight(fileRep); - size_t fileWidth = CGImageGetWidth(fileRep); - size_t imageHeight = CGImageGetHeight(imageRep); - size_t imageWidth = CGImageGetWidth(imageRep); - if (fileHeight == imageHeight && fileWidth == imageWidth) { - // if all the sizes are equal, run through the bytes and compare - // them for equality. - // Do an initial fast check, if this fails and the caller wants a - // diff, we'll do the slow path and create the diff. The diff path - // could be optimized, but probably not necessary at this point. - answer = YES; - - CGSize imageSize = CGSizeMake(fileWidth, fileHeight); - CGRect imageRect = CGRectMake(0, 0, fileWidth, fileHeight); - unsigned char *fileData; - unsigned char *imageData; - CGContextRef fileContext - = GTMCreateUnitTestBitmapContextOfSizeWithData(imageSize, &fileData); - _GTMDevAssert(fileContext, @"Unable to create filecontext"); - CGContextDrawImage(fileContext, imageRect, fileRep); - CGContextRef imageContext - = GTMCreateUnitTestBitmapContextOfSizeWithData(imageSize, &imageData); - _GTMDevAssert(imageContext, @"Unable to create imageContext"); - CGContextDrawImage(imageContext, imageRect, imageRep); - - size_t fileBytesPerRow = CGBitmapContextGetBytesPerRow(fileContext); - size_t imageBytesPerRow = CGBitmapContextGetBytesPerRow(imageContext); - size_t row, col; - - _GTMDevAssert(imageWidth * 4 <= imageBytesPerRow, - @"We expect image data to be 32bit RGBA"); - - for (row = 0; row < fileHeight && answer; row++) { - answer = memcmp(fileData + fileBytesPerRow * row, - imageData + imageBytesPerRow * row, - imageWidth * 4) == 0; - } - if (!answer && diff) { - answer = YES; - unsigned char *diffData; - CGContextRef diffContext - = GTMCreateUnitTestBitmapContextOfSizeWithData(imageSize, &diffData); - _GTMDevAssert(diffContext, @"Can't make diff context"); - size_t diffRowBytes = CGBitmapContextGetBytesPerRow(diffContext); - for (row = 0; row < imageHeight; row++) { - uint32_t *imageRow = (uint32_t*)(imageData + imageBytesPerRow * row); - uint32_t *fileRow = (uint32_t*)(fileData + fileBytesPerRow * row); - uint32_t* diffRow = (uint32_t*)(diffData + diffRowBytes * row); - for (col = 0; col < imageWidth; col++) { - uint32_t imageColor = imageRow[col]; - uint32_t fileColor = fileRow[col]; - - unsigned char imageAlpha = imageColor & 0xF; - unsigned char imageBlue = imageColor >> 8 & 0xF; - unsigned char imageGreen = imageColor >> 16 & 0xF; - unsigned char imageRed = imageColor >> 24 & 0xF; - unsigned char fileAlpha = fileColor & 0xF; - unsigned char fileBlue = fileColor >> 8 & 0xF; - unsigned char fileGreen = fileColor >> 16 & 0xF; - unsigned char fileRed = fileColor >> 24 & 0xF; - - // Check to see if color is almost right. - // No matter how hard I've tried, I've still gotten occasionally - // screwed over by colorspaces not mapping correctly, and small - // sampling errors coming in. This appears to work for most cases. - // Almost equal is defined to check within 1% on all components. - BOOL equal = almostEqual(imageRed, fileRed) && - almostEqual(imageGreen, fileGreen) && - almostEqual(imageBlue, fileBlue) && - almostEqual(imageAlpha, fileAlpha); - answer &= equal; - if (diff) { - uint32_t newColor; - if (equal) { - newColor = (((uint32_t)imageRed) << 24) + - (((uint32_t)imageGreen) << 16) + - (((uint32_t)imageBlue) << 8) + - (((uint32_t)imageAlpha) / 2); - } else { - newColor = 0xFF0000FF; - } - diffRow[col] = newColor; - } - } - } - *diff = CGBitmapContextCreateImage(diffContext); - free(diffData); - CFRelease(diffContext); - } - free(fileData); - CFRelease(fileContext); - free(imageData); - CFRelease(imageContext); - } - return answer; -} - -// Find the path for an image by name in your bundle. -// Do not include the extension on your name. -// -// Args: -// name: The name for the image file you would like to find. -// -// Returns: -// the path if the image exists in your bundle -// or nil if no image to be found -// -- (NSString *)gtm_pathForImageNamed:(NSString*)name { - return [self gtm_pathForFileNamed:name - extension:[self gtm_imageExtension]]; -} - -- (NSString *)gtm_saveToPathForImageNamed:(NSString*)name { - return [self gtm_saveToPathForFileNamed:name - extension:[self gtm_imageExtension]]; -} - -// Gives us a representation of unitTestImage of |self|. -// -// Returns: -// a representation of image if successful -// nil if failed -// -- (NSData *)gtm_imageRepresentation { - CGImageRef imageRep = [self gtm_unitTestImage]; - NSData *data = [self gtm_imageDataForImage:imageRep]; - _GTMDevAssert(data, @"unable to create %@ from %@", - [self gtm_imageExtension], self); - return data; -} - -#pragma mark UnitTestState - -// Return the extension to be used for saving unittest states -// -// Returns -// An extension (e.g. "gtmUTState") -- (NSString*)gtm_stateExtension { - return @"gtmUTState"; -} - -// Save the encoded unit test state to a state file with name |name| at -// ~/Desktop/|name|.extension. -// -// Note: When running under Pulse automation output is redirected to the -// Pulse base directory. -// -// Args: -// name: The name for the state file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToStateNamed:(NSString*)name { - NSString *newPath = [self gtm_saveToPathForStateNamed:name]; - return [self gtm_saveToStateAt:newPath]; -} - -// Save encoded unit test state of |self| to a state file at path |path|. -// -// Args: -// name: The name for the state file you would like saved. -// -// Returns: -// YES if the file was successfully saved. -// -- (BOOL)gtm_saveToStateAt:(NSString*)path { - if (!path) return NO; - NSDictionary *dictionary = [self gtm_stateRepresentation]; - return [dictionary writeToFile:path atomically:YES]; -} - -// Compares encoded unit test state of |self| to the state file located at -// |path| -// -// Args: -// path: the path to the state file you want to compare against. -// -// Returns: -// YES if they are equal, NO is they are not -// -- (BOOL)gtm_compareWithStateAt:(NSString*)path { - NSDictionary *masterDict = [NSDictionary dictionaryWithContentsOfFile:path]; - _GTMDevAssert(masterDict, @"Unable to create dictionary from %@", path); - NSDictionary *selfDict = [self gtm_stateRepresentation]; - return [selfDict isEqual: masterDict]; -} - -// Find the path for a state by name in your bundle. -// Do not include the extension. -// -// Args: -// name: The name for the state file you would like to find. -// -// Returns: -// the path if the state exists in your bundle -// or nil if no state to be found -// -- (NSString *)gtm_pathForStateNamed:(NSString*)name { - return [self gtm_pathForFileNamed:name extension:[self gtm_stateExtension]]; -} - -- (NSString *)gtm_saveToPathForStateNamed:(NSString*)name { - return [self gtm_saveToPathForFileNamed:name - extension:[self gtm_stateExtension]]; -} - -// Gives us the encoded unit test state |self| -// -// Returns: -// the encoded state if successful -// nil if failed -// -- (NSDictionary *)gtm_stateRepresentation { - NSDictionary *dictionary = nil; - if ([self conformsToProtocol:@protocol(GTMUnitTestingEncoding)]) { - id encoder = (id)self; - GTMUnitTestingKeyedCoder *archiver; - archiver = [[[GTMUnitTestingKeyedCoder alloc] init] autorelease]; - [encoder gtm_unitTestEncodeState:archiver]; - dictionary = [archiver dictionary]; - } - return dictionary; -} - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. Encode data in the coder in the same -// manner that you would encode data in any other Keyed NSCoder subclass. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - // All impls of gtm_unitTestEncodeState - // should be calling [super gtm_unitTestEncodeState] as their first action. - _GTMDevAssert([inCoder isKindOfClass:[GTMUnitTestingKeyedCoder class]], - @"Coder must be of kind GTMUnitTestingKeyedCoder"); - - // If the object has a delegate, give it a chance to respond - if ([self respondsToSelector:@selector(delegate)]) { - id delegate = [self performSelector:@selector(delegate)]; - if (delegate && - [delegate respondsToSelector:@selector(gtm_unitTestEncoderWillEncode:inCoder:)]) { - [delegate gtm_unitTestEncoderWillEncode:self inCoder:inCoder]; - } - } -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h deleted file mode 100644 index 1d355911..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h +++ /dev/null @@ -1,1004 +0,0 @@ -// -// GTMSenTestCase.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Portions of this file fall under the following license, marked with -// SENTE_BEGIN - SENTE_END -// -// Copyright (c) 1997-2005, Sen:te (Sente SA). All rights reserved. -// -// Use of this source code is governed by the following license: -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// (1) Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// (2) Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -// IN NO EVENT SHALL Sente SA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Note: this license is equivalent to the FreeBSD license. -// -// This notice may not be removed from this file. - -// Some extra test case macros that would have been convenient for SenTestingKit -// to provide. I didn't stick GTM in front of the Macro names, so that they would -// be easy to remember. - -#import "GTMDefines.h" - -#if (!GTM_IPHONE_SDK) -#import -#else -#import -NSString *STComposeString(NSString *, ...); -#endif - -// Generates a failure when a1 != noErr -// Args: -// a1: should be either an OSErr or an OSStatus -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNoErr(a1, description, ...) \ -do { \ - @try {\ - OSStatus a1value = (a1); \ - if (a1value != noErr) { \ - NSString *_expression = [NSString stringWithFormat:@"Expected noErr, got %ld for (%s)", a1value, #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == noErr fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 != a2 -// Args: -// a1: received value. Should be either an OSErr or an OSStatus -// a2: expected value. Should be either an OSErr or an OSStatus -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertErr(a1, a2, description, ...) \ -do { \ - @try {\ - OSStatus a1value = (a1); \ - OSStatus a2value = (a2); \ - if (a1value != a2value) { \ - NSString *_expression = [NSString stringWithFormat:@"Expected %s(%ld) but got %ld for (%s)", #a2, a2value, a1value, #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == (%s) fails", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -// Generates a failure when a1 is NULL -// Args: -// a1: should be a pointer (use STAssertNotNil for an object) -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotNULL(a1, description, ...) \ -do { \ - @try {\ - const void* a1value = (a1); \ - if (a1value == NULL) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) != NULL", #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != NULL fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not NULL -// Args: -// a1: should be a pointer (use STAssertNil for an object) -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNULL(a1, description, ...) \ -do { \ - @try {\ - const void* a1value = (a1); \ - if (a1value != NULL) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) == NULL", #a1]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == NULL fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is equal to a2. This test is for C scalars, -// structs and unions. -// Args: -// a1: argument 1 -// a2: argument 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEquals(a1, a2, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[@"Type mismatch -- " stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType:@encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType:@encode(__typeof__(a2))]; \ - if ([a1encoded isEqualToValue:a2encoded]) { \ - NSString *_expression = [NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is equal to a2. This test is for objects. -// Args: -// a1: argument 1. object. -// a2: argument 2. object. -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualObjects(a1, a2, desc, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if ( (@encode(__typeof__(a1value)) == @encode(id)) && \ - (@encode(__typeof__(a2value)) == @encode(id)) && \ - ![(id)a1value isEqual:(id)a2value] ) continue; \ - NSString *_expression = [NSString stringWithFormat:@"%s('%@') != %s('%@')", #a1, [a1 description], #a2, [a2 description]]; \ - if (desc) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(desc, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(desc, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not 'op' to a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertOperation(a1, a2, op, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[@"Type mismatch -- " stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - if (!(a1value op a2value)) { \ - double a1DoubleValue = a1value; \ - double a2DoubleValue = a2value; \ - NSString *_expression = [NSString stringWithFormat:@"%s (%lg) %s %s (%lg)", #a1, a1DoubleValue, #op, #a2, a2DoubleValue]; \ - if (description) { \ - _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ - } \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:_expression]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException \ - failureInRaise:[NSString stringWithFormat:@"(%s) %s (%s)", #a1, #op, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when a1 is not > a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertGreaterThan(a1, a2, description, ...) \ - STAssertOperation(a1, a2, >, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not >= a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertGreaterThanOrEqual(a1, a2, description, ...) \ - STAssertOperation(a1, a2, >=, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not < a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertLessThan(a1, a2, description, ...) \ - STAssertOperation(a1, a2, <, description, ##__VA_ARGS__) - -// Generates a failure when a1 is not <= a2. This test is for C scalars. -// Args: -// a1: argument 1 -// a2: argument 2 -// op: operation -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertLessThanOrEqual(a1, a2, description, ...) \ - STAssertOperation(a1, a2, <=, description, ##__VA_ARGS__) - -// Generates a failure when string a1 is not equal to string a2. This call -// differs from STAssertEqualObjects in that strings that are different in -// composition (precomposed vs decomposed) will compare equal if their final -// representation is equal. -// ex O + umlaut decomposed is the same as O + umlaut composed. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertEqualStrings(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if (a1value == a2value) continue; \ - if ([a1value isKindOfClass:[NSString class]] && \ - [a2value isKindOfClass:[NSString class]] && \ - [a1value compare:a2value options:0] == NSOrderedSame) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when string a1 is equal to string a2. This call -// differs from STAssertEqualObjects in that strings that are different in -// composition (precomposed vs decomposed) will compare equal if their final -// representation is equal. -// ex O + umlaut decomposed is the same as O + umlaut composed. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualStrings(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if ([a1value isKindOfClass:[NSString class]] && \ - [a2value isKindOfClass:[NSString class]] && \ - [a1value compare:a2value options:0] != NSOrderedSame) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when c-string a1 is not equal to c-string a2. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertEqualCStrings(a1, a2, description, ...) \ -do { \ - @try {\ - const char* a1value = (a1); \ - const char* a2value = (a2); \ - if (a1value == a2value) continue; \ - if (strcmp(a1value, a2value) == 0) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: [NSString stringWithUTF8String:a1value] \ - andObject: [NSString stringWithUTF8String:a2value] \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -// Generates a failure when c-string a1 is equal to c-string a2. -// Args: -// a1: string 1 -// a2: string 2 -// description: A format string as in the printf() function. Can be nil or -// an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -#define STAssertNotEqualCStrings(a1, a2, description, ...) \ -do { \ - @try {\ - const char* a1value = (a1); \ - const char* a2value = (a2); \ - if (strcmp(a1value, a2value) != 0) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: [NSString stringWithUTF8String:a1value] \ - andObject: [NSString stringWithUTF8String:a2value] \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -#if GTM_IPHONE_SDK - -// SENTE_BEGIN -/*" Generates a failure when !{ [a1 isEqualTo:a2] } is false - (or one is nil and the other is not). - _{a1 The object on the left.} - _{a2 The object on the right.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertEqualObjects(a1, a2, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - id a2value = (a2); \ - if (a1value == a2value) continue; \ - if ( (@encode(__typeof__(a1value)) == @encode(id)) && \ - (@encode(__typeof__(a2value)) == @encode(id)) && \ - [(id)a1value isEqual: (id)a2value] ) continue; \ - [self failWithException:[NSException failureInEqualityBetweenObject: a1value \ - andObject: a2value \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when a1 is not equal to a2. This test is for - C scalars, structs and unions. - _{a1 The argument on the left.} - _{a2 The argument on the right.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertEquals(a1, a2, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[@"Type mismatch -- " stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType: @encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType: @encode(__typeof__(a2))]; \ - if (![a1encoded isEqualToValue:a2encoded]) { \ - [self failWithException:[NSException failureInEqualityBetweenValue: a1encoded \ - andValue: a2encoded \ - withAccuracy: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - -#define STAbsoluteDifference(left,right) (MAX(left,right)-MIN(left,right)) - - -/*" Generates a failure when a1 is not equal to a2 within + or - accuracy is false. - This test is for scalars such as floats and doubles where small differences - could make these items not exactly equal, but also works for all scalars. - _{a1 The scalar on the left.} - _{a2 The scalar on the right.} - _{accuracy The maximum difference between a1 and a2 for these values to be - considered equal.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ - -#define STAssertEqualsWithAccuracy(a1, a2, accuracy, description, ...) \ -do { \ - @try {\ - if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ - [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:[@"Type mismatch -- " stringByAppendingString:STComposeString(description, ##__VA_ARGS__)]]]; \ - } else { \ - __typeof__(a1) a1value = (a1); \ - __typeof__(a2) a2value = (a2); \ - __typeof__(accuracy) accuracyvalue = (accuracy); \ - if (STAbsoluteDifference(a1value, a2value) > accuracyvalue) { \ - NSValue *a1encoded = [NSValue value:&a1value withObjCType:@encode(__typeof__(a1))]; \ - NSValue *a2encoded = [NSValue value:&a2value withObjCType:@encode(__typeof__(a2))]; \ - NSValue *accuracyencoded = [NSValue value:&accuracyvalue withObjCType:@encode(__typeof__(accuracy))]; \ - [self failWithException:[NSException failureInEqualityBetweenValue: a1encoded \ - andValue: a2encoded \ - withAccuracy: accuracyencoded \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - - -/*" Generates a failure unconditionally. - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STFail(description, ...) \ -[self failWithException:[NSException failureInFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]] - - - -/*" Generates a failure when a1 is not nil. - _{a1 An object.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNil(a1, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - if (a1value != nil) { \ - NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ - NSString *_expression = [NSString stringWithFormat:@"((%@) == nil)", _a1]; \ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == nil fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when a1 is nil. - _{a1 An object.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNotNil(a1, description, ...) \ -do { \ - @try {\ - id a1value = (a1); \ - if (a1value == nil) { \ - NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ - NSString *_expression = [NSString stringWithFormat:@"((%@) != nil)", _a1]; \ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - }\ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != nil fails", #a1] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while(0) - - -/*" Generates a failure when expression evaluates to false. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertTrue(expr, description, ...) \ -do { \ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ -} while (0) - - -/*" Generates a failure when expression evaluates to false and in addition will - generate error messages if an exception is encountered. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertTrueNoThrow(expr, description, ...) \ -do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: NO \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) ", #expr] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when the expression evaluates to true. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertFalse(expr, description, ...) \ -do { \ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: YES \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ -} while (0) - - -/*" Generates a failure when the expression evaluates to true and in addition - will generate error messages if an exception is encountered. - _{expr The expression that is tested.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertFalseNoThrow(expr, description, ...) \ -do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ - [self failWithException:[NSException failureInCondition: _expression \ - isTrue: YES \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - } \ - } \ - @catch (id anException) {\ - [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"!(%s) ", #expr] \ - exception:anException \ - inFile:[NSString stringWithUTF8String:__FILE__] \ - atLine:__LINE__ \ - withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when expression does not throw an exception. - _{expression The expression that is evaluated.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent. -"*/ -#define STAssertThrows(expr, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (id anException) { \ - continue; \ - }\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does not throw an exception of a - specific class. - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertThrowsSpecific(expr, specificException, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does not throw an exception of a - specific class with a specific name. Useful for those frameworks like - AppKit or Foundation that throw generic NSException w/specific names - (NSInvalidArgumentException, etc). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{aName The name of the specified exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} - -"*/ -#define STAssertThrowsSpecificNamed(expr, specificException, aName, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - if ([aName isEqualToString: [anException name]]) continue; \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: nil \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ -} while (0) - - -/*" Generates a failure when expression does throw an exception. - _{expression The expression that is evaluated.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNoThrow(expr, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (id anException) { \ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ -} while (0) - - -/*" Generates a failure when expression does throw an exception of the specitied - class. Any other exception is okay (i.e. does not generate a failure). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} -"*/ -#define STAssertNoThrowSpecific(expr, specificException, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anythingElse) {\ - ; \ - }\ -} while (0) - - -/*" Generates a failure when expression does throw an exception of a - specific class with a specific name. Useful for those frameworks like - AppKit or Foundation that throw generic NSException w/specific names - (NSInvalidArgumentException, etc). - _{expression The expression that is evaluated.} - _{specificException The specified class of the exception.} - _{aName The name of the specified exception.} - _{description A format string as in the printf() function. Can be nil or - an empty string but must be present.} - _{... A variable number of arguments to the format string. Can be absent.} - -"*/ -#define STAssertNoThrowSpecificNamed(expr, specificException, aName, description, ...) \ -do { \ - @try { \ - (expr);\ - } \ - @catch (specificException *anException) { \ - if ([aName isEqualToString: [anException name]]) { \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ - [self failWithException: \ - [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ - exception: anException \ - inFile: [NSString stringWithUTF8String:__FILE__] \ - atLine: __LINE__ \ - withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ - } \ - continue; \ - }\ - @catch (id anythingElse) {\ - ; \ - }\ -} while (0) - - - -@interface NSException (GTMSenTestAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInCondition:(NSString *)condition - isTrue:(BOOL)isTrue - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInEqualityBetweenObject:(id)left - andObject:(id)right - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInEqualityBetweenValue:(NSValue *)left - andValue:(NSValue *)right - withAccuracy:(NSValue *)accuracy - inFile:(NSString *)filename - atLine:(int) ineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInRaise:(NSString *)expression - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -+ (NSException *)failureInRaise:(NSString *)expression - exception:(NSException *)exception - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ...; -@end - -// SENTE_END - -@interface SenTestCase : NSObject { - SEL currentSelector_; -} - -- (void)setUp; -- (void)invokeTest; -- (void)tearDown; -- (void)performTest:(SEL)sel; -- (void)failWithException:(NSException*)exception; -@end - -GTM_EXTERN NSString *const SenTestFailureException; - -GTM_EXTERN NSString *const SenTestFilenameKey; -GTM_EXTERN NSString *const SenTestLineNumberKey; - -#endif // GTM_IPHONE_SDK - -// All unittest cases in GTM should inherit from GTMTestCase. It makes sure -// to set up our logging system correctly to verify logging calls. -// See GTMUnitTestDevLog.h for details -@interface GTMTestCase : SenTestCase -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.m deleted file mode 100644 index 8482c5a6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMSenTestCase.m +++ /dev/null @@ -1,362 +0,0 @@ -// -// GTMSenTestCase.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import - -#if !GTM_IPHONE_SDK -#import "GTMGarbageCollection.h" -#endif // !GTM_IPHONE_SDK - -#if GTM_IPHONE_SDK -#import - -@interface NSException (GTMSenTestPrivateAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - reason:(NSString *)reason; -@end - -@implementation NSException (GTMSenTestPrivateAdditions) -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - reason:(NSString *)reason { - NSDictionary *userInfo = - [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInteger:lineNumber], SenTestLineNumberKey, - filename, SenTestFilenameKey, - nil]; - - return [self exceptionWithName:SenTestFailureException - reason:reason - userInfo:userInfo]; -} -@end - -@implementation NSException (GTMSenTestAdditions) - -+ (NSException *)failureInFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = testDescription; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInCondition:(NSString *)condition - isTrue:(BOOL)isTrue - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = [NSString stringWithFormat:@"'%@' should be %s. %@", - condition, isTrue ? "TRUE" : "FALSE", testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInEqualityBetweenObject:(id)left - andObject:(id)right - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@'. %@", - [left description], [right description], testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInEqualityBetweenValue:(NSValue *)left - andValue:(NSValue *)right - withAccuracy:(NSValue *)accuracy - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason; - if (accuracy) { - reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@'. %@", - left, right, testDescription]; - } else { - reason = - [NSString stringWithFormat:@"'%@' should be equal to '%@' +/-'%@'. %@", - left, right, accuracy, testDescription]; - } - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInRaise:(NSString *)expression - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason = [NSString stringWithFormat:@"'%@' should raise. %@", - expression, testDescription]; - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -+ (NSException *)failureInRaise:(NSString *)expression - exception:(NSException *)exception - inFile:(NSString *)filename - atLine:(int)lineNumber - withDescription:(NSString *)formatString, ... { - - NSString *testDescription = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - testDescription = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - - NSString *reason; - if ([[exception name] isEqualToString:SenTestFailureException]) { - // it's our exception, assume it has the right description on it. - reason = [exception reason]; - } else { - // not one of our exception, use the exceptions reason and our description - reason = [NSString stringWithFormat:@"'%@' raised '%@'. %@", - expression, [exception reason], testDescription]; - } - - return [self failureInFile:filename atLine:lineNumber reason:reason]; -} - -@end - -NSString *STComposeString(NSString *formatString, ...) { - NSString *reason = @""; - if (formatString) { - va_list vl; - va_start(vl, formatString); - reason = - [[[NSString alloc] initWithFormat:formatString arguments:vl] autorelease]; - va_end(vl); - } - return reason; -} - -NSString *const SenTestFailureException = @"SenTestFailureException"; -NSString *const SenTestFilenameKey = @"SenTestFilenameKey"; -NSString *const SenTestLineNumberKey = @"SenTestLineNumberKey"; - -@interface SenTestCase (SenTestCasePrivate) -// our method of logging errors -+ (void)printException:(NSException *)exception fromTestName:(NSString *)name; -@end - -@implementation SenTestCase -- (void)failWithException:(NSException*)exception { - [exception raise]; -} - -- (void)setUp { -} - -- (void)performTest:(SEL)sel { - currentSelector_ = sel; - @try { - [self invokeTest]; - } @catch (NSException *exception) { - [[self class] printException:exception - fromTestName:NSStringFromSelector(sel)]; - [exception raise]; - } -} - -+ (void)printException:(NSException *)exception fromTestName:(NSString *)name { - NSDictionary *userInfo = [exception userInfo]; - NSString *filename = [userInfo objectForKey:SenTestFilenameKey]; - NSNumber *lineNumber = [userInfo objectForKey:SenTestLineNumberKey]; - NSString *className = NSStringFromClass([self class]); - if ([filename length] == 0) { - filename = @"Unknown.m"; - } - fprintf(stderr, "%s:%ld: error: -[%s %s] : %s\n", - [filename UTF8String], - (long)[lineNumber integerValue], - [className UTF8String], - [name UTF8String], - [[exception reason] UTF8String]); - fflush(stderr); -} - -- (void)invokeTest { - NSException *e = nil; - @try { - // Wrap things in autorelease pools because they may - // have an STMacro in their dealloc which may get called - // when the pool is cleaned up - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - // We don't log exceptions here, instead we let the person that called - // this log the exception. This ensures they are only logged once but the - // outer layers get the exceptions to report counts, etc. - @try { - [self setUp]; - @try { - [self performSelector:currentSelector_]; - } @catch (NSException *exception) { - e = [exception retain]; - } - [self tearDown]; - } @catch (NSException *exception) { - e = [exception retain]; - } - [pool release]; - } @catch (NSException *exception) { - e = [exception retain]; - } - if (e) { - [e autorelease]; - [e raise]; - } -} - -- (void)tearDown { -} - -- (NSString *)description { - // This matches the description OCUnit would return to you - return [NSString stringWithFormat:@"-[%@ %@]", [self class], - NSStringFromSelector(currentSelector_)]; -} -@end - -#endif // GTM_IPHONE_SDK - -@implementation GTMTestCase : SenTestCase -- (void)invokeTest { - Class devLogClass = NSClassFromString(@"GTMUnitTestDevLog"); - if (devLogClass) { - [devLogClass performSelector:@selector(enableTracking)]; - [devLogClass performSelector:@selector(verifyNoMoreLogsExpected)]; - - } - [super invokeTest]; - if (devLogClass) { - [devLogClass performSelector:@selector(verifyNoMoreLogsExpected)]; - [devLogClass performSelector:@selector(disableTracking)]; - } -} -@end - -// Leak detection -#if !GTM_IPHONE_DEVICE -// Don't want to get leaks on the iPhone Device as the device doesn't -// have 'leaks'. The simulator does though. - -static void _GTMRunLeaks(void) { - // This is an atexit handler. It runs leaks for us to check if we are - // leaking anything in our tests. - const char* cExclusionsEnv = getenv("GTM_LEAKS_SYMBOLS_TO_IGNORE"); - NSMutableString *exclusions = [NSMutableString string]; - if (cExclusionsEnv) { - NSString *exclusionsEnv = [NSString stringWithUTF8String:cExclusionsEnv]; - NSArray *exclusionsArray = [exclusionsEnv componentsSeparatedByString:@","]; - NSString *exclusion; - NSCharacterSet *wcSet = [NSCharacterSet whitespaceCharacterSet]; - GTM_FOREACH_OBJECT(exclusion, exclusionsArray) { - exclusion = [exclusion stringByTrimmingCharactersInSet:wcSet]; - [exclusions appendFormat:@"-exclude \"%@\" ", exclusion]; - } - } - NSString *string - = [NSString stringWithFormat:@"/usr/bin/leaks %@%d" - @"| /usr/bin/sed -e 's/Leak: /Leaks:0: warning: Leak /'", - exclusions, getpid()]; - int ret = system([string UTF8String]); - if (ret) { - fprintf(stderr, "%s:%d: Error: Unable to run leaks. 'system' returned: %d", - __FILE__, __LINE__, ret); - fflush(stderr); - } -} - -static __attribute__((constructor)) void _GTMInstallLeaks(void) { - BOOL checkLeaks = YES; -#if !GTM_IPHONE_SDK - checkLeaks = GTMIsGarbageCollectionEnabled() ? NO : YES; -#endif // !GTM_IPHONE_SDK - if (checkLeaks) { - checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO; - if (checkLeaks) { - if (checkLeaks) { - fprintf(stderr, "Leak Checking Enabled\n"); - fflush(stderr); - int ret = atexit(&_GTMRunLeaks); - _GTMDevAssert(ret == 0, - @"Unable to install _GTMRunLeaks as an atexit handler (%d)", - errno); - } - } - } -} - -#endif // !GTM_IPHONE_DEVICE diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.h deleted file mode 100644 index 0128718b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// GTMTestHTTPServer.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -@class GTMHTTPServer; - -// This is a HTTP Server that can respond to certain requests that look like -// Google service logins. It takes extra url arguments to tell it what to -// return for testing the code using it. See GTMHTTPFetcherTest for an example -// of its usage. -@interface GTMTestHTTPServer : NSObject { - NSString *docRoot_; - GTMHTTPServer *server_; -} - -// Any url that isn't a specific server request (login, etc.), will be fetched -// off |docRoot| (to allow canned repsonses). -- (id)initWithDocRoot:(NSString *)docRoot; - -// fetch the port the server is running on -- (uint16_t)port; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.m deleted file mode 100644 index 7744b5e9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestHTTPServer.m +++ /dev/null @@ -1,166 +0,0 @@ -// -// GTMTestHTTPServer.m -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMTestHTTPServer.h" -#import "GTMHTTPServer.h" -#import "GTMRegex.h" - -static NSArray *GetSubPatternsOfFirstStringMatchedByPattern(NSString *stringToSearch, - NSString *pattern) { - GTMRegex *regex = [GTMRegex regexWithPattern:pattern]; - NSString *firstMatch = [regex firstSubStringMatchedInString:stringToSearch]; - NSArray *subPatterns = [regex subPatternsOfString:firstMatch]; - return subPatterns; -} - -@implementation GTMTestHTTPServer - -- (id)initWithDocRoot:(NSString *)docRoot { - self = [super init]; - if (self) { - docRoot_ = [docRoot copy]; - server_ = [[GTMHTTPServer alloc] initWithDelegate:self]; - NSError *error = nil; - if ((docRoot == nil) || (![server_ start:&error])) { - _GTMDevLog(@"Failed to start up the webserver (docRoot='%@', error=%@)", - docRoot_, error); - [self release]; - return nil; - } - } - return self; -} - -- (void)dealloc { - [docRoot_ release]; - [server_ release]; - [super dealloc]; -} - -- (uint16_t)port { - return [server_ port]; -} - -- (GTMHTTPResponseMessage *)httpServer:(GTMHTTPServer *)server - handleRequest:(GTMHTTPRequestMessage *)request { - _GTMDevAssert(server == server_, @"how'd we get a different server?!"); - UInt32 resultStatus = 0; - NSData *data = nil; - // clients should treat dates as opaque, generally - NSString *modifiedDate = @"thursday"; - - NSString *postString = @""; - NSData *postData = [request body]; - if ([postData length] > 0) { - postString = [[[NSString alloc] initWithData:postData - encoding:NSUTF8StringEncoding] autorelease]; - } - - NSDictionary *allHeaders = [request allHeaderFieldValues]; - NSString *ifModifiedSince = [allHeaders objectForKey:@"If-Modified-Since"]; - NSString *authorization = [allHeaders objectForKey:@"Authorization"]; - NSString *path = [[request URL] absoluteString]; - - if ([path hasSuffix:@".auth"]) { - if (![authorization isEqualToString:@"GoogleLogin auth=GoodAuthToken"]) { - GTMHTTPResponseMessage *response = - [GTMHTTPResponseMessage emptyResponseWithCode:401]; - return response; - } else { - path = [path substringToIndex:[path length] - 5]; - } - } - - NSString *overrideHeader = [allHeaders objectForKey:@"X-HTTP-Method-Override"]; - NSString *httpCommand = [request method]; - if ([httpCommand isEqualToString:@"POST"] && - [overrideHeader length] > 1) { - httpCommand = overrideHeader; - } - NSArray *searchResult = nil; - if ([path hasSuffix:@"/accounts/ClientLogin"]) { - // it's a sign-in attempt; it's good unless the password is "bad" or - // "captcha" - - // use regular expression to find the password - NSString *password = @""; - searchResult = GetSubPatternsOfFirstStringMatchedByPattern(path, @"Passwd=([^&\n]*)"); - if ([searchResult count] == 2) { - password = [searchResult objectAtIndex:1]; - } - - if ([password isEqualToString:@"bad"]) { - resultStatus = 403; - } else if ([password isEqualToString:@"captcha"]) { - NSString *loginToken = @""; - NSString *loginCaptcha = @""; - - searchResult = GetSubPatternsOfFirstStringMatchedByPattern(postString, @"logintoken=([^&\n]*)"); - if ([searchResult count] == 2) { - loginToken = [searchResult objectAtIndex:1]; - } - - searchResult = GetSubPatternsOfFirstStringMatchedByPattern(postString, @"logincaptcha=([^&\n]*)"); - if ([searchResult count] == 2) { - loginCaptcha = [searchResult objectAtIndex:1]; - } - - if ([loginToken isEqualToString:@"CapToken"] && - [loginCaptcha isEqualToString:@"good"]) { - resultStatus = 200; - } else { - // incorrect captcha token or answer provided - resultStatus = 403; - } - } else { - // valid username/password - resultStatus = 200; - } - } else if ([httpCommand isEqualToString:@"DELETE"]) { - // it's an object delete; read and return empty data - resultStatus = 200; - } else { - // queries that have something like "?status=456" should fail with the - // status code - searchResult = GetSubPatternsOfFirstStringMatchedByPattern(path, @"status=([0-9]+)"); - if ([searchResult count] == 2) { - resultStatus = [[searchResult objectAtIndex:1] intValue]; - } else if ([ifModifiedSince isEqualToString:modifiedDate]) { - resultStatus = 304; - } else { - NSString *docPath = [docRoot_ stringByAppendingPathComponent:path]; - data = [NSData dataWithContentsOfFile:docPath]; - if (data) { - resultStatus = 200; - } else { - resultStatus = 404; - } - } - } - - GTMHTTPResponseMessage *response = - [GTMHTTPResponseMessage responseWithBody:data - contentType:@"text/plain" - statusCode:resultStatus]; - [response setValue:modifiedDate forHeaderField:@"Last-Modified"]; - [response setValue:[NSString stringWithFormat:@"TestCookie=%@", [path lastPathComponent]] - forHeaderField:@"Set-Cookie"]; - return response; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimer.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimer.h deleted file mode 100644 index 6c5fc55c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimer.h +++ /dev/null @@ -1,125 +0,0 @@ -// -// GTMTestTimer.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMDefines.h" -#import - -// GTMTestTimer is done in straight inline C to avoid obj-c calling overhead. -// It is for doing test timings at very high precision. -// Test Timers have standard CoreFoundation Retain/Release rules. -// Test Timers are not thread safe. Test Timers do NOT check their arguments -// for NULL. You will crash if you pass a NULL argument in. - -typedef struct { - mach_timebase_info_data_t time_base_info_; - bool running_; - uint64_t start_; - uint64_t split_; - uint64_t elapsed_; - NSUInteger iterations_; - NSUInteger retainCount_; -} GTMTestTimer; - -// Create a test timer -GTM_INLINE GTMTestTimer *GTMTestTimerCreate(void) { - GTMTestTimer *t = calloc(sizeof(GTMTestTimer), 1); - if (t) { - if (mach_timebase_info(&t->time_base_info_) == KERN_SUCCESS) { - t->retainCount_ = 1; - } else { - // COV_NF_START - free(t); - t = NULL; - // COV_NF_END - } - } - return t; -} - -// Retain a timer -GTM_INLINE void GTMTestTimerRetain(GTMTestTimer *t) { - t->retainCount_ += 1; -} - -// Release a timer. When release count hits zero, we free it. -GTM_INLINE void GTMTestTimerRelease(GTMTestTimer *t) { - t->retainCount_ -= 1; - if (t->retainCount_ == 0) { - free(t); - } -} - -// Starts a timer timing. Specifically starts a new split. If the timer is -// currently running, it resets the start time of the current split. -GTM_INLINE void GTMTestTimerStart(GTMTestTimer *t) { - t->start_ = mach_absolute_time(); - t->running_ = true; -} - -// Stops a timer and returns split time (time from last start) in nanoseconds. -GTM_INLINE uint64_t GTMTestTimerStop(GTMTestTimer *t) { - uint64_t now = mach_absolute_time(); - t->running_ = false; - ++t->iterations_; - t->split_ = now - t->start_; - t->elapsed_ += t->split_; - t->start_ = 0; - return t->split_; -} - -// returns the current timer elapsed time (combined value of all splits, plus -// current split if the timer is running) in nanoseconds. -GTM_INLINE double GTMTestTimerGetNanoseconds(GTMTestTimer *t) { - uint64_t total = t->elapsed_; - if (t->running_) { - total += mach_absolute_time() - t->start_; - } - return (double)(total * t->time_base_info_.numer - / t->time_base_info_.denom); -} - -// Returns the current timer elapsed time (combined value of all splits, plus -// current split if the timer is running) in seconds. -GTM_INLINE double GTMTestTimerGetSeconds(GTMTestTimer *t) { - return GTMTestTimerGetNanoseconds(t) * 0.000000001; -} - -// Returns the current timer elapsed time (combined value of all splits, plus -// current split if the timer is running) in milliseconds. -GTM_INLINE double GTMTestTimerGetMilliseconds(GTMTestTimer *t) { - return GTMTestTimerGetNanoseconds(t) * 0.000001; -} - -// Returns the current timer elapsed time (combined value of all splits, plus -// current split if the timer is running) in microseconds. -GTM_INLINE double GTMTestTimerGetMicroseconds(GTMTestTimer *t) { - return GTMTestTimerGetNanoseconds(t) * 0.001; -} - -// Returns the number of splits (start-stop) cycles recorded. -// GTMTestTimerGetSeconds()/GTMTestTimerGetIterations() gives you an average -// of all your splits. -GTM_INLINE NSUInteger GTMTestTimerGetIterations(GTMTestTimer *t) { - return t->iterations_; -} - -// Returns true if the timer is running. -GTM_INLINE bool GTMTestTimerIsRunning(GTMTestTimer *t) { - return t->running_; -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimerTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimerTest.m deleted file mode 100644 index 86f9d221..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMTestTimerTest.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// GTMTestTimerTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMTestTimer.h" - -@interface GTMTestTimerTest : GTMTestCase -@end - -@implementation GTMTestTimerTest -- (void)testTimer { - GTMTestTimer *timer = GTMTestTimerCreate(); - STAssertNotNULL(timer, nil); - GTMTestTimerRetain(timer); - GTMTestTimerRelease(timer); - STAssertEqualsWithAccuracy(GTMTestTimerGetSeconds(timer), 0.0, 0.0, nil); - GTMTestTimerStart(timer); - STAssertTrue(GTMTestTimerIsRunning(timer), nil); - NSRunLoop *loop = [NSRunLoop currentRunLoop]; - [loop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - GTMTestTimerStop(timer); - - // We use greater than (and an almost absurd less than) because - // these tests are very dependant on machine load, and we don't want - // automated tests reporting false negatives. - STAssertGreaterThan(GTMTestTimerGetSeconds(timer), 0.1, nil); - STAssertGreaterThan(GTMTestTimerGetMilliseconds(timer), 100.0,nil); - STAssertGreaterThan(GTMTestTimerGetMicroseconds(timer), 100000.0, nil); - - // Check to make sure we're not WAY off the mark (by a factor of 10) - STAssertLessThan(GTMTestTimerGetMicroseconds(timer), 1000000.0, nil); - - [loop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - GTMTestTimerStart(timer); - [loop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - STAssertGreaterThan(GTMTestTimerGetSeconds(timer), 0.2, nil); - GTMTestTimerStop(timer); - STAssertEquals(GTMTestTimerGetIterations(timer), (NSUInteger)2, nil); - GTMTestTimerRelease(timer); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.h deleted file mode 100644 index ee420e94..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// GTMUIKit+UnitTesting.h -// -// Code for making unit testing of graphics/UI easier. Generally you -// will only want to look at the macros: -// GTMAssertDrawingEqualToFile -// GTMAssertViewRepEqualToFile -// and the protocol GTMUnitTestViewDrawer. When using these routines -// make sure you are using device colors and not calibrated/generic colors -// or else your test graphics WILL NOT match across devices/graphics cards. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMNSObject+UnitTesting.h" - -@protocol GTMUnitTestViewDrawer; - -// Fails when the |a1|'s drawing in an area |a2| does not equal the image file named |a3|. -// See the description of the GTMAssertViewRepEqualToFile macro -// to understand how |a3| is found and written out. -// See the description of the GTMUnitTestView for a better idea -// how the view works. -// Implemented as a macro to match the rest of the SenTest macros. -// -// Args: -// a1: The object that implements the GTMUnitTestViewDrawer protocol -// that is doing the drawing. -// a2: The size of the drawing -// a3: The name of the image file to check against. -// Do not include the extension -// a4: contextInfo to pass to drawer -// description: A format string as in the printf() function. -// Can be nil or an empty string but must be present. -// ...: A variable number of arguments to the format string. Can be absent. -// - -#define GTMAssertDrawingEqualToFile(a1, a2, a3, a4, description, ...) \ - do { \ - id a1Drawer = (a1); \ - CGSize a2Size = (a2); \ - NSString* a3String = (a3); \ - void *a4ContextInfo = (a4); \ - CGRect frame = CGRectMake(0, 0, a2Size.width, a2Size.height); \ - GTMUnitTestView *view = [[[GTMUnitTestView alloc] initWithFrame:frame drawer:a1Drawer contextInfo:a4ContextInfo] autorelease]; \ - GTMAssertObjectImageEqualToImageNamed(view, a3String, STComposeString(description, ##__VA_ARGS__)); \ - } while(0) - -// Category for making unit testing of graphics/UI easier. - -// Allows you to take a state of a view. Supports both image and state. -// See GTMNSObject+UnitTesting.h for details. -@interface UIView (GTMUnitTestingAdditions) - -// Encodes the state of an object in a manner suitable for comparing against a master state file -// This enables us to determine whether the object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder; - -// Returns whether gtm_unitTestEncodeState should recurse into subviews -// -// Returns: -// should gtm_unitTestEncodeState pick up subview state. -- (BOOL)gtm_shouldEncodeStateForSubviews; -@end - -// Category to help UIImage testing. UIImage can be tested using -// GTMAssertObjectImageEqualToImageNamed macro, which automatically creates -// result images and diff images in case test fails. -@interface UIImage (GTMUnitTestingAdditions) -@end - -// A view that allows you to delegate out drawing using the formal -// GTMUnitTestViewDelegate protocol -// This is useful when writing up unit tests for visual elements. -// Your test will often end up looking like this: -// - (void)testFoo { -// GTMAssertDrawingEqualToFile(self, CGSizeMake(200, 200), @"Foo", nil, nil); -// } -// and your testSuite will also implement the unitTestViewDrawRect method to do -// it's actual drawing. The above creates a view of size 200x200 that draws -// it's content using |self|'s unitTestViewDrawRect method and compares it to -// the contents of the file Foo.tif to make sure it's valid -@interface GTMUnitTestView : UIView { - @private - id drawer_; // delegate for doing drawing (STRONG) - void* contextInfo_; // info passed in by user for them to use when drawing -} - -// Create a GTMUnitTestView. -// -// Args: -// rect: the area to draw. -// drawer: the object that will do the drawing via the GTMUnitTestViewDrawer -// protocol -// contextInfo: -- (id)initWithFrame:(CGRect)frame drawer:(id)drawer contextInfo:(void*)contextInfo; - -@end - -/// \cond Protocols - -// Formal protocol for doing unit testing of views. See description of -// GTMUnitTestView for details. -@protocol GTMUnitTestViewDrawer - -// Draw the view. Equivalent to drawRect on a standard UIView. -// -// Args: -// rect: the area to draw. -- (void)gtm_unitTestViewDrawRect:(CGRect)rect contextInfo:(void*)contextInfo; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.m deleted file mode 100644 index 7d3f200e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTesting.m +++ /dev/null @@ -1,122 +0,0 @@ -// -// GTMUIKit+UnitTesting.m -// -// Category for making unit testing of graphics/UI easier. -// Allows you to save a view out to a image file, and compare a view -// with a previously stored representation to make sure it hasn't changed. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMUIKit+UnitTesting.h" -#import "GTMCALayer+UnitTesting.h" -#import "GTMDefines.h" - -#if !GTM_IPHONE_SDK -#error This file is for iPhone use only -#endif // GTM_IPHONE_SDK - -// A view that allows you to delegate out drawing using the formal -// GTMUnitTestViewDelegate protocol above. This is useful when writing up unit -// tests for visual elements. -// Your test will often end up looking like this: -// - (void)testFoo { -// GTMAssertDrawingEqualToFile(self, CGSizeMake(200, 200), @"Foo", nil, nil); -// } -// and your testSuite will also implement the unitTestViewDrawRect method to do -// it's actual drawing. The above creates a view of size 200x200 that draws -// it's content using |self|'s unitTestViewDrawRect method and compares it to -// the contents of the file Foo.tif to make sure it's valid -@implementation GTMUnitTestView - -- (id)initWithFrame:(CGRect)frame - drawer:(id)drawer - contextInfo:(void*)contextInfo{ - self = [super initWithFrame:frame]; - if (self != nil) { - drawer_ = [drawer retain]; - contextInfo_ = contextInfo; - } - return self; -} - -- (void)dealloc { - [drawer_ release]; - [super dealloc]; -} - -- (void)drawRect:(CGRect)rect { - [drawer_ gtm_unitTestViewDrawRect:rect contextInfo:contextInfo_]; -} - -@end - -@implementation UIView (GTMUnitTestingAdditions) - -// Returns an image containing a representation of the object -// suitable for use in comparing against a master image. -// NB this means that all colors should be from "NSDevice" color space -// Does all of it's drawing with smoothfonts and antialiasing off -// to avoid issues with font smoothing settings and antialias differences -// between ppc and x86. -// -// Returns: -// an image of the object -- (CGImageRef)gtm_unitTestImage { - CALayer* layer = [self layer]; - return [layer gtm_unitTestImage]; -} - -// Encodes the state of an object in a manner suitable for comparing -// against a master state file so we can determine whether the -// object is in a suitable state. -// -// Arguments: -// inCoder - the coder to encode our state into -- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder { - [super gtm_unitTestEncodeState:inCoder]; - [inCoder encodeBool:[self isHidden] forKey:@"ViewIsHidden"]; - CALayer* layer = [self layer]; - if (layer) { - [layer gtm_unitTestEncodeState:inCoder]; - } - if ([self gtm_shouldEncodeStateForSubviews]) { - int i = 0; - for (UIView *subview in [self subviews]) { - [inCoder encodeObject:subview - forKey:[NSString stringWithFormat:@"ViewSubView %d", i]]; - i++; - } - } -} - -// Returns whether gtm_unitTestEncodeState should recurse into subviews -// -// Returns: -// should gtm_unitTestEncodeState pick up subview state. -- (BOOL)gtm_shouldEncodeStateForSubviews { - return YES; -} - -- (BOOL)gtm_shouldEncodeStateForSublayersOfLayer:(CALayer*)layer { - return NO; -} -@end - -@implementation UIImage (GTMUnitTestingAdditions) -- (CGImageRef)gtm_unitTestImage { - return [self CGImage]; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTestingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTestingTest.m deleted file mode 100644 index 8b3effae..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIKit+UnitTestingTest.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// GTMUIKit+UnitTestingTest.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMUIKit+UnitTesting.h" -#import "GTMSenTestCase.h" - -@interface GTMUIView_UnitTestingTest : SenTestCase -@end - -@implementation GTMUIView_UnitTestingTest - -- (void)testDrawing { - GTMAssertDrawingEqualToFile(self, - CGSizeMake(200,200), - @"GTMUIViewUnitTestingTest", - [UIApplication sharedApplication], - nil); -} - -- (void)testState { - UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)] autorelease]; - UIView *subview = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)] autorelease]; - [view addSubview:subview]; - GTMAssertObjectStateEqualToStateNamed(view, @"GTMUIViewUnitTestingTest", nil); -} - -- (void)testUIImage { - NSString* name = @"GTMUIViewUnitTestingTest"; - UIImage* image = - [UIImage imageNamed:[name stringByAppendingPathExtension:@"png"]]; - GTMAssertObjectImageEqualToImageNamed(image, name, nil); -} - -- (void)gtm_unitTestViewDrawRect:(CGRect)rect contextInfo:(void*)contextInfo { - UIApplication *app = [UIApplication sharedApplication]; - STAssertEqualObjects(app, - contextInfo, - @"Should be a UIApplication"); - CGPoint center = CGPointMake(CGRectGetMidX(rect), - CGRectGetMidY(rect)); - rect = CGRectMake(center.x - 50, center.y - 50, 100, 100); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextAddEllipseInRect(context, rect); - CGContextSetLineWidth(context, 5); - [[UIColor redColor] set]; - CGContextStrokePath(context); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/Info.plist b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/Info.plist deleted file mode 100644 index 11355f71..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/Info.plist +++ /dev/null @@ -1,71 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.google.GTMUIUnitTestingHarness - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - - CFBundleURLTypes - - - CFBundleURLName - GTMUIUnitTestingHarnessURL - CFBundleURLSchemes - - gtmgeturlhandlertest - - GTMBundleURLClass - GTMGetURLHandlerTest - - - CFBundleURLName - GTMGetURLHandlerBadClassURL - CFBundleURLSchemes - - gtmgeturlhandlerbadclasstest - - GTMBundleURLClass - GTMGetURLHandlerBadClassWarning - - - CFBundleURLName - GTMGetURLHandlerMissingClassURL - CFBundleURLSchemes - - gtmgeturlhandlermissingclasstest - - GTMBundleURLClass - GTMGetURLHandlerMissingClassWarning - - - CFBundleURLName - GTMGetURLHandlerMissingHandlerURL - CFBundleURLSchemes - - gtmgeturlhandlermissinghandlerurl - - - - NSPrincipalClass - NSApplication - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/main.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/main.m deleted file mode 100644 index 8fb364d7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIUnitTestingHarness/main.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// main.m -// GTMUnitTestingTest -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -#import -#import "GTMUnitTestingUtilities.h" - -int main(int argc, char *argv[]) { - [GTMUnitTestingUtilities setUpForUIUnitTestsIfBeingTested]; - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIViewUnitTestingTest.png b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIViewUnitTestingTest.png deleted file mode 100644 index 03fd9f02..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUIViewUnitTestingTest.png and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h deleted file mode 100644 index 30c70776..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h +++ /dev/null @@ -1,76 +0,0 @@ -// -// GTMUnitTestDevLog.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMDefines.h" -#import - -// GTMUnitTestDevLog tracks what messages are logged to verify that you only -// log what you expect to log during the running of unittests. This allows you -// to log with impunity from your actual core implementations and still be able -// to find unexpected logs in your output when running unittests. -// In your unittests you tell GTMUnitTestDevLog what messages you expect your -// test to spit out, and it will cause any that don't match to appear as errors -// in your unittest run output. You can match on exact strings or standard -// regexps. -// Set GTM_SHOW_UNITTEST_DEVLOGS in the environment to show the logs that that -// are expected and encountered. Otherwise they aren't display to keep the -// unit test results easier to read. - -@interface GTMUnitTestDevLog : NSObject -// Log a message -+ (void)log:(NSString*)format, ...; -+ (void)log:(NSString*)format args:(va_list)args; - -// Turn tracking on/off -+ (void)enableTracking; -+ (void)disableTracking; -+ (BOOL)isTrackingEnabled; - -// Note that you are expecting a string that has an exact match. No need to -// escape any pattern characters. -+ (void)expectString:(NSString *)format, ...; - -// Note that you are expecting a pattern. Pattern characters that you want -// exact matches on must be escaped. See [GTMRegex escapedPatternForString]. -// Patterns match across newlines (kGTMRegexOptionSupressNewlineSupport) making -// it easier to match output from the descriptions of NS collection types such -// as NSArray and NSDictionary. -+ (void)expectPattern:(NSString *)format, ...; - -// Note that you are expecting exactly 'n' strings -+ (void)expect:(NSUInteger)n casesOfString:(NSString *)format, ...; - -// Note that you are expecting exactly 'n' patterns -+ (void)expect:(NSUInteger)n casesOfPattern:(NSString*)format, ...; -+ (void)expect:(NSUInteger)n casesOfPattern:(NSString*)format args:(va_list)args; - -// Call when you want to verify that you have matched all the logs you expect -// to match. If your unittests inherit from GTMTestcase (like they should) you -// will get this called for free. -+ (void)verifyNoMoreLogsExpected; - -// Resets the expected logs so that you don't have anything expected. -// In general should not be needed, unless you have a variable logging case -// of some sort. -+ (void)resetExpectedLogs; -@end - -// Does the same as GTMUnitTestDevLog, but the logs are only expected in debug. -// ie-the expect requests don't count in release builds. -@interface GTMUnitTestDevLogDebug : GTMUnitTestDevLog -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.m deleted file mode 100644 index f2f9418f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.m +++ /dev/null @@ -1,279 +0,0 @@ -// -// GTMUnitTestDevLog.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMUnitTestDevLog.h" - - -#import "GTMRegex.h" -#import "GTMSenTestCase.h" - -#if !GTM_IPHONE_SDK -// Add support for grabbing messages from Carbon. -#import -static void GTMDevLogDebugAssert(OSType componentSignature, - UInt32 options, - const char *assertionString, - const char *exceptionLabelString, - const char *errorString, - const char *fileName, - long lineNumber, - void *value, - ConstStr255Param outputMsg) { - NSString *outLog = [[[NSString alloc] initWithBytes:&(outputMsg[1]) - length:StrLength(outputMsg) - encoding:NSMacOSRomanStringEncoding] - autorelease]; - _GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored -} -static inline void GTMInstallDebugAssertOutputHandler(void) { - InstallDebugAssertOutputHandler(GTMDevLogDebugAssert); -} -static inline void GTMUninstallDebugAssertOutputHandler(void) { - InstallDebugAssertOutputHandler(NULL); -} -#else // GTM_IPHONE_SDK -static inline void GTMInstallDebugAssertOutputHandler(void) {}; -static inline void GTMUninstallDebugAssertOutputHandler(void) {}; -#endif // GTM_IPHONE_SDK - -@interface GTMUnttestDevLogAssertionHandler : NSAssertionHandler -@end - -@implementation GTMUnttestDevLogAssertionHandler -- (void)handleFailureInMethod:(SEL)selector - object:(id)object - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - NSString *descStr - = [[[NSString alloc] initWithFormat:format arguments:argList] autorelease]; - va_end(argList); - - // You need a format that will be useful in logs, but won't trip up Xcode or - // any other build systems parsing of the output. - NSString *outLog - = [NSString stringWithFormat:@"RecordedNSAssert in %@ - %@ (%@:%ld)", - NSStringFromSelector(selector), - descStr, - fileName, (long)line]; - _GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored - [NSException raise:NSInternalInconsistencyException - format:@"NSAssert raised"]; -} - -- (void)handleFailureInFunction:(NSString *)functionName - file:(NSString *)fileName - lineNumber:(NSInteger)line - description:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - NSString *descStr - = [[[NSString alloc] initWithFormat:format arguments:argList] autorelease]; - va_end(argList); - - // You need a format that will be useful in logs, but won't trip up Xcode or - // any other build systems parsing of the output. - NSString *outLog - = [NSString stringWithFormat:@"RecordedNSAssert in %@ - %@ (%@:%ld)", - functionName, - descStr, - fileName, (long)line]; - _GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored - [NSException raise:NSInternalInconsistencyException - format:@"NSAssert raised"]; -} - -@end - -@implementation GTMUnitTestDevLog -// If unittests are ever being run on separate threads, this may need to be -// made a thread local variable. -static BOOL gTrackingEnabled = NO; - -+ (NSMutableArray *)patterns { - static NSMutableArray *patterns = nil; - if (!patterns) { - patterns = [[NSMutableArray array] retain]; - } - return patterns; -} - -+ (BOOL)isTrackingEnabled { - return gTrackingEnabled; -} - -+ (void)enableTracking { - GTMInstallDebugAssertOutputHandler(); - - NSMutableDictionary *threadDictionary - = [[NSThread currentThread] threadDictionary]; - if ([threadDictionary objectForKey:@"NSAssertionHandler"] != nil) { - NSLog(@"Warning: replacing NSAssertionHandler to capture assertions"); - } - - // Install an assertion handler to capture those. - GTMUnttestDevLogAssertionHandler *handler = - [[[GTMUnttestDevLogAssertionHandler alloc] init] autorelease]; - [threadDictionary setObject:handler forKey:@"NSAssertionHandler"]; - - gTrackingEnabled = YES; -} - -+ (void)disableTracking { - GTMUninstallDebugAssertOutputHandler(); - - // Clear our assertion handler back out. - NSMutableDictionary *threadDictionary - = [[NSThread currentThread] threadDictionary]; - [threadDictionary removeObjectForKey:@"NSAssertionHandler"]; - - gTrackingEnabled = NO; -} - -+ (void)log:(NSString*)format, ... { - va_list argList; - va_start(argList, format); - [self log:format args:argList]; - va_end(argList); -} - -+ (void)log:(NSString*)format args:(va_list)args { - if ([self isTrackingEnabled]) { - NSString *logString = [[[NSString alloc] initWithFormat:format - arguments:args] autorelease]; - @synchronized(self) { - NSMutableArray *patterns = [self patterns]; - BOOL logError = [patterns count] == 0 ? YES : NO; - GTMRegex *regex = nil; - if (!logError) { - regex = [[[patterns objectAtIndex:0] retain] autorelease]; - logError = [regex matchesString:logString] ? NO : YES; - [patterns removeObjectAtIndex:0]; - } - if (logError) { - if (regex) { - [NSException raise:SenTestFailureException - format:@"Unexpected log: %@\nExpected: %@", - logString, regex]; - } else { - [NSException raise:SenTestFailureException - format:@"Unexpected log: %@", logString]; - } - } else { - static BOOL envChecked = NO; - static BOOL showExpectedLogs = YES; - if (!envChecked) { - showExpectedLogs = getenv("GTM_SHOW_UNITTEST_DEVLOGS") ? YES : NO; - } - if (showExpectedLogs) { - NSLog(@"Expected Log: %@", logString); - } - } - } - } else { - NSLogv(format, args); - } -} - -+ (void)expectString:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - NSString *string = [[[NSString alloc] initWithFormat:format - arguments:argList] autorelease]; - va_end(argList); - NSString *pattern = [GTMRegex escapedPatternForString:string]; - [self expect:1 casesOfPattern:pattern]; - -} - -+ (void)expectPattern:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - [self expect:1 casesOfPattern:format args:argList]; - va_end(argList); -} - -+ (void)expect:(NSUInteger)n casesOfString:(NSString *)format, ... { - va_list argList; - va_start(argList, format); - NSString *string = [[[NSString alloc] initWithFormat:format - arguments:argList] autorelease]; - va_end(argList); - NSString *pattern = [GTMRegex escapedPatternForString:string]; - [self expect:n casesOfPattern:pattern]; -} - -+ (void)expect:(NSUInteger)n casesOfPattern:(NSString*)format, ... { - va_list argList; - va_start(argList, format); - [self expect:n casesOfPattern:format args:argList]; - va_end(argList); -} - -+ (void)expect:(NSUInteger)n -casesOfPattern:(NSString*)format - args:(va_list)args { - NSString *pattern = [[[NSString alloc] initWithFormat:format - arguments:args] autorelease]; - GTMRegex *regex = [GTMRegex regexWithPattern:pattern - options:kGTMRegexOptionSupressNewlineSupport]; - @synchronized(self) { - NSMutableArray *patterns = [self patterns]; - for (NSUInteger i = 0; i < n; ++i) { - [patterns addObject:regex]; - } - } -} - -+ (void)verifyNoMoreLogsExpected { - @synchronized(self) { - NSMutableArray *patterns = [self patterns]; - if ([patterns count] > 0) { - NSMutableArray *patternsCopy = [[patterns copy] autorelease]; - [self resetExpectedLogs]; - [NSException raise:SenTestFailureException - format:@"Logs still expected %@", patternsCopy]; - } - } -} - -+ (void)resetExpectedLogs { - @synchronized(self) { - NSMutableArray *patterns = [self patterns]; - [patterns removeAllObjects]; - } -} -@end - - -@implementation GTMUnitTestDevLogDebug - -+ (void)expect:(NSUInteger)n -casesOfPattern:(NSString*)format - args:(va_list)args { -#if DEBUG - // In debug, let the base work happen - [super expect:n casesOfPattern:format args:args]; -#else - // nothing when not in debug -#endif -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingBindingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingBindingTest.m deleted file mode 100644 index 19ab5b06..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingBindingTest.m +++ /dev/null @@ -1,116 +0,0 @@ -// -// GTMUnitTestingBindingTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMUnitTestingTest.h" -#import "GTMNSObject+BindingUnitTesting.h" - -@interface GTMUnitTestingBindingTest : GTMTestCase { - int expectedFailureCount_; -} -@end - -@interface GTMUnitTestingBindingBadClass : NSObject -@end - -@implementation GTMUnitTestingBindingTest - -// Iterates through all of our subviews testing the exposed bindings -- (void)doSubviewBindingTest:(NSView*)view { - NSArray *subviews = [view subviews]; - NSView *subview; - GTM_FOREACH_OBJECT(subview, subviews) { - GTMTestExposedBindings(subview, @"testing %@", subview); - [self doSubviewBindingTest:subview]; - } -} - -- (void)testBindings { - // Get our window to work with and test it's bindings - GTMUnitTestingTestController *testWindowController - = [[GTMUnitTestingTestController alloc] initWithWindowNibName:@"GTMUnitTestingTest"]; - NSWindow *window = [testWindowController window]; - GTMTestExposedBindings(window, @"Window failed binding test"); - [self doSubviewBindingTest:[window contentView]]; - [window close]; - [testWindowController release]; - - // Run a test against something with no bindings. - // We're expecting a failure here. - expectedFailureCount_ = 1; - GTMTestExposedBindings(@"foo", @"testing no bindings"); - STAssertEquals(expectedFailureCount_, 0, @"Didn't get expected failures testing bindings"); - - // Run test against some with bad bindings. - // We're expecting failures here. - expectedFailureCount_ = 4; - GTMUnitTestingBindingBadClass *bad = [[[GTMUnitTestingBindingBadClass alloc] init] autorelease]; - GTMTestExposedBindings(bad, @"testing bad bindings"); - STAssertEquals(expectedFailureCount_, 0, @"Didn't get expected failures testing bad bindings"); -} - -- (void)failWithException:(NSException *)anException { - if (expectedFailureCount_ > 0) { - expectedFailureCount_ -= 1; - } else { - [super failWithException:anException]; // COV_NF_LINE - not expecting exception - } -} - -@end - -// Forces several error cases in our binding tests to test them -@implementation GTMUnitTestingBindingBadClass - -NSString *const kGTMKeyWithNoClass = @"keyWithNoClass"; -NSString *const kGTMKeyWithNoValue = @"keyWithNoValue"; -NSString *const kGTMKeyWeCantSet = @"keyWeCantSet"; -NSString *const kGTMKeyThatIsntEqual = @"keyThatIsntEqual"; - -- (NSArray *)exposedBindings { - return [NSArray arrayWithObjects:kGTMKeyWithNoClass, - kGTMKeyWithNoValue, - kGTMKeyWeCantSet, - kGTMKeyThatIsntEqual, - nil]; -} - -- (NSArray*)gtm_unitTestExposedBindingsTestValues:(NSString*)binding { - GTMBindingUnitTestData *data - = [GTMBindingUnitTestData testWithIdentityValue:kGTMKeyThatIsntEqual]; - return [NSArray arrayWithObject:data]; -} - -- (Class)valueClassForBinding:(NSString*)binding { - return [binding isEqualTo:kGTMKeyWithNoClass] ? nil : [NSString class]; -} - -- (id)valueForKey:(NSString*)binding { - if ([binding isEqualTo:kGTMKeyWithNoValue]) { - [NSException raise:NSUndefinedKeyException format:nil]; - } - return @"foo"; -} - -- (void)setValue:(id)value forKey:(NSString*)binding { - if ([binding isEqualTo:kGTMKeyWeCantSet]) { - [NSException raise:NSUndefinedKeyException format:nil]; - } -} -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.h deleted file mode 100644 index ea9521b9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// GTMUnitTestingTest.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// GTMUnitTestingTestController controller so that initWithWindowNibName can -// find the appropriate bundle to load our nib from. See [GTMUnitTestingTest -// -testUnitTestingFramework] for more info -@interface GTMUnitTestingTestController : NSWindowController { - IBOutlet NSTextField *field_; -} - -- (NSTextField *)textField; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.m deleted file mode 100644 index 72e68804..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingTest.m +++ /dev/null @@ -1,252 +0,0 @@ -// -// GTMUnitTestingTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import "GTMUnitTestingTest.h" -#import "GTMAppKit+UnitTesting.h" - -NSString *const kGTMWindowNibName = @"GTMUnitTestingTest"; -NSString *const kGTMWindowSaveFileName = @"GTMUnitTestingWindow"; - -@interface GTMUnitTestingTest : GTMTestCase { - int expectedFailureCount_; -} -@end - -// GTMUnitTestingTest support classes -@interface GTMUnitTestingView : NSObject { - BOOL goodContext_; -} -- (BOOL)hadGoodContext; -@end - -@interface GTMUnitTestingDelegate : NSObject { - BOOL didEncode_; -} -- (BOOL)didEncode; -@end - -@interface GTMUnitTestingProxyTest : NSProxy -@end - -@implementation GTMUnitTestingTest - -// Brings up the window defined in the nib and takes a snapshot of it. -// We use the "empty" GTMUnitTestingTestController controller so that -// initWithWindowNibName can find the appropriate bundle to load our nib from. -// For some reason when running unit tests, with all the injecting going on -// the nib loader can get confused as to where it should load a nib from. -// Having a NSWindowController subclass in the same bundle as the nib seems -// to help the nib loader find the nib, and any custom classes that are attached -// to it. -- (void)testUnitTestingFramework { - // set up our delegates so we can test delegate handling - GTMUnitTestingDelegate *appDelegate = [[GTMUnitTestingDelegate alloc] init]; - [NSApp setDelegate:appDelegate]; - - // Get our window - GTMUnitTestingTestController *testWindowController - = [[GTMUnitTestingTestController alloc] initWithWindowNibName:kGTMWindowNibName]; - NSWindow *window = [testWindowController window]; - // Test the app state. This will cover windows and menus - GTMAssertObjectStateEqualToStateNamed(NSApp, - @"GTMUnitTestingTestApp", - @"Testing the app state"); - - // Test the window image and state - GTMAssertObjectEqualToStateAndImageNamed(window, - kGTMWindowSaveFileName, - @"Testing the window image and state"); - - // Verify that all of our delegate encoders got called - STAssertTrue([appDelegate didEncode], @"app delegate didn't get called?"); - - // Clean up - [NSApp setDelegate:nil]; - [appDelegate release]; - [testWindowController release]; -} - -- (void)testViewUnitTesting { - GTMUnitTestingView *unitTestingView = [[GTMUnitTestingView alloc] init]; - GTMAssertDrawingEqualToImageNamed(unitTestingView, - NSMakeSize(200,200), - @"GTMUnitTestingView", - NSApp, - @"Testing view drawing"); - STAssertTrue([unitTestingView hadGoodContext], @"bad context?"); - [unitTestingView release]; -} - -- (void)testImageUnitTesting { - NSImage *image = [NSImage imageNamed:@"NSApplicationIcon"]; - GTMUnitTestingDelegate *imgDelegate = [[GTMUnitTestingDelegate alloc] init]; - [image setDelegate:imgDelegate]; - GTMAssertObjectEqualToStateAndImageNamed(image, - @"GTMUnitTestingImage", - @"Testing NSImage image and state"); - STAssertTrue([imgDelegate didEncode], @"imgDelegate didn't get called?"); - [image setDelegate:nil]; - [imgDelegate release]; -} - -- (void)testFailures { - NSString *const bogusTestName = @"GTMUnitTestTestingFailTest"; - NSString *tempDir = NSTemporaryDirectory(); - STAssertNotNil(tempDir, @"No Temp Dir?"); - NSString *originalPath = [NSObject gtm_getUnitTestSaveToDirectory]; - STAssertNotNil(originalPath, @"No save dir?"); - [NSObject gtm_setUnitTestSaveToDirectory:tempDir]; - STAssertEqualObjects(tempDir, [NSObject gtm_getUnitTestSaveToDirectory], - @"Save to dir not set?"); - NSString *statePath = [self gtm_saveToPathForStateNamed:bogusTestName]; - STAssertNotNil(statePath, @"no state path?"); - NSString *imagePath = [self gtm_saveToPathForImageNamed:bogusTestName]; - STAssertNotNil(imagePath, @"no image path?"); - GTMUnitTestingTestController *testWindowController - = [[GTMUnitTestingTestController alloc] initWithWindowNibName:kGTMWindowNibName]; - NSWindow *window = [testWindowController window]; - - // Test against a golden master filename that doesn't exist - expectedFailureCount_ = 2; - GTMAssertObjectEqualToStateAndImageNamed(window, - bogusTestName, - @"Creating image and state files"); - STAssertEquals(expectedFailureCount_, 0, - @"Didn't get expected failures creating files"); - - // Change our image and state and verify failures - [[testWindowController textField] setStringValue:@"Foo"]; - expectedFailureCount_ = 2; - GTMAssertObjectEqualToStateAndImageNamed(window, - kGTMWindowSaveFileName, - @"Testing the window image and state"); - STAssertEquals(expectedFailureCount_, 0, - @"Didn't get expected failures testing files"); - - // Now change the size of our image and verify failures - NSRect oldFrame = [window frame]; - NSRect newFrame = oldFrame; - newFrame.size.width += 1; - [window setFrame:newFrame display:YES]; - expectedFailureCount_ = 1; - GTMAssertObjectImageEqualToImageNamed(window, - kGTMWindowSaveFileName, - @"Testing the changed window size"); - [window setFrame:oldFrame display:YES]; - - // Set our unit test save dir to a bogus directory and - // run the tests again. - [NSObject gtm_setUnitTestSaveToDirectory:@"/zim/blatz/foo/bob/bar"]; - expectedFailureCount_ = 2; - GTMAssertObjectEqualToStateAndImageNamed(window, - kGTMWindowSaveFileName, - @"Testing the window image and state"); - STAssertEquals(expectedFailureCount_, 0, - @"Didn't get expected failures testing files"); - expectedFailureCount_ = 2; - GTMAssertObjectEqualToStateAndImageNamed(window, - @"GTMUnitTestingWindowDoesntExist", - @"Testing the window image and state"); - STAssertEquals(expectedFailureCount_, 0, - @"Didn't get expected failures testing files"); - - // Reset our unit test save dir - [NSObject gtm_setUnitTestSaveToDirectory:nil]; - - // Test against something that doesn't have an image - expectedFailureCount_ = 1; - GTMAssertObjectImageEqualToImageNamed(@"a string", - @"GTMStringsDontHaveImages", - @"Testing that strings should fail"); - STAssertEquals(expectedFailureCount_, 0, @"Didn't get expected failures testing files"); - - // Test against something that doesn't implement our support - expectedFailureCount_ = 1; - GTMUnitTestingProxyTest *proxy = [[GTMUnitTestingProxyTest alloc] init]; - GTMAssertObjectStateEqualToStateNamed(proxy, - @"NSProxiesDontDoState", - @"Testing that NSProxy should fail"); - STAssertEquals(expectedFailureCount_, 0, @"Didn't get expected failures testing proxy"); - [proxy release]; - - [window close]; -} - -- (void)failWithException:(NSException *)anException { - if (expectedFailureCount_ > 0) { - expectedFailureCount_ -= 1; - } else { - [super failWithException:anException]; // COV_NF_LINE - not expecting exception - } -} - - -@end - -@implementation GTMUnitTestingTestController -- (NSTextField *)textField { - return field_; -} - -@end - -@implementation GTMUnitTestingDelegate - -- (void)gtm_unitTestEncoderWillEncode:(id)sender inCoder:(NSCoder*)inCoder { - // Test various encodings - [inCoder encodeBool:YES forKey:@"BoolTest"]; - [inCoder encodeInt:1 forKey:@"IntTest"]; - [inCoder encodeInt32:1 forKey:@"Int32Test"]; - [inCoder encodeInt64:1 forKey:@"Int64Test"]; - [inCoder encodeFloat:1.0f forKey:@"FloatTest"]; - [inCoder encodeDouble:1.0 forKey:@"DoubleTest"]; - [inCoder encodeBytes:(const uint8_t*)"BytesTest" length:9 forKey:@"BytesTest"]; - didEncode_ = YES; -} - -- (BOOL)didEncode { - return didEncode_; -} -@end - -@implementation GTMUnitTestingView - -- (void)gtm_unitTestViewDrawRect:(NSRect)rect contextInfo:(void*)contextInfo { - [[NSColor redColor] set]; - NSRectFill(rect); - goodContext_ = [(id)contextInfo isEqualTo:NSApp]; -} - -- (BOOL)hadGoodContext { - return goodContext_; -} -@end - -// GTMUnitTestingProxyTest is for testing the case where we don't conform to -// the GTMUnitTestingEncoding protocol. -@implementation GTMUnitTestingProxyTest -- (id)init { - return self; -} - -- (BOOL)conformsToProtocol:(Protocol *)protocol { - return NO; -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.h deleted file mode 100644 index 128a4c4f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.h +++ /dev/null @@ -1,91 +0,0 @@ -// -// GTMUnitTestingUtilities.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import - -// Collection of utilities for unit testing -@interface GTMUnitTestingUtilities : NSObject - -// Returns YES if we are currently being unittested. -+ (BOOL)areWeBeingUnitTested; - -// Sets up the user interface so that we can run consistent UI unittests on -// it. This includes setting scroll bar types, setting selection colors -// setting color spaces etc so that everything is consistent across machines. -// This should be called in main, before NSApplicationMain is called. -+ (void)setUpForUIUnitTests; - -// Syntactic sugar combining the above, and wrapping them in an -// NSAutoreleasePool so that your main can look like this: -// int main(int argc, const char *argv[]) { -// [UnitTestingUtilities setUpForUIUnitTestsIfBeingTested]; -// return NSApplicationMain(argc, argv); -// } -+ (void)setUpForUIUnitTestsIfBeingTested; - -// Check if the screen saver is running. Some unit tests don't work when -// the screen saver is active. -+ (BOOL)isScreenSaverActive; - -// Allows for posting either a keydown or a keyup with all the modifiers being -// applied. Passing a 'g' with NSKeyDown and NSShiftKeyMask -// generates two events (a shift key key down and a 'g' key keydown). Make sure -// to balance this with a keyup, or things could get confused. Events get posted -// using the CGRemoteOperation events which means that it gets posted in the -// system event queue. Thus you can affect other applications if your app isn't -// the active app (or in some cases, such as hotkeys, even if it is). -// Arguments: -// type - Event type. Currently accepts NSKeyDown and NSKeyUp -// keyChar - character on the keyboard to type. Make sure it is lower case. -// If you need upper case, pass in the NSShiftKeyMask in the -// modifiers. i.e. to generate "G" pass in 'g' and NSShiftKeyMask. -// to generate "+" pass in '=' and NSShiftKeyMask. -// cocoaModifiers - an int made up of bit masks. Handles NSAlphaShiftKeyMask, -// NSShiftKeyMask, NSControlKeyMask, NSAlternateKeyMask, and -// NSCommandKeyMask -+ (void)postKeyEvent:(NSEventType)type - character:(CGCharCode)keyChar - modifiers:(UInt32)cocoaModifiers; - -// Syntactic sugar for posting a keydown immediately followed by a key up event -// which is often what you really want. -// Arguments: -// keyChar - character on the keyboard to type. Make sure it is lower case. -// If you need upper case, pass in the NSShiftKeyMask in the -// modifiers. i.e. to generate "G" pass in 'g' and NSShiftKeyMask. -// to generate "+" pass in '=' and NSShiftKeyMask. -// cocoaModifiers - an int made up of bit masks. Handles NSAlphaShiftKeyMask, -// NSShiftKeyMask, NSControlKeyMask, NSAlternateKeyMask, and -// NSCommandKeyMask -+ (void)postTypeCharacterEvent:(CGCharCode)keyChar - modifiers:(UInt32)cocoaModifiers; - -// Runs the event loop in NSDefaultRunLoopMode until date. Can be useful for -// testing user interface responses in a controlled timed event loop. For most -// uses using: -// [[NSRunLoop currentRunLoop] runUntilDate:date] -// will do. The only reason you would want to use this is if you were -// using the postKeyEvent:character:modifiers to send events and wanted to -// receive user input. -// Arguments: -// date - end of execution time -+ (void)runUntilDate:(NSDate*)date; - -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.m deleted file mode 100644 index e72a921a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/GTMUnitTestingUtilities.m +++ /dev/null @@ -1,310 +0,0 @@ -// -// GTMUnitTestingUtilities.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMUnitTestingUtilities.h" -#import -#import "GTMDefines.h" -#import "GTMGarbageCollection.h" - -// The Users profile before we change it on them -static CMProfileRef gGTMCurrentColorProfile = NULL; - -// Compares two color profiles -static BOOL GTMAreCMProfilesEqual(CMProfileRef a, CMProfileRef b); -// Stores the user's color profile away, and changes over to generic. -static void GTMSetColorProfileToGenericRGB(); -// Restores the users profile. -static void GTMRestoreColorProfile(void); - -static CGKeyCode GTMKeyCodeForCharCode(CGCharCode charCode); - -@implementation GTMUnitTestingUtilities - -// Returns YES if we are currently being unittested. -+ (BOOL)areWeBeingUnitTested { - BOOL answer = NO; - - // Check to see if the SenTestProbe class is linked in before we call it. - Class SenTestProbeClass = NSClassFromString(@"SenTestProbe"); - if (SenTestProbeClass != Nil) { - // Doing this little dance so we don't actually have to link - // SenTestingKit in - SEL selector = NSSelectorFromString(@"isTesting"); - NSMethodSignature *sig = [SenTestProbeClass methodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; - [invocation setSelector:selector]; - [invocation invokeWithTarget:SenTestProbeClass]; - [invocation getReturnValue:&answer]; - } - return answer; -} - -// Sets up the user interface so that we can run consistent UI unittests on it. -+ (void)setUpForUIUnitTests { - // Give some names to undocumented defaults values - const NSInteger MediumFontSmoothing = 2; - const NSInteger BlueTintedAppearance = 1; - - // This sets up some basic values that we want as our defaults for doing pixel - // based user interface tests. These defaults only apply to the unit test app, - // except or the color profile which will be set system wide, and then - // restored when the tests complete. - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - // Scroll arrows together bottom - [defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"]; - // Smallest font size to CG should perform antialiasing on - [defaults setInteger:4 forKey:@"AppleAntiAliasingThreshold"]; - // Type of smoothing - [defaults setInteger:MediumFontSmoothing forKey:@"AppleFontSmoothing"]; - // Blue aqua - [defaults setInteger:BlueTintedAppearance forKey:@"AppleAquaColorVariant"]; - // Standard highlight colors - [defaults setObject:@"0.709800 0.835300 1.000000" - forKey:@"AppleHighlightColor"]; - [defaults setObject:@"0.500000 0.500000 0.500000" - forKey:@"AppleOtherHighlightColor"]; - // Use english plz - [defaults setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"]; - // How fast should we draw sheets. This speeds up the sheet tests considerably - [defaults setFloat:.001f forKey:@"NSWindowResizeTime"]; - // Switch over the screen profile to "generic rgb". This installs an - // atexit handler to return our profile back when we are done. - GTMSetColorProfileToGenericRGB(); -} - -+ (void)setUpForUIUnitTestsIfBeingTested { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - if ([self areWeBeingUnitTested]) { - [self setUpForUIUnitTests]; - } - [pool release]; -} - -+ (BOOL)isScreenSaverActive { - BOOL answer = NO; - ProcessSerialNumber psn; - if (GetFrontProcess(&psn) == noErr) { - CFDictionaryRef cfProcessInfo - = ProcessInformationCopyDictionary(&psn, - kProcessDictionaryIncludeAllInformationMask); - NSDictionary *processInfo = GTMCFAutorelease(cfProcessInfo); - - NSString *bundlePath = [processInfo objectForKey:@"BundlePath"]; - // ScreenSaverEngine is the frontmost app if the screen saver is actually - // running Security Agent is the frontmost app if the "enter password" - // dialog is showing - NSString *bundleName = [bundlePath lastPathComponent]; - answer = ([bundleName isEqualToString:@"ScreenSaverEngine.app"] - || [bundleName isEqualToString:@"SecurityAgent.app"]); - } - return answer; -} - -// Allows for posting either a keydown or a keyup with all the modifiers being -// applied. Passing a 'g' with NSKeyDown and NSShiftKeyMask -// generates two events (a shift key key down and a 'g' key keydown). Make sure -// to balance this with a keyup, or things could get confused. Events get posted -// using the CGRemoteOperation events which means that it gets posted in the -// system event queue. Thus you can affect other applications if your app isn't -// the active app (or in some cases, such as hotkeys, even if it is). -// Arguments: -// type - Event type. Currently accepts NSKeyDown and NSKeyUp -// keyChar - character on the keyboard to type. Make sure it is lower case. -// If you need upper case, pass in the NSShiftKeyMask in the -// modifiers. i.e. to generate "G" pass in 'g' and NSShiftKeyMask. -// to generate "+" pass in '=' and NSShiftKeyMask. -// cocoaModifiers - an int made up of bit masks. Handles NSAlphaShiftKeyMask, -// NSShiftKeyMask, NSControlKeyMask, NSAlternateKeyMask, and -// NSCommandKeyMask -+ (void)postKeyEvent:(NSEventType)type - character:(CGCharCode)keyChar - modifiers:(UInt32)cocoaModifiers { - require(![self isScreenSaverActive], CantWorkWithScreenSaver); - require(type == NSKeyDown || type == NSKeyUp, CantDoEvent); - CGKeyCode code = GTMKeyCodeForCharCode(keyChar); - verify(code != 256); - CGEventRef event = CGEventCreateKeyboardEvent(NULL, code, type == NSKeyDown); - require(event, CantCreateEvent); - CGEventSetFlags(event, cocoaModifiers); - CGEventPost(kCGSessionEventTap, event); - CFRelease(event); -CantCreateEvent: -CantDoEvent: -CantWorkWithScreenSaver: - return; -} - -// Syntactic sugar for posting a keydown immediately followed by a key up event -// which is often what you really want. -// Arguments: -// keyChar - character on the keyboard to type. Make sure it is lower case. -// If you need upper case, pass in the NSShiftKeyMask in the -// modifiers. i.e. to generate "G" pass in 'g' and NSShiftKeyMask. -// to generate "+" pass in '=' and NSShiftKeyMask. -// cocoaModifiers - an int made up of bit masks. Handles NSAlphaShiftKeyMask, -// NSShiftKeyMask, NSControlKeyMask, NSAlternateKeyMask, and -// NSCommandKeyMask -+ (void)postTypeCharacterEvent:(CGCharCode)keyChar modifiers:(UInt32)cocoaModifiers { - [self postKeyEvent:NSKeyDown character:keyChar modifiers:cocoaModifiers]; - [self postKeyEvent:NSKeyUp character:keyChar modifiers:cocoaModifiers]; -} - -// Runs the event loop in NSDefaultRunLoopMode until date. Can be useful for -// testing user interface responses in a controlled timed event loop. For most -// uses using: -// [[NSRunLoop currentRunLoop] runUntilDate:date] -// will do. The only reason you would want to use this is if you were -// using the postKeyEvent:character:modifiers to send events and wanted to -// receive user input. -// Arguments: -// date - end of execution time -+ (void)runUntilDate:(NSDate*)date { - NSEvent *event; - while ((event = [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:date - inMode:NSDefaultRunLoopMode - dequeue:YES])) { - [NSApp sendEvent:event]; - } -} - -@end - -BOOL GTMAreCMProfilesEqual(CMProfileRef a, CMProfileRef b) { - BOOL equal = YES; - if (a != b) { - CMProfileMD5 aMD5; - CMProfileMD5 bMD5; - CMError aMD5Err = CMGetProfileMD5(a, aMD5); - CMError bMD5Err = CMGetProfileMD5(b, bMD5); - equal = (!aMD5Err && - !bMD5Err && - !memcmp(aMD5, bMD5, sizeof(CMProfileMD5))) ? YES : NO; - } - return equal; -} - -void GTMRestoreColorProfile(void) { - if (gGTMCurrentColorProfile) { - CGDirectDisplayID displayID = CGMainDisplayID(); - CMError error = CMSetProfileByAVID((UInt32)displayID, - gGTMCurrentColorProfile); - CMCloseProfile(gGTMCurrentColorProfile); - if (error) { - // COV_NF_START - // No way to force this case in a unittest. - _GTMDevLog(@"Failed to restore previous color profile! " - "You may need to open System Preferences : Displays : Color " - "and manually restore your color settings. (Error: %i)", error); - // COV_NF_END - } else { - _GTMDevLog(@"Color profile restored"); - } - gGTMCurrentColorProfile = NULL; - } -} - -void GTMSetColorProfileToGenericRGB(void) { - NSColorSpace *genericSpace = [NSColorSpace genericRGBColorSpace]; - CMProfileRef genericProfile = (CMProfileRef)[genericSpace colorSyncProfile]; - CMProfileRef previousProfile; - CGDirectDisplayID displayID = CGMainDisplayID(); - CMError error = CMGetProfileByAVID((UInt32)displayID, &previousProfile); - if (error) { - // COV_NF_START - // No way to force this case in a unittest. - _GTMDevLog(@"Failed to get current color profile. " - "I will not be able to restore your current profile, thus I'm " - "not changing it. Many unit tests may fail as a result. (Error: %i)", - error); - return; - // COV_NF_END - } - if (GTMAreCMProfilesEqual(genericProfile, previousProfile)) { - CMCloseProfile(previousProfile); - return; - } - CFStringRef previousProfileName; - CFStringRef genericProfileName; - CMCopyProfileDescriptionString(previousProfile, &previousProfileName); - CMCopyProfileDescriptionString(genericProfile, &genericProfileName); - - _GTMDevLog(@"Temporarily changing your system color profile from \"%@\" to \"%@\".", - previousProfileName, genericProfileName); - _GTMDevLog(@"This allows the pixel-based unit-tests to have consistent color " - "values across all machines."); - _GTMDevLog(@"The colors on your screen will change for the duration of the testing."); - - - if ((error = CMSetProfileByAVID((UInt32)displayID, genericProfile))) { - // COV_NF_START - // No way to force this case in a unittest. - _GTMDevLog(@"Failed to set color profile to \"%@\"! Many unit tests will fail as " - "a result. (Error: %i)", genericProfileName, error); - // COV_NF_END - } else { - gGTMCurrentColorProfile = previousProfile; - atexit(GTMRestoreColorProfile); - } - CFRelease(previousProfileName); - CFRelease(genericProfileName); -} - -// Returns a virtual key code for a given charCode. Handles all of the -// NS*FunctionKeys as well. -static CGKeyCode GTMKeyCodeForCharCode(CGCharCode charCode) { - // character map taken from http://classicteck.com/rbarticles/mackeyboard.php - int characters[] = { - 'a', 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 256, 'b', 'q', 'w', - 'e', 'r', 'y', 't', '1', '2', '3', '4', '6', '5', '=', '9', '7', '-', - '8', '0', ']', 'o', 'u', '[', 'i', 'p', '\n', 'l', 'j', '\'', 'k', ';', - '\\', ',', '/', 'n', 'm', '.', '\t', ' ', '`', '\b', 256, '\e' - }; - - // function key map taken from - // file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSEvent.html - int functionKeys[] = { - // NSUpArrowFunctionKey - NSF12FunctionKey - 126, 125, 123, 124, 122, 120, 99, 118, 96, 97, 98, 100, 101, 109, 103, 111, - // NSF13FunctionKey - NSF28FunctionKey - 105, 107, 113, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - // NSF29FunctionKey - NSScrollLockFunctionKey - 256, 256, 256, 256, 256, 256, 256, 256, 117, 115, 256, 119, 116, 121, 256, 256, - // NSPauseFunctionKey - NSPrevFunctionKey - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - // NSNextFunctionKey - NSModeSwitchFunctionKey - 256, 256, 256, 256, 256, 256, 114, 1 - }; - - CGKeyCode outCode = 0; - - // Look in the function keys - if (charCode >= NSUpArrowFunctionKey && charCode <= NSModeSwitchFunctionKey) { - outCode = functionKeys[charCode - NSUpArrowFunctionKey]; - } else { - // Look in our character map - for (size_t i = 0; i < (sizeof(characters) / sizeof (int)); i++) { - if (characters[i] == charCode) { - outCode = i; - break; - } - } - } - return outCode; -} - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunIPhoneUnitTest.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunIPhoneUnitTest.sh deleted file mode 100644 index ccf1456c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunIPhoneUnitTest.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh -# RunIPhoneUnitTest.sh -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# Runs all unittests through the iPhone simulator. We don't handle running them -# on the device. To run on the device just choose "run". -# Controlling environment variables: -# -# GTM_DISABLE_ZOMBIES - -# Set to a non-zero value to turn on zombie checks. You will probably -# want to turn this off if you enable leaks. -# -# GTM_ENABLE_LEAKS - -# Set to a non-zero value to turn on the leaks check. You will probably want -# to disable zombies, otherwise you will get a lot of false positives. -# -# GTM_DISABLE_TERMINATION -# Set to a non-zero value so that the app doesn't terminate when it's finished -# running tests. This is useful when using it with external tools such -# as Instruments. -# -# GTM_LEAKS_SYMBOLS_TO_IGNORE -# List of comma separated symbols that leaks should ignore. Mainly to control -# leaks in frameworks you don't have control over. -# Search this file for GTM_LEAKS_SYMBOLS_TO_IGNORE to see examples. -# Please feel free to add other symbols as you find them but make sure to -# reference Radars or other bug systems so we can track them. -# -# GTM_REMOVE_GCOV_DATA -# Before starting the test, remove any *.gcda files for the current run so -# you won't get errors when the source file has changed and the data can't -# be merged. -# - -ScriptDir=$(dirname $(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")) -ScriptName=$(basename "$0") -ThisScript="${ScriptDir}/${ScriptName}" - -GTMXcodeNote() { - echo ${ThisScript}:${1}: note: GTM ${2} -} - -if [ "$PLATFORM_NAME" == "iphonesimulator" ]; then - # We kill the iPhone simulator because otherwise we run into issues where - # the unittests fail becuase the simulator is currently running, and - # at this time the iPhone SDK won't allow two simulators running at the same - # time. - /usr/bin/killall "iPhone Simulator" - - if [ $GTM_REMOVE_GCOV_DATA ]; then - if [ "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" != "-" ]; then - if [ -d "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" ]; then - GTMXcodeNote ${LINENO} "Removing any .gcda files" - (cd "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" && \ - find . -type f -name "*.gcda" -print0 | xargs -0 rm -f ) - fi - fi - fi - - export DYLD_ROOT_PATH="$SDKROOT" - export DYLD_FRAMEWORK_PATH="$CONFIGURATION_BUILD_DIR" - export IPHONE_SIMULATOR_ROOT="$SDKROOT" - export CFFIXED_USER_HOME="$TEMP_FILES_DIR/iPhone Simulator User Dir" - - # See http://developer.apple.com/technotes/tn2004/tn2124.html for an - # explanation of these environment variables. - - export MallocScribble=YES - export MallocPreScribble=YES - export MallocGuardEdges=YES - export MallocStackLogging=YES - export NSAutoreleaseFreedObjectCheckEnabled=YES - export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES - - if [ ! $GTM_DISABLE_ZOMBIES ]; then - GTMXcodeNote ${LINENO} "Enabling zombies" - export CFZombieLevel=3 - export NSZombieEnabled=YES - fi - - # Cleanup user home and documents directory - if [ -d "$CFFIXED_USER_HOME" ]; then - rm -rf "$CFFIXED_USER_HOME" - fi - mkdir "$CFFIXED_USER_HOME" - mkdir "$CFFIXED_USER_HOME/Documents" - - # 6251475 iPhone simulator leaks @ CFHTTPCookieStore shutdown if - # CFFIXED_USER_HOME empty - GTM_LEAKS_SYMBOLS_TO_IGNORE="CFHTTPCookieStore" - - "$TARGET_BUILD_DIR/$EXECUTABLE_PATH" -RegisterForSystemEvents -else - GTMXcodeNote ${LINENO} "Skipping running of unittests for device build." -fi -exit 0 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunMacOSUnitTests.sh b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunMacOSUnitTests.sh deleted file mode 100644 index 87f678f3..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/RunMacOSUnitTests.sh +++ /dev/null @@ -1,213 +0,0 @@ -# -# RunMacOSUnitTests.sh -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy -# of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -# -# Run the unit tests in this test bundle. -# Set up some env variables to make things as likely to crash as possible. -# See http://developer.apple.com/technotes/tn2004/tn2124.html for details. -# - -# Controlling environment variables: -# -# GTM_DISABLE_ZOMBIES - -# Set to a non-zero value to turn on zombie checks. You will probably -# want to turn this off if you enable leaks. -# -# GTM_ENABLE_LEAKS - -# Set to a non-zero value to turn on the leaks check. You will probably want -# to disable zombies, otherwise you will get a lot of false positives. -# -# GTM_NO_DEBUG_FRAMEWORKS - -# Set to zero to prevent the use of the debug versions of system -# libraries/frameworks if you have them installed on your system. The -# frameworks can be found at -# http://connect.apple.com > Downloads > Developer Tools -# (https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19915) -# -# GTM_LEAKS_SYMBOLS_TO_IGNORE -# List of comma separated symbols that leaks should ignore. Mainly to control -# leaks in frameworks you don't have control over. -# Search this file for GTM_LEAKS_SYMBOLS_TO_IGNORE to see examples. -# Please feel free to add other symbols as you find them but make sure to -# reference Radars or other bug systems so we can track them. -# -# GTM_REMOVE_GCOV_DATA -# Before starting the test, remove any *.gcda files for the current run so -# you won't get errors when the source file has changed and the data can't -# be merged. -# - -ScriptDir=$(dirname $(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")) -ScriptName=$(basename "$0") -ThisScript="${ScriptDir}/${ScriptName}" - -GTMXcodeNote() { - echo ${ThisScript}:${1}: note: GTM ${2} -} - -# The workaround below is due to -# Radar 6248062 otest won't run with MallocHistory enabled under rosetta -# Basically we go through and check what architecture we are running on -# and which architectures we can support -AppendToSymbolsLeaksShouldIgnore() { - if [ "${GTM_LEAKS_SYMBOLS_TO_IGNORE}" = "" ]; then - GTM_LEAKS_SYMBOLS_TO_IGNORE="${1}" - else - GTM_LEAKS_SYMBOLS_TO_IGNORE="${GTM_LEAKS_SYMBOLS_TO_IGNORE}, ${1}" - fi -} - -AppendToLeakTestArchs() { - if [ "${LEAK_TEST_ARCHS}" = "" ]; then - LEAK_TEST_ARCHS="${1}" - else - LEAK_TEST_ARCHS="${LEAK_TEST_ARCHS} ${1}" - fi -} - -AppendToNoLeakTestArchs() { - if [ "${NO_LEAK_TEST_ARCHS}" = "" ]; then - NO_LEAK_TEST_ARCHS="${1}" - else - NO_LEAK_TEST_ARCHS="${NO_LEAK_TEST_ARCHS} ${1}" - fi -} - -UpdateArchitecturesToTest() { - case "${NATIVE_ARCH_ACTUAL}" in - ppc) - if [ "${1}" = "ppc" ]; then - AppendToLeakTestArchs "${1}" - fi - ;; - - ppc64) - if [ "${1}" = "ppc" -o "${1}" = "ppc64" ]; then - AppendToLeakTestArchs "${1}" - fi - ;; - - i386) - if [ "${1}" = "i386" ]; then - AppendToLeakTestArchs "${1}" - elif [ "${1}" = "ppc" ]; then - AppendToNoLeakTestArchs "${1}" - fi - ;; - - x86_64) - if [ "${1}" = "i386" -o "${1}" = "x86_64" ]; then - AppendToLeakTestArchs "${1}" - elif [ "${1}" = "ppc" -o "${1}" = "ppc64" ]; then - AppendToNoLeakTestArchs "${1}" - fi - ;; - - *) - echo "RunMacOSUnitTests.sh Unknown native architecture: ${NATIVE_ARCH_ACTUAL}" - exit 1 - ;; - esac -} - -RunTests() { - if [ "${CURRENT_ARCH}" = "" ]; then - CURRENT_ARCH=`arch` - fi - - if [ "${ONLY_ACTIVE_ARCH}" = "YES" ]; then - ARCHS="${CURRENT_ARCH}" - fi - - if [ "${ARCHS}" = "" ]; then - ARCHS=`arch` - fi - - if [ "${VALID_ARCHS}" = "" ]; then - VALID_ARCHS=`arch` - fi - - if [ "${NATIVE_ARCH_ACTUAL}" = "" ]; then - NATIVE_ARCH_ACTUAL=`arch` - fi - - LEAK_TEST_ARCHS="" - NO_LEAK_TEST_ARCHS="" - - for TEST_ARCH in ${ARCHS}; do - for TEST_VALID_ARCH in ${VALID_ARCHS}; do - if [ "${TEST_VALID_ARCH}" = "${TEST_ARCH}" ]; then - UpdateArchitecturesToTest "${TEST_ARCH}" - fi - done - done - - # These are symbols that leak on OS 10.5.5 - # radar 6247293 NSCollatorElement leaks in +initialize. - AppendToSymbolsLeaksShouldIgnore "+[NSCollatorElement initialize]" - # radar 6247911 The first call to udat_open leaks only on x86_64 - AppendToSymbolsLeaksShouldIgnore "icu::TimeZone::initDefault()" - # radar 6263983 +[IMService allServices] leaks - AppendToSymbolsLeaksShouldIgnore "-[IMServiceAgentImpl allServices]" - # radar 6264034 +[IKSFEffectDescription initialize] Leaks - AppendToSymbolsLeaksShouldIgnore "+[IKSFEffectDescription initialize]" - - # Running leaks on architectures that support leaks. - export MallocStackLogging=YES - export GTM_LEAKS_SYMBOLS_TO_IGNORE="${GTM_LEAKS_SYMBOLS_TO_IGNORE}" - ARCHS="${LEAK_TEST_ARCHS}" - VALID_ARCHS="${LEAK_TEST_ARCHS}" - "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" - - # Running leaks on architectures that don't support leaks. - unset MallocStackLogging - unset GTM_ENABLE_LEAKS - ARCHS="${NO_LEAK_TEST_ARCHS}" - VALID_ARCHS="${NO_LEAK_TEST_ARCHS}" - "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" -} - -# Jack up some memory stress so we can catch more bugs. -export MallocScribble=YES -export MallocPreScribble=YES -export MallocGuardEdges=YES -export NSAutoreleaseFreedObjectCheckEnabled=YES -export OBJC_DEBUG_FRAGILE_SUPERCLASSES=YES - -if [ ! $GTM_DISABLE_ZOMBIES ]; then - GTMXcodeNote ${LINENO} "Enabling zombies" - # CFZombieLevel disabled because it doesn't play well with the - # security framework - # export CFZombieLevel=3 - export NSZombieEnabled=YES -fi - -if [ $GTM_REMOVE_GCOV_DATA ]; then - if [ "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" != "-" ]; then - if [ -d "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" ]; then - GTMXcodeNote ${LINENO} "Removing any .gcda files" - (cd "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}" && \ - find . -type f -name "*.gcda" -print0 | xargs -0 rm -f ) - fi - fi -fi - -# If leaks testing is enabled, we have to go through our convoluted path -# to handle architectures that don't allow us to do leak testing. -if [ $GTM_ENABLE_LEAKS ]; then - RunTests -else - "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" -fi diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.gtmUTState b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.gtmUTState deleted file mode 100644 index 87ae9e57..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.gtmUTState +++ /dev/null @@ -1,33 +0,0 @@ - - - - - $GTMArchive - GTMUnitTestingArchive - $GTMVersion - 1 - LayerIsDoublesided - - LayerIsHidden - - LayerIsOpaque - - LayerOpacity - 1 - ViewIsHidden - - ViewSubView 0 - - LayerIsDoublesided - - LayerIsHidden - - LayerIsOpaque - - LayerOpacity - 1 - ViewIsHidden - - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.png b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.png deleted file mode 100644 index 03fd9f02..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUIViewUnitTestingTest.png and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.10.6.0.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.10.6.0.tiff deleted file mode 100644 index 2bbdb9c3..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.10.6.0.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.gtmUTState b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.gtmUTState deleted file mode 100644 index 969ddf6b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.gtmUTState +++ /dev/null @@ -1,30 +0,0 @@ - - - - - $GTMArchive - GTMUnitTestingArchive - $GTMVersion - 1 - BoolTest - - BytesTest - - Qnl0ZXNUZXN0 - - DoubleTest - 1 - FloatTest - 1 - ImageName - NSApplicationIcon - ImageSize - {128, 128} - Int32Test - 1 - Int64Test - 1 - IntTest - 1 - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.tiff deleted file mode 100644 index 4d082972..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingImage.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState deleted file mode 100644 index 03e611c9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState +++ /dev/null @@ -1,1591 +0,0 @@ - - - - - $GTMArchive - GTMUnitTestingArchive - $GTMVersion - 1 - ApplicationMainWindow - 0 - BoolTest - - BytesTest - - Qnl0ZXNUZXN0 - - DoubleTest - 1 - FloatTest - 1 - Int32Test - 1 - Int64Test - 1 - IntTest - 1 - MenuBar - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - About NewApplication - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 10 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - q - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Quit NewApplication - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - , - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Preferences… - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 4 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuTitle - Services - - MenuItemTag - 0 - MenuItemTitle - Services - - MenuItem 5 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 6 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - h - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Hide NewApplication - - MenuItem 7 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - h - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Hide Others - - MenuItem 8 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Show All - - MenuItem 9 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - - MenuItemTag - 0 - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - n - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - New - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - o - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Open… - - MenuItem 10 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - P - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Page Setup... - MenuItemTooltip - - - MenuItem 11 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - p - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Print… - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Clear Menu - - MenuTitle - Open Recent - - MenuItemTag - 0 - MenuItemTitle - Open Recent - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 4 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - w - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Close - - MenuItem 5 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - w - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Close All - - MenuItem 6 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - s - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Save - - MenuItem 7 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - S - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Save As… - - MenuItem 8 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Revert to Saved - - MenuItem 9 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuTitle - File - - MenuItemTag - 0 - MenuItemTitle - File - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - z - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Undo - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - Z - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Redo - - MenuItem 10 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - : - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Show Spelling… - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - ; - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Check Spelling - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Check Spelling While Typing - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Check Grammar With Spelling - - MenuTitle - Spelling and Grammar - - MenuItemTag - 0 - MenuItemTitle - Spelling and Grammar - - MenuItem 11 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 1 - MenuItemTitle - Smart Copy/Paste - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 2 - MenuItemTitle - Smart Quotes - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 3 - MenuItemTitle - Smart Links - - MenuTitle - Substitutions - - MenuItemTag - 0 - MenuItemTitle - Substitutions - - MenuItem 12 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Start Speaking - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Stop Speaking - - MenuTitle - Speech - - MenuItemTag - 0 - MenuItemTitle - Speech - - MenuItem 13 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 14 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Special Characters… - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - x - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Cut - - MenuItem 4 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - c - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Copy - - MenuItem 5 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - v - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Paste - - MenuItem 6 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Delete - - MenuItem 7 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - a - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Select All - - MenuItem 8 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - - - MenuItem 9 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - f - MenuItemState - 0 - MenuItemTag - 1 - MenuItemTitle - Find… - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - g - MenuItemState - 0 - MenuItemTag - 2 - MenuItemTitle - Find Next - - MenuItem 2 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - G - MenuItemState - 0 - MenuItemTag - 3 - MenuItemTitle - Find Previous - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - e - MenuItemState - 0 - MenuItemTag - 7 - MenuItemTitle - Use Selection for Find - - MenuItem 4 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - j - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Jump to Selection - - MenuTitle - Find - - MenuItemTag - 0 - MenuItemTitle - Find - - MenuTitle - Edit - - MenuItemTag - 0 - MenuItemTitle - Edit - - MenuItem 3 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - t - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Show Fonts - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - C - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Show Colors - - MenuTitle - Format - - MenuItemTag - 0 - MenuItemTitle - Format - - MenuItem 4 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - t - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Show Toolbar - - MenuItem 1 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - Customize Toolbar… - - MenuTitle - View - - MenuItemTag - 0 - MenuItemTitle - View - - MenuItem 5 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - - MenuItemState - 0 - MenuItemSubmenu - - MenuItem 0 - - MenuItemIndentationLevel - 0 - MenuItemIsAlternate - - MenuItemIsEnabled - - MenuItemIsSeparator - - MenuItemKeyEquivalent - ? - MenuItemState - 0 - MenuItemTag - 0 - MenuItemTitle - NewApplication Help - - MenuTitle - Help - - MenuItemTag - 0 - MenuItemTitle - Help - - MenuTitle - AMainMenu - - Window 0 - - WindowContent - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSTableView - ViewIsHidden - - - - ViewSubView 1 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 2 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 3 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 4 - - ViewIsHidden - - - - ViewSubView 1 - - ViewIsHidden - - - ViewSubView 10 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 1 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 2 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - - ViewSubView 11 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 2 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - HaHa - CellValue - HaHa - - ControlTag - 0 - ControlType - NSTextField - ControlValue - HaHa - ViewIsHidden - - - ViewSubView 3 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - Still Haven't Found What I'm Searching For - CellValue - Still Haven't Found What I'm Searching For - - ControlTag - 0 - ControlType - NSSearchField - ControlValue - Still Haven't Found What I'm Searching For - ViewIsHidden - - - ViewSubView 4 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - Once upon a time - CellValue - Once upon a time - - ControlTag - 0 - ControlType - NSTextField - ControlValue - Once upon a time - ViewIsHidden - - - ViewSubView 5 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - CheckMate! - CellValue - 1 - - ControlTag - 0 - ControlType - NSButton - ControlValue - 1 - ViewIsHidden - - - ViewSubView 6 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - - CellValue - 50 - - ControlTag - 0 - ControlType - NSSlider - ControlValue - 50 - ViewIsHidden - - - ViewSubView 7 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - Cancel - CellValue - 0 - - ControlTag - 0 - ControlType - NSButton - ControlValue - 0 - ViewIsHidden - - - ViewSubView 8 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSColorWell - ViewIsHidden - - - ViewSubView 9 - - ViewIsHidden - - - - WindowIsMain - - WindowIsVisible - - WindowTitle - Window - - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingView.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingView.tiff deleted file mode 100644 index 228df732..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingView.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.5.6.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.5.6.tiff deleted file mode 100644 index 9179576e..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.5.6.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.6.0.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.6.0.tiff deleted file mode 100644 index 60c362af..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.10.6.0.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState deleted file mode 100644 index 27dd08e7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState +++ /dev/null @@ -1,291 +0,0 @@ - - - - - $GTMArchive - GTMUnitTestingArchive - $GTMVersion - 1 - WindowContent - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSTableView - ViewIsHidden - - - - ViewSubView 1 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 2 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 3 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 4 - - ViewIsHidden - - - - ViewSubView 1 - - ViewIsHidden - - - ViewSubView 10 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 1 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - ViewSubView 2 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSScroller - ViewIsHidden - - - - ViewSubView 11 - - ViewIsHidden - - ViewSubView 0 - - ViewIsHidden - - - - ViewSubView 2 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - HaHa - CellValue - HaHa - - ControlTag - 0 - ControlType - NSTextField - ControlValue - HaHa - ViewIsHidden - - - ViewSubView 3 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - Still Haven't Found What I'm Searching For - CellValue - Still Haven't Found What I'm Searching For - - ControlTag - 0 - ControlType - NSSearchField - ControlValue - Still Haven't Found What I'm Searching For - ViewIsHidden - - - ViewSubView 4 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - Once upon a time - CellValue - Once upon a time - - ControlTag - 0 - ControlType - NSTextField - ControlValue - Once upon a time - ViewIsHidden - - - ViewSubView 5 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - CheckMate! - CellValue - 1 - - ControlTag - 0 - ControlType - NSButton - ControlValue - 1 - ViewIsHidden - - - ViewSubView 6 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 1 - CellTag - 0 - CellTitle - - CellValue - 50 - - ControlTag - 0 - ControlType - NSSlider - ControlValue - 50 - ViewIsHidden - - - ViewSubView 7 - - ControlIsEnabled - - ControlSelectedCell - - CellState - 0 - CellTag - 0 - CellTitle - Cancel - CellValue - 0 - - ControlTag - 0 - ControlType - NSButton - ControlValue - 0 - ViewIsHidden - - - ViewSubView 8 - - ControlIsEnabled - - ControlTag - 0 - ControlType - NSColorWell - ViewIsHidden - - - ViewSubView 9 - - ViewIsHidden - - - - WindowIsMain - - WindowIsVisible - - WindowTitle - Window - - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.tiff b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.tiff deleted file mode 100644 index 63f56492..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/UnitTesting/TestData/GTMUnitTestingWindow.tiff and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugLeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugLeopardOrLater.xcconfig deleted file mode 100644 index b00a6cc5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugLeopardOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// DebugLeopardOrLater.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// on Leopard or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// Leopard or later -#include "../subconfig/LeopardOrLater.xcconfig" - -// Debug settings -#include "../subconfig/Debug.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig deleted file mode 100644 index a0904125..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// DebugSnowLeopardOrLater.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// on SnowLeopard or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// SnowLeopard or later -#include "../subconfig/SnowLeopardOrLater.xcconfig" - -// Debug settings -#include "../subconfig/Debug.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugTigerOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugTigerOrLater.xcconfig deleted file mode 100644 index 34b7b1c8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugTigerOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// DebugTigerOrLater.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// on Tiger or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// Tiger or later -#include "../subconfig/TigerOrLater.xcconfig" - -// Debug settings -#include "../subconfig/Debug.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone.xcconfig deleted file mode 100644 index 6067fffe..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// -// DebugiPhone.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// for iPhone. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This file is deprecated, please use the version specific one instead. -// - -#include "DebugiPhone20.xcconfig" - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone20.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone20.xcconfig deleted file mode 100644 index 7424704e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone20.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// DebugiPhone20.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// for iPhone OS 2.0. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// iPhone settings -#include "../subconfig/iPhone20.xcconfig" - -// Release settings -#include "../subconfig/Debug.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone21.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone21.xcconfig deleted file mode 100644 index 18c923ad..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/DebugiPhone21.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// DebugiPhone21.xcconfig -// -// Xcode configuration file for building a Debug configuration of a project -// for iPhone OS 2.1. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// iPhone settings -#include "../subconfig/iPhone21.xcconfig" - -// Release settings -#include "../subconfig/Debug.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig deleted file mode 100644 index 31ac835d..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseLeopardOrLater.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// on Leopard or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// Leopard or later -#include "../subconfig/LeopardOrLater.xcconfig" - -// Release settings -#include "../subconfig/Release.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig deleted file mode 100644 index 0d240698..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseSnowLeopardOrLater.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// on SnowLeopard or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// SnowLeopard or later -#include "../subconfig/SnowLeopardOrLater.xcconfig" - -// Release settings -#include "../subconfig/Release.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig deleted file mode 100644 index 93019129..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseTigerOrLater.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// on Tiger or later. -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// Tiger or later -#include "../subconfig/TigerOrLater.xcconfig" - -// Release settings -#include "../subconfig/Release.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone.xcconfig deleted file mode 100644 index 49c11414..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// -// ReleaseiPhone.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// for iPhone. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This file is deprecated, please use the version specific one instead. -// - -#include "ReleaseiPhone20.xcconfig" - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone20.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone20.xcconfig deleted file mode 100644 index 8d31ead0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone20.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseiPhone20.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// for iPhone OS 2.0. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// iPhone Settings. -#include "../subconfig/iPhone20.xcconfig" - -// Release settings -#include "../subconfig/Release.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone21.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone21.xcconfig deleted file mode 100644 index 8a9a0c3e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Project/ReleaseiPhone21.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseiPhone21.xcconfig -// -// Xcode configuration file for building a Release configuration of a project -// for iPhone OS 2.1. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// -// This is a _Configuration_ Xcode config file for use in the "Based on" popup -// of the project configuration editor. Do _not_ use this as the config base -// and individual Xcode target, there are other configuration files for that -// purpose. - -// Pull in the general settings -#include "../subconfig/General.xcconfig" - -// iPhone Settings. -#include "../subconfig/iPhone21.xcconfig" - -// Release settings -#include "../subconfig/Release.xcconfig" - -// Merge settings -#include "../subconfig/GTMMerge.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/DebugUnittest.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/DebugUnittest.xcconfig deleted file mode 100644 index 3f4d342f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/DebugUnittest.xcconfig +++ /dev/null @@ -1,29 +0,0 @@ -// -// DebugUnittest.xcconfig -// -// Xcode configuration file for a debug unittest target. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Unittests are loadable bundles -#include "../subconfig/Unittest.xcconfig" - -// See comments in ReleaseUnittest.xcconfig regarding BUNDLE_LOADER and -// how it should be set if you are running into link errors. \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundle.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundle.xcconfig deleted file mode 100644 index 8b824d7c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundle.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// LoadableBundle.xcconfig -// -// Xcode configuration file for a loadable bundle target. Usually a Cocoa -// plugin or similar. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Bundles should not have their external symbols stripped. -STRIP_STYLE = non-global - -// Bundles need to be position independent -GCC_DYNAMIC_NO_PIC = NO diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundleGCSupported.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundleGCSupported.xcconfig deleted file mode 100644 index aa8d5a7f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/LoadableBundleGCSupported.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// LoadableBundleGCSupported.xcconfig -// -// Xcode configuration file for a loadable bundle target that supports garbage -// collection. Usually a Cocoa plugin or similar. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Include the basic Loadable Bundle config -#include "LoadableBundle.xcconfig" - -// Include the GC flag(s) -#include "../subconfig/GCSupported.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/ReleaseUnittest.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/ReleaseUnittest.xcconfig deleted file mode 100644 index f9a85d35..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/ReleaseUnittest.xcconfig +++ /dev/null @@ -1,37 +0,0 @@ -// -// ReleaseUnittest.xcconfig -// -// Xcode configuration file for a release unittest target. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Unittests are loadable bundles -#include "../subconfig/Unittest.xcconfig" - -// When running OCUnit tests in Release mode the unittests BUNDLE_LOADER -// is probably stripped (or at least it will be if they are using our -// config files). In that case the Unittest will fail to link because -// the symbols have been removed from the bundle's loader's symbol table. -// This flag tells the unittest to trust that the values will be available -// at runtime (or error out) and not to force an error at link time. -// Do NOT set BUNDLE_LOADER (Bundle Loader) setting in a release unittest target -// because you will run into interesting link issues -// "indirect symbol table entry n past the end of the symbol table" -OTHER_LDFLAGS = $(OTHER_LDFLAGS) -undefined dynamic_lookup diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibrary.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibrary.xcconfig deleted file mode 100644 index 7c37d50b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibrary.xcconfig +++ /dev/null @@ -1,29 +0,0 @@ -// -// SharedLibrary.xcconfig -// -// Xcode configuration file for a shared library target. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Dynamic libs need to be position independent -GCC_DYNAMIC_NO_PIC = NO - -// Dynamic libs should not have their external symbols stripped. -STRIP_STYLE = non-global \ No newline at end of file diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibraryGCSupported.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibraryGCSupported.xcconfig deleted file mode 100644 index 74ab9076..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/SharedLibraryGCSupported.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// SharedLibraryGCSupported.xcconfig -// -// Xcode configuration file for a shared library target that support garbage -// collection. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Include the basic Shared Library config -#include "SharedLibrary.xcconfig" - -// Include the GC flag(s) -#include "../subconfig/GCSupported.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibrary.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibrary.xcconfig deleted file mode 100644 index df1016be..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibrary.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// StaticLibrary.xcconfig -// -// Xcode configuration file for a static library target. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Static libs can be included in bundles so make them position independent -GCC_DYNAMIC_NO_PIC = NO - -// Static libs should not have their internal globals or external symbols -// stripped. -STRIP_STYLE = debugging diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibraryGCSupported.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibraryGCSupported.xcconfig deleted file mode 100644 index 07ea1d51..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/Target/StaticLibraryGCSupported.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// StaticLibraryGCSupported.xcconfig -// -// Xcode configuration file for a static library target that supports garbage -// collection. -// -// This is a _Target_ config file, for use in the "Based on" popup of the -// settings dialog for a target. Do not attempt to apply this as the base -// of an Xcode configuration in the project settings dialog. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Include the basic Static Library config -#include "StaticLibrary.xcconfig" - -// Include the GC flag(s) -#include "../subconfig/GCSupported.xcconfig" diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverage.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverage.xcconfig deleted file mode 100644 index 438d5c6a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverage.xcconfig +++ /dev/null @@ -1,25 +0,0 @@ -// -// CodeCoverage.xcconfig -// -// Xcode configuration file for building executables that need code coverage. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Static Code Coverage -#include "CodeCoverageStatic.xcconfig" - -// Need gcov library -OTHER_LDFLAGS = ${OTHER_LDFLAGS} -lgcov diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig deleted file mode 100644 index f6cca92e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// CodeCoverageStatic.xcconfig -// -// Xcode configuration file for building static libs that need code coverage. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - - -// For measuring code coverage -GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES -GCC_GENERATE_TEST_COVERAGE_FILES = YES diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Debug.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Debug.xcconfig deleted file mode 100644 index 7d54d612..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Debug.xcconfig +++ /dev/null @@ -1,47 +0,0 @@ -// -// Debug.xcconfig -// -// General Xcode configuration file for Debug targets. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// No optimization -GCC_OPTIMIZATION_LEVEL = 0 - -// Deployment postprocessing is what triggers Xcode to strip, turn it off -DEPLOYMENT_POSTPROCESSING = NO - -// Dead code stripping off -DEAD_CODE_STRIPPING = NO - -// Debug symbols should be on obviously -GCC_GENERATE_DEBUGGING_SYMBOLS = YES - -// Turn off warnings about uninitialized autos -// can only be done when GCC_OPTIMIZATION_LEVEL is actually optimizing -GCC_WARN_UNINITIALIZED_AUTOS = NO - -// Turns on special C++ STL checks to "encourage" good STL use -GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS = _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS DEBUG=1 - -// Turns on stack protection on debug builds for Leopard and above -GTM_CONFIGURATION_OTHER_CFLAGS = -fstack-protector -fstack-protector-all -// Stack protection doesn't exist on Tiger -GTM_CONFIGURATION_OTHER_CFLAGS[sdk=macosx10.4*] = - -// And is really broken on the iPhone Device. Works on simulator though. -// rdar://639430 Xcode generates bad Arm code if -fstack-protector -fstack-protector-all -GTM_CONFIGURATION_OTHER_CFLAGS[sdk=iphoneos*] = diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GCSupported.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GCSupported.xcconfig deleted file mode 100644 index 74bd027a..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GCSupported.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// GCSupported.xcconfig -// -// Xcode configuration file for making a build Garbage Collection enabled. -// Use the *GCSupported specific configs in the Target folder. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// enable garbage collection (but don't require it) -GCC_ENABLE_OBJC_GC = supported diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GTMMerge.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GTMMerge.xcconfig deleted file mode 100644 index 5ab141e5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/GTMMerge.xcconfig +++ /dev/null @@ -1,42 +0,0 @@ -// -// GTMMerge.xcconfig -// -// Xcode configuration file that merges other xcconfig settings. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Xcode doesn't allow you to "inherit" settings with includes so you always -// end up overriding settings accidentally. To avoid this, we instead -// allow you to define settings at different levels -// (GENERAL, PLATFORM (iPhone/Mac), CONFIGURATION (Release/Debug) and we merge -// those together here. -// We DO NOT inherit OTHER_CPLUSPLUSFLAGS because OTHER_CPLUSPLUSFLAGS by default -// takes on OTHER_CFLAGS settings, and we don't want those applied to our -// C++ files. OTHER_CFLAGS is the only way to set C specific settings on our -// C files that we don't want to have applied to our C++ files such as -// -Wold-style-definition -// If you would like to add your own custom settings to the base GTM ones -// please use the GTM_HOST_* settings. These are left empty by GTM and are -// for the host app to fill in. For example if you wanted to have stack -// protection turned on for both debug and release builds you could set -// GTM_HOST_OTHER_CFLAGS = -fstack-protector -fstack-protector-all -// in your own settings files, and then include the QSB ones. - -WARNING_CFLAGS = $(inherited) $(GTM_GENERAL_WARNING_CFLAGS) $(GTM_PLATFORM_WARNING_CFLAGS) $(GTM_CONFIGURATION_WARNING_CFLAGS) $(GTM_HOST_WARNING_CFLAGS) -OTHER_CFLAGS = $(inherited) $(GTM_GENERAL_OTHER_CFLAGS) $(GTM_PLATFORM_OTHER_CFLAGS) $(GTM_CONFIGURATION_OTHER_CFLAGS) $(GTM_HOST_OTHER_CFLAGS) -OTHER_CPLUSPLUSFLAGS = $(GTM_GENERAL_OTHER_CPLUSPLUSFLAGS) $(GTM_PLATFORM_OTHER_CPLUSPLUSFLAGS) $(GTM_CONFIGURATION_OTHER_CPLUSPLUSFLAGS) $(GTM_HOST_OTHER_CPLUSPLUSFLAGS) -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(GTM_GENERAL_GCC_PREPROCESSOR_DEFINITIONS) $(GTM_PLATFORM_GCC_PREPROCESSOR_DEFINITIONS) $(GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS) $(GTM_HOST_GCC_PREPROCESSOR_DEFINITIONS) -OTHER_LDFLAGS = $(inherited) $(GTM_GENERAL_OTHER_LDFLAGS) $(GTM_PLATFORM_OTHER_LDFLAGS) $(GTM_CONFIGURATION_OTHER_LDFLAGS) $(GTM_HOST_OTHER_LDFLAGS) diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/General.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/General.xcconfig deleted file mode 100644 index dc3e64f5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/General.xcconfig +++ /dev/null @@ -1,172 +0,0 @@ -// -// General.xcconfig -// -// Xcode configuration file for general build settings applicable to all -// projects and targets. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// NOTE: as of Xcode 3.1, for iPhone development, the two SDKs you can match are: -// SDK_NAME iphoneos2.0 -// SDK_NAME iphoneos2.1 -// SDK_NAME iphonesimulator2.0 -// SDK_NAME iphonesimulator2.1 -// for Mac OS developement, the values are: -// SDK_NAME macosx10.4 -// SDK_NAME macosx10.5 -// SDK_NAME macosx10.6 - -// Build for PPC and Intel (Leopard/SnowLeopard gets 64 bit also) -// Note that you can't build 10.5 with using SenTestingKit on ppc64 with -// SnowLeopard XCode because it doesn't ship with a ppc64 version of -// SenTestingKit. For this reason we are NOT building/testing GTM -// with ppc64 at this time. We override the 10.5 setting in the project -// file to turn it off. -ARCHS[sdk=macosx10.4*] = i386 ppc -ARCHS[sdk=macosx10.5*] = i386 x86_64 ppc ppc64 -ARCHS[sdk=macosx10.6*] = i386 x86_64 ppc - -// Build for arm for iPhone or Intel for the iPhone Simulator -ARCHS[sdk=iphoneos*] = armv6 -ARCHS[sdk=iphonesimulator*] = i386 - -// Build only the active architecture on iphone device targets -ONLY_ACTIVE_ARCH[sdk=iphoneos*] = YES - -// iPhone currently deploys on 10.5 only -MACOSX_DEPLOYMENT_TARGET[sdk=iphone*] = 10.5 - -// We want our pngs compressed when they are copied -COMPRESS_PNG_FILES = YES - -// Zerolink prevents link warnings so turn it off -ZERO_LINK = NO - -// Prebinding considered unhelpful in 10.3 and later -PREBINDING = NO - -// Work around Xcode bugs by using external strip. See: -// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html -SEPARATE_STRIP = YES - -// Force C99 dialect -GCC_C_LANGUAGE_STANDARD = c99 - -// Obj-C exceptions are needed for @synchronized(self) -GCC_ENABLE_OBJC_EXCEPTIONS = YES - -// not sure why apple defaults this on, but it's pretty risky -ALWAYS_SEARCH_USER_PATHS = NO - -// Turn on position dependent code for most cases (overridden where appropriate) -GCC_DYNAMIC_NO_PIC = YES - -// For ObjC++ we want C++ cdtors called -GCC_OBJC_CALL_CXX_CDTORS = YES - -// Use Obj-C fast dispatch -GCC_FAST_OBJC_DISPATCH = YES - -// Warn on implicit data conversions in 64bit builds -GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64*] = YES - -// Strictest warning policy that we can do -// Options intentionally turned off -// http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html -// -Wsystem-headers - since we can't fix them we are going to assume they're ok -// -Wtraditional - we are compiling with c99, so we don't care about trad -// -Wdeclaration-after-statement - we are compiling with c99 which allows this -// -Wpadded - lots of structures will get padded, so although this warning may -// be useful to show us badly padded structures, it causes to many -// warnings to be on generally. -// -Wunreachable-code - several macros use the do {} while (0) which always -// flags this. e.g. all the ST... macros for unittesting -// -Wredundant-decls - we sometimes use redundant decls to add an attribute -// to a function/method (i.e. -// -Waggregate-return - NSPoint, NSRect etc are often returned as aggregates -// -Wshorten-64-to-32 - this is defined in the 64 bit build settings -// -Wcast-qual - Would love to turn this on, but causes issues when converting -// CFTypes to NSTypes and also has issues with some external -// libraries (notably zlib) -// -Wundef - we conditionalize on TARGET_OS_IPHONE which is only defined -// in the iPhoneSDK making us unable to turn this warning on. -// -Wstrict-prototypes - breaks the GTM_METHOD_CHECK macro -// -Wcast-align - causes a whole pile of problems buildng with iPhoneSDK - -// Objective C warnings -// http://gcc.gnu.org/onlinedocs/gcc/Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html -// -Wassign-intercept - this really is more informational than a warning. -// -Wselector - the system headers define lots of methods with the same selector -// rendering this mostly useless to us -// -Wstrict-selector-match - the system headers define lots of methods with the -// same selector rendering this mostly useless to us -// Not being used currently because of Radar 5978978 -// GTM_GENERAL_WARNING_OBJC_ONLY_FLAGS=-Wundeclared-selector - -// C Only Warnings -GTM_GENERAL_OTHER_CFLAGS = -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition - -// C++ Only Warnings -GTM_GENERAL_OTHER_CPLUSPLUSFLAGS = -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo -GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES -GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES -GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES -GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES - -// General C/C++/ObjC/ObjC++ warnings -// These are generally ordered in easiest to hardest to support. -// If you are transitioning, you can turn on the levels one level at a time -// in your project file by editing GTM_GENERAL_WARNING_CFLAGS and only -// including the warning levels that you currently are compiling against. -// GTM should always compile with full warnings. -GTM_GENERAL_WARNING_CFLAGS1 = -Wall -Wendif-labels -Winvalid-pch -Wformat=2 -Wmissing-format-attribute -Wwrite-strings -Wstack-protector -Wstrict-aliasing=2 -GTM_GENERAL_WARNING_CFLAGS2 = -Wpacked -Wmissing-field-initializers -GTM_EXTRA_WARNING_OVERRIDE_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -GTM_GENERAL_WARNING_CFLAGS3 = -Wextra $(GTM_EXTRA_WARNING_OVERRIDE_CFLAGS) -Wpointer-arith -Wdisabled-optimization -Wfloat-equal -GTM_GENERAL_WARNING_CFLAGS = $(GTM_GENERAL_WARNING_CFLAGS1) $(GTM_GENERAL_WARNING_CFLAGS2) $(GTM_GENERAL_WARNING_CFLAGS3) - -// GCC_WARN_UNINITIALIZED_AUTOS is defined in the release/debug xcconfigs. -GCC_WARN_CHECK_SWITCH_STATEMENTS = YES -GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_TREAT_WARNINGS_AS_ERRORS = YES -GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES -GCC_WARN_ABOUT_RETURN_TYPE = YES -GCC_WARN_MISSING_PARENTHESES = YES -GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES -GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES -GCC_WARN_UNKNOWN_PRAGMAS = YES -GCC_WARN_UNUSED_LABEL = YES -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_VALUE = YES -GCC_WARN_UNUSED_VARIABLE = YES -GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES -// We don't turn on shadow and sign comparisons because too many 3rd party -// libaries don't compile with them turned on (sign compare rarely catches -// errors, but shadow is very useful). -// NOTE: sign compare is also controlled by -Wextra, we we override it above. -// GCC_WARN_SHADOW = YES -// GCC_WARN_SIGN_COMPARE = YES - -GCC_WARN_PEDANTIC = NO -GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO -GCC_WARN_PROTOTYPE_CONVERSION = NO -GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO -GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO -GCC_WARN_UNUSED_PARAMETER = NO -// Use of Gestalt requires 4 char constants (amongst other things) -GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/LeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/LeopardOrLater.xcconfig deleted file mode 100644 index c0f75bc8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/LeopardOrLater.xcconfig +++ /dev/null @@ -1,25 +0,0 @@ -// -// LeopardOrLater.xcconfig -// -// Xcode configuration file for projects targeting 10.5 Leopard or later. These -// settings produce a Universal binary compatible with 10.5 for PPC and Intel. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Default SDK and minimum OS version is 10.5 -SDKROOT = ${DEVELOPER_SDK_DIR}/MacOSX10.5.sdk -MACOSX_DEPLOYMENT_TARGET = 10.5 -GCC_VERSION = 4.0 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Release.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Release.xcconfig deleted file mode 100644 index 4c5ad8ac..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Release.xcconfig +++ /dev/null @@ -1,45 +0,0 @@ -// -// Release.xcconfig -// -// General Xcode configuration file for Release targets. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Optimize for space and size (Apple recommendation) -GCC_OPTIMIZATION_LEVEL = s - -// Deploment postprocessing is what triggers Xcode to strip -DEPLOYMENT_POSTPROCESSING = YES - -// No symbols -GCC_GENERATE_DEBUGGING_SYMBOLS = NO - -// Dead code strip does not affect ObjC code but can help for C -DEAD_CODE_STRIPPING = YES - -// ASSERT going away in release tends to create unused vars. -// init-self can only be turned on when optimizations are on -GTM_CONFIGURATION_WARNING_CFLAGS = -Wno-unused-variable -Winit-self -Wno-extra - -// NDEBUG is used by things like assert.h, so define it for general compat. -GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS = NDEBUG=1 - -// Give us warnings about uninitialized autos -// can only be done when GCC_OPTIMIZATION_LEVEL is actually optimizing -GCC_WARN_UNINITIALIZED_AUTOS = YES - -// When we strip we want to strip all symbols in release, but save externals. -STRIP_STYLE = all diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig deleted file mode 100644 index 0a7475e9..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// -// SnowLeopardOrLater.xcconfig -// -// Xcode configuration file for projects targeting 10.6 SnowLeopard or later. -// These settings produce a Universal binary compatible with 10.6 for -// PPC and Intel. -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Default SDK and minimum OS version is 10.6 -SDKROOT = ${DEVELOPER_SDK_DIR}/MacOSX10.6.sdk -MACOSX_DEPLOYMENT_TARGET = 10.6 -GCC_VERSION = 4.0 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/TigerOrLater.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/TigerOrLater.xcconfig deleted file mode 100644 index bc0f8f45..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/TigerOrLater.xcconfig +++ /dev/null @@ -1,25 +0,0 @@ -// -// TigerOrLater.xcconfig -// -// Xcode configuration file for projects targeting 10.4 Tiger or later. These -// settings produce a Universal binary compatible with 10.4 for PPC and Intel. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Default SDK and minimum OS version is 10.4 -SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk -MACOSX_DEPLOYMENT_TARGET = 10.4 -GCC_VERSION = 4.0 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Unittest.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Unittest.xcconfig deleted file mode 100644 index 96121eee..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/Unittest.xcconfig +++ /dev/null @@ -1,33 +0,0 @@ -// -// Unittest.xcconfig -// -// Xcode configuration file for a basic unittest targets. Use the debug or -// release build specific configs in the Target folder. -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Unittests are loadable bundles -#include "../Target/LoadableBundle.xcconfig" - -// Force C99 dialect with GNU extensions (needed for OCUnit) -GCC_C_LANGUAGE_STANDARD = gnu99 - -// Deploment postprocessing is what triggers Xcode to strip, we don't strip -// unittests -DEPLOYMENT_POSTPROCESSING = NO - -// Most common unittests will be objective-c -WRAPPER_EXTENSION = octest diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone20.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone20.xcconfig deleted file mode 100644 index 0f92c95b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone20.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// iPhone20.xcconfig -// -// Xcode configuration file for building a Debug target on iPhone OS 2.0 -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// Set default SDK. -SDKROOT = iphoneos2.0 - -// iPhone currently deploys on 10.5 only -MACOSX_DEPLOYMENT_TARGET = 10.5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone21.xcconfig b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone21.xcconfig deleted file mode 100644 index 61c59edb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/subconfig/iPhone21.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// iPhone21.xcconfig -// -// Xcode configuration file for building a Debug target on iPhone OS 2.1 -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// Set default SDK. -SDKROOT = iphoneos2.1 - -// iPhone currently deploys on 10.5 only -MACOSX_DEPLOYMENT_TARGET = 10.5 diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/xcconfigs-readme.txt b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/xcconfigs-readme.txt deleted file mode 100644 index 87a6dd7b..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/XcodeConfig/xcconfigs-readme.txt +++ /dev/null @@ -1,53 +0,0 @@ -Xcode Configs are sort of a black art, any time you have a set of rules, you -quickly hit a few exceptions. - -The main goal of using these is as follow: - -Edit your Project level build settings by removing as much as possible, and -then set the per Configuration settings to one of the project xcode config -files w/in the Project subfolder here. This will batch setup the project to -build Debug/Release with a specific SDK. - -If you are building a Shared Library, Loadable Bundle (Framework) or UnitTest -you will need to apply a further Xcode Config file at the target level. You do -this again by clearing most of the settings on the target, and just setting the -build config for that target to be the match from the Target subfolder here. - -To see an example of this, look at CoverStory -(http://code.google.com/p/coverstory) or Vidnik -(http://code.google.com/p/vidnik). - - -The common exception...If you need to have a few targets build w/ different -SDKs, then you hit the most common of the exceptions. For these, you'd need -the top level config not to set some things, the simplest way to do this seems -to be to remove as many of the settings from the project file, and make new -wrapper xcconfig files that inclue both the project level and target level -setting and set them on the targets (yes, this is like the MetroWerks days -where you can quickly explode in a what seems like N^2 (or worse) number of -config files. With a little luck, future versions of Xcode might have some -support to make mixing SDKs easier. - -Remember: When using the configs at any given layer, make sure you set them for -each build configuration you need (not just the active one). - -Many of the build settings are more than just yes/no flags and take -a list of values that you may want to change at different levels. -Xcode doesn't allow you to "inherit" settings with includes so you always -end up overriding settings accidentally. To avoid this, we instead -allow you to define settings at different levels -(GENERAL, PLATFORM (iPhone/Mac), CONFIGURATION (Release/Debug). -We do this by setting a GTM version of the setting (so for OTHER_CFLAGS it's -GTM_XXX_OTHER_CFLAGS where xxx is GENERAL, PLATFORM or CONFIGURATION depending -at what level the flag is set. These are all merged together in the -GTMMerge.xcconfig. Do not modify the base setting (OTHER_CFLAGS) instead modify -the GTM one at the level you want it modified. - -The major place this may affect you is that we have really tightened down on -the warnings. To make it easier for you to move your code onto the new -xcconfig files, we have split the warnings up into three categories, which in -general you can think of as easy, moderate and extreme. If you run into a lot -of warnings when you compile, look at changing the GTM_GENERAL_WARNING_CFLAGS -setting to only include lower levels (eg GTM_GENERAL_WARNING_CFLAGS1) and see -if that makes it easier on you. Look inside General.xcconfig and search for -GTM_GENERAL_WARNING_CFLAGS1 for more info. diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.h deleted file mode 100644 index 828f05aa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.h +++ /dev/null @@ -1,328 +0,0 @@ -// -// GTMABAddressBook.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// These classes wrap up the iPhone AddressBook 'C' API in a manner very -// similar to that found on Mac OS X. They differ only in that none of these -// routines throws, and some of the types are different as necessitated by -// the APIs that they wrap. These wrappers also protect you from a number -// of issues in the AddressBook API (as of iPhone SDK 2.0/2.1) -// -// Note that there is a strings file that you may want to localize -// (GTMABAddressBook.strings). -// -// If things seem strange, it may be due to one of the following radars: -// 6240394 AddressBook framework constants not initialized until -// ABCreateAddressBook called -// -- CLOSED as designed -// 6208390 Integer and real values don't work in ABMultiValueRefs -// (and this isn't part of the title, but dictionaries don't work -// either) -// 6207605 RecordIDs for people and groups are not unique in AddressBook -// -- CLOSED as designed -// 6204021 kABGroupNameProperty and kABPersonFirstNameProperty have the same -// value -// 6203982 ABPersonCopyLocalizedPropertyName returns name for -// kABGroupNameProperty -// 6203961 ABPersonGetTypeOfProperty returns a type for kABGroupNameProperty -// 6203854 ABMultiValues hash to their address -// 6203836 ABRecords hash to their address -// -- CLOSED behaves correctly -// 6203606 Need CFTypeIDs for AddressBook CFTypes -// 6202868 ABPersonSetImageData should validate image data -// 6202860 Passing nil person into ABGroupAddMember crashes -// -- CLOSED behaves correctly -// 6202827 Passing nil info ABMultiValueAddValueAndLabel causes crash -// -- CLOSED behaves correctly -// 6202807 ABMultiValueInsertValueAndLabelAtIndex allows you to insert values -// past end -// 6201276 Removing a NULL record using ABAddressBookRemoveRecord crashes -// -- CLOSED behaves correctly -// 6201258 Adding a NULL record using ABAddressBookAddRecord crashes -// -- CLOSED behaves correctly -// 6201046 ABRecordSetValue returns true even if you pass in a bad type for a -// value -// 6201005 ABRecordRemoveValue returns true for value that aren't in the record -// -- CLOSED behaves correctly -// 6200703 ABAddressBookAddRecord doesn't add an item to the people array until -// it's saved -// 6200638 ABAddressBookHasUnsavedChanges doesn't work - -#import -#import -#import "GTMDefines.h" - -#if !GTM_IPHONE_SDK -#error This file is for iPhone use only use ABAddressBook on Mac OS X -#endif - -@class GTMABPerson; -@class GTMABGroup; -@class GTMABRecord; - -GTM_EXTERN NSString *const kGTMABUnknownPropertyName; - -// Wrapper for an AddressBook on iPhone -@interface GTMABAddressBook : NSObject { - @private - ABAddressBookRef addressBook_; -} - -// Returns a new instance of an address book. -+ (GTMABAddressBook *)addressBook; - -// Return the address book reference -- (ABAddressBookRef)addressBookRef; - -// Saves changes made since the last save -// Return YES if successful (or there was no change) -- (BOOL)save; - -// Saves changes made since the last save -// Return YES if successful (or there was no change) -- (BOOL)saveAndReturnError:(NSError **)error; - -// Returns YES if there are unsaved changes -// The unsaved changes flag is automatically set when changes are made -// As of iPhone 2.1, this does not work, and will always return NO. -// Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work -- (BOOL)hasUnsavedChanges; - -// Reverts any changes that have been made and resets the unsaved flag -// Be sure to read notes for -hasUnsavedChanges and -people and -groups. -- (void)revert; - -// Returns a GTMABPerson matching an ID -// Returns nil if the record could not be found -- (GTMABPerson *)personForId:(ABRecordID)uniqueId; - -// Returns a GTMABGroup matching an ID -// Returns nil if the record could not be found -- (GTMABGroup *)groupForId:(ABRecordID)uniqueId; - -// Adds a record (ABPerson or ABGroup) to the AddressBook database -// Be sure to read notes for -people and -group. -- (BOOL)addRecord:(GTMABRecord *)record; - -// Removes a record (ABPerson or ABGroup) from the AddressBook database -- (BOOL)removeRecord:(GTMABRecord *)record; - -// Returns an array (GTMABPerson) of all the people in the AddressBook database -// As of iPhone 2.1, this array will not contain new entries until you save -// the address book. -// Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people array -// until it's saved -- (NSArray *)people; - -// Returns an array of all the groups (GTMABGroup) in the AddressBook database -// As of iPhone 2.1, this array will not contain new entries until you save -// the address book. -// Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people array -// until it's saved -- (NSArray *)groups; - -// Returns a localized name for a given label -+ (NSString *)localizedLabel:(CFStringRef)label; - -@end - -// Wrapper for a ABRecord on iPhone. -// A abstract class. Instantiate one of the concrete subclasses, GTMABPerson or -// GTMABGroup. -@interface GTMABRecord : NSObject { - @private - ABRecordRef record_; -} - -// Create a record with a recordRef. -// Since GTMABRecord is an abstract base class, attempting to create one -// of these directly will throw an exception. Use with one of the concrete -// subclasses. -+ (id)recordWithRecord:(ABRecordRef)record; - -// Designated initializer -// Since GTMABRecord is an abstract base class, attempting to create one -// of these directly will throw an exception. Use with one of the concrete -// subclasses. -- (id)initWithRecord:(ABRecordRef)record; - -// Return our recordRef -- (ABRecordRef)recordRef; - -// Return the recordID for the record -- (ABRecordID)recordID; - -// Returns the value of a given property. -// The type of the value depends on the property type. -- (id)valueForProperty:(ABPropertyID)property; - -// Set the value of a given property. -// The type of the value must match the property type. -// Returns YES if value set properly -- (BOOL)setValue:(id)value forProperty:(ABPropertyID)property; - -// Removes the value for the property -// Returns yes if value removed -- (BOOL)removeValueForProperty:(ABPropertyID)property; - -// returns a human friendly name for the record -- (NSString *)compositeName; - -// returns the type of a property -+ (ABPropertyType)typeOfProperty:(ABPropertyID)property; - -// returns a human friendly localized name for a property -+ (NSString *)localizedPropertyName:(ABPropertyID)property; -@end - -// Wrapper for an ABPerson on iPhone -@interface GTMABPerson : GTMABRecord - -// Creates a person with a first name and a last name. -+ (GTMABPerson *)personWithFirstName:(NSString *)first - lastName:(NSString *)last; - -// Sets image data for a person. Data must be to a block of data that -// will create a valid UIImage. -- (BOOL)setImageData:(NSData *)data; - -// Returns the image data. -- (NSData *)imageData; - -// Returns the image for a person -- (UIImage *)image; - -// Sets a the image for a person -- (BOOL)setImage:(UIImage *)image; - -// Returns the format in with names are composited -+ (ABPersonCompositeNameFormat)compositeNameFormat; -@end - -// Wrapper for a ABGroup on iPhone -@interface GTMABGroup : GTMABRecord -// Create a new group named |name| -+ (GTMABGroup *)groupNamed:(NSString *)name; - -// Return an array of members (GTMABPerson) -- (NSArray *)members; - -// Add a member to a group -- (BOOL)addMember:(GTMABPerson *)person; - -// Remove a member from a group -- (BOOL)removeMember:(GTMABPerson *)person; -@end - -// GTMABMultiValue does not supprt NSFastEnumeration because in -// the Apple frameworks it returns identifiers which are already NSStrings. -// In our case identifiers aren't NS types, and it doesn't make sense -// to convert them to NSNumbers just to convert them back so you can -// actually get at the values and labels. -// Instead we supply valueEnumerator and labelEnumerator which you can -// fast enumerate on to get values and labels directly. -@interface GTMABMultiValue : NSObject { - @protected - ABMultiValueRef multiValue_; -} - -// Create a multi value -- (id)initWithMultiValue:(ABMultiValueRef)multiValue; - -// return it's ref -- (ABMultiValueRef)multiValueRef; - -// Returns the number of value/label pairs -- (NSUInteger)count; - -// Returns a value at a given index -// Returns nil if index is out of bounds -- (id)valueAtIndex:(NSUInteger)idx; - -// Returns a label at a given index -// Returns nil if index is out of bounds -- (NSString *)labelAtIndex:(NSUInteger)idx; - -// Returns an identifier at a given index -// Returns kABMultiValueInvalidIdentifier if index is out of bounds -- (ABMultiValueIdentifier)identifierAtIndex:(NSUInteger)idx; - -// Returns the index of a given identifier -// Returns NSNotFound if not found -- (NSUInteger)indexForIdentifier:(ABMultiValueIdentifier)identifier; - -// Type of the contents of this multivalue -- (ABPropertyType)propertyType; - -// Returns the value for a given identifier -// Returns nil if the identifier is not found -- (id)valueForIdentifier:(ABMultiValueIdentifier)identifier; - -// Returns the value for a given identifier -// Returns nil if the identifier is not found -- (NSString *)labelForIdentifier:(ABMultiValueIdentifier)identifier; - -// Returns an enumerator for enumerating through values -- (NSEnumerator *)valueEnumerator; - -// Returns an enumerator for enumerating through labels -- (NSEnumerator *)labelEnumerator; - -@end - -@interface GTMABMutableMultiValue : GTMABMultiValue { - @private - // Use unsigned long here instead of NSUInteger because that's what - // NSFastEnumeration Protocol wants currently (iPhone 2.1) - unsigned long mutations_; -} - -// Create a new mutable multivalue with a given type -+ (id)valueWithPropertyType:(ABPropertyType)type; - -// Create a new mutable multivalue with a given type -- (id)initWithPropertyType:(ABPropertyType)type; - -// Create a new mutable multivalue based on |multiValue| -- (id)initWithMutableMultiValue:(ABMutableMultiValueRef)multiValue; - -// Adds a value with its label -// Returns the identifier if successful, kABMultiValueInvalidIdentifier -// otherwise. -- (ABMultiValueIdentifier)addValue:(id)value withLabel:(CFStringRef)label; - -// Insert a value/label pair at a given index -// Returns the identifier if successful. kABMultiValueInvalidIdentifier -// otherwise -// If index is out of bounds, returns kABMultiValueInvalidIdentifier. -- (ABMultiValueIdentifier)insertValue:(id)value - withLabel:(CFStringRef)label - atIndex:(NSUInteger)index; - -// Removes a value/label pair at a given index -// Returns NO if index out of bounds -- (BOOL)removeValueAndLabelAtIndex:(NSUInteger)index; - -// Replaces a value at a given index -// Returns NO if index out of bounds -- (BOOL)replaceValueAtIndex:(NSUInteger)index withValue:(id)value; - -// Replaces a label at a given index -// Returns NO if index out of bounds -- (BOOL)replaceLabelAtIndex:(NSUInteger)index withLabel:(CFStringRef)label; - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.m deleted file mode 100644 index 05dc27f5..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.m +++ /dev/null @@ -1,903 +0,0 @@ -// -// GTMAddressBook.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMABAddressBook.h" -#import "GTMGarbageCollection.h" - -NSString *const kGTMABUnknownPropertyName = @"UNKNOWN_PROPERTY"; - -typedef struct { - ABPropertyType pType; - Class class; -} TypeClassNameMap; - -@interface GTMABMultiValue () -- (unsigned long*)mutations; -@end - -@interface GTMABMutableMultiValue () -// Checks to see if a value is a valid type to be stored in this multivalue -- (BOOL)checkValueType:(id)value; -@end - -@interface GTMABMultiValueEnumerator : NSEnumerator { - @private - __weak ABMultiValueRef ref_; // ref_ cached from enumeree_ - GTMABMultiValue *enumeree_; - unsigned long mutations_; - NSUInteger count_; - NSUInteger index_; - BOOL useLabels_; -} -+ (id)valueEnumeratorFor:(GTMABMultiValue*)enumeree; -+ (id)labelEnumeratorFor:(GTMABMultiValue*)enumeree; -- (id)initWithEnumeree:(GTMABMultiValue*)enumeree useLabels:(BOOL)useLabels; -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id *)stackbuf - count:(NSUInteger)len; -@end - -@implementation GTMABAddressBook -+ (GTMABAddressBook *)addressBook { - return [[[self alloc] init] autorelease]; -} - -- (id)init { - if ((self = [super init])) { - addressBook_ = ABAddressBookCreate(); - if (!addressBook_) { - // COV_NF_START - [self release]; - self = nil; - // COV_NF_END - } - } - return self; -} - -- (void)dealloc { - if (addressBook_) { - CFRelease(addressBook_); - } - [super dealloc]; -} - -- (BOOL)save { - return [self saveAndReturnError:NULL]; -} - -- (BOOL)saveAndReturnError:(NSError **)error { - CFErrorRef cfError = NULL; - bool wasGood = ABAddressBookSave(addressBook_, &cfError); - GTMCFAutorelease(cfError); - if (error) { - *error = (NSError *)cfError; // COV_NF_LINE - } - return wasGood ? YES : NO; -} - -- (BOOL)hasUnsavedChanges { - return ABAddressBookHasUnsavedChanges(addressBook_); -} - -- (void)revert { - ABAddressBookRevert(addressBook_); -} - -- (BOOL)addRecord:(GTMABRecord *)record { - // Note: we check for bad data here because of radar - // 6201258 Adding a NULL record using ABAddressBookAddRecord crashes - if (!record) return NO; - CFErrorRef cfError = NULL; - bool wasGood = ABAddressBookAddRecord(addressBook_, - [record recordRef], &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (BOOL)removeRecord:(GTMABRecord *)record { - // Note: we check for bad data here because of radar - // 6201276 Removing a NULL record using ABAddressBookRemoveRecord crashes - if (!record) return NO; - CFErrorRef cfError = NULL; - bool wasGood = ABAddressBookRemoveRecord(addressBook_, - [record recordRef], &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (NSArray *)people { - NSArray *people - = GTMCFAutorelease(ABAddressBookCopyArrayOfAllPeople(addressBook_)); - NSMutableArray *result = [NSMutableArray arrayWithCapacity:[people count]]; - for (id person in people) { - [result addObject:[GTMABPerson recordWithRecord:person]]; - } - return result; -} - -- (NSArray *)groups { - NSArray *groups - = GTMCFAutorelease(ABAddressBookCopyArrayOfAllGroups(addressBook_)); - NSMutableArray *result = [NSMutableArray arrayWithCapacity:[groups count]]; - for (id group in groups) { - [result addObject:[GTMABGroup recordWithRecord:group]]; - } - return result; -} - -- (ABAddressBookRef)addressBookRef { - return addressBook_; -} - -- (GTMABPerson *)personForId:(ABRecordID)uniqueId { - GTMABPerson *person = nil; - ABRecordRef ref = ABAddressBookGetPersonWithRecordID(addressBook_, uniqueId); - if (ref) { - person = [GTMABPerson recordWithRecord:ref]; - } - return person; -} - -- (GTMABGroup *)groupForId:(ABRecordID)uniqueId { - GTMABGroup *group = nil; - ABRecordRef ref = ABAddressBookGetGroupWithRecordID(addressBook_, uniqueId); - if (ref) { - group = [GTMABGroup recordWithRecord:ref]; - } - return group; -} - -+ (NSString *)localizedLabel:(CFStringRef)label { - return GTMCFAutorelease(ABAddressBookCopyLocalizedLabel(label)); -} - -@end - -@implementation GTMABRecord -+ (id)recordWithRecord:(ABRecordRef)record { - return [[[self alloc] initWithRecord:record] autorelease]; -} - -- (id)initWithRecord:(ABRecordRef)record { - if ((self = [super init])) { - if ([self class] == [GTMABRecord class]) { - [self autorelease]; - [self doesNotRecognizeSelector:_cmd]; - } - if (!record) { - [self release]; - self = nil; - } else { - record_ = CFRetain(record); - } - } - return self; -} - -- (NSUInteger)hash { - // This really isn't completely valid due to - // 6203836 ABRecords hash to their address - // but it's the best we can do without knowing what properties - // are in a record, and we don't have an API for that. - return CFHash(record_); -} - -- (BOOL)isEqual:(id)object { - // This really isn't completely valid due to - // 6203836 ABRecords hash to their address - // but it's the best we can do without knowing what properties - // are in a record, and we don't have an API for that. - return [object respondsToSelector:@selector(recordRef)] - && CFEqual(record_, [object recordRef]); -} - -- (void)dealloc { - if (record_) { - CFRelease(record_); - } - [super dealloc]; -} - -- (ABRecordRef)recordRef { - return record_; -} - -- (ABRecordID)recordID { - return ABRecordGetRecordID(record_); -} - -- (id)valueForProperty:(ABPropertyID)property { - id value = GTMCFAutorelease(ABRecordCopyValue(record_, property)); - if (value) { - if ([[self class] typeOfProperty:property] & kABMultiValueMask) { - value = [[[GTMABMultiValue alloc] initWithMultiValue:value] autorelease]; - } - } - return value; -} - -- (BOOL)setValue:(id)value forProperty:(ABPropertyID)property { - if (!value) return NO; - // We check the type here because of - // Radar 6201046 ABRecordSetValue returns true even if you pass in a bad type - // for a value - TypeClassNameMap fullTypeMap[] = { - { kABStringPropertyType, [NSString class] }, - { kABIntegerPropertyType, [NSNumber class] }, - { kABRealPropertyType, [NSNumber class] }, - { kABDateTimePropertyType, [NSDate class] }, - { kABDictionaryPropertyType, [NSDictionary class] }, - { kABMultiStringPropertyType, [GTMABMultiValue class] }, - { kABMultiRealPropertyType, [GTMABMultiValue class] }, - { kABMultiDateTimePropertyType, [GTMABMultiValue class] }, - { kABMultiDictionaryPropertyType, [GTMABMultiValue class] } - }; - ABPropertyType type = [[self class] typeOfProperty:property]; - BOOL wasFound = NO; - for (size_t i = 0; i < sizeof(fullTypeMap) / sizeof(TypeClassNameMap); ++i) { - if (fullTypeMap[i].pType == type) { - wasFound = YES; - if (![[value class] isSubclassOfClass:fullTypeMap[i].class]) { - return NO; - } - } - } - if (!wasFound) { - return NO; - } - if (type & kABMultiValueMask) { - value = (id)[value multiValueRef]; - } - CFErrorRef cfError = nil; - bool wasGood = ABRecordSetValue(record_, property, (CFTypeRef)value, &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (BOOL)removeValueForProperty:(ABPropertyID)property { - CFErrorRef cfError = nil; - // We check to see if the value is in the property because of: - // Radar 6201005 ABRecordRemoveValue returns true for value that aren't - // in the record - id value = [self valueForProperty:property]; - bool wasGood = value && ABRecordRemoveValue(record_, property, &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (NSString *)compositeName { - return GTMCFAutorelease(ABRecordCopyCompositeName(record_)); -} - -// COV_NF_START -// Both of these methods are to be overridden by their subclasses -+ (ABPropertyType)typeOfProperty:(ABPropertyID)property { - [self doesNotRecognizeSelector:_cmd]; - return kABInvalidPropertyType; -} - -+ (NSString *)localizedPropertyName:(ABPropertyID)property { - [self doesNotRecognizeSelector:_cmd]; - return nil; -} -// COV_NF_END -@end - -@implementation GTMABPerson - -+ (GTMABPerson *)personWithFirstName:(NSString *)first - lastName:(NSString *)last { - GTMABPerson *person = [[[self alloc] init] autorelease]; - if (person) { - BOOL isGood = YES; - if (first) { - isGood = [person setValue:first forProperty:kABPersonFirstNameProperty]; - } - if (isGood && last) { - isGood = [person setValue:last forProperty:kABPersonLastNameProperty]; - } - if (!isGood) { - // COV_NF_START - // Marked as NF because I don't know how to force an error - [person release]; - person = nil; - // COV_NF_END - } - } - return person; -} - -- (id)init { - ABRecordRef person = ABPersonCreate(); - self = [super initWithRecord:person]; - if (person) { - CFRelease(person); - } - return self; -} - -- (BOOL)setImageData:(NSData *)data { - CFErrorRef cfError = NULL; - bool wasGood = NO; - if (!data) { - wasGood = ABPersonRemoveImageData([self recordRef], &cfError); - } else { - // We verify that the data is good because of: - // Radar 6202868 ABPersonSetImageData should validate image data - UIImage *image = [UIImage imageWithData:data]; - wasGood = image && ABPersonSetImageData([self recordRef], - (CFDataRef)data, &cfError); - } - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (UIImage *)image { - return [UIImage imageWithData:[self imageData]]; -} - -- (BOOL)setImage:(UIImage *)image { - NSData *data = UIImagePNGRepresentation(image); - return [self setImageData:data]; -} - -- (NSData *)imageData { - return GTMCFAutorelease(ABPersonCopyImageData([self recordRef])); -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ %@ %@ %d", - [self class], - [self valueForProperty:kABPersonFirstNameProperty], - [self valueForProperty:kABPersonLastNameProperty], - [self recordID]]; -} - -+ (NSString *)localizedPropertyName:(ABPropertyID)property { - return GTMCFAutorelease(ABPersonCopyLocalizedPropertyName(property)); -} - -+ (ABPersonCompositeNameFormat)compositeNameFormat { - return ABPersonGetCompositeNameFormat(); -} - -+ (ABPropertyType)typeOfProperty:(ABPropertyID)property { - return ABPersonGetTypeOfProperty(property); -} -@end - -@implementation GTMABGroup - -+ (GTMABGroup *)groupNamed:(NSString *)name { - GTMABGroup *group = [[[self alloc] init] autorelease]; - if (group) { - if (![group setValue:name forProperty:kABGroupNameProperty]) { - // COV_NF_START - // Can't get setValue to fail for me - [group release]; - group = nil; - // COV_NF_END - } - } - return group; -} - -- (id)init { - ABRecordRef group = ABGroupCreate(); - self = [super initWithRecord:group]; - if (group) { - CFRelease(group); - } - return self; -} - -- (NSArray *)members { - NSArray *people - = GTMCFAutorelease(ABGroupCopyArrayOfAllMembers([self recordRef])); - NSMutableArray *gtmPeople = [NSMutableArray arrayWithCapacity:[people count]]; - for (id person in people) { - [gtmPeople addObject:[GTMABPerson recordWithRecord:(ABRecordRef)person]]; - } - return gtmPeople; -} - -- (BOOL)addMember:(GTMABPerson *)person { - CFErrorRef cfError = nil; - // We check for person because of - // Radar 6202860 Passing nil person into ABGroupAddMember crashes - bool wasGood = person && ABGroupAddMember([self recordRef], - [person recordRef], &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -- (BOOL)removeMember:(GTMABPerson *)person { - CFErrorRef cfError = nil; - // We check for person because of - // Radar 6202860 Passing nil person into ABGroupAddMember crashes - // (I know this is remove, but it crashes there too) - bool wasGood = person && ABGroupRemoveMember([self recordRef], - [person recordRef], &cfError); - if (cfError) { - // COV_NF_START - _GTMDevLog(@"Error in [%@ %@]: %@", - [self class], NSStringFromSelector(_cmd), cfError); - CFRelease(cfError); - // COV_NF_END - } - return wasGood ? YES : NO; -} - -+ (ABPropertyType)typeOfProperty:(ABPropertyID)property { - ABPropertyType type = kABInvalidPropertyType; - if (property == kABGroupNameProperty) { - type = kABStringPropertyType; - } - return type; -} - -+ (NSString *)localizedPropertyName:(ABPropertyID)property { - NSString *name = kGTMABUnknownPropertyName; - if (property == kABGroupNameProperty) { - name = NSLocalizedStringFromTable(@"Name", - @"GTMABAddressBook", - @"name property"); - } - return name; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"%@ %@ %d", - [self class], - [self valueForProperty:kABGroupNameProperty], - [self recordID]]; -} -@end - -@implementation GTMABMultiValue -- (id)init { - // Call super init and release so we don't leak - [[super init] autorelease]; - [self doesNotRecognizeSelector:_cmd]; - return nil; // COV_NF_LINE -} - -- (id)initWithMultiValue:(ABMultiValueRef)multiValue { - if ((self = [super init])) { - if (!multiValue) { - [self release]; - self = nil; - } else { - multiValue_ = CFRetain(multiValue); - } - } - return self; -} - -- (id)copyWithZone:(NSZone *)zone { - return [[GTMABMultiValue alloc] initWithMultiValue:multiValue_]; -} - -- (id)mutableCopyWithZone:(NSZone *)zone { - return [[GTMABMutableMultiValue alloc] initWithMultiValue:multiValue_]; -} - -- (NSUInteger)hash { - // I'm implementing hash instead of using CFHash(multiValue_) because - // 6203854 ABMultiValues hash to their address - NSUInteger count = [self count]; - NSUInteger hash = 0; - for (NSUInteger i = 0; i < count; ++i) { - NSString *label = [self labelAtIndex:i]; - id value = [self valueAtIndex:i]; - hash += [label hash]; - hash += [value hash]; - } - return hash; -} - -- (BOOL)isEqual:(id)object { - // I'm implementing isEqual instea of using CFEquals(multiValue,...) because - // 6203854 ABMultiValues hash to their address - // and it appears CFEquals just calls through to hash to compare them. - BOOL isEqual = NO; - if ([object respondsToSelector:@selector(multiValueRef)]) { - isEqual = multiValue_ == [object multiValueRef]; - if (!isEqual) { - NSUInteger count = [self count]; - NSUInteger objCount = [object count]; - isEqual = count == objCount; - for (NSUInteger i = 0; isEqual && i < count; ++i) { - NSString *label = [self labelAtIndex:i]; - NSString *objLabel = [object labelAtIndex:i]; - isEqual = [label isEqual:objLabel]; - if (isEqual) { - id value = [self valueAtIndex:i]; - id objValue = [object valueAtIndex:i]; - isEqual = [value isEqual:objValue]; - } - } - } - } - return isEqual; -} - -- (void)dealloc { - if (multiValue_) { - CFRelease(multiValue_); - } - [super dealloc]; -} - -- (ABMultiValueRef)multiValueRef { - return multiValue_; -} - -- (NSUInteger)count { - return ABMultiValueGetCount(multiValue_); -} - -- (id)valueAtIndex:(NSUInteger)idx { - id value = nil; - if (idx < [self count]) { - value = GTMCFAutorelease(ABMultiValueCopyValueAtIndex(multiValue_, idx)); - ABPropertyType type = [self propertyType]; - if (type == kABIntegerPropertyType - || type == kABRealPropertyType - || type == kABDictionaryPropertyType) { - // This is because of - // 6208390 Integer and real values don't work in ABMultiValueRefs - // Apparently they forget to add a ref count on int, real and - // dictionary values in ABMultiValueCopyValueAtIndex, although they do - // remember them for all other types. - // Once they fix this, this will lead to a leak, but I figure the leak - // is better than the crash. Our unittests will test to make sure that - // this is the case, and once we find a system that has this fixed, we - // can conditionalize this code. Look for testRadar6208390 in - // GTMABAddressBookTest.m - // Also, search for 6208390 below and fix the fast enumerator to actually - // be somewhat performant when this is fixed. - [value retain]; - } - } - return value; -} - -- (NSString *)labelAtIndex:(NSUInteger)idx { - NSString *label = nil; - if (idx < [self count]) { - label = GTMCFAutorelease(ABMultiValueCopyLabelAtIndex(multiValue_, idx)); - } - return label; -} - -- (ABMultiValueIdentifier)identifierAtIndex:(NSUInteger)idx { - ABMultiValueIdentifier identifier = kABMultiValueInvalidIdentifier; - if (idx < [self count]) { - identifier = ABMultiValueGetIdentifierAtIndex(multiValue_, idx); - } - return identifier; -} - -- (NSUInteger)indexForIdentifier:(ABMultiValueIdentifier)identifier { - NSUInteger idx = ABMultiValueGetIndexForIdentifier(multiValue_, identifier); - return idx == (NSUInteger)kCFNotFound ? (NSUInteger)NSNotFound : idx; -} - -- (ABPropertyType)propertyType { - return ABMultiValueGetPropertyType(multiValue_); -} - -- (id)valueForIdentifier:(ABMultiValueIdentifier)identifier { - return [self valueAtIndex:[self indexForIdentifier:identifier]]; -} - -- (NSString *)labelForIdentifier:(ABMultiValueIdentifier)identifier { - return [self labelAtIndex:[self indexForIdentifier:identifier]]; -} - -- (unsigned long*)mutations { - // We just need some constant non-zero value here so fast enumeration works. - // Dereferencing self should give us the isa which will stay constant - // over the enumeration. - return (unsigned long*)self; -} - -- (NSEnumerator *)valueEnumerator { - return [GTMABMultiValueEnumerator valueEnumeratorFor:self]; -} - -- (NSEnumerator *)labelEnumerator { - return [GTMABMultiValueEnumerator labelEnumeratorFor:self]; -} - -@end - -@implementation GTMABMutableMultiValue -+ (id)valueWithPropertyType:(ABPropertyType)type { - return [[[self alloc] initWithPropertyType:type] autorelease]; -} - -- (id)initWithPropertyType:(ABPropertyType)type { - ABMutableMultiValueRef ref = nil; - if (type != kABInvalidPropertyType) { - ref = ABMultiValueCreateMutable(type); - } - self = [super initWithMultiValue:ref]; - if (ref) { - CFRelease(ref); - } - return self; -} - -- (id)initWithMultiValue:(ABMultiValueRef)multiValue { - ABMutableMultiValueRef ref = nil; - if (multiValue) { - ref = ABMultiValueCreateMutableCopy(multiValue); - } - self = [super initWithMultiValue:ref]; - if (ref) { - CFRelease(ref); - } - return self; -} - -- (id)initWithMutableMultiValue:(ABMutableMultiValueRef)multiValue { - return [super initWithMultiValue:multiValue]; -} - -- (BOOL)checkValueType:(id)value { - BOOL isGood = NO; - if (value) { - TypeClassNameMap singleValueTypeMap[] = { - { kABStringPropertyType, [NSString class] }, - { kABIntegerPropertyType, [NSNumber class] }, - { kABRealPropertyType, [NSNumber class] }, - { kABDateTimePropertyType, [NSDate class] }, - { kABDictionaryPropertyType, [NSDictionary class] }, - }; - ABPropertyType type = [self propertyType]; - for (size_t i = 0; - i < sizeof(singleValueTypeMap) / sizeof(TypeClassNameMap); ++i) { - if (singleValueTypeMap[i].pType == type) { - if ([[value class] isSubclassOfClass:singleValueTypeMap[i].class]) { - isGood = YES; - break; - } - } - } - } - return isGood; -} - -- (ABMultiValueIdentifier)addValue:(id)value withLabel:(CFStringRef)label { - ABMultiValueIdentifier identifier = kABMultiValueInvalidIdentifier; - // We check label and value here because of - // radar 6202827 Passing nil info ABMultiValueAddValueAndLabel causes crash - if (!label - || ![self checkValueType:value] - || !ABMultiValueAddValueAndLabel(multiValue_, - value, - label, - &identifier)) { - identifier = kABMultiValueInvalidIdentifier; - } else { - mutations_++; - } - return identifier; -} - -- (ABMultiValueIdentifier)insertValue:(id)value - withLabel:(CFStringRef)label - atIndex:(NSUInteger)idx { - ABMultiValueIdentifier identifier = kABMultiValueInvalidIdentifier; - // We perform a check here to ensure that we don't get bitten by - // Radar 6202807 ABMultiValueInsertValueAndLabelAtIndex allows you to insert - // values past end - NSUInteger count = [self count]; - // We check label and value here because of - // radar 6202827 Passing nil info ABMultiValueAddValueAndLabel causes crash - if (idx > count - || !label - || ![self checkValueType:value] - || !ABMultiValueInsertValueAndLabelAtIndex(multiValue_, - value, - label, - idx, - &identifier)) { - identifier = kABMultiValueInvalidIdentifier; - } else { - mutations_++; - } - return identifier; -} - -- (BOOL)removeValueAndLabelAtIndex:(NSUInteger)idx { - BOOL isGood = NO; - NSUInteger count = [self count]; - if (idx < count) { - if (ABMultiValueRemoveValueAndLabelAtIndex(multiValue_, - idx)) { - mutations_++; - isGood = YES; - } - } - return isGood; -} - -- (BOOL)replaceValueAtIndex:(NSUInteger)idx withValue:(id)value { - BOOL isGood = NO; - NSUInteger count = [self count]; - if (idx < count && [self checkValueType:value]) { - if (ABMultiValueReplaceValueAtIndex(multiValue_, - value, idx)) { - mutations_++; - isGood = YES; - } - } - return isGood; -} - -- (BOOL)replaceLabelAtIndex:(NSUInteger)idx withLabel:(CFStringRef)label{ - BOOL isGood = NO; - NSUInteger count = [self count]; - if (idx < count) { - if (ABMultiValueReplaceLabelAtIndex(multiValue_, - label, - idx)) { - mutations_++; - isGood = YES; - } - } - return isGood; -} - -- (unsigned long*)mutations { - return &mutations_; -} -@end - - -@implementation GTMABMultiValueEnumerator - -+ (id)valueEnumeratorFor:(GTMABMultiValue*)enumeree { - return [[[self alloc] initWithEnumeree:enumeree useLabels:NO] autorelease]; -} - -+ (id)labelEnumeratorFor:(GTMABMultiValue*)enumeree { - return [[[self alloc] initWithEnumeree:enumeree useLabels:YES] autorelease]; -} - -- (id)initWithEnumeree:(GTMABMultiValue*)enumeree useLabels:(BOOL)useLabels { - if ((self = [super init])) { - if (enumeree) { - enumeree_ = [enumeree retain]; - useLabels_ = useLabels; - } else { - // COV_NF_START - // Since this is a private class where the enumeree creates us - // there is no way we should ever get here. - [self release]; - self = nil; - // COV_NF_END - } - } - return self; -} - -- (void)dealloc { - [enumeree_ release]; - [super dealloc]; -} - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id *)stackbuf - count:(NSUInteger)len { - NSUInteger i; - if (!ref_) { - count_ = [enumeree_ count]; - ref_ = [enumeree_ multiValueRef]; - } - - for (i = 0; state->state < count_ && i < len; ++i, ++state->state) { - if (useLabels_) { - stackbuf[i] = GTMCFAutorelease(ABMultiValueCopyLabelAtIndex(ref_, - state->state)); - } else { - // Yes this is slow, but necessary in light of radar 6208390 - // Once this is fixed we can go to something similar to the label - // case which should speed stuff up again. Hopefully anybody who wants - // real performance is willing to move down to the C API anyways. - stackbuf[i] = [enumeree_ valueAtIndex:state->state]; - } - } - - state->itemsPtr = stackbuf; - state->mutationsPtr = [enumeree_ mutations]; - return i; -} - -- (id)nextObject { - id value = nil; - if (!ref_) { - count_ = [enumeree_ count]; - mutations_ = *[enumeree_ mutations]; - ref_ = [enumeree_ multiValueRef]; - - } - if (mutations_ != *[enumeree_ mutations]) { - NSString *reason = [NSString stringWithFormat:@"*** Collection <%@> was " - "mutated while being enumerated", enumeree_]; - [[NSException exceptionWithName:NSGenericException - reason:reason - userInfo:nil] raise]; - } - if (index_ < count_) { - if (useLabels_) { - value = GTMCFAutorelease(ABMultiValueCopyLabelAtIndex(ref_, - index_)); - } else { - // Yes this is slow, but necessary in light of radar 6208390 - // Once this is fixed we can go to something similar to the label - // case which should speed stuff up again. Hopefully anybody who wants - // real performance is willing to move down to the C API anyways. - value = [enumeree_ valueAtIndex:index_]; - } - index_ += 1; - } - return value; -} -@end - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.strings b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.strings deleted file mode 100644 index b5e010e1..00000000 Binary files a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBook.strings and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBookTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBookTest.m deleted file mode 100644 index 17a30969..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMABAddressBookTest.m +++ /dev/null @@ -1,608 +0,0 @@ -// -// GTMAddressBookTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMABAddressBook.h" - -@interface GTMABAddressBookTest : GTMTestCase { - @private - GTMABAddressBook *book_; -} -@end - - -@implementation GTMABAddressBookTest -- (void)setUp { - // Create a book forcing it out of it's autorelease pool. - // I force it out of the release pool, so that we will see any errors - // for it immediately at teardown, and it will be clear which release - // caused us problems. - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - book_ = [[GTMABAddressBook addressBook] retain]; - [pool release]; - STAssertNotNil(book_, nil); - STAssertFalse([book_ hasUnsavedChanges], nil); -} - -- (void)tearDown { - [book_ release]; -} - -- (void)testGenericAddressBook { - STAssertEqualObjects([GTMABAddressBook localizedLabel:kABHomeLabel], - @"home", - nil); - STAssertThrows([GTMABRecord recordWithRecord:nil], nil); -} - -- (void)testAddingAndRemovingPerson { - // Create a person - GTMABPerson *person = [GTMABPerson personWithFirstName:@"Bart" - lastName:@"Simpson"]; - STAssertNotNil(person, nil); - - // Add person - NSArray *people = [book_ people]; - STAssertFalse([people containsObject:person], nil); - STAssertTrue([book_ addRecord:person], nil); - - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - people = [book_ people]; - STAssertNotNil(people, nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people - // array until it's saved - // We will check to make sure it stays broken ;-) - STAssertFalse([people containsObject:person], nil); - - // Save book_ - STAssertTrue([book_ save], nil); - people = [book_ people]; - STAssertNotNil(people, nil); - STAssertTrue([people containsObject:person], nil); - - ABRecordID recordID = [person recordID]; - STAssertNotEquals(recordID, kABRecordInvalidID, nil); - - GTMABRecord *record = [book_ personForId:recordID]; - STAssertEqualObjects(record, person, nil); - - // Remove person - STAssertTrue([book_ removeRecord:person], nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - // Normally this next line would be STAssertFalse, however due to - // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the people - // array until it's saved - // We will check to make sure it stays broken ;-) - STAssertTrue([people containsObject:person], nil); - - // Save Book - STAssertTrue([book_ save], nil); - people = [book_ people]; - STAssertFalse([book_ hasUnsavedChanges], nil); - STAssertFalse([people containsObject:person], nil); - record = [book_ personForId:recordID]; - STAssertNil(record, nil); - - // Revert book_ - STAssertTrue([book_ addRecord:person], nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - [book_ revert]; - STAssertFalse([book_ hasUnsavedChanges], nil); - - // Bogus data - STAssertFalse([book_ addRecord:nil], nil); - STAssertFalse([book_ removeRecord:nil], nil); - - STAssertNotNULL([book_ addressBookRef], nil); - -} - -- (void)testAddingAndRemovingGroup { - // Create a group - GTMABGroup *group = [GTMABGroup groupNamed:@"Test"]; - STAssertNotNil(group, nil); - - // Add group - NSArray *groups = [book_ groups]; - STAssertFalse([groups containsObject:group], nil); - STAssertTrue([book_ addRecord:group], nil); - - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - groups = [book_ groups]; - STAssertNotNil(groups, nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the groups - // array until it's saved - // We will check to make sure it stays broken ;-) - STAssertFalse([groups containsObject:group], nil); - - // Save book_ - STAssertTrue([book_ save], nil); - groups = [book_ groups]; - STAssertNotNil(groups, nil); - STAssertTrue([groups containsObject:group], nil); - - ABRecordID recordID = [group recordID]; - STAssertNotEquals(recordID, kABRecordInvalidID, nil); - - GTMABRecord *record = [book_ groupForId:recordID]; - STAssertEqualObjects(record, group, nil); - - // Remove group - STAssertTrue([book_ removeRecord:group], nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - // Normally this next line would be STAssertFalse, however due to - // Radar 6200703: ABAddressBookAddRecord doesn't add an item to the groups - // array until it's saved - // We will check to make sure it stays broken ;-) - STAssertTrue([groups containsObject:group], nil); - - // Save Book - STAssertTrue([book_ save], nil); - groups = [book_ groups]; - STAssertFalse([book_ hasUnsavedChanges], nil); - STAssertFalse([groups containsObject:group], nil); - record = [book_ groupForId:recordID]; - STAssertNil(record, nil); - - // Revert book_ - STAssertTrue([book_ addRecord:group], nil); - // Normally this next line would be STAssertTrue, however due to - // Radar 6200638: ABAddressBookHasUnsavedChanges doesn't work - // We will check to make sure it stays broken ;-) - STAssertFalse([book_ hasUnsavedChanges], nil); - - [book_ revert]; - STAssertFalse([book_ hasUnsavedChanges], nil); -} - -- (void)testPerson { - GTMABPerson *person = [[[GTMABPerson alloc] initWithRecord:nil] autorelease]; - STAssertNil(person, nil); - person = [GTMABPerson personWithFirstName:@"Bart" - lastName:nil]; - STAssertNotNil(person, nil); - STAssertEqualObjects([person compositeName], @"Bart", nil); - NSString *firstName = [person valueForProperty:kABPersonFirstNameProperty]; - STAssertEqualObjects(firstName, @"Bart", nil); - NSString *lastName = [person valueForProperty:kABPersonLastNameProperty]; - STAssertNil(lastName, nil); - STAssertTrue([person removeValueForProperty:kABPersonFirstNameProperty], nil); - STAssertFalse([person removeValueForProperty:kABPersonFirstNameProperty], nil); - STAssertFalse([person removeValueForProperty:kABPersonLastNameProperty], nil); - STAssertFalse([person setValue:nil forProperty:kABPersonFirstNameProperty], nil); - STAssertFalse([person setValue:[NSNumber numberWithInt:1] - forProperty:kABPersonFirstNameProperty], nil); - STAssertFalse([person setValue:@"Bart" - forProperty:kABPersonBirthdayProperty], nil); - - ABPropertyType property - = [GTMABPerson typeOfProperty:kABPersonLastNameProperty]; - STAssertEquals(property, (ABPropertyType)kABStringPropertyType, nil); - - NSString *string - = [GTMABPerson localizedPropertyName:kABPersonLastNameProperty]; - STAssertEqualObjects(string, @"Last", nil); - - string = [GTMABPerson localizedPropertyName:kABRecordInvalidID]; - STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil); - - string = [person description]; - STAssertNotNil(string, nil); - - ABPersonCompositeNameFormat format = [GTMABPerson compositeNameFormat]; - STAssertTrue(format == kABPersonCompositeNameFormatFirstNameFirst || - format == kABPersonCompositeNameFormatLastNameFirst, nil); - - NSData *data = [person imageData]; - STAssertNil(data, nil); - STAssertTrue([person setImageData:nil], nil); - data = [person imageData]; - STAssertNil(data, nil); - UIImage *image = [UIImage imageNamed:@"phone.png"]; - STAssertNotNil(image, nil); - data = UIImagePNGRepresentation(image); - STAssertTrue([person setImageData:data], nil); - NSData *data2 = [person imageData]; - STAssertEqualObjects(data, data2, nil); - STAssertTrue([person setImageData:nil], nil); - data = [person imageData]; - STAssertNil(data, nil); - - STAssertTrue([person setImage:image], nil); - UIImage *image2 = [person image]; - STAssertNotNil(image2, nil); - STAssertEqualObjects(UIImagePNGRepresentation(image), - UIImagePNGRepresentation(image2), nil); - - person = [GTMABPerson personWithFirstName:@"Bart" - lastName:@"Simpson"]; - - data = [NSData dataWithBytes:"a" length:1]; - STAssertFalse([person setImageData:data], nil); - - GTMABMutableMultiValue *value - = [GTMABMutableMultiValue valueWithPropertyType:kABStringPropertyType]; - STAssertNotNil(value, nil); - STAssertNotEquals([value addValue:@"222-222-2222" - withLabel:kABHomeLabel], - kABMultiValueInvalidIdentifier, nil); - STAssertNotEquals([value addValue:@"333-333-3333" - withLabel:kABWorkLabel], - kABMultiValueInvalidIdentifier, nil); - STAssertTrue([person setValue:value forProperty:kABPersonPhoneProperty], nil); - id value2 = [person valueForProperty:kABPersonPhoneProperty]; - STAssertNotNil(value2, nil); - STAssertEqualObjects(value, value2, nil); - STAssertEquals([value hash], [value2 hash], nil); - STAssertNotEquals([person hash], (NSUInteger)0, nil); -} - -- (void)testGroup { - GTMABGroup *group = [[[GTMABGroup alloc] initWithRecord:nil] autorelease]; - STAssertNil(group, nil); - group = [GTMABGroup groupNamed:@"TestGroup"]; - STAssertNotNil(group, nil); - STAssertEqualObjects([group compositeName], @"TestGroup", nil); - NSString *name = [group valueForProperty:kABGroupNameProperty]; - STAssertEqualObjects(name, @"TestGroup", nil); - NSString *lastName = [group valueForProperty:kABPersonLastNameProperty]; - STAssertNil(lastName, nil); - STAssertTrue([group removeValueForProperty:kABGroupNameProperty], nil); - STAssertFalse([group removeValueForProperty:kABGroupNameProperty], nil); - STAssertFalse([group removeValueForProperty:kABPersonLastNameProperty], nil); - STAssertFalse([group setValue:nil forProperty:kABGroupNameProperty], nil); - STAssertFalse([group setValue:[NSNumber numberWithInt:1] - forProperty:kABGroupNameProperty], nil); - STAssertFalse([group setValue:@"Bart" - forProperty:kABPersonBirthdayProperty], nil); - - ABPropertyType property = [GTMABGroup typeOfProperty:kABGroupNameProperty]; - STAssertEquals(property, (ABPropertyType)kABStringPropertyType, nil); - - property = [GTMABGroup typeOfProperty:kABPersonLastNameProperty]; - STAssertEquals(property, (ABPropertyType)kABInvalidPropertyType, nil); - - NSString *string = [GTMABGroup localizedPropertyName:kABGroupNameProperty]; - STAssertEqualObjects(string, @"Name", nil); - - string = [GTMABGroup localizedPropertyName:kABPersonLastNameProperty]; - STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil); - - string = [GTMABGroup localizedPropertyName:kABRecordInvalidID]; - STAssertEqualObjects(string, kGTMABUnknownPropertyName, nil); - - string = [group description]; - STAssertNotNil(string, nil); - - // Adding and removing members - group = [GTMABGroup groupNamed:@"TestGroup2"]; - NSArray *members = [group members]; - STAssertEquals([members count], (NSUInteger)0, @"Members: %@", members); - - STAssertFalse([group addMember:nil], nil); - - members = [group members]; - STAssertEquals([members count], (NSUInteger)0, @"Members: %@", members); - - GTMABPerson *person = [GTMABPerson personWithFirstName:@"Bart" - lastName:@"Simpson"]; - STAssertNotNil(person, nil); - STAssertTrue([book_ addRecord:person], nil); - STAssertTrue([book_ save], nil); - STAssertTrue([group addMember:person], nil); - STAssertTrue([book_ addRecord:group], nil); - STAssertTrue([book_ save], nil); - members = [group members]; - STAssertEquals([members count], (NSUInteger)1, @"Members: %@", members); - STAssertTrue([group removeMember:person], nil); - STAssertFalse([group removeMember:person], nil); - STAssertFalse([group removeMember:nil], nil); - STAssertTrue([book_ removeRecord:group], nil); - STAssertTrue([book_ removeRecord:person], nil); - STAssertTrue([book_ save], nil); -} - - -- (void)testMultiValues { - STAssertThrows([[GTMABMultiValue alloc] init], nil); - STAssertThrows([[GTMABMutableMultiValue alloc] init], nil); - GTMABMultiValue *value = [[GTMABMultiValue alloc] initWithMultiValue:nil]; - STAssertNil(value, nil); - GTMABMutableMultiValue *mutValue - = [GTMABMutableMultiValue valueWithPropertyType:kABInvalidPropertyType]; - STAssertNil(mutValue, nil); - mutValue - = [[[GTMABMutableMultiValue alloc] - initWithMutableMultiValue:nil] autorelease]; - STAssertNil(mutValue, nil); - mutValue - = [[[GTMABMutableMultiValue alloc] - initWithMultiValue:nil] autorelease]; - STAssertNil(mutValue, nil); - const ABPropertyType types[] = { - kABStringPropertyType, - kABIntegerPropertyType, - kABRealPropertyType, - kABDateTimePropertyType, - kABDictionaryPropertyType, - kABMultiStringPropertyType, - kABMultiIntegerPropertyType, - kABMultiRealPropertyType, - kABMultiDateTimePropertyType, - kABMultiDictionaryPropertyType - }; - for (size_t i = 0; i < sizeof(types) / sizeof(ABPropertyType); ++i) { - mutValue = [GTMABMutableMultiValue valueWithPropertyType:types[i]]; - STAssertNotNil(mutValue, nil); - // Oddly the Apple APIs allow you to create a mutable multi value with - // either a property type of kABFooPropertyType or kABMultiFooPropertyType - // and apparently you get back basically the same thing. However if you - // ask a type that you created with kABMultiFooPropertyType for it's type - // it returns just kABFooPropertyType. - STAssertEquals([mutValue propertyType], - types[i] & ~kABMultiValueMask, nil); - } - mutValue = [GTMABMutableMultiValue valueWithPropertyType:kABStringPropertyType]; - STAssertNotNil(mutValue, nil); - value = [[mutValue copy] autorelease]; - STAssertEqualObjects([value class], [GTMABMultiValue class], nil); - mutValue = [[value mutableCopy] autorelease]; - STAssertEqualObjects([mutValue class], [GTMABMutableMultiValue class], nil); - STAssertEquals([mutValue count], (NSUInteger)0, nil); - STAssertNil([mutValue valueAtIndex:0], nil); - STAssertNil([mutValue labelAtIndex:0], nil); - STAssertEquals([mutValue identifierAtIndex:0], - kABMultiValueInvalidIdentifier, nil); - STAssertEquals([mutValue propertyType], - (ABPropertyType)kABStringPropertyType, nil); - ABMultiValueIdentifier ident = [mutValue addValue:nil - withLabel:kABHomeLabel]; - STAssertEquals(ident, kABMultiValueInvalidIdentifier, nil); - ident = [mutValue addValue:@"val1" - withLabel:nil]; - STAssertEquals(ident, kABMultiValueInvalidIdentifier, nil); - ident = [mutValue insertValue:@"val1" - withLabel:nil - atIndex:0]; - STAssertEquals(ident, kABMultiValueInvalidIdentifier, nil); - ident = [mutValue insertValue:nil - withLabel:kABHomeLabel - atIndex:0]; - STAssertEquals(ident, kABMultiValueInvalidIdentifier, nil); - ident = [mutValue addValue:@"val1" - withLabel:kABHomeLabel]; - STAssertNotEquals(ident, kABMultiValueInvalidIdentifier, nil); - ABMultiValueIdentifier identCheck = [mutValue identifierAtIndex:0]; - STAssertEquals(ident, identCheck, nil); - NSUInteger idx = [mutValue indexForIdentifier:ident]; - STAssertEquals(idx, (NSUInteger)0, nil); - STAssertTrue([mutValue replaceLabelAtIndex:0 - withLabel:kABWorkLabel], nil); - STAssertFalse([mutValue replaceLabelAtIndex:10 - withLabel:kABWorkLabel], nil); - STAssertTrue([mutValue replaceValueAtIndex:0 - withValue:@"newVal1"], nil); - STAssertFalse([mutValue replaceValueAtIndex:10 - withValue:@"newVal1"], nil); - - STAssertEqualObjects([mutValue valueForIdentifier:ident], @"newVal1", nil); - STAssertEqualObjects([mutValue labelForIdentifier:ident], - (NSString *)kABWorkLabel, nil); - - ABMultiValueIdentifier ident2 = [mutValue insertValue:@"val2" - withLabel:kABOtherLabel - atIndex:0]; - STAssertNotEquals(ident2, kABMultiValueInvalidIdentifier, nil); - STAssertNotEquals(ident2, ident, nil); - ABMultiValueIdentifier ident3 = [mutValue insertValue:@"val3" - withLabel:kABPersonPhoneMainLabel - atIndex:10]; - STAssertEquals(ident3, kABMultiValueInvalidIdentifier, nil); - NSUInteger idx3 = [mutValue indexForIdentifier:ident3]; - STAssertEquals(idx3, (NSUInteger)NSNotFound, nil); - STAssertTrue([mutValue removeValueAndLabelAtIndex:1], nil); - STAssertFalse([mutValue removeValueAndLabelAtIndex:1], nil); - - NSUInteger idx4 - = [mutValue indexForIdentifier:kABMultiValueInvalidIdentifier]; - STAssertEquals(idx4, (NSUInteger)NSNotFound, nil); - - STAssertNotNULL([mutValue multiValueRef], nil); - - // Enumerator test - mutValue = [GTMABMutableMultiValue valueWithPropertyType:kABIntegerPropertyType]; - STAssertNotNil(mutValue, nil); - for (int i = 0; i < 100; i++) { - NSString *label = [NSString stringWithFormat:@"label %d", i]; - NSNumber *val = [NSNumber numberWithInt:i]; - STAssertNotEquals([mutValue addValue:val - withLabel:(CFStringRef)label], - kABMultiValueInvalidIdentifier, nil); - } - int count = 0; - for (NSString *label in [mutValue labelEnumerator]) { - NSString *testLabel = [NSString stringWithFormat:@"label %d", count++]; - STAssertEqualObjects(label, testLabel, nil); - } - count = 0; - value = [[mutValue copy] autorelease]; - for (NSNumber *val in [value valueEnumerator]) { - STAssertEqualObjects(val, [NSNumber numberWithInt:count++], nil); - } - - // Test messing with the values while we're enumerating them - NSEnumerator *labelEnum = [mutValue labelEnumerator]; - NSEnumerator *valueEnum = [mutValue valueEnumerator]; - STAssertNotNil(labelEnum, nil); - STAssertNotNil(valueEnum, nil); - STAssertNotNil([labelEnum nextObject], nil); - STAssertNotNil([valueEnum nextObject], nil); - STAssertTrue([mutValue removeValueAndLabelAtIndex:0], nil); - STAssertThrows([labelEnum nextObject], nil); - STAssertThrows([valueEnum nextObject], nil); - - // Test messing with the values while we're fast enumerating them - // Should throw an exception on the second access. - BOOL exceptionThrown = NO; - // Start at one because we removed index 0 above. - count = 1; - @try { - for (NSString *label in [mutValue labelEnumerator]) { - NSString *testLabel = [NSString stringWithFormat:@"label %d", count++]; - STAssertEqualObjects(label, testLabel, nil); - STAssertTrue([mutValue removeValueAndLabelAtIndex:50], nil); - } - } @catch(NSException *e) { - STAssertEqualObjects([e name], NSGenericException, @"Got %@ instead", e); - STAssertEquals(count, 2, - @"Should have caught it on the second access"); - exceptionThrown = YES; - } // COV_NF_LINE - because we always catch, this brace doesn't get exec'd - STAssertTrue(exceptionThrown, @"We should have thrown an exception" - @" because the values under the enumerator were modified"); - -} - -- (void)testRadar6208390 { - ABPropertyType types[] = { - kABStringPropertyType, - kABIntegerPropertyType, - kABRealPropertyType, - kABDateTimePropertyType, - kABDictionaryPropertyType - }; - for (size_t j = 0; j < sizeof(types) / sizeof(ABPropertyType); ++j) { - ABPropertyType type = types[j]; - ABMultiValueRef ref = ABMultiValueCreateMutable(type); - STAssertNotNULL(ref, nil); - NSString *label = [[NSString alloc] initWithString:@"label"]; - STAssertNotNil(label, nil); - id val = nil; - switch (type) { - case kABDictionaryPropertyType: - val = [[NSDictionary alloc] initWithObjectsAndKeys:@"1", @"1", nil]; - break; - - case kABStringPropertyType: - val = [[NSString alloc] initWithFormat:@"value %d"]; - break; - - case kABIntegerPropertyType: - case kABRealPropertyType: - val = [[NSNumber alloc] initWithInt:143]; - break; - - case kABDateTimePropertyType: - val = [[NSDate alloc] init]; - break; - } - STAssertNotNil(val, - @"Testing type %d, %@", type, val); - NSUInteger firstRetainCount = [val retainCount]; - STAssertNotEquals(firstRetainCount, - (NSUInteger)0, - @"Testing type %d, %@", type, val); - - ABMultiValueIdentifier identifier; - STAssertTrue(ABMultiValueAddValueAndLabel(ref, - val, - (CFStringRef)label, - &identifier), - @"Testing type %d, %@", type, val); - NSUInteger secondRetainCount = [val retainCount]; - STAssertEquals(firstRetainCount + 1, - secondRetainCount, - @"Testing type %d, %@", type, val); - [label release]; - [val release]; - NSUInteger thirdRetainCount = [val retainCount]; - STAssertEquals(firstRetainCount, - thirdRetainCount, - @"Testing type %d, %@", type, val); - - id oldVal = val; - val = (id)ABMultiValueCopyValueAtIndex(ref, 0); - NSUInteger fourthRetainCount = [val retainCount]; - - // kABDictionaryPropertyTypes appear to do an actual copy, so the retain - // count checking trick won't work. We only check the retain count if - // we didn't get a new version. - if (val == oldVal) { - if (type == kABIntegerPropertyType - || type == kABRealPropertyType) { - // We are verifying that yes indeed 6208390 is still broken - STAssertEquals(fourthRetainCount, - thirdRetainCount, - @"Testing type %d, %@. If you see this error it may " - @"be time to update the code to change retain behaviors" - @"with this os version", type, val); - } else { - STAssertEquals(fourthRetainCount, - thirdRetainCount + 1, - @"Testing type %d, %@", type, val); - [val release]; - } - } else { - [val release]; - } - CFRelease(ref); - } -} - -// Globals used by testRadar6240394. -static ABPropertyID gGTMTestID; -static const ABPropertyID *gGTMTestIDPtr; - -void __attribute__((constructor))SetUpIDForTestRadar6240394(void) { - // These must be set up BEFORE ABAddressBookCreate is called. - gGTMTestID = kABPersonLastNameProperty; - gGTMTestIDPtr = &kABPersonLastNameProperty; -} - -- (void)testRadar6240394 { - // As of iPhone SDK 2.1, the property IDs aren't initialized until - // ABAddressBookCreate is actually called. They will return zero until - // then. Logged as radar 6240394. - STAssertEquals(gGTMTestID, 0, @"If this isn't zero, Apple has fixed 6240394"); - (void)ABAddressBookCreate(); - STAssertEquals(*gGTMTestIDPtr, kABPersonLastNameProperty, - @"If this doesn't work, something else has broken"); -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.h b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.h deleted file mode 100644 index cb2d206c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// GTMUIFont+LineHeight.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import -#import - -@interface UIFont (GTMLineHeight) -- (CGFloat)gtm_lineHeight; -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.m deleted file mode 100644 index 74f8a8fe..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeight.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// GTMUIFont+LineHeight.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMUIFont+LineHeight.h" - -@implementation UIFont (GTMLineHeight) -- (CGFloat)gtm_lineHeight { - return [@"Fake line with gjy" sizeWithFont:self].height; -} -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeightTest.m b/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeightTest.m deleted file mode 100644 index 8da28eb0..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/externals/google-toolbox-for-mac/iPhone/GTMUIFont+LineHeightTest.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// GTMUIFont+LineHeightTest.m -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "GTMSenTestCase.h" -#import "GTMUIFont+LineHeight.h" - -@interface GTMUIFontLineHeightTest : GTMTestCase -@end - - -@implementation GTMUIFontLineHeightTest - -- (void)testLineHeight { - UIFont *font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; - STAssertNotNil(font, nil); - STAssertGreaterThanOrEqual([font gtm_lineHeight], (CGFloat)5.0, nil); - - UIFont *fontSmall = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; - STAssertNotNil(fontSmall, nil); - STAssertGreaterThanOrEqual([fontSmall gtm_lineHeight], (CGFloat)5.0, nil); - - STAssertGreaterThan([font gtm_lineHeight], [fontSmall gtm_lineHeight], nil); -} - -@end diff --git a/thirdparty/google-breakpad/r318/src/common/mac/file_id.cc b/thirdparty/google-breakpad/r318/src/common/mac/file_id.cc deleted file mode 100644 index ebb8c40e..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/file_id.cc +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// -// Author: Dan Waylonis - -#include -#include -#include - -#include "common/mac/file_id.h" -#include "common/mac/macho_id.h" - -using MacFileUtilities::MachoID; - -namespace google_breakpad { - -FileID::FileID(const char *path) { - strlcpy(path_, path, sizeof(path_)); -} - -bool FileID::FileIdentifier(unsigned char identifier[16]) { - int fd = open(path_, O_RDONLY); - if (fd == -1) - return false; - - MD5_CTX md5; - MD5_Init(&md5); - - // Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but - // doesn't seem to be an unreasonable size for the stack. - unsigned char buffer[4096 * 2]; - size_t buffer_size = sizeof(buffer); - while ((buffer_size = read(fd, buffer, buffer_size) > 0)) { - MD5_Update(&md5, buffer, buffer_size); - } - - close(fd); - MD5_Final(identifier, &md5); - - return true; -} - -bool FileID::MachoIdentifier(int cpu_type, unsigned char identifier[16]) { - MachoID macho(path_); - - if (macho.UUIDCommand(cpu_type, identifier)) - return true; - - return macho.MD5(cpu_type, identifier); -} - -// static -void FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - int buffer_idx = 0; - for (int idx = 0; (buffer_idx < buffer_length) && (idx < 16); ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - if (idx == 4 || idx == 6 || idx == 8 || idx == 10) - buffer[buffer_idx++] = '-'; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // NULL terminate - buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/mac/file_id.h b/thirdparty/google-breakpad/r318/src/common/mac/file_id.h deleted file mode 100644 index eb06b0d6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/file_id.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.h: Return a unique identifier for a file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_FILE_ID_H__ -#define COMMON_MAC_FILE_ID_H__ - -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool FileIdentifier(unsigned char identifier[16]); - - // Treat the file as a mach-o file that will contain one or more archicture. - // Accepted values for |cpu_type| (e.g., CPU_TYPE_X86 or CPU_TYPE_POWERPC) - // are listed in /usr/include/mach/machine.h. - // If |cpu_type| is 0, then the native cpu type is used. - // Returns false if opening the file failed or if the |cpu_type| is not - // present in the file. - // Return the unique identifier in |identifier|. - // The current implementation will look for the (in order of priority): - // LC_UUID, LC_ID_DYLIB, or MD5 hash of the given |cpu_type|. - bool MachoIdentifier(int cpu_type, unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). - // The |buffer| should be at least 37 bytes long to receive all of the data - // and termination. Shorter buffers will contain truncated data. - static void ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_MAC_FILE_ID_H__ - diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_id.cc b/thirdparty/google-breakpad/r318/src/common/mac/macho_id.cc deleted file mode 100644 index 160f6ed7..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_id.cc +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.cc: Functions to gather identifying information from a macho file -// -// See macho_id.h for documentation -// -// Author: Dan Waylonis - -extern "C" { // necessary for Leopard - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -} - -#include "common/mac/macho_id.h" -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -MachoID::MachoID(const char *path) { - strlcpy(path_, path, sizeof(path_)); - file_ = open(path, O_RDONLY); -} - -MachoID::~MachoID() { - if (file_ != -1) - close(file_); -} - -// The CRC info is from http://en.wikipedia.org/wiki/Adler-32 -// With optimizations from http://www.zlib.net/ - -// The largest prime smaller than 65536 -#define MOD_ADLER 65521 -// MAX_BLOCK is the largest n such that 255n(n+1)/2 + (n+1)(MAX_BLOCK-1) <= 2^32-1 -#define MAX_BLOCK 5552 - -void MachoID::UpdateCRC(unsigned char *bytes, size_t size) { -// Unrolled loops for summing -#define DO1(buf,i) {sum1 += (buf)[i]; sum2 += sum1;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - // Split up the crc - uint32_t sum1 = crc_ & 0xFFFF; - uint32_t sum2 = (crc_ >> 16) & 0xFFFF; - - // Do large blocks - while (size >= MAX_BLOCK) { - size -= MAX_BLOCK; - int block_count = MAX_BLOCK / 16; - do { - DO16(bytes); - bytes += 16; - } while (--block_count); - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - } - - // Do remaining bytes - if (size) { - while (size >= 16) { - size -= 16; - DO16(bytes); - bytes += 16; - } - while (size--) { - sum1 += *bytes++; - sum2 += sum1; - } - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - crc_ = (sum2 << 16) | sum1; - } -} - -void MachoID::UpdateMD5(unsigned char *bytes, size_t size) { - MD5_Update(&md5_context_, bytes, size); -} - -void MachoID::UpdateSHA1(unsigned char *bytes, size_t size) { - SHA_Update(&sha1_context_, bytes, size); -} - -void MachoID::Update(MachoWalker *walker, unsigned long offset, size_t size) { - if (!update_function_ || !size) - return; - - // Read up to 4k bytes at a time - unsigned char buffer[4096]; - size_t buffer_size; - off_t file_offset = offset; - while (size > 0) { - if (size > sizeof(buffer)) { - buffer_size = sizeof(buffer); - size -= buffer_size; - } else { - buffer_size = size; - size = 0; - } - - if (!walker->ReadBytes(buffer, buffer_size, file_offset)) - return; - - (this->*update_function_)(buffer, buffer_size); - file_offset += buffer_size; - } -} - -bool MachoID::UUIDCommand(int cpu_type, unsigned char bytes[16]) { - struct breakpad_uuid_command uuid_cmd; - MachoWalker walker(path_, UUIDWalkerCB, &uuid_cmd); - - uuid_cmd.cmd = 0; - if (!walker.WalkHeader(cpu_type)) - return false; - - // If we found the command, we'll have initialized the uuid_command - // structure - if (uuid_cmd.cmd == LC_UUID) { - memcpy(bytes, uuid_cmd.uuid, sizeof(uuid_cmd.uuid)); - return true; - } - - return false; -} - -bool MachoID::IDCommand(int cpu_type, unsigned char identifier[16]) { - struct dylib_command dylib_cmd; - MachoWalker walker(path_, IDWalkerCB, &dylib_cmd); - - dylib_cmd.cmd = 0; - if (!walker.WalkHeader(cpu_type)) - return false; - - // If we found the command, we'll have initialized the dylib_command - // structure - if (dylib_cmd.cmd == LC_ID_DYLIB) { - // Take the hashed filename, version, and compatability version bytes - // to form the first 12 bytes, pad the rest with zeros - - // create a crude hash of the filename to generate the first 4 bytes - identifier[0] = 0; - identifier[1] = 0; - identifier[2] = 0; - identifier[3] = 0; - - for (int j = 0, i = strlen(path_)-1; i >= 0 && path_[i]!='/'; ++j, --i) { - identifier[j%4] += path_[i]; - } - - identifier[4] = (dylib_cmd.dylib.current_version >> 24) & 0xFF; - identifier[5] = (dylib_cmd.dylib.current_version >> 16) & 0xFF; - identifier[6] = (dylib_cmd.dylib.current_version >> 8) & 0xFF; - identifier[7] = dylib_cmd.dylib.current_version & 0xFF; - identifier[8] = (dylib_cmd.dylib.compatibility_version >> 24) & 0xFF; - identifier[9] = (dylib_cmd.dylib.compatibility_version >> 16) & 0xFF; - identifier[10] = (dylib_cmd.dylib.compatibility_version >> 8) & 0xFF; - identifier[11] = dylib_cmd.dylib.compatibility_version & 0xFF; - identifier[12] = (cpu_type >> 24) & 0xFF; - identifier[13] = (cpu_type >> 16) & 0xFF; - identifier[14] = (cpu_type >> 8) & 0xFF; - identifier[15] = cpu_type & 0xFF; - - return true; - } - - return false; -} - -uint32_t MachoID::Adler32(int cpu_type) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateCRC; - crc_ = 0; - - if (!walker.WalkHeader(cpu_type)) - return 0; - - return crc_; -} - -bool MachoID::MD5(int cpu_type, unsigned char identifier[16]) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateMD5; - - if (MD5_Init(&md5_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - MD5_Final(identifier, &md5_context_); - return true; - } - - return false; -} - -bool MachoID::SHA1(int cpu_type, unsigned char identifier[16]) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateSHA1; - - if (SHA_Init(&sha1_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - SHA_Final(identifier, &sha1_context_); - return true; - } - - return false; -} - -// static -bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - MachoID *macho_id = (MachoID *)context; - - if (cmd->cmd == LC_SEGMENT) { - struct segment_command seg; - - if (!walker->ReadBytes(&seg, sizeof(seg), offset)) - return false; - - if (swap) - swap_segment_command(&seg, NXHostByteOrder()); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command); - struct section sec; - for (unsigned long i = 0; i < seg.nsects; ++i) { - if (!walker->ReadBytes(&sec, sizeof(sec), offset)) - return false; - - if (swap) - swap_section(&sec, 1, NXHostByteOrder()); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec.flags & SECTION_TYPE) != S_ZEROFILL && sec.offset != 0) - macho_id->Update(walker, header_offset + sec.offset, sec.size); - - offset += sizeof(struct section); - } - } else if (cmd->cmd == LC_SEGMENT_64) { - struct segment_command_64 seg64; - - if (!walker->ReadBytes(&seg64, sizeof(seg64), offset)) - return false; - - if (swap) - breakpad_swap_segment_command_64(&seg64, NXHostByteOrder()); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command_64); - struct section_64 sec64; - for (unsigned long i = 0; i < seg64.nsects; ++i) { - if (!walker->ReadBytes(&sec64, sizeof(sec64), offset)) - return false; - - if (swap) - breakpad_swap_section_64(&sec64, 1, NXHostByteOrder()); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec64.flags & SECTION_TYPE) != S_ZEROFILL && sec64.offset != 0) - macho_id->Update(walker, header_offset + sec64.offset, sec64.size); - - offset += sizeof(struct section_64); - } - } - - // Continue processing - return true; -} - -// static -bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_UUID) { - struct breakpad_uuid_command *uuid_cmd = - (struct breakpad_uuid_command *)context; - - if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command), - offset)) - return false; - - if (swap) - breakpad_swap_uuid_command(uuid_cmd, NXHostByteOrder()); - - return false; - } - - // Continue processing - return true; -} - -// static -bool MachoID::IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_ID_DYLIB) { - struct dylib_command *dylib_cmd = (struct dylib_command *)context; - - if (!walker->ReadBytes(dylib_cmd, sizeof(struct dylib_command), offset)) - return false; - - if (swap) - swap_dylib_command(dylib_cmd, NXHostByteOrder()); - - return false; - } - - // Continue processing - return true; -} - -} // namespace MacFileUtilities diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_id.h b/thirdparty/google-breakpad/r318/src/common/mac/macho_id.h deleted file mode 100644 index 039bba38..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_id.h +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.h: Functions to gather identifying information from a macho file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_ID_H__ -#define COMMON_MAC_MACHO_ID_H__ - -#include -#include -#include -#include - -namespace MacFileUtilities { - -class MachoWalker; - -class MachoID { - public: - MachoID(const char *path); - ~MachoID(); - - // For the given |cpu_type|, return a UUID from the LC_UUID command. - // Return false if there isn't a LC_UUID command. - bool UUIDCommand(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return a UUID from the LC_ID_DYLIB command. - // Return false if there isn't a LC_ID_DYLIB command. - bool IDCommand(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return the Adler32 CRC for the mach-o data - // segment(s). - // Return 0 on error (e.g., if the file is not a mach-o file) - uint32_t Adler32(int cpu_type); - - // For the given |cpu_type|, return the MD5 for the mach-o data segment(s). - // Return true on success, false otherwise - bool MD5(int cpu_type, unsigned char identifier[16]); - - // For the given |cpu_type|, return the SHA1 for the mach-o data segment(s). - // Return true on success, false otherwise - bool SHA1(int cpu_type, unsigned char identifier[16]); - - private: - // Signature of class member function to be called with data read from file - typedef void (MachoID::*UpdateFunction)(unsigned char *bytes, size_t size); - - // Update the CRC value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateCRC(unsigned char *bytes, size_t size); - - // Update the MD5 value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateMD5(unsigned char *bytes, size_t size); - - // Update the SHA1 value by examining |size| |bytes| and applying the - // algorithm to each byte. - void UpdateSHA1(unsigned char *bytes, size_t size); - - // Bottleneck for update routines - void Update(MachoWalker *walker, unsigned long offset, size_t size); - - // The callback from the MachoWalker for CRC, MD5, and SHA1 - static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_UUID - static bool UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_ID_DYLIB - static bool IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // File path - char path_[PATH_MAX]; - - // File descriptor - int file_; - - // The current crc value - uint32_t crc_; - - // The MD5 context - MD5_CTX md5_context_; - - // The SHA1 context - SHA_CTX sha1_context_; - - // The current update to call from the Update callback - UpdateFunction update_function_; -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_ID_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.cc b/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.cc deleted file mode 100644 index d25de5c8..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.cc +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilties.cc: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#include "common/mac/macho_utilities.h" - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc, - enum NXByteOrder target_byte_order) -{ - uc->cmd = NXSwapLong(uc->cmd); - uc->cmdsize = NXSwapLong(uc->cmdsize); -} - -void breakpad_swap_segment_command_64(struct segment_command_64 *sg, - enum NXByteOrder target_byte_order) -{ - sg->cmd = NXSwapLong(sg->cmd); - sg->cmdsize = NXSwapLong(sg->cmdsize); - - sg->vmaddr = NXSwapLongLong(sg->vmaddr); - sg->vmsize = NXSwapLongLong(sg->vmsize); - sg->fileoff = NXSwapLongLong(sg->fileoff); - sg->filesize = NXSwapLongLong(sg->filesize); - - sg->maxprot = NXSwapLong(sg->maxprot); - sg->initprot = NXSwapLong(sg->initprot); - sg->nsects = NXSwapLong(sg->nsects); - sg->flags = NXSwapLong(sg->flags); -} - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh, - enum NXByteOrder target_byte_order) -{ - mh->magic = NXSwapLong(mh->magic); - mh->cputype = NXSwapLong(mh->cputype); - mh->cpusubtype = NXSwapLong(mh->cpusubtype); - mh->filetype = NXSwapLong(mh->filetype); - mh->ncmds = NXSwapLong(mh->ncmds); - mh->sizeofcmds = NXSwapLong(mh->sizeofcmds); - mh->flags = NXSwapLong(mh->flags); - mh->reserved = NXSwapLong(mh->reserved); -} - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects, - enum NXByteOrder target_byte_order) -{ - for (uint32_t i = 0; i < nsects; i++) { - s[i].addr = NXSwapLongLong(s[i].addr); - s[i].size = NXSwapLongLong(s[i].size); - - s[i].offset = NXSwapLong(s[i].offset); - s[i].align = NXSwapLong(s[i].align); - s[i].reloff = NXSwapLong(s[i].reloff); - s[i].nreloc = NXSwapLong(s[i].nreloc); - s[i].flags = NXSwapLong(s[i].flags); - s[i].reserved1 = NXSwapLong(s[i].reserved1); - s[i].reserved2 = NXSwapLong(s[i].reserved2); - } -} diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.h b/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.h deleted file mode 100644 index f74e93aa..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_utilities.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilities.h: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#ifndef COMMON_MAC_MACHO_UTILITIES_H__ -#define COMMON_MAC_MACHO_UTILITIES_H__ - -#include -#include - -/* Some #defines and structs that aren't defined in older SDKs */ -#ifndef CPU_ARCH_ABI64 -# define CPU_ARCH_ABI64 0x01000000 -#endif - -#ifndef CPU_TYPE_X86 -# define CPU_TYPE_X86 CPU_TYPE_I386 -#endif - -#ifndef CPU_TYPE_POWERPC64 -# define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) -#endif - -#ifndef LC_UUID -# define LC_UUID 0x1b /* the uuid */ -#endif - -#if TARGET_CPU_X86 -# define BREAKPAD_MACHINE_THREAD_STATE i386_THREAD_STATE -#else -# define BREAKPAD_MACHINE_THREAD_STATE MACHINE_THREAD_STATE -#endif - -// The uuid_command struct/swap routines were added during the 10.4 series. -// Their presence isn't guaranteed. -struct breakpad_uuid_command { - uint32_t cmd; /* LC_UUID */ - uint32_t cmdsize; /* sizeof(struct uuid_command) */ - uint8_t uuid[16]; /* the 128-bit uuid */ -}; - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc, - enum NXByteOrder target_byte_order); - -// Older SDKs defines thread_state_data_t as an int[] instead -// of the natural_t[] it should be. -typedef natural_t breakpad_thread_state_data_t[THREAD_STATE_MAX]; - -// The 64-bit swap routines were added during the 10.4 series, their -// presence isn't guaranteed. -void breakpad_swap_segment_command_64(struct segment_command_64 *sg, - enum NXByteOrder target_byte_order); - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh, - enum NXByteOrder target_byte_order); - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects, - enum NXByteOrder target_byte_order); - -#endif diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.cc b/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.cc deleted file mode 100644 index dd2c3b39..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.cc +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.cc: Iterate over the load commands in a mach-o file -// -// See macho_walker.h for documentation -// -// Author: Dan Waylonis - -extern "C" { // necessary for Leopard - #include - #include - #include - #include - #include - #include - #include -} - -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, - void *context) - : callback_(callback), - callback_context_(context) { - file_ = open(path, O_RDONLY); -} - -MachoWalker::~MachoWalker() { - if (file_ != -1) - close(file_); -} - -int MachoWalker::ValidateCPUType(int cpu_type) { - // If the user didn't specify, try to use the local architecture. If that - // fails, use the base type for the executable. - if (cpu_type == 0) { - const NXArchInfo *arch = NXGetLocalArchInfo(); - if (arch) - cpu_type = arch->cputype; - else -#if __ppc__ - cpu_type = CPU_TYPE_POWERPC; -#elif __i386__ - cpu_type = CPU_TYPE_X86; -#else -#error Unknown architecture -- are you on a PDP-11? -#endif - } - - return cpu_type; -} - -bool MachoWalker::WalkHeader(int cpu_type) { - int valid_cpu_type = ValidateCPUType(cpu_type); - off_t offset; - if (FindHeader(valid_cpu_type, offset)) { - if (cpu_type & CPU_ARCH_ABI64) - return WalkHeader64AtOffset(offset); - - return WalkHeaderAtOffset(offset); - } - - return false; -} - -bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) { - return pread(file_, buffer, size, offset) == (ssize_t)size; -} - -bool MachoWalker::CurrentHeader(struct mach_header_64 *header, off_t *offset) { - if (current_header_) { - memcpy(header, current_header_, sizeof(mach_header_64)); - *offset = current_header_offset_; - return true; - } - - return false; -} - -bool MachoWalker::FindHeader(int cpu_type, off_t &offset) { - int valid_cpu_type = ValidateCPUType(cpu_type); - // Read the magic bytes that's common amongst all mach-o files - uint32_t magic; - if (!ReadBytes(&magic, sizeof(magic), 0)) - return false; - - offset = sizeof(magic); - - // Figure out what type of file we've got - bool is_fat = false; - if (magic == FAT_MAGIC || magic == FAT_CIGAM) { - is_fat = true; - } - else if (magic != MH_MAGIC && magic != MH_CIGAM && magic != MH_MAGIC_64 && - magic != MH_CIGAM_64) { - return false; - } - - if (!is_fat) { - // If we don't have a fat header, check if the cpu type matches the single - // header - cpu_type_t header_cpu_type; - if (!ReadBytes(&header_cpu_type, sizeof(header_cpu_type), offset)) - return false; - - if (magic == MH_CIGAM || magic == MH_CIGAM_64) - header_cpu_type = NXSwapInt(header_cpu_type); - - if (valid_cpu_type != header_cpu_type) - return false; - - offset = 0; - return true; - } else { - // Read the fat header and find an appropriate architecture - offset = 0; - struct fat_header fat; - if (!ReadBytes(&fat, sizeof(fat), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - swap_fat_header(&fat, NXHostByteOrder()); - - offset += sizeof(fat); - - // Search each architecture for the desired one - struct fat_arch arch; - for (uint32_t i = 0; i < fat.nfat_arch; ++i) { - if (!ReadBytes(&arch, sizeof(arch), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - swap_fat_arch(&arch, 1, NXHostByteOrder()); - - if (arch.cputype == valid_cpu_type) { - offset = arch.offset; - return true; - } - - offset += sizeof(arch); - } - } - - return false; -} - -bool MachoWalker::WalkHeaderAtOffset(off_t offset) { - struct mach_header header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM); - if (swap) - swap_mach_header(&header, NXHostByteOrder()); - - // Copy the data into the mach_header_64 structure. Since the 32-bit and - // 64-bit only differ in the last field (reserved), this is safe to do. - struct mach_header_64 header64; - memcpy((void *)&header64, (const void *)&header, sizeof(header)); - header64.reserved = 0; - - current_header_ = &header64; - current_header_size_ = sizeof(header); // 32-bit, not 64-bit - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeader64AtOffset(off_t offset) { - struct mach_header_64 header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM_64); - if (swap) - breakpad_swap_mach_header_64(&header, NXHostByteOrder()); - - current_header_ = &header; - current_header_size_ = sizeof(header); - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeaderCore(off_t offset, uint32_t number_of_commands, - bool swap) { - for (uint32_t i = 0; i < number_of_commands; ++i) { - struct load_command cmd; - if (!ReadBytes(&cmd, sizeof(cmd), offset)) - return false; - - if (swap) - swap_load_command(&cmd, NXHostByteOrder()); - - // Call the user callback - if (callback_ && !callback_(this, &cmd, offset, swap, callback_context_)) - break; - - offset += cmd.cmdsize; - } - - return true; -} - -} // namespace MacFileUtilities diff --git a/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.h b/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.h deleted file mode 100644 index 6445a4f4..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/macho_walker.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.h: Iterate over the load commands in a mach-o file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_WALKER_H__ -#define COMMON_MAC_MACHO_WALKER_H__ - -#include -#include - -namespace MacFileUtilities { - -class MachoWalker { - public: - // A callback function executed when a new load command is read. If no - // further processing of load commands is desired, return false. Otherwise, - // return true. - // |cmd| is the current command, and |offset| is the location relative to the - // beginning of the file (not header) where the command was read. If |swap| - // is set, then any command data (other than the returned load_command) should - // be swapped when read - typedef bool (*LoadCommandCallback)(MachoWalker *walker, load_command *cmd, - off_t offset, bool swap, void *context); - - MachoWalker(const char *path, LoadCommandCallback callback, void *context); - MachoWalker(int file_descriptor, LoadCommandCallback callback, void *context); - ~MachoWalker(); - - // Begin walking the header for |cpu_type|. If |cpu_type| is 0, then the - // native cpu type is used. Otherwise, accepted values are listed in - // /usr/include/mach/machine.h (e.g., CPU_TYPE_X86 or CPU_TYPE_POWERPC). - // Returns false if opening the file failed or if the |cpu_type| is not - // present in the file. - bool WalkHeader(int cpu_type); - - // Locate (if any) the header offset for |cpu_type| and return in |offset|. - // Return true if found, false otherwise. - bool FindHeader(int cpu_type, off_t &offset); - - // Read |size| bytes from the opened file at |offset| into |buffer| - bool ReadBytes(void *buffer, size_t size, off_t offset); - - // Return the current header and header offset - bool CurrentHeader(struct mach_header_64 *header, off_t *offset); - - private: - // Validate the |cpu_type| - int ValidateCPUType(int cpu_type); - - // Process an individual header starting at |offset| from the start of the - // file. Return true if successful, false otherwise. - bool WalkHeaderAtOffset(off_t offset); - bool WalkHeader64AtOffset(off_t offset); - - // Bottleneck for walking the load commands - bool WalkHeaderCore(off_t offset, uint32_t number_of_commands, bool swap); - - // File descriptor to the opened file - int file_; - - // User specified callback & context - LoadCommandCallback callback_; - void *callback_context_; - - // Current header, size, and offset. The mach_header_64 is used for both - // 32-bit and 64-bit headers because they only differ in their last field - // (reserved). By adding the |current_header_size_| and the - // |current_header_offset_|, you can determine the offset in the file just - // after the header. - struct mach_header_64 *current_header_; - unsigned long current_header_size_; - off_t current_header_offset_; -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_WALKER_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.cc b/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.cc deleted file mode 100644 index bdf3336c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "processor/scoped_ptr.h" -#include "common/mac/string_utilities.h" - -namespace MacStringUtils { - -using google_breakpad::scoped_array; - -std::string ConvertToString(CFStringRef str) { - CFIndex length = CFStringGetLength(str); - std::string result; - - if (!length) - return result; - - CFIndex maxUTF8Length = - CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); - scoped_array buffer(new UInt8[maxUTF8Length + 1]); - CFIndex actualUTF8Length; - CFStringGetBytes(str, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, - false, buffer.get(), maxUTF8Length, &actualUTF8Length); - buffer[actualUTF8Length] = 0; - result.assign((const char *)buffer.get()); - - return result; -} - -unsigned int IntegerValueAtIndex(string &str, unsigned int idx) { - string digits("0123456789"), temp; - unsigned int start = 0; - unsigned int end; - unsigned int found = 0; - unsigned int result = 0; - - for (; found <= idx; ++found) { - end = str.find_first_not_of(digits, start); - - if (end == string::npos) - end = str.size(); - - temp = str.substr(start, end - start); - - if (found == idx) { - result = atoi(temp.c_str()); - } - - start = str.find_first_of(digits, end + 1); - - if (start == string::npos) - break; - } - - return result; -} - -} // namespace MacStringUtils diff --git a/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.h b/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.h deleted file mode 100644 index 6d89c834..00000000 --- a/thirdparty/google-breakpad/r318/src/common/mac/string_utilities.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utilities.h: Utilities for strings for Mac platform - -#ifndef COMMON_MAC_STRING_UTILITIES_H__ -#define COMMON_MAC_STRING_UTILITIES_H__ - -#include - -#include - -namespace MacStringUtils { - -using std::string; - -// Convert a CoreFoundation string into a std::string -string ConvertToString(CFStringRef str); - -// Return the idx'th decimal integer in str, separated by non-decimal-digits -// E.g., str = 10.4.8, idx = 1 -> 4 -unsigned int IntegerValueAtIndex(string &str, unsigned int idx); - -} // namespace MacStringUtils - -#endif // COMMON_MAC_STRING_UTILITIES_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/md5.c b/thirdparty/google-breakpad/r318/src/common/md5.c deleted file mode 100644 index 7fc198af..00000000 --- a/thirdparty/google-breakpad/r318/src/common/md5.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ - -#include - -#include "common/md5.h" - -#ifndef WORDS_BIGENDIAN -#define byteReverse(buf, len) /* Nothing */ -#else -/* - * Note: this code is harmless on little-endian machines. - */ -static void byteReverse(unsigned char *buf, unsigned longs) -{ - u32 t; - do { - t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | - ((unsigned) buf[1] << 8 | buf[0]); - *(u32 *) buf = t; - buf += 4; - } while (--longs); -} -#endif - -static void MD5Transform(u32 buf[4], u32 const in[16]); - -/* - * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - * initialization constants. - */ -void MD5Init(struct MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - * Update context to reflect the concatenation of another buffer full - * of bytes. - */ -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) -{ - u32 t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((u32) len << 3)) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; - - t = 64 - t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += t; - len -= t; - } - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void MD5Final(unsigned char digest[16], struct MD5Context *ctx) -{ - unsigned count; - unsigned char *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } - byteReverse(ctx->in, 14); - - /* Append length in bits and transform */ - ((u32 *) ctx->in)[14] = ctx->bits[0]; - ((u32 *) ctx->in)[15] = ctx->bits[1]; - - MD5Transform(ctx->buf, (u32 *) ctx->in); - byteReverse((unsigned char *) ctx->buf, 4); - memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -} - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -static void MD5Transform(u32 buf[4], u32 const in[16]) -{ - register u32 a, b, c, d; - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} diff --git a/thirdparty/google-breakpad/r318/src/common/md5.h b/thirdparty/google-breakpad/r318/src/common/md5.h deleted file mode 100644 index dbf4893c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/md5.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2007 Google Inc. All Rights Reserved. -// Author: liuli@google.com (Liu Li) -#ifndef COMMON_MD5_H__ -#define COMMON_MD5_H__ - -#include - -typedef uint32_t u32; -typedef uint8_t u8; - -struct MD5Context { - u32 buf[4]; - u32 bits[2]; - u8 in[64]; -}; - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -void MD5Init(struct MD5Context *ctx); - -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len); - -void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - -#ifdef __cplusplus -} -#endif - -#endif // COMMON_MD5_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.cc b/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.cc deleted file mode 100644 index 816d744c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.cc +++ /dev/null @@ -1,681 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "common/solaris/dump_symbols.h" -#include "common/solaris/file_id.h" -#include "common/solaris/guid_creator.h" -#include "processor/scoped_ptr.h" - -// This namespace contains helper functions. -namespace { - -using std::make_pair; - -#if defined(_LP64) -typedef Elf64_Sym Elf_Sym; -#else -typedef Elf32_Sym Elf_Sym; -#endif - -// Symbol table entry from stabs. Sun CC specific. -struct slist { - // String table index. - unsigned int n_strx; - // Stab type. - unsigned char n_type; - char n_other; - short n_desc; - unsigned long n_value; -}; - -// Symbol table entry -struct SymbolEntry { - // Offset from the start of the file. - GElf_Addr offset; - // Function size. - GElf_Word size; -}; - -// Infomation of a line. -struct LineInfo { - // Offset from start of the function. - // Load from stab symbol. - GElf_Off rva_to_func; - // Offset from base of the loading binary. - GElf_Off rva_to_base; - // Size of the line. - // The first line: equals to rva_to_func. - // The other lines: the difference of rva_to_func of the line and - // rva_to_func of the previous N_SLINE. - uint32_t size; - // Line number. - uint32_t line_num; -}; - -// Information of a function. -struct FuncInfo { - // Name of the function. - const char *name; - // Offset from the base of the loading address. - GElf_Off rva_to_base; - // Virtual address of the function. - // Load from stab symbol. - GElf_Addr addr; - // Size of the function. - // Equal to rva_to_func of the last function line. - uint32_t size; - // Total size of stack parameters. - uint32_t stack_param_size; - // Line information array. - std::vector line_info; -}; - -// Information of a source file. -struct SourceFileInfo { - // Name of the source file. - const char *name; - // Starting address of the source file. - GElf_Addr addr; - // Id of the source file. - int source_id; - // Functions information. - std::vector func_info; -}; - -struct CompareString { - bool operator()(const char *s1, const char *s2) const { - return strcmp(s1, s2) < 0; - } -}; - -typedef std::map SymbolMap; - -// Information of a symbol table. -// This is the root of all types of symbol. -struct SymbolInfo { - std::vector source_file_info; - // Symbols information. - SymbolMap symbol_entries; -}; - -// Stab section name. -const char *kStabName = ".stab"; - -// Stab str section name. -const char *kStabStrName = ".stabstr"; - -// Symtab section name. -const char *kSymtabName = ".symtab"; - -// Strtab section name. -const char *kStrtabName = ".strtab"; - -// Default buffer lenght for demangle. -const int demangleLen = 20000; - -// Offset to the string table. -u_int64_t stringOffset = 0; - -// Update the offset to the start of the string index of the next -// object module for every N_ENDM stabs. -inline void RecalculateOffset(struct slist* cur_list, char *stabstr) { - while ((--cur_list)->n_strx == 0) ; - stringOffset += cur_list->n_strx; - - char *temp = stabstr + stringOffset; - while (*temp != '\0') { - ++stringOffset; - ++temp; - } - // Skip the extra '\0' - ++stringOffset; -} - -// Demangle using demangle library on Solaris. -std::string Demangle(const char *mangled) { - int status = 0; - std::string str(mangled); - char *demangled = (char *)malloc(demangleLen); - - if (!demangled) { - fprintf(stderr, "no enough memory.\n"); - goto out; - } - - if ((status = cplus_demangle(mangled, demangled, demangleLen)) == - DEMANGLE_ESPACE) { - fprintf(stderr, "incorrect demangle.\n"); - goto out; - } - - str = demangled; - free(demangled); - -out: - return str; -} - -bool WriteFormat(int fd, const char *fmt, ...) { - va_list list; - char buffer[4096]; - ssize_t expected, written; - va_start(list, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, list); - expected = strlen(buffer); - written = write(fd, buffer, strlen(buffer)); - va_end(list); - return expected == written; -} - -bool IsValidElf(const GElf_Ehdr *elf_header) { - return memcmp(elf_header, ELFMAG, SELFMAG) == 0; -} - -static bool FindSectionByName(Elf *elf, const char *name, - int shstrndx, - GElf_Shdr *shdr) { - assert(name != NULL); - - if (strlen(name) == 0) - return false; - - Elf_Scn *scn = NULL; - - while ((scn = elf_nextscn(elf, scn)) != NULL) { - if (gelf_getshdr(scn, shdr) == (GElf_Shdr *)0) { - fprintf(stderr, "failed to read section header: %s\n", elf_errmsg(0)); - return false; - } - - const char *section_name = elf_strptr(elf, shstrndx, shdr->sh_name); - if (!section_name) { - fprintf(stderr, "Section name error: %s\n", elf_errmsg(-1)); - continue; - } - - if (strcmp(section_name, name) == 0) - return true; - } - - return false; -} - -// The parameter size is used for FPO-optimized code, and -// this is all tied up with the debugging data for Windows x86. -// Set it to 0 on Solaris. -int LoadStackParamSize(struct slist *list, - struct slist *list_end, - struct FuncInfo *func_info) { - struct slist *cur_list = list; - int step = 1; - while (cur_list < list_end && cur_list->n_type == N_PSYM) { - ++cur_list; - ++step; - } - - func_info->stack_param_size = 0; - return step; -} - -int LoadLineInfo(struct slist *list, - struct slist *list_end, - struct FuncInfo *func_info) { - struct slist *cur_list = list; - do { - // Skip non line information. - while (cur_list < list_end && cur_list->n_type != N_SLINE) { - // Only exit when got another function, or source file, or end stab. - if (cur_list->n_type == N_FUN || cur_list->n_type == N_SO || - cur_list->n_type == N_ENDM) { - return cur_list - list; - } - ++cur_list; - } - struct LineInfo line; - while (cur_list < list_end && cur_list->n_type == N_SLINE) { - line.rva_to_func = cur_list->n_value; - // n_desc is a signed short - line.line_num = (unsigned short)cur_list->n_desc; - func_info->line_info.push_back(line); - ++cur_list; - } - if (cur_list == list_end && cur_list->n_type == N_ENDM) - break; - } while (list < list_end); - - return cur_list - list; -} - -int LoadFuncSymbols(struct slist *list, - struct slist *list_end, - char *stabstr, - GElf_Word base, - struct SourceFileInfo *source_file_info) { - struct slist *cur_list = list; - assert(cur_list->n_type == N_SO); - ++cur_list; - - source_file_info->func_info.clear(); - while (cur_list < list_end) { - // Go until the function symbol. - while (cur_list < list_end && cur_list->n_type != N_FUN) { - if (cur_list->n_type == N_SO) { - return cur_list - list; - } - ++cur_list; - if (cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - continue; - } - while (cur_list->n_type == N_FUN) { - struct FuncInfo func_info; - memset(&func_info, 0, sizeof(func_info)); - func_info.name = stabstr + cur_list->n_strx + stringOffset; - // The n_value field is always 0 from stab generated by Sun CC. - // TODO(Alfred): Find the correct value. - func_info.addr = cur_list->n_value; - ++cur_list; - if (cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - if (cur_list->n_type != N_ESYM && cur_list->n_type != N_ISYM && - cur_list->n_type != N_FUN) { - // Stack parameter size. - cur_list += LoadStackParamSize(cur_list, list_end, &func_info); - // Line info. - cur_list += LoadLineInfo(cur_list, list_end, &func_info); - } - if (cur_list < list_end && cur_list->n_type == N_ENDM) - RecalculateOffset(cur_list, stabstr); - // Functions in this module should have address bigger than the module - // starting address. - // - // These two values are always 0 with Sun CC. - // TODO(Alfred): Get the correct value or remove the condition statement. - if (func_info.addr >= source_file_info->addr) { - source_file_info->func_info.push_back(func_info); - } - } - } - return cur_list - list; -} - -// Compute size and rva information based on symbols loaded from stab section. -bool ComputeSizeAndRVA(struct SymbolInfo *symbols) { - std::vector *sorted_files = - &(symbols->source_file_info); - SymbolMap *symbol_entries = &(symbols->symbol_entries); - for (size_t i = 0; i < sorted_files->size(); ++i) { - struct SourceFileInfo &source_file = (*sorted_files)[i]; - std::vector *sorted_functions = &(source_file.func_info); - int func_size = sorted_functions->size(); - - for (size_t j = 0; j < func_size; ++j) { - struct FuncInfo &func_info = (*sorted_functions)[j]; - int line_count = func_info.line_info.size(); - - // Discard the ending part of the name. - std::string func_name(func_info.name); - std::string::size_type last_colon = func_name.find_first_of(':'); - if (last_colon != std::string::npos) - func_name = func_name.substr(0, last_colon); - - // Fine the symbol offset from the loading address and size by name. - SymbolMap::const_iterator it = symbol_entries->find(func_name.c_str()); - if (it->second) { - func_info.rva_to_base = it->second->offset; - func_info.size = (line_count == 0) ? 0 : it->second->size; - } else { - func_info.rva_to_base = 0; - func_info.size = 0; - } - - // Compute function and line size. - for (size_t k = 0; k < line_count; ++k) { - struct LineInfo &line_info = func_info.line_info[k]; - - line_info.rva_to_base = line_info.rva_to_func + func_info.rva_to_base; - if (k == line_count - 1) { - line_info.size = func_info.size - line_info.rva_to_func; - } else { - struct LineInfo &next_line = func_info.line_info[k + 1]; - line_info.size = next_line.rva_to_func - line_info.rva_to_func; - } - } // for each line. - } // for each function. - } // for each source file. - for (SymbolMap::iterator it = symbol_entries->begin(); - it != symbol_entries->end(); ++it) { - free(it->second); - } - return true; -} - -bool LoadAllSymbols(const GElf_Shdr *stab_section, - const GElf_Shdr *stabstr_section, - GElf_Word base, - struct SymbolInfo *symbols) { - if (stab_section == NULL || stabstr_section == NULL) - return false; - - char *stabstr = - reinterpret_cast(stabstr_section->sh_offset + base); - struct slist *lists = - reinterpret_cast(stab_section->sh_offset + base); - int nstab = stab_section->sh_size / sizeof(struct slist); - int source_id = 0; - - // First pass, load all symbols from the object file. - for (int i = 0; i < nstab; ) { - int step = 1; - struct slist *cur_list = lists + i; - if (cur_list->n_type == N_SO) { - // FUNC
- struct SourceFileInfo source_file_info; - source_file_info.name = stabstr + cur_list->n_strx + stringOffset; - // The n_value field is always 0 from stab generated by Sun CC. - // TODO(Alfred): Find the correct value. - source_file_info.addr = cur_list->n_value; - if (strchr(source_file_info.name, '.')) - source_file_info.source_id = source_id++; - else - source_file_info.source_id = -1; - step = LoadFuncSymbols(cur_list, lists + nstab - 1, stabstr, - base, &source_file_info); - symbols->source_file_info.push_back(source_file_info); - } - i += step; - } - // Second pass, compute the size of functions and lines. - return ComputeSizeAndRVA(symbols); -} - -bool LoadSymbols(Elf *elf, GElf_Ehdr *elf_header, struct SymbolInfo *symbols, - void *obj_base) { - GElf_Word base = reinterpret_cast(obj_base); - - const GElf_Shdr *sections = - reinterpret_cast(elf_header->e_shoff + base); - GElf_Shdr stab_section; - if (!FindSectionByName(elf, kStabName, elf_header->e_shstrndx, - &stab_section)) { - fprintf(stderr, "Stab section not found.\n"); - return false; - } - GElf_Shdr stabstr_section; - if (!FindSectionByName(elf, kStabStrName, elf_header->e_shstrndx, - &stabstr_section)) { - fprintf(stderr, "Stabstr section not found.\n"); - return false; - } - GElf_Shdr symtab_section; - if (!FindSectionByName(elf, kSymtabName, elf_header->e_shstrndx, - &symtab_section)) { - fprintf(stderr, "Symtab section not found.\n"); - return false; - } - GElf_Shdr strtab_section; - if (!FindSectionByName(elf, kStrtabName, elf_header->e_shstrndx, - &strtab_section)) { - fprintf(stderr, "Strtab section not found.\n"); - return false; - } - - Elf_Sym *symbol = (Elf_Sym *)((char *)base + symtab_section.sh_offset); - for (int i = 0; i < symtab_section.sh_size/symtab_section.sh_entsize; ++i) { - struct SymbolEntry *symbol_entry = - (struct SymbolEntry *)malloc(sizeof(struct SymbolEntry)); - const char *name = reinterpret_cast( - strtab_section.sh_offset + (GElf_Word)base + symbol->st_name); - symbol_entry->offset = symbol->st_value; - symbol_entry->size = symbol->st_size; - symbols->symbol_entries.insert(make_pair(name, symbol_entry)); - ++symbol; - } - - - // Load symbols. - return LoadAllSymbols(&stab_section, &stabstr_section, base, symbols); -} - -bool WriteModuleInfo(int fd, GElf_Half arch, const std::string &obj_file) { - const char *arch_name = NULL; - if (arch == EM_386) - arch_name = "x86"; - else if (arch == EM_X86_64) - arch_name = "x86_64"; - else if (arch == EM_SPARC32PLUS) - arch_name = "SPARC_32+"; - else { - printf("Please add more ARCH support\n"); - return false; - } - - unsigned char identifier[16]; - google_breakpad::FileID file_id(obj_file.c_str()); - if (file_id.ElfFileIdentifier(identifier)) { - char identifier_str[40]; - file_id.ConvertIdentifierToString(identifier, - identifier_str, sizeof(identifier_str)); - std::string filename = obj_file; - size_t slash_pos = obj_file.find_last_of("/"); - if (slash_pos != std::string::npos) - filename = obj_file.substr(slash_pos + 1); - return WriteFormat(fd, "MODULE solaris %s %s %s\n", arch_name, - identifier_str, filename.c_str()); - } - return false; -} - -bool WriteSourceFileInfo(int fd, const struct SymbolInfo &symbols) { - for (size_t i = 0; i < symbols.source_file_info.size(); ++i) { - if (symbols.source_file_info[i].source_id != -1) { - const char *name = symbols.source_file_info[i].name; - if (!WriteFormat(fd, "FILE %d %s\n", - symbols.source_file_info[i].source_id, name)) - return false; - } - } - return true; -} - -bool WriteOneFunction(int fd, int source_id, - const struct FuncInfo &func_info){ - // Discard the ending part of the name. - std::string func_name(func_info.name); - std::string::size_type last_colon = func_name.find_last_of(':'); - if (last_colon != std::string::npos) - func_name = func_name.substr(0, last_colon); - func_name = Demangle(func_name.c_str()); - - if (func_info.size <= 0) - return true; - - // rva_to_base could be unsigned long(32 bit) or unsigned long long(64 bit). - if (WriteFormat(fd, "FUNC %llx %x %d %s\n", - (long long)func_info.rva_to_base, - func_info.size, - func_info.stack_param_size, - func_name.c_str())) { - for (size_t i = 0; i < func_info.line_info.size(); ++i) { - const struct LineInfo &line_info = func_info.line_info[i]; - if (line_info.line_num == 0) - return true; - if (!WriteFormat(fd, "%llx %x %d %d\n", - (long long)line_info.rva_to_base, - line_info.size, - line_info.line_num, - source_id)) - return false; - } - return true; - } - return false; -} - -bool WriteFunctionInfo(int fd, const struct SymbolInfo &symbols) { - for (size_t i = 0; i < symbols.source_file_info.size(); ++i) { - const struct SourceFileInfo &file_info = symbols.source_file_info[i]; - for (size_t j = 0; j < file_info.func_info.size(); ++j) { - const struct FuncInfo &func_info = file_info.func_info[j]; - if (!WriteOneFunction(fd, file_info.source_id, func_info)) - return false; - } - } - return true; -} - -bool DumpStabSymbols(int fd, const struct SymbolInfo &symbols) { - return WriteSourceFileInfo(fd, symbols) && - WriteFunctionInfo(fd, symbols); -} - -// -// FDWrapper -// -// Wrapper class to make sure opened file is closed. -// -class FDWrapper { - public: - explicit FDWrapper(int fd) : - fd_(fd) { - } - ~FDWrapper() { - if (fd_ != -1) - close(fd_); - } - int get() { - return fd_; - } - int release() { - int fd = fd_; - fd_ = -1; - return fd; - } - private: - int fd_; -}; - -// -// MmapWrapper -// -// Wrapper class to make sure mapped regions are unmapped. -// -class MmapWrapper { - public: - MmapWrapper(void *mapped_address, size_t mapped_size) : - base_(mapped_address), size_(mapped_size) { - } - ~MmapWrapper() { - if (base_ != NULL) { - assert(size_ > 0); - munmap((char *)base_, size_); - } - } - void release() { - base_ = NULL; - size_ = 0; - } - - private: - void *base_; - size_t size_; -}; - -} // namespace - -namespace google_breakpad { - -class AutoElfEnder { - public: - AutoElfEnder(Elf *elf) : elf_(elf) {} - ~AutoElfEnder() { if (elf_) elf_end(elf_); } - private: - Elf *elf_; -}; - - -bool DumpSymbols::WriteSymbolFile(const std::string &obj_file, int sym_fd) { - if (elf_version(EV_CURRENT) == EV_NONE) { - fprintf(stderr, "elf_version() failed: %s\n", elf_errmsg(0)); - return false; - } - - int obj_fd = open(obj_file.c_str(), O_RDONLY); - if (obj_fd < 0) - return false; - FDWrapper obj_fd_wrapper(obj_fd); - struct stat st; - if (fstat(obj_fd, &st) != 0 && st.st_size <= 0) - return false; - void *obj_base = mmap(NULL, st.st_size, - PROT_READ, MAP_PRIVATE, obj_fd, 0); - if (obj_base == MAP_FAILED)) - return false; - MmapWrapper map_wrapper(obj_base, st.st_size); - GElf_Ehdr elf_header; - Elf *elf = elf_begin(obj_fd, ELF_C_READ, NULL); - AutoElfEnder elfEnder(elf); - - if (gelf_getehdr(elf, &elf_header) == (GElf_Ehdr *)NULL) { - fprintf(stderr, "failed to read elf header: %s\n", elf_errmsg(-1)); - return false; - } - - if (!IsValidElf(&elf_header)) { - fprintf(stderr, "header magic doesn't match\n"); - return false; - } - struct SymbolInfo symbols; - if (!LoadSymbols(elf, &elf_header, &symbols, obj_base)) - return false; - // Write to symbol file. - if (WriteModuleInfo(sym_fd, elf_header.e_machine, obj_file) && - DumpStabSymbols(sym_fd, symbols)) - return true; - - return false; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.h b/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.h deleted file mode 100644 index 7f4baadc..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/dump_symbols.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// dump_symbols.cc: Implements a Solaris stab debugging format dumper. -// -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_DUMP_SYMBOLS_H__ -#define COMMON_SOLARIS_DUMP_SYMBOLS_H__ - -#include - -namespace google_breakpad { - -class DumpSymbols { - public: - bool WriteSymbolFile(const std::string &obj_file, - int sym_fd); -}; - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_DUMP_SYMBOLS_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/file_id.cc b/thirdparty/google-breakpad/r318/src/common/solaris/file_id.cc deleted file mode 100644 index 643a1462..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/file_id.cc +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// -// Author: Alfred Peng - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "common/md5.h" -#include "common/solaris/file_id.h" -#include "common/solaris/message_output.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class AutoElfEnder { - public: - AutoElfEnder(Elf *elf) : elf_(elf) {} - ~AutoElfEnder() { if (elf_) elf_end(elf_); } - private: - Elf *elf_; -}; - -// Find the text section in elf object file. -// Return the section start address and the size. -static bool FindElfTextSection(int fd, const void *elf_base, - const void **text_start, - int *text_size) { - assert(text_start); - assert(text_size); - - *text_start = NULL; - *text_size = 0; - - if (elf_version(EV_CURRENT) == EV_NONE) { - print_message2(2, "elf_version() failed: %s\n", elf_errmsg(0)); - return false; - } - - GElf_Ehdr elf_header; - lseek(fd, 0L, 0); - Elf *elf = elf_begin(fd, ELF_C_READ, NULL); - AutoElfEnder elfEnder(elf); - - if (gelf_getehdr(elf, &elf_header) == (GElf_Ehdr *)NULL) { - print_message2(2, "failed to read elf header: %s\n", elf_errmsg(-1)); - return false; - } - - if (elf_header.e_ident[EI_MAG0] != ELFMAG0 || - elf_header.e_ident[EI_MAG1] != ELFMAG1 || - elf_header.e_ident[EI_MAG2] != ELFMAG2 || - elf_header.e_ident[EI_MAG3] != ELFMAG3) { - print_message1(2, "header magic doesn't match\n"); - return false; - } - - static const char kTextSectionName[] = ".text"; - const GElf_Shdr *text_section = NULL; - Elf_Scn *scn = NULL; - GElf_Shdr shdr; - - while ((scn = elf_nextscn(elf, scn)) != NULL) { - if (gelf_getshdr(scn, &shdr) == (GElf_Shdr *)0) { - print_message2(2, "failed to read section header: %s\n", elf_errmsg(0)); - return false; - } - - if (shdr.sh_type == SHT_PROGBITS) { - const char *section_name = elf_strptr(elf, elf_header.e_shstrndx, - shdr.sh_name); - if (!section_name) { - print_message2(2, "Section name error: %s\n", elf_errmsg(-1)); - continue; - } - - if (strcmp(section_name, kTextSectionName) == 0) { - text_section = &shdr; - break; - } - } - } - if (text_section != NULL && text_section->sh_size > 0) { - *text_start = (char *)elf_base + text_section->sh_offset; - *text_size = text_section->sh_size; - return true; - } - - return false; -} - -FileID::FileID(const char *path) { - strcpy(path_, path); -} - -class AutoCloser { - public: - AutoCloser(int fd) : fd_(fd) {} - ~AutoCloser() { if (fd_) close(fd_); } - private: - int fd_; -}; - -bool FileID::ElfFileIdentifier(unsigned char identifier[16]) { - int fd = 0; - if ((fd = open(path_, O_RDONLY)) < 0) - return false; - - AutoCloser autocloser(fd); - struct stat st; - if (fstat(fd, &st) != 0 || st.st_size <= 0) - return false; - - void *base = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - if (base == MAP_FAILED) - return false; - - bool success = false; - const void *text_section = NULL; - int text_size = 0; - - if (FindElfTextSection(fd, base, &text_section, &text_size)) { - MD5Context md5; - MD5Init(&md5); - MD5Update(&md5, (const unsigned char *)text_section, text_size); - MD5Final(identifier, &md5); - success = true; - } - - munmap((char *)base, st.st_size); - return success; -} - -// static -bool FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - if (buffer_length < 34) - return false; - - int buffer_idx = 0; - for (int idx = 0; idx < 16; ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi; - buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo; - } - - // Add an extra "0" by the end. - buffer[buffer_idx++] = '0'; - - // NULL terminate - buffer[buffer_idx] = 0; - - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/file_id.h b/thirdparty/google-breakpad/r318/src/common/solaris/file_id.h deleted file mode 100644 index 375e8575..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/file_id.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.h: Return a unique identifier for a file -// -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_FILE_ID_H__ -#define COMMON_SOLARIS_FILE_ID_H__ - -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the elf file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool ElfFileIdentifier(unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a MDCVInfoPDB70 struct. - // The |buffer| should be at least 34 bytes long to receive all of the data - // and termination. Shorter buffers will return false. - static bool ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_FILE_ID_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.cc b/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.cc deleted file mode 100644 index 70940259..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include -#include -#include - -#include "common/solaris/guid_creator.h" - -// -// GUIDGenerator -// -// This class is used to generate random GUID. -// Currently use random number to generate a GUID. This should be OK since -// we don't expect crash to happen very offen. -// -class GUIDGenerator { - public: - GUIDGenerator() { - srandom(time(NULL)); - } - - bool CreateGUID(GUID *guid) const { - guid->data1 = random(); - guid->data2 = (u_int16_t)(random()); - guid->data3 = (u_int16_t)(random()); - *reinterpret_cast(&guid->data4[0]) = random(); - *reinterpret_cast(&guid->data4[4]) = random(); - return true; - } -}; - -// Guid generator. -const GUIDGenerator kGuidGenerator; - -bool CreateGUID(GUID *guid) { - return kGuidGenerator.CreateGUID(guid); -}; - -// Parse guid to string. -bool GUIDToString(const GUID *guid, char *buf, int buf_len) { - // Should allow more space the the max length of GUID. - assert(buf_len > kGUIDStringLength); - int num = snprintf(buf, buf_len, kGUIDFormatString, - guid->data1, guid->data2, guid->data3, - *reinterpret_cast(&(guid->data4[0])), - *reinterpret_cast(&(guid->data4[4]))); - if (num != kGUIDStringLength) - return false; - - buf[num] = '\0'; - return true; -} diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.h b/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.h deleted file mode 100644 index 4aee3a1c..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/guid_creator.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_GUID_CREATOR_H__ -#define COMMON_SOLARIS_GUID_CREATOR_H__ - -#include "google_breakpad/common/minidump_format.h" - -typedef MDGUID GUID; - -// Format string for parsing GUID. -#define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" -// Length of GUID string. Don't count the ending '\0'. -#define kGUIDStringLength 36 - -// Create a guid. -bool CreateGUID(GUID *guid); - -// Get the string from guid. -bool GUIDToString(const GUID *guid, char *buf, int buf_len); - -#endif // COMMON_SOLARIS_GUID_CREATOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/solaris/message_output.h b/thirdparty/google-breakpad/r318/src/common/solaris/message_output.h deleted file mode 100644 index 3e3b1d46..00000000 --- a/thirdparty/google-breakpad/r318/src/common/solaris/message_output.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#ifndef COMMON_SOLARIS_MESSAGE_OUTPUT_H__ -#define COMMON_SOLARIS_MESSAGE_OUTPUT_H__ - -namespace google_breakpad { - -const int MESSAGE_MAX = 1000; - -// Message output macros. -// snprintf doesn't operate heap on Solaris, while printf and fprintf do. -// Use snprintf here to avoid heap allocation. -#define print_message1(std, message) \ - char buffer[MESSAGE_MAX]; \ - int len = snprintf(buffer, MESSAGE_MAX, message); \ - write(std, buffer, len) - -#define print_message2(std, message, para) \ - char buffer[MESSAGE_MAX]; \ - int len = snprintf(buffer, MESSAGE_MAX, message, para); \ - write(std, buffer, len); - -} // namespace google_breakpad - -#endif // COMMON_SOLARIS_MESSAGE_OUTPUT_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/string_conversion.cc b/thirdparty/google-breakpad/r318/src/common/string_conversion.cc deleted file mode 100644 index 50054ebc..00000000 --- a/thirdparty/google-breakpad/r318/src/common/string_conversion.cc +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/convert_UTF.h" -#include "processor/scoped_ptr.h" -#include "common/string_conversion.h" -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -void UTF8ToUTF16(const char *in, vector *out) { - size_t source_length = strlen(in); - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->empty(); - out->insert(out->begin(), source_length, 0); - u_int16_t *target_ptr = &(*out)[0]; - u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]) { - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + sizeof(char); - u_int16_t *target_ptr = out; - u_int16_t *target_end_ptr = target_ptr + 2 * sizeof(u_int16_t); - out[0] = out[1] = 0; - - // Process one character at a time - while (1) { - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) - return source_ptr - reinterpret_cast(in); - - // Add another character to the input stream and try again - source_ptr = reinterpret_cast(in); - ++source_end_ptr; - - if (source_end_ptr > reinterpret_cast(in) + in_length) - break; - } - - return 0; -} - -void UTF32ToUTF16(const wchar_t *in, vector *out) { - size_t source_length = wcslen(in); - const UTF32 *source_ptr = reinterpret_cast(in); - const UTF32 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->empty(); - out->insert(out->begin(), source_length, 0); - u_int16_t *target_ptr = &(*out)[0]; - u_int16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(u_int16_t); - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]) { - const UTF32 *source_ptr = reinterpret_cast(&in); - const UTF32 *source_end_ptr = source_ptr + 1; - u_int16_t *target_ptr = out; - u_int16_t *target_end_ptr = target_ptr + 2 * sizeof(u_int16_t); - out[0] = out[1] = 0; - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result != conversionOK) { - out[0] = out[1] = 0; - } -} - -static inline u_int16_t Swap(u_int16_t value) { - return (value >> 8) | (value << 8); -} - -string UTF16ToUTF8(const vector &in, bool swap) { - const UTF16 *source_ptr = &in[0]; - scoped_ptr source_buffer; - - // If we're to swap, we need to make a local copy and swap each byte pair - if (swap) { - int idx = 0; - source_buffer.reset(new u_int16_t[in.size()]); - UTF16 *source_buffer_ptr = source_buffer.get(); - for (vector::const_iterator it = in.begin(); - it != in.end(); ++it, ++idx) - source_buffer_ptr[idx] = Swap(*it); - - source_ptr = source_buffer.get(); - } - - // The maximum expansion would be 4x the size of the input string. - const UTF16 *source_end_ptr = source_ptr + in.size(); - int target_capacity = in.size() * 4; - scoped_array target_buffer(new UTF8[target_capacity]); - UTF8 *target_ptr = target_buffer.get(); - UTF8 *target_end_ptr = target_ptr + target_capacity; - ConversionResult result = ConvertUTF16toUTF8(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) { - const char *targetPtr = reinterpret_cast(target_buffer.get()); - string result(targetPtr); - return result; - } - - return ""; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/string_conversion.h b/thirdparty/google-breakpad/r318/src/common/string_conversion.h deleted file mode 100644 index d51f46bb..00000000 --- a/thirdparty/google-breakpad/r318/src/common/string_conversion.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_conversion.h: Conversion between different UTF-8/16/32 encodings. - -#ifndef COMMON_STRING_CONVERSION_H__ -#define COMMON_STRING_CONVERSION_H__ - -#include -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::vector; - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF8ToUTF16(const char *in, vector *out); - -// Convert at least one character (up to a maximum of |in_length|) from |in| -// to UTF-16 into |out|. Return the number of characters consumed from |in|. -// Any unused characters in |out| will be initialized to 0. No memory will -// be allocated by this routine. -int UTF8ToUTF16Char(const char *in, int in_length, u_int16_t out[2]); - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF32ToUTF16(const wchar_t *in, vector *out); - -// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be -// initialized to 0. No memory will be allocated by this routine. -void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]); - -// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. -std::string UTF16ToUTF8(const vector &in, bool swap); - -} // namespace google_breakpad - -#endif // COMMON_STRING_CONVERSION_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/windows/guid_string.cc b/thirdparty/google-breakpad/r318/src/common/windows/guid_string.cc deleted file mode 100644 index b7f877e6..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/guid_string.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. -// -// See guid_string.h for documentation. - -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/guid_string.h" - -namespace google_breakpad { - -// static -wstring GUIDString::GUIDToWString(GUID *guid) { - wchar_t guid_string[37]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -// static -wstring GUIDString::GUIDToSymbolServerWString(GUID *guid) { - wchar_t guid_string[33]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/windows/guid_string.h b/thirdparty/google-breakpad/r318/src/common/windows/guid_string.h deleted file mode 100644 index f8aa8a23..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/guid_string.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. - -#ifndef COMMON_WINDOWS_GUID_STRING_H__ -#define COMMON_WINDOWS_GUID_STRING_H__ - -#include - -#include - -namespace google_breakpad { - -using std::wstring; - -class GUIDString { - public: - // Converts guid to a string in the format recommended by RFC 4122 and - // returns the string. - static wstring GUIDToWString(GUID *guid); - - // Converts guid to a string formatted as uppercase hexadecimal, with - // no separators, and returns the string. This is the format used for - // symbol server identifiers, although identifiers have an age tacked - // on to the string. - static wstring GUIDToSymbolServerWString(GUID *guid); -}; - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_GUID_STRING_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/windows/http_upload.cc b/thirdparty/google-breakpad/r318/src/common/windows/http_upload.cc deleted file mode 100644 index 2f9ffa92..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/http_upload.cc +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/http_upload.h" - -namespace google_breakpad { - -using std::ifstream; -using std::ios; - -static const wchar_t kUserAgent[] = L"Breakpad/1.0 (Windows)"; - -// Helper class which closes an internet handle when it goes away -class HTTPUpload::AutoInternetHandle { - public: - explicit AutoInternetHandle(HINTERNET handle) : handle_(handle) {} - ~AutoInternetHandle() { - if (handle_) { - InternetCloseHandle(handle_); - } - } - - HINTERNET get() { return handle_; } - - private: - HINTERNET handle_; -}; - -// static -bool HTTPUpload::SendRequest(const wstring &url, - const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - wstring *response_body, - int *response_code) { - if (response_code) { - *response_code = 0; - } - - // TODO(bryner): support non-ASCII parameter names - if (!CheckParameters(parameters)) { - return false; - } - - // Break up the URL and make sure we can handle it - wchar_t scheme[16], host[256], path[256]; - URL_COMPONENTS components; - memset(&components, 0, sizeof(components)); - components.dwStructSize = sizeof(components); - components.lpszScheme = scheme; - components.dwSchemeLength = sizeof(scheme) / sizeof(scheme[0]); - components.lpszHostName = host; - components.dwHostNameLength = sizeof(host) / sizeof(host[0]); - components.lpszUrlPath = path; - components.dwUrlPathLength = sizeof(path) / sizeof(path[0]); - if (!InternetCrackUrl(url.c_str(), static_cast(url.size()), - 0, &components)) { - return false; - } - bool secure = false; - if (wcscmp(scheme, L"https") == 0) { - secure = true; - } else if (wcscmp(scheme, L"http") != 0) { - return false; - } - - AutoInternetHandle internet(InternetOpen(kUserAgent, - INTERNET_OPEN_TYPE_PRECONFIG, - NULL, // proxy name - NULL, // proxy bypass - 0)); // flags - if (!internet.get()) { - return false; - } - - AutoInternetHandle connection(InternetConnect(internet.get(), - host, - components.nPort, - NULL, // user name - NULL, // password - INTERNET_SERVICE_HTTP, - 0, // flags - NULL)); // context - if (!connection.get()) { - return false; - } - - DWORD http_open_flags = secure ? INTERNET_FLAG_SECURE : 0; - AutoInternetHandle request(HttpOpenRequest(connection.get(), - L"POST", - path, - NULL, // version - NULL, // referer - NULL, // agent type - http_open_flags, - NULL)); // context - if (!request.get()) { - return false; - } - - wstring boundary = GenerateMultipartBoundary(); - wstring content_type_header = GenerateRequestHeader(boundary); - HttpAddRequestHeaders(request.get(), - content_type_header.c_str(), - static_cast(-1), - HTTP_ADDREQ_FLAG_ADD); - - string request_body; - if (!GenerateRequestBody(parameters, upload_file, - file_part_name, boundary, &request_body)) { - return false; - } - - if (!HttpSendRequest(request.get(), NULL, 0, - const_cast(request_body.data()), - static_cast(request_body.size()))) { - return false; - } - - // The server indicates a successful upload with HTTP status 200. - wchar_t http_status[4]; - DWORD http_status_size = sizeof(http_status); - if (!HttpQueryInfo(request.get(), HTTP_QUERY_STATUS_CODE, - static_cast(&http_status), &http_status_size, - 0)) { - return false; - } - - int http_response = wcstol(http_status, NULL, 10); - if (response_code) { - *response_code = http_response; - } - - bool result = (http_response == 200); - - if (result) { - result = ReadResponse(request.get(), response_body); - } - - return result; -} - -// static -bool HTTPUpload::ReadResponse(HINTERNET request, wstring *response) { - bool has_content_length_header = false; - wchar_t content_length[32]; - DWORD content_length_size = sizeof(content_length); - DWORD claimed_size = 0; - string response_body; - - if (HttpQueryInfo(request, HTTP_QUERY_CONTENT_LENGTH, - static_cast(&content_length), - &content_length_size, 0)) { - has_content_length_header = true; - claimed_size = wcstol(content_length, NULL, 10); - response_body.reserve(claimed_size); - } - - - DWORD bytes_available; - DWORD total_read = 0; - bool return_code; - - while ((return_code = InternetQueryDataAvailable(request, &bytes_available, - 0, 0) != 0) && - bytes_available > 0) { - vector response_buffer(bytes_available); - DWORD size_read; - - if ((return_code = InternetReadFile(request, &response_buffer[0], - bytes_available, &size_read) != 0) && - size_read > 0) { - total_read += size_read; - response_body.append(&response_buffer[0], size_read); - } else { - break; - } - } - - bool succeeded = return_code && (!has_content_length_header || - (total_read == claimed_size)); - if (succeeded && response) { - *response = UTF8ToWide(response_body); - } - - return succeeded; -} - -// static -wstring HTTPUpload::GenerateMultipartBoundary() { - // The boundary has 27 '-' characters followed by 16 hex digits - static const wchar_t kBoundaryPrefix[] = L"---------------------------"; - static const int kBoundaryLength = 27 + 16 + 1; - - // Generate some random numbers to fill out the boundary - int r0 = rand(); - int r1 = rand(); - - wchar_t temp[kBoundaryLength]; - swprintf(temp, kBoundaryLength, L"%s%08X%08X", kBoundaryPrefix, r0, r1); - - // remove when VC++7.1 is no longer supported - temp[kBoundaryLength - 1] = L'\0'; - - return wstring(temp); -} - -// static -wstring HTTPUpload::GenerateRequestHeader(const wstring &boundary) { - wstring header = L"Content-Type: multipart/form-data; boundary="; - header += boundary; - return header; -} - -// static -bool HTTPUpload::GenerateRequestBody(const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - const wstring &boundary, - string *request_body) { - vector contents; - GetFileContents(upload_file, &contents); - if (contents.empty()) { - return false; - } - - string boundary_str = WideToUTF8(boundary); - if (boundary_str.empty()) { - return false; - } - - request_body->clear(); - - // Append each of the parameter pairs as a form-data part - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - request_body->append("--" + boundary_str + "\r\n"); - request_body->append("Content-Disposition: form-data; name=\"" + - WideToUTF8(pos->first) + "\"\r\n\r\n" + - WideToUTF8(pos->second) + "\r\n"); - } - - // Now append the upload file as a binary (octet-stream) part - string filename_utf8 = WideToUTF8(upload_file); - if (filename_utf8.empty()) { - return false; - } - - string file_part_name_utf8 = WideToUTF8(file_part_name); - if (file_part_name_utf8.empty()) { - return false; - } - - request_body->append("--" + boundary_str + "\r\n"); - request_body->append("Content-Disposition: form-data; " - "name=\"" + file_part_name_utf8 + "\"; " - "filename=\"" + filename_utf8 + "\"\r\n"); - request_body->append("Content-Type: application/octet-stream\r\n"); - request_body->append("\r\n"); - - if (!contents.empty()) { - request_body->append(&(contents[0]), contents.size()); - } - request_body->append("\r\n"); - request_body->append("--" + boundary_str + "--\r\n"); - return true; -} - -// static -void HTTPUpload::GetFileContents(const wstring &filename, - vector *contents) { - // The "open" method on pre-MSVC8 ifstream implementations doesn't accept a - // wchar_t* filename, so use _wfopen directly in that case. For VC8 and - // later, _wfopen has been deprecated in favor of _wfopen_s, which does - // not exist in earlier versions, so let the ifstream open the file itself. -#if _MSC_VER >= 1400 // MSVC 2005/8 - ifstream file; - file.open(filename.c_str(), ios::binary); -#else // _MSC_VER >= 1400 - ifstream file(_wfopen(filename.c_str(), L"rb")); -#endif // _MSC_VER >= 1400 - if (file.is_open()) { - file.seekg(0, ios::end); - int length = file.tellg(); - contents->resize(length); - if (length != 0) { - file.seekg(0, ios::beg); - file.read(&((*contents)[0]), length); - } - file.close(); - } else { - contents->clear(); - } -} - -// static -wstring HTTPUpload::UTF8ToWide(const string &utf8) { - if (utf8.length() == 0) { - return wstring(); - } - - // compute the length of the buffer we'll need - int charcount = MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, NULL, 0); - - if (charcount == 0) { - return wstring(); - } - - // convert - wchar_t* buf = new wchar_t[charcount]; - MultiByteToWideChar(CP_UTF8, 0, utf8.c_str(), -1, buf, charcount); - wstring result(buf); - delete[] buf; - return result; -} - -// static -string HTTPUpload::WideToUTF8(const wstring &wide) { - if (wide.length() == 0) { - return string(); - } - - // compute the length of the buffer we'll need - int charcount = WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1, - NULL, 0, NULL, NULL); - if (charcount == 0) { - return string(); - } - - // convert - char *buf = new char[charcount]; - WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1, buf, charcount, - NULL, NULL); - - string result(buf); - delete[] buf; - return result; -} - -// static -bool HTTPUpload::CheckParameters(const map ¶meters) { - for (map::const_iterator pos = parameters.begin(); - pos != parameters.end(); ++pos) { - const wstring &str = pos->first; - if (str.size() == 0) { - return false; // disallow empty parameter names - } - for (unsigned int i = 0; i < str.size(); ++i) { - wchar_t c = str[i]; - if (c < 32 || c == '"' || c > 127) { - return false; - } - } - } - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/windows/http_upload.h b/thirdparty/google-breakpad/r318/src/common/windows/http_upload.h deleted file mode 100644 index a1ba7ae1..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/http_upload.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// HTTPUpload provides a "nice" API to send a multipart HTTP(S) POST -// request using wininet. It currently supports requests that contain -// a set of string parameters (key/value pairs), and a file to upload. - -#ifndef COMMON_WINDOWS_HTTP_UPLOAD_H__ -#define COMMON_WINDOWS_HTTP_UPLOAD_H__ - -#pragma warning( push ) -// Disable exception handler warnings. -#pragma warning( disable : 4530 ) - -#include -#include - -#include -#include -#include - -namespace google_breakpad { - -using std::string; -using std::wstring; -using std::map; -using std::vector; - -class HTTPUpload { - public: - // Sends the given set of parameters, along with the contents of - // upload_file, as a multipart POST request to the given URL. - // file_part_name contains the name of the file part of the request - // (i.e. it corresponds to the name= attribute on an . - // Parameter names must contain only printable ASCII characters, - // and may not contain a quote (") character. - // Only HTTP(S) URLs are currently supported. Returns true on success. - // If the request is successful and response_body is non-NULL, - // the response body will be returned in response_body. - // If response_code is non-NULL, it will be set to the HTTP response code - // received (or 0 if the request failed before getting an HTTP response). - static bool SendRequest(const wstring &url, - const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - wstring *response_body, - int *response_code); - - private: - class AutoInternetHandle; - - // Retrieves the HTTP response. If NULL is passed in for response, - // this merely checks (via the return value) that we were successfully - // able to retrieve exactly as many bytes of content in the response as - // were specified in the Content-Length header. - static bool HTTPUpload::ReadResponse(HINTERNET request, wstring* response); - - // Generates a new multipart boundary for a POST request - static wstring GenerateMultipartBoundary(); - - // Generates a HTTP request header for a multipart form submit. - static wstring GenerateRequestHeader(const wstring &boundary); - - // Given a set of parameters, an upload filename, and a file part name, - // generates a multipart request body string with these parameters - // and minidump contents. Returns true on success. - static bool GenerateRequestBody(const map ¶meters, - const wstring &upload_file, - const wstring &file_part_name, - const wstring &boundary, - string *request_body); - - // Fills the supplied vector with the contents of filename. - static void GetFileContents(const wstring &filename, vector *contents); - - // Converts a UTF8 string to UTF16. - static wstring UTF8ToWide(const string &utf8); - - // Converts a UTF16 string to UTF8. - static string WideToUTF8(const wstring &wide); - - // Checks that the given list of parameters has only printable - // ASCII characters in the parameter name, and does not contain - // any quote (") characters. Returns true if so. - static bool CheckParameters(const map ¶meters); - - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - HTTPUpload(); - explicit HTTPUpload(const HTTPUpload &); - void operator=(const HTTPUpload &); - ~HTTPUpload(); -}; - -} // namespace google_breakpad - -#pragma warning( pop ) - -#endif // COMMON_WINDOWS_HTTP_UPLOAD_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.cc b/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.cc deleted file mode 100644 index 0392627f..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.cc +++ /dev/null @@ -1,800 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/pdb_source_line_writer.h" -#include "common/windows/guid_string.h" - -// This constant may be missing from DbgHelp.h. See the documentation for -// IDiaSymbol::get_undecoratedNameEx. -#ifndef UNDNAME_NO_ECSU -#define UNDNAME_NO_ECSU 0x8000 // Suppresses enum/class/struct/union. -#endif // UNDNAME_NO_ECSU - -namespace google_breakpad { - -PDBSourceLineWriter::PDBSourceLineWriter() : output_(NULL) { -} - -PDBSourceLineWriter::~PDBSourceLineWriter() { -} - -bool PDBSourceLineWriter::Open(const wstring &file, FileFormat format) { - Close(); - - if (FAILED(CoInitialize(NULL))) { - fprintf(stderr, "CoInitialize failed\n"); - return false; - } - - CComPtr data_source; - if (FAILED(data_source.CoCreateInstance(CLSID_DiaSource))) { - fprintf(stderr, "CoCreateInstance CLSID_DiaSource failed " - "(msdia80.dll unregistered?)\n"); - return false; - } - - switch (format) { - case PDB_FILE: - if (FAILED(data_source->loadDataFromPdb(file.c_str()))) { - fprintf(stderr, "loadDataFromPdb failed\n"); - return false; - } - break; - case EXE_FILE: - if (FAILED(data_source->loadDataForExe(file.c_str(), NULL, NULL))) { - fprintf(stderr, "loadDataForExe failed\n"); - return false; - } - break; - case ANY_FILE: - if (FAILED(data_source->loadDataFromPdb(file.c_str()))) { - if (FAILED(data_source->loadDataForExe(file.c_str(), NULL, NULL))) { - fprintf(stderr, "loadDataForPdb and loadDataFromExe failed\n"); - return false; - } - } - break; - default: - fprintf(stderr, "Unknown file format\n"); - return false; - } - - if (FAILED(data_source->openSession(&session_))) { - fprintf(stderr, "openSession failed\n"); - } - - return true; -} - -bool PDBSourceLineWriter::PrintLines(IDiaEnumLineNumbers *lines) { - // The line number format is: - // - CComPtr line; - ULONG count; - - while (SUCCEEDED(lines->Next(1, &line, &count)) && count == 1) { - DWORD rva; - if (FAILED(line->get_relativeVirtualAddress(&rva))) { - fprintf(stderr, "failed to get line rva\n"); - return false; - } - - DWORD length; - if (FAILED(line->get_length(&length))) { - fprintf(stderr, "failed to get line code length\n"); - return false; - } - - DWORD source_id; - if (FAILED(line->get_sourceFileId(&source_id))) { - fprintf(stderr, "failed to get line source file id\n"); - return false; - } - - DWORD line_num; - if (FAILED(line->get_lineNumber(&line_num))) { - fprintf(stderr, "failed to get line number\n"); - return false; - } - - fprintf(output_, "%x %x %d %d\n", rva, length, line_num, source_id); - line.Release(); - } - return true; -} - -bool PDBSourceLineWriter::PrintFunction(IDiaSymbol *function) { - // The function format is: - // FUNC
- DWORD rva; - if (FAILED(function->get_relativeVirtualAddress(&rva))) { - fprintf(stderr, "couldn't get rva\n"); - return false; - } - - ULONGLONG length; - if (FAILED(function->get_length(&length))) { - fprintf(stderr, "failed to get function length\n"); - return false; - } - - if (length == 0) { - // Silently ignore zero-length functions, which can infrequently pop up. - return true; - } - - CComBSTR name; - int stack_param_size; - if (!GetSymbolFunctionName(function, &name, &stack_param_size)) { - return false; - } - - // If the decorated name didn't give the parameter size, try to - // calculate it. - if (stack_param_size < 0) { - stack_param_size = GetFunctionStackParamSize(function); - } - - fprintf(output_, "FUNC %x %" WIN_STRING_FORMAT_LL "x %x %ws\n", - rva, length, stack_param_size, name); - - CComPtr lines; - if (FAILED(session_->findLinesByRVA(rva, DWORD(length), &lines))) { - return false; - } - - if (!PrintLines(lines)) { - return false; - } - return true; -} - -bool PDBSourceLineWriter::PrintSourceFiles() { - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - fprintf(stderr, "get_globalScope failed\n"); - return false; - } - - CComPtr compilands; - if (FAILED(global->findChildren(SymTagCompiland, NULL, - nsNone, &compilands))) { - fprintf(stderr, "findChildren failed\n"); - return false; - } - - CComPtr compiland; - ULONG count; - while (SUCCEEDED(compilands->Next(1, &compiland, &count)) && count == 1) { - CComPtr source_files; - if (FAILED(session_->findFile(compiland, NULL, nsNone, &source_files))) { - return false; - } - CComPtr file; - while (SUCCEEDED(source_files->Next(1, &file, &count)) && count == 1) { - DWORD file_id; - if (FAILED(file->get_uniqueId(&file_id))) { - return false; - } - - CComBSTR file_name; - if (FAILED(file->get_fileName(&file_name))) { - return false; - } - - fwprintf(output_, L"FILE %d %s\n", file_id, file_name); - file.Release(); - } - compiland.Release(); - } - return true; -} - -bool PDBSourceLineWriter::PrintFunctions() { - CComPtr symbols; - if (FAILED(session_->getSymbolsByAddr(&symbols))) { - fprintf(stderr, "failed to get symbol enumerator\n"); - return false; - } - - CComPtr symbol; - if (FAILED(symbols->symbolByAddr(1, 0, &symbol))) { - fprintf(stderr, "failed to enumerate symbols\n"); - return false; - } - - DWORD rva_last = 0; - if (FAILED(symbol->get_relativeVirtualAddress(&rva_last))) { - fprintf(stderr, "failed to get symbol rva\n"); - return false; - } - - ULONG count; - do { - DWORD tag; - if (FAILED(symbol->get_symTag(&tag))) { - fprintf(stderr, "failed to get symbol tag\n"); - return false; - } - - // For a given function, DIA seems to give either a symbol with - // SymTagFunction or SymTagPublicSymbol, but not both. This means - // that PDBSourceLineWriter will output either a FUNC or PUBLIC line, - // but not both. - if (tag == SymTagFunction) { - if (!PrintFunction(symbol)) { - return false; - } - } else if (tag == SymTagPublicSymbol) { - if (!PrintCodePublicSymbol(symbol)) { - return false; - } - } - symbol.Release(); - } while (SUCCEEDED(symbols->Next(1, &symbol, &count)) && count == 1); - - return true; -} - -bool PDBSourceLineWriter::PrintFrameData() { - // It would be nice if it were possible to output frame data alongside the - // associated function, as is done with line numbers, but the DIA API - // doesn't make it possible to get the frame data in that way. - - CComPtr tables; - if (FAILED(session_->getEnumTables(&tables))) - return false; - - // Pick up the first table that supports IDiaEnumFrameData. - CComPtr frame_data_enum; - CComPtr table; - ULONG count; - while (!frame_data_enum && - SUCCEEDED(tables->Next(1, &table, &count)) && - count == 1) { - table->QueryInterface(_uuidof(IDiaEnumFrameData), - reinterpret_cast(&frame_data_enum)); - table.Release(); - } - if (!frame_data_enum) - return false; - - DWORD last_type = -1; - DWORD last_rva = -1; - DWORD last_code_size = 0; - DWORD last_prolog_size = -1; - - CComPtr frame_data; - while (SUCCEEDED(frame_data_enum->Next(1, &frame_data, &count)) && - count == 1) { - DWORD type; - if (FAILED(frame_data->get_type(&type))) - return false; - - DWORD rva; - if (FAILED(frame_data->get_relativeVirtualAddress(&rva))) - return false; - - DWORD code_size; - if (FAILED(frame_data->get_lengthBlock(&code_size))) - return false; - - DWORD prolog_size; - if (FAILED(frame_data->get_lengthProlog(&prolog_size))) - return false; - - // epliog_size is always 0. - DWORD epilog_size = 0; - - // parameter_size is the size of parameters passed on the stack. If any - // parameters are not passed on the stack (such as in registers), their - // sizes will not be included in parameter_size. - DWORD parameter_size; - if (FAILED(frame_data->get_lengthParams(¶meter_size))) - return false; - - DWORD saved_register_size; - if (FAILED(frame_data->get_lengthSavedRegisters(&saved_register_size))) - return false; - - DWORD local_size; - if (FAILED(frame_data->get_lengthLocals(&local_size))) - return false; - - // get_maxStack can return S_FALSE, just use 0 in that case. - DWORD max_stack_size = 0; - if (FAILED(frame_data->get_maxStack(&max_stack_size))) - return false; - - // get_programString can return S_FALSE, indicating that there is no - // program string. In that case, check whether %ebp is used. - HRESULT program_string_result; - CComBSTR program_string; - if (FAILED(program_string_result = frame_data->get_program( - &program_string))) { - return false; - } - - // get_allocatesBasePointer can return S_FALSE, treat that as though - // %ebp is not used. - BOOL allocates_base_pointer = FALSE; - if (program_string_result != S_OK) { - if (FAILED(frame_data->get_allocatesBasePointer( - &allocates_base_pointer))) { - return false; - } - } - - // Only print out a line if type, rva, code_size, or prolog_size have - // changed from the last line. It is surprisingly common (especially in - // system library PDBs) for DIA to return a series of identical - // IDiaFrameData objects. For kernel32.pdb from Windows XP SP2 on x86, - // this check reduces the size of the dumped symbol file by a third. - if (type != last_type || rva != last_rva || code_size != last_code_size || - prolog_size != last_prolog_size) { - fprintf(output_, "STACK WIN %x %x %x %x %x %x %x %x %x %d ", - type, rva, code_size, prolog_size, epilog_size, - parameter_size, saved_register_size, local_size, max_stack_size, - program_string_result == S_OK); - if (program_string_result == S_OK) { - fprintf(output_, "%ws\n", program_string); - } else { - fprintf(output_, "%d\n", allocates_base_pointer); - } - - last_type = type; - last_rva = rva; - last_code_size = code_size; - last_prolog_size = prolog_size; - } - - frame_data.Release(); - } - - return true; -} - -bool PDBSourceLineWriter::PrintCodePublicSymbol(IDiaSymbol *symbol) { - BOOL is_code; - if (FAILED(symbol->get_code(&is_code))) { - return false; - } - if (!is_code) { - return true; - } - - DWORD rva; - if (FAILED(symbol->get_relativeVirtualAddress(&rva))) { - return false; - } - - CComBSTR name; - int stack_param_size; - if (!GetSymbolFunctionName(symbol, &name, &stack_param_size)) { - return false; - } - - fprintf(output_, "PUBLIC %x %x %ws\n", rva, - stack_param_size > 0 ? stack_param_size : 0, name); - return true; -} - -bool PDBSourceLineWriter::PrintPDBInfo() { - PDBModuleInfo info; - if (!GetModuleInfo(&info)) { - return false; - } - - // Hard-code "windows" for the OS because that's the only thing that makes - // sense for PDB files. (This might not be strictly correct for Windows CE - // support, but we don't care about that at the moment.) - fprintf(output_, "MODULE windows %ws %ws %ws\n", - info.cpu.c_str(), info.debug_identifier.c_str(), - info.debug_file.c_str()); - - return true; -} - -// wcstol_positive_strict is sort of like wcstol, but much stricter. string -// should be a buffer pointing to a null-terminated string containing only -// decimal digits. If the entire string can be converted to an integer -// without overflowing, and there are no non-digit characters before the -// result is set to the value and this function returns true. Otherwise, -// this function returns false. This is an alternative to the strtol, atoi, -// and scanf families, which are not as strict about input and in some cases -// don't provide a good way for the caller to determine if a conversion was -// successful. -static bool wcstol_positive_strict(wchar_t *string, int *result) { - int value = 0; - for (wchar_t *c = string; *c != '\0'; ++c) { - int last_value = value; - value *= 10; - // Detect overflow. - if (value / 10 != last_value || value < 0) { - return false; - } - if (*c < '0' || *c > '9') { - return false; - } - unsigned int c_value = *c - '0'; - last_value = value; - value += c_value; - // Detect overflow. - if (value < last_value) { - return false; - } - // Forbid leading zeroes unless the string is just "0". - if (value == 0 && *(c+1) != '\0') { - return false; - } - } - *result = value; - return true; -} - -// static -bool PDBSourceLineWriter::GetSymbolFunctionName(IDiaSymbol *function, - BSTR *name, - int *stack_param_size) { - *stack_param_size = -1; - const DWORD undecorate_options = UNDNAME_NO_MS_KEYWORDS | - UNDNAME_NO_FUNCTION_RETURNS | - UNDNAME_NO_ALLOCATION_MODEL | - UNDNAME_NO_ALLOCATION_LANGUAGE | - UNDNAME_NO_THISTYPE | - UNDNAME_NO_ACCESS_SPECIFIERS | - UNDNAME_NO_THROW_SIGNATURES | - UNDNAME_NO_MEMBER_TYPE | - UNDNAME_NO_RETURN_UDT_MODEL | - UNDNAME_NO_ECSU; - - // Use get_undecoratedNameEx to get readable C++ names with arguments. - if (function->get_undecoratedNameEx(undecorate_options, name) != S_OK) { - if (function->get_name(name) != S_OK) { - fprintf(stderr, "failed to get function name\n"); - return false; - } - // If a name comes from get_name because no undecorated form existed, - // it's already formatted properly to be used as output. Don't do any - // additional processing. - // - // MSVC7's DIA seems to not undecorate names in as many cases as MSVC8's. - // This will result in calling get_name for some C++ symbols, so - // all of the parameter and return type information may not be included in - // the name string. - } else { - // C++ uses a bogus "void" argument for functions and methods that don't - // take any parameters. Take it out of the undecorated name because it's - // ugly and unnecessary. - const wchar_t *replace_string = L"(void)"; - const size_t replace_length = wcslen(replace_string); - const wchar_t *replacement_string = L"()"; - size_t length = wcslen(*name); - if (length >= replace_length) { - wchar_t *name_end = *name + length - replace_length; - if (wcscmp(name_end, replace_string) == 0) { - WindowsStringUtils::safe_wcscpy(name_end, replace_length, - replacement_string); - length = wcslen(*name); - } - } - - // Undecorate names used for stdcall and fastcall. These names prefix - // the identifier with '_' (stdcall) or '@' (fastcall) and suffix it - // with '@' followed by the number of bytes of parameters, in decimal. - // If such a name is found, take note of the size and undecorate it. - // Only do this for names that aren't C++, which is determined based on - // whether the undecorated name contains any ':' or '(' characters. - if (!wcschr(*name, ':') && !wcschr(*name, '(') && - (*name[0] == '_' || *name[0] == '@')) { - wchar_t *last_at = wcsrchr(*name + 1, '@'); - if (last_at && wcstol_positive_strict(last_at + 1, stack_param_size)) { - // If this function adheres to the fastcall convention, it accepts up - // to the first 8 bytes of parameters in registers (%ecx and %edx). - // We're only interested in the stack space used for parameters, so - // so subtract 8 and don't let the size go below 0. - if (*name[0] == '@') { - if (*stack_param_size > 8) { - *stack_param_size -= 8; - } else { - *stack_param_size = 0; - } - } - - // Undecorate the name by moving it one character to the left in its - // buffer, and terminating it where the last '@' had been. - WindowsStringUtils::safe_wcsncpy(*name, length, - *name + 1, last_at - *name - 1); - } else if (*name[0] == '_') { - // This symbol's name is encoded according to the cdecl rules. The - // name doesn't end in a '@' character followed by a decimal positive - // integer, so it's not a stdcall name. Strip off the leading - // underscore. - WindowsStringUtils::safe_wcsncpy(*name, length, *name + 1, length); - } - } - } - - return true; -} - -// static -int PDBSourceLineWriter::GetFunctionStackParamSize(IDiaSymbol *function) { - // This implementation is highly x86-specific. - - // Gather the symbols corresponding to data. - CComPtr data_children; - if (FAILED(function->findChildren(SymTagData, NULL, nsNone, - &data_children))) { - return 0; - } - - // lowest_base is the lowest %ebp-relative byte offset used for a parameter. - // highest_end is one greater than the highest offset (i.e. base + length). - // Stack parameters are assumed to be contiguous, because in reality, they - // are. - int lowest_base = INT_MAX; - int highest_end = INT_MIN; - - CComPtr child; - DWORD count; - while (SUCCEEDED(data_children->Next(1, &child, &count)) && count == 1) { - // If any operation fails at this point, just proceed to the next child. - // Use the next_child label instead of continue because child needs to - // be released before it's reused. Declare constructable/destructable - // types early to avoid gotos that cross initializations. - CComPtr child_type; - - // DataIsObjectPtr is only used for |this|. Because |this| can be passed - // as a stack parameter, look for it in addition to traditional - // parameters. - DWORD child_kind; - if (FAILED(child->get_dataKind(&child_kind)) || - (child_kind != DataIsParam && child_kind != DataIsObjectPtr)) { - goto next_child; - } - - // Only concentrate on register-relative parameters. Parameters may also - // be enregistered (passed directly in a register), but those don't - // consume any stack space, so they're not of interest. - DWORD child_location_type; - if (FAILED(child->get_locationType(&child_location_type)) || - child_location_type != LocIsRegRel) { - goto next_child; - } - - // Of register-relative parameters, the only ones that make any sense are - // %ebp- or %esp-relative. Note that MSVC's debugging information always - // gives parameters as %ebp-relative even when a function doesn't use a - // traditional frame pointer and stack parameters are accessed relative to - // %esp, so just look for %ebp-relative parameters. If you wanted to - // access parameters, you'd probably want to treat these %ebp-relative - // offsets as if they were relative to %esp before a function's prolog - // executed. - DWORD child_register; - if (FAILED(child->get_registerId(&child_register)) || - child_register != CV_REG_EBP) { - goto next_child; - } - - LONG child_register_offset; - if (FAILED(child->get_offset(&child_register_offset))) { - goto next_child; - } - - // IDiaSymbol::get_type can succeed but still pass back a NULL value. - if (FAILED(child->get_type(&child_type)) || !child_type) { - goto next_child; - } - - ULONGLONG child_length; - if (FAILED(child_type->get_length(&child_length))) { - goto next_child; - } - - int child_end = child_register_offset + static_cast(child_length); - if (child_register_offset < lowest_base) { - lowest_base = child_register_offset; - } - if (child_end > highest_end) { - highest_end = child_end; - } - -next_child: - child.Release(); - } - - int param_size = 0; - // Make sure lowest_base isn't less than 4, because [%esp+4] is the lowest - // possible address to find a stack parameter before executing a function's - // prolog (see above). Some optimizations cause parameter offsets to be - // lower than 4, but we're not concerned with those because we're only - // looking for parameters contained in addresses higher than where the - // return address is stored. - if (lowest_base < 4) { - lowest_base = 4; - } - if (highest_end > lowest_base) { - // All stack parameters are pushed as at least 4-byte quantities. If the - // last type was narrower than 4 bytes, promote it. This assumes that all - // parameters' offsets are 4-byte-aligned, which is always the case. Only - // worry about the last type, because we're not summing the type sizes, - // just looking at the lowest and highest offsets. - int remainder = highest_end % 4; - if (remainder) { - highest_end += 4 - remainder; - } - - param_size = highest_end - lowest_base; - } - - return param_size; -} - -bool PDBSourceLineWriter::WriteMap(FILE *map_file) { - output_ = map_file; - - bool ret = PrintPDBInfo() && - PrintSourceFiles() && - PrintFunctions() && - PrintFrameData(); - - output_ = NULL; - return ret; -} - -void PDBSourceLineWriter::Close() { - session_.Release(); -} - -bool PDBSourceLineWriter::GetModuleInfo(PDBModuleInfo *info) { - if (!info) { - return false; - } - - info->debug_file.clear(); - info->debug_identifier.clear(); - info->cpu.clear(); - - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) { - return false; - } - - // All CPUs in CV_CPU_TYPE_e (cvconst.h) below 0x10 are x86. There's no - // single specific constant to use. - DWORD platform; - if (SUCCEEDED(global->get_platform(&platform)) && platform < 0x10) { - info->cpu = L"x86"; - } else { - // Unexpected, but handle gracefully. - info->cpu = L"unknown"; - } - - // DWORD* and int* are not compatible. This is clean and avoids a cast. - DWORD age; - if (FAILED(global->get_age(&age))) { - return false; - } - - bool uses_guid; - if (!UsesGUID(&uses_guid)) { - return false; - } - - if (uses_guid) { - GUID guid; - if (FAILED(global->get_guid(&guid))) { - return false; - } - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - wchar_t age_string[9]; - swprintf(age_string, sizeof(age_string) / sizeof(age_string[0]), - L"%x", age); - - // remove when VC++7.1 is no longer supported - age_string[sizeof(age_string) / sizeof(age_string[0]) - 1] = L'\0'; - - info->debug_identifier = GUIDString::GUIDToSymbolServerWString(&guid); - info->debug_identifier.append(age_string); - } else { - DWORD signature; - if (FAILED(global->get_signature(&signature))) { - return false; - } - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - wchar_t identifier_string[17]; - swprintf(identifier_string, - sizeof(identifier_string) / sizeof(identifier_string[0]), - L"%08X%x", signature, age); - - // remove when VC++7.1 is no longer supported - identifier_string[sizeof(identifier_string) / - sizeof(identifier_string[0]) - 1] = L'\0'; - - info->debug_identifier = identifier_string; - } - - CComBSTR debug_file_string; - if (FAILED(global->get_symbolsFileName(&debug_file_string))) { - return false; - } - info->debug_file = - WindowsStringUtils::GetBaseName(wstring(debug_file_string)); - - return true; -} - -bool PDBSourceLineWriter::UsesGUID(bool *uses_guid) { - if (!uses_guid) - return false; - - CComPtr global; - if (FAILED(session_->get_globalScope(&global))) - return false; - - GUID guid; - if (FAILED(global->get_guid(&guid))) - return false; - - DWORD signature; - if (FAILED(global->get_signature(&signature))) - return false; - - // There are two possibilities for guid: either it's a real 128-bit GUID - // as identified in a code module by a new-style CodeView record, or it's - // a 32-bit signature (timestamp) as identified by an old-style record. - // See MDCVInfoPDB70 and MDCVInfoPDB20 in minidump_format.h. - // - // Because DIA doesn't provide a way to directly determine whether a module - // uses a GUID or a 32-bit signature, this code checks whether the first 32 - // bits of guid are the same as the signature, and if the rest of guid is - // zero. If so, then with a pretty high degree of certainty, there's an - // old-style CodeView record in use. This method will only falsely find an - // an old-style CodeView record if a real 128-bit GUID has its first 32 - // bits set the same as the module's signature (timestamp) and the rest of - // the GUID is set to 0. This is highly unlikely. - - GUID signature_guid = {signature}; // 0-initializes other members - *uses_guid = !IsEqualGUID(guid, signature_guid); - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.h b/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.h deleted file mode 100644 index e91d0737..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/pdb_source_line_writer.h +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// PDBSourceLineWriter uses a pdb file produced by Visual C++ to output -// a line/address map for use with BasicSourceLineResolver. - -#ifndef _PDB_SOURCE_LINE_WRITER_H__ -#define _PDB_SOURCE_LINE_WRITER_H__ - -#include - -#include - -struct IDiaEnumLineNumbers; -struct IDiaSession; -struct IDiaSymbol; - -namespace google_breakpad { - -using std::wstring; - -// A structure that carries information that identifies a pdb file. -struct PDBModuleInfo { - public: - // The basename of the pdb file from which information was loaded. - wstring debug_file; - - // The pdb's identifier. For recent pdb files, the identifier consists - // of the pdb's guid, in uppercase hexadecimal form without any dashes - // or separators, followed immediately by the pdb's age, also in - // uppercase hexadecimal form. For older pdb files which have no guid, - // the identifier is the pdb's 32-bit signature value, in zero-padded - // hexadecimal form, followed immediately by the pdb's age, in lowercase - // hexadecimal form. - wstring debug_identifier; - - // A string identifying the cpu that the pdb is associated with. - // Currently, this may be "x86" or "unknown". - wstring cpu; -}; - -class PDBSourceLineWriter { - public: - enum FileFormat { - PDB_FILE, // a .pdb file containing debug symbols - EXE_FILE, // a .exe or .dll file - ANY_FILE // try PDB_FILE and then EXE_FILE - }; - - explicit PDBSourceLineWriter(); - ~PDBSourceLineWriter(); - - // Opens the given file. For executable files, the corresponding pdb - // file must be available; Open will be if it is not. - // If there is already a pdb file open, it is automatically closed. - // Returns true on success. - bool Open(const wstring &file, FileFormat format); - - // Locates the pdb file for the given executable (exe or dll) file, - // and opens it. If there is already a pdb file open, it is automatically - // closed. Returns true on success. - bool OpenExecutable(const wstring &exe_file); - - // Writes a map file from the current pdb file to the given file stream. - // Returns true on success. - bool WriteMap(FILE *map_file); - - // Closes the current pdb file and its associated resources. - void Close(); - - // Retrieves information about the module's debugging file. Returns - // true on success and false on failure. - bool GetModuleInfo(PDBModuleInfo *info); - - // Sets uses_guid to true if the opened file uses a new-style CodeView - // record with a 128-bit GUID, or false if the opened file uses an old-style - // CodeView record. When no GUID is available, a 32-bit signature should be - // used to identify the module instead. If the information cannot be - // determined, this method returns false. - bool UsesGUID(bool *uses_guid); - - private: - // Outputs the line/address pairs for each line in the enumerator. - // Returns true on success. - bool PrintLines(IDiaEnumLineNumbers *lines); - - // Outputs a function address and name, followed by its source line list. - // Returns true on success. - bool PrintFunction(IDiaSymbol *function); - - // Outputs all functions as described above. Returns true on success. - bool PrintFunctions(); - - // Outputs all of the source files in the session's pdb file. - // Returns true on success. - bool PrintSourceFiles(); - - // Outputs all of the frame information necessary to construct stack - // backtraces in the absence of frame pointers. Returns true on success. - bool PrintFrameData(); - - // Outputs a single public symbol address and name, if the symbol corresponds - // to a code address. Returns true on success. If symbol is does not - // correspond to code, returns true without outputting anything. - bool PrintCodePublicSymbol(IDiaSymbol *symbol); - - // Outputs a line identifying the PDB file that is being dumped, along with - // its uuid and age. - bool PrintPDBInfo(); - - // Returns the function name for a symbol. If possible, the name is - // undecorated. If the symbol's decorated form indicates the size of - // parameters on the stack, this information is returned in stack_param_size. - // Returns true on success. If the symbol doesn't encode parameter size - // information, stack_param_size is set to -1. - static bool GetSymbolFunctionName(IDiaSymbol *function, BSTR *name, - int *stack_param_size); - - // Returns the number of bytes of stack space used for a function's - // parameters. function must have the tag SymTagFunction. In the event of - // a failure, returns 0, which is also a valid number of bytes. - static int GetFunctionStackParamSize(IDiaSymbol *function); - - // The session for the currently-open pdb file. - CComPtr session_; - - // The current output file for this WriteMap invocation. - FILE *output_; - - // Disallow copy ctor and operator= - PDBSourceLineWriter(const PDBSourceLineWriter&); - void operator=(const PDBSourceLineWriter&); -}; - -} // namespace google_breakpad - -#endif // _PDB_SOURCE_LINE_WRITER_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/windows/string_utils-inl.h b/thirdparty/google-breakpad/r318/src/common/windows/string_utils-inl.h deleted file mode 100644 index 6f650812..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/string_utils-inl.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utils-inl.h: Safer string manipulation on Windows, supporting -// pre-MSVC8 environments. - -#ifndef COMMON_WINDOWS_STRING_UTILS_INL_H__ -#define COMMON_WINDOWS_STRING_UTILS_INL_H__ - -#include -#include - -#include - -// The "ll" printf format size specifier corresponding to |long long| was -// intrudced in MSVC8. Earlier versions did not provide this size specifier, -// but "I64" can be used to print 64-bit types. Don't use "I64" where "ll" -// is available, in the event of oddball systems where |long long| is not -// 64 bits wide. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define WIN_STRING_FORMAT_LL "ll" -#else // MSC_VER >= 1400 -#define WIN_STRING_FORMAT_LL "I64" -#endif // MSC_VER >= 1400 - -// A nonconforming version of swprintf, without the length argument, was -// included with the CRT prior to MSVC8. Although a conforming version was -// also available via an overload, it is not reliably chosen. _snwprintf -// behaves as a standards-confirming swprintf should, so force the use of -// _snwprintf when using older CRTs. -#if _MSC_VER < 1400 // MSVC 2005/8 -#define swprintf _snwprintf -#else -// For MSVC8 and newer, swprintf_s is the recommended method. Conveniently, -// it takes the same argument list as swprintf. -#define swprintf swprintf_s -#endif // MSC_VER < 1400 - -namespace google_breakpad { - -using std::string; -using std::wstring; - -class WindowsStringUtils { - public: - // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does - // not fail if source is longer than destination_size. The destination - // buffer is always 0-terminated. - static void safe_wcscpy(wchar_t *destination, size_t destination_size, - const wchar_t *source); - - // Roughly equivalent to MSVC8's wcsncpy_s, except that _TRUNCATE cannot - // be passed directly, and pre-MSVC8, this will not fail if source or count - // are longer than destination_size. The destination buffer is always - // 0-terminated. - static void safe_wcsncpy(wchar_t *destination, size_t destination_size, - const wchar_t *source, size_t count); - - // Performs multi-byte to wide character conversion on C++ strings, using - // mbstowcs_s (MSVC8) or mbstowcs (pre-MSVC8). Returns false on failure, - // without setting wcs. - static bool safe_mbstowcs(const string &mbs, wstring *wcs); - - // Returns the base name of a file, e.g. strips off the path. - static wstring GetBaseName(const wstring &filename); - - private: - // Disallow instantiation and other object-based operations. - WindowsStringUtils(); - WindowsStringUtils(const WindowsStringUtils&); - ~WindowsStringUtils(); - void operator=(const WindowsStringUtils&); -}; - -// static -inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcscpy_s(destination, destination_size, source); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcscpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - wcsncpy(destination, source, destination_size); - if (destination && destination_size) - destination[destination_size - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -// static -inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source, - size_t count) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcsncpy_s(destination, destination_size, source, count); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcsncpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - if (destination_size < count) - count = destination_size; - - wcsncpy(destination, source, count); - if (destination && count) - destination[count - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_STRING_UTILS_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/common/windows/string_utils.cc b/thirdparty/google-breakpad/r318/src/common/windows/string_utils.cc deleted file mode 100644 index 5d464802..00000000 --- a/thirdparty/google-breakpad/r318/src/common/windows/string_utils.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "common/windows/string_utils-inl.h" - -namespace google_breakpad { - -// static -wstring WindowsStringUtils::GetBaseName(const wstring &filename) { - wstring base_name(filename); - size_t slash_pos = base_name.find_last_of(L"/\\"); - if (slash_pos != wstring::npos) { - base_name.erase(0, slash_pos + 1); - } - return base_name; -} - -// static -bool WindowsStringUtils::safe_mbstowcs(const string &mbs, wstring *wcs) { - assert(wcs); - - // First, determine the length of the destination buffer. - size_t wcs_length; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - errno_t err; - if ((err = mbstowcs_s(&wcs_length, NULL, 0, mbs.c_str(), _TRUNCATE)) != 0) { - return false; - } -#else // _MSC_VER >= 1400 - if ((wcs_length = mbstowcs(NULL, mbs.c_str(), mbs.length())) < 0) { - return false; - } - - // Leave space for the 0-terminator. - ++wcs_length; -#endif // _MSC_VER >= 1400 - - // TODO(mmentovai): move scoped_ptr into common and use it for wcs_c. - wchar_t *wcs_c = new wchar_t[wcs_length]; - - // Now, convert. -#if _MSC_VER >= 1400 // MSVC 2005/8 - if ((err = mbstowcs_s(NULL, wcs_c, wcs_length, mbs.c_str(), - _TRUNCATE)) != 0) { - delete[] wcs_c; - return false; - } -#else // _MSC_VER >= 1400 - if (mbstowcs(wcs_c, mbs.c_str(), mbs.length()) < 0) { - delete[] wcs_c; - return false; - } - - // Ensure presence of 0-terminator. - wcs_c[wcs_length - 1] = '\0'; -#endif // _MSC_VER >= 1400 - - *wcs = wcs_c; - delete[] wcs_c; - return true; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/config.h b/thirdparty/google-breakpad/r318/src/config.h deleted file mode 100644 index 297bfc19..00000000 --- a/thirdparty/google-breakpad/r318/src/config.h +++ /dev/null @@ -1,56 +0,0 @@ -/* src/config.h. Generated from config.h.in by configure. */ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Name of package */ -#define PACKAGE "breakpad" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "opensource@google.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "breakpad" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "breakpad 0.1" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "breakpad" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.1" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "0.1" diff --git a/thirdparty/google-breakpad/r318/src/config.h.in b/thirdparty/google-breakpad/r318/src/config.h.in deleted file mode 100644 index 6b4c3e48..00000000 --- a/thirdparty/google-breakpad/r318/src/config.h.in +++ /dev/null @@ -1,55 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/breakpad_types.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/breakpad_types.h deleted file mode 100644 index 926b47f2..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/breakpad_types.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* breakpad_types.h: Precise-width types - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file ensures that types u_intN_t are defined for N = 8, 16, 32, and - * 64. Types of precise widths are crucial to the task of writing data - * structures on one platform and reading them on another. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ -#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ - -#ifndef _WIN32 - -#include -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif /* __STDC_FORMAT_MACROS */ -#include - -#if defined(__SUNPRO_CC) || (defined(__GNUC__) && defined(__sun__)) -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; -#endif - -#else /* !_WIN32 */ - -#include - -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; -typedef unsigned __int64 u_int64_t; - -#endif /* !_WIN32 */ - -typedef struct { - u_int64_t high; - u_int64_t low; -} u_int128_t; - -typedef u_int64_t breakpad_time_t; - -/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to - * llx, which is the format string for "long long" - this is a 64-bit - * integral type on many systems. */ -#ifndef PRIx64 -#define PRIx64 "llx" -#endif /* !PRIx64 */ - -#endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_amd64.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_amd64.h deleted file mode 100644 index 75dae7dd..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_amd64.h +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on amd64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ - - -/* - * AMD64 support, see WINNT.H - */ - -typedef struct { - u_int16_t control_word; - u_int16_t status_word; - u_int8_t tag_word; - u_int8_t reserved1; - u_int16_t error_opcode; - u_int32_t error_offset; - u_int16_t error_selector; - u_int16_t reserved2; - u_int32_t data_offset; - u_int16_t data_selector; - u_int16_t reserved3; - u_int32_t mx_csr; - u_int32_t mx_csr_mask; - u_int128_t float_registers[8]; - u_int128_t xmm_registers[16]; - u_int8_t reserved4[96]; -} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */ - -#define MD_CONTEXT_AMD64_VR_COUNT 26 - -typedef struct { - /* - * Register parameter home addresses. - */ - u_int64_t p1_home; - u_int64_t p2_home; - u_int64_t p3_home; - u_int64_t p4_home; - u_int64_t p5_home; - u_int64_t p6_home; - - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - u_int32_t mx_csr; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t cs; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */ - u_int16_t ds; - u_int16_t es; - u_int16_t fs; - u_int16_t gs; - - /* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */ - u_int16_t ss; - u_int32_t eflags; - - /* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t dr0; - u_int64_t dr1; - u_int64_t dr2; - u_int64_t dr3; - u_int64_t dr6; - u_int64_t dr7; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rax; - u_int64_t rcx; - u_int64_t rdx; - u_int64_t rbx; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rsp; - - /* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */ - u_int64_t rbp; - u_int64_t rsi; - u_int64_t rdi; - u_int64_t r8; - u_int64_t r9; - u_int64_t r10; - u_int64_t r11; - u_int64_t r12; - u_int64_t r13; - u_int64_t r14; - u_int64_t r15; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - u_int64_t rip; - - /* The next set of registers are included with - * MD_CONTEXT_AMD64_FLOATING_POINT - */ - union { - MDXmmSaveArea32AMD64 flt_save; - struct { - u_int128_t header[2]; - u_int128_t legacy[8]; - u_int128_t xmm0; - u_int128_t xmm1; - u_int128_t xmm2; - u_int128_t xmm3; - u_int128_t xmm4; - u_int128_t xmm5; - u_int128_t xmm6; - u_int128_t xmm7; - u_int128_t xmm8; - u_int128_t xmm9; - u_int128_t xmm10; - u_int128_t xmm11; - u_int128_t xmm12; - u_int128_t xmm13; - u_int128_t xmm14; - u_int128_t xmm15; - } sse_registers; - }; - - u_int128_t vector_register[MD_CONTEXT_AMD64_VR_COUNT]; - u_int64_t vector_control; - - /* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - u_int64_t debug_control; - u_int64_t last_branch_to_rip; - u_int64_t last_branch_from_rip; - u_int64_t last_exception_to_rip; - u_int64_t last_exception_from_rip; - -} MDRawContextAMD64; /* CONTEXT */ - -/* For (MDRawContextAMD64).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_AMD64_CONTROL (MD_CONTEXT_AMD64 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_AMD64_INTEGER (MD_CONTEXT_AMD64 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_AMD64_SEGMENTS (MD_CONTEXT_AMD64 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_AMD64_FLOATING_POINT (MD_CONTEXT_AMD64 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_AMD64_DEBUG_REGISTERS (MD_CONTEXT_AMD64 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -/* WinNT.h refers to CONTEXT_MMX_REGISTERS but doesn't appear to define it - * I think it really means CONTEXT_FLOATING_POINT. - */ - -#define MD_CONTEXT_AMD64_FULL (MD_CONTEXT_AMD64_CONTROL | \ - MD_CONTEXT_AMD64_INTEGER | \ - MD_CONTEXT_AMD64_FLOATING_POINT) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_AMD64_ALL (MD_CONTEXT_AMD64_FULL | \ - MD_CONTEXT_AMD64_SEGMENTS | \ - MD_CONTEXT_X86_DEBUG_REGISTERS) - /* CONTEXT_ALL */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc.h deleted file mode 100644 index 038e921a..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * Breakpad minidump extension for PowerPC support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ - -#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32 - -typedef struct { - /* fpregs is a double[32] in mach/ppc/_types.h, but a u_int64_t is used - * here for precise sizing. */ - u_int64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT]; - u_int32_t fpscr_pad; - u_int32_t fpscr; /* Status/control */ -} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */ - - -#define MD_VECTORSAVEAREA_PPC_VR_COUNT 32 - -typedef struct { - /* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h - * exposes them as four 32-bit quantities. */ - u_int128_t save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT]; - u_int128_t save_vscr; /* Status/control */ - u_int32_t save_pad5[4]; - u_int32_t save_vrvalid; /* Identifies which vector registers are saved */ - u_int32_t save_pad6[7]; -} MDVectorSaveAreaPPC; /* ppc_vector_state */ - - -#define MD_CONTEXT_PPC_GPR_COUNT 32 - -/* Use the same 32-bit alignment when accessing this structure from 64-bit code - * as is used natively in 32-bit code. #pragma pack is a MSVC extension - * supported by gcc. */ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(4) -#else -#pragma pack(push, 4) -#endif - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int32_t context_flags; - - u_int32_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int32_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int32_t gpr[MD_CONTEXT_PPC_GPR_COUNT]; - u_int32_t cr; /* Condition */ - u_int32_t xer; /* Integer (fiXed-point) exception */ - u_int32_t lr; /* Link */ - u_int32_t ctr; /* Count */ - u_int32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */ - u_int32_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC; /* Based on ppc_thread_state */ - -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(0) -#else -#pragma pack(pop) -#endif - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc64.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc64.h deleted file mode 100644 index a788e5d1..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_ppc64.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Neal Sidhwaney */ - - -/* - * Breakpad minidump extension for PPC64 support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ - -#include "minidump_cpu_ppc.h" - -// these types are the same in ppc64 & ppc -typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; -typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; - -#define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - u_int64_t context_flags; - - u_int64_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - u_int64_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - u_int64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; - u_int64_t cr; /* Condition */ - u_int64_t xer; /* Integer (fiXed-point) exception */ - u_int64_t lr; /* Link */ - u_int64_t ctr; /* Count */ - u_int64_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC64; /* Based on ppc_thread_state */ - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_sparc.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_sparc.h deleted file mode 100644 index ee95b64e..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_sparc.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on sparc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * SPARC support, see (solaris)sys/procfs_isa.h also - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ - -#define MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT 32 - -typedef struct { - - /* FPU floating point regs */ - u_int64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT]; - - u_int64_t filler; - u_int64_t fsr; /* FPU status register */ -} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */ - -#define MD_CONTEXT_SPARC_GPR_COUNT 32 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - u_int32_t context_flags; - u_int32_t flag_pad; - /* - * General register access (SPARC). - * Don't confuse definitions here with definitions in . - * Registers are 32 bits for ILP32, 64 bits for LP64. - * SPARC V7/V8 is for 32bit, SPARC V9 is for 64bit - */ - - /* 32 Integer working registers */ - - /* g_r[0-7] global registers(g0-g7) - * g_r[8-15] out registers(o0-o7) - * g_r[16-23] local registers(l0-l7) - * g_r[24-31] in registers(i0-i7) - */ - u_int64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT]; - - /* several control registers */ - - /* Processor State register(PSR) for SPARC V7/V8 - * Condition Code register (CCR) for SPARC V9 - */ - u_int64_t ccr; - - u_int64_t pc; /* Program Counter register (PC) */ - u_int64_t npc; /* Next Program Counter register (nPC) */ - u_int64_t y; /* Y register (Y) */ - - /* Address Space Identifier register (ASI) for SPARC V9 - * WIM for SPARC V7/V8 - */ - u_int64_t asi; - - /* Floating-Point Registers State register (FPRS) for SPARC V9 - * TBR for for SPARC V7/V8 - */ - u_int64_t fprs; - - /* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */ - MDFloatingSaveAreaSPARC float_save; - -} MDRawContextSPARC; /* CONTEXT_SPARC */ - -/* For (MDRawContextSPARC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_SPARC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_SPARC 0x10000000 -#define MD_CONTEXT_SPARC_CONTROL (MD_CONTEXT_SPARC | 0x00000001) -#define MD_CONTEXT_SPARC_INTEGER (MD_CONTEXT_SPARC | 0x00000002) -#define MD_CONTEXT_SAPARC_FLOATING_POINT (MD_CONTEXT_SPARC | 0x00000004) -#define MD_CONTEXT_SAPARC_EXTRA (MD_CONTEXT_SPARC | 0x00000008) - -#define MD_CONTEXT_SPARC_FULL (MD_CONTEXT_SPARC_CONTROL | \ - MD_CONTEXT_SPARC_INTEGER) - -#define MD_CONTEXT_SPARC_ALL (MD_CONTEXT_SPARC_FULL | \ - MD_CONTEXT_SAPARC_FLOATING_POINT | \ - MD_CONTEXT_SAPARC_EXTRA) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_x86.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_x86.h deleted file mode 100644 index 4dbc0e9a..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_cpu_x86.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on x86. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ - -#define MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE 80 - /* SIZE_OF_80387_REGISTERS */ - -typedef struct { - u_int32_t control_word; - u_int32_t status_word; - u_int32_t tag_word; - u_int32_t error_offset; - u_int32_t error_selector; - u_int32_t data_offset; - u_int32_t data_selector; - - /* register_area contains eight 80-bit (x87 "long double") quantities for - * floating-point registers %st0 (%mm0) through %st7 (%mm7). */ - u_int8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE]; - u_int32_t cr0_npx_state; -} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */ - - -#define MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE 512 - /* MAXIMUM_SUPPORTED_EXTENSION */ - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - u_int32_t context_flags; - - /* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */ - u_int32_t dr0; - u_int32_t dr1; - u_int32_t dr2; - u_int32_t dr3; - u_int32_t dr6; - u_int32_t dr7; - - /* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */ - MDFloatingSaveAreaX86 float_save; - - /* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */ - u_int32_t gs; - u_int32_t fs; - u_int32_t es; - u_int32_t ds; - /* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */ - u_int32_t edi; - u_int32_t esi; - u_int32_t ebx; - u_int32_t edx; - u_int32_t ecx; - u_int32_t eax; - - /* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */ - u_int32_t ebp; - u_int32_t eip; - u_int32_t cs; /* WinNT.h says "must be sanitized" */ - u_int32_t eflags; /* WinNT.h says "must be sanitized" */ - u_int32_t esp; - u_int32_t ss; - - /* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS. - * It contains vector (MMX/SSE) registers. It it laid out in the - * format used by the fxsave and fsrstor instructions, so it includes - * a copy of the x87 floating-point registers as well. See FXSAVE in - * "Intel Architecture Software Developer's Manual, Volume 2." */ - u_int8_t extended_registers[ - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE]; -} MDRawContextX86; /* CONTEXT */ - -/* For (MDRawContextX86).context_flags. These values indicate the type of - * context stored in the structure. The high 26 bits identify the CPU, the - * low 6 bits identify the type of context saved. */ -#define MD_CONTEXT_X86 0x00010000 - /* CONTEXT_i386, CONTEXT_i486: identifies CPU */ -#define MD_CONTEXT_X86_CONTROL (MD_CONTEXT_X86 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_X86_INTEGER (MD_CONTEXT_X86 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_X86_SEGMENTS (MD_CONTEXT_X86 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_X86_FLOATING_POINT (MD_CONTEXT_X86 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_X86_DEBUG_REGISTERS (MD_CONTEXT_X86 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -#define MD_CONTEXT_X86_EXTENDED_REGISTERS (MD_CONTEXT_X86 | 0x00000020) - /* CONTEXT_EXTENDED_REGISTERS */ - -#define MD_CONTEXT_X86_FULL (MD_CONTEXT_X86_CONTROL | \ - MD_CONTEXT_X86_INTEGER | \ - MD_CONTEXT_X86_SEGMENTS) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_X86_ALL (MD_CONTEXT_X86_FULL | \ - MD_CONTEXT_X86_FLOATING_POINT | \ - MD_CONTEXT_X86_DEBUG_REGISTERS | \ - MD_CONTEXT_X86_EXTENDED_REGISTERS) - /* CONTEXT_ALL */ - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_linux.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_linux.h deleted file mode 100644 index d52c7519..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_linux.h +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_linux.h: A definition of exception codes for - * Linux - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from bits/signum.h. - */ -typedef enum { - MD_EXCEPTION_CODE_LIN_SIGHUP = 1, /* Hangup (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGINT = 2, /* Interrupt (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGQUIT = 3, /* Quit (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGILL = 4, /* Illegal instruction (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGTRAP = 5, /* Trace trap (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGABRT = 6, /* Abort (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGBUS = 7, /* BUS error (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGFPE = 8, /* Floating-point exception (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGKILL = 9, /* Kill, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGUSR1 = 10, /* User-defined signal 1 (POSIX). */ - MD_EXCEPTION_CODE_LIN_SIGSEGV = 11, /* Segmentation violation (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGUSR2 = 12, /* User-defined signal 2 (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGPIPE = 13, /* Broken pipe (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGALRM = 14, /* Alarm clock (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTERM = 15, /* Termination (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGSTKFLT = 16, /* Stack faultd */ - MD_EXCEPTION_CODE_LIN_SIGCHLD = 17, /* Child status has changed (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGCONT = 18, /* Continue (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGSTOP = 19, /* Stop, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTSTP = 20, /* Keyboard stop (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTIN = 21, /* Background read from tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTOU = 22, /* Background write to tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGURG = 23, - /* Urgent condition on socket (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXCPU = 24, /* CPU limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXFSZ = 25, - /* File size limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGVTALRM = 26, /* Virtual alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPROF = 27, /* Profiling alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGWINCH = 28, /* Window size change (4.3 BSD, Sun) */ - MD_EXCEPTION_CODE_LIN_SIGIO = 29, /* I/O now possible (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPWR = 30, /* Power failure restart (System V) */ - MD_EXCEPTION_CODE_LIN_SIGSYS = 31 /* Bad system call */ -} MDExceptionCodeLinux; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_mac.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_mac.h deleted file mode 100644 index 5fba44ca..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_mac.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_mac.h: A definition of exception codes for Mac - * OS X - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/exception_types.h. This is - * what Mac OS X calls an "exception", not a "code". */ -typedef enum { - /* Exception code. The high 16 bits of exception_code contains one of - * these values. */ - MD_EXCEPTION_MAC_BAD_ACCESS = 1, /* code can be a kern_return_t */ - /* EXC_BAD_ACCESS */ - MD_EXCEPTION_MAC_BAD_INSTRUCTION = 2, /* code is CPU-specific */ - /* EXC_BAD_INSTRUCTION */ - MD_EXCEPTION_MAC_ARITHMETIC = 3, /* code is CPU-specific */ - /* EXC_ARITHMETIC */ - MD_EXCEPTION_MAC_EMULATION = 4, /* code is CPU-specific */ - /* EXC_EMULATION */ - MD_EXCEPTION_MAC_SOFTWARE = 5, - /* EXC_SOFTWARE */ - MD_EXCEPTION_MAC_BREAKPOINT = 6, /* code is CPU-specific */ - /* EXC_BREAKPOINT */ - MD_EXCEPTION_MAC_SYSCALL = 7, - /* EXC_SYSCALL */ - MD_EXCEPTION_MAC_MACH_SYSCALL = 8, - /* EXC_MACH_SYSCALL */ - MD_EXCEPTION_MAC_RPC_ALERT = 9 - /* EXC_RPC_ALERT */ -} MDExceptionMac; - -/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/ppc/exception.h and - * mach/i386/exception.h. This is what Mac OS X calls a "code". */ -typedef enum { - /* With MD_EXCEPTION_BAD_ACCESS. These are relevant kern_return_t values - * from mach/kern_return.h. */ - MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS = 1, - /* KERN_INVALID_ADDRESS */ - MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE = 2, - /* KERN_PROTECTION_FAILURE */ - MD_EXCEPTION_CODE_MAC_NO_ACCESS = 8, - /* KERN_NO_ACCESS */ - MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE = 9, - /* KERN_MEMORY_FAILURE */ - MD_EXCEPTION_CODE_MAC_MEMORY_ERROR = 10, - /* KERN_MEMORY_ERROR */ - - /* With MD_EXCEPTION_SOFTWARE */ - MD_EXCEPTION_CODE_MAC_BAD_SYSCALL = 0x00010000, /* Mach SIGSYS */ - MD_EXCEPTION_CODE_MAC_BAD_PIPE = 0x00010001, /* Mach SIGPIPE */ - MD_EXCEPTION_CODE_MAC_ABORT = 0x00010002, /* Mach SIGABRT */ - - /* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101, - /* EXC_PPC_VM_PROT_READ */ - MD_EXCEPTION_CODE_MAC_PPC_BADSPACE = 0x0102, - /* EXC_PPC_BADSPACE */ - MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED = 0x0103, - /* EXC_PPC_UNALIGNED */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL = 1, - /* EXC_PPC_INVALID_SYSCALL */ - MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION = 2, - /* EXC_PPC_UNIPL_INST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION = 3, - /* EXC_PPC_PRIVINST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER = 4, - /* EXC_PPC_PRIVREG */ - MD_EXCEPTION_CODE_MAC_PPC_TRACE = 5, - /* EXC_PPC_TRACE */ - MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR = 6, - /* EXC_PPC_PERFMON */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW = 1, - /* EXC_PPC_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE = 2, - /* EXC_PPC_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT = 3, - /* EXC_FLT_INEXACT */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE = 4, - /* EXC_PPC_FLT_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW = 5, - /* EXC_PPC_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW = 6, - /* EXC_PPC_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER = 7, - /* EXC_PPC_FLT_NOT_A_NUMBER */ - - /* With MD_EXCEPTION_MAC_EMULATION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION = 8, - /* EXC_PPC_NOEMULATION */ - MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST = 9, - /* EXC_PPC_ALTIVECASSIST */ - - /* With MD_EXCEPTION_MAC_SOFTWARE on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_TRAP = 0x00000001, /* EXC_PPC_TRAP */ - MD_EXCEPTION_CODE_MAC_PPC_MIGRATE = 0x00010100, /* EXC_PPC_MIGRATE */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT = 1, /* EXC_PPC_BREAKPOINT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86, see also x86 interrupt - * values below. */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION = 1, /* EXC_I386_INVOP */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on x86 */ - MD_EXCEPTION_CODE_MAC_X86_DIV = 1, /* EXC_I386_DIV */ - MD_EXCEPTION_CODE_MAC_X86_INTO = 2, /* EXC_I386_INTO */ - MD_EXCEPTION_CODE_MAC_X86_NOEXT = 3, /* EXC_I386_NOEXT */ - MD_EXCEPTION_CODE_MAC_X86_EXTOVR = 4, /* EXC_I386_EXTOVR */ - MD_EXCEPTION_CODE_MAC_X86_EXTERR = 5, /* EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_EMERR = 6, /* EXC_I386_EMERR */ - MD_EXCEPTION_CODE_MAC_X86_BOUND = 7, /* EXC_I386_BOUND */ - MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR = 8, /* EXC_I386_SSEEXTERR */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on x86 */ - MD_EXCEPTION_CODE_MAC_X86_SGL = 1, /* EXC_I386_SGL */ - MD_EXCEPTION_CODE_MAC_X86_BPT = 2, /* EXC_I386_BPT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86. These are the raw - * x86 interrupt codes. Most of these are mapped to other Mach - * exceptions and codes, are handled, or should not occur in user space. - * A few of these will do occur with MD_EXCEPTION_MAC_BAD_INSTRUCTION. */ - /* EXC_I386_DIVERR = 0: mapped to EXC_ARITHMETIC/EXC_I386_DIV */ - /* EXC_I386_SGLSTP = 1: mapped to EXC_BREAKPOINT/EXC_I386_SGL */ - /* EXC_I386_NMIFLT = 2: should not occur in user space */ - /* EXC_I386_BPTFLT = 3: mapped to EXC_BREAKPOINT/EXC_I386_BPT */ - /* EXC_I386_INTOFLT = 4: mapped to EXC_ARITHMETIC/EXC_I386_INTO */ - /* EXC_I386_BOUNDFLT = 5: mapped to EXC_ARITHMETIC/EXC_I386_BOUND */ - /* EXC_I386_INVOPFLT = 6: mapped to EXC_BAD_INSTRUCTION/EXC_I386_INVOP */ - /* EXC_I386_NOEXTFLT = 7: should be handled by the kernel */ - /* EXC_I386_DBLFLT = 8: should be handled (if possible) by the kernel */ - /* EXC_I386_EXTOVRFLT = 9: mapped to EXC_BAD_ACCESS/(PROT_READ|PROT_EXEC) */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT = 10, - /* EXC_INVTSSFLT */ - MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT = 11, - /* EXC_SEGNPFLT */ - MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT = 12, - /* EXC_STKFLT */ - MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT = 13, - /* EXC_GPFLT */ - /* EXC_I386_PGFLT = 14: should not occur in user space */ - /* EXC_I386_EXTERRFLT = 16: mapped to EXC_ARITHMETIC/EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT = 17 - /* EXC_ALIGNFLT (for vector operations) */ - /* EXC_I386_ENOEXTFLT = 32: should be handled by the kernel */ - /* EXC_I386_ENDPERR = 33: should not occur */ -} MDExceptionCodeMac; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_OSX_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_solaris.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_solaris.h deleted file mode 100644 index d48632ac..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_solaris.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_solaris.h: A definition of exception codes for - * Solaris - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. These values come from sys/iso/signal_iso.h - */ -typedef enum { - MD_EXCEPTION_CODE_SOL_SIGHUP = 1, /* Hangup */ - MD_EXCEPTION_CODE_SOL_SIGINT = 2, /* interrupt (rubout) */ - MD_EXCEPTION_CODE_SOL_SIGQUIT = 3, /* quit (ASCII FS) */ - MD_EXCEPTION_CODE_SOL_SIGILL = 4, /* illegal instruction (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGTRAP = 5, /* trace trap (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGIOT = 6, /* IOT instruction */ - MD_EXCEPTION_CODE_SOL_SIGABRT = 6, /* used by abort, replace SIGIOT in the future */ - MD_EXCEPTION_CODE_SOL_SIGEMT = 7, /* EMT instruction */ - MD_EXCEPTION_CODE_SOL_SIGFPE = 8, /* floating point exception */ - MD_EXCEPTION_CODE_SOL_SIGKILL = 9, /* kill (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGBUS = 10, /* bus error */ - MD_EXCEPTION_CODE_SOL_SIGSEGV = 11, /* segmentation violation */ - MD_EXCEPTION_CODE_SOL_SIGSYS = 12, /* bad argument to system call */ - MD_EXCEPTION_CODE_SOL_SIGPIPE = 13, /* write on a pipe with no one to read it */ - MD_EXCEPTION_CODE_SOL_SIGALRM = 14, /* alarm clock */ - MD_EXCEPTION_CODE_SOL_SIGTERM = 15, /* software termination signal from kill */ - MD_EXCEPTION_CODE_SOL_SIGUSR1 = 16, /* user defined signal 1 */ - MD_EXCEPTION_CODE_SOL_SIGUSR2 = 17, /* user defined signal 2 */ - MD_EXCEPTION_CODE_SOL_SIGCLD = 18, /* child status change */ - MD_EXCEPTION_CODE_SOL_SIGCHLD = 18, /* child status change alias (POSIX) */ - MD_EXCEPTION_CODE_SOL_SIGPWR = 19, /* power-fail restart */ - MD_EXCEPTION_CODE_SOL_SIGWINCH = 20, /* window size change */ - MD_EXCEPTION_CODE_SOL_SIGURG = 21, /* urgent socket condition */ - MD_EXCEPTION_CODE_SOL_SIGPOLL = 22, /* pollable event occured */ - MD_EXCEPTION_CODE_SOL_SIGIO = 22, /* socket I/O possible (SIGPOLL alias) */ - MD_EXCEPTION_CODE_SOL_SIGSTOP = 23, /* stop (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGTSTP = 24, /* user stop requested from tty */ - MD_EXCEPTION_CODE_SOL_SIGCONT = 25, /* stopped process has been continued */ - MD_EXCEPTION_CODE_SOL_SIGTTIN = 26, /* background tty read attempted */ - MD_EXCEPTION_CODE_SOL_SIGTTOU = 27, /* background tty write attempted */ - MD_EXCEPTION_CODE_SOL_SIGVTALRM = 28, /* virtual timer expired */ - MD_EXCEPTION_CODE_SOL_SIGPROF = 29, /* profiling timer expired */ - MD_EXCEPTION_CODE_SOL_SIGXCPU = 30, /* exceeded cpu limit */ - MD_EXCEPTION_CODE_SOL_SIGXFSZ = 31, /* exceeded file size limit */ - MD_EXCEPTION_CODE_SOL_SIGWAITING = 32, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGLWP = 33, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGFREEZE = 34, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGTHAW = 35, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGCANCEL = 36, /* reserved signal for thread cancellation */ - MD_EXCEPTION_CODE_SOL_SIGLOST = 37, /* resource lost (eg, record-lock lost) */ - MD_EXCEPTION_CODE_SOL_SIGXRES = 38, /* resource control exceeded */ - MD_EXCEPTION_CODE_SOL_SIGJVM1 = 39, /* reserved signal for Java Virtual Machine */ - MD_EXCEPTION_CODE_SOL_SIGJVM2 = 40 /* reserved signal for Java Virtual Machine */ -} MDExceptionCodeSolaris; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_win32.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_win32.h deleted file mode 100644 index 7fd4bc4f..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_exception_win32.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_win32.h: Definitions of exception codes for - * Win32 platform - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from WinBase.h - * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h, - * they are STATUS_ in WinNT.h). */ -typedef enum { - MD_EXCEPTION_CODE_WIN_CONTROL_C = 0x40010005, - /* DBG_CONTROL_C */ - MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION = 0x80000001, - /* EXCEPTION_GUARD_PAGE */ - MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT = 0x80000002, - /* EXCEPTION_DATATYPE_MISALIGNMENT */ - MD_EXCEPTION_CODE_WIN_BREAKPOINT = 0x80000003, - /* EXCEPTION_BREAKPOINT */ - MD_EXCEPTION_CODE_WIN_SINGLE_STEP = 0x80000004, - /* EXCEPTION_SINGLE_STEP */ - MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION = 0xc0000005, - /* EXCEPTION_ACCESS_VIOLATION */ - MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR = 0xc0000006, - /* EXCEPTION_IN_PAGE_ERROR */ - MD_EXCEPTION_CODE_WIN_INVALID_HANDLE = 0xc0000008, - /* EXCEPTION_INVALID_HANDLE */ - MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION = 0xc000001d, - /* EXCEPTION_ILLEGAL_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025, - /* EXCEPTION_NONCONTINUABLE_EXCEPTION */ - MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION = 0xc0000026, - /* EXCEPTION_INVALID_DISPOSITION */ - MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED = 0xc000008c, - /* EXCEPTION_BOUNDS_EXCEEDED */ - MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND = 0xc000008d, - /* EXCEPTION_FLT_DENORMAL_OPERAND */ - MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO = 0xc000008e, - /* EXCEPTION_FLT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT = 0xc000008f, - /* EXCEPTION_FLT_INEXACT_RESULT */ - MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION = 0xc0000090, - /* EXCEPTION_FLT_INVALID_OPERATION */ - MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW = 0xc0000091, - /* EXCEPTION_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK = 0xc0000092, - /* EXCEPTION_FLT_STACK_CHECK */ - MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW = 0xc0000093, - /* EXCEPTION_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO = 0xc0000094, - /* EXCEPTION_INT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW = 0xc0000095, - /* EXCEPTION_INT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION = 0xc0000096, - /* EXCEPTION_PRIV_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW = 0xc00000fd, - /* EXCEPTION_STACK_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194 - /* EXCEPTION_POSSIBLE_DEADLOCK */ -} MDExceptionCodeWin; - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_format.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_format.h deleted file mode 100644 index 4d9e767f..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_format.h +++ /dev/null @@ -1,721 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -#if defined(_MSC_VER) -/* Disable "zero-sized array in struct/union" warnings when compiling in - * MSVC. DbgHelp.h does this too. */ -#pragma warning(push) -#pragma warning(disable:4200) -#endif /* _MSC_VER */ - - -/* - * guiddef.h - */ - -typedef struct { - u_int32_t data1; - u_int16_t data2; - u_int16_t data3; - u_int8_t data4[8]; -} MDGUID; /* GUID */ - - -/* - * WinNT.h - */ - -/* Non-x86 CPU identifiers found in the high 26 bits of - * (MDRawContext*).context_flags. These aren't used by Breakpad, but are - * defined here for reference, to avoid assigning values that conflict - * (although some values already conflict). */ -#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */ -#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */ -/* Additional values from winnt.h in the Windows CE 5.0 SDK: */ -#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */ -#define MD_CONTEXT_ARM 0x00000040 /* CONTEXT_ARM (0x40 bit set in SHx?) */ -#define MD_CONTEXT_MIPS 0x00010000 /* CONTEXT_R4000 (same value as x86?) */ -#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */ - -#define MD_CONTEXT_CPU_MASK 0xffffffc0 - - -/* This is a base type for MDRawContextX86 and MDRawContextPPC. This - * structure should never be allocated directly. The actual structure type - * can be determined by examining the context_flags field. */ -typedef struct { - u_int32_t context_flags; -} MDRawContextBase; - -#include "minidump_cpu_sparc.h" -#include "minidump_cpu_x86.h" -#include "minidump_cpu_ppc.h" -#include "minidump_cpu_ppc64.h" -#include "minidump_cpu_amd64.h" - - -/* - * WinVer.h - */ - - -typedef struct { - u_int32_t signature; - u_int32_t struct_version; - u_int32_t file_version_hi; - u_int32_t file_version_lo; - u_int32_t product_version_hi; - u_int32_t product_version_lo; - u_int32_t file_flags_mask; /* Identifies valid bits in fileFlags */ - u_int32_t file_flags; - u_int32_t file_os; - u_int32_t file_type; - u_int32_t file_subtype; - u_int32_t file_date_hi; - u_int32_t file_date_lo; -} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */ - -/* For (MDVSFixedFileInfo).signature */ -#define MD_VSFIXEDFILEINFO_SIGNATURE 0xfeef04bd - /* VS_FFI_SIGNATURE */ - -/* For (MDVSFixedFileInfo).version */ -#define MD_VSFIXEDFILEINFO_VERSION 0x00010000 - /* VS_FFI_STRUCVERSION */ - -/* For (MDVSFixedFileInfo).file_flags_mask and - * (MDVSFixedFileInfo).file_flags */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG 0x00000001 - /* VS_FF_DEBUG */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRERELEASE 0x00000002 - /* VS_FF_PRERELEASE */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PATCHED 0x00000004 - /* VS_FF_PATCHED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRIVATEBUILD 0x00000008 - /* VS_FF_PRIVATEBUILD */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_INFOINFERRED 0x00000010 - /* VS_FF_INFOINFERRED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_SPECIALBUILD 0x00000020 - /* VS_FF_SPECIALBUILD */ - -/* For (MDVSFixedFileInfo).file_os: high 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS_UNKNOWN 0 /* VOS_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_OS_DOS (1 << 16) /* VOS_DOS */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS216 (2 << 16) /* VOS_OS216 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS232 (3 << 16) /* VOS_OS232 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_NT (4 << 16) /* VOS_NT */ -#define MD_VSFIXEDFILEINFO_FILE_OS_WINCE (5 << 16) /* VOS_WINCE */ -/* Low 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS__BASE 0 /* VOS__BASE */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS16 1 /* VOS__WINDOWS16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM16 2 /* VOS__PM16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM32 3 /* VOS__PM32 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32 4 /* VOS__WINDOWS32 */ - -/* For (MDVSFixedFileInfo).file_type */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_UNKNOWN 0 /* VFT_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_APP 1 /* VFT_APP */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DLL 2 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DRV 3 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_FONT 4 /* VFT_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_VXD 5 /* VFT_VXD */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_STATIC_LIB 7 /* VFT_STATIC_LIB */ - -/* For (MDVSFixedFileInfo).file_subtype */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN 0 - /* VFT2_UNKNOWN */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_DRV */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_PRINTER 1 - /* VFT2_DRV_PRINTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_KEYBOARD 2 - /* VFT2_DRV_KEYBOARD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_LANGUAGE 3 - /* VFT2_DRV_LANGUAGE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_DISPLAY 4 - /* VFT2_DRV_DISPLAY */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_MOUSE 5 - /* VFT2_DRV_MOUSE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_NETWORK 6 - /* VFT2_DRV_NETWORK */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SYSTEM 7 - /* VFT2_DRV_SYSTEM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INSTALLABLE 8 - /* VFT2_DRV_INSTALLABLE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SOUND 9 - /* VFT2_DRV_SOUND */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_COMM 10 - /* VFT2_DRV_COMM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INPUTMETHOD 11 - /* VFT2_DRV_INPUTMETHOD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_VERSIONED_PRINTER 12 - /* VFT2_DRV_VERSIONED_PRINTER */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_RASTER 1 - /* VFT2_FONT_RASTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_VECTOR 2 - /* VFT2_FONT_VECTOR */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_TRUETYPE 3 - /* VFT2_FONT_TRUETYPE */ - - -/* - * DbgHelp.h - */ - - -/* An MDRVA is an offset into the minidump file. The beginning of the - * MDRawHeader is at offset 0. */ -typedef u_int32_t MDRVA; /* RVA */ - -typedef struct { - u_int32_t data_size; - MDRVA rva; -} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */ - - -typedef struct { - /* The base address of the memory range on the host that produced the - * minidump. */ - u_int64_t start_of_memory_range; - - MDLocationDescriptor memory; -} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */ - - -typedef struct { - u_int32_t signature; - u_int32_t version; - u_int32_t stream_count; - MDRVA stream_directory_rva; /* A |stream_count|-sized array of - * MDRawDirectory structures. */ - u_int32_t checksum; /* Can be 0. In fact, that's all that's - * been found in minidump files. */ - u_int32_t time_date_stamp; /* time_t */ - u_int64_t flags; -} MDRawHeader; /* MINIDUMP_HEADER */ - -/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the - * low 16 bits of (MDRawHeader).version are MD_HEADER_VERSION. Per the - * documentation, the high 16 bits are implementation-specific. */ -#define MD_HEADER_SIGNATURE 0x504d444d /* 'PMDM' */ - /* MINIDUMP_SIGNATURE */ -#define MD_HEADER_VERSION 0x0000a793 /* 42899 */ - /* MINIDUMP_VERSION */ - -/* For (MDRawHeader).flags: */ -typedef enum { - /* MD_NORMAL is the standard type of minidump. It includes full - * streams for the thread list, module list, exception, system info, - * and miscellaneous info. A memory list stream is also present, - * pointing to the same stack memory contained in the thread list, - * as well as a 256-byte region around the instruction address that - * was executing when the exception occurred. Stack memory is from - * 4 bytes below a thread's stack pointer up to the top of the - * memory region encompassing the stack. */ - MD_NORMAL = 0x00000000, - MD_WITH_DATA_SEGS = 0x00000001, - MD_WITH_FULL_MEMORY = 0x00000002, - MD_WITH_HANDLE_DATA = 0x00000004, - MD_FILTER_MEMORY = 0x00000008, - MD_SCAN_MEMORY = 0x00000010, - MD_WITH_UNLOADED_MODULES = 0x00000020, - MD_WITH_INDIRECTLY_REFERENCED_MEMORY = 0x00000040, - MD_FILTER_MODULE_PATHS = 0x00000080, - MD_WITH_PROCESS_THREAD_DATA = 0x00000100, - MD_WITH_PRIVATE_READ_WRITE_MEMORY = 0x00000200, - MD_WITHOUT_OPTIONAL_DATA = 0x00000400, - MD_WITH_FULL_MEMORY_INFO = 0x00000800, - MD_WITH_THREAD_INFO = 0x00001000, - MD_WITH_CODE_SEGS = 0x00002000 -} MDType; /* MINIDUMP_TYPE */ - - -typedef struct { - u_int32_t stream_type; - MDLocationDescriptor location; -} MDRawDirectory; /* MINIDUMP_DIRECTORY */ - -/* For (MDRawDirectory).stream_type */ -typedef enum { - MD_UNUSED_STREAM = 0, - MD_RESERVED_STREAM_0 = 1, - MD_RESERVED_STREAM_1 = 2, - MD_THREAD_LIST_STREAM = 3, /* MDRawThreadList */ - MD_MODULE_LIST_STREAM = 4, /* MDRawModuleList */ - MD_MEMORY_LIST_STREAM = 5, /* MDRawMemoryList */ - MD_EXCEPTION_STREAM = 6, /* MDRawExceptionStream */ - MD_SYSTEM_INFO_STREAM = 7, /* MDRawSystemInfo */ - MD_THREAD_EX_LIST_STREAM = 8, - MD_MEMORY_64_LIST_STREAM = 9, - MD_COMMENT_STREAM_A = 10, - MD_COMMENT_STREAM_W = 11, - MD_HANDLE_DATA_STREAM = 12, - MD_FUNCTION_TABLE_STREAM = 13, - MD_UNLOADED_MODULE_LIST_STREAM = 14, - MD_MISC_INFO_STREAM = 15, /* MDRawMiscInfo */ - MD_LAST_RESERVED_STREAM = 0x0000ffff, - - /* Breakpad extension types. 0x4767 = "Gg" */ - MD_BREAKPAD_INFO_STREAM = 0x47670001, /* MDRawBreakpadInfo */ - MD_ASSERTION_INFO_STREAM = 0x47670002 /* MDRawAssertionInfo */ -} MDStreamType; /* MINIDUMP_STREAM_TYPE */ - - -typedef struct { - u_int32_t length; /* Length of buffer in bytes (not characters), - * excluding 0-terminator */ - u_int16_t buffer[1]; /* UTF-16-encoded, 0-terminated */ -} MDString; /* MINIDUMP_STRING */ - -static const size_t MDString_minsize = offsetof(MDString, buffer[0]); - - -typedef struct { - u_int32_t thread_id; - u_int32_t suspend_count; - u_int32_t priority_class; - u_int32_t priority; - u_int64_t teb; /* Thread environment block */ - MDMemoryDescriptor stack; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawThread; /* MINIDUMP_THREAD */ - - -typedef struct { - u_int32_t number_of_threads; - MDRawThread threads[1]; -} MDRawThreadList; /* MINIDUMP_THREAD_LIST */ - -static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList, - threads[0]); - - -typedef struct { - u_int64_t base_of_image; - u_int32_t size_of_image; - u_int32_t checksum; /* 0 if unknown */ - u_int32_t time_date_stamp; /* time_t */ - MDRVA module_name_rva; /* MDString, pathname or filename */ - MDVSFixedFileInfo version_info; - - /* The next field stores a CodeView record and is populated when a module's - * debug information resides in a PDB file. It identifies the PDB file. */ - MDLocationDescriptor cv_record; - - /* The next field is populated when a module's debug information resides - * in a DBG file. It identifies the DBG file. This field is effectively - * obsolete with modules built by recent toolchains. */ - MDLocationDescriptor misc_record; - - /* Alignment problem: reserved0 and reserved1 are defined by the platform - * SDK as 64-bit quantities. However, that results in a structure whose - * alignment is unpredictable on different CPUs and ABIs. If the ABI - * specifies full alignment of 64-bit quantities in structures (as ppc - * does), there will be padding between miscRecord and reserved0. If - * 64-bit quantities can be aligned on 32-bit boundaries (as on x86), - * this padding will not exist. (Note that the structure up to this point - * contains 1 64-bit member followed by 21 32-bit members.) - * As a workaround, reserved0 and reserved1 are instead defined here as - * four 32-bit quantities. This should be harmless, as there are - * currently no known uses for these fields. */ - u_int32_t reserved0[2]; - u_int32_t reserved1[2]; -} MDRawModule; /* MINIDUMP_MODULE */ - -/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to - * be tail-padded out to a multiple of 64 bits under some ABIs (such as PPC). - * This doesn't occur on systems that don't tail-pad in this manner. Define - * this macro to be the usable size of the MDRawModule struct, and use it in - * place of sizeof(MDRawModule). */ -#define MD_MODULE_SIZE 108 - - -/* (MDRawModule).cv_record can reference MDCVInfoPDB20 or MDCVInfoPDB70. - * Ref.: http://www.debuginfo.com/articles/debuginfomatch.html - * MDCVInfoPDB70 is the expected structure type with recent toolchains. */ - -typedef struct { - u_int32_t signature; - u_int32_t offset; /* Offset to debug data (expect 0 in minidump) */ -} MDCVHeader; - -typedef struct { - MDCVHeader cv_header; - u_int32_t signature; /* time_t debug information created */ - u_int32_t age; /* revision of PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file */ -} MDCVInfoPDB20; - -static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20, - pdb_file_name[0]); - -#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */ - -typedef struct { - u_int32_t cv_signature; - MDGUID signature; /* GUID, identifies PDB file */ - u_int32_t age; /* Identifies incremental changes to PDB file */ - u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file, - * 0-terminated 8-bit character data (UTF-8?) */ -} MDCVInfoPDB70; - -static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70, - pdb_file_name[0]); - -#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */ - -typedef struct { - u_int32_t data1[2]; - u_int32_t data2; - u_int32_t data3; - u_int32_t data4; - u_int32_t data5[3]; - u_int8_t extra[2]; -} MDCVInfoELF; - -/* In addition to the two CodeView record formats above, used for linking - * to external pdb files, it is possible for debugging data to be carried - * directly in the CodeView record itself. These signature values will - * be found in the first 4 bytes of the CodeView record. Additional values - * not commonly experienced in the wild are given by "Microsoft Symbol and - * Type Information", http://www.x86.org/ftp/manuals/tools/sym.pdf, section - * 7.2. An in-depth description of the CodeView 4.1 format is given by - * "Undocumented Windows 2000 Secrets", Windows 2000 Debugging Support/ - * Microsoft Symbol File Internals/CodeView Subsections, - * http://www.rawol.com/features/undocumented/sbs-w2k-1-windows-2000-debugging-support.pdf - */ -#define MD_CVINFOCV41_SIGNATURE 0x3930424e /* '90BN', CodeView 4.10. */ -#define MD_CVINFOCV50_SIGNATURE 0x3131424e /* '11BN', CodeView 5.0, - * MS C7-format (/Z7). */ - -#define MD_CVINFOUNKNOWN_SIGNATURE 0xffffffff /* An unlikely value. */ - -/* (MDRawModule).miscRecord can reference MDImageDebugMisc. The Windows - * structure is actually defined in WinNT.h. This structure is effectively - * obsolete with modules built by recent toolchains. */ - -typedef struct { - u_int32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because - * this debug record type is mostly obsolete. */ - u_int32_t length; /* Length of entire MDImageDebugMisc structure */ - u_int8_t unicode; /* True if data is multibyte */ - u_int8_t reserved[3]; - u_int8_t data[1]; -} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */ - -static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc, - data[0]); - - -typedef struct { - u_int32_t number_of_modules; - MDRawModule modules[1]; -} MDRawModuleList; /* MINIDUMP_MODULE_LIST */ - -static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList, - modules[0]); - - -typedef struct { - u_int32_t number_of_memory_ranges; - MDMemoryDescriptor memory_ranges[1]; -} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */ - -static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList, - memory_ranges[0]); - - -#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15 - -typedef struct { - u_int32_t exception_code; /* Windows: MDExceptionCodeWin, - * Mac OS X: MDExceptionMac, - * Linux: MDExceptionCodeLinux. */ - u_int32_t exception_flags; /* Windows: 1 if noncontinuable, - Mac OS X: MDExceptionCodeMac. */ - u_int64_t exception_record; /* Address (in the minidump-producing host's - * memory) of another MDException, for - * nested exceptions. */ - u_int64_t exception_address; /* The address that caused the exception. - * Mac OS X: exception subcode (which is - * typically the address). */ - u_int32_t number_parameters; /* Number of valid elements in - * exception_information. */ - u_int32_t __align; - u_int64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS]; -} MDException; /* MINIDUMP_EXCEPTION */ - -#include "minidump_exception_win32.h" -#include "minidump_exception_mac.h" -#include "minidump_exception_linux.h" -#include "minidump_exception_solaris.h" - -typedef struct { - u_int32_t thread_id; /* Thread in which the exception - * occurred. Corresponds to - * (MDRawThread).thread_id. */ - u_int32_t __align; - MDException exception_record; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */ - - -typedef union { - struct { - u_int32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ - u_int32_t version_information; /* cpuid 1: eax */ - u_int32_t feature_information; /* cpuid 1: edx */ - u_int32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ - } x86_cpu_info; - struct { - u_int64_t processor_features[2]; - } other_cpu_info; -} MDCPUInformation; /* CPU_INFORMATION */ - - -typedef struct { - /* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO - * structure as returned by GetSystemInfo */ - u_int16_t processor_architecture; - u_int16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */ - u_int16_t processor_revision; /* x86: 0xMMSS, where MM=model, - * SS=stepping */ - - u_int8_t number_of_processors; - u_int8_t product_type; /* Windows: VER_NT_* from WinNT.h */ - - /* The next 5 fields are from the OSVERSIONINFO structure as returned - * by GetVersionEx */ - u_int32_t major_version; - u_int32_t minor_version; - u_int32_t build_number; - u_int32_t platform_id; - MDRVA csd_version_rva; /* MDString further identifying the - * host OS. - * Windows: name of the installed OS - * service pack. - * Mac OS X: the Apple OS build number - * (sw_vers -buildVersion). - * Linux: uname -srvmo */ - - u_int16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */ - u_int16_t reserved2; - - MDCPUInformation cpu; -} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */ - -/* For (MDRawSystemInfo).processor_architecture: */ -typedef enum { - MD_CPU_ARCHITECTURE_X86 = 0, /* PROCESSOR_ARCHITECTURE_INTEL */ - MD_CPU_ARCHITECTURE_MIPS = 1, /* PROCESSOR_ARCHITECTURE_MIPS */ - MD_CPU_ARCHITECTURE_ALPHA = 2, /* PROCESSOR_ARCHITECTURE_ALPHA */ - MD_CPU_ARCHITECTURE_PPC = 3, /* PROCESSOR_ARCHITECTURE_PPC */ - MD_CPU_ARCHITECTURE_SHX = 4, /* PROCESSOR_ARCHITECTURE_SHX - * (Super-H) */ - MD_CPU_ARCHITECTURE_ARM = 5, /* PROCESSOR_ARCHITECTURE_ARM */ - MD_CPU_ARCHITECTURE_IA64 = 6, /* PROCESSOR_ARCHITECTURE_IA64 */ - MD_CPU_ARCHITECTURE_ALPHA64 = 7, /* PROCESSOR_ARCHITECTURE_ALPHA64 */ - MD_CPU_ARCHITECTURE_MSIL = 8, /* PROCESSOR_ARCHITECTURE_MSIL - * (Microsoft Intermediate Language) */ - MD_CPU_ARCHITECTURE_AMD64 = 9, /* PROCESSOR_ARCHITECTURE_AMD64 */ - MD_CPU_ARCHITECTURE_X86_WIN64 = 10, - /* PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 (WoW64) */ - MD_CPU_ARCHITECTURE_SPARC = 0x8001, /* Breakpad-defined value for SPARC */ - MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ -} MDCPUArchitecture; - -/* For (MDRawSystemInfo).platform_id: */ -typedef enum { - MD_OS_WIN32S = 0, /* VER_PLATFORM_WIN32s (Windows 3.1) */ - MD_OS_WIN32_WINDOWS = 1, /* VER_PLATFORM_WIN32_WINDOWS (Windows 95-98-Me) */ - MD_OS_WIN32_NT = 2, /* VER_PLATFORM_WIN32_NT (Windows NT, 2000+) */ - MD_OS_WIN32_CE = 3, /* VER_PLATFORM_WIN32_CE, VER_PLATFORM_WIN32_HH - * (Windows CE, Windows Mobile, "Handheld") */ - - /* The following values are Breakpad-defined. */ - MD_OS_UNIX = 0x8000, /* Generic Unix-ish */ - MD_OS_MAC_OS_X = 0x8101, /* Mac OS X/Darwin */ - MD_OS_LINUX = 0x8201, /* Linux */ - MD_OS_SOLARIS = 0x8202 /* Solaris */ -} MDOSPlatform; - - -typedef struct { - u_int32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ - u_int32_t flags1; - - /* The next field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_ID. */ - u_int32_t process_id; - - /* The next 3 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_TIMES. */ - u_int32_t process_create_time; /* time_t process started */ - u_int32_t process_user_time; /* seconds of user CPU time */ - u_int32_t process_kernel_time; /* seconds of kernel CPU time */ - - /* The following fields are not present in MINIDUMP_MISC_INFO but are - * in MINIDUMP_MISC_INFO_2. When this struct is populated, these values - * may not be set. Use flags1 or sizeOfInfo to determine whether these - * values are present. These are only valid when flags1 contains - * MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */ - u_int32_t processor_max_mhz; - u_int32_t processor_current_mhz; - u_int32_t processor_mhz_limit; - u_int32_t processor_max_idle_state; - u_int32_t processor_current_idle_state; -} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO2 */ - -#define MD_MISCINFO_SIZE 24 -#define MD_MISCINFO2_SIZE 44 - -/* For (MDRawMiscInfo).flags1. These values indicate which fields in the - * MDRawMiscInfoStructure are valid. */ -typedef enum { - MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, - /* MINIDUMP_MISC1_PROCESS_ID */ - MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, - /* MINIDUMP_MISC1_PROCESS_TIMES */ - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004 - /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ -} MDMiscInfoFlags1; - - -/* - * Breakpad extension types - */ - - -typedef struct { - /* validity is a bitmask with values from MDBreakpadInfoValidity, indicating - * which of the other fields in the structure are valid. */ - u_int32_t validity; - - /* Thread ID of the handler thread. dump_thread_id should correspond to - * the thread_id of an MDRawThread in the minidump's MDRawThreadList if - * a dedicated thread in that list was used to produce the minidump. If - * the MDRawThreadList does not contain a dedicated thread used to produce - * the minidump, this field should be set to 0 and the validity field - * must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */ - u_int32_t dump_thread_id; - - /* Thread ID of the thread that requested the minidump be produced. As - * with dump_thread_id, requesting_thread_id should correspond to the - * thread_id of an MDRawThread in the minidump's MDRawThreadList. For - * minidumps produced as a result of an exception, requesting_thread_id - * will be the same as the MDRawExceptionStream's thread_id field. For - * minidumps produced "manually" at the program's request, - * requesting_thread_id will indicate which thread caused the dump to be - * written. If the minidump was produced at the request of something - * other than a thread in the MDRawThreadList, this field should be set - * to 0 and the validity field must not contain - * MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */ - u_int32_t requesting_thread_id; -} MDRawBreakpadInfo; - -/* For (MDRawBreakpadInfo).validity: */ -typedef enum { - /* When set, the dump_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID = 1 << 0, - - /* When set, the requesting_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID = 1 << 1 -} MDBreakpadInfoValidity; - -typedef struct { - /* expression, function, and file are 0-terminated UTF-16 strings. They - * may be truncated if necessary, but should always be 0-terminated when - * written to a file. - * Fixed-length strings are used because MiniDumpWriteDump doesn't offer - * a way for user streams to point to arbitrary RVAs for strings. */ - u_int16_t expression[128]; /* Assertion that failed... */ - u_int16_t function[128]; /* ...within this function... */ - u_int16_t file[128]; /* ...in this file... */ - u_int32_t line; /* ...at this line. */ - u_int32_t type; -} MDRawAssertionInfo; - -/* For (MDRawAssertionInfo).type: */ -typedef enum { - MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to an invalid parameter handler instead. */ - MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to a pure virtual call handler instead. */ - MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL -} MDAssertionInfoData; - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_size.h b/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_size.h deleted file mode 100644 index 918544b6..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/common/minidump_size.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// minidump_size.h: Provides a C++ template for programmatic access to -// the sizes of various types defined in minidump_format.h. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -template -class minidump_size { - public: - static size_t size() { return sizeof(T); } -}; - -// Explicit specializations for variable-length types. The size returned -// for these should be the size for an object without its variable-length -// section. - -template<> -class minidump_size { - public: - static size_t size() { return MDString_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawThreadList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB20_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB70_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDImageDebugMisc_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawModuleList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawMemoryList_minsize; } -}; - -// Explicit specialization for MDRawModule, for which sizeof may include -// tail-padding on some architectures but not others. - -template<> -class minidump_size { - public: - static size_t size() { return MD_MODULE_SIZE; } -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/basic_source_line_resolver.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/basic_source_line_resolver.h deleted file mode 100644 index 38759579..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/basic_source_line_resolver.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// BasicSourceLineResolver implements SourceLineResolverInterface, using -// address map files produced by a compatible writer, e.g. PDBSourceLineWriter. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ - -// TODO: Platforms that have no hash_map can use map, at the likely cost of -// performance. -#ifdef __SUNPRO_CC -#define BSLR_NO_HASH_MAP -#endif // __SUNPRO_CC - -#ifdef BSLR_NO_HASH_MAP -#include -#else // BSLR_NO_HASH_MAP -#include -#endif // BSLR_NO_HASH_MAP - -#include "google_breakpad/processor/source_line_resolver_interface.h" - -namespace google_breakpad { - -using std::string; -#ifdef BSLR_NO_HASH_MAP -using std::map; -#else // BSLR_NO_HASH_MAP -using __gnu_cxx::hash_map; -#endif // BSLR_NO_HASH_MAP - -class BasicSourceLineResolver : public SourceLineResolverInterface { - public: - BasicSourceLineResolver(); - virtual ~BasicSourceLineResolver(); - - // SourceLineResolverInterface methods, see source_line_resolver_interface.h - // for more details. - - // Adds a module to this resolver, returning true on success. - // The given map_file is read into memory, and its symbols will be - // retained until the BasicSourceLineResolver is destroyed. - virtual bool LoadModule(const string &module_name, const string &map_file); - - // Exactly the same as above, except the given map_buffer is used - // for symbols. - virtual bool LoadModuleUsingMapBuffer(const string &module_name, - const string &map_buffer); - - - virtual bool HasModule(const string &module_name) const; - - virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const; - - private: - template class MemAddrMap; - struct Line; - struct Function; - struct PublicSymbol; - struct File; -#ifdef BSLR_NO_HASH_MAP - struct CompareString { - bool operator()(const string &s1, const string &s2) const; - }; -#else // BSLR_NO_HASH_MAP - struct HashString { - size_t operator()(const string &s) const; - }; -#endif // BSLR_NO_HASH_MAP - class Module; - - // All of the modules we've loaded -#ifdef BSLR_NO_HASH_MAP - typedef map ModuleMap; -#else // BSLR_NO_HASH_MAP - typedef hash_map ModuleMap; -#endif // BSLR_NO_HASH_MAP - ModuleMap *modules_; - - // Disallow unwanted copy ctor and assignment operator - BasicSourceLineResolver(const BasicSourceLineResolver&); - void operator=(const BasicSourceLineResolver&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_BASIC_SOURCE_LINE_RESOLVER_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/call_stack.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/call_stack.h deleted file mode 100644 index 21f595e7..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/call_stack.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// call_stack.h: A call stack comprised of stack frames. -// -// This class manages a vector of stack frames. It is used instead of -// exposing the vector directly to allow the CallStack to own StackFrame -// pointers without having to publicly export the linked_ptr class. A -// CallStack must be composed of pointers instead of objects to allow for -// CPU-specific StackFrame subclasses. -// -// By convention, the stack frame at index 0 is the innermost callee frame, -// and the frame at the highest index in a call stack is the outermost -// caller. CallStack only allows stacks to be built by pushing frames, -// beginning with the innermost callee frame. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ - -#include - -namespace google_breakpad { - -using std::vector; - -struct StackFrame; -template class linked_ptr; - -class CallStack { - public: - CallStack() { Clear(); } - ~CallStack(); - - // Resets the CallStack to its initial empty state - void Clear(); - - const vector* frames() const { return &frames_; } - - private: - // Stackwalker is responsible for building the frames_ vector. - friend class Stackwalker; - - // Storage for pushed frames. - vector frames_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCSSOR_CALL_STACK_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_module.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_module.h deleted file mode 100644 index 38ee956e..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_module.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_module.h: Carries information about code modules that are loaded -// into a process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class CodeModule { - public: - virtual ~CodeModule() {} - - // The base address of this code module as it was loaded by the process. - // (u_int64_t)-1 on error. - virtual u_int64_t base_address() const = 0; - - // The size of the code module. 0 on error. - virtual u_int64_t size() const = 0; - - // The path or file name that the code module was loaded from. Empty on - // error. - virtual string code_file() const = 0; - - // An identifying string used to discriminate between multiple versions and - // builds of the same code module. This may contain a uuid, timestamp, - // version number, or any combination of this or other information, in an - // implementation-defined format. Empty on error. - virtual string code_identifier() const = 0; - - // The filename containing debugging information associated with the code - // module. If debugging information is stored in a file separate from the - // code module itself (as is the case when .pdb or .dSYM files are used), - // this will be different from code_file. If debugging information is - // stored in the code module itself (possibly prior to stripping), this - // will be the same as code_file. Empty on error. - virtual string debug_file() const = 0; - - // An identifying string similar to code_identifier, but identifies a - // specific version and build of the associated debug file. This may be - // the same as code_identifier when the debug_file and code_file are - // identical or when the same identifier is used to identify distinct - // debug and code files. - virtual string debug_identifier() const = 0; - - // A human-readable representation of the code module's version. Empty on - // error. - virtual string version() const = 0; - - // Creates a new copy of this CodeModule object, which the caller takes - // ownership of. The new CodeModule may be of a different concrete class - // than the CodeModule being copied, but will behave identically to the - // copied CodeModule as far as the CodeModule interface is concerned. - virtual const CodeModule* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_modules.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_modules.h deleted file mode 100644 index 29c55d4e..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/code_modules.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// code_modules.h: Contains all of the CodeModule objects that were loaded -// into a single process. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -class CodeModules { - public: - virtual ~CodeModules() {} - - // The number of contained CodeModule objects. - virtual unsigned int module_count() const = 0; - - // Random access to modules. Returns the module whose code is present - // at the address indicated by |address|. If no module is present at this - // address, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const = 0; - - // Returns the module corresponding to the main executable. If there is - // no main executable, returns NULL. Ownership of the returned CodeModule - // is retained by the CodeModules object; pointers returned by this method - // are valid for comparison with pointers returned by the other Get - // methods. - virtual const CodeModule* GetMainModule() const = 0; - - // Sequential access to modules. A sequence number of 0 corresponds to the - // module residing lowest in memory. If the sequence number is out of - // range, returns NULL. Ownership of the returned CodeModule is retained - // by the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtSequence( - unsigned int sequence) const = 0; - - // Sequential access to modules. This is similar to GetModuleAtSequence, - // except no ordering requirement is enforced. A CodeModules implementation - // may return CodeModule objects from GetModuleAtIndex in any order it - // wishes, provided that the order remain the same throughout the life of - // the CodeModules object. Typically, GetModuleAtIndex would be used by - // a caller to enumerate all CodeModule objects quickly when the enumeration - // does not require any ordering. If the index argument is out of range, - // returns NULL. Ownership of the returned CodeModule is retained by - // the CodeModules object; pointers returned by this method are valid for - // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const = 0; - - // Creates a new copy of this CodeModules object, which the caller takes - // ownership of. The new object will also contain copies of the existing - // object's child CodeModule objects. The new CodeModules object may be of - // a different concrete class than the object being copied, but will behave - // identically to the copied object as far as the CodeModules and CodeModule - // interfaces are concerned, except that the order that GetModuleAtIndex - // returns objects in may differ between a copy and the original CodeModules - // object. - virtual const CodeModules* Copy() const = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/memory_region.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/memory_region.h deleted file mode 100644 index 1ac3fe8d..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/memory_region.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// memory_region.h: Access to memory regions. -// -// A MemoryRegion provides virtual access to a range of memory. It is an -// abstraction allowing the actual source of memory to be independent of -// methods which need to access a virtual memory space. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ - - -#include "google_breakpad/common/breakpad_types.h" - - -namespace google_breakpad { - - -class MemoryRegion { - public: - virtual ~MemoryRegion() {} - - // The base address of this memory region. - virtual u_int64_t GetBase() = 0; - - // The size of this memory region. - virtual u_int32_t GetSize() = 0; - - // Access to data of various sizes within the memory region. address - // is a pointer to read, and it must lie within the memory region as - // defined by its base address and size. The location pointed to by - // value is set to the value at address. Byte-swapping is performed - // if necessary so that the value is appropriate for the running - // program. Returns true on success. Fails and returns false if address - // is out of the region's bounds (after considering the width of value), - // or for other types of errors. - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) = 0; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump.h deleted file mode 100644 index 5c5dccc9..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump.h +++ /dev/null @@ -1,904 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump.h: A minidump reader. -// -// The basic structure of this module tracks the structure of the minidump -// file itself. At the top level, a minidump file is represented by a -// Minidump object. Like most other classes in this module, Minidump -// provides a Read method that initializes the object with information from -// the file. Most of the classes in this file are wrappers around the -// "raw" structures found in the minidump file itself, and defined in -// minidump_format.h. For example, each thread is represented by a -// MinidumpThread object, whose parameters are specified in an MDRawThread -// structure. A properly byte-swapped MDRawThread can be obtained from a -// MinidumpThread easily by calling its thread() method. -// -// Most of the module lazily reads only the portion of the minidump file -// necessary to fulfill the user's request. Calling Minidump::Read -// only reads the minidump's directory. The thread list is not read until -// it is needed, and even once it's read, the memory regions for each -// thread's stack aren't read until they're needed. This strategy avoids -// unnecessary file input, and allocating memory for data in which the user -// has no interest. Note that although memory allocations for a typical -// minidump file are not particularly large, it is possible for legitimate -// minidumps to be sizable. A full-memory minidump, for example, contains -// a snapshot of the entire mapped memory space. Even a normal minidump, -// with stack memory only, can be large if, for example, the dump was -// generated in response to a crash that occurred due to an infinite- -// recursion bug that caused the stack's limits to be exceeded. Finally, -// some users of this library will unfortunately find themselves in the -// position of having to process potentially-hostile minidumps that might -// attempt to cause problems by forcing the minidump processor to over- -// allocate memory. -// -// Memory management in this module is based on a strict -// you-don't-own-anything policy. The only object owned by the user is -// the top-level Minidump object, the creation and destruction of which -// must be the user's own responsibility. All other objects obtained -// through interaction with this module are ultimately owned by the -// Minidump object, and will be freed upon the Minidump object's destruction. -// Because memory regions can potentially involve large allocations, a -// FreeMemory method is provided by MinidumpMemoryRegion, allowing the user -// to release data when it is no longer needed. Use of this method is -// optional but recommended. If freed data is later required, it will -// be read back in from the minidump file again. -// -// There is one exception to this memory management policy: -// Minidump::ReadString will return a string object to the user, and the user -// is responsible for its deletion. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ - -#include - -#include -#include -#include - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" - - -namespace google_breakpad { - - -using std::map; -using std::string; -using std::vector; - - -class Minidump; -template class RangeMap; - - -// MinidumpObject is the base of all Minidump* objects except for Minidump -// itself. -class MinidumpObject { - public: - virtual ~MinidumpObject() {} - - bool valid() const { return valid_; } - - protected: - explicit MinidumpObject(Minidump* minidump); - - // Refers to the Minidump object that is the ultimate parent of this - // Some MinidumpObjects are owned by other MinidumpObjects, but at the - // root of the ownership tree is always a Minidump. The Minidump object - // is kept here for access to its seeking and reading facilities, and - // for access to data about the minidump file itself, such as whether - // it should be byte-swapped. - Minidump* minidump_; - - // MinidumpObjects are not valid when created. When a subclass populates - // its own fields, it can set valid_ to true. Accessors and mutators may - // wish to consider or alter the valid_ state as they interact with - // objects. - bool valid_; -}; - - -// This class exists primarily to provide a virtual destructor in a base -// class common to all objects that might be stored in -// Minidump::mStreamObjects. Some object types (MinidumpContext) will -// never be stored in Minidump::mStreamObjects, but are represented as -// streams and adhere to the same interface, and may be derived from -// this class. -class MinidumpStream : public MinidumpObject { - public: - virtual ~MinidumpStream() {} - - protected: - explicit MinidumpStream(Minidump* minidump); - - private: - // Populate (and validate) the MinidumpStream. minidump_ is expected - // to be positioned at the beginning of the stream, so that the next - // read from the minidump will be at the beginning of the stream. - // expected_size should be set to the stream's length as contained in - // the MDRawDirectory record or other identifying record. A class - // that implements MinidumpStream can compare expected_size to a - // known size as an integrity check. - virtual bool Read(u_int32_t expected_size) = 0; -}; - - -// MinidumpContext carries a CPU-specific MDRawContext structure, which -// contains CPU context such as register states. Each thread has its -// own context, and the exception record, if present, also has its own -// context. Note that if the exception record is present, the context it -// refers to is probably what the user wants to use for the exception -// thread, instead of that thread's own context. The exception thread's -// context (as opposed to the exception record's context) will contain -// context for the exception handler (which performs minidump generation), -// and not the context that caused the exception (which is probably what the -// user wants). -class MinidumpContext : public MinidumpStream { - public: - virtual ~MinidumpContext(); - - // Returns an MD_CONTEXT_* value such as MD_CONTEXT_X86 or MD_CONTEXT_PPC - // identifying the CPU type that the context was collected from. The - // returned value will identify the CPU only, and will have any other - // MD_CONTEXT_* bits masked out. Returns 0 on failure. - u_int32_t GetContextCPU() const; - - // Returns raw CPU-specific context data for the named CPU type. If the - // context data does not match the CPU type or does not exist, returns - // NULL. - const MDRawContextX86* GetContextX86() const; - const MDRawContextPPC* GetContextPPC() const; - const MDRawContextAMD64* GetContextAMD64() const; - const MDRawContextSPARC* GetContextSPARC() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpException; - - explicit MinidumpContext(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // Free the CPU-specific context structure. - void FreeContext(); - - // If the minidump contains a SYSTEM_INFO_STREAM, makes sure that the - // system info stream gives an appropriate CPU type matching the context - // CPU type in context_cpu_type. Returns false if the CPU type does not - // match. Returns true if the CPU type matches or if the minidump does - // not contain a system info stream. - bool CheckAgainstSystemInfo(u_int32_t context_cpu_type); - - // Store this separately because of the weirdo AMD64 context - u_int32_t context_flags_; - - // The CPU-specific context structure. - union { - MDRawContextBase* base; - MDRawContextX86* x86; - MDRawContextPPC* ppc; - MDRawContextAMD64* amd64; - // on Solaris SPARC, sparc is defined as a numeric constant, - // so variables can NOT be named as sparc - MDRawContextSPARC* ctx_sparc; - } context_; -}; - - -// MinidumpMemoryRegion does not wrap any MDRaw structure, and only contains -// a reference to an MDMemoryDescriptor. This object is intended to wrap -// portions of a minidump file that contain memory dumps. In normal -// minidumps, each MinidumpThread owns a MinidumpMemoryRegion corresponding -// to the thread's stack memory. MinidumpMemoryList also gives access to -// memory regions in its list as MinidumpMemoryRegions. This class -// adheres to MemoryRegion so that it may be used as a data provider to -// the Stackwalker family of classes. -class MinidumpMemoryRegion : public MinidumpObject, - public MemoryRegion { - public: - virtual ~MinidumpMemoryRegion(); - - static void set_max_bytes(u_int32_t max_bytes) { max_bytes_ = max_bytes; } - static u_int32_t max_bytes() { return max_bytes_; } - - // Returns a pointer to the base of the memory region. Returns the - // cached value if available, otherwise, reads the minidump file and - // caches the memory region. - const u_int8_t* GetMemory(); - - // The address of the base of the memory region. - u_int64_t GetBase(); - - // The size, in bytes, of the memory region. - u_int32_t GetSize(); - - // Frees the cached memory region, if cached. - void FreeMemory(); - - // Obtains the value of memory at the pointer specified by address. - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value); - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class MinidumpThread; - friend class MinidumpMemoryList; - - explicit MinidumpMemoryRegion(Minidump* minidump); - - // Identify the base address and size of the memory region, and the - // location it may be found in the minidump file. - void SetDescriptor(MDMemoryDescriptor* descriptor); - - // Implementation for GetMemoryAtAddress - template bool GetMemoryAtAddressInternal(u_int64_t address, - T* value); - - // The largest memory region that will be read from a minidump. The - // default is 1MB. - static u_int32_t max_bytes_; - - // Base address and size of the memory region, and its position in the - // minidump file. - MDMemoryDescriptor* descriptor_; - - // Cached memory. - vector* memory_; -}; - - -// MinidumpThread contains information about a thread of execution, -// including a snapshot of the thread's stack and CPU context. For -// the thread that caused an exception, the context carried by -// MinidumpException is probably desired instead of the CPU context -// provided here. -class MinidumpThread : public MinidumpObject { - public: - virtual ~MinidumpThread(); - - const MDRawThread* thread() const { return valid_ ? &thread_ : NULL; } - MinidumpMemoryRegion* GetMemory(); - MinidumpContext* GetContext(); - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawThread structure. Returns false if the thread ID cannot be - // determined. - bool GetThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpThreadList. - friend class MinidumpThreadList; - - explicit MinidumpThread(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpThreadList. No size checking is done, because - // MinidumpThreadList handles that directly. - bool Read(); - - MDRawThread thread_; - MinidumpMemoryRegion* memory_; - MinidumpContext* context_; -}; - - -// MinidumpThreadList contains all of the threads (as MinidumpThreads) in -// a process. -class MinidumpThreadList : public MinidumpStream { - public: - virtual ~MinidumpThreadList(); - - static void set_max_threads(u_int32_t max_threads) { - max_threads_ = max_threads; - } - static u_int32_t max_threads() { return max_threads_; } - - unsigned int thread_count() const { return valid_ ? thread_count_ : 0; } - - // Sequential access to threads. - MinidumpThread* GetThreadAtIndex(unsigned int index) const; - - // Random access to threads. - MinidumpThread* GetThreadByID(u_int32_t thread_id); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef map IDToThreadMap; - typedef vector MinidumpThreads; - - static const u_int32_t kStreamType = MD_THREAD_LIST_STREAM; - - explicit MinidumpThreadList(Minidump* aMinidump); - - bool Read(u_int32_t aExpectedSize); - - // The largest number of threads that will be read from a minidump. The - // default is 256. - static u_int32_t max_threads_; - - // Access to threads using the thread ID as the key. - IDToThreadMap id_to_thread_map_; - - // The list of threads. - MinidumpThreads* threads_; - u_int32_t thread_count_; -}; - - -// MinidumpModule wraps MDRawModule, which contains information about loaded -// code modules. Access is provided to various data referenced indirectly -// by MDRawModule, such as the module's name and a specification for where -// to locate debugging information for the module. -class MinidumpModule : public MinidumpObject, - public CodeModule { - public: - virtual ~MinidumpModule(); - - static void set_max_cv_bytes(u_int32_t max_cv_bytes) { - max_cv_bytes_ = max_cv_bytes; - } - static u_int32_t max_cv_bytes() { return max_cv_bytes_; } - - static void set_max_misc_bytes(u_int32_t max_misc_bytes) { - max_misc_bytes_ = max_misc_bytes; - } - static u_int32_t max_misc_bytes() { return max_misc_bytes_; } - - const MDRawModule* module() const { return valid_ ? &module_ : NULL; } - - // CodeModule implementation - virtual u_int64_t base_address() const { - return valid_ ? module_.base_of_image : static_cast(-1); - } - virtual u_int64_t size() const { return valid_ ? module_.size_of_image : 0; } - virtual string code_file() const; - virtual string code_identifier() const; - virtual string debug_file() const; - virtual string debug_identifier() const; - virtual string version() const; - virtual const CodeModule* Copy() const; - - // The CodeView record, which contains information to locate the module's - // debugging information (pdb). This is returned as u_int8_t* because - // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be - // of a type unknown to Breakpad, in which case the raw data will still be - // returned but no byte-swapping will have been performed. Check the - // record's signature in the first four bytes to differentiate between - // the various types. Current toolchains generate modules which carry - // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on - // success, and NULL on failure. On success, the optional |size| argument - // is set to the size of the CodeView record. - const u_int8_t* GetCVRecord(u_int32_t* size); - - // The miscellaneous debug record, which is obsolete. Current toolchains - // do not generate this type of debugging information (dbg), and this - // field is not expected to be present. Returns a pointer to the debugging - // record on success, and NULL on failure. On success, the optional |size| - // argument is set to the size of the debugging record. - const MDImageDebugMisc* GetMiscRecord(u_int32_t* size); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // These objects are managed by MinidumpModuleList. - friend class MinidumpModuleList; - - explicit MinidumpModule(Minidump* minidump); - - // This works like MinidumpStream::Read, but is driven by - // MinidumpModuleList. No size checking is done, because - // MinidumpModuleList handles that directly. - bool Read(); - - // Reads indirectly-referenced data, including the module name, CodeView - // record, and miscellaneous debugging record. This is necessary to allow - // MinidumpModuleList to fully construct MinidumpModule objects without - // requiring seeks to read a contiguous set of MinidumpModule objects. - // All auxiliary data should be available when Read is called, in order to - // allow the CodeModule getters to be const methods. - bool ReadAuxiliaryData(); - - // The largest number of bytes that will be read from a minidump for a - // CodeView record or miscellaneous debugging record, respectively. The - // default for each is 1024. - static u_int32_t max_cv_bytes_; - static u_int32_t max_misc_bytes_; - - // True after a successful Read. This is different from valid_, which is - // not set true until ReadAuxiliaryData also completes successfully. - // module_valid_ is only used by ReadAuxiliaryData and the functions it - // calls to determine whether the object is ready for auxiliary data to - // be read. - bool module_valid_; - - // True if debug info was read from the module. Certain modules - // may contain debug records in formats we don't support, - // so we can just set this to false to ignore them. - bool has_debug_info_; - - MDRawModule module_; - - // Cached module name. - const string* name_; - - // Cached CodeView record - this is MDCVInfoPDB20 or (likely) - // MDCVInfoPDB70, or possibly something else entirely. Stored as a u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* cv_record_; - - // If cv_record_ is present, cv_record_signature_ contains a copy of the - // CodeView record's first four bytes, for ease of determinining the - // type of structure that cv_record_ contains. - u_int32_t cv_record_signature_; - - // Cached MDImageDebugMisc (usually not present), stored as u_int8_t - // because the structure contains a variable-sized string and its exact - // size cannot be known until it is processed. - vector* misc_record_; -}; - - -// MinidumpModuleList contains all of the loaded code modules for a process -// in the form of MinidumpModules. It maintains a map of these modules -// so that it may easily provide a code module corresponding to a specific -// address. -class MinidumpModuleList : public MinidumpStream, - public CodeModules { - public: - virtual ~MinidumpModuleList(); - - static void set_max_modules(u_int32_t max_modules) { - max_modules_ = max_modules; - } - static u_int32_t max_modules() { return max_modules_; } - - // CodeModules implementation. - virtual unsigned int module_count() const { - return valid_ ? module_count_ : 0; - } - virtual const MinidumpModule* GetModuleForAddress(u_int64_t address) const; - virtual const MinidumpModule* GetMainModule() const; - virtual const MinidumpModule* GetModuleAtSequence( - unsigned int sequence) const; - virtual const MinidumpModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MinidumpModules; - - static const u_int32_t kStreamType = MD_MODULE_LIST_STREAM; - - explicit MinidumpModuleList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of modules that will be read from a minidump. The - // default is 1024. - static u_int32_t max_modules_; - - // Access to modules using addresses as the key. - RangeMap *range_map_; - - MinidumpModules *modules_; - u_int32_t module_count_; -}; - - -// MinidumpMemoryList corresponds to a minidump's MEMORY_LIST_STREAM stream, -// which references the snapshots of all of the memory regions contained -// within the minidump. For a normal minidump, this includes stack memory -// (also referenced by each MinidumpThread, in fact, the MDMemoryDescriptors -// here and in MDRawThread both point to exactly the same data in a -// minidump file, conserving space), as well as a 256-byte snapshot of memory -// surrounding the instruction pointer in the case of an exception. Other -// types of minidumps may contain significantly more memory regions. Full- -// memory minidumps contain all of a process' mapped memory. -class MinidumpMemoryList : public MinidumpStream { - public: - virtual ~MinidumpMemoryList(); - - static void set_max_regions(u_int32_t max_regions) { - max_regions_ = max_regions; - } - static u_int32_t max_regions() { return max_regions_; } - - unsigned int region_count() const { return valid_ ? region_count_ : 0; } - - // Sequential access to memory regions. - MinidumpMemoryRegion* GetMemoryRegionAtIndex(unsigned int index); - - // Random access to memory regions. Returns the region encompassing - // the address identified by address. - MinidumpMemoryRegion* GetMemoryRegionForAddress(u_int64_t address); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - typedef vector MemoryDescriptors; - typedef vector MemoryRegions; - - static const u_int32_t kStreamType = MD_MEMORY_LIST_STREAM; - - explicit MinidumpMemoryList(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - // The largest number of memory regions that will be read from a minidump. - // The default is 256. - static u_int32_t max_regions_; - - // Access to memory regions using addresses as the key. - RangeMap *range_map_; - - // The list of descriptors. This is maintained separately from the list - // of regions, because MemoryRegion doesn't own its MemoryDescriptor, it - // maintains a pointer to it. descriptors_ provides the storage for this - // purpose. - MemoryDescriptors *descriptors_; - - // The list of regions. - MemoryRegions *regions_; - u_int32_t region_count_; -}; - - -// MinidumpException wraps MDRawExceptionStream, which contains information -// about the exception that caused the minidump to be generated, if the -// minidump was generated in an exception handler called as a result of -// an exception. It also provides access to a MinidumpContext object, -// which contains the CPU context for the exception thread at the time -// the exception occurred. -class MinidumpException : public MinidumpStream { - public: - virtual ~MinidumpException(); - - const MDRawExceptionStream* exception() const { - return valid_ ? &exception_ : NULL; - } - - // The thread ID is used to determine if a thread is the exception thread, - // so a special getter is provided to retrieve this data from the - // MDRawExceptionStream structure. Returns false if the thread ID cannot - // be determined. - bool GetThreadID(u_int32_t *thread_id) const; - - MinidumpContext* GetContext(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_EXCEPTION_STREAM; - - explicit MinidumpException(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawExceptionStream exception_; - MinidumpContext* context_; -}; - - -// MinidumpSystemInfo wraps MDRawSystemInfo and provides information about -// the system on which the minidump was generated. See also MinidumpMiscInfo. -class MinidumpSystemInfo : public MinidumpStream { - public: - virtual ~MinidumpSystemInfo(); - - const MDRawSystemInfo* system_info() const { - return valid_ ? &system_info_ : NULL; - } - - // GetOS and GetCPU return textual representations of the operating system - // and CPU that produced the minidump. Unlike most other Minidump* methods, - // they return string objects, not weak pointers. Defined values for - // GetOS() are "mac", "windows", and "linux". Defined values for GetCPU - // are "x86" and "ppc". These methods return an empty string when their - // values are unknown. - string GetOS(); - string GetCPU(); - - // I don't know what CSD stands for, but this field is documented as - // returning a textual representation of the OS service pack. On other - // platforms, this provides additional information about an OS version - // level beyond major.minor.micro. Returns NULL if unknown. - const string* GetCSDVersion(); - - // If a CPU vendor string can be determined, returns a pointer to it, - // otherwise, returns NULL. CPU vendor strings can be determined from - // x86 CPUs with CPUID 0. - const string* GetCPUVendor(); - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_SYSTEM_INFO_STREAM; - - explicit MinidumpSystemInfo(Minidump* minidump); - - bool Read(u_int32_t expected_size); - - MDRawSystemInfo system_info_; - - // Textual representation of the OS service pack, for minidumps produced - // by MiniDumpWriteDump on Windows. - const string* csd_version_; - - // A string identifying the CPU vendor, if known. - const string* cpu_vendor_; -}; - - -// MinidumpMiscInfo wraps MDRawMiscInfo and provides information about -// the process that generated the minidump, and optionally additional system -// information. See also MinidumpSystemInfo. -class MinidumpMiscInfo : public MinidumpStream { - public: - const MDRawMiscInfo* misc_info() const { - return valid_ ? &misc_info_ : NULL; - } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_MISC_INFO_STREAM; - - explicit MinidumpMiscInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawMiscInfo misc_info_; -}; - - -// MinidumpBreakpadInfo wraps MDRawBreakpadInfo, which is an optional stream in -// a minidump that provides additional information about the process state -// at the time the minidump was generated. -class MinidumpBreakpadInfo : public MinidumpStream { - public: - const MDRawBreakpadInfo* breakpad_info() const { - return valid_ ? &breakpad_info_ : NULL; - } - - // These thread IDs are used to determine if threads deserve special - // treatment, so special getters are provided to retrieve this data from - // the MDRawBreakpadInfo structure. The getters return false if the thread - // IDs cannot be determined. - bool GetDumpThreadID(u_int32_t *thread_id) const; - bool GetRequestingThreadID(u_int32_t *thread_id) const; - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - friend class Minidump; - - static const u_int32_t kStreamType = MD_BREAKPAD_INFO_STREAM; - - explicit MinidumpBreakpadInfo(Minidump* minidump_); - - bool Read(u_int32_t expected_size_); - - MDRawBreakpadInfo breakpad_info_; -}; - - -// Minidump is the user's interface to a minidump file. It wraps MDRawHeader -// and provides access to the minidump's top-level stream directory. -class Minidump { - public: - // path is the pathname of a file containing the minidump. - explicit Minidump(const string& path); - - ~Minidump(); - - static void set_max_streams(u_int32_t max_streams) { - max_streams_ = max_streams; - } - static u_int32_t max_streams() { return max_streams_; } - - static void set_max_string_length(u_int32_t max_string_length) { - max_string_length_ = max_string_length; - } - static u_int32_t max_string_length() { return max_string_length_; } - - const MDRawHeader* header() const { return valid_ ? &header_ : NULL; } - - // Reads the minidump file's header and top-level stream directory. - // The minidump is expected to be positioned at the beginning of the - // header. Read() sets up the stream list and map, and validates the - // Minidump object. - bool Read(); - - // The next set of methods are stubs that call GetStream. They exist to - // force code generation of the templatized API within the module, and - // to avoid exposing an ugly API (GetStream needs to accept a garbage - // parameter). - MinidumpThreadList* GetThreadList(); - MinidumpModuleList* GetModuleList(); - MinidumpMemoryList* GetMemoryList(); - MinidumpException* GetException(); - MinidumpSystemInfo* GetSystemInfo(); - MinidumpMiscInfo* GetMiscInfo(); - MinidumpBreakpadInfo* GetBreakpadInfo(); - - // The next set of methods are provided for users who wish to access - // data in minidump files directly, while leveraging the rest of - // this class and related classes to handle the basic minidump - // structure and known stream types. - - unsigned int GetDirectoryEntryCount() const { - return valid_ ? header_.stream_count : 0; - } - const MDRawDirectory* GetDirectoryEntryAtIndex(unsigned int index) const; - - // The next 2 methods are lower-level I/O routines. They use fd_. - - // Reads count bytes from the minidump at the current position into - // the storage area pointed to by bytes. bytes must be of sufficient - // size. After the read, the file position is advanced by count. - bool ReadBytes(void* bytes, size_t count); - - // Sets the position of the minidump file to offset. - bool SeekSet(off_t offset); - - // Returns the current position of the minidump file. - off_t Tell() { return valid_ ? lseek(fd_, 0, SEEK_CUR) : (off_t)-1; } - - // The next 2 methods are medium-level I/O routines. - - // ReadString returns a string which is owned by the caller! offset - // specifies the offset that a length-encoded string is stored at in the - // minidump file. - string* ReadString(off_t offset); - - // SeekToStreamType positions the file at the beginning of a stream - // identified by stream_type, and informs the caller of the stream's - // length by setting *stream_length. Because stream_map maps each stream - // type to only one stream in the file, this might mislead the user into - // thinking that the stream that this seeks to is the only stream with - // type stream_type. That can't happen for streams that these classes - // deal with directly, because they're only supposed to be present in the - // file singly, and that's verified when stream_map_ is built. Users who - // are looking for other stream types should be aware of this - // possibility, and consider using GetDirectoryEntryAtIndex (possibly - // with GetDirectoryEntryCount) if expecting multiple streams of the same - // type in a single minidump file. - bool SeekToStreamType(u_int32_t stream_type, u_int32_t* stream_length); - - bool swap() const { return valid_ ? swap_ : false; } - - // Print a human-readable representation of the object to stdout. - void Print(); - - private: - // MinidumpStreamInfo is used in the MinidumpStreamMap. It lets - // the Minidump object locate interesting streams quickly, and - // provides a convenient place to stash MinidumpStream objects. - struct MinidumpStreamInfo { - MinidumpStreamInfo() : stream_index(0), stream(NULL) {} - ~MinidumpStreamInfo() { delete stream; } - - // Index into the MinidumpDirectoryEntries vector - unsigned int stream_index; - - // Pointer to the stream if cached, or NULL if not yet populated - MinidumpStream* stream; - }; - - typedef vector MinidumpDirectoryEntries; - typedef map MinidumpStreamMap; - - template T* GetStream(T** stream); - - // Opens the minidump file, or if already open, seeks to the beginning. - bool Open(); - - // The largest number of top-level streams that will be read from a minidump. - // Note that streams are only read (and only consume memory) as needed, - // when directed by the caller. The default is 128. - static u_int32_t max_streams_; - - // The maximum length of a UTF-16 string that will be read from a minidump - // in 16-bit words. The default is 1024. UTF-16 strings are converted - // to UTF-8 when stored in memory, and each UTF-16 word will be represented - // by as many as 3 bytes in UTF-8. - static unsigned int max_string_length_; - - MDRawHeader header_; - - // The list of streams. - MinidumpDirectoryEntries* directory_; - - // Access to streams using the stream type as the key. - MinidumpStreamMap* stream_map_; - - // The pathname of the minidump file to process, set in the constructor. - const string path_; - - // The file descriptor for all file I/O. Used by ReadBytes and SeekSet. - // Set based on the |path_| member by Open, which is called by Read. - int fd_; - - // swap_ is true if the minidump file should be byte-swapped. If the - // minidump was produced by a CPU that is other-endian than the CPU - // processing the minidump, this will be true. If the two CPUs are - // same-endian, this will be false. - bool swap_; - - // Validity of the Minidump structure, false immediately after - // construction or after a failed Read(); true following a successful - // Read(). - bool valid_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump_processor.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump_processor.h deleted file mode 100644 index 73447f97..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/minidump_processor.h +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -class Minidump; -class ProcessState; -class SourceLineResolverInterface; -class SymbolSupplier; -class SystemInfo; - -class MinidumpProcessor { - public: - // Return type for Process() - enum ProcessResult { - PROCESS_OK, // the minidump was processed successfully - PROCESS_ERROR, // there was an error processing the minidump - PROCESS_INTERRUPTED // processing was interrupted by the SymbolSupplier - }; - - // Initializes this MinidumpProcessor. supplier should be an - // implementation of the SymbolSupplier abstract base class. - MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - ~MinidumpProcessor(); - - // Processes the minidump file and fills process_state with the result. - ProcessResult Process(const string &minidump_file, - ProcessState *process_state); - - // Populates the cpu_* fields of the |info| parameter with textual - // representations of the CPU type that the minidump in |dump| was - // produced on. Returns false if this information is not available in - // the minidump. - static bool GetCPUInfo(Minidump *dump, SystemInfo *info); - - // Populates the os_* fields of the |info| parameter with textual - // representations of the operating system that the minidump in |dump| - // was produced on. Returns false if this information is not available in - // the minidump. - static bool GetOSInfo(Minidump *dump, SystemInfo *info); - - // Returns a textual representation of the reason that a crash occurred, - // if the minidump in dump was produced as a result of a crash. Returns - // an empty string if this information cannot be determined. If address - // is non-NULL, it will be set to contain the address that caused the - // exception, if this information is available. This will be a code - // address when the crash was caused by problems such as illegal - // instructions or divisions by zero, or a data address when the crash - // was caused by a memory access violation. - static string GetCrashReason(Minidump *dump, u_int64_t *address); - - private: - SymbolSupplier *supplier_; - SourceLineResolverInterface *resolver_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_PROCESSOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/process_state.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/process_state.h deleted file mode 100644 index afbbb193..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/process_state.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state.h: A snapshot of a process, in a fully-digested state. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ - -#include -#include -#include "google_breakpad/processor/system_info.h" -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -class CallStack; -class CodeModules; - -class ProcessState { - public: - ProcessState() : modules_(NULL) { Clear(); } - ~ProcessState(); - - // Resets the ProcessState to its default values - void Clear(); - - // Accessors. See the data declarations below. - u_int32_t time_date_stamp() const { return time_date_stamp_; } - bool crashed() const { return crashed_; } - string crash_reason() const { return crash_reason_; } - u_int64_t crash_address() const { return crash_address_; } - int requesting_thread() const { return requesting_thread_; } - const vector* threads() const { return &threads_; } - const SystemInfo* system_info() const { return &system_info_; } - const CodeModules* modules() const { return modules_; } - - private: - // MinidumpProcessor is responsible for building ProcessState objects. - friend class MinidumpProcessor; - - // The time-date stamp of the minidump (time_t format) - u_int32_t time_date_stamp_; - - // True if the process crashed, false if the dump was produced outside - // of an exception handler. - bool crashed_; - - // If the process crashed, the type of crash. OS- and possibly CPU- - // specific. For example, "EXCEPTION_ACCESS_VIOLATION" (Windows), - // "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" - // (other Unix). - string crash_reason_; - - // If the process crashed, and if crash_reason implicates memory, - // the memory address that caused the crash. For data access errors, - // this will be the data address that caused the fault. For code errors, - // this will be the address of the instruction that caused the fault. - u_int64_t crash_address_; - - // The index of the thread that requested a dump be written in the - // threads vector. If a dump was produced as a result of a crash, this - // will point to the thread that crashed. If the dump was produced as - // by user code without crashing, and the dump contains extended Breakpad - // information, this will point to the thread that requested the dump. - // If the dump was not produced as a result of an exception and no - // extended Breakpad information is present, this field will be set to -1, - // indicating that the dump thread is not available. - int requesting_thread_; - - // Stacks for each thread (except possibly the exception handler - // thread) at the time of the crash. - vector threads_; - - // OS and CPU information. - SystemInfo system_info_; - - // The modules that were loaded into the process represented by the - // ProcessState. - const CodeModules *modules_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_PROCESS_STATE_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/source_line_resolver_interface.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/source_line_resolver_interface.h deleted file mode 100644 index 93ef85d2..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/source_line_resolver_interface.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Abstract interface to return function/file/line info for a memory address. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::string; - -struct StackFrame; -struct StackFrameInfo; - -class SourceLineResolverInterface { - public: - typedef u_int64_t MemAddr; - - virtual ~SourceLineResolverInterface() {} - - // Adds a module to this resolver, returning true on success. - // - // module_name may be an arbitrary string. Typically, it will be the - // filename of the module, optionally with version identifiers. - // - // map_file should contain line/address mappings for this module. - virtual bool LoadModule(const string &module_name, - const string &map_file) = 0; - // Same as above, but takes the contents of a pre-read map buffer - virtual bool LoadModuleUsingMapBuffer(const string &module_name, - const string &map_buffer) = 0; - - // Returns true if a module with the given name has been loaded. - virtual bool HasModule(const string &module_name) const = 0; - - // Fills in the function_base, function_name, source_file_name, - // and source_line fields of the StackFrame. The instruction and - // module_name fields must already be filled in. Additional debugging - // information, if available, is returned. If the information is not - // available, returns NULL. A NULL return value does not indicate an - // error. The caller takes ownership of any returned StackFrameInfo - // object. - virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const = 0; - - protected: - // SourceLineResolverInterface cannot be instantiated except by subclasses - SourceLineResolverInterface() {} -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SOURCE_LINE_RESOLVER_INTERFACE_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame.h deleted file mode 100644 index b330f8ae..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ - -#include -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -class CodeModule; - -using std::string; - -struct StackFrame { - StackFrame() - : instruction(), - module(NULL), - function_name(), - function_base(), - source_file_name(), - source_line(), - source_line_base() {} - virtual ~StackFrame() {} - - // The program counter location as an absolute virtual address. For the - // innermost called frame in a stack, this will be an exact program counter - // or instruction pointer value. For all other frames, this will be within - // the instruction that caused execution to branch to a called function, - // but may not necessarily point to the exact beginning of that instruction. - u_int64_t instruction; - - // The module in which the instruction resides. - const CodeModule *module; - - // The function name, may be omitted if debug symbols are not available. - string function_name; - - // The start address of the function, may be omitted if debug symbols - // are not available. - u_int64_t function_base; - - // The source file name, may be omitted if debug symbols are not available. - string source_file_name; - - // The (1-based) source line number, may be omitted if debug symbols are - // not available. - int source_line; - - // The start address of the source line, may be omitted if debug symbols - // are not available. - u_int64_t source_line_base; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame_cpu.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame_cpu.h deleted file mode 100644 index 70823b9c..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stack_frame_cpu.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stack_frame_cpu.h: CPU-specific StackFrame extensions. -// -// These types extend the StackFrame structure to carry CPU-specific register -// state. They are defined in this header instead of stack_frame.h to -// avoid the need to include minidump_format.h when only the generic -// StackFrame type is needed. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ - -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stack_frame.h" - -namespace google_breakpad { - -struct StackFrameX86 : public StackFrame { - // ContextValidity has one entry for each relevant hardware pointer register - // (%eip and %esp) and one entry for each nonvolatile (callee-save) register. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_EIP = 1 << 0, - CONTEXT_VALID_ESP = 1 << 1, - CONTEXT_VALID_EBP = 1 << 2, - CONTEXT_VALID_EBX = 1 << 3, - CONTEXT_VALID_ESI = 1 << 4, - CONTEXT_VALID_EDI = 1 << 5, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameX86() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextX86 context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFramePPC : public StackFrame { - // ContextValidity should eventually contain entries for the validity of - // other nonvolatile (callee-save) registers as in - // StackFrameX86::ContextValidity, but the ppc stackwalker doesn't currently - // locate registers other than the ones listed here. - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_SRR0 = 1 << 0, - CONTEXT_VALID_GPR1 = 1 << 1, - CONTEXT_VALID_ALL = -1 - }; - - StackFramePPC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextPPC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameAMD64 : public StackFrame { - // ContextValidity has one entry for each relevant hardware pointer register - // (%rip and %rsp) and one entry for each nonvolatile (callee-save) register. - //FIXME: validate this list - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_RIP = 1 << 0, - CONTEXT_VALID_RSP = 1 << 1, - CONTEXT_VALID_RBP = 1 << 2, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextAMD64 context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -struct StackFrameSPARC : public StackFrame { - // to be confirmed - enum ContextValidity { - CONTEXT_VALID_NONE = 0, - CONTEXT_VALID_PC = 1 << 0, - CONTEXT_VALID_SP = 1 << 1, - CONTEXT_VALID_FP = 1 << 2, - CONTEXT_VALID_ALL = -1 - }; - - StackFrameSPARC() : context(), context_validity(CONTEXT_VALID_NONE) {} - - // Register state. This is only fully valid for the topmost frame in a - // stack. In other frames, the values of nonvolatile registers may be - // present, given sufficient debugging information. Refer to - // context_validity. - MDRawContextSPARC context; - - // context_validity is actually ContextValidity, but int is used because - // the OR operator doesn't work well with enumerated types. This indicates - // which fields in context are valid. - int context_validity; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stackwalker.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stackwalker.h deleted file mode 100644 index c463fd80..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/stackwalker.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker.h: Generic stackwalker. -// -// The Stackwalker class is an abstract base class providing common generic -// methods that apply to stacks from all systems. Specific implementations -// will extend this class by providing GetContextFrame and GetCallerFrame -// methods to fill in system-specific data in a StackFrame structure. -// Stackwalker assembles these StackFrame strucutres into a CallStack. -// -// Author: Mark Mentovai - - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ - -#include - -namespace google_breakpad { - -class CallStack; -class CodeModules; -template class linked_ptr; -class MemoryRegion; -class MinidumpContext; -class SourceLineResolverInterface; -struct StackFrame; -struct StackFrameInfo; -class SymbolSupplier; -class SystemInfo; - -using std::vector; - - -class Stackwalker { - public: - virtual ~Stackwalker() {} - - // Populates the given CallStack by calling GetContextFrame and - // GetCallerFrame. The frames are further processed to fill all available - // data. Returns true if the stackwalk completed, or false if it was - // interrupted by SymbolSupplier::GetSymbolFile(). - bool Walk(CallStack *stack); - - // Returns a new concrete subclass suitable for the CPU that a stack was - // generated on, according to the CPU type indicated by the context - // argument. If no suitable concrete subclass exists, returns NULL. - static Stackwalker* StackwalkerForCPU(const SystemInfo *system_info, - MinidumpContext *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - protected: - // system_info identifies the operating system, NULL or empty if unknown. - // memory identifies a MemoryRegion that provides the stack memory - // for the stack to walk. modules, if non-NULL, is a CodeModules - // object that is used to look up which code module each stack frame is - // associated with. supplier is an optional caller-supplied SymbolSupplier - // implementation. If supplier is NULL, source line info will not be - // resolved. resolver is an instance of SourceLineResolverInterface - // (see source_line_resolver_interface.h and basic_source_line_resolver.h). - // If resolver is NULL, source line info will not be resolved. - Stackwalker(const SystemInfo *system_info, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - // Information about the system that produced the minidump. Subclasses - // and the SymbolSupplier may find this information useful. - const SystemInfo *system_info_; - - // The stack memory to walk. Subclasses will require this region to - // get information from the stack. - MemoryRegion *memory_; - - // A list of modules, for populating each StackFrame's module information. - // This field is optional and may be NULL. - const CodeModules *modules_; - - private: - // Obtains the context frame, the innermost called procedure in a stack - // trace. Returns NULL on failure. GetContextFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetContextFrame() = 0; - - // Obtains a caller frame. Each call to GetCallerFrame should return the - // frame that called the last frame returned by GetContextFrame or - // GetCallerFrame. To aid this purpose, stack contains the CallStack - // made of frames that have already been walked. GetCallerFrame should - // return NULL on failure or when there are no more caller frames (when - // the end of the stack has been reached). GetCallerFrame allocates a new - // StackFrame (or StackFrame subclass), ownership of which is taken by - // the caller. - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) = 0; - - // The optional SymbolSupplier for resolving source line info. - SymbolSupplier *supplier_; - - // The SourceLineResolver implementation - SourceLineResolverInterface *resolver_; -}; - - -} // namespace google_breakpad - - -#endif // GOOGLE_BREAKPAD_PROCESSOR_STACKWALKER_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/symbol_supplier.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/symbol_supplier.h deleted file mode 100644 index 7b9d00e4..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/symbol_supplier.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The caller may implement the SymbolSupplier abstract base class -// to provide symbols for a given module. - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ - -#include - -namespace google_breakpad { - -using std::string; -class CodeModule; -class SystemInfo; - -class SymbolSupplier { - public: - // Result type for GetSymbolFile - enum SymbolResult { - // no symbols were found, but continue processing - NOT_FOUND, - - // symbols were found, and the path has been placed in symbol_file - FOUND, - - // stops processing the minidump immediately - INTERRUPT - }; - - virtual ~SymbolSupplier() {} - - // Retrieves the symbol file for the given CodeModule, placing the - // path in symbol_file if successful. system_info contains strings - // identifying the operating system and CPU; SymbolSupplier may use - // to help locate the symbol file. system_info may be NULL or its - // fields may be empty if these values are unknown. symbol_file - // must be a pointer to a valid string - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) = 0; - // Same as above, except also places symbol data into symbol_data. - // If symbol_data is NULL, the data is not returned. - // TODO(nealsid) Once we have symbol data caching behavior implemented - // investigate making all symbol suppliers implement all methods, - // and make this pure virtual - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) = 0; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/system_info.h b/thirdparty/google-breakpad/r318/src/google_breakpad/processor/system_info.h deleted file mode 100644 index fdbdbfd6..00000000 --- a/thirdparty/google-breakpad/r318/src/google_breakpad/processor/system_info.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// system_info.h: Information about the system that was running a program -// when a crash report was produced. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ -#define GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ - -#include - -namespace google_breakpad { - -using std::string; - -struct SystemInfo { - public: - SystemInfo() : os(), os_short(), os_version(), cpu(), cpu_info(), - cpu_count(0) {} - - // Resets the SystemInfo object to its default values. - void Clear() { - os.clear(); - os_short.clear(); - os_version.clear(); - cpu.clear(); - cpu_info.clear(); - cpu_count = 0; - } - - // A string identifying the operating system, such as "Windows NT", - // "Mac OS X", or "Linux". If the information is present in the dump but - // its value is unknown, this field will contain a numeric value. If - // the information is not present in the dump, this field will be empty. - string os; - - // A short form of the os string, using lowercase letters and no spaces, - // suitable for use in a filesystem. Possible values are "windows", - // "mac", and "linux". Empty if the information is not present in the dump - // or if the OS given by the dump is unknown. The values stored in this - // field should match those used by MinidumpSystemInfo::GetOS. - string os_short; - - // A string identifying the version of the operating system, such as - // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not - // contain this information, this field will be empty. - string os_version; - - // A string identifying the basic CPU family, such as "x86" or "ppc". - // If this information is present in the dump but its value is unknown, - // this field will contain a numeric value. If the information is not - // present in the dump, this field will be empty. The values stored in - // this field should match those used by MinidumpSystemInfo::GetCPU. - string cpu; - - // A string further identifying the specific CPU, such as - // "GenuineIntel level 6 model 13 stepping 8". If the information is not - // present in the dump, or additional identifying information is not - // defined for the CPU family, this field will be empty. - string cpu_info; - - // The number of processors in the system. Will be greater than one for - // multi-core systems. - int cpu_count; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/.dirstamp b/thirdparty/google-breakpad/r318/src/processor/.deps/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/address_map_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/address_map_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/address_map_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_code_modules.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/basic_code_modules.Plo deleted file mode 100644 index 79f6454d..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_code_modules.Plo +++ /dev/null @@ -1,385 +0,0 @@ -src/processor/basic_code_modules.lo src/processor/basic_code_modules.o: \ - src/processor/basic_code_modules.cc /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/sys/cdefs.h /usr/include/stdlib.h \ - /usr/include/available.h /usr/include/_types.h \ - /usr/include/sys/_types.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - src/processor/basic_code_modules.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - src/google_breakpad/processor/code_module.h \ - /usr/include/c++/4.0.0/string \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc src/processor/linked_ptr.h \ - src/processor/logging.h /usr/include/c++/4.0.0/iostream \ - /usr/include/c++/4.0.0/ostream /usr/include/c++/4.0.0/ios \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc src/processor/range_map-inl.h \ - src/processor/range_map.h /usr/include/c++/4.0.0/map \ - /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/sys/cdefs.h: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -src/processor/basic_code_modules.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -src/google_breakpad/processor/code_module.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/processor/linked_ptr.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/processor/range_map-inl.h: - -src/processor/range_map.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver.Plo deleted file mode 100644 index 1beffa48..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver.Plo +++ /dev/null @@ -1,436 +0,0 @@ -src/processor/basic_source_line_resolver.lo \ - src/processor/basic_source_line_resolver.o: \ - src/processor/basic_source_line_resolver.cc /usr/include/stdio.h \ - /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/string.h \ - /usr/include/sys/types.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/machine/endian.h /usr/include/i386/endian.h \ - /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/sys/_structs.h \ - /usr/include/sys/stat.h /usr/include/unistd.h /usr/include/sys/unistd.h \ - /usr/include/sys/select.h /usr/include/sys/_select.h \ - /usr/include/c++/4.0.0/map /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/alloca.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h \ - /usr/include/c++/4.0.0/cctype /usr/include/ctype.h \ - /usr/include/runetype.h /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - /usr/include/c++/4.0.0/utility /usr/include/c++/4.0.0/bits/stl_relops.h \ - /usr/include/c++/4.0.0/vector \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc src/processor/address_map-inl.h \ - src/processor/address_map.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/inttypes.h \ - src/processor/contained_range_map-inl.h \ - src/processor/contained_range_map.h src/processor/range_map-inl.h \ - src/processor/range_map.h \ - src/google_breakpad/processor/basic_source_line_resolver.h \ - /usr/include/c++/4.0.0/ext/hash_map \ - /usr/include/c++/4.0.0/ext/hashtable.h /usr/include/c++/4.0.0/iterator \ - /usr/include/c++/4.0.0/bits/stream_iterator.h \ - /usr/include/c++/4.0.0/ext/hash_fun.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/stack_frame.h src/processor/linked_ptr.h \ - src/processor/scoped_ptr.h src/processor/stack_frame_info.h - -/usr/include/stdio.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/string.h: - -/usr/include/sys/types.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/sys/_structs.h: - -/usr/include/sys/stat.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/alloca.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -/usr/include/c++/4.0.0/utility: - -/usr/include/c++/4.0.0/bits/stl_relops.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/processor/address_map-inl.h: - -src/processor/address_map.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/inttypes.h: - -src/processor/contained_range_map-inl.h: - -src/processor/contained_range_map.h: - -src/processor/range_map-inl.h: - -src/processor/range_map.h: - -src/google_breakpad/processor/basic_source_line_resolver.h: - -/usr/include/c++/4.0.0/ext/hash_map: - -/usr/include/c++/4.0.0/ext/hashtable.h: - -/usr/include/c++/4.0.0/iterator: - -/usr/include/c++/4.0.0/bits/stream_iterator.h: - -/usr/include/c++/4.0.0/ext/hash_fun.h: - -src/google_breakpad/processor/source_line_resolver_interface.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/processor/stack_frame.h: - -src/processor/linked_ptr.h: - -src/processor/scoped_ptr.h: - -src/processor/stack_frame_info.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/basic_source_line_resolver_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/call_stack.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/call_stack.Plo deleted file mode 100644 index 16fe559b..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/call_stack.Plo +++ /dev/null @@ -1,301 +0,0 @@ -src/processor/call_stack.lo src/processor/call_stack.o: \ - src/processor/call_stack.cc src/google_breakpad/processor/call_stack.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/stack_frame.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h - -src/google_breakpad/processor/call_stack.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/stack_frame.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/contained_range_map_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/contained_range_map_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/contained_range_map_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/logging.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/logging.Plo deleted file mode 100644 index 572dbc28..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/logging.Plo +++ /dev/null @@ -1,365 +0,0 @@ -src/processor/logging.lo src/processor/logging.o: \ - src/processor/logging.cc /usr/include/assert.h /usr/include/sys/cdefs.h \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/_types.h \ - /usr/include/sys/_types.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/errno.h /usr/include/sys/errno.h /usr/include/stdio.h \ - /usr/include/string.h /usr/include/time.h /usr/include/_structs.h \ - src/processor/logging.h /usr/include/c++/4.0.0/iostream \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/ostream /usr/include/c++/4.0.0/ios \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstring \ - /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/c++/4.0.0/cstdio \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/unistd.h /usr/include/sys/unistd.h \ - /usr/include/sys/select.h /usr/include/sys/_select.h \ - /usr/include/c++/4.0.0/cctype /usr/include/ctype.h \ - /usr/include/runetype.h /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/processor/pathname_stripper.h - -/usr/include/assert.h: - -/usr/include/sys/cdefs.h: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/errno.h: - -/usr/include/sys/errno.h: - -/usr/include/stdio.h: - -/usr/include/string.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/processor/pathname_stripper.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/minidump.Plo deleted file mode 100644 index 4214a0f8..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump.Plo +++ /dev/null @@ -1,438 +0,0 @@ -src/processor/minidump.lo src/processor/minidump.o: \ - src/processor/minidump.cc /usr/include/fcntl.h /usr/include/sys/fcntl.h \ - /usr/include/sys/_types.h /usr/include/sys/cdefs.h \ - /usr/include/machine/_types.h /usr/include/i386/_types.h \ - /usr/include/stdio.h /usr/include/_types.h /usr/include/string.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/sys/_structs.h \ - /usr/include/unistd.h /usr/include/sys/unistd.h \ - /usr/include/sys/select.h /usr/include/sys/appleapiopts.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/stdlib.h /usr/include/available.h \ - /usr/include/sys/wait.h /usr/include/sys/signal.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/machine/_structs.h \ - /usr/include/mach/i386/_structs.h /usr/include/sys/resource.h \ - /usr/include/machine/endian.h /usr/include/i386/endian.h \ - /usr/include/sys/_endian.h /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/map /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/c++/4.0.0/cctype /usr/include/ctype.h \ - /usr/include/runetype.h /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - /usr/include/c++/4.0.0/vector \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc src/processor/range_map-inl.h \ - src/processor/range_map.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/minidump.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/memory_region.h \ - src/processor/basic_code_module.h src/processor/basic_code_modules.h \ - src/processor/scoped_ptr.h - -/usr/include/fcntl.h: - -/usr/include/sys/fcntl.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/stdio.h: - -/usr/include/_types.h: - -/usr/include/string.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/processor/range_map-inl.h: - -src/processor/range_map.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/minidump.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/memory_region.h: - -src/processor/basic_code_module.h: - -src/processor/basic_code_modules.h: - -src/processor/scoped_ptr.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_dump.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_dump.Po deleted file mode 100644 index d25636e0..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_dump.Po +++ /dev/null @@ -1,420 +0,0 @@ -src/processor/minidump_dump.o src/processor/minidump_dump.o: \ - src/processor/minidump_dump.cc /usr/include/c++/4.0.0/cstdio \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h src/google_breakpad/processor/minidump.h \ - /usr/include/unistd.h /usr/include/sys/unistd.h \ - /usr/include/sys/select.h /usr/include/sys/appleapiopts.h \ - /usr/include/sys/_structs.h /usr/include/sys/_select.h \ - /usr/include/c++/4.0.0/map /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/cstring /usr/include/string.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h \ - /usr/include/c++/4.0.0/cctype /usr/include/ctype.h \ - /usr/include/runetype.h /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/memory_region.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/stdio.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -src/google_breakpad/processor/minidump.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/_structs.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/memory_region.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor.Plo deleted file mode 100644 index 47031ede..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor.Plo +++ /dev/null @@ -1,441 +0,0 @@ -src/processor/minidump_processor.lo src/processor/minidump_processor.o: \ - src/processor/minidump_processor.cc /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/sys/cdefs.h /usr/include/stdlib.h \ - /usr/include/available.h /usr/include/_types.h \ - /usr/include/sys/_types.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - src/google_breakpad/processor/minidump_processor.h \ - /usr/include/c++/4.0.0/string \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/call_stack.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/minidump.h /usr/include/c++/4.0.0/map \ - /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/process_state.h \ - src/google_breakpad/processor/system_info.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc src/processor/scoped_ptr.h \ - src/processor/stackwalker_x86.h \ - src/google_breakpad/processor/stackwalker.h - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/sys/cdefs.h: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -src/google_breakpad/processor/minidump_processor.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/call_stack.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/minidump.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/processor/process_state.h: - -src/google_breakpad/processor/system_info.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/processor/scoped_ptr.h: - -src/processor/stackwalker_x86.h: - -src/google_breakpad/processor/stackwalker.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_processor_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_stackwalk.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_stackwalk.Po deleted file mode 100644 index 9ca4ce0b..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/minidump_stackwalk.Po +++ /dev/null @@ -1,469 +0,0 @@ -src/processor/minidump_stackwalk.o src/processor/minidump_stackwalk.o: \ - src/processor/minidump_stackwalk.cc /usr/include/c++/4.0.0/cstdio \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/stdio.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/cstring /usr/include/string.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/basic_source_line_resolver.h \ - /usr/include/c++/4.0.0/ext/hash_map \ - /usr/include/c++/4.0.0/ext/hashtable.h /usr/include/c++/4.0.0/iterator \ - /usr/include/c++/4.0.0/ostream /usr/include/c++/4.0.0/ios \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc \ - /usr/include/c++/4.0.0/bits/stream_iterator.h \ - /usr/include/c++/4.0.0/ext/hash_fun.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/minidump.h /usr/include/c++/4.0.0/map \ - /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/minidump_processor.h \ - src/google_breakpad/processor/process_state.h \ - src/google_breakpad/processor/system_info.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stack_frame.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream src/processor/pathname_stripper.h \ - src/processor/scoped_ptr.h src/processor/simple_symbol_supplier.h \ - src/google_breakpad/processor/symbol_supplier.h - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/stdio.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/basic_source_line_resolver.h: - -/usr/include/c++/4.0.0/ext/hash_map: - -/usr/include/c++/4.0.0/ext/hashtable.h: - -/usr/include/c++/4.0.0/iterator: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -/usr/include/c++/4.0.0/bits/stream_iterator.h: - -/usr/include/c++/4.0.0/ext/hash_fun.h: - -src/google_breakpad/processor/source_line_resolver_interface.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/minidump.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/processor/minidump_processor.h: - -src/google_breakpad/processor/process_state.h: - -src/google_breakpad/processor/system_info.h: - -src/google_breakpad/processor/stack_frame_cpu.h: - -src/google_breakpad/processor/stack_frame.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -src/processor/pathname_stripper.h: - -src/processor/scoped_ptr.h: - -src/processor/simple_symbol_supplier.h: - -src/google_breakpad/processor/symbol_supplier.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper.Plo deleted file mode 100644 index cd28c7ae..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper.Plo +++ /dev/null @@ -1,280 +0,0 @@ -src/processor/pathname_stripper.lo src/processor/pathname_stripper.o: \ - src/processor/pathname_stripper.cc src/processor/pathname_stripper.h \ - /usr/include/c++/4.0.0/string \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc - -src/processor/pathname_stripper.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/pathname_stripper_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/postfix_evaluator_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/postfix_evaluator_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/postfix_evaluator_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/process_state.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/process_state.Plo deleted file mode 100644 index 20be5192..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/process_state.Plo +++ /dev/null @@ -1,308 +0,0 @@ -src/processor/process_state.lo src/processor/process_state.o: \ - src/processor/process_state.cc \ - src/google_breakpad/processor/process_state.h \ - /usr/include/c++/4.0.0/string \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/system_info.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_modules.h - -src/google_breakpad/processor/process_state.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/system_info.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/code_modules.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/range_map_unittest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/range_map_unittest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/range_map_unittest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/simple_symbol_supplier.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/simple_symbol_supplier.Plo deleted file mode 100644 index 5cfe3a15..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/simple_symbol_supplier.Plo +++ /dev/null @@ -1,395 +0,0 @@ -src/processor/simple_symbol_supplier.lo \ - src/processor/simple_symbol_supplier.o: \ - src/processor/simple_symbol_supplier.cc /usr/include/sys/types.h \ - /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/i386/_types.h /usr/include/sys/_types.h \ - /usr/include/machine/_types.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/sys/_structs.h \ - /usr/include/sys/stat.h /usr/include/c++/4.0.0/algorithm \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/_types.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/alloca.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/new /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits /usr/include/c++/4.0.0/iostream \ - /usr/include/c++/4.0.0/ostream /usr/include/c++/4.0.0/ios \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/string \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc /usr/include/c++/4.0.0/fstream \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/basic_file.h \ - /usr/include/c++/4.0.0/bits/fstream.tcc \ - src/processor/simple_symbol_supplier.h /usr/include/c++/4.0.0/vector \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/symbol_supplier.h \ - src/google_breakpad/processor/code_module.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/inttypes.h \ - src/google_breakpad/processor/system_info.h src/processor/logging.h \ - src/processor/pathname_stripper.h - -/usr/include/sys/types.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/sys/_structs.h: - -/usr/include/sys/stat.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/_types.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/alloca.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -/usr/include/c++/4.0.0/fstream: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/basic_file.h: - -/usr/include/c++/4.0.0/bits/fstream.tcc: - -src/processor/simple_symbol_supplier.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/symbol_supplier.h: - -src/google_breakpad/processor/code_module.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/system_info.h: - -src/processor/logging.h: - -src/processor/pathname_stripper.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker.Plo deleted file mode 100644 index 7be34939..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker.Plo +++ /dev/null @@ -1,454 +0,0 @@ -src/processor/stackwalker.lo src/processor/stackwalker.o: \ - src/processor/stackwalker.cc /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/sys/cdefs.h /usr/include/stdlib.h \ - /usr/include/available.h /usr/include/_types.h \ - /usr/include/sys/_types.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - src/google_breakpad/processor/stackwalker.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_module.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/minidump.h /usr/include/c++/4.0.0/map \ - /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/source_line_resolver_interface.h \ - src/google_breakpad/processor/stack_frame.h \ - src/google_breakpad/processor/symbol_supplier.h \ - src/processor/linked_ptr.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc src/processor/scoped_ptr.h \ - src/processor/stack_frame_info.h src/processor/stackwalker_ppc.h \ - src/processor/stackwalker_sparc.h src/processor/stackwalker_x86.h \ - src/processor/stackwalker_amd64.h - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/sys/cdefs.h: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -src/google_breakpad/processor/stackwalker.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/code_module.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/minidump.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/processor/source_line_resolver_interface.h: - -src/google_breakpad/processor/stack_frame.h: - -src/google_breakpad/processor/symbol_supplier.h: - -src/processor/linked_ptr.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/processor/scoped_ptr.h: - -src/processor/stack_frame_info.h: - -src/processor/stackwalker_ppc.h: - -src/processor/stackwalker_sparc.h: - -src/processor/stackwalker_x86.h: - -src/processor/stackwalker_amd64.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_amd64.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_amd64.Plo deleted file mode 100644 index a275c2c7..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_amd64.Plo +++ /dev/null @@ -1,414 +0,0 @@ -src/processor/stackwalker_amd64.lo src/processor/stackwalker_amd64.o: \ - src/processor/stackwalker_amd64.cc src/processor/stackwalker_amd64.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/i386/_types.h /usr/include/sys/_types.h \ - /usr/include/machine/_types.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/sys/_structs.h \ - /usr/include/inttypes.h /usr/include/_types.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - src/google_breakpad/common/minidump_format.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/stackwalker.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/include/string.h /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/alloca.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stack_frame.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc - -src/processor/stackwalker_amd64.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/sys/_structs.h: - -/usr/include/inttypes.h: - -/usr/include/_types.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -src/google_breakpad/common/minidump_format.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/stackwalker.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/alloca.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/processor/stack_frame_cpu.h: - -src/google_breakpad/processor/stack_frame.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_ppc.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_ppc.Plo deleted file mode 100644 index c18f5722..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_ppc.Plo +++ /dev/null @@ -1,414 +0,0 @@ -src/processor/stackwalker_ppc.lo src/processor/stackwalker_ppc.o: \ - src/processor/stackwalker_ppc.cc src/processor/stackwalker_ppc.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/sys/appleapiopts.h /usr/include/sys/cdefs.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/i386/_types.h /usr/include/sys/_types.h \ - /usr/include/machine/_types.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/sys/_structs.h \ - /usr/include/inttypes.h /usr/include/_types.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - src/google_breakpad/common/minidump_format.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/stackwalker.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/include/string.h /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/alloca.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stack_frame.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc - -src/processor/stackwalker_ppc.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/i386/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/sys/_structs.h: - -/usr/include/inttypes.h: - -/usr/include/_types.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -src/google_breakpad/common/minidump_format.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/stackwalker.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/alloca.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/processor/stack_frame_cpu.h: - -src/google_breakpad/processor/stack_frame.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_selftest.Po b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_selftest.Po deleted file mode 100644 index 9ce06a81..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_selftest.Po +++ /dev/null @@ -1 +0,0 @@ -# dummy diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_sparc.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_sparc.Plo deleted file mode 100644 index e2afb958..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_sparc.Plo +++ /dev/null @@ -1,415 +0,0 @@ -src/processor/stackwalker_sparc.lo src/processor/stackwalker_sparc.o: \ - src/processor/stackwalker_sparc.cc \ - src/google_breakpad/processor/call_stack.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/cstring /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/_types.h /usr/include/sys/_types.h \ - /usr/include/sys/cdefs.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \ - /usr/include/machine/signal.h /usr/include/i386/signal.h \ - /usr/include/i386/_structs.h /usr/include/sys/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/unistd.h \ - /usr/include/sys/unistd.h /usr/include/sys/select.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/stack_frame.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/ostream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/bits/istream.tcc \ - src/processor/stackwalker_sparc.h \ - src/google_breakpad/processor/stackwalker.h - -src/google_breakpad/processor/call_stack.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/sys/cdefs.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/google_breakpad/processor/stack_frame_cpu.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/stack_frame.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -src/processor/stackwalker_sparc.h: - -src/google_breakpad/processor/stackwalker.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_x86.Plo b/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_x86.Plo deleted file mode 100644 index 64d30066..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/.deps/stackwalker_x86.Plo +++ /dev/null @@ -1,446 +0,0 @@ -src/processor/stackwalker_x86.lo src/processor/stackwalker_x86.o: \ - src/processor/stackwalker_x86.cc src/processor/postfix_evaluator-inl.h \ - /usr/include/c++/4.0.0/sstream /usr/include/c++/4.0.0/istream \ - /usr/include/c++/4.0.0/ios /usr/include/c++/4.0.0/iosfwd \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h \ - /usr/include/c++/4.0.0/clocale /usr/include/locale.h \ - /usr/include/_locale.h /usr/include/sys/cdefs.h /usr/include/_types.h \ - /usr/include/sys/_types.h /usr/include/machine/_types.h \ - /usr/include/i386/_types.h /usr/include/c++/4.0.0/cstring \ - /usr/include/c++/4.0.0/cstddef \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h \ - /usr/include/string.h /usr/include/c++/4.0.0/cstdio \ - /usr/include/stdio.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h \ - /usr/include/pthread.h /usr/include/pthread_impl.h /usr/include/sched.h \ - /usr/include/time.h /usr/include/_structs.h /usr/include/sys/_structs.h \ - /usr/include/unistd.h /usr/include/sys/unistd.h \ - /usr/include/sys/select.h /usr/include/sys/appleapiopts.h \ - /usr/include/sys/_select.h /usr/include/c++/4.0.0/cctype \ - /usr/include/ctype.h /usr/include/runetype.h \ - /usr/include/c++/4.0.0/bits/stringfwd.h \ - /usr/include/c++/4.0.0/bits/postypes.h /usr/include/c++/4.0.0/cwchar \ - /usr/include/c++/4.0.0/ctime /usr/include/wchar.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h \ - /usr/include/_wctype.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h \ - /usr/include/c++/4.0.0/bits/functexcept.h \ - /usr/include/c++/4.0.0/exception_defines.h \ - /usr/include/c++/4.0.0/exception \ - /usr/include/c++/4.0.0/bits/char_traits.h \ - /usr/include/c++/4.0.0/bits/stl_algobase.h \ - /usr/include/c++/4.0.0/climits \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h \ - /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h \ - /usr/include/limits.h /usr/include/machine/limits.h \ - /usr/include/i386/limits.h /usr/include/i386/_limits.h \ - /usr/include/sys/syslimits.h /usr/include/c++/4.0.0/cstdlib \ - /usr/include/stdlib.h /usr/include/available.h /usr/include/sys/wait.h \ - /usr/include/sys/signal.h /usr/include/machine/signal.h \ - /usr/include/i386/signal.h /usr/include/i386/_structs.h \ - /usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \ - /usr/include/sys/resource.h /usr/include/machine/endian.h \ - /usr/include/i386/endian.h /usr/include/sys/_endian.h \ - /usr/include/libkern/_OSByteOrder.h \ - /usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \ - /usr/include/machine/types.h /usr/include/i386/types.h \ - /usr/include/c++/4.0.0/bits/stl_pair.h \ - /usr/include/c++/4.0.0/bits/cpp_type_traits.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_types.h \ - /usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h \ - /usr/include/c++/4.0.0/bits/concept_check.h \ - /usr/include/c++/4.0.0/bits/stl_iterator.h \ - /usr/include/c++/4.0.0/debug/debug.h /usr/include/c++/4.0.0/cassert \ - /usr/include/assert.h /usr/include/c++/4.0.0/bits/localefwd.h \ - /usr/include/c++/4.0.0/bits/ios_base.h \ - /usr/include/c++/4.0.0/bits/atomicity.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h \ - /usr/include/c++/4.0.0/bits/locale_classes.h \ - /usr/include/c++/4.0.0/string /usr/include/c++/4.0.0/memory \ - /usr/include/c++/4.0.0/bits/allocator.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h \ - /usr/include/c++/4.0.0/ext/new_allocator.h /usr/include/c++/4.0.0/new \ - /usr/include/c++/4.0.0/bits/stl_construct.h \ - /usr/include/c++/4.0.0/bits/stl_uninitialized.h \ - /usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h \ - /usr/include/c++/4.0.0/limits \ - /usr/include/c++/4.0.0/bits/stl_function.h \ - /usr/include/c++/4.0.0/bits/basic_string.h \ - /usr/include/c++/4.0.0/algorithm /usr/include/c++/4.0.0/bits/stl_algo.h \ - /usr/include/c++/4.0.0/bits/stl_heap.h \ - /usr/include/c++/4.0.0/bits/stl_tempbuf.h \ - /usr/include/c++/4.0.0/bits/basic_string.tcc \ - /usr/include/c++/4.0.0/streambuf \ - /usr/include/c++/4.0.0/bits/streambuf.tcc \ - /usr/include/c++/4.0.0/bits/basic_ios.h \ - /usr/include/c++/4.0.0/bits/streambuf_iterator.h \ - /usr/include/c++/4.0.0/bits/locale_facets.h \ - /usr/include/c++/4.0.0/cwctype /usr/include/wctype.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h \ - /usr/include/c++/4.0.0/bits/codecvt.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h \ - /usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h \ - /usr/include/c++/4.0.0/bits/basic_ios.tcc \ - /usr/include/c++/4.0.0/bits/istream.tcc /usr/include/c++/4.0.0/locale \ - /usr/include/c++/4.0.0/bits/locale_facets.tcc \ - /usr/include/c++/4.0.0/typeinfo /usr/include/c++/4.0.0/ostream \ - /usr/include/c++/4.0.0/bits/ostream.tcc \ - /usr/include/c++/4.0.0/bits/sstream.tcc \ - src/processor/postfix_evaluator.h /usr/include/c++/4.0.0/map \ - /usr/include/c++/4.0.0/bits/stl_tree.h \ - /usr/include/c++/4.0.0/bits/stl_map.h \ - /usr/include/c++/4.0.0/bits/stl_multimap.h \ - /usr/include/c++/4.0.0/vector /usr/include/c++/4.0.0/bits/stl_vector.h \ - /usr/include/c++/4.0.0/bits/stl_bvector.h \ - /usr/include/c++/4.0.0/bits/vector.tcc \ - src/google_breakpad/processor/memory_region.h \ - src/google_breakpad/common/breakpad_types.h /usr/include/sys/types.h \ - /usr/include/inttypes.h src/processor/logging.h \ - /usr/include/c++/4.0.0/iostream src/processor/stackwalker_x86.h \ - src/google_breakpad/common/minidump_format.h \ - src/google_breakpad/common/minidump_cpu_sparc.h \ - src/google_breakpad/common/minidump_cpu_x86.h \ - src/google_breakpad/common/minidump_cpu_ppc.h \ - src/google_breakpad/common/minidump_cpu_ppc64.h \ - src/google_breakpad/common/minidump_cpu_amd64.h \ - src/google_breakpad/common/minidump_exception_win32.h \ - src/google_breakpad/common/minidump_exception_mac.h \ - src/google_breakpad/common/minidump_exception_linux.h \ - src/google_breakpad/common/minidump_exception_solaris.h \ - src/google_breakpad/processor/stackwalker.h \ - src/google_breakpad/processor/call_stack.h \ - src/google_breakpad/processor/code_modules.h \ - src/google_breakpad/processor/stack_frame_cpu.h \ - src/google_breakpad/processor/stack_frame.h src/processor/linked_ptr.h \ - src/processor/stack_frame_info.h - -src/processor/postfix_evaluator-inl.h: - -/usr/include/c++/4.0.0/sstream: - -/usr/include/c++/4.0.0/istream: - -/usr/include/c++/4.0.0/ios: - -/usr/include/c++/4.0.0/iosfwd: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++config.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/os_defines.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: - -/usr/include/c++/4.0.0/clocale: - -/usr/include/locale.h: - -/usr/include/_locale.h: - -/usr/include/sys/cdefs.h: - -/usr/include/_types.h: - -/usr/include/sys/_types.h: - -/usr/include/machine/_types.h: - -/usr/include/i386/_types.h: - -/usr/include/c++/4.0.0/cstring: - -/usr/include/c++/4.0.0/cstddef: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stddef.h: - -/usr/include/string.h: - -/usr/include/c++/4.0.0/cstdio: - -/usr/include/stdio.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++io.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/gthr-default.h: - -/usr/include/pthread.h: - -/usr/include/pthread_impl.h: - -/usr/include/sched.h: - -/usr/include/time.h: - -/usr/include/_structs.h: - -/usr/include/sys/_structs.h: - -/usr/include/unistd.h: - -/usr/include/sys/unistd.h: - -/usr/include/sys/select.h: - -/usr/include/sys/appleapiopts.h: - -/usr/include/sys/_select.h: - -/usr/include/c++/4.0.0/cctype: - -/usr/include/ctype.h: - -/usr/include/runetype.h: - -/usr/include/c++/4.0.0/bits/stringfwd.h: - -/usr/include/c++/4.0.0/bits/postypes.h: - -/usr/include/c++/4.0.0/cwchar: - -/usr/include/c++/4.0.0/ctime: - -/usr/include/wchar.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h: - -/usr/include/_wctype.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdint.h: - -/usr/include/c++/4.0.0/bits/functexcept.h: - -/usr/include/c++/4.0.0/exception_defines.h: - -/usr/include/c++/4.0.0/exception: - -/usr/include/c++/4.0.0/bits/char_traits.h: - -/usr/include/c++/4.0.0/bits/stl_algobase.h: - -/usr/include/c++/4.0.0/climits: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h: - -/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/syslimits.h: - -/usr/include/limits.h: - -/usr/include/machine/limits.h: - -/usr/include/i386/limits.h: - -/usr/include/i386/_limits.h: - -/usr/include/sys/syslimits.h: - -/usr/include/c++/4.0.0/cstdlib: - -/usr/include/stdlib.h: - -/usr/include/available.h: - -/usr/include/sys/wait.h: - -/usr/include/sys/signal.h: - -/usr/include/machine/signal.h: - -/usr/include/i386/signal.h: - -/usr/include/i386/_structs.h: - -/usr/include/machine/_structs.h: - -/usr/include/mach/i386/_structs.h: - -/usr/include/sys/resource.h: - -/usr/include/machine/endian.h: - -/usr/include/i386/endian.h: - -/usr/include/sys/_endian.h: - -/usr/include/libkern/_OSByteOrder.h: - -/usr/include/libkern/i386/_OSByteOrder.h: - -/usr/include/alloca.h: - -/usr/include/machine/types.h: - -/usr/include/i386/types.h: - -/usr/include/c++/4.0.0/bits/stl_pair.h: - -/usr/include/c++/4.0.0/bits/cpp_type_traits.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_types.h: - -/usr/include/c++/4.0.0/bits/stl_iterator_base_funcs.h: - -/usr/include/c++/4.0.0/bits/concept_check.h: - -/usr/include/c++/4.0.0/bits/stl_iterator.h: - -/usr/include/c++/4.0.0/debug/debug.h: - -/usr/include/c++/4.0.0/cassert: - -/usr/include/assert.h: - -/usr/include/c++/4.0.0/bits/localefwd.h: - -/usr/include/c++/4.0.0/bits/ios_base.h: - -/usr/include/c++/4.0.0/bits/atomicity.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/atomic_word.h: - -/usr/include/c++/4.0.0/bits/locale_classes.h: - -/usr/include/c++/4.0.0/string: - -/usr/include/c++/4.0.0/memory: - -/usr/include/c++/4.0.0/bits/allocator.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++allocator.h: - -/usr/include/c++/4.0.0/ext/new_allocator.h: - -/usr/include/c++/4.0.0/new: - -/usr/include/c++/4.0.0/bits/stl_construct.h: - -/usr/include/c++/4.0.0/bits/stl_uninitialized.h: - -/usr/include/c++/4.0.0/bits/stl_raw_storage_iter.h: - -/usr/include/c++/4.0.0/limits: - -/usr/include/c++/4.0.0/bits/stl_function.h: - -/usr/include/c++/4.0.0/bits/basic_string.h: - -/usr/include/c++/4.0.0/algorithm: - -/usr/include/c++/4.0.0/bits/stl_algo.h: - -/usr/include/c++/4.0.0/bits/stl_heap.h: - -/usr/include/c++/4.0.0/bits/stl_tempbuf.h: - -/usr/include/c++/4.0.0/bits/basic_string.tcc: - -/usr/include/c++/4.0.0/streambuf: - -/usr/include/c++/4.0.0/bits/streambuf.tcc: - -/usr/include/c++/4.0.0/bits/basic_ios.h: - -/usr/include/c++/4.0.0/bits/streambuf_iterator.h: - -/usr/include/c++/4.0.0/bits/locale_facets.h: - -/usr/include/c++/4.0.0/cwctype: - -/usr/include/wctype.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_base.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/ctype_inline.h: - -/usr/include/c++/4.0.0/bits/codecvt.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: - -/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: - -/usr/include/c++/4.0.0/bits/basic_ios.tcc: - -/usr/include/c++/4.0.0/bits/istream.tcc: - -/usr/include/c++/4.0.0/locale: - -/usr/include/c++/4.0.0/bits/locale_facets.tcc: - -/usr/include/c++/4.0.0/typeinfo: - -/usr/include/c++/4.0.0/ostream: - -/usr/include/c++/4.0.0/bits/ostream.tcc: - -/usr/include/c++/4.0.0/bits/sstream.tcc: - -src/processor/postfix_evaluator.h: - -/usr/include/c++/4.0.0/map: - -/usr/include/c++/4.0.0/bits/stl_tree.h: - -/usr/include/c++/4.0.0/bits/stl_map.h: - -/usr/include/c++/4.0.0/bits/stl_multimap.h: - -/usr/include/c++/4.0.0/vector: - -/usr/include/c++/4.0.0/bits/stl_vector.h: - -/usr/include/c++/4.0.0/bits/stl_bvector.h: - -/usr/include/c++/4.0.0/bits/vector.tcc: - -src/google_breakpad/processor/memory_region.h: - -src/google_breakpad/common/breakpad_types.h: - -/usr/include/sys/types.h: - -/usr/include/inttypes.h: - -src/processor/logging.h: - -/usr/include/c++/4.0.0/iostream: - -src/processor/stackwalker_x86.h: - -src/google_breakpad/common/minidump_format.h: - -src/google_breakpad/common/minidump_cpu_sparc.h: - -src/google_breakpad/common/minidump_cpu_x86.h: - -src/google_breakpad/common/minidump_cpu_ppc.h: - -src/google_breakpad/common/minidump_cpu_ppc64.h: - -src/google_breakpad/common/minidump_cpu_amd64.h: - -src/google_breakpad/common/minidump_exception_win32.h: - -src/google_breakpad/common/minidump_exception_mac.h: - -src/google_breakpad/common/minidump_exception_linux.h: - -src/google_breakpad/common/minidump_exception_solaris.h: - -src/google_breakpad/processor/stackwalker.h: - -src/google_breakpad/processor/call_stack.h: - -src/google_breakpad/processor/code_modules.h: - -src/google_breakpad/processor/stack_frame_cpu.h: - -src/google_breakpad/processor/stack_frame.h: - -src/processor/linked_ptr.h: - -src/processor/stack_frame_info.h: diff --git a/thirdparty/google-breakpad/r318/src/processor/.dirstamp b/thirdparty/google-breakpad/r318/src/processor/.dirstamp deleted file mode 100644 index e69de29b..00000000 diff --git a/thirdparty/google-breakpad/r318/src/processor/address_map-inl.h b/thirdparty/google-breakpad/r318/src/processor/address_map-inl.h deleted file mode 100644 index d88b4fcc..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/address_map-inl.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map-inl.h: Address map implementation. -// -// See address_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_INL_H__ -#define PROCESSOR_ADDRESS_MAP_INL_H__ - -#include - -#include "processor/address_map.h" -#include "processor/logging.h" - -namespace google_breakpad { - -template -bool AddressMap::Store(const AddressType &address, - const EntryType &entry) { - // Ensure that the specified address doesn't conflict with something already - // in the map. - if (map_.find(address) != map_.end()) { - BPLOG(INFO) << "Store failed, address " << HexString(address) << - " is already present"; - return false; - } - - map_.insert(MapValue(address, entry)); - return true; -} - -template -bool AddressMap::Retrieve( - const AddressType &address, - EntryType *entry, AddressType *entry_address) const { - BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|"; - assert(entry); - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second; - if (entry_address) - *entry_address = iterator->first; - - return true; -} - -template -void AddressMap::Clear() { - map_.clear(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/address_map.h b/thirdparty/google-breakpad/r318/src/processor/address_map.h deleted file mode 100644 index 14139e7a..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/address_map.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map.h: Address maps. -// -// An address map contains a set of objects keyed by address. Objects are -// retrieved from the map by returning the object with the highest key less -// than or equal to the lookup key. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_ADDRESS_MAP_H__ -#define PROCESSOR_ADDRESS_MAP_H__ - -#include - -namespace google_breakpad { - -template -class AddressMap { - public: - AddressMap() : map_() {} - - // Inserts an entry into the map. Returns false without storing the entry - // if an entry is already stored in the map at the same address as specified - // by the address argument. - bool Store(const AddressType &address, const EntryType &entry); - - // Locates the entry stored at the highest address less than or equal to - // the address argument. If there is no such range, returns false. The - // entry is returned in entry, which is a required argument. If - // entry_address is not NULL, it will be set to the address that the entry - // was stored at. - bool Retrieve(const AddressType &address, - EntryType *entry, AddressType *entry_address) const; - - // Empties the address map, restoring it to the same state as when it was - // initially created. - void Clear(); - - private: - // Convenience types. - typedef std::map AddressToEntryMap; - typedef typename AddressToEntryMap::const_iterator MapConstIterator; - typedef typename AddressToEntryMap::value_type MapValue; - - // Maps the address of each entry to an EntryType. - AddressToEntryMap map_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_ADDRESS_MAP_H__ - diff --git a/thirdparty/google-breakpad/r318/src/processor/address_map_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/address_map_unittest.cc deleted file mode 100644 index f64a8984..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/address_map_unittest.cc +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// address_map_unittest.cc: Unit tests for AddressMap. -// -// Author: Mark Mentovai - -#include -#include - -#include "processor/address_map-inl.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(condition) ASSERT_TRUE(!(condition)) - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -namespace { - -using google_breakpad::AddressMap; -using google_breakpad::linked_ptr; - -// A CountedObject holds an int. A global (not thread safe!) count of -// allocated CountedObjects is maintained to help test memory management. -class CountedObject { - public: - explicit CountedObject(int id) : id_(id) { ++count_; } - ~CountedObject() { --count_; } - - static int count() { return count_; } - int id() const { return id_; } - - private: - static int count_; - int id_; -}; - -int CountedObject::count_; - -typedef int AddressType; -typedef AddressMap< AddressType, linked_ptr > TestMap; - -static bool DoAddressMapTest() { - ASSERT_EQ(CountedObject::count(), 0); - - TestMap test_map; - linked_ptr entry; - AddressType address; - - // Check that a new map is truly empty. - ASSERT_FALSE(test_map.Retrieve(0, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MIN, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MAX, &entry, &address)); - - // Check that Clear clears the map without leaking. - ASSERT_EQ(CountedObject::count(), 0); - ASSERT_TRUE(test_map.Store(1, - linked_ptr(new CountedObject(0)))); - ASSERT_TRUE(test_map.Retrieve(1, &entry, &address)); - ASSERT_EQ(CountedObject::count(), 1); - test_map.Clear(); - ASSERT_EQ(CountedObject::count(), 1); // still holding entry in this scope - - // Check that a cleared map is truly empty. - ASSERT_FALSE(test_map.Retrieve(0, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MIN, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(INT_MAX, &entry, &address)); - - // Check a single-element map. - ASSERT_TRUE(test_map.Store(10, - linked_ptr(new CountedObject(1)))); - ASSERT_FALSE(test_map.Retrieve(9, &entry, &address)); - ASSERT_TRUE(test_map.Retrieve(10, &entry, &address)); - ASSERT_EQ(CountedObject::count(), 1); - ASSERT_EQ(entry->id(), 1); - ASSERT_EQ(address, 10); - ASSERT_TRUE(test_map.Retrieve(11, &entry, &address)); - ASSERT_TRUE(test_map.Retrieve(11, &entry, NULL)); // NULL ok here - - // Add some more elements. - ASSERT_TRUE(test_map.Store(5, - linked_ptr(new CountedObject(2)))); - ASSERT_EQ(CountedObject::count(), 2); - ASSERT_TRUE(test_map.Store(20, - linked_ptr(new CountedObject(3)))); - ASSERT_TRUE(test_map.Store(15, - linked_ptr(new CountedObject(4)))); - ASSERT_FALSE(test_map.Store(10, - linked_ptr(new CountedObject(5)))); // already in map - ASSERT_TRUE(test_map.Store(16, - linked_ptr(new CountedObject(6)))); - ASSERT_TRUE(test_map.Store(14, - linked_ptr(new CountedObject(7)))); - - // Nothing was stored with a key under 5. Don't use ASSERT inside loops - // because it won't show exactly which key/entry/address failed. - for (AddressType key = 0; key < 5; ++key) { - if (test_map.Retrieve(key, &entry, &address)) { - fprintf(stderr, - "FAIL: retrieve %d expected false observed true @ %s:%d\n", - key, __FILE__, __LINE__); - return false; - } - } - - // Check everything that was stored. - const int id_verify[] = { 0, 0, 0, 0, 0, // unused - 2, 2, 2, 2, 2, // 5 - 9 - 1, 1, 1, 1, 7, // 10 - 14 - 4, 6, 6, 6, 6, // 15 - 19 - 3, 3, 3, 3, 3, // 20 - 24 - 3, 3, 3, 3, 3 }; // 25 - 29 - const AddressType address_verify[] = { 0, 0, 0, 0, 0, // unused - 5, 5, 5, 5, 5, // 5 - 9 - 10, 10, 10, 10, 14, // 10 - 14 - 15, 16, 16, 16, 16, // 15 - 19 - 20, 20, 20, 20, 20, // 20 - 24 - 20, 20, 20, 20, 20 }; // 25 - 29 - - for (AddressType key = 5; key < 30; ++key) { - if (!test_map.Retrieve(key, &entry, &address)) { - fprintf(stderr, - "FAIL: retrieve %d expected true observed false @ %s:%d\n", - key, __FILE__, __LINE__); - return false; - } - if (entry->id() != id_verify[key]) { - fprintf(stderr, - "FAIL: retrieve %d expected entry %d observed %d @ %s:%d\n", - key, id_verify[key], entry->id(), __FILE__, __LINE__); - return false; - } - if (address != address_verify[key]) { - fprintf(stderr, - "FAIL: retrieve %d expected address %d observed %d @ %s:%d\n", - key, address_verify[key], address, __FILE__, __LINE__); - return false; - } - } - - // The stored objects should still be in the map. - ASSERT_EQ(CountedObject::count(), 6); - - return true; -} - -static bool RunTests() { - if (!DoAddressMapTest()) - return false; - - // Leak check. - ASSERT_EQ(CountedObject::count(), 0); - - return true; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/basic_code_module.h b/thirdparty/google-breakpad/r318/src/processor/basic_code_module.h deleted file mode 100644 index 5c9f75f1..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/basic_code_module.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_module.h: Carries information about code modules that are loaded -// into a process. -// -// This is a basic concrete implementation of CodeModule. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModule interface. It exists to provide a CodeModule implementation -// a place to store information when the life of the original object (such as -// a MinidumpModule) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULE_H__ -#define PROCESSOR_BASIC_CODE_MODULE_H__ - -#include - -#include "google_breakpad/processor/code_module.h" - -namespace google_breakpad { - -using std::string; - -class BasicCodeModule : public CodeModule { - public: - // Creates a new BasicCodeModule given any existing CodeModule - // implementation. This is useful to make a copy of the data relevant to - // the CodeModule interface without requiring all of the resources that - // other CodeModule implementations may require. - explicit BasicCodeModule(const CodeModule *that) - : base_address_(that->base_address()), - size_(that->size()), - code_file_(that->code_file()), - code_identifier_(that->code_identifier()), - debug_file_(that->debug_file()), - debug_identifier_(that->debug_identifier()), - version_(that->version()) {} - virtual ~BasicCodeModule() {} - - // See code_module.h for descriptions of these methods and the associated - // members. - virtual u_int64_t base_address() const { return base_address_; } - virtual u_int64_t size() const { return size_; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return code_identifier_; } - virtual string debug_file() const { return debug_file_; } - virtual string debug_identifier() const { return debug_identifier_; } - virtual string version() const { return version_; } - virtual const CodeModule* Copy() const { return new BasicCodeModule(this); } - - private: - u_int64_t base_address_; - u_int64_t size_; - string code_file_; - string code_identifier_; - string debug_file_; - string debug_identifier_; - string version_; - - // Disallow copy constructor and assignment operator. - BasicCodeModule(const BasicCodeModule &that); - void operator=(const BasicCodeModule &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULE_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.cc b/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.cc deleted file mode 100644 index a21491c4..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.cc +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_modules.cc: Contains all of the CodeModule objects that -// were loaded into a single process. -// -// See basic_code_modules.h for documentation. -// -// Author: Mark Mentovai - -#include - -#include "processor/basic_code_modules.h" -#include "google_breakpad/processor/code_module.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/range_map-inl.h" - -namespace google_breakpad { - -BasicCodeModules::BasicCodeModules(const CodeModules *that) - : main_address_(0), - map_(new RangeMap >()) { - BPLOG_IF(ERROR, !that) << "BasicCodeModules::BasicCodeModules requires " - "|that|"; - assert(that); - - const CodeModule *main_module = that->GetMainModule(); - if (main_module) - main_address_ = main_module->base_address(); - - unsigned int count = that->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < count; - ++module_sequence) { - // Make a copy of the module and insert it into the map. Use - // GetModuleAtIndex because ordering is unimportant when slurping the - // entire list, and GetModuleAtIndex may be faster than - // GetModuleAtSequence. - const CodeModule *module = that->GetModuleAtIndex(module_sequence)->Copy(); - if (!map_->StoreRange(module->base_address(), module->size(), - linked_ptr(module))) { - BPLOG(ERROR) << "Module " << module->code_file() << - " could not be stored"; - } - } -} - -BasicCodeModules::~BasicCodeModules() { - delete map_; -} - -unsigned int BasicCodeModules::module_count() const { - return map_->GetCount(); -} - -const CodeModule* BasicCodeModules::GetModuleForAddress( - u_int64_t address) const { - linked_ptr module; - if (!map_->RetrieveRange(address, &module, NULL, NULL)) { - BPLOG(INFO) << "No module at " << HexString(address); - return NULL; - } - - return module.get(); -} - -const CodeModule* BasicCodeModules::GetMainModule() const { - return GetModuleForAddress(main_address_); -} - -const CodeModule* BasicCodeModules::GetModuleAtSequence( - unsigned int sequence) const { - linked_ptr module; - if (!map_->RetrieveRangeAtIndex(sequence, &module, NULL, NULL)) { - BPLOG(ERROR) << "RetrieveRangeAtIndex failed for sequence " << sequence; - return NULL; - } - - return module.get(); -} - -const CodeModule* BasicCodeModules::GetModuleAtIndex( - unsigned int index) const { - // This class stores everything in a RangeMap, without any more-efficient - // way to walk the list of CodeModule objects. Implement GetModuleAtIndex - // using GetModuleAtSequence, which meets all of the requirements, and - // in addition, guarantees ordering. - return GetModuleAtSequence(index); -} - -const CodeModules* BasicCodeModules::Copy() const { - return new BasicCodeModules(this); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.h b/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.h deleted file mode 100644 index df87fc49..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/basic_code_modules.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// basic_code_modules.h: Contains all of the CodeModule objects that -// were loaded into a single process. -// -// This is a basic concrete implementation of CodeModules. It cannot be -// instantiated directly, only based on other objects that implement -// the CodeModules interface. It exists to provide a CodeModules -// implementation a place to store information when the life of the original -// object (such as a MinidumpModuleList) cannot be guaranteed. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_BASIC_CODE_MODULES_H__ -#define PROCESSOR_BASIC_CODE_MODULES_H__ - -#include "google_breakpad/processor/code_modules.h" - -namespace google_breakpad { - -template class linked_ptr; -template class RangeMap; - -class BasicCodeModules : public CodeModules { - public: - // Creates a new BasicCodeModules object given any existing CodeModules - // implementation. This is useful to make a copy of the data relevant to - // the CodeModules and CodeModule interfaces without requiring all of the - // resources that other implementations may require. A copy will be - // made of each contained CodeModule using CodeModule::Copy. - explicit BasicCodeModules(const CodeModules *that); - - virtual ~BasicCodeModules(); - - // See code_modules.h for descriptions of these methods. - virtual unsigned int module_count() const; - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const; - virtual const CodeModule* GetMainModule() const; - virtual const CodeModule* GetModuleAtSequence(unsigned int sequence) const; - virtual const CodeModule* GetModuleAtIndex(unsigned int index) const; - virtual const CodeModules* Copy() const; - - private: - // The base address of the main module. - u_int64_t main_address_; - - // The map used to contain each CodeModule, keyed by each CodeModule's - // address range. - RangeMap > *map_; - - // Disallow copy constructor and assignment operator. - BasicCodeModules(const BasicCodeModules &that); - void operator=(const BasicCodeModules &that); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_BASIC_CODE_MODULES_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver.cc b/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver.cc deleted file mode 100644 index bba86599..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver.cc +++ /dev/null @@ -1,714 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "processor/address_map-inl.h" -#include "processor/contained_range_map-inl.h" -#include "processor/range_map-inl.h" - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/stack_frame.h" -#include "processor/linked_ptr.h" -#include "processor/scoped_ptr.h" -#include "processor/stack_frame_info.h" - -using std::map; -using std::vector; -using std::make_pair; -#ifndef BSLR_NO_HASH_MAP -using __gnu_cxx::hash; -#endif // BSLR_NO_HASH_MAP - -namespace google_breakpad { - -struct BasicSourceLineResolver::Line { - Line(MemAddr addr, MemAddr code_size, int file_id, int source_line) - : address(addr) - , size(code_size) - , source_file_id(file_id) - , line(source_line) { } - - MemAddr address; - MemAddr size; - int source_file_id; - int line; -}; - -struct BasicSourceLineResolver::Function { - Function(const string &function_name, - MemAddr function_address, - MemAddr code_size, - int set_parameter_size) - : name(function_name), address(function_address), size(code_size), - parameter_size(set_parameter_size) { } - - string name; - MemAddr address; - MemAddr size; - - // The size of parameters passed to this function on the stack. - int parameter_size; - - RangeMap< MemAddr, linked_ptr > lines; -}; - -struct BasicSourceLineResolver::PublicSymbol { - PublicSymbol(const string& set_name, - MemAddr set_address, - int set_parameter_size) - : name(set_name), - address(set_address), - parameter_size(set_parameter_size) {} - - string name; - MemAddr address; - - // If the public symbol is used as a function entry point, parameter_size - // is set to the size of the parameters passed to the funciton on the - // stack, if known. - int parameter_size; -}; - -class BasicSourceLineResolver::Module { - public: - Module(const string &name) : name_(name) { } - - // Loads the given map file, returning true on success. Reads the - // map file into memory and calls LoadMapFromBuffer - bool LoadMap(const string &map_file); - - // Loads a map from the given buffer, returning true on success - bool LoadMapFromBuffer(const string &map_buffer); - - // Looks up the given relative address, and fills the StackFrame struct - // with the result. Additional debugging information, if available, is - // returned. If no additional information is available, returns NULL. - // A NULL return value is not an error. The caller takes ownership of - // any returned StackFrameInfo object. - StackFrameInfo* LookupAddress(StackFrame *frame) const; - - private: - friend class BasicSourceLineResolver; -#ifdef BSLR_NO_HASH_MAP - typedef map FileMap; -#else // BSLR_NO_HASH_MAP - typedef hash_map FileMap; -#endif // BSLR_NO_HASH_MAP - - // The types for stack_info_. This is equivalent to MS DIA's - // StackFrameTypeEnum. Each identifies a different type of frame - // information, although all are represented in the symbol file in the - // same format. These are used as indices to the stack_info_ array. - enum StackInfoTypes { - STACK_INFO_FPO = 0, - STACK_INFO_TRAP, // not used here - STACK_INFO_TSS, // not used here - STACK_INFO_STANDARD, - STACK_INFO_FRAME_DATA, - STACK_INFO_LAST, // must be the last sequentially-numbered item - STACK_INFO_UNKNOWN = -1 - }; - - // Splits line into at most max_tokens space-separated tokens, placing - // them in the tokens vector. line is a 0-terminated string that - // optionally ends with a newline character or combination, which will - // be removed. line must not contain any embedded '\n' or '\r' characters. - // If more tokens than max_tokens are present, the final token is placed - // into the vector without splitting it up at all. This modifies line as - // a side effect. Returns true if exactly max_tokens tokens are returned, - // and false if fewer are returned. This is not considered a failure of - // Tokenize, but may be treated as a failure if the caller expects an - // exact, as opposed to maximum, number of tokens. - static bool Tokenize(char *line, int max_tokens, vector *tokens); - - // Parses a file declaration - bool ParseFile(char *file_line); - - // Parses a function declaration, returning a new Function object. - Function* ParseFunction(char *function_line); - - // Parses a line declaration, returning a new Line object. - Line* ParseLine(char *line_line); - - // Parses a PUBLIC symbol declaration, storing it in public_symbols_. - // Returns false if an error occurs. - bool ParsePublicSymbol(char *public_line); - - // Parses a stack frame info declaration, storing it in stack_info_. - bool ParseStackInfo(char *stack_info_line); - - string name_; - FileMap files_; - RangeMap< MemAddr, linked_ptr > functions_; - AddressMap< MemAddr, linked_ptr > public_symbols_; - - // Each element in the array is a ContainedRangeMap for a type listed in - // StackInfoTypes. These are split by type because there may be overlaps - // between maps of different types, but some information is only available - // as certain types. - ContainedRangeMap< MemAddr, linked_ptr > - stack_info_[STACK_INFO_LAST]; -}; - -BasicSourceLineResolver::BasicSourceLineResolver() : modules_(new ModuleMap) { -} - -BasicSourceLineResolver::~BasicSourceLineResolver() { - ModuleMap::iterator it; - for (it = modules_->begin(); it != modules_->end(); ++it) { - delete it->second; - } - delete modules_; -} - -bool BasicSourceLineResolver::LoadModule(const string &module_name, - const string &map_file) { - // Make sure we don't already have a module with the given name. - if (modules_->find(module_name) != modules_->end()) { - BPLOG(INFO) << "Symbols for module " << module_name << " already loaded"; - return false; - } - - BPLOG(INFO) << "Loading symbols for module " << module_name << " from " << - map_file; - - Module *module = new Module(module_name); - if (!module->LoadMap(map_file)) { - delete module; - return false; - } - - modules_->insert(make_pair(module_name, module)); - return true; -} - -bool BasicSourceLineResolver::LoadModuleUsingMapBuffer( - const string &module_name, - const string &map_buffer) { - // Make sure we don't already have a module with the given name. - if (modules_->find(module_name) != modules_->end()) { - BPLOG(INFO) << "Symbols for module " << module_name << " already loaded"; - return false; - } - - BPLOG(INFO) << "Loading symbols for module " << module_name << " from buffer"; - - Module *module = new Module(module_name); - if (!module->LoadMapFromBuffer(map_buffer)) { - delete module; - return false; - } - - modules_->insert(make_pair(module_name, module)); - return true; -} - -bool BasicSourceLineResolver::HasModule(const string &module_name) const { - return modules_->find(module_name) != modules_->end(); -} - -StackFrameInfo* BasicSourceLineResolver::FillSourceLineInfo( - StackFrame *frame) const { - if (frame->module) { - ModuleMap::const_iterator it = modules_->find(frame->module->code_file()); - if (it != modules_->end()) { - return it->second->LookupAddress(frame); - } - } - return NULL; -} - -class AutoFileCloser { - public: - AutoFileCloser(FILE *file) : file_(file) {} - ~AutoFileCloser() { - if (file_) - fclose(file_); - } - - private: - FILE *file_; -}; - -bool BasicSourceLineResolver::Module::LoadMapFromBuffer( - const string &map_buffer) { - linked_ptr cur_func; - int line_number = 0; - const char *map_buffer_c_str = map_buffer.c_str(); - char *save_ptr; - - // set up our input buffer as a c-style string so we - // can we use strtok() - // have to copy because modifying the result of string::c_str is not - // permitted - size_t map_buffer_length = strlen(map_buffer_c_str); - char *map_buffer_chars = new char[map_buffer_length]; - if (map_buffer_chars == NULL) { - BPLOG(ERROR) << "Memory allocation of " << map_buffer_length << - " bytes failed"; - return false; - } - - strncpy(map_buffer_chars, map_buffer_c_str, map_buffer_length); - - if (map_buffer_chars[map_buffer_length - 1] == '\n') { - map_buffer_chars[map_buffer_length - 1] = '\0'; - } - char *buffer; - buffer = strtok_r(map_buffer_chars, "\r\n", &save_ptr); - - while (buffer != NULL) { - ++line_number; - - if (strncmp(buffer, "FILE ", 5) == 0) { - if (!ParseFile(buffer)) { - BPLOG(ERROR) << "ParseFile on buffer failed at " << - ":" << line_number; - delete [] map_buffer_chars; - return false; - } - } else if (strncmp(buffer, "STACK ", 6) == 0) { - if (!ParseStackInfo(buffer)) { - BPLOG(ERROR) << "ParseStackInfo failed at " << - ":" << line_number; - delete [] map_buffer_chars; - return false; - } - } else if (strncmp(buffer, "FUNC ", 5) == 0) { - cur_func.reset(ParseFunction(buffer)); - if (!cur_func.get()) { - BPLOG(ERROR) << "ParseFunction failed at " << - ":" << line_number; - delete [] map_buffer_chars; - return false; - } - // StoreRange will fail if the function has an invalid address or size. - // We'll silently ignore this, the function and any corresponding lines - // will be destroyed when cur_func is released. - functions_.StoreRange(cur_func->address, cur_func->size, cur_func); - } else if (strncmp(buffer, "PUBLIC ", 7) == 0) { - // Clear cur_func: public symbols don't contain line number information. - cur_func.reset(); - - if (!ParsePublicSymbol(buffer)) { - BPLOG(ERROR) << "ParsePublicSymbol failed at " << - ":" << line_number; - delete [] map_buffer_chars; - return false; - } - } else if (strncmp(buffer, "MODULE ", 7) == 0) { - // Ignore these. They're not of any use to BasicSourceLineResolver, - // which is fed modules by a SymbolSupplier. These lines are present to - // aid other tools in properly placing symbol files so that they can - // be accessed by a SymbolSupplier. - // - // MODULE - } else { - if (!cur_func.get()) { - BPLOG(ERROR) << "Found source line data without a function at " << - ":" << line_number; - delete [] map_buffer_chars; - return false; - } - Line *line = ParseLine(buffer); - if (!line) { - BPLOG(ERROR) << "ParseLine failed at " << line_number << " for " << - buffer; - delete [] map_buffer_chars; - return false; - } - cur_func->lines.StoreRange(line->address, line->size, - linked_ptr(line)); - } - - buffer = strtok_r(NULL, "\r\n", &save_ptr); - } - - return true; -} - -bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) { - struct stat buf; - int error_code = stat(map_file.c_str(), &buf); - if (error_code == -1) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not open " << map_file << - ", error " << error_code << ": " << error_string; - return false; - } - - off_t file_size = buf.st_size; - - // Allocate memory for file contents, plus a null terminator - // since we'll use strtok() on the contents. - char *file_buffer = new char[sizeof(char)*file_size + 1]; - - if (file_buffer == NULL) { - BPLOG(ERROR) << "Could not allocate memory for " << map_file; - return false; - } - - BPLOG(ERROR) << "Opening " << map_file; - - FILE *f = fopen(map_file.c_str(), "rt"); - if (!f) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not open " << map_file << - ", error " << error_code << ": " << error_string; - delete [] file_buffer; - return false; - } - - AutoFileCloser closer(f); - - int items_read = 0; - - items_read = fread(file_buffer, 1, file_size, f); - - if (items_read != file_size) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Could not slurp " << map_file << - ", error " << error_code << ": " << error_string; - delete [] file_buffer; - return false; - } - file_buffer[file_size] = '\0'; - string map_buffer(file_buffer); - delete [] file_buffer; - - return LoadMapFromBuffer(map_buffer); -} - -StackFrameInfo* BasicSourceLineResolver::Module::LookupAddress( - StackFrame *frame) const { - MemAddr address = frame->instruction - frame->module->base_address(); - - linked_ptr retrieved_info; - // Check for debugging info first, before any possible early returns. - // - // We only know about STACK_INFO_FRAME_DATA and STACK_INFO_FPO. Prefer - // them in this order. STACK_INFO_FRAME_DATA is the newer type that - // includes its own program string. STACK_INFO_FPO is the older type - // corresponding to the FPO_DATA struct. See stackwalker_x86.cc. - if (!stack_info_[STACK_INFO_FRAME_DATA].RetrieveRange(address, - &retrieved_info)) { - stack_info_[STACK_INFO_FPO].RetrieveRange(address, &retrieved_info); - } - - scoped_ptr frame_info; - if (retrieved_info.get()) { - frame_info.reset(new StackFrameInfo()); - frame_info->CopyFrom(*retrieved_info.get()); - } - - // First, look for a matching FUNC range. Use RetrieveNearestRange instead - // of RetrieveRange so that the nearest function can be compared to the - // nearest PUBLIC symbol if the address does not lie within the function. - // Having access to the highest function below address, even when address - // is outside of the function, is useful: if the function is higher than - // the nearest PUBLIC symbol, then it means that the PUBLIC symbols is not - // valid for the address, and no function information should be filled in. - // Using RetrieveNearestRange instead of RetrieveRange means that we need - // to verify that address is within the range before using a FUNC. - // - // If no FUNC containing the address is found, look for the nearest PUBLIC - // symbol, being careful not to use a public symbol at a lower address than - // the nearest FUNC. - int parameter_size = 0; - linked_ptr func; - linked_ptr public_symbol; - MemAddr function_base; - MemAddr function_size; - MemAddr public_address; - if (functions_.RetrieveNearestRange(address, &func, - &function_base, &function_size) && - address >= function_base && address < function_base + function_size) { - parameter_size = func->parameter_size; - - frame->function_name = func->name; - frame->function_base = frame->module->base_address() + function_base; - - linked_ptr line; - MemAddr line_base; - if (func->lines.RetrieveRange(address, &line, &line_base, NULL)) { - FileMap::const_iterator it = files_.find(line->source_file_id); - if (it != files_.end()) { - frame->source_file_name = files_.find(line->source_file_id)->second; - } - frame->source_line = line->line; - frame->source_line_base = frame->module->base_address() + line_base; - } - } else if (public_symbols_.Retrieve(address, - &public_symbol, &public_address) && - (!func.get() || public_address > function_base + function_size)) { - parameter_size = public_symbol->parameter_size; - - frame->function_name = public_symbol->name; - frame->function_base = frame->module->base_address() + public_address; - } else { - // No FUNC or PUBLIC data available. - return frame_info.release(); - } - - if (!frame_info.get()) { - // Even without a relevant STACK line, many functions contain information - // about how much space their parameters consume on the stack. Prefer - // the STACK stuff (above), but if it's not present, take the - // information from the FUNC or PUBLIC line. - frame_info.reset(new StackFrameInfo()); - frame_info->parameter_size = parameter_size; - frame_info->valid |= StackFrameInfo::VALID_PARAMETER_SIZE; - } - - return frame_info.release(); -} - -// static -bool BasicSourceLineResolver::Module::Tokenize(char *line, int max_tokens, - vector *tokens) { - tokens->clear(); - tokens->reserve(max_tokens); - - int remaining = max_tokens; - - // Split tokens on the space character. Look for newlines too to - // strip them out before exhausting max_tokens. - char *save_ptr; - char *token = strtok_r(line, " \r\n", &save_ptr); - while (token && --remaining > 0) { - tokens->push_back(token); - if (remaining > 1) - token = strtok_r(NULL, " \r\n", &save_ptr); - } - - // If there's anything left, just add it as a single token. - if (!remaining > 0) { - if ((token = strtok_r(NULL, "\r\n", &save_ptr))) { - tokens->push_back(token); - } - } - - return tokens->size() == static_cast(max_tokens); -} - -bool BasicSourceLineResolver::Module::ParseFile(char *file_line) { - // FILE - file_line += 5; // skip prefix - - vector tokens; - if (!Tokenize(file_line, 2, &tokens)) { - return false; - } - - int index = atoi(tokens[0]); - if (index < 0) { - return false; - } - - char *filename = tokens[1]; - if (!filename) { - return false; - } - - files_.insert(make_pair(index, string(filename))); - return true; -} - -BasicSourceLineResolver::Function* -BasicSourceLineResolver::Module::ParseFunction(char *function_line) { - // FUNC
- function_line += 5; // skip prefix - - vector tokens; - if (!Tokenize(function_line, 4, &tokens)) { - return NULL; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - u_int64_t size = strtoull(tokens[1], NULL, 16); - int stack_param_size = strtoull(tokens[2], NULL, 16); - char *name = tokens[3]; - - return new Function(name, address, size, stack_param_size); -} - -BasicSourceLineResolver::Line* BasicSourceLineResolver::Module::ParseLine( - char *line_line) { - //
- vector tokens; - if (!Tokenize(line_line, 4, &tokens)) { - return NULL; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - u_int64_t size = strtoull(tokens[1], NULL, 16); - int line_number = atoi(tokens[2]); - int source_file = atoi(tokens[3]); - if (line_number <= 0) { - return NULL; - } - - return new Line(address, size, source_file, line_number); -} - -bool BasicSourceLineResolver::Module::ParsePublicSymbol(char *public_line) { - // PUBLIC
- - // Skip "PUBLIC " prefix. - public_line += 7; - - vector tokens; - if (!Tokenize(public_line, 3, &tokens)) { - return false; - } - - u_int64_t address = strtoull(tokens[0], NULL, 16); - int stack_param_size = strtoull(tokens[1], NULL, 16); - char *name = tokens[2]; - - // A few public symbols show up with an address of 0. This has been seen - // in the dumped output of ntdll.pdb for symbols such as _CIlog, _CIpow, - // RtlDescribeChunkLZNT1, and RtlReserveChunkLZNT1. They would conflict - // with one another if they were allowed into the public_symbols_ map, - // but since the address is obviously invalid, gracefully accept them - // as input without putting them into the map. - if (address == 0) { - return true; - } - - linked_ptr symbol(new PublicSymbol(name, address, - stack_param_size)); - return public_symbols_.Store(address, symbol); -} - -bool BasicSourceLineResolver::Module::ParseStackInfo(char *stack_info_line) { - // STACK WIN - // - // - // - // If has_program_string is 1, the rest of the line is a program string. - // Otherwise, the final token tells whether the stack info indicates that - // a base pointer has been allocated. - // - // Expect has_program_string to be 1 when type is STACK_INFO_FRAME_DATA and - // 0 when type is STACK_INFO_FPO, but don't enforce this. - - // Skip "STACK " prefix. - stack_info_line += 6; - - vector tokens; - if (!Tokenize(stack_info_line, 12, &tokens)) - return false; - - // Only MSVC stack frame info is understood for now. - const char *platform = tokens[0]; - if (strcmp(platform, "WIN") != 0) - return false; - - int type = strtol(tokens[1], NULL, 16); - if (type < 0 || type > STACK_INFO_LAST - 1) - return false; - - u_int64_t rva = strtoull(tokens[2], NULL, 16); - u_int64_t code_size = strtoull(tokens[3], NULL, 16); - u_int32_t prolog_size = strtoul(tokens[4], NULL, 16); - u_int32_t epilog_size = strtoul(tokens[5], NULL, 16); - u_int32_t parameter_size = strtoul(tokens[6], NULL, 16); - u_int32_t saved_register_size = strtoul(tokens[7], NULL, 16); - u_int32_t local_size = strtoul(tokens[8], NULL, 16); - u_int32_t max_stack_size = strtoul(tokens[9], NULL, 16); - int has_program_string = strtoul(tokens[10], NULL, 16); - - const char *program_string = ""; - int allocates_base_pointer = 0; - if (has_program_string) { - program_string = tokens[11]; - } else { - allocates_base_pointer = strtoul(tokens[11], NULL, 16); - } - - // TODO(mmentovai): I wanted to use StoreRange's return value as this - // method's return value, but MSVC infrequently outputs stack info that - // violates the containment rules. This happens with a section of code - // in strncpy_s in test_app.cc (testdata/minidump2). There, problem looks - // like this: - // STACK WIN 4 4242 1a a 0 ... (STACK WIN 4 base size prolog 0 ...) - // STACK WIN 4 4243 2e 9 0 ... - // ContainedRangeMap treats these two blocks as conflicting. In reality, - // when the prolog lengths are taken into account, the actual code of - // these blocks doesn't conflict. However, we can't take the prolog lengths - // into account directly here because we'd wind up with a different set - // of range conflicts when MSVC outputs stack info like this: - // STACK WIN 4 1040 73 33 0 ... - // STACK WIN 4 105a 59 19 0 ... - // because in both of these entries, the beginning of the code after the - // prolog is at 0x1073, and the last byte of contained code is at 0x10b2. - // Perhaps we could get away with storing ranges by rva + prolog_size - // if ContainedRangeMap were modified to allow replacement of - // already-stored values. - - linked_ptr stack_frame_info( - new StackFrameInfo(prolog_size, - epilog_size, - parameter_size, - saved_register_size, - local_size, - max_stack_size, - allocates_base_pointer, - program_string)); - stack_info_[type].StoreRange(rva, code_size, stack_frame_info); - - return true; -} - -#ifdef BSLR_NO_HASH_MAP -bool BasicSourceLineResolver::CompareString::operator()( - const string &s1, const string &s2) const { - return strcmp(s1.c_str(), s2.c_str()) < 0; -} -#else // BSLR_NO_HASH_MAP -size_t BasicSourceLineResolver::HashString::operator()(const string &s) const { - return hash()(s.c_str()); -} -#endif // BSLR_NO_HASH_MAP - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver_unittest.cc deleted file mode 100644 index 95595a85..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/basic_source_line_resolver_unittest.cc +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/stack_frame.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stack_frame_info.h" - -#define ASSERT_TRUE(cond) \ - if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(cond) ASSERT_TRUE(!(cond)) - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -namespace { - -using std::string; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CodeModule; -using google_breakpad::linked_ptr; -using google_breakpad::scoped_ptr; -using google_breakpad::StackFrame; -using google_breakpad::StackFrameInfo; - -class TestCodeModule : public CodeModule { - public: - TestCodeModule(string code_file) : code_file_(code_file) {} - virtual ~TestCodeModule() {} - - virtual u_int64_t base_address() const { return 0; } - virtual u_int64_t size() const { return 0x4000; } - virtual string code_file() const { return code_file_; } - virtual string code_identifier() const { return ""; } - virtual string debug_file() const { return ""; } - virtual string debug_identifier() const { return ""; } - virtual string version() const { return ""; } - virtual const CodeModule* Copy() const { - return new TestCodeModule(code_file_); - } - - private: - string code_file_; -}; - -static bool VerifyEmpty(const StackFrame &frame) { - ASSERT_TRUE(frame.function_name.empty()); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - return true; -} - -static void ClearSourceLineInfo(StackFrame *frame) { - frame->function_name.clear(); - frame->module = NULL; - frame->source_file_name.clear(); - frame->source_line = 0; -} - -static bool RunTests() { - string testdata_dir = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata"; - - BasicSourceLineResolver resolver; - ASSERT_TRUE(resolver.LoadModule("module1", testdata_dir + "/module1.out")); - ASSERT_TRUE(resolver.HasModule("module1")); - ASSERT_TRUE(resolver.LoadModule("module2", testdata_dir + "/module2.out")); - ASSERT_TRUE(resolver.HasModule("module2")); - - TestCodeModule module1("module1"); - - StackFrame frame; - frame.instruction = 0x1000; - frame.module = NULL; - scoped_ptr frame_info(resolver.FillSourceLineInfo(&frame)); - ASSERT_FALSE(frame.module); - ASSERT_TRUE(frame.function_name.empty()); - ASSERT_EQ(frame.function_base, 0); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - ASSERT_EQ(frame.source_line_base, 0); - - frame.module = &module1; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_EQ(frame.function_name, "Function1_1"); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module1"); - ASSERT_EQ(frame.function_base, 0x1000); - ASSERT_EQ(frame.source_file_name, "file1_1.cc"); - ASSERT_EQ(frame.source_line, 44); - ASSERT_EQ(frame.source_line_base, 0x1000); - ASSERT_TRUE(frame_info.get()); - ASSERT_FALSE(frame_info->allocates_base_pointer); - ASSERT_EQ(frame_info->program_string, - "$eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ ="); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x800; - frame.module = &module1; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_TRUE(VerifyEmpty(frame)); - ASSERT_FALSE(frame_info.get()); - - frame.instruction = 0x1280; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_EQ(frame.function_name, "Function1_3"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - ASSERT_TRUE(frame_info.get()); - ASSERT_FALSE(frame_info->allocates_base_pointer); - ASSERT_TRUE(frame_info->program_string.empty()); - - frame.instruction = 0x1380; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_EQ(frame.function_name, "Function1_4"); - ASSERT_TRUE(frame.source_file_name.empty()); - ASSERT_EQ(frame.source_line, 0); - ASSERT_TRUE(frame_info.get()); - ASSERT_FALSE(frame_info->allocates_base_pointer); - ASSERT_FALSE(frame_info->program_string.empty()); - - frame.instruction = 0x2000; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_FALSE(frame_info.get()); - - TestCodeModule module2("module2"); - - frame.instruction = 0x2181; - frame.module = &module2; - frame_info.reset(resolver.FillSourceLineInfo(&frame)); - ASSERT_EQ(frame.function_name, "Function2_2"); - ASSERT_EQ(frame.function_base, 0x2170); - ASSERT_TRUE(frame.module); - ASSERT_EQ(frame.module->code_file(), "module2"); - ASSERT_EQ(frame.source_file_name, "file2_2.cc"); - ASSERT_EQ(frame.source_line, 21); - ASSERT_EQ(frame.source_line_base, 0x2180); - ASSERT_TRUE(frame_info.get()); - ASSERT_EQ(frame_info->prolog_size, 1); - - frame.instruction = 0x216f; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_1"); - - ClearSourceLineInfo(&frame); - frame.instruction = 0x219f; - frame.module = &module2; - resolver.FillSourceLineInfo(&frame); - ASSERT_TRUE(frame.function_name.empty()); - - frame.instruction = 0x21a0; - frame.module = &module2; - resolver.FillSourceLineInfo(&frame); - ASSERT_EQ(frame.function_name, "Public2_2"); - - ASSERT_FALSE(resolver.LoadModule("module3", - testdata_dir + "/module3_bad.out")); - ASSERT_FALSE(resolver.HasModule("module3")); - ASSERT_FALSE(resolver.LoadModule("module4", - testdata_dir + "/module4_bad.out")); - ASSERT_FALSE(resolver.HasModule("module4")); - ASSERT_FALSE(resolver.LoadModule("module5", - testdata_dir + "/invalid-filename")); - ASSERT_FALSE(resolver.HasModule("module5")); - ASSERT_FALSE(resolver.HasModule("invalid-module")); - return true; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - if (!RunTests()) { - return 1; - } - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/call_stack.cc b/thirdparty/google-breakpad/r318/src/processor/call_stack.cc deleted file mode 100644 index e3276716..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/call_stack.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// call_stack.cc: A call stack comprised of stack frames. -// -// See call_stack.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/stack_frame.h" - -namespace google_breakpad { - -CallStack::~CallStack() { - Clear(); -} - -void CallStack::Clear() { - for (vector::const_iterator iterator = frames_.begin(); - iterator != frames_.end(); - ++iterator) { - delete *iterator; - } -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/contained_range_map-inl.h b/thirdparty/google-breakpad/r318/src/processor/contained_range_map-inl.h deleted file mode 100644 index 5cc498df..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/contained_range_map-inl.h +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map-inl.h: Hierarchically-organized range map implementation. -// -// See contained_range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ - - -#include - -#include "processor/contained_range_map.h" -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -ContainedRangeMap::~ContainedRangeMap() { - // Clear frees the children pointed to by the map, and frees the map itself. - Clear(); -} - - -template -bool ContainedRangeMap::StoreRange( - const AddressType &base, const AddressType &size, const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - //TODO(nealsid) We are commenting this out in order to prevent - // excessive logging. We plan to move to better logging as this - // failure happens quite often and is expected(see comment in - // basic_source_line_resolver.cc:671). - // BPLOG(INFO) << "StoreRange failed, " << HexString(base) << "+" - // << HexString(size) << ", " << HexString(high); - return false; - } - - if (!map_) - map_ = new AddressToRangeMap(); - - MapIterator iterator_base = map_->lower_bound(base); - MapIterator iterator_high = map_->lower_bound(high); - MapIterator iterator_end = map_->end(); - - if (iterator_base == iterator_high && iterator_base != iterator_end && - base >= iterator_base->second->base_) { - // The new range is entirely within an existing child range. - - // If the new range's geometry is exactly equal to an existing child - // range's, it violates the containment rules, and an attempt to store - // it must fail. iterator_base->first contains the key, which was the - // containing child's high address. - if (iterator_base->second->base_ == base && iterator_base->first == high) { - // TODO(nealsid): See the TODO above on why this is commented out. -// BPLOG(INFO) << "StoreRange failed, identical range is already " -// "present: " << HexString(base) << "+" << HexString(size); - return false; - } - - // Pass the new range on to the child to attempt to store. - return iterator_base->second->StoreRange(base, size, entry); - } - - // iterator_high might refer to an irrelevant range: one whose base address - // is higher than the new range's high address. Set contains_high to true - // only if iterator_high refers to a range that is at least partially - // within the new range. - bool contains_high = iterator_high != iterator_end && - high >= iterator_high->second->base_; - - // If the new range encompasses any existing child ranges, it must do so - // fully. Partial containment isn't allowed. - if ((iterator_base != iterator_end && base > iterator_base->second->base_) || - (contains_high && high < iterator_high->first)) { - // TODO(mmentovai): Some symbol files will trip this check frequently - // on STACK lines. Too many messages will be produced. These are more - // suitable for a DEBUG channel than an INFO channel. - // BPLOG(INFO) << "StoreRange failed, new range partially contains " - // "existing range: " << HexString(base) << "+" << - // HexString(size); - return false; - } - - // When copying and erasing contained ranges, the "end" iterator needs to - // point one past the last item of the range to copy. If contains_high is - // false, the iterator's already in the right place; the increment is safe - // because contains_high can't be true if iterator_high == iterator_end. - if (contains_high) - ++iterator_high; - - // Optimization: if the iterators are equal, no child ranges would be - // moved. Create the new child range with a NULL map to conserve space - // in leaf nodes, of which there will be many. - AddressToRangeMap *child_map = NULL; - - if (iterator_base != iterator_high) { - // The children of this range that are contained by the new range must - // be transferred over to the new range. Create the new child range map - // and copy the pointers to range maps it should contain into it. - child_map = new AddressToRangeMap(iterator_base, iterator_high); - - // Remove the copied child pointers from this range's map of children. - map_->erase(iterator_base, iterator_high); - } - - // Store the new range in the map by its high address. Any children that - // the new child range contains were formerly children of this range but - // are now this range's grandchildren. Ownership of these is transferred - // to the new child range. - map_->insert(MapValue(high, - new ContainedRangeMap(base, entry, child_map))); - return true; -} - - -template -bool ContainedRangeMap::RetrieveRange( - const AddressType &address, EntryType *entry) const { - BPLOG_IF(ERROR, !entry) << "ContainedRangeMap::RetrieveRange requires " - "|entry|"; - assert(entry); - - // If nothing was ever stored, then there's nothing to retrieve. - if (!map_) - return false; - - // Get an iterator to the child range whose high address is equal to or - // greater than the supplied address. If the supplied address is higher - // than all of the high addresses in the range, then this range does not - // contain a child at address, so return false. If the supplied address - // is lower than the base address of the child range, then it is not within - // the child range, so return false. - MapConstIterator iterator = map_->lower_bound(address); - if (iterator == map_->end() || address < iterator->second->base_) - return false; - - // The child in iterator->second contains the specified address. Find out - // if it has a more-specific descendant that also contains it. If it does, - // it will set |entry| appropriately. If not, set |entry| to the child. - if (!iterator->second->RetrieveRange(address, entry)) - *entry = iterator->second->entry_; - - return true; -} - - -template -void ContainedRangeMap::Clear() { - if (map_) { - MapConstIterator end = map_->end(); - for (MapConstIterator child = map_->begin(); child != end; ++child) - delete child->second; - - delete map_; - map_ = NULL; - } -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/contained_range_map.h b/thirdparty/google-breakpad/r318/src/processor/contained_range_map.h deleted file mode 100644 index f30016f3..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/contained_range_map.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map.h: Hierarchically-organized range maps. -// -// A contained range map is similar to a standard range map, except it allows -// objects to be organized hierarchically. A contained range map allows -// objects to contain other objects. It is not sensitive to the order that -// objects are added to the map: larger, more general, containing objects -// may be added either before or after smaller, more specific, contained -// ones. -// -// Contained range maps guarantee that each object may only contain smaller -// objects than itself, and that a parent object may only contain child -// objects located entirely within the parent's address space. Attempts -// to introduce objects (via StoreRange) that violate these rules will fail. -// Retrieval (via RetrieveRange) always returns the most specific (smallest) -// object that contains the address being queried. Note that while it is -// not possible to insert two objects into a map that have exactly the same -// geometry (base address and size), it is possible to completely mask a -// larger object by inserting smaller objects that entirely fill the larger -// object's address space. -// -// Internally, contained range maps are implemented as a tree. Each tree -// node except for the root node describes an object in the map. Each node -// maintains its list of children in a map similar to a standard range map, -// keyed by the highest address that each child occupies. Each node's -// children occupy address ranges entirely within the node. The root node -// is the only node directly accessible to the user, and represents the -// entire address space. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_CONTAINED_RANGE_MAP_H__ -#define PROCESSOR_CONTAINED_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - - -template -class ContainedRangeMap { - public: - // The default constructor creates a ContainedRangeMap with no geometry - // and no entry, and as such is only suitable for the root node of a - // ContainedRangeMap tree. - ContainedRangeMap() : base_(), entry_(), map_(NULL) {} - - ~ContainedRangeMap(); - - // Inserts a range into the map. If the new range is encompassed by - // an existing child range, the new range is passed into the child range's - // StoreRange method. If the new range encompasses any existing child - // ranges, those child ranges are moved to the new range, becoming - // grandchildren of this ContainedRangeMap. Returns false for a - // parameter error, or if the ContainedRangeMap hierarchy guarantees - // would be violated. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Retrieves the most specific (smallest) descendant range encompassing - // the specified address. This method will only return entries held by - // child ranges, and not the entry contained by |this|. This is necessary - // to support a sparsely-populated root range. If no descendant range - // encompasses the address, returns false. - bool RetrieveRange(const AddressType &address, EntryType *entry) const; - - // Removes all children. Note that Clear only removes descendants, - // leaving the node on which it is called intact. Because the only - // meaningful things contained by a root node are descendants, this - // is sufficient to restore an entire ContainedRangeMap to its initial - // empty state when called on the root node. - void Clear(); - - private: - // AddressToRangeMap stores pointers. This makes reparenting simpler in - // StoreRange, because it doesn't need to copy entire objects. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::iterator MapIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Creates a new ContainedRangeMap with the specified base address, entry, - // and initial child map, which may be NULL. This is only used internally - // by ContainedRangeMap when it creates a new child. - ContainedRangeMap(const AddressType &base, const EntryType &entry, - AddressToRangeMap *map) - : base_(base), entry_(entry), map_(map) {} - - // The base address of this range. The high address does not need to - // be stored, because it is used as the key to an object in its parent's - // map, and all ContainedRangeMaps except for the root range are contained - // within maps. The root range does not actually contain an entry, so its - // base_ field is meaningless, and the fact that it has no parent and thus - // no key is unimportant. For this reason, the base_ field should only be - // is accessed on child ContainedRangeMap objects, and never on |this|. - const AddressType base_; - - // The entry corresponding to this range. The root range does not - // actually contain an entry, so its entry_ field is meaningless. For - // this reason, the entry_ field should only be accessed on child - // ContainedRangeMap objects, and never on |this|. - const EntryType entry_; - - // The map containing child ranges, keyed by each child range's high - // address. This is a pointer to avoid allocating map structures for - // leaf nodes, where they are not needed. - AddressToRangeMap *map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_CONTAINED_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/contained_range_map_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/contained_range_map_unittest.cc deleted file mode 100644 index 6b65b4e1..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/contained_range_map_unittest.cc +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// contained_range_map_unittest.cc: Unit tests for ContainedRangeMap -// -// Author: Mark Mentovai - -#include - -#include "processor/contained_range_map-inl.h" - -#include "processor/logging.h" - - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(condition) ASSERT_TRUE(!(condition)) - - -namespace { - - -using google_breakpad::ContainedRangeMap; - - -static bool RunTests() { - ContainedRangeMap crm; - - // First, do the StoreRange tests. This validates the containment - // rules. - ASSERT_TRUE (crm.StoreRange(10, 10, 1)); - ASSERT_FALSE(crm.StoreRange(10, 10, 2)); // exactly equal to 1 - ASSERT_FALSE(crm.StoreRange(11, 10, 3)); // begins inside 1 and extends up - ASSERT_FALSE(crm.StoreRange( 9, 10, 4)); // begins below 1 and ends inside - ASSERT_TRUE (crm.StoreRange(11, 9, 5)); // contained by existing - ASSERT_TRUE (crm.StoreRange(12, 7, 6)); - ASSERT_TRUE (crm.StoreRange( 9, 12, 7)); // contains existing - ASSERT_TRUE (crm.StoreRange( 9, 13, 8)); - ASSERT_TRUE (crm.StoreRange( 8, 14, 9)); - ASSERT_TRUE (crm.StoreRange(30, 3, 10)); - ASSERT_TRUE (crm.StoreRange(33, 3, 11)); - ASSERT_TRUE (crm.StoreRange(30, 6, 12)); // storable but totally masked - ASSERT_TRUE (crm.StoreRange(40, 8, 13)); // will be totally masked - ASSERT_TRUE (crm.StoreRange(40, 4, 14)); - ASSERT_TRUE (crm.StoreRange(44, 4, 15)); - ASSERT_FALSE(crm.StoreRange(32, 10, 16)); // begins in #10, ends in #14 - ASSERT_FALSE(crm.StoreRange(50, 0, 17)); // zero length - ASSERT_TRUE (crm.StoreRange(50, 10, 18)); - ASSERT_TRUE (crm.StoreRange(50, 1, 19)); - ASSERT_TRUE (crm.StoreRange(59, 1, 20)); - ASSERT_TRUE (crm.StoreRange(60, 1, 21)); - ASSERT_TRUE (crm.StoreRange(69, 1, 22)); - ASSERT_TRUE (crm.StoreRange(60, 10, 23)); - ASSERT_TRUE (crm.StoreRange(68, 1, 24)); - ASSERT_TRUE (crm.StoreRange(61, 1, 25)); - ASSERT_TRUE (crm.StoreRange(61, 8, 26)); - ASSERT_FALSE(crm.StoreRange(59, 9, 27)); - ASSERT_FALSE(crm.StoreRange(59, 10, 28)); - ASSERT_FALSE(crm.StoreRange(59, 11, 29)); - ASSERT_TRUE (crm.StoreRange(70, 10, 30)); - ASSERT_TRUE (crm.StoreRange(74, 2, 31)); - ASSERT_TRUE (crm.StoreRange(77, 2, 32)); - ASSERT_FALSE(crm.StoreRange(72, 6, 33)); - ASSERT_TRUE (crm.StoreRange(80, 3, 34)); - ASSERT_TRUE (crm.StoreRange(81, 1, 35)); - ASSERT_TRUE (crm.StoreRange(82, 1, 36)); - ASSERT_TRUE (crm.StoreRange(83, 3, 37)); - ASSERT_TRUE (crm.StoreRange(84, 1, 38)); - ASSERT_TRUE (crm.StoreRange(83, 1, 39)); - ASSERT_TRUE (crm.StoreRange(86, 5, 40)); - ASSERT_TRUE (crm.StoreRange(88, 1, 41)); - ASSERT_TRUE (crm.StoreRange(90, 1, 42)); - ASSERT_TRUE (crm.StoreRange(86, 1, 43)); - ASSERT_TRUE (crm.StoreRange(87, 1, 44)); - ASSERT_TRUE (crm.StoreRange(89, 1, 45)); - ASSERT_TRUE (crm.StoreRange(87, 4, 46)); - ASSERT_TRUE (crm.StoreRange(87, 3, 47)); - ASSERT_FALSE(crm.StoreRange(86, 2, 48)); - - // Each element in test_data contains the expected result when calling - // RetrieveRange on an address. - const int test_data[] = { - 0, // 0 - 0, // 1 - 0, // 2 - 0, // 3 - 0, // 4 - 0, // 5 - 0, // 6 - 0, // 7 - 9, // 8 - 7, // 9 - 1, // 10 - 5, // 11 - 6, // 12 - 6, // 13 - 6, // 14 - 6, // 15 - 6, // 16 - 6, // 17 - 6, // 18 - 5, // 19 - 7, // 20 - 8, // 21 - 0, // 22 - 0, // 23 - 0, // 24 - 0, // 25 - 0, // 26 - 0, // 27 - 0, // 28 - 0, // 29 - 10, // 30 - 10, // 31 - 10, // 32 - 11, // 33 - 11, // 34 - 11, // 35 - 0, // 36 - 0, // 37 - 0, // 38 - 0, // 39 - 14, // 40 - 14, // 41 - 14, // 42 - 14, // 43 - 15, // 44 - 15, // 45 - 15, // 46 - 15, // 47 - 0, // 48 - 0, // 49 - 19, // 50 - 18, // 51 - 18, // 52 - 18, // 53 - 18, // 54 - 18, // 55 - 18, // 56 - 18, // 57 - 18, // 58 - 20, // 59 - 21, // 60 - 25, // 61 - 26, // 62 - 26, // 63 - 26, // 64 - 26, // 65 - 26, // 66 - 26, // 67 - 24, // 68 - 22, // 69 - 30, // 70 - 30, // 71 - 30, // 72 - 30, // 73 - 31, // 74 - 31, // 75 - 30, // 76 - 32, // 77 - 32, // 78 - 30, // 79 - 34, // 80 - 35, // 81 - 36, // 82 - 39, // 83 - 38, // 84 - 37, // 85 - 43, // 86 - 44, // 87 - 41, // 88 - 45, // 89 - 42, // 90 - 0, // 91 - 0, // 92 - 0, // 93 - 0, // 94 - 0, // 95 - 0, // 96 - 0, // 97 - 0, // 98 - 0 // 99 - }; - unsigned int test_high = sizeof(test_data) / sizeof(int); - - // Now, do the RetrieveRange tests. This further validates that the - // objects were stored properly and that retrieval returns the correct - // object. - // If GENERATE_TEST_DATA is defined, instead of the retrieval tests, a - // new test_data array will be printed. Exercise caution when doing this. - // Be sure to verify the results manually! -#ifdef GENERATE_TEST_DATA - printf(" const int test_data[] = {\n"); -#endif // GENERATE_TEST_DATA - - for (unsigned int address = 0; address < test_high; ++address) { - int value; - if (!crm.RetrieveRange(address, &value)) - value = 0; - -#ifndef GENERATE_TEST_DATA - // Don't use ASSERT inside the loop because it won't show the failed - // |address|, and the line number will always be the same. That makes - // it difficult to figure out which test failed. - if (value != test_data[address]) { - fprintf(stderr, "FAIL: retrieve %d expected %d observed %d @ %s:%d\n", - address, test_data[address], value, __FILE__, __LINE__); - return false; - } -#else // !GENERATE_TEST_DATA - printf(" %d%c%s // %d\n", value, - address == test_high - 1 ? ' ' : ',', - value < 10 ? " " : "", - address); -#endif // !GENERATE_TEST_DATA - } - -#ifdef GENERATE_TEST_DATA - printf(" };\n"); -#endif // GENERATE_TEST_DATA - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/linked_ptr.h b/thirdparty/google-breakpad/r318/src/processor/linked_ptr.h deleted file mode 100644 index 1a4ef7d4..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/linked_ptr.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A "smart" pointer type with reference tracking. Every pointer to a -// particular object is kept on a circular linked list. When the last pointer -// to an object is destroyed or reassigned, the object is deleted. -// -// Used properly, this deletes the object when the last reference goes away. -// There are several caveats: -// - Like all reference counting schemes, cycles lead to leaks. -// - Each smart pointer is actually two pointers (8 bytes instead of 4). -// - Every time a pointer is assigned, the entire list of pointers to that -// object is traversed. This class is therefore NOT SUITABLE when there -// will often be more than two or three pointers to a particular object. -// - References are only tracked as long as linked_ptr<> objects are copied. -// If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS -// will happen (double deletion). -// -// A good use of this class is storing object references in STL containers. -// You can safely put linked_ptr<> in a vector<>. -// Other uses may not be as good. -// -// Note: If you use an incomplete type with linked_ptr<>, the class -// *containing* linked_ptr<> must have a constructor and destructor (even -// if they do nothing!). - -#ifndef PROCESSOR_LINKED_PTR_H__ -#define PROCESSOR_LINKED_PTR_H__ - -namespace google_breakpad { - -// This is used internally by all instances of linked_ptr<>. It needs to be -// a non-template class because different types of linked_ptr<> can refer to -// the same object (linked_ptr(obj) vs linked_ptr(obj)). -// So, it needs to be possible for different types of linked_ptr to participate -// in the same circular linked list, so we need a single class type here. -// -// DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr. -class linked_ptr_internal { - public: - // Create a new circle that includes only this instance. - void join_new() { - next_ = this; - } - - // Join an existing circle. - void join(linked_ptr_internal const* ptr) { - linked_ptr_internal const* p = ptr; - while (p->next_ != ptr) p = p->next_; - p->next_ = this; - next_ = ptr; - } - - // Leave whatever circle we're part of. Returns true iff we were the - // last member of the circle. Once this is done, you can join() another. - bool depart() { - if (next_ == this) return true; - linked_ptr_internal const* p = next_; - while (p->next_ != this) p = p->next_; - p->next_ = next_; - return false; - } - - private: - mutable linked_ptr_internal const* next_; -}; - -template -class linked_ptr { - public: - typedef T element_type; - - // Take over ownership of a raw pointer. This should happen as soon as - // possible after the object is created. - explicit linked_ptr(T* ptr = NULL) { capture(ptr); } - ~linked_ptr() { depart(); } - - // Copy an existing linked_ptr<>, adding ourselves to the list of references. - template linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - linked_ptr(linked_ptr const& ptr) { copy(&ptr); } - - // Assignment releases the old value and acquires the new. - template linked_ptr& operator=(linked_ptr const& ptr) { - depart(); - copy(&ptr); - return *this; - } - - linked_ptr& operator=(linked_ptr const& ptr) { - if (&ptr != this) { - depart(); - copy(&ptr); - } - return *this; - } - - // Smart pointer members. - void reset(T* ptr = NULL) { depart(); capture(ptr); } - T* get() const { return value_; } - T* operator->() const { return value_; } - T& operator*() const { return *value_; } - // Release ownership of the pointed object and returns it. - // Sole ownership by this linked_ptr object is required. - T* release() { - bool last = link_.depart(); - T* v = value_; - value_ = NULL; - return v; - } - - bool operator==(T* p) const { return value_ == p; } - bool operator!=(T* p) const { return value_ != p; } - template - bool operator==(linked_ptr const& ptr) const { - return value_ == ptr.get(); - } - template - bool operator!=(linked_ptr const& ptr) const { - return value_ != ptr.get(); - } - - private: - template - friend class linked_ptr; - - T* value_; - linked_ptr_internal link_; - - void depart() { - if (link_.depart()) delete value_; - } - - void capture(T* ptr) { - value_ = ptr; - link_.join_new(); - } - - template void copy(linked_ptr const* ptr) { - value_ = ptr->get(); - if (value_) - link_.join(&ptr->link_); - else - link_.join_new(); - } -}; - -template inline -bool operator==(T* ptr, const linked_ptr& x) { - return ptr == x.get(); -} - -template inline -bool operator!=(T* ptr, const linked_ptr& x) { - return ptr != x.get(); -} - -// A function to convert T* into linked_ptr -// Doing e.g. make_linked_ptr(new FooBarBaz(arg)) is a shorter notation -// for linked_ptr >(new FooBarBaz(arg)) -template -linked_ptr make_linked_ptr(T* ptr) { - return linked_ptr(ptr); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_LINKED_PTR_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/logging.cc b/thirdparty/google-breakpad/r318/src/processor/logging.cc deleted file mode 100644 index 8842df35..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/logging.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// logging.cc: Breakpad logging -// -// See logging.h for documentation. -// -// Author: Mark Mentovai - -#include -#include -#include -#include -#include - -#include "processor/logging.h" -#include "processor/pathname_stripper.h" - -namespace google_breakpad { - -LogStream::LogStream(std::ostream &stream, Severity severity, - const char *file, int line) - : stream_(stream) { - time_t clock; - time(&clock); - struct tm tm_struct; - localtime_r(&clock, &tm_struct); - char time_string[20]; - strftime(time_string, sizeof(time_string), "%Y-%m-%d %H:%M:%S", &tm_struct); - - const char *severity_string = "UNKNOWN_SEVERITY"; - switch (severity) { - case SEVERITY_INFO: - severity_string = "INFO"; - break; - case SEVERITY_ERROR: - severity_string = "ERROR"; - break; - } - - stream_ << time_string << ": " << PathnameStripper::File(file) << ":" << - line << ": " << severity_string << ": "; -} - -LogStream::~LogStream() { - stream_ << std::endl; -} - -std::string HexString(u_int32_t number) { - char buffer[11]; - snprintf(buffer, sizeof(buffer), "0x%x", number); - return std::string(buffer); -} - -std::string HexString(u_int64_t number) { - char buffer[19]; - snprintf(buffer, sizeof(buffer), "0x%" PRIx64, number); - return std::string(buffer); -} - -std::string HexString(int number) { - char buffer[19]; - snprintf(buffer, sizeof(buffer), "0x%x", number); - return std::string(buffer); -} - -int ErrnoString(std::string *error_string) { - assert(error_string); - - // strerror isn't necessarily thread-safe. strerror_r would be preferrable, - // but GNU libc uses a nonstandard strerror_r by default, which returns a - // char* (rather than an int success indicator) and doesn't necessarily - // use the supplied buffer. - error_string->assign(strerror(errno)); - return errno; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/logging.h b/thirdparty/google-breakpad/r318/src/processor/logging.h deleted file mode 100644 index b638ff58..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/logging.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// logging.h: Breakpad logging -// -// Breakpad itself uses Breakpad logging with statements of the form: -// BPLOG(severity) << "message"; -// severity may be INFO, ERROR, or other values defined in this file. -// -// BPLOG is an overridable macro so that users can customize Breakpad's -// logging. Left at the default, logging messages are sent to stderr along -// with a timestamp and the source code location that produced a message. -// The streams may be changed by redefining BPLOG_*_STREAM, the logging -// behavior may be changed by redefining BPLOG_*, and the entire logging -// system may be overridden by redefining BPLOG(severity). These -// redefinitions may be passed to the preprocessor as a command-line flag -// (-D). -// -// If an additional header is required to override Breakpad logging, it can -// be specified by the BP_LOGGING_INCLUDE macro. If defined, this header -// will #include the header specified by that macro. -// -// If any initialization is needed before logging, it can be performed by -// a function called through the BPLOG_INIT macro. Each main function of -// an executable program in the Breakpad processor library calls -// BPLOG_INIT(&argc, &argv); before any logging can be performed; define -// BPLOG_INIT appropriately if initialization is required. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_LOGGING_H__ -#define PROCESSOR_LOGGING_H__ - -#include -#include - -#include "google_breakpad/common/breakpad_types.h" - -#ifdef BP_LOGGING_INCLUDE -#include BP_LOGGING_INCLUDE -#endif // BP_LOGGING_INCLUDE - -namespace google_breakpad { - -class LogStream { - public: - enum Severity { - SEVERITY_INFO, - SEVERITY_ERROR - }; - - // Begin logging a message to the stream identified by |stream|, at the - // indicated severity. The file and line parameters should be set so as to - // identify the line of source code that is producing a message. - LogStream(std::ostream &stream, Severity severity, - const char *file, int line); - - // Finish logging by printing a newline and flushing the output stream. - ~LogStream(); - - template std::ostream& operator<<(const T &t) { - return stream_ << t; - } - - private: - std::ostream &stream_; - - // Disallow copy constructor and assignment operator - explicit LogStream(const LogStream &that); - void operator=(const LogStream &that); -}; - -// This class is used to explicitly ignore values in the conditional logging -// macros. This avoids compiler warnings like "value computed is not used" -// and "statement has no effect". -class LogMessageVoidify { - public: - LogMessageVoidify() {} - - // This has to be an operator with a precedence lower than << but higher - // than ?: - void operator&(std::ostream &) {} -}; - -// Returns number formatted as a hexadecimal string, such as "0x7b". -std::string HexString(u_int32_t number); -std::string HexString(u_int64_t number); -std::string HexString(int number); - -// Returns the error code as set in the global errno variable, and sets -// error_string, a required argument, to a string describing that error -// code. -int ErrnoString(std::string *error_string); - -} // namespace google_breakpad - -#ifndef BPLOG_INIT -#define BPLOG_INIT(pargc, pargv) -#endif // BPLOG_INIT - -#ifndef BPLOG -#define BPLOG(severity) BPLOG_ ## severity -#endif // BPLOG - -#ifndef BPLOG_INFO -#ifndef BPLOG_INFO_STREAM -#define BPLOG_INFO_STREAM std::clog -#endif // BPLOG_INFO_STREAM -#define BPLOG_INFO google_breakpad::LogStream(BPLOG_INFO_STREAM, \ - google_breakpad::LogStream::SEVERITY_INFO, \ - __FILE__, __LINE__) -#endif // BPLOG_INFO - -#ifndef BPLOG_ERROR -#ifndef BPLOG_ERROR_STREAM -#define BPLOG_ERROR_STREAM std::cerr -#endif // BPLOG_ERROR_STREAM -#define BPLOG_ERROR google_breakpad::LogStream(BPLOG_ERROR_STREAM, \ - google_breakpad::LogStream::SEVERITY_ERROR, \ - __FILE__, __LINE__) -#endif // BPLOG_ERROR - -#define BPLOG_IF(severity, condition) \ - !(condition) ? (void) 0 : \ - google_breakpad::LogMessageVoidify() & BPLOG(severity) - -#endif // PROCESSOR_LOGGING_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump.cc b/thirdparty/google-breakpad/r318/src/processor/minidump.cc deleted file mode 100644 index 83944501..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump.cc +++ /dev/null @@ -1,3679 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump.cc: A minidump reader. -// -// See minidump.h for documentation. -// -// Author: Mark Mentovai - - -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -typedef SSIZE_T ssize_t; -#define open _open -#define read _read -#define lseek _lseek -#else // _WIN32 -#define O_BINARY 0 -#endif // _WIN32 - -#include -#include -#include -#include - -#include "processor/range_map-inl.h" - -#include "google_breakpad/processor/minidump.h" -#include "processor/basic_code_module.h" -#include "processor/basic_code_modules.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - - -namespace google_breakpad { - - -using std::numeric_limits; -using std::vector; - - -// -// Swapping routines -// -// Inlining these doesn't increase code size significantly, and it saves -// a whole lot of unnecessary jumping back and forth. -// - - -// Swapping an 8-bit quantity is a no-op. This function is only provided -// to account for certain templatized operations that require swapping for -// wider types but handle u_int8_t too -// (MinidumpMemoryRegion::GetMemoryAtAddressInternal). -static inline void Swap(u_int8_t* value) { -} - - -// Optimization: don't need to AND the furthest right shift, because we're -// shifting an unsigned quantity. The standard requires zero-filling in this -// case. If the quantities were signed, a bitmask whould be needed for this -// right shift to avoid an arithmetic shift (which retains the sign bit). -// The furthest left shift never needs to be ANDed bitmask. - - -static inline void Swap(u_int16_t* value) { - *value = (*value >> 8) | - (*value << 8); -} - - -static inline void Swap(u_int32_t* value) { - *value = (*value >> 24) | - ((*value >> 8) & 0x0000ff00) | - ((*value << 8) & 0x00ff0000) | - (*value << 24); -} - - -static inline void Swap(u_int64_t* value) { - u_int32_t* value32 = reinterpret_cast(value); - Swap(&value32[0]); - Swap(&value32[1]); - u_int32_t temp = value32[0]; - value32[0] = value32[1]; - value32[1] = temp; -} - - -// Given a pointer to a 128-bit int in the minidump data, set the "low" -// and "high" fields appropriately. -static void Normalize128(u_int128_t* value, bool is_big_endian) { - // The struct format is [high, low], so if the format is big-endian, - // the most significant bytes will already be in the high field. - if (!is_big_endian) { - u_int64_t temp = value->low; - value->low = value->high; - value->high = temp; - } -} - -// This just swaps each int64 half of the 128-bit value. -// The value should also be normalized by calling Normalize128(). -static void Swap(u_int128_t* value) { - Swap(&value->low); - Swap(&value->high); -} - - -static inline void Swap(MDLocationDescriptor* location_descriptor) { - Swap(&location_descriptor->data_size); - Swap(&location_descriptor->rva); -} - - -static inline void Swap(MDMemoryDescriptor* memory_descriptor) { - Swap(&memory_descriptor->start_of_memory_range); - Swap(&memory_descriptor->memory); -} - - -static inline void Swap(MDGUID* guid) { - Swap(&guid->data1); - Swap(&guid->data2); - Swap(&guid->data3); - // Don't swap guid->data4[] because it contains 8-bit quantities. -} - - -// -// Character conversion routines -// - - -// Standard wide-character conversion routines depend on the system's own -// idea of what width a wide character should be: some use 16 bits, and -// some use 32 bits. For the purposes of a minidump, wide strings are -// always represented with 16-bit UTF-16 chracters. iconv isn't available -// everywhere, and its interface varies where it is available. iconv also -// deals purely with char* pointers, so in addition to considering the swap -// parameter, a converter that uses iconv would also need to take the host -// CPU's endianness into consideration. It doesn't seems worth the trouble -// of making it a dependency when we don't care about anything but UTF-16. -static string* UTF16ToUTF8(const vector& in, - bool swap) { - scoped_ptr out(new string()); - - // Set the string's initial capacity to the number of UTF-16 characters, - // because the UTF-8 representation will always be at least this long. - // If the UTF-8 representation is longer, the string will grow dynamically. - out->reserve(in.size()); - - for (vector::const_iterator iterator = in.begin(); - iterator != in.end(); - ++iterator) { - // Get a 16-bit value from the input - u_int16_t in_word = *iterator; - if (swap) - Swap(&in_word); - - // Convert the input value (in_word) into a Unicode code point (unichar). - u_int32_t unichar; - if (in_word >= 0xdc00 && in_word <= 0xdcff) { - BPLOG(ERROR) << "UTF16ToUTF8 found low surrogate " << - HexString(in_word) << " without high"; - return NULL; - } else if (in_word >= 0xd800 && in_word <= 0xdbff) { - // High surrogate. - unichar = (in_word - 0xd7c0) << 10; - if (++iterator == in.end()) { - BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << - HexString(in_word) << " at end of string"; - return NULL; - } - u_int32_t high_word = in_word; - in_word = *iterator; - if (in_word < 0xdc00 || in_word > 0xdcff) { - BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << - HexString(high_word) << " without low " << - HexString(in_word); - return NULL; - } - unichar |= in_word & 0x03ff; - } else { - // The ordinary case, a single non-surrogate Unicode character encoded - // as a single 16-bit value. - unichar = in_word; - } - - // Convert the Unicode code point (unichar) into its UTF-8 representation, - // appending it to the out string. - if (unichar < 0x80) { - (*out) += unichar; - } else if (unichar < 0x800) { - (*out) += 0xc0 | (unichar >> 6); - (*out) += 0x80 | (unichar & 0x3f); - } else if (unichar < 0x10000) { - (*out) += 0xe0 | (unichar >> 12); - (*out) += 0x80 | ((unichar >> 6) & 0x3f); - (*out) += 0x80 | (unichar & 0x3f); - } else if (unichar < 0x200000) { - (*out) += 0xf0 | (unichar >> 18); - (*out) += 0x80 | ((unichar >> 12) & 0x3f); - (*out) += 0x80 | ((unichar >> 6) & 0x3f); - (*out) += 0x80 | (unichar & 0x3f); - } else { - BPLOG(ERROR) << "UTF16ToUTF8 cannot represent high value " << - HexString(unichar) << " in UTF-8"; - return NULL; - } - } - - return out.release(); -} - - -// -// MinidumpObject -// - - -MinidumpObject::MinidumpObject(Minidump* minidump) - : minidump_(minidump), - valid_(false) { -} - - -// -// MinidumpStream -// - - -MinidumpStream::MinidumpStream(Minidump* minidump) - : MinidumpObject(minidump) { -} - - -// -// MinidumpContext -// - - -MinidumpContext::MinidumpContext(Minidump* minidump) - : MinidumpStream(minidump), - context_flags_(0), - context_() { -} - - -MinidumpContext::~MinidumpContext() { - FreeContext(); -} - - -bool MinidumpContext::Read(u_int32_t expected_size) { - valid_ = false; - - FreeContext(); - - // First, figure out what type of CPU this context structure is for. - // For some reason, the AMD64 Context doesn't have context_flags - // at the beginning of the structure, so special case it here. - if (expected_size == sizeof(MDRawContextAMD64)) { - BPLOG(INFO) << "MinidumpContext: looks like AMD64 context"; - - scoped_ptr context_amd64(new MDRawContextAMD64()); - if (!minidump_->ReadBytes(context_amd64.get(), - sizeof(MDRawContextAMD64))) { - BPLOG(ERROR) << "MinidumpContext could not read amd64 context"; - return false; - } - - if (minidump_->swap()) - Swap(&context_amd64->context_flags); - - u_int32_t cpu_type = context_amd64->context_flags & MD_CONTEXT_CPU_MASK; - - if (cpu_type != MD_CONTEXT_AMD64) { - //TODO: fall through to switch below? - // need a Tell method to be able to SeekSet back to beginning - // http://code.google.com/p/google-breakpad/issues/detail?id=224 - BPLOG(ERROR) << "MinidumpContext not actually amd64 context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext amd64 does not match system info"; - return false; - } - - // Normalize the 128-bit types in the dump. - // Since this is AMD64, by definition, the values are little-endian. - for (unsigned int vr_index = 0; - vr_index < MD_CONTEXT_AMD64_VR_COUNT; - ++vr_index) - Normalize128(&context_amd64->vector_register[vr_index], false); - - if (minidump_->swap()) { - Swap(&context_amd64->p1_home); - Swap(&context_amd64->p2_home); - Swap(&context_amd64->p3_home); - Swap(&context_amd64->p4_home); - Swap(&context_amd64->p5_home); - Swap(&context_amd64->p6_home); - // context_flags is already swapped - Swap(&context_amd64->mx_csr); - Swap(&context_amd64->cs); - Swap(&context_amd64->ds); - Swap(&context_amd64->es); - Swap(&context_amd64->fs); - Swap(&context_amd64->ss); - Swap(&context_amd64->eflags); - Swap(&context_amd64->dr0); - Swap(&context_amd64->dr1); - Swap(&context_amd64->dr2); - Swap(&context_amd64->dr3); - Swap(&context_amd64->dr6); - Swap(&context_amd64->dr7); - Swap(&context_amd64->rax); - Swap(&context_amd64->rcx); - Swap(&context_amd64->rdx); - Swap(&context_amd64->rbx); - Swap(&context_amd64->rsp); - Swap(&context_amd64->rbp); - Swap(&context_amd64->rsi); - Swap(&context_amd64->rdi); - Swap(&context_amd64->r8); - Swap(&context_amd64->r9); - Swap(&context_amd64->r10); - Swap(&context_amd64->r11); - Swap(&context_amd64->r12); - Swap(&context_amd64->r13); - Swap(&context_amd64->r14); - Swap(&context_amd64->r15); - Swap(&context_amd64->rip); - //FIXME: I'm not sure what actually determines - // which member of the union {flt_save, sse_registers} - // is valid. We're not currently using either, - // but it would be good to have them swapped properly. - - for (unsigned int vr_index = 0; - vr_index < MD_CONTEXT_AMD64_VR_COUNT; - ++vr_index) - Swap(&context_amd64->vector_register[vr_index]); - Swap(&context_amd64->vector_control); - Swap(&context_amd64->debug_control); - Swap(&context_amd64->last_branch_to_rip); - Swap(&context_amd64->last_branch_from_rip); - Swap(&context_amd64->last_exception_to_rip); - Swap(&context_amd64->last_exception_from_rip); - } - - context_flags_ = context_amd64->context_flags; - - context_.amd64 = context_amd64.release(); - } - else { - u_int32_t context_flags; - if (!minidump_->ReadBytes(&context_flags, sizeof(context_flags))) { - BPLOG(ERROR) << "MinidumpContext could not read context flags"; - return false; - } - if (minidump_->swap()) - Swap(&context_flags); - - u_int32_t cpu_type = context_flags & MD_CONTEXT_CPU_MASK; - - // Allocate the context structure for the correct CPU and fill it. The - // casts are slightly unorthodox, but it seems better to do that than to - // maintain a separate pointer for each type of CPU context structure - // when only one of them will be used. - switch (cpu_type) { - case MD_CONTEXT_X86: { - if (expected_size != sizeof(MDRawContextX86)) { - BPLOG(ERROR) << "MinidumpContext x86 size mismatch, " << - expected_size << " != " << sizeof(MDRawContextX86); - return false; - } - - scoped_ptr context_x86(new MDRawContextX86()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_x86->context_flags = context_flags; - - size_t flags_size = sizeof(context_x86->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_x86.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextX86) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read x86 context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext x86 does not match system info"; - return false; - } - - if (minidump_->swap()) { - // context_x86->context_flags was already swapped. - Swap(&context_x86->dr0); - Swap(&context_x86->dr1); - Swap(&context_x86->dr2); - Swap(&context_x86->dr3); - Swap(&context_x86->dr6); - Swap(&context_x86->dr7); - Swap(&context_x86->float_save.control_word); - Swap(&context_x86->float_save.status_word); - Swap(&context_x86->float_save.tag_word); - Swap(&context_x86->float_save.error_offset); - Swap(&context_x86->float_save.error_selector); - Swap(&context_x86->float_save.data_offset); - Swap(&context_x86->float_save.data_selector); - // context_x86->float_save.register_area[] contains 8-bit quantities - // and does not need to be swapped. - Swap(&context_x86->float_save.cr0_npx_state); - Swap(&context_x86->gs); - Swap(&context_x86->fs); - Swap(&context_x86->es); - Swap(&context_x86->ds); - Swap(&context_x86->edi); - Swap(&context_x86->esi); - Swap(&context_x86->ebx); - Swap(&context_x86->edx); - Swap(&context_x86->ecx); - Swap(&context_x86->eax); - Swap(&context_x86->ebp); - Swap(&context_x86->eip); - Swap(&context_x86->cs); - Swap(&context_x86->eflags); - Swap(&context_x86->esp); - Swap(&context_x86->ss); - // context_x86->extended_registers[] contains 8-bit quantities and - // does not need to be swapped. - } - - context_.x86 = context_x86.release(); - - break; - } - - case MD_CONTEXT_PPC: { - if (expected_size != sizeof(MDRawContextPPC)) { - BPLOG(ERROR) << "MinidumpContext ppc size mismatch, " << - expected_size << " != " << sizeof(MDRawContextPPC); - return false; - } - - scoped_ptr context_ppc(new MDRawContextPPC()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_ppc->context_flags = context_flags; - - size_t flags_size = sizeof(context_ppc->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_ppc.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextPPC) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read ppc context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext ppc does not match system info"; - return false; - } - - // Normalize the 128-bit types in the dump. - // Since this is PowerPC, by definition, the values are big-endian. - for (unsigned int vr_index = 0; - vr_index < MD_VECTORSAVEAREA_PPC_VR_COUNT; - ++vr_index) { - Normalize128(&context_ppc->vector_save.save_vr[vr_index], true); - } - - if (minidump_->swap()) { - // context_ppc->context_flags was already swapped. - Swap(&context_ppc->srr0); - Swap(&context_ppc->srr1); - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_PPC_GPR_COUNT; - ++gpr_index) { - Swap(&context_ppc->gpr[gpr_index]); - } - Swap(&context_ppc->cr); - Swap(&context_ppc->xer); - Swap(&context_ppc->lr); - Swap(&context_ppc->ctr); - Swap(&context_ppc->mq); - Swap(&context_ppc->vrsave); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; - ++fpr_index) { - Swap(&context_ppc->float_save.fpregs[fpr_index]); - } - // Don't swap context_ppc->float_save.fpscr_pad because it is only - // used for padding. - Swap(&context_ppc->float_save.fpscr); - for (unsigned int vr_index = 0; - vr_index < MD_VECTORSAVEAREA_PPC_VR_COUNT; - ++vr_index) { - Swap(&context_ppc->vector_save.save_vr[vr_index]); - } - Swap(&context_ppc->vector_save.save_vscr); - // Don't swap the padding fields in vector_save. - Swap(&context_ppc->vector_save.save_vrvalid); - } - - context_.ppc = context_ppc.release(); - - break; - } - - case MD_CONTEXT_SPARC: { - if (expected_size != sizeof(MDRawContextSPARC)) { - BPLOG(ERROR) << "MinidumpContext sparc size mismatch, " << - expected_size << " != " << sizeof(MDRawContextSPARC); - return false; - } - - scoped_ptr context_sparc(new MDRawContextSPARC()); - - // Set the context_flags member, which has already been read, and - // read the rest of the structure beginning with the first member - // after context_flags. - context_sparc->context_flags = context_flags; - - size_t flags_size = sizeof(context_sparc->context_flags); - u_int8_t* context_after_flags = - reinterpret_cast(context_sparc.get()) + flags_size; - if (!minidump_->ReadBytes(context_after_flags, - sizeof(MDRawContextSPARC) - flags_size)) { - BPLOG(ERROR) << "MinidumpContext could not read sparc context"; - return false; - } - - // Do this after reading the entire MDRawContext structure because - // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) { - BPLOG(ERROR) << "MinidumpContext sparc does not match system info"; - return false; - } - - if (minidump_->swap()) { - // context_sparc->context_flags was already swapped. - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_SPARC_GPR_COUNT; - ++gpr_index) { - Swap(&context_sparc->g_r[gpr_index]); - } - Swap(&context_sparc->ccr); - Swap(&context_sparc->pc); - Swap(&context_sparc->npc); - Swap(&context_sparc->y); - Swap(&context_sparc->asi); - Swap(&context_sparc->fprs); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT; - ++fpr_index) { - Swap(&context_sparc->float_save.regs[fpr_index]); - } - Swap(&context_sparc->float_save.filler); - Swap(&context_sparc->float_save.fsr); - } - context_.ctx_sparc = context_sparc.release(); - - break; - } - - default: { - // Unknown context type - BPLOG(ERROR) << "MinidumpContext unknown context type " << - HexString(cpu_type); - return false; - break; - } - } - context_flags_ = context_flags; - } - - valid_ = true; - return true; -} - - -u_int32_t MinidumpContext::GetContextCPU() const { - if (!valid_) { - // Don't log a message, GetContextCPU can be legitimately called with - // valid_ false by FreeContext, which is called by Read. - return 0; - } - - return context_flags_ & MD_CONTEXT_CPU_MASK; -} - - -const MDRawContextX86* MinidumpContext::GetContextX86() const { - if (GetContextCPU() != MD_CONTEXT_X86) { - BPLOG(ERROR) << "MinidumpContext cannot get x86 context"; - return NULL; - } - - return context_.x86; -} - - -const MDRawContextPPC* MinidumpContext::GetContextPPC() const { - if (GetContextCPU() != MD_CONTEXT_PPC) { - BPLOG(ERROR) << "MinidumpContext cannot get ppc context"; - return NULL; - } - - return context_.ppc; -} - -const MDRawContextAMD64* MinidumpContext::GetContextAMD64() const { - if (GetContextCPU() != MD_CONTEXT_AMD64) { - BPLOG(ERROR) << "MinidumpContext cannot get amd64 context"; - return NULL; - } - - return context_.amd64; -} - -const MDRawContextSPARC* MinidumpContext::GetContextSPARC() const { - if (GetContextCPU() != MD_CONTEXT_SPARC) { - BPLOG(ERROR) << "MinidumpContext cannot get sparc context"; - return NULL; - } - - return context_.ctx_sparc; -} - -void MinidumpContext::FreeContext() { - switch (GetContextCPU()) { - case MD_CONTEXT_X86: - delete context_.x86; - break; - - case MD_CONTEXT_PPC: - delete context_.ppc; - break; - - case MD_CONTEXT_AMD64: - delete context_.amd64; - break; - - case MD_CONTEXT_SPARC: - delete context_.ctx_sparc; - break; - - default: - // There is no context record (valid_ is false) or there's a - // context record for an unknown CPU (shouldn't happen, only known - // records are stored by Read). - break; - } - - context_flags_ = 0; - context_.base = NULL; -} - - -bool MinidumpContext::CheckAgainstSystemInfo(u_int32_t context_cpu_type) { - // It's OK if the minidump doesn't contain an MD_SYSTEM_INFO_STREAM, - // as this function just implements a sanity check. - MinidumpSystemInfo* system_info = minidump_->GetSystemInfo(); - if (!system_info) { - BPLOG(INFO) << "MinidumpContext could not be compared against " - "MinidumpSystemInfo"; - return true; - } - - // If there is an MD_SYSTEM_INFO_STREAM, it should contain valid system info. - const MDRawSystemInfo* raw_system_info = system_info->system_info(); - if (!raw_system_info) { - BPLOG(INFO) << "MinidumpContext could not be compared against " - "MDRawSystemInfo"; - return false; - } - - MDCPUArchitecture system_info_cpu_type = static_cast( - raw_system_info->processor_architecture); - - // Compare the CPU type of the context record to the CPU type in the - // minidump's system info stream. - bool return_value = false; - switch (context_cpu_type) { - case MD_CONTEXT_X86: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_X86 || - system_info_cpu_type == MD_CPU_ARCHITECTURE_X86_WIN64 || - system_info_cpu_type == MD_CPU_ARCHITECTURE_AMD64) { - return_value = true; - } - break; - - case MD_CONTEXT_PPC: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_PPC) - return_value = true; - break; - - case MD_CONTEXT_AMD64: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_AMD64) - return_value = true; - break; - - case MD_CONTEXT_SPARC: - if (system_info_cpu_type == MD_CPU_ARCHITECTURE_SPARC) - return_value = true; - break; - } - - BPLOG_IF(ERROR, !return_value) << "MinidumpContext CPU " << - HexString(context_cpu_type) << - " wrong for MinidumpSysmtemInfo CPU " << - HexString(system_info_cpu_type); - - return return_value; -} - - -void MinidumpContext::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpContext cannot print invalid data"; - return; - } - - switch (GetContextCPU()) { - case MD_CONTEXT_X86: { - const MDRawContextX86* context_x86 = GetContextX86(); - printf("MDRawContextX86\n"); - printf(" context_flags = 0x%x\n", - context_x86->context_flags); - printf(" dr0 = 0x%x\n", context_x86->dr0); - printf(" dr1 = 0x%x\n", context_x86->dr1); - printf(" dr2 = 0x%x\n", context_x86->dr2); - printf(" dr3 = 0x%x\n", context_x86->dr3); - printf(" dr6 = 0x%x\n", context_x86->dr6); - printf(" dr7 = 0x%x\n", context_x86->dr7); - printf(" float_save.control_word = 0x%x\n", - context_x86->float_save.control_word); - printf(" float_save.status_word = 0x%x\n", - context_x86->float_save.status_word); - printf(" float_save.tag_word = 0x%x\n", - context_x86->float_save.tag_word); - printf(" float_save.error_offset = 0x%x\n", - context_x86->float_save.error_offset); - printf(" float_save.error_selector = 0x%x\n", - context_x86->float_save.error_selector); - printf(" float_save.data_offset = 0x%x\n", - context_x86->float_save.data_offset); - printf(" float_save.data_selector = 0x%x\n", - context_x86->float_save.data_selector); - printf(" float_save.register_area[%2d] = 0x", - MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE); - for (unsigned int register_index = 0; - register_index < MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE; - ++register_index) { - printf("%02x", context_x86->float_save.register_area[register_index]); - } - printf("\n"); - printf(" float_save.cr0_npx_state = 0x%x\n", - context_x86->float_save.cr0_npx_state); - printf(" gs = 0x%x\n", context_x86->gs); - printf(" fs = 0x%x\n", context_x86->fs); - printf(" es = 0x%x\n", context_x86->es); - printf(" ds = 0x%x\n", context_x86->ds); - printf(" edi = 0x%x\n", context_x86->edi); - printf(" esi = 0x%x\n", context_x86->esi); - printf(" ebx = 0x%x\n", context_x86->ebx); - printf(" edx = 0x%x\n", context_x86->edx); - printf(" ecx = 0x%x\n", context_x86->ecx); - printf(" eax = 0x%x\n", context_x86->eax); - printf(" ebp = 0x%x\n", context_x86->ebp); - printf(" eip = 0x%x\n", context_x86->eip); - printf(" cs = 0x%x\n", context_x86->cs); - printf(" eflags = 0x%x\n", context_x86->eflags); - printf(" esp = 0x%x\n", context_x86->esp); - printf(" ss = 0x%x\n", context_x86->ss); - printf(" extended_registers[%3d] = 0x", - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE); - for (unsigned int register_index = 0; - register_index < MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE; - ++register_index) { - printf("%02x", context_x86->extended_registers[register_index]); - } - printf("\n\n"); - - break; - } - - case MD_CONTEXT_PPC: { - const MDRawContextPPC* context_ppc = GetContextPPC(); - printf("MDRawContextPPC\n"); - printf(" context_flags = 0x%x\n", - context_ppc->context_flags); - printf(" srr0 = 0x%x\n", context_ppc->srr0); - printf(" srr1 = 0x%x\n", context_ppc->srr1); - for (unsigned int gpr_index = 0; - gpr_index < MD_CONTEXT_PPC_GPR_COUNT; - ++gpr_index) { - printf(" gpr[%2d] = 0x%x\n", - gpr_index, context_ppc->gpr[gpr_index]); - } - printf(" cr = 0x%x\n", context_ppc->cr); - printf(" xer = 0x%x\n", context_ppc->xer); - printf(" lr = 0x%x\n", context_ppc->lr); - printf(" ctr = 0x%x\n", context_ppc->ctr); - printf(" mq = 0x%x\n", context_ppc->mq); - printf(" vrsave = 0x%x\n", context_ppc->vrsave); - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; - ++fpr_index) { - printf(" float_save.fpregs[%2d] = 0x%" PRIx64 "\n", - fpr_index, context_ppc->float_save.fpregs[fpr_index]); - } - printf(" float_save.fpscr = 0x%x\n", - context_ppc->float_save.fpscr); - // TODO(mmentovai): print the 128-bit quantities in - // context_ppc->vector_save. This isn't done yet because printf - // doesn't support 128-bit quantities, and printing them using - // PRIx64 as two 64-bit quantities requires knowledge of the CPU's - // byte ordering. - printf(" vector_save.save_vrvalid = 0x%x\n", - context_ppc->vector_save.save_vrvalid); - printf("\n"); - - break; - } - - case MD_CONTEXT_AMD64: { - const MDRawContextAMD64* context_amd64 = GetContextAMD64(); - printf("MDRawContextAMD64\n"); - printf(" p1_home = 0x%" PRIx64 "\n", - context_amd64->p1_home); - printf(" p2_home = 0x%" PRIx64 "\n", - context_amd64->p2_home); - printf(" p3_home = 0x%" PRIx64 "\n", - context_amd64->p3_home); - printf(" p4_home = 0x%" PRIx64 "\n", - context_amd64->p4_home); - printf(" p5_home = 0x%" PRIx64 "\n", - context_amd64->p5_home); - printf(" p6_home = 0x%" PRIx64 "\n", - context_amd64->p6_home); - printf(" context_flags = 0x%x\n", - context_amd64->context_flags); - printf(" mx_csr = 0x%x\n", - context_amd64->mx_csr); - printf(" cs = 0x%x\n", context_amd64->cs); - printf(" ds = 0x%x\n", context_amd64->ds); - printf(" es = 0x%x\n", context_amd64->es); - printf(" fs = 0x%x\n", context_amd64->fs); - printf(" gs = 0x%x\n", context_amd64->gs); - printf(" ss = 0x%x\n", context_amd64->ss); - printf(" eflags = 0x%x\n", context_amd64->eflags); - printf(" dr0 = 0x%" PRIx64 "\n", context_amd64->dr0); - printf(" dr1 = 0x%" PRIx64 "\n", context_amd64->dr1); - printf(" dr2 = 0x%" PRIx64 "\n", context_amd64->dr2); - printf(" dr3 = 0x%" PRIx64 "\n", context_amd64->dr3); - printf(" dr6 = 0x%" PRIx64 "\n", context_amd64->dr6); - printf(" dr7 = 0x%" PRIx64 "\n", context_amd64->dr7); - printf(" rax = 0x%" PRIx64 "\n", context_amd64->rax); - printf(" rcx = 0x%" PRIx64 "\n", context_amd64->rcx); - printf(" rdx = 0x%" PRIx64 "\n", context_amd64->rdx); - printf(" rbx = 0x%" PRIx64 "\n", context_amd64->rbx); - printf(" rsp = 0x%" PRIx64 "\n", context_amd64->rsp); - printf(" rbp = 0x%" PRIx64 "\n", context_amd64->rbp); - printf(" rsi = 0x%" PRIx64 "\n", context_amd64->rsi); - printf(" rdi = 0x%" PRIx64 "\n", context_amd64->rdi); - printf(" r8 = 0x%" PRIx64 "\n", context_amd64->r8); - printf(" r9 = 0x%" PRIx64 "\n", context_amd64->r9); - printf(" r10 = 0x%" PRIx64 "\n", context_amd64->r10); - printf(" r11 = 0x%" PRIx64 "\n", context_amd64->r11); - printf(" r12 = 0x%" PRIx64 "\n", context_amd64->r12); - printf(" r13 = 0x%" PRIx64 "\n", context_amd64->r13); - printf(" r14 = 0x%" PRIx64 "\n", context_amd64->r14); - printf(" r15 = 0x%" PRIx64 "\n", context_amd64->r15); - printf(" rip = 0x%" PRIx64 "\n", context_amd64->rip); - //TODO: print xmm, vector, debug registers - printf("\n"); - break; - } - - case MD_CONTEXT_SPARC: { - const MDRawContextSPARC* context_sparc = GetContextSPARC(); - printf("MDRawContextSPARC\n"); - printf(" context_flags = 0x%x\n", - context_sparc->context_flags); - for (unsigned int g_r_index = 0; - g_r_index < MD_CONTEXT_SPARC_GPR_COUNT; - ++g_r_index) { - printf(" g_r[%2d] = 0x%" PRIx64 "\n", - g_r_index, context_sparc->g_r[g_r_index]); - } - printf(" ccr = 0x%" PRIx64 "\n", context_sparc->ccr); - printf(" pc = 0x%" PRIx64 "\n", context_sparc->pc); - printf(" npc = 0x%" PRIx64 "\n", context_sparc->npc); - printf(" y = 0x%" PRIx64 "\n", context_sparc->y); - printf(" asi = 0x%" PRIx64 "\n", context_sparc->asi); - printf(" fprs = 0x%" PRIx64 "\n", context_sparc->fprs); - - for (unsigned int fpr_index = 0; - fpr_index < MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT; - ++fpr_index) { - printf(" float_save.regs[%2d] = 0x%" PRIx64 "\n", - fpr_index, context_sparc->float_save.regs[fpr_index]); - } - printf(" float_save.filler = 0x%" PRIx64 "\n", - context_sparc->float_save.filler); - printf(" float_save.fsr = 0x%" PRIx64 "\n", - context_sparc->float_save.fsr); - break; - } - - default: { - break; - } - } -} - - -// -// MinidumpMemoryRegion -// - - -u_int32_t MinidumpMemoryRegion::max_bytes_ = 1024 * 1024; // 1MB - - -MinidumpMemoryRegion::MinidumpMemoryRegion(Minidump* minidump) - : MinidumpObject(minidump), - descriptor_(NULL), - memory_(NULL) { -} - - -MinidumpMemoryRegion::~MinidumpMemoryRegion() { - delete memory_; -} - - -void MinidumpMemoryRegion::SetDescriptor(MDMemoryDescriptor* descriptor) { - descriptor_ = descriptor; - valid_ = descriptor && - descriptor_->memory.data_size <= - numeric_limits::max() - - descriptor_->start_of_memory_range; -} - - -const u_int8_t* MinidumpMemoryRegion::GetMemory() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetMemory"; - return NULL; - } - - if (!memory_) { - if (descriptor_->memory.data_size == 0) { - BPLOG(ERROR) << "MinidumpMemoryRegion is empty"; - return NULL; - } - - if (!minidump_->SeekSet(descriptor_->memory.rva)) { - BPLOG(ERROR) << "MinidumpMemoryRegion could not seek to memory region"; - return NULL; - } - - if (descriptor_->memory.data_size > max_bytes_) { - BPLOG(ERROR) << "MinidumpMemoryRegion size " << - descriptor_->memory.data_size << " exceeds maximum " << - max_bytes_; - return NULL; - } - - scoped_ptr< vector > memory( - new vector(descriptor_->memory.data_size)); - - if (!minidump_->ReadBytes(&(*memory)[0], descriptor_->memory.data_size)) { - BPLOG(ERROR) << "MinidumpMemoryRegion could not read memory region"; - return NULL; - } - - memory_ = memory.release(); - } - - return &(*memory_)[0]; -} - - -u_int64_t MinidumpMemoryRegion::GetBase() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetBase"; - return static_cast(-1); - } - - return descriptor_->start_of_memory_range; -} - - -u_int32_t MinidumpMemoryRegion::GetSize() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetSize"; - return 0; - } - - return descriptor_->memory.data_size; -} - - -void MinidumpMemoryRegion::FreeMemory() { - delete memory_; - memory_ = NULL; -} - - -template -bool MinidumpMemoryRegion::GetMemoryAtAddressInternal(u_int64_t address, - T* value) { - BPLOG_IF(ERROR, !value) << "MinidumpMemoryRegion::GetMemoryAtAddressInternal " - "requires |value|"; - assert(value); - *value = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for " - "GetMemoryAtAddressInternal"; - return false; - } - - if (address < descriptor_->start_of_memory_range || - sizeof(T) > numeric_limits::max() - address || - address + sizeof(T) > descriptor_->start_of_memory_range + - descriptor_->memory.data_size) { - BPLOG(ERROR) << "MinidumpMemoryRegion request out of range: " << - HexString(address) << "+" << sizeof(T) << "/" << - HexString(descriptor_->start_of_memory_range) << "+" << - HexString(descriptor_->memory.data_size); - return false; - } - - const u_int8_t* memory = GetMemory(); - if (!memory) { - // GetMemory already logged a perfectly good message. - return false; - } - - // If the CPU requires memory accesses to be aligned, this can crash. - // x86 and ppc are able to cope, though. - *value = *reinterpret_cast( - &memory[address - descriptor_->start_of_memory_range]); - - if (minidump_->swap()) - Swap(value); - - return true; -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int8_t* value) { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int16_t* value) { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int32_t* value) { - return GetMemoryAtAddressInternal(address, value); -} - - -bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, - u_int64_t* value) { - return GetMemoryAtAddressInternal(address, value); -} - - -void MinidumpMemoryRegion::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryRegion cannot print invalid data"; - return; - } - - const u_int8_t* memory = GetMemory(); - if (memory) { - printf("0x"); - for (unsigned int byte_index = 0; - byte_index < descriptor_->memory.data_size; - byte_index++) { - printf("%02x", memory[byte_index]); - } - printf("\n"); - } else { - printf("No memory\n"); - } -} - - -// -// MinidumpThread -// - - -MinidumpThread::MinidumpThread(Minidump* minidump) - : MinidumpObject(minidump), - thread_(), - memory_(NULL), - context_(NULL) { -} - - -MinidumpThread::~MinidumpThread() { - delete memory_; - delete context_; -} - - -bool MinidumpThread::Read() { - // Invalidate cached data. - delete memory_; - memory_ = NULL; - delete context_; - context_ = NULL; - - valid_ = false; - - if (!minidump_->ReadBytes(&thread_, sizeof(thread_))) { - BPLOG(ERROR) << "MinidumpThread cannot read thread"; - return false; - } - - if (minidump_->swap()) { - Swap(&thread_.thread_id); - Swap(&thread_.suspend_count); - Swap(&thread_.priority_class); - Swap(&thread_.priority); - Swap(&thread_.teb); - Swap(&thread_.stack); - Swap(&thread_.thread_context); - } - - // Check for base + size overflow or undersize. - if (thread_.stack.memory.data_size == 0 || - thread_.stack.memory.data_size > numeric_limits::max() - - thread_.stack.start_of_memory_range) { - BPLOG(ERROR) << "MinidumpThread has a memory region problem, " << - HexString(thread_.stack.start_of_memory_range) << "+" << - HexString(thread_.stack.memory.data_size); - return false; - } - - memory_ = new MinidumpMemoryRegion(minidump_); - memory_->SetDescriptor(&thread_.stack); - - valid_ = true; - return true; -} - - -MinidumpMemoryRegion* MinidumpThread::GetMemory() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetMemory"; - return NULL; - } - - return memory_; -} - - -MinidumpContext* MinidumpThread::GetContext() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetContext"; - return NULL; - } - - if (!context_) { - if (!minidump_->SeekSet(thread_.thread_context.rva)) { - BPLOG(ERROR) << "MinidumpThread cannot seek to context"; - return NULL; - } - - scoped_ptr context(new MinidumpContext(minidump_)); - - if (!context->Read(thread_.thread_context.data_size)) { - BPLOG(ERROR) << "MinidumpThread cannot read context"; - return NULL; - } - - context_ = context.release(); - } - - return context_; -} - - -bool MinidumpThread::GetThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpThread::GetThreadID requires " - "|thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThread for GetThreadID"; - return false; - } - - *thread_id = thread_.thread_id; - return true; -} - - -void MinidumpThread::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpThread cannot print invalid data"; - return; - } - - printf("MDRawThread\n"); - printf(" thread_id = 0x%x\n", thread_.thread_id); - printf(" suspend_count = %d\n", thread_.suspend_count); - printf(" priority_class = 0x%x\n", thread_.priority_class); - printf(" priority = 0x%x\n", thread_.priority); - printf(" teb = 0x%" PRIx64 "\n", thread_.teb); - printf(" stack.start_of_memory_range = 0x%" PRIx64 "\n", - thread_.stack.start_of_memory_range); - printf(" stack.memory.data_size = 0x%x\n", - thread_.stack.memory.data_size); - printf(" stack.memory.rva = 0x%x\n", thread_.stack.memory.rva); - printf(" thread_context.data_size = 0x%x\n", - thread_.thread_context.data_size); - printf(" thread_context.rva = 0x%x\n", - thread_.thread_context.rva); - - MinidumpContext* context = GetContext(); - if (context) { - printf("\n"); - context->Print(); - } else { - printf(" (no context)\n"); - printf("\n"); - } - - MinidumpMemoryRegion* memory = GetMemory(); - if (memory) { - printf("Stack\n"); - memory->Print(); - } else { - printf("No stack\n"); - } - printf("\n"); -} - - -// -// MinidumpThreadList -// - - -u_int32_t MinidumpThreadList::max_threads_ = 256; - - -MinidumpThreadList::MinidumpThreadList(Minidump* minidump) - : MinidumpStream(minidump), - id_to_thread_map_(), - threads_(NULL), - thread_count_(0) { -} - - -MinidumpThreadList::~MinidumpThreadList() { - delete threads_; -} - - -bool MinidumpThreadList::Read(u_int32_t expected_size) { - // Invalidate cached data. - id_to_thread_map_.clear(); - delete threads_; - threads_ = NULL; - thread_count_ = 0; - - valid_ = false; - - u_int32_t thread_count; - if (expected_size < sizeof(thread_count)) { - BPLOG(ERROR) << "MinidumpThreadList count size mismatch, " << - expected_size << " < " << sizeof(thread_count); - return false; - } - if (!minidump_->ReadBytes(&thread_count, sizeof(thread_count))) { - BPLOG(ERROR) << "MinidumpThreadList cannot read thread count"; - return false; - } - - if (minidump_->swap()) - Swap(&thread_count); - - if (thread_count > numeric_limits::max() / sizeof(MDRawThread)) { - BPLOG(ERROR) << "MinidumpThreadList thread count " << thread_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(thread_count) + - thread_count * sizeof(MDRawThread)) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(thread_count) + 4 + - thread_count * sizeof(MDRawThread)) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpThreadList cannot read threadlist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpThreadList size mismatch, " << expected_size << - " != " << sizeof(thread_count) + - thread_count * sizeof(MDRawThread); - return false; - } - } - - - if (thread_count > max_threads_) { - BPLOG(ERROR) << "MinidumpThreadList count " << thread_count << - " exceeds maximum " << max_threads_; - return false; - } - - if (thread_count != 0) { - scoped_ptr threads( - new MinidumpThreads(thread_count, MinidumpThread(minidump_))); - - for (unsigned int thread_index = 0; - thread_index < thread_count; - ++thread_index) { - MinidumpThread* thread = &(*threads)[thread_index]; - - // Assume that the file offset is correct after the last read. - if (!thread->Read()) { - BPLOG(ERROR) << "MinidumpThreadList cannot read thread " << - thread_index << "/" << thread_count; - return false; - } - - u_int32_t thread_id; - if (!thread->GetThreadID(&thread_id)) { - BPLOG(ERROR) << "MinidumpThreadList cannot get thread ID for thread " << - thread_index << "/" << thread_count; - return false; - } - - if (GetThreadByID(thread_id)) { - // Another thread with this ID is already in the list. Data error. - BPLOG(ERROR) << "MinidumpThreadList found multiple threads with ID " << - HexString(thread_id) << " at thread " << - thread_index << "/" << thread_count; - return false; - } - id_to_thread_map_[thread_id] = thread; - } - - threads_ = threads.release(); - } - - thread_count_ = thread_count; - - valid_ = true; - return true; -} - - -MinidumpThread* MinidumpThreadList::GetThreadAtIndex(unsigned int index) - const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpThreadList for GetThreadAtIndex"; - return NULL; - } - - if (index >= thread_count_) { - BPLOG(ERROR) << "MinidumpThreadList index out of range: " << - index << "/" << thread_count_; - return NULL; - } - - return &(*threads_)[index]; -} - - -MinidumpThread* MinidumpThreadList::GetThreadByID(u_int32_t thread_id) { - // Don't check valid_. Read calls this method before everything is - // validated. It is safe to not check valid_ here. - return id_to_thread_map_[thread_id]; -} - - -void MinidumpThreadList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpThreadList cannot print invalid data"; - return; - } - - printf("MinidumpThreadList\n"); - printf(" thread_count = %d\n", thread_count_); - printf("\n"); - - for (unsigned int thread_index = 0; - thread_index < thread_count_; - ++thread_index) { - printf("thread[%d]\n", thread_index); - - (*threads_)[thread_index].Print(); - } -} - - -// -// MinidumpModule -// - - -u_int32_t MinidumpModule::max_cv_bytes_ = 1024; -u_int32_t MinidumpModule::max_misc_bytes_ = 1024; - - -MinidumpModule::MinidumpModule(Minidump* minidump) - : MinidumpObject(minidump), - module_valid_(false), - has_debug_info_(false), - module_(), - name_(NULL), - cv_record_(NULL), - cv_record_signature_(MD_CVINFOUNKNOWN_SIGNATURE), - misc_record_(NULL) { -} - - -MinidumpModule::~MinidumpModule() { - delete name_; - delete cv_record_; - delete misc_record_; -} - - -bool MinidumpModule::Read() { - // Invalidate cached data. - delete name_; - name_ = NULL; - delete cv_record_; - cv_record_ = NULL; - cv_record_signature_ = MD_CVINFOUNKNOWN_SIGNATURE; - delete misc_record_; - misc_record_ = NULL; - - module_valid_ = false; - has_debug_info_ = false; - valid_ = false; - - if (!minidump_->ReadBytes(&module_, MD_MODULE_SIZE)) { - BPLOG(ERROR) << "MinidumpModule cannot read module"; - return false; - } - - if (minidump_->swap()) { - Swap(&module_.base_of_image); - Swap(&module_.size_of_image); - Swap(&module_.checksum); - Swap(&module_.time_date_stamp); - Swap(&module_.module_name_rva); - Swap(&module_.version_info.signature); - Swap(&module_.version_info.struct_version); - Swap(&module_.version_info.file_version_hi); - Swap(&module_.version_info.file_version_lo); - Swap(&module_.version_info.product_version_hi); - Swap(&module_.version_info.product_version_lo); - Swap(&module_.version_info.file_flags_mask); - Swap(&module_.version_info.file_flags); - Swap(&module_.version_info.file_os); - Swap(&module_.version_info.file_type); - Swap(&module_.version_info.file_subtype); - Swap(&module_.version_info.file_date_hi); - Swap(&module_.version_info.file_date_lo); - Swap(&module_.cv_record); - Swap(&module_.misc_record); - // Don't swap reserved fields because their contents are unknown (as - // are their proper widths). - } - - // Check for base + size overflow or undersize. - if (module_.size_of_image == 0 || - module_.size_of_image > - numeric_limits::max() - module_.base_of_image) { - BPLOG(ERROR) << "MinidumpModule has a module problem, " << - HexString(module_.base_of_image) << "+" << - HexString(module_.size_of_image); - return false; - } - - module_valid_ = true; - return true; -} - - -bool MinidumpModule::ReadAuxiliaryData() { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for ReadAuxiliaryData"; - return false; - } - - // Each module must have a name. - name_ = minidump_->ReadString(module_.module_name_rva); - if (!name_) { - BPLOG(ERROR) << "MinidumpModule could not read name"; - return false; - } - - // At this point, we have enough info for the module to be valid. - valid_ = true; - - // CodeView and miscellaneous debug records are only required if the - // module indicates that they exist. - if (module_.cv_record.data_size && !GetCVRecord(NULL)) { - BPLOG(ERROR) << "MinidumpModule has no CodeView record, " - "but one was expected"; - return false; - } - - if (module_.misc_record.data_size && !GetMiscRecord(NULL)) { - BPLOG(ERROR) << "MinidumpModule has no miscellaneous debug record, " - "but one was expected"; - return false; - } - - has_debug_info_ = true; - return true; -} - - -string MinidumpModule::code_file() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for code_file"; - return ""; - } - - return *name_; -} - - -string MinidumpModule::code_identifier() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for code_identifier"; - return ""; - } - - if (!has_debug_info_) - return ""; - - MinidumpSystemInfo *minidump_system_info = minidump_->GetSystemInfo(); - if (!minidump_system_info) { - BPLOG(ERROR) << "MinidumpModule code_identifier requires " - "MinidumpSystemInfo"; - return ""; - } - - const MDRawSystemInfo *raw_system_info = minidump_system_info->system_info(); - if (!raw_system_info) { - BPLOG(ERROR) << "MinidumpModule code_identifier requires MDRawSystemInfo"; - return ""; - } - - string identifier; - - switch (raw_system_info->platform_id) { - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: { - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[17]; - snprintf(identifier_string, sizeof(identifier_string), "%08X%x", - module_.time_date_stamp, module_.size_of_image); - identifier = identifier_string; - break; - } - - case MD_OS_MAC_OS_X: - case MD_OS_SOLARIS: - case MD_OS_LINUX: { - // TODO(mmentovai): support uuid extension if present, otherwise fall - // back to version (from LC_ID_DYLIB?), otherwise fall back to something - // else. - identifier = "id"; - break; - } - - default: { - // Without knowing what OS generated the dump, we can't generate a good - // identifier. Return an empty string, signalling failure. - BPLOG(ERROR) << "MinidumpModule code_identifier requires known platform, " - "found " << HexString(raw_system_info->platform_id); - break; - } - } - - return identifier; -} - - -string MinidumpModule::debug_file() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for debug_file"; - return ""; - } - - if (!has_debug_info_) - return ""; - - string file; - // Prefer the CodeView record if present. - if (cv_record_) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - // It's actually an MDCVInfoPDB70 structure. - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - // GetCVRecord guarantees pdb_file_name is null-terminated. - file = reinterpret_cast(cv_record_70->pdb_file_name); - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - // It's actually an MDCVInfoPDB20 structure. - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - // GetCVRecord guarantees pdb_file_name is null-terminated. - file = reinterpret_cast(cv_record_20->pdb_file_name); - } - - // If there's a CodeView record but it doesn't match a known signature, - // try the miscellaneous record. - } - - if (file.empty()) { - // No usable CodeView record. Try the miscellaneous debug record. - if (misc_record_) { - const MDImageDebugMisc* misc_record = - reinterpret_cast(&(*misc_record_)[0]); - if (!misc_record->unicode) { - // If it's not Unicode, just stuff it into the string. It's unclear - // if misc_record->data is 0-terminated, so use an explicit size. - file = string( - reinterpret_cast(misc_record->data), - module_.misc_record.data_size - MDImageDebugMisc_minsize); - } else { - // There's a misc_record but it encodes the debug filename in UTF-16. - // (Actually, because miscellaneous records are so old, it's probably - // UCS-2.) Convert it to UTF-8 for congruity with the other strings - // that this method (and all other methods in the Minidump family) - // return. - - unsigned int bytes = - module_.misc_record.data_size - MDImageDebugMisc_minsize; - if (bytes % 2 == 0) { - unsigned int utf16_words = bytes / 2; - - // UTF16ToUTF8 expects a vector, so create a temporary one - // and copy the UTF-16 data into it. - vector string_utf16(utf16_words); - if (utf16_words) - memcpy(&string_utf16[0], &misc_record->data, bytes); - - // GetMiscRecord already byte-swapped the data[] field if it contains - // UTF-16, so pass false as the swap argument. - scoped_ptr new_file(UTF16ToUTF8(string_utf16, false)); - file = *new_file; - } - } - } - } - - BPLOG_IF(ERROR, file.empty()) << "MinidumpModule could not determine " - "debug_file for " << *name_; - - return file; -} - - -string MinidumpModule::debug_identifier() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for debug_identifier"; - return ""; - } - - if (!has_debug_info_) - return ""; - - string identifier; - - // Use the CodeView record if present. - if (cv_record_) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - // It's actually an MDCVInfoPDB70 structure. - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[41]; - snprintf(identifier_string, sizeof(identifier_string), - "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%x", - cv_record_70->signature.data1, - cv_record_70->signature.data2, - cv_record_70->signature.data3, - cv_record_70->signature.data4[0], - cv_record_70->signature.data4[1], - cv_record_70->signature.data4[2], - cv_record_70->signature.data4[3], - cv_record_70->signature.data4[4], - cv_record_70->signature.data4[5], - cv_record_70->signature.data4[6], - cv_record_70->signature.data4[7], - cv_record_70->age); - identifier = identifier_string; - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - // It's actually an MDCVInfoPDB20 structure. - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record_)[0]); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - // Use the same format that the MS symbol server uses in filesystem - // hierarchies. - char identifier_string[17]; - snprintf(identifier_string, sizeof(identifier_string), - "%08X%x", cv_record_20->signature, cv_record_20->age); - identifier = identifier_string; - } - } - - // TODO(mmentovai): if there's no usable CodeView record, there might be a - // miscellaneous debug record. It only carries a filename, though, and no - // identifier. I'm not sure what the right thing to do for the identifier - // is in that case, but I don't expect to find many modules without a - // CodeView record (or some other Breakpad extension structure in place of - // a CodeView record). Treat it as an error (empty identifier) for now. - - // TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier(). - - BPLOG_IF(ERROR, identifier.empty()) << "MinidumpModule could not determine " - "debug_identifier for " << *name_; - - return identifier; -} - - -string MinidumpModule::version() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for version"; - return ""; - } - - string version; - - if (module_.version_info.signature == MD_VSFIXEDFILEINFO_SIGNATURE && - module_.version_info.struct_version & MD_VSFIXEDFILEINFO_VERSION && - (module_.version_info.file_version_hi != 0 || module_.version_info.file_version_lo != 0)) { - char version_string[24]; - snprintf(version_string, sizeof(version_string), "%u.%u.%u.%u", - module_.version_info.file_version_hi >> 16, - module_.version_info.file_version_hi & 0xffff, - module_.version_info.file_version_lo >> 16, - module_.version_info.file_version_lo & 0xffff); - version = version_string; - } - - // TODO(mmentovai): possibly support other struct types in place of - // the one used with MD_VSFIXEDFILEINFO_SIGNATURE. We can possibly use - // a different structure that better represents versioning facilities on - // Mac OS X and Linux, instead of forcing them to adhere to the dotted - // quad of 16-bit ints that Windows uses. - - BPLOG_IF(INFO, version.empty()) << "MinidumpModule could not determine " - "version for " << *name_; - - return version; -} - - -const CodeModule* MinidumpModule::Copy() const { - return new BasicCodeModule(this); -} - - -const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for GetCVRecord"; - return NULL; - } - - if (!cv_record_) { - // This just guards against 0-sized CodeView records; more specific checks - // are used when the signature is checked against various structure types. - if (module_.cv_record.data_size == 0) { - return NULL; - } - - if (!minidump_->SeekSet(module_.cv_record.rva)) { - BPLOG(ERROR) << "MinidumpModule could not seek to CodeView record"; - return NULL; - } - - if (module_.cv_record.data_size > max_cv_bytes_) { - BPLOG(ERROR) << "MinidumpModule CodeView record size " << - module_.cv_record.data_size << " exceeds maximum " << - max_cv_bytes_; - return NULL; - } - - // Allocating something that will be accessed as MDCVInfoPDB70 or - // MDCVInfoPDB20 but is allocated as u_int8_t[] can cause alignment - // problems. x86 and ppc are able to cope, though. This allocation - // style is needed because the MDCVInfoPDB70 or MDCVInfoPDB20 are - // variable-sized due to their pdb_file_name fields; these structures - // are not MDCVInfoPDB70_minsize or MDCVInfoPDB20_minsize and treating - // them as such would result in incomplete structures or overruns. - scoped_ptr< vector > cv_record( - new vector(module_.cv_record.data_size)); - - if (!minidump_->ReadBytes(&(*cv_record)[0], module_.cv_record.data_size)) { - BPLOG(ERROR) << "MinidumpModule could not read CodeView record"; - return NULL; - } - - u_int32_t signature = MD_CVINFOUNKNOWN_SIGNATURE; - if (module_.cv_record.data_size > sizeof(signature)) { - MDCVInfoPDB70* cv_record_signature = - reinterpret_cast(&(*cv_record)[0]); - signature = cv_record_signature->cv_signature; - if (minidump_->swap()) - Swap(&signature); - } - - if (signature == MD_CVINFOPDB70_SIGNATURE) { - // Now that the structure type is known, recheck the size. - if (MDCVInfoPDB70_minsize > module_.cv_record.data_size) { - BPLOG(ERROR) << "MinidumpModule CodeView7 record size mismatch, " << - MDCVInfoPDB70_minsize << " > " << - module_.cv_record.data_size; - return NULL; - } - - if (minidump_->swap()) { - MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(&(*cv_record)[0]); - Swap(&cv_record_70->cv_signature); - Swap(&cv_record_70->signature); - Swap(&cv_record_70->age); - // Don't swap cv_record_70.pdb_file_name because it's an array of 8-bit - // quantities. (It's a path, is it UTF-8?) - } - - // The last field of either structure is null-terminated 8-bit character - // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { - BPLOG(ERROR) << "MinidumpModule CodeView7 record string is not " - "0-terminated"; - return NULL; - } - } else if (signature == MD_CVINFOPDB20_SIGNATURE) { - // Now that the structure type is known, recheck the size. - if (MDCVInfoPDB20_minsize > module_.cv_record.data_size) { - BPLOG(ERROR) << "MinidumpModule CodeView2 record size mismatch, " << - MDCVInfoPDB20_minsize << " > " << - module_.cv_record.data_size; - return NULL; - } - if (minidump_->swap()) { - MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(&(*cv_record)[0]); - Swap(&cv_record_20->cv_header.signature); - Swap(&cv_record_20->cv_header.offset); - Swap(&cv_record_20->signature); - Swap(&cv_record_20->age); - // Don't swap cv_record_20.pdb_file_name because it's an array of 8-bit - // quantities. (It's a path, is it UTF-8?) - } - - // The last field of either structure is null-terminated 8-bit character - // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { - BPLOG(ERROR) << "MindumpModule CodeView2 record string is not " - "0-terminated"; - return NULL; - } - } - - // If the signature doesn't match something above, it's not something - // that Breakpad can presently handle directly. Because some modules in - // the wild contain such CodeView records as MD_CVINFOCV50_SIGNATURE, - // don't bail out here - allow the data to be returned to the user, - // although byte-swapping can't be done. - - // Store the vector type because that's how storage was allocated, but - // return it casted to u_int8_t*. - cv_record_ = cv_record.release(); - cv_record_signature_ = signature; - } - - if (size) - *size = module_.cv_record.data_size; - - return &(*cv_record_)[0]; -} - - -const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { - if (!module_valid_) { - BPLOG(ERROR) << "Invalid MinidumpModule for GetMiscRecord"; - return NULL; - } - - if (!misc_record_) { - if (module_.misc_record.data_size == 0) { - return NULL; - } - - if (MDImageDebugMisc_minsize > module_.misc_record.data_size) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record " - "size mismatch, " << MDImageDebugMisc_minsize << " > " << - module_.misc_record.data_size; - return NULL; - } - - if (!minidump_->SeekSet(module_.misc_record.rva)) { - BPLOG(ERROR) << "MinidumpModule could not seek to miscellaneous " - "debugging record"; - return NULL; - } - - if (module_.misc_record.data_size > max_misc_bytes_) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record size " << - module_.misc_record.data_size << " exceeds maximum " << - max_misc_bytes_; - return NULL; - } - - // Allocating something that will be accessed as MDImageDebugMisc but - // is allocated as u_int8_t[] can cause alignment problems. x86 and - // ppc are able to cope, though. This allocation style is needed - // because the MDImageDebugMisc is variable-sized due to its data field; - // this structure is not MDImageDebugMisc_minsize and treating it as such - // would result in an incomplete structure or an overrun. - scoped_ptr< vector > misc_record_mem( - new vector(module_.misc_record.data_size)); - MDImageDebugMisc* misc_record = - reinterpret_cast(&(*misc_record_mem)[0]); - - if (!minidump_->ReadBytes(misc_record, module_.misc_record.data_size)) { - BPLOG(ERROR) << "MinidumpModule could not read miscellaneous debugging " - "record"; - return NULL; - } - - if (minidump_->swap()) { - Swap(&misc_record->data_type); - Swap(&misc_record->length); - // Don't swap misc_record.unicode because it's an 8-bit quantity. - // Don't swap the reserved fields for the same reason, and because - // they don't contain any valid data. - if (misc_record->unicode) { - // There is a potential alignment problem, but shouldn't be a problem - // in practice due to the layout of MDImageDebugMisc. - u_int16_t* data16 = reinterpret_cast(&(misc_record->data)); - unsigned int dataBytes = module_.misc_record.data_size - - MDImageDebugMisc_minsize; - unsigned int dataLength = dataBytes / 2; - for (unsigned int characterIndex = 0; - characterIndex < dataLength; - ++characterIndex) { - Swap(&data16[characterIndex]); - } - } - } - - if (module_.misc_record.data_size != misc_record->length) { - BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record data " - "size mismatch, " << module_.misc_record.data_size << - " != " << misc_record->length; - return NULL; - } - - // Store the vector type because that's how storage was allocated, but - // return it casted to MDImageDebugMisc*. - misc_record_ = misc_record_mem.release(); - } - - if (size) - *size = module_.misc_record.data_size; - - return reinterpret_cast(&(*misc_record_)[0]); -} - - -void MinidumpModule::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpModule cannot print invalid data"; - return; - } - - printf("MDRawModule\n"); - printf(" base_of_image = 0x%" PRIx64 "\n", - module_.base_of_image); - printf(" size_of_image = 0x%x\n", - module_.size_of_image); - printf(" checksum = 0x%x\n", - module_.checksum); - printf(" time_date_stamp = 0x%x\n", - module_.time_date_stamp); - printf(" module_name_rva = 0x%x\n", - module_.module_name_rva); - printf(" version_info.signature = 0x%x\n", - module_.version_info.signature); - printf(" version_info.struct_version = 0x%x\n", - module_.version_info.struct_version); - printf(" version_info.file_version = 0x%x:0x%x\n", - module_.version_info.file_version_hi, - module_.version_info.file_version_lo); - printf(" version_info.product_version = 0x%x:0x%x\n", - module_.version_info.product_version_hi, - module_.version_info.product_version_lo); - printf(" version_info.file_flags_mask = 0x%x\n", - module_.version_info.file_flags_mask); - printf(" version_info.file_flags = 0x%x\n", - module_.version_info.file_flags); - printf(" version_info.file_os = 0x%x\n", - module_.version_info.file_os); - printf(" version_info.file_type = 0x%x\n", - module_.version_info.file_type); - printf(" version_info.file_subtype = 0x%x\n", - module_.version_info.file_subtype); - printf(" version_info.file_date = 0x%x:0x%x\n", - module_.version_info.file_date_hi, - module_.version_info.file_date_lo); - printf(" cv_record.data_size = %d\n", - module_.cv_record.data_size); - printf(" cv_record.rva = 0x%x\n", - module_.cv_record.rva); - printf(" misc_record.data_size = %d\n", - module_.misc_record.data_size); - printf(" misc_record.rva = 0x%x\n", - module_.misc_record.rva); - - printf(" (code_file) = \"%s\"\n", code_file().c_str()); - printf(" (code_identifier) = \"%s\"\n", - code_identifier().c_str()); - - u_int32_t cv_record_size; - const u_int8_t *cv_record = GetCVRecord(&cv_record_size); - if (cv_record) { - if (cv_record_signature_ == MD_CVINFOPDB70_SIGNATURE) { - const MDCVInfoPDB70* cv_record_70 = - reinterpret_cast(cv_record); - assert(cv_record_70->cv_signature == MD_CVINFOPDB70_SIGNATURE); - - printf(" (cv_record).cv_signature = 0x%x\n", - cv_record_70->cv_signature); - printf(" (cv_record).signature = %08x-%04x-%04x-%02x%02x-", - cv_record_70->signature.data1, - cv_record_70->signature.data2, - cv_record_70->signature.data3, - cv_record_70->signature.data4[0], - cv_record_70->signature.data4[1]); - for (unsigned int guidIndex = 2; - guidIndex < 8; - ++guidIndex) { - printf("%02x", cv_record_70->signature.data4[guidIndex]); - } - printf("\n"); - printf(" (cv_record).age = %d\n", - cv_record_70->age); - printf(" (cv_record).pdb_file_name = \"%s\"\n", - cv_record_70->pdb_file_name); - } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { - const MDCVInfoPDB20* cv_record_20 = - reinterpret_cast(cv_record); - assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); - - printf(" (cv_record).cv_header.signature = 0x%x\n", - cv_record_20->cv_header.signature); - printf(" (cv_record).cv_header.offset = 0x%x\n", - cv_record_20->cv_header.offset); - printf(" (cv_record).signature = 0x%x\n", - cv_record_20->signature); - printf(" (cv_record).age = %d\n", - cv_record_20->age); - printf(" (cv_record).pdb_file_name = \"%s\"\n", - cv_record_20->pdb_file_name); - } else { - printf(" (cv_record) = "); - for (unsigned int cv_byte_index = 0; - cv_byte_index < cv_record_size; - ++cv_byte_index) { - printf("%02x", cv_record[cv_byte_index]); - } - printf("\n"); - } - } else { - printf(" (cv_record) = (null)\n"); - } - - const MDImageDebugMisc* misc_record = GetMiscRecord(NULL); - if (misc_record) { - printf(" (misc_record).data_type = 0x%x\n", - misc_record->data_type); - printf(" (misc_record).length = 0x%x\n", - misc_record->length); - printf(" (misc_record).unicode = %d\n", - misc_record->unicode); - // Don't bother printing the UTF-16, we don't really even expect to ever - // see this misc_record anyway. - if (misc_record->unicode) - printf(" (misc_record).data = \"%s\"\n", - misc_record->data); - else - printf(" (misc_record).data = (UTF-16)\n"); - } else { - printf(" (misc_record) = (null)\n"); - } - - printf(" (debug_file) = \"%s\"\n", debug_file().c_str()); - printf(" (debug_identifier) = \"%s\"\n", - debug_identifier().c_str()); - printf(" (version) = \"%s\"\n", version().c_str()); - printf("\n"); -} - - -// -// MinidumpModuleList -// - - -u_int32_t MinidumpModuleList::max_modules_ = 1024; - - -MinidumpModuleList::MinidumpModuleList(Minidump* minidump) - : MinidumpStream(minidump), - range_map_(new RangeMap()), - modules_(NULL), - module_count_(0) { -} - - -MinidumpModuleList::~MinidumpModuleList() { - delete range_map_; - delete modules_; -} - - -bool MinidumpModuleList::Read(u_int32_t expected_size) { - // Invalidate cached data. - range_map_->Clear(); - delete modules_; - modules_ = NULL; - module_count_ = 0; - - valid_ = false; - - u_int32_t module_count; - if (expected_size < sizeof(module_count)) { - BPLOG(ERROR) << "MinidumpModuleList count size mismatch, " << - expected_size << " < " << sizeof(module_count); - return false; - } - if (!minidump_->ReadBytes(&module_count, sizeof(module_count))) { - BPLOG(ERROR) << "MinidumpModuleList could not read module count"; - return false; - } - - if (minidump_->swap()) - Swap(&module_count); - - if (module_count > numeric_limits::max() / MD_MODULE_SIZE) { - BPLOG(ERROR) << "MinidumpModuleList module count " << module_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(module_count) + - module_count * MD_MODULE_SIZE) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(module_count) + 4 + - module_count * MD_MODULE_SIZE) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpModuleList cannot read modulelist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpModuleList size mismatch, " << expected_size << - " != " << sizeof(module_count) + - module_count * MD_MODULE_SIZE; - return false; - } - } - - if (module_count > max_modules_) { - BPLOG(ERROR) << "MinidumpModuleList count " << module_count_ << - " exceeds maximum " << max_modules_; - return false; - } - - if (module_count != 0) { - scoped_ptr modules( - new MinidumpModules(module_count, MinidumpModule(minidump_))); - - for (unsigned int module_index = 0; - module_index < module_count; - ++module_index) { - MinidumpModule* module = &(*modules)[module_index]; - - // Assume that the file offset is correct after the last read. - if (!module->Read()) { - BPLOG(ERROR) << "MinidumpModuleList could not read module " << - module_index << "/" << module_count; - return false; - } - } - - // Loop through the module list once more to read additional data and - // build the range map. This is done in a second pass because - // MinidumpModule::ReadAuxiliaryData seeks around, and if it were - // included in the loop above, additional seeks would be needed where - // none are now to read contiguous data. - for (unsigned int module_index = 0; - module_index < module_count; - ++module_index) { - MinidumpModule* module = &(*modules)[module_index]; - - // ReadAuxiliaryData fails if any data that the module indicates should - // exist is missing, but we treat some such cases as valid anyway. See - // issue #222: if a debugging record is of a format that's too large to - // handle, it shouldn't render the entire dump invalid. Check module - // validity before giving up. - if (!module->ReadAuxiliaryData() && !module->valid()) { - BPLOG(ERROR) << "MinidumpModuleList could not read required module " - "auxiliary data for module " << - module_index << "/" << module_count; - return false; - } - - // It is safe to use module->code_file() after successfully calling - // module->ReadAuxiliaryData or noting that the module is valid. - - u_int64_t base_address = module->base_address(); - u_int64_t module_size = module->size(); - if (base_address == static_cast(-1)) { - BPLOG(ERROR) << "MinidumpModuleList found bad base address " - "for module " << module_index << "/" << module_count << - ", " << module->code_file(); - return false; - } - - if (!range_map_->StoreRange(base_address, module_size, module_index)) { - BPLOG(ERROR) << "MinidumpModuleList could not store module " << - module_index << "/" << module_count << ", " << - module->code_file() << ", " << - HexString(base_address) << "+" << - HexString(module_size); - return false; - } - } - - modules_ = modules.release(); - } - - module_count_ = module_count; - - valid_ = true; - return true; -} - - -const MinidumpModule* MinidumpModuleList::GetModuleForAddress( - u_int64_t address) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleForAddress"; - return NULL; - } - - unsigned int module_index; - if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) { - BPLOG(INFO) << "MinidumpModuleList has no module at " << - HexString(address); - return NULL; - } - - return GetModuleAtIndex(module_index); -} - - -const MinidumpModule* MinidumpModuleList::GetMainModule() const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetMainModule"; - return NULL; - } - - // The main code module is the first one present in a minidump file's - // MDRawModuleList. - return GetModuleAtSequence(0); -} - - -const MinidumpModule* MinidumpModuleList::GetModuleAtSequence( - unsigned int sequence) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtSequence"; - return NULL; - } - - if (sequence >= module_count_) { - BPLOG(ERROR) << "MinidumpModuleList sequence out of range: " << - sequence << "/" << module_count_; - return NULL; - } - - unsigned int module_index; - if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) { - BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence; - return NULL; - } - - return GetModuleAtIndex(module_index); -} - - -const MinidumpModule* MinidumpModuleList::GetModuleAtIndex( - unsigned int index) const { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtIndex"; - return NULL; - } - - if (index >= module_count_) { - BPLOG(ERROR) << "MinidumpModuleList index out of range: " << - index << "/" << module_count_; - return NULL; - } - - return &(*modules_)[index]; -} - - -const CodeModules* MinidumpModuleList::Copy() const { - return new BasicCodeModules(this); -} - - -void MinidumpModuleList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpModuleList cannot print invalid data"; - return; - } - - printf("MinidumpModuleList\n"); - printf(" module_count = %d\n", module_count_); - printf("\n"); - - for (unsigned int module_index = 0; - module_index < module_count_; - ++module_index) { - printf("module[%d]\n", module_index); - - (*modules_)[module_index].Print(); - } -} - - -// -// MinidumpMemoryList -// - - -u_int32_t MinidumpMemoryList::max_regions_ = 256; - - -MinidumpMemoryList::MinidumpMemoryList(Minidump* minidump) - : MinidumpStream(minidump), - range_map_(new RangeMap()), - descriptors_(NULL), - regions_(NULL), - region_count_(0) { -} - - -MinidumpMemoryList::~MinidumpMemoryList() { - delete range_map_; - delete descriptors_; - delete regions_; -} - - -bool MinidumpMemoryList::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete descriptors_; - descriptors_ = NULL; - delete regions_; - regions_ = NULL; - range_map_->Clear(); - region_count_ = 0; - - valid_ = false; - - u_int32_t region_count; - if (expected_size < sizeof(region_count)) { - BPLOG(ERROR) << "MinidumpMemoryList count size mismatch, " << - expected_size << " < " << sizeof(region_count); - return false; - } - if (!minidump_->ReadBytes(®ion_count, sizeof(region_count))) { - BPLOG(ERROR) << "MinidumpMemoryList could not read memory region count"; - return false; - } - - if (minidump_->swap()) - Swap(®ion_count); - - if (region_count > - numeric_limits::max() / sizeof(MDMemoryDescriptor)) { - BPLOG(ERROR) << "MinidumpMemoryList region count " << region_count << - " would cause multiplication overflow"; - return false; - } - - if (expected_size != sizeof(region_count) + - region_count * sizeof(MDMemoryDescriptor)) { - // may be padded with 4 bytes on 64bit ABIs for alignment - if (expected_size == sizeof(region_count) + 4 + - region_count * sizeof(MDMemoryDescriptor)) { - u_int32_t useless; - if (!minidump_->ReadBytes(&useless, 4)) { - BPLOG(ERROR) << "MinidumpMemoryList cannot read memorylist padded bytes"; - return false; - } - } else { - BPLOG(ERROR) << "MinidumpMemoryList size mismatch, " << expected_size << - " != " << sizeof(region_count) + - region_count * sizeof(MDMemoryDescriptor); - return false; - } - } - - if (region_count > max_regions_) { - BPLOG(ERROR) << "MinidumpMemoryList count " << region_count << - " exceeds maximum " << max_regions_; - return false; - } - - if (region_count != 0) { - scoped_ptr descriptors( - new MemoryDescriptors(region_count)); - - // Read the entire array in one fell swoop, instead of reading one entry - // at a time in the loop. - if (!minidump_->ReadBytes(&(*descriptors)[0], - sizeof(MDMemoryDescriptor) * region_count)) { - BPLOG(ERROR) << "MinidumpMemoryList could not read memory region list"; - return false; - } - - scoped_ptr regions( - new MemoryRegions(region_count, MinidumpMemoryRegion(minidump_))); - - for (unsigned int region_index = 0; - region_index < region_count; - ++region_index) { - MDMemoryDescriptor* descriptor = &(*descriptors)[region_index]; - - if (minidump_->swap()) - Swap(descriptor); - - u_int64_t base_address = descriptor->start_of_memory_range; - u_int32_t region_size = descriptor->memory.data_size; - - // Check for base + size overflow or undersize. - if (region_size == 0 || - region_size > numeric_limits::max() - base_address) { - BPLOG(ERROR) << "MinidumpMemoryList has a memory region problem, " << - " region " << region_index << "/" << region_count << - ", " << HexString(base_address) << "+" << - HexString(region_size); - return false; - } - - if (!range_map_->StoreRange(base_address, region_size, region_index)) { - BPLOG(ERROR) << "MinidumpMemoryList could not store memory region " << - region_index << "/" << region_count << ", " << - HexString(base_address) << "+" << - HexString(region_size); - return false; - } - - (*regions)[region_index].SetDescriptor(descriptor); - } - - descriptors_ = descriptors.release(); - regions_ = regions.release(); - } - - region_count_ = region_count; - - valid_ = true; - return true; -} - - -MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionAtIndex( - unsigned int index) { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionAtIndex"; - return NULL; - } - - if (index >= region_count_) { - BPLOG(ERROR) << "MinidumpMemoryList index out of range: " << - index << "/" << region_count_; - return NULL; - } - - return &(*regions_)[index]; -} - - -MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress( - u_int64_t address) { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionForAddress"; - return NULL; - } - - unsigned int region_index; - if (!range_map_->RetrieveRange(address, ®ion_index, NULL, NULL)) { - BPLOG(INFO) << "MinidumpMemoryList has no memory region at " << - HexString(address); - return NULL; - } - - return GetMemoryRegionAtIndex(region_index); -} - - -void MinidumpMemoryList::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMemoryList cannot print invalid data"; - return; - } - - printf("MinidumpMemoryList\n"); - printf(" region_count = %d\n", region_count_); - printf("\n"); - - for (unsigned int region_index = 0; - region_index < region_count_; - ++region_index) { - MDMemoryDescriptor* descriptor = &(*descriptors_)[region_index]; - printf("region[%d]\n", region_index); - printf("MDMemoryDescriptor\n"); - printf(" start_of_memory_range = 0x%" PRIx64 "\n", - descriptor->start_of_memory_range); - printf(" memory.data_size = 0x%x\n", descriptor->memory.data_size); - printf(" memory.rva = 0x%x\n", descriptor->memory.rva); - MinidumpMemoryRegion* region = GetMemoryRegionAtIndex(region_index); - if (region) { - printf("Memory\n"); - region->Print(); - } else { - printf("No memory\n"); - } - printf("\n"); - } -} - - -// -// MinidumpException -// - - -MinidumpException::MinidumpException(Minidump* minidump) - : MinidumpStream(minidump), - exception_(), - context_(NULL) { -} - - -MinidumpException::~MinidumpException() { - delete context_; -} - - -bool MinidumpException::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete context_; - context_ = NULL; - - valid_ = false; - - if (expected_size != sizeof(exception_)) { - BPLOG(ERROR) << "MinidumpException size mismatch, " << expected_size << - " != " << sizeof(exception_); - return false; - } - - if (!minidump_->ReadBytes(&exception_, sizeof(exception_))) { - BPLOG(ERROR) << "MinidumpException cannot read exception"; - return false; - } - - if (minidump_->swap()) { - Swap(&exception_.thread_id); - // exception_.__align is for alignment only and does not need to be - // swapped. - Swap(&exception_.exception_record.exception_code); - Swap(&exception_.exception_record.exception_flags); - Swap(&exception_.exception_record.exception_record); - Swap(&exception_.exception_record.exception_address); - Swap(&exception_.exception_record.number_parameters); - // exception_.exception_record.__align is for alignment only and does not - // need to be swapped. - for (unsigned int parameter_index = 0; - parameter_index < MD_EXCEPTION_MAXIMUM_PARAMETERS; - ++parameter_index) { - Swap(&exception_.exception_record.exception_information[parameter_index]); - } - Swap(&exception_.thread_context); - } - - valid_ = true; - return true; -} - - -bool MinidumpException::GetThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpException::GetThreadID requires " - "|thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpException for GetThreadID"; - return false; - } - - *thread_id = exception_.thread_id; - return true; -} - - -MinidumpContext* MinidumpException::GetContext() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpException for GetContext"; - return NULL; - } - - if (!context_) { - if (!minidump_->SeekSet(exception_.thread_context.rva)) { - BPLOG(ERROR) << "MinidumpException cannot seek to context"; - return NULL; - } - - scoped_ptr context(new MinidumpContext(minidump_)); - - if (!context->Read(exception_.thread_context.data_size)) { - BPLOG(ERROR) << "MinidumpException cannot read context"; - return NULL; - } - - context_ = context.release(); - } - - return context_; -} - - -void MinidumpException::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpException cannot print invalid data"; - return; - } - - printf("MDException\n"); - printf(" thread_id = 0x%x\n", - exception_.thread_id); - printf(" exception_record.exception_code = 0x%x\n", - exception_.exception_record.exception_code); - printf(" exception_record.exception_flags = 0x%x\n", - exception_.exception_record.exception_flags); - printf(" exception_record.exception_record = 0x%" PRIx64 "\n", - exception_.exception_record.exception_record); - printf(" exception_record.exception_address = 0x%" PRIx64 "\n", - exception_.exception_record.exception_address); - printf(" exception_record.number_parameters = %d\n", - exception_.exception_record.number_parameters); - for (unsigned int parameterIndex = 0; - parameterIndex < exception_.exception_record.number_parameters; - ++parameterIndex) { - printf(" exception_record.exception_information[%2d] = 0x%" PRIx64 "\n", - parameterIndex, - exception_.exception_record.exception_information[parameterIndex]); - } - printf(" thread_context.data_size = %d\n", - exception_.thread_context.data_size); - printf(" thread_context.rva = 0x%x\n", - exception_.thread_context.rva); - MinidumpContext* context = GetContext(); - if (context) { - printf("\n"); - context->Print(); - } else { - printf(" (no context)\n"); - printf("\n"); - } -} - - -// -// MinidumpSystemInfo -// - - -MinidumpSystemInfo::MinidumpSystemInfo(Minidump* minidump) - : MinidumpStream(minidump), - system_info_(), - csd_version_(NULL), - cpu_vendor_(NULL) { -} - - -MinidumpSystemInfo::~MinidumpSystemInfo() { - delete csd_version_; - delete cpu_vendor_; -} - - -bool MinidumpSystemInfo::Read(u_int32_t expected_size) { - // Invalidate cached data. - delete csd_version_; - csd_version_ = NULL; - delete cpu_vendor_; - cpu_vendor_ = NULL; - - valid_ = false; - - if (expected_size != sizeof(system_info_)) { - BPLOG(ERROR) << "MinidumpSystemInfo size mismatch, " << expected_size << - " != " << sizeof(system_info_); - return false; - } - - if (!minidump_->ReadBytes(&system_info_, sizeof(system_info_))) { - BPLOG(ERROR) << "MinidumpSystemInfo cannot read system info"; - return false; - } - - if (minidump_->swap()) { - Swap(&system_info_.processor_architecture); - Swap(&system_info_.processor_level); - Swap(&system_info_.processor_revision); - // number_of_processors and product_type are 8-bit quantities and need no - // swapping. - Swap(&system_info_.major_version); - Swap(&system_info_.minor_version); - Swap(&system_info_.build_number); - Swap(&system_info_.platform_id); - Swap(&system_info_.csd_version_rva); - Swap(&system_info_.suite_mask); - // Don't swap the reserved2 field because its contents are unknown. - - if (system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86 || - system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86_WIN64) { - for (unsigned int i = 0; i < 3; ++i) - Swap(&system_info_.cpu.x86_cpu_info.vendor_id[i]); - Swap(&system_info_.cpu.x86_cpu_info.version_information); - Swap(&system_info_.cpu.x86_cpu_info.feature_information); - Swap(&system_info_.cpu.x86_cpu_info.amd_extended_cpu_features); - } else { - for (unsigned int i = 0; i < 2; ++i) - Swap(&system_info_.cpu.other_cpu_info.processor_features[i]); - } - } - - valid_ = true; - return true; -} - - -string MinidumpSystemInfo::GetOS() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetOS"; - return NULL; - } - - string os; - - switch (system_info_.platform_id) { - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: - os = "windows"; - break; - - case MD_OS_MAC_OS_X: - os = "mac"; - break; - - case MD_OS_LINUX: - os = "linux"; - break; - - case MD_OS_SOLARIS: - os = "solaris"; - break; - - default: - BPLOG(ERROR) << "MinidumpSystemInfo unknown OS for platform " << - HexString(system_info_.platform_id); - break; - } - - return os; -} - - -string MinidumpSystemInfo::GetCPU() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPU"; - return ""; - } - - string cpu; - - switch (system_info_.processor_architecture) { - case MD_CPU_ARCHITECTURE_X86: - case MD_CPU_ARCHITECTURE_X86_WIN64: - cpu = "x86"; - break; - - case MD_CPU_ARCHITECTURE_PPC: - cpu = "ppc"; - break; - - case MD_CPU_ARCHITECTURE_SPARC: - cpu = "sparc"; - break; - - default: - BPLOG(ERROR) << "MinidumpSystemInfo unknown CPU for architecture " << - HexString(system_info_.processor_architecture); - break; - } - - return cpu; -} - - -const string* MinidumpSystemInfo::GetCSDVersion() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCSDVersion"; - return NULL; - } - - if (!csd_version_) - csd_version_ = minidump_->ReadString(system_info_.csd_version_rva); - - BPLOG_IF(ERROR, !csd_version_) << "MinidumpSystemInfo could not read " - "CSD version"; - - return csd_version_; -} - - -const string* MinidumpSystemInfo::GetCPUVendor() { - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPUVendor"; - return NULL; - } - - // CPU vendor information can only be determined from x86 minidumps. - if (!cpu_vendor_ && - (system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86 || - system_info_.processor_architecture == MD_CPU_ARCHITECTURE_X86_WIN64)) { - char cpu_vendor_string[13]; - snprintf(cpu_vendor_string, sizeof(cpu_vendor_string), - "%c%c%c%c%c%c%c%c%c%c%c%c", - system_info_.cpu.x86_cpu_info.vendor_id[0] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[0] >> 24) & 0xff, - system_info_.cpu.x86_cpu_info.vendor_id[1] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[1] >> 24) & 0xff, - system_info_.cpu.x86_cpu_info.vendor_id[2] & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 8) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 16) & 0xff, - (system_info_.cpu.x86_cpu_info.vendor_id[2] >> 24) & 0xff); - cpu_vendor_ = new string(cpu_vendor_string); - } - - return cpu_vendor_; -} - - -void MinidumpSystemInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpSystemInfo cannot print invalid data"; - return; - } - - printf("MDRawSystemInfo\n"); - printf(" processor_architecture = %d\n", - system_info_.processor_architecture); - printf(" processor_level = %d\n", - system_info_.processor_level); - printf(" processor_revision = 0x%x\n", - system_info_.processor_revision); - printf(" number_of_processors = %d\n", - system_info_.number_of_processors); - printf(" product_type = %d\n", - system_info_.product_type); - printf(" major_version = %d\n", - system_info_.major_version); - printf(" minor_version = %d\n", - system_info_.minor_version); - printf(" build_number = %d\n", - system_info_.build_number); - printf(" platform_id = %d\n", - system_info_.platform_id); - printf(" csd_version_rva = 0x%x\n", - system_info_.csd_version_rva); - printf(" suite_mask = 0x%x\n", - system_info_.suite_mask); - for (unsigned int i = 0; i < 3; ++i) { - printf(" cpu.x86_cpu_info.vendor_id[%d] = 0x%x\n", - i, system_info_.cpu.x86_cpu_info.vendor_id[i]); - } - printf(" cpu.x86_cpu_info.version_information = 0x%x\n", - system_info_.cpu.x86_cpu_info.version_information); - printf(" cpu.x86_cpu_info.feature_information = 0x%x\n", - system_info_.cpu.x86_cpu_info.feature_information); - printf(" cpu.x86_cpu_info.amd_extended_cpu_features = 0x%x\n", - system_info_.cpu.x86_cpu_info.amd_extended_cpu_features); - const string* csd_version = GetCSDVersion(); - if (csd_version) { - printf(" (csd_version) = \"%s\"\n", - csd_version->c_str()); - } else { - printf(" (csd_version) = (null)\n"); - } - const string* cpu_vendor = GetCPUVendor(); - if (cpu_vendor) { - printf(" (cpu_vendor) = \"%s\"\n", - cpu_vendor->c_str()); - } else { - printf(" (cpu_vendor) = (null)\n"); - } - printf("\n"); -} - - -// -// MinidumpMiscInfo -// - - -MinidumpMiscInfo::MinidumpMiscInfo(Minidump* minidump) - : MinidumpStream(minidump), - misc_info_() { -} - - -bool MinidumpMiscInfo::Read(u_int32_t expected_size) { - valid_ = false; - - if (expected_size != MD_MISCINFO_SIZE && - expected_size != MD_MISCINFO2_SIZE) { - BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << expected_size << - " != " << MD_MISCINFO_SIZE << ", " << MD_MISCINFO2_SIZE << - ")"; - return false; - } - - if (!minidump_->ReadBytes(&misc_info_, expected_size)) { - BPLOG(ERROR) << "MinidumpMiscInfo cannot read miscellaneous info"; - return false; - } - - if (minidump_->swap()) { - Swap(&misc_info_.size_of_info); - Swap(&misc_info_.flags1); - Swap(&misc_info_.process_id); - Swap(&misc_info_.process_create_time); - Swap(&misc_info_.process_user_time); - Swap(&misc_info_.process_kernel_time); - if (misc_info_.size_of_info > MD_MISCINFO_SIZE) { - Swap(&misc_info_.processor_max_mhz); - Swap(&misc_info_.processor_current_mhz); - Swap(&misc_info_.processor_mhz_limit); - Swap(&misc_info_.processor_max_idle_state); - Swap(&misc_info_.processor_current_idle_state); - } - } - - if (expected_size != misc_info_.size_of_info) { - BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << - expected_size << " != " << misc_info_.size_of_info; - return false; - } - - valid_ = true; - return true; -} - - -void MinidumpMiscInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpMiscInfo cannot print invalid data"; - return; - } - - printf("MDRawMiscInfo\n"); - printf(" size_of_info = %d\n", misc_info_.size_of_info); - printf(" flags1 = 0x%x\n", misc_info_.flags1); - printf(" process_id = 0x%x\n", misc_info_.process_id); - printf(" process_create_time = 0x%x\n", - misc_info_.process_create_time); - printf(" process_user_time = 0x%x\n", - misc_info_.process_user_time); - printf(" process_kernel_time = 0x%x\n", - misc_info_.process_kernel_time); - if (misc_info_.size_of_info > MD_MISCINFO_SIZE) { - printf(" processor_max_mhz = %d\n", - misc_info_.processor_max_mhz); - printf(" processor_current_mhz = %d\n", - misc_info_.processor_current_mhz); - printf(" processor_mhz_limit = %d\n", - misc_info_.processor_mhz_limit); - printf(" processor_max_idle_state = 0x%x\n", - misc_info_.processor_max_idle_state); - printf(" processor_current_idle_state = 0x%x\n", - misc_info_.processor_current_idle_state); - } - printf("\n"); -} - - -// -// MinidumpBreakpadInfo -// - - -MinidumpBreakpadInfo::MinidumpBreakpadInfo(Minidump* minidump) - : MinidumpStream(minidump), - breakpad_info_() { -} - - -bool MinidumpBreakpadInfo::Read(u_int32_t expected_size) { - valid_ = false; - - if (expected_size != sizeof(breakpad_info_)) { - BPLOG(ERROR) << "MinidumpBreakpadInfo size mismatch, " << expected_size << - " != " << sizeof(breakpad_info_); - return false; - } - - if (!minidump_->ReadBytes(&breakpad_info_, sizeof(breakpad_info_))) { - BPLOG(ERROR) << "MinidumpBreakpadInfo cannot read Breakpad info"; - return false; - } - - if (minidump_->swap()) { - Swap(&breakpad_info_.validity); - Swap(&breakpad_info_.dump_thread_id); - Swap(&breakpad_info_.requesting_thread_id); - } - - valid_ = true; - return true; -} - - -bool MinidumpBreakpadInfo::GetDumpThreadID(u_int32_t *thread_id) const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetDumpThreadID " - "requires |thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetDumpThreadID"; - return false; - } - - if (!(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID)) { - BPLOG(INFO) << "MinidumpBreakpadInfo has no dump thread"; - return false; - } - - *thread_id = breakpad_info_.dump_thread_id; - return true; -} - - -bool MinidumpBreakpadInfo::GetRequestingThreadID(u_int32_t *thread_id) - const { - BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetRequestingThreadID " - "requires |thread_id|"; - assert(thread_id); - *thread_id = 0; - - if (!thread_id || !valid_) { - BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetRequestingThreadID"; - return false; - } - - if (!(breakpad_info_.validity & - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID)) { - BPLOG(INFO) << "MinidumpBreakpadInfo has no requesting thread"; - return false; - } - - *thread_id = breakpad_info_.requesting_thread_id; - return true; -} - - -void MinidumpBreakpadInfo::Print() { - if (!valid_) { - BPLOG(ERROR) << "MinidumpBreakpadInfo cannot print invalid data"; - return; - } - - printf("MDRawBreakpadInfo\n"); - printf(" validity = 0x%x\n", breakpad_info_.validity); - - if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) { - printf(" dump_thread_id = 0x%x\n", breakpad_info_.dump_thread_id); - } else { - printf(" dump_thread_id = (invalid)\n"); - } - - if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) { - printf(" requesting_thread_id = 0x%x\n", - breakpad_info_.requesting_thread_id); - } else { - printf(" requesting_thread_id = (invalid)\n"); - } - - printf("\n"); -} - - -// -// Minidump -// - - -u_int32_t Minidump::max_streams_ = 128; -unsigned int Minidump::max_string_length_ = 1024; - - -Minidump::Minidump(const string& path) - : header_(), - directory_(NULL), - stream_map_(new MinidumpStreamMap()), - path_(path), - fd_(-1), - swap_(false), - valid_(false) { -} - - -Minidump::~Minidump() { - delete directory_; - delete stream_map_; - if (fd_ != -1) { - BPLOG(INFO) << "Minidump closing minidump on fd " << fd_; - close(fd_); - } -} - - -bool Minidump::Open() { - if (fd_ != -1) { - BPLOG(INFO) << "Minidump reopening minidump " << path_ << " on fd " << fd_; - - // The file is already open. Seek to the beginning, which is the position - // the file would be at if it were opened anew. - return SeekSet(0); - } - - // O_BINARY is useful (and defined) on Windows. On other platforms, it's - // useless, and because it's defined as 0 above, harmless. - fd_ = open(path_.c_str(), O_RDONLY | O_BINARY); - if (fd_ == -1) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "Minidump could not open minidump " << path_ << - ", error " << error_code << ": " << error_string; - return false; - } - - BPLOG(INFO) << "Minidump opened minidump " << path_ << " on fd " << fd_; - return true; -} - - -bool Minidump::Read() { - // Invalidate cached data. - delete directory_; - directory_ = NULL; - stream_map_->clear(); - - valid_ = false; - - if (!Open()) { - BPLOG(ERROR) << "Minidump cannot open minidump"; - return false; - } - - if (!ReadBytes(&header_, sizeof(MDRawHeader))) { - BPLOG(ERROR) << "Minidump cannot read header"; - return false; - } - - if (header_.signature != MD_HEADER_SIGNATURE) { - // The file may be byte-swapped. Under the present architecture, these - // classes don't know or need to know what CPU (or endianness) the - // minidump was produced on in order to parse it. Use the signature as - // a byte order marker. - u_int32_t signature_swapped = header_.signature; - Swap(&signature_swapped); - if (signature_swapped != MD_HEADER_SIGNATURE) { - // This isn't a minidump or a byte-swapped minidump. - BPLOG(ERROR) << "Minidump header signature mismatch: (" << - HexString(header_.signature) << ", " << - HexString(signature_swapped) << ") != " << - HexString(MD_HEADER_SIGNATURE); - return false; - } - swap_ = true; - } else { - // The file is not byte-swapped. Set swap_ false (it may have been true - // if the object is being reused?) - swap_ = false; - } - - BPLOG(INFO) << "Minidump " << (swap_ ? "" : "not ") << - "byte-swapping minidump"; - - if (swap_) { - Swap(&header_.signature); - Swap(&header_.version); - Swap(&header_.stream_count); - Swap(&header_.stream_directory_rva); - Swap(&header_.checksum); - Swap(&header_.time_date_stamp); - Swap(&header_.flags); - } - - // Version check. The high 16 bits of header_.version contain something - // else "implementation specific." - if ((header_.version & 0x0000ffff) != MD_HEADER_VERSION) { - BPLOG(ERROR) << "Minidump version mismatch: " << - HexString(header_.version & 0x0000ffff) << " != " << - HexString(MD_HEADER_VERSION); - return false; - } - - if (!SeekSet(header_.stream_directory_rva)) { - BPLOG(ERROR) << "Minidump cannot seek to stream directory"; - return false; - } - - if (header_.stream_count > max_streams_) { - BPLOG(ERROR) << "Minidump stream count " << header_.stream_count << - " exceeds maximum " << max_streams_; - return false; - } - - if (header_.stream_count != 0) { - scoped_ptr directory( - new MinidumpDirectoryEntries(header_.stream_count)); - - // Read the entire array in one fell swoop, instead of reading one entry - // at a time in the loop. - if (!ReadBytes(&(*directory)[0], - sizeof(MDRawDirectory) * header_.stream_count)) { - BPLOG(ERROR) << "Minidump cannot read stream directory"; - return false; - } - - for (unsigned int stream_index = 0; - stream_index < header_.stream_count; - ++stream_index) { - MDRawDirectory* directory_entry = &(*directory)[stream_index]; - - if (swap_) { - Swap(&directory_entry->stream_type); - Swap(&directory_entry->location); - } - - // Initialize the stream_map_ map, which speeds locating a stream by - // type. - unsigned int stream_type = directory_entry->stream_type; - switch (stream_type) { - case MD_THREAD_LIST_STREAM: - case MD_MODULE_LIST_STREAM: - case MD_MEMORY_LIST_STREAM: - case MD_EXCEPTION_STREAM: - case MD_SYSTEM_INFO_STREAM: - case MD_MISC_INFO_STREAM: - case MD_BREAKPAD_INFO_STREAM: { - if (stream_map_->find(stream_type) != stream_map_->end()) { - // Another stream with this type was already found. A minidump - // file should contain at most one of each of these stream types. - BPLOG(ERROR) << "Minidump found multiple streams of type " << - stream_type << ", but can only deal with one"; - return false; - } - // Fall through to default - } - - default: { - // Overwrites for stream types other than those above, but it's - // expected to be the user's burden in that case. - (*stream_map_)[stream_type].stream_index = stream_index; - } - } - } - - directory_ = directory.release(); - } - - valid_ = true; - return true; -} - - -MinidumpThreadList* Minidump::GetThreadList() { - MinidumpThreadList* thread_list; - return GetStream(&thread_list); -} - - -MinidumpModuleList* Minidump::GetModuleList() { - MinidumpModuleList* module_list; - return GetStream(&module_list); -} - - -MinidumpMemoryList* Minidump::GetMemoryList() { - MinidumpMemoryList* memory_list; - return GetStream(&memory_list); -} - - -MinidumpException* Minidump::GetException() { - MinidumpException* exception; - return GetStream(&exception); -} - - -MinidumpSystemInfo* Minidump::GetSystemInfo() { - MinidumpSystemInfo* system_info; - return GetStream(&system_info); -} - - -MinidumpMiscInfo* Minidump::GetMiscInfo() { - MinidumpMiscInfo* misc_info; - return GetStream(&misc_info); -} - - -MinidumpBreakpadInfo* Minidump::GetBreakpadInfo() { - MinidumpBreakpadInfo* breakpad_info; - return GetStream(&breakpad_info); -} - - -void Minidump::Print() { - if (!valid_) { - BPLOG(ERROR) << "Minidump cannot print invalid data"; - return; - } - - printf("MDRawHeader\n"); - printf(" signature = 0x%x\n", header_.signature); - printf(" version = 0x%x\n", header_.version); - printf(" stream_count = %d\n", header_.stream_count); - printf(" stream_directory_rva = 0x%x\n", header_.stream_directory_rva); - printf(" checksum = 0x%x\n", header_.checksum); - struct tm timestruct; - gmtime_r(reinterpret_cast(&header_.time_date_stamp), ×truct); - char timestr[20]; - strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", ×truct); - printf(" time_date_stamp = 0x%x %s\n", header_.time_date_stamp, - timestr); - printf(" flags = 0x%" PRIx64 "\n", header_.flags); - printf("\n"); - - for (unsigned int stream_index = 0; - stream_index < header_.stream_count; - ++stream_index) { - MDRawDirectory* directory_entry = &(*directory_)[stream_index]; - - printf("mDirectory[%d]\n", stream_index); - printf("MDRawDirectory\n"); - printf(" stream_type = %d\n", directory_entry->stream_type); - printf(" location.data_size = %d\n", - directory_entry->location.data_size); - printf(" location.rva = 0x%x\n", directory_entry->location.rva); - printf("\n"); - } - - printf("Streams:\n"); - for (MinidumpStreamMap::const_iterator iterator = stream_map_->begin(); - iterator != stream_map_->end(); - ++iterator) { - u_int32_t stream_type = iterator->first; - MinidumpStreamInfo info = iterator->second; - printf(" stream type 0x%x at index %d\n", stream_type, info.stream_index); - } - printf("\n"); -} - - -const MDRawDirectory* Minidump::GetDirectoryEntryAtIndex(unsigned int index) - const { - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for GetDirectoryEntryAtIndex"; - return NULL; - } - - if (index >= header_.stream_count) { - BPLOG(ERROR) << "Minidump stream directory index out of range: " << - index << "/" << header_.stream_count; - return NULL; - } - - return &(*directory_)[index]; -} - - -bool Minidump::ReadBytes(void* bytes, size_t count) { - // Can't check valid_ because Read needs to call this method before - // validity can be determined. The only member that this method - // depends on is mFD, and an unset or invalid fd may generate an - // error but should not cause a crash. - ssize_t bytes_read = read(fd_, bytes, count); - if (static_cast(bytes_read) != count) { - if (bytes_read == -1) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "ReadBytes: error " << error_code << ": " << error_string; - } else { - BPLOG(ERROR) << "ReadBytes: read " << bytes_read << "/" << count; - } - return false; - } - return true; -} - - -bool Minidump::SeekSet(off_t offset) { - // Can't check valid_ because Read needs to call this method before - // validity can be determined. The only member that this method - // depends on is mFD, and an unset or invalid fd may generate an - // error but should not cause a crash. - off_t sought = lseek(fd_, offset, SEEK_SET); - if (sought != offset) { - if (sought == -1) { - string error_string; - int error_code = ErrnoString(&error_string); - BPLOG(ERROR) << "SeekSet: error " << error_code << ": " << error_string; - } else { - BPLOG(ERROR) << "SeekSet: sought " << sought << "/" << offset; - } - return false; - } - return true; -} - - -string* Minidump::ReadString(off_t offset) { - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for ReadString"; - return NULL; - } - if (!SeekSet(offset)) { - BPLOG(ERROR) << "ReadString could not seek to string at offset " << offset; - return NULL; - } - - u_int32_t bytes; - if (!ReadBytes(&bytes, sizeof(bytes))) { - BPLOG(ERROR) << "ReadString could not read string size at offset " << - offset; - return NULL; - } - if (swap_) - Swap(&bytes); - - if (bytes % 2 != 0) { - BPLOG(ERROR) << "ReadString found odd-sized " << bytes << - "-byte string at offset " << offset; - return NULL; - } - unsigned int utf16_words = bytes / 2; - - if (utf16_words > max_string_length_) { - BPLOG(ERROR) << "ReadString string length " << utf16_words << - " exceeds maximum " << max_string_length_ << - " at offset " << offset; - return NULL; - } - - vector string_utf16(utf16_words); - - if (utf16_words) { - if (!ReadBytes(&string_utf16[0], bytes)) { - BPLOG(ERROR) << "ReadString could not read " << bytes << - "-byte string at offset " << offset; - return NULL; - } - } - - return UTF16ToUTF8(string_utf16, swap_); -} - - -bool Minidump::SeekToStreamType(u_int32_t stream_type, - u_int32_t* stream_length) { - BPLOG_IF(ERROR, !stream_length) << "Minidump::SeekToStreamType requires " - "|stream_length|"; - assert(stream_length); - *stream_length = 0; - - if (!valid_) { - BPLOG(ERROR) << "Invalid Mindump for SeekToStreamType"; - return false; - } - - MinidumpStreamMap::const_iterator iterator = stream_map_->find(stream_type); - if (iterator == stream_map_->end()) { - // This stream type didn't exist in the directory. - BPLOG(INFO) << "SeekToStreamType: type " << stream_type << " not present"; - return false; - } - - MinidumpStreamInfo info = iterator->second; - if (info.stream_index >= header_.stream_count) { - BPLOG(ERROR) << "SeekToStreamType: type " << stream_type << - " out of range: " << - info.stream_index << "/" << header_.stream_count; - return false; - } - - MDRawDirectory* directory_entry = &(*directory_)[info.stream_index]; - if (!SeekSet(directory_entry->location.rva)) { - BPLOG(ERROR) << "SeekToStreamType could not seek to stream type " << - stream_type; - return false; - } - - *stream_length = directory_entry->location.data_size; - - return true; -} - - -template -T* Minidump::GetStream(T** stream) { - // stream is a garbage parameter that's present only to account for C++'s - // inability to overload a method based solely on its return type. - - const u_int32_t stream_type = T::kStreamType; - - BPLOG_IF(ERROR, !stream) << "Minidump::GetStream type " << stream_type << - " requires |stream|"; - assert(stream); - *stream = NULL; - - if (!valid_) { - BPLOG(ERROR) << "Invalid Minidump for GetStream type " << stream_type; - return NULL; - } - - MinidumpStreamMap::iterator iterator = stream_map_->find(stream_type); - if (iterator == stream_map_->end()) { - // This stream type didn't exist in the directory. - BPLOG(INFO) << "GetStream: type " << stream_type << " not present"; - return NULL; - } - - // Get a pointer so that the stored stream field can be altered. - MinidumpStreamInfo* info = &iterator->second; - - if (info->stream) { - // This cast is safe because info.stream is only populated by this - // method, and there is a direct correlation between T and stream_type. - *stream = static_cast(info->stream); - return *stream; - } - - u_int32_t stream_length; - if (!SeekToStreamType(stream_type, &stream_length)) { - BPLOG(ERROR) << "GetStream could not seek to stream type " << stream_type; - return NULL; - } - - scoped_ptr new_stream(new T(this)); - - if (!new_stream->Read(stream_length)) { - BPLOG(ERROR) << "GetStream could not read stream type " << stream_type; - return NULL; - } - - *stream = new_stream.release(); - info->stream = *stream; - return *stream; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_dump b/thirdparty/google-breakpad/r318/src/processor/minidump_dump deleted file mode 100644 index 579bf6bd..00000000 Binary files a/thirdparty/google-breakpad/r318/src/processor/minidump_dump and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_dump.cc b/thirdparty/google-breakpad/r318/src/processor/minidump_dump.cc deleted file mode 100644 index 12a699de..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_dump.cc +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_dump.cc: Print the contents of a minidump file in somewhat -// readable text. -// -// Author: Mark Mentovai - -#include - -#include "google_breakpad/processor/minidump.h" -#include "processor/logging.h" - -namespace { - -using google_breakpad::Minidump; -using google_breakpad::MinidumpThreadList; -using google_breakpad::MinidumpModuleList; -using google_breakpad::MinidumpMemoryList; -using google_breakpad::MinidumpException; -using google_breakpad::MinidumpSystemInfo; -using google_breakpad::MinidumpMiscInfo; -using google_breakpad::MinidumpBreakpadInfo; - -static bool PrintMinidumpDump(const char *minidump_file) { - Minidump minidump(minidump_file); - if (!minidump.Read()) { - BPLOG(ERROR) << "minidump.Read() failed"; - return false; - } - minidump.Print(); - - int errors = 0; - - MinidumpThreadList *thread_list = minidump.GetThreadList(); - if (!thread_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetThreadList() failed"; - } else { - thread_list->Print(); - } - - MinidumpModuleList *module_list = minidump.GetModuleList(); - if (!module_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetModuleList() failed"; - } else { - module_list->Print(); - } - - MinidumpMemoryList *memory_list = minidump.GetMemoryList(); - if (!memory_list) { - ++errors; - BPLOG(ERROR) << "minidump.GetMemoryList() failed"; - } else { - memory_list->Print(); - } - - MinidumpException *exception = minidump.GetException(); - if (!exception) { - BPLOG(INFO) << "minidump.GetException() failed"; - } else { - exception->Print(); - } - - MinidumpSystemInfo *system_info = minidump.GetSystemInfo(); - if (!system_info) { - ++errors; - BPLOG(ERROR) << "minidump.GetSystemInfo() failed"; - } else { - system_info->Print(); - } - - MinidumpMiscInfo *misc_info = minidump.GetMiscInfo(); - if (!misc_info) { - ++errors; - BPLOG(ERROR) << "minidump.GetMiscInfo() failed"; - } else { - misc_info->Print(); - } - - MinidumpBreakpadInfo *breakpad_info = minidump.GetBreakpadInfo(); - if (!breakpad_info) { - // Breakpad info is optional, so don't treat this as an error. - BPLOG(INFO) << "minidump.GetBreakpadInfo() failed"; - } else { - breakpad_info->Print(); - } - - return errors == 0; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - if (argc != 2) { - fprintf(stderr, "usage: %s \n", argv[0]); - return 1; - } - - return PrintMinidumpDump(argv[1]) ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_dump_test b/thirdparty/google-breakpad/r318/src/processor/minidump_dump_test deleted file mode 100644 index fb62ace7..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_dump_test +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_dump $testdata_dir/minidump2.dmp | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.dump.out - -exit $? diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_processor.cc b/thirdparty/google-breakpad/r318/src/processor/minidump_processor.cc deleted file mode 100644 index 3c609170..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_processor.cc +++ /dev/null @@ -1,992 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/process_state.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stackwalker_x86.h" - -namespace google_breakpad { - -MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : supplier_(supplier), resolver_(resolver) { -} - -MinidumpProcessor::~MinidumpProcessor() { -} - -MinidumpProcessor::ProcessResult MinidumpProcessor::Process( - const string &minidump_file, ProcessState *process_state) { - BPLOG(INFO) << "Processing minidump in file " << minidump_file; - - Minidump dump(minidump_file); - if (!dump.Read()) { - BPLOG(ERROR) << "Minidump " << minidump_file << " could not be read"; - return PROCESS_ERROR; - } - - process_state->Clear(); - - const MDRawHeader *header = dump.header(); - BPLOG_IF(ERROR, !header) << "Minidump " << minidump_file << " has no header"; - assert(header); - process_state->time_date_stamp_ = header->time_date_stamp; - - bool has_cpu_info = GetCPUInfo(&dump, &process_state->system_info_); - bool has_os_info = GetOSInfo(&dump, &process_state->system_info_); - - u_int32_t dump_thread_id = 0; - bool has_dump_thread = false; - u_int32_t requesting_thread_id = 0; - bool has_requesting_thread = false; - - MinidumpBreakpadInfo *breakpad_info = dump.GetBreakpadInfo(); - if (breakpad_info) { - has_dump_thread = breakpad_info->GetDumpThreadID(&dump_thread_id); - has_requesting_thread = - breakpad_info->GetRequestingThreadID(&requesting_thread_id); - } - - MinidumpException *exception = dump.GetException(); - if (exception) { - process_state->crashed_ = true; - has_requesting_thread = exception->GetThreadID(&requesting_thread_id); - - process_state->crash_reason_ = GetCrashReason( - &dump, &process_state->crash_address_); - } - - MinidumpModuleList *module_list = dump.GetModuleList(); - - // Put a copy of the module list into ProcessState object. This is not - // necessarily a MinidumpModuleList, but it adheres to the CodeModules - // interface, which is all that ProcessState needs to expose. - if (module_list) - process_state->modules_ = module_list->Copy(); - - MinidumpThreadList *threads = dump.GetThreadList(); - if (!threads) { - BPLOG(ERROR) << "Minidump " << minidump_file << " has no thread list"; - return PROCESS_ERROR; - } - - BPLOG(INFO) << "Minidump " << minidump_file << " has " << - (has_cpu_info ? "" : "no ") << "CPU info, " << - (has_os_info ? "" : "no ") << "OS info, " << - (breakpad_info != NULL ? "" : "no ") << "Breakpad info, " << - (exception != NULL ? "" : "no ") << "exception, " << - (module_list != NULL ? "" : "no ") << "module list, " << - (threads != NULL ? "" : "no ") << "thread list, " << - (has_dump_thread ? "" : "no ") << "dump thread, and " << - (has_requesting_thread ? "" : "no ") << "requesting thread"; - - bool interrupted = false; - bool found_requesting_thread = false; - unsigned int thread_count = threads->thread_count(); - for (unsigned int thread_index = 0; - thread_index < thread_count; - ++thread_index) { - char thread_string_buffer[64]; - snprintf(thread_string_buffer, sizeof(thread_string_buffer), "%d/%d", - thread_index, thread_count); - string thread_string = minidump_file + ":" + thread_string_buffer; - - MinidumpThread *thread = threads->GetThreadAtIndex(thread_index); - if (!thread) { - BPLOG(ERROR) << "Could not get thread for " << thread_string; - return PROCESS_ERROR; - } - - u_int32_t thread_id; - if (!thread->GetThreadID(&thread_id)) { - BPLOG(ERROR) << "Could not get thread ID for " << thread_string; - return PROCESS_ERROR; - } - - thread_string += " id " + HexString(thread_id); - BPLOG(INFO) << "Looking at thread " << thread_string; - - // If this thread is the thread that produced the minidump, don't process - // it. Because of the problems associated with a thread producing a - // dump of itself (when both its context and its stack are in flux), - // processing that stack wouldn't provide much useful data. - if (has_dump_thread && thread_id == dump_thread_id) { - continue; - } - - MinidumpContext *context = thread->GetContext(); - - if (has_requesting_thread && thread_id == requesting_thread_id) { - if (found_requesting_thread) { - // There can't be more than one requesting thread. - BPLOG(ERROR) << "Duplicate requesting thread: " << thread_string; - return PROCESS_ERROR; - } - - // Use processed_state->threads_.size() instead of thread_index. - // thread_index points to the thread index in the minidump, which - // might be greater than the thread index in the threads vector if - // any of the minidump's threads are skipped and not placed into the - // processed threads vector. The thread vector's current size will - // be the index of the current thread when it's pushed into the - // vector. - process_state->requesting_thread_ = process_state->threads_.size(); - - found_requesting_thread = true; - - if (process_state->crashed_) { - // Use the exception record's context for the crashed thread, instead - // of the thread's own context. For the crashed thread, the thread's - // own context is the state inside the exception handler. Using it - // would not result in the expected stack trace from the time of the - // crash. - context = exception->GetContext(); - } - } - - MinidumpMemoryRegion *thread_memory = thread->GetMemory(); - if (!thread_memory) { - BPLOG(ERROR) << "No memory region for " << thread_string; - return PROCESS_ERROR; - } - - // Use process_state->modules_ instead of module_list, because the - // |modules| argument will be used to populate the |module| fields in - // the returned StackFrame objects, which will be placed into the - // returned ProcessState object. module_list's lifetime is only as - // long as the Minidump object: it will be deleted when this function - // returns. process_state->modules_ is owned by the ProcessState object - // (just like the StackFrame objects), and is much more suitable for this - // task. - scoped_ptr stackwalker( - Stackwalker::StackwalkerForCPU(process_state->system_info(), - context, - thread_memory, - process_state->modules_, - supplier_, - resolver_)); - if (!stackwalker.get()) { - BPLOG(ERROR) << "No stackwalker for " << thread_string; - return PROCESS_ERROR; - } - - scoped_ptr stack(new CallStack()); - if (!stackwalker->Walk(stack.get())) { - BPLOG(INFO) << "Stackwalker interrupt (missing symbols?) at " << - thread_string; - interrupted = true; - } - process_state->threads_.push_back(stack.release()); - } - - if (interrupted) { - BPLOG(INFO) << "Processing interrupted for " << minidump_file; - return PROCESS_INTERRUPTED; - } - - // If a requesting thread was indicated, it must be present. - if (has_requesting_thread && !found_requesting_thread) { - // Don't mark as an error, but invalidate the requesting thread - BPLOG(ERROR) << "Minidump indicated requesting thread " << - HexString(requesting_thread_id) << ", not found in " << - minidump_file; - process_state->requesting_thread_ = -1; - } - - BPLOG(INFO) << "Processed " << minidump_file; - return PROCESS_OK; -} - -// Returns the MDRawSystemInfo from a minidump, or NULL if system info is -// not available from the minidump. If system_info is non-NULL, it is used -// to pass back the MinidumpSystemInfo object. -static const MDRawSystemInfo* GetSystemInfo(Minidump *dump, - MinidumpSystemInfo **system_info) { - MinidumpSystemInfo *minidump_system_info = dump->GetSystemInfo(); - if (!minidump_system_info) - return NULL; - - if (system_info) - *system_info = minidump_system_info; - - return minidump_system_info->system_info(); -} - -// static -bool MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { - assert(dump); - assert(info); - - info->cpu.clear(); - info->cpu_info.clear(); - - MinidumpSystemInfo *system_info; - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); - if (!raw_system_info) - return false; - - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_X86: - case MD_CPU_ARCHITECTURE_AMD64: { - if (raw_system_info->processor_architecture == - MD_CPU_ARCHITECTURE_X86) - info->cpu = "x86"; - else - info->cpu = "amd64"; - - const string *cpu_vendor = system_info->GetCPUVendor(); - if (cpu_vendor) { - info->cpu_info = *cpu_vendor; - info->cpu_info.append(" "); - } - - char x86_info[36]; - snprintf(x86_info, sizeof(x86_info), "family %u model %u stepping %u", - raw_system_info->processor_level, - raw_system_info->processor_revision >> 8, - raw_system_info->processor_revision & 0xff); - info->cpu_info.append(x86_info); - break; - } - - case MD_CPU_ARCHITECTURE_PPC: { - info->cpu = "ppc"; - break; - } - - case MD_CPU_ARCHITECTURE_SPARC: { - info->cpu = "sparc"; - break; - } - - default: { - // Assign the numeric architecture ID into the CPU string. - char cpu_string[7]; - snprintf(cpu_string, sizeof(cpu_string), "0x%04x", - raw_system_info->processor_architecture); - info->cpu = cpu_string; - break; - } - } - - info->cpu_count = raw_system_info->number_of_processors; - - return true; -} - -// static -bool MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { - assert(dump); - assert(info); - - info->os.clear(); - info->os_short.clear(); - info->os_version.clear(); - - MinidumpSystemInfo *system_info; - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); - if (!raw_system_info) - return false; - - info->os_short = system_info->GetOS(); - - switch (raw_system_info->platform_id) { - case MD_OS_WIN32_NT: { - info->os = "Windows NT"; - break; - } - - case MD_OS_WIN32_WINDOWS: { - info->os = "Windows"; - break; - } - - case MD_OS_MAC_OS_X: { - info->os = "Mac OS X"; - break; - } - - case MD_OS_LINUX: { - info->os = "Linux"; - break; - } - - case MD_OS_SOLARIS: { - info->os = "Solaris"; - break; - } - - default: { - // Assign the numeric platform ID into the OS string. - char os_string[11]; - snprintf(os_string, sizeof(os_string), "0x%08x", - raw_system_info->platform_id); - info->os = os_string; - break; - } - } - - char os_version_string[33]; - snprintf(os_version_string, sizeof(os_version_string), "%u.%u.%u", - raw_system_info->major_version, - raw_system_info->minor_version, - raw_system_info->build_number); - info->os_version = os_version_string; - - const string *csd_version = system_info->GetCSDVersion(); - if (csd_version) { - info->os_version.append(" "); - info->os_version.append(*csd_version); - } - - return true; -} - -// static -string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { - MinidumpException *exception = dump->GetException(); - if (!exception) - return ""; - - const MDRawExceptionStream *raw_exception = exception->exception(); - if (!raw_exception) - return ""; - - if (address) - *address = raw_exception->exception_record.exception_address; - - // The reason value is OS-specific and possibly CPU-specific. Set up - // sensible numeric defaults for the reason string in case we can't - // map the codes to a string (because there's no system info, or because - // it's an unrecognized platform, or because it's an unrecognized code.) - char reason_string[24]; - u_int32_t exception_code = raw_exception->exception_record.exception_code; - u_int32_t exception_flags = raw_exception->exception_record.exception_flags; - snprintf(reason_string, sizeof(reason_string), "0x%08x / 0x%08x", - exception_code, exception_flags); - string reason = reason_string; - - const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, NULL); - if (!raw_system_info) - return reason; - - switch (raw_system_info->platform_id) { - case MD_OS_MAC_OS_X: { - char flags_string[11]; - snprintf(flags_string, sizeof(flags_string), "0x%08x", exception_flags); - switch (exception_code) { - case MD_EXCEPTION_MAC_BAD_ACCESS: - reason = "EXC_BAD_ACCESS / "; - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS: - reason.append("KERN_INVALID_ADDRESS"); - break; - case MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE: - reason.append("KERN_PROTECTION_FAILURE"); - break; - case MD_EXCEPTION_CODE_MAC_NO_ACCESS: - reason.append("KERN_NO_ACCESS"); - break; - case MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE: - reason.append("KERN_MEMORY_FAILURE"); - break; - case MD_EXCEPTION_CODE_MAC_MEMORY_ERROR: - reason.append("KERN_MEMORY_ERROR"); - break; - // These are ppc only but shouldn't be a problem as they're - // unused on x86 - case MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ: - reason.append("EXC_PPC_VM_PROT_READ"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_BADSPACE: - reason.append("EXC_PPC_BADSPACE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED: - reason.append("EXC_PPC_UNALIGNED"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_BAD_INSTRUCTION: - reason = "EXC_BAD_INSTRUCTION / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL: - reason.append("EXC_PPC_INVALID_SYSCALL"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION: - reason.append("EXC_PPC_UNIPL_INST"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION: - reason.append("EXC_PPC_PRIVINST"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER: - reason.append("EXC_PPC_PRIVREG"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_TRACE: - reason.append("EXC_PPC_TRACE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR: - reason.append("EXC_PPC_PERFMON"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION: - reason.append("EXC_I386_INVOP"); - break; - case MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT: - reason.append("EXC_INVTSSFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT: - reason.append("EXC_SEGNPFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT: - reason.append("EXC_STKFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT: - reason.append("EXC_GPFLT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT: - reason.append("EXC_ALIGNFLT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_ARITHMETIC: - reason = "EXC_ARITHMETIC / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW: - reason.append("EXC_PPC_OVERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE: - reason.append("EXC_PPC_ZERO_DIVIDE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT: - reason.append("EXC_FLT_INEXACT"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE: - reason.append("EXC_PPC_FLT_ZERO_DIVIDE"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW: - reason.append("EXC_PPC_FLT_UNDERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW: - reason.append("EXC_PPC_FLT_OVERFLOW"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER: - reason.append("EXC_PPC_FLT_NOT_A_NUMBER"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION: - reason.append("EXC_PPC_NOEMULATION"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST: - reason.append("EXC_PPC_ALTIVECASSIST"); - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_DIV: - reason.append("EXC_I386_DIV"); - break; - case MD_EXCEPTION_CODE_MAC_X86_INTO: - reason.append("EXC_I386_INTO"); - break; - case MD_EXCEPTION_CODE_MAC_X86_NOEXT: - reason.append("EXC_I386_NOEXT"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EXTOVR: - reason.append("EXC_I386_EXTOVR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EXTERR: - reason.append("EXC_I386_EXTERR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_EMERR: - reason.append("EXC_I386_EMERR"); - break; - case MD_EXCEPTION_CODE_MAC_X86_BOUND: - reason.append("EXC_I386_BOUND"); - break; - case MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR: - reason.append("EXC_I386_SSEEXTERR"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_EMULATION: - reason = "EXC_EMULATION / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_SOFTWARE: - reason = "EXC_SOFTWARE / "; - switch (exception_flags) { - // These are ppc only but shouldn't be a problem as they're - // unused on x86 - case MD_EXCEPTION_CODE_MAC_PPC_TRAP: - reason.append("EXC_PPC_TRAP"); - break; - case MD_EXCEPTION_CODE_MAC_PPC_MIGRATE: - reason.append("EXC_PPC_MIGRATE"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_BREAKPOINT: - reason = "EXC_BREAKPOINT / "; - switch (raw_system_info->processor_architecture) { - case MD_CPU_ARCHITECTURE_PPC: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT: - reason.append("EXC_PPC_BREAKPOINT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - case MD_CPU_ARCHITECTURE_X86: { - switch (exception_flags) { - case MD_EXCEPTION_CODE_MAC_X86_SGL: - reason.append("EXC_I386_SGL"); - break; - case MD_EXCEPTION_CODE_MAC_X86_BPT: - reason.append("EXC_I386_BPT"); - break; - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - default: - reason.append(flags_string); - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - case MD_EXCEPTION_MAC_SYSCALL: - reason = "EXC_SYSCALL / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_MACH_SYSCALL: - reason = "EXC_MACH_SYSCALL / "; - reason.append(flags_string); - break; - case MD_EXCEPTION_MAC_RPC_ALERT: - reason = "EXC_RPC_ALERT / "; - reason.append(flags_string); - break; - } - break; - } - - case MD_OS_WIN32_NT: - case MD_OS_WIN32_WINDOWS: { - switch (exception_code) { - case MD_EXCEPTION_CODE_WIN_CONTROL_C: - reason = "DBG_CONTROL_C"; - break; - case MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION: - reason = "EXCEPTION_GUARD_PAGE"; - break; - case MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT: - reason = "EXCEPTION_DATATYPE_MISALIGNMENT"; - break; - case MD_EXCEPTION_CODE_WIN_BREAKPOINT: - reason = "EXCEPTION_BREAKPOINT"; - break; - case MD_EXCEPTION_CODE_WIN_SINGLE_STEP: - reason = "EXCEPTION_SINGLE_STEP"; - break; - case MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION: - // For EXCEPTION_ACCESS_VIOLATION, Windows puts the address that - // caused the fault in exception_information[1]. - // exception_information[0] is 0 if the violation was caused by - // an attempt to read data and 1 if it was an attempt to write - // data. - // This information is useful in addition to the code address, which - // will be present in the crash thread's instruction field anyway. - reason = "EXCEPTION_ACCESS_VIOLATION"; - if (address && - raw_exception->exception_record.number_parameters >= 2) { - *address = - raw_exception->exception_record.exception_information[1]; - } - break; - case MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR: - reason = "EXCEPTION_IN_PAGE_ERROR"; - break; - case MD_EXCEPTION_CODE_WIN_INVALID_HANDLE: - reason = "EXCEPTION_INVALID_HANDLE"; - break; - case MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION: - reason = "EXCEPTION_ILLEGAL_INSTRUCTION"; - break; - case MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION: - reason = "EXCEPTION_NONCONTINUABLE_EXCEPTION"; - break; - case MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION: - reason = "EXCEPTION_INVALID_DISPOSITION"; - break; - case MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED: - reason = "EXCEPTION_BOUNDS_EXCEEDED"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND: - reason = "EXCEPTION_FLT_DENORMAL_OPERAND"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO: - reason = "EXCEPTION_FLT_DIVIDE_BY_ZERO"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT: - reason = "EXCEPTION_FLT_INEXACT_RESULT"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION: - reason = "EXCEPTION_FLT_INVALID_OPERATION"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW: - reason = "EXCEPTION_FLT_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK: - reason = "EXCEPTION_FLT_STACK_CHECK"; - break; - case MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW: - reason = "EXCEPTION_FLT_UNDERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO: - reason = "EXCEPTION_INT_DIVIDE_BY_ZERO"; - break; - case MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW: - reason = "EXCEPTION_INT_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION: - reason = "EXCEPTION_PRIV_INSTRUCTION"; - break; - case MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW: - reason = "EXCEPTION_STACK_OVERFLOW"; - break; - case MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK: - reason = "EXCEPTION_POSSIBLE_DEADLOCK"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - case MD_OS_LINUX: { - switch (exception_code) { - case MD_EXCEPTION_CODE_LIN_SIGHUP: - reason = "SIGHUP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGINT: - reason = "SIGINT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGQUIT: - reason = "SIGQUIT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGILL: - reason = "SIGILL"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTRAP: - reason = "SIGTRAP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGABRT: - reason = "SIGABRT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGBUS: - reason = "SIGBUS"; - break; - case MD_EXCEPTION_CODE_LIN_SIGFPE: - reason = "SIGFPE"; - break; - case MD_EXCEPTION_CODE_LIN_SIGKILL: - reason = "SIGKILL"; - break; - case MD_EXCEPTION_CODE_LIN_SIGUSR1: - reason = "SIGUSR1"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSEGV: - reason = "SIGSEGV"; - break; - case MD_EXCEPTION_CODE_LIN_SIGUSR2: - reason = "SIGUSR2"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPIPE: - reason = "SIGPIPE"; - break; - case MD_EXCEPTION_CODE_LIN_SIGALRM: - reason = "SIGALRM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTERM: - reason = "SIGTERM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSTKFLT: - reason = "SIGSTKFLT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGCHLD: - reason = "SIGCHLD"; - break; - case MD_EXCEPTION_CODE_LIN_SIGCONT: - reason = "SIGCONT"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSTOP: - reason = "SIGSTOP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTSTP: - reason = "SIGTSTP"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTTIN: - reason = "SIGTTIN"; - break; - case MD_EXCEPTION_CODE_LIN_SIGTTOU: - reason = "SIGTTOU"; - break; - case MD_EXCEPTION_CODE_LIN_SIGURG: - reason = "SIGURG"; - break; - case MD_EXCEPTION_CODE_LIN_SIGXCPU: - reason = "SIGXCPU"; - break; - case MD_EXCEPTION_CODE_LIN_SIGXFSZ: - reason = "SIGXFSZ"; - break; - case MD_EXCEPTION_CODE_LIN_SIGVTALRM: - reason = "SIGVTALRM"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPROF: - reason = "SIGPROF"; - break; - case MD_EXCEPTION_CODE_LIN_SIGWINCH: - reason = "SIGWINCH"; - break; - case MD_EXCEPTION_CODE_LIN_SIGIO: - reason = "SIGIO"; - break; - case MD_EXCEPTION_CODE_LIN_SIGPWR: - reason = "SIGPWR"; - break; - case MD_EXCEPTION_CODE_LIN_SIGSYS: - reason = "SIGSYS"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - case MD_OS_SOLARIS: { - switch (exception_code) { - case MD_EXCEPTION_CODE_SOL_SIGHUP: - reason = "SIGHUP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGINT: - reason = "SIGINT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGQUIT: - reason = "SIGQUIT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGILL: - reason = "SIGILL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTRAP: - reason = "SIGTRAP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGIOT: - reason = "SIGIOT | SIGABRT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGEMT: - reason = "SIGEMT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGFPE: - reason = "SIGFPE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGKILL: - reason = "SIGKILL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGBUS: - reason = "SIGBUS"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSEGV: - reason = "SIGSEGV"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSYS: - reason = "SIGSYS"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPIPE: - reason = "SIGPIPE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGALRM: - reason = "SIGALRM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTERM: - reason = "SIGTERM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGUSR1: - reason = "SIGUSR1"; - break; - case MD_EXCEPTION_CODE_SOL_SIGUSR2: - reason = "SIGUSR2"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCLD: - reason = "SIGCLD | SIGCHLD"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPWR: - reason = "SIGPWR"; - break; - case MD_EXCEPTION_CODE_SOL_SIGWINCH: - reason = "SIGWINCH"; - break; - case MD_EXCEPTION_CODE_SOL_SIGURG: - reason = "SIGURG"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPOLL: - reason = "SIGPOLL | SIGIO"; - break; - case MD_EXCEPTION_CODE_SOL_SIGSTOP: - reason = "SIGSTOP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTSTP: - reason = "SIGTSTP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCONT: - reason = "SIGCONT"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTTIN: - reason = "SIGTTIN"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTTOU: - reason = "SIGTTOU"; - break; - case MD_EXCEPTION_CODE_SOL_SIGVTALRM: - reason = "SIGVTALRM"; - break; - case MD_EXCEPTION_CODE_SOL_SIGPROF: - reason = "SIGPROF"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXCPU: - reason = "SIGXCPU"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXFSZ: - reason = "SIGXFSZ"; - break; - case MD_EXCEPTION_CODE_SOL_SIGWAITING: - reason = "SIGWAITING"; - break; - case MD_EXCEPTION_CODE_SOL_SIGLWP: - reason = "SIGLWP"; - break; - case MD_EXCEPTION_CODE_SOL_SIGFREEZE: - reason = "SIGFREEZE"; - break; - case MD_EXCEPTION_CODE_SOL_SIGTHAW: - reason = "SIGTHAW"; - break; - case MD_EXCEPTION_CODE_SOL_SIGCANCEL: - reason = "SIGCANCEL"; - break; - case MD_EXCEPTION_CODE_SOL_SIGLOST: - reason = "SIGLOST"; - break; - case MD_EXCEPTION_CODE_SOL_SIGXRES: - reason = "SIGXRES"; - break; - case MD_EXCEPTION_CODE_SOL_SIGJVM1: - reason = "SIGJVM1"; - break; - case MD_EXCEPTION_CODE_SOL_SIGJVM2: - reason = "SIGJVM2"; - break; - default: - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - break; - } - - default: { - BPLOG(INFO) << "Unknown exception reason " << reason; - break; - } - } - - return reason; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_processor_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/minidump_processor_unittest.cc deleted file mode 100644 index bf8a8989..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_processor_unittest.cc +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Unit test for MinidumpProcessor. Uses a pre-generated minidump and -// corresponding symbol file, and checks the stack frames for correctness. - -#include -#include -#include -#include -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - -namespace { - -using std::string; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::MinidumpProcessor; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; - -static const char *kSystemInfoOS = "Windows NT"; -static const char *kSystemInfoOSShort = "windows"; -static const char *kSystemInfoOSVersion = "5.1.2600 Service Pack 2"; -static const char *kSystemInfoCPU = "x86"; -static const char *kSystemInfoCPUInfo = - "GenuineIntel family 6 model 13 stepping 8"; - -#define ASSERT_TRUE(cond) \ - if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_FALSE(cond) ASSERT_TRUE(!(cond)) - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -// Use ASSERT_*_ABORT in functions that can't return a boolean. -#define ASSERT_TRUE_ABORT(cond) \ - if (!(cond)) { \ - fprintf(stderr, "FAILED: %s at %s:%d\n", #cond, __FILE__, __LINE__); \ - abort(); \ - } - -#define ASSERT_EQ_ABORT(e1, e2) ASSERT_TRUE_ABORT((e1) == (e2)) - -class TestSymbolSupplier : public SymbolSupplier { - public: - TestSymbolSupplier() : interrupt_(false) {} - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - - // When set to true, causes the SymbolSupplier to return INTERRUPT - void set_interrupt(bool interrupt) { interrupt_ = interrupt; } - - private: - bool interrupt_; -}; - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - ASSERT_TRUE_ABORT(module); - ASSERT_TRUE_ABORT(system_info); - ASSERT_EQ_ABORT(system_info->cpu, kSystemInfoCPU); - ASSERT_EQ_ABORT(system_info->cpu_info, kSystemInfoCPUInfo); - ASSERT_EQ_ABORT(system_info->os, kSystemInfoOS); - ASSERT_EQ_ABORT(system_info->os_short, kSystemInfoOSShort); - ASSERT_EQ_ABORT(system_info->os_version, kSystemInfoOSVersion); - - if (interrupt_) { - return INTERRUPT; - } - - if (module && module->code_file() == "c:\\test_app.exe") { - *symbol_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/symbols/test_app.pdb/" + - module->debug_identifier() + - "/test_app.sym"; - return FOUND; - } - - return NOT_FOUND; -} - -SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - SymbolSupplier::SymbolResult s = GetSymbolFile(module, system_info, - symbol_file); - if (s == FOUND) { - std::ifstream in(symbol_file->c_str()); - std::getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - - return s; -} - -static bool RunTests() { - TestSymbolSupplier supplier; - BasicSourceLineResolver resolver; - MinidumpProcessor processor(&supplier, &resolver); - - string minidump_file = string(getenv("srcdir") ? getenv("srcdir") : ".") + - "/src/processor/testdata/minidump2.dmp"; - - ProcessState state; - ASSERT_EQ(processor.Process(minidump_file, &state), - MinidumpProcessor::PROCESS_OK); - ASSERT_EQ(state.system_info()->os, kSystemInfoOS); - ASSERT_EQ(state.system_info()->os_short, kSystemInfoOSShort); - ASSERT_EQ(state.system_info()->os_version, kSystemInfoOSVersion); - ASSERT_EQ(state.system_info()->cpu, kSystemInfoCPU); - ASSERT_EQ(state.system_info()->cpu_info, kSystemInfoCPUInfo); - ASSERT_TRUE(state.crashed()); - ASSERT_EQ(state.crash_reason(), "EXCEPTION_ACCESS_VIOLATION"); - ASSERT_EQ(state.crash_address(), 0x45); - ASSERT_EQ(state.threads()->size(), 1); - ASSERT_EQ(state.requesting_thread(), 0); - - CallStack *stack = state.threads()->at(0); - ASSERT_TRUE(stack); - ASSERT_EQ(stack->frames()->size(), 4); - - ASSERT_TRUE(stack->frames()->at(0)->module); - ASSERT_EQ(stack->frames()->at(0)->module->base_address(), 0x400000); - ASSERT_EQ(stack->frames()->at(0)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(0)->function_name, - "`anonymous namespace'::CrashFunction"); - ASSERT_EQ(stack->frames()->at(0)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(0)->source_line, 58); - - ASSERT_TRUE(stack->frames()->at(1)->module); - ASSERT_EQ(stack->frames()->at(1)->module->base_address(), 0x400000); - ASSERT_EQ(stack->frames()->at(1)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(1)->function_name, "main"); - ASSERT_EQ(stack->frames()->at(1)->source_file_name, "c:\\test_app.cc"); - ASSERT_EQ(stack->frames()->at(1)->source_line, 65); - - // This comes from the CRT - ASSERT_TRUE(stack->frames()->at(2)->module); - ASSERT_EQ(stack->frames()->at(2)->module->base_address(), 0x400000); - ASSERT_EQ(stack->frames()->at(2)->module->code_file(), "c:\\test_app.exe"); - ASSERT_EQ(stack->frames()->at(2)->function_name, "__tmainCRTStartup"); - ASSERT_EQ(stack->frames()->at(2)->source_file_name, - "f:\\sp\\vctools\\crt_bld\\self_x86\\crt\\src\\crt0.c"); - ASSERT_EQ(stack->frames()->at(2)->source_line, 327); - - // No debug info available for kernel32.dll - ASSERT_TRUE(stack->frames()->at(3)->module); - ASSERT_EQ(stack->frames()->at(3)->module->base_address(), 0x7c800000); - ASSERT_EQ(stack->frames()->at(3)->module->code_file(), - "C:\\WINDOWS\\system32\\kernel32.dll"); - ASSERT_TRUE(stack->frames()->at(3)->function_name.empty()); - ASSERT_TRUE(stack->frames()->at(3)->source_file_name.empty()); - ASSERT_EQ(stack->frames()->at(3)->source_line, 0); - - ASSERT_EQ(state.modules()->module_count(), 13); - ASSERT_TRUE(state.modules()->GetMainModule()); - ASSERT_EQ(state.modules()->GetMainModule()->code_file(), "c:\\test_app.exe"); - ASSERT_FALSE(state.modules()->GetModuleForAddress(0)); - ASSERT_EQ(state.modules()->GetMainModule(), - state.modules()->GetModuleForAddress(0x400000)); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x7c801234)->debug_file(), - "kernel32.pdb"); - ASSERT_EQ(state.modules()->GetModuleForAddress(0x77d43210)->version(), - "5.1.2600.2622"); - - // Test that the symbol supplier can interrupt processing - state.Clear(); - supplier.set_interrupt(true); - ASSERT_EQ(processor.Process(minidump_file, &state), - MinidumpProcessor::PROCESS_INTERRUPTED); - - return true; -} - -} // namespace - -int main(int argc, char *argv[]) { - BPLOG_INIT(&argc, &argv); - - if (!RunTests()) { - return 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk b/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk deleted file mode 100644 index 58877867..00000000 Binary files a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk.cc b/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk.cc deleted file mode 100644 index 05d9641f..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk.cc +++ /dev/null @@ -1,508 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_stackwalk.cc: Process a minidump with MinidumpProcessor, printing -// the results, including stack traces. -// -// Author: Mark Mentovai - -#include -#include -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" -#include "processor/pathname_stripper.h" -#include "processor/scoped_ptr.h" -#include "processor/simple_symbol_supplier.h" - -namespace { - -using std::string; -using std::vector; -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::CodeModules; -using google_breakpad::MinidumpModule; -using google_breakpad::MinidumpProcessor; -using google_breakpad::PathnameStripper; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::SimpleSymbolSupplier; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameSPARC; -using google_breakpad::StackFrameX86; -using google_breakpad::StackFrameAMD64; - -// Separator character for machine readable output. -static const char kOutputSeparator = '|'; - -// PrintRegister prints a register's name and value to stdout. It will -// print four registers on a line. For the first register in a set, -// pass 0 for |sequence|. For registers in a set, pass the most recent -// return value of PrintRegister. Note that PrintRegister will print a -// newline before the first register (with |sequence| set to 0) is printed. -// The caller is responsible for printing the final newline after a set -// of registers is completely printed, regardless of the number of calls -// to PrintRegister. -static int PrintRegister(const char *name, u_int32_t value, int sequence) { - if (sequence % 4 == 0) { - printf("\n "); - } - printf(" %5s = 0x%08x", name, value); - return ++sequence; -} - -// StripSeparator takes a string |original| and returns a copy -// of the string with all occurences of |kOutputSeparator| removed. -static string StripSeparator(const string &original) { - string result = original; - string::size_type position = 0; - while ((position = result.find(kOutputSeparator, position)) != string::npos) { - result.erase(position, 1); - } - return result; -} - -// PrintStack prints the call stack in |stack| to stdout, in a reasonably -// useful form. Module, function, and source file names are displayed if -// they are available. The code offset to the base code address of the -// source line, function, or module is printed, preferring them in that -// order. If no source line, function, or module information is available, -// an absolute code offset is printed. -// -// If |cpu| is a recognized CPU name, relevant register state for each stack -// frame printed is also output, if available. -static void PrintStack(const CallStack *stack, const string &cpu) { - int frame_count = stack->frames()->size(); - for (int frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - printf("%2d ", frame_index); - - if (frame->module) { - printf("%s", PathnameStripper::File(frame->module->code_file()).c_str()); - if (!frame->function_name.empty()) { - printf("!%s", frame->function_name.c_str()); - if (!frame->source_file_name.empty()) { - string source_file = PathnameStripper::File(frame->source_file_name); - printf(" [%s : %d + 0x%" PRIx64 "]", - source_file.c_str(), - frame->source_line, - frame->instruction - frame->source_line_base); - } else { - printf(" + 0x%" PRIx64, frame->instruction - frame->function_base); - } - } else { - printf(" + 0x%" PRIx64, - frame->instruction - frame->module->base_address()); - } - } else { - printf("0x%" PRIx64, frame->instruction); - } - - int sequence = 0; - if (cpu == "x86") { - const StackFrameX86 *frame_x86 = - reinterpret_cast(frame); - - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EIP) - sequence = PrintRegister("eip", frame_x86->context.eip, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESP) - sequence = PrintRegister("esp", frame_x86->context.esp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBP) - sequence = PrintRegister("ebp", frame_x86->context.ebp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBX) - sequence = PrintRegister("ebx", frame_x86->context.ebx, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESI) - sequence = PrintRegister("esi", frame_x86->context.esi, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EDI) - sequence = PrintRegister("edi", frame_x86->context.edi, sequence); - if (frame_x86->context_validity == StackFrameX86::CONTEXT_VALID_ALL) { - sequence = PrintRegister("eax", frame_x86->context.eax, sequence); - sequence = PrintRegister("ecx", frame_x86->context.ecx, sequence); - sequence = PrintRegister("edx", frame_x86->context.edx, sequence); - sequence = PrintRegister("efl", frame_x86->context.eflags, sequence); - } - } else if (cpu == "ppc") { - const StackFramePPC *frame_ppc = - reinterpret_cast(frame); - - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_SRR0) - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_GPR1) - sequence = PrintRegister("r1", frame_ppc->context.gpr[1], sequence); - } else if (cpu == "amd64") { - const StackFrameAMD64 *frame_amd64 = - reinterpret_cast(frame); - - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RIP) - sequence = PrintRegister("rip", frame_amd64->context.rip, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RSP) - sequence = PrintRegister("rsp", frame_amd64->context.rsp, sequence); - if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RBP) - sequence = PrintRegister("rbp", frame_amd64->context.rbp, sequence); - } else if (cpu == "sparc") { - const StackFrameSPARC *frame_sparc = - reinterpret_cast(frame); - - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_SP) - sequence = PrintRegister("sp", frame_sparc->context.g_r[14], sequence); - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_FP) - sequence = PrintRegister("fp", frame_sparc->context.g_r[30], sequence); - if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_PC) - sequence = PrintRegister("pc", frame_sparc->context.pc, sequence); - } - printf("\n"); - } -} - -// PrintStackMachineReadable prints the call stack in |stack| to stdout, -// in the following machine readable pipe-delimited text format: -// thread number|frame number|module|function|source file|line|offset -// -// Module, function, source file, and source line may all be empty -// depending on availability. The code offset follows the same rules as -// PrintStack above. -static void PrintStackMachineReadable(int thread_num, const CallStack *stack) { - int frame_count = stack->frames()->size(); - for (int frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - printf("%d%c%d%c", thread_num, kOutputSeparator, frame_index, - kOutputSeparator); - - if (frame->module) { - assert(!frame->module->code_file().empty()); - printf("%s", StripSeparator(PathnameStripper::File( - frame->module->code_file())).c_str()); - if (!frame->function_name.empty()) { - printf("%c%s", kOutputSeparator, - StripSeparator(frame->function_name).c_str()); - if (!frame->source_file_name.empty()) { - printf("%c%s%c%d%c0x%" PRIx64, - kOutputSeparator, - StripSeparator(frame->source_file_name).c_str(), - kOutputSeparator, - frame->source_line, - kOutputSeparator, - frame->instruction - frame->source_line_base); - } else { - printf("%c%c%c0x%" PRIx64, - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction - frame->function_base); - } - } else { - printf("%c%c%c%c0x%" PRIx64, - kOutputSeparator, // empty function name - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction - frame->module->base_address()); - } - } else { - // the printf before this prints a trailing separator for module name - printf("%c%c%c%c0x%" PRIx64, - kOutputSeparator, // empty function name - kOutputSeparator, // empty source file - kOutputSeparator, // empty source line - kOutputSeparator, - frame->instruction); - } - printf("\n"); - } -} - -static void PrintModules(const CodeModules *modules) { - if (!modules) - return; - - printf("\n"); - printf("Loaded modules:\n"); - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - u_int64_t base_address = module->base_address(); - printf("0x%08" PRIx64 " - 0x%08" PRIx64 " %s %s%s\n", - base_address, base_address + module->size() - 1, - PathnameStripper::File(module->code_file()).c_str(), - module->version().empty() ? "???" : module->version().c_str(), - main_module != NULL && base_address == main_address ? - " (main)" : ""); - } -} - -// PrintModulesMachineReadable outputs a list of loaded modules, -// one per line, in the following machine-readable pipe-delimited -// text format: -// Module|{Module Filename}|{Version}|{Debug Filename}|{Debug Identifier}| -// {Base Address}|{Max Address}|{Main} -static void PrintModulesMachineReadable(const CodeModules *modules) { - if (!modules) - return; - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - u_int64_t base_address = module->base_address(); - printf("Module%c%s%c%s%c%s%c%s%c0x%08" PRIx64 "%c0x%08" PRIx64 "%c%d\n", - kOutputSeparator, - StripSeparator(PathnameStripper::File(module->code_file())).c_str(), - kOutputSeparator, StripSeparator(module->version()).c_str(), - kOutputSeparator, - StripSeparator(PathnameStripper::File(module->debug_file())).c_str(), - kOutputSeparator, - StripSeparator(module->debug_identifier()).c_str(), - kOutputSeparator, base_address, - kOutputSeparator, base_address + module->size() - 1, - kOutputSeparator, - main_module != NULL && base_address == main_address ? 1 : 0); - } -} - -static void PrintProcessState(const ProcessState& process_state) { - // Print OS and CPU information. - string cpu = process_state.system_info()->cpu; - string cpu_info = process_state.system_info()->cpu_info; - printf("Operating system: %s\n", process_state.system_info()->os.c_str()); - printf(" %s\n", - process_state.system_info()->os_version.c_str()); - printf("CPU: %s\n", cpu.c_str()); - if (!cpu_info.empty()) { - // This field is optional. - printf(" %s\n", cpu_info.c_str()); - } - printf(" %d CPU%s\n", - process_state.system_info()->cpu_count, - process_state.system_info()->cpu_count != 1 ? "s" : ""); - printf("\n"); - - // Print crash information. - if (process_state.crashed()) { - printf("Crash reason: %s\n", process_state.crash_reason().c_str()); - printf("Crash address: 0x%" PRIx64 "\n", process_state.crash_address()); - } else { - printf("No crash\n"); - } - - // If the thread that requested the dump is known, print it first. - int requesting_thread = process_state.requesting_thread(); - if (requesting_thread != -1) { - printf("\n"); - printf("Thread %d (%s)\n", - requesting_thread, - process_state.crashed() ? "crashed" : - "requested dump, did not crash"); - PrintStack(process_state.threads()->at(requesting_thread), cpu); - } - - // Print all of the threads in the dump. - int thread_count = process_state.threads()->size(); - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - printf("\n"); - printf("Thread %d\n", thread_index); - PrintStack(process_state.threads()->at(thread_index), cpu); - } - } - - PrintModules(process_state.modules()); -} - -static void PrintProcessStateMachineReadable(const ProcessState& process_state) -{ - // Print OS and CPU information. - // OS|{OS Name}|{OS Version} - // CPU|{CPU Name}|{CPU Info}|{Number of CPUs} - printf("OS%c%s%c%s\n", kOutputSeparator, - StripSeparator(process_state.system_info()->os).c_str(), - kOutputSeparator, - StripSeparator(process_state.system_info()->os_version).c_str()); - printf("CPU%c%s%c%s%c%d\n", kOutputSeparator, - StripSeparator(process_state.system_info()->cpu).c_str(), - kOutputSeparator, - // this may be empty - StripSeparator(process_state.system_info()->cpu_info).c_str(), - kOutputSeparator, - process_state.system_info()->cpu_count); - - int requesting_thread = process_state.requesting_thread(); - - // Print crash information. - // Crash|{Crash Reason}|{Crash Address}|{Crashed Thread} - printf("Crash%c", kOutputSeparator); - if (process_state.crashed()) { - printf("%s%c0x%" PRIx64 "%c", - StripSeparator(process_state.crash_reason()).c_str(), - kOutputSeparator, process_state.crash_address(), kOutputSeparator); - } else { - printf("No crash%c%c", kOutputSeparator, kOutputSeparator); - } - - if (requesting_thread != -1) { - printf("%d\n", requesting_thread); - } else { - printf("\n"); - } - - PrintModulesMachineReadable(process_state.modules()); - - // blank line to indicate start of threads - printf("\n"); - - // If the thread that requested the dump is known, print it first. - if (requesting_thread != -1) { - PrintStackMachineReadable(requesting_thread, - process_state.threads()->at(requesting_thread)); - } - - // Print all of the threads in the dump. - int thread_count = process_state.threads()->size(); - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - PrintStackMachineReadable(thread_index, - process_state.threads()->at(thread_index)); - } - } -} - -// Processes |minidump_file| using MinidumpProcessor. |symbol_path|, if -// non-empty, is the base directory of a symbol storage area, laid out in -// the format required by SimpleSymbolSupplier. If such a storage area -// is specified, it is made available for use by the MinidumpProcessor. -// -// Returns the value of MinidumpProcessor::Process. If processing succeeds, -// prints identifying OS and CPU information from the minidump, crash -// information if the minidump was produced as a result of a crash, and -// call stacks for each thread contained in the minidump. All information -// is printed to stdout. -static bool PrintMinidumpProcess(const string &minidump_file, - const vector &symbol_paths, - bool machine_readable) { - scoped_ptr symbol_supplier; - if (!symbol_paths.empty()) { - // TODO(mmentovai): check existence of symbol_path if specified? - symbol_supplier.reset(new SimpleSymbolSupplier(symbol_paths)); - } - - BasicSourceLineResolver resolver; - MinidumpProcessor minidump_processor(symbol_supplier.get(), &resolver); - - // Process the minidump. - ProcessState process_state; - if (minidump_processor.Process(minidump_file, &process_state) != - MinidumpProcessor::PROCESS_OK) { - BPLOG(ERROR) << "MinidumpProcessor::Process failed"; - return false; - } - - if (machine_readable) { - PrintProcessStateMachineReadable(process_state); - } else { - PrintProcessState(process_state); - } - - return true; -} - -} // namespace - -static void usage(const char *program_name) { - fprintf(stderr, "usage: %s [-m] [symbol-path ...]\n" - " -m : Output in machine-readable format\n", - program_name); -} - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - if (argc < 2) { - usage(argv[0]); - return 1; - } - - const char *minidump_file; - bool machine_readable; - int symbol_path_arg; - - if (strcmp(argv[1], "-m") == 0) { - if (argc < 3) { - usage(argv[0]); - return 1; - } - - machine_readable = true; - minidump_file = argv[2]; - symbol_path_arg = 3; - } else { - machine_readable = false; - minidump_file = argv[1]; - symbol_path_arg = 2; - } - - // extra arguments are symbol paths - std::vector symbol_paths; - if (argc > symbol_path_arg) { - for (int argi = symbol_path_arg; argi < argc; ++argi) - symbol_paths.push_back(argv[argi]); - } - - return PrintMinidumpProcess(minidump_file, - symbol_paths, - machine_readable) ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_machine_readable_test b/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_machine_readable_test deleted file mode 100644 index 2aadb241..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_machine_readable_test +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_stackwalk -m $testdata_dir/minidump2.dmp \ - $testdata_dir/symbols | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.stackwalk.machine_readable.out - -exit $? diff --git a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_test b/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_test deleted file mode 100644 index f9790279..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/minidump_stackwalk_test +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -testdata_dir=$srcdir/src/processor/testdata -./src/processor/minidump_stackwalk $testdata_dir/minidump2.dmp \ - $testdata_dir/symbols | \ - tr -d '\015' | \ - diff -u $testdata_dir/minidump2.stackwalk.out - -exit $? diff --git a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.cc b/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.cc deleted file mode 100644 index 839287bd..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// pathname_stripper.cc: Manipulates pathnames into their component parts. -// -// See pathname_stripper.h for documentation. -// -// Author: Mark Mentovai - -#include "processor/pathname_stripper.h" - -namespace google_breakpad { - -// static -string PathnameStripper::File(const string &path) { - string::size_type slash = path.rfind('/'); - string::size_type backslash = path.rfind('\\'); - - string::size_type file_start = 0; - if (slash != string::npos && - (backslash == string::npos || slash > backslash)) { - file_start = slash + 1; - } else if (backslash != string::npos) { - file_start = backslash + 1; - } - - return path.substr(file_start); -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.h b/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.h deleted file mode 100644 index 17db75d6..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// pathname_stripper.h: Manipulates pathnames into their component parts. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_PATHNAME_STRIPPER_H__ -#define PROCESSOR_PATHNAME_STRIPPER_H__ - -#include - -namespace google_breakpad { - -using std::string; - -class PathnameStripper { - public: - // Given path, a pathname with components separated by slashes (/) or - // backslashes (\), returns the trailing component, without any separator. - // If path ends in a separator character, returns an empty string. - static string File(const string &path); -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_PATHNAME_STRIPPER_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/pathname_stripper_unittest.cc deleted file mode 100644 index 957c94f2..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/pathname_stripper_unittest.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "processor/pathname_stripper.h" -#include "processor/logging.h" - -#define ASSERT_TRUE(condition) \ - if (!(condition)) { \ - fprintf(stderr, "FAIL: %s @ %s:%d\n", #condition, __FILE__, __LINE__); \ - return false; \ - } - -#define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) - -namespace { - -using google_breakpad::PathnameStripper; - -static bool RunTests() { - ASSERT_EQ(PathnameStripper::File("/dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("/dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\/file"), "file"); - ASSERT_EQ(PathnameStripper::File("file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir/"), ""); - ASSERT_EQ(PathnameStripper::File("dir\\"), ""); - ASSERT_EQ(PathnameStripper::File("dir/dir/"), ""); - ASSERT_EQ(PathnameStripper::File("dir\\dir\\"), ""); - ASSERT_EQ(PathnameStripper::File("dir1/dir2/file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1\\dir2\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1/dir2\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir1\\dir2/file"), "file"); - ASSERT_EQ(PathnameStripper::File(""), ""); - ASSERT_EQ(PathnameStripper::File("1"), "1"); - ASSERT_EQ(PathnameStripper::File("1/2"), "2"); - ASSERT_EQ(PathnameStripper::File("1\\2"), "2"); - ASSERT_EQ(PathnameStripper::File("/1/2"), "2"); - ASSERT_EQ(PathnameStripper::File("\\1\\2"), "2"); - ASSERT_EQ(PathnameStripper::File("dir//file"), "file"); - ASSERT_EQ(PathnameStripper::File("dir\\\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("/dir//file"), "file"); - ASSERT_EQ(PathnameStripper::File("\\dir\\\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("c:\\dir\\file"), "file"); - ASSERT_EQ(PathnameStripper::File("c:\\dir\\file.ext"), "file.ext"); - - return true; -} - -} // namespace - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator-inl.h b/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator-inl.h deleted file mode 100644 index aa0851d9..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator-inl.h +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator-inl.h: Postfix (reverse Polish) notation expression -// evaluator. -// -// Documentation in postfix_evaluator.h. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_INL_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_INL_H__ - - -#include - -#include "processor/postfix_evaluator.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" - -namespace google_breakpad { - -using std::istringstream; -using std::ostringstream; - - -// A small class used in Evaluate to make sure to clean up the stack -// before returning failure. -class AutoStackClearer { - public: - explicit AutoStackClearer(vector *stack) : stack_(stack) {} - ~AutoStackClearer() { stack_->clear(); } - - private: - vector *stack_; -}; - - -template -bool PostfixEvaluator::Evaluate(const string &expression, - DictionaryValidityType *assigned) { - // Ensure that the stack is cleared before returning. - AutoStackClearer clearer(&stack_); - - // Tokenize, splitting on whitespace. - istringstream stream(expression); - string token; - while (stream >> token) { - // There are enough binary operations that do exactly the same thing - // (other than the specific operation, of course) that it makes sense - // to share as much code as possible. - enum BinaryOperation { - BINARY_OP_NONE = 0, - BINARY_OP_ADD, - BINARY_OP_SUBTRACT, - BINARY_OP_MULTIPLY, - BINARY_OP_DIVIDE_QUOTIENT, - BINARY_OP_DIVIDE_MODULUS - }; - - BinaryOperation operation = BINARY_OP_NONE; - if (token == "+") - operation = BINARY_OP_ADD; - else if (token == "-") - operation = BINARY_OP_SUBTRACT; - else if (token == "*") - operation = BINARY_OP_MULTIPLY; - else if (token == "/") - operation = BINARY_OP_DIVIDE_QUOTIENT; - else if (token == "%") - operation = BINARY_OP_DIVIDE_MODULUS; - - if (operation != BINARY_OP_NONE) { - // Get the operands. - ValueType operand1, operand2; - if (!PopValues(&operand1, &operand2)) { - BPLOG(ERROR) << "Could not PopValues to get two values for binary " - "operation " << token << ": " << expression; - return false; - } - - // Perform the operation. - ValueType result; - switch (operation) { - case BINARY_OP_ADD: - result = operand1 + operand2; - break; - case BINARY_OP_SUBTRACT: - result = operand1 - operand2; - break; - case BINARY_OP_MULTIPLY: - result = operand1 * operand2; - break; - case BINARY_OP_DIVIDE_QUOTIENT: - result = operand1 / operand2; - break; - case BINARY_OP_DIVIDE_MODULUS: - result = operand1 % operand2; - break; - case BINARY_OP_NONE: - // This will not happen, but compilers will want a default or - // BINARY_OP_NONE case. - BPLOG(ERROR) << "Not reached!"; - return false; - break; - } - - // Save the result. - PushValue(result); - } else if (token == "^") { - // ^ for unary dereference. Can't dereference without memory. - if (!memory_) { - BPLOG(ERROR) << "Attempt to dereference without memory: " << - expression; - return false; - } - - ValueType address; - if (!PopValue(&address)) { - BPLOG(ERROR) << "Could not PopValue to get value to derefence: " << - expression; - return false; - } - - ValueType value; - if (!memory_->GetMemoryAtAddress(address, &value)) { - BPLOG(ERROR) << "Could not dereference memory at address " << - HexString(address) << ": " << expression; - return false; - } - - PushValue(value); - } else if (token == "=") { - // = for assignment. - ValueType value; - if (!PopValue(&value)) { - BPLOG(ERROR) << "Could not PopValue to get value to assign: " << - expression; - return false; - } - - // Assignment is only meaningful when assigning into an identifier. - // The identifier must name a variable, not a constant. Variables - // begin with '$'. - string identifier; - if (PopValueOrIdentifier(NULL, &identifier) != POP_RESULT_IDENTIFIER) { - BPLOG(ERROR) << "PopValueOrIdentifier returned a value, but an " - "identifier is needed to assign " << - HexString(value) << ": " << expression; - return false; - } - if (identifier.empty() || identifier[0] != '$') { - BPLOG(ERROR) << "Can't assign " << HexString(value) << " to " << - identifier << ": " << expression; - return false; - } - - (*dictionary_)[identifier] = value; - if (assigned) - (*assigned)[identifier] = true; - } else { - // The token is not an operator, it's a literal value or an identifier. - // Push it onto the stack as-is. Use push_back instead of PushValue - // because PushValue pushes ValueType as a string, but token is already - // a string. - stack_.push_back(token); - } - } - - // If there's anything left on the stack, it indicates incomplete execution. - // This is a failure case. If the stack is empty, evalution was complete - // and successful. - BPLOG_IF(ERROR, !stack_.empty()) << "Incomplete execution: " << expression; - return stack_.empty(); -} - - -template -typename PostfixEvaluator::PopResult -PostfixEvaluator::PopValueOrIdentifier( - ValueType *value, string *identifier) { - // There needs to be at least one element on the stack to pop. - if (!stack_.size()) - return POP_RESULT_FAIL; - - string token = stack_.back(); - stack_.pop_back(); - - // First, try to treat the value as a literal. In order for this to - // succed, the entire string must be parseable as ValueType. If this - // isn't possible, it can't be a literal, so treat it as an identifier - // instead. - istringstream token_stream(token); - ValueType literal; - if (token_stream >> literal && token_stream.peek() == EOF) { - if (value) { - *value = literal; - } - return POP_RESULT_VALUE; - } else { - if (identifier) { - *identifier = token; - } - return POP_RESULT_IDENTIFIER; - } -} - - -template -bool PostfixEvaluator::PopValue(ValueType *value) { - ValueType literal; - string token; - PopResult result; - if ((result = PopValueOrIdentifier(&literal, &token)) == POP_RESULT_FAIL) { - return false; - } else if (result == POP_RESULT_VALUE) { - // This is the easy case. - *value = literal; - } else { // result == POP_RESULT_IDENTIFIER - // There was an identifier at the top of the stack. Resolve it to a - // value by looking it up in the dictionary. - typename DictionaryType::const_iterator iterator = - dictionary_->find(token); - if (iterator == dictionary_->end()) { - // The identifier wasn't found in the dictionary. Don't imply any - // default value, just fail. - BPLOG(ERROR) << "Identifier " << token << " not in dictionary"; - return false; - } - - *value = iterator->second; - } - - return true; -} - - -template -bool PostfixEvaluator::PopValues(ValueType *value1, - ValueType *value2) { - return PopValue(value2) && PopValue(value1); -} - - -template -void PostfixEvaluator::PushValue(const ValueType &value) { - ostringstream token_stream; - token_stream << value; - stack_.push_back(token_stream.str()); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator.h b/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator.h deleted file mode 100644 index 552ed159..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator.h +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator.h: Postfix (reverse Polish) notation expression evaluator. -// -// PostfixEvaluator evaluates an expression, using the expression itself -// in postfix (reverse Polish) notation and a dictionary mapping constants -// and variables to their values. The evaluator supports standard -// arithmetic operations, assignment into variables, and when an optional -// MemoryRange is provided, dereferencing. (Any unary key-to-value operation -// may be used with a MemoryRange implementation that returns the appropriate -// values, but PostfixEvaluator was written with dereferencing in mind.) -// -// The expression language is simple. Expressions are supplied as strings, -// with operands and operators delimited by whitespace. Operands may be -// either literal values suitable for ValueType, or constants or variables, -// which reference the dictionary. The supported binary operators are + -// (addition), - (subtraction), * (multiplication), / (quotient of division), -// and % (modulus of division). The unary ^ (dereference) operator is also -// provided. These operators allow any operand to be either a literal -// value, constant, or variable. Assignment (=) of any type of operand into -// a variable is also supported. -// -// The dictionary is provided as a map with string keys. Keys beginning -// with the '$' character are treated as variables. All other keys are -// treated as constants. Any results must be assigned into variables in the -// dictionary. These variables do not need to exist prior to calling -// Evaluate, unless used in an expression prior to being assigned to. The -// internal stack state is not made available after evaluation, and any -// values remaining on the stack are treated as evidence of incomplete -// execution and cause the evaluator to indicate failure. -// -// PostfixEvaluator is intended to support evaluation of "program strings" -// obtained from MSVC frame data debugging information in pdb files as -// returned by the DIA APIs. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_POSTFIX_EVALUATOR_H__ -#define PROCESSOR_POSTFIX_EVALUATOR_H__ - - -#include -#include -#include - -namespace google_breakpad { - -using std::map; -using std::string; -using std::vector; - -class MemoryRegion; - -template -class PostfixEvaluator { - public: - typedef map DictionaryType; - typedef map DictionaryValidityType; - - // Create a PostfixEvaluator object that may be used (with Evaluate) on - // one or more expressions. PostfixEvaluator does not take ownership of - // either argument. |memory| may be NULL, in which case dereferencing - // (^) will not be supported. |dictionary| may be NULL, but evaluation - // will fail in that case unless set_dictionary is used before calling - // Evaluate. - PostfixEvaluator(DictionaryType *dictionary, MemoryRegion *memory) - : dictionary_(dictionary), memory_(memory), stack_() {} - - // Evaluate the expression. The results of execution will be stored - // in one (or more) variables in the dictionary. Returns false if any - // failures occure during execution, leaving variables in the dictionary - // in an indeterminate state. If assigned is non-NULL, any keys set in - // the dictionary as a result of evaluation will also be set to true in - // assigned, providing a way to determine if an expression modifies any - // of its input variables. - bool Evaluate(const string &expression, DictionaryValidityType *assigned); - - DictionaryType* dictionary() const { return dictionary_; } - - // Reset the dictionary. PostfixEvaluator does not take ownership. - void set_dictionary(DictionaryType *dictionary) {dictionary_ = dictionary; } - - private: - // Return values for PopValueOrIdentifier - enum PopResult { - POP_RESULT_FAIL = 0, - POP_RESULT_VALUE, - POP_RESULT_IDENTIFIER - }; - - // Retrieves the topmost literal value, constant, or variable from the - // stack. Returns POP_RESULT_VALUE if the topmost entry is a literal - // value, and sets |value| accordingly. Returns POP_RESULT_IDENTIFIER - // if the topmost entry is a constant or variable identifier, and sets - // |identifier| accordingly. Returns POP_RESULT_FAIL on failure, such - // as when the stack is empty. - PopResult PopValueOrIdentifier(ValueType *value, string *identifier); - - // Retrieves the topmost value on the stack. If the topmost entry is - // an identifier, the dictionary is queried for the identifier's value. - // Returns false on failure, such as when the stack is empty or when - // a nonexistent identifier is named. - bool PopValue(ValueType *value); - - // Retrieves the top two values on the stack, in the style of PopValue. - // value2 is popped before value1, so that value1 corresponds to the - // entry that was pushed prior to value2. Returns false on failure. - bool PopValues(ValueType *value1, ValueType *value2); - - // Pushes a new value onto the stack. - void PushValue(const ValueType &value); - - // The dictionary mapping constant and variable identifiers (strings) to - // values. Keys beginning with '$' are treated as variable names, and - // PostfixEvaluator is free to create and modify these keys. Weak pointer. - DictionaryType *dictionary_; - - // If non-NULL, the MemoryRegion used for dereference (^) operations. - // If NULL, dereferencing is unsupported and will fail. Weak pointer. - MemoryRegion *memory_; - - // The stack contains state information as execution progresses. Values - // are pushed on to it as the expression string is read and as operations - // yield values; values are popped when used as operands to operators. - vector stack_; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_POSTFIX_EVALUATOR_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator_unittest.cc deleted file mode 100644 index d687cc83..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/postfix_evaluator_unittest.cc +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// postfix_evaluator_unittest.cc: Unit tests for PostfixEvaluator. -// -// Author: Mark Mentovai - -#include -#include -#include - -#include "processor/postfix_evaluator-inl.h" - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/processor/memory_region.h" -#include "processor/logging.h" - - -namespace { - - -using std::map; -using std::string; -using google_breakpad::MemoryRegion; -using google_breakpad::PostfixEvaluator; - - -// FakeMemoryRegion is used to test PostfixEvaluator's dereference (^) -// operator. The result of dereferencing a value is one greater than -// the value. -class FakeMemoryRegion : public MemoryRegion { - public: - virtual u_int64_t GetBase() { return 0; } - virtual u_int32_t GetSize() { return 0; } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) { - *value = address + 1; - return true; - } - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) { - *value = address + 1; - return true; - } -}; - - -struct EvaluateTest { - // Expression passed to PostfixEvaluator::Evaluate. - const string expression; - - // True if the expression is expected to be evaluable, false if evaluation - // is expected to fail. - bool evaluable; -}; - - -struct EvaluateTestSet { - // The dictionary used for all tests in the set. - PostfixEvaluator::DictionaryType *dictionary; - - // The list of tests. - const EvaluateTest *evaluate_tests; - - // The number of tests. - unsigned int evaluate_test_count; - - // Identifiers and their expected values upon completion of the Evaluate - // tests in the set. - map *validate_data; -}; - - -static bool RunTests() { - // The first test set checks the basic operations and failure modes. - PostfixEvaluator::DictionaryType dictionary_0; - const EvaluateTest evaluate_tests_0[] = { - { "$rAdd 2 2 + =", true }, // $rAdd = 2 + 2 = 4 - { "$rAdd $rAdd 2 + =", true }, // $rAdd = $rAdd + 2 = 6 - { "$rAdd 2 $rAdd + =", true }, // $rAdd = 2 + $rAdd = 8 - { "99", false }, // put some junk on the stack... - { "$rAdd2 2 2 + =", true }, // ...and make sure things still work - { "$rAdd2\t2\n2 + =", true }, // same but with different whitespace - { "$rAdd2 2 2 + = ", true }, // trailing whitespace - { " $rAdd2 2 2 + =", true }, // leading whitespace - { "$rAdd2 2 2 + =", true }, // extra whitespace - { "$T0 2 = +", false }, // too few operands for add - { "2 + =", false }, // too few operands for add - { "2 +", false }, // too few operands for add - { "+", false }, // too few operands for add - { "^", false }, // too few operands for dereference - { "=", false }, // too few operands for assignment - { "2 =", false }, // too few operands for assignment - { "2 2 + =", false }, // too few operands for assignment - { "2 2 =", false }, // can't assign into a literal - { "k 2 =", false }, // can't assign into a constant - { "2", false }, // leftover data on stack - { "2 2 +", false }, // leftover data on stack - { "$rAdd", false }, // leftover data on stack - { "0 $T1 0 0 + =", false }, // leftover data on stack - { "$T2 $T2 2 + =", false }, // can't operate on an undefined value - { "$rMul 9 6 * =", true }, // $rMul = 9 * 6 = 54 - { "$rSub 9 6 - =", true }, // $rSub = 9 - 6 = 3 - { "$rDivQ 9 6 / =", true }, // $rDivQ = 9 / 6 = 1 - { "$rDivM 9 6 % =", true }, // $rDivM = 9 % 6 = 3 - { "$rDeref 9 ^ =", true } // $rDeref = ^9 = 10 (FakeMemoryRegion) - }; - map validate_data_0; - validate_data_0["$rAdd"] = 8; - validate_data_0["$rAdd2"] = 4; - validate_data_0["$rSub"] = 3; - validate_data_0["$rMul"] = 54; - validate_data_0["$rDivQ"] = 1; - validate_data_0["$rDivM"] = 3; - validate_data_0["$rDeref"] = 10; - - // The second test set simulates a couple of MSVC program strings. - // The data is fudged a little bit because the tests use FakeMemoryRegion - // instead of a real stack snapshot, but the program strings are real and - // the implementation doesn't know or care that the data is not real. - PostfixEvaluator::DictionaryType dictionary_1; - dictionary_1["$ebp"] = 0xbfff0010; - dictionary_1["$eip"] = 0x10000000; - dictionary_1["$esp"] = 0xbfff0000; - dictionary_1[".cbSavedRegs"] = 4; - dictionary_1[".cbParams"] = 4; - dictionary_1[".raSearchStart"] = 0xbfff0020; - const EvaluateTest evaluate_tests_1[] = { - { "$T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = " - "$L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + =", true }, - // Intermediate state: $T0 = 0xbfff0010, $eip = 0xbfff0015, - // $ebp = 0xbfff0011, $esp = 0xbfff0018, - // $L = 0xbfff000c, $P = 0xbfff001c - { "$T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = " - "$L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ =", - true }, - // Intermediate state: $T0 = 0xbfff0011, $eip = 0xbfff0016, - // $ebp = 0xbfff0012, $esp = 0xbfff0019, - // $L = 0xbfff000d, $P = 0xbfff001d, - // $ebx = 0xbffefff6 - { "$T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = " - "$esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = " - "$ebx $T0 28 - ^ =", - true } - }; - map validate_data_1; - validate_data_1["$T0"] = 0xbfff0012; - validate_data_1["$T1"] = 0xbfff0020; - validate_data_1["$T2"] = 0xbfff0019; - validate_data_1["$eip"] = 0xbfff0021; - validate_data_1["$ebp"] = 0xbfff0012; - validate_data_1["$esp"] = 0xbfff0024; - validate_data_1["$L"] = 0xbfff000e; - validate_data_1["$P"] = 0xbfff0028; - validate_data_1["$ebx"] = 0xbffefff7; - validate_data_1[".cbSavedRegs"] = 4; - validate_data_1[".cbParams"] = 4; - - EvaluateTestSet evaluate_test_sets[] = { - { &dictionary_0, evaluate_tests_0, - sizeof(evaluate_tests_0) / sizeof(EvaluateTest), &validate_data_0 }, - { &dictionary_1, evaluate_tests_1, - sizeof(evaluate_tests_1) / sizeof(EvaluateTest), &validate_data_1 }, - }; - - unsigned int evaluate_test_set_count = sizeof(evaluate_test_sets) / - sizeof(EvaluateTestSet); - - FakeMemoryRegion fake_memory; - PostfixEvaluator postfix_evaluator = - PostfixEvaluator(NULL, &fake_memory); - - for (unsigned int evaluate_test_set_index = 0; - evaluate_test_set_index < evaluate_test_set_count; - ++evaluate_test_set_index) { - EvaluateTestSet *evaluate_test_set = - &evaluate_test_sets[evaluate_test_set_index]; - const EvaluateTest *evaluate_tests = evaluate_test_set->evaluate_tests; - unsigned int evaluate_test_count = evaluate_test_set->evaluate_test_count; - - // The same dictionary will be used for each test in the set. Earlier - // tests can affect the state of the dictionary for later tests. - postfix_evaluator.set_dictionary(evaluate_test_set->dictionary); - - // Use a new validity dictionary for each test set. - PostfixEvaluator::DictionaryValidityType assigned; - - for (unsigned int evaluate_test_index = 0; - evaluate_test_index < evaluate_test_count; - ++evaluate_test_index) { - const EvaluateTest *evaluate_test = &evaluate_tests[evaluate_test_index]; - - // Do the test. - bool result = postfix_evaluator.Evaluate(evaluate_test->expression, - &assigned); - if (result != evaluate_test->evaluable) { - fprintf(stderr, "FAIL: evaluate set %d/%d, test %d/%d, " - "expression \"%s\", expected %s, observed %s\n", - evaluate_test_set_index, evaluate_test_set_count, - evaluate_test_index, evaluate_test_count, - evaluate_test->expression.c_str(), - evaluate_test->evaluable ? "evaluable" : "not evaluable", - result ? "evaluted" : "not evaluated"); - return false; - } - } - - // Validate the results. - for (map::const_iterator validate_iterator = - evaluate_test_set->validate_data->begin(); - validate_iterator != evaluate_test_set->validate_data->end(); - ++validate_iterator) { - const string identifier = validate_iterator->first; - unsigned int expected_value = validate_iterator->second; - - map::const_iterator dictionary_iterator = - evaluate_test_set->dictionary->find(identifier); - - // The identifier must exist in the dictionary. - if (dictionary_iterator == evaluate_test_set->dictionary->end()) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate identifier \"%s\", " - "expected %d, observed not found\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_value); - return false; - } - - // The value in the dictionary must be the same as the expected value. - unsigned int observed_value = dictionary_iterator->second; - if (expected_value != observed_value) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate identifier \"%s\", " - "expected %d, observed %d\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_value, observed_value); - return false; - } - - // The value must be set in the "assigned" dictionary if it was a - // variable. It must not have been assigned if it was a constant. - bool expected_assigned = identifier[0] == '$'; - bool observed_assigned = false; - PostfixEvaluator::DictionaryValidityType::const_iterator - iterator_assigned = assigned.find(identifier); - if (iterator_assigned != assigned.end()) { - observed_assigned = iterator_assigned->second; - } - if (expected_assigned != observed_assigned) { - fprintf(stderr, "FAIL: evaluate test set %d/%d, " - "validate assignment of \"%s\", " - "expected %d, observed %d\n", - evaluate_test_set_index, evaluate_test_set_count, - identifier.c_str(), expected_assigned, observed_assigned); - return false; - } - } - } - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/process_state.cc b/thirdparty/google-breakpad/r318/src/processor/process_state.cc deleted file mode 100644 index 934792b3..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/process_state.cc +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// process_state.cc: A snapshot of a process, in a fully-digested state. -// -// See process_state.h for documentation. -// -// Author: Mark Mentovai - -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_modules.h" - -namespace google_breakpad { - -ProcessState::~ProcessState() { - Clear(); -} - -void ProcessState::Clear() { - time_date_stamp_ = 0; - crashed_ = false; - crash_reason_.clear(); - crash_address_ = 0; - requesting_thread_ = -1; - for (vector::const_iterator iterator = threads_.begin(); - iterator != threads_.end(); - ++iterator) { - delete *iterator; - } - threads_.clear(); - system_info_.Clear(); - delete modules_; - modules_ = NULL; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/range_map-inl.h b/thirdparty/google-breakpad/r318/src/processor/range_map-inl.h deleted file mode 100644 index 77bf7d20..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/range_map-inl.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map-inl.h: Range map implementation. -// -// See range_map.h for documentation. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_INL_H__ -#define PROCESSOR_RANGE_MAP_INL_H__ - - -#include - -#include "processor/range_map.h" -#include "processor/logging.h" - - -namespace google_breakpad { - - -template -bool RangeMap::StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry) { - AddressType high = base + size - 1; - - // Check for undersize or overflow. - if (size <= 0 || high < base) { - // The processor will hit this case too frequently with common symbol - // files in the size == 0 case, which is more suited to a DEBUG channel. - // Filter those out since there's no DEBUG channel at the moment. - BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) << - "+" << HexString(size) << ", " << - HexString(high); - return false; - } - - // Ensure that this range does not overlap with another one already in the - // map. - MapConstIterator iterator_base = map_.lower_bound(base); - MapConstIterator iterator_high = map_.lower_bound(high); - - if (iterator_base != iterator_high) { - // Some other range begins in the space used by this range. It may be - // contained within the space used by this range, or it may extend lower. - // Regardless, it is an error. - AddressType other_base = iterator_base->second.base(); - AddressType other_size = iterator_base->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range is contained by or " - "extends lower than the new range: new " << - HexString(base) << "+" << HexString(size) << ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - - if (iterator_high != map_.end()) { - if (iterator_high->second.base() <= high) { - // The range above this one overlaps with this one. It may fully - // contain this range, or it may begin within this range and extend - // higher. Regardless, it's an error. - AddressType other_base = iterator_high->second.base(); - AddressType other_size = iterator_high->first - other_base + 1; - BPLOG(INFO) << "StoreRange failed, an existing range contains or " - "extends higher than the new range: new " << - HexString(base) << "+" << HexString(size) << - ", existing " << - HexString(other_base) << "+" << HexString(other_size); - return false; - } - } - - // Store the range in the map by its high address, so that lower_bound can - // be used to quickly locate a range by address. - map_.insert(MapValue(high, Range(base, entry))); - return true; -} - - -template -bool RangeMap::RetrieveRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRange requires |entry|"; - assert(entry); - - MapConstIterator iterator = map_.lower_bound(address); - if (iterator == map_.end()) - return false; - - // The map is keyed by the high address of each range, so |address| is - // guaranteed to be lower than the range's high address. If |range| is - // not directly preceded by another range, it's possible for address to - // be below the range's low address, though. When that happens, address - // references something not within any range, so return false. - if (address < iterator->second.base()) - return false; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->second.base(); - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveNearestRange( - const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveNearestRange requires |entry|"; - assert(entry); - - // If address is within a range, RetrieveRange can handle it. - if (RetrieveRange(address, entry, entry_base, entry_size)) - return true; - - // upper_bound gives the first element whose key is greater than address, - // but we want the first element whose key is less than or equal to address. - // Decrement the iterator to get there, but not if the upper_bound already - // points to the beginning of the map - in that case, address is lower than - // the lowest stored key, so return false. - MapConstIterator iterator = map_.upper_bound(address); - if (iterator == map_.begin()) - return false; - --iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->first; - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -bool RangeMap::RetrieveRangeAtIndex( - int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const { - BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRangeAtIndex requires |entry|"; - assert(entry); - - if (index >= GetCount()) { - BPLOG(ERROR) << "Index out of range: " << index << "/" << GetCount(); - return false; - } - - // Walk through the map. Although it's ordered, it's not a vector, so it - // can't be addressed directly by index. - MapConstIterator iterator = map_.begin(); - for (int this_index = 0; this_index < index; ++this_index) - ++iterator; - - *entry = iterator->second.entry(); - if (entry_base) - *entry_base = iterator->first; - if (entry_size) - *entry_size = iterator->first - iterator->second.base() + 1; - - return true; -} - - -template -int RangeMap::GetCount() const { - return map_.size(); -} - - -template -void RangeMap::Clear() { - map_.clear(); -} - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_INL_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/range_map.h b/thirdparty/google-breakpad/r318/src/processor/range_map.h deleted file mode 100644 index a7b67412..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/range_map.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map.h: Range maps. -// -// A range map associates a range of addresses with a specific object. This -// is useful when certain objects of variable size are located within an -// address space. The range map makes it simple to determine which object is -// associated with a specific address, which may be any address within the -// range associated with an object. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_RANGE_MAP_H__ -#define PROCESSOR_RANGE_MAP_H__ - - -#include - - -namespace google_breakpad { - - -template -class RangeMap { - public: - RangeMap() : map_() {} - - // Inserts a range into the map. Returns false for a parameter error, - // or if the location of the range would conflict with a range already - // stored in the map. - bool StoreRange(const AddressType &base, - const AddressType &size, - const EntryType &entry); - - // Locates the range encompassing the supplied address. If there is - // no such range, returns false. entry_base and entry_size, if non-NULL, - // are set to the base and size of the entry's range. - bool RetrieveRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) const; - - // Locates the range encompassing the supplied address, if one exists. - // If no range encompasses the supplied address, locates the nearest range - // to the supplied address that is lower than the address. Returns false - // if no range meets these criteria. entry_base and entry_size, if - // non-NULL, are set to the base and size of the entry's range. - bool RetrieveNearestRange(const AddressType &address, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Treating all ranges as a list ordered by the address spaces that they - // occupy, locates the range at the index specified by index. Returns - // false if index is larger than the number of ranges stored. entry_base - // and entry_size, if non-NULL, are set to the base and size of the entry's - // range. - // - // RetrieveRangeAtIndex is not optimized for speedy operation. - bool RetrieveRangeAtIndex(int index, EntryType *entry, - AddressType *entry_base, AddressType *entry_size) - const; - - // Returns the number of ranges stored in the RangeMap. - int GetCount() const; - - // Empties the range map, restoring it to the state it was when it was - // initially created. - void Clear(); - - private: - class Range { - public: - Range(const AddressType &base, const EntryType &entry) - : base_(base), entry_(entry) {} - - AddressType base() const { return base_; } - EntryType entry() const { return entry_; } - - private: - // The base address of the range. The high address does not need to - // be stored, because RangeMap uses it as the key to the map. - const AddressType base_; - - // The entry corresponding to a range. - const EntryType entry_; - }; - - // Convenience types. - typedef std::map AddressToRangeMap; - typedef typename AddressToRangeMap::const_iterator MapConstIterator; - typedef typename AddressToRangeMap::value_type MapValue; - - // Maps the high address of each range to a EntryType. - AddressToRangeMap map_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_RANGE_MAP_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/range_map_unittest.cc b/thirdparty/google-breakpad/r318/src/processor/range_map_unittest.cc deleted file mode 100644 index 5b5ce573..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/range_map_unittest.cc +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// range_map_unittest.cc: Unit tests for RangeMap -// -// Author: Mark Mentovai - - -#include -#include - -#include "processor/range_map-inl.h" - -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" - - -namespace { - - -using google_breakpad::linked_ptr; -using google_breakpad::scoped_ptr; -using google_breakpad::RangeMap; - - -// A CountedObject holds an int. A global (not thread safe!) count of -// allocated CountedObjects is maintained to help test memory management. -class CountedObject { - public: - explicit CountedObject(int id) : id_(id) { ++count_; } - ~CountedObject() { --count_; } - - static int count() { return count_; } - int id() const { return id_; } - - private: - static int count_; - int id_; -}; - -int CountedObject::count_; - - -typedef int AddressType; -typedef RangeMap< AddressType, linked_ptr > TestMap; - - -// RangeTest contains data to use for store and retrieve tests. See -// RunTests for descriptions of the tests. -struct RangeTest { - // Base address to use for test - AddressType address; - - // Size of range to use for test - AddressType size; - - // Unique ID of range - unstorable ranges must have unique IDs too - int id; - - // Whether this range is expected to be stored successfully or not - bool expect_storable; -}; - - -// A RangeTestSet encompasses multiple RangeTests, which are run in -// sequence on the same RangeMap. -struct RangeTestSet { - // An array of RangeTests - const RangeTest *range_tests; - - // The number of tests in the set - unsigned int range_test_count; -}; - - -// StoreTest uses the data in a RangeTest and calls StoreRange on the -// test RangeMap. It returns true if the expected result occurred, and -// false if something else happened. -static bool StoreTest(TestMap *range_map, const RangeTest *range_test) { - linked_ptr object(new CountedObject(range_test->id)); - bool stored = range_map->StoreRange(range_test->address, - range_test->size, - object); - - if (stored != range_test->expect_storable) { - fprintf(stderr, "FAILED: " - "StoreRange id %d, expected %s, observed %s\n", - range_test->id, - range_test->expect_storable ? "storable" : "not storable", - stored ? "stored" : "not stored"); - return false; - } - - return true; -} - - -// RetrieveTest uses the data in RangeTest and calls RetrieveRange on the -// test RangeMap. If it retrieves the expected value (which can be no -// map entry at the specified range,) it returns true, otherwise, it returns -// false. RetrieveTest will check the values around the base address and -// the high address of a range to guard against off-by-one errors. -static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) { - for (unsigned int side = 0; side <= 1; ++side) { - // When side == 0, check the low side (base address) of each range. - // When side == 1, check the high side (base + size) of each range. - - // Check one-less and one-greater than the target address in addition - // to the target address itself. - - // If the size of the range is only 1, don't check one greater than - // the base or one less than the high - for a successfully stored - // range, these tests would erroneously fail because the range is too - // small. - AddressType low_offset = -1; - AddressType high_offset = 1; - if (range_test->size == 1) { - if (!side) // When checking the low side, - high_offset = 0; // don't check one over the target. - else // When checking the high side, - low_offset = 0; // don't check one under the target. - } - - for (AddressType offset = low_offset; offset <= high_offset; ++offset) { - AddressType address = - offset + - (!side ? range_test->address : - range_test->address + range_test->size - 1); - - bool expected_result = false; // This is correct for tests not stored. - if (range_test->expect_storable) { - if (offset == 0) // When checking the target address, - expected_result = true; // test should always succeed. - else if (offset == -1) // When checking one below the target, - expected_result = side; // should fail low and succeed high. - else // When checking one above the target, - expected_result = !side; // should succeed low and fail high. - } - - linked_ptr object; - AddressType retrieved_base; - AddressType retrieved_size; - bool retrieved = range_map->RetrieveRange(address, &object, - &retrieved_base, - &retrieved_size); - - bool observed_result = retrieved && object->id() == range_test->id; - - if (observed_result != expected_result) { - fprintf(stderr, "FAILED: " - "RetrieveRange id %d, side %d, offset %d, " - "expected %s, observed %s\n", - range_test->id, - side, - offset, - expected_result ? "true" : "false", - observed_result ? "true" : "false"); - return false; - } - - // If a range was successfully retrieved, check that the returned - // bounds match the range as stored. - if (observed_result == true && - (retrieved_base != range_test->address || - retrieved_size != range_test->size)) { - fprintf(stderr, "FAILED: " - "RetrieveRange id %d, side %d, offset %d, " - "expected base/size %d/%d, observed %d/%d\n", - range_test->id, - side, - offset, - range_test->address, range_test->size, - retrieved_base, retrieved_size); - return false; - } - - // Now, check RetrieveNearestRange. The nearest range is always - // expected to be different from the test range when checking one - // less than the low side. - bool expected_nearest = range_test->expect_storable; - if (!side && offset < 0) - expected_nearest = false; - - linked_ptr nearest_object; - AddressType nearest_base; - bool retrieved_nearest = range_map->RetrieveNearestRange(address, - &nearest_object, - &nearest_base, - NULL); - - // When checking one greater than the high side, RetrieveNearestRange - // should usually return the test range. When a different range begins - // at that address, though, then RetrieveNearestRange should return the - // range at the address instead of the test range. - if (side && offset > 0 && nearest_base == address) { - expected_nearest = false; - } - - bool observed_nearest = retrieved_nearest && - nearest_object->id() == range_test->id; - - if (observed_nearest != expected_nearest) { - fprintf(stderr, "FAILED: " - "RetrieveNearestRange id %d, side %d, offset %d, " - "expected %s, observed %s\n", - range_test->id, - side, - offset, - expected_nearest ? "true" : "false", - observed_nearest ? "true" : "false"); - return false; - } - } - } - - return true; -} - - -// Test RetrieveRangeAtIndex, which is supposed to return objects in order -// according to their addresses. This test is performed by looping through -// the map, calling RetrieveRangeAtIndex for all possible indices in sequence, -// and verifying that each call returns a different object than the previous -// call, and that ranges are returned with increasing base addresses. Returns -// false if the test fails. -static bool RetrieveIndexTest(TestMap *range_map, int set) { - linked_ptr object; - CountedObject *last_object = NULL; - AddressType last_base = 0; - - int object_count = range_map->GetCount(); - for (int object_index = 0; object_index < object_count; ++object_index) { - AddressType base; - if (!range_map->RetrieveRangeAtIndex(object_index, &object, &base, NULL)) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected success, observed failure\n", - set, object_index); - return false; - } - - if (!object.get()) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected object, observed NULL\n", - set, object_index); - return false; - } - - // It's impossible to do these comparisons unless there's a previous - // object to compare against. - if (last_object) { - // The object must be different from the last one. - if (object->id() == last_object->id()) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected different objects, observed same objects (%d)\n", - set, object_index, object->id()); - return false; - } - - // Each object must have a base greater than the previous object's base. - if (base <= last_base) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d, " - "expected different bases, observed same bases (%d)\n", - set, object_index, base); - return false; - } - } - - last_object = object.get(); - last_base = base; - } - - // Make sure that RetrieveRangeAtIndex doesn't allow lookups at indices that - // are too high. - if (range_map->RetrieveRangeAtIndex(object_count, &object, NULL, NULL)) { - fprintf(stderr, "FAILED: RetrieveRangeAtIndex set %d index %d (too large), " - "expected failure, observed success\n", - set, object_count); - return false; - } - - return true; -} - - -// RunTests runs a series of test sets. -static bool RunTests() { - // These tests will be run sequentially. The first set of tests exercises - // most functions of RangeTest, and verifies all of the bounds-checking. - const RangeTest range_tests_0[] = { - { INT_MIN, 16, 1, true }, // lowest possible range - { -2, 5, 2, true }, // a range through zero - { INT_MAX - 9, 11, 3, false }, // tests anti-overflow - { INT_MAX - 9, 10, 4, true }, // highest possible range - { 5, 0, 5, false }, // tests anti-zero-size - { 5, 1, 6, true }, // smallest possible range - { -20, 15, 7, true }, // entirely negative - - { 10, 10, 10, true }, // causes the following tests to fail - { 9, 10, 11, false }, // one-less base, one-less high - { 9, 11, 12, false }, // one-less base, identical high - { 9, 12, 13, false }, // completely contains existing - { 10, 9, 14, false }, // identical base, one-less high - { 10, 10, 15, false }, // exactly identical to existing range - { 10, 11, 16, false }, // identical base, one-greater high - { 11, 8, 17, false }, // contained completely within - { 11, 9, 18, false }, // one-greater base, identical high - { 11, 10, 19, false }, // one-greater base, one-greater high - { 9, 2, 20, false }, // overlaps bottom by one - { 10, 1, 21, false }, // overlaps bottom by one, contained - { 19, 1, 22, false }, // overlaps top by one, contained - { 19, 2, 23, false }, // overlaps top by one - - { 9, 1, 24, true }, // directly below without overlap - { 20, 1, 25, true }, // directly above without overlap - - { 6, 3, 26, true }, // exactly between two ranges, gapless - { 7, 3, 27, false }, // tries to span two ranges - { 7, 5, 28, false }, // tries to span three ranges - { 4, 20, 29, false }, // tries to contain several ranges - - { 30, 50, 30, true }, - { 90, 25, 31, true }, - { 35, 65, 32, false }, // tries to span two noncontiguous - { 120, 10000, 33, true }, // > 8-bit - { 20000, 20000, 34, true }, // > 8-bit - { 0x10001, 0x10001, 35, true }, // > 16-bit - - { 27, -1, 36, false } // tests high < base - }; - - // Attempt to fill the entire space. The entire space must be filled with - // three stores because AddressType is signed for these tests, so RangeMap - // treats the size as signed and rejects sizes that appear to be negative. - // Even if these tests were run as unsigned, two stores would be needed - // to fill the space because the entire size of the space could only be - // described by using one more bit than would be present in AddressType. - const RangeTest range_tests_1[] = { - { INT_MIN, INT_MAX, 50, true }, // From INT_MIN to -2, inclusive - { -1, 2, 51, true }, // From -1 to 0, inclusive - { 1, INT_MAX, 52, true }, // From 1 to INT_MAX, inclusive - { INT_MIN, INT_MAX, 53, false }, // Can't fill the space twice - { -1, 2, 54, false }, - { 1, INT_MAX, 55, false }, - { -3, 6, 56, false }, // -3 to 2, inclusive - spans 3 ranges - }; - - // A light round of testing to verify that RetrieveRange does the right - // the right thing at the extremities of the range when nothing is stored - // there. Checks are forced without storing anything at the extremities - // by setting size = 0. - const RangeTest range_tests_2[] = { - { INT_MIN, 0, 100, false }, // makes RetrieveRange check low end - { -1, 3, 101, true }, - { INT_MAX, 0, 102, false }, // makes RetrieveRange check high end - }; - - // Similar to the previous test set, but with a couple of ranges closer - // to the extremities. - const RangeTest range_tests_3[] = { - { INT_MIN + 1, 1, 110, true }, - { INT_MAX - 1, 1, 111, true }, - { INT_MIN, 0, 112, false }, // makes RetrieveRange check low end - { INT_MAX, 0, 113, false } // makes RetrieveRange check high end - }; - - // The range map is cleared between sets of tests listed here. - const RangeTestSet range_test_sets[] = { - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) }, - { range_tests_1, sizeof(range_tests_1) / sizeof(RangeTest) }, - { range_tests_2, sizeof(range_tests_2) / sizeof(RangeTest) }, - { range_tests_3, sizeof(range_tests_3) / sizeof(RangeTest) }, - { range_tests_0, sizeof(range_tests_0) / sizeof(RangeTest) } // Run again - }; - - // Maintain the range map in a pointer so that deletion can be meaningfully - // tested. - scoped_ptr range_map(new TestMap()); - - // Run all of the test sets in sequence. - unsigned int range_test_set_count = sizeof(range_test_sets) / - sizeof(RangeTestSet); - for (unsigned int range_test_set_index = 0; - range_test_set_index < range_test_set_count; - ++range_test_set_index) { - const RangeTest *range_tests = - range_test_sets[range_test_set_index].range_tests; - unsigned int range_test_count = - range_test_sets[range_test_set_index].range_test_count; - - // Run the StoreRange test, which validates StoreRange and initializes - // the RangeMap with data for the RetrieveRange test. - int stored_count = 0; // The number of ranges successfully stored - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest *range_test = &range_tests[range_test_index]; - if (!StoreTest(range_map.get(), range_test)) - return false; - - if (range_test->expect_storable) - ++stored_count; - } - - // There should be exactly one CountedObject for everything successfully - // stored in the RangeMap. - if (CountedObject::count() != stored_count) { - fprintf(stderr, "FAILED: " - "stored object counts don't match, expected %d, observed %d\n", - stored_count, - CountedObject::count()); - - return false; - } - - // The RangeMap's own count of objects should also match. - if (range_map->GetCount() != stored_count) { - fprintf(stderr, "FAILED: stored object count doesn't match GetCount, " - "expected %d, observed %d\n", - stored_count, range_map->GetCount()); - - return false; - } - - // Run the RetrieveRange test - for (unsigned int range_test_index = 0; - range_test_index < range_test_count; - ++range_test_index) { - const RangeTest *range_test = &range_tests[range_test_index]; - if (!RetrieveTest(range_map.get(), range_test)) - return false; - } - - if (!RetrieveIndexTest(range_map.get(), range_test_set_index)) - return false; - - // Clear the map between test sets. If this is the final test set, - // delete the map instead to test destruction. - if (range_test_set_index < range_test_set_count - 1) - range_map->Clear(); - else - range_map.reset(); - - // Test that all stored objects are freed when the RangeMap is cleared - // or deleted. - if (CountedObject::count() != 0) { - fprintf(stderr, "FAILED: " - "did not free all objects after %s, %d still allocated\n", - range_test_set_index < range_test_set_count - 1 ? "clear" - : "delete", - CountedObject::count()); - - return false; - } - } - - return true; -} - - -} // namespace - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - return RunTests() ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/processor/scoped_ptr.h b/thirdparty/google-breakpad/r318/src/processor/scoped_ptr.h deleted file mode 100644 index 0d4f7fd3..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/scoped_ptr.h +++ /dev/null @@ -1,335 +0,0 @@ -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 Peter Dimov -// -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. -// This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. -// -// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation. -// - -// scoped_ptr mimics a built-in pointer except that it guarantees deletion -// of the object pointed to, either on destruction of the scoped_ptr or via -// an explicit reset(). scoped_ptr is a simple solution for simple needs; -// use shared_ptr or std::auto_ptr if your needs are more complex. - -// *** NOTE *** -// If your scoped_ptr is a class member of class FOO pointing to a -// forward declared type BAR (as shown below), then you MUST use a non-inlined -// version of the destructor. The destructor of a scoped_ptr (called from -// FOO's destructor) must have a complete definition of BAR in order to -// destroy it. Example: -// -// -- foo.h -- -// class BAR; -// -// class FOO { -// public: -// FOO(); -// ~FOO(); // Required for sources that instantiate class FOO to compile! -// -// private: -// scoped_ptr bar_; -// }; -// -// -- foo.cc -- -// #include "foo.h" -// FOO::~FOO() {} // Empty, but must be non-inlined to FOO's class definition. - -// scoped_ptr_malloc added by Google -// When one of these goes out of scope, instead of doing a delete or -// delete[], it calls free(). scoped_ptr_malloc is likely to see -// much more use than any other specializations. - -// release() added by Google -// Use this to conditionally transfer ownership of a heap-allocated object -// to the caller, usually on method success. - -#ifndef PROCESSOR_SCOPED_PTR_H__ -#define PROCESSOR_SCOPED_PTR_H__ - -#include // for std::ptrdiff_t -#include // for assert -#include // for free() decl - -namespace google_breakpad { - -template -class scoped_ptr { - private: - - T* ptr; - - scoped_ptr(scoped_ptr const &); - scoped_ptr & operator=(scoped_ptr const &); - - public: - - typedef T element_type; - - explicit scoped_ptr(T* p = 0): ptr(p) {} - - ~scoped_ptr() { - typedef char type_must_be_complete[sizeof(T)]; - delete ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete ptr; - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr should have its own object - template bool operator==(scoped_ptr const& p) const; - template bool operator!=(scoped_ptr const& p) const; -}; - -template inline -void swap(scoped_ptr& a, scoped_ptr& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr& b) { - return p != b.get(); -} - -// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to -// is guaranteed, either on destruction of the scoped_array or via an explicit -// reset(). Use shared_array or std::vector if your needs are more complex. - -template -class scoped_array { - private: - - T* ptr; - - scoped_array(scoped_array const &); - scoped_array & operator=(scoped_array const &); - - public: - - typedef T element_type; - - explicit scoped_array(T* p = 0) : ptr(p) {} - - ~scoped_array() { - typedef char type_must_be_complete[sizeof(T)]; - delete[] ptr; - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - delete [] ptr; - ptr = p; - } - } - - T& operator[](std::ptrdiff_t i) const { - assert(ptr != 0); - assert(i >= 0); - return ptr[i]; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_array & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_array should have its own object - template bool operator==(scoped_array const& p) const; - template bool operator!=(scoped_array const& p) const; -}; - -template inline -void swap(scoped_array& a, scoped_array& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_array& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_array& b) { - return p != b.get(); -} - - -// This class wraps the c library function free() in a class that can be -// passed as a template argument to scoped_ptr_malloc below. -class ScopedPtrMallocFree { - public: - inline void operator()(void* x) const { - free(x); - } -}; - -// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a -// second template argument, the functor used to free the object. - -template -class scoped_ptr_malloc { - private: - - T* ptr; - - scoped_ptr_malloc(scoped_ptr_malloc const &); - scoped_ptr_malloc & operator=(scoped_ptr_malloc const &); - - public: - - typedef T element_type; - - explicit scoped_ptr_malloc(T* p = 0): ptr(p) {} - - ~scoped_ptr_malloc() { - typedef char type_must_be_complete[sizeof(T)]; - free_((void*) ptr); - } - - void reset(T* p = 0) { - typedef char type_must_be_complete[sizeof(T)]; - - if (ptr != p) { - free_((void*) ptr); - ptr = p; - } - } - - T& operator*() const { - assert(ptr != 0); - return *ptr; - } - - T* operator->() const { - assert(ptr != 0); - return ptr; - } - - bool operator==(T* p) const { - return ptr == p; - } - - bool operator!=(T* p) const { - return ptr != p; - } - - T* get() const { - return ptr; - } - - void swap(scoped_ptr_malloc & b) { - T* tmp = b.ptr; - b.ptr = ptr; - ptr = tmp; - } - - T* release() { - T* tmp = ptr; - ptr = 0; - return tmp; - } - - private: - - // no reason to use these: each scoped_ptr_malloc should have its own object - template - bool operator==(scoped_ptr_malloc const& p) const; - template - bool operator!=(scoped_ptr_malloc const& p) const; - - static FreeProc const free_; -}; - -template -FP const scoped_ptr_malloc::free_ = FP(); - -template inline -void swap(scoped_ptr_malloc& a, scoped_ptr_malloc& b) { - a.swap(b); -} - -template inline -bool operator==(T* p, const scoped_ptr_malloc& b) { - return p == b.get(); -} - -template inline -bool operator!=(T* p, const scoped_ptr_malloc& b) { - return p != b.get(); -} - -} // namespace google_breakpad - -#endif // PROCESSOR_SCOPED_PTR_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.cc b/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.cc deleted file mode 100644 index c593e955..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// simple_symbol_supplier.cc: A simple SymbolSupplier implementation -// -// See simple_symbol_supplier.h for documentation. -// -// Author: Mark Mentovai - -#include -#include - -#include -#include -#include -#include - -#include "processor/simple_symbol_supplier.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/logging.h" -#include "processor/pathname_stripper.h" - -namespace google_breakpad { - -static bool file_exists(const string &file_name) { - struct stat sb; - return stat(file_name.c_str(), &sb) == 0; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( - const CodeModule *module, const SystemInfo *system_info, - string *symbol_file) { - BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFile " - "requires |symbol_file|"; - assert(symbol_file); - symbol_file->clear(); - - for (unsigned int path_index = 0; path_index < paths_.size(); ++path_index) { - SymbolResult result; - if ((result = GetSymbolFileAtPathFromRoot(module, system_info, - paths_[path_index], - symbol_file)) != NOT_FOUND) { - return result; - } - } - return NOT_FOUND; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( - const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - assert(symbol_data); - symbol_data->clear(); - - SymbolSupplier::SymbolResult s = GetSymbolFile(module, system_info, symbol_file); - - if (s == FOUND) { - std::ifstream in(symbol_file->c_str()); - std::getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - return s; -} - -SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPathFromRoot( - const CodeModule *module, const SystemInfo *system_info, - const string &root_path, string *symbol_file) { - BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFileAtPath " - "requires |symbol_file|"; - assert(symbol_file); - symbol_file->clear(); - - if (!module) - return NOT_FOUND; - - // Start with the base path. - string path = root_path; - - // Append the debug (pdb) file name as a directory name. - path.append("/"); - string debug_file_name = PathnameStripper::File(module->debug_file()); - if (debug_file_name.empty()) { - BPLOG(ERROR) << "Can't construct symbol file path without debug_file " - "(code_file = " << - PathnameStripper::File(module->code_file()) << ")"; - return NOT_FOUND; - } - path.append(debug_file_name); - - // Append the identifier as a directory name. - path.append("/"); - string identifier = module->debug_identifier(); - if (identifier.empty()) { - BPLOG(ERROR) << "Can't construct symbol file path without debug_identifier " - "(code_file = " << - PathnameStripper::File(module->code_file()) << - ", debug_file = " << debug_file_name << ")"; - return NOT_FOUND; - } - path.append(identifier); - - // Transform the debug file name into one ending in .sym. If the existing - // name ends in .pdb, strip the .pdb. Otherwise, add .sym to the non-.pdb - // name. - path.append("/"); - string debug_file_extension; - if (debug_file_name.size() > 4) - debug_file_extension = debug_file_name.substr(debug_file_name.size() - 4); - std::transform(debug_file_extension.begin(), debug_file_extension.end(), - debug_file_extension.begin(), tolower); - if (debug_file_extension == ".pdb") { - path.append(debug_file_name.substr(0, debug_file_name.size() - 4)); - } else { - path.append(debug_file_name); - } - path.append(".sym"); - - if (!file_exists(path)) { - BPLOG(INFO) << "No symbol file at " << path; - return NOT_FOUND; - } - - *symbol_file = path; - return FOUND; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.h b/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.h deleted file mode 100644 index dff6a512..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/simple_symbol_supplier.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// simple_symbol_supplier.h: A simple SymbolSupplier implementation -// -// SimpleSymbolSupplier is a straightforward implementation of SymbolSupplier -// that stores symbol files in a filesystem tree. A SimpleSymbolSupplier is -// created with one or more base directories, which are the root paths for all -// symbol files. Each symbol file contained therein has a directory entry in -// the base directory with a name identical to the corresponding debugging -// file (pdb). Within each of these directories, there are subdirectories -// named for the debugging file's identifier. For recent pdb files, this is -// a concatenation of the pdb's uuid and age, presented in hexadecimal form, -// without any dashes or separators. The uuid is in uppercase hexadecimal -// and the age is in lowercase hexadecimal. Within that subdirectory, -// SimpleSymbolSupplier expects to find the symbol file, which is named -// identically to the debug file, but with a .sym extension. If the original -// debug file had a name ending in .pdb, the .pdb extension will be replaced -// with .sym. This sample hierarchy is rooted at the "symbols" base -// directory: -// -// symbols -// symbols/test_app.pdb -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1 -// symbols/test_app.pdb/63FE4780728D49379B9D7BB6460CB42A1/test_app.sym -// symbols/kernel32.pdb -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542 -// symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542/kernel32.sym -// -// In this case, the uuid of test_app.pdb is -// 63fe4780-728d-4937-9b9d-7bb6460cb42a and its age is 1. -// -// This scheme was chosen to be roughly analogous to the way that -// symbol files may be accessed from Microsoft Symbol Server. A hierarchy -// used for Microsoft Symbol Server storage is usable as a hierarchy for -// SimpleSymbolServer, provided that the pdb files are transformed to dumped -// format using a tool such as dump_syms, and given a .sym extension. -// -// SimpleSymbolSupplier will iterate over all root paths searching for -// a symbol file existing in that path. -// -// SimpleSymbolSupplier supports any debugging file which can be identified -// by a CodeModule object's debug_file and debug_identifier accessors. The -// expected ultimate source of these CodeModule objects are MinidumpModule -// objects; it is this class that is responsible for assigning appropriate -// values for debug_file and debug_identifier. -// -// Author: Mark Mentovai - -#ifndef PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ -#define PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ - -#include -#include - -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -class CodeModule; - -class SimpleSymbolSupplier : public SymbolSupplier { - public: - // Creates a new SimpleSymbolSupplier, using path as the root path where - // symbols are stored. - explicit SimpleSymbolSupplier(const string &path) : paths_(1, path) {} - - // Creates a new SimpleSymbolSupplier, using paths as a list of root - // paths where symbols may be stored. - explicit SimpleSymbolSupplier(const vector &paths) : paths_(paths) {} - - virtual ~SimpleSymbolSupplier() {} - - // Returns the path to the symbol file for the given module. See the - // description above. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - protected: - SymbolResult GetSymbolFileAtPathFromRoot(const CodeModule *module, - const SystemInfo *system_info, - const string &root_path, - string *symbol_file); - - private: - vector paths_; -}; - -} // namespace google_breakpad - -#endif // PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/stack_frame_info.h b/thirdparty/google-breakpad/r318/src/processor/stack_frame_info.h deleted file mode 100644 index 052a9338..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stack_frame_info.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stack_frame_info.h: Holds debugging information about a stack frame. -// -// This structure is specific to Windows debugging information obtained -// from pdb files using the DIA API. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACK_FRAME_INFO_H__ -#define PROCESSOR_STACK_FRAME_INFO_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -struct StackFrameInfo { - public: - enum Validity { - VALID_NONE = 0, - VALID_PARAMETER_SIZE = 1, - VALID_ALL = -1 - }; - - StackFrameInfo() : valid(VALID_NONE), - prolog_size(0), - epilog_size(0), - parameter_size(0), - saved_register_size(0), - local_size(0), - max_stack_size(0), - allocates_base_pointer(0), - program_string() {} - - StackFrameInfo(u_int32_t set_prolog_size, - u_int32_t set_epilog_size, - u_int32_t set_parameter_size, - u_int32_t set_saved_register_size, - u_int32_t set_local_size, - u_int32_t set_max_stack_size, - int set_allocates_base_pointer, - const std::string set_program_string) - : valid(VALID_ALL), - prolog_size(set_prolog_size), - epilog_size(set_epilog_size), - parameter_size(set_parameter_size), - saved_register_size(set_saved_register_size), - local_size(set_local_size), - max_stack_size(set_max_stack_size), - allocates_base_pointer(set_allocates_base_pointer), - program_string(set_program_string) {} - - // CopyFrom makes "this" StackFrameInfo object identical to "that". - void CopyFrom(const StackFrameInfo &that) { - valid = that.valid; - prolog_size = that.prolog_size; - epilog_size = that.epilog_size; - parameter_size = that.parameter_size; - saved_register_size = that.saved_register_size; - local_size = that.local_size; - max_stack_size = that.max_stack_size; - allocates_base_pointer = that.allocates_base_pointer; - program_string = that.program_string; - } - - // Clears the StackFrameInfo object so that users will see it as though - // it contains no information. - void Clear() { - valid = VALID_NONE; - program_string.erase(); - } - - // Identifies which fields in the structure are valid. This is of - // type Validity, but it is defined as an int because it's not - // possible to OR values into an enumerated type. Users must check - // this field before using any other. - int valid; - - // These values come from IDiaFrameData. - u_int32_t prolog_size; - u_int32_t epilog_size; - u_int32_t parameter_size; - u_int32_t saved_register_size; - u_int32_t local_size; - u_int32_t max_stack_size; - - // Only one of allocates_base_pointer or program_string will be valid. - // If program_string is empty, use allocates_base_pointer. - bool allocates_base_pointer; - std::string program_string; -}; - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACK_FRAME_INFO_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker.cc deleted file mode 100644 index de67bdaa..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker.cc +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker.cc: Generic stackwalker. -// -// See stackwalker.h for documentation. -// -// Author: Mark Mentovai - - -#include - -#include "google_breakpad/processor/stackwalker.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/source_line_resolver_interface.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/symbol_supplier.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/scoped_ptr.h" -#include "processor/stack_frame_info.h" -#include "processor/stackwalker_ppc.h" -#include "processor/stackwalker_sparc.h" -#include "processor/stackwalker_x86.h" -#include "processor/stackwalker_amd64.h" - -namespace google_breakpad { - - -Stackwalker::Stackwalker(const SystemInfo *system_info, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : system_info_(system_info), - memory_(memory), - modules_(modules), - supplier_(supplier), - resolver_(resolver) { -} - - -bool Stackwalker::Walk(CallStack *stack) { - BPLOG_IF(ERROR, !stack) << "Stackwalker::Walk requires |stack|"; - assert(stack); - stack->Clear(); - - // stack_frame_info parallels the CallStack. The vector is passed to the - // GetCallerFrame function. It contains information that may be helpful - // for stackwalking. - vector< linked_ptr > stack_frame_info; - - // Begin with the context frame, and keep getting callers until there are - // no more. - - // Take ownership of the pointer returned by GetContextFrame. - scoped_ptr frame(GetContextFrame()); - - while (frame.get()) { - // frame already contains a good frame with properly set instruction and - // frame_pointer fields. The frame structure comes from either the - // context frame (above) or a caller frame (below). - - linked_ptr frame_info; - - // Resolve the module information, if a module map was provided. - if (modules_) { - const CodeModule *module = - modules_->GetModuleForAddress(frame->instruction); - if (module) { - frame->module = module; - if (resolver_ && - !resolver_->HasModule(frame->module->code_file()) && - supplier_) { - string symbol_data, symbol_file; - SymbolSupplier::SymbolResult symbol_result = - supplier_->GetSymbolFile(module, system_info_, - &symbol_file, &symbol_data); - - switch (symbol_result) { - case SymbolSupplier::FOUND: - resolver_->LoadModuleUsingMapBuffer(frame->module->code_file(), - symbol_data); - break; - case SymbolSupplier::NOT_FOUND: - break; // nothing to do - case SymbolSupplier::INTERRUPT: - return false; - } - } - frame_info.reset(resolver_->FillSourceLineInfo(frame.get())); - } - } - - // Add the frame to the call stack. Relinquish the ownership claim - // over the frame, because the stack now owns it. - stack->frames_.push_back(frame.release()); - - // Add the frame info to the parallel stack. - stack_frame_info.push_back(frame_info); - frame_info.reset(NULL); - - // Get the next frame and take ownership. - frame.reset(GetCallerFrame(stack, stack_frame_info)); - } - - return true; -} - - -// static -Stackwalker* Stackwalker::StackwalkerForCPU( - const SystemInfo *system_info, - MinidumpContext *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) { - if (!context) { - BPLOG(ERROR) << "Can't choose a stackwalker implementation without context"; - return NULL; - } - - Stackwalker *cpu_stackwalker = NULL; - - u_int32_t cpu = context->GetContextCPU(); - switch (cpu) { - case MD_CONTEXT_X86: - cpu_stackwalker = new StackwalkerX86(system_info, - context->GetContextX86(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_PPC: - cpu_stackwalker = new StackwalkerPPC(system_info, - context->GetContextPPC(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_AMD64: - cpu_stackwalker = new StackwalkerAMD64(system_info, - context->GetContextAMD64(), - memory, modules, supplier, - resolver); - break; - - case MD_CONTEXT_SPARC: - cpu_stackwalker = new StackwalkerSPARC(system_info, - context->GetContextSPARC(), - memory, modules, supplier, - resolver); - break; - } - - BPLOG_IF(ERROR, !cpu_stackwalker) << "Unknown CPU type " << HexString(cpu) << - ", can't choose a stackwalker " - "implementation"; - return cpu_stackwalker; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.cc deleted file mode 100644 index 7a413963..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.cc +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_amd64.cc: amd64-specific stackwalker. -// -// See stackwalker_amd64.h for documentation. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#include "processor/stackwalker_amd64.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" - -namespace google_breakpad { - - -StackwalkerAMD64::StackwalkerAMD64(const SystemInfo *system_info, - const MDRawContextAMD64 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { -} - - -StackFrame* StackwalkerAMD64::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameAMD64 *frame = new StackFrameAMD64(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameAMD64::CONTEXT_VALID_ALL; - frame->instruction = frame->context.rip; - - return frame; -} - - -StackFrame* StackwalkerAMD64::GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - StackFrameAMD64 *last_frame = static_cast( - stack->frames()->back()); - - //FIXME: this pretty much doesn't work at all due to FPO - // being enabled by default. - // Brain-dead stackwalking: - // %rip_new = *(%rbp_old + 8) - // %rsp_new = %rbp_old + 16 - // %rbp_new = *(%rbp_old) - - // A caller frame must reside higher in memory than its callee frames. - // Anything else is an error, or an indication that we've reached the - // end of the stack. - u_int64_t stack_pointer = last_frame->context.rbp + 16; - if (stack_pointer <= last_frame->context.rsp) { - return NULL; - } - - u_int64_t instruction; - if (!memory_->GetMemoryAtAddress(last_frame->context.rbp + 8, - &instruction) || - instruction <= 1) { - return NULL; - } - - u_int64_t stack_base; - if (!memory_->GetMemoryAtAddress(last_frame->context.rbp, - &stack_base) || - stack_base <= 1) { - return NULL; - } - - StackFrameAMD64 *frame = new StackFrameAMD64(); - - frame->context = last_frame->context; - frame->context.rip = instruction; - frame->context.rsp = stack_pointer; - frame->context.rbp = stack_base; - frame->context_validity = StackFrameAMD64::CONTEXT_VALID_RIP | - StackFrameAMD64::CONTEXT_VALID_RSP | - StackFrameAMD64::CONTEXT_VALID_RBP; - - frame->instruction = frame->context.rip - 1; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.h b/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.h deleted file mode 100644 index a3e11358..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_amd64.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_amd64.h: amd64-specific stackwalker. -// -// Provides stack frames given amd64 register context and a memory region -// corresponding to a amd64 stack. -// -// Author: Mark Mentovai, Ted Mielczarek - - -#ifndef PROCESSOR_STACKWALKER_AMD64_H__ -#define PROCESSOR_STACKWALKER_AMD64_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerAMD64 : public Stackwalker { - public: - // context is a amd64 context object that gives access to amd64-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerAMD64(const SystemInfo *system_info, - const MDRawContextAMD64 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using amd64 context (stack pointer in %rsp, - // stack base in %rbp) and stack conventions (saved stack pointer at 0(%rbp)) - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextAMD64 *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_AMD64_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.cc deleted file mode 100644 index 02a49b21..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.cc +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_ppc.cc: ppc-specific stackwalker. -// -// See stackwalker_ppc.h for documentation. -// -// Author: Mark Mentovai - - -#include "processor/stackwalker_ppc.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" - -namespace google_breakpad { - - -StackwalkerPPC::StackwalkerPPC(const SystemInfo *system_info, - const MDRawContextPPC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { - if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { - // This implementation only covers 32-bit ppc CPUs. The limits of the - // supplied stack are invalid. Mark memory_ = NULL, which will cause - // stackwalking to fail. - BPLOG(ERROR) << "Memory out of range for stackwalking: " << - HexString(memory_->GetBase()) << "+" << - HexString(memory_->GetSize()); - memory_ = NULL; - } -} - - -StackFrame* StackwalkerPPC::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFramePPC *frame = new StackFramePPC(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFramePPC::CONTEXT_VALID_ALL; - frame->instruction = frame->context.srr0; - - return frame; -} - - -StackFrame* StackwalkerPPC::GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - // The instruction pointers for previous frames are saved on the stack. - // The typical ppc calling convention is for the called procedure to store - // its return address in the calling procedure's stack frame at 8(%r1), - // and to allocate its own stack frame by decrementing %r1 (the stack - // pointer) and saving the old value of %r1 at 0(%r1). Because the ppc has - // no hardware stack, there is no distinction between the stack pointer and - // frame pointer, and what is typically thought of as the frame pointer on - // an x86 is usually referred to as the stack pointer on a ppc. - - StackFramePPC *last_frame = static_cast( - stack->frames()->back()); - - // A caller frame must reside higher in memory than its callee frames. - // Anything else is an error, or an indication that we've reached the - // end of the stack. - u_int32_t stack_pointer; - if (!memory_->GetMemoryAtAddress(last_frame->context.gpr[1], - &stack_pointer) || - stack_pointer <= last_frame->context.gpr[1]) { - return NULL; - } - - // Mac OS X/Darwin gives 1 as the return address from the bottom-most - // frame in a stack (a thread's entry point). I haven't found any - // documentation on this, but 0 or 1 would be bogus return addresses, - // so check for them here and return false (end of stack) when they're - // hit to avoid having a phantom frame. - u_int32_t instruction; - if (!memory_->GetMemoryAtAddress(stack_pointer + 8, &instruction) || - instruction <= 1) { - return NULL; - } - - StackFramePPC *frame = new StackFramePPC(); - - frame->context = last_frame->context; - frame->context.srr0 = instruction; - frame->context.gpr[1] = stack_pointer; - frame->context_validity = StackFramePPC::CONTEXT_VALID_SRR0 | - StackFramePPC::CONTEXT_VALID_GPR1; - - // frame->context.srr0 is the return address, which is one instruction - // past the branch that caused us to arrive at the callee. Set - // frame_ppc->instruction to four less than that. Since all ppc - // instructions are 4 bytes wide, this is the address of the branch - // instruction. This allows source line information to match up with the - // line that contains a function call. Callers that require the exact - // return address value may access the context.srr0 field of StackFramePPC. - frame->instruction = frame->context.srr0 - 4; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.h b/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.h deleted file mode 100644 index 3d312419..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_ppc.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_ppc.h: ppc-specific stackwalker. -// -// Provides stack frames given ppc register context and a memory region -// corresponding to a ppc stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_PPC_H__ -#define PROCESSOR_STACKWALKER_PPC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerPPC : public Stackwalker { - public: - // context is a ppc context object that gives access to ppc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerPPC(const SystemInfo *system_info, - const MDRawContextPPC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using ppc context (stack pointer in %r1, - // saved program counter in %srr0) and stack conventions (saved stack - // pointer at 0(%r1), return address at 8(0(%r1)). - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextPPC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_PPC_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest.cc deleted file mode 100644 index 6b71a6a8..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest.cc +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_selftest.cc: Tests StackwalkerX86 or StackwalkerPPC using the -// running process' stack as test data, if running on an x86 or ppc and -// compiled with gcc. This test is not enabled in the "make check" suite -// by default, because certain optimizations interfere with its proper -// operation. To turn it on, configure with --enable-selftest. -// -// Optimizations that cause problems: -// - stack frame reuse. The Recursor function here calls itself with -// |return Recursor|. When the caller's frame is reused, it will cause -// CountCallerFrames to correctly return the same number of frames -// in both the caller and callee. This is considered an unexpected -// condition in the test, which expects a callee to have one more -// caller frame in the stack than its caller. -// - frame pointer omission. Even with a stackwalker that understands -// this optimization, the code to harness debug information currently -// only exists to retrieve it from minidumps, not the current process. -// -// This test can also serve as a developmental and debugging aid if -// PRINT_STACKS is defined. -// -// Author: Mark Mentovai - -#include "processor/logging.h" - -#if defined(__i386) && !defined(__i386__) -#define __i386__ -#endif -#if defined(__sparc) && !defined(__sparc__) -#define __sparc__ -#endif - -#if (defined(__SUNPRO_CC) || defined(__GNUC__)) && \ - (defined(__i386__) || defined(__ppc__) || defined(__sparc__)) - - -#include - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/scoped_ptr.h" - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::MemoryRegion; -using google_breakpad::scoped_ptr; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameX86; -using google_breakpad::StackFrameSPARC; - -#if defined(__i386__) -#include "processor/stackwalker_x86.h" -using google_breakpad::StackwalkerX86; -#elif defined(__ppc__) -#include "processor/stackwalker_ppc.h" -using google_breakpad::StackwalkerPPC; -#elif defined(__sparc__) -#include "processor/stackwalker_sparc.h" -using google_breakpad::StackwalkerSPARC; -#endif // __i386__ || __ppc__ || __sparc__ - -#define RECURSION_DEPTH 100 - - -// A simple MemoryRegion subclass that provides direct access to this -// process' memory space by pointer. -class SelfMemoryRegion : public MemoryRegion { - public: - virtual u_int64_t GetBase() { return 0; } - virtual u_int32_t GetSize() { return 0xffffffff; } - - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) { - return GetMemoryAtAddressInternal(address, value); } - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) { - return GetMemoryAtAddressInternal(address, value); } - - private: - template bool GetMemoryAtAddressInternal(u_int64_t address, - T* value) { - // Without knowing what addresses are actually mapped, just assume that - // everything low is not mapped. This helps the stackwalker catch the - // end of a stack when it tries to dereference a null or low pointer - // in an attempt to find the caller frame. Other unmapped accesses will - // cause the program to crash, but that would properly be a test failure. - if (address < 0x100) - return false; - - u_int8_t* memory = 0; - *value = *reinterpret_cast(&memory[address]); - return true; - } -}; - - -#if defined(__GNUC__) - - -#if defined(__i386__) - -// GetEBP returns the current value of the %ebp register. Because it's -// implemented as a function, %ebp itself contains GetEBP's frame pointer -// and not the caller's frame pointer. Dereference %ebp to obtain the -// caller's frame pointer, which the compiler-generated preamble stored -// on the stack (provided frame pointers are not being omitted.) Because -// this function depends on the compiler-generated preamble, inlining is -// disabled. -static u_int32_t GetEBP() __attribute__((noinline)); -static u_int32_t GetEBP() { - u_int32_t ebp; - __asm__ __volatile__( - "movl (%%ebp), %0" - : "=a" (ebp) - ); - return ebp; -} - - -// The caller's %esp is 8 higher than the value of %ebp in this function, -// assuming that it's not inlined and that the standard prolog is used. -// The CALL instruction places a 4-byte return address on the stack above -// the caller's %esp, and this function's prolog will save the caller's %ebp -// on the stack as well, for another 4 bytes, before storing %esp in %ebp. -static u_int32_t GetESP() __attribute__((noinline)); -static u_int32_t GetESP() { - u_int32_t ebp; - __asm__ __volatile__( - "movl %%ebp, %0" - : "=a" (ebp) - ); - return ebp + 8; -} - - -// GetEIP returns the instruction pointer identifying the next instruction -// to execute after GetEIP returns. It obtains this information from the -// stack, where it was placed by the call instruction that called GetEIP. -// This function depends on frame pointers not being omitted. It is possible -// to write a pure asm version of this routine that has no compiler-generated -// preamble and uses %esp instead of %ebp; that would function in the -// absence of frame pointers. However, the simpler approach is used here -// because GetEBP and stackwalking necessarily depends on access to frame -// pointers. Because this function depends on a call instruction and the -// compiler-generated preamble, inlining is disabled. -static u_int32_t GetEIP() __attribute__((noinline)); -static u_int32_t GetEIP() { - u_int32_t eip; - __asm__ __volatile__( - "movl 4(%%ebp), %0" - : "=a" (eip) - ); - return eip; -} - - -#elif defined(__ppc__) - - -// GetSP returns the current value of the %r1 register, which by convention, -// is the stack pointer on ppc. Because it's implemented as a function, -// %r1 itself contains GetSP's own stack pointer and not the caller's stack -// pointer. Dereference %r1 to obtain the caller's stack pointer, which the -// compiler-generated prolog stored on the stack. Because this function -// depends on the compiler-generated prolog, inlining is disabled. -static u_int32_t GetSP() __attribute__((noinline)); -static u_int32_t GetSP() { - u_int32_t sp; - __asm__ __volatile__( - "lwz %0, 0(r1)" - : "=r" (sp) - ); - return sp; -} - - -// GetPC returns the program counter identifying the next instruction to -// execute after GetPC returns. It obtains this information from the -// link register, where it was placed by the branch instruction that called -// GetPC. Because this function depends on the caller's use of a branch -// instruction, inlining is disabled. -static u_int32_t GetPC() __attribute__((noinline)); -static u_int32_t GetPC() { - u_int32_t lr; - __asm__ __volatile__( - "mflr %0" - : "=r" (lr) - ); - return lr; -} - - -#elif defined(__sparc__) - - -// GetSP returns the current value of the %sp/%o6/%g_r[14] register, which -// by convention, is the stack pointer on sparc. Because it's implemented -// as a function, %sp itself contains GetSP's own stack pointer and not -// the caller's stack pointer. Dereference to obtain the caller's stack -// pointer, which the compiler-generated prolog stored on the stack. -// Because this function depends on the compiler-generated prolog, inlining -// is disabled. -static u_int32_t GetSP() __attribute__((noinline)); -static u_int32_t GetSP() { - u_int32_t sp; - __asm__ __volatile__( - "mov %%fp, %0" - : "=r" (sp) - ); - return sp; -} - -// GetFP returns the current value of the %fp register. Because it's -// implemented as a function, %fp itself contains GetFP's frame pointer -// and not the caller's frame pointer. Dereference %fp to obtain the -// caller's frame pointer, which the compiler-generated preamble stored -// on the stack (provided frame pointers are not being omitted.) Because -// this function depends on the compiler-generated preamble, inlining is -// disabled. -static u_int32_t GetFP() __attribute__((noinline)); -static u_int32_t GetFP() { - u_int32_t fp; - __asm__ __volatile__( - "ld [%%fp+56], %0" - : "=r" (fp) - ); - return fp; -} - -// GetPC returns the program counter identifying the next instruction to -// execute after GetPC returns. It obtains this information from the -// link register, where it was placed by the branch instruction that called -// GetPC. Because this function depends on the caller's use of a branch -// instruction, inlining is disabled. -static u_int32_t GetPC() __attribute__((noinline)); -static u_int32_t GetPC() { - u_int32_t pc; - __asm__ __volatile__( - "mov %%i7, %0" - : "=r" (pc) - ); - return pc + 8; -} - -#endif // __i386__ || __ppc__ || __sparc__ - -#elif defined(__SUNPRO_CC) - -#if defined(__i386__) -extern "C" { -extern u_int32_t GetEIP(); -extern u_int32_t GetEBP(); -extern u_int32_t GetESP(); -} -#elif defined(__sparc__) -extern "C" { -extern u_int32_t GetPC(); -extern u_int32_t GetFP(); -extern u_int32_t GetSP(); -} -#endif // __i386__ || __sparc__ - -#endif // __GNUC__ || __SUNPRO_CC - -// CountCallerFrames returns the number of stack frames beneath the function -// that called CountCallerFrames. Because this function's return value -// is dependent on the size of the stack beneath it, inlining is disabled, -// and any function that calls this should not be inlined either. -#if defined(__GNUC__) -static unsigned int CountCallerFrames() __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -static unsigned int CountCallerFrames(); -#endif -static unsigned int CountCallerFrames() { - SelfMemoryRegion memory; - BasicSourceLineResolver resolver; - -#if defined(__i386__) - MDRawContextX86 context = MDRawContextX86(); - context.eip = GetEIP(); - context.ebp = GetEBP(); - context.esp = GetESP(); - - StackwalkerX86 stackwalker = StackwalkerX86(NULL, &context, &memory, NULL, - NULL, &resolver); -#elif defined(__ppc__) - MDRawContextPPC context = MDRawContextPPC(); - context.srr0 = GetPC(); - context.gpr[1] = GetSP(); - - StackwalkerPPC stackwalker = StackwalkerPPC(NULL, &context, &memory, NULL, - NULL, &resolver); -#elif defined(__sparc__) - MDRawContextSPARC context = MDRawContextSPARC(); - context.pc = GetPC(); - context.g_r[14] = GetSP(); - context.g_r[30] = GetFP(); - - StackwalkerSPARC stackwalker = StackwalkerSPARC(NULL, &context, &memory, - NULL, NULL, &resolver); -#endif // __i386__ || __ppc__ || __sparc__ - - CallStack stack; - stackwalker.Walk(&stack); - -#ifdef PRINT_STACKS - printf("\n"); - for (unsigned int frame_index = 0; - frame_index < stack.frames()->size(); - ++frame_index) { - StackFrame *frame = stack.frames()->at(frame_index); - printf("frame %-3d instruction = 0x%08" PRIx64, - frame_index, frame->instruction); -#if defined(__i386__) - StackFrameX86 *frame_x86 = reinterpret_cast(frame); - printf(" esp = 0x%08x ebp = 0x%08x\n", - frame_x86->context.esp, frame_x86->context.ebp); -#elif defined(__ppc__) - StackFramePPC *frame_ppc = reinterpret_cast(frame); - printf(" gpr[1] = 0x%08x\n", frame_ppc->context.gpr[1]); -#elif defined(__sparc__) - StackFrameSPARC *frame_sparc = reinterpret_cast(frame); - printf(" sp = 0x%08x fp = 0x%08x\n", - frame_sparc->context.g_r[14], frame_sparc->context.g_r[30]); -#endif // __i386__ || __ppc__ || __sparc__ - } -#endif // PRINT_STACKS - - // Subtract 1 because the caller wants the number of frames beneath - // itself. Because the caller called us, subract two for our frame and its - // frame, which are included in stack.size(). - return stack.frames()->size() - 2; -} - - -// Recursor verifies that the number stack frames beneath itself is one more -// than the number of stack frames beneath its parent. When depth frames -// have been reached, Recursor stops checking and returns success. If the -// frame count check fails at any depth, Recursor will stop and return false. -// Because this calls CountCallerFrames, inlining is disabled. -#if defined(__GNUC__) -static bool Recursor(unsigned int depth, unsigned int parent_callers) - __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -static bool Recursor(unsigned int depth, unsigned int parent_callers); -#endif -static bool Recursor(unsigned int depth, unsigned int parent_callers) { - unsigned int callers = CountCallerFrames(); - if (callers != parent_callers + 1) - return false; - - if (depth) - return Recursor(depth - 1, callers); - - // depth == 0 - return true; -} - - -// Because this calls CountCallerFrames, inlining is disabled - but because -// it's main (and nobody calls it other than the entry point), it wouldn't -// be inlined anyway. -#if defined(__GNUC__) -int main(int argc, char** argv) __attribute__((noinline)); -#elif defined(__SUNPRO_CC) -int main(int argc, char** argv); -#endif -int main(int argc, char** argv) { - BPLOG_INIT(&argc, &argv); - - return Recursor(RECURSION_DEPTH, CountCallerFrames()) ? 0 : 1; -} - - -#else -// Not i386 or ppc or sparc? We can only test stacks we know how to walk. - - -int main(int argc, char **argv) { - BPLOG_INIT(&argc, &argv); - - // "make check" interprets an exit status of 77 to mean that the test is - // not supported. - BPLOG(ERROR) << "Selftest not supported here"; - return 77; -} - - -#endif // (__GNUC__ || __SUNPRO_CC) && (__i386__ || __ppc__ || __sparc__) diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest_sol.s b/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest_sol.s deleted file mode 100644 index 648b0499..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_selftest_sol.s +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2007, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* stackwalker_selftest_sol.s - * On Solaris, the recommeded compiler is CC, so we can not use gcc inline - * asm, use this method instead. - * - * How to compile: as -P -L -D_ASM -D_STDC -K PIC -o \ - * src/processor/stackwalker_selftest_sol.o \ - * src/processor/stackwalker_selftest_sol.s - * - * Author: Michael Shang - */ - -#include - -#if defined(__i386) - - -ENTRY(GetEBP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl 0x00000000(%ebp),%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - leave - ret -SET_SIZE(GetEBP) - -ENTRY(GetEIP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl 0x00000004(%ebp),%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - leave - ret -SET_SIZE(GetEIP) - -ENTRY(GetESP) - pushl %ebp - movl %esp,%ebp - subl $0x00000004,%esp - movl %ebp,%eax - movl %eax,0xfffffffc(%ebp) - movl 0xfffffffc(%ebp),%eax - addl $0x00000008,%eax - leave - ret -SET_SIZE(GetESP) - - -#elif defined(__sparc) - - -ENTRY(GetPC) - save %sp, -120, %sp - mov %i7, %i4 - inccc 8, %i4 - mov %i4, %i0 - ret - restore -SET_SIZE(GetPC) - -ENTRY(GetSP) - save %sp, -120, %sp - mov %fp, %i4 - mov %i4, %i0 - ret - restore -SET_SIZE(GetSP) - -ENTRY(GetFP) - save %sp, -120, %sp - ld [%fp + 56], %g1 - mov %g1, %i0 - ret - restore -SET_SIZE(GetFP) - - -#endif // __i386 || __sparc diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.cc deleted file mode 100644 index b7b6f005..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.cc +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_sparc.cc: sparc-specific stackwalker. -// -// See stackwalker_sparc.h for documentation. -// -// Author: Michael Shang - - -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/logging.h" -#include "processor/stackwalker_sparc.h" - -namespace google_breakpad { - - -StackwalkerSPARC::StackwalkerSPARC(const SystemInfo *system_info, - const MDRawContextSPARC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { -} - - -StackFrame* StackwalkerSPARC::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameSPARC *frame = new StackFrameSPARC(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameSPARC::CONTEXT_VALID_ALL; - frame->instruction = frame->context.pc; - - return frame; -} - - -StackFrame* StackwalkerSPARC::GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - StackFrameSPARC *last_frame = static_cast( - stack->frames()->back()); - - // new: caller - // old: callee - // %fp, %i6 and g_r[30] is the same, see minidump_format.h - // %sp, %o6 and g_r[14] is the same, see minidump_format.h - // %sp_new = %fp_old - // %fp_new = *(%fp_old + 32 + 32 - 8), where the callee's %i6 - // %pc_new = *(%fp_old + 32 + 32 - 4) + 8 - // which is callee's %i7 plus 8 - - // A caller frame must reside higher in memory than its callee frames. - // Anything else is an error, or an indication that we've reached the - // end of the stack. - u_int32_t stack_pointer = last_frame->context.g_r[30]; - if (stack_pointer <= last_frame->context.g_r[14]) { - return NULL; - } - - u_int32_t instruction; - if (!memory_->GetMemoryAtAddress(stack_pointer + 60, - &instruction) || instruction <= 1) { - return NULL; - } - - u_int32_t stack_base; - if (!memory_->GetMemoryAtAddress(stack_pointer + 56, - &stack_base) || stack_base <= 1) { - return NULL; - } - - StackFrameSPARC *frame = new StackFrameSPARC(); - - frame->context = last_frame->context; - frame->context.g_r[14] = stack_pointer; - frame->context.g_r[30] = stack_base; - - // frame->context.pc is the return address, which is 2 instruction - // past the branch that caused us to arrive at the callee, which are - // a CALL instruction then a NOP instruction. - // frame_ppc->instruction to 8 less than that. Since all sparc - // instructions are 4 bytes wide, this is the address of the branch - // instruction. This allows source line information to match up with the - // line that contains a function call. Callers that require the exact - // return address value may access the %i7/g_r[31] field of StackFrameSPARC. - frame->context.pc = instruction + 8; - frame->instruction = instruction; - frame->context_validity = StackFrameSPARC::CONTEXT_VALID_PC | - StackFrameSPARC::CONTEXT_VALID_SP | - StackFrameSPARC::CONTEXT_VALID_FP; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.h b/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.h deleted file mode 100644 index f051e5bb..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_sparc.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_sparc.h: sparc-specific stackwalker. -// -// Provides stack frames given sparc register context and a memory region -// corresponding to an sparc stack. -// -// Author: Michael Shang - - -#ifndef PROCESSOR_STACKWALKER_SPARC_H__ -#define PROCESSOR_STACKWALKER_SPARC_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - -class StackwalkerSPARC : public Stackwalker { - public: - // context is a sparc context object that gives access to sparc-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerSPARC(const SystemInfo *system_info, - const MDRawContextSPARC *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and - // stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or - // alternate conventions as guided by stack_frame_info_). - // Implementation of Stackwalker, using ppc context (stack pointer in %r1, - // saved program counter in %srr0) and stack conventions (saved stack - // pointer at 0(%r1), return address at 8(0(%r1)). - // Implementation of Stackwalker, using sparc context (%fp, %sp, %pc) and - // stack conventions (saved %sp at) - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextSPARC *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_SPARC_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.cc b/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.cc deleted file mode 100644 index e39df17f..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.cc +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_x86.cc: x86-specific stackwalker. -// -// See stackwalker_x86.h for documentation. -// -// Author: Mark Mentovai - - -#include "processor/postfix_evaluator-inl.h" - -#include "processor/stackwalker_x86.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_modules.h" -#include "google_breakpad/processor/memory_region.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "processor/linked_ptr.h" -#include "processor/logging.h" -#include "processor/stack_frame_info.h" - -namespace google_breakpad { - - -StackwalkerX86::StackwalkerX86(const SystemInfo *system_info, - const MDRawContextX86 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver) - : Stackwalker(system_info, memory, modules, supplier, resolver), - context_(context) { - if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { - // The x86 is a 32-bit CPU, the limits of the supplied stack are invalid. - // Mark memory_ = NULL, which will cause stackwalking to fail. - BPLOG(ERROR) << "Memory out of range for stackwalking: " << - HexString(memory_->GetBase()) << "+" << - HexString(memory_->GetSize()); - memory_ = NULL; - } -} - - -StackFrame* StackwalkerX86::GetContextFrame() { - if (!context_ || !memory_) { - BPLOG(ERROR) << "Can't get context frame without context or memory"; - return NULL; - } - - StackFrameX86 *frame = new StackFrameX86(); - - // The instruction pointer is stored directly in a register, so pull it - // straight out of the CPU context structure. - frame->context = *context_; - frame->context_validity = StackFrameX86::CONTEXT_VALID_ALL; - frame->instruction = frame->context.eip; - - return frame; -} - - -StackFrame* StackwalkerX86::GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) { - BPLOG(ERROR) << "Can't get caller frame without memory or stack"; - return NULL; - } - - StackFrameX86 *last_frame = static_cast( - stack->frames()->back()); - StackFrameInfo *last_frame_info = stack_frame_info.back().get(); - - // This stackwalker sets each frame's %esp to its value immediately prior - // to the CALL into the callee. This means that %esp points to the last - // callee argument pushed onto the stack, which may not be where %esp points - // after the callee returns. Specifically, the value is correct for the - // cdecl calling convention, but not other conventions. The cdecl - // convention requires a caller to pop its callee's arguments from the - // stack after the callee returns. This is usually accomplished by adding - // the known size of the arguments to %esp. Other calling conventions, - // including stdcall, thiscall, and fastcall, require the callee to pop any - // parameters stored on the stack before returning. This is usually - // accomplished by using the RET n instruction, which pops n bytes off - // the stack after popping the return address. - // - // Because each frame's %esp will point to a location on the stack after - // callee arguments have been PUSHed, when locating things in a stack frame - // relative to %esp, the size of the arguments to the callee need to be - // taken into account. This seems a little bit unclean, but it's better - // than the alternative, which would need to take these same things into - // account, but only for cdecl functions. With this implementation, we get - // to be agnostic about each function's calling convention. Furthermore, - // this is how Windows debugging tools work, so it means that the %esp - // values produced by this stackwalker directly correspond to the %esp - // values you'll see there. - // - // If the last frame has no callee (because it's the context frame), just - // set the callee parameter size to 0: the stack pointer can't point to - // callee arguments because there's no callee. This is correct as long - // as the context wasn't captured while arguments were being pushed for - // a function call. Note that there may be functions whose parameter sizes - // are unknown, 0 is also used in that case. When that happens, it should - // be possible to walk to the next frame without reference to %esp. - - int frames_already_walked = stack_frame_info.size(); - u_int32_t last_frame_callee_parameter_size = 0; - if (frames_already_walked >= 2) { - StackFrameInfo *last_frame_callee_info = - stack_frame_info[frames_already_walked - 2].get(); - if (last_frame_callee_info && - last_frame_callee_info->valid & StackFrameInfo::VALID_PARAMETER_SIZE) { - last_frame_callee_parameter_size = - last_frame_callee_info->parameter_size; - } - } - - // Set up the dictionary for the PostfixEvaluator. %ebp and %esp are used - // in each program string, and their previous values are known, so set them - // here. .cbCalleeParams is a Breakpad extension that allows us to use - // the PostfixEvaluator engine when certain types of debugging information - // are present without having to write the constants into the program string - // as literals. - PostfixEvaluator::DictionaryType dictionary; - dictionary["$ebp"] = last_frame->context.ebp; - dictionary["$esp"] = last_frame->context.esp; - dictionary[".cbCalleeParams"] = last_frame_callee_parameter_size; - - if (last_frame_info && last_frame_info->valid == StackFrameInfo::VALID_ALL) { - // FPO debugging data is available. Initialize constants. - dictionary[".cbSavedRegs"] = last_frame_info->saved_register_size; - dictionary[".cbLocals"] = last_frame_info->local_size; - dictionary[".raSearchStart"] = last_frame->context.esp + - last_frame_callee_parameter_size + - last_frame_info->local_size + - last_frame_info->saved_register_size; - } - if (last_frame_info && - last_frame_info->valid & StackFrameInfo::VALID_PARAMETER_SIZE) { - // This is treated separately because it can either come from FPO data or - // from other debugging data. - dictionary[".cbParams"] = last_frame_info->parameter_size; - } - - // Decide what type of program string to use. The program string is in - // postfix notation and will be passed to PostfixEvaluator::Evaluate. - // Given the dictionary and the program string, it is possible to compute - // the return address and the values of other registers in the calling - // function. When encountering a nontraditional frame (one which takes - // advantage of FPO), the stack may need to be scanned for these values. - // For traditional frames, simple deterministic dereferencing suffices - // without any need for scanning. The results of program string evaluation - // will be used to determine whether to scan for better values. - string program_string; - bool traditional_frame = true; - bool recover_ebp = true; - if (last_frame_info && last_frame_info->valid == StackFrameInfo::VALID_ALL) { - // FPO data available. - traditional_frame = false; - if (!last_frame_info->program_string.empty()) { - // The FPO data has its own program string, which will tell us how to - // get to the caller frame, and may even fill in the values of - // nonvolatile registers and provide pointers to local variables and - // parameters. In some cases, particularly with program strings that use - // .raSearchStart, the stack may need to be scanned afterward. - program_string = last_frame_info->program_string; - } else if (last_frame_info->allocates_base_pointer) { - // The function corresponding to the last frame doesn't use the frame - // pointer for conventional purposes, but it does allocate a new - // frame pointer and use it for its own purposes. Its callee's - // information is still accessed relative to %esp, and the previous - // value of %ebp can be recovered from a location in its stack frame, - // within the saved-register area. - // - // Functions that fall into this category use the %ebp register for - // a purpose other than the frame pointer. They restore the caller's - // %ebp before returning. These functions create their stack frame - // after a CALL by decrementing the stack pointer in an amount - // sufficient to store local variables, and then PUSHing saved - // registers onto the stack. Arguments to a callee function, if any, - // are PUSHed after that. Walking up to the caller, therefore, - // can be done solely with calculations relative to the stack pointer - // (%esp). The return address is recovered from the memory location - // above the known sizes of the callee's parameters, saved registers, - // and locals. The caller's stack pointer (the value of %esp when - // the caller executed CALL) is the location immediately above the - // saved return address. The saved value of %ebp to be restored for - // the caller is at a known location in the saved-register area of - // the stack frame. - // - // For this type of frame, MSVC 14 (from Visual Studio 8/2005) in - // link-time code generation mode (/LTCG and /GL) can generate erroneous - // debugging data. The reported size of saved registers can be 0, - // which is clearly an error because these frames must, at the very - // least, save %ebp. For this reason, in addition to those given above - // about the use of .raSearchStart, the stack may need to be scanned - // for a better return address and a better frame pointer after the - // program string is evaluated. - // - // %eip_new = *(%esp_old + callee_params + saved_regs + locals) - // %ebp_new = *(%esp_old + callee_params + saved_regs - 8) - // %esp_new = %esp_old + callee_params + saved_regs + locals + 4 - program_string = "$eip .raSearchStart ^ = " - "$ebp $esp .cbCalleeParams + .cbSavedRegs + 8 - ^ = " - "$esp .raSearchStart 4 + ="; - } else { - // The function corresponding to the last frame doesn't use %ebp at - // all. The callee frame is located relative to %esp. - // - // The called procedure's instruction pointer and stack pointer are - // recovered in the same way as the case above, except that no - // frame pointer (%ebp) is used at all, so it is not saved anywhere - // in the callee's stack frame and does not need to be recovered. - // Because %ebp wasn't used in the callee, whatever value it has - // is the value that it had in the caller, so it can be carried - // straight through without bringing its validity into question. - // - // Because of the use of .raSearchStart, the stack will possibly be - // examined to locate a better return address after program string - // evaluation. The stack will not be examined to locate a saved - // %ebp value, because these frames do not save (or use) %ebp. - // - // %eip_new = *(%esp_old + callee_params + saved_regs + locals) - // %esp_new = %esp_old + callee_params + saved_regs + locals + 4 - // %ebp_new = %ebp_old - program_string = "$eip .raSearchStart ^ = " - "$esp .raSearchStart 4 + ="; - recover_ebp = false; - } - } else { - // No FPO information is available for the last frame. Assume that the - // standard %ebp-using x86 calling convention is in use. - // - // The typical x86 calling convention, when frame pointers are present, - // is for the calling procedure to use CALL, which pushes the return - // address onto the stack and sets the instruction pointer (%eip) to - // the entry point of the called routine. The called routine then - // PUSHes the calling routine's frame pointer (%ebp) onto the stack - // before copying the stack pointer (%esp) to the frame pointer (%ebp). - // Therefore, the calling procedure's frame pointer is always available - // by dereferencing the called procedure's frame pointer, and the return - // address is always available at the memory location immediately above - // the address pointed to by the called procedure's frame pointer. The - // calling procedure's stack pointer (%esp) is 8 higher than the value - // of the called procedure's frame pointer at the time the calling - // procedure made the CALL: 4 bytes for the return address pushed by the - // CALL itself, and 4 bytes for the callee's PUSH of the caller's frame - // pointer. - // - // Instruction and frame pointer recovery for these traditional frames is - // entirely deterministic, and the stack will not be scanned after - // recovering these values. - // - // %eip_new = *(%ebp_old + 4) - // %esp_new = %ebp_old + 8 - // %ebp_new = *(%ebp_old) - program_string = "$eip $ebp 4 + ^ = " - "$esp $ebp 8 + = " - "$ebp $ebp ^ ="; - } - - // Now crank it out, making sure that the program string set at least the - // two required variables. - PostfixEvaluator evaluator = - PostfixEvaluator(&dictionary, memory_); - PostfixEvaluator::DictionaryValidityType dictionary_validity; - if (!evaluator.Evaluate(program_string, &dictionary_validity) || - dictionary_validity.find("$eip") == dictionary_validity.end() || - dictionary_validity.find("$esp") == dictionary_validity.end()) { - return NULL; - } - - // If this stack frame did not use %ebp in a traditional way, locating the - // return address isn't entirely deterministic. In that case, the stack - // can be scanned to locate the return address. - // - // Even in nontraditional frames, if program string evaluation resulted in - // both %eip and %ebp values of 0, trust that the end of the stack has been - // reached and don't scan for anything else. - if (!traditional_frame && - (dictionary["$eip"] != 0 || dictionary["$ebp"] != 0)) { - int offset = 0; - - // This scan can only be done if a CodeModules object is available, to - // check that candidate return addresses are in fact inside a module. - // - // TODO(mmentovai): This ignores dynamically-generated code. One possible - // solution is to check the minidump's memory map to see if the candidate - // %eip value comes from a mapped executable page, although this would - // require dumps that contain MINIDUMP_MEMORY_INFO, which the Breakpad - // client doesn't currently write (it would need to call MiniDumpWriteDump - // with the MiniDumpWithFullMemoryInfo type bit set). Even given this - // ability, older OSes (pre-XP SP2) and CPUs (pre-P4) don't enforce - // an independent execute privilege on memory pages. - - u_int32_t eip = dictionary["$eip"]; - if (modules_ && !modules_->GetModuleForAddress(eip)) { - const int kRASearchWords = 15; - - // The instruction pointer at .raSearchStart was invalid, so start - // looking one 32-bit word above that location. - u_int32_t location_start = dictionary[".raSearchStart"] + 4; - - for (u_int32_t location = location_start; - location <= location_start + kRASearchWords * 4; - location += 4) { - if (!memory_->GetMemoryAtAddress(location, &eip)) - break; - - if (modules_->GetModuleForAddress(eip)) { - // This is a better return address that what program string - // evaluation found. Use it, and set %esp to the location above the - // one where the return address was found. - // - // TODO(mmentovai): The return-address check can be made even - // stronger in modules for which debugging data is available. In - // that case, it's possible to check that the candidate return - // address is inside a known function. - - dictionary["$eip"] = eip; - dictionary["$esp"] = location + 4; - offset = location - location_start; - break; - } - } - } - - // When trying to recover the previous value of the frame pointer (%ebp), - // start looking at the lowest possible address in the saved-register - // area, and look at the entire saved register area, increased by the - // size of |offset| to account for additional data that may be on the - // stack. The scan is performed from the highest possible address to - // the lowest, because we expect that the function's prolog would have - // saved %ebp early. - u_int32_t ebp = dictionary["$ebp"]; - u_int32_t value; // throwaway variable to check pointer validity - if (recover_ebp && !memory_->GetMemoryAtAddress(ebp, &value)) { - int fp_search_bytes = last_frame_info->saved_register_size + offset; - u_int32_t location_end = last_frame->context.esp + - last_frame_callee_parameter_size; - - for (u_int32_t location = location_end + fp_search_bytes; - location >= location_end; - location -= 4) { - if (!memory_->GetMemoryAtAddress(location, &ebp)) - break; - - if (memory_->GetMemoryAtAddress(ebp, &value)) { - // The candidate value is a pointer to the same memory region - // (the stack). Prefer it as a recovered %ebp result. - dictionary["$ebp"] = ebp; - break; - } - } - } - } - - // Treat an instruction address of 0 as end-of-stack. Treat incorrect stack - // direction as end-of-stack to enforce progress and avoid infinite loops. - if (dictionary["$eip"] == 0 || - dictionary["$esp"] <= last_frame->context.esp) { - return NULL; - } - - // Create a new stack frame (ownership will be transferred to the caller) - // and fill it in. - StackFrameX86 *frame = new StackFrameX86(); - - frame->context = last_frame->context; - frame->context.eip = dictionary["$eip"]; - frame->context.esp = dictionary["$esp"]; - frame->context.ebp = dictionary["$ebp"]; - frame->context_validity = StackFrameX86::CONTEXT_VALID_EIP | - StackFrameX86::CONTEXT_VALID_ESP | - StackFrameX86::CONTEXT_VALID_EBP; - - // These are nonvolatile (callee-save) registers, and the program string - // may have filled them in. - if (dictionary_validity.find("$ebx") != dictionary_validity.end()) { - frame->context.ebx = dictionary["$ebx"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_EBX; - } - if (dictionary_validity.find("$esi") != dictionary_validity.end()) { - frame->context.esi = dictionary["$esi"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_ESI; - } - if (dictionary_validity.find("$edi") != dictionary_validity.end()) { - frame->context.edi = dictionary["$edi"]; - frame->context_validity |= StackFrameX86::CONTEXT_VALID_EDI; - } - - // frame->context.eip is the return address, which is one instruction - // past the CALL that caused us to arrive at the callee. Set - // frame->instruction to one less than that. This won't reference the - // beginning of the CALL instruction, but it's guaranteed to be within the - // CALL, which is sufficient to get the source line information to match up - // with the line that contains a function call. Callers that require the - // exact return address value may access the context.eip field of - // StackFrameX86. - frame->instruction = frame->context.eip - 1; - - return frame; -} - - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.h b/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.h deleted file mode 100644 index 14b9e8b9..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/stackwalker_x86.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// stackwalker_x86.h: x86-specific stackwalker. -// -// Provides stack frames given x86 register context and a memory region -// corresponding to an x86 stack. -// -// Author: Mark Mentovai - - -#ifndef PROCESSOR_STACKWALKER_X86_H__ -#define PROCESSOR_STACKWALKER_X86_H__ - - -#include "google_breakpad/common/breakpad_types.h" -#include "google_breakpad/common/minidump_format.h" -#include "google_breakpad/processor/stackwalker.h" - -namespace google_breakpad { - -class CodeModules; - - -class StackwalkerX86 : public Stackwalker { - public: - // context is an x86 context object that gives access to x86-specific - // register state corresponding to the innermost called frame to be - // included in the stack. The other arguments are passed directly through - // to the base Stackwalker constructor. - StackwalkerX86(const SystemInfo *system_info, - const MDRawContextX86 *context, - MemoryRegion *memory, - const CodeModules *modules, - SymbolSupplier *supplier, - SourceLineResolverInterface *resolver); - - private: - // Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and - // stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or - // alternate conventions as guided by stack_frame_info_). - virtual StackFrame* GetContextFrame(); - virtual StackFrame* GetCallerFrame( - const CallStack *stack, - const vector< linked_ptr > &stack_frame_info); - - // Stores the CPU context corresponding to the innermost stack frame to - // be returned by GetContextFrame. - const MDRawContextX86 *context_; -}; - - -} // namespace google_breakpad - - -#endif // PROCESSOR_STACKWALKER_X86_H__ diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dmp b/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dmp deleted file mode 100644 index 1a6feee7..00000000 Binary files a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dmp and /dev/null differ diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dump.out b/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dump.out deleted file mode 100644 index d8816e5d..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.dump.out +++ /dev/null @@ -1,705 +0,0 @@ -MDRawHeader - signature = 0x504d444d - version = 0x5128a793 - stream_count = 9 - stream_directory_rva = 0x20 - checksum = 0x0 - time_date_stamp = 0x45d35f73 2007-02-14 19:13:55 - flags = 0x0 - -mDirectory[0] -MDRawDirectory - stream_type = 3 - location.data_size = 100 - location.rva = 0x184 - -mDirectory[1] -MDRawDirectory - stream_type = 4 - location.data_size = 1408 - location.rva = 0x1e8 - -mDirectory[2] -MDRawDirectory - stream_type = 5 - location.data_size = 52 - location.rva = 0x1505 - -mDirectory[3] -MDRawDirectory - stream_type = 6 - location.data_size = 168 - location.rva = 0xdc - -mDirectory[4] -MDRawDirectory - stream_type = 7 - location.data_size = 56 - location.rva = 0x8c - -mDirectory[5] -MDRawDirectory - stream_type = 15 - location.data_size = 24 - location.rva = 0xc4 - -mDirectory[6] -MDRawDirectory - stream_type = 1197932545 - location.data_size = 12 - location.rva = 0x14f9 - -mDirectory[7] -MDRawDirectory - stream_type = 0 - location.data_size = 0 - location.rva = 0x0 - -mDirectory[8] -MDRawDirectory - stream_type = 0 - location.data_size = 0 - location.rva = 0x0 - -Streams: - stream type 0x0 at index 8 - stream type 0x3 at index 0 - stream type 0x4 at index 1 - stream type 0x5 at index 2 - stream type 0x6 at index 3 - stream type 0x7 at index 4 - stream type 0xf at index 5 - stream type 0x47670001 at index 6 - -MinidumpThreadList - thread_count = 2 - -thread[0] -MDRawThread - thread_id = 0xbf4 - suspend_count = 0 - priority_class = 0x0 - priority = 0x0 - teb = 0x7ffdf000 - stack.start_of_memory_range = 0x12f31c - stack.memory.data_size = 0xce4 - stack.memory.rva = 0x1639 - thread_context.data_size = 0x2cc - thread_context.rva = 0xd94 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x220000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x0000000018b72200000118b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0x0 - esi = 0x7b8 - ebx = 0x7c883780 - edx = 0x7c97c0d8 - ecx = 0x7c80b46e - eax = 0x400000 - ebp = 0x12f384 - eip = 0x7c90eb94 - cs = 0x1b - eflags = 0x246 - esp = 0x12f320 - ss = 0x23 - extended_registers[512] = 0x7f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b62200 - -Stack -0x00000000c0e9907ccb25807cb8070000000000000000000034ff1200b0fe12008037887c140000000100000000000000000000001000000027e0907c2e39917c0050fd7f00f0fd7f000000000400000034f312006947c788d4f31200a89a837cf825807c0000000098f312003225807cb8070000ffffffff00000000e4f31200ff1d4000b8070000ffffffffa8fa12008037887c0e1c4000a8fa120000000000ff792a0f64f91200b01b400000004000b0fe12000040020070fa1200084042000000000080fa120080fa12004e30867ca8fa12000000000000000000000000000018000002100000e3ef907c0000000079d900000000000048f41200000014003207917c0500000078071400000014000000000020f412003207917ca05f140018ee907cfa00000074f61200000000009615917ceb06917cf00298000100000000000000384f14009615917ceb06917c7801140008000000404f14000000a659985f1400080000000000000018ee907c90fea700400698003815917c184f1400eb06917c00000000800000000000a65988f69f0090f51200a569917cf8f41200d95c878880f5120043ef907c480485000500000090f5120088fea700a8212400000000000000000080f512002469917cf8fbfd7fa821240008000000f500000000000000384d850078019800a8fa120004000000a05f140096d4917c00000000b0d4917c0000000008069800184f140000000000104f140000000000184f140000004000000000010040020063003a005c0074006500730074005f006100700070002e006500780065000000000000002f00000028000000184f1400780185007801140028000000000000000000140084f3120010000000d8f5120018ee907cf006917cffffffffeb06917ce619917c88e6a7003003000001030000ff1b917c0000980080e6a70080069800400698000000980080e6a70000000000000000000000000080e6a7000818000088e6a700d759927c78019800081800000210000000009800f8f31200280a0000dcf6120018ee907cf006917cffffffffeb06917c0859927c00009800080000005859927c00000000000001000000a659000000005a6202000010000068fe030001000000dffe03000000010000000100fffffe7f0100000001c0c27700008500000000002dc0c27700000000684aaf590000a659241a917c80c0977c0000000000000000cd5c927c0050fd7f0000a65900000100080000004550fd7f0000000000000000000000000050fd7fcd5c927c05000000d4f61200f45c927c80e4977c05000000010000000050fd7f18f712007009917cc0e4977c172e817cff2d817c000000000000a6590000a6590210000000f0fd7f05000000e8f612000806980064f81200a89a837c002e817cffffffffff2d817cc8242400dd8ea75901000000000000004cf712003608a9590000a65901000000000000000100000060f71200e407a9596cf7120000004000000000010040020063003a005c0074006500730074005f006100700070002e0065007800650000006d05917c905f140000000000440d020000000000604f14000c0000007801140000000000a04e1400d84d8700400687004509917c0800000000000000000000004000000078011400a8038700404f14000510907c000000000000000078011400980387000800000008000000c0e4977cd04d8700f835887c7801140010000000a0e7ae591600000030fd1200d39b917c44000000620000000000a65950e9ae59d8eaae59a80387000100000014040000000000000100000002000000f800a659c003870001000000780114009508917c0000a659091b917c020000000900000040000000a2fd12009cfd1200404f1400a2fd1200d04d8700640187000000000000000000d04d870010000000d84d8700384f1400a803870010000000c00300000000870074fb1200404f14006cfe120018ee907cf006917cffffffffeb06917ca09d400000008700000000000400000000000000ffffff3fc04d8700ccfd12009c4d400004000000fa19917cb84d870064018700c04d8700063440000400000018000000c04d870079d90000c0038700fa31400000000000c04d8700c04d87000000000001000000b0fe120082294000c04d87000000000000000000c04d870048fe12008cfe120000000000e224400040fe12008cfe1200c04d8700d84d8700b0fe12008600817c54fa1200d8f9120000000000160018005479420079d90000000000000757917c00000200a4f91200a4f91200a4f91200020000000200000000000000c4f912000000000079d9000014fb12004cfa120014fb1200005a917c00fa1200a0fb120001000000655a917ca405817c74c1977ce705817c00000000f4fd120098fb120000000000a0fb12000000000090fb12000000800070fa120000000000000000000000000016001800547942000000000001000000000000000000000000000000000000003308917ca89a837c0000807c0000807ce800807c2cfa12001fe2907c11fa877cffffffffe06f817c000000006cfa12001c0000000f000000e06f817c8fc60000f0f312000060817cc8fa1200a89a837c7039867cfffffffff0ff1200da36847ca8fa1200099b837cb0fa120000000000b0fa12000000000000000000000000009cfb1200b8fb1200d4fa1200bf37907c9cfb1200e0ff1200b8fb120070fb1200b0ff1200d837907ce0ff120084fb12008b37907c9cfb1200e0ff1200b8fb120070fb1200a89a837c010000009cfb1200e0ff12006078937c9cfb1200e0ff1200b8fb120070fb1200a89a837c280a00009cfb12000200000018ee907c9032917cffffffff8832917c3364917c68fb1200000087003207917c02000000dc31917c1232917c8132917c8832917c1e000000c01e2400080200003807917c54fb12003207917cc4fb120018ee907c9032917c0000130000d01200beb4800088fe1200faea907c00000000b8fb12009cfb1200b8fb1200050000c000000000000000009e4240000200000001000000450000003f0001000000000000000000000000000000000000000000000000007f02ffff0000ffffffffffff0000000000002200000000000000ffff0000000018b72200000118b7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b0000002300000023000000280a000002000000c1ab807c58bc420094fe12004500000088fe12009e4240001b0000004602010084fe1200230000007f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b622004500000070ff120000424000b8278700dc31917c00000000004c870000000020040000000000000007000000000000004042400000000000000000002e000000000000000cff12007b434100010000000700000084434100004d87002e39917cffffffff24000000240000002700000000000000584d870004000000b1944000244c87002a0000002f000000c0fe1200004d8700584d87000000a659b0b9a859015d400015aa400000000000b4070000784e14000000000001000000f40b00000000000000000000bc070000b8070000f40b0000a8fa120000000000009c4000599c400094b240004f752a0fc0ff1200ec534000010000003039870050398700ff752a0f00002400a02024000050fd7f050000c00100000005000000000000000000240084ff1200acfa1200e0ff1200d06f4000a70b7a0f00000000f0ff1200d76f817c00002400a02024000050fd7f050000c0c8ff1200a8fa1200ffffffffa89a837ce06f817c0000000000000000000000004354400000000000 - -thread[1] -MDRawThread - thread_id = 0x11c0 - suspend_count = 0 - priority_class = 0x0 - priority = 0x0 - teb = 0x7ffde000 - stack.start_of_memory_range = 0x97f6e8 - stack.memory.data_size = 0x918 - stack.memory.rva = 0x231d - thread_context.data_size = 0x2cc - thread_context.rva = 0x1060 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x870000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x84fb120000001400320778071400000014000000f4fe1200a0fd120018eeb0fd12003815917c961534ff120034ff12000000e7712a0f2a0000005400ccfb120068514000584d540000002a000000f4fe - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0x145b00 - esi = 0x145aa8 - ebx = 0x145ad0 - edx = 0x7c90eb94 - ecx = 0x7 - eax = 0xa80000 - ebp = 0x97f6fc - eip = 0x7c90eb94 - cs = 0x1b - eflags = 0x246 - esp = 0x97f6ec - ss = 0x23 - extended_registers[512] = 0x7f0200000000870000000000000000000000000000000000801f0000ccfb120084fb1200000014003207917c050000007807140000001400000000005cfb1200f4fe1200a0fd120018ee907c2d020000b0fd12003815917c9615917ceb06917c34ff120034ff12000000000060000000e7712a0f2a0000005400000000000000ccfb120068514000584d870034fc1200540000002a000000f4fe1200f8fe12002c2f4000584d87005e00000034fc12005400000000000000b0fe1200f4fe1200c0fe12005f21400034fc12002a0000003b762a0f91214000303132330000870038393a3b3c3d3e3f4041424300000000070000003bd11e2340061400b858101e5e03e0652e005c00320033003100650064003100780114002d0066003300380034002d0000000000390034002d0062003800350038002d0031003000984e1400350065003000330065003000360035002e0064006d0070000000907c08000000ffffffff8832917cbeb4807c780114001d00f40b784e14000401000044fd120050fd1200c01e240078011400bdb9807ca04e14007c80c2770000000008fd120078011400ecfc1200f0fc1200e6b9807cffffffff7c80c27708fd12001c00000024fd1200e92a867c7c80c277b45a887c8037887c2d0200000080c2770000c17780000000005003000010000020000000780114005cff12001648847c091b917c - -Stack -0x8000108020fa97009fd7907c0000000048f7970005000f0040061400000000004cf7970037b9807c00000000000000003103917c780114000000000061dc907cf1b8807c00000000ffffffff70f79700000000000000000054f797003082140001000000000000000200000000000000000000007cf7970020b9807c0e00000004000000006000000000a80078011400000000000882140092d5907c8b9b807c9c070000d0f89700780114009c07000038821400807f140020dea85910fa9700780114009807000088fb9700e07f14009c0700000000000078011400000000000882140000000000000000000000000078011400ba0300000000000000000000000000000000000000000000000000007801140000000000000000000000000000000000c0030000000000000000000000000000088214005c0057000600000078011400000000005c00730079007300740065006d0033000082140068011400000000000000000000821400d47f1400807f140070f8970061eea859e000a8000000a8001c4e000084f89700bdeea859e000a8000000a8001c4e0000a4f897005fefa8590000a8000000000006000000c4f89700e000a80060fe9700c8f897005abfa8590000a80000000000060000001c000000d47f1400807f1400380000006ce9907c88b9807cffffffff0000a80000000000807f140030fa97007fc3a859a0c4a859b0fb970060fe9700684f1400504500004c010400ca9610410000000000000000e0000e210b01070a00400000003a000000000000f1100000001000000000bf760000000000100000000200000500010005000100040000000000000000b00000000400009ba2000000001400285214000000000034fa97007801140034fa9700910e917c080614006d05917cc84d85005c4e8500684f140000000000b04800002852140078011400e00300003052140000000000000000000000000078011400c403000030821400380000000000000000000000000000000000000000000000000000003882140048050000780200003800000000100000ec000000b8470000400000000000000000000000000000000000140000000000807f140000000000000000000000000000000101a900000060fe9700dcff9700dcff97000050fd7f78fa970054fa9700ad9d917c8cfa9700c2066f7f0e000000000000001c01000078fa9700c84d850068fa970085ae807c78fc970024fc970083dba85978fc97008cfa9700800000008edba85914010000050000000100000096020000b8fc97003815917c9615917ceb06917c60fe970060fe9700c4fd9700d8fa9700000014003207917c21000000b80c14000000140030521400b0fa9700fffffffff4fc970018ee907c3807917cffffffff3207917cab06917ceb06917ccc4f140060fe9700684f1400e0004000e4fa9700a863917c74fb970018ee907c3808917cffffffff3308917c5b2c817c872c817c00000000f4fb9700000000000000000054fd970018ee907c4006140064fd97003815917c00e0fd7feb06917c684f140038821400780114000050fd7facfb970000000000000004000000000090fe97000000000018fb970050531400508b1400a89a837cffe9907cf60d817ca807000000000000ffe9907cf60d817c08000000000000000000000000000000585314003cfc97003882140000000000160e817cc4fd970060fe970058531400208f1400588b1400460f917c50531400208f1400780114003082140000000000b8fc970078011400b8fc9700910e917c080614006d05917c3882140060fe97000000000000000000960200003082140078011400ffe9907c38821400a807000000000000780114005853140058fc9700505314001000000000000000160e817c784e8500c4fd9700388214000000000024010000f00c00001000000044fc970000000000c7e2907ce721807cffffffffe8f69700388214001809000098fc9700acfc9700d2e2a859ffffffffe8f697003882140018090000c4fc97003882140060fe9700c4fd9700ccfc97004ee3a859ffffffffe8f69700000000003882140018090000e0fc9700f4fc970093b2a859ffffffffe8f69700000000003882140018090000c4fd970060fe9700a85a140078fd9700a5b3a85960fe9700c4fd9700684f1400e8f697000000000018090000000000000200000080fd9700c4fd970060fe970000000000f40b000000000000000000000000000000f0fd7f000000001cf3120000000000e40c000039160000cc020000940d00000000000000000000000000000000000002000000ac4f14006010000098fd97005eb7a8593916000000000000684f1400784e85000000000084ff9700d4fe97007bb9a85960fe9700c4fd9700684f14003849140084ff9700010000000000000008ff9700f40b0000090000000000000020000000200000006c0000008c000000380000001e000000c4000000dc000000a80000008401000064000000b801000030000000e801000080050000e8010000680700000000000068070000680700000000000005150000340000002915000039150000fc1600001d23000068070000600300008a070000c80a0000310a00002c130000f91400000c000000352c000000000000ffffffff5c0f0000c84d8500784e8500884e85000000000000000000000000004c010000fc39a6590000000002000000050000000100000000008500280a000001000001cc0200009c0000000b00000050000000040000000010000000000000000000000001000000000000000000000000000034ff970078baa859384914005c0f0000c84d850001000000884e8500684f140008ff970064ff970000000000a8070000b0fe1200f40b00009cfb120000000000b8fb12000000000000000000ae20140000000000884e8500784e8500c84d8500a8fa120011204000ffffffff5c0f0000a80700000000000078ff970064ff970000000000adbf807c2025807cecff97000100000084ff970003000000c0110000f40b0000f40b0000a8fa120000000000010067470c0000006cff9700bc070000ffffffff000000006c1a4000f40b000000fa12000000000000004000a09d4000b0fe120083b6807cb0fe120000004000a09d4000b0fe120000e0fd7f00069c86c0ff9700d8863f86ffffffffa89a837c90b6807c000000000000000000000000301a4000b0fe120000000000 - -MinidumpModuleList - module_count = 13 - -module[0] -MDRawModule - base_of_image = 0x400000 - size_of_image = 0x2d000 - checksum = 0x0 - time_date_stamp = 0x45d35f6c - module_name_rva = 0x78a - version_info.signature = 0x0 - version_info.struct_version = 0x0 - version_info.file_version = 0x0:0x0 - version_info.product_version = 0x0:0x0 - version_info.file_flags_mask = 0x0 - version_info.file_flags = 0x0 - version_info.file_os = 0x0 - version_info.file_type = 0x0 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 40 - cv_record.rva = 0x132c - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "c:\test_app.exe" - (code_identifier) = "45D35F6C2d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 5a9832e5-2872-41c1-838e-d98914e9b7ff - (cv_record).age = 1 - (cv_record).pdb_file_name = "c:\test_app.pdb" - (misc_record) = (null) - (debug_file) = "c:\test_app.pdb" - (debug_identifier) = "5A9832E5287241C1838ED98914E9B7FF1" - (version) = "" - -module[1] -MDRawModule - base_of_image = 0x7c900000 - size_of_image = 0xb0000 - checksum = 0xaf2f7 - time_date_stamp = 0x411096b4 - module_name_rva = 0x7ae - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x1354 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\ntdll.dll" - (code_identifier) = "411096B4b0000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 36515fb5-d043-45e4-91f6-72fa2e2878c0 - (cv_record).age = 2 - (cv_record).pdb_file_name = "ntdll.pdb" - (misc_record) = (null) - (debug_file) = "ntdll.pdb" - (debug_identifier) = "36515FB5D04345E491F672FA2E2878C02" - (version) = "5.1.2600.2180" - -module[2] -MDRawModule - base_of_image = 0x7c800000 - size_of_image = 0xf4000 - checksum = 0xf724d - time_date_stamp = 0x44ab9a84 - module_name_rva = 0x7ee - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280b81 - version_info.product_version = 0x50001:0xa280b81 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 37 - cv_record.rva = 0x1376 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\kernel32.dll" - (code_identifier) = "44AB9A84f4000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = bce8785c-57b4-4245-a669-896b6a19b954 - (cv_record).age = 2 - (cv_record).pdb_file_name = "kernel32.pdb" - (misc_record) = (null) - (debug_file) = "kernel32.pdb" - (debug_identifier) = "BCE8785C57B44245A669896B6A19B9542" - (version) = "5.1.2600.2945" - -module[3] -MDRawModule - base_of_image = 0x774e0000 - size_of_image = 0x13d000 - checksum = 0x13dc6b - time_date_stamp = 0x42e5be93 - module_name_rva = 0x834 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280aa6 - version_info.product_version = 0x50001:0xa280aa6 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x139b - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\ole32.dll" - (code_identifier) = "42E5BE9313d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 683b65b2-46f4-4187-96d2-ee6d4c55eb11 - (cv_record).age = 2 - (cv_record).pdb_file_name = "ole32.pdb" - (misc_record) = (null) - (debug_file) = "ole32.pdb" - (debug_identifier) = "683B65B246F4418796D2EE6D4C55EB112" - (version) = "5.1.2600.2726" - -module[4] -MDRawModule - base_of_image = 0x77dd0000 - size_of_image = 0x9b000 - checksum = 0xa0de4 - time_date_stamp = 0x411096a7 - module_name_rva = 0x874 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 37 - cv_record.rva = 0x13bd - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\advapi32.dll" - (code_identifier) = "411096A79b000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 455d6c5f-184d-45bb-b5c5-f30f82975114 - (cv_record).age = 2 - (cv_record).pdb_file_name = "advapi32.pdb" - (misc_record) = (null) - (debug_file) = "advapi32.pdb" - (debug_identifier) = "455D6C5F184D45BBB5C5F30F829751142" - (version) = "5.1.2600.2180" - -module[5] -MDRawModule - base_of_image = 0x77e70000 - size_of_image = 0x91000 - checksum = 0x9c482 - time_date_stamp = 0x411096ae - module_name_rva = 0x8ba - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x13e2 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\rpcrt4.dll" - (code_identifier) = "411096AE91000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = bea45a72-1da1-41da-a3ba-86b3a2031153 - (cv_record).age = 2 - (cv_record).pdb_file_name = "rpcrt4.pdb" - (misc_record) = (null) - (debug_file) = "rpcrt4.pdb" - (debug_identifier) = "BEA45A721DA141DAA3BA86B3A20311532" - (version) = "5.1.2600.2180" - -module[6] -MDRawModule - base_of_image = 0x77f10000 - size_of_image = 0x47000 - checksum = 0x4d0d0 - time_date_stamp = 0x43b34feb - module_name_rva = 0x8fc - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280b02 - version_info.product_version = 0x50001:0xa280b02 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x1405 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\gdi32.dll" - (code_identifier) = "43B34FEB47000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = c0ea66be-00a6-4bd7-aef7-9e443a91869c - (cv_record).age = 2 - (cv_record).pdb_file_name = "gdi32.pdb" - (misc_record) = (null) - (debug_file) = "gdi32.pdb" - (debug_identifier) = "C0EA66BE00A64BD7AEF79E443A91869C2" - (version) = "5.1.2600.2818" - -module[7] -MDRawModule - base_of_image = 0x77d40000 - size_of_image = 0x90000 - checksum = 0x9505c - time_date_stamp = 0x42260159 - module_name_rva = 0x93c - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280a3e - version_info.product_version = 0x50001:0xa280a3e - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x1427 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\user32.dll" - (code_identifier) = "4226015990000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = ee2b714d-83a3-4c9d-8802-7621272f8326 - (cv_record).age = 2 - (cv_record).pdb_file_name = "user32.pdb" - (misc_record) = (null) - (debug_file) = "user32.pdb" - (debug_identifier) = "EE2B714D83A34C9D88027621272F83262" - (version) = "5.1.2600.2622" - -module[8] -MDRawModule - base_of_image = 0x77c10000 - size_of_image = 0x58000 - checksum = 0x57cd3 - time_date_stamp = 0x41109752 - module_name_rva = 0x97e - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x70000:0xa280884 - version_info.product_version = 0x60001:0x21be0884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x1 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 35 - cv_record.rva = 0x144a - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\msvcrt.dll" - (code_identifier) = "4110975258000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = a678f3c3-0ded-426b-8390-32b996987e38 - (cv_record).age = 1 - (cv_record).pdb_file_name = "msvcrt.pdb" - (misc_record) = (null) - (debug_file) = "msvcrt.pdb" - (debug_identifier) = "A678F3C30DED426B839032B996987E381" - (version) = "7.0.2600.2180" - -module[9] -MDRawModule - base_of_image = 0x76390000 - size_of_image = 0x1d000 - checksum = 0x2a024 - time_date_stamp = 0x411096ae - module_name_rva = 0x9c0 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x146d - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\imm32.dll" - (code_identifier) = "411096AE1d000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 2c17a49c-251b-4c8e-b9e2-ad13d7d9ea16 - (cv_record).age = 2 - (cv_record).pdb_file_name = "imm32.pdb" - (misc_record) = (null) - (debug_file) = "imm32.pdb" - (debug_identifier) = "2C17A49C251B4C8EB9E2AD13D7D9EA162" - (version) = "5.1.2600.2180" - -module[10] -MDRawModule - base_of_image = 0x59a60000 - size_of_image = 0xa1000 - checksum = 0xa8824 - time_date_stamp = 0x4110969a - module_name_rva = 0xa00 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 36 - cv_record.rva = 0x148f - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\dbghelp.dll" - (code_identifier) = "4110969Aa1000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 39559573-e21b-46f2-8e28-6923be9e6a76 - (cv_record).age = 1 - (cv_record).pdb_file_name = "dbghelp.pdb" - (misc_record) = (null) - (debug_file) = "dbghelp.pdb" - (debug_identifier) = "39559573E21B46F28E286923BE9E6A761" - (version) = "5.1.2600.2180" - -module[11] -MDRawModule - base_of_image = 0x77c00000 - size_of_image = 0x8000 - checksum = 0x11d78 - time_date_stamp = 0x411096b7 - module_name_rva = 0xa44 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 36 - cv_record.rva = 0x14b3 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\version.dll" - (code_identifier) = "411096B78000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = 180a90c4-0384-463e-82dd-c45b2c8ab76e - (cv_record).age = 2 - (cv_record).pdb_file_name = "version.pdb" - (misc_record) = (null) - (debug_file) = "version.pdb" - (debug_identifier) = "180A90C40384463E82DDC45B2C8AB76E2" - (version) = "5.1.2600.2180" - -module[12] -MDRawModule - base_of_image = 0x76bf0000 - size_of_image = 0xb000 - checksum = 0xa29b - time_date_stamp = 0x411096ca - module_name_rva = 0xa88 - version_info.signature = 0xfeef04bd - version_info.struct_version = 0x10000 - version_info.file_version = 0x50001:0xa280884 - version_info.product_version = 0x50001:0xa280884 - version_info.file_flags_mask = 0x3f - version_info.file_flags = 0x0 - version_info.file_os = 0x40004 - version_info.file_type = 0x2 - version_info.file_subtype = 0x0 - version_info.file_date = 0x0:0x0 - cv_record.data_size = 34 - cv_record.rva = 0x14d7 - misc_record.data_size = 0 - misc_record.rva = 0x0 - (code_file) = "C:\WINDOWS\system32\psapi.dll" - (code_identifier) = "411096CAb000" - (cv_record).cv_signature = 0x53445352 - (cv_record).signature = a5c3a1f9-689f-43d8-ad22-8a0929388970 - (cv_record).age = 2 - (cv_record).pdb_file_name = "psapi.pdb" - (misc_record) = (null) - (debug_file) = "psapi.pdb" - (debug_identifier) = "A5C3A1F9689F43D8AD228A09293889702" - (version) = "5.1.2600.2180" - -MinidumpMemoryList - region_count = 3 - -region[0] -MDMemoryDescriptor - start_of_memory_range = 0x7c90eb14 - memory.data_size = 0x100 - memory.rva = 0x1539 -Memory -0xff83c4ec890424c744240401000000895c2408c74424100000000054e877000000c208009090909090558bec83ec508944240c64a1180000008b80a4010000890424c744240400000000c744240800000000c74424100000000054e8380000008b04248be55dc3908da424000000008d490090909090908bd40f349090909090c38da424000000008d64240090909090908d542408cd2ec3558bec9c81ecd00200008985dcfdffff898dd8fdffff8b45088b4d0489480c8d852cfdffff8988b80000008998a40000008990a800000089b0a000000089b89c0000008d4d0c8988c40000008b4d008988b40000008b4dfc8988c00000008c88bc0000008c989800 - -region[1] -MDMemoryDescriptor - start_of_memory_range = 0x12f31c - memory.data_size = 0xce4 - memory.rva = 0x1639 -Memory -0x00000000c0e9907ccb25807cb8070000000000000000000034ff1200b0fe12008037887c140000000100000000000000000000001000000027e0907c2e39917c0050fd7f00f0fd7f000000000400000034f312006947c788d4f31200a89a837cf825807c0000000098f312003225807cb8070000ffffffff00000000e4f31200ff1d4000b8070000ffffffffa8fa12008037887c0e1c4000a8fa120000000000ff792a0f64f91200b01b400000004000b0fe12000040020070fa1200084042000000000080fa120080fa12004e30867ca8fa12000000000000000000000000000018000002100000e3ef907c0000000079d900000000000048f41200000014003207917c0500000078071400000014000000000020f412003207917ca05f140018ee907cfa00000074f61200000000009615917ceb06917cf00298000100000000000000384f14009615917ceb06917c7801140008000000404f14000000a659985f1400080000000000000018ee907c90fea700400698003815917c184f1400eb06917c00000000800000000000a65988f69f0090f51200a569917cf8f41200d95c878880f5120043ef907c480485000500000090f5120088fea700a8212400000000000000000080f512002469917cf8fbfd7fa821240008000000f500000000000000384d850078019800a8fa120004000000a05f140096d4917c00000000b0d4917c0000000008069800184f140000000000104f140000000000184f140000004000000000010040020063003a005c0074006500730074005f006100700070002e006500780065000000000000002f00000028000000184f1400780185007801140028000000000000000000140084f3120010000000d8f5120018ee907cf006917cffffffffeb06917ce619917c88e6a7003003000001030000ff1b917c0000980080e6a70080069800400698000000980080e6a70000000000000000000000000080e6a7000818000088e6a700d759927c78019800081800000210000000009800f8f31200280a0000dcf6120018ee907cf006917cffffffffeb06917c0859927c00009800080000005859927c00000000000001000000a659000000005a6202000010000068fe030001000000dffe03000000010000000100fffffe7f0100000001c0c27700008500000000002dc0c27700000000684aaf590000a659241a917c80c0977c0000000000000000cd5c927c0050fd7f0000a65900000100080000004550fd7f0000000000000000000000000050fd7fcd5c927c05000000d4f61200f45c927c80e4977c05000000010000000050fd7f18f712007009917cc0e4977c172e817cff2d817c000000000000a6590000a6590210000000f0fd7f05000000e8f612000806980064f81200a89a837c002e817cffffffffff2d817cc8242400dd8ea75901000000000000004cf712003608a9590000a65901000000000000000100000060f71200e407a9596cf7120000004000000000010040020063003a005c0074006500730074005f006100700070002e0065007800650000006d05917c905f140000000000440d020000000000604f14000c0000007801140000000000a04e1400d84d8700400687004509917c0800000000000000000000004000000078011400a8038700404f14000510907c000000000000000078011400980387000800000008000000c0e4977cd04d8700f835887c7801140010000000a0e7ae591600000030fd1200d39b917c44000000620000000000a65950e9ae59d8eaae59a80387000100000014040000000000000100000002000000f800a659c003870001000000780114009508917c0000a659091b917c020000000900000040000000a2fd12009cfd1200404f1400a2fd1200d04d8700640187000000000000000000d04d870010000000d84d8700384f1400a803870010000000c00300000000870074fb1200404f14006cfe120018ee907cf006917cffffffffeb06917ca09d400000008700000000000400000000000000ffffff3fc04d8700ccfd12009c4d400004000000fa19917cb84d870064018700c04d8700063440000400000018000000c04d870079d90000c0038700fa31400000000000c04d8700c04d87000000000001000000b0fe120082294000c04d87000000000000000000c04d870048fe12008cfe120000000000e224400040fe12008cfe1200c04d8700d84d8700b0fe12008600817c54fa1200d8f9120000000000160018005479420079d90000000000000757917c00000200a4f91200a4f91200a4f91200020000000200000000000000c4f912000000000079d9000014fb12004cfa120014fb1200005a917c00fa1200a0fb120001000000655a917ca405817c74c1977ce705817c00000000f4fd120098fb120000000000a0fb12000000000090fb12000000800070fa120000000000000000000000000016001800547942000000000001000000000000000000000000000000000000003308917ca89a837c0000807c0000807ce800807c2cfa12001fe2907c11fa877cffffffffe06f817c000000006cfa12001c0000000f000000e06f817c8fc60000f0f312000060817cc8fa1200a89a837c7039867cfffffffff0ff1200da36847ca8fa1200099b837cb0fa120000000000b0fa12000000000000000000000000009cfb1200b8fb1200d4fa1200bf37907c9cfb1200e0ff1200b8fb120070fb1200b0ff1200d837907ce0ff120084fb12008b37907c9cfb1200e0ff1200b8fb120070fb1200a89a837c010000009cfb1200e0ff12006078937c9cfb1200e0ff1200b8fb120070fb1200a89a837c280a00009cfb12000200000018ee907c9032917cffffffff8832917c3364917c68fb1200000087003207917c02000000dc31917c1232917c8132917c8832917c1e000000c01e2400080200003807917c54fb12003207917cc4fb120018ee907c9032917c0000130000d01200beb4800088fe1200faea907c00000000b8fb12009cfb1200b8fb1200050000c000000000000000009e4240000200000001000000450000003f0001000000000000000000000000000000000000000000000000007f02ffff0000ffffffffffff0000000000002200000000000000ffff0000000018b72200000118b7220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b0000002300000023000000280a000002000000c1ab807c58bc420094fe12004500000088fe12009e4240001b0000004602010084fe1200230000007f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b622004500000070ff120000424000b8278700dc31917c00000000004c870000000020040000000000000007000000000000004042400000000000000000002e000000000000000cff12007b434100010000000700000084434100004d87002e39917cffffffff24000000240000002700000000000000584d870004000000b1944000244c87002a0000002f000000c0fe1200004d8700584d87000000a659b0b9a859015d400015aa400000000000b4070000784e14000000000001000000f40b00000000000000000000bc070000b8070000f40b0000a8fa120000000000009c4000599c400094b240004f752a0fc0ff1200ec534000010000003039870050398700ff752a0f00002400a02024000050fd7f050000c00100000005000000000000000000240084ff1200acfa1200e0ff1200d06f4000a70b7a0f00000000f0ff1200d76f817c00002400a02024000050fd7f050000c0c8ff1200a8fa1200ffffffffa89a837ce06f817c0000000000000000000000004354400000000000 - -region[2] -MDMemoryDescriptor - start_of_memory_range = 0x97f6e8 - memory.data_size = 0x918 - memory.rva = 0x231d -Memory -0x8000108020fa97009fd7907c0000000048f7970005000f0040061400000000004cf7970037b9807c00000000000000003103917c780114000000000061dc907cf1b8807c00000000ffffffff70f79700000000000000000054f797003082140001000000000000000200000000000000000000007cf7970020b9807c0e00000004000000006000000000a80078011400000000000882140092d5907c8b9b807c9c070000d0f89700780114009c07000038821400807f140020dea85910fa9700780114009807000088fb9700e07f14009c0700000000000078011400000000000882140000000000000000000000000078011400ba0300000000000000000000000000000000000000000000000000007801140000000000000000000000000000000000c0030000000000000000000000000000088214005c0057000600000078011400000000005c00730079007300740065006d0033000082140068011400000000000000000000821400d47f1400807f140070f8970061eea859e000a8000000a8001c4e000084f89700bdeea859e000a8000000a8001c4e0000a4f897005fefa8590000a8000000000006000000c4f89700e000a80060fe9700c8f897005abfa8590000a80000000000060000001c000000d47f1400807f1400380000006ce9907c88b9807cffffffff0000a80000000000807f140030fa97007fc3a859a0c4a859b0fb970060fe9700684f1400504500004c010400ca9610410000000000000000e0000e210b01070a00400000003a000000000000f1100000001000000000bf760000000000100000000200000500010005000100040000000000000000b00000000400009ba2000000001400285214000000000034fa97007801140034fa9700910e917c080614006d05917cc84d85005c4e8500684f140000000000b04800002852140078011400e00300003052140000000000000000000000000078011400c403000030821400380000000000000000000000000000000000000000000000000000003882140048050000780200003800000000100000ec000000b8470000400000000000000000000000000000000000140000000000807f140000000000000000000000000000000101a900000060fe9700dcff9700dcff97000050fd7f78fa970054fa9700ad9d917c8cfa9700c2066f7f0e000000000000001c01000078fa9700c84d850068fa970085ae807c78fc970024fc970083dba85978fc97008cfa9700800000008edba85914010000050000000100000096020000b8fc97003815917c9615917ceb06917c60fe970060fe9700c4fd9700d8fa9700000014003207917c21000000b80c14000000140030521400b0fa9700fffffffff4fc970018ee907c3807917cffffffff3207917cab06917ceb06917ccc4f140060fe9700684f1400e0004000e4fa9700a863917c74fb970018ee907c3808917cffffffff3308917c5b2c817c872c817c00000000f4fb9700000000000000000054fd970018ee907c4006140064fd97003815917c00e0fd7feb06917c684f140038821400780114000050fd7facfb970000000000000004000000000090fe97000000000018fb970050531400508b1400a89a837cffe9907cf60d817ca807000000000000ffe9907cf60d817c08000000000000000000000000000000585314003cfc97003882140000000000160e817cc4fd970060fe970058531400208f1400588b1400460f917c50531400208f1400780114003082140000000000b8fc970078011400b8fc9700910e917c080614006d05917c3882140060fe97000000000000000000960200003082140078011400ffe9907c38821400a807000000000000780114005853140058fc9700505314001000000000000000160e817c784e8500c4fd9700388214000000000024010000f00c00001000000044fc970000000000c7e2907ce721807cffffffffe8f69700388214001809000098fc9700acfc9700d2e2a859ffffffffe8f697003882140018090000c4fc97003882140060fe9700c4fd9700ccfc97004ee3a859ffffffffe8f69700000000003882140018090000e0fc9700f4fc970093b2a859ffffffffe8f69700000000003882140018090000c4fd970060fe9700a85a140078fd9700a5b3a85960fe9700c4fd9700684f1400e8f697000000000018090000000000000200000080fd9700c4fd970060fe970000000000f40b000000000000000000000000000000f0fd7f000000001cf3120000000000e40c000039160000cc020000940d00000000000000000000000000000000000002000000ac4f14006010000098fd97005eb7a8593916000000000000684f1400784e85000000000084ff9700d4fe97007bb9a85960fe9700c4fd9700684f14003849140084ff9700010000000000000008ff9700f40b0000090000000000000020000000200000006c0000008c000000380000001e000000c4000000dc000000a80000008401000064000000b801000030000000e801000080050000e8010000680700000000000068070000680700000000000005150000340000002915000039150000fc1600001d23000068070000600300008a070000c80a0000310a00002c130000f91400000c000000352c000000000000ffffffff5c0f0000c84d8500784e8500884e85000000000000000000000000004c010000fc39a6590000000002000000050000000100000000008500280a000001000001cc0200009c0000000b00000050000000040000000010000000000000000000000001000000000000000000000000000034ff970078baa859384914005c0f0000c84d850001000000884e8500684f140008ff970064ff970000000000a8070000b0fe1200f40b00009cfb120000000000b8fb12000000000000000000ae20140000000000884e8500784e8500c84d8500a8fa120011204000ffffffff5c0f0000a80700000000000078ff970064ff970000000000adbf807c2025807cecff97000100000084ff970003000000c0110000f40b0000f40b0000a8fa120000000000010067470c0000006cff9700bc070000ffffffff000000006c1a4000f40b000000fa12000000000000004000a09d4000b0fe120083b6807cb0fe120000004000a09d4000b0fe120000e0fd7f00069c86c0ff9700d8863f86ffffffffa89a837c90b6807c000000000000000000000000301a4000b0fe120000000000 - -MDException - thread_id = 0xbf4 - exception_record.exception_code = 0xc0000005 - exception_record.exception_flags = 0x0 - exception_record.exception_record = 0x0 - exception_record.exception_address = 0x40429e - exception_record.number_parameters = 2 - exception_record.exception_information[ 0] = 0x1 - exception_record.exception_information[ 1] = 0x45 - thread_context.data_size = 716 - thread_context.rva = 0xac8 - -MDRawContextX86 - context_flags = 0x1003f - dr0 = 0x0 - dr1 = 0x0 - dr2 = 0x0 - dr3 = 0x0 - dr6 = 0x0 - dr7 = 0x0 - float_save.control_word = 0xffff027f - float_save.status_word = 0xffff0000 - float_save.tag_word = 0xffffffff - float_save.error_offset = 0x0 - float_save.error_selector = 0x220000 - float_save.data_offset = 0x0 - float_save.data_selector = 0xffff0000 - float_save.register_area[80] = 0x0000000018b72200000118b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - float_save.cr0_npx_state = 0x0 - gs = 0x0 - fs = 0x3b - es = 0x23 - ds = 0x23 - edi = 0xa28 - esi = 0x2 - ebx = 0x7c80abc1 - edx = 0x42bc58 - ecx = 0x12fe94 - eax = 0x45 - ebp = 0x12fe88 - eip = 0x40429e - cs = 0x1b - eflags = 0x10246 - esp = 0x12fe84 - ss = 0x23 - extended_registers[512] = 0x7f0200000000220000000000000000000000000000000000801f0000ffff00000000000018b72200000100000000000018b72200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004509917c4e09917c38b622002400020024b42200020000009041917c0070fd7f0510907cccb22200000000009cb3220018ee907c7009917cc0e4977c6f3e917c623e917c08020000dcb62200b4b622001e000000000000000000000000000000000000002eb42200000000000f000000020000001e00200000fcfd7f2f63796764726976652f632f444f43554d457e312f4d4d454e544f7e312f4c4f43414c537e312f54656d7000000000000000000130b422000000004300000000000000001efcfd7f4509917c4e09917c5ad9000008b32200b4b62200 - -MDRawSystemInfo - processor_architecture = 0 - processor_level = 6 - processor_revision = 0xd08 - number_of_processors = 1 - product_type = 1 - major_version = 5 - minor_version = 1 - build_number = 2600 - platform_id = 2 - csd_version_rva = 0x768 - suite_mask = 0x100 - cpu.x86_cpu_info.vendor_id[0] = 0x756e6547 - cpu.x86_cpu_info.vendor_id[1] = 0x49656e69 - cpu.x86_cpu_info.vendor_id[2] = 0x6c65746e - cpu.x86_cpu_info.version_information = 0x6d8 - cpu.x86_cpu_info.feature_information = 0xafe9fbff - cpu.x86_cpu_info.amd_extended_cpu_features = 0xffffffff - (csd_version) = "Service Pack 2" - (cpu_vendor) = "GenuineIntel" - -MDRawMiscInfo - size_of_info = 24 - flags1 = 0x3 - process_id = 0xf5c - process_create_time = 0x45d35f73 - process_user_time = 0x0 - process_kernel_time = 0x0 - -MDRawBreakpadInfo - validity = 0x3 - dump_thread_id = 0x11c0 - requesting_thread_id = 0xbf4 - diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.machine_readable.out b/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.machine_readable.out deleted file mode 100644 index e1589534..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.machine_readable.out +++ /dev/null @@ -1,21 +0,0 @@ -OS|Windows NT|5.1.2600 Service Pack 2 -CPU|x86|GenuineIntel family 6 model 13 stepping 8|1 -Crash|EXCEPTION_ACCESS_VIOLATION|0x45|0 -Module|test_app.exe||test_app.pdb|5A9832E5287241C1838ED98914E9B7FF1|0x00400000|0x0042cfff|1 -Module|dbghelp.dll|5.1.2600.2180|dbghelp.pdb|39559573E21B46F28E286923BE9E6A761|0x59a60000|0x59b00fff|0 -Module|imm32.dll|5.1.2600.2180|imm32.pdb|2C17A49C251B4C8EB9E2AD13D7D9EA162|0x76390000|0x763acfff|0 -Module|psapi.dll|5.1.2600.2180|psapi.pdb|A5C3A1F9689F43D8AD228A09293889702|0x76bf0000|0x76bfafff|0 -Module|ole32.dll|5.1.2600.2726|ole32.pdb|683B65B246F4418796D2EE6D4C55EB112|0x774e0000|0x7761cfff|0 -Module|version.dll|5.1.2600.2180|version.pdb|180A90C40384463E82DDC45B2C8AB76E2|0x77c00000|0x77c07fff|0 -Module|msvcrt.dll|7.0.2600.2180|msvcrt.pdb|A678F3C30DED426B839032B996987E381|0x77c10000|0x77c67fff|0 -Module|user32.dll|5.1.2600.2622|user32.pdb|EE2B714D83A34C9D88027621272F83262|0x77d40000|0x77dcffff|0 -Module|advapi32.dll|5.1.2600.2180|advapi32.pdb|455D6C5F184D45BBB5C5F30F829751142|0x77dd0000|0x77e6afff|0 -Module|rpcrt4.dll|5.1.2600.2180|rpcrt4.pdb|BEA45A721DA141DAA3BA86B3A20311532|0x77e70000|0x77f00fff|0 -Module|gdi32.dll|5.1.2600.2818|gdi32.pdb|C0EA66BE00A64BD7AEF79E443A91869C2|0x77f10000|0x77f56fff|0 -Module|kernel32.dll|5.1.2600.2945|kernel32.pdb|BCE8785C57B44245A669896B6A19B9542|0x7c800000|0x7c8f3fff|0 -Module|ntdll.dll|5.1.2600.2180|ntdll.pdb|36515FB5D04345E491F672FA2E2878C02|0x7c900000|0x7c9affff|0 - -0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|58|0x3 -0|1|test_app.exe|main|c:\test_app.cc|65|0x4 -0|2|test_app.exe|__tmainCRTStartup|f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c|327|0x11 -0|3|kernel32.dll|BaseProcessStart|||0x22 diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.out b/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.out deleted file mode 100644 index 21b425de..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/minidump2.stackwalk.out +++ /dev/null @@ -1,35 +0,0 @@ -Operating system: Windows NT - 5.1.2600 Service Pack 2 -CPU: x86 - GenuineIntel family 6 model 13 stepping 8 - 1 CPU - -Crash reason: EXCEPTION_ACCESS_VIOLATION -Crash address: 0x45 - -Thread 0 (crashed) - 0 test_app.exe!`anonymous namespace'::CrashFunction [test_app.cc : 58 + 0x3] - eip = 0x0040429e esp = 0x0012fe84 ebp = 0x0012fe88 ebx = 0x7c80abc1 - esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fe94 - edx = 0x0042bc58 efl = 0x00010246 - 1 test_app.exe!main [test_app.cc : 65 + 0x4] - eip = 0x00404200 esp = 0x0012fe90 ebp = 0x0012ff70 - 2 test_app.exe!__tmainCRTStartup [crt0.c : 327 + 0x11] - eip = 0x004053ec esp = 0x0012ff78 ebp = 0x0012ffc0 - 3 kernel32.dll!BaseProcessStart + 0x22 - eip = 0x7c816fd7 esp = 0x0012ffc8 ebp = 0x0012fff0 - -Loaded modules: -0x00400000 - 0x0042cfff test_app.exe ??? (main) -0x59a60000 - 0x59b00fff dbghelp.dll 5.1.2600.2180 -0x76390000 - 0x763acfff imm32.dll 5.1.2600.2180 -0x76bf0000 - 0x76bfafff psapi.dll 5.1.2600.2180 -0x774e0000 - 0x7761cfff ole32.dll 5.1.2600.2726 -0x77c00000 - 0x77c07fff version.dll 5.1.2600.2180 -0x77c10000 - 0x77c67fff msvcrt.dll 7.0.2600.2180 -0x77d40000 - 0x77dcffff user32.dll 5.1.2600.2622 -0x77dd0000 - 0x77e6afff advapi32.dll 5.1.2600.2180 -0x77e70000 - 0x77f00fff rpcrt4.dll 5.1.2600.2180 -0x77f10000 - 0x77f56fff gdi32.dll 5.1.2600.2818 -0x7c800000 - 0x7c8f3fff kernel32.dll 5.1.2600.2945 -0x7c900000 - 0x7c9affff ntdll.dll 5.1.2600.2180 diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/module1.out b/thirdparty/google-breakpad/r318/src/processor/testdata/module1.out deleted file mode 100644 index 85687828..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/module1.out +++ /dev/null @@ -1,19 +0,0 @@ -MODULE windows x86 111111111111111111111111111111111 module1.pdb -FILE 1 file1_1.cc -FILE 2 file1_2.cc -FILE 3 file1_3.cc -FUNC 1000 c 0 Function1_1 -1000 4 44 1 -1004 4 45 1 -1008 4 46 1 -FUNC 1100 8 4 Function1_2 -1100 4 65 2 -1104 4 66 2 -FUNC 1200 100 8 Function1_3 -FUNC 1300 100 c Function1_4 -FUNC 2000 0 0 Test_Zero_Size_Function_Is_Ignored -2000 4 88 2 -STACK WIN 4 1000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1100 8 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1100 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 1300 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/module2.out b/thirdparty/google-breakpad/r318/src/processor/testdata/module2.out deleted file mode 100644 index 265401c1..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/module2.out +++ /dev/null @@ -1,17 +0,0 @@ -MODULE windows x86 222222222 module2.pdb -FILE 1 file2_1.cc -FILE 2 file2_2.cc -FILE 3 file2_3.cc -FUNC 2000 c 4 Function2_1 -1000 4 54 1 -1004 4 55 1 -1008 4 56 1 -PUBLIC 2160 0 Public2_1 -FUNC 2170 14 4 Function2_2 -2170 6 10 2 -2176 4 12 2 -217a 6 13 2 -2180 4 21 2 -PUBLIC 21a0 0 Public2_2 -STACK WIN 4 2000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = -STACK WIN 4 2170 14 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ = diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/module3_bad.out b/thirdparty/google-breakpad/r318/src/processor/testdata/module3_bad.out deleted file mode 100644 index bb772486..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/module3_bad.out +++ /dev/null @@ -1,3 +0,0 @@ -MODULE windows x86 333333333333333333333333333333333 module3.pdb -FILE 1 file1.cc -FUNC 1000 diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/module4_bad.out b/thirdparty/google-breakpad/r318/src/processor/testdata/module4_bad.out deleted file mode 100644 index d01fb2cc..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/module4_bad.out +++ /dev/null @@ -1,5 +0,0 @@ -MODULE windows x86 444444444444444444444444444444444 module4.pdb -FILE 1 file4_1.cc -FILE 2 file4_2.cc -1000 4 44 1 -1004 4 45 1 diff --git a/thirdparty/google-breakpad/r318/src/processor/testdata/test_app.cc b/thirdparty/google-breakpad/r318/src/processor/testdata/test_app.cc deleted file mode 100644 index f230ef3f..00000000 --- a/thirdparty/google-breakpad/r318/src/processor/testdata/test_app.cc +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This file is used to generate minidump2.dmp and minidump2.sym. -// cl /Zi test_app.cc /Fetest_app.exe /I google_breakpad/src \ -// google_breakpad/src/client/windows/releasestaticcrt/exception_handler.lib -// Then run test_app to generate a dump, and dump_syms to create the .sym file. - -#include - -#include "client/windows/handler/exception_handler.h" - -namespace { - -static bool callback(const wchar_t *dump_path, const wchar_t *id, - void *context, EXCEPTION_POINTERS *exinfo, - MDRawAssertionInfo *assertion, - bool succeeded) { - if (succeeded) { - printf("dump guid is %ws\n", id); - } else { - printf("dump failed\n"); - } - fflush(stdout); - - return succeeded; -} - -static void CrashFunction() { - int *i = reinterpret_cast(0x45); - *i = 5; // crash! -} - -} // namespace - -int main(int argc, char **argv) { - google_breakpad::ExceptionHandler eh( - L".", NULL, callback, NULL, - google_breakpad::ExceptionHandler::HANDLER_ALL); - CrashFunction(); - printf("did not crash?\n"); - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/stamp-h1 b/thirdparty/google-breakpad/r318/src/stamp-h1 deleted file mode 100644 index 57ea58e4..00000000 --- a/thirdparty/google-breakpad/r318/src/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for src/config.h diff --git a/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/Makefile b/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/Makefile deleted file mode 100644 index 7d74abad..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -CXX=g++ -CC=gcc - -CXXFLAGS=-gstabs -I../../.. -DNDEBUG -Wall -D_REENTRANT - -.PHONY:all clean - -BIN=dump_syms - -all:$(BIN) - -DUMP_OBJ=dump_symbols.o guid_creator.o dump_syms.o file_id.o md5.o - -dump_syms:$(DUMP_OBJ) - $(CXX) $(CXXFLAGS) -o $@ $^ - -dump_symbols.o:../../../common/linux/dump_symbols.cc - $(CXX) $(CXXFLAGS) -c $^ - -guid_creator.o:../../../common/linux/guid_creator.cc - $(CXX) $(CXXFLAGS) -c $^ - -file_id.o:../../../common/linux/file_id.cc - $(CXX) $(CXXFLAGS) -c $^ - -md5.o:../../../common/md5.c - $(CC) $(CXXFLAGS) -c $^ - -clean: - rm -f $(BIN) $(DUMP_OBJ) diff --git a/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/dump_syms.cc deleted file mode 100644 index e7eb0a2d..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/linux/dump_syms/dump_syms.cc +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include "common/linux/dump_symbols.h" - -using namespace google_breakpad; - -int main(int argc, char **argv) { - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - return 1; - } - - const char *binary = argv[1]; - - DumpSymbols dumper; - if (!dumper.WriteSymbolFile(binary, fileno(stdout))) { - fprintf(stderr, "Failed to write symbol file.\n"); - return 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/Makefile b/thirdparty/google-breakpad/r318/src/tools/linux/symupload/Makefile deleted file mode 100644 index c0c49eed..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -CXX=g++ - -CXXFLAGS=-gstabs -I../../.. -Wall -D_REENTRANT - -.PHONY:all clean - -BIN=minidump_upload sym_upload - -all:$(BIN) - -DUMP_UPLOAD_OBJ=minidump_upload.o http_upload.o -SYM_UPLOAD_OBJ=sym_upload.o http_upload.o - -minidump_upload:$(DUMP_UPLOAD_OBJ) - $(CXX) $(CXXFLAGS) -ldl -o $@ $^ - -sym_upload:$(SYM_UPLOAD_OBJ) - $(CXX) $(CXXFLAGS) -ldl -o $@ $^ - -http_upload.o:../../../common/linux/http_upload.cc - $(CXX) $(CXXFLAGS) `curl-config --cflags` -c $^ - -clean: - rm *.o $(BIN) diff --git a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/minidump_upload.cc b/thirdparty/google-breakpad/r318/src/tools/linux/symupload/minidump_upload.cc deleted file mode 100644 index cab6ad43..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/minidump_upload.cc +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_upload.m: Upload a minidump to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// prod: the product name -// ver: the product version -// symbol_file: the breakpad format symbol file - -#include - -#include - -#include "common/linux/http_upload.h" - -using google_breakpad::HTTPUpload; - -struct Options { - std::string minidumpPath; - std::string uploadURLStr; - std::string product; - std::string version; - std::string proxy; - std::string proxy_user_pwd; - bool success; -}; - -//============================================================================= -static void Start(Options *options) { - std::map parameters; - // Add parameters - parameters["prod"] = options->product; - parameters["ver"] = options->version; - - // Send it - std::string response, error; - bool success = HTTPUpload::SendRequest(options->uploadURLStr, - parameters, - options->minidumpPath, - "upload_file_minidump", - options->proxy, - options->proxy_user_pwd, - &response, - &error); - - if (success) { - printf("Successfully sent the minidump file.\n"); - } else { - printf("Failed to send minidump: %s\n", error.c_str()); - printf("Response:\n"); - printf("%s\n", response.c_str()); - } - options->success = success; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit minidump information.\n"); - fprintf(stderr, "Usage: %s [options...] -p -v " - "\n", argv[0]); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " should be a minidump.\n"); - fprintf(stderr, " is the destination for the upload\n"); - - fprintf(stderr, "-p:\t Product name\n"); - fprintf(stderr, "-v:\t Product version\n"); - fprintf(stderr, "-x:\t Use HTTP proxy on given port\n"); - fprintf(stderr, "-u:\t Set proxy user and password\n"); - fprintf(stderr, "-h:\t Usage\n"); - fprintf(stderr, "-?:\t Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "p:u:v:x:h?")) != -1) { - switch (ch) { - case 'p': - options->product = optarg; - break; - case 'u': - options->proxy_user_pwd = optarg; - break; - case 'v': - options->version = optarg; - break; - case 'x': - options->proxy = optarg; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = argv[optind]; - options->uploadURLStr = argv[optind + 1]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - Options options; - SetupOptions(argc, argv, &options); - Start(&options); - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/sym_upload.cc b/thirdparty/google-breakpad/r318/src/tools/linux/symupload/sym_upload.cc deleted file mode 100644 index 4e4da065..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/linux/symupload/sym_upload.cc +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// symupload.cc: Upload a symbol file to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// code_file: the basename of the module, e.g. "app" -// debug_file: the basename of the debugging file, e.g. "app" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// version: the file version of the module, e.g. "1.2.3.4" -// os: the operating system that the module was built for -// cpu: the CPU that the module was built for -// symbol_file: the contents of the breakpad-format symbol file - -#include - -#include -#include -#include -#include -#include -#include - -#include "common/linux/http_upload.h" - -using google_breakpad::HTTPUpload; - -typedef struct { - std::string symbolsPath; - std::string uploadURLStr; - std::string proxy; - std::string proxy_user_pwd; - std::string version; - bool success; -} Options; - -static void TokenizeByChar(const std::string &source_string, - int c, std::vector *results) { - assert(results); - std::string::size_type cur_pos = 0, next_pos = 0; - while ((next_pos = source_string.find(c, cur_pos)) != std::string::npos) { - if (next_pos != cur_pos) - results->push_back(source_string.substr(cur_pos, next_pos - cur_pos)); - cur_pos = next_pos + 1; - } - if (cur_pos < source_string.size() && next_pos != cur_pos) - results->push_back(source_string.substr(cur_pos)); -} - -//============================================================================= -// Parse out the module line which have 5 parts. -// MODULE -static bool ModuleDataForSymbolFile(const std::string &file, - std::vector *module_parts) { - assert(module_parts); - const size_t kModulePartNumber = 5; - FILE *fp = fopen(file.c_str(), "r"); - if (fp) { - char buffer[1024]; - if (fgets(buffer, sizeof(buffer), fp)) { - std::string line(buffer); - std::string::size_type line_break_pos = line.find_first_of('\n'); - if (line_break_pos == std::string::npos) { - assert(!"The file is invalid!"); - fclose(fp); - return false; - } - line.resize(line_break_pos); - const char kDelimiter = ' '; - TokenizeByChar(line, kDelimiter, module_parts); - if (module_parts->size() != kModulePartNumber) - module_parts->clear(); - } - fclose(fp); - } - - return module_parts->size() == kModulePartNumber; -} - -//============================================================================= -static std::string CompactIdentifier(const std::string &uuid) { - std::vector components; - TokenizeByChar(uuid, '-', &components); - std::string result; - for (size_t i = 0; i < components.size(); ++i) - result += components[i]; - return result; -} - -//============================================================================= -static void Start(Options *options) { - std::map parameters; - options->success = false; - std::vector module_parts; - if (!ModuleDataForSymbolFile(options->symbolsPath, &module_parts)) { - fprintf(stderr, "Failed to parse symbol file!\n"); - return; - } - - std::string compacted_id = CompactIdentifier(module_parts[3]); - - // Add parameters - if (!options->version.empty()) - parameters["version"] = options->version; - - // MODULE - // 0 1 2 3 4 - parameters["os"] = module_parts[1]; - parameters["cpu"] = module_parts[2]; - parameters["debug_file"] = module_parts[4]; - parameters["code_file"] = module_parts[4]; - parameters["debug_identifier"] = compacted_id; - std::string response, error; - bool success = HTTPUpload::SendRequest(options->uploadURLStr, - parameters, - options->symbolsPath, - "symbol_file", - options->proxy, - options->proxy_user_pwd, - &response, - &error); - - if (success) { - printf("Successfully sent the symbol file.\n"); - } else { - printf("Failed to send symbol file: %s\n", error.c_str()); - printf("Response:\n"); - printf("%s\n", response.c_str()); - } - options->success = success; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit symbol information.\n"); - fprintf(stderr, "Usage: %s [options...] \n", argv[0]); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " should be created by using the dump_syms tool.\n"); - fprintf(stderr, " is the destination for the upload\n"); - fprintf(stderr, "-v:\t Version information (e.g., 1.2.3.4)\n"); - fprintf(stderr, "-x:\t Use HTTP proxy on given port\n"); - fprintf(stderr, "-u:\t Set proxy user and password\n"); - fprintf(stderr, "-h:\t Usage\n"); - fprintf(stderr, "-?:\t Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "u:v:x:h?")) != -1) { - switch (ch) { - case 'u': - options->proxy_user_pwd = optarg; - break; - case 'v': - options->version = optarg; - break; - case 'x': - options->proxy = optarg; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->symbolsPath = argv[optind]; - options->uploadURLStr = argv[optind + 1]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - Options options; - SetupOptions(argc, argv, &options); - Start(&options); - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/crash_report.mm b/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/crash_report.mm deleted file mode 100644 index f90ee42f..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/crash_report.mm +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// crash_report.mm: Convert the contents of a minidump into a format that -// looks more like Apple's CrashReporter format - -#include - -#include -#include - -#include - -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/call_stack.h" -#include "google_breakpad/processor/code_module.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/minidump_processor.h" -#include "google_breakpad/processor/process_state.h" -#include "google_breakpad/processor/stack_frame_cpu.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/pathname_stripper.h" -#include "processor/scoped_ptr.h" -#include "processor/simple_symbol_supplier.h" - -#include "on_demand_symbol_supplier.h" - -using std::string; - -using google_breakpad::BasicSourceLineResolver; -using google_breakpad::CallStack; -using google_breakpad::CodeModule; -using google_breakpad::CodeModules; -using google_breakpad::MinidumpProcessor; -using google_breakpad::OnDemandSymbolSupplier; -using google_breakpad::PathnameStripper; -using google_breakpad::ProcessState; -using google_breakpad::scoped_ptr; -using google_breakpad::StackFrame; -using google_breakpad::StackFramePPC; -using google_breakpad::StackFrameX86; -using google_breakpad::SystemInfo; - -typedef struct { - NSString *minidumpPath; - NSString *searchDir; - NSString *symbolSearchDir; -} Options; - -//============================================================================= -static int PrintRegister(const char *name, u_int32_t value, int sequence) { - if (sequence % 4 == 0) { - printf("\n"); - } - printf("%6s = 0x%08x ", name, value); - return ++sequence; -} - -//============================================================================= -static void PrintStack(const CallStack *stack, const string &cpu) { - int frame_count = stack->frames()->size(); - char buffer[1024]; - for (int frame_index = 0; frame_index < frame_count; ++frame_index) { - const StackFrame *frame = stack->frames()->at(frame_index); - const CodeModule *module = frame->module; - printf("%2d ", frame_index); - - if (module) { - // Module name (20 chars max) - strcpy(buffer, PathnameStripper::File(module->code_file()).c_str()); - int maxStr = 20; - buffer[maxStr] = 0; - printf("%-*s", maxStr, buffer); - - strcpy(buffer, module->version().c_str()); - buffer[maxStr] = 0; - - printf("%-*s",maxStr, buffer); - - u_int64_t instruction = frame->instruction; - - // PPC only: Adjust the instruction to match that of Crash reporter. The - // instruction listed is actually the return address. See the detailed - // comments in stackwalker_ppc.cc for more information. - if (cpu == "ppc" && frame_index) - instruction += 4; - - printf(" 0x%08llx ", instruction); - - // Function name - if (!frame->function_name.empty()) { - printf("%s", frame->function_name.c_str()); - if (!frame->source_file_name.empty()) { - string source_file = PathnameStripper::File(frame->source_file_name); - printf(" + 0x%llx (%s:%d)", - instruction - frame->source_line_base, - source_file.c_str(), frame->source_line); - } else { - printf(" + 0x%llx", instruction - frame->function_base); - } - } - } - printf("\n"); - } -} - -//============================================================================= -static void PrintRegisters(const CallStack *stack, const string &cpu) { - int sequence = 0; - const StackFrame *frame = stack->frames()->at(0); - if (cpu == "x86") { - const StackFrameX86 *frame_x86 = - reinterpret_cast(frame); - - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EIP) - sequence = PrintRegister("eip", frame_x86->context.eip, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESP) - sequence = PrintRegister("esp", frame_x86->context.esp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBP) - sequence = PrintRegister("ebp", frame_x86->context.ebp, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EBX) - sequence = PrintRegister("ebx", frame_x86->context.ebx, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_ESI) - sequence = PrintRegister("esi", frame_x86->context.esi, sequence); - if (frame_x86->context_validity & StackFrameX86::CONTEXT_VALID_EDI) - sequence = PrintRegister("edi", frame_x86->context.edi, sequence); - if (frame_x86->context_validity == StackFrameX86::CONTEXT_VALID_ALL) { - sequence = PrintRegister("eax", frame_x86->context.eax, sequence); - sequence = PrintRegister("ecx", frame_x86->context.ecx, sequence); - sequence = PrintRegister("edx", frame_x86->context.edx, sequence); - sequence = PrintRegister("efl", frame_x86->context.eflags, sequence); - } - } else if (cpu == "ppc") { - const StackFramePPC *frame_ppc = - reinterpret_cast(frame); - - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_ALL == - StackFramePPC::CONTEXT_VALID_ALL) { - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - sequence = PrintRegister("srr1", frame_ppc->context.srr1, sequence); - sequence = PrintRegister("cr", frame_ppc->context.cr, sequence); - sequence = PrintRegister("xer", frame_ppc->context.xer, sequence); - sequence = PrintRegister("lr", frame_ppc->context.lr, sequence); - sequence = PrintRegister("ctr", frame_ppc->context.ctr, sequence); - sequence = PrintRegister("mq", frame_ppc->context.mq, sequence); - sequence = PrintRegister("vrsave", frame_ppc->context.vrsave, sequence); - - sequence = 0; - char buffer[5]; - for (int i = 0; i < MD_CONTEXT_PPC_GPR_COUNT; ++i) { - sprintf(buffer, "r%d", i); - sequence = PrintRegister(buffer, frame_ppc->context.gpr[i], sequence); - } - } else { - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_SRR0) - sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence); - if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_GPR1) - sequence = PrintRegister("r1", frame_ppc->context.gpr[1], sequence); - } - } - - printf("\n"); -} - -static void PrintModules(const CodeModules *modules) { - if (!modules) - return; - - printf("\n"); - printf("Loaded modules:\n"); - - u_int64_t main_address = 0; - const CodeModule *main_module = modules->GetMainModule(); - if (main_module) { - main_address = main_module->base_address(); - } - - unsigned int module_count = modules->module_count(); - for (unsigned int module_sequence = 0; - module_sequence < module_count; - ++module_sequence) { - const CodeModule *module = modules->GetModuleAtSequence(module_sequence); - assert(module); - u_int64_t base_address = module->base_address(); - printf("0x%08llx - 0x%08llx %s %s%s %s\n", - base_address, base_address + module->size() - 1, - PathnameStripper::File(module->code_file()).c_str(), - module->version().empty() ? "???" : module->version().c_str(), - main_module != NULL && base_address == main_address ? - " (main)" : "", - module->code_file().c_str()); - } -} - -//============================================================================= -static void Start(Options *options) { - string minidump_file([options->minidumpPath fileSystemRepresentation]); - - BasicSourceLineResolver resolver; - string search_dir = options->searchDir ? - [options->searchDir fileSystemRepresentation] : ""; - string symbol_search_dir = options->symbolSearchDir ? - [options->symbolSearchDir fileSystemRepresentation] : ""; - scoped_ptr symbol_supplier( - new OnDemandSymbolSupplier(search_dir, symbol_search_dir)); - scoped_ptr - minidump_processor(new MinidumpProcessor(symbol_supplier.get(), &resolver)); - ProcessState process_state; - if (minidump_processor->Process(minidump_file, &process_state) != - MinidumpProcessor::PROCESS_OK) { - fprintf(stderr, "MinidumpProcessor::Process failed\n"); - return; - } - - const SystemInfo *system_info = process_state.system_info(); - string cpu = system_info->cpu; - - // Convert the time to a string - u_int32_t time_date_stamp = process_state.time_date_stamp(); - struct tm timestruct; - gmtime_r(reinterpret_cast(&time_date_stamp), ×truct); - char timestr[20]; - strftime(timestr, 20, "%Y-%m-%d %H:%M:%S", ×truct); - printf("Date: %s GMT\n", timestr); - - printf("Operating system: %s (%s)\n", system_info->os.c_str(), - system_info->os_version.c_str()); - printf("Architecture: %s\n", cpu.c_str()); - - if (process_state.crashed()) { - printf("Crash reason: %s\n", process_state.crash_reason().c_str()); - printf("Crash address: 0x%llx\n", process_state.crash_address()); - } else { - printf("No crash\n"); - } - - int requesting_thread = process_state.requesting_thread(); - if (requesting_thread != -1) { - printf("\n"); - printf("Thread %d (%s)\n", - requesting_thread, - process_state.crashed() ? "crashed" : - "requested dump, did not crash"); - PrintStack(process_state.threads()->at(requesting_thread), cpu); - } - - // Print all of the threads in the dump. - int thread_count = process_state.threads()->size(); - for (int thread_index = 0; thread_index < thread_count; ++thread_index) { - if (thread_index != requesting_thread) { - // Don't print the crash thread again, it was already printed. - printf("\n"); - printf("Thread %d\n", thread_index); - PrintStack(process_state.threads()->at(thread_index), cpu); - } - } - - // Print the crashed registers - if (requesting_thread != -1) { - printf("\nThread %d:", requesting_thread); - PrintRegisters(process_state.threads()->at(requesting_thread), cpu); - } - - // Print information about modules - PrintModules(process_state.modules()); -} - -//============================================================================= -static void Usage(int argc, const char *argv[]) { - fprintf(stderr, "Convert a minidump to a crash report. Breakpad symbol " - "files will be used (or created if missing) in /tmp.\n" - "If a symbol-file-search-dir is specified, any symbol " - "files in it will be used instead of being loaded from " - "modules on disk.\n" - "If modules cannot be found at the paths stored in the " - "minidump file, they will be searched for at " - "/.\n"); - fprintf(stderr, "Usage: %s [-s module-search-dir] [-S symbol-file-search-dir] minidump-file\n", argv[0]); - fprintf(stderr, "\t-s: Specify a search directory to use for missing modules\n" - "\t-S: Specify a search directory to use for symbol files\n" - "\t-h: Usage\n" - "\t-?: Usage\n"); -} - -//============================================================================= -static void SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "S:s:h?")) != -1) { - switch (ch) { - case 's': - options->searchDir = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg - length:strlen(optarg)]; - break; - - case 'S': - options->symbolSearchDir = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg - length:strlen(optarg)]; - break; - - case 'h': - case '?': - Usage(argc, argv); - exit(1); - break; - } - } - - if ((argc - optind) != 1) { - fprintf(stderr, "%s: Missing minidump file\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - [pool release]; - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.h b/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.h deleted file mode 100644 index 9c0e8b78..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// on_demand_symbol_supplier.h: Provides a Symbol Supplier that will create -// a breakpad symbol file on demand. - -#ifndef TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ -#define TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ - -#include -#include -#include "google_breakpad/processor/symbol_supplier.h" - -namespace google_breakpad { - -using std::map; -using std::string; -class MinidumpModule; - -class OnDemandSymbolSupplier : public SymbolSupplier { - public: - // |search_dir| is the directory to search for alternative symbols with - // the same name as the module in the minidump - OnDemandSymbolSupplier(const string &search_dir, - const string &symbol_search_dir); - virtual ~OnDemandSymbolSupplier() {} - - // Returns the path to the symbol file for the given module. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file); - - // Returns the path to the symbol file for the given module. - virtual SymbolResult GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data); - protected: - // Search directory - string search_dir_; - string symbol_search_dir_; - - // When we create a symbol file for a module, save the name of the module - // and the path to that module's symbol file. - map module_file_map_; - - // Return the name for |module| This will be the value used as the key - // to the |module_file_map_|. - string GetNameForModule(const CodeModule *module); - - // Find the module on local system. If the module resides in a different - // location than the full path in the minidump, this will be the location - // used. - string GetLocalModulePath(const CodeModule *module); - - // Return the full path for |module|. - string GetModulePath(const CodeModule *module); - - // Return the path to the symbol file for |module|. If an empty string is - // returned, then |module| doesn't have a symbol file. - string GetModuleSymbolFile(const CodeModule *module); - - // Generate the breakpad symbol file for |module|. Return true if successful. - // File is generated in /tmp. - bool GenerateSymbolFile(const CodeModule *module, - const SystemInfo *system_info); -}; - -} // namespace google_breakpad - -#endif // TOOLS_MAC_CRASH_REPORT_ON_DEMAND_SYMBOL_SUPPLIER_H__ diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.mm b/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.mm deleted file mode 100644 index 4123a27c..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/crash_report/on_demand_symbol_supplier.mm +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include "google_breakpad/processor/basic_source_line_resolver.h" -#include "google_breakpad/processor/minidump.h" -#include "google_breakpad/processor/system_info.h" -#include "processor/pathname_stripper.h" - -#include "on_demand_symbol_supplier.h" -#include "dump_syms.h" - -using std::map; -using std::string; - -using google_breakpad::OnDemandSymbolSupplier; -using google_breakpad::PathnameStripper; -using google_breakpad::SymbolSupplier; -using google_breakpad::SystemInfo; - -OnDemandSymbolSupplier::OnDemandSymbolSupplier(const string &search_dir, - const string &symbol_search_dir) - : search_dir_(search_dir) { - NSFileManager *mgr = [NSFileManager defaultManager]; - int length = symbol_search_dir.length(); - if (length) { - // Load all sym files in symbol_search_dir into our module_file_map - // A symbol file always starts with a line like this: - // MODULE mac x86 BBF0A8F9BEADDD2048E6464001CA193F0 GoogleDesktopDaemon - // or - // MODULE mac ppc BBF0A8F9BEADDD2048E6464001CA193F0 GoogleDesktopDaemon - const char *symbolSearchStr = symbol_search_dir.c_str(); - NSString *symbolSearchPath = - [mgr stringWithFileSystemRepresentation:symbolSearchStr - length:strlen(symbolSearchStr)]; - NSDirectoryEnumerator *dirEnum = [mgr enumeratorAtPath:symbolSearchPath]; - NSString *fileName; - NSCharacterSet *hexSet = - [NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"]; - NSCharacterSet *newlineSet = - [NSCharacterSet characterSetWithCharactersInString:@"\r\n"]; - while ((fileName = [dirEnum nextObject])) { - // Check to see what type of file we have - NSDictionary *attrib = [dirEnum fileAttributes]; - NSString *fileType = [attrib objectForKey:NSFileType]; - if ([fileType isEqualToString:NSFileTypeDirectory]) { - // Skip subdirectories - [dirEnum skipDescendents]; - } else { - NSString *filePath = [symbolSearchPath stringByAppendingPathComponent:fileName]; - NSString *dataStr = [[[NSString alloc] initWithContentsOfFile:filePath] autorelease]; - if (dataStr) { - // Check file to see if it is of appropriate type, and grab module - // name. - NSScanner *scanner = [NSScanner scannerWithString:dataStr]; - BOOL goodScan = [scanner scanString:@"MODULE mac " intoString:nil]; - if (goodScan) { - goodScan = ([scanner scanString:@"x86 " intoString:nil] || - [scanner scanString:@"ppc " intoString:nil]); - if (goodScan) { - NSString *moduleID; - goodScan = [scanner scanCharactersFromSet:hexSet - intoString:&moduleID]; - if (goodScan) { - // Module IDs are always 33 chars long - goodScan = [moduleID length] == 33; - if (goodScan) { - NSString *moduleName; - goodScan = [scanner scanUpToCharactersFromSet:newlineSet - intoString:&moduleName]; - if (goodScan) { - goodScan = [moduleName length] > 0; - if (goodScan) { - const char *moduleNameStr = [moduleName UTF8String]; - const char *filePathStr = [filePath fileSystemRepresentation]; - // Map our file - module_file_map_[moduleNameStr] = filePathStr; - } - } - } - } - } - } - } - } - } - } -} - -SymbolSupplier::SymbolResult -OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file) { - string path(GetModuleSymbolFile(module)); - - if (path.empty()) { - if (!GenerateSymbolFile(module, system_info)) - return NOT_FOUND; - - path = GetModuleSymbolFile(module); - } - - if (path.empty()) - return NOT_FOUND; - - *symbol_file = path; - return FOUND; -} - -SymbolSupplier::SymbolResult -OnDemandSymbolSupplier::GetSymbolFile(const CodeModule *module, - const SystemInfo *system_info, - string *symbol_file, - string *symbol_data) { - SymbolSupplier::SymbolResult s = GetSymbolFile(module, - system_info, - symbol_file); - - - if (s == FOUND) { - ifstream in(symbol_file->c_str()); - getline(in, *symbol_data, std::string::traits_type::to_char_type( - std::string::traits_type::eof())); - in.close(); - } - - return s; -} - -string OnDemandSymbolSupplier::GetLocalModulePath(const CodeModule *module) { - NSFileManager *mgr = [NSFileManager defaultManager]; - const char *moduleStr = module->code_file().c_str(); - NSString *modulePath = - [mgr stringWithFileSystemRepresentation:moduleStr length:strlen(moduleStr)]; - const char *searchStr = search_dir_.c_str(); - NSString *searchDir = - [mgr stringWithFileSystemRepresentation:searchStr length:strlen(searchStr)]; - - if ([mgr fileExistsAtPath:modulePath]) - return module->code_file(); - - // If the module is not found, try to start appending the components to the - // search string and stop if a file (not dir) is found or all components - // have been appended - NSArray *pathComponents = [modulePath componentsSeparatedByString:@"/"]; - int count = [pathComponents count]; - NSMutableString *path = [NSMutableString string]; - - for (int i = 0; i < count; ++i) { - [path setString:searchDir]; - - for (int j = 0; j < i + 1; ++j) { - int idx = count - 1 - i + j; - [path appendFormat:@"/%@", [pathComponents objectAtIndex:idx]]; - } - - BOOL isDir; - if ([mgr fileExistsAtPath:path isDirectory:&isDir] && (!isDir)) { - return [path fileSystemRepresentation]; - } - } - - return ""; -} - -string OnDemandSymbolSupplier::GetModulePath(const CodeModule *module) { - return module->code_file(); -} - -string OnDemandSymbolSupplier::GetNameForModule(const CodeModule *module) { - return PathnameStripper::File(module->code_file()); -} - -string OnDemandSymbolSupplier::GetModuleSymbolFile(const CodeModule *module) { - string name(GetNameForModule(module)); - map::iterator result = module_file_map_.find(name); - - return (result == module_file_map_.end()) ? "" : (*result).second; -} - -static float GetFileModificationTime(const char *path) { - float result = 0; - struct stat file_stat; - if (stat(path, &file_stat) == 0) - result = (float)file_stat.st_mtimespec.tv_sec + - (float)file_stat.st_mtimespec.tv_nsec / 1.0e9; - - return result; -} - -bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module, - const SystemInfo *system_info) { - bool result = true; - string name = GetNameForModule(module); - string module_path = GetLocalModulePath(module); - NSString *symbol_path = [NSString stringWithFormat:@"/tmp/%s.%s.sym", - name.c_str(), system_info->cpu.c_str()]; - - if (module_path.empty()) - return false; - - // Check if there's already a symbol file cached. Ensure that the file is - // newer than the module. Otherwise, generate a new one. - BOOL generate_file = YES; - if ([[NSFileManager defaultManager] fileExistsAtPath:symbol_path]) { - // Check if the module file is newer than the saved symbols - float cache_time = - GetFileModificationTime([symbol_path fileSystemRepresentation]); - float module_time = - GetFileModificationTime(module_path.c_str()); - - if (cache_time > module_time) - generate_file = NO; - } - - if (generate_file) { - NSString *module_str = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:module_path.c_str() - length:module_path.length()]; - DumpSymbols *dump = [[DumpSymbols alloc] initWithContentsOfFile:module_str]; - const char *archStr = system_info->cpu.c_str(); - if ([dump setArchitecture:[NSString stringWithUTF8String:archStr]]) { - [dump writeSymbolFile:symbol_path]; - } else { - printf("Architecture %s not available for %s\n", archStr, name.c_str()); - result = false; - } - [dump release]; - } - - // Add the mapping - if (result) - module_file_map_[name] = [symbol_path fileSystemRepresentation]; - - return result; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.m b/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.m deleted file mode 100644 index 3729a8d5..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.m +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_syms_tool.m: Command line tool that uses the DumpSymbols class. -// TODO(waylonis): accept stdin - -#include -#include - -#include "dump_syms.h" -#include "common/mac/macho_utilities.h" - -typedef struct { - NSString *srcPath; - NSString *arch; - NSString *uuidStr; - BOOL result; -} Options; - -//============================================================================= -static void Start(Options *options) { - DumpSymbols *dump = [[DumpSymbols alloc] - initWithContentsOfFile:options->srcPath]; - - if (!dump) { - fprintf(stderr, "%s is not a valid Mach-o file\n", - [options->srcPath fileSystemRepresentation]); - options->result = NO; - return; - } - - if (![dump setArchitecture:options->arch]) { - fprintf(stderr, "Architecture: %s not available in %s\n", - [options->arch UTF8String], - [options->srcPath fileSystemRepresentation]); - options->result = NO; - return; - } - - options->result = [dump writeSymbolFile:@"-"]; -} - -//============================================================================= -static void Usage(int argc, const char *argv[]) { - fprintf(stderr, "Output a Breakpad symbol file from a Mach-o file.\n"); - fprintf(stderr, "Usage: %s [-a ppc|i386|x86] \n", - argv[0]); - fprintf(stderr, "\t-a: Architecture type [default: native]\n"); - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - const NXArchInfo *localArchInfo = NXGetLocalArchInfo(); - char ch; - - if (localArchInfo) { - if (localArchInfo->cputype & CPU_ARCH_ABI64) - options->arch = (localArchInfo->cputype == CPU_TYPE_POWERPC64) ? @"ppc64": - @"x86_64"; - else - options->arch = (localArchInfo->cputype == CPU_TYPE_POWERPC) ? @"ppc" : - @"x86"; - } - - while ((ch = getopt(argc, (char * const *)argv, "a:h?")) != -1) { - switch (ch) { - case 'a': - if (strcmp("ppc", optarg) == 0) - options->arch = @"ppc"; - else if (strcmp("x86", optarg) == 0 || strcmp("i386", optarg) == 0) - options->arch = @"x86"; - else if (strcmp("ppc64", optarg) == 0) - options->arch = @"ppc64"; - else if (strcmp("x86_64", optarg) == 0) - options->arch = @"x86_64"; - else { - fprintf(stderr, "%s: Invalid architecture: %s\n", argv[0], optarg); - Usage(argc, argv); - exit(1); - } - break; - case '?': - case 'h': - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 1) { - fprintf(stderr, "Must specify Mach-o file\n"); - Usage(argc, argv); - exit(1); - } - - options->srcPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - - return !options.result; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.mm b/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.mm deleted file mode 100644 index 827cea41..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/dump_syms/dump_syms_tool.mm +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dump_syms_tool.m: Command line tool that uses the DumpSymbols class. -// TODO(waylonis): accept stdin - -#include -#include - -#include "dump_syms.h" -#include "common/mac/macho_utilities.h" - -typedef struct { - NSString *srcPath; - NSString *arch; - NSString *uuidStr; - BOOL result; -} Options; - -//============================================================================= -static void Start(Options *options) { - DumpSymbols *dump = [[DumpSymbols alloc] - initWithContentsOfFile:options->srcPath]; - - if (!dump) { - fprintf(stderr, "%s is not a valid Mach-o file\n", - [options->srcPath fileSystemRepresentation]); - options->result = NO; - return; - } - - if (![dump setArchitecture:options->arch]) { - fprintf(stderr, "Architecture: %s not available in %s\n", - [options->arch UTF8String], - [options->srcPath fileSystemRepresentation]); - options->result = NO; - return; - } - - options->result = [dump writeSymbolFile:@"-"]; -} - -//============================================================================= -static void Usage(int argc, const char *argv[]) { - fprintf(stderr, "Output a Breakpad symbol file from a Mach-o file.\n"); - fprintf(stderr, "Usage: %s [-a ppc|i386|x86] \n", - argv[0]); - fprintf(stderr, "\t-a: Architecture type [default: native]\n"); - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - const NXArchInfo *localArchInfo = NXGetLocalArchInfo(); - signed char ch; - - if (localArchInfo) { - if (localArchInfo->cputype & CPU_ARCH_ABI64) - options->arch = (localArchInfo->cputype == CPU_TYPE_POWERPC64) ? @"ppc64": - @"x86_64"; - else - options->arch = (localArchInfo->cputype == CPU_TYPE_POWERPC) ? @"ppc" : - @"x86"; - } - - while ((ch = getopt(argc, (char * const *)argv, "a:h?")) != -1) { - switch (ch) { - case 'a': - if (strcmp("ppc", optarg) == 0) - options->arch = @"ppc"; - else if (strcmp("x86", optarg) == 0 || strcmp("i386", optarg) == 0) - options->arch = @"x86"; - else if (strcmp("ppc64", optarg) == 0) - options->arch = @"ppc64"; - else if (strcmp("x86_64", optarg) == 0) - options->arch = @"x86_64"; - else { - fprintf(stderr, "%s: Invalid architecture: %s\n", argv[0], optarg); - Usage(argc, argv); - exit(1); - } - break; - case '?': - case 'h': - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 1) { - fprintf(stderr, "Must specify Mach-o file\n"); - Usage(argc, argv); - exit(1); - } - - options->srcPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - - return !options.result; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/symupload/minidump_upload.m b/thirdparty/google-breakpad/r318/src/tools/mac/symupload/minidump_upload.m deleted file mode 100644 index 4f9d8c7a..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/symupload/minidump_upload.m +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_upload.m: Upload a minidump to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// prod: the product name -// ver: the product version -// symbol_file: the breakpad format symbol file - -#import - -#import - -#import "common/mac/HTTPMultipartUpload.h" - -typedef struct { - NSString *minidumpPath; - NSString *uploadURLStr; - NSString *product; - NSString *version; - BOOL success; -} Options; - -//============================================================================= -static void Start(Options *options) { - NSURL *url = [NSURL URLWithString:options->uploadURLStr]; - HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - - // Add parameters - [parameters setObject:options->product forKey:@"prod"]; - [parameters setObject:options->version forKey:@"ver"]; - [ul setParameters:parameters]; - - // Add file - [ul addFileAtPath:options->minidumpPath name:@"upload_file_minidump"]; - - // Send it - NSError *error = nil; - NSData *data = [ul send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - - NSLog(@"Send: %@", error ? [error description] : @"No Error"); - NSLog(@"Response: %d", [[ul response] statusCode]); - NSLog(@"Result: %d bytes\n%@", [data length], result); - - [result release]; - [ul release]; - options->success = !error; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit minidump information.\n"); - fprintf(stderr, "Usage: %s -p -v " - "\n", argv[0]); - fprintf(stderr, " should be a minidump.\n"); - fprintf(stderr, " is the destination for the upload\n"); - - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "p:v:h?")) != -1) { - switch (ch) { - case 'p': - options->product = [NSString stringWithCString:optarg]; - break; - case 'v': - options->version = [NSString stringWithCString:optarg]; - break; - - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->minidumpPath = [NSString stringWithCString:argv[optind]]; - options->uploadURLStr = [NSString stringWithCString:argv[optind + 1]]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/mac/symupload/symupload.m b/thirdparty/google-breakpad/r318/src/tools/mac/symupload/symupload.m deleted file mode 100644 index d4a30150..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/mac/symupload/symupload.m +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// symupload.m: Upload a symbol file to a HTTP server. The upload is sent as -// a multipart/form-data POST request with the following parameters: -// code_file: the basename of the module, e.g. "app" -// debug_file: the basename of the debugging file, e.g. "app" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// os: the operating system that the module was built for -// cpu: the CPU that the module was built for (x86 or ppc) -// symbol_file: the contents of the breakpad-format symbol file - -#include - -#include -#include "HTTPMultipartUpload.h" - -typedef struct { - NSString *symbolsPath; - NSString *uploadURLStr; - BOOL success; -} Options; - -//============================================================================= -static NSArray *ModuleDataForSymbolFile(NSString *file) { - NSFileHandle *fh = [NSFileHandle fileHandleForReadingAtPath:file]; - NSData *data = [fh readDataOfLength:1024]; - NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - NSScanner *scanner = [NSScanner scannerWithString:str]; - NSString *line; - NSMutableArray *parts = nil; - const int MODULE_ID_INDEX = 3; - - if ([scanner scanUpToString:@"\n" intoString:&line]) { - parts = [[NSMutableArray alloc] init]; - NSScanner *moduleInfoScanner = [NSScanner scannerWithString:line]; - NSString *moduleInfo; - // Get everything BEFORE the module name. None of these properties - // can have spaces. - for (int i = 0; i <= MODULE_ID_INDEX; i++) { - [moduleInfoScanner scanUpToString:@" " intoString:&moduleInfo]; - [parts addObject:moduleInfo]; - } - - // Now get the module name. This can have a space so we scan to - // the end of the line. - [moduleInfoScanner scanUpToString:@"\n" intoString:&moduleInfo]; - [parts addObject:moduleInfo]; - } - - [str release]; - - return parts; -} - -//============================================================================= -static NSString *CompactIdentifier(NSString *uuid) { - NSMutableString *str = [NSMutableString stringWithString:uuid]; - [str replaceOccurrencesOfString:@"-" withString:@"" options:0 - range:NSMakeRange(0, [str length])]; - - return str; -} - -//============================================================================= -static void Start(Options *options) { - NSURL *url = [NSURL URLWithString:options->uploadURLStr]; - HTTPMultipartUpload *ul = [[HTTPMultipartUpload alloc] initWithURL:url]; - NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - NSArray *moduleParts = ModuleDataForSymbolFile(options->symbolsPath); - NSMutableString *compactedID = - [NSMutableString stringWithString:[moduleParts objectAtIndex:3]]; - [compactedID replaceOccurrencesOfString:@"-" withString:@"" options:0 - range:NSMakeRange(0, [compactedID length])]; - - // Add parameters - [parameters setObject:compactedID forKey:@"debug_identifier"]; - - // MODULE - // 0 1 2 3 4 - [parameters setObject:[moduleParts objectAtIndex:1] forKey:@"os"]; - [parameters setObject:[moduleParts objectAtIndex:2] forKey:@"cpu"]; - [parameters setObject:[moduleParts objectAtIndex:4] forKey:@"debug_file"]; - [parameters setObject:[moduleParts objectAtIndex:4] forKey:@"code_file"]; - [ul setParameters:parameters]; - - NSArray *keys = [parameters allKeys]; - int count = [keys count]; - for (int i = 0; i < count; ++i) { - NSString *key = [keys objectAtIndex:i]; - NSString *value = [parameters objectForKey:key]; - fprintf(stdout, "'%s' = '%s'\n", [key UTF8String], - [value UTF8String]); - } - - // Add file - [ul addFileAtPath:options->symbolsPath name:@"symbol_file"]; - - // Send it - NSError *error = nil; - NSData *data = [ul send:&error]; - NSString *result = [[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding]; - - fprintf(stdout, "Send: %s\n", error ? [[error description] UTF8String] : - "No Error"); - fprintf(stdout, "Response: %d\n", [[ul response] statusCode]); - fprintf(stdout, "Result: %d bytes\n%s\n", [data length], [result UTF8String]); - - [result release]; - [ul release]; - options->success = !error; -} - -//============================================================================= -static void -Usage(int argc, const char *argv[]) { - fprintf(stderr, "Submit symbol information.\n"); - fprintf(stderr, "Usage: %s \n", argv[0]); - fprintf(stderr, " should be created by using the dump_syms tool.\n"); - fprintf(stderr, " is the destination for the upload\n"); - fprintf(stderr, "\t-h: Usage\n"); - fprintf(stderr, "\t-?: Usage\n"); -} - -//============================================================================= -static void -SetupOptions(int argc, const char *argv[], Options *options) { - extern int optind; - char ch; - - while ((ch = getopt(argc, (char * const *)argv, "h?")) != -1) { - switch (ch) { - default: - Usage(argc, argv); - exit(0); - break; - } - } - - if ((argc - optind) != 2) { - fprintf(stderr, "%s: Missing symbols file and/or upload-URL\n", argv[0]); - Usage(argc, argv); - exit(1); - } - - options->symbolsPath = [NSString stringWithCString:argv[optind]]; - options->uploadURLStr = [NSString stringWithCString:argv[optind + 1]]; -} - -//============================================================================= -int main (int argc, const char * argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Options options; - - bzero(&options, sizeof(Options)); - SetupOptions(argc, argv, &options); - Start(&options); - - [pool release]; - return options.success ? 0 : 1; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/Makefile b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/Makefile deleted file mode 100644 index f0a4c11a..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Author: Alfred Peng - -CXX=CC -CC=cc - -CXXFLAGS=-g -xs -xdebugformat=stabs -I../../.. -I../../../common/solaris -lelf -ldemangle -D_REENTRANT - -.PHONY:all clean - -BIN=dump_syms - -all:$(BIN) - -DUMP_OBJ=dump_symbols.o guid_creator.o dump_syms.o file_id.o md5.o - -dump_syms:$(DUMP_OBJ) - $(CXX) $(CXXFLAGS) -o $@ $^ - -dump_symbols.o:../../../common/solaris/dump_symbols.cc - $(CXX) $(CXXFLAGS) -c $^ - -guid_creator.o:../../../common/solaris/guid_creator.cc - $(CXX) $(CXXFLAGS) -c $^ - -file_id.o:../../../common/solaris/file_id.cc - $(CXX) $(CXXFLAGS) -c $^ - -md5.o:../../../common/md5.c - $(CC) $(CXXFLAGS) -c $^ - -test:all - ./run_regtest.sh - -clean: - rm -f $(BIN) $(DUMP_OBJ) diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/dump_syms.cc deleted file mode 100644 index 54cea57e..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/dump_syms.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: Alfred Peng - -#include -#include - -#include "common/solaris/dump_symbols.h" - -using namespace google_breakpad; - -int main(int argc, char **argv) { - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - return 1; - } - - const char *binary = argv[1]; - - DumpSymbols dumper; - if (!dumper.WriteSymbolFile(binary, fileno(stdout))) { - fprintf(stderr, "Failed to write symbol file.\n"); - return 1; - } - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/run_regtest.sh b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/run_regtest.sh deleted file mode 100644 index ffb34330..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/run_regtest.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2007, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -./dump_syms testdata/dump_syms_regtest.o > testdata/dump_syms_regtest.new -status=$? - -if [ $status -ne 0 ] ; then - echo "FAIL, dump_syms failed" - exit $status -fi - -diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \ - testdata/dump_syms_regtest.diff -status=$? - -if [ $status -eq 0 ] ; then - rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new - echo "PASS" -else - echo "FAIL, see testdata/dump_syms_regtest.[new|diff]" -fi - -exit $status diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc deleted file mode 100644 index e617a23b..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ./dump_syms dump_syms_regtest.pdb > dump_syms_regtest.sym - -namespace google_breakpad { - -class C { - public: - C() : member_(1) {} - virtual ~C() {} - - void set_member(int value) { member_ = value; } - int member() const { return member_; } - - void f() { member_ = g(); } - virtual int g() { return 2; } - static char* h(const C &that) { return 0; } - - private: - int member_; -}; - -static int i() { - return 3; -} - -} // namespace google_breakpad - -int main(int argc, char **argv) { - google_breakpad::C object; - object.set_member(google_breakpad::i()); - object.f(); - int value = object.g(); - char *nothing = object.h(object); - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs deleted file mode 100644 index c5f93ef7..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.stabs +++ /dev/null @@ -1,129 +0,0 @@ - - -Debugging Stab table -- 104 entries - - 0: .stabs "dump_syms_regtest.cc",N_UNDF,0x0,0x67,0x71c - 1: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/",N_SO,0x0,0x0,0x0 - 2: .stabs "dump_syms_regtest.cc",N_SO,0x0,0x4,0x0 - 3: .stabs "",N_OBJ,0x0,0x0,0x0 - 4: .stabs "",N_OBJ,0x0,0x0,0x0 - 5: .stabs "V=9.0;DBG_GEN=5.0.8;dm;cd;backend;ptf;ptx;ptk;s;g;R=5.8<>;G=.XAB6Z2hOiL$Gl1b.;A=2",N_OPT,0x0,0x0,0x46fcb88e - 6: .stabs "dump_syms_regtest.cc",N_SOL,0x0,0x0,0x0 - 7: .stabs "char:t(0,1)=bsc1;0;8",N_ISYM,0x0,0x0,0x0 - 8: .stabs "short:t(0,2)=bs2;0;16",N_ISYM,0x0,0x0,0x0 - 9: .stabs "int:t(0,3)=bs4;0;32",N_ISYM,0x0,0x0,0x0 - 10: .stabs "long:t(0,4)=bs4;0;32",N_ISYM,0x0,0x0,0x0 - 11: .stabs "long long:t(0,5)=bs8;0;64",N_ISYM,0x0,0x0,0x0 - 12: .stabs "unsigned char:t(0,6)=buc1;0;8",N_ISYM,0x0,0x0,0x0 - 13: .stabs "unsigned short:t(0,7)=bu2;0;16",N_ISYM,0x0,0x0,0x0 - 14: .stabs "unsigned:t(0,8)=bu4;0;32",N_ISYM,0x0,0x0,0x0 - 15: .stabs "unsigned long:t(0,9)=bu4;0;32",N_ISYM,0x0,0x0,0x0 - 16: .stabs "unsigned long long:t(0,10)=bu8;0;64",N_ISYM,0x0,0x0,0x0 - 17: .stabs "signed char:t(0,11)=bsc1;0;8",N_ISYM,0x0,0x0,0x0 - 18: .stabs "wchar_t:t(0,12)=buc4;0;32",N_ISYM,0x0,0x0,0x0 - 19: .stabs "void:t(0,13)=bs0;0;0",N_ISYM,0x0,0x0,0x0 - 20: .stabs "float:t(0,14)=R1;4",N_ISYM,0x0,0x0,0x0 - 21: .stabs "double:t(0,15)=R2;8",N_ISYM,0x0,0x0,0x0 - 22: .stabs "long double:t(0,16)=R6;12",N_ISYM,0x0,0x0,0x0 - 23: .stabs "...:t(0,17)=buv4;0;32",N_ISYM,0x0,0x0,0x0 - 24: .stabs "bool:t(0,18)=bub1;0;8",N_ISYM,0x0,0x0,0x0 - 25: .stabs "__1nPgoogle_breakpad_:T(0,19)=Yn0google_breakpad;",N_ISYM,0x0,0x0,0x0 - 26: .stabs "nBC(0,19):U(0,20)",N_ESYM,0x0,0x0,0x0 - 27: .stabs "nBC(0,19):T(0,20)=Yc8C;;AcHmember_:(0,3),32,32;;Cc2t6M_v K2c2T6M_v CcKset_member6Mi_v CcGmember6kM_i CcBf6M_v K3cBg6M_i GcBh6Frk1_pc;;;2 0;;;;110;",N_ESYM,0x0,0x8,0x0 - 28: .stabs "main:F(0,3);(0,3);(0,21)=*(0,22)=*(0,1)",N_FUN,0x0,0x38,0x0 - 29: .stabs "main",N_MAIN,0x0,0x0,0x0 - 30: .stabs "argc:p(0,3)",N_PSYM,0x0,0x4,0x8 - 31: .stabs "argv:p(0,21)",N_PSYM,0x0,0x4,0xc - 32: .stabn N_LBRAC,0x0,0x1,0x12 - 33: .stabs "object:(0,20)",N_LSYM,0x0,0x8,0xfffffff4 - 34: .stabs "value:(0,3)",N_LSYM,0x0,0x4,0xfffffff0 - 35: .stabs "nothing:(0,22)",N_LSYM,0x0,0x4,0xffffffec - 36: .stabn N_SLINE,0x0,0x39,0x12 - 37: .stabs "object:2",N_CONSTRUCT,0x0,0xc,0x12 - 38: .stabn N_SLINE,0x2,0x3a,0x1e - 39: .stabn N_SLINE,0x0,0x3b,0x36 - 40: .stabn N_SLINE,0x0,0x3c,0x42 - 41: .stabn N_SLINE,0x0,0x3d,0x57 - 42: .stabn N_SLINE,0x0,0x3f,0x6c - 43: .stabs "2:0",N_DESTRUCT,0x0,0xc,0x73 - 44: .stabn N_SLINE,0xfffffffe,0x40,0x9c - 45: .stabn N_RBRAC,0x0,0x1,0x9c - 46: .stabs "__1cPgoogle_breakpadBi6F_i_:f(0,3)",N_FUN,0x0,0x32,0x0 - 47: .stabn N_LBRAC,0x0,0x1,0x6 - 48: .stabn N_SLINE,0x0,0x33,0x6 - 49: .stabn N_SLINE,0x0,0x34,0x10 - 50: .stabn N_RBRAC,0x0,0x1,0x10 - 51: .stabs "__1cPgoogle_breakpadBC2t6M_v_:F(0,13);(0,23)=*(0,20)",N_FUN,0x0,0x24,0x0 - 52: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 53: .stabn N_LBRAC,0x0,0x1,0x3 - 54: .stabn N_SLINE,0x0,0x24,0x25 - 55: .stabn N_RBRAC,0x0,0x1,0x25 - 56: .stabs "__1cPgoogle_breakpadBC2T6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x25,0x0 - 57: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 58: .stabn N_LBRAC,0x0,0x1,0x3 - 59: .stabn N_SLINE,0x0,0x25,0x3 - 60: .stabn N_RBRAC,0x0,0x1,0x3 - 61: .stabs "__1cPgoogle_breakpadBCKset_member6Mi_v_:F(0,13);(0,23);(0,3)",N_FUN,0x0,0x27,0x0 - 62: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 63: .stabs "value:p(0,3)",N_PSYM,0x0,0x4,0xc - 64: .stabn N_LBRAC,0x0,0x1,0x3 - 65: .stabn N_SLINE,0x0,0x27,0x3 - 66: .stabn N_SLINE,0x0,0x27,0xc - 67: .stabn N_RBRAC,0x0,0x1,0xc - 68: .stabs "__1cPgoogle_breakpadBCBf6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x2a,0x0 - 69: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 70: .stabn N_LBRAC,0x0,0x1,0x3 - 71: .stabn N_SLINE,0x0,0x2a,0x3 - 72: .stabn N_SLINE,0x0,0x2a,0x1d - 73: .stabn N_RBRAC,0x0,0x1,0x1d - 74: .stabs "__1cPgoogle_breakpadBCBg6M_i_:F(0,3);(0,23)",N_FUN,0x0,0x2b,0x0 - 75: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 76: .stabn N_LBRAC,0x0,0x1,0x6 - 77: .stabn N_SLINE,0x0,0x2b,0x6 - 78: .stabn N_SLINE,0x0,0x2b,0x10 - 79: .stabn N_RBRAC,0x0,0x1,0x10 - 80: .stabs "__1cPgoogle_breakpadBCBh6Frk1_pc_:F(0,22);(0,24)=&(0,25)=k(0,20)",N_FUN,0x0,0x2c,0x0 - 81: .stabs "that:p(0,24)",N_PSYM,0x0,0x4,0x8 - 82: .stabn N_LBRAC,0x0,0x1,0x6 - 83: .stabn N_SLINE,0x0,0x2c,0x6 - 84: .stabn N_SLINE,0x0,0x2c,0x10 - 85: .stabn N_RBRAC,0x0,0x1,0x10 - 86: .stabs "__1cPgoogle_breakpadBC2T5B6M_v_:F(0,13);(0,23)",N_FUN,0x0,0x25,0x0 - 87: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 88: .stabn N_LBRAC,0x0,0x1,0x3 - 89: .stabn N_SLINE,0x0,0x25,0xf - 90: .stabn N_RBRAC,0x0,0x1,0xf - 91: .stabs "__SLIP.DELETER__A:f(0,13);(0,23);(0,3)",N_FUN,0x0,0x25,0x0 - 92: .stabs "this:p(0,23)",N_PSYM,0x0,0x4,0x8 - 93: .stabs "delete:p(0,3)",N_PSYM,0x0,0x4,0xc - 94: .stabn N_LBRAC,0x0,0x1,0x3 - 95: .stabn N_LBRAC,0x0,0x2,0x3 - 96: .stabn N_RBRAC,0x0,0x2,0x28 - 97: .stabn N_RBRAC,0x0,0x1,0x28 - 98: .stabs "true:l(0,18);1",N_LSYM,0x0,0x4,0x0 - 99: .stabs "false:l(0,18);0",N_LSYM,0x0,0x4,0x0 - 100: .stabs "__1c2k6Fpv_v_:P(0,13);(0,26)=*(0,13)",N_FUN,0x0,0x0,0x0 - 101: .stabs "__1cPgoogle_breakpadBC2t5B6M_v_:F__1cPgoogle_breakpadBC2t6M_v_",N_ALIAS,0x0,0x0,0x0 - 102: .stabs "cbD__RTTI__1nPgoogle_breakpadBC_(0,19):YR(0,20)",N_LSYM,0x0,0x0,0x0 - 103: .stabn N_ENDM,0x0,0x0,0x0 - - -Index Stab table -- 17 entries - - 0: .stabs "dump_syms_regtest.cc",N_UNDF,0x0,0x10,0x3b1 - 1: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/",N_SO,0x0,0x0,0x0 - 2: .stabs "dump_syms_regtest.cc",N_SO,0x0,0x4,0x0 - 3: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata",N_OBJ,0x0,0x0,0x0 - 4: .stabs "dump_syms_regtest.o",N_OBJ,0x0,0x0,0x0 - 5: .stabs "V=9.0;DBG_GEN=5.0.8;dm;cd;backend;ptf;ptx;ptk;s;g;R=5.8<>;G=.XAB6Z2hOiL$Gl1b.;A=2",N_OPT,0x0,0x0,0x46fcb88e - 6: .stabs "/export/home/alfred/cvs/breakpad/google-breakpad20070927/src/tools/solaris/dump_syms/testdata/; /ws/on10-tools-prc/SUNWspro/SS11/prod/bin/CC -g -xs -xdebugformat=stabs -I../../.. -I../../../common/solaris -D_REENTRANT -xs dump_syms_regtest.cc -Qoption ccfe -prefix -Qoption ccfe .XAB6Z2hOiL\$Gl1b.",N_CMDLINE,0x0,0x0,0x0 - 7: .stabs "__1nPgoogle_breakpadBC_:U",N_ESYM,0x0,0x0,0x0 - 8: .stabs "main",N_MAIN,0x0,0x0,0x0 - 9: .stabs "main",N_FUN,0x0,0x0,0x0 - 10: .stabs "__1cPgoogle_breakpadBC2t6M_v_",N_FUN,0x0,0x0,0x0 - 11: .stabs "__1cPgoogle_breakpadBC2T6M_v_",N_FUN,0x0,0x0,0x0 - 12: .stabs "__1cPgoogle_breakpadBCKset_member6Mi_v_",N_FUN,0x0,0x0,0x0 - 13: .stabs "__1cPgoogle_breakpadBCBf6M_v_",N_FUN,0x0,0x0,0x0 - 14: .stabs "__1cPgoogle_breakpadBCBg6M_i_",N_FUN,0x0,0x0,0x0 - 15: .stabs "__1cPgoogle_breakpadBCBh6Frk1_pc_",N_FUN,0x0,0x0,0x0 - 16: .stabs "__1cPgoogle_breakpadBC2T5B6M_v_",N_FUN,0x0,0x0,0x0 diff --git a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym b/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym deleted file mode 100644 index 44d3c539..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym +++ /dev/null @@ -1,33 +0,0 @@ -MODULE solaris x86 3DC8191474338D8587339B5FB3E2C62A0 dump_syms_regtest.o -FILE 0 dump_syms_regtest.cc -FUNC 0 156 0 main -12 18 57 0 -1e 12 58 0 -36 24 59 0 -42 12 60 0 -57 21 61 0 -6c 21 63 0 -9c 48 64 0 -FUNC 0 16 0 int google_breakpad::i() -6 6 51 0 -10 10 52 0 -FUNC 0 37 0 google_breakpad::C::C() -25 37 36 0 -FUNC 0 3 0 google_breakpad::C::~C() -3 3 37 0 -FUNC 0 12 0 void google_breakpad::C::set_member(int) -3 3 39 0 -c 9 39 0 -FUNC 0 29 0 void google_breakpad::C::f() -3 3 42 0 -1d 26 42 0 -FUNC 0 16 0 int google_breakpad::C::g() -6 6 43 0 -10 10 43 0 -FUNC 0 16 0 char*google_breakpad::C::h(const google_breakpad::C&) -6 6 44 0 -10 10 44 0 -FUNC 0 15 0 google_breakpad::C::~C #Nvariant 1() -f 15 37 0 -FUNC 0 0 0 __SLIP.DELETER__A -FUNC 0 0 0 void operator delete(void*) diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.cc b/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.cc deleted file mode 100644 index 2b6278ba..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.cc +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ms_symbol_server_converter.cc: Obtain symbol files from a Microsoft -// symbol server, and convert them to Breakpad's dumped format. -// -// See ms_symbol_server_converter.h for documentation. -// -// Author: Mark Mentovai - -#include -#include - -#include -#include - -#include "tools/windows/converter/ms_symbol_server_converter.h" -#include "common/windows/pdb_source_line_writer.h" -#include "common/windows/string_utils-inl.h" - -// SYMOPT_NO_PROMPTS is not defined in earlier platform SDKs. Define it -// in that case, in the event that this code is used with a newer version -// of DbgHelp at runtime that recognizes the option. The presence of this -// bit in the symbol options should not harm earlier versions of DbgHelp. -#ifndef SYMOPT_NO_PROMPTS -#define SYMOPT_NO_PROMPTS 0x00080000 -#endif // SYMOPT_NO_PROMPTS - -namespace google_breakpad { - -// Use sscanf_s if it is available, to quench the warning about scanf being -// deprecated. Use scanf where sscanf_is not available. Note that the -// parameters passed to sscanf and sscanf_s are only compatible as long as -// fields of type c, C, s, S, and [ are not used. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define SSCANF sscanf_s -#else // _MSC_VER >= 1400 -#define SSCANF sscanf -#endif // _MSC_VER >= 1400 - -bool GUIDOrSignatureIdentifier::InitializeFromString( - const string &identifier) { - type_ = TYPE_NONE; - - size_t length = identifier.length(); - - if (length > 32 && length <= 40) { - // GUID - if (SSCANF(identifier.c_str(), - "%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X%X", - &guid_.Data1, &guid_.Data2, &guid_.Data3, - &guid_.Data4[0], &guid_.Data4[1], - &guid_.Data4[2], &guid_.Data4[3], - &guid_.Data4[4], &guid_.Data4[5], - &guid_.Data4[6], &guid_.Data4[7], - &age_) != 12) { - return false; - } - - type_ = TYPE_GUID; - } else if (length > 8 && length <= 15) { - // Signature - if (SSCANF(identifier.c_str(), "%08X%x", &signature_, &age_) != 2) { - return false; - } - - type_ = TYPE_SIGNATURE; - } else { - return false; - } - - return true; -} - -#undef SSCANF - -MSSymbolServerConverter::MSSymbolServerConverter( - const string &local_cache, const vector &symbol_servers) - : symbol_path_(), - fail_dns_(false), - fail_timeout_(false), - fail_not_found_(false) { - // Setting local_cache can be done without verifying that it exists because - // SymSrv will create it if it is missing - any creation failures will occur - // at that time, so there's nothing to check here, making it safe to - // assign this in the constructor. - - assert(symbol_servers.size() > 0); - - // These are characters that are interpreted as having special meanings in - // symbol_path_. - const char *kInvalidCharacters = "*;"; - assert(local_cache.find_first_of(kInvalidCharacters) == string::npos); - - for (vector::const_iterator symbol_server = symbol_servers.begin(); - symbol_server != symbol_servers.end(); - ++symbol_server) { - // The symbol path format is explained by - // http://msdn.microsoft.com/library/en-us/debug/base/using_symsrv.asp . - // "srv*" is the same as "symsrv*symsrv.dll*", which means that - // symsrv.dll is to be responsible for locating symbols. symsrv.dll - // interprets the rest of the string as a series of symbol stores separated - // by '*'. "srv*local_cache*symbol_server" means to check local_cache - // first for the symbol file, and if it is not found there, to check - // symbol_server. Symbol files found on the symbol server will be placed - // in the local cache, decompressed. - // - // Multiple specifications in this format may be presented, separated by - // semicolons. - - assert((*symbol_server).find_first_of(kInvalidCharacters) == string::npos); - symbol_path_ += "srv*" + local_cache + "*" + *symbol_server + ";"; - } - - // Strip the trailing semicolon. - symbol_path_.erase(symbol_path_.length() - 1); -} - -// A stack-based class that manages SymInitialize and SymCleanup calls. -class AutoSymSrv { - public: - AutoSymSrv() : initialized_(false) {} - - ~AutoSymSrv() { - if (!Cleanup()) { - // Print the error message here, because destructors have no return - // value. - fprintf(stderr, "~AutoSymSrv: SymCleanup: error %d\n", GetLastError()); - } - } - - bool Initialize(HANDLE process, char *path, bool invade_process) { - process_ = process; - initialized_ = SymInitialize(process, path, invade_process) == TRUE; - return initialized_; - } - - bool Cleanup() { - if (initialized_) { - if (SymCleanup(process_)) { - initialized_ = false; - return true; - } - return false; - } - - return true; - } - - private: - HANDLE process_; - bool initialized_; -}; - -// A stack-based class that "owns" a pathname and deletes it when destroyed, -// unless told not to by having its Release() method called. Early deletions -// are supported by calling Delete(). -class AutoDeleter { - public: - AutoDeleter(const string &path) : path_(path) {} - - ~AutoDeleter() { - int error; - if ((error = Delete()) != 0) { - // Print the error message here, because destructors have no return - // value. - fprintf(stderr, "~AutoDeleter: Delete: error %d for %s\n", - error, path_.c_str()); - } - } - - int Delete() { - if (path_.empty()) - return 0; - - int error = remove(path_.c_str()); - Release(); - return error; - } - - void Release() { - path_.clear(); - } - - private: - string path_; -}; - -MSSymbolServerConverter::LocateResult -MSSymbolServerConverter::LocateSymbolFile(const MissingSymbolInfo &missing, - string *symbol_file) { - assert(symbol_file); - symbol_file->clear(); - - GUIDOrSignatureIdentifier identifier; - if (!identifier.InitializeFromString(missing.debug_identifier)) { - fprintf(stderr, - "LocateSymbolFile: Unparseable debug_identifier for %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - HANDLE process = GetCurrentProcess(); // CloseHandle is not needed. - AutoSymSrv symsrv; - if (!symsrv.Initialize(process, - const_cast(symbol_path_.c_str()), - false)) { - fprintf(stderr, "LocateSymbolFile: SymInitialize: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - if (!SymRegisterCallback64(process, SymCallback, - reinterpret_cast(this))) { - fprintf(stderr, - "LocateSymbolFile: SymRegisterCallback64: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - // SYMOPT_DEBUG arranges for SymCallback to be called with additional - // debugging information. This is used to determine the nature of failures. - DWORD options = SymGetOptions() | SYMOPT_DEBUG | SYMOPT_NO_PROMPTS | - SYMOPT_FAIL_CRITICAL_ERRORS | SYMOPT_SECURE; - SymSetOptions(options); - - // SymCallback will set these as needed inisde the SymFindFileInPath call. - fail_dns_ = false; - fail_timeout_ = false; - fail_not_found_ = false; - - // Do the lookup. - char path[MAX_PATH]; - if (!SymFindFileInPath( - process, NULL, - const_cast(missing.debug_file.c_str()), - const_cast(identifier.guid_or_signature_pointer()), - identifier.age(), 0, - identifier.type() == GUIDOrSignatureIdentifier::TYPE_GUID ? - SSRVOPT_GUIDPTR : SSRVOPT_DWORDPTR, - path, SymFindFileInPathCallback, this)) { - DWORD error = GetLastError(); - if (error == ERROR_FILE_NOT_FOUND) { - // This can be returned for a number of reasons. Use the crumbs - // collected by SymCallback to determine which one is relevant. - - // These errors are possibly transient. - if (fail_dns_ || fail_timeout_) { - return LOCATE_RETRY; - } - - // This is an authoritiative file-not-found message. - if (fail_not_found_) { - fprintf(stderr, - "LocateSymbolFile: SymFindFileInPath: LOCATE_NOT_FOUND error " - "for %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_NOT_FOUND; - } - - // If the error is FILE_NOT_FOUND but none of the known error - // conditions are matched, fall through to LOCATE_FAILURE. - } - - fprintf(stderr, - "LocateSymbolFile: SymFindFileInPath: error %d for %s %s %s\n", - error, - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - // The AutoDeleter ensures that the file is only kept when returning - // LOCATE_SUCCESS. - AutoDeleter deleter(path); - - // Do the cleanup here even though it will happen when symsrv goes out of - // scope, to allow it to influence the return value. - if (!symsrv.Cleanup()) { - fprintf(stderr, "LocateSymbolFile: SymCleanup: error %d for %s %s %s\n", - GetLastError(), - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str()); - return LOCATE_FAILURE; - } - - deleter.Release(); - - *symbol_file = path; - return LOCATE_SUCCESS; -} - -// static -BOOL CALLBACK MSSymbolServerConverter::SymCallback(HANDLE process, - ULONG action, - ULONG64 data, - ULONG64 context) { - MSSymbolServerConverter *self = - reinterpret_cast(context); - - switch (action) { - case CBA_EVENT: { - IMAGEHLP_CBA_EVENT *cba_event = - reinterpret_cast(data); - - // Put the string into a string object to be able to use string::find - // for substring matching. This is important because the not-found - // message does not use the entire string but is appended to the URL - // that SymSrv attempted to retrieve. - string desc(cba_event->desc); - - // desc_action maps strings (in desc) to boolean pointers that are to - // be set to true if the string matches. - struct desc_action { - const char *desc; // The substring to match. - bool *action; // On match, this pointer will be set to true. - }; - - static const desc_action desc_actions[] = { - // When a DNS error occurs, it could be indiciative of network - // problems. - { "SYMSRV: The server name or address could not be resolved\n", - &self->fail_dns_ }, - - // This message is produced if no connection is opened. - { "SYMSRV: A connection with the server could not be established\n", - &self->fail_timeout_ }, - - // This message is produced if a connection is established but the - // server fails to respond to the HTTP request. - { "SYMSRV: The operation timed out\n", - &self->fail_timeout_ }, - - // This message is produced when the requested file is not found, - // even if one or more of the above messages are also produced. - // It's trapped to distinguish between not-found and unknown-failure - // conditions. Note that this message will not be produced if a - // connection is established and the server begins to respond to the - // HTTP request but does not finish transmitting the file. - { " not found\n", - &self->fail_not_found_ } - }; - - for (int desc_action_index = 0; - desc_action_index < sizeof(desc_actions) / sizeof(desc_action); - ++desc_action_index) { - if (desc.find(desc_actions[desc_action_index].desc) != string::npos) { - *(desc_actions[desc_action_index].action) = true; - break; - } - } - - break; - } - } - - // This function is a mere fly on the wall. Treat everything as unhandled. - return FALSE; -} - -// static -BOOL CALLBACK MSSymbolServerConverter::SymFindFileInPathCallback( - char *filename, void *context) { - // FALSE ends the search, indicating that the located symbol file is - // satisfactory. - return FALSE; -} - -MSSymbolServerConverter::LocateResult -MSSymbolServerConverter::LocateAndConvertSymbolFile( - const MissingSymbolInfo &missing, - bool keep_symbol_file, - string *converted_symbol_file, - string *symbol_file) { - assert(converted_symbol_file); - converted_symbol_file->clear(); - if (symbol_file) { - symbol_file->clear(); - } - - string pdb_file; - LocateResult result = LocateSymbolFile(missing, &pdb_file); - if (result != LOCATE_SUCCESS) { - return result; - } - - if (symbol_file && keep_symbol_file) { - *symbol_file = pdb_file; - } - - // Conversion may fail because the file is corrupt. If a broken file is - // kept in the local cache, LocateSymbolFile will not hit the network again - // to attempt to locate it. To guard against problems like this, the - // symbol file in the local cache will be removed if conversion fails. - AutoDeleter pdb_deleter(pdb_file); - - // Be sure that it's a .pdb file, since we'll be replacing .pdb with .sym - // for the converted file's name. - string pdb_extension = pdb_file.substr(pdb_file.length() - 4); - // strcasecmp is called _stricmp here. - if (_stricmp(pdb_extension.c_str(), ".pdb") != 0) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "LocateSymbolFile: no .pdb extension for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - // PDBSourceLineWriter wants the filename as a wstring, so convert it. - wstring pdb_file_w; - if (!WindowsStringUtils::safe_mbstowcs(pdb_file, &pdb_file_w)) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "WindowsStringUtils::safe_mbstowcs failed for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - PDBSourceLineWriter writer; - if (!writer.Open(pdb_file_w, PDBSourceLineWriter::PDB_FILE)) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "PDBSourceLineWriter::Open failed for %s %s %s %ws\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file_w.c_str()); - return LOCATE_FAILURE; - } - - *converted_symbol_file = pdb_file.substr(0, pdb_file.length() - 4) + ".sym"; - - FILE *converted_output = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - errno_t err; - if ((err = fopen_s(&converted_output, converted_symbol_file->c_str(), "w")) - != 0) { -#else // _MSC_VER >= 1400 - // fopen_s and errno_t were introduced in MSVC8. Use fopen for earlier - // environments. Don't use fopen with MSVC8 and later, because it's - // deprecated. fopen does not provide reliable error codes, so just use - // -1 in the event of a failure. - int err; - if (!(converted_output = fopen(converted_symbol_file->c_str(), "w"))) { - err = -1; -#endif // _MSC_VER >= 1400 - fprintf(stderr, "LocateAndConvertSymbolFile: " - "fopen_s: error %d for %s %s %s %s\n", - err, - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - converted_symbol_file->c_str()); - return LOCATE_FAILURE; - } - - AutoDeleter sym_deleter(*converted_symbol_file); - - bool success = writer.WriteMap(converted_output); - fclose(converted_output); - - if (!success) { - fprintf(stderr, "LocateAndConvertSymbolFile: " - "PDBSourceLineWriter::WriteMap failed for %s %s %s %s\n", - missing.debug_file.c_str(), - missing.debug_identifier.c_str(), - missing.version.c_str(), - pdb_file.c_str()); - return LOCATE_FAILURE; - } - - if (keep_symbol_file) { - pdb_deleter.Release(); - } - - sym_deleter.Release(); - - return LOCATE_SUCCESS; -} - -} // namespace google_breakpad diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.h b/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.h deleted file mode 100644 index fffb7b8b..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/converter/ms_symbol_server_converter.h +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ms_symbol_server_converter.h: Obtain symbol files from a Microsoft -// symbol server, and convert them to Breakpad's dumped format. -// -// At runtime, MSSymbolServerConverter and code that it calls depend on being -// able to locate suitable versions of dbghelp.dll and symsrv.dll. For best -// results, place these files in the same directory as the executable. -// dbghelp.dll and symsrv.dll as supplied with Debugging Tools for Windows are -// both redistributable, as indicated by the package's redist.txt file. -// -// When connecting to Microsoft's symbol server at -// http://msdl.microsoft.com/download/symbols/, which provides access to -// symbols for the operating system itself, symsrv.dll requires agreement to -// Microsoft's "Terms of Use for Microsoft Symbols and Binaries." Because this -// library places the symbol engine into a promptless mode, the dialog with the -// terms will not appear, and use of Microsoft's symbol server will not be -// possible. To indicate agreement to the terms, create a file called -// symsrv.yes in the same directory as symsrv.dll. (Note that symsrv.dll will -// also recognize a symsrv.no file as indicating that you do not accept the -// terms; the .yes file takes priority over the .no file.) The terms of use -// are contained within symsrv.dll; they were formerly available online at -// http://www.microsoft.com/whdc/devtools/debugging/symsrvTOU2.mspx , but -// do not appear to be available online any longer as of January, 2007. It is -// possible to view the terms from within WinDbg (Debugging Tools for Windows) -// by removing any symsrv.yes and symsrv.no files from WinDbg's directory, -// setting the symbol path to include Microsoft's symbol server (.sympath), and -// attempting to load symbols from their server (.reload). -// -// This code has been tested with dbghelp.dll 6.5.3.7 and symsrv.dll 6.5.3.8, -// included with Microsoft Visual Studio 8 in Common7/IDE. This has also -// been tested with dbghelp.dll and symsrv.dll 6.6.7.5, included with that -// version of Debugging Tools for Windows, available at -// http://www.microsoft.com/whdc/devtools/debugging/ . -// -// Author: Mark Mentovai - - -#ifndef MS_SYMBOL_SERVER_CONVERTER_H__ -#define MS_SYMBOL_SERVER_CONVERTER_H__ - -#include - -#include -#include - -namespace google_breakpad { - -using std::string; -using std::vector; - -// MissingSymbolInfo contains the subset of the information in the processor's -// CodeModule structure relevant to obtaining a missing symbol file. Only -// debug_file and debug_identifier are relevant in actually obtaining the -// missing file; the other fields are for convenience. -struct MissingSymbolInfo { - string code_file; - string code_identifier; - string debug_file; - string debug_identifier; - string version; -}; - -class GUIDOrSignatureIdentifier { - public: - enum GUIDOrSignatureType { - TYPE_NONE = 0, - TYPE_GUID, - TYPE_SIGNATURE - }; - - GUIDOrSignatureIdentifier() : type_(TYPE_NONE) {} - - // Converts |identifier|, a debug_identifier-formatted string, into its - // component fields: either a GUID and age, or signature and age. If - // successful, sets the relevant fields in the object, including the type - // field, and returns true. On error, returns false. - bool InitializeFromString(const string &identifier); - - GUIDOrSignatureType type() const { return type_; } - GUID guid() const { return guid_; } - DWORD signature() const { return signature_; } - int age() const { return age_; } - const void *guid_or_signature_pointer() const { return &guid_; } - - private: - GUIDOrSignatureType type_; - - // An identifier contains either a 128-bit uuid or a 32-bit signature. - union { - GUID guid_; - DWORD signature_; - }; - - // All identifiers used here have age fields, which indicate a specific - // revision given a uuid or signature. - int age_; -}; - -class MSSymbolServerConverter { - public: - enum LocateResult { - LOCATE_FAILURE = 0, - LOCATE_NOT_FOUND, // Authoritative: the file is not present. - LOCATE_RETRY, // Transient (network?) error, try again later. - LOCATE_SUCCESS - }; - - // Create a new object. local_cache is the location (pathname) of a local - // symbol store used to hold downloaded and converted symbol files. This - // directory will be created by LocateSymbolFile when it successfully - // retrieves a symbol file. symbol_servers contains a list of locations (URLs - // or pathnames) of the upstream symbol server stores, given in order of - // preference, with the first string in the vector identifying the first - // store to try. The vector must contain at least one string. None of the - // strings passed to this constructor may contain asterisk ('*') or semicolon - // (';') characters, as the symbol engine uses these characters as separators. - MSSymbolServerConverter(const string &local_cache, - const vector &symbol_servers); - - // Locates the symbol file specified by the identifying information in - // |missing|, by checking the symbol stores identified when the object - // was created. When returning LOCATE_SUCCESS, symbol_file is set to - // the pathname of the decompressed symbol file as it is stored in the - // local cache. - LocateResult LocateSymbolFile(const MissingSymbolInfo &missing, - string *symbol_file); - - // Calls LocateSymbolFile and converts the returned symbol file to the - // dumped-symbol format, storing it adjacent to the symbol file. The - // only conversion supported is from pdb files. Returns the return - // value of LocateSymbolFile, or if LocateSymbolFile succeeds but - // conversion fails, returns LOCATE_FAILURE. The pathname to the - // pdb file and to the converted symbol file are returned in - // converted_symbol_file and symbol_file. symbol_file is optional and - // may be NULL. If only the converted symbol file is desired, set - // keep_symbol_file to false to indicate that the original symbol file - // (pdb) should be deleted after conversion. - LocateResult LocateAndConvertSymbolFile(const MissingSymbolInfo &missing, - bool keep_symbol_file, - string *converted_symbol_file, - string *symbol_file); - - private: - // Called by various SymSrv functions to report status as progress is made - // and to allow the callback to influence processing. Messages sent to this - // callback can be used to distinguish between the various failure modes - // that SymFindFileInPath might encounter. - static BOOL CALLBACK SymCallback(HANDLE process, ULONG action, ULONG64 data, - ULONG64 context); - - // Called by SymFindFileInPath (in LocateSymbolFile) after a candidate - // symbol file is located, when it's present in the local cache. - // SymFindFileInPath actually seems to accept NULL for a callback function - // and behave properly for our needs in that case, but the documentation - // doesn't mention it, so this little callback is provided. - static BOOL CALLBACK SymFindFileInPathCallback(char *filename, - void *context); - - // The search path used by SymSrv, built based on the arguments to the - // constructor. - string symbol_path_; - - // SymCallback will set at least one of these failure variables if - // SymFindFileInPath fails for an expected reason. - bool fail_dns_; // DNS failures (fail_not_found_ will also be set). - bool fail_timeout_; // Timeouts (fail_not_found_ will also be set). - bool fail_not_found_; // The file could not be found. If this is the only - // fail_* member set, then it is authoritative. -}; - -} // namespace google_breakpad - -#endif // MS_SYMBOL_SERVER_CONVERTER_H__ diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/dump_syms.cc b/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/dump_syms.cc deleted file mode 100644 index 3e8827b6..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/dump_syms.cc +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Windows utility to dump the line number data from a pdb file to -// a text-based format that we can use from the minidump processor. - -#include - -#include - -#include "common/windows/pdb_source_line_writer.h" - -using std::wstring; -using google_breakpad::PDBSourceLineWriter; - -int wmain(int argc, wchar_t **argv) { - if (argc < 2) { - fprintf(stderr, "Usage: %ws \n", argv[0]); - return 1; - } - - PDBSourceLineWriter writer; - if (!writer.Open(wstring(argv[1]), PDBSourceLineWriter::ANY_FILE)) { - fprintf(stderr, "Open failed\n"); - return 1; - } - - if (!writer.WriteMap(stdout)) { - fprintf(stderr, "WriteMap failed\n"); - return 1; - } - - writer.Close(); - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/run_regtest.sh b/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/run_regtest.sh deleted file mode 100644 index 1f20f64f..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/run_regtest.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Release/dump_syms.exe testdata/dump_syms_regtest.pdb | \ - tr -d '\015' > \ - testdata/dump_syms_regtest.new -status=$? - -if [ $status -ne 0 ] ; then - echo "FAIL, dump_syms.exe failed" - exit $status -fi - -diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \ - testdata/dump_syms_regtest.diff -status=$? - -if [ $status -eq 0 ] ; then - rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new - echo "PASS" -else - echo "FAIL, see testdata/dump_syms_regtest.[new|diff]" -fi - -exit $status diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc b/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc deleted file mode 100644 index ce53f582..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// cl /Zi dump_syms_regtest.cc -// dump_syms dump_syms_regtest.pdb | tr -d '\015' > dump_syms_regtest.sym - -namespace google_breakpad { - -class C { - public: - C() : member_(1) {} - virtual ~C() {} - - void set_member(int value) { member_ = value; } - int member() const { return member_; } - - void f() { member_ = g(); } - virtual int g() { return 2; } - static char* h(const C &that) { return 0; } - - private: - int member_; -}; - -static int i() { - return 3; -} - -} // namespace google_breakpad - -int main(int argc, char **argv) { - google_breakpad::C object; - object.set_member(google_breakpad::i()); - object.f(); - int value = object.g(); - char *nothing = object.h(object); - - return 0; -} diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym b/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym deleted file mode 100644 index 8e5ce026..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym +++ /dev/null @@ -1,14097 +0,0 @@ -MODULE windows x86 3EB931A9CE0242ABB14FFDF4ECAA97FC1 dump_syms_regtest.pdb -FILE 1 c:\breakpad\trunk\src\tools\windows\dump_syms\testdata\dump_syms_regtest.cc -FILE 2 f:\sp\public\sdk\inc\reason.h -FILE 3 f:\sp\public\sdk\inc\wincon.h -FILE 4 f:\sp\public\sdk\inc\pshpack2.h -FILE 5 f:\sp\public\sdk\inc\mcx.h -FILE 6 f:\sp\public\sdk\inc\winuser.h -FILE 7 f:\sp\public\sdk\inc\winnls.h -FILE 8 f:\sp\public\sdk\inc\guiddef.h -FILE 9 f:\sp\public\sdk\inc\specstrings.h -FILE 10 f:\sp\public\sdk\inc\basetsd.h -FILE 11 f:\sp\public\sdk\inc\stralign.h -FILE 12 f:\sp\public\sdk\inc\tvout.h -FILE 13 f:\sp\public\sdk\inc\winsvc.h -FILE 14 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 15 f:\sp\public\sdk\inc\wingdi.h -FILE 16 f:\sp\public\sdk\inc\pshpack4.h -FILE 17 f:\sp\public\sdk\inc\poppack.h -FILE 18 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 19 f:\sp\public\sdk\inc\winnetwk.h -FILE 20 f:\sp\public\sdk\inc\imm.h -FILE 21 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 22 f:\sp\public\sdk\inc\windef.h -FILE 23 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 24 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\cpu_disp.c -FILE 25 f:\sp\public\sdk\inc\pshpack1.h -FILE 26 f:\sp\public\sdk\inc\winver.h -FILE 27 f:\sp\public\sdk\inc\windows.h -FILE 28 f:\sp\public\sdk\inc\winnt.h -FILE 29 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 30 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 31 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 32 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 33 f:\sp\public\sdk\inc\ddbanned.h -FILE 34 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 35 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 36 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 37 f:\sp\public\sdk\inc\winreg.h -FILE 38 f:\sp\public\sdk\inc\winbase.h -FILE 39 f:\sp\public\sdk\inc\winerror.h -FILE 40 f:\sp\public\sdk\inc\pshpack8.h -FILE 41 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 42 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 43 f:\sp\public\sdk\inc\reason.h -FILE 44 f:\sp\public\sdk\inc\wincon.h -FILE 45 f:\sp\public\sdk\inc\pshpack2.h -FILE 46 f:\sp\public\sdk\inc\mcx.h -FILE 47 f:\sp\public\sdk\inc\winuser.h -FILE 48 f:\sp\public\sdk\inc\winnls.h -FILE 49 f:\sp\public\sdk\inc\guiddef.h -FILE 50 f:\sp\public\sdk\inc\specstrings.h -FILE 51 f:\sp\public\sdk\inc\basetsd.h -FILE 52 f:\sp\public\sdk\inc\stralign.h -FILE 53 f:\sp\public\sdk\inc\tvout.h -FILE 54 f:\sp\public\sdk\inc\winsvc.h -FILE 55 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 56 f:\sp\public\sdk\inc\wingdi.h -FILE 57 f:\sp\public\sdk\inc\pshpack4.h -FILE 58 f:\sp\public\sdk\inc\poppack.h -FILE 59 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 60 f:\sp\public\sdk\inc\winnetwk.h -FILE 61 f:\sp\public\sdk\inc\imm.h -FILE 62 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 63 f:\sp\public\sdk\inc\windef.h -FILE 64 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 65 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\tran\i386\mathfcns.c -FILE 66 f:\sp\public\sdk\inc\pshpack1.h -FILE 67 f:\sp\public\sdk\inc\winver.h -FILE 68 f:\sp\public\sdk\inc\windows.h -FILE 69 f:\sp\public\sdk\inc\winnt.h -FILE 70 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 71 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 72 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 73 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 74 f:\sp\public\sdk\inc\ddbanned.h -FILE 75 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 76 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 77 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 78 f:\sp\public\sdk\inc\winreg.h -FILE 79 f:\sp\public\sdk\inc\winbase.h -FILE 80 f:\sp\public\sdk\inc\winerror.h -FILE 81 f:\sp\public\sdk\inc\pshpack8.h -FILE 82 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 83 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 84 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 85 f:\sp\public\sdk\inc\winreg.h -FILE 86 f:\sp\public\sdk\inc\winbase.h -FILE 87 f:\sp\public\sdk\inc\winerror.h -FILE 88 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 89 f:\sp\public\sdk\inc\windef.h -FILE 90 f:\sp\vctools\crt_bld\self_x86\crt\src\ctime.h -FILE 91 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 92 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 93 f:\sp\public\sdk\inc\pshpack8.h -FILE 94 f:\sp\public\sdk\inc\reason.h -FILE 95 f:\sp\public\sdk\inc\wincon.h -FILE 96 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 97 f:\sp\public\sdk\inc\pshpack2.h -FILE 98 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 99 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 100 f:\sp\public\sdk\inc\mcx.h -FILE 101 f:\sp\public\sdk\inc\winuser.h -FILE 102 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 103 f:\sp\public\sdk\inc\winnls.h -FILE 104 f:\sp\public\sdk\inc\guiddef.h -FILE 105 f:\sp\public\sdk\inc\stralign.h -FILE 106 f:\sp\public\sdk\inc\winnt.h -FILE 107 f:\sp\public\sdk\inc\specstrings.h -FILE 108 f:\sp\public\sdk\inc\basetsd.h -FILE 109 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 110 f:\sp\public\sdk\inc\tvout.h -FILE 111 f:\sp\public\sdk\inc\winsvc.h -FILE 112 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 113 f:\sp\public\sdk\inc\wingdi.h -FILE 114 f:\sp\vctools\crt_bld\self_x86\crt\src\tzset.c -FILE 115 f:\sp\public\sdk\inc\pshpack4.h -FILE 116 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 117 f:\sp\public\sdk\inc\poppack.h -FILE 118 f:\sp\public\sdk\inc\winnetwk.h -FILE 119 f:\sp\public\sdk\inc\imm.h -FILE 120 f:\sp\public\sdk\inc\ddbanned.h -FILE 121 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 122 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 123 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 124 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 125 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 126 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 127 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 128 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 129 f:\sp\public\sdk\inc\windows.h -FILE 130 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 131 f:\sp\public\sdk\inc\pshpack1.h -FILE 132 f:\sp\public\sdk\inc\winver.h -FILE 133 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 134 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 135 f:\sp\public\sdk\inc\winnt.h -FILE 136 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 137 f:\sp\public\sdk\inc\winreg.h -FILE 138 f:\sp\public\sdk\inc\winbase.h -FILE 139 f:\sp\public\sdk\inc\winerror.h -FILE 140 f:\sp\public\sdk\inc\pshpack8.h -FILE 141 f:\sp\public\sdk\inc\reason.h -FILE 142 f:\sp\public\sdk\inc\wincon.h -FILE 143 f:\sp\public\sdk\inc\pshpack2.h -FILE 144 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 145 f:\sp\public\sdk\inc\mcx.h -FILE 146 f:\sp\public\sdk\inc\winuser.h -FILE 147 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 148 f:\sp\public\sdk\inc\winnls.h -FILE 149 f:\sp\public\sdk\inc\guiddef.h -FILE 150 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 151 f:\sp\public\sdk\inc\stralign.h -FILE 152 f:\sp\public\sdk\inc\specstrings.h -FILE 153 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 154 f:\sp\public\sdk\inc\basetsd.h -FILE 155 f:\sp\public\sdk\inc\windows.h -FILE 156 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 157 f:\sp\public\sdk\inc\tvout.h -FILE 158 f:\sp\public\sdk\inc\winsvc.h -FILE 159 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 160 f:\sp\public\sdk\inc\wingdi.h -FILE 161 f:\sp\vctools\crt_bld\self_x86\crt\src\timeset.c -FILE 162 f:\sp\public\sdk\inc\pshpack4.h -FILE 163 f:\sp\public\sdk\inc\poppack.h -FILE 164 f:\sp\public\sdk\inc\winnetwk.h -FILE 165 f:\sp\public\sdk\inc\imm.h -FILE 166 f:\sp\public\sdk\inc\ddbanned.h -FILE 167 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 168 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 169 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 170 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 171 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 172 f:\sp\public\sdk\inc\windef.h -FILE 173 f:\sp\public\sdk\inc\pshpack1.h -FILE 174 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 175 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 176 f:\sp\public\sdk\inc\winver.h -FILE 177 f:\sp\public\sdk\inc\wincon.h -FILE 178 f:\sp\vctools\crt_bld\self_x86\crt\src\time.h -FILE 179 f:\sp\public\sdk\inc\imm.h -FILE 180 f:\sp\public\sdk\inc\winbase.h -FILE 181 f:\sp\public\sdk\inc\wingdi.h -FILE 182 f:\sp\public\sdk\inc\winver.h -FILE 183 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 184 f:\sp\public\sdk\inc\windows.h -FILE 185 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 186 f:\sp\public\sdk\inc\pshpack2.h -FILE 187 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 188 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 189 f:\sp\public\sdk\inc\reason.h -FILE 190 f:\sp\vctools\crt_bld\self_x86\crt\src\strftime.c -FILE 191 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 192 f:\sp\public\sdk\inc\specstrings.h -FILE 193 f:\sp\public\sdk\inc\basetsd.h -FILE 194 f:\sp\public\sdk\inc\pshpack4.h -FILE 195 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 196 f:\sp\public\sdk\inc\winnetwk.h -FILE 197 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 198 f:\sp\public\sdk\inc\stralign.h -FILE 199 f:\sp\vctools\crt_bld\self_x86\crt\src\time.inl -FILE 200 f:\sp\public\sdk\inc\poppack.h -FILE 201 f:\sp\public\sdk\inc\winsvc.h -FILE 202 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 203 f:\sp\public\sdk\inc\windef.h -FILE 204 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 205 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 206 f:\sp\public\sdk\inc\winuser.h -FILE 207 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 208 f:\sp\public\sdk\inc\mcx.h -FILE 209 f:\sp\public\sdk\inc\pshpack8.h -FILE 210 f:\sp\public\sdk\inc\guiddef.h -FILE 211 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 212 f:\sp\public\sdk\inc\winnt.h -FILE 213 f:\sp\public\sdk\inc\winnls.h -FILE 214 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 215 f:\sp\public\sdk\inc\pshpack1.h -FILE 216 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 217 f:\sp\public\sdk\inc\winerror.h -FILE 218 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 219 f:\sp\public\sdk\inc\winreg.h -FILE 220 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 221 f:\sp\public\sdk\inc\ddbanned.h -FILE 222 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 223 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 224 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 225 f:\sp\public\sdk\inc\tvout.h -FILE 226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 227 f:\sp\public\sdk\inc\poppack.h -FILE 228 f:\sp\public\sdk\inc\winnetwk.h -FILE 229 f:\sp\public\sdk\inc\imm.h -FILE 230 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 231 f:\sp\public\sdk\inc\windef.h -FILE 232 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 233 f:\sp\public\sdk\inc\pshpack1.h -FILE 234 f:\sp\public\sdk\inc\winver.h -FILE 235 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 236 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 237 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 238 f:\sp\public\sdk\inc\winnt.h -FILE 239 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 240 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 241 f:\sp\public\sdk\inc\winreg.h -FILE 242 f:\sp\vctools\crt_bld\self_x86\crt\src\days.c -FILE 243 f:\sp\public\sdk\inc\winbase.h -FILE 244 f:\sp\public\sdk\inc\winerror.h -FILE 245 f:\sp\public\sdk\inc\pshpack8.h -FILE 246 f:\sp\public\sdk\inc\reason.h -FILE 247 f:\sp\public\sdk\inc\wincon.h -FILE 248 f:\sp\public\sdk\inc\ddbanned.h -FILE 249 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 250 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 251 f:\sp\public\sdk\inc\pshpack2.h -FILE 252 f:\sp\public\sdk\inc\mcx.h -FILE 253 f:\sp\public\sdk\inc\winuser.h -FILE 254 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 255 f:\sp\public\sdk\inc\winnls.h -FILE 256 f:\sp\public\sdk\inc\guiddef.h -FILE 257 f:\sp\public\sdk\inc\windows.h -FILE 258 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 259 f:\sp\public\sdk\inc\specstrings.h -FILE 260 f:\sp\public\sdk\inc\basetsd.h -FILE 261 f:\sp\public\sdk\inc\stralign.h -FILE 262 f:\sp\public\sdk\inc\tvout.h -FILE 263 f:\sp\public\sdk\inc\winsvc.h -FILE 264 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 265 f:\sp\public\sdk\inc\wingdi.h -FILE 266 f:\sp\public\sdk\inc\pshpack4.h -FILE 267 f:\sp\public\sdk\inc\wincon.h -FILE 268 f:\sp\public\sdk\inc\imm.h -FILE 269 f:\sp\public\sdk\inc\winbase.h -FILE 270 f:\sp\public\sdk\inc\wingdi.h -FILE 271 f:\sp\public\sdk\inc\winver.h -FILE 272 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 273 f:\sp\public\sdk\inc\windows.h -FILE 274 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 275 f:\sp\public\sdk\inc\pshpack2.h -FILE 276 f:\sp\public\sdk\inc\reason.h -FILE 277 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicol.c -FILE 278 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 279 f:\sp\public\sdk\inc\specstrings.h -FILE 280 f:\sp\public\sdk\inc\basetsd.h -FILE 281 f:\sp\public\sdk\inc\pshpack4.h -FILE 282 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 283 f:\sp\public\sdk\inc\winnetwk.h -FILE 284 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 285 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 286 f:\sp\public\sdk\inc\stralign.h -FILE 287 f:\sp\public\sdk\inc\poppack.h -FILE 288 f:\sp\public\sdk\inc\winsvc.h -FILE 289 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 290 f:\sp\public\sdk\inc\windef.h -FILE 291 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 292 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 293 f:\sp\public\sdk\inc\winuser.h -FILE 294 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 295 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 296 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 297 f:\sp\public\sdk\inc\mcx.h -FILE 298 f:\sp\public\sdk\inc\pshpack8.h -FILE 299 f:\sp\public\sdk\inc\guiddef.h -FILE 300 f:\sp\public\sdk\inc\winnt.h -FILE 301 f:\sp\public\sdk\inc\winnls.h -FILE 302 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 303 f:\sp\public\sdk\inc\pshpack1.h -FILE 304 f:\sp\public\sdk\inc\winerror.h -FILE 305 f:\sp\public\sdk\inc\winreg.h -FILE 306 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 307 f:\sp\public\sdk\inc\ddbanned.h -FILE 308 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 309 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 310 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 311 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 312 f:\sp\public\sdk\inc\tvout.h -FILE 313 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 314 f:\sp\public\sdk\inc\mcx.h -FILE 315 f:\sp\public\sdk\inc\pshpack8.h -FILE 316 f:\sp\public\sdk\inc\winnt.h -FILE 317 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 318 f:\sp\public\sdk\inc\specstrings.h -FILE 319 f:\sp\public\sdk\inc\basetsd.h -FILE 320 f:\sp\public\sdk\inc\winnls.h -FILE 321 f:\sp\public\sdk\inc\pshpack1.h -FILE 322 f:\sp\public\sdk\inc\winerror.h -FILE 323 f:\sp\public\sdk\inc\winreg.h -FILE 324 f:\sp\vctools\crt_bld\self_x86\crt\src\strnicmp.c -FILE 325 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 326 f:\sp\public\sdk\inc\tvout.h -FILE 327 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 328 f:\sp\public\sdk\inc\wincon.h -FILE 329 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 330 f:\sp\public\sdk\inc\imm.h -FILE 331 f:\sp\public\sdk\inc\guiddef.h -FILE 332 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 333 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 334 f:\sp\public\sdk\inc\winbase.h -FILE 335 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 336 f:\sp\public\sdk\inc\wingdi.h -FILE 337 f:\sp\public\sdk\inc\windows.h -FILE 338 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 339 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 340 f:\sp\public\sdk\inc\winver.h -FILE 341 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 342 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 343 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 344 f:\sp\public\sdk\inc\pshpack2.h -FILE 345 f:\sp\public\sdk\inc\reason.h -FILE 346 f:\sp\public\sdk\inc\pshpack4.h -FILE 347 f:\sp\public\sdk\inc\winnetwk.h -FILE 348 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 349 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 350 f:\sp\public\sdk\inc\stralign.h -FILE 351 f:\sp\public\sdk\inc\windef.h -FILE 352 f:\sp\public\sdk\inc\poppack.h -FILE 353 f:\sp\public\sdk\inc\winsvc.h -FILE 354 f:\sp\public\sdk\inc\ddbanned.h -FILE 355 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 356 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 357 f:\sp\public\sdk\inc\winuser.h -FILE 358 f:\sp\public\sdk\inc\mcx.h -FILE 359 f:\sp\public\sdk\inc\pshpack8.h -FILE 360 f:\sp\public\sdk\inc\winnt.h -FILE 361 f:\sp\public\sdk\inc\specstrings.h -FILE 362 f:\sp\public\sdk\inc\basetsd.h -FILE 363 f:\sp\public\sdk\inc\winnls.h -FILE 364 f:\sp\public\sdk\inc\pshpack1.h -FILE 365 f:\sp\public\sdk\inc\winerror.h -FILE 366 f:\sp\public\sdk\inc\winreg.h -FILE 367 f:\sp\vctools\crt_bld\self_x86\crt\src\stricmp.c -FILE 368 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 369 f:\sp\public\sdk\inc\tvout.h -FILE 370 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 371 f:\sp\public\sdk\inc\wincon.h -FILE 372 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 373 f:\sp\public\sdk\inc\imm.h -FILE 374 f:\sp\public\sdk\inc\guiddef.h -FILE 375 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 376 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 377 f:\sp\public\sdk\inc\winbase.h -FILE 378 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 379 f:\sp\public\sdk\inc\wingdi.h -FILE 380 f:\sp\public\sdk\inc\windows.h -FILE 381 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 382 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 383 f:\sp\public\sdk\inc\winver.h -FILE 384 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 385 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 386 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 387 f:\sp\public\sdk\inc\pshpack2.h -FILE 388 f:\sp\public\sdk\inc\reason.h -FILE 389 f:\sp\public\sdk\inc\pshpack4.h -FILE 390 f:\sp\public\sdk\inc\winnetwk.h -FILE 391 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 392 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 393 f:\sp\public\sdk\inc\stralign.h -FILE 394 f:\sp\public\sdk\inc\windef.h -FILE 395 f:\sp\public\sdk\inc\poppack.h -FILE 396 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 397 f:\sp\public\sdk\inc\winsvc.h -FILE 398 f:\sp\public\sdk\inc\ddbanned.h -FILE 399 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 400 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 401 f:\sp\public\sdk\inc\winuser.h -FILE 402 f:\sp\public\sdk\inc\winnt.h -FILE 403 f:\sp\public\sdk\inc\pshpack4.h -FILE 404 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 405 f:\sp\public\sdk\inc\poppack.h -FILE 406 f:\sp\vctools\crt_bld\self_x86\crt\src\tcsncpy_s.inl -FILE 407 f:\sp\public\sdk\inc\winnetwk.h -FILE 408 f:\sp\public\sdk\inc\imm.h -FILE 409 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 410 f:\sp\public\sdk\inc\pshpack1.h -FILE 411 f:\sp\public\sdk\inc\winver.h -FILE 412 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 413 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 414 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 415 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 416 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 417 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 418 f:\sp\public\sdk\inc\guiddef.h -FILE 419 f:\sp\public\sdk\inc\windows.h -FILE 420 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 421 f:\sp\public\sdk\inc\specstrings.h -FILE 422 f:\sp\public\sdk\inc\basetsd.h -FILE 423 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 424 f:\sp\public\sdk\inc\winreg.h -FILE 425 f:\sp\vctools\crt_bld\self_x86\crt\src\strncpy_s.c -FILE 426 f:\sp\public\sdk\inc\winbase.h -FILE 427 f:\sp\public\sdk\inc\winerror.h -FILE 428 f:\sp\public\sdk\inc\pshpack8.h -FILE 429 f:\sp\public\sdk\inc\reason.h -FILE 430 f:\sp\public\sdk\inc\wincon.h -FILE 431 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 432 f:\sp\public\sdk\inc\ddbanned.h -FILE 433 f:\sp\public\sdk\inc\windef.h -FILE 434 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 435 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 436 f:\sp\public\sdk\inc\pshpack2.h -FILE 437 f:\sp\public\sdk\inc\mcx.h -FILE 438 f:\sp\public\sdk\inc\winuser.h -FILE 439 f:\sp\public\sdk\inc\winnls.h -FILE 440 f:\sp\public\sdk\inc\stralign.h -FILE 441 f:\sp\public\sdk\inc\tvout.h -FILE 442 f:\sp\public\sdk\inc\winsvc.h -FILE 443 f:\sp\public\sdk\inc\wingdi.h -FILE 444 f:\sp\public\sdk\inc\winnt.h -FILE 445 f:\sp\public\sdk\inc\pshpack4.h -FILE 446 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 447 f:\sp\public\sdk\inc\poppack.h -FILE 448 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscpy_s.inl -FILE 449 f:\sp\public\sdk\inc\winnetwk.h -FILE 450 f:\sp\public\sdk\inc\imm.h -FILE 451 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 452 f:\sp\public\sdk\inc\pshpack1.h -FILE 453 f:\sp\public\sdk\inc\winver.h -FILE 454 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 455 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 456 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 457 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 458 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 459 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 460 f:\sp\public\sdk\inc\guiddef.h -FILE 461 f:\sp\public\sdk\inc\windows.h -FILE 462 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 463 f:\sp\public\sdk\inc\specstrings.h -FILE 464 f:\sp\public\sdk\inc\basetsd.h -FILE 465 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 466 f:\sp\public\sdk\inc\winreg.h -FILE 467 f:\sp\vctools\crt_bld\self_x86\crt\src\strcpy_s.c -FILE 468 f:\sp\public\sdk\inc\winbase.h -FILE 469 f:\sp\public\sdk\inc\winerror.h -FILE 470 f:\sp\public\sdk\inc\pshpack8.h -FILE 471 f:\sp\public\sdk\inc\reason.h -FILE 472 f:\sp\public\sdk\inc\wincon.h -FILE 473 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 474 f:\sp\public\sdk\inc\ddbanned.h -FILE 475 f:\sp\public\sdk\inc\windef.h -FILE 476 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 477 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 478 f:\sp\public\sdk\inc\pshpack2.h -FILE 479 f:\sp\public\sdk\inc\mcx.h -FILE 480 f:\sp\public\sdk\inc\winuser.h -FILE 481 f:\sp\public\sdk\inc\winnls.h -FILE 482 f:\sp\public\sdk\inc\stralign.h -FILE 483 f:\sp\public\sdk\inc\tvout.h -FILE 484 f:\sp\public\sdk\inc\winsvc.h -FILE 485 f:\sp\public\sdk\inc\wingdi.h -FILE 486 f:\sp\public\sdk\inc\winnt.h -FILE 487 f:\sp\public\sdk\inc\pshpack4.h -FILE 488 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 489 f:\sp\public\sdk\inc\poppack.h -FILE 490 f:\sp\vctools\crt_bld\self_x86\crt\src\tcscat_s.inl -FILE 491 f:\sp\public\sdk\inc\winnetwk.h -FILE 492 f:\sp\public\sdk\inc\imm.h -FILE 493 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 494 f:\sp\public\sdk\inc\pshpack1.h -FILE 495 f:\sp\public\sdk\inc\winver.h -FILE 496 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 497 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 498 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 499 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 500 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 501 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 502 f:\sp\public\sdk\inc\guiddef.h -FILE 503 f:\sp\public\sdk\inc\windows.h -FILE 504 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 505 f:\sp\public\sdk\inc\specstrings.h -FILE 506 f:\sp\public\sdk\inc\basetsd.h -FILE 507 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 508 f:\sp\public\sdk\inc\winreg.h -FILE 509 f:\sp\vctools\crt_bld\self_x86\crt\src\strcat_s.c -FILE 510 f:\sp\public\sdk\inc\winbase.h -FILE 511 f:\sp\public\sdk\inc\winerror.h -FILE 512 f:\sp\public\sdk\inc\pshpack8.h -FILE 513 f:\sp\public\sdk\inc\reason.h -FILE 514 f:\sp\public\sdk\inc\wincon.h -FILE 515 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 516 f:\sp\public\sdk\inc\ddbanned.h -FILE 517 f:\sp\public\sdk\inc\windef.h -FILE 518 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 519 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 520 f:\sp\public\sdk\inc\pshpack2.h -FILE 521 f:\sp\public\sdk\inc\mcx.h -FILE 522 f:\sp\public\sdk\inc\winuser.h -FILE 523 f:\sp\public\sdk\inc\winnls.h -FILE 524 f:\sp\public\sdk\inc\stralign.h -FILE 525 f:\sp\public\sdk\inc\tvout.h -FILE 526 f:\sp\public\sdk\inc\winsvc.h -FILE 527 f:\sp\public\sdk\inc\wingdi.h -FILE 528 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 529 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 530 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 531 f:\sp\vctools\crt_bld\self_x86\crt\src\strlen_s.c -FILE 532 f:\sp\public\sdk\inc\ddbanned.h -FILE 533 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 534 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 535 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strpbrk.asm -FILE 536 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 537 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 538 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\_strnicm.asm -FILE 539 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 540 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 541 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 542 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 543 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\strncmp.c -FILE 544 f:\sp\public\sdk\inc\ddbanned.h -FILE 545 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 546 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 547 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strlen.asm -FILE 548 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 549 f:\sp\public\sdk\inc\pshpack2.h -FILE 550 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 551 f:\sp\public\sdk\inc\mcx.h -FILE 552 f:\sp\public\sdk\inc\winuser.h -FILE 553 f:\sp\public\sdk\inc\winnls.h -FILE 554 f:\sp\public\sdk\inc\stralign.h -FILE 555 f:\sp\public\sdk\inc\tvout.h -FILE 556 f:\sp\public\sdk\inc\winsvc.h -FILE 557 f:\sp\public\sdk\inc\wingdi.h -FILE 558 f:\sp\public\sdk\inc\winnt.h -FILE 559 f:\sp\public\sdk\inc\pshpack4.h -FILE 560 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 561 f:\sp\public\sdk\inc\poppack.h -FILE 562 f:\sp\public\sdk\inc\winnetwk.h -FILE 563 f:\sp\public\sdk\inc\imm.h -FILE 564 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 565 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 566 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 567 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 568 f:\sp\vctools\crt_bld\self_x86\crt\src\strdup.c -FILE 569 f:\sp\public\sdk\inc\pshpack1.h -FILE 570 f:\sp\public\sdk\inc\winver.h -FILE 571 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 572 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 573 f:\sp\public\sdk\inc\guiddef.h -FILE 574 f:\sp\public\sdk\inc\windows.h -FILE 575 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 576 f:\sp\public\sdk\inc\specstrings.h -FILE 577 f:\sp\public\sdk\inc\basetsd.h -FILE 578 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 579 f:\sp\public\sdk\inc\winreg.h -FILE 580 f:\sp\public\sdk\inc\ddbanned.h -FILE 581 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 582 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 583 f:\sp\public\sdk\inc\winbase.h -FILE 584 f:\sp\public\sdk\inc\winerror.h -FILE 585 f:\sp\public\sdk\inc\pshpack8.h -FILE 586 f:\sp\public\sdk\inc\reason.h -FILE 587 f:\sp\public\sdk\inc\wincon.h -FILE 588 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 589 f:\sp\public\sdk\inc\windef.h -FILE 590 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcspn.asm -FILE 591 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\STRSPN.ASM -FILE 592 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 593 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strcmp.asm -FILE 594 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 595 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\strchr.asm -FILE 596 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 597 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memset.c -FILE 598 f:\sp\public\sdk\inc\ddbanned.h -FILE 599 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 600 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 601 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memset.asm -FILE 602 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 603 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memmove.asm -FILE 604 F:\SP\vctools\crt_bld\SELF_X86\crt\src\Intel\MEMCPY.ASM -FILE 605 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 606 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\memcmp.c -FILE 607 f:\sp\public\sdk\inc\ddbanned.h -FILE 608 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 609 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 610 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\string\i386\p4_memcpy.c -FILE 611 f:\sp\public\sdk\inc\ddbanned.h -FILE 612 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 613 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 614 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\memcpy.asm -FILE 615 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 616 f:\sp\public\sdk\inc\pshpack2.h -FILE 617 f:\sp\public\sdk\inc\winreg.h -FILE 618 f:\sp\public\sdk\inc\guiddef.h -FILE 619 f:\sp\public\sdk\inc\windows.h -FILE 620 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 621 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 622 f:\sp\public\sdk\inc\specstrings.h -FILE 623 f:\sp\public\sdk\inc\basetsd.h -FILE 624 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 625 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 626 f:\sp\public\sdk\inc\pshpack4.h -FILE 627 f:\sp\public\sdk\inc\reason.h -FILE 628 f:\sp\public\sdk\inc\wincon.h -FILE 629 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 630 f:\sp\public\sdk\inc\poppack.h -FILE 631 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 632 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 633 f:\sp\public\sdk\inc\mcx.h -FILE 634 f:\sp\public\sdk\inc\winuser.h -FILE 635 f:\sp\public\sdk\inc\winnls.h -FILE 636 f:\sp\public\sdk\inc\stralign.h -FILE 637 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 638 f:\sp\public\sdk\inc\windef.h -FILE 639 f:\sp\public\sdk\inc\tvout.h -FILE 640 f:\sp\public\sdk\inc\winsvc.h -FILE 641 f:\sp\vctools\crt_bld\self_x86\crt\src\tidtable.c -FILE 642 f:\sp\public\sdk\inc\wingdi.h -FILE 643 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 644 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 645 f:\sp\public\sdk\inc\winnt.h -FILE 646 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 647 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 648 f:\sp\public\sdk\inc\winnetwk.h -FILE 649 f:\sp\public\sdk\inc\imm.h -FILE 650 f:\sp\public\sdk\inc\ddbanned.h -FILE 651 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 652 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 653 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 654 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 655 f:\sp\public\sdk\inc\winbase.h -FILE 656 f:\sp\public\sdk\inc\winerror.h -FILE 657 f:\sp\public\sdk\inc\pshpack1.h -FILE 658 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 659 f:\sp\vctools\crt_bld\self_x86\crt\src\memory.h -FILE 660 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 661 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 662 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 663 f:\sp\public\sdk\inc\pshpack8.h -FILE 664 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 665 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 666 f:\sp\public\sdk\inc\winver.h -FILE 667 f:\sp\public\sdk\inc\pshpack4.h -FILE 668 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 669 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 670 f:\sp\public\sdk\inc\poppack.h -FILE 671 f:\sp\public\sdk\inc\winnt.h -FILE 672 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 673 f:\sp\public\sdk\inc\winnetwk.h -FILE 674 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 675 f:\sp\public\sdk\inc\imm.h -FILE 676 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 677 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 678 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 679 f:\sp\public\sdk\inc\pshpack1.h -FILE 680 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 681 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 682 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 683 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 684 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 685 f:\sp\public\sdk\inc\winver.h -FILE 686 f:\sp\public\sdk\inc\guiddef.h -FILE 687 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 688 f:\sp\public\sdk\inc\specstrings.h -FILE 689 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 690 f:\sp\public\sdk\inc\basetsd.h -FILE 691 f:\sp\public\sdk\inc\windows.h -FILE 692 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 693 f:\sp\public\sdk\inc\winreg.h -FILE 694 f:\sp\vctools\crt_bld\self_x86\crt\src\stdenvp.c -FILE 695 f:\sp\public\sdk\inc\winbase.h -FILE 696 f:\sp\public\sdk\inc\winerror.h -FILE 697 f:\sp\public\sdk\inc\pshpack8.h -FILE 698 f:\sp\public\sdk\inc\reason.h -FILE 699 f:\sp\public\sdk\inc\ddbanned.h -FILE 700 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 701 f:\sp\public\sdk\inc\wincon.h -FILE 702 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 703 f:\sp\public\sdk\inc\pshpack2.h -FILE 704 f:\sp\public\sdk\inc\mcx.h -FILE 705 f:\sp\public\sdk\inc\winuser.h -FILE 706 f:\sp\public\sdk\inc\winnls.h -FILE 707 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 708 f:\sp\public\sdk\inc\windef.h -FILE 709 f:\sp\public\sdk\inc\stralign.h -FILE 710 f:\sp\public\sdk\inc\tvout.h -FILE 711 f:\sp\public\sdk\inc\winsvc.h -FILE 712 f:\sp\public\sdk\inc\wingdi.h -FILE 713 f:\sp\public\sdk\inc\poppack.h -FILE 714 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 715 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 716 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 717 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 718 f:\sp\public\sdk\inc\winnetwk.h -FILE 719 f:\sp\public\sdk\inc\imm.h -FILE 720 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 721 f:\sp\public\sdk\inc\windef.h -FILE 722 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 723 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 724 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 725 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 726 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 727 f:\sp\public\sdk\inc\pshpack1.h -FILE 728 f:\sp\public\sdk\inc\winver.h -FILE 729 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 730 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 731 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 732 f:\sp\public\sdk\inc\winnt.h -FILE 733 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 734 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 735 f:\sp\public\sdk\inc\winreg.h -FILE 736 f:\sp\vctools\crt_bld\self_x86\crt\src\stdargv.c -FILE 737 f:\sp\public\sdk\inc\winbase.h -FILE 738 f:\sp\public\sdk\inc\winerror.h -FILE 739 f:\sp\public\sdk\inc\pshpack8.h -FILE 740 f:\sp\public\sdk\inc\reason.h -FILE 741 f:\sp\public\sdk\inc\wincon.h -FILE 742 f:\sp\public\sdk\inc\ddbanned.h -FILE 743 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 744 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 745 f:\sp\public\sdk\inc\pshpack2.h -FILE 746 f:\sp\public\sdk\inc\mcx.h -FILE 747 f:\sp\public\sdk\inc\winuser.h -FILE 748 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 749 f:\sp\public\sdk\inc\winnls.h -FILE 750 f:\sp\public\sdk\inc\guiddef.h -FILE 751 f:\sp\public\sdk\inc\windows.h -FILE 752 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 753 f:\sp\public\sdk\inc\specstrings.h -FILE 754 f:\sp\public\sdk\inc\basetsd.h -FILE 755 f:\sp\public\sdk\inc\stralign.h -FILE 756 f:\sp\public\sdk\inc\tvout.h -FILE 757 f:\sp\public\sdk\inc\winsvc.h -FILE 758 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 759 f:\sp\public\sdk\inc\wingdi.h -FILE 760 f:\sp\public\sdk\inc\pshpack4.h -FILE 761 f:\sp\public\sdk\inc\reason.h -FILE 762 f:\sp\public\sdk\inc\wincon.h -FILE 763 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 764 f:\sp\public\sdk\inc\poppack.h -FILE 765 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 766 f:\sp\public\sdk\inc\mcx.h -FILE 767 f:\sp\public\sdk\inc\winuser.h -FILE 768 f:\sp\public\sdk\inc\winnls.h -FILE 769 f:\sp\public\sdk\inc\stralign.h -FILE 770 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 771 f:\sp\public\sdk\inc\windef.h -FILE 772 f:\sp\public\sdk\inc\tvout.h -FILE 773 f:\sp\public\sdk\inc\winsvc.h -FILE 774 f:\sp\public\sdk\inc\wingdi.h -FILE 775 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 776 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 777 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 778 f:\sp\public\sdk\inc\winnt.h -FILE 779 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 780 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 781 f:\sp\public\sdk\inc\winnetwk.h -FILE 782 f:\sp\public\sdk\inc\imm.h -FILE 783 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 784 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 785 f:\sp\vctools\crt_bld\self_x86\crt\src\mlock.c -FILE 786 f:\sp\public\sdk\inc\winbase.h -FILE 787 f:\sp\public\sdk\inc\winerror.h -FILE 788 f:\sp\public\sdk\inc\pshpack1.h -FILE 789 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 790 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 791 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 792 f:\sp\public\sdk\inc\pshpack8.h -FILE 793 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 794 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 795 f:\sp\public\sdk\inc\winver.h -FILE 796 f:\sp\public\sdk\inc\ddbanned.h -FILE 797 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 798 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 799 f:\sp\public\sdk\inc\pshpack2.h -FILE 800 f:\sp\public\sdk\inc\winreg.h -FILE 801 f:\sp\public\sdk\inc\guiddef.h -FILE 802 f:\sp\public\sdk\inc\windows.h -FILE 803 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 804 f:\sp\public\sdk\inc\specstrings.h -FILE 805 f:\sp\public\sdk\inc\basetsd.h -FILE 806 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 807 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 808 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 809 f:\sp\public\sdk\inc\pshpack4.h -FILE 810 f:\sp\public\sdk\inc\poppack.h -FILE 811 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 812 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 813 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 814 f:\sp\public\sdk\inc\winnetwk.h -FILE 815 f:\sp\public\sdk\inc\imm.h -FILE 816 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 817 f:\sp\public\sdk\inc\windef.h -FILE 818 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 819 f:\sp\public\sdk\inc\pshpack1.h -FILE 820 f:\sp\public\sdk\inc\winver.h -FILE 821 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 822 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 823 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 824 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 825 f:\sp\public\sdk\inc\winnt.h -FILE 826 f:\sp\vctools\crt_bld\self_x86\crt\src\cmsgs.h -FILE 827 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 828 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 829 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 830 f:\sp\public\sdk\inc\winreg.h -FILE 831 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 832 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0msg.c -FILE 833 f:\sp\public\sdk\inc\winbase.h -FILE 834 f:\sp\public\sdk\inc\winerror.h -FILE 835 f:\sp\public\sdk\inc\pshpack8.h -FILE 836 f:\sp\public\sdk\inc\reason.h -FILE 837 f:\sp\public\sdk\inc\wincon.h -FILE 838 f:\sp\public\sdk\inc\ddbanned.h -FILE 839 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 840 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 841 f:\sp\public\sdk\inc\pshpack2.h -FILE 842 f:\sp\public\sdk\inc\mcx.h -FILE 843 f:\sp\public\sdk\inc\winuser.h -FILE 844 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 845 f:\sp\public\sdk\inc\winnls.h -FILE 846 f:\sp\public\sdk\inc\guiddef.h -FILE 847 f:\sp\public\sdk\inc\windows.h -FILE 848 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 849 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 850 f:\sp\public\sdk\inc\specstrings.h -FILE 851 f:\sp\public\sdk\inc\basetsd.h -FILE 852 f:\sp\public\sdk\inc\stralign.h -FILE 853 f:\sp\public\sdk\inc\tvout.h -FILE 854 f:\sp\public\sdk\inc\winsvc.h -FILE 855 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 856 f:\sp\public\sdk\inc\wingdi.h -FILE 857 f:\sp\public\sdk\inc\pshpack4.h -FILE 858 f:\sp\public\sdk\inc\pshpack1.h -FILE 859 f:\sp\public\sdk\inc\winver.h -FILE 860 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 861 f:\sp\public\sdk\inc\winnt.h -FILE 862 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 863 f:\sp\public\sdk\inc\winreg.h -FILE 864 f:\sp\public\sdk\inc\winbase.h -FILE 865 f:\sp\public\sdk\inc\winerror.h -FILE 866 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 867 f:\sp\public\sdk\inc\pshpack8.h -FILE 868 f:\sp\public\sdk\inc\reason.h -FILE 869 f:\sp\public\sdk\inc\wincon.h -FILE 870 f:\sp\public\sdk\inc\pshpack2.h -FILE 871 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0init.c -FILE 872 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 873 f:\sp\public\sdk\inc\mcx.h -FILE 874 f:\sp\public\sdk\inc\winuser.h -FILE 875 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 876 f:\sp\public\sdk\inc\winnls.h -FILE 877 f:\sp\public\sdk\inc\guiddef.h -FILE 878 f:\sp\public\sdk\inc\windows.h -FILE 879 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 880 f:\sp\public\sdk\inc\specstrings.h -FILE 881 f:\sp\public\sdk\inc\basetsd.h -FILE 882 f:\sp\public\sdk\inc\stralign.h -FILE 883 f:\sp\public\sdk\inc\tvout.h -FILE 884 f:\sp\public\sdk\inc\winsvc.h -FILE 885 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 886 f:\sp\public\sdk\inc\wingdi.h -FILE 887 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 888 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 889 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 890 f:\sp\public\sdk\inc\pshpack4.h -FILE 891 f:\sp\public\sdk\inc\ddbanned.h -FILE 892 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 893 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 894 f:\sp\public\sdk\inc\poppack.h -FILE 895 f:\sp\public\sdk\inc\winnetwk.h -FILE 896 f:\sp\public\sdk\inc\imm.h -FILE 897 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 898 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 899 f:\sp\public\sdk\inc\windef.h -FILE 900 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 901 f:\sp\public\sdk\inc\poppack.h -FILE 902 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 903 f:\sp\public\sdk\inc\winnetwk.h -FILE 904 f:\sp\public\sdk\inc\imm.h -FILE 905 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 906 f:\sp\public\sdk\inc\windef.h -FILE 907 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 908 f:\sp\public\sdk\inc\pshpack1.h -FILE 909 f:\sp\public\sdk\inc\winver.h -FILE 910 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 911 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 912 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 913 f:\sp\public\sdk\inc\winnt.h -FILE 914 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 915 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 916 f:\sp\public\sdk\inc\winreg.h -FILE 917 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0fp.c -FILE 918 f:\sp\public\sdk\inc\winbase.h -FILE 919 f:\sp\public\sdk\inc\winerror.h -FILE 920 f:\sp\public\sdk\inc\pshpack8.h -FILE 921 f:\sp\public\sdk\inc\reason.h -FILE 922 f:\sp\public\sdk\inc\wincon.h -FILE 923 f:\sp\public\sdk\inc\ddbanned.h -FILE 924 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 925 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 926 f:\sp\public\sdk\inc\pshpack2.h -FILE 927 f:\sp\public\sdk\inc\mcx.h -FILE 928 f:\sp\public\sdk\inc\winuser.h -FILE 929 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 930 f:\sp\public\sdk\inc\winnls.h -FILE 931 f:\sp\public\sdk\inc\guiddef.h -FILE 932 f:\sp\public\sdk\inc\windows.h -FILE 933 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 934 f:\sp\public\sdk\inc\specstrings.h -FILE 935 f:\sp\public\sdk\inc\basetsd.h -FILE 936 f:\sp\public\sdk\inc\stralign.h -FILE 937 f:\sp\public\sdk\inc\tvout.h -FILE 938 f:\sp\public\sdk\inc\winsvc.h -FILE 939 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 940 f:\sp\public\sdk\inc\wingdi.h -FILE 941 f:\sp\public\sdk\inc\pshpack4.h -FILE 942 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 943 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 944 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 945 f:\sp\public\sdk\inc\pshpack4.h -FILE 946 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 947 f:\sp\public\sdk\inc\reason.h -FILE 948 f:\sp\public\sdk\inc\wincon.h -FILE 949 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 950 f:\sp\public\sdk\inc\poppack.h -FILE 951 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 952 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 953 f:\sp\public\sdk\inc\mcx.h -FILE 954 f:\sp\public\sdk\inc\winuser.h -FILE 955 f:\sp\public\sdk\inc\winnls.h -FILE 956 f:\sp\public\sdk\inc\stralign.h -FILE 957 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 958 f:\sp\public\sdk\inc\windef.h -FILE 959 f:\sp\public\sdk\inc\tvout.h -FILE 960 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 961 f:\sp\public\sdk\inc\winsvc.h -FILE 962 f:\sp\public\sdk\inc\wingdi.h -FILE 963 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 964 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 965 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 966 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 967 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 968 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 969 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 970 f:\sp\public\sdk\inc\winnt.h -FILE 971 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 972 f:\sp\public\sdk\inc\winnetwk.h -FILE 973 f:\sp\public\sdk\inc\imm.h -FILE 974 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0dat.c -FILE 975 f:\sp\public\sdk\inc\winbase.h -FILE 976 f:\sp\public\sdk\inc\winerror.h -FILE 977 f:\sp\public\sdk\inc\pshpack1.h -FILE 978 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 979 f:\sp\public\sdk\inc\pshpack8.h -FILE 980 f:\sp\public\sdk\inc\winver.h -FILE 981 f:\sp\public\sdk\inc\ddbanned.h -FILE 982 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 983 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 984 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 985 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 986 f:\sp\public\sdk\inc\pshpack2.h -FILE 987 f:\sp\public\sdk\inc\winreg.h -FILE 988 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 989 f:\sp\public\sdk\inc\guiddef.h -FILE 990 f:\sp\public\sdk\inc\windows.h -FILE 991 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 992 f:\sp\public\sdk\inc\specstrings.h -FILE 993 f:\sp\public\sdk\inc\basetsd.h -FILE 994 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 995 f:\sp\public\sdk\inc\tvout.h -FILE 996 f:\sp\public\sdk\inc\winsvc.h -FILE 997 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 998 f:\sp\public\sdk\inc\wingdi.h -FILE 999 f:\sp\public\sdk\inc\pshpack4.h -FILE 1000 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1001 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1002 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 1003 f:\sp\public\sdk\inc\poppack.h -FILE 1004 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 1005 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1006 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 1007 f:\sp\public\sdk\inc\winnetwk.h -FILE 1008 f:\sp\public\sdk\inc\imm.h -FILE 1009 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1010 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1011 f:\sp\public\sdk\inc\windef.h -FILE 1012 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1013 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1014 f:\sp\vctools\crt_bld\self_x86\crt\src\dos.h -FILE 1015 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1016 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1017 f:\sp\public\sdk\inc\pshpack1.h -FILE 1018 f:\sp\public\sdk\inc\winver.h -FILE 1019 f:\sp\public\sdk\inc\winnt.h -FILE 1020 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1021 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1022 f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c -FILE 1023 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1024 f:\sp\public\sdk\inc\winreg.h -FILE 1025 f:\sp\public\sdk\inc\winbase.h -FILE 1026 f:\sp\public\sdk\inc\winerror.h -FILE 1027 f:\sp\public\sdk\inc\ddbanned.h -FILE 1028 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1029 f:\sp\public\sdk\inc\pshpack8.h -FILE 1030 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1031 f:\sp\public\sdk\inc\reason.h -FILE 1032 f:\sp\public\sdk\inc\wincon.h -FILE 1033 f:\sp\public\sdk\inc\pshpack2.h -FILE 1034 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1035 f:\sp\public\sdk\inc\mcx.h -FILE 1036 f:\sp\public\sdk\inc\winuser.h -FILE 1037 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1038 f:\sp\public\sdk\inc\winnls.h -FILE 1039 f:\sp\public\sdk\inc\guiddef.h -FILE 1040 f:\sp\public\sdk\inc\windows.h -FILE 1041 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1042 f:\sp\public\sdk\inc\specstrings.h -FILE 1043 f:\sp\public\sdk\inc\basetsd.h -FILE 1044 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1045 f:\sp\public\sdk\inc\stralign.h -FILE 1046 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\alloca16.asm -FILE 1047 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 1048 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\chkstk.asm -FILE 1049 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 1050 f:\sp\public\sdk\inc\wincon.h -FILE 1051 f:\sp\public\sdk\inc\imm.h -FILE 1052 f:\sp\public\sdk\inc\winbase.h -FILE 1053 f:\sp\public\sdk\inc\wingdi.h -FILE 1054 f:\sp\public\sdk\inc\winver.h -FILE 1055 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 1056 f:\sp\public\sdk\inc\windows.h -FILE 1057 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 1058 f:\sp\public\sdk\inc\pshpack2.h -FILE 1059 f:\sp\public\sdk\inc\reason.h -FILE 1060 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\rtc\initsect.cpp -FILE 1061 f:\sp\public\sdk\inc\specstrings.h -FILE 1062 f:\sp\public\sdk\inc\basetsd.h -FILE 1063 f:\sp\public\sdk\inc\pshpack4.h -FILE 1064 f:\sp\public\sdk\inc\winnetwk.h -FILE 1065 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 1066 f:\sp\public\sdk\inc\stralign.h -FILE 1067 f:\sp\public\sdk\inc\poppack.h -FILE 1068 f:\sp\public\sdk\inc\winsvc.h -FILE 1069 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 1070 f:\sp\public\sdk\inc\windef.h -FILE 1071 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 1072 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 1073 f:\sp\public\sdk\inc\winuser.h -FILE 1074 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 1075 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 1076 f:\sp\public\sdk\inc\mcx.h -FILE 1077 f:\sp\public\sdk\inc\pshpack8.h -FILE 1078 f:\sp\public\sdk\inc\guiddef.h -FILE 1079 f:\sp\public\sdk\inc\winnt.h -FILE 1080 f:\sp\public\sdk\inc\winnls.h -FILE 1081 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 1082 f:\sp\public\sdk\inc\pshpack1.h -FILE 1083 f:\sp\public\sdk\inc\winerror.h -FILE 1084 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcapi.h -FILE 1085 f:\sp\public\sdk\inc\winreg.h -FILE 1086 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 1087 f:\sp\public\sdk\inc\ddbanned.h -FILE 1088 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 1089 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 1090 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\rtcpriv.h -FILE 1091 f:\sp\public\sdk\inc\tvout.h -FILE 1092 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 1093 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 1094 f:\sp\public\sdk\inc\poppack.h -FILE 1095 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1096 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1097 f:\sp\public\sdk\inc\winnetwk.h -FILE 1098 f:\sp\public\sdk\inc\imm.h -FILE 1099 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1100 f:\sp\public\sdk\inc\windef.h -FILE 1101 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1102 f:\sp\public\sdk\inc\pshpack1.h -FILE 1103 f:\sp\public\sdk\inc\winver.h -FILE 1104 f:\sp\public\sdk\inc\windows.h -FILE 1105 f:\sp\public\sdk\inc\winnt.h -FILE 1106 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1107 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1108 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1109 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1110 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1111 f:\sp\public\sdk\inc\winreg.h -FILE 1112 f:\sp\public\sdk\inc\winbase.h -FILE 1113 f:\sp\vctools\crt_bld\self_x86\crt\src\wtombenv.c -FILE 1114 f:\sp\public\sdk\inc\winerror.h -FILE 1115 f:\sp\public\sdk\inc\pshpack8.h -FILE 1116 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1117 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1118 f:\sp\public\sdk\inc\reason.h -FILE 1119 f:\sp\public\sdk\inc\wincon.h -FILE 1120 f:\sp\public\sdk\inc\ddbanned.h -FILE 1121 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1122 f:\sp\public\sdk\inc\pshpack2.h -FILE 1123 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1124 f:\sp\public\sdk\inc\mcx.h -FILE 1125 f:\sp\public\sdk\inc\winuser.h -FILE 1126 f:\sp\public\sdk\inc\winnls.h -FILE 1127 f:\sp\public\sdk\inc\guiddef.h -FILE 1128 f:\sp\public\sdk\inc\specstrings.h -FILE 1129 f:\sp\public\sdk\inc\basetsd.h -FILE 1130 f:\sp\public\sdk\inc\stralign.h -FILE 1131 f:\sp\public\sdk\inc\tvout.h -FILE 1132 f:\sp\public\sdk\inc\winsvc.h -FILE 1133 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1134 f:\sp\public\sdk\inc\wingdi.h -FILE 1135 f:\sp\public\sdk\inc\pshpack4.h -FILE 1136 f:\sp\public\sdk\inc\winnt.h -FILE 1137 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1138 f:\sp\public\sdk\inc\winreg.h -FILE 1139 f:\sp\public\sdk\inc\winbase.h -FILE 1140 f:\sp\public\sdk\inc\winerror.h -FILE 1141 f:\sp\public\sdk\inc\pshpack8.h -FILE 1142 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1143 f:\sp\public\sdk\inc\reason.h -FILE 1144 f:\sp\public\sdk\inc\wincon.h -FILE 1145 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 1146 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1147 f:\sp\public\sdk\inc\pshpack2.h -FILE 1148 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1149 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1150 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1151 f:\sp\public\sdk\inc\mcx.h -FILE 1152 f:\sp\public\sdk\inc\winuser.h -FILE 1153 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1154 f:\sp\public\sdk\inc\winnls.h -FILE 1155 f:\sp\public\sdk\inc\guiddef.h -FILE 1156 f:\sp\public\sdk\inc\windows.h -FILE 1157 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1158 f:\sp\public\sdk\inc\specstrings.h -FILE 1159 f:\sp\public\sdk\inc\basetsd.h -FILE 1160 f:\sp\public\sdk\inc\stralign.h -FILE 1161 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1162 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 1163 f:\sp\public\sdk\inc\tvout.h -FILE 1164 f:\sp\public\sdk\inc\winsvc.h -FILE 1165 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1166 f:\sp\vctools\crt_bld\self_x86\crt\src\winxfltr.c -FILE 1167 f:\sp\public\sdk\inc\wingdi.h -FILE 1168 f:\sp\public\sdk\inc\pshpack4.h -FILE 1169 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1170 f:\sp\public\sdk\inc\poppack.h -FILE 1171 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1172 f:\sp\public\sdk\inc\winnetwk.h -FILE 1173 f:\sp\public\sdk\inc\imm.h -FILE 1174 f:\sp\public\sdk\inc\ddbanned.h -FILE 1175 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1176 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1177 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1178 f:\sp\public\sdk\inc\windef.h -FILE 1179 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 1180 f:\sp\public\sdk\inc\pshpack1.h -FILE 1181 f:\sp\public\sdk\inc\winver.h -FILE 1182 f:\sp\public\sdk\inc\winnetwk.h -FILE 1183 f:\sp\public\sdk\inc\imm.h -FILE 1184 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1185 f:\sp\public\sdk\inc\windef.h -FILE 1186 f:\sp\public\sdk\inc\pshpack1.h -FILE 1187 f:\sp\public\sdk\inc\winver.h -FILE 1188 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1189 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1190 f:\sp\public\sdk\inc\winnt.h -FILE 1191 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1192 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1193 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1194 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1195 f:\sp\public\sdk\inc\winreg.h -FILE 1196 f:\sp\public\sdk\inc\winbase.h -FILE 1197 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1198 f:\sp\public\sdk\inc\winerror.h -FILE 1199 f:\sp\vctools\crt_bld\self_x86\crt\src\winsig.c -FILE 1200 f:\sp\public\sdk\inc\pshpack8.h -FILE 1201 f:\sp\public\sdk\inc\reason.h -FILE 1202 f:\sp\public\sdk\inc\wincon.h -FILE 1203 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1204 f:\sp\public\sdk\inc\pshpack2.h -FILE 1205 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1206 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1207 f:\sp\public\sdk\inc\mcx.h -FILE 1208 f:\sp\public\sdk\inc\winuser.h -FILE 1209 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1210 f:\sp\public\sdk\inc\winnls.h -FILE 1211 f:\sp\public\sdk\inc\guiddef.h -FILE 1212 f:\sp\public\sdk\inc\windows.h -FILE 1213 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1214 f:\sp\public\sdk\inc\specstrings.h -FILE 1215 f:\sp\public\sdk\inc\ddbanned.h -FILE 1216 f:\sp\public\sdk\inc\basetsd.h -FILE 1217 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1218 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1219 f:\sp\public\sdk\inc\stralign.h -FILE 1220 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 1221 f:\sp\public\sdk\inc\tvout.h -FILE 1222 f:\sp\public\sdk\inc\winsvc.h -FILE 1223 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1224 f:\sp\public\sdk\inc\wingdi.h -FILE 1225 f:\sp\vctools\crt_bld\self_x86\crt\src\float.h -FILE 1226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtwrn.h -FILE 1227 f:\sp\public\sdk\inc\pshpack4.h -FILE 1228 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1229 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1230 f:\sp\public\sdk\inc\poppack.h -FILE 1231 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1232 f:\sp\public\sdk\inc\wincon.h -FILE 1233 f:\sp\public\sdk\inc\imm.h -FILE 1234 f:\sp\public\sdk\inc\winbase.h -FILE 1235 f:\sp\public\sdk\inc\wingdi.h -FILE 1236 f:\sp\public\sdk\inc\winver.h -FILE 1237 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1238 f:\sp\public\sdk\inc\windows.h -FILE 1239 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1240 f:\sp\public\sdk\inc\pshpack2.h -FILE 1241 f:\sp\public\sdk\inc\reason.h -FILE 1242 f:\sp\vctools\crt_bld\self_x86\crt\src\w_str.c -FILE 1243 f:\sp\public\sdk\inc\specstrings.h -FILE 1244 f:\sp\public\sdk\inc\basetsd.h -FILE 1245 f:\sp\public\sdk\inc\pshpack4.h -FILE 1246 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1247 f:\sp\public\sdk\inc\winnetwk.h -FILE 1248 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1249 f:\sp\public\sdk\inc\stralign.h -FILE 1250 f:\sp\public\sdk\inc\poppack.h -FILE 1251 f:\sp\public\sdk\inc\winsvc.h -FILE 1252 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1253 f:\sp\public\sdk\inc\windef.h -FILE 1254 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1255 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1256 f:\sp\public\sdk\inc\winuser.h -FILE 1257 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1258 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1259 f:\sp\public\sdk\inc\mcx.h -FILE 1260 f:\sp\public\sdk\inc\pshpack8.h -FILE 1261 f:\sp\public\sdk\inc\guiddef.h -FILE 1262 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1263 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1264 f:\sp\public\sdk\inc\winnt.h -FILE 1265 f:\sp\public\sdk\inc\winnls.h -FILE 1266 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1267 f:\sp\public\sdk\inc\pshpack1.h -FILE 1268 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1269 f:\sp\public\sdk\inc\winerror.h -FILE 1270 f:\sp\public\sdk\inc\winreg.h -FILE 1271 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1272 f:\sp\public\sdk\inc\ddbanned.h -FILE 1273 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1274 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1275 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1276 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1277 f:\sp\public\sdk\inc\tvout.h -FILE 1278 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1279 f:\sp\public\sdk\inc\wincon.h -FILE 1280 f:\sp\public\sdk\inc\imm.h -FILE 1281 f:\sp\public\sdk\inc\winbase.h -FILE 1282 f:\sp\public\sdk\inc\wingdi.h -FILE 1283 f:\sp\public\sdk\inc\winver.h -FILE 1284 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1285 f:\sp\public\sdk\inc\windows.h -FILE 1286 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1287 f:\sp\public\sdk\inc\pshpack2.h -FILE 1288 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1289 f:\sp\public\sdk\inc\reason.h -FILE 1290 f:\sp\vctools\crt_bld\self_x86\crt\src\w_loc.c -FILE 1291 f:\sp\public\sdk\inc\specstrings.h -FILE 1292 f:\sp\public\sdk\inc\basetsd.h -FILE 1293 f:\sp\public\sdk\inc\pshpack4.h -FILE 1294 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1295 f:\sp\public\sdk\inc\winnetwk.h -FILE 1296 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1297 f:\sp\public\sdk\inc\stralign.h -FILE 1298 f:\sp\public\sdk\inc\poppack.h -FILE 1299 f:\sp\public\sdk\inc\winsvc.h -FILE 1300 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1301 f:\sp\public\sdk\inc\windef.h -FILE 1302 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1303 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1304 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1305 f:\sp\public\sdk\inc\winuser.h -FILE 1306 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1307 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1308 f:\sp\public\sdk\inc\mcx.h -FILE 1309 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1310 f:\sp\public\sdk\inc\pshpack8.h -FILE 1311 f:\sp\public\sdk\inc\guiddef.h -FILE 1312 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1313 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1314 f:\sp\public\sdk\inc\winnt.h -FILE 1315 f:\sp\public\sdk\inc\winnls.h -FILE 1316 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1317 f:\sp\public\sdk\inc\pshpack1.h -FILE 1318 f:\sp\public\sdk\inc\winerror.h -FILE 1319 f:\sp\public\sdk\inc\winreg.h -FILE 1320 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1321 f:\sp\public\sdk\inc\ddbanned.h -FILE 1322 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1323 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1324 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1325 f:\sp\public\sdk\inc\tvout.h -FILE 1326 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1327 f:\sp\public\sdk\inc\poppack.h -FILE 1328 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1329 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1330 f:\sp\public\sdk\inc\winnetwk.h -FILE 1331 f:\sp\public\sdk\inc\imm.h -FILE 1332 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1333 f:\sp\public\sdk\inc\windef.h -FILE 1334 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1335 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 1336 f:\sp\public\sdk\inc\pshpack1.h -FILE 1337 f:\sp\public\sdk\inc\winver.h -FILE 1338 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1339 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1340 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1341 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1342 f:\sp\public\sdk\inc\winnt.h -FILE 1343 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 1344 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1345 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1346 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1347 f:\sp\public\sdk\inc\winreg.h -FILE 1348 f:\sp\vctools\crt_bld\self_x86\crt\src\convrtcp.c -FILE 1349 f:\sp\public\sdk\inc\winbase.h -FILE 1350 f:\sp\public\sdk\inc\winerror.h -FILE 1351 f:\sp\public\sdk\inc\pshpack8.h -FILE 1352 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1353 f:\sp\public\sdk\inc\reason.h -FILE 1354 f:\sp\public\sdk\inc\wincon.h -FILE 1355 f:\sp\public\sdk\inc\ddbanned.h -FILE 1356 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1357 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1358 f:\sp\public\sdk\inc\pshpack2.h -FILE 1359 f:\sp\public\sdk\inc\mcx.h -FILE 1360 f:\sp\public\sdk\inc\winuser.h -FILE 1361 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1362 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 1363 f:\sp\public\sdk\inc\winnls.h -FILE 1364 f:\sp\public\sdk\inc\guiddef.h -FILE 1365 f:\sp\public\sdk\inc\windows.h -FILE 1366 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1367 f:\sp\public\sdk\inc\specstrings.h -FILE 1368 f:\sp\public\sdk\inc\basetsd.h -FILE 1369 f:\sp\public\sdk\inc\stralign.h -FILE 1370 f:\sp\public\sdk\inc\tvout.h -FILE 1371 f:\sp\public\sdk\inc\winsvc.h -FILE 1372 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1373 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1374 f:\sp\public\sdk\inc\wingdi.h -FILE 1375 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1376 f:\sp\public\sdk\inc\pshpack4.h -FILE 1377 f:\sp\public\sdk\inc\winerror.h -FILE 1378 f:\sp\public\sdk\inc\pshpack8.h -FILE 1379 f:\sp\public\sdk\inc\reason.h -FILE 1380 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1381 f:\sp\public\sdk\inc\wincon.h -FILE 1382 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1383 f:\sp\public\sdk\inc\pshpack2.h -FILE 1384 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1385 f:\sp\public\sdk\inc\mcx.h -FILE 1386 f:\sp\public\sdk\inc\winuser.h -FILE 1387 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1388 f:\sp\public\sdk\inc\winnls.h -FILE 1389 f:\sp\public\sdk\inc\guiddef.h -FILE 1390 f:\sp\public\sdk\inc\windows.h -FILE 1391 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 1392 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1393 f:\sp\public\sdk\inc\specstrings.h -FILE 1394 f:\sp\public\sdk\inc\basetsd.h -FILE 1395 f:\sp\public\sdk\inc\stralign.h -FILE 1396 f:\sp\public\sdk\inc\tvout.h -FILE 1397 f:\sp\public\sdk\inc\winsvc.h -FILE 1398 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1399 f:\sp\public\sdk\inc\wingdi.h -FILE 1400 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1401 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1402 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1403 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1404 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1405 f:\sp\public\sdk\inc\pshpack4.h -FILE 1406 f:\sp\public\sdk\inc\poppack.h -FILE 1407 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1408 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1409 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.c -FILE 1410 f:\sp\public\sdk\inc\winnetwk.h -FILE 1411 f:\sp\public\sdk\inc\imm.h -FILE 1412 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1413 f:\sp\public\sdk\inc\windef.h -FILE 1414 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1415 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1416 f:\sp\public\sdk\inc\pshpack1.h -FILE 1417 f:\sp\public\sdk\inc\ddbanned.h -FILE 1418 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1419 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1420 f:\sp\public\sdk\inc\winver.h -FILE 1421 f:\sp\public\sdk\inc\winnt.h -FILE 1422 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1423 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1424 f:\sp\public\sdk\inc\winreg.h -FILE 1425 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1426 f:\sp\public\sdk\inc\winbase.h -FILE 1427 f:\sp\public\sdk\inc\poppack.h -FILE 1428 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 1429 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 1430 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1431 f:\sp\public\sdk\inc\winnetwk.h -FILE 1432 f:\sp\public\sdk\inc\imm.h -FILE 1433 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1434 f:\sp\public\sdk\inc\windef.h -FILE 1435 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1436 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1437 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1438 f:\sp\public\sdk\inc\pshpack1.h -FILE 1439 f:\sp\public\sdk\inc\winver.h -FILE 1440 f:\sp\public\sdk\inc\windows.h -FILE 1441 f:\sp\public\sdk\inc\winnt.h -FILE 1442 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1443 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1444 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1445 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1446 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1447 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1448 f:\sp\public\sdk\inc\winreg.h -FILE 1449 f:\sp\public\sdk\inc\winbase.h -FILE 1450 f:\sp\vctools\crt_bld\self_x86\crt\src\setenv.c -FILE 1451 f:\sp\public\sdk\inc\winerror.h -FILE 1452 f:\sp\public\sdk\inc\pshpack8.h -FILE 1453 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1454 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1455 f:\sp\public\sdk\inc\reason.h -FILE 1456 f:\sp\public\sdk\inc\wincon.h -FILE 1457 f:\sp\public\sdk\inc\ddbanned.h -FILE 1458 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1459 f:\sp\public\sdk\inc\pshpack2.h -FILE 1460 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1461 f:\sp\public\sdk\inc\mcx.h -FILE 1462 f:\sp\public\sdk\inc\winuser.h -FILE 1463 f:\sp\public\sdk\inc\winnls.h -FILE 1464 f:\sp\public\sdk\inc\guiddef.h -FILE 1465 f:\sp\public\sdk\inc\specstrings.h -FILE 1466 f:\sp\public\sdk\inc\basetsd.h -FILE 1467 f:\sp\public\sdk\inc\stralign.h -FILE 1468 f:\sp\public\sdk\inc\tvout.h -FILE 1469 f:\sp\public\sdk\inc\winsvc.h -FILE 1470 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1471 f:\sp\public\sdk\inc\wingdi.h -FILE 1472 f:\sp\public\sdk\inc\pshpack4.h -FILE 1473 f:\sp\public\sdk\inc\poppack.h -FILE 1474 f:\sp\public\sdk\inc\winnetwk.h -FILE 1475 f:\sp\public\sdk\inc\imm.h -FILE 1476 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1477 f:\sp\public\sdk\inc\windef.h -FILE 1478 f:\sp\public\sdk\inc\pshpack1.h -FILE 1479 f:\sp\public\sdk\inc\winver.h -FILE 1480 f:\sp\public\sdk\inc\windows.h -FILE 1481 f:\sp\public\sdk\inc\winnt.h -FILE 1482 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1483 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1484 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1485 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1486 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1487 f:\sp\public\sdk\inc\winreg.h -FILE 1488 f:\sp\public\sdk\inc\winbase.h -FILE 1489 f:\sp\vctools\crt_bld\self_x86\crt\src\rand_s.c -FILE 1490 f:\sp\public\sdk\inc\winerror.h -FILE 1491 f:\sp\public\sdk\inc\pshpack8.h -FILE 1492 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1493 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1494 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1495 f:\sp\public\sdk\inc\reason.h -FILE 1496 f:\sp\public\sdk\inc\wincon.h -FILE 1497 f:\sp\public\sdk\inc\ddbanned.h -FILE 1498 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1499 f:\sp\public\sdk\inc\pshpack2.h -FILE 1500 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1501 f:\sp\public\sdk\inc\mcx.h -FILE 1502 f:\sp\public\sdk\inc\winuser.h -FILE 1503 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 1504 f:\sp\public\sdk\inc\winnls.h -FILE 1505 f:\sp\public\sdk\inc\guiddef.h -FILE 1506 f:\sp\public\sdk\inc\specstrings.h -FILE 1507 f:\sp\public\sdk\inc\basetsd.h -FILE 1508 f:\sp\public\sdk\inc\stralign.h -FILE 1509 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1510 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1511 f:\sp\public\sdk\inc\tvout.h -FILE 1512 f:\sp\public\sdk\inc\winsvc.h -FILE 1513 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1514 f:\sp\public\sdk\inc\wingdi.h -FILE 1515 f:\sp\public\sdk\inc\pshpack4.h -FILE 1516 f:\sp\public\sdk\inc\poppack.h -FILE 1517 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1518 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1519 f:\sp\public\sdk\inc\winnetwk.h -FILE 1520 f:\sp\public\sdk\inc\imm.h -FILE 1521 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1522 f:\sp\public\sdk\inc\windef.h -FILE 1523 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1524 f:\sp\public\sdk\inc\pshpack1.h -FILE 1525 f:\sp\public\sdk\inc\winver.h -FILE 1526 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1527 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1528 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1529 f:\sp\public\sdk\inc\winnt.h -FILE 1530 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1531 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1532 f:\sp\public\sdk\inc\winreg.h -FILE 1533 f:\sp\vctools\crt_bld\self_x86\crt\src\purevirt.c -FILE 1534 f:\sp\public\sdk\inc\winbase.h -FILE 1535 f:\sp\public\sdk\inc\winerror.h -FILE 1536 f:\sp\public\sdk\inc\pshpack8.h -FILE 1537 f:\sp\public\sdk\inc\reason.h -FILE 1538 f:\sp\public\sdk\inc\wincon.h -FILE 1539 f:\sp\public\sdk\inc\ddbanned.h -FILE 1540 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1541 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1542 f:\sp\public\sdk\inc\pshpack2.h -FILE 1543 f:\sp\public\sdk\inc\mcx.h -FILE 1544 f:\sp\public\sdk\inc\winuser.h -FILE 1545 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1546 f:\sp\public\sdk\inc\winnls.h -FILE 1547 f:\sp\public\sdk\inc\guiddef.h -FILE 1548 f:\sp\public\sdk\inc\windows.h -FILE 1549 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1550 f:\sp\public\sdk\inc\specstrings.h -FILE 1551 f:\sp\public\sdk\inc\basetsd.h -FILE 1552 f:\sp\public\sdk\inc\stralign.h -FILE 1553 f:\sp\public\sdk\inc\tvout.h -FILE 1554 f:\sp\public\sdk\inc\winsvc.h -FILE 1555 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1556 f:\sp\public\sdk\inc\wingdi.h -FILE 1557 f:\sp\public\sdk\inc\pshpack4.h -FILE 1558 f:\sp\public\sdk\inc\poppack.h -FILE 1559 f:\sp\public\sdk\inc\winnetwk.h -FILE 1560 f:\sp\public\sdk\inc\imm.h -FILE 1561 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1562 f:\sp\public\sdk\inc\windef.h -FILE 1563 f:\sp\public\sdk\inc\pshpack1.h -FILE 1564 f:\sp\public\sdk\inc\winver.h -FILE 1565 f:\sp\public\sdk\inc\windows.h -FILE 1566 f:\sp\public\sdk\inc\winnt.h -FILE 1567 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1568 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1569 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1570 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1571 f:\sp\public\sdk\inc\winreg.h -FILE 1572 f:\sp\public\sdk\inc\winbase.h -FILE 1573 f:\sp\vctools\crt_bld\self_x86\crt\src\pesect.c -FILE 1574 f:\sp\public\sdk\inc\winerror.h -FILE 1575 f:\sp\public\sdk\inc\pshpack8.h -FILE 1576 f:\sp\public\sdk\inc\reason.h -FILE 1577 f:\sp\public\sdk\inc\wincon.h -FILE 1578 f:\sp\public\sdk\inc\ddbanned.h -FILE 1579 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1580 f:\sp\public\sdk\inc\pshpack2.h -FILE 1581 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1582 f:\sp\public\sdk\inc\mcx.h -FILE 1583 f:\sp\public\sdk\inc\winuser.h -FILE 1584 f:\sp\public\sdk\inc\winnls.h -FILE 1585 f:\sp\public\sdk\inc\guiddef.h -FILE 1586 f:\sp\public\sdk\inc\specstrings.h -FILE 1587 f:\sp\public\sdk\inc\basetsd.h -FILE 1588 f:\sp\public\sdk\inc\stralign.h -FILE 1589 f:\sp\public\sdk\inc\tvout.h -FILE 1590 f:\sp\public\sdk\inc\winsvc.h -FILE 1591 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1592 f:\sp\public\sdk\inc\wingdi.h -FILE 1593 f:\sp\public\sdk\inc\pshpack4.h -FILE 1594 f:\sp\public\sdk\inc\winerror.h -FILE 1595 f:\sp\public\sdk\inc\pshpack1.h -FILE 1596 f:\sp\public\sdk\inc\pshpack8.h -FILE 1597 f:\sp\public\sdk\inc\winver.h -FILE 1598 f:\sp\public\sdk\inc\pshpack2.h -FILE 1599 f:\sp\public\sdk\inc\winreg.h -FILE 1600 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1601 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1602 f:\sp\public\sdk\inc\guiddef.h -FILE 1603 f:\sp\public\sdk\inc\windows.h -FILE 1604 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1605 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 1606 f:\sp\public\sdk\inc\specstrings.h -FILE 1607 f:\sp\public\sdk\inc\basetsd.h -FILE 1608 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1609 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1610 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1611 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1612 f:\sp\public\sdk\inc\pshpack4.h -FILE 1613 f:\sp\public\sdk\inc\reason.h -FILE 1614 f:\sp\public\sdk\inc\wincon.h -FILE 1615 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1616 f:\sp\public\sdk\inc\poppack.h -FILE 1617 f:\sp\public\sdk\inc\mcx.h -FILE 1618 f:\sp\public\sdk\inc\winuser.h -FILE 1619 f:\sp\public\sdk\inc\winnls.h -FILE 1620 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata2.c -FILE 1621 f:\sp\public\sdk\inc\stralign.h -FILE 1622 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1623 f:\sp\public\sdk\inc\windef.h -FILE 1624 f:\sp\public\sdk\inc\tvout.h -FILE 1625 f:\sp\public\sdk\inc\winsvc.h -FILE 1626 f:\sp\public\sdk\inc\wingdi.h -FILE 1627 f:\sp\public\sdk\inc\ddbanned.h -FILE 1628 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1629 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1630 f:\sp\public\sdk\inc\winnt.h -FILE 1631 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1632 f:\sp\public\sdk\inc\winnetwk.h -FILE 1633 f:\sp\public\sdk\inc\imm.h -FILE 1634 f:\sp\public\sdk\inc\winbase.h -FILE 1635 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1636 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1637 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1638 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsdata1.c -FILE 1639 f:\sp\public\sdk\inc\ddbanned.h -FILE 1640 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1641 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1642 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1643 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 1644 f:\sp\public\sdk\inc\reason.h -FILE 1645 f:\sp\public\sdk\inc\wincon.h -FILE 1646 f:\sp\public\sdk\inc\pshpack2.h -FILE 1647 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1648 f:\sp\public\sdk\inc\mcx.h -FILE 1649 f:\sp\public\sdk\inc\winuser.h -FILE 1650 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1651 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1652 f:\sp\public\sdk\inc\winnls.h -FILE 1653 f:\sp\public\sdk\inc\guiddef.h -FILE 1654 f:\sp\public\sdk\inc\windows.h -FILE 1655 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1656 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1657 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1658 f:\sp\public\sdk\inc\specstrings.h -FILE 1659 f:\sp\public\sdk\inc\basetsd.h -FILE 1660 f:\sp\public\sdk\inc\stralign.h -FILE 1661 f:\sp\public\sdk\inc\tvout.h -FILE 1662 f:\sp\public\sdk\inc\winsvc.h -FILE 1663 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1664 f:\sp\public\sdk\inc\wingdi.h -FILE 1665 f:\sp\public\sdk\inc\pshpack4.h -FILE 1666 f:\sp\public\sdk\inc\poppack.h -FILE 1667 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1668 f:\sp\public\sdk\inc\winnetwk.h -FILE 1669 f:\sp\public\sdk\inc\imm.h -FILE 1670 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1671 f:\sp\public\sdk\inc\windef.h -FILE 1672 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1673 f:\sp\vctools\crt_bld\self_x86\crt\src\onexit.c -FILE 1674 f:\sp\public\sdk\inc\pshpack1.h -FILE 1675 f:\sp\public\sdk\inc\winver.h -FILE 1676 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1677 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1678 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1679 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1680 f:\sp\public\sdk\inc\winnt.h -FILE 1681 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1682 f:\sp\public\sdk\inc\ddbanned.h -FILE 1683 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1684 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1685 f:\sp\public\sdk\inc\winreg.h -FILE 1686 f:\sp\public\sdk\inc\winbase.h -FILE 1687 f:\sp\public\sdk\inc\winerror.h -FILE 1688 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1689 f:\sp\public\sdk\inc\pshpack8.h -FILE 1690 f:\sp\public\sdk\inc\winbase.h -FILE 1691 f:\sp\public\sdk\inc\winerror.h -FILE 1692 f:\sp\public\sdk\inc\pshpack1.h -FILE 1693 f:\sp\public\sdk\inc\pshpack8.h -FILE 1694 f:\sp\public\sdk\inc\winver.h -FILE 1695 f:\sp\public\sdk\inc\pshpack2.h -FILE 1696 f:\sp\public\sdk\inc\winreg.h -FILE 1697 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1698 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1699 f:\sp\public\sdk\inc\guiddef.h -FILE 1700 f:\sp\public\sdk\inc\windows.h -FILE 1701 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1702 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1703 f:\sp\public\sdk\inc\specstrings.h -FILE 1704 f:\sp\public\sdk\inc\basetsd.h -FILE 1705 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1706 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1707 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1708 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1709 f:\sp\public\sdk\inc\pshpack4.h -FILE 1710 f:\sp\public\sdk\inc\reason.h -FILE 1711 f:\sp\public\sdk\inc\wincon.h -FILE 1712 f:\sp\public\sdk\inc\poppack.h -FILE 1713 f:\sp\public\sdk\inc\mcx.h -FILE 1714 f:\sp\public\sdk\inc\winuser.h -FILE 1715 f:\sp\public\sdk\inc\winnls.h -FILE 1716 f:\sp\vctools\crt_bld\self_x86\crt\src\lconv.c -FILE 1717 f:\sp\public\sdk\inc\stralign.h -FILE 1718 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1719 f:\sp\public\sdk\inc\windef.h -FILE 1720 f:\sp\public\sdk\inc\tvout.h -FILE 1721 f:\sp\public\sdk\inc\winsvc.h -FILE 1722 f:\sp\public\sdk\inc\wingdi.h -FILE 1723 f:\sp\public\sdk\inc\ddbanned.h -FILE 1724 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1725 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1726 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1727 f:\sp\public\sdk\inc\winnt.h -FILE 1728 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1729 f:\sp\public\sdk\inc\winnetwk.h -FILE 1730 f:\sp\public\sdk\inc\imm.h -FILE 1731 f:\sp\public\sdk\inc\guiddef.h -FILE 1732 f:\sp\public\sdk\inc\winnt.h -FILE 1733 f:\sp\public\sdk\inc\winnls.h -FILE 1734 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1735 f:\sp\public\sdk\inc\pshpack1.h -FILE 1736 f:\sp\public\sdk\inc\winerror.h -FILE 1737 f:\sp\public\sdk\inc\winreg.h -FILE 1738 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1739 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 1740 f:\sp\public\sdk\inc\tvout.h -FILE 1741 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1742 f:\sp\vctools\crt_bld\self_x86\crt\src\invarg.c -FILE 1743 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1744 f:\sp\public\sdk\inc\wincon.h -FILE 1745 f:\sp\public\sdk\inc\imm.h -FILE 1746 f:\sp\public\sdk\inc\winbase.h -FILE 1747 f:\sp\public\sdk\inc\wingdi.h -FILE 1748 f:\sp\public\sdk\inc\winver.h -FILE 1749 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1750 f:\sp\public\sdk\inc\windows.h -FILE 1751 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1752 f:\sp\public\sdk\inc\pshpack2.h -FILE 1753 f:\sp\public\sdk\inc\reason.h -FILE 1754 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 1755 f:\sp\public\sdk\inc\specstrings.h -FILE 1756 f:\sp\public\sdk\inc\basetsd.h -FILE 1757 f:\sp\public\sdk\inc\pshpack4.h -FILE 1758 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1759 f:\sp\public\sdk\inc\winnetwk.h -FILE 1760 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1761 f:\sp\public\sdk\inc\stralign.h -FILE 1762 f:\sp\public\sdk\inc\poppack.h -FILE 1763 f:\sp\public\sdk\inc\winsvc.h -FILE 1764 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1765 f:\sp\public\sdk\inc\windef.h -FILE 1766 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1767 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1768 f:\sp\public\sdk\inc\winuser.h -FILE 1769 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1770 f:\sp\public\sdk\inc\ddbanned.h -FILE 1771 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1772 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1773 f:\sp\public\sdk\inc\mcx.h -FILE 1774 f:\sp\public\sdk\inc\pshpack8.h -FILE 1775 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1776 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1777 f:\sp\public\sdk\inc\pshpack4.h -FILE 1778 f:\sp\public\sdk\inc\poppack.h -FILE 1779 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1780 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1781 f:\sp\public\sdk\inc\winnetwk.h -FILE 1782 f:\sp\public\sdk\inc\imm.h -FILE 1783 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1784 f:\sp\public\sdk\inc\windef.h -FILE 1785 f:\sp\public\sdk\inc\pshpack1.h -FILE 1786 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1787 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1788 f:\sp\public\sdk\inc\winver.h -FILE 1789 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1790 f:\sp\public\sdk\inc\winnt.h -FILE 1791 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1792 f:\sp\public\sdk\inc\winreg.h -FILE 1793 f:\sp\vctools\crt_bld\self_x86\crt\src\inittime.c -FILE 1794 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1795 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1796 f:\sp\public\sdk\inc\winbase.h -FILE 1797 f:\sp\public\sdk\inc\winerror.h -FILE 1798 f:\sp\public\sdk\inc\pshpack8.h -FILE 1799 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1800 f:\sp\public\sdk\inc\reason.h -FILE 1801 f:\sp\public\sdk\inc\ddbanned.h -FILE 1802 f:\sp\public\sdk\inc\wincon.h -FILE 1803 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1804 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1805 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1806 f:\sp\public\sdk\inc\pshpack2.h -FILE 1807 f:\sp\public\sdk\inc\mcx.h -FILE 1808 f:\sp\public\sdk\inc\winuser.h -FILE 1809 f:\sp\public\sdk\inc\winnls.h -FILE 1810 f:\sp\public\sdk\inc\guiddef.h -FILE 1811 f:\sp\public\sdk\inc\stralign.h -FILE 1812 f:\sp\public\sdk\inc\specstrings.h -FILE 1813 f:\sp\public\sdk\inc\basetsd.h -FILE 1814 f:\sp\public\sdk\inc\windows.h -FILE 1815 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1816 f:\sp\public\sdk\inc\tvout.h -FILE 1817 f:\sp\public\sdk\inc\winsvc.h -FILE 1818 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1819 f:\sp\public\sdk\inc\wingdi.h -FILE 1820 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1821 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1822 f:\sp\public\sdk\inc\pshpack4.h -FILE 1823 f:\sp\public\sdk\inc\poppack.h -FILE 1824 f:\sp\public\sdk\inc\winnt.h -FILE 1825 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1826 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1827 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1828 f:\sp\public\sdk\inc\winnetwk.h -FILE 1829 f:\sp\public\sdk\inc\imm.h -FILE 1830 f:\sp\public\sdk\inc\pshpack1.h -FILE 1831 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1832 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1833 f:\sp\public\sdk\inc\winver.h -FILE 1834 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1835 f:\sp\public\sdk\inc\guiddef.h -FILE 1836 f:\sp\public\sdk\inc\specstrings.h -FILE 1837 f:\sp\public\sdk\inc\basetsd.h -FILE 1838 f:\sp\public\sdk\inc\windows.h -FILE 1839 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1840 f:\sp\public\sdk\inc\winreg.h -FILE 1841 f:\sp\vctools\crt_bld\self_x86\crt\src\initnum.c -FILE 1842 f:\sp\vctools\crt_bld\self_x86\crt\src\nlsint.h -FILE 1843 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1844 f:\sp\public\sdk\inc\winbase.h -FILE 1845 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1846 f:\sp\public\sdk\inc\winerror.h -FILE 1847 f:\sp\public\sdk\inc\pshpack8.h -FILE 1848 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1849 f:\sp\public\sdk\inc\reason.h -FILE 1850 f:\sp\public\sdk\inc\ddbanned.h -FILE 1851 f:\sp\public\sdk\inc\wincon.h -FILE 1852 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1853 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1854 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1855 f:\sp\public\sdk\inc\pshpack2.h -FILE 1856 f:\sp\public\sdk\inc\mcx.h -FILE 1857 f:\sp\public\sdk\inc\winuser.h -FILE 1858 f:\sp\public\sdk\inc\winnls.h -FILE 1859 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1860 f:\sp\public\sdk\inc\windef.h -FILE 1861 f:\sp\public\sdk\inc\stralign.h -FILE 1862 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1863 f:\sp\public\sdk\inc\tvout.h -FILE 1864 f:\sp\public\sdk\inc\winsvc.h -FILE 1865 f:\sp\public\sdk\inc\wingdi.h -FILE 1866 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1867 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1868 f:\sp\public\sdk\inc\pshpack4.h -FILE 1869 f:\sp\public\sdk\inc\poppack.h -FILE 1870 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1871 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1872 f:\sp\public\sdk\inc\winnetwk.h -FILE 1873 f:\sp\public\sdk\inc\imm.h -FILE 1874 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1875 f:\sp\public\sdk\inc\windef.h -FILE 1876 f:\sp\public\sdk\inc\pshpack1.h -FILE 1877 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1878 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1879 f:\sp\public\sdk\inc\winver.h -FILE 1880 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1881 f:\sp\public\sdk\inc\winnt.h -FILE 1882 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1883 f:\sp\public\sdk\inc\winreg.h -FILE 1884 f:\sp\vctools\crt_bld\self_x86\crt\src\initmon.c -FILE 1885 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1886 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1887 f:\sp\public\sdk\inc\winbase.h -FILE 1888 f:\sp\public\sdk\inc\winerror.h -FILE 1889 f:\sp\public\sdk\inc\pshpack8.h -FILE 1890 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1891 f:\sp\public\sdk\inc\reason.h -FILE 1892 f:\sp\public\sdk\inc\ddbanned.h -FILE 1893 f:\sp\public\sdk\inc\wincon.h -FILE 1894 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1895 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1896 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1897 f:\sp\public\sdk\inc\pshpack2.h -FILE 1898 f:\sp\public\sdk\inc\mcx.h -FILE 1899 f:\sp\public\sdk\inc\winuser.h -FILE 1900 f:\sp\public\sdk\inc\winnls.h -FILE 1901 f:\sp\public\sdk\inc\guiddef.h -FILE 1902 f:\sp\public\sdk\inc\stralign.h -FILE 1903 f:\sp\public\sdk\inc\specstrings.h -FILE 1904 f:\sp\public\sdk\inc\basetsd.h -FILE 1905 f:\sp\public\sdk\inc\windows.h -FILE 1906 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1907 f:\sp\public\sdk\inc\tvout.h -FILE 1908 f:\sp\public\sdk\inc\winsvc.h -FILE 1909 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1910 f:\sp\public\sdk\inc\wingdi.h -FILE 1911 f:\sp\public\sdk\inc\winbase.h -FILE 1912 f:\sp\public\sdk\inc\winerror.h -FILE 1913 f:\sp\public\sdk\inc\pshpack1.h -FILE 1914 f:\sp\public\sdk\inc\pshpack8.h -FILE 1915 f:\sp\public\sdk\inc\winver.h -FILE 1916 f:\sp\public\sdk\inc\pshpack2.h -FILE 1917 f:\sp\public\sdk\inc\winreg.h -FILE 1918 f:\sp\public\sdk\inc\guiddef.h -FILE 1919 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1920 f:\sp\public\sdk\inc\specstrings.h -FILE 1921 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1922 f:\sp\public\sdk\inc\basetsd.h -FILE 1923 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1924 f:\sp\public\sdk\inc\windows.h -FILE 1925 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 1926 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 1927 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1928 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1929 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1930 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1931 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1932 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 1933 f:\sp\public\sdk\inc\pshpack4.h -FILE 1934 f:\sp\public\sdk\inc\reason.h -FILE 1935 f:\sp\public\sdk\inc\wincon.h -FILE 1936 f:\sp\public\sdk\inc\poppack.h -FILE 1937 f:\sp\vctools\crt_bld\self_x86\crt\src\inithelp.c -FILE 1938 f:\sp\public\sdk\inc\mcx.h -FILE 1939 f:\sp\public\sdk\inc\winuser.h -FILE 1940 f:\sp\public\sdk\inc\winnls.h -FILE 1941 f:\sp\public\sdk\inc\stralign.h -FILE 1942 f:\sp\public\sdk\inc\tvout.h -FILE 1943 f:\sp\public\sdk\inc\winsvc.h -FILE 1944 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1945 f:\sp\public\sdk\inc\wingdi.h -FILE 1946 f:\sp\public\sdk\inc\windef.h -FILE 1947 f:\sp\public\sdk\inc\ddbanned.h -FILE 1948 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1949 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1950 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 1951 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1952 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1953 f:\sp\public\sdk\inc\winnetwk.h -FILE 1954 f:\sp\public\sdk\inc\imm.h -FILE 1955 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1956 f:\sp\public\sdk\inc\winnt.h -FILE 1957 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1958 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 1959 f:\sp\public\sdk\inc\pshpack4.h -FILE 1960 f:\sp\public\sdk\inc\poppack.h -FILE 1961 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 1962 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 1963 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 1964 f:\sp\public\sdk\inc\winnetwk.h -FILE 1965 f:\sp\public\sdk\inc\imm.h -FILE 1966 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 1967 f:\sp\public\sdk\inc\windef.h -FILE 1968 f:\sp\public\sdk\inc\pshpack1.h -FILE 1969 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 1970 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 1971 f:\sp\public\sdk\inc\winver.h -FILE 1972 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 1973 f:\sp\public\sdk\inc\winnt.h -FILE 1974 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 1975 f:\sp\public\sdk\inc\winreg.h -FILE 1976 f:\sp\vctools\crt_bld\self_x86\crt\src\initctyp.c -FILE 1977 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 1978 f:\sp\public\sdk\inc\winbase.h -FILE 1979 f:\sp\public\sdk\inc\winerror.h -FILE 1980 f:\sp\public\sdk\inc\pshpack8.h -FILE 1981 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 1982 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 1983 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 1984 f:\sp\public\sdk\inc\reason.h -FILE 1985 f:\sp\public\sdk\inc\ddbanned.h -FILE 1986 f:\sp\public\sdk\inc\wincon.h -FILE 1987 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 1988 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 1989 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 1990 f:\sp\public\sdk\inc\pshpack2.h -FILE 1991 f:\sp\public\sdk\inc\mcx.h -FILE 1992 f:\sp\public\sdk\inc\winuser.h -FILE 1993 f:\sp\public\sdk\inc\winnls.h -FILE 1994 f:\sp\public\sdk\inc\guiddef.h -FILE 1995 f:\sp\public\sdk\inc\stralign.h -FILE 1996 f:\sp\public\sdk\inc\specstrings.h -FILE 1997 f:\sp\public\sdk\inc\basetsd.h -FILE 1998 f:\sp\public\sdk\inc\windows.h -FILE 1999 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2000 f:\sp\public\sdk\inc\tvout.h -FILE 2001 f:\sp\public\sdk\inc\winsvc.h -FILE 2002 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2003 f:\sp\public\sdk\inc\wingdi.h -FILE 2004 f:\sp\public\sdk\inc\poppack.h -FILE 2005 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2006 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2007 f:\sp\public\sdk\inc\winnetwk.h -FILE 2008 f:\sp\public\sdk\inc\imm.h -FILE 2009 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2010 f:\sp\public\sdk\inc\windef.h -FILE 2011 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2012 f:\sp\public\sdk\inc\pshpack1.h -FILE 2013 f:\sp\public\sdk\inc\winver.h -FILE 2014 f:\sp\public\sdk\inc\windows.h -FILE 2015 f:\sp\public\sdk\inc\winnt.h -FILE 2016 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2017 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2018 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2019 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2020 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2021 f:\sp\public\sdk\inc\winreg.h -FILE 2022 f:\sp\public\sdk\inc\winbase.h -FILE 2023 f:\sp\vctools\crt_bld\self_x86\crt\src\initcrit.c -FILE 2024 f:\sp\public\sdk\inc\winerror.h -FILE 2025 f:\sp\public\sdk\inc\pshpack8.h -FILE 2026 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2027 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2028 f:\sp\public\sdk\inc\reason.h -FILE 2029 f:\sp\public\sdk\inc\wincon.h -FILE 2030 f:\sp\public\sdk\inc\ddbanned.h -FILE 2031 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2032 f:\sp\public\sdk\inc\pshpack2.h -FILE 2033 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2034 f:\sp\public\sdk\inc\mcx.h -FILE 2035 f:\sp\public\sdk\inc\winuser.h -FILE 2036 f:\sp\public\sdk\inc\winnls.h -FILE 2037 f:\sp\public\sdk\inc\guiddef.h -FILE 2038 f:\sp\public\sdk\inc\specstrings.h -FILE 2039 f:\sp\public\sdk\inc\basetsd.h -FILE 2040 f:\sp\public\sdk\inc\stralign.h -FILE 2041 f:\sp\public\sdk\inc\tvout.h -FILE 2042 f:\sp\public\sdk\inc\winsvc.h -FILE 2043 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2044 f:\sp\public\sdk\inc\wingdi.h -FILE 2045 f:\sp\public\sdk\inc\pshpack4.h -FILE 2046 f:\sp\public\sdk\inc\poppack.h -FILE 2047 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2048 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2049 f:\sp\public\sdk\inc\winnetwk.h -FILE 2050 f:\sp\public\sdk\inc\imm.h -FILE 2051 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2052 f:\sp\public\sdk\inc\windef.h -FILE 2053 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2054 f:\sp\public\sdk\inc\pshpack1.h -FILE 2055 f:\sp\public\sdk\inc\winver.h -FILE 2056 f:\sp\public\sdk\inc\windows.h -FILE 2057 f:\sp\public\sdk\inc\winnt.h -FILE 2058 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2059 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2060 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2061 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2062 f:\sp\public\sdk\inc\winreg.h -FILE 2063 f:\sp\public\sdk\inc\winbase.h -FILE 2064 f:\sp\vctools\crt_bld\self_x86\crt\src\initcoll.c -FILE 2065 f:\sp\public\sdk\inc\winerror.h -FILE 2066 f:\sp\public\sdk\inc\pshpack8.h -FILE 2067 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2068 f:\sp\public\sdk\inc\reason.h -FILE 2069 f:\sp\public\sdk\inc\wincon.h -FILE 2070 f:\sp\public\sdk\inc\ddbanned.h -FILE 2071 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2072 f:\sp\public\sdk\inc\pshpack2.h -FILE 2073 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2074 f:\sp\public\sdk\inc\mcx.h -FILE 2075 f:\sp\public\sdk\inc\winuser.h -FILE 2076 f:\sp\public\sdk\inc\winnls.h -FILE 2077 f:\sp\public\sdk\inc\guiddef.h -FILE 2078 f:\sp\public\sdk\inc\specstrings.h -FILE 2079 f:\sp\public\sdk\inc\basetsd.h -FILE 2080 f:\sp\public\sdk\inc\stralign.h -FILE 2081 f:\sp\public\sdk\inc\tvout.h -FILE 2082 f:\sp\public\sdk\inc\winsvc.h -FILE 2083 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2084 f:\sp\public\sdk\inc\wingdi.h -FILE 2085 f:\sp\public\sdk\inc\pshpack4.h -FILE 2086 f:\sp\public\sdk\inc\poppack.h -FILE 2087 f:\sp\public\sdk\inc\winnetwk.h -FILE 2088 f:\sp\public\sdk\inc\imm.h -FILE 2089 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2090 f:\sp\public\sdk\inc\windef.h -FILE 2091 f:\binaries.x86ret\vcboot\inc\mm3dnow.h -FILE 2092 f:\sp\public\sdk\inc\pshpack1.h -FILE 2093 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2094 f:\sp\public\sdk\inc\winver.h -FILE 2095 f:\sp\public\sdk\inc\windows.h -FILE 2096 f:\sp\public\sdk\inc\winnt.h -FILE 2097 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2098 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2099 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2100 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2101 f:\sp\public\sdk\inc\winreg.h -FILE 2102 f:\sp\public\sdk\inc\winbase.h -FILE 2103 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_support.c -FILE 2104 f:\sp\public\sdk\inc\winerror.h -FILE 2105 f:\sp\public\sdk\inc\pshpack8.h -FILE 2106 f:\sp\vctools\crt_bld\self_x86\crt\src\intrin.h -FILE 2107 f:\sp\vctools\crt_bld\self_x86\crt\src\setjmp.h -FILE 2108 f:\sp\public\sdk\inc\reason.h -FILE 2109 f:\sp\public\sdk\inc\wincon.h -FILE 2110 f:\sp\public\sdk\inc\ddbanned.h -FILE 2111 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2112 f:\sp\public\sdk\inc\pshpack2.h -FILE 2113 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2114 f:\sp\public\sdk\inc\mcx.h -FILE 2115 f:\sp\public\sdk\inc\winuser.h -FILE 2116 f:\sp\public\sdk\inc\winnls.h -FILE 2117 f:\sp\public\sdk\inc\guiddef.h -FILE 2118 f:\sp\public\sdk\inc\specstrings.h -FILE 2119 f:\sp\public\sdk\inc\basetsd.h -FILE 2120 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 2121 f:\sp\public\sdk\inc\stralign.h -FILE 2122 f:\sp\public\sdk\inc\tvout.h -FILE 2123 f:\sp\public\sdk\inc\winsvc.h -FILE 2124 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2125 f:\sp\public\sdk\inc\wingdi.h -FILE 2126 f:\binaries.x86ret\vcboot\inc\emmintrin.h -FILE 2127 f:\binaries.x86ret\vcboot\inc\xmmintrin.h -FILE 2128 f:\binaries.x86ret\vcboot\inc\mmintrin.h -FILE 2129 f:\sp\public\sdk\inc\pshpack4.h -FILE 2130 f:\sp\public\sdk\inc\poppack.h -FILE 2131 f:\sp\public\sdk\inc\winnetwk.h -FILE 2132 f:\sp\public\sdk\inc\imm.h -FILE 2133 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2134 f:\sp\public\sdk\inc\windef.h -FILE 2135 f:\sp\public\sdk\inc\pshpack1.h -FILE 2136 f:\sp\public\sdk\inc\winver.h -FILE 2137 f:\sp\public\sdk\inc\windows.h -FILE 2138 f:\sp\public\sdk\inc\winnt.h -FILE 2139 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2140 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2141 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2142 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2143 f:\sp\public\sdk\inc\winreg.h -FILE 2144 f:\sp\public\sdk\inc\winbase.h -FILE 2145 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_report.c -FILE 2146 f:\sp\public\sdk\inc\winerror.h -FILE 2147 f:\sp\public\sdk\inc\pshpack8.h -FILE 2148 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2149 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2150 f:\sp\public\sdk\inc\reason.h -FILE 2151 f:\sp\public\sdk\inc\wincon.h -FILE 2152 f:\sp\public\sdk\inc\ddbanned.h -FILE 2153 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2154 f:\sp\public\sdk\inc\pshpack2.h -FILE 2155 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2156 f:\sp\public\sdk\inc\mcx.h -FILE 2157 f:\sp\public\sdk\inc\winuser.h -FILE 2158 f:\sp\public\sdk\inc\winnls.h -FILE 2159 f:\sp\public\sdk\inc\guiddef.h -FILE 2160 f:\sp\public\sdk\inc\specstrings.h -FILE 2161 f:\sp\public\sdk\inc\basetsd.h -FILE 2162 f:\sp\public\sdk\inc\stralign.h -FILE 2163 f:\sp\public\sdk\inc\tvout.h -FILE 2164 f:\sp\public\sdk\inc\winsvc.h -FILE 2165 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2166 f:\sp\public\sdk\inc\wingdi.h -FILE 2167 f:\sp\public\sdk\inc\pshpack4.h -FILE 2168 f:\sp\public\sdk\inc\poppack.h -FILE 2169 f:\sp\public\sdk\inc\winnetwk.h -FILE 2170 f:\sp\public\sdk\inc\imm.h -FILE 2171 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2172 f:\sp\public\sdk\inc\windef.h -FILE 2173 f:\sp\public\sdk\inc\pshpack1.h -FILE 2174 f:\sp\public\sdk\inc\winver.h -FILE 2175 f:\sp\public\sdk\inc\windows.h -FILE 2176 f:\sp\public\sdk\inc\winnt.h -FILE 2177 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2178 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2179 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2180 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2181 f:\sp\public\sdk\inc\winreg.h -FILE 2182 f:\sp\public\sdk\inc\winbase.h -FILE 2183 f:\sp\vctools\crt_bld\self_x86\crt\src\gs_cookie.c -FILE 2184 f:\sp\public\sdk\inc\winerror.h -FILE 2185 f:\sp\public\sdk\inc\pshpack8.h -FILE 2186 f:\sp\public\sdk\inc\reason.h -FILE 2187 f:\sp\public\sdk\inc\wincon.h -FILE 2188 f:\sp\public\sdk\inc\ddbanned.h -FILE 2189 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2190 f:\sp\public\sdk\inc\pshpack2.h -FILE 2191 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2192 f:\sp\public\sdk\inc\mcx.h -FILE 2193 f:\sp\public\sdk\inc\winuser.h -FILE 2194 f:\sp\public\sdk\inc\winnls.h -FILE 2195 f:\sp\public\sdk\inc\guiddef.h -FILE 2196 f:\sp\public\sdk\inc\specstrings.h -FILE 2197 f:\sp\public\sdk\inc\basetsd.h -FILE 2198 f:\sp\public\sdk\inc\stralign.h -FILE 2199 f:\sp\public\sdk\inc\tvout.h -FILE 2200 f:\sp\public\sdk\inc\winsvc.h -FILE 2201 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2202 f:\sp\public\sdk\inc\wingdi.h -FILE 2203 f:\sp\public\sdk\inc\pshpack4.h -FILE 2204 f:\sp\public\sdk\inc\winerror.h -FILE 2205 f:\sp\public\sdk\inc\pshpack1.h -FILE 2206 f:\sp\public\sdk\inc\pshpack8.h -FILE 2207 f:\sp\public\sdk\inc\winver.h -FILE 2208 f:\sp\public\sdk\inc\pshpack2.h -FILE 2209 f:\sp\public\sdk\inc\winreg.h -FILE 2210 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2211 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2212 f:\sp\public\sdk\inc\guiddef.h -FILE 2213 f:\sp\public\sdk\inc\windows.h -FILE 2214 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2215 f:\sp\public\sdk\inc\specstrings.h -FILE 2216 f:\sp\public\sdk\inc\basetsd.h -FILE 2217 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2218 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2219 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2220 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2221 f:\sp\public\sdk\inc\pshpack4.h -FILE 2222 f:\sp\public\sdk\inc\reason.h -FILE 2223 f:\sp\public\sdk\inc\wincon.h -FILE 2224 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2225 f:\sp\public\sdk\inc\poppack.h -FILE 2226 f:\sp\public\sdk\inc\mcx.h -FILE 2227 f:\sp\public\sdk\inc\winuser.h -FILE 2228 f:\sp\public\sdk\inc\winnls.h -FILE 2229 f:\sp\vctools\crt_bld\self_x86\crt\src\glstatus.c -FILE 2230 f:\sp\public\sdk\inc\stralign.h -FILE 2231 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2232 f:\sp\public\sdk\inc\windef.h -FILE 2233 f:\sp\public\sdk\inc\tvout.h -FILE 2234 f:\sp\public\sdk\inc\winsvc.h -FILE 2235 f:\sp\public\sdk\inc\wingdi.h -FILE 2236 f:\sp\public\sdk\inc\ddbanned.h -FILE 2237 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2238 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2239 f:\sp\public\sdk\inc\winnt.h -FILE 2240 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2241 f:\sp\public\sdk\inc\winnetwk.h -FILE 2242 f:\sp\public\sdk\inc\imm.h -FILE 2243 f:\sp\public\sdk\inc\winbase.h -FILE 2244 f:\sp\public\sdk\inc\pshpack4.h -FILE 2245 f:\sp\public\sdk\inc\poppack.h -FILE 2246 f:\sp\public\sdk\inc\winnt.h -FILE 2247 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2248 f:\sp\public\sdk\inc\winnetwk.h -FILE 2249 f:\sp\public\sdk\inc\imm.h -FILE 2250 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2251 f:\sp\public\sdk\inc\pshpack1.h -FILE 2252 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2253 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2254 f:\sp\public\sdk\inc\winver.h -FILE 2255 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2256 f:\sp\public\sdk\inc\guiddef.h -FILE 2257 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2258 f:\sp\public\sdk\inc\specstrings.h -FILE 2259 f:\sp\public\sdk\inc\basetsd.h -FILE 2260 f:\sp\public\sdk\inc\windows.h -FILE 2261 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2262 f:\sp\public\sdk\inc\winreg.h -FILE 2263 f:\sp\vctools\crt_bld\self_x86\crt\src\getqloc.c -FILE 2264 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2265 f:\sp\public\sdk\inc\winbase.h -FILE 2266 f:\sp\public\sdk\inc\winerror.h -FILE 2267 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2268 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2269 f:\sp\public\sdk\inc\pshpack8.h -FILE 2270 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2271 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2272 f:\sp\public\sdk\inc\reason.h -FILE 2273 f:\sp\public\sdk\inc\ddbanned.h -FILE 2274 f:\sp\public\sdk\inc\wincon.h -FILE 2275 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2276 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2277 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2278 f:\sp\public\sdk\inc\pshpack2.h -FILE 2279 f:\sp\public\sdk\inc\mcx.h -FILE 2280 f:\sp\public\sdk\inc\winuser.h -FILE 2281 f:\sp\public\sdk\inc\winnls.h -FILE 2282 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2283 f:\sp\public\sdk\inc\windef.h -FILE 2284 f:\sp\public\sdk\inc\stralign.h -FILE 2285 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2286 f:\sp\public\sdk\inc\tvout.h -FILE 2287 f:\sp\public\sdk\inc\winsvc.h -FILE 2288 f:\sp\public\sdk\inc\wingdi.h -FILE 2289 f:\sp\public\sdk\inc\reason.h -FILE 2290 f:\sp\public\sdk\inc\wincon.h -FILE 2291 f:\sp\public\sdk\inc\pshpack2.h -FILE 2292 f:\sp\public\sdk\inc\mcx.h -FILE 2293 f:\sp\public\sdk\inc\winuser.h -FILE 2294 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2295 f:\sp\public\sdk\inc\winnls.h -FILE 2296 f:\sp\public\sdk\inc\guiddef.h -FILE 2297 f:\sp\public\sdk\inc\windows.h -FILE 2298 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2299 f:\sp\public\sdk\inc\specstrings.h -FILE 2300 f:\sp\public\sdk\inc\basetsd.h -FILE 2301 f:\sp\public\sdk\inc\stralign.h -FILE 2302 f:\sp\public\sdk\inc\tvout.h -FILE 2303 f:\sp\public\sdk\inc\winsvc.h -FILE 2304 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2305 f:\sp\public\sdk\inc\wingdi.h -FILE 2306 f:\sp\public\sdk\inc\pshpack4.h -FILE 2307 f:\sp\public\sdk\inc\poppack.h -FILE 2308 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 2309 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2310 f:\sp\public\sdk\inc\winnetwk.h -FILE 2311 f:\sp\public\sdk\inc\imm.h -FILE 2312 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2313 f:\sp\public\sdk\inc\windef.h -FILE 2314 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2315 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2316 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2317 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2318 f:\sp\vctools\crt_bld\self_x86\crt\src\getenv.c -FILE 2319 f:\sp\public\sdk\inc\pshpack1.h -FILE 2320 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2321 f:\sp\public\sdk\inc\winver.h -FILE 2322 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2323 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2324 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2325 f:\sp\public\sdk\inc\winnt.h -FILE 2326 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2327 f:\sp\public\sdk\inc\ddbanned.h -FILE 2328 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2329 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2330 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2331 f:\sp\public\sdk\inc\winreg.h -FILE 2332 f:\sp\public\sdk\inc\winbase.h -FILE 2333 f:\sp\public\sdk\inc\winerror.h -FILE 2334 f:\sp\public\sdk\inc\pshpack8.h -FILE 2335 f:\sp\public\sdk\inc\poppack.h -FILE 2336 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2337 f:\sp\public\sdk\inc\winnetwk.h -FILE 2338 f:\sp\public\sdk\inc\imm.h -FILE 2339 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2340 f:\sp\public\sdk\inc\windef.h -FILE 2341 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2342 f:\sp\public\sdk\inc\pshpack1.h -FILE 2343 f:\sp\public\sdk\inc\winver.h -FILE 2344 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2345 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2346 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2347 f:\sp\public\sdk\inc\winnt.h -FILE 2348 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2349 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2350 f:\sp\public\sdk\inc\winreg.h -FILE 2351 f:\sp\vctools\crt_bld\self_x86\crt\src\errmode.c -FILE 2352 f:\sp\public\sdk\inc\winbase.h -FILE 2353 f:\sp\public\sdk\inc\winerror.h -FILE 2354 f:\sp\public\sdk\inc\pshpack8.h -FILE 2355 f:\sp\public\sdk\inc\reason.h -FILE 2356 f:\sp\public\sdk\inc\wincon.h -FILE 2357 f:\sp\public\sdk\inc\ddbanned.h -FILE 2358 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2359 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2360 f:\sp\public\sdk\inc\pshpack2.h -FILE 2361 f:\sp\public\sdk\inc\mcx.h -FILE 2362 f:\sp\public\sdk\inc\winuser.h -FILE 2363 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2364 f:\sp\public\sdk\inc\winnls.h -FILE 2365 f:\sp\public\sdk\inc\guiddef.h -FILE 2366 f:\sp\public\sdk\inc\windows.h -FILE 2367 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2368 f:\sp\public\sdk\inc\specstrings.h -FILE 2369 f:\sp\public\sdk\inc\basetsd.h -FILE 2370 f:\sp\public\sdk\inc\stralign.h -FILE 2371 f:\sp\public\sdk\inc\tvout.h -FILE 2372 f:\sp\public\sdk\inc\winsvc.h -FILE 2373 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2374 f:\sp\public\sdk\inc\wingdi.h -FILE 2375 f:\sp\public\sdk\inc\pshpack4.h -FILE 2376 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2377 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2378 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2379 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2380 f:\sp\vctools\crt_bld\self_x86\crt\src\dbghook.c -FILE 2381 f:\sp\public\sdk\inc\ddbanned.h -FILE 2382 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2383 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2384 f:\sp\public\sdk\inc\poppack.h -FILE 2385 f:\sp\public\sdk\inc\winnetwk.h -FILE 2386 f:\sp\public\sdk\inc\imm.h -FILE 2387 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2388 f:\sp\public\sdk\inc\windef.h -FILE 2389 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2390 f:\sp\public\sdk\inc\pshpack1.h -FILE 2391 f:\sp\public\sdk\inc\winver.h -FILE 2392 f:\sp\public\sdk\inc\windows.h -FILE 2393 f:\sp\public\sdk\inc\winnt.h -FILE 2394 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2395 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2396 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2397 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2398 f:\sp\public\sdk\inc\winreg.h -FILE 2399 f:\sp\vctools\crt_bld\self_x86\crt\src\wchar.h -FILE 2400 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.c -FILE 2401 f:\sp\public\sdk\inc\winbase.h -FILE 2402 f:\sp\vctools\crt_bld\self_x86\crt\src\wtime.inl -FILE 2403 f:\sp\public\sdk\inc\winerror.h -FILE 2404 f:\sp\public\sdk\inc\pshpack8.h -FILE 2405 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2406 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2407 f:\sp\public\sdk\inc\reason.h -FILE 2408 f:\sp\public\sdk\inc\wincon.h -FILE 2409 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2410 f:\sp\public\sdk\inc\ddbanned.h -FILE 2411 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2412 f:\sp\public\sdk\inc\pshpack2.h -FILE 2413 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2414 f:\sp\public\sdk\inc\mcx.h -FILE 2415 f:\sp\public\sdk\inc\winuser.h -FILE 2416 f:\sp\public\sdk\inc\winnls.h -FILE 2417 f:\sp\public\sdk\inc\guiddef.h -FILE 2418 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 2419 f:\sp\public\sdk\inc\specstrings.h -FILE 2420 f:\sp\public\sdk\inc\basetsd.h -FILE 2421 f:\sp\public\sdk\inc\stralign.h -FILE 2422 f:\sp\public\sdk\inc\tvout.h -FILE 2423 f:\sp\public\sdk\inc\winsvc.h -FILE 2424 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2425 f:\sp\public\sdk\inc\wingdi.h -FILE 2426 f:\sp\public\sdk\inc\pshpack4.h -FILE 2427 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2428 f:\sp\public\sdk\inc\mcx.h -FILE 2429 f:\sp\public\sdk\inc\winuser.h -FILE 2430 f:\sp\public\sdk\inc\winnls.h -FILE 2431 f:\sp\public\sdk\inc\stralign.h -FILE 2432 f:\sp\public\sdk\inc\tvout.h -FILE 2433 f:\sp\public\sdk\inc\winsvc.h -FILE 2434 f:\sp\public\sdk\inc\wingdi.h -FILE 2435 f:\sp\public\sdk\inc\pshpack4.h -FILE 2436 f:\sp\public\sdk\inc\winnt.h -FILE 2437 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2438 f:\sp\public\sdk\inc\poppack.h -FILE 2439 f:\sp\public\sdk\inc\winnetwk.h -FILE 2440 f:\sp\public\sdk\inc\imm.h -FILE 2441 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 2442 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2443 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2444 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2445 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2446 f:\sp\public\sdk\inc\pshpack1.h -FILE 2447 f:\sp\vctools\crt_bld\self_x86\crt\src\crtmbox.c -FILE 2448 f:\sp\public\sdk\inc\winver.h -FILE 2449 f:\sp\public\sdk\inc\guiddef.h -FILE 2450 f:\sp\public\sdk\inc\windows.h -FILE 2451 f:\sp\public\sdk\inc\specstrings.h -FILE 2452 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2453 f:\sp\public\sdk\inc\basetsd.h -FILE 2454 f:\sp\public\sdk\inc\winreg.h -FILE 2455 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2456 f:\sp\public\sdk\inc\winbase.h -FILE 2457 f:\sp\public\sdk\inc\ddbanned.h -FILE 2458 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2459 f:\sp\public\sdk\inc\winerror.h -FILE 2460 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2461 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2462 f:\sp\public\sdk\inc\pshpack8.h -FILE 2463 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2464 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2465 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2466 f:\sp\public\sdk\inc\reason.h -FILE 2467 f:\sp\public\sdk\inc\wincon.h -FILE 2468 f:\sp\public\sdk\inc\pshpack2.h -FILE 2469 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2470 f:\sp\public\sdk\inc\windef.h -FILE 2471 f:\sp\public\sdk\inc\poppack.h -FILE 2472 f:\sp\vctools\crt_bld\self_x86\crt\src\fltintrn.h -FILE 2473 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2474 f:\sp\public\sdk\inc\winnetwk.h -FILE 2475 f:\sp\public\sdk\inc\imm.h -FILE 2476 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2477 f:\sp\public\sdk\inc\windef.h -FILE 2478 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2479 f:\sp\public\sdk\inc\pshpack1.h -FILE 2480 f:\sp\public\sdk\inc\winver.h -FILE 2481 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2482 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2483 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2484 f:\sp\public\sdk\inc\winnt.h -FILE 2485 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2486 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2487 f:\sp\public\sdk\inc\winreg.h -FILE 2488 f:\sp\vctools\crt_bld\self_x86\crt\src\cmiscdat.c -FILE 2489 f:\sp\public\sdk\inc\winbase.h -FILE 2490 f:\sp\public\sdk\inc\winerror.h -FILE 2491 f:\sp\public\sdk\inc\pshpack8.h -FILE 2492 f:\sp\public\sdk\inc\reason.h -FILE 2493 f:\sp\public\sdk\inc\wincon.h -FILE 2494 f:\sp\public\sdk\inc\ddbanned.h -FILE 2495 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2496 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2497 f:\sp\public\sdk\inc\pshpack2.h -FILE 2498 f:\sp\public\sdk\inc\mcx.h -FILE 2499 f:\sp\public\sdk\inc\winuser.h -FILE 2500 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2501 f:\sp\public\sdk\inc\winnls.h -FILE 2502 f:\sp\public\sdk\inc\guiddef.h -FILE 2503 f:\sp\public\sdk\inc\windows.h -FILE 2504 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2505 f:\sp\public\sdk\inc\specstrings.h -FILE 2506 f:\sp\public\sdk\inc\basetsd.h -FILE 2507 f:\sp\public\sdk\inc\stralign.h -FILE 2508 f:\sp\public\sdk\inc\tvout.h -FILE 2509 f:\sp\public\sdk\inc\winsvc.h -FILE 2510 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2511 f:\sp\public\sdk\inc\wingdi.h -FILE 2512 f:\sp\public\sdk\inc\pshpack4.h -FILE 2513 f:\sp\public\sdk\inc\pshpack4.h -FILE 2514 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 2515 f:\sp\vctools\crt_bld\self_x86\crt\src\signal.h -FILE 2516 f:\sp\public\sdk\inc\poppack.h -FILE 2517 f:\sp\public\sdk\inc\winnetwk.h -FILE 2518 f:\sp\public\sdk\inc\imm.h -FILE 2519 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2520 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2521 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2522 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2523 f:\sp\public\sdk\inc\windef.h -FILE 2524 f:\sp\public\sdk\inc\pshpack1.h -FILE 2525 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2526 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2527 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2528 f:\sp\public\sdk\inc\winver.h -FILE 2529 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2530 f:\sp\public\sdk\inc\winnt.h -FILE 2531 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2532 f:\sp\public\sdk\inc\winreg.h -FILE 2533 f:\sp\vctools\crt_bld\self_x86\crt\src\abort.c -FILE 2534 f:\sp\public\sdk\inc\winbase.h -FILE 2535 f:\sp\public\sdk\inc\winerror.h -FILE 2536 f:\sp\public\sdk\inc\pshpack8.h -FILE 2537 f:\sp\public\sdk\inc\reason.h -FILE 2538 f:\sp\public\sdk\inc\ddbanned.h -FILE 2539 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2540 f:\sp\public\sdk\inc\wincon.h -FILE 2541 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2542 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2543 f:\sp\public\sdk\inc\pshpack2.h -FILE 2544 f:\sp\public\sdk\inc\mcx.h -FILE 2545 f:\sp\public\sdk\inc\winuser.h -FILE 2546 f:\sp\public\sdk\inc\winnls.h -FILE 2547 f:\sp\public\sdk\inc\guiddef.h -FILE 2548 f:\sp\public\sdk\inc\stralign.h -FILE 2549 f:\sp\public\sdk\inc\specstrings.h -FILE 2550 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2551 f:\sp\public\sdk\inc\basetsd.h -FILE 2552 f:\sp\public\sdk\inc\windows.h -FILE 2553 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2554 f:\sp\public\sdk\inc\tvout.h -FILE 2555 f:\sp\public\sdk\inc\winsvc.h -FILE 2556 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2557 f:\sp\public\sdk\inc\wingdi.h -FILE 2558 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2559 f:\sp\public\sdk\inc\wincon.h -FILE 2560 f:\sp\public\sdk\inc\imm.h -FILE 2561 f:\sp\public\sdk\inc\winbase.h -FILE 2562 f:\sp\public\sdk\inc\wingdi.h -FILE 2563 f:\sp\public\sdk\inc\winver.h -FILE 2564 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2565 f:\sp\public\sdk\inc\windows.h -FILE 2566 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2567 f:\sp\public\sdk\inc\pshpack2.h -FILE 2568 f:\sp\public\sdk\inc\reason.h -FILE 2569 f:\sp\vctools\crt_bld\self_x86\crt\src\a_str.c -FILE 2570 f:\sp\public\sdk\inc\specstrings.h -FILE 2571 f:\sp\public\sdk\inc\basetsd.h -FILE 2572 f:\sp\public\sdk\inc\pshpack4.h -FILE 2573 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2574 f:\sp\public\sdk\inc\winnetwk.h -FILE 2575 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2576 f:\sp\public\sdk\inc\stralign.h -FILE 2577 f:\sp\public\sdk\inc\poppack.h -FILE 2578 f:\sp\public\sdk\inc\winsvc.h -FILE 2579 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2580 f:\sp\public\sdk\inc\windef.h -FILE 2581 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2582 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2583 f:\sp\public\sdk\inc\winuser.h -FILE 2584 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2585 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2586 f:\sp\public\sdk\inc\mcx.h -FILE 2587 f:\sp\public\sdk\inc\pshpack8.h -FILE 2588 f:\sp\public\sdk\inc\guiddef.h -FILE 2589 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2590 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2591 f:\sp\public\sdk\inc\winnt.h -FILE 2592 f:\sp\public\sdk\inc\winnls.h -FILE 2593 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2594 f:\sp\public\sdk\inc\pshpack1.h -FILE 2595 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2596 f:\sp\public\sdk\inc\winerror.h -FILE 2597 f:\sp\public\sdk\inc\winreg.h -FILE 2598 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2599 f:\sp\public\sdk\inc\ddbanned.h -FILE 2600 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2601 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2602 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2603 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2604 f:\sp\public\sdk\inc\tvout.h -FILE 2605 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2606 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2607 f:\sp\public\sdk\inc\wincon.h -FILE 2608 f:\sp\public\sdk\inc\imm.h -FILE 2609 f:\sp\public\sdk\inc\winbase.h -FILE 2610 f:\sp\public\sdk\inc\wingdi.h -FILE 2611 f:\sp\public\sdk\inc\winver.h -FILE 2612 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2613 f:\sp\public\sdk\inc\windows.h -FILE 2614 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2615 f:\sp\public\sdk\inc\pshpack2.h -FILE 2616 f:\sp\public\sdk\inc\reason.h -FILE 2617 f:\sp\vctools\crt_bld\self_x86\crt\src\a_map.c -FILE 2618 f:\sp\public\sdk\inc\specstrings.h -FILE 2619 f:\sp\public\sdk\inc\basetsd.h -FILE 2620 f:\sp\public\sdk\inc\pshpack4.h -FILE 2621 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2622 f:\sp\public\sdk\inc\winnetwk.h -FILE 2623 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2624 f:\sp\public\sdk\inc\stralign.h -FILE 2625 f:\sp\public\sdk\inc\poppack.h -FILE 2626 f:\sp\public\sdk\inc\winsvc.h -FILE 2627 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2628 f:\sp\public\sdk\inc\windef.h -FILE 2629 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2630 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2631 f:\sp\public\sdk\inc\winuser.h -FILE 2632 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2633 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2634 f:\sp\public\sdk\inc\mcx.h -FILE 2635 f:\sp\public\sdk\inc\pshpack8.h -FILE 2636 f:\sp\public\sdk\inc\guiddef.h -FILE 2637 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2638 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2639 f:\sp\public\sdk\inc\winnt.h -FILE 2640 f:\sp\public\sdk\inc\winnls.h -FILE 2641 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2642 f:\sp\public\sdk\inc\pshpack1.h -FILE 2643 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2644 f:\sp\public\sdk\inc\winerror.h -FILE 2645 f:\sp\public\sdk\inc\winreg.h -FILE 2646 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2647 f:\sp\public\sdk\inc\ddbanned.h -FILE 2648 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2649 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2650 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2651 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2652 f:\sp\public\sdk\inc\tvout.h -FILE 2653 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2654 f:\sp\public\sdk\inc\wincon.h -FILE 2655 f:\sp\public\sdk\inc\imm.h -FILE 2656 f:\sp\public\sdk\inc\winbase.h -FILE 2657 f:\sp\public\sdk\inc\wingdi.h -FILE 2658 f:\sp\public\sdk\inc\winver.h -FILE 2659 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2660 f:\sp\public\sdk\inc\windows.h -FILE 2661 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2662 f:\sp\public\sdk\inc\pshpack2.h -FILE 2663 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2664 f:\sp\public\sdk\inc\reason.h -FILE 2665 f:\sp\vctools\crt_bld\self_x86\crt\src\a_loc.c -FILE 2666 f:\sp\public\sdk\inc\specstrings.h -FILE 2667 f:\sp\public\sdk\inc\basetsd.h -FILE 2668 f:\sp\public\sdk\inc\pshpack4.h -FILE 2669 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2670 f:\sp\public\sdk\inc\winnetwk.h -FILE 2671 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2672 f:\sp\public\sdk\inc\stralign.h -FILE 2673 f:\sp\public\sdk\inc\poppack.h -FILE 2674 f:\sp\public\sdk\inc\winsvc.h -FILE 2675 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2676 f:\sp\public\sdk\inc\windef.h -FILE 2677 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2678 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2679 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2680 f:\sp\public\sdk\inc\winuser.h -FILE 2681 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2682 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2683 f:\sp\public\sdk\inc\mcx.h -FILE 2684 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2685 f:\sp\public\sdk\inc\pshpack8.h -FILE 2686 f:\sp\public\sdk\inc\guiddef.h -FILE 2687 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2688 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2689 f:\sp\public\sdk\inc\winnt.h -FILE 2690 f:\sp\public\sdk\inc\winnls.h -FILE 2691 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2692 f:\sp\public\sdk\inc\pshpack1.h -FILE 2693 f:\sp\public\sdk\inc\winerror.h -FILE 2694 f:\sp\public\sdk\inc\winreg.h -FILE 2695 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2696 f:\sp\public\sdk\inc\ddbanned.h -FILE 2697 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2698 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2699 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2700 f:\sp\public\sdk\inc\tvout.h -FILE 2701 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2702 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2703 f:\sp\public\sdk\inc\poppack.h -FILE 2704 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2705 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2706 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2707 f:\sp\public\sdk\inc\winnetwk.h -FILE 2708 f:\sp\public\sdk\inc\imm.h -FILE 2709 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2710 f:\sp\public\sdk\inc\windef.h -FILE 2711 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2712 f:\sp\public\sdk\inc\pshpack1.h -FILE 2713 f:\sp\public\sdk\inc\winver.h -FILE 2714 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2715 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2716 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2717 f:\sp\public\sdk\inc\winnt.h -FILE 2718 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2719 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2720 f:\sp\public\sdk\inc\winreg.h -FILE 2721 f:\sp\vctools\crt_bld\self_x86\crt\src\a_env.c -FILE 2722 f:\sp\public\sdk\inc\winbase.h -FILE 2723 f:\sp\public\sdk\inc\winerror.h -FILE 2724 f:\sp\public\sdk\inc\pshpack8.h -FILE 2725 f:\sp\public\sdk\inc\reason.h -FILE 2726 f:\sp\public\sdk\inc\wincon.h -FILE 2727 f:\sp\public\sdk\inc\ddbanned.h -FILE 2728 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2729 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2730 f:\sp\public\sdk\inc\pshpack2.h -FILE 2731 f:\sp\public\sdk\inc\mcx.h -FILE 2732 f:\sp\public\sdk\inc\winuser.h -FILE 2733 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2734 f:\sp\public\sdk\inc\winnls.h -FILE 2735 f:\sp\public\sdk\inc\guiddef.h -FILE 2736 f:\sp\public\sdk\inc\windows.h -FILE 2737 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2738 f:\sp\public\sdk\inc\specstrings.h -FILE 2739 f:\sp\public\sdk\inc\basetsd.h -FILE 2740 f:\sp\public\sdk\inc\stralign.h -FILE 2741 f:\sp\public\sdk\inc\tvout.h -FILE 2742 f:\sp\public\sdk\inc\winsvc.h -FILE 2743 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2744 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2745 f:\sp\public\sdk\inc\wingdi.h -FILE 2746 f:\sp\public\sdk\inc\pshpack4.h -FILE 2747 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 2748 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 2749 f:\sp\public\sdk\inc\wincon.h -FILE 2750 f:\sp\public\sdk\inc\imm.h -FILE 2751 f:\sp\public\sdk\inc\winbase.h -FILE 2752 f:\sp\public\sdk\inc\wingdi.h -FILE 2753 f:\sp\public\sdk\inc\winver.h -FILE 2754 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2755 f:\sp\public\sdk\inc\windows.h -FILE 2756 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2757 f:\sp\public\sdk\inc\pshpack2.h -FILE 2758 f:\sp\public\sdk\inc\reason.h -FILE 2759 f:\sp\vctools\crt_bld\self_x86\crt\src\a_cmp.c -FILE 2760 f:\sp\public\sdk\inc\specstrings.h -FILE 2761 f:\sp\public\sdk\inc\basetsd.h -FILE 2762 f:\sp\public\sdk\inc\pshpack4.h -FILE 2763 f:\sp\public\sdk\inc\winnetwk.h -FILE 2764 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2765 f:\sp\public\sdk\inc\stralign.h -FILE 2766 f:\sp\public\sdk\inc\poppack.h -FILE 2767 f:\sp\public\sdk\inc\winsvc.h -FILE 2768 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2769 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2770 f:\sp\public\sdk\inc\windef.h -FILE 2771 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2772 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2773 f:\sp\public\sdk\inc\winuser.h -FILE 2774 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2775 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2776 f:\sp\public\sdk\inc\mcx.h -FILE 2777 f:\sp\public\sdk\inc\pshpack8.h -FILE 2778 f:\sp\public\sdk\inc\guiddef.h -FILE 2779 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2780 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2781 f:\sp\public\sdk\inc\winnt.h -FILE 2782 f:\sp\public\sdk\inc\winnls.h -FILE 2783 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2784 f:\sp\public\sdk\inc\pshpack1.h -FILE 2785 f:\sp\public\sdk\inc\winerror.h -FILE 2786 f:\sp\public\sdk\inc\winreg.h -FILE 2787 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2788 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2789 f:\sp\public\sdk\inc\ddbanned.h -FILE 2790 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2791 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2792 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 2793 f:\sp\public\sdk\inc\tvout.h -FILE 2794 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2795 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\sehprolg4.asm -FILE 2796 f:\sp\public\sdk\inc\poppack.h -FILE 2797 f:\sp\public\sdk\inc\winnetwk.h -FILE 2798 f:\sp\public\sdk\inc\imm.h -FILE 2799 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2800 f:\sp\public\sdk\inc\windef.h -FILE 2801 f:\sp\public\sdk\inc\pshpack1.h -FILE 2802 f:\sp\public\sdk\inc\winver.h -FILE 2803 f:\sp\public\sdk\inc\windows.h -FILE 2804 f:\sp\public\sdk\inc\winnt.h -FILE 2805 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2806 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2807 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2808 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2809 f:\sp\public\sdk\inc\winreg.h -FILE 2810 f:\sp\public\sdk\inc\winbase.h -FILE 2811 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\secchk.c -FILE 2812 f:\sp\public\sdk\inc\winerror.h -FILE 2813 f:\sp\public\sdk\inc\pshpack8.h -FILE 2814 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 2815 f:\sp\public\sdk\inc\reason.h -FILE 2816 f:\sp\public\sdk\inc\wincon.h -FILE 2817 f:\sp\public\sdk\inc\ddbanned.h -FILE 2818 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2819 f:\sp\public\sdk\inc\pshpack2.h -FILE 2820 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2821 f:\sp\public\sdk\inc\mcx.h -FILE 2822 f:\sp\public\sdk\inc\winuser.h -FILE 2823 f:\sp\public\sdk\inc\winnls.h -FILE 2824 f:\sp\public\sdk\inc\guiddef.h -FILE 2825 f:\sp\public\sdk\inc\specstrings.h -FILE 2826 f:\sp\public\sdk\inc\basetsd.h -FILE 2827 f:\sp\public\sdk\inc\stralign.h -FILE 2828 f:\sp\public\sdk\inc\tvout.h -FILE 2829 f:\sp\public\sdk\inc\winsvc.h -FILE 2830 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2831 f:\sp\public\sdk\inc\wingdi.h -FILE 2832 f:\sp\public\sdk\inc\pshpack4.h -FILE 2833 f:\sp\public\sdk\inc\poppack.h -FILE 2834 f:\sp\public\sdk\inc\winnetwk.h -FILE 2835 f:\sp\public\sdk\inc\imm.h -FILE 2836 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2837 f:\sp\public\sdk\inc\windef.h -FILE 2838 f:\sp\public\sdk\inc\pshpack1.h -FILE 2839 f:\sp\public\sdk\inc\winver.h -FILE 2840 f:\sp\public\sdk\inc\windows.h -FILE 2841 f:\sp\public\sdk\inc\winnt.h -FILE 2842 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2843 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2844 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2845 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2846 f:\sp\public\sdk\inc\winreg.h -FILE 2847 f:\sp\public\sdk\inc\winbase.h -FILE 2848 f:\sp\vctools\crt_bld\self_x86\crt\src\intel\loadcfg.c -FILE 2849 f:\sp\public\sdk\inc\winerror.h -FILE 2850 f:\sp\public\sdk\inc\pshpack8.h -FILE 2851 f:\sp\public\sdk\inc\reason.h -FILE 2852 f:\sp\public\sdk\inc\wincon.h -FILE 2853 f:\sp\public\sdk\inc\ddbanned.h -FILE 2854 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2855 f:\sp\public\sdk\inc\pshpack2.h -FILE 2856 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2857 f:\sp\public\sdk\inc\mcx.h -FILE 2858 f:\sp\public\sdk\inc\winuser.h -FILE 2859 f:\sp\public\sdk\inc\winnls.h -FILE 2860 f:\sp\public\sdk\inc\guiddef.h -FILE 2861 f:\sp\public\sdk\inc\specstrings.h -FILE 2862 f:\sp\public\sdk\inc\basetsd.h -FILE 2863 f:\sp\public\sdk\inc\stralign.h -FILE 2864 f:\sp\public\sdk\inc\tvout.h -FILE 2865 f:\sp\public\sdk\inc\winsvc.h -FILE 2866 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2867 f:\sp\public\sdk\inc\wingdi.h -FILE 2868 f:\sp\public\sdk\inc\pshpack4.h -FILE 2869 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup4.asm -FILE 2870 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 2871 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\exsup.asm -FILE 2872 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\pversion.inc -FILE 2873 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\cmacros.inc -FILE 2874 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\h\exsup.inc -FILE 2875 F:\SP\vctools\crt_bld\SELF_X86\crt\prebuild\misc\i386\nlgsupp.asm -FILE 2876 f:\sp\public\sdk\inc\ntldr.h -FILE 2877 f:\sp\public\sdk\inc\ntpoapi.h -FILE 2878 f:\sp\public\sdk\inc\ntexapi.h -FILE 2879 f:\sp\public\sdk\inc\pshpack1.h -FILE 2880 f:\sp\public\sdk\inc\pshpack8.h -FILE 2881 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 2882 f:\sp\public\sdk\inc\ntdef.h -FILE 2883 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 2884 f:\sp\public\sdk\inc\mce.h -FILE 2885 f:\sp\public\sdk\inc\poppack.h -FILE 2886 f:\sp\public\sdk\inc\ntimage.h -FILE 2887 f:\sp\public\sdk\inc\pshpack2.h -FILE 2888 f:\sp\public\sdk\inc\ntpsapi.h -FILE 2889 f:\sp\public\sdk\inc\nti386.h -FILE 2890 f:\sp\public\sdk\inc\nt.h -FILE 2891 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 2892 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 2893 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 2894 f:\sp\public\sdk\inc\specstrings.h -FILE 2895 f:\sp\public\sdk\inc\basetsd.h -FILE 2896 f:\sp\public\sdk\inc\ntxcapi.h -FILE 2897 f:\sp\public\sdk\inc\guiddef.h -FILE 2898 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\misc\i386\chandler4.c -FILE 2899 f:\sp\public\sdk\inc\ntstatus.h -FILE 2900 f:\sp\public\sdk\inc\ntkeapi.h -FILE 2901 f:\sp\public\sdk\inc\ntconfig.h -FILE 2902 f:\sp\public\sdk\inc\ntregapi.h -FILE 2903 f:\sp\public\sdk\inc\ntmmapi.h -FILE 2904 f:\sp\public\sdk\inc\ntobapi.h -FILE 2905 f:\sp\public\sdk\inc\nxi386.h -FILE 2906 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\process.h -FILE 2907 f:\sp\public\sdk\inc\ntioapi.h -FILE 2908 f:\sp\public\sdk\inc\devioctl.h -FILE 2909 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 2910 f:\sp\public\sdk\inc\ntseapi.h -FILE 2911 f:\sp\public\sdk\inc\ddbanned.h -FILE 2912 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 2913 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 2914 f:\sp\public\sdk\inc\ntnls.h -FILE 2915 f:\sp\public\sdk\inc\ntelfapi.h -FILE 2916 f:\sp\public\sdk\inc\pshpack4.h -FILE 2917 f:\sp\public\sdk\inc\ntiolog.h -FILE 2918 f:\sp\public\sdk\inc\ntlpcapi.h -FILE 2919 f:\sp\public\sdk\inc\ntpnpapi.h -FILE 2920 f:\sp\public\sdk\inc\cfg.h -FILE 2921 f:\sp\public\sdk\inc\pebteb.h -FILE 2922 f:\sp\public\sdk\inc\wincon.h -FILE 2923 f:\sp\public\sdk\inc\imm.h -FILE 2924 f:\sp\public\sdk\inc\winbase.h -FILE 2925 f:\sp\public\sdk\inc\wingdi.h -FILE 2926 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 2927 f:\sp\public\sdk\inc\winver.h -FILE 2928 f:\sp\public\sdk\inc\pshpack2.h -FILE 2929 f:\sp\public\sdk\inc\reason.h -FILE 2930 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 2931 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 2932 f:\sp\vctools\crt_bld\self_x86\crt\src\mbsnbico.c -FILE 2933 f:\sp\public\sdk\inc\specstrings.h -FILE 2934 f:\sp\public\sdk\inc\basetsd.h -FILE 2935 f:\sp\public\sdk\inc\pshpack4.h -FILE 2936 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2937 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2938 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2939 f:\sp\public\sdk\inc\winnetwk.h -FILE 2940 f:\sp\public\sdk\inc\stralign.h -FILE 2941 f:\sp\public\sdk\inc\poppack.h -FILE 2942 f:\sp\public\sdk\inc\winsvc.h -FILE 2943 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2944 f:\sp\public\sdk\inc\windef.h -FILE 2945 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 2946 f:\sp\public\sdk\inc\winuser.h -FILE 2947 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2948 f:\sp\public\sdk\inc\windows.h -FILE 2949 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2950 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2951 f:\sp\public\sdk\inc\mcx.h -FILE 2952 f:\sp\public\sdk\inc\pshpack8.h -FILE 2953 f:\sp\public\sdk\inc\guiddef.h -FILE 2954 f:\sp\public\sdk\inc\winnt.h -FILE 2955 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2956 f:\sp\public\sdk\inc\winnls.h -FILE 2957 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 2958 f:\sp\public\sdk\inc\pshpack1.h -FILE 2959 f:\sp\public\sdk\inc\winerror.h -FILE 2960 f:\sp\public\sdk\inc\winreg.h -FILE 2961 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 2962 f:\sp\public\sdk\inc\ddbanned.h -FILE 2963 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 2964 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 2965 f:\sp\public\sdk\inc\tvout.h -FILE 2966 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2967 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2968 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 2969 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 2970 f:\sp\public\sdk\inc\wincon.h -FILE 2971 f:\sp\public\sdk\inc\imm.h -FILE 2972 f:\sp\public\sdk\inc\winbase.h -FILE 2973 f:\sp\public\sdk\inc\wingdi.h -FILE 2974 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 2975 f:\sp\public\sdk\inc\winver.h -FILE 2976 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 2977 f:\sp\public\sdk\inc\windows.h -FILE 2978 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 2979 f:\sp\public\sdk\inc\pshpack2.h -FILE 2980 f:\sp\public\sdk\inc\reason.h -FILE 2981 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 2982 f:\sp\vctools\crt_bld\self_x86\crt\src\mbschr.c -FILE 2983 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 2984 f:\sp\public\sdk\inc\specstrings.h -FILE 2985 f:\sp\public\sdk\inc\basetsd.h -FILE 2986 f:\sp\public\sdk\inc\pshpack4.h -FILE 2987 f:\sp\public\sdk\inc\winnetwk.h -FILE 2988 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 2989 f:\sp\public\sdk\inc\stralign.h -FILE 2990 f:\sp\public\sdk\inc\poppack.h -FILE 2991 f:\sp\public\sdk\inc\winsvc.h -FILE 2992 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 2993 f:\sp\public\sdk\inc\windef.h -FILE 2994 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 2995 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 2996 f:\sp\public\sdk\inc\winuser.h -FILE 2997 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 2998 f:\sp\public\sdk\inc\mcx.h -FILE 2999 f:\sp\public\sdk\inc\pshpack8.h -FILE 3000 f:\sp\public\sdk\inc\guiddef.h -FILE 3001 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3002 f:\sp\public\sdk\inc\winnt.h -FILE 3003 f:\sp\public\sdk\inc\winnls.h -FILE 3004 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3005 f:\sp\public\sdk\inc\pshpack1.h -FILE 3006 f:\sp\public\sdk\inc\winerror.h -FILE 3007 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3008 f:\sp\public\sdk\inc\winreg.h -FILE 3009 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3010 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3011 f:\sp\public\sdk\inc\ddbanned.h -FILE 3012 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3013 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3014 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3015 f:\sp\public\sdk\inc\tvout.h -FILE 3016 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3017 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3018 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 3019 f:\sp\public\sdk\inc\wincon.h -FILE 3020 f:\sp\public\sdk\inc\imm.h -FILE 3021 f:\sp\public\sdk\inc\winbase.h -FILE 3022 f:\sp\public\sdk\inc\wingdi.h -FILE 3023 f:\sp\public\sdk\inc\winver.h -FILE 3024 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3025 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3026 f:\sp\public\sdk\inc\pshpack2.h -FILE 3027 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 3028 f:\sp\public\sdk\inc\reason.h -FILE 3029 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.c -FILE 3030 f:\sp\public\sdk\inc\specstrings.h -FILE 3031 f:\sp\public\sdk\inc\basetsd.h -FILE 3032 f:\sp\public\sdk\inc\pshpack4.h -FILE 3033 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3034 f:\sp\public\sdk\inc\winnetwk.h -FILE 3035 f:\sp\public\sdk\inc\stralign.h -FILE 3036 f:\sp\public\sdk\inc\poppack.h -FILE 3037 f:\sp\public\sdk\inc\winsvc.h -FILE 3038 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3039 f:\sp\public\sdk\inc\windef.h -FILE 3040 f:\sp\public\sdk\inc\winuser.h -FILE 3041 f:\sp\public\sdk\inc\windows.h -FILE 3042 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3043 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3044 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3045 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3046 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3047 f:\sp\public\sdk\inc\mcx.h -FILE 3048 f:\sp\public\sdk\inc\pshpack8.h -FILE 3049 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3050 f:\sp\public\sdk\inc\guiddef.h -FILE 3051 f:\sp\public\sdk\inc\winnt.h -FILE 3052 f:\sp\public\sdk\inc\winnls.h -FILE 3053 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3054 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3055 f:\sp\public\sdk\inc\pshpack1.h -FILE 3056 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3057 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3058 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3059 f:\sp\public\sdk\inc\winerror.h -FILE 3060 f:\sp\vctools\crt_bld\self_x86\crt\src\sect_attribs.h -FILE 3061 f:\sp\public\sdk\inc\winreg.h -FILE 3062 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3063 f:\sp\public\sdk\inc\ddbanned.h -FILE 3064 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3065 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3066 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 3067 f:\sp\public\sdk\inc\tvout.h -FILE 3068 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3069 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3070 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3071 f:\sp\public\sdk\inc\wincon.h -FILE 3072 f:\sp\public\sdk\inc\imm.h -FILE 3073 f:\sp\public\sdk\inc\winbase.h -FILE 3074 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3075 f:\sp\public\sdk\inc\wingdi.h -FILE 3076 f:\sp\public\sdk\inc\windef.h -FILE 3077 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 3078 f:\sp\public\sdk\inc\winver.h -FILE 3079 f:\sp\public\sdk\inc\pshpack2.h -FILE 3080 f:\sp\public\sdk\inc\reason.h -FILE 3081 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3082 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3083 f:\sp\vctools\crt_bld\self_x86\crt\src\ismbbyte.c -FILE 3084 f:\sp\public\sdk\inc\winnt.h -FILE 3085 f:\sp\public\sdk\inc\specstrings.h -FILE 3086 f:\sp\public\sdk\inc\basetsd.h -FILE 3087 f:\sp\public\sdk\inc\pshpack4.h -FILE 3088 f:\sp\public\sdk\inc\winnetwk.h -FILE 3089 f:\sp\public\sdk\inc\stralign.h -FILE 3090 f:\sp\public\sdk\inc\poppack.h -FILE 3091 f:\sp\public\sdk\inc\winsvc.h -FILE 3092 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3093 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3094 f:\sp\public\sdk\inc\winuser.h -FILE 3095 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3096 f:\sp\public\sdk\inc\mcx.h -FILE 3097 f:\sp\public\sdk\inc\pshpack8.h -FILE 3098 f:\sp\public\sdk\inc\guiddef.h -FILE 3099 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3100 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 3101 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3102 f:\sp\public\sdk\inc\windows.h -FILE 3103 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3104 f:\sp\public\sdk\inc\winnls.h -FILE 3105 f:\sp\public\sdk\inc\pshpack1.h -FILE 3106 f:\sp\public\sdk\inc\winerror.h -FILE 3107 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3108 f:\sp\public\sdk\inc\winreg.h -FILE 3109 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3110 f:\sp\public\sdk\inc\ddbanned.h -FILE 3111 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3112 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3113 f:\sp\public\sdk\inc\tvout.h -FILE 3114 f:\sp\vctools\crt_bld\self_x86\crt\src\mbdata.h -FILE 3115 f:\sp\public\sdk\inc\poppack.h -FILE 3116 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3117 f:\sp\public\sdk\inc\winnetwk.h -FILE 3118 f:\sp\public\sdk\inc\imm.h -FILE 3119 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3120 f:\sp\public\sdk\inc\windef.h -FILE 3121 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3122 f:\sp\public\sdk\inc\pshpack1.h -FILE 3123 f:\sp\vctools\crt_bld\self_x86\crt\src\msdos.h -FILE 3124 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3125 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3126 f:\sp\public\sdk\inc\winver.h -FILE 3127 f:\sp\public\sdk\inc\windows.h -FILE 3128 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3129 f:\sp\public\sdk\inc\winnt.h -FILE 3130 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3131 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3132 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3133 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3134 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3135 f:\sp\public\sdk\inc\winreg.h -FILE 3136 f:\sp\public\sdk\inc\winbase.h -FILE 3137 f:\sp\vctools\crt_bld\self_x86\crt\src\ioinit.c -FILE 3138 f:\sp\public\sdk\inc\winerror.h -FILE 3139 f:\sp\public\sdk\inc\pshpack8.h -FILE 3140 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3141 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3142 f:\sp\public\sdk\inc\reason.h -FILE 3143 f:\sp\public\sdk\inc\wincon.h -FILE 3144 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3145 f:\sp\public\sdk\inc\ddbanned.h -FILE 3146 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3147 f:\sp\public\sdk\inc\pshpack2.h -FILE 3148 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3149 f:\sp\public\sdk\inc\mcx.h -FILE 3150 f:\sp\public\sdk\inc\winuser.h -FILE 3151 f:\sp\public\sdk\inc\winnls.h -FILE 3152 f:\sp\public\sdk\inc\guiddef.h -FILE 3153 f:\sp\public\sdk\inc\specstrings.h -FILE 3154 f:\sp\public\sdk\inc\basetsd.h -FILE 3155 f:\sp\public\sdk\inc\stralign.h -FILE 3156 f:\sp\public\sdk\inc\tvout.h -FILE 3157 f:\sp\public\sdk\inc\winsvc.h -FILE 3158 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3159 f:\sp\public\sdk\inc\wingdi.h -FILE 3160 f:\sp\public\sdk\inc\pshpack4.h -FILE 3161 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\ulldvrm.asm -FILE 3162 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 3163 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 3164 F:\SP\vctools\crt_bld\SELF_X86\crt\src\intel\llmul.asm -FILE 3165 F:\SP\vctools\crt_bld\SELF_X86\crt\src\cruntime.inc -FILE 3166 F:\SP\vctools\crt_bld\SELF_X86\crt\src\mm.inc -FILE 3167 f:\sp\public\sdk\inc\poppack.h -FILE 3168 f:\sp\public\sdk\inc\winnetwk.h -FILE 3169 f:\sp\public\sdk\inc\imm.h -FILE 3170 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3171 f:\sp\public\sdk\inc\windef.h -FILE 3172 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3173 f:\sp\public\sdk\inc\pshpack1.h -FILE 3174 f:\sp\public\sdk\inc\winver.h -FILE 3175 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3176 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3177 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3178 f:\sp\public\sdk\inc\winnt.h -FILE 3179 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3180 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3181 f:\sp\public\sdk\inc\winreg.h -FILE 3182 f:\sp\vctools\crt_bld\self_x86\crt\src\_newmode.c -FILE 3183 f:\sp\public\sdk\inc\winbase.h -FILE 3184 f:\sp\public\sdk\inc\winerror.h -FILE 3185 f:\sp\public\sdk\inc\pshpack8.h -FILE 3186 f:\sp\public\sdk\inc\reason.h -FILE 3187 f:\sp\public\sdk\inc\wincon.h -FILE 3188 f:\sp\public\sdk\inc\ddbanned.h -FILE 3189 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3190 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3191 f:\sp\public\sdk\inc\pshpack2.h -FILE 3192 f:\sp\public\sdk\inc\mcx.h -FILE 3193 f:\sp\public\sdk\inc\winuser.h -FILE 3194 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3195 f:\sp\public\sdk\inc\winnls.h -FILE 3196 f:\sp\public\sdk\inc\guiddef.h -FILE 3197 f:\sp\public\sdk\inc\windows.h -FILE 3198 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3199 f:\sp\public\sdk\inc\specstrings.h -FILE 3200 f:\sp\public\sdk\inc\basetsd.h -FILE 3201 f:\sp\public\sdk\inc\stralign.h -FILE 3202 f:\sp\public\sdk\inc\tvout.h -FILE 3203 f:\sp\public\sdk\inc\winsvc.h -FILE 3204 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3205 f:\sp\public\sdk\inc\wingdi.h -FILE 3206 f:\sp\public\sdk\inc\pshpack4.h -FILE 3207 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 3208 f:\sp\public\sdk\inc\winerror.h -FILE 3209 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3210 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3211 f:\sp\public\sdk\inc\winreg.h -FILE 3212 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3213 f:\sp\public\sdk\inc\tvout.h -FILE 3214 f:\sp\vctools\crt_bld\self_x86\crt\src\delete.cpp -FILE 3215 f:\sp\public\sdk\inc\wincon.h -FILE 3216 f:\sp\public\sdk\inc\imm.h -FILE 3217 f:\sp\public\sdk\inc\winbase.h -FILE 3218 f:\sp\public\sdk\inc\wingdi.h -FILE 3219 f:\sp\public\sdk\inc\winver.h -FILE 3220 f:\sp\public\sdk\inc\windows.h -FILE 3221 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3222 f:\sp\public\sdk\inc\pshpack2.h -FILE 3223 f:\sp\public\sdk\inc\reason.h -FILE 3224 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3225 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3226 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3227 f:\sp\public\sdk\inc\specstrings.h -FILE 3228 f:\sp\public\sdk\inc\basetsd.h -FILE 3229 f:\sp\public\sdk\inc\pshpack4.h -FILE 3230 f:\sp\public\sdk\inc\winnetwk.h -FILE 3231 f:\sp\public\sdk\inc\stralign.h -FILE 3232 f:\sp\public\sdk\inc\poppack.h -FILE 3233 f:\sp\public\sdk\inc\winsvc.h -FILE 3234 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3235 f:\sp\public\sdk\inc\windef.h -FILE 3236 f:\sp\public\sdk\inc\winuser.h -FILE 3237 f:\sp\public\sdk\inc\mcx.h -FILE 3238 f:\sp\public\sdk\inc\pshpack8.h -FILE 3239 f:\sp\public\sdk\inc\ddbanned.h -FILE 3240 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3241 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3242 f:\sp\public\sdk\inc\guiddef.h -FILE 3243 f:\sp\public\sdk\inc\winnt.h -FILE 3244 f:\sp\public\sdk\inc\winnls.h -FILE 3245 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3246 f:\sp\public\sdk\inc\pshpack1.h -FILE 3247 f:\sp\public\sdk\inc\tvout.h -FILE 3248 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3249 f:\sp\vctools\crt_bld\self_x86\crt\src\process.h -FILE 3250 f:\sp\public\sdk\inc\wincon.h -FILE 3251 f:\sp\public\sdk\inc\imm.h -FILE 3252 f:\sp\public\sdk\inc\winbase.h -FILE 3253 f:\sp\public\sdk\inc\wingdi.h -FILE 3254 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3255 f:\sp\public\sdk\inc\winver.h -FILE 3256 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3257 f:\sp\public\sdk\inc\windows.h -FILE 3258 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3259 f:\sp\public\sdk\inc\pshpack2.h -FILE 3260 f:\sp\vctools\crt_bld\self_x86\crt\src\handler.cpp -FILE 3261 f:\sp\public\sdk\inc\reason.h -FILE 3262 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3263 f:\sp\public\sdk\inc\specstrings.h -FILE 3264 f:\sp\public\sdk\inc\basetsd.h -FILE 3265 f:\sp\public\sdk\inc\pshpack4.h -FILE 3266 f:\sp\public\sdk\inc\winnetwk.h -FILE 3267 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3268 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3269 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3270 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3271 f:\sp\public\sdk\inc\stralign.h -FILE 3272 f:\sp\public\sdk\inc\poppack.h -FILE 3273 f:\sp\public\sdk\inc\winsvc.h -FILE 3274 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3275 f:\sp\public\sdk\inc\windef.h -FILE 3276 f:\sp\public\sdk\inc\winuser.h -FILE 3277 f:\sp\public\sdk\inc\mcx.h -FILE 3278 f:\sp\public\sdk\inc\pshpack8.h -FILE 3279 f:\sp\public\sdk\inc\guiddef.h -FILE 3280 f:\sp\public\sdk\inc\winnt.h -FILE 3281 f:\sp\public\sdk\inc\winnls.h -FILE 3282 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3283 f:\sp\public\sdk\inc\pshpack1.h -FILE 3284 f:\sp\public\sdk\inc\winerror.h -FILE 3285 f:\sp\public\sdk\inc\ddbanned.h -FILE 3286 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3287 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3288 f:\sp\public\sdk\inc\winreg.h -FILE 3289 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3290 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3291 f:\sp\vctools\crt_bld\self_x86\crt\src\new.h -FILE 3292 f:\sp\public\sdk\inc\winsvc.h -FILE 3293 f:\sp\public\sdk\inc\wingdi.h -FILE 3294 f:\sp\public\sdk\inc\pshpack4.h -FILE 3295 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3296 f:\sp\public\sdk\inc\poppack.h -FILE 3297 f:\sp\public\sdk\inc\winnt.h -FILE 3298 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3299 f:\sp\public\sdk\inc\winnetwk.h -FILE 3300 f:\sp\public\sdk\inc\imm.h -FILE 3301 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3302 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3303 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3304 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3305 f:\sp\public\sdk\inc\pshpack1.h -FILE 3306 f:\sp\public\sdk\inc\winver.h -FILE 3307 f:\sp\public\sdk\inc\guiddef.h -FILE 3308 f:\sp\public\sdk\inc\specstrings.h -FILE 3309 f:\sp\public\sdk\inc\basetsd.h -FILE 3310 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3311 f:\sp\vctools\crt_bld\self_x86\crt\src\sbheap.c -FILE 3312 f:\sp\public\sdk\inc\windows.h -FILE 3313 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3314 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3315 f:\sp\public\sdk\inc\winreg.h -FILE 3316 f:\sp\public\sdk\inc\winbase.h -FILE 3317 f:\sp\public\sdk\inc\winerror.h -FILE 3318 f:\sp\public\sdk\inc\pshpack8.h -FILE 3319 f:\sp\public\sdk\inc\ddbanned.h -FILE 3320 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3321 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3322 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3323 f:\sp\public\sdk\inc\reason.h -FILE 3324 f:\sp\public\sdk\inc\wincon.h -FILE 3325 f:\sp\public\sdk\inc\pshpack2.h -FILE 3326 f:\sp\public\sdk\inc\mcx.h -FILE 3327 f:\sp\public\sdk\inc\winuser.h -FILE 3328 f:\sp\public\sdk\inc\winnls.h -FILE 3329 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3330 f:\sp\public\sdk\inc\windef.h -FILE 3331 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3332 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3333 f:\sp\public\sdk\inc\stralign.h -FILE 3334 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3335 f:\sp\public\sdk\inc\tvout.h -FILE 3336 f:\sp\public\sdk\inc\winver.h -FILE 3337 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3338 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3339 f:\sp\public\sdk\inc\guiddef.h -FILE 3340 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3341 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3342 f:\sp\public\sdk\inc\specstrings.h -FILE 3343 f:\sp\public\sdk\inc\basetsd.h -FILE 3344 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3345 f:\sp\public\sdk\inc\windows.h -FILE 3346 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3347 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3348 f:\sp\public\sdk\inc\winreg.h -FILE 3349 f:\sp\public\sdk\inc\winbase.h -FILE 3350 f:\sp\public\sdk\inc\winerror.h -FILE 3351 f:\sp\public\sdk\inc\pshpack8.h -FILE 3352 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3353 f:\sp\public\sdk\inc\reason.h -FILE 3354 f:\sp\public\sdk\inc\wincon.h -FILE 3355 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3356 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3357 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3358 f:\sp\public\sdk\inc\pshpack2.h -FILE 3359 f:\sp\public\sdk\inc\mcx.h -FILE 3360 f:\sp\public\sdk\inc\winuser.h -FILE 3361 f:\sp\public\sdk\inc\winnls.h -FILE 3362 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3363 f:\sp\public\sdk\inc\windef.h -FILE 3364 f:\sp\public\sdk\inc\stralign.h -FILE 3365 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3366 f:\sp\public\sdk\inc\tvout.h -FILE 3367 f:\sp\public\sdk\inc\winsvc.h -FILE 3368 f:\sp\vctools\crt_bld\self_x86\crt\src\realloc.c -FILE 3369 f:\sp\public\sdk\inc\wingdi.h -FILE 3370 f:\sp\public\sdk\inc\pshpack4.h -FILE 3371 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3372 f:\sp\public\sdk\inc\poppack.h -FILE 3373 f:\sp\public\sdk\inc\winnt.h -FILE 3374 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3375 f:\sp\public\sdk\inc\winnetwk.h -FILE 3376 f:\sp\public\sdk\inc\ddbanned.h -FILE 3377 f:\sp\public\sdk\inc\imm.h -FILE 3378 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3379 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3380 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3381 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3382 f:\sp\public\sdk\inc\pshpack1.h -FILE 3383 f:\sp\public\sdk\inc\pshpack2.h -FILE 3384 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3385 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3386 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3387 f:\sp\public\sdk\inc\mcx.h -FILE 3388 f:\sp\public\sdk\inc\winuser.h -FILE 3389 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3390 f:\sp\public\sdk\inc\winnls.h -FILE 3391 f:\sp\public\sdk\inc\guiddef.h -FILE 3392 f:\sp\public\sdk\inc\windows.h -FILE 3393 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3394 f:\sp\public\sdk\inc\specstrings.h -FILE 3395 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3396 f:\sp\public\sdk\inc\basetsd.h -FILE 3397 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3398 f:\sp\public\sdk\inc\stralign.h -FILE 3399 f:\sp\public\sdk\inc\tvout.h -FILE 3400 f:\sp\public\sdk\inc\winsvc.h -FILE 3401 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3402 f:\sp\public\sdk\inc\wingdi.h -FILE 3403 f:\sp\public\sdk\inc\pshpack4.h -FILE 3404 f:\sp\public\sdk\inc\poppack.h -FILE 3405 f:\sp\public\sdk\inc\winnetwk.h -FILE 3406 f:\sp\public\sdk\inc\imm.h -FILE 3407 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3408 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3409 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3410 f:\sp\public\sdk\inc\windef.h -FILE 3411 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3412 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3413 f:\sp\vctools\crt_bld\self_x86\crt\src\msize.c -FILE 3414 f:\sp\public\sdk\inc\pshpack1.h -FILE 3415 f:\sp\public\sdk\inc\winver.h -FILE 3416 f:\sp\public\sdk\inc\winnt.h -FILE 3417 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3418 f:\sp\public\sdk\inc\winreg.h -FILE 3419 f:\sp\public\sdk\inc\ddbanned.h -FILE 3420 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3421 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3422 f:\sp\public\sdk\inc\winbase.h -FILE 3423 f:\sp\public\sdk\inc\winerror.h -FILE 3424 f:\sp\public\sdk\inc\pshpack8.h -FILE 3425 f:\sp\public\sdk\inc\reason.h -FILE 3426 f:\sp\public\sdk\inc\wincon.h -FILE 3427 f:\sp\public\sdk\inc\pshpack2.h -FILE 3428 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3429 f:\sp\public\sdk\inc\mcx.h -FILE 3430 f:\sp\public\sdk\inc\winuser.h -FILE 3431 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3432 f:\sp\public\sdk\inc\winnls.h -FILE 3433 f:\sp\public\sdk\inc\guiddef.h -FILE 3434 f:\sp\public\sdk\inc\windows.h -FILE 3435 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3436 f:\sp\public\sdk\inc\specstrings.h -FILE 3437 f:\sp\public\sdk\inc\basetsd.h -FILE 3438 f:\sp\public\sdk\inc\stralign.h -FILE 3439 f:\sp\public\sdk\inc\tvout.h -FILE 3440 f:\sp\public\sdk\inc\winsvc.h -FILE 3441 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3442 f:\sp\public\sdk\inc\wingdi.h -FILE 3443 f:\sp\public\sdk\inc\pshpack4.h -FILE 3444 f:\sp\public\sdk\inc\poppack.h -FILE 3445 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3446 f:\sp\public\sdk\inc\winnetwk.h -FILE 3447 f:\sp\public\sdk\inc\imm.h -FILE 3448 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3449 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3450 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3451 f:\sp\public\sdk\inc\windef.h -FILE 3452 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3453 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3454 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3455 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.c -FILE 3456 f:\sp\public\sdk\inc\pshpack1.h -FILE 3457 f:\sp\public\sdk\inc\winver.h -FILE 3458 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3459 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3460 f:\sp\vctools\crt_bld\self_x86\crt\src\rterr.h -FILE 3461 f:\sp\public\sdk\inc\winnt.h -FILE 3462 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3463 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3464 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3465 f:\sp\public\sdk\inc\winreg.h -FILE 3466 f:\sp\public\sdk\inc\ddbanned.h -FILE 3467 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3468 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3469 f:\sp\public\sdk\inc\winbase.h -FILE 3470 f:\sp\public\sdk\inc\winerror.h -FILE 3471 f:\sp\public\sdk\inc\pshpack8.h -FILE 3472 f:\sp\public\sdk\inc\reason.h -FILE 3473 f:\sp\public\sdk\inc\wincon.h -FILE 3474 f:\sp\public\sdk\inc\winver.h -FILE 3475 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3476 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3477 f:\sp\public\sdk\inc\winnt.h -FILE 3478 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3479 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3480 f:\sp\public\sdk\inc\winreg.h -FILE 3481 f:\sp\public\sdk\inc\winbase.h -FILE 3482 f:\sp\public\sdk\inc\winerror.h -FILE 3483 f:\sp\public\sdk\inc\pshpack8.h -FILE 3484 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3485 f:\sp\public\sdk\inc\reason.h -FILE 3486 f:\sp\public\sdk\inc\wincon.h -FILE 3487 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3488 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3489 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3490 f:\sp\public\sdk\inc\pshpack2.h -FILE 3491 f:\sp\public\sdk\inc\mcx.h -FILE 3492 f:\sp\public\sdk\inc\winuser.h -FILE 3493 f:\sp\public\sdk\inc\winnls.h -FILE 3494 f:\sp\public\sdk\inc\guiddef.h -FILE 3495 f:\sp\public\sdk\inc\stralign.h -FILE 3496 f:\sp\public\sdk\inc\specstrings.h -FILE 3497 f:\sp\public\sdk\inc\basetsd.h -FILE 3498 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3499 f:\sp\public\sdk\inc\windows.h -FILE 3500 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3501 f:\sp\public\sdk\inc\tvout.h -FILE 3502 f:\sp\public\sdk\inc\winsvc.h -FILE 3503 f:\sp\vctools\crt_bld\self_x86\crt\src\heapinit.c -FILE 3504 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3505 f:\sp\public\sdk\inc\wingdi.h -FILE 3506 f:\sp\public\sdk\inc\pshpack4.h -FILE 3507 f:\sp\public\sdk\inc\poppack.h -FILE 3508 f:\sp\public\sdk\inc\winnetwk.h -FILE 3509 f:\sp\public\sdk\inc\ddbanned.h -FILE 3510 f:\sp\public\sdk\inc\imm.h -FILE 3511 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3512 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3513 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3514 f:\sp\public\sdk\inc\windef.h -FILE 3515 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3516 f:\sp\public\sdk\inc\pshpack1.h -FILE 3517 f:\sp\public\sdk\inc\pshpack2.h -FILE 3518 f:\sp\public\sdk\inc\mcx.h -FILE 3519 f:\sp\public\sdk\inc\winuser.h -FILE 3520 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3521 f:\sp\public\sdk\inc\winnls.h -FILE 3522 f:\sp\public\sdk\inc\guiddef.h -FILE 3523 f:\sp\public\sdk\inc\windows.h -FILE 3524 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3525 f:\sp\public\sdk\inc\specstrings.h -FILE 3526 f:\sp\public\sdk\inc\basetsd.h -FILE 3527 f:\sp\public\sdk\inc\stralign.h -FILE 3528 f:\sp\public\sdk\inc\tvout.h -FILE 3529 f:\sp\public\sdk\inc\winsvc.h -FILE 3530 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3531 f:\sp\public\sdk\inc\wingdi.h -FILE 3532 f:\sp\public\sdk\inc\pshpack4.h -FILE 3533 f:\sp\public\sdk\inc\poppack.h -FILE 3534 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3535 f:\sp\public\sdk\inc\winnetwk.h -FILE 3536 f:\sp\public\sdk\inc\imm.h -FILE 3537 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3538 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3539 f:\sp\public\sdk\inc\windef.h -FILE 3540 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3541 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3542 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3543 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3544 f:\sp\public\sdk\inc\pshpack1.h -FILE 3545 f:\sp\vctools\crt_bld\self_x86\crt\src\free.c -FILE 3546 f:\sp\public\sdk\inc\winver.h -FILE 3547 f:\sp\public\sdk\inc\winnt.h -FILE 3548 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3549 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3550 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3551 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3552 f:\sp\public\sdk\inc\winreg.h -FILE 3553 f:\sp\public\sdk\inc\ddbanned.h -FILE 3554 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3555 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3556 f:\sp\public\sdk\inc\winbase.h -FILE 3557 f:\sp\public\sdk\inc\winerror.h -FILE 3558 f:\sp\public\sdk\inc\pshpack8.h -FILE 3559 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3560 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3561 f:\sp\public\sdk\inc\reason.h -FILE 3562 f:\sp\public\sdk\inc\wincon.h -FILE 3563 f:\sp\public\sdk\inc\pshpack2.h -FILE 3564 f:\sp\public\sdk\inc\mcx.h -FILE 3565 f:\sp\public\sdk\inc\winuser.h -FILE 3566 f:\sp\public\sdk\inc\winnls.h -FILE 3567 f:\sp\public\sdk\inc\guiddef.h -FILE 3568 f:\sp\public\sdk\inc\windows.h -FILE 3569 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3570 f:\sp\public\sdk\inc\specstrings.h -FILE 3571 f:\sp\public\sdk\inc\basetsd.h -FILE 3572 f:\sp\public\sdk\inc\stralign.h -FILE 3573 f:\sp\public\sdk\inc\tvout.h -FILE 3574 f:\sp\public\sdk\inc\winsvc.h -FILE 3575 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3576 f:\sp\public\sdk\inc\wingdi.h -FILE 3577 f:\sp\public\sdk\inc\pshpack4.h -FILE 3578 f:\sp\public\sdk\inc\poppack.h -FILE 3579 f:\sp\public\sdk\inc\winnetwk.h -FILE 3580 f:\sp\public\sdk\inc\imm.h -FILE 3581 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3582 f:\sp\public\sdk\inc\windef.h -FILE 3583 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3584 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3585 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3586 f:\sp\public\sdk\inc\pshpack1.h -FILE 3587 f:\sp\vctools\crt_bld\self_x86\crt\src\crtheap.c -FILE 3588 f:\sp\public\sdk\inc\winver.h -FILE 3589 f:\sp\public\sdk\inc\winnt.h -FILE 3590 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3591 f:\sp\public\sdk\inc\winreg.h -FILE 3592 f:\sp\public\sdk\inc\ddbanned.h -FILE 3593 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3594 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3595 f:\sp\public\sdk\inc\winbase.h -FILE 3596 f:\sp\public\sdk\inc\winerror.h -FILE 3597 f:\sp\public\sdk\inc\pshpack8.h -FILE 3598 f:\sp\public\sdk\inc\reason.h -FILE 3599 f:\sp\public\sdk\inc\wincon.h -FILE 3600 f:\sp\public\sdk\inc\pshpack2.h -FILE 3601 f:\sp\public\sdk\inc\mcx.h -FILE 3602 f:\sp\public\sdk\inc\winuser.h -FILE 3603 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3604 f:\sp\public\sdk\inc\winnls.h -FILE 3605 f:\sp\public\sdk\inc\stralign.h -FILE 3606 f:\sp\public\sdk\inc\tvout.h -FILE 3607 f:\sp\public\sdk\inc\winsvc.h -FILE 3608 f:\sp\public\sdk\inc\wingdi.h -FILE 3609 f:\sp\public\sdk\inc\winnt.h -FILE 3610 f:\sp\public\sdk\inc\pshpack4.h -FILE 3611 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3612 f:\sp\public\sdk\inc\poppack.h -FILE 3613 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3614 f:\sp\public\sdk\inc\winnetwk.h -FILE 3615 f:\sp\public\sdk\inc\imm.h -FILE 3616 f:\sp\vctools\crt_bld\self_x86\crt\src\malloc.h -FILE 3617 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3618 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3619 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 3620 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3621 f:\sp\public\sdk\inc\pshpack1.h -FILE 3622 f:\sp\vctools\crt_bld\self_x86\crt\src\calloc.c -FILE 3623 f:\sp\public\sdk\inc\winver.h -FILE 3624 f:\sp\vctools\crt_bld\self_x86\crt\src\winheap.h -FILE 3625 f:\sp\public\sdk\inc\guiddef.h -FILE 3626 f:\sp\public\sdk\inc\windows.h -FILE 3627 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3628 f:\sp\public\sdk\inc\specstrings.h -FILE 3629 f:\sp\public\sdk\inc\basetsd.h -FILE 3630 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcsup.h -FILE 3631 f:\sp\vctools\crt_bld\self_x86\crt\src\rtcapi.h -FILE 3632 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3633 f:\sp\public\sdk\inc\winreg.h -FILE 3634 f:\sp\public\sdk\inc\ddbanned.h -FILE 3635 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3636 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3637 f:\sp\public\sdk\inc\winbase.h -FILE 3638 f:\sp\public\sdk\inc\winerror.h -FILE 3639 f:\sp\public\sdk\inc\pshpack8.h -FILE 3640 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3641 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3642 f:\sp\public\sdk\inc\reason.h -FILE 3643 f:\sp\public\sdk\inc\wincon.h -FILE 3644 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3645 f:\sp\public\sdk\inc\windef.h -FILE 3646 f:\sp\public\sdk\inc\wincon.h -FILE 3647 f:\sp\public\sdk\inc\imm.h -FILE 3648 f:\sp\public\sdk\inc\winbase.h -FILE 3649 f:\sp\public\sdk\inc\wingdi.h -FILE 3650 f:\sp\public\sdk\inc\winver.h -FILE 3651 f:\sp\public\sdk\inc\pshpack2.h -FILE 3652 f:\sp\public\sdk\inc\reason.h -FILE 3653 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 3654 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\unhandld.cpp -FILE 3655 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3656 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3657 f:\sp\public\sdk\inc\specstrings.h -FILE 3658 f:\sp\public\sdk\inc\basetsd.h -FILE 3659 f:\sp\public\sdk\inc\pshpack4.h -FILE 3660 f:\sp\public\sdk\inc\winnetwk.h -FILE 3661 f:\sp\public\sdk\inc\stralign.h -FILE 3662 f:\sp\public\sdk\inc\poppack.h -FILE 3663 f:\sp\public\sdk\inc\winsvc.h -FILE 3664 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3665 f:\sp\public\sdk\inc\windef.h -FILE 3666 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 3667 f:\sp\public\sdk\inc\winuser.h -FILE 3668 f:\sp\public\sdk\inc\windows.h -FILE 3669 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3670 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3671 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3672 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 3673 f:\sp\public\sdk\inc\mcx.h -FILE 3674 f:\sp\public\sdk\inc\pshpack8.h -FILE 3675 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3676 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3677 f:\sp\public\sdk\inc\guiddef.h -FILE 3678 f:\sp\public\sdk\inc\winnt.h -FILE 3679 f:\sp\public\sdk\inc\winnls.h -FILE 3680 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3681 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3682 f:\sp\public\sdk\inc\pshpack1.h -FILE 3683 f:\sp\public\sdk\inc\winerror.h -FILE 3684 f:\sp\vctools\langapi\include\ehdata.h -FILE 3685 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3686 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3687 f:\sp\public\sdk\inc\winreg.h -FILE 3688 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3689 f:\sp\public\sdk\inc\ddbanned.h -FILE 3690 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3691 f:\sp\public\sdk\inc\tvout.h -FILE 3692 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3693 f:\sp\public\sdk\inc\specstrings.h -FILE 3694 f:\sp\public\sdk\inc\basetsd.h -FILE 3695 f:\sp\public\sdk\inc\pshpack4.h -FILE 3696 f:\sp\public\sdk\inc\winnetwk.h -FILE 3697 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3698 f:\sp\public\sdk\inc\stralign.h -FILE 3699 f:\sp\public\sdk\inc\poppack.h -FILE 3700 f:\sp\public\sdk\inc\winsvc.h -FILE 3701 f:\sp\public\sdk\inc\winuser.h -FILE 3702 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3703 f:\sp\public\sdk\inc\windef.h -FILE 3704 f:\sp\vctools\langapi\undname\undname.cxx -FILE 3705 f:\sp\public\sdk\inc\mcx.h -FILE 3706 f:\sp\public\sdk\inc\pshpack8.h -FILE 3707 f:\sp\public\sdk\inc\guiddef.h -FILE 3708 f:\sp\vctools\langapi\undname\utf8.h -FILE 3709 f:\sp\public\sdk\inc\winnls.h -FILE 3710 f:\sp\public\sdk\inc\pshpack1.h -FILE 3711 f:\sp\public\sdk\inc\winnt.h -FILE 3712 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3713 f:\sp\public\sdk\inc\winerror.h -FILE 3714 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\swprintf.inl -FILE 3715 f:\sp\vctools\langapi\undname\undname.hxx -FILE 3716 f:\sp\vctools\langapi\undname\undname.h -FILE 3717 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3718 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3719 f:\sp\public\sdk\inc\winreg.h -FILE 3720 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3721 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3722 f:\sp\public\sdk\inc\tvout.h -FILE 3723 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdio.h -FILE 3724 f:\sp\public\sdk\inc\wincon.h -FILE 3725 f:\sp\public\sdk\inc\imm.h -FILE 3726 f:\sp\public\sdk\inc\winbase.h -FILE 3727 f:\sp\public\sdk\inc\wingdi.h -FILE 3728 f:\sp\public\sdk\inc\winver.h -FILE 3729 f:\sp\public\sdk\inc\pshpack2.h -FILE 3730 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3731 f:\sp\public\sdk\inc\windows.h -FILE 3732 f:\sp\public\sdk\inc\reason.h -FILE 3733 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3734 f:\sp\public\sdk\inc\ddbanned.h -FILE 3735 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3736 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3737 f:\sp\vctools\langapi\undname\undname.inl -FILE 3738 f:\sp\public\sdk\inc\guiddef.h -FILE 3739 f:\sp\public\sdk\inc\winnt.h -FILE 3740 f:\sp\public\sdk\inc\winnls.h -FILE 3741 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3742 f:\sp\public\sdk\inc\pshpack1.h -FILE 3743 f:\sp\public\sdk\inc\winerror.h -FILE 3744 f:\sp\public\sdk\inc\winreg.h -FILE 3745 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3746 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3747 f:\sp\public\sdk\inc\tvout.h -FILE 3748 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp -FILE 3749 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3750 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 3751 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3752 f:\sp\public\sdk\inc\wincon.h -FILE 3753 f:\sp\public\sdk\inc\imm.h -FILE 3754 f:\sp\public\sdk\inc\winbase.h -FILE 3755 f:\sp\public\sdk\inc\wingdi.h -FILE 3756 f:\sp\public\sdk\inc\winver.h -FILE 3757 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3758 f:\sp\public\sdk\inc\windows.h -FILE 3759 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3760 f:\sp\public\sdk\inc\pshpack2.h -FILE 3761 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3762 f:\sp\public\sdk\inc\reason.h -FILE 3763 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sect_attribs.h -FILE 3764 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 3765 f:\sp\public\sdk\inc\specstrings.h -FILE 3766 f:\sp\public\sdk\inc\basetsd.h -FILE 3767 f:\sp\public\sdk\inc\pshpack4.h -FILE 3768 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\typeinfo.h -FILE 3769 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 3770 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 3771 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 3772 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3773 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 3774 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 3775 f:\sp\public\sdk\inc\winnetwk.h -FILE 3776 f:\sp\vctools\langapi\undname\undname.h -FILE 3777 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3778 f:\sp\public\sdk\inc\stralign.h -FILE 3779 f:\sp\public\sdk\inc\poppack.h -FILE 3780 f:\sp\public\sdk\inc\winsvc.h -FILE 3781 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3782 f:\sp\public\sdk\inc\windef.h -FILE 3783 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3784 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3785 f:\sp\public\sdk\inc\winuser.h -FILE 3786 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3787 f:\sp\public\sdk\inc\ddbanned.h -FILE 3788 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3789 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3790 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 3791 f:\sp\public\sdk\inc\mcx.h -FILE 3792 f:\sp\public\sdk\inc\pshpack8.h -FILE 3793 f:\sp\public\sdk\inc\winnls.h -FILE 3794 f:\sp\public\sdk\inc\pshpack1.h -FILE 3795 f:\sp\public\sdk\inc\winnt.h -FILE 3796 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3797 f:\sp\public\sdk\inc\winerror.h -FILE 3798 f:\sp\public\sdk\inc\winreg.h -FILE 3799 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3800 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3801 f:\sp\public\sdk\inc\tvout.h -FILE 3802 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\dbgint.h -FILE 3803 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3804 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\cstddef -FILE 3805 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3806 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp -FILE 3807 f:\sp\public\sdk\inc\wincon.h -FILE 3808 f:\sp\public\sdk\inc\imm.h -FILE 3809 f:\sp\public\sdk\inc\winbase.h -FILE 3810 f:\sp\public\sdk\inc\wingdi.h -FILE 3811 f:\sp\public\sdk\inc\winver.h -FILE 3812 f:\sp\public\sdk\inc\pshpack2.h -FILE 3813 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3814 f:\sp\public\sdk\inc\reason.h -FILE 3815 f:\sp\public\sdk\inc\windows.h -FILE 3816 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3817 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3818 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3819 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3820 f:\sp\public\sdk\inc\specstrings.h -FILE 3821 f:\sp\public\sdk\inc\basetsd.h -FILE 3822 f:\sp\public\sdk\inc\pshpack4.h -FILE 3823 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\typeinfo -FILE 3824 f:\sp\public\sdk\inc\winnetwk.h -FILE 3825 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\exception -FILE 3826 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\xstddef -FILE 3827 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3828 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\yvals.h -FILE 3829 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\stdhpp\use_ansi.h -FILE 3830 f:\sp\public\sdk\inc\stralign.h -FILE 3831 f:\sp\public\sdk\inc\poppack.h -FILE 3832 f:\sp\public\sdk\inc\winsvc.h -FILE 3833 f:\sp\public\sdk\inc\winuser.h -FILE 3834 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3835 f:\sp\public\sdk\inc\windef.h -FILE 3836 f:\sp\vctools\langapi\undname\undname.h -FILE 3837 f:\sp\public\sdk\inc\ddbanned.h -FILE 3838 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\malloc.h -FILE 3839 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3840 f:\sp\public\sdk\inc\mcx.h -FILE 3841 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3842 f:\sp\public\sdk\inc\pshpack8.h -FILE 3843 f:\sp\public\sdk\inc\guiddef.h -FILE 3844 f:\sp\public\sdk\inc\poppack.h -FILE 3845 f:\sp\public\sdk\inc\winsvc.h -FILE 3846 f:\sp\public\sdk\inc\windows.h -FILE 3847 f:\sp\public\sdk\inc\winuser.h -FILE 3848 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdarg.h -FILE 3849 f:\sp\public\sdk\inc\windef.h -FILE 3850 f:\sp\public\sdk\inc\mcx.h -FILE 3851 f:\sp\public\sdk\inc\pshpack8.h -FILE 3852 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stdlib.h -FILE 3853 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\limits.h -FILE 3854 f:\sp\public\sdk\inc\guiddef.h -FILE 3855 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\hooks.cpp -FILE 3856 f:\sp\public\sdk\inc\winnls.h -FILE 3857 f:\sp\public\sdk\inc\pshpack1.h -FILE 3858 f:\sp\public\sdk\inc\winnt.h -FILE 3859 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ctype.h -FILE 3860 f:\sp\public\sdk\inc\winerror.h -FILE 3861 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\mtdll.h -FILE 3862 f:\sp\public\sdk\inc\winreg.h -FILE 3863 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\string.h -FILE 3864 f:\sp\public\sdk\inc\tvout.h -FILE 3865 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\eh.h -FILE 3866 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\errno.h -FILE 3867 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\stddef.h -FILE 3868 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdefs.h -FILE 3869 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\sal.h -FILE 3870 f:\sp\public\sdk\inc\wincon.h -FILE 3871 f:\sp\public\sdk\inc\imm.h -FILE 3872 f:\sp\public\sdk\inc\winbase.h -FILE 3873 f:\sp\public\sdk\inc\wingdi.h -FILE 3874 f:\sp\public\sdk\inc\winver.h -FILE 3875 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehhooks.h -FILE 3876 f:\sp\public\sdk\inc\pshpack2.h -FILE 3877 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\excpt.h -FILE 3878 f:\sp\public\sdk\inc\reason.h -FILE 3879 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\ehassert.h -FILE 3880 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\internal.h -FILE 3881 f:\sp\public\sdk\inc\specstrings.h -FILE 3882 f:\sp\public\sdk\inc\basetsd.h -FILE 3883 f:\sp\public\sdk\inc\pshpack4.h -FILE 3884 f:\sp\public\sdk\inc\ddbanned.h -FILE 3885 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\vadefs.h -FILE 3886 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\cruntime.h -FILE 3887 f:\sp\public\sdk\inc\winnetwk.h -FILE 3888 f:\sp\vctools\crt_bld\self_x86\crt\prebuild\h\crtdbg.h -FILE 3889 f:\sp\public\sdk\inc\stralign.h -FILE 3890 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3891 f:\sp\public\sdk\inc\pshpack4.h -FILE 3892 f:\sp\public\sdk\inc\reason.h -FILE 3893 f:\sp\public\sdk\inc\wincon.h -FILE 3894 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3895 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3896 f:\sp\public\sdk\inc\poppack.h -FILE 3897 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3898 f:\sp\public\sdk\inc\mcx.h -FILE 3899 f:\sp\public\sdk\inc\winuser.h -FILE 3900 f:\sp\public\sdk\inc\winnls.h -FILE 3901 f:\sp\public\sdk\inc\stralign.h -FILE 3902 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3903 f:\sp\public\sdk\inc\windef.h -FILE 3904 f:\sp\public\sdk\inc\tvout.h -FILE 3905 f:\sp\public\sdk\inc\winsvc.h -FILE 3906 f:\sp\public\sdk\inc\wingdi.h -FILE 3907 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3908 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3909 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3910 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3911 f:\sp\public\sdk\inc\winnt.h -FILE 3912 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3913 f:\sp\public\sdk\inc\winnetwk.h -FILE 3914 f:\sp\public\sdk\inc\imm.h -FILE 3915 f:\sp\vctools\crt_bld\self_x86\crt\src\dosmap.c -FILE 3916 f:\sp\public\sdk\inc\winbase.h -FILE 3917 f:\sp\public\sdk\inc\winerror.h -FILE 3918 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3919 f:\sp\public\sdk\inc\pshpack1.h -FILE 3920 f:\sp\public\sdk\inc\pshpack8.h -FILE 3921 f:\sp\public\sdk\inc\winver.h -FILE 3922 f:\sp\public\sdk\inc\ddbanned.h -FILE 3923 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3924 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3925 f:\sp\public\sdk\inc\pshpack2.h -FILE 3926 f:\sp\public\sdk\inc\winreg.h -FILE 3927 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3928 f:\sp\public\sdk\inc\guiddef.h -FILE 3929 f:\sp\public\sdk\inc\windows.h -FILE 3930 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3931 f:\sp\public\sdk\inc\specstrings.h -FILE 3932 f:\sp\public\sdk\inc\basetsd.h -FILE 3933 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 3934 f:\sp\public\sdk\inc\mcx.h -FILE 3935 f:\sp\public\sdk\inc\pshpack8.h -FILE 3936 f:\sp\public\sdk\inc\guiddef.h -FILE 3937 f:\sp\public\sdk\inc\winnt.h -FILE 3938 f:\sp\public\sdk\inc\winnls.h -FILE 3939 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 3940 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3941 f:\sp\public\sdk\inc\pshpack1.h -FILE 3942 f:\sp\public\sdk\inc\winerror.h -FILE 3943 f:\sp\vctools\crt_bld\self_x86\crt\src\tolower.c -FILE 3944 f:\sp\public\sdk\inc\winreg.h -FILE 3945 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3946 f:\sp\public\sdk\inc\tvout.h -FILE 3947 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3948 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3949 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 3950 f:\sp\public\sdk\inc\wincon.h -FILE 3951 f:\sp\vctools\crt_bld\self_x86\crt\src\stddef.h -FILE 3952 f:\sp\public\sdk\inc\imm.h -FILE 3953 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3954 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 3955 f:\sp\public\sdk\inc\winbase.h -FILE 3956 f:\sp\public\sdk\inc\wingdi.h -FILE 3957 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3958 f:\sp\public\sdk\inc\winver.h -FILE 3959 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 3960 f:\sp\public\sdk\inc\windows.h -FILE 3961 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3962 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 3963 f:\sp\public\sdk\inc\pshpack2.h -FILE 3964 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 3965 f:\sp\public\sdk\inc\reason.h -FILE 3966 f:\sp\public\sdk\inc\specstrings.h -FILE 3967 f:\sp\public\sdk\inc\basetsd.h -FILE 3968 f:\sp\public\sdk\inc\pshpack4.h -FILE 3969 f:\sp\public\sdk\inc\winnetwk.h -FILE 3970 f:\sp\public\sdk\inc\ddbanned.h -FILE 3971 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 3972 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 3973 f:\sp\public\sdk\inc\stralign.h -FILE 3974 f:\sp\public\sdk\inc\poppack.h -FILE 3975 f:\sp\public\sdk\inc\winsvc.h -FILE 3976 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 3977 f:\sp\public\sdk\inc\windef.h -FILE 3978 f:\sp\public\sdk\inc\winuser.h -FILE 3979 f:\sp\public\sdk\inc\winsvc.h -FILE 3980 f:\sp\public\sdk\inc\winuser.h -FILE 3981 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 3982 f:\sp\public\sdk\inc\mcx.h -FILE 3983 f:\sp\public\sdk\inc\pshpack8.h -FILE 3984 f:\sp\public\sdk\inc\guiddef.h -FILE 3985 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 3986 f:\sp\public\sdk\inc\windows.h -FILE 3987 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 3988 f:\sp\public\sdk\inc\winnls.h -FILE 3989 f:\sp\vctools\crt_bld\self_x86\crt\src\strtoq.c -FILE 3990 f:\sp\public\sdk\inc\pshpack1.h -FILE 3991 f:\sp\public\sdk\inc\winerror.h -FILE 3992 f:\sp\public\sdk\inc\winreg.h -FILE 3993 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 3994 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 3995 f:\sp\public\sdk\inc\tvout.h -FILE 3996 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 3997 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 3998 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 3999 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4000 f:\sp\public\sdk\inc\wincon.h -FILE 4001 f:\sp\public\sdk\inc\imm.h -FILE 4002 f:\sp\public\sdk\inc\winbase.h -FILE 4003 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4004 f:\sp\public\sdk\inc\wingdi.h -FILE 4005 f:\sp\public\sdk\inc\windef.h -FILE 4006 f:\sp\public\sdk\inc\winver.h -FILE 4007 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4008 f:\sp\public\sdk\inc\pshpack2.h -FILE 4009 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4010 f:\sp\public\sdk\inc\reason.h -FILE 4011 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4012 f:\sp\public\sdk\inc\winnt.h -FILE 4013 f:\sp\public\sdk\inc\specstrings.h -FILE 4014 f:\sp\public\sdk\inc\basetsd.h -FILE 4015 f:\sp\public\sdk\inc\pshpack4.h -FILE 4016 f:\sp\public\sdk\inc\ddbanned.h -FILE 4017 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4018 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4019 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4020 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4021 f:\sp\public\sdk\inc\winnetwk.h -FILE 4022 f:\sp\public\sdk\inc\stralign.h -FILE 4023 f:\sp\public\sdk\inc\poppack.h -FILE 4024 f:\sp\public\sdk\inc\winsvc.h -FILE 4025 f:\sp\public\sdk\inc\winuser.h -FILE 4026 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4027 f:\sp\public\sdk\inc\mcx.h -FILE 4028 f:\sp\public\sdk\inc\pshpack8.h -FILE 4029 f:\sp\public\sdk\inc\guiddef.h -FILE 4030 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4031 f:\sp\public\sdk\inc\windows.h -FILE 4032 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4033 f:\sp\public\sdk\inc\winnls.h -FILE 4034 f:\sp\vctools\crt_bld\self_x86\crt\src\strtol.c -FILE 4035 f:\sp\public\sdk\inc\pshpack1.h -FILE 4036 f:\sp\public\sdk\inc\winerror.h -FILE 4037 f:\sp\public\sdk\inc\winreg.h -FILE 4038 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4039 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4040 f:\sp\public\sdk\inc\tvout.h -FILE 4041 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4042 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4043 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4044 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4045 f:\sp\public\sdk\inc\wincon.h -FILE 4046 f:\sp\public\sdk\inc\imm.h -FILE 4047 f:\sp\public\sdk\inc\winbase.h -FILE 4048 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4049 f:\sp\public\sdk\inc\wingdi.h -FILE 4050 f:\sp\public\sdk\inc\windef.h -FILE 4051 f:\sp\public\sdk\inc\winver.h -FILE 4052 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4053 f:\sp\public\sdk\inc\pshpack2.h -FILE 4054 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4055 f:\sp\public\sdk\inc\reason.h -FILE 4056 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4057 f:\sp\public\sdk\inc\winnt.h -FILE 4058 f:\sp\public\sdk\inc\specstrings.h -FILE 4059 f:\sp\public\sdk\inc\basetsd.h -FILE 4060 f:\sp\public\sdk\inc\pshpack4.h -FILE 4061 f:\sp\public\sdk\inc\ddbanned.h -FILE 4062 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4063 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4064 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4065 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4066 f:\sp\public\sdk\inc\winnetwk.h -FILE 4067 f:\sp\public\sdk\inc\stralign.h -FILE 4068 f:\sp\public\sdk\inc\poppack.h -FILE 4069 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4070 f:\sp\public\sdk\inc\winreg.h -FILE 4071 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4072 f:\sp\public\sdk\inc\tvout.h -FILE 4073 f:\sp\vctools\crt_bld\self_x86\crt\src\dbgint.h -FILE 4074 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4075 f:\sp\public\sdk\inc\wincon.h -FILE 4076 f:\sp\public\sdk\inc\imm.h -FILE 4077 f:\sp\public\sdk\inc\winbase.h -FILE 4078 f:\sp\vctools\crt_bld\self_x86\crt\src\isctype.c -FILE 4079 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4080 f:\sp\public\sdk\inc\wingdi.h -FILE 4081 f:\sp\public\sdk\inc\windef.h -FILE 4082 f:\sp\public\sdk\inc\winver.h -FILE 4083 f:\sp\public\sdk\inc\pshpack2.h -FILE 4084 f:\sp\public\sdk\inc\reason.h -FILE 4085 f:\sp\public\sdk\inc\winnt.h -FILE 4086 f:\sp\public\sdk\inc\specstrings.h -FILE 4087 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4088 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4089 f:\sp\public\sdk\inc\basetsd.h -FILE 4090 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4091 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4092 f:\sp\public\sdk\inc\pshpack4.h -FILE 4093 f:\sp\public\sdk\inc\winnetwk.h -FILE 4094 f:\sp\public\sdk\inc\stralign.h -FILE 4095 f:\sp\public\sdk\inc\poppack.h -FILE 4096 f:\sp\public\sdk\inc\winsvc.h -FILE 4097 f:\sp\public\sdk\inc\winuser.h -FILE 4098 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4099 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4100 f:\sp\public\sdk\inc\mcx.h -FILE 4101 f:\sp\public\sdk\inc\pshpack8.h -FILE 4102 f:\sp\public\sdk\inc\guiddef.h -FILE 4103 f:\sp\public\sdk\inc\ddbanned.h -FILE 4104 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4105 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4106 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4107 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4108 f:\sp\public\sdk\inc\windows.h -FILE 4109 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4110 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4111 f:\sp\public\sdk\inc\winnls.h -FILE 4112 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4113 f:\sp\public\sdk\inc\pshpack1.h -FILE 4114 f:\sp\public\sdk\inc\winerror.h -FILE 4115 f:\sp\vctools\crt_bld\self_x86\crt\src\swprintf.inl -FILE 4116 f:\sp\public\sdk\inc\winreg.h -FILE 4117 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4118 f:\sp\public\sdk\inc\tvout.h -FILE 4119 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4120 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4121 f:\sp\public\sdk\inc\wincon.h -FILE 4122 f:\sp\public\sdk\inc\imm.h -FILE 4123 f:\sp\public\sdk\inc\winbase.h -FILE 4124 f:\sp\vctools\crt_bld\self_x86\crt\src\iswctype.c -FILE 4125 f:\sp\public\sdk\inc\wingdi.h -FILE 4126 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4127 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4128 f:\sp\public\sdk\inc\winver.h -FILE 4129 f:\sp\vctools\crt_bld\self_x86\crt\src\awint.h -FILE 4130 f:\sp\public\sdk\inc\windows.h -FILE 4131 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4132 f:\sp\public\sdk\inc\pshpack2.h -FILE 4133 f:\sp\public\sdk\inc\reason.h -FILE 4134 f:\sp\public\sdk\inc\specstrings.h -FILE 4135 f:\sp\vctools\crt_bld\self_x86\crt\src\stdio.h -FILE 4136 f:\sp\public\sdk\inc\basetsd.h -FILE 4137 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4138 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4139 f:\sp\public\sdk\inc\pshpack4.h -FILE 4140 f:\sp\public\sdk\inc\winnetwk.h -FILE 4141 f:\sp\public\sdk\inc\stralign.h -FILE 4142 f:\sp\public\sdk\inc\poppack.h -FILE 4143 f:\sp\public\sdk\inc\winsvc.h -FILE 4144 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4145 f:\sp\public\sdk\inc\windef.h -FILE 4146 f:\sp\public\sdk\inc\winuser.h -FILE 4147 f:\sp\public\sdk\inc\mcx.h -FILE 4148 f:\sp\public\sdk\inc\pshpack8.h -FILE 4149 f:\sp\public\sdk\inc\guiddef.h -FILE 4150 f:\sp\public\sdk\inc\ddbanned.h -FILE 4151 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4152 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4153 f:\sp\public\sdk\inc\winnt.h -FILE 4154 f:\sp\public\sdk\inc\winnls.h -FILE 4155 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4156 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4157 f:\sp\public\sdk\inc\pshpack1.h -FILE 4158 f:\sp\public\sdk\inc\winerror.h -FILE 4159 f:\sp\public\sdk\inc\winsvc.h -FILE 4160 f:\sp\public\sdk\inc\winuser.h -FILE 4161 f:\sp\public\sdk\inc\mcx.h -FILE 4162 f:\sp\public\sdk\inc\pshpack8.h -FILE 4163 f:\sp\public\sdk\inc\guiddef.h -FILE 4164 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4165 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4166 f:\sp\public\sdk\inc\windows.h -FILE 4167 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4168 f:\sp\public\sdk\inc\winnls.h -FILE 4169 f:\sp\vctools\crt_bld\self_x86\crt\src\_wctype.c -FILE 4170 f:\sp\public\sdk\inc\pshpack1.h -FILE 4171 f:\sp\public\sdk\inc\winerror.h -FILE 4172 f:\sp\public\sdk\inc\winreg.h -FILE 4173 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4174 f:\sp\public\sdk\inc\tvout.h -FILE 4175 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4176 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4177 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4178 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4179 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4180 f:\sp\public\sdk\inc\wincon.h -FILE 4181 f:\sp\public\sdk\inc\imm.h -FILE 4182 f:\sp\public\sdk\inc\winbase.h -FILE 4183 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4184 f:\sp\public\sdk\inc\wingdi.h -FILE 4185 f:\sp\public\sdk\inc\windef.h -FILE 4186 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4187 f:\sp\public\sdk\inc\winver.h -FILE 4188 f:\sp\public\sdk\inc\pshpack2.h -FILE 4189 f:\sp\public\sdk\inc\reason.h -FILE 4190 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4191 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4192 f:\sp\public\sdk\inc\winnt.h -FILE 4193 f:\sp\public\sdk\inc\specstrings.h -FILE 4194 f:\sp\public\sdk\inc\basetsd.h -FILE 4195 f:\sp\public\sdk\inc\pshpack4.h -FILE 4196 f:\sp\public\sdk\inc\ddbanned.h -FILE 4197 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4198 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4199 f:\sp\public\sdk\inc\winnetwk.h -FILE 4200 f:\sp\public\sdk\inc\stralign.h -FILE 4201 f:\sp\public\sdk\inc\poppack.h -FILE 4202 f:\sp\public\sdk\inc\mcx.h -FILE 4203 f:\sp\public\sdk\inc\pshpack8.h -FILE 4204 f:\sp\public\sdk\inc\guiddef.h -FILE 4205 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4206 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4207 f:\sp\public\sdk\inc\windows.h -FILE 4208 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4209 f:\sp\public\sdk\inc\winnls.h -FILE 4210 f:\sp\public\sdk\inc\pshpack1.h -FILE 4211 f:\sp\public\sdk\inc\winerror.h -FILE 4212 f:\sp\public\sdk\inc\winreg.h -FILE 4213 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4214 f:\sp\vctools\crt_bld\self_x86\crt\src\_ctype.c -FILE 4215 f:\sp\public\sdk\inc\tvout.h -FILE 4216 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4217 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4218 f:\sp\public\sdk\inc\wincon.h -FILE 4219 f:\sp\public\sdk\inc\imm.h -FILE 4220 f:\sp\public\sdk\inc\winbase.h -FILE 4221 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4222 f:\sp\public\sdk\inc\wingdi.h -FILE 4223 f:\sp\public\sdk\inc\windef.h -FILE 4224 f:\sp\public\sdk\inc\winver.h -FILE 4225 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4226 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4227 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4228 f:\sp\public\sdk\inc\pshpack2.h -FILE 4229 f:\sp\public\sdk\inc\reason.h -FILE 4230 f:\sp\public\sdk\inc\winnt.h -FILE 4231 f:\sp\vctools\crt_bld\self_x86\crt\src\locale.h -FILE 4232 f:\sp\public\sdk\inc\specstrings.h -FILE 4233 f:\sp\public\sdk\inc\basetsd.h -FILE 4234 f:\sp\public\sdk\inc\pshpack4.h -FILE 4235 f:\sp\public\sdk\inc\winnetwk.h -FILE 4236 f:\sp\public\sdk\inc\stralign.h -FILE 4237 f:\sp\public\sdk\inc\poppack.h -FILE 4238 f:\sp\public\sdk\inc\winsvc.h -FILE 4239 f:\sp\public\sdk\inc\ddbanned.h -FILE 4240 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4241 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4242 f:\sp\public\sdk\inc\winuser.h -FILE 4243 f:\sp\public\sdk\inc\pshpack2.h -FILE 4244 f:\sp\public\sdk\inc\mcx.h -FILE 4245 f:\sp\public\sdk\inc\winuser.h -FILE 4246 f:\sp\public\sdk\inc\winnls.h -FILE 4247 f:\sp\public\sdk\inc\stralign.h -FILE 4248 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4249 f:\sp\public\sdk\inc\windef.h -FILE 4250 f:\sp\public\sdk\inc\tvout.h -FILE 4251 f:\sp\public\sdk\inc\winsvc.h -FILE 4252 f:\sp\vctools\crt_bld\self_x86\crt\src\internal_securecrt.h -FILE 4253 f:\sp\public\sdk\inc\wingdi.h -FILE 4254 f:\sp\public\sdk\inc\pshpack4.h -FILE 4255 f:\sp\public\sdk\inc\poppack.h -FILE 4256 f:\sp\public\sdk\inc\winnt.h -FILE 4257 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4258 f:\sp\public\sdk\inc\winnetwk.h -FILE 4259 f:\sp\public\sdk\inc\imm.h -FILE 4260 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoa.c -FILE 4261 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4262 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdbg.h -FILE 4263 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4264 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4265 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4266 f:\sp\vctools\crt_bld\self_x86\crt\src\xtoas.c -FILE 4267 f:\sp\public\sdk\inc\pshpack1.h -FILE 4268 f:\sp\public\sdk\inc\winver.h -FILE 4269 f:\sp\vctools\crt_bld\self_x86\crt\src\errno.h -FILE 4270 f:\sp\public\sdk\inc\guiddef.h -FILE 4271 f:\sp\public\sdk\inc\specstrings.h -FILE 4272 f:\sp\public\sdk\inc\basetsd.h -FILE 4273 f:\sp\public\sdk\inc\winreg.h -FILE 4274 f:\sp\public\sdk\inc\ddbanned.h -FILE 4275 f:\sp\vctools\crt_bld\self_x86\crt\src\internal.h -FILE 4276 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4277 f:\sp\public\sdk\inc\windows.h -FILE 4278 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4279 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4280 f:\sp\public\sdk\inc\winbase.h -FILE 4281 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4282 f:\sp\public\sdk\inc\winerror.h -FILE 4283 f:\sp\public\sdk\inc\pshpack8.h -FILE 4284 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 4285 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4286 f:\sp\public\sdk\inc\reason.h -FILE 4287 f:\sp\public\sdk\inc\wincon.h -FILE 4288 f:\sp\public\sdk\inc\poppack.h -FILE 4289 f:\sp\public\sdk\inc\winnetwk.h -FILE 4290 f:\sp\public\sdk\inc\imm.h -FILE 4291 f:\sp\vctools\crt_bld\self_x86\crt\src\stdarg.h -FILE 4292 f:\sp\public\sdk\inc\windef.h -FILE 4293 f:\sp\public\sdk\inc\pshpack1.h -FILE 4294 f:\sp\public\sdk\inc\winver.h -FILE 4295 f:\sp\vctools\crt_bld\self_x86\crt\src\mtdll.h -FILE 4296 f:\sp\vctools\crt_bld\self_x86\crt\src\crtdefs.h -FILE 4297 f:\sp\vctools\crt_bld\self_x86\crt\src\sal.h -FILE 4298 f:\sp\public\sdk\inc\winnt.h -FILE 4299 f:\sp\vctools\crt_bld\self_x86\crt\src\ctype.h -FILE 4300 f:\sp\public\sdk\inc\winreg.h -FILE 4301 f:\sp\vctools\crt_bld\self_x86\crt\src\atox.c -FILE 4302 f:\sp\public\sdk\inc\winbase.h -FILE 4303 f:\sp\public\sdk\inc\winerror.h -FILE 4304 f:\sp\public\sdk\inc\pshpack8.h -FILE 4305 f:\sp\vctools\crt_bld\self_x86\crt\src\setlocal.h -FILE 4306 f:\sp\vctools\crt_bld\self_x86\crt\src\oscalls.h -FILE 4307 f:\sp\public\sdk\inc\reason.h -FILE 4308 f:\sp\public\sdk\inc\wincon.h -FILE 4309 f:\sp\public\sdk\inc\ddbanned.h -FILE 4310 f:\sp\vctools\crt_bld\self_x86\crt\src\vadefs.h -FILE 4311 f:\sp\vctools\crt_bld\self_x86\crt\src\cruntime.h -FILE 4312 f:\sp\public\sdk\inc\pshpack2.h -FILE 4313 f:\sp\vctools\crt_bld\self_x86\crt\src\tchar.h -FILE 4314 f:\sp\vctools\crt_bld\self_x86\crt\src\stdlib.h -FILE 4315 f:\sp\vctools\crt_bld\self_x86\crt\src\mbstring.h -FILE 4316 f:\sp\public\sdk\inc\mcx.h -FILE 4317 f:\sp\public\sdk\inc\winuser.h -FILE 4318 f:\sp\vctools\crt_bld\self_x86\crt\src\limits.h -FILE 4319 f:\sp\public\sdk\inc\winnls.h -FILE 4320 f:\sp\public\sdk\inc\guiddef.h -FILE 4321 f:\sp\public\sdk\inc\windows.h -FILE 4322 f:\sp\vctools\crt_bld\self_x86\crt\src\excpt.h -FILE 4323 f:\sp\vctools\crt_bld\self_x86\crt\src\mbctype.h -FILE 4324 f:\sp\public\sdk\inc\specstrings.h -FILE 4325 f:\sp\public\sdk\inc\basetsd.h -FILE 4326 f:\sp\public\sdk\inc\stralign.h -FILE 4327 f:\sp\public\sdk\inc\tvout.h -FILE 4328 f:\sp\public\sdk\inc\winsvc.h -FILE 4329 f:\sp\vctools\crt_bld\self_x86\crt\src\string.h -FILE 4330 f:\sp\public\sdk\inc\wingdi.h -FILE 4331 f:\sp\public\sdk\inc\pshpack4.h -PUBLIC 1005 0 @ILT+0(?h@C@google_breakpad@@SAPADABV12@@Z) -PUBLIC 100a 0 @ILT+5(?set_member@C@google_breakpad@@QAEXH@Z) -PUBLIC 100f 0 @ILT+10(??_EC@google_breakpad@@UAEPAXI@Z) -PUBLIC 1014 0 @ILT+15(??_EC@google_breakpad@@UAEPAXI@Z) -PUBLIC 1019 0 @ILT+20(?f@C@google_breakpad@@QAEXXZ) -PUBLIC 101e 0 @ILT+25(_main) -PUBLIC 1023 0 @ILT+30(??0C@google_breakpad@@QAE@XZ) -PUBLIC 1028 0 @ILT+35(??1C@google_breakpad@@UAE@XZ) -PUBLIC 102d 0 @ILT+40(?g@C@google_breakpad@@UAEHXZ) -FUNC 1060 54 8 main -1060 6 57 1 -1066 8 58 1 -106e e 59 1 -107c 8 60 1 -1084 b 61 1 -108f f 62 1 -109e 12 64 1 -10b0 4 65 1 -FUNC 10c0 a 0 google_breakpad::i -10c0 3 51 1 -10c3 5 52 1 -10c8 2 53 1 -FUNC 10f0 21 0 google_breakpad::C::C() -10f0 21 37 1 -FUNC 1120 14 0 google_breakpad::C::~C() -1120 14 38 1 -FUNC 1140 16 8 google_breakpad::C::set_member(int) -1140 16 40 1 -FUNC 1160 1e 0 google_breakpad::C::f() -1160 1e 43 1 -FUNC 1190 10 0 google_breakpad::C::g() -1190 10 44 1 -FUNC 11b0 7 4 google_breakpad::C::h(google_breakpad::C const &) -11b0 7 45 1 -FUNC 11c0 2c 0 google_breakpad::C::`vector deleting destructor'(unsigned int) -FUNC 11f7 f 4 type_info::name(__type_info_node *) -11f7 0 44 3806 -11f7 c 45 3806 -1203 3 46 3806 -FUNC 1206 e 0 type_info::~type_info() -1206 0 49 3806 -1206 d 50 3806 -1213 1 51 3806 -FUNC 1214 1c 0 type_info::`vector deleting destructor'(unsigned int) -FUNC 1230 f 4 type_info::_name_internal_method(__type_info_node *) -1230 0 54 3806 -1230 c 55 3806 -123c 3 56 3806 -FUNC 123f 8 0 type_info::_type_info_dtor_internal_method() -123f 0 59 3806 -123f 7 60 3806 -1246 1 61 3806 -FUNC 1247 1b 4 type_info::operator==(type_info const &) -1247 0 89 3806 -1247 18 90 3806 -125f 3 91 3806 -FUNC 1262 1c 4 type_info::operator!=(type_info const &) -1262 0 98 3806 -1262 19 99 3806 -127b 3 100 3806 -FUNC 127e 1f 4 type_info::before(type_info const &) -127e 0 103 3806 -127e 1c 104 3806 -129a 3 105 3806 -FUNC 129d 4 0 type_info::raw_name() -129d 0 108 3806 -129d 3 109 3806 -12a0 1 110 3806 -FUNC 12a1 b 4 type_info::type_info(type_info const &) -12a1 8 113 3806 -12a9 3 123 3806 -FUNC 12ac 5 4 type_info::operator=(type_info const &) -12ac 2 127 3806 -12ae 3 135 3806 -FUNC 12b1 5 4 operator delete(void *) -12b1 0 20 3214 -12b1 5 23 3214 -FUNC 12b6 a 4 _set_osplatform -12b6 a 385 1009 -FUNC 12c0 a 4 _set_osver -12c0 a 386 1009 -FUNC 12ca a 4 _set_winver -12ca a 387 1009 -FUNC 12d4 a 4 _set_winmajor -12d4 a 388 1009 -FUNC 12de a 4 _set_winminor -12de a 389 1009 -FUNC 12e8 24 4 fast_error_exit -12e8 0 375 1022 -12e8 9 384 1022 -12f1 5 386 1022 -12f6 9 388 1022 -12ff c 389 1022 -130b 1 390 1022 -FUNC 130c 41 0 check_managed_app -130c 0 413 1022 -130c b 418 1022 -1317 5 422 1022 -131c a 424 1022 -1326 2 425 1022 -1328 9 427 1022 -1331 2 428 1022 -1333 7 433 1022 -133a 2 434 1022 -133c d 437 1022 -1349 1 438 1022 -134a 2 419 1022 -134c 1 438 1022 -FUNC 134d 1b6 0 __tmainCRTStartup -134d c 203 1022 -1359 19 233 1022 -1372 4 234 1022 -1376 8 235 1022 -137e a 236 1022 -1388 2 242 1022 -138a 7 243 1022 -1391 3 244 1022 -1394 4 243 1022 -1398 9 244 1022 -13a1 2 245 1022 -13a3 6 248 1022 -13a9 6 249 1022 -13af 6 250 1022 -13b5 9 256 1022 -13be 9 257 1022 -13c7 8 258 1022 -13cf 6 259 1022 -13d5 d 260 1022 -13e2 6 262 1022 -13e8 5 263 1022 -13ed 6 264 1022 -13f3 6 265 1022 -13f9 6 266 1022 -13ff 8 271 1022 -1407 c 273 1022 -1413 8 274 1022 -141b 9 276 1022 -1424 8 277 1022 -142c 5 286 1022 -1431 4 294 1022 -1435 9 296 1022 -143e 8 297 1022 -1446 b 300 1022 -1451 a 303 1022 -145b 9 305 1022 -1464 8 306 1022 -146c 9 307 1022 -1475 8 308 1022 -147d 8 310 1022 -1485 4 311 1022 -1489 7 312 1022 -1490 a 326 1022 -149a 18 327 1022 -14b2 6 330 1022 -14b8 6 331 1022 -14be 5 333 1022 -14c3 2 335 1022 -14c5 17 336 1022 -14dc 6 342 1022 -14e2 6 344 1022 -14e8 6 345 1022 -14ee 5 347 1022 -14f3 7 349 1022 -14fa 3 351 1022 -14fd 6 352 1022 -FUNC 1503 a 0 mainCRTStartup -1503 0 186 1022 -1503 5 193 1022 -1508 5 195 1022 -FUNC 150d 22 18 _invoke_watson_if_error -150d 3 754 3783 -1510 6 755 3783 -1516 17 759 3783 -152d 2 760 3783 -FUNC 152f 70 4 type_info::_Type_info_dtor(type_info *) -152f c 62 3748 -153b 8 63 3748 -1543 4 64 3748 -1547 a 65 3748 -1551 d 70 3748 -155e 4 72 3748 -1562 4 74 3748 -1566 6 79 3748 -156c 7 80 3748 -1573 9 94 3748 -157c 4 101 3748 -1580 c 103 3748 -158c 6 107 3748 -1592 2 83 3748 -1594 2 72 3748 -1596 9 104 3748 -FUNC 159f f5 8 type_info::_Name_base(type_info const *,__type_info_node *) -159f c 109 3748 -15ab e 113 3748 -15b9 24 124 3748 -15dd 7 125 3748 -15e4 16 132 3748 -15fa 2 133 3748 -15fc 5 132 3748 -1601 b 136 3748 -160c 5 142 3748 -1611 a 149 3748 -161b 4 150 3748 -161f 11 157 3748 -1630 20 158 3748 -1650 5 159 3748 -1655 9 165 3748 -165e 3 166 3748 -1661 2 167 3748 -1663 7 173 3748 -166a 9 180 3748 -1673 c 181 3748 -167f 3 188 3748 -1682 6 189 3748 -1688 3 181 3748 -168b 9 182 3748 -FUNC 1694 70 4 type_info::_Type_info_dtor_internal(type_info *) -1694 c 197 3748 -16a0 8 198 3748 -16a8 4 199 3748 -16ac a 200 3748 -16b6 d 205 3748 -16c3 4 207 3748 -16c7 4 209 3748 -16cb 6 214 3748 -16d1 7 215 3748 -16d8 9 229 3748 -16e1 4 236 3748 -16e5 c 238 3748 -16f1 6 242 3748 -16f7 2 218 3748 -16f9 2 207 3748 -16fb 9 239 3748 -FUNC 1704 31 10 __unDNameHelper -1704 3 249 3748 -1707 7 250 3748 -170e 7 252 3748 -1715 1e 260 3748 -1733 2 261 3748 -FUNC 1735 eb 8 type_info::_Name_base_internal(type_info const *,__type_info_node *) -1735 c 265 3748 -1741 e 269 3748 -174f 1a 273 3748 -1769 7 274 3748 -1770 16 281 3748 -1786 2 282 3748 -1788 5 281 3748 -178d b 285 3748 -1798 5 291 3748 -179d a 298 3748 -17a7 4 299 3748 -17ab 11 306 3748 -17bc 20 307 3748 -17dc 5 308 3748 -17e1 9 314 3748 -17ea 3 315 3748 -17ed 2 316 3748 -17ef 7 322 3748 -17f6 9 329 3748 -17ff c 330 3748 -180b 3 337 3748 -180e 6 338 3748 -1814 3 330 3748 -1817 9 331 3748 -FUNC 1820 53 4 __clean_type_info_names_internal -1820 c 346 3748 -182c 8 347 3748 -1834 4 348 3748 -1838 6 352 3748 -183e 4 354 3748 -1842 3 356 3748 -1845 7 357 3748 -184c 8 358 3748 -1854 4 354 3748 -1858 c 359 3748 -1864 6 363 3748 -186a 9 361 3748 -FUNC 1880 88 8 strcmp -1880 0 65 593 -1880 4 73 593 -1884 4 74 593 -1888 6 76 593 -188e 2 77 593 -1890 2 81 593 -1892 2 83 593 -1894 2 84 593 -1896 2 85 593 -1898 2 86 593 -189a 3 87 593 -189d 2 88 593 -189f 2 89 593 -18a1 2 90 593 -18a3 3 92 593 -18a6 3 94 593 -18a9 2 95 593 -18ab 2 96 593 -18ad 2 97 593 -18af 3 98 593 -18b2 2 99 593 -18b4 3 100 593 -18b7 3 101 593 -18ba 2 102 593 -18bc 4 103 593 -18c0 2 107 593 -18c2 2 108 593 -18c4 2 115 593 -18c6 2 116 593 -18c8 3 117 593 -18cb 1 118 593 -18cc 6 122 593 -18d2 2 123 593 -18d4 2 125 593 -18d6 3 126 593 -18d9 2 127 593 -18db 2 128 593 -18dd 3 129 593 -18e0 2 130 593 -18e2 2 131 593 -18e4 6 133 593 -18ea 2 134 593 -18ec 3 139 593 -18ef 3 140 593 -18f2 2 141 593 -18f4 2 142 593 -18f6 2 143 593 -18f8 2 144 593 -18fa 3 145 593 -18fd 2 146 593 -18ff 2 147 593 -1901 2 148 593 -1903 3 149 593 -1906 2 150 593 -FUNC 1908 8e 4 free -1908 c 42 3545 -1914 7 47 3545 -191b 9 53 3545 -1924 8 57 3545 -192c 4 58 3545 -1930 e 60 3545 -193e 9 61 3545 -1947 c 64 3545 -1953 6 68 3545 -1959 3 70 3545 -195c 2 106 3545 -195e 9 65 3545 -1967 f 109 3545 -1976 4 110 3545 -197a 16 112 3545 -1990 6 115 3545 -FUNC 1996 3d 4 __CxxUnhandledExceptionFilter(_EXCEPTION_POINTERS *) -1996 0 67 3654 -1996 33 68 3654 -19c9 5 69 3654 -19ce 2 72 3654 -19d0 3 73 3654 -FUNC 19d3 e 0 __CxxSetUnhandledExceptionFilter -19d3 0 86 3654 -19d3 b 89 3654 -19de 2 90 3654 -19e0 1 91 3654 -FUNC 19e1 24 4 _amsg_exit -19e1 0 446 974 -19e1 5 449 974 -19e6 9 450 974 -19ef b 451 974 -19fa a 452 974 -1a04 1 453 974 -FUNC 1a05 26 4 __crtCorExitProcess -1a05 0 650 974 -1a05 b 654 974 -1a10 4 655 974 -1a14 c 656 974 -1a20 4 657 974 -1a24 6 658 974 -1a2a 1 668 974 -FUNC 1a2b 15 4 __crtExitProcess -1a2b 0 673 974 -1a2b a 674 974 -1a35 b 683 974 -FUNC 1a40 9 0 _lockexit -1a40 0 733 974 -1a40 8 734 974 -1a48 1 735 974 -FUNC 1a49 9 0 _unlockexit -1a49 0 759 974 -1a49 8 760 974 -1a51 1 761 974 -FUNC 1a52 18 4 _initterm -1a52 3 841 974 -1a55 2 855 974 -1a57 6 853 974 -1a5d 2 854 974 -1a5f 3 855 974 -1a62 7 848 974 -1a69 1 857 974 -FUNC 1a6a 20 8 _initterm_e -1a6a 1 890 974 -1a6b c 899 974 -1a77 6 904 974 -1a7d 2 905 974 -1a7f 3 906 974 -1a82 7 899 974 -1a89 1 910 974 -FUNC 1a8a 37 4 _get_osplatform -1a8a 0 929 974 -1a8a 27 931 974 -1ab1 1 939 974 -1ab2 9 934 974 -1abb 2 936 974 -1abd 3 938 974 -1ac0 1 939 974 -FUNC 1ac1 3c 4 _get_osver -1ac1 0 958 974 -1ac1 27 960 974 -1ae8 1 968 974 -1ae9 8 963 974 -1af1 8 965 974 -1af9 3 967 974 -1afc 1 968 974 -FUNC 1afd 3c 4 _get_winver -1afd 0 987 974 -1afd 27 989 974 -1b24 1 997 974 -1b25 8 992 974 -1b2d 8 994 974 -1b35 3 996 974 -1b38 1 997 974 -FUNC 1b39 3c 4 _get_winmajor -1b39 0 1016 974 -1b39 27 1018 974 -1b60 1 1026 974 -1b61 8 1021 974 -1b69 8 1023 974 -1b71 3 1025 974 -1b74 1 1026 974 -FUNC 1b75 3c 4 _get_winminor -1b75 0 1045 974 -1b75 27 1047 974 -1b9c 1 1055 974 -1b9d 8 1050 974 -1ba5 8 1052 974 -1bad 3 1054 974 -1bb0 1 1055 974 -FUNC 1bb1 37 4 _get_wpgmptr -1bb1 0 1074 974 -1bb1 27 1076 974 -1bd8 1 1085 974 -1bd9 9 1080 974 -1be2 2 1082 974 -1be4 3 1084 974 -1be7 1 1085 974 -FUNC 1be8 37 4 _get_pgmptr -1be8 0 1104 974 -1be8 27 1106 974 -1c0f 1 1115 974 -1c10 9 1110 974 -1c19 2 1112 974 -1c1b 3 1114 974 -1c1e 1 1115 974 -FUNC 1c1f 92 4 _cinit -1c1f 0 263 974 -1c1f 18 273 974 -1c37 b 275 974 -1c42 5 277 974 -1c47 f 283 974 -1c56 4 284 974 -1c5a 4 285 974 -1c5e a 288 974 -1c68 20 293 974 -1c88 1a 306 974 -1ca2 c 308 974 -1cae 2 312 974 -1cb0 1 313 974 -FUNC 1cb1 e2 c doexit -1cb1 c 499 974 -1cbd 8 517 974 -1cc5 5 518 974 -1cca b 520 974 -1cd5 6 521 974 -1cdb 8 524 974 -1ce3 5 526 974 -1ce8 e 542 974 -1cf6 12 543 974 -1d08 5 545 974 -1d0d b 546 974 -1d18 10 551 974 -1d28 9 552 974 -1d31 2 553 974 -1d33 10 558 974 -1d43 10 566 974 -1d53 c 584 974 -1d5f 6 588 974 -1d65 6 592 974 -1d6b 8 594 974 -1d73 8 596 974 -1d7b 3 584 974 -1d7e 6 585 974 -1d84 9 586 974 -1d8d 6 597 974 -FUNC 1d93 11 4 exit -1d93 0 397 974 -1d93 10 398 974 -1da3 1 399 974 -FUNC 1da4 11 4 _exit -1da4 0 405 974 -1da4 10 406 974 -1db4 1 407 974 -FUNC 1db5 f 0 _cexit -1db5 0 412 974 -1db5 e 413 974 -1dc3 1 414 974 -FUNC 1dc4 f 0 _c_exit -1dc4 0 419 974 -1dc4 e 420 974 -1dd2 1 421 974 -FUNC 1dd3 4c 0 _init_pointers -1dd3 1 786 974 -1dd4 7 787 974 -1ddb 6 789 974 -1de1 6 790 974 -1de7 6 791 974 -1ded 6 792 974 -1df3 6 793 974 -1df9 6 794 974 -1dff 6 795 974 -1e05 6 796 974 -1e0b 13 799 974 -1e1e 1 800 974 -FUNC 1e1f 1a0 4 _NMSG_WRITE -1e1f 2 174 832 -1e21 a 178 832 -1e2b f 179 832 -1e3a a 182 832 -1e44 2a 203 832 -1e6e c 215 832 -1e7a 2a 224 832 -1ea4 1e 227 832 -1ec2 26 228 832 -1ee8 d 231 832 -1ef5 b 233 832 -1f00 2f 234 832 -1f2f 20 237 832 -1f4f 22 238 832 -1f71 15 242 832 -1f86 a 205 832 -1f90 9 206 832 -1f99 24 212 832 -1fbd 2 245 832 -FUNC 1fbf 20 4 _GET_RTERRMSG -1fbf 0 268 832 -1fbf 2 271 832 -1fc1 13 272 832 -1fd4 2 275 832 -1fd6 1 276 832 -1fd7 7 273 832 -1fde 1 276 832 -FUNC 1fdf 39 0 _FF_MSGBANNER -1fdf 0 141 832 -1fdf 22 145 832 -2001 a 147 832 -200b c 148 832 -2017 1 150 832 -FUNC 2018 1 4 _initp_misc_winxfltr -2018 0 105 1166 -2018 1 106 1166 -FUNC 2019 32 4 xcptlookup -2019 0 410 1166 -2019 b 411 1166 -2024 14 418 1166 -2038 e 425 1166 -2046 2 428 1166 -2048 2 426 1166 -204a 1 429 1166 -FUNC 204b 15e 8 _XcptFilter -204b 6 206 1166 -2051 7 213 1166 -2058 8 214 1166 -2060 34 219 1166 -2094 2 221 1166 -2096 2 225 1166 -2098 3 227 1166 -209b 7 234 1166 -20a2 7 235 1166 -20a9 5 243 1166 -20ae 4 248 1166 -20b2 8 249 1166 -20ba 3 255 1166 -20bd 6 259 1166 -20c3 6 273 1166 -20c9 6 274 1166 -20cf c 283 1166 -20db 17 291 1166 -20f2 1e 294 1166 -2110 3 291 1166 -2113 c 321 1166 -211f 9 323 1166 -2128 7 325 1166 -212f 9 327 1166 -2138 7 329 1166 -213f 9 331 1166 -2148 7 333 1166 -214f 9 335 1166 -2158 7 337 1166 -215f 9 339 1166 -2168 7 341 1166 -216f 9 343 1166 -2178 7 345 1166 -217f 7 347 1166 -2186 8 356 1166 -218e 3 361 1166 -2191 2 363 1166 -2193 4 368 1166 -2197 3 369 1166 -219a 7 375 1166 -21a1 6 377 1166 -21a7 2 379 1166 -FUNC 21a9 1b 8 __CppXcptFilter -21a9 0 145 1166 -21a9 b 146 1166 -21b4 c 147 1166 -21c0 1 151 1166 -21c1 2 149 1166 -21c3 1 151 1166 -FUNC 21c4 db 0 _setenvp -21c4 1 77 694 -21c5 c 85 694 -21d1 5 86 694 -21d6 8 91 694 -21de 4 98 694 -21e2 8 99 694 -21ea 4 110 694 -21ee 1 111 694 -21ef 11 112 694 -2200 15 117 694 -2215 2 118 694 -2217 9 121 694 -2220 9 123 694 -2229 6 125 694 -222f 10 127 694 -223f 1c 133 694 -225b 3 134 694 -225e 6 121 694 -2264 b 138 694 -226f 6 139 694 -2275 2 142 694 -2277 a 149 694 -2281 7 152 694 -2288 17 153 694 -FUNC 229f a 4 _set_pgmptr -229f a 334 717 -FUNC 22a9 198 c parse_cmdline -22a9 4 218 736 -22ad 6 226 736 -22b3 8 230 736 -22bb 14 231 736 -22cf 3 250 736 -22d2 5 252 736 -22d7 5 254 736 -22dc 9 255 736 -22e5 2 256 736 -22e7 2 258 736 -22e9 4 259 736 -22ed 8 260 736 -22f5 2 262 736 -22f7 f 264 736 -2306 2 265 736 -2308 6 266 736 -230e a 267 736 -2318 1 268 736 -2319 1a 272 736 -2333 4 277 736 -2337 4 278 736 -233b 4 281 736 -233f 9 286 736 -2348 a 287 736 -2352 3 288 736 -2355 1 275 736 -2356 2 276 736 -2358 9 291 736 -2361 6 295 736 -2367 9 296 736 -2370 2 297 736 -2372 3 311 736 -2375 4 315 736 -2379 1 318 736 -237a 1 319 736 -237b 5 316 736 -2380 5 321 736 -2385 5 324 736 -238a e 325 736 -2398 2 326 736 -239a 2 327 736 -239c d 329 736 -23a9 2 332 736 -23ab 5 336 736 -23b0 4 337 736 -23b4 4 338 736 -23b8 6 339 736 -23be 3 338 736 -23c1 14 343 736 -23d5 4 348 736 -23d9 2 349 736 -23db 10 350 736 -23eb b 351 736 -23f6 2 352 736 -23f8 a 354 736 -2402 2 355 736 -2404 a 356 736 -240e 1 357 736 -240f 2 358 736 -2411 5 361 736 -2416 1 363 736 -2417 5 372 736 -241c 4 376 736 -2420 7 377 736 -2427 2 378 736 -2429 8 379 736 -2431 9 382 736 -243a 3 383 736 -243d 2 384 736 -243f 2 385 736 -FUNC 2441 b9 0 _setargv -2441 7 88 736 -2448 c 97 736 -2454 5 98 736 -2459 18 104 736 -2471 19 120 736 -248a 11 127 736 -249b 15 132 736 -24b0 a 136 736 -24ba 2 138 736 -24bc 8 140 736 -24c4 3 141 736 -24c7 2 142 736 -24c9 13 149 736 -24dc c 153 736 -24e8 6 157 736 -24ee 4 172 736 -24f2 6 134 736 -24f8 2 173 736 -FUNC 24fa 135 0 __crtGetEnvironmentStringsA -24fa 2 43 2721 -24fc 1a 57 2721 -2516 8 59 2721 -251e c 60 2721 -252a b 62 2721 -2535 e 63 2721 -2543 9 68 2721 -254c 4 71 2721 -2550 8 72 2721 -2558 7 73 2721 -255f 7 77 2721 -2566 7 78 2721 -256d 7 79 2721 -2574 1b 93 2721 -258f 13 97 2721 -25a2 11 111 2721 -25b3 a 113 2721 -25bd 8 114 2721 -25c5 7 99 2721 -25cc 4 100 2721 -25d0 6 123 2721 -25d6 2 152 2721 -25d8 a 126 2721 -25e2 6 127 2721 -25e8 4 133 2721 -25ec 5 134 2721 -25f1 5 135 2721 -25f6 5 138 2721 -25fb d 140 2721 -2608 7 141 2721 -260f 5 142 2721 -2614 b 145 2721 -261f 7 147 2721 -2626 6 149 2721 -262c 3 153 2721 -FUNC 262f 240 0 _ioinit -262f c 111 3137 -263b 5 122 3137 -2640 a 127 3137 -264a 7 128 3137 -2651 f 137 3137 -2660 6 139 3137 -2666 5 142 3137 -266b 6 143 3137 -2671 8 145 3137 -2679 4 146 3137 -267d 3 147 3137 -2680 4 148 3137 -2684 3 149 3137 -2687 4 151 3137 -268b 4 152 3137 -268f 4 153 3137 -2693 13 145 3137 -26a6 15 161 3137 -26bb 2 166 3137 -26bd 3 172 3137 -26c0 6 173 3137 -26c6 b 179 3137 -26d1 5 185 3137 -26d6 f 191 3137 -26e5 9 204 3137 -26ee 7 205 3137 -26f5 8 207 3137 -26fd 4 208 3137 -2701 3 209 3137 -2704 4 210 3137 -2708 4 211 3137 -270c 4 212 3137 -2710 4 213 3137 -2714 4 214 3137 -2718 f 207 3137 -2727 9 185 3137 -2730 2 284 3137 -2732 6 197 3137 -2738 8 221 3137 -2740 24 234 3137 -2764 15 236 3137 -2779 7 237 3137 -2780 5 238 3137 -2785 18 241 3137 -279d 3 243 3137 -27a0 d 221 3137 -27ad 2 253 3137 -27af b 255 3137 -27ba c 258 3137 -27c6 6 306 3137 -27cc 4 262 3137 -27d0 30 266 3137 -2800 2 271 3137 -2802 a 277 3137 -280c 6 278 3137 -2812 5 279 3137 -2817 4 280 3137 -281b 14 284 3137 -282f 3 286 3137 -2832 2 288 3137 -2834 4 297 3137 -2838 6 298 3137 -283e a 253 3137 -2848 c 313 3137 -2854 4 315 3137 -2858 7 128 3137 -285f a 129 3137 -2869 6 316 3137 -FUNC 286f 4c 0 _ioterm -286f 2 341 3137 -2871 5 345 3137 -2876 6 347 3137 -287c 8 353 3137 -2884 9 355 3137 -288d 11 356 3137 -289e 4 353 3137 -28a2 7 361 3137 -28a9 11 362 3137 -28ba 1 365 3137 -FUNC 28bb 24 0 _RTC_Initialize -FUNC 28df 24 0 _RTC_Terminate -FUNC 2903 6c 0 _use_encode_pointer -2903 7 66 641 -290a 2 72 641 -290c 12 75 641 -291e 7 76 641 -2925 5 78 641 -292a 7 82 641 -2931 5 85 641 -2936 e 91 641 -2944 1f 93 641 -2963 4 95 641 -2967 6 100 641 -296d 2 101 641 -FUNC 296f 6e 4 _encode_pointer -296f 1 120 641 -2970 2b 129 641 -299b 8 145 641 -29a3 d 133 641 -29b0 d 135 641 -29bd c 138 641 -29c9 4 148 641 -29cd a 150 641 -29d7 5 153 641 -29dc 1 154 641 -FUNC 29dd 9 0 _encoded_null -29dd 0 173 641 -29dd 8 174 641 -29e5 1 175 641 -FUNC 29e6 6e 4 _decode_pointer -29e6 1 194 641 -29e7 2b 203 641 -2a12 8 219 641 -2a1a d 207 641 -2a27 d 209 641 -2a34 c 212 641 -2a40 4 222 641 -2a44 a 224 641 -2a4e 5 227 641 -2a53 1 228 641 -FUNC 2a54 9 4 __crtTlsAlloc -2a54 0 240 641 -2a54 6 241 641 -2a5a 3 242 641 -FUNC 2a5d 15 4 __fls_getvalue -2a5d 0 258 641 -2a5d 12 259 641 -2a6f 3 260 641 -FUNC 2a72 6 0 __get_flsindex -2a72 0 272 641 -2a72 5 273 641 -2a77 1 274 641 -FUNC 2a78 32 0 __set_flsgetvalue -2a78 1 286 641 -2a79 e 288 641 -2a87 4 289 641 -2a8b e 291 641 -2a99 d 292 641 -2aa6 3 294 641 -2aa9 1 298 641 -FUNC 2aaa 19 8 __fls_setvalue -2aaa 0 315 641 -2aaa 16 316 641 -2ac0 3 317 641 -FUNC 2ac3 3d 0 _mtterm -2ac3 0 473 641 -2ac3 a 480 641 -2acd f 481 641 -2adc 7 482 641 -2ae3 a 485 641 -2aed 7 486 641 -2af4 7 487 641 -2afb 5 494 641 -FUNC 2b00 bf 8 _initptd -2b00 c 521 641 -2b0c e 522 641 -2b1a a 524 641 -2b24 6 525 641 -2b2a 4 527 641 -2b2e 9 529 641 -2b37 16 532 641 -2b4d 10 533 641 -2b5d 3 540 641 -2b60 7 544 641 -2b67 7 545 641 -2b6e 8 546 641 -2b76 7 547 641 -2b7d 8 551 641 -2b85 4 552 641 -2b89 6 553 641 -2b8f 4 561 641 -2b93 8 562 641 -2b9b 9 563 641 -2ba4 c 565 641 -2bb0 6 568 641 -2bb6 9 566 641 -FUNC 2bbf 77 0 _getptd_noexit -2bbf 2 588 641 -2bc1 6 592 641 -2bc7 15 600 641 -2bdc 14 608 641 -2bf0 19 610 641 -2c09 a 616 641 -2c13 6 618 641 -2c19 6 619 641 -2c1f 2 621 641 -2c21 7 627 641 -2c28 2 628 641 -2c2a 8 633 641 -2c32 3 635 641 -2c35 1 636 641 -FUNC 2c36 18 0 _getptd -2c36 1 657 641 -2c37 7 658 641 -2c3e 4 659 641 -2c42 8 660 641 -2c4a 3 662 641 -2c4d 1 663 641 -FUNC 2c4e 121 4 _freefls -2c4e c 691 641 -2c5a b 702 641 -2c65 7 703 641 -2c6c 7 704 641 -2c73 7 706 641 -2c7a 7 707 641 -2c81 7 709 641 -2c88 7 710 641 -2c8f 7 712 641 -2c96 7 713 641 -2c9d 7 715 641 -2ca4 7 716 641 -2cab 7 718 641 -2cb2 7 719 641 -2cb9 a 721 641 -2cc3 7 722 641 -2cca 8 724 641 -2cd2 4 725 641 -2cd6 1a 728 641 -2cf0 7 729 641 -2cf7 c 731 641 -2d03 8 735 641 -2d0b 7 737 641 -2d12 7 738 641 -2d19 7 740 641 -2d20 15 743 641 -2d35 7 744 641 -2d3c c 747 641 -2d48 7 751 641 -2d4f 8 754 641 -2d57 3 731 641 -2d5a 9 732 641 -2d63 3 747 641 -2d66 9 748 641 -FUNC 2d6f 69 4 _freeptd -2d6f 0 778 641 -2d6f a 783 641 -2d79 1b 795 641 -2d94 13 796 641 -2da7 16 802 641 -2dbd 7 804 641 -2dc4 a 807 641 -2dce 9 811 641 -2dd7 1 813 641 -FUNC 2dd8 6 0 __threadid -2dd8 0 837 641 -2dd8 6 838 641 -FUNC 2dde 6 0 __threadhandle -2dde 0 844 641 -2dde 6 845 641 -FUNC 2de4 184 0 _mtinit -2de4 1 346 641 -2de5 d 355 641 -2df2 4 356 641 -2df6 5 357 641 -2dfb 3 358 641 -2dfe 2 444 641 -2e00 e 362 641 -2e0e d 365 641 -2e1b d 368 641 -2e28 d 371 641 -2e35 2a 372 641 -2e5f a 375 641 -2e69 1a 379 641 -2e83 25 388 641 -2ea8 5 393 641 -2ead b 400 641 -2eb8 10 401 641 -2ec8 10 402 641 -2ed8 18 403 641 -2ef0 7 410 641 -2ef7 2 412 641 -2ef9 1b 418 641 -2f14 2 420 641 -2f16 2d 428 641 -2f43 a 438 641 -2f4d 6 440 641 -2f53 6 441 641 -2f59 5 443 641 -2f5e 5 430 641 -2f63 4 389 641 -2f67 1 444 641 -FUNC 2f68 5b 0 __heap_select -2f68 6 70 3503 -2f6e 23 143 3503 -2f91 1b 144 3503 -2fac d 145 3503 -2fb9 3 146 3503 -2fbc 2 164 3503 -2fbe 3 161 3503 -2fc1 2 164 3503 -FUNC 2fc3 5a 4 _heap_init -2fc3 0 192 3503 -2fc3 20 199 3503 -2fe3 2 200 3503 -2fe5 1 240 3503 -2fe6 5 204 3503 -2feb a 206 3503 -2ff5 f 209 3503 -3004 c 211 3503 -3010 7 212 3503 -3017 2 213 3503 -3019 3 239 3503 -301c 1 240 3503 -FUNC 301d 74 0 _heap_term -301d 1 261 3503 -301e c 264 3503 -302a 1b 270 3503 -3045 f 273 3503 -3054 b 276 3503 -305f d 278 3503 -306c 11 281 3503 -307d c 300 3503 -3089 7 301 3503 -3090 1 302 3503 -FUNC 3091 6 0 _get_heap_handle -3091 0 320 3503 -3091 5 322 3503 -3096 1 323 3503 -FUNC 3098 45 0 _SEH_prolog4 -FUNC 30dd 14 0 _SEH_epilog4 -FUNC 3100 24 0 ValidateLocalCookies -FUNC 3130 196 10 _except_handler4 -FUNC 32c6 94 0 __security_init_cookie -32c6 6 97 2103 -32cc 21 114 2103 -32ed 7 116 2103 -32f4 3 117 2103 -32f7 a 127 2103 -3301 6 132 2103 -3307 8 135 2103 -330f 8 136 2103 -3317 8 137 2103 -331f 10 139 2103 -332f 2 144 2103 -3331 4 161 2103 -3335 7 163 2103 -333c 4 166 2103 -3340 7 168 2103 -3347 6 172 2103 -334d b 173 2103 -3358 2 175 2103 -FUNC 335a a 4 _initp_misc_invarg -335a 0 38 1742 -335a 9 39 1742 -3363 1 40 1742 -FUNC 3364 fc 14 _invoke_watson -3364 1c 111 1742 -3380 6 128 1742 -3386 6 129 1742 -338c 6 130 1742 -3392 3 131 1742 -3395 3 132 1742 -3398 3 133 1742 -339b 7 134 1742 -33a2 7 135 1742 -33a9 4 136 1742 -33ad 4 137 1742 -33b1 4 138 1742 -33b5 4 139 1742 -33b9 1 140 1742 -33ba 6 141 1742 -33c0 6 147 1742 -33c6 19 148 1742 -33df 3 150 1742 -33e2 13 163 1742 -33f5 6 168 1742 -33fb 13 169 1742 -340e 6 171 1742 -3414 a 174 1742 -341e a 176 1742 -3428 8 180 1742 -3430 8 181 1742 -3438 12 184 1742 -344a 16 185 1742 -FUNC 3460 22 4 _set_invalid_parameter_handler -3460 1 207 1742 -3461 b 211 1742 -346c d 212 1742 -3479 5 214 1742 -347e 3 216 1742 -3481 1 217 1742 -FUNC 3482 d 0 _get_invalid_parameter_handler -3482 0 221 1742 -3482 c 225 1742 -348e 1 228 1742 -FUNC 348f 9 14 _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -348f 3 266 1742 -3492 1 274 1742 -3493 5 273 1742 -FUNC 3498 24 14 _invalid_parameter -3498 3 70 1742 -349b b 77 1742 -34a6 5 78 1742 -34ab 1 89 1742 -34ac 2 80 1742 -34ae 8 86 1742 -34b6 1 89 1742 -34b7 5 88 1742 -FUNC 34bc 10 0 _invalid_parameter_noinfo -34bc 0 98 1742 -34bc f 99 1742 -34cb 1 100 1742 -FUNC 34cc 9 14 _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int) -34cc 3 249 1742 -34cf 1 257 1742 -34d0 5 256 1742 -FUNC 34d5 49 0 _mtinitlocks -34d5 2 137 785 -34d7 7 144 785 -34de 11 145 785 -34ef 2 146 785 -34f1 15 148 785 -3506 6 144 785 -350c 5 157 785 -3511 d 158 785 -FUNC 351e 55 0 _mtdeletelocks -351e 1 188 785 -351f d 194 785 -352c c 196 785 -3538 3 200 785 -353b 6 206 785 -3541 f 207 785 -3550 6 215 785 -3556 c 217 785 -3562 10 221 785 -3572 1 224 785 -FUNC 3573 15 4 _unlock -3573 3 371 785 -3576 10 375 785 -3586 2 376 785 -FUNC 3588 18 4 _lockerr_exit -3588 0 403 785 -3588 c 404 785 -3594 b 405 785 -359f 1 406 785 -FUNC 35a0 c3 4 _mtinitlocknum -35a0 c 259 785 -35ac 6 261 785 -35b2 a 269 785 -35bc 5 270 785 -35c1 7 271 785 -35c8 c 272 785 -35d4 e 276 785 -35e2 4 277 785 -35e6 e 279 785 -35f4 b 280 785 -35ff 4 281 785 -3603 8 284 785 -360b 3 285 785 -360e 4 287 785 -3612 11 288 785 -3623 7 289 785 -362a b 290 785 -3635 3 291 785 -3638 2 292 785 -363a 2 293 785 -363c 2 296 785 -363e 7 297 785 -3645 c 300 785 -3651 3 304 785 -3654 6 305 785 -365a 9 301 785 -FUNC 3663 31 4 _lock -3663 3 333 785 -3666 10 338 785 -3676 b 340 785 -3681 8 341 785 -3689 9 348 785 -3692 2 349 785 -FUNC 3694 65 c strcpy_s -3694 0 13 448 -3694 30 18 448 -36c4 c 19 448 -36d0 2 21 448 -36d2 d 23 448 -36df 4 27 448 -36e3 2 29 448 -36e5 e 30 448 -36f3 5 33 448 -36f8 1 34 448 -FUNC 3700 8b 4 strlen -3700 0 54 547 -3700 4 63 547 -3704 6 64 547 -370a 2 65 547 -370c 2 69 547 -370e 3 70 547 -3711 2 71 547 -3713 2 72 547 -3715 6 73 547 -371b 2 74 547 -371d 13 76 547 -3730 2 81 547 -3732 5 82 547 -3737 2 83 547 -3739 3 84 547 -373c 2 85 547 -373e 3 86 547 -3741 5 87 547 -3746 2 88 547 -3748 3 90 547 -374b 2 91 547 -374d 2 92 547 -374f 2 93 547 -3751 2 94 547 -3753 5 95 547 -3758 2 96 547 -375a 5 97 547 -375f 2 98 547 -3761 2 99 547 -3763 3 103 547 -3766 4 104 547 -376a 2 105 547 -376c 1 106 547 -376d 3 108 547 -3770 4 109 547 -3774 2 110 547 -3776 1 111 547 -3777 3 113 547 -377a 4 114 547 -377e 2 115 547 -3780 1 116 547 -3781 3 118 547 -3784 4 119 547 -3788 2 120 547 -378a 1 121 547 -FUNC 378b 6 0 HeapManager::Block::Block() -378b 6 90 3704 -FUNC 3791 1b 8 HeapManager::Constructor(void * (*)(unsigned int),void (*)(void *)) -3791 6 100 3704 -3797 7 101 3704 -379e 5 102 3704 -37a3 3 103 3704 -37a6 3 104 3704 -37a9 3 105 3704 -FUNC 37ac 26 0 HeapManager::Destructor() -37ac 9 110 3704 -37b5 2 111 3704 -37b7 5 113 3704 -37bc 15 115 3704 -37d1 1 118 3704 -FUNC 37d2 63 0 UnDecorator::getNumberOfDimensions() -37d2 0 1663 3704 -37d2 c 1664 3704 -37de 2 1665 3704 -37e0 1 1696 3704 -37e1 a 1666 3704 -37eb d 1667 3704 -37f8 1 1696 3704 -37f9 4 1670 3704 -37fd 4 1677 3704 -3801 a 1679 3704 -380b 6 1680 3704 -3811 d 1684 3704 -381e 5 1675 3704 -3823 e 1690 3704 -3831 3 1691 3704 -3834 1 1696 3704 -FUNC 3835 474 0 UnDecorator::getTypeEncoding() -3835 f 2335 3704 -3844 2 2336 3704 -3846 5 2341 3704 -384b 9 2345 3704 -3854 c 2351 3704 -3860 9 2423 3704 -3869 2 2426 3704 -386b 2a 2427 3704 -3895 8 2450 3704 -389d 2 2451 3704 -389f 24 2454 3704 -38c3 7 2462 3704 -38ca 5 2463 3704 -38cf 6 2353 3704 -38d5 8 2358 3704 -38dd b 2362 3704 -38e8 5 2363 3704 -38ed 2 2364 3704 -38ef 5 2365 3704 -38f4 9 2369 3704 -38fd 1b 2373 3704 -3918 11 2377 3704 -3929 a 2393 3704 -3933 10 2388 3704 -3943 2 2389 3704 -3945 18 2384 3704 -395d 2 2385 3704 -395f 12 2380 3704 -3971 16 2399 3704 -3987 11 2418 3704 -3998 a 2406 3704 -39a2 5 2407 3704 -39a7 15 2410 3704 -39bc 5 2422 3704 -39c1 1b 2427 3704 -39dc a 2430 3704 -39e6 5 2431 3704 -39eb 7 2472 3704 -39f2 a 2478 3704 -39fc c 2483 3704 -3a08 5 2485 3704 -3a0d 5 2486 3704 -3a12 5 2487 3704 -3a17 5 2490 3704 -3a1c 5 2505 3704 -3a21 5 2508 3704 -3a26 5 2509 3704 -3a2b 5 2434 3704 -3a30 5 2435 3704 -3a35 1a 2427 3704 -3a4f 30 2568 3704 -3a7f 5 2529 3704 -3a84 4 2530 3704 -3a88 a 2531 3704 -3a92 2 2532 3704 -3a94 a 2533 3704 -3a9e 5 2537 3704 -3aa3 5 2538 3704 -3aa8 2 2539 3704 -3aaa 5 2540 3704 -3aaf e 2544 3704 -3abd 6 2560 3704 -3ac3 10 2555 3704 -3ad3 2 2556 3704 -3ad5 18 2551 3704 -3aed 2 2552 3704 -3aef 12 2547 3704 -3b01 2 2564 3704 -3b03 a 2442 3704 -3b0d 2 2443 3704 -3b0f a 2438 3704 -3b19 2 2439 3704 -3b1b 5 2445 3704 -3b20 c 2574 3704 -3b2c 14 2577 3704 -3b40 a 2579 3704 -3b4a 18 2586 3704 -3b62 1a 2589 3704 -3b7c 1b 2590 3704 -3b97 5 2591 3704 -3b9c 1a 2594 3704 -3bb6 1b 2595 3704 -3bd1 5 2596 3704 -3bd6 1a 2599 3704 -3bf0 10 2600 3704 -3c00 2 2601 3704 -3c02 7 2604 3704 -3c09 2 2605 3704 -3c0b a 2608 3704 -3c15 2 2609 3704 -3c17 a 2612 3704 -3c21 2 2613 3704 -3c23 a 2616 3704 -3c2d 2 2617 3704 -3c2f a 2620 3704 -3c39 2 2621 3704 -3c3b a 2624 3704 -3c45 7 2634 3704 -3c4c 7 2635 3704 -3c53 7 2637 3704 -3c5a 10 2639 3704 -3c6a 3f 2648 3704 -FUNC 3ca9 b 0 UnDecorator::doUnderScore() -3ca9 b 4259 3704 -FUNC 3cb4 d 0 UnDecorator::doMSKeywords() -3cb4 d 4260 3704 -FUNC 3cc1 e 0 UnDecorator::doPtr64() -3cc1 e 4261 3704 -FUNC 3ccf e 0 UnDecorator::doFunctionReturns() -3ccf e 4262 3704 -FUNC 3cdd e 0 UnDecorator::doAllocationModel() -3cdd e 4263 3704 -FUNC 3ceb e 0 UnDecorator::doAllocationLanguage() -3ceb e 4264 3704 -FUNC 3cf9 12 0 UnDecorator::doThisTypes() -3cf9 12 4271 3704 -FUNC 3d0b e 0 UnDecorator::doAccessSpecifiers() -3d0b e 4272 3704 -FUNC 3d19 e 0 UnDecorator::doThrowTypes() -3d19 e 4273 3704 -FUNC 3d27 e 0 UnDecorator::doMemberTypes() -3d27 e 4274 3704 -FUNC 3d35 b 0 UnDecorator::doNameOnly() -3d35 b 4279 3704 -FUNC 3d40 b 0 UnDecorator::doTypeOnly() -3d40 b 4280 3704 -FUNC 3d4b b 0 UnDecorator::haveTemplateParameters() -3d4b b 4281 3704 -FUNC 3d56 e 0 UnDecorator::doEcsu() -3d56 e 4282 3704 -FUNC 3d64 b 0 UnDecorator::doNoIdentCharCheck() -3d64 b 4283 3704 -FUNC 3d6f e 0 UnDecorator::doEllipsis() -3d6f e 4284 3704 -FUNC 3d7d 19 4 UnDecorator::UScore(Tokens) -3d7d 0 4288 3704 -3d7d 9 4293 3704 -3d86 d 4294 3704 -3d93 2 4296 3704 -3d95 1 4298 3704 -FUNC 3d96 84 8 HeapManager::getMemory(unsigned int,int) -3d96 2 134 3737 -3d98 a 137 3737 -3da2 9 139 3737 -3dab 6 140 3737 -3db1 4 146 3737 -3db5 3 147 3737 -3db8 8 149 3737 -3dc0 7 153 3737 -3dc7 2 154 3737 -3dc9 1c 159 3737 -3de5 4 164 3737 -3de9 7 168 3737 -3df0 2 169 3737 -3df2 2 170 3737 -3df4 3 171 3737 -3df7 8 175 3737 -3dff 2 182 3737 -3e01 4 179 3737 -3e05 5 183 3737 -3e0a d 187 3737 -3e17 3 190 3737 -FUNC 3e1a d 0 DName::DName() -3e1a 2 210 3737 -3e1c 3 211 3737 -3e1f 7 220 3737 -3e26 1 221 3737 -FUNC 3e27 12 4 DName::DName(DNameNode *) -3e27 2 224 3737 -3e29 4 225 3737 -3e2d 9 234 3737 -3e36 3 235 3737 -FUNC 3e39 9c 4 DName::DName(DName const &) -3e39 2 259 3737 -3e3b 17 260 3737 -3e52 10 261 3737 -3e62 d 262 3737 -3e6f d 263 3737 -3e7c 10 264 3737 -3e8c 4 265 3737 -3e90 e 266 3737 -3e9e 13 267 3737 -3eb1 10 268 3737 -3ec1 11 269 3737 -3ed2 3 270 3737 -FUNC 3ed5 a 0 DName::status() -3ed5 a 481 3737 -FUNC 3edf 5 0 DName::clearStatus() -3edf 5 482 3737 -FUNC 3ee4 7 0 DName::setPtrRef() -3ee4 7 484 3737 -FUNC 3eeb a 0 DName::isPtrRef() -3eeb a 485 3737 -FUNC 3ef5 8 0 DName::setIsArray() -3ef5 8 490 3737 -FUNC 3efd a 0 DName::isArray() -3efd a 491 3737 -FUNC 3f07 a 0 DName::isNoTE() -3f07 a 492 3737 -FUNC 3f11 8 0 DName::setIsNoTE() -3f11 8 493 3737 -FUNC 3f19 a 0 DName::isPinPtr() -3f19 a 494 3737 -FUNC 3f23 8 0 DName::setIsPinPtr() -3f23 8 495 3737 -FUNC 3f2b a 0 DName::isComArray() -3f2b a 496 3737 -FUNC 3f35 8 0 DName::setIsComArray() -3f35 8 497 3737 -FUNC 3f3d a 0 DName::isVCallThunk() -3f3d a 498 3737 -FUNC 3f47 8 0 DName::setIsVCallThunk() -3f47 8 499 3737 -FUNC 3f4f 7b 4 DName::operator=(DName const &) -3f4f 3 879 3737 -3f52 12 880 3737 -3f64 17 882 3737 -3f7b d 883 3737 -3f88 d 884 3737 -3f95 d 885 3737 -3fa2 10 886 3737 -3fb2 10 887 3737 -3fc2 5 889 3737 -3fc7 3 897 3737 -FUNC 3fca 9 0 Replicator::isFull() -3fca 9 1001 3737 -FUNC 3fd3 25 4 Replicator::operator[](int) -3fd3 0 1028 3737 -3fd3 9 1029 3737 -3fdc b 1031 3737 -3fe7 6 1034 3737 -3fed 5 1032 3737 -3ff2 3 1030 3737 -3ff5 3 1036 3737 -FUNC 3ff8 d 0 DNameNode::DNameNode() -3ff8 d 1048 3737 -FUNC 4005 4 0 DNameNode::nextNode() -4005 4 1052 3737 -FUNC 4009 29 4 DNameNode::operator+=(DNameNode *) -4009 2 1131 3737 -400b 8 1132 3737 -4013 8 1134 3737 -401b b 1139 3737 -4026 4 1144 3737 -402a 2 1147 3737 -402c 3 1148 3737 -402f 3 1156 3737 -FUNC 4032 16 4 charNode::charNode(char) -4032 16 1166 3737 -FUNC 4048 4 0 charNode::length() -4048 4 1168 3737 -FUNC 404c 4 0 charNode::getLastChar() -404c 4 1170 3737 -FUNC 4050 1b 8 charNode::getString(char *,int) -4050 0 1173 3737 -4050 f 1174 3737 -405f 5 1175 3737 -4064 2 1176 3737 -4066 2 1177 3737 -4068 3 1183 3737 -FUNC 406b 4 0 pcharNode::length() -406b 4 1189 3737 -FUNC 406f 2f 4 pDNameNode::pDNameNode(DName *) -406f 2f 1244 3737 -FUNC 409e 25 4 DNameStatusNode::DNameStatusNode(DNameStatus) -409e 25 1261 3737 -FUNC 40c3 4 0 DNameStatusNode::length() -40c3 4 1263 3737 -FUNC 40c7 d 0 DNameStatusNode::getLastChar() -40c7 d 1266 3737 -FUNC 40d4 e 0 und_strlen -40d4 0 1283 3737 -40d4 6 1286 3737 -40da 7 1287 3737 -40e1 1 1291 3737 -FUNC 40e2 20 8 und_strncpy -40e2 0 1295 3737 -40e2 1b 1296 3737 -40fd 4 1299 3737 -4101 1 1301 3737 -FUNC 4102 25 4 und_strncmp -4102 0 1304 3737 -4102 7 1305 3737 -4109 2 1306 3737 -410b 1 1315 3737 -410c a 1308 3737 -4116 1 1310 3737 -4117 1 1311 3737 -4118 6 1308 3737 -411e 8 1314 3737 -4126 1 1315 3737 -FUNC 4127 33 0 UnDecorator::getDataIndirectType() -4127 33 4033 3704 -FUNC 415a 34 0 UnDecorator::getThisType() -415a 34 4034 3704 -FUNC 418e 13 c operator new(unsigned int,HeapManager &,int) -418e 13 131 3737 -FUNC 41a1 56 4 DName::DName(DName *) -41a1 0 274 3737 -41a1 a 275 3737 -41ab 23 277 3737 -41ce 13 278 3737 -41e1 2 281 3737 -41e3 4 283 3737 -41e7 3 284 3737 -41ea 7 295 3737 -41f1 6 296 3737 -FUNC 41f7 61 4 DName::DName(DNameStatus) -41f7 2 457 3737 -41f9 21 458 3737 -421a 1e 459 3737 -4238 7 467 3737 -423f 9 469 3737 -4248 a 470 3737 -4252 6 472 3737 -FUNC 4258 17 0 DName::isValid() -4258 17 478 3737 -FUNC 426f 15 0 DName::isEmpty() -426f 15 479 3737 -FUNC 4284 14 0 DName::isUDC() -4284 14 486 3737 -FUNC 4298 e 0 DName::setIsUDC() -4298 e 487 3737 -FUNC 42a6 14 0 DName::isUDTThunk() -42a6 14 488 3737 -FUNC 42ba 25 0 DName::length() -42ba 1 502 3737 -42bb 2 503 3737 -42bd a 506 3737 -42c7 4 507 3737 -42cb b 508 3737 -42d6 5 507 3737 -42db 3 510 3737 -42de 1 512 3737 -FUNC 42df 38 0 DName::getLastChar() -42df 2 516 3737 -42e1 2 517 3737 -42e3 9 519 3737 -42ec 6 520 3737 -42f2 a 521 3737 -42fc 2 522 3737 -42fe 7 520 3737 -4305 11 524 3737 -4316 1 526 3737 -FUNC 4317 91 8 DName::getString(char *,int) -4317 7 530 3737 -431e 9 531 3737 -4327 5 535 3737 -432c 7 537 3737 -4333 e 538 3737 -4341 c 544 3737 -434d d 550 3737 -435a 4 553 3737 -435e 8 555 3737 -4366 4 561 3737 -436a 6 565 3737 -4370 2 566 3737 -4372 b 570 3737 -437d 4 574 3737 -4381 2 578 3737 -4383 3 579 3737 -4386 3 586 3737 -4389 4 553 3737 -438d 4 590 3737 -4391 2 593 3737 -4393 6 594 3737 -4399 6 595 3737 -439f 5 599 3737 -43a4 4 601 3737 -FUNC 43a8 35 4 DName::operator|=(DName const &) -43a8 3 832 3737 -43ab 19 835 3737 -43c4 13 836 3737 -43d7 3 840 3737 -43da 3 842 3737 -FUNC 43dd 81 4 DName::operator=(DNameStatus) -43dd 2 928 3737 -43df 10 929 3737 -43ef 12 937 3737 -4401 26 945 3737 -4427 6 947 3737 -442d e 948 3737 -443b 10 933 3737 -444b d 934 3737 -4458 3 954 3737 -445b 3 956 3737 -FUNC 445e 1e 0 Replicator::Replicator() -445e 1e 1004 3737 -FUNC 447c 47 4 Replicator::operator+=(DName const &) -447c 3 1009 3737 -447f 12 1010 3737 -4491 20 1012 3737 -44b1 4 1017 3737 -44b5 8 1018 3737 -44bd 3 1022 3737 -44c0 3 1024 3737 -FUNC 44c3 47 0 DNameNode::clone() -44c3 3 1055 3737 -44c6 43 1056 3737 -4509 1 1057 3737 -FUNC 450a 65 8 pcharNode::pcharNode(char const *,int) -450a 1 1197 3737 -450b 1f 1200 3737 -452a c 1201 3737 -4536 8 1205 3737 -453e c 1207 3737 -454a a 1210 3737 -4554 b 1211 3737 -455f 2 1214 3737 -4561 3 1216 3737 -4564 4 1217 3737 -4568 7 1220 3737 -FUNC 456f 12 0 pcharNode::getLastChar() -456f 12 1191 3737 -FUNC 4581 31 8 pcharNode::getString(char *,int) -4581 0 1224 3737 -4581 b 1227 3737 -458c 2 1228 3737 -458e 21 1232 3737 -45af 3 1234 3737 -FUNC 45b2 f 0 pDNameNode::length() -45b2 f 1246 3737 -FUNC 45c1 f 0 pDNameNode::getLastChar() -45c1 f 1248 3737 -FUNC 45d0 1d 8 pDNameNode::getString(char *,int) -45d0 1d 1251 3737 -FUNC 45ed 33 8 DNameStatusNode::getString(char *,int) -45ed 0 1269 3737 -45ed b 1272 3737 -45f8 2 1273 3737 -45fa 23 1277 3737 -461d 3 1279 3737 -FUNC 4620 73 14 UnDecorator::UnDecorator(char *,char const *,int,char * (*)(long),unsigned long) -4620 16 736 3704 -4636 8 737 3704 -463e 5 738 3704 -4643 9 740 3704 -464c a 741 3704 -4656 5 745 3704 -465b 2 747 3704 -465d 6 748 3704 -4663 6 749 3704 -4669 8 754 3704 -4671 15 755 3704 -4686 d 758 3704 -FUNC 4693 2f 4 UnDecorator::getReturnType(DName *) -4693 3 2906 3704 -4696 8 2907 3704 -469e 15 2911 3704 -46b3 d 2915 3704 -46c0 2 2917 3704 -FUNC 46c2 f 0 UnDecorator::getStorageConvention() -46c2 f 4032 3704 -FUNC 46d1 79 4 DName::operator+=(DNameStatus) -46d1 4 799 3737 -46d5 17 800 3737 -46ec 20 804 3737 -470c 4 807 3737 -4710 7 809 3737 -4717 6 811 3737 -471d 8 812 3737 -4725 2 815 3737 -4727 3 816 3737 -472a 5 818 3737 -472f e 819 3737 -473d 7 801 3737 -4744 3 825 3737 -4747 3 827 3737 -FUNC 474a 68 4 DName::operator=(DName *) -474a 3 901 3737 -474d 12 902 3737 -475f 7 903 3737 -4766 29 911 3737 -478f 6 913 3737 -4795 c 914 3737 -47a1 2 917 3737 -47a3 9 918 3737 -47ac 3 922 3737 -47af 3 924 3737 -FUNC 47b2 a6 8 DName::doPchar(char const *,int) -47b2 3 962 3737 -47b5 1e 963 3737 -47d3 6 964 3737 -47d9 c 965 3737 -47e5 10 966 3737 -47f5 5 970 3737 -47fa 23 984 3737 -481d 6 986 3737 -4823 9 987 3737 -482c 2 988 3737 -482e 1b 977 3737 -4849 c 993 3737 -4855 3 995 3737 -FUNC 4858 26 4 DName::DName(char) -4858 3 238 3737 -485b 3 244 3737 -485e 7 248 3737 -4865 7 252 3737 -486c c 253 3737 -4878 6 255 3737 -FUNC 487e 31 4 DName::DName(char const *) -487e 0 300 3737 -487e 16 312 3737 -4894 15 313 3737 -48a9 6 315 3737 -FUNC 48af d0 8 DName::DName(char const * &,char) -48af 7 319 3737 -48b6 d 329 3737 -48c3 f 333 3737 -48d2 8 334 3737 -48da 9 342 3737 -48e3 40 343 3737 -4923 b 344 3737 -492e 9 355 3737 -4937 8 359 3737 -493f 8 361 3737 -4947 9 363 3737 -4950 3 364 3737 -4953 2 367 3737 -4955 3 347 3737 -4958 a 378 3737 -4962 8 380 3737 -496a 6 368 3737 -4970 7 371 3737 -4977 6 372 3737 -497d 2 375 3737 -FUNC 497f 69 8 DName::DName(unsigned __int64) -497f 15 384 3737 -4994 3 390 3737 -4997 a 398 3737 -49a1 4 402 3737 -49a5 13 406 3737 -49b8 3 407 3737 -49bb c 409 3737 -49c7 e 411 3737 -49d5 13 413 3737 -FUNC 49e8 96 8 DName::DName(__int64) -49e8 10 416 3737 -49f8 26 436 3737 -4a1e 15 438 3737 -4a33 10 443 3737 -4a43 5 444 3737 -4a48 c 446 3737 -4a54 6 448 3737 -4a5a 4 449 3737 -4a5e e 452 3737 -4a6c 12 453 3737 -FUNC 4a7e 2e 4 DName::operator+(DNameStatus) -4a7e 1 675 3737 -4a7f c 676 3737 -4a8b 9 679 3737 -4a94 b 680 3737 -4a9f 2 681 3737 -4aa1 5 682 3737 -4aa6 3 686 3737 -4aa9 3 688 3737 -FUNC 4aac 62 4 DName::operator+=(DName const &) -4aac 2 739 3737 -4aae f 740 3737 -4abd 13 741 3737 -4ad0 2 742 3737 -4ad2 9 743 3737 -4adb 6 744 3737 -4ae1 2 745 3737 -4ae3 7 747 3737 -4aea 6 749 3737 -4af0 9 750 3737 -4af9 2 751 3737 -4afb d 752 3737 -4b08 3 758 3737 -4b0b 3 760 3737 -FUNC 4b0e 8b 4 DName::operator+=(DName *) -4b0e 2 764 3737 -4b10 a 765 3737 -4b1a 9 766 3737 -4b23 8 767 3737 -4b2b 10 768 3737 -4b3b 8 789 3737 -4b43 20 770 3737 -4b63 4 773 3737 -4b67 7 775 3737 -4b6e 6 777 3737 -4b74 8 778 3737 -4b7c 2 781 3737 -4b7e 3 782 3737 -4b81 5 784 3737 -4b86 d 785 3737 -4b93 3 793 3737 -4b96 3 795 3737 -FUNC 4b99 1c 4 DName::operator=(char) -4b99 1 847 3737 -4b9a 15 854 3737 -4baf 3 856 3737 -4bb2 3 858 3737 -FUNC 4bb5 2a 4 DName::operator=(char const *) -4bb5 0 862 3737 -4bb5 24 869 3737 -4bd9 3 873 3737 -4bdc 3 875 3737 -FUNC 4bdf a6 0 UnDecorator::getCallingConvention() -4bdf 5 2825 3704 -4be4 f 2826 3704 -4bf3 c 2828 3704 -4bff 5 2835 3704 -4c04 1a 2845 3704 -4c1e 20 2852 3704 -4c3e 2 2875 3704 -4c40 2 2876 3704 -4c42 2 2871 3704 -4c44 2 2872 3704 -4c46 2 2867 3704 -4c48 2 2868 3704 -4c4a 2 2863 3704 -4c4c 2 2864 3704 -4c4e 1 2859 3704 -4c4f 2 2860 3704 -4c51 13 2855 3704 -4c64 e 2891 3704 -4c72 4 2895 3704 -4c76 d 2899 3704 -4c83 2 2901 3704 -FUNC 4c85 37 0 UnDecorator::getVCallThunkType() -4c85 3 4057 3704 -4c88 9 4059 3704 -4c91 5 4066 3704 -4c96 4 4059 3704 -4c9a 4 4066 3704 -4c9e 6 4061 3704 -4ca4 c 4062 3704 -4cb0 a 4064 3704 -4cba 2 4170 3704 -FUNC 4cbc 51 4 DName::operator+(DName const &) -4cbc 1 639 3737 -4cbd c 640 3737 -4cc9 b 643 3737 -4cd4 b 644 3737 -4cdf d 645 3737 -4cec 11 646 3737 -4cfd 2 647 3737 -4cff 8 648 3737 -4d07 3 652 3737 -4d0a 3 654 3737 -FUNC 4d0d 2e 4 DName::operator+(DName *) -4d0d 1 658 3737 -4d0e c 659 3737 -4d1a 9 662 3737 -4d23 b 663 3737 -4d2e 2 664 3737 -4d30 5 665 3737 -4d35 3 669 3737 -4d38 3 671 3737 -FUNC 4d3b 6a 4 DName::operator+=(char) -4d3b 1 693 3737 -4d3c b 694 3737 -4d47 9 695 3737 -4d50 6 696 3737 -4d56 2 697 3737 -4d58 7 699 3737 -4d5f 6 701 3737 -4d65 2b 702 3737 -4d90 2 703 3737 -4d92 c 704 3737 -4d9e 4 710 3737 -4da2 3 712 3737 -FUNC 4da5 6c 4 DName::operator+=(char const *) -4da5 2 716 3737 -4da7 f 717 3737 -4db6 9 718 3737 -4dbf 6 719 3737 -4dc5 2 720 3737 -4dc7 7 722 3737 -4dce 6 724 3737 -4dd4 28 725 3737 -4dfc 2 726 3737 -4dfe d 727 3737 -4e0b 3 733 3737 -4e0e 3 735 3737 -FUNC 4e11 e0 0 UnDecorator::getArgumentList() -4e11 7 3076 3704 -4e18 12 3078 3704 -4e2a 29 3081 3704 -4e53 6 3085 3704 -4e59 4 3086 3704 -4e5d 2 3087 3704 -4e5f e 3088 3704 -4e6d 6 3093 3704 -4e73 6 3095 3704 -4e79 5 3100 3704 -4e7e 1 3102 3704 -4e7f 11 3106 3704 -4e90 2 3109 3704 -4e92 16 3116 3704 -4ea8 19 3121 3704 -4ec1 9 3122 3704 -4eca 17 3126 3704 -4ee1 b 3132 3704 -4eec 3 3141 3704 -4eef 2 3143 3704 -FUNC 4ef1 4f 4 UnDecorator::getVdispMapType(DName const &) -4ef1 6 4230 3704 -4ef7 d 4231 3704 -4f04 c 4232 3704 -4f10 12 4233 3704 -4f22 9 4234 3704 -4f2b a 4236 3704 -4f35 6 4237 3704 -4f3b 3 4238 3704 -4f3e 2 4239 3704 -FUNC 4f40 22 8 operator+(char,DName const &) -4f40 22 198 3737 -FUNC 4f62 22 8 operator+(DNameStatus,DName const &) -4f62 22 201 3737 -FUNC 4f84 22 8 operator+(char const *,DName const &) -4f84 22 204 3737 -FUNC 4fa6 2e 4 DName::operator+(char) -4fa6 1 605 3737 -4fa7 c 606 3737 -4fb3 9 609 3737 -4fbc b 610 3737 -4fc7 2 611 3737 -4fc9 5 612 3737 -4fce 3 616 3737 -4fd1 3 618 3737 -FUNC 4fd4 2e 4 DName::operator+(char const *) -4fd4 1 622 3737 -4fd5 c 623 3737 -4fe1 9 626 3737 -4fea b 627 3737 -4ff5 2 628 3737 -4ff7 5 629 3737 -4ffc 3 633 3737 -4fff 3 635 3737 -FUNC 5002 141 4 UnDecorator::getDimension(bool) -5002 7 1616 3704 -5009 10 1618 3704 -5019 e 1620 3704 -5027 6 1623 3704 -502d f 1624 3704 -503c 8 1625 3704 -5044 47 1626 3704 -508b 4 1629 3704 -508f 4 1636 3704 -5093 8 1638 3704 -509b 20 1639 3704 -50bb d 1643 3704 -50c8 4 1634 3704 -50cc b 1649 3704 -50d7 2 1650 3704 -50d9 5 1652 3704 -50de 13 1653 3704 -50f1 c 1637 3704 -50fd 4 1641 3704 -5101 a 1653 3704 -510b 36 1655 3704 -5141 2 1659 3704 -FUNC 5143 d4 0 UnDecorator::getEnumType() -5143 6 2762 3704 -5149 1a 2766 3704 -5163 12 2770 3704 -5175 5 2774 3704 -517a 2 2775 3704 -517c 5 2779 3704 -5181 2 2780 3704 -5183 5 2786 3704 -5188 2 2787 3704 -518a d 2791 3704 -5197 1f 2801 3704 -51b6 1e 2807 3704 -51d4 e 2814 3704 -51e2 4 2795 3704 -51e6 d 2818 3704 -51f3 24 2820 3704 -FUNC 5217 c4 0 UnDecorator::getArgumentTypes() -5217 3 3035 3704 -521a 18 3036 3704 -5232 9 3046 3704 -523b 7 3051 3704 -5242 13 3052 3704 -5255 c 3064 3704 -5261 36 3058 3704 -5297 b 3061 3704 -52a2 21 3039 3704 -52c3 16 3042 3704 -52d9 2 3072 3704 -FUNC 52db 7e 0 UnDecorator::getThrowTypes() -52db 3 3148 3704 -52de e 3149 3704 -52ec 2 3150 3704 -52ee 21 3151 3704 -530f 1f 3153 3704 -532e 29 3155 3704 -5357 2 3157 3704 -FUNC 5359 125 c UnDecorator::getExtendedDataIndirectType(char &,bool &,int) -5359 6 3636 3704 -535f 1a 3641 3704 -5379 1c 3643 3704 -5395 a 3669 3704 -539f 6 3670 3704 -53a5 b 3672 3704 -53b0 a 3674 3704 -53ba 21 3675 3704 -53db 17 3678 3704 -53f2 a 3680 3704 -53fc 6 3689 3704 -5402 2 3691 3704 -5404 17 3693 3704 -541b 1e 3700 3704 -5439 6 3663 3704 -543f 2 3665 3704 -5441 3 3656 3704 -5444 d 3657 3704 -5451 2 3659 3704 -5453 6 3647 3704 -5459 13 3649 3704 -546c 10 3703 3704 -547c 2 3704 3704 -FUNC 547e 15f 4 UnDecorator::getArrayType(DName const &) -547e 3 3986 3704 -5481 12 3987 3704 -5493 7 3989 3704 -549a 4 3991 3704 -549e 2 3992 3704 -54a0 4 3994 3704 -54a4 9 3995 3704 -54ad 2a 4026 3704 -54d7 2 4028 3704 -54d9 c 3998 3704 -54e5 9 4000 3704 -54ee d 4001 3704 -54fb 35 4005 3704 -5530 b 4009 3704 -553b 4 4010 3704 -553f 8 4011 3704 -5547 2 4012 3704 -5549 2c 4013 3704 -5575 d 4017 3704 -5582 9 4018 3704 -558b 12 4019 3704 -559d a 4023 3704 -55a7 36 4024 3704 -FUNC 55dd 31 0 UnDecorator::getLexicalFrame() -55dd 31 4031 3704 -FUNC 560e 12 0 UnDecorator::getDisplacement() -560e 12 4048 3704 -FUNC 5620 12 0 UnDecorator::getCallIndex() -5620 12 4049 3704 -FUNC 5632 12 0 UnDecorator::getGuardNumber() -5632 12 4050 3704 -FUNC 5644 150 4 UnDecorator::getVfTableType(DName const &) -5644 7 4174 3704 -564b d 4175 3704 -5658 1d 4178 3704 -5675 2c 4180 3704 -56a1 f 4182 3704 -56b0 e 4184 3704 -56be 5 4186 3704 -56c3 11 4188 3704 -56d4 2d 4190 3704 -5701 b 4194 3704 -570c 7 4195 3704 -5713 10 4199 3704 -5723 a 4200 3704 -572d b 4188 3704 -5738 b 4204 3704 -5743 a 4206 3704 -574d 7 4207 3704 -5754 9 4209 3704 -575d a 4216 3704 -5767 6 4217 3704 -576d 2 4220 3704 -576f 9 4221 3704 -5778 17 4222 3704 -578f 3 4224 3704 -5792 2 4226 3704 -FUNC 5794 a0 8 UnDecorator::getStringEncoding(char *,int) -5794 6 1447 3704 -579a b 1448 3704 -57a5 22 1451 3704 -57c7 6 1456 3704 -57cd b 1459 3704 -57d8 b 1462 3704 -57e3 13 1464 3704 -57f6 c 1466 3704 -5802 5 1469 3704 -5807 6 1470 3704 -580d 4 1471 3704 -5811 14 1477 3704 -5825 d 1452 3704 -5832 2 1478 3704 -FUNC 5834 50 0 UnDecorator::getSignedDimension() -5834 5 1603 3704 -5839 b 1604 3704 -5844 c 1605 3704 -5850 2 1606 3704 -5852 23 1608 3704 -5875 d 1611 3704 -5882 2 1612 3704 -FUNC 5884 2bb 0 UnDecorator::getTemplateConstant() -5884 15 1877 3704 -5899 f 1884 3704 -58a8 32 1885 3704 -58da 9 1921 3704 -58e3 b 1922 3704 -58ee 20 1924 3704 -590e 12 1931 3704 -5920 e 1932 3704 -592e 3 1937 3704 -5931 7 1939 3704 -5938 6 1941 3704 -593e 4 1942 3704 -5942 2 1944 3704 -5944 4 1945 3704 -5948 2a 1950 3704 -5972 a 1900 3704 -597c 6 1902 3704 -5982 11 1903 3704 -5993 1b 1906 3704 -59ae b 1892 3704 -59b9 6 2034 3704 -59bf 7 1954 3704 -59c6 26 1885 3704 -59ec b 1990 3704 -59f7 c 1991 3704 -5a03 10 1992 3704 -5a13 9 1966 3704 -5a1c c 1968 3704 -5a28 e 1971 3704 -5a36 10 1973 3704 -5a46 6 1975 3704 -5a4c 6 1976 3704 -5a52 3 1980 3704 -5a55 29 1981 3704 -5a7e a 1983 3704 -5a88 a 2001 3704 -5a92 a 2003 3704 -5a9c 13 2007 3704 -5aaf a 2008 3704 -5ab9 11 2012 3704 -5aca 13 2015 3704 -5add a 2016 3704 -5ae7 13 2021 3704 -5afa a 2022 3704 -5b04 13 2026 3704 -5b17 d 2029 3704 -5b24 7 1913 3704 -5b2b 14 2041 3704 -FUNC 5b3f d9 8 UnDecorator::getPtrRefDataType(DName const &,int) -5b3f 3 3937 3704 -5b42 11 3940 3704 -5b53 b 3944 3704 -5b5e 12 3948 3704 -5b70 12 3949 3704 -5b82 10 3951 3704 -5b92 5 3957 3704 -5b97 16 3961 3704 -5bad d 3967 3704 -5bba c 3968 3704 -5bc6 b 3970 3704 -5bd1 6 3972 3704 -5bd7 1e 3974 3704 -5bf5 e 3976 3704 -5c03 13 3980 3704 -5c16 2 3982 3704 -FUNC 5c18 14 4 UnDecorator::getVbTableType(DName const &) -5c18 14 4053 3704 -FUNC 5c2c 1b8 0 UnDecorator::getTemplateArgumentList() -5c2c 14 1775 3704 -5c40 c 1777 3704 -5c4c 7 1778 3704 -5c53 2a 1781 3704 -5c7d 6 1785 3704 -5c83 4 1786 3704 -5c87 2 1787 3704 -5c89 e 1788 3704 -5c97 8 1793 3704 -5c9f 5 1798 3704 -5ca4 1 1800 3704 -5ca5 11 1804 3704 -5cb6 5 1807 3704 -5cbb 7 1810 3704 -5cc2 7 1816 3704 -5cc9 6 1817 3704 -5ccf 12 1818 3704 -5ce1 a 1820 3704 -5ceb 5 1821 3704 -5cf0 e 1822 3704 -5cfe 5 1824 3704 -5d03 9 1830 3704 -5d0c c 1832 3704 -5d18 e 1835 3704 -5d26 10 1837 3704 -5d36 6 1839 3704 -5d3c 1 1840 3704 -5d3d 2 1842 3704 -5d3f 25 1843 3704 -5d64 2 1846 3704 -5d66 10 1847 3704 -5d76 2 1850 3704 -5d78 1f 1851 3704 -5d97 17 1857 3704 -5dae 9 1858 3704 -5db7 16 1862 3704 -5dcd 17 1873 3704 -FUNC 5de4 56f 8 UnDecorator::getOperatorName(bool,bool *) -5de4 b 1095 3704 -5def 53 1103 3704 -5e42 13 1183 3704 -5e55 c 1439 3704 -5e61 1d 1440 3704 -5e7e 11 1442 3704 -5e8f 5 1444 3704 -5e94 3 1124 3704 -5e97 8 1126 3704 -5e9f 21 1127 3704 -5ec0 c 1129 3704 -5ecc a 1130 3704 -5ed6 a 1133 3704 -5ee0 7 1135 3704 -5ee7 3 1136 3704 -5eea 9 1144 3704 -5ef3 5 1145 3704 -5ef8 6 1148 3704 -5efe 2 1154 3704 -5f00 15 1156 3704 -5f15 18 1160 3704 -5f2d 1a 1161 3704 -5f47 10 1166 3704 -5f57 b 1167 3704 -5f62 5 1170 3704 -5f67 6 1106 3704 -5f6d f 1108 3704 -5f7c 21 1103 3704 -5f9d 3d 1220 3704 -5fda 18 1240 3704 -5ff2 b 1234 3704 -5ffd 5 1235 3704 -6002 13 1245 3704 -6015 7 1247 3704 -601c 8 1249 3704 -6024 18 1220 3704 -603c 13 1255 3704 -604f 7 1256 3704 -6056 2 1257 3704 -6058 16 1335 3704 -606e 7 1356 3704 -6075 6 1350 3704 -607b 2 1352 3704 -607d 25 1220 3704 -60a2 13 1290 3704 -60b5 17 1291 3704 -60cc 24 1292 3704 -60f0 14 1313 3704 -6104 6 1316 3704 -610a 5 1317 3704 -610f 10 1302 3704 -611f 20 1303 3704 -613f 20 1304 3704 -615f 20 1305 3704 -617f 22 1306 3704 -61a1 12 1307 3704 -61b3 c 1296 3704 -61bf 2b 1297 3704 -61ea 13 1281 3704 -61fd 17 1282 3704 -6214 1a 1283 3704 -622e 5 1284 3704 -6233 2d 1220 3704 -6260 25 1364 3704 -6285 10 1373 3704 -6295 13 1378 3704 -62a8 a 1397 3704 -62b2 13 1399 3704 -62c5 a 1403 3704 -62cf 6 1405 3704 -62d5 2 1408 3704 -62d7 13 1410 3704 -62ea d 1413 3704 -62f7 5 1415 3704 -62fc 10 1278 3704 -630c b 1330 3704 -6317 5 1428 3704 -631c 3 1187 3704 -631f 13 1216 3704 -6332 8 1437 3704 -633a 19 1438 3704 -FUNC 6353 153 4 UnDecorator::getTemplateName(bool) -6353 5 1700 3704 -6358 1f 1704 3704 -6377 16 1714 3704 -638d 1d 1716 3704 -63aa 23 1725 3704 -63cd e 1729 3704 -63db 6 1730 3704 -63e1 12 1732 3704 -63f3 2 1734 3704 -63f5 16 1735 3704 -640b c 1738 3704 -6417 7 1739 3704 -641e 6 1746 3704 -6424 21 1747 3704 -6445 c 1749 3704 -6451 a 1750 3704 -645b a 1753 3704 -6465 6 1755 3704 -646b 6 1756 3704 -6471 23 1769 3704 -6494 d 1705 3704 -64a1 5 1771 3704 -FUNC 64a6 1ea 4 UnDecorator::getZName(bool) -64a6 10 1007 3704 -64b6 11 1008 3704 -64c7 3 1013 3704 -64ca 26 1043 3704 -64f0 b 1024 3704 -64fb 5 1026 3704 -6500 16 1028 3704 -6516 16 1030 3704 -652c 17 1031 3704 -6543 7 1033 3704 -654a 25 1040 3704 -656f 5 1042 3704 -6574 29 1043 3704 -659d 8 1045 3704 -65a5 b 1051 3704 -65b0 c 1053 3704 -65bc e 1056 3704 -65ca 10 1058 3704 -65da 4 1060 3704 -65de b 1061 3704 -65e9 2 1063 3704 -65eb a 1064 3704 -65f5 10 1065 3704 -6605 2 1068 3704 -6607 d 1069 3704 -6614 2a 1070 3704 -663e 2 1073 3704 -6640 1a 1076 3704 -665a 11 1083 3704 -666b 9 1084 3704 -6674 f 1087 3704 -6683 d 1090 3704 -FUNC 6690 e4 0 UnDecorator::getScopedName() -6690 7 2727 3704 -6697 e 2728 3704 -66a5 15 2733 3704 -66ba 1a 2737 3704 -66d4 2a 2738 3704 -66fe b 2742 3704 -6709 8 2743 3704 -6711 4 2744 3704 -6715 1b 2745 3704 -6730 b 2746 3704 -673b 7 2747 3704 -6742 2 2748 3704 -6744 2b 2749 3704 -676f 3 2753 3704 -6772 2 2755 3704 -FUNC 6774 f 0 UnDecorator::getECSUName() -6774 f 2758 3704 -FUNC 6783 100 0 UnDecorator::getECSUDataType() -6783 3 3392 3704 -6786 20 3395 3704 -67a6 37 3399 3704 -67dd 5 3424 3704 -67e2 2 3425 3704 -67e4 5 3420 3704 -67e9 2 3421 3704 -67eb 26 3431 3704 -6811 2 3432 3704 -6813 5 3415 3704 -6818 2 3416 3704 -681a 5 3411 3704 -681f 2 3412 3704 -6821 d 3407 3704 -682e 7 3439 3704 -6835 4 3441 3704 -6839 c 3442 3704 -6845 16 3446 3704 -685b e 3450 3704 -6869 18 3404 3704 -6881 2 3452 3704 -FUNC 6883 46 0 UnDecorator::getSymbolName() -6883 3 989 3704 -6886 a 990 3704 -6890 6 991 3704 -6896 c 992 3704 -68a2 16 997 3704 -68b8 f 1001 3704 -68c7 2 1003 3704 -FUNC 68c9 92 0 UnDecorator::getBasedType() -68c9 6 2653 3704 -68cf 13 2654 3704 -68e2 a 2659 3704 -68ec 17 2661 3704 -6903 c 2707 3704 -690f 13 2699 3704 -6922 2 2700 3704 -6924 d 2674 3704 -6931 2 2711 3704 -6933 a 2712 3704 -693d d 2716 3704 -694a f 2720 3704 -6959 2 2722 3704 -FUNC 695b b42 4 UnDecorator::composeDeclaration(DName const &) -695b 6 2045 3704 -6961 e 2046 3704 -696f 5 2047 3704 -6974 a 2048 3704 -697e b 2053 3704 -6989 f 2054 3704 -6998 8 2055 3704 -69a0 15 2056 3704 -69b5 8 2057 3704 -69bd 10 2058 3704 -69cd 83 2075 3704 -6a50 7 2081 3704 -6a57 19 2082 3704 -6a70 21 2083 3704 -6a91 2 2084 3704 -6a93 15 2085 3704 -6aa8 27 2090 3704 -6acf 33 2092 3704 -6b02 9 2094 3704 -6b0b 9 2096 3704 -6b14 2b 2098 3704 -6b3f d 2101 3704 -6b4c 9 2103 3704 -6b55 2d 2105 3704 -6b82 2e 2107 3704 -6bb0 5 2111 3704 -6bb5 3 2114 3704 -6bb8 3 2115 3704 -6bbb 3 2116 3704 -6bbe 3 2117 3704 -6bc1 3 2118 3704 -6bc4 26 2121 3704 -6bea 12 2123 3704 -6bfc 19 2125 3704 -6c15 19 2126 3704 -6c2e 2 2127 3704 -6c30 12 2129 3704 -6c42 19 2131 3704 -6c5b 1b 2134 3704 -6c76 13 2141 3704 -6c89 a 2142 3704 -6c93 15 2143 3704 -6ca8 2 2144 3704 -6caa f 2145 3704 -6cb9 10 2147 3704 -6cc9 9 2151 3704 -6cd2 22 2152 3704 -6cf4 2 2153 3704 -6cf6 13 2168 3704 -6d09 c 2172 3704 -6d15 14 2173 3704 -6d29 1a 2174 3704 -6d43 2 2175 3704 -6d45 b 2176 3704 -6d50 5 2182 3704 -6d55 6 2185 3704 -6d5b 27 2187 3704 -6d82 b 2189 3704 -6d8d 5 2190 3704 -6d92 1b 2194 3704 -6dad 15 2195 3704 -6dc2 1d 2202 3704 -6ddf 16 2204 3704 -6df5 55 2205 3704 -6e4a 12 2206 3704 -6e5c 2b 2207 3704 -6e87 2 2208 3704 -6e89 d 2209 3704 -6e96 1a 2211 3704 -6eb0 2e 2218 3704 -6ede 12 2222 3704 -6ef0 c 2223 3704 -6efc c 2227 3704 -6f08 15 2228 3704 -6f1d 2 2229 3704 -6f1f f 2230 3704 -6f2e 1a 2235 3704 -6f48 b 2237 3704 -6f53 3 2238 3704 -6f56 5 2243 3704 -6f5b b 2245 3704 -6f66 1c 2250 3704 -6f82 13 2251 3704 -6f95 e 2252 3704 -6fa3 2 2253 3704 -6fa5 10 2254 3704 -6fb5 3d 2255 3704 -6ff2 c 2256 3704 -6ffe e 2257 3704 -700c 4c 2258 3704 -7058 a 2259 3704 -7062 4b 2260 3704 -70ad 7 2261 3704 -70b4 4b 2262 3704 -70ff f 2263 3704 -710e f 2264 3704 -711d 6 2268 3704 -7123 61 2277 3704 -7184 15 2281 3704 -7199 2 2283 3704 -719b 18 2285 3704 -71b3 2d 2292 3704 -71e0 12 2294 3704 -71f2 37 2296 3704 -7229 23 2297 3704 -724c b7 2299 3704 -7303 23 2300 3704 -7326 12 2306 3704 -7338 37 2307 3704 -736f b 2308 3704 -737a 37 2309 3704 -73b1 b 2310 3704 -73bc 30 2311 3704 -73ec 23 2312 3704 -740f 36 2319 3704 -7445 1e 2320 3704 -7463 8 2325 3704 -746b 1e 2326 3704 -7489 12 2329 3704 -749b 2 2331 3704 -FUNC 749d 211 0 UnDecorator::getDecoratedName() -749d 7 861 3704 -74a4 e 864 3704 -74b2 a 868 3704 -74bc b 873 3704 -74c7 8 874 3704 -74cf 11 876 3704 -74e0 10 878 3704 -74f0 6 882 3704 -74f6 9 903 3704 -74ff 9 906 3704 -7508 8 910 3704 -7510 6 912 3704 -7516 5 910 3704 -751b 2 915 3704 -751d a 918 3704 -7527 19 919 3704 -7540 6 920 3704 -7546 f 924 3704 -7555 8 925 3704 -755d 17 929 3704 -7574 a 930 3704 -757e c 932 3704 -758a 8 933 3704 -7592 5 934 3704 -7597 18 935 3704 -75af a 936 3704 -75b9 13 937 3704 -75cc b 938 3704 -75d7 2 940 3704 -75d9 29 941 3704 -7602 4 945 3704 -7606 10 946 3704 -7616 9 948 3704 -761f 3 950 3704 -7622 1c 955 3704 -763e f 959 3704 -764d 4 976 3704 -7651 6 962 3704 -7657 14 964 3704 -766b 19 967 3704 -7684 5 968 3704 -7689 10 971 3704 -7699 2 979 3704 -769b 2 980 3704 -769d f 982 3704 -76ac 2 984 3704 -FUNC 76ae 28b 0 UnDecorator::getScope() -76ae d 1482 3704 -76bb f 1483 3704 -76ca 2a 1489 3704 -76f4 14 1492 3704 -7708 b 1495 3704 -7713 16 1496 3704 -7729 5 1498 3704 -772e 17 1499 3704 -7745 3 1500 3704 -7748 f 1506 3704 -7757 2a 1507 3704 -7781 10 1566 3704 -7791 5 1567 3704 -7796 34 1561 3704 -77ca 4 1562 3704 -77ce 5 1563 3704 -77d3 e 1510 3704 -77e1 5 1514 3704 -77e6 22 1515 3704 -7808 e 1518 3704 -7816 6 1519 3704 -781c 5 1522 3704 -7821 2a 1523 3704 -784b 2 1524 3704 -784d f 1546 3704 -785c 1a 1548 3704 -7876 b 1550 3704 -7881 9 1551 3704 -788a 2 1554 3704 -788c f 1530 3704 -789b 2 1570 3704 -789d 21 1571 3704 -78be a 1489 3704 -78c8 f 1577 3704 -78d7 18 1590 3704 -78ef 2 1591 3704 -78f1 b 1580 3704 -78fc 7 1581 3704 -7903 2 1582 3704 -7905 2b 1583 3704 -7930 4 1597 3704 -7934 5 1599 3704 -FUNC 7939 341 4 UnDecorator::getFunctionIndirectType(DName const &) -7939 3 3461 3704 -793c e 3462 3704 -794a 15 3463 3704 -795f f 3465 3704 -796e 10 3466 3704 -797e 7 3469 3704 -7985 a 3471 3704 -798f 6 3473 3704 -7995 7 3475 3704 -799c d 3477 3704 -79a9 17 3482 3704 -79c0 9 3485 3704 -79c9 3 3486 3704 -79cc 5 3490 3704 -79d1 f 3491 3704 -79e0 6 3496 3704 -79e6 13 3497 3704 -79f9 b 3501 3704 -7a04 1e 3503 3704 -7a22 8 3505 3704 -7a2a 29 3506 3704 -7a53 2 3507 3704 -7a55 17 3508 3704 -7a6c f 3510 3704 -7a7b 4 3511 3704 -7a7f 10 3518 3704 -7a8f 15 3519 3704 -7aa4 9 3527 3704 -7aad d 3528 3704 -7aba 30 3529 3704 -7aea 2 3530 3704 -7aec 11 3521 3704 -7afd 7 3514 3704 -7b04 16 3516 3704 -7b1a 13 3531 3704 -7b2d d 3535 3704 -7b3a 22 3537 3704 -7b5c 2 3546 3704 -7b5e 13 3547 3704 -7b71 c 3551 3704 -7b7d 28 3552 3704 -7ba5 1e 3557 3704 -7bc3 c 3558 3704 -7bcf 2e 3561 3704 -7bfd 10 3563 3704 -7c0d c 3564 3704 -7c19 c 3566 3704 -7c25 15 3567 3704 -7c3a 2 3568 3704 -7c3c f 3569 3704 -7c4b 4 3573 3704 -7c4f b 3574 3704 -7c5a e 3580 3704 -7c68 10 3576 3704 -7c78 2 3581 3704 -FUNC 7c7a 4e4 10 UnDecorator::getDataIndirectType(DName const &,char,DName const &,int) -7c7a 6 3707 3704 -7c80 23 3711 3704 -7ca3 4 3713 3704 -7ca7 17 3715 3704 -7cbe c 3717 3704 -7cca 10 3719 3704 -7cda e 3723 3704 -7ce8 6 3725 3704 -7cee 15 3726 3704 -7d03 17 3732 3704 -7d1a 11 3751 3704 -7d2b a 3752 3704 -7d35 32 3753 3704 -7d67 5 3754 3704 -7d6c 11 3743 3704 -7d7d a 3744 3704 -7d87 25 3745 3704 -7dac 2 3746 3704 -7dae 8 3747 3704 -7db6 2 3749 3704 -7db8 19 3735 3704 -7dd1 a 3736 3704 -7ddb 14 3737 3704 -7def 5 3738 3704 -7df4 11 3739 3704 -7e05 6 3766 3704 -7e0b a 3768 3704 -7e15 17 3770 3704 -7e2c 10 3772 3704 -7e3c 1a 3778 3704 -7e56 5 3780 3704 -7e5b 6 3782 3704 -7e61 9 3787 3704 -7e6a b 3789 3704 -7e75 19 3791 3704 -7e8e c 3793 3704 -7e9a 24 3794 3704 -7ebe c 3796 3704 -7eca 22 3797 3704 -7eec 9 3801 3704 -7ef5 5 3805 3704 -7efa 7 3806 3704 -7f01 6 3810 3704 -7f07 1e 3812 3704 -7f25 8 3814 3704 -7f2d 1b 3815 3704 -7f48 2 3816 3704 -7f4a 16 3817 3704 -7f60 a 3819 3704 -7f6a 13 3828 3704 -7f7d b 3833 3704 -7f88 c 3834 3704 -7f94 8 3835 3704 -7f9c 6 3836 3704 -7fa2 b 3842 3704 -7fad b 3843 3704 -7fb8 3 3863 3704 -7fbb 6 3864 3704 -7fc1 22 3866 3704 -7fe3 9 3871 3704 -7fec 13 3872 3704 -7fff 5 3876 3704 -8004 1e 3877 3704 -8022 5 3879 3704 -8027 1e 3880 3704 -8045 5 3884 3704 -804a e 3885 3704 -8058 14 3889 3704 -806c 28 3895 3704 -8094 2 3890 3704 -8096 b 3891 3704 -80a1 2 3892 3704 -80a3 c 3898 3704 -80af 17 3899 3704 -80c6 4 3902 3704 -80ca 6 3904 3704 -80d0 7 3906 3704 -80d7 8 3774 3704 -80df 13 3918 3704 -80f2 12 3922 3704 -8104 29 3925 3704 -812d 10 3923 3704 -813d c 3928 3704 -8149 3 3929 3704 -814c 10 3931 3704 -815c 2 3933 3704 -FUNC 815e 14c 0 UnDecorator::operator char *() -815e 6 762 3704 -8164 4 763 3704 -8168 f 764 3704 -8177 9 770 3704 -8180 c 772 3704 -818c 7 775 3704 -8193 1d 776 3704 -81b0 4 782 3704 -81b4 16 783 3704 -81ca 9 785 3704 -81d3 5 794 3704 -81d8 9 795 3704 -81e1 13 799 3704 -81f4 e 808 3704 -8202 2 809 3704 -8204 2 848 3704 -8206 1a 810 3704 -8220 e 813 3704 -822e e 811 3704 -823c 9 817 3704 -8245 e 819 3704 -8253 d 820 3704 -8260 a 824 3704 -826a f 825 3704 -8279 5 828 3704 -827e 2 829 3704 -8280 2 830 3704 -8282 5 831 3704 -8287 1 832 3704 -8288 5 833 3704 -828d 1 835 3704 -828e 5 834 3704 -8293 2 838 3704 -8295 a 839 3704 -829f 9 841 3704 -82a8 2 848 3704 -FUNC 82aa 116 c UnDecorator::getPtrRefType(DName const &,DName const &,char) -82aa 5 3585 3704 -82af f 3588 3704 -82be d 3589 3704 -82cb b 3591 3704 -82d6 20 3594 3704 -82f6 b 3595 3704 -8301 b 3597 3704 -830c 9 3598 3704 -8315 14 3600 3704 -8329 14 3606 3704 -833d 1b 3608 3704 -8358 a 3612 3704 -8362 b 3615 3704 -836d c 3617 3704 -8379 9 3618 3704 -8382 c 3620 3704 -838e c 3622 3704 -839a a 3623 3704 -83a4 b 3625 3704 -83af f 3629 3704 -83be 2 3632 3704 -FUNC 83c0 1b 8 UnDecorator::getPointerType(DName const &,DName const &) -83c0 1b 4037 3704 -FUNC 83db 1b 8 UnDecorator::getPointerTypeArray(DName const &,DName const &) -83db 1b 4040 3704 -FUNC 83f6 1b 8 UnDecorator::getReferenceType(DName const &,DName const &) -83f6 1b 4043 3704 -FUNC 8411 a3 18 __unDName -8411 f 604 3704 -8420 9 606 3704 -8429 4 607 3704 -842d a 612 3704 -8437 2 613 3704 -8439 8 614 3704 -8441 3 615 3704 -8444 20 618 3704 -8464 1a 627 3704 -847e e 628 3704 -848c a 633 3704 -8496 c 636 3704 -84a2 3 643 3704 -84a5 6 645 3704 -84ab 9 637 3704 -FUNC 84b4 a3 1c __unDNameEx -84b4 f 684 3704 -84c3 9 687 3704 -84cc 4 688 3704 -84d0 a 693 3704 -84da 2 694 3704 -84dc 8 695 3704 -84e4 3 696 3704 -84e7 20 699 3704 -8507 1a 708 3704 -8521 e 709 3704 -852f a 714 3704 -8539 c 717 3704 -8545 3 724 3704 -8548 6 726 3704 -854e 9 718 3704 -FUNC 8557 387 4 UnDecorator::getBasicDataType(DName const &) -8557 3 3162 3704 -855a 15 3163 3704 -856f 6 3165 3704 -8575 4 3168 3704 -8579 35 3173 3704 -85ae 5 3178 3704 -85b3 5 3179 3704 -85b8 5 3183 3704 -85bd 5 3184 3704 -85c2 5 3188 3704 -85c7 5 3189 3704 -85cc 5 3193 3704 -85d1 5 3194 3704 -85d6 5 3203 3704 -85db 5 3204 3704 -85e0 2a 3173 3704 -860a 3c 3222 3704 -8646 5 3231 3704 -864b 5 3232 3704 -8650 22 3273 3704 -8672 5 3235 3704 -8677 5 3236 3704 -867c f 3222 3704 -868b 5 3243 3704 -8690 5 3244 3704 -8695 5 3239 3704 -869a 5 3240 3704 -869f 5 3247 3704 -86a4 5 3248 3704 -86a9 1b 3222 3704 -86c4 3 3264 3704 -86c7 6 3262 3704 -86cd 10 3264 3704 -86dd 10 3266 3704 -86ed 11 3267 3704 -86fe 5 3275 3704 -8703 2 3276 3704 -8705 5 3255 3704 -870a 2 3257 3704 -870c 3 3224 3704 -870f 12 3343 3704 -8721 9 3345 3704 -872a 7 3347 3704 -8731 16 3348 3704 -8747 6 3352 3704 -874d d 3353 3704 -875a 5 3355 3704 -875f 5 3227 3704 -8764 2 3278 3704 -8766 d 3281 3704 -8773 2 3282 3704 -8775 5 3219 3704 -877a 2 3220 3704 -877c 3 3287 3704 -877f 5 3290 3704 -8784 d 3207 3704 -8791 d 3212 3704 -879e 9 3297 3704 -87a7 1f 3301 3704 -87c6 19 3314 3704 -87df c 3322 3704 -87eb 2 3326 3704 -87ed c 3307 3704 -87f9 2 3308 3704 -87fb 1e 3311 3704 -8819 10 3332 3704 -8829 18 3333 3704 -8841 5 3337 3704 -8846 c 3360 3704 -8852 5 3367 3704 -8857 d 3369 3704 -8864 5 3371 3704 -8869 d 3372 3704 -8876 2 3373 3704 -8878 5 3374 3704 -887d d 3375 3704 -888a 17 3380 3704 -88a1 16 3385 3704 -88b7 27 3387 3704 -FUNC 88de 13e 4 UnDecorator::getPrimaryDataType(DName const &) -88de 7 2962 3704 -88e5 2b 2966 3704 -8910 12 3027 3704 -8922 d 2972 3704 -892f c 2974 3704 -893b a 2975 3704 -8945 b 2981 3704 -8950 6 2984 3704 -8956 1e 2986 3704 -8974 7 2996 3704 -897b 2 2997 3704 -897d 6 2998 3704 -8983 f 3000 3704 -8992 8 3002 3704 -899a 10 3004 3704 -89aa 2f 3022 3704 -89d9 16 3012 3704 -89ef 17 3008 3704 -8a06 14 2969 3704 -8a1a 2 3030 3704 -FUNC 8a1c b1 4 UnDecorator::getDataType(DName *) -8a1c 6 2922 3704 -8a22 b 2923 3704 -8a2d 15 2928 3704 -8a42 10 2954 3704 -8a52 6 2934 3704 -8a58 c 2936 3704 -8a64 f 2937 3704 -8a73 13 2939 3704 -8a86 6 2944 3704 -8a8c 29 2946 3704 -8ab5 2 2947 3704 -8ab7 14 2931 3704 -8acb 2 2957 3704 -FUNC 8acd 64 4 UnDecorator::getExternalDataType(DName const &) -8acd 7 4244 3704 -8ad4 1e 4247 3704 -8af2 9 4248 3704 -8afb 30 4253 3704 -8b2b 4 4255 3704 -8b2f 2 4257 3704 -FUNC 8b31 4f 4 V6_HeapAlloc -8b31 c 27 3455 -8b3d 4 28 3455 -8b41 b 29 3455 -8b4c 8 31 3455 -8b54 4 32 3455 -8b58 a 33 3455 -8b62 c 35 3455 -8b6e 3 39 3455 -8b71 6 40 3455 -8b77 9 36 3455 -FUNC 8b80 75 4 _heap_alloc -8b80 0 90 3455 -8b80 9 95 3455 -8b89 5 96 3455 -8b8e 7 97 3455 -8b95 c 98 3455 -8ba1 a 104 3455 -8bab 18 105 3455 -8bc3 1 129 3455 -8bc4 a 107 3455 -8bce 9 108 3455 -8bd7 2 109 3455 -8bd9 4 121 3455 -8bdd 1 122 3455 -8bde 6 124 3455 -8be4 10 126 3455 -8bf4 1 129 3455 -FUNC 8bf5 c3 4 malloc -8bf5 1 155 3455 -8bf6 16 159 3455 -8c0c 65 163 3455 -8c71 4 168 3455 -8c75 b 172 3455 -8c80 b 179 3455 -8c8b 2 183 3455 -8c8d 7 174 3455 -8c94 8 193 3455 -8c9c 5 195 3455 -8ca1 1 196 3455 -8ca2 7 185 3455 -8ca9 b 186 3455 -8cb4 3 187 3455 -8cb7 1 196 3455 -FUNC 8cb8 3b 4 _get_errno_from_oserr -8cb8 0 119 3915 -8cb8 6 123 3915 -8cbe f 124 3915 -8ccd 8 133 3915 -8cd5 3 134 3915 -8cd8 1 139 3915 -8cd9 7 125 3915 -8ce0 1 139 3915 -8ce1 11 135 3915 -8cf2 1 139 3915 -FUNC 8cf3 13 0 _errno -8cf3 0 280 3915 -8cf3 5 281 3915 -8cf8 4 282 3915 -8cfc 5 283 3915 -8d01 1 288 3915 -8d02 3 285 3915 -8d05 1 288 3915 -FUNC 8d06 13 0 __doserrno -8d06 0 293 3915 -8d06 5 294 3915 -8d0b 4 295 3915 -8d0f 5 296 3915 -8d14 1 300 3915 -8d15 3 298 3915 -8d18 1 300 3915 -FUNC 8d19 1e 4 _dosmaperr -8d19 1 110 3915 -8d1a 9 111 3915 -8d23 13 113 3915 -8d36 1 114 3915 -FUNC 8d37 1b 4 _set_errno -8d37 0 157 3915 -8d37 5 158 3915 -8d3c 4 159 3915 -8d40 3 161 3915 -8d43 1 168 3915 -8d44 b 165 3915 -8d4f 2 166 3915 -8d51 1 168 3915 -FUNC 8d52 2a 4 _get_errno -8d52 1 187 3915 -8d53 1b 189 3915 -8d6e 1 195 3915 -8d6f 9 193 3915 -8d78 3 194 3915 -8d7b 1 195 3915 -FUNC 8d7c 1b 4 _set_doserrno -8d7c 0 213 3915 -8d7c 5 214 3915 -8d81 4 215 3915 -8d85 3 217 3915 -8d88 1 224 3915 -8d89 b 221 3915 -8d94 2 222 3915 -8d96 1 224 3915 -FUNC 8d97 2a 4 _get_doserrno -8d97 1 243 3915 -8d98 1b 245 3915 -8db3 1 251 3915 -8db4 9 249 3915 -8dbd 3 250 3915 -8dc0 1 251 3915 -FUNC 8dc1 21 0 _get_sbh_threshold -8dc1 0 61 3311 -8dc1 9 64 3311 -8dca 2 66 3311 -8dcc 1 81 3311 -8dcd 14 69 3311 -8de1 1 81 3311 -FUNC 8de2 46 4 _set_amblksiz -8de2 0 214 3311 -8de2 2b 216 3311 -8e0d 1 224 3311 -8e0e 11 217 3311 -8e1f 5 220 3311 -8e24 3 223 3311 -8e27 1 224 3311 -FUNC 8e28 3c 4 _get_amblksiz -8e28 0 243 3311 -8e28 27 245 3311 -8e4f 1 253 3311 -8e50 8 246 3311 -8e58 8 249 3311 -8e60 3 252 3311 -8e63 1 253 3311 -FUNC 8e64 48 4 __sbh_heap_init -8e64 0 274 3311 -8e64 1c 275 3311 -8e80 1 285 3311 -8e81 4 278 3311 -8e85 7 280 3311 -8e8c c 281 3311 -8e98 13 284 3311 -8eab 1 285 3311 -FUNC 8eac 2b 4 __sbh_find_block -8eac 0 306 3311 -8eac 12 307 3311 -8ebe 7 316 3311 -8ec5 8 317 3311 -8ecd 3 319 3311 -8ed0 4 314 3311 -8ed4 2 321 3311 -8ed6 1 322 3311 -FUNC 8ed7 314 8 __sbh_free_block -8ed7 6 381 3311 -8edd 7 399 3311 -8ee4 9 402 3311 -8eed 18 407 3311 -8f05 3 408 3311 -8f08 d 412 3311 -8f15 3 416 3311 -8f18 5 417 3311 -8f1d 6 420 3311 -8f23 b 424 3311 -8f2e 4 429 3311 -8f32 5 430 3311 -8f37 3 431 3311 -8f3a 8 434 3311 -8f42 3 439 3311 -8f45 b 441 3311 -8f50 e 442 3311 -8f5e 5 443 3311 -8f63 2 445 3311 -8f65 5 448 3311 -8f6a 11 449 3311 -8f7b 9 450 3311 -8f84 9 455 3311 -8f8d 15 459 3311 -8fa2 6 463 3311 -8fa8 5 464 3311 -8fad 3 465 3311 -8fb0 f 468 3311 -8fbf 3 474 3311 -8fc2 6 477 3311 -8fc8 b 478 3311 -8fd3 2 479 3311 -8fd5 3 483 3311 -8fd8 6 484 3311 -8fde 7 485 3311 -8fe5 2 486 3311 -8fe7 4 489 3311 -8feb b 493 3311 -8ff6 3 498 3311 -8ff9 11 501 3311 -900a 6 502 3311 -9010 5 503 3311 -9015 2 505 3311 -9017 e 508 3311 -9025 6 509 3311 -902b 6 511 3311 -9031 c 516 3311 -903d c 517 3311 -9049 8 520 3311 -9051 e 524 3311 -905f 6 528 3311 -9065 3 529 3311 -9068 6 530 3311 -906e 3 531 3311 -9071 6 532 3311 -9077 8 535 3311 -907f 18 541 3311 -9097 e 542 3311 -90a5 f 543 3311 -90b4 2 545 3311 -90b6 6 547 3311 -90bc 10 548 3311 -90cc 13 550 3311 -90df 5 556 3311 -90e4 4 558 3311 -90e8 b 561 3311 -90f3 d 564 3311 -9100 6 568 3311 -9106 1a 569 3311 -9120 15 573 3311 -9135 16 577 3311 -914b 19 578 3311 -9164 9 579 3311 -916d 6 583 3311 -9173 8 586 3311 -917b 16 589 3311 -9191 25 595 3311 -91b6 14 599 3311 -91ca 4 600 3311 -91ce a 603 3311 -91d8 8 608 3311 -91e0 9 609 3311 -91e9 2 611 3311 -FUNC 91eb b0 0 __sbh_alloc_new_region -91eb 0 891 3311 -91eb 13 897 3311 -91fe 1e 900 3311 -921c 4 901 3311 -9220 12 905 3311 -9232 9 909 3311 -923b 18 913 3311 -9253 2 914 3311 -9255 1a 918 3311 -926f 10 920 3311 -927f 2 921 3311 -9281 9 927 3311 -928a 6 930 3311 -9290 6 933 3311 -9296 4 935 3311 -929a 1 936 3311 -FUNC 929b 106 4 __sbh_alloc_new_group -929b 5 958 3311 -92a0 3 959 3311 -92a3 9 972 3311 -92ac 4 973 3311 -92b0 2 976 3311 -92b2 1 977 3311 -92b3 4 974 3311 -92b7 15 981 3311 -92cc c 986 3311 -92d8 1f 993 3311 -92f7 8 994 3311 -92ff 6 998 3311 -9305 12 1001 3311 -9317 4 1004 3311 -931b 7 1005 3311 -9322 8 1011 3311 -932a 10 1013 3311 -933a 12 1016 3311 -934c 3 1001 3311 -934f 8 1021 3311 -9357 6 1023 3311 -935d 3 1024 3311 -9360 6 1027 3311 -9366 3 1028 3311 -9369 5 1030 3311 -936e a 1031 3311 -9378 9 1032 3311 -9381 b 1033 3311 -938c e 1036 3311 -939a 5 1038 3311 -939f 2 1039 3311 -FUNC 93a1 2df c __sbh_resize_block -93a1 6 1061 3311 -93a7 c 1080 3311 -93b3 b 1083 3311 -93be 3 1084 3311 -93c1 12 1085 3311 -93d3 7 1089 3311 -93da 14 1096 3311 -93ee 13 1099 3311 -9401 7 1105 3311 -9408 8 1106 3311 -9410 6 1107 3311 -9416 8 1110 3311 -941e 3 1115 3311 -9421 9 1117 3311 -942a 11 1118 3311 -943b 5 1119 3311 -9440 2 1121 3311 -9442 5 1124 3311 -9447 14 1125 3311 -945b 6 1126 3311 -9461 9 1131 3311 -946a 9 1132 3311 -9473 12 1135 3311 -9485 a 1141 3311 -948f 9 1142 3311 -9498 3 1143 3311 -949b 9 1147 3311 -94a4 6 1148 3311 -94aa 6 1149 3311 -94b0 3 1150 3311 -94b3 6 1151 3311 -94b9 8 1154 3311 -94c1 18 1160 3311 -94d9 e 1161 3311 -94e7 6 1162 3311 -94ed 2 1164 3311 -94ef 6 1166 3311 -94f5 10 1167 3311 -9505 13 1169 3311 -9518 c 1174 3311 -9524 9 1176 3311 -952d 6 1180 3311 -9533 9 1182 3311 -953c 7 1100 3311 -9543 6 1186 3311 -9549 3 1189 3311 -954c d 1195 3311 -9559 7 1198 3311 -9560 b 1199 3311 -956b 3 1200 3311 -956e a 1203 3311 -9578 7 1208 3311 -957f 5 1209 3311 -9584 3 1210 3311 -9587 8 1213 3311 -958f 3 1218 3311 -9592 b 1221 3311 -959d e 1222 3311 -95ab 5 1223 3311 -95b0 2 1225 3311 -95b2 5 1228 3311 -95b7 11 1229 3311 -95c8 9 1231 3311 -95d1 9 1236 3311 -95da 9 1237 3311 -95e3 9 1240 3311 -95ec 4 1241 3311 -95f0 5 1242 3311 -95f5 3 1243 3311 -95f8 6 1249 3311 -95fe 3 1250 3311 -9601 6 1251 3311 -9607 3 1252 3311 -960a 6 1253 3311 -9610 8 1256 3311 -9618 18 1262 3311 -9630 e 1263 3311 -963e 6 1264 3311 -9644 2 1266 3311 -9646 6 1268 3311 -964c 10 1269 3311 -965c 13 1271 3311 -966f 5 1276 3311 -9674 4 1278 3311 -9678 6 1281 3311 -967e 2 1282 3311 -FUNC 9680 cd 0 __sbh_heapmin -9680 0 1302 3311 -9680 d 1306 3311 -968d 6 1310 3311 -9693 17 1311 3311 -96aa 15 1314 3311 -96bf 16 1318 3311 -96d5 19 1319 3311 -96ee 9 1320 3311 -96f7 f 1325 3311 -9706 11 1328 3311 -9717 28 1333 3311 -973f 6 1334 3311 -9745 7 1338 3311 -974c 1 1340 3311 -FUNC 974d 2e2 0 __sbh_heap_check -974d 3 1361 3311 -9750 12 1391 3311 -9762 8 1393 3311 -976a 16 1398 3311 -9780 3 1401 3311 -9783 8 1402 3311 -978b 6 1406 3311 -9791 9 1407 3311 -979a c 1408 3311 -97a6 3 1409 3311 -97a9 3 1410 3311 -97ac 6 1411 3311 -97b2 4 1418 3311 -97b6 1b 1421 3311 -97d1 9 1424 3311 -97da 9 1428 3311 -97e3 1c 1438 3311 -97ff 2 1445 3311 -9801 7 1446 3311 -9808 1 1449 3311 -9809 c 1452 3311 -9815 3 1456 3311 -9818 2 1458 3311 -981a 6 1462 3311 -9820 5 1463 3311 -9825 3 1464 3311 -9828 9 1465 3311 -9831 1e 1470 3311 -984f c 1475 3311 -985b 2 1479 3311 -985d 4 1481 3311 -9861 6 1484 3311 -9867 10 1488 3311 -9877 e 1492 3311 -9885 2 1498 3311 -9887 4 1502 3311 -988b 20 1505 3311 -98ab 19 1509 3311 -98c4 8 1514 3311 -98cc 3 1518 3311 -98cf 6 1520 3311 -98d5 8 1524 3311 -98dd 4 1527 3311 -98e1 e 1532 3311 -98ef 8 1536 3311 -98f7 6 1541 3311 -98fd 5 1542 3311 -9902 3 1543 3311 -9905 8 1544 3311 -990d c 1549 3311 -9919 11 1554 3311 -992a 6 1559 3311 -9930 3 1561 3311 -9933 e 1563 3311 -9941 3 1564 3311 -9944 2 1566 3311 -9946 8 1568 3311 -994e 3 1569 3311 -9951 1c 1575 3311 -996d c 1580 3311 -9979 10 1585 3311 -9989 17 1591 3311 -99a0 7 1595 3311 -99a7 7 1596 3311 -99ae 16 1597 3311 -99c4 f 1602 3311 -99d3 18 1606 3311 -99eb 5 1608 3311 -99f0 2 1609 3311 -99f2 4 1403 3311 -99f6 4 1425 3311 -99fa 4 1453 3311 -99fe 4 1485 3311 -9a02 4 1471 3311 -9a06 4 1439 3311 -9a0a 4 1493 3311 -9a0e 4 1537 3311 -9a12 4 1545 3311 -9a16 4 1550 3311 -9a1a 4 1510 3311 -9a1e 4 1581 3311 -9a22 4 1576 3311 -9a26 4 1592 3311 -9a2a 5 1603 3311 -FUNC 9a2f a8 4 _set_sbh_threshold -9a2f 1 102 3311 -9a30 a 104 3311 -9a3a 3 106 3311 -9a3d 1 195 3311 -9a3e a 109 3311 -9a48 25 112 3311 -9a6d 5 113 3311 -9a72 4 114 3311 -9a76 2 195 3311 -9a78 6 173 3311 -9a7e 2 175 3311 -9a80 5 179 3311 -9a85 2d 185 3311 -9ab2 6 186 3311 -9ab8 a 187 3311 -9ac2 5 188 3311 -9ac7 b 193 3311 -9ad2 4 194 3311 -9ad6 1 195 3311 -FUNC 9ad7 2e3 4 __sbh_alloc_block -9ad7 6 632 3311 -9add 5 633 3311 -9ae2 15 650 3311 -9af7 5 668 3311 -9afc 7 669 3311 -9b03 5 671 3311 -9b08 4 672 3311 -9b0c 2 674 3311 -9b0e d 677 3311 -9b1b a 682 3311 -9b25 e 686 3311 -9b33 3 688 3311 -9b36 2 683 3311 -9b38 5 688 3311 -9b3d 4 692 3311 -9b41 8 694 3311 -9b49 e 698 3311 -9b57 3 700 3311 -9b5a 2 695 3311 -9b5c 5 700 3311 -9b61 6 705 3311 -9b67 6 709 3311 -9b6d 6 711 3311 -9b73 4 707 3311 -9b77 4 715 3311 -9b7b 8 717 3311 -9b83 6 720 3311 -9b89 3 722 3311 -9b8c 2 718 3311 -9b8e 5 722 3311 -9b93 4 726 3311 -9b97 e 727 3311 -9ba5 7 728 3311 -9bac 12 733 3311 -9bbe 2 734 3311 -9bc0 6 737 3311 -9bc6 3 739 3311 -9bc9 2 740 3311 -9bcb 1c 745 3311 -9be7 4 749 3311 -9beb 14 751 3311 -9bff e 752 3311 -9c0d 3 751 3311 -9c10 12 754 3311 -9c22 a 760 3311 -9c2c d 763 3311 -9c39 2 768 3311 -9c3b 2 767 3311 -9c3d 1 768 3311 -9c3e 4 765 3311 -9c42 7 770 3311 -9c49 5 775 3311 -9c4e 6 776 3311 -9c54 8 777 3311 -9c5c 3 778 3311 -9c5f 8 781 3311 -9c67 8 784 3311 -9c6f 3 788 3311 -9c72 e 791 3311 -9c80 15 792 3311 -9c95 8 793 3311 -9c9d 2 795 3311 -9c9f f 798 3311 -9cae f 799 3311 -9cbd e 800 3311 -9ccb 1c 809 3311 -9ce7 6 813 3311 -9ced 3 814 3311 -9cf0 6 815 3311 -9cf6 3 816 3311 -9cf9 6 817 3311 -9cff 8 820 3311 -9d07 18 826 3311 -9d1f b 827 3311 -9d2a 10 829 3311 -9d3a 2 831 3311 -9d3c 6 833 3311 -9d42 d 835 3311 -9d4f 16 837 3311 -9d65 3 831 3311 -9d68 4 844 3311 -9d6c 2 846 3311 -9d6e 9 848 3311 -9d77 a 853 3311 -9d81 4 855 3311 -9d85 e 858 3311 -9d93 13 862 3311 -9da6 7 863 3311 -9dad 5 866 3311 -9db2 6 868 3311 -9db8 2 869 3311 -FUNC 9dba 39 0 terminate() -9dba c 94 3855 -9dc6 8 107 3855 -9dce 4 111 3855 -9dd2 4 116 3855 -9dd6 2 120 3855 -9dd8 2 121 3855 -9dda 7 122 3855 -9de1 7 127 3855 -9de8 5 135 3855 -9ded 6 136 3855 -FUNC 9df3 13 0 unexpected() -9df3 0 149 3855 -9df3 8 159 3855 -9dfb 4 163 3855 -9dff 2 167 3855 -9e01 5 173 3855 -FUNC 9e06 37 0 _inconsistency() -9e06 c 187 3855 -9e12 c 196 3855 -9e1e 4 197 3855 -9e22 4 202 3855 -9e26 2 203 3855 -9e28 2 204 3855 -9e2a 7 205 3855 -9e31 7 211 3855 -9e38 5 217 3855 -FUNC 9e3d 11 4 _initp_eh_hooks -9e3d 0 74 3855 -9e3d 10 80 3855 -9e4d 1 81 3855 -FUNC 9e4e b9 4 _onexit_nolock -9e4e 5 104 1673 -9e53 b 107 1673 -9e5e 13 108 1673 -9e71 16 112 1673 -9e87 d 122 1673 -9e94 d 127 1673 -9ea1 14 129 1673 -9eb5 3 134 1673 -9eb8 14 136 1673 -9ecc 3 147 1673 -9ecf f 149 1673 -9ede e 156 1673 -9eec c 157 1673 -9ef8 7 159 1673 -9eff 6 114 1673 -9f05 2 160 1673 -FUNC 9f07 2f 0 __onexitinit -9f07 1 205 1673 -9f08 b 208 1673 -9f13 9 209 1673 -9f1c e 211 1673 -9f2a 4 216 1673 -9f2e 1 221 1673 -9f2f 3 218 1673 -9f32 3 220 1673 -9f35 1 221 1673 -FUNC 9f36 3c 4 _onexit -9f36 c 85 1673 -9f42 5 88 1673 -9f47 4 90 1673 -9f4b c 91 1673 -9f57 c 93 1673 -9f63 3 97 1673 -9f66 6 98 1673 -9f6c 6 94 1673 -FUNC 9f72 12 4 atexit -9f72 0 165 1673 -9f72 11 166 1673 -9f83 1 167 1673 -FUNC 9f84 1f 0 _initp_misc_cfltcvt_tab -9f84 2 54 2488 -9f86 8 56 2488 -9f8e 14 58 2488 -9fa2 1 60 2488 -FUNC 9fb0 29 4 _ValidateImageBase -9fb0 0 44 1573 -9fb0 b 50 1573 -9fbb 2 52 1573 -9fbd 1 68 1573 -9fbe 5 55 1573 -9fc3 6 56 1573 -9fc9 2 58 1573 -9fcb d 62 1573 -9fd8 1 68 1573 -FUNC 9fe0 42 8 _FindPESection -9fe0 0 92 1573 -9fe0 9 99 1573 -9fe9 19 108 1573 -a002 10 111 1573 -a012 a 108 1573 -a01c 5 123 1573 -a021 1 124 1573 -FUNC a030 bb 4 _IsNonwritableInCurrentImage -a030 33 149 1573 -a063 7 156 1573 -a06a f 164 1573 -a079 2 166 1573 -a07b 8 174 1573 -a083 e 175 1573 -a091 2 176 1573 -a093 2 178 1573 -a095 12 185 1573 -a0a7 12 195 1573 -a0b9 17 187 1573 -a0d0 9 193 1573 -a0d9 12 195 1573 -FUNC a0eb 19 4 _initp_misc_winsig -a0eb 0 57 1199 -a0eb 9 58 1199 -a0f4 5 59 1199 -a0f9 5 60 1199 -a0fe 5 61 1199 -a103 1 62 1199 -FUNC a104 9b 4 ctrlevent_capture -a104 c 89 1199 -a110 9 94 1199 -a119 3 95 1199 -a11c 5 102 1199 -a121 5 103 1199 -a126 e 104 1199 -a134 7 105 1199 -a13b 2 107 1199 -a13d 5 108 1199 -a142 e 109 1199 -a150 7 110 1199 -a157 1 109 1199 -a158 9 113 1199 -a161 7 117 1199 -a168 c 120 1199 -a174 5 124 1199 -a179 4 128 1199 -a17d 2 120 1199 -a17f 8 121 1199 -a187 6 130 1199 -a18d 7 131 1199 -a194 3 138 1199 -a197 8 139 1199 -FUNC a19f 34 4 siglookup -a19f 0 634 1199 -a19f b 635 1199 -a1aa 15 645 1199 -a1bf f 649 1199 -a1ce 2 653 1199 -a1d0 2 658 1199 -a1d2 1 659 1199 -FUNC a1d3 d 0 __get_sigabrt -a1d3 0 676 1199 -a1d3 c 677 1199 -a1df 1 678 1199 -FUNC a1e0 9 0 __fpecode -a1e0 0 699 1199 -a1e0 8 700 1199 -a1e8 1 701 1199 -FUNC a1e9 9 0 __pxcptinfoptrs -a1e9 0 721 1199 -a1e9 8 722 1199 -a1f1 1 723 1199 -FUNC a1f2 23d 8 signal -a1f2 c 219 1199 -a1fe 4 224 1199 -a202 3 230 1199 -a205 3 244 1199 -a208 12 230 1199 -a21a 2f 244 1199 -a249 13 327 1199 -a25c 7 334 1199 -a263 8 335 1199 -a26b a 342 1199 -a275 17 346 1199 -a28c 10 352 1199 -a29c 13 367 1199 -a2af 3 380 1199 -a2b2 e 382 1199 -a2c0 3 395 1199 -a2c3 17 401 1199 -a2da 5 390 1199 -a2df 5 401 1199 -a2e4 8 246 1199 -a2ec 4 247 1199 -a2f0 12 254 1199 -a302 14 257 1199 -a316 6 259 1199 -a31c 2 261 1199 -a31e f 263 1199 -a32d a 264 1199 -a337 18 268 1199 -a34f f 288 1199 -a35e 4 289 1199 -a362 b 291 1199 -a36d 2 293 1199 -a36f f 279 1199 -a37e 4 280 1199 -a382 b 282 1199 -a38d 2 284 1199 -a38f f 296 1199 -a39e 4 297 1199 -a3a2 b 299 1199 -a3ad 2 301 1199 -a3af f 271 1199 -a3be 4 272 1199 -a3c2 c 274 1199 -a3ce c 305 1199 -a3da 9 309 1199 -a3e3 4 407 1199 -a3e7 3 305 1199 -a3ea 9 306 1199 -a3f3 19 410 1199 -a40c 1a 419 1199 -a426 3 417 1199 -a429 6 423 1199 -FUNC a42f 1b0 4 raise -a42f c 452 1199 -a43b 5 459 1199 -a440 3 460 1199 -a443 1f 462 1199 -a462 a 488 1199 -a46c 4 489 1199 -a470 8 490 1199 -a478 a 465 1199 -a482 2 467 1199 -a484 11 492 1199 -a495 2 493 1199 -a497 f 462 1199 -a4a6 1c 500 1199 -a4c2 a 476 1199 -a4cc 2 478 1199 -a4ce a 470 1199 -a4d8 2 472 1199 -a4da a 481 1199 -a4e4 7 482 1199 -a4eb a 502 1199 -a4f5 2 510 1199 -a4f7 4 509 1199 -a4fb 6 510 1199 -a501 5 515 1199 -a506 7 520 1199 -a50d 5 527 1199 -a512 7 528 1199 -a519 5 530 1199 -a51e f 543 1199 -a52d 6 544 1199 -a533 3 545 1199 -a536 5 551 1199 -a53b 6 552 1199 -a541 7 553 1199 -a548 5 561 1199 -a54d 1c 568 1199 -a569 d 571 1199 -a576 5 568 1199 -a57b 7 574 1199 -a582 c 577 1199 -a58e 5 582 1199 -a593 8 588 1199 -a59b 2 589 1199 -a59d 6 577 1199 -a5a3 6 578 1199 -a5a9 9 579 1199 -a5b2 5 590 1199 -a5b7 f 597 1199 -a5c6 6 598 1199 -a5cc 5 603 1199 -a5d1 6 604 1199 -a5d7 2 607 1199 -a5d9 6 608 1199 -FUNC a5df a 4 _initp_misc_rand_s -a5df 0 58 1489 -a5df 9 59 1489 -a5e8 1 60 1489 -FUNC a5e9 104 4 rand_s -a5e9 3 66 1489 -a5ec b 67 1489 -a5f7 2b 68 1489 -a622 c 71 1489 -a62e d 77 1489 -a63b 4 78 1489 -a63f 1e 80 1489 -a65d e 83 1489 -a66b 4 84 1489 -a66f 2f 86 1489 -a69e 9 88 1489 -a6a7 5 89 1489 -a6ac 16 94 1489 -a6c2 7 103 1489 -a6c9 9 107 1489 -a6d2 b 109 1489 -a6dd 9 110 1489 -a6e6 6 112 1489 -a6ec 1 113 1489 -FUNC a6ed 15a 14 __getlocaleinfo -a6ed 1d 70 1937 -a70a 7 76 1937 -a711 87 109 1937 -a798 13 103 1937 -a7ab 5 114 1937 -a7b0 7 115 1937 -a7b7 3 141 1937 -a7ba 12 142 1937 -a7cc 20 106 1937 -a7ec 5 108 1937 -a7f1 7 109 1937 -a7f8 4 111 1937 -a7fc 5 118 1937 -a801 1a 126 1937 -a81b 2 127 1937 -a81d 2 129 1937 -a81f 10 134 1937 -a82f 16 135 1937 -a845 2 139 1937 -FUNC a847 a 4 _initp_misc_purevirt -a847 0 166 1937 -a847 9 167 1937 -a850 1 168 1937 -FUNC a851 a 4 _initp_misc_initcrit -a851 0 47 2023 -a851 9 48 2023 -a85a 1 49 2023 -FUNC a85b 10 8 __crtInitCritSecNoSpinCount -a85b 0 76 2023 -a85b a 77 2023 -a865 3 78 2023 -a868 3 79 2023 -FUNC a86b c5 8 __crtInitCritSecAndSpinCount -a86b c 109 2023 -a877 5 111 2023 -a87c e 112 2023 -a88a 4 114 2023 -a88e 1b 120 2023 -a8a9 4 121 2023 -a8ad 2 129 2023 -a8af b 130 2023 -a8ba 4 131 2023 -a8be e 134 2023 -a8cc 4 136 2023 -a8d0 5 149 2023 -a8d5 c 152 2023 -a8e1 3 155 2023 -a8e4 b 161 2023 -a8ef 2 162 2023 -a8f1 1a 163 2023 -a90b 9 170 2023 -a914 8 171 2023 -a91c 4 173 2023 -a920 7 174 2023 -a927 3 176 2023 -a92a 6 177 2023 -FUNC a930 a 4 _initp_heap_handler -a930 0 31 3260 -a930 9 32 3260 -a939 1 33 3260 -FUNC a93a 31 4 _set_new_handler(int (*)(unsigned int)) -a93a 1 53 3260 -a93b 7 57 3260 -a942 b 59 3260 -a94d b 60 3260 -a958 f 63 3260 -a967 3 65 3260 -a96a 1 66 3260 -FUNC a96b 9 4 _set_new_handler(int) -a96b 0 86 3260 -a96b 8 89 3260 -a973 1 90 3260 -FUNC a974 d 0 _query_new_handler() -a974 0 110 3260 -a974 c 111 3260 -a980 1 112 3260 -FUNC a981 22 4 _callnewh -a981 0 131 3260 -a981 b 133 3260 -a98c 10 135 3260 -a99c 3 138 3260 -a99f 1 139 3260 -a9a0 2 136 3260 -a9a2 1 139 3260 -FUNC a9a3 1bd c __crtMessageBoxA -a9a3 9 41 2447 -a9ac 5 49 2447 -a9b1 2 56 2447 -a9b3 18 64 2447 -a9cb d 66 2447 -a9d8 2 67 2447 -a9da 6 69 2447 -a9e0 10 76 2447 -a9f0 6 78 2447 -a9f6 6 80 2447 -a9fc 15 83 2447 -aa11 1a 86 2447 -aa2b 1c 88 2447 -aa47 6 89 2447 -aa4d 8 95 2447 -aa55 6 98 2447 -aa5b a 100 2447 -aa65 14 102 2447 -aa79 14 116 2447 -aa8d 6 119 2447 -aa93 d 120 2447 -aaa0 c 122 2447 -aaac 1f 127 2447 -aacb 1b 136 2447 -aae6 6 137 2447 -aaec 7 138 2447 -aaf3 2 139 2447 -aaf5 7 140 2447 -aafc 2 142 2447 -aafe a 144 2447 -ab08 6 146 2447 -ab0e 5 147 2447 -ab13 2 149 2447 -ab15 11 153 2447 -ab26 6 155 2447 -ab2c 5 156 2447 -ab31 8 158 2447 -ab39 b 165 2447 -ab44 5 166 2447 -ab49 10 168 2447 -ab59 5 173 2447 -ab5e 2 176 2447 -FUNC ab60 71 c strcat_s -ab60 0 13 490 -ab60 30 18 490 -ab90 c 19 490 -ab9c 2 21 490 -ab9e 4 23 490 -aba2 1 25 490 -aba3 3 26 490 -aba6 2 29 490 -aba8 2 32 490 -abaa d 35 490 -abb7 4 39 490 -abbb 2 41 490 -abbd e 42 490 -abcb 5 45 490 -abd0 1 46 490 -FUNC abd1 b3 10 strncpy_s -abd1 5 13 406 -abd6 14 17 406 -abea 5 65 406 -abef 2 66 406 -abf1 26 24 406 -ac17 5 25 406 -ac1c 2 28 406 -ac1e 2 29 406 -ac20 b 31 406 -ac2b 8 35 406 -ac33 d 37 406 -ac40 2 41 406 -ac42 12 45 406 -ac54 5 48 406 -ac59 2 50 406 -ac5b 4 54 406 -ac5f 6 56 406 -ac65 3 58 406 -ac68 c 59 406 -ac74 2 61 406 -ac76 e 62 406 -FUNC ac84 46 4 _set_error_mode -ac84 0 43 2351 -ac84 15 50 2351 -ac99 6 58 2351 -ac9f 1 65 2351 -aca0 5 54 2351 -aca5 7 55 2351 -acac 1 65 2351 -acad 1c 61 2351 -acc9 1 65 2351 -FUNC acca a 4 __set_app_type -acca 0 91 2351 -acca 9 96 2351 -acd3 1 97 2351 -FUNC acd4 6 0 __get_app_type -acd4 0 120 2351 -acd4 5 125 2351 -acd9 1 126 2351 -FUNC acda 21 4 wait_a_bit -acda 1 18 3587 -acdb b 19 3587 -ace6 6 20 3587 -acec 8 21 3587 -acf4 3 22 3587 -acf7 3 23 3587 -acfa 1 24 3587 -FUNC acfb 10 4 _set_malloc_crt_max_wait -acfb 0 32 3587 -acfb f 34 3587 -ad0a 1 36 3587 -FUNC ad0b 40 4 _malloc_crt -ad0b 2 39 3587 -ad0d 2 40 3587 -ad0f b 44 3587 -ad1a d 45 3587 -ad27 18 46 3587 -ad3f 7 47 3587 -ad46 4 50 3587 -ad4a 1 51 3587 -FUNC ad4b 48 8 _calloc_crt -ad4b 2 54 3587 -ad4d 2 55 3587 -ad4f 14 61 3587 -ad63 c 62 3587 -ad6f 18 63 3587 -ad87 7 64 3587 -ad8e 4 67 3587 -ad92 1 68 3587 -FUNC ad93 4b 8 _realloc_crt -ad93 2 71 3587 -ad95 2 72 3587 -ad97 f 76 3587 -ada6 14 77 3587 -adba 18 78 3587 -add2 7 79 3587 -add9 4 82 3587 -addd 1 83 3587 -FUNC adde 50 c _recalloc_crt -adde 2 86 3587 -ade0 2 87 3587 -ade2 16 91 3587 -adf8 12 92 3587 -ae0a 18 94 3587 -ae22 7 95 3587 -ae29 4 100 3587 -ae2d 1 101 3587 -FUNC ae2e 8 0 _malloc_crt_fastcall -ae2e 0 105 3587 -ae2e 7 106 3587 -ae35 1 107 3587 -FUNC ae36 a 0 _calloc_crt_fastcall -ae36 0 110 3587 -ae36 9 111 3587 -ae3f 1 112 3587 -FUNC ae40 a 0 _realloc_crt_fastcall -ae40 0 115 3587 -ae40 9 116 3587 -ae49 1 117 3587 -FUNC ae4a e 0 _LocaleUpdate::~_LocaleUpdate() -ae4a 0 282 3057 -ae4a 6 283 3057 -ae50 7 284 3057 -ae57 1 285 3057 -FUNC ae58 3 0 _LocaleUpdate::GetLocaleT() -ae58 2 287 3057 -ae5a 1 289 3057 -FUNC ae5b 2f 0 CPtoLCID -ae5b 0 329 3029 -ae5b 14 330 3029 -ae6f 2 345 3029 -ae71 1 346 3029 -ae72 5 342 3029 -ae77 1 346 3029 -ae78 5 339 3029 -ae7d 1 346 3029 -ae7e 5 336 3029 -ae83 1 346 3029 -ae84 5 333 3029 -ae89 1 346 3029 -FUNC ae8a 55 0 setSBCS -ae8a 4 363 3029 -ae8e 14 368 3029 -aea2 3 371 3029 -aea5 3 374 3029 -aea8 3 376 3029 -aeab 8 379 3029 -aeb3 a 381 3029 -aebd 9 382 3029 -aec6 b 384 3029 -aed1 d 385 3029 -aede 1 386 3029 -FUNC aedf 18a 0 setSBUpLow -aedf 1d 402 3029 -aefc f 412 3029 -af0b d 415 3029 -af18 c 416 3029 -af24 e 420 3029 -af32 3 419 3029 -af35 28 421 3029 -af5d 1d 427 3029 -af7a 23 432 3029 -af9d 25 437 3029 -afc2 2 442 3029 -afc4 a 443 3029 -afce 5 445 3029 -afd3 9 446 3029 -afdc 5 448 3029 -afe1 5 450 3029 -afe6 e 451 3029 -aff4 2 453 3029 -aff6 8 454 3029 -affe 5 442 3029 -b003 8 456 3029 -b00b 2c 472 3029 -b037 5 466 3029 -b03c 5 468 3029 -b041 7 469 3029 -b048 2 471 3029 -b04a 3 472 3029 -b04d 5 460 3029 -b052 17 474 3029 -FUNC b069 a4 0 __updatetmbcinfo -b069 c 496 3029 -b075 7 499 3029 -b07c 10 500 3029 -b08c 3 533 3029 -b08f 4 536 3029 -b093 8 538 3029 -b09b 2 541 3029 -b09d 6 542 3029 -b0a3 8 501 3029 -b0ab 4 503 3029 -b0af e 506 3029 -b0bd 17 512 3029 -b0d4 7 517 3029 -b0db 11 524 3029 -b0ec 7 525 3029 -b0f3 11 528 3029 -b104 9 530 3029 -FUNC b10d 82 4 _LocaleUpdate::_LocaleUpdate(localeinfo_struct *) -b10d 0 261 3057 -b10d f 262 3057 -b11c 8 264 3057 -b124 5 265 3057 -b129 6 266 3057 -b12f 1c 268 3057 -b14b 21 269 3057 -b16c 9 270 3057 -b175 4 272 3057 -b179 4 273 3057 -b17d 2 276 3057 -b17f a 278 3057 -b189 6 280 3057 -FUNC b18f 7a 0 getSystemCP -b18f 7 282 3029 -b196 b 284 3029 -b1a1 b 289 3029 -b1ac a 291 3029 -b1b6 14 292 3029 -b1ca 5 295 3029 -b1cf a 297 3029 -b1d9 8 298 3029 -b1e1 5 302 3029 -b1e6 12 305 3029 -b1f8 f 308 3029 -b207 2 309 3029 -FUNC b209 1d9 8 _setmbcp_nolock -b209 15 686 3029 -b21e b 693 3029 -b229 9 696 3029 -b232 7 698 3029 -b239 7 699 3029 -b240 3 703 3029 -b243 2 705 3029 -b245 19 708 3029 -b25e 2a 743 3029 -b288 13 751 3029 -b29b f 756 3029 -b2aa 15 761 3029 -b2bf 17 764 3029 -b2d6 c 766 3029 -b2e2 f 712 3029 -b2f1 15 715 3029 -b306 9 720 3029 -b30f 8 723 3029 -b317 12 724 3029 -b329 9 723 3029 -b332 5 720 3029 -b337 12 715 3029 -b349 20 731 3029 -b369 d 733 3029 -b376 7 736 3029 -b37d 5 737 3029 -b382 6 767 3029 -b388 10 766 3029 -b398 8 771 3029 -b3a0 7 772 3029 -b3a7 b 775 3029 -b3b2 3 778 3029 -b3b5 2 780 3029 -b3b7 3 782 3029 -b3ba 8 785 3029 -b3c2 2 789 3029 -b3c4 6 794 3029 -b3ca 6 797 3029 -b3d0 3 746 3029 -b3d3 f 802 3029 -FUNC b3e2 3c 0 _getmbcp -b3e2 6 819 3029 -b3e8 a 821 3029 -b3f2 9 822 3029 -b3fb 10 823 3029 -b40b 2 826 3029 -b40d f 825 3029 -b41c 2 826 3029 -FUNC b41e 19a 4 _setmbcp -b41e c 574 3029 -b42a 4 575 3029 -b42e a 579 3029 -b438 5 581 3029 -b43d 3 582 3029 -b440 b 585 3029 -b44b 9 587 3029 -b454 d 593 3029 -b461 8 595 3029 -b469 c 597 3029 -b475 3 607 3029 -b478 16 612 3029 -b48e 1a 614 3029 -b4a8 7 615 3029 -b4af 3 619 3029 -b4b2 9 620 3029 -b4bb 17 622 3029 -b4d2 8 624 3029 -b4da 4 625 3029 -b4de 8 630 3029 -b4e6 8 631 3029 -b4ee 8 632 3029 -b4f6 a 633 3029 -b500 d 634 3029 -b50d 3 633 3029 -b510 c 635 3029 -b51c a 636 3029 -b526 3 635 3029 -b529 c 637 3029 -b535 d 638 3029 -b542 3 637 3029 -b545 1c 640 3029 -b561 7 641 3029 -b568 6 645 3029 -b56e 3 646 3029 -b571 e 648 3029 -b57f 9 650 3029 -b588 2 653 3029 -b58a 5 654 3029 -b58f 8 660 3029 -b597 7 661 3029 -b59e b 662 3029 -b5a9 2 668 3029 -b5ab 4 673 3029 -b5af 3 682 3029 -b5b2 6 683 3029 -FUNC b5b8 1e 0 __initmbctable -b5b8 0 843 3029 -b5b8 9 853 3029 -b5c1 8 854 3029 -b5c9 a 855 3029 -b5d3 2 860 3029 -b5d5 1 861 3029 -FUNC b5d6 51 10 x_ismbbtype_l -b5d6 6 213 3083 -b5dc b 214 3083 -b5e7 4 219 3083 -b5eb 3a 222 3083 -b625 2 223 3083 -FUNC b627 15 8 _ismbbkalnum_l -b627 0 80 3083 -b627 14 81 3083 -b63b 1 82 3083 -FUNC b63c 13 4 _ismbbkalnum -b63c 0 85 3083 -b63c 12 86 3083 -b64e 1 87 3083 -FUNC b64f 15 8 _ismbbkprint_l -b64f 0 90 3083 -b64f 14 91 3083 -b663 1 92 3083 -FUNC b664 13 4 _ismbbkprint -b664 0 95 3083 -b664 12 96 3083 -b676 1 97 3083 -FUNC b677 15 8 _ismbbkpunct_l -b677 0 100 3083 -b677 14 101 3083 -b68b 1 102 3083 -FUNC b68c 13 4 _ismbbkpunct -b68c 0 105 3083 -b68c 12 106 3083 -b69e 1 107 3083 -FUNC b69f 18 8 _ismbbalnum_l -b69f 0 113 3083 -b69f 17 114 3083 -b6b6 1 115 3083 -FUNC b6b7 16 4 _ismbbalnum -b6b7 0 118 3083 -b6b7 15 119 3083 -b6cc 1 120 3083 -FUNC b6cd 18 8 _ismbbalpha_l -b6cd 0 123 3083 -b6cd 17 124 3083 -b6e4 1 125 3083 -FUNC b6e5 16 4 _ismbbalpha -b6e5 0 128 3083 -b6e5 15 129 3083 -b6fa 1 130 3083 -FUNC b6fb 18 8 _ismbbgraph_l -b6fb 0 133 3083 -b6fb 17 134 3083 -b712 1 135 3083 -FUNC b713 16 4 _ismbbgraph -b713 0 138 3083 -b713 15 139 3083 -b728 1 140 3083 -FUNC b729 18 8 _ismbbprint_l -b729 0 143 3083 -b729 17 144 3083 -b740 1 145 3083 -FUNC b741 16 4 _ismbbprint -b741 0 148 3083 -b741 15 149 3083 -b756 1 150 3083 -FUNC b757 15 8 _ismbbpunct_l -b757 0 153 3083 -b757 14 154 3083 -b76b 1 155 3083 -FUNC b76c 13 4 _ismbbpunct -b76c 0 158 3083 -b76c 12 159 3083 -b77e 1 160 3083 -FUNC b77f 15 8 _ismbblead_l -b77f 0 166 3083 -b77f 14 167 3083 -b793 1 168 3083 -FUNC b794 13 4 _ismbblead -b794 0 171 3083 -b794 12 172 3083 -b7a6 1 173 3083 -FUNC b7a7 15 8 _ismbbtrail_l -b7a7 0 176 3083 -b7a7 14 177 3083 -b7bb 1 178 3083 -FUNC b7bc 13 4 _ismbbtrail -b7bc 0 181 3083 -b7bc 12 182 3083 -b7ce 1 183 3083 -FUNC b7cf 53 8 _ismbbkana_l -b7cf 6 189 3083 -b7d5 b 190 3083 -b7e0 10 192 3083 -b7f0 1f 194 3083 -b80f 2 197 3083 -b811 f 196 3083 -b820 2 197 3083 -FUNC b822 e 4 _ismbbkana -b822 0 200 3083 -b822 d 201 3083 -b82f 1 202 3083 -FUNC b830 365 c memcpy -b830 3 101 614 -b833 1 113 614 -b834 1 114 614 -b835 3 116 614 -b838 3 117 614 -b83b 3 119 614 -b83e 2 129 614 -b840 2 131 614 -b842 2 132 614 -b844 2 134 614 -b846 2 135 614 -b848 2 137 614 -b84a 6 138 614 -b850 6 147 614 -b856 2 148 614 -b858 7 150 614 -b85f 2 151 614 -b861 1 153 614 -b862 1 154 614 -b863 3 155 614 -b866 3 156 614 -b869 2 157 614 -b86b 1 158 614 -b86c 1 159 614 -b86d 2 160 614 -b86f 1 163 614 -b870 1 164 614 -b871 1 165 614 -b872 5 166 614 -b877 6 179 614 -b87d 2 180 614 -b87f 3 182 614 -b882 3 183 614 -b885 3 185 614 -b888 2 186 614 -b88a 2 188 614 -b88c 8 190 614 -b894 2 208 614 -b896 5 209 614 -b89b 3 211 614 -b89e 2 212 614 -b8a0 3 214 614 -b8a3 2 215 614 -b8a5 7 217 614 -b8ac 8 221 614 -b8b4 14 225 614 -b8c8 2 232 614 -b8ca 2 233 614 -b8cc 2 235 614 -b8ce 3 236 614 -b8d1 3 238 614 -b8d4 3 239 614 -b8d7 3 241 614 -b8da 3 242 614 -b8dd 3 244 614 -b8e0 3 245 614 -b8e3 3 247 614 -b8e6 2 248 614 -b8e8 2 250 614 -b8ea a 252 614 -b8f4 2 256 614 -b8f6 2 257 614 -b8f8 2 259 614 -b8fa 3 260 614 -b8fd 3 262 614 -b900 3 263 614 -b903 3 265 614 -b906 3 266 614 -b909 3 268 614 -b90c 2 269 614 -b90e 2 271 614 -b910 8 273 614 -b918 2 277 614 -b91a 2 278 614 -b91c 2 280 614 -b91e 3 281 614 -b921 3 283 614 -b924 3 284 614 -b927 3 286 614 -b92a 2 287 614 -b92c 2 289 614 -b92e 2a 291 614 -b958 4 298 614 -b95c 4 300 614 -b960 4 302 614 -b964 4 304 614 -b968 4 306 614 -b96c 4 308 614 -b970 4 310 614 -b974 4 312 614 -b978 4 314 614 -b97c 4 316 614 -b980 4 318 614 -b984 4 320 614 -b988 4 322 614 -b98c 4 324 614 -b990 7 326 614 -b997 2 328 614 -b999 2 329 614 -b99b 19 331 614 -b9b4 3 340 614 -b9b7 1 341 614 -b9b8 1 342 614 -b9b9 3 344 614 -b9bc 2 348 614 -b9be 2 350 614 -b9c0 3 351 614 -b9c3 1 352 614 -b9c4 1 353 614 -b9c5 3 354 614 -b9c8 2 358 614 -b9ca 2 360 614 -b9cc 3 361 614 -b9cf 3 362 614 -b9d2 3 363 614 -b9d5 1 364 614 -b9d6 1 365 614 -b9d7 5 366 614 -b9dc 2 370 614 -b9de 2 372 614 -b9e0 3 373 614 -b9e3 3 374 614 -b9e6 3 375 614 -b9e9 3 376 614 -b9ec 3 377 614 -b9ef 1 378 614 -b9f0 1 379 614 -b9f1 3 380 614 -b9f4 4 391 614 -b9f8 4 392 614 -b9fc 6 397 614 -ba02 2 398 614 -ba04 3 400 614 -ba07 3 401 614 -ba0a 3 403 614 -ba0d 2 404 614 -ba0f 1 406 614 -ba10 2 407 614 -ba12 1 408 614 -ba13 9 410 614 -ba1c 2 414 614 -ba1e a 417 614 -ba28 2 422 614 -ba2a 5 423 614 -ba2f 3 425 614 -ba32 2 426 614 -ba34 3 428 614 -ba37 2 429 614 -ba39 7 431 614 -ba40 14 435 614 -ba54 3 442 614 -ba57 2 443 614 -ba59 3 445 614 -ba5c 3 446 614 -ba5f 3 448 614 -ba62 3 449 614 -ba65 3 451 614 -ba68 2 452 614 -ba6a 1 454 614 -ba6b 2 455 614 -ba6d 1 456 614 -ba6e a 458 614 -ba78 3 462 614 -ba7b 2 463 614 -ba7d 3 465 614 -ba80 3 466 614 -ba83 3 468 614 -ba86 3 469 614 -ba89 3 471 614 -ba8c 3 472 614 -ba8f 3 474 614 -ba92 2 475 614 -ba94 1 477 614 -ba95 2 478 614 -ba97 1 479 614 -ba98 8 481 614 -baa0 3 485 614 -baa3 2 486 614 -baa5 3 488 614 -baa8 3 489 614 -baab 3 491 614 -baae 3 492 614 -bab1 3 494 614 -bab4 3 495 614 -bab7 3 497 614 -baba 3 498 614 -babd 3 500 614 -bac0 6 501 614 -bac6 1 503 614 -bac7 2 504 614 -bac9 1 505 614 -baca 2a 507 614 -baf4 4 516 614 -baf8 4 518 614 -bafc 4 520 614 -bb00 4 522 614 -bb04 4 524 614 -bb08 4 526 614 -bb0c 4 528 614 -bb10 4 530 614 -bb14 4 532 614 -bb18 4 534 614 -bb1c 4 536 614 -bb20 4 538 614 -bb24 4 540 614 -bb28 4 542 614 -bb2c 7 544 614 -bb33 2 546 614 -bb35 2 547 614 -bb37 19 549 614 -bb50 3 558 614 -bb53 1 560 614 -bb54 1 561 614 -bb55 3 562 614 -bb58 3 566 614 -bb5b 3 568 614 -bb5e 3 569 614 -bb61 1 570 614 -bb62 1 571 614 -bb63 5 572 614 -bb68 3 576 614 -bb6b 3 578 614 -bb6e 3 579 614 -bb71 3 580 614 -bb74 3 581 614 -bb77 1 582 614 -bb78 1 583 614 -bb79 3 584 614 -bb7c 3 588 614 -bb7f 3 590 614 -bb82 3 591 614 -bb85 3 592 614 -bb88 3 593 614 -bb8b 3 594 614 -bb8e 3 595 614 -bb91 1 596 614 -bb92 1 597 614 -bb93 2 598 614 -FUNC bb95 6 0 ___setlc_active_func -bb95 0 90 1409 -bb95 5 91 1409 -bb9a 1 92 1409 -FUNC bb9b 6 0 ___unguarded_readlc_active_add_func -bb9b 0 104 1409 -bb9b 5 105 1409 -bba0 1 106 1409 -FUNC bba1 140 4 __freetlocinfo -bba1 3 144 1409 -bba4 26 152 1409 -bbca e 155 1409 -bbd8 6 157 1409 -bbde d 158 1409 -bbeb e 162 1409 -bbf9 6 164 1409 -bbff d 165 1409 -bc0c b 168 1409 -bc17 d 169 1409 -bc24 e 176 1409 -bc32 11 178 1409 -bc43 13 179 1409 -bc56 e 180 1409 -bc64 e 181 1409 -bc72 17 188 1409 -bc89 6 190 1409 -bc8f 9 191 1409 -bc98 6 194 1409 -bc9e 13 197 1409 -bcb1 7 199 1409 -bcb8 10 205 1409 -bcc8 d 207 1409 -bcd5 b 214 1409 -bce0 1 215 1409 -FUNC bce1 86 4 __addlocaleref -bce1 3 225 1409 -bce4 e 227 1409 -bcf2 a 228 1409 -bcfc 3 229 1409 -bcff a 231 1409 -bd09 3 232 1409 -bd0c a 234 1409 -bd16 3 235 1409 -bd19 a 237 1409 -bd23 3 238 1409 -bd26 6 240 1409 -bd2c f 242 1409 -bd3b 3 243 1409 -bd3e d 245 1409 -bd4b 9 246 1409 -bd54 12 248 1409 -bd66 1 249 1409 -FUNC bd67 8c 4 __removelocaleref -bd67 1 259 1409 -bd68 b 261 1409 -bd73 9 263 1409 -bd7c a 265 1409 -bd86 3 266 1409 -bd89 a 268 1409 -bd93 3 269 1409 -bd96 a 271 1409 -bda0 3 272 1409 -bda3 a 274 1409 -bdad 3 275 1409 -bdb0 6 277 1409 -bdb6 f 279 1409 -bdc5 3 280 1409 -bdc8 d 282 1409 -bdd5 9 283 1409 -bdde 11 285 1409 -bdef 3 287 1409 -bdf2 1 288 1409 -FUNC bdf3 24 0 _copytlocinfo_nolock -bdf3 3 302 1409 -bdf6 d 303 1409 -be03 7 304 1409 -be0a 3 305 1409 -be0d 9 306 1409 -be16 1 308 1409 -FUNC be17 3e 0 _updatetlocinfoEx_nolock -be17 0 321 1409 -be17 9 324 1409 -be20 2 326 1409 -be22 4 327 1409 -be26 8 334 1409 -be2e 5 339 1409 -be33 6 341 1409 -be39 e 350 1409 -be47 7 351 1409 -be4e 3 355 1409 -be51 1 356 1409 -be52 2 325 1409 -be54 1 356 1409 -FUNC be55 76 0 __updatetlocinfo -be55 c 382 1409 -be61 7 384 1409 -be68 10 386 1409 -be78 8 397 1409 -be80 4 399 1409 -be84 8 401 1409 -be8c 2 404 1409 -be8e 6 405 1409 -be94 8 387 1409 -be9c 4 388 1409 -bea0 11 390 1409 -beb1 e 392 1409 -bebf 8 394 1409 -bec7 4 395 1409 -FUNC becb 66 4 _configthreadlocale -becb 2 420 1409 -becd 5 434 1409 -bed2 10 435 1409 -bee2 19 437 1409 -befb 1d 456 1409 -bf18 3 444 1409 -bf1b 2 445 1409 -bf1d 6 440 1409 -bf23 2 441 1409 -bf25 7 452 1409 -bf2c 4 460 1409 -bf30 1 462 1409 -FUNC bf31 53 0 sync_legacy_variables_lk -bf31 0 489 1409 -bf31 e 490 1409 -bf3f 9 491 1409 -bf48 c 492 1409 -bf54 c 493 1409 -bf60 c 494 1409 -bf6c c 495 1409 -bf78 b 496 1409 -bf83 1 497 1409 -FUNC bf84 96 4 _free_locale -bf84 c 517 1409 -bf90 9 518 1409 -bf99 1c 522 1409 -bfb5 7 524 1409 -bfbc 4 526 1409 -bfc0 8 534 1409 -bfc8 3 535 1409 -bfcb 8 537 1409 -bfd3 11 540 1409 -bfe4 7 541 1409 -bfeb c 543 1409 -bff7 7 552 1409 -bffe 3 553 1409 -c001 7 554 1409 -c008 6 556 1409 -c00e 3 543 1409 -c011 9 545 1409 -FUNC c01a 5 4 __free_locale -c01a 0 562 1409 -c01a 5 563 1409 -FUNC c01f 88 0 _get_current_locale -c01f c 687 1409 -c02b 7 689 1409 -c032 14 691 1409 -c046 b 693 1409 -c051 4 694 1409 -c055 5 697 1409 -c05a 5 698 1409 -c05f 5 706 1409 -c064 6 707 1409 -c06a 8 708 1409 -c072 4 709 1409 -c076 8 710 1409 -c07e c 712 1409 -c08a 9 715 1409 -c093 2 717 1409 -c095 6 718 1409 -c09b 3 712 1409 -c09e 9 713 1409 -FUNC c0a7 5 0 __get_current_locale -c0a7 0 722 1409 -c0a7 5 723 1409 -FUNC c0ac 3 4 __init_dummy -c0ac 0 1283 1409 -c0ac 2 1284 1409 -c0ae 1 1285 1409 -FUNC c0af 3e c _strcats -c0af 2 1288 1409 -c0b1 f 1294 1409 -c0c0 26 1296 1409 -c0e6 6 1294 1409 -c0ec 1 1299 1409 -FUNC c0ed 129 8 __lc_strtolc -c0ed 6 1302 1409 -c0f3 11 1307 1409 -c104 c 1309 1409 -c110 7 1310 1409 -c117 b 1313 1409 -c122 25 1315 1409 -c147 6 1317 1409 -c14d 2 1318 1409 -c14f 15 1323 1409 -c164 1d 1328 1409 -c181 9 1329 1409 -c18a 10 1331 1409 -c19a c 1332 1409 -c1a6 14 1334 1409 -c1ba 28 1335 1409 -c1e2 9 1340 1409 -c1eb b 1348 1409 -c1f6 18 1350 1409 -c20e 6 1338 1409 -c214 2 1353 1409 -FUNC c216 6b c __lc_lctostr -c216 5 1356 1409 -c21b 25 1357 1409 -c240 7 1358 1409 -c247 16 1359 1409 -c25d c 1360 1409 -c269 16 1361 1409 -c27f 2 1362 1409 -FUNC c281 171 0 _setlocale_get_all -c281 4 1124 1409 -c285 3 1126 1409 -c288 1d 1134 1409 -c2a5 3 1137 1409 -c2a8 3 1139 1409 -c2ab 2 1140 1409 -c2ad 2f 1143 1409 -c2dc 26 1146 1409 -c302 10 1147 1409 -c312 5 1148 1409 -c317 4 1141 1409 -c31b 2f 1143 1409 -c34a a 1144 1409 -c354 8 1152 1409 -c35c 14 1154 1409 -c370 9 1156 1409 -c379 e 1159 1409 -c387 9 1161 1409 -c390 7 1165 1409 -c397 7 1166 1409 -c39e 9 1168 1409 -c3a7 15 1170 1409 -c3bc 9 1172 1409 -c3c5 e 1175 1409 -c3d3 9 1177 1409 -c3dc 12 1183 1409 -c3ee 4 1187 1409 -FUNC c3f2 1d4 18 _expandlocale -c3f2 15 1198 1409 -c407 41 1230 1409 -c448 14 1211 1409 -c45c b 1216 1409 -c467 26 1219 1409 -c48d 4 1220 1409 -c491 3 1222 1409 -c494 4 1223 1409 -c498 4 1224 1409 -c49c 7 1226 1409 -c4a3 2 1228 1409 -c4a5 8 1230 1409 -c4ad 6 1234 1409 -c4b3 2f 1236 1409 -c4e2 4 1241 1409 -c4e6 e 1243 1409 -c4f4 6 1244 1409 -c4fa 10 1246 1409 -c50a 6 1247 1409 -c510 9 1251 1409 -c519 10 1253 1409 -c529 a 1255 1409 -c533 2 1260 1409 -c535 8 1263 1409 -c53d 26 1267 1409 -c563 5 1271 1409 -c568 e 1272 1409 -c576 5 1273 1409 -c57b 10 1274 1409 -c58b 22 1276 1409 -c5ad 5 1277 1409 -c5b2 2 1212 1409 -c5b4 12 1278 1409 -FUNC c5c6 2f6 4 _setlocale_set_cat -c5c6 19 980 1409 -c5df 5 993 1409 -c5e4 2f 998 1409 -c613 7 1000 1409 -c61a 19 1002 1409 -c633 6 1004 1409 -c639 c 1007 1409 -c645 16 1008 1409 -c65b 2 1010 1409 -c65d 3 1013 1409 -c660 d 1014 1409 -c66d 2c 1015 1409 -c699 3 1016 1409 -c69c 39 1019 1409 -c6d5 6 1020 1409 -c6db 15 1021 1409 -c6f0 17 1022 1409 -c707 a 1029 1409 -c711 6 1031 1409 -c717 18 1037 1409 -c72f 7 1039 1409 -c736 8 1053 1409 -c73e 14 1054 1409 -c752 18 1055 1409 -c76a 2 1039 1409 -c76c a 1044 1409 -c776 d 1046 1409 -c783 b 1047 1409 -c78e 9 1058 1409 -c797 26 1066 1409 -c7bd 2 1069 1409 -c7bf 10 1071 1409 -c7cf 22 1072 1409 -c7f1 2 1081 1409 -c7f3 4 1082 1409 -c7f7 5 1083 1409 -c7fc 9 1085 1409 -c805 6 1088 1409 -c80b 9 1089 1409 -c814 12 1091 1409 -c826 6 1094 1409 -c82c e 1095 1409 -c83a f 1096 1409 -c849 9 1097 1409 -c852 5 1099 1409 -c857 24 1106 1409 -c87b 7 1109 1409 -c882 8 1110 1409 -c88a 6 1111 1409 -c890 18 1116 1409 -c8a8 3 1118 1409 -c8ab 11 1119 1409 -FUNC c8bc 1ce 4 _setlocale_nolock -c8bc 1a 873 1409 -c8d6 7 877 1409 -c8dd 5 904 1409 -c8e2 17 880 1409 -c8f9 5 882 1409 -c8fe 12 888 1409 -c910 1d 890 1409 -c92d 2 894 1409 -c92f d 898 1409 -c93c 1e 900 1409 -c95a 11 904 1409 -c96b 1d 907 1409 -c988 e 904 1409 -c996 1b 913 1409 -c9b1 6 916 1409 -c9b7 24 918 1409 -c9db 18 922 1409 -c9f3 3 923 1409 -c9f6 7 925 1409 -c9fd 1 926 1409 -c9fe 9 928 1409 -ca07 c 930 1409 -ca13 4 901 1409 -ca17 19 935 1409 -ca30 3 937 1409 -ca33 4 939 1409 -ca37 11 941 1409 -ca48 c 943 1409 -ca54 2 947 1409 -ca56 3 949 1409 -ca59 2 952 1409 -ca5b 3 953 1409 -ca5e 9 937 1409 -ca67 5 956 1409 -ca6c 2 961 1409 -ca6e 3 962 1409 -ca71 2 965 1409 -ca73 5 966 1409 -ca78 12 972 1409 -FUNC ca8a f3 8 _create_locale -ca8a 0 605 1409 -ca8a 10 609 1409 -ca9a 13 612 1409 -caad b 614 1409 -cab8 4 610 1409 -cabc c 658 1409 -cac8 8 617 1409 -cad0 7 619 1409 -cad7 2 621 1409 -cad9 14 623 1409 -caed 7 625 1409 -caf4 7 626 1409 -cafb 2 628 1409 -cafd c 630 1409 -cb09 14 632 1409 -cb1d 7 634 1409 -cb24 7 635 1409 -cb2b 9 637 1409 -cb34 2 640 1409 -cb36 13 642 1409 -cb49 8 644 1409 -cb51 7 645 1409 -cb58 7 646 1409 -cb5f 9 647 1409 -cb68 2 648 1409 -cb6a 2 650 1409 -cb6c 5 652 1409 -cb71 5 653 1409 -cb76 7 657 1409 -FUNC cb7d 5 8 __create_locale -cb7d 0 665 1409 -cb7d 5 666 1409 -FUNC cb82 170 8 setlocale -cb82 c 791 1409 -cb8e 5 792 1409 -cb93 25 797 1409 -cbb8 a 799 1409 -cbc2 5 801 1409 -cbc7 4 806 1409 -cbcb 3 807 1409 -cbce 1b 808 1409 -cbe9 8 818 1409 -cbf1 7 819 1409 -cbf8 a 820 1409 -cc02 8 822 1409 -cc0a 19 826 1409 -cc23 18 834 1409 -cc3b a 836 1409 -cc45 8 839 1409 -cc4d 7 840 1409 -cc54 a 841 1409 -cc5e 7 842 1409 -cc65 f 846 1409 -cc74 c 847 1409 -cc80 18 849 1409 -cc98 5 850 1409 -cc9d b 852 1409 -cca8 8 822 1409 -ccb0 9 823 1409 -ccb9 3 852 1409 -ccbc 9 853 1409 -ccc5 2 855 1409 -ccc7 6 856 1409 -cccd 8 857 1409 -ccd5 c 860 1409 -cce1 3 865 1409 -cce4 6 866 1409 -ccea 3 860 1409 -cced 5 862 1409 -FUNC ccf2 f 0 __security_check_cookie -ccf2 0 52 2811 -ccf2 6 55 2811 -ccf8 2 56 2811 -ccfa 2 57 2811 -ccfc 5 59 2811 -FUNC cd04 90 0 _local_unwind4 -FUNC cd94 46 0 _unwind_handler4 -FUNC cdda 1c 4 _seh_longjmp_unwind4 -FUNC cdf6 17 0 _EH4_CallFilterFunc -FUNC ce0d 19 0 _EH4_TransferToHandler -FUNC ce26 1a 0 _EH4_GlobalUnwind -FUNC ce40 17 8 _EH4_LocalUnwind -FUNC ce57 8 4 _crt_debugger_hook -ce57 0 62 2380 -ce57 7 65 2380 -ce5e 1 66 2380 -FUNC ce60 7a c memset -ce60 0 59 601 -ce60 4 68 601 -ce64 4 69 601 -ce68 2 71 601 -ce6a 2 72 601 -ce6c 2 74 601 -ce6e 4 75 601 -ce72 2 78 601 -ce74 2 79 601 -ce76 6 80 601 -ce7c 2 81 601 -ce7e 7 82 601 -ce85 2 83 601 -ce87 5 85 601 -ce8c 1 91 601 -ce8d 2 92 601 -ce8f 3 94 601 -ce92 2 95 601 -ce94 2 97 601 -ce96 3 98 601 -ce99 2 99 601 -ce9b 2 101 601 -ce9d 2 103 601 -ce9f 3 104 601 -cea2 3 105 601 -cea5 2 106 601 -cea7 2 110 601 -cea9 3 111 601 -ceac 2 113 601 -ceae 2 115 601 -ceb0 3 117 601 -ceb3 2 119 601 -ceb5 2 122 601 -ceb7 3 123 601 -ceba 3 124 601 -cebd 2 125 601 -cebf 2 127 601 -cec1 2 129 601 -cec3 2 130 601 -cec5 2 134 601 -cec7 3 135 601 -ceca 3 137 601 -cecd 2 138 601 -cecf 4 142 601 -ced3 1 143 601 -ced4 1 145 601 -ced5 4 148 601 -ced9 1 150 601 -FUNC ceda 2a 0 _purecall -ceda 0 43 1533 -ceda b 44 1533 -cee5 5 45 1533 -ceea 2 47 1533 -ceec 7 54 1533 -cef3 c 56 1533 -ceff 5 57 1533 -FUNC cf04 22 4 _set_purecall_handler -cf04 1 82 1533 -cf05 b 85 1533 -cf10 12 86 1533 -cf22 3 88 1533 -cf25 1 89 1533 -FUNC cf26 d 0 _get_purecall_handler -cf26 0 92 1533 -cf26 c 93 1533 -cf32 1 94 1533 -FUNC cf40 95 0 _aulldvrm -cf40 0 45 3161 -cf40 1 47 3161 -cf41 4 79 3161 -cf45 2 80 3161 -cf47 2 81 3161 -cf49 4 82 3161 -cf4d 4 83 3161 -cf51 2 84 3161 -cf53 2 85 3161 -cf55 2 86 3161 -cf57 4 87 3161 -cf5b 2 88 3161 -cf5d 2 89 3161 -cf5f 2 94 3161 -cf61 4 95 3161 -cf65 2 96 3161 -cf67 2 97 3161 -cf69 4 98 3161 -cf6d 2 99 3161 -cf6f 2 100 3161 -cf71 2 107 3161 -cf73 4 108 3161 -cf77 4 109 3161 -cf7b 4 110 3161 -cf7f 2 112 3161 -cf81 2 113 3161 -cf83 2 114 3161 -cf85 2 115 3161 -cf87 2 116 3161 -cf89 2 117 3161 -cf8b 2 118 3161 -cf8d 2 119 3161 -cf8f 4 128 3161 -cf93 2 129 3161 -cf95 4 130 3161 -cf99 2 131 3161 -cf9b 2 132 3161 -cf9d 2 133 3161 -cf9f 4 141 3161 -cfa3 2 142 3161 -cfa5 2 143 3161 -cfa7 4 144 3161 -cfab 2 145 3161 -cfad 1 147 3161 -cfae 4 148 3161 -cfb2 4 149 3161 -cfb6 2 151 3161 -cfb8 4 160 3161 -cfbc 4 161 3161 -cfc0 2 162 3161 -cfc2 2 163 3161 -cfc4 3 164 3161 -cfc7 2 169 3161 -cfc9 2 170 3161 -cfcb 2 171 3161 -cfcd 2 172 3161 -cfcf 2 173 3161 -cfd1 1 179 3161 -cfd2 3 181 3161 -FUNC cfe0 34 0 _allmul -cfe0 0 47 3164 -cfe0 4 62 3164 -cfe4 4 63 3164 -cfe8 2 64 3164 -cfea 4 65 3164 -cfee 2 66 3164 -cff0 4 68 3164 -cff4 2 69 3164 -cff6 3 71 3164 -cff9 1 74 3164 -cffa 2 81 3164 -cffc 2 82 3164 -cffe 4 84 3164 -d002 4 85 3164 -d006 2 86 3164 -d008 4 88 3164 -d00c 2 89 3164 -d00e 2 90 3164 -d010 1 92 3164 -d011 3 94 3164 -FUNC d014 11 4 atol -d014 0 55 4301 -d014 10 56 4301 -d024 1 57 4301 -FUNC d025 15 8 _atol_l -d025 0 64 4301 -d025 14 65 4301 -d039 1 66 4301 -FUNC d03a 5 4 atoi -d03a 0 99 4301 -d03a 5 100 4301 -FUNC d03f 5 8 _atoi_l -d03f 0 107 4301 -d03f 5 108 4301 -FUNC d044 11 4 _atoi64 -d044 0 143 4301 -d044 10 144 4301 -d054 1 145 4301 -FUNC d055 15 8 _atoi64_l -d055 0 151 4301 -d055 14 152 4301 -d069 1 153 4301 -FUNC d070 365 c memmove -d070 3 101 604 -d073 1 113 604 -d074 1 114 604 -d075 3 116 604 -d078 3 117 604 -d07b 3 119 604 -d07e 2 129 604 -d080 2 131 604 -d082 2 132 604 -d084 2 134 604 -d086 2 135 604 -d088 2 137 604 -d08a 6 138 604 -d090 6 147 604 -d096 2 148 604 -d098 7 150 604 -d09f 2 151 604 -d0a1 1 153 604 -d0a2 1 154 604 -d0a3 3 155 604 -d0a6 3 156 604 -d0a9 2 157 604 -d0ab 1 158 604 -d0ac 1 159 604 -d0ad 2 160 604 -d0af 1 163 604 -d0b0 1 164 604 -d0b1 1 165 604 -d0b2 5 166 604 -d0b7 6 179 604 -d0bd 2 180 604 -d0bf 3 182 604 -d0c2 3 183 604 -d0c5 3 185 604 -d0c8 2 186 604 -d0ca 2 188 604 -d0cc 8 190 604 -d0d4 2 208 604 -d0d6 5 209 604 -d0db 3 211 604 -d0de 2 212 604 -d0e0 3 214 604 -d0e3 2 215 604 -d0e5 7 217 604 -d0ec 8 221 604 -d0f4 14 225 604 -d108 2 232 604 -d10a 2 233 604 -d10c 2 235 604 -d10e 3 236 604 -d111 3 238 604 -d114 3 239 604 -d117 3 241 604 -d11a 3 242 604 -d11d 3 244 604 -d120 3 245 604 -d123 3 247 604 -d126 2 248 604 -d128 2 250 604 -d12a a 252 604 -d134 2 256 604 -d136 2 257 604 -d138 2 259 604 -d13a 3 260 604 -d13d 3 262 604 -d140 3 263 604 -d143 3 265 604 -d146 3 266 604 -d149 3 268 604 -d14c 2 269 604 -d14e 2 271 604 -d150 8 273 604 -d158 2 277 604 -d15a 2 278 604 -d15c 2 280 604 -d15e 3 281 604 -d161 3 283 604 -d164 3 284 604 -d167 3 286 604 -d16a 2 287 604 -d16c 2 289 604 -d16e 2a 291 604 -d198 4 298 604 -d19c 4 300 604 -d1a0 4 302 604 -d1a4 4 304 604 -d1a8 4 306 604 -d1ac 4 308 604 -d1b0 4 310 604 -d1b4 4 312 604 -d1b8 4 314 604 -d1bc 4 316 604 -d1c0 4 318 604 -d1c4 4 320 604 -d1c8 4 322 604 -d1cc 4 324 604 -d1d0 7 326 604 -d1d7 2 328 604 -d1d9 2 329 604 -d1db 19 331 604 -d1f4 3 340 604 -d1f7 1 341 604 -d1f8 1 342 604 -d1f9 3 344 604 -d1fc 2 348 604 -d1fe 2 350 604 -d200 3 351 604 -d203 1 352 604 -d204 1 353 604 -d205 3 354 604 -d208 2 358 604 -d20a 2 360 604 -d20c 3 361 604 -d20f 3 362 604 -d212 3 363 604 -d215 1 364 604 -d216 1 365 604 -d217 5 366 604 -d21c 2 370 604 -d21e 2 372 604 -d220 3 373 604 -d223 3 374 604 -d226 3 375 604 -d229 3 376 604 -d22c 3 377 604 -d22f 1 378 604 -d230 1 379 604 -d231 3 380 604 -d234 4 391 604 -d238 4 392 604 -d23c 6 397 604 -d242 2 398 604 -d244 3 400 604 -d247 3 401 604 -d24a 3 403 604 -d24d 2 404 604 -d24f 1 406 604 -d250 2 407 604 -d252 1 408 604 -d253 9 410 604 -d25c 2 414 604 -d25e a 417 604 -d268 2 422 604 -d26a 5 423 604 -d26f 3 425 604 -d272 2 426 604 -d274 3 428 604 -d277 2 429 604 -d279 7 431 604 -d280 14 435 604 -d294 3 442 604 -d297 2 443 604 -d299 3 445 604 -d29c 3 446 604 -d29f 3 448 604 -d2a2 3 449 604 -d2a5 3 451 604 -d2a8 2 452 604 -d2aa 1 454 604 -d2ab 2 455 604 -d2ad 1 456 604 -d2ae a 458 604 -d2b8 3 462 604 -d2bb 2 463 604 -d2bd 3 465 604 -d2c0 3 466 604 -d2c3 3 468 604 -d2c6 3 469 604 -d2c9 3 471 604 -d2cc 3 472 604 -d2cf 3 474 604 -d2d2 2 475 604 -d2d4 1 477 604 -d2d5 2 478 604 -d2d7 1 479 604 -d2d8 8 481 604 -d2e0 3 485 604 -d2e3 2 486 604 -d2e5 3 488 604 -d2e8 3 489 604 -d2eb 3 491 604 -d2ee 3 492 604 -d2f1 3 494 604 -d2f4 3 495 604 -d2f7 3 497 604 -d2fa 3 498 604 -d2fd 3 500 604 -d300 6 501 604 -d306 1 503 604 -d307 2 504 604 -d309 1 505 604 -d30a 2a 507 604 -d334 4 516 604 -d338 4 518 604 -d33c 4 520 604 -d340 4 522 604 -d344 4 524 604 -d348 4 526 604 -d34c 4 528 604 -d350 4 530 604 -d354 4 532 604 -d358 4 534 604 -d35c 4 536 604 -d360 4 538 604 -d364 4 540 604 -d368 4 542 604 -d36c 7 544 604 -d373 2 546 604 -d375 2 547 604 -d377 19 549 604 -d390 3 558 604 -d393 1 560 604 -d394 1 561 604 -d395 3 562 604 -d398 3 566 604 -d39b 3 568 604 -d39e 3 569 604 -d3a1 1 570 604 -d3a2 1 571 604 -d3a3 5 572 604 -d3a8 3 576 604 -d3ab 3 578 604 -d3ae 3 579 604 -d3b1 3 580 604 -d3b4 3 581 604 -d3b7 1 582 604 -d3b8 1 583 604 -d3b9 3 584 604 -d3bc 3 588 604 -d3bf 3 590 604 -d3c2 3 591 604 -d3c5 3 592 604 -d3c8 3 593 604 -d3cb 3 594 604 -d3ce 3 595 604 -d3d1 1 596 604 -d3d2 1 597 604 -d3d3 2 598 604 -FUNC d3d5 f3 0 abort -d3d5 1b 53 2533 -d3f0 a 56 2533 -d3fa 8 59 2533 -d402 5 68 2533 -d407 4 69 2533 -d40b 8 71 2533 -d413 d 78 2533 -d420 6 87 2533 -d426 6 88 2533 -d42c 6 89 2533 -d432 3 90 2533 -d435 3 91 2533 -d438 3 92 2533 -d43b 7 93 2533 -d442 7 94 2533 -d449 4 95 2533 -d44d 4 96 2533 -d451 4 97 2533 -d455 4 98 2533 -d459 1 99 2533 -d45a 6 100 2533 -d460 6 106 2533 -d466 19 107 2533 -d47f 3 109 2533 -d482 13 117 2533 -d495 9 122 2533 -d49e 3 123 2533 -d4a1 15 126 2533 -d4b6 a 128 2533 -d4c0 8 137 2533 -FUNC d4c8 1e 8 _set_abort_behavior -d4c8 0 158 2533 -d4c8 1d 160 2533 -d4e5 1 162 2533 -FUNC d4e6 a3 4 _msize -d4e6 c 43 3413 -d4f2 2d 47 3413 -d51f 9 51 3413 -d528 8 55 3413 -d530 3 56 3413 -d533 e 57 3413 -d541 e 59 3413 -d54f c 61 3413 -d55b 5 64 3413 -d560 10 88 3413 -d570 2 91 3413 -d572 6 93 3413 -d578 8 61 3413 -d580 9 62 3413 -FUNC d589 9 0 _fptrap -d589 0 46 917 -d589 8 47 917 -d591 1 48 917 -FUNC d592 54 8 _isalpha_l -d592 6 57 4214 -d598 b 58 4214 -d5a3 41 60 4214 -d5e4 2 61 4214 -FUNC d5e6 2b 4 isalpha -d5e6 0 66 4214 -d5e6 9 67 4214 -d5ef 13 69 4214 -d602 1 75 4214 -d603 d 73 4214 -d610 1 75 4214 -FUNC d611 4f 8 _isupper_l -d611 6 81 4214 -d617 b 82 4214 -d622 3c 84 4214 -d65e 2 85 4214 -FUNC d660 29 4 isupper -d660 0 90 4214 -d660 9 91 4214 -d669 11 93 4214 -d67a 1 99 4214 -d67b d 97 4214 -d688 1 99 4214 -FUNC d689 4f 8 _islower_l -d689 6 105 4214 -d68f b 106 4214 -d69a 3c 108 4214 -d6d6 2 109 4214 -FUNC d6d8 29 4 islower -d6d8 0 114 4214 -d6d8 9 115 4214 -d6e1 11 117 4214 -d6f2 1 123 4214 -d6f3 d 121 4214 -d700 1 123 4214 -FUNC d701 4f 8 _isdigit_l -d701 6 129 4214 -d707 b 130 4214 -d712 3c 132 4214 -d74e 2 133 4214 -FUNC d750 29 4 isdigit -d750 0 138 4214 -d750 9 139 4214 -d759 11 141 4214 -d76a 1 147 4214 -d76b d 145 4214 -d778 1 147 4214 -FUNC d779 54 8 _isxdigit_l -d779 6 153 4214 -d77f b 154 4214 -d78a 41 156 4214 -d7cb 2 157 4214 -FUNC d7cd 2b 4 isxdigit -d7cd 0 162 4214 -d7cd 9 163 4214 -d7d6 13 165 4214 -d7e9 1 171 4214 -d7ea d 169 4214 -d7f7 1 171 4214 -FUNC d7f8 4f 8 _isspace_l -d7f8 6 177 4214 -d7fe b 178 4214 -d809 3c 180 4214 -d845 2 181 4214 -FUNC d847 29 4 isspace -d847 0 186 4214 -d847 9 187 4214 -d850 11 189 4214 -d861 1 195 4214 -d862 d 193 4214 -d86f 1 195 4214 -FUNC d870 4f 8 _ispunct_l -d870 6 201 4214 -d876 b 202 4214 -d881 3c 204 4214 -d8bd 2 205 4214 -FUNC d8bf 29 4 ispunct -d8bf 0 210 4214 -d8bf 9 211 4214 -d8c8 11 213 4214 -d8d9 1 219 4214 -d8da d 217 4214 -d8e7 1 219 4214 -FUNC d8e8 54 8 _isalnum_l -d8e8 6 225 4214 -d8ee b 226 4214 -d8f9 41 228 4214 -d93a 2 229 4214 -FUNC d93c 2b 4 isalnum -d93c 0 234 4214 -d93c 9 235 4214 -d945 13 237 4214 -d958 1 243 4214 -d959 d 241 4214 -d966 1 243 4214 -FUNC d967 54 8 _isprint_l -d967 6 249 4214 -d96d b 250 4214 -d978 41 252 4214 -d9b9 2 253 4214 -FUNC d9bb 2b 4 isprint -d9bb 0 258 4214 -d9bb 9 259 4214 -d9c4 13 261 4214 -d9d7 1 267 4214 -d9d8 d 265 4214 -d9e5 1 267 4214 -FUNC d9e6 54 8 _isgraph_l -d9e6 6 273 4214 -d9ec b 274 4214 -d9f7 41 276 4214 -da38 2 277 4214 -FUNC da3a 2b 4 isgraph -da3a 0 282 4214 -da3a 9 283 4214 -da43 13 285 4214 -da56 1 291 4214 -da57 d 289 4214 -da64 1 291 4214 -FUNC da65 4f 8 _iscntrl_l -da65 6 297 4214 -da6b b 298 4214 -da76 3c 300 4214 -dab2 2 301 4214 -FUNC dab4 29 4 iscntrl -dab4 0 306 4214 -dab4 9 307 4214 -dabd 11 309 4214 -dace 1 315 4214 -dacf d 313 4214 -dadc 1 315 4214 -FUNC dadd d 4 __isascii -dadd 0 320 4214 -dadd c 321 4214 -dae9 1 322 4214 -FUNC daea 8 4 __toascii -daea 0 327 4214 -daea 7 328 4214 -daf1 1 329 4214 -FUNC daf2 1f 8 _iscsymf_l -daf2 0 335 4214 -daf2 1a 336 4214 -db0c 1 337 4214 -db0d 3 336 4214 -db10 1 337 4214 -FUNC db11 1a 4 __iscsymf -db11 0 341 4214 -db11 15 342 4214 -db26 1 343 4214 -db27 3 342 4214 -db2a 1 343 4214 -FUNC db2b 1f 8 _iscsym_l -db2b 0 349 4214 -db2b 1a 350 4214 -db45 1 351 4214 -db46 3 350 4214 -db49 1 351 4214 -FUNC db4a 1c 4 __iscsym -db4a 0 356 4214 -db4a 17 357 4214 -db61 1 358 4214 -db62 3 357 4214 -db65 1 358 4214 -FUNC db66 12 8 _MarkAllocaS -db66 0 207 1309 -db66 8 208 1309 -db6e 6 210 1309 -db74 3 211 1309 -db77 1 214 1309 -FUNC db78 1b 4 _freea -db78 0 249 1309 -db78 8 251 1309 -db80 3 253 1309 -db83 8 255 1309 -db8b 7 257 1309 -db92 1 266 1309 -FUNC db93 13b 18 __crtGetLocaleInfoW_stat -db93 f 60 1290 -dba2 14 68 1290 -dbb6 d 70 1290 -dbc3 8 71 1290 -dbcb b 73 1290 -dbd6 f 74 1290 -dbe5 5 79 1290 -dbea 13 81 1290 -dbfd 7 86 1290 -dc04 2 140 1290 -dc06 8 96 1290 -dc0e b 97 1290 -dc19 16 100 1290 -dc2f 7 101 1290 -dc36 48 104 1290 -dc7e 2 105 1290 -dc80 2 106 1290 -dc82 e 110 1290 -dc90 7 113 1290 -dc97 2 121 1290 -dc99 2 123 1290 -dc9b 17 130 1290 -dcb2 6 134 1290 -dcb8 4 136 1290 -dcbc 12 141 1290 -FUNC dcce 3b 18 __crtGetLocaleInfoW -dcce 6 151 1290 -dcd4 b 152 1290 -dcdf 28 161 1290 -dd07 2 162 1290 -FUNC dd09 13d 18 __crtGetLocaleInfoA_stat -dd09 f 60 2665 -dd18 17 68 2665 -dd2f a 70 2665 -dd39 8 71 2665 -dd41 b 73 2665 -dd4c f 74 2665 -dd5b 11 79 2665 -dd6c 4 86 2665 -dd70 5 96 2665 -dd75 b 97 2665 -dd80 13 100 2665 -dd93 7 101 2665 -dd9a 49 104 2665 -dde3 2 105 2665 -dde5 2 106 2665 -dde7 10 110 2665 -ddf7 3 114 2665 -ddfa 6 124 2665 -de00 2 126 2665 -de02 15 135 2665 -de17 7 139 2665 -de1e 4 141 2665 -de22 12 81 2665 -de34 12 145 2665 -FUNC de46 3b 18 __crtGetLocaleInfoA -de46 6 155 2665 -de4c b 156 2665 -de57 28 165 2665 -de7f 2 166 2665 -FUNC de81 11e c _calloc_impl -de81 c 23 3622 -de8d 9 28 3622 -de96 2e 30 3622 -dec4 9 32 3622 -decd 4 36 3622 -ded1 3 37 3622 -ded4 5 41 3622 -ded9 5 43 3622 -dede 9 46 3622 -dee7 9 50 3622 -def0 b 52 3622 -defb 8 56 3622 -df03 3 57 3622 -df06 c 58 3622 -df12 c 60 3622 -df1e 7 64 3622 -df25 d 65 3622 -df32 4 93 3622 -df36 11 94 3622 -df47 c 97 3622 -df53 f 109 3622 -df62 b 111 3622 -df6d 6 112 3622 -df73 5 113 3622 -df78 5 60 3622 -df7d 9 61 3622 -df86 4 100 3622 -df8a 7 102 3622 -df91 6 103 3622 -df97 2 105 3622 -df99 6 119 3622 -FUNC df9f 3f 8 calloc -df9f 4 145 3622 -dfa3 5 146 3622 -dfa8 14 147 3622 -dfbc 15 149 3622 -dfd1 8 151 3622 -dfd9 3 153 3622 -dfdc 2 154 3622 -FUNC dfde 21b 8 realloc -dfde c 64 3368 -dfea 7 69 3368 -dff1 e 70 3368 -dfff 7 73 3368 -e006 7 75 3368 -e00d 5 76 3368 -e012 d 81 3368 -e01f 5 88 3368 -e024 9 89 3368 -e02d 8 91 3368 -e035 3 92 3368 -e038 12 96 3368 -e04a 8 100 3368 -e052 f 102 3368 -e061 5 103 3368 -e066 e 104 3368 -e074 4 107 3368 -e078 10 108 3368 -e088 9 110 3368 -e091 a 111 3368 -e09b 5 118 3368 -e0a0 4 120 3368 -e0a4 6 121 3368 -e0aa 9 123 3368 -e0b3 15 124 3368 -e0c8 4 127 3368 -e0cc 10 128 3368 -e0dc c 129 3368 -e0e8 c 135 3368 -e0f4 6 142 3368 -e0fa 4 144 3368 -e0fe 1 145 3368 -e0ff 9 147 3368 -e108 14 148 3368 -e11c 6 135 3368 -e122 9 137 3368 -e12b 3 148 3368 -e12e 10 158 3368 -e13e f 181 3368 -e14d 5 186 3368 -e152 5 183 3368 -e157 11 186 3368 -e168 2 188 3368 -e16a 8 160 3368 -e172 5 170 3368 -e177 3 167 3368 -e17a 2 172 3368 -e17c 6 174 3368 -e182 2 155 3368 -e184 4 321 3368 -e188 1 322 3368 -e189 12 323 3368 -e19b c 332 3368 -e1a7 b 347 3368 -e1b2 5 319 3368 -e1b7 7 327 3368 -e1be b 328 3368 -e1c9 2 329 3368 -e1cb 6 356 3368 -e1d1 5 349 3368 -e1d6 5 350 3368 -e1db 4 334 3368 -e1df 16 341 3368 -e1f5 4 343 3368 -FUNC e1f9 79 c _recalloc -e1f9 3 744 3368 -e1fc a 749 3368 -e206 28 751 3368 -e22e 4 753 3368 -e232 9 754 3368 -e23b b 755 3368 -e246 b 756 3368 -e251 a 757 3368 -e25b 10 759 3368 -e26b 5 761 3368 -e270 2 762 3368 -FUNC e272 1a 4 strncnt -e272 0 48 2617 -e272 6 49 2617 -e278 6 52 2617 -e27e 1 53 2617 -e27f 5 52 2617 -e284 7 55 2617 -e28b 1 56 2617 -FUNC e28c 3a2 20 __crtLCMapStringA_stat -e28c 12 99 2617 -e29e d 108 2617 -e2ab 1b 109 2617 -e2c6 8 110 2617 -e2ce b 111 2617 -e2d9 a 112 2617 -e2e3 5 119 2617 -e2e8 19 120 2617 -e301 5 124 2617 -e306 1 125 2617 -e307 3 127 2617 -e30a 16 133 2617 -e320 9 213 2617 -e329 8 235 2617 -e331 8 236 2617 -e339 27 247 2617 -e360 6 248 2617 -e366 48 251 2617 -e3ae 3 252 2617 -e3b1 6 253 2617 -e3b7 19 262 2617 -e3d0 21 271 2617 -e3f1 8 274 2617 -e3f9 9 277 2617 -e402 9 279 2617 -e40b 12 288 2617 -e41d 5 292 2617 -e422 4b 298 2617 -e46d 4 299 2617 -e471 18 309 2617 -e489 3 312 2617 -e48c 6 322 2617 -e492 2 325 2617 -e494 17 335 2617 -e4ab 7 342 2617 -e4b2 8 344 2617 -e4ba 9 346 2617 -e4c3 b 141 2617 -e4ce 8 142 2617 -e4d6 5 143 2617 -e4db 8 144 2617 -e4e3 11 146 2617 -e4f4 7 147 2617 -e4fb 9 153 2617 -e504 15 155 2617 -e519 5 156 2617 -e51e 2 157 2617 -e520 1b 164 2617 -e53b 7 166 2617 -e542 41 169 2617 -e583 2 170 2617 -e585 28 196 2617 -e5ad 2 183 2617 -e5af 2 184 2617 -e5b1 25 190 2617 -e5d6 7 198 2617 -e5dd 2 199 2617 -e5df 1a 202 2617 -e5f9 5 204 2617 -e5fe 9 205 2617 -e607 c 206 2617 -e613 7 207 2617 -e61a 2 208 2617 -e61c 12 350 2617 -FUNC e62e 43 24 __crtLCMapStringA -e62e 6 363 2617 -e634 b 364 2617 -e63f 30 376 2617 -e66f 2 377 2617 -FUNC e671 1b8 1c __crtGetStringTypeA_stat -e671 f 66 2569 -e680 10 75 2569 -e690 18 79 2569 -e6a8 8 80 2569 -e6b0 b 82 2569 -e6bb f 83 2569 -e6ca 11 88 2569 -e6db 9 120 2569 -e6e4 8 141 2569 -e6ec 8 142 2569 -e6f4 27 153 2569 -e71b 6 154 2569 -e721 3e 157 2569 -e75f 2 158 2569 -e761 2 159 2569 -e763 f 161 2569 -e772 13 169 2569 -e785 11 174 2569 -e796 6 176 2569 -e79c 6 178 2569 -e7a2 2 90 2569 -e7a4 5 94 2569 -e7a9 8 95 2569 -e7b1 5 96 2569 -e7b6 8 97 2569 -e7be e 99 2569 -e7cc 4 100 2569 -e7d0 5 104 2569 -e7d5 17 106 2569 -e7ec 2 107 2569 -e7ee 2 108 2569 -e7f0 3 109 2569 -e7f3 15 112 2569 -e808 6 113 2569 -e80e 7 114 2569 -e815 2 115 2569 -e817 12 182 2569 -FUNC e829 40 20 __crtGetStringTypeA -e829 6 194 2569 -e82f b 195 2569 -e83a 2d 206 2569 -e867 2 207 2569 -FUNC e869 87 c fastcopy_I -FUNC e8f0 e3 c _VEC_memcpy -FUNC e9d3 14 0 _sse2_mathfcns_init -FUNC e9e7 14 4 _set_SSE2_enable -FUNC e9fb 6 0 __pwctype_func -e9fb 0 24 2400 -e9fb 5 25 2400 -ea00 1 26 2400 -FUNC ea01 29 0 __pctype_func -ea01 0 29 2400 -ea01 7 35 2400 -ea08 3 36 2400 -ea0b 18 38 2400 -ea23 6 39 2400 -ea29 1 40 2400 -FUNC ea2a 419 0 _get_lc_time -ea2a 6 94 1793 -ea30 12 104 1793 -ea42 3 105 1793 -ea45 2 170 1793 -ea47 9 108 1793 -ea50 16 112 1793 -ea66 15 113 1793 -ea7b 15 114 1793 -ea90 18 115 1793 -eaa8 15 116 1793 -eabd 13 117 1793 -ead0 14 118 1793 -eae4 18 120 1793 -eafc 15 121 1793 -eb11 15 122 1793 -eb26 15 123 1793 -eb3b 18 124 1793 -eb53 15 125 1793 -eb68 15 126 1793 -eb7d 15 128 1793 -eb92 18 129 1793 -ebaa 15 130 1793 -ebbf 15 131 1793 -ebd4 15 132 1793 -ebe9 18 133 1793 -ec01 15 134 1793 -ec16 15 135 1793 -ec2b 15 136 1793 -ec40 18 137 1793 -ec58 15 138 1793 -ec6d 15 139 1793 -ec82 15 141 1793 -ec97 18 142 1793 -ecaf 15 143 1793 -ecc4 15 144 1793 -ecd9 15 145 1793 -ecee 18 146 1793 -ed06 18 147 1793 -ed1e 18 148 1793 -ed36 18 149 1793 -ed4e 1b 150 1793 -ed69 18 151 1793 -ed81 18 152 1793 -ed99 18 154 1793 -edb1 1b 155 1793 -edcc 18 160 1793 -ede4 18 161 1793 -edfc 1b 163 1793 -ee17 20 165 1793 -ee37 a 169 1793 -ee41 2 170 1793 -FUNC ee43 190 4 __free_lc_time -ee43 1 179 1793 -ee44 c 180 1793 -ee50 8 183 1793 -ee58 8 184 1793 -ee60 8 185 1793 -ee68 8 186 1793 -ee70 8 187 1793 -ee78 8 188 1793 -ee80 7 189 1793 -ee87 8 191 1793 -ee8f 8 192 1793 -ee97 8 193 1793 -ee9f 8 194 1793 -eea7 8 195 1793 -eeaf 8 196 1793 -eeb7 8 197 1793 -eebf 8 199 1793 -eec7 b 200 1793 -eed2 8 201 1793 -eeda 8 202 1793 -eee2 8 203 1793 -eeea 8 204 1793 -eef2 8 205 1793 -eefa 8 206 1793 -ef02 8 207 1793 -ef0a 8 208 1793 -ef12 8 209 1793 -ef1a 8 210 1793 -ef22 8 212 1793 -ef2a 8 213 1793 -ef32 8 214 1793 -ef3a 8 215 1793 -ef42 8 216 1793 -ef4a b 217 1793 -ef55 b 218 1793 -ef60 b 219 1793 -ef6b b 220 1793 -ef76 b 221 1793 -ef81 b 222 1793 -ef8c b 223 1793 -ef97 b 225 1793 -efa2 b 226 1793 -efad b 228 1793 -efb8 b 229 1793 -efc3 f 230 1793 -efd2 1 232 1793 -FUNC efd3 73 4 __init_time -efd3 4 56 1793 -efd7 f 60 1793 -efe6 16 64 1793 -effc 4 65 1793 -f000 b 67 1793 -f00b 6 69 1793 -f011 8 70 1793 -f019 2 71 1793 -f01b 6 73 1793 -f021 2 74 1793 -f023 2 75 1793 -f025 18 78 1793 -f03d 2 82 1793 -f03f 6 83 1793 -f045 1 84 1793 -FUNC f046 33 0 fix_grouping -f046 0 32 1841 -f046 8 40 1841 -f04e a 43 1841 -f058 4 45 1841 -f05c 1 61 1841 -f05d 6 40 1841 -f063 1 63 1841 -f064 4 50 1841 -f068 2 52 1841 -f06a 7 55 1841 -f071 6 56 1841 -f077 2 60 1841 -FUNC f079 40 4 __free_lconv_num -f079 1 211 1841 -f07a 8 212 1841 -f082 a 215 1841 -f08c 7 216 1841 -f093 b 218 1841 -f09e 7 219 1841 -f0a5 b 221 1841 -f0b0 8 222 1841 -f0b8 1 223 1841 -FUNC f0b9 1c8 4 __init_numeric -f0b9 7 84 1841 -f0c0 4 92 1841 -f0c4 2 93 1841 -f0c6 11 96 1841 -f0d7 3 177 1841 -f0da 3 178 1841 -f0dd c 179 1841 -f0e9 14 102 1841 -f0fd 8 103 1841 -f105 9 108 1841 -f10e 13 113 1841 -f121 9 115 1841 -f12a 2 116 1841 -f12c 2 118 1841 -f12e 9 120 1841 -f137 12 125 1841 -f149 8 127 1841 -f151 a 128 1841 -f15b 7 129 1841 -f162 2 131 1841 -f164 19 140 1841 -f17d 15 142 1841 -f192 1b 144 1841 -f1ad 2 146 1841 -f1af c 148 1841 -f1bb 1e 154 1841 -f1d9 2 156 1841 -f1db 17 154 1841 -f1f2 b 164 1841 -f1fd 9 165 1841 -f206 c 166 1841 -f212 8 168 1841 -f21a 7 169 1841 -f221 2 170 1841 -f223 13 186 1841 -f236 11 191 1841 -f247 b 193 1841 -f252 d 194 1841 -f25f 9 197 1841 -f268 9 198 1841 -f271 9 200 1841 -f27a 5 201 1841 -f27f 2 202 1841 -FUNC f281 33 0 fix_grouping -f281 0 214 1884 -f281 8 222 1884 -f289 a 225 1884 -f293 4 227 1884 -f297 1 243 1884 -f298 6 222 1884 -f29e 1 245 1884 -f29f 4 232 1884 -f2a3 2 234 1884 -f2a5 7 237 1884 -f2ac 6 238 1884 -f2b2 2 242 1884 -FUNC f2b4 89 4 __free_lconv_mon -f2b4 1 255 1884 -f2b5 8 256 1884 -f2bd b 259 1884 -f2c8 7 260 1884 -f2cf b 262 1884 -f2da 7 263 1884 -f2e1 b 265 1884 -f2ec 7 266 1884 -f2f3 b 268 1884 -f2fe 7 269 1884 -f305 b 271 1884 -f310 7 272 1884 -f317 b 274 1884 -f322 7 275 1884 -f329 b 277 1884 -f334 8 278 1884 -f33c 1 279 1884 -FUNC f33d 2c4 4 __init_monetary -f33d 8 65 1884 -f345 6 73 1884 -f34b 13 77 1884 -f35e 3 187 1884 -f361 3 188 1884 -f364 a 189 1884 -f36e 11 83 1884 -f37f 8 84 1884 -f387 f 89 1884 -f396 7 91 1884 -f39d 2 92 1884 -f39f 2 94 1884 -f3a1 9 96 1884 -f3aa f 101 1884 -f3b9 6 103 1884 -f3bf 9 104 1884 -f3c8 2 105 1884 -f3ca 2 107 1884 -f3cc 4 112 1884 -f3d0 14 117 1884 -f3e4 14 119 1884 -f3f8 14 121 1884 -f40c 17 123 1884 -f423 14 125 1884 -f437 14 128 1884 -f44b 14 130 1884 -f45f 17 133 1884 -f476 14 135 1884 -f48a 14 137 1884 -f49e 14 139 1884 -f4b2 17 141 1884 -f4c9 14 143 1884 -f4dd 14 145 1884 -f4f1 17 147 1884 -f508 2 149 1884 -f50a 6 150 1884 -f510 6 151 1884 -f516 8 152 1884 -f51e b 153 1884 -f529 5 154 1884 -f52e 1c 157 1884 -f54a 2 159 1884 -f54c 17 157 1884 -f563 c 169 1884 -f56f 3 175 1884 -f572 32 181 1884 -f5a4 11 194 1884 -f5b5 15 199 1884 -f5ca b 201 1884 -f5d5 d 202 1884 -f5e2 9 204 1884 -f5eb 9 205 1884 -f5f4 6 206 1884 -f5fa 5 208 1884 -f5ff 2 209 1884 -FUNC f601 395 4 __init_ctype -f601 11 59 1976 -f612 6 60 1976 -f618 1f 82 1976 -f637 7 84 1976 -f63e 20 89 1976 -f65e 7 94 1976 -f665 10 98 1976 -f675 b 100 1976 -f680 b 102 1976 -f68b 12 104 1976 -f69d 2f 106 1976 -f6cc 5 109 1976 -f6d1 2 112 1976 -f6d3 e 113 1976 -f6e1 15 115 1976 -f6f6 a 118 1976 -f700 4 121 1976 -f704 8 124 1976 -f70c e 126 1976 -f71a 9 128 1976 -f723 b 129 1976 -f72e b 128 1976 -f739 2c 140 1976 -f765 33 155 1976 -f798 2d 166 1976 -f7c5 37 178 1976 -f7fc 11 180 1976 -f80d 17 182 1976 -f824 15 183 1976 -f839 d 180 1976 -f846 12 189 1976 -f858 f 190 1976 -f867 12 191 1976 -f879 18 195 1976 -f891 11 198 1976 -f8a2 13 199 1976 -f8b5 e 200 1976 -f8c3 e 201 1976 -f8d1 9 203 1976 -f8da 6 204 1976 -f8e0 9 206 1976 -f8e9 9 207 1976 -f8f2 9 208 1976 -f8fb 9 209 1976 -f904 9 210 1976 -f90d 9 213 1976 -f916 4 214 1976 -f91a 8 217 1976 -f922 8 218 1976 -f92a 8 219 1976 -f932 10 220 1976 -f942 13 227 1976 -f955 2 231 1976 -f957 6 232 1976 -f95d a 233 1976 -f967 a 234 1976 -f971 a 235 1976 -f97b a 236 1976 -f985 2 238 1976 -f987 f 240 1976 -FUNC f996 29 0 ___mb_cur_max_func -f996 0 248 1976 -f996 7 254 1976 -f99d 3 255 1976 -f9a0 18 257 1976 -f9b8 6 259 1976 -f9be 1 260 1976 -FUNC f9bf 16 4 ___mb_cur_max_l_func -f9bf 0 263 1976 -f9bf 15 264 1976 -f9d4 1 265 1976 -FUNC f9d5 26 0 ___lc_codepage_func -f9d5 0 268 1976 -f9d5 7 274 1976 -f9dc 3 275 1976 -f9df 18 277 1976 -f9f7 3 279 1976 -f9fa 1 280 1976 -FUNC f9fb 26 0 ___lc_collate_cp_func -f9fb 0 284 1976 -f9fb 7 290 1976 -fa02 3 291 1976 -fa05 18 293 1976 -fa1d 3 295 1976 -fa20 1 296 1976 -FUNC fa21 26 0 ___lc_handle_func -fa21 0 300 1976 -fa21 7 306 1976 -fa28 3 307 1976 -fa2b 18 309 1976 -fa43 3 311 1976 -fa46 1 312 1976 -FUNC fa47 3 4 __init_collate -fa47 0 41 2064 -fa47 2 42 2064 -fa49 1 43 2064 -FUNC fa4a fe 4 _Getdays_l -fa4a 9 111 190 -fa53 d 115 190 -fa60 9 117 190 -fa69 9 119 190 -fa72 28 120 190 -fa9a b 121 190 -faa5 c 123 190 -fab1 4 126 190 -fab5 30 128 190 -fae5 8 129 190 -faed 31 131 190 -fb1e 12 132 190 -fb30 3 134 190 -fb33 13 137 190 -fb46 2 138 190 -FUNC fb48 9 0 _Getdays -fb48 0 142 190 -fb48 8 143 190 -fb50 1 144 190 -FUNC fb51 fe 4 _Getmonths_l -fb51 9 150 190 -fb5a d 154 190 -fb67 16 156 190 -fb7d 2b 159 190 -fba8 b 160 190 -fbb3 8 162 190 -fbbb a 163 190 -fbc5 2d 167 190 -fbf2 8 168 190 -fbfa 2c 170 190 -fc26 11 171 190 -fc37 3 173 190 -fc3a 13 176 190 -fc4d 2 177 190 -FUNC fc4f 9 0 _Getmonths -fc4f 0 181 190 -fc4f 8 182 190 -fc57 1 183 190 -FUNC fc58 355 4 _Gettnames_l -fc58 9 189 190 -fc61 d 193 190 -fc6e 9 195 190 -fc77 9 197 190 -fc80 28 198 190 -fca8 d 199 190 -fcb5 29 200 190 -fcde 18 201 190 -fcf6 11 202 190 -fd07 f 203 190 -fd16 f 204 190 -fd25 7 205 190 -fd2c e 206 190 -fd3a 8 208 190 -fd42 12 212 190 -fd54 13 213 190 -fd67 6 214 190 -fd6d 2a 215 190 -fd97 6 216 190 -fd9d d 217 190 -fdaa 26 218 190 -fdd0 1c 219 190 -fdec 18 221 190 -fe04 6 222 190 -fe0a 26 223 190 -fe30 a 224 190 -fe3a 5 225 190 -fe3f 2a 226 190 -fe69 18 227 190 -fe81 30 230 190 -feb1 a 231 190 -febb 30 233 190 -feeb a 234 190 -fef5 30 236 190 -ff25 a 237 190 -ff2f 30 239 190 -ff5f a 240 190 -ff69 30 242 190 -ff99 12 245 190 -ffab 2 246 190 -FUNC ffad 9 0 _Gettnames -ffad 0 250 190 -ffad 8 251 190 -ffb5 1 252 190 -FUNC ffb6 20 0 _store_str -ffb6 0 869 190 -ffb6 f 871 190 -ffc5 7 872 190 -ffcc 9 873 190 -ffd5 1 875 190 -FUNC ffd6 36 0 _store_number -ffd6 0 965 190 -ffd6 8 973 190 -ffde c 976 190 -ffea 2 977 190 -ffec b 978 190 -fff7 2 981 190 -fff9 2 982 190 -fffb 1 983 190 -fffc 7 988 190 -10003 3 989 190 -10006 5 990 190 -1000b 1 991 190 -FUNC 1000c 79 4 _store_num -1000c 8 909 190 -10014 2 910 190 -10016 8 912 190 -1001e 33 913 190 -10051 2 914 190 -10053 4 917 190 -10057 8 918 190 -1005f b 919 190 -1006a c 921 190 -10076 5 923 190 -1007b 2 924 190 -1007d 2 926 190 -1007f 4 927 190 -10083 2 928 190 -FUNC 10085 3e6 10 _expandtime -10085 5 548 190 -1008a 4f 558 190 -100d9 16 659 190 -100ef 5 662 190 -100f4 16 587 190 -1010a 7 589 190 -10111 5 590 190 -10116 16 571 190 -1012c 7 573 190 -10133 5 574 190 -10138 5 822 190 -1013d 7 823 190 -10144 5 824 190 -10149 16 667 190 -1015f 10 668 190 -1016f 2 669 190 -10171 5 672 190 -10176 23 558 190 -10199 6 787 190 -1019f 5 789 190 -101a4 15 736 190 -101b9 2 737 190 -101bb 2 739 190 -101bd 5 740 190 -101c2 15 722 190 -101d7 2 723 190 -101d9 16 742 190 -101ef 4 743 190 -101f3 2 744 190 -101f5 5 745 190 -101fa 6 746 190 -10200 8 747 190 -10208 1 748 190 -10209 5 752 190 -1020e f 715 190 -1021d 5 718 190 -10222 3 696 190 -10225 2 699 190 -10227 1d 804 190 -10244 6 806 190 -1024a d 808 190 -10257 2 809 190 -10259 37 558 190 -10290 19 678 190 -102a9 8 680 190 -102b1 2 681 190 -102b3 15 650 190 -102c8 13 652 190 -102db 5 653 190 -102e0 1e 601 190 -102fe 2 603 190 -10300 5 606 190 -10305 2 607 190 -10307 2 608 190 -10309 25 615 190 -1032e 2 617 190 -10330 1 627 190 -10331 2 642 190 -10333 e 579 190 -10341 7 581 190 -10348 5 582 190 -1034d 2d 562 190 -1037a 6 564 190 -10380 5 565 190 -10385 e 687 190 -10393 3 689 190 -10396 5 690 190 -1039b 15 558 190 -103b0 2 834 190 -103b2 5 814 190 -103b7 19 817 190 -103d0 5 819 190 -103d5 d 795 190 -103e2 b 798 190 -103ed 5 799 190 -103f2 11 762 190 -10403 5 764 190 -10408 1 774 190 -10409 5 776 190 -1040e 16 729 190 -10424 6 731 190 -1042a 5 732 190 -1042f 16 704 190 -10445 3 705 190 -10448 b 706 190 -10453 2 707 190 -10455 e 708 190 -10463 6 839 190 -10469 2 840 190 -FUNC 1046b 45d 18 _store_winword -1046b 10 1035 190 -1047b 5 1043 190 -10480 a 1053 190 -1048a 3 1043 190 -1048d 6 1053 190 -10493 2 1054 190 -10495 6 1049 190 -1049b 2 1050 190 -1049d 6 1046 190 -104a3 10 1057 190 -104b3 4 1066 190 -104b7 8 1067 190 -104bf 6 1069 190 -104c5 d 1075 190 -104d2 a 1076 190 -104dc 8 1077 190 -104e4 4 1078 190 -104e8 2a 1085 190 -10512 b 1087 190 -1051d 31 1092 190 -1054e 7 1093 190 -10555 3 1097 190 -10558 13 1100 190 -1056b 10 1101 190 -1057b b 1102 190 -10586 b 1103 190 -10591 9 1106 190 -1059a 3 1291 190 -1059d 12 1292 190 -105af 11 1114 190 -105c0 5 1117 190 -105c5 b 1120 190 -105d0 37 1125 190 -10607 14 1274 190 -1061b c 1277 190 -10627 8 1283 190 -1062f 4 1284 190 -10633 9 1286 190 -1063c c 1287 190 -10648 5 1277 190 -1064d e 1128 190 -1065b 7 1133 190 -10662 7 1132 190 -10669 7 1130 190 -10670 2 1131 190 -10672 5 1134 190 -10677 a 1156 190 -10681 7 1158 190 -10688 2 1159 190 -1068a 5 1160 190 -1068f 11 1175 190 -106a0 5 1176 190 -106a5 11 1177 190 -106b6 6 1178 190 -106bc 2 1179 190 -106be 5 1180 190 -106c3 b 1225 190 -106ce 13 1226 190 -106e1 4 1228 190 -106e5 1a 1233 190 -106ff 9 1236 190 -10708 8 1242 190 -10710 4 1243 190 -10714 9 1246 190 -1071d 8 1247 190 -10725 5 1277 190 -1072a 1 1230 190 -1072b 5 1250 190 -10730 12 1136 190 -10742 7 1141 190 -10749 7 1140 190 -10750 7 1138 190 -10757 2 1139 190 -10759 5 1142 190 -1075e 29 1125 190 -10787 e 1144 190 -10795 7 1147 190 -1079c 2 1146 190 -1079e 5 1148 190 -107a3 7 1182 190 -107aa b 1183 190 -107b5 2 1184 190 -107b7 6 1185 190 -107bd 12 1187 190 -107cf 17 1188 190 -107e6 c 1191 190 -107f2 8 1197 190 -107fa 4 1198 190 -107fe 8 1201 190 -10806 2 1202 190 -10808 5 1203 190 -1080d 9 1204 190 -10816 1a 1205 190 -10830 9 1207 190 -10839 8 1212 190 -10841 4 1213 190 -10845 9 1215 190 -1084e 8 1216 190 -10856 2 1220 190 -10858 d 1168 190 -10865 7 1170 190 -1086c 2 1171 190 -1086e 2 1172 190 -10870 d 1162 190 -1087d 7 1164 190 -10884 2 1165 190 -10886 2 1166 190 -10888 d 1150 190 -10895 7 1152 190 -1089c 2 1153 190 -1089e 1b 1268 190 -108b9 3 1272 190 -108bc 5 1273 190 -108c1 7 1194 190 -FUNC 108c8 1af 18 _Strftime_l -108c8 6 356 190 -108ce 4 361 190 -108d2 13 362 190 -108e5 33 364 190 -10918 33 365 190 -1094b d 368 190 -10958 10 375 190 -10968 e 385 190 -10976 a 387 190 -10980 1e 435 190 -1099e 4 438 190 -109a2 a 446 190 -109ac 5 447 190 -109b1 b 452 190 -109bc 3 453 190 -109bf 2 454 190 -109c1 7 400 190 -109c8 1 405 190 -109c9 2 408 190 -109cb 5 409 190 -109d0 1 411 190 -109d1 1 412 190 -109d2 1d 415 190 -109ef 1 428 190 -109f0 5 385 190 -109f5 5 464 190 -109fa 5 469 190 -109ff 13 470 190 -10a12 3 441 190 -10a15 f 478 190 -10a24 b 481 190 -10a2f 2 483 190 -10a31 b 402 190 -10a3c 2 403 190 -10a3e 5 421 190 -10a43 7 423 190 -10a4a 2 464 190 -10a4c 18 485 190 -10a64 11 488 190 -10a75 2 490 190 -FUNC 10a77 1e 14 _strftime_l -10a77 3 291 190 -10a7a 19 292 190 -10a93 2 293 190 -FUNC 10a95 1d 10 strftime -10a95 0 300 190 -10a95 1c 301 190 -10ab1 1 302 190 -FUNC 10ab2 1e 14 _Strftime -10ab2 3 343 190 -10ab5 19 345 190 -10ace 2 346 190 -FUNC 10ad0 26 0 localeconv -10ad0 0 69 1716 -10ad0 5 75 1716 -10ad5 1b 78 1716 -10af0 5 79 1716 -10af5 1 80 1716 -FUNC 10b00 46 8 strcspn -10b00 4 191 591 -10b04 2 198 591 -10b06 1 199 591 -10b07 1 200 591 -10b08 1 201 591 -10b09 1 202 591 -10b0a 1 203 591 -10b0b 1 204 591 -10b0c 1 205 591 -10b0d 1 206 591 -10b0e 6 212 591 -10b14 2 216 591 -10b16 2 217 591 -10b18 2 218 591 -10b1a 3 219 591 -10b1d 4 220 591 -10b21 2 221 591 -10b23 3 227 591 -10b26 6 229 591 -10b2c 3 234 591 -10b2f 2 236 591 -10b31 2 237 591 -10b33 2 238 591 -10b35 3 239 591 -10b38 4 240 591 -10b3c 2 245 591 -10b3e 2 255 591 -10b40 3 257 591 -10b43 3 259 591 -FUNC 10b46 60 c TranslateName -10b46 3 340 2263 -10b49 3 342 2263 -10b4c 3 343 2263 -10b4f b 346 2263 -10b5a a 348 2263 -10b64 14 349 2263 -10b78 6 351 2263 -10b7e a 352 2263 -10b88 2 353 2263 -10b8a 4 354 2263 -10b8e 2 355 2263 -10b90 3 356 2263 -10b93 7 346 2263 -10b9a a 359 2263 -10ba4 2 360 2263 -FUNC 10ba6 14 0 GetLcidFromDefault -10ba6 0 761 2263 -10ba6 7 762 2263 -10bad c 763 2263 -10bb9 1 764 2263 -FUNC 10bba 77 0 ProcessCodePage -10bba 13 784 2263 -10bcd 1a 787 2263 -10be7 11 795 2263 -10bf8 8 799 2263 -10c00 2 801 2263 -10c02 18 791 2263 -10c1a 3 793 2263 -10c1d 7 805 2263 -10c24 d 806 2263 -FUNC 10c31 1e 4 TestDefaultCountry -10c31 0 826 2263 -10c31 2 830 2263 -10c33 15 832 2263 -10c48 3 835 2263 -10c4b 1 836 2263 -10c4c 2 833 2263 -10c4e 1 836 2263 -FUNC 10c4f 32 0 LcidFromHexString -10c4f 1 893 2263 -10c50 2 895 2263 -10c52 2 897 2263 -10c54 9 899 2263 -10c5d 5 900 2263 -10c62 8 901 2263 -10c6a 3 902 2263 -10c6d 10 903 2263 -10c7d 3 906 2263 -10c80 1 907 2263 -FUNC 10c81 1b 0 GetPrimaryLen -10c81 0 926 2263 -10c81 2 927 2263 -10c83 3 930 2263 -10c86 12 931 2263 -10c98 1 933 2263 -10c99 2 935 2263 -10c9b 1 938 2263 -FUNC 10c9c 96 4 CountryEnumProc -10c9c 15 717 2263 -10cb1 7 718 2263 -10cb8 f 719 2263 -10cc7 23 725 2263 -10cea 3 728 2263 -10ced 3 729 2263 -10cf0 12 731 2263 -10d02 b 734 2263 -10d0d a 738 2263 -10d17 b 741 2263 -10d22 10 742 2263 -FUNC 10d32 72 8 TestDefaultLanguage -10d32 11 858 2263 -10d43 22 864 2263 -10d65 4 865 2263 -10d69 d 867 2263 -10d76 1c 871 2263 -10d92 2 872 2263 -10d94 3 874 2263 -10d97 d 875 2263 -FUNC 10da4 1d0 4 LangCountryEnumProc -10da4 16 435 2263 -10dba 7 436 2263 -10dc1 d 437 2263 -10dce 27 444 2263 -10df5 4 447 2263 -10df9 8 448 2263 -10e01 16 450 2263 -10e17 1d 456 2263 -10e34 2 460 2263 -10e36 11 462 2263 -10e47 7 467 2263 -10e4e 5 468 2263 -10e53 6 472 2263 -10e59 1a 475 2263 -10e73 14 482 2263 -10e87 3 483 2263 -10e8a a 487 2263 -10e94 b 490 2263 -10e9f 6 493 2263 -10ea5 3 494 2263 -10ea8 12 501 2263 -10eba 1d 506 2263 -10ed7 6 510 2263 -10edd c 513 2263 -10ee9 16 518 2263 -10eff 8 522 2263 -10f07 14 528 2263 -10f1b 2 531 2263 -10f1d 2 540 2263 -10f1f 1b 550 2263 -10f3a f 553 2263 -10f49 7 557 2263 -10f50 5 558 2263 -10f55 3 559 2263 -10f58 b 566 2263 -10f63 11 567 2263 -FUNC 10f74 bf 4 LanguageEnumProc -10f74 15 624 2263 -10f89 7 625 2263 -10f90 f 626 2263 -10f9f 23 632 2263 -10fc2 3 635 2263 -10fc5 3 636 2263 -10fc8 11 639 2263 -10fd9 7 643 2263 -10fe0 2 650 2263 -10fe2 1d 651 2263 -10fff f 654 2263 -1100e a 658 2263 -11018 b 662 2263 -11023 10 663 2263 -FUNC 11033 2c 0 GetLcidFromCountry -11033 0 686 2263 -11033 10 687 2263 -11043 11 689 2263 -11054 6 693 2263 -1105a 4 694 2263 -1105e 1 695 2263 -FUNC 1105f 65 0 GetLcidFromLangCountry -1105f 0 386 2263 -1105f 7 388 2263 -11066 1a 389 2263 -11080 5 390 2263 -11085 17 392 2263 -1109c 10 394 2263 -110ac 13 402 2263 -110bf 4 403 2263 -110c3 1 404 2263 -FUNC 110c4 3c 0 GetLcidFromLanguage -110c4 0 591 2263 -110c4 13 593 2263 -110d7 e 594 2263 -110e5 10 596 2263 -110f5 6 600 2263 -110fb 4 601 2263 -110ff 1 602 2263 -FUNC 11100 1e3 c __get_qualified_locale -11100 4 205 2263 -11104 5 208 2263 -11109 12 212 2263 -1111b 7 215 2263 -11122 5 217 2263 -11127 3 222 2263 -1112a f 223 2263 -11139 10 226 2263 -11149 d 230 2263 -11156 a 232 2263 -11160 5 235 2263 -11165 2 237 2263 -11167 5 240 2263 -1116c 5 243 2263 -11171 14 248 2263 -11185 a 250 2263 -1118f 5 252 2263 -11194 2 254 2263 -11196 5 256 2263 -1119b 2 261 2263 -1119d a 263 2263 -111a7 28 266 2263 -111cf 2 268 2263 -111d1 13 271 2263 -111e4 3 277 2263 -111e7 6 278 2263 -111ed 17 281 2263 -11204 32 285 2263 -11236 d 289 2263 -11243 6 290 2263 -11249 8 293 2263 -11251 7 295 2263 -11258 8 296 2263 -11260 4 297 2263 -11264 8 301 2263 -1126c d 305 2263 -11279 23 306 2263 -1129c 2 307 2263 -1129e f 308 2263 -112ad 2 309 2263 -112af 12 311 2263 -112c1 2 312 2263 -112c3 14 313 2263 -112d7 5 315 2263 -112dc 6 286 2263 -112e2 1 316 2263 -FUNC 112e3 12 0 cmpResult -FUNC 112f5 18 0 cmpBYTE -FUNC 1130d 40 0 cmpWORD -FUNC 1134d 78 0 cmpDWORD -FUNC 113c5 1490 0 unaligned_memcmp -FUNC 12855 1680 c memcmp -FUNC 13ed5 be c strncmp -13ed5 4 42 543 -13ed9 5 43 543 -13ede 7 45 543 -13ee5 7 46 543 -13eec 6 48 543 -13ef2 d 51 543 -13eff 11 56 543 -13f10 c 61 543 -13f1c c 66 543 -13f28 15 71 543 -13f3d 2 81 543 -13f3f a 73 543 -13f49 a 68 543 -13f53 a 63 543 -13f5d 10 58 543 -13f6d 2 79 543 -13f6f a 81 543 -13f79 1 85 543 -13f7a 4 86 543 -13f7e 5 79 543 -13f83 4 89 543 -13f87 2 90 543 -13f89 a 83 543 -FUNC 13fa0 40 8 strpbrk -13fa0 4 191 536 -13fa4 2 198 536 -13fa6 1 199 536 -13fa7 1 200 536 -13fa8 1 201 536 -13fa9 1 202 536 -13faa 1 203 536 -13fab 1 204 536 -13fac 1 205 536 -13fad 1 206 536 -13fae 6 212 536 -13fb4 2 216 536 -13fb6 2 217 536 -13fb8 2 218 536 -13fba 3 219 536 -13fbd 4 220 536 -13fc1 2 221 536 -13fc3 5 227 536 -13fc8 2 236 536 -13fca 2 237 536 -13fcc 2 238 536 -13fce 3 239 536 -13fd1 4 240 536 -13fd5 2 247 536 -13fd7 3 248 536 -13fda 3 257 536 -13fdd 3 259 536 -FUNC 13fe0 104 0 __report_gsfailure -13fe0 9 140 2145 -13fe9 5 170 2145 -13fee 6 171 2145 -13ff4 6 172 2145 -13ffa 6 173 2145 -14000 6 174 2145 -14006 6 175 2145 -1400c 7 176 2145 -14013 7 177 2145 -1401a 7 178 2145 -14021 7 179 2145 -14028 7 180 2145 -1402f 7 181 2145 -14036 1 182 2145 -14037 6 183 2145 -1403d 3 190 2145 -14040 5 191 2145 -14045 3 192 2145 -14048 5 193 2145 -1404d 3 194 2145 -14050 5 195 2145 -14055 6 201 2145 -1405b a 204 2145 -14065 a 206 2145 -1406f a 285 2145 -14079 a 286 2145 -14083 b 293 2145 -1408e b 294 2145 -14099 b 297 2145 -140a4 8 298 2145 -140ac 8 302 2145 -140b4 b 304 2145 -140bf 9 313 2145 -140c8 8 315 2145 -140d0 12 319 2145 -140e2 2 320 2145 -FUNC 140e4 20 0 _global_unwind2 -FUNC 14104 45 0 __unwind_handler -FUNC 14149 84 0 _local_unwind2 -FUNC 141cd 23 0 _abnormal_termination -FUNC 141f0 9 0 _NLG_Notify1 -FUNC 141f9 1f 0 _NLG_Notify -PUBLIC 14210 0 _NLG_Dispatch -FUNC 14218 3 0 _NLG_Call -PUBLIC 1421a 0 _NLG_Return2 -FUNC 1421b 57 8 fastzero_I -FUNC 14272 8f c _VEC_memzero -FUNC 14301 22b 14 strtoxl -14301 8 80 4034 -14309 b 86 4034 -14314 3 89 4034 -14317 b 92 4034 -14322 30 94 4034 -14352 11 95 4034 -14363 c 100 4034 -1436f 34 101 4034 -143a3 5 102 4034 -143a8 5 104 4034 -143ad 4 105 4034 -143b1 2 106 4034 -143b3 5 108 4034 -143b8 3 109 4034 -143bb 1d 111 4034 -143d8 4 118 4034 -143dc 5 121 4034 -143e1 9 122 4034 -143ea a 123 4034 -143f4 9 126 4034 -143fd 7 124 4034 -14404 2 129 4034 -14406 5 140 4034 -1440b f 142 4034 -1441a 1 143 4034 -1441b 9 144 4034 -14424 8 149 4034 -1442c c 154 4034 -14438 8 155 4034 -14440 7 156 4034 -14447 13 157 4034 -1445a 5 160 4034 -1445f 4 164 4034 -14463 b 171 4034 -1446e 4 177 4034 -14472 6 178 4034 -14478 8 190 4034 -14480 6 193 4034 -14486 3 195 4034 -14489 4 196 4034 -1448d 2 198 4034 -1448f c 173 4034 -1449b 3 185 4034 -1449e 2 186 4034 -144a0 24 201 4034 -144c4 5 204 4034 -144c9 c 205 4034 -144d5 6 206 4034 -144db 10 207 4034 -144eb 7 213 4034 -144f2 2 215 4034 -144f4 6 217 4034 -144fa 3 219 4034 -144fd 12 221 4034 -1450f 7 113 4034 -14516 2 115 4034 -14518 12 116 4034 -1452a 2 222 4034 -FUNC 1452c 29 c strtol -1452c 3 229 4034 -1452f 8 230 4034 -14537 13 232 4034 -1454a 9 236 4034 -14553 2 238 4034 -FUNC 14555 1b 10 _strtol_l -14555 0 246 4034 -14555 1a 247 4034 -1456f 1 248 4034 -FUNC 14570 2a c strtoul -14570 3 255 4034 -14573 7 256 4034 -1457a 14 258 4034 -1458e a 262 4034 -14598 2 264 4034 -FUNC 1459a 1b 10 _strtoul_l -1459a 0 272 4034 -1459a 1a 273 4034 -145b4 1 274 4034 -FUNC 145b5 294 14 strtoxq -145b5 8 80 3989 -145bd b 86 3989 -145c8 3 89 3989 -145cb b 92 3989 -145d6 31 94 3989 -14607 12 95 3989 -14619 c 100 3989 -14625 37 102 3989 -1465c 2 103 3989 -1465e 9 105 3989 -14667 4 106 3989 -1466b 2 107 3989 -1466d 6 109 3989 -14673 9 110 3989 -1467c 8 112 3989 -14684 6 115 3989 -1468a 9 116 3989 -14693 a 117 3989 -1469d 9 120 3989 -146a6 3 118 3989 -146a9 5 123 3989 -146ae 10 125 3989 -146be 1 126 3989 -146bf 9 127 3989 -146c8 26 132 3989 -146ee e 137 3989 -146fc 8 138 3989 -14704 6 139 3989 -1470a 11 140 3989 -1471b 5 143 3989 -14720 31 154 3989 -14751 4 160 3989 -14755 6 161 3989 -1475b a 173 3989 -14765 7 176 3989 -1476c 6 178 3989 -14772 6 179 3989 -14778 5 181 3989 -1477d 19 156 3989 -14796 b 168 3989 -147a1 5 169 3989 -147a6 35 184 3989 -147db 5 187 3989 -147e0 c 188 3989 -147ec a 189 3989 -147f6 6 190 3989 -147fc 7 191 3989 -14803 2 192 3989 -14805 7 193 3989 -1480c 8 195 3989 -14814 5 197 3989 -14819 6 199 3989 -1481f 13 201 3989 -14832 15 203 3989 -14847 2 204 3989 -FUNC 14849 29 c _strtoi64 -14849 3 211 3989 -1484c 8 212 3989 -14854 13 214 3989 -14867 9 218 3989 -14870 2 220 3989 -FUNC 14872 1b 10 _strtoi64_l -14872 0 227 3989 -14872 1a 228 3989 -1488c 1 229 3989 -FUNC 1488d 2a c _strtoui64 -1488d 3 236 3989 -14890 7 237 3989 -14897 14 239 3989 -148ab a 243 3989 -148b5 2 245 3989 -FUNC 148b7 1b 10 _strtoui64_l -148b7 0 253 3989 -148b7 1a 254 3989 -148d1 1 255 3989 -FUNC 148d2 b6 c _isctype_l -148d2 7 114 4078 -148d9 b 118 4078 -148e4 d 121 4078 -148f1 f 122 4078 -14900 1f 124 4078 -1491f 3 126 4078 -14922 d 129 4078 -1492f 2 130 4078 -14931 a 133 4078 -1493b 26 144 4078 -14961 10 146 4078 -14971 15 149 4078 -14986 2 150 4078 -FUNC 14988 2f 8 _isctype -14988 0 156 4078 -14988 9 157 4078 -14991 12 159 4078 -149a3 1 165 4078 -149a4 12 163 4078 -149b6 1 165 4078 -FUNC 149c0 2c 0 _alloca_probe_16 -149c0 0 44 1046 -149c0 1 46 1046 -149c1 4 47 1046 -149c5 2 48 1046 -149c7 3 49 1046 -149ca 2 50 1046 -149cc 2 51 1046 -149ce 2 52 1046 -149d0 1 53 1046 -149d1 5 54 1046 -149d6 1 59 1046 -149d7 4 60 1046 -149db 2 61 1046 -149dd 3 62 1046 -149e0 2 63 1046 -149e2 2 64 1046 -149e4 2 65 1046 -149e6 1 66 1046 -149e7 5 67 1046 -PUBLIC 149d6 0 _alloca_probe_8 -FUNC 149ec 47 4 __ansicp -149ec 10 39 1348 -149fc 1c 44 1348 -14a18 3 45 1348 -14a1b 2 46 1348 -14a1d a 47 1348 -14a27 c 49 1348 -FUNC 14a33 1b2 18 __convertcp -14a33 16 79 1348 -14a49 10 83 1348 -14a59 18 85 1348 -14a71 17 90 1348 -14a88 13 92 1348 -14a9b 6 93 1348 -14aa1 d 99 1348 -14aae 2 101 1348 -14ab0 c 103 1348 -14abc 2a 115 1348 -14ae6 15 111 1348 -14afb 7 112 1348 -14b02 1c 115 1348 -14b1e 3 116 1348 -14b21 2 117 1348 -14b23 10 119 1348 -14b33 15 127 1348 -14b48 7 129 1348 -14b4f 18 138 1348 -14b67 3 139 1348 -14b6a 2 140 1348 -14b6c 1f 149 1348 -14b8b 11 151 1348 -14b9c 12 160 1348 -14bae 9 162 1348 -14bb7 3 163 1348 -14bba 2 164 1348 -14bbc 6 165 1348 -14bc2 5 166 1348 -14bc7 9 174 1348 -14bd0 3 177 1348 -14bd3 12 178 1348 -FUNC 14be5 50 0 has_osfxsr_set -FUNC 14c35 60 0 _get_sse2_info -FUNC 14c95 d 0 __sse2_available_init -FUNC 14ca2 34 4 _get_daylight -14ca2 0 35 161 -14ca2 27 36 161 -14cc9 1 41 161 -14cca 8 39 161 -14cd2 3 40 161 -14cd5 1 41 161 -FUNC 14cd6 34 4 _get_dstbias -14cd6 0 44 161 -14cd6 27 45 161 -14cfd 1 50 161 -14cfe 8 48 161 -14d06 3 49 161 -14d09 1 50 161 -FUNC 14d0a 34 4 _get_timezone -14d0a 0 53 161 -14d0a 27 54 161 -14d31 1 59 161 -14d32 8 57 161 -14d3a 3 58 161 -14d3d 1 59 161 -FUNC 14d3e a2 10 _get_tzname -14d3e 3 62 161 -14d41 10 63 161 -14d51 4 64 161 -14d55 3 66 161 -14d58 7 68 161 -14d5f 27 69 161 -14d86 20 63 161 -14da6 f 72 161 -14db5 8 73 161 -14dbd 4 76 161 -14dc1 5 78 161 -14dc6 5 80 161 -14dcb 13 82 161 -14dde 2 83 161 -FUNC 14de0 6 0 __daylight -14de0 0 118 161 -14de0 5 119 161 -14de5 1 120 161 -FUNC 14de6 6 0 __dstbias -14de6 0 123 161 -14de6 5 124 161 -14deb 1 125 161 -FUNC 14dec 6 0 __timezone -14dec 0 128 161 -14dec 5 129 161 -14df1 1 130 161 -FUNC 14df2 6 0 __tzname -14df2 0 133 161 -14df2 5 134 161 -14df7 1 135 161 -FUNC 14df8 c 4 _set_daylight -14df8 c 189 92 -FUNC 14e04 c 4 _set_dstbias -14e04 c 190 92 -FUNC 14e10 c 4 _set_timezone -14e10 c 191 92 -FUNC 14e1c 349 0 _tzset_nolock -14e1c c 124 114 -14e28 5 127 114 -14e2d 3 129 114 -14e30 3 130 114 -14e33 3 131 114 -14e36 3 132 114 -14e39 3 133 114 -14e3c 8 135 114 -14e44 3 136 114 -14e47 8 139 114 -14e4f 1b 142 114 -14e6a 1b 143 114 -14e85 1b 144 114 -14ea0 8 149 114 -14ea8 6 154 114 -14eae f 160 114 -14ebd 18 165 114 -14ed5 14 260 114 -14ee9 b 268 114 -14ef4 4 274 114 -14ef8 7 275 114 -14eff 16 277 114 -14f15 6 281 114 -14f1b 32 283 114 -14f4d 9 174 114 -14f56 7 175 114 -14f5d 6 176 114 -14f63 13 179 114 -14f76 9 183 114 -14f7f b 188 114 -14f8a 9 190 114 -14f93 e 191 114 -14fa1 12 199 114 -14fb3 3 201 114 -14fb6 c 203 114 -14fc2 2 205 114 -14fc4 3 206 114 -14fc7 3 214 114 -14fca 27 234 114 -14ff1 8 235 114 -14ff9 2 236 114 -14ffb 7 237 114 -15002 23 247 114 -15025 9 248 114 -1502e 2 249 114 -15030 8 250 114 -15038 7 256 114 -1503f a 288 114 -15049 a 289 114 -15053 a 290 114 -1505d c 292 114 -15069 9 296 114 -15072 23 301 114 -15095 8 310 114 -1509d 7 311 114 -150a4 1 312 114 -150a5 10 318 114 -150b5 11 320 114 -150c6 5 292 114 -150cb 9 293 114 -150d4 5 325 114 -150d9 e 329 114 -150e7 d 330 114 -150f4 5 335 114 -150f9 b 339 114 -15104 d 340 114 -15111 5 344 114 -15116 3 345 114 -15119 6 350 114 -1511f 4 351 114 -15123 21 352 114 -15144 2 354 114 -15146 5 355 114 -1514b a 357 114 -15155 a 358 114 -1515f 6 360 114 -FUNC 15165 1f5 24 cvtdate -15165 6 409 114 -1516b 4 412 114 -1516f c 414 114 -1517b 52 424 114 -151cd 4c 430 114 -15219 14 436 114 -1522d 2 437 114 -1522f 2 438 114 -15231 46 447 114 -15277 3 449 114 -1527a 2 452 114 -1527c 3c 457 114 -152b8 3 459 114 -152bb 27 467 114 -152e2 6 472 114 -152e8 2 474 114 -152ea 29 485 114 -15313 11 486 114 -15324 a 487 114 -1532e 8 488 114 -15336 d 490 114 -15343 6 491 114 -15349 6 492 114 -1534f 9 499 114 -15358 2 503 114 -FUNC 1535a 1ae 0 _isindst_nolock -1535a 5 554 114 -1535f 20 558 114 -1537f 5 560 114 -15384 7 561 114 -1538b 1b 568 114 -153a6 c 569 114 -153b2 7 573 114 -153b9 34 584 114 -153ed 2 585 114 -153ef 19 596 114 -15408 40 611 114 -15448 2 612 114 -1544a 1e 623 114 -15468 2 626 114 -1546a 14 641 114 -1547e 1a 653 114 -15498 d 660 114 -154a5 d 664 114 -154b2 8 666 114 -154ba 4 674 114 -154be 2 697 114 -154c0 8 673 114 -154c8 8 675 114 -154d0 4 676 114 -154d4 14 679 114 -154e8 4 681 114 -154ec b 682 114 -154f7 2 685 114 -154f9 d 691 114 -15506 2 694 114 -FUNC 15508 4f 0 __tzset -15508 c 85 114 -15514 a 88 114 -1551e 8 90 114 -15526 3 91 114 -15529 8 93 114 -15531 5 94 114 -15536 6 95 114 -1553c c 98 114 -15548 6 103 114 -1554e 9 99 114 -FUNC 15557 38 0 _tzset -15557 c 109 114 -15563 8 110 114 -1556b 4 111 114 -1556f 5 113 114 -15574 c 115 114 -15580 6 118 114 -15586 9 116 114 -FUNC 1558f 41 4 _isindst -1558f c 538 114 -1559b 8 541 114 -155a3 4 542 114 -155a7 b 543 114 -155b2 c 544 114 -155be 3 548 114 -155c1 6 549 114 -155c7 9 545 114 -FUNC 155d0 35 8 __ascii_stricmp -155d0 a 75 367 -155da c 80 367 -155e6 3 81 367 -155e9 c 82 367 -155f5 3 83 367 -155f8 9 85 367 -15601 3 87 367 -15604 1 88 367 -FUNC 15605 d3 c _stricmp_l -15605 7 47 367 -1560c b 49 367 -15617 36 52 367 -1564d 32 53 367 -1567f 8 55 367 -15687 e 57 367 -15695 15 63 367 -156aa 11 64 367 -156bb 8 65 367 -156c3 13 68 367 -156d6 2 69 367 -FUNC 156d8 50 8 _stricmp -156d8 4 94 367 -156dc a 95 367 -156e6 24 98 367 -1570a 6 99 367 -15710 1 107 367 -15711 5 101 367 -15716 10 105 367 -15726 2 107 367 -FUNC 15728 36 8 _isleadbyte_l -15728 6 55 4169 -1572e b 56 4169 -15739 23 57 4169 -1575c 2 58 4169 -FUNC 1575e e 4 isleadbyte -1575e 0 63 4169 -1575e d 64 4169 -1576b 1 65 4169 -FUNC 1576c 16 8 _iswalpha_l -1576c 0 71 4169 -1576c 15 72 4169 -15781 1 73 4169 -FUNC 15782 11 4 iswalpha -15782 0 78 4169 -15782 10 79 4169 -15792 1 80 4169 -FUNC 15793 13 8 _iswupper_l -15793 0 86 4169 -15793 12 87 4169 -157a5 1 88 4169 -FUNC 157a6 e 4 iswupper -157a6 0 93 4169 -157a6 d 94 4169 -157b3 1 95 4169 -FUNC 157b4 13 8 _iswlower_l -157b4 0 101 4169 -157b4 12 102 4169 -157c6 1 103 4169 -FUNC 157c7 e 4 iswlower -157c7 0 108 4169 -157c7 d 109 4169 -157d4 1 110 4169 -FUNC 157d5 13 8 _iswdigit_l -157d5 0 116 4169 -157d5 12 117 4169 -157e7 1 118 4169 -FUNC 157e8 e 4 iswdigit -157e8 0 123 4169 -157e8 d 124 4169 -157f5 1 125 4169 -FUNC 157f6 16 8 _iswxdigit_l -157f6 0 131 4169 -157f6 15 132 4169 -1580b 1 133 4169 -FUNC 1580c 11 4 iswxdigit -1580c 0 138 4169 -1580c 10 139 4169 -1581c 1 140 4169 -FUNC 1581d 13 8 _iswspace_l -1581d 0 146 4169 -1581d 12 147 4169 -1582f 1 148 4169 -FUNC 15830 e 4 iswspace -15830 0 153 4169 -15830 d 154 4169 -1583d 1 155 4169 -FUNC 1583e 13 8 _iswpunct_l -1583e 0 161 4169 -1583e 12 162 4169 -15850 1 163 4169 -FUNC 15851 e 4 iswpunct -15851 0 168 4169 -15851 d 169 4169 -1585e 1 170 4169 -FUNC 1585f 16 8 _iswalnum_l -1585f 0 176 4169 -1585f 15 177 4169 -15874 1 178 4169 -FUNC 15875 11 4 iswalnum -15875 0 183 4169 -15875 10 184 4169 -15885 1 185 4169 -FUNC 15886 16 8 _iswprint_l -15886 0 191 4169 -15886 15 192 4169 -1589b 1 193 4169 -FUNC 1589c 11 4 iswprint -1589c 0 198 4169 -1589c 10 199 4169 -158ac 1 200 4169 -FUNC 158ad 16 8 _iswgraph_l -158ad 0 206 4169 -158ad 15 207 4169 -158c2 1 208 4169 -FUNC 158c3 11 4 iswgraph -158c3 0 213 4169 -158c3 10 214 4169 -158d3 1 215 4169 -FUNC 158d4 13 8 _iswcntrl_l -158d4 0 221 4169 -158d4 12 222 4169 -158e6 1 223 4169 -FUNC 158e7 e 4 iswcntrl -158e7 0 228 4169 -158e7 d 229 4169 -158f4 1 230 4169 -FUNC 158f5 c 4 iswascii -158f5 0 235 4169 -158f5 b 236 4169 -15900 1 237 4169 -FUNC 15901 26 8 _iswcsym_l -15901 0 243 4169 -15901 21 244 4169 -15922 1 245 4169 -15923 3 244 4169 -15926 1 245 4169 -FUNC 15927 21 4 __iswcsym -15927 0 250 4169 -15927 1c 251 4169 -15943 1 252 4169 -15944 3 251 4169 -15947 1 252 4169 -FUNC 15948 26 8 _iswcsymf_l -15948 0 258 4169 -15948 21 259 4169 -15969 1 260 4169 -1596a 3 259 4169 -1596d 1 260 4169 -FUNC 1596e 21 4 __iswcsymf -1596e 0 265 4169 -1596e 1c 266 4169 -1598a 1 267 4169 -1598b 3 266 4169 -1598e 1 267 4169 -FUNC 1598f f0 10 _strnicmp_l -1598f 7 51 324 -15996 d 54 324 -159a3 b 56 324 -159ae 33 59 324 -159e1 7 60 324 -159e8 32 61 324 -15a1a 8 63 324 -15a22 1d 65 324 -15a3f 15 71 324 -15a54 11 72 324 -15a65 d 74 324 -15a72 6 76 324 -15a78 5 79 324 -15a7d 2 80 324 -FUNC 15a7f 5c c _strnicmp -15a7f 4 125 324 -15a83 a 127 324 -15a8d 24 130 324 -15ab1 5 131 324 -15ab6 a 132 324 -15ac0 1 141 324 -15ac1 5 134 324 -15ac6 13 138 324 -15ad9 2 141 324 -FUNC 15adb db c xtoa_s -15adb 8 93 4260 -15ae3 24 102 4260 -15b07 24 103 4260 -15b2b 19 105 4260 -15b44 b 106 4260 -15b4f a 112 4260 -15b59 6 114 4260 -15b5f 7 116 4260 -15b66 2 118 4260 -15b68 2 121 4260 -15b6a 5 124 4260 -15b6f 5 128 4260 -15b74 3 129 4260 -15b77 2 130 4260 -15b79 6 131 4260 -15b7f 3 135 4260 -15b82 e 136 4260 -15b90 8 139 4260 -15b98 2 141 4260 -15b9a 2 142 4260 -15b9c 3 148 4260 -15b9f 6 152 4260 -15ba5 3 154 4260 -15ba8 1 155 4260 -15ba9 4 156 4260 -15bad 5 158 4260 -15bb2 4 160 4260 -FUNC 15bb6 28 10 _itoa_s -15bb6 3 172 4260 -15bb9 d 175 4260 -15bc6 4 176 4260 -15bca 2 177 4260 -15bcc 10 178 4260 -15bdc 2 181 4260 -FUNC 15bde 25 10 _ltoa_s -15bde 3 189 4260 -15be1 20 190 4260 -15c01 2 191 4260 -FUNC 15c03 18 10 _ultoa_s -15c03 0 199 4260 -15c03 17 200 4260 -15c1a 1 201 4260 -FUNC 15c1b f6 14 x64toa_s -15c1b 7 309 4260 -15c22 25 318 4260 -15c47 5 319 4260 -15c4c 19 321 4260 -15c65 b 322 4260 -15c70 3 327 4260 -15c73 20 333 4260 -15c93 3 336 4260 -15c96 1e 352 4260 -15cb4 3 344 4260 -15cb7 2 345 4260 -15cb9 5 346 4260 -15cbe 5 351 4260 -15cc3 13 352 4260 -15cd6 5 355 4260 -15cdb 3 357 4260 -15cde 13 358 4260 -15cf1 4 364 4260 -15cf5 9 368 4260 -15cfe 3 370 4260 -15d01 1 371 4260 -15d02 7 372 4260 -15d09 4 375 4260 -15d0d 4 377 4260 -FUNC 15d11 33 14 _i64toa_s -15d11 3 390 4260 -15d14 2e 391 4260 -15d42 2 392 4260 -FUNC 15d44 1d 14 _ui64toa_s -15d44 4 400 4260 -15d48 17 401 4260 -15d5f 2 402 4260 -FUNC 15d70 2b 0 _chkstk -15d70 0 65 1048 -15d70 1 69 1048 -15d71 4 73 1048 -15d75 2 74 1048 -15d77 2 79 1048 -15d79 2 80 1048 -15d7b 2 81 1048 -15d7d 2 83 1048 -15d7f 5 84 1048 -15d84 2 87 1048 -15d86 2 88 1048 -15d88 2 89 1048 -15d8a 1 90 1048 -15d8b 1 91 1048 -15d8c 2 92 1048 -15d8e 3 93 1048 -15d91 1 94 1048 -15d92 5 98 1048 -15d97 2 99 1048 -15d99 2 100 1048 -FUNC 15d9b 81 4 _getenv_helper_nolock -15d9b 0 95 2318 -15d9b 10 103 2318 -15dab 3 104 2318 -15dae 1 169 2318 -15daf e 128 2318 -15dbd 7 131 2318 -15dc4 2 132 2318 -15dc6 6 135 2318 -15dcc c 140 2318 -15dd8 9 142 2318 -15de1 2 150 2318 -15de3 22 154 2318 -15e05 3 164 2318 -15e08 6 150 2318 -15e0e 5 168 2318 -15e13 9 169 2318 -FUNC 15e1c 93 c _getenv_s_helper -15e1c 7 220 2318 -15e23 21 224 2318 -15e44 15 226 2318 -15e59 4 227 2318 -15e5d 3 229 2318 -15e60 a 233 2318 -15e6a 3 234 2318 -15e6d 2 236 2318 -15e6f 7 239 2318 -15e76 6 240 2318 -15e7c 2 243 2318 -15e7e 5 246 2318 -15e83 5 251 2318 -15e88 20 254 2318 -15ea8 5 256 2318 -15ead 2 257 2318 -FUNC 15eaf a2 8 _dupenv_s_helper -15eaf 6 339 2318 -15eb5 21 344 2318 -15ed6 9 346 2318 -15edf 2 348 2318 -15ee1 5 350 2318 -15ee6 8 352 2318 -15eee 6 353 2318 -15ef4 2 355 2318 -15ef6 9 358 2318 -15eff b 362 2318 -15f0a 6 364 2318 -15f10 b 366 2318 -15f1b 9 367 2318 -15f24 1e 370 2318 -15f42 7 371 2318 -15f49 2 373 2318 -15f4b 4 375 2318 -15f4f 2 376 2318 -FUNC 15f51 83 4 getenv -15f51 c 75 2318 -15f5d 2a 78 2318 -15f87 18 79 2318 -15f9f 8 81 2318 -15fa7 3 82 2318 -15faa c 83 2318 -15fb6 c 85 2318 -15fc2 3 89 2318 -15fc5 6 90 2318 -15fcb 9 86 2318 -FUNC 15fd4 d8 10 getenv_s -15fd4 c 198 2318 -15fe0 8 201 2318 -15fe8 5 202 2318 -15fed a1 203 2318 -1608e c 205 2318 -1609a 3 209 2318 -1609d 6 210 2318 -160a3 9 206 2318 -FUNC 160ac e6 c _dupenv_s -160ac c 303 2318 -160b8 8 306 2318 -160c0 5 307 2318 -160c5 af 311 2318 -16174 c 314 2318 -16180 3 318 2318 -16183 6 319 2318 -16189 9 315 2318 -FUNC 16192 8 4 _tolower -16192 0 48 3943 -16192 7 49 3943 -16199 1 50 3943 -FUNC 1619a 117 8 _tolower_l -1619a 8 70 3943 -161a2 b 74 3943 -161ad c 77 3943 -161b9 31 79 3943 -161ea f 80 3943 -161f9 14 82 3943 -1620d 2b 86 3943 -16238 3 88 3943 -1623b d 91 3943 -16248 2 92 3943 -1624a b 94 3943 -16255 a 97 3943 -1625f 25 110 3943 -16284 6 112 3943 -1628a 5 116 3943 -1628f 6 117 3943 -16295 1a 119 3943 -162af 2 120 3943 -FUNC 162b1 27 4 tolower -162b1 0 143 3943 -162b1 9 145 3943 -162ba f 147 3943 -162c9 1 153 3943 -162ca d 151 3943 -162d7 1 153 3943 -FUNC 162d8 82 c _iswctype_l -162d8 6 66 4124 -162de 8 69 4124 -162e6 6 70 4124 -162ec 8 71 4124 -162f4 18 72 4124 -1630c 2 73 4124 -1630e b 75 4124 -16319 25 85 4124 -1633e 3 86 4124 -16341 d 87 4124 -1634e a 89 4124 -16358 2 90 4124 -FUNC 1635a 6e 8 iswctype -1635a 4 96 4124 -1635e 8 97 4124 -16366 2 99 4124 -16368 2 122 4124 -1636a 8 101 4124 -16372 14 103 4124 -16386 2 122 4124 -16388 9 106 4124 -16391 25 117 4124 -163b6 10 121 4124 -163c6 2 122 4124 -FUNC 163c8 5 8 is_wctype -163c8 0 148 4124 -163c8 5 149 4124 -FUNC 163d0 61 c __ascii_strnicmp -163d0 6 69 538 -163d6 3 75 538 -163d9 2 76 538 -163db 2 77 538 -163dd 3 79 538 -163e0 3 80 538 -163e3 2 82 538 -163e5 2 83 538 -163e7 5 84 538 -163ec 2 89 538 -163ee 2 91 538 -163f0 2 93 538 -163f2 2 95 538 -163f4 2 97 538 -163f6 2 98 538 -163f8 3 100 538 -163fb 3 101 538 -163fe 2 103 538 -16400 2 104 538 -16402 2 106 538 -16404 2 107 538 -16406 2 109 538 -16408 2 112 538 -1640a 2 113 538 -1640c 2 115 538 -1640e 2 116 538 -16410 2 118 538 -16412 2 121 538 -16414 2 122 538 -16416 3 124 538 -16419 2 125 538 -1641b 2 128 538 -1641d 2 129 538 -1641f 2 130 538 -16421 5 133 538 -16426 2 134 538 -16428 2 135 538 -1642a 2 138 538 -1642c 5 140 538 -FUNC 16431 ec 10 _mbsnbicoll_l -16431 7 53 2932 -16438 b 55 2932 -16443 9 57 2932 -1644c 13 58 2932 -1645f 33 61 2932 -16492 6 62 2932 -16498 23 63 2932 -164bb 8 65 2932 -164c3 14 66 2932 -164d7 23 74 2932 -164fa 10 75 2932 -1650a 11 77 2932 -1651b 2 79 2932 -FUNC 1651d 17 c _mbsnbicoll -1651d 0 85 2932 -1651d 16 86 2932 -16533 1 87 2932 -FUNC 16534 95 0 __wtomb_environ -16534 7 43 1113 -1653b 3 44 1113 -1653e 9 45 1113 -16547 c 52 1113 -16553 12 57 1113 -16565 11 61 1113 -16576 12 65 1113 -16588 10 72 1113 -16598 5 74 1113 -1659d 9 76 1113 -165a6 3 77 1113 -165a9 9 81 1113 -165b2 5 84 1113 -165b7 2 85 1113 -165b9 5 58 1113 -165be 9 67 1113 -165c7 2 68 1113 -FUNC 165c9 1a 8 strnlen -165c9 0 38 531 -165c9 19 45 531 -165e2 1 49 531 -FUNC 165e3 224 1c __crtGetStringTypeW_stat -165e3 10 64 1242 -165f3 9 72 1242 -165fc 7 73 1242 -16603 14 75 1242 -16617 11 79 1242 -16628 8 80 1242 -16630 b 82 1242 -1663b f 83 1242 -1664a 4 88 1242 -1664e 13 90 1242 -16661 7 95 1242 -16668 2 199 1242 -1666a 8 119 1242 -16672 b 120 1242 -1667d 5 121 1242 -16682 b 122 1242 -1668d e 128 1242 -1669b 5 130 1242 -166a0 3 131 1242 -166a3 1d 142 1242 -166c0 6 143 1242 -166c6 40 146 1242 -16706 3 147 1242 -16709 6 148 1242 -1670f d 150 1242 -1671c 1a 160 1242 -16736 4d 164 1242 -16783 4 165 1242 -16787 5 170 1242 -1678c b 171 1242 -16797 3 174 1242 -1679a 23 178 1242 -167bd 12 186 1242 -167cf f 189 1242 -167de 4 187 1242 -167e2 7 191 1242 -167e9 8 194 1242 -167f1 4 196 1242 -167f5 12 200 1242 -FUNC 16807 3e 1c __crtGetStringTypeW -16807 6 211 1242 -1680d b 212 1242 -16818 2b 222 1242 -16843 2 223 1242 -FUNC 16845 1a 4 strncnt -16845 0 50 2759 -16845 6 51 2759 -1684b 6 54 2759 -16851 1 55 2759 -16852 5 54 2759 -16857 7 57 2759 -1685e 1 58 2759 -FUNC 1685f 389 18 __crtCompareStringA_stat -1685f 10 96 2759 -1686f 31 280 2759 -168a0 c 107 2759 -168ac b 109 2759 -168b7 a 110 2759 -168c1 5 118 2759 -168c6 1b 119 2759 -168e1 7 122 2759 -168e8 1f 123 2759 -16907 6 120 2759 -1690d 7 121 2759 -16914 3 124 2759 -16917 2 125 2759 -16919 17 130 2759 -16930 7 189 2759 -16937 8 201 2759 -1693f 8 202 2759 -16947 d 208 2759 -16954 5 214 2759 -16959 8 215 2759 -16961 2 218 2759 -16963 6 219 2759 -16969 5 222 2759 -1696e 4 223 2759 -16972 f 231 2759 -16981 2 232 2759 -16983 5 237 2759 -16988 4 239 2759 -1698c 2 240 2759 -1698e 10 244 2759 -1699e a 246 2759 -169a8 7 244 2759 -169af 2 262 2759 -169b1 5 253 2759 -169b6 6 255 2759 -169bc 8 256 2759 -169c4 10 260 2759 -169d4 11 262 2759 -169e5 7 260 2759 -169ec 2 262 2759 -169ee 1a 280 2759 -16a08 6 281 2759 -16a0e 4d 284 2759 -16a5b 4 285 2759 -16a5f 6 286 2759 -16a65 19 295 2759 -16a7e 17 305 2759 -16a95 46 309 2759 -16adb 4 310 2759 -16adf 13 320 2759 -16af2 17 326 2759 -16b09 7 328 2759 -16b10 8 331 2759 -16b18 9 333 2759 -16b21 4 132 2759 -16b25 5 137 2759 -16b2a 8 138 2759 -16b32 5 139 2759 -16b37 8 140 2759 -16b3f e 142 2759 -16b4d 6 143 2759 -16b53 5 148 2759 -16b58 19 155 2759 -16b71 2 156 2759 -16b73 6 157 2759 -16b79 19 163 2759 -16b92 4 164 2759 -16b96 7 166 2759 -16b9d 5 167 2759 -16ba2 3 169 2759 -16ba5 3 170 2759 -16ba8 18 178 2759 -16bc0 6 179 2759 -16bc6 6 181 2759 -16bcc 8 182 2759 -16bd4 2 184 2759 -16bd6 12 337 2759 -FUNC 16be8 40 20 __crtCompareStringA -16be8 6 349 2759 -16bee b 350 2759 -16bf9 2d 361 2759 -16c26 2 362 2759 -FUNC 16c28 f8 10 _strnicoll_l -16c28 7 55 277 -16c2f b 57 277 -16c3a 9 59 277 -16c43 13 60 277 -16c56 33 63 277 -16c89 6 64 277 -16c8f 23 65 277 -16cb2 a 67 277 -16cbc 15 68 277 -16cd1 21 78 277 -16cf2 b 80 277 -16cfd 10 81 277 -16d0d 11 84 277 -16d1e 2 85 277 -FUNC 16d20 27 c _strnicoll -16d20 3 92 277 -16d23 9 93 277 -16d2c 1 101 277 -16d2d 5 95 277 -16d32 13 99 277 -16d45 2 101 277 -FUNC 16d47 4d 4 findenv -16d47 1 387 1450 -16d48 8 390 1450 -16d50 12 394 1450 -16d62 d 399 1450 -16d6f 9 390 1450 -16d78 e 407 1450 -16d86 1 408 1450 -16d87 c 400 1450 -16d93 1 408 1450 -FUNC 16d94 5d 0 copy_environ -16d94 4 428 1450 -16d98 2 429 1450 -16d9a 6 434 1450 -16da0 2 464 1450 -16da2 7 438 1450 -16da9 8 439 1450 -16db1 14 443 1450 -16dc5 8 444 1450 -16dcd 6 448 1450 -16dd3 11 458 1450 -16de4 4 448 1450 -16de8 2 461 1450 -16dea 5 463 1450 -16def 2 464 1450 -FUNC 16df1 24c 8 __crtsetenv -16df1 6 76 1450 -16df7 2c 89 1450 -16e23 2 91 1450 -16e25 1c 98 1450 -16e41 5 114 1450 -16e46 13 125 1450 -16e59 c 126 1450 -16e65 4 130 1450 -16e69 d 153 1450 -16e76 9 155 1450 -16e7f b 100 1450 -16e8a 6 101 1450 -16e90 2 356 1450 -16e92 3 164 1450 -16e95 6 165 1450 -16e9b f 171 1450 -16eaa 2 172 1450 -16eac 2 173 1450 -16eae 8 176 1450 -16eb6 f 178 1450 -16ec5 2 179 1450 -16ec7 2 180 1450 -16ec9 6 196 1450 -16ecf 5 197 1450 -16ed4 2 200 1450 -16ed6 10 207 1450 -16ee6 9 210 1450 -16eef a 216 1450 -16ef9 6 218 1450 -16eff 5 235 1450 -16f04 5 238 1450 -16f09 5 241 1450 -16f0e c 222 1450 -16f1a 4 221 1450 -16f1e 1d 230 1450 -16f3b 2 233 1450 -16f3d 9 245 1450 -16f46 4 250 1450 -16f4a 2 251 1450 -16f4c 2f 255 1450 -16f7b 8 258 1450 -16f83 3 259 1450 -16f86 5 262 1450 -16f8b 5 264 1450 -16f90 21 287 1450 -16fb1 25 289 1450 -16fd6 21 338 1450 -16ff7 4 339 1450 -16ffb b 343 1450 -17006 7 346 1450 -1700d 5 349 1450 -17012 8 351 1450 -1701a 6 352 1450 -17020 8 355 1450 -17028 8 271 1450 -17030 6 274 1450 -17036 7 276 1450 -FUNC 1703d 50 4 _strdup -1703d 1 66 568 -1703e b 70 568 -17049 6 71 568 -1704f 9 73 568 -17058 e 77 568 -17066 1c 80 568 -17082 4 81 568 -17086 6 84 568 -1708c 1 85 568 -FUNC 1708d ba c _mbschr_l -1708d 7 53 2982 -17094 b 55 2982 -1709f 32 58 2982 -170d1 8 60 2982 -170d9 d 61 2982 -170e6 a 65 2982 -170f0 7 67 2982 -170f7 10 69 2982 -17107 3 70 2982 -1710a 8 72 2982 -17112 d 63 2982 -1711f 8 76 2982 -17127 e 77 2982 -17135 10 79 2982 -17145 2 80 2982 -FUNC 17147 13 8 _mbschr -17147 0 86 2982 -17147 12 87 2982 -17159 1 88 2982 -FUNC 17170 be 8 strchr -17170 0 60 595 -17170 2 68 595 -17172 4 69 595 -17176 1 73 595 -17177 2 74 595 -17179 3 75 595 -1717c 4 76 595 -17180 6 77 595 -17186 2 78 595 -17188 2 81 595 -1718a 3 82 595 -1718d 2 83 595 -1718f 2 84 595 -17191 2 85 595 -17193 2 86 595 -17195 6 87 595 -1719b 2 88 595 -1719d 2 91 595 -1719f 1 92 595 -171a0 2 93 595 -171a2 3 94 595 -171a5 1 95 595 -171a6 2 96 595 -171a8 2 101 595 -171aa 5 102 595 -171af 2 104 595 -171b1 2 105 595 -171b3 2 107 595 -171b5 2 108 595 -171b7 2 110 595 -171b9 3 111 595 -171bc 3 113 595 -171bf 2 114 595 -171c1 2 116 595 -171c3 3 117 595 -171c6 6 119 595 -171cc 2 120 595 -171ce 5 124 595 -171d3 2 125 595 -171d5 5 127 595 -171da 2 128 595 -171dc 6 130 595 -171e2 2 131 595 -171e4 1 134 595 -171e5 1 135 595 -171e6 1 137 595 -171e7 2 138 595 -171e9 1 139 595 -171ea 3 142 595 -171ed 2 143 595 -171ef 2 144 595 -171f1 2 145 595 -171f3 2 146 595 -171f5 2 147 595 -171f7 2 148 595 -171f9 2 149 595 -171fb 2 150 595 -171fd 3 151 595 -17200 2 152 595 -17202 2 153 595 -17204 2 154 595 -17206 2 155 595 -17208 2 156 595 -1720a 2 157 595 -1720c 2 158 595 -1720e 2 159 595 -17210 2 160 595 -17212 1 163 595 -17213 1 164 595 -17214 3 165 595 -17217 1 166 595 -17218 1 167 595 -17219 3 170 595 -1721c 1 171 595 -1721d 1 172 595 -1721e 1 173 595 -1721f 1 174 595 -17220 3 177 595 -17223 1 178 595 -17224 1 179 595 -17225 1 180 595 -17226 1 181 595 -17227 3 184 595 -1722a 1 185 595 -1722b 1 186 595 -1722c 1 187 595 -1722d 1 188 595 -PUBLIC 17176 0 __from_strstr_to_strchr -STACK WIN 4 1060 54 6 0 8 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10c0 a 3 0 0 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f0 21 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1120 14 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1140 16 7 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1160 1e 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1190 10 7 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11b0 7 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11c0 2c 7 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11f7 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1206 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1214 1c 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1215 18 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1230 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 123f 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1247 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1262 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 127e 1f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 129d 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12a1 b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12ac 5 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12b1 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12b6 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12c0 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12ca a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12d4 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12de a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12e8 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 130c 41 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 134d 1b6 c 0 0 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c5 14 0 0 0 c 2c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1503 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 150d 22 3 0 18 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 152f 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1596 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 159f f5 c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1688 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1694 70 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16fb 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1704 31 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1735 eb c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1814 b 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1820 53 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 186a 8 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1908 8e c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 195e 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1996 3d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19d3 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 19e1 24 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a05 26 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a2b 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a40 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a49 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a52 18 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a53 16 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a6a 20 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a6b 1e 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a8a 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1a8f 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ac1 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1ac6 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1afd 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b02 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b39 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b3e 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b75 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1b7a 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bb1 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bb6 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1be8 37 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1bed 31 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c1f 92 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c5d 34 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1c5e 32 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1cb1 e2 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1d7b 11 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1d93 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1da4 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1db5 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dc4 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd3 4c 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1dd4 4a 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1e1f 1a0 8 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1e21 19c 6 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e26 196 1 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e27 194 0 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 1e44 176 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 20 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 1fbf 20 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1fdf 39 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2018 1 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2019 32 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2024 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 204b 15e 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2051 156 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2069 13d 0 0 8 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 206f 136 0 0 8 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 21a9 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21c4 db b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 21c5 c3 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 21ce b9 1 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 21cf b7 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 221e 67 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 229f a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 22a9 198 e 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 22b1 187 6 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 22b7 180 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 2441 b9 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2448 b0 a 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 2451 a6 1 0 0 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 2452 a4 0 0 0 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 24fa 135 b 0 0 0 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2502 12a 3 0 0 4 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 2503 128 2 0 0 8 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 2504 126 1 0 0 c 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 2505 124 0 0 0 10 8 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 16 - ^ = $ebx $T0 12 - ^ = -STACK WIN 4 262f 240 c 0 0 c 64 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2858 4 0 0 0 c 64 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 286f 4c 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2870 4a 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2871 48 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bb 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bc 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28bd 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28df 24 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28e0 22 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 28e1 20 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2903 6c 7 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2909 64 1 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 290a 62 0 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 292a 41 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 296f 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2970 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29dd 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29e6 6e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 29e7 6c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a54 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a5d 15 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a72 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a78 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2a79 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2aaa 19 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2ac3 3d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2b00 bf c 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2bb6 8 0 0 8 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2bbf 77 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2bc0 75 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2bc1 71 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c36 18 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c37 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2c4e 121 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2d57 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2d63 b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 2d6f 69 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2d79 4b 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2d82 25 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2dd8 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2dde 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2de4 184 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2de5 182 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2e00 166 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 2f68 5b 6 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2f6e 43 0 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 2fc3 5a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 301d 74 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 301e 72 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 302a 53 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 3031 4b 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 303c 30 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 3091 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3100 24 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3130 196 14 0 10 0 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3134 d3 10 0 10 4 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 24 - ^ = -STACK WIN 4 3139 cd b 0 10 8 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 313a cb a 0 10 c 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 3144 c0 0 0 10 10 14 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 28 - ^ = $ebx $T0 24 - ^ = -STACK WIN 4 32c6 94 15 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 32da 7e 1 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 32db 7c 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 32f7 5f 0 0 0 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 335a a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3364 fc 1c 0 14 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3460 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3461 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3482 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 348f 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3498 24 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 34bc 10 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34cc 9 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 34d5 49 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34d6 3b 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 34d7 39 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 351e 55 8 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 351f 53 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 3526 4b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 352c 2a 0 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 3573 15 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3588 18 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 35a0 c3 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 365a 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 3663 31 7 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 366a 28 0 0 4 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 3694 65 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3699 5f 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 369e 59 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 369f 57 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 378b 6 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3791 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37ac 26 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37ad 24 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 37d2 63 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3835 474 a 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 383c 42e 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 383d 42c 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 383e 42a 1 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 383f 428 0 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 3ca9 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cb4 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cc1 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ccf e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cdd e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ceb e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3cf9 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d0b e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d19 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d27 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d35 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d40 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d4b b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d56 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d64 b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d6f e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d7d 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d96 84 13 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d97 80 12 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3d98 7e 11 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3dbe 57 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 12 - ^ = -STACK WIN 4 3e1a d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e27 12 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e39 9c 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3e4c 86 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ed5 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3edf 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ee4 7 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3eeb a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ef5 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3efd a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f07 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f11 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f19 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f23 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f2b a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f35 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f3d a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f47 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f4f 7b 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3f52 75 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3fca 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3fd3 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 3ff8 d 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4005 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4009 29 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 401b f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4032 16 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4048 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 404c 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4050 1b 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 406b 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 406f 2f 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 409e 25 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40c3 4 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40c7 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40d4 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 40e2 20 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4102 25 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4127 33 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 415a 34 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 418e 13 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41a1 56 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41a7 4d 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f7 61 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f8 5d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 41f9 59 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4258 17 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 426f 15 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4284 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4298 e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42a6 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42ba 25 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42bb 23 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42c7 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42df 38 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42e0 36 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 42e1 32 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4317 91 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 431b 89 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 431c 87 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4351 40 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 43a8 35 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43ab 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43dd 81 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43de 7d a 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 43df 79 9 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 445e 1e 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 445f 1c 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 447c 47 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 447d 43 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44c3 47 7 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 44c4 45 6 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 44c5 43 5 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 44c6 41 4 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 450a 65 11 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 450b 61 10 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4510 5b b 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4511 57 a 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 456f 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4581 31 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45b2 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45c1 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45d0 1d 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 45ed 33 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4620 73 7 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4624 6b 3 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4625 5b 2 0 14 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4693 2f 3 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 46c2 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d1 79 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d2 75 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 46d3 71 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 474a 68 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 474b 64 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47b2 a6 3 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47b3 a2 2 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 47d3 81 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 47e5 6e 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 4858 26 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4859 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 487e 31 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4883 29 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 48af d0 7 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 48b3 b3 3 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 48b4 b1 2 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 48c3 9f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 497f 69 13 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4990 4f 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 4991 4b 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 4992 49 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 49e8 96 22 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 49fc 79 e 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4a0a 66 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4a2f 29 0 0 8 c 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 4a7e 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4a7f 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aac 62 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aad 5e 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4aae 5a 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b0e 8b a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b0f 87 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b10 83 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b99 1c 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4b9a 18 8 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bb5 2a 7 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bba 22 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4bdf a6 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4c85 37 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4cbc 51 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4cbd 4d 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d0d 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d0e 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d3b 6a a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4d3c 66 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4d43 5e 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 4da5 6c a 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4da6 68 9 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4da7 64 8 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4e11 e0 e 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e18 d7 7 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e1f cd 0 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4e3a b1 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 4ef1 4f 6 0 8 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4ef7 47 0 0 8 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f40 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f62 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4f84 22 5 0 c 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 4fa6 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fa7 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fd4 2e 1 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 4fd5 2a 0 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5002 141 7 0 8 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5009 138 0 0 8 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 508a b3 0 0 8 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 508b b1 0 0 8 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 5143 d4 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5217 c4 e 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 52db 7e d 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5359 125 11 0 10 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 536a 112 0 0 10 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 547e 15f f 0 8 0 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 548d 4a 0 0 8 4 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 54e5 b3 0 0 8 8 28 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 55dd 31 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 560e 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5620 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5632 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5644 150 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 564b 147 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5794 a0 6 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5834 50 5 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5884 2bb 2b 0 4 0 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 589f 296 10 0 4 4 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 58a8 28a 7 0 4 8 d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 58af 282 0 0 4 c d0 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 5b3f d9 b 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5bad 17 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c18 14 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 5c2c 1b8 18 0 4 0 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c3d 1a0 7 0 4 4 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c44 18d 0 0 4 8 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5c65 168 0 0 4 c 60 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 108 - ^ = -STACK WIN 4 5de4 56f 22 0 c 0 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 5df8 97 e 0 c 4 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 5e06 88 0 0 c 8 a0 0 1 $T0 $ebp 108 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 164 - ^ = -STACK WIN 4 6353 153 10 0 8 0 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6377 11b 0 0 8 4 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 637e 113 0 0 8 8 d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 6387 109 0 0 8 c d0 0 1 $T0 $ebp 112 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 212 - ^ = -STACK WIN 4 64a6 1ea 1b 0 8 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 64c1 1c8 0 0 8 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6549 111 0 0 8 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 654a 10f 0 0 8 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 64 - ^ = -STACK WIN 4 6690 e4 15 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6697 db e 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 66a5 ca 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6774 f 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 6783 100 19 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 678f f2 d 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 679c e4 0 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 6883 46 3 0 4 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 68c9 92 6 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 695b b42 14 0 8 0 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 6966 b35 9 0 8 4 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 696f b2b 0 0 8 8 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 69d8 abe 0 0 8 c 6c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 120 - ^ = -STACK WIN 4 749d 211 13 0 4 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 74a4 208 c 0 4 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 74b0 1fb 0 0 4 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 76ae 28b 1f 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 76ba 27a 13 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 76bb 278 12 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 76cd 263 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 7939 341 d 0 8 0 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 797e 2f7 0 0 8 4 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 79e5 28f 0 0 8 8 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 79e6 28d 0 0 8 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 52 - ^ = -STACK WIN 4 7c7a 4e4 18 0 14 0 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 7c88 4d4 a 0 14 4 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 7c89 4d2 9 0 14 8 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 7c92 4c8 0 0 14 c 54 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 88 - ^ = -STACK WIN 4 815e 14c 6 0 0 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 82aa 116 5 0 10 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 82cb 59 0 0 10 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 83c0 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 83db 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 83f6 1b 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8411 a3 f 0 18 c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 84ab 8 0 0 18 c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 84b4 a3 f 0 1c c 94 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 854e 8 0 0 1c c 94 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8557 387 12 0 8 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8567 350 2 0 8 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 8568 34e 1 0 8 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 8569 34c 0 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 88de 13e 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 88e5 135 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8a1c b1 6 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8acd 64 7 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ad4 5b 0 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8b31 4f c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8b77 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 8b80 75 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bc8 2c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bf5 c3 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8bf6 c1 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 8c04 9c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8c0b 94 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8c0c 90 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 8cb8 3b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8cf3 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d06 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d19 1e 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d1a 1c 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d37 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d52 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d53 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d7c 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d97 2a 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8d98 28 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8dc1 21 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8de2 46 b 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8ded 3a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e28 3c 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e2d 36 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8e64 48 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8eac 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 8ed7 314 11 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ee4 305 4 0 8 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8ee8 300 0 0 8 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 8f15 2d2 0 0 8 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 91eb b0 d 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 91f1 a9 7 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 91f8 a1 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 929b 106 11 0 4 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 92a7 f8 5 0 4 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 92a8 f6 4 0 4 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 92ac f1 0 0 4 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 93a1 2df 12 0 c 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 93ae 2d0 5 0 c 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 93af 2ce 4 0 c 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 93b3 2c9 0 0 c c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 9680 cd 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 974d 2e2 f 0 0 0 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 975c 294 0 0 0 4 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9771 27e 0 0 0 8 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9774 27a 0 0 0 c 138 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 316 - ^ = -STACK WIN 4 9a2f a8 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a30 a6 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9a78 5d 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9ad7 2e3 2a 0 4 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9afb 2bd 6 0 4 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9b00 2b7 1 0 4 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9b01 2b5 0 0 4 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 9dba 39 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9dda 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9df3 13 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e06 37 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9e2a 4 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9e3d 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e4e b9 5 0 4 0 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9e50 b5 3 0 4 4 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 9e51 b3 2 0 4 8 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9e52 b1 1 0 4 c 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9e53 af 0 0 4 10 4 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 9f07 2f 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f08 2d 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f36 3c c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 9f6c 5 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 9f72 12 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f84 1f 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f85 1d 1 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9f86 1b 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fb0 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fe0 42 18 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 9fee 33 a 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 9fef 31 9 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 9ff8 27 0 0 8 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 a030 bb 33 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a04a a1 19 0 4 10 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 a0b9 14 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 a0eb 19 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a104 9b c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a17d 9 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a19f 34 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1aa 1d 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1d3 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1e0 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1e9 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a1f2 23d c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a3e7 b 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a42f 1b0 c 0 4 c 30 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a59d 14 0 0 4 c 30 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a5df a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a5e9 104 3 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a5ea 102 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a5eb 100 1 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a5ec fe 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = -STACK WIN 4 a625 c4 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 16 - ^ = -STACK WIN 4 a6ed 15a 24 0 14 0 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a706 bc b 0 14 4 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a707 b8 a 0 14 8 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a711 ad 0 0 14 c 94 0 1 $T0 $ebp 100 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 152 - ^ = -STACK WIN 4 a847 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a851 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a85b 10 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a86b c5 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a8f1 17 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 a930 a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a93a 31 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a93b 2f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a96b 9 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a974 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a981 22 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 a9a3 1bd 9 0 c 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 a9aa 1b4 2 0 c 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 a9ab 1b2 1 0 c 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 a9ac 1b0 0 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 ab60 71 b 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ab65 6b 6 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ab6a 65 1 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ab6b 63 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 abd1 b3 e 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 abd5 1a a 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 abd6 2e 9 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 abdf e 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 ac84 46 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ac89 40 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acca a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acd4 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acda 21 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acdb 1f 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 acfb 10 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0b 40 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0c 3e 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad0d 3c 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4b 48 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4c 46 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad4d 44 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad93 4b 2 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad94 49 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ad95 47 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 adde 50 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 addf 4e 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ade0 4c 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae2e 8 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae36 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae40 a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae4a e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae58 3 2 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae5b 2f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae8a 55 b 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ae8b 53 a 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 ae8c 51 9 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ae8d 4f 8 0 0 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 ae8e 4d 7 0 0 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 aedf 18a 1d 0 0 0 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 aefb 161 1 0 0 4 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 aefc 15d 0 0 0 8 51c 0 1 $T0 $ebp 1180 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 1312 - ^ = -STACK WIN 4 b069 a4 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b101 b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 b10d 82 9 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b114 78 2 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b18f 7a 7 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b196 71 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 b209 1d9 19 0 8 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b21a 1c1 8 0 8 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b21e 1ba 4 0 8 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b222 1b5 0 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 b3e2 3c 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b41e 19a c 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b57f 8 0 0 4 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 b5b8 1e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b5d6 51 6 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b627 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b63c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b64f 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b664 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b677 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b68c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b69f 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6b7 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6cd 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6e5 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b6fb 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b713 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b729 18 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b741 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b757 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b76c 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b77f 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b794 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7a7 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7bc 13 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 b7cf 53 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 b822 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bb95 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bb9b 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bba1 140 12 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bba2 13e 11 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 bba3 13c 10 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bba4 13a f 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bbb3 12a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce1 86 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bce2 84 7 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 bce3 82 6 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce4 80 5 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bce9 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 bd67 8c 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bd68 8a 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bd71 7e 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 bd72 7c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 bd73 7a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 12 - ^ = $ebx $T0 8 - ^ = -STACK WIN 4 bdf3 24 3 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bdf4 22 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be03 12 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be17 3e 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be20 31 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 be55 76 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 bebf 8 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 becb 66 2 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 becc 64 1 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 becd 62 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bf31 53 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 bf84 96 c 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c00e b 0 0 4 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 c01a 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c01f 88 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c09b b 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 c0a7 5 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0ac 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0af 3e 2 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c0b0 3c 1 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0b1 3a 0 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0bc 2e 0 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 c0ed 129 6 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c0f1 123 2 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c0f2 121 1 0 8 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c0f3 11f 0 0 8 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c216 6b 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c21a 4d 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c21b 4b 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 c281 171 4 0 0 0 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 c285 169 0 0 0 4 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 20 - ^ = -STACK WIN 4 c2a4 149 0 0 0 8 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 c2a5 141 0 0 0 c 10 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 24 - ^ = $ebx $T0 20 - ^ = -STACK WIN 4 c3f2 1d4 1e 0 18 0 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c40b 1b1 5 0 18 4 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c40c 1ad 4 0 18 8 b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c410 1a8 0 0 18 c b4 0 1 $T0 $ebp 96 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 184 - ^ = -STACK WIN 4 c5c6 2f6 17 0 4 0 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c5dc 2d6 1 0 4 4 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 c5dd 2d2 0 0 4 8 1c4 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 456 - ^ = -STACK WIN 4 c8bc 1ce 18 0 4 0 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 c8d5 1ab 0 0 4 4 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 c8d6 1a7 0 0 4 8 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 c8dd 19f 0 0 4 c 98 0 1 $T0 $ebp 116 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 156 - ^ = -STACK WIN 4 ca8a f3 7 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ca90 2c 1 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ca91 2a 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cb7d 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cb82 170 c 0 8 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 cca8 10 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccb9 b 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccea 7 0 0 8 c 24 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 ccf2 f 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ce57 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ceda 2a 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf04 22 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf05 20 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 cf26 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d014 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d025 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d03a 5 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d03f 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d044 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d055 15 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d3d5 f3 23 0 0 4 328 0 1 $T0 $ebp 680 + = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d4c8 1e 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d4e6 a3 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d578 10 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 d589 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d592 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d5e6 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d611 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d660 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d689 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d6d8 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d701 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d750 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d779 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d7cd 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d7f8 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d847 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d870 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d8bf 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d8e8 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d93c 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d967 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 d9bb 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 d9e6 54 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 da3a 2b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 da65 4f 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dab4 29 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 dadd d 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 daea 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 daf2 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db11 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db2b 1f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db4a 1c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db66 12 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db78 1b 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 db93 13b 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dba8 126 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 dcce 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dd09 13d 1d 0 18 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dd1e 128 8 0 18 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 de46 3b 6 0 18 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 de81 11e c 0 c c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 df78 d 0 0 c c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 df9f 3f 9 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfa8 34 0 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfc1 18 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 dfde 21b c 0 8 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e11c e 0 0 8 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 e1f9 79 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e200 70 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e236 39 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e237 37 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 e272 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e28c 3a2 1d 0 20 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e29d 391 c 0 20 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 e62e 43 6 0 24 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e671 1b8 1d 0 1c 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e686 1a3 8 0 1c c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 e829 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 e869 87 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e8f0 e3 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9d3 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9e7 14 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 e9fb 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ea01 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ea2a 419 6 0 0 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 ea4c 3f5 0 0 0 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 ea4d 3ed 0 0 0 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 ee43 190 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ee44 18e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 efd3 73 4 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 efd4 71 3 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 efd5 6f 2 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 efd6 6d 1 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 efd7 6b 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 f046 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f04d 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f04e 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f079 40 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f07a 3e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f0b9 1c8 11 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f0c0 1bf a 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f0c4 1ba 6 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f0ca 1b3 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 f281 33 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f288 16 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f289 14 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 f2b4 89 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f2b5 87 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f33d 2c4 c 0 4 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f344 2bb 5 0 4 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f345 2b9 4 0 4 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f349 2b4 0 0 4 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 f601 395 1b 0 4 0 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 f612 37d a 0 4 4 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f615 377 7 0 4 8 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f61c 36f 0 0 4 c 48 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 76 - ^ = -STACK WIN 4 f996 29 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9bf 16 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9d5 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 f9fb 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa21 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa47 3 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fa4a fe 9 0 4 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fa51 e9 2 0 4 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fa52 e7 1 0 4 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fa53 e5 0 0 4 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 fb48 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fb51 fe 9 0 4 0 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fb58 e9 2 0 4 4 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fb59 e7 1 0 4 8 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fb5a e5 0 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 fc4f 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 fc58 355 9 0 4 0 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 fc5f 34c 2 0 4 4 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 fc60 348 1 0 4 8 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 fc61 346 0 0 4 c 24 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 40 - ^ = -STACK WIN 4 ffad 9 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffb6 20 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffba 1b 2 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffbf 15 0 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffd6 36 6 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 ffdc 2f 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 1000c 79 8 0 4 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10011 72 3 0 4 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10012 70 2 0 4 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10085 3e6 11 0 10 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1008a 3df c 0 10 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10091 3d7 5 0 10 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 10092 3d5 4 0 10 c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 1046b 45d 1d 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1047f 449 9 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 108c8 1af a 0 18 0 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 108d2 1a3 0 0 18 4 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 10918 15c 0 0 18 8 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 1094b 128 0 0 18 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 36 - ^ = -STACK WIN 4 10a77 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10a95 1d 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10ab2 1e 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10ad0 26 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10b46 60 6 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10b4c 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10b55 45 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10b56 43 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 10ba6 14 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10bba 77 11 0 0 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10bcb 5f 0 0 0 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10c31 1e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c4f 32 1 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c50 30 0 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c81 1b 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 10c9c 96 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10cad 7c 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10cae 78 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d32 72 11 0 8 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d43 5a 0 0 8 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10d7f 13 0 0 8 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10da4 1d0 13 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10db5 1b6 2 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10db6 1b2 1 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10db7 1b0 0 0 4 c 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 128 - ^ = -STACK WIN 4 10f74 bf 12 0 4 0 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f85 a5 1 0 4 4 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 10f86 a1 0 0 4 8 7c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 11033 2c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1105f 65 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 110c4 3c 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11100 1e3 4 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 11101 1e1 3 0 c 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 11102 1df 2 0 c 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 11103 1dd 1 0 c c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 11104 1db 0 0 c 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 112e3 12 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 112f5 18 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1130d 40 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1134d 78 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c5 1490 4 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c6 83f 3 0 0 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 113c7 83d 2 0 0 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 12855 1680 5 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 12859 15f8 1 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1285a 15f6 0 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1288b 86c 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 13ed5 be 9 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 13ede a9 0 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 13ef0 96 0 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 13fe0 104 9 0 0 0 328 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1421b 57 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14272 8f 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14301 22b 8 0 14 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14308 222 1 0 14 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14309 220 0 0 14 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14367 1c1 0 0 14 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 32 - ^ = -STACK WIN 4 1452c 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14555 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14570 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1459a 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 145b5 294 8 0 14 0 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 145bc 28b 1 0 14 4 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 145bd 289 0 0 14 8 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 14619 1f9 0 0 14 c 38 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 60 - ^ = -STACK WIN 4 14849 29 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14872 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1488d 2a 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 148b7 1b 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 148d2 b6 7 0 c 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 148d9 ad 0 0 c 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 14988 2f 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 149ec 47 10 0 4 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14a33 1b2 2a 0 18 8 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14a50 195 d 0 18 c 34 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 56 - ^ = -STACK WIN 4 14be5 50 c 0 0 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c02 1c 0 0 0 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 14c35 60 9 0 0 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14c3e 57 0 0 0 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 14c95 d 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ca2 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14ca7 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cd6 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14cdb 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d0a 34 5 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d0f 2e 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14d3e a2 c 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 14d45 99 5 0 10 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14d4a 93 0 0 10 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14d58 84 0 0 10 c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 14de0 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14de6 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14dec 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14df2 6 0 0 0 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14df8 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e04 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e10 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 14e1c 349 c 0 0 c 3c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 150c6 d 0 0 0 c 3c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15165 1f5 14 0 24 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15174 1e4 5 0 24 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15175 1e2 4 0 24 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15176 1e0 3 0 24 c c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 1535a 1ae 5 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1535f 15f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1538f 12e 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 15508 4f c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1554e 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15557 38 c 0 0 c 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15586 8 0 0 0 c 18 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 1558f 41 c 0 4 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 155c7 8 0 0 4 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 155d0 35 a 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 155d5 2f 5 0 8 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 155da 27 0 0 8 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15605 d3 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1560c ca 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1564d 88 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 15695 33 0 0 c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 156d8 50 4 0 8 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 156dc 4a 0 0 8 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15728 36 6 0 8 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1575e e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1576c 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15782 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15793 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157a6 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157b4 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157c7 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157d5 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157e8 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 157f6 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1580c 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1581d 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15830 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1583e 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15851 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1585f 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15875 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15886 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1589c 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158ad 16 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158c3 11 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158d4 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158e7 e 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 158f5 c 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15901 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15927 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15948 26 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1596e 21 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1598f f0 e 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15996 e7 7 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1599c e0 1 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1599d de 0 0 10 c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 15a7f 5c 4 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15a83 56 0 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15adb db 8 0 c 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15ae0 d2 3 0 c 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15ae1 d0 2 0 c 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15b0b a5 0 0 c c 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 15bb6 28 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15bde 25 3 0 10 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c03 18 0 0 10 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15c1b f6 c 0 14 0 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15c22 eb 5 0 14 4 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15c27 e5 0 0 14 8 c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 16 - ^ = -STACK WIN 4 15d11 33 3 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d2c 16 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d44 1d 4 0 14 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d48 17 0 0 14 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15d9b 81 8 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15da3 70 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 15db2 60 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 15db3 5e 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 8 - ^ = -STACK WIN 4 15e1c 93 7 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15e20 8d 3 0 c 4 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15e21 8b 2 0 c 8 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15e60 4b 0 0 c c 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 4 - ^ = -STACK WIN 4 15eaf a2 6 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15eb4 9b 1 0 8 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15eb5 99 0 0 8 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15f51 83 c 0 4 c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 15fcb 8 0 0 4 c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 15fd4 d8 c 0 10 c 1c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 160a3 8 0 0 10 c 1c 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 160ac e6 c 0 c c 20 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16189 8 0 0 c c 20 0 1 $T0 $ebp = $T2 $esp = $T1 .raSearchStart = $eip $T1 ^ = $ebp $T0 = $esp $T1 4 + = $L $T0 .cbSavedRegs - = $P $T1 4 + .cbParams + = -STACK WIN 4 16192 8 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1619a 117 8 0 8 0 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 161a1 10e 1 0 8 4 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 161a2 10c 0 0 8 8 18 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 28 - ^ = -STACK WIN 4 162b1 27 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 162d8 82 6 0 c 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1635a 6e 4 0 8 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 163c8 5 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16431 ec 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16438 e3 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16498 82 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 1651d 17 0 0 c 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16534 95 a 0 0 0 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 1653a 7d 4 0 0 4 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1653b 7b 3 0 0 8 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 1653e 77 0 0 0 c 8 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 12 - ^ = -STACK WIN 4 165c9 1a 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 165e3 224 17 0 1c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 165f8 20f 2 0 1c c 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16807 3e 6 0 1c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16845 1a 0 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1685f 389 16 0 18 8 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16873 375 2 0 18 c 2c 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 48 - ^ = -STACK WIN 4 16be8 40 6 0 20 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16c28 f8 7 0 10 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16c2f ef 0 0 10 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16c8f 8e 0 0 10 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 16d20 27 3 0 c 0 0 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16d47 4d 1 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16d48 48 0 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 16d94 5d 4 0 0 0 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16db0 3f 0 0 0 4 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 16db1 3d 0 0 0 8 4 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 8 - ^ = -STACK WIN 4 16df1 24c f 0 8 0 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 16dfb 95 5 0 8 4 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 16e00 8f 0 0 8 8 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 16e23 6b 0 0 8 c 14 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 24 - ^ = -STACK WIN 4 1703d 50 6 0 4 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 4 1703e 4e 5 0 4 4 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = -STACK WIN 4 17043 48 0 0 4 8 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1704e 3c 0 0 4 c 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1704f 3a 0 0 4 10 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 8 - ^ = $ebx $T0 4 - ^ = -STACK WIN 4 1708d ba 7 0 c 0 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = -STACK WIN 4 17094 b1 0 0 c 4 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 170d1 73 0 0 c 8 10 0 1 $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $L $T0 .cbSavedRegs - = $P $T0 8 + .cbParams + = $ebx $T0 20 - ^ = -STACK WIN 4 17147 13 0 0 8 0 0 0 1 $T2 $esp .cbLocals + .cbSavedRegs + = $T0 .raSearchStart = $eip $T0 ^ = $esp $T0 4 + = -STACK WIN 0 14c5 14 0 0 0 0 0 0 0 0 -STACK WIN 0 1596 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1688 c 0 0 0 0 0 0 0 0 -STACK WIN 0 16fb 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1814 c 0 0 0 0 0 0 0 0 -STACK WIN 0 186a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1880 88 0 0 8 0 0 0 0 0 -STACK WIN 0 195e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 1d7b 12 0 0 0 0 0 0 0 0 -STACK WIN 0 2858 4 0 0 0 0 0 0 0 0 -STACK WIN 0 2bb6 9 0 0 0 0 0 0 0 0 -STACK WIN 0 2d57 c 0 0 0 0 0 0 0 0 -STACK WIN 0 2d63 c 0 0 0 0 0 0 0 0 -STACK WIN 0 365a 9 0 0 0 0 0 0 0 0 -STACK WIN 0 3700 8b 0 0 4 0 0 0 0 0 -STACK WIN 0 84ab 9 0 0 0 0 0 0 0 0 -STACK WIN 0 854e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 8b77 9 0 0 0 0 0 0 0 0 -STACK WIN 0 9dda 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9e2a 4 0 0 0 0 0 0 0 0 -STACK WIN 0 9f6c 6 0 0 0 0 0 0 0 0 -STACK WIN 0 a0b9 14 0 0 0 0 0 0 0 0 -STACK WIN 0 a17d a 0 0 0 0 0 0 0 0 -STACK WIN 0 a3e7 c 0 0 0 0 0 0 0 0 -STACK WIN 0 a59d 15 0 0 0 0 0 0 0 0 -STACK WIN 0 a8f1 17 0 0 0 0 0 0 0 0 -STACK WIN 0 b101 c 0 0 0 0 0 0 0 0 -STACK WIN 0 b57f 9 0 0 0 0 0 0 0 0 -STACK WIN 0 bebf 9 0 0 0 0 0 0 0 0 -STACK WIN 0 c00e c 0 0 0 0 0 0 0 0 -STACK WIN 0 c09b c 0 0 0 0 0 0 0 0 -STACK WIN 0 cca8 11 0 0 0 0 0 0 0 0 -STACK WIN 0 ccb9 c 0 0 0 0 0 0 0 0 -STACK WIN 0 ccea 8 0 0 0 0 0 0 0 0 -STACK WIN 0 cd04 90 3 0 c c 0 0 0 0 -STACK WIN 0 cd94 46 0 0 10 4 0 0 0 1 -STACK WIN 0 cdf6 17 4 0 0 10 0 0 0 1 -STACK WIN 0 ce0d 19 0 0 0 0 0 0 0 0 -STACK WIN 0 ce40 17 1 0 8 4 0 0 0 1 -STACK WIN 0 ce60 7a 0 0 c 0 0 0 0 0 -STACK WIN 0 d578 11 0 0 0 0 0 0 0 0 -STACK WIN 0 df78 e 0 0 0 0 0 0 0 0 -STACK WIN 0 e11c f 0 0 0 0 0 0 0 0 -STACK WIN 0 14149 84 3 0 8 c 0 0 0 0 -STACK WIN 0 141cd 23 0 0 0 0 0 0 0 0 -STACK WIN 0 14218 3 0 0 0 0 0 0 0 0 -STACK WIN 0 14c02 1c 0 0 0 0 0 0 0 0 -STACK WIN 0 150c6 e 0 0 0 0 0 0 0 0 -STACK WIN 0 1554e 9 0 0 0 0 0 0 0 0 -STACK WIN 0 15586 9 0 0 0 0 0 0 0 0 -STACK WIN 0 155c7 9 0 0 0 0 0 0 0 0 -STACK WIN 0 15fcb 9 0 0 0 0 0 0 0 0 -STACK WIN 0 160a3 9 0 0 0 0 0 0 0 0 -STACK WIN 0 16189 9 0 0 0 0 0 0 0 0 -STACK WIN 0 17170 be 0 0 8 0 0 0 0 0 diff --git a/thirdparty/google-breakpad/r318/src/tools/windows/symupload/symupload.cc b/thirdparty/google-breakpad/r318/src/tools/windows/symupload/symupload.cc deleted file mode 100644 index e2ec640e..00000000 --- a/thirdparty/google-breakpad/r318/src/tools/windows/symupload/symupload.cc +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Tool to upload an exe/dll and its associated symbols to an HTTP server. -// The PDB file is located automatically, using the path embedded in the -// executable. The upload is sent as a multipart/form-data POST request, -// with the following parameters: -// code_file: the basename of the module, e.g. "app.exe" -// debug_file: the basename of the debugging file, e.g. "app.pdb" -// debug_identifier: the debug file's identifier, usually consisting of -// the guid and age embedded in the pdb, e.g. -// "11111111BBBB3333DDDD555555555555F" -// version: the file version of the module, e.g. "1.2.3.4" -// os: the operating system that the module was built for, always -// "windows" in this implementation. -// cpu: the CPU that the module was built for, typically "x86". -// symbol_file: the contents of the breakpad-format symbol file - -#include -#include -#include - -#include -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/http_upload.h" -#include "common/windows/pdb_source_line_writer.h" - -using std::string; -using std::wstring; -using std::vector; -using std::map; -using google_breakpad::HTTPUpload; -using google_breakpad::PDBModuleInfo; -using google_breakpad::PDBSourceLineWriter; -using google_breakpad::WindowsStringUtils; - -// Extracts the file version information for the given filename, -// as a string, for example, "1.2.3.4". Returns true on success. -static bool GetFileVersionString(const wchar_t *filename, wstring *version) { - DWORD handle; - DWORD version_size = GetFileVersionInfoSize(filename, &handle); - if (version_size < sizeof(VS_FIXEDFILEINFO)) { - return false; - } - - vector version_info(version_size); - if (!GetFileVersionInfo(filename, handle, version_size, &version_info[0])) { - return false; - } - - void *file_info_buffer = NULL; - unsigned int file_info_length; - if (!VerQueryValue(&version_info[0], L"\\", - &file_info_buffer, &file_info_length)) { - return false; - } - - // The maximum value of each version component is 65535 (0xffff), - // so the max length is 24, including the terminating null. - wchar_t ver_string[24]; - VS_FIXEDFILEINFO *file_info = - reinterpret_cast(file_info_buffer); - swprintf(ver_string, sizeof(ver_string) / sizeof(ver_string[0]), - L"%d.%d.%d.%d", - file_info->dwFileVersionMS >> 16, - file_info->dwFileVersionMS & 0xffff, - file_info->dwFileVersionLS >> 16, - file_info->dwFileVersionLS & 0xffff); - - // remove when VC++7.1 is no longer supported - ver_string[sizeof(ver_string) / sizeof(ver_string[0]) - 1] = L'\0'; - - *version = ver_string; - return true; -} - -// Creates a new temporary file and writes the symbol data from the given -// exe/dll file to it. Returns the path to the temp file in temp_file_path -// and information about the pdb in pdb_info. -static bool DumpSymbolsToTempFile(const wchar_t *file, - wstring *temp_file_path, - PDBModuleInfo *pdb_info) { - google_breakpad::PDBSourceLineWriter writer; - // Use EXE_FILE to get information out of the exe/dll in addition to the - // pdb. The name and version number of the exe/dll are of value, and - // there's no way to locate an exe/dll given a pdb. - if (!writer.Open(file, PDBSourceLineWriter::EXE_FILE)) { - return false; - } - - wchar_t temp_path[_MAX_PATH]; - if (GetTempPath(_MAX_PATH, temp_path) == 0) { - return false; - } - - wchar_t temp_filename[_MAX_PATH]; - if (GetTempFileName(temp_path, L"sym", 0, temp_filename) == 0) { - return false; - } - - FILE *temp_file = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (_wfopen_s(&temp_file, temp_filename, L"w") != 0) { -#else // _MSC_VER >= 1400 - // _wfopen_s was introduced in MSVC8. Use _wfopen for earlier environments. - // Don't use it with MSVC8 and later, because it's deprecated. - if (!(temp_file = _wfopen(temp_filename, L"w"))) { -#endif // _MSC_VER >= 1400 - return false; - } - - bool success = writer.WriteMap(temp_file); - fclose(temp_file); - if (!success) { - _wunlink(temp_filename); - return false; - } - - *temp_file_path = temp_filename; - - return writer.GetModuleInfo(pdb_info); -} - -int wmain(int argc, wchar_t *argv[]) { - if (argc < 3) { - wprintf(L"Usage: %s \n", argv[0]); - return 0; - } - const wchar_t *module = argv[1], *url = argv[2]; - - wstring symbol_file; - PDBModuleInfo pdb_info; - if (!DumpSymbolsToTempFile(module, &symbol_file, &pdb_info)) { - fwprintf(stderr, L"Could not get symbol data from %s\n", module); - return 1; - } - - wstring code_file = WindowsStringUtils::GetBaseName(wstring(module)); - - map parameters; - parameters[L"code_file"] = code_file; - parameters[L"debug_file"] = pdb_info.debug_file; - parameters[L"debug_identifier"] = pdb_info.debug_identifier; - parameters[L"os"] = L"windows"; // This version of symupload is Windows-only - parameters[L"cpu"] = pdb_info.cpu; - - // Don't make a missing version a hard error. Issue a warning, and let the - // server decide whether to reject files without versions. - wstring file_version; - if (GetFileVersionString(module, &file_version)) { - parameters[L"version"] = file_version; - } else { - fwprintf(stderr, L"Warning: Could not get file version for %s\n", module); - } - - bool success = HTTPUpload::SendRequest(url, parameters, - symbol_file, L"symbol_file", - NULL, NULL); - _wunlink(symbol_file.c_str()); - - if (!success) { - fwprintf(stderr, L"Symbol file upload failed\n"); - return 1; - } - - wprintf(L"Uploaded symbols for windows-%s/%s/%s (%s %s)\n", - pdb_info.cpu.c_str(), pdb_info.debug_file.c_str(), - pdb_info.debug_identifier.c_str(), code_file.c_str(), - file_version.c_str()); - return 0; -} diff --git a/thirdparty/libs.pri b/thirdparty/libs.pri index e394d7dc..13f7e9f7 100644 --- a/thirdparty/libs.pri +++ b/thirdparty/libs.pri @@ -21,26 +21,10 @@ INCLUDEPATH += "$$XPDF_DIR" INCLUDEPATH += "$$XPDF_DIR/goo" INCLUDEPATH += "$$XPDF_DIR/splash" -BREAKPAD_DIR = "$$PWD/google-breakpad/r318" -INCLUDEPATH += "$$BREAKPAD_DIR/include" "$$BREAKPAD_DIR/include/google_breakpad" - win32 { -CONFIG(debug, debug|release) { - LIBS += "-L$$BREAKPAD_DIR/lib/$$SUB_LIB" "-ldbreakpad" -} -CONFIG(release, debug|release) { - LIBS += "-L$$BREAKPAD_DIR/lib/$$SUB_LIB" "-lbreakpad" -} LIBS += "-L$$PWD/openssl/0.9.8i/lib/VC/static" "-llibeay32MD" INCLUDEPATH += "$$PWD/openssl/0.9.8i/include" - LIBS += "-L$$PWD/microsoft/ppt/lib" "-lppt" - INCLUDEPATH += "$$PWD/microsoft/ppt/include" - - # need those link if we want to change default printer and print usind shell command - LIBS += "-L$$PWD/microsoft/lib" "-lWinspool" - LIBS += "-L$$PWD/microsoft/lib" "-lshell32" - LIBS += "-lWmvcore" LIBS += "-lWinmm" @@ -64,7 +48,6 @@ macx { LIBS += "-framework Carbon" LIBS += "-lcrypto" - LIBS += "-L$$BREAKPAD_DIR/lib/$$SUB_LIB" "-lbreakpad" LIBS += "$$PWD/unsanity/ape/APELite.o" INCLUDEPATH += "$$PWD/unsanity/ape" } diff --git a/thirdparty/microsoft/lib/WinSpool.Lib b/thirdparty/microsoft/lib/WinSpool.Lib deleted file mode 100644 index b2b2ac7a..00000000 Binary files a/thirdparty/microsoft/lib/WinSpool.Lib and /dev/null differ diff --git a/thirdparty/microsoft/lib/shell32.lib b/thirdparty/microsoft/lib/shell32.lib deleted file mode 100644 index 3553d68f..00000000 Binary files a/thirdparty/microsoft/lib/shell32.lib and /dev/null differ diff --git a/thirdparty/microsoft/ppt/include/MSO.h b/thirdparty/microsoft/ppt/include/MSO.h deleted file mode 100644 index 7add7d6b..00000000 --- a/thirdparty/microsoft/ppt/include/MSO.h +++ /dev/null @@ -1,33554 +0,0 @@ -/**************************************************************************** -** -** Namespace Office generated by dumpcpp from type library -** c:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLL -** -****************************************************************************/ - -#ifndef QAX_DUMPCPP_OFFICE_H -#define QAX_DUMPCPP_OFFICE_H - -// Define this symbol to __declspec(dllexport) or __declspec(dllimport) -#ifndef OFFICE_EXPORT -#define OFFICE_EXPORT -#endif - -#include -#include -#include -#include - -struct IDispatch; - - -// Referenced namespace - -namespace Office { - - enum DocProperties { - offPropertyTypeNumber = 1, - offPropertyTypeBoolean = 2, - offPropertyTypeDate = 3, - offPropertyTypeString = 4, - offPropertyTypeFloat = 5 - }; - - enum MailFormat { - mfPlainText = 1, - mfHTML = 2, - mfRTF = 3 - }; - - enum MsoAlertButtonType { - msoAlertButtonOK = 0, - msoAlertButtonOKCancel = 1, - msoAlertButtonAbortRetryIgnore= 2, - msoAlertButtonYesNoCancel= 3, - msoAlertButtonYesNo = 4, - msoAlertButtonRetryCancel= 5, - msoAlertButtonYesAllNoCancel= 6 - }; - - enum MsoAlertCancelType { - msoAlertCancelDefault = -1, - msoAlertCancelFirst = 0, - msoAlertCancelSecond = 1, - msoAlertCancelThird = 2, - msoAlertCancelFourth = 3, - msoAlertCancelFifth = 4 - }; - - enum MsoAlertDefaultType { - msoAlertDefaultFirst = 0, - msoAlertDefaultSecond = 1, - msoAlertDefaultThird = 2, - msoAlertDefaultFourth = 3, - msoAlertDefaultFifth = 4 - }; - - enum MsoAlertIconType { - msoAlertIconNoIcon = 0, - msoAlertIconCritical = 1, - msoAlertIconQuery = 2, - msoAlertIconWarning = 3, - msoAlertIconInfo = 4 - }; - - enum MsoAlignCmd { - msoAlignLefts = 0, - msoAlignCenters = 1, - msoAlignRights = 2, - msoAlignTops = 3, - msoAlignMiddles = 4, - msoAlignBottoms = 5 - }; - - enum MsoAnimationType { - msoAnimationIdle = 1, - msoAnimationGreeting = 2, - msoAnimationGoodbye = 3, - msoAnimationBeginSpeaking= 4, - msoAnimationRestPose = 5, - msoAnimationCharacterSuccessMajor= 6, - msoAnimationGetAttentionMajor= 11, - msoAnimationGetAttentionMinor= 12, - msoAnimationSearching = 13, - msoAnimationPrinting = 18, - msoAnimationGestureRight= 19, - msoAnimationWritingNotingSomething= 22, - msoAnimationWorkingAtSomething= 23, - msoAnimationThinking = 24, - msoAnimationSendingMail = 25, - msoAnimationListensToComputer= 26, - msoAnimationDisappear = 31, - msoAnimationAppear = 32, - msoAnimationGetArtsy = 100, - msoAnimationGetTechy = 101, - msoAnimationGetWizardy = 102, - msoAnimationCheckingSomething= 103, - msoAnimationLookDown = 104, - msoAnimationLookDownLeft= 105, - msoAnimationLookDownRight= 106, - msoAnimationLookLeft = 107, - msoAnimationLookRight = 108, - msoAnimationLookUp = 109, - msoAnimationLookUpLeft = 110, - msoAnimationLookUpRight = 111, - msoAnimationSaving = 112, - msoAnimationGestureDown = 113, - msoAnimationGestureLeft = 114, - msoAnimationGestureUp = 115, - msoAnimationEmptyTrash = 116 - }; - - enum MsoAppLanguageID { - msoLanguageIDInstall = 1, - msoLanguageIDUI = 2, - msoLanguageIDHelp = 3, - msoLanguageIDExeMode = 4, - msoLanguageIDUIPrevious = 5 - }; - - enum MsoArrowheadLength { - msoArrowheadLengthMixed = -2, - msoArrowheadShort = 1, - msoArrowheadLengthMedium= 2, - msoArrowheadLong = 3 - }; - - enum MsoArrowheadStyle { - msoArrowheadStyleMixed = -2, - msoArrowheadNone = 1, - msoArrowheadTriangle = 2, - msoArrowheadOpen = 3, - msoArrowheadStealth = 4, - msoArrowheadDiamond = 5, - msoArrowheadOval = 6 - }; - - enum MsoArrowheadWidth { - msoArrowheadWidthMixed = -2, - msoArrowheadNarrow = 1, - msoArrowheadWidthMedium = 2, - msoArrowheadWide = 3 - }; - - enum MsoAutoShapeType { - msoShapeMixed = -2, - msoShapeRectangle = 1, - msoShapeParallelogram = 2, - msoShapeTrapezoid = 3, - msoShapeDiamond = 4, - msoShapeRoundedRectangle= 5, - msoShapeOctagon = 6, - msoShapeIsoscelesTriangle= 7, - msoShapeRightTriangle = 8, - msoShapeOval = 9, - msoShapeHexagon = 10, - msoShapeCross = 11, - msoShapeRegularPentagon = 12, - msoShapeCan = 13, - msoShapeCube = 14, - msoShapeBevel = 15, - msoShapeFoldedCorner = 16, - msoShapeSmileyFace = 17, - msoShapeDonut = 18, - msoShapeNoSymbol = 19, - msoShapeBlockArc = 20, - msoShapeHeart = 21, - msoShapeLightningBolt = 22, - msoShapeSun = 23, - msoShapeMoon = 24, - msoShapeArc = 25, - msoShapeDoubleBracket = 26, - msoShapeDoubleBrace = 27, - msoShapePlaque = 28, - msoShapeLeftBracket = 29, - msoShapeRightBracket = 30, - msoShapeLeftBrace = 31, - msoShapeRightBrace = 32, - msoShapeRightArrow = 33, - msoShapeLeftArrow = 34, - msoShapeUpArrow = 35, - msoShapeDownArrow = 36, - msoShapeLeftRightArrow = 37, - msoShapeUpDownArrow = 38, - msoShapeQuadArrow = 39, - msoShapeLeftRightUpArrow= 40, - msoShapeBentArrow = 41, - msoShapeUTurnArrow = 42, - msoShapeLeftUpArrow = 43, - msoShapeBentUpArrow = 44, - msoShapeCurvedRightArrow= 45, - msoShapeCurvedLeftArrow = 46, - msoShapeCurvedUpArrow = 47, - msoShapeCurvedDownArrow = 48, - msoShapeStripedRightArrow= 49, - msoShapeNotchedRightArrow= 50, - msoShapePentagon = 51, - msoShapeChevron = 52, - msoShapeRightArrowCallout= 53, - msoShapeLeftArrowCallout= 54, - msoShapeUpArrowCallout = 55, - msoShapeDownArrowCallout= 56, - msoShapeLeftRightArrowCallout= 57, - msoShapeUpDownArrowCallout= 58, - msoShapeQuadArrowCallout= 59, - msoShapeCircularArrow = 60, - msoShapeFlowchartProcess= 61, - msoShapeFlowchartAlternateProcess= 62, - msoShapeFlowchartDecision= 63, - msoShapeFlowchartData = 64, - msoShapeFlowchartPredefinedProcess= 65, - msoShapeFlowchartInternalStorage= 66, - msoShapeFlowchartDocument= 67, - msoShapeFlowchartMultidocument= 68, - msoShapeFlowchartTerminator= 69, - msoShapeFlowchartPreparation= 70, - msoShapeFlowchartManualInput= 71, - msoShapeFlowchartManualOperation= 72, - msoShapeFlowchartConnector= 73, - msoShapeFlowchartOffpageConnector= 74, - msoShapeFlowchartCard = 75, - msoShapeFlowchartPunchedTape= 76, - msoShapeFlowchartSummingJunction= 77, - msoShapeFlowchartOr = 78, - msoShapeFlowchartCollate= 79, - msoShapeFlowchartSort = 80, - msoShapeFlowchartExtract= 81, - msoShapeFlowchartMerge = 82, - msoShapeFlowchartStoredData= 83, - msoShapeFlowchartDelay = 84, - msoShapeFlowchartSequentialAccessStorage= 85, - msoShapeFlowchartMagneticDisk= 86, - msoShapeFlowchartDirectAccessStorage= 87, - msoShapeFlowchartDisplay= 88, - msoShapeExplosion1 = 89, - msoShapeExplosion2 = 90, - msoShape4pointStar = 91, - msoShape5pointStar = 92, - msoShape8pointStar = 93, - msoShape16pointStar = 94, - msoShape24pointStar = 95, - msoShape32pointStar = 96, - msoShapeUpRibbon = 97, - msoShapeDownRibbon = 98, - msoShapeCurvedUpRibbon = 99, - msoShapeCurvedDownRibbon= 100, - msoShapeVerticalScroll = 101, - msoShapeHorizontalScroll= 102, - msoShapeWave = 103, - msoShapeDoubleWave = 104, - msoShapeRectangularCallout= 105, - msoShapeRoundedRectangularCallout= 106, - msoShapeOvalCallout = 107, - msoShapeCloudCallout = 108, - msoShapeLineCallout1 = 109, - msoShapeLineCallout2 = 110, - msoShapeLineCallout3 = 111, - msoShapeLineCallout4 = 112, - msoShapeLineCallout1AccentBar= 113, - msoShapeLineCallout2AccentBar= 114, - msoShapeLineCallout3AccentBar= 115, - msoShapeLineCallout4AccentBar= 116, - msoShapeLineCallout1NoBorder= 117, - msoShapeLineCallout2NoBorder= 118, - msoShapeLineCallout3NoBorder= 119, - msoShapeLineCallout4NoBorder= 120, - msoShapeLineCallout1BorderandAccentBar= 121, - msoShapeLineCallout2BorderandAccentBar= 122, - msoShapeLineCallout3BorderandAccentBar= 123, - msoShapeLineCallout4BorderandAccentBar= 124, - msoShapeActionButtonCustom= 125, - msoShapeActionButtonHome= 126, - msoShapeActionButtonHelp= 127, - msoShapeActionButtonInformation= 128, - msoShapeActionButtonBackorPrevious= 129, - msoShapeActionButtonForwardorNext= 130, - msoShapeActionButtonBeginning= 131, - msoShapeActionButtonEnd = 132, - msoShapeActionButtonReturn= 133, - msoShapeActionButtonDocument= 134, - msoShapeActionButtonSound= 135, - msoShapeActionButtonMovie= 136, - msoShapeBalloon = 137, - msoShapeNotPrimitive = 138 - }; - - enum MsoAutomationSecurity { - msoAutomationSecurityLow= 1, - msoAutomationSecurityByUI= 2, - msoAutomationSecurityForceDisable= 3 - }; - - enum MsoBalloonButtonType { - msoBalloonButtonYesToAll= -15, - msoBalloonButtonOptions = -14, - msoBalloonButtonTips = -13, - msoBalloonButtonClose = -12, - msoBalloonButtonSnooze = -11, - msoBalloonButtonSearch = -10, - msoBalloonButtonIgnore = -9, - msoBalloonButtonAbort = -8, - msoBalloonButtonRetry = -7, - msoBalloonButtonNext = -6, - msoBalloonButtonBack = -5, - msoBalloonButtonNo = -4, - msoBalloonButtonYes = -3, - msoBalloonButtonCancel = -2, - msoBalloonButtonOK = -1, - msoBalloonButtonNull = 0 - }; - - enum MsoBalloonErrorType { - msoBalloonErrorNone = 0, - msoBalloonErrorOther = 1, - msoBalloonErrorTooBig = 2, - msoBalloonErrorOutOfMemory= 3, - msoBalloonErrorBadPictureRef= 4, - msoBalloonErrorBadReference= 5, - msoBalloonErrorButtonlessModal= 6, - msoBalloonErrorButtonModeless= 7, - msoBalloonErrorBadCharacter= 8, - msoBalloonErrorCOMFailure= 9, - msoBalloonErrorCharNotTopmostForModal= 10, - msoBalloonErrorTooManyControls= 11 - }; - - enum MsoBalloonType { - msoBalloonTypeButtons = 0, - msoBalloonTypeBullets = 1, - msoBalloonTypeNumbers = 2 - }; - - enum MsoBarPosition { - msoBarLeft = 0, - msoBarTop = 1, - msoBarRight = 2, - msoBarBottom = 3, - msoBarFloating = 4, - msoBarPopup = 5, - msoBarMenuBar = 6 - }; - - enum MsoBarProtection { - msoBarNoProtection = 0, - msoBarNoCustomize = 1, - msoBarNoResize = 2, - msoBarNoMove = 4, - msoBarNoChangeVisible = 8, - msoBarNoChangeDock = 16, - msoBarNoVerticalDock = 32, - msoBarNoHorizontalDock = 64 - }; - - enum MsoBarRow { - msoBarRowFirst = 0, - msoBarRowLast = -1 - }; - - enum MsoBarType { - msoBarTypeNormal = 0, - msoBarTypeMenuBar = 1, - msoBarTypePopup = 2 - }; - - enum MsoBlackWhiteMode { - msoBlackWhiteMixed = -2, - msoBlackWhiteAutomatic = 1, - msoBlackWhiteGrayScale = 2, - msoBlackWhiteLightGrayScale= 3, - msoBlackWhiteInverseGrayScale= 4, - msoBlackWhiteGrayOutline= 5, - msoBlackWhiteBlackTextAndLine= 6, - msoBlackWhiteHighContrast= 7, - msoBlackWhiteBlack = 8, - msoBlackWhiteWhite = 9, - msoBlackWhiteDontShow = 10 - }; - - enum MsoButtonSetType { - msoButtonSetNone = 0, - msoButtonSetOK = 1, - msoButtonSetCancel = 2, - msoButtonSetOkCancel = 3, - msoButtonSetYesNo = 4, - msoButtonSetYesNoCancel = 5, - msoButtonSetBackClose = 6, - msoButtonSetNextClose = 7, - msoButtonSetBackNextClose= 8, - msoButtonSetRetryCancel = 9, - msoButtonSetAbortRetryIgnore= 10, - msoButtonSetSearchClose = 11, - msoButtonSetBackNextSnooze= 12, - msoButtonSetTipsOptionsClose= 13, - msoButtonSetYesAllNoCancel= 14 - }; - - enum MsoButtonState { - msoButtonUp = 0, - msoButtonDown = -1, - msoButtonMixed = 2 - }; - - enum MsoButtonStyle { - msoButtonAutomatic = 0, - msoButtonIcon = 1, - msoButtonCaption = 2, - msoButtonIconAndCaption = 3, - msoButtonIconAndWrapCaption= 7, - msoButtonIconAndCaptionBelow= 11, - msoButtonWrapCaption = 14, - msoButtonIconAndWrapCaptionBelow= 15 - }; - - enum MsoButtonStyleHidden { - msoButtonWrapText = 4, - msoButtonTextBelow = 8 - }; - - enum MsoCalloutAngleType { - msoCalloutAngleMixed = -2, - msoCalloutAngleAutomatic= 1, - msoCalloutAngle30 = 2, - msoCalloutAngle45 = 3, - msoCalloutAngle60 = 4, - msoCalloutAngle90 = 5 - }; - - enum MsoCalloutDropType { - msoCalloutDropMixed = -2, - msoCalloutDropCustom = 1, - msoCalloutDropTop = 2, - msoCalloutDropCenter = 3, - msoCalloutDropBottom = 4 - }; - - enum MsoCalloutType { - msoCalloutMixed = -2, - msoCalloutOne = 1, - msoCalloutTwo = 2, - msoCalloutThree = 3, - msoCalloutFour = 4 - }; - - enum MsoCharacterSet { - msoCharacterSetArabic = 1, - msoCharacterSetCyrillic = 2, - msoCharacterSetEnglishWesternEuropeanOtherLatinScript= 3, - msoCharacterSetGreek = 4, - msoCharacterSetHebrew = 5, - msoCharacterSetJapanese = 6, - msoCharacterSetKorean = 7, - msoCharacterSetMultilingualUnicode= 8, - msoCharacterSetSimplifiedChinese= 9, - msoCharacterSetThai = 10, - msoCharacterSetTraditionalChinese= 11, - msoCharacterSetVietnamese= 12 - }; - - enum MsoColorType { - msoColorTypeMixed = -2, - msoColorTypeRGB = 1, - msoColorTypeScheme = 2, - msoColorTypeCMYK = 3, - msoColorTypeCMS = 4, - msoColorTypeInk = 5 - }; - - enum MsoComboStyle { - msoComboNormal = 0, - msoComboLabel = 1 - }; - - enum MsoCommandBarButtonHyperlinkType { - msoCommandBarButtonHyperlinkNone= 0, - msoCommandBarButtonHyperlinkOpen= 1, - msoCommandBarButtonHyperlinkInsertPicture= 2 - }; - - enum MsoCondition { - msoConditionFileTypeAllFiles= 1, - msoConditionFileTypeOfficeFiles= 2, - msoConditionFileTypeWordDocuments= 3, - msoConditionFileTypeExcelWorkbooks= 4, - msoConditionFileTypePowerPointPresentations= 5, - msoConditionFileTypeBinders= 6, - msoConditionFileTypeDatabases= 7, - msoConditionFileTypeTemplates= 8, - msoConditionIncludes = 9, - msoConditionIncludesPhrase= 10, - msoConditionBeginsWith = 11, - msoConditionEndsWith = 12, - msoConditionIncludesNearEachOther= 13, - msoConditionIsExactly = 14, - msoConditionIsNot = 15, - msoConditionYesterday = 16, - msoConditionToday = 17, - msoConditionTomorrow = 18, - msoConditionLastWeek = 19, - msoConditionThisWeek = 20, - msoConditionNextWeek = 21, - msoConditionLastMonth = 22, - msoConditionThisMonth = 23, - msoConditionNextMonth = 24, - msoConditionAnytime = 25, - msoConditionAnytimeBetween= 26, - msoConditionOn = 27, - msoConditionOnOrAfter = 28, - msoConditionOnOrBefore = 29, - msoConditionInTheNext = 30, - msoConditionInTheLast = 31, - msoConditionEquals = 32, - msoConditionDoesNotEqual= 33, - msoConditionAnyNumberBetween= 34, - msoConditionAtMost = 35, - msoConditionAtLeast = 36, - msoConditionMoreThan = 37, - msoConditionLessThan = 38, - msoConditionIsYes = 39, - msoConditionIsNo = 40, - msoConditionIncludesFormsOf= 41, - msoConditionFreeText = 42, - msoConditionFileTypeOutlookItems= 43, - msoConditionFileTypeMailItem= 44, - msoConditionFileTypeCalendarItem= 45, - msoConditionFileTypeContactItem= 46, - msoConditionFileTypeNoteItem= 47, - msoConditionFileTypeJournalItem= 48, - msoConditionFileTypeTaskItem= 49, - msoConditionFileTypePhotoDrawFiles= 50, - msoConditionFileTypeDataConnectionFiles= 51, - msoConditionFileTypePublisherFiles= 52, - msoConditionFileTypeProjectFiles= 53, - msoConditionFileTypeDocumentImagingFiles= 54, - msoConditionFileTypeVisioFiles= 55, - msoConditionFileTypeDesignerFiles= 56, - msoConditionFileTypeWebPages= 57, - msoConditionEqualsLow = 58, - msoConditionEqualsNormal= 59, - msoConditionEqualsHigh = 60, - msoConditionNotEqualToLow= 61, - msoConditionNotEqualToNormal= 62, - msoConditionNotEqualToHigh= 63, - msoConditionEqualsNotStarted= 64, - msoConditionEqualsInProgress= 65, - msoConditionEqualsCompleted= 66, - msoConditionEqualsWaitingForSomeoneElse= 67, - msoConditionEqualsDeferred= 68, - msoConditionNotEqualToNotStarted= 69, - msoConditionNotEqualToInProgress= 70, - msoConditionNotEqualToCompleted= 71, - msoConditionNotEqualToWaitingForSomeoneElse= 72, - msoConditionNotEqualToDeferred= 73 - }; - - enum MsoConnector { - msoConnectorAnd = 1, - msoConnectorOr = 2 - }; - - enum MsoConnectorType { - msoConnectorTypeMixed = -2, - msoConnectorStraight = 1, - msoConnectorElbow = 2, - msoConnectorCurve = 3 - }; - - enum MsoControlOLEUsage { - msoControlOLEUsageNeither= 0, - msoControlOLEUsageServer= 1, - msoControlOLEUsageClient= 2, - msoControlOLEUsageBoth = 3 - }; - - enum MsoControlType { - msoControlCustom = 0, - msoControlButton = 1, - msoControlEdit = 2, - msoControlDropdown = 3, - msoControlComboBox = 4, - msoControlButtonDropdown= 5, - msoControlSplitDropdown = 6, - msoControlOCXDropdown = 7, - msoControlGenericDropdown= 8, - msoControlGraphicDropdown= 9, - msoControlPopup = 10, - msoControlGraphicPopup = 11, - msoControlButtonPopup = 12, - msoControlSplitButtonPopup= 13, - msoControlSplitButtonMRUPopup= 14, - msoControlLabel = 15, - msoControlExpandingGrid = 16, - msoControlSplitExpandingGrid= 17, - msoControlGrid = 18, - msoControlGauge = 19, - msoControlGraphicCombo = 20, - msoControlPane = 21, - msoControlActiveX = 22, - msoControlSpinner = 23, - msoControlLabelEx = 24, - msoControlWorkPane = 25, - msoControlAutoCompleteCombo= 26 - }; - - enum MsoDiagramNodeType { - msoDiagramNode = 1, - msoDiagramAssistant = 2 - }; - - enum MsoDiagramType { - msoDiagramMixed = -2, - msoDiagramOrgChart = 1, - msoDiagramCycle = 2, - msoDiagramRadial = 3, - msoDiagramPyramid = 4, - msoDiagramVenn = 5, - msoDiagramTarget = 6 - }; - - enum MsoDistributeCmd { - msoDistributeHorizontally= 0, - msoDistributeVertically = 1 - }; - - enum MsoDocProperties { - msoPropertyTypeNumber = 1, - msoPropertyTypeBoolean = 2, - msoPropertyTypeDate = 3, - msoPropertyTypeString = 4, - msoPropertyTypeFloat = 5 - }; - - enum MsoEditingType { - msoEditingAuto = 0, - msoEditingCorner = 1, - msoEditingSmooth = 2, - msoEditingSymmetric = 3 - }; - - enum MsoEncoding { - msoEncodingThai = 874, - msoEncodingJapaneseShiftJIS= 932, - msoEncodingSimplifiedChineseGBK= 936, - msoEncodingKorean = 949, - msoEncodingTraditionalChineseBig5= 950, - msoEncodingUnicodeLittleEndian= 1200, - msoEncodingUnicodeBigEndian= 1201, - msoEncodingCentralEuropean= 1250, - msoEncodingCyrillic = 1251, - msoEncodingWestern = 1252, - msoEncodingGreek = 1253, - msoEncodingTurkish = 1254, - msoEncodingHebrew = 1255, - msoEncodingArabic = 1256, - msoEncodingBaltic = 1257, - msoEncodingVietnamese = 1258, - msoEncodingAutoDetect = 50001, - msoEncodingJapaneseAutoDetect= 50932, - msoEncodingSimplifiedChineseAutoDetect= 50936, - msoEncodingKoreanAutoDetect= 50949, - msoEncodingTraditionalChineseAutoDetect= 50950, - msoEncodingCyrillicAutoDetect= 51251, - msoEncodingGreekAutoDetect= 51253, - msoEncodingArabicAutoDetect= 51256, - msoEncodingISO88591Latin1= 28591, - msoEncodingISO88592CentralEurope= 28592, - msoEncodingISO88593Latin3= 28593, - msoEncodingISO88594Baltic= 28594, - msoEncodingISO88595Cyrillic= 28595, - msoEncodingISO88596Arabic= 28596, - msoEncodingISO88597Greek= 28597, - msoEncodingISO88598Hebrew= 28598, - msoEncodingISO88599Turkish= 28599, - msoEncodingISO885915Latin9= 28605, - msoEncodingISO88598HebrewLogical= 38598, - msoEncodingISO2022JPNoHalfwidthKatakana= 50220, - msoEncodingISO2022JPJISX02021984= 50221, - msoEncodingISO2022JPJISX02011989= 50222, - msoEncodingISO2022KR = 50225, - msoEncodingISO2022CNTraditionalChinese= 50227, - msoEncodingISO2022CNSimplifiedChinese= 50229, - msoEncodingMacRoman = 10000, - msoEncodingMacJapanese = 10001, - msoEncodingMacTraditionalChineseBig5= 10002, - msoEncodingMacKorean = 10003, - msoEncodingMacArabic = 10004, - msoEncodingMacHebrew = 10005, - msoEncodingMacGreek1 = 10006, - msoEncodingMacCyrillic = 10007, - msoEncodingMacSimplifiedChineseGB2312= 10008, - msoEncodingMacRomania = 10010, - msoEncodingMacUkraine = 10017, - msoEncodingMacLatin2 = 10029, - msoEncodingMacIcelandic = 10079, - msoEncodingMacTurkish = 10081, - msoEncodingMacCroatia = 10082, - msoEncodingEBCDICUSCanada= 37, - msoEncodingEBCDICInternational= 500, - msoEncodingEBCDICMultilingualROECELatin2= 870, - msoEncodingEBCDICGreekModern= 875, - msoEncodingEBCDICTurkishLatin5= 1026, - msoEncodingEBCDICGermany= 20273, - msoEncodingEBCDICDenmarkNorway= 20277, - msoEncodingEBCDICFinlandSweden= 20278, - msoEncodingEBCDICItaly = 20280, - msoEncodingEBCDICLatinAmericaSpain= 20284, - msoEncodingEBCDICUnitedKingdom= 20285, - msoEncodingEBCDICJapaneseKatakanaExtended= 20290, - msoEncodingEBCDICFrance = 20297, - msoEncodingEBCDICArabic = 20420, - msoEncodingEBCDICGreek = 20423, - msoEncodingEBCDICHebrew = 20424, - msoEncodingEBCDICKoreanExtended= 20833, - msoEncodingEBCDICThai = 20838, - msoEncodingEBCDICIcelandic= 20871, - msoEncodingEBCDICTurkish= 20905, - msoEncodingEBCDICRussian= 20880, - msoEncodingEBCDICSerbianBulgarian= 21025, - msoEncodingEBCDICJapaneseKatakanaExtendedAndJapanese= 50930, - msoEncodingEBCDICUSCanadaAndJapanese= 50931, - msoEncodingEBCDICKoreanExtendedAndKorean= 50933, - msoEncodingEBCDICSimplifiedChineseExtendedAndSimplifiedChinese= 50935, - msoEncodingEBCDICUSCanadaAndTraditionalChinese= 50937, - msoEncodingEBCDICJapaneseLatinExtendedAndJapanese= 50939, - msoEncodingOEMUnitedStates= 437, - msoEncodingOEMGreek437G = 737, - msoEncodingOEMBaltic = 775, - msoEncodingOEMMultilingualLatinI= 850, - msoEncodingOEMMultilingualLatinII= 852, - msoEncodingOEMCyrillic = 855, - msoEncodingOEMTurkish = 857, - msoEncodingOEMPortuguese= 860, - msoEncodingOEMIcelandic = 861, - msoEncodingOEMHebrew = 862, - msoEncodingOEMCanadianFrench= 863, - msoEncodingOEMArabic = 864, - msoEncodingOEMNordic = 865, - msoEncodingOEMCyrillicII= 866, - msoEncodingOEMModernGreek= 869, - msoEncodingEUCJapanese = 51932, - msoEncodingEUCChineseSimplifiedChinese= 51936, - msoEncodingEUCKorean = 51949, - msoEncodingEUCTaiwaneseTraditionalChinese= 51950, - msoEncodingISCIIDevanagari= 57002, - msoEncodingISCIIBengali = 57003, - msoEncodingISCIITamil = 57004, - msoEncodingISCIITelugu = 57005, - msoEncodingISCIIAssamese= 57006, - msoEncodingISCIIOriya = 57007, - msoEncodingISCIIKannada = 57008, - msoEncodingISCIIMalayalam= 57009, - msoEncodingISCIIGujarati= 57010, - msoEncodingISCIIPunjabi = 57011, - msoEncodingArabicASMO = 708, - msoEncodingArabicTransparentASMO= 720, - msoEncodingKoreanJohab = 1361, - msoEncodingTaiwanCNS = 20000, - msoEncodingTaiwanTCA = 20001, - msoEncodingTaiwanEten = 20002, - msoEncodingTaiwanIBM5550= 20003, - msoEncodingTaiwanTeleText= 20004, - msoEncodingTaiwanWang = 20005, - msoEncodingIA5IRV = 20105, - msoEncodingIA5German = 20106, - msoEncodingIA5Swedish = 20107, - msoEncodingIA5Norwegian = 20108, - msoEncodingUSASCII = 20127, - msoEncodingT61 = 20261, - msoEncodingISO6937NonSpacingAccent= 20269, - msoEncodingKOI8R = 20866, - msoEncodingExtAlphaLowercase= 21027, - msoEncodingKOI8U = 21866, - msoEncodingEuropa3 = 29001, - msoEncodingHZGBSimplifiedChinese= 52936, - msoEncodingSimplifiedChineseGB18030= 54936, - msoEncodingUTF7 = 65000, - msoEncodingUTF8 = 65001 - }; - - enum MsoExtraInfoMethod { - msoMethodGet = 0, - msoMethodPost = 1 - }; - - enum MsoExtrusionColorType { - msoExtrusionColorTypeMixed= -2, - msoExtrusionColorAutomatic= 1, - msoExtrusionColorCustom = 2 - }; - - enum MsoFarEastLineBreakLanguageID { - MsoFarEastLineBreakLanguageJapanese= 1041, - MsoFarEastLineBreakLanguageKorean= 1042, - MsoFarEastLineBreakLanguageSimplifiedChinese= 2052, - MsoFarEastLineBreakLanguageTraditionalChinese= 1028 - }; - - enum MsoFeatureInstall { - msoFeatureInstallNone = 0, - msoFeatureInstallOnDemand= 1, - msoFeatureInstallOnDemandWithUI= 2 - }; - - enum MsoFileDialogType { - msoFileDialogOpen = 1, - msoFileDialogSaveAs = 2, - msoFileDialogFilePicker = 3, - msoFileDialogFolderPicker= 4 - }; - - enum MsoFileDialogView { - msoFileDialogViewList = 1, - msoFileDialogViewDetails= 2, - msoFileDialogViewProperties= 3, - msoFileDialogViewPreview= 4, - msoFileDialogViewThumbnail= 5, - msoFileDialogViewLargeIcons= 6, - msoFileDialogViewSmallIcons= 7, - msoFileDialogViewWebView= 8, - msoFileDialogViewTiles = 9 - }; - - enum MsoFileFindListBy { - msoListbyName = 1, - msoListbyTitle = 2 - }; - - enum MsoFileFindOptions { - msoOptionsNew = 1, - msoOptionsAdd = 2, - msoOptionsWithin = 3 - }; - - enum MsoFileFindSortBy { - msoFileFindSortbyAuthor = 1, - msoFileFindSortbyDateCreated= 2, - msoFileFindSortbyLastSavedBy= 3, - msoFileFindSortbyDateSaved= 4, - msoFileFindSortbyFileName= 5, - msoFileFindSortbySize = 6, - msoFileFindSortbyTitle = 7 - }; - - enum MsoFileFindView { - msoViewFileInfo = 1, - msoViewPreview = 2, - msoViewSummaryInfo = 3 - }; - - enum MsoFileNewAction { - msoEditFile = 0, - msoCreateNewFile = 1, - msoOpenFile = 2 - }; - - enum MsoFileNewSection { - msoOpenDocument = 0, - msoNew = 1, - msoNewfromExistingFile = 2, - msoNewfromTemplate = 3, - msoBottomSection = 4 - }; - - enum MsoFileType { - msoFileTypeAllFiles = 1, - msoFileTypeOfficeFiles = 2, - msoFileTypeWordDocuments= 3, - msoFileTypeExcelWorkbooks= 4, - msoFileTypePowerPointPresentations= 5, - msoFileTypeBinders = 6, - msoFileTypeDatabases = 7, - msoFileTypeTemplates = 8, - msoFileTypeOutlookItems = 9, - msoFileTypeMailItem = 10, - msoFileTypeCalendarItem = 11, - msoFileTypeContactItem = 12, - msoFileTypeNoteItem = 13, - msoFileTypeJournalItem = 14, - msoFileTypeTaskItem = 15, - msoFileTypePhotoDrawFiles= 16, - msoFileTypeDataConnectionFiles= 17, - msoFileTypePublisherFiles= 18, - msoFileTypeProjectFiles = 19, - msoFileTypeDocumentImagingFiles= 20, - msoFileTypeVisioFiles = 21, - msoFileTypeDesignerFiles= 22, - msoFileTypeWebPages = 23 - }; - - enum MsoFillType { - msoFillMixed = -2, - msoFillSolid = 1, - msoFillPatterned = 2, - msoFillGradient = 3, - msoFillTextured = 4, - msoFillBackground = 5, - msoFillPicture = 6 - }; - - enum MsoFilterComparison { - msoFilterComparisonEqual= 0, - msoFilterComparisonNotEqual= 1, - msoFilterComparisonLessThan= 2, - msoFilterComparisonGreaterThan= 3, - msoFilterComparisonLessThanEqual= 4, - msoFilterComparisonGreaterThanEqual= 5, - msoFilterComparisonIsBlank= 6, - msoFilterComparisonIsNotBlank= 7, - msoFilterComparisonContains= 8, - msoFilterComparisonNotContains= 9 - }; - - enum MsoFilterConjunction { - msoFilterConjunctionAnd = 0, - msoFilterConjunctionOr = 1 - }; - - enum MsoFlipCmd { - msoFlipHorizontal = 0, - msoFlipVertical = 1 - }; - - enum MsoGradientColorType { - msoGradientColorMixed = -2, - msoGradientOneColor = 1, - msoGradientTwoColors = 2, - msoGradientPresetColors = 3 - }; - - enum MsoGradientStyle { - msoGradientMixed = -2, - msoGradientHorizontal = 1, - msoGradientVertical = 2, - msoGradientDiagonalUp = 3, - msoGradientDiagonalDown = 4, - msoGradientFromCorner = 5, - msoGradientFromTitle = 6, - msoGradientFromCenter = 7 - }; - - enum MsoHTMLProjectOpen { - msoHTMLProjectOpenSourceView= 1, - msoHTMLProjectOpenTextView= 2 - }; - - enum MsoHTMLProjectState { - msoHTMLProjectStateDocumentLocked= 1, - msoHTMLProjectStateProjectLocked= 2, - msoHTMLProjectStateDocumentProjectUnlocked= 3 - }; - - enum MsoHorizontalAnchor { - msoHorizontalAnchorMixed= -2, - msoAnchorNone = 1, - msoAnchorCenter = 2 - }; - - enum MsoHyperlinkType { - msoHyperlinkRange = 0, - msoHyperlinkShape = 1, - msoHyperlinkInlineShape = 2 - }; - - enum MsoIconType { - msoIconNone = 0, - msoIconAlert = 2, - msoIconTip = 3, - msoIconAlertInfo = 4, - msoIconAlertWarning = 5, - msoIconAlertQuery = 6, - msoIconAlertCritical = 7 - }; - - enum MsoLanguageID { - msoLanguageIDMixed = -2, - msoLanguageIDNone = 0, - msoLanguageIDNoProofing = 1024, - msoLanguageIDAfrikaans = 1078, - msoLanguageIDAlbanian = 1052, - msoLanguageIDAmharic = 1118, - msoLanguageIDArabicAlgeria= 5121, - msoLanguageIDArabicBahrain= 15361, - msoLanguageIDArabicEgypt= 3073, - msoLanguageIDArabicIraq = 2049, - msoLanguageIDArabicJordan= 11265, - msoLanguageIDArabicKuwait= 13313, - msoLanguageIDArabicLebanon= 12289, - msoLanguageIDArabicLibya= 4097, - msoLanguageIDArabicMorocco= 6145, - msoLanguageIDArabicOman = 8193, - msoLanguageIDArabicQatar= 16385, - msoLanguageIDArabic = 1025, - msoLanguageIDArabicSyria= 10241, - msoLanguageIDArabicTunisia= 7169, - msoLanguageIDArabicUAE = 14337, - msoLanguageIDArabicYemen= 9217, - msoLanguageIDArmenian = 1067, - msoLanguageIDAssamese = 1101, - msoLanguageIDAzeriCyrillic= 2092, - msoLanguageIDAzeriLatin = 1068, - msoLanguageIDBasque = 1069, - msoLanguageIDByelorussian= 1059, - msoLanguageIDBengali = 1093, - msoLanguageIDBosnian = 4122, - msoLanguageIDBosnianBosniaHerzegovinaCyrillic= 8218, - msoLanguageIDBosnianBosniaHerzegovinaLatin= 5146, - msoLanguageIDBulgarian = 1026, - msoLanguageIDBurmese = 1109, - msoLanguageIDCatalan = 1027, - msoLanguageIDChineseHongKongSAR= 3076, - msoLanguageIDChineseMacaoSAR= 5124, - msoLanguageIDSimplifiedChinese= 2052, - msoLanguageIDChineseSingapore= 4100, - msoLanguageIDTraditionalChinese= 1028, - msoLanguageIDCherokee = 1116, - msoLanguageIDCroatian = 1050, - msoLanguageIDCzech = 1029, - msoLanguageIDDanish = 1030, - msoLanguageIDDivehi = 1125, - msoLanguageIDBelgianDutch= 2067, - msoLanguageIDDutch = 1043, - msoLanguageIDDzongkhaBhutan= 2129, - msoLanguageIDEdo = 1126, - msoLanguageIDEnglishAUS = 3081, - msoLanguageIDEnglishBelize= 10249, - msoLanguageIDEnglishCanadian= 4105, - msoLanguageIDEnglishCaribbean= 9225, - msoLanguageIDEnglishIndonesia= 14345, - msoLanguageIDEnglishIreland= 6153, - msoLanguageIDEnglishJamaica= 8201, - msoLanguageIDEnglishNewZealand= 5129, - msoLanguageIDEnglishPhilippines= 13321, - msoLanguageIDEnglishSouthAfrica= 7177, - msoLanguageIDEnglishTrinidadTobago= 11273, - msoLanguageIDEnglishUK = 2057, - msoLanguageIDEnglishUS = 1033, - msoLanguageIDEnglishZimbabwe= 12297, - msoLanguageIDEstonian = 1061, - msoLanguageIDFaeroese = 1080, - msoLanguageIDFarsi = 1065, - msoLanguageIDFilipino = 1124, - msoLanguageIDFinnish = 1035, - msoLanguageIDBelgianFrench= 2060, - msoLanguageIDFrenchCameroon= 11276, - msoLanguageIDFrenchCanadian= 3084, - msoLanguageIDFrenchCotedIvoire= 12300, - msoLanguageIDFrench = 1036, - msoLanguageIDFrenchHaiti= 15372, - msoLanguageIDFrenchLuxembourg= 5132, - msoLanguageIDFrenchMali = 13324, - msoLanguageIDFrenchMonaco= 6156, - msoLanguageIDFrenchMorocco= 14348, - msoLanguageIDFrenchReunion= 8204, - msoLanguageIDFrenchSenegal= 10252, - msoLanguageIDSwissFrench= 4108, - msoLanguageIDFrenchWestIndies= 7180, - msoLanguageIDFrenchZaire= 9228, - msoLanguageIDFrisianNetherlands= 1122, - msoLanguageIDFulfulde = 1127, - msoLanguageIDGaelicIreland= 2108, - msoLanguageIDGaelicScotland= 1084, - msoLanguageIDGalician = 1110, - msoLanguageIDGeorgian = 1079, - msoLanguageIDGermanAustria= 3079, - msoLanguageIDGerman = 1031, - msoLanguageIDGermanLiechtenstein= 5127, - msoLanguageIDGermanLuxembourg= 4103, - msoLanguageIDSwissGerman= 2055, - msoLanguageIDGreek = 1032, - msoLanguageIDGuarani = 1140, - msoLanguageIDGujarati = 1095, - msoLanguageIDHausa = 1128, - msoLanguageIDHawaiian = 1141, - msoLanguageIDHebrew = 1037, - msoLanguageIDHindi = 1081, - msoLanguageIDHungarian = 1038, - msoLanguageIDIbibio = 1129, - msoLanguageIDIcelandic = 1039, - msoLanguageIDIgbo = 1136, - msoLanguageIDIndonesian = 1057, - msoLanguageIDInuktitut = 1117, - msoLanguageIDItalian = 1040, - msoLanguageIDSwissItalian= 2064, - msoLanguageIDJapanese = 1041, - msoLanguageIDKannada = 1099, - msoLanguageIDKanuri = 1137, - msoLanguageIDKashmiri = 1120, - msoLanguageIDKashmiriDevanagari= 2144, - msoLanguageIDKazakh = 1087, - msoLanguageIDKhmer = 1107, - msoLanguageIDKirghiz = 1088, - msoLanguageIDKonkani = 1111, - msoLanguageIDKorean = 1042, - msoLanguageIDKyrgyz = 1088, - msoLanguageIDLatin = 1142, - msoLanguageIDLao = 1108, - msoLanguageIDLatvian = 1062, - msoLanguageIDLithuanian = 1063, - msoLanguageIDMacedonian = 1071, - msoLanguageIDMalaysian = 1086, - msoLanguageIDMalayBruneiDarussalam= 2110, - msoLanguageIDMalayalam = 1100, - msoLanguageIDMaltese = 1082, - msoLanguageIDManipuri = 1112, - msoLanguageIDMaori = 1153, - msoLanguageIDMarathi = 1102, - msoLanguageIDMongolian = 1104, - msoLanguageIDNepali = 1121, - msoLanguageIDNorwegianBokmol= 1044, - msoLanguageIDNorwegianNynorsk= 2068, - msoLanguageIDOriya = 1096, - msoLanguageIDOromo = 1138, - msoLanguageIDPashto = 1123, - msoLanguageIDPolish = 1045, - msoLanguageIDBrazilianPortuguese= 1046, - msoLanguageIDPortuguese = 2070, - msoLanguageIDPunjabi = 1094, - msoLanguageIDQuechuaBolivia= 1131, - msoLanguageIDQuechuaEcuador= 2155, - msoLanguageIDQuechuaPeru= 3179, - msoLanguageIDRhaetoRomanic= 1047, - msoLanguageIDRomanianMoldova= 2072, - msoLanguageIDRomanian = 1048, - msoLanguageIDRussianMoldova= 2073, - msoLanguageIDRussian = 1049, - msoLanguageIDSamiLappish= 1083, - msoLanguageIDSanskrit = 1103, - msoLanguageIDSepedi = 1132, - msoLanguageIDSerbianBosniaHerzegovinaCyrillic= 7194, - msoLanguageIDSerbianBosniaHerzegovinaLatin= 6170, - msoLanguageIDSerbianCyrillic= 3098, - msoLanguageIDSerbianLatin= 2074, - msoLanguageIDSesotho = 1072, - msoLanguageIDSindhi = 1113, - msoLanguageIDSindhiPakistan= 2137, - msoLanguageIDSinhalese = 1115, - msoLanguageIDSlovak = 1051, - msoLanguageIDSlovenian = 1060, - msoLanguageIDSomali = 1143, - msoLanguageIDSorbian = 1070, - msoLanguageIDSpanishArgentina= 11274, - msoLanguageIDSpanishBolivia= 16394, - msoLanguageIDSpanishChile= 13322, - msoLanguageIDSpanishColombia= 9226, - msoLanguageIDSpanishCostaRica= 5130, - msoLanguageIDSpanishDominicanRepublic= 7178, - msoLanguageIDSpanishEcuador= 12298, - msoLanguageIDSpanishElSalvador= 17418, - msoLanguageIDSpanishGuatemala= 4106, - msoLanguageIDSpanishHonduras= 18442, - msoLanguageIDMexicanSpanish= 2058, - msoLanguageIDSpanishNicaragua= 19466, - msoLanguageIDSpanishPanama= 6154, - msoLanguageIDSpanishParaguay= 15370, - msoLanguageIDSpanishPeru= 10250, - msoLanguageIDSpanishPuertoRico= 20490, - msoLanguageIDSpanishModernSort= 3082, - msoLanguageIDSpanish = 1034, - msoLanguageIDSpanishUruguay= 14346, - msoLanguageIDSpanishVenezuela= 8202, - msoLanguageIDSutu = 1072, - msoLanguageIDSwahili = 1089, - msoLanguageIDSwedishFinland= 2077, - msoLanguageIDSwedish = 1053, - msoLanguageIDSyriac = 1114, - msoLanguageIDTajik = 1064, - msoLanguageIDTamil = 1097, - msoLanguageIDTamazight = 1119, - msoLanguageIDTamazightLatin= 2143, - msoLanguageIDTatar = 1092, - msoLanguageIDTelugu = 1098, - msoLanguageIDThai = 1054, - msoLanguageIDTibetan = 1105, - msoLanguageIDTigrignaEthiopic= 1139, - msoLanguageIDTigrignaEritrea= 2163, - msoLanguageIDTsonga = 1073, - msoLanguageIDTswana = 1074, - msoLanguageIDTurkish = 1055, - msoLanguageIDTurkmen = 1090, - msoLanguageIDUkrainian = 1058, - msoLanguageIDUrdu = 1056, - msoLanguageIDUzbekCyrillic= 2115, - msoLanguageIDUzbekLatin = 1091, - msoLanguageIDVenda = 1075, - msoLanguageIDVietnamese = 1066, - msoLanguageIDWelsh = 1106, - msoLanguageIDXhosa = 1076, - msoLanguageIDYi = 1144, - msoLanguageIDYiddish = 1085, - msoLanguageIDYoruba = 1130, - msoLanguageIDZulu = 1077 - }; - - enum MsoLanguageIDHidden { - msoLanguageIDChineseHongKong= 3076, - msoLanguageIDChineseMacao= 5124, - msoLanguageIDEnglishTrinidad= 11273 - }; - - enum MsoLastModified { - msoLastModifiedYesterday= 1, - msoLastModifiedToday = 2, - msoLastModifiedLastWeek = 3, - msoLastModifiedThisWeek = 4, - msoLastModifiedLastMonth= 5, - msoLastModifiedThisMonth= 6, - msoLastModifiedAnyTime = 7 - }; - - enum MsoLineDashStyle { - msoLineDashStyleMixed = -2, - msoLineSolid = 1, - msoLineSquareDot = 2, - msoLineRoundDot = 3, - msoLineDash = 4, - msoLineDashDot = 5, - msoLineDashDotDot = 6, - msoLineLongDash = 7, - msoLineLongDashDot = 8 - }; - - enum MsoLineStyle { - msoLineStyleMixed = -2, - msoLineSingle = 1, - msoLineThinThin = 2, - msoLineThinThick = 3, - msoLineThickThin = 4, - msoLineThickBetweenThin = 5 - }; - - enum MsoMenuAnimation { - msoMenuAnimationNone = 0, - msoMenuAnimationRandom = 1, - msoMenuAnimationUnfold = 2, - msoMenuAnimationSlide = 3 - }; - - enum MsoMixedType { - msoIntegerMixed = 32768, - msoSingleMixed = -2147483648 - }; - - enum MsoModeType { - msoModeModal = 0, - msoModeAutoDown = 1, - msoModeModeless = 2 - }; - - enum MsoMoveRow { - msoMoveRowFirst = -4, - msoMoveRowPrev = -3, - msoMoveRowNext = -2, - msoMoveRowNbr = -1 - }; - - enum MsoOLEMenuGroup { - msoOLEMenuGroupNone = -1, - msoOLEMenuGroupFile = 0, - msoOLEMenuGroupEdit = 1, - msoOLEMenuGroupContainer= 2, - msoOLEMenuGroupObject = 3, - msoOLEMenuGroupWindow = 4, - msoOLEMenuGroupHelp = 5 - }; - - enum MsoOrgChartLayoutType { - msoOrgChartLayoutMixed = -2, - msoOrgChartLayoutStandard= 1, - msoOrgChartLayoutBothHanging= 2, - msoOrgChartLayoutLeftHanging= 3, - msoOrgChartLayoutRightHanging= 4 - }; - - enum MsoOrgChartOrientation { - msoOrgChartOrientationMixed= -2, - msoOrgChartOrientationVertical= 1 - }; - - enum MsoOrientation { - msoOrientationMixed = -2, - msoOrientationHorizontal= 1, - msoOrientationVertical = 2 - }; - - enum MsoPatternType { - msoPatternMixed = -2, - msoPattern5Percent = 1, - msoPattern10Percent = 2, - msoPattern20Percent = 3, - msoPattern25Percent = 4, - msoPattern30Percent = 5, - msoPattern40Percent = 6, - msoPattern50Percent = 7, - msoPattern60Percent = 8, - msoPattern70Percent = 9, - msoPattern75Percent = 10, - msoPattern80Percent = 11, - msoPattern90Percent = 12, - msoPatternDarkHorizontal= 13, - msoPatternDarkVertical = 14, - msoPatternDarkDownwardDiagonal= 15, - msoPatternDarkUpwardDiagonal= 16, - msoPatternSmallCheckerBoard= 17, - msoPatternTrellis = 18, - msoPatternLightHorizontal= 19, - msoPatternLightVertical = 20, - msoPatternLightDownwardDiagonal= 21, - msoPatternLightUpwardDiagonal= 22, - msoPatternSmallGrid = 23, - msoPatternDottedDiamond = 24, - msoPatternWideDownwardDiagonal= 25, - msoPatternWideUpwardDiagonal= 26, - msoPatternDashedUpwardDiagonal= 27, - msoPatternDashedDownwardDiagonal= 28, - msoPatternNarrowVertical= 29, - msoPatternNarrowHorizontal= 30, - msoPatternDashedVertical= 31, - msoPatternDashedHorizontal= 32, - msoPatternLargeConfetti = 33, - msoPatternLargeGrid = 34, - msoPatternHorizontalBrick= 35, - msoPatternLargeCheckerBoard= 36, - msoPatternSmallConfetti = 37, - msoPatternZigZag = 38, - msoPatternSolidDiamond = 39, - msoPatternDiagonalBrick = 40, - msoPatternOutlinedDiamond= 41, - msoPatternPlaid = 42, - msoPatternSphere = 43, - msoPatternWeave = 44, - msoPatternDottedGrid = 45, - msoPatternDivot = 46, - msoPatternShingle = 47, - msoPatternWave = 48 - }; - - enum MsoPermission { - msoPermissionView = 1, - msoPermissionRead = 1, - msoPermissionEdit = 2, - msoPermissionSave = 4, - msoPermissionExtract = 8, - msoPermissionChange = 15, - msoPermissionPrint = 16, - msoPermissionObjModel = 32, - msoPermissionFullControl= 64 - }; - - enum MsoPictureColorType { - msoPictureMixed = -2, - msoPictureAutomatic = 1, - msoPictureGrayscale = 2, - msoPictureBlackAndWhite = 3, - msoPictureWatermark = 4 - }; - - enum MsoPresetExtrusionDirection { - msoPresetExtrusionDirectionMixed= -2, - msoExtrusionBottomRight = 1, - msoExtrusionBottom = 2, - msoExtrusionBottomLeft = 3, - msoExtrusionRight = 4, - msoExtrusionNone = 5, - msoExtrusionLeft = 6, - msoExtrusionTopRight = 7, - msoExtrusionTop = 8, - msoExtrusionTopLeft = 9 - }; - - enum MsoPresetGradientType { - msoPresetGradientMixed = -2, - msoGradientEarlySunset = 1, - msoGradientLateSunset = 2, - msoGradientNightfall = 3, - msoGradientDaybreak = 4, - msoGradientHorizon = 5, - msoGradientDesert = 6, - msoGradientOcean = 7, - msoGradientCalmWater = 8, - msoGradientFire = 9, - msoGradientFog = 10, - msoGradientMoss = 11, - msoGradientPeacock = 12, - msoGradientWheat = 13, - msoGradientParchment = 14, - msoGradientMahogany = 15, - msoGradientRainbow = 16, - msoGradientRainbowII = 17, - msoGradientGold = 18, - msoGradientGoldII = 19, - msoGradientBrass = 20, - msoGradientChrome = 21, - msoGradientChromeII = 22, - msoGradientSilver = 23, - msoGradientSapphire = 24 - }; - - enum MsoPresetLightingDirection { - msoPresetLightingDirectionMixed= -2, - msoLightingTopLeft = 1, - msoLightingTop = 2, - msoLightingTopRight = 3, - msoLightingLeft = 4, - msoLightingNone = 5, - msoLightingRight = 6, - msoLightingBottomLeft = 7, - msoLightingBottom = 8, - msoLightingBottomRight = 9 - }; - - enum MsoPresetLightingSoftness { - msoPresetLightingSoftnessMixed= -2, - msoLightingDim = 1, - msoLightingNormal = 2, - msoLightingBright = 3 - }; - - enum MsoPresetMaterial { - msoPresetMaterialMixed = -2, - msoMaterialMatte = 1, - msoMaterialPlastic = 2, - msoMaterialMetal = 3, - msoMaterialWireFrame = 4 - }; - - enum MsoPresetTextEffect { - msoTextEffectMixed = -2, - msoTextEffect1 = 0, - msoTextEffect2 = 1, - msoTextEffect3 = 2, - msoTextEffect4 = 3, - msoTextEffect5 = 4, - msoTextEffect6 = 5, - msoTextEffect7 = 6, - msoTextEffect8 = 7, - msoTextEffect9 = 8, - msoTextEffect10 = 9, - msoTextEffect11 = 10, - msoTextEffect12 = 11, - msoTextEffect13 = 12, - msoTextEffect14 = 13, - msoTextEffect15 = 14, - msoTextEffect16 = 15, - msoTextEffect17 = 16, - msoTextEffect18 = 17, - msoTextEffect19 = 18, - msoTextEffect20 = 19, - msoTextEffect21 = 20, - msoTextEffect22 = 21, - msoTextEffect23 = 22, - msoTextEffect24 = 23, - msoTextEffect25 = 24, - msoTextEffect26 = 25, - msoTextEffect27 = 26, - msoTextEffect28 = 27, - msoTextEffect29 = 28, - msoTextEffect30 = 29 - }; - - enum MsoPresetTextEffectShape { - msoTextEffectShapeMixed = -2, - msoTextEffectShapePlainText= 1, - msoTextEffectShapeStop = 2, - msoTextEffectShapeTriangleUp= 3, - msoTextEffectShapeTriangleDown= 4, - msoTextEffectShapeChevronUp= 5, - msoTextEffectShapeChevronDown= 6, - msoTextEffectShapeRingInside= 7, - msoTextEffectShapeRingOutside= 8, - msoTextEffectShapeArchUpCurve= 9, - msoTextEffectShapeArchDownCurve= 10, - msoTextEffectShapeCircleCurve= 11, - msoTextEffectShapeButtonCurve= 12, - msoTextEffectShapeArchUpPour= 13, - msoTextEffectShapeArchDownPour= 14, - msoTextEffectShapeCirclePour= 15, - msoTextEffectShapeButtonPour= 16, - msoTextEffectShapeCurveUp= 17, - msoTextEffectShapeCurveDown= 18, - msoTextEffectShapeCanUp = 19, - msoTextEffectShapeCanDown= 20, - msoTextEffectShapeWave1 = 21, - msoTextEffectShapeWave2 = 22, - msoTextEffectShapeDoubleWave1= 23, - msoTextEffectShapeDoubleWave2= 24, - msoTextEffectShapeInflate= 25, - msoTextEffectShapeDeflate= 26, - msoTextEffectShapeInflateBottom= 27, - msoTextEffectShapeDeflateBottom= 28, - msoTextEffectShapeInflateTop= 29, - msoTextEffectShapeDeflateTop= 30, - msoTextEffectShapeDeflateInflate= 31, - msoTextEffectShapeDeflateInflateDeflate= 32, - msoTextEffectShapeFadeRight= 33, - msoTextEffectShapeFadeLeft= 34, - msoTextEffectShapeFadeUp= 35, - msoTextEffectShapeFadeDown= 36, - msoTextEffectShapeSlantUp= 37, - msoTextEffectShapeSlantDown= 38, - msoTextEffectShapeCascadeUp= 39, - msoTextEffectShapeCascadeDown= 40 - }; - - enum MsoPresetTexture { - msoPresetTextureMixed = -2, - msoTexturePapyrus = 1, - msoTextureCanvas = 2, - msoTextureDenim = 3, - msoTextureWovenMat = 4, - msoTextureWaterDroplets = 5, - msoTexturePaperBag = 6, - msoTextureFishFossil = 7, - msoTextureSand = 8, - msoTextureGreenMarble = 9, - msoTextureWhiteMarble = 10, - msoTextureBrownMarble = 11, - msoTextureGranite = 12, - msoTextureNewsprint = 13, - msoTextureRecycledPaper = 14, - msoTextureParchment = 15, - msoTextureStationery = 16, - msoTextureBlueTissuePaper= 17, - msoTexturePinkTissuePaper= 18, - msoTexturePurpleMesh = 19, - msoTextureBouquet = 20, - msoTextureCork = 21, - msoTextureWalnut = 22, - msoTextureOak = 23, - msoTextureMediumWood = 24 - }; - - enum MsoPresetThreeDFormat { - msoPresetThreeDFormatMixed= -2, - msoThreeD1 = 1, - msoThreeD2 = 2, - msoThreeD3 = 3, - msoThreeD4 = 4, - msoThreeD5 = 5, - msoThreeD6 = 6, - msoThreeD7 = 7, - msoThreeD8 = 8, - msoThreeD9 = 9, - msoThreeD10 = 10, - msoThreeD11 = 11, - msoThreeD12 = 12, - msoThreeD13 = 13, - msoThreeD14 = 14, - msoThreeD15 = 15, - msoThreeD16 = 16, - msoThreeD17 = 17, - msoThreeD18 = 18, - msoThreeD19 = 19, - msoThreeD20 = 20 - }; - - enum MsoRelativeNodePosition { - msoBeforeNode = 1, - msoAfterNode = 2, - msoBeforeFirstSibling = 3, - msoAfterLastSibling = 4 - }; - - enum MsoScaleFrom { - msoScaleFromTopLeft = 0, - msoScaleFromMiddle = 1, - msoScaleFromBottomRight = 2 - }; - - enum MsoScreenSize { - msoScreenSize544x376 = 0, - msoScreenSize640x480 = 1, - msoScreenSize720x512 = 2, - msoScreenSize800x600 = 3, - msoScreenSize1024x768 = 4, - msoScreenSize1152x882 = 5, - msoScreenSize1152x900 = 6, - msoScreenSize1280x1024 = 7, - msoScreenSize1600x1200 = 8, - msoScreenSize1800x1440 = 9, - msoScreenSize1920x1200 = 10 - }; - - enum MsoScriptLanguage { - msoScriptLanguageJava = 1, - msoScriptLanguageVisualBasic= 2, - msoScriptLanguageASP = 3, - msoScriptLanguageOther = 4 - }; - - enum MsoScriptLocation { - msoScriptLocationInHead = 1, - msoScriptLocationInBody = 2 - }; - - enum MsoSearchIn { - msoSearchInMyComputer = 0, - msoSearchInOutlook = 1, - msoSearchInMyNetworkPlaces= 2, - msoSearchInCustom = 3 - }; - - enum MsoSegmentType { - msoSegmentLine = 0, - msoSegmentCurve = 1 - }; - - enum MsoShadowType { - msoShadowMixed = -2, - msoShadow1 = 1, - msoShadow2 = 2, - msoShadow3 = 3, - msoShadow4 = 4, - msoShadow5 = 5, - msoShadow6 = 6, - msoShadow7 = 7, - msoShadow8 = 8, - msoShadow9 = 9, - msoShadow10 = 10, - msoShadow11 = 11, - msoShadow12 = 12, - msoShadow13 = 13, - msoShadow14 = 14, - msoShadow15 = 15, - msoShadow16 = 16, - msoShadow17 = 17, - msoShadow18 = 18, - msoShadow19 = 19, - msoShadow20 = 20 - }; - - enum MsoShapeType { - msoShapeTypeMixed = -2, - msoAutoShape = 1, - msoCallout = 2, - msoChart = 3, - msoComment = 4, - msoFreeform = 5, - msoGroup = 6, - msoEmbeddedOLEObject = 7, - msoFormControl = 8, - msoLine = 9, - msoLinkedOLEObject = 10, - msoLinkedPicture = 11, - msoOLEControlObject = 12, - msoPicture = 13, - msoPlaceholder = 14, - msoTextEffect = 15, - msoMedia = 16, - msoTextBox = 17, - msoScriptAnchor = 18, - msoTable = 19, - msoCanvas = 20, - msoDiagram = 21, - msoInk = 22, - msoInkComment = 23 - }; - - enum MsoSharedWorkspaceTaskPriority { - msoSharedWorkspaceTaskPriorityHigh= 1, - msoSharedWorkspaceTaskPriorityNormal= 2, - msoSharedWorkspaceTaskPriorityLow= 3 - }; - - enum MsoSharedWorkspaceTaskStatus { - msoSharedWorkspaceTaskStatusNotStarted= 1, - msoSharedWorkspaceTaskStatusInProgress= 2, - msoSharedWorkspaceTaskStatusCompleted= 3, - msoSharedWorkspaceTaskStatusDeferred= 4, - msoSharedWorkspaceTaskStatusWaiting= 5 - }; - - enum MsoSortBy { - msoSortByFileName = 1, - msoSortBySize = 2, - msoSortByFileType = 3, - msoSortByLastModified = 4, - msoSortByNone = 5 - }; - - enum MsoSortOrder { - msoSortOrderAscending = 1, - msoSortOrderDescending = 2 - }; - - enum MsoSyncAvailableType { - msoSyncAvailableNone = 0, - msoSyncAvailableOffline = 1, - msoSyncAvailableAnywhere= 2 - }; - - enum MsoSyncCompareType { - msoSyncCompareAndMerge = 0, - msoSyncCompareSideBySide= 1 - }; - - enum MsoSyncConflictResolutionType { - msoSyncConflictClientWins= 0, - msoSyncConflictServerWins= 1, - msoSyncConflictMerge = 2 - }; - - enum MsoSyncErrorType { - msoSyncErrorNone = 0, - msoSyncErrorUnauthorizedUser= 1, - msoSyncErrorCouldNotConnect= 2, - msoSyncErrorOutOfSpace = 3, - msoSyncErrorFileNotFound= 4, - msoSyncErrorFileTooLarge= 5, - msoSyncErrorFileInUse = 6, - msoSyncErrorVirusUpload = 7, - msoSyncErrorVirusDownload= 8, - msoSyncErrorUnknownUpload= 9, - msoSyncErrorUnknownDownload= 10, - msoSyncErrorCouldNotOpen= 11, - msoSyncErrorCouldNotUpdate= 12, - msoSyncErrorCouldNotCompare= 13, - msoSyncErrorCouldNotResolve= 14, - msoSyncErrorNoNetwork = 15, - msoSyncErrorUnknown = 16 - }; - - enum MsoSyncEventType { - msoSyncEventDownloadInitiated= 0, - msoSyncEventDownloadSucceeded= 1, - msoSyncEventDownloadFailed= 2, - msoSyncEventUploadInitiated= 3, - msoSyncEventUploadSucceeded= 4, - msoSyncEventUploadFailed= 5, - msoSyncEventDownloadNoChange= 6, - msoSyncEventOffline = 7 - }; - - enum MsoSyncStatusType { - msoSyncStatusNoSharedWorkspace= 0, - msoSyncStatusLatest = 1, - msoSyncStatusNewerAvailable= 2, - msoSyncStatusLocalChanges= 3, - msoSyncStatusConflict = 4, - msoSyncStatusSuspended = 5, - msoSyncStatusError = 6 - }; - - enum MsoSyncVersionType { - msoSyncVersionLastViewed= 0, - msoSyncVersionServer = 1 - }; - - enum MsoTargetBrowser { - msoTargetBrowserV3 = 0, - msoTargetBrowserV4 = 1, - msoTargetBrowserIE4 = 2, - msoTargetBrowserIE5 = 3, - msoTargetBrowserIE6 = 4 - }; - - enum MsoTextEffectAlignment { - msoTextEffectAlignmentMixed= -2, - msoTextEffectAlignmentLeft= 1, - msoTextEffectAlignmentCentered= 2, - msoTextEffectAlignmentRight= 3, - msoTextEffectAlignmentLetterJustify= 4, - msoTextEffectAlignmentWordJustify= 5, - msoTextEffectAlignmentStretchJustify= 6 - }; - - enum MsoTextOrientation { - msoTextOrientationMixed = -2, - msoTextOrientationHorizontal= 1, - msoTextOrientationUpward= 2, - msoTextOrientationDownward= 3, - msoTextOrientationVerticalFarEast= 4, - msoTextOrientationVertical= 5, - msoTextOrientationHorizontalRotatedFarEast= 6 - }; - - enum MsoTextureType { - msoTextureTypeMixed = -2, - msoTexturePreset = 1, - msoTextureUserDefined = 2 - }; - - enum MsoTriState { - msoTrue = -1, - msoFalse = 0, - msoCTrue = 1, - msoTriStateToggle = -3, - msoTriStateMixed = -2 - }; - - enum MsoVerticalAnchor { - msoVerticalAnchorMixed = -2, - msoAnchorTop = 1, - msoAnchorTopBaseline = 2, - msoAnchorMiddle = 3, - msoAnchorBottom = 4, - msoAnchorBottomBaseLine = 5 - }; - - enum MsoWizardActType { - msoWizardActInactive = 0, - msoWizardActActive = 1, - msoWizardActSuspend = 2, - msoWizardActResume = 3 - }; - - enum MsoWizardMsgType { - msoWizardMsgLocalStateOn= 1, - msoWizardMsgLocalStateOff= 2, - msoWizardMsgShowHelp = 3, - msoWizardMsgSuspending = 4, - msoWizardMsgResuming = 5 - }; - - enum MsoZOrderCmd { - msoBringToFront = 0, - msoSendToBack = 1, - msoBringForward = 2, - msoSendBackward = 3, - msoBringInFrontOfText = 4, - msoSendBehindText = 5 - }; - -// forward declarations - enum MsoLineDashStyle; - enum MsoLineStyle; - enum MsoArrowheadStyle; - enum MsoArrowheadWidth; - enum MsoArrowheadLength; - enum MsoFillType; - enum MsoGradientStyle; - enum MsoGradientColorType; - enum MsoTextureType; - enum MsoPresetTexture; - enum MsoPatternType; - enum MsoPresetGradientType; - enum MsoShadowType; - enum MsoPresetTextEffect; - enum MsoPresetTextEffectShape; - enum MsoTextEffectAlignment; - enum MsoPresetLightingDirection; - enum MsoPresetLightingSoftness; - enum MsoPresetMaterial; - enum MsoPresetExtrusionDirection; - enum MsoPresetThreeDFormat; - enum MsoExtrusionColorType; - enum MsoAlignCmd; - enum MsoDistributeCmd; - enum MsoConnectorType; - enum MsoHorizontalAnchor; - enum MsoVerticalAnchor; - enum MsoOrientation; - enum MsoZOrderCmd; - enum MsoSegmentType; - enum MsoEditingType; - enum MsoAutoShapeType; - enum MsoShapeType; - enum MsoFlipCmd; - enum MsoTriState; - enum MsoColorType; - enum MsoPictureColorType; - enum MsoCalloutAngleType; - enum MsoCalloutDropType; - enum MsoCalloutType; - enum MsoBlackWhiteMode; - enum MsoMixedType; - enum MsoTextOrientation; - enum MsoScaleFrom; - enum MsoBarPosition; - enum MsoBarProtection; - enum MsoBarType; - enum MsoControlType; - enum MsoButtonState; - enum MsoControlOLEUsage; - enum MsoButtonStyleHidden; - enum MsoButtonStyle; - enum MsoComboStyle; - enum MsoOLEMenuGroup; - enum MsoMenuAnimation; - enum MsoBarRow; - enum MsoCommandBarButtonHyperlinkType; - enum MsoHyperlinkType; - enum MsoExtraInfoMethod; - enum MsoAnimationType; - enum MsoButtonSetType; - enum MsoIconType; - enum MsoBalloonType; - enum MsoModeType; - enum MsoBalloonErrorType; - enum MsoWizardActType; - enum MsoWizardMsgType; - enum MsoBalloonButtonType; - enum DocProperties; - enum MsoDocProperties; - enum MsoAppLanguageID; - enum MsoFarEastLineBreakLanguageID; - enum MsoFeatureInstall; - enum MsoScriptLanguage; - enum MsoScriptLocation; - class DocumentProperty; - class DocumentProperties; - enum MsoFileFindOptions; - enum MsoFileFindView; - enum MsoFileFindSortBy; - enum MsoFileFindListBy; - enum MsoLastModified; - enum MsoSortBy; - enum MsoSortOrder; - enum MsoConnector; - enum MsoCondition; - enum MsoFileType; - enum MsoLanguageID; - enum MsoScreenSize; - enum MsoCharacterSet; - enum MsoEncoding; - enum MsoHTMLProjectOpen; - enum MsoHTMLProjectState; - enum MsoFileDialogType; - enum MsoFileDialogView; - enum MsoAutomationSecurity; - enum MailFormat; - enum MsoAlertButtonType; - enum MsoAlertIconType; - enum MsoAlertDefaultType; - enum MsoAlertCancelType; - enum MsoSearchIn; - enum MsoTargetBrowser; - enum MsoOrgChartOrientation; - enum MsoOrgChartLayoutType; - enum MsoRelativeNodePosition; - enum MsoDiagramType; - enum MsoDiagramNodeType; - enum MsoMoveRow; - enum MsoFilterComparison; - enum MsoFilterConjunction; - enum MsoFileNewSection; - enum MsoFileNewAction; - enum MsoLanguageIDHidden; - enum MsoSharedWorkspaceTaskStatus; - enum MsoSharedWorkspaceTaskPriority; - enum MsoSyncVersionType; - enum MsoSyncConflictResolutionType; - enum MsoSyncCompareType; - enum MsoSyncAvailableType; - enum MsoSyncEventType; - enum MsoSyncErrorType; - enum MsoSyncStatusType; - enum MsoPermission; - enum MsoLineDashStyle; - enum MsoLineStyle; - enum MsoArrowheadStyle; - enum MsoArrowheadWidth; - enum MsoArrowheadLength; - enum MsoFillType; - enum MsoGradientStyle; - enum MsoGradientColorType; - enum MsoTextureType; - enum MsoPresetTexture; - enum MsoPatternType; - enum MsoPresetGradientType; - enum MsoShadowType; - enum MsoPresetTextEffect; - enum MsoPresetTextEffectShape; - enum MsoTextEffectAlignment; - enum MsoPresetLightingDirection; - enum MsoPresetLightingSoftness; - enum MsoPresetMaterial; - enum MsoPresetExtrusionDirection; - enum MsoPresetThreeDFormat; - enum MsoExtrusionColorType; - enum MsoAlignCmd; - enum MsoDistributeCmd; - enum MsoConnectorType; - enum MsoHorizontalAnchor; - enum MsoVerticalAnchor; - enum MsoOrientation; - enum MsoZOrderCmd; - enum MsoSegmentType; - enum MsoEditingType; - enum MsoAutoShapeType; - enum MsoShapeType; - enum MsoFlipCmd; - enum MsoTriState; - enum MsoColorType; - enum MsoPictureColorType; - enum MsoCalloutAngleType; - enum MsoCalloutDropType; - enum MsoCalloutType; - enum MsoBlackWhiteMode; - enum MsoMixedType; - enum MsoTextOrientation; - enum MsoScaleFrom; - enum MsoBarPosition; - enum MsoBarProtection; - enum MsoBarType; - enum MsoControlType; - enum MsoButtonState; - enum MsoControlOLEUsage; - enum MsoButtonStyleHidden; - enum MsoButtonStyle; - enum MsoComboStyle; - enum MsoOLEMenuGroup; - enum MsoMenuAnimation; - enum MsoBarRow; - enum MsoCommandBarButtonHyperlinkType; - enum MsoHyperlinkType; - enum MsoExtraInfoMethod; - enum MsoAnimationType; - enum MsoButtonSetType; - enum MsoIconType; - enum MsoBalloonType; - enum MsoModeType; - enum MsoBalloonErrorType; - enum MsoWizardActType; - enum MsoWizardMsgType; - enum MsoBalloonButtonType; - enum DocProperties; - enum MsoDocProperties; - enum MsoAppLanguageID; - enum MsoFarEastLineBreakLanguageID; - enum MsoFeatureInstall; - class CommandBarControl; - class CommandBar; - class CommandBarControls; - class Shape; - class ColorFormat; - class ShapeRange; - class ShapeNode; - enum MsoScriptLanguage; - enum MsoScriptLocation; - class Script; - class Adjustments; - class CalloutFormat; - class ConnectorFormat; - class FillFormat; - class GroupShapes; - class LineFormat; - class ShapeNodes; - class PictureFormat; - class ShadowFormat; - class TextEffectFormat; - class TextFrame; - class ThreeDFormat; - class IMsoDiagram; - class DiagramNode; - class CanvasShapes; - class FreeformBuilder; - class AnswerWizardFiles; - class Balloon; - class DocumentProperty; - class DocumentProperties; - enum MsoFileFindOptions; - enum MsoFileFindView; - enum MsoFileFindSortBy; - enum MsoFileFindListBy; - class IFoundFiles; - enum MsoLastModified; - enum MsoSortBy; - enum MsoSortOrder; - enum MsoConnector; - enum MsoCondition; - enum MsoFileType; - class PropertyTest; - class FoundFiles; - class PropertyTests; - class SearchScopes; - class SearchFolders; - class FileTypes; - class COMAddIn; - enum MsoLanguageID; - struct GUID; - struct DISPPARAMS; - struct EXCEPINFO; - class CommandBarComboBox; - class CommandBarButton; - enum MsoScreenSize; - enum MsoCharacterSet; - enum MsoEncoding; - class WebPageFont; - enum MsoHTMLProjectOpen; - enum MsoHTMLProjectState; - class HTMLProjectItem; - class HTMLProjectItems; - enum MsoFileDialogType; - enum MsoFileDialogView; - class FileDialogFilter; - class FileDialogFilters; - class FileDialogSelectedItems; - enum MsoAutomationSecurity; - class Signature; - enum MailFormat; - enum MsoAlertButtonType; - enum MsoAlertIconType; - enum MsoAlertDefaultType; - enum MsoAlertCancelType; - enum MsoSearchIn; - enum MsoTargetBrowser; - class ScopeFolder; - class ScopeFolders; - class SearchScope; - enum MsoOrgChartOrientation; - enum MsoOrgChartLayoutType; - enum MsoRelativeNodePosition; - enum MsoDiagramType; - enum MsoDiagramNodeType; - class DiagramNodes; - class DiagramNodeChildren; - enum MsoMoveRow; - enum MsoFilterComparison; - enum MsoFilterConjunction; - enum MsoFileNewSection; - enum MsoFileNewAction; - class WebComponent; - enum MsoLanguageIDHidden; - class SharedWorkspaceMember; - enum MsoSharedWorkspaceTaskStatus; - enum MsoSharedWorkspaceTaskPriority; - class SharedWorkspaceTask; - class SharedWorkspaceFile; - class SharedWorkspaceFolder; - class SharedWorkspaceLink; - class SharedWorkspaceMembers; - class SharedWorkspaceTasks; - class SharedWorkspaceFiles; - class SharedWorkspaceFolders; - class SharedWorkspaceLinks; - enum MsoSyncVersionType; - enum MsoSyncConflictResolutionType; - enum MsoSyncCompareType; - enum MsoSyncAvailableType; - enum MsoSyncEventType; - enum MsoSyncErrorType; - enum MsoSyncStatusType; - class DocumentLibraryVersion; - enum MsoPermission; - class UserPermission; - -class OFFICE_EXPORT IAccessible : public QAxObject -{ -public: - IAccessible(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _IMsoDispObj : public QAxObject -{ -public: - _IMsoDispObj(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _IMsoOleAccDispObj : public QAxObject -{ -public: - _IMsoOleAccDispObj(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _CommandBars : public QAxObject -{ -public: - _CommandBars(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActionControl - - For more information, see help context 2001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* ActionControl() const; //Returns the value of ActionControl - - /* - Property ActiveMenuBar - - For more information, see help context 2002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* ActiveMenuBar() const; //Returns the value of ActiveMenuBar - - /* - Property AdaptiveMenus - - For more information, see help context 2013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AdaptiveMenus() const; //Returns the value of AdaptiveMenus - inline void SetAdaptiveMenus(bool value); //Sets the value of the AdaptiveMenus property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 2004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DisableAskAQuestionDropdown - - For more information, see help context 2017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisableAskAQuestionDropdown() const; //Returns the value of DisableAskAQuestionDropdown - inline void SetDisableAskAQuestionDropdown(bool value); //Sets the value of the DisableAskAQuestionDropdown property - - /* - Property DisableCustomize - - For more information, see help context 2016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisableCustomize() const; //Returns the value of DisableCustomize - inline void SetDisableCustomize(bool value); //Sets the value of the DisableCustomize property - - /* - Property DisplayFonts - - For more information, see help context 2015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayFonts() const; //Returns the value of DisplayFonts - inline void SetDisplayFonts(bool value); //Sets the value of the DisplayFonts property - - /* - Property DisplayKeysInTooltips - - For more information, see help context 2006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayKeysInTooltips() const; //Returns the value of DisplayKeysInTooltips - inline void SetDisplayKeysInTooltips(bool value); //Sets the value of the DisplayKeysInTooltips property - - /* - Property DisplayTooltips - - For more information, see help context 2005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayTooltips() const; //Returns the value of DisplayTooltips - inline void SetDisplayTooltips(bool value); //Sets the value of the DisplayTooltips property - - /* - Property LargeButtons - - For more information, see help context 2009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool LargeButtons() const; //Returns the value of LargeButtons - inline void SetLargeButtons(bool value); //Sets the value of the LargeButtons property - - /* - Property MenuAnimationStyle - - For more information, see help context 2010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoMenuAnimation MenuAnimationStyle() const; //Returns the value of MenuAnimationStyle - inline void SetMenuAnimationStyle(Office::MsoMenuAnimation value); //Sets the value of the MenuAnimationStyle property - - /* - Property Parent - - For more information, see help context 2011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary, const QVariant& TbtrProtection); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible); - - /* - Method IdsString - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int IdsString(int ids, QString& pbstrName); - - /* - Method Item - - For more information, see help context 2008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Item(const QVariant& Index); - - /* - Method ReleaseFocus - - For more information, see help context 2012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ReleaseFocus(); - - /* - Method TmcGetName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int TmcGetName(int tmc, QString& pbstrName); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBar : public QAxObject -{ -public: - CommandBar(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AdaptiveMenu - - For more information, see help context 3022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AdaptiveMenu() const; //Returns the value of AdaptiveMenu - inline void SetAdaptiveMenu(bool value); //Sets the value of the AdaptiveMenu property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BuiltIn - - For more information, see help context 3001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Context - - For more information, see help context 3002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Context() const; //Returns the value of Context - inline void SetContext(const QString& value); //Sets the value of the Context property - - /* - Property Controls - - For more information, see help context 3003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* Controls() const; //Returns the value of Controls - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Enabled - - For more information, see help context 3005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 3007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property Id - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 3008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property Left - - For more information, see help context 3009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - inline void SetLeft(int value); //Sets the value of the Left property - - /* - Property Name - - For more information, see help context 3010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property NameLocal - - For more information, see help context 3011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString NameLocal() const; //Returns the value of NameLocal - inline void SetNameLocal(const QString& value); //Sets the value of the NameLocal property - - /* - Property Parent - - For more information, see help context 3012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Position - - For more information, see help context 3013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBarPosition Position() const; //Returns the value of Position - inline void SetPosition(Office::MsoBarPosition value); //Sets the value of the Position property - - /* - Property Protection - - For more information, see help context 3015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBarProtection Protection() const; //Returns the value of Protection - inline void SetProtection(Office::MsoBarProtection value); //Sets the value of the Protection property - - /* - Property RowIndex - - For more information, see help context 3014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int RowIndex() const; //Returns the value of RowIndex - inline void SetRowIndex(int value); //Sets the value of the RowIndex property - - /* - Property Top - - For more information, see help context 3018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - inline void SetTop(int value); //Sets the value of the Top property - - /* - Property Type - - For more information, see help context 3019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBarType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 3020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 3021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Delete - - For more information, see help context 3004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible); - - /* - Method FindControl - - For more information, see help context 3006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible, const QVariant& Recursive); - - /* - Method Reset - - For more information, see help context 3016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method ShowPopup - - For more information, see help context 3017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ShowPopup(); - - /* - Method ShowPopup - - For more information, see help context 3017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ShowPopup(const QVariant& x); - - /* - Method ShowPopup - - For more information, see help context 3017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ShowPopup(const QVariant& x, const QVariant& y); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBarControls : public QAxObject -{ -public: - CommandBarControls(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 4002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 4004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(); - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(const QVariant& Type); - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(const QVariant& Type, const QVariant& Id); - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter); - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter, const QVariant& Before); - - /* - Method Add - - For more information, see help context 4001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter, const QVariant& Before, const QVariant& Temporary); - - /* - Method Item - - For more information, see help context 4003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Item(const QVariant& Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBarControl : public QAxObject -{ -public: - CommandBarControl(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _CommandBarButton : public QAxObject -{ -public: - _CommandBarButton(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property BuiltInFace - - For more information, see help context 6001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltInFace() const; //Returns the value of BuiltInFace - inline void SetBuiltInFace(bool value); //Sets the value of the BuiltInFace property - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property FaceId - - For more information, see help context 6003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int FaceId() const; //Returns the value of FaceId - inline void SetFaceId(int value); //Sets the value of the FaceId property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property HyperlinkType - - For more information, see help context 6008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCommandBarButtonHyperlinkType HyperlinkType() const; //Returns the value of HyperlinkType - inline void SetHyperlinkType(Office::MsoCommandBarButtonHyperlinkType value); //Sets the value of the HyperlinkType property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property Mask - - For more information, see help context 6010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QPixmap Mask() const; //Returns the value of Mask - inline void SetMask(const QPixmap& value); //Sets the value of the Mask property - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Picture - - For more information, see help context 6009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QPixmap Picture() const; //Returns the value of Picture - inline void SetPicture(const QPixmap& value); //Sets the value of the Picture property - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property ShortcutText - - For more information, see help context 6005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ShortcutText() const; //Returns the value of ShortcutText - inline void SetShortcutText(const QString& value); //Sets the value of the ShortcutText property - - /* - Property State - - For more information, see help context 6006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoButtonState State() const; //Returns the value of State - inline void SetState(Office::MsoButtonState value); //Sets the value of the State property - - /* - Property Style - - For more information, see help context 6007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoButtonStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoButtonStyle value); //Sets the value of the Style property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method CopyFace - - For more information, see help context 6002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CopyFace(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method PasteFace - - For more information, see help context 6004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PasteFace(); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBarPopup : public QAxObject -{ -public: - CommandBarPopup(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property CommandBar - - For more information, see help context 7001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* CommandBar() const; //Returns the value of CommandBar - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Controls - - For more information, see help context 7002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* Controls() const; //Returns the value of Controls - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property OLEMenuGroup - - For more information, see help context 7003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoOLEMenuGroup OLEMenuGroup() const; //Returns the value of OLEMenuGroup - inline void SetOLEMenuGroup(Office::MsoOLEMenuGroup value); //Sets the value of the OLEMenuGroup property - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _CommandBarComboBox : public QAxObject -{ -public: - _CommandBarComboBox(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property DropDownLines - - For more information, see help context 8003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DropDownLines() const; //Returns the value of DropDownLines - inline void SetDropDownLines(int value); //Sets the value of the DropDownLines property - - /* - Property DropDownWidth - - For more information, see help context 8004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DropDownWidth() const; //Returns the value of DropDownWidth - inline void SetDropDownWidth(int value); //Sets the value of the DropDownWidth property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property ListCount - - For more information, see help context 8006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListCount() const; //Returns the value of ListCount - - /* - Property ListHeaderCount - - For more information, see help context 8007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListHeaderCount() const; //Returns the value of ListHeaderCount - inline void SetListHeaderCount(int value); //Sets the value of the ListHeaderCount property - - /* - Property ListIndex - - For more information, see help context 8008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListIndex() const; //Returns the value of ListIndex - inline void SetListIndex(int value); //Sets the value of the ListIndex property - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property Style - - For more information, see help context 8010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoComboStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoComboStyle value); //Sets the value of the Style property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property Text - - For more information, see help context 8011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method AddItem - - For more information, see help context 8001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddItem(const QString& Text); - - /* - Method AddItem - - For more information, see help context 8001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddItem(const QString& Text, const QVariant& Index); - - /* - Method Clear - - For more information, see help context 8002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Clear(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method List - - For more information, see help context 8005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString List(int Index); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method RemoveItem - - For more information, see help context 8009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RemoveItem(int Index); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method SetList - */ - inline int SetList(int Index, const QString& rhs); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT _CommandBarActiveX : public QAxObject -{ -public: - _CommandBarActiveX(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property ControlCLSID - - For more information, see help context 9001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ControlCLSID() const; //Returns the value of ControlCLSID - inline void SetControlCLSID(const QString& value); //Sets the value of the ControlCLSID property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InitWith - - For more information, see help context 9005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* InitWith() const; //Returns the value of InitWith - inline void SetInitWith(IUnknown* value); //Sets the value of the InitWith property - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method EnsureControl - - For more information, see help context 9004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void EnsureControl(); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method QueryControlInterface - - For more information, see help context 9002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* QueryControlInterface(const QString& bstrIid); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method SetInnerObjectFactory - - For more information, see help context 9003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetInnerObjectFactory(IUnknown* pUnk); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Adjustments : public QAxObject -{ -public: - Adjustments(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Item(int Index); - - /* - Method SetItem - */ - inline int SetItem(int Index, double rhs); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CalloutFormat : public QAxObject -{ -public: - CalloutFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Accent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Accent() const; //Returns the value of Accent - inline void SetAccent(Office::MsoTriState value); //Sets the value of the Accent property - - /* - Property Angle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCalloutAngleType Angle() const; //Returns the value of Angle - inline void SetAngle(Office::MsoCalloutAngleType value); //Sets the value of the Angle property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoAttach - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState AutoAttach() const; //Returns the value of AutoAttach - inline void SetAutoAttach(Office::MsoTriState value); //Sets the value of the AutoAttach property - - /* - Property AutoLength - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState AutoLength() const; //Returns the value of AutoLength - - /* - Property Border - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Border() const; //Returns the value of Border - inline void SetBorder(Office::MsoTriState value); //Sets the value of the Border property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Drop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Drop() const; //Returns the value of Drop - - /* - Property DropType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCalloutDropType DropType() const; //Returns the value of DropType - - /* - Property Gap - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Gap() const; //Returns the value of Gap - inline void SetGap(double value); //Sets the value of the Gap property - - /* - Property Length - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Length() const; //Returns the value of Length - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCalloutType Type() const; //Returns the value of Type - inline void SetType(Office::MsoCalloutType value); //Sets the value of the Type property - - /* - Method AutomaticLength - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AutomaticLength(); - - /* - Method CustomDrop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CustomDrop(double Drop); - - /* - Method CustomLength - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CustomLength(double Length); - - /* - Method PresetDrop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PresetDrop(Office::MsoCalloutDropType DropType); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ColorFormat : public QAxObject -{ -public: - ColorFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RGB - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int RGB() const; //Returns the value of RGB - inline void SetRGB(int value); //Sets the value of the RGB property - - /* - Property SchemeColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int SchemeColor() const; //Returns the value of SchemeColor - inline void SetSchemeColor(int value); //Sets the value of the SchemeColor property - - /* - Property TintAndShade - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double TintAndShade() const; //Returns the value of TintAndShade - inline void SetTintAndShade(double value); //Sets the value of the TintAndShade property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoColorType Type() const; //Returns the value of Type - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ConnectorFormat : public QAxObject -{ -public: - ConnectorFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginConnected - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState BeginConnected() const; //Returns the value of BeginConnected - - /* - Property BeginConnectedShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* BeginConnectedShape() const; //Returns the value of BeginConnectedShape - - /* - Property BeginConnectionSite - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int BeginConnectionSite() const; //Returns the value of BeginConnectionSite - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property EndConnected - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState EndConnected() const; //Returns the value of EndConnected - - /* - Property EndConnectedShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* EndConnectedShape() const; //Returns the value of EndConnectedShape - - /* - Property EndConnectionSite - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int EndConnectionSite() const; //Returns the value of EndConnectionSite - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoConnectorType Type() const; //Returns the value of Type - inline void SetType(Office::MsoConnectorType value); //Sets the value of the Type property - - /* - Method BeginConnect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void BeginConnect(Office::Shape* ConnectedShape, int ConnectionSite); - - /* - Method BeginDisconnect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void BeginDisconnect(); - - /* - Method EndConnect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void EndConnect(Office::Shape* ConnectedShape, int ConnectionSite); - - /* - Method EndDisconnect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void EndDisconnect(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FillFormat : public QAxObject -{ -public: - FillFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BackColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* BackColor() const; //Returns the value of BackColor - inline void SetBackColor(Office::ColorFormat* value); //Sets the value of the BackColor property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ForeColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(Office::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property GradientColorType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoGradientColorType GradientColorType() const; //Returns the value of GradientColorType - - /* - Property GradientDegree - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double GradientDegree() const; //Returns the value of GradientDegree - - /* - Property GradientStyle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoGradientStyle GradientStyle() const; //Returns the value of GradientStyle - - /* - Property GradientVariant - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int GradientVariant() const; //Returns the value of GradientVariant - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Pattern - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPatternType Pattern() const; //Returns the value of Pattern - - /* - Property PresetGradientType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetGradientType PresetGradientType() const; //Returns the value of PresetGradientType - - /* - Property PresetTexture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetTexture PresetTexture() const; //Returns the value of PresetTexture - - /* - Property TextureName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TextureName() const; //Returns the value of TextureName - - /* - Property TextureType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTextureType TextureType() const; //Returns the value of TextureType - - /* - Property Transparency - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFillType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method Background - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Background(); - - /* - Method OneColorGradient - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void OneColorGradient(Office::MsoGradientStyle Style, int Variant, double Degree); - - /* - Method Patterned - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Patterned(Office::MsoPatternType Pattern); - - /* - Method PresetGradient - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PresetGradient(Office::MsoGradientStyle Style, int Variant, Office::MsoPresetGradientType PresetGradientType); - - /* - Method PresetTextured - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PresetTextured(Office::MsoPresetTexture PresetTexture); - - /* - Method Solid - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Solid(); - - /* - Method TwoColorGradient - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void TwoColorGradient(Office::MsoGradientStyle Style, int Variant); - - /* - Method UserPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void UserPicture(const QString& PictureFile); - - /* - Method UserTextured - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void UserTextured(const QString& TextureFile); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FreeformBuilder : public QAxObject -{ -public: - FreeformBuilder(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method AddNodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method AddNodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2); - - /* - Method AddNodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2); - - /* - Method AddNodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3); - - /* - Method AddNodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3); - - /* - Method ConvertToShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* ConvertToShape(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT GroupShapes : public QAxObject -{ -public: - GroupShapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Item(const QVariant& Index); - - /* - Method Range - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Range(const QVariant& Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT LineFormat : public QAxObject -{ -public: - LineFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BackColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* BackColor() const; //Returns the value of BackColor - inline void SetBackColor(Office::ColorFormat* value); //Sets the value of the BackColor property - - /* - Property BeginArrowheadLength - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadLength BeginArrowheadLength() const; //Returns the value of BeginArrowheadLength - inline void SetBeginArrowheadLength(Office::MsoArrowheadLength value); //Sets the value of the BeginArrowheadLength property - - /* - Property BeginArrowheadStyle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadStyle BeginArrowheadStyle() const; //Returns the value of BeginArrowheadStyle - inline void SetBeginArrowheadStyle(Office::MsoArrowheadStyle value); //Sets the value of the BeginArrowheadStyle property - - /* - Property BeginArrowheadWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadWidth BeginArrowheadWidth() const; //Returns the value of BeginArrowheadWidth - inline void SetBeginArrowheadWidth(Office::MsoArrowheadWidth value); //Sets the value of the BeginArrowheadWidth property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DashStyle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoLineDashStyle DashStyle() const; //Returns the value of DashStyle - inline void SetDashStyle(Office::MsoLineDashStyle value); //Sets the value of the DashStyle property - - /* - Property EndArrowheadLength - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadLength EndArrowheadLength() const; //Returns the value of EndArrowheadLength - inline void SetEndArrowheadLength(Office::MsoArrowheadLength value); //Sets the value of the EndArrowheadLength property - - /* - Property EndArrowheadStyle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadStyle EndArrowheadStyle() const; //Returns the value of EndArrowheadStyle - inline void SetEndArrowheadStyle(Office::MsoArrowheadStyle value); //Sets the value of the EndArrowheadStyle property - - /* - Property EndArrowheadWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoArrowheadWidth EndArrowheadWidth() const; //Returns the value of EndArrowheadWidth - inline void SetEndArrowheadWidth(Office::MsoArrowheadWidth value); //Sets the value of the EndArrowheadWidth property - - /* - Property ForeColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(Office::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property InsetPen - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState InsetPen() const; //Returns the value of InsetPen - inline void SetInsetPen(Office::MsoTriState value); //Sets the value of the InsetPen property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Pattern - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPatternType Pattern() const; //Returns the value of Pattern - inline void SetPattern(Office::MsoPatternType value); //Sets the value of the Pattern property - - /* - Property Style - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoLineStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoLineStyle value); //Sets the value of the Style property - - /* - Property Transparency - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Weight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Weight() const; //Returns the value of Weight - inline void SetWeight(double value); //Sets the value of the Weight property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ShapeNode : public QAxObject -{ -public: - ShapeNode(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property EditingType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoEditingType EditingType() const; //Returns the value of EditingType - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Points - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Points() const; //Returns the value of Points - - /* - Property SegmentType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSegmentType SegmentType() const; //Returns the value of SegmentType - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ShapeNodes : public QAxObject -{ -public: - ShapeNodes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Delete - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(int Index); - - /* - Method Insert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Insert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2); - - /* - Method Insert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2); - - /* - Method Insert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3); - - /* - Method Insert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3); - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeNode* Item(const QVariant& Index); - - /* - Method SetEditingType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetEditingType(int Index, Office::MsoEditingType EditingType); - - /* - Method SetPosition - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetPosition(int Index, double X1, double Y1); - - /* - Method SetSegmentType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSegmentType(int Index, Office::MsoSegmentType SegmentType); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT PictureFormat : public QAxObject -{ -public: - PictureFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Brightness - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Brightness() const; //Returns the value of Brightness - inline void SetBrightness(double value); //Sets the value of the Brightness property - - /* - Property ColorType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPictureColorType ColorType() const; //Returns the value of ColorType - inline void SetColorType(Office::MsoPictureColorType value); //Sets the value of the ColorType property - - /* - Property Contrast - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Contrast() const; //Returns the value of Contrast - inline void SetContrast(double value); //Sets the value of the Contrast property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property CropBottom - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double CropBottom() const; //Returns the value of CropBottom - inline void SetCropBottom(double value); //Sets the value of the CropBottom property - - /* - Property CropLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double CropLeft() const; //Returns the value of CropLeft - inline void SetCropLeft(double value); //Sets the value of the CropLeft property - - /* - Property CropRight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double CropRight() const; //Returns the value of CropRight - inline void SetCropRight(double value); //Sets the value of the CropRight property - - /* - Property CropTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double CropTop() const; //Returns the value of CropTop - inline void SetCropTop(double value); //Sets the value of the CropTop property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property TransparencyColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int TransparencyColor() const; //Returns the value of TransparencyColor - inline void SetTransparencyColor(int value); //Sets the value of the TransparencyColor property - - /* - Property TransparentBackground - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState TransparentBackground() const; //Returns the value of TransparentBackground - inline void SetTransparentBackground(Office::MsoTriState value); //Sets the value of the TransparentBackground property - - /* - Method IncrementBrightness - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementBrightness(double Increment); - - /* - Method IncrementContrast - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementContrast(double Increment); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ShadowFormat : public QAxObject -{ -public: - ShadowFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ForeColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(Office::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property Obscured - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Obscured() const; //Returns the value of Obscured - inline void SetObscured(Office::MsoTriState value); //Sets the value of the Obscured property - - /* - Property OffsetX - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double OffsetX() const; //Returns the value of OffsetX - inline void SetOffsetX(double value); //Sets the value of the OffsetX property - - /* - Property OffsetY - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double OffsetY() const; //Returns the value of OffsetY - inline void SetOffsetY(double value); //Sets the value of the OffsetY property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Transparency - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoShadowType Type() const; //Returns the value of Type - inline void SetType(Office::MsoShadowType value); //Sets the value of the Type property - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method IncrementOffsetX - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementOffsetX(double Increment); - - /* - Method IncrementOffsetY - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementOffsetY(double Increment); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Script : public QAxObject -{ -public: - Script(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Extended - - For more information, see help context 218002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Extended() const; //Returns the value of Extended - inline void SetExtended(const QString& value); //Sets the value of the Extended property - - /* - Property Id - - For more information, see help context 218004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Id() const; //Returns the value of Id - inline void SetId(const QString& value); //Sets the value of the Id property - - /* - Property Language - - For more information, see help context 218006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoScriptLanguage Language() const; //Returns the value of Language - inline void SetLanguage(Office::MsoScriptLanguage value); //Sets the value of the Language property - - /* - Property Location - - For more information, see help context 218008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoScriptLocation Location() const; //Returns the value of Location - - /* - Property Parent - - For more information, see help context 218001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ScriptText - - For more information, see help context 218011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ScriptText() const; //Returns the value of ScriptText - inline void SetScriptText(const QString& value); //Sets the value of the ScriptText property - - /* - Property Shape - - For more information, see help context 218010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Shape() const; //Returns the value of Shape - - /* - Method Delete - - For more information, see help context 218009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Scripts : public QAxObject -{ -public: - Scripts(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 217002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 217001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 217003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor, Office::MsoScriptLocation Location); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id, const QString& Extended); - - /* - Method Add - - For more information, see help context 217005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id, const QString& Extended, const QString& ScriptText); - - /* - Method Delete - - For more information, see help context 217006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Item - - For more information, see help context 217004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Item(const QVariant& Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Shape : public QAxObject -{ -public: - Shape(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Adjustments - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Adjustments* Adjustments() const; //Returns the value of Adjustments - - /* - Property AlternativeText - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString AlternativeText() const; //Returns the value of AlternativeText - inline void SetAlternativeText(const QString& value); //Sets the value of the AlternativeText property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoShapeType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoAutoShapeType AutoShapeType() const; //Returns the value of AutoShapeType - inline void SetAutoShapeType(Office::MsoAutoShapeType value); //Sets the value of the AutoShapeType property - - /* - Property BlackWhiteMode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBlackWhiteMode BlackWhiteMode() const; //Returns the value of BlackWhiteMode - inline void SetBlackWhiteMode(Office::MsoBlackWhiteMode value); //Sets the value of the BlackWhiteMode property - - /* - Property Callout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CalloutFormat* Callout() const; //Returns the value of Callout - - /* - Property CanvasItems - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CanvasShapes* CanvasItems() const; //Returns the value of CanvasItems - - /* - Property Child - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Child() const; //Returns the value of Child - - /* - Property ConnectionSiteCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ConnectionSiteCount() const; //Returns the value of ConnectionSiteCount - - /* - Property Connector - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Connector() const; //Returns the value of Connector - - /* - Property ConnectorFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ConnectorFormat* ConnectorFormat() const; //Returns the value of ConnectorFormat - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::IMsoDiagram* Diagram() const; //Returns the value of Diagram - - /* - Property DiagramNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* DiagramNode() const; //Returns the value of DiagramNode - - /* - Property Fill - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FillFormat* Fill() const; //Returns the value of Fill - - /* - Property GroupItems - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::GroupShapes* GroupItems() const; //Returns the value of GroupItems - - /* - Property HasDiagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HasDiagram() const; //Returns the value of HasDiagram - - /* - Property HasDiagramNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HasDiagramNode() const; //Returns the value of HasDiagramNode - - /* - Property Height - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property HorizontalFlip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HorizontalFlip() const; //Returns the value of HorizontalFlip - - /* - Property Id - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Left - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Line - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::LineFormat* Line() const; //Returns the value of Line - - /* - Property LockAspectRatio - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState LockAspectRatio() const; //Returns the value of LockAspectRatio - inline void SetLockAspectRatio(Office::MsoTriState value); //Sets the value of the LockAspectRatio property - - /* - Property Name - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Nodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeNodes* Nodes() const; //Returns the value of Nodes - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ParentGroup - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* ParentGroup() const; //Returns the value of ParentGroup - - /* - Property PictureFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::PictureFormat* PictureFormat() const; //Returns the value of PictureFormat - - /* - Property RTF - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString RTF() const; //Returns the value of RTF - inline void SetRTF(const QString& value); //Sets the value of the RTF property - - /* - Property Rotation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Rotation() const; //Returns the value of Rotation - inline void SetRotation(double value); //Sets the value of the Rotation property - - /* - Property Script - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Script() const; //Returns the value of Script - - /* - Property Shadow - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShadowFormat* Shadow() const; //Returns the value of Shadow - - /* - Property TextEffect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::TextEffectFormat* TextEffect() const; //Returns the value of TextEffect - - /* - Property TextFrame - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::TextFrame* TextFrame() const; //Returns the value of TextFrame - - /* - Property ThreeD - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ThreeDFormat* ThreeD() const; //Returns the value of ThreeD - - /* - Property Top - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoShapeType Type() const; //Returns the value of Type - - /* - Property VerticalFlip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState VerticalFlip() const; //Returns the value of VerticalFlip - - /* - Property Vertices - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Vertices() const; //Returns the value of Vertices - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - - /* - Method Apply - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Apply(); - - /* - Method CanvasCropBottom - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropBottom(double Increment); - - /* - Method CanvasCropLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropLeft(double Increment); - - /* - Method CanvasCropRight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropRight(double Increment); - - /* - Method CanvasCropTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropTop(double Increment); - - /* - Method Delete - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Duplicate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Duplicate(); - - /* - Method Flip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Flip(Office::MsoFlipCmd FlipCmd); - - /* - Method IncrementLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementLeft(double Increment); - - /* - Method IncrementRotation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementRotation(double Increment); - - /* - Method IncrementTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementTop(double Increment); - - /* - Method PickUp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PickUp(); - - /* - Method RerouteConnections - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RerouteConnections(); - - /* - Method ScaleHeight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleHeight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method ScaleWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method Select - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Select(); - - /* - Method Select - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Select(const QVariant& Replace); - - /* - Method SetShapesDefaultProperties - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetShapesDefaultProperties(); - - /* - Method Ungroup - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Ungroup(); - - /* - Method ZOrder - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ZOrder(Office::MsoZOrderCmd ZOrderCmd); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ShapeRange : public QAxObject -{ -public: - ShapeRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Adjustments - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Adjustments* Adjustments() const; //Returns the value of Adjustments - - /* - Property AlternativeText - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString AlternativeText() const; //Returns the value of AlternativeText - inline void SetAlternativeText(const QString& value); //Sets the value of the AlternativeText property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoShapeType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoAutoShapeType AutoShapeType() const; //Returns the value of AutoShapeType - inline void SetAutoShapeType(Office::MsoAutoShapeType value); //Sets the value of the AutoShapeType property - - /* - Property BlackWhiteMode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBlackWhiteMode BlackWhiteMode() const; //Returns the value of BlackWhiteMode - inline void SetBlackWhiteMode(Office::MsoBlackWhiteMode value); //Sets the value of the BlackWhiteMode property - - /* - Property Callout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CalloutFormat* Callout() const; //Returns the value of Callout - - /* - Property CanvasItems - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CanvasShapes* CanvasItems() const; //Returns the value of CanvasItems - - /* - Property Child - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Child() const; //Returns the value of Child - - /* - Property ConnectionSiteCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ConnectionSiteCount() const; //Returns the value of ConnectionSiteCount - - /* - Property Connector - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Connector() const; //Returns the value of Connector - - /* - Property ConnectorFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ConnectorFormat* ConnectorFormat() const; //Returns the value of ConnectorFormat - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::IMsoDiagram* Diagram() const; //Returns the value of Diagram - - /* - Property DiagramNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* DiagramNode() const; //Returns the value of DiagramNode - - /* - Property Fill - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FillFormat* Fill() const; //Returns the value of Fill - - /* - Property GroupItems - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::GroupShapes* GroupItems() const; //Returns the value of GroupItems - - /* - Property HasDiagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HasDiagram() const; //Returns the value of HasDiagram - - /* - Property HasDiagramNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HasDiagramNode() const; //Returns the value of HasDiagramNode - - /* - Property Height - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property HorizontalFlip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState HorizontalFlip() const; //Returns the value of HorizontalFlip - - /* - Property Id - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Left - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Line - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::LineFormat* Line() const; //Returns the value of Line - - /* - Property LockAspectRatio - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState LockAspectRatio() const; //Returns the value of LockAspectRatio - inline void SetLockAspectRatio(Office::MsoTriState value); //Sets the value of the LockAspectRatio property - - /* - Property Name - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Nodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeNodes* Nodes() const; //Returns the value of Nodes - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ParentGroup - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* ParentGroup() const; //Returns the value of ParentGroup - - /* - Property PictureFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::PictureFormat* PictureFormat() const; //Returns the value of PictureFormat - - /* - Property RTF - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString RTF() const; //Returns the value of RTF - inline void SetRTF(const QString& value); //Sets the value of the RTF property - - /* - Property Rotation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Rotation() const; //Returns the value of Rotation - inline void SetRotation(double value); //Sets the value of the Rotation property - - /* - Property Script - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Script* Script() const; //Returns the value of Script - - /* - Property Shadow - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShadowFormat* Shadow() const; //Returns the value of Shadow - - /* - Property TextEffect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::TextEffectFormat* TextEffect() const; //Returns the value of TextEffect - - /* - Property TextFrame - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::TextFrame* TextFrame() const; //Returns the value of TextFrame - - /* - Property ThreeD - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ThreeDFormat* ThreeD() const; //Returns the value of ThreeD - - /* - Property Top - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoShapeType Type() const; //Returns the value of Type - - /* - Property VerticalFlip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState VerticalFlip() const; //Returns the value of VerticalFlip - - /* - Property Vertices - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Vertices() const; //Returns the value of Vertices - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Align - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Align(Office::MsoAlignCmd AlignCmd, Office::MsoTriState RelativeTo); - - /* - Method Apply - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Apply(); - - /* - Method CanvasCropBottom - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropBottom(double Increment); - - /* - Method CanvasCropLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropLeft(double Increment); - - /* - Method CanvasCropRight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropRight(double Increment); - - /* - Method CanvasCropTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CanvasCropTop(double Increment); - - /* - Method Delete - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Distribute - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Distribute(Office::MsoDistributeCmd DistributeCmd, Office::MsoTriState RelativeTo); - - /* - Method Duplicate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Duplicate(); - - /* - Method Flip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Flip(Office::MsoFlipCmd FlipCmd); - - /* - Method Group - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Group(); - - /* - Method IncrementLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementLeft(double Increment); - - /* - Method IncrementRotation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementRotation(double Increment); - - /* - Method IncrementTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementTop(double Increment); - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Item(const QVariant& Index); - - /* - Method PickUp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PickUp(); - - /* - Method Regroup - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Regroup(); - - /* - Method RerouteConnections - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RerouteConnections(); - - /* - Method ScaleHeight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleHeight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method ScaleWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleWidth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method Select - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Select(); - - /* - Method Select - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Select(const QVariant& Replace); - - /* - Method SetShapesDefaultProperties - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetShapesDefaultProperties(); - - /* - Method Ungroup - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Ungroup(); - - /* - Method ZOrder - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ZOrder(Office::MsoZOrderCmd ZOrderCmd); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Shapes : public QAxObject -{ -public: - Shapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Background() const; //Returns the value of Background - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Default - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Default() const; //Returns the value of Default - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddCallout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height); - - /* - Method AddCanvas - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddCanvas(double Left, double Top, double Width, double Height); - - /* - Method AddConnector - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddCurve - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddCurve(const QVariant& SafeArrayOfPoints); - - /* - Method AddDiagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddDiagram(Office::MsoDiagramType Type, double Left, double Top, double Width, double Height); - - /* - Method AddLabel - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method AddLine - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddLine(double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height); - - /* - Method AddPolyline - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPolyline(const QVariant& SafeArrayOfPoints); - - /* - Method AddShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height); - - /* - Method AddTextEffect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top); - - /* - Method AddTextbox - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method BuildFreeform - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FreeformBuilder* BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Item(const QVariant& Index); - - /* - Method Range - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Range(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT TextEffectFormat : public QAxObject -{ -public: - TextEffectFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Alignment - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTextEffectAlignment Alignment() const; //Returns the value of Alignment - inline void SetAlignment(Office::MsoTextEffectAlignment value); //Sets the value of the Alignment property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FontBold - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState FontBold() const; //Returns the value of FontBold - inline void SetFontBold(Office::MsoTriState value); //Sets the value of the FontBold property - - /* - Property FontItalic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState FontItalic() const; //Returns the value of FontItalic - inline void SetFontItalic(Office::MsoTriState value); //Sets the value of the FontItalic property - - /* - Property FontName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FontName() const; //Returns the value of FontName - inline void SetFontName(const QString& value); //Sets the value of the FontName property - - /* - Property FontSize - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double FontSize() const; //Returns the value of FontSize - inline void SetFontSize(double value); //Sets the value of the FontSize property - - /* - Property KernedPairs - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState KernedPairs() const; //Returns the value of KernedPairs - inline void SetKernedPairs(Office::MsoTriState value); //Sets the value of the KernedPairs property - - /* - Property NormalizedHeight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState NormalizedHeight() const; //Returns the value of NormalizedHeight - inline void SetNormalizedHeight(Office::MsoTriState value); //Sets the value of the NormalizedHeight property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PresetShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetTextEffectShape PresetShape() const; //Returns the value of PresetShape - inline void SetPresetShape(Office::MsoPresetTextEffectShape value); //Sets the value of the PresetShape property - - /* - Property PresetTextEffect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetTextEffect PresetTextEffect() const; //Returns the value of PresetTextEffect - inline void SetPresetTextEffect(Office::MsoPresetTextEffect value); //Sets the value of the PresetTextEffect property - - /* - Property RotatedChars - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState RotatedChars() const; //Returns the value of RotatedChars - inline void SetRotatedChars(Office::MsoTriState value); //Sets the value of the RotatedChars property - - /* - Property Text - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property Tracking - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Tracking() const; //Returns the value of Tracking - inline void SetTracking(double value); //Sets the value of the Tracking property - - /* - Method ToggleVerticalText - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ToggleVerticalText(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT TextFrame : public QAxObject -{ -public: - TextFrame(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property MarginBottom - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double MarginBottom() const; //Returns the value of MarginBottom - inline void SetMarginBottom(double value); //Sets the value of the MarginBottom property - - /* - Property MarginLeft - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double MarginLeft() const; //Returns the value of MarginLeft - inline void SetMarginLeft(double value); //Sets the value of the MarginLeft property - - /* - Property MarginRight - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double MarginRight() const; //Returns the value of MarginRight - inline void SetMarginRight(double value); //Sets the value of the MarginRight property - - /* - Property MarginTop - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double MarginTop() const; //Returns the value of MarginTop - inline void SetMarginTop(double value); //Sets the value of the MarginTop property - - /* - Property Orientation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTextOrientation Orientation() const; //Returns the value of Orientation - inline void SetOrientation(Office::MsoTextOrientation value); //Sets the value of the Orientation property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ThreeDFormat : public QAxObject -{ -public: - ThreeDFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Depth - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double Depth() const; //Returns the value of Depth - inline void SetDepth(double value); //Sets the value of the Depth property - - /* - Property ExtrusionColor - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ColorFormat* ExtrusionColor() const; //Returns the value of ExtrusionColor - - /* - Property ExtrusionColorType - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoExtrusionColorType ExtrusionColorType() const; //Returns the value of ExtrusionColorType - inline void SetExtrusionColorType(Office::MsoExtrusionColorType value); //Sets the value of the ExtrusionColorType property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Perspective - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Perspective() const; //Returns the value of Perspective - inline void SetPerspective(Office::MsoTriState value); //Sets the value of the Perspective property - - /* - Property PresetExtrusionDirection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetExtrusionDirection PresetExtrusionDirection() const; //Returns the value of PresetExtrusionDirection - - /* - Property PresetLightingDirection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetLightingDirection PresetLightingDirection() const; //Returns the value of PresetLightingDirection - inline void SetPresetLightingDirection(Office::MsoPresetLightingDirection value); //Sets the value of the PresetLightingDirection property - - /* - Property PresetLightingSoftness - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetLightingSoftness PresetLightingSoftness() const; //Returns the value of PresetLightingSoftness - inline void SetPresetLightingSoftness(Office::MsoPresetLightingSoftness value); //Sets the value of the PresetLightingSoftness property - - /* - Property PresetMaterial - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetMaterial PresetMaterial() const; //Returns the value of PresetMaterial - inline void SetPresetMaterial(Office::MsoPresetMaterial value); //Sets the value of the PresetMaterial property - - /* - Property PresetThreeDFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoPresetThreeDFormat PresetThreeDFormat() const; //Returns the value of PresetThreeDFormat - - /* - Property RotationX - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double RotationX() const; //Returns the value of RotationX - inline void SetRotationX(double value); //Sets the value of the RotationX property - - /* - Property RotationY - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double RotationY() const; //Returns the value of RotationY - inline void SetRotationY(double value); //Sets the value of the RotationY property - - /* - Property Visible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method IncrementRotationX - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementRotationX(double Increment); - - /* - Method IncrementRotationY - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void IncrementRotationY(double Increment); - - /* - Method ResetRotation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResetRotation(); - - /* - Method SetExtrusionDirection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetExtrusionDirection(Office::MsoPresetExtrusionDirection PresetExtrusionDirection); - - /* - Method SetThreeDFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetThreeDFormat(Office::MsoPresetThreeDFormat PresetThreeDFormat); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT IMsoDispCagNotifySink : public QAxObject -{ -public: - IMsoDispCagNotifySink(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method InsertClip - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void InsertClip(IUnknown* pClipMoniker, IUnknown* pItemMoniker); - - /* - Method WindowIsClosing - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void WindowIsClosing(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Balloon : public QAxObject -{ -public: - Balloon(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Animation - - For more information, see help context 201009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoAnimationType Animation() const; //Returns the value of Animation - inline void SetAnimation(Office::MsoAnimationType value); //Sets the value of the Animation property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BalloonType - - For more information, see help context 201004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBalloonType BalloonType() const; //Returns the value of BalloonType - inline void SetBalloonType(Office::MsoBalloonType value); //Sets the value of the BalloonType property - - /* - Property Button - - For more information, see help context 201010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoButtonSetType Button() const; //Returns the value of Button - inline void SetButton(Office::MsoButtonSetType value); //Sets the value of the Button property - - /* - Property Callback - - For more information, see help context 201011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Callback() const; //Returns the value of Callback - inline void SetCallback(const QString& value); //Sets the value of the Callback property - - /* - Property Checkboxes - - For more information, see help context 201002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Checkboxes() const; //Returns the value of Checkboxes - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Heading - - For more information, see help context 201006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Heading() const; //Returns the value of Heading - inline void SetHeading(const QString& value); //Sets the value of the Heading property - - /* - Property Icon - - For more information, see help context 201005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoIconType Icon() const; //Returns the value of Icon - inline void SetIcon(Office::MsoIconType value); //Sets the value of the Icon property - - /* - Property Labels - - For more information, see help context 201003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Labels() const; //Returns the value of Labels - - /* - Property Mode - - For more information, see help context 201008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoModeType Mode() const; //Returns the value of Mode - inline void SetMode(Office::MsoModeType value); //Sets the value of the Mode property - - /* - Property Name - - For more information, see help context 201014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 201001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Private - - For more information, see help context 201012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Private() const; //Returns the value of Private - inline void SetPrivate(int value); //Sets the value of the Private property - - /* - Property Text - - For more information, see help context 201007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Method Close - - For more information, see help context 201016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Close(); - - /* - Method SetAvoidRectangle - - For more information, see help context 201013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetAvoidRectangle(int Left, int Top, int Right, int Bottom); - - /* - Method Show - - For more information, see help context 201015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline MsoBalloonButtonType Show(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT BalloonCheckboxes : public QAxObject -{ -public: - BalloonCheckboxes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 202004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - inline void SetCount(int value); //Sets the value of the Count property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Name - - For more information, see help context 202001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 202002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 202005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 202003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT BalloonCheckbox : public QAxObject -{ -public: - BalloonCheckbox(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Checked - - For more information, see help context 203004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Checked() const; //Returns the value of Checked - inline void SetChecked(bool value); //Sets the value of the Checked property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Item - - For more information, see help context 203001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item() const; //Returns the value of Item - - /* - Property Name - - For more information, see help context 203002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 203003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Text - - For more information, see help context 203005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT BalloonLabels : public QAxObject -{ -public: - BalloonLabels(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 204004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - inline void SetCount(int value); //Sets the value of the Count property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Name - - For more information, see help context 204001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 204002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 204005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 204003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT BalloonLabel : public QAxObject -{ -public: - BalloonLabel(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Item - - For more information, see help context 205001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item() const; //Returns the value of Item - - /* - Property Name - - For more information, see help context 205002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 205003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Text - - For more information, see help context 205004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT AnswerWizardFiles : public QAxObject -{ -public: - AnswerWizardFiles(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 226003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 226001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Add - - For more information, see help context 226004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& FileName); - - /* - Method Delete - - For more information, see help context 226005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QString& FileName); - - /* - Method Item - - For more information, see help context 226002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT AnswerWizard : public QAxObject -{ -public: - AnswerWizard(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Files - - For more information, see help context 227002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::AnswerWizardFiles* Files() const; //Returns the value of Files - - /* - Property Parent - - For more information, see help context 227001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method ClearFileList - - For more information, see help context 227003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ClearFileList(); - - /* - Method ResetFileList - - For more information, see help context 227004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResetFileList(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Assistant : public QAxObject -{ -public: - Assistant(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Animation - - For more information, see help context 200013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoAnimationType Animation() const; //Returns the value of Animation - inline void SetAnimation(Office::MsoAnimationType value); //Sets the value of the Animation property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AssistWithAlerts - - For more information, see help context 200017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AssistWithAlerts() const; //Returns the value of AssistWithAlerts - inline void SetAssistWithAlerts(bool value); //Sets the value of the AssistWithAlerts property - - /* - Property AssistWithHelp - - For more information, see help context 200015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AssistWithHelp() const; //Returns the value of AssistWithHelp - inline void SetAssistWithHelp(bool value); //Sets the value of the AssistWithHelp property - - /* - Property AssistWithWizards - - For more information, see help context 200016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AssistWithWizards() const; //Returns the value of AssistWithWizards - inline void SetAssistWithWizards(bool value); //Sets the value of the AssistWithWizards property - - /* - Property BalloonError - - For more information, see help context 200011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoBalloonErrorType BalloonError() const; //Returns the value of BalloonError - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FeatureTips - - For more information, see help context 200020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool FeatureTips() const; //Returns the value of FeatureTips - inline void SetFeatureTips(bool value); //Sets the value of the FeatureTips property - - /* - Property FileName - - For more information, see help context 200028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FileName() const; //Returns the value of FileName - inline void SetFileName(const QString& value); //Sets the value of the FileName property - - /* - Property GuessHelp - - For more information, see help context 200025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool GuessHelp() const; //Returns the value of GuessHelp - inline void SetGuessHelp(bool value); //Sets the value of the GuessHelp property - - /* - Property HighPriorityTips - - For more information, see help context 200023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool HighPriorityTips() const; //Returns the value of HighPriorityTips - inline void SetHighPriorityTips(bool value); //Sets the value of the HighPriorityTips property - - /* - Property Item - - For more information, see help context 200027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item() const; //Returns the value of Item - - /* - Property KeyboardShortcutTips - - For more information, see help context 200022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool KeyboardShortcutTips() const; //Returns the value of KeyboardShortcutTips - inline void SetKeyboardShortcutTips(bool value); //Sets the value of the KeyboardShortcutTips property - - /* - Property Left - - For more information, see help context 200004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - inline void SetLeft(int value); //Sets the value of the Left property - - /* - Property MouseTips - - For more information, see help context 200021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool MouseTips() const; //Returns the value of MouseTips - inline void SetMouseTips(bool value); //Sets the value of the MouseTips property - - /* - Property MoveWhenInTheWay - - For more information, see help context 200018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool MoveWhenInTheWay() const; //Returns the value of MoveWhenInTheWay - inline void SetMoveWhenInTheWay(bool value); //Sets the value of the MoveWhenInTheWay property - - /* - Property Name - - For more information, see help context 200029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property NewBalloon - - For more information, see help context 200010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Balloon* NewBalloon() const; //Returns the value of NewBalloon - - /* - Property On - - For more information, see help context 200030 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool On() const; //Returns the value of On - inline void SetOn(bool value); //Sets the value of the On property - - /* - Property Parent - - For more information, see help context 200001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Reduced - - For more information, see help context 200014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Reduced() const; //Returns the value of Reduced - inline void SetReduced(bool value); //Sets the value of the Reduced property - - /* - Property SearchWhenProgramming - - For more information, see help context 200026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool SearchWhenProgramming() const; //Returns the value of SearchWhenProgramming - inline void SetSearchWhenProgramming(bool value); //Sets the value of the SearchWhenProgramming property - - /* - Property Sounds - - For more information, see help context 200019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Sounds() const; //Returns the value of Sounds - inline void SetSounds(bool value); //Sets the value of the Sounds property - - /* - Property TipOfDay - - For more information, see help context 200024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool TipOfDay() const; //Returns the value of TipOfDay - inline void SetTipOfDay(bool value); //Sets the value of the TipOfDay property - - /* - Property Top - - For more information, see help context 200003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - inline void SetTop(int value); //Sets the value of the Top property - - /* - Property Visible - - For more information, see help context 200012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Method ActivateWizard - - For more information, see help context 200008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ActivateWizard(int WizardID, Office::MsoWizardActType act); - - /* - Method ActivateWizard - - For more information, see help context 200008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ActivateWizard(int WizardID, Office::MsoWizardActType act, const QVariant& Animation); - - /* - Method DoAlert - - For more information, see help context 200031 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DoAlert(const QString& bstrAlertTitle, const QString& bstrAlertText, Office::MsoAlertButtonType alb, Office::MsoAlertIconType alc, Office::MsoAlertDefaultType ald, Office::MsoAlertCancelType alq, bool varfSysAlert); - - /* - Method EndWizard - - For more information, see help context 200007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void EndWizard(int WizardID, bool varfSuccess); - - /* - Method EndWizard - - For more information, see help context 200007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void EndWizard(int WizardID, bool varfSuccess, const QVariant& Animation); - - /* - Method Help - - For more information, see help context 200005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Help(); - - /* - Method Move - - For more information, see help context 200002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Move(int xLeft, int yTop); - - /* - Method ResetTips - - For more information, see help context 200009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResetTips(); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left, const QVariant& Bottom); - - /* - Method StartWizard - - For more information, see help context 200006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left, const QVariant& Bottom, const QVariant& Right); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class DocumentProperty : public QAxObject {}; - -// stub for vtable-only interface -class DocumentProperties : public QAxObject {}; - -class OFFICE_EXPORT IFoundFiles : public QAxObject -{ -public: - IFoundFiles(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Count - - For more information, see help context 211002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 211001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT IFind : public QAxObject -{ -public: - IFind(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Author - - For more information, see help context 212005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Author() const; //Returns the value of Author - inline void SetAuthor(const QString& value); //Sets the value of the Author property - - /* - Property DateCreatedFrom - - For more information, see help context 212015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant DateCreatedFrom() const; //Returns the value of DateCreatedFrom - inline void SetDateCreatedFrom(const QVariant& value); //Sets the value of the DateCreatedFrom property - - /* - Property DateCreatedTo - - For more information, see help context 212016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant DateCreatedTo() const; //Returns the value of DateCreatedTo - inline void SetDateCreatedTo(const QVariant& value); //Sets the value of the DateCreatedTo property - - /* - Property DateSavedFrom - - For more information, see help context 212012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant DateSavedFrom() const; //Returns the value of DateSavedFrom - inline void SetDateSavedFrom(const QVariant& value); //Sets the value of the DateSavedFrom property - - /* - Property DateSavedTo - - For more information, see help context 212013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant DateSavedTo() const; //Returns the value of DateSavedTo - inline void SetDateSavedTo(const QVariant& value); //Sets the value of the DateSavedTo property - - /* - Property FileType - - For more information, see help context 212027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int FileType() const; //Returns the value of FileType - inline void SetFileType(int value); //Sets the value of the FileType property - - /* - Property Keywords - - For more information, see help context 212006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Keywords() const; //Returns the value of Keywords - inline void SetKeywords(const QString& value); //Sets the value of the Keywords property - - /* - Property ListBy - - For more information, see help context 212019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileFindListBy ListBy() const; //Returns the value of ListBy - inline void SetListBy(Office::MsoFileFindListBy value); //Sets the value of the ListBy property - - /* - Property MatchCase - - For more information, see help context 212009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool MatchCase() const; //Returns the value of MatchCase - inline void SetMatchCase(bool value); //Sets the value of the MatchCase property - - /* - Property Name - - For more information, see help context 212002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Options - - For more information, see help context 212008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileFindOptions Options() const; //Returns the value of Options - inline void SetOptions(Office::MsoFileFindOptions value); //Sets the value of the Options property - - /* - Property PatternMatch - - For more information, see help context 212011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool PatternMatch() const; //Returns the value of PatternMatch - inline void SetPatternMatch(bool value); //Sets the value of the PatternMatch property - - /* - Property Results - - For more information, see help context 212021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::IFoundFiles* Results() const; //Returns the value of Results - - /* - Property SavedBy - - For more information, see help context 212014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SavedBy() const; //Returns the value of SavedBy - inline void SetSavedBy(const QString& value); //Sets the value of the SavedBy property - - /* - Property SearchPath - - For more information, see help context 212001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SearchPath() const; //Returns the value of SearchPath - inline void SetSearchPath(const QString& value); //Sets the value of the SearchPath property - - /* - Property SelectedFile - - For more information, see help context 212020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int SelectedFile() const; //Returns the value of SelectedFile - inline void SetSelectedFile(int value); //Sets the value of the SelectedFile property - - /* - Property SortBy - - For more information, see help context 212018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileFindSortBy SortBy() const; //Returns the value of SortBy - inline void SetSortBy(Office::MsoFileFindSortBy value); //Sets the value of the SortBy property - - /* - Property SubDir - - For more information, see help context 212003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool SubDir() const; //Returns the value of SubDir - inline void SetSubDir(bool value); //Sets the value of the SubDir property - - /* - Property Subject - - For more information, see help context 212007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Subject() const; //Returns the value of Subject - inline void SetSubject(const QString& value); //Sets the value of the Subject property - - /* - Property Text - - For more information, see help context 212010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property Title - - For more information, see help context 212004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Title() const; //Returns the value of Title - inline void SetTitle(const QString& value); //Sets the value of the Title property - - /* - Property View - - For more information, see help context 212017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileFindView View() const; //Returns the value of View - inline void SetView(Office::MsoFileFindView value); //Sets the value of the View property - - /* - Method Delete - - For more information, see help context 212026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QString& bstrQueryName); - - /* - Method Execute - - For more information, see help context 212023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Load - - For more information, see help context 212024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Load(const QString& bstrQueryName); - - /* - Method Save - - For more information, see help context 212025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Save(const QString& bstrQueryName); - - /* - Method Show - - For more information, see help context 212022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Show(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FoundFiles : public QAxObject -{ -public: - FoundFiles(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 213002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 213001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT PropertyTest : public QAxObject -{ -public: - PropertyTest(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Condition - - For more information, see help context 214002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCondition Condition() const; //Returns the value of Condition - - /* - Property Connector - - For more information, see help context 214005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoConnector Connector() const; //Returns the value of Connector - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Name - - For more information, see help context 214001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property SecondValue - - For more information, see help context 214004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant SecondValue() const; //Returns the value of SecondValue - - /* - Property Value - - For more information, see help context 214003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Value() const; //Returns the value of Value - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT PropertyTests : public QAxObject -{ -public: - PropertyTests(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 215002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 215003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Name, Office::MsoCondition Condition); - - /* - Method Add - - For more information, see help context 215003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value); - - /* - Method Add - - For more information, see help context 215003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value, const QVariant& SecondValue); - - /* - Method Add - - For more information, see help context 215003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value, const QVariant& SecondValue, Office::MsoConnector Connector); - - /* - Method Item - - For more information, see help context 215001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::PropertyTest* Item(int Index); - - /* - Method Remove - - For more information, see help context 215004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Remove(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FileSearch : public QAxObject -{ -public: - FileSearch(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FileName - - For more information, see help context 216004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FileName() const; //Returns the value of FileName - inline void SetFileName(const QString& value); //Sets the value of the FileName property - - /* - Property FileType - - For more information, see help context 216005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileType FileType() const; //Returns the value of FileType - inline void SetFileType(Office::MsoFileType value); //Sets the value of the FileType property - - /* - Property FileTypes - - For more information, see help context 216016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileTypes* FileTypes() const; //Returns the value of FileTypes - - /* - Property FoundFiles - - For more information, see help context 216011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FoundFiles* FoundFiles() const; //Returns the value of FoundFiles - - /* - Property LastModified - - For more information, see help context 216006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoLastModified LastModified() const; //Returns the value of LastModified - inline void SetLastModified(Office::MsoLastModified value); //Sets the value of the LastModified property - - /* - Property LookIn - - For more information, see help context 216008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString LookIn() const; //Returns the value of LookIn - inline void SetLookIn(const QString& value); //Sets the value of the LookIn property - - /* - Property MatchAllWordForms - - For more information, see help context 216003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool MatchAllWordForms() const; //Returns the value of MatchAllWordForms - inline void SetMatchAllWordForms(bool value); //Sets the value of the MatchAllWordForms property - - /* - Property MatchTextExactly - - For more information, see help context 216002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool MatchTextExactly() const; //Returns the value of MatchTextExactly - inline void SetMatchTextExactly(bool value); //Sets the value of the MatchTextExactly property - - /* - Property PropertyTests - - For more information, see help context 216012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::PropertyTests* PropertyTests() const; //Returns the value of PropertyTests - - /* - Property SearchFolders - - For more information, see help context 216014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SearchFolders* SearchFolders() const; //Returns the value of SearchFolders - - /* - Property SearchScopes - - For more information, see help context 216013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SearchScopes* SearchScopes() const; //Returns the value of SearchScopes - - /* - Property SearchSubFolders - - For more information, see help context 216001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool SearchSubFolders() const; //Returns the value of SearchSubFolders - inline void SetSearchSubFolders(bool value); //Sets the value of the SearchSubFolders property - - /* - Property TextOrProperty - - For more information, see help context 216007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TextOrProperty() const; //Returns the value of TextOrProperty - inline void SetTextOrProperty(const QString& value); //Sets the value of the TextOrProperty property - - /* - Method Execute - - For more information, see help context 216009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Execute(); - - /* - Method Execute - - For more information, see help context 216009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Execute(Office::MsoSortBy SortBy); - - /* - Method Execute - - For more information, see help context 216009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Execute(Office::MsoSortBy SortBy, Office::MsoSortOrder SortOrder); - - /* - Method Execute - - For more information, see help context 216009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Execute(Office::MsoSortBy SortBy, Office::MsoSortOrder SortOrder, bool AlwaysAccurate); - - /* - Method NewSearch - - For more information, see help context 216010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void NewSearch(); - - /* - Method RefreshScopes - - For more information, see help context 216017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshScopes(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT COMAddIn : public QAxObject -{ -public: - COMAddIn(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Connect - - For more information, see help context 219005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Connect() const; //Returns the value of Connect - inline void SetConnect(bool value); //Sets the value of the Connect property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Description - - For more information, see help context 219001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Description() const; //Returns the value of Description - inline void SetDescription(const QString& value); //Sets the value of the Description property - - /* - Property Guid - - For more information, see help context 219004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Guid() const; //Returns the value of Guid - - /* - Property Object - - For more information, see help context 219007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Object() const; //Returns the value of Object - inline void SetObject(IDispatch* value); //Sets the value of the Object property - - /* - Property Parent - - For more information, see help context 219009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ProgId - - For more information, see help context 219003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ProgId() const; //Returns the value of ProgId - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT COMAddIns : public QAxObject -{ -public: - COMAddIns(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 220002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 220005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 220003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 220001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::COMAddIn* Item(QVariant& Index); - - /* - Method SetAppModal - - For more information, see help context 220006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetAppModal(bool varfModal); - - /* - Method Update - - For more information, see help context 220004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Update(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT LanguageSettings : public QAxObject -{ -public: - LanguageSettings(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 231003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method LanguageID - - For more information, see help context 231001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int LanguageID(Office::MsoAppLanguageID Id); - - /* - Method LanguagePreferredForEditing - - For more information, see help context 231002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool LanguagePreferredForEditing(Office::MsoLanguageID lid); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ICommandBarsEvents : public QAxObject -{ -public: - ICommandBarsEvents(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method OnUpdate - - For more information, see help context 228001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void OnUpdate(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// skipping event interface _CommandBarsEvents - -class OFFICE_EXPORT ICommandBarComboBoxEvents : public QAxObject -{ -public: - ICommandBarComboBoxEvents(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method Change - - For more information, see help context 229001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Change(Office::CommandBarComboBox* Ctrl); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// skipping event interface _CommandBarComboBoxEvents - -class OFFICE_EXPORT ICommandBarButtonEvents : public QAxObject -{ -public: - ICommandBarButtonEvents(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method Click - - For more information, see help context 230001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Click(Office::CommandBarButton* Ctrl, bool& CancelDefault); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// skipping event interface _CommandBarButtonEvents - -class OFFICE_EXPORT WebPageFont : public QAxObject -{ -public: - WebPageFont(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FixedWidthFont - - For more information, see help context 224003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FixedWidthFont() const; //Returns the value of FixedWidthFont - inline void SetFixedWidthFont(const QString& value); //Sets the value of the FixedWidthFont property - - /* - Property FixedWidthFontSize - - For more information, see help context 224004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double FixedWidthFontSize() const; //Returns the value of FixedWidthFontSize - inline void SetFixedWidthFontSize(double value); //Sets the value of the FixedWidthFontSize property - - /* - Property ProportionalFont - - For more information, see help context 224001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ProportionalFont() const; //Returns the value of ProportionalFont - inline void SetProportionalFont(const QString& value); //Sets the value of the ProportionalFont property - - /* - Property ProportionalFontSize - - For more information, see help context 224002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline double ProportionalFontSize() const; //Returns the value of ProportionalFontSize - inline void SetProportionalFontSize(double value); //Sets the value of the ProportionalFontSize property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT WebPageFonts : public QAxObject -{ -public: - WebPageFonts(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 225001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 225002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::WebPageFont* Item(Office::MsoCharacterSet Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT HTMLProjectItem : public QAxObject -{ -public: - HTMLProjectItem(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property IsOpen - - For more information, see help context 221002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsOpen() const; //Returns the value of IsOpen - - /* - Property Name - - For more information, see help context 221001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 221008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Text - - For more information, see help context 221006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Method LoadFromFile - - For more information, see help context 221003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void LoadFromFile(const QString& FileName); - - /* - Method Open - - For more information, see help context 221004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(); - - /* - Method Open - - For more information, see help context 221004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(Office::MsoHTMLProjectOpen OpenKind); - - /* - Method SaveCopyAs - - For more information, see help context 221005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SaveCopyAs(const QString& FileName); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT HTMLProjectItems : public QAxObject -{ -public: - HTMLProjectItems(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 222002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 222004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 222003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 222001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::HTMLProjectItem* Item(QVariant& Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT HTMLProject : public QAxObject -{ -public: - HTMLProject(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property HTMLProjectItems - - For more information, see help context 223004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::HTMLProjectItems* HTMLProjectItems() const; //Returns the value of HTMLProjectItems - - /* - Property Parent - - For more information, see help context 223005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property State - - For more information, see help context 223001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoHTMLProjectState State() const; //Returns the value of State - - /* - Method Open - - For more information, see help context 223006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(); - - /* - Method Open - - For more information, see help context 223006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(Office::MsoHTMLProjectOpen OpenKind); - - /* - Method RefreshDocument - - For more information, see help context 223003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshDocument(); - - /* - Method RefreshDocument - - For more information, see help context 223003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshDocument(bool Refresh); - - /* - Method RefreshProject - - For more information, see help context 223002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshProject(); - - /* - Method RefreshProject - - For more information, see help context 223002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshProject(bool Refresh); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT MsoDebugOptions : public QAxObject -{ -public: - MsoDebugOptions(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FeatureReports - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int FeatureReports() const; //Returns the value of FeatureReports - inline void SetFeatureReports(int value); //Sets the value of the FeatureReports property - - /* - Property OutputToDebugger - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool OutputToDebugger() const; //Returns the value of OutputToDebugger - inline void SetOutputToDebugger(bool value); //Sets the value of the OutputToDebugger property - - /* - Property OutputToFile - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool OutputToFile() const; //Returns the value of OutputToFile - inline void SetOutputToFile(bool value); //Sets the value of the OutputToFile property - - /* - Property OutputToMessageBox - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool OutputToMessageBox() const; //Returns the value of OutputToMessageBox - inline void SetOutputToMessageBox(bool value); //Sets the value of the OutputToMessageBox property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FileDialogSelectedItems : public QAxObject -{ -public: - FileDialogSelectedItems(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 253002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 253001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 253003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FileDialogFilter : public QAxObject -{ -public: - FileDialogFilter(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Description - - For more information, see help context 254003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Description() const; //Returns the value of Description - - /* - Property Extensions - - For more information, see help context 254002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Extensions() const; //Returns the value of Extensions - - /* - Property Parent - - For more information, see help context 254001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FileDialogFilters : public QAxObject -{ -public: - FileDialogFilters(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 255002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 255001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 255006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileDialogFilter* Add(const QString& Description, const QString& Extensions); - - /* - Method Add - - For more information, see help context 255006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileDialogFilter* Add(const QString& Description, const QString& Extensions, const QVariant& Position); - - /* - Method Clear - - For more information, see help context 255005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Clear(); - - /* - Method Delete - - For more information, see help context 255004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 255004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& filter); - - /* - Method Item - - For more information, see help context 255003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileDialogFilter* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT FileDialog : public QAxObject -{ -public: - FileDialog(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AllowMultiSelect - - For more information, see help context 256006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AllowMultiSelect() const; //Returns the value of AllowMultiSelect - inline void SetAllowMultiSelect(bool value); //Sets the value of the AllowMultiSelect property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property ButtonName - - For more information, see help context 256005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ButtonName() const; //Returns the value of ButtonName - inline void SetButtonName(const QString& value); //Sets the value of the ButtonName property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DialogType - - For more information, see help context 256010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileDialogType DialogType() const; //Returns the value of DialogType - - /* - Property FilterIndex - - For more information, see help context 256003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int FilterIndex() const; //Returns the value of FilterIndex - inline void SetFilterIndex(int value); //Sets the value of the FilterIndex property - - /* - Property Filters - - For more information, see help context 256002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileDialogFilters* Filters() const; //Returns the value of Filters - - /* - Property InitialFileName - - For more information, see help context 256008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString InitialFileName() const; //Returns the value of InitialFileName - inline void SetInitialFileName(const QString& value); //Sets the value of the InitialFileName property - - /* - Property InitialView - - For more information, see help context 256007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFileDialogView InitialView() const; //Returns the value of InitialView - inline void SetInitialView(Office::MsoFileDialogView value); //Sets the value of the InitialView property - - /* - Property Item - - For more information, see help context 256011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Item() const; //Returns the value of Item - - /* - Property Parent - - For more information, see help context 256001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SelectedItems - - For more information, see help context 256009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FileDialogSelectedItems* SelectedItems() const; //Returns the value of SelectedItems - - /* - Property Title - - For more information, see help context 256004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Title() const; //Returns the value of Title - inline void SetTitle(const QString& value); //Sets the value of the Title property - - /* - Method Execute - - For more information, see help context 256013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Show - - For more information, see help context 256012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Show(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SignatureSet : public QAxObject -{ -public: - SignatureSet(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 247001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 247005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 247003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Signature* Add(); - - /* - Method Commit - - For more information, see help context 247004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Commit(); - - /* - Method Item - - For more information, see help context 247002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Signature* Item(int iSig); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Signature : public QAxObject -{ -public: - Signature(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AttachCertificate - - For more information, see help context 248005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AttachCertificate() const; //Returns the value of AttachCertificate - inline void SetAttachCertificate(bool value); //Sets the value of the AttachCertificate property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ExpireDate - - For more information, see help context 248003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant ExpireDate() const; //Returns the value of ExpireDate - - /* - Property IsCertificateExpired - - For more information, see help context 248008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsCertificateExpired() const; //Returns the value of IsCertificateExpired - - /* - Property IsCertificateRevoked - - For more information, see help context 248009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsCertificateRevoked() const; //Returns the value of IsCertificateRevoked - - /* - Property IsValid - - For more information, see help context 248004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsValid() const; //Returns the value of IsValid - - /* - Property Issuer - - For more information, see help context 248002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Issuer() const; //Returns the value of Issuer - - /* - Property Parent - - For more information, see help context 248007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SignDate - - For more information, see help context 248010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant SignDate() const; //Returns the value of SignDate - - /* - Property Signer - - For more information, see help context 248001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Signer() const; //Returns the value of Signer - - /* - Method Delete - - For more information, see help context 248006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT IMsoEnvelopeVB : public QAxObject -{ -public: - IMsoEnvelopeVB(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property CommandBars - - For more information, see help context 11005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* CommandBars() const; //Returns the value of CommandBars - - /* - Property Introduction - - For more information, see help context 11001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Introduction() const; //Returns the value of Introduction - inline void SetIntroduction(const QString& value); //Sets the value of the Introduction property - - /* - Property Item - - For more information, see help context 11003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item() const; //Returns the value of Item - - /* - Property Parent - - For more information, see help context 11004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// skipping event interface IMsoEnvelopeVBEvents - -class OFFICE_EXPORT FileTypes : public QAxObject -{ -public: - FileTypes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 257002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 257003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(Office::MsoFileType FileType); - - /* - Method Item - - For more information, see help context 257001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline MsoFileType Item(int Index); - - /* - Method Remove - - For more information, see help context 257004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Remove(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SearchFolders : public QAxObject -{ -public: - SearchFolders(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 258002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 258003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(Office::ScopeFolder* ScopeFolder); - - /* - Method Item - - For more information, see help context 258001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ScopeFolder* Item(int Index); - - /* - Method Remove - - For more information, see help context 258004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Remove(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ScopeFolders : public QAxObject -{ -public: - ScopeFolders(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 249002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 249001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ScopeFolder* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ScopeFolder : public QAxObject -{ -public: - ScopeFolder(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Name - - For more information, see help context 259001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Path - - For more information, see help context 259002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property ScopeFolders - - For more information, see help context 259003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ScopeFolders* ScopeFolders() const; //Returns the value of ScopeFolders - - /* - Method AddToSearchFolders - - For more information, see help context 259004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddToSearchFolders(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SearchScope : public QAxObject -{ -public: - SearchScope(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ScopeFolder - - For more information, see help context 251002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ScopeFolder* ScopeFolder() const; //Returns the value of ScopeFolder - - /* - Property Type - - For more information, see help context 251001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSearchIn Type() const; //Returns the value of Type - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SearchScopes : public QAxObject -{ -public: - SearchScopes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 252002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 252001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SearchScope* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT IMsoDiagram : public QAxObject -{ -public: - IMsoDiagram(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoFormat - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState AutoFormat() const; //Returns the value of AutoFormat - inline void SetAutoFormat(Office::MsoTriState value); //Sets the value of the AutoFormat property - - /* - Property AutoLayout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState AutoLayout() const; //Returns the value of AutoLayout - inline void SetAutoLayout(Office::MsoTriState value); //Sets the value of the AutoLayout property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Nodes - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNodes* Nodes() const; //Returns the value of Nodes - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Reverse - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoTriState Reverse() const; //Returns the value of Reverse - inline void SetReverse(Office::MsoTriState value); //Sets the value of the Reverse property - - /* - Property Type - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoDiagramType Type() const; //Returns the value of Type - - /* - Method Convert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Convert(Office::MsoDiagramType Type); - - /* - Method FitText - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void FitText(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT DiagramNodes : public QAxObject -{ -public: - DiagramNodes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* Item(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT DiagramNodeChildren : public QAxObject -{ -public: - DiagramNodeChildren(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FirstChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* FirstChild() const; //Returns the value of FirstChild - - /* - Property LastChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* LastChild() const; //Returns the value of LastChild - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(); - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(const QVariant& Index); - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(const QVariant& Index, Office::MsoDiagramNodeType NodeType); - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* Item(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT DiagramNode : public QAxObject -{ -public: - DiagramNode(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Children - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNodeChildren* Children() const; //Returns the value of Children - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::IMsoDiagram* Diagram() const; //Returns the value of Diagram - - /* - Property Layout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoOrgChartLayoutType Layout() const; //Returns the value of Layout - inline void SetLayout(Office::MsoOrgChartLayoutType value); //Sets the value of the Layout property - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Root - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* Root() const; //Returns the value of Root - - /* - Property Shape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Shape() const; //Returns the value of Shape - - /* - Property TextShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* TextShape() const; //Returns the value of TextShape - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(); - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(Office::MsoRelativeNodePosition Pos); - - /* - Method AddNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* AddNode(Office::MsoRelativeNodePosition Pos, Office::MsoDiagramNodeType NodeType); - - /* - Method CloneNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* CloneNode(bool CopyChildren, Office::DiagramNode* TargetNode); - - /* - Method CloneNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* CloneNode(bool CopyChildren, Office::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos); - - /* - Method Delete - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method MoveNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void MoveNode(Office::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos); - - /* - Method NextNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* NextNode(); - - /* - Method PrevNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DiagramNode* PrevNode(); - - /* - Method ReplaceNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ReplaceNode(Office::DiagramNode* TargetNode); - - /* - Method SwapNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SwapNode(Office::DiagramNode* TargetNode); - - /* - Method SwapNode - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SwapNode(Office::DiagramNode* TargetNode, bool SwapChildren); - - /* - Method TransferChildren - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void TransferChildren(Office::DiagramNode* ReceivingNode); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CanvasShapes : public QAxObject -{ -public: - CanvasShapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Background() const; //Returns the value of Background - - /* - Property Count - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddCallout - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height); - - /* - Method AddConnector - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddCurve - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddCurve(const QVariant& SafeArrayOfPoints); - - /* - Method AddLabel - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method AddLine - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddLine(double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width); - - /* - Method AddPicture - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height); - - /* - Method AddPolyline - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddPolyline(const QVariant& SafeArrayOfPoints); - - /* - Method AddShape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height); - - /* - Method AddTextEffect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top); - - /* - Method AddTextbox - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method BuildFreeform - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::FreeformBuilder* BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Item - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::Shape* Item(const QVariant& Index); - - /* - Method Range - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::ShapeRange* Range(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT OfficeDataSourceObject : public QAxObject -{ -public: - OfficeDataSourceObject(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Columns - - For more information, see help context 232004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Columns() const; //Returns the value of Columns - - /* - Property ConnectString - - For more information, see help context 232001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ConnectString() const; //Returns the value of ConnectString - inline void SetConnectString(const QString& value); //Sets the value of the ConnectString property - - /* - Property DataSource - - For more information, see help context 232003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DataSource() const; //Returns the value of DataSource - inline void SetDataSource(const QString& value); //Sets the value of the DataSource property - - /* - Property Filters - - For more information, see help context 232010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Filters() const; //Returns the value of Filters - - /* - Property RowCount - - For more information, see help context 232005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int RowCount() const; //Returns the value of RowCount - - /* - Property Table - - For more information, see help context 232002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Table() const; //Returns the value of Table - inline void SetTable(const QString& value); //Sets the value of the Table property - - /* - Method ApplyFilter - - For more information, see help context 232009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ApplyFilter(); - - /* - Method Move - - For more information, see help context 232006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Move(Office::MsoMoveRow MsoMoveRow); - - /* - Method Move - - For more information, see help context 232006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Move(Office::MsoMoveRow MsoMoveRow, int RowNbr); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(const QString& bstrSrc); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(const QString& bstrSrc, const QString& bstrConnect); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable, int fOpenExclusive); - - /* - Method Open - - For more information, see help context 232007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable, int fOpenExclusive, int fNeverPrompt); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1, bool SortAscending1); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2, const QString& SortField3); - - /* - Method SetSortOrder - - For more information, see help context 232008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2, const QString& SortField3, bool SortAscending3); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ODSOColumn : public QAxObject -{ -public: - ODSOColumn(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Index - - For more information, see help context 233001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property Name - - For more information, see help context 233002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 233003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Value - - For more information, see help context 233004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Value() const; //Returns the value of Value - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ODSOColumns : public QAxObject -{ -public: - ODSOColumns(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 234001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 234002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Item - - For more information, see help context 234003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item(const QVariant& varIndex); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ODSOFilter : public QAxObject -{ -public: - ODSOFilter(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Column - - For more information, see help context 240003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Column() const; //Returns the value of Column - inline void SetColumn(const QString& value); //Sets the value of the Column property - - /* - Property CompareTo - - For more information, see help context 240005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString CompareTo() const; //Returns the value of CompareTo - inline void SetCompareTo(const QString& value); //Sets the value of the CompareTo property - - /* - Property Comparison - - For more information, see help context 240004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFilterComparison Comparison() const; //Returns the value of Comparison - inline void SetComparison(Office::MsoFilterComparison value); //Sets the value of the Comparison property - - /* - Property Conjunction - - For more information, see help context 240006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoFilterConjunction Conjunction() const; //Returns the value of Conjunction - inline void SetConjunction(Office::MsoFilterConjunction value); //Sets the value of the Conjunction property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Index - - For more information, see help context 240001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property Parent - - For more information, see help context 240002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ODSOFilters : public QAxObject -{ -public: - ODSOFilters(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 241001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 241002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Add - - For more information, see help context 241004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction); - - /* - Method Add - - For more information, see help context 241004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction, const QString& bstrCompareTo); - - /* - Method Add - - For more information, see help context 241004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction, const QString& bstrCompareTo, bool DeferUpdate); - - /* - Method Delete - - For more information, see help context 241005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(int Index); - - /* - Method Delete - - For more information, see help context 241005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(int Index, bool DeferUpdate); - - /* - Method Item - - For more information, see help context 241003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT NewFile : public QAxObject -{ -public: - NewFile(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Method Add - - For more information, see help context 235001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Add(const QString& FileName); - - /* - Method Add - - For more information, see help context 235001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Add(const QString& FileName, const QVariant& Section); - - /* - Method Add - - For more information, see help context 235001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Add(const QString& FileName, const QVariant& Section, const QVariant& DisplayName); - - /* - Method Add - - For more information, see help context 235001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Add(const QString& FileName, const QVariant& Section, const QVariant& DisplayName, const QVariant& Action); - - /* - Method Remove - - For more information, see help context 235002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Remove(const QString& FileName); - - /* - Method Remove - - For more information, see help context 235002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Remove(const QString& FileName, const QVariant& Section); - - /* - Method Remove - - For more information, see help context 235002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Remove(const QString& FileName, const QVariant& Section, const QVariant& DisplayName); - - /* - Method Remove - - For more information, see help context 235002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Remove(const QString& FileName, const QVariant& Section, const QVariant& DisplayName, const QVariant& Action); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT WebComponent : public QAxObject -{ -public: - WebComponent(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property HTML - - For more information, see help context 236004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HTML() const; //Returns the value of HTML - inline void SetHTML(const QString& value); //Sets the value of the HTML property - - /* - Property Height - - For more information, see help context 236010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property Name - - For more information, see help context 236006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Shape - - For more information, see help context 236001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Shape() const; //Returns the value of Shape - - /* - Property URL - - For more information, see help context 236002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - inline void SetURL(const QString& value); //Sets the value of the URL property - - /* - Property Width - - For more information, see help context 236008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Method Commit - - For more information, see help context 236014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Commit(); - - /* - Method Revert - - For more information, see help context 236015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Revert(); - - /* - Method SetPlaceHolderGraphic - - For more information, see help context 236012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetPlaceHolderGraphic(const QString& PlaceHolderGraphic); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT WebComponentWindowExternal : public QAxObject -{ -public: - WebComponentWindowExternal(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 237004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property ApplicationName - - For more information, see help context 237002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ApplicationName() const; //Returns the value of ApplicationName - - /* - Property ApplicationVersion - - For more information, see help context 237003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ApplicationVersion() const; //Returns the value of ApplicationVersion - - /* - Property InterfaceVersion - - For more information, see help context 237001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InterfaceVersion() const; //Returns the value of InterfaceVersion - - /* - Property WebComponent - - For more information, see help context 237006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::WebComponent* WebComponent() const; //Returns the value of WebComponent - - /* - Method CloseWindow - - For more information, see help context 237005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CloseWindow(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT WebComponentFormat : public QAxObject -{ -public: - WebComponentFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 237001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property HTML - - For more information, see help context 237005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HTML() const; //Returns the value of HTML - inline void SetHTML(const QString& value); //Sets the value of the HTML property - - /* - Property Height - - For more information, see help context 237011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property Name - - For more information, see help context 237007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 237002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PreviewGraphic - - For more information, see help context 237013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString PreviewGraphic() const; //Returns the value of PreviewGraphic - inline void SetPreviewGraphic(const QString& value); //Sets the value of the PreviewGraphic property - - /* - Property URL - - For more information, see help context 237003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - inline void SetURL(const QString& value); //Sets the value of the URL property - - /* - Property Width - - For more information, see help context 237009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Method LaunchPropertiesWindow - - For more information, see help context 237015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void LaunchPropertiesWindow(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ILicWizExternal : public QAxObject -{ -public: - ILicWizExternal(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AnimationEnabled - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int AnimationEnabled() const; //Returns the value of AnimationEnabled - - /* - Property Context - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Context() const; //Returns the value of Context - - /* - Property CountryInfo - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString CountryInfo() const; //Returns the value of CountryInfo - - /* - Property CurrentHelpId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int CurrentHelpId() const; //Returns the value of CurrentHelpId - inline void SetCurrentHelpId(int value); //Sets the value of the CurrentHelpId property - - /* - Property LicAgent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* LicAgent() const; //Returns the value of LicAgent - - /* - Property OfficeOnTheWebUrl - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OfficeOnTheWebUrl() const; //Returns the value of OfficeOnTheWebUrl - - /* - Property Validator - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Validator() const; //Returns the value of Validator - - /* - Property WizardTitle - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString WizardTitle() const; //Returns the value of WizardTitle - inline void SetWizardTitle(const QString& value); //Sets the value of the WizardTitle property - - /* - Property WizardVisible - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int WizardVisible() const; //Returns the value of WizardVisible - inline void SetWizardVisible(int value); //Sets the value of the WizardVisible property - - /* - Method DepositPidKey - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DepositPidKey(const QString& bstrKey, int fMORW); - - /* - Method DisableVORWReminder - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void DisableVORWReminder(int BPC); - - /* - Method FormatDate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FormatDate(const QDateTime& date); - - /* - Method FormatDate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FormatDate(const QDateTime& date, const QString& pFormat); - - /* - Method GetConnectedState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int GetConnectedState(); - - /* - Method InternetDisconnect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void InternetDisconnect(); - - /* - Method InvokeDateTimeApplet - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void InvokeDateTimeApplet(); - - /* - Method MsoAlert - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int MsoAlert(const QString& bstrText, const QString& bstrButtons, const QString& bstrIcon); - - /* - Method OpenInDefaultBrowser - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void OpenInDefaultBrowser(const QString& bstrUrl); - - /* - Method PrintHtmlDocument - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PrintHtmlDocument(IUnknown* punkHtmlDoc); - - /* - Method ResetPID - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResetPID(); - - /* - Method ResignDpc - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResignDpc(const QString& bstrProductCode); - - /* - Method SaveReceipt - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SaveReceipt(const QString& bstrReceipt); - - /* - Method SetDialogSize - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetDialogSize(int dx, int dy); - - /* - Method ShowHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ShowHelp(); - - /* - Method ShowHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ShowHelp(QVariant& pvarId); - - /* - Method SortSelectOptions - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SortSelectOptions(IDispatch* pdispSelect); - - /* - Method Terminate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Terminate(); - - /* - Method VerifyClock - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int VerifyClock(int lMode); - - /* - Method WriteLog - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void WriteLog(const QString& bstrMessage); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ILicValidator : public QAxObject -{ -public: - ILicValidator(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Products - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Products() const; //Returns the value of Products - - /* - Property Selection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Selection() const; //Returns the value of Selection - inline void SetSelection(int value); //Sets the value of the Selection property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT ILicAgent : public QAxObject -{ -public: - ILicAgent(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method AsyncProcessCCRenewalLicenseRequest - - method AsyncProcessCCRenewalLicenseRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessCCRenewalLicenseRequest(); - - /* - Method AsyncProcessCCRenewalPriceRequest - - method AsyncProcessCCRenewalPriceRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessCCRenewalPriceRequest(); - - /* - Method AsyncProcessDroppedLicenseRequest - - method AsyncProcessDroppedLicenseRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessDroppedLicenseRequest(); - - /* - Method AsyncProcessHandshakeRequest - - method AsyncProcessHandshakeRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessHandshakeRequest(int bReviseCustInfo); - - /* - Method AsyncProcessNewLicenseRequest - - method AsyncProcessNewLicenseRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessNewLicenseRequest(); - - /* - Method AsyncProcessReissueLicenseRequest - - method AsyncProcessReissueLicenseRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessReissueLicenseRequest(); - - /* - Method AsyncProcessRetailRenewalLicenseRequest - - method AsyncProcessRetailRenewalLicenseRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessRetailRenewalLicenseRequest(); - - /* - Method AsyncProcessReviseCustInfoRequest - - method AsyncProcessReviseCustInfoRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AsyncProcessReviseCustInfoRequest(); - - /* - Method CancelAsyncProcessRequest - - method CancelAsyncProcessRequest -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CancelAsyncProcessRequest(int bIsLicenseRequest); - - /* - Method CheckSystemClock - - method CheckSystemClock -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint CheckSystemClock(); - - /* - Method DepositConfirmationId - - method DepositConfirmationId -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint DepositConfirmationId(const QString& bstrVal); - - /* - Method DisplaySSLCert - - method DisplaySSLCert -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint DisplaySSLCert(); - - /* - Method GenerateInstallationId - - method GenerateInstallationId -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GenerateInstallationId(); - - /* - Method GetAddress1 - - method GetAddress1 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetAddress1(); - - /* - Method GetAddress2 - - method GetAddress2 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetAddress2(); - - /* - Method GetAsyncProcessReturnCode - - method GetAsyncProcessReturnCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetAsyncProcessReturnCode(); - - /* - Method GetBackendErrorMsg - - method GetBackendErrorMsg -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBackendErrorMsg(); - - /* - Method GetBillingAddress1 - - method GetBillingAddress1 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingAddress1(); - - /* - Method GetBillingAddress2 - - method GetBillingAddress2 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingAddress2(); - - /* - Method GetBillingCity - - method GetBillingCity -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingCity(); - - /* - Method GetBillingCountryCode - - method GetBillingCountryCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingCountryCode(); - - /* - Method GetBillingFirstName - - method GetBillingFirstName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingFirstName(); - - /* - Method GetBillingLastName - - method GetBillingLastName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingLastName(); - - /* - Method GetBillingPhone - - method GetBillingPhone -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingPhone(); - - /* - Method GetBillingState - - method GetBillingState -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingState(); - - /* - Method GetBillingZip - - method GetBillingZip -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetBillingZip(); - - /* - Method GetCCRenewalExpiryDate - - method GetCCRenewalExpiryDate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QDateTime GetCCRenewalExpiryDate(); - - /* - Method GetCity - - method GetCity -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCity(); - - /* - Method GetCountryCode - - method GetCountryCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCountryCode(); - - /* - Method GetCountryDesc - - method GetCountryDesc -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCountryDesc(); - - /* - Method GetCreditCardCode - - method GetCreditCardCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCreditCardCode(uint dwIndex); - - /* - Method GetCreditCardCount - - method GetCreditCardCount -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetCreditCardCount(); - - /* - Method GetCreditCardExpiryMonth - - method GetCreditCardExpiryMonth -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetCreditCardExpiryMonth(); - - /* - Method GetCreditCardExpiryYear - - method GetCreditCardExpiryYear -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetCreditCardExpiryYear(); - - /* - Method GetCreditCardName - - method GetCreditCardName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCreditCardName(uint dwIndex); - - /* - Method GetCreditCardNumber - - method GetCreditCardNumber -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCreditCardNumber(); - - /* - Method GetCreditCardType - - method GetCreditCardType -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCreditCardType(); - - /* - Method GetCurrencyDescription - - method GetCurrencyDescription -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetCurrencyDescription(uint dwCurrencyIndex); - - /* - Method GetCurrencyOption - - method GetCurrencyOption -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetCurrencyOption(); - - /* - Method GetCurrentExpiryDate - - method GetCurrentExpiryDate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QDateTime GetCurrentExpiryDate(); - - /* - Method GetDisconnectOption - - method GetDisconnectOption -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int GetDisconnectOption(); - - /* - Method GetEmail - - method GetEmail -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetEmail(); - - /* - Method GetEndOfLifeHtmlText - - method GetEndOfLifeHtmlText -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetEndOfLifeHtmlText(); - - /* - Method GetExistingExpiryDate - - method GetExistingExpiryDate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QDateTime GetExistingExpiryDate(); - - /* - Method GetFirstName - - method GetFirstName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetFirstName(); - - /* - Method GetInvoiceText - - method GetInvoiceText -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetInvoiceText(); - - /* - Method GetIsoLanguage - - method GetIsoLanguage -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetIsoLanguage(); - - /* - Method GetLastName - - method GetLastName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetLastName(); - - /* - Method GetMSOffer - - method GetMSOffer -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetMSOffer(); - - /* - Method GetMSUpdate - - method GetMSUpdate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetMSUpdate(); - - /* - Method GetNewExpiryDate - - method GetNewExpiryDate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QDateTime GetNewExpiryDate(); - - /* - Method GetOrgName - - method GetOrgName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetOrgName(); - - /* - Method GetOtherOffer - - method GetOtherOffer -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetOtherOffer(); - - /* - Method GetPhone - - method GetPhone -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetPhone(); - - /* - Method GetPriceItemCount - - method GetPriceItemCount -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint GetPriceItemCount(); - - /* - Method GetPriceItemLabel - - method GetPriceItemLabel -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetPriceItemLabel(uint dwIndex); - - /* - Method GetPriceItemValue - - method GetPriceItemValue -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetPriceItemValue(uint dwCurrencyIndex, uint dwIndex); - - /* - Method GetState - - method GetState -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetState(); - - /* - Method GetVATLabel - - method GetVATLabel -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetVATLabel(const QString& bstrCountryCode); - - /* - Method GetVATNumber - - method GetVATNumber -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetVATNumber(); - - /* - Method GetZip - - method GetZip -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString GetZip(); - - /* - Method Initialize - - method Initialize -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint Initialize(uint dwBPC, uint dwMode, const QString& bstrLicSource); - - /* - Method IsCCRenewalCountry - - method IsCCRenewalCountry -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int IsCCRenewalCountry(const QString& bstrCountryCode); - - /* - Method IsUpgradeAvailable - - method IsUpgradeAvailable -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int IsUpgradeAvailable(); - - /* - Method SaveBillingInfo - - method SaveBillingInfo -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline uint SaveBillingInfo(int bSave); - - /* - Method SetAddress1 - - method SetAddress1 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetAddress1(const QString& bstrNewVal); - - /* - Method SetAddress2 - - method SetAddress2 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetAddress2(const QString& bstrNewVal); - - /* - Method SetBillingAddress1 - - method SetBillingAddress1 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingAddress1(const QString& bstrNewVal); - - /* - Method SetBillingAddress2 - - method SetBillingAddress2 -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingAddress2(const QString& bstrNewVal); - - /* - Method SetBillingCity - - method SetBillingCity -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingCity(const QString& bstrNewVal); - - /* - Method SetBillingCountryCode - - method SetBillingCountryCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingCountryCode(const QString& bstrNewVal); - - /* - Method SetBillingFirstName - - method SetBillingFirstName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingFirstName(const QString& bstrNewVal); - - /* - Method SetBillingLastName - - method SetBillingLastName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingLastName(const QString& bstrNewVal); - - /* - Method SetBillingPhone - - method SetBillingPhone -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingPhone(const QString& bstrNewVal); - - /* - Method SetBillingState - - method SetBillingState -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingState(const QString& bstrNewVal); - - /* - Method SetBillingZip - - method SetBillingZip -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetBillingZip(const QString& bstrNewVal); - - /* - Method SetCity - - method SetCity -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCity(const QString& bstrNewVal); - - /* - Method SetCountryCode - - method SetCountryCode -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCountryCode(const QString& bstrNewVal); - - /* - Method SetCountryDesc - - method SetCountryDesc -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCountryDesc(const QString& bstrNewVal); - - /* - Method SetCreditCardExpiryMonth - - method SetCreditCardExpiryMonth -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCreditCardExpiryMonth(uint dwCCMonth); - - /* - Method SetCreditCardExpiryYear - - method SetCreditCardExpiryYear -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCreditCardExpiryYear(uint dwCCYear); - - /* - Method SetCreditCardNumber - - method SetCreditCardNumber -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCreditCardNumber(const QString& bstrCCNumber); - - /* - Method SetCreditCardType - - method SetCreditCardType -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCreditCardType(const QString& bstrCCCode); - - /* - Method SetCurrencyOption - - method SetCurrencyOption -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetCurrencyOption(uint dwCurrencyOption); - - /* - Method SetDisconnectOption - - method SetDisconnectOption -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetDisconnectOption(int bNewVal); - - /* - Method SetEmail - - method SetEmail -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetEmail(const QString& bstrNewVal); - - /* - Method SetFirstName - - method SetFirstName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFirstName(const QString& bstrNewVal); - - /* - Method SetIsoLanguage - - method SetIsoLanguage -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetIsoLanguage(uint dwNewVal); - - /* - Method SetLastName - - method SetLastName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetLastName(const QString& bstrNewVal); - - /* - Method SetMSOffer - - method SetMSOffer -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetMSOffer(const QString& bstrNewVal); - - /* - Method SetMSUpdate - - method SetMSUpdate -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetMSUpdate(const QString& bstrNewVal); - - /* - Method SetOrgName - - method SetOrgName -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetOrgName(const QString& bstrNewVal); - - /* - Method SetOtherOffer - - method SetOtherOffer -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetOtherOffer(const QString& bstrNewVal); - - /* - Method SetPhone - - method SetPhone -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetPhone(const QString& bstrNewVal); - - /* - Method SetState - - method SetState -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetState(const QString& bstrNewVal); - - /* - Method SetVATNumber - - method SetVATNumber -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetVATNumber(const QString& bstrVATNumber); - - /* - Method SetZip - - method SetZip -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetZip(const QString& bstrNewVal); - - /* - Method VerifyCheckDigits - - method VerifyCheckDigits -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int VerifyCheckDigits(const QString& bstrCIDIID); - - /* - Method WantUpgrade - - method WantUpgrade -For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void WantUpgrade(int bWantUpgrade); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT IMsoEServicesDialog : public QAxObject -{ -public: - IMsoEServicesDialog(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property ApplicationName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ApplicationName() const; //Returns the value of ApplicationName - - /* - Property ClipArt - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* ClipArt() const; //Returns the value of ClipArt - - /* - Property WebComponent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* WebComponent() const; //Returns the value of WebComponent - - /* - Method AddTrustedDomain - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddTrustedDomain(const QString& Domain); - - /* - Method Close - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Close(); - - /* - Method Close - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Close(bool ApplyWebComponentChanges); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT WebComponentProperties : public QAxObject -{ -public: - WebComponentProperties(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property HTML - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HTML() const; //Returns the value of HTML - inline void SetHTML(const QString& value); //Sets the value of the HTML property - - /* - Property Height - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property Name - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property PreviewGraphic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString PreviewGraphic() const; //Returns the value of PreviewGraphic - inline void SetPreviewGraphic(const QString& value); //Sets the value of the PreviewGraphic property - - /* - Property PreviewHTML - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString PreviewHTML() const; //Returns the value of PreviewHTML - inline void SetPreviewHTML(const QString& value); //Sets the value of the PreviewHTML property - - /* - Property Shape - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Shape() const; //Returns the value of Shape - - /* - Property Tag - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property URL - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - inline void SetURL(const QString& value); //Sets the value of the URL property - - /* - Property Width - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SmartDocument : public QAxObject -{ -public: - SmartDocument(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property SolutionID - - For more information, see help context 262001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SolutionID() const; //Returns the value of SolutionID - inline void SetSolutionID(const QString& value); //Sets the value of the SolutionID property - - /* - Property SolutionURL - - For more information, see help context 262002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SolutionURL() const; //Returns the value of SolutionURL - inline void SetSolutionURL(const QString& value); //Sets the value of the SolutionURL property - - /* - Method PickSolution - - For more information, see help context 262003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PickSolution(); - - /* - Method PickSolution - - For more information, see help context 262003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PickSolution(bool ConsiderAllSchemas); - - /* - Method RefreshPane - - For more information, see help context 262004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RefreshPane(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceMember : public QAxObject -{ -public: - SharedWorkspaceMember(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DomainName - - For more information, see help context 272001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DomainName() const; //Returns the value of DomainName - - /* - Property Email - - For more information, see help context 272003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Email() const; //Returns the value of Email - - /* - Property Id - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Id() const; //Returns the value of Id - - /* - Property Name - - For more information, see help context 272002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 272005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Delete - - For more information, see help context 272004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceMembers : public QAxObject -{ -public: - SharedWorkspaceMembers(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 273002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ItemCountExceeded - - For more information, see help context 273005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool ItemCountExceeded() const; //Returns the value of ItemCountExceeded - - /* - Property Parent - - For more information, see help context 273004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 273003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceMember* Add(const QString& Email, const QString& DomainName, const QString& DisplayName); - - /* - Method Add - - For more information, see help context 273003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceMember* Add(const QString& Email, const QString& DomainName, const QString& DisplayName, const QVariant& Role); - - /* - Method Item - - For more information, see help context 273001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceMember* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceTask : public QAxObject -{ -public: - SharedWorkspaceTask(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AssignedTo - - For more information, see help context 264002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString AssignedTo() const; //Returns the value of AssignedTo - inline void SetAssignedTo(const QString& value); //Sets the value of the AssignedTo property - - /* - Property CreatedBy - - For more information, see help context 264007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString CreatedBy() const; //Returns the value of CreatedBy - - /* - Property CreatedDate - - For more information, see help context 264008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant CreatedDate() const; //Returns the value of CreatedDate - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Description - - For more information, see help context 264005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Description() const; //Returns the value of Description - inline void SetDescription(const QString& value); //Sets the value of the Description property - - /* - Property DueDate - - For more information, see help context 264006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant DueDate() const; //Returns the value of DueDate - inline void SetDueDate(const QVariant& value); //Sets the value of the DueDate property - - /* - Property ModifiedBy - - For more information, see help context 264009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ModifiedBy() const; //Returns the value of ModifiedBy - - /* - Property ModifiedDate - - For more information, see help context 264010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant ModifiedDate() const; //Returns the value of ModifiedDate - - /* - Property Parent - - For more information, see help context 263013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 264004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSharedWorkspaceTaskPriority Priority() const; //Returns the value of Priority - inline void SetPriority(Office::MsoSharedWorkspaceTaskPriority value); //Sets the value of the Priority property - - /* - Property Status - - For more information, see help context 264003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSharedWorkspaceTaskStatus Status() const; //Returns the value of Status - inline void SetStatus(Office::MsoSharedWorkspaceTaskStatus value); //Sets the value of the Status property - - /* - Property Title - - For more information, see help context 264001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Title() const; //Returns the value of Title - inline void SetTitle(const QString& value); //Sets the value of the Title property - - /* - Method Delete - - For more information, see help context 263012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Save - - For more information, see help context 2640011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Save(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceTasks : public QAxObject -{ -public: - SharedWorkspaceTasks(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 265002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ItemCountExceeded - - For more information, see help context 265005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool ItemCountExceeded() const; //Returns the value of ItemCountExceeded - - /* - Property Parent - - For more information, see help context 265004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title); - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title, const QVariant& Status); - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title, const QVariant& Status, const QVariant& Priority); - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee); - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee, const QVariant& Description); - - /* - Method Add - - For more information, see help context 265003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee, const QVariant& Description, const QVariant& DueDate); - - /* - Method Item - - For more information, see help context 265001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTask* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceFile : public QAxObject -{ -public: - SharedWorkspaceFile(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property CreatedBy - - For more information, see help context 266002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString CreatedBy() const; //Returns the value of CreatedBy - - /* - Property CreatedDate - - For more information, see help context 266003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant CreatedDate() const; //Returns the value of CreatedDate - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ModifiedBy - - For more information, see help context 266004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ModifiedBy() const; //Returns the value of ModifiedBy - - /* - Property ModifiedDate - - For more information, see help context 266005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant ModifiedDate() const; //Returns the value of ModifiedDate - - /* - Property Parent - - For more information, see help context 266007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property URL - - For more information, see help context 266001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - - /* - Method Delete - - For more information, see help context 266006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceFiles : public QAxObject -{ -public: - SharedWorkspaceFiles(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 267002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ItemCountExceeded - - For more information, see help context 267005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool ItemCountExceeded() const; //Returns the value of ItemCountExceeded - - /* - Property Parent - - For more information, see help context 267004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 267003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFile* Add(const QString& FileName); - - /* - Method Add - - For more information, see help context 267003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFile* Add(const QString& FileName, const QVariant& ParentFolder); - - /* - Method Add - - For more information, see help context 267003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFile* Add(const QString& FileName, const QVariant& ParentFolder, const QVariant& OverwriteIfFileAlreadyExists); - - /* - Method Add - - For more information, see help context 267003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFile* Add(const QString& FileName, const QVariant& ParentFolder, const QVariant& OverwriteIfFileAlreadyExists, const QVariant& KeepInSync); - - /* - Method Item - - For more information, see help context 267001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFile* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceFolder : public QAxObject -{ -public: - SharedWorkspaceFolder(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FolderName - - For more information, see help context 268001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString FolderName() const; //Returns the value of FolderName - - /* - Property Parent - - For more information, see help context 268007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Delete - - For more information, see help context 268006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 268006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& DeleteEventIfFolderContainsFiles); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceFolders : public QAxObject -{ -public: - SharedWorkspaceFolders(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 269002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ItemCountExceeded - - For more information, see help context 269005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool ItemCountExceeded() const; //Returns the value of ItemCountExceeded - - /* - Property Parent - - For more information, see help context 269004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 269003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFolder* Add(const QString& FolderName); - - /* - Method Add - - For more information, see help context 269003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFolder* Add(const QString& FolderName, const QVariant& ParentFolder); - - /* - Method Item - - For more information, see help context 269001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFolder* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceLink : public QAxObject -{ -public: - SharedWorkspaceLink(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property CreatedBy - - For more information, see help context 270004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString CreatedBy() const; //Returns the value of CreatedBy - - /* - Property CreatedDate - - For more information, see help context 270005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant CreatedDate() const; //Returns the value of CreatedDate - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Description - - For more information, see help context 270002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Description() const; //Returns the value of Description - inline void SetDescription(const QString& value); //Sets the value of the Description property - - /* - Property ModifiedBy - - For more information, see help context 270006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ModifiedBy() const; //Returns the value of ModifiedBy - - /* - Property ModifiedDate - - For more information, see help context 270007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant ModifiedDate() const; //Returns the value of ModifiedDate - - /* - Property Notes - - For more information, see help context 270003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Notes() const; //Returns the value of Notes - inline void SetNotes(const QString& value); //Sets the value of the Notes property - - /* - Property Parent - - For more information, see help context 270010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property URL - - For more information, see help context 270001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - inline void SetURL(const QString& value); //Sets the value of the URL property - - /* - Method Delete - - For more information, see help context 270009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Save - - For more information, see help context 270008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Save(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspaceLinks : public QAxObject -{ -public: - SharedWorkspaceLinks(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 271002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ItemCountExceeded - - For more information, see help context 271005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool ItemCountExceeded() const; //Returns the value of ItemCountExceeded - - /* - Property Parent - - For more information, see help context 271004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 271003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceLink* Add(const QString& URL); - - /* - Method Add - - For more information, see help context 271003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceLink* Add(const QString& URL, const QVariant& Description); - - /* - Method Add - - For more information, see help context 271003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceLink* Add(const QString& URL, const QVariant& Description, const QVariant& Notes); - - /* - Method Item - - For more information, see help context 271001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceLink* Item(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT SharedWorkspace : public QAxObject -{ -public: - SharedWorkspace(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Connected - - For more information, see help context 276012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Connected() const; //Returns the value of Connected - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Files - - For more information, see help context 276004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFiles* Files() const; //Returns the value of Files - - /* - Property Folders - - For more information, see help context 276005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceFolders* Folders() const; //Returns the value of Folders - - /* - Property LastRefreshed - - For more information, see help context 276013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant LastRefreshed() const; //Returns the value of LastRefreshed - - /* - Property Links - - For more information, see help context 276006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceLinks* Links() const; //Returns the value of Links - - /* - Property Members - - For more information, see help context 276002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceMembers* Members() const; //Returns the value of Members - - /* - Property Name - - For more information, see help context 276001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 276010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SourceURL - - For more information, see help context 276014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString SourceURL() const; //Returns the value of SourceURL - inline void SetSourceURL(const QString& value); //Sets the value of the SourceURL property - - /* - Property Tasks - - For more information, see help context 276003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::SharedWorkspaceTasks* Tasks() const; //Returns the value of Tasks - - /* - Property URL - - For more information, see help context 276011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString URL() const; //Returns the value of URL - - /* - Method CreateNew - - For more information, see help context 276008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CreateNew(); - - /* - Method CreateNew - - For more information, see help context 276008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CreateNew(const QVariant& URL); - - /* - Method CreateNew - - For more information, see help context 276008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CreateNew(const QVariant& URL, const QVariant& Name); - - /* - Method Delete - - For more information, see help context 276009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Disconnect - - For more information, see help context 276016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Disconnect(); - - /* - Method Refresh - - For more information, see help context 276007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Refresh(); - - /* - Method RemoveDocument - - For more information, see help context 276015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RemoveDocument(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Sync : public QAxObject -{ -public: - Sync(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ErrorType - - For more information, see help context 277005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSyncErrorType ErrorType() const; //Returns the value of ErrorType - - /* - Property LastSyncTime - - For more information, see help context 277003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant LastSyncTime() const; //Returns the value of LastSyncTime - - /* - Property Parent - - For more information, see help context 277015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Status - - For more information, see help context 277001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoSyncStatusType Status() const; //Returns the value of Status - - /* - Property WorkspaceLastChangedBy - - For more information, see help context 277002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString WorkspaceLastChangedBy() const; //Returns the value of WorkspaceLastChangedBy - - /* - Method GetUpdate - - For more information, see help context 277007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void GetUpdate(); - - /* - Method OpenVersion - - For more information, see help context 277009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void OpenVersion(Office::MsoSyncVersionType SyncVersionType); - - /* - Method PutUpdate - - For more information, see help context 277008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PutUpdate(); - - /* - Method ResolveConflict - - For more information, see help context 277010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ResolveConflict(Office::MsoSyncConflictResolutionType SyncConflictResolution); - - /* - Method Unsuspend - - For more information, see help context 277011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Unsuspend(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT DocumentLibraryVersion : public QAxObject -{ -public: - DocumentLibraryVersion(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Comments - - For more information, see help context 277021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Comments() const; //Returns the value of Comments - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Index - - For more information, see help context 277018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property Modified - - For more information, see help context 277017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant Modified() const; //Returns the value of Modified - - /* - Property ModifiedBy - - For more information, see help context 277020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ModifiedBy() const; //Returns the value of ModifiedBy - - /* - Property Parent - - For more information, see help context 277019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Delete - - For more information, see help context 277022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Open - - For more information, see help context 277023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Open(); - - /* - Method Restore - - For more information, see help context 277024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Restore(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT DocumentLibraryVersions : public QAxObject -{ -public: - DocumentLibraryVersions(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 277028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property IsVersioningEnabled - - For more information, see help context 277030 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsVersioningEnabled() const; //Returns the value of IsVersioningEnabled - - /* - Property Parent - - For more information, see help context 277029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 277027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::DocumentLibraryVersion* Item(int lIndex); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT UserPermission : public QAxObject -{ -public: - UserPermission(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ExpirationDate - - For more information, see help context 260003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant ExpirationDate() const; //Returns the value of ExpirationDate - inline void SetExpirationDate(const QVariant& value); //Sets the value of the ExpirationDate property - - /* - Property Parent - - For more information, see help context 260004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Permission - - For more information, see help context 260002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Permission() const; //Returns the value of Permission - inline void SetPermission(int value); //Sets the value of the Permission property - - /* - Property UserId - - For more information, see help context 260001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString UserId() const; //Returns the value of UserId - - /* - Method Remove - - For more information, see help context 260005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Remove(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT Permission : public QAxObject -{ -public: - Permission(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 261002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DocumentAuthor - - For more information, see help context 261013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DocumentAuthor() const; //Returns the value of DocumentAuthor - inline void SetDocumentAuthor(const QString& value); //Sets the value of the DocumentAuthor property - - /* - Property EnableTrustedBrowser - - For more information, see help context 261003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool EnableTrustedBrowser() const; //Returns the value of EnableTrustedBrowser - inline void SetEnableTrustedBrowser(bool value); //Sets the value of the EnableTrustedBrowser property - - /* - Property Enabled - - For more information, see help context 261008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Parent - - For more information, see help context 261006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PermissionFromPolicy - - For more information, see help context 261014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool PermissionFromPolicy() const; //Returns the value of PermissionFromPolicy - - /* - Property PolicyDescription - - For more information, see help context 261011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString PolicyDescription() const; //Returns the value of PolicyDescription - - /* - Property PolicyName - - For more information, see help context 261010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString PolicyName() const; //Returns the value of PolicyName - - /* - Property RequestPermissionURL - - For more information, see help context 261009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString RequestPermissionURL() const; //Returns the value of RequestPermissionURL - inline void SetRequestPermissionURL(const QString& value); //Sets the value of the RequestPermissionURL property - - /* - Property StoreLicenses - - For more information, see help context 261012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool StoreLicenses() const; //Returns the value of StoreLicenses - inline void SetStoreLicenses(bool value); //Sets the value of the StoreLicenses property - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 261004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::UserPermission* Add(const QString& UserId); - - /* - Method Add - - For more information, see help context 261004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::UserPermission* Add(const QString& UserId, const QVariant& Permission); - - /* - Method Add - - For more information, see help context 261004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::UserPermission* Add(const QString& UserId, const QVariant& Permission, const QVariant& ExpirationDate); - - /* - Method ApplyPolicy - - For more information, see help context 261005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ApplyPolicy(const QString& FileName); - - /* - Method Item - - For more information, see help context 261001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::UserPermission* Item(const QVariant& Index); - - /* - Method RemoveAll - - For more information, see help context 261007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RemoveAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// Actual coclasses -class OFFICE_EXPORT CommandBars : public QAxObject -{ -public: - CommandBars(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - CommandBars(_CommandBars *iface) - : QAxObject() - { - initializeFrom(iface); - delete iface; - } - - /* - Property ActionControl - - For more information, see help context 2001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* ActionControl() const; //Returns the value of ActionControl - - /* - Property ActiveMenuBar - - For more information, see help context 2002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* ActiveMenuBar() const; //Returns the value of ActiveMenuBar - - /* - Property AdaptiveMenus - - For more information, see help context 2013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool AdaptiveMenus() const; //Returns the value of AdaptiveMenus - inline void SetAdaptiveMenus(bool value); //Sets the value of the AdaptiveMenus property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 2004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DisableAskAQuestionDropdown - - For more information, see help context 2017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisableAskAQuestionDropdown() const; //Returns the value of DisableAskAQuestionDropdown - inline void SetDisableAskAQuestionDropdown(bool value); //Sets the value of the DisableAskAQuestionDropdown property - - /* - Property DisableCustomize - - For more information, see help context 2016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisableCustomize() const; //Returns the value of DisableCustomize - inline void SetDisableCustomize(bool value); //Sets the value of the DisableCustomize property - - /* - Property DisplayFonts - - For more information, see help context 2015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayFonts() const; //Returns the value of DisplayFonts - inline void SetDisplayFonts(bool value); //Sets the value of the DisplayFonts property - - /* - Property DisplayKeysInTooltips - - For more information, see help context 2006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayKeysInTooltips() const; //Returns the value of DisplayKeysInTooltips - inline void SetDisplayKeysInTooltips(bool value); //Sets the value of the DisplayKeysInTooltips property - - /* - Property DisplayTooltips - - For more information, see help context 2005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool DisplayTooltips() const; //Returns the value of DisplayTooltips - inline void SetDisplayTooltips(bool value); //Sets the value of the DisplayTooltips property - - /* - Property LargeButtons - - For more information, see help context 2009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool LargeButtons() const; //Returns the value of LargeButtons - inline void SetLargeButtons(bool value); //Sets the value of the LargeButtons property - - /* - Property MenuAnimationStyle - - For more information, see help context 2010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoMenuAnimation MenuAnimationStyle() const; //Returns the value of MenuAnimationStyle - inline void SetMenuAnimationStyle(Office::MsoMenuAnimation value); //Sets the value of the MenuAnimationStyle property - - /* - Property Parent - - For more information, see help context 2011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar); - - /* - Method Add - - For more information, see help context 2003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary); - - /* - Method AddEx - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary, const QVariant& TbtrProtection); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag); - - /* - Method FindControl - - For more information, see help context 2007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag); - - /* - Method FindControls - - For more information, see help context 2014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControls* FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible); - - /* - Method IdsString - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int IdsString(int ids, QString& pbstrName); - - /* - Method Item - - For more information, see help context 2008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Item(const QVariant& Index); - - /* - Method ReleaseFocus - - For more information, see help context 2012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void ReleaseFocus(); - - /* - Method TmcGetName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int TmcGetName(int tmc, QString& pbstrName); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBarComboBox : public QAxObject -{ -public: - CommandBarComboBox(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - CommandBarComboBox(_CommandBarComboBox *iface) - : QAxObject() - { - initializeFrom(iface); - delete iface; - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property DropDownLines - - For more information, see help context 8003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DropDownLines() const; //Returns the value of DropDownLines - inline void SetDropDownLines(int value); //Sets the value of the DropDownLines property - - /* - Property DropDownWidth - - For more information, see help context 8004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int DropDownWidth() const; //Returns the value of DropDownWidth - inline void SetDropDownWidth(int value); //Sets the value of the DropDownWidth property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property ListCount - - For more information, see help context 8006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListCount() const; //Returns the value of ListCount - - /* - Property ListHeaderCount - - For more information, see help context 8007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListHeaderCount() const; //Returns the value of ListHeaderCount - inline void SetListHeaderCount(int value); //Sets the value of the ListHeaderCount property - - /* - Property ListIndex - - For more information, see help context 8008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int ListIndex() const; //Returns the value of ListIndex - inline void SetListIndex(int value); //Sets the value of the ListIndex property - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property Style - - For more information, see help context 8010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoComboStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoComboStyle value); //Sets the value of the Style property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property Text - - For more information, see help context 8011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method AddItem - - For more information, see help context 8001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddItem(const QString& Text); - - /* - Method AddItem - - For more information, see help context 8001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void AddItem(const QString& Text, const QVariant& Index); - - /* - Method Clear - - For more information, see help context 8002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Clear(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method List - - For more information, see help context 8005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString List(int Index); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method RemoveItem - - For more information, see help context 8009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void RemoveItem(int Index); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method SetList - */ - inline int SetList(int Index, const QString& rhs); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT CommandBarButton : public QAxObject -{ -public: - CommandBarButton(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginGroup - - For more information, see help context 5001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BeginGroup() const; //Returns the value of BeginGroup - inline void SetBeginGroup(bool value); //Sets the value of the BeginGroup property - - /* - Property BuiltIn - - For more information, see help context 5002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltIn() const; //Returns the value of BuiltIn - - /* - Property BuiltInFace - - For more information, see help context 6001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool BuiltInFace() const; //Returns the value of BuiltInFace - inline void SetBuiltInFace(bool value); //Sets the value of the BuiltInFace property - - /* - Property Caption - - For more information, see help context 5003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property Control - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Control() const; //Returns the value of Control - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DescriptionText - - For more information, see help context 5006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString DescriptionText() const; //Returns the value of DescriptionText - inline void SetDescriptionText(const QString& value); //Sets the value of the DescriptionText property - - /* - Property Enabled - - For more information, see help context 5007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Enabled() const; //Returns the value of Enabled - inline void SetEnabled(bool value); //Sets the value of the Enabled property - - /* - Property FaceId - - For more information, see help context 6003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int FaceId() const; //Returns the value of FaceId - inline void SetFaceId(int value); //Sets the value of the FaceId property - - /* - Property Height - - For more information, see help context 5009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Height() const; //Returns the value of Height - inline void SetHeight(int value); //Sets the value of the Height property - - /* - Property HelpContextId - - For more information, see help context 5010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int HelpContextId() const; //Returns the value of HelpContextId - inline void SetHelpContextId(int value); //Sets the value of the HelpContextId property - - /* - Property HelpFile - - For more information, see help context 5011 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString HelpFile() const; //Returns the value of HelpFile - inline void SetHelpFile(const QString& value); //Sets the value of the HelpFile property - - /* - Property HyperlinkType - - For more information, see help context 6008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoCommandBarButtonHyperlinkType HyperlinkType() const; //Returns the value of HyperlinkType - inline void SetHyperlinkType(Office::MsoCommandBarButtonHyperlinkType value); //Sets the value of the HyperlinkType property - - /* - Property Id - - For more information, see help context 5012 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Index - - For more information, see help context 5013 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Index() const; //Returns the value of Index - - /* - Property InstanceId - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int InstanceId() const; //Returns the value of InstanceId - - /* - Property IsPriorityDropped - - For more information, see help context 5029 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool IsPriorityDropped() const; //Returns the value of IsPriorityDropped - - /* - Property Left - - For more information, see help context 5015 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Left() const; //Returns the value of Left - - /* - Property Mask - - For more information, see help context 6010 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QPixmap Mask() const; //Returns the value of Mask - inline void SetMask(const QPixmap& value); //Sets the value of the Mask property - - /* - Property OLEUsage - - For more information, see help context 5016 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlOLEUsage OLEUsage() const; //Returns the value of OLEUsage - inline void SetOLEUsage(Office::MsoControlOLEUsage value); //Sets the value of the OLEUsage property - - /* - Property OnAction - - For more information, see help context 5017 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString OnAction() const; //Returns the value of OnAction - inline void SetOnAction(const QString& value); //Sets the value of the OnAction property - - /* - Property Parameter - - For more information, see help context 5019 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Parameter() const; //Returns the value of Parameter - inline void SetParameter(const QString& value); //Sets the value of the Parameter property - - /* - Property Parent - - For more information, see help context 5018 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBar* Parent() const; //Returns the value of Parent - - /* - Property Picture - - For more information, see help context 6009 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QPixmap Picture() const; //Returns the value of Picture - inline void SetPicture(const QPixmap& value); //Sets the value of the Picture property - - /* - Property Priority - - For more information, see help context 5020 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Priority() const; //Returns the value of Priority - inline void SetPriority(int value); //Sets the value of the Priority property - - /* - Property ShortcutText - - For more information, see help context 6005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString ShortcutText() const; //Returns the value of ShortcutText - inline void SetShortcutText(const QString& value); //Sets the value of the ShortcutText property - - /* - Property State - - For more information, see help context 6006 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoButtonState State() const; //Returns the value of State - inline void SetState(Office::MsoButtonState value); //Sets the value of the State property - - /* - Property Style - - For more information, see help context 6007 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoButtonStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoButtonStyle value); //Sets the value of the Style property - - /* - Property Tag - - For more information, see help context 5023 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Tag() const; //Returns the value of Tag - inline void SetTag(const QString& value); //Sets the value of the Tag property - - /* - Property TooltipText - - For more information, see help context 5024 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString TooltipText() const; //Returns the value of TooltipText - inline void SetTooltipText(const QString& value); //Sets the value of the TooltipText property - - /* - Property Top - - For more information, see help context 5025 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Top() const; //Returns the value of Top - - /* - Property Type - - For more information, see help context 5026 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::MsoControlType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 5027 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 5028 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int Width() const; //Returns the value of Width - inline void SetWidth(int value); //Sets the value of the Width property - - /* - Property accChildCount - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accChildCount() const; //Returns the value of accChildCount - - /* - Property accDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDefaultAction() const; //Returns the value of accDefaultAction - - /* - Property accDescription - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accDescription() const; //Returns the value of accDescription - - /* - Property accFocus - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accFocus() const; //Returns the value of accFocus - - /* - Property accHelp - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accHelp() const; //Returns the value of accHelp - - /* - Property accKeyboardShortcut - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString accKeyboardShortcut() const; //Returns the value of accKeyboardShortcut - - /* - Property accName - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accName() const; //Returns the value of accName - inline void setAccName(const QVariant& value); //Sets the value of the accName property - - /* - Property accParent - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accParent() const; //Returns the value of accParent - - /* - Property accRole - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accRole() const; //Returns the value of accRole - - /* - Property accSelection - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accSelection() const; //Returns the value of accSelection - - /* - Property accState - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accState() const; //Returns the value of accState - - /* - Property accValue - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accValue() const; //Returns the value of accValue - inline void setAccValue(const QVariant& value); //Sets the value of the accValue property - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar); - - /* - Method Copy - - For more information, see help context 5004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Copy(const QVariant& Bar, const QVariant& Before); - - /* - Method CopyFace - - For more information, see help context 6002 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void CopyFace(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(); - - /* - Method Delete - - For more information, see help context 5005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Delete(const QVariant& Temporary); - - /* - Method Execute - - For more information, see help context 5008 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Execute(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar); - - /* - Method Move - - For more information, see help context 5014 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline Office::CommandBarControl* Move(const QVariant& Bar, const QVariant& Before); - - /* - Method PasteFace - - For more information, see help context 6004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void PasteFace(); - - /* - Method Reserved1 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved1(); - - /* - Method Reserved2 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved2(); - - /* - Method Reserved3 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved3(); - - /* - Method Reserved4 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved4(); - - /* - Method Reserved5 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved5(); - - /* - Method Reserved6 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved6(); - - /* - Method Reserved7 - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reserved7(); - - /* - Method Reset - - For more information, see help context 5021 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void Reset(); - - /* - Method SetFocus - - For more information, see help context 5022 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void SetFocus(); - - /* - Method accChild - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* accChild(const QVariant& varChild); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(); - - /* - Method accDoDefaultAction - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accDoDefaultAction(const QVariant& varChild); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile); - - /* - Method accHelpTopic - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline int accHelpTopic(QString& pszHelpFile, const QVariant& varChild); - - /* - Method accHitTest - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accHitTest(int xLeft, int yTop); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight); - - /* - Method accLocation - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir); - - /* - Method accNavigate - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QVariant accNavigate(int navDir, const QVariant& varStart); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect); - - /* - Method accSelect - - For more information, see help context 0 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline void accSelect(int flagsSelect, const QVariant& varChild); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class OFFICE_EXPORT MsoEnvelope : public QAxObject -{ -public: - MsoEnvelope(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property CommandBars - - For more information, see help context 11005 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* CommandBars() const; //Returns the value of CommandBars - - /* - Property Introduction - - For more information, see help context 11001 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline QString Introduction() const; //Returns the value of Introduction - inline void SetIntroduction(const QString& value); //Sets the value of the Introduction property - - /* - Property Item - - For more information, see help context 11003 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Item() const; //Returns the value of Item - - /* - Property Parent - - For more information, see help context 11004 in c:\Program Files\Common Files\Microsoft Shared\OFFICE11\vbaof11.chm. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// member function implementation -#ifndef QAX_DUMPCPP_OFFICE_NOINLINES -inline int IAccessible::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString IAccessible::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString IAccessible::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant IAccessible::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString IAccessible::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString IAccessible::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant IAccessible::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IAccessible::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* IAccessible::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant IAccessible::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant IAccessible::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant IAccessible::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant IAccessible::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IAccessible::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline IDispatch* IAccessible::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void IAccessible::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void IAccessible::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline int IAccessible::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline int IAccessible::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline QVariant IAccessible::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline void IAccessible::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void IAccessible::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline QVariant IAccessible::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline QVariant IAccessible::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline void IAccessible::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void IAccessible::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - - -inline IDispatch* _IMsoDispObj::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _IMsoDispObj::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - - -inline IDispatch* _IMsoOleAccDispObj::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _IMsoOleAccDispObj::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _IMsoOleAccDispObj::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _IMsoOleAccDispObj::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _IMsoOleAccDispObj::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString _IMsoOleAccDispObj::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _IMsoOleAccDispObj::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _IMsoOleAccDispObj::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* _IMsoOleAccDispObj::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _IMsoOleAccDispObj::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _IMsoOleAccDispObj::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline IDispatch* _IMsoOleAccDispObj::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void _IMsoOleAccDispObj::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void _IMsoOleAccDispObj::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline int _IMsoOleAccDispObj::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline int _IMsoOleAccDispObj::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline QVariant _IMsoOleAccDispObj::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline void _IMsoOleAccDispObj::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void _IMsoOleAccDispObj::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline QVariant _IMsoOleAccDispObj::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline QVariant _IMsoOleAccDispObj::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline void _IMsoOleAccDispObj::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void _IMsoOleAccDispObj::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - - -inline Office::CommandBarControl* _CommandBars::ActionControl() const -{ - Office::CommandBarControl* qax_pointer = 0; - qRegisterMetaType("CommandBarControl*", &qax_pointer); - qRegisterMetaType("CommandBarControl", qax_pointer); - QVariant qax_result = property("ActionControl"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBarControl**)qax_result.constData(); -} - -inline Office::CommandBar* _CommandBars::ActiveMenuBar() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("ActiveMenuBar"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline bool _CommandBars::AdaptiveMenus() const -{ - QVariant qax_result = property("AdaptiveMenus"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetAdaptiveMenus(bool value){ setProperty("AdaptiveMenus", QVariant(value)); } - -inline IDispatch* _CommandBars::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _CommandBars::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBars::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool _CommandBars::DisableAskAQuestionDropdown() const -{ - QVariant qax_result = property("DisableAskAQuestionDropdown"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetDisableAskAQuestionDropdown(bool value){ setProperty("DisableAskAQuestionDropdown", QVariant(value)); } - -inline bool _CommandBars::DisableCustomize() const -{ - QVariant qax_result = property("DisableCustomize"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetDisableCustomize(bool value){ setProperty("DisableCustomize", QVariant(value)); } - -inline bool _CommandBars::DisplayFonts() const -{ - QVariant qax_result = property("DisplayFonts"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetDisplayFonts(bool value){ setProperty("DisplayFonts", QVariant(value)); } - -inline bool _CommandBars::DisplayKeysInTooltips() const -{ - QVariant qax_result = property("DisplayKeysInTooltips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetDisplayKeysInTooltips(bool value){ setProperty("DisplayKeysInTooltips", QVariant(value)); } - -inline bool _CommandBars::DisplayTooltips() const -{ - QVariant qax_result = property("DisplayTooltips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetDisplayTooltips(bool value){ setProperty("DisplayTooltips", QVariant(value)); } - -inline bool _CommandBars::LargeButtons() const -{ - QVariant qax_result = property("LargeButtons"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBars::SetLargeButtons(bool value){ setProperty("LargeButtons", QVariant(value)); } - -inline Office::MsoMenuAnimation _CommandBars::MenuAnimationStyle() const -{ - QVariant qax_result = property("MenuAnimationStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoMenuAnimation*)qax_result.constData(); -} -inline void _CommandBars::SetMenuAnimationStyle(Office::MsoMenuAnimation value){ setProperty("MenuAnimationStyle", QVariant(value)); } - -inline IDispatch* _CommandBars::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* _CommandBars::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::CommandBar* _CommandBars::Add() -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::Add(const QVariant& Name) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::Add(const QVariant& Name, const QVariant& Position) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position, (void*)&MenuBar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position, (void*)&MenuBar, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx() -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx(const QVariant& TbidOrName) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary, const QVariant& TbtrProtection) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar, (void*)&Temporary, (void*)&TbtrProtection}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBars::FindControl() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBars::FindControl(const QVariant& Type) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBars::FindControl(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBars::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBars::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline Office::CommandBarControls* _CommandBars::FindControls() -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline Office::CommandBarControls* _CommandBars::FindControls(const QVariant& Type) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline Office::CommandBarControls* _CommandBars::FindControls(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline Office::CommandBarControls* _CommandBars::FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline Office::CommandBarControls* _CommandBars::FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline int _CommandBars::IdsString(int ids, QString& pbstrName) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&ids, (void*)&pbstrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline Office::CommandBar* _CommandBars::Item(const QVariant& Index) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); - return qax_result; -} - -inline void _CommandBars::ReleaseFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline int _CommandBars::TmcGetName(int tmc, QString& pbstrName) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&tmc, (void*)&pbstrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - - -inline bool CommandBar::AdaptiveMenu() const -{ - QVariant qax_result = property("AdaptiveMenu"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBar::SetAdaptiveMenu(bool value){ setProperty("AdaptiveMenu", QVariant(value)); } - -inline IDispatch* CommandBar::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool CommandBar::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString CommandBar::Context() const -{ - QVariant qax_result = property("Context"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBar::SetContext(const QString& value){ setProperty("Context", QVariant(value)); } - -inline Office::CommandBarControls* CommandBar::Controls() const -{ - Office::CommandBarControls* qax_pointer = 0; - qRegisterMetaType("CommandBarControls*", &qax_pointer); - qRegisterMetaType("CommandBarControls", qax_pointer); - QVariant qax_result = property("Controls"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBarControls**)qax_result.constData(); -} - -inline int CommandBar::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBar::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBar::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int CommandBar::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBar::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int CommandBar::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBar::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBar::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBar::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBar::SetLeft(int value){ setProperty("Left", QVariant(value)); } - -inline QString CommandBar::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBar::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline QString CommandBar::NameLocal() const -{ - QVariant qax_result = property("NameLocal"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBar::SetNameLocal(const QString& value){ setProperty("NameLocal", QVariant(value)); } - -inline IDispatch* CommandBar::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoBarPosition CommandBar::Position() const -{ - QVariant qax_result = property("Position"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBarPosition*)qax_result.constData(); -} -inline void CommandBar::SetPosition(Office::MsoBarPosition value){ setProperty("Position", QVariant(value)); } - -inline Office::MsoBarProtection CommandBar::Protection() const -{ - QVariant qax_result = property("Protection"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBarProtection*)qax_result.constData(); -} -inline void CommandBar::SetProtection(Office::MsoBarProtection value){ setProperty("Protection", QVariant(value)); } - -inline int CommandBar::RowIndex() const -{ - QVariant qax_result = property("RowIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBar::SetRowIndex(int value){ setProperty("RowIndex", QVariant(value)); } - -inline int CommandBar::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBar::SetTop(int value){ setProperty("Top", QVariant(value)); } - -inline Office::MsoBarType CommandBar::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBarType*)qax_result.constData(); -} - -inline bool CommandBar::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBar::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int CommandBar::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBar::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int CommandBar::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBar::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBar::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBar::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString CommandBar::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBar::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBar::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBar::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* CommandBar::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant CommandBar::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBar::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBar::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBar::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBar::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline void CommandBar::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline Office::CommandBarControl* CommandBar::FindControl() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBar::FindControl(const QVariant& Type) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBar::FindControl(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBar::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBar::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBar::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible, const QVariant& Recursive) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible, (void*)&Recursive}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline void CommandBar::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void CommandBar::ShowPopup() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void CommandBar::ShowPopup(const QVariant& x) -{ - void *_a[] = {0, (void*)&x}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void CommandBar::ShowPopup(const QVariant& x, const QVariant& y) -{ - void *_a[] = {0, (void*)&x, (void*)&y}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline IDispatch* CommandBar::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline void CommandBar::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline void CommandBar::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); -} - -inline int CommandBar::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - -inline int CommandBar::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); - return qax_result; -} - -inline QVariant CommandBar::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); - return qax_result; -} - -inline void CommandBar::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); -} - -inline void CommandBar::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - -inline QVariant CommandBar::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); - return qax_result; -} - -inline QVariant CommandBar::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline void CommandBar::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); -} - -inline void CommandBar::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); -} - - -inline IDispatch* CommandBarControls::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int CommandBarControls::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarControls::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::CommandBar* CommandBarControls::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline IUnknown* CommandBarControls::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::CommandBarControl* CommandBarControls::Add() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Add(const QVariant& Type) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Add(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Parameter}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Parameter, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Add(const QVariant& Type, const QVariant& Id, const QVariant& Parameter, const QVariant& Before, const QVariant& Temporary) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Parameter, (void*)&Before, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControls::Item(const QVariant& Index) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - - -inline IDispatch* CommandBarControl::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool CommandBarControl::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarControl::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool CommandBarControl::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString CommandBarControl::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* CommandBarControl::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int CommandBarControl::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarControl::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline bool CommandBarControl::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarControl::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int CommandBarControl::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarControl::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int CommandBarControl::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarControl::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString CommandBarControl::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline int CommandBarControl::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarControl::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarControl::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBarControl::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int CommandBarControl::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlOLEUsage CommandBarControl::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void CommandBarControl::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString CommandBarControl::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString CommandBarControl::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* CommandBarControl::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline int CommandBarControl::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarControl::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline QString CommandBarControl::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString CommandBarControl::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarControl::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int CommandBarControl::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType CommandBarControl::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool CommandBarControl::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarControl::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int CommandBarControl::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarControl::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int CommandBarControl::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarControl::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarControl::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarControl::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString CommandBarControl::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarControl::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarControl::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarControl::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* CommandBarControl::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant CommandBarControl::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarControl::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarControl::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarControl::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarControl::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline Office::CommandBarControl* CommandBarControl::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControl::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControl::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void CommandBarControl::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void CommandBarControl::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void CommandBarControl::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline Office::CommandBarControl* CommandBarControl::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControl::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarControl::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void CommandBarControl::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void CommandBarControl::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void CommandBarControl::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void CommandBarControl::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void CommandBarControl::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void CommandBarControl::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void CommandBarControl::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void CommandBarControl::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void CommandBarControl::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline IDispatch* CommandBarControl::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - -inline void CommandBarControl::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); -} - -inline void CommandBarControl::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - -inline int CommandBarControl::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); - return qax_result; -} - -inline int CommandBarControl::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline QVariant CommandBarControl::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline void CommandBarControl::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); -} - -inline void CommandBarControl::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); -} - -inline QVariant CommandBarControl::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 58, _a); - return qax_result; -} - -inline QVariant CommandBarControl::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); - return qax_result; -} - -inline void CommandBarControl::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 62, _a); -} - -inline void CommandBarControl::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); -} - - -inline IDispatch* _CommandBarButton::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool _CommandBarButton::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarButton::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool _CommandBarButton::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline bool _CommandBarButton::BuiltInFace() const -{ - QVariant qax_result = property("BuiltInFace"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarButton::SetBuiltInFace(bool value){ setProperty("BuiltInFace", QVariant(value)); } - -inline QString _CommandBarButton::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* _CommandBarButton::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _CommandBarButton::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarButton::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline bool _CommandBarButton::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarButton::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int _CommandBarButton::FaceId() const -{ - QVariant qax_result = property("FaceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarButton::SetFaceId(int value){ setProperty("FaceId", QVariant(value)); } - -inline int _CommandBarButton::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarButton::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int _CommandBarButton::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarButton::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString _CommandBarButton::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline Office::MsoCommandBarButtonHyperlinkType _CommandBarButton::HyperlinkType() const -{ - QVariant qax_result = property("HyperlinkType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCommandBarButtonHyperlinkType*)qax_result.constData(); -} -inline void _CommandBarButton::SetHyperlinkType(Office::MsoCommandBarButtonHyperlinkType value){ setProperty("HyperlinkType", QVariant(value)); } - -inline int _CommandBarButton::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarButton::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarButton::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool _CommandBarButton::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int _CommandBarButton::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QPixmap _CommandBarButton::Mask() const -{ - QVariant qax_result = property("Mask"); - Q_ASSERT(qax_result.isValid()); - return *(QPixmap*)qax_result.constData(); -} -inline void _CommandBarButton::SetMask(const QPixmap& value){ setProperty("Mask", QVariant(value)); } - -inline Office::MsoControlOLEUsage _CommandBarButton::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void _CommandBarButton::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString _CommandBarButton::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString _CommandBarButton::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* _CommandBarButton::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline QPixmap _CommandBarButton::Picture() const -{ - QVariant qax_result = property("Picture"); - Q_ASSERT(qax_result.isValid()); - return *(QPixmap*)qax_result.constData(); -} -inline void _CommandBarButton::SetPicture(const QPixmap& value){ setProperty("Picture", QVariant(value)); } - -inline int _CommandBarButton::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarButton::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline QString _CommandBarButton::ShortcutText() const -{ - QVariant qax_result = property("ShortcutText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetShortcutText(const QString& value){ setProperty("ShortcutText", QVariant(value)); } - -inline Office::MsoButtonState _CommandBarButton::State() const -{ - QVariant qax_result = property("State"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoButtonState*)qax_result.constData(); -} -inline void _CommandBarButton::SetState(Office::MsoButtonState value){ setProperty("State", QVariant(value)); } - -inline Office::MsoButtonStyle _CommandBarButton::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoButtonStyle*)qax_result.constData(); -} -inline void _CommandBarButton::SetStyle(Office::MsoButtonStyle value){ setProperty("Style", QVariant(value)); } - -inline QString _CommandBarButton::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString _CommandBarButton::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarButton::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int _CommandBarButton::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType _CommandBarButton::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool _CommandBarButton::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarButton::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int _CommandBarButton::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarButton::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int _CommandBarButton::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarButton::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarButton::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString _CommandBarButton::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarButton::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarButton::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* _CommandBarButton::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarButton::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarButton::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline Office::CommandBarControl* _CommandBarButton::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarButton::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarButton::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void _CommandBarButton::CopyFace() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void _CommandBarButton::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void _CommandBarButton::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void _CommandBarButton::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline Office::CommandBarControl* _CommandBarButton::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarButton::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarButton::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline void _CommandBarButton::PasteFace() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void _CommandBarButton::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void _CommandBarButton::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void _CommandBarButton::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void _CommandBarButton::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void _CommandBarButton::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void _CommandBarButton::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void _CommandBarButton::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void _CommandBarButton::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void _CommandBarButton::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline IDispatch* _CommandBarButton::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline void _CommandBarButton::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); -} - -inline void _CommandBarButton::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); -} - -inline int _CommandBarButton::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); - return qax_result; -} - -inline int _CommandBarButton::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline QVariant _CommandBarButton::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 61, _a); - return qax_result; -} - -inline void _CommandBarButton::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); -} - -inline void _CommandBarButton::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 65, _a); -} - -inline QVariant _CommandBarButton::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); - return qax_result; -} - -inline QVariant _CommandBarButton::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 69, _a); - return qax_result; -} - -inline void _CommandBarButton::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 72, _a); -} - -inline void _CommandBarButton::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 73, _a); -} - - -inline IDispatch* CommandBarPopup::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool CommandBarPopup::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarPopup::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool CommandBarPopup::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString CommandBarPopup::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline Office::CommandBar* CommandBarPopup::CommandBar() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("CommandBar"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline IDispatch* CommandBarPopup::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::CommandBarControls* CommandBarPopup::Controls() const -{ - Office::CommandBarControls* qax_pointer = 0; - qRegisterMetaType("CommandBarControls*", &qax_pointer); - qRegisterMetaType("CommandBarControls", qax_pointer); - QVariant qax_result = property("Controls"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBarControls**)qax_result.constData(); -} - -inline int CommandBarPopup::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarPopup::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline bool CommandBarPopup::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarPopup::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int CommandBarPopup::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarPopup::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int CommandBarPopup::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarPopup::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString CommandBarPopup::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline int CommandBarPopup::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarPopup::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarPopup::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBarPopup::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int CommandBarPopup::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoOLEMenuGroup CommandBarPopup::OLEMenuGroup() const -{ - QVariant qax_result = property("OLEMenuGroup"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoOLEMenuGroup*)qax_result.constData(); -} -inline void CommandBarPopup::SetOLEMenuGroup(Office::MsoOLEMenuGroup value){ setProperty("OLEMenuGroup", QVariant(value)); } - -inline Office::MsoControlOLEUsage CommandBarPopup::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void CommandBarPopup::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString CommandBarPopup::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString CommandBarPopup::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* CommandBarPopup::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline int CommandBarPopup::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarPopup::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline QString CommandBarPopup::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString CommandBarPopup::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarPopup::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int CommandBarPopup::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType CommandBarPopup::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool CommandBarPopup::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarPopup::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int CommandBarPopup::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarPopup::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int CommandBarPopup::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarPopup::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarPopup::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString CommandBarPopup::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarPopup::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarPopup::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* CommandBarPopup::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarPopup::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarPopup::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline Office::CommandBarControl* CommandBarPopup::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarPopup::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarPopup::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void CommandBarPopup::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void CommandBarPopup::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void CommandBarPopup::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline Office::CommandBarControl* CommandBarPopup::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarPopup::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarPopup::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void CommandBarPopup::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void CommandBarPopup::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void CommandBarPopup::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void CommandBarPopup::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void CommandBarPopup::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void CommandBarPopup::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void CommandBarPopup::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void CommandBarPopup::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void CommandBarPopup::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline IDispatch* CommandBarPopup::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); - return qax_result; -} - -inline void CommandBarPopup::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - -inline void CommandBarPopup::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); -} - -inline int CommandBarPopup::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline int CommandBarPopup::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline QVariant CommandBarPopup::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); - return qax_result; -} - -inline void CommandBarPopup::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); -} - -inline void CommandBarPopup::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); -} - -inline QVariant CommandBarPopup::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); - return qax_result; -} - -inline QVariant CommandBarPopup::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline void CommandBarPopup::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); -} - -inline void CommandBarPopup::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); -} - - -inline IDispatch* _CommandBarComboBox::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool _CommandBarComboBox::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool _CommandBarComboBox::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* _CommandBarComboBox::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _CommandBarComboBox::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline int _CommandBarComboBox::DropDownLines() const -{ - QVariant qax_result = property("DropDownLines"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetDropDownLines(int value){ setProperty("DropDownLines", QVariant(value)); } - -inline int _CommandBarComboBox::DropDownWidth() const -{ - QVariant qax_result = property("DropDownWidth"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetDropDownWidth(int value){ setProperty("DropDownWidth", QVariant(value)); } - -inline bool _CommandBarComboBox::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int _CommandBarComboBox::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int _CommandBarComboBox::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString _CommandBarComboBox::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline int _CommandBarComboBox::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarComboBox::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarComboBox::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool _CommandBarComboBox::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int _CommandBarComboBox::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarComboBox::ListCount() const -{ - QVariant qax_result = property("ListCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarComboBox::ListHeaderCount() const -{ - QVariant qax_result = property("ListHeaderCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetListHeaderCount(int value){ setProperty("ListHeaderCount", QVariant(value)); } - -inline int _CommandBarComboBox::ListIndex() const -{ - QVariant qax_result = property("ListIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetListIndex(int value){ setProperty("ListIndex", QVariant(value)); } - -inline Office::MsoControlOLEUsage _CommandBarComboBox::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString _CommandBarComboBox::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString _CommandBarComboBox::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* _CommandBarComboBox::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline int _CommandBarComboBox::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline Office::MsoComboStyle _CommandBarComboBox::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoComboStyle*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetStyle(Office::MsoComboStyle value){ setProperty("Style", QVariant(value)); } - -inline QString _CommandBarComboBox::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString _CommandBarComboBox::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline QString _CommandBarComboBox::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int _CommandBarComboBox::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType _CommandBarComboBox::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool _CommandBarComboBox::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int _CommandBarComboBox::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarComboBox::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int _CommandBarComboBox::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarComboBox::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarComboBox::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* _CommandBarComboBox::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarComboBox::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarComboBox::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline void _CommandBarComboBox::AddItem(const QString& Text) -{ - void *_a[] = {0, (void*)&Text}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void _CommandBarComboBox::AddItem(const QString& Text, const QVariant& Index) -{ - void *_a[] = {0, (void*)&Text, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void _CommandBarComboBox::Clear() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline Office::CommandBarControl* _CommandBarComboBox::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarComboBox::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarComboBox::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline void _CommandBarComboBox::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void _CommandBarComboBox::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void _CommandBarComboBox::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline QString _CommandBarComboBox::List(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarComboBox::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarComboBox::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarComboBox::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline void _CommandBarComboBox::RemoveItem(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void _CommandBarComboBox::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void _CommandBarComboBox::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void _CommandBarComboBox::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void _CommandBarComboBox::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void _CommandBarComboBox::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void _CommandBarComboBox::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void _CommandBarComboBox::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void _CommandBarComboBox::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void _CommandBarComboBox::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline int _CommandBarComboBox::SetList(int Index, const QString& rhs) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&rhs}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline IDispatch* _CommandBarComboBox::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); - return qax_result; -} - -inline void _CommandBarComboBox::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 57, _a); -} - -inline void _CommandBarComboBox::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 58, _a); -} - -inline int _CommandBarComboBox::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 61, _a); - return qax_result; -} - -inline int _CommandBarComboBox::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 62, _a); - return qax_result; -} - -inline QVariant _CommandBarComboBox::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); - return qax_result; -} - -inline void _CommandBarComboBox::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 66, _a); -} - -inline void _CommandBarComboBox::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 67, _a); -} - -inline QVariant _CommandBarComboBox::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 70, _a); - return qax_result; -} - -inline QVariant _CommandBarComboBox::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 71, _a); - return qax_result; -} - -inline void _CommandBarComboBox::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 74, _a); -} - -inline void _CommandBarComboBox::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 75, _a); -} - - -inline IDispatch* _CommandBarActiveX::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool _CommandBarActiveX::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool _CommandBarActiveX::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* _CommandBarActiveX::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString _CommandBarActiveX::ControlCLSID() const -{ - QVariant qax_result = property("ControlCLSID"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetControlCLSID(const QString& value){ setProperty("ControlCLSID", QVariant(value)); } - -inline int _CommandBarActiveX::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline bool _CommandBarActiveX::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int _CommandBarActiveX::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int _CommandBarActiveX::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString _CommandBarActiveX::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline int _CommandBarActiveX::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _CommandBarActiveX::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* _CommandBarActiveX::InitWith() const -{ - QVariant qax_result = property("InitWith"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} -inline void _CommandBarActiveX::SetInitWith(IUnknown* value){ - int typeId = qRegisterMetaType("IUnknown*", &value); - setProperty("InitWith", QVariant(typeId, &value)); -} - -inline int _CommandBarActiveX::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool _CommandBarActiveX::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int _CommandBarActiveX::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlOLEUsage _CommandBarActiveX::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString _CommandBarActiveX::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString _CommandBarActiveX::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* _CommandBarActiveX::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline int _CommandBarActiveX::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline QString _CommandBarActiveX::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString _CommandBarActiveX::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int _CommandBarActiveX::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType _CommandBarActiveX::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool _CommandBarActiveX::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int _CommandBarActiveX::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void _CommandBarActiveX::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int _CommandBarActiveX::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _CommandBarActiveX::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarActiveX::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* _CommandBarActiveX::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant _CommandBarActiveX::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void _CommandBarActiveX::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline Office::CommandBarControl* _CommandBarActiveX::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarActiveX::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarActiveX::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void _CommandBarActiveX::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void _CommandBarActiveX::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void _CommandBarActiveX::EnsureControl() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void _CommandBarActiveX::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline Office::CommandBarControl* _CommandBarActiveX::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarActiveX::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::CommandBarControl* _CommandBarActiveX::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline IUnknown* _CommandBarActiveX::QueryControlInterface(const QString& bstrIid) -{ - IUnknown* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&bstrIid}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void _CommandBarActiveX::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void _CommandBarActiveX::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void _CommandBarActiveX::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void _CommandBarActiveX::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void _CommandBarActiveX::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void _CommandBarActiveX::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void _CommandBarActiveX::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void _CommandBarActiveX::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void _CommandBarActiveX::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void _CommandBarActiveX::SetInnerObjectFactory(IUnknown* pUnk) -{ - void *_a[] = {0, (void*)&pUnk}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline IDispatch* _CommandBarActiveX::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); - return qax_result; -} - -inline void _CommandBarActiveX::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); -} - -inline void _CommandBarActiveX::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); -} - -inline int _CommandBarActiveX::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); - return qax_result; -} - -inline int _CommandBarActiveX::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); - return qax_result; -} - -inline QVariant _CommandBarActiveX::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); - return qax_result; -} - -inline void _CommandBarActiveX::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); -} - -inline void _CommandBarActiveX::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); -} - -inline QVariant _CommandBarActiveX::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); - return qax_result; -} - -inline QVariant _CommandBarActiveX::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); - return qax_result; -} - -inline void _CommandBarActiveX::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 67, _a); -} - -inline void _CommandBarActiveX::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); -} - - -inline IDispatch* Adjustments::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Adjustments::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Adjustments::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Adjustments::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double Adjustments::Item(int Index) -{ - double qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline int Adjustments::SetItem(int Index, double rhs) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&rhs}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline Office::MsoTriState CalloutFormat::Accent() const -{ - QVariant qax_result = property("Accent"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetAccent(Office::MsoTriState value){ setProperty("Accent", QVariant(value)); } - -inline Office::MsoCalloutAngleType CalloutFormat::Angle() const -{ - QVariant qax_result = property("Angle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutAngleType*)qax_result.constData(); -} -inline void CalloutFormat::SetAngle(Office::MsoCalloutAngleType value){ setProperty("Angle", QVariant(value)); } - -inline IDispatch* CalloutFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState CalloutFormat::AutoAttach() const -{ - QVariant qax_result = property("AutoAttach"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetAutoAttach(Office::MsoTriState value){ setProperty("AutoAttach", QVariant(value)); } - -inline Office::MsoTriState CalloutFormat::AutoLength() const -{ - QVariant qax_result = property("AutoLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState CalloutFormat::Border() const -{ - QVariant qax_result = property("Border"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetBorder(Office::MsoTriState value){ setProperty("Border", QVariant(value)); } - -inline int CalloutFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double CalloutFormat::Drop() const -{ - QVariant qax_result = property("Drop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline Office::MsoCalloutDropType CalloutFormat::DropType() const -{ - QVariant qax_result = property("DropType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutDropType*)qax_result.constData(); -} - -inline double CalloutFormat::Gap() const -{ - QVariant qax_result = property("Gap"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void CalloutFormat::SetGap(double value){ setProperty("Gap", QVariant(value)); } - -inline double CalloutFormat::Length() const -{ - QVariant qax_result = property("Length"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline IDispatch* CalloutFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoCalloutType CalloutFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutType*)qax_result.constData(); -} -inline void CalloutFormat::SetType(Office::MsoCalloutType value){ setProperty("Type", QVariant(value)); } - -inline void CalloutFormat::AutomaticLength() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void CalloutFormat::CustomDrop(double Drop) -{ - void *_a[] = {0, (void*)&Drop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void CalloutFormat::CustomLength(double Length) -{ - void *_a[] = {0, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void CalloutFormat::PresetDrop(Office::MsoCalloutDropType DropType) -{ - void *_a[] = {0, (void*)&DropType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline IDispatch* ColorFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ColorFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ColorFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ColorFormat::RGB() const -{ - QVariant qax_result = property("RGB"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ColorFormat::SetRGB(int value){ setProperty("RGB", QVariant(value)); } - -inline int ColorFormat::SchemeColor() const -{ - QVariant qax_result = property("SchemeColor"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ColorFormat::SetSchemeColor(int value){ setProperty("SchemeColor", QVariant(value)); } - -inline double ColorFormat::TintAndShade() const -{ - QVariant qax_result = property("TintAndShade"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ColorFormat::SetTintAndShade(double value){ setProperty("TintAndShade", QVariant(value)); } - -inline Office::MsoColorType ColorFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoColorType*)qax_result.constData(); -} - - -inline IDispatch* ConnectorFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState ConnectorFormat::BeginConnected() const -{ - QVariant qax_result = property("BeginConnected"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::Shape* ConnectorFormat::BeginConnectedShape() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("BeginConnectedShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline int ConnectorFormat::BeginConnectionSite() const -{ - QVariant qax_result = property("BeginConnectionSite"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ConnectorFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState ConnectorFormat::EndConnected() const -{ - QVariant qax_result = property("EndConnected"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::Shape* ConnectorFormat::EndConnectedShape() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("EndConnectedShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline int ConnectorFormat::EndConnectionSite() const -{ - QVariant qax_result = property("EndConnectionSite"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ConnectorFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoConnectorType ConnectorFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoConnectorType*)qax_result.constData(); -} -inline void ConnectorFormat::SetType(Office::MsoConnectorType value){ setProperty("Type", QVariant(value)); } - -inline void ConnectorFormat::BeginConnect(Office::Shape* ConnectedShape, int ConnectionSite) -{ - void *_a[] = {0, (void*)&ConnectedShape, (void*)&ConnectionSite}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ConnectorFormat::BeginDisconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ConnectorFormat::EndConnect(Office::Shape* ConnectedShape, int ConnectionSite) -{ - void *_a[] = {0, (void*)&ConnectedShape, (void*)&ConnectionSite}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ConnectorFormat::EndDisconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline IDispatch* FillFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::ColorFormat* FillFormat::BackColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("BackColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} -inline void FillFormat::SetBackColor(Office::ColorFormat* value){ - int typeId = qRegisterMetaType("Office::ColorFormat*", &value); - setProperty("BackColor", QVariant(typeId, &value)); -} - -inline int FillFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::ColorFormat* FillFormat::ForeColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} -inline void FillFormat::SetForeColor(Office::ColorFormat* value){ - int typeId = qRegisterMetaType("Office::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoGradientColorType FillFormat::GradientColorType() const -{ - QVariant qax_result = property("GradientColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoGradientColorType*)qax_result.constData(); -} - -inline double FillFormat::GradientDegree() const -{ - QVariant qax_result = property("GradientDegree"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline Office::MsoGradientStyle FillFormat::GradientStyle() const -{ - QVariant qax_result = property("GradientStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoGradientStyle*)qax_result.constData(); -} - -inline int FillFormat::GradientVariant() const -{ - QVariant qax_result = property("GradientVariant"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FillFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPatternType FillFormat::Pattern() const -{ - QVariant qax_result = property("Pattern"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPatternType*)qax_result.constData(); -} - -inline Office::MsoPresetGradientType FillFormat::PresetGradientType() const -{ - QVariant qax_result = property("PresetGradientType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetGradientType*)qax_result.constData(); -} - -inline Office::MsoPresetTexture FillFormat::PresetTexture() const -{ - QVariant qax_result = property("PresetTexture"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTexture*)qax_result.constData(); -} - -inline QString FillFormat::TextureName() const -{ - QVariant qax_result = property("TextureName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTextureType FillFormat::TextureType() const -{ - QVariant qax_result = property("TextureType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextureType*)qax_result.constData(); -} - -inline double FillFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void FillFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoFillType FillFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFillType*)qax_result.constData(); -} - -inline Office::MsoTriState FillFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void FillFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void FillFormat::Background() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void FillFormat::OneColorGradient(Office::MsoGradientStyle Style, int Variant, double Degree) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant, (void*)&Degree}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void FillFormat::Patterned(Office::MsoPatternType Pattern) -{ - void *_a[] = {0, (void*)&Pattern}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void FillFormat::PresetGradient(Office::MsoGradientStyle Style, int Variant, Office::MsoPresetGradientType PresetGradientType) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant, (void*)&PresetGradientType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void FillFormat::PresetTextured(Office::MsoPresetTexture PresetTexture) -{ - void *_a[] = {0, (void*)&PresetTexture}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void FillFormat::Solid() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void FillFormat::TwoColorGradient(Office::MsoGradientStyle Style, int Variant) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void FillFormat::UserPicture(const QString& PictureFile) -{ - void *_a[] = {0, (void*)&PictureFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void FillFormat::UserTextured(const QString& TextureFile) -{ - void *_a[] = {0, (void*)&TextureFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline IDispatch* FreeformBuilder::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FreeformBuilder::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FreeformBuilder::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3, (void*)&Y3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline Office::Shape* FreeformBuilder::ConvertToShape() -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - - -inline IDispatch* GroupShapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int GroupShapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int GroupShapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* GroupShapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* GroupShapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::Shape* GroupShapes::Item(const QVariant& Index) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::ShapeRange* GroupShapes::Range(const QVariant& Index) -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline IDispatch* LineFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::ColorFormat* LineFormat::BackColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("BackColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} -inline void LineFormat::SetBackColor(Office::ColorFormat* value){ - int typeId = qRegisterMetaType("Office::ColorFormat*", &value); - setProperty("BackColor", QVariant(typeId, &value)); -} - -inline Office::MsoArrowheadLength LineFormat::BeginArrowheadLength() const -{ - QVariant qax_result = property("BeginArrowheadLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadLength*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadLength(Office::MsoArrowheadLength value){ setProperty("BeginArrowheadLength", QVariant(value)); } - -inline Office::MsoArrowheadStyle LineFormat::BeginArrowheadStyle() const -{ - QVariant qax_result = property("BeginArrowheadStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadStyle*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadStyle(Office::MsoArrowheadStyle value){ setProperty("BeginArrowheadStyle", QVariant(value)); } - -inline Office::MsoArrowheadWidth LineFormat::BeginArrowheadWidth() const -{ - QVariant qax_result = property("BeginArrowheadWidth"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadWidth*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadWidth(Office::MsoArrowheadWidth value){ setProperty("BeginArrowheadWidth", QVariant(value)); } - -inline int LineFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoLineDashStyle LineFormat::DashStyle() const -{ - QVariant qax_result = property("DashStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLineDashStyle*)qax_result.constData(); -} -inline void LineFormat::SetDashStyle(Office::MsoLineDashStyle value){ setProperty("DashStyle", QVariant(value)); } - -inline Office::MsoArrowheadLength LineFormat::EndArrowheadLength() const -{ - QVariant qax_result = property("EndArrowheadLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadLength*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadLength(Office::MsoArrowheadLength value){ setProperty("EndArrowheadLength", QVariant(value)); } - -inline Office::MsoArrowheadStyle LineFormat::EndArrowheadStyle() const -{ - QVariant qax_result = property("EndArrowheadStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadStyle*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadStyle(Office::MsoArrowheadStyle value){ setProperty("EndArrowheadStyle", QVariant(value)); } - -inline Office::MsoArrowheadWidth LineFormat::EndArrowheadWidth() const -{ - QVariant qax_result = property("EndArrowheadWidth"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadWidth*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadWidth(Office::MsoArrowheadWidth value){ setProperty("EndArrowheadWidth", QVariant(value)); } - -inline Office::ColorFormat* LineFormat::ForeColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} -inline void LineFormat::SetForeColor(Office::ColorFormat* value){ - int typeId = qRegisterMetaType("Office::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoTriState LineFormat::InsetPen() const -{ - QVariant qax_result = property("InsetPen"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void LineFormat::SetInsetPen(Office::MsoTriState value){ setProperty("InsetPen", QVariant(value)); } - -inline IDispatch* LineFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPatternType LineFormat::Pattern() const -{ - QVariant qax_result = property("Pattern"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPatternType*)qax_result.constData(); -} -inline void LineFormat::SetPattern(Office::MsoPatternType value){ setProperty("Pattern", QVariant(value)); } - -inline Office::MsoLineStyle LineFormat::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLineStyle*)qax_result.constData(); -} -inline void LineFormat::SetStyle(Office::MsoLineStyle value){ setProperty("Style", QVariant(value)); } - -inline double LineFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void LineFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoTriState LineFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void LineFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double LineFormat::Weight() const -{ - QVariant qax_result = property("Weight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void LineFormat::SetWeight(double value){ setProperty("Weight", QVariant(value)); } - - -inline IDispatch* ShapeNode::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShapeNode::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoEditingType ShapeNode::EditingType() const -{ - QVariant qax_result = property("EditingType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoEditingType*)qax_result.constData(); -} - -inline IDispatch* ShapeNode::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant ShapeNode::Points() const -{ - QVariant qax_result = property("Points"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoSegmentType ShapeNode::SegmentType() const -{ - QVariant qax_result = property("SegmentType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSegmentType*)qax_result.constData(); -} - - -inline IDispatch* ShapeNodes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShapeNodes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ShapeNodes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ShapeNodes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ShapeNodes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void ShapeNodes::Delete(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3, (void*)&Y3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline Office::ShapeNode* ShapeNodes::Item(const QVariant& Index) -{ - Office::ShapeNode* qax_result = 0; - qRegisterMetaType("ShapeNode*", &qax_result); - qRegisterMetaType("ShapeNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline void ShapeNodes::SetEditingType(int Index, Office::MsoEditingType EditingType) -{ - void *_a[] = {0, (void*)&Index, (void*)&EditingType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void ShapeNodes::SetPosition(int Index, double X1, double Y1) -{ - void *_a[] = {0, (void*)&Index, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void ShapeNodes::SetSegmentType(int Index, Office::MsoSegmentType SegmentType) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - - -inline IDispatch* PictureFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double PictureFormat::Brightness() const -{ - QVariant qax_result = property("Brightness"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetBrightness(double value){ setProperty("Brightness", QVariant(value)); } - -inline Office::MsoPictureColorType PictureFormat::ColorType() const -{ - QVariant qax_result = property("ColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPictureColorType*)qax_result.constData(); -} -inline void PictureFormat::SetColorType(Office::MsoPictureColorType value){ setProperty("ColorType", QVariant(value)); } - -inline double PictureFormat::Contrast() const -{ - QVariant qax_result = property("Contrast"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetContrast(double value){ setProperty("Contrast", QVariant(value)); } - -inline int PictureFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double PictureFormat::CropBottom() const -{ - QVariant qax_result = property("CropBottom"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropBottom(double value){ setProperty("CropBottom", QVariant(value)); } - -inline double PictureFormat::CropLeft() const -{ - QVariant qax_result = property("CropLeft"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropLeft(double value){ setProperty("CropLeft", QVariant(value)); } - -inline double PictureFormat::CropRight() const -{ - QVariant qax_result = property("CropRight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropRight(double value){ setProperty("CropRight", QVariant(value)); } - -inline double PictureFormat::CropTop() const -{ - QVariant qax_result = property("CropTop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropTop(double value){ setProperty("CropTop", QVariant(value)); } - -inline IDispatch* PictureFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int PictureFormat::TransparencyColor() const -{ - QVariant qax_result = property("TransparencyColor"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PictureFormat::SetTransparencyColor(int value){ setProperty("TransparencyColor", QVariant(value)); } - -inline Office::MsoTriState PictureFormat::TransparentBackground() const -{ - QVariant qax_result = property("TransparentBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PictureFormat::SetTransparentBackground(Office::MsoTriState value){ setProperty("TransparentBackground", QVariant(value)); } - -inline void PictureFormat::IncrementBrightness(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void PictureFormat::IncrementContrast(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* ShadowFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShadowFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::ColorFormat* ShadowFormat::ForeColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} -inline void ShadowFormat::SetForeColor(Office::ColorFormat* value){ - int typeId = qRegisterMetaType("Office::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoTriState ShadowFormat::Obscured() const -{ - QVariant qax_result = property("Obscured"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShadowFormat::SetObscured(Office::MsoTriState value){ setProperty("Obscured", QVariant(value)); } - -inline double ShadowFormat::OffsetX() const -{ - QVariant qax_result = property("OffsetX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetOffsetX(double value){ setProperty("OffsetX", QVariant(value)); } - -inline double ShadowFormat::OffsetY() const -{ - QVariant qax_result = property("OffsetY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetOffsetY(double value){ setProperty("OffsetY", QVariant(value)); } - -inline IDispatch* ShadowFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double ShadowFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoShadowType ShadowFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShadowType*)qax_result.constData(); -} -inline void ShadowFormat::SetType(Office::MsoShadowType value){ setProperty("Type", QVariant(value)); } - -inline Office::MsoTriState ShadowFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShadowFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void ShadowFormat::IncrementOffsetX(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShadowFormat::IncrementOffsetY(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* Script::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Script::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Script::Extended() const -{ - QVariant qax_result = property("Extended"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Script::SetExtended(const QString& value){ setProperty("Extended", QVariant(value)); } - -inline QString Script::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Script::SetId(const QString& value){ setProperty("Id", QVariant(value)); } - -inline Office::MsoScriptLanguage Script::Language() const -{ - QVariant qax_result = property("Language"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoScriptLanguage*)qax_result.constData(); -} -inline void Script::SetLanguage(Office::MsoScriptLanguage value){ setProperty("Language", QVariant(value)); } - -inline Office::MsoScriptLocation Script::Location() const -{ - QVariant qax_result = property("Location"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoScriptLocation*)qax_result.constData(); -} - -inline IDispatch* Script::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString Script::ScriptText() const -{ - QVariant qax_result = property("ScriptText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Script::SetScriptText(const QString& value){ setProperty("ScriptText", QVariant(value)); } - -inline IDispatch* Script::Shape() const -{ - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void Script::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* Scripts::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Scripts::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Scripts::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Scripts::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Scripts::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::Script* Scripts::Add() -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor, Office::MsoScriptLocation Location) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor, (void*)&Location}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor, (void*)&Location, (void*)&Language}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor, (void*)&Location, (void*)&Language, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id, const QString& Extended) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor, (void*)&Location, (void*)&Language, (void*)&Id, (void*)&Extended}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::Script* Scripts::Add(IDispatch* Anchor, Office::MsoScriptLocation Location, Office::MsoScriptLanguage Language, const QString& Id, const QString& Extended, const QString& ScriptText) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Anchor, (void*)&Location, (void*)&Language, (void*)&Id, (void*)&Extended, (void*)&ScriptText}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline void Scripts::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline Office::Script* Scripts::Item(const QVariant& Index) -{ - Office::Script* qax_result = 0; - qRegisterMetaType("Script*", &qax_result); - qRegisterMetaType("Script", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - - -inline Office::Adjustments* Shape::Adjustments() const -{ - Office::Adjustments* qax_pointer = 0; - qRegisterMetaType("Adjustments*", &qax_pointer); - qRegisterMetaType("Adjustments", qax_pointer); - QVariant qax_result = property("Adjustments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Adjustments**)qax_result.constData(); -} - -inline QString Shape::AlternativeText() const -{ - QVariant qax_result = property("AlternativeText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetAlternativeText(const QString& value){ setProperty("AlternativeText", QVariant(value)); } - -inline IDispatch* Shape::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoAutoShapeType Shape::AutoShapeType() const -{ - QVariant qax_result = property("AutoShapeType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutoShapeType*)qax_result.constData(); -} -inline void Shape::SetAutoShapeType(Office::MsoAutoShapeType value){ setProperty("AutoShapeType", QVariant(value)); } - -inline Office::MsoBlackWhiteMode Shape::BlackWhiteMode() const -{ - QVariant qax_result = property("BlackWhiteMode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBlackWhiteMode*)qax_result.constData(); -} -inline void Shape::SetBlackWhiteMode(Office::MsoBlackWhiteMode value){ setProperty("BlackWhiteMode", QVariant(value)); } - -inline Office::CalloutFormat* Shape::Callout() const -{ - Office::CalloutFormat* qax_pointer = 0; - qRegisterMetaType("CalloutFormat*", &qax_pointer); - qRegisterMetaType("CalloutFormat", qax_pointer); - QVariant qax_result = property("Callout"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CalloutFormat**)qax_result.constData(); -} - -inline Office::CanvasShapes* Shape::CanvasItems() const -{ - Office::CanvasShapes* qax_pointer = 0; - qRegisterMetaType("CanvasShapes*", &qax_pointer); - qRegisterMetaType("CanvasShapes", qax_pointer); - QVariant qax_result = property("CanvasItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CanvasShapes**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Child() const -{ - QVariant qax_result = property("Child"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int Shape::ConnectionSiteCount() const -{ - QVariant qax_result = property("ConnectionSiteCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Connector() const -{ - QVariant qax_result = property("Connector"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::ConnectorFormat* Shape::ConnectorFormat() const -{ - Office::ConnectorFormat* qax_pointer = 0; - qRegisterMetaType("ConnectorFormat*", &qax_pointer); - qRegisterMetaType("ConnectorFormat", qax_pointer); - QVariant qax_result = property("ConnectorFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ConnectorFormat**)qax_result.constData(); -} - -inline int Shape::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::IMsoDiagram* Shape::Diagram() const -{ - Office::IMsoDiagram* qax_pointer = 0; - qRegisterMetaType("IMsoDiagram*", &qax_pointer); - qRegisterMetaType("IMsoDiagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::IMsoDiagram**)qax_result.constData(); -} - -inline Office::DiagramNode* Shape::DiagramNode() const -{ - Office::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("DiagramNode"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNode**)qax_result.constData(); -} - -inline Office::FillFormat* Shape::Fill() const -{ - Office::FillFormat* qax_pointer = 0; - qRegisterMetaType("FillFormat*", &qax_pointer); - qRegisterMetaType("FillFormat", qax_pointer); - QVariant qax_result = property("Fill"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FillFormat**)qax_result.constData(); -} - -inline Office::GroupShapes* Shape::GroupItems() const -{ - Office::GroupShapes* qax_pointer = 0; - qRegisterMetaType("GroupShapes*", &qax_pointer); - qRegisterMetaType("GroupShapes", qax_pointer); - QVariant qax_result = property("GroupItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::GroupShapes**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasDiagram() const -{ - QVariant qax_result = property("HasDiagram"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasDiagramNode() const -{ - QVariant qax_result = property("HasDiagramNode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline double Shape::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::MsoTriState Shape::HorizontalFlip() const -{ - QVariant qax_result = property("HorizontalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int Shape::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double Shape::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline Office::LineFormat* Shape::Line() const -{ - Office::LineFormat* qax_pointer = 0; - qRegisterMetaType("LineFormat*", &qax_pointer); - qRegisterMetaType("LineFormat", qax_pointer); - QVariant qax_result = property("Line"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::LineFormat**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::LockAspectRatio() const -{ - QVariant qax_result = property("LockAspectRatio"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Shape::SetLockAspectRatio(Office::MsoTriState value){ setProperty("LockAspectRatio", QVariant(value)); } - -inline QString Shape::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline Office::ShapeNodes* Shape::Nodes() const -{ - Office::ShapeNodes* qax_pointer = 0; - qRegisterMetaType("ShapeNodes*", &qax_pointer); - qRegisterMetaType("ShapeNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ShapeNodes**)qax_result.constData(); -} - -inline IDispatch* Shape::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Shape* Shape::ParentGroup() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("ParentGroup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline Office::PictureFormat* Shape::PictureFormat() const -{ - Office::PictureFormat* qax_pointer = 0; - qRegisterMetaType("PictureFormat*", &qax_pointer); - qRegisterMetaType("PictureFormat", qax_pointer); - QVariant qax_result = property("PictureFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::PictureFormat**)qax_result.constData(); -} - -inline QString Shape::RTF() const -{ - QVariant qax_result = property("RTF"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetRTF(const QString& value){ setProperty("RTF", QVariant(value)); } - -inline double Shape::Rotation() const -{ - QVariant qax_result = property("Rotation"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetRotation(double value){ setProperty("Rotation", QVariant(value)); } - -inline Office::Script* Shape::Script() const -{ - Office::Script* qax_pointer = 0; - qRegisterMetaType("Script*", &qax_pointer); - qRegisterMetaType("Script", qax_pointer); - QVariant qax_result = property("Script"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Script**)qax_result.constData(); -} - -inline Office::ShadowFormat* Shape::Shadow() const -{ - Office::ShadowFormat* qax_pointer = 0; - qRegisterMetaType("ShadowFormat*", &qax_pointer); - qRegisterMetaType("ShadowFormat", qax_pointer); - QVariant qax_result = property("Shadow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ShadowFormat**)qax_result.constData(); -} - -inline Office::TextEffectFormat* Shape::TextEffect() const -{ - Office::TextEffectFormat* qax_pointer = 0; - qRegisterMetaType("TextEffectFormat*", &qax_pointer); - qRegisterMetaType("TextEffectFormat", qax_pointer); - QVariant qax_result = property("TextEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::TextEffectFormat**)qax_result.constData(); -} - -inline Office::TextFrame* Shape::TextFrame() const -{ - Office::TextFrame* qax_pointer = 0; - qRegisterMetaType("TextFrame*", &qax_pointer); - qRegisterMetaType("TextFrame", qax_pointer); - QVariant qax_result = property("TextFrame"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::TextFrame**)qax_result.constData(); -} - -inline Office::ThreeDFormat* Shape::ThreeD() const -{ - Office::ThreeDFormat* qax_pointer = 0; - qRegisterMetaType("ThreeDFormat*", &qax_pointer); - qRegisterMetaType("ThreeDFormat", qax_pointer); - QVariant qax_result = property("ThreeD"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ThreeDFormat**)qax_result.constData(); -} - -inline double Shape::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline Office::MsoShapeType Shape::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShapeType*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::VerticalFlip() const -{ - QVariant qax_result = property("VerticalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline QVariant Shape::Vertices() const -{ - QVariant qax_result = property("Vertices"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Shape::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double Shape::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int Shape::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline void Shape::Apply() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Shape::CanvasCropBottom(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Shape::CanvasCropLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Shape::CanvasCropRight(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void Shape::CanvasCropTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void Shape::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline Office::Shape* Shape::Duplicate() -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline void Shape::Flip(Office::MsoFlipCmd FlipCmd) -{ - void *_a[] = {0, (void*)&FlipCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void Shape::IncrementLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void Shape::IncrementRotation(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void Shape::IncrementTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void Shape::PickUp() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void Shape::RerouteConnections() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void Shape::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void Shape::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void Shape::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void Shape::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void Shape::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void Shape::Select(const QVariant& Replace) -{ - void *_a[] = {0, (void*)&Replace}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void Shape::SetShapesDefaultProperties() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline Office::ShapeRange* Shape::Ungroup() -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline void Shape::ZOrder(Office::MsoZOrderCmd ZOrderCmd) -{ - void *_a[] = {0, (void*)&ZOrderCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); -} - - -inline Office::Adjustments* ShapeRange::Adjustments() const -{ - Office::Adjustments* qax_pointer = 0; - qRegisterMetaType("Adjustments*", &qax_pointer); - qRegisterMetaType("Adjustments", qax_pointer); - QVariant qax_result = property("Adjustments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Adjustments**)qax_result.constData(); -} - -inline QString ShapeRange::AlternativeText() const -{ - QVariant qax_result = property("AlternativeText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetAlternativeText(const QString& value){ setProperty("AlternativeText", QVariant(value)); } - -inline IDispatch* ShapeRange::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoAutoShapeType ShapeRange::AutoShapeType() const -{ - QVariant qax_result = property("AutoShapeType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutoShapeType*)qax_result.constData(); -} -inline void ShapeRange::SetAutoShapeType(Office::MsoAutoShapeType value){ setProperty("AutoShapeType", QVariant(value)); } - -inline Office::MsoBlackWhiteMode ShapeRange::BlackWhiteMode() const -{ - QVariant qax_result = property("BlackWhiteMode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBlackWhiteMode*)qax_result.constData(); -} -inline void ShapeRange::SetBlackWhiteMode(Office::MsoBlackWhiteMode value){ setProperty("BlackWhiteMode", QVariant(value)); } - -inline Office::CalloutFormat* ShapeRange::Callout() const -{ - Office::CalloutFormat* qax_pointer = 0; - qRegisterMetaType("CalloutFormat*", &qax_pointer); - qRegisterMetaType("CalloutFormat", qax_pointer); - QVariant qax_result = property("Callout"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CalloutFormat**)qax_result.constData(); -} - -inline Office::CanvasShapes* ShapeRange::CanvasItems() const -{ - Office::CanvasShapes* qax_pointer = 0; - qRegisterMetaType("CanvasShapes*", &qax_pointer); - qRegisterMetaType("CanvasShapes", qax_pointer); - QVariant qax_result = property("CanvasItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CanvasShapes**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Child() const -{ - QVariant qax_result = property("Child"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int ShapeRange::ConnectionSiteCount() const -{ - QVariant qax_result = property("ConnectionSiteCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Connector() const -{ - QVariant qax_result = property("Connector"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::ConnectorFormat* ShapeRange::ConnectorFormat() const -{ - Office::ConnectorFormat* qax_pointer = 0; - qRegisterMetaType("ConnectorFormat*", &qax_pointer); - qRegisterMetaType("ConnectorFormat", qax_pointer); - QVariant qax_result = property("ConnectorFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ConnectorFormat**)qax_result.constData(); -} - -inline int ShapeRange::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ShapeRange::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::IMsoDiagram* ShapeRange::Diagram() const -{ - Office::IMsoDiagram* qax_pointer = 0; - qRegisterMetaType("IMsoDiagram*", &qax_pointer); - qRegisterMetaType("IMsoDiagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::IMsoDiagram**)qax_result.constData(); -} - -inline Office::DiagramNode* ShapeRange::DiagramNode() const -{ - Office::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("DiagramNode"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNode**)qax_result.constData(); -} - -inline Office::FillFormat* ShapeRange::Fill() const -{ - Office::FillFormat* qax_pointer = 0; - qRegisterMetaType("FillFormat*", &qax_pointer); - qRegisterMetaType("FillFormat", qax_pointer); - QVariant qax_result = property("Fill"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FillFormat**)qax_result.constData(); -} - -inline Office::GroupShapes* ShapeRange::GroupItems() const -{ - Office::GroupShapes* qax_pointer = 0; - qRegisterMetaType("GroupShapes*", &qax_pointer); - qRegisterMetaType("GroupShapes", qax_pointer); - QVariant qax_result = property("GroupItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::GroupShapes**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasDiagram() const -{ - QVariant qax_result = property("HasDiagram"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasDiagramNode() const -{ - QVariant qax_result = property("HasDiagramNode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline double ShapeRange::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::MsoTriState ShapeRange::HorizontalFlip() const -{ - QVariant qax_result = property("HorizontalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int ShapeRange::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double ShapeRange::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline Office::LineFormat* ShapeRange::Line() const -{ - Office::LineFormat* qax_pointer = 0; - qRegisterMetaType("LineFormat*", &qax_pointer); - qRegisterMetaType("LineFormat", qax_pointer); - QVariant qax_result = property("Line"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::LineFormat**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::LockAspectRatio() const -{ - QVariant qax_result = property("LockAspectRatio"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShapeRange::SetLockAspectRatio(Office::MsoTriState value){ setProperty("LockAspectRatio", QVariant(value)); } - -inline QString ShapeRange::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline Office::ShapeNodes* ShapeRange::Nodes() const -{ - Office::ShapeNodes* qax_pointer = 0; - qRegisterMetaType("ShapeNodes*", &qax_pointer); - qRegisterMetaType("ShapeNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ShapeNodes**)qax_result.constData(); -} - -inline IDispatch* ShapeRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Shape* ShapeRange::ParentGroup() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("ParentGroup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline Office::PictureFormat* ShapeRange::PictureFormat() const -{ - Office::PictureFormat* qax_pointer = 0; - qRegisterMetaType("PictureFormat*", &qax_pointer); - qRegisterMetaType("PictureFormat", qax_pointer); - QVariant qax_result = property("PictureFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::PictureFormat**)qax_result.constData(); -} - -inline QString ShapeRange::RTF() const -{ - QVariant qax_result = property("RTF"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetRTF(const QString& value){ setProperty("RTF", QVariant(value)); } - -inline double ShapeRange::Rotation() const -{ - QVariant qax_result = property("Rotation"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetRotation(double value){ setProperty("Rotation", QVariant(value)); } - -inline Office::Script* ShapeRange::Script() const -{ - Office::Script* qax_pointer = 0; - qRegisterMetaType("Script*", &qax_pointer); - qRegisterMetaType("Script", qax_pointer); - QVariant qax_result = property("Script"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Script**)qax_result.constData(); -} - -inline Office::ShadowFormat* ShapeRange::Shadow() const -{ - Office::ShadowFormat* qax_pointer = 0; - qRegisterMetaType("ShadowFormat*", &qax_pointer); - qRegisterMetaType("ShadowFormat", qax_pointer); - QVariant qax_result = property("Shadow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ShadowFormat**)qax_result.constData(); -} - -inline Office::TextEffectFormat* ShapeRange::TextEffect() const -{ - Office::TextEffectFormat* qax_pointer = 0; - qRegisterMetaType("TextEffectFormat*", &qax_pointer); - qRegisterMetaType("TextEffectFormat", qax_pointer); - QVariant qax_result = property("TextEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::TextEffectFormat**)qax_result.constData(); -} - -inline Office::TextFrame* ShapeRange::TextFrame() const -{ - Office::TextFrame* qax_pointer = 0; - qRegisterMetaType("TextFrame*", &qax_pointer); - qRegisterMetaType("TextFrame", qax_pointer); - QVariant qax_result = property("TextFrame"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::TextFrame**)qax_result.constData(); -} - -inline Office::ThreeDFormat* ShapeRange::ThreeD() const -{ - Office::ThreeDFormat* qax_pointer = 0; - qRegisterMetaType("ThreeDFormat*", &qax_pointer); - qRegisterMetaType("ThreeDFormat", qax_pointer); - QVariant qax_result = property("ThreeD"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ThreeDFormat**)qax_result.constData(); -} - -inline double ShapeRange::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline Office::MsoShapeType ShapeRange::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShapeType*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::VerticalFlip() const -{ - QVariant qax_result = property("VerticalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline QVariant ShapeRange::Vertices() const -{ - QVariant qax_result = property("Vertices"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShapeRange::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double ShapeRange::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int ShapeRange::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* ShapeRange::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void ShapeRange::Align(Office::MsoAlignCmd AlignCmd, Office::MsoTriState RelativeTo) -{ - void *_a[] = {0, (void*)&AlignCmd, (void*)&RelativeTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShapeRange::Apply() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ShapeRange::CanvasCropBottom(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ShapeRange::CanvasCropLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ShapeRange::CanvasCropRight(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void ShapeRange::CanvasCropTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ShapeRange::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void ShapeRange::Distribute(Office::MsoDistributeCmd DistributeCmd, Office::MsoTriState RelativeTo) -{ - void *_a[] = {0, (void*)&DistributeCmd, (void*)&RelativeTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline Office::ShapeRange* ShapeRange::Duplicate() -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void ShapeRange::Flip(Office::MsoFlipCmd FlipCmd) -{ - void *_a[] = {0, (void*)&FlipCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline Office::Shape* ShapeRange::Group() -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void ShapeRange::IncrementLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void ShapeRange::IncrementRotation(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void ShapeRange::IncrementTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline Office::Shape* ShapeRange::Item(const QVariant& Index) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline void ShapeRange::PickUp() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline Office::Shape* ShapeRange::Regroup() -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline void ShapeRange::RerouteConnections() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void ShapeRange::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void ShapeRange::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void ShapeRange::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void ShapeRange::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void ShapeRange::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void ShapeRange::Select(const QVariant& Replace) -{ - void *_a[] = {0, (void*)&Replace}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline void ShapeRange::SetShapesDefaultProperties() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); -} - -inline Office::ShapeRange* ShapeRange::Ungroup() -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); - return qax_result; -} - -inline void ShapeRange::ZOrder(Office::MsoZOrderCmd ZOrderCmd) -{ - void *_a[] = {0, (void*)&ZOrderCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); -} - - -inline IDispatch* Shapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Shape* Shapes::Background() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline int Shapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Shapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::Shape* Shapes::Default() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Default"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline IDispatch* Shapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Shapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::Shape* Shapes::AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddCanvas(double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddCurve(const QVariant& SafeArrayOfPoints) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddDiagram(Office::MsoDiagramType Type, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddLine(double BeginX, double BeginY, double EndX, double EndY) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddPolyline(const QVariant& SafeArrayOfPoints) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&PresetTextEffect, (void*)&Text, (void*)&FontName, (void*)&FontSize, (void*)&FontBold, (void*)&FontItalic, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline Office::Shape* Shapes::AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline Office::FreeformBuilder* Shapes::BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1) -{ - Office::FreeformBuilder* qax_result = 0; - qRegisterMetaType("FreeformBuilder*", &qax_result); - qRegisterMetaType("FreeformBuilder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline Office::Shape* Shapes::Item(const QVariant& Index) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline Office::ShapeRange* Shapes::Range(const QVariant& Index) -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline void Shapes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - - -inline Office::MsoTextEffectAlignment TextEffectFormat::Alignment() const -{ - QVariant qax_result = property("Alignment"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextEffectAlignment*)qax_result.constData(); -} -inline void TextEffectFormat::SetAlignment(Office::MsoTextEffectAlignment value){ setProperty("Alignment", QVariant(value)); } - -inline IDispatch* TextEffectFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int TextEffectFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState TextEffectFormat::FontBold() const -{ - QVariant qax_result = property("FontBold"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontBold(Office::MsoTriState value){ setProperty("FontBold", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::FontItalic() const -{ - QVariant qax_result = property("FontItalic"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontItalic(Office::MsoTriState value){ setProperty("FontItalic", QVariant(value)); } - -inline QString TextEffectFormat::FontName() const -{ - QVariant qax_result = property("FontName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontName(const QString& value){ setProperty("FontName", QVariant(value)); } - -inline double TextEffectFormat::FontSize() const -{ - QVariant qax_result = property("FontSize"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontSize(double value){ setProperty("FontSize", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::KernedPairs() const -{ - QVariant qax_result = property("KernedPairs"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetKernedPairs(Office::MsoTriState value){ setProperty("KernedPairs", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::NormalizedHeight() const -{ - QVariant qax_result = property("NormalizedHeight"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetNormalizedHeight(Office::MsoTriState value){ setProperty("NormalizedHeight", QVariant(value)); } - -inline IDispatch* TextEffectFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPresetTextEffectShape TextEffectFormat::PresetShape() const -{ - QVariant qax_result = property("PresetShape"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTextEffectShape*)qax_result.constData(); -} -inline void TextEffectFormat::SetPresetShape(Office::MsoPresetTextEffectShape value){ setProperty("PresetShape", QVariant(value)); } - -inline Office::MsoPresetTextEffect TextEffectFormat::PresetTextEffect() const -{ - QVariant qax_result = property("PresetTextEffect"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTextEffect*)qax_result.constData(); -} -inline void TextEffectFormat::SetPresetTextEffect(Office::MsoPresetTextEffect value){ setProperty("PresetTextEffect", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::RotatedChars() const -{ - QVariant qax_result = property("RotatedChars"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetRotatedChars(Office::MsoTriState value){ setProperty("RotatedChars", QVariant(value)); } - -inline QString TextEffectFormat::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void TextEffectFormat::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline double TextEffectFormat::Tracking() const -{ - QVariant qax_result = property("Tracking"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextEffectFormat::SetTracking(double value){ setProperty("Tracking", QVariant(value)); } - -inline void TextEffectFormat::ToggleVerticalText() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline IDispatch* TextFrame::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int TextFrame::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double TextFrame::MarginBottom() const -{ - QVariant qax_result = property("MarginBottom"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginBottom(double value){ setProperty("MarginBottom", QVariant(value)); } - -inline double TextFrame::MarginLeft() const -{ - QVariant qax_result = property("MarginLeft"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginLeft(double value){ setProperty("MarginLeft", QVariant(value)); } - -inline double TextFrame::MarginRight() const -{ - QVariant qax_result = property("MarginRight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginRight(double value){ setProperty("MarginRight", QVariant(value)); } - -inline double TextFrame::MarginTop() const -{ - QVariant qax_result = property("MarginTop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginTop(double value){ setProperty("MarginTop", QVariant(value)); } - -inline Office::MsoTextOrientation TextFrame::Orientation() const -{ - QVariant qax_result = property("Orientation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextOrientation*)qax_result.constData(); -} -inline void TextFrame::SetOrientation(Office::MsoTextOrientation value){ setProperty("Orientation", QVariant(value)); } - -inline IDispatch* TextFrame::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline IDispatch* ThreeDFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ThreeDFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double ThreeDFormat::Depth() const -{ - QVariant qax_result = property("Depth"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetDepth(double value){ setProperty("Depth", QVariant(value)); } - -inline Office::ColorFormat* ThreeDFormat::ExtrusionColor() const -{ - Office::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ExtrusionColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ColorFormat**)qax_result.constData(); -} - -inline Office::MsoExtrusionColorType ThreeDFormat::ExtrusionColorType() const -{ - QVariant qax_result = property("ExtrusionColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoExtrusionColorType*)qax_result.constData(); -} -inline void ThreeDFormat::SetExtrusionColorType(Office::MsoExtrusionColorType value){ setProperty("ExtrusionColorType", QVariant(value)); } - -inline IDispatch* ThreeDFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState ThreeDFormat::Perspective() const -{ - QVariant qax_result = property("Perspective"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ThreeDFormat::SetPerspective(Office::MsoTriState value){ setProperty("Perspective", QVariant(value)); } - -inline Office::MsoPresetExtrusionDirection ThreeDFormat::PresetExtrusionDirection() const -{ - QVariant qax_result = property("PresetExtrusionDirection"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetExtrusionDirection*)qax_result.constData(); -} - -inline Office::MsoPresetLightingDirection ThreeDFormat::PresetLightingDirection() const -{ - QVariant qax_result = property("PresetLightingDirection"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetLightingDirection*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetLightingDirection(Office::MsoPresetLightingDirection value){ setProperty("PresetLightingDirection", QVariant(value)); } - -inline Office::MsoPresetLightingSoftness ThreeDFormat::PresetLightingSoftness() const -{ - QVariant qax_result = property("PresetLightingSoftness"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetLightingSoftness*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetLightingSoftness(Office::MsoPresetLightingSoftness value){ setProperty("PresetLightingSoftness", QVariant(value)); } - -inline Office::MsoPresetMaterial ThreeDFormat::PresetMaterial() const -{ - QVariant qax_result = property("PresetMaterial"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetMaterial*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetMaterial(Office::MsoPresetMaterial value){ setProperty("PresetMaterial", QVariant(value)); } - -inline Office::MsoPresetThreeDFormat ThreeDFormat::PresetThreeDFormat() const -{ - QVariant qax_result = property("PresetThreeDFormat"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetThreeDFormat*)qax_result.constData(); -} - -inline double ThreeDFormat::RotationX() const -{ - QVariant qax_result = property("RotationX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetRotationX(double value){ setProperty("RotationX", QVariant(value)); } - -inline double ThreeDFormat::RotationY() const -{ - QVariant qax_result = property("RotationY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetRotationY(double value){ setProperty("RotationY", QVariant(value)); } - -inline Office::MsoTriState ThreeDFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ThreeDFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void ThreeDFormat::IncrementRotationX(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ThreeDFormat::IncrementRotationY(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ThreeDFormat::ResetRotation() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ThreeDFormat::SetExtrusionDirection(Office::MsoPresetExtrusionDirection PresetExtrusionDirection) -{ - void *_a[] = {0, (void*)&PresetExtrusionDirection}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ThreeDFormat::SetThreeDFormat(Office::MsoPresetThreeDFormat PresetThreeDFormat) -{ - void *_a[] = {0, (void*)&PresetThreeDFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline void IMsoDispCagNotifySink::InsertClip(IUnknown* pClipMoniker, IUnknown* pItemMoniker) -{ - void *_a[] = {0, (void*)&pClipMoniker, (void*)&pItemMoniker}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void IMsoDispCagNotifySink::WindowIsClosing() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline Office::MsoAnimationType Balloon::Animation() const -{ - QVariant qax_result = property("Animation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAnimationType*)qax_result.constData(); -} -inline void Balloon::SetAnimation(Office::MsoAnimationType value){ setProperty("Animation", QVariant(value)); } - -inline IDispatch* Balloon::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoBalloonType Balloon::BalloonType() const -{ - QVariant qax_result = property("BalloonType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBalloonType*)qax_result.constData(); -} -inline void Balloon::SetBalloonType(Office::MsoBalloonType value){ setProperty("BalloonType", QVariant(value)); } - -inline Office::MsoButtonSetType Balloon::Button() const -{ - QVariant qax_result = property("Button"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoButtonSetType*)qax_result.constData(); -} -inline void Balloon::SetButton(Office::MsoButtonSetType value){ setProperty("Button", QVariant(value)); } - -inline QString Balloon::Callback() const -{ - QVariant qax_result = property("Callback"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Balloon::SetCallback(const QString& value){ setProperty("Callback", QVariant(value)); } - -inline IDispatch* Balloon::Checkboxes() const -{ - QVariant qax_result = property("Checkboxes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Balloon::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Balloon::Heading() const -{ - QVariant qax_result = property("Heading"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Balloon::SetHeading(const QString& value){ setProperty("Heading", QVariant(value)); } - -inline Office::MsoIconType Balloon::Icon() const -{ - QVariant qax_result = property("Icon"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoIconType*)qax_result.constData(); -} -inline void Balloon::SetIcon(Office::MsoIconType value){ setProperty("Icon", QVariant(value)); } - -inline IDispatch* Balloon::Labels() const -{ - QVariant qax_result = property("Labels"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoModeType Balloon::Mode() const -{ - QVariant qax_result = property("Mode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoModeType*)qax_result.constData(); -} -inline void Balloon::SetMode(Office::MsoModeType value){ setProperty("Mode", QVariant(value)); } - -inline QString Balloon::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* Balloon::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Balloon::Private() const -{ - QVariant qax_result = property("Private"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void Balloon::SetPrivate(int value){ setProperty("Private", QVariant(value)); } - -inline QString Balloon::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Balloon::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline void Balloon::Close() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Balloon::SetAvoidRectangle(int Left, int Top, int Right, int Bottom) -{ - void *_a[] = {0, (void*)&Left, (void*)&Top, (void*)&Right, (void*)&Bottom}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline MsoBalloonButtonType Balloon::Show() -{ - MsoBalloonButtonType qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - - -inline IDispatch* BalloonCheckboxes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int BalloonCheckboxes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void BalloonCheckboxes::SetCount(int value){ setProperty("Count", QVariant(value)); } - -inline int BalloonCheckboxes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString BalloonCheckboxes::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* BalloonCheckboxes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* BalloonCheckboxes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline IDispatch* BalloonCheckboxes::Item(int Index) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* BalloonCheckbox::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool BalloonCheckbox::Checked() const -{ - QVariant qax_result = property("Checked"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void BalloonCheckbox::SetChecked(bool value){ setProperty("Checked", QVariant(value)); } - -inline int BalloonCheckbox::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString BalloonCheckbox::Item() const -{ - QVariant qax_result = property("Item"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString BalloonCheckbox::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* BalloonCheckbox::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString BalloonCheckbox::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void BalloonCheckbox::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - - -inline IDispatch* BalloonLabels::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int BalloonLabels::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void BalloonLabels::SetCount(int value){ setProperty("Count", QVariant(value)); } - -inline int BalloonLabels::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString BalloonLabels::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* BalloonLabels::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* BalloonLabels::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline IDispatch* BalloonLabels::Item(int Index) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* BalloonLabel::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int BalloonLabel::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString BalloonLabel::Item() const -{ - QVariant qax_result = property("Item"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString BalloonLabel::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* BalloonLabel::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString BalloonLabel::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void BalloonLabel::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - - -inline IDispatch* AnswerWizardFiles::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int AnswerWizardFiles::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int AnswerWizardFiles::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* AnswerWizardFiles::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void AnswerWizardFiles::Add(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void AnswerWizardFiles::Delete(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline QString AnswerWizardFiles::Item(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline IDispatch* AnswerWizard::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int AnswerWizard::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::AnswerWizardFiles* AnswerWizard::Files() const -{ - Office::AnswerWizardFiles* qax_pointer = 0; - qRegisterMetaType("AnswerWizardFiles*", &qax_pointer); - qRegisterMetaType("AnswerWizardFiles", qax_pointer); - QVariant qax_result = property("Files"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::AnswerWizardFiles**)qax_result.constData(); -} - -inline IDispatch* AnswerWizard::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void AnswerWizard::ClearFileList() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void AnswerWizard::ResetFileList() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline Office::MsoAnimationType Assistant::Animation() const -{ - QVariant qax_result = property("Animation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAnimationType*)qax_result.constData(); -} -inline void Assistant::SetAnimation(Office::MsoAnimationType value){ setProperty("Animation", QVariant(value)); } - -inline IDispatch* Assistant::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool Assistant::AssistWithAlerts() const -{ - QVariant qax_result = property("AssistWithAlerts"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetAssistWithAlerts(bool value){ setProperty("AssistWithAlerts", QVariant(value)); } - -inline bool Assistant::AssistWithHelp() const -{ - QVariant qax_result = property("AssistWithHelp"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetAssistWithHelp(bool value){ setProperty("AssistWithHelp", QVariant(value)); } - -inline bool Assistant::AssistWithWizards() const -{ - QVariant qax_result = property("AssistWithWizards"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetAssistWithWizards(bool value){ setProperty("AssistWithWizards", QVariant(value)); } - -inline Office::MsoBalloonErrorType Assistant::BalloonError() const -{ - QVariant qax_result = property("BalloonError"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBalloonErrorType*)qax_result.constData(); -} - -inline int Assistant::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool Assistant::FeatureTips() const -{ - QVariant qax_result = property("FeatureTips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetFeatureTips(bool value){ setProperty("FeatureTips", QVariant(value)); } - -inline QString Assistant::FileName() const -{ - QVariant qax_result = property("FileName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Assistant::SetFileName(const QString& value){ setProperty("FileName", QVariant(value)); } - -inline bool Assistant::GuessHelp() const -{ - QVariant qax_result = property("GuessHelp"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetGuessHelp(bool value){ setProperty("GuessHelp", QVariant(value)); } - -inline bool Assistant::HighPriorityTips() const -{ - QVariant qax_result = property("HighPriorityTips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetHighPriorityTips(bool value){ setProperty("HighPriorityTips", QVariant(value)); } - -inline QString Assistant::Item() const -{ - QVariant qax_result = property("Item"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline bool Assistant::KeyboardShortcutTips() const -{ - QVariant qax_result = property("KeyboardShortcutTips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetKeyboardShortcutTips(bool value){ setProperty("KeyboardShortcutTips", QVariant(value)); } - -inline int Assistant::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void Assistant::SetLeft(int value){ setProperty("Left", QVariant(value)); } - -inline bool Assistant::MouseTips() const -{ - QVariant qax_result = property("MouseTips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetMouseTips(bool value){ setProperty("MouseTips", QVariant(value)); } - -inline bool Assistant::MoveWhenInTheWay() const -{ - QVariant qax_result = property("MoveWhenInTheWay"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetMoveWhenInTheWay(bool value){ setProperty("MoveWhenInTheWay", QVariant(value)); } - -inline QString Assistant::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::Balloon* Assistant::NewBalloon() const -{ - Office::Balloon* qax_pointer = 0; - qRegisterMetaType("Balloon*", &qax_pointer); - qRegisterMetaType("Balloon", qax_pointer); - QVariant qax_result = property("NewBalloon"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Balloon**)qax_result.constData(); -} - -inline bool Assistant::On() const -{ - QVariant qax_result = property("On"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetOn(bool value){ setProperty("On", QVariant(value)); } - -inline IDispatch* Assistant::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool Assistant::Reduced() const -{ - QVariant qax_result = property("Reduced"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetReduced(bool value){ setProperty("Reduced", QVariant(value)); } - -inline bool Assistant::SearchWhenProgramming() const -{ - QVariant qax_result = property("SearchWhenProgramming"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetSearchWhenProgramming(bool value){ setProperty("SearchWhenProgramming", QVariant(value)); } - -inline bool Assistant::Sounds() const -{ - QVariant qax_result = property("Sounds"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetSounds(bool value){ setProperty("Sounds", QVariant(value)); } - -inline bool Assistant::TipOfDay() const -{ - QVariant qax_result = property("TipOfDay"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetTipOfDay(bool value){ setProperty("TipOfDay", QVariant(value)); } - -inline int Assistant::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void Assistant::SetTop(int value){ setProperty("Top", QVariant(value)); } - -inline bool Assistant::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Assistant::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline void Assistant::ActivateWizard(int WizardID, Office::MsoWizardActType act) -{ - void *_a[] = {0, (void*)&WizardID, (void*)&act}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Assistant::ActivateWizard(int WizardID, Office::MsoWizardActType act, const QVariant& Animation) -{ - void *_a[] = {0, (void*)&WizardID, (void*)&act, (void*)&Animation}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline int Assistant::DoAlert(const QString& bstrAlertTitle, const QString& bstrAlertText, Office::MsoAlertButtonType alb, Office::MsoAlertIconType alc, Office::MsoAlertDefaultType ald, Office::MsoAlertCancelType alq, bool varfSysAlert) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrAlertTitle, (void*)&bstrAlertText, (void*)&alb, (void*)&alc, (void*)&ald, (void*)&alq, (void*)&varfSysAlert}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void Assistant::EndWizard(int WizardID, bool varfSuccess) -{ - void *_a[] = {0, (void*)&WizardID, (void*)&varfSuccess}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void Assistant::EndWizard(int WizardID, bool varfSuccess, const QVariant& Animation) -{ - void *_a[] = {0, (void*)&WizardID, (void*)&varfSuccess, (void*)&Animation}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void Assistant::Help() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void Assistant::Move(int xLeft, int yTop) -{ - void *_a[] = {0, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void Assistant::ResetTips() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation, (void*)&CustomTeaser}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation, (void*)&CustomTeaser, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation, (void*)&CustomTeaser, (void*)&Top, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left, const QVariant& Bottom) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation, (void*)&CustomTeaser, (void*)&Top, (void*)&Left, (void*)&Bottom}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline int Assistant::StartWizard(bool On, const QString& Callback, int PrivateX, const QVariant& Animation, const QVariant& CustomTeaser, const QVariant& Top, const QVariant& Left, const QVariant& Bottom, const QVariant& Right) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&On, (void*)&Callback, (void*)&PrivateX, (void*)&Animation, (void*)&CustomTeaser, (void*)&Top, (void*)&Left, (void*)&Bottom, (void*)&Right}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - - -inline int IFoundFiles::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* IFoundFiles::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline QString IFoundFiles::Item(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline QString IFind::Author() const -{ - QVariant qax_result = property("Author"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetAuthor(const QString& value){ setProperty("Author", QVariant(value)); } - -inline QVariant IFind::DateCreatedFrom() const -{ - QVariant qax_result = property("DateCreatedFrom"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IFind::SetDateCreatedFrom(const QVariant& value){ setProperty("DateCreatedFrom", QVariant(value)); } - -inline QVariant IFind::DateCreatedTo() const -{ - QVariant qax_result = property("DateCreatedTo"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IFind::SetDateCreatedTo(const QVariant& value){ setProperty("DateCreatedTo", QVariant(value)); } - -inline QVariant IFind::DateSavedFrom() const -{ - QVariant qax_result = property("DateSavedFrom"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IFind::SetDateSavedFrom(const QVariant& value){ setProperty("DateSavedFrom", QVariant(value)); } - -inline QVariant IFind::DateSavedTo() const -{ - QVariant qax_result = property("DateSavedTo"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void IFind::SetDateSavedTo(const QVariant& value){ setProperty("DateSavedTo", QVariant(value)); } - -inline int IFind::FileType() const -{ - QVariant qax_result = property("FileType"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void IFind::SetFileType(int value){ setProperty("FileType", QVariant(value)); } - -inline QString IFind::Keywords() const -{ - QVariant qax_result = property("Keywords"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetKeywords(const QString& value){ setProperty("Keywords", QVariant(value)); } - -inline Office::MsoFileFindListBy IFind::ListBy() const -{ - QVariant qax_result = property("ListBy"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileFindListBy*)qax_result.constData(); -} -inline void IFind::SetListBy(Office::MsoFileFindListBy value){ setProperty("ListBy", QVariant(value)); } - -inline bool IFind::MatchCase() const -{ - QVariant qax_result = property("MatchCase"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void IFind::SetMatchCase(bool value){ setProperty("MatchCase", QVariant(value)); } - -inline QString IFind::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline Office::MsoFileFindOptions IFind::Options() const -{ - QVariant qax_result = property("Options"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileFindOptions*)qax_result.constData(); -} -inline void IFind::SetOptions(Office::MsoFileFindOptions value){ setProperty("Options", QVariant(value)); } - -inline bool IFind::PatternMatch() const -{ - QVariant qax_result = property("PatternMatch"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void IFind::SetPatternMatch(bool value){ setProperty("PatternMatch", QVariant(value)); } - -inline Office::IFoundFiles* IFind::Results() const -{ - Office::IFoundFiles* qax_pointer = 0; - qRegisterMetaType("IFoundFiles*", &qax_pointer); - qRegisterMetaType("IFoundFiles", qax_pointer); - QVariant qax_result = property("Results"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::IFoundFiles**)qax_result.constData(); -} - -inline QString IFind::SavedBy() const -{ - QVariant qax_result = property("SavedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetSavedBy(const QString& value){ setProperty("SavedBy", QVariant(value)); } - -inline QString IFind::SearchPath() const -{ - QVariant qax_result = property("SearchPath"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetSearchPath(const QString& value){ setProperty("SearchPath", QVariant(value)); } - -inline int IFind::SelectedFile() const -{ - QVariant qax_result = property("SelectedFile"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void IFind::SetSelectedFile(int value){ setProperty("SelectedFile", QVariant(value)); } - -inline Office::MsoFileFindSortBy IFind::SortBy() const -{ - QVariant qax_result = property("SortBy"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileFindSortBy*)qax_result.constData(); -} -inline void IFind::SetSortBy(Office::MsoFileFindSortBy value){ setProperty("SortBy", QVariant(value)); } - -inline bool IFind::SubDir() const -{ - QVariant qax_result = property("SubDir"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void IFind::SetSubDir(bool value){ setProperty("SubDir", QVariant(value)); } - -inline QString IFind::Subject() const -{ - QVariant qax_result = property("Subject"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetSubject(const QString& value){ setProperty("Subject", QVariant(value)); } - -inline QString IFind::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline QString IFind::Title() const -{ - QVariant qax_result = property("Title"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IFind::SetTitle(const QString& value){ setProperty("Title", QVariant(value)); } - -inline Office::MsoFileFindView IFind::View() const -{ - QVariant qax_result = property("View"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileFindView*)qax_result.constData(); -} -inline void IFind::SetView(Office::MsoFileFindView value){ setProperty("View", QVariant(value)); } - -inline void IFind::Delete(const QString& bstrQueryName) -{ - void *_a[] = {0, (void*)&bstrQueryName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void IFind::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void IFind::Load(const QString& bstrQueryName) -{ - void *_a[] = {0, (void*)&bstrQueryName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void IFind::Save(const QString& bstrQueryName) -{ - void *_a[] = {0, (void*)&bstrQueryName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline int IFind::Show() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); - return qax_result; -} - - -inline IDispatch* FoundFiles::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FoundFiles::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int FoundFiles::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* FoundFiles::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline QString FoundFiles::Item(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* PropertyTest::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoCondition PropertyTest::Condition() const -{ - QVariant qax_result = property("Condition"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCondition*)qax_result.constData(); -} - -inline Office::MsoConnector PropertyTest::Connector() const -{ - QVariant qax_result = property("Connector"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoConnector*)qax_result.constData(); -} - -inline int PropertyTest::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString PropertyTest::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant PropertyTest::SecondValue() const -{ - QVariant qax_result = property("SecondValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant PropertyTest::Value() const -{ - QVariant qax_result = property("Value"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - - -inline IDispatch* PropertyTests::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int PropertyTests::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int PropertyTests::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* PropertyTests::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void PropertyTests::Add(const QString& Name, Office::MsoCondition Condition) -{ - void *_a[] = {0, (void*)&Name, (void*)&Condition}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void PropertyTests::Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value) -{ - void *_a[] = {0, (void*)&Name, (void*)&Condition, (void*)&Value}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void PropertyTests::Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value, const QVariant& SecondValue) -{ - void *_a[] = {0, (void*)&Name, (void*)&Condition, (void*)&Value, (void*)&SecondValue}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void PropertyTests::Add(const QString& Name, Office::MsoCondition Condition, const QVariant& Value, const QVariant& SecondValue, Office::MsoConnector Connector) -{ - void *_a[] = {0, (void*)&Name, (void*)&Condition, (void*)&Value, (void*)&SecondValue, (void*)&Connector}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline Office::PropertyTest* PropertyTests::Item(int Index) -{ - Office::PropertyTest* qax_result = 0; - qRegisterMetaType("PropertyTest*", &qax_result); - qRegisterMetaType("PropertyTest", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void PropertyTests::Remove(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - - -inline IDispatch* FileSearch::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FileSearch::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString FileSearch::FileName() const -{ - QVariant qax_result = property("FileName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileSearch::SetFileName(const QString& value){ setProperty("FileName", QVariant(value)); } - -inline Office::MsoFileType FileSearch::FileType() const -{ - QVariant qax_result = property("FileType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileType*)qax_result.constData(); -} -inline void FileSearch::SetFileType(Office::MsoFileType value){ setProperty("FileType", QVariant(value)); } - -inline Office::FileTypes* FileSearch::FileTypes() const -{ - Office::FileTypes* qax_pointer = 0; - qRegisterMetaType("FileTypes*", &qax_pointer); - qRegisterMetaType("FileTypes", qax_pointer); - QVariant qax_result = property("FileTypes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FileTypes**)qax_result.constData(); -} - -inline Office::FoundFiles* FileSearch::FoundFiles() const -{ - Office::FoundFiles* qax_pointer = 0; - qRegisterMetaType("FoundFiles*", &qax_pointer); - qRegisterMetaType("FoundFiles", qax_pointer); - QVariant qax_result = property("FoundFiles"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FoundFiles**)qax_result.constData(); -} - -inline Office::MsoLastModified FileSearch::LastModified() const -{ - QVariant qax_result = property("LastModified"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLastModified*)qax_result.constData(); -} -inline void FileSearch::SetLastModified(Office::MsoLastModified value){ setProperty("LastModified", QVariant(value)); } - -inline QString FileSearch::LookIn() const -{ - QVariant qax_result = property("LookIn"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileSearch::SetLookIn(const QString& value){ setProperty("LookIn", QVariant(value)); } - -inline bool FileSearch::MatchAllWordForms() const -{ - QVariant qax_result = property("MatchAllWordForms"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void FileSearch::SetMatchAllWordForms(bool value){ setProperty("MatchAllWordForms", QVariant(value)); } - -inline bool FileSearch::MatchTextExactly() const -{ - QVariant qax_result = property("MatchTextExactly"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void FileSearch::SetMatchTextExactly(bool value){ setProperty("MatchTextExactly", QVariant(value)); } - -inline Office::PropertyTests* FileSearch::PropertyTests() const -{ - Office::PropertyTests* qax_pointer = 0; - qRegisterMetaType("PropertyTests*", &qax_pointer); - qRegisterMetaType("PropertyTests", qax_pointer); - QVariant qax_result = property("PropertyTests"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::PropertyTests**)qax_result.constData(); -} - -inline Office::SearchFolders* FileSearch::SearchFolders() const -{ - Office::SearchFolders* qax_pointer = 0; - qRegisterMetaType("SearchFolders*", &qax_pointer); - qRegisterMetaType("SearchFolders", qax_pointer); - QVariant qax_result = property("SearchFolders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SearchFolders**)qax_result.constData(); -} - -inline Office::SearchScopes* FileSearch::SearchScopes() const -{ - Office::SearchScopes* qax_pointer = 0; - qRegisterMetaType("SearchScopes*", &qax_pointer); - qRegisterMetaType("SearchScopes", qax_pointer); - QVariant qax_result = property("SearchScopes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SearchScopes**)qax_result.constData(); -} - -inline bool FileSearch::SearchSubFolders() const -{ - QVariant qax_result = property("SearchSubFolders"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void FileSearch::SetSearchSubFolders(bool value){ setProperty("SearchSubFolders", QVariant(value)); } - -inline QString FileSearch::TextOrProperty() const -{ - QVariant qax_result = property("TextOrProperty"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileSearch::SetTextOrProperty(const QString& value){ setProperty("TextOrProperty", QVariant(value)); } - -inline int FileSearch::Execute() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline int FileSearch::Execute(Office::MsoSortBy SortBy) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&SortBy}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline int FileSearch::Execute(Office::MsoSortBy SortBy, Office::MsoSortOrder SortOrder) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&SortBy, (void*)&SortOrder}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline int FileSearch::Execute(Office::MsoSortBy SortBy, Office::MsoSortOrder SortOrder, bool AlwaysAccurate) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&SortBy, (void*)&SortOrder, (void*)&AlwaysAccurate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline void FileSearch::NewSearch() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void FileSearch::RefreshScopes() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - - -inline IDispatch* COMAddIn::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool COMAddIn::Connect() const -{ - QVariant qax_result = property("Connect"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void COMAddIn::SetConnect(bool value){ setProperty("Connect", QVariant(value)); } - -inline int COMAddIn::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString COMAddIn::Description() const -{ - QVariant qax_result = property("Description"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void COMAddIn::SetDescription(const QString& value){ setProperty("Description", QVariant(value)); } - -inline QString COMAddIn::Guid() const -{ - QVariant qax_result = property("Guid"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* COMAddIn::Object() const -{ - QVariant qax_result = property("Object"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} -inline void COMAddIn::SetObject(IDispatch* value){ - int typeId = qRegisterMetaType("IDispatch*", &value); - setProperty("Object", QVariant(typeId, &value)); -} - -inline IDispatch* COMAddIn::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString COMAddIn::ProgId() const -{ - QVariant qax_result = property("ProgId"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - - -inline IDispatch* COMAddIns::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int COMAddIns::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int COMAddIns::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* COMAddIns::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* COMAddIns::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::COMAddIn* COMAddIns::Item(QVariant& Index) -{ - Office::COMAddIn* qax_result = 0; - qRegisterMetaType("COMAddIn*", &qax_result); - qRegisterMetaType("COMAddIn", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void COMAddIns::SetAppModal(bool varfModal) -{ - void *_a[] = {0, (void*)&varfModal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void COMAddIns::Update() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline IDispatch* LanguageSettings::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int LanguageSettings::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* LanguageSettings::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int LanguageSettings::LanguageID(Office::MsoAppLanguageID Id) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline bool LanguageSettings::LanguagePreferredForEditing(Office::MsoLanguageID lid) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&lid}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline void ICommandBarsEvents::OnUpdate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline Office::CommandBarControl* CommandBars::ActionControl() const -{ - Office::CommandBarControl* qax_pointer = 0; - qRegisterMetaType("CommandBarControl*", &qax_pointer); - qRegisterMetaType("CommandBarControl", qax_pointer); - QVariant qax_result = property("ActionControl"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBarControl**)qax_result.constData(); -} - -inline Office::CommandBar* CommandBars::ActiveMenuBar() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("ActiveMenuBar"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline bool CommandBars::AdaptiveMenus() const -{ - QVariant qax_result = property("AdaptiveMenus"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetAdaptiveMenus(bool value){ setProperty("AdaptiveMenus", QVariant(value)); } - -inline IDispatch* CommandBars::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int CommandBars::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBars::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBars::DisableAskAQuestionDropdown() const -{ - QVariant qax_result = property("DisableAskAQuestionDropdown"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetDisableAskAQuestionDropdown(bool value){ setProperty("DisableAskAQuestionDropdown", QVariant(value)); } - -inline bool CommandBars::DisableCustomize() const -{ - QVariant qax_result = property("DisableCustomize"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetDisableCustomize(bool value){ setProperty("DisableCustomize", QVariant(value)); } - -inline bool CommandBars::DisplayFonts() const -{ - QVariant qax_result = property("DisplayFonts"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetDisplayFonts(bool value){ setProperty("DisplayFonts", QVariant(value)); } - -inline bool CommandBars::DisplayKeysInTooltips() const -{ - QVariant qax_result = property("DisplayKeysInTooltips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetDisplayKeysInTooltips(bool value){ setProperty("DisplayKeysInTooltips", QVariant(value)); } - -inline bool CommandBars::DisplayTooltips() const -{ - QVariant qax_result = property("DisplayTooltips"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetDisplayTooltips(bool value){ setProperty("DisplayTooltips", QVariant(value)); } - -inline bool CommandBars::LargeButtons() const -{ - QVariant qax_result = property("LargeButtons"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBars::SetLargeButtons(bool value){ setProperty("LargeButtons", QVariant(value)); } - -inline Office::MsoMenuAnimation CommandBars::MenuAnimationStyle() const -{ - QVariant qax_result = property("MenuAnimationStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoMenuAnimation*)qax_result.constData(); -} -inline void CommandBars::SetMenuAnimationStyle(Office::MsoMenuAnimation value){ setProperty("MenuAnimationStyle", QVariant(value)); } - -inline IDispatch* CommandBars::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* CommandBars::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::CommandBar* CommandBars::Add() -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::Add(const QVariant& Name) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::Add(const QVariant& Name, const QVariant& Position) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position, (void*)&MenuBar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::Add(const QVariant& Name, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&Position, (void*)&MenuBar, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx() -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx(const QVariant& TbidOrName) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::AddEx(const QVariant& TbidOrName, const QVariant& Position, const QVariant& MenuBar, const QVariant& Temporary, const QVariant& TbtrProtection) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TbidOrName, (void*)&Position, (void*)&MenuBar, (void*)&Temporary, (void*)&TbtrProtection}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBars::FindControl() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBars::FindControl(const QVariant& Type) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBars::FindControl(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBars::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBars::FindControl(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); - return qax_result; -} - -inline Office::CommandBarControls* CommandBars::FindControls() -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline Office::CommandBarControls* CommandBars::FindControls(const QVariant& Type) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); - return qax_result; -} - -inline Office::CommandBarControls* CommandBars::FindControls(const QVariant& Type, const QVariant& Id) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); - return qax_result; -} - -inline Office::CommandBarControls* CommandBars::FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); - return qax_result; -} - -inline Office::CommandBarControls* CommandBars::FindControls(const QVariant& Type, const QVariant& Id, const QVariant& Tag, const QVariant& Visible) -{ - Office::CommandBarControls* qax_result = 0; - qRegisterMetaType("CommandBarControls*", &qax_result); - qRegisterMetaType("CommandBarControls", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Id, (void*)&Tag, (void*)&Visible}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); - return qax_result; -} - -inline int CommandBars::IdsString(int ids, QString& pbstrName) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&ids, (void*)&pbstrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); - return qax_result; -} - -inline Office::CommandBar* CommandBars::Item(const QVariant& Index) -{ - Office::CommandBar* qax_result = 0; - qRegisterMetaType("CommandBar*", &qax_result); - qRegisterMetaType("CommandBar", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); - return qax_result; -} - -inline void CommandBars::ReleaseFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); -} - -inline int CommandBars::TmcGetName(int tmc, QString& pbstrName) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&tmc, (void*)&pbstrName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); - return qax_result; -} - - -inline void ICommandBarComboBoxEvents::Change(Office::CommandBarComboBox* Ctrl) -{ - void *_a[] = {0, (void*)&Ctrl}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* CommandBarComboBox::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool CommandBarComboBox::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarComboBox::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool CommandBarComboBox::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString CommandBarComboBox::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* CommandBarComboBox::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int CommandBarComboBox::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarComboBox::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline int CommandBarComboBox::DropDownLines() const -{ - QVariant qax_result = property("DropDownLines"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetDropDownLines(int value){ setProperty("DropDownLines", QVariant(value)); } - -inline int CommandBarComboBox::DropDownWidth() const -{ - QVariant qax_result = property("DropDownWidth"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetDropDownWidth(int value){ setProperty("DropDownWidth", QVariant(value)); } - -inline bool CommandBarComboBox::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarComboBox::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int CommandBarComboBox::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int CommandBarComboBox::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString CommandBarComboBox::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline int CommandBarComboBox::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarComboBox::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarComboBox::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBarComboBox::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int CommandBarComboBox::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarComboBox::ListCount() const -{ - QVariant qax_result = property("ListCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarComboBox::ListHeaderCount() const -{ - QVariant qax_result = property("ListHeaderCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetListHeaderCount(int value){ setProperty("ListHeaderCount", QVariant(value)); } - -inline int CommandBarComboBox::ListIndex() const -{ - QVariant qax_result = property("ListIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetListIndex(int value){ setProperty("ListIndex", QVariant(value)); } - -inline Office::MsoControlOLEUsage CommandBarComboBox::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void CommandBarComboBox::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString CommandBarComboBox::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString CommandBarComboBox::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* CommandBarComboBox::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline int CommandBarComboBox::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline Office::MsoComboStyle CommandBarComboBox::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoComboStyle*)qax_result.constData(); -} -inline void CommandBarComboBox::SetStyle(Office::MsoComboStyle value){ setProperty("Style", QVariant(value)); } - -inline QString CommandBarComboBox::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString CommandBarComboBox::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline QString CommandBarComboBox::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarComboBox::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int CommandBarComboBox::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType CommandBarComboBox::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool CommandBarComboBox::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarComboBox::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int CommandBarComboBox::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarComboBox::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int CommandBarComboBox::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarComboBox::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarComboBox::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString CommandBarComboBox::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarComboBox::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarComboBox::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* CommandBarComboBox::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarComboBox::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarComboBox::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline void CommandBarComboBox::AddItem(const QString& Text) -{ - void *_a[] = {0, (void*)&Text}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void CommandBarComboBox::AddItem(const QString& Text, const QVariant& Index) -{ - void *_a[] = {0, (void*)&Text, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void CommandBarComboBox::Clear() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline Office::CommandBarControl* CommandBarComboBox::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarComboBox::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarComboBox::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline void CommandBarComboBox::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void CommandBarComboBox::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void CommandBarComboBox::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline QString CommandBarComboBox::List(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarComboBox::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarComboBox::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarComboBox::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline void CommandBarComboBox::RemoveItem(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void CommandBarComboBox::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void CommandBarComboBox::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline void CommandBarComboBox::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void CommandBarComboBox::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void CommandBarComboBox::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void CommandBarComboBox::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); -} - -inline void CommandBarComboBox::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline void CommandBarComboBox::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline void CommandBarComboBox::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); -} - -inline int CommandBarComboBox::SetList(int Index, const QString& rhs) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&rhs}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); - return qax_result; -} - -inline IDispatch* CommandBarComboBox::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline void CommandBarComboBox::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 65, _a); -} - -inline void CommandBarComboBox::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 66, _a); -} - -inline int CommandBarComboBox::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 69, _a); - return qax_result; -} - -inline int CommandBarComboBox::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 70, _a); - return qax_result; -} - -inline QVariant CommandBarComboBox::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 71, _a); - return qax_result; -} - -inline void CommandBarComboBox::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 74, _a); -} - -inline void CommandBarComboBox::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 75, _a); -} - -inline QVariant CommandBarComboBox::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 78, _a); - return qax_result; -} - -inline QVariant CommandBarComboBox::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 79, _a); - return qax_result; -} - -inline void CommandBarComboBox::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 82, _a); -} - -inline void CommandBarComboBox::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 83, _a); -} - - -inline void ICommandBarButtonEvents::Click(Office::CommandBarButton* Ctrl, bool& CancelDefault) -{ - void *_a[] = {0, (void*)&Ctrl, (void*)&CancelDefault}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* CommandBarButton::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool CommandBarButton::BeginGroup() const -{ - QVariant qax_result = property("BeginGroup"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarButton::SetBeginGroup(bool value){ setProperty("BeginGroup", QVariant(value)); } - -inline bool CommandBarButton::BuiltIn() const -{ - QVariant qax_result = property("BuiltIn"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline bool CommandBarButton::BuiltInFace() const -{ - QVariant qax_result = property("BuiltInFace"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarButton::SetBuiltInFace(bool value){ setProperty("BuiltInFace", QVariant(value)); } - -inline QString CommandBarButton::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline IDispatch* CommandBarButton::Control() const -{ - QVariant qax_result = property("Control"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int CommandBarButton::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarButton::DescriptionText() const -{ - QVariant qax_result = property("DescriptionText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetDescriptionText(const QString& value){ setProperty("DescriptionText", QVariant(value)); } - -inline bool CommandBarButton::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarButton::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline int CommandBarButton::FaceId() const -{ - QVariant qax_result = property("FaceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarButton::SetFaceId(int value){ setProperty("FaceId", QVariant(value)); } - -inline int CommandBarButton::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarButton::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline int CommandBarButton::HelpContextId() const -{ - QVariant qax_result = property("HelpContextId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarButton::SetHelpContextId(int value){ setProperty("HelpContextId", QVariant(value)); } - -inline QString CommandBarButton::HelpFile() const -{ - QVariant qax_result = property("HelpFile"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetHelpFile(const QString& value){ setProperty("HelpFile", QVariant(value)); } - -inline Office::MsoCommandBarButtonHyperlinkType CommandBarButton::HyperlinkType() const -{ - QVariant qax_result = property("HyperlinkType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCommandBarButtonHyperlinkType*)qax_result.constData(); -} -inline void CommandBarButton::SetHyperlinkType(Office::MsoCommandBarButtonHyperlinkType value){ setProperty("HyperlinkType", QVariant(value)); } - -inline int CommandBarButton::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarButton::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CommandBarButton::InstanceId() const -{ - QVariant qax_result = property("InstanceId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool CommandBarButton::IsPriorityDropped() const -{ - QVariant qax_result = property("IsPriorityDropped"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int CommandBarButton::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QPixmap CommandBarButton::Mask() const -{ - QVariant qax_result = property("Mask"); - Q_ASSERT(qax_result.isValid()); - return *(QPixmap*)qax_result.constData(); -} -inline void CommandBarButton::SetMask(const QPixmap& value){ setProperty("Mask", QVariant(value)); } - -inline Office::MsoControlOLEUsage CommandBarButton::OLEUsage() const -{ - QVariant qax_result = property("OLEUsage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlOLEUsage*)qax_result.constData(); -} -inline void CommandBarButton::SetOLEUsage(Office::MsoControlOLEUsage value){ setProperty("OLEUsage", QVariant(value)); } - -inline QString CommandBarButton::OnAction() const -{ - QVariant qax_result = property("OnAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetOnAction(const QString& value){ setProperty("OnAction", QVariant(value)); } - -inline QString CommandBarButton::Parameter() const -{ - QVariant qax_result = property("Parameter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetParameter(const QString& value){ setProperty("Parameter", QVariant(value)); } - -inline Office::CommandBar* CommandBarButton::Parent() const -{ - Office::CommandBar* qax_pointer = 0; - qRegisterMetaType("CommandBar*", &qax_pointer); - qRegisterMetaType("CommandBar", qax_pointer); - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::CommandBar**)qax_result.constData(); -} - -inline QPixmap CommandBarButton::Picture() const -{ - QVariant qax_result = property("Picture"); - Q_ASSERT(qax_result.isValid()); - return *(QPixmap*)qax_result.constData(); -} -inline void CommandBarButton::SetPicture(const QPixmap& value){ setProperty("Picture", QVariant(value)); } - -inline int CommandBarButton::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarButton::SetPriority(int value){ setProperty("Priority", QVariant(value)); } - -inline QString CommandBarButton::ShortcutText() const -{ - QVariant qax_result = property("ShortcutText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetShortcutText(const QString& value){ setProperty("ShortcutText", QVariant(value)); } - -inline Office::MsoButtonState CommandBarButton::State() const -{ - QVariant qax_result = property("State"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoButtonState*)qax_result.constData(); -} -inline void CommandBarButton::SetState(Office::MsoButtonState value){ setProperty("State", QVariant(value)); } - -inline Office::MsoButtonStyle CommandBarButton::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoButtonStyle*)qax_result.constData(); -} -inline void CommandBarButton::SetStyle(Office::MsoButtonStyle value){ setProperty("Style", QVariant(value)); } - -inline QString CommandBarButton::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString CommandBarButton::TooltipText() const -{ - QVariant qax_result = property("TooltipText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandBarButton::SetTooltipText(const QString& value){ setProperty("TooltipText", QVariant(value)); } - -inline int CommandBarButton::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoControlType CommandBarButton::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoControlType*)qax_result.constData(); -} - -inline bool CommandBarButton::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void CommandBarButton::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline int CommandBarButton::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void CommandBarButton::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline int CommandBarButton::accChildCount() const -{ - QVariant qax_result = property("accChildCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString CommandBarButton::accDefaultAction() const -{ - QVariant qax_result = property("accDefaultAction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarButton::accDescription() const -{ - QVariant qax_result = property("accDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarButton::accFocus() const -{ - QVariant qax_result = property("accFocus"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString CommandBarButton::accHelp() const -{ - QVariant qax_result = property("accHelp"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString CommandBarButton::accKeyboardShortcut() const -{ - QVariant qax_result = property("accKeyboardShortcut"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant CommandBarButton::accName() const -{ - QVariant qax_result = property("accName"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarButton::setAccName(const QVariant& value){ setProperty("accName", QVariant(value)); } - -inline IDispatch* CommandBarButton::accParent() const -{ - QVariant qax_result = property("accParent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant CommandBarButton::accRole() const -{ - QVariant qax_result = property("accRole"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarButton::accSelection() const -{ - QVariant qax_result = property("accSelection"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarButton::accState() const -{ - QVariant qax_result = property("accState"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QVariant CommandBarButton::accValue() const -{ - QVariant qax_result = property("accValue"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void CommandBarButton::setAccValue(const QVariant& value){ setProperty("accValue", QVariant(value)); } - -inline Office::CommandBarControl* CommandBarButton::Copy() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarButton::Copy(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarButton::Copy(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void CommandBarButton::CopyFace() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void CommandBarButton::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void CommandBarButton::Delete(const QVariant& Temporary) -{ - void *_a[] = {0, (void*)&Temporary}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void CommandBarButton::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline Office::CommandBarControl* CommandBarButton::Move() -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarButton::Move(const QVariant& Bar) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline Office::CommandBarControl* CommandBarButton::Move(const QVariant& Bar, const QVariant& Before) -{ - Office::CommandBarControl* qax_result = 0; - qRegisterMetaType("CommandBarControl*", &qax_result); - qRegisterMetaType("CommandBarControl", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Bar, (void*)&Before}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline void CommandBarButton::PasteFace() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void CommandBarButton::Reserved1() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void CommandBarButton::Reserved2() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void CommandBarButton::Reserved3() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void CommandBarButton::Reserved4() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void CommandBarButton::Reserved5() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline void CommandBarButton::Reserved6() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void CommandBarButton::Reserved7() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void CommandBarButton::Reset() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void CommandBarButton::SetFocus() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); -} - -inline IDispatch* CommandBarButton::accChild(const QVariant& varChild) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 58, _a); - return qax_result; -} - -inline void CommandBarButton::accDoDefaultAction() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); -} - -inline void CommandBarButton::accDoDefaultAction(const QVariant& varChild) -{ - void *_a[] = {0, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); -} - -inline int CommandBarButton::accHelpTopic(QString& pszHelpFile) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 67, _a); - return qax_result; -} - -inline int CommandBarButton::accHelpTopic(QString& pszHelpFile, const QVariant& varChild) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&pszHelpFile, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); - return qax_result; -} - -inline QVariant CommandBarButton::accHitTest(int xLeft, int yTop) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&xLeft, (void*)&yTop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 69, _a); - return qax_result; -} - -inline void CommandBarButton::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 72, _a); -} - -inline void CommandBarButton::accLocation(int& pxLeft, int& pyTop, int& pcxWidth, int& pcyHeight, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&pxLeft, (void*)&pyTop, (void*)&pcxWidth, (void*)&pcyHeight, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 73, _a); -} - -inline QVariant CommandBarButton::accNavigate(int navDir) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir}; - qt_metacall(QMetaObject::InvokeMetaMethod, 76, _a); - return qax_result; -} - -inline QVariant CommandBarButton::accNavigate(int navDir, const QVariant& varStart) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&navDir, (void*)&varStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 77, _a); - return qax_result; -} - -inline void CommandBarButton::accSelect(int flagsSelect) -{ - void *_a[] = {0, (void*)&flagsSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 80, _a); -} - -inline void CommandBarButton::accSelect(int flagsSelect, const QVariant& varChild) -{ - void *_a[] = {0, (void*)&flagsSelect, (void*)&varChild}; - qt_metacall(QMetaObject::InvokeMetaMethod, 81, _a); -} - - -inline IDispatch* WebPageFont::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int WebPageFont::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString WebPageFont::FixedWidthFont() const -{ - QVariant qax_result = property("FixedWidthFont"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebPageFont::SetFixedWidthFont(const QString& value){ setProperty("FixedWidthFont", QVariant(value)); } - -inline double WebPageFont::FixedWidthFontSize() const -{ - QVariant qax_result = property("FixedWidthFontSize"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void WebPageFont::SetFixedWidthFontSize(double value){ setProperty("FixedWidthFontSize", QVariant(value)); } - -inline QString WebPageFont::ProportionalFont() const -{ - QVariant qax_result = property("ProportionalFont"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebPageFont::SetProportionalFont(const QString& value){ setProperty("ProportionalFont", QVariant(value)); } - -inline double WebPageFont::ProportionalFontSize() const -{ - QVariant qax_result = property("ProportionalFontSize"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void WebPageFont::SetProportionalFontSize(double value){ setProperty("ProportionalFontSize", QVariant(value)); } - - -inline IDispatch* WebPageFonts::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int WebPageFonts::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int WebPageFonts::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* WebPageFonts::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::WebPageFont* WebPageFonts::Item(Office::MsoCharacterSet Index) -{ - Office::WebPageFont* qax_result = 0; - qRegisterMetaType("WebPageFont*", &qax_result); - qRegisterMetaType("WebPageFont", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* HTMLProjectItem::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int HTMLProjectItem::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool HTMLProjectItem::IsOpen() const -{ - QVariant qax_result = property("IsOpen"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString HTMLProjectItem::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* HTMLProjectItem::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString HTMLProjectItem::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void HTMLProjectItem::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline void HTMLProjectItem::LoadFromFile(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void HTMLProjectItem::Open() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void HTMLProjectItem::Open(Office::MsoHTMLProjectOpen OpenKind) -{ - void *_a[] = {0, (void*)&OpenKind}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void HTMLProjectItem::SaveCopyAs(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline IDispatch* HTMLProjectItems::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int HTMLProjectItems::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int HTMLProjectItems::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* HTMLProjectItems::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* HTMLProjectItems::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::HTMLProjectItem* HTMLProjectItems::Item(QVariant& Index) -{ - Office::HTMLProjectItem* qax_result = 0; - qRegisterMetaType("HTMLProjectItem*", &qax_result); - qRegisterMetaType("HTMLProjectItem", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* HTMLProject::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int HTMLProject::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::HTMLProjectItems* HTMLProject::HTMLProjectItems() const -{ - Office::HTMLProjectItems* qax_pointer = 0; - qRegisterMetaType("HTMLProjectItems*", &qax_pointer); - qRegisterMetaType("HTMLProjectItems", qax_pointer); - QVariant qax_result = property("HTMLProjectItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::HTMLProjectItems**)qax_result.constData(); -} - -inline IDispatch* HTMLProject::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoHTMLProjectState HTMLProject::State() const -{ - QVariant qax_result = property("State"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoHTMLProjectState*)qax_result.constData(); -} - -inline void HTMLProject::Open() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void HTMLProject::Open(Office::MsoHTMLProjectOpen OpenKind) -{ - void *_a[] = {0, (void*)&OpenKind}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void HTMLProject::RefreshDocument() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void HTMLProject::RefreshDocument(bool Refresh) -{ - void *_a[] = {0, (void*)&Refresh}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void HTMLProject::RefreshProject() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void HTMLProject::RefreshProject(bool Refresh) -{ - void *_a[] = {0, (void*)&Refresh}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - - -inline IDispatch* MsoDebugOptions::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int MsoDebugOptions::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int MsoDebugOptions::FeatureReports() const -{ - QVariant qax_result = property("FeatureReports"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void MsoDebugOptions::SetFeatureReports(int value){ setProperty("FeatureReports", QVariant(value)); } - -inline bool MsoDebugOptions::OutputToDebugger() const -{ - QVariant qax_result = property("OutputToDebugger"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void MsoDebugOptions::SetOutputToDebugger(bool value){ setProperty("OutputToDebugger", QVariant(value)); } - -inline bool MsoDebugOptions::OutputToFile() const -{ - QVariant qax_result = property("OutputToFile"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void MsoDebugOptions::SetOutputToFile(bool value){ setProperty("OutputToFile", QVariant(value)); } - -inline bool MsoDebugOptions::OutputToMessageBox() const -{ - QVariant qax_result = property("OutputToMessageBox"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void MsoDebugOptions::SetOutputToMessageBox(bool value){ setProperty("OutputToMessageBox", QVariant(value)); } - - -inline IDispatch* FileDialogSelectedItems::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FileDialogSelectedItems::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int FileDialogSelectedItems::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FileDialogSelectedItems::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* FileDialogSelectedItems::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline QString FileDialogSelectedItems::Item(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* FileDialogFilter::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FileDialogFilter::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString FileDialogFilter::Description() const -{ - QVariant qax_result = property("Description"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString FileDialogFilter::Extensions() const -{ - QVariant qax_result = property("Extensions"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* FileDialogFilter::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline IDispatch* FileDialogFilters::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FileDialogFilters::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int FileDialogFilters::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FileDialogFilters::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* FileDialogFilters::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::FileDialogFilter* FileDialogFilters::Add(const QString& Description, const QString& Extensions) -{ - Office::FileDialogFilter* qax_result = 0; - qRegisterMetaType("FileDialogFilter*", &qax_result); - qRegisterMetaType("FileDialogFilter", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Description, (void*)&Extensions}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::FileDialogFilter* FileDialogFilters::Add(const QString& Description, const QString& Extensions, const QVariant& Position) -{ - Office::FileDialogFilter* qax_result = 0; - qRegisterMetaType("FileDialogFilter*", &qax_result); - qRegisterMetaType("FileDialogFilter", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Description, (void*)&Extensions, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline void FileDialogFilters::Clear() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void FileDialogFilters::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void FileDialogFilters::Delete(const QVariant& filter) -{ - void *_a[] = {0, (void*)&filter}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline Office::FileDialogFilter* FileDialogFilters::Item(int Index) -{ - Office::FileDialogFilter* qax_result = 0; - qRegisterMetaType("FileDialogFilter*", &qax_result); - qRegisterMetaType("FileDialogFilter", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - - -inline bool FileDialog::AllowMultiSelect() const -{ - QVariant qax_result = property("AllowMultiSelect"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void FileDialog::SetAllowMultiSelect(bool value){ setProperty("AllowMultiSelect", QVariant(value)); } - -inline IDispatch* FileDialog::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString FileDialog::ButtonName() const -{ - QVariant qax_result = property("ButtonName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileDialog::SetButtonName(const QString& value){ setProperty("ButtonName", QVariant(value)); } - -inline int FileDialog::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoFileDialogType FileDialog::DialogType() const -{ - QVariant qax_result = property("DialogType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileDialogType*)qax_result.constData(); -} - -inline int FileDialog::FilterIndex() const -{ - QVariant qax_result = property("FilterIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void FileDialog::SetFilterIndex(int value){ setProperty("FilterIndex", QVariant(value)); } - -inline Office::FileDialogFilters* FileDialog::Filters() const -{ - Office::FileDialogFilters* qax_pointer = 0; - qRegisterMetaType("FileDialogFilters*", &qax_pointer); - qRegisterMetaType("FileDialogFilters", qax_pointer); - QVariant qax_result = property("Filters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FileDialogFilters**)qax_result.constData(); -} - -inline QString FileDialog::InitialFileName() const -{ - QVariant qax_result = property("InitialFileName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileDialog::SetInitialFileName(const QString& value){ setProperty("InitialFileName", QVariant(value)); } - -inline Office::MsoFileDialogView FileDialog::InitialView() const -{ - QVariant qax_result = property("InitialView"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFileDialogView*)qax_result.constData(); -} -inline void FileDialog::SetInitialView(Office::MsoFileDialogView value){ setProperty("InitialView", QVariant(value)); } - -inline QString FileDialog::Item() const -{ - QVariant qax_result = property("Item"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* FileDialog::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::FileDialogSelectedItems* FileDialog::SelectedItems() const -{ - Office::FileDialogSelectedItems* qax_pointer = 0; - qRegisterMetaType("FileDialogSelectedItems*", &qax_pointer); - qRegisterMetaType("FileDialogSelectedItems", qax_pointer); - QVariant qax_result = property("SelectedItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::FileDialogSelectedItems**)qax_result.constData(); -} - -inline QString FileDialog::Title() const -{ - QVariant qax_result = property("Title"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void FileDialog::SetTitle(const QString& value){ setProperty("Title", QVariant(value)); } - -inline void FileDialog::Execute() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline int FileDialog::Show() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - - -inline IDispatch* SignatureSet::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SignatureSet::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SignatureSet::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* SignatureSet::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SignatureSet::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::Signature* SignatureSet::Add() -{ - Office::Signature* qax_result = 0; - qRegisterMetaType("Signature*", &qax_result); - qRegisterMetaType("Signature", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void SignatureSet::Commit() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline Office::Signature* SignatureSet::Item(int iSig) -{ - Office::Signature* qax_result = 0; - qRegisterMetaType("Signature*", &qax_result); - qRegisterMetaType("Signature", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&iSig}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline IDispatch* Signature::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool Signature::AttachCertificate() const -{ - QVariant qax_result = property("AttachCertificate"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Signature::SetAttachCertificate(bool value){ setProperty("AttachCertificate", QVariant(value)); } - -inline int Signature::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QVariant Signature::ExpireDate() const -{ - QVariant qax_result = property("ExpireDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline bool Signature::IsCertificateExpired() const -{ - QVariant qax_result = property("IsCertificateExpired"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline bool Signature::IsCertificateRevoked() const -{ - QVariant qax_result = property("IsCertificateRevoked"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline bool Signature::IsValid() const -{ - QVariant qax_result = property("IsValid"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString Signature::Issuer() const -{ - QVariant qax_result = property("Issuer"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* Signature::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant Signature::SignDate() const -{ - QVariant qax_result = property("SignDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString Signature::Signer() const -{ - QVariant qax_result = property("Signer"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void Signature::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* IMsoEnvelopeVB::CommandBars() const -{ - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString IMsoEnvelopeVB::Introduction() const -{ - QVariant qax_result = property("Introduction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void IMsoEnvelopeVB::SetIntroduction(const QString& value){ setProperty("Introduction", QVariant(value)); } - -inline IDispatch* IMsoEnvelopeVB::Item() const -{ - QVariant qax_result = property("Item"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* IMsoEnvelopeVB::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline IDispatch* MsoEnvelope::CommandBars() const -{ - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString MsoEnvelope::Introduction() const -{ - QVariant qax_result = property("Introduction"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void MsoEnvelope::SetIntroduction(const QString& value){ setProperty("Introduction", QVariant(value)); } - -inline IDispatch* MsoEnvelope::Item() const -{ - QVariant qax_result = property("Item"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* MsoEnvelope::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline IDispatch* FileTypes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FileTypes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int FileTypes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* FileTypes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void FileTypes::Add(Office::MsoFileType FileType) -{ - void *_a[] = {0, (void*)&FileType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline MsoFileType FileTypes::Item(int Index) -{ - MsoFileType qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline void FileTypes::Remove(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline IDispatch* SearchFolders::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SearchFolders::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SearchFolders::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* SearchFolders::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void SearchFolders::Add(Office::ScopeFolder* ScopeFolder) -{ - void *_a[] = {0, (void*)&ScopeFolder}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline Office::ScopeFolder* SearchFolders::Item(int Index) -{ - Office::ScopeFolder* qax_result = 0; - qRegisterMetaType("ScopeFolder*", &qax_result); - qRegisterMetaType("ScopeFolder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline void SearchFolders::Remove(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline IDispatch* ScopeFolders::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ScopeFolders::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ScopeFolders::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* ScopeFolders::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::ScopeFolder* ScopeFolders::Item(int Index) -{ - Office::ScopeFolder* qax_result = 0; - qRegisterMetaType("ScopeFolder*", &qax_result); - qRegisterMetaType("ScopeFolder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* ScopeFolder::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ScopeFolder::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString ScopeFolder::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString ScopeFolder::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::ScopeFolders* ScopeFolder::ScopeFolders() const -{ - Office::ScopeFolders* qax_pointer = 0; - qRegisterMetaType("ScopeFolders*", &qax_pointer); - qRegisterMetaType("ScopeFolders", qax_pointer); - QVariant qax_result = property("ScopeFolders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ScopeFolders**)qax_result.constData(); -} - -inline void ScopeFolder::AddToSearchFolders() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* SearchScope::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SearchScope::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::ScopeFolder* SearchScope::ScopeFolder() const -{ - Office::ScopeFolder* qax_pointer = 0; - qRegisterMetaType("ScopeFolder*", &qax_pointer); - qRegisterMetaType("ScopeFolder", qax_pointer); - QVariant qax_result = property("ScopeFolder"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::ScopeFolder**)qax_result.constData(); -} - -inline Office::MsoSearchIn SearchScope::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSearchIn*)qax_result.constData(); -} - - -inline IDispatch* SearchScopes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SearchScopes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SearchScopes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* SearchScopes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SearchScope* SearchScopes::Item(int Index) -{ - Office::SearchScope* qax_result = 0; - qRegisterMetaType("SearchScope*", &qax_result); - qRegisterMetaType("SearchScope", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* IMsoDiagram::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState IMsoDiagram::AutoFormat() const -{ - QVariant qax_result = property("AutoFormat"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void IMsoDiagram::SetAutoFormat(Office::MsoTriState value){ setProperty("AutoFormat", QVariant(value)); } - -inline Office::MsoTriState IMsoDiagram::AutoLayout() const -{ - QVariant qax_result = property("AutoLayout"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void IMsoDiagram::SetAutoLayout(Office::MsoTriState value){ setProperty("AutoLayout", QVariant(value)); } - -inline int IMsoDiagram::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::DiagramNodes* IMsoDiagram::Nodes() const -{ - Office::DiagramNodes* qax_pointer = 0; - qRegisterMetaType("DiagramNodes*", &qax_pointer); - qRegisterMetaType("DiagramNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNodes**)qax_result.constData(); -} - -inline IDispatch* IMsoDiagram::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState IMsoDiagram::Reverse() const -{ - QVariant qax_result = property("Reverse"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void IMsoDiagram::SetReverse(Office::MsoTriState value){ setProperty("Reverse", QVariant(value)); } - -inline Office::MsoDiagramType IMsoDiagram::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoDiagramType*)qax_result.constData(); -} - -inline void IMsoDiagram::Convert(Office::MsoDiagramType Type) -{ - void *_a[] = {0, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void IMsoDiagram::FitText() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* DiagramNodes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int DiagramNodes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DiagramNodes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* DiagramNodes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DiagramNodes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNodes::Item(const QVariant& Index) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void DiagramNodes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* DiagramNodeChildren::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int DiagramNodeChildren::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DiagramNodeChildren::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNodeChildren::FirstChild() const -{ - Office::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("FirstChild"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNode**)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNodeChildren::LastChild() const -{ - Office::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("LastChild"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNode**)qax_result.constData(); -} - -inline IDispatch* DiagramNodeChildren::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DiagramNodeChildren::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNodeChildren::AddNode() -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNodeChildren::AddNode(const QVariant& Index) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNodeChildren::AddNode(const QVariant& Index, Office::MsoDiagramNodeType NodeType) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&NodeType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNodeChildren::Item(const QVariant& Index) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline void DiagramNodeChildren::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - - -inline IDispatch* DiagramNode::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::DiagramNodeChildren* DiagramNode::Children() const -{ - Office::DiagramNodeChildren* qax_pointer = 0; - qRegisterMetaType("DiagramNodeChildren*", &qax_pointer); - qRegisterMetaType("DiagramNodeChildren", qax_pointer); - QVariant qax_result = property("Children"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNodeChildren**)qax_result.constData(); -} - -inline int DiagramNode::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::IMsoDiagram* DiagramNode::Diagram() const -{ - Office::IMsoDiagram* qax_pointer = 0; - qRegisterMetaType("IMsoDiagram*", &qax_pointer); - qRegisterMetaType("IMsoDiagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::IMsoDiagram**)qax_result.constData(); -} - -inline Office::MsoOrgChartLayoutType DiagramNode::Layout() const -{ - QVariant qax_result = property("Layout"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoOrgChartLayoutType*)qax_result.constData(); -} -inline void DiagramNode::SetLayout(Office::MsoOrgChartLayoutType value){ setProperty("Layout", QVariant(value)); } - -inline IDispatch* DiagramNode::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNode::Root() const -{ - Office::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("Root"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::DiagramNode**)qax_result.constData(); -} - -inline Office::Shape* DiagramNode::Shape() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline Office::Shape* DiagramNode::TextShape() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("TextShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline Office::DiagramNode* DiagramNode::AddNode() -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNode::AddNode(Office::MsoRelativeNodePosition Pos) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNode::AddNode(Office::MsoRelativeNodePosition Pos, Office::MsoDiagramNodeType NodeType) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Pos, (void*)&NodeType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNode::CloneNode(bool CopyChildren, Office::DiagramNode* TargetNode) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&CopyChildren, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNode::CloneNode(bool CopyChildren, Office::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos) -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&CopyChildren, (void*)&TargetNode, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void DiagramNode::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void DiagramNode::MoveNode(Office::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos) -{ - void *_a[] = {0, (void*)&TargetNode, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline Office::DiagramNode* DiagramNode::NextNode() -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::DiagramNode* DiagramNode::PrevNode() -{ - Office::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void DiagramNode::ReplaceNode(Office::DiagramNode* TargetNode) -{ - void *_a[] = {0, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void DiagramNode::SwapNode(Office::DiagramNode* TargetNode) -{ - void *_a[] = {0, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void DiagramNode::SwapNode(Office::DiagramNode* TargetNode, bool SwapChildren) -{ - void *_a[] = {0, (void*)&TargetNode, (void*)&SwapChildren}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void DiagramNode::TransferChildren(Office::DiagramNode* ReceivingNode) -{ - void *_a[] = {0, (void*)&ReceivingNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - - -inline IDispatch* CanvasShapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Shape* CanvasShapes::Background() const -{ - Office::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::Shape**)qax_result.constData(); -} - -inline int CanvasShapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CanvasShapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* CanvasShapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* CanvasShapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::Shape* CanvasShapes::AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddCurve(const QVariant& SafeArrayOfPoints) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddLine(double BeginX, double BeginY, double EndX, double EndY) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddPolyline(const QVariant& SafeArrayOfPoints) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&PresetTextEffect, (void*)&Text, (void*)&FontName, (void*)&FontSize, (void*)&FontBold, (void*)&FontItalic, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline Office::FreeformBuilder* CanvasShapes::BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1) -{ - Office::FreeformBuilder* qax_result = 0; - qRegisterMetaType("FreeformBuilder*", &qax_result); - qRegisterMetaType("FreeformBuilder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline Office::Shape* CanvasShapes::Item(const QVariant& Index) -{ - Office::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline Office::ShapeRange* CanvasShapes::Range(const QVariant& Index) -{ - Office::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline void CanvasShapes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - - -inline IDispatch* OfficeDataSourceObject::Columns() const -{ - QVariant qax_result = property("Columns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString OfficeDataSourceObject::ConnectString() const -{ - QVariant qax_result = property("ConnectString"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OfficeDataSourceObject::SetConnectString(const QString& value){ setProperty("ConnectString", QVariant(value)); } - -inline QString OfficeDataSourceObject::DataSource() const -{ - QVariant qax_result = property("DataSource"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OfficeDataSourceObject::SetDataSource(const QString& value){ setProperty("DataSource", QVariant(value)); } - -inline IDispatch* OfficeDataSourceObject::Filters() const -{ - QVariant qax_result = property("Filters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int OfficeDataSourceObject::RowCount() const -{ - QVariant qax_result = property("RowCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString OfficeDataSourceObject::Table() const -{ - QVariant qax_result = property("Table"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OfficeDataSourceObject::SetTable(const QString& value){ setProperty("Table", QVariant(value)); } - -inline void OfficeDataSourceObject::ApplyFilter() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline int OfficeDataSourceObject::Move(Office::MsoMoveRow MsoMoveRow) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&MsoMoveRow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline int OfficeDataSourceObject::Move(Office::MsoMoveRow MsoMoveRow, int RowNbr) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&MsoMoveRow, (void*)&RowNbr}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void OfficeDataSourceObject::Open() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void OfficeDataSourceObject::Open(const QString& bstrSrc) -{ - void *_a[] = {0, (void*)&bstrSrc}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void OfficeDataSourceObject::Open(const QString& bstrSrc, const QString& bstrConnect) -{ - void *_a[] = {0, (void*)&bstrSrc, (void*)&bstrConnect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void OfficeDataSourceObject::Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable) -{ - void *_a[] = {0, (void*)&bstrSrc, (void*)&bstrConnect, (void*)&bstrTable}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void OfficeDataSourceObject::Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable, int fOpenExclusive) -{ - void *_a[] = {0, (void*)&bstrSrc, (void*)&bstrConnect, (void*)&bstrTable, (void*)&fOpenExclusive}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void OfficeDataSourceObject::Open(const QString& bstrSrc, const QString& bstrConnect, const QString& bstrTable, int fOpenExclusive, int fNeverPrompt) -{ - void *_a[] = {0, (void*)&bstrSrc, (void*)&bstrConnect, (void*)&bstrTable, (void*)&fOpenExclusive, (void*)&fNeverPrompt}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1) -{ - void *_a[] = {0, (void*)&SortField1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1, bool SortAscending1) -{ - void *_a[] = {0, (void*)&SortField1, (void*)&SortAscending1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2) -{ - void *_a[] = {0, (void*)&SortField1, (void*)&SortAscending1, (void*)&SortField2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2) -{ - void *_a[] = {0, (void*)&SortField1, (void*)&SortAscending1, (void*)&SortField2, (void*)&SortAscending2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2, const QString& SortField3) -{ - void *_a[] = {0, (void*)&SortField1, (void*)&SortAscending1, (void*)&SortField2, (void*)&SortAscending2, (void*)&SortField3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void OfficeDataSourceObject::SetSortOrder(const QString& SortField1, bool SortAscending1, const QString& SortField2, bool SortAscending2, const QString& SortField3, bool SortAscending3) -{ - void *_a[] = {0, (void*)&SortField1, (void*)&SortAscending1, (void*)&SortField2, (void*)&SortAscending2, (void*)&SortField3, (void*)&SortAscending3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - - -inline IDispatch* ODSOColumn::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ODSOColumn::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ODSOColumn::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString ODSOColumn::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* ODSOColumn::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString ODSOColumn::Value() const -{ - QVariant qax_result = property("Value"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - - -inline IDispatch* ODSOColumns::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ODSOColumns::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ODSOColumns::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ODSOColumns::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* ODSOColumns::Item(const QVariant& varIndex) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&varIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* ODSOFilter::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString ODSOFilter::Column() const -{ - QVariant qax_result = property("Column"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ODSOFilter::SetColumn(const QString& value){ setProperty("Column", QVariant(value)); } - -inline QString ODSOFilter::CompareTo() const -{ - QVariant qax_result = property("CompareTo"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ODSOFilter::SetCompareTo(const QString& value){ setProperty("CompareTo", QVariant(value)); } - -inline Office::MsoFilterComparison ODSOFilter::Comparison() const -{ - QVariant qax_result = property("Comparison"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFilterComparison*)qax_result.constData(); -} -inline void ODSOFilter::SetComparison(Office::MsoFilterComparison value){ setProperty("Comparison", QVariant(value)); } - -inline Office::MsoFilterConjunction ODSOFilter::Conjunction() const -{ - QVariant qax_result = property("Conjunction"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFilterConjunction*)qax_result.constData(); -} -inline void ODSOFilter::SetConjunction(Office::MsoFilterConjunction value){ setProperty("Conjunction", QVariant(value)); } - -inline int ODSOFilter::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ODSOFilter::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ODSOFilter::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline IDispatch* ODSOFilters::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ODSOFilters::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ODSOFilters::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ODSOFilters::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void ODSOFilters::Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction) -{ - void *_a[] = {0, (void*)&Column, (void*)&Comparison, (void*)&Conjunction}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ODSOFilters::Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction, const QString& bstrCompareTo) -{ - void *_a[] = {0, (void*)&Column, (void*)&Comparison, (void*)&Conjunction, (void*)&bstrCompareTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ODSOFilters::Add(const QString& Column, Office::MsoFilterComparison Comparison, Office::MsoFilterConjunction Conjunction, const QString& bstrCompareTo, bool DeferUpdate) -{ - void *_a[] = {0, (void*)&Column, (void*)&Comparison, (void*)&Conjunction, (void*)&bstrCompareTo, (void*)&DeferUpdate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ODSOFilters::Delete(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ODSOFilters::Delete(int Index, bool DeferUpdate) -{ - void *_a[] = {0, (void*)&Index, (void*)&DeferUpdate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline IDispatch* ODSOFilters::Item(int Index) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - - -inline IDispatch* NewFile::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int NewFile::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool NewFile::Add(const QString& FileName) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline bool NewFile::Add(const QString& FileName, const QVariant& Section) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline bool NewFile::Add(const QString& FileName, const QVariant& Section, const QVariant& DisplayName) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section, (void*)&DisplayName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline bool NewFile::Add(const QString& FileName, const QVariant& Section, const QVariant& DisplayName, const QVariant& Action) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section, (void*)&DisplayName, (void*)&Action}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline bool NewFile::Remove(const QString& FileName) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline bool NewFile::Remove(const QString& FileName, const QVariant& Section) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline bool NewFile::Remove(const QString& FileName, const QVariant& Section, const QVariant& DisplayName) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section, (void*)&DisplayName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline bool NewFile::Remove(const QString& FileName, const QVariant& Section, const QVariant& DisplayName, const QVariant& Action) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Section, (void*)&DisplayName, (void*)&Action}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - - -inline QString WebComponent::HTML() const -{ - QVariant qax_result = property("HTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponent::SetHTML(const QString& value){ setProperty("HTML", QVariant(value)); } - -inline int WebComponent::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponent::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline QString WebComponent::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponent::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* WebComponent::Shape() const -{ - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString WebComponent::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponent::SetURL(const QString& value){ setProperty("URL", QVariant(value)); } - -inline int WebComponent::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponent::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline void WebComponent::Commit() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void WebComponent::Revert() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void WebComponent::SetPlaceHolderGraphic(const QString& PlaceHolderGraphic) -{ - void *_a[] = {0, (void*)&PlaceHolderGraphic}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - - -inline IDispatch* WebComponentWindowExternal::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString WebComponentWindowExternal::ApplicationName() const -{ - QVariant qax_result = property("ApplicationName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline int WebComponentWindowExternal::ApplicationVersion() const -{ - QVariant qax_result = property("ApplicationVersion"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int WebComponentWindowExternal::InterfaceVersion() const -{ - QVariant qax_result = property("InterfaceVersion"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::WebComponent* WebComponentWindowExternal::WebComponent() const -{ - Office::WebComponent* qax_pointer = 0; - qRegisterMetaType("WebComponent*", &qax_pointer); - qRegisterMetaType("WebComponent", qax_pointer); - QVariant qax_result = property("WebComponent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::WebComponent**)qax_result.constData(); -} - -inline void WebComponentWindowExternal::CloseWindow() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* WebComponentFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString WebComponentFormat::HTML() const -{ - QVariant qax_result = property("HTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentFormat::SetHTML(const QString& value){ setProperty("HTML", QVariant(value)); } - -inline int WebComponentFormat::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponentFormat::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline QString WebComponentFormat::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentFormat::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* WebComponentFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString WebComponentFormat::PreviewGraphic() const -{ - QVariant qax_result = property("PreviewGraphic"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentFormat::SetPreviewGraphic(const QString& value){ setProperty("PreviewGraphic", QVariant(value)); } - -inline QString WebComponentFormat::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentFormat::SetURL(const QString& value){ setProperty("URL", QVariant(value)); } - -inline int WebComponentFormat::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponentFormat::SetWidth(int value){ setProperty("Width", QVariant(value)); } - -inline void WebComponentFormat::LaunchPropertiesWindow() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline int ILicWizExternal::AnimationEnabled() const -{ - QVariant qax_result = property("AnimationEnabled"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ILicWizExternal::Context() const -{ - QVariant qax_result = property("Context"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString ILicWizExternal::CountryInfo() const -{ - QVariant qax_result = property("CountryInfo"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline int ILicWizExternal::CurrentHelpId() const -{ - QVariant qax_result = property("CurrentHelpId"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ILicWizExternal::SetCurrentHelpId(int value){ setProperty("CurrentHelpId", QVariant(value)); } - -inline IDispatch* ILicWizExternal::LicAgent() const -{ - QVariant qax_result = property("LicAgent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString ILicWizExternal::OfficeOnTheWebUrl() const -{ - QVariant qax_result = property("OfficeOnTheWebUrl"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* ILicWizExternal::Validator() const -{ - QVariant qax_result = property("Validator"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString ILicWizExternal::WizardTitle() const -{ - QVariant qax_result = property("WizardTitle"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ILicWizExternal::SetWizardTitle(const QString& value){ setProperty("WizardTitle", QVariant(value)); } - -inline int ILicWizExternal::WizardVisible() const -{ - QVariant qax_result = property("WizardVisible"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ILicWizExternal::SetWizardVisible(int value){ setProperty("WizardVisible", QVariant(value)); } - -inline int ILicWizExternal::DepositPidKey(const QString& bstrKey, int fMORW) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrKey, (void*)&fMORW}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void ILicWizExternal::DisableVORWReminder(int BPC) -{ - void *_a[] = {0, (void*)&BPC}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline QString ILicWizExternal::FormatDate(const QDateTime& date) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&date}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QString ILicWizExternal::FormatDate(const QDateTime& date, const QString& pFormat) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&date, (void*)&pFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline int ILicWizExternal::GetConnectedState() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void ILicWizExternal::InternetDisconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ILicWizExternal::InvokeDateTimeApplet() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline int ILicWizExternal::MsoAlert(const QString& bstrText, const QString& bstrButtons, const QString& bstrIcon) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrText, (void*)&bstrButtons, (void*)&bstrIcon}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline void ILicWizExternal::OpenInDefaultBrowser(const QString& bstrUrl) -{ - void *_a[] = {0, (void*)&bstrUrl}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void ILicWizExternal::PrintHtmlDocument(IUnknown* punkHtmlDoc) -{ - void *_a[] = {0, (void*)&punkHtmlDoc}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void ILicWizExternal::ResetPID() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void ILicWizExternal::ResignDpc(const QString& bstrProductCode) -{ - void *_a[] = {0, (void*)&bstrProductCode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline QString ILicWizExternal::SaveReceipt(const QString& bstrReceipt) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrReceipt}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline void ILicWizExternal::SetDialogSize(int dx, int dy) -{ - void *_a[] = {0, (void*)&dx, (void*)&dy}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void ILicWizExternal::ShowHelp() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void ILicWizExternal::ShowHelp(QVariant& pvarId) -{ - void *_a[] = {0, (void*)&pvarId}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void ILicWizExternal::SortSelectOptions(IDispatch* pdispSelect) -{ - void *_a[] = {0, (void*)&pdispSelect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void ILicWizExternal::Terminate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline int ILicWizExternal::VerifyClock(int lMode) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&lMode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline void ILicWizExternal::WriteLog(const QString& bstrMessage) -{ - void *_a[] = {0, (void*)&bstrMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - - -inline QVariant ILicValidator::Products() const -{ - QVariant qax_result = property("Products"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline int ILicValidator::Selection() const -{ - QVariant qax_result = property("Selection"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ILicValidator::SetSelection(int value){ setProperty("Selection", QVariant(value)); } - - -inline void ILicAgent::AsyncProcessCCRenewalLicenseRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ILicAgent::AsyncProcessCCRenewalPriceRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ILicAgent::AsyncProcessDroppedLicenseRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ILicAgent::AsyncProcessHandshakeRequest(int bReviseCustInfo) -{ - void *_a[] = {0, (void*)&bReviseCustInfo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ILicAgent::AsyncProcessNewLicenseRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void ILicAgent::AsyncProcessReissueLicenseRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ILicAgent::AsyncProcessRetailRenewalLicenseRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void ILicAgent::AsyncProcessReviseCustInfoRequest() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void ILicAgent::CancelAsyncProcessRequest(int bIsLicenseRequest) -{ - void *_a[] = {0, (void*)&bIsLicenseRequest}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline uint ILicAgent::CheckSystemClock() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline uint ILicAgent::DepositConfirmationId(const QString& bstrVal) -{ - uint qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline uint ILicAgent::DisplaySSLCert() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline QString ILicAgent::GenerateInstallationId() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline QString ILicAgent::GetAddress1() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline QString ILicAgent::GetAddress2() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline uint ILicAgent::GetAsyncProcessReturnCode() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline QString ILicAgent::GetBackendErrorMsg() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingAddress1() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingAddress2() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingCity() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingCountryCode() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingFirstName() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingLastName() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingPhone() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingState() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline QString ILicAgent::GetBillingZip() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); - return qax_result; -} - -inline QDateTime ILicAgent::GetCCRenewalExpiryDate() -{ - QDateTime qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); - return qax_result; -} - -inline QString ILicAgent::GetCity() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); - return qax_result; -} - -inline QString ILicAgent::GetCountryCode() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); - return qax_result; -} - -inline QString ILicAgent::GetCountryDesc() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); - return qax_result; -} - -inline QString ILicAgent::GetCreditCardCode(uint dwIndex) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); - return qax_result; -} - -inline uint ILicAgent::GetCreditCardCount() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); - return qax_result; -} - -inline uint ILicAgent::GetCreditCardExpiryMonth() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline uint ILicAgent::GetCreditCardExpiryYear() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - -inline QString ILicAgent::GetCreditCardName(uint dwIndex) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); - return qax_result; -} - -inline QString ILicAgent::GetCreditCardNumber() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); - return qax_result; -} - -inline QString ILicAgent::GetCreditCardType() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); - return qax_result; -} - -inline QString ILicAgent::GetCurrencyDescription(uint dwCurrencyIndex) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwCurrencyIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); - return qax_result; -} - -inline uint ILicAgent::GetCurrencyOption() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); - return qax_result; -} - -inline QDateTime ILicAgent::GetCurrentExpiryDate() -{ - QDateTime qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); - return qax_result; -} - -inline int ILicAgent::GetDisconnectOption() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); - return qax_result; -} - -inline QString ILicAgent::GetEmail() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 48, _a); - return qax_result; -} - -inline QString ILicAgent::GetEndOfLifeHtmlText() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); - return qax_result; -} - -inline QDateTime ILicAgent::GetExistingExpiryDate() -{ - QDateTime qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline QString ILicAgent::GetFirstName() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline QString ILicAgent::GetInvoiceText() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); - return qax_result; -} - -inline uint ILicAgent::GetIsoLanguage() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); - return qax_result; -} - -inline QString ILicAgent::GetLastName() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); - return qax_result; -} - -inline QString ILicAgent::GetMSOffer() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); - return qax_result; -} - -inline QString ILicAgent::GetMSUpdate() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); - return qax_result; -} - -inline QDateTime ILicAgent::GetNewExpiryDate() -{ - QDateTime qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 57, _a); - return qax_result; -} - -inline QString ILicAgent::GetOrgName() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 58, _a); - return qax_result; -} - -inline QString ILicAgent::GetOtherOffer() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); - return qax_result; -} - -inline QString ILicAgent::GetPhone() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline uint ILicAgent::GetPriceItemCount() -{ - uint qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 61, _a); - return qax_result; -} - -inline QString ILicAgent::GetPriceItemLabel(uint dwIndex) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 62, _a); - return qax_result; -} - -inline QString ILicAgent::GetPriceItemValue(uint dwCurrencyIndex, uint dwIndex) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwCurrencyIndex, (void*)&dwIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); - return qax_result; -} - -inline QString ILicAgent::GetState() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); - return qax_result; -} - -inline QString ILicAgent::GetVATLabel(const QString& bstrCountryCode) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrCountryCode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 65, _a); - return qax_result; -} - -inline QString ILicAgent::GetVATNumber() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 66, _a); - return qax_result; -} - -inline QString ILicAgent::GetZip() -{ - QString qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 67, _a); - return qax_result; -} - -inline uint ILicAgent::Initialize(uint dwBPC, uint dwMode, const QString& bstrLicSource) -{ - uint qax_result; - void *_a[] = {(void*)&qax_result, (void*)&dwBPC, (void*)&dwMode, (void*)&bstrLicSource}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); - return qax_result; -} - -inline int ILicAgent::IsCCRenewalCountry(const QString& bstrCountryCode) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrCountryCode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 69, _a); - return qax_result; -} - -inline int ILicAgent::IsUpgradeAvailable() -{ - int qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 70, _a); - return qax_result; -} - -inline uint ILicAgent::SaveBillingInfo(int bSave) -{ - uint qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bSave}; - qt_metacall(QMetaObject::InvokeMetaMethod, 71, _a); - return qax_result; -} - -inline void ILicAgent::SetAddress1(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 72, _a); -} - -inline void ILicAgent::SetAddress2(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 73, _a); -} - -inline void ILicAgent::SetBillingAddress1(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 74, _a); -} - -inline void ILicAgent::SetBillingAddress2(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 75, _a); -} - -inline void ILicAgent::SetBillingCity(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 76, _a); -} - -inline void ILicAgent::SetBillingCountryCode(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 77, _a); -} - -inline void ILicAgent::SetBillingFirstName(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 78, _a); -} - -inline void ILicAgent::SetBillingLastName(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 79, _a); -} - -inline void ILicAgent::SetBillingPhone(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 80, _a); -} - -inline void ILicAgent::SetBillingState(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 81, _a); -} - -inline void ILicAgent::SetBillingZip(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 82, _a); -} - -inline void ILicAgent::SetCity(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 83, _a); -} - -inline void ILicAgent::SetCountryCode(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 84, _a); -} - -inline void ILicAgent::SetCountryDesc(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 85, _a); -} - -inline void ILicAgent::SetCreditCardExpiryMonth(uint dwCCMonth) -{ - void *_a[] = {0, (void*)&dwCCMonth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 86, _a); -} - -inline void ILicAgent::SetCreditCardExpiryYear(uint dwCCYear) -{ - void *_a[] = {0, (void*)&dwCCYear}; - qt_metacall(QMetaObject::InvokeMetaMethod, 87, _a); -} - -inline void ILicAgent::SetCreditCardNumber(const QString& bstrCCNumber) -{ - void *_a[] = {0, (void*)&bstrCCNumber}; - qt_metacall(QMetaObject::InvokeMetaMethod, 88, _a); -} - -inline void ILicAgent::SetCreditCardType(const QString& bstrCCCode) -{ - void *_a[] = {0, (void*)&bstrCCCode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 89, _a); -} - -inline void ILicAgent::SetCurrencyOption(uint dwCurrencyOption) -{ - void *_a[] = {0, (void*)&dwCurrencyOption}; - qt_metacall(QMetaObject::InvokeMetaMethod, 90, _a); -} - -inline void ILicAgent::SetDisconnectOption(int bNewVal) -{ - void *_a[] = {0, (void*)&bNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 91, _a); -} - -inline void ILicAgent::SetEmail(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 92, _a); -} - -inline void ILicAgent::SetFirstName(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 93, _a); -} - -inline void ILicAgent::SetIsoLanguage(uint dwNewVal) -{ - void *_a[] = {0, (void*)&dwNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 94, _a); -} - -inline void ILicAgent::SetLastName(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 95, _a); -} - -inline void ILicAgent::SetMSOffer(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 96, _a); -} - -inline void ILicAgent::SetMSUpdate(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 97, _a); -} - -inline void ILicAgent::SetOrgName(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 98, _a); -} - -inline void ILicAgent::SetOtherOffer(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 99, _a); -} - -inline void ILicAgent::SetPhone(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 100, _a); -} - -inline void ILicAgent::SetState(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 101, _a); -} - -inline void ILicAgent::SetVATNumber(const QString& bstrVATNumber) -{ - void *_a[] = {0, (void*)&bstrVATNumber}; - qt_metacall(QMetaObject::InvokeMetaMethod, 102, _a); -} - -inline void ILicAgent::SetZip(const QString& bstrNewVal) -{ - void *_a[] = {0, (void*)&bstrNewVal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 103, _a); -} - -inline int ILicAgent::VerifyCheckDigits(const QString& bstrCIDIID) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&bstrCIDIID}; - qt_metacall(QMetaObject::InvokeMetaMethod, 104, _a); - return qax_result; -} - -inline void ILicAgent::WantUpgrade(int bWantUpgrade) -{ - void *_a[] = {0, (void*)&bWantUpgrade}; - qt_metacall(QMetaObject::InvokeMetaMethod, 105, _a); -} - - -inline IDispatch* IMsoEServicesDialog::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString IMsoEServicesDialog::ApplicationName() const -{ - QVariant qax_result = property("ApplicationName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* IMsoEServicesDialog::ClipArt() const -{ - QVariant qax_result = property("ClipArt"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* IMsoEServicesDialog::WebComponent() const -{ - QVariant qax_result = property("WebComponent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void IMsoEServicesDialog::AddTrustedDomain(const QString& Domain) -{ - void *_a[] = {0, (void*)&Domain}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void IMsoEServicesDialog::Close() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void IMsoEServicesDialog::Close(bool ApplyWebComponentChanges) -{ - void *_a[] = {0, (void*)&ApplyWebComponentChanges}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline QString WebComponentProperties::HTML() const -{ - QVariant qax_result = property("HTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetHTML(const QString& value){ setProperty("HTML", QVariant(value)); } - -inline int WebComponentProperties::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponentProperties::SetHeight(int value){ setProperty("Height", QVariant(value)); } - -inline QString WebComponentProperties::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline QString WebComponentProperties::PreviewGraphic() const -{ - QVariant qax_result = property("PreviewGraphic"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetPreviewGraphic(const QString& value){ setProperty("PreviewGraphic", QVariant(value)); } - -inline QString WebComponentProperties::PreviewHTML() const -{ - QVariant qax_result = property("PreviewHTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetPreviewHTML(const QString& value){ setProperty("PreviewHTML", QVariant(value)); } - -inline IDispatch* WebComponentProperties::Shape() const -{ - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString WebComponentProperties::Tag() const -{ - QVariant qax_result = property("Tag"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetTag(const QString& value){ setProperty("Tag", QVariant(value)); } - -inline QString WebComponentProperties::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void WebComponentProperties::SetURL(const QString& value){ setProperty("URL", QVariant(value)); } - -inline int WebComponentProperties::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void WebComponentProperties::SetWidth(int value){ setProperty("Width", QVariant(value)); } - - -inline IDispatch* SmartDocument::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SmartDocument::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SmartDocument::SolutionID() const -{ - QVariant qax_result = property("SolutionID"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SmartDocument::SetSolutionID(const QString& value){ setProperty("SolutionID", QVariant(value)); } - -inline QString SmartDocument::SolutionURL() const -{ - QVariant qax_result = property("SolutionURL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SmartDocument::SetSolutionURL(const QString& value){ setProperty("SolutionURL", QVariant(value)); } - -inline void SmartDocument::PickSolution() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SmartDocument::PickSolution(bool ConsiderAllSchemas) -{ - void *_a[] = {0, (void*)&ConsiderAllSchemas}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void SmartDocument::RefreshPane() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline IDispatch* SharedWorkspaceMember::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceMember::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SharedWorkspaceMember::DomainName() const -{ - QVariant qax_result = property("DomainName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString SharedWorkspaceMember::Email() const -{ - QVariant qax_result = property("Email"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString SharedWorkspaceMember::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString SharedWorkspaceMember::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceMember::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void SharedWorkspaceMember::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* SharedWorkspaceMembers::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceMembers::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SharedWorkspaceMembers::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool SharedWorkspaceMembers::ItemCountExceeded() const -{ - QVariant qax_result = property("ItemCountExceeded"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceMembers::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SharedWorkspaceMembers::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SharedWorkspaceMember* SharedWorkspaceMembers::Add(const QString& Email, const QString& DomainName, const QString& DisplayName) -{ - Office::SharedWorkspaceMember* qax_result = 0; - qRegisterMetaType("SharedWorkspaceMember*", &qax_result); - qRegisterMetaType("SharedWorkspaceMember", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Email, (void*)&DomainName, (void*)&DisplayName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::SharedWorkspaceMember* SharedWorkspaceMembers::Add(const QString& Email, const QString& DomainName, const QString& DisplayName, const QVariant& Role) -{ - Office::SharedWorkspaceMember* qax_result = 0; - qRegisterMetaType("SharedWorkspaceMember*", &qax_result); - qRegisterMetaType("SharedWorkspaceMember", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Email, (void*)&DomainName, (void*)&DisplayName, (void*)&Role}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::SharedWorkspaceMember* SharedWorkspaceMembers::Item(int Index) -{ - Office::SharedWorkspaceMember* qax_result = 0; - qRegisterMetaType("SharedWorkspaceMember*", &qax_result); - qRegisterMetaType("SharedWorkspaceMember", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline IDispatch* SharedWorkspaceTask::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspaceTask::AssignedTo() const -{ - QVariant qax_result = property("AssignedTo"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetAssignedTo(const QString& value){ setProperty("AssignedTo", QVariant(value)); } - -inline QString SharedWorkspaceTask::CreatedBy() const -{ - QVariant qax_result = property("CreatedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceTask::CreatedDate() const -{ - QVariant qax_result = property("CreatedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline int SharedWorkspaceTask::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SharedWorkspaceTask::Description() const -{ - QVariant qax_result = property("Description"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetDescription(const QString& value){ setProperty("Description", QVariant(value)); } - -inline QVariant SharedWorkspaceTask::DueDate() const -{ - QVariant qax_result = property("DueDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetDueDate(const QVariant& value){ setProperty("DueDate", QVariant(value)); } - -inline QString SharedWorkspaceTask::ModifiedBy() const -{ - QVariant qax_result = property("ModifiedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceTask::ModifiedDate() const -{ - QVariant qax_result = property("ModifiedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceTask::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoSharedWorkspaceTaskPriority SharedWorkspaceTask::Priority() const -{ - QVariant qax_result = property("Priority"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSharedWorkspaceTaskPriority*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetPriority(Office::MsoSharedWorkspaceTaskPriority value){ setProperty("Priority", QVariant(value)); } - -inline Office::MsoSharedWorkspaceTaskStatus SharedWorkspaceTask::Status() const -{ - QVariant qax_result = property("Status"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSharedWorkspaceTaskStatus*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetStatus(Office::MsoSharedWorkspaceTaskStatus value){ setProperty("Status", QVariant(value)); } - -inline QString SharedWorkspaceTask::Title() const -{ - QVariant qax_result = property("Title"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceTask::SetTitle(const QString& value){ setProperty("Title", QVariant(value)); } - -inline void SharedWorkspaceTask::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SharedWorkspaceTask::Save() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* SharedWorkspaceTasks::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceTasks::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SharedWorkspaceTasks::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool SharedWorkspaceTasks::ItemCountExceeded() const -{ - QVariant qax_result = property("ItemCountExceeded"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceTasks::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SharedWorkspaceTasks::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title, const QVariant& Status) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title, (void*)&Status}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title, const QVariant& Status, const QVariant& Priority) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title, (void*)&Status, (void*)&Priority}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title, (void*)&Status, (void*)&Priority, (void*)&Assignee}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee, const QVariant& Description) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title, (void*)&Status, (void*)&Priority, (void*)&Assignee, (void*)&Description}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Add(const QString& Title, const QVariant& Status, const QVariant& Priority, const QVariant& Assignee, const QVariant& Description, const QVariant& DueDate) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Title, (void*)&Status, (void*)&Priority, (void*)&Assignee, (void*)&Description, (void*)&DueDate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline Office::SharedWorkspaceTask* SharedWorkspaceTasks::Item(int Index) -{ - Office::SharedWorkspaceTask* qax_result = 0; - qRegisterMetaType("SharedWorkspaceTask*", &qax_result); - qRegisterMetaType("SharedWorkspaceTask", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - - -inline IDispatch* SharedWorkspaceFile::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspaceFile::CreatedBy() const -{ - QVariant qax_result = property("CreatedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceFile::CreatedDate() const -{ - QVariant qax_result = property("CreatedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline int SharedWorkspaceFile::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SharedWorkspaceFile::ModifiedBy() const -{ - QVariant qax_result = property("ModifiedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceFile::ModifiedDate() const -{ - QVariant qax_result = property("ModifiedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceFile::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspaceFile::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void SharedWorkspaceFile::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* SharedWorkspaceFiles::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceFiles::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SharedWorkspaceFiles::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool SharedWorkspaceFiles::ItemCountExceeded() const -{ - QVariant qax_result = property("ItemCountExceeded"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceFiles::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SharedWorkspaceFiles::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SharedWorkspaceFile* SharedWorkspaceFiles::Add(const QString& FileName) -{ - Office::SharedWorkspaceFile* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFile*", &qax_result); - qRegisterMetaType("SharedWorkspaceFile", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFile* SharedWorkspaceFiles::Add(const QString& FileName, const QVariant& ParentFolder) -{ - Office::SharedWorkspaceFile* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFile*", &qax_result); - qRegisterMetaType("SharedWorkspaceFile", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ParentFolder}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFile* SharedWorkspaceFiles::Add(const QString& FileName, const QVariant& ParentFolder, const QVariant& OverwriteIfFileAlreadyExists) -{ - Office::SharedWorkspaceFile* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFile*", &qax_result); - qRegisterMetaType("SharedWorkspaceFile", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ParentFolder, (void*)&OverwriteIfFileAlreadyExists}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFile* SharedWorkspaceFiles::Add(const QString& FileName, const QVariant& ParentFolder, const QVariant& OverwriteIfFileAlreadyExists, const QVariant& KeepInSync) -{ - Office::SharedWorkspaceFile* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFile*", &qax_result); - qRegisterMetaType("SharedWorkspaceFile", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ParentFolder, (void*)&OverwriteIfFileAlreadyExists, (void*)&KeepInSync}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFile* SharedWorkspaceFiles::Item(int Index) -{ - Office::SharedWorkspaceFile* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFile*", &qax_result); - qRegisterMetaType("SharedWorkspaceFile", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - - -inline IDispatch* SharedWorkspaceFolder::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceFolder::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SharedWorkspaceFolder::FolderName() const -{ - QVariant qax_result = property("FolderName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceFolder::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void SharedWorkspaceFolder::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SharedWorkspaceFolder::Delete(const QVariant& DeleteEventIfFolderContainsFiles) -{ - void *_a[] = {0, (void*)&DeleteEventIfFolderContainsFiles}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* SharedWorkspaceFolders::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceFolders::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SharedWorkspaceFolders::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool SharedWorkspaceFolders::ItemCountExceeded() const -{ - QVariant qax_result = property("ItemCountExceeded"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceFolders::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SharedWorkspaceFolders::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SharedWorkspaceFolder* SharedWorkspaceFolders::Add(const QString& FolderName) -{ - Office::SharedWorkspaceFolder* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFolder*", &qax_result); - qRegisterMetaType("SharedWorkspaceFolder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FolderName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFolder* SharedWorkspaceFolders::Add(const QString& FolderName, const QVariant& ParentFolder) -{ - Office::SharedWorkspaceFolder* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFolder*", &qax_result); - qRegisterMetaType("SharedWorkspaceFolder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FolderName, (void*)&ParentFolder}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::SharedWorkspaceFolder* SharedWorkspaceFolders::Item(int Index) -{ - Office::SharedWorkspaceFolder* qax_result = 0; - qRegisterMetaType("SharedWorkspaceFolder*", &qax_result); - qRegisterMetaType("SharedWorkspaceFolder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline IDispatch* SharedWorkspaceLink::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspaceLink::CreatedBy() const -{ - QVariant qax_result = property("CreatedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceLink::CreatedDate() const -{ - QVariant qax_result = property("CreatedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline int SharedWorkspaceLink::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString SharedWorkspaceLink::Description() const -{ - QVariant qax_result = property("Description"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceLink::SetDescription(const QString& value){ setProperty("Description", QVariant(value)); } - -inline QString SharedWorkspaceLink::ModifiedBy() const -{ - QVariant qax_result = property("ModifiedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QVariant SharedWorkspaceLink::ModifiedDate() const -{ - QVariant qax_result = property("ModifiedDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString SharedWorkspaceLink::Notes() const -{ - QVariant qax_result = property("Notes"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceLink::SetNotes(const QString& value){ setProperty("Notes", QVariant(value)); } - -inline IDispatch* SharedWorkspaceLink::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspaceLink::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspaceLink::SetURL(const QString& value){ setProperty("URL", QVariant(value)); } - -inline void SharedWorkspaceLink::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SharedWorkspaceLink::Save() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* SharedWorkspaceLinks::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SharedWorkspaceLinks::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SharedWorkspaceLinks::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool SharedWorkspaceLinks::ItemCountExceeded() const -{ - QVariant qax_result = property("ItemCountExceeded"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* SharedWorkspaceLinks::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SharedWorkspaceLinks::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::SharedWorkspaceLink* SharedWorkspaceLinks::Add(const QString& URL) -{ - Office::SharedWorkspaceLink* qax_result = 0; - qRegisterMetaType("SharedWorkspaceLink*", &qax_result); - qRegisterMetaType("SharedWorkspaceLink", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&URL}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::SharedWorkspaceLink* SharedWorkspaceLinks::Add(const QString& URL, const QVariant& Description) -{ - Office::SharedWorkspaceLink* qax_result = 0; - qRegisterMetaType("SharedWorkspaceLink*", &qax_result); - qRegisterMetaType("SharedWorkspaceLink", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&URL, (void*)&Description}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::SharedWorkspaceLink* SharedWorkspaceLinks::Add(const QString& URL, const QVariant& Description, const QVariant& Notes) -{ - Office::SharedWorkspaceLink* qax_result = 0; - qRegisterMetaType("SharedWorkspaceLink*", &qax_result); - qRegisterMetaType("SharedWorkspaceLink", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&URL, (void*)&Description, (void*)&Notes}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline Office::SharedWorkspaceLink* SharedWorkspaceLinks::Item(int Index) -{ - Office::SharedWorkspaceLink* qax_result = 0; - qRegisterMetaType("SharedWorkspaceLink*", &qax_result); - qRegisterMetaType("SharedWorkspaceLink", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline IDispatch* SharedWorkspace::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool SharedWorkspace::Connected() const -{ - QVariant qax_result = property("Connected"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int SharedWorkspace::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::SharedWorkspaceFiles* SharedWorkspace::Files() const -{ - Office::SharedWorkspaceFiles* qax_pointer = 0; - qRegisterMetaType("SharedWorkspaceFiles*", &qax_pointer); - qRegisterMetaType("SharedWorkspaceFiles", qax_pointer); - QVariant qax_result = property("Files"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SharedWorkspaceFiles**)qax_result.constData(); -} - -inline Office::SharedWorkspaceFolders* SharedWorkspace::Folders() const -{ - Office::SharedWorkspaceFolders* qax_pointer = 0; - qRegisterMetaType("SharedWorkspaceFolders*", &qax_pointer); - qRegisterMetaType("SharedWorkspaceFolders", qax_pointer); - QVariant qax_result = property("Folders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SharedWorkspaceFolders**)qax_result.constData(); -} - -inline QVariant SharedWorkspace::LastRefreshed() const -{ - QVariant qax_result = property("LastRefreshed"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::SharedWorkspaceLinks* SharedWorkspace::Links() const -{ - Office::SharedWorkspaceLinks* qax_pointer = 0; - qRegisterMetaType("SharedWorkspaceLinks*", &qax_pointer); - qRegisterMetaType("SharedWorkspaceLinks", qax_pointer); - QVariant qax_result = property("Links"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SharedWorkspaceLinks**)qax_result.constData(); -} - -inline Office::SharedWorkspaceMembers* SharedWorkspace::Members() const -{ - Office::SharedWorkspaceMembers* qax_pointer = 0; - qRegisterMetaType("SharedWorkspaceMembers*", &qax_pointer); - qRegisterMetaType("SharedWorkspaceMembers", qax_pointer); - QVariant qax_result = property("Members"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SharedWorkspaceMembers**)qax_result.constData(); -} - -inline QString SharedWorkspace::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspace::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* SharedWorkspace::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString SharedWorkspace::SourceURL() const -{ - QVariant qax_result = property("SourceURL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SharedWorkspace::SetSourceURL(const QString& value){ setProperty("SourceURL", QVariant(value)); } - -inline Office::SharedWorkspaceTasks* SharedWorkspace::Tasks() const -{ - Office::SharedWorkspaceTasks* qax_pointer = 0; - qRegisterMetaType("SharedWorkspaceTasks*", &qax_pointer); - qRegisterMetaType("SharedWorkspaceTasks", qax_pointer); - QVariant qax_result = property("Tasks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(Office::SharedWorkspaceTasks**)qax_result.constData(); -} - -inline QString SharedWorkspace::URL() const -{ - QVariant qax_result = property("URL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void SharedWorkspace::CreateNew() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SharedWorkspace::CreateNew(const QVariant& URL) -{ - void *_a[] = {0, (void*)&URL}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void SharedWorkspace::CreateNew(const QVariant& URL, const QVariant& Name) -{ - void *_a[] = {0, (void*)&URL, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void SharedWorkspace::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void SharedWorkspace::Disconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void SharedWorkspace::Refresh() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void SharedWorkspace::RemoveDocument() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - - -inline IDispatch* Sync::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Sync::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoSyncErrorType Sync::ErrorType() const -{ - QVariant qax_result = property("ErrorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSyncErrorType*)qax_result.constData(); -} - -inline QVariant Sync::LastSyncTime() const -{ - QVariant qax_result = property("LastSyncTime"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline IDispatch* Sync::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoSyncStatusType Sync::Status() const -{ - QVariant qax_result = property("Status"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSyncStatusType*)qax_result.constData(); -} - -inline QString Sync::WorkspaceLastChangedBy() const -{ - QVariant qax_result = property("WorkspaceLastChangedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void Sync::GetUpdate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Sync::OpenVersion(Office::MsoSyncVersionType SyncVersionType) -{ - void *_a[] = {0, (void*)&SyncVersionType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Sync::PutUpdate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Sync::ResolveConflict(Office::MsoSyncConflictResolutionType SyncConflictResolution) -{ - void *_a[] = {0, (void*)&SyncConflictResolution}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void Sync::Unsuspend() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - - -inline IDispatch* DocumentLibraryVersion::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString DocumentLibraryVersion::Comments() const -{ - QVariant qax_result = property("Comments"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline int DocumentLibraryVersion::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DocumentLibraryVersion::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QVariant DocumentLibraryVersion::Modified() const -{ - QVariant qax_result = property("Modified"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline QString DocumentLibraryVersion::ModifiedBy() const -{ - QVariant qax_result = property("ModifiedBy"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* DocumentLibraryVersion::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void DocumentLibraryVersion::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline IDispatch* DocumentLibraryVersion::Open() -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline IDispatch* DocumentLibraryVersion::Restore() -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline IDispatch* DocumentLibraryVersions::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int DocumentLibraryVersions::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DocumentLibraryVersions::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline bool DocumentLibraryVersions::IsVersioningEnabled() const -{ - QVariant qax_result = property("IsVersioningEnabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* DocumentLibraryVersions::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DocumentLibraryVersions::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::DocumentLibraryVersion* DocumentLibraryVersions::Item(int lIndex) -{ - Office::DocumentLibraryVersion* qax_result = 0; - qRegisterMetaType("DocumentLibraryVersion*", &qax_result); - qRegisterMetaType("DocumentLibraryVersion", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&lIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline IDispatch* UserPermission::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int UserPermission::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QVariant UserPermission::ExpirationDate() const -{ - QVariant qax_result = property("ExpirationDate"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void UserPermission::SetExpirationDate(const QVariant& value){ setProperty("ExpirationDate", QVariant(value)); } - -inline IDispatch* UserPermission::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int UserPermission::Permission() const -{ - QVariant qax_result = property("Permission"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void UserPermission::SetPermission(int value){ setProperty("Permission", QVariant(value)); } - -inline QString UserPermission::UserId() const -{ - QVariant qax_result = property("UserId"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void UserPermission::Remove() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* Permission::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Permission::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Permission::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Permission::DocumentAuthor() const -{ - QVariant qax_result = property("DocumentAuthor"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Permission::SetDocumentAuthor(const QString& value){ setProperty("DocumentAuthor", QVariant(value)); } - -inline bool Permission::EnableTrustedBrowser() const -{ - QVariant qax_result = property("EnableTrustedBrowser"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Permission::SetEnableTrustedBrowser(bool value){ setProperty("EnableTrustedBrowser", QVariant(value)); } - -inline bool Permission::Enabled() const -{ - QVariant qax_result = property("Enabled"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Permission::SetEnabled(bool value){ setProperty("Enabled", QVariant(value)); } - -inline IDispatch* Permission::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool Permission::PermissionFromPolicy() const -{ - QVariant qax_result = property("PermissionFromPolicy"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline QString Permission::PolicyDescription() const -{ - QVariant qax_result = property("PolicyDescription"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString Permission::PolicyName() const -{ - QVariant qax_result = property("PolicyName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString Permission::RequestPermissionURL() const -{ - QVariant qax_result = property("RequestPermissionURL"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Permission::SetRequestPermissionURL(const QString& value){ setProperty("RequestPermissionURL", QVariant(value)); } - -inline bool Permission::StoreLicenses() const -{ - QVariant qax_result = property("StoreLicenses"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void Permission::SetStoreLicenses(bool value){ setProperty("StoreLicenses", QVariant(value)); } - -inline IUnknown* Permission::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::UserPermission* Permission::Add(const QString& UserId) -{ - Office::UserPermission* qax_result = 0; - qRegisterMetaType("UserPermission*", &qax_result); - qRegisterMetaType("UserPermission", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&UserId}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline Office::UserPermission* Permission::Add(const QString& UserId, const QVariant& Permission) -{ - Office::UserPermission* qax_result = 0; - qRegisterMetaType("UserPermission*", &qax_result); - qRegisterMetaType("UserPermission", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&UserId, (void*)&Permission}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline Office::UserPermission* Permission::Add(const QString& UserId, const QVariant& Permission, const QVariant& ExpirationDate) -{ - Office::UserPermission* qax_result = 0; - qRegisterMetaType("UserPermission*", &qax_result); - qRegisterMetaType("UserPermission", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&UserId, (void*)&Permission, (void*)&ExpirationDate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void Permission::ApplyPolicy(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline Office::UserPermission* Permission::Item(const QVariant& Index) -{ - Office::UserPermission* qax_result = 0; - qRegisterMetaType("UserPermission*", &qax_result); - qRegisterMetaType("UserPermission", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void Permission::RemoveAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - - - -#endif - -} - -template<> -inline void *qMetaTypeConstructHelper(const Office::IAccessible *t) -{ Q_ASSERT(!t); return new Office::IAccessible; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_IMsoDispObj *t) -{ Q_ASSERT(!t); return new Office::_IMsoDispObj; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_IMsoOleAccDispObj *t) -{ Q_ASSERT(!t); return new Office::_IMsoOleAccDispObj; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_CommandBars *t) -{ Q_ASSERT(!t); return new Office::_CommandBars; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBar *t) -{ Q_ASSERT(!t); return new Office::CommandBar; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBarControls *t) -{ Q_ASSERT(!t); return new Office::CommandBarControls; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBarControl *t) -{ Q_ASSERT(!t); return new Office::CommandBarControl; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_CommandBarButton *t) -{ Q_ASSERT(!t); return new Office::_CommandBarButton; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBarPopup *t) -{ Q_ASSERT(!t); return new Office::CommandBarPopup; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_CommandBarComboBox *t) -{ Q_ASSERT(!t); return new Office::_CommandBarComboBox; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::_CommandBarActiveX *t) -{ Q_ASSERT(!t); return new Office::_CommandBarActiveX; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Adjustments *t) -{ Q_ASSERT(!t); return new Office::Adjustments; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CalloutFormat *t) -{ Q_ASSERT(!t); return new Office::CalloutFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ColorFormat *t) -{ Q_ASSERT(!t); return new Office::ColorFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ConnectorFormat *t) -{ Q_ASSERT(!t); return new Office::ConnectorFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FillFormat *t) -{ Q_ASSERT(!t); return new Office::FillFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FreeformBuilder *t) -{ Q_ASSERT(!t); return new Office::FreeformBuilder; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::GroupShapes *t) -{ Q_ASSERT(!t); return new Office::GroupShapes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::LineFormat *t) -{ Q_ASSERT(!t); return new Office::LineFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ShapeNode *t) -{ Q_ASSERT(!t); return new Office::ShapeNode; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ShapeNodes *t) -{ Q_ASSERT(!t); return new Office::ShapeNodes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::PictureFormat *t) -{ Q_ASSERT(!t); return new Office::PictureFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ShadowFormat *t) -{ Q_ASSERT(!t); return new Office::ShadowFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Script *t) -{ Q_ASSERT(!t); return new Office::Script; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Scripts *t) -{ Q_ASSERT(!t); return new Office::Scripts; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Shape *t) -{ Q_ASSERT(!t); return new Office::Shape; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ShapeRange *t) -{ Q_ASSERT(!t); return new Office::ShapeRange; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Shapes *t) -{ Q_ASSERT(!t); return new Office::Shapes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::TextEffectFormat *t) -{ Q_ASSERT(!t); return new Office::TextEffectFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::TextFrame *t) -{ Q_ASSERT(!t); return new Office::TextFrame; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ThreeDFormat *t) -{ Q_ASSERT(!t); return new Office::ThreeDFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IMsoDispCagNotifySink *t) -{ Q_ASSERT(!t); return new Office::IMsoDispCagNotifySink; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Balloon *t) -{ Q_ASSERT(!t); return new Office::Balloon; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::BalloonCheckboxes *t) -{ Q_ASSERT(!t); return new Office::BalloonCheckboxes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::BalloonCheckbox *t) -{ Q_ASSERT(!t); return new Office::BalloonCheckbox; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::BalloonLabels *t) -{ Q_ASSERT(!t); return new Office::BalloonLabels; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::BalloonLabel *t) -{ Q_ASSERT(!t); return new Office::BalloonLabel; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::AnswerWizardFiles *t) -{ Q_ASSERT(!t); return new Office::AnswerWizardFiles; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::AnswerWizard *t) -{ Q_ASSERT(!t); return new Office::AnswerWizard; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Assistant *t) -{ Q_ASSERT(!t); return new Office::Assistant; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IFoundFiles *t) -{ Q_ASSERT(!t); return new Office::IFoundFiles; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IFind *t) -{ Q_ASSERT(!t); return new Office::IFind; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FoundFiles *t) -{ Q_ASSERT(!t); return new Office::FoundFiles; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::PropertyTest *t) -{ Q_ASSERT(!t); return new Office::PropertyTest; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::PropertyTests *t) -{ Q_ASSERT(!t); return new Office::PropertyTests; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileSearch *t) -{ Q_ASSERT(!t); return new Office::FileSearch; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::COMAddIn *t) -{ Q_ASSERT(!t); return new Office::COMAddIn; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::COMAddIns *t) -{ Q_ASSERT(!t); return new Office::COMAddIns; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::LanguageSettings *t) -{ Q_ASSERT(!t); return new Office::LanguageSettings; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ICommandBarsEvents *t) -{ Q_ASSERT(!t); return new Office::ICommandBarsEvents; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBars *t) -{ Q_ASSERT(!t); return new Office::CommandBars; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ICommandBarComboBoxEvents *t) -{ Q_ASSERT(!t); return new Office::ICommandBarComboBoxEvents; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBarComboBox *t) -{ Q_ASSERT(!t); return new Office::CommandBarComboBox; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ICommandBarButtonEvents *t) -{ Q_ASSERT(!t); return new Office::ICommandBarButtonEvents; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CommandBarButton *t) -{ Q_ASSERT(!t); return new Office::CommandBarButton; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebPageFont *t) -{ Q_ASSERT(!t); return new Office::WebPageFont; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebPageFonts *t) -{ Q_ASSERT(!t); return new Office::WebPageFonts; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::HTMLProjectItem *t) -{ Q_ASSERT(!t); return new Office::HTMLProjectItem; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::HTMLProjectItems *t) -{ Q_ASSERT(!t); return new Office::HTMLProjectItems; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::HTMLProject *t) -{ Q_ASSERT(!t); return new Office::HTMLProject; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::MsoDebugOptions *t) -{ Q_ASSERT(!t); return new Office::MsoDebugOptions; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileDialogSelectedItems *t) -{ Q_ASSERT(!t); return new Office::FileDialogSelectedItems; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileDialogFilter *t) -{ Q_ASSERT(!t); return new Office::FileDialogFilter; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileDialogFilters *t) -{ Q_ASSERT(!t); return new Office::FileDialogFilters; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileDialog *t) -{ Q_ASSERT(!t); return new Office::FileDialog; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SignatureSet *t) -{ Q_ASSERT(!t); return new Office::SignatureSet; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Signature *t) -{ Q_ASSERT(!t); return new Office::Signature; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IMsoEnvelopeVB *t) -{ Q_ASSERT(!t); return new Office::IMsoEnvelopeVB; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::MsoEnvelope *t) -{ Q_ASSERT(!t); return new Office::MsoEnvelope; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::FileTypes *t) -{ Q_ASSERT(!t); return new Office::FileTypes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SearchFolders *t) -{ Q_ASSERT(!t); return new Office::SearchFolders; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ScopeFolders *t) -{ Q_ASSERT(!t); return new Office::ScopeFolders; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ScopeFolder *t) -{ Q_ASSERT(!t); return new Office::ScopeFolder; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SearchScope *t) -{ Q_ASSERT(!t); return new Office::SearchScope; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SearchScopes *t) -{ Q_ASSERT(!t); return new Office::SearchScopes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IMsoDiagram *t) -{ Q_ASSERT(!t); return new Office::IMsoDiagram; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::DiagramNodes *t) -{ Q_ASSERT(!t); return new Office::DiagramNodes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::DiagramNodeChildren *t) -{ Q_ASSERT(!t); return new Office::DiagramNodeChildren; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::DiagramNode *t) -{ Q_ASSERT(!t); return new Office::DiagramNode; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::CanvasShapes *t) -{ Q_ASSERT(!t); return new Office::CanvasShapes; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::OfficeDataSourceObject *t) -{ Q_ASSERT(!t); return new Office::OfficeDataSourceObject; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ODSOColumn *t) -{ Q_ASSERT(!t); return new Office::ODSOColumn; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ODSOColumns *t) -{ Q_ASSERT(!t); return new Office::ODSOColumns; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ODSOFilter *t) -{ Q_ASSERT(!t); return new Office::ODSOFilter; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ODSOFilters *t) -{ Q_ASSERT(!t); return new Office::ODSOFilters; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::NewFile *t) -{ Q_ASSERT(!t); return new Office::NewFile; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebComponent *t) -{ Q_ASSERT(!t); return new Office::WebComponent; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebComponentWindowExternal *t) -{ Q_ASSERT(!t); return new Office::WebComponentWindowExternal; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebComponentFormat *t) -{ Q_ASSERT(!t); return new Office::WebComponentFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ILicWizExternal *t) -{ Q_ASSERT(!t); return new Office::ILicWizExternal; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ILicValidator *t) -{ Q_ASSERT(!t); return new Office::ILicValidator; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::ILicAgent *t) -{ Q_ASSERT(!t); return new Office::ILicAgent; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::IMsoEServicesDialog *t) -{ Q_ASSERT(!t); return new Office::IMsoEServicesDialog; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::WebComponentProperties *t) -{ Q_ASSERT(!t); return new Office::WebComponentProperties; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SmartDocument *t) -{ Q_ASSERT(!t); return new Office::SmartDocument; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceMember *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceMember; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceMembers *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceMembers; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceTask *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceTask; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceTasks *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceTasks; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceFile *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceFile; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceFiles *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceFiles; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceFolder *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceFolder; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceFolders *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceFolders; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceLink *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceLink; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspaceLinks *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspaceLinks; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::SharedWorkspace *t) -{ Q_ASSERT(!t); return new Office::SharedWorkspace; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Sync *t) -{ Q_ASSERT(!t); return new Office::Sync; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::DocumentLibraryVersion *t) -{ Q_ASSERT(!t); return new Office::DocumentLibraryVersion; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::DocumentLibraryVersions *t) -{ Q_ASSERT(!t); return new Office::DocumentLibraryVersions; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::UserPermission *t) -{ Q_ASSERT(!t); return new Office::UserPermission; } - -template<> -inline void *qMetaTypeConstructHelper(const Office::Permission *t) -{ Q_ASSERT(!t); return new Office::Permission; } - -#endif - diff --git a/thirdparty/microsoft/ppt/include/msppt.h b/thirdparty/microsoft/ppt/include/msppt.h deleted file mode 100644 index d93f05c0..00000000 --- a/thirdparty/microsoft/ppt/include/msppt.h +++ /dev/null @@ -1,34781 +0,0 @@ -/**************************************************************************** -** -** Namespace PowerPoint generated by dumpcpp from type library -** c:\Program Files\Microsoft Office\OFFICE11\msppt.olb -** -****************************************************************************/ - -#ifndef QAX_DUMPCPP_POWERPOINT_H -#define QAX_DUMPCPP_POWERPOINT_H - -// Define this symbol to __declspec(dllexport) or __declspec(dllimport) -#ifndef POWERPOINT_EXPORT -#define POWERPOINT_EXPORT -#endif - -#include -#include -#include -#include - -struct IDispatch; - - -// Referenced namespace -namespace Office { - class CommandBars; - class Assistant; - class FileSearch; - class IFind; - enum MsoTriState; - class AnswerWizard; - class COMAddIns; - class LanguageSettings; - class MsoDebugOptions; - enum MsoFeatureInstall; - class FileDialog; - enum MsoFileDialogType; - enum MsoAutomationSecurity; - class NewFile; - enum MsoColorType; - enum MsoExtraInfoMethod; - enum MsoFarEastLineBreakLanguageID; - enum MsoLanguageID; - class HTMLProject; - enum MsoEncoding; - class SignatureSet; - class Permission; - class SharedWorkspace; - class Sync; - class DocumentLibraryVersions; - enum MsoHyperlinkType; - enum MsoOrientation; - class Scripts; - enum MsoCalloutType; - enum MsoConnectorType; - enum MsoTextOrientation; - enum MsoAutoShapeType; - enum MsoPresetTextEffect; - enum MsoEditingType; - enum MsoDiagramType; - enum MsoSegmentType; - enum MsoFlipCmd; - enum MsoScaleFrom; - enum MsoZOrderCmd; - enum MsoBlackWhiteMode; - enum MsoShapeType; - class Script; - enum MsoAlignCmd; - enum MsoDistributeCmd; - enum MsoPictureColorType; - enum MsoGradientStyle; - enum MsoPatternType; - enum MsoPresetGradientType; - enum MsoPresetTexture; - enum MsoGradientColorType; - enum MsoTextureType; - enum MsoFillType; - enum MsoArrowheadLength; - enum MsoArrowheadStyle; - enum MsoArrowheadWidth; - enum MsoLineDashStyle; - enum MsoLineStyle; - enum MsoShadowType; - enum MsoTextEffectAlignment; - enum MsoPresetTextEffectShape; - enum MsoPresetThreeDFormat; - enum MsoPresetExtrusionDirection; - enum MsoExtrusionColorType; - enum MsoPresetLightingDirection; - enum MsoPresetLightingSoftness; - enum MsoPresetMaterial; - enum MsoHorizontalAnchor; - enum MsoVerticalAnchor; - enum MsoCalloutDropType; - enum MsoCalloutAngleType; - enum MsoScreenSize; - class WebPageFonts; - enum MsoTargetBrowser; - enum MsoRelativeNodePosition; - enum MsoDiagramNodeType; - enum MsoOrgChartLayoutType; -} - -namespace VBIDE { - class VBE; - class VBProject; -} - - -namespace PowerPoint { - - enum MsoAnimAccumulate { - msoAnimAccumulateNone = 1, - msoAnimAccumulateAlways = 2 - }; - - enum MsoAnimAdditive { - msoAnimAdditiveAddBase = 1, - msoAnimAdditiveAddSum = 2 - }; - - enum MsoAnimAfterEffect { - msoAnimAfterEffectMixed = -1, - msoAnimAfterEffectNone = 0, - msoAnimAfterEffectDim = 1, - msoAnimAfterEffectHide = 2, - msoAnimAfterEffectHideOnNextClick= 3 - }; - - enum MsoAnimCommandType { - msoAnimCommandTypeEvent = 0, - msoAnimCommandTypeCall = 1, - msoAnimCommandTypeVerb = 2 - }; - - enum MsoAnimDirection { - msoAnimDirectionNone = 0, - msoAnimDirectionUp = 1, - msoAnimDirectionRight = 2, - msoAnimDirectionDown = 3, - msoAnimDirectionLeft = 4, - msoAnimDirectionOrdinalMask= 5, - msoAnimDirectionUpLeft = 6, - msoAnimDirectionUpRight = 7, - msoAnimDirectionDownRight= 8, - msoAnimDirectionDownLeft= 9, - msoAnimDirectionTop = 10, - msoAnimDirectionBottom = 11, - msoAnimDirectionTopLeft = 12, - msoAnimDirectionTopRight= 13, - msoAnimDirectionBottomRight= 14, - msoAnimDirectionBottomLeft= 15, - msoAnimDirectionHorizontal= 16, - msoAnimDirectionVertical= 17, - msoAnimDirectionAcross = 18, - msoAnimDirectionIn = 19, - msoAnimDirectionOut = 20, - msoAnimDirectionClockwise= 21, - msoAnimDirectionCounterclockwise= 22, - msoAnimDirectionHorizontalIn= 23, - msoAnimDirectionHorizontalOut= 24, - msoAnimDirectionVerticalIn= 25, - msoAnimDirectionVerticalOut= 26, - msoAnimDirectionSlightly= 27, - msoAnimDirectionCenter = 28, - msoAnimDirectionInSlightly= 29, - msoAnimDirectionInCenter= 30, - msoAnimDirectionInBottom= 31, - msoAnimDirectionOutSlightly= 32, - msoAnimDirectionOutCenter= 33, - msoAnimDirectionOutBottom= 34, - msoAnimDirectionFontBold= 35, - msoAnimDirectionFontItalic= 36, - msoAnimDirectionFontUnderline= 37, - msoAnimDirectionFontStrikethrough= 38, - msoAnimDirectionFontShadow= 39, - msoAnimDirectionFontAllCaps= 40, - msoAnimDirectionInstant = 41, - msoAnimDirectionGradual = 42, - msoAnimDirectionCycleClockwise= 43, - msoAnimDirectionCycleCounterclockwise= 44 - }; - - enum MsoAnimEffect { - msoAnimEffectCustom = 0, - msoAnimEffectAppear = 1, - msoAnimEffectFly = 2, - msoAnimEffectBlinds = 3, - msoAnimEffectBox = 4, - msoAnimEffectCheckerboard= 5, - msoAnimEffectCircle = 6, - msoAnimEffectCrawl = 7, - msoAnimEffectDiamond = 8, - msoAnimEffectDissolve = 9, - msoAnimEffectFade = 10, - msoAnimEffectFlashOnce = 11, - msoAnimEffectPeek = 12, - msoAnimEffectPlus = 13, - msoAnimEffectRandomBars = 14, - msoAnimEffectSpiral = 15, - msoAnimEffectSplit = 16, - msoAnimEffectStretch = 17, - msoAnimEffectStrips = 18, - msoAnimEffectSwivel = 19, - msoAnimEffectWedge = 20, - msoAnimEffectWheel = 21, - msoAnimEffectWipe = 22, - msoAnimEffectZoom = 23, - msoAnimEffectRandomEffects= 24, - msoAnimEffectBoomerang = 25, - msoAnimEffectBounce = 26, - msoAnimEffectColorReveal= 27, - msoAnimEffectCredits = 28, - msoAnimEffectEaseIn = 29, - msoAnimEffectFloat = 30, - msoAnimEffectGrowAndTurn= 31, - msoAnimEffectLightSpeed = 32, - msoAnimEffectPinwheel = 33, - msoAnimEffectRiseUp = 34, - msoAnimEffectSwish = 35, - msoAnimEffectThinLine = 36, - msoAnimEffectUnfold = 37, - msoAnimEffectWhip = 38, - msoAnimEffectAscend = 39, - msoAnimEffectCenterRevolve= 40, - msoAnimEffectFadedSwivel= 41, - msoAnimEffectDescend = 42, - msoAnimEffectSling = 43, - msoAnimEffectSpinner = 44, - msoAnimEffectStretchy = 45, - msoAnimEffectZip = 46, - msoAnimEffectArcUp = 47, - msoAnimEffectFadedZoom = 48, - msoAnimEffectGlide = 49, - msoAnimEffectExpand = 50, - msoAnimEffectFlip = 51, - msoAnimEffectShimmer = 52, - msoAnimEffectFold = 53, - msoAnimEffectChangeFillColor= 54, - msoAnimEffectChangeFont = 55, - msoAnimEffectChangeFontColor= 56, - msoAnimEffectChangeFontSize= 57, - msoAnimEffectChangeFontStyle= 58, - msoAnimEffectGrowShrink = 59, - msoAnimEffectChangeLineColor= 60, - msoAnimEffectSpin = 61, - msoAnimEffectTransparency= 62, - msoAnimEffectBoldFlash = 63, - msoAnimEffectBlast = 64, - msoAnimEffectBoldReveal = 65, - msoAnimEffectBrushOnColor= 66, - msoAnimEffectBrushOnUnderline= 67, - msoAnimEffectColorBlend = 68, - msoAnimEffectColorWave = 69, - msoAnimEffectComplementaryColor= 70, - msoAnimEffectComplementaryColor2= 71, - msoAnimEffectContrastingColor= 72, - msoAnimEffectDarken = 73, - msoAnimEffectDesaturate = 74, - msoAnimEffectFlashBulb = 75, - msoAnimEffectFlicker = 76, - msoAnimEffectGrowWithColor= 77, - msoAnimEffectLighten = 78, - msoAnimEffectStyleEmphasis= 79, - msoAnimEffectTeeter = 80, - msoAnimEffectVerticalGrow= 81, - msoAnimEffectWave = 82, - msoAnimEffectMediaPlay = 83, - msoAnimEffectMediaPause = 84, - msoAnimEffectMediaStop = 85, - msoAnimEffectPathCircle = 86, - msoAnimEffectPathRightTriangle= 87, - msoAnimEffectPathDiamond= 88, - msoAnimEffectPathHexagon= 89, - msoAnimEffectPath5PointStar= 90, - msoAnimEffectPathCrescentMoon= 91, - msoAnimEffectPathSquare = 92, - msoAnimEffectPathTrapezoid= 93, - msoAnimEffectPathHeart = 94, - msoAnimEffectPathOctagon= 95, - msoAnimEffectPath6PointStar= 96, - msoAnimEffectPathFootball= 97, - msoAnimEffectPathEqualTriangle= 98, - msoAnimEffectPathParallelogram= 99, - msoAnimEffectPathPentagon= 100, - msoAnimEffectPath4PointStar= 101, - msoAnimEffectPath8PointStar= 102, - msoAnimEffectPathTeardrop= 103, - msoAnimEffectPathPointyStar= 104, - msoAnimEffectPathCurvedSquare= 105, - msoAnimEffectPathCurvedX= 106, - msoAnimEffectPathVerticalFigure8= 107, - msoAnimEffectPathCurvyStar= 108, - msoAnimEffectPathLoopdeLoop= 109, - msoAnimEffectPathBuzzsaw= 110, - msoAnimEffectPathHorizontalFigure8= 111, - msoAnimEffectPathPeanut = 112, - msoAnimEffectPathFigure8Four= 113, - msoAnimEffectPathNeutron= 114, - msoAnimEffectPathSwoosh = 115, - msoAnimEffectPathBean = 116, - msoAnimEffectPathPlus = 117, - msoAnimEffectPathInvertedTriangle= 118, - msoAnimEffectPathInvertedSquare= 119, - msoAnimEffectPathLeft = 120, - msoAnimEffectPathTurnRight= 121, - msoAnimEffectPathArcDown= 122, - msoAnimEffectPathZigzag = 123, - msoAnimEffectPathSCurve2= 124, - msoAnimEffectPathSineWave= 125, - msoAnimEffectPathBounceLeft= 126, - msoAnimEffectPathDown = 127, - msoAnimEffectPathTurnUp = 128, - msoAnimEffectPathArcUp = 129, - msoAnimEffectPathHeartbeat= 130, - msoAnimEffectPathSpiralRight= 131, - msoAnimEffectPathWave = 132, - msoAnimEffectPathCurvyLeft= 133, - msoAnimEffectPathDiagonalDownRight= 134, - msoAnimEffectPathTurnDown= 135, - msoAnimEffectPathArcLeft= 136, - msoAnimEffectPathFunnel = 137, - msoAnimEffectPathSpring = 138, - msoAnimEffectPathBounceRight= 139, - msoAnimEffectPathSpiralLeft= 140, - msoAnimEffectPathDiagonalUpRight= 141, - msoAnimEffectPathTurnUpRight= 142, - msoAnimEffectPathArcRight= 143, - msoAnimEffectPathSCurve1= 144, - msoAnimEffectPathDecayingWave= 145, - msoAnimEffectPathCurvyRight= 146, - msoAnimEffectPathStairsDown= 147, - msoAnimEffectPathUp = 148, - msoAnimEffectPathRight = 149 - }; - - enum MsoAnimEffectAfter { - msoAnimEffectAfterFreeze= 1, - msoAnimEffectAfterRemove= 2, - msoAnimEffectAfterHold = 3, - msoAnimEffectAfterTransition= 4 - }; - - enum MsoAnimEffectRestart { - msoAnimEffectRestartAlways= 1, - msoAnimEffectRestartWhenOff= 2, - msoAnimEffectRestartNever= 3 - }; - - enum MsoAnimFilterEffectSubtype { - msoAnimFilterEffectSubtypeNone= 0, - msoAnimFilterEffectSubtypeInVertical= 1, - msoAnimFilterEffectSubtypeOutVertical= 2, - msoAnimFilterEffectSubtypeInHorizontal= 3, - msoAnimFilterEffectSubtypeOutHorizontal= 4, - msoAnimFilterEffectSubtypeHorizontal= 5, - msoAnimFilterEffectSubtypeVertical= 6, - msoAnimFilterEffectSubtypeIn= 7, - msoAnimFilterEffectSubtypeOut= 8, - msoAnimFilterEffectSubtypeAcross= 9, - msoAnimFilterEffectSubtypeFromLeft= 10, - msoAnimFilterEffectSubtypeFromRight= 11, - msoAnimFilterEffectSubtypeFromTop= 12, - msoAnimFilterEffectSubtypeFromBottom= 13, - msoAnimFilterEffectSubtypeDownLeft= 14, - msoAnimFilterEffectSubtypeUpLeft= 15, - msoAnimFilterEffectSubtypeDownRight= 16, - msoAnimFilterEffectSubtypeUpRight= 17, - msoAnimFilterEffectSubtypeSpokes1= 18, - msoAnimFilterEffectSubtypeSpokes2= 19, - msoAnimFilterEffectSubtypeSpokes3= 20, - msoAnimFilterEffectSubtypeSpokes4= 21, - msoAnimFilterEffectSubtypeSpokes8= 22, - msoAnimFilterEffectSubtypeLeft= 23, - msoAnimFilterEffectSubtypeRight= 24, - msoAnimFilterEffectSubtypeDown= 25, - msoAnimFilterEffectSubtypeUp= 26 - }; - - enum MsoAnimFilterEffectType { - msoAnimFilterEffectTypeNone= 0, - msoAnimFilterEffectTypeBarn= 1, - msoAnimFilterEffectTypeBlinds= 2, - msoAnimFilterEffectTypeBox= 3, - msoAnimFilterEffectTypeCheckerboard= 4, - msoAnimFilterEffectTypeCircle= 5, - msoAnimFilterEffectTypeDiamond= 6, - msoAnimFilterEffectTypeDissolve= 7, - msoAnimFilterEffectTypeFade= 8, - msoAnimFilterEffectTypeImage= 9, - msoAnimFilterEffectTypePixelate= 10, - msoAnimFilterEffectTypePlus= 11, - msoAnimFilterEffectTypeRandomBar= 12, - msoAnimFilterEffectTypeSlide= 13, - msoAnimFilterEffectTypeStretch= 14, - msoAnimFilterEffectTypeStrips= 15, - msoAnimFilterEffectTypeWedge= 16, - msoAnimFilterEffectTypeWheel= 17, - msoAnimFilterEffectTypeWipe= 18 - }; - - enum MsoAnimProperty { - msoAnimNone = 0, - msoAnimX = 1, - msoAnimY = 2, - msoAnimWidth = 3, - msoAnimHeight = 4, - msoAnimOpacity = 5, - msoAnimRotation = 6, - msoAnimColor = 7, - msoAnimVisibility = 8, - msoAnimTextFontBold = 100, - msoAnimTextFontColor = 101, - msoAnimTextFontEmboss = 102, - msoAnimTextFontItalic = 103, - msoAnimTextFontName = 104, - msoAnimTextFontShadow = 105, - msoAnimTextFontSize = 106, - msoAnimTextFontSubscript= 107, - msoAnimTextFontSuperscript= 108, - msoAnimTextFontUnderline= 109, - msoAnimTextFontStrikeThrough= 110, - msoAnimTextBulletCharacter= 111, - msoAnimTextBulletFontName= 112, - msoAnimTextBulletNumber = 113, - msoAnimTextBulletColor = 114, - msoAnimTextBulletRelativeSize= 115, - msoAnimTextBulletStyle = 116, - msoAnimTextBulletType = 117, - msoAnimShapePictureContrast= 1000, - msoAnimShapePictureBrightness= 1001, - msoAnimShapePictureGamma= 1002, - msoAnimShapePictureGrayscale= 1003, - msoAnimShapeFillOn = 1004, - msoAnimShapeFillColor = 1005, - msoAnimShapeFillOpacity = 1006, - msoAnimShapeFillBackColor= 1007, - msoAnimShapeLineOn = 1008, - msoAnimShapeLineColor = 1009, - msoAnimShapeShadowOn = 1010, - msoAnimShapeShadowType = 1011, - msoAnimShapeShadowColor = 1012, - msoAnimShapeShadowOpacity= 1013, - msoAnimShapeShadowOffsetX= 1014, - msoAnimShapeShadowOffsetY= 1015 - }; - - enum MsoAnimTextUnitEffect { - msoAnimTextUnitEffectMixed= -1, - msoAnimTextUnitEffectByParagraph= 0, - msoAnimTextUnitEffectByCharacter= 1, - msoAnimTextUnitEffectByWord= 2 - }; - - enum MsoAnimTriggerType { - msoAnimTriggerMixed = -1, - msoAnimTriggerNone = 0, - msoAnimTriggerOnPageClick= 1, - msoAnimTriggerWithPrevious= 2, - msoAnimTriggerAfterPrevious= 3, - msoAnimTriggerOnShapeClick= 4 - }; - - enum MsoAnimType { - msoAnimTypeMixed = -2, - msoAnimTypeNone = 0, - msoAnimTypeMotion = 1, - msoAnimTypeColor = 2, - msoAnimTypeScale = 3, - msoAnimTypeRotation = 4, - msoAnimTypeProperty = 5, - msoAnimTypeCommand = 6, - msoAnimTypeFilter = 7, - msoAnimTypeSet = 8 - }; - - enum MsoAnimateByLevel { - msoAnimateLevelMixed = -1, - msoAnimateLevelNone = 0, - msoAnimateTextByAllLevels= 1, - msoAnimateTextByFirstLevel= 2, - msoAnimateTextBySecondLevel= 3, - msoAnimateTextByThirdLevel= 4, - msoAnimateTextByFourthLevel= 5, - msoAnimateTextByFifthLevel= 6, - msoAnimateChartAllAtOnce= 7, - msoAnimateChartByCategory= 8, - msoAnimateChartByCategoryElements= 9, - msoAnimateChartBySeries = 10, - msoAnimateChartBySeriesElements= 11, - msoAnimateDiagramAllAtOnce= 12, - msoAnimateDiagramDepthByNode= 13, - msoAnimateDiagramDepthByBranch= 14, - msoAnimateDiagramBreadthByNode= 15, - msoAnimateDiagramBreadthByLevel= 16, - msoAnimateDiagramClockwise= 17, - msoAnimateDiagramClockwiseIn= 18, - msoAnimateDiagramClockwiseOut= 19, - msoAnimateDiagramCounterClockwise= 20, - msoAnimateDiagramCounterClockwiseIn= 21, - msoAnimateDiagramCounterClockwiseOut= 22, - msoAnimateDiagramInByRing= 23, - msoAnimateDiagramOutByRing= 24, - msoAnimateDiagramUp = 25, - msoAnimateDiagramDown = 26 - }; - - enum PpActionType { - ppActionMixed = -2, - ppActionNone = 0, - ppActionNextSlide = 1, - ppActionPreviousSlide = 2, - ppActionFirstSlide = 3, - ppActionLastSlide = 4, - ppActionLastSlideViewed = 5, - ppActionEndShow = 6, - ppActionHyperlink = 7, - ppActionRunMacro = 8, - ppActionRunProgram = 9, - ppActionNamedSlideShow = 10, - ppActionOLEVerb = 11, - ppActionPlay = 12 - }; - - enum PpAdvanceMode { - ppAdvanceModeMixed = -2, - ppAdvanceOnClick = 1, - ppAdvanceOnTime = 2 - }; - - enum PpAfterEffect { - ppAfterEffectMixed = -2, - ppAfterEffectNothing = 0, - ppAfterEffectHide = 1, - ppAfterEffectDim = 2, - ppAfterEffectHideOnClick= 3 - }; - - enum PpAlertLevel { - ppAlertsNone = 1, - ppAlertsAll = 2 - }; - - enum PpArrangeStyle { - ppArrangeTiled = 1, - ppArrangeCascade = 2 - }; - - enum PpAutoSize { - ppAutoSizeMixed = -2, - ppAutoSizeNone = 0, - ppAutoSizeShapeToFitText= 1 - }; - - enum PpBaselineAlignment { - ppBaselineAlignMixed = -2, - ppBaselineAlignBaseline = 1, - ppBaselineAlignTop = 2, - ppBaselineAlignCenter = 3, - ppBaselineAlignFarEast50= 4 - }; - - enum PpBorderType { - ppBorderTop = 1, - ppBorderLeft = 2, - ppBorderBottom = 3, - ppBorderRight = 4, - ppBorderDiagonalDown = 5, - ppBorderDiagonalUp = 6 - }; - - enum PpBulletType { - ppBulletMixed = -2, - ppBulletNone = 0, - ppBulletUnnumbered = 1, - ppBulletNumbered = 2, - ppBulletPicture = 3 - }; - - enum PpChangeCase { - ppCaseSentence = 1, - ppCaseLower = 2, - ppCaseUpper = 3, - ppCaseTitle = 4, - ppCaseToggle = 5 - }; - - enum PpChartUnitEffect { - ppAnimateChartMixed = -2, - ppAnimateBySeries = 1, - ppAnimateByCategory = 2, - ppAnimateBySeriesElements= 3, - ppAnimateByCategoryElements= 4, - ppAnimateChartAllAtOnce = 5 - }; - - enum PpColorSchemeIndex { - ppSchemeColorMixed = -2, - ppNotSchemeColor = 0, - ppBackground = 1, - ppForeground = 2, - ppShadow = 3, - ppTitle = 4, - ppFill = 5, - ppAccent1 = 6, - ppAccent2 = 7, - ppAccent3 = 8 - }; - - enum PpDateTimeFormat { - ppDateTimeFormatMixed = -2, - ppDateTimeMdyy = 1, - ppDateTimeddddMMMMddyyyy= 2, - ppDateTimedMMMMyyyy = 3, - ppDateTimeMMMMdyyyy = 4, - ppDateTimedMMMyy = 5, - ppDateTimeMMMMyy = 6, - ppDateTimeMMyy = 7, - ppDateTimeMMddyyHmm = 8, - ppDateTimeMMddyyhmmAMPM = 9, - ppDateTimeHmm = 10, - ppDateTimeHmmss = 11, - ppDateTimehmmAMPM = 12, - ppDateTimehmmssAMPM = 13, - ppDateTimeFigureOut = 14 - }; - - enum PpDirection { - ppDirectionMixed = -2, - ppDirectionLeftToRight = 1, - ppDirectionRightToLeft = 2 - }; - - enum PpEntryEffect { - ppEffectMixed = -2, - ppEffectNone = 0, - ppEffectCut = 257, - ppEffectCutThroughBlack = 258, - ppEffectRandom = 513, - ppEffectBlindsHorizontal= 769, - ppEffectBlindsVertical = 770, - ppEffectCheckerboardAcross= 1025, - ppEffectCheckerboardDown= 1026, - ppEffectCoverLeft = 1281, - ppEffectCoverUp = 1282, - ppEffectCoverRight = 1283, - ppEffectCoverDown = 1284, - ppEffectCoverLeftUp = 1285, - ppEffectCoverRightUp = 1286, - ppEffectCoverLeftDown = 1287, - ppEffectCoverRightDown = 1288, - ppEffectDissolve = 1537, - ppEffectFade = 1793, - ppEffectUncoverLeft = 2049, - ppEffectUncoverUp = 2050, - ppEffectUncoverRight = 2051, - ppEffectUncoverDown = 2052, - ppEffectUncoverLeftUp = 2053, - ppEffectUncoverRightUp = 2054, - ppEffectUncoverLeftDown = 2055, - ppEffectUncoverRightDown= 2056, - ppEffectRandomBarsHorizontal= 2305, - ppEffectRandomBarsVertical= 2306, - ppEffectStripsUpLeft = 2561, - ppEffectStripsUpRight = 2562, - ppEffectStripsDownLeft = 2563, - ppEffectStripsDownRight = 2564, - ppEffectStripsLeftUp = 2565, - ppEffectStripsRightUp = 2566, - ppEffectStripsLeftDown = 2567, - ppEffectStripsRightDown = 2568, - ppEffectWipeLeft = 2817, - ppEffectWipeUp = 2818, - ppEffectWipeRight = 2819, - ppEffectWipeDown = 2820, - ppEffectBoxOut = 3073, - ppEffectBoxIn = 3074, - ppEffectFlyFromLeft = 3329, - ppEffectFlyFromTop = 3330, - ppEffectFlyFromRight = 3331, - ppEffectFlyFromBottom = 3332, - ppEffectFlyFromTopLeft = 3333, - ppEffectFlyFromTopRight = 3334, - ppEffectFlyFromBottomLeft= 3335, - ppEffectFlyFromBottomRight= 3336, - ppEffectPeekFromLeft = 3337, - ppEffectPeekFromDown = 3338, - ppEffectPeekFromRight = 3339, - ppEffectPeekFromUp = 3340, - ppEffectCrawlFromLeft = 3341, - ppEffectCrawlFromUp = 3342, - ppEffectCrawlFromRight = 3343, - ppEffectCrawlFromDown = 3344, - ppEffectZoomIn = 3345, - ppEffectZoomInSlightly = 3346, - ppEffectZoomOut = 3347, - ppEffectZoomOutSlightly = 3348, - ppEffectZoomCenter = 3349, - ppEffectZoomBottom = 3350, - ppEffectStretchAcross = 3351, - ppEffectStretchLeft = 3352, - ppEffectStretchUp = 3353, - ppEffectStretchRight = 3354, - ppEffectStretchDown = 3355, - ppEffectSwivel = 3356, - ppEffectSpiral = 3357, - ppEffectSplitHorizontalOut= 3585, - ppEffectSplitHorizontalIn= 3586, - ppEffectSplitVerticalOut= 3587, - ppEffectSplitVerticalIn = 3588, - ppEffectFlashOnceFast = 3841, - ppEffectFlashOnceMedium = 3842, - ppEffectFlashOnceSlow = 3843, - ppEffectAppear = 3844, - ppEffectCircleOut = 3845, - ppEffectDiamondOut = 3846, - ppEffectCombHorizontal = 3847, - ppEffectCombVertical = 3848, - ppEffectFadeSmoothly = 3849, - ppEffectNewsflash = 3850, - ppEffectPlusOut = 3851, - ppEffectPushDown = 3852, - ppEffectPushLeft = 3853, - ppEffectPushRight = 3854, - ppEffectPushUp = 3855, - ppEffectWedge = 3856, - ppEffectWheel1Spoke = 3857, - ppEffectWheel2Spokes = 3858, - ppEffectWheel3Spokes = 3859, - ppEffectWheel4Spokes = 3860, - ppEffectWheel8Spokes = 3861 - }; - - enum PpExportMode { - ppRelativeToSlide = 1, - ppClipRelativeToSlide = 2, - ppScaleToFit = 3, - ppScaleXY = 4 - }; - - enum PpFarEastLineBreakLevel { - ppFarEastLineBreakLevelNormal= 1, - ppFarEastLineBreakLevelStrict= 2, - ppFarEastLineBreakLevelCustom= 3 - }; - - enum PpFileDialogType { - ppFileDialogOpen = 1, - ppFileDialogSave = 2 - }; - - enum PpFollowColors { - ppFollowColorsMixed = -2, - ppFollowColorsNone = 0, - ppFollowColorsScheme = 1, - ppFollowColorsTextAndBackground= 2 - }; - - enum PpFrameColors { - ppFrameColorsBrowserColors= 1, - ppFrameColorsPresentationSchemeTextColor= 2, - ppFrameColorsPresentationSchemeAccentColor= 3, - ppFrameColorsWhiteTextOnBlack= 4, - ppFrameColorsBlackTextOnWhite= 5 - }; - - enum PpHTMLVersion { - ppHTMLv3 = 1, - ppHTMLv4 = 2, - ppHTMLDual = 3, - ppHTMLAutodetect = 4 - }; - - enum PpIndentControl { - ppIndentControlMixed = -2, - ppIndentReplaceAttr = 1, - ppIndentKeepAttr = 2 - }; - - enum PpMediaType { - ppMediaTypeMixed = -2, - ppMediaTypeOther = 1, - ppMediaTypeSound = 2, - ppMediaTypeMovie = 3 - }; - - enum PpMouseActivation { - ppMouseClick = 1, - ppMouseOver = 2 - }; - - enum PpNumberedBulletStyle { - ppBulletStyleMixed = -2, - ppBulletAlphaLCPeriod = 0, - ppBulletAlphaUCPeriod = 1, - ppBulletArabicParenRight= 2, - ppBulletArabicPeriod = 3, - ppBulletRomanLCParenBoth= 4, - ppBulletRomanLCParenRight= 5, - ppBulletRomanLCPeriod = 6, - ppBulletRomanUCPeriod = 7, - ppBulletAlphaLCParenBoth= 8, - ppBulletAlphaLCParenRight= 9, - ppBulletAlphaUCParenBoth= 10, - ppBulletAlphaUCParenRight= 11, - ppBulletArabicParenBoth = 12, - ppBulletArabicPlain = 13, - ppBulletRomanUCParenBoth= 14, - ppBulletRomanUCParenRight= 15, - ppBulletSimpChinPlain = 16, - ppBulletSimpChinPeriod = 17, - ppBulletCircleNumDBPlain= 18, - ppBulletCircleNumWDWhitePlain= 19, - ppBulletCircleNumWDBlackPlain= 20, - ppBulletTradChinPlain = 21, - ppBulletTradChinPeriod = 22, - ppBulletArabicAlphaDash = 23, - ppBulletArabicAbjadDash = 24, - ppBulletHebrewAlphaDash = 25, - ppBulletKanjiKoreanPlain= 26, - ppBulletKanjiKoreanPeriod= 27, - ppBulletArabicDBPlain = 28, - ppBulletArabicDBPeriod = 29, - ppBulletThaiAlphaPeriod = 30, - ppBulletThaiAlphaParenRight= 31, - ppBulletThaiAlphaParenBoth= 32, - ppBulletThaiNumPeriod = 33, - ppBulletThaiNumParenRight= 34, - ppBulletThaiNumParenBoth= 35, - ppBulletHindiAlphaPeriod= 36, - ppBulletHindiNumPeriod = 37, - ppBulletKanjiSimpChinDBPeriod= 38, - ppBulletHindiNumParenRight= 39, - ppBulletHindiAlpha1Period= 40 - }; - - enum PpParagraphAlignment { - ppAlignmentMixed = -2, - ppAlignLeft = 1, - ppAlignCenter = 2, - ppAlignRight = 3, - ppAlignJustify = 4, - ppAlignDistribute = 5, - ppAlignThaiDistribute = 6, - ppAlignJustifyLow = 7 - }; - - enum PpPasteDataType { - ppPasteDefault = 0, - ppPasteBitmap = 1, - ppPasteEnhancedMetafile = 2, - ppPasteMetafilePicture = 3, - ppPasteGIF = 4, - ppPasteJPG = 5, - ppPastePNG = 6, - ppPasteText = 7, - ppPasteHTML = 8, - ppPasteRTF = 9, - ppPasteOLEObject = 10, - ppPasteShape = 11 - }; - - enum PpPlaceholderType { - ppPlaceholderMixed = -2, - ppPlaceholderTitle = 1, - ppPlaceholderBody = 2, - ppPlaceholderCenterTitle= 3, - ppPlaceholderSubtitle = 4, - ppPlaceholderVerticalTitle= 5, - ppPlaceholderVerticalBody= 6, - ppPlaceholderObject = 7, - ppPlaceholderChart = 8, - ppPlaceholderBitmap = 9, - ppPlaceholderMediaClip = 10, - ppPlaceholderOrgChart = 11, - ppPlaceholderTable = 12, - ppPlaceholderSlideNumber= 13, - ppPlaceholderHeader = 14, - ppPlaceholderFooter = 15, - ppPlaceholderDate = 16 - }; - - enum PpPrintColorType { - ppPrintColor = 1, - ppPrintBlackAndWhite = 2, - ppPrintPureBlackAndWhite= 3 - }; - - enum PpPrintHandoutOrder { - ppPrintHandoutVerticalFirst= 1, - ppPrintHandoutHorizontalFirst= 2 - }; - - enum PpPrintOutputType { - ppPrintOutputSlides = 1, - ppPrintOutputTwoSlideHandouts= 2, - ppPrintOutputThreeSlideHandouts= 3, - ppPrintOutputSixSlideHandouts= 4, - ppPrintOutputNotesPages = 5, - ppPrintOutputOutline = 6, - ppPrintOutputBuildSlides= 7, - ppPrintOutputFourSlideHandouts= 8, - ppPrintOutputNineSlideHandouts= 9, - ppPrintOutputOneSlideHandouts= 10 - }; - - enum PpPrintRangeType { - ppPrintAll = 1, - ppPrintSelection = 2, - ppPrintCurrent = 3, - ppPrintSlideRange = 4, - ppPrintNamedSlideShow = 5 - }; - - enum PpPublishSourceType { - ppPublishAll = 1, - ppPublishSlideRange = 2, - ppPublishNamedSlideShow = 3 - }; - - enum PpRevisionInfo { - ppRevisionInfoNone = 0, - ppRevisionInfoBaseline = 1, - ppRevisionInfoMerged = 2 - }; - - enum PpSaveAsFileType { - ppSaveAsPresentation = 1, - ppSaveAsPowerPoint7 = 2, - ppSaveAsPowerPoint4 = 3, - ppSaveAsPowerPoint3 = 4, - ppSaveAsTemplate = 5, - ppSaveAsRTF = 6, - ppSaveAsShow = 7, - ppSaveAsAddIn = 8, - ppSaveAsPowerPoint4FarEast= 10, - ppSaveAsDefault = 11, - ppSaveAsHTML = 12, - ppSaveAsHTMLv3 = 13, - ppSaveAsHTMLDual = 14, - ppSaveAsMetaFile = 15, - ppSaveAsGIF = 16, - ppSaveAsJPG = 17, - ppSaveAsPNG = 18, - ppSaveAsBMP = 19, - ppSaveAsWebArchive = 20, - ppSaveAsTIF = 21, - ppSaveAsPresForReview = 22, - ppSaveAsEMF = 23 - }; - - enum PpSelectionType { - ppSelectionNone = 0, - ppSelectionSlides = 1, - ppSelectionShapes = 2, - ppSelectionText = 3 - }; - - enum PpShapeFormat { - ppShapeFormatGIF = 0, - ppShapeFormatJPG = 1, - ppShapeFormatPNG = 2, - ppShapeFormatBMP = 3, - ppShapeFormatWMF = 4, - ppShapeFormatEMF = 5 - }; - - enum PpSlideLayout { - ppLayoutMixed = -2, - ppLayoutTitle = 1, - ppLayoutText = 2, - ppLayoutTwoColumnText = 3, - ppLayoutTable = 4, - ppLayoutTextAndChart = 5, - ppLayoutChartAndText = 6, - ppLayoutOrgchart = 7, - ppLayoutChart = 8, - ppLayoutTextAndClipart = 9, - ppLayoutClipartAndText = 10, - ppLayoutTitleOnly = 11, - ppLayoutBlank = 12, - ppLayoutTextAndObject = 13, - ppLayoutObjectAndText = 14, - ppLayoutLargeObject = 15, - ppLayoutObject = 16, - ppLayoutTextAndMediaClip= 17, - ppLayoutMediaClipAndText= 18, - ppLayoutObjectOverText = 19, - ppLayoutTextOverObject = 20, - ppLayoutTextAndTwoObjects= 21, - ppLayoutTwoObjectsAndText= 22, - ppLayoutTwoObjectsOverText= 23, - ppLayoutFourObjects = 24, - ppLayoutVerticalText = 25, - ppLayoutClipArtAndVerticalText= 26, - ppLayoutVerticalTitleAndText= 27, - ppLayoutVerticalTitleAndTextOverChart= 28, - ppLayoutTwoObjects = 29, - ppLayoutObjectAndTwoObjects= 30, - ppLayoutTwoObjectsAndObject= 31 - }; - - enum PpSlideShowAdvanceMode { - ppSlideShowManualAdvance= 1, - ppSlideShowUseSlideTimings= 2, - ppSlideShowRehearseNewTimings= 3 - }; - - enum PpSlideShowPointerType { - ppSlideShowPointerNone = 0, - ppSlideShowPointerArrow = 1, - ppSlideShowPointerPen = 2, - ppSlideShowPointerAlwaysHidden= 3, - ppSlideShowPointerAutoArrow= 4, - ppSlideShowPointerEraser= 5 - }; - - enum PpSlideShowRangeType { - ppShowAll = 1, - ppShowSlideRange = 2, - ppShowNamedSlideShow = 3 - }; - - enum PpSlideShowState { - ppSlideShowRunning = 1, - ppSlideShowPaused = 2, - ppSlideShowBlackScreen = 3, - ppSlideShowWhiteScreen = 4, - ppSlideShowDone = 5 - }; - - enum PpSlideShowType { - ppShowTypeSpeaker = 1, - ppShowTypeWindow = 2, - ppShowTypeKiosk = 3 - }; - - enum PpSlideSizeType { - ppSlideSizeOnScreen = 1, - ppSlideSizeLetterPaper = 2, - ppSlideSizeA4Paper = 3, - ppSlideSize35MM = 4, - ppSlideSizeOverhead = 5, - ppSlideSizeBanner = 6, - ppSlideSizeCustom = 7, - ppSlideSizeLedgerPaper = 8, - ppSlideSizeA3Paper = 9, - ppSlideSizeB4ISOPaper = 10, - ppSlideSizeB5ISOPaper = 11, - ppSlideSizeB4JISPaper = 12, - ppSlideSizeB5JISPaper = 13, - ppSlideSizeHagakiCard = 14 - }; - - enum PpSoundEffectType { - ppSoundEffectsMixed = -2, - ppSoundNone = 0, - ppSoundStopPrevious = 1, - ppSoundFile = 2 - }; - - enum PpSoundFormatType { - ppSoundFormatMixed = -2, - ppSoundFormatNone = 0, - ppSoundFormatWAV = 1, - ppSoundFormatMIDI = 2, - ppSoundFormatCDAudio = 3 - }; - - enum PpTabStopType { - ppTabStopMixed = -2, - ppTabStopLeft = 1, - ppTabStopCenter = 2, - ppTabStopRight = 3, - ppTabStopDecimal = 4 - }; - - enum PpTextLevelEffect { - ppAnimateLevelMixed = -2, - ppAnimateLevelNone = 0, - ppAnimateByFirstLevel = 1, - ppAnimateBySecondLevel = 2, - ppAnimateByThirdLevel = 3, - ppAnimateByFourthLevel = 4, - ppAnimateByFifthLevel = 5, - ppAnimateByAllLevels = 16 - }; - - enum PpTextStyleType { - ppDefaultStyle = 1, - ppTitleStyle = 2, - ppBodyStyle = 3 - }; - - enum PpTextUnitEffect { - ppAnimateUnitMixed = -2, - ppAnimateByParagraph = 0, - ppAnimateByWord = 1, - ppAnimateByCharacter = 2 - }; - - enum PpTransitionSpeed { - ppTransitionSpeedMixed = -2, - ppTransitionSpeedSlow = 1, - ppTransitionSpeedMedium = 2, - ppTransitionSpeedFast = 3 - }; - - enum PpUpdateOption { - ppUpdateOptionMixed = -2, - ppUpdateOptionManual = 1, - ppUpdateOptionAutomatic = 2 - }; - - enum PpViewType { - ppViewSlide = 1, - ppViewSlideMaster = 2, - ppViewNotesPage = 3, - ppViewHandoutMaster = 4, - ppViewNotesMaster = 5, - ppViewOutline = 6, - ppViewSlideSorter = 7, - ppViewTitleMaster = 8, - ppViewNormal = 9, - ppViewPrintPreview = 10, - ppViewThumbnails = 11, - ppViewMasterThumbnails = 12 - }; - - enum PpWindowState { - ppWindowNormal = 1, - ppWindowMinimized = 2, - ppWindowMaximized = 3 - }; - -// forward declarations - enum PpWindowState; - enum PpArrangeStyle; - enum PpViewType; - enum PpColorSchemeIndex; - enum PpSlideSizeType; - enum PpSaveAsFileType; - enum PpTextStyleType; - enum PpSlideLayout; - enum PpEntryEffect; - enum PpTextLevelEffect; - enum PpTextUnitEffect; - enum PpChartUnitEffect; - enum PpAfterEffect; - enum PpAdvanceMode; - enum PpSoundEffectType; - enum PpFollowColors; - enum PpUpdateOption; - enum PpParagraphAlignment; - enum PpBaselineAlignment; - enum PpTabStopType; - enum PpIndentControl; - enum PpChangeCase; - enum PpSlideShowPointerType; - enum PpSlideShowState; - enum PpSlideShowAdvanceMode; - enum PpFileDialogType; - enum PpPrintOutputType; - enum PpPrintHandoutOrder; - enum PpPrintColorType; - enum PpSelectionType; - enum PpDirection; - enum PpDateTimeFormat; - enum PpTransitionSpeed; - enum PpMouseActivation; - enum PpActionType; - enum PpPlaceholderType; - enum PpSlideShowType; - enum PpPrintRangeType; - enum PpAutoSize; - enum PpMediaType; - enum PpSoundFormatType; - enum PpFarEastLineBreakLevel; - enum PpSlideShowRangeType; - enum PpFrameColors; - class PresEvents; - class SldEvents; - class MouseTracker; - class MouseDownHandler; - class OCXExtenderEvents; - enum PpBorderType; - enum PpHTMLVersion; - enum PpPublishSourceType; - enum PpBulletType; - enum PpNumberedBulletStyle; - enum PpShapeFormat; - enum PpExportMode; - class EApplication; - class MasterEvents; - enum PpPasteDataType; - enum MsoAnimEffect; - enum MsoAnimateByLevel; - enum MsoAnimTriggerType; - enum MsoAnimAfterEffect; - enum MsoAnimTextUnitEffect; - enum MsoAnimEffectRestart; - enum MsoAnimEffectAfter; - enum MsoAnimDirection; - enum MsoAnimType; - enum MsoAnimAdditive; - enum MsoAnimAccumulate; - enum MsoAnimProperty; - enum PpAlertLevel; - enum PpRevisionInfo; - enum MsoAnimCommandType; - enum MsoAnimFilterEffectType; - enum MsoAnimFilterEffectSubtype; - enum PpWindowState; - enum PpArrangeStyle; - enum PpViewType; - enum PpColorSchemeIndex; - enum PpSlideSizeType; - enum PpSaveAsFileType; - enum PpTextStyleType; - enum PpSlideLayout; - enum PpEntryEffect; - enum PpTextLevelEffect; - enum PpTextUnitEffect; - enum PpChartUnitEffect; - enum PpAfterEffect; - enum PpAdvanceMode; - enum PpSoundEffectType; - enum PpFollowColors; - enum PpUpdateOption; - enum PpParagraphAlignment; - enum PpBaselineAlignment; - enum PpTabStopType; - enum PpIndentControl; - enum PpChangeCase; - enum PpSlideShowPointerType; - enum PpSlideShowState; - enum PpSlideShowAdvanceMode; - enum PpFileDialogType; - enum PpPrintOutputType; - enum PpPrintHandoutOrder; - enum PpPrintColorType; - enum PpSelectionType; - enum PpDirection; - enum PpDateTimeFormat; - enum PpTransitionSpeed; - enum PpMouseActivation; - enum PpActionType; - enum PpPlaceholderType; - enum PpSlideShowType; - enum PpPrintRangeType; - enum PpAutoSize; - enum PpMediaType; - enum PpSoundFormatType; - enum PpFarEastLineBreakLevel; - enum PpSlideShowRangeType; - enum PpFrameColors; - class Presentations; - class DocumentWindows; - class DocumentWindow; - class Presentation; - class SlideShowWindows; - class AddIns; - class DefaultWebOptions; - class AutoCorrect; - class Options; - class Application; - class SlideShowView; - class SlideRange; - class ShapeRange; - class TextRange; - class SlideShowWindow; - class Selection; - class View; - class Pane; - class Panes; - class PrintOptions; - class Slide; - class ColorFormat; - class MouseTracker; - class NamedSlideShows; - class NamedSlideShow; - class PrintRanges; - class PrintRange; - class AddIn; - class PresEvents; - class _Master; - class Slides; - class PageSetup; - class ColorSchemes; - class ExtraColors; - class SlideShowSettings; - class Fonts; - class Tags; - class Shape; - class PublishObjects; - class WebOptions; - class Designs; - class Hyperlink; - class Font; - class Shapes; - class HeadersFooters; - class SlideShowTransition; - class ColorScheme; - class Hyperlinks; - class Comments; - class Design; - class TimeLine; - class TextStyles; - class SldEvents; - class RGBColor; - class SoundEffect; - class HeaderFooter; - class FreeformBuilder; - class Placeholders; - class Adjustments; - class CalloutFormat; - class ConnectorFormat; - class FillFormat; - class GroupShapes; - class LineFormat; - class ShapeNodes; - class PictureFormat; - class ShadowFormat; - class TextEffectFormat; - class TextFrame; - class ThreeDFormat; - class OLEFormat; - class LinkFormat; - class PlaceholderFormat; - class AnimationSettings; - class ActionSettings; - class SoundFormat; - class Table; - class Diagram; - class DiagramNode; - class CanvasShapes; - class Ruler; - class ShapeNode; - class ObjectVerbs; - class PlaySettings; - class ActionSetting; - class ParagraphFormat; - class TabStops; - class RulerLevels; - class RulerLevel; - class TabStop; - class BulletFormat; - class TextStyle; - class TextStyleLevels; - class TextStyleLevel; - class MouseDownHandler; - class OCXExtenderEvents; - enum PpBorderType; - enum PpHTMLVersion; - enum PpPublishSourceType; - enum PpBulletType; - enum PpNumberedBulletStyle; - enum PpShapeFormat; - enum PpExportMode; - class EApplication; - class Columns; - class Rows; - class Cell; - class Column; - class CellRange; - class Row; - class Borders; - class PublishObject; - class MasterEvents; - enum PpPasteDataType; - class Comment; - class DiagramNodeChildren; - class DiagramNodes; - class Sequence; - class Sequences; - enum MsoAnimEffect; - enum MsoAnimateByLevel; - enum MsoAnimTriggerType; - enum MsoAnimAfterEffect; - enum MsoAnimTextUnitEffect; - class Effect; - enum MsoAnimEffectRestart; - enum MsoAnimEffectAfter; - class Timing; - class EffectParameters; - class AnimationBehaviors; - class EffectInformation; - enum MsoAnimDirection; - enum MsoAnimType; - class AnimationBehavior; - enum MsoAnimAdditive; - enum MsoAnimAccumulate; - class MotionEffect; - class ColorEffect; - class ScaleEffect; - class RotationEffect; - class PropertyEffect; - class CommandEffect; - class FilterEffect; - class SetEffect; - enum MsoAnimProperty; - class AnimationPoints; - class AnimationPoint; - enum PpAlertLevel; - enum PpRevisionInfo; - enum MsoAnimCommandType; - enum MsoAnimFilterEffectType; - enum MsoAnimFilterEffectSubtype; - -class POWERPOINT_EXPORT Collection : public QAxObject -{ -public: - Collection(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT _Application : public QAxObject -{ -public: - _Application(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Active - - For more information, see help context 502033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Active() const; //Returns the value of Active - - /* - Property ActivePresentation - - For more information, see help context 502005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* ActivePresentation() const; //Returns the value of ActivePresentation - - /* - Property ActivePrinter - - For more information, see help context 502017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ActivePrinter() const; //Returns the value of ActivePrinter - - /* - Property ActiveWindow - - For more information, see help context 502004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* ActiveWindow() const; //Returns the value of ActiveWindow - - /* - Property AddIns - - For more information, see help context 502019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIns* AddIns() const; //Returns the value of AddIns - - /* - Property AnswerWizard - - For more information, see help context 502035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::AnswerWizard* AnswerWizard() const; //Returns the value of AnswerWizard - - /* - Property Assistant - - For more information, see help context 502011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Assistant* Assistant() const; //Returns the value of Assistant - - /* - Property AutoCorrect - - For more information, see help context 502053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AutoCorrect* AutoCorrect() const; //Returns the value of AutoCorrect - - /* - Property AutomationSecurity - - For more information, see help context 502048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoAutomationSecurity AutomationSecurity() const; //Returns the value of AutomationSecurity - inline void SetAutomationSecurity(Office::MsoAutomationSecurity value); //Sets the value of the AutomationSecurity property - - /* - Property Build - - For more information, see help context 502014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Build() const; //Returns the value of Build - - /* - Property COMAddIns - - For more information, see help context 502036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::COMAddIns* COMAddIns() const; //Returns the value of COMAddIns - - /* - Property Caption - - For more information, see help context 502010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property CommandBars - - For more information, see help context 502007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Creator - - For more information, see help context 502018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DefaultWebOptions - - For more information, see help context 502038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DefaultWebOptions* DefaultWebOptions() const; //Returns the value of DefaultWebOptions - - /* - Property Dialogs - - For more information, see help context 502003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Dialogs() const; //Returns the value of Dialogs - - /* - Property DisplayAlerts - - For more information, see help context 502050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpAlertLevel DisplayAlerts() const; //Returns the value of DisplayAlerts - inline void SetDisplayAlerts(PowerPoint::PpAlertLevel value); //Sets the value of the DisplayAlerts property - - /* - Property DisplayGridLines - - For more information, see help context 502047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayGridLines() const; //Returns the value of DisplayGridLines - inline void SetDisplayGridLines(Office::MsoTriState value); //Sets the value of the DisplayGridLines property - - /* - Property FeatureInstall - - For more information, see help context 502043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoFeatureInstall FeatureInstall() const; //Returns the value of FeatureInstall - inline void SetFeatureInstall(Office::MsoFeatureInstall value); //Sets the value of the FeatureInstall property - - /* - Property FileFind - - For more information, see help context 502013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::IFind* FileFind() const; //Returns the value of FileFind - - /* - Property FileSearch - - For more information, see help context 502012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::FileSearch* FileSearch() const; //Returns the value of FileSearch - - /* - Property HWND - - For more information, see help context 502032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int HWND() const; //Returns the value of HWND - - /* - Property Height - - For more information, see help context 502029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property LanguageSettings - - For more information, see help context 502039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::LanguageSettings* LanguageSettings() const; //Returns the value of LanguageSettings - - /* - Property Left - - For more information, see help context 502026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Marker - - For more information, see help context 502042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Marker() const; //Returns the value of Marker - - /* - Property MsoDebugOptions - - For more information, see help context 502040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoDebugOptions* MsoDebugOptions() const; //Returns the value of MsoDebugOptions - - /* - Property Name - - For more information, see help context 502009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property NewPresentation - - For more information, see help context 502049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::NewFile* NewPresentation() const; //Returns the value of NewPresentation - - /* - Property OperatingSystem - - For more information, see help context 502016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString OperatingSystem() const; //Returns the value of OperatingSystem - - /* - Property Options - - For more information, see help context 502054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Options* Options() const; //Returns the value of Options - - /* - Property Path - - For more information, see help context 502008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property Presentations - - For more information, see help context 502001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentations* Presentations() const; //Returns the value of Presentations - - /* - Property ProductCode - - For more information, see help context 502037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ProductCode() const; //Returns the value of ProductCode - - /* - Property ShowStartupDialog - - For more information, see help context 502051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowStartupDialog() const; //Returns the value of ShowStartupDialog - inline void SetShowStartupDialog(Office::MsoTriState value); //Sets the value of the ShowStartupDialog property - - /* - Property ShowWindowsInTaskbar - - For more information, see help context 502041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowWindowsInTaskbar() const; //Returns the value of ShowWindowsInTaskbar - inline void SetShowWindowsInTaskbar(Office::MsoTriState value); //Sets the value of the ShowWindowsInTaskbar property - - /* - Property SlideShowWindows - - For more information, see help context 502006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindows* SlideShowWindows() const; //Returns the value of SlideShowWindows - - /* - Property Top - - For more information, see help context 502027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property VBE - - For more information, see help context 502020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline VBIDE::VBE* VBE() const; //Returns the value of VBE - - /* - Property Version - - For more information, see help context 502015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Version() const; //Returns the value of Version - - /* - Property Visible - - For more information, see help context 502031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 502028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property WindowState - - For more information, see help context 502030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpWindowState WindowState() const; //Returns the value of WindowState - inline void SetWindowState(PowerPoint::PpWindowState value); //Sets the value of the WindowState property - - /* - Property Windows - - For more information, see help context 502002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - - /* - Method Activate - - For more information, see help context 502034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - - /* - Method FileDialog - - For more information, see help context 502046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::FileDialog* FileDialog(Office::MsoFileDialogType Type); - - /* - Method GetOptionFlag - - For more information, see help context 502044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool GetOptionFlag(int Option); - - /* - Method GetOptionFlag - - For more information, see help context 502044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool GetOptionFlag(int Option, bool Persist); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(const QString& HelpFile); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(const QString& HelpFile, int ContextID); - - /* - Method LaunchSpelling - - For more information, see help context 502025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LaunchSpelling(PowerPoint::DocumentWindow* pWindow); - - /* - Method PPFileDialog - - For more information, see help context 502024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* PPFileDialog(PowerPoint::PpFileDialogType Type); - - /* - Method Quit - - For more information, see help context 502022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Quit(); - - /* - Method Run - - For more information, see help context 502023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Run(const QString& MacroName, QVariantList& safeArrayOfParams); - - /* - Method SetOptionFlag - - For more information, see help context 502045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetOptionFlag(int Option, bool State); - - /* - Method SetOptionFlag - - For more information, see help context 502045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetOptionFlag(int Option, bool State, bool Persist); - - /* - Method SetPerfMarker - - For more information, see help context 502052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetPerfMarker(int Marker); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT _Global : public QAxObject -{ -public: - _Global(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActivePresentation - - For more information, see help context 503001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* ActivePresentation() const; //Returns the value of ActivePresentation - - /* - Property ActiveWindow - - For more information, see help context 503002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* ActiveWindow() const; //Returns the value of ActiveWindow - - /* - Property AddIns - - For more information, see help context 503003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIns* AddIns() const; //Returns the value of AddIns - - /* - Property AnswerWizard - - For more information, see help context 503011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::AnswerWizard* AnswerWizard() const; //Returns the value of AnswerWizard - - /* - Property Application - - For more information, see help context 503004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Assistant - - For more information, see help context 503005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Assistant* Assistant() const; //Returns the value of Assistant - - /* - Property CommandBars - - For more information, see help context 503010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Dialogs - - For more information, see help context 503006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Dialogs() const; //Returns the value of Dialogs - - /* - Property Presentations - - For more information, see help context 503007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentations* Presentations() const; //Returns the value of Presentations - - /* - Property SlideShowWindows - - For more information, see help context 503008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindows* SlideShowWindows() const; //Returns the value of SlideShowWindows - - /* - Property Windows - - For more information, see help context 503009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ColorFormat : public QAxObject -{ -public: - ColorFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 506001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RGB - - For more information, see help context 506002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int RGB() const; //Returns the value of RGB - inline void SetRGB(int value); //Sets the value of the RGB property - - /* - Property SchemeColor - - For more information, see help context 506004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpColorSchemeIndex SchemeColor() const; //Returns the value of SchemeColor - inline void SetSchemeColor(PowerPoint::PpColorSchemeIndex value); //Sets the value of the SchemeColor property - - /* - Property TintAndShade - - For more information, see help context 506005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double TintAndShade() const; //Returns the value of TintAndShade - inline void SetTintAndShade(double value); //Sets the value of the TintAndShade property - - /* - Property Type - - For more information, see help context 506003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoColorType Type() const; //Returns the value of Type - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideShowWindow : public QAxObject -{ -public: - SlideShowWindow(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Active - - For more information, see help context 507011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Active() const; //Returns the value of Active - - /* - Property Application - - For more information, see help context 507001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property HWND - - For more information, see help context 507010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int HWND() const; //Returns the value of HWND - - /* - Property Height - - For more information, see help context 507009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property IsFullScreen - - For more information, see help context 507005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState IsFullScreen() const; //Returns the value of IsFullScreen - - /* - Property Left - - For more information, see help context 507006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Parent - - For more information, see help context 507002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Presentation - - For more information, see help context 507004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Presentation() const; //Returns the value of Presentation - - /* - Property Top - - For more information, see help context 507007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property View - - For more information, see help context 507003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowView* View() const; //Returns the value of View - - /* - Property Width - - For more information, see help context 507008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Method Activate - - For more information, see help context 507012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Selection : public QAxObject -{ -public: - Selection(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 508001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property ChildShapeRange - - For more information, see help context 508011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* ChildShapeRange() const; //Returns the value of ChildShapeRange - - /* - Property HasChildShapeRange - - For more information, see help context 508012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool HasChildShapeRange() const; //Returns the value of HasChildShapeRange - - /* - Property Parent - - For more information, see help context 508002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ShapeRange - - For more information, see help context 508009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* ShapeRange() const; //Returns the value of ShapeRange - - /* - Property SlideRange - - For more information, see help context 508008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* SlideRange() const; //Returns the value of SlideRange - - /* - Property TextRange - - For more information, see help context 508010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* TextRange() const; //Returns the value of TextRange - - /* - Property Type - - For more information, see help context 508007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSelectionType Type() const; //Returns the value of Type - - /* - Method Copy - - For more information, see help context 508004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 508003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 508005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Unselect - - For more information, see help context 508006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Unselect(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DocumentWindows : public QAxObject -{ -public: - DocumentWindows(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 509001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 509002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Arrange - - For more information, see help context 509004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Arrange(); - - /* - Method Arrange - - For more information, see help context 509004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Arrange(PowerPoint::PpArrangeStyle arrangeStyle); - - /* - Method Item - - For more information, see help context 509003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideShowWindows : public QAxObject -{ -public: - SlideShowWindows(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 510001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 510002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 510003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindow* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DocumentWindow : public QAxObject -{ -public: - DocumentWindow(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Active - - For more information, see help context 511008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Active() const; //Returns the value of Active - - /* - Property ActivePane - - For more information, see help context 511022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Pane* ActivePane() const; //Returns the value of ActivePane - - /* - Property Application - - For more information, see help context 511001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BlackAndWhite - - For more information, see help context 511007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState BlackAndWhite() const; //Returns the value of BlackAndWhite - inline void SetBlackAndWhite(Office::MsoTriState value); //Sets the value of the BlackAndWhite property - - /* - Property Caption - - For more information, see help context 511010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Caption() const; //Returns the value of Caption - - /* - Property HWND - - For more information, see help context 511021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int HWND() const; //Returns the value of HWND - - /* - Property Height - - For more information, see help context 511014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property Left - - For more information, see help context 511011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Panes - - For more information, see help context 511023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Panes* Panes() const; //Returns the value of Panes - - /* - Property Parent - - For more information, see help context 511002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Presentation - - For more information, see help context 511005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Presentation() const; //Returns the value of Presentation - - /* - Property Selection - - For more information, see help context 511003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Selection* Selection() const; //Returns the value of Selection - - /* - Property SplitHorizontal - - For more information, see help context 511025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SplitHorizontal() const; //Returns the value of SplitHorizontal - inline void SetSplitHorizontal(int value); //Sets the value of the SplitHorizontal property - - /* - Property SplitVertical - - For more information, see help context 511024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SplitVertical() const; //Returns the value of SplitVertical - inline void SetSplitVertical(int value); //Sets the value of the SplitVertical property - - /* - Property Top - - For more information, see help context 511012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property View - - For more information, see help context 511004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::View* View() const; //Returns the value of View - - /* - Property ViewType - - For more information, see help context 511006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpViewType ViewType() const; //Returns the value of ViewType - inline void SetViewType(PowerPoint::PpViewType value); //Sets the value of the ViewType property - - /* - Property Width - - For more information, see help context 511013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property WindowState - - For more information, see help context 511009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpWindowState WindowState() const; //Returns the value of WindowState - inline void SetWindowState(PowerPoint::PpWindowState value); //Sets the value of the WindowState property - - /* - Method Activate - - For more information, see help context 511016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - - /* - Method Close - - For more information, see help context 511020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Close(); - - /* - Method FitToPage - - For more information, see help context 511015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FitToPage(); - - /* - Method LargeScroll - - For more information, see help context 511017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LargeScroll(); - - /* - Method LargeScroll - - For more information, see help context 511017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LargeScroll(int Down); - - /* - Method LargeScroll - - For more information, see help context 511017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LargeScroll(int Down, int Up); - - /* - Method LargeScroll - - For more information, see help context 511017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LargeScroll(int Down, int Up, int ToRight); - - /* - Method LargeScroll - - For more information, see help context 511017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LargeScroll(int Down, int Up, int ToRight, int ToLeft); - - /* - Method NewWindow - - For more information, see help context 511019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* NewWindow(); - - /* - Method PointsToScreenPixelsX - - For more information, see help context 511027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PointsToScreenPixelsX(double Points); - - /* - Method PointsToScreenPixelsY - - For more information, see help context 511028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PointsToScreenPixelsY(double Points); - - /* - Method RangeFromPoint - - For more information, see help context 511026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* RangeFromPoint(int X, int Y); - - /* - Method ScrollIntoView - - For more information, see help context 511029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScrollIntoView(double Left, double Top, double Width, double Height); - - /* - Method ScrollIntoView - - For more information, see help context 511029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScrollIntoView(double Left, double Top, double Width, double Height, Office::MsoTriState Start); - - /* - Method SmallScroll - - For more information, see help context 511018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SmallScroll(); - - /* - Method SmallScroll - - For more information, see help context 511018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SmallScroll(int Down); - - /* - Method SmallScroll - - For more information, see help context 511018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SmallScroll(int Down, int Up); - - /* - Method SmallScroll - - For more information, see help context 511018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SmallScroll(int Down, int Up, int ToRight); - - /* - Method SmallScroll - - For more information, see help context 511018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SmallScroll(int Down, int Up, int ToRight, int ToLeft); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT View : public QAxObject -{ -public: - View(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 512001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property DisplaySlideMiniature - - For more information, see help context 512008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplaySlideMiniature() const; //Returns the value of DisplaySlideMiniature - inline void SetDisplaySlideMiniature(Office::MsoTriState value); //Sets the value of the DisplaySlideMiniature property - - /* - Property Parent - - For more information, see help context 512002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PrintOptions - - For more information, see help context 512011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintOptions* PrintOptions() const; //Returns the value of PrintOptions - - /* - Property Slide - - For more information, see help context 512006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Slide() const; //Returns the value of Slide - inline void SetSlide(IDispatch* value); //Sets the value of the Slide property - - /* - Property Type - - For more information, see help context 512003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpViewType Type() const; //Returns the value of Type - - /* - Property Zoom - - For more information, see help context 512004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Zoom() const; //Returns the value of Zoom - inline void SetZoom(int value); //Sets the value of the Zoom property - - /* - Property ZoomToFit - - For more information, see help context 512009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ZoomToFit() const; //Returns the value of ZoomToFit - inline void SetZoomToFit(Office::MsoTriState value); //Sets the value of the ZoomToFit property - - /* - Method GotoSlide - - For more information, see help context 512007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void GotoSlide(int Index); - - /* - Method Paste - - For more information, see help context 512005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Paste(); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel); - - /* - Method PasteSpecial - - For more information, see help context 512010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies); - - /* - Method PrintOut - - For more information, see help context 512012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideShowView : public QAxObject -{ -public: - SlideShowView(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AcceleratorsEnabled - - For more information, see help context 513007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AcceleratorsEnabled() const; //Returns the value of AcceleratorsEnabled - inline void SetAcceleratorsEnabled(Office::MsoTriState value); //Sets the value of the AcceleratorsEnabled property - - /* - Property AdvanceMode - - For more information, see help context 513011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowAdvanceMode AdvanceMode() const; //Returns the value of AdvanceMode - - /* - Property Application - - For more information, see help context 513001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property CurrentShowPosition - - For more information, see help context 513027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int CurrentShowPosition() const; //Returns the value of CurrentShowPosition - - /* - Property IsNamedShow - - For more information, see help context 513013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState IsNamedShow() const; //Returns the value of IsNamedShow - - /* - Property LastSlideViewed - - For more information, see help context 513010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* LastSlideViewed() const; //Returns the value of LastSlideViewed - - /* - Property Parent - - For more information, see help context 513002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PointerColor - - For more information, see help context 513012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* PointerColor() const; //Returns the value of PointerColor - - /* - Property PointerType - - For more information, see help context 513005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowPointerType PointerType() const; //Returns the value of PointerType - inline void SetPointerType(PowerPoint::PpSlideShowPointerType value); //Sets the value of the PointerType property - - /* - Property PresentationElapsedTime - - For more information, see help context 513008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double PresentationElapsedTime() const; //Returns the value of PresentationElapsedTime - - /* - Property Slide - - For more information, see help context 513004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* Slide() const; //Returns the value of Slide - - /* - Property SlideElapsedTime - - For more information, see help context 513009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SlideElapsedTime() const; //Returns the value of SlideElapsedTime - inline void SetSlideElapsedTime(double value); //Sets the value of the SlideElapsedTime property - - /* - Property SlideShowName - - For more information, see help context 513014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SlideShowName() const; //Returns the value of SlideShowName - - /* - Property State - - For more information, see help context 513006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowState State() const; //Returns the value of State - inline void SetState(PowerPoint::PpSlideShowState value); //Sets the value of the State property - - /* - Property Zoom - - For more information, see help context 513003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Zoom() const; //Returns the value of Zoom - - /* - Method DrawLine - - For more information, see help context 513015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void DrawLine(double BeginX, double BeginY, double EndX, double EndY); - - /* - Method EndNamedShow - - For more information, see help context 513023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EndNamedShow(); - - /* - Method EraseDrawing - - For more information, see help context 513016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EraseDrawing(); - - /* - Method Exit - - For more information, see help context 513025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Exit(); - - /* - Method First - - For more information, see help context 513017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void First(); - - /* - Method GotoNamedShow - - For more information, see help context 513022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void GotoNamedShow(const QString& SlideShowName); - - /* - Method GotoSlide - - For more information, see help context 513021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void GotoSlide(int Index); - - /* - Method GotoSlide - - For more information, see help context 513021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void GotoSlide(int Index, Office::MsoTriState ResetSlide); - - /* - Method InstallTracker - - For more information, see help context 513026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void InstallTracker(PowerPoint::MouseTracker* pTracker, Office::MsoTriState Presenter); - - /* - Method Last - - For more information, see help context 513018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Last(); - - /* - Method Next - - For more information, see help context 513019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Next(); - - /* - Method Previous - - For more information, see help context 513020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Previous(); - - /* - Method ResetSlideTime - - For more information, see help context 513024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ResetSlideTime(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideShowSettings : public QAxObject -{ -public: - SlideShowSettings(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AdvanceMode - - For more information, see help context 514007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowAdvanceMode AdvanceMode() const; //Returns the value of AdvanceMode - inline void SetAdvanceMode(PowerPoint::PpSlideShowAdvanceMode value); //Sets the value of the AdvanceMode property - - /* - Property Application - - For more information, see help context 514001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property EndingSlide - - For more information, see help context 514006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int EndingSlide() const; //Returns the value of EndingSlide - inline void SetEndingSlide(int value); //Sets the value of the EndingSlide property - - /* - Property LoopUntilStopped - - For more information, see help context 514009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LoopUntilStopped() const; //Returns the value of LoopUntilStopped - inline void SetLoopUntilStopped(Office::MsoTriState value); //Sets the value of the LoopUntilStopped property - - /* - Property NamedSlideShows - - For more information, see help context 514004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::NamedSlideShows* NamedSlideShows() const; //Returns the value of NamedSlideShows - - /* - Property Parent - - For more information, see help context 514002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PointerColor - - For more information, see help context 514003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* PointerColor() const; //Returns the value of PointerColor - - /* - Property RangeType - - For more information, see help context 514014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowRangeType RangeType() const; //Returns the value of RangeType - inline void SetRangeType(PowerPoint::PpSlideShowRangeType value); //Sets the value of the RangeType property - - /* - Property ShowScrollbar - - For more information, see help context 514015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowScrollbar() const; //Returns the value of ShowScrollbar - inline void SetShowScrollbar(Office::MsoTriState value); //Sets the value of the ShowScrollbar property - - /* - Property ShowType - - For more information, see help context 514010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideShowType ShowType() const; //Returns the value of ShowType - inline void SetShowType(PowerPoint::PpSlideShowType value); //Sets the value of the ShowType property - - /* - Property ShowWithAnimation - - For more information, see help context 514012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowWithAnimation() const; //Returns the value of ShowWithAnimation - inline void SetShowWithAnimation(Office::MsoTriState value); //Sets the value of the ShowWithAnimation property - - /* - Property ShowWithNarration - - For more information, see help context 514011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowWithNarration() const; //Returns the value of ShowWithNarration - inline void SetShowWithNarration(Office::MsoTriState value); //Sets the value of the ShowWithNarration property - - /* - Property SlideShowName - - For more information, see help context 514013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SlideShowName() const; //Returns the value of SlideShowName - inline void SetSlideShowName(const QString& value); //Sets the value of the SlideShowName property - - /* - Property StartingSlide - - For more information, see help context 514005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int StartingSlide() const; //Returns the value of StartingSlide - inline void SetStartingSlide(int value); //Sets the value of the StartingSlide property - - /* - Method Run - - For more information, see help context 514008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindow* Run(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT NamedSlideShows : public QAxObject -{ -public: - NamedSlideShows(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 515001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 515002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 515004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::NamedSlideShow* Add(const QString& Name, const QVariant& safeArrayOfSlideIDs); - - /* - Method Item - - For more information, see help context 515003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::NamedSlideShow* Item(const QVariant& Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT NamedSlideShow : public QAxObject -{ -public: - NamedSlideShow(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 516001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 516006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Name - - For more information, see help context 516003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 516002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SlideIDs - - For more information, see help context 516005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant SlideIDs() const; //Returns the value of SlideIDs - - /* - Method Delete - - For more information, see help context 516004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PrintOptions : public QAxObject -{ -public: - PrintOptions(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActivePrinter - - For more information, see help context 517015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ActivePrinter() const; //Returns the value of ActivePrinter - inline void SetActivePrinter(const QString& value); //Sets the value of the ActivePrinter property - - /* - Property Application - - For more information, see help context 517001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Collate - - For more information, see help context 517003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Collate() const; //Returns the value of Collate - inline void SetCollate(Office::MsoTriState value); //Sets the value of the Collate property - - /* - Property FitToPage - - For more information, see help context 517004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FitToPage() const; //Returns the value of FitToPage - inline void SetFitToPage(Office::MsoTriState value); //Sets the value of the FitToPage property - - /* - Property FrameSlides - - For more information, see help context 517005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FrameSlides() const; //Returns the value of FrameSlides - inline void SetFrameSlides(Office::MsoTriState value); //Sets the value of the FrameSlides property - - /* - Property HandoutOrder - - For more information, see help context 517016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPrintHandoutOrder HandoutOrder() const; //Returns the value of HandoutOrder - inline void SetHandoutOrder(PowerPoint::PpPrintHandoutOrder value); //Sets the value of the HandoutOrder property - - /* - Property NumberOfCopies - - For more information, see help context 517006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int NumberOfCopies() const; //Returns the value of NumberOfCopies - inline void SetNumberOfCopies(int value); //Sets the value of the NumberOfCopies property - - /* - Property OutputType - - For more information, see help context 517007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPrintOutputType OutputType() const; //Returns the value of OutputType - inline void SetOutputType(PowerPoint::PpPrintOutputType value); //Sets the value of the OutputType property - - /* - Property Parent - - For more information, see help context 517008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PrintColorType - - For more information, see help context 517002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPrintColorType PrintColorType() const; //Returns the value of PrintColorType - inline void SetPrintColorType(PowerPoint::PpPrintColorType value); //Sets the value of the PrintColorType property - - /* - Property PrintComments - - For more information, see help context 517017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PrintComments() const; //Returns the value of PrintComments - inline void SetPrintComments(Office::MsoTriState value); //Sets the value of the PrintComments property - - /* - Property PrintFontsAsGraphics - - For more information, see help context 517013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PrintFontsAsGraphics() const; //Returns the value of PrintFontsAsGraphics - inline void SetPrintFontsAsGraphics(Office::MsoTriState value); //Sets the value of the PrintFontsAsGraphics property - - /* - Property PrintHiddenSlides - - For more information, see help context 517009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PrintHiddenSlides() const; //Returns the value of PrintHiddenSlides - inline void SetPrintHiddenSlides(Office::MsoTriState value); //Sets the value of the PrintHiddenSlides property - - /* - Property PrintInBackground - - For more information, see help context 517010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PrintInBackground() const; //Returns the value of PrintInBackground - inline void SetPrintInBackground(Office::MsoTriState value); //Sets the value of the PrintInBackground property - - /* - Property RangeType - - For more information, see help context 517011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPrintRangeType RangeType() const; //Returns the value of RangeType - inline void SetRangeType(PowerPoint::PpPrintRangeType value); //Sets the value of the RangeType property - - /* - Property Ranges - - For more information, see help context 517012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintRanges* Ranges() const; //Returns the value of Ranges - - /* - Property SlideShowName - - For more information, see help context 517014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SlideShowName() const; //Returns the value of SlideShowName - inline void SetSlideShowName(const QString& value); //Sets the value of the SlideShowName property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PrintRanges : public QAxObject -{ -public: - PrintRanges(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 518002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 518005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 518001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintRange* Add(int Start, int End); - - /* - Method ClearAll - - For more information, see help context 518003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ClearAll(); - - /* - Method Item - - For more information, see help context 518004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintRange* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PrintRange : public QAxObject -{ -public: - PrintRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 519001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property End - - For more information, see help context 519004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int End() const; //Returns the value of End - - /* - Property Parent - - For more information, see help context 519002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Start - - For more information, see help context 519003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Start() const; //Returns the value of Start - - /* - Method Delete - - For more information, see help context 519005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AddIns : public QAxObject -{ -public: - AddIns(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 520001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 520002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 520004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIn* Add(const QString& FileName); - - /* - Method Item - - For more information, see help context 520003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIn* Item(QVariant& Index); - - /* - Method Remove - - For more information, see help context 520005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Remove(QVariant& Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AddIn : public QAxObject -{ -public: - AddIn(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 521001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property AutoLoad - - For more information, see help context 521007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoLoad() const; //Returns the value of AutoLoad - inline void SetAutoLoad(Office::MsoTriState value); //Sets the value of the AutoLoad property - - /* - Property DisplayAlerts - - For more information, see help context 521009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayAlerts() const; //Returns the value of DisplayAlerts - inline void SetDisplayAlerts(Office::MsoTriState value); //Sets the value of the DisplayAlerts property - - /* - Property FullName - - For more information, see help context 521003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FullName() const; //Returns the value of FullName - - /* - Property Loaded - - For more information, see help context 521008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Loaded() const; //Returns the value of Loaded - inline void SetLoaded(Office::MsoTriState value); //Sets the value of the Loaded property - - /* - Property Name - - For more information, see help context 521004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property Parent - - For more information, see help context 521002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Path - - For more information, see help context 521005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property Registered - - For more information, see help context 521006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Registered() const; //Returns the value of Registered - inline void SetRegistered(Office::MsoTriState value); //Sets the value of the Registered property - - /* - Property RegisteredInHKLM - - For more information, see help context 521010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RegisteredInHKLM() const; //Returns the value of RegisteredInHKLM - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Presentations : public QAxObject -{ -public: - Presentations(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 522001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 522002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 522004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Add(); - - /* - Method Add - - For more information, see help context 522004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Add(Office::MsoTriState WithWindow); - - /* - Method CanCheckOut - - For more information, see help context 522008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool CanCheckOut(const QString& FileName); - - /* - Method CheckOut - - For more information, see help context 522007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckOut(const QString& FileName); - - /* - Method Item - - For more information, see help context 522003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Item(const QVariant& Index); - - /* - Method Open - - For more information, see help context 522006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Open(const QString& FileName); - - /* - Method Open - - For more information, see help context 522006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Open(const QString& FileName, Office::MsoTriState ReadOnly); - - /* - Method Open - - For more information, see help context 522006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Open(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled); - - /* - Method Open - - For more information, see help context 522006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* Open(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled, Office::MsoTriState WithWindow); - - /* - Method OpenOld - - For more information, see help context 522005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* OpenOld(const QString& FileName); - - /* - Method OpenOld - - For more information, see help context 522005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* OpenOld(const QString& FileName, Office::MsoTriState ReadOnly); - - /* - Method OpenOld - - For more information, see help context 522005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* OpenOld(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled); - - /* - Method OpenOld - - For more information, see help context 522005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* OpenOld(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled, Office::MsoTriState WithWindow); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class PresEvents : public QAxObject {}; - -class POWERPOINT_EXPORT Hyperlinks : public QAxObject -{ -public: - Hyperlinks(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 525001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 525002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 525003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlink* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Hyperlink : public QAxObject -{ -public: - Hyperlink(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Address - - For more information, see help context 526004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Address() const; //Returns the value of Address - inline void SetAddress(const QString& value); //Sets the value of the Address property - - /* - Property Application - - For more information, see help context 526001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property EmailSubject - - For more information, see help context 526007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString EmailSubject() const; //Returns the value of EmailSubject - inline void SetEmailSubject(const QString& value); //Sets the value of the EmailSubject property - - /* - Property Parent - - For more information, see help context 526002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ScreenTip - - For more information, see help context 526008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ScreenTip() const; //Returns the value of ScreenTip - inline void SetScreenTip(const QString& value); //Sets the value of the ScreenTip property - - /* - Property ShowAndReturn - - For more information, see help context 526010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowAndReturn() const; //Returns the value of ShowAndReturn - inline void SetShowAndReturn(Office::MsoTriState value); //Sets the value of the ShowAndReturn property - - /* - Property SubAddress - - For more information, see help context 526005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SubAddress() const; //Returns the value of SubAddress - inline void SetSubAddress(const QString& value); //Sets the value of the SubAddress property - - /* - Property TextToDisplay - - For more information, see help context 526009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString TextToDisplay() const; //Returns the value of TextToDisplay - inline void SetTextToDisplay(const QString& value); //Sets the value of the TextToDisplay property - - /* - Property Type - - For more information, see help context 526003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoHyperlinkType Type() const; //Returns the value of Type - - /* - Method AddToFavorites - - For more information, see help context 526006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddToFavorites(); - - /* - Method CreateNewDocument - - For more information, see help context 526012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CreateNewDocument(const QString& FileName, Office::MsoTriState EditNow, Office::MsoTriState Overwrite); - - /* - Method Delete - - For more information, see help context 526013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Follow - - For more information, see help context 526011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Follow(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PageSetup : public QAxObject -{ -public: - PageSetup(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 527001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property FirstSlideNumber - - For more information, see help context 527003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int FirstSlideNumber() const; //Returns the value of FirstSlideNumber - inline void SetFirstSlideNumber(int value); //Sets the value of the FirstSlideNumber property - - /* - Property NotesOrientation - - For more information, see help context 527007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoOrientation NotesOrientation() const; //Returns the value of NotesOrientation - inline void SetNotesOrientation(Office::MsoOrientation value); //Sets the value of the NotesOrientation property - - /* - Property Parent - - For more information, see help context 527002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SlideHeight - - For more information, see help context 527004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SlideHeight() const; //Returns the value of SlideHeight - inline void SetSlideHeight(double value); //Sets the value of the SlideHeight property - - /* - Property SlideOrientation - - For more information, see help context 527008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoOrientation SlideOrientation() const; //Returns the value of SlideOrientation - inline void SetSlideOrientation(Office::MsoOrientation value); //Sets the value of the SlideOrientation property - - /* - Property SlideSize - - For more information, see help context 527006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideSizeType SlideSize() const; //Returns the value of SlideSize - inline void SetSlideSize(PowerPoint::PpSlideSizeType value); //Sets the value of the SlideSize property - - /* - Property SlideWidth - - For more information, see help context 527005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SlideWidth() const; //Returns the value of SlideWidth - inline void SetSlideWidth(double value); //Sets the value of the SlideWidth property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Fonts : public QAxObject -{ -public: - Fonts(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 528001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 528002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 528003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Font* Item(const QVariant& Index); - - /* - Method Replace - - For more information, see help context 528004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Replace(const QString& Original, const QString& Replacement); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ExtraColors : public QAxObject -{ -public: - ExtraColors(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 529001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 529002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 529004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Add(int Type); - - /* - Method Item - - For more information, see help context 529003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Slides : public QAxObject -{ -public: - Slides(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 530001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 530002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 530005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* Add(int Index, PowerPoint::PpSlideLayout Layout); - - /* - Method FindBySlideID - - For more information, see help context 530004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* FindBySlideID(int SlideID); - - /* - Method InsertFromFile - - For more information, see help context 530006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int InsertFromFile(const QString& FileName, int Index); - - /* - Method InsertFromFile - - For more information, see help context 530006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int InsertFromFile(const QString& FileName, int Index, int SlideStart); - - /* - Method InsertFromFile - - For more information, see help context 530006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int InsertFromFile(const QString& FileName, int Index, int SlideStart, int SlideEnd); - - /* - Method Item - - For more information, see help context 530003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* Item(const QVariant& Index); - - /* - Method Paste - - For more information, see help context 530008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Paste(); - - /* - Method Paste - - For more information, see help context 530008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Paste(int Index); - - /* - Method Range - - For more information, see help context 530007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Range(); - - /* - Method Range - - For more information, see help context 530007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Range(const QVariant& Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT _Slide : public QAxObject -{ -public: - _Slide(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 531001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 531007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Background() const; //Returns the value of Background - - /* - Property ColorScheme - - For more information, see help context 531006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* ColorScheme() const; //Returns the value of ColorScheme - inline void SetColorScheme(PowerPoint::ColorScheme* value); //Sets the value of the ColorScheme property - - /* - Property Comments - - For more information, see help context 531028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Comments* Comments() const; //Returns the value of Comments - - /* - Property Design - - For more information, see help context 531029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Design() const; //Returns the value of Design - inline void SetDesign(PowerPoint::Design* value); //Sets the value of the Design property - - /* - Property DisplayMasterShapes - - For more information, see help context 531020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayMasterShapes() const; //Returns the value of DisplayMasterShapes - inline void SetDisplayMasterShapes(Office::MsoTriState value); //Sets the value of the DisplayMasterShapes property - - /* - Property FollowMasterBackground - - For more information, see help context 531021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FollowMasterBackground() const; //Returns the value of FollowMasterBackground - inline void SetFollowMasterBackground(Office::MsoTriState value); //Sets the value of the FollowMasterBackground property - - /* - Property HeadersFooters - - For more information, see help context 531004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeadersFooters* HeadersFooters() const; //Returns the value of HeadersFooters - - /* - Property Hyperlinks - - For more information, see help context 531024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlinks* Hyperlinks() const; //Returns the value of Hyperlinks - - /* - Property Layout - - For more information, see help context 531014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideLayout Layout() const; //Returns the value of Layout - inline void SetLayout(PowerPoint::PpSlideLayout value); //Sets the value of the Layout property - - /* - Property Master - - For more information, see help context 531023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* Master() const; //Returns the value of Master - - /* - Property Name - - For more information, see help context 531008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property NotesPage - - For more information, see help context 531022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* NotesPage() const; //Returns the value of NotesPage - - /* - Property Parent - - For more information, see help context 531002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PrintSteps - - For more information, see help context 531010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PrintSteps() const; //Returns the value of PrintSteps - - /* - Property Scripts - - For more information, see help context 531026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Scripts* Scripts() const; //Returns the value of Scripts - - /* - Property Shapes - - For more information, see help context 531003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shapes* Shapes() const; //Returns the value of Shapes - - /* - Property SlideID - - For more information, see help context 531009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideID() const; //Returns the value of SlideID - - /* - Property SlideIndex - - For more information, see help context 531018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideIndex() const; //Returns the value of SlideIndex - - /* - Property SlideNumber - - For more information, see help context 531019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideNumber() const; //Returns the value of SlideNumber - - /* - Property SlideShowTransition - - For more information, see help context 531005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowTransition* SlideShowTransition() const; //Returns the value of SlideShowTransition - - /* - Property Tags - - For more information, see help context 531017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TimeLine - - For more information, see help context 531031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TimeLine* TimeLine() const; //Returns the value of TimeLine - - /* - Method ApplyTemplate - - For more information, see help context 531032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ApplyTemplate(const QString& FileName); - - /* - Method Copy - - For more information, see help context 531013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 531012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 531016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Duplicate - - For more information, see help context 531015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Duplicate(); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight); - - /* - Method MoveTo - - For more information, see help context 531030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveTo(int toPos); - - /* - Method Select - - For more information, see help context 531011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideRange : public QAxObject -{ -public: - SlideRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 532001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 532007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Background() const; //Returns the value of Background - - /* - Property ColorScheme - - For more information, see help context 532006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* ColorScheme() const; //Returns the value of ColorScheme - inline void SetColorScheme(PowerPoint::ColorScheme* value); //Sets the value of the ColorScheme property - - /* - Property Comments - - For more information, see help context 532032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Comments* Comments() const; //Returns the value of Comments - - /* - Property Count - - For more information, see help context 532029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Design - - For more information, see help context 532033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Design() const; //Returns the value of Design - inline void SetDesign(PowerPoint::Design* value); //Sets the value of the Design property - - /* - Property DisplayMasterShapes - - For more information, see help context 532020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayMasterShapes() const; //Returns the value of DisplayMasterShapes - inline void SetDisplayMasterShapes(Office::MsoTriState value); //Sets the value of the DisplayMasterShapes property - - /* - Property FollowMasterBackground - - For more information, see help context 532021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FollowMasterBackground() const; //Returns the value of FollowMasterBackground - inline void SetFollowMasterBackground(Office::MsoTriState value); //Sets the value of the FollowMasterBackground property - - /* - Property HeadersFooters - - For more information, see help context 532004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeadersFooters* HeadersFooters() const; //Returns the value of HeadersFooters - - /* - Property Hyperlinks - - For more information, see help context 532024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlinks* Hyperlinks() const; //Returns the value of Hyperlinks - - /* - Property Layout - - For more information, see help context 532014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideLayout Layout() const; //Returns the value of Layout - inline void SetLayout(PowerPoint::PpSlideLayout value); //Sets the value of the Layout property - - /* - Property Master - - For more information, see help context 532023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* Master() const; //Returns the value of Master - - /* - Property Name - - For more information, see help context 532008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property NotesPage - - For more information, see help context 532022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* NotesPage() const; //Returns the value of NotesPage - - /* - Property Parent - - For more information, see help context 532002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PrintSteps - - For more information, see help context 532010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PrintSteps() const; //Returns the value of PrintSteps - - /* - Property Scripts - - For more information, see help context 532030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Scripts* Scripts() const; //Returns the value of Scripts - - /* - Property Shapes - - For more information, see help context 532003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shapes* Shapes() const; //Returns the value of Shapes - - /* - Property SlideID - - For more information, see help context 532009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideID() const; //Returns the value of SlideID - - /* - Property SlideIndex - - For more information, see help context 532018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideIndex() const; //Returns the value of SlideIndex - - /* - Property SlideNumber - - For more information, see help context 532019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideNumber() const; //Returns the value of SlideNumber - - /* - Property SlideShowTransition - - For more information, see help context 532005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowTransition* SlideShowTransition() const; //Returns the value of SlideShowTransition - - /* - Property Tags - - For more information, see help context 532017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TimeLine - - For more information, see help context 532035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TimeLine* TimeLine() const; //Returns the value of TimeLine - - /* - Property _NewEnum - - For more information, see help context 532027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method ApplyTemplate - - For more information, see help context 532036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ApplyTemplate(const QString& FileName); - - /* - Method Copy - - For more information, see help context 532013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 532012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 532016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Duplicate - - For more information, see help context 532015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Duplicate(); - - /* - Method Export - - For more information, see help context 532025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName); - - /* - Method Export - - For more information, see help context 532025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth); - - /* - Method Export - - For more information, see help context 532025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight); - - /* - Method Item - - For more information, see help context 532026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slide* Item(const QVariant& Index); - - /* - Method MoveTo - - For more information, see help context 532034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveTo(int toPos); - - /* - Method Select - - For more information, see help context 532011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - - /* - Method _Index - - For more information, see help context 532028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT _Master : public QAxObject -{ -public: - _Master(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 533001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 533006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Background() const; //Returns the value of Background - - /* - Property ColorScheme - - For more information, see help context 533005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* ColorScheme() const; //Returns the value of ColorScheme - inline void SetColorScheme(PowerPoint::ColorScheme* value); //Sets the value of the ColorScheme property - - /* - Property Design - - For more information, see help context 533014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Design() const; //Returns the value of Design - - /* - Property HeadersFooters - - For more information, see help context 533004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeadersFooters* HeadersFooters() const; //Returns the value of HeadersFooters - - /* - Property Height - - For more information, see help context 533009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - - /* - Property Hyperlinks - - For more information, see help context 533012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlinks* Hyperlinks() const; //Returns the value of Hyperlinks - - /* - Property Name - - For more information, see help context 533007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 533002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Scripts - - For more information, see help context 533013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Scripts* Scripts() const; //Returns the value of Scripts - - /* - Property Shapes - - For more information, see help context 533003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shapes* Shapes() const; //Returns the value of Shapes - - /* - Property SlideShowTransition - - For more information, see help context 533016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowTransition* SlideShowTransition() const; //Returns the value of SlideShowTransition - - /* - Property TextStyles - - For more information, see help context 533011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextStyles* TextStyles() const; //Returns the value of TextStyles - - /* - Property TimeLine - - For more information, see help context 533015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TimeLine* TimeLine() const; //Returns the value of TimeLine - - /* - Property Width - - For more information, see help context 533010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - - /* - Method Delete - - For more information, see help context 533008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class SldEvents : public QAxObject {}; - -class POWERPOINT_EXPORT ColorSchemes : public QAxObject -{ -public: - ColorSchemes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 536001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 536002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 536004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* Add(); - - /* - Method Add - - For more information, see help context 536004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* Add(PowerPoint::ColorScheme* Scheme); - - /* - Method Item - - For more information, see help context 536003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ColorScheme : public QAxObject -{ -public: - ColorScheme(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 537001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 537002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Colors - - For more information, see help context 537003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::RGBColor* Colors(PowerPoint::PpColorSchemeIndex SchemeColor); - - /* - Method Delete - - For more information, see help context 537004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT RGBColor : public QAxObject -{ -public: - RGBColor(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 538001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 538002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RGB - - For more information, see help context 538003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int RGB() const; //Returns the value of RGB - inline void SetRGB(int value); //Sets the value of the RGB property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SlideShowTransition : public QAxObject -{ -public: - SlideShowTransition(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AdvanceOnClick - - For more information, see help context 539003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AdvanceOnClick() const; //Returns the value of AdvanceOnClick - inline void SetAdvanceOnClick(Office::MsoTriState value); //Sets the value of the AdvanceOnClick property - - /* - Property AdvanceOnTime - - For more information, see help context 539004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AdvanceOnTime() const; //Returns the value of AdvanceOnTime - inline void SetAdvanceOnTime(Office::MsoTriState value); //Sets the value of the AdvanceOnTime property - - /* - Property AdvanceTime - - For more information, see help context 539005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double AdvanceTime() const; //Returns the value of AdvanceTime - inline void SetAdvanceTime(double value); //Sets the value of the AdvanceTime property - - /* - Property Application - - For more information, see help context 539001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property EntryEffect - - For more information, see help context 539006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpEntryEffect EntryEffect() const; //Returns the value of EntryEffect - inline void SetEntryEffect(PowerPoint::PpEntryEffect value); //Sets the value of the EntryEffect property - - /* - Property Hidden - - For more information, see help context 539007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Hidden() const; //Returns the value of Hidden - inline void SetHidden(Office::MsoTriState value); //Sets the value of the Hidden property - - /* - Property LoopSoundUntilNext - - For more information, see help context 539008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LoopSoundUntilNext() const; //Returns the value of LoopSoundUntilNext - inline void SetLoopSoundUntilNext(Office::MsoTriState value); //Sets the value of the LoopSoundUntilNext property - - /* - Property Parent - - For more information, see help context 539002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SoundEffect - - For more information, see help context 539009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundEffect* SoundEffect() const; //Returns the value of SoundEffect - - /* - Property Speed - - For more information, see help context 539010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpTransitionSpeed Speed() const; //Returns the value of Speed - inline void SetSpeed(PowerPoint::PpTransitionSpeed value); //Sets the value of the Speed property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SoundEffect : public QAxObject -{ -public: - SoundEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 540001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Name - - For more information, see help context 540003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 540002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 540004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSoundEffectType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::PpSoundEffectType value); //Sets the value of the Type property - - /* - Method ImportFromFile - - For more information, see help context 540005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ImportFromFile(const QString& FileName); - - /* - Method Play - - For more information, see help context 540006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Play(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SoundFormat : public QAxObject -{ -public: - SoundFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property SourceFullName - - For more information, see help context 541005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SourceFullName() const; //Returns the value of SourceFullName - - /* - Property Type - - For more information, see help context 541004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSoundFormatType Type() const; //Returns the value of Type - - /* - Method Export - - For more information, see help context 541003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PpSoundFormatType Export(const QString& FileName); - - /* - Method Import - - For more information, see help context 541002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Import(const QString& FileName); - - /* - Method Play - - For more information, see help context 541001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Play(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT HeadersFooters : public QAxObject -{ -public: - HeadersFooters(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 542001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property DateAndTime - - For more information, see help context 542003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeaderFooter* DateAndTime() const; //Returns the value of DateAndTime - - /* - Property DisplayOnTitleSlide - - For more information, see help context 542007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayOnTitleSlide() const; //Returns the value of DisplayOnTitleSlide - inline void SetDisplayOnTitleSlide(Office::MsoTriState value); //Sets the value of the DisplayOnTitleSlide property - - /* - Property Footer - - For more information, see help context 542006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeaderFooter* Footer() const; //Returns the value of Footer - - /* - Property Header - - For more information, see help context 542005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeaderFooter* Header() const; //Returns the value of Header - - /* - Property Parent - - For more information, see help context 542002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SlideNumber - - For more information, see help context 542004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeaderFooter* SlideNumber() const; //Returns the value of SlideNumber - - /* - Method Clear - - For more information, see help context 542008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Clear(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Shapes : public QAxObject -{ -public: - Shapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 543002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property HasTitle - - For more information, see help context 543018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTitle() const; //Returns the value of HasTitle - - /* - Property Parent - - For more information, see help context 543001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Placeholders - - For more information, see help context 543021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Placeholders* Placeholders() const; //Returns the value of Placeholders - - /* - Property Title - - For more information, see help context 543020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Title() const; //Returns the value of Title - - /* - Property _NewEnum - - For more information, see help context 543004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddCallout - - For more information, see help context 543005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height); - - /* - Method AddCanvas - - For more information, see help context 543030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddCanvas(double Left, double Top, double Width, double Height); - - /* - Method AddComment - - For more information, see help context 543023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddComment(); - - /* - Method AddComment - - For more information, see help context 543023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddComment(double Left); - - /* - Method AddComment - - For more information, see help context 543023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddComment(double Left, double Top); - - /* - Method AddComment - - For more information, see help context 543023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddComment(double Left, double Top, double Width); - - /* - Method AddComment - - For more information, see help context 543023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddComment(double Left, double Top, double Width, double Height); - - /* - Method AddConnector - - For more information, see help context 543006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddCurve - - For more information, see help context 543007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddCurve(const QVariant& SafeArrayOfPoints); - - /* - Method AddDiagram - - For more information, see help context 543029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddDiagram(Office::MsoDiagramType Type, double Left, double Top, double Width, double Height); - - /* - Method AddLabel - - For more information, see help context 543008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method AddLine - - For more information, see help context 543009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddLine(double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddMediaObject - - For more information, see help context 543025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddMediaObject(const QString& FileName); - - /* - Method AddMediaObject - - For more information, see help context 543025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddMediaObject(const QString& FileName, double Left); - - /* - Method AddMediaObject - - For more information, see help context 543025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddMediaObject(const QString& FileName, double Left, double Top); - - /* - Method AddMediaObject - - For more information, see help context 543025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddMediaObject(const QString& FileName, double Left, double Top, double Width); - - /* - Method AddMediaObject - - For more information, see help context 543025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddMediaObject(const QString& FileName, double Left, double Top, double Width, double Height); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel); - - /* - Method AddOLEObject - - For more information, see help context 543022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link); - - /* - Method AddPicture - - For more information, see help context 543010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top); - - /* - Method AddPicture - - For more information, see help context 543010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width); - - /* - Method AddPicture - - For more information, see help context 543010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height); - - /* - Method AddPlaceholder - - For more information, see help context 543024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPlaceholder(PowerPoint::PpPlaceholderType Type); - - /* - Method AddPlaceholder - - For more information, see help context 543024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left); - - /* - Method AddPlaceholder - - For more information, see help context 543024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top); - - /* - Method AddPlaceholder - - For more information, see help context 543024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top, double Width); - - /* - Method AddPlaceholder - - For more information, see help context 543024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top, double Width, double Height); - - /* - Method AddPolyline - - For more information, see help context 543011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPolyline(const QVariant& SafeArrayOfPoints); - - /* - Method AddShape - - For more information, see help context 543012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height); - - /* - Method AddTable - - For more information, see help context 543027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTable(int NumRows, int NumColumns); - - /* - Method AddTable - - For more information, see help context 543027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTable(int NumRows, int NumColumns, double Left); - - /* - Method AddTable - - For more information, see help context 543027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTable(int NumRows, int NumColumns, double Left, double Top); - - /* - Method AddTable - - For more information, see help context 543027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTable(int NumRows, int NumColumns, double Left, double Top, double Width); - - /* - Method AddTable - - For more information, see help context 543027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTable(int NumRows, int NumColumns, double Left, double Top, double Width, double Height); - - /* - Method AddTextEffect - - For more information, see help context 543013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top); - - /* - Method AddTextbox - - For more information, see help context 543014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method AddTitle - - For more information, see help context 543019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTitle(); - - /* - Method BuildFreeform - - For more information, see help context 543015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::FreeformBuilder* BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Item - - For more information, see help context 543003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Item(const QVariant& Index); - - /* - Method Paste - - For more information, see help context 543026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Paste(); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel); - - /* - Method PasteSpecial - - For more information, see help context 543028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link); - - /* - Method Range - - For more information, see help context 543017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Range(); - - /* - Method Range - - For more information, see help context 543017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Range(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 543016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Placeholders : public QAxObject -{ -public: - Placeholders(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 544001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 544002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 544003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PlaceholderFormat : public QAxObject -{ -public: - PlaceholderFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 545001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 545002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 545003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPlaceholderType Type() const; //Returns the value of Type - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT FreeformBuilder : public QAxObject -{ -public: - FreeformBuilder(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 546001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method AddNodes - - For more information, see help context 546002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method AddNodes - - For more information, see help context 546002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2); - - /* - Method AddNodes - - For more information, see help context 546002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2); - - /* - Method AddNodes - - For more information, see help context 546002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3); - - /* - Method AddNodes - - For more information, see help context 546002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3); - - /* - Method ConvertToShape - - For more information, see help context 546003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* ConvertToShape(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Shape : public QAxObject -{ -public: - Shape(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActionSettings - - For more information, see help context 547048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ActionSettings* ActionSettings() const; //Returns the value of ActionSettings - - /* - Property Adjustments - - For more information, see help context 547015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Adjustments* Adjustments() const; //Returns the value of Adjustments - - /* - Property AlternativeText - - For more information, see help context 547058 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString AlternativeText() const; //Returns the value of AlternativeText - inline void SetAlternativeText(const QString& value); //Sets the value of the AlternativeText property - - /* - Property AnimationSettings - - For more information, see help context 547047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationSettings* AnimationSettings() const; //Returns the value of AnimationSettings - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoShapeType - - For more information, see help context 547016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoAutoShapeType AutoShapeType() const; //Returns the value of AutoShapeType - inline void SetAutoShapeType(Office::MsoAutoShapeType value); //Sets the value of the AutoShapeType property - - /* - Property BlackWhiteMode - - For more information, see help context 547017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoBlackWhiteMode BlackWhiteMode() const; //Returns the value of BlackWhiteMode - inline void SetBlackWhiteMode(Office::MsoBlackWhiteMode value); //Sets the value of the BlackWhiteMode property - - /* - Property Callout - - For more information, see help context 547018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CalloutFormat* Callout() const; //Returns the value of Callout - - /* - Property CanvasItems - - For more information, see help context 547068 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CanvasShapes* CanvasItems() const; //Returns the value of CanvasItems - - /* - Property Child - - For more information, see help context 547066 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Child() const; //Returns the value of Child - - /* - Property ConnectionSiteCount - - For more information, see help context 547019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ConnectionSiteCount() const; //Returns the value of ConnectionSiteCount - - /* - Property Connector - - For more information, see help context 547020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Connector() const; //Returns the value of Connector - - /* - Property ConnectorFormat - - For more information, see help context 547021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ConnectorFormat* ConnectorFormat() const; //Returns the value of ConnectorFormat - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 547063 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Diagram* Diagram() const; //Returns the value of Diagram - - /* - Property DiagramNode - - For more information, see help context 547065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* DiagramNode() const; //Returns the value of DiagramNode - - /* - Property Fill - - For more information, see help context 547022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::FillFormat* Fill() const; //Returns the value of Fill - - /* - Property GroupItems - - For more information, see help context 547023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::GroupShapes* GroupItems() const; //Returns the value of GroupItems - - /* - Property HasDiagram - - For more information, see help context 547062 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasDiagram() const; //Returns the value of HasDiagram - - /* - Property HasDiagramNode - - For more information, see help context 547064 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasDiagramNode() const; //Returns the value of HasDiagramNode - - /* - Property HasTable - - For more information, see help context 547059 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTable() const; //Returns the value of HasTable - - /* - Property HasTextFrame - - For more information, see help context 547055 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTextFrame() const; //Returns the value of HasTextFrame - - /* - Property Height - - For more information, see help context 547024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property HorizontalFlip - - For more information, see help context 547025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HorizontalFlip() const; //Returns the value of HorizontalFlip - - /* - Property Id - - For more information, see help context 547069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Left - - For more information, see help context 547026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Line - - For more information, see help context 547027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::LineFormat* Line() const; //Returns the value of Line - - /* - Property LinkFormat - - For more information, see help context 547045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::LinkFormat* LinkFormat() const; //Returns the value of LinkFormat - - /* - Property LockAspectRatio - - For more information, see help context 547028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LockAspectRatio() const; //Returns the value of LockAspectRatio - inline void SetLockAspectRatio(Office::MsoTriState value); //Sets the value of the LockAspectRatio property - - /* - Property MediaType - - For more information, see help context 547054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpMediaType MediaType() const; //Returns the value of MediaType - - /* - Property Name - - For more information, see help context 547029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Nodes - - For more information, see help context 547030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeNodes* Nodes() const; //Returns the value of Nodes - - /* - Property OLEFormat - - For more information, see help context 547044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::OLEFormat* OLEFormat() const; //Returns the value of OLEFormat - - /* - Property Parent - - For more information, see help context 547001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ParentGroup - - For more information, see help context 547067 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* ParentGroup() const; //Returns the value of ParentGroup - - /* - Property PictureFormat - - For more information, see help context 547032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PictureFormat* PictureFormat() const; //Returns the value of PictureFormat - - /* - Property PlaceholderFormat - - For more information, see help context 547046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PlaceholderFormat* PlaceholderFormat() const; //Returns the value of PlaceholderFormat - - /* - Property RTF - - For more information, see help context 547074 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString RTF() const; //Returns the value of RTF - inline void SetRTF(const QString& value); //Sets the value of the RTF property - - /* - Property Rotation - - For more information, see help context 547031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Rotation() const; //Returns the value of Rotation - inline void SetRotation(double value); //Sets the value of the Rotation property - - /* - Property Script - - For more information, see help context 547057 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Script* Script() const; //Returns the value of Script - - /* - Property Shadow - - For more information, see help context 547033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShadowFormat* Shadow() const; //Returns the value of Shadow - - /* - Property SoundFormat - - For more information, see help context 547056 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundFormat* SoundFormat() const; //Returns the value of SoundFormat - - /* - Property Table - - For more information, see help context 547060 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Table* Table() const; //Returns the value of Table - - /* - Property Tags - - For more information, see help context 547049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TextEffect - - For more information, see help context 547034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextEffectFormat* TextEffect() const; //Returns the value of TextEffect - - /* - Property TextFrame - - For more information, see help context 547035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextFrame* TextFrame() const; //Returns the value of TextFrame - - /* - Property ThreeD - - For more information, see help context 547036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ThreeDFormat* ThreeD() const; //Returns the value of ThreeD - - /* - Property Top - - For more information, see help context 547037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Type - - For more information, see help context 547038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoShapeType Type() const; //Returns the value of Type - - /* - Property VerticalFlip - - For more information, see help context 547039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState VerticalFlip() const; //Returns the value of VerticalFlip - - /* - Property Vertices - - For more information, see help context 547040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Vertices() const; //Returns the value of Vertices - - /* - Property Visible - - For more information, see help context 547041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 547042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 547043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - - /* - Method Apply - - For more information, see help context 547002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Apply(); - - /* - Method CanvasCropBottom - - For more information, see help context 547073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropBottom(double Increment); - - /* - Method CanvasCropLeft - - For more information, see help context 547070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropLeft(double Increment); - - /* - Method CanvasCropRight - - For more information, see help context 547072 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropRight(double Increment); - - /* - Method CanvasCropTop - - For more information, see help context 547071 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropTop(double Increment); - - /* - Method Copy - - For more information, see help context 547051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 547050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 547003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Duplicate - - For more information, see help context 547053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Duplicate(); - - /* - Method Export - - For more information, see help context 547061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter); - - /* - Method Export - - For more information, see help context 547061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth); - - /* - Method Export - - For more information, see help context 547061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight); - - /* - Method Export - - For more information, see help context 547061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight, PowerPoint::PpExportMode ExportMode); - - /* - Method Flip - - For more information, see help context 547004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Flip(Office::MsoFlipCmd FlipCmd); - - /* - Method IncrementLeft - - For more information, see help context 547005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementLeft(double Increment); - - /* - Method IncrementRotation - - For more information, see help context 547006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementRotation(double Increment); - - /* - Method IncrementTop - - For more information, see help context 547007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementTop(double Increment); - - /* - Method PickUp - - For more information, see help context 547008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PickUp(); - - /* - Method RerouteConnections - - For more information, see help context 547009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RerouteConnections(); - - /* - Method ScaleHeight - - For more information, see help context 547010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleHeight - - For more information, see help context 547010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method ScaleWidth - - For more information, see help context 547011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleWidth - - For more information, see help context 547011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method Select - - For more information, see help context 547052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - - /* - Method Select - - For more information, see help context 547052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(Office::MsoTriState Replace); - - /* - Method SetShapesDefaultProperties - - For more information, see help context 547012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetShapesDefaultProperties(); - - /* - Method Ungroup - - For more information, see help context 547013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Ungroup(); - - /* - Method ZOrder - - For more information, see help context 547014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ZOrder(Office::MsoZOrderCmd ZOrderCmd); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ShapeRange : public QAxObject -{ -public: - ShapeRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActionSettings - - For more information, see help context 548048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ActionSettings* ActionSettings() const; //Returns the value of ActionSettings - - /* - Property Adjustments - - For more information, see help context 548015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Adjustments* Adjustments() const; //Returns the value of Adjustments - - /* - Property AlternativeText - - For more information, see help context 548067 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString AlternativeText() const; //Returns the value of AlternativeText - inline void SetAlternativeText(const QString& value); //Sets the value of the AlternativeText property - - /* - Property AnimationSettings - - For more information, see help context 548047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationSettings* AnimationSettings() const; //Returns the value of AnimationSettings - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoShapeType - - For more information, see help context 548016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoAutoShapeType AutoShapeType() const; //Returns the value of AutoShapeType - inline void SetAutoShapeType(Office::MsoAutoShapeType value); //Sets the value of the AutoShapeType property - - /* - Property BlackWhiteMode - - For more information, see help context 548017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoBlackWhiteMode BlackWhiteMode() const; //Returns the value of BlackWhiteMode - inline void SetBlackWhiteMode(Office::MsoBlackWhiteMode value); //Sets the value of the BlackWhiteMode property - - /* - Property Callout - - For more information, see help context 548018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CalloutFormat* Callout() const; //Returns the value of Callout - - /* - Property CanvasItems - - For more information, see help context 548077 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CanvasShapes* CanvasItems() const; //Returns the value of CanvasItems - - /* - Property Child - - For more information, see help context 548075 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Child() const; //Returns the value of Child - - /* - Property ConnectionSiteCount - - For more information, see help context 548019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ConnectionSiteCount() const; //Returns the value of ConnectionSiteCount - - /* - Property Connector - - For more information, see help context 548020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Connector() const; //Returns the value of Connector - - /* - Property ConnectorFormat - - For more information, see help context 548021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ConnectorFormat* ConnectorFormat() const; //Returns the value of ConnectorFormat - - /* - Property Count - - For more information, see help context 548060 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 548072 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Diagram* Diagram() const; //Returns the value of Diagram - - /* - Property DiagramNode - - For more information, see help context 548074 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* DiagramNode() const; //Returns the value of DiagramNode - - /* - Property Fill - - For more information, see help context 548022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::FillFormat* Fill() const; //Returns the value of Fill - - /* - Property GroupItems - - For more information, see help context 548023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::GroupShapes* GroupItems() const; //Returns the value of GroupItems - - /* - Property HasDiagram - - For more information, see help context 548071 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasDiagram() const; //Returns the value of HasDiagram - - /* - Property HasDiagramNode - - For more information, see help context 548073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasDiagramNode() const; //Returns the value of HasDiagramNode - - /* - Property HasTable - - For more information, see help context 548068 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTable() const; //Returns the value of HasTable - - /* - Property HasTextFrame - - For more information, see help context 548055 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTextFrame() const; //Returns the value of HasTextFrame - - /* - Property Height - - For more information, see help context 548024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property HorizontalFlip - - For more information, see help context 548025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HorizontalFlip() const; //Returns the value of HorizontalFlip - - /* - Property Id - - For more information, see help context 548078 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Id() const; //Returns the value of Id - - /* - Property Left - - For more information, see help context 548026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Line - - For more information, see help context 548027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::LineFormat* Line() const; //Returns the value of Line - - /* - Property LinkFormat - - For more information, see help context 548045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::LinkFormat* LinkFormat() const; //Returns the value of LinkFormat - - /* - Property LockAspectRatio - - For more information, see help context 548028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LockAspectRatio() const; //Returns the value of LockAspectRatio - inline void SetLockAspectRatio(Office::MsoTriState value); //Sets the value of the LockAspectRatio property - - /* - Property MediaType - - For more information, see help context 548054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpMediaType MediaType() const; //Returns the value of MediaType - - /* - Property Name - - For more information, see help context 548029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Nodes - - For more information, see help context 548030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeNodes* Nodes() const; //Returns the value of Nodes - - /* - Property OLEFormat - - For more information, see help context 548044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::OLEFormat* OLEFormat() const; //Returns the value of OLEFormat - - /* - Property Parent - - For more information, see help context 548001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ParentGroup - - For more information, see help context 548076 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* ParentGroup() const; //Returns the value of ParentGroup - - /* - Property PictureFormat - - For more information, see help context 548032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PictureFormat* PictureFormat() const; //Returns the value of PictureFormat - - /* - Property PlaceholderFormat - - For more information, see help context 548046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PlaceholderFormat* PlaceholderFormat() const; //Returns the value of PlaceholderFormat - - /* - Property RTF - - For more information, see help context 548083 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString RTF() const; //Returns the value of RTF - inline void SetRTF(const QString& value); //Sets the value of the RTF property - - /* - Property Rotation - - For more information, see help context 548031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Rotation() const; //Returns the value of Rotation - inline void SetRotation(double value); //Sets the value of the Rotation property - - /* - Property Script - - For more information, see help context 548066 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Script* Script() const; //Returns the value of Script - - /* - Property Shadow - - For more information, see help context 548033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShadowFormat* Shadow() const; //Returns the value of Shadow - - /* - Property SoundFormat - - For more information, see help context 548056 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundFormat* SoundFormat() const; //Returns the value of SoundFormat - - /* - Property Table - - For more information, see help context 548069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Table* Table() const; //Returns the value of Table - - /* - Property Tags - - For more information, see help context 548049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TextEffect - - For more information, see help context 548034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextEffectFormat* TextEffect() const; //Returns the value of TextEffect - - /* - Property TextFrame - - For more information, see help context 548035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextFrame* TextFrame() const; //Returns the value of TextFrame - - /* - Property ThreeD - - For more information, see help context 548036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ThreeDFormat* ThreeD() const; //Returns the value of ThreeD - - /* - Property Top - - For more information, see help context 548037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Type - - For more information, see help context 548038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoShapeType Type() const; //Returns the value of Type - - /* - Property VerticalFlip - - For more information, see help context 548039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState VerticalFlip() const; //Returns the value of VerticalFlip - - /* - Property Vertices - - For more information, see help context 548040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Vertices() const; //Returns the value of Vertices - - /* - Property Visible - - For more information, see help context 548041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 548042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 548043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - - /* - Property _NewEnum - - For more information, see help context 548058 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Align - - For more information, see help context 548063 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Align(Office::MsoAlignCmd AlignCmd, Office::MsoTriState RelativeTo); - - /* - Method Apply - - For more information, see help context 548002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Apply(); - - /* - Method CanvasCropBottom - - For more information, see help context 548082 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropBottom(double Increment); - - /* - Method CanvasCropLeft - - For more information, see help context 548079 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropLeft(double Increment); - - /* - Method CanvasCropRight - - For more information, see help context 548081 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropRight(double Increment); - - /* - Method CanvasCropTop - - For more information, see help context 548080 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CanvasCropTop(double Increment); - - /* - Method Copy - - For more information, see help context 548051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 548050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 548003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Distribute - - For more information, see help context 548064 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Distribute(Office::MsoDistributeCmd DistributeCmd, Office::MsoTriState RelativeTo); - - /* - Method Duplicate - - For more information, see help context 548053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Duplicate(); - - /* - Method Export - - For more information, see help context 548070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter); - - /* - Method Export - - For more information, see help context 548070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth); - - /* - Method Export - - For more information, see help context 548070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight); - - /* - Method Export - - For more information, see help context 548070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight, PowerPoint::PpExportMode ExportMode); - - /* - Method Flip - - For more information, see help context 548004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Flip(Office::MsoFlipCmd FlipCmd); - - /* - Method GetPolygonalRepresentation - - For more information, see help context 548065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void GetPolygonalRepresentation(uint maxPointsInBuffer, double& pPoints, uint& numPointsInPolygon, Office::MsoTriState*& IsOpen); - - /* - Method Group - - For more information, see help context 548061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Group(); - - /* - Method IncrementLeft - - For more information, see help context 548005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementLeft(double Increment); - - /* - Method IncrementRotation - - For more information, see help context 548006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementRotation(double Increment); - - /* - Method IncrementTop - - For more information, see help context 548007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementTop(double Increment); - - /* - Method Item - - For more information, see help context 548057 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Item(const QVariant& Index); - - /* - Method PickUp - - For more information, see help context 548008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PickUp(); - - /* - Method Regroup - - For more information, see help context 548062 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Regroup(); - - /* - Method RerouteConnections - - For more information, see help context 548009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RerouteConnections(); - - /* - Method ScaleHeight - - For more information, see help context 548010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleHeight - - For more information, see help context 548010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method ScaleWidth - - For more information, see help context 548011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize); - - /* - Method ScaleWidth - - For more information, see help context 548011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale); - - /* - Method Select - - For more information, see help context 548052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - - /* - Method Select - - For more information, see help context 548052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(Office::MsoTriState Replace); - - /* - Method SetShapesDefaultProperties - - For more information, see help context 548012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetShapesDefaultProperties(); - - /* - Method Ungroup - - For more information, see help context 548013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Ungroup(); - - /* - Method ZOrder - - For more information, see help context 548014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ZOrder(Office::MsoZOrderCmd ZOrderCmd); - - /* - Method _Index - - For more information, see help context 548059 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT GroupShapes : public QAxObject -{ -public: - GroupShapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 549002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 549001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 549004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 549003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Item(const QVariant& Index); - - /* - Method Range - - For more information, see help context 549005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Range(const QVariant& Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Adjustments : public QAxObject -{ -public: - Adjustments(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 550002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 550001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Item - - For more information, see help context 550003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Item(int Index); - - /* - Method SetItem - */ - inline int SetItem(int Index, double rhs); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PictureFormat : public QAxObject -{ -public: - PictureFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Brightness - - For more information, see help context 551004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Brightness() const; //Returns the value of Brightness - inline void SetBrightness(double value); //Sets the value of the Brightness property - - /* - Property ColorType - - For more information, see help context 551005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPictureColorType ColorType() const; //Returns the value of ColorType - inline void SetColorType(Office::MsoPictureColorType value); //Sets the value of the ColorType property - - /* - Property Contrast - - For more information, see help context 551006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Contrast() const; //Returns the value of Contrast - inline void SetContrast(double value); //Sets the value of the Contrast property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property CropBottom - - For more information, see help context 551007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double CropBottom() const; //Returns the value of CropBottom - inline void SetCropBottom(double value); //Sets the value of the CropBottom property - - /* - Property CropLeft - - For more information, see help context 551008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double CropLeft() const; //Returns the value of CropLeft - inline void SetCropLeft(double value); //Sets the value of the CropLeft property - - /* - Property CropRight - - For more information, see help context 551009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double CropRight() const; //Returns the value of CropRight - inline void SetCropRight(double value); //Sets the value of the CropRight property - - /* - Property CropTop - - For more information, see help context 551010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double CropTop() const; //Returns the value of CropTop - inline void SetCropTop(double value); //Sets the value of the CropTop property - - /* - Property Parent - - For more information, see help context 551001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property TransparencyColor - - For more information, see help context 551011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int TransparencyColor() const; //Returns the value of TransparencyColor - inline void SetTransparencyColor(int value); //Sets the value of the TransparencyColor property - - /* - Property TransparentBackground - - For more information, see help context 551012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState TransparentBackground() const; //Returns the value of TransparentBackground - inline void SetTransparentBackground(Office::MsoTriState value); //Sets the value of the TransparentBackground property - - /* - Method IncrementBrightness - - For more information, see help context 551002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementBrightness(double Increment); - - /* - Method IncrementContrast - - For more information, see help context 551003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementContrast(double Increment); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT FillFormat : public QAxObject -{ -public: - FillFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BackColor - - For more information, see help context 552011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* BackColor() const; //Returns the value of BackColor - inline void SetBackColor(PowerPoint::ColorFormat* value); //Sets the value of the BackColor property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ForeColor - - For more information, see help context 552012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(PowerPoint::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property GradientColorType - - For more information, see help context 552013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoGradientColorType GradientColorType() const; //Returns the value of GradientColorType - - /* - Property GradientDegree - - For more information, see help context 552014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double GradientDegree() const; //Returns the value of GradientDegree - - /* - Property GradientStyle - - For more information, see help context 552015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoGradientStyle GradientStyle() const; //Returns the value of GradientStyle - - /* - Property GradientVariant - - For more information, see help context 552016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int GradientVariant() const; //Returns the value of GradientVariant - - /* - Property Parent - - For more information, see help context 552001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Pattern - - For more information, see help context 552017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPatternType Pattern() const; //Returns the value of Pattern - - /* - Property PresetGradientType - - For more information, see help context 552018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetGradientType PresetGradientType() const; //Returns the value of PresetGradientType - - /* - Property PresetTexture - - For more information, see help context 552019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetTexture PresetTexture() const; //Returns the value of PresetTexture - - /* - Property TextureName - - For more information, see help context 552020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString TextureName() const; //Returns the value of TextureName - - /* - Property TextureType - - For more information, see help context 552021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTextureType TextureType() const; //Returns the value of TextureType - - /* - Property Transparency - - For more information, see help context 552022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Type - - For more information, see help context 552023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoFillType Type() const; //Returns the value of Type - - /* - Property Visible - - For more information, see help context 552024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method Background - - For more information, see help context 552002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Background(); - - /* - Method OneColorGradient - - For more information, see help context 552003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void OneColorGradient(Office::MsoGradientStyle Style, int Variant, double Degree); - - /* - Method Patterned - - For more information, see help context 552004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Patterned(Office::MsoPatternType Pattern); - - /* - Method PresetGradient - - For more information, see help context 552005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PresetGradient(Office::MsoGradientStyle Style, int Variant, Office::MsoPresetGradientType PresetGradientType); - - /* - Method PresetTextured - - For more information, see help context 552006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PresetTextured(Office::MsoPresetTexture PresetTexture); - - /* - Method Solid - - For more information, see help context 552007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Solid(); - - /* - Method TwoColorGradient - - For more information, see help context 552008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void TwoColorGradient(Office::MsoGradientStyle Style, int Variant); - - /* - Method UserPicture - - For more information, see help context 552009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void UserPicture(const QString& PictureFile); - - /* - Method UserTextured - - For more information, see help context 552010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void UserTextured(const QString& TextureFile); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT LineFormat : public QAxObject -{ -public: - LineFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BackColor - - For more information, see help context 553002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* BackColor() const; //Returns the value of BackColor - inline void SetBackColor(PowerPoint::ColorFormat* value); //Sets the value of the BackColor property - - /* - Property BeginArrowheadLength - - For more information, see help context 553003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadLength BeginArrowheadLength() const; //Returns the value of BeginArrowheadLength - inline void SetBeginArrowheadLength(Office::MsoArrowheadLength value); //Sets the value of the BeginArrowheadLength property - - /* - Property BeginArrowheadStyle - - For more information, see help context 553004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadStyle BeginArrowheadStyle() const; //Returns the value of BeginArrowheadStyle - inline void SetBeginArrowheadStyle(Office::MsoArrowheadStyle value); //Sets the value of the BeginArrowheadStyle property - - /* - Property BeginArrowheadWidth - - For more information, see help context 553005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadWidth BeginArrowheadWidth() const; //Returns the value of BeginArrowheadWidth - inline void SetBeginArrowheadWidth(Office::MsoArrowheadWidth value); //Sets the value of the BeginArrowheadWidth property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DashStyle - - For more information, see help context 553006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoLineDashStyle DashStyle() const; //Returns the value of DashStyle - inline void SetDashStyle(Office::MsoLineDashStyle value); //Sets the value of the DashStyle property - - /* - Property EndArrowheadLength - - For more information, see help context 553007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadLength EndArrowheadLength() const; //Returns the value of EndArrowheadLength - inline void SetEndArrowheadLength(Office::MsoArrowheadLength value); //Sets the value of the EndArrowheadLength property - - /* - Property EndArrowheadStyle - - For more information, see help context 553008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadStyle EndArrowheadStyle() const; //Returns the value of EndArrowheadStyle - inline void SetEndArrowheadStyle(Office::MsoArrowheadStyle value); //Sets the value of the EndArrowheadStyle property - - /* - Property EndArrowheadWidth - - For more information, see help context 553009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoArrowheadWidth EndArrowheadWidth() const; //Returns the value of EndArrowheadWidth - inline void SetEndArrowheadWidth(Office::MsoArrowheadWidth value); //Sets the value of the EndArrowheadWidth property - - /* - Property ForeColor - - For more information, see help context 553010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(PowerPoint::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property InsetPen - - For more information, see help context 553016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState InsetPen() const; //Returns the value of InsetPen - inline void SetInsetPen(Office::MsoTriState value); //Sets the value of the InsetPen property - - /* - Property Parent - - For more information, see help context 553001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Pattern - - For more information, see help context 553011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPatternType Pattern() const; //Returns the value of Pattern - inline void SetPattern(Office::MsoPatternType value); //Sets the value of the Pattern property - - /* - Property Style - - For more information, see help context 553012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoLineStyle Style() const; //Returns the value of Style - inline void SetStyle(Office::MsoLineStyle value); //Sets the value of the Style property - - /* - Property Transparency - - For more information, see help context 553013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Visible - - For more information, see help context 553014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Weight - - For more information, see help context 553015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Weight() const; //Returns the value of Weight - inline void SetWeight(double value); //Sets the value of the Weight property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ShadowFormat : public QAxObject -{ -public: - ShadowFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property ForeColor - - For more information, see help context 554004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* ForeColor() const; //Returns the value of ForeColor - inline void SetForeColor(PowerPoint::ColorFormat* value); //Sets the value of the ForeColor property - - /* - Property Obscured - - For more information, see help context 554005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Obscured() const; //Returns the value of Obscured - inline void SetObscured(Office::MsoTriState value); //Sets the value of the Obscured property - - /* - Property OffsetX - - For more information, see help context 554006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double OffsetX() const; //Returns the value of OffsetX - inline void SetOffsetX(double value); //Sets the value of the OffsetX property - - /* - Property OffsetY - - For more information, see help context 554007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double OffsetY() const; //Returns the value of OffsetY - inline void SetOffsetY(double value); //Sets the value of the OffsetY property - - /* - Property Parent - - For more information, see help context 554001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Transparency - - For more information, see help context 554008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Transparency() const; //Returns the value of Transparency - inline void SetTransparency(double value); //Sets the value of the Transparency property - - /* - Property Type - - For more information, see help context 554009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoShadowType Type() const; //Returns the value of Type - inline void SetType(Office::MsoShadowType value); //Sets the value of the Type property - - /* - Property Visible - - For more information, see help context 554010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method IncrementOffsetX - - For more information, see help context 554002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementOffsetX(double Increment); - - /* - Method IncrementOffsetY - - For more information, see help context 554003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementOffsetY(double Increment); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ConnectorFormat : public QAxObject -{ -public: - ConnectorFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property BeginConnected - - For more information, see help context 555006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState BeginConnected() const; //Returns the value of BeginConnected - - /* - Property BeginConnectedShape - - For more information, see help context 555007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* BeginConnectedShape() const; //Returns the value of BeginConnectedShape - - /* - Property BeginConnectionSite - - For more information, see help context 555008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int BeginConnectionSite() const; //Returns the value of BeginConnectionSite - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property EndConnected - - For more information, see help context 555009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState EndConnected() const; //Returns the value of EndConnected - - /* - Property EndConnectedShape - - For more information, see help context 555010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* EndConnectedShape() const; //Returns the value of EndConnectedShape - - /* - Property EndConnectionSite - - For more information, see help context 555011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int EndConnectionSite() const; //Returns the value of EndConnectionSite - - /* - Property Parent - - For more information, see help context 555001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 555012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoConnectorType Type() const; //Returns the value of Type - inline void SetType(Office::MsoConnectorType value); //Sets the value of the Type property - - /* - Method BeginConnect - - For more information, see help context 555002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void BeginConnect(PowerPoint::Shape* ConnectedShape, int ConnectionSite); - - /* - Method BeginDisconnect - - For more information, see help context 555003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void BeginDisconnect(); - - /* - Method EndConnect - - For more information, see help context 555004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EndConnect(PowerPoint::Shape* ConnectedShape, int ConnectionSite); - - /* - Method EndDisconnect - - For more information, see help context 555005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EndDisconnect(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextEffectFormat : public QAxObject -{ -public: - TextEffectFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Alignment - - For more information, see help context 556003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTextEffectAlignment Alignment() const; //Returns the value of Alignment - inline void SetAlignment(Office::MsoTextEffectAlignment value); //Sets the value of the Alignment property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FontBold - - For more information, see help context 556004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FontBold() const; //Returns the value of FontBold - inline void SetFontBold(Office::MsoTriState value); //Sets the value of the FontBold property - - /* - Property FontItalic - - For more information, see help context 556005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FontItalic() const; //Returns the value of FontItalic - inline void SetFontItalic(Office::MsoTriState value); //Sets the value of the FontItalic property - - /* - Property FontName - - For more information, see help context 556006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FontName() const; //Returns the value of FontName - inline void SetFontName(const QString& value); //Sets the value of the FontName property - - /* - Property FontSize - - For more information, see help context 556007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FontSize() const; //Returns the value of FontSize - inline void SetFontSize(double value); //Sets the value of the FontSize property - - /* - Property KernedPairs - - For more information, see help context 556008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState KernedPairs() const; //Returns the value of KernedPairs - inline void SetKernedPairs(Office::MsoTriState value); //Sets the value of the KernedPairs property - - /* - Property NormalizedHeight - - For more information, see help context 556009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState NormalizedHeight() const; //Returns the value of NormalizedHeight - inline void SetNormalizedHeight(Office::MsoTriState value); //Sets the value of the NormalizedHeight property - - /* - Property Parent - - For more information, see help context 556001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PresetShape - - For more information, see help context 556010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetTextEffectShape PresetShape() const; //Returns the value of PresetShape - inline void SetPresetShape(Office::MsoPresetTextEffectShape value); //Sets the value of the PresetShape property - - /* - Property PresetTextEffect - - For more information, see help context 556011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetTextEffect PresetTextEffect() const; //Returns the value of PresetTextEffect - inline void SetPresetTextEffect(Office::MsoPresetTextEffect value); //Sets the value of the PresetTextEffect property - - /* - Property RotatedChars - - For more information, see help context 556012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RotatedChars() const; //Returns the value of RotatedChars - inline void SetRotatedChars(Office::MsoTriState value); //Sets the value of the RotatedChars property - - /* - Property Text - - For more information, see help context 556013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property Tracking - - For more information, see help context 556014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Tracking() const; //Returns the value of Tracking - inline void SetTracking(double value); //Sets the value of the Tracking property - - /* - Method ToggleVerticalText - - For more information, see help context 556002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ToggleVerticalText(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ThreeDFormat : public QAxObject -{ -public: - ThreeDFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Depth - - For more information, see help context 557007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Depth() const; //Returns the value of Depth - inline void SetDepth(double value); //Sets the value of the Depth property - - /* - Property ExtrusionColor - - For more information, see help context 557008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* ExtrusionColor() const; //Returns the value of ExtrusionColor - - /* - Property ExtrusionColorType - - For more information, see help context 557009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoExtrusionColorType ExtrusionColorType() const; //Returns the value of ExtrusionColorType - inline void SetExtrusionColorType(Office::MsoExtrusionColorType value); //Sets the value of the ExtrusionColorType property - - /* - Property Parent - - For more information, see help context 557001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Perspective - - For more information, see help context 557010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Perspective() const; //Returns the value of Perspective - inline void SetPerspective(Office::MsoTriState value); //Sets the value of the Perspective property - - /* - Property PresetExtrusionDirection - - For more information, see help context 557011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetExtrusionDirection PresetExtrusionDirection() const; //Returns the value of PresetExtrusionDirection - - /* - Property PresetLightingDirection - - For more information, see help context 557012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetLightingDirection PresetLightingDirection() const; //Returns the value of PresetLightingDirection - inline void SetPresetLightingDirection(Office::MsoPresetLightingDirection value); //Sets the value of the PresetLightingDirection property - - /* - Property PresetLightingSoftness - - For more information, see help context 557013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetLightingSoftness PresetLightingSoftness() const; //Returns the value of PresetLightingSoftness - inline void SetPresetLightingSoftness(Office::MsoPresetLightingSoftness value); //Sets the value of the PresetLightingSoftness property - - /* - Property PresetMaterial - - For more information, see help context 557014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetMaterial PresetMaterial() const; //Returns the value of PresetMaterial - inline void SetPresetMaterial(Office::MsoPresetMaterial value); //Sets the value of the PresetMaterial property - - /* - Property PresetThreeDFormat - - For more information, see help context 557015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoPresetThreeDFormat PresetThreeDFormat() const; //Returns the value of PresetThreeDFormat - - /* - Property RotationX - - For more information, see help context 557016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double RotationX() const; //Returns the value of RotationX - inline void SetRotationX(double value); //Sets the value of the RotationX property - - /* - Property RotationY - - For more information, see help context 557017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double RotationY() const; //Returns the value of RotationY - inline void SetRotationY(double value); //Sets the value of the RotationY property - - /* - Property Visible - - For more information, see help context 557018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method IncrementRotationX - - For more information, see help context 557002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementRotationX(double Increment); - - /* - Method IncrementRotationY - - For more information, see help context 557003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void IncrementRotationY(double Increment); - - /* - Method ResetRotation - - For more information, see help context 557004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ResetRotation(); - - /* - Method SetExtrusionDirection - - For more information, see help context 557006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetExtrusionDirection(Office::MsoPresetExtrusionDirection PresetExtrusionDirection); - - /* - Method SetThreeDFormat - - For more information, see help context 557005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetThreeDFormat(Office::MsoPresetThreeDFormat PresetThreeDFormat); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextFrame : public QAxObject -{ -public: - TextFrame(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoSize - - For more information, see help context 558012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpAutoSize AutoSize() const; //Returns the value of AutoSize - inline void SetAutoSize(PowerPoint::PpAutoSize value); //Sets the value of the AutoSize property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property HasText - - For more information, see help context 558007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasText() const; //Returns the value of HasText - - /* - Property HorizontalAnchor - - For more information, see help context 558010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoHorizontalAnchor HorizontalAnchor() const; //Returns the value of HorizontalAnchor - inline void SetHorizontalAnchor(Office::MsoHorizontalAnchor value); //Sets the value of the HorizontalAnchor property - - /* - Property MarginBottom - - For more information, see help context 558002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double MarginBottom() const; //Returns the value of MarginBottom - inline void SetMarginBottom(double value); //Sets the value of the MarginBottom property - - /* - Property MarginLeft - - For more information, see help context 558003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double MarginLeft() const; //Returns the value of MarginLeft - inline void SetMarginLeft(double value); //Sets the value of the MarginLeft property - - /* - Property MarginRight - - For more information, see help context 558004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double MarginRight() const; //Returns the value of MarginRight - inline void SetMarginRight(double value); //Sets the value of the MarginRight property - - /* - Property MarginTop - - For more information, see help context 558005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double MarginTop() const; //Returns the value of MarginTop - inline void SetMarginTop(double value); //Sets the value of the MarginTop property - - /* - Property Orientation - - For more information, see help context 558006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTextOrientation Orientation() const; //Returns the value of Orientation - inline void SetOrientation(Office::MsoTextOrientation value); //Sets the value of the Orientation property - - /* - Property Parent - - For more information, see help context 558001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Ruler - - For more information, see help context 558009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Ruler* Ruler() const; //Returns the value of Ruler - - /* - Property TextRange - - For more information, see help context 558008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* TextRange() const; //Returns the value of TextRange - - /* - Property VerticalAnchor - - For more information, see help context 558011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoVerticalAnchor VerticalAnchor() const; //Returns the value of VerticalAnchor - inline void SetVerticalAnchor(Office::MsoVerticalAnchor value); //Sets the value of the VerticalAnchor property - - /* - Property WordWrap - - For more information, see help context 558013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState WordWrap() const; //Returns the value of WordWrap - inline void SetWordWrap(Office::MsoTriState value); //Sets the value of the WordWrap property - - /* - Method DeleteText - - For more information, see help context 558014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void DeleteText(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT CalloutFormat : public QAxObject -{ -public: - CalloutFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Accent - - For more information, see help context 559006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Accent() const; //Returns the value of Accent - inline void SetAccent(Office::MsoTriState value); //Sets the value of the Accent property - - /* - Property Angle - - For more information, see help context 559007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoCalloutAngleType Angle() const; //Returns the value of Angle - inline void SetAngle(Office::MsoCalloutAngleType value); //Sets the value of the Angle property - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoAttach - - For more information, see help context 559008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoAttach() const; //Returns the value of AutoAttach - inline void SetAutoAttach(Office::MsoTriState value); //Sets the value of the AutoAttach property - - /* - Property AutoLength - - For more information, see help context 559009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoLength() const; //Returns the value of AutoLength - - /* - Property Border - - For more information, see help context 559010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Border() const; //Returns the value of Border - inline void SetBorder(Office::MsoTriState value); //Sets the value of the Border property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Drop - - For more information, see help context 559011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Drop() const; //Returns the value of Drop - - /* - Property DropType - - For more information, see help context 559012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoCalloutDropType DropType() const; //Returns the value of DropType - - /* - Property Gap - - For more information, see help context 559013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Gap() const; //Returns the value of Gap - inline void SetGap(double value); //Sets the value of the Gap property - - /* - Property Length - - For more information, see help context 559014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Length() const; //Returns the value of Length - - /* - Property Parent - - For more information, see help context 559001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 559015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoCalloutType Type() const; //Returns the value of Type - inline void SetType(Office::MsoCalloutType value); //Sets the value of the Type property - - /* - Method AutomaticLength - - For more information, see help context 559002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AutomaticLength(); - - /* - Method CustomDrop - - For more information, see help context 559003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CustomDrop(double Drop); - - /* - Method CustomLength - - For more information, see help context 559004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CustomLength(double Length); - - /* - Method PresetDrop - - For more information, see help context 559005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PresetDrop(Office::MsoCalloutDropType DropType); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ShapeNodes : public QAxObject -{ -public: - ShapeNodes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 560002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 560001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 560004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Delete - - For more information, see help context 560005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(int Index); - - /* - Method Insert - - For more information, see help context 560006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Insert - - For more information, see help context 560006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2); - - /* - Method Insert - - For more information, see help context 560006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2); - - /* - Method Insert - - For more information, see help context 560006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3); - - /* - Method Insert - - For more information, see help context 560006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3); - - /* - Method Item - - For more information, see help context 560003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeNode* Item(const QVariant& Index); - - /* - Method SetEditingType - - For more information, see help context 560007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetEditingType(int Index, Office::MsoEditingType EditingType); - - /* - Method SetPosition - - For more information, see help context 560008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetPosition(int Index, double X1, double Y1); - - /* - Method SetSegmentType - - For more information, see help context 560009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetSegmentType(int Index, Office::MsoSegmentType SegmentType); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ShapeNode : public QAxObject -{ -public: - ShapeNode(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property EditingType - - For more information, see help context 561002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoEditingType EditingType() const; //Returns the value of EditingType - - /* - Property Parent - - For more information, see help context 561001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Points - - For more information, see help context 561003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Points() const; //Returns the value of Points - - /* - Property SegmentType - - For more information, see help context 561004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoSegmentType SegmentType() const; //Returns the value of SegmentType - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT OLEFormat : public QAxObject -{ -public: - OLEFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 562001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property FollowColors - - For more information, see help context 562006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpFollowColors FollowColors() const; //Returns the value of FollowColors - inline void SetFollowColors(PowerPoint::PpFollowColors value); //Sets the value of the FollowColors property - - /* - Property Object - - For more information, see help context 562004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Object() const; //Returns the value of Object - - /* - Property ObjectVerbs - - For more information, see help context 562003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ObjectVerbs* ObjectVerbs() const; //Returns the value of ObjectVerbs - - /* - Property Parent - - For more information, see help context 562002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ProgID - - For more information, see help context 562005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ProgID() const; //Returns the value of ProgID - - /* - Method Activate - - For more information, see help context 562008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - - /* - Method DoVerb - - For more information, see help context 562007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void DoVerb(); - - /* - Method DoVerb - - For more information, see help context 562007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void DoVerb(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT LinkFormat : public QAxObject -{ -public: - LinkFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 563001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property AutoUpdate - - For more information, see help context 563004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpUpdateOption AutoUpdate() const; //Returns the value of AutoUpdate - inline void SetAutoUpdate(PowerPoint::PpUpdateOption value); //Sets the value of the AutoUpdate property - - /* - Property Parent - - For more information, see help context 563002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SourceFullName - - For more information, see help context 563003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SourceFullName() const; //Returns the value of SourceFullName - inline void SetSourceFullName(const QString& value); //Sets the value of the SourceFullName property - - /* - Method Update - - For more information, see help context 563005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Update(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ObjectVerbs : public QAxObject -{ -public: - ObjectVerbs(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 564001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 564002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 564003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AnimationSettings : public QAxObject -{ -public: - AnimationSettings(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AdvanceMode - - For more information, see help context 565008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpAdvanceMode AdvanceMode() const; //Returns the value of AdvanceMode - inline void SetAdvanceMode(PowerPoint::PpAdvanceMode value); //Sets the value of the AdvanceMode property - - /* - Property AdvanceTime - - For more information, see help context 565009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double AdvanceTime() const; //Returns the value of AdvanceTime - inline void SetAdvanceTime(double value); //Sets the value of the AdvanceTime property - - /* - Property AfterEffect - - For more information, see help context 565006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpAfterEffect AfterEffect() const; //Returns the value of AfterEffect - inline void SetAfterEffect(PowerPoint::PpAfterEffect value); //Sets the value of the AfterEffect property - - /* - Property Animate - - For more information, see help context 565013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Animate() const; //Returns the value of Animate - inline void SetAnimate(Office::MsoTriState value); //Sets the value of the Animate property - - /* - Property AnimateBackground - - For more information, see help context 565014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AnimateBackground() const; //Returns the value of AnimateBackground - inline void SetAnimateBackground(Office::MsoTriState value); //Sets the value of the AnimateBackground property - - /* - Property AnimateTextInReverse - - For more information, see help context 565015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AnimateTextInReverse() const; //Returns the value of AnimateTextInReverse - inline void SetAnimateTextInReverse(Office::MsoTriState value); //Sets the value of the AnimateTextInReverse property - - /* - Property AnimationOrder - - For more information, see help context 565007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int AnimationOrder() const; //Returns the value of AnimationOrder - inline void SetAnimationOrder(int value); //Sets the value of the AnimationOrder property - - /* - Property Application - - For more information, see help context 565001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property ChartUnitEffect - - For more information, see help context 565016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpChartUnitEffect ChartUnitEffect() const; //Returns the value of ChartUnitEffect - inline void SetChartUnitEffect(PowerPoint::PpChartUnitEffect value); //Sets the value of the ChartUnitEffect property - - /* - Property DimColor - - For more information, see help context 565003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* DimColor() const; //Returns the value of DimColor - - /* - Property EntryEffect - - For more information, see help context 565005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpEntryEffect EntryEffect() const; //Returns the value of EntryEffect - inline void SetEntryEffect(PowerPoint::PpEntryEffect value); //Sets the value of the EntryEffect property - - /* - Property Parent - - For more information, see help context 565002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PlaySettings - - For more information, see help context 565010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PlaySettings* PlaySettings() const; //Returns the value of PlaySettings - - /* - Property SoundEffect - - For more information, see help context 565004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundEffect* SoundEffect() const; //Returns the value of SoundEffect - - /* - Property TextLevelEffect - - For more information, see help context 565011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpTextLevelEffect TextLevelEffect() const; //Returns the value of TextLevelEffect - inline void SetTextLevelEffect(PowerPoint::PpTextLevelEffect value); //Sets the value of the TextLevelEffect property - - /* - Property TextUnitEffect - - For more information, see help context 565012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpTextUnitEffect TextUnitEffect() const; //Returns the value of TextUnitEffect - inline void SetTextUnitEffect(PowerPoint::PpTextUnitEffect value); //Sets the value of the TextUnitEffect property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ActionSettings : public QAxObject -{ -public: - ActionSettings(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 566001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 566002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 566003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ActionSetting* Item(PowerPoint::PpMouseActivation Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ActionSetting : public QAxObject -{ -public: - ActionSetting(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Action - - For more information, see help context 567003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpActionType Action() const; //Returns the value of Action - inline void SetAction(PowerPoint::PpActionType value); //Sets the value of the Action property - - /* - Property ActionVerb - - For more information, see help context 567004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ActionVerb() const; //Returns the value of ActionVerb - inline void SetActionVerb(const QString& value); //Sets the value of the ActionVerb property - - /* - Property AnimateAction - - For more information, see help context 567005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AnimateAction() const; //Returns the value of AnimateAction - inline void SetAnimateAction(Office::MsoTriState value); //Sets the value of the AnimateAction property - - /* - Property Application - - For more information, see help context 567001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Hyperlink - - For more information, see help context 567008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlink* Hyperlink() const; //Returns the value of Hyperlink - - /* - Property Parent - - For more information, see help context 567002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Run - - For more information, see help context 567006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Run() const; //Returns the value of Run - inline void SetRun(const QString& value); //Sets the value of the Run property - - /* - Property ShowAndReturn - - For more information, see help context 567010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowAndReturn() const; //Returns the value of ShowAndReturn - inline void SetShowAndReturn(Office::MsoTriState value); //Sets the value of the ShowAndReturn property - - /* - Property SlideShowName - - For more information, see help context 567007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SlideShowName() const; //Returns the value of SlideShowName - inline void SetSlideShowName(const QString& value); //Sets the value of the SlideShowName property - - /* - Property SoundEffect - - For more information, see help context 567009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundEffect* SoundEffect() const; //Returns the value of SoundEffect - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PlaySettings : public QAxObject -{ -public: - PlaySettings(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActionVerb - - For more information, see help context 568003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ActionVerb() const; //Returns the value of ActionVerb - inline void SetActionVerb(const QString& value); //Sets the value of the ActionVerb property - - /* - Property Application - - For more information, see help context 568001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property HideWhileNotPlaying - - For more information, see help context 568004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HideWhileNotPlaying() const; //Returns the value of HideWhileNotPlaying - inline void SetHideWhileNotPlaying(Office::MsoTriState value); //Sets the value of the HideWhileNotPlaying property - - /* - Property LoopUntilStopped - - For more information, see help context 568005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LoopUntilStopped() const; //Returns the value of LoopUntilStopped - inline void SetLoopUntilStopped(Office::MsoTriState value); //Sets the value of the LoopUntilStopped property - - /* - Property Parent - - For more information, see help context 568002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PauseAnimation - - For more information, see help context 568008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PauseAnimation() const; //Returns the value of PauseAnimation - inline void SetPauseAnimation(Office::MsoTriState value); //Sets the value of the PauseAnimation property - - /* - Property PlayOnEntry - - For more information, see help context 568006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState PlayOnEntry() const; //Returns the value of PlayOnEntry - inline void SetPlayOnEntry(Office::MsoTriState value); //Sets the value of the PlayOnEntry property - - /* - Property RewindMovie - - For more information, see help context 568007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RewindMovie() const; //Returns the value of RewindMovie - inline void SetRewindMovie(Office::MsoTriState value); //Sets the value of the RewindMovie property - - /* - Property StopAfterSlides - - For more information, see help context 568009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int StopAfterSlides() const; //Returns the value of StopAfterSlides - inline void SetStopAfterSlides(int value); //Sets the value of the StopAfterSlides property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextRange : public QAxObject -{ -public: - TextRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property ActionSettings - - For more information, see help context 569003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ActionSettings* ActionSettings() const; //Returns the value of ActionSettings - - /* - Property Application - - For more information, see help context 569001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BoundHeight - - For more information, see help context 569009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double BoundHeight() const; //Returns the value of BoundHeight - - /* - Property BoundLeft - - For more information, see help context 569006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double BoundLeft() const; //Returns the value of BoundLeft - - /* - Property BoundTop - - For more information, see help context 569007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double BoundTop() const; //Returns the value of BoundTop - - /* - Property BoundWidth - - For more information, see help context 569008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double BoundWidth() const; //Returns the value of BoundWidth - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Font - - For more information, see help context 569023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Font* Font() const; //Returns the value of Font - - /* - Property IndentLevel - - For more information, see help context 569025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int IndentLevel() const; //Returns the value of IndentLevel - inline void SetIndentLevel(int value); //Sets the value of the IndentLevel property - - /* - Property LanguageID - - For more information, see help context 569037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoLanguageID LanguageID() const; //Returns the value of LanguageID - inline void SetLanguageID(Office::MsoLanguageID value); //Sets the value of the LanguageID property - - /* - Property Length - - For more information, see help context 569005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Length() const; //Returns the value of Length - - /* - Property ParagraphFormat - - For more information, see help context 569024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ParagraphFormat* ParagraphFormat() const; //Returns the value of ParagraphFormat - - /* - Property Parent - - For more information, see help context 569002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Start - - For more information, see help context 569004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Start() const; //Returns the value of Start - - /* - Property Text - - For more information, see help context 569017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddPeriods - - For more information, see help context 569032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddPeriods(); - - /* - Method ChangeCase - - For more information, see help context 569031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ChangeCase(PowerPoint::PpChangeCase Type); - - /* - Method Characters - - For more information, see help context 569013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Characters(); - - /* - Method Characters - - For more information, see help context 569013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Characters(int Start); - - /* - Method Characters - - For more information, see help context 569013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Characters(int Start, int Length); - - /* - Method Copy - - For more information, see help context 569028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 569027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 569029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Find - - For more information, see help context 569034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Find(const QString& FindWhat); - - /* - Method Find - - For more information, see help context 569034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Find(const QString& FindWhat, int After); - - /* - Method Find - - For more information, see help context 569034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Find(const QString& FindWhat, int After, Office::MsoTriState MatchCase); - - /* - Method Find - - For more information, see help context 569034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Find(const QString& FindWhat, int After, Office::MsoTriState MatchCase, Office::MsoTriState WholeWords); - - /* - Method InsertAfter - - For more information, see help context 569018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertAfter(); - - /* - Method InsertAfter - - For more information, see help context 569018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertAfter(const QString& NewText); - - /* - Method InsertBefore - - For more information, see help context 569019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertBefore(); - - /* - Method InsertBefore - - For more information, see help context 569019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertBefore(const QString& NewText); - - /* - Method InsertDateTime - - For more information, see help context 569020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertDateTime(PowerPoint::PpDateTimeFormat DateTimeFormat); - - /* - Method InsertDateTime - - For more information, see help context 569020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertDateTime(PowerPoint::PpDateTimeFormat DateTimeFormat, Office::MsoTriState InsertAsField); - - /* - Method InsertSlideNumber - - For more information, see help context 569021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertSlideNumber(); - - /* - Method InsertSymbol - - For more information, see help context 569022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertSymbol(const QString& FontName, int CharNumber); - - /* - Method InsertSymbol - - For more information, see help context 569022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* InsertSymbol(const QString& FontName, int CharNumber, Office::MsoTriState Unicode); - - /* - Method Lines - - For more information, see help context 569014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Lines(); - - /* - Method Lines - - For more information, see help context 569014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Lines(int Start); - - /* - Method Lines - - For more information, see help context 569014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Lines(int Start, int Length); - - /* - Method LtrRun - - For more information, see help context 569039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LtrRun(); - - /* - Method Paragraphs - - For more information, see help context 569010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Paragraphs(); - - /* - Method Paragraphs - - For more information, see help context 569010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Paragraphs(int Start); - - /* - Method Paragraphs - - For more information, see help context 569010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Paragraphs(int Start, int Length); - - /* - Method Paste - - For more information, see help context 569030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Paste(); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel); - - /* - Method PasteSpecial - - For more information, see help context 569040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link); - - /* - Method RemovePeriods - - For more information, see help context 569033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RemovePeriods(); - - /* - Method Replace - - For more information, see help context 569035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Replace(const QString& FindWhat, const QString& ReplaceWhat); - - /* - Method Replace - - For more information, see help context 569035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Replace(const QString& FindWhat, const QString& ReplaceWhat, int After); - - /* - Method Replace - - For more information, see help context 569035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Replace(const QString& FindWhat, const QString& ReplaceWhat, int After, Office::MsoTriState MatchCase); - - /* - Method Replace - - For more information, see help context 569035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Replace(const QString& FindWhat, const QString& ReplaceWhat, int After, Office::MsoTriState MatchCase, Office::MsoTriState WholeWords); - - /* - Method RotatedBounds - - For more information, see help context 569036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RotatedBounds(double& X1, double& Y1, double& X2, double& Y2, double& X3, double& Y3, double& x4, double& y4); - - /* - Method RtlRun - - For more information, see help context 569038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RtlRun(); - - /* - Method Runs - - For more information, see help context 569015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Runs(); - - /* - Method Runs - - For more information, see help context 569015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Runs(int Start); - - /* - Method Runs - - For more information, see help context 569015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Runs(int Start, int Length); - - /* - Method Select - - For more information, see help context 569026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - - /* - Method Sentences - - For more information, see help context 569011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Sentences(); - - /* - Method Sentences - - For more information, see help context 569011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Sentences(int Start); - - /* - Method Sentences - - For more information, see help context 569011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Sentences(int Start, int Length); - - /* - Method TrimText - - For more information, see help context 569016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* TrimText(); - - /* - Method Words - - For more information, see help context 569012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Words(); - - /* - Method Words - - For more information, see help context 569012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Words(int Start); - - /* - Method Words - - For more information, see help context 569012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextRange* Words(int Start, int Length); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Ruler : public QAxObject -{ -public: - Ruler(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 570001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Levels - - For more information, see help context 570004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::RulerLevels* Levels() const; //Returns the value of Levels - - /* - Property Parent - - For more information, see help context 570002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property TabStops - - For more information, see help context 570003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TabStops* TabStops() const; //Returns the value of TabStops - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT RulerLevels : public QAxObject -{ -public: - RulerLevels(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 571001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 571002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 571003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::RulerLevel* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT RulerLevel : public QAxObject -{ -public: - RulerLevel(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 572001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property FirstMargin - - For more information, see help context 572003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FirstMargin() const; //Returns the value of FirstMargin - inline void SetFirstMargin(double value); //Sets the value of the FirstMargin property - - /* - Property LeftMargin - - For more information, see help context 572004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double LeftMargin() const; //Returns the value of LeftMargin - inline void SetLeftMargin(double value); //Sets the value of the LeftMargin property - - /* - Property Parent - - For more information, see help context 572002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TabStops : public QAxObject -{ -public: - TabStops(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 573001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property DefaultSpacing - - For more information, see help context 573004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double DefaultSpacing() const; //Returns the value of DefaultSpacing - inline void SetDefaultSpacing(double value); //Sets the value of the DefaultSpacing property - - /* - Property Parent - - For more information, see help context 573002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 573005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TabStop* Add(PowerPoint::PpTabStopType Type, double Position); - - /* - Method Item - - For more information, see help context 573003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TabStop* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TabStop : public QAxObject -{ -public: - TabStop(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 574001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 574002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Position - - For more information, see help context 574004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Position() const; //Returns the value of Position - inline void SetPosition(double value); //Sets the value of the Position property - - /* - Property Type - - For more information, see help context 574003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpTabStopType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::PpTabStopType value); //Sets the value of the Type property - - /* - Method Clear - - For more information, see help context 574005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Clear(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Font : public QAxObject -{ -public: - Font(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 575001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property AutoRotateNumbers - - For more information, see help context 575018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoRotateNumbers() const; //Returns the value of AutoRotateNumbers - inline void SetAutoRotateNumbers(Office::MsoTriState value); //Sets the value of the AutoRotateNumbers property - - /* - Property BaselineOffset - - For more information, see help context 575011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double BaselineOffset() const; //Returns the value of BaselineOffset - inline void SetBaselineOffset(double value); //Sets the value of the BaselineOffset property - - /* - Property Bold - - For more information, see help context 575004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Bold() const; //Returns the value of Bold - inline void SetBold(Office::MsoTriState value); //Sets the value of the Bold property - - /* - Property Color - - For more information, see help context 575003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* Color() const; //Returns the value of Color - - /* - Property Embeddable - - For more information, see help context 575013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Embeddable() const; //Returns the value of Embeddable - - /* - Property Embedded - - For more information, see help context 575012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Embedded() const; //Returns the value of Embedded - - /* - Property Emboss - - For more information, see help context 575007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Emboss() const; //Returns the value of Emboss - inline void SetEmboss(Office::MsoTriState value); //Sets the value of the Emboss property - - /* - Property Italic - - For more information, see help context 575005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Italic() const; //Returns the value of Italic - inline void SetItalic(Office::MsoTriState value); //Sets the value of the Italic property - - /* - Property Name - - For more information, see help context 575015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property NameAscii - - For more information, see help context 575017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NameAscii() const; //Returns the value of NameAscii - inline void SetNameAscii(const QString& value); //Sets the value of the NameAscii property - - /* - Property NameComplexScript - - For more information, see help context 575020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NameComplexScript() const; //Returns the value of NameComplexScript - inline void SetNameComplexScript(const QString& value); //Sets the value of the NameComplexScript property - - /* - Property NameFarEast - - For more information, see help context 575016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NameFarEast() const; //Returns the value of NameFarEast - inline void SetNameFarEast(const QString& value); //Sets the value of the NameFarEast property - - /* - Property NameOther - - For more information, see help context 575019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NameOther() const; //Returns the value of NameOther - inline void SetNameOther(const QString& value); //Sets the value of the NameOther property - - /* - Property Parent - - For more information, see help context 575002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Shadow - - For more information, see help context 575006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Shadow() const; //Returns the value of Shadow - inline void SetShadow(Office::MsoTriState value); //Sets the value of the Shadow property - - /* - Property Size - - For more information, see help context 575014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Size() const; //Returns the value of Size - inline void SetSize(double value); //Sets the value of the Size property - - /* - Property Subscript - - For more information, see help context 575009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Subscript() const; //Returns the value of Subscript - inline void SetSubscript(Office::MsoTriState value); //Sets the value of the Subscript property - - /* - Property Superscript - - For more information, see help context 575010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Superscript() const; //Returns the value of Superscript - inline void SetSuperscript(Office::MsoTriState value); //Sets the value of the Superscript property - - /* - Property Underline - - For more information, see help context 575008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Underline() const; //Returns the value of Underline - inline void SetUnderline(Office::MsoTriState value); //Sets the value of the Underline property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ParagraphFormat : public QAxObject -{ -public: - ParagraphFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Alignment - - For more information, see help context 576003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpParagraphAlignment Alignment() const; //Returns the value of Alignment - inline void SetAlignment(PowerPoint::PpParagraphAlignment value); //Sets the value of the Alignment property - - /* - Property Application - - For more information, see help context 576001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BaseLineAlignment - - For more information, see help context 576011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpBaselineAlignment BaseLineAlignment() const; //Returns the value of BaseLineAlignment - inline void SetBaseLineAlignment(PowerPoint::PpBaselineAlignment value); //Sets the value of the BaseLineAlignment property - - /* - Property Bullet - - For more information, see help context 576004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::BulletFormat* Bullet() const; //Returns the value of Bullet - - /* - Property FarEastLineBreakControl - - For more information, see help context 576012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FarEastLineBreakControl() const; //Returns the value of FarEastLineBreakControl - inline void SetFarEastLineBreakControl(Office::MsoTriState value); //Sets the value of the FarEastLineBreakControl property - - /* - Property HangingPunctuation - - For more information, see help context 576014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HangingPunctuation() const; //Returns the value of HangingPunctuation - inline void SetHangingPunctuation(Office::MsoTriState value); //Sets the value of the HangingPunctuation property - - /* - Property LineRuleAfter - - For more information, see help context 576006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LineRuleAfter() const; //Returns the value of LineRuleAfter - inline void SetLineRuleAfter(Office::MsoTriState value); //Sets the value of the LineRuleAfter property - - /* - Property LineRuleBefore - - For more information, see help context 576005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LineRuleBefore() const; //Returns the value of LineRuleBefore - inline void SetLineRuleBefore(Office::MsoTriState value); //Sets the value of the LineRuleBefore property - - /* - Property LineRuleWithin - - For more information, see help context 576007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState LineRuleWithin() const; //Returns the value of LineRuleWithin - inline void SetLineRuleWithin(Office::MsoTriState value); //Sets the value of the LineRuleWithin property - - /* - Property Parent - - For more information, see help context 576002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property SpaceAfter - - For more information, see help context 576009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SpaceAfter() const; //Returns the value of SpaceAfter - inline void SetSpaceAfter(double value); //Sets the value of the SpaceAfter property - - /* - Property SpaceBefore - - For more information, see help context 576008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SpaceBefore() const; //Returns the value of SpaceBefore - inline void SetSpaceBefore(double value); //Sets the value of the SpaceBefore property - - /* - Property SpaceWithin - - For more information, see help context 576010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double SpaceWithin() const; //Returns the value of SpaceWithin - inline void SetSpaceWithin(double value); //Sets the value of the SpaceWithin property - - /* - Property TextDirection - - For more information, see help context 576015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpDirection TextDirection() const; //Returns the value of TextDirection - inline void SetTextDirection(PowerPoint::PpDirection value); //Sets the value of the TextDirection property - - /* - Property WordWrap - - For more information, see help context 576013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState WordWrap() const; //Returns the value of WordWrap - inline void SetWordWrap(Office::MsoTriState value); //Sets the value of the WordWrap property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT BulletFormat : public QAxObject -{ -public: - BulletFormat(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 577001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Character - - For more information, see help context 577004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Character() const; //Returns the value of Character - inline void SetCharacter(int value); //Sets the value of the Character property - - /* - Property Font - - For more information, see help context 577008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Font* Font() const; //Returns the value of Font - - /* - Property Number - - For more information, see help context 577013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Number() const; //Returns the value of Number - - /* - Property Parent - - For more information, see help context 577002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RelativeSize - - For more information, see help context 577005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double RelativeSize() const; //Returns the value of RelativeSize - inline void SetRelativeSize(double value); //Sets the value of the RelativeSize property - - /* - Property StartValue - - For more information, see help context 577011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int StartValue() const; //Returns the value of StartValue - inline void SetStartValue(int value); //Sets the value of the StartValue property - - /* - Property Style - - For more information, see help context 577010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpNumberedBulletStyle Style() const; //Returns the value of Style - inline void SetStyle(PowerPoint::PpNumberedBulletStyle value); //Sets the value of the Style property - - /* - Property Type - - For more information, see help context 577009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpBulletType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::PpBulletType value); //Sets the value of the Type property - - /* - Property UseTextColor - - For more information, see help context 577006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UseTextColor() const; //Returns the value of UseTextColor - inline void SetUseTextColor(Office::MsoTriState value); //Sets the value of the UseTextColor property - - /* - Property UseTextFont - - For more information, see help context 577007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UseTextFont() const; //Returns the value of UseTextFont - inline void SetUseTextFont(Office::MsoTriState value); //Sets the value of the UseTextFont property - - /* - Property Visible - - For more information, see help context 577003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Method Picture - - For more information, see help context 577012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Picture(const QString& Picture); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextStyles : public QAxObject -{ -public: - TextStyles(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 578001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 578002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 578003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextStyle* Item(PowerPoint::PpTextStyleType Type); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextStyle : public QAxObject -{ -public: - TextStyle(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 579001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Levels - - For more information, see help context 579005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextStyleLevels* Levels() const; //Returns the value of Levels - - /* - Property Parent - - For more information, see help context 579002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Ruler - - For more information, see help context 579003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Ruler* Ruler() const; //Returns the value of Ruler - - /* - Property TextFrame - - For more information, see help context 579004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextFrame* TextFrame() const; //Returns the value of TextFrame - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextStyleLevels : public QAxObject -{ -public: - TextStyleLevels(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 580001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 580002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 580003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextStyleLevel* Item(int Level); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TextStyleLevel : public QAxObject -{ -public: - TextStyleLevel(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 581001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Font - - For more information, see help context 581004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Font* Font() const; //Returns the value of Font - - /* - Property ParagraphFormat - - For more information, see help context 581003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ParagraphFormat* ParagraphFormat() const; //Returns the value of ParagraphFormat - - /* - Property Parent - - For more information, see help context 581002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT HeaderFooter : public QAxObject -{ -public: - HeaderFooter(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 582001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Format - - For more information, see help context 582006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpDateTimeFormat Format() const; //Returns the value of Format - inline void SetFormat(PowerPoint::PpDateTimeFormat value); //Sets the value of the Format property - - /* - Property Parent - - For more information, see help context 582002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Text - - For more information, see help context 582004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Text() const; //Returns the value of Text - inline void SetText(const QString& value); //Sets the value of the Text property - - /* - Property UseFormat - - For more information, see help context 582005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UseFormat() const; //Returns the value of UseFormat - inline void SetUseFormat(Office::MsoTriState value); //Sets the value of the UseFormat property - - /* - Property Visible - - For more information, see help context 582003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT _Presentation : public QAxObject -{ -public: - _Presentation(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 583001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BuiltInDocumentProperties - - For more information, see help context 583020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* BuiltInDocumentProperties() const; //Returns the value of BuiltInDocumentProperties - - /* - Property ColorSchemes - - For more information, see help context 583013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorSchemes* ColorSchemes() const; //Returns the value of ColorSchemes - - /* - Property CommandBars - - For more information, see help context 583051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Container - - For more information, see help context 583041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Container() const; //Returns the value of Container - - /* - Property CustomDocumentProperties - - For more information, see help context 583021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* CustomDocumentProperties() const; //Returns the value of CustomDocumentProperties - - /* - Property DefaultLanguageID - - For more information, see help context 583050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoLanguageID DefaultLanguageID() const; //Returns the value of DefaultLanguageID - inline void SetDefaultLanguageID(Office::MsoLanguageID value); //Sets the value of the DefaultLanguageID property - - /* - Property DefaultShape - - For more information, see help context 583019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* DefaultShape() const; //Returns the value of DefaultShape - - /* - Property Designs - - For more information, see help context 583063 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Designs* Designs() const; //Returns the value of Designs - - /* - Property DisplayComments - - For more information, see help context 583042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayComments() const; //Returns the value of DisplayComments - inline void SetDisplayComments(Office::MsoTriState value); //Sets the value of the DisplayComments property - - /* - Property DocumentLibraryVersions - - For more information, see help context 583086 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::DocumentLibraryVersions* DocumentLibraryVersions() const; //Returns the value of DocumentLibraryVersions - - /* - Property EnvelopeVisible - - For more information, see help context 583057 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState EnvelopeVisible() const; //Returns the value of EnvelopeVisible - inline void SetEnvelopeVisible(Office::MsoTriState value); //Sets the value of the EnvelopeVisible property - - /* - Property ExtraColors - - For more information, see help context 583014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ExtraColors* ExtraColors() const; //Returns the value of ExtraColors - - /* - Property FarEastLineBreakLanguage - - For more information, see help context 583048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoFarEastLineBreakLanguageID FarEastLineBreakLanguage() const; //Returns the value of FarEastLineBreakLanguage - inline void SetFarEastLineBreakLanguage(Office::MsoFarEastLineBreakLanguageID value); //Sets the value of the FarEastLineBreakLanguage property - - /* - Property FarEastLineBreakLevel - - For more information, see help context 583043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpFarEastLineBreakLevel FarEastLineBreakLevel() const; //Returns the value of FarEastLineBreakLevel - inline void SetFarEastLineBreakLevel(PowerPoint::PpFarEastLineBreakLevel value); //Sets the value of the FarEastLineBreakLevel property - - /* - Property Fonts - - For more information, see help context 583016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Fonts* Fonts() const; //Returns the value of Fonts - - /* - Property FullName - - For more information, see help context 583024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FullName() const; //Returns the value of FullName - - /* - Property GridDistance - - For more information, see help context 583062 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double GridDistance() const; //Returns the value of GridDistance - inline void SetGridDistance(double value); //Sets the value of the GridDistance property - - /* - Property HTMLProject - - For more information, see help context 583054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::HTMLProject* HTMLProject() const; //Returns the value of HTMLProject - - /* - Property HandoutMaster - - For more information, see help context 583010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* HandoutMaster() const; //Returns the value of HandoutMaster - - /* - Property HasRevisionInfo - - For more information, see help context 583072 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpRevisionInfo HasRevisionInfo() const; //Returns the value of HasRevisionInfo - - /* - Property HasTitleMaster - - For more information, see help context 583005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTitleMaster() const; //Returns the value of HasTitleMaster - - /* - Property LayoutDirection - - For more information, see help context 583028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpDirection LayoutDirection() const; //Returns the value of LayoutDirection - inline void SetLayoutDirection(PowerPoint::PpDirection value); //Sets the value of the LayoutDirection property - - /* - Property Name - - For more information, see help context 583025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property NoLineBreakAfter - - For more information, see help context 583045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NoLineBreakAfter() const; //Returns the value of NoLineBreakAfter - inline void SetNoLineBreakAfter(const QString& value); //Sets the value of the NoLineBreakAfter property - - /* - Property NoLineBreakBefore - - For more information, see help context 583044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NoLineBreakBefore() const; //Returns the value of NoLineBreakBefore - inline void SetNoLineBreakBefore(const QString& value); //Sets the value of the NoLineBreakBefore property - - /* - Property NotesMaster - - For more information, see help context 583009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* NotesMaster() const; //Returns the value of NotesMaster - - /* - Property PageSetup - - For more information, see help context 583012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PageSetup* PageSetup() const; //Returns the value of PageSetup - - /* - Property Parent - - For more information, see help context 583002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Password - - For more information, see help context 583080 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Password() const; //Returns the value of Password - inline void SetPassword(const QString& value); //Sets the value of the Password property - - /* - Property PasswordEncryptionAlgorithm - - For more information, see help context 583076 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString PasswordEncryptionAlgorithm() const; //Returns the value of PasswordEncryptionAlgorithm - - /* - Property PasswordEncryptionFileProperties - - For more information, see help context 583078 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool PasswordEncryptionFileProperties() const; //Returns the value of PasswordEncryptionFileProperties - - /* - Property PasswordEncryptionKeyLength - - For more information, see help context 583077 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PasswordEncryptionKeyLength() const; //Returns the value of PasswordEncryptionKeyLength - - /* - Property PasswordEncryptionProvider - - For more information, see help context 583075 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString PasswordEncryptionProvider() const; //Returns the value of PasswordEncryptionProvider - - /* - Property Path - - For more information, see help context 583026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property Permission - - For more information, see help context 583082 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Permission* Permission() const; //Returns the value of Permission - - /* - Property PrintOptions - - For more information, see help context 583033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintOptions* PrintOptions() const; //Returns the value of PrintOptions - - /* - Property PublishObjects - - For more information, see help context 583052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PublishObjects* PublishObjects() const; //Returns the value of PublishObjects - - /* - Property ReadOnly - - For more information, see help context 583023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ReadOnly() const; //Returns the value of ReadOnly - - /* - Property RemovePersonalInformation - - For more information, see help context 583068 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RemovePersonalInformation() const; //Returns the value of RemovePersonalInformation - inline void SetRemovePersonalInformation(Office::MsoTriState value); //Sets the value of the RemovePersonalInformation property - - /* - Property Saved - - For more information, see help context 583027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Saved() const; //Returns the value of Saved - inline void SetSaved(Office::MsoTriState value); //Sets the value of the Saved property - - /* - Property SharedWorkspace - - For more information, see help context 583083 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::SharedWorkspace* SharedWorkspace() const; //Returns the value of SharedWorkspace - - /* - Property Signatures - - For more information, see help context 583067 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::SignatureSet* Signatures() const; //Returns the value of Signatures - - /* - Property SlideMaster - - For more information, see help context 583003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* SlideMaster() const; //Returns the value of SlideMaster - - /* - Property SlideShowSettings - - For more information, see help context 583015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowSettings* SlideShowSettings() const; //Returns the value of SlideShowSettings - - /* - Property SlideShowWindow - - For more information, see help context 583047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindow* SlideShowWindow() const; //Returns the value of SlideShowWindow - - /* - Property Slides - - For more information, see help context 583011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slides* Slides() const; //Returns the value of Slides - - /* - Property SnapToGrid - - For more information, see help context 583061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SnapToGrid() const; //Returns the value of SnapToGrid - inline void SetSnapToGrid(Office::MsoTriState value); //Sets the value of the SnapToGrid property - - /* - Property Sync - - For more information, see help context 583084 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Sync* Sync() const; //Returns the value of Sync - - /* - Property Tags - - For more information, see help context 583018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TemplateName - - For more information, see help context 583008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString TemplateName() const; //Returns the value of TemplateName - - /* - Property TitleMaster - - For more information, see help context 583004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* TitleMaster() const; //Returns the value of TitleMaster - - /* - Property VBASigned - - For more information, see help context 583059 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState VBASigned() const; //Returns the value of VBASigned - - /* - Property VBProject - - For more information, see help context 583022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline VBIDE::VBProject* VBProject() const; //Returns the value of VBProject - - /* - Property WebOptions - - For more information, see help context 583053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::WebOptions* WebOptions() const; //Returns the value of WebOptions - - /* - Property Windows - - For more information, see help context 583017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - - /* - Property WritePassword - - For more information, see help context 583081 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString WritePassword() const; //Returns the value of WritePassword - inline void SetWritePassword(const QString& value); //Sets the value of the WritePassword property - - /* - Method AddBaseline - - For more information, see help context 583073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddBaseline(); - - /* - Method AddBaseline - - For more information, see help context 583073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddBaseline(const QString& FileName); - - /* - Method AddTitleMaster - - For more information, see help context 583006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* AddTitleMaster(); - - /* - Method AddToFavorites - - For more information, see help context 583031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddToFavorites(); - - /* - Method ApplyTemplate - - For more information, see help context 583007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ApplyTemplate(const QString& FileName); - - /* - Method CanCheckIn - - For more information, see help context 583066 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool CanCheckIn(); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges, const QVariant& Comments); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges, const QVariant& Comments, const QVariant& MakePublic); - - /* - Method Close - - For more information, see help context 583039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Close(); - - /* - Method EndReview - - For more information, see help context 583071 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EndReview(); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName, int ScaleWidth); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName, int ScaleWidth, int ScaleHeight); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method, const QString& HeaderInfo); - - /* - Method MakeIntoTemplate - - For more information, see help context 583056 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MakeIntoTemplate(Office::MsoTriState IsDesignTemplate); - - /* - Method Merge - - For more information, see help context 583064 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Merge(const QString& Path); - - /* - Method NewWindow - - For more information, see help context 583029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* NewWindow(); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate); - - /* - Method ReloadAs - - For more information, see help context 583055 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReloadAs(Office::MsoEncoding cp); - - /* - Method RemoveBaseline - - For more information, see help context 583074 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RemoveBaseline(); - - /* - Method ReplyWithChanges - - For more information, see help context 583070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReplyWithChanges(); - - /* - Method ReplyWithChanges - - For more information, see help context 583070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReplyWithChanges(bool ShowMessage); - - /* - Method Save - - For more information, see help context 583035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Save(); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients, const QString& Subject); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients, const QString& Subject, bool ShowMessage); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage, const QVariant& IncludeAttachment); - - /* - Method SetPasswordEncryptionOptions - - For more information, see help context 583079 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetPasswordEncryptionOptions(const QString& PasswordEncryptionProvider, const QString& PasswordEncryptionAlgorithm, int PasswordEncryptionKeyLength, bool PasswordEncryptionFileProperties); - - /* - Method SetUndoText - - For more information, see help context 583040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetUndoText(const QString& Text); - - /* - Method Unused - - For more information, see help context 583032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Unused(); - - /* - Method UpdateLinks - - For more information, see help context 583046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void UpdateLinks(); - - /* - Method WebPagePreview - - For more information, see help context 583049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void WebPagePreview(); - - /* - Method sblt - - For more information, see help context 583058 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void sblt(const QString& s); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Tags : public QAxObject -{ -public: - Tags(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 611001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 611002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 611004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Add(const QString& Name, const QString& Value); - - /* - Method AddBinary - - For more information, see help context 611006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddBinary(const QString& Name, const QString& FilePath); - - /* - Method BinaryValue - - For more information, see help context 611007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int BinaryValue(const QString& Name); - - /* - Method Delete - - For more information, see help context 611005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(const QString& Name); - - /* - Method Item - - For more information, see help context 611003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Item(const QString& Name); - - /* - Method Name - - For more information, see help context 611008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name(int Index); - - /* - Method Value - - For more information, see help context 611009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Value(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class MouseTracker : public QAxObject {}; - -// stub for vtable-only interface -class MouseDownHandler : public QAxObject {}; - -class POWERPOINT_EXPORT OCXExtender : public QAxObject -{ -public: - OCXExtender(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AltHTML - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString AltHTML() const; //Returns the value of AltHTML - inline void SetAltHTML(const QString& value); //Sets the value of the AltHTML property - - /* - Property Height - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property Left - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Name - - For more information, see help context 618003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Top - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Visible - - For more information, see help context 618001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class OCXExtenderEvents : public QAxObject {}; - -// stub for vtable-only interface -class EApplication : public QAxObject {}; - -class POWERPOINT_EXPORT Table : public QAxObject -{ -public: - Table(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 622001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Columns - - For more information, see help context 622003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Columns* Columns() const; //Returns the value of Columns - - /* - Property Parent - - For more information, see help context 622002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Rows - - For more information, see help context 622004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Rows* Rows() const; //Returns the value of Rows - - /* - Property TableDirection - - For more information, see help context 622006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpDirection TableDirection() const; //Returns the value of TableDirection - inline void SetTableDirection(PowerPoint::PpDirection value); //Sets the value of the TableDirection property - - /* - Method Cell - - For more information, see help context 622005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Cell* Cell(int Row, int Column); - - /* - Method MergeBorders - - For more information, see help context 622007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MergeBorders(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Columns : public QAxObject -{ -public: - Columns(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 623001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 623002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 623004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Column* Add(); - - /* - Method Add - - For more information, see help context 623004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Column* Add(int BeforeColumn); - - /* - Method Item - - For more information, see help context 623003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Column* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Column : public QAxObject -{ -public: - Column(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 624001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Cells - - For more information, see help context 624003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CellRange* Cells() const; //Returns the value of Cells - - /* - Property Parent - - For more information, see help context 624002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Width - - For more information, see help context 624006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Method Delete - - For more information, see help context 624005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Select - - For more information, see help context 624004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Rows : public QAxObject -{ -public: - Rows(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 625001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 625002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 625004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Row* Add(); - - /* - Method Add - - For more information, see help context 625004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Row* Add(int BeforeRow); - - /* - Method Item - - For more information, see help context 625003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Row* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Row : public QAxObject -{ -public: - Row(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 626001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Cells - - For more information, see help context 626003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CellRange* Cells() const; //Returns the value of Cells - - /* - Property Height - - For more information, see help context 626006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property Parent - - For more information, see help context 626002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Method Delete - - For more information, see help context 626005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Select - - For more information, see help context 626004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT CellRange : public QAxObject -{ -public: - CellRange(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 627001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Borders - - For more information, see help context 627004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Borders* Borders() const; //Returns the value of Borders - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 627002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 627003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Cell* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Cell : public QAxObject -{ -public: - Cell(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 628001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Borders - - For more information, see help context 628004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Borders* Borders() const; //Returns the value of Borders - - /* - Property Parent - - For more information, see help context 628002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Selected - - For more information, see help context 628008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool Selected() const; //Returns the value of Selected - - /* - Property Shape - - For more information, see help context 628003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Shape() const; //Returns the value of Shape - - /* - Method Merge - - For more information, see help context 628005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Merge(PowerPoint::Cell* MergeTo); - - /* - Method Select - - For more information, see help context 628007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - - /* - Method Split - - For more information, see help context 628006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Split(int NumRows, int NumColumns); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Borders : public QAxObject -{ -public: - Borders(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 629001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 629002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 629003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::LineFormat* Item(PowerPoint::PpBorderType BorderType); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Panes : public QAxObject -{ -public: - Panes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 630001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 630003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 630002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Pane* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Pane : public QAxObject -{ -public: - Pane(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Active - - For more information, see help context 631003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Active() const; //Returns the value of Active - - /* - Property Application - - For more information, see help context 631004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 631001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ViewType - - For more information, see help context 631005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpViewType ViewType() const; //Returns the value of ViewType - - /* - Method Activate - - For more information, see help context 631002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DefaultWebOptions : public QAxObject -{ -public: - DefaultWebOptions(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AllowPNG - - For more information, see help context 632008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AllowPNG() const; //Returns the value of AllowPNG - inline void SetAllowPNG(Office::MsoTriState value); //Sets the value of the AllowPNG property - - /* - Property AlwaysSaveInDefaultEncoding - - For more information, see help context 632013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AlwaysSaveInDefaultEncoding() const; //Returns the value of AlwaysSaveInDefaultEncoding - inline void SetAlwaysSaveInDefaultEncoding(Office::MsoTriState value); //Sets the value of the AlwaysSaveInDefaultEncoding property - - /* - Property CheckIfOfficeIsHTMLEditor - - For more information, see help context 632012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState CheckIfOfficeIsHTMLEditor() const; //Returns the value of CheckIfOfficeIsHTMLEditor - inline void SetCheckIfOfficeIsHTMLEditor(Office::MsoTriState value); //Sets the value of the CheckIfOfficeIsHTMLEditor property - - /* - Property Encoding - - For more information, see help context 632010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoEncoding Encoding() const; //Returns the value of Encoding - inline void SetEncoding(Office::MsoEncoding value); //Sets the value of the Encoding property - - /* - Property FolderSuffix - - For more information, see help context 632015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FolderSuffix() const; //Returns the value of FolderSuffix - - /* - Property Fonts - - For more information, see help context 632014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::WebPageFonts* Fonts() const; //Returns the value of Fonts - - /* - Property FrameColors - - For more information, see help context 632002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpFrameColors FrameColors() const; //Returns the value of FrameColors - inline void SetFrameColors(PowerPoint::PpFrameColors value); //Sets the value of the FrameColors property - - /* - Property HTMLVersion - - For more information, see help context 632018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpHTMLVersion HTMLVersion() const; //Returns the value of HTMLVersion - inline void SetHTMLVersion(PowerPoint::PpHTMLVersion value); //Sets the value of the HTMLVersion property - - /* - Property IncludeNavigation - - For more information, see help context 632001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState IncludeNavigation() const; //Returns the value of IncludeNavigation - inline void SetIncludeNavigation(Office::MsoTriState value); //Sets the value of the IncludeNavigation property - - /* - Property OrganizeInFolder - - For more information, see help context 632005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState OrganizeInFolder() const; //Returns the value of OrganizeInFolder - inline void SetOrganizeInFolder(Office::MsoTriState value); //Sets the value of the OrganizeInFolder property - - /* - Property RelyOnVML - - For more information, see help context 632007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RelyOnVML() const; //Returns the value of RelyOnVML - inline void SetRelyOnVML(Office::MsoTriState value); //Sets the value of the RelyOnVML property - - /* - Property ResizeGraphics - - For more information, see help context 632003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ResizeGraphics() const; //Returns the value of ResizeGraphics - inline void SetResizeGraphics(Office::MsoTriState value); //Sets the value of the ResizeGraphics property - - /* - Property SaveNewWebPagesAsWebArchives - - For more information, see help context 632017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SaveNewWebPagesAsWebArchives() const; //Returns the value of SaveNewWebPagesAsWebArchives - inline void SetSaveNewWebPagesAsWebArchives(Office::MsoTriState value); //Sets the value of the SaveNewWebPagesAsWebArchives property - - /* - Property ScreenSize - - For more information, see help context 632009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoScreenSize ScreenSize() const; //Returns the value of ScreenSize - inline void SetScreenSize(Office::MsoScreenSize value); //Sets the value of the ScreenSize property - - /* - Property ShowSlideAnimation - - For more information, see help context 632004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowSlideAnimation() const; //Returns the value of ShowSlideAnimation - inline void SetShowSlideAnimation(Office::MsoTriState value); //Sets the value of the ShowSlideAnimation property - - /* - Property TargetBrowser - - For more information, see help context 632016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTargetBrowser TargetBrowser() const; //Returns the value of TargetBrowser - inline void SetTargetBrowser(Office::MsoTargetBrowser value); //Sets the value of the TargetBrowser property - - /* - Property UpdateLinksOnSave - - For more information, see help context 632011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UpdateLinksOnSave() const; //Returns the value of UpdateLinksOnSave - inline void SetUpdateLinksOnSave(Office::MsoTriState value); //Sets the value of the UpdateLinksOnSave property - - /* - Property UseLongFileNames - - For more information, see help context 632006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UseLongFileNames() const; //Returns the value of UseLongFileNames - inline void SetUseLongFileNames(Office::MsoTriState value); //Sets the value of the UseLongFileNames property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT WebOptions : public QAxObject -{ -public: - WebOptions(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AllowPNG - - For more information, see help context 633008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AllowPNG() const; //Returns the value of AllowPNG - inline void SetAllowPNG(Office::MsoTriState value); //Sets the value of the AllowPNG property - - /* - Property Encoding - - For more information, see help context 633010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoEncoding Encoding() const; //Returns the value of Encoding - inline void SetEncoding(Office::MsoEncoding value); //Sets the value of the Encoding property - - /* - Property FolderSuffix - - For more information, see help context 633011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FolderSuffix() const; //Returns the value of FolderSuffix - - /* - Property FrameColors - - For more information, see help context 633002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpFrameColors FrameColors() const; //Returns the value of FrameColors - inline void SetFrameColors(PowerPoint::PpFrameColors value); //Sets the value of the FrameColors property - - /* - Property HTMLVersion - - For more information, see help context 633014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpHTMLVersion HTMLVersion() const; //Returns the value of HTMLVersion - inline void SetHTMLVersion(PowerPoint::PpHTMLVersion value); //Sets the value of the HTMLVersion property - - /* - Property IncludeNavigation - - For more information, see help context 633001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState IncludeNavigation() const; //Returns the value of IncludeNavigation - inline void SetIncludeNavigation(Office::MsoTriState value); //Sets the value of the IncludeNavigation property - - /* - Property OrganizeInFolder - - For more information, see help context 633005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState OrganizeInFolder() const; //Returns the value of OrganizeInFolder - inline void SetOrganizeInFolder(Office::MsoTriState value); //Sets the value of the OrganizeInFolder property - - /* - Property RelyOnVML - - For more information, see help context 633007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RelyOnVML() const; //Returns the value of RelyOnVML - inline void SetRelyOnVML(Office::MsoTriState value); //Sets the value of the RelyOnVML property - - /* - Property ResizeGraphics - - For more information, see help context 633003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ResizeGraphics() const; //Returns the value of ResizeGraphics - inline void SetResizeGraphics(Office::MsoTriState value); //Sets the value of the ResizeGraphics property - - /* - Property ScreenSize - - For more information, see help context 633009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoScreenSize ScreenSize() const; //Returns the value of ScreenSize - inline void SetScreenSize(Office::MsoScreenSize value); //Sets the value of the ScreenSize property - - /* - Property ShowSlideAnimation - - For more information, see help context 633004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowSlideAnimation() const; //Returns the value of ShowSlideAnimation - inline void SetShowSlideAnimation(Office::MsoTriState value); //Sets the value of the ShowSlideAnimation property - - /* - Property TargetBrowser - - For more information, see help context 633013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTargetBrowser TargetBrowser() const; //Returns the value of TargetBrowser - inline void SetTargetBrowser(Office::MsoTargetBrowser value); //Sets the value of the TargetBrowser property - - /* - Property UseLongFileNames - - For more information, see help context 633006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState UseLongFileNames() const; //Returns the value of UseLongFileNames - inline void SetUseLongFileNames(Office::MsoTriState value); //Sets the value of the UseLongFileNames property - - /* - Method UseDefaultFolderSuffix - - For more information, see help context 633012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void UseDefaultFolderSuffix(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PublishObjects : public QAxObject -{ -public: - PublishObjects(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 634001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 634002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 634003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PublishObject* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PublishObject : public QAxObject -{ -public: - PublishObject(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 635001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property FileName - - For more information, see help context 635009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FileName() const; //Returns the value of FileName - inline void SetFileName(const QString& value); //Sets the value of the FileName property - - /* - Property HTMLVersion - - For more information, see help context 635003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpHTMLVersion HTMLVersion() const; //Returns the value of HTMLVersion - inline void SetHTMLVersion(PowerPoint::PpHTMLVersion value); //Sets the value of the HTMLVersion property - - /* - Property Parent - - For more information, see help context 635002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RangeEnd - - For more information, see help context 635006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int RangeEnd() const; //Returns the value of RangeEnd - inline void SetRangeEnd(int value); //Sets the value of the RangeEnd property - - /* - Property RangeStart - - For more information, see help context 635005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int RangeStart() const; //Returns the value of RangeStart - inline void SetRangeStart(int value); //Sets the value of the RangeStart property - - /* - Property SlideShowName - - For more information, see help context 635007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString SlideShowName() const; //Returns the value of SlideShowName - inline void SetSlideShowName(const QString& value); //Sets the value of the SlideShowName property - - /* - Property SourceType - - For more information, see help context 635004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpPublishSourceType SourceType() const; //Returns the value of SourceType - inline void SetSourceType(PowerPoint::PpPublishSourceType value); //Sets the value of the SourceType property - - /* - Property SpeakerNotes - - For more information, see help context 635008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SpeakerNotes() const; //Returns the value of SpeakerNotes - inline void SetSpeakerNotes(Office::MsoTriState value); //Sets the value of the SpeakerNotes property - - /* - Method Publish - - For more information, see help context 635010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Publish(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// stub for vtable-only interface -class MasterEvents : public QAxObject {}; - -class POWERPOINT_EXPORT _PowerRex : public QAxObject -{ -public: - _PowerRex(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Method OnAsfEncoderEvent - - For more information, see help context 639001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void OnAsfEncoderEvent(const QVariant& erorCode, const QVariant& bstrErrorDesc); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Comments : public QAxObject -{ -public: - Comments(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 641001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 641002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 641004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Comment* Add(double Left, double Top, const QString& Author, const QString& AuthorInitials, const QString& Text); - - /* - Method Item - - For more information, see help context 641003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Comment* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Comment : public QAxObject -{ -public: - Comment(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 642001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Author - - For more information, see help context 642003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Author() const; //Returns the value of Author - - /* - Property AuthorIndex - - For more information, see help context 642007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int AuthorIndex() const; //Returns the value of AuthorIndex - - /* - Property AuthorInitials - - For more information, see help context 642004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString AuthorInitials() const; //Returns the value of AuthorInitials - - /* - Property DateTime - - For more information, see help context 642006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QDateTime DateTime() const; //Returns the value of DateTime - - /* - Property Left - - For more information, see help context 642008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - - /* - Property Parent - - For more information, see help context 642002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Text - - For more information, see help context 642005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Text() const; //Returns the value of Text - - /* - Property Top - - For more information, see help context 642009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - - /* - Method Delete - - For more information, see help context 642010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Designs : public QAxObject -{ -public: - Designs(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 643001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 643002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 643004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Add(const QString& designName); - - /* - Method Add - - For more information, see help context 643004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Add(const QString& designName, int Index); - - /* - Method Clone - - For more information, see help context 643006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Clone(PowerPoint::Design* pOriginal); - - /* - Method Clone - - For more information, see help context 643006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Clone(PowerPoint::Design* pOriginal, int Index); - - /* - Method Item - - For more information, see help context 643003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Item(const QVariant& Index); - - /* - Method Load - - For more information, see help context 643005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Load(const QString& TemplateName); - - /* - Method Load - - For more information, see help context 643005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Load(const QString& TemplateName, int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Design : public QAxObject -{ -public: - Design(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 644001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property HasTitleMaster - - For more information, see help context 644005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTitleMaster() const; //Returns the value of HasTitleMaster - - /* - Property Index - - For more information, see help context 644007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Index() const; //Returns the value of Index - - /* - Property Name - - For more information, see help context 644008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 644002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Preserved - - For more information, see help context 644009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Preserved() const; //Returns the value of Preserved - inline void SetPreserved(Office::MsoTriState value); //Sets the value of the Preserved property - - /* - Property SlideMaster - - For more information, see help context 644003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* SlideMaster() const; //Returns the value of SlideMaster - - /* - Property TitleMaster - - For more information, see help context 644004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* TitleMaster() const; //Returns the value of TitleMaster - - /* - Method AddTitleMaster - - For more information, see help context 644006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* AddTitleMaster(); - - /* - Method Delete - - For more information, see help context 644011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method MoveTo - - For more information, see help context 644010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveTo(int toPos); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DiagramNode : public QAxObject -{ -public: - DiagramNode(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Children - - For more information, see help context 645011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNodeChildren* Children() const; //Returns the value of Children - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Diagram - - For more information, see help context 645014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Diagram* Diagram() const; //Returns the value of Diagram - - /* - Property Layout - - For more information, see help context 645015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoOrgChartLayoutType Layout() const; //Returns the value of Layout - inline void SetLayout(Office::MsoOrgChartLayoutType value); //Sets the value of the Layout property - - /* - Property Parent - - For more information, see help context 645010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Root - - For more information, see help context 645013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* Root() const; //Returns the value of Root - - /* - Property Shape - - For more information, see help context 645012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Shape() const; //Returns the value of Shape - - /* - Property TextShape - - For more information, see help context 645016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* TextShape() const; //Returns the value of TextShape - - /* - Method AddNode - - For more information, see help context 645001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(); - - /* - Method AddNode - - For more information, see help context 645001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(Office::MsoRelativeNodePosition Pos); - - /* - Method AddNode - - For more information, see help context 645001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(Office::MsoRelativeNodePosition Pos, Office::MsoDiagramNodeType NodeType); - - /* - Method CloneNode - - For more information, see help context 645006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* CloneNode(bool CopyChildren, PowerPoint::DiagramNode* TargetNode); - - /* - Method CloneNode - - For more information, see help context 645006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* CloneNode(bool CopyChildren, PowerPoint::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos); - - /* - Method Delete - - For more information, see help context 645002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method MoveNode - - For more information, see help context 645003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveNode(PowerPoint::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos); - - /* - Method NextNode - - For more information, see help context 645008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* NextNode(); - - /* - Method PrevNode - - For more information, see help context 645009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* PrevNode(); - - /* - Method ReplaceNode - - For more information, see help context 645004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReplaceNode(PowerPoint::DiagramNode* TargetNode); - - /* - Method SwapNode - - For more information, see help context 645005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SwapNode(PowerPoint::DiagramNode* TargetNode); - - /* - Method SwapNode - - For more information, see help context 645005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SwapNode(PowerPoint::DiagramNode* TargetNode, bool SwapChildren); - - /* - Method TransferChildren - - For more information, see help context 645007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void TransferChildren(PowerPoint::DiagramNode* ReceivingNode); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DiagramNodeChildren : public QAxObject -{ -public: - DiagramNodeChildren(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 646006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property FirstChild - - For more information, see help context 646007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* FirstChild() const; //Returns the value of FirstChild - - /* - Property LastChild - - For more information, see help context 646008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* LastChild() const; //Returns the value of LastChild - - /* - Property Parent - - For more information, see help context 646005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 646001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddNode - - For more information, see help context 646003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(); - - /* - Method AddNode - - For more information, see help context 646003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(const QVariant& Index); - - /* - Method AddNode - - For more information, see help context 646003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* AddNode(const QVariant& Index, Office::MsoDiagramNodeType NodeType); - - /* - Method Item - - For more information, see help context 646002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* Item(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 646004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT DiagramNodes : public QAxObject -{ -public: - DiagramNodes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 647005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 647004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 647001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Item - - For more information, see help context 647002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNode* Item(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 647003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Diagram : public QAxObject -{ -public: - Diagram(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property AutoFormat - - For more information, see help context 648006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoFormat() const; //Returns the value of AutoFormat - inline void SetAutoFormat(Office::MsoTriState value); //Sets the value of the AutoFormat property - - /* - Property AutoLayout - - For more information, see help context 648004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoLayout() const; //Returns the value of AutoLayout - inline void SetAutoLayout(Office::MsoTriState value); //Sets the value of the AutoLayout property - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Nodes - - For more information, see help context 648002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DiagramNodes* Nodes() const; //Returns the value of Nodes - - /* - Property Parent - - For more information, see help context 648001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Reverse - - For more information, see help context 648005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Reverse() const; //Returns the value of Reverse - inline void SetReverse(Office::MsoTriState value); //Sets the value of the Reverse property - - /* - Property Type - - For more information, see help context 648003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoDiagramType Type() const; //Returns the value of Type - - /* - Method Convert - - For more information, see help context 648007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Convert(Office::MsoDiagramType Type); - - /* - Method FitText - - For more information, see help context 648008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FitText(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT TimeLine : public QAxObject -{ -public: - TimeLine(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 649001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property InteractiveSequences - - For more information, see help context 649004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Sequences* InteractiveSequences() const; //Returns the value of InteractiveSequences - - /* - Property MainSequence - - For more information, see help context 649003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Sequence* MainSequence() const; //Returns the value of MainSequence - - /* - Property Parent - - For more information, see help context 649002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Sequences : public QAxObject -{ -public: - Sequences(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 650001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 650002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 650004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Sequence* Add(); - - /* - Method Add - - For more information, see help context 650004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Sequence* Add(int Index); - - /* - Method Item - - For more information, see help context 650003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Sequence* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Sequence : public QAxObject -{ -public: - Sequence(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 651001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 651002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddEffect - - For more information, see help context 651004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId); - - /* - Method AddEffect - - For more information, see help context 651004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level); - - /* - Method AddEffect - - For more information, see help context 651004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level, PowerPoint::MsoAnimTriggerType trigger); - - /* - Method AddEffect - - For more information, see help context 651004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level, PowerPoint::MsoAnimTriggerType trigger, int Index); - - /* - Method Clone - - For more information, see help context 651005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* Clone(PowerPoint::Effect* Effect); - - /* - Method Clone - - For more information, see help context 651005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* Clone(PowerPoint::Effect* Effect, int Index); - - /* - Method ConvertToAfterEffect - - For more information, see help context 651009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After); - - /* - Method ConvertToAfterEffect - - For more information, see help context 651009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After, int DimColor); - - /* - Method ConvertToAfterEffect - - For more information, see help context 651009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After, int DimColor, PowerPoint::PpColorSchemeIndex DimSchemeColor); - - /* - Method ConvertToAnimateBackground - - For more information, see help context 651010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToAnimateBackground(PowerPoint::Effect* Effect, Office::MsoTriState AnimateBackground); - - /* - Method ConvertToAnimateInReverse - - For more information, see help context 651011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToAnimateInReverse(PowerPoint::Effect* Effect, Office::MsoTriState animateInReverse); - - /* - Method ConvertToBuildLevel - - For more information, see help context 651008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToBuildLevel(PowerPoint::Effect* Effect, PowerPoint::MsoAnimateByLevel Level); - - /* - Method ConvertToTextUnitEffect - - For more information, see help context 651012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* ConvertToTextUnitEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimTextUnitEffect unitEffect); - - /* - Method FindFirstAnimationFor - - For more information, see help context 651006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* FindFirstAnimationFor(PowerPoint::Shape* Shape); - - /* - Method FindFirstAnimationForClick - - For more information, see help context 651007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* FindFirstAnimationForClick(int click); - - /* - Method Item - - For more information, see help context 651003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Effect* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Effect : public QAxObject -{ -public: - Effect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 652001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Behaviors - - For more information, see help context 652017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationBehaviors* Behaviors() const; //Returns the value of Behaviors - - /* - Property DisplayName - - For more information, see help context 652015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString DisplayName() const; //Returns the value of DisplayName - - /* - Property EffectInformation - - For more information, see help context 652018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::EffectInformation* EffectInformation() const; //Returns the value of EffectInformation - - /* - Property EffectParameters - - For more information, see help context 652011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::EffectParameters* EffectParameters() const; //Returns the value of EffectParameters - - /* - Property EffectType - - For more information, see help context 652010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimEffect EffectType() const; //Returns the value of EffectType - inline void SetEffectType(PowerPoint::MsoAnimEffect value); //Sets the value of the EffectType property - - /* - Property Exit - - For more information, see help context 652016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Exit() const; //Returns the value of Exit - inline void SetExit(Office::MsoTriState value); //Sets the value of the Exit property - - /* - Property Index - - For more information, see help context 652008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Index() const; //Returns the value of Index - - /* - Property Paragraph - - For more information, see help context 652014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Paragraph() const; //Returns the value of Paragraph - inline void SetParagraph(int value); //Sets the value of the Paragraph property - - /* - Property Parent - - For more information, see help context 652002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Shape - - For more information, see help context 652003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Shape() const; //Returns the value of Shape - inline void SetShape(PowerPoint::Shape* value); //Sets the value of the Shape property - - /* - Property TextRangeLength - - For more information, see help context 652013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int TextRangeLength() const; //Returns the value of TextRangeLength - - /* - Property TextRangeStart - - For more information, see help context 652012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int TextRangeStart() const; //Returns the value of TextRangeStart - - /* - Property Timing - - For more information, see help context 652009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Timing* Timing() const; //Returns the value of Timing - - /* - Method Delete - - For more information, see help context 652007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method MoveAfter - - For more information, see help context 652006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveAfter(PowerPoint::Effect* Effect); - - /* - Method MoveBefore - - For more information, see help context 652005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveBefore(PowerPoint::Effect* Effect); - - /* - Method MoveTo - - For more information, see help context 652004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveTo(int toPos); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Timing : public QAxObject -{ -public: - Timing(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Accelerate - - For more information, see help context 653010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Accelerate() const; //Returns the value of Accelerate - inline void SetAccelerate(double value); //Sets the value of the Accelerate property - - /* - Property Application - - For more information, see help context 653001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property AutoReverse - - For more information, see help context 653012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AutoReverse() const; //Returns the value of AutoReverse - inline void SetAutoReverse(Office::MsoTriState value); //Sets the value of the AutoReverse property - - /* - Property Decelerate - - For more information, see help context 653011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Decelerate() const; //Returns the value of Decelerate - inline void SetDecelerate(double value); //Sets the value of the Decelerate property - - /* - Property Duration - - For more information, see help context 653003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Duration() const; //Returns the value of Duration - inline void SetDuration(double value); //Sets the value of the Duration property - - /* - Property Parent - - For more information, see help context 653002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property RepeatCount - - For more information, see help context 653007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int RepeatCount() const; //Returns the value of RepeatCount - inline void SetRepeatCount(int value); //Sets the value of the RepeatCount property - - /* - Property RepeatDuration - - For more information, see help context 653008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double RepeatDuration() const; //Returns the value of RepeatDuration - inline void SetRepeatDuration(double value); //Sets the value of the RepeatDuration property - - /* - Property Restart - - For more information, see help context 653016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimEffectRestart Restart() const; //Returns the value of Restart - inline void SetRestart(PowerPoint::MsoAnimEffectRestart value); //Sets the value of the Restart property - - /* - Property RewindAtEnd - - For more information, see help context 653015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RewindAtEnd() const; //Returns the value of RewindAtEnd - inline void SetRewindAtEnd(Office::MsoTriState value); //Sets the value of the RewindAtEnd property - - /* - Property SmoothEnd - - For more information, see help context 653014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SmoothEnd() const; //Returns the value of SmoothEnd - inline void SetSmoothEnd(Office::MsoTriState value); //Sets the value of the SmoothEnd property - - /* - Property SmoothStart - - For more information, see help context 653013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SmoothStart() const; //Returns the value of SmoothStart - inline void SetSmoothStart(Office::MsoTriState value); //Sets the value of the SmoothStart property - - /* - Property Speed - - For more information, see help context 653009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Speed() const; //Returns the value of Speed - inline void SetSpeed(double value); //Sets the value of the Speed property - - /* - Property TriggerDelayTime - - For more information, see help context 653005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double TriggerDelayTime() const; //Returns the value of TriggerDelayTime - inline void SetTriggerDelayTime(double value); //Sets the value of the TriggerDelayTime property - - /* - Property TriggerShape - - For more information, see help context 653006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* TriggerShape() const; //Returns the value of TriggerShape - inline void SetTriggerShape(PowerPoint::Shape* value); //Sets the value of the TriggerShape property - - /* - Property TriggerType - - For more information, see help context 653004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimTriggerType TriggerType() const; //Returns the value of TriggerType - inline void SetTriggerType(PowerPoint::MsoAnimTriggerType value); //Sets the value of the TriggerType property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT EffectParameters : public QAxObject -{ -public: - EffectParameters(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Amount - - For more information, see help context 654004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Amount() const; //Returns the value of Amount - inline void SetAmount(double value); //Sets the value of the Amount property - - /* - Property Application - - For more information, see help context 654001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Color2 - - For more information, see help context 654006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* Color2() const; //Returns the value of Color2 - - /* - Property Direction - - For more information, see help context 654003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimDirection Direction() const; //Returns the value of Direction - inline void SetDirection(PowerPoint::MsoAnimDirection value); //Sets the value of the Direction property - - /* - Property FontName - - For more information, see help context 654008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FontName() const; //Returns the value of FontName - inline void SetFontName(const QString& value); //Sets the value of the FontName property - - /* - Property Parent - - For more information, see help context 654002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Relative - - For more information, see help context 654007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Relative() const; //Returns the value of Relative - inline void SetRelative(Office::MsoTriState value); //Sets the value of the Relative property - - /* - Property Size - - For more information, see help context 654005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Size() const; //Returns the value of Size - inline void SetSize(double value); //Sets the value of the Size property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT EffectInformation : public QAxObject -{ -public: - EffectInformation(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property AfterEffect - - For more information, see help context 655003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimAfterEffect AfterEffect() const; //Returns the value of AfterEffect - - /* - Property AnimateBackground - - For more information, see help context 655004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AnimateBackground() const; //Returns the value of AnimateBackground - - /* - Property AnimateTextInReverse - - For more information, see help context 655005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState AnimateTextInReverse() const; //Returns the value of AnimateTextInReverse - - /* - Property Application - - For more information, see help context 655001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BuildByLevelEffect - - For more information, see help context 655006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimateByLevel BuildByLevelEffect() const; //Returns the value of BuildByLevelEffect - - /* - Property Dim - - For more information, see help context 655007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* Dim() const; //Returns the value of Dim - - /* - Property Parent - - For more information, see help context 655002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PlaySettings - - For more information, see help context 655008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PlaySettings* PlaySettings() const; //Returns the value of PlaySettings - - /* - Property SoundEffect - - For more information, see help context 655009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SoundEffect* SoundEffect() const; //Returns the value of SoundEffect - - /* - Property TextUnitEffect - - For more information, see help context 655010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimTextUnitEffect TextUnitEffect() const; //Returns the value of TextUnitEffect - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AnimationBehaviors : public QAxObject -{ -public: - AnimationBehaviors(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 656001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 656002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 656004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationBehavior* Add(PowerPoint::MsoAnimType Type); - - /* - Method Add - - For more information, see help context 656004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationBehavior* Add(PowerPoint::MsoAnimType Type, int Index); - - /* - Method Item - - For more information, see help context 656003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationBehavior* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AnimationBehavior : public QAxObject -{ -public: - AnimationBehavior(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Accumulate - - For more information, see help context 657004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimAccumulate Accumulate() const; //Returns the value of Accumulate - inline void SetAccumulate(PowerPoint::MsoAnimAccumulate value); //Sets the value of the Accumulate property - - /* - Property Additive - - For more information, see help context 657003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimAdditive Additive() const; //Returns the value of Additive - inline void SetAdditive(PowerPoint::MsoAnimAdditive value); //Sets the value of the Additive property - - /* - Property Application - - For more information, see help context 657001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property ColorEffect - - For more information, see help context 657007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorEffect* ColorEffect() const; //Returns the value of ColorEffect - - /* - Property CommandEffect - - For more information, see help context 657013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::CommandEffect* CommandEffect() const; //Returns the value of CommandEffect - - /* - Property FilterEffect - - For more information, see help context 657014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::FilterEffect* FilterEffect() const; //Returns the value of FilterEffect - - /* - Property MotionEffect - - For more information, see help context 657006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MotionEffect* MotionEffect() const; //Returns the value of MotionEffect - - /* - Property Parent - - For more information, see help context 657002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PropertyEffect - - For more information, see help context 657010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PropertyEffect* PropertyEffect() const; //Returns the value of PropertyEffect - - /* - Property RotationEffect - - For more information, see help context 657009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::RotationEffect* RotationEffect() const; //Returns the value of RotationEffect - - /* - Property ScaleEffect - - For more information, see help context 657008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ScaleEffect* ScaleEffect() const; //Returns the value of ScaleEffect - - /* - Property SetEffect - - For more information, see help context 657015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SetEffect* SetEffect() const; //Returns the value of SetEffect - - /* - Property Timing - - For more information, see help context 657011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Timing* Timing() const; //Returns the value of Timing - - /* - Property Type - - For more information, see help context 657005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::MsoAnimType value); //Sets the value of the Type property - - /* - Method Delete - - For more information, see help context 657012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT MotionEffect : public QAxObject -{ -public: - MotionEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 658001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property ByX - - For more information, see help context 658003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ByX() const; //Returns the value of ByX - inline void SetByX(double value); //Sets the value of the ByX property - - /* - Property ByY - - For more information, see help context 658004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ByY() const; //Returns the value of ByY - inline void SetByY(double value); //Sets the value of the ByY property - - /* - Property FromX - - For more information, see help context 658005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FromX() const; //Returns the value of FromX - inline void SetFromX(double value); //Sets the value of the FromX property - - /* - Property FromY - - For more information, see help context 658006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FromY() const; //Returns the value of FromY - inline void SetFromY(double value); //Sets the value of the FromY property - - /* - Property Parent - - For more information, see help context 658002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Path - - For more information, see help context 658009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - inline void SetPath(const QString& value); //Sets the value of the Path property - - /* - Property ToX - - For more information, see help context 658007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ToX() const; //Returns the value of ToX - inline void SetToX(double value); //Sets the value of the ToX property - - /* - Property ToY - - For more information, see help context 658008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ToY() const; //Returns the value of ToY - inline void SetToY(double value); //Sets the value of the ToY property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ColorEffect : public QAxObject -{ -public: - ColorEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 659001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property By - - For more information, see help context 659003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* By() const; //Returns the value of By - - /* - Property From - - For more information, see help context 659004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* From() const; //Returns the value of From - - /* - Property Parent - - For more information, see help context 659002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property To - - For more information, see help context 659005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorFormat* To() const; //Returns the value of To - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT ScaleEffect : public QAxObject -{ -public: - ScaleEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 660001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property ByX - - For more information, see help context 660003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ByX() const; //Returns the value of ByX - inline void SetByX(double value); //Sets the value of the ByX property - - /* - Property ByY - - For more information, see help context 660004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ByY() const; //Returns the value of ByY - inline void SetByY(double value); //Sets the value of the ByY property - - /* - Property FromX - - For more information, see help context 660005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FromX() const; //Returns the value of FromX - inline void SetFromX(double value); //Sets the value of the FromX property - - /* - Property FromY - - For more information, see help context 660006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double FromY() const; //Returns the value of FromY - inline void SetFromY(double value); //Sets the value of the FromY property - - /* - Property Parent - - For more information, see help context 660002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property ToX - - For more information, see help context 660007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ToX() const; //Returns the value of ToX - inline void SetToX(double value); //Sets the value of the ToX property - - /* - Property ToY - - For more information, see help context 660008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double ToY() const; //Returns the value of ToY - inline void SetToY(double value); //Sets the value of the ToY property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT RotationEffect : public QAxObject -{ -public: - RotationEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 661001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property By - - For more information, see help context 661003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double By() const; //Returns the value of By - inline void SetBy(double value); //Sets the value of the By property - - /* - Property From - - For more information, see help context 661004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double From() const; //Returns the value of From - inline void SetFrom(double value); //Sets the value of the From property - - /* - Property Parent - - For more information, see help context 661002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property To - - For more information, see help context 661005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double To() const; //Returns the value of To - inline void SetTo(double value); //Sets the value of the To property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PropertyEffect : public QAxObject -{ -public: - PropertyEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 662001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property From - - For more information, see help context 662005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant From() const; //Returns the value of From - inline void SetFrom(const QVariant& value); //Sets the value of the From property - - /* - Property Parent - - For more information, see help context 662002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Points - - For more information, see help context 662004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationPoints* Points() const; //Returns the value of Points - - /* - Property Property - - For more information, see help context 662003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimProperty Property() const; //Returns the value of Property - inline void SetProperty(PowerPoint::MsoAnimProperty value); //Sets the value of the Property property - - /* - Property To - - For more information, see help context 662006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant To() const; //Returns the value of To - inline void SetTo(const QVariant& value); //Sets the value of the To property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AnimationPoints : public QAxObject -{ -public: - AnimationPoints(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 663001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Count - - For more information, see help context 501003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Parent - - For more information, see help context 663002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Smooth - - For more information, see help context 663005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Smooth() const; //Returns the value of Smooth - inline void SetSmooth(Office::MsoTriState value); //Sets the value of the Smooth property - - /* - Property _NewEnum - - For more information, see help context 501001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method Add - - For more information, see help context 663004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationPoint* Add(); - - /* - Method Add - - For more information, see help context 663004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationPoint* Add(int Index); - - /* - Method Item - - For more information, see help context 663003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AnimationPoint* Item(int Index); - - /* - Method _Index - - For more information, see help context 501002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant _Index(int Index); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AnimationPoint : public QAxObject -{ -public: - AnimationPoint(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 664001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Formula - - For more information, see help context 664006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Formula() const; //Returns the value of Formula - inline void SetFormula(const QString& value); //Sets the value of the Formula property - - /* - Property Parent - - For more information, see help context 664002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Time - - For more information, see help context 664004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Time() const; //Returns the value of Time - inline void SetTime(double value); //Sets the value of the Time property - - /* - Property Value - - For more information, see help context 664005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Value() const; //Returns the value of Value - inline void SetValue(const QVariant& value); //Sets the value of the Value property - - /* - Method Delete - - For more information, see help context 664003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT CanvasShapes : public QAxObject -{ -public: - CanvasShapes(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 1001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 665018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Background() const; //Returns the value of Background - - /* - Property Count - - For more information, see help context 665002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Count() const; //Returns the value of Count - - /* - Property Creator - - For more information, see help context 1002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property Parent - - For more information, see help context 665001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property _NewEnum - - For more information, see help context 665004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* _NewEnum() const; //Returns the value of _NewEnum - - /* - Method AddCallout - - For more information, see help context 665005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height); - - /* - Method AddConnector - - For more information, see help context 665006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddCurve - - For more information, see help context 665007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddCurve(const QVariant& SafeArrayOfPoints); - - /* - Method AddLabel - - For more information, see help context 665008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method AddLine - - For more information, see help context 665009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddLine(double BeginX, double BeginY, double EndX, double EndY); - - /* - Method AddPicture - - For more information, see help context 665010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top); - - /* - Method AddPicture - - For more information, see help context 665010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width); - - /* - Method AddPicture - - For more information, see help context 665010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height); - - /* - Method AddPolyline - - For more information, see help context 665011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddPolyline(const QVariant& SafeArrayOfPoints); - - /* - Method AddShape - - For more information, see help context 665012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height); - - /* - Method AddTextEffect - - For more information, see help context 665013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top); - - /* - Method AddTextbox - - For more information, see help context 665014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height); - - /* - Method BuildFreeform - - For more information, see help context 665015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::FreeformBuilder* BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1); - - /* - Method Item - - For more information, see help context 665003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* Item(const QVariant& Index); - - /* - Method Range - - For more information, see help context 665016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Range(const QVariant& Index); - - /* - Method SelectAll - - For more information, see help context 665017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SelectAll(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT AutoCorrect : public QAxObject -{ -public: - AutoCorrect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property DisplayAutoCorrectOptions - - For more information, see help context 666001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool DisplayAutoCorrectOptions() const; //Returns the value of DisplayAutoCorrectOptions - inline void SetDisplayAutoCorrectOptions(bool value); //Sets the value of the DisplayAutoCorrectOptions property - - /* - Property DisplayAutoLayoutOptions - - For more information, see help context 666002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool DisplayAutoLayoutOptions() const; //Returns the value of DisplayAutoLayoutOptions - inline void SetDisplayAutoLayoutOptions(bool value); //Sets the value of the DisplayAutoLayoutOptions property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Options : public QAxObject -{ -public: - Options(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property DisplayPasteOptions - - For more information, see help context 667001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayPasteOptions() const; //Returns the value of DisplayPasteOptions - inline void SetDisplayPasteOptions(Office::MsoTriState value); //Sets the value of the DisplayPasteOptions property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT CommandEffect : public QAxObject -{ -public: - CommandEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 668001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Command - - For more information, see help context 668004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Command() const; //Returns the value of Command - inline void SetCommand(const QString& value); //Sets the value of the Command property - - /* - Property Parent - - For more information, see help context 668002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Type - - For more information, see help context 668003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimCommandType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::MsoAnimCommandType value); //Sets the value of the Type property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT FilterEffect : public QAxObject -{ -public: - FilterEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 669001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 669002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Reveal - - For more information, see help context 669005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Reveal() const; //Returns the value of Reveal - inline void SetReveal(Office::MsoTriState value); //Sets the value of the Reveal property - - /* - Property Subtype - - For more information, see help context 669004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimFilterEffectSubtype Subtype() const; //Returns the value of Subtype - inline void SetSubtype(PowerPoint::MsoAnimFilterEffectSubtype value); //Sets the value of the Subtype property - - /* - Property Type - - For more information, see help context 669003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimFilterEffectType Type() const; //Returns the value of Type - inline void SetType(PowerPoint::MsoAnimFilterEffectType value); //Sets the value of the Type property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT SetEffect : public QAxObject -{ -public: - SetEffect(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 670001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Parent - - For more information, see help context 670002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Property - - For more information, see help context 670003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::MsoAnimProperty Property() const; //Returns the value of Property - inline void SetProperty(PowerPoint::MsoAnimProperty value); //Sets the value of the Property property - - /* - Property To - - For more information, see help context 670004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant To() const; //Returns the value of To - inline void SetTo(const QVariant& value); //Sets the value of the To property - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// Actual coclasses -class POWERPOINT_EXPORT Application : public QAxObject -{ -public: - Application(QObject *parent = 0) - : QAxObject(parent) - { - setControl("{91493441-5a91-11cf-8700-00aa0060263b}"); - } - - Application(_Application *iface) - : QAxObject() - { - initializeFrom(iface); - delete iface; - } - - /* - Property Active - - For more information, see help context 502033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Active() const; //Returns the value of Active - - /* - Property ActivePresentation - - For more information, see help context 502005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* ActivePresentation() const; //Returns the value of ActivePresentation - - /* - Property ActivePrinter - - For more information, see help context 502017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ActivePrinter() const; //Returns the value of ActivePrinter - - /* - Property ActiveWindow - - For more information, see help context 502004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* ActiveWindow() const; //Returns the value of ActiveWindow - - /* - Property AddIns - - For more information, see help context 502019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIns* AddIns() const; //Returns the value of AddIns - - /* - Property AnswerWizard - - For more information, see help context 502035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::AnswerWizard* AnswerWizard() const; //Returns the value of AnswerWizard - - /* - Property Assistant - - For more information, see help context 502011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Assistant* Assistant() const; //Returns the value of Assistant - - /* - Property AutoCorrect - - For more information, see help context 502053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AutoCorrect* AutoCorrect() const; //Returns the value of AutoCorrect - - /* - Property AutomationSecurity - - For more information, see help context 502048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoAutomationSecurity AutomationSecurity() const; //Returns the value of AutomationSecurity - inline void SetAutomationSecurity(Office::MsoAutomationSecurity value); //Sets the value of the AutomationSecurity property - - /* - Property Build - - For more information, see help context 502014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Build() const; //Returns the value of Build - - /* - Property COMAddIns - - For more information, see help context 502036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::COMAddIns* COMAddIns() const; //Returns the value of COMAddIns - - /* - Property Caption - - For more information, see help context 502010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Caption() const; //Returns the value of Caption - inline void SetCaption(const QString& value); //Sets the value of the Caption property - - /* - Property CommandBars - - For more information, see help context 502007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Creator - - For more information, see help context 502018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int Creator() const; //Returns the value of Creator - - /* - Property DefaultWebOptions - - For more information, see help context 502038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DefaultWebOptions* DefaultWebOptions() const; //Returns the value of DefaultWebOptions - - /* - Property Dialogs - - For more information, see help context 502003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Dialogs() const; //Returns the value of Dialogs - - /* - Property DisplayAlerts - - For more information, see help context 502050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpAlertLevel DisplayAlerts() const; //Returns the value of DisplayAlerts - inline void SetDisplayAlerts(PowerPoint::PpAlertLevel value); //Sets the value of the DisplayAlerts property - - /* - Property DisplayGridLines - - For more information, see help context 502047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayGridLines() const; //Returns the value of DisplayGridLines - inline void SetDisplayGridLines(Office::MsoTriState value); //Sets the value of the DisplayGridLines property - - /* - Property FeatureInstall - - For more information, see help context 502043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoFeatureInstall FeatureInstall() const; //Returns the value of FeatureInstall - inline void SetFeatureInstall(Office::MsoFeatureInstall value); //Sets the value of the FeatureInstall property - - /* - Property FileFind - - For more information, see help context 502013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::IFind* FileFind() const; //Returns the value of FileFind - - /* - Property FileSearch - - For more information, see help context 502012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::FileSearch* FileSearch() const; //Returns the value of FileSearch - - /* - Property HWND - - For more information, see help context 502032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int HWND() const; //Returns the value of HWND - - /* - Property Height - - For more information, see help context 502029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property LanguageSettings - - For more information, see help context 502039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::LanguageSettings* LanguageSettings() const; //Returns the value of LanguageSettings - - /* - Property Left - - For more information, see help context 502026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Marker - - For more information, see help context 502042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Marker() const; //Returns the value of Marker - - /* - Property MsoDebugOptions - - For more information, see help context 502040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoDebugOptions* MsoDebugOptions() const; //Returns the value of MsoDebugOptions - - /* - Property Name - - For more information, see help context 502009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property NewPresentation - - For more information, see help context 502049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::NewFile* NewPresentation() const; //Returns the value of NewPresentation - - /* - Property OperatingSystem - - For more information, see help context 502016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString OperatingSystem() const; //Returns the value of OperatingSystem - - /* - Property Options - - For more information, see help context 502054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Options* Options() const; //Returns the value of Options - - /* - Property Path - - For more information, see help context 502008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property Presentations - - For more information, see help context 502001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentations* Presentations() const; //Returns the value of Presentations - - /* - Property ProductCode - - For more information, see help context 502037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString ProductCode() const; //Returns the value of ProductCode - - /* - Property ShowStartupDialog - - For more information, see help context 502051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowStartupDialog() const; //Returns the value of ShowStartupDialog - inline void SetShowStartupDialog(Office::MsoTriState value); //Sets the value of the ShowStartupDialog property - - /* - Property ShowWindowsInTaskbar - - For more information, see help context 502041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ShowWindowsInTaskbar() const; //Returns the value of ShowWindowsInTaskbar - inline void SetShowWindowsInTaskbar(Office::MsoTriState value); //Sets the value of the ShowWindowsInTaskbar property - - /* - Property SlideShowWindows - - For more information, see help context 502006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindows* SlideShowWindows() const; //Returns the value of SlideShowWindows - - /* - Property Top - - For more information, see help context 502027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property VBE - - For more information, see help context 502020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline VBIDE::VBE* VBE() const; //Returns the value of VBE - - /* - Property Version - - For more information, see help context 502015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Version() const; //Returns the value of Version - - /* - Property Visible - - For more information, see help context 502031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Visible() const; //Returns the value of Visible - inline void SetVisible(Office::MsoTriState value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 502028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property WindowState - - For more information, see help context 502030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpWindowState WindowState() const; //Returns the value of WindowState - inline void SetWindowState(PowerPoint::PpWindowState value); //Sets the value of the WindowState property - - /* - Property Windows - - For more information, see help context 502002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - - /* - Method Activate - - For more information, see help context 502034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Activate(); - - /* - Method FileDialog - - For more information, see help context 502046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::FileDialog* FileDialog(Office::MsoFileDialogType Type); - - /* - Method GetOptionFlag - - For more information, see help context 502044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool GetOptionFlag(int Option); - - /* - Method GetOptionFlag - - For more information, see help context 502044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool GetOptionFlag(int Option, bool Persist); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(const QString& HelpFile); - - /* - Method Help - - For more information, see help context 502021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Help(const QString& HelpFile, int ContextID); - - /* - Method LaunchSpelling - - For more information, see help context 502025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void LaunchSpelling(PowerPoint::DocumentWindow* pWindow); - - /* - Method PPFileDialog - - For more information, see help context 502024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* PPFileDialog(PowerPoint::PpFileDialogType Type); - - /* - Method Quit - - For more information, see help context 502022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Quit(); - - /* - Method Run - - For more information, see help context 502023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QVariant Run(const QString& MacroName, QVariantList& safeArrayOfParams); - - /* - Method SetOptionFlag - - For more information, see help context 502045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetOptionFlag(int Option, bool State); - - /* - Method SetOptionFlag - - For more information, see help context 502045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetOptionFlag(int Option, bool State, bool Persist); - - /* - Method SetPerfMarker - - For more information, see help context 502052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetPerfMarker(int Marker); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Global : public QAxObject -{ -public: - Global(QObject *parent = 0) - : QAxObject(parent) - { - setControl("{91493443-5a91-11cf-8700-00aa0060263b}"); - } - - /* - Property ActivePresentation - - For more information, see help context 503001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentation* ActivePresentation() const; //Returns the value of ActivePresentation - - /* - Property ActiveWindow - - For more information, see help context 503002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* ActiveWindow() const; //Returns the value of ActiveWindow - - /* - Property AddIns - - For more information, see help context 503003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::AddIns* AddIns() const; //Returns the value of AddIns - - /* - Property AnswerWizard - - For more information, see help context 503011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::AnswerWizard* AnswerWizard() const; //Returns the value of AnswerWizard - - /* - Property Application - - For more information, see help context 503004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Assistant - - For more information, see help context 503005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Assistant* Assistant() const; //Returns the value of Assistant - - /* - Property CommandBars - - For more information, see help context 503010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Dialogs - - For more information, see help context 503006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IUnknown* Dialogs() const; //Returns the value of Dialogs - - /* - Property Presentations - - For more information, see help context 503007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Presentations* Presentations() const; //Returns the value of Presentations - - /* - Property SlideShowWindows - - For more information, see help context 503008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindows* SlideShowWindows() const; //Returns the value of SlideShowWindows - - /* - Property Windows - - For more information, see help context 503009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Presentation : public QAxObject -{ -public: - Presentation(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - /* - Property Application - - For more information, see help context 583001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property BuiltInDocumentProperties - - For more information, see help context 583020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* BuiltInDocumentProperties() const; //Returns the value of BuiltInDocumentProperties - - /* - Property ColorSchemes - - For more information, see help context 583013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorSchemes* ColorSchemes() const; //Returns the value of ColorSchemes - - /* - Property CommandBars - - For more information, see help context 583051 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::CommandBars* CommandBars() const; //Returns the value of CommandBars - - /* - Property Container - - For more information, see help context 583041 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Container() const; //Returns the value of Container - - /* - Property CustomDocumentProperties - - For more information, see help context 583021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* CustomDocumentProperties() const; //Returns the value of CustomDocumentProperties - - /* - Property DefaultLanguageID - - For more information, see help context 583050 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoLanguageID DefaultLanguageID() const; //Returns the value of DefaultLanguageID - inline void SetDefaultLanguageID(Office::MsoLanguageID value); //Sets the value of the DefaultLanguageID property - - /* - Property DefaultShape - - For more information, see help context 583019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shape* DefaultShape() const; //Returns the value of DefaultShape - - /* - Property Designs - - For more information, see help context 583063 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Designs* Designs() const; //Returns the value of Designs - - /* - Property DisplayComments - - For more information, see help context 583042 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayComments() const; //Returns the value of DisplayComments - inline void SetDisplayComments(Office::MsoTriState value); //Sets the value of the DisplayComments property - - /* - Property DocumentLibraryVersions - - For more information, see help context 583086 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::DocumentLibraryVersions* DocumentLibraryVersions() const; //Returns the value of DocumentLibraryVersions - - /* - Property EnvelopeVisible - - For more information, see help context 583057 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState EnvelopeVisible() const; //Returns the value of EnvelopeVisible - inline void SetEnvelopeVisible(Office::MsoTriState value); //Sets the value of the EnvelopeVisible property - - /* - Property ExtraColors - - For more information, see help context 583014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ExtraColors* ExtraColors() const; //Returns the value of ExtraColors - - /* - Property FarEastLineBreakLanguage - - For more information, see help context 583048 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoFarEastLineBreakLanguageID FarEastLineBreakLanguage() const; //Returns the value of FarEastLineBreakLanguage - inline void SetFarEastLineBreakLanguage(Office::MsoFarEastLineBreakLanguageID value); //Sets the value of the FarEastLineBreakLanguage property - - /* - Property FarEastLineBreakLevel - - For more information, see help context 583043 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpFarEastLineBreakLevel FarEastLineBreakLevel() const; //Returns the value of FarEastLineBreakLevel - inline void SetFarEastLineBreakLevel(PowerPoint::PpFarEastLineBreakLevel value); //Sets the value of the FarEastLineBreakLevel property - - /* - Property Fonts - - For more information, see help context 583016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Fonts* Fonts() const; //Returns the value of Fonts - - /* - Property FullName - - For more information, see help context 583024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString FullName() const; //Returns the value of FullName - - /* - Property GridDistance - - For more information, see help context 583062 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double GridDistance() const; //Returns the value of GridDistance - inline void SetGridDistance(double value); //Sets the value of the GridDistance property - - /* - Property HTMLProject - - For more information, see help context 583054 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::HTMLProject* HTMLProject() const; //Returns the value of HTMLProject - - /* - Property HandoutMaster - - For more information, see help context 583010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* HandoutMaster() const; //Returns the value of HandoutMaster - - /* - Property HasRevisionInfo - - For more information, see help context 583072 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpRevisionInfo HasRevisionInfo() const; //Returns the value of HasRevisionInfo - - /* - Property HasTitleMaster - - For more information, see help context 583005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState HasTitleMaster() const; //Returns the value of HasTitleMaster - - /* - Property LayoutDirection - - For more information, see help context 583028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpDirection LayoutDirection() const; //Returns the value of LayoutDirection - inline void SetLayoutDirection(PowerPoint::PpDirection value); //Sets the value of the LayoutDirection property - - /* - Property Name - - For more information, see help context 583025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - - /* - Property NoLineBreakAfter - - For more information, see help context 583045 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NoLineBreakAfter() const; //Returns the value of NoLineBreakAfter - inline void SetNoLineBreakAfter(const QString& value); //Sets the value of the NoLineBreakAfter property - - /* - Property NoLineBreakBefore - - For more information, see help context 583044 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString NoLineBreakBefore() const; //Returns the value of NoLineBreakBefore - inline void SetNoLineBreakBefore(const QString& value); //Sets the value of the NoLineBreakBefore property - - /* - Property NotesMaster - - For more information, see help context 583009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* NotesMaster() const; //Returns the value of NotesMaster - - /* - Property PageSetup - - For more information, see help context 583012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PageSetup* PageSetup() const; //Returns the value of PageSetup - - /* - Property Parent - - For more information, see help context 583002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Password - - For more information, see help context 583080 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Password() const; //Returns the value of Password - inline void SetPassword(const QString& value); //Sets the value of the Password property - - /* - Property PasswordEncryptionAlgorithm - - For more information, see help context 583076 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString PasswordEncryptionAlgorithm() const; //Returns the value of PasswordEncryptionAlgorithm - - /* - Property PasswordEncryptionFileProperties - - For more information, see help context 583078 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool PasswordEncryptionFileProperties() const; //Returns the value of PasswordEncryptionFileProperties - - /* - Property PasswordEncryptionKeyLength - - For more information, see help context 583077 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PasswordEncryptionKeyLength() const; //Returns the value of PasswordEncryptionKeyLength - - /* - Property PasswordEncryptionProvider - - For more information, see help context 583075 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString PasswordEncryptionProvider() const; //Returns the value of PasswordEncryptionProvider - - /* - Property Path - - For more information, see help context 583026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Path() const; //Returns the value of Path - - /* - Property Permission - - For more information, see help context 583082 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Permission* Permission() const; //Returns the value of Permission - - /* - Property PrintOptions - - For more information, see help context 583033 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PrintOptions* PrintOptions() const; //Returns the value of PrintOptions - - /* - Property PublishObjects - - For more information, see help context 583052 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PublishObjects* PublishObjects() const; //Returns the value of PublishObjects - - /* - Property ReadOnly - - For more information, see help context 583023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState ReadOnly() const; //Returns the value of ReadOnly - - /* - Property RemovePersonalInformation - - For more information, see help context 583068 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState RemovePersonalInformation() const; //Returns the value of RemovePersonalInformation - inline void SetRemovePersonalInformation(Office::MsoTriState value); //Sets the value of the RemovePersonalInformation property - - /* - Property Saved - - For more information, see help context 583027 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState Saved() const; //Returns the value of Saved - inline void SetSaved(Office::MsoTriState value); //Sets the value of the Saved property - - /* - Property SharedWorkspace - - For more information, see help context 583083 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::SharedWorkspace* SharedWorkspace() const; //Returns the value of SharedWorkspace - - /* - Property Signatures - - For more information, see help context 583067 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::SignatureSet* Signatures() const; //Returns the value of Signatures - - /* - Property SlideMaster - - For more information, see help context 583003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* SlideMaster() const; //Returns the value of SlideMaster - - /* - Property SlideShowSettings - - For more information, see help context 583015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowSettings* SlideShowSettings() const; //Returns the value of SlideShowSettings - - /* - Property SlideShowWindow - - For more information, see help context 583047 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowWindow* SlideShowWindow() const; //Returns the value of SlideShowWindow - - /* - Property Slides - - For more information, see help context 583011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Slides* Slides() const; //Returns the value of Slides - - /* - Property SnapToGrid - - For more information, see help context 583061 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState SnapToGrid() const; //Returns the value of SnapToGrid - inline void SetSnapToGrid(Office::MsoTriState value); //Sets the value of the SnapToGrid property - - /* - Property Sync - - For more information, see help context 583084 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Sync* Sync() const; //Returns the value of Sync - - /* - Property Tags - - For more information, see help context 583018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TemplateName - - For more information, see help context 583008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString TemplateName() const; //Returns the value of TemplateName - - /* - Property TitleMaster - - For more information, see help context 583004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* TitleMaster() const; //Returns the value of TitleMaster - - /* - Property VBASigned - - For more information, see help context 583059 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState VBASigned() const; //Returns the value of VBASigned - - /* - Property VBProject - - For more information, see help context 583022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline VBIDE::VBProject* VBProject() const; //Returns the value of VBProject - - /* - Property WebOptions - - For more information, see help context 583053 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::WebOptions* WebOptions() const; //Returns the value of WebOptions - - /* - Property Windows - - For more information, see help context 583017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindows* Windows() const; //Returns the value of Windows - - /* - Property WritePassword - - For more information, see help context 583081 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString WritePassword() const; //Returns the value of WritePassword - inline void SetWritePassword(const QString& value); //Sets the value of the WritePassword property - - /* - Method AddBaseline - - For more information, see help context 583073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddBaseline(); - - /* - Method AddBaseline - - For more information, see help context 583073 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddBaseline(const QString& FileName); - - /* - Method AddTitleMaster - - For more information, see help context 583006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* AddTitleMaster(); - - /* - Method AddToFavorites - - For more information, see help context 583031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void AddToFavorites(); - - /* - Method ApplyTemplate - - For more information, see help context 583007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ApplyTemplate(const QString& FileName); - - /* - Method CanCheckIn - - For more information, see help context 583066 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool CanCheckIn(); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges, const QVariant& Comments); - - /* - Method CheckIn - - For more information, see help context 583065 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void CheckIn(bool SaveChanges, const QVariant& Comments, const QVariant& MakePublic); - - /* - Method Close - - For more information, see help context 583039 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Close(); - - /* - Method EndReview - - For more information, see help context 583071 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void EndReview(); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName, int ScaleWidth); - - /* - Method Export - - For more information, see help context 583038 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& Path, const QString& FilterName, int ScaleWidth, int ScaleHeight); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method); - - /* - Method FollowHyperlink - - For more information, see help context 583030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method, const QString& HeaderInfo); - - /* - Method MakeIntoTemplate - - For more information, see help context 583056 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MakeIntoTemplate(Office::MsoTriState IsDesignTemplate); - - /* - Method Merge - - For more information, see help context 583064 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Merge(const QString& Path); - - /* - Method NewWindow - - For more information, see help context 583029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::DocumentWindow* NewWindow(); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies); - - /* - Method PrintOut - - For more information, see help context 583034 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate); - - /* - Method ReloadAs - - For more information, see help context 583055 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReloadAs(Office::MsoEncoding cp); - - /* - Method RemoveBaseline - - For more information, see help context 583074 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void RemoveBaseline(); - - /* - Method ReplyWithChanges - - For more information, see help context 583070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReplyWithChanges(); - - /* - Method ReplyWithChanges - - For more information, see help context 583070 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ReplyWithChanges(bool ShowMessage); - - /* - Method Save - - For more information, see help context 583035 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Save(); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat); - - /* - Method SaveAs - - For more information, see help context 583036 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat); - - /* - Method SaveCopyAs - - For more information, see help context 583037 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients, const QString& Subject); - - /* - Method SendFaxOverInternet - - For more information, see help context 583085 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendFaxOverInternet(const QString& Recipients, const QString& Subject, bool ShowMessage); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage); - - /* - Method SendForReview - - For more information, see help context 583069 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage, const QVariant& IncludeAttachment); - - /* - Method SetPasswordEncryptionOptions - - For more information, see help context 583079 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetPasswordEncryptionOptions(const QString& PasswordEncryptionProvider, const QString& PasswordEncryptionAlgorithm, int PasswordEncryptionKeyLength, bool PasswordEncryptionFileProperties); - - /* - Method SetUndoText - - For more information, see help context 583040 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void SetUndoText(const QString& Text); - - /* - Method Unused - - For more information, see help context 583032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Unused(); - - /* - Method UpdateLinks - - For more information, see help context 583046 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void UpdateLinks(); - - /* - Method WebPagePreview - - For more information, see help context 583049 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void WebPagePreview(); - - /* - Method sblt - - For more information, see help context 583058 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void sblt(const QString& s); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Slide : public QAxObject -{ -public: - Slide(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - Slide(_Slide *iface) - : QAxObject() - { - initializeFrom(iface); - delete iface; - } - - /* - Property Application - - For more information, see help context 531001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 531007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Background() const; //Returns the value of Background - - /* - Property ColorScheme - - For more information, see help context 531006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* ColorScheme() const; //Returns the value of ColorScheme - inline void SetColorScheme(PowerPoint::ColorScheme* value); //Sets the value of the ColorScheme property - - /* - Property Comments - - For more information, see help context 531028 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Comments* Comments() const; //Returns the value of Comments - - /* - Property Design - - For more information, see help context 531029 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Design() const; //Returns the value of Design - inline void SetDesign(PowerPoint::Design* value); //Sets the value of the Design property - - /* - Property DisplayMasterShapes - - For more information, see help context 531020 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState DisplayMasterShapes() const; //Returns the value of DisplayMasterShapes - inline void SetDisplayMasterShapes(Office::MsoTriState value); //Sets the value of the DisplayMasterShapes property - - /* - Property FollowMasterBackground - - For more information, see help context 531021 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::MsoTriState FollowMasterBackground() const; //Returns the value of FollowMasterBackground - inline void SetFollowMasterBackground(Office::MsoTriState value); //Sets the value of the FollowMasterBackground property - - /* - Property HeadersFooters - - For more information, see help context 531004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeadersFooters* HeadersFooters() const; //Returns the value of HeadersFooters - - /* - Property Hyperlinks - - For more information, see help context 531024 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlinks* Hyperlinks() const; //Returns the value of Hyperlinks - - /* - Property Layout - - For more information, see help context 531014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::PpSlideLayout Layout() const; //Returns the value of Layout - inline void SetLayout(PowerPoint::PpSlideLayout value); //Sets the value of the Layout property - - /* - Property Master - - For more information, see help context 531023 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::_Master* Master() const; //Returns the value of Master - - /* - Property Name - - For more information, see help context 531008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property NotesPage - - For more information, see help context 531022 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* NotesPage() const; //Returns the value of NotesPage - - /* - Property Parent - - For more information, see help context 531002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property PrintSteps - - For more information, see help context 531010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int PrintSteps() const; //Returns the value of PrintSteps - - /* - Property Scripts - - For more information, see help context 531026 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Scripts* Scripts() const; //Returns the value of Scripts - - /* - Property Shapes - - For more information, see help context 531003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shapes* Shapes() const; //Returns the value of Shapes - - /* - Property SlideID - - For more information, see help context 531009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideID() const; //Returns the value of SlideID - - /* - Property SlideIndex - - For more information, see help context 531018 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideIndex() const; //Returns the value of SlideIndex - - /* - Property SlideNumber - - For more information, see help context 531019 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int SlideNumber() const; //Returns the value of SlideNumber - - /* - Property SlideShowTransition - - For more information, see help context 531005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowTransition* SlideShowTransition() const; //Returns the value of SlideShowTransition - - /* - Property Tags - - For more information, see help context 531017 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Tags* Tags() const; //Returns the value of Tags - - /* - Property TimeLine - - For more information, see help context 531031 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TimeLine* TimeLine() const; //Returns the value of TimeLine - - /* - Method ApplyTemplate - - For more information, see help context 531032 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void ApplyTemplate(const QString& FileName); - - /* - Method Copy - - For more information, see help context 531013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Copy(); - - /* - Method Cut - - For more information, see help context 531012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Cut(); - - /* - Method Delete - - For more information, see help context 531016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - - /* - Method Duplicate - - For more information, see help context 531015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideRange* Duplicate(); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth); - - /* - Method Export - - For more information, see help context 531025 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight); - - /* - Method MoveTo - - For more information, see help context 531030 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void MoveTo(int toPos); - - /* - Method Select - - For more information, see help context 531011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Select(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT OLEControl : public QAxObject -{ -public: - OLEControl(QObject *parent = 0) - : QAxObject(parent) - { - setControl("{91493446-5a91-11cf-8700-00aa0060263b}"); - } - - /* - Property AltHTML - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString AltHTML() const; //Returns the value of AltHTML - inline void SetAltHTML(const QString& value); //Sets the value of the AltHTML property - - /* - Property Height - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - inline void SetHeight(double value); //Sets the value of the Height property - - /* - Property Left - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Left() const; //Returns the value of Left - inline void SetLeft(double value); //Sets the value of the Left property - - /* - Property Name - - For more information, see help context 618003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Top - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Top() const; //Returns the value of Top - inline void SetTop(double value); //Sets the value of the Top property - - /* - Property Visible - - For more information, see help context 618001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline bool Visible() const; //Returns the value of Visible - inline void SetVisible(bool value); //Sets the value of the Visible property - - /* - Property Width - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - inline void SetWidth(double value); //Sets the value of the Width property - - /* - Property ZOrderPosition - - For more information, see help context 618002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline int ZOrderPosition() const; //Returns the value of ZOrderPosition - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT Master : public QAxObject -{ -public: - Master(IDispatch *subobject = 0, QAxObject *parent = 0) - : QAxObject((IUnknown*)subobject, parent) - { - internalRelease(); - } - - Master(_Master *iface) - : QAxObject() - { - initializeFrom(iface); - delete iface; - } - - /* - Property Application - - For more information, see help context 533001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Application* Application() const; //Returns the value of Application - - /* - Property Background - - For more information, see help context 533006 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ShapeRange* Background() const; //Returns the value of Background - - /* - Property ColorScheme - - For more information, see help context 533005 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::ColorScheme* ColorScheme() const; //Returns the value of ColorScheme - inline void SetColorScheme(PowerPoint::ColorScheme* value); //Sets the value of the ColorScheme property - - /* - Property Design - - For more information, see help context 533014 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Design* Design() const; //Returns the value of Design - - /* - Property HeadersFooters - - For more information, see help context 533004 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::HeadersFooters* HeadersFooters() const; //Returns the value of HeadersFooters - - /* - Property Height - - For more information, see help context 533009 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Height() const; //Returns the value of Height - - /* - Property Hyperlinks - - For more information, see help context 533012 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Hyperlinks* Hyperlinks() const; //Returns the value of Hyperlinks - - /* - Property Name - - For more information, see help context 533007 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline QString Name() const; //Returns the value of Name - inline void SetName(const QString& value); //Sets the value of the Name property - - /* - Property Parent - - For more information, see help context 533002 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline IDispatch* Parent() const; //Returns the value of Parent - - /* - Property Scripts - - For more information, see help context 533013 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline Office::Scripts* Scripts() const; //Returns the value of Scripts - - /* - Property Shapes - - For more information, see help context 533003 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::Shapes* Shapes() const; //Returns the value of Shapes - - /* - Property SlideShowTransition - - For more information, see help context 533016 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::SlideShowTransition* SlideShowTransition() const; //Returns the value of SlideShowTransition - - /* - Property TextStyles - - For more information, see help context 533011 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TextStyles* TextStyles() const; //Returns the value of TextStyles - - /* - Property TimeLine - - For more information, see help context 533015 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline PowerPoint::TimeLine* TimeLine() const; //Returns the value of TimeLine - - /* - Property Width - - For more information, see help context 533010 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline double Width() const; //Returns the value of Width - - /* - Method Delete - - For more information, see help context 533008 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void Delete(); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -class POWERPOINT_EXPORT PowerRex : public QAxObject -{ -public: - PowerRex(QObject *parent = 0) - : QAxObject(parent) - { - setControl("{91493448-5a91-11cf-8700-00aa0060263b}"); - } - - /* - Method OnAsfEncoderEvent - - For more information, see help context 639001 in c:\Program Files\Microsoft Office\OFFICE11\VBAPP10.CHM. - */ - inline void OnAsfEncoderEvent(const QVariant& erorCode, const QVariant& bstrErrorDesc); - -// meta object functions - static const QMetaObject staticMetaObject; - virtual const QMetaObject *metaObject() const { return &staticMetaObject; } - virtual void *qt_metacast(const char *); -}; - -// member function implementation -#ifndef QAX_DUMPCPP_POWERPOINT_NOINLINES -inline int Collection::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* Collection::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline QVariant Collection::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline Office::MsoTriState _Application::Active() const -{ - QVariant qax_result = property("Active"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Presentation* _Application::ActivePresentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("ActivePresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline QString _Application::ActivePrinter() const -{ - QVariant qax_result = property("ActivePrinter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::DocumentWindow* _Application::ActiveWindow() const -{ - PowerPoint::DocumentWindow* qax_pointer = 0; - qRegisterMetaType("DocumentWindow*", &qax_pointer); - qRegisterMetaType("DocumentWindow", qax_pointer); - QVariant qax_result = property("ActiveWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindow**)qax_result.constData(); -} - -inline PowerPoint::AddIns* _Application::AddIns() const -{ - PowerPoint::AddIns* qax_pointer = 0; - qRegisterMetaType("AddIns*", &qax_pointer); - qRegisterMetaType("AddIns", qax_pointer); - QVariant qax_result = property("AddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AddIns**)qax_result.constData(); -} - -inline Office::AnswerWizard* _Application::AnswerWizard() const -{ - Office::AnswerWizard* qax_pointer = 0; - qRegisterMetaType("Office::AnswerWizard*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::AnswerWizard", qax_pointer); -#endif - QVariant qax_result = property("AnswerWizard"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::AnswerWizard**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::Assistant* _Application::Assistant() const -{ - Office::Assistant* qax_pointer = 0; - qRegisterMetaType("Office::Assistant*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Assistant", qax_pointer); -#endif - QVariant qax_result = property("Assistant"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Assistant**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::AutoCorrect* _Application::AutoCorrect() const -{ - PowerPoint::AutoCorrect* qax_pointer = 0; - qRegisterMetaType("AutoCorrect*", &qax_pointer); - qRegisterMetaType("AutoCorrect", qax_pointer); - QVariant qax_result = property("AutoCorrect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AutoCorrect**)qax_result.constData(); -} - -inline Office::MsoAutomationSecurity _Application::AutomationSecurity() const -{ - QVariant qax_result = property("AutomationSecurity"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutomationSecurity*)qax_result.constData(); -} -inline void _Application::SetAutomationSecurity(Office::MsoAutomationSecurity value){ setProperty("AutomationSecurity", QVariant(value)); } - -inline QString _Application::Build() const -{ - QVariant qax_result = property("Build"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::COMAddIns* _Application::COMAddIns() const -{ - Office::COMAddIns* qax_pointer = 0; - qRegisterMetaType("Office::COMAddIns*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::COMAddIns", qax_pointer); -#endif - QVariant qax_result = property("COMAddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::COMAddIns**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString _Application::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Application::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline Office::CommandBars* _Application::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline int _Application::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::DefaultWebOptions* _Application::DefaultWebOptions() const -{ - PowerPoint::DefaultWebOptions* qax_pointer = 0; - qRegisterMetaType("DefaultWebOptions*", &qax_pointer); - qRegisterMetaType("DefaultWebOptions", qax_pointer); - QVariant qax_result = property("DefaultWebOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DefaultWebOptions**)qax_result.constData(); -} - -inline IUnknown* _Application::Dialogs() const -{ - QVariant qax_result = property("Dialogs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::PpAlertLevel _Application::DisplayAlerts() const -{ - QVariant qax_result = property("DisplayAlerts"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpAlertLevel*)qax_result.constData(); -} -inline void _Application::SetDisplayAlerts(PowerPoint::PpAlertLevel value){ setProperty("DisplayAlerts", QVariant(value)); } - -inline Office::MsoTriState _Application::DisplayGridLines() const -{ - QVariant qax_result = property("DisplayGridLines"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Application::SetDisplayGridLines(Office::MsoTriState value){ setProperty("DisplayGridLines", QVariant(value)); } - -inline Office::MsoFeatureInstall _Application::FeatureInstall() const -{ - QVariant qax_result = property("FeatureInstall"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFeatureInstall*)qax_result.constData(); -} -inline void _Application::SetFeatureInstall(Office::MsoFeatureInstall value){ setProperty("FeatureInstall", QVariant(value)); } - -inline Office::IFind* _Application::FileFind() const -{ - Office::IFind* qax_pointer = 0; - qRegisterMetaType("Office::IFind*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::IFind", qax_pointer); -#endif - QVariant qax_result = property("FileFind"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::IFind**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::FileSearch* _Application::FileSearch() const -{ - Office::FileSearch* qax_pointer = 0; - qRegisterMetaType("Office::FileSearch*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::FileSearch", qax_pointer); -#endif - QVariant qax_result = property("FileSearch"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::FileSearch**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline int _Application::HWND() const -{ - QVariant qax_result = property("HWND"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double _Application::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void _Application::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::LanguageSettings* _Application::LanguageSettings() const -{ - Office::LanguageSettings* qax_pointer = 0; - qRegisterMetaType("Office::LanguageSettings*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::LanguageSettings", qax_pointer); -#endif - QVariant qax_result = property("LanguageSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::LanguageSettings**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline double _Application::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void _Application::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline IUnknown* _Application::Marker() const -{ - QVariant qax_result = property("Marker"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::MsoDebugOptions* _Application::MsoDebugOptions() const -{ - Office::MsoDebugOptions* qax_pointer = 0; - qRegisterMetaType("Office::MsoDebugOptions*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::MsoDebugOptions", qax_pointer); -#endif - QVariant qax_result = property("MsoDebugOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::MsoDebugOptions**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString _Application::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::NewFile* _Application::NewPresentation() const -{ - Office::NewFile* qax_pointer = 0; - qRegisterMetaType("Office::NewFile*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::NewFile", qax_pointer); -#endif - QVariant qax_result = property("NewPresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::NewFile**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString _Application::OperatingSystem() const -{ - QVariant qax_result = property("OperatingSystem"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::Options* _Application::Options() const -{ - PowerPoint::Options* qax_pointer = 0; - qRegisterMetaType("Options*", &qax_pointer); - qRegisterMetaType("Options", qax_pointer); - QVariant qax_result = property("Options"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Options**)qax_result.constData(); -} - -inline QString _Application::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::Presentations* _Application::Presentations() const -{ - PowerPoint::Presentations* qax_pointer = 0; - qRegisterMetaType("Presentations*", &qax_pointer); - qRegisterMetaType("Presentations", qax_pointer); - QVariant qax_result = property("Presentations"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentations**)qax_result.constData(); -} - -inline QString _Application::ProductCode() const -{ - QVariant qax_result = property("ProductCode"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState _Application::ShowStartupDialog() const -{ - QVariant qax_result = property("ShowStartupDialog"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Application::SetShowStartupDialog(Office::MsoTriState value){ setProperty("ShowStartupDialog", QVariant(value)); } - -inline Office::MsoTriState _Application::ShowWindowsInTaskbar() const -{ - QVariant qax_result = property("ShowWindowsInTaskbar"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Application::SetShowWindowsInTaskbar(Office::MsoTriState value){ setProperty("ShowWindowsInTaskbar", QVariant(value)); } - -inline PowerPoint::SlideShowWindows* _Application::SlideShowWindows() const -{ - PowerPoint::SlideShowWindows* qax_pointer = 0; - qRegisterMetaType("SlideShowWindows*", &qax_pointer); - qRegisterMetaType("SlideShowWindows", qax_pointer); - QVariant qax_result = property("SlideShowWindows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindows**)qax_result.constData(); -} - -inline double _Application::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void _Application::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline VBIDE::VBE* _Application::VBE() const -{ - VBIDE::VBE* qax_pointer = 0; - qRegisterMetaType("VBIDE::VBE*", &qax_pointer); -#ifdef QAX_DUMPCPP_VBIDE_H - qRegisterMetaType("VBIDE::VBE", qax_pointer); -#endif - QVariant qax_result = property("VBE"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_VBIDE_H - return *(VBIDE::VBE**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString _Application::Version() const -{ - QVariant qax_result = property("Version"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState _Application::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Application::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double _Application::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void _Application::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline PowerPoint::PpWindowState _Application::WindowState() const -{ - QVariant qax_result = property("WindowState"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpWindowState*)qax_result.constData(); -} -inline void _Application::SetWindowState(PowerPoint::PpWindowState value){ setProperty("WindowState", QVariant(value)); } - -inline PowerPoint::DocumentWindows* _Application::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - -inline void _Application::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline Office::FileDialog* _Application::FileDialog(Office::MsoFileDialogType Type) -{ - Office::FileDialog* qax_result = 0; - qRegisterMetaType("Office::FileDialog*", &qax_result); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::FileDialog", qax_result); -#endif - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline bool _Application::GetOptionFlag(int Option) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Option}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline bool _Application::GetOptionFlag(int Option, bool Persist) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Option, (void*)&Persist}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline void _Application::Help() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void _Application::Help(const QString& HelpFile) -{ - void *_a[] = {0, (void*)&HelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void _Application::Help(const QString& HelpFile, int ContextID) -{ - void *_a[] = {0, (void*)&HelpFile, (void*)&ContextID}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void _Application::LaunchSpelling(PowerPoint::DocumentWindow* pWindow) -{ - void *_a[] = {0, (void*)&pWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline IUnknown* _Application::PPFileDialog(PowerPoint::PpFileDialogType Type) -{ - IUnknown* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void _Application::Quit() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline QVariant _Application::Run(const QString& MacroName, QVariantList& safeArrayOfParams) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&MacroName, (void*)&safeArrayOfParams}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void _Application::SetOptionFlag(int Option, bool State) -{ - void *_a[] = {0, (void*)&Option, (void*)&State}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void _Application::SetOptionFlag(int Option, bool State, bool Persist) -{ - void *_a[] = {0, (void*)&Option, (void*)&State, (void*)&Persist}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void _Application::SetPerfMarker(int Marker) -{ - void *_a[] = {0, (void*)&Marker}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - - -inline PowerPoint::Presentation* _Global::ActivePresentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("ActivePresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindow* _Global::ActiveWindow() const -{ - PowerPoint::DocumentWindow* qax_pointer = 0; - qRegisterMetaType("DocumentWindow*", &qax_pointer); - qRegisterMetaType("DocumentWindow", qax_pointer); - QVariant qax_result = property("ActiveWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindow**)qax_result.constData(); -} - -inline PowerPoint::AddIns* _Global::AddIns() const -{ - PowerPoint::AddIns* qax_pointer = 0; - qRegisterMetaType("AddIns*", &qax_pointer); - qRegisterMetaType("AddIns", qax_pointer); - QVariant qax_result = property("AddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AddIns**)qax_result.constData(); -} - -inline Office::AnswerWizard* _Global::AnswerWizard() const -{ - Office::AnswerWizard* qax_pointer = 0; - qRegisterMetaType("Office::AnswerWizard*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::AnswerWizard", qax_pointer); -#endif - QVariant qax_result = property("AnswerWizard"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::AnswerWizard**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Application* _Global::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::Assistant* _Global::Assistant() const -{ - Office::Assistant* qax_pointer = 0; - qRegisterMetaType("Office::Assistant*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Assistant", qax_pointer); -#endif - QVariant qax_result = property("Assistant"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Assistant**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::CommandBars* _Global::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline IUnknown* _Global::Dialogs() const -{ - QVariant qax_result = property("Dialogs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Presentations* _Global::Presentations() const -{ - PowerPoint::Presentations* qax_pointer = 0; - qRegisterMetaType("Presentations*", &qax_pointer); - qRegisterMetaType("Presentations", qax_pointer); - QVariant qax_result = property("Presentations"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentations**)qax_result.constData(); -} - -inline PowerPoint::SlideShowWindows* _Global::SlideShowWindows() const -{ - PowerPoint::SlideShowWindows* qax_pointer = 0; - qRegisterMetaType("SlideShowWindows*", &qax_pointer); - qRegisterMetaType("SlideShowWindows", qax_pointer); - QVariant qax_result = property("SlideShowWindows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindows**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindows* _Global::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - - -inline Office::MsoTriState Application::Active() const -{ - QVariant qax_result = property("Active"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Presentation* Application::ActivePresentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("ActivePresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline QString Application::ActivePrinter() const -{ - QVariant qax_result = property("ActivePrinter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::DocumentWindow* Application::ActiveWindow() const -{ - PowerPoint::DocumentWindow* qax_pointer = 0; - qRegisterMetaType("DocumentWindow*", &qax_pointer); - qRegisterMetaType("DocumentWindow", qax_pointer); - QVariant qax_result = property("ActiveWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindow**)qax_result.constData(); -} - -inline PowerPoint::AddIns* Application::AddIns() const -{ - PowerPoint::AddIns* qax_pointer = 0; - qRegisterMetaType("AddIns*", &qax_pointer); - qRegisterMetaType("AddIns", qax_pointer); - QVariant qax_result = property("AddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AddIns**)qax_result.constData(); -} - -inline Office::AnswerWizard* Application::AnswerWizard() const -{ - Office::AnswerWizard* qax_pointer = 0; - qRegisterMetaType("Office::AnswerWizard*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::AnswerWizard", qax_pointer); -#endif - QVariant qax_result = property("AnswerWizard"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::AnswerWizard**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::Assistant* Application::Assistant() const -{ - Office::Assistant* qax_pointer = 0; - qRegisterMetaType("Office::Assistant*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Assistant", qax_pointer); -#endif - QVariant qax_result = property("Assistant"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Assistant**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::AutoCorrect* Application::AutoCorrect() const -{ - PowerPoint::AutoCorrect* qax_pointer = 0; - qRegisterMetaType("AutoCorrect*", &qax_pointer); - qRegisterMetaType("AutoCorrect", qax_pointer); - QVariant qax_result = property("AutoCorrect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AutoCorrect**)qax_result.constData(); -} - -inline Office::MsoAutomationSecurity Application::AutomationSecurity() const -{ - QVariant qax_result = property("AutomationSecurity"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutomationSecurity*)qax_result.constData(); -} -inline void Application::SetAutomationSecurity(Office::MsoAutomationSecurity value){ setProperty("AutomationSecurity", QVariant(value)); } - -inline QString Application::Build() const -{ - QVariant qax_result = property("Build"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::COMAddIns* Application::COMAddIns() const -{ - Office::COMAddIns* qax_pointer = 0; - qRegisterMetaType("Office::COMAddIns*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::COMAddIns", qax_pointer); -#endif - QVariant qax_result = property("COMAddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::COMAddIns**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString Application::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Application::SetCaption(const QString& value){ setProperty("Caption", QVariant(value)); } - -inline Office::CommandBars* Application::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline int Application::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::DefaultWebOptions* Application::DefaultWebOptions() const -{ - PowerPoint::DefaultWebOptions* qax_pointer = 0; - qRegisterMetaType("DefaultWebOptions*", &qax_pointer); - qRegisterMetaType("DefaultWebOptions", qax_pointer); - QVariant qax_result = property("DefaultWebOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DefaultWebOptions**)qax_result.constData(); -} - -inline IUnknown* Application::Dialogs() const -{ - QVariant qax_result = property("Dialogs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::PpAlertLevel Application::DisplayAlerts() const -{ - QVariant qax_result = property("DisplayAlerts"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpAlertLevel*)qax_result.constData(); -} -inline void Application::SetDisplayAlerts(PowerPoint::PpAlertLevel value){ setProperty("DisplayAlerts", QVariant(value)); } - -inline Office::MsoTriState Application::DisplayGridLines() const -{ - QVariant qax_result = property("DisplayGridLines"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Application::SetDisplayGridLines(Office::MsoTriState value){ setProperty("DisplayGridLines", QVariant(value)); } - -inline Office::MsoFeatureInstall Application::FeatureInstall() const -{ - QVariant qax_result = property("FeatureInstall"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFeatureInstall*)qax_result.constData(); -} -inline void Application::SetFeatureInstall(Office::MsoFeatureInstall value){ setProperty("FeatureInstall", QVariant(value)); } - -inline Office::IFind* Application::FileFind() const -{ - Office::IFind* qax_pointer = 0; - qRegisterMetaType("Office::IFind*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::IFind", qax_pointer); -#endif - QVariant qax_result = property("FileFind"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::IFind**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::FileSearch* Application::FileSearch() const -{ - Office::FileSearch* qax_pointer = 0; - qRegisterMetaType("Office::FileSearch*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::FileSearch", qax_pointer); -#endif - QVariant qax_result = property("FileSearch"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::FileSearch**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline int Application::HWND() const -{ - QVariant qax_result = property("HWND"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double Application::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Application::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::LanguageSettings* Application::LanguageSettings() const -{ - Office::LanguageSettings* qax_pointer = 0; - qRegisterMetaType("Office::LanguageSettings*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::LanguageSettings", qax_pointer); -#endif - QVariant qax_result = property("LanguageSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::LanguageSettings**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline double Application::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Application::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline IUnknown* Application::Marker() const -{ - QVariant qax_result = property("Marker"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline Office::MsoDebugOptions* Application::MsoDebugOptions() const -{ - Office::MsoDebugOptions* qax_pointer = 0; - qRegisterMetaType("Office::MsoDebugOptions*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::MsoDebugOptions", qax_pointer); -#endif - QVariant qax_result = property("MsoDebugOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::MsoDebugOptions**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString Application::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::NewFile* Application::NewPresentation() const -{ - Office::NewFile* qax_pointer = 0; - qRegisterMetaType("Office::NewFile*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::NewFile", qax_pointer); -#endif - QVariant qax_result = property("NewPresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::NewFile**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString Application::OperatingSystem() const -{ - QVariant qax_result = property("OperatingSystem"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::Options* Application::Options() const -{ - PowerPoint::Options* qax_pointer = 0; - qRegisterMetaType("Options*", &qax_pointer); - qRegisterMetaType("Options", qax_pointer); - QVariant qax_result = property("Options"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Options**)qax_result.constData(); -} - -inline QString Application::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::Presentations* Application::Presentations() const -{ - PowerPoint::Presentations* qax_pointer = 0; - qRegisterMetaType("Presentations*", &qax_pointer); - qRegisterMetaType("Presentations", qax_pointer); - QVariant qax_result = property("Presentations"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentations**)qax_result.constData(); -} - -inline QString Application::ProductCode() const -{ - QVariant qax_result = property("ProductCode"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState Application::ShowStartupDialog() const -{ - QVariant qax_result = property("ShowStartupDialog"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Application::SetShowStartupDialog(Office::MsoTriState value){ setProperty("ShowStartupDialog", QVariant(value)); } - -inline Office::MsoTriState Application::ShowWindowsInTaskbar() const -{ - QVariant qax_result = property("ShowWindowsInTaskbar"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Application::SetShowWindowsInTaskbar(Office::MsoTriState value){ setProperty("ShowWindowsInTaskbar", QVariant(value)); } - -inline PowerPoint::SlideShowWindows* Application::SlideShowWindows() const -{ - PowerPoint::SlideShowWindows* qax_pointer = 0; - qRegisterMetaType("SlideShowWindows*", &qax_pointer); - qRegisterMetaType("SlideShowWindows", qax_pointer); - QVariant qax_result = property("SlideShowWindows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindows**)qax_result.constData(); -} - -inline double Application::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Application::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline VBIDE::VBE* Application::VBE() const -{ - VBIDE::VBE* qax_pointer = 0; - qRegisterMetaType("VBIDE::VBE*", &qax_pointer); -#ifdef QAX_DUMPCPP_VBIDE_H - qRegisterMetaType("VBIDE::VBE", qax_pointer); -#endif - QVariant qax_result = property("VBE"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_VBIDE_H - return *(VBIDE::VBE**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline QString Application::Version() const -{ - QVariant qax_result = property("Version"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState Application::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Application::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double Application::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Application::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline PowerPoint::PpWindowState Application::WindowState() const -{ - QVariant qax_result = property("WindowState"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpWindowState*)qax_result.constData(); -} -inline void Application::SetWindowState(PowerPoint::PpWindowState value){ setProperty("WindowState", QVariant(value)); } - -inline PowerPoint::DocumentWindows* Application::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - -inline void Application::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline Office::FileDialog* Application::FileDialog(Office::MsoFileDialogType Type) -{ - Office::FileDialog* qax_result = 0; - qRegisterMetaType("Office::FileDialog*", &qax_result); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::FileDialog", qax_result); -#endif - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline bool Application::GetOptionFlag(int Option) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Option}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline bool Application::GetOptionFlag(int Option, bool Persist) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Option, (void*)&Persist}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline void Application::Help() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void Application::Help(const QString& HelpFile) -{ - void *_a[] = {0, (void*)&HelpFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void Application::Help(const QString& HelpFile, int ContextID) -{ - void *_a[] = {0, (void*)&HelpFile, (void*)&ContextID}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void Application::LaunchSpelling(PowerPoint::DocumentWindow* pWindow) -{ - void *_a[] = {0, (void*)&pWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline IUnknown* Application::PPFileDialog(PowerPoint::PpFileDialogType Type) -{ - IUnknown* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void Application::Quit() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline QVariant Application::Run(const QString& MacroName, QVariantList& safeArrayOfParams) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&MacroName, (void*)&safeArrayOfParams}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void Application::SetOptionFlag(int Option, bool State) -{ - void *_a[] = {0, (void*)&Option, (void*)&State}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void Application::SetOptionFlag(int Option, bool State, bool Persist) -{ - void *_a[] = {0, (void*)&Option, (void*)&State, (void*)&Persist}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void Application::SetPerfMarker(int Marker) -{ - void *_a[] = {0, (void*)&Marker}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - - -inline PowerPoint::Presentation* Global::ActivePresentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("ActivePresentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindow* Global::ActiveWindow() const -{ - PowerPoint::DocumentWindow* qax_pointer = 0; - qRegisterMetaType("DocumentWindow*", &qax_pointer); - qRegisterMetaType("DocumentWindow", qax_pointer); - QVariant qax_result = property("ActiveWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindow**)qax_result.constData(); -} - -inline PowerPoint::AddIns* Global::AddIns() const -{ - PowerPoint::AddIns* qax_pointer = 0; - qRegisterMetaType("AddIns*", &qax_pointer); - qRegisterMetaType("AddIns", qax_pointer); - QVariant qax_result = property("AddIns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AddIns**)qax_result.constData(); -} - -inline Office::AnswerWizard* Global::AnswerWizard() const -{ - Office::AnswerWizard* qax_pointer = 0; - qRegisterMetaType("Office::AnswerWizard*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::AnswerWizard", qax_pointer); -#endif - QVariant qax_result = property("AnswerWizard"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::AnswerWizard**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Application* Global::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::Assistant* Global::Assistant() const -{ - Office::Assistant* qax_pointer = 0; - qRegisterMetaType("Office::Assistant*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Assistant", qax_pointer); -#endif - QVariant qax_result = property("Assistant"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Assistant**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::CommandBars* Global::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline IUnknown* Global::Dialogs() const -{ - QVariant qax_result = property("Dialogs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Presentations* Global::Presentations() const -{ - PowerPoint::Presentations* qax_pointer = 0; - qRegisterMetaType("Presentations*", &qax_pointer); - qRegisterMetaType("Presentations", qax_pointer); - QVariant qax_result = property("Presentations"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentations**)qax_result.constData(); -} - -inline PowerPoint::SlideShowWindows* Global::SlideShowWindows() const -{ - PowerPoint::SlideShowWindows* qax_pointer = 0; - qRegisterMetaType("SlideShowWindows*", &qax_pointer); - qRegisterMetaType("SlideShowWindows", qax_pointer); - QVariant qax_result = property("SlideShowWindows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindows**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindows* Global::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - - -inline IDispatch* ColorFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ColorFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ColorFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ColorFormat::RGB() const -{ - QVariant qax_result = property("RGB"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void ColorFormat::SetRGB(int value){ setProperty("RGB", QVariant(value)); } - -inline PowerPoint::PpColorSchemeIndex ColorFormat::SchemeColor() const -{ - QVariant qax_result = property("SchemeColor"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpColorSchemeIndex*)qax_result.constData(); -} -inline void ColorFormat::SetSchemeColor(PowerPoint::PpColorSchemeIndex value){ setProperty("SchemeColor", QVariant(value)); } - -inline double ColorFormat::TintAndShade() const -{ - QVariant qax_result = property("TintAndShade"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ColorFormat::SetTintAndShade(double value){ setProperty("TintAndShade", QVariant(value)); } - -inline Office::MsoColorType ColorFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoColorType*)qax_result.constData(); -} - - -inline Office::MsoTriState SlideShowWindow::Active() const -{ - QVariant qax_result = property("Active"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Application* SlideShowWindow::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int SlideShowWindow::HWND() const -{ - QVariant qax_result = property("HWND"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double SlideShowWindow::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowWindow::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::MsoTriState SlideShowWindow::IsFullScreen() const -{ - QVariant qax_result = property("IsFullScreen"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline double SlideShowWindow::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowWindow::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline IDispatch* SlideShowWindow::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Presentation* SlideShowWindow::Presentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("Presentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline double SlideShowWindow::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowWindow::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline PowerPoint::SlideShowView* SlideShowWindow::View() const -{ - PowerPoint::SlideShowView* qax_pointer = 0; - qRegisterMetaType("SlideShowView*", &qax_pointer); - qRegisterMetaType("SlideShowView", qax_pointer); - QVariant qax_result = property("View"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowView**)qax_result.constData(); -} - -inline double SlideShowWindow::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowWindow::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline void SlideShowWindow::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Selection::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* Selection::ChildShapeRange() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("ChildShapeRange"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline bool Selection::HasChildShapeRange() const -{ - QVariant qax_result = property("HasChildShapeRange"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline IDispatch* Selection::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* Selection::ShapeRange() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("ShapeRange"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::SlideRange* Selection::SlideRange() const -{ - PowerPoint::SlideRange* qax_pointer = 0; - qRegisterMetaType("SlideRange*", &qax_pointer); - qRegisterMetaType("SlideRange", qax_pointer); - QVariant qax_result = property("SlideRange"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideRange**)qax_result.constData(); -} - -inline PowerPoint::TextRange* Selection::TextRange() const -{ - PowerPoint::TextRange* qax_pointer = 0; - qRegisterMetaType("TextRange*", &qax_pointer); - qRegisterMetaType("TextRange", qax_pointer); - QVariant qax_result = property("TextRange"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextRange**)qax_result.constData(); -} - -inline PowerPoint::PpSelectionType Selection::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSelectionType*)qax_result.constData(); -} - -inline void Selection::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Selection::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Selection::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Selection::Unselect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline PowerPoint::Application* DocumentWindows::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int DocumentWindows::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* DocumentWindows::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DocumentWindows::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void DocumentWindows::Arrange() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void DocumentWindows::Arrange(PowerPoint::PpArrangeStyle arrangeStyle) -{ - void *_a[] = {0, (void*)&arrangeStyle}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline PowerPoint::DocumentWindow* DocumentWindows::Item(int Index) -{ - PowerPoint::DocumentWindow* qax_result = 0; - qRegisterMetaType("DocumentWindow*", &qax_result); - qRegisterMetaType("DocumentWindow", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant DocumentWindows::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* SlideShowWindows::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int SlideShowWindows::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* SlideShowWindows::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* SlideShowWindows::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::SlideShowWindow* SlideShowWindows::Item(int Index) -{ - PowerPoint::SlideShowWindow* qax_result = 0; - qRegisterMetaType("SlideShowWindow*", &qax_result); - qRegisterMetaType("SlideShowWindow", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant SlideShowWindows::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline Office::MsoTriState DocumentWindow::Active() const -{ - QVariant qax_result = property("Active"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Pane* DocumentWindow::ActivePane() const -{ - PowerPoint::Pane* qax_pointer = 0; - qRegisterMetaType("Pane*", &qax_pointer); - qRegisterMetaType("Pane", qax_pointer); - QVariant qax_result = property("ActivePane"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Pane**)qax_result.constData(); -} - -inline PowerPoint::Application* DocumentWindow::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState DocumentWindow::BlackAndWhite() const -{ - QVariant qax_result = property("BlackAndWhite"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DocumentWindow::SetBlackAndWhite(Office::MsoTriState value){ setProperty("BlackAndWhite", QVariant(value)); } - -inline QString DocumentWindow::Caption() const -{ - QVariant qax_result = property("Caption"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline int DocumentWindow::HWND() const -{ - QVariant qax_result = property("HWND"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double DocumentWindow::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void DocumentWindow::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline double DocumentWindow::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void DocumentWindow::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline PowerPoint::Panes* DocumentWindow::Panes() const -{ - PowerPoint::Panes* qax_pointer = 0; - qRegisterMetaType("Panes*", &qax_pointer); - qRegisterMetaType("Panes", qax_pointer); - QVariant qax_result = property("Panes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Panes**)qax_result.constData(); -} - -inline IDispatch* DocumentWindow::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Presentation* DocumentWindow::Presentation() const -{ - PowerPoint::Presentation* qax_pointer = 0; - qRegisterMetaType("Presentation*", &qax_pointer); - qRegisterMetaType("Presentation", qax_pointer); - QVariant qax_result = property("Presentation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Presentation**)qax_result.constData(); -} - -inline PowerPoint::Selection* DocumentWindow::Selection() const -{ - PowerPoint::Selection* qax_pointer = 0; - qRegisterMetaType("Selection*", &qax_pointer); - qRegisterMetaType("Selection", qax_pointer); - QVariant qax_result = property("Selection"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Selection**)qax_result.constData(); -} - -inline int DocumentWindow::SplitHorizontal() const -{ - QVariant qax_result = property("SplitHorizontal"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void DocumentWindow::SetSplitHorizontal(int value){ setProperty("SplitHorizontal", QVariant(value)); } - -inline int DocumentWindow::SplitVertical() const -{ - QVariant qax_result = property("SplitVertical"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void DocumentWindow::SetSplitVertical(int value){ setProperty("SplitVertical", QVariant(value)); } - -inline double DocumentWindow::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void DocumentWindow::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline PowerPoint::View* DocumentWindow::View() const -{ - PowerPoint::View* qax_pointer = 0; - qRegisterMetaType("View*", &qax_pointer); - qRegisterMetaType("View", qax_pointer); - QVariant qax_result = property("View"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::View**)qax_result.constData(); -} - -inline PowerPoint::PpViewType DocumentWindow::ViewType() const -{ - QVariant qax_result = property("ViewType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpViewType*)qax_result.constData(); -} -inline void DocumentWindow::SetViewType(PowerPoint::PpViewType value){ setProperty("ViewType", QVariant(value)); } - -inline double DocumentWindow::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void DocumentWindow::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline PowerPoint::PpWindowState DocumentWindow::WindowState() const -{ - QVariant qax_result = property("WindowState"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpWindowState*)qax_result.constData(); -} -inline void DocumentWindow::SetWindowState(PowerPoint::PpWindowState value){ setProperty("WindowState", QVariant(value)); } - -inline void DocumentWindow::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void DocumentWindow::Close() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void DocumentWindow::FitToPage() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void DocumentWindow::LargeScroll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void DocumentWindow::LargeScroll(int Down) -{ - void *_a[] = {0, (void*)&Down}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void DocumentWindow::LargeScroll(int Down, int Up) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void DocumentWindow::LargeScroll(int Down, int Up, int ToRight) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up, (void*)&ToRight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void DocumentWindow::LargeScroll(int Down, int Up, int ToRight, int ToLeft) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up, (void*)&ToRight, (void*)&ToLeft}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline PowerPoint::DocumentWindow* DocumentWindow::NewWindow() -{ - PowerPoint::DocumentWindow* qax_result = 0; - qRegisterMetaType("DocumentWindow*", &qax_result); - qRegisterMetaType("DocumentWindow", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline int DocumentWindow::PointsToScreenPixelsX(double Points) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Points}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline int DocumentWindow::PointsToScreenPixelsY(double Points) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Points}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline IDispatch* DocumentWindow::RangeFromPoint(int X, int Y) -{ - IDispatch* qax_result = 0; - void *_a[] = {(void*)&qax_result, (void*)&X, (void*)&Y}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline void DocumentWindow::ScrollIntoView(double Left, double Top, double Width, double Height) -{ - void *_a[] = {0, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void DocumentWindow::ScrollIntoView(double Left, double Top, double Width, double Height, Office::MsoTriState Start) -{ - void *_a[] = {0, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void DocumentWindow::SmallScroll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline void DocumentWindow::SmallScroll(int Down) -{ - void *_a[] = {0, (void*)&Down}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void DocumentWindow::SmallScroll(int Down, int Up) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void DocumentWindow::SmallScroll(int Down, int Up, int ToRight) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up, (void*)&ToRight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void DocumentWindow::SmallScroll(int Down, int Up, int ToRight, int ToLeft) -{ - void *_a[] = {0, (void*)&Down, (void*)&Up, (void*)&ToRight, (void*)&ToLeft}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); -} - - -inline PowerPoint::Application* View::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState View::DisplaySlideMiniature() const -{ - QVariant qax_result = property("DisplaySlideMiniature"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void View::SetDisplaySlideMiniature(Office::MsoTriState value){ setProperty("DisplaySlideMiniature", QVariant(value)); } - -inline IDispatch* View::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PrintOptions* View::PrintOptions() const -{ - PowerPoint::PrintOptions* qax_pointer = 0; - qRegisterMetaType("PrintOptions*", &qax_pointer); - qRegisterMetaType("PrintOptions", qax_pointer); - QVariant qax_result = property("PrintOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PrintOptions**)qax_result.constData(); -} - -inline IDispatch* View::Slide() const -{ - QVariant qax_result = property("Slide"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} -inline void View::SetSlide(IDispatch* value){ - int typeId = qRegisterMetaType("IDispatch*", &value); - setProperty("Slide", QVariant(typeId, &value)); -} - -inline PowerPoint::PpViewType View::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpViewType*)qax_result.constData(); -} - -inline int View::Zoom() const -{ - QVariant qax_result = property("Zoom"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void View::SetZoom(int value){ setProperty("Zoom", QVariant(value)); } - -inline Office::MsoTriState View::ZoomToFit() const -{ - QVariant qax_result = property("ZoomToFit"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void View::SetZoomToFit(Office::MsoTriState value){ setProperty("ZoomToFit", QVariant(value)); } - -inline void View::GotoSlide(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void View::Paste() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void View::PasteSpecial() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType) -{ - void *_a[] = {0, (void*)&DataType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon) -{ - void *_a[] = {0, (void*)&DataType, (void*)&DisplayAsIcon}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName) -{ - void *_a[] = {0, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex) -{ - void *_a[] = {0, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel) -{ - void *_a[] = {0, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void View::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link) -{ - void *_a[] = {0, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel, (void*)&Link}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void View::PrintOut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void View::PrintOut(int From) -{ - void *_a[] = {0, (void*)&From}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void View::PrintOut(int From, int To) -{ - void *_a[] = {0, (void*)&From, (void*)&To}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void View::PrintOut(int From, int To, const QString& PrintToFile) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void View::PrintOut(int From, int To, const QString& PrintToFile, int Copies) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void View::PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies, (void*)&Collate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - - -inline Office::MsoTriState SlideShowView::AcceleratorsEnabled() const -{ - QVariant qax_result = property("AcceleratorsEnabled"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowView::SetAcceleratorsEnabled(Office::MsoTriState value){ setProperty("AcceleratorsEnabled", QVariant(value)); } - -inline PowerPoint::PpSlideShowAdvanceMode SlideShowView::AdvanceMode() const -{ - QVariant qax_result = property("AdvanceMode"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowAdvanceMode*)qax_result.constData(); -} - -inline PowerPoint::Application* SlideShowView::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int SlideShowView::CurrentShowPosition() const -{ - QVariant qax_result = property("CurrentShowPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState SlideShowView::IsNamedShow() const -{ - QVariant qax_result = property("IsNamedShow"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Slide* SlideShowView::LastSlideViewed() const -{ - PowerPoint::Slide* qax_pointer = 0; - qRegisterMetaType("Slide*", &qax_pointer); - qRegisterMetaType("Slide", qax_pointer); - QVariant qax_result = property("LastSlideViewed"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Slide**)qax_result.constData(); -} - -inline IDispatch* SlideShowView::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* SlideShowView::PointerColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("PointerColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline PowerPoint::PpSlideShowPointerType SlideShowView::PointerType() const -{ - QVariant qax_result = property("PointerType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowPointerType*)qax_result.constData(); -} -inline void SlideShowView::SetPointerType(PowerPoint::PpSlideShowPointerType value){ setProperty("PointerType", QVariant(value)); } - -inline double SlideShowView::PresentationElapsedTime() const -{ - QVariant qax_result = property("PresentationElapsedTime"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline PowerPoint::Slide* SlideShowView::Slide() const -{ - PowerPoint::Slide* qax_pointer = 0; - qRegisterMetaType("Slide*", &qax_pointer); - qRegisterMetaType("Slide", qax_pointer); - QVariant qax_result = property("Slide"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Slide**)qax_result.constData(); -} - -inline double SlideShowView::SlideElapsedTime() const -{ - QVariant qax_result = property("SlideElapsedTime"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowView::SetSlideElapsedTime(double value){ setProperty("SlideElapsedTime", QVariant(value)); } - -inline QString SlideShowView::SlideShowName() const -{ - QVariant qax_result = property("SlideShowName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::PpSlideShowState SlideShowView::State() const -{ - QVariant qax_result = property("State"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowState*)qax_result.constData(); -} -inline void SlideShowView::SetState(PowerPoint::PpSlideShowState value){ setProperty("State", QVariant(value)); } - -inline int SlideShowView::Zoom() const -{ - QVariant qax_result = property("Zoom"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline void SlideShowView::DrawLine(double BeginX, double BeginY, double EndX, double EndY) -{ - void *_a[] = {0, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SlideShowView::EndNamedShow() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void SlideShowView::EraseDrawing() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void SlideShowView::Exit() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void SlideShowView::First() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void SlideShowView::GotoNamedShow(const QString& SlideShowName) -{ - void *_a[] = {0, (void*)&SlideShowName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void SlideShowView::GotoSlide(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void SlideShowView::GotoSlide(int Index, Office::MsoTriState ResetSlide) -{ - void *_a[] = {0, (void*)&Index, (void*)&ResetSlide}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void SlideShowView::InstallTracker(PowerPoint::MouseTracker* pTracker, Office::MsoTriState Presenter) -{ - void *_a[] = {0, (void*)&pTracker, (void*)&Presenter}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void SlideShowView::Last() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void SlideShowView::Next() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void SlideShowView::Previous() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void SlideShowView::ResetSlideTime() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline PowerPoint::PpSlideShowAdvanceMode SlideShowSettings::AdvanceMode() const -{ - QVariant qax_result = property("AdvanceMode"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowAdvanceMode*)qax_result.constData(); -} -inline void SlideShowSettings::SetAdvanceMode(PowerPoint::PpSlideShowAdvanceMode value){ setProperty("AdvanceMode", QVariant(value)); } - -inline PowerPoint::Application* SlideShowSettings::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int SlideShowSettings::EndingSlide() const -{ - QVariant qax_result = property("EndingSlide"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void SlideShowSettings::SetEndingSlide(int value){ setProperty("EndingSlide", QVariant(value)); } - -inline Office::MsoTriState SlideShowSettings::LoopUntilStopped() const -{ - QVariant qax_result = property("LoopUntilStopped"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowSettings::SetLoopUntilStopped(Office::MsoTriState value){ setProperty("LoopUntilStopped", QVariant(value)); } - -inline PowerPoint::NamedSlideShows* SlideShowSettings::NamedSlideShows() const -{ - PowerPoint::NamedSlideShows* qax_pointer = 0; - qRegisterMetaType("NamedSlideShows*", &qax_pointer); - qRegisterMetaType("NamedSlideShows", qax_pointer); - QVariant qax_result = property("NamedSlideShows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::NamedSlideShows**)qax_result.constData(); -} - -inline IDispatch* SlideShowSettings::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* SlideShowSettings::PointerColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("PointerColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline PowerPoint::PpSlideShowRangeType SlideShowSettings::RangeType() const -{ - QVariant qax_result = property("RangeType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowRangeType*)qax_result.constData(); -} -inline void SlideShowSettings::SetRangeType(PowerPoint::PpSlideShowRangeType value){ setProperty("RangeType", QVariant(value)); } - -inline Office::MsoTriState SlideShowSettings::ShowScrollbar() const -{ - QVariant qax_result = property("ShowScrollbar"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowSettings::SetShowScrollbar(Office::MsoTriState value){ setProperty("ShowScrollbar", QVariant(value)); } - -inline PowerPoint::PpSlideShowType SlideShowSettings::ShowType() const -{ - QVariant qax_result = property("ShowType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideShowType*)qax_result.constData(); -} -inline void SlideShowSettings::SetShowType(PowerPoint::PpSlideShowType value){ setProperty("ShowType", QVariant(value)); } - -inline Office::MsoTriState SlideShowSettings::ShowWithAnimation() const -{ - QVariant qax_result = property("ShowWithAnimation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowSettings::SetShowWithAnimation(Office::MsoTriState value){ setProperty("ShowWithAnimation", QVariant(value)); } - -inline Office::MsoTriState SlideShowSettings::ShowWithNarration() const -{ - QVariant qax_result = property("ShowWithNarration"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowSettings::SetShowWithNarration(Office::MsoTriState value){ setProperty("ShowWithNarration", QVariant(value)); } - -inline QString SlideShowSettings::SlideShowName() const -{ - QVariant qax_result = property("SlideShowName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SlideShowSettings::SetSlideShowName(const QString& value){ setProperty("SlideShowName", QVariant(value)); } - -inline int SlideShowSettings::StartingSlide() const -{ - QVariant qax_result = property("StartingSlide"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void SlideShowSettings::SetStartingSlide(int value){ setProperty("StartingSlide", QVariant(value)); } - -inline PowerPoint::SlideShowWindow* SlideShowSettings::Run() -{ - PowerPoint::SlideShowWindow* qax_result = 0; - qRegisterMetaType("SlideShowWindow*", &qax_result); - qRegisterMetaType("SlideShowWindow", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - - -inline PowerPoint::Application* NamedSlideShows::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int NamedSlideShows::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* NamedSlideShows::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* NamedSlideShows::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::NamedSlideShow* NamedSlideShows::Add(const QString& Name, const QVariant& safeArrayOfSlideIDs) -{ - PowerPoint::NamedSlideShow* qax_result = 0; - qRegisterMetaType("NamedSlideShow*", &qax_result); - qRegisterMetaType("NamedSlideShow", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Name, (void*)&safeArrayOfSlideIDs}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::NamedSlideShow* NamedSlideShows::Item(const QVariant& Index) -{ - PowerPoint::NamedSlideShow* qax_result = 0; - qRegisterMetaType("NamedSlideShow*", &qax_result); - qRegisterMetaType("NamedSlideShow", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline QVariant NamedSlideShows::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline PowerPoint::Application* NamedSlideShow::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int NamedSlideShow::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString NamedSlideShow::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* NamedSlideShow::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant NamedSlideShow::SlideIDs() const -{ - QVariant qax_result = property("SlideIDs"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline void NamedSlideShow::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline QString PrintOptions::ActivePrinter() const -{ - QVariant qax_result = property("ActivePrinter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void PrintOptions::SetActivePrinter(const QString& value){ setProperty("ActivePrinter", QVariant(value)); } - -inline PowerPoint::Application* PrintOptions::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState PrintOptions::Collate() const -{ - QVariant qax_result = property("Collate"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetCollate(Office::MsoTriState value){ setProperty("Collate", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::FitToPage() const -{ - QVariant qax_result = property("FitToPage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetFitToPage(Office::MsoTriState value){ setProperty("FitToPage", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::FrameSlides() const -{ - QVariant qax_result = property("FrameSlides"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetFrameSlides(Office::MsoTriState value){ setProperty("FrameSlides", QVariant(value)); } - -inline PowerPoint::PpPrintHandoutOrder PrintOptions::HandoutOrder() const -{ - QVariant qax_result = property("HandoutOrder"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPrintHandoutOrder*)qax_result.constData(); -} -inline void PrintOptions::SetHandoutOrder(PowerPoint::PpPrintHandoutOrder value){ setProperty("HandoutOrder", QVariant(value)); } - -inline int PrintOptions::NumberOfCopies() const -{ - QVariant qax_result = property("NumberOfCopies"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PrintOptions::SetNumberOfCopies(int value){ setProperty("NumberOfCopies", QVariant(value)); } - -inline PowerPoint::PpPrintOutputType PrintOptions::OutputType() const -{ - QVariant qax_result = property("OutputType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPrintOutputType*)qax_result.constData(); -} -inline void PrintOptions::SetOutputType(PowerPoint::PpPrintOutputType value){ setProperty("OutputType", QVariant(value)); } - -inline IDispatch* PrintOptions::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PpPrintColorType PrintOptions::PrintColorType() const -{ - QVariant qax_result = property("PrintColorType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPrintColorType*)qax_result.constData(); -} -inline void PrintOptions::SetPrintColorType(PowerPoint::PpPrintColorType value){ setProperty("PrintColorType", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::PrintComments() const -{ - QVariant qax_result = property("PrintComments"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetPrintComments(Office::MsoTriState value){ setProperty("PrintComments", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::PrintFontsAsGraphics() const -{ - QVariant qax_result = property("PrintFontsAsGraphics"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetPrintFontsAsGraphics(Office::MsoTriState value){ setProperty("PrintFontsAsGraphics", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::PrintHiddenSlides() const -{ - QVariant qax_result = property("PrintHiddenSlides"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetPrintHiddenSlides(Office::MsoTriState value){ setProperty("PrintHiddenSlides", QVariant(value)); } - -inline Office::MsoTriState PrintOptions::PrintInBackground() const -{ - QVariant qax_result = property("PrintInBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PrintOptions::SetPrintInBackground(Office::MsoTriState value){ setProperty("PrintInBackground", QVariant(value)); } - -inline PowerPoint::PpPrintRangeType PrintOptions::RangeType() const -{ - QVariant qax_result = property("RangeType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPrintRangeType*)qax_result.constData(); -} -inline void PrintOptions::SetRangeType(PowerPoint::PpPrintRangeType value){ setProperty("RangeType", QVariant(value)); } - -inline PowerPoint::PrintRanges* PrintOptions::Ranges() const -{ - PowerPoint::PrintRanges* qax_pointer = 0; - qRegisterMetaType("PrintRanges*", &qax_pointer); - qRegisterMetaType("PrintRanges", qax_pointer); - QVariant qax_result = property("Ranges"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PrintRanges**)qax_result.constData(); -} - -inline QString PrintOptions::SlideShowName() const -{ - QVariant qax_result = property("SlideShowName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void PrintOptions::SetSlideShowName(const QString& value){ setProperty("SlideShowName", QVariant(value)); } - - -inline PowerPoint::Application* PrintRanges::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int PrintRanges::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* PrintRanges::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* PrintRanges::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::PrintRange* PrintRanges::Add(int Start, int End) -{ - PowerPoint::PrintRange* qax_result = 0; - qRegisterMetaType("PrintRange*", &qax_result); - qRegisterMetaType("PrintRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&End}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void PrintRanges::ClearAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline PowerPoint::PrintRange* PrintRanges::Item(int Index) -{ - PowerPoint::PrintRange* qax_result = 0; - qRegisterMetaType("PrintRange*", &qax_result); - qRegisterMetaType("PrintRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant PrintRanges::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* PrintRange::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int PrintRange::End() const -{ - QVariant qax_result = property("End"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* PrintRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int PrintRange::Start() const -{ - QVariant qax_result = property("Start"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline void PrintRange::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* AddIns::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int AddIns::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* AddIns::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* AddIns::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::AddIn* AddIns::Add(const QString& FileName) -{ - PowerPoint::AddIn* qax_result = 0; - qRegisterMetaType("AddIn*", &qax_result); - qRegisterMetaType("AddIn", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::AddIn* AddIns::Item(QVariant& Index) -{ - PowerPoint::AddIn* qax_result = 0; - qRegisterMetaType("AddIn*", &qax_result); - qRegisterMetaType("AddIn", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline void AddIns::Remove(QVariant& Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline QVariant AddIns::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* AddIn::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState AddIn::AutoLoad() const -{ - QVariant qax_result = property("AutoLoad"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AddIn::SetAutoLoad(Office::MsoTriState value){ setProperty("AutoLoad", QVariant(value)); } - -inline Office::MsoTriState AddIn::DisplayAlerts() const -{ - QVariant qax_result = property("DisplayAlerts"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AddIn::SetDisplayAlerts(Office::MsoTriState value){ setProperty("DisplayAlerts", QVariant(value)); } - -inline QString AddIn::FullName() const -{ - QVariant qax_result = property("FullName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState AddIn::Loaded() const -{ - QVariant qax_result = property("Loaded"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AddIn::SetLoaded(Office::MsoTriState value){ setProperty("Loaded", QVariant(value)); } - -inline QString AddIn::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline IDispatch* AddIn::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString AddIn::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTriState AddIn::Registered() const -{ - QVariant qax_result = property("Registered"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AddIn::SetRegistered(Office::MsoTriState value){ setProperty("Registered", QVariant(value)); } - -inline Office::MsoTriState AddIn::RegisteredInHKLM() const -{ - QVariant qax_result = property("RegisteredInHKLM"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - - -inline PowerPoint::Application* Presentations::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Presentations::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Presentations::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Presentations::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Presentation* Presentations::Add() -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::Add(Office::MsoTriState WithWindow) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&WithWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline bool Presentations::CanCheckOut(const QString& FileName) -{ - bool qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void Presentations::CheckOut(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline PowerPoint::Presentation* Presentations::Item(const QVariant& Index) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::Open(const QString& FileName) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::Open(const QString& FileName, Office::MsoTriState ReadOnly) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::Open(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly, (void*)&Untitled}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::Open(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled, Office::MsoTriState WithWindow) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly, (void*)&Untitled, (void*)&WithWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::OpenOld(const QString& FileName) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::OpenOld(const QString& FileName, Office::MsoTriState ReadOnly) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::OpenOld(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly, (void*)&Untitled}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline PowerPoint::Presentation* Presentations::OpenOld(const QString& FileName, Office::MsoTriState ReadOnly, Office::MsoTriState Untitled, Office::MsoTriState WithWindow) -{ - PowerPoint::Presentation* qax_result = 0; - qRegisterMetaType("Presentation*", &qax_result); - qRegisterMetaType("Presentation", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&ReadOnly, (void*)&Untitled, (void*)&WithWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline QVariant Presentations::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - - -inline PowerPoint::Application* Presentation::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* Presentation::BuiltInDocumentProperties() const -{ - QVariant qax_result = property("BuiltInDocumentProperties"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorSchemes* Presentation::ColorSchemes() const -{ - PowerPoint::ColorSchemes* qax_pointer = 0; - qRegisterMetaType("ColorSchemes*", &qax_pointer); - qRegisterMetaType("ColorSchemes", qax_pointer); - QVariant qax_result = property("ColorSchemes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorSchemes**)qax_result.constData(); -} - -inline Office::CommandBars* Presentation::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline IDispatch* Presentation::Container() const -{ - QVariant qax_result = property("Container"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* Presentation::CustomDocumentProperties() const -{ - QVariant qax_result = property("CustomDocumentProperties"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoLanguageID Presentation::DefaultLanguageID() const -{ - QVariant qax_result = property("DefaultLanguageID"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLanguageID*)qax_result.constData(); -} -inline void Presentation::SetDefaultLanguageID(Office::MsoLanguageID value){ setProperty("DefaultLanguageID", QVariant(value)); } - -inline PowerPoint::Shape* Presentation::DefaultShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("DefaultShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::Designs* Presentation::Designs() const -{ - PowerPoint::Designs* qax_pointer = 0; - qRegisterMetaType("Designs*", &qax_pointer); - qRegisterMetaType("Designs", qax_pointer); - QVariant qax_result = property("Designs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Designs**)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::DisplayComments() const -{ - QVariant qax_result = property("DisplayComments"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Presentation::SetDisplayComments(Office::MsoTriState value){ setProperty("DisplayComments", QVariant(value)); } - -inline Office::DocumentLibraryVersions* Presentation::DocumentLibraryVersions() const -{ - Office::DocumentLibraryVersions* qax_pointer = 0; - qRegisterMetaType("Office::DocumentLibraryVersions*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::DocumentLibraryVersions", qax_pointer); -#endif - QVariant qax_result = property("DocumentLibraryVersions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::DocumentLibraryVersions**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::MsoTriState Presentation::EnvelopeVisible() const -{ - QVariant qax_result = property("EnvelopeVisible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Presentation::SetEnvelopeVisible(Office::MsoTriState value){ setProperty("EnvelopeVisible", QVariant(value)); } - -inline PowerPoint::ExtraColors* Presentation::ExtraColors() const -{ - PowerPoint::ExtraColors* qax_pointer = 0; - qRegisterMetaType("ExtraColors*", &qax_pointer); - qRegisterMetaType("ExtraColors", qax_pointer); - QVariant qax_result = property("ExtraColors"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ExtraColors**)qax_result.constData(); -} - -inline Office::MsoFarEastLineBreakLanguageID Presentation::FarEastLineBreakLanguage() const -{ - QVariant qax_result = property("FarEastLineBreakLanguage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFarEastLineBreakLanguageID*)qax_result.constData(); -} -inline void Presentation::SetFarEastLineBreakLanguage(Office::MsoFarEastLineBreakLanguageID value){ setProperty("FarEastLineBreakLanguage", QVariant(value)); } - -inline PowerPoint::PpFarEastLineBreakLevel Presentation::FarEastLineBreakLevel() const -{ - QVariant qax_result = property("FarEastLineBreakLevel"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpFarEastLineBreakLevel*)qax_result.constData(); -} -inline void Presentation::SetFarEastLineBreakLevel(PowerPoint::PpFarEastLineBreakLevel value){ setProperty("FarEastLineBreakLevel", QVariant(value)); } - -inline PowerPoint::Fonts* Presentation::Fonts() const -{ - PowerPoint::Fonts* qax_pointer = 0; - qRegisterMetaType("Fonts*", &qax_pointer); - qRegisterMetaType("Fonts", qax_pointer); - QVariant qax_result = property("Fonts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Fonts**)qax_result.constData(); -} - -inline QString Presentation::FullName() const -{ - QVariant qax_result = property("FullName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline double Presentation::GridDistance() const -{ - QVariant qax_result = property("GridDistance"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Presentation::SetGridDistance(double value){ setProperty("GridDistance", QVariant(value)); } - -inline Office::HTMLProject* Presentation::HTMLProject() const -{ - Office::HTMLProject* qax_pointer = 0; - qRegisterMetaType("Office::HTMLProject*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::HTMLProject", qax_pointer); -#endif - QVariant qax_result = property("HTMLProject"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::HTMLProject**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::_Master* Presentation::HandoutMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("HandoutMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::PpRevisionInfo Presentation::HasRevisionInfo() const -{ - QVariant qax_result = property("HasRevisionInfo"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpRevisionInfo*)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::HasTitleMaster() const -{ - QVariant qax_result = property("HasTitleMaster"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::PpDirection Presentation::LayoutDirection() const -{ - QVariant qax_result = property("LayoutDirection"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpDirection*)qax_result.constData(); -} -inline void Presentation::SetLayoutDirection(PowerPoint::PpDirection value){ setProperty("LayoutDirection", QVariant(value)); } - -inline QString Presentation::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString Presentation::NoLineBreakAfter() const -{ - QVariant qax_result = property("NoLineBreakAfter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Presentation::SetNoLineBreakAfter(const QString& value){ setProperty("NoLineBreakAfter", QVariant(value)); } - -inline QString Presentation::NoLineBreakBefore() const -{ - QVariant qax_result = property("NoLineBreakBefore"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Presentation::SetNoLineBreakBefore(const QString& value){ setProperty("NoLineBreakBefore", QVariant(value)); } - -inline PowerPoint::_Master* Presentation::NotesMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("NotesMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::PageSetup* Presentation::PageSetup() const -{ - PowerPoint::PageSetup* qax_pointer = 0; - qRegisterMetaType("PageSetup*", &qax_pointer); - qRegisterMetaType("PageSetup", qax_pointer); - QVariant qax_result = property("PageSetup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PageSetup**)qax_result.constData(); -} - -inline IDispatch* Presentation::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString Presentation::Password() const -{ - QVariant qax_result = property("Password"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Presentation::SetPassword(const QString& value){ setProperty("Password", QVariant(value)); } - -inline QString Presentation::PasswordEncryptionAlgorithm() const -{ - QVariant qax_result = property("PasswordEncryptionAlgorithm"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline bool Presentation::PasswordEncryptionFileProperties() const -{ - QVariant qax_result = property("PasswordEncryptionFileProperties"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int Presentation::PasswordEncryptionKeyLength() const -{ - QVariant qax_result = property("PasswordEncryptionKeyLength"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Presentation::PasswordEncryptionProvider() const -{ - QVariant qax_result = property("PasswordEncryptionProvider"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString Presentation::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::Permission* Presentation::Permission() const -{ - Office::Permission* qax_pointer = 0; - qRegisterMetaType("Office::Permission*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Permission", qax_pointer); -#endif - QVariant qax_result = property("Permission"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Permission**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::PrintOptions* Presentation::PrintOptions() const -{ - PowerPoint::PrintOptions* qax_pointer = 0; - qRegisterMetaType("PrintOptions*", &qax_pointer); - qRegisterMetaType("PrintOptions", qax_pointer); - QVariant qax_result = property("PrintOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PrintOptions**)qax_result.constData(); -} - -inline PowerPoint::PublishObjects* Presentation::PublishObjects() const -{ - PowerPoint::PublishObjects* qax_pointer = 0; - qRegisterMetaType("PublishObjects*", &qax_pointer); - qRegisterMetaType("PublishObjects", qax_pointer); - QVariant qax_result = property("PublishObjects"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PublishObjects**)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::ReadOnly() const -{ - QVariant qax_result = property("ReadOnly"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::RemovePersonalInformation() const -{ - QVariant qax_result = property("RemovePersonalInformation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Presentation::SetRemovePersonalInformation(Office::MsoTriState value){ setProperty("RemovePersonalInformation", QVariant(value)); } - -inline Office::MsoTriState Presentation::Saved() const -{ - QVariant qax_result = property("Saved"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Presentation::SetSaved(Office::MsoTriState value){ setProperty("Saved", QVariant(value)); } - -inline Office::SharedWorkspace* Presentation::SharedWorkspace() const -{ - Office::SharedWorkspace* qax_pointer = 0; - qRegisterMetaType("Office::SharedWorkspace*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::SharedWorkspace", qax_pointer); -#endif - QVariant qax_result = property("SharedWorkspace"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::SharedWorkspace**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::SignatureSet* Presentation::Signatures() const -{ - Office::SignatureSet* qax_pointer = 0; - qRegisterMetaType("Office::SignatureSet*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::SignatureSet", qax_pointer); -#endif - QVariant qax_result = property("Signatures"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::SignatureSet**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::_Master* Presentation::SlideMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("SlideMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::SlideShowSettings* Presentation::SlideShowSettings() const -{ - PowerPoint::SlideShowSettings* qax_pointer = 0; - qRegisterMetaType("SlideShowSettings*", &qax_pointer); - qRegisterMetaType("SlideShowSettings", qax_pointer); - QVariant qax_result = property("SlideShowSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowSettings**)qax_result.constData(); -} - -inline PowerPoint::SlideShowWindow* Presentation::SlideShowWindow() const -{ - PowerPoint::SlideShowWindow* qax_pointer = 0; - qRegisterMetaType("SlideShowWindow*", &qax_pointer); - qRegisterMetaType("SlideShowWindow", qax_pointer); - QVariant qax_result = property("SlideShowWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindow**)qax_result.constData(); -} - -inline PowerPoint::Slides* Presentation::Slides() const -{ - PowerPoint::Slides* qax_pointer = 0; - qRegisterMetaType("Slides*", &qax_pointer); - qRegisterMetaType("Slides", qax_pointer); - QVariant qax_result = property("Slides"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Slides**)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::SnapToGrid() const -{ - QVariant qax_result = property("SnapToGrid"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Presentation::SetSnapToGrid(Office::MsoTriState value){ setProperty("SnapToGrid", QVariant(value)); } - -inline Office::Sync* Presentation::Sync() const -{ - Office::Sync* qax_pointer = 0; - qRegisterMetaType("Office::Sync*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Sync", qax_pointer); -#endif - QVariant qax_result = property("Sync"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Sync**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Tags* Presentation::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline QString Presentation::TemplateName() const -{ - QVariant qax_result = property("TemplateName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::_Master* Presentation::TitleMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("TitleMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline Office::MsoTriState Presentation::VBASigned() const -{ - QVariant qax_result = property("VBASigned"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline VBIDE::VBProject* Presentation::VBProject() const -{ - VBIDE::VBProject* qax_pointer = 0; - qRegisterMetaType("VBIDE::VBProject*", &qax_pointer); -#ifdef QAX_DUMPCPP_VBIDE_H - qRegisterMetaType("VBIDE::VBProject", qax_pointer); -#endif - QVariant qax_result = property("VBProject"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_VBIDE_H - return *(VBIDE::VBProject**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::WebOptions* Presentation::WebOptions() const -{ - PowerPoint::WebOptions* qax_pointer = 0; - qRegisterMetaType("WebOptions*", &qax_pointer); - qRegisterMetaType("WebOptions", qax_pointer); - QVariant qax_result = property("WebOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::WebOptions**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindows* Presentation::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - -inline QString Presentation::WritePassword() const -{ - QVariant qax_result = property("WritePassword"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Presentation::SetWritePassword(const QString& value){ setProperty("WritePassword", QVariant(value)); } - -inline void Presentation::AddBaseline() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Presentation::AddBaseline(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline PowerPoint::_Master* Presentation::AddTitleMaster() -{ - PowerPoint::_Master* qax_result = 0; - qRegisterMetaType("_Master*", &qax_result); - qRegisterMetaType("_Master", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void Presentation::AddToFavorites() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void Presentation::ApplyTemplate(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline bool Presentation::CanCheckIn() -{ - bool qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline void Presentation::CheckIn() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void Presentation::CheckIn(bool SaveChanges) -{ - void *_a[] = {0, (void*)&SaveChanges}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void Presentation::CheckIn(bool SaveChanges, const QVariant& Comments) -{ - void *_a[] = {0, (void*)&SaveChanges, (void*)&Comments}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void Presentation::CheckIn(bool SaveChanges, const QVariant& Comments, const QVariant& MakePublic) -{ - void *_a[] = {0, (void*)&SaveChanges, (void*)&Comments, (void*)&MakePublic}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void Presentation::Close() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void Presentation::EndReview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void Presentation::Export(const QString& Path, const QString& FilterName) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void Presentation::Export(const QString& Path, const QString& FilterName, int ScaleWidth) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void Presentation::Export(const QString& Path, const QString& FilterName, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address) -{ - void *_a[] = {0, (void*)&Address}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo, (void*)&Method}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method, const QString& HeaderInfo) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo, (void*)&Method, (void*)&HeaderInfo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void Presentation::MakeIntoTemplate(Office::MsoTriState IsDesignTemplate) -{ - void *_a[] = {0, (void*)&IsDesignTemplate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void Presentation::Merge(const QString& Path) -{ - void *_a[] = {0, (void*)&Path}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline PowerPoint::DocumentWindow* Presentation::NewWindow() -{ - PowerPoint::DocumentWindow* qax_result = 0; - qRegisterMetaType("DocumentWindow*", &qax_result); - qRegisterMetaType("DocumentWindow", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline void Presentation::PrintOut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void Presentation::PrintOut(int From) -{ - void *_a[] = {0, (void*)&From}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void Presentation::PrintOut(int From, int To) -{ - void *_a[] = {0, (void*)&From, (void*)&To}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); -} - -inline void Presentation::PrintOut(int From, int To, const QString& PrintToFile) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline void Presentation::PrintOut(int From, int To, const QString& PrintToFile, int Copies) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline void Presentation::PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies, (void*)&Collate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); -} - -inline void Presentation::ReloadAs(Office::MsoEncoding cp) -{ - void *_a[] = {0, (void*)&cp}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); -} - -inline void Presentation::RemoveBaseline() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); -} - -inline void Presentation::ReplyWithChanges() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); -} - -inline void Presentation::ReplyWithChanges(bool ShowMessage) -{ - void *_a[] = {0, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); -} - -inline void Presentation::Save() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); -} - -inline void Presentation::SaveAs(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); -} - -inline void Presentation::SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); -} - -inline void Presentation::SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat, (void*)&EmbedTrueTypeFonts}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); -} - -inline void Presentation::SaveCopyAs(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - -inline void Presentation::SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); -} - -inline void Presentation::SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat, (void*)&EmbedTrueTypeFonts}; - qt_metacall(QMetaObject::InvokeMetaMethod, 48, _a); -} - -inline void Presentation::SendFaxOverInternet() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); -} - -inline void Presentation::SendFaxOverInternet(const QString& Recipients) -{ - void *_a[] = {0, (void*)&Recipients}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); -} - -inline void Presentation::SendFaxOverInternet(const QString& Recipients, const QString& Subject) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); -} - -inline void Presentation::SendFaxOverInternet(const QString& Recipients, const QString& Subject, bool ShowMessage) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); -} - -inline void Presentation::SendForReview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); -} - -inline void Presentation::SendForReview(const QString& Recipients) -{ - void *_a[] = {0, (void*)&Recipients}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); -} - -inline void Presentation::SendForReview(const QString& Recipients, const QString& Subject) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); -} - -inline void Presentation::SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); -} - -inline void Presentation::SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage, const QVariant& IncludeAttachment) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage, (void*)&IncludeAttachment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 57, _a); -} - -inline void Presentation::SetPasswordEncryptionOptions(const QString& PasswordEncryptionProvider, const QString& PasswordEncryptionAlgorithm, int PasswordEncryptionKeyLength, bool PasswordEncryptionFileProperties) -{ - void *_a[] = {0, (void*)&PasswordEncryptionProvider, (void*)&PasswordEncryptionAlgorithm, (void*)&PasswordEncryptionKeyLength, (void*)&PasswordEncryptionFileProperties}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); -} - -inline void Presentation::SetUndoText(const QString& Text) -{ - void *_a[] = {0, (void*)&Text}; - qt_metacall(QMetaObject::InvokeMetaMethod, 72, _a); -} - -inline void Presentation::Unused() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 74, _a); -} - -inline void Presentation::UpdateLinks() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 75, _a); -} - -inline void Presentation::WebPagePreview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 76, _a); -} - -inline void Presentation::sblt(const QString& s) -{ - void *_a[] = {0, (void*)&s}; - qt_metacall(QMetaObject::InvokeMetaMethod, 77, _a); -} - - -inline PowerPoint::Application* Hyperlinks::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Hyperlinks::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Hyperlinks::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Hyperlinks::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Hyperlink* Hyperlinks::Item(int Index) -{ - PowerPoint::Hyperlink* qax_result = 0; - qRegisterMetaType("Hyperlink*", &qax_result); - qRegisterMetaType("Hyperlink", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant Hyperlinks::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline QString Hyperlink::Address() const -{ - QVariant qax_result = property("Address"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Hyperlink::SetAddress(const QString& value){ setProperty("Address", QVariant(value)); } - -inline PowerPoint::Application* Hyperlink::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString Hyperlink::EmailSubject() const -{ - QVariant qax_result = property("EmailSubject"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Hyperlink::SetEmailSubject(const QString& value){ setProperty("EmailSubject", QVariant(value)); } - -inline IDispatch* Hyperlink::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString Hyperlink::ScreenTip() const -{ - QVariant qax_result = property("ScreenTip"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Hyperlink::SetScreenTip(const QString& value){ setProperty("ScreenTip", QVariant(value)); } - -inline Office::MsoTriState Hyperlink::ShowAndReturn() const -{ - QVariant qax_result = property("ShowAndReturn"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Hyperlink::SetShowAndReturn(Office::MsoTriState value){ setProperty("ShowAndReturn", QVariant(value)); } - -inline QString Hyperlink::SubAddress() const -{ - QVariant qax_result = property("SubAddress"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Hyperlink::SetSubAddress(const QString& value){ setProperty("SubAddress", QVariant(value)); } - -inline QString Hyperlink::TextToDisplay() const -{ - QVariant qax_result = property("TextToDisplay"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Hyperlink::SetTextToDisplay(const QString& value){ setProperty("TextToDisplay", QVariant(value)); } - -inline Office::MsoHyperlinkType Hyperlink::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoHyperlinkType*)qax_result.constData(); -} - -inline void Hyperlink::AddToFavorites() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Hyperlink::CreateNewDocument(const QString& FileName, Office::MsoTriState EditNow, Office::MsoTriState Overwrite) -{ - void *_a[] = {0, (void*)&FileName, (void*)&EditNow, (void*)&Overwrite}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Hyperlink::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Hyperlink::Follow() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline PowerPoint::Application* PageSetup::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int PageSetup::FirstSlideNumber() const -{ - QVariant qax_result = property("FirstSlideNumber"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PageSetup::SetFirstSlideNumber(int value){ setProperty("FirstSlideNumber", QVariant(value)); } - -inline Office::MsoOrientation PageSetup::NotesOrientation() const -{ - QVariant qax_result = property("NotesOrientation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoOrientation*)qax_result.constData(); -} -inline void PageSetup::SetNotesOrientation(Office::MsoOrientation value){ setProperty("NotesOrientation", QVariant(value)); } - -inline IDispatch* PageSetup::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double PageSetup::SlideHeight() const -{ - QVariant qax_result = property("SlideHeight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PageSetup::SetSlideHeight(double value){ setProperty("SlideHeight", QVariant(value)); } - -inline Office::MsoOrientation PageSetup::SlideOrientation() const -{ - QVariant qax_result = property("SlideOrientation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoOrientation*)qax_result.constData(); -} -inline void PageSetup::SetSlideOrientation(Office::MsoOrientation value){ setProperty("SlideOrientation", QVariant(value)); } - -inline PowerPoint::PpSlideSizeType PageSetup::SlideSize() const -{ - QVariant qax_result = property("SlideSize"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideSizeType*)qax_result.constData(); -} -inline void PageSetup::SetSlideSize(PowerPoint::PpSlideSizeType value){ setProperty("SlideSize", QVariant(value)); } - -inline double PageSetup::SlideWidth() const -{ - QVariant qax_result = property("SlideWidth"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PageSetup::SetSlideWidth(double value){ setProperty("SlideWidth", QVariant(value)); } - - -inline PowerPoint::Application* Fonts::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Fonts::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Fonts::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Fonts::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Font* Fonts::Item(const QVariant& Index) -{ - PowerPoint::Font* qax_result = 0; - qRegisterMetaType("Font*", &qax_result); - qRegisterMetaType("Font", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void Fonts::Replace(const QString& Original, const QString& Replacement) -{ - void *_a[] = {0, (void*)&Original, (void*)&Replacement}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline QVariant Fonts::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline PowerPoint::Application* ExtraColors::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int ExtraColors::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ExtraColors::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ExtraColors::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void ExtraColors::Add(int Type) -{ - void *_a[] = {0, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline int ExtraColors::Item(int Index) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline QVariant ExtraColors::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline PowerPoint::Application* Slides::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Slides::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Slides::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Slides::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Slide* Slides::Add(int Index, PowerPoint::PpSlideLayout Layout) -{ - PowerPoint::Slide* qax_result = 0; - qRegisterMetaType("Slide*", &qax_result); - qRegisterMetaType("Slide", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&Layout}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Slide* Slides::FindBySlideID(int SlideID) -{ - PowerPoint::Slide* qax_result = 0; - qRegisterMetaType("Slide*", &qax_result); - qRegisterMetaType("Slide", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SlideID}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline int Slides::InsertFromFile(const QString& FileName, int Index) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline int Slides::InsertFromFile(const QString& FileName, int Index, int SlideStart) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Index, (void*)&SlideStart}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline int Slides::InsertFromFile(const QString& FileName, int Index, int SlideStart, int SlideEnd) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Index, (void*)&SlideStart, (void*)&SlideEnd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Slide* Slides::Item(const QVariant& Index) -{ - PowerPoint::Slide* qax_result = 0; - qRegisterMetaType("Slide*", &qax_result); - qRegisterMetaType("Slide", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::SlideRange* Slides::Paste() -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline PowerPoint::SlideRange* Slides::Paste(int Index) -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::SlideRange* Slides::Range() -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::SlideRange* Slides::Range(const QVariant& Index) -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline QVariant Slides::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - - -inline PowerPoint::Application* _Slide::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* _Slide::Background() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* _Slide::ColorScheme() const -{ - PowerPoint::ColorScheme* qax_pointer = 0; - qRegisterMetaType("ColorScheme*", &qax_pointer); - qRegisterMetaType("ColorScheme", qax_pointer); - QVariant qax_result = property("ColorScheme"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorScheme**)qax_result.constData(); -} -inline void _Slide::SetColorScheme(PowerPoint::ColorScheme* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorScheme*", &value); - setProperty("ColorScheme", QVariant(typeId, &value)); -} - -inline PowerPoint::Comments* _Slide::Comments() const -{ - PowerPoint::Comments* qax_pointer = 0; - qRegisterMetaType("Comments*", &qax_pointer); - qRegisterMetaType("Comments", qax_pointer); - QVariant qax_result = property("Comments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Comments**)qax_result.constData(); -} - -inline PowerPoint::Design* _Slide::Design() const -{ - PowerPoint::Design* qax_pointer = 0; - qRegisterMetaType("Design*", &qax_pointer); - qRegisterMetaType("Design", qax_pointer); - QVariant qax_result = property("Design"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Design**)qax_result.constData(); -} -inline void _Slide::SetDesign(PowerPoint::Design* value){ - int typeId = qRegisterMetaType("PowerPoint::Design*", &value); - setProperty("Design", QVariant(typeId, &value)); -} - -inline Office::MsoTriState _Slide::DisplayMasterShapes() const -{ - QVariant qax_result = property("DisplayMasterShapes"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Slide::SetDisplayMasterShapes(Office::MsoTriState value){ setProperty("DisplayMasterShapes", QVariant(value)); } - -inline Office::MsoTriState _Slide::FollowMasterBackground() const -{ - QVariant qax_result = property("FollowMasterBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Slide::SetFollowMasterBackground(Office::MsoTriState value){ setProperty("FollowMasterBackground", QVariant(value)); } - -inline PowerPoint::HeadersFooters* _Slide::HeadersFooters() const -{ - PowerPoint::HeadersFooters* qax_pointer = 0; - qRegisterMetaType("HeadersFooters*", &qax_pointer); - qRegisterMetaType("HeadersFooters", qax_pointer); - QVariant qax_result = property("HeadersFooters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeadersFooters**)qax_result.constData(); -} - -inline PowerPoint::Hyperlinks* _Slide::Hyperlinks() const -{ - PowerPoint::Hyperlinks* qax_pointer = 0; - qRegisterMetaType("Hyperlinks*", &qax_pointer); - qRegisterMetaType("Hyperlinks", qax_pointer); - QVariant qax_result = property("Hyperlinks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlinks**)qax_result.constData(); -} - -inline PowerPoint::PpSlideLayout _Slide::Layout() const -{ - QVariant qax_result = property("Layout"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideLayout*)qax_result.constData(); -} -inline void _Slide::SetLayout(PowerPoint::PpSlideLayout value){ setProperty("Layout", QVariant(value)); } - -inline PowerPoint::_Master* _Slide::Master() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("Master"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline QString _Slide::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Slide::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline PowerPoint::SlideRange* _Slide::NotesPage() const -{ - PowerPoint::SlideRange* qax_pointer = 0; - qRegisterMetaType("SlideRange*", &qax_pointer); - qRegisterMetaType("SlideRange", qax_pointer); - QVariant qax_result = property("NotesPage"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideRange**)qax_result.constData(); -} - -inline IDispatch* _Slide::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int _Slide::PrintSteps() const -{ - QVariant qax_result = property("PrintSteps"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::Scripts* _Slide::Scripts() const -{ - Office::Scripts* qax_pointer = 0; - qRegisterMetaType("Office::Scripts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Scripts", qax_pointer); -#endif - QVariant qax_result = property("Scripts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Scripts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Shapes* _Slide::Shapes() const -{ - PowerPoint::Shapes* qax_pointer = 0; - qRegisterMetaType("Shapes*", &qax_pointer); - qRegisterMetaType("Shapes", qax_pointer); - QVariant qax_result = property("Shapes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shapes**)qax_result.constData(); -} - -inline int _Slide::SlideID() const -{ - QVariant qax_result = property("SlideID"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _Slide::SlideIndex() const -{ - QVariant qax_result = property("SlideIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int _Slide::SlideNumber() const -{ - QVariant qax_result = property("SlideNumber"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::SlideShowTransition* _Slide::SlideShowTransition() const -{ - PowerPoint::SlideShowTransition* qax_pointer = 0; - qRegisterMetaType("SlideShowTransition*", &qax_pointer); - qRegisterMetaType("SlideShowTransition", qax_pointer); - QVariant qax_result = property("SlideShowTransition"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowTransition**)qax_result.constData(); -} - -inline PowerPoint::Tags* _Slide::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline PowerPoint::TimeLine* _Slide::TimeLine() const -{ - PowerPoint::TimeLine* qax_pointer = 0; - qRegisterMetaType("TimeLine*", &qax_pointer); - qRegisterMetaType("TimeLine", qax_pointer); - QVariant qax_result = property("TimeLine"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TimeLine**)qax_result.constData(); -} - -inline void _Slide::ApplyTemplate(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void _Slide::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void _Slide::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void _Slide::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline PowerPoint::SlideRange* _Slide::Duplicate() -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void _Slide::Export(const QString& FileName, const QString& FilterName) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void _Slide::Export(const QString& FileName, const QString& FilterName, int ScaleWidth) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void _Slide::Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void _Slide::MoveTo(int toPos) -{ - void *_a[] = {0, (void*)&toPos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void _Slide::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - - -inline PowerPoint::Application* SlideRange::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* SlideRange::Background() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* SlideRange::ColorScheme() const -{ - PowerPoint::ColorScheme* qax_pointer = 0; - qRegisterMetaType("ColorScheme*", &qax_pointer); - qRegisterMetaType("ColorScheme", qax_pointer); - QVariant qax_result = property("ColorScheme"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorScheme**)qax_result.constData(); -} -inline void SlideRange::SetColorScheme(PowerPoint::ColorScheme* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorScheme*", &value); - setProperty("ColorScheme", QVariant(typeId, &value)); -} - -inline PowerPoint::Comments* SlideRange::Comments() const -{ - PowerPoint::Comments* qax_pointer = 0; - qRegisterMetaType("Comments*", &qax_pointer); - qRegisterMetaType("Comments", qax_pointer); - QVariant qax_result = property("Comments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Comments**)qax_result.constData(); -} - -inline int SlideRange::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Design* SlideRange::Design() const -{ - PowerPoint::Design* qax_pointer = 0; - qRegisterMetaType("Design*", &qax_pointer); - qRegisterMetaType("Design", qax_pointer); - QVariant qax_result = property("Design"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Design**)qax_result.constData(); -} -inline void SlideRange::SetDesign(PowerPoint::Design* value){ - int typeId = qRegisterMetaType("PowerPoint::Design*", &value); - setProperty("Design", QVariant(typeId, &value)); -} - -inline Office::MsoTriState SlideRange::DisplayMasterShapes() const -{ - QVariant qax_result = property("DisplayMasterShapes"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideRange::SetDisplayMasterShapes(Office::MsoTriState value){ setProperty("DisplayMasterShapes", QVariant(value)); } - -inline Office::MsoTriState SlideRange::FollowMasterBackground() const -{ - QVariant qax_result = property("FollowMasterBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideRange::SetFollowMasterBackground(Office::MsoTriState value){ setProperty("FollowMasterBackground", QVariant(value)); } - -inline PowerPoint::HeadersFooters* SlideRange::HeadersFooters() const -{ - PowerPoint::HeadersFooters* qax_pointer = 0; - qRegisterMetaType("HeadersFooters*", &qax_pointer); - qRegisterMetaType("HeadersFooters", qax_pointer); - QVariant qax_result = property("HeadersFooters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeadersFooters**)qax_result.constData(); -} - -inline PowerPoint::Hyperlinks* SlideRange::Hyperlinks() const -{ - PowerPoint::Hyperlinks* qax_pointer = 0; - qRegisterMetaType("Hyperlinks*", &qax_pointer); - qRegisterMetaType("Hyperlinks", qax_pointer); - QVariant qax_result = property("Hyperlinks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlinks**)qax_result.constData(); -} - -inline PowerPoint::PpSlideLayout SlideRange::Layout() const -{ - QVariant qax_result = property("Layout"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideLayout*)qax_result.constData(); -} -inline void SlideRange::SetLayout(PowerPoint::PpSlideLayout value){ setProperty("Layout", QVariant(value)); } - -inline PowerPoint::_Master* SlideRange::Master() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("Master"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline QString SlideRange::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SlideRange::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline PowerPoint::SlideRange* SlideRange::NotesPage() const -{ - PowerPoint::SlideRange* qax_pointer = 0; - qRegisterMetaType("SlideRange*", &qax_pointer); - qRegisterMetaType("SlideRange", qax_pointer); - QVariant qax_result = property("NotesPage"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideRange**)qax_result.constData(); -} - -inline IDispatch* SlideRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int SlideRange::PrintSteps() const -{ - QVariant qax_result = property("PrintSteps"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::Scripts* SlideRange::Scripts() const -{ - Office::Scripts* qax_pointer = 0; - qRegisterMetaType("Office::Scripts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Scripts", qax_pointer); -#endif - QVariant qax_result = property("Scripts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Scripts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Shapes* SlideRange::Shapes() const -{ - PowerPoint::Shapes* qax_pointer = 0; - qRegisterMetaType("Shapes*", &qax_pointer); - qRegisterMetaType("Shapes", qax_pointer); - QVariant qax_result = property("Shapes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shapes**)qax_result.constData(); -} - -inline int SlideRange::SlideID() const -{ - QVariant qax_result = property("SlideID"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SlideRange::SlideIndex() const -{ - QVariant qax_result = property("SlideIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int SlideRange::SlideNumber() const -{ - QVariant qax_result = property("SlideNumber"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::SlideShowTransition* SlideRange::SlideShowTransition() const -{ - PowerPoint::SlideShowTransition* qax_pointer = 0; - qRegisterMetaType("SlideShowTransition*", &qax_pointer); - qRegisterMetaType("SlideShowTransition", qax_pointer); - QVariant qax_result = property("SlideShowTransition"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowTransition**)qax_result.constData(); -} - -inline PowerPoint::Tags* SlideRange::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline PowerPoint::TimeLine* SlideRange::TimeLine() const -{ - PowerPoint::TimeLine* qax_pointer = 0; - qRegisterMetaType("TimeLine*", &qax_pointer); - qRegisterMetaType("TimeLine", qax_pointer); - QVariant qax_result = property("TimeLine"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TimeLine**)qax_result.constData(); -} - -inline IUnknown* SlideRange::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void SlideRange::ApplyTemplate(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SlideRange::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void SlideRange::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void SlideRange::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline PowerPoint::SlideRange* SlideRange::Duplicate() -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void SlideRange::Export(const QString& FileName, const QString& FilterName) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void SlideRange::Export(const QString& FileName, const QString& FilterName, int ScaleWidth) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void SlideRange::Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline PowerPoint::Slide* SlideRange::Item(const QVariant& Index) -{ - PowerPoint::Slide* qax_result = 0; - qRegisterMetaType("Slide*", &qax_result); - qRegisterMetaType("Slide", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void SlideRange::MoveTo(int toPos) -{ - void *_a[] = {0, (void*)&toPos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void SlideRange::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline QVariant SlideRange::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - - -inline PowerPoint::Application* _Master::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* _Master::Background() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* _Master::ColorScheme() const -{ - PowerPoint::ColorScheme* qax_pointer = 0; - qRegisterMetaType("ColorScheme*", &qax_pointer); - qRegisterMetaType("ColorScheme", qax_pointer); - QVariant qax_result = property("ColorScheme"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorScheme**)qax_result.constData(); -} -inline void _Master::SetColorScheme(PowerPoint::ColorScheme* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorScheme*", &value); - setProperty("ColorScheme", QVariant(typeId, &value)); -} - -inline PowerPoint::Design* _Master::Design() const -{ - PowerPoint::Design* qax_pointer = 0; - qRegisterMetaType("Design*", &qax_pointer); - qRegisterMetaType("Design", qax_pointer); - QVariant qax_result = property("Design"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Design**)qax_result.constData(); -} - -inline PowerPoint::HeadersFooters* _Master::HeadersFooters() const -{ - PowerPoint::HeadersFooters* qax_pointer = 0; - qRegisterMetaType("HeadersFooters*", &qax_pointer); - qRegisterMetaType("HeadersFooters", qax_pointer); - QVariant qax_result = property("HeadersFooters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeadersFooters**)qax_result.constData(); -} - -inline double _Master::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline PowerPoint::Hyperlinks* _Master::Hyperlinks() const -{ - PowerPoint::Hyperlinks* qax_pointer = 0; - qRegisterMetaType("Hyperlinks*", &qax_pointer); - qRegisterMetaType("Hyperlinks", qax_pointer); - QVariant qax_result = property("Hyperlinks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlinks**)qax_result.constData(); -} - -inline QString _Master::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Master::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* _Master::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Scripts* _Master::Scripts() const -{ - Office::Scripts* qax_pointer = 0; - qRegisterMetaType("Office::Scripts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Scripts", qax_pointer); -#endif - QVariant qax_result = property("Scripts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Scripts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Shapes* _Master::Shapes() const -{ - PowerPoint::Shapes* qax_pointer = 0; - qRegisterMetaType("Shapes*", &qax_pointer); - qRegisterMetaType("Shapes", qax_pointer); - QVariant qax_result = property("Shapes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shapes**)qax_result.constData(); -} - -inline PowerPoint::SlideShowTransition* _Master::SlideShowTransition() const -{ - PowerPoint::SlideShowTransition* qax_pointer = 0; - qRegisterMetaType("SlideShowTransition*", &qax_pointer); - qRegisterMetaType("SlideShowTransition", qax_pointer); - QVariant qax_result = property("SlideShowTransition"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowTransition**)qax_result.constData(); -} - -inline PowerPoint::TextStyles* _Master::TextStyles() const -{ - PowerPoint::TextStyles* qax_pointer = 0; - qRegisterMetaType("TextStyles*", &qax_pointer); - qRegisterMetaType("TextStyles", qax_pointer); - QVariant qax_result = property("TextStyles"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextStyles**)qax_result.constData(); -} - -inline PowerPoint::TimeLine* _Master::TimeLine() const -{ - PowerPoint::TimeLine* qax_pointer = 0; - qRegisterMetaType("TimeLine*", &qax_pointer); - qRegisterMetaType("TimeLine", qax_pointer); - QVariant qax_result = property("TimeLine"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TimeLine**)qax_result.constData(); -} - -inline double _Master::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline void _Master::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Slide::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* Slide::Background() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* Slide::ColorScheme() const -{ - PowerPoint::ColorScheme* qax_pointer = 0; - qRegisterMetaType("ColorScheme*", &qax_pointer); - qRegisterMetaType("ColorScheme", qax_pointer); - QVariant qax_result = property("ColorScheme"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorScheme**)qax_result.constData(); -} -inline void Slide::SetColorScheme(PowerPoint::ColorScheme* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorScheme*", &value); - setProperty("ColorScheme", QVariant(typeId, &value)); -} - -inline PowerPoint::Comments* Slide::Comments() const -{ - PowerPoint::Comments* qax_pointer = 0; - qRegisterMetaType("Comments*", &qax_pointer); - qRegisterMetaType("Comments", qax_pointer); - QVariant qax_result = property("Comments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Comments**)qax_result.constData(); -} - -inline PowerPoint::Design* Slide::Design() const -{ - PowerPoint::Design* qax_pointer = 0; - qRegisterMetaType("Design*", &qax_pointer); - qRegisterMetaType("Design", qax_pointer); - QVariant qax_result = property("Design"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Design**)qax_result.constData(); -} -inline void Slide::SetDesign(PowerPoint::Design* value){ - int typeId = qRegisterMetaType("PowerPoint::Design*", &value); - setProperty("Design", QVariant(typeId, &value)); -} - -inline Office::MsoTriState Slide::DisplayMasterShapes() const -{ - QVariant qax_result = property("DisplayMasterShapes"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Slide::SetDisplayMasterShapes(Office::MsoTriState value){ setProperty("DisplayMasterShapes", QVariant(value)); } - -inline Office::MsoTriState Slide::FollowMasterBackground() const -{ - QVariant qax_result = property("FollowMasterBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Slide::SetFollowMasterBackground(Office::MsoTriState value){ setProperty("FollowMasterBackground", QVariant(value)); } - -inline PowerPoint::HeadersFooters* Slide::HeadersFooters() const -{ - PowerPoint::HeadersFooters* qax_pointer = 0; - qRegisterMetaType("HeadersFooters*", &qax_pointer); - qRegisterMetaType("HeadersFooters", qax_pointer); - QVariant qax_result = property("HeadersFooters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeadersFooters**)qax_result.constData(); -} - -inline PowerPoint::Hyperlinks* Slide::Hyperlinks() const -{ - PowerPoint::Hyperlinks* qax_pointer = 0; - qRegisterMetaType("Hyperlinks*", &qax_pointer); - qRegisterMetaType("Hyperlinks", qax_pointer); - QVariant qax_result = property("Hyperlinks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlinks**)qax_result.constData(); -} - -inline PowerPoint::PpSlideLayout Slide::Layout() const -{ - QVariant qax_result = property("Layout"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSlideLayout*)qax_result.constData(); -} -inline void Slide::SetLayout(PowerPoint::PpSlideLayout value){ setProperty("Layout", QVariant(value)); } - -inline PowerPoint::_Master* Slide::Master() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("Master"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline QString Slide::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Slide::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline PowerPoint::SlideRange* Slide::NotesPage() const -{ - PowerPoint::SlideRange* qax_pointer = 0; - qRegisterMetaType("SlideRange*", &qax_pointer); - qRegisterMetaType("SlideRange", qax_pointer); - QVariant qax_result = property("NotesPage"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideRange**)qax_result.constData(); -} - -inline IDispatch* Slide::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Slide::PrintSteps() const -{ - QVariant qax_result = property("PrintSteps"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::Scripts* Slide::Scripts() const -{ - Office::Scripts* qax_pointer = 0; - qRegisterMetaType("Office::Scripts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Scripts", qax_pointer); -#endif - QVariant qax_result = property("Scripts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Scripts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Shapes* Slide::Shapes() const -{ - PowerPoint::Shapes* qax_pointer = 0; - qRegisterMetaType("Shapes*", &qax_pointer); - qRegisterMetaType("Shapes", qax_pointer); - QVariant qax_result = property("Shapes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shapes**)qax_result.constData(); -} - -inline int Slide::SlideID() const -{ - QVariant qax_result = property("SlideID"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Slide::SlideIndex() const -{ - QVariant qax_result = property("SlideIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Slide::SlideNumber() const -{ - QVariant qax_result = property("SlideNumber"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::SlideShowTransition* Slide::SlideShowTransition() const -{ - PowerPoint::SlideShowTransition* qax_pointer = 0; - qRegisterMetaType("SlideShowTransition*", &qax_pointer); - qRegisterMetaType("SlideShowTransition", qax_pointer); - QVariant qax_result = property("SlideShowTransition"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowTransition**)qax_result.constData(); -} - -inline PowerPoint::Tags* Slide::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline PowerPoint::TimeLine* Slide::TimeLine() const -{ - PowerPoint::TimeLine* qax_pointer = 0; - qRegisterMetaType("TimeLine*", &qax_pointer); - qRegisterMetaType("TimeLine", qax_pointer); - QVariant qax_result = property("TimeLine"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TimeLine**)qax_result.constData(); -} - -inline void Slide::ApplyTemplate(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Slide::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Slide::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Slide::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline PowerPoint::SlideRange* Slide::Duplicate() -{ - PowerPoint::SlideRange* qax_result = 0; - qRegisterMetaType("SlideRange*", &qax_result); - qRegisterMetaType("SlideRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void Slide::Export(const QString& FileName, const QString& FilterName) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void Slide::Export(const QString& FileName, const QString& FilterName, int ScaleWidth) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void Slide::Export(const QString& FileName, const QString& FilterName, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FilterName, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void Slide::MoveTo(int toPos) -{ - void *_a[] = {0, (void*)&toPos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void Slide::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - - -inline PowerPoint::Application* ColorSchemes::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int ColorSchemes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ColorSchemes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ColorSchemes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* ColorSchemes::Add() -{ - PowerPoint::ColorScheme* qax_result = 0; - qRegisterMetaType("ColorScheme*", &qax_result); - qRegisterMetaType("ColorScheme", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::ColorScheme* ColorSchemes::Add(PowerPoint::ColorScheme* Scheme) -{ - PowerPoint::ColorScheme* qax_result = 0; - qRegisterMetaType("ColorScheme*", &qax_result); - qRegisterMetaType("ColorScheme", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Scheme}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::ColorScheme* ColorSchemes::Item(int Index) -{ - PowerPoint::ColorScheme* qax_result = 0; - qRegisterMetaType("ColorScheme*", &qax_result); - qRegisterMetaType("ColorScheme", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant ColorSchemes::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* ColorScheme::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int ColorScheme::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ColorScheme::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ColorScheme::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::RGBColor* ColorScheme::Colors(PowerPoint::PpColorSchemeIndex SchemeColor) -{ - PowerPoint::RGBColor* qax_result = 0; - qRegisterMetaType("RGBColor*", &qax_result); - qRegisterMetaType("RGBColor", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SchemeColor}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void ColorScheme::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline QVariant ColorScheme::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline PowerPoint::Application* RGBColor::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* RGBColor::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int RGBColor::RGB() const -{ - QVariant qax_result = property("RGB"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void RGBColor::SetRGB(int value){ setProperty("RGB", QVariant(value)); } - - -inline Office::MsoTriState SlideShowTransition::AdvanceOnClick() const -{ - QVariant qax_result = property("AdvanceOnClick"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowTransition::SetAdvanceOnClick(Office::MsoTriState value){ setProperty("AdvanceOnClick", QVariant(value)); } - -inline Office::MsoTriState SlideShowTransition::AdvanceOnTime() const -{ - QVariant qax_result = property("AdvanceOnTime"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowTransition::SetAdvanceOnTime(Office::MsoTriState value){ setProperty("AdvanceOnTime", QVariant(value)); } - -inline double SlideShowTransition::AdvanceTime() const -{ - QVariant qax_result = property("AdvanceTime"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void SlideShowTransition::SetAdvanceTime(double value){ setProperty("AdvanceTime", QVariant(value)); } - -inline PowerPoint::Application* SlideShowTransition::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpEntryEffect SlideShowTransition::EntryEffect() const -{ - QVariant qax_result = property("EntryEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpEntryEffect*)qax_result.constData(); -} -inline void SlideShowTransition::SetEntryEffect(PowerPoint::PpEntryEffect value){ setProperty("EntryEffect", QVariant(value)); } - -inline Office::MsoTriState SlideShowTransition::Hidden() const -{ - QVariant qax_result = property("Hidden"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowTransition::SetHidden(Office::MsoTriState value){ setProperty("Hidden", QVariant(value)); } - -inline Office::MsoTriState SlideShowTransition::LoopSoundUntilNext() const -{ - QVariant qax_result = property("LoopSoundUntilNext"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void SlideShowTransition::SetLoopSoundUntilNext(Office::MsoTriState value){ setProperty("LoopSoundUntilNext", QVariant(value)); } - -inline IDispatch* SlideShowTransition::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::SoundEffect* SlideShowTransition::SoundEffect() const -{ - PowerPoint::SoundEffect* qax_pointer = 0; - qRegisterMetaType("SoundEffect*", &qax_pointer); - qRegisterMetaType("SoundEffect", qax_pointer); - QVariant qax_result = property("SoundEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundEffect**)qax_result.constData(); -} - -inline PowerPoint::PpTransitionSpeed SlideShowTransition::Speed() const -{ - QVariant qax_result = property("Speed"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpTransitionSpeed*)qax_result.constData(); -} -inline void SlideShowTransition::SetSpeed(PowerPoint::PpTransitionSpeed value){ setProperty("Speed", QVariant(value)); } - - -inline PowerPoint::Application* SoundEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString SoundEffect::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void SoundEffect::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* SoundEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PpSoundEffectType SoundEffect::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSoundEffectType*)qax_result.constData(); -} -inline void SoundEffect::SetType(PowerPoint::PpSoundEffectType value){ setProperty("Type", QVariant(value)); } - -inline void SoundEffect::ImportFromFile(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void SoundEffect::Play() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline QString SoundFormat::SourceFullName() const -{ - QVariant qax_result = property("SourceFullName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::PpSoundFormatType SoundFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpSoundFormatType*)qax_result.constData(); -} - -inline PpSoundFormatType SoundFormat::Export(const QString& FileName) -{ - PpSoundFormatType qax_result; - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void SoundFormat::Import(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void SoundFormat::Play() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline PowerPoint::Application* HeadersFooters::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::HeaderFooter* HeadersFooters::DateAndTime() const -{ - PowerPoint::HeaderFooter* qax_pointer = 0; - qRegisterMetaType("HeaderFooter*", &qax_pointer); - qRegisterMetaType("HeaderFooter", qax_pointer); - QVariant qax_result = property("DateAndTime"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeaderFooter**)qax_result.constData(); -} - -inline Office::MsoTriState HeadersFooters::DisplayOnTitleSlide() const -{ - QVariant qax_result = property("DisplayOnTitleSlide"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void HeadersFooters::SetDisplayOnTitleSlide(Office::MsoTriState value){ setProperty("DisplayOnTitleSlide", QVariant(value)); } - -inline PowerPoint::HeaderFooter* HeadersFooters::Footer() const -{ - PowerPoint::HeaderFooter* qax_pointer = 0; - qRegisterMetaType("HeaderFooter*", &qax_pointer); - qRegisterMetaType("HeaderFooter", qax_pointer); - QVariant qax_result = property("Footer"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeaderFooter**)qax_result.constData(); -} - -inline PowerPoint::HeaderFooter* HeadersFooters::Header() const -{ - PowerPoint::HeaderFooter* qax_pointer = 0; - qRegisterMetaType("HeaderFooter*", &qax_pointer); - qRegisterMetaType("HeaderFooter", qax_pointer); - QVariant qax_result = property("Header"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeaderFooter**)qax_result.constData(); -} - -inline IDispatch* HeadersFooters::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::HeaderFooter* HeadersFooters::SlideNumber() const -{ - PowerPoint::HeaderFooter* qax_pointer = 0; - qRegisterMetaType("HeaderFooter*", &qax_pointer); - qRegisterMetaType("HeaderFooter", qax_pointer); - QVariant qax_result = property("SlideNumber"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeaderFooter**)qax_result.constData(); -} - -inline void HeadersFooters::Clear() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* Shapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Shapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Shapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState Shapes::HasTitle() const -{ - QVariant qax_result = property("HasTitle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline IDispatch* Shapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Placeholders* Shapes::Placeholders() const -{ - PowerPoint::Placeholders* qax_pointer = 0; - qRegisterMetaType("Placeholders*", &qax_pointer); - qRegisterMetaType("Placeholders", qax_pointer); - QVariant qax_result = property("Placeholders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Placeholders**)qax_result.constData(); -} - -inline PowerPoint::Shape* Shapes::Title() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Title"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline IUnknown* Shapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Shape* Shapes::AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddCanvas(double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddComment() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddComment(double Left) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddComment(double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddComment(double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddComment(double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddCurve(const QVariant& SafeArrayOfPoints) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddDiagram(Office::MsoDiagramType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddLine(double BeginX, double BeginY, double EndX, double EndY) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddMediaObject(const QString& FileName) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddMediaObject(const QString& FileName, double Left) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddMediaObject(const QString& FileName, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddMediaObject(const QString& FileName, double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddMediaObject(const QString& FileName, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName, (void*)&DisplayAsIcon}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName, (void*)&DisplayAsIcon, (void*)&IconFileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddOLEObject(double Left, double Top, double Width, double Height, const QString& ClassName, const QString& FileName, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height, (void*)&ClassName, (void*)&FileName, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel, (void*)&Link}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPlaceholder(PowerPoint::PpPlaceholderType Type) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPlaceholder(PowerPoint::PpPlaceholderType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddPolyline(const QVariant& SafeArrayOfPoints) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTable(int NumRows, int NumColumns) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NumRows, (void*)&NumColumns}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTable(int NumRows, int NumColumns, double Left) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NumRows, (void*)&NumColumns, (void*)&Left}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTable(int NumRows, int NumColumns, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NumRows, (void*)&NumColumns, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 48, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTable(int NumRows, int NumColumns, double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NumRows, (void*)&NumColumns, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTable(int NumRows, int NumColumns, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NumRows, (void*)&NumColumns, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&PresetTextEffect, (void*)&Text, (void*)&FontName, (void*)&FontSize, (void*)&FontBold, (void*)&FontItalic, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::AddTitle() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); - return qax_result; -} - -inline PowerPoint::FreeformBuilder* Shapes::BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1) -{ - PowerPoint::FreeformBuilder* qax_result = 0; - qRegisterMetaType("FreeformBuilder*", &qax_result); - qRegisterMetaType("FreeformBuilder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); - return qax_result; -} - -inline PowerPoint::Shape* Shapes::Item(const QVariant& Index) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::Paste() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 57, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 58, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon}; - qt_metacall(QMetaObject::InvokeMetaMethod, 59, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 61, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel}; - qt_metacall(QMetaObject::InvokeMetaMethod, 62, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel, (void*)&Link}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::Range() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* Shapes::Range(const QVariant& Index) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 65, _a); - return qax_result; -} - -inline void Shapes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 66, _a); -} - - -inline PowerPoint::Application* Placeholders::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Placeholders::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Placeholders::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Placeholders::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Shape* Placeholders::Item(int Index) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant Placeholders::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* PlaceholderFormat::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* PlaceholderFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PpPlaceholderType PlaceholderFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPlaceholderType*)qax_result.constData(); -} - - -inline IDispatch* FreeformBuilder::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int FreeformBuilder::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FreeformBuilder::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void FreeformBuilder::AddNodes(Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3) -{ - void *_a[] = {0, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3, (void*)&Y3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline PowerPoint::Shape* FreeformBuilder::ConvertToShape() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - - -inline PowerPoint::ActionSettings* Shape::ActionSettings() const -{ - PowerPoint::ActionSettings* qax_pointer = 0; - qRegisterMetaType("ActionSettings*", &qax_pointer); - qRegisterMetaType("ActionSettings", qax_pointer); - QVariant qax_result = property("ActionSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ActionSettings**)qax_result.constData(); -} - -inline PowerPoint::Adjustments* Shape::Adjustments() const -{ - PowerPoint::Adjustments* qax_pointer = 0; - qRegisterMetaType("Adjustments*", &qax_pointer); - qRegisterMetaType("Adjustments", qax_pointer); - QVariant qax_result = property("Adjustments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Adjustments**)qax_result.constData(); -} - -inline QString Shape::AlternativeText() const -{ - QVariant qax_result = property("AlternativeText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetAlternativeText(const QString& value){ setProperty("AlternativeText", QVariant(value)); } - -inline PowerPoint::AnimationSettings* Shape::AnimationSettings() const -{ - PowerPoint::AnimationSettings* qax_pointer = 0; - qRegisterMetaType("AnimationSettings*", &qax_pointer); - qRegisterMetaType("AnimationSettings", qax_pointer); - QVariant qax_result = property("AnimationSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AnimationSettings**)qax_result.constData(); -} - -inline IDispatch* Shape::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoAutoShapeType Shape::AutoShapeType() const -{ - QVariant qax_result = property("AutoShapeType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutoShapeType*)qax_result.constData(); -} -inline void Shape::SetAutoShapeType(Office::MsoAutoShapeType value){ setProperty("AutoShapeType", QVariant(value)); } - -inline Office::MsoBlackWhiteMode Shape::BlackWhiteMode() const -{ - QVariant qax_result = property("BlackWhiteMode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBlackWhiteMode*)qax_result.constData(); -} -inline void Shape::SetBlackWhiteMode(Office::MsoBlackWhiteMode value){ setProperty("BlackWhiteMode", QVariant(value)); } - -inline PowerPoint::CalloutFormat* Shape::Callout() const -{ - PowerPoint::CalloutFormat* qax_pointer = 0; - qRegisterMetaType("CalloutFormat*", &qax_pointer); - qRegisterMetaType("CalloutFormat", qax_pointer); - QVariant qax_result = property("Callout"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CalloutFormat**)qax_result.constData(); -} - -inline PowerPoint::CanvasShapes* Shape::CanvasItems() const -{ - PowerPoint::CanvasShapes* qax_pointer = 0; - qRegisterMetaType("CanvasShapes*", &qax_pointer); - qRegisterMetaType("CanvasShapes", qax_pointer); - QVariant qax_result = property("CanvasItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CanvasShapes**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Child() const -{ - QVariant qax_result = property("Child"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int Shape::ConnectionSiteCount() const -{ - QVariant qax_result = property("ConnectionSiteCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Connector() const -{ - QVariant qax_result = property("Connector"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::ConnectorFormat* Shape::ConnectorFormat() const -{ - PowerPoint::ConnectorFormat* qax_pointer = 0; - qRegisterMetaType("ConnectorFormat*", &qax_pointer); - qRegisterMetaType("ConnectorFormat", qax_pointer); - QVariant qax_result = property("ConnectorFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ConnectorFormat**)qax_result.constData(); -} - -inline int Shape::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Diagram* Shape::Diagram() const -{ - PowerPoint::Diagram* qax_pointer = 0; - qRegisterMetaType("Diagram*", &qax_pointer); - qRegisterMetaType("Diagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Diagram**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* Shape::DiagramNode() const -{ - PowerPoint::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("DiagramNode"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNode**)qax_result.constData(); -} - -inline PowerPoint::FillFormat* Shape::Fill() const -{ - PowerPoint::FillFormat* qax_pointer = 0; - qRegisterMetaType("FillFormat*", &qax_pointer); - qRegisterMetaType("FillFormat", qax_pointer); - QVariant qax_result = property("Fill"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::FillFormat**)qax_result.constData(); -} - -inline PowerPoint::GroupShapes* Shape::GroupItems() const -{ - PowerPoint::GroupShapes* qax_pointer = 0; - qRegisterMetaType("GroupShapes*", &qax_pointer); - qRegisterMetaType("GroupShapes", qax_pointer); - QVariant qax_result = property("GroupItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::GroupShapes**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasDiagram() const -{ - QVariant qax_result = property("HasDiagram"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasDiagramNode() const -{ - QVariant qax_result = property("HasDiagramNode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasTable() const -{ - QVariant qax_result = property("HasTable"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::HasTextFrame() const -{ - QVariant qax_result = property("HasTextFrame"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline double Shape::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::MsoTriState Shape::HorizontalFlip() const -{ - QVariant qax_result = property("HorizontalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int Shape::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double Shape::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline PowerPoint::LineFormat* Shape::Line() const -{ - PowerPoint::LineFormat* qax_pointer = 0; - qRegisterMetaType("LineFormat*", &qax_pointer); - qRegisterMetaType("LineFormat", qax_pointer); - QVariant qax_result = property("Line"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::LineFormat**)qax_result.constData(); -} - -inline PowerPoint::LinkFormat* Shape::LinkFormat() const -{ - PowerPoint::LinkFormat* qax_pointer = 0; - qRegisterMetaType("LinkFormat*", &qax_pointer); - qRegisterMetaType("LinkFormat", qax_pointer); - QVariant qax_result = property("LinkFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::LinkFormat**)qax_result.constData(); -} - -inline Office::MsoTriState Shape::LockAspectRatio() const -{ - QVariant qax_result = property("LockAspectRatio"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Shape::SetLockAspectRatio(Office::MsoTriState value){ setProperty("LockAspectRatio", QVariant(value)); } - -inline PowerPoint::PpMediaType Shape::MediaType() const -{ - QVariant qax_result = property("MediaType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpMediaType*)qax_result.constData(); -} - -inline QString Shape::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline PowerPoint::ShapeNodes* Shape::Nodes() const -{ - PowerPoint::ShapeNodes* qax_pointer = 0; - qRegisterMetaType("ShapeNodes*", &qax_pointer); - qRegisterMetaType("ShapeNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeNodes**)qax_result.constData(); -} - -inline PowerPoint::OLEFormat* Shape::OLEFormat() const -{ - PowerPoint::OLEFormat* qax_pointer = 0; - qRegisterMetaType("OLEFormat*", &qax_pointer); - qRegisterMetaType("OLEFormat", qax_pointer); - QVariant qax_result = property("OLEFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::OLEFormat**)qax_result.constData(); -} - -inline IDispatch* Shape::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Shape* Shape::ParentGroup() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("ParentGroup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::PictureFormat* Shape::PictureFormat() const -{ - PowerPoint::PictureFormat* qax_pointer = 0; - qRegisterMetaType("PictureFormat*", &qax_pointer); - qRegisterMetaType("PictureFormat", qax_pointer); - QVariant qax_result = property("PictureFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PictureFormat**)qax_result.constData(); -} - -inline PowerPoint::PlaceholderFormat* Shape::PlaceholderFormat() const -{ - PowerPoint::PlaceholderFormat* qax_pointer = 0; - qRegisterMetaType("PlaceholderFormat*", &qax_pointer); - qRegisterMetaType("PlaceholderFormat", qax_pointer); - QVariant qax_result = property("PlaceholderFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PlaceholderFormat**)qax_result.constData(); -} - -inline QString Shape::RTF() const -{ - QVariant qax_result = property("RTF"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Shape::SetRTF(const QString& value){ setProperty("RTF", QVariant(value)); } - -inline double Shape::Rotation() const -{ - QVariant qax_result = property("Rotation"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetRotation(double value){ setProperty("Rotation", QVariant(value)); } - -inline Office::Script* Shape::Script() const -{ - Office::Script* qax_pointer = 0; - qRegisterMetaType("Office::Script*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Script", qax_pointer); -#endif - QVariant qax_result = property("Script"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Script**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::ShadowFormat* Shape::Shadow() const -{ - PowerPoint::ShadowFormat* qax_pointer = 0; - qRegisterMetaType("ShadowFormat*", &qax_pointer); - qRegisterMetaType("ShadowFormat", qax_pointer); - QVariant qax_result = property("Shadow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShadowFormat**)qax_result.constData(); -} - -inline PowerPoint::SoundFormat* Shape::SoundFormat() const -{ - PowerPoint::SoundFormat* qax_pointer = 0; - qRegisterMetaType("SoundFormat*", &qax_pointer); - qRegisterMetaType("SoundFormat", qax_pointer); - QVariant qax_result = property("SoundFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundFormat**)qax_result.constData(); -} - -inline PowerPoint::Table* Shape::Table() const -{ - PowerPoint::Table* qax_pointer = 0; - qRegisterMetaType("Table*", &qax_pointer); - qRegisterMetaType("Table", qax_pointer); - QVariant qax_result = property("Table"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Table**)qax_result.constData(); -} - -inline PowerPoint::Tags* Shape::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline PowerPoint::TextEffectFormat* Shape::TextEffect() const -{ - PowerPoint::TextEffectFormat* qax_pointer = 0; - qRegisterMetaType("TextEffectFormat*", &qax_pointer); - qRegisterMetaType("TextEffectFormat", qax_pointer); - QVariant qax_result = property("TextEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextEffectFormat**)qax_result.constData(); -} - -inline PowerPoint::TextFrame* Shape::TextFrame() const -{ - PowerPoint::TextFrame* qax_pointer = 0; - qRegisterMetaType("TextFrame*", &qax_pointer); - qRegisterMetaType("TextFrame", qax_pointer); - QVariant qax_result = property("TextFrame"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextFrame**)qax_result.constData(); -} - -inline PowerPoint::ThreeDFormat* Shape::ThreeD() const -{ - PowerPoint::ThreeDFormat* qax_pointer = 0; - qRegisterMetaType("ThreeDFormat*", &qax_pointer); - qRegisterMetaType("ThreeDFormat", qax_pointer); - QVariant qax_result = property("ThreeD"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ThreeDFormat**)qax_result.constData(); -} - -inline double Shape::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline Office::MsoShapeType Shape::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShapeType*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::VerticalFlip() const -{ - QVariant qax_result = property("VerticalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline QVariant Shape::Vertices() const -{ - QVariant qax_result = property("Vertices"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoTriState Shape::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Shape::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double Shape::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Shape::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int Shape::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline void Shape::Apply() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Shape::CanvasCropBottom(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Shape::CanvasCropLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Shape::CanvasCropRight(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void Shape::CanvasCropTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void Shape::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void Shape::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void Shape::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline PowerPoint::ShapeRange* Shape::Duplicate() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void Shape::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void Shape::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void Shape::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void Shape::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight, PowerPoint::PpExportMode ExportMode) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth, (void*)&ScaleHeight, (void*)&ExportMode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void Shape::Flip(Office::MsoFlipCmd FlipCmd) -{ - void *_a[] = {0, (void*)&FlipCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void Shape::IncrementLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void Shape::IncrementRotation(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void Shape::IncrementTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void Shape::PickUp() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void Shape::RerouteConnections() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void Shape::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void Shape::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void Shape::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void Shape::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void Shape::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline void Shape::Select(Office::MsoTriState Replace) -{ - void *_a[] = {0, (void*)&Replace}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void Shape::SetShapesDefaultProperties() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); -} - -inline PowerPoint::ShapeRange* Shape::Ungroup() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); - return qax_result; -} - -inline void Shape::ZOrder(Office::MsoZOrderCmd ZOrderCmd) -{ - void *_a[] = {0, (void*)&ZOrderCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - - -inline PowerPoint::ActionSettings* ShapeRange::ActionSettings() const -{ - PowerPoint::ActionSettings* qax_pointer = 0; - qRegisterMetaType("ActionSettings*", &qax_pointer); - qRegisterMetaType("ActionSettings", qax_pointer); - QVariant qax_result = property("ActionSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ActionSettings**)qax_result.constData(); -} - -inline PowerPoint::Adjustments* ShapeRange::Adjustments() const -{ - PowerPoint::Adjustments* qax_pointer = 0; - qRegisterMetaType("Adjustments*", &qax_pointer); - qRegisterMetaType("Adjustments", qax_pointer); - QVariant qax_result = property("Adjustments"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Adjustments**)qax_result.constData(); -} - -inline QString ShapeRange::AlternativeText() const -{ - QVariant qax_result = property("AlternativeText"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetAlternativeText(const QString& value){ setProperty("AlternativeText", QVariant(value)); } - -inline PowerPoint::AnimationSettings* ShapeRange::AnimationSettings() const -{ - PowerPoint::AnimationSettings* qax_pointer = 0; - qRegisterMetaType("AnimationSettings*", &qax_pointer); - qRegisterMetaType("AnimationSettings", qax_pointer); - QVariant qax_result = property("AnimationSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AnimationSettings**)qax_result.constData(); -} - -inline IDispatch* ShapeRange::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoAutoShapeType ShapeRange::AutoShapeType() const -{ - QVariant qax_result = property("AutoShapeType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoAutoShapeType*)qax_result.constData(); -} -inline void ShapeRange::SetAutoShapeType(Office::MsoAutoShapeType value){ setProperty("AutoShapeType", QVariant(value)); } - -inline Office::MsoBlackWhiteMode ShapeRange::BlackWhiteMode() const -{ - QVariant qax_result = property("BlackWhiteMode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoBlackWhiteMode*)qax_result.constData(); -} -inline void ShapeRange::SetBlackWhiteMode(Office::MsoBlackWhiteMode value){ setProperty("BlackWhiteMode", QVariant(value)); } - -inline PowerPoint::CalloutFormat* ShapeRange::Callout() const -{ - PowerPoint::CalloutFormat* qax_pointer = 0; - qRegisterMetaType("CalloutFormat*", &qax_pointer); - qRegisterMetaType("CalloutFormat", qax_pointer); - QVariant qax_result = property("Callout"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CalloutFormat**)qax_result.constData(); -} - -inline PowerPoint::CanvasShapes* ShapeRange::CanvasItems() const -{ - PowerPoint::CanvasShapes* qax_pointer = 0; - qRegisterMetaType("CanvasShapes*", &qax_pointer); - qRegisterMetaType("CanvasShapes", qax_pointer); - QVariant qax_result = property("CanvasItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CanvasShapes**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Child() const -{ - QVariant qax_result = property("Child"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int ShapeRange::ConnectionSiteCount() const -{ - QVariant qax_result = property("ConnectionSiteCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Connector() const -{ - QVariant qax_result = property("Connector"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::ConnectorFormat* ShapeRange::ConnectorFormat() const -{ - PowerPoint::ConnectorFormat* qax_pointer = 0; - qRegisterMetaType("ConnectorFormat*", &qax_pointer); - qRegisterMetaType("ConnectorFormat", qax_pointer); - QVariant qax_result = property("ConnectorFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ConnectorFormat**)qax_result.constData(); -} - -inline int ShapeRange::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ShapeRange::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Diagram* ShapeRange::Diagram() const -{ - PowerPoint::Diagram* qax_pointer = 0; - qRegisterMetaType("Diagram*", &qax_pointer); - qRegisterMetaType("Diagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Diagram**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* ShapeRange::DiagramNode() const -{ - PowerPoint::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("DiagramNode"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNode**)qax_result.constData(); -} - -inline PowerPoint::FillFormat* ShapeRange::Fill() const -{ - PowerPoint::FillFormat* qax_pointer = 0; - qRegisterMetaType("FillFormat*", &qax_pointer); - qRegisterMetaType("FillFormat", qax_pointer); - QVariant qax_result = property("Fill"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::FillFormat**)qax_result.constData(); -} - -inline PowerPoint::GroupShapes* ShapeRange::GroupItems() const -{ - PowerPoint::GroupShapes* qax_pointer = 0; - qRegisterMetaType("GroupShapes*", &qax_pointer); - qRegisterMetaType("GroupShapes", qax_pointer); - QVariant qax_result = property("GroupItems"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::GroupShapes**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasDiagram() const -{ - QVariant qax_result = property("HasDiagram"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasDiagramNode() const -{ - QVariant qax_result = property("HasDiagramNode"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasTable() const -{ - QVariant qax_result = property("HasTable"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::HasTextFrame() const -{ - QVariant qax_result = property("HasTextFrame"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline double ShapeRange::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline Office::MsoTriState ShapeRange::HorizontalFlip() const -{ - QVariant qax_result = property("HorizontalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int ShapeRange::Id() const -{ - QVariant qax_result = property("Id"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double ShapeRange::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline PowerPoint::LineFormat* ShapeRange::Line() const -{ - PowerPoint::LineFormat* qax_pointer = 0; - qRegisterMetaType("LineFormat*", &qax_pointer); - qRegisterMetaType("LineFormat", qax_pointer); - QVariant qax_result = property("Line"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::LineFormat**)qax_result.constData(); -} - -inline PowerPoint::LinkFormat* ShapeRange::LinkFormat() const -{ - PowerPoint::LinkFormat* qax_pointer = 0; - qRegisterMetaType("LinkFormat*", &qax_pointer); - qRegisterMetaType("LinkFormat", qax_pointer); - QVariant qax_result = property("LinkFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::LinkFormat**)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::LockAspectRatio() const -{ - QVariant qax_result = property("LockAspectRatio"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShapeRange::SetLockAspectRatio(Office::MsoTriState value){ setProperty("LockAspectRatio", QVariant(value)); } - -inline PowerPoint::PpMediaType ShapeRange::MediaType() const -{ - QVariant qax_result = property("MediaType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpMediaType*)qax_result.constData(); -} - -inline QString ShapeRange::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline PowerPoint::ShapeNodes* ShapeRange::Nodes() const -{ - PowerPoint::ShapeNodes* qax_pointer = 0; - qRegisterMetaType("ShapeNodes*", &qax_pointer); - qRegisterMetaType("ShapeNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeNodes**)qax_result.constData(); -} - -inline PowerPoint::OLEFormat* ShapeRange::OLEFormat() const -{ - PowerPoint::OLEFormat* qax_pointer = 0; - qRegisterMetaType("OLEFormat*", &qax_pointer); - qRegisterMetaType("OLEFormat", qax_pointer); - QVariant qax_result = property("OLEFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::OLEFormat**)qax_result.constData(); -} - -inline IDispatch* ShapeRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Shape* ShapeRange::ParentGroup() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("ParentGroup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::PictureFormat* ShapeRange::PictureFormat() const -{ - PowerPoint::PictureFormat* qax_pointer = 0; - qRegisterMetaType("PictureFormat*", &qax_pointer); - qRegisterMetaType("PictureFormat", qax_pointer); - QVariant qax_result = property("PictureFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PictureFormat**)qax_result.constData(); -} - -inline PowerPoint::PlaceholderFormat* ShapeRange::PlaceholderFormat() const -{ - PowerPoint::PlaceholderFormat* qax_pointer = 0; - qRegisterMetaType("PlaceholderFormat*", &qax_pointer); - qRegisterMetaType("PlaceholderFormat", qax_pointer); - QVariant qax_result = property("PlaceholderFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PlaceholderFormat**)qax_result.constData(); -} - -inline QString ShapeRange::RTF() const -{ - QVariant qax_result = property("RTF"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ShapeRange::SetRTF(const QString& value){ setProperty("RTF", QVariant(value)); } - -inline double ShapeRange::Rotation() const -{ - QVariant qax_result = property("Rotation"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetRotation(double value){ setProperty("Rotation", QVariant(value)); } - -inline Office::Script* ShapeRange::Script() const -{ - Office::Script* qax_pointer = 0; - qRegisterMetaType("Office::Script*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Script", qax_pointer); -#endif - QVariant qax_result = property("Script"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Script**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::ShadowFormat* ShapeRange::Shadow() const -{ - PowerPoint::ShadowFormat* qax_pointer = 0; - qRegisterMetaType("ShadowFormat*", &qax_pointer); - qRegisterMetaType("ShadowFormat", qax_pointer); - QVariant qax_result = property("Shadow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShadowFormat**)qax_result.constData(); -} - -inline PowerPoint::SoundFormat* ShapeRange::SoundFormat() const -{ - PowerPoint::SoundFormat* qax_pointer = 0; - qRegisterMetaType("SoundFormat*", &qax_pointer); - qRegisterMetaType("SoundFormat", qax_pointer); - QVariant qax_result = property("SoundFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundFormat**)qax_result.constData(); -} - -inline PowerPoint::Table* ShapeRange::Table() const -{ - PowerPoint::Table* qax_pointer = 0; - qRegisterMetaType("Table*", &qax_pointer); - qRegisterMetaType("Table", qax_pointer); - QVariant qax_result = property("Table"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Table**)qax_result.constData(); -} - -inline PowerPoint::Tags* ShapeRange::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline PowerPoint::TextEffectFormat* ShapeRange::TextEffect() const -{ - PowerPoint::TextEffectFormat* qax_pointer = 0; - qRegisterMetaType("TextEffectFormat*", &qax_pointer); - qRegisterMetaType("TextEffectFormat", qax_pointer); - QVariant qax_result = property("TextEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextEffectFormat**)qax_result.constData(); -} - -inline PowerPoint::TextFrame* ShapeRange::TextFrame() const -{ - PowerPoint::TextFrame* qax_pointer = 0; - qRegisterMetaType("TextFrame*", &qax_pointer); - qRegisterMetaType("TextFrame", qax_pointer); - QVariant qax_result = property("TextFrame"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextFrame**)qax_result.constData(); -} - -inline PowerPoint::ThreeDFormat* ShapeRange::ThreeD() const -{ - PowerPoint::ThreeDFormat* qax_pointer = 0; - qRegisterMetaType("ThreeDFormat*", &qax_pointer); - qRegisterMetaType("ThreeDFormat", qax_pointer); - QVariant qax_result = property("ThreeD"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ThreeDFormat**)qax_result.constData(); -} - -inline double ShapeRange::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline Office::MsoShapeType ShapeRange::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShapeType*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::VerticalFlip() const -{ - QVariant qax_result = property("VerticalFlip"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline QVariant ShapeRange::Vertices() const -{ - QVariant qax_result = property("Vertices"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoTriState ShapeRange::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShapeRange::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double ShapeRange::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShapeRange::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int ShapeRange::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IUnknown* ShapeRange::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void ShapeRange::Align(Office::MsoAlignCmd AlignCmd, Office::MsoTriState RelativeTo) -{ - void *_a[] = {0, (void*)&AlignCmd, (void*)&RelativeTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShapeRange::Apply() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ShapeRange::CanvasCropBottom(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ShapeRange::CanvasCropLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ShapeRange::CanvasCropRight(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void ShapeRange::CanvasCropTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ShapeRange::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void ShapeRange::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void ShapeRange::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void ShapeRange::Distribute(Office::MsoDistributeCmd DistributeCmd, Office::MsoTriState RelativeTo) -{ - void *_a[] = {0, (void*)&DistributeCmd, (void*)&RelativeTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline PowerPoint::ShapeRange* ShapeRange::Duplicate() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline void ShapeRange::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void ShapeRange::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void ShapeRange::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void ShapeRange::Export(const QString& PathName, PowerPoint::PpShapeFormat Filter, int ScaleWidth, int ScaleHeight, PowerPoint::PpExportMode ExportMode) -{ - void *_a[] = {0, (void*)&PathName, (void*)&Filter, (void*)&ScaleWidth, (void*)&ScaleHeight, (void*)&ExportMode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void ShapeRange::Flip(Office::MsoFlipCmd FlipCmd) -{ - void *_a[] = {0, (void*)&FlipCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void ShapeRange::GetPolygonalRepresentation(uint maxPointsInBuffer, double& pPoints, uint& numPointsInPolygon, Office::MsoTriState*& IsOpen) -{ - void *_a[] = {0, (void*)&maxPointsInBuffer, (void*)&pPoints, (void*)&numPointsInPolygon, (void*)&IsOpen}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline PowerPoint::Shape* ShapeRange::Group() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline void ShapeRange::IncrementLeft(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void ShapeRange::IncrementRotation(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void ShapeRange::IncrementTop(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline PowerPoint::Shape* ShapeRange::Item(const QVariant& Index) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline void ShapeRange::PickUp() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline PowerPoint::Shape* ShapeRange::Regroup() -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); - return qax_result; -} - -inline void ShapeRange::RerouteConnections() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline void ShapeRange::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void ShapeRange::ScaleHeight(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void ShapeRange::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); -} - -inline void ShapeRange::ScaleWidth(double Factor, Office::MsoTriState RelativeToOriginalSize, Office::MsoScaleFrom fScale) -{ - void *_a[] = {0, (void*)&Factor, (void*)&RelativeToOriginalSize, (void*)&fScale}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline void ShapeRange::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline void ShapeRange::Select(Office::MsoTriState Replace) -{ - void *_a[] = {0, (void*)&Replace}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); -} - -inline void ShapeRange::SetShapesDefaultProperties() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); -} - -inline PowerPoint::ShapeRange* ShapeRange::Ungroup() -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline void ShapeRange::ZOrder(Office::MsoZOrderCmd ZOrderCmd) -{ - void *_a[] = {0, (void*)&ZOrderCmd}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); -} - -inline QVariant ShapeRange::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); - return qax_result; -} - - -inline IDispatch* GroupShapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int GroupShapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int GroupShapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* GroupShapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* GroupShapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Shape* GroupShapes::Item(const QVariant& Index) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* GroupShapes::Range(const QVariant& Index) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline IDispatch* Adjustments::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Adjustments::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Adjustments::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Adjustments::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double Adjustments::Item(int Index) -{ - double qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline int Adjustments::SetItem(int Index, double rhs) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&rhs}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline IDispatch* PictureFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double PictureFormat::Brightness() const -{ - QVariant qax_result = property("Brightness"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetBrightness(double value){ setProperty("Brightness", QVariant(value)); } - -inline Office::MsoPictureColorType PictureFormat::ColorType() const -{ - QVariant qax_result = property("ColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPictureColorType*)qax_result.constData(); -} -inline void PictureFormat::SetColorType(Office::MsoPictureColorType value){ setProperty("ColorType", QVariant(value)); } - -inline double PictureFormat::Contrast() const -{ - QVariant qax_result = property("Contrast"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetContrast(double value){ setProperty("Contrast", QVariant(value)); } - -inline int PictureFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double PictureFormat::CropBottom() const -{ - QVariant qax_result = property("CropBottom"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropBottom(double value){ setProperty("CropBottom", QVariant(value)); } - -inline double PictureFormat::CropLeft() const -{ - QVariant qax_result = property("CropLeft"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropLeft(double value){ setProperty("CropLeft", QVariant(value)); } - -inline double PictureFormat::CropRight() const -{ - QVariant qax_result = property("CropRight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropRight(double value){ setProperty("CropRight", QVariant(value)); } - -inline double PictureFormat::CropTop() const -{ - QVariant qax_result = property("CropTop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void PictureFormat::SetCropTop(double value){ setProperty("CropTop", QVariant(value)); } - -inline IDispatch* PictureFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int PictureFormat::TransparencyColor() const -{ - QVariant qax_result = property("TransparencyColor"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PictureFormat::SetTransparencyColor(int value){ setProperty("TransparencyColor", QVariant(value)); } - -inline Office::MsoTriState PictureFormat::TransparentBackground() const -{ - QVariant qax_result = property("TransparentBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PictureFormat::SetTransparentBackground(Office::MsoTriState value){ setProperty("TransparentBackground", QVariant(value)); } - -inline void PictureFormat::IncrementBrightness(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void PictureFormat::IncrementContrast(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* FillFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* FillFormat::BackColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("BackColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} -inline void FillFormat::SetBackColor(PowerPoint::ColorFormat* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorFormat*", &value); - setProperty("BackColor", QVariant(typeId, &value)); -} - -inline int FillFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* FillFormat::ForeColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} -inline void FillFormat::SetForeColor(PowerPoint::ColorFormat* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoGradientColorType FillFormat::GradientColorType() const -{ - QVariant qax_result = property("GradientColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoGradientColorType*)qax_result.constData(); -} - -inline double FillFormat::GradientDegree() const -{ - QVariant qax_result = property("GradientDegree"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline Office::MsoGradientStyle FillFormat::GradientStyle() const -{ - QVariant qax_result = property("GradientStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoGradientStyle*)qax_result.constData(); -} - -inline int FillFormat::GradientVariant() const -{ - QVariant qax_result = property("GradientVariant"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* FillFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPatternType FillFormat::Pattern() const -{ - QVariant qax_result = property("Pattern"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPatternType*)qax_result.constData(); -} - -inline Office::MsoPresetGradientType FillFormat::PresetGradientType() const -{ - QVariant qax_result = property("PresetGradientType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetGradientType*)qax_result.constData(); -} - -inline Office::MsoPresetTexture FillFormat::PresetTexture() const -{ - QVariant qax_result = property("PresetTexture"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTexture*)qax_result.constData(); -} - -inline QString FillFormat::TextureName() const -{ - QVariant qax_result = property("TextureName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::MsoTextureType FillFormat::TextureType() const -{ - QVariant qax_result = property("TextureType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextureType*)qax_result.constData(); -} - -inline double FillFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void FillFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoFillType FillFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFillType*)qax_result.constData(); -} - -inline Office::MsoTriState FillFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void FillFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void FillFormat::Background() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void FillFormat::OneColorGradient(Office::MsoGradientStyle Style, int Variant, double Degree) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant, (void*)&Degree}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void FillFormat::Patterned(Office::MsoPatternType Pattern) -{ - void *_a[] = {0, (void*)&Pattern}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void FillFormat::PresetGradient(Office::MsoGradientStyle Style, int Variant, Office::MsoPresetGradientType PresetGradientType) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant, (void*)&PresetGradientType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void FillFormat::PresetTextured(Office::MsoPresetTexture PresetTexture) -{ - void *_a[] = {0, (void*)&PresetTexture}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void FillFormat::Solid() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void FillFormat::TwoColorGradient(Office::MsoGradientStyle Style, int Variant) -{ - void *_a[] = {0, (void*)&Style, (void*)&Variant}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void FillFormat::UserPicture(const QString& PictureFile) -{ - void *_a[] = {0, (void*)&PictureFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void FillFormat::UserTextured(const QString& TextureFile) -{ - void *_a[] = {0, (void*)&TextureFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline IDispatch* LineFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* LineFormat::BackColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("BackColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} -inline void LineFormat::SetBackColor(PowerPoint::ColorFormat* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorFormat*", &value); - setProperty("BackColor", QVariant(typeId, &value)); -} - -inline Office::MsoArrowheadLength LineFormat::BeginArrowheadLength() const -{ - QVariant qax_result = property("BeginArrowheadLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadLength*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadLength(Office::MsoArrowheadLength value){ setProperty("BeginArrowheadLength", QVariant(value)); } - -inline Office::MsoArrowheadStyle LineFormat::BeginArrowheadStyle() const -{ - QVariant qax_result = property("BeginArrowheadStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadStyle*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadStyle(Office::MsoArrowheadStyle value){ setProperty("BeginArrowheadStyle", QVariant(value)); } - -inline Office::MsoArrowheadWidth LineFormat::BeginArrowheadWidth() const -{ - QVariant qax_result = property("BeginArrowheadWidth"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadWidth*)qax_result.constData(); -} -inline void LineFormat::SetBeginArrowheadWidth(Office::MsoArrowheadWidth value){ setProperty("BeginArrowheadWidth", QVariant(value)); } - -inline int LineFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoLineDashStyle LineFormat::DashStyle() const -{ - QVariant qax_result = property("DashStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLineDashStyle*)qax_result.constData(); -} -inline void LineFormat::SetDashStyle(Office::MsoLineDashStyle value){ setProperty("DashStyle", QVariant(value)); } - -inline Office::MsoArrowheadLength LineFormat::EndArrowheadLength() const -{ - QVariant qax_result = property("EndArrowheadLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadLength*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadLength(Office::MsoArrowheadLength value){ setProperty("EndArrowheadLength", QVariant(value)); } - -inline Office::MsoArrowheadStyle LineFormat::EndArrowheadStyle() const -{ - QVariant qax_result = property("EndArrowheadStyle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadStyle*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadStyle(Office::MsoArrowheadStyle value){ setProperty("EndArrowheadStyle", QVariant(value)); } - -inline Office::MsoArrowheadWidth LineFormat::EndArrowheadWidth() const -{ - QVariant qax_result = property("EndArrowheadWidth"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoArrowheadWidth*)qax_result.constData(); -} -inline void LineFormat::SetEndArrowheadWidth(Office::MsoArrowheadWidth value){ setProperty("EndArrowheadWidth", QVariant(value)); } - -inline PowerPoint::ColorFormat* LineFormat::ForeColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} -inline void LineFormat::SetForeColor(PowerPoint::ColorFormat* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoTriState LineFormat::InsetPen() const -{ - QVariant qax_result = property("InsetPen"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void LineFormat::SetInsetPen(Office::MsoTriState value){ setProperty("InsetPen", QVariant(value)); } - -inline IDispatch* LineFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPatternType LineFormat::Pattern() const -{ - QVariant qax_result = property("Pattern"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPatternType*)qax_result.constData(); -} -inline void LineFormat::SetPattern(Office::MsoPatternType value){ setProperty("Pattern", QVariant(value)); } - -inline Office::MsoLineStyle LineFormat::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLineStyle*)qax_result.constData(); -} -inline void LineFormat::SetStyle(Office::MsoLineStyle value){ setProperty("Style", QVariant(value)); } - -inline double LineFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void LineFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoTriState LineFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void LineFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline double LineFormat::Weight() const -{ - QVariant qax_result = property("Weight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void LineFormat::SetWeight(double value){ setProperty("Weight", QVariant(value)); } - - -inline IDispatch* ShadowFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShadowFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* ShadowFormat::ForeColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ForeColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} -inline void ShadowFormat::SetForeColor(PowerPoint::ColorFormat* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorFormat*", &value); - setProperty("ForeColor", QVariant(typeId, &value)); -} - -inline Office::MsoTriState ShadowFormat::Obscured() const -{ - QVariant qax_result = property("Obscured"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShadowFormat::SetObscured(Office::MsoTriState value){ setProperty("Obscured", QVariant(value)); } - -inline double ShadowFormat::OffsetX() const -{ - QVariant qax_result = property("OffsetX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetOffsetX(double value){ setProperty("OffsetX", QVariant(value)); } - -inline double ShadowFormat::OffsetY() const -{ - QVariant qax_result = property("OffsetY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetOffsetY(double value){ setProperty("OffsetY", QVariant(value)); } - -inline IDispatch* ShadowFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double ShadowFormat::Transparency() const -{ - QVariant qax_result = property("Transparency"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ShadowFormat::SetTransparency(double value){ setProperty("Transparency", QVariant(value)); } - -inline Office::MsoShadowType ShadowFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoShadowType*)qax_result.constData(); -} -inline void ShadowFormat::SetType(Office::MsoShadowType value){ setProperty("Type", QVariant(value)); } - -inline Office::MsoTriState ShadowFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ShadowFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void ShadowFormat::IncrementOffsetX(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShadowFormat::IncrementOffsetY(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* ConnectorFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState ConnectorFormat::BeginConnected() const -{ - QVariant qax_result = property("BeginConnected"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Shape* ConnectorFormat::BeginConnectedShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("BeginConnectedShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline int ConnectorFormat::BeginConnectionSite() const -{ - QVariant qax_result = property("BeginConnectionSite"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ConnectorFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState ConnectorFormat::EndConnected() const -{ - QVariant qax_result = property("EndConnected"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Shape* ConnectorFormat::EndConnectedShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("EndConnectedShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline int ConnectorFormat::EndConnectionSite() const -{ - QVariant qax_result = property("EndConnectionSite"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ConnectorFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoConnectorType ConnectorFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoConnectorType*)qax_result.constData(); -} -inline void ConnectorFormat::SetType(Office::MsoConnectorType value){ setProperty("Type", QVariant(value)); } - -inline void ConnectorFormat::BeginConnect(PowerPoint::Shape* ConnectedShape, int ConnectionSite) -{ - void *_a[] = {0, (void*)&ConnectedShape, (void*)&ConnectionSite}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ConnectorFormat::BeginDisconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ConnectorFormat::EndConnect(PowerPoint::Shape* ConnectedShape, int ConnectionSite) -{ - void *_a[] = {0, (void*)&ConnectedShape, (void*)&ConnectionSite}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ConnectorFormat::EndDisconnect() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline Office::MsoTextEffectAlignment TextEffectFormat::Alignment() const -{ - QVariant qax_result = property("Alignment"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextEffectAlignment*)qax_result.constData(); -} -inline void TextEffectFormat::SetAlignment(Office::MsoTextEffectAlignment value){ setProperty("Alignment", QVariant(value)); } - -inline IDispatch* TextEffectFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int TextEffectFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState TextEffectFormat::FontBold() const -{ - QVariant qax_result = property("FontBold"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontBold(Office::MsoTriState value){ setProperty("FontBold", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::FontItalic() const -{ - QVariant qax_result = property("FontItalic"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontItalic(Office::MsoTriState value){ setProperty("FontItalic", QVariant(value)); } - -inline QString TextEffectFormat::FontName() const -{ - QVariant qax_result = property("FontName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontName(const QString& value){ setProperty("FontName", QVariant(value)); } - -inline double TextEffectFormat::FontSize() const -{ - QVariant qax_result = property("FontSize"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextEffectFormat::SetFontSize(double value){ setProperty("FontSize", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::KernedPairs() const -{ - QVariant qax_result = property("KernedPairs"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetKernedPairs(Office::MsoTriState value){ setProperty("KernedPairs", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::NormalizedHeight() const -{ - QVariant qax_result = property("NormalizedHeight"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetNormalizedHeight(Office::MsoTriState value){ setProperty("NormalizedHeight", QVariant(value)); } - -inline IDispatch* TextEffectFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoPresetTextEffectShape TextEffectFormat::PresetShape() const -{ - QVariant qax_result = property("PresetShape"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTextEffectShape*)qax_result.constData(); -} -inline void TextEffectFormat::SetPresetShape(Office::MsoPresetTextEffectShape value){ setProperty("PresetShape", QVariant(value)); } - -inline Office::MsoPresetTextEffect TextEffectFormat::PresetTextEffect() const -{ - QVariant qax_result = property("PresetTextEffect"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetTextEffect*)qax_result.constData(); -} -inline void TextEffectFormat::SetPresetTextEffect(Office::MsoPresetTextEffect value){ setProperty("PresetTextEffect", QVariant(value)); } - -inline Office::MsoTriState TextEffectFormat::RotatedChars() const -{ - QVariant qax_result = property("RotatedChars"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextEffectFormat::SetRotatedChars(Office::MsoTriState value){ setProperty("RotatedChars", QVariant(value)); } - -inline QString TextEffectFormat::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void TextEffectFormat::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline double TextEffectFormat::Tracking() const -{ - QVariant qax_result = property("Tracking"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextEffectFormat::SetTracking(double value){ setProperty("Tracking", QVariant(value)); } - -inline void TextEffectFormat::ToggleVerticalText() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline IDispatch* ThreeDFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ThreeDFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double ThreeDFormat::Depth() const -{ - QVariant qax_result = property("Depth"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetDepth(double value){ setProperty("Depth", QVariant(value)); } - -inline PowerPoint::ColorFormat* ThreeDFormat::ExtrusionColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("ExtrusionColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline Office::MsoExtrusionColorType ThreeDFormat::ExtrusionColorType() const -{ - QVariant qax_result = property("ExtrusionColorType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoExtrusionColorType*)qax_result.constData(); -} -inline void ThreeDFormat::SetExtrusionColorType(Office::MsoExtrusionColorType value){ setProperty("ExtrusionColorType", QVariant(value)); } - -inline IDispatch* ThreeDFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState ThreeDFormat::Perspective() const -{ - QVariant qax_result = property("Perspective"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ThreeDFormat::SetPerspective(Office::MsoTriState value){ setProperty("Perspective", QVariant(value)); } - -inline Office::MsoPresetExtrusionDirection ThreeDFormat::PresetExtrusionDirection() const -{ - QVariant qax_result = property("PresetExtrusionDirection"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetExtrusionDirection*)qax_result.constData(); -} - -inline Office::MsoPresetLightingDirection ThreeDFormat::PresetLightingDirection() const -{ - QVariant qax_result = property("PresetLightingDirection"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetLightingDirection*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetLightingDirection(Office::MsoPresetLightingDirection value){ setProperty("PresetLightingDirection", QVariant(value)); } - -inline Office::MsoPresetLightingSoftness ThreeDFormat::PresetLightingSoftness() const -{ - QVariant qax_result = property("PresetLightingSoftness"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetLightingSoftness*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetLightingSoftness(Office::MsoPresetLightingSoftness value){ setProperty("PresetLightingSoftness", QVariant(value)); } - -inline Office::MsoPresetMaterial ThreeDFormat::PresetMaterial() const -{ - QVariant qax_result = property("PresetMaterial"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetMaterial*)qax_result.constData(); -} -inline void ThreeDFormat::SetPresetMaterial(Office::MsoPresetMaterial value){ setProperty("PresetMaterial", QVariant(value)); } - -inline Office::MsoPresetThreeDFormat ThreeDFormat::PresetThreeDFormat() const -{ - QVariant qax_result = property("PresetThreeDFormat"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoPresetThreeDFormat*)qax_result.constData(); -} - -inline double ThreeDFormat::RotationX() const -{ - QVariant qax_result = property("RotationX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetRotationX(double value){ setProperty("RotationX", QVariant(value)); } - -inline double ThreeDFormat::RotationY() const -{ - QVariant qax_result = property("RotationY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ThreeDFormat::SetRotationY(double value){ setProperty("RotationY", QVariant(value)); } - -inline Office::MsoTriState ThreeDFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ThreeDFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void ThreeDFormat::IncrementRotationX(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ThreeDFormat::IncrementRotationY(double Increment) -{ - void *_a[] = {0, (void*)&Increment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ThreeDFormat::ResetRotation() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ThreeDFormat::SetExtrusionDirection(Office::MsoPresetExtrusionDirection PresetExtrusionDirection) -{ - void *_a[] = {0, (void*)&PresetExtrusionDirection}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void ThreeDFormat::SetThreeDFormat(Office::MsoPresetThreeDFormat PresetThreeDFormat) -{ - void *_a[] = {0, (void*)&PresetThreeDFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline IDispatch* TextFrame::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PpAutoSize TextFrame::AutoSize() const -{ - QVariant qax_result = property("AutoSize"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpAutoSize*)qax_result.constData(); -} -inline void TextFrame::SetAutoSize(PowerPoint::PpAutoSize value){ setProperty("AutoSize", QVariant(value)); } - -inline int TextFrame::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoTriState TextFrame::HasText() const -{ - QVariant qax_result = property("HasText"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoHorizontalAnchor TextFrame::HorizontalAnchor() const -{ - QVariant qax_result = property("HorizontalAnchor"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoHorizontalAnchor*)qax_result.constData(); -} -inline void TextFrame::SetHorizontalAnchor(Office::MsoHorizontalAnchor value){ setProperty("HorizontalAnchor", QVariant(value)); } - -inline double TextFrame::MarginBottom() const -{ - QVariant qax_result = property("MarginBottom"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginBottom(double value){ setProperty("MarginBottom", QVariant(value)); } - -inline double TextFrame::MarginLeft() const -{ - QVariant qax_result = property("MarginLeft"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginLeft(double value){ setProperty("MarginLeft", QVariant(value)); } - -inline double TextFrame::MarginRight() const -{ - QVariant qax_result = property("MarginRight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginRight(double value){ setProperty("MarginRight", QVariant(value)); } - -inline double TextFrame::MarginTop() const -{ - QVariant qax_result = property("MarginTop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TextFrame::SetMarginTop(double value){ setProperty("MarginTop", QVariant(value)); } - -inline Office::MsoTextOrientation TextFrame::Orientation() const -{ - QVariant qax_result = property("Orientation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTextOrientation*)qax_result.constData(); -} -inline void TextFrame::SetOrientation(Office::MsoTextOrientation value){ setProperty("Orientation", QVariant(value)); } - -inline IDispatch* TextFrame::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Ruler* TextFrame::Ruler() const -{ - PowerPoint::Ruler* qax_pointer = 0; - qRegisterMetaType("Ruler*", &qax_pointer); - qRegisterMetaType("Ruler", qax_pointer); - QVariant qax_result = property("Ruler"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Ruler**)qax_result.constData(); -} - -inline PowerPoint::TextRange* TextFrame::TextRange() const -{ - PowerPoint::TextRange* qax_pointer = 0; - qRegisterMetaType("TextRange*", &qax_pointer); - qRegisterMetaType("TextRange", qax_pointer); - QVariant qax_result = property("TextRange"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextRange**)qax_result.constData(); -} - -inline Office::MsoVerticalAnchor TextFrame::VerticalAnchor() const -{ - QVariant qax_result = property("VerticalAnchor"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoVerticalAnchor*)qax_result.constData(); -} -inline void TextFrame::SetVerticalAnchor(Office::MsoVerticalAnchor value){ setProperty("VerticalAnchor", QVariant(value)); } - -inline Office::MsoTriState TextFrame::WordWrap() const -{ - QVariant qax_result = property("WordWrap"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void TextFrame::SetWordWrap(Office::MsoTriState value){ setProperty("WordWrap", QVariant(value)); } - -inline void TextFrame::DeleteText() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline Office::MsoTriState CalloutFormat::Accent() const -{ - QVariant qax_result = property("Accent"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetAccent(Office::MsoTriState value){ setProperty("Accent", QVariant(value)); } - -inline Office::MsoCalloutAngleType CalloutFormat::Angle() const -{ - QVariant qax_result = property("Angle"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutAngleType*)qax_result.constData(); -} -inline void CalloutFormat::SetAngle(Office::MsoCalloutAngleType value){ setProperty("Angle", QVariant(value)); } - -inline IDispatch* CalloutFormat::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState CalloutFormat::AutoAttach() const -{ - QVariant qax_result = property("AutoAttach"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetAutoAttach(Office::MsoTriState value){ setProperty("AutoAttach", QVariant(value)); } - -inline Office::MsoTriState CalloutFormat::AutoLength() const -{ - QVariant qax_result = property("AutoLength"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState CalloutFormat::Border() const -{ - QVariant qax_result = property("Border"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void CalloutFormat::SetBorder(Office::MsoTriState value){ setProperty("Border", QVariant(value)); } - -inline int CalloutFormat::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double CalloutFormat::Drop() const -{ - QVariant qax_result = property("Drop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline Office::MsoCalloutDropType CalloutFormat::DropType() const -{ - QVariant qax_result = property("DropType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutDropType*)qax_result.constData(); -} - -inline double CalloutFormat::Gap() const -{ - QVariant qax_result = property("Gap"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void CalloutFormat::SetGap(double value){ setProperty("Gap", QVariant(value)); } - -inline double CalloutFormat::Length() const -{ - QVariant qax_result = property("Length"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline IDispatch* CalloutFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoCalloutType CalloutFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoCalloutType*)qax_result.constData(); -} -inline void CalloutFormat::SetType(Office::MsoCalloutType value){ setProperty("Type", QVariant(value)); } - -inline void CalloutFormat::AutomaticLength() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void CalloutFormat::CustomDrop(double Drop) -{ - void *_a[] = {0, (void*)&Drop}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void CalloutFormat::CustomLength(double Length) -{ - void *_a[] = {0, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void CalloutFormat::PresetDrop(Office::MsoCalloutDropType DropType) -{ - void *_a[] = {0, (void*)&DropType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline IDispatch* ShapeNodes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShapeNodes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int ShapeNodes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ShapeNodes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ShapeNodes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void ShapeNodes::Delete(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline void ShapeNodes::Insert(int Index, Office::MsoSegmentType SegmentType, Office::MsoEditingType EditingType, double X1, double Y1, double X2, double Y2, double X3, double Y3) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType, (void*)&EditingType, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3, (void*)&Y3}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline PowerPoint::ShapeNode* ShapeNodes::Item(const QVariant& Index) -{ - PowerPoint::ShapeNode* qax_result = 0; - qRegisterMetaType("ShapeNode*", &qax_result); - qRegisterMetaType("ShapeNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline void ShapeNodes::SetEditingType(int Index, Office::MsoEditingType EditingType) -{ - void *_a[] = {0, (void*)&Index, (void*)&EditingType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void ShapeNodes::SetPosition(int Index, double X1, double Y1) -{ - void *_a[] = {0, (void*)&Index, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void ShapeNodes::SetSegmentType(int Index, Office::MsoSegmentType SegmentType) -{ - void *_a[] = {0, (void*)&Index, (void*)&SegmentType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - - -inline IDispatch* ShapeNode::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int ShapeNode::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline Office::MsoEditingType ShapeNode::EditingType() const -{ - QVariant qax_result = property("EditingType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoEditingType*)qax_result.constData(); -} - -inline IDispatch* ShapeNode::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QVariant ShapeNode::Points() const -{ - QVariant qax_result = property("Points"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} - -inline Office::MsoSegmentType ShapeNode::SegmentType() const -{ - QVariant qax_result = property("SegmentType"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoSegmentType*)qax_result.constData(); -} - - -inline PowerPoint::Application* OLEFormat::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpFollowColors OLEFormat::FollowColors() const -{ - QVariant qax_result = property("FollowColors"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpFollowColors*)qax_result.constData(); -} -inline void OLEFormat::SetFollowColors(PowerPoint::PpFollowColors value){ setProperty("FollowColors", QVariant(value)); } - -inline IDispatch* OLEFormat::Object() const -{ - QVariant qax_result = property("Object"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ObjectVerbs* OLEFormat::ObjectVerbs() const -{ - PowerPoint::ObjectVerbs* qax_pointer = 0; - qRegisterMetaType("ObjectVerbs*", &qax_pointer); - qRegisterMetaType("ObjectVerbs", qax_pointer); - QVariant qax_result = property("ObjectVerbs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ObjectVerbs**)qax_result.constData(); -} - -inline IDispatch* OLEFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString OLEFormat::ProgID() const -{ - QVariant qax_result = property("ProgID"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline void OLEFormat::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void OLEFormat::DoVerb() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void OLEFormat::DoVerb(int Index) -{ - void *_a[] = {0, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline PowerPoint::Application* LinkFormat::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpUpdateOption LinkFormat::AutoUpdate() const -{ - QVariant qax_result = property("AutoUpdate"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpUpdateOption*)qax_result.constData(); -} -inline void LinkFormat::SetAutoUpdate(PowerPoint::PpUpdateOption value){ setProperty("AutoUpdate", QVariant(value)); } - -inline IDispatch* LinkFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString LinkFormat::SourceFullName() const -{ - QVariant qax_result = property("SourceFullName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void LinkFormat::SetSourceFullName(const QString& value){ setProperty("SourceFullName", QVariant(value)); } - -inline void LinkFormat::Update() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline PowerPoint::Application* ObjectVerbs::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int ObjectVerbs::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ObjectVerbs::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ObjectVerbs::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline QString ObjectVerbs::Item(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant ObjectVerbs::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::PpAdvanceMode AnimationSettings::AdvanceMode() const -{ - QVariant qax_result = property("AdvanceMode"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpAdvanceMode*)qax_result.constData(); -} -inline void AnimationSettings::SetAdvanceMode(PowerPoint::PpAdvanceMode value){ setProperty("AdvanceMode", QVariant(value)); } - -inline double AnimationSettings::AdvanceTime() const -{ - QVariant qax_result = property("AdvanceTime"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void AnimationSettings::SetAdvanceTime(double value){ setProperty("AdvanceTime", QVariant(value)); } - -inline PowerPoint::PpAfterEffect AnimationSettings::AfterEffect() const -{ - QVariant qax_result = property("AfterEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpAfterEffect*)qax_result.constData(); -} -inline void AnimationSettings::SetAfterEffect(PowerPoint::PpAfterEffect value){ setProperty("AfterEffect", QVariant(value)); } - -inline Office::MsoTriState AnimationSettings::Animate() const -{ - QVariant qax_result = property("Animate"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AnimationSettings::SetAnimate(Office::MsoTriState value){ setProperty("Animate", QVariant(value)); } - -inline Office::MsoTriState AnimationSettings::AnimateBackground() const -{ - QVariant qax_result = property("AnimateBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AnimationSettings::SetAnimateBackground(Office::MsoTriState value){ setProperty("AnimateBackground", QVariant(value)); } - -inline Office::MsoTriState AnimationSettings::AnimateTextInReverse() const -{ - QVariant qax_result = property("AnimateTextInReverse"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AnimationSettings::SetAnimateTextInReverse(Office::MsoTriState value){ setProperty("AnimateTextInReverse", QVariant(value)); } - -inline int AnimationSettings::AnimationOrder() const -{ - QVariant qax_result = property("AnimationOrder"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void AnimationSettings::SetAnimationOrder(int value){ setProperty("AnimationOrder", QVariant(value)); } - -inline PowerPoint::Application* AnimationSettings::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpChartUnitEffect AnimationSettings::ChartUnitEffect() const -{ - QVariant qax_result = property("ChartUnitEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpChartUnitEffect*)qax_result.constData(); -} -inline void AnimationSettings::SetChartUnitEffect(PowerPoint::PpChartUnitEffect value){ setProperty("ChartUnitEffect", QVariant(value)); } - -inline PowerPoint::ColorFormat* AnimationSettings::DimColor() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("DimColor"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline PowerPoint::PpEntryEffect AnimationSettings::EntryEffect() const -{ - QVariant qax_result = property("EntryEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpEntryEffect*)qax_result.constData(); -} -inline void AnimationSettings::SetEntryEffect(PowerPoint::PpEntryEffect value){ setProperty("EntryEffect", QVariant(value)); } - -inline IDispatch* AnimationSettings::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PlaySettings* AnimationSettings::PlaySettings() const -{ - PowerPoint::PlaySettings* qax_pointer = 0; - qRegisterMetaType("PlaySettings*", &qax_pointer); - qRegisterMetaType("PlaySettings", qax_pointer); - QVariant qax_result = property("PlaySettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PlaySettings**)qax_result.constData(); -} - -inline PowerPoint::SoundEffect* AnimationSettings::SoundEffect() const -{ - PowerPoint::SoundEffect* qax_pointer = 0; - qRegisterMetaType("SoundEffect*", &qax_pointer); - qRegisterMetaType("SoundEffect", qax_pointer); - QVariant qax_result = property("SoundEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundEffect**)qax_result.constData(); -} - -inline PowerPoint::PpTextLevelEffect AnimationSettings::TextLevelEffect() const -{ - QVariant qax_result = property("TextLevelEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpTextLevelEffect*)qax_result.constData(); -} -inline void AnimationSettings::SetTextLevelEffect(PowerPoint::PpTextLevelEffect value){ setProperty("TextLevelEffect", QVariant(value)); } - -inline PowerPoint::PpTextUnitEffect AnimationSettings::TextUnitEffect() const -{ - QVariant qax_result = property("TextUnitEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpTextUnitEffect*)qax_result.constData(); -} -inline void AnimationSettings::SetTextUnitEffect(PowerPoint::PpTextUnitEffect value){ setProperty("TextUnitEffect", QVariant(value)); } - - -inline PowerPoint::Application* ActionSettings::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int ActionSettings::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* ActionSettings::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* ActionSettings::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::ActionSetting* ActionSettings::Item(PowerPoint::PpMouseActivation Index) -{ - PowerPoint::ActionSetting* qax_result = 0; - qRegisterMetaType("ActionSetting*", &qax_result); - qRegisterMetaType("ActionSetting", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant ActionSettings::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::PpActionType ActionSetting::Action() const -{ - QVariant qax_result = property("Action"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpActionType*)qax_result.constData(); -} -inline void ActionSetting::SetAction(PowerPoint::PpActionType value){ setProperty("Action", QVariant(value)); } - -inline QString ActionSetting::ActionVerb() const -{ - QVariant qax_result = property("ActionVerb"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ActionSetting::SetActionVerb(const QString& value){ setProperty("ActionVerb", QVariant(value)); } - -inline Office::MsoTriState ActionSetting::AnimateAction() const -{ - QVariant qax_result = property("AnimateAction"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ActionSetting::SetAnimateAction(Office::MsoTriState value){ setProperty("AnimateAction", QVariant(value)); } - -inline PowerPoint::Application* ActionSetting::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Hyperlink* ActionSetting::Hyperlink() const -{ - PowerPoint::Hyperlink* qax_pointer = 0; - qRegisterMetaType("Hyperlink*", &qax_pointer); - qRegisterMetaType("Hyperlink", qax_pointer); - QVariant qax_result = property("Hyperlink"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlink**)qax_result.constData(); -} - -inline IDispatch* ActionSetting::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString ActionSetting::Run() const -{ - QVariant qax_result = property("Run"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ActionSetting::SetRun(const QString& value){ setProperty("Run", QVariant(value)); } - -inline Office::MsoTriState ActionSetting::ShowAndReturn() const -{ - QVariant qax_result = property("ShowAndReturn"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ActionSetting::SetShowAndReturn(Office::MsoTriState value){ setProperty("ShowAndReturn", QVariant(value)); } - -inline QString ActionSetting::SlideShowName() const -{ - QVariant qax_result = property("SlideShowName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void ActionSetting::SetSlideShowName(const QString& value){ setProperty("SlideShowName", QVariant(value)); } - -inline PowerPoint::SoundEffect* ActionSetting::SoundEffect() const -{ - PowerPoint::SoundEffect* qax_pointer = 0; - qRegisterMetaType("SoundEffect*", &qax_pointer); - qRegisterMetaType("SoundEffect", qax_pointer); - QVariant qax_result = property("SoundEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundEffect**)qax_result.constData(); -} - - -inline QString PlaySettings::ActionVerb() const -{ - QVariant qax_result = property("ActionVerb"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void PlaySettings::SetActionVerb(const QString& value){ setProperty("ActionVerb", QVariant(value)); } - -inline PowerPoint::Application* PlaySettings::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState PlaySettings::HideWhileNotPlaying() const -{ - QVariant qax_result = property("HideWhileNotPlaying"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PlaySettings::SetHideWhileNotPlaying(Office::MsoTriState value){ setProperty("HideWhileNotPlaying", QVariant(value)); } - -inline Office::MsoTriState PlaySettings::LoopUntilStopped() const -{ - QVariant qax_result = property("LoopUntilStopped"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PlaySettings::SetLoopUntilStopped(Office::MsoTriState value){ setProperty("LoopUntilStopped", QVariant(value)); } - -inline IDispatch* PlaySettings::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState PlaySettings::PauseAnimation() const -{ - QVariant qax_result = property("PauseAnimation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PlaySettings::SetPauseAnimation(Office::MsoTriState value){ setProperty("PauseAnimation", QVariant(value)); } - -inline Office::MsoTriState PlaySettings::PlayOnEntry() const -{ - QVariant qax_result = property("PlayOnEntry"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PlaySettings::SetPlayOnEntry(Office::MsoTriState value){ setProperty("PlayOnEntry", QVariant(value)); } - -inline Office::MsoTriState PlaySettings::RewindMovie() const -{ - QVariant qax_result = property("RewindMovie"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PlaySettings::SetRewindMovie(Office::MsoTriState value){ setProperty("RewindMovie", QVariant(value)); } - -inline int PlaySettings::StopAfterSlides() const -{ - QVariant qax_result = property("StopAfterSlides"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PlaySettings::SetStopAfterSlides(int value){ setProperty("StopAfterSlides", QVariant(value)); } - - -inline PowerPoint::ActionSettings* TextRange::ActionSettings() const -{ - PowerPoint::ActionSettings* qax_pointer = 0; - qRegisterMetaType("ActionSettings*", &qax_pointer); - qRegisterMetaType("ActionSettings", qax_pointer); - QVariant qax_result = property("ActionSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ActionSettings**)qax_result.constData(); -} - -inline PowerPoint::Application* TextRange::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline double TextRange::BoundHeight() const -{ - QVariant qax_result = property("BoundHeight"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline double TextRange::BoundLeft() const -{ - QVariant qax_result = property("BoundLeft"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline double TextRange::BoundTop() const -{ - QVariant qax_result = property("BoundTop"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline double TextRange::BoundWidth() const -{ - QVariant qax_result = property("BoundWidth"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline int TextRange::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Font* TextRange::Font() const -{ - PowerPoint::Font* qax_pointer = 0; - qRegisterMetaType("Font*", &qax_pointer); - qRegisterMetaType("Font", qax_pointer); - QVariant qax_result = property("Font"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Font**)qax_result.constData(); -} - -inline int TextRange::IndentLevel() const -{ - QVariant qax_result = property("IndentLevel"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void TextRange::SetIndentLevel(int value){ setProperty("IndentLevel", QVariant(value)); } - -inline Office::MsoLanguageID TextRange::LanguageID() const -{ - QVariant qax_result = property("LanguageID"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLanguageID*)qax_result.constData(); -} -inline void TextRange::SetLanguageID(Office::MsoLanguageID value){ setProperty("LanguageID", QVariant(value)); } - -inline int TextRange::Length() const -{ - QVariant qax_result = property("Length"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::ParagraphFormat* TextRange::ParagraphFormat() const -{ - PowerPoint::ParagraphFormat* qax_pointer = 0; - qRegisterMetaType("ParagraphFormat*", &qax_pointer); - qRegisterMetaType("ParagraphFormat", qax_pointer); - QVariant qax_result = property("ParagraphFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ParagraphFormat**)qax_result.constData(); -} - -inline IDispatch* TextRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int TextRange::Start() const -{ - QVariant qax_result = property("Start"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString TextRange::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void TextRange::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline IUnknown* TextRange::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void TextRange::AddPeriods() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void TextRange::ChangeCase(PowerPoint::PpChangeCase Type) -{ - void *_a[] = {0, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline PowerPoint::TextRange* TextRange::Characters() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Characters(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Characters(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void TextRange::Copy() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void TextRange::Cut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void TextRange::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline PowerPoint::TextRange* TextRange::Find(const QString& FindWhat) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Find(const QString& FindWhat, int After) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&After}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Find(const QString& FindWhat, int After, Office::MsoTriState MatchCase) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&After, (void*)&MatchCase}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Find(const QString& FindWhat, int After, Office::MsoTriState MatchCase, Office::MsoTriState WholeWords) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&After, (void*)&MatchCase, (void*)&WholeWords}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertAfter() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertAfter(const QString& NewText) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NewText}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertBefore() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertBefore(const QString& NewText) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&NewText}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertDateTime(PowerPoint::PpDateTimeFormat DateTimeFormat) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DateTimeFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertDateTime(PowerPoint::PpDateTimeFormat DateTimeFormat, Office::MsoTriState InsertAsField) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DateTimeFormat, (void*)&InsertAsField}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertSlideNumber() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertSymbol(const QString& FontName, int CharNumber) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FontName, (void*)&CharNumber}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::InsertSymbol(const QString& FontName, int CharNumber, Office::MsoTriState Unicode) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FontName, (void*)&CharNumber, (void*)&Unicode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Lines() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Lines(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Lines(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); - return qax_result; -} - -inline void TextRange::LtrRun() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); -} - -inline PowerPoint::TextRange* TextRange::Paragraphs() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Paragraphs(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Paragraphs(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Paste() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::PasteSpecial(PowerPoint::PpPasteDataType DataType, Office::MsoTriState DisplayAsIcon, const QString& IconFileName, int IconIndex, const QString& IconLabel, Office::MsoTriState Link) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&DataType, (void*)&DisplayAsIcon, (void*)&IconFileName, (void*)&IconIndex, (void*)&IconLabel, (void*)&Link}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); - return qax_result; -} - -inline void TextRange::RemovePeriods() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); -} - -inline PowerPoint::TextRange* TextRange::Replace(const QString& FindWhat, const QString& ReplaceWhat) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&ReplaceWhat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Replace(const QString& FindWhat, const QString& ReplaceWhat, int After) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&ReplaceWhat, (void*)&After}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Replace(const QString& FindWhat, const QString& ReplaceWhat, int After, Office::MsoTriState MatchCase) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&ReplaceWhat, (void*)&After, (void*)&MatchCase}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Replace(const QString& FindWhat, const QString& ReplaceWhat, int After, Office::MsoTriState MatchCase, Office::MsoTriState WholeWords) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FindWhat, (void*)&ReplaceWhat, (void*)&After, (void*)&MatchCase, (void*)&WholeWords}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); - return qax_result; -} - -inline void TextRange::RotatedBounds(double& X1, double& Y1, double& X2, double& Y2, double& X3, double& Y3, double& x4, double& y4) -{ - void *_a[] = {0, (void*)&X1, (void*)&Y1, (void*)&X2, (void*)&Y2, (void*)&X3, (void*)&Y3, (void*)&x4, (void*)&y4}; - qt_metacall(QMetaObject::InvokeMetaMethod, 48, _a); -} - -inline void TextRange::RtlRun() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); -} - -inline PowerPoint::TextRange* TextRange::Runs() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Runs(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Runs(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); - return qax_result; -} - -inline void TextRange::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); -} - -inline PowerPoint::TextRange* TextRange::Sentences() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Sentences(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Sentences(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::TrimText() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 60, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Words() -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 61, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Words(int Start) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start}; - qt_metacall(QMetaObject::InvokeMetaMethod, 62, _a); - return qax_result; -} - -inline PowerPoint::TextRange* TextRange::Words(int Start, int Length) -{ - PowerPoint::TextRange* qax_result = 0; - qRegisterMetaType("TextRange*", &qax_result); - qRegisterMetaType("TextRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Start, (void*)&Length}; - qt_metacall(QMetaObject::InvokeMetaMethod, 63, _a); - return qax_result; -} - -inline QVariant TextRange::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 64, _a); - return qax_result; -} - - -inline PowerPoint::Application* Ruler::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::RulerLevels* Ruler::Levels() const -{ - PowerPoint::RulerLevels* qax_pointer = 0; - qRegisterMetaType("RulerLevels*", &qax_pointer); - qRegisterMetaType("RulerLevels", qax_pointer); - QVariant qax_result = property("Levels"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::RulerLevels**)qax_result.constData(); -} - -inline IDispatch* Ruler::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::TabStops* Ruler::TabStops() const -{ - PowerPoint::TabStops* qax_pointer = 0; - qRegisterMetaType("TabStops*", &qax_pointer); - qRegisterMetaType("TabStops", qax_pointer); - QVariant qax_result = property("TabStops"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TabStops**)qax_result.constData(); -} - - -inline PowerPoint::Application* RulerLevels::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int RulerLevels::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* RulerLevels::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* RulerLevels::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::RulerLevel* RulerLevels::Item(int Index) -{ - PowerPoint::RulerLevel* qax_result = 0; - qRegisterMetaType("RulerLevel*", &qax_result); - qRegisterMetaType("RulerLevel", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant RulerLevels::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* RulerLevel::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline double RulerLevel::FirstMargin() const -{ - QVariant qax_result = property("FirstMargin"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void RulerLevel::SetFirstMargin(double value){ setProperty("FirstMargin", QVariant(value)); } - -inline double RulerLevel::LeftMargin() const -{ - QVariant qax_result = property("LeftMargin"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void RulerLevel::SetLeftMargin(double value){ setProperty("LeftMargin", QVariant(value)); } - -inline IDispatch* RulerLevel::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline PowerPoint::Application* TabStops::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int TabStops::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline double TabStops::DefaultSpacing() const -{ - QVariant qax_result = property("DefaultSpacing"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TabStops::SetDefaultSpacing(double value){ setProperty("DefaultSpacing", QVariant(value)); } - -inline IDispatch* TabStops::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* TabStops::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::TabStop* TabStops::Add(PowerPoint::PpTabStopType Type, double Position) -{ - PowerPoint::TabStop* qax_result = 0; - qRegisterMetaType("TabStop*", &qax_result); - qRegisterMetaType("TabStop", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Position}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::TabStop* TabStops::Item(int Index) -{ - PowerPoint::TabStop* qax_result = 0; - qRegisterMetaType("TabStop*", &qax_result); - qRegisterMetaType("TabStop", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline QVariant TabStops::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* TabStop::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* TabStop::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double TabStop::Position() const -{ - QVariant qax_result = property("Position"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void TabStop::SetPosition(double value){ setProperty("Position", QVariant(value)); } - -inline PowerPoint::PpTabStopType TabStop::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpTabStopType*)qax_result.constData(); -} -inline void TabStop::SetType(PowerPoint::PpTabStopType value){ setProperty("Type", QVariant(value)); } - -inline void TabStop::Clear() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Font::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState Font::AutoRotateNumbers() const -{ - QVariant qax_result = property("AutoRotateNumbers"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetAutoRotateNumbers(Office::MsoTriState value){ setProperty("AutoRotateNumbers", QVariant(value)); } - -inline double Font::BaselineOffset() const -{ - QVariant qax_result = property("BaselineOffset"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Font::SetBaselineOffset(double value){ setProperty("BaselineOffset", QVariant(value)); } - -inline Office::MsoTriState Font::Bold() const -{ - QVariant qax_result = property("Bold"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetBold(Office::MsoTriState value){ setProperty("Bold", QVariant(value)); } - -inline PowerPoint::ColorFormat* Font::Color() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("Color"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline Office::MsoTriState Font::Embeddable() const -{ - QVariant qax_result = property("Embeddable"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Font::Embedded() const -{ - QVariant qax_result = property("Embedded"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState Font::Emboss() const -{ - QVariant qax_result = property("Emboss"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetEmboss(Office::MsoTriState value){ setProperty("Emboss", QVariant(value)); } - -inline Office::MsoTriState Font::Italic() const -{ - QVariant qax_result = property("Italic"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetItalic(Office::MsoTriState value){ setProperty("Italic", QVariant(value)); } - -inline QString Font::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Font::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline QString Font::NameAscii() const -{ - QVariant qax_result = property("NameAscii"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Font::SetNameAscii(const QString& value){ setProperty("NameAscii", QVariant(value)); } - -inline QString Font::NameComplexScript() const -{ - QVariant qax_result = property("NameComplexScript"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Font::SetNameComplexScript(const QString& value){ setProperty("NameComplexScript", QVariant(value)); } - -inline QString Font::NameFarEast() const -{ - QVariant qax_result = property("NameFarEast"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Font::SetNameFarEast(const QString& value){ setProperty("NameFarEast", QVariant(value)); } - -inline QString Font::NameOther() const -{ - QVariant qax_result = property("NameOther"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Font::SetNameOther(const QString& value){ setProperty("NameOther", QVariant(value)); } - -inline IDispatch* Font::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState Font::Shadow() const -{ - QVariant qax_result = property("Shadow"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetShadow(Office::MsoTriState value){ setProperty("Shadow", QVariant(value)); } - -inline double Font::Size() const -{ - QVariant qax_result = property("Size"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Font::SetSize(double value){ setProperty("Size", QVariant(value)); } - -inline Office::MsoTriState Font::Subscript() const -{ - QVariant qax_result = property("Subscript"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetSubscript(Office::MsoTriState value){ setProperty("Subscript", QVariant(value)); } - -inline Office::MsoTriState Font::Superscript() const -{ - QVariant qax_result = property("Superscript"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetSuperscript(Office::MsoTriState value){ setProperty("Superscript", QVariant(value)); } - -inline Office::MsoTriState Font::Underline() const -{ - QVariant qax_result = property("Underline"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Font::SetUnderline(Office::MsoTriState value){ setProperty("Underline", QVariant(value)); } - - -inline PowerPoint::PpParagraphAlignment ParagraphFormat::Alignment() const -{ - QVariant qax_result = property("Alignment"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpParagraphAlignment*)qax_result.constData(); -} -inline void ParagraphFormat::SetAlignment(PowerPoint::PpParagraphAlignment value){ setProperty("Alignment", QVariant(value)); } - -inline PowerPoint::Application* ParagraphFormat::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpBaselineAlignment ParagraphFormat::BaseLineAlignment() const -{ - QVariant qax_result = property("BaseLineAlignment"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpBaselineAlignment*)qax_result.constData(); -} -inline void ParagraphFormat::SetBaseLineAlignment(PowerPoint::PpBaselineAlignment value){ setProperty("BaseLineAlignment", QVariant(value)); } - -inline PowerPoint::BulletFormat* ParagraphFormat::Bullet() const -{ - PowerPoint::BulletFormat* qax_pointer = 0; - qRegisterMetaType("BulletFormat*", &qax_pointer); - qRegisterMetaType("BulletFormat", qax_pointer); - QVariant qax_result = property("Bullet"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::BulletFormat**)qax_result.constData(); -} - -inline Office::MsoTriState ParagraphFormat::FarEastLineBreakControl() const -{ - QVariant qax_result = property("FarEastLineBreakControl"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetFarEastLineBreakControl(Office::MsoTriState value){ setProperty("FarEastLineBreakControl", QVariant(value)); } - -inline Office::MsoTriState ParagraphFormat::HangingPunctuation() const -{ - QVariant qax_result = property("HangingPunctuation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetHangingPunctuation(Office::MsoTriState value){ setProperty("HangingPunctuation", QVariant(value)); } - -inline Office::MsoTriState ParagraphFormat::LineRuleAfter() const -{ - QVariant qax_result = property("LineRuleAfter"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetLineRuleAfter(Office::MsoTriState value){ setProperty("LineRuleAfter", QVariant(value)); } - -inline Office::MsoTriState ParagraphFormat::LineRuleBefore() const -{ - QVariant qax_result = property("LineRuleBefore"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetLineRuleBefore(Office::MsoTriState value){ setProperty("LineRuleBefore", QVariant(value)); } - -inline Office::MsoTriState ParagraphFormat::LineRuleWithin() const -{ - QVariant qax_result = property("LineRuleWithin"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetLineRuleWithin(Office::MsoTriState value){ setProperty("LineRuleWithin", QVariant(value)); } - -inline IDispatch* ParagraphFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double ParagraphFormat::SpaceAfter() const -{ - QVariant qax_result = property("SpaceAfter"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ParagraphFormat::SetSpaceAfter(double value){ setProperty("SpaceAfter", QVariant(value)); } - -inline double ParagraphFormat::SpaceBefore() const -{ - QVariant qax_result = property("SpaceBefore"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ParagraphFormat::SetSpaceBefore(double value){ setProperty("SpaceBefore", QVariant(value)); } - -inline double ParagraphFormat::SpaceWithin() const -{ - QVariant qax_result = property("SpaceWithin"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ParagraphFormat::SetSpaceWithin(double value){ setProperty("SpaceWithin", QVariant(value)); } - -inline PowerPoint::PpDirection ParagraphFormat::TextDirection() const -{ - QVariant qax_result = property("TextDirection"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpDirection*)qax_result.constData(); -} -inline void ParagraphFormat::SetTextDirection(PowerPoint::PpDirection value){ setProperty("TextDirection", QVariant(value)); } - -inline Office::MsoTriState ParagraphFormat::WordWrap() const -{ - QVariant qax_result = property("WordWrap"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void ParagraphFormat::SetWordWrap(Office::MsoTriState value){ setProperty("WordWrap", QVariant(value)); } - - -inline PowerPoint::Application* BulletFormat::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int BulletFormat::Character() const -{ - QVariant qax_result = property("Character"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void BulletFormat::SetCharacter(int value){ setProperty("Character", QVariant(value)); } - -inline PowerPoint::Font* BulletFormat::Font() const -{ - PowerPoint::Font* qax_pointer = 0; - qRegisterMetaType("Font*", &qax_pointer); - qRegisterMetaType("Font", qax_pointer); - QVariant qax_result = property("Font"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Font**)qax_result.constData(); -} - -inline int BulletFormat::Number() const -{ - QVariant qax_result = property("Number"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* BulletFormat::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double BulletFormat::RelativeSize() const -{ - QVariant qax_result = property("RelativeSize"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void BulletFormat::SetRelativeSize(double value){ setProperty("RelativeSize", QVariant(value)); } - -inline int BulletFormat::StartValue() const -{ - QVariant qax_result = property("StartValue"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void BulletFormat::SetStartValue(int value){ setProperty("StartValue", QVariant(value)); } - -inline PowerPoint::PpNumberedBulletStyle BulletFormat::Style() const -{ - QVariant qax_result = property("Style"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpNumberedBulletStyle*)qax_result.constData(); -} -inline void BulletFormat::SetStyle(PowerPoint::PpNumberedBulletStyle value){ setProperty("Style", QVariant(value)); } - -inline PowerPoint::PpBulletType BulletFormat::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpBulletType*)qax_result.constData(); -} -inline void BulletFormat::SetType(PowerPoint::PpBulletType value){ setProperty("Type", QVariant(value)); } - -inline Office::MsoTriState BulletFormat::UseTextColor() const -{ - QVariant qax_result = property("UseTextColor"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void BulletFormat::SetUseTextColor(Office::MsoTriState value){ setProperty("UseTextColor", QVariant(value)); } - -inline Office::MsoTriState BulletFormat::UseTextFont() const -{ - QVariant qax_result = property("UseTextFont"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void BulletFormat::SetUseTextFont(Office::MsoTriState value){ setProperty("UseTextFont", QVariant(value)); } - -inline Office::MsoTriState BulletFormat::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void BulletFormat::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - -inline void BulletFormat::Picture(const QString& Picture) -{ - void *_a[] = {0, (void*)&Picture}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* TextStyles::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int TextStyles::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* TextStyles::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* TextStyles::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::TextStyle* TextStyles::Item(PowerPoint::PpTextStyleType Type) -{ - PowerPoint::TextStyle* qax_result = 0; - qRegisterMetaType("TextStyle*", &qax_result); - qRegisterMetaType("TextStyle", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant TextStyles::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* TextStyle::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::TextStyleLevels* TextStyle::Levels() const -{ - PowerPoint::TextStyleLevels* qax_pointer = 0; - qRegisterMetaType("TextStyleLevels*", &qax_pointer); - qRegisterMetaType("TextStyleLevels", qax_pointer); - QVariant qax_result = property("Levels"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextStyleLevels**)qax_result.constData(); -} - -inline IDispatch* TextStyle::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Ruler* TextStyle::Ruler() const -{ - PowerPoint::Ruler* qax_pointer = 0; - qRegisterMetaType("Ruler*", &qax_pointer); - qRegisterMetaType("Ruler", qax_pointer); - QVariant qax_result = property("Ruler"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Ruler**)qax_result.constData(); -} - -inline PowerPoint::TextFrame* TextStyle::TextFrame() const -{ - PowerPoint::TextFrame* qax_pointer = 0; - qRegisterMetaType("TextFrame*", &qax_pointer); - qRegisterMetaType("TextFrame", qax_pointer); - QVariant qax_result = property("TextFrame"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextFrame**)qax_result.constData(); -} - - -inline PowerPoint::Application* TextStyleLevels::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int TextStyleLevels::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* TextStyleLevels::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* TextStyleLevels::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::TextStyleLevel* TextStyleLevels::Item(int Level) -{ - PowerPoint::TextStyleLevel* qax_result = 0; - qRegisterMetaType("TextStyleLevel*", &qax_result); - qRegisterMetaType("TextStyleLevel", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Level}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant TextStyleLevels::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* TextStyleLevel::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Font* TextStyleLevel::Font() const -{ - PowerPoint::Font* qax_pointer = 0; - qRegisterMetaType("Font*", &qax_pointer); - qRegisterMetaType("Font", qax_pointer); - QVariant qax_result = property("Font"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Font**)qax_result.constData(); -} - -inline PowerPoint::ParagraphFormat* TextStyleLevel::ParagraphFormat() const -{ - PowerPoint::ParagraphFormat* qax_pointer = 0; - qRegisterMetaType("ParagraphFormat*", &qax_pointer); - qRegisterMetaType("ParagraphFormat", qax_pointer); - QVariant qax_result = property("ParagraphFormat"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ParagraphFormat**)qax_result.constData(); -} - -inline IDispatch* TextStyleLevel::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline PowerPoint::Application* HeaderFooter::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::PpDateTimeFormat HeaderFooter::Format() const -{ - QVariant qax_result = property("Format"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpDateTimeFormat*)qax_result.constData(); -} -inline void HeaderFooter::SetFormat(PowerPoint::PpDateTimeFormat value){ setProperty("Format", QVariant(value)); } - -inline IDispatch* HeaderFooter::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString HeaderFooter::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void HeaderFooter::SetText(const QString& value){ setProperty("Text", QVariant(value)); } - -inline Office::MsoTriState HeaderFooter::UseFormat() const -{ - QVariant qax_result = property("UseFormat"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void HeaderFooter::SetUseFormat(Office::MsoTriState value){ setProperty("UseFormat", QVariant(value)); } - -inline Office::MsoTriState HeaderFooter::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void HeaderFooter::SetVisible(Office::MsoTriState value){ setProperty("Visible", QVariant(value)); } - - -inline PowerPoint::Application* _Presentation::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* _Presentation::BuiltInDocumentProperties() const -{ - QVariant qax_result = property("BuiltInDocumentProperties"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorSchemes* _Presentation::ColorSchemes() const -{ - PowerPoint::ColorSchemes* qax_pointer = 0; - qRegisterMetaType("ColorSchemes*", &qax_pointer); - qRegisterMetaType("ColorSchemes", qax_pointer); - QVariant qax_result = property("ColorSchemes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorSchemes**)qax_result.constData(); -} - -inline Office::CommandBars* _Presentation::CommandBars() const -{ - Office::CommandBars* qax_pointer = 0; - qRegisterMetaType("Office::CommandBars*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::CommandBars", qax_pointer); -#endif - QVariant qax_result = property("CommandBars"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::CommandBars**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline IDispatch* _Presentation::Container() const -{ - QVariant qax_result = property("Container"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IDispatch* _Presentation::CustomDocumentProperties() const -{ - QVariant qax_result = property("CustomDocumentProperties"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoLanguageID _Presentation::DefaultLanguageID() const -{ - QVariant qax_result = property("DefaultLanguageID"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoLanguageID*)qax_result.constData(); -} -inline void _Presentation::SetDefaultLanguageID(Office::MsoLanguageID value){ setProperty("DefaultLanguageID", QVariant(value)); } - -inline PowerPoint::Shape* _Presentation::DefaultShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("DefaultShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::Designs* _Presentation::Designs() const -{ - PowerPoint::Designs* qax_pointer = 0; - qRegisterMetaType("Designs*", &qax_pointer); - qRegisterMetaType("Designs", qax_pointer); - QVariant qax_result = property("Designs"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Designs**)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::DisplayComments() const -{ - QVariant qax_result = property("DisplayComments"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Presentation::SetDisplayComments(Office::MsoTriState value){ setProperty("DisplayComments", QVariant(value)); } - -inline Office::DocumentLibraryVersions* _Presentation::DocumentLibraryVersions() const -{ - Office::DocumentLibraryVersions* qax_pointer = 0; - qRegisterMetaType("Office::DocumentLibraryVersions*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::DocumentLibraryVersions", qax_pointer); -#endif - QVariant qax_result = property("DocumentLibraryVersions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::DocumentLibraryVersions**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::MsoTriState _Presentation::EnvelopeVisible() const -{ - QVariant qax_result = property("EnvelopeVisible"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Presentation::SetEnvelopeVisible(Office::MsoTriState value){ setProperty("EnvelopeVisible", QVariant(value)); } - -inline PowerPoint::ExtraColors* _Presentation::ExtraColors() const -{ - PowerPoint::ExtraColors* qax_pointer = 0; - qRegisterMetaType("ExtraColors*", &qax_pointer); - qRegisterMetaType("ExtraColors", qax_pointer); - QVariant qax_result = property("ExtraColors"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ExtraColors**)qax_result.constData(); -} - -inline Office::MsoFarEastLineBreakLanguageID _Presentation::FarEastLineBreakLanguage() const -{ - QVariant qax_result = property("FarEastLineBreakLanguage"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoFarEastLineBreakLanguageID*)qax_result.constData(); -} -inline void _Presentation::SetFarEastLineBreakLanguage(Office::MsoFarEastLineBreakLanguageID value){ setProperty("FarEastLineBreakLanguage", QVariant(value)); } - -inline PowerPoint::PpFarEastLineBreakLevel _Presentation::FarEastLineBreakLevel() const -{ - QVariant qax_result = property("FarEastLineBreakLevel"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpFarEastLineBreakLevel*)qax_result.constData(); -} -inline void _Presentation::SetFarEastLineBreakLevel(PowerPoint::PpFarEastLineBreakLevel value){ setProperty("FarEastLineBreakLevel", QVariant(value)); } - -inline PowerPoint::Fonts* _Presentation::Fonts() const -{ - PowerPoint::Fonts* qax_pointer = 0; - qRegisterMetaType("Fonts*", &qax_pointer); - qRegisterMetaType("Fonts", qax_pointer); - QVariant qax_result = property("Fonts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Fonts**)qax_result.constData(); -} - -inline QString _Presentation::FullName() const -{ - QVariant qax_result = property("FullName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline double _Presentation::GridDistance() const -{ - QVariant qax_result = property("GridDistance"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void _Presentation::SetGridDistance(double value){ setProperty("GridDistance", QVariant(value)); } - -inline Office::HTMLProject* _Presentation::HTMLProject() const -{ - Office::HTMLProject* qax_pointer = 0; - qRegisterMetaType("Office::HTMLProject*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::HTMLProject", qax_pointer); -#endif - QVariant qax_result = property("HTMLProject"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::HTMLProject**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::_Master* _Presentation::HandoutMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("HandoutMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::PpRevisionInfo _Presentation::HasRevisionInfo() const -{ - QVariant qax_result = property("HasRevisionInfo"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpRevisionInfo*)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::HasTitleMaster() const -{ - QVariant qax_result = property("HasTitleMaster"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::PpDirection _Presentation::LayoutDirection() const -{ - QVariant qax_result = property("LayoutDirection"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpDirection*)qax_result.constData(); -} -inline void _Presentation::SetLayoutDirection(PowerPoint::PpDirection value){ setProperty("LayoutDirection", QVariant(value)); } - -inline QString _Presentation::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _Presentation::NoLineBreakAfter() const -{ - QVariant qax_result = property("NoLineBreakAfter"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Presentation::SetNoLineBreakAfter(const QString& value){ setProperty("NoLineBreakAfter", QVariant(value)); } - -inline QString _Presentation::NoLineBreakBefore() const -{ - QVariant qax_result = property("NoLineBreakBefore"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Presentation::SetNoLineBreakBefore(const QString& value){ setProperty("NoLineBreakBefore", QVariant(value)); } - -inline PowerPoint::_Master* _Presentation::NotesMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("NotesMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::PageSetup* _Presentation::PageSetup() const -{ - PowerPoint::PageSetup* qax_pointer = 0; - qRegisterMetaType("PageSetup*", &qax_pointer); - qRegisterMetaType("PageSetup", qax_pointer); - QVariant qax_result = property("PageSetup"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PageSetup**)qax_result.constData(); -} - -inline IDispatch* _Presentation::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString _Presentation::Password() const -{ - QVariant qax_result = property("Password"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Presentation::SetPassword(const QString& value){ setProperty("Password", QVariant(value)); } - -inline QString _Presentation::PasswordEncryptionAlgorithm() const -{ - QVariant qax_result = property("PasswordEncryptionAlgorithm"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline bool _Presentation::PasswordEncryptionFileProperties() const -{ - QVariant qax_result = property("PasswordEncryptionFileProperties"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline int _Presentation::PasswordEncryptionKeyLength() const -{ - QVariant qax_result = property("PasswordEncryptionKeyLength"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString _Presentation::PasswordEncryptionProvider() const -{ - QVariant qax_result = property("PasswordEncryptionProvider"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QString _Presentation::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::Permission* _Presentation::Permission() const -{ - Office::Permission* qax_pointer = 0; - qRegisterMetaType("Office::Permission*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Permission", qax_pointer); -#endif - QVariant qax_result = property("Permission"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Permission**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::PrintOptions* _Presentation::PrintOptions() const -{ - PowerPoint::PrintOptions* qax_pointer = 0; - qRegisterMetaType("PrintOptions*", &qax_pointer); - qRegisterMetaType("PrintOptions", qax_pointer); - QVariant qax_result = property("PrintOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PrintOptions**)qax_result.constData(); -} - -inline PowerPoint::PublishObjects* _Presentation::PublishObjects() const -{ - PowerPoint::PublishObjects* qax_pointer = 0; - qRegisterMetaType("PublishObjects*", &qax_pointer); - qRegisterMetaType("PublishObjects", qax_pointer); - QVariant qax_result = property("PublishObjects"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PublishObjects**)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::ReadOnly() const -{ - QVariant qax_result = property("ReadOnly"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::RemovePersonalInformation() const -{ - QVariant qax_result = property("RemovePersonalInformation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Presentation::SetRemovePersonalInformation(Office::MsoTriState value){ setProperty("RemovePersonalInformation", QVariant(value)); } - -inline Office::MsoTriState _Presentation::Saved() const -{ - QVariant qax_result = property("Saved"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Presentation::SetSaved(Office::MsoTriState value){ setProperty("Saved", QVariant(value)); } - -inline Office::SharedWorkspace* _Presentation::SharedWorkspace() const -{ - Office::SharedWorkspace* qax_pointer = 0; - qRegisterMetaType("Office::SharedWorkspace*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::SharedWorkspace", qax_pointer); -#endif - QVariant qax_result = property("SharedWorkspace"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::SharedWorkspace**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline Office::SignatureSet* _Presentation::Signatures() const -{ - Office::SignatureSet* qax_pointer = 0; - qRegisterMetaType("Office::SignatureSet*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::SignatureSet", qax_pointer); -#endif - QVariant qax_result = property("Signatures"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::SignatureSet**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::_Master* _Presentation::SlideMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("SlideMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::SlideShowSettings* _Presentation::SlideShowSettings() const -{ - PowerPoint::SlideShowSettings* qax_pointer = 0; - qRegisterMetaType("SlideShowSettings*", &qax_pointer); - qRegisterMetaType("SlideShowSettings", qax_pointer); - QVariant qax_result = property("SlideShowSettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowSettings**)qax_result.constData(); -} - -inline PowerPoint::SlideShowWindow* _Presentation::SlideShowWindow() const -{ - PowerPoint::SlideShowWindow* qax_pointer = 0; - qRegisterMetaType("SlideShowWindow*", &qax_pointer); - qRegisterMetaType("SlideShowWindow", qax_pointer); - QVariant qax_result = property("SlideShowWindow"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowWindow**)qax_result.constData(); -} - -inline PowerPoint::Slides* _Presentation::Slides() const -{ - PowerPoint::Slides* qax_pointer = 0; - qRegisterMetaType("Slides*", &qax_pointer); - qRegisterMetaType("Slides", qax_pointer); - QVariant qax_result = property("Slides"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Slides**)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::SnapToGrid() const -{ - QVariant qax_result = property("SnapToGrid"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void _Presentation::SetSnapToGrid(Office::MsoTriState value){ setProperty("SnapToGrid", QVariant(value)); } - -inline Office::Sync* _Presentation::Sync() const -{ - Office::Sync* qax_pointer = 0; - qRegisterMetaType("Office::Sync*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Sync", qax_pointer); -#endif - QVariant qax_result = property("Sync"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Sync**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Tags* _Presentation::Tags() const -{ - PowerPoint::Tags* qax_pointer = 0; - qRegisterMetaType("Tags*", &qax_pointer); - qRegisterMetaType("Tags", qax_pointer); - QVariant qax_result = property("Tags"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Tags**)qax_result.constData(); -} - -inline QString _Presentation::TemplateName() const -{ - QVariant qax_result = property("TemplateName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::_Master* _Presentation::TitleMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("TitleMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline Office::MsoTriState _Presentation::VBASigned() const -{ - QVariant qax_result = property("VBASigned"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline VBIDE::VBProject* _Presentation::VBProject() const -{ - VBIDE::VBProject* qax_pointer = 0; - qRegisterMetaType("VBIDE::VBProject*", &qax_pointer); -#ifdef QAX_DUMPCPP_VBIDE_H - qRegisterMetaType("VBIDE::VBProject", qax_pointer); -#endif - QVariant qax_result = property("VBProject"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_VBIDE_H - return *(VBIDE::VBProject**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::WebOptions* _Presentation::WebOptions() const -{ - PowerPoint::WebOptions* qax_pointer = 0; - qRegisterMetaType("WebOptions*", &qax_pointer); - qRegisterMetaType("WebOptions", qax_pointer); - QVariant qax_result = property("WebOptions"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::WebOptions**)qax_result.constData(); -} - -inline PowerPoint::DocumentWindows* _Presentation::Windows() const -{ - PowerPoint::DocumentWindows* qax_pointer = 0; - qRegisterMetaType("DocumentWindows*", &qax_pointer); - qRegisterMetaType("DocumentWindows", qax_pointer); - QVariant qax_result = property("Windows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DocumentWindows**)qax_result.constData(); -} - -inline QString _Presentation::WritePassword() const -{ - QVariant qax_result = property("WritePassword"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void _Presentation::SetWritePassword(const QString& value){ setProperty("WritePassword", QVariant(value)); } - -inline void _Presentation::AddBaseline() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void _Presentation::AddBaseline(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline PowerPoint::_Master* _Presentation::AddTitleMaster() -{ - PowerPoint::_Master* qax_result = 0; - qRegisterMetaType("_Master*", &qax_result); - qRegisterMetaType("_Master", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void _Presentation::AddToFavorites() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline void _Presentation::ApplyTemplate(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - -inline bool _Presentation::CanCheckIn() -{ - bool qax_result; - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline void _Presentation::CheckIn() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline void _Presentation::CheckIn(bool SaveChanges) -{ - void *_a[] = {0, (void*)&SaveChanges}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); -} - -inline void _Presentation::CheckIn(bool SaveChanges, const QVariant& Comments) -{ - void *_a[] = {0, (void*)&SaveChanges, (void*)&Comments}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); -} - -inline void _Presentation::CheckIn(bool SaveChanges, const QVariant& Comments, const QVariant& MakePublic) -{ - void *_a[] = {0, (void*)&SaveChanges, (void*)&Comments, (void*)&MakePublic}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void _Presentation::Close() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); -} - -inline void _Presentation::EndReview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void _Presentation::Export(const QString& Path, const QString& FilterName) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void _Presentation::Export(const QString& Path, const QString& FilterName, int ScaleWidth) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName, (void*)&ScaleWidth}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - -inline void _Presentation::Export(const QString& Path, const QString& FilterName, int ScaleWidth, int ScaleHeight) -{ - void *_a[] = {0, (void*)&Path, (void*)&FilterName, (void*)&ScaleWidth, (void*)&ScaleHeight}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address) -{ - void *_a[] = {0, (void*)&Address}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 24, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory}; - qt_metacall(QMetaObject::InvokeMetaMethod, 25, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 26, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo, (void*)&Method}; - qt_metacall(QMetaObject::InvokeMetaMethod, 27, _a); -} - -inline void _Presentation::FollowHyperlink(const QString& Address, const QString& SubAddress, bool NewWindow, bool AddHistory, const QString& ExtraInfo, Office::MsoExtraInfoMethod Method, const QString& HeaderInfo) -{ - void *_a[] = {0, (void*)&Address, (void*)&SubAddress, (void*)&NewWindow, (void*)&AddHistory, (void*)&ExtraInfo, (void*)&Method, (void*)&HeaderInfo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 28, _a); -} - -inline void _Presentation::MakeIntoTemplate(Office::MsoTriState IsDesignTemplate) -{ - void *_a[] = {0, (void*)&IsDesignTemplate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 29, _a); -} - -inline void _Presentation::Merge(const QString& Path) -{ - void *_a[] = {0, (void*)&Path}; - qt_metacall(QMetaObject::InvokeMetaMethod, 30, _a); -} - -inline PowerPoint::DocumentWindow* _Presentation::NewWindow() -{ - PowerPoint::DocumentWindow* qax_result = 0; - qRegisterMetaType("DocumentWindow*", &qax_result); - qRegisterMetaType("DocumentWindow", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 31, _a); - return qax_result; -} - -inline void _Presentation::PrintOut() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 32, _a); -} - -inline void _Presentation::PrintOut(int From) -{ - void *_a[] = {0, (void*)&From}; - qt_metacall(QMetaObject::InvokeMetaMethod, 33, _a); -} - -inline void _Presentation::PrintOut(int From, int To) -{ - void *_a[] = {0, (void*)&From, (void*)&To}; - qt_metacall(QMetaObject::InvokeMetaMethod, 34, _a); -} - -inline void _Presentation::PrintOut(int From, int To, const QString& PrintToFile) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile}; - qt_metacall(QMetaObject::InvokeMetaMethod, 35, _a); -} - -inline void _Presentation::PrintOut(int From, int To, const QString& PrintToFile, int Copies) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies}; - qt_metacall(QMetaObject::InvokeMetaMethod, 36, _a); -} - -inline void _Presentation::PrintOut(int From, int To, const QString& PrintToFile, int Copies, Office::MsoTriState Collate) -{ - void *_a[] = {0, (void*)&From, (void*)&To, (void*)&PrintToFile, (void*)&Copies, (void*)&Collate}; - qt_metacall(QMetaObject::InvokeMetaMethod, 37, _a); -} - -inline void _Presentation::ReloadAs(Office::MsoEncoding cp) -{ - void *_a[] = {0, (void*)&cp}; - qt_metacall(QMetaObject::InvokeMetaMethod, 38, _a); -} - -inline void _Presentation::RemoveBaseline() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 39, _a); -} - -inline void _Presentation::ReplyWithChanges() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 40, _a); -} - -inline void _Presentation::ReplyWithChanges(bool ShowMessage) -{ - void *_a[] = {0, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 41, _a); -} - -inline void _Presentation::Save() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 42, _a); -} - -inline void _Presentation::SaveAs(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 43, _a); -} - -inline void _Presentation::SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 44, _a); -} - -inline void _Presentation::SaveAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat, (void*)&EmbedTrueTypeFonts}; - qt_metacall(QMetaObject::InvokeMetaMethod, 45, _a); -} - -inline void _Presentation::SaveCopyAs(const QString& FileName) -{ - void *_a[] = {0, (void*)&FileName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 46, _a); -} - -inline void _Presentation::SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat}; - qt_metacall(QMetaObject::InvokeMetaMethod, 47, _a); -} - -inline void _Presentation::SaveCopyAs(const QString& FileName, PowerPoint::PpSaveAsFileType FileFormat, Office::MsoTriState EmbedTrueTypeFonts) -{ - void *_a[] = {0, (void*)&FileName, (void*)&FileFormat, (void*)&EmbedTrueTypeFonts}; - qt_metacall(QMetaObject::InvokeMetaMethod, 48, _a); -} - -inline void _Presentation::SendFaxOverInternet() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 49, _a); -} - -inline void _Presentation::SendFaxOverInternet(const QString& Recipients) -{ - void *_a[] = {0, (void*)&Recipients}; - qt_metacall(QMetaObject::InvokeMetaMethod, 50, _a); -} - -inline void _Presentation::SendFaxOverInternet(const QString& Recipients, const QString& Subject) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject}; - qt_metacall(QMetaObject::InvokeMetaMethod, 51, _a); -} - -inline void _Presentation::SendFaxOverInternet(const QString& Recipients, const QString& Subject, bool ShowMessage) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 52, _a); -} - -inline void _Presentation::SendForReview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 53, _a); -} - -inline void _Presentation::SendForReview(const QString& Recipients) -{ - void *_a[] = {0, (void*)&Recipients}; - qt_metacall(QMetaObject::InvokeMetaMethod, 54, _a); -} - -inline void _Presentation::SendForReview(const QString& Recipients, const QString& Subject) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject}; - qt_metacall(QMetaObject::InvokeMetaMethod, 55, _a); -} - -inline void _Presentation::SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage}; - qt_metacall(QMetaObject::InvokeMetaMethod, 56, _a); -} - -inline void _Presentation::SendForReview(const QString& Recipients, const QString& Subject, bool ShowMessage, const QVariant& IncludeAttachment) -{ - void *_a[] = {0, (void*)&Recipients, (void*)&Subject, (void*)&ShowMessage, (void*)&IncludeAttachment}; - qt_metacall(QMetaObject::InvokeMetaMethod, 57, _a); -} - -inline void _Presentation::SetPasswordEncryptionOptions(const QString& PasswordEncryptionProvider, const QString& PasswordEncryptionAlgorithm, int PasswordEncryptionKeyLength, bool PasswordEncryptionFileProperties) -{ - void *_a[] = {0, (void*)&PasswordEncryptionProvider, (void*)&PasswordEncryptionAlgorithm, (void*)&PasswordEncryptionKeyLength, (void*)&PasswordEncryptionFileProperties}; - qt_metacall(QMetaObject::InvokeMetaMethod, 68, _a); -} - -inline void _Presentation::SetUndoText(const QString& Text) -{ - void *_a[] = {0, (void*)&Text}; - qt_metacall(QMetaObject::InvokeMetaMethod, 72, _a); -} - -inline void _Presentation::Unused() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 74, _a); -} - -inline void _Presentation::UpdateLinks() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 75, _a); -} - -inline void _Presentation::WebPagePreview() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 76, _a); -} - -inline void _Presentation::sblt(const QString& s) -{ - void *_a[] = {0, (void*)&s}; - qt_metacall(QMetaObject::InvokeMetaMethod, 77, _a); -} - - -inline PowerPoint::Application* Tags::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Tags::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Tags::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Tags::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline void Tags::Add(const QString& Name, const QString& Value) -{ - void *_a[] = {0, (void*)&Name, (void*)&Value}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Tags::AddBinary(const QString& Name, const QString& FilePath) -{ - void *_a[] = {0, (void*)&Name, (void*)&FilePath}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline int Tags::BinaryValue(const QString& Name) -{ - int qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline void Tags::Delete(const QString& Name) -{ - void *_a[] = {0, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - -inline QString Tags::Item(const QString& Name) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Name}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline QString Tags::Name(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline QString Tags::Value(int Index) -{ - QString qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline QVariant Tags::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - - -inline QString OCXExtender::AltHTML() const -{ - QVariant qax_result = property("AltHTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OCXExtender::SetAltHTML(const QString& value){ setProperty("AltHTML", QVariant(value)); } - -inline double OCXExtender::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OCXExtender::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline double OCXExtender::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OCXExtender::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline QString OCXExtender::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OCXExtender::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline double OCXExtender::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OCXExtender::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline bool OCXExtender::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void OCXExtender::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline double OCXExtender::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OCXExtender::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int OCXExtender::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - - -inline QString OLEControl::AltHTML() const -{ - QVariant qax_result = property("AltHTML"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OLEControl::SetAltHTML(const QString& value){ setProperty("AltHTML", QVariant(value)); } - -inline double OLEControl::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OLEControl::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline double OLEControl::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OLEControl::SetLeft(double value){ setProperty("Left", QVariant(value)); } - -inline QString OLEControl::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void OLEControl::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline double OLEControl::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OLEControl::SetTop(double value){ setProperty("Top", QVariant(value)); } - -inline bool OLEControl::Visible() const -{ - QVariant qax_result = property("Visible"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void OLEControl::SetVisible(bool value){ setProperty("Visible", QVariant(value)); } - -inline double OLEControl::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void OLEControl::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline int OLEControl::ZOrderPosition() const -{ - QVariant qax_result = property("ZOrderPosition"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - - -inline PowerPoint::Application* Table::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Columns* Table::Columns() const -{ - PowerPoint::Columns* qax_pointer = 0; - qRegisterMetaType("Columns*", &qax_pointer); - qRegisterMetaType("Columns", qax_pointer); - QVariant qax_result = property("Columns"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Columns**)qax_result.constData(); -} - -inline IDispatch* Table::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Rows* Table::Rows() const -{ - PowerPoint::Rows* qax_pointer = 0; - qRegisterMetaType("Rows*", &qax_pointer); - qRegisterMetaType("Rows", qax_pointer); - QVariant qax_result = property("Rows"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Rows**)qax_result.constData(); -} - -inline PowerPoint::PpDirection Table::TableDirection() const -{ - QVariant qax_result = property("TableDirection"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpDirection*)qax_result.constData(); -} -inline void Table::SetTableDirection(PowerPoint::PpDirection value){ setProperty("TableDirection", QVariant(value)); } - -inline PowerPoint::Cell* Table::Cell(int Row, int Column) -{ - PowerPoint::Cell* qax_result = 0; - qRegisterMetaType("Cell*", &qax_result); - qRegisterMetaType("Cell", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Row, (void*)&Column}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void Table::MergeBorders() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline PowerPoint::Application* Columns::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Columns::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Columns::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Columns::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Column* Columns::Add() -{ - PowerPoint::Column* qax_result = 0; - qRegisterMetaType("Column*", &qax_result); - qRegisterMetaType("Column", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Column* Columns::Add(int BeforeColumn) -{ - PowerPoint::Column* qax_result = 0; - qRegisterMetaType("Column*", &qax_result); - qRegisterMetaType("Column", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeforeColumn}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Column* Columns::Item(int Index) -{ - PowerPoint::Column* qax_result = 0; - qRegisterMetaType("Column*", &qax_result); - qRegisterMetaType("Column", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant Columns::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* Column::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::CellRange* Column::Cells() const -{ - PowerPoint::CellRange* qax_pointer = 0; - qRegisterMetaType("CellRange*", &qax_pointer); - qRegisterMetaType("CellRange", qax_pointer); - QVariant qax_result = property("Cells"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CellRange**)qax_result.constData(); -} - -inline IDispatch* Column::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double Column::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Column::SetWidth(double value){ setProperty("Width", QVariant(value)); } - -inline void Column::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Column::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline PowerPoint::Application* Rows::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Rows::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Rows::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Rows::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Row* Rows::Add() -{ - PowerPoint::Row* qax_result = 0; - qRegisterMetaType("Row*", &qax_result); - qRegisterMetaType("Row", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Row* Rows::Add(int BeforeRow) -{ - PowerPoint::Row* qax_result = 0; - qRegisterMetaType("Row*", &qax_result); - qRegisterMetaType("Row", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeforeRow}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Row* Rows::Item(int Index) -{ - PowerPoint::Row* qax_result = 0; - qRegisterMetaType("Row*", &qax_result); - qRegisterMetaType("Row", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant Rows::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* Row::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::CellRange* Row::Cells() const -{ - PowerPoint::CellRange* qax_pointer = 0; - qRegisterMetaType("CellRange*", &qax_pointer); - qRegisterMetaType("CellRange", qax_pointer); - QVariant qax_result = property("Cells"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CellRange**)qax_result.constData(); -} - -inline double Row::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Row::SetHeight(double value){ setProperty("Height", QVariant(value)); } - -inline IDispatch* Row::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline void Row::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Row::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline PowerPoint::Application* CellRange::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Borders* CellRange::Borders() const -{ - PowerPoint::Borders* qax_pointer = 0; - qRegisterMetaType("Borders*", &qax_pointer); - qRegisterMetaType("Borders", qax_pointer); - QVariant qax_result = property("Borders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Borders**)qax_result.constData(); -} - -inline int CellRange::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* CellRange::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* CellRange::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Cell* CellRange::Item(int Index) -{ - PowerPoint::Cell* qax_result = 0; - qRegisterMetaType("Cell*", &qax_result); - qRegisterMetaType("Cell", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant CellRange::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* Cell::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Borders* Cell::Borders() const -{ - PowerPoint::Borders* qax_pointer = 0; - qRegisterMetaType("Borders*", &qax_pointer); - qRegisterMetaType("Borders", qax_pointer); - QVariant qax_result = property("Borders"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Borders**)qax_result.constData(); -} - -inline IDispatch* Cell::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline bool Cell::Selected() const -{ - QVariant qax_result = property("Selected"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} - -inline PowerPoint::Shape* Cell::Shape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline void Cell::Merge(PowerPoint::Cell* MergeTo) -{ - void *_a[] = {0, (void*)&MergeTo}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Cell::Select() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Cell::Split(int NumRows, int NumColumns) -{ - void *_a[] = {0, (void*)&NumRows, (void*)&NumColumns}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline PowerPoint::Application* Borders::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Borders::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Borders::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Borders::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::LineFormat* Borders::Item(PowerPoint::PpBorderType BorderType) -{ - PowerPoint::LineFormat* qax_result = 0; - qRegisterMetaType("LineFormat*", &qax_result); - qRegisterMetaType("LineFormat", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BorderType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant Borders::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* Panes::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Panes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Panes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Panes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Pane* Panes::Item(int Index) -{ - PowerPoint::Pane* qax_result = 0; - qRegisterMetaType("Pane*", &qax_result); - qRegisterMetaType("Pane", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant Panes::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline Office::MsoTriState Pane::Active() const -{ - QVariant qax_result = property("Active"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Application* Pane::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* Pane::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PpViewType Pane::ViewType() const -{ - QVariant qax_result = property("ViewType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpViewType*)qax_result.constData(); -} - -inline void Pane::Activate() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline Office::MsoTriState DefaultWebOptions::AllowPNG() const -{ - QVariant qax_result = property("AllowPNG"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetAllowPNG(Office::MsoTriState value){ setProperty("AllowPNG", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::AlwaysSaveInDefaultEncoding() const -{ - QVariant qax_result = property("AlwaysSaveInDefaultEncoding"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetAlwaysSaveInDefaultEncoding(Office::MsoTriState value){ setProperty("AlwaysSaveInDefaultEncoding", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::CheckIfOfficeIsHTMLEditor() const -{ - QVariant qax_result = property("CheckIfOfficeIsHTMLEditor"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetCheckIfOfficeIsHTMLEditor(Office::MsoTriState value){ setProperty("CheckIfOfficeIsHTMLEditor", QVariant(value)); } - -inline Office::MsoEncoding DefaultWebOptions::Encoding() const -{ - QVariant qax_result = property("Encoding"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoEncoding*)qax_result.constData(); -} -inline void DefaultWebOptions::SetEncoding(Office::MsoEncoding value){ setProperty("Encoding", QVariant(value)); } - -inline QString DefaultWebOptions::FolderSuffix() const -{ - QVariant qax_result = property("FolderSuffix"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline Office::WebPageFonts* DefaultWebOptions::Fonts() const -{ - Office::WebPageFonts* qax_pointer = 0; - qRegisterMetaType("Office::WebPageFonts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::WebPageFonts", qax_pointer); -#endif - QVariant qax_result = property("Fonts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::WebPageFonts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::PpFrameColors DefaultWebOptions::FrameColors() const -{ - QVariant qax_result = property("FrameColors"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpFrameColors*)qax_result.constData(); -} -inline void DefaultWebOptions::SetFrameColors(PowerPoint::PpFrameColors value){ setProperty("FrameColors", QVariant(value)); } - -inline PowerPoint::PpHTMLVersion DefaultWebOptions::HTMLVersion() const -{ - QVariant qax_result = property("HTMLVersion"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpHTMLVersion*)qax_result.constData(); -} -inline void DefaultWebOptions::SetHTMLVersion(PowerPoint::PpHTMLVersion value){ setProperty("HTMLVersion", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::IncludeNavigation() const -{ - QVariant qax_result = property("IncludeNavigation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetIncludeNavigation(Office::MsoTriState value){ setProperty("IncludeNavigation", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::OrganizeInFolder() const -{ - QVariant qax_result = property("OrganizeInFolder"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetOrganizeInFolder(Office::MsoTriState value){ setProperty("OrganizeInFolder", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::RelyOnVML() const -{ - QVariant qax_result = property("RelyOnVML"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetRelyOnVML(Office::MsoTriState value){ setProperty("RelyOnVML", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::ResizeGraphics() const -{ - QVariant qax_result = property("ResizeGraphics"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetResizeGraphics(Office::MsoTriState value){ setProperty("ResizeGraphics", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::SaveNewWebPagesAsWebArchives() const -{ - QVariant qax_result = property("SaveNewWebPagesAsWebArchives"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetSaveNewWebPagesAsWebArchives(Office::MsoTriState value){ setProperty("SaveNewWebPagesAsWebArchives", QVariant(value)); } - -inline Office::MsoScreenSize DefaultWebOptions::ScreenSize() const -{ - QVariant qax_result = property("ScreenSize"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoScreenSize*)qax_result.constData(); -} -inline void DefaultWebOptions::SetScreenSize(Office::MsoScreenSize value){ setProperty("ScreenSize", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::ShowSlideAnimation() const -{ - QVariant qax_result = property("ShowSlideAnimation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetShowSlideAnimation(Office::MsoTriState value){ setProperty("ShowSlideAnimation", QVariant(value)); } - -inline Office::MsoTargetBrowser DefaultWebOptions::TargetBrowser() const -{ - QVariant qax_result = property("TargetBrowser"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTargetBrowser*)qax_result.constData(); -} -inline void DefaultWebOptions::SetTargetBrowser(Office::MsoTargetBrowser value){ setProperty("TargetBrowser", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::UpdateLinksOnSave() const -{ - QVariant qax_result = property("UpdateLinksOnSave"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetUpdateLinksOnSave(Office::MsoTriState value){ setProperty("UpdateLinksOnSave", QVariant(value)); } - -inline Office::MsoTriState DefaultWebOptions::UseLongFileNames() const -{ - QVariant qax_result = property("UseLongFileNames"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void DefaultWebOptions::SetUseLongFileNames(Office::MsoTriState value){ setProperty("UseLongFileNames", QVariant(value)); } - - -inline Office::MsoTriState WebOptions::AllowPNG() const -{ - QVariant qax_result = property("AllowPNG"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetAllowPNG(Office::MsoTriState value){ setProperty("AllowPNG", QVariant(value)); } - -inline Office::MsoEncoding WebOptions::Encoding() const -{ - QVariant qax_result = property("Encoding"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoEncoding*)qax_result.constData(); -} -inline void WebOptions::SetEncoding(Office::MsoEncoding value){ setProperty("Encoding", QVariant(value)); } - -inline QString WebOptions::FolderSuffix() const -{ - QVariant qax_result = property("FolderSuffix"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::PpFrameColors WebOptions::FrameColors() const -{ - QVariant qax_result = property("FrameColors"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpFrameColors*)qax_result.constData(); -} -inline void WebOptions::SetFrameColors(PowerPoint::PpFrameColors value){ setProperty("FrameColors", QVariant(value)); } - -inline PowerPoint::PpHTMLVersion WebOptions::HTMLVersion() const -{ - QVariant qax_result = property("HTMLVersion"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpHTMLVersion*)qax_result.constData(); -} -inline void WebOptions::SetHTMLVersion(PowerPoint::PpHTMLVersion value){ setProperty("HTMLVersion", QVariant(value)); } - -inline Office::MsoTriState WebOptions::IncludeNavigation() const -{ - QVariant qax_result = property("IncludeNavigation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetIncludeNavigation(Office::MsoTriState value){ setProperty("IncludeNavigation", QVariant(value)); } - -inline Office::MsoTriState WebOptions::OrganizeInFolder() const -{ - QVariant qax_result = property("OrganizeInFolder"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetOrganizeInFolder(Office::MsoTriState value){ setProperty("OrganizeInFolder", QVariant(value)); } - -inline Office::MsoTriState WebOptions::RelyOnVML() const -{ - QVariant qax_result = property("RelyOnVML"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetRelyOnVML(Office::MsoTriState value){ setProperty("RelyOnVML", QVariant(value)); } - -inline Office::MsoTriState WebOptions::ResizeGraphics() const -{ - QVariant qax_result = property("ResizeGraphics"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetResizeGraphics(Office::MsoTriState value){ setProperty("ResizeGraphics", QVariant(value)); } - -inline Office::MsoScreenSize WebOptions::ScreenSize() const -{ - QVariant qax_result = property("ScreenSize"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoScreenSize*)qax_result.constData(); -} -inline void WebOptions::SetScreenSize(Office::MsoScreenSize value){ setProperty("ScreenSize", QVariant(value)); } - -inline Office::MsoTriState WebOptions::ShowSlideAnimation() const -{ - QVariant qax_result = property("ShowSlideAnimation"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetShowSlideAnimation(Office::MsoTriState value){ setProperty("ShowSlideAnimation", QVariant(value)); } - -inline Office::MsoTargetBrowser WebOptions::TargetBrowser() const -{ - QVariant qax_result = property("TargetBrowser"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTargetBrowser*)qax_result.constData(); -} -inline void WebOptions::SetTargetBrowser(Office::MsoTargetBrowser value){ setProperty("TargetBrowser", QVariant(value)); } - -inline Office::MsoTriState WebOptions::UseLongFileNames() const -{ - QVariant qax_result = property("UseLongFileNames"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void WebOptions::SetUseLongFileNames(Office::MsoTriState value){ setProperty("UseLongFileNames", QVariant(value)); } - -inline void WebOptions::UseDefaultFolderSuffix() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - - -inline PowerPoint::Application* PublishObjects::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int PublishObjects::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* PublishObjects::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* PublishObjects::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::PublishObject* PublishObjects::Item(int Index) -{ - PowerPoint::PublishObject* qax_result = 0; - qRegisterMetaType("PublishObject*", &qax_result); - qRegisterMetaType("PublishObject", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline QVariant PublishObjects::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - - -inline PowerPoint::Application* PublishObject::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString PublishObject::FileName() const -{ - QVariant qax_result = property("FileName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void PublishObject::SetFileName(const QString& value){ setProperty("FileName", QVariant(value)); } - -inline PowerPoint::PpHTMLVersion PublishObject::HTMLVersion() const -{ - QVariant qax_result = property("HTMLVersion"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpHTMLVersion*)qax_result.constData(); -} -inline void PublishObject::SetHTMLVersion(PowerPoint::PpHTMLVersion value){ setProperty("HTMLVersion", QVariant(value)); } - -inline IDispatch* PublishObject::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int PublishObject::RangeEnd() const -{ - QVariant qax_result = property("RangeEnd"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PublishObject::SetRangeEnd(int value){ setProperty("RangeEnd", QVariant(value)); } - -inline int PublishObject::RangeStart() const -{ - QVariant qax_result = property("RangeStart"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void PublishObject::SetRangeStart(int value){ setProperty("RangeStart", QVariant(value)); } - -inline QString PublishObject::SlideShowName() const -{ - QVariant qax_result = property("SlideShowName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void PublishObject::SetSlideShowName(const QString& value){ setProperty("SlideShowName", QVariant(value)); } - -inline PowerPoint::PpPublishSourceType PublishObject::SourceType() const -{ - QVariant qax_result = property("SourceType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PpPublishSourceType*)qax_result.constData(); -} -inline void PublishObject::SetSourceType(PowerPoint::PpPublishSourceType value){ setProperty("SourceType", QVariant(value)); } - -inline Office::MsoTriState PublishObject::SpeakerNotes() const -{ - QVariant qax_result = property("SpeakerNotes"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void PublishObject::SetSpeakerNotes(Office::MsoTriState value){ setProperty("SpeakerNotes", QVariant(value)); } - -inline void PublishObject::Publish() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Master::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ShapeRange* Master::Background() const -{ - PowerPoint::ShapeRange* qax_pointer = 0; - qRegisterMetaType("ShapeRange*", &qax_pointer); - qRegisterMetaType("ShapeRange", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ShapeRange**)qax_result.constData(); -} - -inline PowerPoint::ColorScheme* Master::ColorScheme() const -{ - PowerPoint::ColorScheme* qax_pointer = 0; - qRegisterMetaType("ColorScheme*", &qax_pointer); - qRegisterMetaType("ColorScheme", qax_pointer); - QVariant qax_result = property("ColorScheme"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorScheme**)qax_result.constData(); -} -inline void Master::SetColorScheme(PowerPoint::ColorScheme* value){ - int typeId = qRegisterMetaType("PowerPoint::ColorScheme*", &value); - setProperty("ColorScheme", QVariant(typeId, &value)); -} - -inline PowerPoint::Design* Master::Design() const -{ - PowerPoint::Design* qax_pointer = 0; - qRegisterMetaType("Design*", &qax_pointer); - qRegisterMetaType("Design", qax_pointer); - QVariant qax_result = property("Design"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Design**)qax_result.constData(); -} - -inline PowerPoint::HeadersFooters* Master::HeadersFooters() const -{ - PowerPoint::HeadersFooters* qax_pointer = 0; - qRegisterMetaType("HeadersFooters*", &qax_pointer); - qRegisterMetaType("HeadersFooters", qax_pointer); - QVariant qax_result = property("HeadersFooters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::HeadersFooters**)qax_result.constData(); -} - -inline double Master::Height() const -{ - QVariant qax_result = property("Height"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline PowerPoint::Hyperlinks* Master::Hyperlinks() const -{ - PowerPoint::Hyperlinks* qax_pointer = 0; - qRegisterMetaType("Hyperlinks*", &qax_pointer); - qRegisterMetaType("Hyperlinks", qax_pointer); - QVariant qax_result = property("Hyperlinks"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Hyperlinks**)qax_result.constData(); -} - -inline QString Master::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Master::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* Master::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::Scripts* Master::Scripts() const -{ - Office::Scripts* qax_pointer = 0; - qRegisterMetaType("Office::Scripts*", &qax_pointer); -#ifdef QAX_DUMPCPP_OFFICE_H - qRegisterMetaType("Office::Scripts", qax_pointer); -#endif - QVariant qax_result = property("Scripts"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); -#ifdef QAX_DUMPCPP_OFFICE_H - return *(Office::Scripts**)qax_result.constData(); -#else - return 0; // foreign namespace not included -#endif -} - -inline PowerPoint::Shapes* Master::Shapes() const -{ - PowerPoint::Shapes* qax_pointer = 0; - qRegisterMetaType("Shapes*", &qax_pointer); - qRegisterMetaType("Shapes", qax_pointer); - QVariant qax_result = property("Shapes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shapes**)qax_result.constData(); -} - -inline PowerPoint::SlideShowTransition* Master::SlideShowTransition() const -{ - PowerPoint::SlideShowTransition* qax_pointer = 0; - qRegisterMetaType("SlideShowTransition*", &qax_pointer); - qRegisterMetaType("SlideShowTransition", qax_pointer); - QVariant qax_result = property("SlideShowTransition"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SlideShowTransition**)qax_result.constData(); -} - -inline PowerPoint::TextStyles* Master::TextStyles() const -{ - PowerPoint::TextStyles* qax_pointer = 0; - qRegisterMetaType("TextStyles*", &qax_pointer); - qRegisterMetaType("TextStyles", qax_pointer); - QVariant qax_result = property("TextStyles"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TextStyles**)qax_result.constData(); -} - -inline PowerPoint::TimeLine* Master::TimeLine() const -{ - PowerPoint::TimeLine* qax_pointer = 0; - qRegisterMetaType("TimeLine*", &qax_pointer); - qRegisterMetaType("TimeLine", qax_pointer); - QVariant qax_result = property("TimeLine"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::TimeLine**)qax_result.constData(); -} - -inline double Master::Width() const -{ - QVariant qax_result = property("Width"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline void Master::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline void _PowerRex::OnAsfEncoderEvent(const QVariant& erorCode, const QVariant& bstrErrorDesc) -{ - void *_a[] = {0, (void*)&erorCode, (void*)&bstrErrorDesc}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline void PowerRex::OnAsfEncoderEvent(const QVariant& erorCode, const QVariant& bstrErrorDesc) -{ - void *_a[] = {0, (void*)&erorCode, (void*)&bstrErrorDesc}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Comments::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Comments::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Comments::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Comments::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Comment* Comments::Add(double Left, double Top, const QString& Author, const QString& AuthorInitials, const QString& Text) -{ - PowerPoint::Comment* qax_result = 0; - qRegisterMetaType("Comment*", &qax_result); - qRegisterMetaType("Comment", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Left, (void*)&Top, (void*)&Author, (void*)&AuthorInitials, (void*)&Text}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Comment* Comments::Item(int Index) -{ - PowerPoint::Comment* qax_result = 0; - qRegisterMetaType("Comment*", &qax_result); - qRegisterMetaType("Comment", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline QVariant Comments::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - - -inline PowerPoint::Application* Comment::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString Comment::Author() const -{ - QVariant qax_result = property("Author"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline int Comment::AuthorIndex() const -{ - QVariant qax_result = property("AuthorIndex"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Comment::AuthorInitials() const -{ - QVariant qax_result = property("AuthorInitials"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline QDateTime Comment::DateTime() const -{ - QVariant qax_result = property("DateTime"); - Q_ASSERT(qax_result.isValid()); - return *(QDateTime*)qax_result.constData(); -} - -inline double Comment::Left() const -{ - QVariant qax_result = property("Left"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline IDispatch* Comment::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString Comment::Text() const -{ - QVariant qax_result = property("Text"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline double Comment::Top() const -{ - QVariant qax_result = property("Top"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} - -inline void Comment::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* Designs::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Designs::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Designs::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Designs::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Design* Designs::Add(const QString& designName) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&designName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Add(const QString& designName, int Index) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&designName, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Clone(PowerPoint::Design* pOriginal) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&pOriginal}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Clone(PowerPoint::Design* pOriginal, int Index) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&pOriginal, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Item(const QVariant& Index) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Load(const QString& TemplateName) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TemplateName}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::Design* Designs::Load(const QString& TemplateName, int Index) -{ - PowerPoint::Design* qax_result = 0; - qRegisterMetaType("Design*", &qax_result); - qRegisterMetaType("Design", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&TemplateName, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline QVariant Designs::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - - -inline PowerPoint::Application* Design::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState Design::HasTitleMaster() const -{ - QVariant qax_result = property("HasTitleMaster"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline int Design::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline QString Design::Name() const -{ - QVariant qax_result = property("Name"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void Design::SetName(const QString& value){ setProperty("Name", QVariant(value)); } - -inline IDispatch* Design::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState Design::Preserved() const -{ - QVariant qax_result = property("Preserved"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Design::SetPreserved(Office::MsoTriState value){ setProperty("Preserved", QVariant(value)); } - -inline PowerPoint::_Master* Design::SlideMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("SlideMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::_Master* Design::TitleMaster() const -{ - PowerPoint::_Master* qax_pointer = 0; - qRegisterMetaType("_Master*", &qax_pointer); - qRegisterMetaType("_Master", qax_pointer); - QVariant qax_result = property("TitleMaster"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::_Master**)qax_result.constData(); -} - -inline PowerPoint::_Master* Design::AddTitleMaster() -{ - PowerPoint::_Master* qax_result = 0; - qRegisterMetaType("_Master*", &qax_result); - qRegisterMetaType("_Master", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void Design::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Design::MoveTo(int toPos) -{ - void *_a[] = {0, (void*)&toPos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - - -inline IDispatch* DiagramNode::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::DiagramNodeChildren* DiagramNode::Children() const -{ - PowerPoint::DiagramNodeChildren* qax_pointer = 0; - qRegisterMetaType("DiagramNodeChildren*", &qax_pointer); - qRegisterMetaType("DiagramNodeChildren", qax_pointer); - QVariant qax_result = property("Children"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNodeChildren**)qax_result.constData(); -} - -inline int DiagramNode::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Diagram* DiagramNode::Diagram() const -{ - PowerPoint::Diagram* qax_pointer = 0; - qRegisterMetaType("Diagram*", &qax_pointer); - qRegisterMetaType("Diagram", qax_pointer); - QVariant qax_result = property("Diagram"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Diagram**)qax_result.constData(); -} - -inline Office::MsoOrgChartLayoutType DiagramNode::Layout() const -{ - QVariant qax_result = property("Layout"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoOrgChartLayoutType*)qax_result.constData(); -} -inline void DiagramNode::SetLayout(Office::MsoOrgChartLayoutType value){ setProperty("Layout", QVariant(value)); } - -inline IDispatch* DiagramNode::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNode::Root() const -{ - PowerPoint::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("Root"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNode**)qax_result.constData(); -} - -inline PowerPoint::Shape* DiagramNode::Shape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::Shape* DiagramNode::TextShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("TextShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNode::AddNode() -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNode::AddNode(Office::MsoRelativeNodePosition Pos) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNode::AddNode(Office::MsoRelativeNodePosition Pos, Office::MsoDiagramNodeType NodeType) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Pos, (void*)&NodeType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNode::CloneNode(bool CopyChildren, PowerPoint::DiagramNode* TargetNode) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&CopyChildren, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNode::CloneNode(bool CopyChildren, PowerPoint::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&CopyChildren, (void*)&TargetNode, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline void DiagramNode::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); -} - -inline void DiagramNode::MoveNode(PowerPoint::DiagramNode* TargetNode, Office::MsoRelativeNodePosition Pos) -{ - void *_a[] = {0, (void*)&TargetNode, (void*)&Pos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); -} - -inline PowerPoint::DiagramNode* DiagramNode::NextNode() -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNode::PrevNode() -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline void DiagramNode::ReplaceNode(PowerPoint::DiagramNode* TargetNode) -{ - void *_a[] = {0, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); -} - -inline void DiagramNode::SwapNode(PowerPoint::DiagramNode* TargetNode) -{ - void *_a[] = {0, (void*)&TargetNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); -} - -inline void DiagramNode::SwapNode(PowerPoint::DiagramNode* TargetNode, bool SwapChildren) -{ - void *_a[] = {0, (void*)&TargetNode, (void*)&SwapChildren}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); -} - -inline void DiagramNode::TransferChildren(PowerPoint::DiagramNode* ReceivingNode) -{ - void *_a[] = {0, (void*)&ReceivingNode}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); -} - - -inline IDispatch* DiagramNodeChildren::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int DiagramNodeChildren::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DiagramNodeChildren::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::FirstChild() const -{ - PowerPoint::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("FirstChild"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNode**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::LastChild() const -{ - PowerPoint::DiagramNode* qax_pointer = 0; - qRegisterMetaType("DiagramNode*", &qax_pointer); - qRegisterMetaType("DiagramNode", qax_pointer); - QVariant qax_result = property("LastChild"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNode**)qax_result.constData(); -} - -inline IDispatch* DiagramNodeChildren::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DiagramNodeChildren::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::AddNode() -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::AddNode(const QVariant& Index) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::AddNode(const QVariant& Index, Office::MsoDiagramNodeType NodeType) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index, (void*)&NodeType}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::DiagramNode* DiagramNodeChildren::Item(const QVariant& Index) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline void DiagramNodeChildren::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); -} - - -inline IDispatch* DiagramNodes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int DiagramNodes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int DiagramNodes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* DiagramNodes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* DiagramNodes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::DiagramNode* DiagramNodes::Item(const QVariant& Index) -{ - PowerPoint::DiagramNode* qax_result = 0; - qRegisterMetaType("DiagramNode*", &qax_result); - qRegisterMetaType("DiagramNode", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline void DiagramNodes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline IDispatch* Diagram::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState Diagram::AutoFormat() const -{ - QVariant qax_result = property("AutoFormat"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Diagram::SetAutoFormat(Office::MsoTriState value){ setProperty("AutoFormat", QVariant(value)); } - -inline Office::MsoTriState Diagram::AutoLayout() const -{ - QVariant qax_result = property("AutoLayout"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Diagram::SetAutoLayout(Office::MsoTriState value){ setProperty("AutoLayout", QVariant(value)); } - -inline int Diagram::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::DiagramNodes* Diagram::Nodes() const -{ - PowerPoint::DiagramNodes* qax_pointer = 0; - qRegisterMetaType("DiagramNodes*", &qax_pointer); - qRegisterMetaType("DiagramNodes", qax_pointer); - QVariant qax_result = property("Nodes"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::DiagramNodes**)qax_result.constData(); -} - -inline IDispatch* Diagram::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState Diagram::Reverse() const -{ - QVariant qax_result = property("Reverse"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Diagram::SetReverse(Office::MsoTriState value){ setProperty("Reverse", QVariant(value)); } - -inline Office::MsoDiagramType Diagram::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoDiagramType*)qax_result.constData(); -} - -inline void Diagram::Convert(Office::MsoDiagramType Type) -{ - void *_a[] = {0, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Diagram::FitText() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - - -inline PowerPoint::Application* TimeLine::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::Sequences* TimeLine::InteractiveSequences() const -{ - PowerPoint::Sequences* qax_pointer = 0; - qRegisterMetaType("Sequences*", &qax_pointer); - qRegisterMetaType("Sequences", qax_pointer); - QVariant qax_result = property("InteractiveSequences"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Sequences**)qax_result.constData(); -} - -inline PowerPoint::Sequence* TimeLine::MainSequence() const -{ - PowerPoint::Sequence* qax_pointer = 0; - qRegisterMetaType("Sequence*", &qax_pointer); - qRegisterMetaType("Sequence", qax_pointer); - QVariant qax_result = property("MainSequence"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Sequence**)qax_result.constData(); -} - -inline IDispatch* TimeLine::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - - -inline PowerPoint::Application* Sequences::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Sequences::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Sequences::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Sequences::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Sequence* Sequences::Add() -{ - PowerPoint::Sequence* qax_result = 0; - qRegisterMetaType("Sequence*", &qax_result); - qRegisterMetaType("Sequence", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Sequence* Sequences::Add(int Index) -{ - PowerPoint::Sequence* qax_result = 0; - qRegisterMetaType("Sequence*", &qax_result); - qRegisterMetaType("Sequence", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Sequence* Sequences::Item(int Index) -{ - PowerPoint::Sequence* qax_result = 0; - qRegisterMetaType("Sequence*", &qax_result); - qRegisterMetaType("Sequence", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant Sequences::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::Application* Sequence::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int Sequence::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* Sequence::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* Sequence::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Effect* Sequence::AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Shape, (void*)&effectId}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Shape, (void*)&effectId, (void*)&Level}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level, PowerPoint::MsoAnimTriggerType trigger) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Shape, (void*)&effectId, (void*)&Level, (void*)&trigger}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::AddEffect(PowerPoint::Shape* Shape, PowerPoint::MsoAnimEffect effectId, PowerPoint::MsoAnimateByLevel Level, PowerPoint::MsoAnimTriggerType trigger, int Index) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Shape, (void*)&effectId, (void*)&Level, (void*)&trigger, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::Clone(PowerPoint::Effect* Effect) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::Clone(PowerPoint::Effect* Effect, int Index) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&After}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After, int DimColor) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&After, (void*)&DimColor}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToAfterEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimAfterEffect After, int DimColor, PowerPoint::PpColorSchemeIndex DimSchemeColor) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&After, (void*)&DimColor, (void*)&DimSchemeColor}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToAnimateBackground(PowerPoint::Effect* Effect, Office::MsoTriState AnimateBackground) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&AnimateBackground}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToAnimateInReverse(PowerPoint::Effect* Effect, Office::MsoTriState animateInReverse) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&animateInReverse}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToBuildLevel(PowerPoint::Effect* Effect, PowerPoint::MsoAnimateByLevel Level) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&Level}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::ConvertToTextUnitEffect(PowerPoint::Effect* Effect, PowerPoint::MsoAnimTextUnitEffect unitEffect) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Effect, (void*)&unitEffect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::FindFirstAnimationFor(PowerPoint::Shape* Shape) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Shape}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::FindFirstAnimationForClick(int click) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&click}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline PowerPoint::Effect* Sequence::Item(int Index) -{ - PowerPoint::Effect* qax_result = 0; - qRegisterMetaType("Effect*", &qax_result); - qRegisterMetaType("Effect", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); - return qax_result; -} - -inline QVariant Sequence::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 23, _a); - return qax_result; -} - - -inline PowerPoint::Application* Effect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::AnimationBehaviors* Effect::Behaviors() const -{ - PowerPoint::AnimationBehaviors* qax_pointer = 0; - qRegisterMetaType("AnimationBehaviors*", &qax_pointer); - qRegisterMetaType("AnimationBehaviors", qax_pointer); - QVariant qax_result = property("Behaviors"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AnimationBehaviors**)qax_result.constData(); -} - -inline QString Effect::DisplayName() const -{ - QVariant qax_result = property("DisplayName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} - -inline PowerPoint::EffectInformation* Effect::EffectInformation() const -{ - PowerPoint::EffectInformation* qax_pointer = 0; - qRegisterMetaType("EffectInformation*", &qax_pointer); - qRegisterMetaType("EffectInformation", qax_pointer); - QVariant qax_result = property("EffectInformation"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::EffectInformation**)qax_result.constData(); -} - -inline PowerPoint::EffectParameters* Effect::EffectParameters() const -{ - PowerPoint::EffectParameters* qax_pointer = 0; - qRegisterMetaType("EffectParameters*", &qax_pointer); - qRegisterMetaType("EffectParameters", qax_pointer); - QVariant qax_result = property("EffectParameters"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::EffectParameters**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimEffect Effect::EffectType() const -{ - QVariant qax_result = property("EffectType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimEffect*)qax_result.constData(); -} -inline void Effect::SetEffectType(PowerPoint::MsoAnimEffect value){ setProperty("EffectType", QVariant(value)); } - -inline Office::MsoTriState Effect::Exit() const -{ - QVariant qax_result = property("Exit"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Effect::SetExit(Office::MsoTriState value){ setProperty("Exit", QVariant(value)); } - -inline int Effect::Index() const -{ - QVariant qax_result = property("Index"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Effect::Paragraph() const -{ - QVariant qax_result = property("Paragraph"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void Effect::SetParagraph(int value){ setProperty("Paragraph", QVariant(value)); } - -inline IDispatch* Effect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Shape* Effect::Shape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Shape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} -inline void Effect::SetShape(PowerPoint::Shape* value){ - int typeId = qRegisterMetaType("PowerPoint::Shape*", &value); - setProperty("Shape", QVariant(typeId, &value)); -} - -inline int Effect::TextRangeLength() const -{ - QVariant qax_result = property("TextRangeLength"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int Effect::TextRangeStart() const -{ - QVariant qax_result = property("TextRangeStart"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline PowerPoint::Timing* Effect::Timing() const -{ - PowerPoint::Timing* qax_pointer = 0; - qRegisterMetaType("Timing*", &qax_pointer); - qRegisterMetaType("Timing", qax_pointer); - QVariant qax_result = property("Timing"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Timing**)qax_result.constData(); -} - -inline void Effect::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - -inline void Effect::MoveAfter(PowerPoint::Effect* Effect) -{ - void *_a[] = {0, (void*)&Effect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); -} - -inline void Effect::MoveBefore(PowerPoint::Effect* Effect) -{ - void *_a[] = {0, (void*)&Effect}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); -} - -inline void Effect::MoveTo(int toPos) -{ - void *_a[] = {0, (void*)&toPos}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); -} - - -inline double Timing::Accelerate() const -{ - QVariant qax_result = property("Accelerate"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetAccelerate(double value){ setProperty("Accelerate", QVariant(value)); } - -inline PowerPoint::Application* Timing::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline Office::MsoTriState Timing::AutoReverse() const -{ - QVariant qax_result = property("AutoReverse"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Timing::SetAutoReverse(Office::MsoTriState value){ setProperty("AutoReverse", QVariant(value)); } - -inline double Timing::Decelerate() const -{ - QVariant qax_result = property("Decelerate"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetDecelerate(double value){ setProperty("Decelerate", QVariant(value)); } - -inline double Timing::Duration() const -{ - QVariant qax_result = property("Duration"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetDuration(double value){ setProperty("Duration", QVariant(value)); } - -inline IDispatch* Timing::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline int Timing::RepeatCount() const -{ - QVariant qax_result = property("RepeatCount"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} -inline void Timing::SetRepeatCount(int value){ setProperty("RepeatCount", QVariant(value)); } - -inline double Timing::RepeatDuration() const -{ - QVariant qax_result = property("RepeatDuration"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetRepeatDuration(double value){ setProperty("RepeatDuration", QVariant(value)); } - -inline PowerPoint::MsoAnimEffectRestart Timing::Restart() const -{ - QVariant qax_result = property("Restart"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimEffectRestart*)qax_result.constData(); -} -inline void Timing::SetRestart(PowerPoint::MsoAnimEffectRestart value){ setProperty("Restart", QVariant(value)); } - -inline Office::MsoTriState Timing::RewindAtEnd() const -{ - QVariant qax_result = property("RewindAtEnd"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Timing::SetRewindAtEnd(Office::MsoTriState value){ setProperty("RewindAtEnd", QVariant(value)); } - -inline Office::MsoTriState Timing::SmoothEnd() const -{ - QVariant qax_result = property("SmoothEnd"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Timing::SetSmoothEnd(Office::MsoTriState value){ setProperty("SmoothEnd", QVariant(value)); } - -inline Office::MsoTriState Timing::SmoothStart() const -{ - QVariant qax_result = property("SmoothStart"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Timing::SetSmoothStart(Office::MsoTriState value){ setProperty("SmoothStart", QVariant(value)); } - -inline double Timing::Speed() const -{ - QVariant qax_result = property("Speed"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetSpeed(double value){ setProperty("Speed", QVariant(value)); } - -inline double Timing::TriggerDelayTime() const -{ - QVariant qax_result = property("TriggerDelayTime"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void Timing::SetTriggerDelayTime(double value){ setProperty("TriggerDelayTime", QVariant(value)); } - -inline PowerPoint::Shape* Timing::TriggerShape() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("TriggerShape"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} -inline void Timing::SetTriggerShape(PowerPoint::Shape* value){ - int typeId = qRegisterMetaType("PowerPoint::Shape*", &value); - setProperty("TriggerShape", QVariant(typeId, &value)); -} - -inline PowerPoint::MsoAnimTriggerType Timing::TriggerType() const -{ - QVariant qax_result = property("TriggerType"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimTriggerType*)qax_result.constData(); -} -inline void Timing::SetTriggerType(PowerPoint::MsoAnimTriggerType value){ setProperty("TriggerType", QVariant(value)); } - - -inline double EffectParameters::Amount() const -{ - QVariant qax_result = property("Amount"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void EffectParameters::SetAmount(double value){ setProperty("Amount", QVariant(value)); } - -inline PowerPoint::Application* EffectParameters::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* EffectParameters::Color2() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("Color2"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimDirection EffectParameters::Direction() const -{ - QVariant qax_result = property("Direction"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimDirection*)qax_result.constData(); -} -inline void EffectParameters::SetDirection(PowerPoint::MsoAnimDirection value){ setProperty("Direction", QVariant(value)); } - -inline QString EffectParameters::FontName() const -{ - QVariant qax_result = property("FontName"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void EffectParameters::SetFontName(const QString& value){ setProperty("FontName", QVariant(value)); } - -inline IDispatch* EffectParameters::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState EffectParameters::Relative() const -{ - QVariant qax_result = property("Relative"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void EffectParameters::SetRelative(Office::MsoTriState value){ setProperty("Relative", QVariant(value)); } - -inline double EffectParameters::Size() const -{ - QVariant qax_result = property("Size"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void EffectParameters::SetSize(double value){ setProperty("Size", QVariant(value)); } - - -inline PowerPoint::MsoAnimAfterEffect EffectInformation::AfterEffect() const -{ - QVariant qax_result = property("AfterEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimAfterEffect*)qax_result.constData(); -} - -inline Office::MsoTriState EffectInformation::AnimateBackground() const -{ - QVariant qax_result = property("AnimateBackground"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline Office::MsoTriState EffectInformation::AnimateTextInReverse() const -{ - QVariant qax_result = property("AnimateTextInReverse"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} - -inline PowerPoint::Application* EffectInformation::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimateByLevel EffectInformation::BuildByLevelEffect() const -{ - QVariant qax_result = property("BuildByLevelEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimateByLevel*)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* EffectInformation::Dim() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("Dim"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline IDispatch* EffectInformation::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PlaySettings* EffectInformation::PlaySettings() const -{ - PowerPoint::PlaySettings* qax_pointer = 0; - qRegisterMetaType("PlaySettings*", &qax_pointer); - qRegisterMetaType("PlaySettings", qax_pointer); - QVariant qax_result = property("PlaySettings"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PlaySettings**)qax_result.constData(); -} - -inline PowerPoint::SoundEffect* EffectInformation::SoundEffect() const -{ - PowerPoint::SoundEffect* qax_pointer = 0; - qRegisterMetaType("SoundEffect*", &qax_pointer); - qRegisterMetaType("SoundEffect", qax_pointer); - QVariant qax_result = property("SoundEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SoundEffect**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimTextUnitEffect EffectInformation::TextUnitEffect() const -{ - QVariant qax_result = property("TextUnitEffect"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimTextUnitEffect*)qax_result.constData(); -} - - -inline PowerPoint::Application* AnimationBehaviors::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int AnimationBehaviors::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* AnimationBehaviors::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* AnimationBehaviors::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::AnimationBehavior* AnimationBehaviors::Add(PowerPoint::MsoAnimType Type) -{ - PowerPoint::AnimationBehavior* qax_result = 0; - qRegisterMetaType("AnimationBehavior*", &qax_result); - qRegisterMetaType("AnimationBehavior", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::AnimationBehavior* AnimationBehaviors::Add(PowerPoint::MsoAnimType Type, int Index) -{ - PowerPoint::AnimationBehavior* qax_result = 0; - qRegisterMetaType("AnimationBehavior*", &qax_result); - qRegisterMetaType("AnimationBehavior", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::AnimationBehavior* AnimationBehaviors::Item(int Index) -{ - PowerPoint::AnimationBehavior* qax_result = 0; - qRegisterMetaType("AnimationBehavior*", &qax_result); - qRegisterMetaType("AnimationBehavior", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant AnimationBehaviors::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - - -inline PowerPoint::MsoAnimAccumulate AnimationBehavior::Accumulate() const -{ - QVariant qax_result = property("Accumulate"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimAccumulate*)qax_result.constData(); -} -inline void AnimationBehavior::SetAccumulate(PowerPoint::MsoAnimAccumulate value){ setProperty("Accumulate", QVariant(value)); } - -inline PowerPoint::MsoAnimAdditive AnimationBehavior::Additive() const -{ - QVariant qax_result = property("Additive"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimAdditive*)qax_result.constData(); -} -inline void AnimationBehavior::SetAdditive(PowerPoint::MsoAnimAdditive value){ setProperty("Additive", QVariant(value)); } - -inline PowerPoint::Application* AnimationBehavior::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ColorEffect* AnimationBehavior::ColorEffect() const -{ - PowerPoint::ColorEffect* qax_pointer = 0; - qRegisterMetaType("ColorEffect*", &qax_pointer); - qRegisterMetaType("ColorEffect", qax_pointer); - QVariant qax_result = property("ColorEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorEffect**)qax_result.constData(); -} - -inline PowerPoint::CommandEffect* AnimationBehavior::CommandEffect() const -{ - PowerPoint::CommandEffect* qax_pointer = 0; - qRegisterMetaType("CommandEffect*", &qax_pointer); - qRegisterMetaType("CommandEffect", qax_pointer); - QVariant qax_result = property("CommandEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::CommandEffect**)qax_result.constData(); -} - -inline PowerPoint::FilterEffect* AnimationBehavior::FilterEffect() const -{ - PowerPoint::FilterEffect* qax_pointer = 0; - qRegisterMetaType("FilterEffect*", &qax_pointer); - qRegisterMetaType("FilterEffect", qax_pointer); - QVariant qax_result = property("FilterEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::FilterEffect**)qax_result.constData(); -} - -inline PowerPoint::MotionEffect* AnimationBehavior::MotionEffect() const -{ - PowerPoint::MotionEffect* qax_pointer = 0; - qRegisterMetaType("MotionEffect*", &qax_pointer); - qRegisterMetaType("MotionEffect", qax_pointer); - QVariant qax_result = property("MotionEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MotionEffect**)qax_result.constData(); -} - -inline IDispatch* AnimationBehavior::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::PropertyEffect* AnimationBehavior::PropertyEffect() const -{ - PowerPoint::PropertyEffect* qax_pointer = 0; - qRegisterMetaType("PropertyEffect*", &qax_pointer); - qRegisterMetaType("PropertyEffect", qax_pointer); - QVariant qax_result = property("PropertyEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::PropertyEffect**)qax_result.constData(); -} - -inline PowerPoint::RotationEffect* AnimationBehavior::RotationEffect() const -{ - PowerPoint::RotationEffect* qax_pointer = 0; - qRegisterMetaType("RotationEffect*", &qax_pointer); - qRegisterMetaType("RotationEffect", qax_pointer); - QVariant qax_result = property("RotationEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::RotationEffect**)qax_result.constData(); -} - -inline PowerPoint::ScaleEffect* AnimationBehavior::ScaleEffect() const -{ - PowerPoint::ScaleEffect* qax_pointer = 0; - qRegisterMetaType("ScaleEffect*", &qax_pointer); - qRegisterMetaType("ScaleEffect", qax_pointer); - QVariant qax_result = property("ScaleEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ScaleEffect**)qax_result.constData(); -} - -inline PowerPoint::SetEffect* AnimationBehavior::SetEffect() const -{ - PowerPoint::SetEffect* qax_pointer = 0; - qRegisterMetaType("SetEffect*", &qax_pointer); - qRegisterMetaType("SetEffect", qax_pointer); - QVariant qax_result = property("SetEffect"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::SetEffect**)qax_result.constData(); -} - -inline PowerPoint::Timing* AnimationBehavior::Timing() const -{ - PowerPoint::Timing* qax_pointer = 0; - qRegisterMetaType("Timing*", &qax_pointer); - qRegisterMetaType("Timing", qax_pointer); - QVariant qax_result = property("Timing"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Timing**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimType AnimationBehavior::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimType*)qax_result.constData(); -} -inline void AnimationBehavior::SetType(PowerPoint::MsoAnimType value){ setProperty("Type", QVariant(value)); } - -inline void AnimationBehavior::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline PowerPoint::Application* MotionEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline double MotionEffect::ByX() const -{ - QVariant qax_result = property("ByX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetByX(double value){ setProperty("ByX", QVariant(value)); } - -inline double MotionEffect::ByY() const -{ - QVariant qax_result = property("ByY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetByY(double value){ setProperty("ByY", QVariant(value)); } - -inline double MotionEffect::FromX() const -{ - QVariant qax_result = property("FromX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetFromX(double value){ setProperty("FromX", QVariant(value)); } - -inline double MotionEffect::FromY() const -{ - QVariant qax_result = property("FromY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetFromY(double value){ setProperty("FromY", QVariant(value)); } - -inline IDispatch* MotionEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline QString MotionEffect::Path() const -{ - QVariant qax_result = property("Path"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void MotionEffect::SetPath(const QString& value){ setProperty("Path", QVariant(value)); } - -inline double MotionEffect::ToX() const -{ - QVariant qax_result = property("ToX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetToX(double value){ setProperty("ToX", QVariant(value)); } - -inline double MotionEffect::ToY() const -{ - QVariant qax_result = property("ToY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void MotionEffect::SetToY(double value){ setProperty("ToY", QVariant(value)); } - - -inline PowerPoint::Application* ColorEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* ColorEffect::By() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("By"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* ColorEffect::From() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("From"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - -inline IDispatch* ColorEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::ColorFormat* ColorEffect::To() const -{ - PowerPoint::ColorFormat* qax_pointer = 0; - qRegisterMetaType("ColorFormat*", &qax_pointer); - qRegisterMetaType("ColorFormat", qax_pointer); - QVariant qax_result = property("To"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::ColorFormat**)qax_result.constData(); -} - - -inline PowerPoint::Application* ScaleEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline double ScaleEffect::ByX() const -{ - QVariant qax_result = property("ByX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetByX(double value){ setProperty("ByX", QVariant(value)); } - -inline double ScaleEffect::ByY() const -{ - QVariant qax_result = property("ByY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetByY(double value){ setProperty("ByY", QVariant(value)); } - -inline double ScaleEffect::FromX() const -{ - QVariant qax_result = property("FromX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetFromX(double value){ setProperty("FromX", QVariant(value)); } - -inline double ScaleEffect::FromY() const -{ - QVariant qax_result = property("FromY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetFromY(double value){ setProperty("FromY", QVariant(value)); } - -inline IDispatch* ScaleEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double ScaleEffect::ToX() const -{ - QVariant qax_result = property("ToX"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetToX(double value){ setProperty("ToX", QVariant(value)); } - -inline double ScaleEffect::ToY() const -{ - QVariant qax_result = property("ToY"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void ScaleEffect::SetToY(double value){ setProperty("ToY", QVariant(value)); } - - -inline PowerPoint::Application* RotationEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline double RotationEffect::By() const -{ - QVariant qax_result = property("By"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void RotationEffect::SetBy(double value){ setProperty("By", QVariant(value)); } - -inline double RotationEffect::From() const -{ - QVariant qax_result = property("From"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void RotationEffect::SetFrom(double value){ setProperty("From", QVariant(value)); } - -inline IDispatch* RotationEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double RotationEffect::To() const -{ - QVariant qax_result = property("To"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void RotationEffect::SetTo(double value){ setProperty("To", QVariant(value)); } - - -inline PowerPoint::Application* PropertyEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QVariant PropertyEffect::From() const -{ - QVariant qax_result = property("From"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void PropertyEffect::SetFrom(const QVariant& value){ setProperty("From", QVariant(value)); } - -inline IDispatch* PropertyEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::AnimationPoints* PropertyEffect::Points() const -{ - PowerPoint::AnimationPoints* qax_pointer = 0; - qRegisterMetaType("AnimationPoints*", &qax_pointer); - qRegisterMetaType("AnimationPoints", qax_pointer); - QVariant qax_result = property("Points"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::AnimationPoints**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimProperty PropertyEffect::Property() const -{ - QVariant qax_result = property("Property"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimProperty*)qax_result.constData(); -} -inline void PropertyEffect::SetProperty(PowerPoint::MsoAnimProperty value){ setProperty("Property", QVariant(value)); } - -inline QVariant PropertyEffect::To() const -{ - QVariant qax_result = property("To"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void PropertyEffect::SetTo(const QVariant& value){ setProperty("To", QVariant(value)); } - - -inline PowerPoint::Application* AnimationPoints::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline int AnimationPoints::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* AnimationPoints::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState AnimationPoints::Smooth() const -{ - QVariant qax_result = property("Smooth"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void AnimationPoints::SetSmooth(Office::MsoTriState value){ setProperty("Smooth", QVariant(value)); } - -inline IUnknown* AnimationPoints::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::AnimationPoint* AnimationPoints::Add() -{ - PowerPoint::AnimationPoint* qax_result = 0; - qRegisterMetaType("AnimationPoint*", &qax_result); - qRegisterMetaType("AnimationPoint", qax_result); - void *_a[] = {(void*)&qax_result}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::AnimationPoint* AnimationPoints::Add(int Index) -{ - PowerPoint::AnimationPoint* qax_result = 0; - qRegisterMetaType("AnimationPoint*", &qax_result); - qRegisterMetaType("AnimationPoint", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::AnimationPoint* AnimationPoints::Item(int Index) -{ - PowerPoint::AnimationPoint* qax_result = 0; - qRegisterMetaType("AnimationPoint*", &qax_result); - qRegisterMetaType("AnimationPoint", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline QVariant AnimationPoints::_Index(int Index) -{ - QVariant qax_result; - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - - -inline PowerPoint::Application* AnimationPoint::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString AnimationPoint::Formula() const -{ - QVariant qax_result = property("Formula"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void AnimationPoint::SetFormula(const QString& value){ setProperty("Formula", QVariant(value)); } - -inline IDispatch* AnimationPoint::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline double AnimationPoint::Time() const -{ - QVariant qax_result = property("Time"); - Q_ASSERT(qax_result.isValid()); - return *(double*)qax_result.constData(); -} -inline void AnimationPoint::SetTime(double value){ setProperty("Time", QVariant(value)); } - -inline QVariant AnimationPoint::Value() const -{ - QVariant qax_result = property("Value"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void AnimationPoint::SetValue(const QVariant& value){ setProperty("Value", QVariant(value)); } - -inline void AnimationPoint::Delete() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); -} - - -inline IDispatch* CanvasShapes::Application() const -{ - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::Shape* CanvasShapes::Background() const -{ - PowerPoint::Shape* qax_pointer = 0; - qRegisterMetaType("Shape*", &qax_pointer); - qRegisterMetaType("Shape", qax_pointer); - QVariant qax_result = property("Background"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Shape**)qax_result.constData(); -} - -inline int CanvasShapes::Count() const -{ - QVariant qax_result = property("Count"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline int CanvasShapes::Creator() const -{ - QVariant qax_result = property("Creator"); - Q_ASSERT(qax_result.isValid()); - return *(int*)qax_result.constData(); -} - -inline IDispatch* CanvasShapes::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline IUnknown* CanvasShapes::_NewEnum() const -{ - QVariant qax_result = property("_NewEnum"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IUnknown**)qax_result.constData(); -} - -inline PowerPoint::Shape* CanvasShapes::AddCallout(Office::MsoCalloutType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddConnector(Office::MsoConnectorType Type, double BeginX, double BeginY, double EndX, double EndY) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 8, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddCurve(const QVariant& SafeArrayOfPoints) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 9, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddLabel(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 10, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddLine(double BeginX, double BeginY, double EndX, double EndY) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&BeginX, (void*)&BeginY, (void*)&EndX, (void*)&EndY}; - qt_metacall(QMetaObject::InvokeMetaMethod, 11, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 12, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width}; - qt_metacall(QMetaObject::InvokeMetaMethod, 13, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddPicture(const QString& FileName, Office::MsoTriState LinkToFile, Office::MsoTriState SaveWithDocument, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&FileName, (void*)&LinkToFile, (void*)&SaveWithDocument, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 14, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddPolyline(const QVariant& SafeArrayOfPoints) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&SafeArrayOfPoints}; - qt_metacall(QMetaObject::InvokeMetaMethod, 15, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddShape(Office::MsoAutoShapeType Type, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Type, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 16, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddTextEffect(Office::MsoPresetTextEffect PresetTextEffect, const QString& Text, const QString& FontName, double FontSize, Office::MsoTriState FontBold, Office::MsoTriState FontItalic, double Left, double Top) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&PresetTextEffect, (void*)&Text, (void*)&FontName, (void*)&FontSize, (void*)&FontBold, (void*)&FontItalic, (void*)&Left, (void*)&Top}; - qt_metacall(QMetaObject::InvokeMetaMethod, 17, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::AddTextbox(Office::MsoTextOrientation Orientation, double Left, double Top, double Width, double Height) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Orientation, (void*)&Left, (void*)&Top, (void*)&Width, (void*)&Height}; - qt_metacall(QMetaObject::InvokeMetaMethod, 18, _a); - return qax_result; -} - -inline PowerPoint::FreeformBuilder* CanvasShapes::BuildFreeform(Office::MsoEditingType EditingType, double X1, double Y1) -{ - PowerPoint::FreeformBuilder* qax_result = 0; - qRegisterMetaType("FreeformBuilder*", &qax_result); - qRegisterMetaType("FreeformBuilder", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&EditingType, (void*)&X1, (void*)&Y1}; - qt_metacall(QMetaObject::InvokeMetaMethod, 19, _a); - return qax_result; -} - -inline PowerPoint::Shape* CanvasShapes::Item(const QVariant& Index) -{ - PowerPoint::Shape* qax_result = 0; - qRegisterMetaType("Shape*", &qax_result); - qRegisterMetaType("Shape", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 20, _a); - return qax_result; -} - -inline PowerPoint::ShapeRange* CanvasShapes::Range(const QVariant& Index) -{ - PowerPoint::ShapeRange* qax_result = 0; - qRegisterMetaType("ShapeRange*", &qax_result); - qRegisterMetaType("ShapeRange", qax_result); - void *_a[] = {(void*)&qax_result, (void*)&Index}; - qt_metacall(QMetaObject::InvokeMetaMethod, 21, _a); - return qax_result; -} - -inline void CanvasShapes::SelectAll() -{ - void *_a[] = {0}; - qt_metacall(QMetaObject::InvokeMetaMethod, 22, _a); -} - - -inline bool AutoCorrect::DisplayAutoCorrectOptions() const -{ - QVariant qax_result = property("DisplayAutoCorrectOptions"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void AutoCorrect::SetDisplayAutoCorrectOptions(bool value){ setProperty("DisplayAutoCorrectOptions", QVariant(value)); } - -inline bool AutoCorrect::DisplayAutoLayoutOptions() const -{ - QVariant qax_result = property("DisplayAutoLayoutOptions"); - Q_ASSERT(qax_result.isValid()); - return *(bool*)qax_result.constData(); -} -inline void AutoCorrect::SetDisplayAutoLayoutOptions(bool value){ setProperty("DisplayAutoLayoutOptions", QVariant(value)); } - - -inline Office::MsoTriState Options::DisplayPasteOptions() const -{ - QVariant qax_result = property("DisplayPasteOptions"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void Options::SetDisplayPasteOptions(Office::MsoTriState value){ setProperty("DisplayPasteOptions", QVariant(value)); } - - -inline PowerPoint::Application* CommandEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline QString CommandEffect::Command() const -{ - QVariant qax_result = property("Command"); - Q_ASSERT(qax_result.isValid()); - return *(QString*)qax_result.constData(); -} -inline void CommandEffect::SetCommand(const QString& value){ setProperty("Command", QVariant(value)); } - -inline IDispatch* CommandEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimCommandType CommandEffect::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimCommandType*)qax_result.constData(); -} -inline void CommandEffect::SetType(PowerPoint::MsoAnimCommandType value){ setProperty("Type", QVariant(value)); } - - -inline PowerPoint::Application* FilterEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* FilterEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline Office::MsoTriState FilterEffect::Reveal() const -{ - QVariant qax_result = property("Reveal"); - Q_ASSERT(qax_result.isValid()); - return *(Office::MsoTriState*)qax_result.constData(); -} -inline void FilterEffect::SetReveal(Office::MsoTriState value){ setProperty("Reveal", QVariant(value)); } - -inline PowerPoint::MsoAnimFilterEffectSubtype FilterEffect::Subtype() const -{ - QVariant qax_result = property("Subtype"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimFilterEffectSubtype*)qax_result.constData(); -} -inline void FilterEffect::SetSubtype(PowerPoint::MsoAnimFilterEffectSubtype value){ setProperty("Subtype", QVariant(value)); } - -inline PowerPoint::MsoAnimFilterEffectType FilterEffect::Type() const -{ - QVariant qax_result = property("Type"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimFilterEffectType*)qax_result.constData(); -} -inline void FilterEffect::SetType(PowerPoint::MsoAnimFilterEffectType value){ setProperty("Type", QVariant(value)); } - - -inline PowerPoint::Application* SetEffect::Application() const -{ - PowerPoint::Application* qax_pointer = 0; - qRegisterMetaType("Application*", &qax_pointer); - qRegisterMetaType("Application", qax_pointer); - QVariant qax_result = property("Application"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::Application**)qax_result.constData(); -} - -inline IDispatch* SetEffect::Parent() const -{ - QVariant qax_result = property("Parent"); - if (!qax_result.constData()) return 0; - Q_ASSERT(qax_result.isValid()); - return *(IDispatch**)qax_result.constData(); -} - -inline PowerPoint::MsoAnimProperty SetEffect::Property() const -{ - QVariant qax_result = property("Property"); - Q_ASSERT(qax_result.isValid()); - return *(PowerPoint::MsoAnimProperty*)qax_result.constData(); -} -inline void SetEffect::SetProperty(PowerPoint::MsoAnimProperty value){ setProperty("Property", QVariant(value)); } - -inline QVariant SetEffect::To() const -{ - QVariant qax_result = property("To"); - Q_ASSERT(qax_result.isValid()); - return *(QVariant*)qax_result.constData(); -} -inline void SetEffect::SetTo(const QVariant& value){ setProperty("To", QVariant(value)); } - - - -#endif - -} - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Collection *t) -{ Q_ASSERT(!t); return new PowerPoint::Collection; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_Application *t) -{ Q_ASSERT(!t); return new PowerPoint::_Application; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_Global *t) -{ Q_ASSERT(!t); return new PowerPoint::_Global; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Application *t) -{ Q_ASSERT(!t); return new PowerPoint::Application; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Global *t) -{ Q_ASSERT(!t); return new PowerPoint::Global; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ColorFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::ColorFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideShowWindow *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideShowWindow; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Selection *t) -{ Q_ASSERT(!t); return new PowerPoint::Selection; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DocumentWindows *t) -{ Q_ASSERT(!t); return new PowerPoint::DocumentWindows; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideShowWindows *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideShowWindows; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DocumentWindow *t) -{ Q_ASSERT(!t); return new PowerPoint::DocumentWindow; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::View *t) -{ Q_ASSERT(!t); return new PowerPoint::View; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideShowView *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideShowView; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideShowSettings *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideShowSettings; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::NamedSlideShows *t) -{ Q_ASSERT(!t); return new PowerPoint::NamedSlideShows; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::NamedSlideShow *t) -{ Q_ASSERT(!t); return new PowerPoint::NamedSlideShow; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PrintOptions *t) -{ Q_ASSERT(!t); return new PowerPoint::PrintOptions; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PrintRanges *t) -{ Q_ASSERT(!t); return new PowerPoint::PrintRanges; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PrintRange *t) -{ Q_ASSERT(!t); return new PowerPoint::PrintRange; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AddIns *t) -{ Q_ASSERT(!t); return new PowerPoint::AddIns; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AddIn *t) -{ Q_ASSERT(!t); return new PowerPoint::AddIn; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Presentations *t) -{ Q_ASSERT(!t); return new PowerPoint::Presentations; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Presentation *t) -{ Q_ASSERT(!t); return new PowerPoint::Presentation; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Hyperlinks *t) -{ Q_ASSERT(!t); return new PowerPoint::Hyperlinks; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Hyperlink *t) -{ Q_ASSERT(!t); return new PowerPoint::Hyperlink; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PageSetup *t) -{ Q_ASSERT(!t); return new PowerPoint::PageSetup; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Fonts *t) -{ Q_ASSERT(!t); return new PowerPoint::Fonts; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ExtraColors *t) -{ Q_ASSERT(!t); return new PowerPoint::ExtraColors; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Slides *t) -{ Q_ASSERT(!t); return new PowerPoint::Slides; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_Slide *t) -{ Q_ASSERT(!t); return new PowerPoint::_Slide; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideRange *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideRange; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_Master *t) -{ Q_ASSERT(!t); return new PowerPoint::_Master; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Slide *t) -{ Q_ASSERT(!t); return new PowerPoint::Slide; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ColorSchemes *t) -{ Q_ASSERT(!t); return new PowerPoint::ColorSchemes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ColorScheme *t) -{ Q_ASSERT(!t); return new PowerPoint::ColorScheme; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::RGBColor *t) -{ Q_ASSERT(!t); return new PowerPoint::RGBColor; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SlideShowTransition *t) -{ Q_ASSERT(!t); return new PowerPoint::SlideShowTransition; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SoundEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::SoundEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SoundFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::SoundFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::HeadersFooters *t) -{ Q_ASSERT(!t); return new PowerPoint::HeadersFooters; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Shapes *t) -{ Q_ASSERT(!t); return new PowerPoint::Shapes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Placeholders *t) -{ Q_ASSERT(!t); return new PowerPoint::Placeholders; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PlaceholderFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::PlaceholderFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::FreeformBuilder *t) -{ Q_ASSERT(!t); return new PowerPoint::FreeformBuilder; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Shape *t) -{ Q_ASSERT(!t); return new PowerPoint::Shape; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ShapeRange *t) -{ Q_ASSERT(!t); return new PowerPoint::ShapeRange; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::GroupShapes *t) -{ Q_ASSERT(!t); return new PowerPoint::GroupShapes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Adjustments *t) -{ Q_ASSERT(!t); return new PowerPoint::Adjustments; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PictureFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::PictureFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::FillFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::FillFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::LineFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::LineFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ShadowFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::ShadowFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ConnectorFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::ConnectorFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextEffectFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::TextEffectFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ThreeDFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::ThreeDFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextFrame *t) -{ Q_ASSERT(!t); return new PowerPoint::TextFrame; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::CalloutFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::CalloutFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ShapeNodes *t) -{ Q_ASSERT(!t); return new PowerPoint::ShapeNodes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ShapeNode *t) -{ Q_ASSERT(!t); return new PowerPoint::ShapeNode; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::OLEFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::OLEFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::LinkFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::LinkFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ObjectVerbs *t) -{ Q_ASSERT(!t); return new PowerPoint::ObjectVerbs; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AnimationSettings *t) -{ Q_ASSERT(!t); return new PowerPoint::AnimationSettings; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ActionSettings *t) -{ Q_ASSERT(!t); return new PowerPoint::ActionSettings; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ActionSetting *t) -{ Q_ASSERT(!t); return new PowerPoint::ActionSetting; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PlaySettings *t) -{ Q_ASSERT(!t); return new PowerPoint::PlaySettings; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextRange *t) -{ Q_ASSERT(!t); return new PowerPoint::TextRange; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Ruler *t) -{ Q_ASSERT(!t); return new PowerPoint::Ruler; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::RulerLevels *t) -{ Q_ASSERT(!t); return new PowerPoint::RulerLevels; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::RulerLevel *t) -{ Q_ASSERT(!t); return new PowerPoint::RulerLevel; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TabStops *t) -{ Q_ASSERT(!t); return new PowerPoint::TabStops; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TabStop *t) -{ Q_ASSERT(!t); return new PowerPoint::TabStop; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Font *t) -{ Q_ASSERT(!t); return new PowerPoint::Font; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ParagraphFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::ParagraphFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::BulletFormat *t) -{ Q_ASSERT(!t); return new PowerPoint::BulletFormat; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextStyles *t) -{ Q_ASSERT(!t); return new PowerPoint::TextStyles; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextStyle *t) -{ Q_ASSERT(!t); return new PowerPoint::TextStyle; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextStyleLevels *t) -{ Q_ASSERT(!t); return new PowerPoint::TextStyleLevels; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TextStyleLevel *t) -{ Q_ASSERT(!t); return new PowerPoint::TextStyleLevel; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::HeaderFooter *t) -{ Q_ASSERT(!t); return new PowerPoint::HeaderFooter; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_Presentation *t) -{ Q_ASSERT(!t); return new PowerPoint::_Presentation; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Tags *t) -{ Q_ASSERT(!t); return new PowerPoint::Tags; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::OCXExtender *t) -{ Q_ASSERT(!t); return new PowerPoint::OCXExtender; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::OLEControl *t) -{ Q_ASSERT(!t); return new PowerPoint::OLEControl; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Table *t) -{ Q_ASSERT(!t); return new PowerPoint::Table; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Columns *t) -{ Q_ASSERT(!t); return new PowerPoint::Columns; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Column *t) -{ Q_ASSERT(!t); return new PowerPoint::Column; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Rows *t) -{ Q_ASSERT(!t); return new PowerPoint::Rows; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Row *t) -{ Q_ASSERT(!t); return new PowerPoint::Row; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::CellRange *t) -{ Q_ASSERT(!t); return new PowerPoint::CellRange; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Cell *t) -{ Q_ASSERT(!t); return new PowerPoint::Cell; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Borders *t) -{ Q_ASSERT(!t); return new PowerPoint::Borders; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Panes *t) -{ Q_ASSERT(!t); return new PowerPoint::Panes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Pane *t) -{ Q_ASSERT(!t); return new PowerPoint::Pane; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DefaultWebOptions *t) -{ Q_ASSERT(!t); return new PowerPoint::DefaultWebOptions; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::WebOptions *t) -{ Q_ASSERT(!t); return new PowerPoint::WebOptions; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PublishObjects *t) -{ Q_ASSERT(!t); return new PowerPoint::PublishObjects; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PublishObject *t) -{ Q_ASSERT(!t); return new PowerPoint::PublishObject; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Master *t) -{ Q_ASSERT(!t); return new PowerPoint::Master; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::_PowerRex *t) -{ Q_ASSERT(!t); return new PowerPoint::_PowerRex; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PowerRex *t) -{ Q_ASSERT(!t); return new PowerPoint::PowerRex; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Comments *t) -{ Q_ASSERT(!t); return new PowerPoint::Comments; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Comment *t) -{ Q_ASSERT(!t); return new PowerPoint::Comment; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Designs *t) -{ Q_ASSERT(!t); return new PowerPoint::Designs; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Design *t) -{ Q_ASSERT(!t); return new PowerPoint::Design; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DiagramNode *t) -{ Q_ASSERT(!t); return new PowerPoint::DiagramNode; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DiagramNodeChildren *t) -{ Q_ASSERT(!t); return new PowerPoint::DiagramNodeChildren; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::DiagramNodes *t) -{ Q_ASSERT(!t); return new PowerPoint::DiagramNodes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Diagram *t) -{ Q_ASSERT(!t); return new PowerPoint::Diagram; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::TimeLine *t) -{ Q_ASSERT(!t); return new PowerPoint::TimeLine; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Sequences *t) -{ Q_ASSERT(!t); return new PowerPoint::Sequences; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Sequence *t) -{ Q_ASSERT(!t); return new PowerPoint::Sequence; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Effect *t) -{ Q_ASSERT(!t); return new PowerPoint::Effect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Timing *t) -{ Q_ASSERT(!t); return new PowerPoint::Timing; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::EffectParameters *t) -{ Q_ASSERT(!t); return new PowerPoint::EffectParameters; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::EffectInformation *t) -{ Q_ASSERT(!t); return new PowerPoint::EffectInformation; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AnimationBehaviors *t) -{ Q_ASSERT(!t); return new PowerPoint::AnimationBehaviors; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AnimationBehavior *t) -{ Q_ASSERT(!t); return new PowerPoint::AnimationBehavior; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::MotionEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::MotionEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ColorEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::ColorEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::ScaleEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::ScaleEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::RotationEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::RotationEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::PropertyEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::PropertyEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AnimationPoints *t) -{ Q_ASSERT(!t); return new PowerPoint::AnimationPoints; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AnimationPoint *t) -{ Q_ASSERT(!t); return new PowerPoint::AnimationPoint; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::CanvasShapes *t) -{ Q_ASSERT(!t); return new PowerPoint::CanvasShapes; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::AutoCorrect *t) -{ Q_ASSERT(!t); return new PowerPoint::AutoCorrect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::Options *t) -{ Q_ASSERT(!t); return new PowerPoint::Options; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::CommandEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::CommandEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::FilterEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::FilterEffect; } - -template<> -inline void *qMetaTypeConstructHelper(const PowerPoint::SetEffect *t) -{ Q_ASSERT(!t); return new PowerPoint::SetEffect; } - -#endif - diff --git a/thirdparty/microsoft/ppt/lib/ppt.lib b/thirdparty/microsoft/ppt/lib/ppt.lib deleted file mode 100644 index 6ea8b05a..00000000 Binary files a/thirdparty/microsoft/ppt/lib/ppt.lib and /dev/null differ diff --git a/thirdparty/microsoft/ppt/ppt.pro b/thirdparty/microsoft/ppt/ppt.pro deleted file mode 100644 index c6e50204..00000000 --- a/thirdparty/microsoft/ppt/ppt.pro +++ /dev/null @@ -1,23 +0,0 @@ -TEMPLATE = lib -CONFIG += staticlib release warn_off - -DESTDIR = "lib" - -win32 { - - CONFIG += qaxcontainer - - # The folowing COM wrappers are generated from dumcpp - # - TYPELIBS = $$system(dumpcpp -getfile {91493440-5A91-11CF-8700-00AA0060263B}) - TYPELIBS += $$system(dumpcpp -getfile {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}) - - SOURCES += msppt.cpp \ - mso.cpp - - HEADERS += msppt.h \ - mso.h - -} - - diff --git a/thirdparty/microsoft/rts/include/RTSCOM.h b/thirdparty/microsoft/rts/include/RTSCOM.h deleted file mode 100644 index 22a9c2b5..00000000 --- a/thirdparty/microsoft/rts/include/RTSCOM.h +++ /dev/null @@ -1,2215 +0,0 @@ -//-------------------------------------------------------------------------- -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// File: rtscom.h -// Microsoft Tablet PC API definitions -// -//-------------------------------------------------------------------------- - - - - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 7.00.0499 */ -/* Compiler settings for rtscom.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 500 -#endif - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCSAL_H_VERSION__ -#define __REQUIRED_RPCSAL_H_VERSION__ 100 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCNDR_H_VERSION__ - - -#ifndef __rtscom_h__ -#define __rtscom_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifndef __IRealTimeStylus_FWD_DEFINED__ -#define __IRealTimeStylus_FWD_DEFINED__ -typedef interface IRealTimeStylus IRealTimeStylus; -#endif /* __IRealTimeStylus_FWD_DEFINED__ */ - - -#ifndef __IRealTimeStylus2_FWD_DEFINED__ -#define __IRealTimeStylus2_FWD_DEFINED__ -typedef interface IRealTimeStylus2 IRealTimeStylus2; -#endif /* __IRealTimeStylus2_FWD_DEFINED__ */ - - -#ifndef __IRealTimeStylusSynchronization_FWD_DEFINED__ -#define __IRealTimeStylusSynchronization_FWD_DEFINED__ -typedef interface IRealTimeStylusSynchronization IRealTimeStylusSynchronization; -#endif /* __IRealTimeStylusSynchronization_FWD_DEFINED__ */ - - -#ifndef __IStrokeBuilder_FWD_DEFINED__ -#define __IStrokeBuilder_FWD_DEFINED__ -typedef interface IStrokeBuilder IStrokeBuilder; -#endif /* __IStrokeBuilder_FWD_DEFINED__ */ - - -#ifndef __IStylusPlugin_FWD_DEFINED__ -#define __IStylusPlugin_FWD_DEFINED__ -typedef interface IStylusPlugin IStylusPlugin; -#endif /* __IStylusPlugin_FWD_DEFINED__ */ - - -#ifndef __IStylusSyncPlugin_FWD_DEFINED__ -#define __IStylusSyncPlugin_FWD_DEFINED__ -typedef interface IStylusSyncPlugin IStylusSyncPlugin; -#endif /* __IStylusSyncPlugin_FWD_DEFINED__ */ - - -#ifndef __IStylusAsyncPlugin_FWD_DEFINED__ -#define __IStylusAsyncPlugin_FWD_DEFINED__ -typedef interface IStylusAsyncPlugin IStylusAsyncPlugin; -#endif /* __IStylusAsyncPlugin_FWD_DEFINED__ */ - - -#ifndef __IDynamicRenderer_FWD_DEFINED__ -#define __IDynamicRenderer_FWD_DEFINED__ -typedef interface IDynamicRenderer IDynamicRenderer; -#endif /* __IDynamicRenderer_FWD_DEFINED__ */ - - -#ifndef __IGestureRecognizer_FWD_DEFINED__ -#define __IGestureRecognizer_FWD_DEFINED__ -typedef interface IGestureRecognizer IGestureRecognizer; -#endif /* __IGestureRecognizer_FWD_DEFINED__ */ - - -#ifndef __RealTimeStylus_FWD_DEFINED__ -#define __RealTimeStylus_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class RealTimeStylus RealTimeStylus; -#else -typedef struct RealTimeStylus RealTimeStylus; -#endif /* __cplusplus */ - -#endif /* __RealTimeStylus_FWD_DEFINED__ */ - - -#ifndef __DynamicRenderer_FWD_DEFINED__ -#define __DynamicRenderer_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class DynamicRenderer DynamicRenderer; -#else -typedef struct DynamicRenderer DynamicRenderer; -#endif /* __cplusplus */ - -#endif /* __DynamicRenderer_FWD_DEFINED__ */ - - -#ifndef __GestureRecognizer_FWD_DEFINED__ -#define __GestureRecognizer_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class GestureRecognizer GestureRecognizer; -#else -typedef struct GestureRecognizer GestureRecognizer; -#endif /* __cplusplus */ - -#endif /* __GestureRecognizer_FWD_DEFINED__ */ - - -#ifndef __StrokeBuilder_FWD_DEFINED__ -#define __StrokeBuilder_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class StrokeBuilder StrokeBuilder; -#else -typedef struct StrokeBuilder StrokeBuilder; -#endif /* __cplusplus */ - -#endif /* __StrokeBuilder_FWD_DEFINED__ */ - - -/* header files for imported files */ -#include "oaidl.h" -#include "ocidl.h" -#include "tpcshrd.h" -#include "msinkaut.h" - -#ifdef __cplusplus -extern "C"{ -#endif - - -/* interface __MIDL_itf_rtscom_0000_0000 */ -/* [local] */ - - - - - - - - - -typedef -enum RealTimeStylusDataInterest - { RTSDI_AllData = 0xffffffff, - RTSDI_None = 0, - RTSDI_Error = 0x1, - RTSDI_RealTimeStylusEnabled = 0x2, - RTSDI_RealTimeStylusDisabled = 0x4, - RTSDI_StylusNew = 0x8, - RTSDI_StylusInRange = 0x10, - RTSDI_InAirPackets = 0x20, - RTSDI_StylusOutOfRange = 0x40, - RTSDI_StylusDown = 0x80, - RTSDI_Packets = 0x100, - RTSDI_StylusUp = 0x200, - RTSDI_StylusButtonUp = 0x400, - RTSDI_StylusButtonDown = 0x800, - RTSDI_SystemEvents = 0x1000, - RTSDI_TabletAdded = 0x2000, - RTSDI_TabletRemoved = 0x4000, - RTSDI_CustomStylusDataAdded = 0x8000, - RTSDI_UpdateMapping = 0x10000, - RTSDI_DefaultEvents = ( ( ( ( ( ( RTSDI_RealTimeStylusEnabled | RTSDI_RealTimeStylusDisabled ) | RTSDI_StylusDown ) | RTSDI_Packets ) | RTSDI_StylusUp ) | RTSDI_SystemEvents ) | RTSDI_CustomStylusDataAdded ) - } RealTimeStylusDataInterest; - -typedef CURSOR_ID STYLUS_ID; - -typedef struct StylusInfo - { - TABLET_CONTEXT_ID tcid; - STYLUS_ID cid; - BOOL bIsInvertedCursor; - } StylusInfo; - -typedef -enum StylusQueue - { SyncStylusQueue = 0x1, - AsyncStylusQueueImmediate = 0x2, - AsyncStylusQueue = 0x3 - } StylusQueue; - -typedef -enum RealTimeStylusLockType - { RTSLT_ObjLock = 0x1, - RTSLT_SyncEventLock = 0x2, - RTSLT_AsyncEventLock = 0x4, - RTSLT_ExcludeCallback = 0x8, - RTSLT_SyncObjLock = 0xb, - RTSLT_AsyncObjLock = 0xd - } RealTimeStylusLockType; - -typedef struct GESTURE_DATA - { - int gestureId; - int recoConfidence; - int strokeCount; - } GESTURE_DATA; - -typedef struct DYNAMIC_RENDERER_CACHED_DATA - { - LONG strokeId; - IDynamicRenderer *dynamicRenderer; - } DYNAMIC_RENDERER_CACHED_DATA; - -#if defined(__cplusplus) -const GUID GUID_GESTURE_DATA = {0x41E4EC0F, 0x26AA, 0x455A, {0x9A, 0xA5, 0x2C, 0xD3, 0x6C, 0xF6, 0x3F, 0xB9}}; -const GUID GUID_DYNAMIC_RENDERER_CACHED_DATA = {0xBF531B92, 0x25BF, 0x4A95, {0x89, 0xAD, 0x0E, 0x47, 0x6B, 0x34, 0xB4, 0xF5}}; -#endif // of if defined(__cplusplus) - - -extern RPC_IF_HANDLE __MIDL_itf_rtscom_0000_0000_v0_0_c_ifspec; -extern RPC_IF_HANDLE __MIDL_itf_rtscom_0000_0000_v0_0_s_ifspec; - - -#ifndef __TPCRTSLib_LIBRARY_DEFINED__ -#define __TPCRTSLib_LIBRARY_DEFINED__ - -/* library TPCRTSLib */ -/* [helpstring][version][uuid] */ - - -EXTERN_C const IID LIBID_TPCRTSLib; - -#ifndef __IRealTimeStylus_INTERFACE_DEFINED__ -#define __IRealTimeStylus_INTERFACE_DEFINED__ - -/* interface IRealTimeStylus */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IRealTimeStylus; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A8BB5D22-3144-4a7b-93CD-F34A16BE513A") - IRealTimeStylus : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Enabled( - /* [retval][out] */ __RPC__out BOOL *pfEnable) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Enabled( - /* [in] */ BOOL fEnable) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HWND( - /* [retval][out] */ __RPC__out HANDLE_PTR *phwnd) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_HWND( - /* [in] */ HANDLE_PTR hwnd) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WindowInputRectangle( - /* [retval][out] */ __RPC__out RECT *prcWndInputRect) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_WindowInputRectangle( - /* [in] */ __RPC__in const RECT *prcWndInputRect) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddStylusSyncPlugin( - /* [in] */ ULONG iIndex, - /* [in] */ __RPC__in_opt IStylusSyncPlugin *piPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveStylusSyncPlugin( - /* [in] */ ULONG iIndex, - /* [out][in] */ __RPC__deref_inout_opt IStylusSyncPlugin **ppiPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveAllStylusSyncPlugins( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStylusSyncPlugin( - /* [in] */ ULONG iIndex, - /* [out] */ __RPC__deref_out_opt IStylusSyncPlugin **ppiPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStylusSyncPluginCount( - /* [out] */ __RPC__out ULONG *pcPlugins) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddStylusAsyncPlugin( - /* [in] */ ULONG iIndex, - /* [in] */ __RPC__in_opt IStylusAsyncPlugin *piPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveStylusAsyncPlugin( - /* [in] */ ULONG iIndex, - /* [out][in] */ __RPC__deref_inout_opt IStylusAsyncPlugin **ppiPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE RemoveAllStylusAsyncPlugins( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStylusAsyncPlugin( - /* [in] */ ULONG iIndex, - /* [out] */ __RPC__deref_out_opt IStylusAsyncPlugin **ppiPlugin) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStylusAsyncPluginCount( - /* [out] */ __RPC__out ULONG *pcPlugins) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ChildRealTimeStylusPlugin( - /* [retval][out] */ __RPC__deref_out_opt IRealTimeStylus **ppiRTS) = 0; - - virtual /* [propputref] */ HRESULT STDMETHODCALLTYPE putref_ChildRealTimeStylusPlugin( - /* [unique][in] */ __RPC__in_opt IRealTimeStylus *piRTS) = 0; - - virtual HRESULT STDMETHODCALLTYPE AddCustomStylusDataToQueue( - /* [in] */ StylusQueue sq, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) BYTE *pbData) = 0; - - virtual HRESULT STDMETHODCALLTYPE ClearStylusQueues( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetAllTabletsMode( - /* [in] */ BOOL fUseMouseForInput) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetSingleTabletMode( - /* [in] */ __RPC__in_opt IInkTablet *piTablet) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTablet( - /* [retval][out] */ __RPC__deref_out_opt IInkTablet **ppiSingleTablet) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTabletContextIdFromTablet( - /* [in] */ __RPC__in_opt IInkTablet *piTablet, - /* [retval][out] */ __RPC__out TABLET_CONTEXT_ID *ptcid) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetTabletFromTabletContextId( - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [retval][out] */ __RPC__deref_out_opt IInkTablet **ppiTablet) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetAllTabletContextIds( - /* [out][in] */ __RPC__inout ULONG *pcTcidCount, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcTcidCount) TABLET_CONTEXT_ID **ppTcids) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStyluses( - /* [retval][out] */ __RPC__deref_out_opt IInkCursors **ppiInkCursors) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetStylusForId( - /* [in] */ STYLUS_ID sid, - /* [retval][out] */ __RPC__deref_out_opt IInkCursor **ppiInkCursor) = 0; - - virtual HRESULT STDMETHODCALLTYPE SetDesiredPacketDescription( - /* [range][in] */ ULONG cProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cProperties) const GUID *pPropertyGuids) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetDesiredPacketDescription( - /* [out][in] */ __RPC__inout ULONG *pcProperties, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcProperties) GUID **ppPropertyGuids) = 0; - - virtual HRESULT STDMETHODCALLTYPE GetPacketDescriptionData( - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [unique][out][in] */ __RPC__inout_opt FLOAT *pfInkToDeviceScaleX, - /* [unique][out][in] */ __RPC__inout_opt FLOAT *pfInkToDeviceScaleY, - /* [out][in] */ __RPC__inout ULONG *pcPacketProperties, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcPacketProperties) PACKET_PROPERTY **ppPacketProperties) = 0; - - }; - -#else /* C style interface */ - - typedef struct IRealTimeStylusVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IRealTimeStylus * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IRealTimeStylus * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IRealTimeStylus * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Enabled )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__out BOOL *pfEnable); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Enabled )( - IRealTimeStylus * This, - /* [in] */ BOOL fEnable); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HWND )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__out HANDLE_PTR *phwnd); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_HWND )( - IRealTimeStylus * This, - /* [in] */ HANDLE_PTR hwnd); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WindowInputRectangle )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__out RECT *prcWndInputRect); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_WindowInputRectangle )( - IRealTimeStylus * This, - /* [in] */ __RPC__in const RECT *prcWndInputRect); - - HRESULT ( STDMETHODCALLTYPE *AddStylusSyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [in] */ __RPC__in_opt IStylusSyncPlugin *piPlugin); - - HRESULT ( STDMETHODCALLTYPE *RemoveStylusSyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [out][in] */ __RPC__deref_inout_opt IStylusSyncPlugin **ppiPlugin); - - HRESULT ( STDMETHODCALLTYPE *RemoveAllStylusSyncPlugins )( - IRealTimeStylus * This); - - HRESULT ( STDMETHODCALLTYPE *GetStylusSyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [out] */ __RPC__deref_out_opt IStylusSyncPlugin **ppiPlugin); - - HRESULT ( STDMETHODCALLTYPE *GetStylusSyncPluginCount )( - IRealTimeStylus * This, - /* [out] */ __RPC__out ULONG *pcPlugins); - - HRESULT ( STDMETHODCALLTYPE *AddStylusAsyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [in] */ __RPC__in_opt IStylusAsyncPlugin *piPlugin); - - HRESULT ( STDMETHODCALLTYPE *RemoveStylusAsyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [out][in] */ __RPC__deref_inout_opt IStylusAsyncPlugin **ppiPlugin); - - HRESULT ( STDMETHODCALLTYPE *RemoveAllStylusAsyncPlugins )( - IRealTimeStylus * This); - - HRESULT ( STDMETHODCALLTYPE *GetStylusAsyncPlugin )( - IRealTimeStylus * This, - /* [in] */ ULONG iIndex, - /* [out] */ __RPC__deref_out_opt IStylusAsyncPlugin **ppiPlugin); - - HRESULT ( STDMETHODCALLTYPE *GetStylusAsyncPluginCount )( - IRealTimeStylus * This, - /* [out] */ __RPC__out ULONG *pcPlugins); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ChildRealTimeStylusPlugin )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__deref_out_opt IRealTimeStylus **ppiRTS); - - /* [propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_ChildRealTimeStylusPlugin )( - IRealTimeStylus * This, - /* [unique][in] */ __RPC__in_opt IRealTimeStylus *piRTS); - - HRESULT ( STDMETHODCALLTYPE *AddCustomStylusDataToQueue )( - IRealTimeStylus * This, - /* [in] */ StylusQueue sq, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) BYTE *pbData); - - HRESULT ( STDMETHODCALLTYPE *ClearStylusQueues )( - IRealTimeStylus * This); - - HRESULT ( STDMETHODCALLTYPE *SetAllTabletsMode )( - IRealTimeStylus * This, - /* [in] */ BOOL fUseMouseForInput); - - HRESULT ( STDMETHODCALLTYPE *SetSingleTabletMode )( - IRealTimeStylus * This, - /* [in] */ __RPC__in_opt IInkTablet *piTablet); - - HRESULT ( STDMETHODCALLTYPE *GetTablet )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__deref_out_opt IInkTablet **ppiSingleTablet); - - HRESULT ( STDMETHODCALLTYPE *GetTabletContextIdFromTablet )( - IRealTimeStylus * This, - /* [in] */ __RPC__in_opt IInkTablet *piTablet, - /* [retval][out] */ __RPC__out TABLET_CONTEXT_ID *ptcid); - - HRESULT ( STDMETHODCALLTYPE *GetTabletFromTabletContextId )( - IRealTimeStylus * This, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [retval][out] */ __RPC__deref_out_opt IInkTablet **ppiTablet); - - HRESULT ( STDMETHODCALLTYPE *GetAllTabletContextIds )( - IRealTimeStylus * This, - /* [out][in] */ __RPC__inout ULONG *pcTcidCount, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcTcidCount) TABLET_CONTEXT_ID **ppTcids); - - HRESULT ( STDMETHODCALLTYPE *GetStyluses )( - IRealTimeStylus * This, - /* [retval][out] */ __RPC__deref_out_opt IInkCursors **ppiInkCursors); - - HRESULT ( STDMETHODCALLTYPE *GetStylusForId )( - IRealTimeStylus * This, - /* [in] */ STYLUS_ID sid, - /* [retval][out] */ __RPC__deref_out_opt IInkCursor **ppiInkCursor); - - HRESULT ( STDMETHODCALLTYPE *SetDesiredPacketDescription )( - IRealTimeStylus * This, - /* [range][in] */ ULONG cProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cProperties) const GUID *pPropertyGuids); - - HRESULT ( STDMETHODCALLTYPE *GetDesiredPacketDescription )( - IRealTimeStylus * This, - /* [out][in] */ __RPC__inout ULONG *pcProperties, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcProperties) GUID **ppPropertyGuids); - - HRESULT ( STDMETHODCALLTYPE *GetPacketDescriptionData )( - IRealTimeStylus * This, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [unique][out][in] */ __RPC__inout_opt FLOAT *pfInkToDeviceScaleX, - /* [unique][out][in] */ __RPC__inout_opt FLOAT *pfInkToDeviceScaleY, - /* [out][in] */ __RPC__inout ULONG *pcPacketProperties, - /* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*pcPacketProperties) PACKET_PROPERTY **ppPacketProperties); - - END_INTERFACE - } IRealTimeStylusVtbl; - - interface IRealTimeStylus - { - CONST_VTBL struct IRealTimeStylusVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IRealTimeStylus_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IRealTimeStylus_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IRealTimeStylus_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IRealTimeStylus_get_Enabled(This,pfEnable) \ - ( (This)->lpVtbl -> get_Enabled(This,pfEnable) ) - -#define IRealTimeStylus_put_Enabled(This,fEnable) \ - ( (This)->lpVtbl -> put_Enabled(This,fEnable) ) - -#define IRealTimeStylus_get_HWND(This,phwnd) \ - ( (This)->lpVtbl -> get_HWND(This,phwnd) ) - -#define IRealTimeStylus_put_HWND(This,hwnd) \ - ( (This)->lpVtbl -> put_HWND(This,hwnd) ) - -#define IRealTimeStylus_get_WindowInputRectangle(This,prcWndInputRect) \ - ( (This)->lpVtbl -> get_WindowInputRectangle(This,prcWndInputRect) ) - -#define IRealTimeStylus_put_WindowInputRectangle(This,prcWndInputRect) \ - ( (This)->lpVtbl -> put_WindowInputRectangle(This,prcWndInputRect) ) - -#define IRealTimeStylus_AddStylusSyncPlugin(This,iIndex,piPlugin) \ - ( (This)->lpVtbl -> AddStylusSyncPlugin(This,iIndex,piPlugin) ) - -#define IRealTimeStylus_RemoveStylusSyncPlugin(This,iIndex,ppiPlugin) \ - ( (This)->lpVtbl -> RemoveStylusSyncPlugin(This,iIndex,ppiPlugin) ) - -#define IRealTimeStylus_RemoveAllStylusSyncPlugins(This) \ - ( (This)->lpVtbl -> RemoveAllStylusSyncPlugins(This) ) - -#define IRealTimeStylus_GetStylusSyncPlugin(This,iIndex,ppiPlugin) \ - ( (This)->lpVtbl -> GetStylusSyncPlugin(This,iIndex,ppiPlugin) ) - -#define IRealTimeStylus_GetStylusSyncPluginCount(This,pcPlugins) \ - ( (This)->lpVtbl -> GetStylusSyncPluginCount(This,pcPlugins) ) - -#define IRealTimeStylus_AddStylusAsyncPlugin(This,iIndex,piPlugin) \ - ( (This)->lpVtbl -> AddStylusAsyncPlugin(This,iIndex,piPlugin) ) - -#define IRealTimeStylus_RemoveStylusAsyncPlugin(This,iIndex,ppiPlugin) \ - ( (This)->lpVtbl -> RemoveStylusAsyncPlugin(This,iIndex,ppiPlugin) ) - -#define IRealTimeStylus_RemoveAllStylusAsyncPlugins(This) \ - ( (This)->lpVtbl -> RemoveAllStylusAsyncPlugins(This) ) - -#define IRealTimeStylus_GetStylusAsyncPlugin(This,iIndex,ppiPlugin) \ - ( (This)->lpVtbl -> GetStylusAsyncPlugin(This,iIndex,ppiPlugin) ) - -#define IRealTimeStylus_GetStylusAsyncPluginCount(This,pcPlugins) \ - ( (This)->lpVtbl -> GetStylusAsyncPluginCount(This,pcPlugins) ) - -#define IRealTimeStylus_get_ChildRealTimeStylusPlugin(This,ppiRTS) \ - ( (This)->lpVtbl -> get_ChildRealTimeStylusPlugin(This,ppiRTS) ) - -#define IRealTimeStylus_putref_ChildRealTimeStylusPlugin(This,piRTS) \ - ( (This)->lpVtbl -> putref_ChildRealTimeStylusPlugin(This,piRTS) ) - -#define IRealTimeStylus_AddCustomStylusDataToQueue(This,sq,pGuidId,cbData,pbData) \ - ( (This)->lpVtbl -> AddCustomStylusDataToQueue(This,sq,pGuidId,cbData,pbData) ) - -#define IRealTimeStylus_ClearStylusQueues(This) \ - ( (This)->lpVtbl -> ClearStylusQueues(This) ) - -#define IRealTimeStylus_SetAllTabletsMode(This,fUseMouseForInput) \ - ( (This)->lpVtbl -> SetAllTabletsMode(This,fUseMouseForInput) ) - -#define IRealTimeStylus_SetSingleTabletMode(This,piTablet) \ - ( (This)->lpVtbl -> SetSingleTabletMode(This,piTablet) ) - -#define IRealTimeStylus_GetTablet(This,ppiSingleTablet) \ - ( (This)->lpVtbl -> GetTablet(This,ppiSingleTablet) ) - -#define IRealTimeStylus_GetTabletContextIdFromTablet(This,piTablet,ptcid) \ - ( (This)->lpVtbl -> GetTabletContextIdFromTablet(This,piTablet,ptcid) ) - -#define IRealTimeStylus_GetTabletFromTabletContextId(This,tcid,ppiTablet) \ - ( (This)->lpVtbl -> GetTabletFromTabletContextId(This,tcid,ppiTablet) ) - -#define IRealTimeStylus_GetAllTabletContextIds(This,pcTcidCount,ppTcids) \ - ( (This)->lpVtbl -> GetAllTabletContextIds(This,pcTcidCount,ppTcids) ) - -#define IRealTimeStylus_GetStyluses(This,ppiInkCursors) \ - ( (This)->lpVtbl -> GetStyluses(This,ppiInkCursors) ) - -#define IRealTimeStylus_GetStylusForId(This,sid,ppiInkCursor) \ - ( (This)->lpVtbl -> GetStylusForId(This,sid,ppiInkCursor) ) - -#define IRealTimeStylus_SetDesiredPacketDescription(This,cProperties,pPropertyGuids) \ - ( (This)->lpVtbl -> SetDesiredPacketDescription(This,cProperties,pPropertyGuids) ) - -#define IRealTimeStylus_GetDesiredPacketDescription(This,pcProperties,ppPropertyGuids) \ - ( (This)->lpVtbl -> GetDesiredPacketDescription(This,pcProperties,ppPropertyGuids) ) - -#define IRealTimeStylus_GetPacketDescriptionData(This,tcid,pfInkToDeviceScaleX,pfInkToDeviceScaleY,pcPacketProperties,ppPacketProperties) \ - ( (This)->lpVtbl -> GetPacketDescriptionData(This,tcid,pfInkToDeviceScaleX,pfInkToDeviceScaleY,pcPacketProperties,ppPacketProperties) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IRealTimeStylus_INTERFACE_DEFINED__ */ - - -#ifndef __IRealTimeStylus2_INTERFACE_DEFINED__ -#define __IRealTimeStylus2_INTERFACE_DEFINED__ - -/* interface IRealTimeStylus2 */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IRealTimeStylus2; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("B5F2A6CD-3179-4a3e-B9C4-BB5865962BE2") - IRealTimeStylus2 : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FlicksEnabled( - /* [retval][out] */ __RPC__out BOOL *pfEnable) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_FlicksEnabled( - /* [in] */ BOOL fEnable) = 0; - - }; - -#else /* C style interface */ - - typedef struct IRealTimeStylus2Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IRealTimeStylus2 * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IRealTimeStylus2 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IRealTimeStylus2 * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FlicksEnabled )( - IRealTimeStylus2 * This, - /* [retval][out] */ __RPC__out BOOL *pfEnable); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_FlicksEnabled )( - IRealTimeStylus2 * This, - /* [in] */ BOOL fEnable); - - END_INTERFACE - } IRealTimeStylus2Vtbl; - - interface IRealTimeStylus2 - { - CONST_VTBL struct IRealTimeStylus2Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IRealTimeStylus2_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IRealTimeStylus2_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IRealTimeStylus2_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IRealTimeStylus2_get_FlicksEnabled(This,pfEnable) \ - ( (This)->lpVtbl -> get_FlicksEnabled(This,pfEnable) ) - -#define IRealTimeStylus2_put_FlicksEnabled(This,fEnable) \ - ( (This)->lpVtbl -> put_FlicksEnabled(This,fEnable) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IRealTimeStylus2_INTERFACE_DEFINED__ */ - - -#ifndef __IRealTimeStylusSynchronization_INTERFACE_DEFINED__ -#define __IRealTimeStylusSynchronization_INTERFACE_DEFINED__ - -/* interface IRealTimeStylusSynchronization */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IRealTimeStylusSynchronization; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("AA87EAB8-AB4A-4cea-B5CB-46D84C6A2509") - IRealTimeStylusSynchronization : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE AcquireLock( - /* [in] */ RealTimeStylusLockType lock) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReleaseLock( - /* [in] */ RealTimeStylusLockType lock) = 0; - - }; - -#else /* C style interface */ - - typedef struct IRealTimeStylusSynchronizationVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IRealTimeStylusSynchronization * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IRealTimeStylusSynchronization * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IRealTimeStylusSynchronization * This); - - HRESULT ( STDMETHODCALLTYPE *AcquireLock )( - IRealTimeStylusSynchronization * This, - /* [in] */ RealTimeStylusLockType lock); - - HRESULT ( STDMETHODCALLTYPE *ReleaseLock )( - IRealTimeStylusSynchronization * This, - /* [in] */ RealTimeStylusLockType lock); - - END_INTERFACE - } IRealTimeStylusSynchronizationVtbl; - - interface IRealTimeStylusSynchronization - { - CONST_VTBL struct IRealTimeStylusSynchronizationVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IRealTimeStylusSynchronization_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IRealTimeStylusSynchronization_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IRealTimeStylusSynchronization_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IRealTimeStylusSynchronization_AcquireLock(This,lock) \ - ( (This)->lpVtbl -> AcquireLock(This,lock) ) - -#define IRealTimeStylusSynchronization_ReleaseLock(This,lock) \ - ( (This)->lpVtbl -> ReleaseLock(This,lock) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IRealTimeStylusSynchronization_INTERFACE_DEFINED__ */ - - -#ifndef __IStrokeBuilder_INTERFACE_DEFINED__ -#define __IStrokeBuilder_INTERFACE_DEFINED__ - -/* interface IStrokeBuilder */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IStrokeBuilder; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A5FD4E2D-C44B-4092-9177-260905EB672B") - IStrokeBuilder : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE CreateStroke( - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) const LONG *pPackets, - /* [range][in] */ ULONG cPacketProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cPacketProperties) const PACKET_PROPERTY *pPacketProperties, - /* [in] */ FLOAT fInkToDeviceScaleX, - /* [in] */ FLOAT fInkToDeviceScaleY, - /* [out][in] */ __RPC__deref_inout_opt IInkStrokeDisp **ppIInkStroke) = 0; - - virtual HRESULT STDMETHODCALLTYPE BeginStroke( - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const LONG *pPacket, - /* [range][in] */ ULONG cPacketProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cPacketProperties) PACKET_PROPERTY *pPacketProperties, - /* [in] */ FLOAT fInkToDeviceScaleX, - /* [in] */ FLOAT fInkToDeviceScaleY, - /* [unique][out][in] */ __RPC__deref_opt_inout_opt IInkStrokeDisp **ppIInkStroke) = 0; - - virtual HRESULT STDMETHODCALLTYPE AppendPackets( - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) const LONG *pPackets) = 0; - - virtual HRESULT STDMETHODCALLTYPE EndStroke( - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [out][in] */ __RPC__deref_inout_opt IInkStrokeDisp **ppIInkStroke, - /* [out][in] */ __RPC__inout RECT *pDirtyRect) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Ink( - /* [retval][out] */ __RPC__deref_out_opt IInkDisp **ppiInkObj) = 0; - - virtual /* [propputref] */ HRESULT STDMETHODCALLTYPE putref_Ink( - /* [in] */ __RPC__in_opt IInkDisp *piInkObj) = 0; - - }; - -#else /* C style interface */ - - typedef struct IStrokeBuilderVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IStrokeBuilder * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IStrokeBuilder * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IStrokeBuilder * This); - - HRESULT ( STDMETHODCALLTYPE *CreateStroke )( - IStrokeBuilder * This, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) const LONG *pPackets, - /* [range][in] */ ULONG cPacketProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cPacketProperties) const PACKET_PROPERTY *pPacketProperties, - /* [in] */ FLOAT fInkToDeviceScaleX, - /* [in] */ FLOAT fInkToDeviceScaleY, - /* [out][in] */ __RPC__deref_inout_opt IInkStrokeDisp **ppIInkStroke); - - HRESULT ( STDMETHODCALLTYPE *BeginStroke )( - IStrokeBuilder * This, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const LONG *pPacket, - /* [range][in] */ ULONG cPacketProperties, - /* [size_is][in] */ __RPC__in_ecount_full(cPacketProperties) PACKET_PROPERTY *pPacketProperties, - /* [in] */ FLOAT fInkToDeviceScaleX, - /* [in] */ FLOAT fInkToDeviceScaleY, - /* [unique][out][in] */ __RPC__deref_opt_inout_opt IInkStrokeDisp **ppIInkStroke); - - HRESULT ( STDMETHODCALLTYPE *AppendPackets )( - IStrokeBuilder * This, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) const LONG *pPackets); - - HRESULT ( STDMETHODCALLTYPE *EndStroke )( - IStrokeBuilder * This, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [out][in] */ __RPC__deref_inout_opt IInkStrokeDisp **ppIInkStroke, - /* [out][in] */ __RPC__inout RECT *pDirtyRect); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Ink )( - IStrokeBuilder * This, - /* [retval][out] */ __RPC__deref_out_opt IInkDisp **ppiInkObj); - - /* [propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Ink )( - IStrokeBuilder * This, - /* [in] */ __RPC__in_opt IInkDisp *piInkObj); - - END_INTERFACE - } IStrokeBuilderVtbl; - - interface IStrokeBuilder - { - CONST_VTBL struct IStrokeBuilderVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IStrokeBuilder_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IStrokeBuilder_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IStrokeBuilder_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IStrokeBuilder_CreateStroke(This,cPktBuffLength,pPackets,cPacketProperties,pPacketProperties,fInkToDeviceScaleX,fInkToDeviceScaleY,ppIInkStroke) \ - ( (This)->lpVtbl -> CreateStroke(This,cPktBuffLength,pPackets,cPacketProperties,pPacketProperties,fInkToDeviceScaleX,fInkToDeviceScaleY,ppIInkStroke) ) - -#define IStrokeBuilder_BeginStroke(This,tcid,sid,pPacket,cPacketProperties,pPacketProperties,fInkToDeviceScaleX,fInkToDeviceScaleY,ppIInkStroke) \ - ( (This)->lpVtbl -> BeginStroke(This,tcid,sid,pPacket,cPacketProperties,pPacketProperties,fInkToDeviceScaleX,fInkToDeviceScaleY,ppIInkStroke) ) - -#define IStrokeBuilder_AppendPackets(This,tcid,sid,cPktBuffLength,pPackets) \ - ( (This)->lpVtbl -> AppendPackets(This,tcid,sid,cPktBuffLength,pPackets) ) - -#define IStrokeBuilder_EndStroke(This,tcid,sid,ppIInkStroke,pDirtyRect) \ - ( (This)->lpVtbl -> EndStroke(This,tcid,sid,ppIInkStroke,pDirtyRect) ) - -#define IStrokeBuilder_get_Ink(This,ppiInkObj) \ - ( (This)->lpVtbl -> get_Ink(This,ppiInkObj) ) - -#define IStrokeBuilder_putref_Ink(This,piInkObj) \ - ( (This)->lpVtbl -> putref_Ink(This,piInkObj) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IStrokeBuilder_INTERFACE_DEFINED__ */ - - -#ifndef __IStylusPlugin_INTERFACE_DEFINED__ -#define __IStylusPlugin_INTERFACE_DEFINED__ - -/* interface IStylusPlugin */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IStylusPlugin; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A81436D8-4757-4fd1-A185-133F97C6C545") - IStylusPlugin : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE RealTimeStylusEnabled( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids) = 0; - - virtual HRESULT STDMETHODCALLTYPE RealTimeStylusDisabled( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusInRange( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusOutOfRange( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusDown( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusUp( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusButtonDown( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos) = 0; - - virtual HRESULT STDMETHODCALLTYPE StylusButtonUp( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos) = 0; - - virtual HRESULT STDMETHODCALLTYPE InAirPackets( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts) = 0; - - virtual HRESULT STDMETHODCALLTYPE Packets( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts) = 0; - - virtual HRESULT STDMETHODCALLTYPE CustomStylusDataAdded( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) const BYTE *pbData) = 0; - - virtual HRESULT STDMETHODCALLTYPE SystemEvent( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ SYSTEM_EVENT event, - /* [in] */ SYSTEM_EVENT_DATA eventdata) = 0; - - virtual HRESULT STDMETHODCALLTYPE TabletAdded( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IInkTablet *piTablet) = 0; - - virtual HRESULT STDMETHODCALLTYPE TabletRemoved( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ LONG iTabletIndex) = 0; - - virtual HRESULT STDMETHODCALLTYPE Error( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IStylusPlugin *piPlugin, - /* [in] */ RealTimeStylusDataInterest dataInterest, - /* [in] */ HRESULT hrErrorCode, - /* [out][in] */ __RPC__inout LONG_PTR *lptrKey) = 0; - - virtual HRESULT STDMETHODCALLTYPE UpdateMapping( - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc) = 0; - - virtual HRESULT STDMETHODCALLTYPE DataInterest( - /* [retval][out] */ __RPC__out RealTimeStylusDataInterest *pDataInterest) = 0; - - }; - -#else /* C style interface */ - - typedef struct IStylusPluginVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IStylusPlugin * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IStylusPlugin * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IStylusPlugin * This); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusEnabled )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusDisabled )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *StylusInRange )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusOutOfRange )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusDown )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusUp )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonDown )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonUp )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *InAirPackets )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *Packets )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *CustomStylusDataAdded )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) const BYTE *pbData); - - HRESULT ( STDMETHODCALLTYPE *SystemEvent )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ SYSTEM_EVENT event, - /* [in] */ SYSTEM_EVENT_DATA eventdata); - - HRESULT ( STDMETHODCALLTYPE *TabletAdded )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IInkTablet *piTablet); - - HRESULT ( STDMETHODCALLTYPE *TabletRemoved )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ LONG iTabletIndex); - - HRESULT ( STDMETHODCALLTYPE *Error )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IStylusPlugin *piPlugin, - /* [in] */ RealTimeStylusDataInterest dataInterest, - /* [in] */ HRESULT hrErrorCode, - /* [out][in] */ __RPC__inout LONG_PTR *lptrKey); - - HRESULT ( STDMETHODCALLTYPE *UpdateMapping )( - IStylusPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc); - - HRESULT ( STDMETHODCALLTYPE *DataInterest )( - IStylusPlugin * This, - /* [retval][out] */ __RPC__out RealTimeStylusDataInterest *pDataInterest); - - END_INTERFACE - } IStylusPluginVtbl; - - interface IStylusPlugin - { - CONST_VTBL struct IStylusPluginVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IStylusPlugin_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IStylusPlugin_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IStylusPlugin_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IStylusPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusPlugin_StylusInRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusInRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusOutOfRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) \ - ( (This)->lpVtbl -> CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) ) - -#define IStylusPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) \ - ( (This)->lpVtbl -> SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) ) - -#define IStylusPlugin_TabletAdded(This,piRtsSrc,piTablet) \ - ( (This)->lpVtbl -> TabletAdded(This,piRtsSrc,piTablet) ) - -#define IStylusPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) \ - ( (This)->lpVtbl -> TabletRemoved(This,piRtsSrc,iTabletIndex) ) - -#define IStylusPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) \ - ( (This)->lpVtbl -> Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) ) - -#define IStylusPlugin_UpdateMapping(This,piRtsSrc) \ - ( (This)->lpVtbl -> UpdateMapping(This,piRtsSrc) ) - -#define IStylusPlugin_DataInterest(This,pDataInterest) \ - ( (This)->lpVtbl -> DataInterest(This,pDataInterest) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IStylusPlugin_INTERFACE_DEFINED__ */ - - -#ifndef __IStylusSyncPlugin_INTERFACE_DEFINED__ -#define __IStylusSyncPlugin_INTERFACE_DEFINED__ - -/* interface IStylusSyncPlugin */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IStylusSyncPlugin; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A157B174-482F-4d71-A3F6-3A41DDD11BE9") - IStylusSyncPlugin : public IStylusPlugin - { - public: - }; - -#else /* C style interface */ - - typedef struct IStylusSyncPluginVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IStylusSyncPlugin * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IStylusSyncPlugin * This); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusEnabled )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusDisabled )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *StylusInRange )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusOutOfRange )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusDown )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusUp )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonDown )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonUp )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *InAirPackets )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *Packets )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *CustomStylusDataAdded )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) const BYTE *pbData); - - HRESULT ( STDMETHODCALLTYPE *SystemEvent )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ SYSTEM_EVENT event, - /* [in] */ SYSTEM_EVENT_DATA eventdata); - - HRESULT ( STDMETHODCALLTYPE *TabletAdded )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IInkTablet *piTablet); - - HRESULT ( STDMETHODCALLTYPE *TabletRemoved )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ LONG iTabletIndex); - - HRESULT ( STDMETHODCALLTYPE *Error )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IStylusPlugin *piPlugin, - /* [in] */ RealTimeStylusDataInterest dataInterest, - /* [in] */ HRESULT hrErrorCode, - /* [out][in] */ __RPC__inout LONG_PTR *lptrKey); - - HRESULT ( STDMETHODCALLTYPE *UpdateMapping )( - IStylusSyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc); - - HRESULT ( STDMETHODCALLTYPE *DataInterest )( - IStylusSyncPlugin * This, - /* [retval][out] */ __RPC__out RealTimeStylusDataInterest *pDataInterest); - - END_INTERFACE - } IStylusSyncPluginVtbl; - - interface IStylusSyncPlugin - { - CONST_VTBL struct IStylusSyncPluginVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IStylusSyncPlugin_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IStylusSyncPlugin_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IStylusSyncPlugin_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IStylusSyncPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusSyncPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusSyncPlugin_StylusInRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusInRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusSyncPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusOutOfRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusSyncPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusSyncPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusSyncPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusSyncPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusSyncPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusSyncPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusSyncPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) \ - ( (This)->lpVtbl -> CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) ) - -#define IStylusSyncPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) \ - ( (This)->lpVtbl -> SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) ) - -#define IStylusSyncPlugin_TabletAdded(This,piRtsSrc,piTablet) \ - ( (This)->lpVtbl -> TabletAdded(This,piRtsSrc,piTablet) ) - -#define IStylusSyncPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) \ - ( (This)->lpVtbl -> TabletRemoved(This,piRtsSrc,iTabletIndex) ) - -#define IStylusSyncPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) \ - ( (This)->lpVtbl -> Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) ) - -#define IStylusSyncPlugin_UpdateMapping(This,piRtsSrc) \ - ( (This)->lpVtbl -> UpdateMapping(This,piRtsSrc) ) - -#define IStylusSyncPlugin_DataInterest(This,pDataInterest) \ - ( (This)->lpVtbl -> DataInterest(This,pDataInterest) ) - - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IStylusSyncPlugin_INTERFACE_DEFINED__ */ - - -#ifndef __IStylusAsyncPlugin_INTERFACE_DEFINED__ -#define __IStylusAsyncPlugin_INTERFACE_DEFINED__ - -/* interface IStylusAsyncPlugin */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IStylusAsyncPlugin; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A7CCA85A-31BC-4cd2-AADC-3289A3AF11C8") - IStylusAsyncPlugin : public IStylusPlugin - { - public: - }; - -#else /* C style interface */ - - typedef struct IStylusAsyncPluginVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IStylusAsyncPlugin * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IStylusAsyncPlugin * This); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusEnabled )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *RealTimeStylusDisabled )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [range][in] */ ULONG cTcidCount, - /* [size_is][in] */ __RPC__in_ecount_full(cTcidCount) const TABLET_CONTEXT_ID *pTcids); - - HRESULT ( STDMETHODCALLTYPE *StylusInRange )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusOutOfRange )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid); - - HRESULT ( STDMETHODCALLTYPE *StylusDown )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusUp )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [range][in] */ ULONG cPropCountPerPkt, - /* [size_is][in] */ __RPC__in_ecount_full(cPropCountPerPkt) LONG *pPacket, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkt); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonDown )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *StylusButtonUp )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ STYLUS_ID sid, - /* [in] */ __RPC__in const GUID *pGuidStylusButton, - /* [out][in] */ __RPC__inout POINT *pStylusPos); - - HRESULT ( STDMETHODCALLTYPE *InAirPackets )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *Packets )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const StylusInfo *pStylusInfo, - /* [in] */ ULONG cPktCount, - /* [range][in] */ ULONG cPktBuffLength, - /* [size_is][in] */ __RPC__in_ecount_full(cPktBuffLength) LONG *pPackets, - /* [out][in] */ __RPC__inout ULONG *pcInOutPkts, - /* [out][in] */ __RPC__deref_inout_opt LONG **ppInOutPkts); - - HRESULT ( STDMETHODCALLTYPE *CustomStylusDataAdded )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in const GUID *pGuidId, - /* [range][in] */ ULONG cbData, - /* [unique][size_is][in] */ __RPC__in_ecount_full_opt(cbData) const BYTE *pbData); - - HRESULT ( STDMETHODCALLTYPE *SystemEvent )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ TABLET_CONTEXT_ID tcid, - /* [in] */ STYLUS_ID sid, - /* [in] */ SYSTEM_EVENT event, - /* [in] */ SYSTEM_EVENT_DATA eventdata); - - HRESULT ( STDMETHODCALLTYPE *TabletAdded )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IInkTablet *piTablet); - - HRESULT ( STDMETHODCALLTYPE *TabletRemoved )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ LONG iTabletIndex); - - HRESULT ( STDMETHODCALLTYPE *Error )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc, - /* [in] */ __RPC__in_opt IStylusPlugin *piPlugin, - /* [in] */ RealTimeStylusDataInterest dataInterest, - /* [in] */ HRESULT hrErrorCode, - /* [out][in] */ __RPC__inout LONG_PTR *lptrKey); - - HRESULT ( STDMETHODCALLTYPE *UpdateMapping )( - IStylusAsyncPlugin * This, - /* [in] */ __RPC__in_opt IRealTimeStylus *piRtsSrc); - - HRESULT ( STDMETHODCALLTYPE *DataInterest )( - IStylusAsyncPlugin * This, - /* [retval][out] */ __RPC__out RealTimeStylusDataInterest *pDataInterest); - - END_INTERFACE - } IStylusAsyncPluginVtbl; - - interface IStylusAsyncPlugin - { - CONST_VTBL struct IStylusAsyncPluginVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IStylusAsyncPlugin_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IStylusAsyncPlugin_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IStylusAsyncPlugin_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IStylusAsyncPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusAsyncPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) \ - ( (This)->lpVtbl -> RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) ) - -#define IStylusAsyncPlugin_StylusInRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusInRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusAsyncPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) \ - ( (This)->lpVtbl -> StylusOutOfRange(This,piRtsSrc,tcid,sid) ) - -#define IStylusAsyncPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusAsyncPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) \ - ( (This)->lpVtbl -> StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) ) - -#define IStylusAsyncPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusAsyncPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) \ - ( (This)->lpVtbl -> StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) ) - -#define IStylusAsyncPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusAsyncPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) \ - ( (This)->lpVtbl -> Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) ) - -#define IStylusAsyncPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) \ - ( (This)->lpVtbl -> CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) ) - -#define IStylusAsyncPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) \ - ( (This)->lpVtbl -> SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) ) - -#define IStylusAsyncPlugin_TabletAdded(This,piRtsSrc,piTablet) \ - ( (This)->lpVtbl -> TabletAdded(This,piRtsSrc,piTablet) ) - -#define IStylusAsyncPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) \ - ( (This)->lpVtbl -> TabletRemoved(This,piRtsSrc,iTabletIndex) ) - -#define IStylusAsyncPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) \ - ( (This)->lpVtbl -> Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) ) - -#define IStylusAsyncPlugin_UpdateMapping(This,piRtsSrc) \ - ( (This)->lpVtbl -> UpdateMapping(This,piRtsSrc) ) - -#define IStylusAsyncPlugin_DataInterest(This,pDataInterest) \ - ( (This)->lpVtbl -> DataInterest(This,pDataInterest) ) - - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IStylusAsyncPlugin_INTERFACE_DEFINED__ */ - - -#ifndef __IDynamicRenderer_INTERFACE_DEFINED__ -#define __IDynamicRenderer_INTERFACE_DEFINED__ - -/* interface IDynamicRenderer */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IDynamicRenderer; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("A079468E-7165-46f9-B7AF-98AD01A93009") - IDynamicRenderer : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Enabled( - /* [retval][out] */ __RPC__out BOOL *bEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Enabled( - /* [in] */ BOOL bEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HWND( - /* [retval][out] */ __RPC__out HANDLE_PTR *hwnd) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_HWND( - /* [in] */ HANDLE_PTR hwnd) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ClipRectangle( - /* [retval][out] */ __RPC__out RECT *prcClipRect) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ClipRectangle( - /* [in] */ __RPC__in const RECT *prcClipRect) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ClipRegion( - /* [retval][out] */ __RPC__out HANDLE_PTR *phClipRgn) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_ClipRegion( - /* [in] */ HANDLE_PTR hClipRgn) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DrawingAttributes( - /* [retval][out] */ __RPC__deref_out_opt IInkDrawingAttributes **ppiDA) = 0; - - virtual /* [propputref] */ HRESULT STDMETHODCALLTYPE putref_DrawingAttributes( - /* [in] */ __RPC__in_opt IInkDrawingAttributes *piDA) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DataCacheEnabled( - /* [retval][out] */ __RPC__out BOOL *pfCacheData) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DataCacheEnabled( - /* [in] */ BOOL fCacheData) = 0; - - virtual HRESULT STDMETHODCALLTYPE ReleaseCachedData( - ULONG strokeId) = 0; - - virtual HRESULT STDMETHODCALLTYPE Refresh( void) = 0; - - virtual HRESULT STDMETHODCALLTYPE Draw( - /* [in] */ HANDLE_PTR hDC) = 0; - - }; - -#else /* C style interface */ - - typedef struct IDynamicRendererVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IDynamicRenderer * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IDynamicRenderer * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IDynamicRenderer * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Enabled )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__out BOOL *bEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Enabled )( - IDynamicRenderer * This, - /* [in] */ BOOL bEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_HWND )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__out HANDLE_PTR *hwnd); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_HWND )( - IDynamicRenderer * This, - /* [in] */ HANDLE_PTR hwnd); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClipRectangle )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__out RECT *prcClipRect); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ClipRectangle )( - IDynamicRenderer * This, - /* [in] */ __RPC__in const RECT *prcClipRect); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClipRegion )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__out HANDLE_PTR *phClipRgn); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_ClipRegion )( - IDynamicRenderer * This, - /* [in] */ HANDLE_PTR hClipRgn); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DrawingAttributes )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__deref_out_opt IInkDrawingAttributes **ppiDA); - - /* [propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_DrawingAttributes )( - IDynamicRenderer * This, - /* [in] */ __RPC__in_opt IInkDrawingAttributes *piDA); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DataCacheEnabled )( - IDynamicRenderer * This, - /* [retval][out] */ __RPC__out BOOL *pfCacheData); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DataCacheEnabled )( - IDynamicRenderer * This, - /* [in] */ BOOL fCacheData); - - HRESULT ( STDMETHODCALLTYPE *ReleaseCachedData )( - IDynamicRenderer * This, - ULONG strokeId); - - HRESULT ( STDMETHODCALLTYPE *Refresh )( - IDynamicRenderer * This); - - HRESULT ( STDMETHODCALLTYPE *Draw )( - IDynamicRenderer * This, - /* [in] */ HANDLE_PTR hDC); - - END_INTERFACE - } IDynamicRendererVtbl; - - interface IDynamicRenderer - { - CONST_VTBL struct IDynamicRendererVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IDynamicRenderer_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IDynamicRenderer_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IDynamicRenderer_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IDynamicRenderer_get_Enabled(This,bEnabled) \ - ( (This)->lpVtbl -> get_Enabled(This,bEnabled) ) - -#define IDynamicRenderer_put_Enabled(This,bEnabled) \ - ( (This)->lpVtbl -> put_Enabled(This,bEnabled) ) - -#define IDynamicRenderer_get_HWND(This,hwnd) \ - ( (This)->lpVtbl -> get_HWND(This,hwnd) ) - -#define IDynamicRenderer_put_HWND(This,hwnd) \ - ( (This)->lpVtbl -> put_HWND(This,hwnd) ) - -#define IDynamicRenderer_get_ClipRectangle(This,prcClipRect) \ - ( (This)->lpVtbl -> get_ClipRectangle(This,prcClipRect) ) - -#define IDynamicRenderer_put_ClipRectangle(This,prcClipRect) \ - ( (This)->lpVtbl -> put_ClipRectangle(This,prcClipRect) ) - -#define IDynamicRenderer_get_ClipRegion(This,phClipRgn) \ - ( (This)->lpVtbl -> get_ClipRegion(This,phClipRgn) ) - -#define IDynamicRenderer_put_ClipRegion(This,hClipRgn) \ - ( (This)->lpVtbl -> put_ClipRegion(This,hClipRgn) ) - -#define IDynamicRenderer_get_DrawingAttributes(This,ppiDA) \ - ( (This)->lpVtbl -> get_DrawingAttributes(This,ppiDA) ) - -#define IDynamicRenderer_putref_DrawingAttributes(This,piDA) \ - ( (This)->lpVtbl -> putref_DrawingAttributes(This,piDA) ) - -#define IDynamicRenderer_get_DataCacheEnabled(This,pfCacheData) \ - ( (This)->lpVtbl -> get_DataCacheEnabled(This,pfCacheData) ) - -#define IDynamicRenderer_put_DataCacheEnabled(This,fCacheData) \ - ( (This)->lpVtbl -> put_DataCacheEnabled(This,fCacheData) ) - -#define IDynamicRenderer_ReleaseCachedData(This,strokeId) \ - ( (This)->lpVtbl -> ReleaseCachedData(This,strokeId) ) - -#define IDynamicRenderer_Refresh(This) \ - ( (This)->lpVtbl -> Refresh(This) ) - -#define IDynamicRenderer_Draw(This,hDC) \ - ( (This)->lpVtbl -> Draw(This,hDC) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IDynamicRenderer_INTERFACE_DEFINED__ */ - - -#ifndef __IGestureRecognizer_INTERFACE_DEFINED__ -#define __IGestureRecognizer_INTERFACE_DEFINED__ - -/* interface IGestureRecognizer */ -/* [unique][helpstring][uuid][object] */ - - -EXTERN_C const IID IID_IGestureRecognizer; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("AE9EF86B-7054-45e3-AE22-3174DC8811B7") - IGestureRecognizer : public IUnknown - { - public: - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Enabled( - /* [retval][out] */ __RPC__out BOOL *pfEnabled) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Enabled( - /* [in] */ BOOL fEnabled) = 0; - - virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_MaxStrokeCount( - /* [retval][out] */ __RPC__out long *pcStrokes) = 0; - - virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_MaxStrokeCount( - /* [in] */ long cStrokes) = 0; - - virtual HRESULT STDMETHODCALLTYPE EnableGestures( - /* [range][in] */ ULONG cGestures, - /* [size_is][in] */ __RPC__in_ecount_full(cGestures) const int *pGestures) = 0; - - virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; - - }; - -#else /* C style interface */ - - typedef struct IGestureRecognizerVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - IGestureRecognizer * This, - /* [in] */ __RPC__in REFIID riid, - /* [iid_is][out] */ - __RPC__deref_out void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - IGestureRecognizer * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - IGestureRecognizer * This); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Enabled )( - IGestureRecognizer * This, - /* [retval][out] */ __RPC__out BOOL *pfEnabled); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Enabled )( - IGestureRecognizer * This, - /* [in] */ BOOL fEnabled); - - /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxStrokeCount )( - IGestureRecognizer * This, - /* [retval][out] */ __RPC__out long *pcStrokes); - - /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxStrokeCount )( - IGestureRecognizer * This, - /* [in] */ long cStrokes); - - HRESULT ( STDMETHODCALLTYPE *EnableGestures )( - IGestureRecognizer * This, - /* [range][in] */ ULONG cGestures, - /* [size_is][in] */ __RPC__in_ecount_full(cGestures) const int *pGestures); - - HRESULT ( STDMETHODCALLTYPE *Reset )( - IGestureRecognizer * This); - - END_INTERFACE - } IGestureRecognizerVtbl; - - interface IGestureRecognizer - { - CONST_VTBL struct IGestureRecognizerVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IGestureRecognizer_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IGestureRecognizer_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IGestureRecognizer_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IGestureRecognizer_get_Enabled(This,pfEnabled) \ - ( (This)->lpVtbl -> get_Enabled(This,pfEnabled) ) - -#define IGestureRecognizer_put_Enabled(This,fEnabled) \ - ( (This)->lpVtbl -> put_Enabled(This,fEnabled) ) - -#define IGestureRecognizer_get_MaxStrokeCount(This,pcStrokes) \ - ( (This)->lpVtbl -> get_MaxStrokeCount(This,pcStrokes) ) - -#define IGestureRecognizer_put_MaxStrokeCount(This,cStrokes) \ - ( (This)->lpVtbl -> put_MaxStrokeCount(This,cStrokes) ) - -#define IGestureRecognizer_EnableGestures(This,cGestures,pGestures) \ - ( (This)->lpVtbl -> EnableGestures(This,cGestures,pGestures) ) - -#define IGestureRecognizer_Reset(This) \ - ( (This)->lpVtbl -> Reset(This) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IGestureRecognizer_INTERFACE_DEFINED__ */ - - -EXTERN_C const CLSID CLSID_RealTimeStylus; - -#ifdef __cplusplus - -class DECLSPEC_UUID("E26B366D-F998-43ce-836F-CB6D904432B0") -RealTimeStylus; -#endif - -EXTERN_C const CLSID CLSID_DynamicRenderer; - -#ifdef __cplusplus - -class DECLSPEC_UUID("ECD32AEA-746F-4dcb-BF68-082757FAFF18") -DynamicRenderer; -#endif - -EXTERN_C const CLSID CLSID_GestureRecognizer; - -#ifdef __cplusplus - -class DECLSPEC_UUID("EA30C654-C62C-441f-AC00-95F9A196782C") -GestureRecognizer; -#endif - -EXTERN_C const CLSID CLSID_StrokeBuilder; - -#ifdef __cplusplus - -class DECLSPEC_UUID("E810CEE7-6E51-4cb0-AA3A-0B985B70DAF7") -StrokeBuilder; -#endif -#endif /* __TPCRTSLib_LIBRARY_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - - diff --git a/thirdparty/microsoft/rts/lib/rts.lib b/thirdparty/microsoft/rts/lib/rts.lib deleted file mode 100644 index 76c4cb9e..00000000 Binary files a/thirdparty/microsoft/rts/lib/rts.lib and /dev/null differ diff --git a/thirdparty/microsoft/rts/rts.pro b/thirdparty/microsoft/rts/rts.pro deleted file mode 100644 index 760ada6a..00000000 --- a/thirdparty/microsoft/rts/rts.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE = lib -CONFIG += static release warn_off - -DESTDIR = "lib" - -win32 { - - SOURCES += src/RTSCOM_i.c - - HEADERS += include/RTSCOM.h -} - - diff --git a/thirdparty/microsoft/rts/src/RTSCOM_i.c b/thirdparty/microsoft/rts/src/RTSCOM_i.c deleted file mode 100644 index eb7e3b6e..00000000 --- a/thirdparty/microsoft/rts/src/RTSCOM_i.c +++ /dev/null @@ -1,128 +0,0 @@ -//-------------------------------------------------------------------------- -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// File: rtscom_i.c -// Microsoft Tablet PC API definitions -// -//-------------------------------------------------------------------------- - - - - - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 7.00.0499 */ -/* Compiler settings for rtscom.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -#ifdef __cplusplus -extern "C"{ -#endif - - -#include -#include - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include -#undef INITGUID -#else -#include -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif !_MIDL_USE_GUIDDEF_ - -MIDL_DEFINE_GUID(IID, LIBID_TPCRTSLib,0xA76A6D34,0xA06D,0x43e1,0x8C,0x05,0x0C,0x56,0xD3,0x6F,0x46,0x2E); - - -MIDL_DEFINE_GUID(IID, IID_IRealTimeStylus,0xA8BB5D22,0x3144,0x4a7b,0x93,0xCD,0xF3,0x4A,0x16,0xBE,0x51,0x3A); - - -MIDL_DEFINE_GUID(IID, IID_IRealTimeStylus2,0xB5F2A6CD,0x3179,0x4a3e,0xB9,0xC4,0xBB,0x58,0x65,0x96,0x2B,0xE2); - - -MIDL_DEFINE_GUID(IID, IID_IRealTimeStylusSynchronization,0xAA87EAB8,0xAB4A,0x4cea,0xB5,0xCB,0x46,0xD8,0x4C,0x6A,0x25,0x09); - - -MIDL_DEFINE_GUID(IID, IID_IStrokeBuilder,0xA5FD4E2D,0xC44B,0x4092,0x91,0x77,0x26,0x09,0x05,0xEB,0x67,0x2B); - - -MIDL_DEFINE_GUID(IID, IID_IStylusPlugin,0xA81436D8,0x4757,0x4fd1,0xA1,0x85,0x13,0x3F,0x97,0xC6,0xC5,0x45); - - -MIDL_DEFINE_GUID(IID, IID_IStylusSyncPlugin,0xA157B174,0x482F,0x4d71,0xA3,0xF6,0x3A,0x41,0xDD,0xD1,0x1B,0xE9); - - -MIDL_DEFINE_GUID(IID, IID_IStylusAsyncPlugin,0xA7CCA85A,0x31BC,0x4cd2,0xAA,0xDC,0x32,0x89,0xA3,0xAF,0x11,0xC8); - - -MIDL_DEFINE_GUID(IID, IID_IDynamicRenderer,0xA079468E,0x7165,0x46f9,0xB7,0xAF,0x98,0xAD,0x01,0xA9,0x30,0x09); - - -MIDL_DEFINE_GUID(IID, IID_IGestureRecognizer,0xAE9EF86B,0x7054,0x45e3,0xAE,0x22,0x31,0x74,0xDC,0x88,0x11,0xB7); - - -MIDL_DEFINE_GUID(CLSID, CLSID_RealTimeStylus,0xE26B366D,0xF998,0x43ce,0x83,0x6F,0xCB,0x6D,0x90,0x44,0x32,0xB0); - - -MIDL_DEFINE_GUID(CLSID, CLSID_DynamicRenderer,0xECD32AEA,0x746F,0x4dcb,0xBF,0x68,0x08,0x27,0x57,0xFA,0xFF,0x18); - - -MIDL_DEFINE_GUID(CLSID, CLSID_GestureRecognizer,0xEA30C654,0xC62C,0x441f,0xAC,0x00,0x95,0xF9,0xA1,0x96,0x78,0x2C); - - -MIDL_DEFINE_GUID(CLSID, CLSID_StrokeBuilder,0xE810CEE7,0x6E51,0x4cb0,0xAA,0x3A,0x0B,0x98,0x5B,0x70,0xDA,0xF7); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - -

Introduction